From a30c5dbd2b197696e40106433233fd47baa37ebd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 13 Nov 2025 08:09:50 +0000 Subject: [PATCH 001/186] Initial plan From 8971091c7ed32e0d9a5153d08dbdd60b235a02cb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 13 Nov 2025 08:20:00 +0000 Subject: [PATCH 002/186] chore(spring): upgrade Spring Boot to 4.0.0-RC2 and Spring Cloud to 2025.1.0-M4 Co-authored-by: Netyyyy <92105726+Netyyyy@users.noreply.github.com> --- eng/versioning/external_dependencies.txt | 138 +- sdk/spring/CHANGELOG.md | 2 + sdk/spring/azure-spring-data-cosmos/pom.xml | 66 +- sdk/spring/pom.xml | 23 + ...ot_3.5.5_managed_external_dependencies.txt | 1889 ----------------- ....0.0-RC2_managed_external_dependencies.txt | 1745 +++++++++++++++ sdk/spring/scripts/version_util.py | 16 +- .../pom.xml | 24 +- .../spring-cloud-azure-actuator/pom.xml | 18 +- .../pom.xml | 24 +- .../pom.xml | 28 +- .../spring-cloud-azure-autoconfigure/pom.xml | 92 +- sdk/spring/spring-cloud-azure-core/pom.xml | 18 +- .../spring-cloud-azure-docker-compose/pom.xml | 18 +- .../pom.xml | 22 +- .../pom.xml | 38 +- .../pom.xml | 6 +- .../pom.xml | 4 +- .../pom.xml | 14 +- sdk/spring/spring-cloud-azure-service/pom.xml | 20 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 4 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../spring-cloud-azure-starter-cosmos/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 4 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 2 +- .../pom.xml | 4 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 8 +- .../pom.xml | 8 +- .../pom.xml | 18 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- sdk/spring/spring-cloud-azure-starter/pom.xml | 4 +- .../pom.xml | 22 +- .../pom.xml | 16 +- .../pom.xml | 22 +- .../pom.xml | 16 +- .../spring-cloud-azure-testcontainers/pom.xml | 16 +- .../spring-integration-azure-core/pom.xml | 20 +- .../pom.xml | 14 +- .../pom.xml | 14 +- .../pom.xml | 10 +- .../spring-messaging-azure-eventhubs/pom.xml | 20 +- .../spring-messaging-azure-servicebus/pom.xml | 16 +- .../pom.xml | 12 +- sdk/spring/spring-messaging-azure/pom.xml | 20 +- 63 files changed, 2209 insertions(+), 2316 deletions(-) delete mode 100644 sdk/spring/scripts/spring_boot_3.5.5_managed_external_dependencies.txt create mode 100644 sdk/spring/scripts/spring_boot_4.0.0-RC2_managed_external_dependencies.txt diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 47e532c6ee5c..cbcc0991487b 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -315,70 +315,70 @@ storage_com.microsoft.azure:azure-storage;8.6.6 # sdk\spring\pom.xml modules springboot3_com.diffplug.spotless:spotless-maven-plugin;2.30.0 -springboot3_com.fasterxml.jackson.core:jackson-annotations;2.19.2 -springboot3_com.fasterxml.jackson.core:jackson-core;2.19.2 -springboot3_com.fasterxml.jackson.core:jackson-databind;2.19.2 -springboot3_com.fasterxml.jackson.dataformat:jackson-dataformat-xml;2.19.2 -springboot3_com.fasterxml.jackson.datatype:jackson-datatype-jdk8;2.19.2 -springboot3_com.fasterxml.jackson.datatype:jackson-datatype-jsr310;2.19.2 -springboot3_com.fasterxml.jackson.module:jackson-module-afterburner;2.19.2 -springboot3_com.fasterxml.jackson.module:jackson-module-parameter-names;2.19.2 +springboot3_com.fasterxml.jackson.core:jackson-annotations;2.20 +springboot3_com.fasterxml.jackson.core:jackson-core;2.20.1 +springboot3_com.fasterxml.jackson.core:jackson-databind;2.20.1 +springboot3_com.fasterxml.jackson.dataformat:jackson-dataformat-xml;2.20.1 +springboot3_com.fasterxml.jackson.datatype:jackson-datatype-jdk8;2.20.1 +springboot3_com.fasterxml.jackson.datatype:jackson-datatype-jsr310;2.20.1 +springboot3_com.fasterxml.jackson.module:jackson-module-afterburner;2.20.1 +springboot3_com.fasterxml.jackson.module:jackson-module-parameter-names;2.20.1 springboot3_com.github.spotbugs:spotbugs-maven-plugin;4.8.2.0 springboot3_com.google.code.findbugs:jsr305;3.0.2 springboot3_com.mysql:mysql-connector-j;9.4.0 springboot3_com.nimbusds:nimbus-jose-jwt;9.37.3 -springboot3_io.lettuce:lettuce-core;6.6.0.RELEASE +springboot3_io.lettuce:lettuce-core;6.8.1.RELEASE springboot3_io.micrometer:micrometer-core;1.15.3 -springboot3_io.netty:netty-buffer;4.1.124.Final -springboot3_io.netty:netty-codec-http;4.1.124.Final -springboot3_io.netty:netty-common;4.1.124.Final -springboot3_io.netty:netty-handler;4.1.124.Final -springboot3_io.netty:netty-transport-native-epoll;4.1.124.Final -springboot3_io.netty:netty-transport-native-kqueue;4.1.124.Final -springboot3_io.netty:netty-transport;4.1.124.Final -springboot3_io.projectreactor.netty:reactor-netty;1.2.9 -springboot3_io.projectreactor:reactor-test;3.7.9 -springboot3_jakarta.servlet:jakarta.servlet-api;6.0.0 -springboot3_jakarta.validation:jakarta.validation-api;3.0.2 +springboot3_io.netty:netty-buffer;4.2.7.Final +springboot3_io.netty:netty-codec-http;4.2.7.Final +springboot3_io.netty:netty-common;4.2.7.Final +springboot3_io.netty:netty-handler;4.2.7.Final +springboot3_io.netty:netty-transport-native-epoll;4.2.7.Final +springboot3_io.netty:netty-transport-native-kqueue;4.2.7.Final +springboot3_io.netty:netty-transport;4.2.7.Final +springboot3_io.projectreactor.netty:reactor-netty;1.3.0-RC1 +springboot3_io.projectreactor:reactor-test;3.8.0-RC1 +springboot3_jakarta.servlet:jakarta.servlet-api;6.1.0 +springboot3_jakarta.validation:jakarta.validation-api;3.1.1 springboot3_javax.annotation:javax.annotation-api;1.3.2 springboot3_junit:junit;4.13.2 -springboot3_net.bytebuddy:byte-buddy-agent;1.17.7 -springboot3_net.bytebuddy:byte-buddy;1.17.7 -springboot3_org.apache.commons:commons-lang3;3.17.0 -springboot3_org.apache.kafka:kafka-clients;3.9.1 -springboot3_org.apache.maven.plugins:maven-antrun-plugin;3.1.0 -springboot3_org.apache.maven.plugins:maven-compiler-plugin;3.14.0 -springboot3_org.apache.maven.plugins:maven-enforcer-plugin;3.5.0 -springboot3_org.apache.maven.plugins:maven-failsafe-plugin;3.5.3 +springboot3_net.bytebuddy:byte-buddy-agent;1.17.8 +springboot3_net.bytebuddy:byte-buddy;1.17.8 +springboot3_org.apache.commons:commons-lang3;3.19.0 +springboot3_org.apache.kafka:kafka-clients;4.1.0 +springboot3_org.apache.maven.plugins:maven-antrun-plugin;3.2.0 +springboot3_org.apache.maven.plugins:maven-compiler-plugin;3.14.1 +springboot3_org.apache.maven.plugins:maven-enforcer-plugin;3.6.2 +springboot3_org.apache.maven.plugins:maven-failsafe-plugin;3.5.4 springboot3_org.apache.maven.plugins:maven-jar-plugin;3.4.2 -springboot3_org.apache.maven.plugins:maven-javadoc-plugin;3.11.3 -springboot3_org.apache.maven.plugins:maven-surefire-plugin;3.5.3 -springboot3_org.assertj:assertj-core;3.27.4 -springboot3_org.hibernate.validator:hibernate-validator;8.0.3.Final +springboot3_org.apache.maven.plugins:maven-javadoc-plugin;3.12.0 +springboot3_org.apache.maven.plugins:maven-surefire-plugin;3.5.4 +springboot3_org.assertj:assertj-core;3.27.6 +springboot3_org.hibernate.validator:hibernate-validator;9.0.1.Final springboot3_org.javatuples:javatuples;1.2 -springboot3_org.junit.jupiter:junit-jupiter;5.12.2 -springboot3_org.junit.vintage:junit-vintage-engine;5.12.2 +springboot3_org.junit.jupiter:junit-jupiter;6.0.1 +springboot3_org.junit.vintage:junit-vintage-engine;6.0.1 springboot3_org.messaginghub:pooled-jms;3.1.7 -springboot3_org.mockito:mockito-core;5.17.0 -springboot3_org.postgresql:postgresql;42.7.7 +springboot3_org.mockito:mockito-core;5.20.0 +springboot3_org.postgresql:postgresql;42.7.8 springboot3_org.revapi:revapi-maven-plugin;0.14.6 springboot3_org.slf4j:slf4j-api;2.0.17 springboot3_org.slf4j:slf4j-simple;2.0.17 -springboot3_org.springframework.boot:spring-boot-actuator-autoconfigure;3.5.5 -springboot3_org.springframework.boot:spring-boot-actuator;3.5.5 -springboot3_org.springframework.boot:spring-boot-autoconfigure;3.5.5 -springboot3_org.springframework.boot:spring-boot-configuration-metadata;3.5.5 -springboot3_org.springframework.boot:spring-boot-configuration-processor;3.5.5 -springboot3_org.springframework.boot:spring-boot-docker-compose;3.5.5 -springboot3_org.springframework.boot:spring-boot-starter-actuator;3.5.5 -springboot3_org.springframework.boot:spring-boot-starter-data-jdbc;3.5.5 -springboot3_org.springframework.boot:spring-boot-starter-integration;3.5.5 -springboot3_org.springframework.boot:spring-boot-starter-parent;3.5.5 -springboot3_org.springframework.boot:spring-boot-starter-test;3.5.5 -springboot3_org.springframework.boot:spring-boot-starter-web;3.5.5 -springboot3_org.springframework.boot:spring-boot-starter;3.5.5 -springboot3_org.springframework.boot:spring-boot-test;3.5.5 -springboot3_org.springframework.boot:spring-boot-testcontainers;3.5.5 +springboot3_org.springframework.boot:spring-boot-actuator-autoconfigure;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-actuator;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-autoconfigure;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-configuration-metadata;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-configuration-processor;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-docker-compose;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-starter-actuator;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-starter-data-jdbc;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-starter-integration;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-starter-parent;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-starter-test;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-starter-web;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-starter;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-test;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-testcontainers;4.0.0-RC2 springboot3_org.springframework.cloud:spring-cloud-bus;4.3.0 springboot3_org.springframework.cloud:spring-cloud-context;4.3.0 springboot3_org.springframework.cloud:spring-cloud-starter-stream-kafka;4.3.0 @@ -386,34 +386,34 @@ springboot3_org.springframework.cloud:spring-cloud-stream-test-binder;4.3.0 springboot3_org.springframework.cloud:spring-cloud-stream;4.3.0 springboot3_org.springframework.data:spring-data-commons;3.5.3 springboot3_org.springframework.data:spring-data-redis;3.5.3 -springboot3_org.springframework.integration:spring-integration-core;6.5.1 -springboot3_org.springframework.kafka:spring-kafka;3.3.9 +springboot3_org.springframework.integration:spring-integration-core;7.0.0-RC2 +springboot3_org.springframework.kafka:spring-kafka;4.0.0-RC1 springboot3_org.springframework.retry:spring-retry;2.0.12 springboot3_org.springframework.security:spring-security-config;6.5.3 springboot3_org.springframework.security:spring-security-oauth2-client;6.5.3 springboot3_org.springframework.security:spring-security-oauth2-jose;6.5.3 springboot3_org.springframework.security:spring-security-oauth2-resource-server;6.5.3 springboot3_org.springframework.security:spring-security-web;6.5.3 -springboot3_org.springframework:spring-beans;6.2.10 -springboot3_org.springframework:spring-context-support;6.2.10 -springboot3_org.springframework:spring-context;6.2.10 -springboot3_org.springframework:spring-core-test;6.2.10 -springboot3_org.springframework:spring-core;6.2.10 -springboot3_org.springframework:spring-expression;6.2.10 -springboot3_org.springframework:spring-jdbc;6.2.10 -springboot3_org.springframework:spring-jms;6.2.10 -springboot3_org.springframework:spring-messaging;6.2.10 -springboot3_org.springframework:spring-test;6.2.10 -springboot3_org.springframework:spring-tx;6.2.10 -springboot3_org.springframework:spring-web;6.2.10 -springboot3_org.springframework:spring-webmvc;6.2.10 +springboot3_org.springframework:spring-beans;7.0.0-RC3 +springboot3_org.springframework:spring-context-support;7.0.0-RC3 +springboot3_org.springframework:spring-context;7.0.0-RC3 +springboot3_org.springframework:spring-core-test;7.0.0-RC3 +springboot3_org.springframework:spring-core;7.0.0-RC3 +springboot3_org.springframework:spring-expression;7.0.0-RC3 +springboot3_org.springframework:spring-jdbc;7.0.0-RC3 +springboot3_org.springframework:spring-jms;7.0.0-RC3 +springboot3_org.springframework:spring-messaging;7.0.0-RC3 +springboot3_org.springframework:spring-test;7.0.0-RC3 +springboot3_org.springframework:spring-tx;7.0.0-RC3 +springboot3_org.springframework:spring-web;7.0.0-RC3 +springboot3_org.springframework:spring-webmvc;7.0.0-RC3 springboot3_org.testcontainers:junit-jupiter;1.21.3 springboot3_org.testcontainers:azure;1.21.3 springboot3_jakarta.annotation:jakarta.annotation-api;3.0.0 -springboot3_ch.qos.logback:logback-classic;1.5.18 +springboot3_ch.qos.logback:logback-classic;1.5.20 # Used for Spring version updates -springboot3_org.springframework.boot:spring-boot-dependencies;3.5.5 -springboot3_org.springframework.cloud:spring-cloud-dependencies;2025.0.0 +springboot3_org.springframework.boot:spring-boot-dependencies;4.0.0-RC2 +springboot3_org.springframework.cloud:spring-cloud-dependencies;2025.1.0-M4 # Java 7 support diff --git a/sdk/spring/CHANGELOG.md b/sdk/spring/CHANGELOG.md index 725fce466446..cfc275f58b5f 100644 --- a/sdk/spring/CHANGELOG.md +++ b/sdk/spring/CHANGELOG.md @@ -1,4 +1,6 @@ # Release History +# (Unreleased) +Upgrade Spring Boot dependencies version to 4.0.0-RC2 and Spring Cloud dependencies version to 2025.1.0-M4 ## 6.0.0 (2025-09-22) - This release is compatible with Spring Boot 3.5.0-3.5.5. (Note: 3.5.x (x>5) should be supported, but they aren't tested with this release.) diff --git a/sdk/spring/azure-spring-data-cosmos/pom.xml b/sdk/spring/azure-spring-data-cosmos/pom.xml index b5840b325b6a..c853393f446f 100644 --- a/sdk/spring/azure-spring-data-cosmos/pom.xml +++ b/sdk/spring/azure-spring-data-cosmos/pom.xml @@ -53,7 +53,7 @@ org.springframework spring-core - 6.2.10 + 7.0.0-RC3 commons-logging @@ -64,22 +64,22 @@ org.springframework spring-web - 6.2.10 + 7.0.0-RC3 org.springframework spring-beans - 6.2.10 + 7.0.0-RC3 org.springframework spring-context - 6.2.10 + 7.0.0-RC3 org.springframework spring-tx - 6.2.10 + 7.0.0-RC3 org.springframework.data @@ -95,7 +95,7 @@ org.springframework spring-expression - 6.2.10 + 7.0.0-RC3 com.azure @@ -105,17 +105,17 @@ com.fasterxml.jackson.module jackson-module-parameter-names - 2.19.2 + 2.20.1 com.fasterxml.jackson.datatype jackson-datatype-jdk8 - 2.19.2 + 2.20.1 com.fasterxml.jackson.core jackson-annotations - 2.19.2 + 2.20 org.javatuples @@ -130,14 +130,14 @@ org.apache.commons commons-lang3 - 3.17.0 + 3.19.0 org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -145,13 +145,13 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test @@ -163,7 +163,7 @@ org.springframework.boot spring-boot-starter-test - 3.5.5 + 4.0.0-RC2 test @@ -175,7 +175,7 @@ io.projectreactor reactor-test - 3.7.9 + 3.8.0-RC1 test @@ -205,7 +205,7 @@ org.junit.vintage junit-vintage-engine - 5.12.2 + 6.0.1 test @@ -221,7 +221,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -268,24 +268,24 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 - org.springframework:spring-beans:[6.2.10] - org.springframework:spring-web:[6.2.10] - org.springframework:spring-tx:[6.2.10] - org.springframework:spring-expression:[6.2.10] - org.springframework:spring-core:[6.2.10] - org.springframework:spring-context:[6.2.10] + org.springframework:spring-beans:[7.0.0-RC3] + org.springframework:spring-web:[7.0.0-RC3] + org.springframework:spring-tx:[7.0.0-RC3] + org.springframework:spring-expression:[7.0.0-RC3] + org.springframework:spring-core:[7.0.0-RC3] + org.springframework:spring-context:[7.0.0-RC3] org.springframework.data:spring-data-commons:[3.5.3] org.javatuples:javatuples:[1.2] - com.fasterxml.jackson.core:jackson-annotations:[2.19.2] - com.fasterxml.jackson.datatype:jackson-datatype-jdk8:[2.19.2] - com.fasterxml.jackson.module:jackson-module-parameter-names:[2.19.2] + com.fasterxml.jackson.core:jackson-annotations:[2.20] + com.fasterxml.jackson.datatype:jackson-datatype-jdk8:[2.20.1] + com.fasterxml.jackson.module:jackson-module-parameter-names:[2.20.1] javax.annotation:javax.annotation-api:[1.3.2] - org.apache.commons:commons-lang3:[3.17.0] + org.apache.commons:commons-lang3:[3.19.0] org.slf4j:slf4j-api:[2.0.17] @@ -296,7 +296,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.11.3 + 3.12.0 com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentProperty.java @@ -314,7 +314,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.5.3 + 3.5.4 src/test/resources/application.properties ${skip.integration.tests} @@ -348,7 +348,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.3 + 3.5.4 @@ -369,7 +369,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.3 + 3.5.4 @@ -389,7 +389,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.5.3 + 3.5.4 diff --git a/sdk/spring/pom.xml b/sdk/spring/pom.xml index 005b5bc5c160..59df68d9ae92 100644 --- a/sdk/spring/pom.xml +++ b/sdk/spring/pom.xml @@ -8,6 +8,29 @@ pom 1.0.0 + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + false + + + + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + false + + + + default diff --git a/sdk/spring/scripts/spring_boot_3.5.5_managed_external_dependencies.txt b/sdk/spring/scripts/spring_boot_3.5.5_managed_external_dependencies.txt deleted file mode 100644 index 4ba839f64a4a..000000000000 --- a/sdk/spring/scripts/spring_boot_3.5.5_managed_external_dependencies.txt +++ /dev/null @@ -1,1889 +0,0 @@ -ch.qos.logback:logback-classic;1.5.18 -ch.qos.logback:logback-core;1.5.18 -co.elastic.clients:elasticsearch-java;8.18.5 -com.couchbase.client:java-client;3.8.3 -com.datastax.oss:native-protocol;1.5.1 -com.ecwid.consul:consul-api;1.4.5 -com.fasterxml.jackson.core:jackson-annotations;2.19.2 -com.fasterxml.jackson.core:jackson-core;2.19.2 -com.fasterxml.jackson.core:jackson-databind;2.19.2 -com.fasterxml.jackson.dataformat:jackson-dataformat-avro;2.19.2 -com.fasterxml.jackson.dataformat:jackson-dataformat-cbor;2.19.2 -com.fasterxml.jackson.dataformat:jackson-dataformat-csv;2.19.2 -com.fasterxml.jackson.dataformat:jackson-dataformat-ion;2.19.2 -com.fasterxml.jackson.dataformat:jackson-dataformat-properties;2.19.2 -com.fasterxml.jackson.dataformat:jackson-dataformat-protobuf;2.19.2 -com.fasterxml.jackson.dataformat:jackson-dataformat-smile;2.19.2 -com.fasterxml.jackson.dataformat:jackson-dataformat-toml;2.19.2 -com.fasterxml.jackson.dataformat:jackson-dataformat-xml;2.19.2 -com.fasterxml.jackson.dataformat:jackson-dataformat-yaml;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-eclipse-collections;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-guava;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-hibernate4;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-hibernate5;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-hibernate5-jakarta;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-hibernate6;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-hppc;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-jakarta-jsonp;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-javax-money;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-jaxrs;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-jdk8;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-joda;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-joda-money;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-json-org;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-jsr310;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-jsr353;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-moneta;2.19.2 -com.fasterxml.jackson.datatype:jackson-datatype-pcollections;2.19.2 -com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-base;2.19.2 -com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-cbor-provider;2.19.2 -com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider;2.19.2 -com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-smile-provider;2.19.2 -com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-xml-provider;2.19.2 -com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-yaml-provider;2.19.2 -com.fasterxml.jackson.jaxrs:jackson-jaxrs-base;2.19.2 -com.fasterxml.jackson.jaxrs:jackson-jaxrs-cbor-provider;2.19.2 -com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider;2.19.2 -com.fasterxml.jackson.jaxrs:jackson-jaxrs-smile-provider;2.19.2 -com.fasterxml.jackson.jaxrs:jackson-jaxrs-xml-provider;2.19.2 -com.fasterxml.jackson.jaxrs:jackson-jaxrs-yaml-provider;2.19.2 -com.fasterxml.jackson.jr:jackson-jr-all;2.19.2 -com.fasterxml.jackson.jr:jackson-jr-annotation-support;2.19.2 -com.fasterxml.jackson.jr:jackson-jr-extension-javatime;2.19.2 -com.fasterxml.jackson.jr:jackson-jr-objects;2.19.2 -com.fasterxml.jackson.jr:jackson-jr-retrofit2;2.19.2 -com.fasterxml.jackson.jr:jackson-jr-stree;2.19.2 -com.fasterxml.jackson.module:jackson-module-afterburner;2.19.2 -com.fasterxml.jackson.module:jackson-module-android-record;2.19.2 -com.fasterxml.jackson.module:jackson-module-blackbird;2.19.2 -com.fasterxml.jackson.module:jackson-module-guice;2.19.2 -com.fasterxml.jackson.module:jackson-module-guice7;2.19.2 -com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations;2.19.2 -com.fasterxml.jackson.module:jackson-module-jaxb-annotations;2.19.2 -com.fasterxml.jackson.module:jackson-module-jsonSchema;2.19.2 -com.fasterxml.jackson.module:jackson-module-jsonSchema-jakarta;2.19.2 -com.fasterxml.jackson.module:jackson-module-kotlin;2.19.2 -com.fasterxml.jackson.module:jackson-module-mrbean;2.19.2 -com.fasterxml.jackson.module:jackson-module-no-ctor-deser;2.19.2 -com.fasterxml.jackson.module:jackson-module-osgi;2.19.2 -com.fasterxml.jackson.module:jackson-module-parameter-names;2.19.2 -com.fasterxml.jackson.module:jackson-module-paranamer;2.19.2 -com.fasterxml.jackson.module:jackson-module-scala_2.11;2.19.2 -com.fasterxml.jackson.module:jackson-module-scala_2.12;2.19.2 -com.fasterxml.jackson.module:jackson-module-scala_2.13;2.19.2 -com.fasterxml.jackson.module:jackson-module-scala_3;2.19.2 -com.fasterxml.jackson:jackson-bom;2.19.2 -com.fasterxml:classmate;1.7.0 -com.github.ben-manes.caffeine:caffeine;3.2.2 -com.github.ben-manes.caffeine:guava;3.2.2 -com.github.ben-manes.caffeine:jcache;3.2.2 -com.github.ben-manes.caffeine:simulator;3.2.2 -com.github.mxab.thymeleaf.extras:thymeleaf-extras-data-attribute;2.0.1 -com.github.tomakehurst:wiremock-jre8-standalone;2.35.1 -com.google.code.gson:gson;2.13.1 -com.graphql-java:graphql-java;24.1 -com.h2database:h2;2.3.232 -com.hazelcast:hazelcast;5.5.0 -com.hazelcast:hazelcast-spring;5.5.0 -com.ibm.db2:jcc;12.1.2.0 -com.jayway.jsonpath:json-path;2.9.0 -com.jayway.jsonpath:json-path-assert;2.9.0 -com.microsoft.sqlserver:mssql-jdbc;12.10.1.jre11 -com.mysql:mysql-connector-j;9.4.0 -com.netflix.eureka:eureka-client;2.0.4 -com.netflix.eureka:eureka-client-jersey3;2.0.4 -com.netflix.eureka:eureka-core;2.0.4 -com.netflix.eureka:eureka-core-jersey3;2.0.4 -com.oracle.database.ha:ons;23.7.0.25.01 -com.oracle.database.ha:simplefan;23.7.0.25.01 -com.oracle.database.jdbc:ojdbc11;23.7.0.25.01 -com.oracle.database.jdbc:ojdbc11-production;23.7.0.25.01 -com.oracle.database.jdbc:ojdbc17;23.7.0.25.01 -com.oracle.database.jdbc:ojdbc17-production;23.7.0.25.01 -com.oracle.database.jdbc:ojdbc8;23.7.0.25.01 -com.oracle.database.jdbc:ojdbc8-production;23.7.0.25.01 -com.oracle.database.jdbc:rsi;23.7.0.25.01 -com.oracle.database.jdbc:ucp;23.7.0.25.01 -com.oracle.database.jdbc:ucp11;23.7.0.25.01 -com.oracle.database.jdbc:ucp17;23.7.0.25.01 -com.oracle.database.nls:orai18n;23.7.0.25.01 -com.oracle.database.r2dbc:oracle-r2dbc;1.3.0 -com.oracle.database.security:oraclepki;23.7.0.25.01 -com.oracle.database.xml:xdb;23.7.0.25.01 -com.oracle.database.xml:xmlparserv2;23.7.0.25.01 -com.querydsl:codegen-utils;5.1.0 -com.querydsl:querydsl-apt;5.1.0 -com.querydsl:querydsl-bom;5.1.0 -com.querydsl:querydsl-codegen;5.1.0 -com.querydsl:querydsl-collections;5.1.0 -com.querydsl:querydsl-core;5.1.0 -com.querydsl:querydsl-guava;5.1.0 -com.querydsl:querydsl-hibernate-search;5.1.0 -com.querydsl:querydsl-jdo;5.1.0 -com.querydsl:querydsl-jpa;5.1.0 -com.querydsl:querydsl-jpa-codegen;5.1.0 -com.querydsl:querydsl-kotlin;5.1.0 -com.querydsl:querydsl-kotlin-codegen;5.1.0 -com.querydsl:querydsl-lucene3;5.1.0 -com.querydsl:querydsl-lucene4;5.1.0 -com.querydsl:querydsl-lucene5;5.1.0 -com.querydsl:querydsl-mongodb;5.1.0 -com.querydsl:querydsl-scala;5.1.0 -com.querydsl:querydsl-spatial;5.1.0 -com.querydsl:querydsl-sql;5.1.0 -com.querydsl:querydsl-sql-codegen;5.1.0 -com.querydsl:querydsl-sql-spatial;5.1.0 -com.querydsl:querydsl-sql-spring;5.1.0 -com.rabbitmq:amqp-client;5.25.0 -com.rabbitmq:stream-client;0.23.0 -com.redis:testcontainers-redis;2.2.4 -com.samskivert:jmustache;1.16 -com.sendgrid:sendgrid-java;4.10.3 -com.squareup.okhttp3:logging-interceptor;4.12.0 -com.squareup.okhttp3:mockwebserver;4.12.0 -com.squareup.okhttp3:okcurl;4.12.0 -com.squareup.okhttp3:okhttp;4.12.0 -com.squareup.okhttp3:okhttp-bom;4.12.0 -com.squareup.okhttp3:okhttp-brotli;4.12.0 -com.squareup.okhttp3:okhttp-dnsoverhttps;4.12.0 -com.squareup.okhttp3:okhttp-sse;4.12.0 -com.squareup.okhttp3:okhttp-tls;4.12.0 -com.squareup.okhttp3:okhttp-urlconnection;4.12.0 -com.sun.istack:istack-commons-runtime;4.1.2 -com.sun.xml.bind:jaxb-core;4.0.5 -com.sun.xml.bind:jaxb-impl;4.0.5 -com.sun.xml.bind:jaxb-jxc;4.0.5 -com.sun.xml.bind:jaxb-osgi;4.0.5 -com.sun.xml.bind:jaxb-xjc;4.0.5 -com.sun.xml.fastinfoset:FastInfoset;2.1.1 -com.sun.xml.messaging.saaj:saaj-impl;3.0.4 -com.toomuchcoding.jsonassert:jsonassert;0.8.0 -com.toomuchcoding.jsonassert:jsonassert-shade;0.8.0 -com.unboundid:unboundid-ldapsdk;7.0.3 -com.zaxxer:HikariCP;6.3.2 -commons-codec:commons-codec;1.18.0 -commons-pool:commons-pool;1.6 -io.asyncer:r2dbc-mysql;1.4.1 -io.fabric8.java-generator:io.fabric8.java-generator.gradle.plugin;7.3.1 -io.fabric8.kubernetes:kubernetes-karaf;7.3.1 -io.fabric8:certmanager-client;7.3.1 -io.fabric8:certmanager-model;7.3.1 -io.fabric8:chaosmesh-client;7.3.1 -io.fabric8:chaosmesh-model;7.3.1 -io.fabric8:crd-generator-api;7.3.1 -io.fabric8:crd-generator-api-v2;7.3.1 -io.fabric8:crd-generator-apt;7.3.1 -io.fabric8:crd-generator-cli;7.3.1 -io.fabric8:crd-generator-collector;7.3.1 -io.fabric8:crd-generator-maven-plugin;7.3.1 -io.fabric8:generator-annotations;7.3.1 -io.fabric8:istio-client;7.3.1 -io.fabric8:istio-model;7.3.1 -io.fabric8:java-generator-benchmark;7.3.1 -io.fabric8:java-generator-cli;7.3.1 -io.fabric8:java-generator-core;7.3.1 -io.fabric8:java-generator-maven-plugin;7.3.1 -io.fabric8:knative-client;7.3.1 -io.fabric8:knative-model;7.3.1 -io.fabric8:kube-api-test;7.3.1 -io.fabric8:kube-api-test-client-inject;7.3.1 -io.fabric8:kubernetes-client;7.3.1 -io.fabric8:kubernetes-client-api;7.3.1 -io.fabric8:kubernetes-client-bom;7.3.1 -io.fabric8:kubernetes-client-init-bc-fips;7.3.1 -io.fabric8:kubernetes-httpclient-jdk;7.3.1 -io.fabric8:kubernetes-httpclient-jetty;7.3.1 -io.fabric8:kubernetes-httpclient-okhttp;7.3.1 -io.fabric8:kubernetes-httpclient-vertx;7.3.1 -io.fabric8:kubernetes-junit-jupiter;7.3.1 -io.fabric8:kubernetes-junit-jupiter-autodetected;7.3.1 -io.fabric8:kubernetes-log4j;7.3.1 -io.fabric8:kubernetes-model-admissionregistration;7.3.1 -io.fabric8:kubernetes-model-apiextensions;7.3.1 -io.fabric8:kubernetes-model-apps;7.3.1 -io.fabric8:kubernetes-model-autoscaling;7.3.1 -io.fabric8:kubernetes-model-batch;7.3.1 -io.fabric8:kubernetes-model-certificates;7.3.1 -io.fabric8:kubernetes-model-common;7.3.1 -io.fabric8:kubernetes-model-coordination;7.3.1 -io.fabric8:kubernetes-model-core;7.3.1 -io.fabric8:kubernetes-model-discovery;7.3.1 -io.fabric8:kubernetes-model-events;7.3.1 -io.fabric8:kubernetes-model-extensions;7.3.1 -io.fabric8:kubernetes-model-flowcontrol;7.3.1 -io.fabric8:kubernetes-model-gatewayapi;7.3.1 -io.fabric8:kubernetes-model-kustomize;7.3.1 -io.fabric8:kubernetes-model-metrics;7.3.1 -io.fabric8:kubernetes-model-networking;7.3.1 -io.fabric8:kubernetes-model-node;7.3.1 -io.fabric8:kubernetes-model-policy;7.3.1 -io.fabric8:kubernetes-model-rbac;7.3.1 -io.fabric8:kubernetes-model-resource;7.3.1 -io.fabric8:kubernetes-model-scheduling;7.3.1 -io.fabric8:kubernetes-model-storageclass;7.3.1 -io.fabric8:kubernetes-model-validator;7.3.1 -io.fabric8:kubernetes-openshift-uberjar;7.3.1 -io.fabric8:kubernetes-server-mock;7.3.1 -io.fabric8:mockwebserver;7.3.1 -io.fabric8:open-cluster-management-client;7.3.1 -io.fabric8:open-cluster-management-model;7.3.1 -io.fabric8:openapi-model-generator-maven-plugin;7.3.1 -io.fabric8:openshift-client;7.3.1 -io.fabric8:openshift-client-api;7.3.1 -io.fabric8:openshift-model;7.3.1 -io.fabric8:openshift-model-autoscaling;7.3.1 -io.fabric8:openshift-model-config;7.3.1 -io.fabric8:openshift-model-console;7.3.1 -io.fabric8:openshift-model-hive;7.3.1 -io.fabric8:openshift-model-installer;7.3.1 -io.fabric8:openshift-model-machine;7.3.1 -io.fabric8:openshift-model-machineconfiguration;7.3.1 -io.fabric8:openshift-model-miscellaneous;7.3.1 -io.fabric8:openshift-model-monitoring;7.3.1 -io.fabric8:openshift-model-operator;7.3.1 -io.fabric8:openshift-model-operatorhub;7.3.1 -io.fabric8:openshift-model-storageversionmigrator;7.3.1 -io.fabric8:openshift-model-tuned;7.3.1 -io.fabric8:openshift-model-whereabouts;7.3.1 -io.fabric8:ovn-client;7.3.1 -io.fabric8:ovn-model;7.3.1 -io.fabric8:tekton-client;7.3.1 -io.fabric8:tekton-model;7.3.1 -io.fabric8:verticalpodautoscaler-client;7.3.1 -io.fabric8:verticalpodautoscaler-model;7.3.1 -io.fabric8:volcano-client;7.3.1 -io.fabric8:volcano-model;7.3.1 -io.fabric8:volumesnapshot-client;7.3.1 -io.fabric8:volumesnapshot-model;7.3.1 -io.fabric8:zjsonpatch;7.3.1 -io.github.git-commit-id:git-commit-id-maven-plugin;9.0.2 -io.github.openfeign:feign-annotation-error-decoder;13.6 -io.github.openfeign:feign-bom;13.6 -io.github.openfeign:feign-core;13.6 -io.github.openfeign:feign-dropwizard-metrics4;13.6 -io.github.openfeign:feign-dropwizard-metrics5;13.6 -io.github.openfeign:feign-fastjson2;13.6 -io.github.openfeign:feign-form;13.6 -io.github.openfeign:feign-form-spring;13.6 -io.github.openfeign:feign-googlehttpclient;13.6 -io.github.openfeign:feign-gson;13.6 -io.github.openfeign:feign-hc5;13.6 -io.github.openfeign:feign-httpclient;13.6 -io.github.openfeign:feign-hystrix;13.6 -io.github.openfeign:feign-jackson;13.6 -io.github.openfeign:feign-jackson-jaxb;13.6 -io.github.openfeign:feign-jackson-jr;13.6 -io.github.openfeign:feign-jakarta;13.6 -io.github.openfeign:feign-java11;13.6 -io.github.openfeign:feign-jaxb;13.6 -io.github.openfeign:feign-jaxb-jakarta;13.6 -io.github.openfeign:feign-jaxrs;13.6 -io.github.openfeign:feign-jaxrs2;13.6 -io.github.openfeign:feign-jaxrs3;13.6 -io.github.openfeign:feign-jaxrs4;13.6 -io.github.openfeign:feign-json;13.6 -io.github.openfeign:feign-kotlin;13.6 -io.github.openfeign:feign-micrometer;13.6 -io.github.openfeign:feign-mock;13.6 -io.github.openfeign:feign-moshi;13.6 -io.github.openfeign:feign-okhttp;13.6 -io.github.openfeign:feign-reactive-wrappers;13.6 -io.github.openfeign:feign-ribbon;13.6 -io.github.openfeign:feign-sax;13.6 -io.github.openfeign:feign-slf4j;13.6 -io.github.openfeign:feign-soap;13.6 -io.github.openfeign:feign-soap-jakarta;13.6 -io.github.openfeign:feign-spring;13.6 -io.github.openfeign:feign-vertx;13.6 -io.github.openfeign:feign-vertx4-test;13.6 -io.github.openfeign:feign-vertx5-test;13.6 -io.github.resilience4j:resilience4j-all;2.2.0 -io.github.resilience4j:resilience4j-annotations;2.2.0 -io.github.resilience4j:resilience4j-bom;2.2.0 -io.github.resilience4j:resilience4j-bulkhead;2.2.0 -io.github.resilience4j:resilience4j-cache;2.2.0 -io.github.resilience4j:resilience4j-circuitbreaker;2.2.0 -io.github.resilience4j:resilience4j-circularbuffer;2.2.0 -io.github.resilience4j:resilience4j-consumer;2.2.0 -io.github.resilience4j:resilience4j-core;2.2.0 -io.github.resilience4j:resilience4j-feign;2.2.0 -io.github.resilience4j:resilience4j-kotlin;2.2.0 -io.github.resilience4j:resilience4j-metrics;2.2.0 -io.github.resilience4j:resilience4j-micrometer;2.2.0 -io.github.resilience4j:resilience4j-ratelimiter;2.2.0 -io.github.resilience4j:resilience4j-reactor;2.2.0 -io.github.resilience4j:resilience4j-retry;2.2.0 -io.github.resilience4j:resilience4j-rxjava2;2.2.0 -io.github.resilience4j:resilience4j-rxjava3;2.2.0 -io.github.resilience4j:resilience4j-spring;2.2.0 -io.github.resilience4j:resilience4j-spring-boot2;2.2.0 -io.github.resilience4j:resilience4j-spring-boot3;2.2.0 -io.github.resilience4j:resilience4j-spring-cloud2;2.2.0 -io.github.resilience4j:resilience4j-spring6;2.2.0 -io.github.resilience4j:resilience4j-timelimiter;2.2.0 -io.github.resilience4j:resilience4j-vavr;2.2.0 -io.kubernetes:client-java;19.0.2 -io.kubernetes:client-java-extended;19.0.2 -io.kubernetes:client-java-spring-integration;19.0.2 -io.lettuce:lettuce-core;6.6.0.RELEASE -io.micrometer:context-propagation;1.1.3 -io.micrometer:docs;1.5.3 -io.micrometer:micrometer-bom;1.15.3 -io.micrometer:micrometer-commons;1.15.3 -io.micrometer:micrometer-core;1.15.3 -io.micrometer:micrometer-jakarta9;1.15.3 -io.micrometer:micrometer-java11;1.15.3 -io.micrometer:micrometer-java21;1.15.3 -io.micrometer:micrometer-jetty11;1.15.3 -io.micrometer:micrometer-jetty12;1.15.3 -io.micrometer:micrometer-observation;1.15.3 -io.micrometer:micrometer-observation-test;1.15.3 -io.micrometer:micrometer-registry-appoptics;1.15.3 -io.micrometer:micrometer-registry-atlas;1.15.3 -io.micrometer:micrometer-registry-azure-monitor;1.15.3 -io.micrometer:micrometer-registry-cloudwatch2;1.15.3 -io.micrometer:micrometer-registry-datadog;1.15.3 -io.micrometer:micrometer-registry-dynatrace;1.15.3 -io.micrometer:micrometer-registry-elastic;1.15.3 -io.micrometer:micrometer-registry-ganglia;1.15.3 -io.micrometer:micrometer-registry-graphite;1.15.3 -io.micrometer:micrometer-registry-health;1.15.3 -io.micrometer:micrometer-registry-humio;1.15.3 -io.micrometer:micrometer-registry-influx;1.15.3 -io.micrometer:micrometer-registry-jmx;1.15.3 -io.micrometer:micrometer-registry-kairos;1.15.3 -io.micrometer:micrometer-registry-new-relic;1.15.3 -io.micrometer:micrometer-registry-opentsdb;1.15.3 -io.micrometer:micrometer-registry-otlp;1.15.3 -io.micrometer:micrometer-registry-prometheus;1.15.3 -io.micrometer:micrometer-registry-prometheus-simpleclient;1.15.3 -io.micrometer:micrometer-registry-signalfx;1.15.3 -io.micrometer:micrometer-registry-stackdriver;1.15.3 -io.micrometer:micrometer-registry-statsd;1.15.3 -io.micrometer:micrometer-registry-wavefront;1.15.3 -io.micrometer:micrometer-test;1.15.3 -io.micrometer:micrometer-tracing;1.5.3 -io.micrometer:micrometer-tracing-bom;1.5.3 -io.micrometer:micrometer-tracing-bridge-brave;1.5.3 -io.micrometer:micrometer-tracing-bridge-otel;1.5.3 -io.micrometer:micrometer-tracing-integration-test;1.5.3 -io.micrometer:micrometer-tracing-reporter-wavefront;1.5.3 -io.micrometer:micrometer-tracing-test;1.5.3 -io.netty:netty-all;4.1.124.Final -io.netty:netty-bom;4.1.124.Final -io.netty:netty-buffer;4.1.124.Final -io.netty:netty-codec;4.1.124.Final -io.netty:netty-codec-dns;4.1.124.Final -io.netty:netty-codec-haproxy;4.1.124.Final -io.netty:netty-codec-http;4.1.124.Final -io.netty:netty-codec-http2;4.1.124.Final -io.netty:netty-codec-memcache;4.1.124.Final -io.netty:netty-codec-mqtt;4.1.124.Final -io.netty:netty-codec-redis;4.1.124.Final -io.netty:netty-codec-smtp;4.1.124.Final -io.netty:netty-codec-socks;4.1.124.Final -io.netty:netty-codec-stomp;4.1.124.Final -io.netty:netty-codec-xml;4.1.124.Final -io.netty:netty-common;4.1.124.Final -io.netty:netty-dev-tools;4.1.124.Final -io.netty:netty-handler;4.1.124.Final -io.netty:netty-handler-proxy;4.1.124.Final -io.netty:netty-handler-ssl-ocsp;4.1.124.Final -io.netty:netty-resolver;4.1.124.Final -io.netty:netty-resolver-dns;4.1.124.Final -io.netty:netty-resolver-dns-classes-macos;4.1.124.Final -io.netty:netty-resolver-dns-native-macos;4.1.124.Final -io.netty:netty-tcnative;2.0.72.Final -io.netty:netty-tcnative-boringssl-static;2.0.72.Final -io.netty:netty-tcnative-classes;2.0.72.Final -io.netty:netty-transport;4.1.124.Final -io.netty:netty-transport-classes-epoll;4.1.124.Final -io.netty:netty-transport-classes-kqueue;4.1.124.Final -io.netty:netty-transport-native-epoll;4.1.124.Final -io.netty:netty-transport-native-kqueue;4.1.124.Final -io.netty:netty-transport-native-unix-common;4.1.124.Final -io.netty:netty-transport-rxtx;4.1.124.Final -io.netty:netty-transport-sctp;4.1.124.Final -io.netty:netty-transport-udt;4.1.124.Final -io.opentelemetry:opentelemetry-api;1.49.0 -io.opentelemetry:opentelemetry-bom;1.49.0 -io.opentelemetry:opentelemetry-context;1.49.0 -io.opentelemetry:opentelemetry-exporter-common;1.49.0 -io.opentelemetry:opentelemetry-exporter-logging;1.49.0 -io.opentelemetry:opentelemetry-exporter-logging-otlp;1.49.0 -io.opentelemetry:opentelemetry-exporter-otlp;1.49.0 -io.opentelemetry:opentelemetry-exporter-otlp-common;1.49.0 -io.opentelemetry:opentelemetry-exporter-sender-grpc-managed-channel;1.49.0 -io.opentelemetry:opentelemetry-exporter-sender-jdk;1.49.0 -io.opentelemetry:opentelemetry-exporter-sender-okhttp;1.49.0 -io.opentelemetry:opentelemetry-exporter-zipkin;1.49.0 -io.opentelemetry:opentelemetry-extension-kotlin;1.49.0 -io.opentelemetry:opentelemetry-extension-trace-propagators;1.49.0 -io.opentelemetry:opentelemetry-opentracing-shim;1.49.0 -io.opentelemetry:opentelemetry-sdk;1.49.0 -io.opentelemetry:opentelemetry-sdk-common;1.49.0 -io.opentelemetry:opentelemetry-sdk-extension-autoconfigure;1.49.0 -io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi;1.49.0 -io.opentelemetry:opentelemetry-sdk-extension-jaeger-remote-sampler;1.49.0 -io.opentelemetry:opentelemetry-sdk-logs;1.49.0 -io.opentelemetry:opentelemetry-sdk-metrics;1.49.0 -io.opentelemetry:opentelemetry-sdk-testing;1.49.0 -io.opentelemetry:opentelemetry-sdk-trace;1.49.0 -io.projectreactor.addons:reactor-adapter;3.5.2 -io.projectreactor.addons:reactor-extra;3.5.2 -io.projectreactor.addons:reactor-pool;1.1.3 -io.projectreactor.addons:reactor-pool-micrometer;0.2.3 -io.projectreactor.kafka:reactor-kafka;1.3.23 -io.projectreactor.kotlin:reactor-kotlin-extensions;1.2.3 -io.projectreactor.netty:reactor-netty;1.2.9 -io.projectreactor.netty:reactor-netty-core;1.2.9 -io.projectreactor.netty:reactor-netty-http;1.2.9 -io.projectreactor.netty:reactor-netty-http-brave;1.2.9 -io.projectreactor:reactor-bom;2024.0.9 -io.projectreactor:reactor-core;3.7.9 -io.projectreactor:reactor-core-micrometer;1.2.9 -io.projectreactor:reactor-test;3.7.9 -io.projectreactor:reactor-tools;3.7.9 -io.prometheus:prometheus-metrics-bom;1.3.10 -io.prometheus:prometheus-metrics-config;1.3.10 -io.prometheus:prometheus-metrics-core;1.3.10 -io.prometheus:prometheus-metrics-exporter-common;1.3.10 -io.prometheus:prometheus-metrics-exporter-httpserver;1.3.10 -io.prometheus:prometheus-metrics-exporter-opentelemetry;1.3.10 -io.prometheus:prometheus-metrics-exporter-opentelemetry-no-otel;1.3.10 -io.prometheus:prometheus-metrics-exporter-opentelemetry-otel-agent-resources;1.3.10 -io.prometheus:prometheus-metrics-exporter-pushgateway;1.3.10 -io.prometheus:prometheus-metrics-exporter-servlet-jakarta;1.3.10 -io.prometheus:prometheus-metrics-exporter-servlet-javax;1.3.10 -io.prometheus:prometheus-metrics-exposition-formats;1.3.10 -io.prometheus:prometheus-metrics-exposition-formats-no-protobuf;1.3.10 -io.prometheus:prometheus-metrics-exposition-textformats;1.3.10 -io.prometheus:prometheus-metrics-instrumentation-caffeine;1.3.10 -io.prometheus:prometheus-metrics-instrumentation-dropwizard;1.3.10 -io.prometheus:prometheus-metrics-instrumentation-dropwizard5;1.3.10 -io.prometheus:prometheus-metrics-instrumentation-guava;1.3.10 -io.prometheus:prometheus-metrics-instrumentation-jvm;1.3.10 -io.prometheus:prometheus-metrics-model;1.3.10 -io.prometheus:prometheus-metrics-simpleclient-bridge;1.3.10 -io.prometheus:prometheus-metrics-tracer;1.3.10 -io.prometheus:prometheus-metrics-tracer-common;1.3.10 -io.prometheus:prometheus-metrics-tracer-initializer;1.3.10 -io.prometheus:prometheus-metrics-tracer-otel;1.3.10 -io.prometheus:prometheus-metrics-tracer-otel-agent;1.3.10 -io.prometheus:simpleclient;0.16.0 -io.prometheus:simpleclient_bom;0.16.0 -io.prometheus:simpleclient_caffeine;0.16.0 -io.prometheus:simpleclient_common;0.16.0 -io.prometheus:simpleclient_dropwizard;0.16.0 -io.prometheus:simpleclient_graphite_bridge;0.16.0 -io.prometheus:simpleclient_guava;0.16.0 -io.prometheus:simpleclient_hibernate;0.16.0 -io.prometheus:simpleclient_hotspot;0.16.0 -io.prometheus:simpleclient_httpserver;0.16.0 -io.prometheus:simpleclient_jetty;0.16.0 -io.prometheus:simpleclient_jetty_jdk8;0.16.0 -io.prometheus:simpleclient_log4j;0.16.0 -io.prometheus:simpleclient_log4j2;0.16.0 -io.prometheus:simpleclient_logback;0.16.0 -io.prometheus:simpleclient_pushgateway;0.16.0 -io.prometheus:simpleclient_servlet;0.16.0 -io.prometheus:simpleclient_servlet_jakarta;0.16.0 -io.prometheus:simpleclient_spring_boot;0.16.0 -io.prometheus:simpleclient_spring_web;0.16.0 -io.prometheus:simpleclient_tracer_common;0.16.0 -io.prometheus:simpleclient_tracer_otel;0.16.0 -io.prometheus:simpleclient_tracer_otel_agent;0.16.0 -io.prometheus:simpleclient_vertx;0.16.0 -io.r2dbc:r2dbc-h2;1.0.0.RELEASE -io.r2dbc:r2dbc-mssql;1.0.2.RELEASE -io.r2dbc:r2dbc-pool;1.0.2.RELEASE -io.r2dbc:r2dbc-proxy;1.1.6.RELEASE -io.r2dbc:r2dbc-spi;1.0.0.RELEASE -io.reactivex.rxjava3:rxjava;3.1.11 -io.rest-assured:json-path;5.5.6 -io.rest-assured:json-schema-validator;5.5.6 -io.rest-assured:kotlin-extensions;5.5.6 -io.rest-assured:rest-assured;5.5.6 -io.rest-assured:rest-assured-all;5.5.6 -io.rest-assured:rest-assured-bom;5.5.6 -io.rest-assured:rest-assured-common;5.5.6 -io.rest-assured:scala-extensions;5.5.6 -io.rest-assured:scala-support;5.5.6 -io.rest-assured:spring-commons;5.5.6 -io.rest-assured:spring-mock-mvc;5.5.6 -io.rest-assured:spring-mock-mvc-kotlin-extensions;5.5.6 -io.rest-assured:spring-web-test-client;5.5.6 -io.rest-assured:spring-web-test-client-kotlin-extensions;5.5.6 -io.rest-assured:xml-path;5.5.6 -io.rsocket:rsocket-bom;1.1.5 -io.rsocket:rsocket-core;1.1.5 -io.rsocket:rsocket-load-balancer;1.1.5 -io.rsocket:rsocket-micrometer;1.1.5 -io.rsocket:rsocket-test;1.1.5 -io.rsocket:rsocket-transport-local;1.1.5 -io.rsocket:rsocket-transport-netty;1.1.5 -io.spring.gradle:dependency-management-plugin;1.1.7 -io.undertow:undertow-core;2.3.18.Final -io.undertow:undertow-servlet;2.3.18.Final -io.undertow:undertow-websockets-jsr;2.3.18.Final -io.zipkin.brave:brave;6.1.0 -io.zipkin.brave:brave-bom;6.1.0 -io.zipkin.brave:brave-context-jfr;6.1.0 -io.zipkin.brave:brave-context-log4j12;6.1.0 -io.zipkin.brave:brave-context-log4j2;6.1.0 -io.zipkin.brave:brave-context-slf4j;6.1.0 -io.zipkin.brave:brave-instrumentation-dubbo;6.1.0 -io.zipkin.brave:brave-instrumentation-grpc;6.1.0 -io.zipkin.brave:brave-instrumentation-http;6.1.0 -io.zipkin.brave:brave-instrumentation-http-tests;6.1.0 -io.zipkin.brave:brave-instrumentation-http-tests-jakarta;6.1.0 -io.zipkin.brave:brave-instrumentation-httpasyncclient;6.1.0 -io.zipkin.brave:brave-instrumentation-httpclient;6.1.0 -io.zipkin.brave:brave-instrumentation-httpclient5;6.1.0 -io.zipkin.brave:brave-instrumentation-jakarta-jms;6.1.0 -io.zipkin.brave:brave-instrumentation-jaxrs2;6.1.0 -io.zipkin.brave:brave-instrumentation-jersey-server;6.1.0 -io.zipkin.brave:brave-instrumentation-jms;6.1.0 -io.zipkin.brave:brave-instrumentation-jms-jakarta;6.1.0 -io.zipkin.brave:brave-instrumentation-kafka-clients;6.1.0 -io.zipkin.brave:brave-instrumentation-kafka-streams;6.1.0 -io.zipkin.brave:brave-instrumentation-messaging;6.1.0 -io.zipkin.brave:brave-instrumentation-mongodb;6.1.0 -io.zipkin.brave:brave-instrumentation-mysql;6.1.0 -io.zipkin.brave:brave-instrumentation-mysql6;6.1.0 -io.zipkin.brave:brave-instrumentation-mysql8;6.1.0 -io.zipkin.brave:brave-instrumentation-netty-codec-http;6.1.0 -io.zipkin.brave:brave-instrumentation-okhttp3;6.1.0 -io.zipkin.brave:brave-instrumentation-rocketmq-client;6.1.0 -io.zipkin.brave:brave-instrumentation-rpc;6.1.0 -io.zipkin.brave:brave-instrumentation-servlet;6.1.0 -io.zipkin.brave:brave-instrumentation-servlet-jakarta;6.1.0 -io.zipkin.brave:brave-instrumentation-spring-rabbit;6.1.0 -io.zipkin.brave:brave-instrumentation-spring-web;6.1.0 -io.zipkin.brave:brave-instrumentation-spring-webmvc;6.1.0 -io.zipkin.brave:brave-instrumentation-vertx-web;6.1.0 -io.zipkin.brave:brave-spring-beans;6.1.0 -io.zipkin.brave:brave-tests;6.1.0 -io.zipkin.reporter2:zipkin-reporter;3.5.1 -io.zipkin.reporter2:zipkin-reporter-bom;3.5.1 -io.zipkin.reporter2:zipkin-reporter-brave;3.5.1 -io.zipkin.reporter2:zipkin-reporter-metrics-micrometer;3.5.1 -io.zipkin.reporter2:zipkin-reporter-spring-beans;3.5.1 -io.zipkin.reporter2:zipkin-sender-activemq-client;3.5.1 -io.zipkin.reporter2:zipkin-sender-amqp-client;3.5.1 -io.zipkin.reporter2:zipkin-sender-kafka;3.5.1 -io.zipkin.reporter2:zipkin-sender-libthrift;3.5.1 -io.zipkin.reporter2:zipkin-sender-okhttp3;3.5.1 -io.zipkin.reporter2:zipkin-sender-pulsar-client;3.5.1 -io.zipkin.reporter2:zipkin-sender-urlconnection;3.5.1 -jakarta.activation:jakarta.activation-api;2.1.3 -jakarta.annotation:jakarta.annotation-api;2.1.1 -jakarta.inject:jakarta.inject-api;2.0.1 -jakarta.jms:jakarta.jms-api;3.1.0 -jakarta.json.bind:jakarta.json.bind-api;3.0.1 -jakarta.json:jakarta.json-api;2.1.3 -jakarta.mail:jakarta.mail-api;2.1.3 -jakarta.management.j2ee:jakarta.management.j2ee-api;1.1.4 -jakarta.persistence:jakarta.persistence-api;3.1.0 -jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api;3.0.2 -jakarta.servlet:jakarta.servlet-api;6.0.0 -jakarta.transaction:jakarta.transaction-api;2.0.1 -jakarta.validation:jakarta.validation-api;3.0.2 -jakarta.websocket:jakarta.websocket-api;2.1.1 -jakarta.websocket:jakarta.websocket-client-api;2.1.1 -jakarta.ws.rs:jakarta.ws.rs-api;3.1.0 -jakarta.xml.bind:jakarta.xml.bind-api;4.0.2 -jakarta.xml.soap:jakarta.xml.soap-api;3.0.2 -jakarta.xml.ws:jakarta.xml.ws-api;4.0.2 -javax.cache:cache-api;1.1.1 -javax.money:money-api;1.1 -jaxen:jaxen;2.0.0 -junit:junit;4.13.2 -net.bytebuddy:byte-buddy;1.17.7 -net.bytebuddy:byte-buddy-agent;1.17.7 -net.minidev:json-smart;2.5.2 -net.sourceforge.jtds:jtds;1.3.1 -net.sourceforge.nekohtml:nekohtml;1.9.22 -nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect;3.4.0 -org.apache.activemq:activemq-all;6.1.7 -org.apache.activemq:activemq-amqp;6.1.7 -org.apache.activemq:activemq-blueprint;6.1.7 -org.apache.activemq:activemq-bom;6.1.7 -org.apache.activemq:activemq-branding;2.40.0 -org.apache.activemq:activemq-broker;6.1.7 -org.apache.activemq:activemq-client;6.1.7 -org.apache.activemq:activemq-console;6.1.7 -org.apache.activemq:activemq-http;6.1.7 -org.apache.activemq:activemq-jaas;6.1.7 -org.apache.activemq:activemq-jdbc-store;6.1.7 -org.apache.activemq:activemq-jms-pool;6.1.7 -org.apache.activemq:activemq-kahadb-store;6.1.7 -org.apache.activemq:activemq-karaf;6.1.7 -org.apache.activemq:activemq-log4j-appender;6.1.7 -org.apache.activemq:activemq-mqtt;6.1.7 -org.apache.activemq:activemq-openwire-generator;6.1.7 -org.apache.activemq:activemq-openwire-legacy;6.1.7 -org.apache.activemq:activemq-osgi;6.1.7 -org.apache.activemq:activemq-pool;6.1.7 -org.apache.activemq:activemq-ra;6.1.7 -org.apache.activemq:activemq-rar;6.1.7 -org.apache.activemq:activemq-run;6.1.7 -org.apache.activemq:activemq-runtime-config;6.1.7 -org.apache.activemq:activemq-shiro;6.1.7 -org.apache.activemq:activemq-spring;6.1.7 -org.apache.activemq:activemq-stomp;6.1.7 -org.apache.activemq:activemq-web;6.1.7 -org.apache.activemq:activemq-web-console;6.1.7 -org.apache.activemq:activemq-web-demo;6.1.7 -org.apache.activemq:artemis-amqp-protocol;2.40.0 -org.apache.activemq:artemis-bom;2.40.0 -org.apache.activemq:artemis-boot;2.40.0 -org.apache.activemq:artemis-cdi-client;2.40.0 -org.apache.activemq:artemis-cli;2.40.0 -org.apache.activemq:artemis-commons;2.40.0 -org.apache.activemq:artemis-console;2.40.0 -org.apache.activemq:artemis-core-client;2.40.0 -org.apache.activemq:artemis-core-client-all;2.40.0 -org.apache.activemq:artemis-core-client-osgi;2.40.0 -org.apache.activemq:artemis-dto;2.40.0 -org.apache.activemq:artemis-features;2.40.0 -org.apache.activemq:artemis-hornetq-protocol;2.40.0 -org.apache.activemq:artemis-hqclient-protocol;2.40.0 -org.apache.activemq:artemis-jakarta-cdi-client;2.40.0 -org.apache.activemq:artemis-jakarta-client;2.40.0 -org.apache.activemq:artemis-jakarta-client-all;2.40.0 -org.apache.activemq:artemis-jakarta-openwire-protocol;2.40.0 -org.apache.activemq:artemis-jakarta-ra;2.40.0 -org.apache.activemq:artemis-jakarta-server;2.40.0 -org.apache.activemq:artemis-jakarta-service-extensions;2.40.0 -org.apache.activemq:artemis-jdbc-store;2.40.0 -org.apache.activemq:artemis-jms-client;2.40.0 -org.apache.activemq:artemis-jms-client-all;2.40.0 -org.apache.activemq:artemis-jms-client-osgi;2.40.0 -org.apache.activemq:artemis-jms-server;2.40.0 -org.apache.activemq:artemis-journal;2.40.0 -org.apache.activemq:artemis-lockmanager-api;2.40.0 -org.apache.activemq:artemis-lockmanager-ri;2.40.0 -org.apache.activemq:artemis-mqtt-protocol;2.40.0 -org.apache.activemq:artemis-openwire-protocol;2.40.0 -org.apache.activemq:artemis-ra;2.40.0 -org.apache.activemq:artemis-selector;2.40.0 -org.apache.activemq:artemis-server;2.40.0 -org.apache.activemq:artemis-server-osgi;2.40.0 -org.apache.activemq:artemis-service-extensions;2.40.0 -org.apache.activemq:artemis-stomp-protocol;2.40.0 -org.apache.activemq:artemis-web;2.40.0 -org.apache.activemq:artemis-website;2.40.0 -org.apache.cassandra:java-driver-bom;4.19.0 -org.apache.cassandra:java-driver-core;4.19.0 -org.apache.cassandra:java-driver-core-shaded;4.19.0 -org.apache.cassandra:java-driver-guava-shaded;4.19.0 -org.apache.cassandra:java-driver-mapper-processor;4.19.0 -org.apache.cassandra:java-driver-mapper-runtime;4.19.0 -org.apache.cassandra:java-driver-metrics-micrometer;4.19.0 -org.apache.cassandra:java-driver-metrics-microprofile;4.19.0 -org.apache.cassandra:java-driver-query-builder;4.19.0 -org.apache.cassandra:java-driver-test-infra;4.19.0 -org.apache.commons:commons-dbcp2;2.13.0 -org.apache.commons:commons-lang3;3.17.0 -org.apache.commons:commons-pool2;2.12.1 -org.apache.curator:curator-framework;5.8.0 -org.apache.curator:curator-recipes;5.8.0 -org.apache.curator:curator-test;5.8.0 -org.apache.curator:curator-x-discovery;5.8.0 -org.apache.derby:derby;10.16.1.1 -org.apache.derby:derbyclient;10.16.1.1 -org.apache.derby:derbynet;10.16.1.1 -org.apache.derby:derbyoptionaltools;10.16.1.1 -org.apache.derby:derbyshared;10.16.1.1 -org.apache.derby:derbytools;10.16.1.1 -org.apache.groovy:groovy;4.0.28 -org.apache.groovy:groovy-ant;4.0.28 -org.apache.groovy:groovy-astbuilder;4.0.28 -org.apache.groovy:groovy-bom;4.0.28 -org.apache.groovy:groovy-cli-commons;4.0.28 -org.apache.groovy:groovy-cli-picocli;4.0.28 -org.apache.groovy:groovy-console;4.0.28 -org.apache.groovy:groovy-contracts;4.0.28 -org.apache.groovy:groovy-datetime;4.0.28 -org.apache.groovy:groovy-dateutil;4.0.28 -org.apache.groovy:groovy-docgenerator;4.0.28 -org.apache.groovy:groovy-ginq;4.0.28 -org.apache.groovy:groovy-groovydoc;4.0.28 -org.apache.groovy:groovy-groovysh;4.0.28 -org.apache.groovy:groovy-jmx;4.0.28 -org.apache.groovy:groovy-json;4.0.28 -org.apache.groovy:groovy-jsr223;4.0.28 -org.apache.groovy:groovy-macro;4.0.28 -org.apache.groovy:groovy-macro-library;4.0.28 -org.apache.groovy:groovy-nio;4.0.28 -org.apache.groovy:groovy-servlet;4.0.28 -org.apache.groovy:groovy-sql;4.0.28 -org.apache.groovy:groovy-swing;4.0.28 -org.apache.groovy:groovy-templates;4.0.28 -org.apache.groovy:groovy-test;4.0.28 -org.apache.groovy:groovy-test-junit5;4.0.28 -org.apache.groovy:groovy-testng;4.0.28 -org.apache.groovy:groovy-toml;4.0.28 -org.apache.groovy:groovy-typecheckers;4.0.28 -org.apache.groovy:groovy-xml;4.0.28 -org.apache.groovy:groovy-yaml;4.0.28 -org.apache.httpcomponents.client5:httpclient5;5.5 -org.apache.httpcomponents.client5:httpclient5-cache;5.5 -org.apache.httpcomponents.client5:httpclient5-fluent;5.5 -org.apache.httpcomponents.core5:httpcore5;5.3.4 -org.apache.httpcomponents.core5:httpcore5-h2;5.3.4 -org.apache.httpcomponents.core5:httpcore5-reactive;5.3.4 -org.apache.httpcomponents:httpasyncclient;4.1.5 -org.apache.httpcomponents:httpcore;4.4.16 -org.apache.httpcomponents:httpcore-nio;4.4.16 -org.apache.kafka:connect;3.9.1 -org.apache.kafka:connect-api;3.9.1 -org.apache.kafka:connect-basic-auth-extension;3.9.1 -org.apache.kafka:connect-file;3.9.1 -org.apache.kafka:connect-json;3.9.1 -org.apache.kafka:connect-mirror;3.9.1 -org.apache.kafka:connect-mirror-client;3.9.1 -org.apache.kafka:connect-runtime;3.9.1 -org.apache.kafka:connect-transforms;3.9.1 -org.apache.kafka:generator;3.9.1 -org.apache.kafka:kafka-clients;3.9.1 -org.apache.kafka:kafka-log4j-appender;3.9.1 -org.apache.kafka:kafka-metadata;3.9.1 -org.apache.kafka:kafka-raft;3.9.1 -org.apache.kafka:kafka-server;3.9.1 -org.apache.kafka:kafka-server-common;3.9.1 -org.apache.kafka:kafka-shell;3.9.1 -org.apache.kafka:kafka-storage;3.9.1 -org.apache.kafka:kafka-storage-api;3.9.1 -org.apache.kafka:kafka-streams;3.9.1 -org.apache.kafka:kafka-streams-scala_2.12;3.9.1 -org.apache.kafka:kafka-streams-scala_2.13;3.9.1 -org.apache.kafka:kafka-streams-test-utils;3.9.1 -org.apache.kafka:kafka-tools;3.9.1 -org.apache.kafka:kafka_2.12;3.9.1 -org.apache.kafka:kafka_2.13;3.9.1 -org.apache.kafka:trogdor;3.9.1 -org.apache.logging.log4j:log4j-1.2-api;2.24.3 -org.apache.logging.log4j:log4j-api;2.24.3 -org.apache.logging.log4j:log4j-api-test;2.24.3 -org.apache.logging.log4j:log4j-appserver;2.24.3 -org.apache.logging.log4j:log4j-bom;2.24.3 -org.apache.logging.log4j:log4j-cassandra;2.24.3 -org.apache.logging.log4j:log4j-core;2.24.3 -org.apache.logging.log4j:log4j-core-test;2.24.3 -org.apache.logging.log4j:log4j-couchdb;2.24.3 -org.apache.logging.log4j:log4j-docker;2.24.3 -org.apache.logging.log4j:log4j-flume-ng;2.23.1 -org.apache.logging.log4j:log4j-iostreams;2.24.3 -org.apache.logging.log4j:log4j-jakarta-smtp;2.24.3 -org.apache.logging.log4j:log4j-jakarta-web;2.24.3 -org.apache.logging.log4j:log4j-jcl;2.24.3 -org.apache.logging.log4j:log4j-jpa;2.24.3 -org.apache.logging.log4j:log4j-jpl;2.24.3 -org.apache.logging.log4j:log4j-jul;2.24.3 -org.apache.logging.log4j:log4j-layout-template-json;2.24.3 -org.apache.logging.log4j:log4j-mongodb;2.24.3 -org.apache.logging.log4j:log4j-mongodb4;2.24.3 -org.apache.logging.log4j:log4j-slf4j-impl;2.24.3 -org.apache.logging.log4j:log4j-slf4j2-impl;2.24.3 -org.apache.logging.log4j:log4j-spring-boot;2.24.3 -org.apache.logging.log4j:log4j-spring-cloud-config-client;2.24.3 -org.apache.logging.log4j:log4j-taglib;2.24.3 -org.apache.logging.log4j:log4j-to-jul;2.24.3 -org.apache.logging.log4j:log4j-to-slf4j;2.24.3 -org.apache.logging.log4j:log4j-web;2.24.3 -org.apache.maven.plugins:maven-antrun-plugin;3.1.0 -org.apache.maven.plugins:maven-assembly-plugin;3.7.1 -org.apache.maven.plugins:maven-clean-plugin;3.4.1 -org.apache.maven.plugins:maven-compiler-plugin;3.14.0 -org.apache.maven.plugins:maven-dependency-plugin;3.8.1 -org.apache.maven.plugins:maven-deploy-plugin;3.1.4 -org.apache.maven.plugins:maven-enforcer-plugin;3.5.0 -org.apache.maven.plugins:maven-failsafe-plugin;3.5.3 -org.apache.maven.plugins:maven-gpg-plugin;3.1.0 -org.apache.maven.plugins:maven-help-plugin;3.5.1 -org.apache.maven.plugins:maven-install-plugin;3.1.4 -org.apache.maven.plugins:maven-invoker-plugin;3.9.1 -org.apache.maven.plugins:maven-jar-plugin;3.4.2 -org.apache.maven.plugins:maven-javadoc-plugin;3.11.3 -org.apache.maven.plugins:maven-release-plugin;2.5.3 -org.apache.maven.plugins:maven-resources-plugin;3.3.1 -org.apache.maven.plugins:maven-shade-plugin;3.6.0 -org.apache.maven.plugins:maven-source-plugin;3.3.1 -org.apache.maven.plugins:maven-surefire-plugin;3.5.3 -org.apache.maven.plugins:maven-war-plugin;3.4.0 -org.apache.pulsar:bouncy-castle-bc;4.0.6 -org.apache.pulsar:bouncy-castle-bcfips;4.0.6 -org.apache.pulsar:bouncy-castle-parent;4.0.6 -org.apache.pulsar:buildtools;4.0.6 -org.apache.pulsar:distribution;4.0.6 -org.apache.pulsar:docker-images;4.0.6 -org.apache.pulsar:jclouds-shaded;4.0.6 -org.apache.pulsar:managed-ledger;4.0.6 -org.apache.pulsar:pulsar;4.0.6 -org.apache.pulsar:pulsar-all-docker-image;4.0.6 -org.apache.pulsar:pulsar-bom;4.0.6 -org.apache.pulsar:pulsar-broker;4.0.6 -org.apache.pulsar:pulsar-broker-auth-athenz;4.0.6 -org.apache.pulsar:pulsar-broker-auth-oidc;4.0.6 -org.apache.pulsar:pulsar-broker-auth-sasl;4.0.6 -org.apache.pulsar:pulsar-broker-common;4.0.6 -org.apache.pulsar:pulsar-cli-utils;4.0.6 -org.apache.pulsar:pulsar-client;4.0.6 -org.apache.pulsar:pulsar-client-admin;4.0.6 -org.apache.pulsar:pulsar-client-admin-api;4.0.6 -org.apache.pulsar:pulsar-client-admin-original;4.0.6 -org.apache.pulsar:pulsar-client-all;4.0.6 -org.apache.pulsar:pulsar-client-api;4.0.6 -org.apache.pulsar:pulsar-client-auth-athenz;4.0.6 -org.apache.pulsar:pulsar-client-auth-sasl;4.0.6 -org.apache.pulsar:pulsar-client-messagecrypto-bc;4.0.6 -org.apache.pulsar:pulsar-client-original;4.0.6 -org.apache.pulsar:pulsar-client-reactive-adapter;0.6.0 -org.apache.pulsar:pulsar-client-reactive-api;0.6.0 -org.apache.pulsar:pulsar-client-reactive-bom;0.6.0 -org.apache.pulsar:pulsar-client-reactive-jackson;0.6.0 -org.apache.pulsar:pulsar-client-reactive-producer-cache-caffeine;0.6.0 -org.apache.pulsar:pulsar-client-reactive-producer-cache-caffeine-shaded;0.6.0 -org.apache.pulsar:pulsar-client-tools;4.0.6 -org.apache.pulsar:pulsar-client-tools-api;4.0.6 -org.apache.pulsar:pulsar-common;4.0.6 -org.apache.pulsar:pulsar-config-validation;4.0.6 -org.apache.pulsar:pulsar-docker-image;4.0.6 -org.apache.pulsar:pulsar-docs-tools;4.0.6 -org.apache.pulsar:pulsar-functions;4.0.6 -org.apache.pulsar:pulsar-functions-api;4.0.6 -org.apache.pulsar:pulsar-functions-api-examples;4.0.6 -org.apache.pulsar:pulsar-functions-api-examples-builtin;4.0.6 -org.apache.pulsar:pulsar-functions-instance;4.0.6 -org.apache.pulsar:pulsar-functions-local-runner;4.0.6 -org.apache.pulsar:pulsar-functions-local-runner-original;4.0.6 -org.apache.pulsar:pulsar-functions-proto;4.0.6 -org.apache.pulsar:pulsar-functions-runtime;4.0.6 -org.apache.pulsar:pulsar-functions-runtime-all;4.0.6 -org.apache.pulsar:pulsar-functions-secrets;4.0.6 -org.apache.pulsar:pulsar-functions-utils;4.0.6 -org.apache.pulsar:pulsar-functions-worker;4.0.6 -org.apache.pulsar:pulsar-io;4.0.6 -org.apache.pulsar:pulsar-io-aerospike;4.0.6 -org.apache.pulsar:pulsar-io-alluxio;4.0.6 -org.apache.pulsar:pulsar-io-aws;4.0.6 -org.apache.pulsar:pulsar-io-batch-data-generator;4.0.6 -org.apache.pulsar:pulsar-io-batch-discovery-triggerers;4.0.6 -org.apache.pulsar:pulsar-io-canal;4.0.6 -org.apache.pulsar:pulsar-io-cassandra;4.0.6 -org.apache.pulsar:pulsar-io-common;4.0.6 -org.apache.pulsar:pulsar-io-core;4.0.6 -org.apache.pulsar:pulsar-io-data-generator;4.0.6 -org.apache.pulsar:pulsar-io-debezium;4.0.6 -org.apache.pulsar:pulsar-io-debezium-core;4.0.6 -org.apache.pulsar:pulsar-io-debezium-mongodb;4.0.6 -org.apache.pulsar:pulsar-io-debezium-mssql;4.0.6 -org.apache.pulsar:pulsar-io-debezium-mysql;4.0.6 -org.apache.pulsar:pulsar-io-debezium-oracle;4.0.6 -org.apache.pulsar:pulsar-io-debezium-postgres;4.0.6 -org.apache.pulsar:pulsar-io-distribution;4.0.6 -org.apache.pulsar:pulsar-io-docs;4.0.6 -org.apache.pulsar:pulsar-io-dynamodb;4.0.6 -org.apache.pulsar:pulsar-io-elastic-search;4.0.6 -org.apache.pulsar:pulsar-io-file;4.0.6 -org.apache.pulsar:pulsar-io-flume;4.0.6 -org.apache.pulsar:pulsar-io-hbase;4.0.6 -org.apache.pulsar:pulsar-io-hdfs3;4.0.6 -org.apache.pulsar:pulsar-io-http;4.0.6 -org.apache.pulsar:pulsar-io-influxdb;4.0.6 -org.apache.pulsar:pulsar-io-jdbc;4.0.6 -org.apache.pulsar:pulsar-io-jdbc-clickhouse;4.0.6 -org.apache.pulsar:pulsar-io-jdbc-core;4.0.6 -org.apache.pulsar:pulsar-io-jdbc-mariadb;4.0.6 -org.apache.pulsar:pulsar-io-jdbc-openmldb;4.0.6 -org.apache.pulsar:pulsar-io-jdbc-postgres;4.0.6 -org.apache.pulsar:pulsar-io-jdbc-sqlite;4.0.6 -org.apache.pulsar:pulsar-io-kafka;4.0.6 -org.apache.pulsar:pulsar-io-kafka-connect-adaptor;4.0.6 -org.apache.pulsar:pulsar-io-kafka-connect-adaptor-nar;4.0.6 -org.apache.pulsar:pulsar-io-kinesis;4.0.6 -org.apache.pulsar:pulsar-io-mongo;4.0.6 -org.apache.pulsar:pulsar-io-netty;4.0.6 -org.apache.pulsar:pulsar-io-nsq;4.0.6 -org.apache.pulsar:pulsar-io-rabbitmq;4.0.6 -org.apache.pulsar:pulsar-io-redis;4.0.6 -org.apache.pulsar:pulsar-io-solr;4.0.6 -org.apache.pulsar:pulsar-io-twitter;4.0.6 -org.apache.pulsar:pulsar-metadata;4.0.6 -org.apache.pulsar:pulsar-offloader-distribution;4.0.6 -org.apache.pulsar:pulsar-package-bookkeeper-storage;4.0.6 -org.apache.pulsar:pulsar-package-core;4.0.6 -org.apache.pulsar:pulsar-package-filesystem-storage;4.0.6 -org.apache.pulsar:pulsar-package-management;4.0.6 -org.apache.pulsar:pulsar-proxy;4.0.6 -org.apache.pulsar:pulsar-server-distribution;4.0.6 -org.apache.pulsar:pulsar-shell-distribution;4.0.6 -org.apache.pulsar:pulsar-testclient;4.0.6 -org.apache.pulsar:pulsar-transaction-common;4.0.6 -org.apache.pulsar:pulsar-transaction-coordinator;4.0.6 -org.apache.pulsar:pulsar-transaction-parent;4.0.6 -org.apache.pulsar:pulsar-websocket;4.0.6 -org.apache.pulsar:structured-event-log;4.0.6 -org.apache.pulsar:testmocks;4.0.6 -org.apache.pulsar:tiered-storage-file-system;4.0.6 -org.apache.pulsar:tiered-storage-jcloud;4.0.6 -org.apache.pulsar:tiered-storage-parent;4.0.6 -org.apache.tomcat.embed:tomcat-embed-core;10.1.44 -org.apache.tomcat.embed:tomcat-embed-el;10.1.44 -org.apache.tomcat.embed:tomcat-embed-jasper;10.1.44 -org.apache.tomcat.embed:tomcat-embed-websocket;10.1.44 -org.apache.tomcat:tomcat-annotations-api;10.1.44 -org.apache.tomcat:tomcat-jdbc;10.1.44 -org.apache.tomcat:tomcat-jsp-api;10.1.44 -org.aspectj:aspectjrt;1.9.24 -org.aspectj:aspectjtools;1.9.24 -org.aspectj:aspectjweaver;1.9.24 -org.assertj:assertj-bom;3.27.4 -org.assertj:assertj-core;3.27.4 -org.assertj:assertj-guava;3.27.4 -org.awaitility:awaitility;4.2.2 -org.awaitility:awaitility-groovy;4.2.2 -org.awaitility:awaitility-kotlin;4.2.2 -org.awaitility:awaitility-scala;4.2.2 -org.cache2k:cache2k-api;2.6.1.Final -org.cache2k:cache2k-config;2.6.1.Final -org.cache2k:cache2k-core;2.6.1.Final -org.cache2k:cache2k-jcache;2.6.1.Final -org.cache2k:cache2k-micrometer;2.6.1.Final -org.cache2k:cache2k-spring;2.6.1.Final -org.codehaus.janino:commons-compiler;3.1.12 -org.codehaus.janino:commons-compiler-jdk;3.1.12 -org.codehaus.janino:janino;3.1.12 -org.codehaus.mojo:build-helper-maven-plugin;3.6.1 -org.codehaus.mojo:versions-maven-plugin;2.18.0 -org.codehaus.mojo:xml-maven-plugin;1.1.0 -org.crac:crac;1.5.0 -org.cyclonedx:cyclonedx-maven-plugin;2.9.1 -org.eclipse.angus:angus-activation;2.0.2 -org.eclipse.angus:angus-core;2.0.4 -org.eclipse.angus:angus-mail;2.0.4 -org.eclipse.angus:dsn;2.0.4 -org.eclipse.angus:gimap;2.0.4 -org.eclipse.angus:imap;2.0.4 -org.eclipse.angus:jakarta.mail;2.0.4 -org.eclipse.angus:logging-mailhandler;2.0.4 -org.eclipse.angus:pop3;2.0.4 -org.eclipse.angus:smtp;2.0.4 -org.eclipse.jetty.demos:jetty-demo-handler;12.0.25 -org.eclipse.jetty.ee10.osgi:jetty-ee10-osgi-alpn;12.0.25 -org.eclipse.jetty.ee10.osgi:jetty-ee10-osgi-boot;12.0.25 -org.eclipse.jetty.ee10.osgi:jetty-ee10-osgi-boot-jsp;12.0.25 -org.eclipse.jetty.ee10.websocket:jetty-ee10-websocket-jakarta-client;12.0.25 -org.eclipse.jetty.ee10.websocket:jetty-ee10-websocket-jakarta-client-webapp;12.0.25 -org.eclipse.jetty.ee10.websocket:jetty-ee10-websocket-jakarta-common;12.0.25 -org.eclipse.jetty.ee10.websocket:jetty-ee10-websocket-jakarta-server;12.0.25 -org.eclipse.jetty.ee10.websocket:jetty-ee10-websocket-jetty-client-webapp;12.0.25 -org.eclipse.jetty.ee10.websocket:jetty-ee10-websocket-jetty-server;12.0.25 -org.eclipse.jetty.ee10.websocket:jetty-ee10-websocket-servlet;12.0.25 -org.eclipse.jetty.ee10:jetty-ee10-annotations;12.0.25 -org.eclipse.jetty.ee10:jetty-ee10-apache-jsp;12.0.25 -org.eclipse.jetty.ee10:jetty-ee10-bom;12.0.25 -org.eclipse.jetty.ee10:jetty-ee10-cdi;12.0.25 -org.eclipse.jetty.ee10:jetty-ee10-fcgi-proxy;12.0.25 -org.eclipse.jetty.ee10:jetty-ee10-glassfish-jstl;12.0.25 -org.eclipse.jetty.ee10:jetty-ee10-jaspi;12.0.25 -org.eclipse.jetty.ee10:jetty-ee10-jndi;12.0.25 -org.eclipse.jetty.ee10:jetty-ee10-jspc-maven-plugin;12.0.25 -org.eclipse.jetty.ee10:jetty-ee10-maven-plugin;12.0.25 -org.eclipse.jetty.ee10:jetty-ee10-plus;12.0.25 -org.eclipse.jetty.ee10:jetty-ee10-proxy;12.0.25 -org.eclipse.jetty.ee10:jetty-ee10-quickstart;12.0.25 -org.eclipse.jetty.ee10:jetty-ee10-runner;12.0.25 -org.eclipse.jetty.ee10:jetty-ee10-servlet;12.0.25 -org.eclipse.jetty.ee10:jetty-ee10-servlets;12.0.25 -org.eclipse.jetty.ee10:jetty-ee10-webapp;12.0.25 -org.eclipse.jetty.fcgi:jetty-fcgi-client;12.0.25 -org.eclipse.jetty.fcgi:jetty-fcgi-proxy;12.0.25 -org.eclipse.jetty.fcgi:jetty-fcgi-server;12.0.25 -org.eclipse.jetty.http2:jetty-http2-client;12.0.25 -org.eclipse.jetty.http2:jetty-http2-client-transport;12.0.25 -org.eclipse.jetty.http2:jetty-http2-common;12.0.25 -org.eclipse.jetty.http2:jetty-http2-hpack;12.0.25 -org.eclipse.jetty.http2:jetty-http2-server;12.0.25 -org.eclipse.jetty.http3:jetty-http3-client;12.0.25 -org.eclipse.jetty.http3:jetty-http3-client-transport;12.0.25 -org.eclipse.jetty.http3:jetty-http3-common;12.0.25 -org.eclipse.jetty.http3:jetty-http3-qpack;12.0.25 -org.eclipse.jetty.http3:jetty-http3-server;12.0.25 -org.eclipse.jetty.quic:jetty-quic-client;12.0.25 -org.eclipse.jetty.quic:jetty-quic-common;12.0.25 -org.eclipse.jetty.quic:jetty-quic-quiche-common;12.0.25 -org.eclipse.jetty.quic:jetty-quic-quiche-foreign;12.0.25 -org.eclipse.jetty.quic:jetty-quic-quiche-jna;12.0.25 -org.eclipse.jetty.quic:jetty-quic-server;12.0.25 -org.eclipse.jetty.websocket:jetty-websocket-core-client;12.0.25 -org.eclipse.jetty.websocket:jetty-websocket-core-common;12.0.25 -org.eclipse.jetty.websocket:jetty-websocket-core-server;12.0.25 -org.eclipse.jetty.websocket:jetty-websocket-jetty-api;12.0.25 -org.eclipse.jetty.websocket:jetty-websocket-jetty-client;12.0.25 -org.eclipse.jetty.websocket:jetty-websocket-jetty-common;12.0.25 -org.eclipse.jetty.websocket:jetty-websocket-jetty-server;12.0.25 -org.eclipse.jetty:jetty-alpn-client;12.0.25 -org.eclipse.jetty:jetty-alpn-conscrypt-client;12.0.25 -org.eclipse.jetty:jetty-alpn-conscrypt-server;12.0.25 -org.eclipse.jetty:jetty-alpn-java-client;12.0.25 -org.eclipse.jetty:jetty-alpn-java-server;12.0.25 -org.eclipse.jetty:jetty-alpn-server;12.0.25 -org.eclipse.jetty:jetty-bom;12.0.25 -org.eclipse.jetty:jetty-client;12.0.25 -org.eclipse.jetty:jetty-deploy;12.0.25 -org.eclipse.jetty:jetty-ee;12.0.25 -org.eclipse.jetty:jetty-http;12.0.25 -org.eclipse.jetty:jetty-http-spi;12.0.25 -org.eclipse.jetty:jetty-http-tools;12.0.25 -org.eclipse.jetty:jetty-io;12.0.25 -org.eclipse.jetty:jetty-jmx;12.0.25 -org.eclipse.jetty:jetty-jndi;12.0.25 -org.eclipse.jetty:jetty-keystore;12.0.25 -org.eclipse.jetty:jetty-openid;12.0.25 -org.eclipse.jetty:jetty-osgi;12.0.25 -org.eclipse.jetty:jetty-plus;12.0.25 -org.eclipse.jetty:jetty-proxy;12.0.25 -org.eclipse.jetty:jetty-reactive-httpclient;4.0.11 -org.eclipse.jetty:jetty-rewrite;12.0.25 -org.eclipse.jetty:jetty-security;12.0.25 -org.eclipse.jetty:jetty-server;12.0.25 -org.eclipse.jetty:jetty-session;12.0.25 -org.eclipse.jetty:jetty-slf4j-impl;12.0.25 -org.eclipse.jetty:jetty-start;12.0.25 -org.eclipse.jetty:jetty-unixdomain-server;12.0.25 -org.eclipse.jetty:jetty-util;12.0.25 -org.eclipse.jetty:jetty-util-ajax;12.0.25 -org.eclipse.jetty:jetty-xml;12.0.25 -org.eclipse.jgit:org.eclipse.jgit;6.10.1.202505221210-r -org.eclipse.jgit:org.eclipse.jgit.http.apache;6.10.1.202505221210-r -org.eclipse.jgit:org.eclipse.jgit.junit.http;6.10.1.202505221210-r -org.eclipse.jgit:org.eclipse.jgit.ssh.apache;6.10.1.202505221210-r -org.eclipse:yasson;3.0.4 -org.ehcache:ehcache;3.10.8 -org.ehcache:ehcache-clustered;3.10.8 -org.ehcache:ehcache-transactions;3.10.8 -org.elasticsearch.client:elasticsearch-rest-client;8.18.5 -org.elasticsearch.client:elasticsearch-rest-client-sniffer;8.18.5 -org.firebirdsql.jdbc:jaybird;6.0.2 -org.flywaydb:flyway-commandline;11.7.2 -org.flywaydb:flyway-core;11.7.2 -org.flywaydb:flyway-database-cassandra;11.7.2 -org.flywaydb:flyway-database-db2;11.7.2 -org.flywaydb:flyway-database-derby;11.7.2 -org.flywaydb:flyway-database-hsqldb;11.7.2 -org.flywaydb:flyway-database-informix;11.7.2 -org.flywaydb:flyway-database-mongodb;11.7.2 -org.flywaydb:flyway-database-oracle;11.7.2 -org.flywaydb:flyway-database-postgresql;11.7.2 -org.flywaydb:flyway-database-redshift;11.7.2 -org.flywaydb:flyway-database-saphana;11.7.2 -org.flywaydb:flyway-database-snowflake;11.7.2 -org.flywaydb:flyway-database-sybasease;11.7.2 -org.flywaydb:flyway-firebird;11.7.2 -org.flywaydb:flyway-gcp-bigquery;11.7.2 -org.flywaydb:flyway-gcp-spanner;11.7.2 -org.flywaydb:flyway-maven-plugin;11.7.2 -org.flywaydb:flyway-mysql;11.7.2 -org.flywaydb:flyway-singlestore;11.7.2 -org.flywaydb:flyway-sqlserver;11.7.2 -org.freemarker:freemarker;2.3.34 -org.glassfish.jaxb:codemodel;4.0.5 -org.glassfish.jaxb:jaxb-bom;4.0.5 -org.glassfish.jaxb:jaxb-core;4.0.5 -org.glassfish.jaxb:jaxb-jxc;4.0.5 -org.glassfish.jaxb:jaxb-runtime;4.0.5 -org.glassfish.jaxb:jaxb-xjc;4.0.5 -org.glassfish.jaxb:txw2;4.0.5 -org.glassfish.jaxb:xsom;4.0.5 -org.glassfish.jersey.bundles:jaxrs-ri;3.1.11 -org.glassfish.jersey.connectors:jersey-apache-connector;3.1.11 -org.glassfish.jersey.connectors:jersey-apache5-connector;3.1.11 -org.glassfish.jersey.connectors:jersey-grizzly-connector;3.1.11 -org.glassfish.jersey.connectors:jersey-helidon-connector;3.1.11 -org.glassfish.jersey.connectors:jersey-jdk-connector;3.1.11 -org.glassfish.jersey.connectors:jersey-jetty-connector;3.1.11 -org.glassfish.jersey.connectors:jersey-jetty-http2-connector;3.1.11 -org.glassfish.jersey.connectors:jersey-jetty11-connector;3.1.11 -org.glassfish.jersey.connectors:jersey-jnh-connector;3.1.11 -org.glassfish.jersey.connectors:jersey-netty-connector;3.1.11 -org.glassfish.jersey.containers.glassfish:jersey-gf-ejb;3.1.11 -org.glassfish.jersey.containers:jersey-container-grizzly2-http;3.1.11 -org.glassfish.jersey.containers:jersey-container-grizzly2-servlet;3.1.11 -org.glassfish.jersey.containers:jersey-container-jdk-http;3.1.11 -org.glassfish.jersey.containers:jersey-container-jetty-http;3.1.11 -org.glassfish.jersey.containers:jersey-container-jetty-http2;3.1.11 -org.glassfish.jersey.containers:jersey-container-jetty-servlet;3.1.11 -org.glassfish.jersey.containers:jersey-container-jetty11-http;3.1.11 -org.glassfish.jersey.containers:jersey-container-netty-http;3.1.11 -org.glassfish.jersey.containers:jersey-container-servlet;3.1.11 -org.glassfish.jersey.containers:jersey-container-servlet-core;3.1.11 -org.glassfish.jersey.containers:jersey-container-simple-http;3.1.11 -org.glassfish.jersey.core:jersey-client;3.1.11 -org.glassfish.jersey.core:jersey-common;3.1.11 -org.glassfish.jersey.core:jersey-server;3.1.11 -org.glassfish.jersey.ext.cdi:jersey-cdi-rs-inject;3.1.11 -org.glassfish.jersey.ext.cdi:jersey-cdi1x;3.1.11 -org.glassfish.jersey.ext.cdi:jersey-cdi1x-ban-custom-hk2-binding;3.1.11 -org.glassfish.jersey.ext.cdi:jersey-cdi1x-servlet;3.1.11 -org.glassfish.jersey.ext.cdi:jersey-cdi1x-transaction;3.1.11 -org.glassfish.jersey.ext.cdi:jersey-cdi1x-validation;3.1.11 -org.glassfish.jersey.ext.cdi:jersey-weld2-se;3.1.11 -org.glassfish.jersey.ext.microprofile:jersey-mp-config;3.1.11 -org.glassfish.jersey.ext.microprofile:jersey-mp-rest-client;3.1.11 -org.glassfish.jersey.ext.rx:jersey-rx-client-guava;3.1.11 -org.glassfish.jersey.ext.rx:jersey-rx-client-rxjava;3.1.11 -org.glassfish.jersey.ext.rx:jersey-rx-client-rxjava2;3.1.11 -org.glassfish.jersey.ext:jersey-bean-validation;3.1.11 -org.glassfish.jersey.ext:jersey-declarative-linking;3.1.11 -org.glassfish.jersey.ext:jersey-entity-filtering;3.1.11 -org.glassfish.jersey.ext:jersey-metainf-services;3.1.11 -org.glassfish.jersey.ext:jersey-micrometer;3.1.11 -org.glassfish.jersey.ext:jersey-mvc;3.1.11 -org.glassfish.jersey.ext:jersey-mvc-bean-validation;3.1.11 -org.glassfish.jersey.ext:jersey-mvc-freemarker;3.1.11 -org.glassfish.jersey.ext:jersey-mvc-jsp;3.1.11 -org.glassfish.jersey.ext:jersey-mvc-mustache;3.1.11 -org.glassfish.jersey.ext:jersey-proxy-client;3.1.11 -org.glassfish.jersey.ext:jersey-spring6;3.1.11 -org.glassfish.jersey.ext:jersey-wadl-doclet;3.1.11 -org.glassfish.jersey.inject:jersey-cdi2-se;3.1.11 -org.glassfish.jersey.inject:jersey-hk2;3.1.11 -org.glassfish.jersey.media:jersey-media-jaxb;3.1.11 -org.glassfish.jersey.media:jersey-media-json-binding;3.1.11 -org.glassfish.jersey.media:jersey-media-json-gson;3.1.11 -org.glassfish.jersey.media:jersey-media-json-jackson;3.1.11 -org.glassfish.jersey.media:jersey-media-json-jettison;3.1.11 -org.glassfish.jersey.media:jersey-media-json-processing;3.1.11 -org.glassfish.jersey.media:jersey-media-kryo;3.1.11 -org.glassfish.jersey.media:jersey-media-moxy;3.1.11 -org.glassfish.jersey.media:jersey-media-multipart;3.1.11 -org.glassfish.jersey.media:jersey-media-sse;3.1.11 -org.glassfish.jersey.security:oauth1-client;3.1.11 -org.glassfish.jersey.security:oauth1-server;3.1.11 -org.glassfish.jersey.security:oauth1-signature;3.1.11 -org.glassfish.jersey.security:oauth2-client;3.1.11 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-bundle;3.1.11 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-external;3.1.11 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2;3.1.11 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-inmemory;3.1.11 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jdk-http;3.1.11 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty;3.1.11 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty-http2;3.1.11 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-netty;3.1.11 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-simple;3.1.11 -org.glassfish.jersey.test-framework:jersey-test-framework-core;3.1.11 -org.glassfish.jersey.test-framework:jersey-test-framework-util;3.1.11 -org.glassfish.jersey:jersey-bom;3.1.11 -org.glassfish.web:jakarta.servlet.jsp.jstl;3.0.1 -org.graalvm.buildtools:native-maven-plugin;0.10.6 -org.hamcrest:hamcrest;3.0 -org.hamcrest:hamcrest-core;3.0 -org.hamcrest:hamcrest-library;3.0 -org.hibernate.orm:hibernate-agroal;6.6.26.Final -org.hibernate.orm:hibernate-ant;6.6.26.Final -org.hibernate.orm:hibernate-c3p0;6.6.26.Final -org.hibernate.orm:hibernate-community-dialects;6.6.26.Final -org.hibernate.orm:hibernate-core;6.6.26.Final -org.hibernate.orm:hibernate-envers;6.6.26.Final -org.hibernate.orm:hibernate-graalvm;6.6.26.Final -org.hibernate.orm:hibernate-hikaricp;6.6.26.Final -org.hibernate.orm:hibernate-jcache;6.6.26.Final -org.hibernate.orm:hibernate-jpamodelgen;6.6.26.Final -org.hibernate.orm:hibernate-micrometer;6.6.26.Final -org.hibernate.orm:hibernate-proxool;6.6.26.Final -org.hibernate.orm:hibernate-spatial;6.6.26.Final -org.hibernate.orm:hibernate-testing;6.6.26.Final -org.hibernate.orm:hibernate-vibur;6.6.26.Final -org.hibernate.validator:hibernate-validator;8.0.3.Final -org.hibernate.validator:hibernate-validator-annotation-processor;8.0.3.Final -org.hsqldb:hsqldb;2.7.3 -org.htmlunit:htmlunit;4.11.1 -org.infinispan.protostream:protostream;5.0.13.Final -org.infinispan.protostream:protostream-processor;5.0.13.Final -org.infinispan.protostream:protostream-types;5.0.13.Final -org.infinispan:infinispan-anchored-keys;15.2.5.Final -org.infinispan:infinispan-api;15.2.5.Final -org.infinispan:infinispan-bom;15.2.5.Final -org.infinispan:infinispan-cachestore-jdbc;15.2.5.Final -org.infinispan:infinispan-cachestore-jdbc-common;15.2.5.Final -org.infinispan:infinispan-cachestore-remote;15.2.5.Final -org.infinispan:infinispan-cachestore-rocksdb;15.2.5.Final -org.infinispan:infinispan-cachestore-sql;15.2.5.Final -org.infinispan:infinispan-cdi-common;15.2.5.Final -org.infinispan:infinispan-cdi-embedded;15.2.5.Final -org.infinispan:infinispan-cdi-remote;15.2.5.Final -org.infinispan:infinispan-checkstyle;15.2.5.Final -org.infinispan:infinispan-cli-client;15.2.5.Final -org.infinispan:infinispan-client-hotrod;15.2.5.Final -org.infinispan:infinispan-client-hotrod-legacy;15.2.5.Final -org.infinispan:infinispan-client-rest;15.2.5.Final -org.infinispan:infinispan-clustered-counter;15.2.5.Final -org.infinispan:infinispan-clustered-lock;15.2.5.Final -org.infinispan:infinispan-commons;15.2.5.Final -org.infinispan:infinispan-commons-graalvm;15.2.5.Final -org.infinispan:infinispan-commons-spi;15.2.5.Final -org.infinispan:infinispan-commons-test;15.2.5.Final -org.infinispan:infinispan-component-annotations;15.2.5.Final -org.infinispan:infinispan-component-processor;15.2.5.Final -org.infinispan:infinispan-console;15.2.1.Final -org.infinispan:infinispan-core;15.2.5.Final -org.infinispan:infinispan-core-graalvm;15.2.5.Final -org.infinispan:infinispan-counter-api;15.2.5.Final -org.infinispan:infinispan-hibernate-cache-commons;15.2.5.Final -org.infinispan:infinispan-hibernate-cache-spi;15.2.5.Final -org.infinispan:infinispan-hibernate-cache-v62;15.2.5.Final -org.infinispan:infinispan-jboss-marshalling;15.2.5.Final -org.infinispan:infinispan-jcache;15.2.5.Final -org.infinispan:infinispan-jcache-commons;15.2.5.Final -org.infinispan:infinispan-jcache-remote;15.2.5.Final -org.infinispan:infinispan-key-value-store-client;15.2.5.Final -org.infinispan:infinispan-logging-annotations;15.2.5.Final -org.infinispan:infinispan-logging-processor;15.2.5.Final -org.infinispan:infinispan-multimap;15.2.5.Final -org.infinispan:infinispan-objectfilter;15.2.5.Final -org.infinispan:infinispan-query;15.2.5.Final -org.infinispan:infinispan-query-core;15.2.5.Final -org.infinispan:infinispan-query-dsl;15.2.5.Final -org.infinispan:infinispan-remote-query-client;15.2.5.Final -org.infinispan:infinispan-remote-query-server;15.2.5.Final -org.infinispan:infinispan-scripting;15.2.5.Final -org.infinispan:infinispan-server-core;15.2.5.Final -org.infinispan:infinispan-server-hotrod;15.2.5.Final -org.infinispan:infinispan-server-memcached;15.2.5.Final -org.infinispan:infinispan-server-resp;15.2.5.Final -org.infinispan:infinispan-server-rest;15.2.5.Final -org.infinispan:infinispan-server-router;15.2.5.Final -org.infinispan:infinispan-server-runtime;15.2.5.Final -org.infinispan:infinispan-server-testdriver-core;15.2.5.Final -org.infinispan:infinispan-server-testdriver-junit4;15.2.5.Final -org.infinispan:infinispan-server-testdriver-junit5;15.2.5.Final -org.infinispan:infinispan-spring-boot3-starter-embedded;15.2.5.Final -org.infinispan:infinispan-spring-boot3-starter-remote;15.2.5.Final -org.infinispan:infinispan-spring6-common;15.2.5.Final -org.infinispan:infinispan-spring6-embedded;15.2.5.Final -org.infinispan:infinispan-spring6-remote;15.2.5.Final -org.infinispan:infinispan-tasks;15.2.5.Final -org.infinispan:infinispan-tasks-api;15.2.5.Final -org.infinispan:infinispan-tools;15.2.5.Final -org.influxdb:influxdb-java;2.25 -org.jboss.logging:jboss-logging;3.6.1.Final -org.jdom:jdom2;2.0.6.1 -org.jetbrains.kotlin:kotlin-bom;1.9.25 -org.jetbrains.kotlin:kotlin-compiler;1.9.25 -org.jetbrains.kotlin:kotlin-compiler-embeddable;1.9.25 -org.jetbrains.kotlin:kotlin-daemon-client;1.9.25 -org.jetbrains.kotlin:kotlin-main-kts;1.9.25 -org.jetbrains.kotlin:kotlin-maven-plugin;1.9.25 -org.jetbrains.kotlin:kotlin-osgi-bundle;1.9.25 -org.jetbrains.kotlin:kotlin-reflect;1.9.25 -org.jetbrains.kotlin:kotlin-script-runtime;1.9.25 -org.jetbrains.kotlin:kotlin-scripting-common;1.9.25 -org.jetbrains.kotlin:kotlin-scripting-ide-services;1.9.25 -org.jetbrains.kotlin:kotlin-scripting-jvm;1.9.25 -org.jetbrains.kotlin:kotlin-scripting-jvm-host;1.9.25 -org.jetbrains.kotlin:kotlin-stdlib;1.9.25 -org.jetbrains.kotlin:kotlin-stdlib-common;1.9.25 -org.jetbrains.kotlin:kotlin-stdlib-jdk7;1.9.25 -org.jetbrains.kotlin:kotlin-stdlib-jdk8;1.9.25 -org.jetbrains.kotlin:kotlin-stdlib-js;1.9.25 -org.jetbrains.kotlin:kotlin-test;1.9.25 -org.jetbrains.kotlin:kotlin-test-annotations-common;1.9.25 -org.jetbrains.kotlin:kotlin-test-common;1.9.25 -org.jetbrains.kotlin:kotlin-test-js;1.9.25 -org.jetbrains.kotlin:kotlin-test-junit;1.9.25 -org.jetbrains.kotlin:kotlin-test-junit5;1.9.25 -org.jetbrains.kotlin:kotlin-test-testng;1.9.25 -org.jetbrains.kotlinx:kotlinx-coroutines-android;1.8.1 -org.jetbrains.kotlinx:kotlinx-coroutines-bom;1.8.1 -org.jetbrains.kotlinx:kotlinx-coroutines-core;1.8.1 -org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm;1.8.1 -org.jetbrains.kotlinx:kotlinx-coroutines-debug;1.8.1 -org.jetbrains.kotlinx:kotlinx-coroutines-guava;1.8.1 -org.jetbrains.kotlinx:kotlinx-coroutines-javafx;1.8.1 -org.jetbrains.kotlinx:kotlinx-coroutines-jdk8;1.8.1 -org.jetbrains.kotlinx:kotlinx-coroutines-jdk9;1.8.1 -org.jetbrains.kotlinx:kotlinx-coroutines-play-services;1.8.1 -org.jetbrains.kotlinx:kotlinx-coroutines-reactive;1.8.1 -org.jetbrains.kotlinx:kotlinx-coroutines-reactor;1.8.1 -org.jetbrains.kotlinx:kotlinx-coroutines-rx2;1.8.1 -org.jetbrains.kotlinx:kotlinx-coroutines-rx3;1.8.1 -org.jetbrains.kotlinx:kotlinx-coroutines-slf4j;1.8.1 -org.jetbrains.kotlinx:kotlinx-coroutines-swing;1.8.1 -org.jetbrains.kotlinx:kotlinx-coroutines-test;1.8.1 -org.jetbrains.kotlinx:kotlinx-coroutines-test-jvm;1.8.1 -org.jetbrains.kotlinx:kotlinx-serialization-bom;1.6.3 -org.jetbrains.kotlinx:kotlinx-serialization-cbor;1.6.3 -org.jetbrains.kotlinx:kotlinx-serialization-cbor-jvm;1.6.3 -org.jetbrains.kotlinx:kotlinx-serialization-core;1.6.3 -org.jetbrains.kotlinx:kotlinx-serialization-core-jvm;1.6.3 -org.jetbrains.kotlinx:kotlinx-serialization-hocon;1.6.3 -org.jetbrains.kotlinx:kotlinx-serialization-json;1.6.3 -org.jetbrains.kotlinx:kotlinx-serialization-json-jvm;1.6.3 -org.jetbrains.kotlinx:kotlinx-serialization-json-okio;1.6.3 -org.jetbrains.kotlinx:kotlinx-serialization-json-okio-jvm;1.6.3 -org.jetbrains.kotlinx:kotlinx-serialization-properties;1.6.3 -org.jetbrains.kotlinx:kotlinx-serialization-properties-jvm;1.6.3 -org.jetbrains.kotlinx:kotlinx-serialization-protobuf;1.6.3 -org.jetbrains.kotlinx:kotlinx-serialization-protobuf-jvm;1.6.3 -org.jooq:jooq;3.19.25 -org.jooq:jooq-codegen;3.19.25 -org.jooq:jooq-codegen-maven;3.19.25 -org.jooq:jooq-kotlin;3.19.25 -org.jooq:jooq-meta;3.19.25 -org.junit.jupiter:junit-jupiter;5.12.2 -org.junit.jupiter:junit-jupiter-api;5.12.2 -org.junit.jupiter:junit-jupiter-engine;5.12.2 -org.junit.jupiter:junit-jupiter-migrationsupport;5.12.2 -org.junit.jupiter:junit-jupiter-params;5.12.2 -org.junit.platform:junit-platform-commons;1.12.2 -org.junit.platform:junit-platform-console;1.12.2 -org.junit.platform:junit-platform-engine;1.12.2 -org.junit.platform:junit-platform-jfr;1.12.2 -org.junit.platform:junit-platform-launcher;1.12.2 -org.junit.platform:junit-platform-reporting;1.12.2 -org.junit.platform:junit-platform-runner;1.12.2 -org.junit.platform:junit-platform-suite;1.12.2 -org.junit.platform:junit-platform-suite-api;1.12.2 -org.junit.platform:junit-platform-suite-commons;1.12.2 -org.junit.platform:junit-platform-suite-engine;1.12.2 -org.junit.platform:junit-platform-testkit;1.12.2 -org.junit.vintage:junit-vintage-engine;5.12.2 -org.junit:junit-bom;5.12.2 -org.jvnet.staxex:stax-ex;2.1.0 -org.liquibase:liquibase-cdi;4.31.1 -org.liquibase:liquibase-core;4.31.1 -org.liquibase:liquibase-maven-plugin;4.31.1 -org.mariadb.jdbc:mariadb-java-client;3.5.5 -org.mariadb:r2dbc-mariadb;1.3.0 -org.messaginghub:pooled-jms;3.1.7 -org.mockito:mockito-android;5.17.0 -org.mockito:mockito-bom;5.17.0 -org.mockito:mockito-core;5.17.0 -org.mockito:mockito-errorprone;5.17.0 -org.mockito:mockito-junit-jupiter;5.17.0 -org.mockito:mockito-proxy;5.17.0 -org.mockito:mockito-subclass;5.17.0 -org.mongodb.scala:mongo-scala-bson_2.11;5.5.1 -org.mongodb.scala:mongo-scala-bson_2.12;5.5.1 -org.mongodb.scala:mongo-scala-bson_2.13;5.5.1 -org.mongodb.scala:mongo-scala-driver_2.11;5.5.1 -org.mongodb.scala:mongo-scala-driver_2.12;5.5.1 -org.mongodb.scala:mongo-scala-driver_2.13;5.5.1 -org.mongodb:bson;5.5.1 -org.mongodb:bson-kotlin;5.5.1 -org.mongodb:bson-kotlinx;5.5.1 -org.mongodb:bson-record-codec;5.5.1 -org.mongodb:mongodb-crypt;5.5.1 -org.mongodb:mongodb-driver-bom;5.5.1 -org.mongodb:mongodb-driver-core;5.5.1 -org.mongodb:mongodb-driver-kotlin-coroutine;5.5.1 -org.mongodb:mongodb-driver-kotlin-extensions;5.5.1 -org.mongodb:mongodb-driver-kotlin-sync;5.5.1 -org.mongodb:mongodb-driver-reactivestreams;5.5.1 -org.mongodb:mongodb-driver-sync;5.5.1 -org.neo4j.driver:neo4j-java-driver;5.28.9 -org.postgresql:postgresql;42.7.7 -org.postgresql:r2dbc-postgresql;1.0.7.RELEASE -org.projectlombok:lombok;1.18.38 -org.quartz-scheduler:quartz;2.5.0 -org.quartz-scheduler:quartz-jobs;2.5.0 -org.reactivestreams:reactive-streams;1.0.4 -org.seleniumhq.selenium:htmlunit3-driver;4.30.0 -org.seleniumhq.selenium:selenium-api;4.31.0 -org.seleniumhq.selenium:selenium-bom;4.31.0 -org.seleniumhq.selenium:selenium-chrome-driver;4.31.0 -org.seleniumhq.selenium:selenium-chromium-driver;4.31.0 -org.seleniumhq.selenium:selenium-devtools-v133;4.31.0 -org.seleniumhq.selenium:selenium-devtools-v134;4.31.0 -org.seleniumhq.selenium:selenium-devtools-v135;4.31.0 -org.seleniumhq.selenium:selenium-edge-driver;4.31.0 -org.seleniumhq.selenium:selenium-firefox-driver;4.31.0 -org.seleniumhq.selenium:selenium-grid;4.31.0 -org.seleniumhq.selenium:selenium-http;4.31.0 -org.seleniumhq.selenium:selenium-ie-driver;4.31.0 -org.seleniumhq.selenium:selenium-java;4.31.0 -org.seleniumhq.selenium:selenium-json;4.31.0 -org.seleniumhq.selenium:selenium-manager;4.31.0 -org.seleniumhq.selenium:selenium-remote-driver;4.31.0 -org.seleniumhq.selenium:selenium-safari-driver;4.31.0 -org.seleniumhq.selenium:selenium-session-map-jdbc;4.31.0 -org.seleniumhq.selenium:selenium-session-map-redis;4.31.0 -org.seleniumhq.selenium:selenium-support;4.31.0 -org.skyscreamer:jsonassert;1.5.3 -org.slf4j:jcl-over-slf4j;2.0.17 -org.slf4j:jul-to-slf4j;2.0.17 -org.slf4j:log4j-over-slf4j;2.0.17 -org.slf4j:slf4j-api;2.0.17 -org.slf4j:slf4j-ext;2.0.17 -org.slf4j:slf4j-jdk-platform-logging;2.0.17 -org.slf4j:slf4j-jdk14;2.0.17 -org.slf4j:slf4j-log4j12;2.0.17 -org.slf4j:slf4j-nop;2.0.17 -org.slf4j:slf4j-reload4j;2.0.17 -org.slf4j:slf4j-simple;2.0.17 -org.sonatype.central:central-publishing-maven-plugin;0.7.0 -org.sonatype.plugins:nexus-staging-maven-plugin;1.7.0 -org.springframework.amqp:spring-amqp;3.2.6 -org.springframework.amqp:spring-amqp-bom;3.2.6 -org.springframework.amqp:spring-rabbit;3.2.6 -org.springframework.amqp:spring-rabbit-junit;3.2.6 -org.springframework.amqp:spring-rabbit-stream;3.2.6 -org.springframework.amqp:spring-rabbit-test;3.2.6 -org.springframework.batch:spring-batch-bom;5.2.2 -org.springframework.batch:spring-batch-core;5.2.2 -org.springframework.batch:spring-batch-infrastructure;5.2.2 -org.springframework.batch:spring-batch-integration;5.2.2 -org.springframework.batch:spring-batch-test;5.2.2 -org.springframework.boot:spring-boot;3.5.5 -org.springframework.boot:spring-boot-actuator;3.5.5 -org.springframework.boot:spring-boot-actuator-autoconfigure;3.5.5 -org.springframework.boot:spring-boot-autoconfigure;3.5.5 -org.springframework.boot:spring-boot-autoconfigure-processor;3.5.5 -org.springframework.boot:spring-boot-buildpack-platform;3.5.5 -org.springframework.boot:spring-boot-configuration-metadata;3.5.5 -org.springframework.boot:spring-boot-configuration-processor;3.5.5 -org.springframework.boot:spring-boot-dependencies;3.5.5 -org.springframework.boot:spring-boot-devtools;3.5.5 -org.springframework.boot:spring-boot-docker-compose;3.5.5 -org.springframework.boot:spring-boot-jarmode-tools;3.5.5 -org.springframework.boot:spring-boot-loader;3.5.5 -org.springframework.boot:spring-boot-loader-classic;3.5.5 -org.springframework.boot:spring-boot-loader-tools;3.5.5 -org.springframework.boot:spring-boot-maven-plugin;3.5.5 -org.springframework.boot:spring-boot-properties-migrator;3.5.5 -org.springframework.boot:spring-boot-starter;3.5.5 -org.springframework.boot:spring-boot-starter-activemq;3.5.5 -org.springframework.boot:spring-boot-starter-actuator;3.5.5 -org.springframework.boot:spring-boot-starter-amqp;3.5.5 -org.springframework.boot:spring-boot-starter-aop;3.5.5 -org.springframework.boot:spring-boot-starter-artemis;3.5.5 -org.springframework.boot:spring-boot-starter-batch;3.5.5 -org.springframework.boot:spring-boot-starter-cache;3.5.5 -org.springframework.boot:spring-boot-starter-data-cassandra;3.5.5 -org.springframework.boot:spring-boot-starter-data-cassandra-reactive;3.5.5 -org.springframework.boot:spring-boot-starter-data-couchbase;3.5.5 -org.springframework.boot:spring-boot-starter-data-couchbase-reactive;3.5.5 -org.springframework.boot:spring-boot-starter-data-elasticsearch;3.5.5 -org.springframework.boot:spring-boot-starter-data-jdbc;3.5.5 -org.springframework.boot:spring-boot-starter-data-jpa;3.5.5 -org.springframework.boot:spring-boot-starter-data-ldap;3.5.5 -org.springframework.boot:spring-boot-starter-data-mongodb;3.5.5 -org.springframework.boot:spring-boot-starter-data-mongodb-reactive;3.5.5 -org.springframework.boot:spring-boot-starter-data-neo4j;3.5.5 -org.springframework.boot:spring-boot-starter-data-r2dbc;3.5.5 -org.springframework.boot:spring-boot-starter-data-redis;3.5.5 -org.springframework.boot:spring-boot-starter-data-redis-reactive;3.5.5 -org.springframework.boot:spring-boot-starter-data-rest;3.5.5 -org.springframework.boot:spring-boot-starter-freemarker;3.5.5 -org.springframework.boot:spring-boot-starter-graphql;3.5.5 -org.springframework.boot:spring-boot-starter-groovy-templates;3.5.5 -org.springframework.boot:spring-boot-starter-hateoas;3.5.5 -org.springframework.boot:spring-boot-starter-integration;3.5.5 -org.springframework.boot:spring-boot-starter-jdbc;3.5.5 -org.springframework.boot:spring-boot-starter-jersey;3.5.5 -org.springframework.boot:spring-boot-starter-jetty;3.5.5 -org.springframework.boot:spring-boot-starter-jooq;3.5.5 -org.springframework.boot:spring-boot-starter-json;3.5.5 -org.springframework.boot:spring-boot-starter-log4j2;3.5.5 -org.springframework.boot:spring-boot-starter-logging;3.5.5 -org.springframework.boot:spring-boot-starter-mail;3.5.5 -org.springframework.boot:spring-boot-starter-mustache;3.5.5 -org.springframework.boot:spring-boot-starter-oauth2-authorization-server;3.5.5 -org.springframework.boot:spring-boot-starter-oauth2-client;3.5.5 -org.springframework.boot:spring-boot-starter-oauth2-resource-server;3.5.5 -org.springframework.boot:spring-boot-starter-parent;3.5.5 -org.springframework.boot:spring-boot-starter-pulsar;3.5.5 -org.springframework.boot:spring-boot-starter-pulsar-reactive;3.5.5 -org.springframework.boot:spring-boot-starter-quartz;3.5.5 -org.springframework.boot:spring-boot-starter-reactor-netty;3.5.5 -org.springframework.boot:spring-boot-starter-rsocket;3.5.5 -org.springframework.boot:spring-boot-starter-security;3.5.5 -org.springframework.boot:spring-boot-starter-test;3.5.5 -org.springframework.boot:spring-boot-starter-thymeleaf;3.5.5 -org.springframework.boot:spring-boot-starter-tomcat;3.5.5 -org.springframework.boot:spring-boot-starter-undertow;3.5.5 -org.springframework.boot:spring-boot-starter-validation;3.5.5 -org.springframework.boot:spring-boot-starter-web;3.5.5 -org.springframework.boot:spring-boot-starter-web-services;3.5.5 -org.springframework.boot:spring-boot-starter-webflux;3.5.5 -org.springframework.boot:spring-boot-starter-websocket;3.5.5 -org.springframework.boot:spring-boot-test;3.5.5 -org.springframework.boot:spring-boot-test-autoconfigure;3.5.5 -org.springframework.boot:spring-boot-testcontainers;3.5.5 -org.springframework.cloud:spring-cloud-bus;4.3.0 -org.springframework.cloud:spring-cloud-bus-dependencies;4.3.0 -org.springframework.cloud:spring-cloud-bus-rsocket;4.3.0 -org.springframework.cloud:spring-cloud-circuitbreaker-dependencies;3.3.0 -org.springframework.cloud:spring-cloud-circuitbreaker-resilience4j;3.3.0 -org.springframework.cloud:spring-cloud-circuitbreaker-spring-retry;3.3.0 -org.springframework.cloud:spring-cloud-commons;4.3.0 -org.springframework.cloud:spring-cloud-commons-dependencies;4.3.0 -org.springframework.cloud:spring-cloud-config-client;4.3.0 -org.springframework.cloud:spring-cloud-config-dependencies;4.3.0 -org.springframework.cloud:spring-cloud-config-monitor;4.3.0 -org.springframework.cloud:spring-cloud-config-server;4.3.0 -org.springframework.cloud:spring-cloud-consul-binder;4.3.0 -org.springframework.cloud:spring-cloud-consul-config;4.3.0 -org.springframework.cloud:spring-cloud-consul-core;4.3.0 -org.springframework.cloud:spring-cloud-consul-dependencies;4.3.0 -org.springframework.cloud:spring-cloud-consul-discovery;4.3.0 -org.springframework.cloud:spring-cloud-context;4.3.0 -org.springframework.cloud:spring-cloud-contract-converters;4.3.0 -org.springframework.cloud:spring-cloud-contract-dependencies;4.3.0 -org.springframework.cloud:spring-cloud-contract-gradle-plugin;4.3.0 -org.springframework.cloud:spring-cloud-contract-maven-plugin;4.3.0 -org.springframework.cloud:spring-cloud-contract-shade;4.3.0 -org.springframework.cloud:spring-cloud-contract-spec;4.3.0 -org.springframework.cloud:spring-cloud-contract-spec-groovy;4.3.0 -org.springframework.cloud:spring-cloud-contract-spec-java;4.3.0 -org.springframework.cloud:spring-cloud-contract-spec-kotlin;4.3.0 -org.springframework.cloud:spring-cloud-contract-stub-runner;4.3.0 -org.springframework.cloud:spring-cloud-contract-stub-runner-boot;4.3.0 -org.springframework.cloud:spring-cloud-contract-verifier;4.3.0 -org.springframework.cloud:spring-cloud-contract-wiremock;4.3.0 -org.springframework.cloud:spring-cloud-dependencies;2025.0.0 -org.springframework.cloud:spring-cloud-function-adapter-aws;4.3.0 -org.springframework.cloud:spring-cloud-function-adapter-azure;4.3.0 -org.springframework.cloud:spring-cloud-function-adapter-azure-web;4.3.0 -org.springframework.cloud:spring-cloud-function-adapter-gcp;4.3.0 -org.springframework.cloud:spring-cloud-function-context;4.3.0 -org.springframework.cloud:spring-cloud-function-core;4.3.0 -org.springframework.cloud:spring-cloud-function-dependencies;4.3.0 -org.springframework.cloud:spring-cloud-function-deployer;4.3.0 -org.springframework.cloud:spring-cloud-function-grpc;4.3.0 -org.springframework.cloud:spring-cloud-function-grpc-cloudevent-ext;4.3.0 -org.springframework.cloud:spring-cloud-function-integration;4.3.0 -org.springframework.cloud:spring-cloud-function-kotlin;4.3.0 -org.springframework.cloud:spring-cloud-function-rsocket;4.3.0 -org.springframework.cloud:spring-cloud-function-serverless-web;4.3.0 -org.springframework.cloud:spring-cloud-function-web;4.3.0 -org.springframework.cloud:spring-cloud-gateway-dependencies;4.3.0 -org.springframework.cloud:spring-cloud-gateway-mvc;4.3.0 -org.springframework.cloud:spring-cloud-gateway-proxyexchange-webflux;4.3.0 -org.springframework.cloud:spring-cloud-gateway-proxyexchange-webmvc;4.3.0 -org.springframework.cloud:spring-cloud-gateway-server;4.3.0 -org.springframework.cloud:spring-cloud-gateway-server-mvc;4.3.0 -org.springframework.cloud:spring-cloud-gateway-server-webflux;4.3.0 -org.springframework.cloud:spring-cloud-gateway-server-webmvc;4.3.0 -org.springframework.cloud:spring-cloud-gateway-webflux;4.3.0 -org.springframework.cloud:spring-cloud-kubernetes-client-autoconfig;3.3.0 -org.springframework.cloud:spring-cloud-kubernetes-client-config;3.3.0 -org.springframework.cloud:spring-cloud-kubernetes-client-discovery;3.3.0 -org.springframework.cloud:spring-cloud-kubernetes-client-loadbalancer;3.3.0 -org.springframework.cloud:spring-cloud-kubernetes-commons;3.3.0 -org.springframework.cloud:spring-cloud-kubernetes-dependencies;3.3.0 -org.springframework.cloud:spring-cloud-kubernetes-discovery;3.3.0 -org.springframework.cloud:spring-cloud-kubernetes-fabric8-autoconfig;3.3.0 -org.springframework.cloud:spring-cloud-kubernetes-fabric8-config;3.3.0 -org.springframework.cloud:spring-cloud-kubernetes-fabric8-discovery;3.3.0 -org.springframework.cloud:spring-cloud-kubernetes-fabric8-istio;3.3.0 -org.springframework.cloud:spring-cloud-kubernetes-fabric8-leader;3.3.0 -org.springframework.cloud:spring-cloud-kubernetes-fabric8-loadbalancer;3.3.0 -org.springframework.cloud:spring-cloud-kubernetes-test-support;3.3.0 -org.springframework.cloud:spring-cloud-loadbalancer;4.3.0 -org.springframework.cloud:spring-cloud-netflix-dependencies;4.3.0 -org.springframework.cloud:spring-cloud-netflix-eureka-client;4.3.0 -org.springframework.cloud:spring-cloud-netflix-eureka-server;4.3.0 -org.springframework.cloud:spring-cloud-openfeign-core;4.3.0 -org.springframework.cloud:spring-cloud-openfeign-dependencies;4.3.0 -org.springframework.cloud:spring-cloud-starter;4.3.0 -org.springframework.cloud:spring-cloud-starter-bootstrap;4.3.0 -org.springframework.cloud:spring-cloud-starter-bus-amqp;4.3.0 -org.springframework.cloud:spring-cloud-starter-bus-kafka;4.3.0 -org.springframework.cloud:spring-cloud-starter-bus-stream;4.3.0 -org.springframework.cloud:spring-cloud-starter-circuitbreaker-reactor-resilience4j;3.3.0 -org.springframework.cloud:spring-cloud-starter-circuitbreaker-resilience4j;3.3.0 -org.springframework.cloud:spring-cloud-starter-circuitbreaker-spring-retry;3.3.0 -org.springframework.cloud:spring-cloud-starter-config;4.3.0 -org.springframework.cloud:spring-cloud-starter-consul;4.3.0 -org.springframework.cloud:spring-cloud-starter-consul-all;4.3.0 -org.springframework.cloud:spring-cloud-starter-consul-bus;4.3.0 -org.springframework.cloud:spring-cloud-starter-consul-config;4.3.0 -org.springframework.cloud:spring-cloud-starter-consul-discovery;4.3.0 -org.springframework.cloud:spring-cloud-starter-contract-stub-runner;4.3.0 -org.springframework.cloud:spring-cloud-starter-contract-stub-runner-jetty;4.3.0 -org.springframework.cloud:spring-cloud-starter-contract-verifier;4.3.0 -org.springframework.cloud:spring-cloud-starter-function-web;4.3.0 -org.springframework.cloud:spring-cloud-starter-function-webflux;4.3.0 -org.springframework.cloud:spring-cloud-starter-gateway;4.3.0 -org.springframework.cloud:spring-cloud-starter-gateway-mvc;4.3.0 -org.springframework.cloud:spring-cloud-starter-gateway-server-webflux;4.3.0 -org.springframework.cloud:spring-cloud-starter-gateway-server-webmvc;4.3.0 -org.springframework.cloud:spring-cloud-starter-kubernetes-client;3.3.0 -org.springframework.cloud:spring-cloud-starter-kubernetes-client-all;3.3.0 -org.springframework.cloud:spring-cloud-starter-kubernetes-client-config;3.3.0 -org.springframework.cloud:spring-cloud-starter-kubernetes-client-loadbalancer;3.3.0 -org.springframework.cloud:spring-cloud-starter-kubernetes-discoveryclient;3.3.0 -org.springframework.cloud:spring-cloud-starter-kubernetes-fabric8;3.3.0 -org.springframework.cloud:spring-cloud-starter-kubernetes-fabric8-all;3.3.0 -org.springframework.cloud:spring-cloud-starter-kubernetes-fabric8-config;3.3.0 -org.springframework.cloud:spring-cloud-starter-kubernetes-fabric8-loadbalancer;3.3.0 -org.springframework.cloud:spring-cloud-starter-loadbalancer;4.3.0 -org.springframework.cloud:spring-cloud-starter-netflix-eureka-client;4.3.0 -org.springframework.cloud:spring-cloud-starter-netflix-eureka-server;4.3.0 -org.springframework.cloud:spring-cloud-starter-openfeign;4.3.0 -org.springframework.cloud:spring-cloud-starter-stream-kafka;4.3.0 -org.springframework.cloud:spring-cloud-starter-stream-rabbit;4.3.0 -org.springframework.cloud:spring-cloud-starter-task;3.3.0 -org.springframework.cloud:spring-cloud-starter-vault-config;4.3.0 -org.springframework.cloud:spring-cloud-starter-zookeeper;4.3.0 -org.springframework.cloud:spring-cloud-starter-zookeeper-all;4.3.0 -org.springframework.cloud:spring-cloud-starter-zookeeper-config;4.3.0 -org.springframework.cloud:spring-cloud-starter-zookeeper-discovery;4.3.0 -org.springframework.cloud:spring-cloud-stream;4.3.0 -org.springframework.cloud:spring-cloud-stream-binder-kafka;4.3.0 -org.springframework.cloud:spring-cloud-stream-binder-kafka-core;4.3.0 -org.springframework.cloud:spring-cloud-stream-binder-kafka-reactive;4.3.0 -org.springframework.cloud:spring-cloud-stream-binder-kafka-streams;4.3.0 -org.springframework.cloud:spring-cloud-stream-binder-pulsar;4.3.0 -org.springframework.cloud:spring-cloud-stream-binder-rabbit;4.3.0 -org.springframework.cloud:spring-cloud-stream-binder-rabbit-core;4.3.0 -org.springframework.cloud:spring-cloud-stream-binder-rabbit-test-support;4.3.0 -org.springframework.cloud:spring-cloud-stream-dependencies;4.3.0 -org.springframework.cloud:spring-cloud-stream-schema-registry-client;4.3.0 -org.springframework.cloud:spring-cloud-stream-schema-registry-core;4.3.0 -org.springframework.cloud:spring-cloud-stream-schema-registry-server;4.3.0 -org.springframework.cloud:spring-cloud-stream-test-binder;4.3.0 -org.springframework.cloud:spring-cloud-stream-test-support;4.3.0 -org.springframework.cloud:spring-cloud-task-batch;3.3.0 -org.springframework.cloud:spring-cloud-task-core;3.3.0 -org.springframework.cloud:spring-cloud-task-dependencies;3.3.0 -org.springframework.cloud:spring-cloud-task-stream;3.3.0 -org.springframework.cloud:spring-cloud-test-support;4.3.0 -org.springframework.cloud:spring-cloud-vault-config;4.3.0 -org.springframework.cloud:spring-cloud-vault-config-aws;4.3.0 -org.springframework.cloud:spring-cloud-vault-config-consul;4.3.0 -org.springframework.cloud:spring-cloud-vault-config-databases;4.3.0 -org.springframework.cloud:spring-cloud-vault-config-rabbitmq;4.3.0 -org.springframework.cloud:spring-cloud-vault-dependencies;4.3.0 -org.springframework.cloud:spring-cloud-zookeeper-config;4.3.0 -org.springframework.cloud:spring-cloud-zookeeper-core;4.3.0 -org.springframework.cloud:spring-cloud-zookeeper-dependencies;4.3.0 -org.springframework.cloud:spring-cloud-zookeeper-discovery;4.3.0 -org.springframework.credhub:spring-credhub-core;2.1.1.RELEASE -org.springframework.data:spring-data-bom;2025.0.3 -org.springframework.data:spring-data-cassandra;4.5.3 -org.springframework.data:spring-data-commons;3.5.3 -org.springframework.data:spring-data-couchbase;5.5.3 -org.springframework.data:spring-data-elasticsearch;5.5.3 -org.springframework.data:spring-data-envers;3.5.3 -org.springframework.data:spring-data-jdbc;3.5.3 -org.springframework.data:spring-data-jpa;3.5.3 -org.springframework.data:spring-data-keyvalue;3.5.3 -org.springframework.data:spring-data-ldap;3.5.3 -org.springframework.data:spring-data-mongodb;4.5.3 -org.springframework.data:spring-data-neo4j;7.5.3 -org.springframework.data:spring-data-r2dbc;3.5.3 -org.springframework.data:spring-data-redis;3.5.3 -org.springframework.data:spring-data-relational;3.5.3 -org.springframework.data:spring-data-rest-core;4.5.3 -org.springframework.data:spring-data-rest-hal-explorer;4.5.3 -org.springframework.data:spring-data-rest-webmvc;4.5.3 -org.springframework.graphql:spring-graphql;1.4.1 -org.springframework.graphql:spring-graphql-test;1.4.1 -org.springframework.hateoas:spring-hateoas;2.5.1 -org.springframework.integration:spring-integration-amqp;6.5.1 -org.springframework.integration:spring-integration-bom;6.5.1 -org.springframework.integration:spring-integration-camel;6.5.1 -org.springframework.integration:spring-integration-cassandra;6.5.1 -org.springframework.integration:spring-integration-core;6.5.1 -org.springframework.integration:spring-integration-debezium;6.5.1 -org.springframework.integration:spring-integration-event;6.5.1 -org.springframework.integration:spring-integration-feed;6.5.1 -org.springframework.integration:spring-integration-file;6.5.1 -org.springframework.integration:spring-integration-ftp;6.5.1 -org.springframework.integration:spring-integration-graphql;6.5.1 -org.springframework.integration:spring-integration-groovy;6.5.1 -org.springframework.integration:spring-integration-hazelcast;6.5.1 -org.springframework.integration:spring-integration-http;6.5.1 -org.springframework.integration:spring-integration-ip;6.5.1 -org.springframework.integration:spring-integration-jdbc;6.5.1 -org.springframework.integration:spring-integration-jms;6.5.1 -org.springframework.integration:spring-integration-jmx;6.5.1 -org.springframework.integration:spring-integration-jpa;6.5.1 -org.springframework.integration:spring-integration-kafka;6.5.1 -org.springframework.integration:spring-integration-mail;6.5.1 -org.springframework.integration:spring-integration-mongodb;6.5.1 -org.springframework.integration:spring-integration-mqtt;6.5.1 -org.springframework.integration:spring-integration-r2dbc;6.5.1 -org.springframework.integration:spring-integration-redis;6.5.1 -org.springframework.integration:spring-integration-rsocket;6.5.1 -org.springframework.integration:spring-integration-scripting;6.5.1 -org.springframework.integration:spring-integration-sftp;6.5.1 -org.springframework.integration:spring-integration-smb;6.5.1 -org.springframework.integration:spring-integration-stomp;6.5.1 -org.springframework.integration:spring-integration-stream;6.5.1 -org.springframework.integration:spring-integration-syslog;6.5.1 -org.springframework.integration:spring-integration-test;6.5.1 -org.springframework.integration:spring-integration-test-support;6.5.1 -org.springframework.integration:spring-integration-webflux;6.5.1 -org.springframework.integration:spring-integration-websocket;6.5.1 -org.springframework.integration:spring-integration-ws;6.5.1 -org.springframework.integration:spring-integration-xml;6.5.1 -org.springframework.integration:spring-integration-xmpp;6.5.1 -org.springframework.integration:spring-integration-zeromq;6.5.1 -org.springframework.integration:spring-integration-zip;6.5.1 -org.springframework.integration:spring-integration-zookeeper;6.5.1 -org.springframework.kafka:spring-kafka;3.3.9 -org.springframework.kafka:spring-kafka-test;3.3.9 -org.springframework.ldap:spring-ldap-core;3.3.3 -org.springframework.ldap:spring-ldap-ldif-core;3.3.3 -org.springframework.ldap:spring-ldap-odm;3.3.3 -org.springframework.ldap:spring-ldap-test;3.3.3 -org.springframework.pulsar:spring-pulsar;1.2.9 -org.springframework.pulsar:spring-pulsar-bom;1.2.9 -org.springframework.pulsar:spring-pulsar-cache-provider;1.2.9 -org.springframework.pulsar:spring-pulsar-cache-provider-caffeine;1.2.9 -org.springframework.pulsar:spring-pulsar-reactive;1.2.9 -org.springframework.pulsar:spring-pulsar-test;1.2.9 -org.springframework.restdocs:spring-restdocs-asciidoctor;3.0.5 -org.springframework.restdocs:spring-restdocs-bom;3.0.5 -org.springframework.restdocs:spring-restdocs-core;3.0.5 -org.springframework.restdocs:spring-restdocs-mockmvc;3.0.5 -org.springframework.restdocs:spring-restdocs-restassured;3.0.5 -org.springframework.restdocs:spring-restdocs-webtestclient;3.0.5 -org.springframework.retry:spring-retry;2.0.12 -org.springframework.security:spring-security-acl;6.5.3 -org.springframework.security:spring-security-aspects;6.5.3 -org.springframework.security:spring-security-bom;6.5.3 -org.springframework.security:spring-security-cas;6.5.3 -org.springframework.security:spring-security-config;6.5.3 -org.springframework.security:spring-security-core;6.5.3 -org.springframework.security:spring-security-crypto;6.5.3 -org.springframework.security:spring-security-data;6.5.3 -org.springframework.security:spring-security-ldap;6.5.3 -org.springframework.security:spring-security-messaging;6.5.3 -org.springframework.security:spring-security-oauth2-authorization-server;1.5.2 -org.springframework.security:spring-security-oauth2-client;6.5.3 -org.springframework.security:spring-security-oauth2-core;6.5.3 -org.springframework.security:spring-security-oauth2-jose;6.5.3 -org.springframework.security:spring-security-oauth2-resource-server;6.5.3 -org.springframework.security:spring-security-rsocket;6.5.3 -org.springframework.security:spring-security-saml2-service-provider;6.5.3 -org.springframework.security:spring-security-taglibs;6.5.3 -org.springframework.security:spring-security-test;6.5.3 -org.springframework.security:spring-security-web;6.5.3 -org.springframework.session:spring-session-bom;3.5.2 -org.springframework.session:spring-session-core;3.5.2 -org.springframework.session:spring-session-data-mongodb;3.5.2 -org.springframework.session:spring-session-data-redis;3.5.2 -org.springframework.session:spring-session-hazelcast;3.5.2 -org.springframework.session:spring-session-jdbc;3.5.2 -org.springframework.vault:spring-vault-core;3.2.0 -org.springframework.ws:spring-ws-bom;4.1.1 -org.springframework.ws:spring-ws-core;4.1.1 -org.springframework.ws:spring-ws-security;4.1.1 -org.springframework.ws:spring-ws-support;4.1.1 -org.springframework.ws:spring-ws-test;4.1.1 -org.springframework.ws:spring-xml;4.1.1 -org.springframework:spring-aop;6.2.10 -org.springframework:spring-aspects;6.2.10 -org.springframework:spring-beans;6.2.10 -org.springframework:spring-context;6.2.10 -org.springframework:spring-context-indexer;6.2.10 -org.springframework:spring-context-support;6.2.10 -org.springframework:spring-core;6.2.10 -org.springframework:spring-core-test;6.2.10 -org.springframework:spring-expression;6.2.10 -org.springframework:spring-framework-bom;6.2.10 -org.springframework:spring-instrument;6.2.10 -org.springframework:spring-jcl;6.2.10 -org.springframework:spring-jdbc;6.2.10 -org.springframework:spring-jms;6.2.10 -org.springframework:spring-messaging;6.2.10 -org.springframework:spring-orm;6.2.10 -org.springframework:spring-oxm;6.2.10 -org.springframework:spring-r2dbc;6.2.10 -org.springframework:spring-test;6.2.10 -org.springframework:spring-tx;6.2.10 -org.springframework:spring-web;6.2.10 -org.springframework:spring-webflux;6.2.10 -org.springframework:spring-webmvc;6.2.10 -org.springframework:spring-websocket;6.2.10 -org.testcontainers:activemq;1.21.3 -org.testcontainers:azure;1.21.3 -org.testcontainers:cassandra;1.21.3 -org.testcontainers:chromadb;1.21.3 -org.testcontainers:clickhouse;1.21.3 -org.testcontainers:cockroachdb;1.21.3 -org.testcontainers:consul;1.21.3 -org.testcontainers:couchbase;1.21.3 -org.testcontainers:cratedb;1.21.3 -org.testcontainers:database-commons;1.21.3 -org.testcontainers:databend;1.21.3 -org.testcontainers:db2;1.21.3 -org.testcontainers:dynalite;1.21.3 -org.testcontainers:elasticsearch;1.21.3 -org.testcontainers:gcloud;1.21.3 -org.testcontainers:grafana;1.21.3 -org.testcontainers:hivemq;1.21.3 -org.testcontainers:influxdb;1.21.3 -org.testcontainers:jdbc;1.21.3 -org.testcontainers:junit-jupiter;1.21.3 -org.testcontainers:k3s;1.21.3 -org.testcontainers:k6;1.21.3 -org.testcontainers:kafka;1.21.3 -org.testcontainers:ldap;1.21.3 -org.testcontainers:localstack;1.21.3 -org.testcontainers:mariadb;1.21.3 -org.testcontainers:milvus;1.21.3 -org.testcontainers:minio;1.21.3 -org.testcontainers:mockserver;1.21.3 -org.testcontainers:mongodb;1.21.3 -org.testcontainers:mssqlserver;1.21.3 -org.testcontainers:mysql;1.21.3 -org.testcontainers:neo4j;1.21.3 -org.testcontainers:nginx;1.21.3 -org.testcontainers:oceanbase;1.21.3 -org.testcontainers:ollama;1.21.3 -org.testcontainers:openfga;1.21.3 -org.testcontainers:oracle-free;1.21.3 -org.testcontainers:oracle-xe;1.21.3 -org.testcontainers:orientdb;1.21.3 -org.testcontainers:pinecone;1.21.3 -org.testcontainers:postgresql;1.21.3 -org.testcontainers:presto;1.21.3 -org.testcontainers:pulsar;1.21.3 -org.testcontainers:qdrant;1.21.3 -org.testcontainers:questdb;1.21.3 -org.testcontainers:r2dbc;1.21.3 -org.testcontainers:rabbitmq;1.21.3 -org.testcontainers:redpanda;1.21.3 -org.testcontainers:scylladb;1.21.3 -org.testcontainers:selenium;1.21.3 -org.testcontainers:solace;1.21.3 -org.testcontainers:solr;1.21.3 -org.testcontainers:spock;1.21.3 -org.testcontainers:testcontainers;1.21.3 -org.testcontainers:testcontainers-bom;1.21.3 -org.testcontainers:tidb;1.21.3 -org.testcontainers:timeplus;1.21.3 -org.testcontainers:toxiproxy;1.21.3 -org.testcontainers:trino;1.21.3 -org.testcontainers:typesense;1.21.3 -org.testcontainers:vault;1.21.3 -org.testcontainers:weaviate;1.21.3 -org.testcontainers:yugabytedb;1.21.3 -org.thymeleaf.extras:thymeleaf-extras-springsecurity6;3.1.3.RELEASE -org.thymeleaf:thymeleaf;3.1.3.RELEASE -org.thymeleaf:thymeleaf-spring6;3.1.3.RELEASE -org.tmatesoft.svnkit:svnkit;1.10.11 -org.vibur:vibur-dbcp;26.0 -org.vibur:vibur-object-pool;26.0 -org.webjars:webjars-locator-core;0.59 -org.webjars:webjars-locator-lite;1.1.0 -org.wiremock:wiremock-standalone;3.9.2 -org.xerial:sqlite-jdbc;3.49.1.0 -org.xmlunit:xmlunit-assertj;2.10.3 -org.xmlunit:xmlunit-assertj3;2.10.3 -org.xmlunit:xmlunit-core;2.10.3 -org.xmlunit:xmlunit-jakarta-jaxb-impl;2.10.3 -org.xmlunit:xmlunit-legacy;2.10.3 -org.xmlunit:xmlunit-matchers;2.10.3 -org.xmlunit:xmlunit-placeholders;2.10.3 -org.yaml:snakeyaml;2.4 -redis.clients:jedis;6.0.0 -wsdl4j:wsdl4j;1.6.3 diff --git a/sdk/spring/scripts/spring_boot_4.0.0-RC2_managed_external_dependencies.txt b/sdk/spring/scripts/spring_boot_4.0.0-RC2_managed_external_dependencies.txt new file mode 100644 index 000000000000..124377731965 --- /dev/null +++ b/sdk/spring/scripts/spring_boot_4.0.0-RC2_managed_external_dependencies.txt @@ -0,0 +1,1745 @@ +ch.qos.logback:logback-classic;1.5.20 +ch.qos.logback:logback-core;1.5.20 +co.elastic.clients:elasticsearch-java;9.2.0 +co.elastic.clients:elasticsearch-rest5-client;9.2.0 +com.couchbase.client:java-client;3.9.2 +com.datastax.oss:native-protocol;1.5.1 +com.fasterxml.jackson.core:jackson-annotations;2.20 +com.fasterxml.jackson.core:jackson-core;2.20.1 +com.fasterxml.jackson.core:jackson-databind;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-avro;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-cbor;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-csv;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-ion;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-properties;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-protobuf;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-smile;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-toml;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-xml;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-yaml;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-eclipse-collections;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-guava;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-hibernate4;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-hibernate5;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-hibernate5-jakarta;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-hibernate6;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-hibernate7;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-hppc;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-jakarta-jsonp;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-javax-money;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-jaxrs;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-jdk8;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-joda;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-joda-money;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-json-org;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-jsr310;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-jsr353;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-moneta;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-pcollections;2.20.1 +com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-base;2.20.1 +com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-cbor-provider;2.20.1 +com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider;2.20.1 +com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-smile-provider;2.20.1 +com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-xml-provider;2.20.1 +com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-yaml-provider;2.20.1 +com.fasterxml.jackson.jaxrs:jackson-jaxrs-base;2.20.1 +com.fasterxml.jackson.jaxrs:jackson-jaxrs-cbor-provider;2.20.1 +com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider;2.20.1 +com.fasterxml.jackson.jaxrs:jackson-jaxrs-smile-provider;2.20.1 +com.fasterxml.jackson.jaxrs:jackson-jaxrs-xml-provider;2.20.1 +com.fasterxml.jackson.jaxrs:jackson-jaxrs-yaml-provider;2.20.1 +com.fasterxml.jackson.jr:jackson-jr-all;2.20.1 +com.fasterxml.jackson.jr:jackson-jr-annotation-support;2.20.1 +com.fasterxml.jackson.jr:jackson-jr-extension-javatime;2.20.1 +com.fasterxml.jackson.jr:jackson-jr-objects;2.20.1 +com.fasterxml.jackson.jr:jackson-jr-retrofit2;2.20.1 +com.fasterxml.jackson.jr:jackson-jr-stree;2.20.1 +com.fasterxml.jackson.module:jackson-module-afterburner;2.20.1 +com.fasterxml.jackson.module:jackson-module-android-record;2.20.1 +com.fasterxml.jackson.module:jackson-module-blackbird;2.20.1 +com.fasterxml.jackson.module:jackson-module-guice;2.20.1 +com.fasterxml.jackson.module:jackson-module-guice7;2.20.1 +com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations;2.20.1 +com.fasterxml.jackson.module:jackson-module-jaxb-annotations;2.20.1 +com.fasterxml.jackson.module:jackson-module-jsonSchema;2.20.1 +com.fasterxml.jackson.module:jackson-module-jsonSchema-jakarta;2.20.1 +com.fasterxml.jackson.module:jackson-module-kotlin;2.20.1 +com.fasterxml.jackson.module:jackson-module-mrbean;2.20.1 +com.fasterxml.jackson.module:jackson-module-no-ctor-deser;2.20.1 +com.fasterxml.jackson.module:jackson-module-osgi;2.20.1 +com.fasterxml.jackson.module:jackson-module-parameter-names;2.20.1 +com.fasterxml.jackson.module:jackson-module-paranamer;2.20.1 +com.fasterxml.jackson.module:jackson-module-scala_2.11;2.20.1 +com.fasterxml.jackson.module:jackson-module-scala_2.12;2.20.1 +com.fasterxml.jackson.module:jackson-module-scala_2.13;2.20.1 +com.fasterxml.jackson.module:jackson-module-scala_3;2.20.1 +com.fasterxml.jackson:jackson-bom;2.20.1 +com.fasterxml:classmate;1.7.1 +com.github.ben-manes.caffeine:caffeine;3.2.3 +com.github.ben-manes.caffeine:guava;3.2.3 +com.github.ben-manes.caffeine:jcache;3.2.3 +com.github.ben-manes.caffeine:simulator;3.2.3 +com.github.mxab.thymeleaf.extras:thymeleaf-extras-data-attribute;2.0.1 +com.google.code.gson:gson;2.13.2 +com.graphql-java:graphql-java;25.0.beta-9 +com.h2database:h2;2.4.240 +com.hazelcast:hazelcast;5.5.0 +com.hazelcast:hazelcast-spring;5.5.0 +com.ibm.db2:jcc;12.1.2.0 +com.jayway.jsonpath:json-path;2.9.0 +com.jayway.jsonpath:json-path-assert;2.9.0 +com.microsoft.sqlserver:mssql-jdbc;13.2.1.jre11 +com.mysql:mysql-connector-j;9.4.0 +com.oracle.database.ha:ons;23.9.0.25.07 +com.oracle.database.ha:simplefan;23.9.0.25.07 +com.oracle.database.jdbc:ojdbc11;23.9.0.25.07 +com.oracle.database.jdbc:ojdbc11-production;23.9.0.25.07 +com.oracle.database.jdbc:ojdbc17;23.9.0.25.07 +com.oracle.database.jdbc:ojdbc17-production;23.9.0.25.07 +com.oracle.database.jdbc:ojdbc8;23.9.0.25.07 +com.oracle.database.jdbc:ojdbc8-production;23.9.0.25.07 +com.oracle.database.jdbc:rsi;23.9.0.25.07 +com.oracle.database.jdbc:ucp;23.9.0.25.07 +com.oracle.database.jdbc:ucp11;23.9.0.25.07 +com.oracle.database.jdbc:ucp17;23.9.0.25.07 +com.oracle.database.nls:orai18n;23.9.0.25.07 +com.oracle.database.r2dbc:oracle-r2dbc;1.3.0 +com.oracle.database.security:oraclepki;23.9.0.25.07 +com.oracle.database.xml:xdb;23.9.0.25.07 +com.oracle.database.xml:xmlparserv2;23.9.0.25.07 +com.querydsl:codegen-utils;5.1.0 +com.querydsl:querydsl-apt;5.1.0 +com.querydsl:querydsl-bom;5.1.0 +com.querydsl:querydsl-codegen;5.1.0 +com.querydsl:querydsl-collections;5.1.0 +com.querydsl:querydsl-core;5.1.0 +com.querydsl:querydsl-guava;5.1.0 +com.querydsl:querydsl-hibernate-search;5.1.0 +com.querydsl:querydsl-jdo;5.1.0 +com.querydsl:querydsl-jpa;5.1.0 +com.querydsl:querydsl-jpa-codegen;5.1.0 +com.querydsl:querydsl-kotlin;5.1.0 +com.querydsl:querydsl-kotlin-codegen;5.1.0 +com.querydsl:querydsl-lucene3;5.1.0 +com.querydsl:querydsl-lucene4;5.1.0 +com.querydsl:querydsl-lucene5;5.1.0 +com.querydsl:querydsl-mongodb;5.1.0 +com.querydsl:querydsl-scala;5.1.0 +com.querydsl:querydsl-spatial;5.1.0 +com.querydsl:querydsl-sql;5.1.0 +com.querydsl:querydsl-sql-codegen;5.1.0 +com.querydsl:querydsl-sql-spatial;5.1.0 +com.querydsl:querydsl-sql-spring;5.1.0 +com.rabbitmq:amqp-client;5.27.1 +com.rabbitmq:stream-client;0.23.0 +com.redis:testcontainers-redis;2.2.4 +com.samskivert:jmustache;1.16 +com.sendgrid:sendgrid-java;4.10.3 +com.sun.xml.bind:jaxb-core;4.0.6 +com.sun.xml.bind:jaxb-impl;4.0.6 +com.sun.xml.bind:jaxb-jxc;4.0.6 +com.sun.xml.bind:jaxb-osgi;4.0.6 +com.sun.xml.bind:jaxb-xjc;4.0.6 +com.sun.xml.messaging.saaj:saaj-impl;3.0.4 +com.unboundid:unboundid-ldapsdk;7.0.3 +com.zaxxer:HikariCP;7.0.2 +commons-codec:commons-codec;1.19.0 +commons-logging:commons-logging;1.3.5 +commons-pool:commons-pool;1.6 +io.asyncer:r2dbc-mysql;1.4.1 +io.github.git-commit-id:git-commit-id-maven-plugin;9.0.2 +io.lettuce:lettuce-core;6.8.1.RELEASE +io.micrometer:micrometer-bom;1.16.0-RC1 +io.micrometer:micrometer-registry-stackdriver;1.16.0-RC1 +io.micrometer:micrometer-tracing-bom;1.6.0-RC1 +io.netty:netty-all;4.2.7.Final +io.netty:netty-bom;4.2.7.Final +io.netty:netty-buffer;4.2.7.Final +io.netty:netty-codec;4.2.7.Final +io.netty:netty-codec-base;4.2.7.Final +io.netty:netty-codec-classes-quic;4.2.7.Final +io.netty:netty-codec-compression;4.2.7.Final +io.netty:netty-codec-dns;4.2.7.Final +io.netty:netty-codec-haproxy;4.2.7.Final +io.netty:netty-codec-http;4.2.7.Final +io.netty:netty-codec-http2;4.2.7.Final +io.netty:netty-codec-http3;4.2.7.Final +io.netty:netty-codec-marshalling;4.2.7.Final +io.netty:netty-codec-memcache;4.2.7.Final +io.netty:netty-codec-mqtt;4.2.7.Final +io.netty:netty-codec-native-quic;4.2.7.Final +io.netty:netty-codec-protobuf;4.2.7.Final +io.netty:netty-codec-redis;4.2.7.Final +io.netty:netty-codec-smtp;4.2.7.Final +io.netty:netty-codec-socks;4.2.7.Final +io.netty:netty-codec-stomp;4.2.7.Final +io.netty:netty-codec-xml;4.2.7.Final +io.netty:netty-common;4.2.7.Final +io.netty:netty-dev-tools;4.2.7.Final +io.netty:netty-handler;4.2.7.Final +io.netty:netty-handler-proxy;4.2.7.Final +io.netty:netty-handler-ssl-ocsp;4.2.7.Final +io.netty:netty-pkitesting;4.2.7.Final +io.netty:netty-resolver;4.2.7.Final +io.netty:netty-resolver-dns;4.2.7.Final +io.netty:netty-resolver-dns-classes-macos;4.2.7.Final +io.netty:netty-resolver-dns-native-macos;4.2.7.Final +io.netty:netty-tcnative;2.0.74.Final +io.netty:netty-tcnative-boringssl-static;2.0.74.Final +io.netty:netty-tcnative-classes;2.0.74.Final +io.netty:netty-transport;4.2.7.Final +io.netty:netty-transport-classes-epoll;4.2.7.Final +io.netty:netty-transport-classes-io_uring;4.2.7.Final +io.netty:netty-transport-classes-kqueue;4.2.7.Final +io.netty:netty-transport-native-epoll;4.2.7.Final +io.netty:netty-transport-native-io_uring;4.2.7.Final +io.netty:netty-transport-native-kqueue;4.2.7.Final +io.netty:netty-transport-native-unix-common;4.2.7.Final +io.netty:netty-transport-rxtx;4.2.7.Final +io.netty:netty-transport-sctp;4.2.7.Final +io.netty:netty-transport-udt;4.2.7.Final +io.opentelemetry:opentelemetry-api;1.55.0 +io.opentelemetry:opentelemetry-bom;1.55.0 +io.opentelemetry:opentelemetry-common;1.55.0 +io.opentelemetry:opentelemetry-context;1.55.0 +io.opentelemetry:opentelemetry-exporter-common;1.55.0 +io.opentelemetry:opentelemetry-exporter-logging;1.55.0 +io.opentelemetry:opentelemetry-exporter-logging-otlp;1.55.0 +io.opentelemetry:opentelemetry-exporter-otlp;1.55.0 +io.opentelemetry:opentelemetry-exporter-otlp-common;1.55.0 +io.opentelemetry:opentelemetry-exporter-sender-grpc-managed-channel;1.55.0 +io.opentelemetry:opentelemetry-exporter-sender-jdk;1.55.0 +io.opentelemetry:opentelemetry-exporter-sender-okhttp;1.55.0 +io.opentelemetry:opentelemetry-exporter-zipkin;1.55.0 +io.opentelemetry:opentelemetry-extension-kotlin;1.55.0 +io.opentelemetry:opentelemetry-extension-trace-propagators;1.55.0 +io.opentelemetry:opentelemetry-opentracing-shim;1.55.0 +io.opentelemetry:opentelemetry-sdk;1.55.0 +io.opentelemetry:opentelemetry-sdk-common;1.55.0 +io.opentelemetry:opentelemetry-sdk-extension-autoconfigure;1.55.0 +io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi;1.55.0 +io.opentelemetry:opentelemetry-sdk-extension-jaeger-remote-sampler;1.55.0 +io.opentelemetry:opentelemetry-sdk-logs;1.55.0 +io.opentelemetry:opentelemetry-sdk-metrics;1.55.0 +io.opentelemetry:opentelemetry-sdk-testing;1.55.0 +io.opentelemetry:opentelemetry-sdk-trace;1.55.0 +io.projectreactor.addons:reactor-adapter;3.6.0-RC6 +io.projectreactor.addons:reactor-extra;3.6.0-RC6 +io.projectreactor.addons:reactor-pool;1.2.0-RC1 +io.projectreactor.addons:reactor-pool-micrometer;0.3.0-RC1 +io.projectreactor.kotlin:reactor-kotlin-extensions;1.3.0-RC5 +io.projectreactor.netty:reactor-netty;1.3.0-RC1 +io.projectreactor.netty:reactor-netty-core;1.3.0-RC1 +io.projectreactor.netty:reactor-netty-http;1.3.0-RC1 +io.projectreactor.netty:reactor-netty-http-brave;1.3.0-RC1 +io.projectreactor.netty:reactor-netty-quic;1.0.0-RC1 +io.projectreactor:reactor-bom;2025.0.0-RC1 +io.projectreactor:reactor-core;3.8.0-RC1 +io.projectreactor:reactor-core-micrometer;1.3.0-RC1 +io.projectreactor:reactor-test;3.8.0-RC1 +io.projectreactor:reactor-tools;3.8.0-RC1 +io.prometheus:prometheus-metrics-bom;1.4.2 +io.prometheus:prometheus-metrics-config;1.4.2 +io.prometheus:prometheus-metrics-core;1.4.2 +io.prometheus:prometheus-metrics-exporter-common;1.4.2 +io.prometheus:prometheus-metrics-exporter-httpserver;1.4.2 +io.prometheus:prometheus-metrics-exporter-opentelemetry;1.4.2 +io.prometheus:prometheus-metrics-exporter-opentelemetry-no-otel;1.4.2 +io.prometheus:prometheus-metrics-exporter-opentelemetry-otel-agent-resources;1.4.2 +io.prometheus:prometheus-metrics-exporter-pushgateway;1.4.2 +io.prometheus:prometheus-metrics-exporter-servlet-jakarta;1.4.2 +io.prometheus:prometheus-metrics-exporter-servlet-javax;1.4.2 +io.prometheus:prometheus-metrics-exposition-formats;1.4.2 +io.prometheus:prometheus-metrics-exposition-formats-no-protobuf;1.4.2 +io.prometheus:prometheus-metrics-exposition-textformats;1.4.2 +io.prometheus:prometheus-metrics-instrumentation-caffeine;1.4.2 +io.prometheus:prometheus-metrics-instrumentation-dropwizard;1.4.2 +io.prometheus:prometheus-metrics-instrumentation-dropwizard5;1.4.2 +io.prometheus:prometheus-metrics-instrumentation-guava;1.4.2 +io.prometheus:prometheus-metrics-instrumentation-jvm;1.4.2 +io.prometheus:prometheus-metrics-model;1.4.2 +io.prometheus:prometheus-metrics-simpleclient-bridge;1.4.2 +io.prometheus:prometheus-metrics-tracer;1.4.2 +io.prometheus:prometheus-metrics-tracer-common;1.4.2 +io.prometheus:prometheus-metrics-tracer-initializer;1.4.2 +io.prometheus:prometheus-metrics-tracer-otel;1.4.2 +io.prometheus:prometheus-metrics-tracer-otel-agent;1.4.2 +io.prometheus:simpleclient;0.16.0 +io.prometheus:simpleclient_bom;0.16.0 +io.prometheus:simpleclient_caffeine;0.16.0 +io.prometheus:simpleclient_common;0.16.0 +io.prometheus:simpleclient_dropwizard;0.16.0 +io.prometheus:simpleclient_graphite_bridge;0.16.0 +io.prometheus:simpleclient_guava;0.16.0 +io.prometheus:simpleclient_hibernate;0.16.0 +io.prometheus:simpleclient_hotspot;0.16.0 +io.prometheus:simpleclient_httpserver;0.16.0 +io.prometheus:simpleclient_jetty;0.16.0 +io.prometheus:simpleclient_jetty_jdk8;0.16.0 +io.prometheus:simpleclient_log4j;0.16.0 +io.prometheus:simpleclient_log4j2;0.16.0 +io.prometheus:simpleclient_logback;0.16.0 +io.prometheus:simpleclient_pushgateway;0.16.0 +io.prometheus:simpleclient_servlet;0.16.0 +io.prometheus:simpleclient_servlet_jakarta;0.16.0 +io.prometheus:simpleclient_spring_boot;0.16.0 +io.prometheus:simpleclient_spring_web;0.16.0 +io.prometheus:simpleclient_tracer_common;0.16.0 +io.prometheus:simpleclient_tracer_otel;0.16.0 +io.prometheus:simpleclient_tracer_otel_agent;0.16.0 +io.prometheus:simpleclient_vertx;0.16.0 +io.r2dbc:r2dbc-h2;1.1.0.RELEASE +io.r2dbc:r2dbc-mssql;1.0.3.RELEASE +io.r2dbc:r2dbc-pool;1.0.2.RELEASE +io.r2dbc:r2dbc-proxy;1.1.6.RELEASE +io.r2dbc:r2dbc-spi;1.0.0.RELEASE +io.reactivex.rxjava3:rxjava;3.1.12 +io.rsocket:rsocket-bom;1.1.5 +io.rsocket:rsocket-core;1.1.5 +io.rsocket:rsocket-load-balancer;1.1.5 +io.rsocket:rsocket-micrometer;1.1.5 +io.rsocket:rsocket-test;1.1.5 +io.rsocket:rsocket-transport-local;1.1.5 +io.rsocket:rsocket-transport-netty;1.1.5 +io.spring.gradle:dependency-management-plugin;1.1.7 +io.zipkin.brave:brave;6.3.0 +io.zipkin.brave:brave-bom;6.3.0 +io.zipkin.brave:brave-context-jfr;6.3.0 +io.zipkin.brave:brave-context-log4j12;6.3.0 +io.zipkin.brave:brave-context-log4j2;6.3.0 +io.zipkin.brave:brave-context-slf4j;6.3.0 +io.zipkin.brave:brave-instrumentation-dubbo;6.3.0 +io.zipkin.brave:brave-instrumentation-grpc;6.3.0 +io.zipkin.brave:brave-instrumentation-http;6.3.0 +io.zipkin.brave:brave-instrumentation-http-tests;6.3.0 +io.zipkin.brave:brave-instrumentation-http-tests-jakarta;6.3.0 +io.zipkin.brave:brave-instrumentation-httpasyncclient;6.3.0 +io.zipkin.brave:brave-instrumentation-httpclient;6.3.0 +io.zipkin.brave:brave-instrumentation-httpclient5;6.3.0 +io.zipkin.brave:brave-instrumentation-jakarta-jms;6.3.0 +io.zipkin.brave:brave-instrumentation-jaxrs2;6.3.0 +io.zipkin.brave:brave-instrumentation-jdbi3;6.3.0 +io.zipkin.brave:brave-instrumentation-jersey-server;6.3.0 +io.zipkin.brave:brave-instrumentation-jersey-server-jakarta;6.3.0 +io.zipkin.brave:brave-instrumentation-jms;6.3.0 +io.zipkin.brave:brave-instrumentation-jms-jakarta;6.3.0 +io.zipkin.brave:brave-instrumentation-kafka-clients;6.3.0 +io.zipkin.brave:brave-instrumentation-kafka-streams;6.3.0 +io.zipkin.brave:brave-instrumentation-messaging;6.3.0 +io.zipkin.brave:brave-instrumentation-mongodb;6.3.0 +io.zipkin.brave:brave-instrumentation-mysql;6.3.0 +io.zipkin.brave:brave-instrumentation-mysql6;6.3.0 +io.zipkin.brave:brave-instrumentation-mysql8;6.3.0 +io.zipkin.brave:brave-instrumentation-netty-codec-http;6.3.0 +io.zipkin.brave:brave-instrumentation-okhttp3;6.3.0 +io.zipkin.brave:brave-instrumentation-rocketmq-client;6.3.0 +io.zipkin.brave:brave-instrumentation-rpc;6.3.0 +io.zipkin.brave:brave-instrumentation-servlet;6.3.0 +io.zipkin.brave:brave-instrumentation-servlet-jakarta;6.3.0 +io.zipkin.brave:brave-instrumentation-spring-rabbit;6.3.0 +io.zipkin.brave:brave-instrumentation-spring-web;6.3.0 +io.zipkin.brave:brave-instrumentation-spring-webmvc;6.3.0 +io.zipkin.brave:brave-instrumentation-vertx-web;6.3.0 +io.zipkin.brave:brave-spring-beans;6.3.0 +io.zipkin.brave:brave-tests;6.3.0 +io.zipkin.reporter2:zipkin-reporter;3.5.1 +io.zipkin.reporter2:zipkin-reporter-bom;3.5.1 +io.zipkin.reporter2:zipkin-reporter-brave;3.5.1 +io.zipkin.reporter2:zipkin-reporter-metrics-micrometer;3.5.1 +io.zipkin.reporter2:zipkin-reporter-spring-beans;3.5.1 +io.zipkin.reporter2:zipkin-sender-activemq-client;3.5.1 +io.zipkin.reporter2:zipkin-sender-amqp-client;3.5.1 +io.zipkin.reporter2:zipkin-sender-kafka;3.5.1 +io.zipkin.reporter2:zipkin-sender-libthrift;3.5.1 +io.zipkin.reporter2:zipkin-sender-okhttp3;3.5.1 +io.zipkin.reporter2:zipkin-sender-pulsar-client;3.5.1 +io.zipkin.reporter2:zipkin-sender-urlconnection;3.5.1 +jakarta.activation:jakarta.activation-api;2.1.4 +jakarta.annotation:jakarta.annotation-api;3.0.0 +jakarta.inject:jakarta.inject-api;2.0.1 +jakarta.jms:jakarta.jms-api;3.1.0 +jakarta.json.bind:jakarta.json.bind-api;3.0.1 +jakarta.json:jakarta.json-api;2.1.3 +jakarta.mail:jakarta.mail-api;2.1.5 +jakarta.management.j2ee:jakarta.management.j2ee-api;1.1.4 +jakarta.persistence:jakarta.persistence-api;3.2.0 +jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api;3.0.2 +jakarta.servlet:jakarta.servlet-api;6.1.0 +jakarta.transaction:jakarta.transaction-api;2.0.1 +jakarta.validation:jakarta.validation-api;3.1.1 +jakarta.websocket:jakarta.websocket-api;2.2.0 +jakarta.websocket:jakarta.websocket-client-api;2.2.0 +jakarta.ws.rs:jakarta.ws.rs-api;4.0.0 +jakarta.xml.bind:jakarta.xml.bind-api;4.0.4 +jakarta.xml.soap:jakarta.xml.soap-api;3.0.2 +jakarta.xml.ws:jakarta.xml.ws-api;4.0.2 +javax.cache:cache-api;1.1.1 +javax.money:money-api;1.1 +jaxen:jaxen;2.0.0 +junit:junit;4.13.2 +net.bytebuddy:byte-buddy;1.17.8 +net.bytebuddy:byte-buddy-agent;1.17.8 +net.minidev:json-smart;2.6.0 +net.sourceforge.jtds:jtds;1.3.1 +net.sourceforge.nekohtml:nekohtml;1.9.22 +nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect;3.4.0 +org.apache.activemq:activemq-all;6.1.8 +org.apache.activemq:activemq-amqp;6.1.8 +org.apache.activemq:activemq-blueprint;6.1.8 +org.apache.activemq:activemq-bom;6.1.8 +org.apache.activemq:activemq-broker;6.1.8 +org.apache.activemq:activemq-client;6.1.8 +org.apache.activemq:activemq-console;6.1.8 +org.apache.activemq:activemq-http;6.1.8 +org.apache.activemq:activemq-jaas;6.1.8 +org.apache.activemq:activemq-jdbc-store;6.1.8 +org.apache.activemq:activemq-jms-pool;6.1.8 +org.apache.activemq:activemq-kahadb-store;6.1.8 +org.apache.activemq:activemq-karaf;6.1.8 +org.apache.activemq:activemq-log4j-appender;6.1.8 +org.apache.activemq:activemq-mqtt;6.1.8 +org.apache.activemq:activemq-openwire-generator;6.1.8 +org.apache.activemq:activemq-openwire-legacy;6.1.8 +org.apache.activemq:activemq-osgi;6.1.8 +org.apache.activemq:activemq-pool;6.1.8 +org.apache.activemq:activemq-ra;6.1.8 +org.apache.activemq:activemq-rar;6.1.8 +org.apache.activemq:activemq-run;6.1.8 +org.apache.activemq:activemq-runtime-config;6.1.8 +org.apache.activemq:activemq-shiro;6.1.8 +org.apache.activemq:activemq-spring;6.1.8 +org.apache.activemq:activemq-stomp;6.1.8 +org.apache.activemq:activemq-web;6.1.8 +org.apache.activemq:activemq-web-console;6.1.8 +org.apache.activemq:activemq-web-demo;6.1.8 +org.apache.activemq:artemis-amqp-protocol;2.43.0 +org.apache.activemq:artemis-bom;2.43.0 +org.apache.activemq:artemis-boot;2.43.0 +org.apache.activemq:artemis-cdi-client;2.43.0 +org.apache.activemq:artemis-cli;2.43.0 +org.apache.activemq:artemis-commons;2.43.0 +org.apache.activemq:artemis-console;2.43.0 +org.apache.activemq:artemis-core-client;2.43.0 +org.apache.activemq:artemis-core-client-all;2.43.0 +org.apache.activemq:artemis-core-client-osgi;2.43.0 +org.apache.activemq:artemis-dto;2.43.0 +org.apache.activemq:artemis-features;2.43.0 +org.apache.activemq:artemis-hornetq-protocol;2.43.0 +org.apache.activemq:artemis-hqclient-protocol;2.43.0 +org.apache.activemq:artemis-jakarta-cdi-client;2.43.0 +org.apache.activemq:artemis-jakarta-client;2.43.0 +org.apache.activemq:artemis-jakarta-client-all;2.43.0 +org.apache.activemq:artemis-jakarta-openwire-protocol;2.43.0 +org.apache.activemq:artemis-jakarta-ra;2.43.0 +org.apache.activemq:artemis-jakarta-server;2.43.0 +org.apache.activemq:artemis-jakarta-service-extensions;2.43.0 +org.apache.activemq:artemis-jdbc-store;2.43.0 +org.apache.activemq:artemis-jms-client;2.43.0 +org.apache.activemq:artemis-jms-client-all;2.43.0 +org.apache.activemq:artemis-jms-client-osgi;2.43.0 +org.apache.activemq:artemis-jms-server;2.43.0 +org.apache.activemq:artemis-journal;2.43.0 +org.apache.activemq:artemis-lockmanager-api;2.43.0 +org.apache.activemq:artemis-lockmanager-ri;2.43.0 +org.apache.activemq:artemis-mqtt-protocol;2.43.0 +org.apache.activemq:artemis-openwire-protocol;2.43.0 +org.apache.activemq:artemis-ra;2.43.0 +org.apache.activemq:artemis-selector;2.43.0 +org.apache.activemq:artemis-server;2.43.0 +org.apache.activemq:artemis-server-osgi;2.43.0 +org.apache.activemq:artemis-service-extensions;2.43.0 +org.apache.activemq:artemis-stomp-protocol;2.43.0 +org.apache.activemq:artemis-web;2.43.0 +org.apache.activemq:artemis-website;2.43.0 +org.apache.cassandra:java-driver-bom;4.19.0 +org.apache.cassandra:java-driver-core;4.19.0 +org.apache.cassandra:java-driver-core-shaded;4.19.0 +org.apache.cassandra:java-driver-guava-shaded;4.19.0 +org.apache.cassandra:java-driver-mapper-processor;4.19.0 +org.apache.cassandra:java-driver-mapper-runtime;4.19.0 +org.apache.cassandra:java-driver-metrics-micrometer;4.19.0 +org.apache.cassandra:java-driver-metrics-microprofile;4.19.0 +org.apache.cassandra:java-driver-query-builder;4.19.0 +org.apache.cassandra:java-driver-test-infra;4.19.0 +org.apache.commons:commons-dbcp2;2.13.0 +org.apache.commons:commons-lang3;3.19.0 +org.apache.commons:commons-pool2;2.12.1 +org.apache.derby:derby;10.16.1.1 +org.apache.derby:derbyclient;10.16.1.1 +org.apache.derby:derbynet;10.16.1.1 +org.apache.derby:derbyoptionaltools;10.16.1.1 +org.apache.derby:derbyshared;10.16.1.1 +org.apache.derby:derbytools;10.16.1.1 +org.apache.groovy:groovy;5.0.2 +org.apache.groovy:groovy-ant;5.0.2 +org.apache.groovy:groovy-astbuilder;5.0.2 +org.apache.groovy:groovy-bom;5.0.2 +org.apache.groovy:groovy-cli-commons;5.0.2 +org.apache.groovy:groovy-cli-picocli;5.0.2 +org.apache.groovy:groovy-console;5.0.2 +org.apache.groovy:groovy-contracts;5.0.2 +org.apache.groovy:groovy-datetime;5.0.2 +org.apache.groovy:groovy-dateutil;5.0.2 +org.apache.groovy:groovy-docgenerator;5.0.2 +org.apache.groovy:groovy-ginq;5.0.2 +org.apache.groovy:groovy-groovydoc;5.0.2 +org.apache.groovy:groovy-groovysh;5.0.2 +org.apache.groovy:groovy-jmx;5.0.2 +org.apache.groovy:groovy-json;5.0.2 +org.apache.groovy:groovy-jsr223;5.0.2 +org.apache.groovy:groovy-macro;5.0.2 +org.apache.groovy:groovy-macro-library;5.0.2 +org.apache.groovy:groovy-nio;5.0.2 +org.apache.groovy:groovy-servlet;5.0.2 +org.apache.groovy:groovy-sql;5.0.2 +org.apache.groovy:groovy-swing;5.0.2 +org.apache.groovy:groovy-templates;5.0.2 +org.apache.groovy:groovy-test;5.0.2 +org.apache.groovy:groovy-test-junit5;5.0.2 +org.apache.groovy:groovy-testng;5.0.2 +org.apache.groovy:groovy-toml;5.0.2 +org.apache.groovy:groovy-typecheckers;5.0.2 +org.apache.groovy:groovy-xml;5.0.2 +org.apache.groovy:groovy-yaml;5.0.2 +org.apache.httpcomponents.client5:httpclient5;5.5.1 +org.apache.httpcomponents.client5:httpclient5-cache;5.5.1 +org.apache.httpcomponents.client5:httpclient5-fluent;5.5.1 +org.apache.httpcomponents.core5:httpcore5;5.3.6 +org.apache.httpcomponents.core5:httpcore5-h2;5.3.6 +org.apache.httpcomponents.core5:httpcore5-reactive;5.3.6 +org.apache.httpcomponents:httpasyncclient;4.1.5 +org.apache.httpcomponents:httpcore;4.4.16 +org.apache.httpcomponents:httpcore-nio;4.4.16 +org.apache.kafka:connect;4.1.0 +org.apache.kafka:connect-api;4.1.0 +org.apache.kafka:connect-basic-auth-extension;4.1.0 +org.apache.kafka:connect-file;4.1.0 +org.apache.kafka:connect-json;4.1.0 +org.apache.kafka:connect-mirror;4.1.0 +org.apache.kafka:connect-mirror-client;4.1.0 +org.apache.kafka:connect-runtime;4.1.0 +org.apache.kafka:connect-transforms;4.1.0 +org.apache.kafka:generator;4.1.0 +org.apache.kafka:kafka-clients;4.1.0 +org.apache.kafka:kafka-log4j-appender;4.1.0 +org.apache.kafka:kafka-metadata;4.1.0 +org.apache.kafka:kafka-raft;4.1.0 +org.apache.kafka:kafka-server;4.1.0 +org.apache.kafka:kafka-server-common;4.1.0 +org.apache.kafka:kafka-shell;4.1.0 +org.apache.kafka:kafka-storage;4.1.0 +org.apache.kafka:kafka-storage-api;4.1.0 +org.apache.kafka:kafka-streams;4.1.0 +org.apache.kafka:kafka-streams-scala_2.12;4.1.0 +org.apache.kafka:kafka-streams-scala_2.13;4.1.0 +org.apache.kafka:kafka-streams-test-utils;4.1.0 +org.apache.kafka:kafka-tools;4.1.0 +org.apache.kafka:kafka_2.12;4.1.0 +org.apache.kafka:kafka_2.13;4.1.0 +org.apache.kafka:trogdor;4.1.0 +org.apache.logging.log4j:log4j-1.2-api;2.25.2 +org.apache.logging.log4j:log4j-api;2.25.2 +org.apache.logging.log4j:log4j-api-test;2.25.2 +org.apache.logging.log4j:log4j-appserver;2.25.2 +org.apache.logging.log4j:log4j-bom;2.25.2 +org.apache.logging.log4j:log4j-cassandra;2.25.2 +org.apache.logging.log4j:log4j-core;2.25.2 +org.apache.logging.log4j:log4j-core-test;2.25.2 +org.apache.logging.log4j:log4j-couchdb;2.25.2 +org.apache.logging.log4j:log4j-docker;2.25.2 +org.apache.logging.log4j:log4j-flume-ng;2.23.1 +org.apache.logging.log4j:log4j-iostreams;2.25.2 +org.apache.logging.log4j:log4j-jakarta-jms;2.25.2 +org.apache.logging.log4j:log4j-jakarta-smtp;2.25.2 +org.apache.logging.log4j:log4j-jakarta-web;2.25.2 +org.apache.logging.log4j:log4j-jcl;2.25.2 +org.apache.logging.log4j:log4j-jpa;2.25.2 +org.apache.logging.log4j:log4j-jpl;2.25.2 +org.apache.logging.log4j:log4j-jul;2.25.2 +org.apache.logging.log4j:log4j-layout-template-json;2.25.2 +org.apache.logging.log4j:log4j-mongodb;2.25.2 +org.apache.logging.log4j:log4j-mongodb4;2.25.2 +org.apache.logging.log4j:log4j-slf4j-impl;2.25.2 +org.apache.logging.log4j:log4j-slf4j2-impl;2.25.2 +org.apache.logging.log4j:log4j-spring-boot;2.25.2 +org.apache.logging.log4j:log4j-spring-cloud-config-client;2.25.2 +org.apache.logging.log4j:log4j-taglib;2.25.2 +org.apache.logging.log4j:log4j-to-jul;2.25.2 +org.apache.logging.log4j:log4j-to-slf4j;2.25.2 +org.apache.logging.log4j:log4j-web;2.25.2 +org.apache.maven.plugins:maven-antrun-plugin;3.2.0 +org.apache.maven.plugins:maven-assembly-plugin;3.7.1 +org.apache.maven.plugins:maven-clean-plugin;3.5.0 +org.apache.maven.plugins:maven-compiler-plugin;3.14.1 +org.apache.maven.plugins:maven-dependency-plugin;3.9.0 +org.apache.maven.plugins:maven-deploy-plugin;3.1.4 +org.apache.maven.plugins:maven-enforcer-plugin;3.6.2 +org.apache.maven.plugins:maven-failsafe-plugin;3.5.4 +org.apache.maven.plugins:maven-help-plugin;3.5.1 +org.apache.maven.plugins:maven-install-plugin;3.1.4 +org.apache.maven.plugins:maven-invoker-plugin;3.9.1 +org.apache.maven.plugins:maven-jar-plugin;3.4.2 +org.apache.maven.plugins:maven-javadoc-plugin;3.12.0 +org.apache.maven.plugins:maven-resources-plugin;3.3.1 +org.apache.maven.plugins:maven-shade-plugin;3.6.1 +org.apache.maven.plugins:maven-source-plugin;3.3.1 +org.apache.maven.plugins:maven-surefire-plugin;3.5.4 +org.apache.maven.plugins:maven-war-plugin;3.4.0 +org.apache.pulsar:bouncy-castle-bc;4.1.1 +org.apache.pulsar:bouncy-castle-bcfips;4.1.1 +org.apache.pulsar:bouncy-castle-parent;4.1.1 +org.apache.pulsar:buildtools;4.1.1 +org.apache.pulsar:distribution;4.1.1 +org.apache.pulsar:docker-images;4.1.1 +org.apache.pulsar:jclouds-shaded;4.1.1 +org.apache.pulsar:managed-ledger;4.1.1 +org.apache.pulsar:pulsar;4.1.1 +org.apache.pulsar:pulsar-all-docker-image;4.1.1 +org.apache.pulsar:pulsar-bom;4.1.1 +org.apache.pulsar:pulsar-broker;4.1.1 +org.apache.pulsar:pulsar-broker-auth-athenz;4.1.1 +org.apache.pulsar:pulsar-broker-auth-oidc;4.1.1 +org.apache.pulsar:pulsar-broker-auth-sasl;4.1.1 +org.apache.pulsar:pulsar-broker-common;4.1.1 +org.apache.pulsar:pulsar-cli-utils;4.1.1 +org.apache.pulsar:pulsar-client;4.1.1 +org.apache.pulsar:pulsar-client-admin;4.1.1 +org.apache.pulsar:pulsar-client-admin-api;4.1.1 +org.apache.pulsar:pulsar-client-admin-original;4.1.1 +org.apache.pulsar:pulsar-client-all;4.1.1 +org.apache.pulsar:pulsar-client-api;4.1.1 +org.apache.pulsar:pulsar-client-auth-athenz;4.1.1 +org.apache.pulsar:pulsar-client-auth-sasl;4.1.1 +org.apache.pulsar:pulsar-client-messagecrypto-bc;4.1.1 +org.apache.pulsar:pulsar-client-original;4.1.1 +org.apache.pulsar:pulsar-client-tools;4.1.1 +org.apache.pulsar:pulsar-client-tools-api;4.1.1 +org.apache.pulsar:pulsar-common;4.1.1 +org.apache.pulsar:pulsar-config-validation;4.1.1 +org.apache.pulsar:pulsar-docker-image;4.1.1 +org.apache.pulsar:pulsar-docs-tools;4.1.1 +org.apache.pulsar:pulsar-functions;4.1.1 +org.apache.pulsar:pulsar-functions-api;4.1.1 +org.apache.pulsar:pulsar-functions-api-examples;4.1.1 +org.apache.pulsar:pulsar-functions-api-examples-builtin;4.1.1 +org.apache.pulsar:pulsar-functions-instance;4.1.1 +org.apache.pulsar:pulsar-functions-local-runner;4.1.1 +org.apache.pulsar:pulsar-functions-local-runner-original;4.1.1 +org.apache.pulsar:pulsar-functions-proto;4.1.1 +org.apache.pulsar:pulsar-functions-runtime;4.1.1 +org.apache.pulsar:pulsar-functions-runtime-all;4.1.1 +org.apache.pulsar:pulsar-functions-secrets;4.1.1 +org.apache.pulsar:pulsar-functions-utils;4.1.1 +org.apache.pulsar:pulsar-functions-worker;4.1.1 +org.apache.pulsar:pulsar-io;4.1.1 +org.apache.pulsar:pulsar-io-aerospike;4.1.1 +org.apache.pulsar:pulsar-io-alluxio;4.1.1 +org.apache.pulsar:pulsar-io-aws;4.1.1 +org.apache.pulsar:pulsar-io-batch-data-generator;4.1.1 +org.apache.pulsar:pulsar-io-batch-discovery-triggerers;4.1.1 +org.apache.pulsar:pulsar-io-canal;4.1.1 +org.apache.pulsar:pulsar-io-cassandra;4.1.1 +org.apache.pulsar:pulsar-io-common;4.1.1 +org.apache.pulsar:pulsar-io-core;4.1.1 +org.apache.pulsar:pulsar-io-data-generator;4.1.1 +org.apache.pulsar:pulsar-io-debezium;4.1.1 +org.apache.pulsar:pulsar-io-debezium-core;4.1.1 +org.apache.pulsar:pulsar-io-debezium-mongodb;4.1.1 +org.apache.pulsar:pulsar-io-debezium-mssql;4.1.1 +org.apache.pulsar:pulsar-io-debezium-mysql;4.1.1 +org.apache.pulsar:pulsar-io-debezium-oracle;4.1.1 +org.apache.pulsar:pulsar-io-debezium-postgres;4.1.1 +org.apache.pulsar:pulsar-io-distribution;4.1.1 +org.apache.pulsar:pulsar-io-docs;4.1.1 +org.apache.pulsar:pulsar-io-dynamodb;4.1.1 +org.apache.pulsar:pulsar-io-elastic-search;4.1.1 +org.apache.pulsar:pulsar-io-file;4.1.1 +org.apache.pulsar:pulsar-io-flume;4.1.1 +org.apache.pulsar:pulsar-io-hbase;4.1.1 +org.apache.pulsar:pulsar-io-hdfs3;4.1.1 +org.apache.pulsar:pulsar-io-http;4.1.1 +org.apache.pulsar:pulsar-io-influxdb;4.1.1 +org.apache.pulsar:pulsar-io-jdbc;4.1.1 +org.apache.pulsar:pulsar-io-jdbc-clickhouse;4.1.1 +org.apache.pulsar:pulsar-io-jdbc-core;4.1.1 +org.apache.pulsar:pulsar-io-jdbc-mariadb;4.1.1 +org.apache.pulsar:pulsar-io-jdbc-openmldb;4.1.1 +org.apache.pulsar:pulsar-io-jdbc-postgres;4.1.1 +org.apache.pulsar:pulsar-io-jdbc-sqlite;4.1.1 +org.apache.pulsar:pulsar-io-kafka;4.1.1 +org.apache.pulsar:pulsar-io-kafka-connect-adaptor;4.1.1 +org.apache.pulsar:pulsar-io-kafka-connect-adaptor-nar;4.1.1 +org.apache.pulsar:pulsar-io-kinesis;4.1.1 +org.apache.pulsar:pulsar-io-mongo;4.1.1 +org.apache.pulsar:pulsar-io-netty;4.1.1 +org.apache.pulsar:pulsar-io-nsq;4.1.1 +org.apache.pulsar:pulsar-io-rabbitmq;4.1.1 +org.apache.pulsar:pulsar-io-redis;4.1.1 +org.apache.pulsar:pulsar-io-solr;4.1.1 +org.apache.pulsar:pulsar-io-twitter;4.1.1 +org.apache.pulsar:pulsar-metadata;4.1.1 +org.apache.pulsar:pulsar-offloader-distribution;4.1.1 +org.apache.pulsar:pulsar-package-bookkeeper-storage;4.1.1 +org.apache.pulsar:pulsar-package-core;4.1.1 +org.apache.pulsar:pulsar-package-filesystem-storage;4.1.1 +org.apache.pulsar:pulsar-package-management;4.1.1 +org.apache.pulsar:pulsar-proxy;4.1.1 +org.apache.pulsar:pulsar-server-distribution;4.1.1 +org.apache.pulsar:pulsar-shell-distribution;4.1.1 +org.apache.pulsar:pulsar-testclient;4.1.1 +org.apache.pulsar:pulsar-transaction-common;4.1.1 +org.apache.pulsar:pulsar-transaction-coordinator;4.1.1 +org.apache.pulsar:pulsar-transaction-parent;4.1.1 +org.apache.pulsar:pulsar-websocket;4.1.1 +org.apache.pulsar:structured-event-log;4.1.1 +org.apache.pulsar:testmocks;4.1.1 +org.apache.pulsar:tiered-storage-file-system;4.1.1 +org.apache.pulsar:tiered-storage-jcloud;4.1.1 +org.apache.pulsar:tiered-storage-parent;4.1.1 +org.apache.tomcat.embed:tomcat-embed-core;11.0.13 +org.apache.tomcat.embed:tomcat-embed-el;11.0.13 +org.apache.tomcat.embed:tomcat-embed-jasper;11.0.13 +org.apache.tomcat.embed:tomcat-embed-websocket;11.0.13 +org.apache.tomcat:tomcat-annotations-api;11.0.13 +org.apache.tomcat:tomcat-jdbc;11.0.13 +org.apache.tomcat:tomcat-jsp-api;11.0.13 +org.aspectj:aspectjrt;1.9.25 +org.aspectj:aspectjtools;1.9.25 +org.aspectj:aspectjweaver;1.9.25 +org.assertj:assertj-bom;3.27.6 +org.assertj:assertj-core;3.27.6 +org.assertj:assertj-guava;3.27.6 +org.awaitility:awaitility;4.3.0 +org.awaitility:awaitility-groovy;4.3.0 +org.awaitility:awaitility-kotlin;4.3.0 +org.awaitility:awaitility-scala;4.3.0 +org.cache2k:cache2k-api;2.6.1.Final +org.cache2k:cache2k-config;2.6.1.Final +org.cache2k:cache2k-core;2.6.1.Final +org.cache2k:cache2k-jcache;2.6.1.Final +org.cache2k:cache2k-micrometer;2.6.1.Final +org.cache2k:cache2k-spring;2.6.1.Final +org.codehaus.janino:commons-compiler;3.1.12 +org.codehaus.janino:commons-compiler-jdk;3.1.12 +org.codehaus.janino:janino;3.1.12 +org.codehaus.mojo:build-helper-maven-plugin;3.6.1 +org.codehaus.mojo:versions-maven-plugin;2.19.1 +org.codehaus.mojo:xml-maven-plugin;1.2.0 +org.crac:crac;1.5.0 +org.cyclonedx:cyclonedx-maven-plugin;2.9.1 +org.eclipse.angus:angus-core;2.0.5 +org.eclipse.angus:angus-mail;2.0.5 +org.eclipse.angus:dsn;2.0.5 +org.eclipse.angus:gimap;2.0.5 +org.eclipse.angus:imap;2.0.5 +org.eclipse.angus:jakarta.mail;2.0.5 +org.eclipse.angus:logging-mailhandler;2.0.5 +org.eclipse.angus:pop3;2.0.5 +org.eclipse.angus:smtp;2.0.5 +org.eclipse.jetty.compression:jetty-compression-brotli;12.1.3 +org.eclipse.jetty.compression:jetty-compression-common;12.1.3 +org.eclipse.jetty.compression:jetty-compression-gzip;12.1.3 +org.eclipse.jetty.compression:jetty-compression-server;12.1.3 +org.eclipse.jetty.compression:jetty-compression-zstandard;12.1.3 +org.eclipse.jetty.demos:jetty-core-demo-handler;12.1.3 +org.eclipse.jetty.ee11.osgi:jetty-ee11-osgi-alpn;12.1.3 +org.eclipse.jetty.ee11.osgi:jetty-ee11-osgi-boot;12.1.3 +org.eclipse.jetty.ee11.osgi:jetty-ee11-osgi-boot-jsp;12.1.3 +org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jakarta-client;12.1.3 +org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jakarta-client-webapp;12.1.3 +org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jakarta-common;12.1.3 +org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jakarta-server;12.1.3 +org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jetty-client-webapp;12.1.3 +org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jetty-server;12.1.3 +org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-servlet;12.1.3 +org.eclipse.jetty.ee11:jetty-ee11-annotations;12.1.3 +org.eclipse.jetty.ee11:jetty-ee11-apache-jsp;12.1.3 +org.eclipse.jetty.ee11:jetty-ee11-bom;12.1.3 +org.eclipse.jetty.ee11:jetty-ee11-cdi;12.1.3 +org.eclipse.jetty.ee11:jetty-ee11-fcgi-proxy;12.1.3 +org.eclipse.jetty.ee11:jetty-ee11-glassfish-jstl;12.1.3 +org.eclipse.jetty.ee11:jetty-ee11-jaspi;12.1.3 +org.eclipse.jetty.ee11:jetty-ee11-jndi;12.1.3 +org.eclipse.jetty.ee11:jetty-ee11-jspc-maven-plugin;12.1.3 +org.eclipse.jetty.ee11:jetty-ee11-maven-plugin;12.1.3 +org.eclipse.jetty.ee11:jetty-ee11-plus;12.1.3 +org.eclipse.jetty.ee11:jetty-ee11-proxy;12.1.3 +org.eclipse.jetty.ee11:jetty-ee11-quickstart;12.1.3 +org.eclipse.jetty.ee11:jetty-ee11-servlet;12.1.3 +org.eclipse.jetty.ee11:jetty-ee11-servlets;12.1.3 +org.eclipse.jetty.ee11:jetty-ee11-webapp;12.1.3 +org.eclipse.jetty.ee:jetty-ee-webapp;12.1.3 +org.eclipse.jetty.fcgi:jetty-fcgi-client;12.1.3 +org.eclipse.jetty.fcgi:jetty-fcgi-proxy;12.1.3 +org.eclipse.jetty.fcgi:jetty-fcgi-server;12.1.3 +org.eclipse.jetty.http2:jetty-http2-client;12.1.3 +org.eclipse.jetty.http2:jetty-http2-client-transport;12.1.3 +org.eclipse.jetty.http2:jetty-http2-common;12.1.3 +org.eclipse.jetty.http2:jetty-http2-hpack;12.1.3 +org.eclipse.jetty.http2:jetty-http2-server;12.1.3 +org.eclipse.jetty.http3:jetty-http3-client;12.1.3 +org.eclipse.jetty.http3:jetty-http3-client-transport;12.1.3 +org.eclipse.jetty.http3:jetty-http3-common;12.1.3 +org.eclipse.jetty.http3:jetty-http3-qpack;12.1.3 +org.eclipse.jetty.http3:jetty-http3-server;12.1.3 +org.eclipse.jetty.quic:jetty-quic-common;12.1.3 +org.eclipse.jetty.quic:jetty-quic-quiche-client;12.1.3 +org.eclipse.jetty.quic:jetty-quic-quiche-common;12.1.3 +org.eclipse.jetty.quic:jetty-quic-quiche-foreign;12.1.3 +org.eclipse.jetty.quic:jetty-quic-quiche-jna;12.1.3 +org.eclipse.jetty.quic:jetty-quic-server;12.1.3 +org.eclipse.jetty.websocket:jetty-websocket-core-client;12.1.3 +org.eclipse.jetty.websocket:jetty-websocket-core-common;12.1.3 +org.eclipse.jetty.websocket:jetty-websocket-core-server;12.1.3 +org.eclipse.jetty.websocket:jetty-websocket-jetty-api;12.1.3 +org.eclipse.jetty.websocket:jetty-websocket-jetty-client;12.1.3 +org.eclipse.jetty.websocket:jetty-websocket-jetty-common;12.1.3 +org.eclipse.jetty.websocket:jetty-websocket-jetty-server;12.1.3 +org.eclipse.jetty:jetty-alpn-client;12.1.3 +org.eclipse.jetty:jetty-alpn-conscrypt-client;12.1.3 +org.eclipse.jetty:jetty-alpn-conscrypt-server;12.1.3 +org.eclipse.jetty:jetty-alpn-java-client;12.1.3 +org.eclipse.jetty:jetty-alpn-java-server;12.1.3 +org.eclipse.jetty:jetty-alpn-server;12.1.3 +org.eclipse.jetty:jetty-bom;12.1.3 +org.eclipse.jetty:jetty-client;12.1.3 +org.eclipse.jetty:jetty-coreapp;12.1.3 +org.eclipse.jetty:jetty-deploy;12.1.3 +org.eclipse.jetty:jetty-ethereum;12.1.3 +org.eclipse.jetty:jetty-http;12.1.3 +org.eclipse.jetty:jetty-http-spi;12.1.3 +org.eclipse.jetty:jetty-http-tools;12.1.3 +org.eclipse.jetty:jetty-io;12.1.3 +org.eclipse.jetty:jetty-jmx;12.1.3 +org.eclipse.jetty:jetty-jndi;12.1.3 +org.eclipse.jetty:jetty-keystore;12.1.3 +org.eclipse.jetty:jetty-openid;12.1.3 +org.eclipse.jetty:jetty-osgi;12.1.3 +org.eclipse.jetty:jetty-plus;12.1.3 +org.eclipse.jetty:jetty-proxy;12.1.3 +org.eclipse.jetty:jetty-reactive-httpclient;4.1.0 +org.eclipse.jetty:jetty-rewrite;12.1.3 +org.eclipse.jetty:jetty-security;12.1.3 +org.eclipse.jetty:jetty-server;12.1.3 +org.eclipse.jetty:jetty-session;12.1.3 +org.eclipse.jetty:jetty-slf4j-impl;12.1.3 +org.eclipse.jetty:jetty-start;12.1.3 +org.eclipse.jetty:jetty-staticapp;12.1.3 +org.eclipse.jetty:jetty-unixdomain-server;12.1.3 +org.eclipse.jetty:jetty-util;12.1.3 +org.eclipse.jetty:jetty-util-ajax;12.1.3 +org.eclipse.jetty:jetty-xml;12.1.3 +org.eclipse:yasson;3.0.4 +org.ehcache:ehcache;3.11.1 +org.ehcache:ehcache-clustered;3.11.1 +org.ehcache:ehcache-transactions;3.11.1 +org.firebirdsql.jdbc:jaybird;6.0.3 +org.flywaydb:flyway-commandline;11.14.1 +org.flywaydb:flyway-core;11.14.1 +org.flywaydb:flyway-database-cassandra;11.14.1 +org.flywaydb:flyway-database-db2;11.14.1 +org.flywaydb:flyway-database-derby;11.14.1 +org.flywaydb:flyway-database-hsqldb;11.14.1 +org.flywaydb:flyway-database-informix;11.14.1 +org.flywaydb:flyway-database-mongodb;11.14.1 +org.flywaydb:flyway-database-oracle;11.14.1 +org.flywaydb:flyway-database-postgresql;11.14.1 +org.flywaydb:flyway-database-redshift;11.14.1 +org.flywaydb:flyway-database-saphana;11.14.1 +org.flywaydb:flyway-database-snowflake;11.14.1 +org.flywaydb:flyway-database-sybasease;11.14.1 +org.flywaydb:flyway-firebird;11.14.1 +org.flywaydb:flyway-gcp-bigquery;11.14.1 +org.flywaydb:flyway-gcp-spanner;11.14.1 +org.flywaydb:flyway-maven-plugin;11.14.1 +org.flywaydb:flyway-mysql;11.14.1 +org.flywaydb:flyway-singlestore;11.14.1 +org.flywaydb:flyway-sqlserver;11.14.1 +org.freemarker:freemarker;2.3.34 +org.glassfish.jaxb:codemodel;4.0.6 +org.glassfish.jaxb:jaxb-core;4.0.6 +org.glassfish.jaxb:jaxb-jxc;4.0.6 +org.glassfish.jaxb:jaxb-runtime;4.0.6 +org.glassfish.jaxb:jaxb-xjc;4.0.6 +org.glassfish.jaxb:txw2;4.0.6 +org.glassfish.jaxb:xsom;4.0.6 +org.glassfish.jersey.connectors:jersey-apache5-connector;4.0.0 +org.glassfish.jersey.connectors:jersey-grizzly-connector;4.0.0 +org.glassfish.jersey.connectors:jersey-helidon-connector;4.0.0 +org.glassfish.jersey.connectors:jersey-jdk-connector;4.0.0 +org.glassfish.jersey.connectors:jersey-jetty-connector;4.0.0 +org.glassfish.jersey.connectors:jersey-jetty-http2-connector;4.0.0 +org.glassfish.jersey.connectors:jersey-jnh-connector;4.0.0 +org.glassfish.jersey.connectors:jersey-netty-connector;4.0.0 +org.glassfish.jersey.containers.glassfish:jersey-gf-ejb;4.0.0 +org.glassfish.jersey.containers:jersey-container-grizzly2-http;4.0.0 +org.glassfish.jersey.containers:jersey-container-grizzly2-servlet;4.0.0 +org.glassfish.jersey.containers:jersey-container-helidon-http;4.0.0 +org.glassfish.jersey.containers:jersey-container-jdk-http;4.0.0 +org.glassfish.jersey.containers:jersey-container-jetty-http;4.0.0 +org.glassfish.jersey.containers:jersey-container-jetty-http2;4.0.0 +org.glassfish.jersey.containers:jersey-container-jetty-servlet;4.0.0 +org.glassfish.jersey.containers:jersey-container-netty-http;4.0.0 +org.glassfish.jersey.containers:jersey-container-servlet;4.0.0 +org.glassfish.jersey.core:jersey-client;4.0.0 +org.glassfish.jersey.core:jersey-common;4.0.0 +org.glassfish.jersey.core:jersey-server;4.0.0 +org.glassfish.jersey.ext.cdi:jersey-cdi-rs-inject;4.0.0 +org.glassfish.jersey.ext.cdi:jersey-cdi1x;4.0.0 +org.glassfish.jersey.ext.cdi:jersey-cdi1x-ban-custom-hk2-binding;4.0.0 +org.glassfish.jersey.ext.cdi:jersey-cdi1x-servlet;4.0.0 +org.glassfish.jersey.ext.cdi:jersey-cdi1x-transaction;4.0.0 +org.glassfish.jersey.ext.cdi:jersey-cdi1x-validation;4.0.0 +org.glassfish.jersey.ext.cdi:jersey-weld2-se;4.0.0 +org.glassfish.jersey.ext.microprofile:jersey-mp-config;4.0.0 +org.glassfish.jersey.ext.microprofile:jersey-mp-rest-client;4.0.0 +org.glassfish.jersey.ext.rx:jersey-rx-client-guava;4.0.0 +org.glassfish.jersey.ext.rx:jersey-rx-client-rxjava;4.0.0 +org.glassfish.jersey.ext.rx:jersey-rx-client-rxjava2;4.0.0 +org.glassfish.jersey.ext:jersey-bean-validation;4.0.0 +org.glassfish.jersey.ext:jersey-constants;4.0.0 +org.glassfish.jersey.ext:jersey-declarative-linking;4.0.0 +org.glassfish.jersey.ext:jersey-entity-filtering;4.0.0 +org.glassfish.jersey.ext:jersey-metainf-services;4.0.0 +org.glassfish.jersey.ext:jersey-micrometer;4.0.0 +org.glassfish.jersey.ext:jersey-mvc;4.0.0 +org.glassfish.jersey.ext:jersey-mvc-bean-validation;4.0.0 +org.glassfish.jersey.ext:jersey-mvc-freemarker;4.0.0 +org.glassfish.jersey.ext:jersey-mvc-jsp;4.0.0 +org.glassfish.jersey.ext:jersey-mvc-mustache;4.0.0 +org.glassfish.jersey.ext:jersey-proxy-client;4.0.0 +org.glassfish.jersey.ext:jersey-spring6;4.0.0 +org.glassfish.jersey.ext:jersey-wadl-doclet;4.0.0 +org.glassfish.jersey.inject:jersey-cdi2-se;4.0.0 +org.glassfish.jersey.inject:jersey-hk2;4.0.0 +org.glassfish.jersey.media:jersey-media-jaxb;4.0.0 +org.glassfish.jersey.media:jersey-media-json-binding;4.0.0 +org.glassfish.jersey.media:jersey-media-json-gson;4.0.0 +org.glassfish.jersey.media:jersey-media-json-jackson;4.0.0 +org.glassfish.jersey.media:jersey-media-json-jettison;4.0.0 +org.glassfish.jersey.media:jersey-media-json-processing;4.0.0 +org.glassfish.jersey.media:jersey-media-kryo;4.0.0 +org.glassfish.jersey.media:jersey-media-moxy;4.0.0 +org.glassfish.jersey.media:jersey-media-multipart;4.0.0 +org.glassfish.jersey.media:jersey-media-sse;4.0.0 +org.glassfish.jersey.security:oauth1-client;4.0.0 +org.glassfish.jersey.security:oauth1-server;4.0.0 +org.glassfish.jersey.security:oauth1-signature;4.0.0 +org.glassfish.jersey.security:oauth2-client;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-bundle;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-external;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-helidon;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-inmemory;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jdk-http;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty-http2;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-netty;4.0.0 +org.glassfish.jersey.test-framework:jersey-test-framework-core;4.0.0 +org.glassfish.jersey.test-framework:jersey-test-framework-util;4.0.0 +org.glassfish.jersey:jersey-bom;4.0.0 +org.glassfish.web:jakarta.servlet.jsp.jstl;3.0.1 +org.graalvm.buildtools:native-maven-plugin;0.11.2 +org.hamcrest:hamcrest;3.0 +org.hamcrest:hamcrest-core;3.0 +org.hamcrest:hamcrest-library;3.0 +org.hibernate.orm:hibernate-agroal;7.1.6.Final +org.hibernate.orm:hibernate-ant;7.1.6.Final +org.hibernate.orm:hibernate-c3p0;7.1.6.Final +org.hibernate.orm:hibernate-community-dialects;7.1.6.Final +org.hibernate.orm:hibernate-core;7.1.6.Final +org.hibernate.orm:hibernate-envers;7.1.6.Final +org.hibernate.orm:hibernate-graalvm;7.1.6.Final +org.hibernate.orm:hibernate-hikaricp;7.1.6.Final +org.hibernate.orm:hibernate-jcache;7.1.6.Final +org.hibernate.orm:hibernate-micrometer;7.1.6.Final +org.hibernate.orm:hibernate-processor;7.1.6.Final +org.hibernate.orm:hibernate-scan-jandex;7.1.6.Final +org.hibernate.orm:hibernate-spatial;7.1.6.Final +org.hibernate.orm:hibernate-testing;7.1.6.Final +org.hibernate.orm:hibernate-vector;7.1.6.Final +org.hibernate.validator:hibernate-validator;9.0.1.Final +org.hibernate.validator:hibernate-validator-annotation-processor;9.0.1.Final +org.hsqldb:hsqldb;2.7.3 +org.htmlunit:htmlunit;4.17.0 +org.infinispan.protostream:protostream;5.0.13.Final +org.infinispan.protostream:protostream-processor;5.0.13.Final +org.infinispan.protostream:protostream-types;5.0.13.Final +org.infinispan:infinispan-anchored-keys;15.2.6.Final +org.infinispan:infinispan-api;15.2.6.Final +org.infinispan:infinispan-bom;15.2.6.Final +org.infinispan:infinispan-cachestore-jdbc;15.2.6.Final +org.infinispan:infinispan-cachestore-jdbc-common;15.2.6.Final +org.infinispan:infinispan-cachestore-remote;15.2.6.Final +org.infinispan:infinispan-cachestore-rocksdb;15.2.6.Final +org.infinispan:infinispan-cachestore-sql;15.2.6.Final +org.infinispan:infinispan-cdi-common;15.2.6.Final +org.infinispan:infinispan-cdi-embedded;15.2.6.Final +org.infinispan:infinispan-cdi-remote;15.2.6.Final +org.infinispan:infinispan-checkstyle;15.2.6.Final +org.infinispan:infinispan-cli-client;15.2.6.Final +org.infinispan:infinispan-client-hotrod;15.2.6.Final +org.infinispan:infinispan-client-hotrod-legacy;15.2.6.Final +org.infinispan:infinispan-client-rest;15.2.6.Final +org.infinispan:infinispan-clustered-counter;15.2.6.Final +org.infinispan:infinispan-clustered-lock;15.2.6.Final +org.infinispan:infinispan-commons;15.2.6.Final +org.infinispan:infinispan-commons-graalvm;15.2.6.Final +org.infinispan:infinispan-commons-spi;15.2.6.Final +org.infinispan:infinispan-commons-test;15.2.6.Final +org.infinispan:infinispan-component-annotations;15.2.6.Final +org.infinispan:infinispan-component-processor;15.2.6.Final +org.infinispan:infinispan-console;15.2.1.Final +org.infinispan:infinispan-core;15.2.6.Final +org.infinispan:infinispan-core-graalvm;15.2.6.Final +org.infinispan:infinispan-counter-api;15.2.6.Final +org.infinispan:infinispan-hibernate-cache-commons;15.2.6.Final +org.infinispan:infinispan-hibernate-cache-spi;15.2.6.Final +org.infinispan:infinispan-hibernate-cache-v62;15.2.6.Final +org.infinispan:infinispan-jboss-marshalling;15.2.6.Final +org.infinispan:infinispan-jcache;15.2.6.Final +org.infinispan:infinispan-jcache-commons;15.2.6.Final +org.infinispan:infinispan-jcache-remote;15.2.6.Final +org.infinispan:infinispan-key-value-store-client;15.2.6.Final +org.infinispan:infinispan-logging-annotations;15.2.6.Final +org.infinispan:infinispan-logging-processor;15.2.6.Final +org.infinispan:infinispan-multimap;15.2.6.Final +org.infinispan:infinispan-objectfilter;15.2.6.Final +org.infinispan:infinispan-query;15.2.6.Final +org.infinispan:infinispan-query-core;15.2.6.Final +org.infinispan:infinispan-query-dsl;15.2.6.Final +org.infinispan:infinispan-remote-query-client;15.2.6.Final +org.infinispan:infinispan-remote-query-server;15.2.6.Final +org.infinispan:infinispan-scripting;15.2.6.Final +org.infinispan:infinispan-server-core;15.2.6.Final +org.infinispan:infinispan-server-hotrod;15.2.6.Final +org.infinispan:infinispan-server-memcached;15.2.6.Final +org.infinispan:infinispan-server-resp;15.2.6.Final +org.infinispan:infinispan-server-rest;15.2.6.Final +org.infinispan:infinispan-server-router;15.2.6.Final +org.infinispan:infinispan-server-runtime;15.2.6.Final +org.infinispan:infinispan-server-testdriver-core;15.2.6.Final +org.infinispan:infinispan-server-testdriver-junit4;15.2.6.Final +org.infinispan:infinispan-server-testdriver-junit5;15.2.6.Final +org.infinispan:infinispan-spring-boot3-starter-embedded;15.2.6.Final +org.infinispan:infinispan-spring-boot3-starter-remote;15.2.6.Final +org.infinispan:infinispan-spring6-common;15.2.6.Final +org.infinispan:infinispan-spring6-embedded;15.2.6.Final +org.infinispan:infinispan-spring6-remote;15.2.6.Final +org.infinispan:infinispan-tasks;15.2.6.Final +org.infinispan:infinispan-tasks-api;15.2.6.Final +org.infinispan:infinispan-tools;15.2.6.Final +org.influxdb:influxdb-java;2.25 +org.jboss.logging:jboss-logging;3.6.1.Final +org.jdom:jdom2;2.0.6.1 +org.jetbrains.kotlin:kotlin-bom;2.2.21 +org.jetbrains.kotlin:kotlin-compiler;2.2.21 +org.jetbrains.kotlin:kotlin-compiler-embeddable;2.2.21 +org.jetbrains.kotlin:kotlin-daemon-client;2.2.21 +org.jetbrains.kotlin:kotlin-main-kts;2.2.21 +org.jetbrains.kotlin:kotlin-maven-plugin;2.2.21 +org.jetbrains.kotlin:kotlin-osgi-bundle;2.2.21 +org.jetbrains.kotlin:kotlin-reflect;2.2.21 +org.jetbrains.kotlin:kotlin-script-runtime;2.2.21 +org.jetbrains.kotlin:kotlin-scripting-common;2.2.21 +org.jetbrains.kotlin:kotlin-scripting-ide-services;2.2.21 +org.jetbrains.kotlin:kotlin-scripting-jvm;2.2.21 +org.jetbrains.kotlin:kotlin-scripting-jvm-host;2.2.21 +org.jetbrains.kotlin:kotlin-stdlib;2.2.21 +org.jetbrains.kotlin:kotlin-stdlib-common;2.2.21 +org.jetbrains.kotlin:kotlin-stdlib-jdk7;2.2.21 +org.jetbrains.kotlin:kotlin-stdlib-jdk8;2.2.21 +org.jetbrains.kotlin:kotlin-stdlib-js;2.2.21 +org.jetbrains.kotlin:kotlin-test;2.2.21 +org.jetbrains.kotlin:kotlin-test-annotations-common;2.2.21 +org.jetbrains.kotlin:kotlin-test-common;2.2.21 +org.jetbrains.kotlin:kotlin-test-js;2.2.21 +org.jetbrains.kotlin:kotlin-test-junit;2.2.21 +org.jetbrains.kotlin:kotlin-test-junit5;2.2.21 +org.jetbrains.kotlin:kotlin-test-testng;2.2.21 +org.jetbrains.kotlinx:kotlinx-coroutines-android;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-bom;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-core;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-debug;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-guava;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-javafx;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-jdk8;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-jdk9;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-play-services;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-reactive;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-reactor;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-rx2;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-rx3;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-slf4j;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-swing;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-test;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-test-jvm;1.10.2 +org.jetbrains.kotlinx:kotlinx-serialization-bom;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-cbor;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-cbor-jvm;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-core;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-core-jvm;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-hocon;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-json;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-json-io;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-json-io-jvm;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-json-jvm;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-json-okio;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-json-okio-jvm;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-properties;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-properties-jvm;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-protobuf;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-protobuf-jvm;1.9.0 +org.jooq:jooq;3.19.27 +org.jooq:jooq-bom;3.19.27 +org.jooq:jooq-checker;3.19.27 +org.jooq:jooq-codegen;3.19.27 +org.jooq:jooq-codegen-gradle;3.19.27 +org.jooq:jooq-codegen-maven;3.19.27 +org.jooq:jooq-jackson-extensions;3.19.27 +org.jooq:jooq-kotlin;3.19.27 +org.jooq:jooq-kotlin-coroutines;3.19.27 +org.jooq:jooq-meta;3.19.27 +org.jooq:jooq-meta-extensions;3.19.27 +org.jooq:jooq-meta-extensions-hibernate;3.19.27 +org.jooq:jooq-meta-extensions-liquibase;3.19.27 +org.jooq:jooq-meta-kotlin;3.19.27 +org.jooq:jooq-migrations;3.19.27 +org.jooq:jooq-migrations-maven;3.19.27 +org.jooq:jooq-postgres-extensions;3.19.27 +org.jooq:jooq-scala_2.13;3.19.27 +org.jooq:jooq-xtend;3.19.27 +org.jspecify:jspecify;1.0.0 +org.junit.jupiter:junit-jupiter;6.0.1 +org.junit.jupiter:junit-jupiter-api;6.0.1 +org.junit.jupiter:junit-jupiter-engine;6.0.1 +org.junit.jupiter:junit-jupiter-migrationsupport;6.0.1 +org.junit.jupiter:junit-jupiter-params;6.0.1 +org.junit.platform:junit-platform-commons;6.0.1 +org.junit.platform:junit-platform-console;6.0.1 +org.junit.platform:junit-platform-engine;6.0.1 +org.junit.platform:junit-platform-launcher;6.0.1 +org.junit.platform:junit-platform-reporting;6.0.1 +org.junit.platform:junit-platform-suite;6.0.1 +org.junit.platform:junit-platform-suite-api;6.0.1 +org.junit.platform:junit-platform-suite-engine;6.0.1 +org.junit.platform:junit-platform-testkit;6.0.1 +org.junit.vintage:junit-vintage-engine;6.0.1 +org.junit:junit-bom;6.0.1 +org.liquibase:liquibase-cdi;5.0.1 +org.liquibase:liquibase-core;5.0.1 +org.liquibase:liquibase-maven-plugin;5.0.1 +org.mariadb.jdbc:mariadb-java-client;3.5.6 +org.mariadb:r2dbc-mariadb;1.3.0 +org.messaginghub:pooled-jms;3.1.7 +org.mockito:mockito-android;5.20.0 +org.mockito:mockito-bom;5.20.0 +org.mockito:mockito-core;5.20.0 +org.mockito:mockito-errorprone;5.20.0 +org.mockito:mockito-junit-jupiter;5.20.0 +org.mockito:mockito-proxy;5.20.0 +org.mockito:mockito-subclass;5.20.0 +org.mongodb.scala:mongo-scala-bson_2.11;5.6.1 +org.mongodb.scala:mongo-scala-bson_2.12;5.6.1 +org.mongodb.scala:mongo-scala-bson_2.13;5.6.1 +org.mongodb.scala:mongo-scala-driver_2.11;5.6.1 +org.mongodb.scala:mongo-scala-driver_2.12;5.6.1 +org.mongodb.scala:mongo-scala-driver_2.13;5.6.1 +org.mongodb:bson;5.6.1 +org.mongodb:bson-kotlin;5.6.1 +org.mongodb:bson-kotlinx;5.6.1 +org.mongodb:bson-record-codec;5.6.1 +org.mongodb:mongodb-crypt;5.6.1 +org.mongodb:mongodb-driver-bom;5.6.1 +org.mongodb:mongodb-driver-core;5.6.1 +org.mongodb:mongodb-driver-kotlin-coroutine;5.6.1 +org.mongodb:mongodb-driver-kotlin-extensions;5.6.1 +org.mongodb:mongodb-driver-kotlin-sync;5.6.1 +org.mongodb:mongodb-driver-reactivestreams;5.6.1 +org.mongodb:mongodb-driver-sync;5.6.1 +org.neo4j.bolt:neo4j-bolt-connection;10.0.1 +org.neo4j.bolt:neo4j-bolt-connection-bom;10.0.1 +org.neo4j.bolt:neo4j-bolt-connection-netty;10.0.1 +org.neo4j.bolt:neo4j-bolt-connection-pooled;10.0.1 +org.neo4j.bolt:neo4j-bolt-connection-query-api;10.0.1 +org.neo4j.bolt:neo4j-bolt-connection-routed;10.0.1 +org.neo4j.driver:neo4j-java-driver;6.0.1 +org.neo4j.driver:neo4j-java-driver-all;6.0.1 +org.neo4j.driver:neo4j-java-driver-bom;6.0.1 +org.neo4j.driver:neo4j-java-driver-observation-metrics;6.0.1 +org.neo4j.driver:neo4j-java-driver-observation-micrometer;6.0.1 +org.postgresql:postgresql;42.7.8 +org.postgresql:r2dbc-postgresql;1.1.1.RELEASE +org.projectlombok:lombok;1.18.42 +org.quartz-scheduler:quartz;2.5.1 +org.quartz-scheduler:quartz-jobs;2.5.1 +org.reactivestreams:reactive-streams;1.0.4 +org.seleniumhq.selenium:htmlunit3-driver;4.36.1 +org.seleniumhq.selenium:selenium-api;4.37.0 +org.seleniumhq.selenium:selenium-bom;4.37.0 +org.seleniumhq.selenium:selenium-chrome-driver;4.37.0 +org.seleniumhq.selenium:selenium-chromium-driver;4.37.0 +org.seleniumhq.selenium:selenium-devtools-v139;4.37.0 +org.seleniumhq.selenium:selenium-devtools-v140;4.37.0 +org.seleniumhq.selenium:selenium-devtools-v141;4.37.0 +org.seleniumhq.selenium:selenium-edge-driver;4.37.0 +org.seleniumhq.selenium:selenium-firefox-driver;4.37.0 +org.seleniumhq.selenium:selenium-grid;4.37.0 +org.seleniumhq.selenium:selenium-http;4.37.0 +org.seleniumhq.selenium:selenium-ie-driver;4.37.0 +org.seleniumhq.selenium:selenium-java;4.37.0 +org.seleniumhq.selenium:selenium-json;4.37.0 +org.seleniumhq.selenium:selenium-manager;4.37.0 +org.seleniumhq.selenium:selenium-remote-driver;4.37.0 +org.seleniumhq.selenium:selenium-safari-driver;4.37.0 +org.seleniumhq.selenium:selenium-session-map-jdbc;4.37.0 +org.seleniumhq.selenium:selenium-session-map-redis;4.37.0 +org.seleniumhq.selenium:selenium-support;4.37.0 +org.skyscreamer:jsonassert;1.5.3 +org.slf4j:jcl-over-slf4j;2.0.17 +org.slf4j:jul-to-slf4j;2.0.17 +org.slf4j:log4j-over-slf4j;2.0.17 +org.slf4j:slf4j-api;2.0.17 +org.slf4j:slf4j-ext;2.0.17 +org.slf4j:slf4j-jdk-platform-logging;2.0.17 +org.slf4j:slf4j-jdk14;2.0.17 +org.slf4j:slf4j-log4j12;2.0.17 +org.slf4j:slf4j-nop;2.0.17 +org.slf4j:slf4j-reload4j;2.0.17 +org.slf4j:slf4j-simple;2.0.17 +org.springframework.amqp:spring-amqp;4.0.0-RC1 +org.springframework.amqp:spring-amqp-bom;4.0.0-RC1 +org.springframework.amqp:spring-rabbit;4.0.0-RC1 +org.springframework.amqp:spring-rabbit-junit;4.0.0-RC1 +org.springframework.amqp:spring-rabbit-stream;4.0.0-RC1 +org.springframework.amqp:spring-rabbit-test;4.0.0-RC1 +org.springframework.amqp:spring-rabbitmq-client;4.0.0-RC1 +org.springframework.batch:spring-batch-bom;6.0.0-RC2 +org.springframework.boot:spring-boot;4.0.0-RC2 +org.springframework.boot:spring-boot-activemq;4.0.0-RC2 +org.springframework.boot:spring-boot-actuator;4.0.0-RC2 +org.springframework.boot:spring-boot-actuator-autoconfigure;4.0.0-RC2 +org.springframework.boot:spring-boot-amqp;4.0.0-RC2 +org.springframework.boot:spring-boot-artemis;4.0.0-RC2 +org.springframework.boot:spring-boot-autoconfigure;4.0.0-RC2 +org.springframework.boot:spring-boot-autoconfigure-classic;4.0.0-RC2 +org.springframework.boot:spring-boot-autoconfigure-classic-modules;4.0.0-RC2 +org.springframework.boot:spring-boot-autoconfigure-processor;4.0.0-RC2 +org.springframework.boot:spring-boot-batch;4.0.0-RC2 +org.springframework.boot:spring-boot-batch-jdbc;4.0.0-RC2 +org.springframework.boot:spring-boot-buildpack-platform;4.0.0-RC2 +org.springframework.boot:spring-boot-cache;4.0.0-RC2 +org.springframework.boot:spring-boot-cache-test;4.0.0-RC2 +org.springframework.boot:spring-boot-cassandra;4.0.0-RC2 +org.springframework.boot:spring-boot-cloudfoundry;4.0.0-RC2 +org.springframework.boot:spring-boot-configuration-metadata;4.0.0-RC2 +org.springframework.boot:spring-boot-configuration-processor;4.0.0-RC2 +org.springframework.boot:spring-boot-couchbase;4.0.0-RC2 +org.springframework.boot:spring-boot-data-cassandra;4.0.0-RC2 +org.springframework.boot:spring-boot-data-cassandra-test;4.0.0-RC2 +org.springframework.boot:spring-boot-data-commons;4.0.0-RC2 +org.springframework.boot:spring-boot-data-couchbase;4.0.0-RC2 +org.springframework.boot:spring-boot-data-couchbase-test;4.0.0-RC2 +org.springframework.boot:spring-boot-data-elasticsearch;4.0.0-RC2 +org.springframework.boot:spring-boot-data-elasticsearch-test;4.0.0-RC2 +org.springframework.boot:spring-boot-data-jdbc;4.0.0-RC2 +org.springframework.boot:spring-boot-data-jdbc-test;4.0.0-RC2 +org.springframework.boot:spring-boot-data-jpa;4.0.0-RC2 +org.springframework.boot:spring-boot-data-jpa-test;4.0.0-RC2 +org.springframework.boot:spring-boot-data-ldap;4.0.0-RC2 +org.springframework.boot:spring-boot-data-ldap-test;4.0.0-RC2 +org.springframework.boot:spring-boot-data-mongodb;4.0.0-RC2 +org.springframework.boot:spring-boot-data-mongodb-test;4.0.0-RC2 +org.springframework.boot:spring-boot-data-neo4j;4.0.0-RC2 +org.springframework.boot:spring-boot-data-neo4j-test;4.0.0-RC2 +org.springframework.boot:spring-boot-data-r2dbc;4.0.0-RC2 +org.springframework.boot:spring-boot-data-r2dbc-test;4.0.0-RC2 +org.springframework.boot:spring-boot-data-redis;4.0.0-RC2 +org.springframework.boot:spring-boot-data-redis-test;4.0.0-RC2 +org.springframework.boot:spring-boot-data-rest;4.0.0-RC2 +org.springframework.boot:spring-boot-dependencies;4.0.0-RC2 +org.springframework.boot:spring-boot-devtools;4.0.0-RC2 +org.springframework.boot:spring-boot-docker-compose;4.0.0-RC2 +org.springframework.boot:spring-boot-elasticsearch;4.0.0-RC2 +org.springframework.boot:spring-boot-flyway;4.0.0-RC2 +org.springframework.boot:spring-boot-freemarker;4.0.0-RC2 +org.springframework.boot:spring-boot-graphql;4.0.0-RC2 +org.springframework.boot:spring-boot-graphql-test;4.0.0-RC2 +org.springframework.boot:spring-boot-groovy-templates;4.0.0-RC2 +org.springframework.boot:spring-boot-gson;4.0.0-RC2 +org.springframework.boot:spring-boot-h2console;4.0.0-RC2 +org.springframework.boot:spring-boot-hateoas;4.0.0-RC2 +org.springframework.boot:spring-boot-hazelcast;4.0.0-RC2 +org.springframework.boot:spring-boot-health;4.0.0-RC2 +org.springframework.boot:spring-boot-hibernate;4.0.0-RC2 +org.springframework.boot:spring-boot-http-client;4.0.0-RC2 +org.springframework.boot:spring-boot-http-codec;4.0.0-RC2 +org.springframework.boot:spring-boot-http-converter;4.0.0-RC2 +org.springframework.boot:spring-boot-integration;4.0.0-RC2 +org.springframework.boot:spring-boot-jackson;4.0.0-RC2 +org.springframework.boot:spring-boot-jackson2;4.0.0-RC2 +org.springframework.boot:spring-boot-jarmode-tools;4.0.0-RC2 +org.springframework.boot:spring-boot-jdbc;4.0.0-RC2 +org.springframework.boot:spring-boot-jdbc-test;4.0.0-RC2 +org.springframework.boot:spring-boot-jersey;4.0.0-RC2 +org.springframework.boot:spring-boot-jetty;4.0.0-RC2 +org.springframework.boot:spring-boot-jetty-runtime;4.0.0-RC2 +org.springframework.boot:spring-boot-jms;4.0.0-RC2 +org.springframework.boot:spring-boot-jooq;4.0.0-RC2 +org.springframework.boot:spring-boot-jooq-test;4.0.0-RC2 +org.springframework.boot:spring-boot-jpa;4.0.0-RC2 +org.springframework.boot:spring-boot-jpa-test;4.0.0-RC2 +org.springframework.boot:spring-boot-jsonb;4.0.0-RC2 +org.springframework.boot:spring-boot-kafka;4.0.0-RC2 +org.springframework.boot:spring-boot-kotlin-serialization;4.0.0-RC2 +org.springframework.boot:spring-boot-ldap;4.0.0-RC2 +org.springframework.boot:spring-boot-liquibase;4.0.0-RC2 +org.springframework.boot:spring-boot-loader;4.0.0-RC2 +org.springframework.boot:spring-boot-mail;4.0.0-RC2 +org.springframework.boot:spring-boot-maven-plugin;4.0.0-RC2 +org.springframework.boot:spring-boot-micrometer-metrics;4.0.0-RC2 +org.springframework.boot:spring-boot-micrometer-metrics-test;4.0.0-RC2 +org.springframework.boot:spring-boot-micrometer-observation;4.0.0-RC2 +org.springframework.boot:spring-boot-micrometer-tracing;4.0.0-RC2 +org.springframework.boot:spring-boot-micrometer-tracing-brave;4.0.0-RC2 +org.springframework.boot:spring-boot-micrometer-tracing-opentelemetry;4.0.0-RC2 +org.springframework.boot:spring-boot-micrometer-tracing-test;4.0.0-RC2 +org.springframework.boot:spring-boot-mongodb;4.0.0-RC2 +org.springframework.boot:spring-boot-mustache;4.0.0-RC2 +org.springframework.boot:spring-boot-neo4j;4.0.0-RC2 +org.springframework.boot:spring-boot-netty;4.0.0-RC2 +org.springframework.boot:spring-boot-opentelemetry;4.0.0-RC2 +org.springframework.boot:spring-boot-persistence;4.0.0-RC2 +org.springframework.boot:spring-boot-properties-migrator;4.0.0-RC2 +org.springframework.boot:spring-boot-pulsar;4.0.0-RC2 +org.springframework.boot:spring-boot-quartz;4.0.0-RC2 +org.springframework.boot:spring-boot-r2dbc;4.0.0-RC2 +org.springframework.boot:spring-boot-reactor;4.0.0-RC2 +org.springframework.boot:spring-boot-reactor-netty;4.0.0-RC2 +org.springframework.boot:spring-boot-restclient;4.0.0-RC2 +org.springframework.boot:spring-boot-restclient-test;4.0.0-RC2 +org.springframework.boot:spring-boot-restdocs;4.0.0-RC2 +org.springframework.boot:spring-boot-resttestclient;4.0.0-RC2 +org.springframework.boot:spring-boot-rsocket;4.0.0-RC2 +org.springframework.boot:spring-boot-rsocket-test;4.0.0-RC2 +org.springframework.boot:spring-boot-security;4.0.0-RC2 +org.springframework.boot:spring-boot-security-oauth2-authorization-server;4.0.0-RC2 +org.springframework.boot:spring-boot-security-oauth2-client;4.0.0-RC2 +org.springframework.boot:spring-boot-security-oauth2-resource-server;4.0.0-RC2 +org.springframework.boot:spring-boot-security-saml2;4.0.0-RC2 +org.springframework.boot:spring-boot-security-test;4.0.0-RC2 +org.springframework.boot:spring-boot-sendgrid;4.0.0-RC2 +org.springframework.boot:spring-boot-servlet;4.0.0-RC2 +org.springframework.boot:spring-boot-session;4.0.0-RC2 +org.springframework.boot:spring-boot-session-data-redis;4.0.0-RC2 +org.springframework.boot:spring-boot-session-jdbc;4.0.0-RC2 +org.springframework.boot:spring-boot-sql;4.0.0-RC2 +org.springframework.boot:spring-boot-starter;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-activemq;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-activemq-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-actuator;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-actuator-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-amqp;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-amqp-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-artemis;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-artemis-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-aspectj;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-aspectj-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-batch;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-batch-jdbc;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-batch-jdbc-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-batch-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-cache;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-cache-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-cassandra;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-cassandra-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-classic;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-cloudfoundry;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-cloudfoundry-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-couchbase;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-couchbase-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-cassandra;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-cassandra-reactive;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-cassandra-reactive-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-cassandra-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-couchbase;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-couchbase-reactive;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-couchbase-reactive-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-couchbase-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-elasticsearch;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-elasticsearch-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-jdbc;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-jdbc-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-jpa;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-jpa-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-ldap;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-ldap-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-mongodb;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-mongodb-reactive;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-mongodb-reactive-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-mongodb-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-neo4j;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-neo4j-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-r2dbc;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-r2dbc-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-redis;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-redis-reactive;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-redis-reactive-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-redis-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-rest;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-data-rest-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-elasticsearch;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-elasticsearch-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-flyway;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-flyway-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-freemarker;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-freemarker-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-graphql;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-graphql-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-groovy-templates;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-groovy-templates-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-gson;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-gson-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-hateoas;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-hateoas-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-hazelcast;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-hazelcast-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-integration;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-integration-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-jackson;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-jackson-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-jdbc;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-jdbc-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-jersey;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-jersey-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-jetty;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-jms;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-jms-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-jooq;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-jooq-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-json;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-jsonb;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-jsonb-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-kafka;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-kafka-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-kotlin-serialization;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-kotlin-serialization-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-ldap;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-ldap-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-liquibase;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-liquibase-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-log4j2;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-logback;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-logging;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-mail;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-mail-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-mongodb;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-mongodb-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-mustache;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-mustache-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-neo4j;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-neo4j-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-oauth2-authorization-server;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-oauth2-client;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-oauth2-resource-server;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-opentelemetry;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-opentelemetry-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-parent;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-pulsar;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-pulsar-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-quartz;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-quartz-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-r2dbc;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-r2dbc-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-reactor-netty;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-restclient;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-restclient-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-rsocket;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-rsocket-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-security;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-security-oauth2-authorization-server;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-security-oauth2-authorization-server-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-security-oauth2-client;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-security-oauth2-client-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-security-oauth2-resource-server;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-security-oauth2-resource-server-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-security-saml2;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-security-saml2-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-security-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-sendgrid;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-sendgrid-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-session-data-redis;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-session-data-redis-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-session-jdbc;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-session-jdbc-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-test-classic;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-thymeleaf;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-thymeleaf-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-tomcat;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-validation;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-validation-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-web;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-web-services;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-webclient;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-webclient-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-webflux;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-webflux-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-webmvc;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-webmvc-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-webservices;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-webservices-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-websocket;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-websocket-test;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-zipkin;4.0.0-RC2 +org.springframework.boot:spring-boot-starter-zipkin-test;4.0.0-RC2 +org.springframework.boot:spring-boot-test;4.0.0-RC2 +org.springframework.boot:spring-boot-test-autoconfigure;4.0.0-RC2 +org.springframework.boot:spring-boot-test-classic-modules;4.0.0-RC2 +org.springframework.boot:spring-boot-testcontainers;4.0.0-RC2 +org.springframework.boot:spring-boot-thymeleaf;4.0.0-RC2 +org.springframework.boot:spring-boot-tomcat;4.0.0-RC2 +org.springframework.boot:spring-boot-tomcat-runtime;4.0.0-RC2 +org.springframework.boot:spring-boot-transaction;4.0.0-RC2 +org.springframework.boot:spring-boot-validation;4.0.0-RC2 +org.springframework.boot:spring-boot-web-server;4.0.0-RC2 +org.springframework.boot:spring-boot-webclient;4.0.0-RC2 +org.springframework.boot:spring-boot-webclient-test;4.0.0-RC2 +org.springframework.boot:spring-boot-webflux;4.0.0-RC2 +org.springframework.boot:spring-boot-webflux-test;4.0.0-RC2 +org.springframework.boot:spring-boot-webmvc;4.0.0-RC2 +org.springframework.boot:spring-boot-webmvc-test;4.0.0-RC2 +org.springframework.boot:spring-boot-webservices;4.0.0-RC2 +org.springframework.boot:spring-boot-webservices-test;4.0.0-RC2 +org.springframework.boot:spring-boot-websocket;4.0.0-RC2 +org.springframework.boot:spring-boot-webtestclient;4.0.0-RC2 +org.springframework.boot:spring-boot-zipkin;4.0.0-RC2 +org.springframework.cloud:spring-cloud-dependencies;2025.1.0-M4 +org.springframework.data:spring-data-bom;2025.1.0-RC2 +org.springframework.graphql:spring-graphql;2.0.0-RC2 +org.springframework.graphql:spring-graphql-test;2.0.0-RC2 +org.springframework.hateoas:spring-hateoas;3.0.0-RC2 +org.springframework.integration:spring-integration-amqp;7.0.0-RC2 +org.springframework.integration:spring-integration-bom;7.0.0-RC2 +org.springframework.integration:spring-integration-camel;7.0.0-RC2 +org.springframework.integration:spring-integration-cassandra;7.0.0-RC2 +org.springframework.integration:spring-integration-core;7.0.0-RC2 +org.springframework.integration:spring-integration-debezium;7.0.0-RC2 +org.springframework.integration:spring-integration-event;7.0.0-RC2 +org.springframework.integration:spring-integration-feed;7.0.0-RC2 +org.springframework.integration:spring-integration-file;7.0.0-RC2 +org.springframework.integration:spring-integration-ftp;7.0.0-RC2 +org.springframework.integration:spring-integration-graphql;7.0.0-RC2 +org.springframework.integration:spring-integration-groovy;7.0.0-RC2 +org.springframework.integration:spring-integration-hazelcast;7.0.0-RC2 +org.springframework.integration:spring-integration-http;7.0.0-RC2 +org.springframework.integration:spring-integration-ip;7.0.0-RC2 +org.springframework.integration:spring-integration-jdbc;7.0.0-RC2 +org.springframework.integration:spring-integration-jms;7.0.0-RC2 +org.springframework.integration:spring-integration-jmx;7.0.0-RC2 +org.springframework.integration:spring-integration-jpa;7.0.0-RC2 +org.springframework.integration:spring-integration-kafka;7.0.0-RC2 +org.springframework.integration:spring-integration-mail;7.0.0-RC2 +org.springframework.integration:spring-integration-mongodb;7.0.0-RC2 +org.springframework.integration:spring-integration-mqtt;7.0.0-RC2 +org.springframework.integration:spring-integration-r2dbc;7.0.0-RC2 +org.springframework.integration:spring-integration-redis;7.0.0-RC2 +org.springframework.integration:spring-integration-rsocket;7.0.0-RC2 +org.springframework.integration:spring-integration-scripting;7.0.0-RC2 +org.springframework.integration:spring-integration-sftp;7.0.0-RC2 +org.springframework.integration:spring-integration-smb;7.0.0-RC2 +org.springframework.integration:spring-integration-stomp;7.0.0-RC2 +org.springframework.integration:spring-integration-stream;7.0.0-RC2 +org.springframework.integration:spring-integration-syslog;7.0.0-RC2 +org.springframework.integration:spring-integration-test;7.0.0-RC2 +org.springframework.integration:spring-integration-test-support;7.0.0-RC2 +org.springframework.integration:spring-integration-webflux;7.0.0-RC2 +org.springframework.integration:spring-integration-websocket;7.0.0-RC2 +org.springframework.integration:spring-integration-ws;7.0.0-RC2 +org.springframework.integration:spring-integration-xml;7.0.0-RC2 +org.springframework.integration:spring-integration-xmpp;7.0.0-RC2 +org.springframework.integration:spring-integration-zeromq;7.0.0-RC2 +org.springframework.integration:spring-integration-zip;7.0.0-RC2 +org.springframework.integration:spring-integration-zookeeper;7.0.0-RC2 +org.springframework.kafka:spring-kafka;4.0.0-RC1 +org.springframework.kafka:spring-kafka-test;4.0.0-RC1 +org.springframework.ldap:spring-ldap-core;4.0.0-RC1 +org.springframework.ldap:spring-ldap-ldif-core;4.0.0-RC1 +org.springframework.ldap:spring-ldap-odm;4.0.0-RC1 +org.springframework.ldap:spring-ldap-test;4.0.0-RC1 +org.springframework.pulsar:spring-pulsar-bom;2.0.0-RC1 +org.springframework.restdocs:spring-restdocs-asciidoctor;4.0.0-RC1 +org.springframework.restdocs:spring-restdocs-bom;4.0.0-RC1 +org.springframework.restdocs:spring-restdocs-core;4.0.0-RC1 +org.springframework.restdocs:spring-restdocs-mockmvc;4.0.0-RC1 +org.springframework.restdocs:spring-restdocs-webtestclient;4.0.0-RC1 +org.springframework.security:spring-security-bom;7.0.0-RC3 +org.springframework.session:spring-session-bom;4.0.0-RC1 +org.springframework.ws:spring-ws-bom;5.0.0-RC1 +org.springframework.ws:spring-ws-core;5.0.0-RC1 +org.springframework.ws:spring-ws-security;5.0.0-RC1 +org.springframework.ws:spring-ws-support;5.0.0-RC1 +org.springframework.ws:spring-ws-test;5.0.0-RC1 +org.springframework.ws:spring-xml;5.0.0-RC1 +org.springframework:spring-aop;7.0.0-RC3 +org.springframework:spring-aspects;7.0.0-RC3 +org.springframework:spring-beans;7.0.0-RC3 +org.springframework:spring-context;7.0.0-RC3 +org.springframework:spring-context-indexer;7.0.0-RC3 +org.springframework:spring-context-support;7.0.0-RC3 +org.springframework:spring-core;7.0.0-RC3 +org.springframework:spring-core-test;7.0.0-RC3 +org.springframework:spring-expression;7.0.0-RC3 +org.springframework:spring-framework-bom;7.0.0-RC3 +org.springframework:spring-instrument;7.0.0-RC3 +org.springframework:spring-jdbc;7.0.0-RC3 +org.springframework:spring-jms;7.0.0-RC3 +org.springframework:spring-messaging;7.0.0-RC3 +org.springframework:spring-orm;7.0.0-RC3 +org.springframework:spring-oxm;7.0.0-RC3 +org.springframework:spring-r2dbc;7.0.0-RC3 +org.springframework:spring-test;7.0.0-RC3 +org.springframework:spring-tx;7.0.0-RC3 +org.springframework:spring-web;7.0.0-RC3 +org.springframework:spring-webflux;7.0.0-RC3 +org.springframework:spring-webmvc;7.0.0-RC3 +org.springframework:spring-websocket;7.0.0-RC3 +org.testcontainers:testcontainers;2.0.1 +org.testcontainers:testcontainers-activemq;2.0.1 +org.testcontainers:testcontainers-azure;2.0.1 +org.testcontainers:testcontainers-bom;2.0.1 +org.testcontainers:testcontainers-cassandra;2.0.1 +org.testcontainers:testcontainers-chromadb;2.0.1 +org.testcontainers:testcontainers-clickhouse;2.0.1 +org.testcontainers:testcontainers-cockroachdb;2.0.1 +org.testcontainers:testcontainers-consul;2.0.1 +org.testcontainers:testcontainers-couchbase;2.0.1 +org.testcontainers:testcontainers-cratedb;2.0.1 +org.testcontainers:testcontainers-database-commons;2.0.1 +org.testcontainers:testcontainers-databend;2.0.1 +org.testcontainers:testcontainers-db2;2.0.1 +org.testcontainers:testcontainers-elasticsearch;2.0.1 +org.testcontainers:testcontainers-gcloud;2.0.1 +org.testcontainers:testcontainers-grafana;2.0.1 +org.testcontainers:testcontainers-hivemq;2.0.1 +org.testcontainers:testcontainers-influxdb;2.0.1 +org.testcontainers:testcontainers-jdbc;2.0.1 +org.testcontainers:testcontainers-junit-jupiter;2.0.1 +org.testcontainers:testcontainers-k3s;2.0.1 +org.testcontainers:testcontainers-k6;2.0.1 +org.testcontainers:testcontainers-kafka;2.0.1 +org.testcontainers:testcontainers-ldap;2.0.1 +org.testcontainers:testcontainers-localstack;2.0.1 +org.testcontainers:testcontainers-mariadb;2.0.1 +org.testcontainers:testcontainers-milvus;2.0.1 +org.testcontainers:testcontainers-minio;2.0.1 +org.testcontainers:testcontainers-mockserver;2.0.1 +org.testcontainers:testcontainers-mongodb;2.0.1 +org.testcontainers:testcontainers-mssqlserver;2.0.1 +org.testcontainers:testcontainers-mysql;2.0.1 +org.testcontainers:testcontainers-neo4j;2.0.1 +org.testcontainers:testcontainers-nginx;2.0.1 +org.testcontainers:testcontainers-oceanbase;2.0.1 +org.testcontainers:testcontainers-ollama;2.0.1 +org.testcontainers:testcontainers-openfga;2.0.1 +org.testcontainers:testcontainers-oracle-free;2.0.1 +org.testcontainers:testcontainers-oracle-xe;2.0.1 +org.testcontainers:testcontainers-orientdb;2.0.1 +org.testcontainers:testcontainers-pinecone;2.0.1 +org.testcontainers:testcontainers-postgresql;2.0.1 +org.testcontainers:testcontainers-presto;2.0.1 +org.testcontainers:testcontainers-pulsar;2.0.1 +org.testcontainers:testcontainers-qdrant;2.0.1 +org.testcontainers:testcontainers-questdb;2.0.1 +org.testcontainers:testcontainers-r2dbc;2.0.1 +org.testcontainers:testcontainers-rabbitmq;2.0.1 +org.testcontainers:testcontainers-redpanda;2.0.1 +org.testcontainers:testcontainers-scylladb;2.0.1 +org.testcontainers:testcontainers-selenium;2.0.1 +org.testcontainers:testcontainers-solace;2.0.1 +org.testcontainers:testcontainers-solr;2.0.1 +org.testcontainers:testcontainers-spock;2.0.1 +org.testcontainers:testcontainers-tidb;2.0.1 +org.testcontainers:testcontainers-timeplus;2.0.1 +org.testcontainers:testcontainers-toxiproxy;2.0.1 +org.testcontainers:testcontainers-trino;2.0.1 +org.testcontainers:testcontainers-typesense;2.0.1 +org.testcontainers:testcontainers-vault;2.0.1 +org.testcontainers:testcontainers-weaviate;2.0.1 +org.testcontainers:testcontainers-yugabytedb;2.0.1 +org.thymeleaf.extras:thymeleaf-extras-springsecurity6;3.1.3.RELEASE +org.thymeleaf:thymeleaf;3.1.3.RELEASE +org.thymeleaf:thymeleaf-spring6;3.1.3.RELEASE +org.vibur:vibur-dbcp;26.0 +org.vibur:vibur-object-pool;26.0 +org.webjars:webjars-locator-core;0.59 +org.webjars:webjars-locator-lite;1.1.2 +org.xerial:sqlite-jdbc;3.50.3.0 +org.xmlunit:xmlunit-assertj;2.10.4 +org.xmlunit:xmlunit-assertj3;2.10.4 +org.xmlunit:xmlunit-core;2.10.4 +org.xmlunit:xmlunit-jakarta-jaxb-impl;2.10.4 +org.xmlunit:xmlunit-legacy;2.10.4 +org.xmlunit:xmlunit-matchers;2.10.4 +org.xmlunit:xmlunit-placeholders;2.10.4 +org.yaml:snakeyaml;2.5 +redis.clients:jedis;7.0.0 +tools.jackson.core:jackson-core;3.0.1 +tools.jackson.core:jackson-databind;3.0.1 +tools.jackson.dataformat:jackson-dataformat-avro;3.0.1 +tools.jackson.dataformat:jackson-dataformat-cbor;3.0.1 +tools.jackson.dataformat:jackson-dataformat-csv;3.0.1 +tools.jackson.dataformat:jackson-dataformat-ion;3.0.1 +tools.jackson.dataformat:jackson-dataformat-properties;3.0.1 +tools.jackson.dataformat:jackson-dataformat-protobuf;3.0.1 +tools.jackson.dataformat:jackson-dataformat-smile;3.0.1 +tools.jackson.dataformat:jackson-dataformat-toml;3.0.1 +tools.jackson.dataformat:jackson-dataformat-xml;3.0.1 +tools.jackson.dataformat:jackson-dataformat-yaml;3.0.1 +tools.jackson.datatype:jackson-datatype-eclipse-collections;3.0.1 +tools.jackson.datatype:jackson-datatype-guava;3.0.1 +tools.jackson.datatype:jackson-datatype-hppc;3.0.1 +tools.jackson.datatype:jackson-datatype-jakarta-jsonp;3.0.1 +tools.jackson.datatype:jackson-datatype-javax-money;3.0.1 +tools.jackson.datatype:jackson-datatype-jaxrs;3.0.1 +tools.jackson.datatype:jackson-datatype-joda;3.0.1 +tools.jackson.datatype:jackson-datatype-joda-money;3.0.1 +tools.jackson.datatype:jackson-datatype-json-org;3.0.1 +tools.jackson.datatype:jackson-datatype-jsr353;3.0.1 +tools.jackson.datatype:jackson-datatype-moneta;3.0.1 +tools.jackson.datatype:jackson-datatype-pcollections;3.0.1 +tools.jackson.jakarta.rs:jackson-jakarta-rs-base;3.0.1 +tools.jackson.jakarta.rs:jackson-jakarta-rs-cbor-provider;3.0.1 +tools.jackson.jakarta.rs:jackson-jakarta-rs-json-provider;3.0.1 +tools.jackson.jakarta.rs:jackson-jakarta-rs-smile-provider;3.0.1 +tools.jackson.jakarta.rs:jackson-jakarta-rs-xml-provider;3.0.1 +tools.jackson.jakarta.rs:jackson-jakarta-rs-yaml-provider;3.0.1 +tools.jackson.jaxrs:jackson-jaxrs-base;3.0.1 +tools.jackson.jaxrs:jackson-jaxrs-cbor-provider;3.0.1 +tools.jackson.jaxrs:jackson-jaxrs-json-provider;3.0.1 +tools.jackson.jaxrs:jackson-jaxrs-smile-provider;3.0.1 +tools.jackson.jaxrs:jackson-jaxrs-xml-provider;3.0.1 +tools.jackson.jaxrs:jackson-jaxrs-yaml-provider;3.0.1 +tools.jackson.jr:jackson-jr-all;3.0.1 +tools.jackson.jr:jackson-jr-annotation-support;3.0.1 +tools.jackson.jr:jackson-jr-extension-javatime;3.0.1 +tools.jackson.jr:jackson-jr-objects;3.0.1 +tools.jackson.jr:jackson-jr-retrofit2;3.0.1 +tools.jackson.jr:jackson-jr-stree;3.0.1 +tools.jackson.module:jackson-module-afterburner;3.0.1 +tools.jackson.module:jackson-module-android-record;3.0.1 +tools.jackson.module:jackson-module-blackbird;3.0.1 +tools.jackson.module:jackson-module-guice;3.0.1 +tools.jackson.module:jackson-module-guice7;3.0.1 +tools.jackson.module:jackson-module-jakarta-xmlbind-annotations;3.0.1 +tools.jackson.module:jackson-module-jaxb-annotations;3.0.1 +tools.jackson.module:jackson-module-kotlin;3.0.1 +tools.jackson.module:jackson-module-mrbean;3.0.1 +tools.jackson.module:jackson-module-no-ctor-deser;3.0.1 +tools.jackson.module:jackson-module-osgi;3.0.1 +tools.jackson.module:jackson-module-scala_2.12;3.0.1 +tools.jackson.module:jackson-module-scala_2.13;3.0.1 +tools.jackson.module:jackson-module-scala_3;3.0.1 +tools.jackson:jackson-bom;3.0.1 +wsdl4j:wsdl4j;1.6.3 diff --git a/sdk/spring/scripts/version_util.py b/sdk/spring/scripts/version_util.py index a9886a817edb..63583986b32a 100644 --- a/sdk/spring/scripts/version_util.py +++ b/sdk/spring/scripts/version_util.py @@ -11,8 +11,20 @@ def version_greater_than(source_version, target_version): source_version = format_version(source_version, SPECIAL_VERSION_LIST) target_version = format_version(target_version, SPECIAL_VERSION_LIST) - sv = parse(source_version) - tv = parse(target_version) + try: + sv = parse(source_version) + except: + # Handle invalid version formats (e.g., year-based versions with milestones like 2025.1.0-M4) + sv = None + try: + tv = parse(target_version) + except: + # Handle invalid version formats + tv = None + + # If both versions can't be parsed, use special comparison + if sv is None or tv is None: + return special_version_greater_than(source_version, target_version) if sv == tv: return True diff --git a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml index 526df4456a29..4019e11e7272 100644 --- a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml @@ -41,13 +41,13 @@ org.springframework.boot spring-boot-actuator-autoconfigure - 3.5.5 + 4.0.0-RC2 compile com.fasterxml.jackson.core jackson-databind - 2.19.2 + 2.20.1 com.azure.spring @@ -128,7 +128,7 @@ org.springframework.boot spring-boot-starter-test - 3.5.5 + 4.0.0-RC2 test @@ -136,7 +136,7 @@ org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -144,13 +144,13 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test @@ -160,7 +160,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -194,14 +194,14 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 - com.fasterxml.jackson.core:jackson-databind:[2.19.2] - org.springframework.boot:spring-boot-actuator:[3.5.5] - org.springframework.boot:spring-boot-actuator-autoconfigure:[3.5.5] + com.fasterxml.jackson.core:jackson-databind:[2.20.1] + org.springframework.boot:spring-boot-actuator:[4.0.0-RC2] + org.springframework.boot:spring-boot-actuator-autoconfigure:[4.0.0-RC2] @@ -255,7 +255,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-actuator/pom.xml b/sdk/spring/spring-cloud-azure-actuator/pom.xml index c97735c55a04..3e3098c929ad 100644 --- a/sdk/spring/spring-cloud-azure-actuator/pom.xml +++ b/sdk/spring/spring-cloud-azure-actuator/pom.xml @@ -45,7 +45,7 @@ org.springframework.boot spring-boot-actuator - 3.5.5 + 4.0.0-RC2 compile @@ -116,7 +116,7 @@ org.springframework.boot spring-boot-starter-test - 3.5.5 + 4.0.0-RC2 test @@ -124,7 +124,7 @@ org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -132,13 +132,13 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test @@ -148,7 +148,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -179,12 +179,12 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 - org.springframework.boot:spring-boot-actuator:[3.5.5] + org.springframework.boot:spring-boot-actuator:[4.0.0-RC2] @@ -238,7 +238,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/pom.xml b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/pom.xml index 7ae8e6b847eb..efd911657520 100644 --- a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/pom.xml +++ b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/pom.xml @@ -26,12 +26,12 @@ org.springframework.boot spring-boot-starter-web - 3.5.5 + 4.0.0-RC2 org.springframework.boot spring-boot-starter-actuator - 3.5.5 + 4.0.0-RC2 true @@ -43,7 +43,7 @@ org.springframework.boot spring-boot-starter-test - 3.5.5 + 4.0.0-RC2 test @@ -51,7 +51,7 @@ org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -59,13 +59,13 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test @@ -74,7 +74,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 -Xlint:deprecation @@ -113,13 +113,13 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 - org.springframework.boot:spring-boot-starter-actuator:[3.5.5] - org.springframework.boot:spring-boot-starter-web:[3.5.5] + org.springframework.boot:spring-boot-starter-actuator:[4.0.0-RC2] + org.springframework.boot:spring-boot-starter-web:[4.0.0-RC2] org.springframework.cloud:spring-cloud-bus:[4.3.0] @@ -177,7 +177,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.11.3 + 3.12.0 attach-javadocs @@ -193,7 +193,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-appconfiguration-config/pom.xml b/sdk/spring/spring-cloud-azure-appconfiguration-config/pom.xml index f945d5fed552..d3e6aa095ae0 100644 --- a/sdk/spring/spring-cloud-azure-appconfiguration-config/pom.xml +++ b/sdk/spring/spring-cloud-azure-appconfiguration-config/pom.xml @@ -21,12 +21,12 @@ org.springframework.boot spring-boot-autoconfigure - 3.5.5 + 4.0.0-RC2 org.springframework.boot spring-boot-configuration-processor - 3.5.5 + 4.0.0-RC2 true @@ -37,7 +37,7 @@ org.springframework.boot spring-boot-actuator - 3.5.5 + 4.0.0-RC2 compile @@ -80,7 +80,7 @@ org.springframework.boot spring-boot-starter-test - 3.5.5 + 4.0.0-RC2 test @@ -88,7 +88,7 @@ org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -96,13 +96,13 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test + 3.14.1 -Xlint:deprecation @@ -172,18 +172,18 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 - com.fasterxml.jackson.core:jackson-annotations:[2.19.2] - com.fasterxml.jackson.core:jackson-databind:[2.19.2] - org.springframework.boot:spring-boot-actuator:[3.5.5] - org.springframework.boot:spring-boot-autoconfigure:[3.5.5] + com.fasterxml.jackson.core:jackson-annotations:[2.20] + com.fasterxml.jackson.core:jackson-databind:[2.20.1] + org.springframework.boot:spring-boot-actuator:[4.0.0-RC2] + org.springframework.boot:spring-boot-autoconfigure:[4.0.0-RC2] org.springframework.cloud:spring-cloud-context:[4.3.0] jakarta.annotation:jakarta.annotation-api:[3.0.0] - org.springframework.boot:spring-boot-configuration-processor:[3.5.5] + org.springframework.boot:spring-boot-configuration-processor:[4.0.0-RC2] diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index b6cdb1aefa60..8da089dc7779 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -86,7 +86,7 @@ org.springframework.kafka spring-kafka - 3.3.9 + 4.0.0-RC1 true @@ -100,7 +100,7 @@ io.lettuce lettuce-core - 6.6.0.RELEASE + 6.8.1.RELEASE true @@ -112,7 +112,7 @@ org.springframework spring-tx - 6.2.10 + 7.0.0-RC3 true @@ -128,7 +128,7 @@ org.springframework spring-jms - 6.2.10 + 7.0.0-RC3 true @@ -300,25 +300,25 @@ org.springframework.boot spring-boot-autoconfigure - 3.5.5 + 4.0.0-RC2 org.springframework spring-context-support - 6.2.10 + 7.0.0-RC3 true org.springframework.boot spring-boot-actuator-autoconfigure - 3.5.5 + 4.0.0-RC2 true org.springframework.boot spring-boot-configuration-processor - 3.5.5 + 4.0.0-RC2 true @@ -360,20 +360,20 @@ jakarta.servlet jakarta.servlet-api - 6.0.0 + 6.1.0 true org.hibernate.validator hibernate-validator - 8.0.3.Final + 9.0.1.Final true jakarta.validation jakarta.validation-api - 3.0.2 + 3.1.1 @@ -387,37 +387,37 @@ com.fasterxml.jackson.core jackson-databind - 2.19.2 + 2.20.1 true com.fasterxml.jackson.core jackson-core - 2.19.2 + 2.20.1 true com.fasterxml.jackson.core jackson-annotations - 2.19.2 + 2.20 true com.fasterxml.jackson.dataformat jackson-dataformat-xml - 2.19.2 + 2.20.1 true com.fasterxml.jackson.datatype jackson-datatype-jsr310 - 2.19.2 + 2.20.1 true com.fasterxml.jackson.module jackson-module-afterburner - 2.19.2 + 2.20.1 true @@ -425,19 +425,19 @@ org.springframework.boot spring-boot-starter-test - 3.5.5 + 4.0.0-RC2 test org.springframework spring-core-test - 6.2.10 + 7.0.0-RC3 test org.springframework.boot spring-boot-configuration-metadata - 3.5.5 + 4.0.0-RC2 test @@ -445,7 +445,7 @@ org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -453,13 +453,13 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test @@ -473,14 +473,14 @@ org.postgresql postgresql - 42.7.7 + 42.7.8 test org.springframework spring-jdbc - 6.2.10 + 7.0.0-RC3 test @@ -491,7 +491,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -537,39 +537,39 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 com.azure:azure-servicebus-jms:[2.0.0] com.mysql:mysql-connector-j:[9.4.0] - com.fasterxml.jackson.core:jackson-annotations:[2.19.2] - com.fasterxml.jackson.core:jackson-core:[2.19.2] - com.fasterxml.jackson.core:jackson-databind:[2.19.2] - com.fasterxml.jackson.dataformat:jackson-dataformat-xml:[2.19.2] - com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.19.2] - com.fasterxml.jackson.module:jackson-module-afterburner:[2.19.2] - io.lettuce:lettuce-core:[6.6.0.RELEASE] - jakarta.servlet:jakarta.servlet-api:[6.0.0] - jakarta.validation:jakarta.validation-api:[3.0.2] - org.hibernate.validator:hibernate-validator:[8.0.3.Final] + com.fasterxml.jackson.core:jackson-annotations:[2.20] + com.fasterxml.jackson.core:jackson-core:[2.20.1] + com.fasterxml.jackson.core:jackson-databind:[2.20.1] + com.fasterxml.jackson.dataformat:jackson-dataformat-xml:[2.20.1] + com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.20.1] + com.fasterxml.jackson.module:jackson-module-afterburner:[2.20.1] + io.lettuce:lettuce-core:[6.8.1.RELEASE] + jakarta.servlet:jakarta.servlet-api:[6.1.0] + jakarta.validation:jakarta.validation-api:[3.1.1] + org.hibernate.validator:hibernate-validator:[9.0.1.Final] org.messaginghub:pooled-jms:[3.1.7] - org.postgresql:postgresql:[42.7.7] - org.springframework.boot:spring-boot-actuator-autoconfigure:[3.5.5] - org.springframework.boot:spring-boot-autoconfigure:[3.5.5] - org.springframework.boot:spring-boot-configuration-processor:[3.5.5] + org.postgresql:postgresql:[42.7.8] + org.springframework.boot:spring-boot-actuator-autoconfigure:[4.0.0-RC2] + org.springframework.boot:spring-boot-autoconfigure:[4.0.0-RC2] + org.springframework.boot:spring-boot-configuration-processor:[4.0.0-RC2] org.springframework.cloud:spring-cloud-starter-stream-kafka:[4.3.0] org.springframework.data:spring-data-redis:[3.5.3] - org.springframework.kafka:spring-kafka:[3.3.9] + org.springframework.kafka:spring-kafka:[4.0.0-RC1] org.springframework.security:spring-security-config:[6.5.3] org.springframework.security:spring-security-oauth2-client:[6.5.3] org.springframework.security:spring-security-oauth2-jose:[6.5.3] org.springframework.security:spring-security-oauth2-resource-server:[6.5.3] - org.springframework:spring-context-support:[6.2.10] - org.springframework:spring-jdbc:[6.2.10] - org.springframework:spring-jms:[6.2.10] - org.springframework:spring-tx:[6.2.10] + org.springframework:spring-context-support:[7.0.0-RC3] + org.springframework:spring-jdbc:[7.0.0-RC3] + org.springframework:spring-jms:[7.0.0-RC3] + org.springframework:spring-tx:[7.0.0-RC3] diff --git a/sdk/spring/spring-cloud-azure-core/pom.xml b/sdk/spring/spring-cloud-azure-core/pom.xml index f8d30b0f3472..7ef2433b0771 100644 --- a/sdk/spring/spring-cloud-azure-core/pom.xml +++ b/sdk/spring/spring-cloud-azure-core/pom.xml @@ -40,7 +40,7 @@ org.springframework spring-context - 6.2.10 + 7.0.0-RC3 com.azure @@ -98,7 +98,7 @@ org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -106,25 +106,25 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test org.junit.jupiter junit-jupiter - 5.12.2 + 6.0.1 test org.springframework spring-test - 6.2.10 + 7.0.0-RC3 test @@ -145,7 +145,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -176,12 +176,12 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 - org.springframework:spring-context:[6.2.10] + org.springframework:spring-context:[7.0.0-RC3] diff --git a/sdk/spring/spring-cloud-azure-docker-compose/pom.xml b/sdk/spring/spring-cloud-azure-docker-compose/pom.xml index d568e3caca5d..eae1aee6c469 100644 --- a/sdk/spring/spring-cloud-azure-docker-compose/pom.xml +++ b/sdk/spring/spring-cloud-azure-docker-compose/pom.xml @@ -81,7 +81,7 @@ org.springframework.boot spring-boot-docker-compose - 3.5.5 + 4.0.0-RC2 + 4.0.0-RC2 test org.springframework spring-test - 6.2.10 + 7.0.0-RC3 test org.junit.jupiter junit-jupiter - 5.12.2 + 6.0.1 test org.assertj assertj-core - 3.27.4 + 3.27.6 test @@ -124,7 +124,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -155,12 +155,12 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 - org.springframework.boot:spring-boot-docker-compose:[3.5.5] + org.springframework.boot:spring-boot-docker-compose:[4.0.0-RC2] @@ -214,7 +214,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-feature-management-web/pom.xml b/sdk/spring/spring-cloud-azure-feature-management-web/pom.xml index e19493d584bd..2647f98dd721 100644 --- a/sdk/spring/spring-cloud-azure-feature-management-web/pom.xml +++ b/sdk/spring/spring-cloud-azure-feature-management-web/pom.xml @@ -29,12 +29,12 @@ org.springframework spring-web - 6.2.10 + 7.0.0-RC3 org.springframework spring-webmvc - 6.2.10 + 7.0.0-RC3 com.azure.spring @@ -44,26 +44,26 @@ jakarta.servlet jakarta.servlet-api - 6.0.0 + 6.1.0 provided org.springframework.boot spring-boot-starter-test - 3.5.5 + 4.0.0-RC2 test net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test @@ -88,7 +88,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -122,15 +122,15 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 com.azure.spring:spring-cloud-azure-feature-management:[6.1.0-beta.1] - jakarta.servlet:jakarta.servlet-api:[6.0.0] - org.springframework:spring-web:[6.2.10] - org.springframework:spring-webmvc:[6.2.10] + jakarta.servlet:jakarta.servlet-api:[6.1.0] + org.springframework:spring-web:[7.0.0-RC3] + org.springframework:spring-webmvc:[7.0.0-RC3] diff --git a/sdk/spring/spring-cloud-azure-feature-management/pom.xml b/sdk/spring/spring-cloud-azure-feature-management/pom.xml index 1dbac57ba347..c3e670a71976 100644 --- a/sdk/spring/spring-cloud-azure-feature-management/pom.xml +++ b/sdk/spring/spring-cloud-azure-feature-management/pom.xml @@ -29,12 +29,12 @@ org.springframework spring-context - 6.2.10 + 7.0.0-RC3 org.springframework.boot spring-boot-starter - 3.5.5 + 4.0.0-RC2 ch.qos.logback @@ -45,35 +45,35 @@ org.springframework.boot spring-boot-configuration-processor - 3.5.5 + 4.0.0-RC2 true com.fasterxml.jackson.core jackson-annotations - 2.19.2 + 2.20 com.fasterxml.jackson.core jackson-databind - 2.19.2 + 2.20.1 io.projectreactor.netty reactor-netty - 1.2.9 + 1.3.0-RC1 org.springframework.boot spring-boot-starter-test - 3.5.5 + 4.0.0-RC2 test org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -81,19 +81,19 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test ch.qos.logback logback-classic - 1.5.18 + 1.5.20 test @@ -118,7 +118,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -161,17 +161,17 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 - com.fasterxml.jackson.core:jackson-annotations:[2.19.2] - com.fasterxml.jackson.core:jackson-databind:[2.19.2] - io.projectreactor.netty:reactor-netty:[1.2.9] - org.springframework.boot:spring-boot-configuration-processor:[3.5.5] - org.springframework.boot:spring-boot-starter:[3.5.5] - org.springframework:spring-context:[6.2.10] + com.fasterxml.jackson.core:jackson-annotations:[2.20] + com.fasterxml.jackson.core:jackson-databind:[2.20.1] + io.projectreactor.netty:reactor-netty:[1.3.0-RC1] + org.springframework.boot:spring-boot-configuration-processor:[4.0.0-RC2] + org.springframework.boot:spring-boot-starter:[4.0.0-RC2] + org.springframework:spring-context:[7.0.0-RC3] diff --git a/sdk/spring/spring-cloud-azure-integration-test-appconfiguration-config/pom.xml b/sdk/spring/spring-cloud-azure-integration-test-appconfiguration-config/pom.xml index ddf5dcfe5b5a..033392bcc880 100644 --- a/sdk/spring/spring-cloud-azure-integration-test-appconfiguration-config/pom.xml +++ b/sdk/spring/spring-cloud-azure-integration-test-appconfiguration-config/pom.xml @@ -6,7 +6,7 @@ org.springframework.boot spring-boot-starter-parent - 3.5.5 + 4.0.0-RC2 com.azure.spring @@ -30,7 +30,7 @@ org.springframework.boot spring-boot-starter-test - 3.5.5 + 4.0.0-RC2 test @@ -39,7 +39,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.5.3 + 3.5.4 default diff --git a/sdk/spring/spring-cloud-azure-integration-tests/pom.xml b/sdk/spring/spring-cloud-azure-integration-tests/pom.xml index 50dd466d6e25..ffb15b9e3873 100644 --- a/sdk/spring/spring-cloud-azure-integration-tests/pom.xml +++ b/sdk/spring/spring-cloud-azure-integration-tests/pom.xml @@ -7,7 +7,7 @@ org.springframework.boot spring-boot-starter-parent - 3.5.5 + 4.0.0-RC2 @@ -142,7 +142,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.5.3 + 3.5.4 default diff --git a/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml b/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml index dd69cfd3ad9d..9a791d3c427c 100644 --- a/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml +++ b/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml @@ -53,7 +53,7 @@ org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -61,25 +61,25 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test org.junit.jupiter junit-jupiter - 5.12.2 + 6.0.1 test org.springframework spring-test - 6.2.10 + 7.0.0-RC3 test @@ -100,7 +100,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -176,7 +176,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-service/pom.xml b/sdk/spring/spring-cloud-azure-service/pom.xml index ee1629b16f3c..7ca858176b3b 100644 --- a/sdk/spring/spring-cloud-azure-service/pom.xml +++ b/sdk/spring/spring-cloud-azure-service/pom.xml @@ -116,7 +116,7 @@ org.apache.kafka kafka-clients - 3.9.1 + 4.1.0 true @@ -131,7 +131,7 @@ org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -139,25 +139,25 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test org.junit.jupiter junit-jupiter - 5.12.2 + 6.0.1 test org.springframework spring-test - 6.2.10 + 7.0.0-RC3 test @@ -178,7 +178,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -209,13 +209,13 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 - org.apache.kafka:kafka-clients:[3.9.1] - org.postgresql:postgresql:[42.7.7] + org.apache.kafka:kafka-clients:[4.1.0] + org.postgresql:postgresql:[42.7.8] com.nimbusds:nimbus-jose-jwt:[9.37.3] diff --git a/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml b/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml index e1a375b3b6cd..b2c6794df3d4 100644 --- a/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml @@ -199,7 +199,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml b/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml index 83d3b173637b..56e53c53fc72 100644 --- a/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml @@ -193,7 +193,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-actuator/pom.xml b/sdk/spring/spring-cloud-azure-starter-actuator/pom.xml index dcd91568608d..828c133517a8 100644 --- a/sdk/spring/spring-cloud-azure-starter-actuator/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-actuator/pom.xml @@ -99,7 +99,7 @@ org.springframework.boot spring-boot-starter-actuator - 3.5.5 + 4.0.0-RC2 @@ -188,7 +188,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/pom.xml b/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/pom.xml index 992d363e1cf3..a2f2eca6dc8a 100644 --- a/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/pom.xml @@ -185,7 +185,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-appconfiguration/pom.xml b/sdk/spring/spring-cloud-azure-starter-appconfiguration/pom.xml index 6288a7c4a79d..5b7e91306713 100644 --- a/sdk/spring/spring-cloud-azure-starter-appconfiguration/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-appconfiguration/pom.xml @@ -183,7 +183,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-cosmos/pom.xml b/sdk/spring/spring-cloud-azure-starter-cosmos/pom.xml index 0e8bc48c4684..c0000d2c500c 100644 --- a/sdk/spring/spring-cloud-azure-starter-cosmos/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-cosmos/pom.xml @@ -183,7 +183,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-data-cosmos/pom.xml b/sdk/spring/spring-cloud-azure-starter-data-cosmos/pom.xml index 74da06815338..4fc0ec3633cb 100644 --- a/sdk/spring/spring-cloud-azure-starter-data-cosmos/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-data-cosmos/pom.xml @@ -183,7 +183,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml b/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml index c285b59cb37a..9f4b6dd42bdb 100644 --- a/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml @@ -101,7 +101,7 @@ io.lettuce lettuce-core - 6.6.0.RELEASE + 6.8.1.RELEASE true @@ -198,7 +198,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-eventgrid/pom.xml b/sdk/spring/spring-cloud-azure-starter-eventgrid/pom.xml index 03cbc37b8bc5..88606ed94052 100644 --- a/sdk/spring/spring-cloud-azure-starter-eventgrid/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-eventgrid/pom.xml @@ -185,7 +185,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-eventhubs/pom.xml b/sdk/spring/spring-cloud-azure-starter-eventhubs/pom.xml index f72f8eb93b07..ba8d2d0e7229 100644 --- a/sdk/spring/spring-cloud-azure-starter-eventhubs/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-eventhubs/pom.xml @@ -191,7 +191,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-integration-eventhubs/pom.xml b/sdk/spring/spring-cloud-azure-starter-integration-eventhubs/pom.xml index bd9f381f0c82..de34805f7a1e 100644 --- a/sdk/spring/spring-cloud-azure-starter-integration-eventhubs/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-integration-eventhubs/pom.xml @@ -95,7 +95,7 @@ org.springframework.boot spring-boot-starter-integration - 3.5.5 + 4.0.0-RC2 com.azure.spring @@ -189,7 +189,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-integration-servicebus/pom.xml b/sdk/spring/spring-cloud-azure-starter-integration-servicebus/pom.xml index ee567efbd380..ea4eba599fd9 100644 --- a/sdk/spring/spring-cloud-azure-starter-integration-servicebus/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-integration-servicebus/pom.xml @@ -95,7 +95,7 @@ org.springframework.boot spring-boot-starter-integration - 3.5.5 + 4.0.0-RC2 com.azure.spring @@ -189,7 +189,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-integration-storage-queue/pom.xml b/sdk/spring/spring-cloud-azure-starter-integration-storage-queue/pom.xml index 78d92988ff65..7e8c9e42328a 100644 --- a/sdk/spring/spring-cloud-azure-starter-integration-storage-queue/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-integration-storage-queue/pom.xml @@ -98,7 +98,7 @@ org.springframework.boot spring-boot-starter-integration - 3.5.5 + 4.0.0-RC2 com.azure.spring @@ -192,7 +192,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-jdbc-mysql/pom.xml b/sdk/spring/spring-cloud-azure-starter-jdbc-mysql/pom.xml index c54afa191e4e..3547883db3e2 100644 --- a/sdk/spring/spring-cloud-azure-starter-jdbc-mysql/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-jdbc-mysql/pom.xml @@ -190,7 +190,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql/pom.xml b/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql/pom.xml index 18bc691036de..fd7e24f31097 100644 --- a/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql/pom.xml @@ -101,7 +101,7 @@ org.postgresql postgresql - 42.7.7 + 42.7.8 @@ -190,7 +190,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-keyvault-certificates/pom.xml b/sdk/spring/spring-cloud-azure-starter-keyvault-certificates/pom.xml index 9a806739e368..4f0fe5b21b93 100644 --- a/sdk/spring/spring-cloud-azure-starter-keyvault-certificates/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-keyvault-certificates/pom.xml @@ -183,7 +183,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-keyvault-jca/pom.xml b/sdk/spring/spring-cloud-azure-starter-keyvault-jca/pom.xml index bb1015417702..80773b472706 100644 --- a/sdk/spring/spring-cloud-azure-starter-keyvault-jca/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-keyvault-jca/pom.xml @@ -183,7 +183,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-keyvault-secrets/pom.xml b/sdk/spring/spring-cloud-azure-starter-keyvault-secrets/pom.xml index a1f6f8560006..cf7fd6ad6fb9 100644 --- a/sdk/spring/spring-cloud-azure-starter-keyvault-secrets/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-keyvault-secrets/pom.xml @@ -183,7 +183,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-keyvault/pom.xml b/sdk/spring/spring-cloud-azure-starter-keyvault/pom.xml index 953acdd9725e..68f2915232ec 100644 --- a/sdk/spring/spring-cloud-azure-starter-keyvault/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-keyvault/pom.xml @@ -188,7 +188,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml b/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml index 6e3caf25dd87..017427bf8914 100644 --- a/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml @@ -7,7 +7,7 @@ org.springframework.boot spring-boot-starter-parent - 3.5.5 + 4.0.0-RC2 @@ -48,17 +48,17 @@ org.springframework.boot spring-boot-starter-web - 3.5.5 + 4.0.0-RC2 org.springframework.boot spring-boot-starter-data-jdbc - 3.5.5 + 4.0.0-RC2 org.springframework.boot spring-boot-starter-test - 3.5.5 + 4.0.0-RC2 test diff --git a/sdk/spring/spring-cloud-azure-starter-monitor/pom.xml b/sdk/spring/spring-cloud-azure-starter-monitor/pom.xml index bf59ec4a783a..0a385980184f 100644 --- a/sdk/spring/spring-cloud-azure-starter-monitor/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-monitor/pom.xml @@ -87,7 +87,7 @@ org.springframework.boot spring-boot-starter - 3.5.5 + 4.0.0-RC2 provided @@ -166,7 +166,7 @@ org.springframework.boot spring-boot-starter-test - 3.5.5 + 4.0.0-RC2 test @@ -178,7 +178,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -222,7 +222,7 @@ io.opentelemetry:opentelemetry-sdk-metrics:[1.49.0] io.opentelemetry:opentelemetry-sdk-logs:[1.49.0] io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:[1.49.0] - org.springframework.boot:spring-boot-starter:[3.5.5] + org.springframework.boot:spring-boot-starter:[4.0.0-RC2] diff --git a/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml b/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml index 26566866ec53..4301713ba787 100644 --- a/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml @@ -96,7 +96,7 @@ org.springframework spring-jms - 6.2.10 + 7.0.0-RC3 org.messaginghub @@ -136,37 +136,37 @@ currently released version and a lower version is resolved. --> io.netty netty-buffer - 4.1.124.Final + 4.2.7.Final io.netty netty-common - 4.1.124.Final + 4.2.7.Final io.netty netty-handler - 4.1.124.Final + 4.2.7.Final io.netty netty-transport - 4.1.124.Final + 4.2.7.Final io.netty netty-transport-native-epoll - 4.1.124.Final + 4.2.7.Final io.netty netty-transport-native-kqueue - 4.1.124.Final + 4.2.7.Final io.netty netty-codec-http - 4.1.124.Final + 4.2.7.Final com.azure @@ -260,7 +260,7 @@ currently released version and a lower version is resolved. --> org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-servicebus/pom.xml b/sdk/spring/spring-cloud-azure-starter-servicebus/pom.xml index cf7d877b2eec..d28744b094b5 100644 --- a/sdk/spring/spring-cloud-azure-starter-servicebus/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-servicebus/pom.xml @@ -184,7 +184,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-storage-blob/pom.xml b/sdk/spring/spring-cloud-azure-starter-storage-blob/pom.xml index 26fda7327445..2e1f2a760cea 100644 --- a/sdk/spring/spring-cloud-azure-starter-storage-blob/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-storage-blob/pom.xml @@ -184,7 +184,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-storage-file-share/pom.xml b/sdk/spring/spring-cloud-azure-starter-storage-file-share/pom.xml index c951eb3bbb40..1520ec1065ee 100644 --- a/sdk/spring/spring-cloud-azure-starter-storage-file-share/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-storage-file-share/pom.xml @@ -184,7 +184,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-storage-queue/pom.xml b/sdk/spring/spring-cloud-azure-starter-storage-queue/pom.xml index 82c6d4af92ab..6662f8aa3c85 100644 --- a/sdk/spring/spring-cloud-azure-starter-storage-queue/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-storage-queue/pom.xml @@ -187,7 +187,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-storage/pom.xml b/sdk/spring/spring-cloud-azure-starter-storage/pom.xml index ad99ae68dd1e..e691d6405a21 100644 --- a/sdk/spring/spring-cloud-azure-starter-storage/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-storage/pom.xml @@ -190,7 +190,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-stream-eventhubs/pom.xml b/sdk/spring/spring-cloud-azure-starter-stream-eventhubs/pom.xml index 72dfac92eec2..2efee45c7ff5 100644 --- a/sdk/spring/spring-cloud-azure-starter-stream-eventhubs/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-stream-eventhubs/pom.xml @@ -179,7 +179,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter-stream-servicebus/pom.xml b/sdk/spring/spring-cloud-azure-starter-stream-servicebus/pom.xml index 51c7ae5a084f..20e56584f39a 100644 --- a/sdk/spring/spring-cloud-azure-starter-stream-servicebus/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-stream-servicebus/pom.xml @@ -179,7 +179,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-starter/pom.xml b/sdk/spring/spring-cloud-azure-starter/pom.xml index d77e7205b5aa..6eb7d159daae 100644 --- a/sdk/spring/spring-cloud-azure-starter/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter/pom.xml @@ -89,7 +89,7 @@ org.springframework.boot spring-boot-starter - 3.5.5 + 4.0.0-RC2 com.azure.spring @@ -192,7 +192,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/pom.xml b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/pom.xml index 102164dc9719..4ab14ba21534 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/pom.xml +++ b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/pom.xml @@ -59,14 +59,14 @@ org.springframework.boot spring-boot-configuration-processor - 3.5.5 + 4.0.0-RC2 true org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -74,25 +74,25 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test org.junit.jupiter junit-jupiter - 5.12.2 + 6.0.1 test org.springframework spring-test - 6.2.10 + 7.0.0-RC3 test @@ -108,13 +108,13 @@ org.springframework.boot spring-boot-test - 3.5.5 + 4.0.0-RC2 test org.assertj assertj-core - 3.27.4 + 3.27.6 test @@ -123,7 +123,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -166,12 +166,12 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 - org.springframework.boot:spring-boot-configuration-processor:[3.5.5] + org.springframework.boot:spring-boot-configuration-processor:[4.0.0-RC2] org.springframework.cloud:spring-cloud-stream:[4.3.0] diff --git a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/pom.xml b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/pom.xml index e333c8316657..6f1086970efe 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/pom.xml +++ b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/pom.xml @@ -57,7 +57,7 @@ org.springframework.boot spring-boot-starter-actuator - 3.5.5 + 4.0.0-RC2 true @@ -82,7 +82,7 @@ org.springframework.boot spring-boot-starter-test - 3.5.5 + 4.0.0-RC2 test @@ -90,13 +90,13 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test + 5.20.0 test @@ -123,7 +123,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -157,12 +157,12 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 - org.springframework.boot:spring-boot-starter-actuator:[3.5.5] + org.springframework.boot:spring-boot-starter-actuator:[4.0.0-RC2] diff --git a/sdk/spring/spring-cloud-azure-stream-binder-servicebus-core/pom.xml b/sdk/spring/spring-cloud-azure-stream-binder-servicebus-core/pom.xml index 320d145b4887..59d45b84a014 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-servicebus-core/pom.xml +++ b/sdk/spring/spring-cloud-azure-stream-binder-servicebus-core/pom.xml @@ -57,14 +57,14 @@ org.springframework.boot spring-boot-configuration-processor - 3.5.5 + 4.0.0-RC2 true org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -72,25 +72,25 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test org.junit.jupiter junit-jupiter - 5.12.2 + 6.0.1 test org.springframework spring-test - 6.2.10 + 7.0.0-RC3 test @@ -106,13 +106,13 @@ org.springframework.boot spring-boot-test - 3.5.5 + 4.0.0-RC2 test org.assertj assertj-core - 3.27.4 + 3.27.6 test @@ -122,7 +122,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -165,12 +165,12 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 - org.springframework.boot:spring-boot-configuration-processor:[3.5.5] + org.springframework.boot:spring-boot-configuration-processor:[4.0.0-RC2] org.springframework.cloud:spring-cloud-stream:[4.3.0] diff --git a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/pom.xml b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/pom.xml index 8abb638da2f8..62719981c469 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/pom.xml +++ b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/pom.xml @@ -56,7 +56,7 @@ org.springframework.boot spring-boot-starter-actuator - 3.5.5 + 4.0.0-RC2 true + 4.0.0-RC2 test @@ -92,7 +92,7 @@ org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -100,13 +100,13 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test @@ -116,7 +116,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -150,12 +150,12 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 - org.springframework.boot:spring-boot-starter-actuator:[3.5.5] + org.springframework.boot:spring-boot-starter-actuator:[4.0.0-RC2] diff --git a/sdk/spring/spring-cloud-azure-testcontainers/pom.xml b/sdk/spring/spring-cloud-azure-testcontainers/pom.xml index ac014a48e952..7b320ee3eab3 100644 --- a/sdk/spring/spring-cloud-azure-testcontainers/pom.xml +++ b/sdk/spring/spring-cloud-azure-testcontainers/pom.xml @@ -82,7 +82,7 @@ org.springframework.boot spring-boot-testcontainers - 3.5.5 + 4.0.0-RC2 org.testcontainers @@ -103,19 +103,19 @@ org.springframework spring-test - 6.2.10 + 7.0.0-RC3 test org.junit.jupiter junit-jupiter - 5.12.2 + 6.0.1 test org.assertj assertj-core - 3.27.4 + 3.27.6 test @@ -131,7 +131,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -162,12 +162,12 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 - org.springframework.boot:spring-boot-testcontainers:[3.5.5] + org.springframework.boot:spring-boot-testcontainers:[4.0.0-RC2] org.testcontainers:azure:[1.21.3] @@ -222,7 +222,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 copy-readme-to-javadocTemp-and-sourceTemp diff --git a/sdk/spring/spring-integration-azure-core/pom.xml b/sdk/spring/spring-integration-azure-core/pom.xml index 7c9fcd5471a9..4deec95bd658 100644 --- a/sdk/spring/spring-integration-azure-core/pom.xml +++ b/sdk/spring/spring-integration-azure-core/pom.xml @@ -48,7 +48,7 @@ org.springframework.integration spring-integration-core - 6.5.1 + 7.0.0-RC2 + 5.20.0 test @@ -71,31 +71,31 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test org.springframework spring-test - 6.2.10 + 7.0.0-RC3 test org.junit.jupiter junit-jupiter - 5.12.2 + 6.0.1 test org.assertj assertj-core - 3.27.4 + 3.27.6 test @@ -105,7 +105,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -136,12 +136,12 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 - org.springframework.integration:spring-integration-core:[6.5.1] + org.springframework.integration:spring-integration-core:[7.0.0-RC2] diff --git a/sdk/spring/spring-integration-azure-eventhubs/pom.xml b/sdk/spring/spring-integration-azure-eventhubs/pom.xml index aaed8b36eeef..e3723b641388 100644 --- a/sdk/spring/spring-integration-azure-eventhubs/pom.xml +++ b/sdk/spring/spring-integration-azure-eventhubs/pom.xml @@ -67,7 +67,7 @@ org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -75,31 +75,31 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test org.springframework spring-test - 6.2.10 + 7.0.0-RC3 test org.assertj assertj-core - 3.27.4 + 3.27.6 test org.junit.jupiter junit-jupiter - 5.12.2 + 6.0.1 test @@ -109,7 +109,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 diff --git a/sdk/spring/spring-integration-azure-servicebus/pom.xml b/sdk/spring/spring-integration-azure-servicebus/pom.xml index 3b7d07c4d2ad..36e822f69987 100644 --- a/sdk/spring/spring-integration-azure-servicebus/pom.xml +++ b/sdk/spring/spring-integration-azure-servicebus/pom.xml @@ -66,7 +66,7 @@ org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -74,31 +74,31 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test org.junit.jupiter junit-jupiter - 5.12.2 + 6.0.1 test org.springframework spring-test - 6.2.10 + 7.0.0-RC3 test org.assertj assertj-core - 3.27.4 + 3.27.6 test @@ -108,7 +108,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 diff --git a/sdk/spring/spring-integration-azure-storage-queue/pom.xml b/sdk/spring/spring-integration-azure-storage-queue/pom.xml index 4df92ec46719..ce7a67c5b4cb 100644 --- a/sdk/spring/spring-integration-azure-storage-queue/pom.xml +++ b/sdk/spring/spring-integration-azure-storage-queue/pom.xml @@ -63,7 +63,7 @@ org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -71,19 +71,19 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test org.junit.jupiter junit-jupiter - 5.12.2 + 6.0.1 test @@ -93,7 +93,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 diff --git a/sdk/spring/spring-messaging-azure-eventhubs/pom.xml b/sdk/spring/spring-messaging-azure-eventhubs/pom.xml index d6f0fdd0b647..276ec4a2a744 100644 --- a/sdk/spring/spring-messaging-azure-eventhubs/pom.xml +++ b/sdk/spring/spring-messaging-azure-eventhubs/pom.xml @@ -59,7 +59,7 @@ org.springframework spring-tx - 6.2.10 + 7.0.0-RC3 true @@ -97,13 +97,13 @@ org.springframework spring-test - 6.2.10 + 7.0.0-RC3 test org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -111,25 +111,25 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test org.junit.jupiter junit-jupiter - 5.12.2 + 6.0.1 test io.projectreactor reactor-test - 3.7.9 + 3.8.0-RC1 test @@ -138,7 +138,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -169,13 +169,13 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 io.micrometer:micrometer-core:[1.15.3] - org.springframework:spring-tx:[6.2.10] + org.springframework:spring-tx:[7.0.0-RC3] org.springframework.retry:spring-retry:[2.0.12] org.springframework.data:spring-data-commons:[3.5.3] diff --git a/sdk/spring/spring-messaging-azure-servicebus/pom.xml b/sdk/spring/spring-messaging-azure-servicebus/pom.xml index a5276a303a73..bad93272f541 100644 --- a/sdk/spring/spring-messaging-azure-servicebus/pom.xml +++ b/sdk/spring/spring-messaging-azure-servicebus/pom.xml @@ -52,7 +52,7 @@ org.springframework spring-tx - 6.2.10 + 7.0.0-RC3 true @@ -82,7 +82,7 @@ org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -90,19 +90,19 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test org.junit.jupiter junit-jupiter - 5.12.2 + 6.0.1 test @@ -123,7 +123,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -154,13 +154,13 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 io.micrometer:micrometer-core:[1.15.3] - org.springframework:spring-tx:[6.2.10] + org.springframework:spring-tx:[7.0.0-RC3] org.springframework.retry:spring-retry:[2.0.12] org.springframework.data:spring-data-commons:[3.5.3] diff --git a/sdk/spring/spring-messaging-azure-storage-queue/pom.xml b/sdk/spring/spring-messaging-azure-storage-queue/pom.xml index 1bd81586c23f..e19d826595f9 100644 --- a/sdk/spring/spring-messaging-azure-storage-queue/pom.xml +++ b/sdk/spring/spring-messaging-azure-storage-queue/pom.xml @@ -52,7 +52,7 @@ org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -60,25 +60,25 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test org.junit.jupiter junit-jupiter - 5.12.2 + 6.0.1 test org.springframework.boot spring-boot-starter-test - 3.5.5 + 4.0.0-RC2 test @@ -100,7 +100,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 diff --git a/sdk/spring/spring-messaging-azure/pom.xml b/sdk/spring/spring-messaging-azure/pom.xml index 28ab7d3ce151..1f55d805bd41 100644 --- a/sdk/spring/spring-messaging-azure/pom.xml +++ b/sdk/spring/spring-messaging-azure/pom.xml @@ -46,12 +46,12 @@ org.springframework spring-messaging - 6.2.10 + 7.0.0-RC3 org.springframework spring-tx - 6.2.10 + 7.0.0-RC3 true @@ -92,14 +92,14 @@ org.springframework.boot spring-boot-starter-test - 3.5.5 + 4.0.0-RC2 test org.mockito mockito-core - 5.17.0 + 5.20.0 test @@ -107,13 +107,13 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test @@ -123,7 +123,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -154,15 +154,15 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 io.micrometer:micrometer-core:[1.15.3] org.springframework.data:spring-data-commons:[3.5.3] - org.springframework:spring-messaging:[6.2.10] - org.springframework:spring-tx:[6.2.10] + org.springframework:spring-messaging:[7.0.0-RC3] + org.springframework:spring-tx:[7.0.0-RC3] org.springframework.retry:spring-retry:[2.0.12] From 4039c61261449ff4f5acddd68baf57a3cfe572ed Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 13 Nov 2025 08:46:06 +0000 Subject: [PATCH 003/186] fix: suppress deprecation warnings for Spring Framework 7.0 @Nullable/@NonNull annotations Co-authored-by: Netyyyy <92105726+Netyyyy@users.noreply.github.com> --- .../java/com/azure/spring/data/cosmos/common/MacAddress.java | 1 + .../com/azure/spring/data/cosmos/common/PropertyLoader.java | 1 + .../java/com/azure/spring/data/cosmos/core/CosmosTemplate.java | 1 + .../azure/spring/data/cosmos/core/ReactiveCosmosTemplate.java | 2 +- .../spring/data/cosmos/core/ResponseDiagnosticsProcessor.java | 1 + .../data/cosmos/core/generator/AbstractQueryGenerator.java | 1 + .../data/cosmos/core/mapping/event/CosmosMappingEvent.java | 1 + .../com/azure/spring/data/cosmos/core/query/CosmosQuery.java | 1 + .../java/com/azure/spring/data/cosmos/core/query/Criteria.java | 1 + .../com/azure/spring/data/cosmos/core/query/CriteriaType.java | 1 + .../spring/data/cosmos/exception/CosmosAccessException.java | 1 + .../spring/data/cosmos/exception/CosmosBadRequestException.java | 1 + .../spring/data/cosmos/exception/CosmosConflictException.java | 1 + .../spring/data/cosmos/exception/CosmosExceptionUtils.java | 1 + .../spring/data/cosmos/exception/CosmosForbiddenException.java | 1 + .../azure/spring/data/cosmos/exception/CosmosGoneException.java | 1 + .../cosmos/exception/CosmosInternalServerErrorException.java | 1 + .../data/cosmos/exception/CosmosInvalidPartitionException.java | 1 + .../data/cosmos/exception/CosmosMethodNotAllowedException.java | 1 + .../spring/data/cosmos/exception/CosmosNotFoundException.java | 1 + .../cosmos/exception/CosmosOperationCancelledException.java | 1 + .../cosmos/exception/CosmosPartitionIsMigratingException.java | 1 + .../cosmos/exception/CosmosPartitionKeyRangeGoneException.java | 1 + .../exception/CosmosPartitionKeyRangeIsSplittingException.java | 1 + .../cosmos/exception/CosmosPreconditionFailedException.java | 1 + .../cosmos/exception/CosmosRequestEntityTooLargeException.java | 1 + .../cosmos/exception/CosmosRequestRateTooLargeException.java | 1 + .../data/cosmos/exception/CosmosRequestTimeoutException.java | 1 + .../spring/data/cosmos/exception/CosmosRetryWithException.java | 1 + .../cosmos/exception/CosmosServiceUnavailableException.java | 1 + .../data/cosmos/exception/CosmosUnauthorizedException.java | 1 + .../spring/data/cosmos/exception/DatabaseCreationException.java | 1 + .../data/cosmos/exception/IllegalCollectionException.java | 1 + .../spring/data/cosmos/exception/IllegalQueryException.java | 1 + .../spring/data/cosmos/repository/query/CosmosQueryCreator.java | 1 + .../spring/data/cosmos/repository/query/CosmosQueryMethod.java | 1 + .../cosmos/repository/query/ReactiveCosmosQueryCreator.java | 1 + .../data/cosmos/repository/query/ReactiveCosmosQueryMethod.java | 1 + .../data/cosmos/repository/support/CosmosEntityInformation.java | 1 + .../data/cosmos/repository/support/SimpleCosmosRepository.java | 1 + .../repository/support/SimpleReactiveCosmosRepository.java | 1 + .../java/com/azure/spring/data/cosmos/AppConfiguration.java | 1 + .../azure/spring/data/cosmos/AppConfigurationCodeSnippet.java | 1 + .../azure/spring/data/cosmos/UserRepositoryConfiguration.java | 1 + .../cosmos/repository/integration/CustomerRepositoryIT.java | 1 + .../data/cosmos/repository/integration/ProjectRepositoryIT.java | 1 + .../pullrefresh/AppConfigurationEventListener.java | 1 + .../pushbusrefresh/AppConfigurationBusRefreshEventListener.java | 1 + .../pushrefresh/AppConfigurationRefreshEndpoint.java | 1 + .../pushrefresh/AppConfigurationRefreshEventListener.java | 1 + .../implementation/jdbc/JdbcConnectionStringEnhancer.java | 1 + .../keyvault/environment/KeyVaultPropertySource.java | 1 + .../core/implementation/connectionstring/ConnectionString.java | 1 + .../converter/AzureHttpRetryOptionsConverter.java | 1 + .../azure/spring/cloud/core/resource/AzureStorageResource.java | 1 + .../feature/management/FeatureManagementConfiguration.java | 1 + .../cloud/feature/management/models/FeatureDefinition.java | 1 + .../implementation/crud/AbstractResourceCrud.java | 1 + .../implementation/crud/ServiceBusNamespaceCrud.java | 1 + .../implementation/crud/ServiceBusQueueCrud.java | 1 + .../implementation/crud/ServiceBusTopicCrud.java | 1 + .../implementation/crud/ServiceBusTopicSubscriptionCrud.java | 1 + .../storage/AzureStorageRetryOptionsConverter.java | 1 + .../EventHubsChannelResourceManagerProvisioner.java | 1 + .../ServiceBusChannelResourceManagerProvisioner.java | 1 + .../spring/integration/core/handler/DefaultMessageHandler.java | 1 + .../core/DefaultEventHubsNamespaceProcessorFactory.java | 1 + .../core/DefaultEventHubsNamespaceProducerFactory.java | 1 + .../core/config/MethodEventHubsListenerEndpoint.java | 1 + .../core/DefaultServiceBusNamespaceConsumerFactory.java | 1 + .../core/DefaultServiceBusNamespaceProcessorFactory.java | 1 + .../core/DefaultServiceBusNamespaceProducerFactory.java | 1 + .../spring/messaging/servicebus/core/ServiceBusTemplate.java | 1 + .../core/config/MethodServiceBusListenerEndpoint.java | 1 + .../messaging/storage/queue/core/StorageQueueTemplate.java | 1 + .../factory/DefaultStorageQueueClientFactory.java | 1 + .../azure/spring/messaging/converter/AzureMessageConverter.java | 1 + .../AzureListenerAnnotationBeanPostProcessorAdapter.java | 1 + .../messaging/implementation/checkpoint/AzureCheckpointer.java | 1 + .../implementation/config/AbstractAzureListenerEndpoint.java | 1 + .../implementation/config/AzureListenerEndpointRegistrar.java | 1 + .../implementation/config/AzureListenerEndpointRegistry.java | 1 + .../implementation/config/MethodAzureListenerEndpoint.java | 1 + .../converter/AbstractJacksonAzureMessageConverter.java | 1 + .../listener/adapter/MessagingMessageListenerAdapter.java | 1 + .../endpoint/MethodAzureListenerTestEndpoint.java | 1 + 86 files changed, 86 insertions(+), 1 deletion(-) diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/MacAddress.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/MacAddress.java index 41ff8997e186..4c8ce721f0a4 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/MacAddress.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/MacAddress.java @@ -29,6 +29,7 @@ /** * Mac address class to transfer mac address to hash mac address. */ +@SuppressWarnings("deprecation") public final class MacAddress { private static final String UNKNOWN_MAC_ADDRESS = "Unknown-Mac-Address"; diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/PropertyLoader.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/PropertyLoader.java index 57265332dc44..8d8761445c93 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/PropertyLoader.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/common/PropertyLoader.java @@ -11,6 +11,7 @@ /** * Load properties from files */ +@SuppressWarnings("deprecation") public final class PropertyLoader { private static final String PROJECT_PROPERTY_FILE = "/azure-spring-data-cosmos.properties"; diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java index 9bea4d7322a0..357ba09107d9 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java @@ -82,6 +82,7 @@ /** * Template class for cosmos db */ +@SuppressWarnings("deprecation") public class CosmosTemplate implements CosmosOperations, ApplicationContextAware { private static final Logger LOGGER = LoggerFactory.getLogger(CosmosTemplate.class); diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplate.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplate.java index da0b587cf076..0ef821d8c42d 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplate.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplate.java @@ -69,7 +69,7 @@ /** * Template class of reactive cosmos */ -@SuppressWarnings("unchecked") +@SuppressWarnings({"unchecked", "deprecation"}) public class ReactiveCosmosTemplate implements ReactiveCosmosOperations, ApplicationContextAware { private static final Logger LOGGER = LoggerFactory.getLogger(ReactiveCosmosTemplate.class); diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ResponseDiagnosticsProcessor.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ResponseDiagnosticsProcessor.java index 15e2c09e7543..4c0bd6a8f04b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ResponseDiagnosticsProcessor.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ResponseDiagnosticsProcessor.java @@ -8,6 +8,7 @@ /** * Interface for processing cosmosDB response */ +@SuppressWarnings("deprecation") public interface ResponseDiagnosticsProcessor { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGenerator.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGenerator.java index 0f67e77cf890..ab634521548e 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGenerator.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGenerator.java @@ -26,6 +26,7 @@ /** * Base class for generating sql query */ +@SuppressWarnings("deprecation") public abstract class AbstractQueryGenerator { private static String tableName = ""; diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/event/CosmosMappingEvent.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/event/CosmosMappingEvent.java index f60b8ba62eb7..cf9186fbf674 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/event/CosmosMappingEvent.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/event/CosmosMappingEvent.java @@ -14,6 +14,7 @@ * * @param the type of the event. */ +@SuppressWarnings("deprecation") public class CosmosMappingEvent extends ApplicationEvent { private static final long serialVersionUID = 1L; diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/CosmosQuery.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/CosmosQuery.java index 24412c33559a..2d0e51a6c7fc 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/CosmosQuery.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/CosmosQuery.java @@ -17,6 +17,7 @@ /** * Class for cosmos query */ +@SuppressWarnings("deprecation") public class CosmosQuery { private final Criteria criteria; diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/Criteria.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/Criteria.java index d95ad67a4130..a822de941d23 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/Criteria.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/Criteria.java @@ -11,6 +11,7 @@ /** * Class of criteria */ +@SuppressWarnings("deprecation") public final class Criteria { private String subject; diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/CriteriaType.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/CriteriaType.java index 50e2354b9171..6a36ec2ab70b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/CriteriaType.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/query/CriteriaType.java @@ -13,6 +13,7 @@ /** * Enum of criteria type */ +@SuppressWarnings("deprecation") public enum CriteriaType { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosAccessException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosAccessException.java index a7f96013e0c3..44e4de6d766c 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosAccessException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosAccessException.java @@ -17,6 +17,7 @@ * rely on innerException for any retriable logic, or for more details on the failure of * the operation. */ +@SuppressWarnings("deprecation") public class CosmosAccessException extends DataAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosBadRequestException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosBadRequestException.java index ca3e5d87969e..f72ab0ba0dfb 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosBadRequestException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosBadRequestException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Bad Request Exception. */ +@SuppressWarnings("deprecation") public final class CosmosBadRequestException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosConflictException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosConflictException.java index fb89ba633791..a95a64d4edc5 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosConflictException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosConflictException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Conflict Exception. */ +@SuppressWarnings("deprecation") public final class CosmosConflictException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtils.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtils.java index d0f1fa090de3..56a439e23482 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtils.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtils.java @@ -13,6 +13,7 @@ /** * To handle and throw a cosmos db exception when access the database */ +@SuppressWarnings("deprecation") public class CosmosExceptionUtils { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosForbiddenException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosForbiddenException.java index bb132d43a388..860bc15b2506 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosForbiddenException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosForbiddenException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Forbidden Exception. */ +@SuppressWarnings("deprecation") public final class CosmosForbiddenException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosGoneException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosGoneException.java index 993dd709a927..9cfe2f4f93d2 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosGoneException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosGoneException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Gone Exception. */ +@SuppressWarnings("deprecation") public final class CosmosGoneException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosInternalServerErrorException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosInternalServerErrorException.java index d85631e06c51..a28d95b9e768 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosInternalServerErrorException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosInternalServerErrorException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Internal Server Error Exception. */ +@SuppressWarnings("deprecation") public final class CosmosInternalServerErrorException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosInvalidPartitionException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosInvalidPartitionException.java index eb3151ad92c7..16449c709a4c 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosInvalidPartitionException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosInvalidPartitionException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Invalid Partition Exception. */ +@SuppressWarnings("deprecation") public final class CosmosInvalidPartitionException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosMethodNotAllowedException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosMethodNotAllowedException.java index 1f2d7c03f41c..99088d151120 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosMethodNotAllowedException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosMethodNotAllowedException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Method Not Allowed Exception. */ +@SuppressWarnings("deprecation") public final class CosmosMethodNotAllowedException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosNotFoundException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosNotFoundException.java index 6ea9f396d8f9..791fa295c174 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosNotFoundException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosNotFoundException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Not Found Exception. */ +@SuppressWarnings("deprecation") public final class CosmosNotFoundException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosOperationCancelledException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosOperationCancelledException.java index 797dea283db8..c6ed3560a504 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosOperationCancelledException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosOperationCancelledException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Operation Cancelled Exception. */ +@SuppressWarnings("deprecation") public final class CosmosOperationCancelledException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosPartitionIsMigratingException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosPartitionIsMigratingException.java index eb088b7e2949..5aaa462e8d1c 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosPartitionIsMigratingException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosPartitionIsMigratingException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Partition Is Migrating Exception. */ +@SuppressWarnings("deprecation") public final class CosmosPartitionIsMigratingException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosPartitionKeyRangeGoneException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosPartitionKeyRangeGoneException.java index 0e72035b115a..baec7789b0d5 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosPartitionKeyRangeGoneException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosPartitionKeyRangeGoneException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Partition Key Range Gone Exception. */ +@SuppressWarnings("deprecation") public final class CosmosPartitionKeyRangeGoneException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosPartitionKeyRangeIsSplittingException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosPartitionKeyRangeIsSplittingException.java index a20e039f7db8..045b77d884d3 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosPartitionKeyRangeIsSplittingException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosPartitionKeyRangeIsSplittingException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Key Range Is Splitting Exception. */ +@SuppressWarnings("deprecation") public final class CosmosPartitionKeyRangeIsSplittingException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosPreconditionFailedException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosPreconditionFailedException.java index 03da7ea593e8..e77ac33eeb24 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosPreconditionFailedException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosPreconditionFailedException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Precondition Failed Exception. */ +@SuppressWarnings("deprecation") public final class CosmosPreconditionFailedException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosRequestEntityTooLargeException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosRequestEntityTooLargeException.java index 68272e00c35e..ef37e7411e16 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosRequestEntityTooLargeException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosRequestEntityTooLargeException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Request Entity Too Large Exception. */ +@SuppressWarnings("deprecation") public final class CosmosRequestEntityTooLargeException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosRequestRateTooLargeException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosRequestRateTooLargeException.java index 1685a38aa0fa..bc8e2e7657db 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosRequestRateTooLargeException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosRequestRateTooLargeException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Request Rate Too Large Exception. */ +@SuppressWarnings("deprecation") public final class CosmosRequestRateTooLargeException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosRequestTimeoutException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosRequestTimeoutException.java index de9b987005e5..ff0ee33ae262 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosRequestTimeoutException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosRequestTimeoutException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Request Timeout Exception. */ +@SuppressWarnings("deprecation") public final class CosmosRequestTimeoutException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosRetryWithException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosRetryWithException.java index 196b03ab7974..29f2f7dab7da 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosRetryWithException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosRetryWithException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Retry With Exception. */ +@SuppressWarnings("deprecation") public final class CosmosRetryWithException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosServiceUnavailableException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosServiceUnavailableException.java index 8599a95fc6a2..45ade5d204b1 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosServiceUnavailableException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosServiceUnavailableException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Service Unavailable Exception. */ +@SuppressWarnings("deprecation") public final class CosmosServiceUnavailableException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosUnauthorizedException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosUnauthorizedException.java index 23af773683ef..876a3fc678fe 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosUnauthorizedException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/CosmosUnauthorizedException.java @@ -7,6 +7,7 @@ /** * Exception for Cosmos Unauthorized Exception. */ +@SuppressWarnings("deprecation") public final class CosmosUnauthorizedException extends CosmosAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/DatabaseCreationException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/DatabaseCreationException.java index 6b42de838600..b6f4702fe49f 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/DatabaseCreationException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/DatabaseCreationException.java @@ -8,6 +8,7 @@ /** * General exception for illegal creation of cosmos db */ +@SuppressWarnings("deprecation") public class DatabaseCreationException extends DataAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/IllegalCollectionException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/IllegalCollectionException.java index 991338998643..e732a847377d 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/IllegalCollectionException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/IllegalCollectionException.java @@ -8,6 +8,7 @@ /** * General exception for illegal collection of cosmos db */ +@SuppressWarnings("deprecation") public class IllegalCollectionException extends DataAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/IllegalQueryException.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/IllegalQueryException.java index e1027f879cc3..6c6bc271c227 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/IllegalQueryException.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/exception/IllegalQueryException.java @@ -8,6 +8,7 @@ /** * General exception for illegal query of cosmos db */ +@SuppressWarnings("deprecation") public class IllegalQueryException extends DataAccessException { /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryCreator.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryCreator.java index 65c3f25f0cb8..02aa35b05b0c 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryCreator.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryCreator.java @@ -25,6 +25,7 @@ * How to bind values to the query. if CosmosDb already has binding capability, if not we would have to do it here in * some creative way.query creator are associated with part tree queries, */ +@SuppressWarnings("deprecation") public class CosmosQueryCreator extends AbstractQueryCreator { private final MappingContext mappingContext; diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryMethod.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryMethod.java index 3ab770dd8509..d6cfdc0e0f21 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryMethod.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosQueryMethod.java @@ -64,6 +64,7 @@ public boolean hasAnnotatedQuery() { * * @return the query string or null */ + @SuppressWarnings("deprecation") @Nullable public String getQueryAnnotation() { return annotatedQueryValue; diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryCreator.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryCreator.java index a7c6cd5bc9f5..d2495e9c6eab 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryCreator.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryCreator.java @@ -23,6 +23,7 @@ /** * Class for reactive cosmos query creators that create criteria based queries from a {@link PartTree}. */ +@SuppressWarnings("deprecation") public class ReactiveCosmosQueryCreator extends AbstractQueryCreator { private final MappingContext mappingContext; diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryMethod.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryMethod.java index 7b9c5b5dc839..191688725481 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryMethod.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/ReactiveCosmosQueryMethod.java @@ -77,6 +77,7 @@ public boolean hasAnnotatedQuery() { * Gets the annotated query or returns null * @return the annotated query String or null */ + @SuppressWarnings("deprecation") @Nullable public String getQueryAnnotation() { return annotatedQueryValue; diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformation.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformation.java index 7d462a7c5ceb..dd1c02c62272 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformation.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformation.java @@ -49,6 +49,7 @@ * @param domain type. * @param id type. */ +@SuppressWarnings("deprecation") public class CosmosEntityInformation extends AbstractEntityInformation { private static final Function, CosmosEntityInformation> ENTITY_INFORMATION_CREATOR = diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/SimpleCosmosRepository.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/SimpleCosmosRepository.java index 43c8aa4f143d..4f95ec668832 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/SimpleCosmosRepository.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/SimpleCosmosRepository.java @@ -34,6 +34,7 @@ * @param domain type. * @param id type. */ +@SuppressWarnings("deprecation") public class SimpleCosmosRepository implements CosmosRepository { private final CosmosOperations operation; diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/SimpleReactiveCosmosRepository.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/SimpleReactiveCosmosRepository.java index d1a1caab659b..e5b2b6760ffe 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/SimpleReactiveCosmosRepository.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/SimpleReactiveCosmosRepository.java @@ -30,6 +30,7 @@ * @param the type of the domain class managed by this repository. * @param the type of the id of the domain class managed by this repository. */ +@SuppressWarnings("deprecation") public class SimpleReactiveCosmosRepository implements ReactiveCosmosRepository { private final CosmosEntityInformation entityInformation; diff --git a/sdk/spring/azure-spring-data-cosmos/src/samples/java/com/azure/spring/data/cosmos/AppConfiguration.java b/sdk/spring/azure-spring-data-cosmos/src/samples/java/com/azure/spring/data/cosmos/AppConfiguration.java index 8cd043070c01..cc8886325c6f 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/samples/java/com/azure/spring/data/cosmos/AppConfiguration.java +++ b/sdk/spring/azure-spring-data-cosmos/src/samples/java/com/azure/spring/data/cosmos/AppConfiguration.java @@ -26,6 +26,7 @@ // BEGIN: readme-sample-AppConfiguration @Configuration @EnableCosmosRepositories +@SuppressWarnings("deprecation") public class AppConfiguration extends AbstractCosmosConfiguration { private static final Logger LOGGER = LoggerFactory.getLogger(AppConfiguration.class); diff --git a/sdk/spring/azure-spring-data-cosmos/src/samples/java/com/azure/spring/data/cosmos/AppConfigurationCodeSnippet.java b/sdk/spring/azure-spring-data-cosmos/src/samples/java/com/azure/spring/data/cosmos/AppConfigurationCodeSnippet.java index b6bf291860fe..701bad9d457d 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/samples/java/com/azure/spring/data/cosmos/AppConfigurationCodeSnippet.java +++ b/sdk/spring/azure-spring-data-cosmos/src/samples/java/com/azure/spring/data/cosmos/AppConfigurationCodeSnippet.java @@ -24,6 +24,7 @@ @Configuration @EnableCosmosRepositories +@SuppressWarnings("deprecation") public class AppConfigurationCodeSnippet extends AbstractCosmosConfiguration { private static final Logger LOGGER = LoggerFactory.getLogger(AppConfigurationCodeSnippet.class); diff --git a/sdk/spring/azure-spring-data-cosmos/src/samples/java/com/azure/spring/data/cosmos/UserRepositoryConfiguration.java b/sdk/spring/azure-spring-data-cosmos/src/samples/java/com/azure/spring/data/cosmos/UserRepositoryConfiguration.java index 0faf6a673960..096896168471 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/samples/java/com/azure/spring/data/cosmos/UserRepositoryConfiguration.java +++ b/sdk/spring/azure-spring-data-cosmos/src/samples/java/com/azure/spring/data/cosmos/UserRepositoryConfiguration.java @@ -27,6 +27,7 @@ @EnableConfigurationProperties(CosmosProperties.class) @EnableReactiveCosmosRepositories @PropertySource("classpath:application.properties") +@SuppressWarnings("deprecation") public class UserRepositoryConfiguration extends AbstractCosmosConfiguration { private static final Logger LOGGER = LoggerFactory.getLogger(UserRepositoryConfiguration.class); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CustomerRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CustomerRepositoryIT.java index eea90caa27bf..6c4932c62d98 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CustomerRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CustomerRepositoryIT.java @@ -26,6 +26,7 @@ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) +@SuppressWarnings("deprecation") public class CustomerRepositoryIT { private static final String USER_NAME_0 = "username-0"; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositoryIT.java index 78a1bba4a862..85e7c32b40ad 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositoryIT.java @@ -31,6 +31,7 @@ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) +@SuppressWarnings("deprecation") public class ProjectRepositoryIT { private static final String ID_0 = "id-0"; diff --git a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/src/main/java/com/azure/spring/cloud/appconfiguration/config/web/implementation/pullrefresh/AppConfigurationEventListener.java b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/src/main/java/com/azure/spring/cloud/appconfiguration/config/web/implementation/pullrefresh/AppConfigurationEventListener.java index 8fafe59374a6..54962d6d0765 100644 --- a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/src/main/java/com/azure/spring/cloud/appconfiguration/config/web/implementation/pullrefresh/AppConfigurationEventListener.java +++ b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/src/main/java/com/azure/spring/cloud/appconfiguration/config/web/implementation/pullrefresh/AppConfigurationEventListener.java @@ -17,6 +17,7 @@ /** * Listens for ServletRequestHandledEvents to check if the configurations need to be updated. */ +@SuppressWarnings("deprecation") public final class AppConfigurationEventListener implements ApplicationListener { private static final Logger LOGGER = LoggerFactory.getLogger(AppConfigurationEventListener.class); diff --git a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/src/main/java/com/azure/spring/cloud/appconfiguration/config/web/implementation/pushbusrefresh/AppConfigurationBusRefreshEventListener.java b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/src/main/java/com/azure/spring/cloud/appconfiguration/config/web/implementation/pushbusrefresh/AppConfigurationBusRefreshEventListener.java index 296f554f51ec..bdc86fe534f0 100644 --- a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/src/main/java/com/azure/spring/cloud/appconfiguration/config/web/implementation/pushbusrefresh/AppConfigurationBusRefreshEventListener.java +++ b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/src/main/java/com/azure/spring/cloud/appconfiguration/config/web/implementation/pushbusrefresh/AppConfigurationBusRefreshEventListener.java @@ -12,6 +12,7 @@ /** * Listens for AppConfigurationBusRefreshEvents and sets the App Configuration watch interval to zero. */ +@SuppressWarnings("deprecation") public final class AppConfigurationBusRefreshEventListener implements ApplicationListener { private static final Logger LOGGER = LoggerFactory.getLogger(AppConfigurationBusRefreshEventListener.class); diff --git a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/src/main/java/com/azure/spring/cloud/appconfiguration/config/web/implementation/pushrefresh/AppConfigurationRefreshEndpoint.java b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/src/main/java/com/azure/spring/cloud/appconfiguration/config/web/implementation/pushrefresh/AppConfigurationRefreshEndpoint.java index 1a97678e0cd9..913bbfadd5ab 100644 --- a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/src/main/java/com/azure/spring/cloud/appconfiguration/config/web/implementation/pushrefresh/AppConfigurationRefreshEndpoint.java +++ b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/src/main/java/com/azure/spring/cloud/appconfiguration/config/web/implementation/pushrefresh/AppConfigurationRefreshEndpoint.java @@ -31,6 +31,7 @@ * Endpoint for requesting new configurations to be loaded. */ @Endpoint(id = APPCONFIGURATION_REFRESH) +@SuppressWarnings("deprecation") public class AppConfigurationRefreshEndpoint implements ApplicationEventPublisherAware { private static final Logger LOGGER = LoggerFactory.getLogger(AppConfigurationRefreshEndpoint.class); diff --git a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/src/main/java/com/azure/spring/cloud/appconfiguration/config/web/implementation/pushrefresh/AppConfigurationRefreshEventListener.java b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/src/main/java/com/azure/spring/cloud/appconfiguration/config/web/implementation/pushrefresh/AppConfigurationRefreshEventListener.java index cfaf05050bc9..3a4836319df3 100644 --- a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/src/main/java/com/azure/spring/cloud/appconfiguration/config/web/implementation/pushrefresh/AppConfigurationRefreshEventListener.java +++ b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/src/main/java/com/azure/spring/cloud/appconfiguration/config/web/implementation/pushrefresh/AppConfigurationRefreshEventListener.java @@ -12,6 +12,7 @@ /** * Listens for AppConfigurationRefreshEvents and sets the App Configuration watch interval to zero. */ +@SuppressWarnings("deprecation") public final class AppConfigurationRefreshEventListener implements ApplicationListener { private static final Logger LOGGER = LoggerFactory.getLogger(AppConfigurationRefreshEventListener.class); diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/JdbcConnectionStringEnhancer.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/JdbcConnectionStringEnhancer.java index 1df3ce2349fc..d9fecd8b7f17 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/JdbcConnectionStringEnhancer.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/JdbcConnectionStringEnhancer.java @@ -22,6 +22,7 @@ * append more attributes value to an existing property. An enhanced JDBC URL can be * built from this enhancer. */ +@SuppressWarnings("deprecation") public final class JdbcConnectionStringEnhancer { private static final Logger LOGGER = LoggerFactory.getLogger(JdbcConnectionStringEnhancer.class); diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/keyvault/environment/KeyVaultPropertySource.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/keyvault/environment/KeyVaultPropertySource.java index da693d288af1..6686fe22cf9f 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/keyvault/environment/KeyVaultPropertySource.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/keyvault/environment/KeyVaultPropertySource.java @@ -24,6 +24,7 @@ * * @since 4.0.0 */ +@SuppressWarnings("deprecation") public class KeyVaultPropertySource extends EnumerablePropertySource { /** diff --git a/sdk/spring/spring-cloud-azure-core/src/main/java/com/azure/spring/cloud/core/implementation/connectionstring/ConnectionString.java b/sdk/spring/spring-cloud-azure-core/src/main/java/com/azure/spring/cloud/core/implementation/connectionstring/ConnectionString.java index 74d0b6e53636..3798e783095d 100644 --- a/sdk/spring/spring-cloud-azure-core/src/main/java/com/azure/spring/cloud/core/implementation/connectionstring/ConnectionString.java +++ b/sdk/spring/spring-cloud-azure-core/src/main/java/com/azure/spring/cloud/core/implementation/connectionstring/ConnectionString.java @@ -23,6 +23,7 @@ import static com.azure.spring.cloud.core.implementation.connectionstring.ConnectionStringSegments.ENDPOINT; +@SuppressWarnings("deprecation") class ConnectionString { private static final Logger LOGGER = LoggerFactory.getLogger(ConnectionString.class); diff --git a/sdk/spring/spring-cloud-azure-core/src/main/java/com/azure/spring/cloud/core/implementation/converter/AzureHttpRetryOptionsConverter.java b/sdk/spring/spring-cloud-azure-core/src/main/java/com/azure/spring/cloud/core/implementation/converter/AzureHttpRetryOptionsConverter.java index b409dbfca1a9..7033a6ce0ad6 100644 --- a/sdk/spring/spring-cloud-azure-core/src/main/java/com/azure/spring/cloud/core/implementation/converter/AzureHttpRetryOptionsConverter.java +++ b/sdk/spring/spring-cloud-azure-core/src/main/java/com/azure/spring/cloud/core/implementation/converter/AzureHttpRetryOptionsConverter.java @@ -15,6 +15,7 @@ /** * Converts a {@link RetryOptionsProvider.RetryOptions} to a {@link RetryOptions}. */ +@SuppressWarnings("deprecation") public final class AzureHttpRetryOptionsConverter implements Converter { private static final Logger LOGGER = LoggerFactory.getLogger(AzureHttpRetryOptionsConverter.class); diff --git a/sdk/spring/spring-cloud-azure-core/src/main/java/com/azure/spring/cloud/core/resource/AzureStorageResource.java b/sdk/spring/spring-cloud-azure-core/src/main/java/com/azure/spring/cloud/core/resource/AzureStorageResource.java index 1446f01a6d54..b6e8960ea0f8 100644 --- a/sdk/spring/spring-cloud-azure-core/src/main/java/com/azure/spring/cloud/core/resource/AzureStorageResource.java +++ b/sdk/spring/spring-cloud-azure-core/src/main/java/com/azure/spring/cloud/core/resource/AzureStorageResource.java @@ -16,6 +16,7 @@ * Abstract implementation of {@link WritableResource} for reading and writing objects in Azure StorageAccount. * */ +@SuppressWarnings("deprecation") abstract class AzureStorageResource extends AbstractResource implements WritableResource { private static final String PATH_DELIMITER = "/"; diff --git a/sdk/spring/spring-cloud-azure-feature-management/src/main/java/com/azure/spring/cloud/feature/management/FeatureManagementConfiguration.java b/sdk/spring/spring-cloud-azure-feature-management/src/main/java/com/azure/spring/cloud/feature/management/FeatureManagementConfiguration.java index 9096856a8082..3ba7bacbcc0b 100644 --- a/sdk/spring/spring-cloud-azure-feature-management/src/main/java/com/azure/spring/cloud/feature/management/FeatureManagementConfiguration.java +++ b/sdk/spring/spring-cloud-azure-feature-management/src/main/java/com/azure/spring/cloud/feature/management/FeatureManagementConfiguration.java @@ -29,6 +29,7 @@ */ @Configuration @EnableConfigurationProperties({ FeatureManagementConfigProperties.class, FeatureManagementProperties.class }) +@SuppressWarnings("deprecation") class FeatureManagementConfiguration implements ApplicationContextAware { private ApplicationContext appContext; diff --git a/sdk/spring/spring-cloud-azure-feature-management/src/main/java/com/azure/spring/cloud/feature/management/models/FeatureDefinition.java b/sdk/spring/spring-cloud-azure-feature-management/src/main/java/com/azure/spring/cloud/feature/management/models/FeatureDefinition.java index 7905f652e13d..3b99c38f47ad 100644 --- a/sdk/spring/spring-cloud-azure-feature-management/src/main/java/com/azure/spring/cloud/feature/management/models/FeatureDefinition.java +++ b/sdk/spring/spring-cloud-azure-feature-management/src/main/java/com/azure/spring/cloud/feature/management/models/FeatureDefinition.java @@ -16,6 +16,7 @@ * and variant references for feature flags that support multiple variations. */ @JsonIgnoreProperties(ignoreUnknown = true) +@SuppressWarnings("deprecation") public class FeatureDefinition { /** diff --git a/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/AbstractResourceCrud.java b/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/AbstractResourceCrud.java index 932c3a560cd3..752e52f91106 100644 --- a/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/AbstractResourceCrud.java +++ b/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/AbstractResourceCrud.java @@ -19,6 +19,7 @@ * @param The type of resource key. * @param

Azure resource properties. */ +@SuppressWarnings("deprecation") public abstract class AbstractResourceCrud implements ResourceCrud { private static final Logger LOGGER = LoggerFactory.getLogger(AbstractResourceCrud.class); diff --git a/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/ServiceBusNamespaceCrud.java b/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/ServiceBusNamespaceCrud.java index 469cfd467dc8..7bd58516c408 100644 --- a/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/ServiceBusNamespaceCrud.java +++ b/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/ServiceBusNamespaceCrud.java @@ -12,6 +12,7 @@ /** * Resource manager for Service Bus namespace. */ +@SuppressWarnings("deprecation") public class ServiceBusNamespaceCrud extends AbstractResourceCrud { public ServiceBusNamespaceCrud(@NonNull AzureResourceManager azureResourceManager, diff --git a/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/ServiceBusQueueCrud.java b/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/ServiceBusQueueCrud.java index f480b774a2b9..a563bcaa7ee9 100644 --- a/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/ServiceBusQueueCrud.java +++ b/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/ServiceBusQueueCrud.java @@ -16,6 +16,7 @@ /** * Resource manager for Service Bus queue. */ +@SuppressWarnings("deprecation") public class ServiceBusQueueCrud extends AbstractResourceCrud, ServiceBusQueueProperties> { diff --git a/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/ServiceBusTopicCrud.java b/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/ServiceBusTopicCrud.java index 9215a7c23612..3f026d56647e 100644 --- a/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/ServiceBusTopicCrud.java +++ b/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/ServiceBusTopicCrud.java @@ -16,6 +16,7 @@ /** * Resource manager for Service Bus topic. */ +@SuppressWarnings("deprecation") public class ServiceBusTopicCrud extends AbstractResourceCrud, ServiceBusTopicProperties> { public ServiceBusTopicCrud(AzureResourceManager azureResourceManager, AzureResourceMetadata azureResourceMetadata) { diff --git a/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/ServiceBusTopicSubscriptionCrud.java b/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/ServiceBusTopicSubscriptionCrud.java index 4bd7bdf98e35..c925e7d52db1 100644 --- a/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/ServiceBusTopicSubscriptionCrud.java +++ b/sdk/spring/spring-cloud-azure-resourcemanager/src/main/java/com/azure/spring/cloud/resourcemanager/implementation/crud/ServiceBusTopicSubscriptionCrud.java @@ -16,6 +16,7 @@ /** * Resource manager for Service Bus topic subscription. */ +@SuppressWarnings("deprecation") public class ServiceBusTopicSubscriptionCrud extends AbstractResourceCrud, ServiceBusTopicProperties> { diff --git a/sdk/spring/spring-cloud-azure-service/src/main/java/com/azure/spring/cloud/service/implementation/storage/AzureStorageRetryOptionsConverter.java b/sdk/spring/spring-cloud-azure-service/src/main/java/com/azure/spring/cloud/service/implementation/storage/AzureStorageRetryOptionsConverter.java index 2d4099e99e0e..34c26a4c2b5f 100644 --- a/sdk/spring/spring-cloud-azure-service/src/main/java/com/azure/spring/cloud/service/implementation/storage/AzureStorageRetryOptionsConverter.java +++ b/sdk/spring/spring-cloud-azure-service/src/main/java/com/azure/spring/cloud/service/implementation/storage/AzureStorageRetryOptionsConverter.java @@ -18,6 +18,7 @@ /** * Converts a {@link StorageRetry} to a {@link RequestRetryOptions}. */ +@SuppressWarnings("deprecation") public final class AzureStorageRetryOptionsConverter implements Converter { public static final AzureStorageRetryOptionsConverter STORAGE_RETRY_CONVERTER = new AzureStorageRetryOptionsConverter(); diff --git a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/main/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/provisioning/EventHubsChannelResourceManagerProvisioner.java b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/main/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/provisioning/EventHubsChannelResourceManagerProvisioner.java index ed33006b0ed7..5b60941550af 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/main/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/provisioning/EventHubsChannelResourceManagerProvisioner.java +++ b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/main/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/provisioning/EventHubsChannelResourceManagerProvisioner.java @@ -11,6 +11,7 @@ /** * */ +@SuppressWarnings("deprecation") public class EventHubsChannelResourceManagerProvisioner extends EventHubsChannelProvisioner { private final String namespace; diff --git a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/main/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/provisioning/ServiceBusChannelResourceManagerProvisioner.java b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/main/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/provisioning/ServiceBusChannelResourceManagerProvisioner.java index dcdaef375dde..e9176a2fef17 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/main/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/provisioning/ServiceBusChannelResourceManagerProvisioner.java +++ b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/main/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/provisioning/ServiceBusChannelResourceManagerProvisioner.java @@ -26,6 +26,7 @@ /** * */ +@SuppressWarnings("deprecation") public class ServiceBusChannelResourceManagerProvisioner extends ServiceBusChannelProvisioner { private final String namespace; diff --git a/sdk/spring/spring-integration-azure-core/src/main/java/com/azure/spring/integration/core/handler/DefaultMessageHandler.java b/sdk/spring/spring-integration-azure-core/src/main/java/com/azure/spring/integration/core/handler/DefaultMessageHandler.java index f05d310d7a0c..e63b672b2627 100644 --- a/sdk/spring/spring-integration-azure-core/src/main/java/com/azure/spring/integration/core/handler/DefaultMessageHandler.java +++ b/sdk/spring/spring-integration-azure-core/src/main/java/com/azure/spring/integration/core/handler/DefaultMessageHandler.java @@ -43,6 +43,7 @@ *

* It delegates real operation to {@link SendOperation} which supports synchronous and asynchronous sending. */ +@SuppressWarnings("deprecation") public class DefaultMessageHandler extends AbstractMessageProducingHandler { private static final Logger LOGGER = LoggerFactory.getLogger(DefaultMessageHandler.class); private static final long DEFAULT_SEND_TIMEOUT = 10000; diff --git a/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/core/DefaultEventHubsNamespaceProcessorFactory.java b/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/core/DefaultEventHubsNamespaceProcessorFactory.java index 6b63c9d0536b..fe1b5355bdc3 100644 --- a/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/core/DefaultEventHubsNamespaceProcessorFactory.java +++ b/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/core/DefaultEventHubsNamespaceProcessorFactory.java @@ -50,6 +50,7 @@ * advantage. *

*/ +@SuppressWarnings("deprecation") public final class DefaultEventHubsNamespaceProcessorFactory implements EventHubsProcessorFactory, DisposableBean { private static final Logger LOGGER = LoggerFactory.getLogger(DefaultEventHubsNamespaceProcessorFactory.class); diff --git a/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/core/DefaultEventHubsNamespaceProducerFactory.java b/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/core/DefaultEventHubsNamespaceProducerFactory.java index bfc0635428e1..caec7bd442b5 100644 --- a/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/core/DefaultEventHubsNamespaceProducerFactory.java +++ b/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/core/DefaultEventHubsNamespaceProducerFactory.java @@ -38,6 +38,7 @@ * take advantage. *

*/ +@SuppressWarnings("deprecation") public final class DefaultEventHubsNamespaceProducerFactory implements EventHubsProducerFactory, DisposableBean { private final List listeners = new ArrayList<>(); diff --git a/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/implementation/core/config/MethodEventHubsListenerEndpoint.java b/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/implementation/core/config/MethodEventHubsListenerEndpoint.java index 83adc1d605cd..391488fd06bc 100644 --- a/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/implementation/core/config/MethodEventHubsListenerEndpoint.java +++ b/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/implementation/core/config/MethodEventHubsListenerEndpoint.java @@ -28,6 +28,7 @@ * an incoming message for this endpoint. * */ +@SuppressWarnings("deprecation") public class MethodEventHubsListenerEndpoint extends AbstractEventHubsListenerEndpoint implements MethodAzureListenerEndpoint { diff --git a/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceConsumerFactory.java b/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceConsumerFactory.java index 1f907cae13f9..3b6d23a785c9 100644 --- a/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceConsumerFactory.java +++ b/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceConsumerFactory.java @@ -39,6 +39,7 @@ *

* @since 5.22.0 */ +@SuppressWarnings("deprecation") public final class DefaultServiceBusNamespaceConsumerFactory implements ServiceBusConsumerFactory, DisposableBean { private static final Logger LOGGER = LoggerFactory.getLogger(DefaultServiceBusNamespaceConsumerFactory.class); private final List listeners = new ArrayList<>(); diff --git a/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProcessorFactory.java b/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProcessorFactory.java index d0edbb3b874d..4c38e4039671 100644 --- a/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProcessorFactory.java +++ b/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProcessorFactory.java @@ -48,6 +48,7 @@ * advantage. *

*/ +@SuppressWarnings("deprecation") public final class DefaultServiceBusNamespaceProcessorFactory implements ServiceBusProcessorFactory, DisposableBean { private static final Logger LOGGER = LoggerFactory.getLogger(DefaultServiceBusNamespaceProcessorFactory.class); diff --git a/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProducerFactory.java b/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProducerFactory.java index deb22a075610..b7bec13a27d4 100644 --- a/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProducerFactory.java +++ b/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProducerFactory.java @@ -36,6 +36,7 @@ * take advantage. *

*/ +@SuppressWarnings("deprecation") public final class DefaultServiceBusNamespaceProducerFactory implements ServiceBusProducerFactory, DisposableBean { private final List listeners = new ArrayList<>(); diff --git a/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/ServiceBusTemplate.java b/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/ServiceBusTemplate.java index cef8e34bee93..7469ccb7a402 100644 --- a/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/ServiceBusTemplate.java +++ b/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/ServiceBusTemplate.java @@ -34,6 +34,7 @@ * via related {@link NamespaceProperties} or producer {@link PropertiesSupplier}. *

*/ +@SuppressWarnings("deprecation") public class ServiceBusTemplate implements SendOperation { private static final Logger LOGGER = LoggerFactory.getLogger(ServiceBusTemplate.class); private static final ServiceBusMessageConverter DEFAULT_CONVERTER = new ServiceBusMessageConverter(); diff --git a/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/implementation/core/config/MethodServiceBusListenerEndpoint.java b/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/implementation/core/config/MethodServiceBusListenerEndpoint.java index 5f7a4cf07257..6700289b778e 100644 --- a/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/implementation/core/config/MethodServiceBusListenerEndpoint.java +++ b/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/implementation/core/config/MethodServiceBusListenerEndpoint.java @@ -27,6 +27,7 @@ * an incoming message for this endpoint. * */ +@SuppressWarnings("deprecation") public class MethodServiceBusListenerEndpoint extends AbstractAzureListenerEndpoint implements MethodAzureListenerEndpoint { diff --git a/sdk/spring/spring-messaging-azure-storage-queue/src/main/java/com/azure/spring/messaging/storage/queue/core/StorageQueueTemplate.java b/sdk/spring/spring-messaging-azure-storage-queue/src/main/java/com/azure/spring/messaging/storage/queue/core/StorageQueueTemplate.java index 383f34d8d2b5..7eb9becabf5c 100644 --- a/sdk/spring/spring-messaging-azure-storage-queue/src/main/java/com/azure/spring/messaging/storage/queue/core/StorageQueueTemplate.java +++ b/sdk/spring/spring-messaging-azure-storage-queue/src/main/java/com/azure/spring/messaging/storage/queue/core/StorageQueueTemplate.java @@ -31,6 +31,7 @@ * You should checkpoint if message has been processed successfully, otherwise it will be visible again after certain * time specified by {@link #receiveAsync(String, Duration)} }. */ +@SuppressWarnings("deprecation") public class StorageQueueTemplate implements SendOperation { private static final Logger LOG = LoggerFactory.getLogger(StorageQueueTemplate.class); private static final String MSG_FAIL_CHECKPOINT = "Failed to checkpoint %s in storage queue '%s'"; diff --git a/sdk/spring/spring-messaging-azure-storage-queue/src/main/java/com/azure/spring/messaging/storage/queue/implementation/factory/DefaultStorageQueueClientFactory.java b/sdk/spring/spring-messaging-azure-storage-queue/src/main/java/com/azure/spring/messaging/storage/queue/implementation/factory/DefaultStorageQueueClientFactory.java index 3be2568070a3..9034267adf8b 100644 --- a/sdk/spring/spring-messaging-azure-storage-queue/src/main/java/com/azure/spring/messaging/storage/queue/implementation/factory/DefaultStorageQueueClientFactory.java +++ b/sdk/spring/spring-messaging-azure-storage-queue/src/main/java/com/azure/spring/messaging/storage/queue/implementation/factory/DefaultStorageQueueClientFactory.java @@ -21,6 +21,7 @@ * The {@link StorageQueueClientFactory} implementation to produce new {@link QueueAsyncClient} instances * for provided {@link QueueServiceAsyncClient} on each {@link #createQueueClient} invocation. */ +@SuppressWarnings("deprecation") public final class DefaultStorageQueueClientFactory implements StorageQueueClientFactory, DisposableBean { private final List listeners = new ArrayList<>(); diff --git a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/converter/AzureMessageConverter.java b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/converter/AzureMessageConverter.java index c48629154d47..ff2665739817 100644 --- a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/converter/AzureMessageConverter.java +++ b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/converter/AzureMessageConverter.java @@ -17,6 +17,7 @@ * @param The Azure message type when sending to the broker using Azure SDK. * @param The Azure message type when receiving from the broker using Azure SDK. */ +@SuppressWarnings("deprecation") public interface AzureMessageConverter { /** diff --git a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/annotation/AzureListenerAnnotationBeanPostProcessorAdapter.java b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/annotation/AzureListenerAnnotationBeanPostProcessorAdapter.java index 2ccd3f16deff..1fd2dd427f22 100644 --- a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/annotation/AzureListenerAnnotationBeanPostProcessorAdapter.java +++ b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/annotation/AzureListenerAnnotationBeanPostProcessorAdapter.java @@ -63,6 +63,7 @@ * @see AzureListenerEndpointRegistrar * @see AzureListenerEndpointRegistry */ +@SuppressWarnings("deprecation") public abstract class AzureListenerAnnotationBeanPostProcessorAdapter implements MergedBeanDefinitionPostProcessor, Ordered, BeanFactoryAware, SmartInitializingSingleton { diff --git a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/checkpoint/AzureCheckpointer.java b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/checkpoint/AzureCheckpointer.java index 66d85e7cfbc0..30bd63dccfd9 100644 --- a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/checkpoint/AzureCheckpointer.java +++ b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/checkpoint/AzureCheckpointer.java @@ -12,6 +12,7 @@ /** * Azure implementation for check point callback. */ +@SuppressWarnings("deprecation") public class AzureCheckpointer implements Checkpointer { private final Supplier> success; diff --git a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/config/AbstractAzureListenerEndpoint.java b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/config/AbstractAzureListenerEndpoint.java index 62ec9f88ed8f..dc1286e4b2f4 100644 --- a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/config/AbstractAzureListenerEndpoint.java +++ b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/config/AbstractAzureListenerEndpoint.java @@ -13,6 +13,7 @@ * Base model for a Azure listener endpoint. * */ +@SuppressWarnings("deprecation") public abstract class AbstractAzureListenerEndpoint implements AzureListenerEndpoint { protected String id = ""; diff --git a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/config/AzureListenerEndpointRegistrar.java b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/config/AzureListenerEndpointRegistrar.java index a3e38ee19bfb..a326b22428ac 100644 --- a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/config/AzureListenerEndpointRegistrar.java +++ b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/config/AzureListenerEndpointRegistrar.java @@ -19,6 +19,7 @@ * Helper bean for registering {@link AzureListenerEndpoint} with a {@link AzureListenerEndpointRegistry}. * */ +@SuppressWarnings("deprecation") public class AzureListenerEndpointRegistrar implements BeanFactoryAware, InitializingBean { private final List endpointDescriptors = new ArrayList<>(); diff --git a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/config/AzureListenerEndpointRegistry.java b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/config/AzureListenerEndpointRegistry.java index 6c841e0d6347..7a7c05e99578 100644 --- a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/config/AzureListenerEndpointRegistry.java +++ b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/config/AzureListenerEndpointRegistry.java @@ -40,6 +40,7 @@ * @see MessageListenerContainer * @see MessageListenerContainerFactory */ +@SuppressWarnings("deprecation") public class AzureListenerEndpointRegistry implements DisposableBean, SmartLifecycle, ApplicationContextAware, ApplicationListener { diff --git a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/config/MethodAzureListenerEndpoint.java b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/config/MethodAzureListenerEndpoint.java index 23821a6e2184..1a3d7783db07 100644 --- a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/config/MethodAzureListenerEndpoint.java +++ b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/config/MethodAzureListenerEndpoint.java @@ -16,6 +16,7 @@ * Model for a method Azure listener endpoint. * */ +@SuppressWarnings("deprecation") public interface MethodAzureListenerEndpoint extends BeanFactoryAware, AzureListenerEndpoint { /** diff --git a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/converter/AbstractJacksonAzureMessageConverter.java b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/converter/AbstractJacksonAzureMessageConverter.java index f4fcb36fa7f1..6e0d806f3442 100644 --- a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/converter/AbstractJacksonAzureMessageConverter.java +++ b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/converter/AbstractJacksonAzureMessageConverter.java @@ -23,6 +23,7 @@ * Abstract class handles common conversion logic between <T> and {@link Message} * */ +@SuppressWarnings("deprecation") public abstract class AbstractJacksonAzureMessageConverter implements AzureMessageConverter { /** diff --git a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/listener/adapter/MessagingMessageListenerAdapter.java b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/listener/adapter/MessagingMessageListenerAdapter.java index 2f76f3214a69..1fa503e56634 100644 --- a/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/listener/adapter/MessagingMessageListenerAdapter.java +++ b/sdk/spring/spring-messaging-azure/src/main/java/com/azure/spring/messaging/implementation/listener/adapter/MessagingMessageListenerAdapter.java @@ -17,6 +17,7 @@ * Azure message headers using a configurable {@link com.azure.spring.messaging.converter.AzureMessageConverter}. * */ +@SuppressWarnings("deprecation") public abstract class MessagingMessageListenerAdapter { @Nullable diff --git a/sdk/spring/spring-messaging-azure/src/test/java/com/azure/spring/messaging/implementation/endpoint/MethodAzureListenerTestEndpoint.java b/sdk/spring/spring-messaging-azure/src/test/java/com/azure/spring/messaging/implementation/endpoint/MethodAzureListenerTestEndpoint.java index b18fbd9ecc75..dff75a9e46e0 100644 --- a/sdk/spring/spring-messaging-azure/src/test/java/com/azure/spring/messaging/implementation/endpoint/MethodAzureListenerTestEndpoint.java +++ b/sdk/spring/spring-messaging-azure/src/test/java/com/azure/spring/messaging/implementation/endpoint/MethodAzureListenerTestEndpoint.java @@ -20,6 +20,7 @@ import java.lang.reflect.Method; +@SuppressWarnings("deprecation") public class MethodAzureListenerTestEndpoint extends AbstractAzureListenerEndpoint implements MethodAzureListenerEndpoint { From de5beaf0ac86cc9336074a15ad5c30bb584981a6 Mon Sep 17 00:00:00 2001 From: muyao Date: Wed, 10 Sep 2025 09:03:15 +0800 Subject: [PATCH 004/186] replace ListenableFutureCallback --- .../core/handler/DefaultMessageHandler.java | 49 ++++++++++--------- .../InstrumentationSendCallback.java | 21 ++++---- .../handler/DefaultMessageHandlerTests.java | 13 ++--- 3 files changed, 39 insertions(+), 44 deletions(-) diff --git a/sdk/spring/spring-integration-azure-core/src/main/java/com/azure/spring/integration/core/handler/DefaultMessageHandler.java b/sdk/spring/spring-integration-azure-core/src/main/java/com/azure/spring/integration/core/handler/DefaultMessageHandler.java index e63b672b2627..cd772b49a577 100644 --- a/sdk/spring/spring-integration-azure-core/src/main/java/com/azure/spring/integration/core/handler/DefaultMessageHandler.java +++ b/sdk/spring/spring-integration-azure-core/src/main/java/com/azure/spring/integration/core/handler/DefaultMessageHandler.java @@ -23,7 +23,6 @@ import org.springframework.messaging.MessageChannel; import org.springframework.messaging.MessageDeliveryException; import org.springframework.util.Assert; -import org.springframework.util.concurrent.ListenableFutureCallback; import reactor.core.publisher.Mono; import reactor.core.scheduler.Schedulers; @@ -32,7 +31,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Optional; +import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeoutException; +import java.util.function.BiConsumer; import static com.azure.spring.messaging.AzureHeaders.PARTITION_ID; import static com.azure.spring.messaging.AzureHeaders.PARTITION_KEY; @@ -51,8 +52,7 @@ public class DefaultMessageHandler extends AbstractMessageProducingHandler { private final SendOperation sendOperation; private boolean sync = false; - @SuppressWarnings("removal") - private ListenableFutureCallback sendCallback; + private BiConsumer sendCallback; private EvaluationContext evaluationContext; private Expression sendTimeoutExpression = new ValueExpression<>(DEFAULT_SEND_TIMEOUT); private ErrorMessageStrategy errorMessageStrategy = new DefaultErrorMessageStrategy(); @@ -109,28 +109,30 @@ protected void handleMessageInternal(Message message) { } - @SuppressWarnings("removal") private void handleSendResponseAsync(Mono mono, Message message) { - mono.doOnError(ex -> { - if (LOGGER.isWarnEnabled()) { - LOGGER.warn("{} sent failed in async mode due to {}", message, ex.getMessage()); - } - if (this.sendCallback != null) { - this.sendCallback.onFailure(ex); - } + CompletableFuture future = mono.toFuture(); + future.whenComplete((t, ex) -> { + if (ex != null) { + if (LOGGER.isWarnEnabled()) { + LOGGER.warn("{} sent failed in async mode due to {}", message, ex.getMessage()); + } + if (this.sendCallback != null) { + this.sendCallback.accept(null, ex); + } - if (getSendFailureChannel() != null) { - this.messagingTemplate.send(getSendFailureChannel(), getErrorMessageStrategy() - .buildErrorMessage(new AzureSendFailureException(message, ex), null)); - } - }).doOnSuccess(t -> { - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("{} sent successfully in async mode", message); - } - if (this.sendCallback != null) { - this.sendCallback.onSuccess((Void) t); + if (getSendFailureChannel() != null) { + this.messagingTemplate.send(getSendFailureChannel(), getErrorMessageStrategy() + .buildErrorMessage(new AzureSendFailureException(message, ex), null)); + } + } else { + if (LOGGER.isDebugEnabled()) { + LOGGER.debug("{} sent successfully in async mode", message); + } + if (this.sendCallback != null) { + this.sendCallback.accept(null, null); + } } - }).subscribe(); + }); } private void waitingSendResponse(Mono mono, Message message) { @@ -265,8 +267,7 @@ private Map buildPropertiesMap() { * * @param callback the call back */ - @SuppressWarnings("removal") - public void setSendCallback(ListenableFutureCallback callback) { + public void setSendCallback(BiConsumer callback) { this.sendCallback = callback; } diff --git a/sdk/spring/spring-integration-azure-core/src/main/java/com/azure/spring/integration/core/implementation/instrumentation/InstrumentationSendCallback.java b/sdk/spring/spring-integration-azure-core/src/main/java/com/azure/spring/integration/core/implementation/instrumentation/InstrumentationSendCallback.java index 1ded138c1d89..58598bd018d2 100644 --- a/sdk/spring/spring-integration-azure-core/src/main/java/com/azure/spring/integration/core/implementation/instrumentation/InstrumentationSendCallback.java +++ b/sdk/spring/spring-integration-azure-core/src/main/java/com/azure/spring/integration/core/implementation/instrumentation/InstrumentationSendCallback.java @@ -5,13 +5,12 @@ import com.azure.spring.integration.core.instrumentation.Instrumentation; import com.azure.spring.integration.core.instrumentation.InstrumentationManager; -import org.springframework.util.concurrent.ListenableFutureCallback; +import java.util.function.BiConsumer; /** * */ -@SuppressWarnings({"deprecation", "removal"}) -public class InstrumentationSendCallback implements ListenableFutureCallback { +public class InstrumentationSendCallback implements BiConsumer { private final InstrumentationManager instrumentationManager; @@ -29,13 +28,13 @@ public InstrumentationSendCallback(String instrumentationId, InstrumentationMana } @Override - public void onFailure(Throwable ex) { - this.instrumentationManager.getHealthInstrumentation(instrumentationId) - .setStatus(Instrumentation.Status.DOWN, ex); - } - - @Override - public void onSuccess(Void result) { - this.instrumentationManager.getHealthInstrumentation(instrumentationId).setStatus(Instrumentation.Status.UP); + public void accept(Void result, Throwable ex) { + if (ex != null) { + instrumentationManager.getHealthInstrumentation(instrumentationId) + .setStatus(Instrumentation.Status.DOWN, ex); + } else { + instrumentationManager.getHealthInstrumentation(instrumentationId) + .setStatus(Instrumentation.Status.UP); + } } } diff --git a/sdk/spring/spring-integration-azure-core/src/test/java/com/azure/spring/integration/core/handler/DefaultMessageHandlerTests.java b/sdk/spring/spring-integration-azure-core/src/test/java/com/azure/spring/integration/core/handler/DefaultMessageHandlerTests.java index 4a7046abf615..b869c60578cc 100644 --- a/sdk/spring/spring-integration-azure-core/src/test/java/com/azure/spring/integration/core/handler/DefaultMessageHandlerTests.java +++ b/sdk/spring/spring-integration-azure-core/src/test/java/com/azure/spring/integration/core/handler/DefaultMessageHandlerTests.java @@ -16,13 +16,13 @@ import org.springframework.messaging.Message; import org.springframework.messaging.support.GenericMessage; import org.springframework.test.util.ReflectionTestUtils; -import org.springframework.util.concurrent.ListenableFutureCallback; import reactor.core.publisher.Mono; import java.nio.charset.StandardCharsets; import java.util.Collections; import java.util.HashMap; import java.util.Map; +import java.util.function.BiConsumer; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -70,15 +70,10 @@ public void testSend() { } @Test - @SuppressWarnings({"deprecation", "removal"}) public void testSendCallback() { - ListenableFutureCallback callbackSpy = spy(new ListenableFutureCallback() { + BiConsumer callbackSpy = spy(new BiConsumer() { @Override - public void onFailure(Throwable ex) { - } - - @Override - public void onSuccess(Void v) { + public void accept(Void v, Throwable ex) { } }); @@ -86,7 +81,7 @@ public void onSuccess(Void v) { this.handler.handleMessage(this.message); - verify(callbackSpy, times(1)).onSuccess(eq(null)); + verify(callbackSpy, times(1)).accept(eq(null), eq(null)); } @Test From 0991f9731a8a1096883058725d4e38223480a50d Mon Sep 17 00:00:00 2001 From: muyao Date: Fri, 14 Nov 2025 10:38:39 +0800 Subject: [PATCH 005/186] add spring-boot-persistence and replace --- eng/versioning/external_dependencies.txt | 1 + sdk/spring/azure-spring-data-cosmos/pom.xml | 5 +++++ .../com/azure/spring/data/cosmos/core/CosmosTemplateIT.java | 2 +- .../spring/data/cosmos/core/CosmosTemplatePartitionIT.java | 2 +- .../cosmos/core/MultiTenantContainerCosmosFactoryIT.java | 2 +- .../data/cosmos/core/MultiTenantDBCosmosFactoryIT.java | 2 +- .../spring/data/cosmos/core/ReactiveCosmosTemplateIT.java | 2 +- .../data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java | 2 +- .../core/ReactiveMultiTenantContainerCosmosFactoryIT.java | 2 +- .../cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java | 2 +- 10 files changed, 14 insertions(+), 8 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index cbcc0991487b..8327c5e27a89 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -370,6 +370,7 @@ springboot3_org.springframework.boot:spring-boot-autoconfigure;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-configuration-metadata;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-configuration-processor;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-docker-compose;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-persistence;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-starter-actuator;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-starter-data-jdbc;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-starter-integration;4.0.0-RC2 diff --git a/sdk/spring/azure-spring-data-cosmos/pom.xml b/sdk/spring/azure-spring-data-cosmos/pom.xml index c853393f446f..f735b234e66b 100644 --- a/sdk/spring/azure-spring-data-cosmos/pom.xml +++ b/sdk/spring/azure-spring-data-cosmos/pom.xml @@ -97,6 +97,11 @@ spring-expression 7.0.0-RC3
+ + org.springframework.boot + spring-boot-persistence + 4.0.0-RC2 + com.azure azure-cosmos diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java index f0939fae596a..8a7c9a7c1bac 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java @@ -52,7 +52,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.boot.persistence.autoconfigure.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.data.auditing.IsNewAwareAuditingHandler; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java index ad9cf498a005..08b744b9a2ba 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java @@ -27,7 +27,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.boot.persistence.autoconfigure.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.data.domain.Page; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java index a301a7d65e97..580a0d4b0f4b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java @@ -22,7 +22,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.boot.persistence.autoconfigure.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.test.context.ContextConfiguration; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java index dc16252d651a..6cf5a2bb9b79 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java @@ -22,7 +22,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.boot.persistence.autoconfigure.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.test.context.ContextConfiguration; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java index 98e4f466400c..65f1525e6a24 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java @@ -55,7 +55,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.boot.persistence.autoconfigure.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.data.auditing.IsNewAwareAuditingHandler; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java index dcc7bd8a1e46..4f7d9c226ac3 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java @@ -25,7 +25,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.boot.persistence.autoconfigure.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.data.repository.query.parser.Part; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java index 88b78a9e9ade..c45551dc24d2 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java @@ -22,7 +22,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.boot.persistence.autoconfigure.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.test.context.ContextConfiguration; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java index a865e65a1a07..d716681b485f 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java @@ -22,7 +22,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.boot.persistence.autoconfigure.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.test.context.ContextConfiguration; From 304dce174d0b3213079f5e2cdadd2b2d29fbfe20 Mon Sep 17 00:00:00 2001 From: muyao Date: Mon, 17 Nov 2025 10:38:51 +0800 Subject: [PATCH 006/186] suppress warnings --- .../test/java/com/azure/spring/data/cosmos/ContainerLockIT.java | 2 +- .../java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java | 1 + .../com/azure/spring/data/cosmos/core/CosmosTemplateIT.java | 1 + .../spring/data/cosmos/core/CosmosTemplatePartitionIT.java | 1 + .../data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java | 1 + .../spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java | 1 + .../azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java | 1 + .../data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java | 1 + .../core/ReactiveMultiTenantContainerCosmosFactoryIT.java | 1 + .../data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java | 1 + .../core/mapping/event/ApplicationContextEventErrorIT.java | 1 + .../mapping/event/ApplicationContextEventErrorReactiveIT.java | 1 + .../cosmos/core/mapping/event/ApplicationContextEventIT.java | 1 + .../core/mapping/event/ApplicationContextEventReactiveIT.java | 1 + .../spring/data/cosmos/exception/CosmosExceptionUtilsTest.java | 1 + .../spring/data/cosmos/repository/EntityImplRepositoryIT.java | 1 + .../spring/data/cosmos/repository/MultiCosmosTemplateIT.java | 1 + .../cosmos/repository/ReactiveUUIDIdDomainRepositoryIT.java | 1 + .../data/cosmos/repository/integration/AddressRepositoryIT.java | 1 + .../repository/integration/AddressRepositoryNoMetricsIT.java | 1 + .../data/cosmos/repository/integration/AnnotatedQueryIT.java | 1 + .../spring/data/cosmos/repository/integration/AuditableIT.java | 1 + .../cosmos/repository/integration/BasicItemRepositoryIT.java | 1 + .../data/cosmos/repository/integration/BigTypeRepositoryIT.java | 1 + .../data/cosmos/repository/integration/CompositeIndexIT.java | 1 + .../data/cosmos/repository/integration/ContactRepositoryIT.java | 1 + .../data/cosmos/repository/integration/CosmosAnnotationIT.java | 1 + .../spring/data/cosmos/repository/integration/CountIT.java | 1 + .../azure/spring/data/cosmos/repository/integration/EtagIT.java | 1 + .../integration/HierarchicalPartitionKeyRepositoryIT.java | 1 + .../data/cosmos/repository/integration/IndexPolicyUpdateIT.java | 1 + .../repository/integration/IntegerIdDomainRepositoryIT.java | 1 + .../cosmos/repository/integration/LongIdDomainRepositoryIT.java | 1 + .../data/cosmos/repository/integration/MemoRepositoryIT.java | 1 + .../repository/integration/NestedPartitionKeyRepositoryIT.java | 1 + .../repository/integration/PageableAddressRepositoryIT.java | 1 + .../cosmos/repository/integration/PageableMemoRepositoryIT.java | 1 + .../repository/integration/PageablePersonRepositoryIT.java | 1 + .../data/cosmos/repository/integration/PersistableIT.java | 1 + .../cosmos/repository/integration/PersonCrossPartitionIT.java | 1 + .../cosmos/repository/integration/ProjectRepositorySortIT.java | 1 + .../cosmos/repository/integration/QuestionRepositoryIT.java | 1 + .../data/cosmos/repository/integration/ReactiveAuditableIT.java | 1 + .../repository/integration/ReactiveCourseRepositoryIT.java | 1 + .../integration/ReactiveCourseRepositoryNoMetricsIT.java | 1 + .../data/cosmos/repository/integration/ReactiveEtagIT.java | 1 + .../ReactiveHierarchicalPartitionKeyRepositoryIT.java | 1 + .../repository/integration/ReactiveIndexPolicyUpdateIT.java | 1 + .../ReactiveLongIdDomainPartitionPartitionRepositoryIT.java | 1 + .../integration/ReactiveNestedPartitionKeyRepositoryIT.java | 1 + .../cosmos/repository/integration/ReactiveRoleRepositoryIT.java | 1 + .../repository/integration/ReactiveTeacherRepositoryIT.java | 1 + .../cosmos/repository/integration/SpELCosmosAnnotationIT.java | 1 + .../data/cosmos/repository/integration/SquareRepositoryIT.java | 1 + .../data/cosmos/repository/integration/StudentRepositoryIT.java | 1 + .../data/cosmos/repository/integration/TeacherRepositoryIT.java | 1 + .../cosmos/repository/integration/UUIDIdDomainRepositoryIT.java | 1 + .../data/cosmos/repository/integration/UniqueKeyPolicyIT.java | 1 + 58 files changed, 58 insertions(+), 1 deletion(-) diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/ContainerLockIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/ContainerLockIT.java index 38e28ada4d18..de89e28d7cc5 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/ContainerLockIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/ContainerLockIT.java @@ -22,7 +22,7 @@ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) -@SuppressWarnings({"rawtypes", "unchecked"}) +@SuppressWarnings({"rawtypes", "unchecked", "deprecation"}) public class ContainerLockIT { private static final Duration SHORT_LEASE_DURATION = Duration.ofSeconds(3); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java index 12cb621cf85a..32700ec603a4 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java @@ -15,6 +15,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CosmosFactoryTestIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java index 8a7c9a7c1bac..1eecb3455ec4 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java @@ -107,6 +107,7 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CosmosTemplateIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java index 08b744b9a2ba..eb4816e5fd4c 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java @@ -61,6 +61,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.springframework.data.domain.Sort.Direction.ASC; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CosmosTemplatePartitionIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java index 580a0d4b0f4b..d2b50d9e9a36 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java @@ -42,6 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = MultiTenantTestRepositoryConfig.class) public class MultiTenantContainerCosmosFactoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java index 6cf5a2bb9b79..c3194aabca05 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java @@ -42,6 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = MultiTenantTestRepositoryConfig.class) public class MultiTenantDBCosmosFactoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java index 65f1525e6a24..7b7af5273812 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java @@ -99,6 +99,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveCosmosTemplateIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java index 4f7d9c226ac3..a0c94f82100a 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java @@ -42,6 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveCosmosTemplatePartitionIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java index c45551dc24d2..3bcaca81a3fc 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java @@ -44,6 +44,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = MultiTenantTestRepositoryConfig.class) public class ReactiveMultiTenantContainerCosmosFactoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java index d716681b485f..32619f94c101 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java @@ -44,6 +44,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = MultiTenantTestRepositoryConfig.class) public class ReactiveMultiTenantDBCosmosFactoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorIT.java index ff4f63e10c08..e2e6ef889a99 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorIT.java @@ -20,6 +20,7 @@ import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS1_PARTITION1; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {TestRepositoryConfig.class, ErrorEventListenerConfig.class}) public class ApplicationContextEventErrorIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorReactiveIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorReactiveIT.java index 6f833a984b6f..95fc0f2d2af6 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorReactiveIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorReactiveIT.java @@ -20,6 +20,7 @@ import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS1_PARTITION1; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {TestRepositoryConfig.class, ErrorEventListenerConfig.class}) public class ApplicationContextEventErrorReactiveIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventIT.java index 91654aee2bb6..173de249f221 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventIT.java @@ -30,6 +30,7 @@ import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS4_PARTITION3; import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ApplicationContextEventIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventReactiveIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventReactiveIT.java index 9ce320cb6a46..8a3e88ac1395 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventReactiveIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventReactiveIT.java @@ -29,6 +29,7 @@ import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS4_PARTITION3; import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ApplicationContextEventReactiveIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtilsTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtilsTest.java index 334e3a2a7b54..0ff893eeea00 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtilsTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtilsTest.java @@ -133,6 +133,7 @@ public void testPreconditionFailedException() { } @Test + @SuppressWarnings("deprecation") public void testRequestEntityTooLargeException() { CosmosException cosmosException = BridgeInternal.createCosmosException(HttpStatus.PAYLOAD_TOO_LARGE.value(), "Request Entity Too Large Exception"); assertThrows(CosmosRequestEntityTooLargeException.class, () -> { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/EntityImplRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/EntityImplRepositoryIT.java index c97650b779cd..c78d31b87851 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/EntityImplRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/EntityImplRepositoryIT.java @@ -24,6 +24,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class EntityImplRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/MultiCosmosTemplateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/MultiCosmosTemplateIT.java index 87703fac276a..dd6f85c54679 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/MultiCosmosTemplateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/MultiCosmosTemplateIT.java @@ -25,6 +25,7 @@ import static com.azure.spring.data.cosmos.common.TestConstants.AGE; import static com.azure.spring.data.cosmos.common.TestConstants.PASSPORT_IDS_BY_COUNTRY; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {TestRepositoryConfig.class, SecondaryTestRepositoryConfig.class}) public class MultiCosmosTemplateIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/ReactiveUUIDIdDomainRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/ReactiveUUIDIdDomainRepositoryIT.java index c6dbb5ca5fbb..6d45b92fd2c8 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/ReactiveUUIDIdDomainRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/ReactiveUUIDIdDomainRepositoryIT.java @@ -24,6 +24,7 @@ import java.util.Objects; import java.util.UUID; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveUUIDIdDomainRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java index 7f6b0f0de5ec..4dc0bf9260bb 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java @@ -41,6 +41,7 @@ import static org.assertj.core.api.Assertions.fail; import static org.junit.jupiter.api.Assertions.assertNull; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class AddressRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryNoMetricsIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryNoMetricsIT.java index acc313a92d9c..def09ae4b120 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryNoMetricsIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryNoMetricsIT.java @@ -27,6 +27,7 @@ import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS4_PARTITION3; import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryNoMetricsConfig.class) public class AddressRepositoryNoMetricsIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AnnotatedQueryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AnnotatedQueryIT.java index 671058c9a776..d7d36742504a 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AnnotatedQueryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AnnotatedQueryIT.java @@ -38,6 +38,7 @@ import static com.azure.spring.data.cosmos.common.TestConstants.PAGE_SIZE_2; import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class AnnotatedQueryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AuditableIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AuditableIT.java index d09a15bb22e5..906ceb2a3300 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AuditableIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AuditableIT.java @@ -38,6 +38,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class AuditableIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BasicItemRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BasicItemRepositoryIT.java index 583f9f7b6a20..4250a3263a22 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BasicItemRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BasicItemRepositoryIT.java @@ -28,6 +28,7 @@ import static com.azure.spring.data.cosmos.common.TestConstants.ID_1; import static com.azure.spring.data.cosmos.common.TestConstants.ID_2; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class BasicItemRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BigTypeRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BigTypeRepositoryIT.java index d5f7a23b642a..154687740a8f 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BigTypeRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BigTypeRepositoryIT.java @@ -25,6 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class BigTypeRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CompositeIndexIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CompositeIndexIT.java index e61587d96271..33bd3def7a7e 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CompositeIndexIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CompositeIndexIT.java @@ -30,6 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CompositeIndexIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java index c10af40ed10a..c8705ef53fbd 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java @@ -28,6 +28,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ContactRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CosmosAnnotationIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CosmosAnnotationIT.java index a4311294d30b..03f30ae80758 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CosmosAnnotationIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CosmosAnnotationIT.java @@ -31,6 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CosmosAnnotationIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CountIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CountIT.java index 5f8211521f1e..a154dd599f8e 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CountIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CountIT.java @@ -20,6 +20,7 @@ import java.util.Arrays; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CountIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/EtagIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/EtagIT.java index 174f1cb6e5be..3924291cc67b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/EtagIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/EtagIT.java @@ -33,6 +33,7 @@ import static com.azure.spring.data.cosmos.common.TestConstants.HOBBIES; import static com.azure.spring.data.cosmos.common.TestConstants.LAST_NAME; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class EtagIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/HierarchicalPartitionKeyRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/HierarchicalPartitionKeyRepositoryIT.java index 8049dd4d5add..b217670c1a67 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/HierarchicalPartitionKeyRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/HierarchicalPartitionKeyRepositoryIT.java @@ -27,6 +27,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class HierarchicalPartitionKeyRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IndexPolicyUpdateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IndexPolicyUpdateIT.java index c1a4287b1b27..59bf9e27d8b4 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IndexPolicyUpdateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IndexPolicyUpdateIT.java @@ -30,6 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class IndexPolicyUpdateIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IntegerIdDomainRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IntegerIdDomainRepositoryIT.java index b65aa5f73ef9..66cb22d25815 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IntegerIdDomainRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IntegerIdDomainRepositoryIT.java @@ -30,6 +30,7 @@ import java.util.stream.Collectors; import java.util.stream.StreamSupport; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class IntegerIdDomainRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/LongIdDomainRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/LongIdDomainRepositoryIT.java index d3524bbe7d80..c001d11210eb 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/LongIdDomainRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/LongIdDomainRepositoryIT.java @@ -34,6 +34,7 @@ import java.util.stream.Stream; import java.util.stream.StreamSupport; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class LongIdDomainRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/MemoRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/MemoRepositoryIT.java index a032499c9979..3199d1fba522 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/MemoRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/MemoRepositoryIT.java @@ -32,6 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class MemoRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/NestedPartitionKeyRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/NestedPartitionKeyRepositoryIT.java index 331228967015..757875a494fc 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/NestedPartitionKeyRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/NestedPartitionKeyRepositoryIT.java @@ -25,6 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class NestedPartitionKeyRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableAddressRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableAddressRepositoryIT.java index 18707edbe276..29d86241abe5 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableAddressRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableAddressRepositoryIT.java @@ -39,6 +39,7 @@ import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS4_PARTITION3; import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class PageableAddressRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableMemoRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableMemoRepositoryIT.java index 7cf66204ec4e..800fc5248244 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableMemoRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableMemoRepositoryIT.java @@ -38,6 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class PageableMemoRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageablePersonRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageablePersonRepositoryIT.java index e28702e04731..a89c9fae9ab0 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageablePersonRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageablePersonRepositoryIT.java @@ -28,6 +28,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class PageablePersonRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersistableIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersistableIT.java index d693ee84f421..0bd8bb183a6e 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersistableIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersistableIT.java @@ -30,6 +30,7 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class PersistableIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersonCrossPartitionIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersonCrossPartitionIT.java index 472807cc2e02..50a608b13ffd 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersonCrossPartitionIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersonCrossPartitionIT.java @@ -43,6 +43,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.data.domain.Sort.Direction.ASC; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class PersonCrossPartitionIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositorySortIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositorySortIT.java index 00c5a3a5e514..52ccfde1bad2 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositorySortIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositorySortIT.java @@ -31,6 +31,7 @@ import static com.azure.spring.data.cosmos.common.PageTestUtils.validateLastPage; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ProjectRepositorySortIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/QuestionRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/QuestionRepositoryIT.java index 36c4e6005318..db79727bac88 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/QuestionRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/QuestionRepositoryIT.java @@ -24,6 +24,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class QuestionRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveAuditableIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveAuditableIT.java index 4f3890d341cc..bf676b9f002c 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveAuditableIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveAuditableIT.java @@ -30,6 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveAuditableIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java index 276d5423a7a7..70a4c57a26f4 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java @@ -41,6 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveCourseRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryNoMetricsIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryNoMetricsIT.java index 50670aa0fc2b..2b4e346afff0 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryNoMetricsIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryNoMetricsIT.java @@ -24,6 +24,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryNoMetricsConfig.class) public class ReactiveCourseRepositoryNoMetricsIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveEtagIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveEtagIT.java index 098071c630d7..10ef86050958 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveEtagIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveEtagIT.java @@ -28,6 +28,7 @@ import static com.azure.spring.data.cosmos.common.TestConstants.COURSE_NAME; import static com.azure.spring.data.cosmos.common.TestConstants.DEPARTMENT; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveEtagIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveHierarchicalPartitionKeyRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveHierarchicalPartitionKeyRepositoryIT.java index 1a2ce6c59280..74040c3b77fd 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveHierarchicalPartitionKeyRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveHierarchicalPartitionKeyRepositoryIT.java @@ -28,6 +28,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveHierarchicalPartitionKeyRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveIndexPolicyUpdateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveIndexPolicyUpdateIT.java index c40a9d9304d3..5fdba53b7a4b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveIndexPolicyUpdateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveIndexPolicyUpdateIT.java @@ -30,6 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveIndexPolicyUpdateIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveLongIdDomainPartitionPartitionRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveLongIdDomainPartitionPartitionRepositoryIT.java index c5bef428dbac..649a1821c5da 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveLongIdDomainPartitionPartitionRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveLongIdDomainPartitionPartitionRepositoryIT.java @@ -25,6 +25,7 @@ import java.util.Arrays; import java.util.Objects; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveLongIdDomainPartitionPartitionRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveNestedPartitionKeyRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveNestedPartitionKeyRepositoryIT.java index 09e676d1b0fa..81c0faa585cb 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveNestedPartitionKeyRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveNestedPartitionKeyRepositoryIT.java @@ -27,6 +27,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveNestedPartitionKeyRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveRoleRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveRoleRepositoryIT.java index add0b943acd4..6a91bab9ccb8 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveRoleRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveRoleRepositoryIT.java @@ -25,6 +25,7 @@ import java.util.List; import java.util.Optional; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveRoleRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveTeacherRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveTeacherRepositoryIT.java index f9cd828a8aff..e6b4a53374f6 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveTeacherRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveTeacherRepositoryIT.java @@ -24,6 +24,7 @@ import java.util.Arrays; import java.util.List; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveTeacherRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosAnnotationIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosAnnotationIT.java index 9505ca395342..ab4d88dd872c 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosAnnotationIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosAnnotationIT.java @@ -20,6 +20,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositorySpELConfig.class) public class SpELCosmosAnnotationIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SquareRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SquareRepositoryIT.java index f4cf427b14b9..ccc0397c97e9 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SquareRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SquareRepositoryIT.java @@ -21,6 +21,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class SquareRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/StudentRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/StudentRepositoryIT.java index f0c714da7a29..2781d1d540df 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/StudentRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/StudentRepositoryIT.java @@ -26,6 +26,7 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class StudentRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/TeacherRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/TeacherRepositoryIT.java index 7dfbdd764de8..0355f28fbbbd 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/TeacherRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/TeacherRepositoryIT.java @@ -26,6 +26,7 @@ import static org.junit.Assert.assertTrue; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class TeacherRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UUIDIdDomainRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UUIDIdDomainRepositoryIT.java index 89cc50b85d40..a6ae8c2aa10b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UUIDIdDomainRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UUIDIdDomainRepositoryIT.java @@ -32,6 +32,7 @@ import java.util.stream.Stream; import java.util.stream.StreamSupport; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class UUIDIdDomainRepositoryIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UniqueKeyPolicyIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UniqueKeyPolicyIT.java index 728ee227e207..ade372efaf72 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UniqueKeyPolicyIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UniqueKeyPolicyIT.java @@ -34,6 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; +@SuppressWarnings("deprecation") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class UniqueKeyPolicyIT { From f3b4862104bae932de45d54e22bd2cb8e6d33086 Mon Sep 17 00:00:00 2001 From: muyao Date: Mon, 17 Nov 2025 14:35:40 +0800 Subject: [PATCH 007/186] fix ConfigurableBootstrapContext/EnvironmentPostProcessor path --- .../AzureGlobalConfigurationEnvironmentPostProcessor.java | 2 +- .../environment/KeyVaultEnvironmentPostProcessor.java | 4 ++-- .../src/main/resources/META-INF/spring.factories | 2 +- ...AzureGlobalConfigurationEnvironmentPostProcessorTests.java | 2 +- .../environment/KeyVaultEnvironmentPostProcessorTests.java | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/context/AzureGlobalConfigurationEnvironmentPostProcessor.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/context/AzureGlobalConfigurationEnvironmentPostProcessor.java index b7342a2dc7bc..a15158401714 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/context/AzureGlobalConfigurationEnvironmentPostProcessor.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/context/AzureGlobalConfigurationEnvironmentPostProcessor.java @@ -5,7 +5,7 @@ import org.apache.commons.logging.Log; import org.springframework.boot.SpringApplication; -import org.springframework.boot.env.EnvironmentPostProcessor; +import org.springframework.boot.EnvironmentPostProcessor; import org.springframework.boot.logging.DeferredLog; import org.springframework.core.Ordered; import org.springframework.core.env.ConfigurableEnvironment; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/keyvault/environment/KeyVaultEnvironmentPostProcessor.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/keyvault/environment/KeyVaultEnvironmentPostProcessor.java index 734fffc13211..8fc6b848c5e6 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/keyvault/environment/KeyVaultEnvironmentPostProcessor.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/keyvault/environment/KeyVaultEnvironmentPostProcessor.java @@ -13,12 +13,12 @@ import com.azure.spring.cloud.core.implementation.util.AzureSpringIdentifier; import com.azure.spring.cloud.service.implementation.keyvault.secrets.SecretClientBuilderFactory; import org.apache.commons.logging.Log; -import org.springframework.boot.ConfigurableBootstrapContext; +import org.springframework.boot.bootstrap.ConfigurableBootstrapContext; import org.springframework.boot.SpringApplication; import org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor; import org.springframework.boot.context.properties.bind.Bindable; import org.springframework.boot.context.properties.bind.Binder; -import org.springframework.boot.env.EnvironmentPostProcessor; +import org.springframework.boot.EnvironmentPostProcessor; import org.springframework.boot.logging.DeferredLogFactory; import org.springframework.core.Ordered; import org.springframework.core.env.ConfigurableEnvironment; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/resources/META-INF/spring.factories b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/resources/META-INF/spring.factories index c095ef164a17..92e50809d002 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/resources/META-INF/spring.factories +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/resources/META-INF/spring.factories @@ -1,4 +1,4 @@ -org.springframework.boot.env.EnvironmentPostProcessor=\ +org.springframework.boot.EnvironmentPostProcessor=\ com.azure.spring.cloud.autoconfigure.implementation.context.AzureGlobalConfigurationEnvironmentPostProcessor,\ com.azure.spring.cloud.autoconfigure.implementation.keyvault.environment.KeyVaultEnvironmentPostProcessor diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/context/AzureGlobalConfigurationEnvironmentPostProcessorTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/context/AzureGlobalConfigurationEnvironmentPostProcessorTests.java index e72a5c8443e5..8b6ba59e8ef8 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/context/AzureGlobalConfigurationEnvironmentPostProcessorTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/context/AzureGlobalConfigurationEnvironmentPostProcessorTests.java @@ -10,7 +10,7 @@ import com.azure.spring.cloud.core.provider.AzureProfileOptionsProvider; import org.junit.jupiter.api.Test; import org.springframework.boot.context.properties.bind.Binder; -import org.springframework.boot.env.EnvironmentPostProcessor; +import org.springframework.boot.EnvironmentPostProcessor; import org.springframework.boot.logging.DeferredLog; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.PropertiesPropertySource; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/keyvault/environment/KeyVaultEnvironmentPostProcessorTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/keyvault/environment/KeyVaultEnvironmentPostProcessorTests.java index 29f223be86b6..cfee276d1a73 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/keyvault/environment/KeyVaultEnvironmentPostProcessorTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/keyvault/environment/KeyVaultEnvironmentPostProcessorTests.java @@ -11,7 +11,7 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.mockito.MockedStatic; -import org.springframework.boot.ConfigurableBootstrapContext; +import org.springframework.boot.bootstrap.ConfigurableBootstrapContext; import org.springframework.boot.SpringApplication; import org.springframework.boot.logging.DeferredLogs; import org.springframework.core.env.MutablePropertySources; From 6b69885ffc5874bd2c1cbff144fa287bd6c98914 Mon Sep 17 00:00:00 2001 From: muyao Date: Mon, 17 Nov 2025 16:33:23 +0800 Subject: [PATCH 008/186] suppress warning --- .../implementation/jdbc/PasswordlessRuntimeHints.java | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/PasswordlessRuntimeHints.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/PasswordlessRuntimeHints.java index 9778643b82f9..2936b240e992 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/PasswordlessRuntimeHints.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/PasswordlessRuntimeHints.java @@ -12,6 +12,7 @@ class PasswordlessRuntimeHints implements RuntimeHintsRegistrar { @Override + @SuppressWarnings("removal") public void registerHints(RuntimeHints hints, ClassLoader classLoader) { BindableRuntimeHintsRegistrar.forTypes(AzurePasswordlessProperties.class) .registerHints(hints); From d5992ab66f449fa59c02d403d4001da69bb9acab Mon Sep 17 00:00:00 2001 From: muyao Date: Tue, 18 Nov 2025 09:47:48 +0800 Subject: [PATCH 009/186] replace with spring-boot-kafka --- eng/versioning/external_dependencies.txt | 2 +- sdk/spring/spring-cloud-azure-autoconfigure/pom.xml | 10 +++++----- .../kafka/KafkaPropertiesBeanPostProcessor.java | 2 +- .../AbstractKafkaPropertiesBeanPostProcessor.java | 2 +- ...BinderConfigurationPropertiesBeanPostProcessor.java | 2 +- .../kafka/KafkaPropertiesBeanPostProcessor.java | 2 +- .../AzureKafkaOAuth2BinderConfigurationTests.java | 4 ++-- .../kafka/AzureKafkaOAuth2BootConfigurationTests.java | 4 ++-- .../kafka/KafkaPropertiesBeanPostProcessorTest.java | 2 +- .../implementation/util/TestCompatibilityUtils.java | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 8327c5e27a89..bddc2836a002 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -388,7 +388,7 @@ springboot3_org.springframework.cloud:spring-cloud-stream;4.3.0 springboot3_org.springframework.data:spring-data-commons;3.5.3 springboot3_org.springframework.data:spring-data-redis;3.5.3 springboot3_org.springframework.integration:spring-integration-core;7.0.0-RC2 -springboot3_org.springframework.kafka:spring-kafka;4.0.0-RC1 +springboot3_org.springframework.boot:spring-boot-kafka;4.0.0-RC2 springboot3_org.springframework.retry:spring-retry;2.0.12 springboot3_org.springframework.security:spring-security-config;6.5.3 springboot3_org.springframework.security:spring-security-oauth2-client;6.5.3 diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index 8da089dc7779..21c2f79f1b19 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -84,15 +84,15 @@ - org.springframework.kafka - spring-kafka - 4.0.0-RC1 + org.springframework.boot + spring-boot-kafka + 4.0.0-RC2 true org.springframework.cloud spring-cloud-starter-stream-kafka - 4.3.0 + 5.0.0-RC1 true @@ -561,7 +561,7 @@ org.springframework.boot:spring-boot-configuration-processor:[4.0.0-RC2] org.springframework.cloud:spring-cloud-starter-stream-kafka:[4.3.0] org.springframework.data:spring-data-redis:[3.5.3] - org.springframework.kafka:spring-kafka:[4.0.0-RC1] + org.springframework.kafka:spring-boot-kafka:[4.0.0-RC2] org.springframework.security:spring-security-config:[6.5.3] org.springframework.security:spring-security-oauth2-client:[6.5.3] org.springframework.security:spring-security-oauth2-jose:[6.5.3] diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/kafka/KafkaPropertiesBeanPostProcessor.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/kafka/KafkaPropertiesBeanPostProcessor.java index b8e0e0fef93e..a1bf6c6754a3 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/kafka/KafkaPropertiesBeanPostProcessor.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/kafka/KafkaPropertiesBeanPostProcessor.java @@ -10,7 +10,7 @@ import org.springframework.beans.BeansException; import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.boot.autoconfigure.kafka.KafkaProperties; +import org.springframework.boot.kafka.autoconfigure.KafkaProperties; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.core.ResolvableType; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/AbstractKafkaPropertiesBeanPostProcessor.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/AbstractKafkaPropertiesBeanPostProcessor.java index 2dfb2f6ab0ce..950c4d1816b5 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/AbstractKafkaPropertiesBeanPostProcessor.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/AbstractKafkaPropertiesBeanPostProcessor.java @@ -17,7 +17,7 @@ import org.springframework.beans.BeansException; import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.boot.autoconfigure.kafka.KafkaProperties; +import org.springframework.boot.kafka.autoconfigure.KafkaProperties; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.util.ReflectionUtils; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/KafkaBinderConfigurationPropertiesBeanPostProcessor.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/KafkaBinderConfigurationPropertiesBeanPostProcessor.java index c93ad1aa1016..9c9aece92f2a 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/KafkaBinderConfigurationPropertiesBeanPostProcessor.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/KafkaBinderConfigurationPropertiesBeanPostProcessor.java @@ -7,7 +7,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.boot.autoconfigure.kafka.KafkaProperties; +import org.springframework.boot.kafka.autoconfigure.KafkaProperties; import org.springframework.cloud.stream.binder.kafka.properties.KafkaBinderConfigurationProperties; import java.util.HashMap; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/KafkaPropertiesBeanPostProcessor.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/KafkaPropertiesBeanPostProcessor.java index fffbd5885a18..d320b22ac3d7 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/KafkaPropertiesBeanPostProcessor.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/KafkaPropertiesBeanPostProcessor.java @@ -4,7 +4,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.boot.autoconfigure.kafka.KafkaProperties; +import org.springframework.boot.kafka.autoconfigure.KafkaProperties; import java.util.Map; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/AzureKafkaOAuth2BinderConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/AzureKafkaOAuth2BinderConfigurationTests.java index 14b9cbee0bce..5315b310a5ce 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/AzureKafkaOAuth2BinderConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/AzureKafkaOAuth2BinderConfigurationTests.java @@ -14,8 +14,8 @@ import org.apache.kafka.common.config.types.Password; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration; -import org.springframework.boot.autoconfigure.kafka.KafkaProperties; +import org.springframework.boot.kafka.autoconfigure.KafkaAutoConfiguration; +import org.springframework.boot.kafka.autoconfigure.KafkaProperties; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.cloud.stream.binder.kafka.KafkaMessageChannelBinder; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/AzureKafkaOAuth2BootConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/AzureKafkaOAuth2BootConfigurationTests.java index 797e6dde7b20..6f612db8a20c 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/AzureKafkaOAuth2BootConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/AzureKafkaOAuth2BootConfigurationTests.java @@ -15,8 +15,8 @@ import org.apache.kafka.common.config.types.Password; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration; -import org.springframework.boot.autoconfigure.kafka.KafkaProperties; +import org.springframework.boot.kafka.autoconfigure.KafkaAutoConfiguration; +import org.springframework.boot.kafka.autoconfigure.KafkaProperties; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.context.ApplicationContext; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/KafkaPropertiesBeanPostProcessorTest.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/KafkaPropertiesBeanPostProcessorTest.java index 7f9838bf7014..c6067e719ff3 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/KafkaPropertiesBeanPostProcessorTest.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/kafka/KafkaPropertiesBeanPostProcessorTest.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.spring.cloud.autoconfigure.implementation.kafka; -import org.springframework.boot.autoconfigure.kafka.KafkaProperties; +import org.springframework.boot.kafka.autoconfigure.KafkaProperties; class KafkaPropertiesBeanPostProcessorTest extends AbstractKafkaPropertiesBeanPostProcessorTest { diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/util/TestCompatibilityUtils.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/util/TestCompatibilityUtils.java index d2af6ee01f07..1a84aafa460f 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/util/TestCompatibilityUtils.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/util/TestCompatibilityUtils.java @@ -3,7 +3,7 @@ package com.azure.spring.cloud.autoconfigure.implementation.util; -import org.springframework.boot.autoconfigure.kafka.KafkaProperties; +import org.springframework.boot.kafka.autoconfigure.KafkaProperties; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; From ee56cc09dc7d9c03665879244c2016186facb857 Mon Sep 17 00:00:00 2001 From: muyao Date: Tue, 18 Nov 2025 10:27:07 +0800 Subject: [PATCH 010/186] replace alwaysApplyingWhenNonNull() with always() --- ...eEventHubsConsumerClientConfiguration.java | 6 +- .../properties/AzureEventHubsProperties.java | 90 ++++++------- .../properties/AzureServiceBusProperties.java | 118 +++++++++--------- 3 files changed, 107 insertions(+), 107 deletions(-) diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsConsumerClientConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsConsumerClientConfiguration.java index f1a8bc145d36..957abf7303c6 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsConsumerClientConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsConsumerClientConfiguration.java @@ -51,9 +51,9 @@ static class SharedConsumerConnectionConfiguration { SharedConsumerConnectionConfiguration(AzureEventHubsProperties properties, EventHubClientBuilder builder) { this.builder = builder; - PropertyMapper mapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); - mapper.from(properties.getConsumer().getConsumerGroup()).to(builder::consumerGroup); - mapper.from(properties.getConsumer().getPrefetchCount()).to(builder::prefetchCount); + PropertyMapper mapper = PropertyMapper.get(); + mapper.from(properties.getConsumer().getConsumerGroup()).always().to(builder::consumerGroup); + mapper.from(properties.getConsumer().getPrefetchCount()).always().to(builder::prefetchCount); } @Bean diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/properties/AzureEventHubsProperties.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/properties/AzureEventHubsProperties.java index a0ca762af1e2..d595fe48e8be 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/properties/AzureEventHubsProperties.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/properties/AzureEventHubsProperties.java @@ -44,82 +44,82 @@ public class AzureEventHubsProperties extends AzureEventHubsCommonProperties private final Processor processor = new Processor(); public Producer buildProducerProperties() { - PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); + PropertyMapper propertyMapper = PropertyMapper.get(); Producer properties = new Producer(); AzurePropertiesUtils.mergeAzureCommonProperties(this, this.producer, properties); - propertyMapper.from(this.getDomainName()).to(properties::setDomainName); - propertyMapper.from(this.getNamespace()).to(properties::setNamespace); - propertyMapper.from(this.getEventHubName()).to(properties::setEventHubName); - propertyMapper.from(this.getConnectionString()).to(properties::setConnectionString); - propertyMapper.from(this.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); + propertyMapper.from(this.getDomainName()).always().to(properties::setDomainName); + propertyMapper.from(this.getNamespace()).always().to(properties::setNamespace); + propertyMapper.from(this.getEventHubName()).always().to(properties::setEventHubName); + propertyMapper.from(this.getConnectionString()).always().to(properties::setConnectionString); + propertyMapper.from(this.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); - propertyMapper.from(this.producer.getDomainName()).to(properties::setDomainName); - propertyMapper.from(this.producer.getNamespace()).to(properties::setNamespace); - propertyMapper.from(this.producer.getEventHubName()).to(properties::setEventHubName); - propertyMapper.from(this.producer.getConnectionString()).to(properties::setConnectionString); - propertyMapper.from(this.producer.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); + propertyMapper.from(this.producer.getDomainName()).always().to(properties::setDomainName); + propertyMapper.from(this.producer.getNamespace()).always().to(properties::setNamespace); + propertyMapper.from(this.producer.getEventHubName()).always().to(properties::setEventHubName); + propertyMapper.from(this.producer.getConnectionString()).always().to(properties::setConnectionString); + propertyMapper.from(this.producer.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); return properties; } public Consumer buildConsumerProperties() { - PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); + PropertyMapper propertyMapper = PropertyMapper.get(); Consumer properties = new Consumer(); AzurePropertiesUtils.mergeAzureCommonProperties(this, this.consumer, properties); - propertyMapper.from(this.getDomainName()).to(properties::setDomainName); - propertyMapper.from(this.getNamespace()).to(properties::setNamespace); - propertyMapper.from(this.getEventHubName()).to(properties::setEventHubName); - propertyMapper.from(this.getConnectionString()).to(properties::setConnectionString); - propertyMapper.from(this.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); + propertyMapper.from(this.getDomainName()).always().to(properties::setDomainName); + propertyMapper.from(this.getNamespace()).always().to(properties::setNamespace); + propertyMapper.from(this.getEventHubName()).always().to(properties::setEventHubName); + propertyMapper.from(this.getConnectionString()).always().to(properties::setConnectionString); + propertyMapper.from(this.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); - propertyMapper.from(this.consumer.getDomainName()).to(properties::setDomainName); - propertyMapper.from(this.consumer.getNamespace()).to(properties::setNamespace); - propertyMapper.from(this.consumer.getEventHubName()).to(properties::setEventHubName); - propertyMapper.from(this.consumer.getConnectionString()).to(properties::setConnectionString); - propertyMapper.from(this.consumer.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); - propertyMapper.from(this.consumer.getPrefetchCount()).to(properties::setPrefetchCount); - propertyMapper.from(this.consumer.getConsumerGroup()).to(properties::setConsumerGroup); + propertyMapper.from(this.consumer.getDomainName()).always().to(properties::setDomainName); + propertyMapper.from(this.consumer.getNamespace()).always().to(properties::setNamespace); + propertyMapper.from(this.consumer.getEventHubName()).always().to(properties::setEventHubName); + propertyMapper.from(this.consumer.getConnectionString()).always().to(properties::setConnectionString); + propertyMapper.from(this.consumer.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); + propertyMapper.from(this.consumer.getPrefetchCount()).always().to(properties::setPrefetchCount); + propertyMapper.from(this.consumer.getConsumerGroup()).always().to(properties::setConsumerGroup); return properties; } public Processor buildProcessorProperties() { - PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); + PropertyMapper propertyMapper = PropertyMapper.get(); Processor properties = new Processor(); AzurePropertiesUtils.mergeAzureCommonProperties(this, this.processor, properties); - propertyMapper.from(this.getDomainName()).to(properties::setDomainName); - propertyMapper.from(this.getNamespace()).to(properties::setNamespace); - propertyMapper.from(this.getEventHubName()).to(properties::setEventHubName); - propertyMapper.from(this.getConnectionString()).to(properties::setConnectionString); - propertyMapper.from(this.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); - - propertyMapper.from(this.processor.getDomainName()).to(properties::setDomainName); - propertyMapper.from(this.processor.getNamespace()).to(properties::setNamespace); - propertyMapper.from(this.processor.getEventHubName()).to(properties::setEventHubName); - propertyMapper.from(this.processor.getConnectionString()).to(properties::setConnectionString); - propertyMapper.from(this.processor.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); - propertyMapper.from(this.processor.getPrefetchCount()).to(properties::setPrefetchCount); - propertyMapper.from(this.processor.getConsumerGroup()).to(properties::setConsumerGroup); - - propertyMapper.from(this.processor.trackLastEnqueuedEventProperties).to(properties::setTrackLastEnqueuedEventProperties); + propertyMapper.from(this.getDomainName()).always().to(properties::setDomainName); + propertyMapper.from(this.getNamespace()).always().to(properties::setNamespace); + propertyMapper.from(this.getEventHubName()).always().to(properties::setEventHubName); + propertyMapper.from(this.getConnectionString()).always().to(properties::setConnectionString); + propertyMapper.from(this.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); + + propertyMapper.from(this.processor.getDomainName()).always().to(properties::setDomainName); + propertyMapper.from(this.processor.getNamespace()).always().to(properties::setNamespace); + propertyMapper.from(this.processor.getEventHubName()).always().to(properties::setEventHubName); + propertyMapper.from(this.processor.getConnectionString()).always().to(properties::setConnectionString); + propertyMapper.from(this.processor.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); + propertyMapper.from(this.processor.getPrefetchCount()).always().to(properties::setPrefetchCount); + propertyMapper.from(this.processor.getConsumerGroup()).always().to(properties::setConsumerGroup); + + propertyMapper.from(this.processor.trackLastEnqueuedEventProperties).always().to(properties::setTrackLastEnqueuedEventProperties); propertyMapper.from(this.processor.initialPartitionEventPosition).when(c -> !CollectionUtils.isEmpty(c)) - .to(m -> { + .always().to(m -> { Map eventPositionMap = m.entrySet() .stream() .filter(entry -> entry.getValue() != null) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); properties.getInitialPartitionEventPosition().putAll(eventPositionMap); }); - propertyMapper.from(this.processor.batch.getMaxSize()).to(properties.batch::setMaxSize); - propertyMapper.from(this.processor.batch.getMaxWaitTime()).to(properties.batch::setMaxWaitTime); - propertyMapper.from(this.processor.loadBalancing.getStrategy()).to(properties.loadBalancing::setStrategy); - propertyMapper.from(this.processor.loadBalancing.getUpdateInterval()).to(properties.loadBalancing::setUpdateInterval); + propertyMapper.from(this.processor.batch.getMaxSize()).always().to(properties.batch::setMaxSize); + propertyMapper.from(this.processor.batch.getMaxWaitTime()).always().to(properties.batch::setMaxWaitTime); + propertyMapper.from(this.processor.loadBalancing.getStrategy()).always().to(properties.loadBalancing::setStrategy); + propertyMapper.from(this.processor.loadBalancing.getUpdateInterval()).always().to(properties.loadBalancing::setUpdateInterval); AzurePropertiesUtils.mergeAzureCommonProperties(properties, this.processor.getCheckpointStore(), properties.checkpointStore); BeanUtils.copyProperties(this.processor.checkpointStore, properties.checkpointStore); diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/properties/AzureServiceBusProperties.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/properties/AzureServiceBusProperties.java index 780d0168ea0c..f63f951ee087 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/properties/AzureServiceBusProperties.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/properties/AzureServiceBusProperties.java @@ -57,91 +57,91 @@ public Processor getProcessor() { } public Producer buildProducerProperties() { - PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); + PropertyMapper propertyMapper = PropertyMapper.get(); Producer properties = new Producer(); AzurePropertiesUtils.mergeAzureCommonProperties(this, this.producer, properties); - propertyMapper.from(this.getDomainName()).to(properties::setDomainName); - propertyMapper.from(this.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); - propertyMapper.from(this.getNamespace()).to(properties::setNamespace); - propertyMapper.from(this.getConnectionString()).to(properties::setConnectionString); - propertyMapper.from(this.getEntityName()).to(properties::setEntityName); - propertyMapper.from(this.getEntityType()).to(properties::setEntityType); + propertyMapper.from(this.getDomainName()).always().to(properties::setDomainName); + propertyMapper.from(this.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); + propertyMapper.from(this.getNamespace()).always().to(properties::setNamespace); + propertyMapper.from(this.getConnectionString()).always().to(properties::setConnectionString); + propertyMapper.from(this.getEntityName()).always().to(properties::setEntityName); + propertyMapper.from(this.getEntityType()).always().to(properties::setEntityType); - propertyMapper.from(this.producer.getDomainName()).to(properties::setDomainName); - propertyMapper.from(this.producer.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); - propertyMapper.from(this.producer.getNamespace()).to(properties::setNamespace); - propertyMapper.from(this.producer.getConnectionString()).to(properties::setConnectionString); - propertyMapper.from(this.producer.getEntityType()).to(properties::setEntityType); - propertyMapper.from(this.producer.getEntityName()).to(properties::setEntityName); + propertyMapper.from(this.producer.getDomainName()).always().to(properties::setDomainName); + propertyMapper.from(this.producer.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); + propertyMapper.from(this.producer.getNamespace()).always().to(properties::setNamespace); + propertyMapper.from(this.producer.getConnectionString()).always().to(properties::setConnectionString); + propertyMapper.from(this.producer.getEntityType()).always().to(properties::setEntityType); + propertyMapper.from(this.producer.getEntityName()).always().to(properties::setEntityName); return properties; } public Consumer buildConsumerProperties() { - PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); + PropertyMapper propertyMapper = PropertyMapper.get(); Consumer properties = new Consumer(); AzurePropertiesUtils.mergeAzureCommonProperties(this, this.consumer, properties); - propertyMapper.from(this.getDomainName()).to(properties::setDomainName); - propertyMapper.from(this.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); - propertyMapper.from(this.getNamespace()).to(properties::setNamespace); - propertyMapper.from(this.getConnectionString()).to(properties::setConnectionString); - propertyMapper.from(this.getEntityName()).to(properties::setEntityName); - propertyMapper.from(this.getEntityType()).to(properties::setEntityType); - - propertyMapper.from(this.consumer.getDomainName()).to(properties::setDomainName); - propertyMapper.from(this.consumer.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); - propertyMapper.from(this.consumer.getNamespace()).to(properties::setNamespace); - propertyMapper.from(this.consumer.getConnectionString()).to(properties::setConnectionString); - propertyMapper.from(this.consumer.getEntityType()).to(properties::setEntityType); - propertyMapper.from(this.consumer.getEntityName()).to(properties::setEntityName); - - propertyMapper.from(this.consumer.getSessionEnabled()).to(properties::setSessionEnabled); - propertyMapper.from(this.consumer.getAutoComplete()).to(properties::setAutoComplete); - propertyMapper.from(this.consumer.getPrefetchCount()).to(properties::setPrefetchCount); - propertyMapper.from(this.consumer.getSubQueue()).to(properties::setSubQueue); - propertyMapper.from(this.consumer.getReceiveMode()).to(properties::setReceiveMode); - propertyMapper.from(this.consumer.getSubscriptionName()).to(properties::setSubscriptionName); - propertyMapper.from(this.consumer.getMaxAutoLockRenewDuration()).to(properties::setMaxAutoLockRenewDuration); + propertyMapper.from(this.getDomainName()).always().to(properties::setDomainName); + propertyMapper.from(this.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); + propertyMapper.from(this.getNamespace()).always().to(properties::setNamespace); + propertyMapper.from(this.getConnectionString()).always().to(properties::setConnectionString); + propertyMapper.from(this.getEntityName()).always().to(properties::setEntityName); + propertyMapper.from(this.getEntityType()).always().to(properties::setEntityType); + + propertyMapper.from(this.consumer.getDomainName()).always().to(properties::setDomainName); + propertyMapper.from(this.consumer.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); + propertyMapper.from(this.consumer.getNamespace()).always().to(properties::setNamespace); + propertyMapper.from(this.consumer.getConnectionString()).always().to(properties::setConnectionString); + propertyMapper.from(this.consumer.getEntityType()).always().to(properties::setEntityType); + propertyMapper.from(this.consumer.getEntityName()).always().to(properties::setEntityName); + + propertyMapper.from(this.consumer.getSessionEnabled()).always().to(properties::setSessionEnabled); + propertyMapper.from(this.consumer.getAutoComplete()).always().to(properties::setAutoComplete); + propertyMapper.from(this.consumer.getPrefetchCount()).always().to(properties::setPrefetchCount); + propertyMapper.from(this.consumer.getSubQueue()).always().to(properties::setSubQueue); + propertyMapper.from(this.consumer.getReceiveMode()).always().to(properties::setReceiveMode); + propertyMapper.from(this.consumer.getSubscriptionName()).always().to(properties::setSubscriptionName); + propertyMapper.from(this.consumer.getMaxAutoLockRenewDuration()).always().to(properties::setMaxAutoLockRenewDuration); return properties; } public Processor buildProcessorProperties() { - PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); + PropertyMapper propertyMapper = PropertyMapper.get(); Processor properties = new Processor(); AzurePropertiesUtils.mergeAzureCommonProperties(this, this.processor, properties); - propertyMapper.from(this.getDomainName()).to(properties::setDomainName); - propertyMapper.from(this.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); - propertyMapper.from(this.getNamespace()).to(properties::setNamespace); - propertyMapper.from(this.getConnectionString()).to(properties::setConnectionString); - propertyMapper.from(this.getEntityName()).to(properties::setEntityName); - propertyMapper.from(this.getEntityType()).to(properties::setEntityType); - - propertyMapper.from(this.processor.getDomainName()).to(properties::setDomainName); - propertyMapper.from(this.processor.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); - propertyMapper.from(this.processor.getNamespace()).to(properties::setNamespace); - propertyMapper.from(this.processor.getConnectionString()).to(properties::setConnectionString); - propertyMapper.from(this.processor.getEntityType()).to(properties::setEntityType); - propertyMapper.from(this.processor.getEntityName()).to(properties::setEntityName); - - propertyMapper.from(this.processor.getSessionEnabled()).to(properties::setSessionEnabled); - propertyMapper.from(this.processor.getAutoComplete()).to(properties::setAutoComplete); - propertyMapper.from(this.processor.getPrefetchCount()).to(properties::setPrefetchCount); - propertyMapper.from(this.processor.getSubQueue()).to(properties::setSubQueue); - propertyMapper.from(this.processor.getReceiveMode()).to(properties::setReceiveMode); - propertyMapper.from(this.processor.getSubscriptionName()).to(properties::setSubscriptionName); - propertyMapper.from(this.processor.getMaxAutoLockRenewDuration()).to(properties::setMaxAutoLockRenewDuration); - propertyMapper.from(this.processor.getMaxConcurrentCalls()).to(properties::setMaxConcurrentCalls); - propertyMapper.from(this.processor.getMaxConcurrentSessions()).to(properties::setMaxConcurrentSessions); + propertyMapper.from(this.getDomainName()).always().to(properties::setDomainName); + propertyMapper.from(this.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); + propertyMapper.from(this.getNamespace()).always().to(properties::setNamespace); + propertyMapper.from(this.getConnectionString()).always().to(properties::setConnectionString); + propertyMapper.from(this.getEntityName()).always().to(properties::setEntityName); + propertyMapper.from(this.getEntityType()).always().to(properties::setEntityType); + + propertyMapper.from(this.processor.getDomainName()).always().to(properties::setDomainName); + propertyMapper.from(this.processor.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); + propertyMapper.from(this.processor.getNamespace()).always().to(properties::setNamespace); + propertyMapper.from(this.processor.getConnectionString()).always().to(properties::setConnectionString); + propertyMapper.from(this.processor.getEntityType()).always().to(properties::setEntityType); + propertyMapper.from(this.processor.getEntityName()).always().to(properties::setEntityName); + + propertyMapper.from(this.processor.getSessionEnabled()).always().to(properties::setSessionEnabled); + propertyMapper.from(this.processor.getAutoComplete()).always().to(properties::setAutoComplete); + propertyMapper.from(this.processor.getPrefetchCount()).always().to(properties::setPrefetchCount); + propertyMapper.from(this.processor.getSubQueue()).always().to(properties::setSubQueue); + propertyMapper.from(this.processor.getReceiveMode()).always().to(properties::setReceiveMode); + propertyMapper.from(this.processor.getSubscriptionName()).always().to(properties::setSubscriptionName); + propertyMapper.from(this.processor.getMaxAutoLockRenewDuration()).always().to(properties::setMaxAutoLockRenewDuration); + propertyMapper.from(this.processor.getMaxConcurrentCalls()).always().to(properties::setMaxConcurrentCalls); + propertyMapper.from(this.processor.getMaxConcurrentSessions()).always().to(properties::setMaxConcurrentSessions); return properties; } From b2e5e8b5af1082da3cc64cbcb7ffb8997b8506ac Mon Sep 17 00:00:00 2001 From: muyao Date: Tue, 18 Nov 2025 10:47:57 +0800 Subject: [PATCH 011/186] replace with spring-boot-data-redis --- eng/versioning/external_dependencies.txt | 2 +- .../spring-cloud-azure-autoconfigure/pom.xml | 8 ++++---- .../AzureLettucePasswordlessAutoConfiguration.java | 12 ++++++------ .../redis/AzureRedisAutoConfiguration.java | 14 +++++++------- .../redis/AzureRedisAutoConfigurationTests.java | 12 ++++++------ 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index bddc2836a002..9f094ddee82d 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -386,7 +386,7 @@ springboot3_org.springframework.cloud:spring-cloud-starter-stream-kafka;4.3.0 springboot3_org.springframework.cloud:spring-cloud-stream-test-binder;4.3.0 springboot3_org.springframework.cloud:spring-cloud-stream;4.3.0 springboot3_org.springframework.data:spring-data-commons;3.5.3 -springboot3_org.springframework.data:spring-data-redis;3.5.3 +springboot3_org.springframework.boot:spring-boot-data-redis;4.0.0-RC2 springboot3_org.springframework.integration:spring-integration-core;7.0.0-RC2 springboot3_org.springframework.boot:spring-boot-kafka;4.0.0-RC2 springboot3_org.springframework.retry:spring-retry;2.0.12 diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index 21c2f79f1b19..613c87128a76 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -104,9 +104,9 @@ true - org.springframework.data - spring-data-redis - 3.5.3 + org.springframework.boot + spring-boot-data-redis + 4.0.0-RC2 true @@ -560,7 +560,7 @@ org.springframework.boot:spring-boot-autoconfigure:[4.0.0-RC2] org.springframework.boot:spring-boot-configuration-processor:[4.0.0-RC2] org.springframework.cloud:spring-cloud-starter-stream-kafka:[4.3.0] - org.springframework.data:spring-data-redis:[3.5.3] + org.springframework.data:spring-boot-data-redis:[4.0.0-RC2] org.springframework.kafka:spring-boot-kafka:[4.0.0-RC2] org.springframework.security:spring-security-config:[6.5.3] org.springframework.security:spring-security-oauth2-client:[6.5.3] diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/data/redis/AzureLettucePasswordlessAutoConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/data/redis/AzureLettucePasswordlessAutoConfiguration.java index e10df681b455..940c7d30dbf1 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/data/redis/AzureLettucePasswordlessAutoConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/data/redis/AzureLettucePasswordlessAutoConfiguration.java @@ -16,9 +16,9 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.autoconfigure.data.redis.LettuceClientConfigurationBuilderCustomizer; -import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; -import org.springframework.boot.autoconfigure.data.redis.RedisProperties; +import org.springframework.boot.data.redis.autoconfigure.LettuceClientConfigurationBuilderCustomizer; +import org.springframework.boot.data.redis.autoconfigure.DataRedisAutoConfiguration; +import org.springframework.boot.data.redis.autoconfigure.DataRedisProperties; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -38,9 +38,9 @@ @Configuration(proxyBeanMethods = false) @ConditionalOnClass({LettuceConnection.class, RedisCredentials.class}) @ConditionalOnExpression("${spring.data.redis.azure.passwordless-enabled:false}") -@AutoConfigureBefore(RedisAutoConfiguration.class) +@AutoConfigureBefore(DataRedisAutoConfiguration.class) @ConditionalOnProperty(prefix = "spring.data.redis", name = {"host"}) -@EnableConfigurationProperties(RedisProperties.class) +@EnableConfigurationProperties(DataRedisProperties.class) public class AzureLettucePasswordlessAutoConfiguration { @Bean @@ -51,7 +51,7 @@ AzureRedisPasswordlessProperties redisPasswordlessProperties() { @Bean(name = "azureRedisCredentials") @ConditionalOnMissingBean - AzureRedisCredentials azureRedisCredentials(RedisProperties redisProperties, + AzureRedisCredentials azureRedisCredentials(DataRedisProperties redisProperties, AzureRedisPasswordlessProperties azureRedisPasswordlessProperties, AzureGlobalProperties azureGlobalProperties) { AzureRedisPasswordlessProperties redisPasswordlessProperties = mergeAzureProperties(azureGlobalProperties, azureRedisPasswordlessProperties); diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/redis/AzureRedisAutoConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/redis/AzureRedisAutoConfiguration.java index f43140b3a612..92521c68c3e6 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/redis/AzureRedisAutoConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/redis/AzureRedisAutoConfiguration.java @@ -13,7 +13,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.autoconfigure.data.redis.RedisProperties; +import org.springframework.boot.data.redis.autoconfigure.DataRedisProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -41,7 +41,7 @@ public class AzureRedisAutoConfiguration { @Primary @Bean - RedisProperties redisProperties(AzureRedisProperties azureRedisProperties, + DataRedisProperties redisProperties(AzureRedisProperties azureRedisProperties, AzureResourceManager azureResourceManager) throws InvocationTargetException, IllegalAccessException { String cacheName = azureRedisProperties.getName(); @@ -50,7 +50,7 @@ RedisProperties redisProperties(AzureRedisProperties azureRedisProperties, RedisCache redisCache = azureResourceManager.redisCaches() .getByResourceGroup(resourceGroup, cacheName); - RedisProperties redisProperties = new RedisProperties(); + DataRedisProperties redisProperties = new DataRedisProperties(); boolean useSsl = !redisCache.nonSslPort(); int port = useSsl ? redisCache.sslPort() : redisCache.port(); @@ -58,7 +58,7 @@ RedisProperties redisProperties(AzureRedisProperties azureRedisProperties, boolean isCluster = redisCache.shardCount() > 0; if (isCluster) { - RedisProperties.Cluster cluster = new RedisProperties.Cluster(); + DataRedisProperties.Cluster cluster = new DataRedisProperties.Cluster(); cluster.setNodes(Arrays.asList(redisCache.hostname() + ":" + port)); redisProperties.setCluster(cluster); } else { @@ -67,10 +67,10 @@ RedisProperties redisProperties(AzureRedisProperties azureRedisProperties, } redisProperties.setPassword(redisCache.keys().primaryKey()); - Method setSsl = ReflectionUtils.findMethod(RedisProperties.class, "setSsl", boolean.class); + Method setSsl = ReflectionUtils.findMethod(DataRedisProperties.class, "setSsl", boolean.class); if (setSsl == null) { - Object ssl = ReflectionUtils.findMethod(RedisProperties.class, "getSsl").invoke(redisProperties); - Class[] innerClasses = RedisProperties.class.getDeclaredClasses(); + Object ssl = ReflectionUtils.findMethod(DataRedisProperties.class, "getSsl").invoke(redisProperties); + Class[] innerClasses = DataRedisProperties.class.getDeclaredClasses(); Class targetInnerClass = null; for (Class innerClass : innerClasses) { if (innerClass.getSimpleName().equals("Ssl")) { diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/redis/AzureRedisAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/redis/AzureRedisAutoConfigurationTests.java index 4ee0959d4f53..de666b3ecf9c 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/redis/AzureRedisAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/redis/AzureRedisAutoConfigurationTests.java @@ -10,7 +10,7 @@ import com.azure.spring.cloud.autoconfigure.implementation.redis.properties.AzureRedisProperties; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.data.redis.RedisProperties; +import org.springframework.boot.data.redis.autoconfigure.DataRedisProperties; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.data.redis.core.RedisOperations; @@ -105,15 +105,15 @@ void shouldConfigureWithNameAndResourceGroupAndResourceManager() { assertThat(azureRedisProperties.getName()).isEqualTo("redis"); assertThat(azureRedisProperties.getResource().getResourceGroup()).isEqualTo("rg"); - assertThat(context).hasSingleBean(RedisProperties.class); - RedisProperties redisProperties = context.getBean(RedisProperties.class); + assertThat(context).hasSingleBean(DataRedisProperties.class); + DataRedisProperties redisProperties = context.getBean(DataRedisProperties.class); assertThat(redisProperties.getPassword()).isEqualTo(KEY); assertThat(redisProperties.getHost()).isEqualTo(HOST); assertThat(redisProperties.getPort()).isEqualTo(PORT); - Method isSsl = ReflectionUtils.findMethod(RedisProperties.class, "isSsl"); + Method isSsl = ReflectionUtils.findMethod(DataRedisProperties.class, "isSsl"); if (isSsl == null) { - Object ssl = ReflectionUtils.findMethod(RedisProperties.class, "getSsl").invoke(redisProperties); - Class[] innerClasses = RedisProperties.class.getDeclaredClasses(); + Object ssl = ReflectionUtils.findMethod(DataRedisProperties.class, "getSsl").invoke(redisProperties); + Class[] innerClasses = DataRedisProperties.class.getDeclaredClasses(); Class targetInnerClass = null; for (Class innerClass : innerClasses) { if (innerClass.getSimpleName().equals("Ssl")) { From d4ba1b47fd8cfdf09049cbf5a0d9f4c6edb10830 Mon Sep 17 00:00:00 2001 From: muyao Date: Tue, 18 Nov 2025 11:07:07 +0800 Subject: [PATCH 012/186] replace with spring-boot-jms --- eng/versioning/external_dependencies.txt | 2 +- sdk/spring/spring-cloud-azure-autoconfigure/pom.xml | 8 ++++---- .../jms/ServiceBusJmsAutoConfiguration.java | 4 ++-- .../jms/ServiceBusJmsConnectionFactoryConfiguration.java | 4 ++-- .../jms/ServiceBusJmsContainerConfiguration.java | 2 +- .../jms/properties/AzureServiceBusJmsProperties.java | 2 +- .../jms/ServiceBusJmsAutoConfigurationTests.java | 6 +++--- .../ServiceBusJmsConnectionFactoryConfigurationTests.java | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 9f094ddee82d..65c41fb065e3 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -402,7 +402,7 @@ springboot3_org.springframework:spring-core-test;7.0.0-RC3 springboot3_org.springframework:spring-core;7.0.0-RC3 springboot3_org.springframework:spring-expression;7.0.0-RC3 springboot3_org.springframework:spring-jdbc;7.0.0-RC3 -springboot3_org.springframework:spring-jms;7.0.0-RC3 +springboot3_org.springframework.boot:spring-boot-jms;4.0.0-RC2 springboot3_org.springframework:spring-messaging;7.0.0-RC3 springboot3_org.springframework:spring-test;7.0.0-RC3 springboot3_org.springframework:spring-tx;7.0.0-RC3 diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index 613c87128a76..8d8559f64e95 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -126,9 +126,9 @@ - org.springframework - spring-jms - 7.0.0-RC3 + org.springframework.boot + spring-boot-jms + 4.0.0-RC2 true @@ -568,7 +568,7 @@ org.springframework.security:spring-security-oauth2-resource-server:[6.5.3] org.springframework:spring-context-support:[7.0.0-RC3] org.springframework:spring-jdbc:[7.0.0-RC3] - org.springframework:spring-jms:[7.0.0-RC3] + org.springframework.boot:spring-boot-jms:[4.0.0-RC2] org.springframework:spring-tx:[7.0.0-RC3]
diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsAutoConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsAutoConfiguration.java index 5642251af150..16dd582f6311 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsAutoConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsAutoConfiguration.java @@ -20,8 +20,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration; -import org.springframework.boot.autoconfigure.jms.JndiConnectionFactoryAutoConfiguration; +import org.springframework.boot.jms.autoconfigure.JmsAutoConfiguration; +import org.springframework.boot.jms.autoconfigure.JndiConnectionFactoryAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfiguration.java index 53e4b15b4f50..678d055d3c3e 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfiguration.java @@ -14,8 +14,8 @@ import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.BeanDefinitionRegistry; -import org.springframework.boot.autoconfigure.jms.JmsPoolConnectionFactoryFactory; -import org.springframework.boot.autoconfigure.jms.JmsProperties; +import org.springframework.boot.jms.autoconfigure.JmsPoolConnectionFactoryFactory; +import org.springframework.boot.jms.autoconfigure.JmsProperties; import org.springframework.boot.context.properties.bind.BindResult; import org.springframework.boot.context.properties.bind.Binder; import org.springframework.context.EnvironmentAware; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsContainerConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsContainerConfiguration.java index 1e0cc92b9f60..82bff9332874 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsContainerConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsContainerConfiguration.java @@ -7,7 +7,7 @@ import jakarta.jms.ConnectionFactory; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.boot.autoconfigure.jms.DefaultJmsListenerContainerFactoryConfigurer; +import org.springframework.boot.jms.autoconfigure.DefaultJmsListenerContainerFactoryConfigurer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jms.annotation.EnableJms; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/properties/AzureServiceBusJmsProperties.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/properties/AzureServiceBusJmsProperties.java index 4731890b14d4..7bedd219a565 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/properties/AzureServiceBusJmsProperties.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/properties/AzureServiceBusJmsProperties.java @@ -7,7 +7,7 @@ import com.azure.spring.cloud.autoconfigure.implementation.properties.core.profile.AzureProfileConfigurationProperties; import com.azure.spring.cloud.core.properties.PasswordlessProperties; import org.springframework.beans.factory.InitializingBean; -import org.springframework.boot.autoconfigure.jms.JmsPoolConnectionFactoryProperties; +import org.springframework.boot.jms.autoconfigure.JmsPoolConnectionFactoryProperties; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.NestedConfigurationProperty; import org.springframework.jms.support.QosSettings; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsAutoConfigurationTests.java index 85d2cb7dda4c..5a238e70c5a4 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsAutoConfigurationTests.java @@ -16,9 +16,9 @@ import org.junit.jupiter.params.provider.ValueSource; import org.messaginghub.pooled.jms.JmsPoolConnectionFactory; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.jms.DefaultJmsListenerContainerFactoryConfigurer; -import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration; -import org.springframework.boot.autoconfigure.jms.JmsProperties; +import org.springframework.boot.jms.autoconfigure.DefaultJmsListenerContainerFactoryConfigurer; +import org.springframework.boot.jms.autoconfigure.JmsAutoConfiguration; +import org.springframework.boot.jms.autoconfigure.JmsProperties; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.assertj.AssertableApplicationContext; import org.springframework.boot.test.context.runner.ApplicationContextRunner; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfigurationTests.java index 10c9fe284a21..435bace46734 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfigurationTests.java @@ -9,7 +9,7 @@ import org.junit.jupiter.params.provider.ValueSource; import org.messaginghub.pooled.jms.JmsPoolConnectionFactory; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration; +import org.springframework.boot.jms.autoconfigure.JmsAutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.context.annotation.Configuration; From 1a3185d35776b0cf0ca76b6223dcfd2a59f7e0c4 Mon Sep 17 00:00:00 2001 From: muyao Date: Tue, 18 Nov 2025 11:08:27 +0800 Subject: [PATCH 013/186] replace with --- sdk/spring/spring-cloud-azure-autoconfigure/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index 8d8559f64e95..66d4d2eb2d90 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -106,7 +106,7 @@ org.springframework.boot spring-boot-data-redis - 4.0.0-RC2 + 4.0.0-RC2 true @@ -560,8 +560,8 @@ org.springframework.boot:spring-boot-autoconfigure:[4.0.0-RC2] org.springframework.boot:spring-boot-configuration-processor:[4.0.0-RC2] org.springframework.cloud:spring-cloud-starter-stream-kafka:[4.3.0] - org.springframework.data:spring-boot-data-redis:[4.0.0-RC2] - org.springframework.kafka:spring-boot-kafka:[4.0.0-RC2] + org.springframework.boot:spring-boot-data-redis:[4.0.0-RC2] + org.springframework.boot:spring-boot-kafka:[4.0.0-RC2] org.springframework.security:spring-security-config:[6.5.3] org.springframework.security:spring-security-oauth2-client:[6.5.3] org.springframework.security:spring-security-oauth2-jose:[6.5.3] From 351b34157b063939a13b175a6e1147d43d6a1d93 Mon Sep 17 00:00:00 2001 From: muyao Date: Tue, 18 Nov 2025 13:26:20 +0800 Subject: [PATCH 014/186] replace with spring-boot-jdbc --- eng/versioning/external_dependencies.txt | 2 +- .../spring-cloud-azure-autoconfigure/pom.xml | 17 +++++++++-------- .../jdbc/AzureJdbcAutoConfiguration.java | 4 ++-- .../jdbc/JdbcPropertiesBeanPostProcessor.java | 2 +- .../AbstractAzureJdbcAutoConfigurationTest.java | 4 ++-- .../JdbcPropertiesBeanPostProcessorTest.java | 2 +- ...ocessorWithApplicationContextRunnerTest.java | 2 +- .../MySqlAzureJdbcAutoConfigurationTest.java | 2 +- ...ostgreSqlAzureJdbcAutoConfigurationTest.java | 2 +- 9 files changed, 19 insertions(+), 18 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 65c41fb065e3..12dc07411b54 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -401,7 +401,7 @@ springboot3_org.springframework:spring-context;7.0.0-RC3 springboot3_org.springframework:spring-core-test;7.0.0-RC3 springboot3_org.springframework:spring-core;7.0.0-RC3 springboot3_org.springframework:spring-expression;7.0.0-RC3 -springboot3_org.springframework:spring-jdbc;7.0.0-RC3 +springboot3_org.springframework.boot:spring-boot-jdbc;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-jms;4.0.0-RC2 springboot3_org.springframework:spring-messaging;7.0.0-RC3 springboot3_org.springframework:spring-test;7.0.0-RC3 diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index 66d4d2eb2d90..5ae1cf39ef56 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -154,6 +154,14 @@
+ + + org.springframework.boot + spring-boot-jdbc + 4.0.0-RC2 + true + + @@ -477,13 +485,6 @@ test
- - org.springframework - spring-jdbc - 7.0.0-RC3 - test - - @@ -567,7 +568,7 @@ org.springframework.security:spring-security-oauth2-jose:[6.5.3] org.springframework.security:spring-security-oauth2-resource-server:[6.5.3] org.springframework:spring-context-support:[7.0.0-RC3] - org.springframework:spring-jdbc:[7.0.0-RC3] + org.springframework.boot:spring-boot-jdbc:[4.0.0-RC2] org.springframework.boot:spring-boot-jms:[4.0.0-RC2] org.springframework:spring-tx:[7.0.0-RC3] diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/AzureJdbcAutoConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/AzureJdbcAutoConfiguration.java index ac381ec55213..737bef6c12c3 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/AzureJdbcAutoConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/AzureJdbcAutoConfiguration.java @@ -8,8 +8,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; -import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; +import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration; +import org.springframework.boot.jdbc.autoconfigure.DataSourceProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/JdbcPropertiesBeanPostProcessor.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/JdbcPropertiesBeanPostProcessor.java index fe160a3e071b..69b0feb1f19f 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/JdbcPropertiesBeanPostProcessor.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/JdbcPropertiesBeanPostProcessor.java @@ -11,7 +11,7 @@ import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; +import org.springframework.boot.jdbc.autoconfigure.DataSourceProperties; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.bind.Binder; import org.springframework.context.ApplicationContext; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/AbstractAzureJdbcAutoConfigurationTest.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/AbstractAzureJdbcAutoConfigurationTest.java index 3937d0aeb9b0..f978f80b60c8 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/AbstractAzureJdbcAutoConfigurationTest.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/AbstractAzureJdbcAutoConfigurationTest.java @@ -15,8 +15,8 @@ import org.mockito.MockedStatic; import org.mockito.Mockito; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; -import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; +import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration; +import org.springframework.boot.jdbc.autoconfigure.DataSourceProperties; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.context.ApplicationContext; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/JdbcPropertiesBeanPostProcessorTest.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/JdbcPropertiesBeanPostProcessorTest.java index b9d54f3beef1..f32493eba87a 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/JdbcPropertiesBeanPostProcessorTest.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/JdbcPropertiesBeanPostProcessorTest.java @@ -15,7 +15,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; -import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; +import org.springframework.boot.jdbc.autoconfigure.DataSourceProperties; import org.springframework.context.ApplicationContext; import org.springframework.context.support.GenericApplicationContext; import org.springframework.mock.env.MockEnvironment; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/JdbcPropertiesBeanPostProcessorWithApplicationContextRunnerTest.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/JdbcPropertiesBeanPostProcessorWithApplicationContextRunnerTest.java index 67b662f44ff8..238cf4b10bdd 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/JdbcPropertiesBeanPostProcessorWithApplicationContextRunnerTest.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/JdbcPropertiesBeanPostProcessorWithApplicationContextRunnerTest.java @@ -11,7 +11,7 @@ import com.azure.spring.cloud.autoconfigure.implementation.passwordless.properties.AzureJdbcPasswordlessProperties; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; +import org.springframework.boot.jdbc.autoconfigure.DataSourceProperties; import org.springframework.boot.context.properties.bind.Binder; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.ApplicationContextRunner; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/MySqlAzureJdbcAutoConfigurationTest.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/MySqlAzureJdbcAutoConfigurationTest.java index 80b0c216784c..3e92815771e9 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/MySqlAzureJdbcAutoConfigurationTest.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/MySqlAzureJdbcAutoConfigurationTest.java @@ -6,7 +6,7 @@ import com.azure.identity.extensions.implementation.enums.AuthProperty; import com.azure.spring.cloud.core.implementation.util.AzureSpringIdentifier; import com.azure.spring.cloud.service.implementation.identity.credential.provider.SpringTokenCredentialProvider; -import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; +import org.springframework.boot.jdbc.autoconfigure.DataSourceProperties; import org.springframework.boot.test.context.FilteredClassLoader; import static com.azure.spring.cloud.autoconfigure.implementation.jdbc.JdbcPropertiesBeanPostProcessorTest.MANAGED_IDENTITY_ENABLED_DEFAULT; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/PostgreSqlAzureJdbcAutoConfigurationTest.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/PostgreSqlAzureJdbcAutoConfigurationTest.java index 7ec7353b962e..3ebb45bd2255 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/PostgreSqlAzureJdbcAutoConfigurationTest.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jdbc/PostgreSqlAzureJdbcAutoConfigurationTest.java @@ -6,7 +6,7 @@ import com.azure.identity.extensions.implementation.enums.AuthProperty; import com.azure.spring.cloud.core.implementation.util.AzureSpringIdentifier; import com.azure.spring.cloud.service.implementation.identity.credential.provider.SpringTokenCredentialProvider; -import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; +import org.springframework.boot.jdbc.autoconfigure.DataSourceProperties; import org.springframework.boot.test.context.FilteredClassLoader; import static com.azure.spring.cloud.autoconfigure.implementation.jdbc.JdbcPropertiesBeanPostProcessorTest.MANAGED_IDENTITY_ENABLED_DEFAULT; From 7895c09e865ae2a13b73b5d860496234e129b46d Mon Sep 17 00:00:00 2001 From: muyao Date: Tue, 18 Nov 2025 14:42:15 +0800 Subject: [PATCH 015/186] add spring-boot-restclient --- eng/versioning/external_dependencies.txt | 1 + .../spring-cloud-azure-autoconfigure/pom.xml | 15 ++++++++++++--- .../AadAuthenticationFilterAutoConfiguration.java | 2 +- .../AadOAuth2ClientConfiguration.java | 2 +- .../AadResourceServerConfiguration.java | 2 +- .../AadWebApplicationConfiguration.java | 2 +- .../aad/filter/AadAuthenticationFilter.java | 2 +- .../implementation/aad/filter/AadGraphClient.java | 2 +- .../aad/security/AadOAuth2UserService.java | 2 +- .../AadWebApplicationHttpSecurityConfigurer.java | 2 +- .../aad/security/graph/GraphClient.java | 2 +- .../jose/RestOperationsResourceRetriever.java | 2 +- .../aad/security/jwt/AadIssuerJwsKeySelector.java | 2 +- .../aad/utils/AadRestTemplateCreator.java | 2 +- .../configuration/AadB2cAutoConfiguration.java | 2 +- .../AadB2cOAuth2ClientConfiguration.java | 2 +- .../AadB2cResourceServerAutoConfiguration.java | 2 +- .../security/AadB2cOidcLoginConfigurer.java | 2 +- .../aad/WebApplicationContextRunnerUtils.java | 2 +- .../AadOAuth2ClientConfigurationTests.java | 2 +- .../AadResourceServerConfigurationTests.java | 2 +- .../AadWebApplicationConfigurationTests.java | 2 +- .../aad/filter/AadAuthenticationFilterTests.java | 4 ++-- .../aad/filter/AadGraphClientTests.java | 2 +- .../aad/filter/ResourceRetrieverTests.java | 2 +- .../filter/UserPrincipalMicrosoftGraphTests.java | 2 +- .../AadAccessTokenGroupRolesExtractionTests.java | 2 +- ...th2UserServiceIdTokenRolesExtractionTests.java | 2 +- .../aad/utils/AadRestTemplateCreatorTest.java | 4 ++-- .../AadB2cAutoConfigurationTests.java | 2 +- ...adB2cResourceServerAutoConfigurationTests.java | 2 +- .../AadB2cAuthorizationRequestResolverTests.java | 2 +- 32 files changed, 45 insertions(+), 35 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 12dc07411b54..948d6a069352 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -403,6 +403,7 @@ springboot3_org.springframework:spring-core;7.0.0-RC3 springboot3_org.springframework:spring-expression;7.0.0-RC3 springboot3_org.springframework.boot:spring-boot-jdbc;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-jms;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-restclient;4.0.0-RC2 springboot3_org.springframework:spring-messaging;7.0.0-RC3 springboot3_org.springframework:spring-test;7.0.0-RC3 springboot3_org.springframework:spring-tx;7.0.0-RC3 diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index 5ae1cf39ef56..cf8bd587c4b6 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -162,6 +162,14 @@ true
+ + + org.springframework.boot + spring-boot-restclient + 4.0.0-RC2 + true + + @@ -560,16 +568,17 @@ org.springframework.boot:spring-boot-actuator-autoconfigure:[4.0.0-RC2] org.springframework.boot:spring-boot-autoconfigure:[4.0.0-RC2] org.springframework.boot:spring-boot-configuration-processor:[4.0.0-RC2] - org.springframework.cloud:spring-cloud-starter-stream-kafka:[4.3.0] org.springframework.boot:spring-boot-data-redis:[4.0.0-RC2] org.springframework.boot:spring-boot-kafka:[4.0.0-RC2] + org.springframework.boot:spring-boot-jdbc:[4.0.0-RC2] + org.springframework.boot:spring-boot-jms:[4.0.0-RC2] + org.springframework.boot:spring-boot-restclient:[4.0.0-RC2] + org.springframework.cloud:spring-cloud-starter-stream-kafka:[4.3.0] org.springframework.security:spring-security-config:[6.5.3] org.springframework.security:spring-security-oauth2-client:[6.5.3] org.springframework.security:spring-security-oauth2-jose:[6.5.3] org.springframework.security:spring-security-oauth2-resource-server:[6.5.3] org.springframework:spring-context-support:[7.0.0-RC3] - org.springframework.boot:spring-boot-jdbc:[4.0.0-RC2] - org.springframework.boot:spring-boot-jms:[4.0.0-RC2] org.springframework:spring-tx:[7.0.0-RC3] diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadAuthenticationFilterAutoConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadAuthenticationFilterAutoConfiguration.java index 651a0cee6eff..38bf21cf8ee0 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadAuthenticationFilterAutoConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadAuthenticationFilterAutoConfiguration.java @@ -19,7 +19,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfiguration.java index 421b0cd6d7cc..6f99b6491cfa 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfiguration.java @@ -18,7 +18,7 @@ import com.azure.spring.cloud.autoconfigure.implementation.aad.configuration.properties.AadProfileProperties; import org.springframework.beans.factory.ObjectProvider; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfiguration.java index 671b8f9bb457..9315d4d16e99 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfiguration.java @@ -13,7 +13,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.security.ConditionalOnDefaultWebSecurity; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadWebApplicationConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadWebApplicationConfiguration.java index 4771c94a0863..5c74241c7fb2 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadWebApplicationConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadWebApplicationConfiguration.java @@ -9,7 +9,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.security.ConditionalOnDefaultWebSecurity; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadAuthenticationFilter.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadAuthenticationFilter.java index 0d5460f2d010..d1d55f186b2f 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadAuthenticationFilter.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadAuthenticationFilter.java @@ -19,7 +19,7 @@ import jakarta.servlet.http.HttpSession; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.security.core.Authentication; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadGraphClient.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadGraphClient.java index 294cf4e28bfe..fe52cb63f35b 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadGraphClient.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadGraphClient.java @@ -19,7 +19,7 @@ import com.microsoft.aad.msal4j.UserAssertion; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2UserService.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2UserService.java index 580170847f8e..cf6b4ae37088 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2UserService.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2UserService.java @@ -11,7 +11,7 @@ import jakarta.servlet.http.HttpSession; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.security.core.Authentication; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadWebApplicationHttpSecurityConfigurer.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadWebApplicationHttpSecurityConfigurer.java index 61f65944f10b..f332ca3a0959 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadWebApplicationHttpSecurityConfigurer.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadWebApplicationHttpSecurityConfigurer.java @@ -6,7 +6,7 @@ import com.azure.spring.cloud.autoconfigure.implementation.aad.configuration.properties.AadAuthenticationProperties; import jakarta.servlet.Filter; import org.springframework.beans.factory.ObjectProvider; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.context.ApplicationContext; import org.springframework.core.ResolvableType; import org.springframework.security.config.annotation.SecurityConfigurer; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/graph/GraphClient.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/graph/GraphClient.java index ed6e55e2961e..422fee37c3ae 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/graph/GraphClient.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/graph/GraphClient.java @@ -6,7 +6,7 @@ import com.azure.spring.cloud.autoconfigure.implementation.aad.configuration.properties.AadAuthenticationProperties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/jose/RestOperationsResourceRetriever.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/jose/RestOperationsResourceRetriever.java index e8baacc407ac..89a2b6529a74 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/jose/RestOperationsResourceRetriever.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/jose/RestOperationsResourceRetriever.java @@ -5,7 +5,7 @@ import com.nimbusds.jose.util.Resource; import com.nimbusds.jose.util.ResourceRetriever; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/jwt/AadIssuerJwsKeySelector.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/jwt/AadIssuerJwsKeySelector.java index 366013d1e508..debef6484e4c 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/jwt/AadIssuerJwsKeySelector.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/jwt/AadIssuerJwsKeySelector.java @@ -14,7 +14,7 @@ import com.nimbusds.jose.util.ResourceRetriever; import com.nimbusds.jwt.JWTClaimsSet; import com.nimbusds.jwt.proc.JWTClaimsSetAwareJWSKeySelector; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.web.client.RestOperations; import java.net.URL; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/utils/AadRestTemplateCreator.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/utils/AadRestTemplateCreator.java index ffdd2ee2d5b4..bdd95b5c6aad 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/utils/AadRestTemplateCreator.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/utils/AadRestTemplateCreator.java @@ -3,7 +3,7 @@ package com.azure.spring.cloud.autoconfigure.implementation.aad.utils; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.http.converter.FormHttpMessageConverter; import org.springframework.security.oauth2.client.http.OAuth2ErrorResponseErrorHandler; import org.springframework.security.oauth2.core.http.converter.OAuth2AccessTokenResponseHttpMessageConverter; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cAutoConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cAutoConfiguration.java index ae577e16a327..f4a3efa4a038 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cAutoConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cAutoConfiguration.java @@ -11,7 +11,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cOAuth2ClientConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cOAuth2ClientConfiguration.java index 75d4b5f174d1..cd54f3b9ddcd 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cOAuth2ClientConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cOAuth2ClientConfiguration.java @@ -13,7 +13,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cResourceServerAutoConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cResourceServerAutoConfiguration.java index 11030fd55ac0..a35b2c75065a 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cResourceServerAutoConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cResourceServerAutoConfiguration.java @@ -19,7 +19,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOidcLoginConfigurer.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOidcLoginConfigurer.java index ad0617029ec7..f39128a972a4 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOidcLoginConfigurer.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOidcLoginConfigurer.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.spring.cloud.autoconfigure.implementation.aadb2c.security; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.oauth2.client.endpoint.DefaultAuthorizationCodeTokenResponseClient; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/WebApplicationContextRunnerUtils.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/WebApplicationContextRunnerUtils.java index 70abdf1b0b78..133ef3c34812 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/WebApplicationContextRunnerUtils.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/WebApplicationContextRunnerUtils.java @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener; -import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration; +import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.http.HttpEntity; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfigurationTests.java index cfa6d65b5604..3a6803224d73 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfigurationTests.java @@ -14,7 +14,7 @@ import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; -import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration; +import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.core.convert.converter.Converter; import org.springframework.security.oauth2.client.JwtBearerOAuth2AuthorizedClientProvider; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfigurationTests.java index 62dba94aef8b..651284942a0a 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfigurationTests.java @@ -11,7 +11,7 @@ import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener; -import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration; +import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.logging.LogLevel; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadWebApplicationConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadWebApplicationConfigurationTests.java index 2a6af88ca741..8bfd0f5d975f 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadWebApplicationConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadWebApplicationConfigurationTests.java @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener; -import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration; +import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.logging.LogLevel; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.context.annotation.Bean; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadAuthenticationFilterTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadAuthenticationFilterTests.java index 26382c1c8ba8..9452018aefe1 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadAuthenticationFilterTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadAuthenticationFilterTests.java @@ -19,9 +19,9 @@ import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; -import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration; +import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.test.context.runner.ApplicationContextRunner; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.security.core.Authentication; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.context.SecurityContext; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadGraphClientTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadGraphClientTests.java index c4e7c3c16130..acb5edb353f6 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadGraphClientTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadGraphClientTests.java @@ -8,7 +8,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mock; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/ResourceRetrieverTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/ResourceRetrieverTests.java index 8e369f8769f3..8441ac9b3d58 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/ResourceRetrieverTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/ResourceRetrieverTests.java @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; -import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration; +import org.springframework.boot..restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.security.oauth2.server.resource.authentication.BearerTokenAuthenticationToken; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/UserPrincipalMicrosoftGraphTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/UserPrincipalMicrosoftGraphTests.java index b4189a50f2bb..aa31ed3bb442 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/UserPrincipalMicrosoftGraphTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/UserPrincipalMicrosoftGraphTests.java @@ -14,7 +14,7 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadAccessTokenGroupRolesExtractionTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadAccessTokenGroupRolesExtractionTests.java index a487765d93e0..0251103a61e3 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadAccessTokenGroupRolesExtractionTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadAccessTokenGroupRolesExtractionTests.java @@ -13,7 +13,7 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.security.oauth2.core.OAuth2AccessToken; import java.util.ArrayList; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2UserServiceIdTokenRolesExtractionTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2UserServiceIdTokenRolesExtractionTests.java index 1662e257a9c9..967a7d945a61 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2UserServiceIdTokenRolesExtractionTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2UserServiceIdTokenRolesExtractionTests.java @@ -5,7 +5,7 @@ import com.azure.spring.cloud.autoconfigure.implementation.aad.configuration.properties.AadAuthenticationProperties; import net.minidev.json.JSONArray; import org.junit.jupiter.api.Test; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.security.oauth2.core.oidc.OidcIdToken; import java.util.Collections; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/utils/AadRestTemplateCreatorTest.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/utils/AadRestTemplateCreatorTest.java index 01fa87d77254..203bcc663254 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/utils/AadRestTemplateCreatorTest.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/utils/AadRestTemplateCreatorTest.java @@ -5,9 +5,9 @@ import com.azure.spring.cloud.autoconfigure.implementation.aad.configuration.RestTemplateProxyCustomizerTestConfiguration; import org.junit.jupiter.api.Test; -import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration; +import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.test.context.runner.ApplicationContextRunner; -import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cAutoConfigurationTests.java index 25982b9b01f4..800da6bc3865 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cAutoConfigurationTests.java @@ -19,7 +19,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; -import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration; +import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.context.annotation.Bean; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cResourceServerAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cResourceServerAutoConfigurationTests.java index c5374bf2133c..895bc84a8fb4 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cResourceServerAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cResourceServerAutoConfigurationTests.java @@ -20,7 +20,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; -import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration; +import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.ContextConsumer; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cAuthorizationRequestResolverTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cAuthorizationRequestResolverTests.java index 7f026ec54a90..b568d4b43d15 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cAuthorizationRequestResolverTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cAuthorizationRequestResolverTests.java @@ -11,7 +11,7 @@ import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; -import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration; +import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.http.HttpMethod; From eab4621c65739120795cc9eaa59bc678ea3f5a0d Mon Sep 17 00:00:00 2001 From: muyao Date: Tue, 18 Nov 2025 15:21:02 +0800 Subject: [PATCH 016/186] add spring-boot-security --- eng/versioning/external_dependencies.txt | 1 + sdk/spring/spring-cloud-azure-autoconfigure/pom.xml | 8 ++++++++ .../aad/configuration/AadResourceServerConfiguration.java | 2 +- .../aad/configuration/AadWebApplicationConfiguration.java | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 948d6a069352..7bb29ee07d57 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -404,6 +404,7 @@ springboot3_org.springframework:spring-expression;7.0.0-RC3 springboot3_org.springframework.boot:spring-boot-jdbc;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-jms;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-restclient;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-security;4.0.0-RC2 springboot3_org.springframework:spring-messaging;7.0.0-RC3 springboot3_org.springframework:spring-test;7.0.0-RC3 springboot3_org.springframework:spring-tx;7.0.0-RC3 diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index cf8bd587c4b6..b2c16cec0ec2 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -170,6 +170,13 @@ true
+ + + org.springframework.boot + spring-boot-security + 4.0.0-RC2 + + @@ -573,6 +580,7 @@ org.springframework.boot:spring-boot-jdbc:[4.0.0-RC2] org.springframework.boot:spring-boot-jms:[4.0.0-RC2] org.springframework.boot:spring-boot-restclient:[4.0.0-RC2] + org.springframework.boot:spring-boot-security:[4.0.0-RC2] org.springframework.cloud:spring-cloud-starter-stream-kafka:[4.3.0] org.springframework.security:spring-security-config:[6.5.3] org.springframework.security:spring-security-oauth2-client:[6.5.3] diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfiguration.java index 9315d4d16e99..94b43b0a0a45 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfiguration.java @@ -12,7 +12,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.boot.autoconfigure.security.ConditionalOnDefaultWebSecurity; +import org.springframework.boot.security.autoconfigure.web.servlet.ConditionalOnDefaultWebSecurity; import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Conditional; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadWebApplicationConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadWebApplicationConfiguration.java index 5c74241c7fb2..fa86e54351c2 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadWebApplicationConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadWebApplicationConfiguration.java @@ -8,7 +8,7 @@ import com.azure.spring.cloud.autoconfigure.implementation.aad.security.AadOAuth2UserService; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.boot.autoconfigure.security.ConditionalOnDefaultWebSecurity; +import org.springframework.boot.security.autoconfigure.web.servlet.ConditionalOnDefaultWebSecurity; import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Conditional; From 89bd0f01b81c0b19c90274691fbb344fdb3f3074 Mon Sep 17 00:00:00 2001 From: muyao Date: Tue, 18 Nov 2025 16:20:19 +0800 Subject: [PATCH 017/186] add spring-boot-jackson --- eng/versioning/external_dependencies.txt | 1 + .../spring-cloud-azure-autoconfigure/pom.xml | 59 +++++-------------- ...ntHubsMessagingAutoConfigurationTests.java | 2 +- ...iceBusMessagingAutoConfigurationTests.java | 2 +- ...eQueueMessagingAutoConfigurationTests.java | 2 +- 5 files changed, 20 insertions(+), 46 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 7bb29ee07d57..140ee1843c56 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -401,6 +401,7 @@ springboot3_org.springframework:spring-context;7.0.0-RC3 springboot3_org.springframework:spring-core-test;7.0.0-RC3 springboot3_org.springframework:spring-core;7.0.0-RC3 springboot3_org.springframework:spring-expression;7.0.0-RC3 +springboot3_org.springframework.boot:spring-boot-jackson;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-jdbc;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-jms;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-restclient;4.0.0-RC2 diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index b2c16cec0ec2..58ff30748eb1 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -175,6 +175,21 @@ org.springframework.boot spring-boot-security 4.0.0-RC2 + true +
+ + + + org.springframework.boot + spring-boot-jackson + 4.0.0-RC2 + true + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + 2.20.1 + true @@ -406,44 +421,6 @@ true
- - - com.fasterxml.jackson.core - jackson-databind - 2.20.1 - true - - - com.fasterxml.jackson.core - jackson-core - 2.20.1 - true - - - com.fasterxml.jackson.core - jackson-annotations - 2.20 - true - - - com.fasterxml.jackson.dataformat - jackson-dataformat-xml - 2.20.1 - true - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - 2.20.1 - true - - - com.fasterxml.jackson.module - jackson-module-afterburner - 2.20.1 - true - - org.springframework.boot @@ -560,12 +537,7 @@ com.azure:azure-servicebus-jms:[2.0.0] com.mysql:mysql-connector-j:[9.4.0] - com.fasterxml.jackson.core:jackson-annotations:[2.20] - com.fasterxml.jackson.core:jackson-core:[2.20.1] - com.fasterxml.jackson.core:jackson-databind:[2.20.1] - com.fasterxml.jackson.dataformat:jackson-dataformat-xml:[2.20.1] com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.20.1] - com.fasterxml.jackson.module:jackson-module-afterburner:[2.20.1] io.lettuce:lettuce-core:[6.8.1.RELEASE] jakarta.servlet:jakarta.servlet-api:[6.1.0] jakarta.validation:jakarta.validation-api:[3.1.1] @@ -577,6 +549,7 @@ org.springframework.boot:spring-boot-configuration-processor:[4.0.0-RC2] org.springframework.boot:spring-boot-data-redis:[4.0.0-RC2] org.springframework.boot:spring-boot-kafka:[4.0.0-RC2] + org.springframework.boot:spring-boot-jackson:[4.0.0-RC2] org.springframework.boot:spring-boot-jdbc:[4.0.0-RC2] org.springframework.boot:spring-boot-jms:[4.0.0-RC2] org.springframework.boot:spring-boot-restclient:[4.0.0-RC2] diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfigurationTests.java index eea8bec890b2..6dc0da517750 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfigurationTests.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration; +import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.ApplicationContextRunner; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfigurationTests.java index e1622836b4ad..35c89584c37e 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfigurationTests.java @@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration; +import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.ApplicationContextRunner; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/storage/AzureStorageQueueMessagingAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/storage/AzureStorageQueueMessagingAutoConfigurationTests.java index 981d4cd400a1..46fe552e1d0e 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/storage/AzureStorageQueueMessagingAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/storage/AzureStorageQueueMessagingAutoConfigurationTests.java @@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration; +import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.ApplicationContextRunner; From 353b405edd5e7baba7f39777f4c909b190fc35d3 Mon Sep 17 00:00:00 2001 From: muyao Date: Tue, 18 Nov 2025 17:07:56 +0800 Subject: [PATCH 018/186] add spring-boot-http-converter --- eng/versioning/external_dependencies.txt | 1 + sdk/spring/spring-cloud-azure-autoconfigure/pom.xml | 7 +++++++ .../aad/WebApplicationContextRunnerUtils.java | 2 +- .../configuration/AadOAuth2ClientConfigurationTests.java | 2 +- .../configuration/AadResourceServerConfigurationTests.java | 2 +- .../configuration/AadWebApplicationConfigurationTests.java | 2 +- .../RestTemplateProxyCustomizerTestConfiguration.java | 2 +- .../aad/filter/AadAuthenticationFilterTests.java | 2 +- .../implementation/aad/filter/ResourceRetrieverTests.java | 4 ++-- .../aadb2c/configuration/AadB2cAutoConfigurationTests.java | 2 +- .../AadB2cResourceServerAutoConfigurationTests.java | 2 +- .../security/AadB2cAuthorizationRequestResolverTests.java | 2 +- 12 files changed, 19 insertions(+), 11 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 140ee1843c56..0a110cb10cb7 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -388,6 +388,7 @@ springboot3_org.springframework.cloud:spring-cloud-stream;4.3.0 springboot3_org.springframework.data:spring-data-commons;3.5.3 springboot3_org.springframework.boot:spring-boot-data-redis;4.0.0-RC2 springboot3_org.springframework.integration:spring-integration-core;7.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-http-converter;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-kafka;4.0.0-RC2 springboot3_org.springframework.retry:spring-retry;2.0.12 springboot3_org.springframework.security:spring-security-config;6.5.3 diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index 58ff30748eb1..868e31748bec 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -422,6 +422,12 @@ + + org.springframework.boot + spring-boot-http-converter + 4.0.0-RC2 + test + org.springframework.boot spring-boot-starter-test @@ -548,6 +554,7 @@ org.springframework.boot:spring-boot-autoconfigure:[4.0.0-RC2] org.springframework.boot:spring-boot-configuration-processor:[4.0.0-RC2] org.springframework.boot:spring-boot-data-redis:[4.0.0-RC2] + org.springframework.boot:spring-boot-http-converter:[4.0.0-RC2] org.springframework.boot:spring-boot-kafka:[4.0.0-RC2] org.springframework.boot:spring-boot-jackson:[4.0.0-RC2] org.springframework.boot:spring-boot-jdbc:[4.0.0-RC2] diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/WebApplicationContextRunnerUtils.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/WebApplicationContextRunnerUtils.java index 133ef3c34812..a50d0bbe7bd8 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/WebApplicationContextRunnerUtils.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/WebApplicationContextRunnerUtils.java @@ -6,7 +6,7 @@ import com.azure.spring.cloud.autoconfigure.implementation.aad.configuration.AadAutoConfiguration; import com.azure.spring.cloud.autoconfigure.implementation.context.AzureGlobalPropertiesAutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; +import org.springframework.boot.http.converter.autoconfigure.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener; import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfigurationTests.java index 3a6803224d73..cc2f752f4d40 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfigurationTests.java @@ -13,7 +13,7 @@ import com.nimbusds.jose.util.Base64URL; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; +import org.springframework.boot.http.converter.autoconfigure.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.core.convert.converter.Converter; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfigurationTests.java index 651284942a0a..53902ba4260e 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfigurationTests.java @@ -9,7 +9,7 @@ import com.nimbusds.jwt.proc.JWTClaimsSetAwareJWSKeySelector; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; +import org.springframework.boot.http.converter.autoconfigure.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener; import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.logging.LogLevel; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadWebApplicationConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadWebApplicationConfigurationTests.java index 8bfd0f5d975f..59d66b9ee79d 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadWebApplicationConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadWebApplicationConfigurationTests.java @@ -6,7 +6,7 @@ import com.azure.spring.cloud.autoconfigure.implementation.context.AzureGlobalPropertiesAutoConfiguration; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; +import org.springframework.boot.http.converter.autoconfigure.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener; import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.logging.LogLevel; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/RestTemplateProxyCustomizerTestConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/RestTemplateProxyCustomizerTestConfiguration.java index abe271cf31a3..f504feb8b1bd 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/RestTemplateProxyCustomizerTestConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/RestTemplateProxyCustomizerTestConfiguration.java @@ -3,7 +3,7 @@ package com.azure.spring.cloud.autoconfigure.implementation.aad.configuration; -import org.springframework.boot.web.client.RestTemplateCustomizer; +import org.springframework.boot.restclient.RestTemplateCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.client.SimpleClientHttpRequestFactory; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadAuthenticationFilterTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadAuthenticationFilterTests.java index 9452018aefe1..6a2e629fcf7c 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadAuthenticationFilterTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/AadAuthenticationFilterTests.java @@ -18,7 +18,7 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; +import org.springframework.boot.http.converter.autoconfigure.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.boot.restclient.RestTemplateBuilder; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/ResourceRetrieverTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/ResourceRetrieverTests.java index 8441ac9b3d58..f2277a896a44 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/ResourceRetrieverTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/filter/ResourceRetrieverTests.java @@ -9,8 +9,8 @@ import com.nimbusds.jose.util.ResourceRetriever; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; -import org.springframework.boot..restclient.autoconfigure.RestTemplateAutoConfiguration; +import org.springframework.boot.http.converter.autoconfigure.HttpMessageConvertersAutoConfiguration; +import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.security.oauth2.server.resource.authentication.BearerTokenAuthenticationToken; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cAutoConfigurationTests.java index 800da6bc3865..6a0e0026ebfd 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cAutoConfigurationTests.java @@ -18,7 +18,7 @@ import org.mockito.Mockito; import org.springframework.beans.BeanUtils; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; +import org.springframework.boot.http.converter.autoconfigure.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cResourceServerAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cResourceServerAutoConfigurationTests.java index 895bc84a8fb4..2418871d3d5d 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cResourceServerAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cResourceServerAutoConfigurationTests.java @@ -19,7 +19,7 @@ import org.mockito.Mockito; import org.springframework.beans.BeanUtils; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; +import org.springframework.boot.http.converter.autoconfigure.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.ContextConsumer; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cAuthorizationRequestResolverTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cAuthorizationRequestResolverTests.java index b568d4b43d15..337528561b93 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cAuthorizationRequestResolverTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cAuthorizationRequestResolverTests.java @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; +import org.springframework.boot.http.converter.autoconfigure.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; From 0f68f24b98d0823ea436fafa479f58f946653e92 Mon Sep 17 00:00:00 2001 From: muyao Date: Wed, 19 Nov 2025 10:10:51 +0800 Subject: [PATCH 019/186] replace new OAuth2ClientAutoConfiguration --- sdk/spring/spring-cloud-azure-autoconfigure/pom.xml | 6 ++++++ .../aadb2c/configuration/WebOAuth2ClientTestApp.java | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index 868e31748bec..2f33b351e8ef 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -422,6 +422,12 @@ + + org.springframework.boot + spring-boot-security-oauth2-client + 4.0.0-RC2 + test + org.springframework.boot spring-boot-http-converter diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/WebOAuth2ClientTestApp.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/WebOAuth2ClientTestApp.java index 7ed90b86aecc..6019cc1699d4 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/WebOAuth2ClientTestApp.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/WebOAuth2ClientTestApp.java @@ -3,12 +3,12 @@ package com.azure.spring.cloud.autoconfigure.implementation.aadb2c.configuration; +import org.springframework.boot.security.oauth2.client.autoconfigure.OAuth2ClientAutoConfiguration; import org.springframework.context.annotation.Import; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -@SuppressWarnings({"removal", "deprecation"}) @EnableWebSecurity -@Import(org.springframework.boot.autoconfigure.security.oauth2.client.servlet.OAuth2ClientAutoConfiguration.class) +@Import(OAuth2ClientAutoConfiguration.class) public class WebOAuth2ClientTestApp { } From 180293b3044ec3d277ae8fff5aed1f3e739083c1 Mon Sep 17 00:00:00 2001 From: muyao Date: Wed, 19 Nov 2025 10:55:10 +0800 Subject: [PATCH 020/186] replace containsKey with containsHeader --- ...h2AuthorizationCodeGrantRequestEntityConverterTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestEntityConverterTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestEntityConverterTests.java index 53400928a42b..c9d0610e031f 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestEntityConverterTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestEntityConverterTests.java @@ -110,11 +110,11 @@ private HttpHeaders convertedHeaderOf(AadClientRegistrationRepository repository } private void testHttpHeaders(HttpHeaders headers) { - assertTrue(headers.containsKey("x-client-SKU")); + assertTrue(headers.containsHeader("x-client-SKU")); assertEquals(Collections.singletonList(AzureSpringIdentifier.AZURE_SPRING_AAD), headers.get("x-client-SKU")); - assertTrue(headers.containsKey("x-client-VER")); + assertTrue(headers.containsHeader("x-client-VER")); assertEquals(Collections.singletonList(AzureSpringIdentifier.VERSION), headers.get("x-client-VER")); - assertTrue(headers.containsKey("client-request-id")); + assertTrue(headers.containsHeader("client-request-id")); } private MultiValueMap convertedBodyOf(AadClientRegistrationRepository repository, From b9f08791a30a7949097fe0ff7ce1e95018ed36e6 Mon Sep 17 00:00:00 2001 From: muyao Date: Wed, 19 Nov 2025 10:59:39 +0800 Subject: [PATCH 021/186] fix Bootstrap --- .../AppConfigurationWatchAutoConfiguration.java | 2 +- .../AzureAppConfigBoostrapRegistrar.java | 2 +- .../implementation/AzureAppConfigDataLoader.java | 4 ++-- .../AzureAppConfigDataLocationResolver.java | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/AppConfigurationWatchAutoConfiguration.java b/sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/AppConfigurationWatchAutoConfiguration.java index 9b0d4be6c0a0..8c3330ad6826 100644 --- a/sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/AppConfigurationWatchAutoConfiguration.java +++ b/sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/AppConfigurationWatchAutoConfiguration.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.spring.cloud.appconfiguration.config; -import org.springframework.boot.BootstrapContext; +import org.springframework.boot.bootstrap.BootstrapContext; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; diff --git a/sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/AzureAppConfigBoostrapRegistrar.java b/sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/AzureAppConfigBoostrapRegistrar.java index fb0a090f0910..9f414c0ca37f 100644 --- a/sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/AzureAppConfigBoostrapRegistrar.java +++ b/sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/AzureAppConfigBoostrapRegistrar.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.spring.cloud.appconfiguration.config.implementation; -import org.springframework.boot.BootstrapRegistry.InstanceSupplier; +import org.springframework.boot.bootstrap.BootstrapRegistry.InstanceSupplier; import org.springframework.boot.context.config.ConfigDataLocationResolverContext; import org.springframework.boot.context.properties.bind.Bindable; import org.springframework.boot.context.properties.bind.Binder; diff --git a/sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/AzureAppConfigDataLoader.java b/sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/AzureAppConfigDataLoader.java index 5979d37b7f53..5e2b6f0f6b89 100644 --- a/sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/AzureAppConfigDataLoader.java +++ b/sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/AzureAppConfigDataLoader.java @@ -10,7 +10,7 @@ import java.util.List; import org.apache.commons.logging.Log; -import org.springframework.boot.BootstrapRegistry.InstanceSupplier; +import org.springframework.boot.bootstrap.BootstrapRegistry.InstanceSupplier; import org.springframework.boot.context.config.ConfigData; import org.springframework.boot.context.config.ConfigDataLoader; import org.springframework.boot.context.config.ConfigDataLoaderContext; @@ -30,7 +30,7 @@ /** * Azure App Configuration data loader implementation for Spring Boot's ConfigDataLoader. - * + * * @since 6.0.0 */ diff --git a/sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/AzureAppConfigDataLocationResolver.java b/sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/AzureAppConfigDataLocationResolver.java index b4ecd1b477ba..1baf28093558 100644 --- a/sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/AzureAppConfigDataLocationResolver.java +++ b/sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/AzureAppConfigDataLocationResolver.java @@ -10,7 +10,7 @@ import javax.naming.NamingException; import org.apache.commons.logging.Log; -import org.springframework.boot.BootstrapRegistry.InstanceSupplier; +import org.springframework.boot.bootstrap.BootstrapRegistry.InstanceSupplier; import org.springframework.boot.context.config.ConfigDataLocation; import org.springframework.boot.context.config.ConfigDataLocationNotFoundException; import org.springframework.boot.context.config.ConfigDataLocationResolver; @@ -29,7 +29,7 @@ /** * Resolves Azure App Configuration data locations for Spring Boot's ConfigData API. - * + * * @since 6.0.0 */ @@ -46,7 +46,7 @@ public class AzureAppConfigDataLocationResolver /** * Determines if the given location can be resolved by this resolver. - * + * * @param context the resolver context containing binder and bootstrap information * @param location the configuration data location to check * @return true if this resolver can handle the location, false otherwise @@ -63,7 +63,7 @@ public boolean isResolvable(ConfigDataLocationResolverContext context, ConfigDat /** * Checks if the required configuration properties for Azure App Configuration are present. - * + * * @param binder the binder to check for properties * @return true if at least one of the required properties is present, false otherwise */ @@ -83,7 +83,7 @@ private boolean hasNonEmptyProperty(Binder binder, String propertyPath) { /** * Resolves configuration data resources for the given location. - * + * * @param context the resolver context * @param location the configuration data location * @return empty list of resources @@ -97,7 +97,7 @@ public List resolve(ConfigDataLocationResolverContex /** * Resolves profile-specific configuration data resources. - * + * * @param resolverContext the resolver context * @param location the configuration data location * @param profiles the active Spring profiles @@ -128,7 +128,7 @@ public List resolveProfileSpecific( /** * Loads and validates Azure App Configuration properties from the configuration context. - * + * * @param context the configuration data location resolver context * @return validated Azure App Configuration properties */ From 09fc1d6527a8c87828ec5b6e13a424c00579c059 Mon Sep 17 00:00:00 2001 From: muyao Date: Wed, 19 Nov 2025 11:20:22 +0800 Subject: [PATCH 022/186] fix health --- .../eventhubs/implementation/EventHubsHealthIndicator.java | 4 ++-- .../config/EventHubsBinderHealthIndicatorConfiguration.java | 2 +- .../servicebus/implementation/ServiceBusHealthIndicator.java | 4 ++-- .../config/ServiceBusBinderHealthIndicatorConfiguration.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/main/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/EventHubsHealthIndicator.java b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/main/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/EventHubsHealthIndicator.java index 08dafd89667e..85c68cd7e397 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/main/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/EventHubsHealthIndicator.java +++ b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/main/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/EventHubsHealthIndicator.java @@ -5,8 +5,8 @@ import com.azure.spring.integration.core.instrumentation.Instrumentation; import com.azure.spring.integration.core.instrumentation.InstrumentationManager; -import org.springframework.boot.actuate.health.AbstractHealthIndicator; -import org.springframework.boot.actuate.health.Health; +import org.springframework.boot.health.contributor.AbstractHealthIndicator; +import org.springframework.boot.health.contributor.Health; /** * Health indicator for Event Hubs. diff --git a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/main/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/config/EventHubsBinderHealthIndicatorConfiguration.java b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/main/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/config/EventHubsBinderHealthIndicatorConfiguration.java index 3db24821020b..5afea09ab1bd 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/main/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/config/EventHubsBinderHealthIndicatorConfiguration.java +++ b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/main/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/config/EventHubsBinderHealthIndicatorConfiguration.java @@ -5,7 +5,7 @@ import com.azure.spring.cloud.stream.binder.eventhubs.implementation.EventHubsHealthIndicator; import com.azure.spring.cloud.stream.binder.eventhubs.implementation.EventHubsMessageChannelBinder; -import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator; +import org.springframework.boot.health.autoconfigure.contributor.ConditionalOnEnabledHealthIndicator; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/main/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/ServiceBusHealthIndicator.java b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/main/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/ServiceBusHealthIndicator.java index c9e066f25ed8..7bbead2d141e 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/main/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/ServiceBusHealthIndicator.java +++ b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/main/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/ServiceBusHealthIndicator.java @@ -4,8 +4,8 @@ import com.azure.spring.integration.core.instrumentation.Instrumentation; import com.azure.spring.integration.core.instrumentation.InstrumentationManager; -import org.springframework.boot.actuate.health.AbstractHealthIndicator; -import org.springframework.boot.actuate.health.Health; +import org.springframework.boot.health.contributor.AbstractHealthIndicator; +import org.springframework.boot.health.contributor.Health; /** * Implementation of a {@link AbstractHealthIndicator} returning status information for diff --git a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/main/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/config/ServiceBusBinderHealthIndicatorConfiguration.java b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/main/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/config/ServiceBusBinderHealthIndicatorConfiguration.java index 915a78c0548a..a96b075281c9 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/main/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/config/ServiceBusBinderHealthIndicatorConfiguration.java +++ b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/main/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/config/ServiceBusBinderHealthIndicatorConfiguration.java @@ -4,7 +4,7 @@ import com.azure.spring.cloud.stream.binder.servicebus.implementation.ServiceBusHealthIndicator; import com.azure.spring.cloud.stream.binder.servicebus.implementation.ServiceBusMessageChannelBinder; -import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator; +import org.springframework.boot.health.autoconfigure.contributor.ConditionalOnEnabledHealthIndicator; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; From ec9e14e99229a2d4b4c6bf2ad9fbda7398ebf222 Mon Sep 17 00:00:00 2001 From: muyao Date: Wed, 19 Nov 2025 13:31:33 +0800 Subject: [PATCH 023/186] add spring-boot-health --- eng/versioning/external_dependencies.txt | 1 + .../spring-cloud-azure-actuator-autoconfigure/pom.xml | 6 ++++++ .../AppConfigurationConfigHealthConfiguration.java | 4 ++-- .../AppConfigurationHealthConfiguration.java | 4 ++-- .../implementation/cosmos/CosmosHealthConfiguration.java | 4 ++-- .../eventhubs/EventHubsHealthConfiguration.java | 4 ++-- .../keyvault/KeyVaultCertificateHealthConfiguration.java | 4 ++-- .../keyvault/KeyVaultSecretHealthConfiguration.java | 4 ++-- .../storage/StorageBlobHealthConfiguration.java | 4 ++-- .../storage/StorageFileShareHealthConfiguration.java | 4 ++-- .../storage/StorageQueueHealthConfiguration.java | 4 ++-- sdk/spring/spring-cloud-azure-actuator/pom.xml | 6 ++++++ .../AppConfigurationConfigHealthIndicator.java | 4 ++-- .../appconfiguration/AppConfigurationHealthIndicator.java | 4 ++-- .../implementation/cosmos/CosmosHealthIndicator.java | 8 ++++---- .../eventhubs/EventHubsHealthIndicator.java | 4 ++-- .../keyvault/KeyVaultCertificateHealthIndicator.java | 4 ++-- .../keyvault/KeyVaultSecretHealthIndicator.java | 4 ++-- .../storage/StorageBlobHealthIndicator.java | 4 ++-- .../storage/StorageFileShareHealthIndicator.java | 4 ++-- .../implementation/storage/StorageHealthConstants.java | 2 +- .../storage/StorageQueueHealthIndicator.java | 4 ++-- .../AppConfigurationHealthIndicatorTests.java | 4 ++-- .../implementation/cosmos/CosmosHealthIndicatorTests.java | 4 ++-- .../eventhubs/EventHubsHealthIndicatorTests.java | 4 ++-- .../keyvault/KeyVaultCertificateHealthIndicatorTests.java | 4 ++-- .../keyvault/KeyVaultSecretHealthIndicatorTests.java | 4 ++-- .../storage/StorageBlobHealthIndicatorTests.java | 4 ++-- .../storage/StorageFileShareHealthIndicatorTests.java | 4 ++-- .../storage/StorageQueueHealthIndicatorTests.java | 4 ++-- .../EventHubsBinderHealthIndicatorConfiguration.java | 2 +- .../implementation/EventHubsHealthIndicatorTests.java | 4 ++-- .../ServiceBusBinderHealthIndicatorConfiguration.java | 2 +- .../implementation/ServiceBusHealthIndicatorTests.java | 4 ++-- 34 files changed, 74 insertions(+), 61 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 0a110cb10cb7..abb728ecb571 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -402,6 +402,7 @@ springboot3_org.springframework:spring-context;7.0.0-RC3 springboot3_org.springframework:spring-core-test;7.0.0-RC3 springboot3_org.springframework:spring-core;7.0.0-RC3 springboot3_org.springframework:spring-expression;7.0.0-RC3 +springboot3_org.springframework.boot:spring-boot-health;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-jackson;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-jdbc;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-jms;4.0.0-RC2 diff --git a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml index 4019e11e7272..e2a792558e25 100644 --- a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml @@ -44,6 +44,12 @@ 4.0.0-RC2 compile + + org.springframework.boot + spring-boot-health + 4.0.0-RC2 + true + com.fasterxml.jackson.core jackson-databind diff --git a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/appconfiguration/AppConfigurationConfigHealthConfiguration.java b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/appconfiguration/AppConfigurationConfigHealthConfiguration.java index 976088cbcf9a..8a333c0a61e5 100644 --- a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/appconfiguration/AppConfigurationConfigHealthConfiguration.java +++ b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/appconfiguration/AppConfigurationConfigHealthConfiguration.java @@ -3,8 +3,8 @@ package com.azure.spring.cloud.actuator.autoconfigure.implementation.appconfiguration; -import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator; -import org.springframework.boot.actuate.health.HealthIndicator; +import org.springframework.boot.health.autoconfigure.contributor.ConditionalOnEnabledHealthIndicator; +import org.springframework.boot.health.contributor.HealthIndicator; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; diff --git a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/appconfiguration/AppConfigurationHealthConfiguration.java b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/appconfiguration/AppConfigurationHealthConfiguration.java index d633b5e331bf..d6dda6513f4e 100644 --- a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/appconfiguration/AppConfigurationHealthConfiguration.java +++ b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/appconfiguration/AppConfigurationHealthConfiguration.java @@ -6,8 +6,8 @@ import com.azure.data.appconfiguration.ConfigurationAsyncClient; import com.azure.spring.cloud.actuator.implementation.appconfiguration.AppConfigurationHealthIndicator; import com.azure.spring.cloud.autoconfigure.implementation.appconfiguration.AzureAppConfigurationAutoConfiguration; -import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator; -import org.springframework.boot.actuate.health.HealthIndicator; +import org.springframework.boot.health.autoconfigure.contributor.ConditionalOnEnabledHealthIndicator; +import org.springframework.boot.health.contributor.HealthIndicator; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; diff --git a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/cosmos/CosmosHealthConfiguration.java b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/cosmos/CosmosHealthConfiguration.java index d26b7a15a877..68992a770b2e 100644 --- a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/cosmos/CosmosHealthConfiguration.java +++ b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/cosmos/CosmosHealthConfiguration.java @@ -7,8 +7,8 @@ import com.azure.spring.cloud.actuator.implementation.cosmos.CosmosHealthIndicator; import com.azure.spring.cloud.autoconfigure.implementation.cosmos.AzureCosmosAutoConfiguration; import com.azure.spring.cloud.autoconfigure.implementation.cosmos.properties.AzureCosmosProperties; -import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator; -import org.springframework.boot.actuate.health.HealthIndicator; +import org.springframework.boot.health.autoconfigure.contributor.ConditionalOnEnabledHealthIndicator; +import org.springframework.boot.health.contributor.HealthIndicator; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; diff --git a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/eventhubs/EventHubsHealthConfiguration.java b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/eventhubs/EventHubsHealthConfiguration.java index 048c4318315d..84d3f5f2ea02 100644 --- a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/eventhubs/EventHubsHealthConfiguration.java +++ b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/eventhubs/EventHubsHealthConfiguration.java @@ -9,8 +9,8 @@ import com.azure.spring.cloud.actuator.implementation.eventhubs.EventHubsHealthIndicator; import com.azure.spring.cloud.autoconfigure.implementation.eventhubs.AzureEventHubsAutoConfiguration; import org.springframework.beans.factory.ObjectProvider; -import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator; -import org.springframework.boot.actuate.health.HealthIndicator; +import org.springframework.boot.health.autoconfigure.contributor.ConditionalOnEnabledHealthIndicator; +import org.springframework.boot.health.contributor.HealthIndicator; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; diff --git a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/keyvault/KeyVaultCertificateHealthConfiguration.java b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/keyvault/KeyVaultCertificateHealthConfiguration.java index 8958fd052e7e..671ea3f38e40 100644 --- a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/keyvault/KeyVaultCertificateHealthConfiguration.java +++ b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/keyvault/KeyVaultCertificateHealthConfiguration.java @@ -6,8 +6,8 @@ import com.azure.security.keyvault.certificates.CertificateAsyncClient; import com.azure.spring.cloud.actuator.implementation.keyvault.KeyVaultCertificateHealthIndicator; import com.azure.spring.cloud.autoconfigure.implementation.keyvault.certificates.AzureKeyVaultCertificateAutoConfiguration; -import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator; -import org.springframework.boot.actuate.health.HealthIndicator; +import org.springframework.boot.health.autoconfigure.contributor.ConditionalOnEnabledHealthIndicator; +import org.springframework.boot.health.contributor.HealthIndicator; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; diff --git a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/keyvault/KeyVaultSecretHealthConfiguration.java b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/keyvault/KeyVaultSecretHealthConfiguration.java index e432b3fd0df0..22c0688daec1 100644 --- a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/keyvault/KeyVaultSecretHealthConfiguration.java +++ b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/keyvault/KeyVaultSecretHealthConfiguration.java @@ -6,8 +6,8 @@ import com.azure.security.keyvault.secrets.SecretAsyncClient; import com.azure.spring.cloud.actuator.implementation.keyvault.KeyVaultSecretHealthIndicator; import com.azure.spring.cloud.autoconfigure.implementation.keyvault.secrets.AzureKeyVaultSecretAutoConfiguration; -import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator; -import org.springframework.boot.actuate.health.HealthIndicator; +import org.springframework.boot.health.autoconfigure.contributor.ConditionalOnEnabledHealthIndicator; +import org.springframework.boot.health.contributor.HealthIndicator; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; diff --git a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/storage/StorageBlobHealthConfiguration.java b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/storage/StorageBlobHealthConfiguration.java index 194b23d55303..551735866abc 100644 --- a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/storage/StorageBlobHealthConfiguration.java +++ b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/storage/StorageBlobHealthConfiguration.java @@ -6,8 +6,8 @@ import com.azure.spring.cloud.actuator.implementation.storage.StorageBlobHealthIndicator; import com.azure.spring.cloud.autoconfigure.implementation.storage.blob.AzureStorageBlobAutoConfiguration; import com.azure.storage.blob.BlobServiceAsyncClient; -import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator; -import org.springframework.boot.actuate.health.HealthIndicator; +import org.springframework.boot.health.autoconfigure.contributor.ConditionalOnEnabledHealthIndicator; +import org.springframework.boot.health.contributor.HealthIndicator; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; diff --git a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/storage/StorageFileShareHealthConfiguration.java b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/storage/StorageFileShareHealthConfiguration.java index 36bd8867ce73..13c224da607d 100644 --- a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/storage/StorageFileShareHealthConfiguration.java +++ b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/storage/StorageFileShareHealthConfiguration.java @@ -6,8 +6,8 @@ import com.azure.spring.cloud.actuator.implementation.storage.StorageFileShareHealthIndicator; import com.azure.spring.cloud.autoconfigure.implementation.storage.fileshare.AzureStorageFileShareAutoConfiguration; import com.azure.storage.file.share.ShareServiceAsyncClient; -import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator; -import org.springframework.boot.actuate.health.HealthIndicator; +import org.springframework.boot.health.autoconfigure.contributor.ConditionalOnEnabledHealthIndicator; +import org.springframework.boot.health.contributor.HealthIndicator; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; diff --git a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/storage/StorageQueueHealthConfiguration.java b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/storage/StorageQueueHealthConfiguration.java index 2458921f9018..4bfe3c08ad1d 100644 --- a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/storage/StorageQueueHealthConfiguration.java +++ b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/src/main/java/com/azure/spring/cloud/actuator/autoconfigure/implementation/storage/StorageQueueHealthConfiguration.java @@ -6,8 +6,8 @@ import com.azure.spring.cloud.actuator.implementation.storage.StorageQueueHealthIndicator; import com.azure.spring.cloud.autoconfigure.implementation.storage.queue.AzureStorageQueueAutoConfiguration; import com.azure.storage.queue.QueueServiceAsyncClient; -import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator; -import org.springframework.boot.actuate.health.HealthIndicator; +import org.springframework.boot.health.autoconfigure.contributor.ConditionalOnEnabledHealthIndicator; +import org.springframework.boot.health.contributor.HealthIndicator; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; diff --git a/sdk/spring/spring-cloud-azure-actuator/pom.xml b/sdk/spring/spring-cloud-azure-actuator/pom.xml index 3e3098c929ad..38107e5866ea 100644 --- a/sdk/spring/spring-cloud-azure-actuator/pom.xml +++ b/sdk/spring/spring-cloud-azure-actuator/pom.xml @@ -48,6 +48,12 @@ 4.0.0-RC2 compile + + org.springframework.boot + spring-boot-health + 4.0.0-RC2 + true + - 4.0.0-RC2 + spring-boot-persistence + 4.0.0-RC2
com.azure @@ -284,6 +284,7 @@ org.springframework:spring-expression:[7.0.0-RC3] org.springframework:spring-core:[7.0.0-RC3] org.springframework:spring-context:[7.0.0-RC3] + org.springframework.boot:spring-boot-persistence:[4.0.0-RC2] org.springframework.data:spring-data-commons:[3.5.3] org.javatuples:javatuples:[1.2] com.fasterxml.jackson.core:jackson-annotations:[2.20] diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index 2f33b351e8ef..5d797c7540a9 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -567,7 +567,7 @@ org.springframework.boot:spring-boot-jms:[4.0.0-RC2] org.springframework.boot:spring-boot-restclient:[4.0.0-RC2] org.springframework.boot:spring-boot-security:[4.0.0-RC2] - org.springframework.cloud:spring-cloud-starter-stream-kafka:[4.3.0] + org.springframework.cloud:spring-cloud-starter-stream-kafka:[5.0.0-RC1] org.springframework.security:spring-security-config:[6.5.3] org.springframework.security:spring-security-oauth2-client:[6.5.3] org.springframework.security:spring-security-oauth2-jose:[6.5.3] diff --git a/sdk/spring/spring-cloud-azure-integration-tests/pom.xml b/sdk/spring/spring-cloud-azure-integration-tests/pom.xml index ffb15b9e3873..c0ab0483a786 100644 --- a/sdk/spring/spring-cloud-azure-integration-tests/pom.xml +++ b/sdk/spring/spring-cloud-azure-integration-tests/pom.xml @@ -107,7 +107,7 @@ org.springframework.cloud spring-cloud-starter-stream-kafka - 4.3.0 + 5.0.0-RC1 org.springframework.boot From e07c2563315ed3e265ac9d9387a65477074b4596 Mon Sep 17 00:00:00 2001 From: muyao Date: Thu, 20 Nov 2025 08:27:40 +0800 Subject: [PATCH 025/186] fix --- eng/versioning/external_dependencies.txt | 3 --- sdk/spring/spring-cloud-azure-actuator/pom.xml | 1 + .../keyvault/secret/TestBootstrapRegistryInitializer.java | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 0a6b91c9468a..8999c838a926 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -316,12 +316,9 @@ storage_com.microsoft.azure:azure-storage;8.6.6 # sdk\spring\pom.xml modules springboot3_com.diffplug.spotless:spotless-maven-plugin;2.30.0 springboot3_com.fasterxml.jackson.core:jackson-annotations;2.20 -springboot3_com.fasterxml.jackson.core:jackson-core;2.20.1 springboot3_com.fasterxml.jackson.core:jackson-databind;2.20.1 -springboot3_com.fasterxml.jackson.dataformat:jackson-dataformat-xml;2.20.1 springboot3_com.fasterxml.jackson.datatype:jackson-datatype-jdk8;2.20.1 springboot3_com.fasterxml.jackson.datatype:jackson-datatype-jsr310;2.20.1 -springboot3_com.fasterxml.jackson.module:jackson-module-afterburner;2.20.1 springboot3_com.fasterxml.jackson.module:jackson-module-parameter-names;2.20.1 springboot3_com.github.spotbugs:spotbugs-maven-plugin;4.8.2.0 springboot3_com.google.code.findbugs:jsr305;3.0.2 diff --git a/sdk/spring/spring-cloud-azure-actuator/pom.xml b/sdk/spring/spring-cloud-azure-actuator/pom.xml index 38107e5866ea..bc6d1e55d8a0 100644 --- a/sdk/spring/spring-cloud-azure-actuator/pom.xml +++ b/sdk/spring/spring-cloud-azure-actuator/pom.xml @@ -191,6 +191,7 @@ org.springframework.boot:spring-boot-actuator:[4.0.0-RC2] + org.springframework.boot:spring-boot-health:[4.0.0-RC2]
diff --git a/sdk/spring/spring-cloud-azure-integration-tests/src/test/java/com/azure/spring/cloud/integration/tests/keyvault/secret/TestBootstrapRegistryInitializer.java b/sdk/spring/spring-cloud-azure-integration-tests/src/test/java/com/azure/spring/cloud/integration/tests/keyvault/secret/TestBootstrapRegistryInitializer.java index 15a384ae7e64..ee03574e33ef 100644 --- a/sdk/spring/spring-cloud-azure-integration-tests/src/test/java/com/azure/spring/cloud/integration/tests/keyvault/secret/TestBootstrapRegistryInitializer.java +++ b/sdk/spring/spring-cloud-azure-integration-tests/src/test/java/com/azure/spring/cloud/integration/tests/keyvault/secret/TestBootstrapRegistryInitializer.java @@ -5,8 +5,8 @@ import com.azure.core.credential.TokenCredential; import com.azure.spring.cloud.integration.tests.util.TestCredentialUtils; -import org.springframework.boot.BootstrapRegistry; -import org.springframework.boot.BootstrapRegistryInitializer; +import org.springframework.boot.bootstrap.BootstrapRegistry; +import org.springframework.boot.bootstrap.BootstrapRegistryInitializer; class TestBootstrapRegistryInitializer implements BootstrapRegistryInitializer { From 663c11a2659155b5f2ee978d72933d7c244630a8 Mon Sep 17 00:00:00 2001 From: muyao Date: Thu, 20 Nov 2025 09:09:40 +0800 Subject: [PATCH 026/186] fix --- sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml index e2a792558e25..1f54bcb9040a 100644 --- a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml @@ -208,6 +208,7 @@ com.fasterxml.jackson.core:jackson-databind:[2.20.1] org.springframework.boot:spring-boot-actuator:[4.0.0-RC2] org.springframework.boot:spring-boot-actuator-autoconfigure:[4.0.0-RC2] + org.springframework.boot:spring-boot-health:[4.0.0-RC2]
From f22be56e541d8b4eb7676bd719a820e6b848ca13 Mon Sep 17 00:00:00 2001 From: muyao Date: Thu, 20 Nov 2025 09:41:39 +0800 Subject: [PATCH 027/186] fix --- .vscode/cspell.json | 5 +++++ sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml | 6 ++++++ .../cloud/autoconfigure/monitor/SpringMonitorTest.java | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index ade9ca3d6b7f..01ff5918b726 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -1084,6 +1084,7 @@ "itest", "itests", "jaas", + "jandex", "janino", "jaspi", "jaxb", @@ -1103,6 +1104,7 @@ "jooq", "jpamodelgen", "jspc", + "jspecify", "jstl", "jtds", "jvnet", @@ -1184,6 +1186,7 @@ "uberjar", "ultraq", "unboundid", + "uring", "vavr", "vertx", "vibur", @@ -1191,8 +1194,10 @@ "weaviate", "webmvc", "xerial", + "xmlparserv", "xmpp", "xsom", + "xtend", "yasson", "yugabytedb", "zaxxer", diff --git a/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml b/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml index 017427bf8914..9cece94cf2bc 100644 --- a/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml @@ -61,6 +61,12 @@ 4.0.0-RC2 test
+ + org.springframework.boot + spring-boot-resttestclient + 4.0.0-RC2 + test + com.azure azure-core-test diff --git a/sdk/spring/spring-cloud-azure-starter-monitor-test/src/test/java/com/azure/spring/cloud/autoconfigure/monitor/SpringMonitorTest.java b/sdk/spring/spring-cloud-azure-starter-monitor-test/src/test/java/com/azure/spring/cloud/autoconfigure/monitor/SpringMonitorTest.java index 9e31cb5db718..b61c6b207550 100644 --- a/sdk/spring/spring-cloud-azure-starter-monitor-test/src/test/java/com/azure/spring/cloud/autoconfigure/monitor/SpringMonitorTest.java +++ b/sdk/spring/spring-cloud-azure-starter-monitor-test/src/test/java/com/azure/spring/cloud/autoconfigure/monitor/SpringMonitorTest.java @@ -17,7 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.TestConfiguration; -import org.springframework.boot.test.web.client.TestRestTemplate; +import org.springframework.boot.resttestclient.TestRestTemplate; import org.springframework.context.annotation.Bean; import reactor.util.annotation.Nullable; From 31b56e5163d2648644218e308ed0cc29209c9ba9 Mon Sep 17 00:00:00 2001 From: muyao Date: Thu, 20 Nov 2025 10:27:40 +0800 Subject: [PATCH 028/186] replace spring-boot-starter-web with spring-boot-starter-webmvc --- eng/versioning/external_dependencies.txt | 3 ++- .../spring-cloud-azure-appconfiguration-config-web/pom.xml | 6 +++--- .../pom.xml | 2 +- sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml | 4 ++-- .../cloud/autoconfigure/monitor/SpringMonitorTest.java | 2 ++ 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 559a8b325d37..ebbace1e7ae8 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -371,7 +371,7 @@ springboot3_org.springframework.boot:spring-boot-starter-data-jdbc;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-starter-integration;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-starter-parent;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-starter-test;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-starter-web;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-starter-webmvc;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-starter;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-test;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-testcontainers;4.0.0-RC2 @@ -383,6 +383,7 @@ springboot3_org.springframework.cloud:spring-cloud-stream;4.3.0 springboot3_org.springframework.data:spring-data-commons;3.5.3 springboot3_org.springframework.data:spring-data-redis;3.5.3 springboot3_org.springframework.boot:spring-boot-data-redis;4.0.0-RC2 +springboot3_org.springframework.boot:spring-boot-resttestclient;4.0.0-RC2 springboot3_org.springframework.integration:spring-integration-core;7.0.0-RC2 springboot3_org.springframework.boot:spring-boot-http-converter;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-kafka;4.0.0-RC2 diff --git a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/pom.xml b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/pom.xml index efd911657520..0bd524eb10f0 100644 --- a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/pom.xml +++ b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/pom.xml @@ -25,8 +25,8 @@ org.springframework.boot - spring-boot-starter-web - 4.0.0-RC2 + spring-boot-starter-webmvc + 4.0.0-RC2 org.springframework.boot @@ -119,7 +119,7 @@ org.springframework.boot:spring-boot-starter-actuator:[4.0.0-RC2] - org.springframework.boot:spring-boot-starter-web:[4.0.0-RC2] + org.springframework.boot:spring-boot-starter-webmvc:[4.0.0-RC2] org.springframework.cloud:spring-cloud-bus:[4.3.0] diff --git a/sdk/spring/spring-cloud-azure-integration-test-appconfiguration-config/pom.xml b/sdk/spring/spring-cloud-azure-integration-test-appconfiguration-config/pom.xml index 033392bcc880..aec66b0f6c01 100644 --- a/sdk/spring/spring-cloud-azure-integration-test-appconfiguration-config/pom.xml +++ b/sdk/spring/spring-cloud-azure-integration-test-appconfiguration-config/pom.xml @@ -25,7 +25,7 @@ org.springframework.boot - spring-boot-starter-web + spring-boot-starter-webmvc org.springframework.boot diff --git a/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml b/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml index 9cece94cf2bc..0ea0ee440840 100644 --- a/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml @@ -47,8 +47,8 @@ org.springframework.boot - spring-boot-starter-web - 4.0.0-RC2 + spring-boot-starter-webmvc + 4.0.0-RC2 org.springframework.boot diff --git a/sdk/spring/spring-cloud-azure-starter-monitor-test/src/test/java/com/azure/spring/cloud/autoconfigure/monitor/SpringMonitorTest.java b/sdk/spring/spring-cloud-azure-starter-monitor-test/src/test/java/com/azure/spring/cloud/autoconfigure/monitor/SpringMonitorTest.java index b61c6b207550..d2174eba171c 100644 --- a/sdk/spring/spring-cloud-azure-starter-monitor-test/src/test/java/com/azure/spring/cloud/autoconfigure/monitor/SpringMonitorTest.java +++ b/sdk/spring/spring-cloud-azure-starter-monitor-test/src/test/java/com/azure/spring/cloud/autoconfigure/monitor/SpringMonitorTest.java @@ -15,6 +15,7 @@ import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.resttestclient.TestRestTemplate; @@ -35,6 +36,7 @@ @SpringBootTest( classes = {Application.class, SpringMonitorTest.TestConfig.class}, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@AutoConfigureTestRestTemplate class SpringMonitorTest { private static CountDownLatch countDownLatch; From c3c173524746f61b96828b48ec41ce691dd57a06 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Nov 2025 07:05:03 +0000 Subject: [PATCH 029/186] chore(spring): update Spring Security to 7.0.0-RC3 Co-authored-by: Netyyyy <92105726+Netyyyy@users.noreply.github.com> --- eng/versioning/external_dependencies.txt | 10 +++++----- ...t_4.0.0-RC2_managed_external_dependencies.txt | 8 ++++++++ .../spring-cloud-azure-autoconfigure/pom.xml | 16 ++++++++-------- .../pom.xml | 8 ++++---- .../pom.xml | 4 ++-- 5 files changed, 27 insertions(+), 19 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index ebbace1e7ae8..fc764521c324 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -388,11 +388,11 @@ springboot3_org.springframework.integration:spring-integration-core;7.0.0-RC2 springboot3_org.springframework.boot:spring-boot-http-converter;4.0.0-RC2 springboot3_org.springframework.boot:spring-boot-kafka;4.0.0-RC2 springboot3_org.springframework.retry:spring-retry;2.0.12 -springboot3_org.springframework.security:spring-security-config;6.5.3 -springboot3_org.springframework.security:spring-security-oauth2-client;6.5.3 -springboot3_org.springframework.security:spring-security-oauth2-jose;6.5.3 -springboot3_org.springframework.security:spring-security-oauth2-resource-server;6.5.3 -springboot3_org.springframework.security:spring-security-web;6.5.3 +springboot3_org.springframework.security:spring-security-config;7.0.0-RC3 +springboot3_org.springframework.security:spring-security-oauth2-client;7.0.0-RC3 +springboot3_org.springframework.security:spring-security-oauth2-jose;7.0.0-RC3 +springboot3_org.springframework.security:spring-security-oauth2-resource-server;7.0.0-RC3 +springboot3_org.springframework.security:spring-security-web;7.0.0-RC3 springboot3_org.springframework:spring-beans;7.0.0-RC3 springboot3_org.springframework:spring-context-support;7.0.0-RC3 springboot3_org.springframework:spring-context;7.0.0-RC3 diff --git a/sdk/spring/scripts/spring_boot_4.0.0-RC2_managed_external_dependencies.txt b/sdk/spring/scripts/spring_boot_4.0.0-RC2_managed_external_dependencies.txt index 124377731965..0de38df43cfb 100644 --- a/sdk/spring/scripts/spring_boot_4.0.0-RC2_managed_external_dependencies.txt +++ b/sdk/spring/scripts/spring_boot_4.0.0-RC2_managed_external_dependencies.txt @@ -1743,3 +1743,11 @@ tools.jackson.module:jackson-module-scala_2.13;3.0.1 tools.jackson.module:jackson-module-scala_3;3.0.1 tools.jackson:jackson-bom;3.0.1 wsdl4j:wsdl4j;1.6.3 +org.springframework.security:spring-security-config;7.0.0-RC3 +org.springframework.security:spring-security-core;7.0.0-RC3 +org.springframework.security:spring-security-oauth2-client;7.0.0-RC3 +org.springframework.security:spring-security-oauth2-core;7.0.0-RC3 +org.springframework.security:spring-security-oauth2-jose;7.0.0-RC3 +org.springframework.security:spring-security-oauth2-resource-server;7.0.0-RC3 +org.springframework.security:spring-security-web;7.0.0-RC3 +org.springframework.security:spring-security-test;7.0.0-RC3 diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index 5d797c7540a9..c34a3d802bc4 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -364,25 +364,25 @@ org.springframework.security spring-security-oauth2-client - 6.5.3 + 7.0.0-RC3 true org.springframework.security spring-security-oauth2-resource-server - 6.5.3 + 7.0.0-RC3 true org.springframework.security spring-security-oauth2-jose - 6.5.3 + 7.0.0-RC3 true org.springframework.security spring-security-config - 6.5.3 + 7.0.0-RC3 true @@ -568,10 +568,10 @@ org.springframework.boot:spring-boot-restclient:[4.0.0-RC2] org.springframework.boot:spring-boot-security:[4.0.0-RC2] org.springframework.cloud:spring-cloud-starter-stream-kafka:[5.0.0-RC1] - org.springframework.security:spring-security-config:[6.5.3] - org.springframework.security:spring-security-oauth2-client:[6.5.3] - org.springframework.security:spring-security-oauth2-jose:[6.5.3] - org.springframework.security:spring-security-oauth2-resource-server:[6.5.3] + org.springframework.security:spring-security-config:[7.0.0-RC3] + org.springframework.security:spring-security-oauth2-client:[7.0.0-RC3] + org.springframework.security:spring-security-oauth2-jose:[7.0.0-RC3] + org.springframework.security:spring-security-oauth2-resource-server:[7.0.0-RC3] org.springframework:spring-context-support:[7.0.0-RC3] org.springframework:spring-tx:[7.0.0-RC3] diff --git a/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml b/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml index b2c6794df3d4..176e7e0c84ab 100644 --- a/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml @@ -95,22 +95,22 @@ org.springframework.security spring-security-config - 6.5.3 + 7.0.0-RC3 org.springframework.security spring-security-oauth2-client - 6.5.3 + 7.0.0-RC3 org.springframework.security spring-security-oauth2-jose - 6.5.3 + 7.0.0-RC3 org.springframework.security spring-security-oauth2-resource-server - 6.5.3 + 7.0.0-RC3 diff --git a/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml b/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml index 56e53c53fc72..31fc942e4e0c 100644 --- a/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml @@ -94,12 +94,12 @@ org.springframework.security spring-security-web - 6.5.3 + 7.0.0-RC3 org.springframework.security spring-security-config - 6.5.3 + 7.0.0-RC3 com.nimbusds From 004c76d2dc513388faac513fdf6e7542f28ed41c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Nov 2025 07:59:17 +0000 Subject: [PATCH 030/186] chore(spring): upgrade Spring Boot to 4.0.0-RC2 and Spring Cloud to 2025.1.0-M4 (partial) Co-authored-by: Netyyyy <92105726+Netyyyy@users.noreply.github.com> --- .../security/AadResourceServerHttpSecurityConfigurer.java | 8 ++++++-- .../security/AadWebApplicationHttpSecurityConfigurer.java | 8 ++++++-- .../aadb2c/security/AadB2cOidcLoginConfigurer.java | 3 +-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadResourceServerHttpSecurityConfigurer.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadResourceServerHttpSecurityConfigurer.java index be05dc42a27a..4bf969b23754 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadResourceServerHttpSecurityConfigurer.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadResourceServerHttpSecurityConfigurer.java @@ -31,8 +31,12 @@ public class AadResourceServerHttpSecurityConfigurer extends AbstractHttpConfigu private Converter> jwtGrantedAuthoritiesConverter; @Override - public void init(HttpSecurity builder) throws Exception { - super.init(builder); + public void init(HttpSecurity builder) { + try { + super.init(builder); + } catch (Exception e) { + throw new RuntimeException("Failed to initialize AadResourceServerHttpSecurityConfigurer", e); + } ApplicationContext context = builder.getSharedObject(ApplicationContext.class); this.properties = context.getBean(AadResourceServerProperties.class); // @formatter:off diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadWebApplicationHttpSecurityConfigurer.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadWebApplicationHttpSecurityConfigurer.java index f332ca3a0959..2451344fd53d 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadWebApplicationHttpSecurityConfigurer.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadWebApplicationHttpSecurityConfigurer.java @@ -64,8 +64,12 @@ public class AadWebApplicationHttpSecurityConfigurer extends AbstractHttpConfigu private Filter conditionalAccessFilter; @Override - public void init(HttpSecurity builder)throws Exception { - super.init(builder); + public void init(HttpSecurity builder) { + try { + super.init(builder); + } catch (Exception e) { + throw new RuntimeException("Failed to initialize AadWebApplicationHttpSecurityConfigurer", e); + } ApplicationContext context = builder.getSharedObject(ApplicationContext.class); this.repo = context.getBean(ClientRegistrationRepository.class); diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOidcLoginConfigurer.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOidcLoginConfigurer.java index f39128a972a4..398e415ccc4b 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOidcLoginConfigurer.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOidcLoginConfigurer.java @@ -74,10 +74,9 @@ public AadB2cOidcLoginConfigurer(LogoutSuccessHandler handler, * Initialize the SecurityBuilder. * * @param http the http - * @throws Exception failed to initialize SecurityBuilder */ @Override - public void init(HttpSecurity http) throws Exception { + public void init(HttpSecurity http) { // @formatter:off http.logout(logout -> logout.logoutSuccessHandler(handler)) .oauth2Login(oauth2 -> oauth2 From 3efc4a555c3711a9da6161d393c4148f764d5f8c Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 21 Nov 2025 11:31:09 -0800 Subject: [PATCH 031/186] Sync eng/common directory with azure-sdk-tools for PR 13009 (#47348) * Used another way to construct package info array * Filtered out empty string for PackageInfoFiles --------- Co-authored-by: ray chen --- eng/common/pipelines/templates/steps/create-apireview.yml | 2 +- .../pipelines/templates/steps/validate-all-packages.yml | 2 +- eng/common/scripts/Create-APIReview.ps1 | 5 +++-- eng/common/scripts/Validate-All-Packages.ps1 | 5 +++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/eng/common/pipelines/templates/steps/create-apireview.yml b/eng/common/pipelines/templates/steps/create-apireview.yml index 6942abd0baa6..288c775aac76 100644 --- a/eng/common/pipelines/templates/steps/create-apireview.yml +++ b/eng/common/pipelines/templates/steps/create-apireview.yml @@ -41,7 +41,7 @@ steps: inputs: filePath: ${{ parameters.SourceRootPath }}/eng/common/scripts/Create-APIReview.ps1 arguments: > - -PackageInfoFiles ('${{ convertToJson(parameters.PackageInfoFiles) }}' | ConvertFrom-Json -NoEnumerate) + -PackageInfoFiles @('${{ join(''',''', parameters.PackageInfoFiles) }}') -ArtifactList ('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Select-Object Name) -ArtifactPath '${{parameters.ArtifactPath}}' -ArtifactName ${{ parameters.ArtifactName }} diff --git a/eng/common/pipelines/templates/steps/validate-all-packages.yml b/eng/common/pipelines/templates/steps/validate-all-packages.yml index ab75877a02da..ae09d268a940 100644 --- a/eng/common/pipelines/templates/steps/validate-all-packages.yml +++ b/eng/common/pipelines/templates/steps/validate-all-packages.yml @@ -34,7 +34,7 @@ steps: -BuildDefinition $(System.CollectionUri)$(System.TeamProject)/_build?definitionId=$(System.DefinitionId) ` -PipelineUrl $(System.CollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId) ` -IsReleaseBuild $$(SetAsReleaseBuild) ` - -PackageInfoFiles ('${{ convertToJson(parameters.PackageInfoFiles) }}' | ConvertFrom-Json -NoEnumerate) + -PackageInfoFiles @('${{ join(''',''', parameters.PackageInfoFiles) }}') workingDirectory: $(Pipeline.Workspace) displayName: Validate packages and update work items continueOnError: true diff --git a/eng/common/scripts/Create-APIReview.ps1 b/eng/common/scripts/Create-APIReview.ps1 index 5d112d71a0a4..ff98d4570485 100644 --- a/eng/common/scripts/Create-APIReview.ps1 +++ b/eng/common/scripts/Create-APIReview.ps1 @@ -373,7 +373,8 @@ elseif ($ArtifactList -and $ArtifactList.Count -gt 0) { elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0) { # Lowest Priority: Direct PackageInfoFiles (new method) Write-Host "Using PackageInfoFiles parameter with $($PackageInfoFiles.Count) files" - $ProcessedPackageInfoFiles = $PackageInfoFiles # Use as-is + # Filter out empty strings or whitespace-only entries + $ProcessedPackageInfoFiles = $PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } } else { Write-Error "No package information provided. Please provide either 'PackageName', 'ArtifactList', or 'PackageInfoFiles' parameters." @@ -382,7 +383,7 @@ else { # Validate that we have package info files to process if (-not $ProcessedPackageInfoFiles -or $ProcessedPackageInfoFiles.Count -eq 0) { - Write-Error "No package info files found after processing parameters." + Write-Error "No package info files found after processing parameters. Or PackageInfoFiles parameter contains only empty or whitespace entries, please check the artifact settings." exit 1 } diff --git a/eng/common/scripts/Validate-All-Packages.ps1 b/eng/common/scripts/Validate-All-Packages.ps1 index a27fd4652d93..24cfdc85468b 100644 --- a/eng/common/scripts/Validate-All-Packages.ps1 +++ b/eng/common/scripts/Validate-All-Packages.ps1 @@ -282,12 +282,13 @@ elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0) { # Direct PackageInfoFiles (new method) Write-Host "Using PackageInfoFiles parameter with $($PackageInfoFiles.Count) files" - $ProcessedPackageInfoFiles = $PackageInfoFiles + # Filter out empty strings or whitespace-only entries + $ProcessedPackageInfoFiles = $PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } } # Validate that we have package info files to process if (-not $ProcessedPackageInfoFiles -or $ProcessedPackageInfoFiles.Count -eq 0) { - Write-Error "No package info files found after processing parameters." + Write-Error "No package info files found after processing parameters. Or PackageInfoFiles parameter contains only empty or whitespace entries, please check the artifact settings." exit 1 } From 433c001ea480741a84370af9b0aee8d21b109cdb Mon Sep 17 00:00:00 2001 From: Ray Chen Date: Fri, 21 Nov 2025 11:32:49 -0800 Subject: [PATCH 032/186] Pass package info to the API review and package validation pipelines (#47335) * Passed the package info for apireview and validate package pipeline * Added test pipeline variable to patch release pipeline * Fixed JSON conversion error on windows os * Used compile time variable format * Escaped forward slash in path * Used parameter instead * Escaped forward slash * replaced the backslash * Updated test pipeline input * Updated yml to use the array object * Dynamic loaded the artifact for set test pipeline version template * Apply suggestions from code review * Apply suggestions from code review * Added display name for testPipeline parameter * Reverted change of set-test-pipeline-version template reference --- eng/pipelines/patch-release.yml | 8 ++++++++ eng/pipelines/templates/jobs/ci.yml | 8 ++++++-- .../templates/stages/archetype-java-release-batch.yml | 4 +++- .../templates/stages/archetype-java-release-patch.yml | 4 +++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/patch-release.yml b/eng/pipelines/patch-release.yml index 1cff7999a982..f7c486ea04b0 100644 --- a/eng/pipelines/patch-release.yml +++ b/eng/pipelines/patch-release.yml @@ -1,8 +1,16 @@ trigger: none pr: none + +parameters: +- name: TestPipeline + displayName: Test Run Without Version Changes + type: boolean + default: false + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client-patch.yml parameters: + TestPipeline: ${{ parameters.TestPipeline }} artifacts: - name: azure-sdk-template groupId: com.azure diff --git a/eng/pipelines/templates/jobs/ci.yml b/eng/pipelines/templates/jobs/ci.yml index d25e167b10bf..633498c91e28 100644 --- a/eng/pipelines/templates/jobs/ci.yml +++ b/eng/pipelines/templates/jobs/ci.yml @@ -260,13 +260,17 @@ jobs: - template: /eng/common/pipelines/templates/steps/create-apireview.yml parameters: - Artifacts: ${{parameters.ReleaseArtifacts}} + PackageInfoFiles: + - ${{ each artifact in parameters.ReleaseArtifacts }}: + - $(Build.ArtifactStagingDirectory)/PackageInfo/${{artifact.name}}.json - template: /eng/common/pipelines/templates/steps/detect-api-changes.yml - template: /eng/common/pipelines/templates/steps/validate-all-packages.yml parameters: - Artifacts: ${{ parameters.Artifacts }} + PackageInfoFiles: + - ${{ each artifact in parameters.Artifacts }}: + - $(Build.ArtifactStagingDirectory)/PackageInfo/${{artifact.name}}.json - template: /eng/pipelines/templates/steps/post-job-cleanup.yml diff --git a/eng/pipelines/templates/stages/archetype-java-release-batch.yml b/eng/pipelines/templates/stages/archetype-java-release-batch.yml index d87608095663..2d76d4878abb 100644 --- a/eng/pipelines/templates/stages/archetype-java-release-batch.yml +++ b/eng/pipelines/templates/stages/archetype-java-release-batch.yml @@ -271,8 +271,10 @@ stages: - template: /eng/common/pipelines/templates/steps/create-apireview.yml parameters: + PackageInfoFiles: + - ${{ each artifact in parameters.Artifacts }}: + - $(Pipeline.Workspace)/packages-signed/PackageInfo/${{artifact.name}}.json ArtifactPath: $(Pipeline.Workspace)/packages-signed - Artifacts: ${{parameters.Artifacts}} ConfigFileDir: $(Pipeline.Workspace)/packages-signed/PackageInfo MarkPackageAsShipped: true ArtifactName: packages-signed diff --git a/eng/pipelines/templates/stages/archetype-java-release-patch.yml b/eng/pipelines/templates/stages/archetype-java-release-patch.yml index 7e0decaa3fab..9ca73fa9331a 100644 --- a/eng/pipelines/templates/stages/archetype-java-release-patch.yml +++ b/eng/pipelines/templates/stages/archetype-java-release-patch.yml @@ -170,8 +170,10 @@ stages: ArtifactPath: $(Pipeline.Workspace)/packages-signed - template: /eng/common/pipelines/templates/steps/create-apireview.yml parameters: + PackageInfoFiles: + - ${{ each artifact in parameters.Artifacts }}: + - $(Pipeline.Workspace)/packages-signed/PackageInfo/${{artifact.name}}.json ArtifactPath: $(Pipeline.Workspace)/packages-signed - Artifacts: ${{parameters.Artifacts}} ConfigFileDir: $(Pipeline.Workspace)/packages-signed/PackageInfo MarkPackageAsShipped: true ArtifactName: packages-signed From fc17cb3e415af87bb4ce9c10d2aece5c67876780 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 21 Nov 2025 15:20:18 -0800 Subject: [PATCH 033/186] Sync eng/common directory with azure-sdk-tools for PR 12976 (#47351) --- .../instructions/azsdk-tools/verify-setup.instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/instructions/azsdk-tools/verify-setup.instructions.md b/eng/common/instructions/azsdk-tools/verify-setup.instructions.md index 38d6a5b40db4..be401efcd406 100644 --- a/eng/common/instructions/azsdk-tools/verify-setup.instructions.md +++ b/eng/common/instructions/azsdk-tools/verify-setup.instructions.md @@ -16,4 +16,4 @@ The user can specify multiple languages to check. If the user wants to check all ## Output Display results in a user-friendly and concise format, highlighting any missing dependencies that need to be addressed and how to resolve them. -WHENEVER Python related requirements fail, ALWAYS ASK the user if they have set the `AZSDKTOOLS_PYTHON_VENV_PATH` system environment variable to their desired virtual environment. This tool can only check requirements in the venv path specified by that environment variable. +When Python tool requirements fail, inform the user about the `AZSDKTOOLS_PYTHON_VENV_PATH` environment variable if they have setup issues. The verify-setup tool can only check Python requirements within the virtual environment specified by this environment variable. From 0719adfb2283be17321b5667d9b96bd2f39a8b4e Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Sun, 23 Nov 2025 23:22:15 -0800 Subject: [PATCH 034/186] [Automation] Generate Fluent Lite from Swagger postgresql#package-flexibleserver-2025-08-01 (#47328) * [Automation] External Change * [Automation] Generate Fluent Lite from Swagger postgresql#package-flexibleserver-2025-08-01 * fix test after break * simplify changelog * nit, changelog --------- Co-authored-by: Weidong Xu --- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 286 +- .../README.md | 22 +- .../SAMPLE.md | 3026 +++++++++-------- .../pom.xml | 5 +- .../PostgreSqlManager.java | 328 +- ... AdministratorsMicrosoftEntrasClient.java} | 185 +- ...vancedThreatProtectionSettingsClient.java} | 88 +- ...> BackupsAutomaticAndOnDemandsClient.java} | 149 +- .../BackupsLongTermRetentionsClient.java | 302 ++ ...ava => CapabilitiesByLocationsClient.java} | 25 +- ....java => CapabilitiesByServersClient.java} | 27 +- ...lesClient.java => CapturedLogsClient.java} | 24 +- .../fluent/CheckNameAvailabilitiesClient.java | 70 - ...ckNameAvailabilityWithLocationsClient.java | 74 - .../fluent/ConfigurationsClient.java | 191 +- .../fluent/DatabasesClient.java | 139 +- .../fluent/FirewallRulesClient.java | 107 +- .../fluent/FlexibleServersClient.java | 198 -- .../fluent/MigrationsClient.java | 361 +- .../fluent/NameAvailabilitiesClient.java | 136 + .../fluent/OperationsClient.java | 12 +- .../fluent/PostgreSqlManagementClient.java | 115 +- ...java => PrivateDnsZoneSuffixesClient.java} | 29 +- ...ateEndpointConnectionOperationsClient.java | 242 -- .../PrivateEndpointConnectionsClient.java | 237 +- .../fluent/ReplicasClient.java | 6 +- .../fluent/ResourceProvidersClient.java | 93 - .../ServerThreatProtectionSettingsClient.java | 175 +- .../fluent/ServersClient.java | 187 +- .../fluent/TuningConfigurationsClient.java | 540 --- .../fluent/TuningIndexesClient.java | 82 - .../TuningOptionsOperationsClient.java} | 124 +- .../fluent/VirtualEndpointsClient.java | 253 +- .../VirtualNetworkSubnetUsagesClient.java | 27 +- ... => AdministratorMicrosoftEntraInner.java} | 88 +- ...dministratorMicrosoftEntraProperties.java} | 75 +- ...tratorMicrosoftEntraPropertiesForAdd.java} | 63 +- ...edThreatProtectionSettingsModelInner.java} | 60 +- ...edThreatProtectionSettingsProperties.java} | 53 +- ...a => BackupAutomaticAndOnDemandInner.java} | 76 +- ...BackupAutomaticAndOnDemandProperties.java} | 67 +- ...ckupsLongTermRetentionOperationInner.java} | 64 +- ...ackupsLongTermRetentionResponseInner.java} | 56 +- ...sLongTermRetentionResponseProperties.java} | 29 +- .../fluent/models/CapabilityInner.java | 381 +++ ...ogFileInner.java => CapturedLogInner.java} | 80 +- ...erties.java => CapturedLogProperties.java} | 70 +- .../fluent/models/ConfigurationInner.java | 42 +- .../models/ConfigurationProperties.java | 66 +- .../fluent/models/DatabaseInner.java | 14 +- .../fluent/models/DatabaseProperties.java | 14 +- .../fluent/models/FirewallRuleInner.java | 18 +- .../fluent/models/FirewallRuleProperties.java | 18 +- .../models/FlexibleServerCapabilityInner.java | 373 -- .../IndexRecommendationResourceInner.java | 368 -- .../models/LtrPreBackupResponseInner.java | 9 +- ...ResourceInner.java => MigrationInner.java} | 336 +- ...va => MigrationNameAvailabilityInner.java} | 67 +- ...operties.java => MigrationProperties.java} | 412 +-- ....java => MigrationPropertiesForPatch.java} | 306 +- ...r.java => NameAvailabilityModelInner.java} | 49 +- .../models/ObjectRecommendationInner.java | 289 ++ ...va => ObjectRecommendationProperties.java} | 181 +- .../fluent/models/OperationInner.java | 18 +- .../fluent/models/QuotaUsageInner.java | 8 +- .../fluent/models/ServerInner.java | 110 +- .../fluent/models/ServerProperties.java | 143 +- ...ate.java => ServerPropertiesForPatch.java} | 245 +- .../models/SessionDetailsResourceInner.java | 233 -- .../fluent/models/SessionResourceInner.java | 261 -- ...urceInner.java => TuningOptionsInner.java} | 30 +- ...ceInner.java => VirtualEndpointInner.java} | 52 +- .../VirtualEndpointResourceProperties.java | 16 +- ... VirtualNetworkSubnetUsageModelInner.java} | 28 +- .../fluent/models/package-info.java | 6 +- .../fluent/package-info.java | 6 +- .../ActiveDirectoryAdministratorImpl.java | 132 - .../AdministratorMicrosoftEntraImpl.java | 179 + ...inistratorsMicrosoftEntrasClientImpl.java} | 354 +- ...=> AdministratorsMicrosoftEntrasImpl.java} | 50 +- ...edThreatProtectionSettingsClientImpl.java} | 332 +- .../AdvancedThreatProtectionSettingsImpl.java | 77 + ...cedThreatProtectionSettingsModelImpl.java} | 48 +- ...va => BackupAutomaticAndOnDemandImpl.java} | 16 +- ...ckupsAutomaticAndOnDemandsClientImpl.java} | 275 +- .../BackupsAutomaticAndOnDemandsImpl.java | 101 + .../implementation/BackupsImpl.java | 95 - ...ackupsLongTermRetentionOperationImpl.java} | 12 +- ...BackupsLongTermRetentionResponseImpl.java} | 12 +- .../BackupsLongTermRetentionsClientImpl.java | 909 +++++ .../BackupsLongTermRetentionsImpl.java | 126 + ...=> CapabilitiesByLocationsClientImpl.java} | 130 +- ....java => CapabilitiesByLocationsImpl.java} | 30 +- ...a => CapabilitiesByServersClientImpl.java} | 115 +- ...pl.java => CapabilitiesByServersImpl.java} | 30 +- ...apabilityImpl.java => CapabilityImpl.java} | 46 +- ...{LogFileImpl.java => CapturedLogImpl.java} | 12 +- ...tImpl.java => CapturedLogsClientImpl.java} | 107 +- ...ilitiesImpl.java => CapturedLogsImpl.java} | 32 +- .../CheckNameAvailabilitiesClientImpl.java | 179 - .../CheckNameAvailabilitiesImpl.java | 58 - ...meAvailabilityWithLocationsClientImpl.java | 194 -- ...heckNameAvailabilityWithLocationsImpl.java | 58 - .../implementation/ConfigurationImpl.java | 13 +- .../ConfigurationsClientImpl.java | 290 +- .../implementation/DatabasesClientImpl.java | 228 +- .../FirewallRulesClientImpl.java | 176 +- .../FlexibleServersClientImpl.java | 480 --- .../implementation/FlexibleServersImpl.java | 84 - .../LtrBackupOperationsImpl.java | 71 - ...onResourceImpl.java => MigrationImpl.java} | 152 +- ...ava => MigrationNameAvailabilityImpl.java} | 12 +- .../implementation/MigrationsClientImpl.java | 799 +++-- .../implementation/MigrationsImpl.java | 156 +- .../NameAvailabilitiesClientImpl.java | 316 ++ .../NameAvailabilitiesImpl.java | 79 + ...pl.java => NameAvailabilityModelImpl.java} | 12 +- ...mpl.java => ObjectRecommendationImpl.java} | 32 +- .../implementation/OperationsClientImpl.java | 51 +- .../PostgreSqlManagementClientImpl.java | 286 +- ... => PrivateDnsZoneSuffixesClientImpl.java} | 61 +- ...l.java => PrivateDnsZoneSuffixesImpl.java} | 22 +- ...ndpointConnectionOperationsClientImpl.java | 623 ---- ...ivateEndpointConnectionOperationsImpl.java | 65 - .../PrivateEndpointConnectionsClientImpl.java | 611 +++- .../PrivateEndpointConnectionsImpl.java | 31 + .../PrivateLinkResourcesClientImpl.java | 28 +- .../implementation/QuotaUsagesClientImpl.java | 30 +- .../implementation/ReplicasClientImpl.java | 30 +- .../ResourceProvidersClientImpl.java | 224 -- .../implementation/ResourceProvidersImpl.java | 61 - .../implementation/ServerImpl.java | 103 +- ...verThreatProtectionSettingsClientImpl.java | 550 +-- .../ServerThreatProtectionSettingsImpl.java | 91 +- .../implementation/ServersClientImpl.java | 366 +- .../SessionDetailsResourceImpl.java | 52 - .../implementation/SessionResourceImpl.java | 56 - .../TuningConfigurationsClientImpl.java | 1735 ---------- .../TuningConfigurationsImpl.java | 102 - .../TuningIndexesClientImpl.java | 409 --- .../implementation/TuningIndexesImpl.java | 53 - .../TuningOptionsClientImpl.java | 490 --- .../implementation/TuningOptionsImpl.java | 57 +- .../TuningOptionsOperationsClientImpl.java | 824 +++++ .../TuningOptionsOperationsImpl.java | 87 + .../TuningOptionsResourceImpl.java | 45 - ...urceImpl.java => VirtualEndpointImpl.java} | 39 +- .../VirtualEndpointsClientImpl.java | 396 +-- .../implementation/VirtualEndpointsImpl.java | 39 +- ...> VirtualNetworkSubnetUsageModelImpl.java} | 12 +- .../VirtualNetworkSubnetUsagesClientImpl.java | 43 +- .../VirtualNetworkSubnetUsagesImpl.java | 18 +- .../implementation/package-info.java | 6 +- .../models/ActiveDirectoryAdministrator.java | 187 - .../models/ActiveDirectoryAuthEnum.java | 51 - .../models/AdminCredentials.java | 14 +- .../models/AdminCredentialsForPatch.java | 121 + .../models/AdministratorListResult.java | 128 - .../models/AdministratorMicrosoftEntra.java | 267 ++ ...va => AdministratorMicrosoftEntraAdd.java} | 69 +- .../AdministratorMicrosoftEntraList.java | 129 + ...ava => AdministratorsMicrosoftEntras.java} | 67 +- ... => AdvancedThreatProtectionSettings.java} | 45 +- .../AdvancedThreatProtectionSettingsList.java | 118 + ...dvancedThreatProtectionSettingsModel.java} | 78 +- .../models/ArmServerKeyType.java | 51 - .../models/AuthConfig.java | 34 +- .../models/AuthConfigForPatch.java | 151 + .../AzureManagedDiskPerformanceTier.java | 111 + .../AzureManagedDiskPerformanceTiers.java | 111 - .../models/Backup.java | 21 +- ...p.java => BackupAutomaticAndOnDemand.java} | 19 +- .../BackupAutomaticAndOnDemandList.java | 129 + .../models/BackupForPatch.java | 144 + .../models/BackupType.java | 51 + ...java => BackupsAutomaticAndOnDemands.java} | 57 +- ...=> BackupsLongTermRetentionOperation.java} | 12 +- ...a => BackupsLongTermRetentionRequest.java} | 40 +- ... => BackupsLongTermRetentionResponse.java} | 11 +- .../BackupsLongTermRetentions.java} | 97 +- ...mRetentionsCheckPrerequisitesHeaders.java} | 12 +- ...RetentionsCheckPrerequisitesResponse.java} | 15 +- .../models/Cancel.java | 51 + .../models/CancelEnum.java | 51 - ...ties.java => CapabilitiesByLocations.java} | 16 +- ...lities.java => CapabilitiesByServers.java} | 18 +- .../models/Capability.java | 138 + ...iesListResult.java => CapabilityList.java} | 55 +- .../models/{LogFile.java => CapturedLog.java} | 16 +- .../models/CapturedLogList.java | 127 + .../{LogFiles.java => CapturedLogs.java} | 16 +- .../models/CheckNameAvailabilities.java | 37 - .../CheckNameAvailabilityWithLocations.java | 39 - .../models/Cluster.java | 34 +- .../models/ConfigTuningRequestParameter.java | 179 - .../models/Configuration.java | 54 +- .../models/ConfigurationDataType.java | 12 +- .../models/ConfigurationForUpdate.java | 42 +- ...ListResult.java => ConfigurationList.java} | 46 +- .../models/Configurations.java | 33 +- .../models/CreateMode.java | 2 +- .../models/CreateModeForPatch.java | 51 + .../models/CreateModeForUpdate.java | 51 - .../models/DataEncryption.java | 98 +- .../models/DataEncryptionType.java | 51 + .../models/Database.java | 12 +- ...abaseListResult.java => DatabaseList.java} | 44 +- ...tatus.java => DatabaseMigrationState.java} | 211 +- .../models/Databases.java | 44 +- .../models/DbLevelValidationStatus.java | 22 +- .../models/DbServerMetadata.java | 23 +- .../models/EncryptionKeyStatus.java | 52 + .../FastProvisioningEditionCapability.java | 23 +- .../models/FastProvisioningSupport.java | 53 + .../models/FastProvisioningSupportedEnum.java | 53 - .../models/FeatureStatus.java | 51 + .../models/FirewallRule.java | 34 +- ...eListResult.java => FirewallRuleList.java} | 46 +- .../models/FirewallRules.java | 40 +- .../models/FlexibleServerCapability.java | 134 - .../models/FlexibleServers.java | 72 - .../models/GeoBackupSupportedEnum.java | 52 - .../models/GeoRedundantBackupEnum.java | 51 - .../models/GeographicallyRedundantBackup.java | 51 + .../GeographicallyRedundantBackupSupport.java | 54 + .../models/HaMode.java | 51 - .../models/HighAvailability.java | 26 +- .../models/HighAvailabilityForPatch.java | 141 + .../models/HighAvailabilityMode.java | 7 +- .../models/HighAvailabilityState.java | 71 + .../models/IdentityType.java | 2 +- .../models/ImpactRecord.java | 18 +- .../models/IndexRecommendationListResult.java | 132 - .../models/KeyStatusEnum.java | 51 - .../models/LocationRestricted.java | 52 + .../LogicalReplicationOnSourceDbEnum.java | 51 - .../LogicalReplicationOnSourceServer.java | 51 + .../models/LtrServerBackupOperationList.java | 12 +- .../models/MaintenanceWindow.java | 24 +- .../models/MaintenanceWindowForPatch.java | 177 + .../models/MicrosoftEntraAuth.java | 51 + .../models/MigrateRolesAndPermissions.java | 51 + .../models/MigrateRolesEnum.java | 51 - ...{MigrationResource.java => Migration.java} | 483 +-- .../models/MigrationDatabaseState.java | 71 + .../models/MigrationDbState.java | 71 - ...urceListResult.java => MigrationList.java} | 59 +- .../models/MigrationMode.java | 2 +- ...ce.java => MigrationNameAvailability.java} | 18 +- .../models/MigrationOption.java | 2 +- .../models/MigrationResourceForPatch.java | 164 +- .../models/MigrationSecretParameters.java | 26 +- .../MigrationSecretParametersForPatch.java | 158 + .../models/MigrationState.java | 2 +- .../models/MigrationStatus.java | 16 +- ...onSubState.java => MigrationSubstate.java} | 72 +- ...ils.java => MigrationSubstateDetails.java} | 60 +- .../models/Migrations.java | 130 +- .../models/NameAvailabilities.java | 68 + ...bility.java => NameAvailabilityModel.java} | 16 +- .../models/Network.java | 49 +- ...esource.java => ObjectRecommendation.java} | 49 +- ....java => ObjectRecommendationDetails.java} | 62 +- ...ult.java => ObjectRecommendationList.java} | 57 +- ...mmendationPropertiesAnalyzedWorkload.java} | 64 +- ...ationPropertiesImplementationDetails.java} | 43 +- .../models/OnlineResizeSupportedEnum.java | 53 - .../models/OnlineStorageResizeSupport.java | 54 + .../models/Operation.java | 8 +- .../models/OperationDisplay.java | 16 +- ...tionListResult.java => OperationList.java} | 41 +- .../models/OperationOrigin.java | 2 +- .../models/Operations.java | 8 +- .../models/Origin.java | 51 - .../OverwriteDatabasesOnTargetServer.java | 52 + .../models/OverwriteDbsInTargetEnum.java | 52 - .../models/PasswordAuthEnum.java | 51 - .../models/PasswordBasedAuth.java | 51 + .../models/PostgresMajorVersion.java | 81 + .../models/PrincipalType.java | 2 +- ...fixes.java => PrivateDnsZoneSuffixes.java} | 16 +- ...ava => PrivateEndpointConnectionList.java} | 49 +- .../PrivateEndpointConnectionOperations.java | 69 - .../models/PrivateEndpointConnections.java | 65 +- ...sult.java => PrivateLinkResourceList.java} | 41 +- .../models/QuotaUsage.java | 2 +- ...gesListResult.java => QuotaUsageList.java} | 40 +- .../models/ReadReplicaPromoteMode.java | 12 +- .../models/ReadReplicaPromoteOption.java | 52 + .../models/RecommendationType.java | 51 - .../models/RecommendationTypeEnum.java | 5 + .../RecommendationTypeParameterEnum.java | 61 + .../models/Replica.java | 50 +- .../models/Replicas.java | 4 +- .../models/ReplicationPromoteOption.java | 51 - .../models/ReplicationRole.java | 2 +- .../models/ReplicationState.java | 4 +- .../models/ResourceProviders.java | 50 - .../models/RestartParameter.java | 11 +- .../models/RestrictedEnum.java | 52 - .../models/Server.java | 235 +- ...lity.java => ServerEditionCapability.java} | 53 +- ...rverForUpdate.java => ServerForPatch.java} | 225 +- .../models/ServerHAState.java | 71 - ...{ServerListResult.java => ServerList.java} | 38 +- .../ServerPublicNetworkAccessState.java | 3 +- .../models/ServerSku.java | 17 +- .../models/ServerSkuCapability.java | 42 +- .../models/ServerState.java | 2 +- .../ServerThreatProtectionListResult.java | 105 - .../ServerThreatProtectionSettings.java | 88 +- .../models/ServerVersion.java | 76 - .../models/ServerVersionCapability.java | 15 +- .../models/Servers.java | 42 +- .../models/SessionDetailsResource.java | 62 - .../models/SessionResource.java | 68 - .../models/SessionsListResult.java | 131 - .../postgresqlflexibleserver/models/Sku.java | 14 +- .../models/SkuForPatch.java | 121 + .../models/SkuTier.java | 2 +- .../models/SourceType.java | 8 +- .../models/SslMode.java | 4 +- .../models/StartDataMigration.java | 51 + .../models/StartDataMigrationEnum.java | 51 - .../models/Storage.java | 61 +- .../models/StorageAutoGrow.java | 3 +- .../models/StorageAutoGrowthSupport.java | 53 + .../StorageAutoGrowthSupportedEnum.java | 53 - .../models/StorageEditionCapability.java | 14 +- .../models/StorageMbCapability.java | 34 +- .../models/StorageTierCapability.java | 10 +- .../models/StorageType.java | 4 +- .../models/SupportedFeature.java | 16 +- .../models/SupportedFeatureStatusEnum.java | 51 - .../models/ThreatProtectionState.java | 4 +- .../models/TriggerCutover.java | 51 + .../models/TriggerCutoverEnum.java | 51 - .../models/TuningIndexes.java | 43 - .../models/TuningOptionEnum.java | 51 - .../models/TuningOptionParameterEnum.java | 51 + .../models/TuningOptions.java | 64 +- ...ListResult.java => TuningOptionsList.java} | 52 +- .../models/TuningOptionsListResult.java | 131 - .../models/TuningOptionsOperations.java | 97 + .../models/TuningOptionsResource.java | 49 - .../models/UserAssignedIdentity.java | 26 +- .../models/UserIdentity.java | 18 +- .../models/ValidationDetails.java | 18 +- .../models/ValidationMessage.java | 4 +- .../models/ValidationSummaryItem.java | 6 +- ...ointResource.java => VirtualEndpoint.java} | 71 +- .../VirtualEndpointResourceForPatch.java | 16 +- .../models/VirtualEndpointType.java | 2 +- .../models/VirtualEndpoints.java | 60 +- ...tResult.java => VirtualEndpointsList.java} | 53 +- .../models/VirtualEndpointsListResult.java | 128 - ...va => VirtualNetworkSubnetUsageModel.java} | 10 +- .../models/VirtualNetworkSubnetUsages.java | 12 +- ...eRedundantHaAndGeoBackupSupportedEnum.java | 54 - .../models/ZoneRedundantHaSupportedEnum.java | 53 - ...dGeographicallyRedundantBackupSupport.java | 59 + .../ZoneRedundantHighAvailabilitySupport.java | 54 + .../models/package-info.java | 6 +- .../package-info.java | 6 +- .../proxy-config.json | 2 +- .../AdministratorsDeleteSamples.java | 26 - .../generated/AdministratorsGetSamples.java | 26 - .../AdministratorsListByServerSamples.java | 25 - ...sMicrosoftEntraCreateOrUpdateSamples.java} | 18 +- ...istratorsMicrosoftEntraDeleteSamples.java} | 16 +- ...dministratorsMicrosoftEntraGetSamples.java | 27 + ...torsMicrosoftEntraListByServerSamples.java | 26 + ...edThreatProtectionSettingsGetSamples.java} | 16 +- ...ProtectionSettingsListByServerSamples.java | 26 + ...kupsAutomaticAndOnDemandCreateSamples.java | 27 + ...upsAutomaticAndOnDemandDeleteSamples.java} | 17 +- ...BackupsAutomaticAndOnDemandGetSamples.java | 27 + ...tomaticAndOnDemandListByServerSamples.java | 26 + .../generated/BackupsDeleteSamples.java | 25 - .../generated/BackupsGetSamples.java | 27 - .../generated/BackupsListByServerSamples.java | 25 - ...rmRetentionCheckPrerequisitesSamples.java} | 19 +- .../BackupsLongTermRetentionGetSamples.java | 27 + ...sLongTermRetentionListByServerSamples.java | 26 + ...BackupsLongTermRetentionStartSamples.java} | 21 +- .../CapabilitiesByLocationListSamples.java | 25 + .../CapabilitiesByServerListSamples.java | 25 + ...a => CapturedLogsListByServerSamples.java} | 15 +- .../CheckNameAvailabilityExecuteSamples.java | 28 - ...vailabilityWithLocationExecuteSamples.java | 28 - .../generated/ConfigurationsGetSamples.java | 11 +- .../ConfigurationsListByServerSamples.java | 12 +- .../generated/ConfigurationsPutSamples.java | 12 +- .../ConfigurationsUpdateSamples.java | 14 +- .../generated/DatabasesCreateSamples.java | 8 +- .../generated/DatabasesDeleteSamples.java | 12 +- .../generated/DatabasesGetSamples.java | 12 +- .../DatabasesListByServerSamples.java | 8 +- .../FirewallRulesCreateOrUpdateSamples.java | 14 +- .../generated/FirewallRulesDeleteSamples.java | 11 +- .../generated/FirewallRulesGetSamples.java | 13 +- .../FirewallRulesListByServerSamples.java | 11 +- ...GetPrivateDnsZoneSuffixExecuteSamples.java | 25 - ...cationBasedCapabilitiesExecuteSamples.java | 24 - .../LogFilesListByServerSamples.java | 25 - .../LtrBackupOperationsGetSamples.java | 25 - ...ples.java => MigrationsCancelSamples.java} | 15 +- ...igrationsCheckNameAvailabilitySamples.java | 31 + .../generated/MigrationsCreateSamples.java | 183 +- .../generated/MigrationsGetSamples.java | 60 +- .../MigrationsListByTargetServerSamples.java | 12 +- .../generated/MigrationsUpdateSamples.java | 38 +- .../NameAvailabilityCheckGloballySamples.java | 31 + ...eAvailabilityCheckWithLocationSamples.java | 31 + .../generated/OperationsListSamples.java | 9 +- ...va => PrivateDnsZoneSuffixGetSamples.java} | 14 +- ...ivateEndpointConnectionsDeleteSamples.java | 28 + .../PrivateEndpointConnectionsGetSamples.java | 10 +- ...ndpointConnectionsListByServerSamples.java | 11 +- ...vateEndpointConnectionsUpdateSamples.java} | 17 +- .../PrivateLinkResourcesGetSamples.java | 6 +- ...ivateLinkResourcesListByServerSamples.java | 5 +- .../generated/QuotaUsagesListSamples.java | 10 +- .../ReplicasListByServerSamples.java | 8 +- ...CheckMigrationNameAvailabilitySamples.java | 31 - ...otectionSettingsCreateOrUpdateSamples.java | 33 - ...ProtectionSettingsListByServerSamples.java | 26 - .../ServersCreateOrUpdateSamples.java | 431 +++ .../generated/ServersCreateSamples.java | 307 -- .../generated/ServersDeleteSamples.java | 10 +- .../ServersGetByResourceGroupSamples.java | 35 +- .../ServersListByResourceGroupSamples.java | 10 +- .../generated/ServersListSamples.java | 9 +- .../generated/ServersRestartSamples.java | 29 +- .../generated/ServersStartSamples.java | 10 +- .../generated/ServersStopSamples.java | 9 +- .../generated/ServersUpdateSamples.java | 249 +- .../TuningConfigurationDisableSamples.java | 28 - .../TuningConfigurationEnableSamples.java | 28 - ...onfigurationListSessionDetailsSamples.java | 29 - ...uningConfigurationListSessionsSamples.java | 28 - ...uningConfigurationStartSessionSamples.java | 32 - ...TuningConfigurationStopSessionSamples.java | 28 - ...TuningIndexListRecommendationsSamples.java | 47 - .../generated/TuningOptionsGetSamples.java | 27 - .../TuningOptionsListByServerSamples.java | 25 - .../TuningOptionsOperationGetSamples.java | 29 + ...ngOptionsOperationListByServerSamples.java | 26 + ...nsOperationListRecommendationsSamples.java | 81 + .../VirtualEndpointsCreateSamples.java | 12 +- .../VirtualEndpointsDeleteSamples.java | 8 +- .../generated/VirtualEndpointsGetSamples.java | 11 +- .../VirtualEndpointsListByServerSamples.java | 11 +- .../VirtualEndpointsUpdateSamples.java | 15 +- ...VirtualNetworkSubnetUsageListSamples.java} | 18 +- .../PostgreSqlManagerTests.java | 24 +- .../AdministratorMicrosoftEntraAddTests.java | 35 + ...AdministratorMicrosoftEntraInnerTests.java | 37 + .../AdministratorMicrosoftEntraListTests.java | 54 + ...orMicrosoftEntraPropertiesForAddTests.java | 35 + ...istratorMicrosoftEntraPropertiesTests.java | 37 + .../AdministratorsDeleteMockTests.java | 33 - ...crosoftEntrasCreateOrUpdateMockTests.java} | 28 +- ...rosoftEntrasGetWithResponseMockTests.java} | 18 +- ...MicrosoftEntrasListByServerMockTests.java} | 18 +- ...tionSettingsGetWithResponseMockTests.java} | 13 +- ...tectionSettingsListByServerMockTests.java} | 10 +- ...ncedThreatProtectionSettingsListTests.java | 26 + ...reatProtectionSettingsModelInnerTests.java | 28 + ...reatProtectionSettingsPropertiesTests.java | 28 + .../BackupAutomaticAndOnDemandInnerTests.java | 34 + .../BackupAutomaticAndOnDemandListTests.java | 40 + ...upAutomaticAndOnDemandPropertiesTests.java | 35 + .../generated/BackupForPatchTests.java | 30 + .../generated/BackupRequestBaseTests.java | 27 + .../generated/BackupSettingsTests.java | 25 + .../generated/BackupStoreDetailsTests.java | 26 + .../generated/BackupTests.java | 30 + ...AutomaticAndOnDemandsCreateMockTests.java} | 18 +- ...AndOnDemandsGetWithResponseMockTests.java} | 18 +- ...ticAndOnDemandsListByServerMockTests.java} | 18 +- .../BackupsLongTermRetentionRequestTests.java | 33 + ...gTermRetentionResponsePropertiesTests.java | 26 + ...ckPrerequisitesWithResponseMockTests.java} | 20 +- .../CapabilitiesByLocationsListMockTests.java | 39 + .../CapabilitiesByServersListMockTests.java | 39 + .../generated/CapabilityBaseTests.java | 22 + .../generated/CapabilityInnerTests.java | 26 + .../generated/CapabilityListTests.java | 26 + .../generated/CapturedLogInnerTests.java | 39 + .../generated/CapturedLogListTests.java | 45 + .../generated/CapturedLogPropertiesTests.java | 40 + ...=> CapturedLogsListByServerMockTests.java} | 20 +- .../CheckNameAvailabilityRequestTests.java | 28 + .../CheckNameAvailabilityResponseTests.java | 33 + .../generated/ClusterTests.java | 27 + .../ConfigurationForUpdateTests.java | 28 + .../generated/ConfigurationInnerTests.java | 28 + .../generated/ConfigurationListTests.java | 37 + .../ConfigurationPropertiesTests.java | 29 + ...onfigurationsGetWithResponseMockTests.java | 8 +- .../ConfigurationsListByServerMockTests.java | 8 +- .../generated/ConfigurationsPutMockTests.java | 14 +- .../generated/DatabaseInnerTests.java | 28 + .../generated/DatabaseListTests.java | 37 + .../DatabaseMigrationStateTests.java | 73 + .../generated/DatabasePropertiesTests.java | 27 + .../generated/DatabasesCreateMockTests.java | 14 +- .../generated/DatabasesDeleteMockTests.java | 33 - .../DatabasesGetWithResponseMockTests.java | 8 +- .../DatabasesListByServerMockTests.java | 8 +- .../DbLevelValidationStatusTests.java | 81 + .../generated/DbServerMetadataTests.java | 36 + .../generated/DelegatedSubnetUsageTests.java | 23 + ...astProvisioningEditionCapabilityTests.java | 23 + .../generated/FirewallRuleInnerTests.java | 28 + .../generated/FirewallRuleListTests.java | 35 + .../FirewallRulePropertiesTests.java | 29 + .../FirewallRulesCreateOrUpdateMockTests.java | 14 +- .../FirewallRulesDeleteMockTests.java | 33 - ...FirewallRulesGetWithResponseMockTests.java | 8 +- .../FirewallRulesListByServerMockTests.java | 8 +- .../HighAvailabilityForPatchTests.java | 30 + .../generated/HighAvailabilityTests.java | 31 + .../generated/ImpactRecordTests.java | 35 + ...tionBasedCapabilitiesExecuteMockTests.java | 39 - .../generated/LtrPreBackupRequestTests.java | 27 + .../LtrPreBackupResponseInnerTests.java | 25 + .../MaintenanceWindowForPatchTests.java | 36 + .../generated/MaintenanceWindowTests.java | 35 + .../MigrationNameAvailabilityInnerTests.java | 29 + .../generated/MigrationStatusTests.java | 23 + .../MigrationSubstateDetailsTests.java | 217 ++ ...ameAvailabilityWithResponseMockTests.java} | 20 +- ...MigrationsDeleteWithResponseMockTests.java | 34 - ...esCheckGloballyWithResponseMockTests.java} | 17 +- ...eckWithLocationWithResponseMockTests.java} | 18 +- .../NameAvailabilityModelInnerTests.java | 33 + .../generated/NamePropertyTests.java | 27 + .../generated/NetworkTests.java | 33 + .../ObjectRecommendationDetailsTests.java | 45 + .../ObjectRecommendationInnerTests.java | 26 + .../ObjectRecommendationListTests.java | 32 + ...dationPropertiesAnalyzedWorkloadTests.java | 34 + ...nPropertiesImplementationDetailsTests.java | 30 + .../ObjectRecommendationPropertiesTests.java | 67 + .../generated/OperationDisplayTests.java | 23 + .../generated/OperationInnerTests.java | 26 + .../generated/OperationListTests.java | 33 + .../generated/OperationsListMockTests.java | 2 +- ...ZoneSuffixesGetWithResponseMockTests.java} | 11 +- .../PrivateEndpointConnectionInnerTests.java | 40 + .../PrivateEndpointConnectionListTests.java | 26 + ...vateEndpointConnectionPropertiesTests.java | 40 + ...ntConnectionsGetWithResponseMockTests.java | 8 +- ...pointConnectionsListByServerMockTests.java | 8 +- ...teEndpointConnectionsUpdateMockTests.java} | 4 +- .../generated/PrivateEndpointTests.java | 21 + .../PrivateLinkResourceInnerTests.java | 28 + .../PrivateLinkResourceListTests.java | 26 + .../PrivateLinkResourcePropertiesTests.java | 28 + ...LinkResourcesGetWithResponseMockTests.java | 6 +- ...ateLinkResourcesListByServerMockTests.java | 6 +- ...rivateLinkServiceConnectionStateTests.java | 34 + .../generated/QuotaUsageInnerTests.java | 42 + .../generated/QuotaUsageListTests.java | 26 + .../generated/QuotaUsagesListMockTests.java | 16 +- .../generated/ReplicaTests.java | 35 + .../generated/RestartParameterTests.java | 30 + .../ServerCapabilitiesListMockTests.java | 39 - .../ServerEditionCapabilityTests.java | 23 + .../generated/ServerSkuCapabilityTests.java | 23 + .../generated/ServerSkuTests.java | 28 + ...ectionSettingsCreateOrUpdateMockTests.java | 8 +- .../ServerVersionCapabilityTests.java | 23 + .../generated/ServersDeleteMockTests.java | 33 - .../generated/ServersRestartMockTests.java | 38 - .../generated/ServersStartMockTests.java | 33 - .../generated/ServersStopMockTests.java | 33 - .../generated/SkuForPatchTests.java | 28 + .../generated/SkuTests.java | 27 + .../StorageEditionCapabilityTests.java | 23 + .../generated/StorageMbCapabilityTests.java | 23 + .../generated/StorageTests.java | 44 + .../generated/StorageTierCapabilityTests.java | 23 + .../generated/SupportedFeatureTests.java | 22 + ...igurationsListSessionDetailsMockTests.java | 46 - ...ngConfigurationsListSessionsMockTests.java | 46 - ...ngIndexesListRecommendationsMockTests.java | 40 - .../generated/TuningOptionsInnerTests.java | 23 + .../generated/TuningOptionsListTests.java | 30 + ...nsOperationsGetWithResponseMockTests.java} | 13 +- ...tionsOperationsListByServerMockTests.java} | 10 +- ...perationsListRecommendationsMockTests.java | 42 + .../generated/UserAssignedIdentityTests.java | 54 + .../generated/UserIdentityTests.java | 27 + .../generated/ValidationDetailsTests.java | 114 + .../generated/ValidationMessageTests.java | 29 + .../generated/ValidationSummaryItemTests.java | 40 + .../generated/VirtualEndpointInnerTests.java | 31 + .../VirtualEndpointResourceForPatchTests.java | 32 + ...irtualEndpointResourcePropertiesTests.java | 33 + .../VirtualEndpointsCreateMockTests.java | 14 +- ...tualEndpointsGetWithResponseMockTests.java | 10 +- ...VirtualEndpointsListByServerMockTests.java | 10 +- .../generated/VirtualEndpointsListTests.java | 36 + ...tualNetworkSubnetUsageModelInnerTests.java | 23 + ...rtualNetworkSubnetUsageParameterTests.java | 26 + ...ubnetUsagesListWithResponseMockTests.java} | 14 +- 610 files changed, 23389 insertions(+), 23021 deletions(-) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/{AdministratorsClient.java => AdministratorsMicrosoftEntrasClient.java} (63%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/{TuningOptionsClient.java => AdvancedThreatProtectionSettingsClient.java} (61%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/{BackupsClient.java => BackupsAutomaticAndOnDemandsClient.java} (73%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsLongTermRetentionsClient.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/{LocationBasedCapabilitiesClient.java => CapabilitiesByLocationsClient.java} (67%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/{ServerCapabilitiesClient.java => CapabilitiesByServersClient.java} (68%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/{LogFilesClient.java => CapturedLogsClient.java} (73%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilityWithLocationsClient.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FlexibleServersClient.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/NameAvailabilitiesClient.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/{GetPrivateDnsZoneSuffixesClient.java => PrivateDnsZoneSuffixesClient.java} (68%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionOperationsClient.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ResourceProvidersClient.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningConfigurationsClient.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningIndexesClient.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/{models/TuningConfigurations.java => fluent/TuningOptionsOperationsClient.java} (56%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{ActiveDirectoryAdministratorInner.java => AdministratorMicrosoftEntraInner.java} (60%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{AdministratorProperties.java => AdministratorMicrosoftEntraProperties.java} (51%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{AdministratorPropertiesForAdd.java => AdministratorMicrosoftEntraPropertiesForAdd.java} (51%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{ServerThreatProtectionSettingsModelInner.java => AdvancedThreatProtectionSettingsModelInner.java} (61%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{ServerThreatProtectionProperties.java => AdvancedThreatProtectionSettingsProperties.java} (55%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{ServerBackupInner.java => BackupAutomaticAndOnDemandInner.java} (62%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{ServerBackupProperties.java => BackupAutomaticAndOnDemandProperties.java} (56%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{LtrServerBackupOperationInner.java => BackupsLongTermRetentionOperationInner.java} (78%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{LtrBackupResponseInner.java => BackupsLongTermRetentionResponseInner.java} (78%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{LtrPreBackupResponseProperties.java => BackupsLongTermRetentionResponseProperties.java} (67%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapabilityInner.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{LogFileInner.java => CapturedLogInner.java} (69%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{LogFileProperties.java => CapturedLogProperties.java} (65%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FlexibleServerCapabilityInner.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/IndexRecommendationResourceInner.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{MigrationResourceInner.java => MigrationInner.java} (57%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{MigrationNameAvailabilityResourceInner.java => MigrationNameAvailabilityInner.java} (62%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{MigrationResourceProperties.java => MigrationProperties.java} (53%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{MigrationResourcePropertiesForPatch.java => MigrationPropertiesForPatch.java} (53%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{NameAvailabilityInner.java => NameAvailabilityModelInner.java} (58%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationInner.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{IndexRecommendationResourceProperties.java => ObjectRecommendationProperties.java} (55%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{ServerPropertiesForUpdate.java => ServerPropertiesForPatch.java} (53%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SessionDetailsResourceInner.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SessionResourceInner.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{TuningOptionsResourceInner.java => TuningOptionsInner.java} (71%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{VirtualEndpointResourceInner.java => VirtualEndpointInner.java} (72%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{VirtualNetworkSubnetUsageResultInner.java => VirtualNetworkSubnetUsageModelInner.java} (72%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ActiveDirectoryAdministratorImpl.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorMicrosoftEntraImpl.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{AdministratorsClientImpl.java => AdministratorsMicrosoftEntrasClientImpl.java} (74%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{AdministratorsImpl.java => AdministratorsMicrosoftEntrasImpl.java} (78%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{LtrBackupOperationsClientImpl.java => AdvancedThreatProtectionSettingsClientImpl.java} (71%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{ServerThreatProtectionSettingsModelImpl.java => AdvancedThreatProtectionSettingsModelImpl.java} (66%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{ServerBackupImpl.java => BackupAutomaticAndOnDemandImpl.java} (78%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{BackupsClientImpl.java => BackupsAutomaticAndOnDemandsClientImpl.java} (82%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsImpl.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{LtrServerBackupOperationImpl.java => BackupsLongTermRetentionOperationImpl.java} (84%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{LtrBackupResponseImpl.java => BackupsLongTermRetentionResponseImpl.java} (82%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsClientImpl.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsImpl.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{LocationBasedCapabilitiesClientImpl.java => CapabilitiesByLocationsClientImpl.java} (68%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{LogFilesImpl.java => CapabilitiesByLocationsImpl.java} (60%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{ServerCapabilitiesClientImpl.java => CapabilitiesByServersClientImpl.java} (75%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{LocationBasedCapabilitiesImpl.java => CapabilitiesByServersImpl.java} (57%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{FlexibleServerCapabilityImpl.java => CapabilityImpl.java} (74%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{LogFileImpl.java => CapturedLogImpl.java} (87%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{LogFilesClientImpl.java => CapturedLogsClientImpl.java} (78%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{ServerCapabilitiesImpl.java => CapturedLogsImpl.java} (56%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsClientImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersClientImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsImpl.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{MigrationResourceImpl.java => MigrationImpl.java} (70%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{MigrationNameAvailabilityResourceImpl.java => MigrationNameAvailabilityImpl.java} (76%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesClientImpl.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesImpl.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{NameAvailabilityImpl.java => NameAvailabilityModelImpl.java} (81%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{IndexRecommendationResourceImpl.java => ObjectRecommendationImpl.java} (78%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{GetPrivateDnsZoneSuffixesClientImpl.java => PrivateDnsZoneSuffixesClientImpl.java} (66%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{GetPrivateDnsZoneSuffixesImpl.java => PrivateDnsZoneSuffixesImpl.java} (63%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsClientImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersClientImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/SessionDetailsResourceImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/SessionResourceImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningConfigurationsClientImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningConfigurationsImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningIndexesClientImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningIndexesImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsClientImpl.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsClientImpl.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsResourceImpl.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{VirtualEndpointResourceImpl.java => VirtualEndpointImpl.java} (80%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{VirtualNetworkSubnetUsageResultImpl.java => VirtualNetworkSubnetUsageModelImpl.java} (78%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministrator.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAuthEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentialsForPatch.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorListResult.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntra.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{ActiveDirectoryAdministratorAdd.java => AdministratorMicrosoftEntraAdd.java} (52%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraList.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{Administrators.java => AdministratorsMicrosoftEntras.java} (64%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{LtrBackupOperations.java => AdvancedThreatProtectionSettings.java} (60%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsList.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{ServerThreatProtectionSettingsModel.java => AdvancedThreatProtectionSettingsModel.java} (58%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ArmServerKeyType.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfigForPatch.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTier.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTiers.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{ServerBackup.java => BackupAutomaticAndOnDemand.java} (72%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemandList.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupForPatch.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupType.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{Backups.java => BackupsAutomaticAndOnDemands.java} (70%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{LtrServerBackupOperation.java => BackupsLongTermRetentionOperation.java} (88%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{LtrBackupRequest.java => BackupsLongTermRetentionRequest.java} (63%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{LtrBackupResponse.java => BackupsLongTermRetentionResponse.java} (85%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/{fluent/LtrBackupOperationsClient.java => models/BackupsLongTermRetentions.java} (52%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{FlexibleServersTriggerLtrPreBackupHeaders.java => BackupsLongTermRetentionsCheckPrerequisitesHeaders.java} (72%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{FlexibleServersTriggerLtrPreBackupResponse.java => BackupsLongTermRetentionsCheckPrerequisitesResponse.java} (60%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cancel.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CancelEnum.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{LocationBasedCapabilities.java => CapabilitiesByLocations.java} (65%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{ServerCapabilities.java => CapabilitiesByServers.java} (65%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Capability.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{CapabilitiesListResult.java => CapabilityList.java} (55%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{LogFile.java => CapturedLog.java} (80%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogList.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{LogFiles.java => CapturedLogs.java} (70%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilities.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityWithLocations.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigTuningRequestParameter.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{ConfigurationListResult.java => ConfigurationList.java} (62%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForPatch.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForUpdate.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryptionType.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{DatabaseListResult.java => DatabaseList.java} (63%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{DbMigrationStatus.java => DatabaseMigrationState.java} (60%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/EncryptionKeyStatus.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupport.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupportedEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FeatureStatus.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{FirewallRuleListResult.java => FirewallRuleList.java} (62%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerCapability.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServers.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoBackupSupportedEnum.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoRedundantBackupEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackup.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackupSupport.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HaMode.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityForPatch.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityState.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationListResult.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/KeyStatusEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationRestricted.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceDbEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceServer.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindowForPatch.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MicrosoftEntraAuth.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesAndPermissions.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesEnum.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{MigrationResource.java => Migration.java} (51%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDatabaseState.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDbState.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{MigrationResourceListResult.java => MigrationList.java} (53%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{MigrationNameAvailabilityResource.java => MigrationNameAvailability.java} (65%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParametersForPatch.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{MigrationSubState.java => MigrationSubstate.java} (51%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{MigrationSubStateDetails.java => MigrationSubstateDetails.java} (63%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilities.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{NameAvailability.java => NameAvailabilityModel.java} (67%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{IndexRecommendationResource.java => ObjectRecommendation.java} (59%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{IndexRecommendationDetails.java => ObjectRecommendationDetails.java} (70%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{SessionDetailsListResult.java => ObjectRecommendationList.java} (56%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{IndexRecommendationResourcePropertiesAnalyzedWorkload.java => ObjectRecommendationPropertiesAnalyzedWorkload.java} (55%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{IndexRecommendationResourcePropertiesImplementationDetails.java => ObjectRecommendationPropertiesImplementationDetails.java} (54%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineResizeSupportedEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineStorageResizeSupport.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{OperationListResult.java => OperationList.java} (64%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Origin.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDatabasesOnTargetServer.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDbsInTargetEnum.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordAuthEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordBasedAuth.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PostgresMajorVersion.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{GetPrivateDnsZoneSuffixes.java => PrivateDnsZoneSuffixes.java} (69%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{PrivateEndpointConnectionListResult.java => PrivateEndpointConnectionList.java} (58%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionOperations.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{PrivateLinkResourceListResult.java => PrivateLinkResourceList.java} (64%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{QuotaUsagesListResult.java => QuotaUsageList.java} (66%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteOption.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationType.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeParameterEnum.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationPromoteOption.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ResourceProviders.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestrictedEnum.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{FlexibleServerEditionCapability.java => ServerEditionCapability.java} (65%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{ServerForUpdate.java => ServerForPatch.java} (57%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerHAState.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{ServerListResult.java => ServerList.java} (70%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionListResult.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersion.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionDetailsResource.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionResource.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionsListResult.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuForPatch.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigration.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigrationEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupport.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupportedEnum.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeatureStatusEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TriggerCutover.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TriggerCutoverEnum.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningIndexes.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionParameterEnum.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{LogFileListResult.java => TuningOptionsList.java} (61%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsListResult.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsOperations.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsResource.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{VirtualEndpointResource.java => VirtualEndpoint.java} (66%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{ServerBackupListResult.java => VirtualEndpointsList.java} (57%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointsListResult.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{VirtualNetworkSubnetUsageResult.java => VirtualNetworkSubnetUsageModel.java} (83%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHaAndGeoBackupSupportedEnum.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHaSupportedEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilitySupport.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsDeleteSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsGetSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsListByServerSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{AdministratorsCreateSamples.java => AdministratorsMicrosoftEntraCreateOrUpdateSamples.java} (58%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{PrivateEndpointConnectionOperationDeleteSamples.java => AdministratorsMicrosoftEntraDeleteSamples.java} (51%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraGetSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraListByServerSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{ServerThreatProtectionSettingsGetSamples.java => AdvancedThreatProtectionSettingsGetSamples.java} (56%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandCreateSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{LtrBackupOperationsListByServerSamples.java => BackupsAutomaticAndOnDemandDeleteSamples.java} (50%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandGetSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandListByServerSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsDeleteSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsGetSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsListByServerSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{FlexibleServerTriggerLtrPreBackupSamples.java => BackupsLongTermRetentionCheckPrerequisitesSamples.java} (50%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionGetSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionListByServerSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{FlexibleServerStartLtrBackupSamples.java => BackupsLongTermRetentionStartSamples.java} (56%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationListSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServerListSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{BackupsCreateSamples.java => CapturedLogsListByServerSamples.java} (54%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityExecuteSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityWithLocationExecuteSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/GetPrivateDnsZoneSuffixExecuteSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LocationBasedCapabilitiesExecuteSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LogFilesListByServerSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrBackupOperationsGetSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{MigrationsDeleteSamples.java => MigrationsCancelSamples.java} (54%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilitySamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckGloballySamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckWithLocationSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{ServerCapabilitiesListSamples.java => PrivateDnsZoneSuffixGetSamples.java} (56%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsDeleteSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{PrivateEndpointConnectionOperationUpdateSamples.java => PrivateEndpointConnectionsUpdateSamples.java} (75%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ResourceProviderCheckMigrationNameAvailabilitySamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsListByServerSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateOrUpdateSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationDisableSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationEnableSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationListSessionDetailsSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationListSessionsSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationStartSessionSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationStopSessionSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningIndexListRecommendationsSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsGetSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListByServerSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationGetSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListByServerSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListRecommendationsSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{VirtualNetworkSubnetUsageExecuteSamples.java => VirtualNetworkSubnetUsageListSamples.java} (50%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraAddTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesForAddTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsDeleteMockTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{AdministratorsCreateMockTests.java => AdministratorsMicrosoftEntrasCreateOrUpdateMockTests.java} (58%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{AdministratorsGetWithResponseMockTests.java => AdministratorsMicrosoftEntrasGetWithResponseMockTests.java} (64%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{AdministratorsListByServerMockTests.java => AdministratorsMicrosoftEntrasListByServerMockTests.java} (66%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{ServerThreatProtectionSettingsGetWithResponseMockTests.java => AdvancedThreatProtectionSettingsGetWithResponseMockTests.java} (72%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{ServerThreatProtectionSettingsListByServerMockTests.java => AdvancedThreatProtectionSettingsListByServerMockTests.java} (78%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsModelInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsPropertiesTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandPropertiesTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupForPatchTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupRequestBaseTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupSettingsTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupStoreDetailsTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{BackupsCreateMockTests.java => BackupsAutomaticAndOnDemandsCreateMockTests.java} (68%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{BackupsGetWithResponseMockTests.java => BackupsAutomaticAndOnDemandsGetWithResponseMockTests.java} (67%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{BackupsListByServerMockTests.java => BackupsAutomaticAndOnDemandsListByServerMockTests.java} (68%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionRequestTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionResponsePropertiesTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{FlexibleServersTriggerLtrPreBackupWithResponseMockTests.java => BackupsLongTermRetentionsCheckPrerequisitesWithResponseMockTests.java} (70%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationsListMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServersListMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityBaseTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogPropertiesTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{LogFilesListByServerMockTests.java => CapturedLogsListByServerMockTests.java} (63%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityRequestTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityResponseTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ClusterTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationForUpdateTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationPropertiesTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseMigrationStateTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasePropertiesTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbLevelValidationStatusTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbServerMetadataTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DelegatedSubnetUsageTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FastProvisioningEditionCapabilityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulePropertiesTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityForPatchTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ImpactRecordTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LocationBasedCapabilitiesExecuteMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupRequestTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupResponseInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowForPatchTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationNameAvailabilityInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationStatusTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationSubstateDetailsTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{ResourceProvidersCheckMigrationNameAvailabilityWithRMockTests.java => MigrationsCheckNameAvailabilityWithResponseMockTests.java} (64%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsDeleteWithResponseMockTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{CheckNameAvailabilityWithLocationsExecuteWithResponseMockTests.java => NameAvailabilitiesCheckGloballyWithResponseMockTests.java} (70%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{CheckNameAvailabilitiesExecuteWithResponseMockTests.java => NameAvailabilitiesCheckWithLocationWithResponseMockTests.java} (71%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityModelInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NamePropertyTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NetworkTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationDetailsTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesAnalyzedWorkloadTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesImplementationDetailsTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationDisplayTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationListTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{GetPrivateDnsZoneSuffixesExecuteWithResponseMockTests.java => PrivateDnsZoneSuffixesGetWithResponseMockTests.java} (75%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionPropertiesTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{PrivateEndpointConnectionOperationsUpdateMockTests.java => PrivateEndpointConnectionsUpdateMockTests.java} (96%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcePropertiesTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkServiceConnectionStateTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicaTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/RestartParameterTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerCapabilitiesListMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerEditionCapabilityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuCapabilityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerVersionCapabilityTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteMockTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartMockTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartMockTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuForPatchTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageEditionCapabilityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageMbCapabilityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTierCapabilityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SupportedFeatureTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationsListSessionDetailsMockTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationsListSessionsMockTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningIndexesListRecommendationsMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{TuningOptionsGetWithResponseMockTests.java => TuningOptionsOperationsGetWithResponseMockTests.java} (76%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{TuningOptionsListByServerMockTests.java => TuningOptionsOperationsListByServerMockTests.java} (78%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListRecommendationsMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserAssignedIdentityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserIdentityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationDetailsTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationMessageTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationSummaryItemTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourceForPatchTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourcePropertiesTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageModelInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageParameterTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{VirtualNetworkSubnetUsagesExecuteWithResponseMockTests.java => VirtualNetworkSubnetUsagesListWithResponseMockTests.java} (68%) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index ef0d1024d395..4cd240170f10 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -379,7 +379,7 @@ com.azure.resourcemanager:azure-resourcemanager-imagebuilder;1.2.0;1.3.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-maps;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-botservice;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-recoveryservicesbackup;1.6.0;1.7.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-postgresqlflexibleserver;1.1.0;1.2.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-postgresqlflexibleserver;1.1.0;2.0.0 com.azure.resourcemanager:azure-resourcemanager-deviceprovisioningservices;1.1.0;1.2.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-elastic;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-webpubsub;1.1.0;1.2.0-beta.1 diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md index de3b51c879cb..00f8c44e8888 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md @@ -1,14 +1,292 @@ # Release History -## 1.2.0-beta.2 (Unreleased) +## 2.0.0 (2025-11-21) -### Features Added +- Azure Resource Manager PostgreSql client library for Java. This package contains Microsoft Azure SDK for PostgreSql Management SDK. The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2025-08-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### Renamed Models + +* `models.ServerHAState` -> `models.HighAvailabilityState` +* `models.AzureManagedDiskPerformanceTiers` -> `models.AzureManagedDiskPerformanceTier` +* `models.ServerVersion` -> `models.PostgresMajorVersion` +* `models.GeoRedundantBackupEnum` -> `models.GeographicallyRedundantBackup` +* `models.ReplicationPromoteOption` -> `models.ReadReplicaPromoteOption` +* `models.KeyStatusEnum` -> `models.EncryptionKeyStatus` +* `models.ArmServerKeyType` -> `models.DataEncryptionType` +* `models.PasswordAuthEnum` -> `models.PasswordBasedAuth` +* `models.ActiveDirectoryAuthEnum` -> `models.MicrosoftEntraAuth` +* `models.CancelEnum` -> `models.Cancel` +* `models.LogicalReplicationOnSourceDbEnum` -> `models.LogicalReplicationOnSourceServer` +* `models.TriggerCutoverEnum` -> `models.TriggerCutover` +* `models.StartDataMigrationEnum` -> `models.StartDataMigration` +* `models.OverwriteDbsInTargetEnum` -> `models.OverwriteDatabasesOnTargetServer` +* `models.MigrateRolesEnum` -> `models.MigrateRolesAndPermissions` +* `models.MigrationSubStateDetails` -> `models.MigrationSubstateDetails` +* `models.MigrationResource` (and related Definition/Update stage types) -> `models.Migration` +* `models.VirtualEndpointResource` (and related Definition/Update stage types) -> `models.VirtualEndpoint` +* `models.ServerThreatProtectionSettingsModel` (and related Definition/Update stage types) -> `models.AdvancedThreatProtectionSettingsModel` +* `models.ActiveDirectoryAdministrator` (and related Add/Definition/Update stage types & list/plural forms) -> `models.AdministratorMicrosoftEntra` + +#### `models.Backup` was modified + +* `withGeoRedundantBackup(models.GeoRedundantBackupEnum)` was removed +* `models.GeoRedundantBackupEnum geoRedundantBackup()` -> `models.GeographicallyRedundantBackup geoRedundantBackup()` + +#### `models.Operations` was modified + +* `models.OperationListResult list()` -> `com.azure.core.http.rest.PagedIterable list()` +* `listWithResponse(com.azure.core.util.Context)` was removed + +#### `models.Server$Update` was modified + +* `withAdministratorLogin(java.lang.String)` was removed +* `withAuthConfig(models.AuthConfig)` was removed +* `withMaintenanceWindow(models.MaintenanceWindow)` was removed +* `withHighAvailability(models.HighAvailability)` was removed +* `withCreateMode(models.CreateModeForUpdate)` was removed +* `withVersion(models.ServerVersion)` was removed +* `withSku(models.Sku)` was removed +* `withBackup(models.Backup)` was removed + +#### `models.Server$Definition` was modified + +* `withVersion(models.ServerVersion)` was removed + +#### `PostgreSqlManager` was modified + +* `getPrivateDnsZoneSuffixes()` was removed +* `locationBasedCapabilities()` was removed +* `administrators()` was removed +* `ltrBackupOperations()` was removed +* `checkNameAvailabilities()` was removed +* `checkNameAvailabilityWithLocations()` was removed +* `serverCapabilities()` was removed +* `flexibleServers()` was removed +* `logFiles()` was removed +* `backups()` was removed +* `privateEndpointConnectionOperations()` was removed +* `resourceProviders()` was removed + +#### `models.HighAvailability` was modified + +* `models.ServerHAState state()` -> `models.HighAvailabilityState state()` + +#### `models.Migrations` was modified + +* `getWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `models.MigrationResource getById(java.lang.String)` -> `models.Migration getById(java.lang.String)` +* `delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was removed +* `listByTargetServer(java.lang.String,java.lang.String,java.lang.String)` was removed +* `models.MigrationResource$DefinitionStages$Blank define(java.lang.String)` -> `models.Migration$DefinitionStages$Blank define(java.lang.String)` +* `listByTargetServer(java.lang.String,java.lang.String,java.lang.String,models.MigrationListFilter,com.azure.core.util.Context)` was removed +* `deleteWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deleteById(java.lang.String)` was removed +* `deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `get(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was removed + +#### `models.Replica` was modified + +* `models.ReplicationPromoteOption promoteOption()` -> `models.ReadReplicaPromoteOption promoteOption()` +* `withPromoteOption(models.ReplicationPromoteOption)` was removed + +#### `models.MigrationResourceForPatch` was modified + +* `models.CancelEnum cancel()` -> `models.Cancel cancel()` +* `models.LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded()` -> `models.LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded()` +* `withCancel(models.CancelEnum)` was removed +* `withSecretParameters(models.MigrationSecretParameters)` was removed +* `withTriggerCutover(models.TriggerCutoverEnum)` was removed +* `withMigrateRoles(models.MigrateRolesEnum)` was removed +* `models.TriggerCutoverEnum triggerCutover()` -> `models.TriggerCutover triggerCutover()` +* `models.MigrationSecretParameters secretParameters()` -> `models.MigrationSecretParametersForPatch secretParameters()` +* `withStartDataMigration(models.StartDataMigrationEnum)` was removed +* `models.StartDataMigrationEnum startDataMigration()` -> `models.StartDataMigration startDataMigration()` +* `models.OverwriteDbsInTargetEnum overwriteDbsInTarget()` -> `models.OverwriteDatabasesOnTargetServer overwriteDbsInTarget()` +* `withSetupLogicalReplicationOnSourceDbIfNeeded(models.LogicalReplicationOnSourceDbEnum)` was removed +* `withOverwriteDbsInTarget(models.OverwriteDbsInTargetEnum)` was removed +* `models.MigrateRolesEnum migrateRoles()` -> `models.MigrateRolesAndPermissions migrateRoles()` + +#### `models.Storage` was modified + +* `models.AzureManagedDiskPerformanceTiers tier()` -> `models.AzureManagedDiskPerformanceTier tier()` +* `withTier(models.AzureManagedDiskPerformanceTiers)` was removed + +#### `models.VirtualEndpoints` was modified + +* `models.VirtualEndpointResource getById(java.lang.String)` -> `models.VirtualEndpoint getById(java.lang.String)` +* `models.VirtualEndpointResource get(java.lang.String,java.lang.String,java.lang.String)` -> `models.VirtualEndpoint get(java.lang.String,java.lang.String,java.lang.String)` +* `models.VirtualEndpointResource$DefinitionStages$Blank define(java.lang.String)` -> `models.VirtualEndpoint$DefinitionStages$Blank define(java.lang.String)` + +#### `models.MigrationStatus` was modified + +* `models.MigrationSubStateDetails currentSubStateDetails()` -> `models.MigrationSubstateDetails currentSubStateDetails()` + +#### `models.DataEncryption` was modified + +* `withGeoBackupEncryptionKeyStatus(models.KeyStatusEnum)` was removed +* `models.KeyStatusEnum geoBackupEncryptionKeyStatus()` -> `models.EncryptionKeyStatus geoBackupEncryptionKeyStatus()` +* `models.KeyStatusEnum primaryEncryptionKeyStatus()` -> `models.EncryptionKeyStatus primaryEncryptionKeyStatus()` +* `withType(models.ArmServerKeyType)` was removed +* `withPrimaryEncryptionKeyStatus(models.KeyStatusEnum)` was removed +* `models.ArmServerKeyType type()` -> `models.DataEncryptionType type()` + +#### `models.Operation` was modified + +* `Operation()` was removed +* `java.lang.Boolean isDataAction()` -> `java.lang.Boolean isDataAction()` +* `withIsDataAction(java.lang.Boolean)` was removed +* `toJson(com.azure.json.JsonWriter)` was removed +* `java.lang.String name()` -> `java.lang.String name()` +* `models.OperationOrigin origin()` -> `models.OperationOrigin origin()` +* `fromJson(com.azure.json.JsonReader)` was removed +* `validate()` was removed +* `models.OperationDisplay display()` -> `models.OperationDisplay display()` +* `java.util.Map properties()` -> `java.util.Map properties()` + +#### `models.VirtualNetworkSubnetUsages` was modified + +* `execute(java.lang.String,models.VirtualNetworkSubnetUsageParameter)` was removed +* `executeWithResponse(java.lang.String,models.VirtualNetworkSubnetUsageParameter,com.azure.core.util.Context)` was removed + +#### `models.Server` was modified + +* `models.ServerVersion version()` -> `models.PostgresMajorVersion version()` + +#### `models.ServerThreatProtectionSettings` was modified + +* `models.ServerThreatProtectionSettingsModel$DefinitionStages$Blank define(models.ThreatProtectionName)` -> `models.AdvancedThreatProtectionSettingsModel$DefinitionStages$Blank define(models.ThreatProtectionName)` +* `getByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getById(java.lang.String)` was removed +* `listByServer(java.lang.String,java.lang.String)` was removed +* `getWithResponse(java.lang.String,java.lang.String,models.ThreatProtectionName,com.azure.core.util.Context)` was removed +* `get(java.lang.String,java.lang.String,models.ThreatProtectionName)` was removed +* `listByServer(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.AuthConfig` was modified + +* `withPasswordAuth(models.PasswordAuthEnum)` was removed +* `withActiveDirectoryAuth(models.ActiveDirectoryAuthEnum)` was removed +* `models.PasswordAuthEnum passwordAuth()` -> `models.PasswordBasedAuth passwordAuth()` +* `models.ActiveDirectoryAuthEnum activeDirectoryAuth()` -> `models.MicrosoftEntraAuth activeDirectoryAuth()` + +### Features Added + + + +#### `models.Backup` was modified + +* `withGeoRedundantBackup(models.GeographicallyRedundantBackup)` was added + +#### `models.ServerVersionCapability` was modified + +* `supportedFeatures()` was added + +#### `models.Operations` was modified + +* `list(com.azure.core.util.Context)` was added + +#### `models.Server$Update` was modified + +* `withSku(models.SkuForPatch)` was added +* `withAuthConfig(models.AuthConfigForPatch)` was added +* `withCluster(models.Cluster)` was added +* `withAvailabilityZone(java.lang.String)` was added +* `withMaintenanceWindow(models.MaintenanceWindowForPatch)` was added +* `withHighAvailability(models.HighAvailabilityForPatch)` was added +* `withBackup(models.BackupForPatch)` was added +* `withCreateMode(models.CreateModeForPatch)` was added +* `withVersion(models.PostgresMajorVersion)` was added + +#### `models.Server$Definition` was modified + +* `withCluster(models.Cluster)` was added +* `withVersion(models.PostgresMajorVersion)` was added + +#### `PostgreSqlManager` was modified + +* `advancedThreatProtectionSettings()` was added +* `capabilitiesByServers()` was added +* `administratorsMicrosoftEntras()` was added +* `quotaUsages()` was added +* `capabilitiesByLocations()` was added +* `nameAvailabilities()` was added +* `backupsAutomaticAndOnDemands()` was added +* `backupsLongTermRetentions()` was added +* `capturedLogs()` was added +* `tuningOptionsOperations()` was added +* `privateDnsZoneSuffixes()` was added + +#### `models.Migrations` was modified + +* `checkNameAvailability(java.lang.String,java.lang.String,fluent.models.MigrationNameAvailabilityInner)` was added +* `listByTargetServer(java.lang.String,java.lang.String,models.MigrationListFilter,com.azure.core.util.Context)` was added +* `checkNameAvailabilityWithResponse(java.lang.String,java.lang.String,fluent.models.MigrationNameAvailabilityInner,com.azure.core.util.Context)` was added +* `getWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `cancelWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `listByTargetServer(java.lang.String,java.lang.String)` was added +* `get(java.lang.String,java.lang.String,java.lang.String)` was added +* `cancel(java.lang.String,java.lang.String,java.lang.String)` was added + +#### `models.Replica` was modified + +* `withPromoteOption(models.ReadReplicaPromoteOption)` was added + +#### `models.MigrationResourceForPatch` was modified + +* `withOverwriteDbsInTarget(models.OverwriteDatabasesOnTargetServer)` was added +* `withCancel(models.Cancel)` was added +* `withTriggerCutover(models.TriggerCutover)` was added +* `withStartDataMigration(models.StartDataMigration)` was added +* `withSecretParameters(models.MigrationSecretParametersForPatch)` was added +* `withSetupLogicalReplicationOnSourceDbIfNeeded(models.LogicalReplicationOnSourceServer)` was added +* `withMigrateRoles(models.MigrateRolesAndPermissions)` was added + +#### `models.Storage` was modified + +* `withTier(models.AzureManagedDiskPerformanceTier)` was added + +#### `models.UserAssignedIdentity` was modified + +* `principalId()` was added +* `withPrincipalId(java.lang.String)` was added + +#### `models.PrivateEndpointConnections` was modified + +* `delete(java.lang.String,java.lang.String,java.lang.String)` was added +* `delete(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `update(java.lang.String,java.lang.String,java.lang.String,fluent.models.PrivateEndpointConnectionInner)` was added +* `update(java.lang.String,java.lang.String,java.lang.String,fluent.models.PrivateEndpointConnectionInner,com.azure.core.util.Context)` was added + +#### `models.DataEncryption` was modified + +* `withGeoBackupEncryptionKeyStatus(models.EncryptionKeyStatus)` was added +* `withPrimaryEncryptionKeyStatus(models.EncryptionKeyStatus)` was added +* `withType(models.DataEncryptionType)` was added + +#### `models.ServerSkuCapability` was modified + +* `supportedFeatures()` was added +* `securityProfile()` was added + +#### `models.Operation` was modified + +* `innerModel()` was added + +#### `models.VirtualNetworkSubnetUsages` was modified + +* `list(java.lang.String,models.VirtualNetworkSubnetUsageParameter)` was added +* `listWithResponse(java.lang.String,models.VirtualNetworkSubnetUsageParameter,com.azure.core.util.Context)` was added + +#### `models.Server` was modified + +* `cluster()` was added + +#### `models.AuthConfig` was modified -### Other Changes +* `withPasswordAuth(models.PasswordBasedAuth)` was added +* `withActiveDirectoryAuth(models.MicrosoftEntraAuth)` was added ## 1.2.0-beta.1 (2025-05-16) diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md index 71ee8f12e634..a258ac45fa91 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md @@ -2,7 +2,7 @@ Azure Resource Manager PostgreSql client library for Java. -This package contains Microsoft Azure SDK for PostgreSql Management SDK. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2025-01-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for PostgreSql Management SDK. The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2025-08-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-postgresqlflexibleserver - 1.2.0-beta.1 + 2.0.0 ``` [//]: # ({x-version-update-end}) @@ -78,17 +78,17 @@ server = postgreSqlManager.servers() .withAdministratorLogin(adminName) .withAdministratorLoginPassword(adminPwd) .withSku(new Sku().withName("Standard_D2ds_v4").withTier(SkuTier.GENERAL_PURPOSE)) - .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(ActiveDirectoryAuthEnum.DISABLED) - .withPasswordAuth(PasswordAuthEnum.ENABLED)) - .withIdentity(new UserAssignedIdentity().withType(IdentityType.NONE)) - .withDataEncryption(new DataEncryption().withType(ArmServerKeyType.SYSTEM_MANAGED)) - .withVersion(ServerVersion.ONE_FOUR) + .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(MicrosoftEntraAuth.DISABLED) + .withPasswordAuth(PasswordBasedAuth.ENABLED)) + .withIdentity(new UserAssignedIdentity().withType(IdentityType.NONE)) + .withDataEncryption(new DataEncryption().withType(DataEncryptionType.SYSTEM_MANAGED)) + .withVersion(PostgresMajorVersion.ONE_FOUR) .withAvailabilityZone("2") .withStorage(new Storage().withStorageSizeGB(128)) - .withBackup( - new Backup().withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED).withBackupRetentionDays(7)) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.DISABLED)) - .withReplicationRole(ReplicationRole.PRIMARY) + .withBackup(new Backup().withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED) + .withBackupRetentionDays(7)) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.SAME_ZONE)) + .withReplicationRole(ReplicationRole.PRIMARY) .create(); ``` [Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md) diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md index 7421be2ef126..4643e63aa74d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md @@ -1,27 +1,43 @@ # Code snippets and samples -## Administrators +## AdministratorsMicrosoftEntra -- [Create](#administrators_create) -- [Delete](#administrators_delete) -- [Get](#administrators_get) -- [ListByServer](#administrators_listbyserver) +- [CreateOrUpdate](#administratorsmicrosoftentra_createorupdate) +- [Delete](#administratorsmicrosoftentra_delete) +- [Get](#administratorsmicrosoftentra_get) +- [ListByServer](#administratorsmicrosoftentra_listbyserver) -## Backups +## AdvancedThreatProtectionSettings -- [Create](#backups_create) -- [Delete](#backups_delete) -- [Get](#backups_get) -- [ListByServer](#backups_listbyserver) +- [Get](#advancedthreatprotectionsettings_get) +- [ListByServer](#advancedthreatprotectionsettings_listbyserver) -## CheckNameAvailability +## BackupsAutomaticAndOnDemand -- [Execute](#checknameavailability_execute) +- [Create](#backupsautomaticandondemand_create) +- [Delete](#backupsautomaticandondemand_delete) +- [Get](#backupsautomaticandondemand_get) +- [ListByServer](#backupsautomaticandondemand_listbyserver) -## CheckNameAvailabilityWithLocation +## BackupsLongTermRetention -- [Execute](#checknameavailabilitywithlocation_execute) +- [CheckPrerequisites](#backupslongtermretention_checkprerequisites) +- [Get](#backupslongtermretention_get) +- [ListByServer](#backupslongtermretention_listbyserver) +- [Start](#backupslongtermretention_start) + +## CapabilitiesByLocation + +- [List](#capabilitiesbylocation_list) + +## CapabilitiesByServer + +- [List](#capabilitiesbyserver_list) + +## CapturedLogs + +- [ListByServer](#capturedlogs_listbyserver) ## Configurations @@ -44,49 +60,34 @@ - [Get](#firewallrules_get) - [ListByServer](#firewallrules_listbyserver) -## FlexibleServer - -- [StartLtrBackup](#flexibleserver_startltrbackup) -- [TriggerLtrPreBackup](#flexibleserver_triggerltrprebackup) - -## GetPrivateDnsZoneSuffix - -- [Execute](#getprivatednszonesuffix_execute) - -## LocationBasedCapabilities - -- [Execute](#locationbasedcapabilities_execute) - -## LogFiles - -- [ListByServer](#logfiles_listbyserver) - -## LtrBackupOperations - -- [Get](#ltrbackupoperations_get) -- [ListByServer](#ltrbackupoperations_listbyserver) - ## Migrations +- [Cancel](#migrations_cancel) +- [CheckNameAvailability](#migrations_checknameavailability) - [Create](#migrations_create) -- [Delete](#migrations_delete) - [Get](#migrations_get) - [ListByTargetServer](#migrations_listbytargetserver) - [Update](#migrations_update) +## NameAvailability + +- [CheckGlobally](#nameavailability_checkglobally) +- [CheckWithLocation](#nameavailability_checkwithlocation) + ## Operations - [List](#operations_list) -## PrivateEndpointConnectionOperation +## PrivateDnsZoneSuffix -- [Delete](#privateendpointconnectionoperation_delete) -- [Update](#privateendpointconnectionoperation_update) +- [Get](#privatednszonesuffix_get) ## PrivateEndpointConnections +- [Delete](#privateendpointconnections_delete) - [Get](#privateendpointconnections_get) - [ListByServer](#privateendpointconnections_listbyserver) +- [Update](#privateendpointconnections_update) ## PrivateLinkResources @@ -101,23 +102,9 @@ - [ListByServer](#replicas_listbyserver) -## ResourceProvider - -- [CheckMigrationNameAvailability](#resourceprovider_checkmigrationnameavailability) - -## ServerCapabilities - -- [List](#servercapabilities_list) - -## ServerThreatProtectionSettings - -- [CreateOrUpdate](#serverthreatprotectionsettings_createorupdate) -- [Get](#serverthreatprotectionsettings_get) -- [ListByServer](#serverthreatprotectionsettings_listbyserver) - ## Servers -- [Create](#servers_create) +- [CreateOrUpdate](#servers_createorupdate) - [Delete](#servers_delete) - [GetByResourceGroup](#servers_getbyresourcegroup) - [List](#servers_list) @@ -127,23 +114,11 @@ - [Stop](#servers_stop) - [Update](#servers_update) -## TuningConfiguration +## TuningOptionsOperation -- [Disable](#tuningconfiguration_disable) -- [Enable](#tuningconfiguration_enable) -- [ListSessionDetails](#tuningconfiguration_listsessiondetails) -- [ListSessions](#tuningconfiguration_listsessions) -- [StartSession](#tuningconfiguration_startsession) -- [StopSession](#tuningconfiguration_stopsession) - -## TuningIndex - -- [ListRecommendations](#tuningindex_listrecommendations) - -## TuningOptions - -- [Get](#tuningoptions_get) -- [ListByServer](#tuningoptions_listbyserver) +- [Get](#tuningoptionsoperation_get) +- [ListByServer](#tuningoptionsoperation_listbyserver) +- [ListRecommendations](#tuningoptionsoperation_listrecommendations) ## VirtualEndpoints @@ -155,1275 +130,1547 @@ ## VirtualNetworkSubnetUsage -- [Execute](#virtualnetworksubnetusage_execute) -### Administrators_Create +- [List](#virtualnetworksubnetusage_list) +### AdministratorsMicrosoftEntra_CreateOrUpdate ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigTuningRequestParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; /** - * Samples for TuningConfiguration StartSession. + * Samples for AdministratorsMicrosoftEntra CreateOrUpdate. */ -public final class TuningConfigurationStartSessionSamples { +public final class AdministratorsMicrosoftEntraCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_StartSession.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdministratorsMicrosoftEntraAdd.json */ /** - * Sample code: TuningConfiguration_StartSession. + * Sample code: Add a server administrator associated to a Microsoft Entra principal. * * @param manager Entry point to PostgreSqlManager. */ - public static void - tuningConfigurationStartSession(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .startSession("testrg", "testserver", TuningOptionEnum.CONFIGURATION, - new ConfigTuningRequestParameter().withAllowServerRestarts(false) - .withTargetImprovementMetric("targetImprovementMetric"), - com.azure.core.util.Context.NONE); + public static void addAServerAdministratorAssociatedToAMicrosoftEntraPrincipal( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.administratorsMicrosoftEntras() + .define("oooooooo-oooo-oooo-oooo-oooooooooooo") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withPrincipalType(PrincipalType.USER) + .withPrincipalName("exampleuser@contoso.com") + .withTenantId("tttttttt-tttt-tttt-tttt-tttttttttttt") + .create(); } } ``` -### Administrators_Delete +### AdministratorsMicrosoftEntra_Delete ```java /** - * Samples for LtrBackupOperations ListByServer. + * Samples for AdministratorsMicrosoftEntra Delete. */ -public final class LtrBackupOperationsListByServerSamples { +public final class AdministratorsMicrosoftEntraDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LongTermRetentionOperationListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdministratorsMicrosoftEntraDelete.json */ /** - * Sample code: Sample List of Long Tern Retention Operations by Flexible Server. + * Sample code: Delete a server administrator associated to a Microsoft Entra principal. * * @param manager Entry point to PostgreSqlManager. */ - public static void sampleListOfLongTernRetentionOperationsByFlexibleServer( + public static void deleteAServerAdministratorAssociatedToAMicrosoftEntraPrincipal( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.ltrBackupOperations() - .listByServer("rgLongTermRetention", "pgsqlltrtestserver", com.azure.core.util.Context.NONE); + manager.administratorsMicrosoftEntras() + .delete("exampleresourcegroup", "exampleserver", "oooooooo-oooo-oooo-oooo-oooooooooooo", + com.azure.core.util.Context.NONE); } } ``` -### Administrators_Get +### AdministratorsMicrosoftEntra_Get ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; - /** - * Samples for FlexibleServer TriggerLtrPreBackup. + * Samples for AdministratorsMicrosoftEntra Get. */ -public final class FlexibleServerTriggerLtrPreBackupSamples { +public final class AdministratorsMicrosoftEntraGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LongTermRetentionPreBackup.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdministratorsMicrosoftEntraGet.json */ /** - * Sample code: Sample_Prebackup. + * Sample code: Get information about a server administrator associated to a Microsoft Entra principal. * * @param manager Entry point to PostgreSqlManager. */ - public static void samplePrebackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.flexibleServers() - .triggerLtrPreBackupWithResponse("rgLongTermRetention", "pgsqlltrtestserver", - new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("backup1")), + public static void getInformationAboutAServerAdministratorAssociatedToAMicrosoftEntraPrincipal( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.administratorsMicrosoftEntras() + .getWithResponse("exampleresourcegroup", "exampleserver", "oooooooo-oooo-oooo-oooo-oooooooooooo", com.azure.core.util.Context.NONE); } } ``` -### Administrators_ListByServer +### AdministratorsMicrosoftEntra_ListByServer ```java /** - * Samples for Servers Delete. + * Samples for AdministratorsMicrosoftEntra ListByServer. */ -public final class ServersDeleteSamples { +public final class AdministratorsMicrosoftEntraListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdministratorsMicrosoftEntraListByServer.json */ /** - * Sample code: ServerDelete. + * Sample code: List information about all server administrators associated to Microsoft Entra principals. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().delete("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void listInformationAboutAllServerAdministratorsAssociatedToMicrosoftEntraPrincipals( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.administratorsMicrosoftEntras() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### Backups_Create +### AdvancedThreatProtectionSettings_Get ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.FailoverMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; /** - * Samples for Servers Restart. + * Samples for AdvancedThreatProtectionSettings Get. */ -public final class ServersRestartSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerRestart.json - */ - /** - * Sample code: ServerRestart. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void serverRestart(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().restart("testrg", "testserver", null, com.azure.core.util.Context.NONE); - } - +public final class AdvancedThreatProtectionSettingsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerRestartWithFailover.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdvancedThreatProtectionSettingsGet.json */ /** - * Sample code: ServerRestartWithFailover. + * Sample code: Get state of advanced threat protection settings for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - serverRestartWithFailover(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .restart("testrg", "testserver", - new RestartParameter().withRestartWithFailover(true).withFailoverMode(FailoverMode.FORCED_FAILOVER), + public static void getStateOfAdvancedThreatProtectionSettingsForAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.advancedThreatProtectionSettings() + .getWithResponse("exampleresourcegroup", "exampleserver", ThreatProtectionName.DEFAULT, com.azure.core.util.Context.NONE); } } ``` -### Backups_Delete +### AdvancedThreatProtectionSettings_ListByServer ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; - /** - * Samples for CheckNameAvailabilityWithLocation Execute. + * Samples for AdvancedThreatProtectionSettings ListByServer. */ -public final class CheckNameAvailabilityWithLocationExecuteSamples { +public final class AdvancedThreatProtectionSettingsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * CheckNameAvailabilityLocationBased.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdvancedThreatProtectionSettingsListByServer.json */ /** - * Sample code: NameAvailability. + * Sample code: List state of advanced threat protection settings for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void nameAvailability(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.checkNameAvailabilityWithLocations() - .executeWithResponse("westus", new CheckNameAvailabilityRequest().withName("name1") - .withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE); + public static void listStateOfAdvancedThreatProtectionSettingsForAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.advancedThreatProtectionSettings() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### Backups_Get +### BackupsAutomaticAndOnDemand_Create ```java /** - * Samples for LocationBasedCapabilities Execute. + * Samples for BackupsAutomaticAndOnDemand Create. */ -public final class LocationBasedCapabilitiesExecuteSamples { +public final class BackupsAutomaticAndOnDemandCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * CapabilitiesByLocation.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsAutomaticAndOnDemandCreate.json */ /** - * Sample code: CapabilitiesList. + * Sample code: Create an on demand backup of a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void capabilitiesList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.locationBasedCapabilities().execute("eastus", com.azure.core.util.Context.NONE); + public static void + createAnOnDemandBackupOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsAutomaticAndOnDemands() + .create("exampleresourcegroup", "exampleserver", "ondemandbackup-20250601T183022", + com.azure.core.util.Context.NONE); } } ``` -### Backups_ListByServer +### BackupsAutomaticAndOnDemand_Delete ```java /** - * Samples for VirtualEndpoints Delete. + * Samples for BackupsAutomaticAndOnDemand Delete. */ -public final class VirtualEndpointsDeleteSamples { +public final class BackupsAutomaticAndOnDemandDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * VirtualEndpointDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsAutomaticAndOnDemandDelete.json */ /** - * Sample code: Delete a virtual endpoint. + * Sample code: Delete an on demand backup, given its name. * * @param manager Entry point to PostgreSqlManager. */ - public static void - deleteAVirtualEndpoint(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.virtualEndpoints() - .delete("testrg", "pgtestsvc4", "pgVirtualEndpoint1", com.azure.core.util.Context.NONE); + public static void deleteAnOnDemandBackupGivenItsName( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsAutomaticAndOnDemands() + .delete("exampleresourcegroup", "exampleserver", "ondemandbackup-20250601T183022", + com.azure.core.util.Context.NONE); } } ``` -### CheckNameAvailability_Execute +### BackupsAutomaticAndOnDemand_Get ```java /** - * Samples for Backups Create. + * Samples for BackupsAutomaticAndOnDemand Get. */ -public final class BackupsCreateSamples { +public final class BackupsAutomaticAndOnDemandGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * BackupCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsAutomaticAndOnDemandGet.json */ /** - * Sample code: Create a new Backup for a flexible server. + * Sample code: Get an on demand backup, given its name. * * @param manager Entry point to PostgreSqlManager. */ - public static void createANewBackupForAFlexibleServer( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.backups() - .create("TestGroup", "postgresqltestserver", "backup_20250303T160516", com.azure.core.util.Context.NONE); + public static void + getAnOnDemandBackupGivenItsName(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsAutomaticAndOnDemands() + .getWithResponse("exampleresourcegroup", "exampleserver", "backup_638830782181266873", + com.azure.core.util.Context.NONE); } } ``` -### CheckNameAvailabilityWithLocation_Execute +### BackupsAutomaticAndOnDemand_ListByServer ```java /** - * Samples for Administrators ListByServer. + * Samples for BackupsAutomaticAndOnDemand ListByServer. */ -public final class AdministratorsListByServerSamples { +public final class BackupsAutomaticAndOnDemandListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * AdministratorsListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsAutomaticAndOnDemandListByServer.json */ /** - * Sample code: AdministratorsListByServer. + * Sample code: List all available backups of a server. * * @param manager Entry point to PostgreSqlManager. */ public static void - administratorsListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.administrators().listByServer("testrg", "pgtestsvc1", com.azure.core.util.Context.NONE); + listAllAvailableBackupsOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsAutomaticAndOnDemands() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### Configurations_Get +### BackupsLongTermRetention_CheckPrerequisites ```java +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; + /** - * Samples for VirtualEndpoints ListByServer. + * Samples for BackupsLongTermRetention CheckPrerequisites. */ -public final class VirtualEndpointsListByServerSamples { +public final class BackupsLongTermRetentionCheckPrerequisitesSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * VirtualEndpointsListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsLongTermRetentionCheckPrerequisites.json */ /** - * Sample code: VirtualEndpointListByServer. + * Sample code: Perform all checks required for a long term retention backup operation to succeed. * * @param manager Entry point to PostgreSqlManager. */ - public static void - virtualEndpointListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.virtualEndpoints().listByServer("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE); + public static void performAllChecksRequiredForALongTermRetentionBackupOperationToSucceed( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsLongTermRetentions() + .checkPrerequisitesWithResponse("exampleresourcegroup", "exampleserver", + new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("exampleltrbackup")), + com.azure.core.util.Context.NONE); } } ``` -### Configurations_ListByServer +### BackupsLongTermRetention_Get ```java /** - * Samples for LtrBackupOperations Get. + * Samples for BackupsLongTermRetention Get. */ -public final class LtrBackupOperationsGetSamples { +public final class BackupsLongTermRetentionGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LongTermRetentionOperationGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsLongTermRetentionGet.json */ /** - * Sample code: Sample. + * Sample code: Get the results of a long retention backup operation for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void sample(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.ltrBackupOperations() - .getWithResponse("rgLongTermRetention", "pgsqlltrtestserver", "backup1", com.azure.core.util.Context.NONE); + public static void getTheResultsOfALongRetentionBackupOperationForAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsLongTermRetentions() + .getWithResponse("exampleresourcegroup", "exampleserver", "exampleltrbackup", + com.azure.core.util.Context.NONE); } } ``` -### Configurations_Put +### BackupsLongTermRetention_ListByServer ```java /** - * Samples for LogFiles ListByServer. + * Samples for BackupsLongTermRetention ListByServer. */ -public final class LogFilesListByServerSamples { +public final class BackupsLongTermRetentionListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LogFilesListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsLongTermRetentionListByServer.json */ /** - * Sample code: List all server log files for a server. + * Sample code: List the results of the long term retention backup operations for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - listAllServerLogFilesForAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.logFiles().listByServer("testrg", "postgresqltestsvc1", com.azure.core.util.Context.NONE); + public static void listTheResultsOfTheLongTermRetentionBackupOperationsForAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsLongTermRetentions() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### Configurations_Update +### BackupsLongTermRetention_Start ```java +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupStoreDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionRequest; +import java.util.Arrays; + /** - * Samples for Servers ListByResourceGroup. + * Samples for BackupsLongTermRetention Start. */ -public final class ServersListByResourceGroupSamples { +public final class BackupsLongTermRetentionStartSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerListByResourceGroup.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsLongTermRetentionStart.json */ /** - * Sample code: ServerListByResourceGroup. + * Sample code: Initiate a long term retention backup. * * @param manager Entry point to PostgreSqlManager. */ public static void - serverListByResourceGroup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().listByResourceGroup("testrgn", com.azure.core.util.Context.NONE); + initiateALongTermRetentionBackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsLongTermRetentions() + .start("exampleresourcegroup", "exampleserver", + new BackupsLongTermRetentionRequest() + .withBackupSettings(new BackupSettings().withBackupName("exampleltrbackup")) + .withTargetDetails(new BackupStoreDetails().withSasUriList(Arrays.asList("sasuri"))), + com.azure.core.util.Context.NONE); } } ``` -### Databases_Create +### CapabilitiesByLocation_List ```java /** - * Samples for Backups ListByServer. + * Samples for CapabilitiesByLocation List. */ -public final class BackupsListByServerSamples { +public final class CapabilitiesByLocationListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * BackupListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * CapabilitiesByLocationList.json */ /** - * Sample code: List backups for a server. + * Sample code: List the capabilities available in a given location for a specific subscription. * * @param manager Entry point to PostgreSqlManager. */ - public static void - listBackupsForAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.backups().listByServer("TestGroup", "postgresqltestserver", com.azure.core.util.Context.NONE); + public static void listTheCapabilitiesAvailableInAGivenLocationForASpecificSubscription( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.capabilitiesByLocations().list("eastus", com.azure.core.util.Context.NONE); } } ``` -### Databases_Delete +### CapabilitiesByServer_List ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.Configuration; - /** - * Samples for Configurations Update. + * Samples for CapabilitiesByServer List. */ -public final class ConfigurationsUpdateSamples { +public final class CapabilitiesByServerListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ConfigurationUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * CapabilitiesByServerList.json */ /** - * Sample code: Update a user configuration. + * Sample code: List the capabilities available for a given server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - updateAUserConfiguration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - Configuration resource = manager.configurations() - .getWithResponse("testrg", "testserver", "constraint_exclusion", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withValue("on").withSource("user-override").apply(); + public static void listTheCapabilitiesAvailableForAGivenServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.capabilitiesByServers().list("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### Databases_Get +### CapturedLogs_ListByServer ```java /** - * Samples for PrivateLinkResources ListByServer. + * Samples for CapturedLogs ListByServer. */ -public final class PrivateLinkResourcesListByServerSamples { +public final class CapturedLogsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateLinkResourcesList.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * CapturedLogsListByServer.json */ /** - * Sample code: Gets private link resources for PostgreSQL. + * Sample code: List all captured logs for download in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void getsPrivateLinkResourcesForPostgreSQL( + public static void listAllCapturedLogsForDownloadInAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateLinkResources().listByServer("Default", "test-svr", com.azure.core.util.Context.NONE); + manager.capturedLogs().listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### Databases_ListByServer +### Configurations_Get ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - /** - * Samples for TuningIndex ListRecommendations. + * Samples for Configurations Get. */ -public final class TuningIndexListRecommendationsSamples { +public final class ConfigurationsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningIndex_GetFilteredRecommendations.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ConfigurationsGet. + * json */ /** - * Sample code: TuningIndex_ListFilteredRecommendations. + * Sample code: Get information about a specific configuration (also known as server parameter) of a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void tuningIndexListFilteredRecommendations( + public static void getInformationAboutASpecificConfigurationAlsoKnownAsServerParameterOfAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningIndexes() - .listRecommendations("testrg", "pgtestrecs", TuningOptionEnum.INDEX, RecommendationType.CREATE_INDEX, - com.azure.core.util.Context.NONE); + manager.configurations() + .getWithResponse("exampleresourcegroup", "exampleserver", "array_nulls", com.azure.core.util.Context.NONE); } +} +``` + +### Configurations_ListByServer +```java +/** + * Samples for Configurations ListByServer. + */ +public final class ConfigurationsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningIndex_GetRecommendations.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ConfigurationsListByServer.json */ /** - * Sample code: TuningIndex_ListRecommendations. + * Sample code: List all configurations (also known as server parameters) of a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - tuningIndexListRecommendations(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningIndexes() - .listRecommendations("testrg", "pgtestsvc4", TuningOptionEnum.INDEX, null, - com.azure.core.util.Context.NONE); + public static void listAllConfigurationsAlsoKnownAsServerParametersOfAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.configurations() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### FirewallRules_CreateOrUpdate +### Configurations_Put ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - /** - * Samples for TuningConfiguration Disable. + * Samples for Configurations Put. */ -public final class TuningConfigurationDisableSamples { +public final class ConfigurationsPutSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_Disable.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ConfigurationsUpdateUsingPut.json */ /** - * Sample code: TuningConfiguration_Disable. + * Sample code: Update, using Put verb, the value assigned to a specific modifiable configuration (also known as + * server parameter) of a server. * * @param manager Entry point to PostgreSqlManager. */ public static void - tuningConfigurationDisable(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .disable("testrg", "testserver", TuningOptionEnum.CONFIGURATION, com.azure.core.util.Context.NONE); + updateUsingPutVerbTheValueAssignedToASpecificModifiableConfigurationAlsoKnownAsServerParameterOfAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.configurations() + .define("constraint_exclusion") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withValue("on") + .withSource("user-override") + .create(); } } ``` -### FirewallRules_Delete +### Configurations_Update ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Configuration; /** - * Samples for VirtualNetworkSubnetUsage Execute. + * Samples for Configurations Update. */ -public final class VirtualNetworkSubnetUsageExecuteSamples { +public final class ConfigurationsUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * VirtualNetworkSubnetUsage.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ConfigurationsUpdate.json */ /** - * Sample code: VirtualNetworkSubnetUsageList. + * Sample code: Update the value assigned to a specific modifiable configuration (also known as server parameter) of + * a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - virtualNetworkSubnetUsageList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.virtualNetworkSubnetUsages() - .executeWithResponse("westus", new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/testvnet"), - com.azure.core.util.Context.NONE); + public static void updateTheValueAssignedToASpecificModifiableConfigurationAlsoKnownAsServerParameterOfAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + Configuration resource = manager.configurations() + .getWithResponse("exampleresourcegroup", "exampleserver", "constraint_exclusion", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withValue("on").withSource("user-override").apply(); } } ``` -### FirewallRules_Get +### Databases_Create ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - /** - * Samples for TuningConfiguration ListSessionDetails. + * Samples for Databases Create. */ -public final class TuningConfigurationListSessionDetailsSamples { +public final class DatabasesCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_ListSessionDetails.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesCreate. + * json */ /** - * Sample code: TuningConfiguration_ListSessionDetails. + * Sample code: Create a database. * * @param manager Entry point to PostgreSqlManager. */ - public static void tuningConfigurationListSessionDetails( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .listSessionDetails("testrg", "testserver", TuningOptionEnum.CONFIGURATION, - "oooooooo-oooo-oooo-oooo-oooooooooooo", com.azure.core.util.Context.NONE); + public static void createADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.databases() + .define("exampledatabase") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withCharset("utf8") + .withCollation("en_US.utf8") + .create(); } } ``` -### FirewallRules_ListByServer +### Databases_Delete ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - /** - * Samples for TuningConfiguration StopSession. + * Samples for Databases Delete. */ -public final class TuningConfigurationStopSessionSamples { +public final class DatabasesDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_StopSession.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesDelete. + * json */ /** - * Sample code: TuningConfiguration_StopSession. + * Sample code: Delete an existing database. * * @param manager Entry point to PostgreSqlManager. */ public static void - tuningConfigurationStopSession(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .stopSession("testrg", "testserver", TuningOptionEnum.CONFIGURATION, com.azure.core.util.Context.NONE); + deleteAnExistingDatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.databases() + .delete("exampleresourcegroup", "exampleserver", "exampledatabase", com.azure.core.util.Context.NONE); } } ``` -### FlexibleServer_StartLtrBackup +### Databases_Get ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; - /** - * Samples for ServerThreatProtectionSettings Get. + * Samples for Databases Get. */ -public final class ServerThreatProtectionSettingsGetSamples { +public final class DatabasesGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerThreatProtectionSettingsGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesGet.json */ /** - * Sample code: Get a server's Threat Protection settings. + * Sample code: Get information about an existing database. * * @param manager Entry point to PostgreSqlManager. */ - public static void getAServerSThreatProtectionSettings( + public static void getInformationAboutAnExistingDatabase( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.serverThreatProtectionSettings() - .getWithResponse("threatprotection-6852", "threatprotection-2080", ThreatProtectionName.DEFAULT, + manager.databases() + .getWithResponse("exampleresourcegroup", "exampleserver", "exampledatabase", com.azure.core.util.Context.NONE); } } ``` -### FlexibleServer_TriggerLtrPreBackup +### Databases_ListByServer ```java /** - * Samples for Databases Delete. + * Samples for Databases ListByServer. */ -public final class DatabasesDeleteSamples { +public final class DatabasesListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * DatabaseDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * DatabasesListByServer.json */ /** - * Sample code: Delete a database. + * Sample code: List all databases in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void deleteADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.databases().delete("TestGroup", "testserver", "db1", com.azure.core.util.Context.NONE); + public static void + listAllDatabasesInAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.databases().listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### GetPrivateDnsZoneSuffix_Execute +### FirewallRules_CreateOrUpdate ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - /** - * Samples for TuningConfiguration Enable. + * Samples for FirewallRules CreateOrUpdate. */ -public final class TuningConfigurationEnableSamples { +public final class FirewallRulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_Enable.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * FirewallRulesCreateOrUpdate.json */ /** - * Sample code: TuningConfiguration_Enable. + * Sample code: Create a new firewall rule or update an existing firewall rule. * * @param manager Entry point to PostgreSqlManager. */ - public static void - tuningConfigurationEnable(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .enable("testrg", "testserver", TuningOptionEnum.CONFIGURATION, com.azure.core.util.Context.NONE); + public static void createANewFirewallRuleOrUpdateAnExistingFirewallRule( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.firewallRules() + .define("examplefirewallrule") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withStartIpAddress("0.0.0.0") + .withEndIpAddress("255.255.255.255") + .create(); } } ``` -### LocationBasedCapabilities_Execute +### FirewallRules_Delete ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - /** - * Samples for TuningConfiguration ListSessions. + * Samples for FirewallRules Delete. */ -public final class TuningConfigurationListSessionsSamples { +public final class FirewallRulesDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_ListSessions.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * FirewallRulesDelete.json */ /** - * Sample code: TuningConfiguration_ListSessions. + * Sample code: Delete an existing firewall rule. * * @param manager Entry point to PostgreSqlManager. */ public static void - tuningConfigurationListSessions(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .listSessions("testrg", "testserver", TuningOptionEnum.CONFIGURATION, com.azure.core.util.Context.NONE); + deleteAnExistingFirewallRule(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.firewallRules() + .delete("exampleresourcegroup", "exampleserver", "examplefirewallrule", com.azure.core.util.Context.NONE); } } ``` -### LogFiles_ListByServer +### FirewallRules_Get ```java /** - * Samples for QuotaUsages List. + * Samples for FirewallRules Get. */ -public final class QuotaUsagesListSamples { +public final class FirewallRulesGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * QuotaUsagesForFlexibleServers.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/FirewallRulesGet. + * json */ /** - * Sample code: List of quota usages for flexible servers. + * Sample code: Get information about a firewall rule in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void listOfQuotaUsagesForFlexibleServers( + public static void getInformationAboutAFirewallRuleInAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.quotaUsages().list("westus", com.azure.core.util.Context.NONE); + manager.firewallRules() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplefirewallrule", + com.azure.core.util.Context.NONE); } } ``` -### LtrBackupOperations_Get +### FirewallRules_ListByServer ```java /** - * Samples for Backups Get. + * Samples for FirewallRules ListByServer. */ -public final class BackupsGetSamples { +public final class FirewallRulesListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/BackupGet - * .json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * FirewallRulesListByServer.json */ /** - * Sample code: Get a backup for a server. + * Sample code: List information about all firewall rules in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - getABackupForAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.backups() - .getWithResponse("TestGroup", "postgresqltestserver", "daily_20250303T160516", - com.azure.core.util.Context.NONE); + public static void listInformationAboutAllFirewallRulesInAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.firewallRules().listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### LtrBackupOperations_ListByServer +### Migrations_Cancel ```java /** - * Samples for Operations List. + * Samples for Migrations Cancel. */ -public final class OperationsListSamples { +public final class MigrationsCancelSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * OperationList.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsCancel. + * json */ /** - * Sample code: OperationList. + * Sample code: Cancel an active migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void operationList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + public static void + cancelAnActiveMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .cancelWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); } } ``` -### Migrations_Create +### Migrations_CheckNameAvailability ```java +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; + /** - * Samples for PrivateEndpointConnectionOperation Delete. + * Samples for Migrations CheckNameAvailability. */ -public final class PrivateEndpointConnectionOperationDeleteSamples { +public final class MigrationsCheckNameAvailabilitySamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateEndpointConnectionDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCheckNameAvailability.json */ /** - * Sample code: Deletes a private endpoint connection with a given name. + * Sample code: Check the validity and availability of the given name, to assign it to a new migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void deletesAPrivateEndpointConnectionWithAGivenName( + public static void checkTheValidityAndAvailabilityOfTheGivenNameToAssignItToANewMigration( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateEndpointConnectionOperations() - .delete("Default", "test-svr", "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", + manager.migrations() + .checkNameAvailabilityWithResponse("exampleresourcegroup", "exampleserver", + new MigrationNameAvailabilityInner().withName("examplemigration") + .withType("Microsoft.DBforPostgreSQL/flexibleServers/migrations"), com.azure.core.util.Context.NONE); } } ``` -### Migrations_Delete +### Migrations_Create ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; -import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupStoreDetails; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupRequest; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdminCredentials; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesAndPermissions; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationOption; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParameters; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDatabasesOnTargetServer; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SourceType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SslMode; import java.util.Arrays; /** - * Samples for FlexibleServer StartLtrBackup. + * Samples for Migrations Create. */ -public final class FlexibleServerStartLtrBackupSamples { +public final class MigrationsCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LongTermRetentionBackup.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateWithOtherUsers.json */ /** - * Sample code: Sample_ExecuteBackup. + * Sample code: Create a migration specifying user names. * * @param manager Entry point to PostgreSqlManager. */ - public static void - sampleExecuteBackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.flexibleServers() - .startLtrBackup("rgLongTermRetention", "pgsqlltrtestserver", - new LtrBackupRequest().withBackupSettings(new BackupSettings().withBackupName("backup1")) - .withTargetDetails(new BackupStoreDetails().withSasUriList(Arrays.asList("sasuri"))), - com.azure.core.util.Context.NONE); - } -} -``` - -### Migrations_Get - -```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettingsModel; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState; + public static void createAMigrationSpecifyingUserNames( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withMigrationMode(MigrationMode.OFFLINE) + .withSourceDbServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") + .withSecretParameters(new MigrationSecretParameters() + .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") + .withTargetServerPassword("fakeTokenPlaceholder")) + .withSourceServerUsername("newadmin@examplesource") + .withTargetServerUsername("targetadmin")) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .create(); + } -/** - * Samples for ServerThreatProtectionSettings CreateOrUpdate. - */ -public final class ServerThreatProtectionSettingsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerThreatProtectionSettingsCreateOrUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateOtherSourceTypesValidateMigrate.json */ /** - * Sample code: Update a server's Threat Protection settings. + * Sample code: Create a migration with other source type for validating and migrating. * * @param manager Entry point to PostgreSqlManager. */ - public static void updateAServerSThreatProtectionSettings( + public static void createAMigrationWithOtherSourceTypeForValidatingAndMigrating( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - ServerThreatProtectionSettingsModel resource = manager.serverThreatProtectionSettings() - .getWithResponse("threatprotection-4799", "threatprotection-6440", ThreatProtectionName.DEFAULT, - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withState(ThreatProtectionState.ENABLED).apply(); + manager.migrations() + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withMigrationMode(MigrationMode.OFFLINE) + .withMigrationOption(MigrationOption.VALIDATE_AND_MIGRATE) + .withSourceType(SourceType.ON_PREMISES) + .withSslMode(SslMode.PREFER) + .withSourceDbServerResourceId("examplesource:5432@exampleuser") + .withSecretParameters(new MigrationSecretParameters() + .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") + .withTargetServerPassword("fakeTokenPlaceholder"))) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) + .create(); } -} -``` - -### Migrations_ListByTargetServer -```java -/** - * Samples for FirewallRules Get. - */ -public final class FirewallRulesGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * FirewallRuleGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateWithPrivateEndpointServers.json */ /** - * Sample code: FirewallRuleList. + * Sample code: Create a migration with private endpoint. * * @param manager Entry point to PostgreSqlManager. */ - public static void firewallRuleList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.firewallRules().getWithResponse("testrg", "testserver", "rule1", com.azure.core.util.Context.NONE); + public static void createAMigrationWithPrivateEndpoint( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withMigrationInstanceResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/examplesourcemigration") + .withMigrationMode(MigrationMode.OFFLINE) + .withSourceDbServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") + .withSecretParameters(new MigrationSecretParameters() + .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") + .withTargetServerPassword("fakeTokenPlaceholder"))) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) + .create(); } -} -``` -### Migrations_Update + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsCreate. + * json + */ + /** + * Sample code: Create a migration. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createAMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withMigrationMode(MigrationMode.OFFLINE) + .withSourceDbServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") + .withSecretParameters(new MigrationSecretParameters() + .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") + .withTargetServerPassword("fakeTokenPlaceholder"))) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) + .create(); + } -```java -/** - * Samples for Administrators Delete. - */ -public final class AdministratorsDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * AdministratorDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateWithRoles.json */ /** - * Sample code: AdministratorDelete. + * Sample code: Create a migration with roles. * * @param manager Entry point to PostgreSqlManager. */ public static void - administratorDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.administrators() - .delete("testrg", "testserver", "oooooooo-oooo-oooo-oooo-oooooooooooo", com.azure.core.util.Context.NONE); + createAMigrationWithRoles(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withMigrationMode(MigrationMode.OFFLINE) + .withSourceDbServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") + .withSecretParameters(new MigrationSecretParameters() + .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") + .withTargetServerPassword("fakeTokenPlaceholder"))) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) + .withMigrateRoles(MigrateRolesAndPermissions.TRUE) + .create(); } -} -``` -### Operations_List + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateWithFullyQualifiedDomainName.json + */ + /** + * Sample code: Create a migration with fully qualified domain names for source and target servers. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createAMigrationWithFullyQualifiedDomainNamesForSourceAndTargetServers( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withMigrationMode(MigrationMode.OFFLINE) + .withSourceDbServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") + .withSourceDbServerFullyQualifiedDomainName("examplesource.contoso.com") + .withTargetDbServerFullyQualifiedDomainName("exampletarget.contoso.com") + .withSecretParameters(new MigrationSecretParameters() + .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") + .withTargetServerPassword("fakeTokenPlaceholder"))) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) + .create(); + } -```java -/** - * Samples for Databases Get. - */ -public final class DatabasesGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * DatabaseGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateValidateOnly.json */ /** - * Sample code: Get a database. + * Sample code: Create a migration for validating only. * * @param manager Entry point to PostgreSqlManager. */ - public static void getADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.databases().getWithResponse("TestGroup", "testserver", "db1", com.azure.core.util.Context.NONE); + public static void createAMigrationForValidatingOnly( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withMigrationMode(MigrationMode.OFFLINE) + .withMigrationOption(MigrationOption.VALIDATE) + .withSourceDbServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") + .withSecretParameters(new MigrationSecretParameters() + .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") + .withTargetServerPassword("fakeTokenPlaceholder"))) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) + .create(); } } ``` -### PrivateEndpointConnectionOperation_Delete +### Migrations_Get ```java /** - * Samples for Configurations ListByServer. + * Samples for Migrations Get. */ -public final class ConfigurationsListByServerSamples { +public final class MigrationsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ConfigurationListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsGetMigrationWithSuccessfulValidationOnly.json */ /** - * Sample code: ConfigurationList. + * Sample code: Get information about a migration with successful validation only. * * @param manager Entry point to PostgreSqlManager. */ - public static void configurationList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.configurations().listByServer("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void getInformationAboutAMigrationWithSuccessfulValidationOnly( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); } -} -``` -### PrivateEndpointConnectionOperation_Update + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsGetMigrationWithSuccessfulValidationAndMigration.json + */ + /** + * Sample code: Get information about a migration with successful validation and successful migration. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void getInformationAboutAMigrationWithSuccessfulValidationAndSuccessfulMigration( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); + } -```java -/** - * Samples for Databases Create. - */ -public final class DatabasesCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * DatabaseCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsGetMigrationWithSuccessfulValidationButMigrationFailure.json */ /** - * Sample code: Create a database. + * Sample code: Get information about a migration with successful validation but failed migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void createADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.databases() - .define("db1") - .withExistingFlexibleServer("TestGroup", "testserver") - .withCharset("utf8") - .withCollation("en_US.utf8") - .create(); + public static void getInformationAboutAMigrationWithSuccessfulValidationButFailedMigration( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); } -} -``` -### PrivateEndpointConnections_Get + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsGetMigrationWithValidationFailures.json + */ + /** + * Sample code: Get information about a migration with validation failures. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void getInformationAboutAMigrationWithValidationFailures( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); + } -```java -/** - * Samples for TuningOptions ListByServer. - */ -public final class TuningOptionsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Tuning_ListTuningOptions.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGet.json */ /** - * Sample code: TuningOptions_ListByServer. + * Sample code: Get information about a migration. * * @param manager Entry point to PostgreSqlManager. */ public static void - tuningOptionsListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningOptions().listByServer("testrg", "testserver", com.azure.core.util.Context.NONE); + getInformationAboutAMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); } } ``` -### PrivateEndpointConnections_ListByServer +### Migrations_ListByTargetServer ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; -import java.util.Arrays; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationListFilter; /** - * Samples for VirtualEndpoints Update. + * Samples for Migrations ListByTargetServer. */ -public final class VirtualEndpointsUpdateSamples { +public final class MigrationsListByTargetServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * VirtualEndpointUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsListByTargetServer.json */ /** - * Sample code: Update a virtual endpoint for a server to update the. + * Sample code: List all migrations of a target flexible server. * * @param manager Entry point to PostgreSqlManager. */ - public static void updateAVirtualEndpointForAServerToUpdateThe( + public static void listAllMigrationsOfATargetFlexibleServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - VirtualEndpointResource resource = manager.virtualEndpoints() - .getWithResponse("testrg", "pgtestsvc4", "pgVirtualEndpoint1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withEndpointType(VirtualEndpointType.READ_WRITE) - .withMembers(Arrays.asList("testReplica1")) - .apply(); + manager.migrations() + .listByTargetServer("exampleresourcegroup", "exampleserver", MigrationListFilter.ALL, + com.azure.core.util.Context.NONE); } } ``` -### PrivateLinkResources_Get +### Migrations_Update ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceServer; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Migration; /** - * Samples for Administrators Create. + * Samples for Migrations Update. */ -public final class AdministratorsCreateSamples { +public final class MigrationsUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * AdministratorAdd.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsUpdate. + * json */ /** - * Sample code: Adds an Microsoft Entra Administrator for the server. + * Sample code: Update an existing migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void addsAnMicrosoftEntraAdministratorForTheServer( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.administrators() - .define("oooooooo-oooo-oooo-oooo-oooooooooooo") - .withExistingFlexibleServer("testrg", "testserver") - .withPrincipalType(PrincipalType.USER) - .withPrincipalName("testuser1@microsoft.com") - .withTenantId("tttttttt-tttt-tttt-tttt-tttttttttttt") - .create(); + public static void + updateAnExistingMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + Migration resource = manager.migrations() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withSetupLogicalReplicationOnSourceDbIfNeeded(LogicalReplicationOnSourceServer.TRUE).apply(); } } ``` -### PrivateLinkResources_ListByServer +### NameAvailability_CheckGlobally ```java +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; + /** - * Samples for Servers Start. + * Samples for NameAvailability CheckGlobally. */ -public final class ServersStartSamples { +public final class NameAvailabilityCheckGloballySamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerStart.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * NameAvailabilityCheckGlobally.json */ /** - * Sample code: ServerStart. + * Sample code: Check the validity and availability of the given name, to assign it to a new server or to use it as + * the base name of a new pair of virtual endpoints. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverStart(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().start("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void + checkTheValidityAndAvailabilityOfTheGivenNameToAssignItToANewServerOrToUseItAsTheBaseNameOfANewPairOfVirtualEndpoints( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.nameAvailabilities() + .checkGloballyWithResponse(new CheckNameAvailabilityRequest().withName("exampleserver") + .withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE); } } ``` -### QuotaUsages_List +### NameAvailability_CheckWithLocation ```java +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; + /** - * Samples for VirtualEndpoints Get. + * Samples for NameAvailability CheckWithLocation. */ -public final class VirtualEndpointsGetSamples { +public final class NameAvailabilityCheckWithLocationSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * VirtualEndpointsGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * NameAvailabilityCheckWithLocation.json */ /** - * Sample code: Get a virtual endpoint. + * Sample code: Check the validity and availability of the given name, in the given location, to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. * * @param manager Entry point to PostgreSqlManager. */ public static void - getAVirtualEndpoint(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.virtualEndpoints() - .getWithResponse("testrg", "pgtestsvc4", "pgVirtualEndpoint1", com.azure.core.util.Context.NONE); + checkTheValidityAndAvailabilityOfTheGivenNameInTheGivenLocationToAssignItToANewServerOrToUseItAsTheBaseNameOfANewPairOfVirtualEndpoints( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.nameAvailabilities() + .checkWithLocationWithResponse("eastus", new CheckNameAvailabilityRequest().withName("exampleserver") + .withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE); } } ``` -### Replicas_ListByServer +### Operations_List ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; -import java.util.Arrays; - /** - * Samples for VirtualEndpoints Create. + * Samples for Operations List. */ -public final class VirtualEndpointsCreateSamples { +public final class OperationsListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * VirtualEndpointCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/OperationsList. + * json */ /** - * Sample code: Create a new virtual endpoint for a flexible server. + * Sample code: List all available REST API operations. * * @param manager Entry point to PostgreSqlManager. */ - public static void createANewVirtualEndpointForAFlexibleServer( + public static void listAllAvailableRESTAPIOperations( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.virtualEndpoints() - .define("pgVirtualEndpoint1") - .withExistingFlexibleServer("testrg", "pgtestsvc4") - .withEndpointType(VirtualEndpointType.READ_WRITE) - .withMembers(Arrays.asList("testPrimary1")) - .create(); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` -### ResourceProvider_CheckMigrationNameAvailability +### PrivateDnsZoneSuffix_Get ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.CancelEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceDbEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResource; - /** - * Samples for Migrations Update. + * Samples for PrivateDnsZoneSuffix Get. */ -public final class MigrationsUpdateSamples { +public final class PrivateDnsZoneSuffixGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Cancel.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateDnsZoneSuffixGet.json */ /** - * Sample code: Cancel migration. + * Sample code: Get the private DNS suffix. * * @param manager Entry point to PostgreSqlManager. */ - public static void cancelMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - MigrationResource resource = manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withCancel(CancelEnum.TRUE).apply(); + public static void + getThePrivateDNSSuffix(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateDnsZoneSuffixes().getWithResponse(com.azure.core.util.Context.NONE); } +} +``` + +### PrivateEndpointConnections_Delete +```java +/** + * Samples for PrivateEndpointConnections Delete. + */ +public final class PrivateEndpointConnectionsDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Update.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateEndpointConnectionsDelete.json */ /** - * Sample code: Migrations_Update. + * Sample code: Delete a private endpoint connection. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsUpdate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - MigrationResource resource = manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withSetupLogicalReplicationOnSourceDbIfNeeded(LogicalReplicationOnSourceDbEnum.TRUE).apply(); + public static void + deleteAPrivateEndpointConnection(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateEndpointConnections() + .delete("exampleresourcegroup", "exampleserver", + "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", + com.azure.core.util.Context.NONE); } } ``` -### ServerCapabilities_List +### PrivateEndpointConnections_Get ```java -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionState; - /** - * Samples for PrivateEndpointConnectionOperation Update. + * Samples for PrivateEndpointConnections Get. */ -public final class PrivateEndpointConnectionOperationUpdateSamples { +public final class PrivateEndpointConnectionsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateEndpointConnectionUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateEndpointConnectionsGet.json */ /** - * Sample code: Approve or reject a private endpoint connection with a given name. + * Sample code: Get a private endpoint connection. * * @param manager Entry point to PostgreSqlManager. */ - public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateEndpointConnectionOperations() - .update("Default", "test-svr", "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", - new PrivateEndpointConnectionInner().withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Approved by johndoe@contoso.com")), + public static void + getAPrivateEndpointConnection(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateEndpointConnections() + .getWithResponse("exampleresourcegroup", "exampleserver", + "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", + com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_ListByServer + +```java +/** + * Samples for PrivateEndpointConnections ListByServer. + */ +public final class PrivateEndpointConnectionsListByServerSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateEndpointConnectionsList.json + */ + /** + * Sample code: List all private endpoint connections on a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listAllPrivateEndpointConnectionsOnAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateEndpointConnections() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Update + +```java +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionState; + +/** + * Samples for PrivateEndpointConnections Update. + */ +public final class PrivateEndpointConnectionsUpdateSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateEndpointConnectionsUpdate.json + */ + /** + * Sample code: Approve or reject a private endpoint connection. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void approveOrRejectAPrivateEndpointConnection( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateEndpointConnections() + .update("exampleresourcegroup", "exampleserver", + "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", + new PrivateEndpointConnectionInner().withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("Approved by johndoe@contoso.com")), + com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateLinkResources_Get + +```java +/** + * Samples for PrivateLinkResources Get. + */ +public final class PrivateLinkResourcesGetSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateLinkResourcesGet.json + */ + /** + * Sample code: Gets a private link resource for PostgreSQL. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void getsAPrivateLinkResourceForPostgreSQL( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateLinkResources() + .getWithResponse("exampleresourcegroup", "exampleserver", "exampleprivatelink", com.azure.core.util.Context.NONE); } } ``` -### ServerThreatProtectionSettings_CreateOrUpdate +### PrivateLinkResources_ListByServer + +```java +/** + * Samples for PrivateLinkResources ListByServer. + */ +public final class PrivateLinkResourcesListByServerSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateLinkResourcesList.json + */ + /** + * Sample code: Gets private link resources for PostgreSQL. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void getsPrivateLinkResourcesForPostgreSQL( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateLinkResources() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} +``` + +### QuotaUsages_List + +```java +/** + * Samples for QuotaUsages List. + */ +public final class QuotaUsagesListSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * QuotaUsagesForFlexibleServers.json + */ + /** + * Sample code: List of quota usages for servers. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + listOfQuotaUsagesForServers(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.quotaUsages().list("eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### Replicas_ListByServer + +```java +/** + * Samples for Replicas ListByServer. + */ +public final class ReplicasListByServerSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ReplicasListByServer.json + */ + /** + * Sample code: List all read replicas of a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + listAllReadReplicasOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.replicas().listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} +``` + +### Servers_CreateOrUpdate ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAuthEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ArmServerKeyType; import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTiers; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTier; import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; import com.azure.resourcemanager.postgresqlflexibleserver.models.Cluster; import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateMode; import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption; -import com.azure.resourcemanager.postgresqlflexibleserver.models.GeoRedundantBackupEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryptionType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackup; import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode; import com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MicrosoftEntraAuth; import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordAuthEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordBasedAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerPublicNetworkAccessState; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; @@ -1435,138 +1682,140 @@ import java.util.HashMap; import java.util.Map; /** - * Samples for Servers Create. + * Samples for Servers CreateOrUpdate. */ -public final class ServersCreateSamples { +public final class ServersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateWithDataEncryptionEnabled.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateReviveDropped.json */ /** - * Sample code: ServerCreateWithDataEncryptionEnabled. + * Sample code: Create a new server using a backup of a server that was deleted or dropped recently. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverCreateWithDataEncryptionEnabled( + public static void createANewServerUsingABackupOfAServerThatWasDeletedOrDroppedRecently( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers() - .define("pgtestsvc4") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) - .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity", - new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) - .withAdministratorLogin("login") - .withAdministratorLoginPassword("Password1") - .withVersion(ServerVersion.ONE_SIX) - .withStorage(new Storage().withStorageSizeGB(512) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P20)) - .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") - .withPrimaryUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity") - .withGeoBackupKeyUri("fakeTokenPlaceholder") - .withGeoBackupUserAssignedIdentityId("") - .withType(ArmServerKeyType.AZURE_KEY_VAULT)) - .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED)) - .withNetwork(new Network().withDelegatedSubnetResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet") - .withPrivateDnsZoneArmResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) - .withAvailabilityZone("1") - .withCreateMode(CreateMode.CREATE) + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSourceServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampledeletedserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:30:22.123456Z")) + .withCreateMode(CreateMode.REVIVE_DROPPED) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateReviveDropped.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateInMicrosoftOwnedVirtualNetworkWithZoneRedundantHighAvailability.json */ /** - * Sample code: ServerCreateReviveDropped. + * Sample code: Create a new server in Microsoft owned virtual network with zone redundant high availability. * * @param manager Entry point to PostgreSqlManager. */ - public static void - serverCreateReviveDropped(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void createANewServerInMicrosoftOwnedVirtualNetworkWithZoneRedundantHighAvailability( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers() - .define("pgtestsvc5-rev") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withSourceServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc5") - .withPointInTimeUtc(OffsetDateTime.parse("2023-04-27T00:04:59.4078005+00:00")) - .withCreateMode(CreateMode.REVIVE_DROPPED) + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withTags(mapOf("InCustomerVnet", "false", "InMicrosoftVnet", "true")) + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.ENABLED)) + .withNetwork(new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.ENABLED)) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) + .withAvailabilityZone("1") + .withCreateMode(CreateMode.CREATE) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateGeoRestoreWithDataEncryptionEnabled.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateGeoRestoreWithDataEncryptionEnabledAutoUpdate.json */ /** - * Sample code: Create a database as a geo-restore in geo-paired location. + * Sample code: Create a new server using a restore of a geographically redundant backup of an existing server, with + * data encryption based on customer managed key with automatic key version update. * * @param manager Entry point to PostgreSqlManager. */ - public static void createADatabaseAsAGeoRestoreInGeoPairedLocation( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + createANewServerUsingARestoreOfAGeographicallyRedundantBackupOfAnExistingServerWithDataEncryptionBasedOnCustomerManagedKeyWithAutomaticKeyVersionUpdate( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers() - .define("pgtestsvc5geo") + .define("exampleserver") .withRegion("eastus") - .withExistingResourceGroup("testrg") + .withExistingResourceGroup("exampleresourcegroup") .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity", + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity", new UserIdentity(), - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity", + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") .withPrimaryUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity") + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") .withGeoBackupKeyUri("fakeTokenPlaceholder") .withGeoBackupUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity") - .withType(ArmServerKeyType.AZURE_KEY_VAULT)) + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) .withSourceServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/sourcepgservername") - .withPointInTimeUtc(OffsetDateTime.parse("2021-06-27T00:04:59.4078005+00:00")) + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:35:22.123456Z")) .withCreateMode(CreateMode.GEO_RESTORE) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateWithDataEncryptionEnabled.json */ /** - * Sample code: Create a new server. + * Sample code: Create a new server with data encryption based on customer managed key. * * @param manager Entry point to PostgreSqlManager. */ - public static void createANewServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void createANewServerWithDataEncryptionBasedOnCustomerManagedKey( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers() - .define("testpgflex") + .define("exampleserver") .withRegion("eastus") - .withExistingResourceGroup("testrg") - .withTags(mapOf("VNetServer", "1")) + .withExistingResourceGroup("exampleresourcegroup") .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLogin("login") - .withAdministratorLoginPassword("Password1") - .withVersion(ServerVersion.ONE_SIX) + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) .withStorage(new Storage().withStorageSizeGB(512) .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P20)) - .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.ENABLED)) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId("") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) .withNetwork(new Network().withDelegatedSubnetResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-subnet") + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") .withPrivateDnsZoneArmResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/privateDnsZones/testpgflex.private.postgres.database")) + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) .withAvailabilityZone("1") .withCreateMode(CreateMode.CREATE) @@ -1575,237 +1824,260 @@ public final class ServersCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateWithMicrosoftEntraEnabled.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateGeoRestoreWithDataEncryptionEnabled.json */ /** - * Sample code: Create a new server with Microsoft Entra authentication enabled. + * Sample code: Create a new server using a restore of a geographically redundant backup of an existing server, with + * data encryption based on customer managed key. * * @param manager Entry point to PostgreSqlManager. */ - public static void createANewServerWithMicrosoftEntraAuthenticationEnabled( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + createANewServerUsingARestoreOfAGeographicallyRedundantBackupOfAnExistingServerWithDataEncryptionBasedOnCustomerManagedKey( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers() - .define("pgtestsvc4") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withTags(mapOf("ElasticServer", "1")) - .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLogin("login") - .withAdministratorLoginPassword("Password1") - .withVersion(ServerVersion.ONE_SIX) - .withStorage(new Storage().withStorageSizeGB(512) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P20)) - .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(ActiveDirectoryAuthEnum.ENABLED) - .withPasswordAuth(PasswordAuthEnum.ENABLED) - .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) - .withDataEncryption(new DataEncryption().withType(ArmServerKeyType.SYSTEM_MANAGED)) - .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED)) - .withNetwork(new Network().withDelegatedSubnetResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet") - .withPrivateDnsZoneArmResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) - .withAvailabilityZone("1") - .withCreateMode(CreateMode.CREATE) + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity", + new UserIdentity(), + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withSourceServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:35:22.123456Z")) + .withCreateMode(CreateMode.GEO_RESTORE) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateReplica.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateReplica.json */ /** - * Sample code: ServerCreateReplica. + * Sample code: Create a read replica of an existing server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - serverCreateReplica(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void createAReadReplicaOfAnExistingServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers() - .define("pgtestsvc5rep") - .withRegion("westus") - .withExistingResourceGroup("testrg") + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity", + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") .withPrimaryUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity") + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") .withGeoBackupKeyUri("fakeTokenPlaceholder") .withGeoBackupUserAssignedIdentityId("") - .withType(ArmServerKeyType.AZURE_KEY_VAULT)) + .withType(DataEncryptionType.AZURE_KEY_VAULT)) .withSourceServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/sourcepgservername") - .withPointInTimeUtc(OffsetDateTime.parse("2021-06-27T00:04:59.4078005+00:00")) + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:35:22.123456Z")) .withCreateMode(CreateMode.REPLICA) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ClusterCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateInYourOwnVirtualNetworkWithSameZoneHighAvailability.json */ /** - * Sample code: ClusterCreate. + * Sample code: Create a new server in your own virtual network with same zone high availability. * * @param manager Entry point to PostgreSqlManager. */ - public static void clusterCreate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void createANewServerInYourOwnVirtualNetworkWithSameZoneHighAvailability( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers() - .define("pgtestcluster") - .withRegion("westus") - .withExistingResourceGroup("testrg") + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withTags(mapOf("InCustomerVnet", "true", "InMicrosoftVnet", "false")) .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLogin("login") - .withAdministratorLoginPassword("Password1") - .withVersion(ServerVersion.ONE_SIX) - .withStorage(new Storage().withStorageSizeGB(256) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P15)) - .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED)) - .withNetwork(new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.DISABLED)) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.DISABLED)) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.ENABLED)) + .withNetwork(new Network().withDelegatedSubnetResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") + .withPrivateDnsZoneArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.private.postgres.database")) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.SAME_ZONE)) + .withAvailabilityZone("1") .withCreateMode(CreateMode.CREATE) - .withCluster(new Cluster().withClusterSize(2)) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreatePointInTimeRestore.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersClusterCreate.json */ /** - * Sample code: Create a database as a point in time restore. + * Sample code: Create a new elastic cluster. * * @param manager Entry point to PostgreSqlManager. */ - public static void createADatabaseAsAPointInTimeRestore( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + createANewElasticCluster(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers() - .define("pgtestsvc5") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withSourceServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/sourcepgservername") - .withPointInTimeUtc(OffsetDateTime.parse("2021-06-27T00:04:59.4078005+00:00")) - .withCreateMode(CreateMode.POINT_IN_TIME_RESTORE) + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLogin("examplelogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SIX) + .withStorage(new Storage().withStorageSizeGB(256) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P15)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) + .withNetwork(new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.DISABLED)) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.fromString("Disabled"))) + .withCreateMode(CreateMode.CREATE) + .withCluster(new Cluster().withClusterSize(2).withDefaultDatabaseName("clusterdb")) .create(); } - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### ServerThreatProtectionSettings_Get - -```java -/** - * Samples for PrivateLinkResources Get. - */ -public final class PrivateLinkResourcesGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateLinkResourcesGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreatePointInTimeRestore.json */ /** - * Sample code: Gets a private link resource for PostgreSQL. + * Sample code: Create a new server using a point in time restore of a backup of an existing server. * * @param manager Entry point to PostgreSqlManager. */ - public static void getsAPrivateLinkResourceForPostgreSQL( + public static void createANewServerUsingAPointInTimeRestoreOfABackupOfAnExistingServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateLinkResources().getWithResponse("Default", "test-svr", "plr", com.azure.core.util.Context.NONE); + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSourceServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:35:22.123456Z")) + .withCreateMode(CreateMode.POINT_IN_TIME_RESTORE) + .create(); } -} -``` - -### ServerThreatProtectionSettings_ListByServer -```java -/** - * Samples for Servers List. - */ -public final class ServersListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerList.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateWithMicrosoftEntraEnabledInYourOwnVirtualNetworkWithoutHighAvailability.json */ /** - * Sample code: ServerList. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void serverList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().list(com.azure.core.util.Context.NONE); - } -} -``` - -### Servers_Create - -```java -/** - * Samples for Servers GetByResourceGroup. - */ -public final class ServersGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerGetWithPrivateEndpoints.json - */ - /** - * Sample code: ServerGetWithPrivateEndpoints. + * Sample code: Create a new server with Microsoft Entra authentication enabled in your own virtual network and + * without high availability. * * @param manager Entry point to PostgreSqlManager. */ public static void - serverGetWithPrivateEndpoints(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().getByResourceGroupWithResponse("testrg", "pgtestsvc2", com.azure.core.util.Context.NONE); + createANewServerWithMicrosoftEntraAuthenticationEnabledInYourOwnVirtualNetworkAndWithoutHighAvailability( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(MicrosoftEntraAuth.ENABLED) + .withPasswordAuth(PasswordBasedAuth.ENABLED) + .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) + .withDataEncryption(new DataEncryption().withType(DataEncryptionType.SYSTEM_MANAGED)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) + .withNetwork(new Network().withDelegatedSubnetResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") + .withPrivateDnsZoneArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.fromString("Disabled"))) + .withAvailabilityZone("1") + .withCreateMode(CreateMode.CREATE) + .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ServerGet - * .json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateWithDataEncryptionEnabledAutoUpdate.json */ /** - * Sample code: ServerGet. + * Sample code: Create a new server with data encryption based on customer managed key with automatic key version + * update. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().getByResourceGroupWithResponse("testrg", "testpgflex", com.azure.core.util.Context.NONE); + public static void createANewServerWithDataEncryptionBasedOnCustomerManagedKeyWithAutomaticKeyVersionUpdate( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId("") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) + .withNetwork(new Network().withDelegatedSubnetResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") + .withPrivateDnsZoneArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) + .withAvailabilityZone("1") + .withCreateMode(CreateMode.CREATE) + .create(); } - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerGetWithVnet.json - */ - /** - * Sample code: ServerGetWithVnet. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void serverGetWithVnet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().getByResourceGroupWithResponse("testrg", "testpgflex", com.azure.core.util.Context.NONE); + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` @@ -1813,536 +2085,242 @@ public final class ServersGetByResourceGroupSamples { ### Servers_Delete ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - /** - * Samples for TuningOptions Get. + * Samples for Servers Delete. */ -public final class TuningOptionsGetSamples { +public final class ServersDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Tuning_GetTuningOption.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersDelete.json */ /** - * Sample code: TuningOptions_Get. + * Sample code: Delete or drop an existing server. * * @param manager Entry point to PostgreSqlManager. */ - public static void tuningOptionsGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningOptions() - .getWithResponse("testrg", "testserver", TuningOptionEnum.INDEX, com.azure.core.util.Context.NONE); + public static void + deleteOrDropAnExistingServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().delete("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` ### Servers_GetByResourceGroup -```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; - -/** - * Samples for CheckNameAvailability Execute. - */ -public final class CheckNameAvailabilityExecuteSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * CheckNameAvailability.json - */ - /** - * Sample code: NameAvailability. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void nameAvailability(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.checkNameAvailabilities() - .executeWithResponse(new CheckNameAvailabilityRequest().withName("name1") - .withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE); - } -} -``` - -### Servers_List - ```java /** - * Samples for Servers Stop. - */ -public final class ServersStopSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerStop.json - */ - /** - * Sample code: ServerStop. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void serverStop(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().stop("testrg", "testserver", com.azure.core.util.Context.NONE); - } -} -``` - -### Servers_ListByResourceGroup - -```java -/** - * Samples for Databases ListByServer. + * Samples for Servers GetByResourceGroup. */ -public final class DatabasesListByServerSamples { +public final class ServersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * DatabasesListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersGetWithPrivateEndpoints.json */ /** - * Sample code: List databases in a server. + * Sample code: Get information about an existing server that isn't integrated into a virtual network provided by + * customer and has private endpoint connections. * * @param manager Entry point to PostgreSqlManager. */ public static void - listDatabasesInAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.databases().listByServer("TestGroup", "testserver", com.azure.core.util.Context.NONE); - } -} -``` - -### Servers_Restart - -```java -/** - * Samples for Administrators Get. - */ -public final class AdministratorsGetSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * AdministratorGet.json - */ - /** - * Sample code: ServerGet. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void serverGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.administrators() - .getWithResponse("testrg", "pgtestsvc1", "oooooooo-oooo-oooo-oooo-oooooooooooo", - com.azure.core.util.Context.NONE); - } -} -``` - -### Servers_Start - -```java -/** - * Samples for Configurations Get. - */ -public final class ConfigurationsGetSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ConfigurationGet.json - */ - /** - * Sample code: ConfigurationGet. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void configurationGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.configurations() - .getWithResponse("testrg", "testserver", "array_nulls", com.azure.core.util.Context.NONE); + getInformationAboutAnExistingServerThatIsnTIntegratedIntoAVirtualNetworkProvidedByCustomerAndHasPrivateEndpointConnections( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } -} -``` -### Servers_Stop - -```java -/** - * Samples for ServerThreatProtectionSettings ListByServer. - */ -public final class ServerThreatProtectionSettingsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerThreatProtectionSettingsListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersGetWithVnet + * .json */ /** - * Sample code: Get a server's Advanced Threat Protection settings. + * Sample code: Get information about an existing server that is integrated into a virtual network provided by + * customer. * * @param manager Entry point to PostgreSqlManager. */ - public static void getAServerSAdvancedThreatProtectionSettings( + public static void getInformationAboutAnExistingServerThatIsIntegratedIntoAVirtualNetworkProvidedByCustomer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.serverThreatProtectionSettings() - .listByServer("threatprotection-6852", "threatprotection-2080", com.azure.core.util.Context.NONE); - } -} -``` - -### Servers_Update - -```java -/** - * Samples for ServerCapabilities List. - */ -public final class ServerCapabilitiesListSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCapabilities.json - */ - /** - * Sample code: ServerCapabilitiesList. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - serverCapabilitiesList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.serverCapabilities().list("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE); - } -} -``` - -### TuningConfiguration_Disable - -```java -/** - * Samples for Backups Delete. - */ -public final class BackupsDeleteSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * BackupDelete.json - */ - /** - * Sample code: Delete a specific backup. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - deleteASpecificBackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.backups().delete("TestGroup", "testserver", "backup_20250303T160516", com.azure.core.util.Context.NONE); + manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } -} -``` - -### TuningConfiguration_Enable -```java -/** - * Samples for FirewallRules CreateOrUpdate. - */ -public final class FirewallRulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * FirewallRuleCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersGet.json */ /** - * Sample code: FirewallRuleCreate. + * Sample code: Get information about an existing server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - firewallRuleCreate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.firewallRules() - .define("rule1") - .withExistingFlexibleServer("testrg", "testserver") - .withStartIpAddress("0.0.0.0") - .withEndIpAddress("255.255.255.255") - .create(); + public static void getInformationAboutAnExistingServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### TuningConfiguration_ListSessionDetails +### Servers_List ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.AdminCredentials; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationOption; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParameters; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDbsInTargetEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SourceType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SslMode; -import java.util.Arrays; - /** - * Samples for Migrations Create. + * Samples for Servers List. */ -public final class MigrationsCreateSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_With_PrivateEndpoint_Servers.json - */ - /** - * Sample code: Migrations Create with private endpoint. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void migrationsCreateWithPrivateEndpoint( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") - .withMigrationInstanceResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testsourcemigration") - .withMigrationMode(MigrationMode.OFFLINE) - .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") - .withSecretParameters(new MigrationSecretParameters() - .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_With_Roles.json - */ - /** - * Sample code: Migrations Create with roles. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - migrationsCreateWithRoles(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") - .withMigrationMode(MigrationMode.OFFLINE) - .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") - .withSecretParameters(new MigrationSecretParameters() - .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) - .withMigrateRoles(MigrateRolesEnum.TRUE) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_With_FullyQualifiedDomainName.json - */ - /** - * Sample code: Migrations Create with fully qualified domain name. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void migrationsCreateWithFullyQualifiedDomainName( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") - .withMigrationMode(MigrationMode.OFFLINE) - .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") - .withSourceDbServerFullyQualifiedDomainName("testsourcefqdn.example.com") - .withTargetDbServerFullyQualifiedDomainName("test-target-fqdn.example.com") - .withSecretParameters(new MigrationSecretParameters() - .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) - .create(); - } - +public final class ServersListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_Validate_Only.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersListBySubscription.json */ /** - * Sample code: Create Pre-migration Validation. + * Sample code: List all servers in a subscription. * * @param manager Entry point to PostgreSqlManager. */ - public static void - createPreMigrationValidation(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") - .withMigrationMode(MigrationMode.OFFLINE) - .withMigrationOption(MigrationOption.VALIDATE) - .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") - .withSecretParameters(new MigrationSecretParameters() - .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) - .create(); + public static void + listAllServersInASubscription(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().list(com.azure.core.util.Context.NONE); } +} +``` +### Servers_ListByResourceGroup + +```java +/** + * Samples for Servers ListByResourceGroup. + */ +public final class ServersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_With_Other_Users.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersListByResourceGroup.json */ /** - * Sample code: Migrations Create by passing user names. + * Sample code: List all servers in a resource group. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsCreateByPassingUserNames( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") - .withMigrationMode(MigrationMode.OFFLINE) - .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") - .withSecretParameters(new MigrationSecretParameters() - .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder")) - .withSourceServerUsername("newadmin@testsource") - .withTargetServerUsername("targetadmin")) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .create(); + public static void + listAllServersInAResourceGroup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().listByResourceGroup("exampleresourcegroup", com.azure.core.util.Context.NONE); } +} +``` + +### Servers_Restart + +```java +import com.azure.resourcemanager.postgresqlflexibleserver.models.FailoverMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter; +/** + * Samples for Servers Restart. + */ +public final class ServersRestartSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersRestartWithFailover.json */ /** - * Sample code: Migrations_Create. + * Sample code: Restart PostgreSQL database engine in a server with a forced failover to standby server. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsCreate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") - .withMigrationMode(MigrationMode.OFFLINE) - .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") - .withSecretParameters(new MigrationSecretParameters() - .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) - .create(); + public static void restartPostgreSQLDatabaseEngineInAServerWithAForcedFailoverToStandbyServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .restart("exampleresourcegroup", "exampleserver", + new RestartParameter().withRestartWithFailover(true).withFailoverMode(FailoverMode.FORCED_FAILOVER), + com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_Other_SourceTypes_Validate_Migrate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersRestart. + * json */ /** - * Sample code: Create Migration with other source types for Validate and Migrate. + * Sample code: Restart PostgreSQL database engine in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void createMigrationWithOtherSourceTypesForValidateAndMigrate( + public static void restartPostgreSQLDatabaseEngineInAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") - .withMigrationMode(MigrationMode.OFFLINE) - .withMigrationOption(MigrationOption.VALIDATE_AND_MIGRATE) - .withSourceType(SourceType.ON_PREMISES) - .withSslMode(SslMode.PREFER) - .withSourceDbServerResourceId("testsource:5432@pguser") - .withSecretParameters(new MigrationSecretParameters() - .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) - .create(); + manager.servers().restart("exampleresourcegroup", "exampleserver", null, com.azure.core.util.Context.NONE); } } ``` -### TuningConfiguration_ListSessions +### Servers_Start ```java /** - * Samples for FirewallRules Delete. + * Samples for Servers Start. */ -public final class FirewallRulesDeleteSamples { +public final class ServersStartSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * FirewallRuleDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersStart.json */ /** - * Sample code: FirewallRuleDelete. + * Sample code: Start a stopped server. * * @param manager Entry point to PostgreSqlManager. */ public static void - firewallRuleDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.firewallRules().delete("testrg", "testserver", "rule1", com.azure.core.util.Context.NONE); + startAStoppedServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().start("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### TuningConfiguration_StartSession +### Servers_Stop ```java /** - * Samples for FirewallRules ListByServer. + * Samples for Servers Stop. */ -public final class FirewallRulesListByServerSamples { +public final class ServersStopSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * FirewallRuleListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersStop.json */ /** - * Sample code: FirewallRuleList. + * Sample code: Stop a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void firewallRuleList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.firewallRules().listByServer("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void stopAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().stop("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### TuningConfiguration_StopSession +### Servers_Update ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAuthEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ArmServerKeyType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTiers; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForUpdate; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfigForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTier; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryptionType; import com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordAuthEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindowForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MicrosoftEntraAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordBasedAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.ReadReplicaPromoteMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ReadReplicaPromoteOption; import com.azure.resourcemanager.postgresqlflexibleserver.models.Replica; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationPromoteOption; import com.azure.resourcemanager.postgresqlflexibleserver.models.Server; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrow; @@ -2357,223 +2335,264 @@ import java.util.Map; public final class ServersUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdateWithDataEncryptionEnabled.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersPromoteReplicaAsForcedSwitchover.json */ /** - * Sample code: ServerUpdateWithDataEncryptionEnabled. + * Sample code: Switch over a read replica to primary server with forced data synchronization. Meaning that it + * doesn't wait for data in the read replica to be synchronized with its source server before it initiates the + * switching of roles between the read replica and the primary server. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdateWithDataEncryptionEnabled( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + switchOverAReadReplicaToPrimaryServerWithForcedDataSynchronizationMeaningThatItDoesnTWaitForDataInTheReadReplicaToBeSynchronizedWithItsSourceServerBeforeItInitiatesTheSwitchingOfRolesBetweenTheReadReplicaAndThePrimaryServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("TestGroup", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withSku(new Sku().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) - .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity", - new UserIdentity(), - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity", - new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) - .withAdministratorLoginPassword("newpassword") - .withBackup(new Backup().withBackupRetentionDays(20)) - .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") - .withPrimaryUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity") - .withGeoBackupKeyUri("fakeTokenPlaceholder") - .withGeoBackupUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity") - .withType(ArmServerKeyType.AZURE_KEY_VAULT)) - .withCreateMode(CreateModeForUpdate.UPDATE) + .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.SWITCHOVER) + .withPromoteOption(ReadReplicaPromoteOption.FORCED)) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PromoteReplicaAsPlannedSwitchover.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersPromoteReplicaAsPlannedSwitchover.json */ /** - * Sample code: SwitchOver a replica server as planned, i.e. it will wait for replication to complete before - * promoting replica as Primary and original primary as replica. + * Sample code: Switch over a read replica to primary server with planned data synchronization. Meaning that it + * waits for data in the read replica to be fully synchronized with its source server before it initiates the + * switching of roles between the read replica and the primary server. * * @param manager Entry point to PostgreSqlManager. */ public static void - switchOverAReplicaServerAsPlannedIEItWillWaitForReplicationToCompleteBeforePromotingReplicaAsPrimaryAndOriginalPrimaryAsReplica( + switchOverAReadReplicaToPrimaryServerWithPlannedDataSynchronizationMeaningThatItWaitsForDataInTheReadReplicaToBeFullySynchronizedWithItsSourceServerBeforeItInitiatesTheSwitchingOfRolesBetweenTheReadReplicaAndThePrimaryServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.SWITCHOVER) - .withPromoteOption(ReplicationPromoteOption.PLANNED)) + .withPromoteOption(ReadReplicaPromoteOption.PLANNED)) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PromoteReplicaAsForcedSwitchover.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithMicrosoftEntraEnabled.json */ /** - * Sample code: SwitchOver a replica server as forced, i.e. it will replica as Primary and original primary as - * replica immediately without waiting for primary and replica to be in sync. + * Sample code: Update an existing server with Microsoft Entra authentication enabled. * * @param manager Entry point to PostgreSqlManager. */ - public static void - switchOverAReplicaServerAsForcedIEItWillReplicaAsPrimaryAndOriginalPrimaryAsReplicaImmediatelyWithoutWaitingForPrimaryAndReplicaToBeInSync( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void updateAnExistingServerWithMicrosoftEntraAuthenticationEnabled( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.SWITCHOVER) - .withPromoteOption(ReplicationPromoteOption.FORCED)) + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLoginPassword("examplenewpassword") + .withStorage(new Storage().withStorageSizeGB(1024) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P30)) + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withAuthConfig(new AuthConfigForPatch().withActiveDirectoryAuth(MicrosoftEntraAuth.ENABLED) + .withPasswordAuth(PasswordBasedAuth.ENABLED) + .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) + .withCreateMode(CreateModeForPatch.UPDATE) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithDataEncryptionEnabledAutoUpdate.json */ /** - * Sample code: ServerUpdate. + * Sample code: Update an existing server with data encryption based on customer managed key with automatic key + * version update. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void updateAnExistingServerWithDataEncryptionBasedOnCustomerManagedKeyWithAutomaticKeyVersionUpdate( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("TestGroup", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withSku(new Sku().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLoginPassword("newpassword") - .withStorage(new Storage().withStorageSizeGB(1024) - .withAutoGrow(StorageAutoGrow.ENABLED) - .withTier(AzureManagedDiskPerformanceTiers.P30)) - .withBackup(new Backup().withBackupRetentionDays(20)) - .withCreateMode(CreateModeForUpdate.UPDATE) + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity", + new UserIdentity(), + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withAdministratorLoginPassword("examplenewpassword") + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withCreateMode(CreateModeForPatch.UPDATE) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdateWithMajorVersionUpgrade.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithMajorVersionUpgrade.json */ /** - * Sample code: ServerUpdateWithMajorVersionUpgrade. + * Sample code: Update an existing server to upgrade the major version of PostgreSQL database engine. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdateWithMajorVersionUpgrade( + public static void updateAnExistingServerToUpgradeTheMajorVersionOfPostgreSQLDatabaseEngine( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withVersion(ServerVersion.ONE_SIX).withCreateMode(CreateModeForUpdate.UPDATE).apply(); + resource.update().withVersion(PostgresMajorVersion.ONE_SEVEN).withCreateMode(CreateModeForPatch.UPDATE).apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdateWithCustomerMaintenanceWindow.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithCustomMaintenanceWindow.json */ /** - * Sample code: ServerUpdateWithCustomerMaintenanceWindow. + * Sample code: Update an existing server with custom maintenance window. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdateWithCustomerMaintenanceWindow( + public static void updateAnExistingServerWithCustomMaintenanceWindow( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withMaintenanceWindow(new MaintenanceWindow().withCustomWindow("Enabled") + .withMaintenanceWindow(new MaintenanceWindowForPatch().withCustomWindow("Enabled") .withStartHour(8) .withStartMinute(0) .withDayOfWeek(0)) - .withCreateMode(CreateModeForUpdate.UPDATE) + .withCreateMode(CreateModeForPatch.UPDATE) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdateWithMicrosoftEntraEnabled.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithDataEncryptionEnabled.json */ /** - * Sample code: ServerUpdateWithMicrosoftEntraEnabled. + * Sample code: Update an existing server with data encryption based on customer managed key. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdateWithMicrosoftEntraEnabled( + public static void updateAnExistingServerWithDataEncryptionBasedOnCustomerManagedKey( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("TestGroup", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity", + new UserIdentity(), + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withAdministratorLoginPassword("examplenewpassword") + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withCreateMode(CreateModeForPatch.UPDATE) + .apply(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersUpdate.json + */ + /** + * Sample code: Update an existing server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + updateAnExistingServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + Server resource = manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withSku(new Sku().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLoginPassword("newpassword") + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLoginPassword("examplenewpassword") .withStorage(new Storage().withStorageSizeGB(1024) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P30)) - .withBackup(new Backup().withBackupRetentionDays(20)) - .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(ActiveDirectoryAuthEnum.ENABLED) - .withPasswordAuth(PasswordAuthEnum.ENABLED) - .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) - .withCreateMode(CreateModeForUpdate.UPDATE) + .withAutoGrow(StorageAutoGrow.ENABLED) + .withTier(AzureManagedDiskPerformanceTier.P30)) + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withCreateMode(CreateModeForPatch.UPDATE) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PromoteReplicaAsForcedStandaloneServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersPromoteReplicaAsForcedStandaloneServer.json */ /** - * Sample code: Promote a replica server as a Standalone server as forced, i.e. it will promote a replica server - * immediately without waiting for primary and replica to be in sync. + * Sample code: Promote a read replica to a standalone server with forced data synchronization. Meaning that it + * doesn't wait for data in the read replica to be synchronized with its source server before it initiates the + * promotion to a standalone server. * * @param manager Entry point to PostgreSqlManager. */ public static void - promoteAReplicaServerAsAStandaloneServerAsForcedIEItWillPromoteAReplicaServerImmediatelyWithoutWaitingForPrimaryAndReplicaToBeInSync( + promoteAReadReplicaToAStandaloneServerWithForcedDataSynchronizationMeaningThatItDoesnTWaitForDataInTheReadReplicaToBeSynchronizedWithItsSourceServerBeforeItInitiatesThePromotionToAStandaloneServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.STANDALONE) - .withPromoteOption(ReplicationPromoteOption.FORCED)) + .withPromoteOption(ReadReplicaPromoteOption.FORCED)) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PromoteReplicaAsPlannedStandaloneServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersPromoteReplicaAsPlannedStandaloneServer.json */ /** - * Sample code: Promote a replica server as a Standalone server as planned, i.e. it will wait for replication to - * complete. + * Sample code: Promote a read replica to a standalone server with planned data synchronization. Meaning that it + * waits for data in the read replica to be fully synchronized with its source server before it initiates the + * promotion to a standalone server. * * @param manager Entry point to PostgreSqlManager. */ - public static void promoteAReplicaServerAsAStandaloneServerAsPlannedIEItWillWaitForReplicationToComplete( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + promoteAReadReplicaToAStandaloneServerWithPlannedDataSynchronizationMeaningThatItWaitsForDataInTheReadReplicaToBeFullySynchronizedWithItsSourceServerBeforeItInitiatesThePromotionToAStandaloneServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.STANDALONE) - .withPromoteOption(ReplicationPromoteOption.PLANNED)) + .withPromoteOption(ReadReplicaPromoteOption.PLANNED)) .apply(); } @@ -2591,305 +2610,306 @@ public final class ServersUpdateSamples { } ``` -### TuningIndex_ListRecommendations +### TuningOptionsOperation_Get ```java +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; + /** - * Samples for Migrations Delete. + * Samples for TuningOptionsOperation Get. */ -public final class MigrationsDeleteSamples { +public final class TuningOptionsOperationGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Delete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/TuningOptionsGet. + * json */ /** - * Sample code: Migrations_Delete. + * Sample code: Get the tuning options of a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .deleteWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", + public static void + getTheTuningOptionsOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .getWithResponse("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.INDEX, com.azure.core.util.Context.NONE); } } ``` -### TuningOptions_Get +### TuningOptionsOperation_ListByServer ```java /** - * Samples for Configurations Put. + * Samples for TuningOptionsOperation ListByServer. */ -public final class ConfigurationsPutSamples { +public final class TuningOptionsOperationListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ConfigurationUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListByServer.json */ /** - * Sample code: Update a user configuration. + * Sample code: List the tuning options of a server. * * @param manager Entry point to PostgreSqlManager. */ public static void - updateAUserConfiguration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.configurations() - .define("constraint_exclusion") - .withExistingFlexibleServer("testrg", "testserver") - .withValue("on") - .withSource("user-override") - .create(); + listTheTuningOptionsOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### TuningOptions_ListByServer +### TuningOptionsOperation_ListRecommendations ```java -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; /** - * Samples for ResourceProvider CheckMigrationNameAvailability. + * Samples for TuningOptionsOperation ListRecommendations. */ -public final class ResourceProviderCheckMigrationNameAvailabilitySamples { +public final class TuningOptionsOperationListRecommendationsSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * CheckMigrationNameAvailability.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListIndexRecommendations.json */ /** - * Sample code: CheckMigrationNameAvailability. + * Sample code: List available index recommendations. * * @param manager Entry point to PostgreSqlManager. */ - public static void - checkMigrationNameAvailability(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.resourceProviders() - .checkMigrationNameAvailabilityWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - new MigrationNameAvailabilityResourceInner().withName("name1") - .withType("Microsoft.DBforPostgreSQL/flexibleServers/migrations"), + public static void listAvailableIndexRecommendations( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listRecommendations("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.INDEX, null, com.azure.core.util.Context.NONE); } -} -``` - -### VirtualEndpoints_Create -```java -/** - * Samples for GetPrivateDnsZoneSuffix Execute. - */ -public final class GetPrivateDnsZoneSuffixExecuteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * GetPrivateDnsZoneSuffix.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListTableRecommendations.json */ /** - * Sample code: GetPrivateDnsZoneSuffix. + * Sample code: List available table recommendations. * * @param manager Entry point to PostgreSqlManager. */ - public static void - getPrivateDnsZoneSuffix(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.getPrivateDnsZoneSuffixes().executeWithResponse(com.azure.core.util.Context.NONE); + public static void listAvailableTableRecommendations( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listRecommendations("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.TABLE, null, + com.azure.core.util.Context.NONE); } -} -``` - -### VirtualEndpoints_Delete -```java -/** - * Samples for Replicas ListByServer. - */ -public final class ReplicasListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ReplicasListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListIndexRecommendationsFilteredForCreateIndex.json */ /** - * Sample code: ReplicasListByServer. + * Sample code: List available index recommendations, filtered to exclusively get those of CREATE INDEX type. * * @param manager Entry point to PostgreSqlManager. */ - public static void - replicasListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.replicas().listByServer("testrg", "sourcepgservername", com.azure.core.util.Context.NONE); + public static void listAvailableIndexRecommendationsFilteredToExclusivelyGetThoseOfCREATEINDEXType( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listRecommendations("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.INDEX, + RecommendationTypeParameterEnum.CREATE_INDEX, com.azure.core.util.Context.NONE); } -} -``` - -### VirtualEndpoints_Get -```java -/** - * Samples for PrivateEndpointConnections ListByServer. - */ -public final class PrivateEndpointConnectionsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateEndpointConnectionList.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListTableRecommendationsFilteredForAnalyzeTable.json */ /** - * Sample code: Gets list of private endpoint connections on a server. + * Sample code: List available table recommendations, filtered to exclusively get those of ANALYZE TABLE type. * * @param manager Entry point to PostgreSqlManager. */ - public static void getsListOfPrivateEndpointConnectionsOnAServer( + public static void listAvailableTableRecommendationsFilteredToExclusivelyGetThoseOfANALYZETABLEType( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateEndpointConnections().listByServer("Default", "test-svr", com.azure.core.util.Context.NONE); + manager.tuningOptionsOperations() + .listRecommendations("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.TABLE, + RecommendationTypeParameterEnum.ANALYZE_TABLE, com.azure.core.util.Context.NONE); } } ``` -### VirtualEndpoints_ListByServer +### VirtualEndpoints_Create ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationListFilter; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; +import java.util.Arrays; /** - * Samples for Migrations ListByTargetServer. + * Samples for VirtualEndpoints Create. */ -public final class MigrationsListByTargetServerSamples { +public final class VirtualEndpointsCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_ListByTargetServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * VirtualEndpointCreate.json */ /** - * Sample code: Migrations_ListByTargetServer. + * Sample code: Create a pair of virtual endpoints for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - migrationsListByTargetServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .listByTargetServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", MigrationListFilter.ALL, - com.azure.core.util.Context.NONE); + public static void createAPairOfVirtualEndpointsForAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.virtualEndpoints() + .define("examplebasename") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withEndpointType(VirtualEndpointType.READ_WRITE) + .withMembers(Arrays.asList("exampleprimaryserver")) + .create(); } } ``` -### VirtualEndpoints_Update +### VirtualEndpoints_Delete ```java /** - * Samples for Migrations Get. + * Samples for VirtualEndpoints Delete. */ -public final class MigrationsGetSamples { +public final class VirtualEndpointsDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_GetMigrationWithSuccessfulValidationOnly.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * VirtualEndpointDelete.json */ /** - * Sample code: Migrations_GetMigrationWithSuccessfulValidationOnly. + * Sample code: Delete a pair of virtual endpoints. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGetMigrationWithSuccessfulValidationOnly( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - "testmigrationwithsuccessfulvalidationonly", com.azure.core.util.Context.NONE); + public static void + deleteAPairOfVirtualEndpoints(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.virtualEndpoints() + .delete("exampleresourcegroup", "exampleserver", "examplebasename", com.azure.core.util.Context.NONE); } +} +``` - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Get.json - */ - /** - * Sample code: Migrations_Get. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void migrationsGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", - com.azure.core.util.Context.NONE); - } +### VirtualEndpoints_Get +```java +/** + * Samples for VirtualEndpoints Get. + */ +public final class VirtualEndpointsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_GetMigrationWithSuccessfulValidationButMigrationFailure.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * VirtualEndpointsGet.json */ /** - * Sample code: Migrations_GetMigrationWithSuccessfulValidationButMigrationFailure. + * Sample code: Get information about a pair of virtual endpoints. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGetMigrationWithSuccessfulValidationButMigrationFailure( + public static void getInformationAboutAPairOfVirtualEndpoints( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - "testmigrationwithsuccessfulvalidationbutmigrationfailure", com.azure.core.util.Context.NONE); + manager.virtualEndpoints() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplebasename", + com.azure.core.util.Context.NONE); } +} +``` + +### VirtualEndpoints_ListByServer +```java +/** + * Samples for VirtualEndpoints ListByServer. + */ +public final class VirtualEndpointsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_GetMigrationWithSuccessfulValidationAndMigration.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * VirtualEndpointsListByServer.json */ /** - * Sample code: Migrations_GetMigrationWithSuccessfulValidationAndMigration. + * Sample code: List pair of virtual endpoints associated to a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGetMigrationWithSuccessfulValidationAndMigration( + public static void listPairOfVirtualEndpointsAssociatedToAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - "testmigrationwithsuccessfulvalidationandmigration", com.azure.core.util.Context.NONE); + manager.virtualEndpoints() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } +} +``` + +### VirtualEndpoints_Update +```java +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoint; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; +import java.util.Arrays; + +/** + * Samples for VirtualEndpoints Update. + */ +public final class VirtualEndpointsUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_GetMigrationWithValidationFailures.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * VirtualEndpointUpdate.json */ /** - * Sample code: Migrations_GetMigrationWithValidationFailures. + * Sample code: Update a pair of virtual endpoints for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGetMigrationWithValidationFailures( + public static void updateAPairOfVirtualEndpointsForAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - "testmigrationwithvalidationfailure", com.azure.core.util.Context.NONE); + VirtualEndpoint resource = manager.virtualEndpoints() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplebasename", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withEndpointType(VirtualEndpointType.READ_WRITE) + .withMembers(Arrays.asList("exampleprimaryserver")) + .apply(); } } ``` -### VirtualNetworkSubnetUsage_Execute +### VirtualNetworkSubnetUsage_List ```java +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; + /** - * Samples for PrivateEndpointConnections Get. + * Samples for VirtualNetworkSubnetUsage List. */ -public final class PrivateEndpointConnectionsGetSamples { +public final class VirtualNetworkSubnetUsageListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateEndpointConnectionGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * VirtualNetworkSubnetUsageList.json */ /** - * Sample code: Gets private endpoint connection. + * Sample code: List the virtual network subnet usage for a given virtual network. * * @param manager Entry point to PostgreSqlManager. */ - public static void - getsPrivateEndpointConnection(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateEndpointConnections() - .getWithResponse("Default", "test-svr", - "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", + public static void listTheVirtualNetworkSubnetUsageForAGivenVirtualNetwork( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.virtualNetworkSubnetUsages() + .listWithResponse("eastus", new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml index 366acde8e35e..e63275b2155a 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-postgresqlflexibleserver - 1.2.0-beta.2 + 2.0.0 jar Microsoft Azure SDK for PostgreSql Management - This package contains Microsoft Azure SDK for PostgreSql Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2025-01-01-preview. + This package contains Microsoft Azure SDK for PostgreSql Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2025-08-01. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,6 @@ UTF-8 0 0 - true diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManager.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManager.java index 36a70ec07269..0bfe67bdc205 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManager.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManager.java @@ -25,61 +25,51 @@ import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PostgreSqlManagementClient; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.AdministratorsImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.BackupsImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.CheckNameAvailabilitiesImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.CheckNameAvailabilityWithLocationsImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.AdministratorsMicrosoftEntrasImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.AdvancedThreatProtectionSettingsImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.BackupsAutomaticAndOnDemandsImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.BackupsLongTermRetentionsImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.CapabilitiesByLocationsImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.CapabilitiesByServersImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.CapturedLogsImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ConfigurationsImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.DatabasesImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.FirewallRulesImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.FlexibleServersImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.GetPrivateDnsZoneSuffixesImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.LocationBasedCapabilitiesImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.LogFilesImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.LtrBackupOperationsImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.MigrationsImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.NameAvailabilitiesImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.OperationsImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PostgreSqlManagementClientBuilder; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateEndpointConnectionOperationsImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateDnsZoneSuffixesImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateEndpointConnectionsImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateLinkResourcesImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.QuotaUsagesImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ReplicasImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ResourceProvidersImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerCapabilitiesImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerThreatProtectionSettingsImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServersImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.TuningConfigurationsImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.TuningIndexesImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.TuningOptionsImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.TuningOptionsOperationsImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.VirtualEndpointsImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.VirtualNetworkSubnetUsagesImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Administrators; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Backups; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilities; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityWithLocations; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorsMicrosoftEntras; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettings; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsAutomaticAndOnDemands; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentions; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilitiesByLocations; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilitiesByServers; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapturedLogs; import com.azure.resourcemanager.postgresqlflexibleserver.models.Configurations; import com.azure.resourcemanager.postgresqlflexibleserver.models.Databases; import com.azure.resourcemanager.postgresqlflexibleserver.models.FirewallRules; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServers; -import com.azure.resourcemanager.postgresqlflexibleserver.models.GetPrivateDnsZoneSuffixes; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LocationBasedCapabilities; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogFiles; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupOperations; import com.azure.resourcemanager.postgresqlflexibleserver.models.Migrations; +import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailabilities; import com.azure.resourcemanager.postgresqlflexibleserver.models.Operations; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnectionOperations; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateDnsZoneSuffixes; import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnections; import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkResources; import com.azure.resourcemanager.postgresqlflexibleserver.models.QuotaUsages; import com.azure.resourcemanager.postgresqlflexibleserver.models.Replicas; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ResourceProviders; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerCapabilities; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettings; import com.azure.resourcemanager.postgresqlflexibleserver.models.Servers; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningConfigurations; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningIndexes; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptions; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsOperations; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoints; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsages; import java.time.Duration; @@ -92,22 +82,24 @@ /** * Entry point to PostgreSqlManager. - * The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL - * resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and - * configurations with new business model. + * The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure + * PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, + * log files and configurations with new business model. */ public final class PostgreSqlManager { - private Administrators administrators; + private AdministratorsMicrosoftEntras administratorsMicrosoftEntras; - private Backups backups; + private AdvancedThreatProtectionSettings advancedThreatProtectionSettings; - private LocationBasedCapabilities locationBasedCapabilities; + private ServerThreatProtectionSettings serverThreatProtectionSettings; + + private BackupsAutomaticAndOnDemands backupsAutomaticAndOnDemands; - private ServerCapabilities serverCapabilities; + private CapabilitiesByLocations capabilitiesByLocations; - private CheckNameAvailabilities checkNameAvailabilities; + private CapabilitiesByServers capabilitiesByServers; - private CheckNameAvailabilityWithLocations checkNameAvailabilityWithLocations; + private CapturedLogs capturedLogs; private Configurations configurations; @@ -115,39 +107,27 @@ public final class PostgreSqlManager { private FirewallRules firewallRules; - private Servers servers; - - private FlexibleServers flexibleServers; - - private LtrBackupOperations ltrBackupOperations; + private BackupsLongTermRetentions backupsLongTermRetentions; private Migrations migrations; - private ResourceProviders resourceProviders; + private NameAvailabilities nameAvailabilities; private Operations operations; - private GetPrivateDnsZoneSuffixes getPrivateDnsZoneSuffixes; + private PrivateDnsZoneSuffixes privateDnsZoneSuffixes; private PrivateEndpointConnections privateEndpointConnections; - private PrivateEndpointConnectionOperations privateEndpointConnectionOperations; - private PrivateLinkResources privateLinkResources; private QuotaUsages quotaUsages; private Replicas replicas; - private LogFiles logFiles; - - private ServerThreatProtectionSettings serverThreatProtectionSettings; - - private TuningOptions tuningOptions; - - private TuningIndexes tuningIndexes; + private Servers servers; - private TuningConfigurations tuningConfigurations; + private TuningOptionsOperations tuningOptionsOperations; private VirtualEndpoints virtualEndpoints; @@ -369,78 +349,93 @@ public PostgreSqlManager authenticate(TokenCredential credential, AzureProfile p } /** - * Gets the resource collection API of Administrators. It manages ActiveDirectoryAdministrator. + * Gets the resource collection API of AdministratorsMicrosoftEntras. It manages AdministratorMicrosoftEntra. + * + * @return Resource collection API of AdministratorsMicrosoftEntras. + */ + public AdministratorsMicrosoftEntras administratorsMicrosoftEntras() { + if (this.administratorsMicrosoftEntras == null) { + this.administratorsMicrosoftEntras + = new AdministratorsMicrosoftEntrasImpl(clientObject.getAdministratorsMicrosoftEntras(), this); + } + return administratorsMicrosoftEntras; + } + + /** + * Gets the resource collection API of AdvancedThreatProtectionSettings. * - * @return Resource collection API of Administrators. + * @return Resource collection API of AdvancedThreatProtectionSettings. */ - public Administrators administrators() { - if (this.administrators == null) { - this.administrators = new AdministratorsImpl(clientObject.getAdministrators(), this); + public AdvancedThreatProtectionSettings advancedThreatProtectionSettings() { + if (this.advancedThreatProtectionSettings == null) { + this.advancedThreatProtectionSettings + = new AdvancedThreatProtectionSettingsImpl(clientObject.getAdvancedThreatProtectionSettings(), this); } - return administrators; + return advancedThreatProtectionSettings; } /** - * Gets the resource collection API of Backups. + * Gets the resource collection API of ServerThreatProtectionSettings. It manages + * AdvancedThreatProtectionSettingsModel. * - * @return Resource collection API of Backups. + * @return Resource collection API of ServerThreatProtectionSettings. */ - public Backups backups() { - if (this.backups == null) { - this.backups = new BackupsImpl(clientObject.getBackups(), this); + public ServerThreatProtectionSettings serverThreatProtectionSettings() { + if (this.serverThreatProtectionSettings == null) { + this.serverThreatProtectionSettings + = new ServerThreatProtectionSettingsImpl(clientObject.getServerThreatProtectionSettings(), this); } - return backups; + return serverThreatProtectionSettings; } /** - * Gets the resource collection API of LocationBasedCapabilities. + * Gets the resource collection API of BackupsAutomaticAndOnDemands. * - * @return Resource collection API of LocationBasedCapabilities. + * @return Resource collection API of BackupsAutomaticAndOnDemands. */ - public LocationBasedCapabilities locationBasedCapabilities() { - if (this.locationBasedCapabilities == null) { - this.locationBasedCapabilities - = new LocationBasedCapabilitiesImpl(clientObject.getLocationBasedCapabilities(), this); + public BackupsAutomaticAndOnDemands backupsAutomaticAndOnDemands() { + if (this.backupsAutomaticAndOnDemands == null) { + this.backupsAutomaticAndOnDemands + = new BackupsAutomaticAndOnDemandsImpl(clientObject.getBackupsAutomaticAndOnDemands(), this); } - return locationBasedCapabilities; + return backupsAutomaticAndOnDemands; } /** - * Gets the resource collection API of ServerCapabilities. + * Gets the resource collection API of CapabilitiesByLocations. * - * @return Resource collection API of ServerCapabilities. + * @return Resource collection API of CapabilitiesByLocations. */ - public ServerCapabilities serverCapabilities() { - if (this.serverCapabilities == null) { - this.serverCapabilities = new ServerCapabilitiesImpl(clientObject.getServerCapabilities(), this); + public CapabilitiesByLocations capabilitiesByLocations() { + if (this.capabilitiesByLocations == null) { + this.capabilitiesByLocations + = new CapabilitiesByLocationsImpl(clientObject.getCapabilitiesByLocations(), this); } - return serverCapabilities; + return capabilitiesByLocations; } /** - * Gets the resource collection API of CheckNameAvailabilities. + * Gets the resource collection API of CapabilitiesByServers. * - * @return Resource collection API of CheckNameAvailabilities. + * @return Resource collection API of CapabilitiesByServers. */ - public CheckNameAvailabilities checkNameAvailabilities() { - if (this.checkNameAvailabilities == null) { - this.checkNameAvailabilities - = new CheckNameAvailabilitiesImpl(clientObject.getCheckNameAvailabilities(), this); + public CapabilitiesByServers capabilitiesByServers() { + if (this.capabilitiesByServers == null) { + this.capabilitiesByServers = new CapabilitiesByServersImpl(clientObject.getCapabilitiesByServers(), this); } - return checkNameAvailabilities; + return capabilitiesByServers; } /** - * Gets the resource collection API of CheckNameAvailabilityWithLocations. + * Gets the resource collection API of CapturedLogs. * - * @return Resource collection API of CheckNameAvailabilityWithLocations. + * @return Resource collection API of CapturedLogs. */ - public CheckNameAvailabilityWithLocations checkNameAvailabilityWithLocations() { - if (this.checkNameAvailabilityWithLocations == null) { - this.checkNameAvailabilityWithLocations = new CheckNameAvailabilityWithLocationsImpl( - clientObject.getCheckNameAvailabilityWithLocations(), this); + public CapturedLogs capturedLogs() { + if (this.capturedLogs == null) { + this.capturedLogs = new CapturedLogsImpl(clientObject.getCapturedLogs(), this); } - return checkNameAvailabilityWithLocations; + return capturedLogs; } /** @@ -480,43 +475,20 @@ public FirewallRules firewallRules() { } /** - * Gets the resource collection API of Servers. It manages Server. - * - * @return Resource collection API of Servers. - */ - public Servers servers() { - if (this.servers == null) { - this.servers = new ServersImpl(clientObject.getServers(), this); - } - return servers; - } - - /** - * Gets the resource collection API of FlexibleServers. + * Gets the resource collection API of BackupsLongTermRetentions. * - * @return Resource collection API of FlexibleServers. + * @return Resource collection API of BackupsLongTermRetentions. */ - public FlexibleServers flexibleServers() { - if (this.flexibleServers == null) { - this.flexibleServers = new FlexibleServersImpl(clientObject.getFlexibleServers(), this); + public BackupsLongTermRetentions backupsLongTermRetentions() { + if (this.backupsLongTermRetentions == null) { + this.backupsLongTermRetentions + = new BackupsLongTermRetentionsImpl(clientObject.getBackupsLongTermRetentions(), this); } - return flexibleServers; + return backupsLongTermRetentions; } /** - * Gets the resource collection API of LtrBackupOperations. - * - * @return Resource collection API of LtrBackupOperations. - */ - public LtrBackupOperations ltrBackupOperations() { - if (this.ltrBackupOperations == null) { - this.ltrBackupOperations = new LtrBackupOperationsImpl(clientObject.getLtrBackupOperations(), this); - } - return ltrBackupOperations; - } - - /** - * Gets the resource collection API of Migrations. It manages MigrationResource. + * Gets the resource collection API of Migrations. It manages Migration. * * @return Resource collection API of Migrations. */ @@ -528,15 +500,15 @@ public Migrations migrations() { } /** - * Gets the resource collection API of ResourceProviders. + * Gets the resource collection API of NameAvailabilities. * - * @return Resource collection API of ResourceProviders. + * @return Resource collection API of NameAvailabilities. */ - public ResourceProviders resourceProviders() { - if (this.resourceProviders == null) { - this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this); + public NameAvailabilities nameAvailabilities() { + if (this.nameAvailabilities == null) { + this.nameAvailabilities = new NameAvailabilitiesImpl(clientObject.getNameAvailabilities(), this); } - return resourceProviders; + return nameAvailabilities; } /** @@ -552,16 +524,16 @@ public Operations operations() { } /** - * Gets the resource collection API of GetPrivateDnsZoneSuffixes. + * Gets the resource collection API of PrivateDnsZoneSuffixes. * - * @return Resource collection API of GetPrivateDnsZoneSuffixes. + * @return Resource collection API of PrivateDnsZoneSuffixes. */ - public GetPrivateDnsZoneSuffixes getPrivateDnsZoneSuffixes() { - if (this.getPrivateDnsZoneSuffixes == null) { - this.getPrivateDnsZoneSuffixes - = new GetPrivateDnsZoneSuffixesImpl(clientObject.getGetPrivateDnsZoneSuffixes(), this); + public PrivateDnsZoneSuffixes privateDnsZoneSuffixes() { + if (this.privateDnsZoneSuffixes == null) { + this.privateDnsZoneSuffixes + = new PrivateDnsZoneSuffixesImpl(clientObject.getPrivateDnsZoneSuffixes(), this); } - return getPrivateDnsZoneSuffixes; + return privateDnsZoneSuffixes; } /** @@ -577,19 +549,6 @@ public PrivateEndpointConnections privateEndpointConnections() { return privateEndpointConnections; } - /** - * Gets the resource collection API of PrivateEndpointConnectionOperations. - * - * @return Resource collection API of PrivateEndpointConnectionOperations. - */ - public PrivateEndpointConnectionOperations privateEndpointConnectionOperations() { - if (this.privateEndpointConnectionOperations == null) { - this.privateEndpointConnectionOperations = new PrivateEndpointConnectionOperationsImpl( - clientObject.getPrivateEndpointConnectionOperations(), this); - } - return privateEndpointConnectionOperations; - } - /** * Gets the resource collection API of PrivateLinkResources. * @@ -627,69 +586,32 @@ public Replicas replicas() { } /** - * Gets the resource collection API of LogFiles. - * - * @return Resource collection API of LogFiles. - */ - public LogFiles logFiles() { - if (this.logFiles == null) { - this.logFiles = new LogFilesImpl(clientObject.getLogFiles(), this); - } - return logFiles; - } - - /** - * Gets the resource collection API of ServerThreatProtectionSettings. It manages - * ServerThreatProtectionSettingsModel. - * - * @return Resource collection API of ServerThreatProtectionSettings. - */ - public ServerThreatProtectionSettings serverThreatProtectionSettings() { - if (this.serverThreatProtectionSettings == null) { - this.serverThreatProtectionSettings - = new ServerThreatProtectionSettingsImpl(clientObject.getServerThreatProtectionSettings(), this); - } - return serverThreatProtectionSettings; - } - - /** - * Gets the resource collection API of TuningOptions. - * - * @return Resource collection API of TuningOptions. - */ - public TuningOptions tuningOptions() { - if (this.tuningOptions == null) { - this.tuningOptions = new TuningOptionsImpl(clientObject.getTuningOptions(), this); - } - return tuningOptions; - } - - /** - * Gets the resource collection API of TuningIndexes. + * Gets the resource collection API of Servers. It manages Server. * - * @return Resource collection API of TuningIndexes. + * @return Resource collection API of Servers. */ - public TuningIndexes tuningIndexes() { - if (this.tuningIndexes == null) { - this.tuningIndexes = new TuningIndexesImpl(clientObject.getTuningIndexes(), this); + public Servers servers() { + if (this.servers == null) { + this.servers = new ServersImpl(clientObject.getServers(), this); } - return tuningIndexes; + return servers; } /** - * Gets the resource collection API of TuningConfigurations. + * Gets the resource collection API of TuningOptionsOperations. * - * @return Resource collection API of TuningConfigurations. + * @return Resource collection API of TuningOptionsOperations. */ - public TuningConfigurations tuningConfigurations() { - if (this.tuningConfigurations == null) { - this.tuningConfigurations = new TuningConfigurationsImpl(clientObject.getTuningConfigurations(), this); + public TuningOptionsOperations tuningOptionsOperations() { + if (this.tuningOptionsOperations == null) { + this.tuningOptionsOperations + = new TuningOptionsOperationsImpl(clientObject.getTuningOptionsOperations(), this); } - return tuningConfigurations; + return tuningOptionsOperations; } /** - * Gets the resource collection API of VirtualEndpoints. It manages VirtualEndpointResource. + * Gets the resource collection API of VirtualEndpoints. It manages VirtualEndpoint. * * @return Resource collection API of VirtualEndpoints. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsMicrosoftEntrasClient.java similarity index 63% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsClient.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsMicrosoftEntrasClient.java index e9f77c17fff3..ead2efe4cc2b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsMicrosoftEntrasClient.java @@ -13,138 +13,145 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministratorAdd; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntraAdd; 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 AdministratorsClient. + * An instance of this class provides access to all the operations defined in AdministratorsMicrosoftEntrasClient. */ -public interface AdministratorsClient { +public interface AdministratorsMicrosoftEntrasClient { /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an Microsoft Entra Administrator along with {@link Response} on successful completion of - * {@link Mono}. + * @return server administrator associated to a Microsoft Entra principal along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createWithResponseAsync(String resourceGroupName, String serverName, - String objectId, ActiveDirectoryAdministratorAdd parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String objectId, AdministratorMicrosoftEntraAdd parameters); /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 represents an Microsoft Entra Administrator. + * @return the {@link PollerFlux} for polling of server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ActiveDirectoryAdministratorInner> beginCreateAsync( - String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters); + PollerFlux, AdministratorMicrosoftEntraInner> beginCreateOrUpdateAsync( + String resourceGroupName, String serverName, String objectId, AdministratorMicrosoftEntraAdd parameters); /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents an Microsoft Entra Administrator. + * @return the {@link SyncPoller} for polling of server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ActiveDirectoryAdministratorInner> beginCreate( - String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters); + SyncPoller, AdministratorMicrosoftEntraInner> beginCreateOrUpdate( + String resourceGroupName, String serverName, String objectId, AdministratorMicrosoftEntraAdd parameters); /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents an Microsoft Entra Administrator. + * @return the {@link SyncPoller} for polling of server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ActiveDirectoryAdministratorInner> beginCreate( - String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters, + SyncPoller, AdministratorMicrosoftEntraInner> beginCreateOrUpdate( + String resourceGroupName, String serverName, String objectId, AdministratorMicrosoftEntraAdd parameters, Context context); /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an Microsoft Entra Administrator on successful completion of {@link Mono}. + * @return server administrator associated to a Microsoft Entra principal on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync(String resourceGroupName, String serverName, String objectId, - ActiveDirectoryAdministratorAdd parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String objectId, AdministratorMicrosoftEntraAdd parameters); /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an Microsoft Entra Administrator. + * @return server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - ActiveDirectoryAdministratorInner create(String resourceGroupName, String serverName, String objectId, - ActiveDirectoryAdministratorAdd parameters); + AdministratorMicrosoftEntraInner createOrUpdate(String resourceGroupName, String serverName, String objectId, + AdministratorMicrosoftEntraAdd parameters); /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an Microsoft Entra Administrator. + * @return server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - ActiveDirectoryAdministratorInner create(String resourceGroupName, String serverName, String objectId, - ActiveDirectoryAdministratorAdd parameters, Context context); + AdministratorMicrosoftEntraInner createOrUpdate(String resourceGroupName, String serverName, String objectId, + AdministratorMicrosoftEntraAdd parameters, Context context); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -155,11 +162,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam String objectId); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -169,11 +176,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, String objectId); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -183,11 +190,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String objectId); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -199,11 +206,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -213,11 +220,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Mono deleteAsync(String resourceGroupName, String serverName, String objectId); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -226,11 +233,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String objectId); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -240,92 +247,97 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String objectId, Context context); /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response} on successful completion of {@link Mono}. + * @return information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, + Mono> getWithResponseAsync(String resourceGroupName, String serverName, String objectId); /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server on successful completion of {@link Mono}. + * @return information about a server administrator associated to a Microsoft Entra principal on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String objectId); + Mono getAsync(String resourceGroupName, String serverName, String objectId); /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, + Response getWithResponse(String resourceGroupName, String serverName, String objectId, Context context); /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about a server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - ActiveDirectoryAdministratorInner get(String resourceGroupName, String serverName, String objectId); + AdministratorMicrosoftEntraInner get(String resourceGroupName, String serverName, String objectId); /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 Microsoft Entra Administrators as paginated response with {@link PagedFlux}. + * @return list of server administrators associated to Microsoft Entra principals as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); + PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 Microsoft Entra Administrators as paginated response with {@link PagedIterable}. + * @return list of server administrators associated to Microsoft Entra principals as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -333,9 +345,10 @@ Response getWithResponse(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 Microsoft Entra Administrators as paginated response with {@link PagedIterable}. + * @return list of server administrators associated to Microsoft Entra principals as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningOptionsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdvancedThreatProtectionSettingsClient.java similarity index 61% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningOptionsClient.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdvancedThreatProtectionSettingsClient.java index 8b665b9074b4..8c013f634b95 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningOptionsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdvancedThreatProtectionSettingsClient.java @@ -10,115 +10,117 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in TuningOptionsClient. + * An instance of this class provides access to all the operations defined in AdvancedThreatProtectionSettingsClient. */ -public interface TuningOptionsClient { +public interface AdvancedThreatProtectionSettingsClient { /** - * Retrieve the tuning option on a server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stores property that features impact on some metric if this recommended action is applied along with - * {@link Response} on successful completion of {@link Mono}. + * @return list of advanced threat protection settings for a server as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, + String serverName); /** - * Retrieve the tuning option on a server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stores property that features impact on some metric if this recommended action is applied on successful - * completion of {@link Mono}. + * @return list of advanced threat protection settings for a server as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Retrieve the tuning option on a server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stores property that features impact on some metric if this recommended action is applied along with - * {@link Response}. + * @return list of advanced threat protection settings for a server as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); /** - * Retrieve the tuning option on a server. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. + * @param threatProtectionName Name of the advanced threat protection settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stores property that features impact on some metric if this recommended action is applied. + * @return state of advanced threat protection settings for a server along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - TuningOptionsResourceInner get(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); + Mono> getWithResponseAsync(String resourceGroupName, + String serverName, ThreatProtectionName threatProtectionName); /** - * Retrieve the list of available tuning options. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 server tuning options as paginated response with {@link PagedFlux}. + * @return state of advanced threat protection settings for a server on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName); /** - * Retrieve the list of available tuning options. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 server tuning options as paginated response with {@link PagedIterable}. + * @return state of advanced threat protection settings for a server along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, Context context); /** - * Retrieve the list of available tuning options. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param context The context to associate with this operation. + * @param threatProtectionName Name of the advanced threat protection settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 server tuning options as paginated response with {@link PagedIterable}. + * @return state of advanced threat protection settings for a server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + AdvancedThreatProtectionSettingsModelInner get(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsAutomaticAndOnDemandsClient.java similarity index 73% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsClient.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsAutomaticAndOnDemandsClient.java index 02ac67d51218..c69d909ae6f7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsAutomaticAndOnDemandsClient.java @@ -13,125 +13,126 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; 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 BackupsClient. + * An instance of this class provides access to all the operations defined in BackupsAutomaticAndOnDemandsClient. */ -public interface BackupsClient { +public interface BackupsAutomaticAndOnDemandsClient { /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a backup along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createWithResponseAsync(String resourceGroupName, String serverName, String backupName); /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 server backup properties. + * @return the {@link PollerFlux} for polling of properties of a backup. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ServerBackupInner> beginCreateAsync(String resourceGroupName, - String serverName, String backupName); + PollerFlux, BackupAutomaticAndOnDemandInner> + beginCreateAsync(String resourceGroupName, String serverName, String backupName); /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of server backup properties. + * @return the {@link SyncPoller} for polling of properties of a backup. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerBackupInner> beginCreate(String resourceGroupName, - String serverName, String backupName); + SyncPoller, BackupAutomaticAndOnDemandInner> + beginCreate(String resourceGroupName, String serverName, String backupName); /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of server backup properties. + * @return the {@link SyncPoller} for polling of properties of a backup. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerBackupInner> beginCreate(String resourceGroupName, - String serverName, String backupName, Context context); + SyncPoller, BackupAutomaticAndOnDemandInner> + beginCreate(String resourceGroupName, String serverName, String backupName, Context context); /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties on successful completion of {@link Mono}. + * @return properties of a backup on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync(String resourceGroupName, String serverName, String backupName); + Mono createAsync(String resourceGroupName, String serverName, String backupName); /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties. + * @return properties of a backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerBackupInner create(String resourceGroupName, String serverName, String backupName); + BackupAutomaticAndOnDemandInner create(String resourceGroupName, String serverName, String backupName); /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties. + * @return properties of a backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerBackupInner create(String resourceGroupName, String serverName, String backupName, Context context); + BackupAutomaticAndOnDemandInner create(String resourceGroupName, String serverName, String backupName, + Context context); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -142,11 +143,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam String backupName); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -156,11 +157,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, String backupName); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -170,11 +171,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String backupName); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -186,11 +187,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -200,11 +201,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Mono deleteAsync(String resourceGroupName, String serverName, String backupName); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -213,11 +214,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String backupName); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -227,92 +228,93 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String backupName, Context context); /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific backup for a given server along with {@link Response} on successful completion of {@link Mono}. + * @return information of an on demand backup, given its name along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, + Mono> getWithResponseAsync(String resourceGroupName, String serverName, String backupName); /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific backup for a given server on successful completion of {@link Mono}. + * @return information of an on demand backup, given its name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String backupName); + Mono getAsync(String resourceGroupName, String serverName, String backupName); /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific backup for a given server along with {@link Response}. + * @return information of an on demand backup, given its name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String backupName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String backupName, Context context); /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific backup for a given server. + * @return information of an on demand backup, given its name. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerBackupInner get(String resourceGroupName, String serverName, String backupName); + BackupAutomaticAndOnDemandInner get(String resourceGroupName, String serverName, String backupName); /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 server backups as paginated response with {@link PagedFlux}. + * @return list of backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); + PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 server backups as paginated response with {@link PagedIterable}. + * @return list of backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -320,8 +322,9 @@ Response getWithResponse(String resourceGroupName, String ser * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 server backups as paginated response with {@link PagedIterable}. + * @return list of backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsLongTermRetentionsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsLongTermRetentionsClient.java new file mode 100644 index 000000000000..833054e90b88 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsLongTermRetentionsClient.java @@ -0,0 +1,302 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionOperationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionRequest; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionsCheckPrerequisitesResponse; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; +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 BackupsLongTermRetentionsClient. + */ +public interface BackupsLongTermRetentionsClient { + /** + * Performs all checks required for a long term retention backup operation to succeed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR pre-backup API call on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono checkPrerequisitesWithResponseAsync( + String resourceGroupName, String serverName, LtrPreBackupRequest parameters); + + /** + * Performs all checks required for a long term retention backup operation to succeed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR pre-backup API call on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono checkPrerequisitesAsync(String resourceGroupName, String serverName, + LtrPreBackupRequest parameters); + + /** + * Performs all checks required for a long term retention backup operation to succeed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR pre-backup API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupsLongTermRetentionsCheckPrerequisitesResponse checkPrerequisitesWithResponse(String resourceGroupName, + String serverName, LtrPreBackupRequest parameters, Context context); + + /** + * Performs all checks required for a long term retention backup operation to succeed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR pre-backup API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LtrPreBackupResponseInner checkPrerequisites(String resourceGroupName, String serverName, + LtrPreBackupRequest parameters); + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR backup API call along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> startWithResponseAsync(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters); + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, BackupsLongTermRetentionResponseInner> + beginStartAsync(String resourceGroupName, String serverName, BackupsLongTermRetentionRequest parameters); + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BackupsLongTermRetentionResponseInner> + beginStart(String resourceGroupName, String serverName, BackupsLongTermRetentionRequest parameters); + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BackupsLongTermRetentionResponseInner> beginStart( + String resourceGroupName, String serverName, BackupsLongTermRetentionRequest parameters, Context context); + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR backup API call on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono startAsync(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters); + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupsLongTermRetentionResponseInner start(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters); + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupsLongTermRetentionResponseInner start(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters, Context context); + + /** + * Gets the results of a long retention backup operation for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the results of a long retention backup operation for a server along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String backupName); + + /** + * Gets the results of a long retention backup operation for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the results of a long retention backup operation for a server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, + String backupName); + + /** + * Gets the results of a long retention backup operation for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName The name of the backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the results of a long retention backup operation for a server along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, + String backupName, Context context); + + /** + * Gets the results of a long retention backup operation for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the results of a long retention backup operation for a server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupsLongTermRetentionOperationInner get(String resourceGroupName, String serverName, String backupName); + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 long term retention backup operations for server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 long term retention backup operations for server as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 long term retention backup operations for server as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LocationBasedCapabilitiesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByLocationsClient.java similarity index 67% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LocationBasedCapabilitiesClient.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByLocationsClient.java index 3bdd913b93af..26556c4a4f4d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LocationBasedCapabilitiesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByLocationsClient.java @@ -9,48 +9,49 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; /** - * An instance of this class provides access to all the operations defined in LocationBasedCapabilitiesClient. + * An instance of this class provides access to all the operations defined in CapabilitiesByLocationsClient. */ -public interface LocationBasedCapabilitiesClient { +public interface CapabilitiesByLocationsClient { /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities at specified location in a given subscription as paginated response with {@link PagedFlux}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux executeAsync(String locationName); + PagedFlux listAsync(String locationName); /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities at specified location in a given subscription as paginated response with + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable execute(String locationName); + PagedIterable list(String locationName); /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities at specified location in a given subscription as paginated response with + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable execute(String locationName, Context context); + PagedIterable list(String locationName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerCapabilitiesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByServersClient.java similarity index 68% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerCapabilitiesClient.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByServersClient.java index 1c5fcfa39c91..41f25319c501 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerCapabilitiesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByServersClient.java @@ -9,40 +9,42 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; /** - * An instance of this class provides access to all the operations defined in ServerCapabilitiesClient. + * An instance of this class provides access to all the operations defined in CapabilitiesByServersClient. */ -public interface ServerCapabilitiesClient { +public interface CapabilitiesByServersClient { /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities for a flexible server as paginated response with {@link PagedFlux}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String serverName); + PagedFlux listAsync(String resourceGroupName, String serverName); /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities for a flexible server as paginated response with {@link PagedIterable}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String serverName); + PagedIterable list(String resourceGroupName, String serverName); /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -50,8 +52,9 @@ public interface ServerCapabilitiesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities for a flexible server as paginated response with {@link PagedIterable}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String serverName, Context context); + PagedIterable list(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LogFilesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapturedLogsClient.java similarity index 73% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LogFilesClient.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapturedLogsClient.java index 882496153f2a..9409af6f811d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LogFilesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapturedLogsClient.java @@ -9,40 +9,40 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LogFileInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; /** - * An instance of this class provides access to all the operations defined in LogFilesClient. + * An instance of this class provides access to all the operations defined in CapturedLogsClient. */ -public interface LogFilesClient { +public interface CapturedLogsClient { /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 logFiles as paginated response with {@link PagedFlux}. + * @return list of log files as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); + PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 logFiles as paginated response with {@link PagedIterable}. + * @return list of log files as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -50,8 +50,8 @@ public interface LogFilesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 logFiles as paginated response with {@link PagedIterable}. + * @return list of log files as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java deleted file mode 100644 index 091c0e01077a..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in CheckNameAvailabilitiesClient. - */ -public interface CheckNameAvailabilitiesClient { - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> - executeWithResponseAsync(CheckNameAvailabilityRequest nameAvailabilityRequest); - - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono executeAsync(CheckNameAvailabilityRequest nameAvailabilityRequest); - - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response executeWithResponse(CheckNameAvailabilityRequest nameAvailabilityRequest, - Context context); - - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NameAvailabilityInner execute(CheckNameAvailabilityRequest nameAvailabilityRequest); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilityWithLocationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilityWithLocationsClient.java deleted file mode 100644 index 8a1eba9fd4be..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilityWithLocationsClient.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in CheckNameAvailabilityWithLocationsClient. - */ -public interface CheckNameAvailabilityWithLocationsClient { - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> executeWithResponseAsync(String locationName, - CheckNameAvailabilityRequest nameAvailabilityRequest); - - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono executeAsync(String locationName, CheckNameAvailabilityRequest nameAvailabilityRequest); - - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response executeWithResponse(String locationName, - CheckNameAvailabilityRequest nameAvailabilityRequest, Context context); - - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NameAvailabilityInner execute(String locationName, CheckNameAvailabilityRequest nameAvailabilityRequest); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java index 64c5785128f2..23b24be2082e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java @@ -24,33 +24,34 @@ */ public interface ConfigurationsClient { /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 server configurations as paginated response with {@link PagedFlux}. + * @return list of configurations (also known as server parameters) as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 server configurations as paginated response with {@link PagedIterable}. + * @return list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -58,296 +59,322 @@ public interface ConfigurationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 server configurations as paginated response with {@link PagedIterable}. + * @return list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server along with {@link Response} on successful completion of - * {@link Mono}. + * @return information about a specific configuration (also known as server parameter) of a server along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getWithResponseAsync(String resourceGroupName, String serverName, String configurationName); /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server on successful completion of {@link Mono}. + * @return information about a specific configuration (also known as server parameter) of a server on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono getAsync(String resourceGroupName, String serverName, String configurationName); /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server parameter). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server along with {@link Response}. + * @return information about a specific configuration (also known as server parameter) of a server along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String serverName, String configurationName, Context context); /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server. + * @return information about a specific configuration (also known as server parameter) of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) ConfigurationInner get(String resourceGroupName, String serverName, String configurationName); /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration along with {@link Response} on successful completion of {@link Mono}. + * @return configuration (also known as server parameter) along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of represents a Configuration. + * @return the {@link PollerFlux} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ConfigurationInner> beginUpdateAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a Configuration. + * @return the {@link SyncPoller} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a Configuration. + * @return the {@link SyncPoller} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters, Context context); /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration on successful completion of {@link Mono}. + * @return configuration (also known as server parameter) on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono updateAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration. + * @return configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.SINGLE) ConfigurationInner update(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration. + * @return configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.SINGLE) ConfigurationInner update(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters, Context context); /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration along with {@link Response} on successful completion of {@link Mono}. + * @return configuration (also known as server parameter) along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> putWithResponseAsync(String resourceGroupName, String serverName, - String configurationName, ConfigurationInner parameters); + String configurationName, ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of represents a Configuration. + * @return the {@link PollerFlux} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ConfigurationInner> beginPutAsync(String resourceGroupName, - String serverName, String configurationName, ConfigurationInner parameters); + String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a Configuration. + * @return the {@link SyncPoller} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationInner> beginPut(String resourceGroupName, String serverName, - String configurationName, ConfigurationInner parameters); + String configurationName, ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a Configuration. + * @return the {@link SyncPoller} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationInner> beginPut(String resourceGroupName, String serverName, - String configurationName, ConfigurationInner parameters, Context context); + String configurationName, ConfigurationForUpdate parameters, Context context); /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration on successful completion of {@link Mono}. + * @return configuration (also known as server parameter) on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono putAsync(String resourceGroupName, String serverName, String configurationName, - ConfigurationInner parameters); + ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration. + * @return configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.SINGLE) ConfigurationInner put(String resourceGroupName, String serverName, String configurationName, - ConfigurationInner parameters); + ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration. + * @return configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.SINGLE) ConfigurationInner put(String resourceGroupName, String serverName, String configurationName, - ConfigurationInner parameters, Context context); + ConfigurationForUpdate parameters, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/DatabasesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/DatabasesClient.java index 6bc797b55c69..d990c89cfd57 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/DatabasesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/DatabasesClient.java @@ -23,124 +23,132 @@ */ public interface DatabasesClient { /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database along with {@link Response} on successful completion of {@link Mono}. + * @return represents a database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createWithResponseAsync(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 represents a Database. + * @return the {@link PollerFlux} for polling of represents a database. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, DatabaseInner> beginCreateAsync(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a Database. + * @return the {@link SyncPoller} for polling of represents a database. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatabaseInner> beginCreate(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a Database. + * @return the {@link SyncPoller} for polling of represents a database. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatabaseInner> beginCreate(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context); /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database on successful completion of {@link Mono}. + * @return represents a database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createAsync(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database. + * @return represents a database. */ @ServiceMethod(returns = ReturnType.SINGLE) DatabaseInner create(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database. + * @return represents a database. */ @ServiceMethod(returns = ReturnType.SINGLE) DatabaseInner create(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context); /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -151,11 +159,12 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam String databaseName); /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -166,11 +175,12 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St String databaseName); /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -180,11 +190,12 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName); /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -196,11 +207,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -210,11 +222,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Mono deleteAsync(String resourceGroupName, String serverName, String databaseName); /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -223,11 +236,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String databaseName); /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -237,92 +251,97 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String databaseName, Context context); /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database along with {@link Response} on successful completion of {@link Mono}. + * @return information about an existing database along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getWithResponseAsync(String resourceGroupName, String serverName, String databaseName); /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database on successful completion of {@link Mono}. + * @return information about an existing database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono getAsync(String resourceGroupName, String serverName, String databaseName); /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database along with {@link Response}. + * @return information about an existing database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String serverName, String databaseName, Context context); /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database. + * @return information about an existing database. */ @ServiceMethod(returns = ReturnType.SINGLE) DatabaseInner get(String resourceGroupName, String serverName, String databaseName); /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 databases as paginated response with {@link PagedFlux}. + * @return list of all databases in a server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 databases as paginated response with {@link PagedIterable}. + * @return list of all databases in a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -330,7 +349,7 @@ Response getWithResponse(String resourceGroupName, String serverN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 databases as paginated response with {@link PagedIterable}. + * @return list of all databases in a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName, Context context); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FirewallRulesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FirewallRulesClient.java index 9c04a404ca9a..a8058aa894bc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FirewallRulesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FirewallRulesClient.java @@ -27,12 +27,12 @@ public interface FirewallRulesClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}. + * @return firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, @@ -43,12 +43,12 @@ Mono>> createOrUpdateWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 represents a server firewall rule. + * @return the {@link PollerFlux} for polling of firewall rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, FirewallRuleInner> beginCreateOrUpdateAsync(String resourceGroupName, @@ -59,12 +59,12 @@ PollerFlux, FirewallRuleInner> beginCreateOrUpdate * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a server firewall rule. + * @return the {@link SyncPoller} for polling of firewall rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName, @@ -75,13 +75,13 @@ SyncPoller, FirewallRuleInner> beginCreateOrUpdate * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a server firewall rule. + * @return the {@link SyncPoller} for polling of firewall rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName, @@ -92,12 +92,12 @@ SyncPoller, FirewallRuleInner> beginCreateOrUpdate * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule on successful completion of {@link Mono}. + * @return firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createOrUpdateAsync(String resourceGroupName, String serverName, String firewallRuleName, @@ -108,12 +108,12 @@ Mono createOrUpdateAsync(String resourceGroupName, String ser * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, @@ -124,24 +124,24 @@ FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters, Context context); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -152,11 +152,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam String firewallRuleName); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -167,11 +167,11 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St String firewallRuleName); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -182,11 +182,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String firewallRuleName); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -198,11 +198,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -212,11 +212,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Mono deleteAsync(String resourceGroupName, String serverName, String firewallRuleName); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -225,11 +225,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String firewallRuleName); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -239,92 +239,93 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String firewallRuleName, Context context); /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}. + * @return information about a firewall rule in a server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getWithResponseAsync(String resourceGroupName, String serverName, String firewallRuleName); /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule on successful completion of {@link Mono}. + * @return information about a firewall rule in a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono getAsync(String resourceGroupName, String serverName, String firewallRuleName); /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule along with {@link Response}. + * @return information about a firewall rule in a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String serverName, String firewallRuleName, Context context); /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return information about a firewall rule in a server. */ @ServiceMethod(returns = ReturnType.SINGLE) FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName); /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 firewall rules as paginated response with {@link PagedFlux}. + * @return list of firewall rules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 firewall rules as paginated response with {@link PagedIterable}. + * @return list of firewall rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -332,7 +333,7 @@ Response getWithResponse(String resourceGroupName, String ser * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 firewall rules as paginated response with {@link PagedIterable}. + * @return list of firewall rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName, Context context); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FlexibleServersClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FlexibleServersClient.java deleted file mode 100644 index 78f1b41ddde6..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FlexibleServersClient.java +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrBackupResponseInner; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServersTriggerLtrPreBackupResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupRequest; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; -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 FlexibleServersClient. - */ -public interface FlexibleServersClient { - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR pre-backup API call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono triggerLtrPreBackupWithResponseAsync(String resourceGroupName, - String serverName, LtrPreBackupRequest parameters); - - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR pre-backup API call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono triggerLtrPreBackupAsync(String resourceGroupName, String serverName, - LtrPreBackupRequest parameters); - - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR pre-backup API call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FlexibleServersTriggerLtrPreBackupResponse triggerLtrPreBackupWithResponse(String resourceGroupName, - String serverName, LtrPreBackupRequest parameters, Context context); - - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR pre-backup API call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LtrPreBackupResponseInner triggerLtrPreBackup(String resourceGroupName, String serverName, - LtrPreBackupRequest parameters); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> startLtrBackupWithResponseAsync(String resourceGroupName, String serverName, - LtrBackupRequest parameters); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown 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 response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, LtrBackupResponseInner> - beginStartLtrBackupAsync(String resourceGroupName, String serverName, LtrBackupRequest parameters); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LtrBackupResponseInner> beginStartLtrBackup(String resourceGroupName, - String serverName, LtrBackupRequest parameters); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LtrBackupResponseInner> beginStartLtrBackup(String resourceGroupName, - String serverName, LtrBackupRequest parameters, Context context); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono startLtrBackupAsync(String resourceGroupName, String serverName, - LtrBackupRequest parameters); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LtrBackupResponseInner startLtrBackup(String resourceGroupName, String serverName, LtrBackupRequest parameters); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LtrBackupResponseInner startLtrBackup(String resourceGroupName, String serverName, LtrBackupRequest parameters, - Context context); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/MigrationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/MigrationsClient.java index 56a90658a4aa..86ccc9298f10 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/MigrationsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/MigrationsClient.java @@ -10,7 +10,8 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationListFilter; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResourceForPatch; import reactor.core.publisher.Mono; @@ -22,333 +23,379 @@ public interface MigrationsClient { /** * Creates a new migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for creating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createWithResponseAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, MigrationResourceInner parameters); + Mono> createWithResponseAsync(String resourceGroupName, String serverName, + String migrationName, MigrationInner parameters); /** * Creates a new migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for creating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource on successful completion of {@link Mono}. + * @return properties of a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, MigrationResourceInner parameters); + Mono createAsync(String resourceGroupName, String serverName, String migrationName, + MigrationInner parameters); /** * Creates a new migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for creating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource along with {@link Response}. + * @return properties of a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, MigrationResourceInner parameters, Context context); + Response createWithResponse(String resourceGroupName, String serverName, String migrationName, + MigrationInner parameters, Context context); /** * Creates a new migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for creating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource. + * @return properties of a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - MigrationResourceInner create(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, MigrationResourceInner parameters); + MigrationInner create(String resourceGroupName, String serverName, String migrationName, MigrationInner parameters); /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration along with {@link Response} on successful completion of {@link Mono}. + * @return information about a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String migrationName); /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration on successful completion of {@link Mono}. + * @return information about a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName); + Mono getAsync(String resourceGroupName, String serverName, String migrationName); /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration along with {@link Response}. + * @return information about a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String migrationName, + Context context); /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration. + * @return information about a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - MigrationResourceInner get(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName); + MigrationInner get(String resourceGroupName, String serverName, String migrationName); /** * Updates an existing migration. The request body can contain one to many of the mutable properties present in the * migration definition. Certain property updates initiate migration state transitions. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for updating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required to update an existing migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, MigrationResourceForPatch parameters); + Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String migrationName, MigrationResourceForPatch parameters); /** * Updates an existing migration. The request body can contain one to many of the mutable properties present in the * migration definition. Certain property updates initiate migration state transitions. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for updating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required to update an existing migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource on successful completion of {@link Mono}. + * @return properties of a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, MigrationResourceForPatch parameters); + Mono updateAsync(String resourceGroupName, String serverName, String migrationName, + MigrationResourceForPatch parameters); /** * Updates an existing migration. The request body can contain one to many of the mutable properties present in the * migration definition. Certain property updates initiate migration state transitions. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for updating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required to update an existing migration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource along with {@link Response}. + * @return properties of a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, MigrationResourceForPatch parameters, Context context); + Response updateWithResponse(String resourceGroupName, String serverName, String migrationName, + MigrationResourceForPatch parameters, Context context); /** * Updates an existing migration. The request body can contain one to many of the mutable properties present in the * migration definition. Certain property updates initiate migration state transitions. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for updating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required to update an existing migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource. + * @return properties of a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - MigrationResourceInner update(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, MigrationResourceForPatch parameters); + MigrationInner update(String resourceGroupName, String serverName, String migrationName, + MigrationResourceForPatch parameters); /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return properties of a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName); + Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, + String migrationName); /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return properties of a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName); + Mono cancelAsync(String resourceGroupName, String serverName, String migrationName); /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return properties of a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, Context context); + Response cancelWithResponse(String resourceGroupName, String serverName, String migrationName, + Context context); /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return properties of a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String subscriptionId, String resourceGroupName, String targetDbServerName, String migrationName); + MigrationInner cancel(String resourceGroupName, String serverName, String migrationName); /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationListFilter Migration list filter. Retrieves either active migrations or all migrations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationListFilter Migration list filter. Indicates if the request should retrieve only active migrations + * or all migrations. Defaults to Active. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 migration resources as paginated response with {@link PagedFlux}. + * @return list of migrations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByTargetServerAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, MigrationListFilter migrationListFilter); + PagedFlux listByTargetServerAsync(String resourceGroupName, String serverName, + MigrationListFilter migrationListFilter); /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 migration resources as paginated response with {@link PagedFlux}. + * @return list of migrations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByTargetServerAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName); + PagedFlux listByTargetServerAsync(String resourceGroupName, String serverName); /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 migration resources as paginated response with {@link PagedIterable}. + * @return list of migrations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByTargetServer(String subscriptionId, String resourceGroupName, - String targetDbServerName); + PagedIterable listByTargetServer(String resourceGroupName, String serverName); /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationListFilter Migration list filter. Retrieves either active migrations or all migrations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationListFilter Migration list filter. Indicates if the request should retrieve only active migrations + * or all migrations. Defaults to Active. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 migration resources as paginated response with {@link PagedIterable}. + * @return list of migrations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByTargetServer(String subscriptionId, String resourceGroupName, - String targetDbServerName, MigrationListFilter migrationListFilter, Context context); + PagedIterable listByTargetServer(String resourceGroupName, String serverName, + MigrationListFilter migrationListFilter, Context context); + + /** + * Check the validity and availability of the given name, to assign it to a new migration. + * + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a migration name along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> checkNameAvailabilityWithResponseAsync(String resourceGroupName, + String serverName, MigrationNameAvailabilityInner parameters); + + /** + * Check the validity and availability of the given name, to assign it to a new migration. + * + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a migration name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono checkNameAvailabilityAsync(String resourceGroupName, String serverName, + MigrationNameAvailabilityInner parameters); + + /** + * Check the validity and availability of the given name, to assign it to a new migration. + * + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a migration name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkNameAvailabilityWithResponse(String resourceGroupName, + String serverName, MigrationNameAvailabilityInner parameters, Context context); + + /** + * Check the validity and availability of the given name, to assign it to a new migration. + * + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a migration name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MigrationNameAvailabilityInner checkNameAvailability(String resourceGroupName, String serverName, + MigrationNameAvailabilityInner parameters); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/NameAvailabilitiesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/NameAvailabilitiesClient.java new file mode 100644 index 000000000000..f1aa16bb08c7 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/NameAvailabilitiesClient.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in NameAvailabilitiesClient. + */ +public interface NameAvailabilitiesClient { + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> checkGloballyWithResponseAsync(CheckNameAvailabilityRequest parameters); + + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono checkGloballyAsync(CheckNameAvailabilityRequest parameters); + + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkGloballyWithResponse(CheckNameAvailabilityRequest parameters, + Context context); + + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NameAvailabilityModelInner checkGlobally(CheckNameAvailabilityRequest parameters); + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> checkWithLocationWithResponseAsync(String locationName, + CheckNameAvailabilityRequest parameters); + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono checkWithLocationAsync(String locationName, + CheckNameAvailabilityRequest parameters); + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkWithLocationWithResponse(String locationName, + CheckNameAvailabilityRequest parameters, Context context); + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NameAvailabilityModelInner checkWithLocation(String locationName, CheckNameAvailabilityRequest parameters); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/OperationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/OperationsClient.java index f62bdb5712d8..ed8e41df6e60 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/OperationsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/OperationsClient.java @@ -16,33 +16,33 @@ */ public interface OperationsClient { /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations as paginated response with {@link PagedFlux}. + * @return list of resource provider operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listAsync(); /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations as paginated response with {@link PagedIterable}. + * @return list of resource provider operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations as paginated response with {@link PagedIterable}. + * @return list of resource provider operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlManagementClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlManagementClient.java index f1a88fe31099..1d8db32b24eb 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlManagementClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlManagementClient.java @@ -47,46 +47,53 @@ public interface PostgreSqlManagementClient { Duration getDefaultPollInterval(); /** - * Gets the AdministratorsClient object to access its operations. + * Gets the AdministratorsMicrosoftEntrasClient object to access its operations. * - * @return the AdministratorsClient object. + * @return the AdministratorsMicrosoftEntrasClient object. */ - AdministratorsClient getAdministrators(); + AdministratorsMicrosoftEntrasClient getAdministratorsMicrosoftEntras(); /** - * Gets the BackupsClient object to access its operations. + * Gets the AdvancedThreatProtectionSettingsClient object to access its operations. * - * @return the BackupsClient object. + * @return the AdvancedThreatProtectionSettingsClient object. */ - BackupsClient getBackups(); + AdvancedThreatProtectionSettingsClient getAdvancedThreatProtectionSettings(); /** - * Gets the LocationBasedCapabilitiesClient object to access its operations. + * Gets the ServerThreatProtectionSettingsClient object to access its operations. + * + * @return the ServerThreatProtectionSettingsClient object. + */ + ServerThreatProtectionSettingsClient getServerThreatProtectionSettings(); + + /** + * Gets the BackupsAutomaticAndOnDemandsClient object to access its operations. * - * @return the LocationBasedCapabilitiesClient object. + * @return the BackupsAutomaticAndOnDemandsClient object. */ - LocationBasedCapabilitiesClient getLocationBasedCapabilities(); + BackupsAutomaticAndOnDemandsClient getBackupsAutomaticAndOnDemands(); /** - * Gets the ServerCapabilitiesClient object to access its operations. + * Gets the CapabilitiesByLocationsClient object to access its operations. * - * @return the ServerCapabilitiesClient object. + * @return the CapabilitiesByLocationsClient object. */ - ServerCapabilitiesClient getServerCapabilities(); + CapabilitiesByLocationsClient getCapabilitiesByLocations(); /** - * Gets the CheckNameAvailabilitiesClient object to access its operations. + * Gets the CapabilitiesByServersClient object to access its operations. * - * @return the CheckNameAvailabilitiesClient object. + * @return the CapabilitiesByServersClient object. */ - CheckNameAvailabilitiesClient getCheckNameAvailabilities(); + CapabilitiesByServersClient getCapabilitiesByServers(); /** - * Gets the CheckNameAvailabilityWithLocationsClient object to access its operations. + * Gets the CapturedLogsClient object to access its operations. * - * @return the CheckNameAvailabilityWithLocationsClient object. + * @return the CapturedLogsClient object. */ - CheckNameAvailabilityWithLocationsClient getCheckNameAvailabilityWithLocations(); + CapturedLogsClient getCapturedLogs(); /** * Gets the ConfigurationsClient object to access its operations. @@ -110,25 +117,11 @@ public interface PostgreSqlManagementClient { FirewallRulesClient getFirewallRules(); /** - * Gets the ServersClient object to access its operations. - * - * @return the ServersClient object. - */ - ServersClient getServers(); - - /** - * Gets the FlexibleServersClient object to access its operations. - * - * @return the FlexibleServersClient object. - */ - FlexibleServersClient getFlexibleServers(); - - /** - * Gets the LtrBackupOperationsClient object to access its operations. + * Gets the BackupsLongTermRetentionsClient object to access its operations. * - * @return the LtrBackupOperationsClient object. + * @return the BackupsLongTermRetentionsClient object. */ - LtrBackupOperationsClient getLtrBackupOperations(); + BackupsLongTermRetentionsClient getBackupsLongTermRetentions(); /** * Gets the MigrationsClient object to access its operations. @@ -138,11 +131,11 @@ public interface PostgreSqlManagementClient { MigrationsClient getMigrations(); /** - * Gets the ResourceProvidersClient object to access its operations. + * Gets the NameAvailabilitiesClient object to access its operations. * - * @return the ResourceProvidersClient object. + * @return the NameAvailabilitiesClient object. */ - ResourceProvidersClient getResourceProviders(); + NameAvailabilitiesClient getNameAvailabilities(); /** * Gets the OperationsClient object to access its operations. @@ -152,11 +145,11 @@ public interface PostgreSqlManagementClient { OperationsClient getOperations(); /** - * Gets the GetPrivateDnsZoneSuffixesClient object to access its operations. + * Gets the PrivateDnsZoneSuffixesClient object to access its operations. * - * @return the GetPrivateDnsZoneSuffixesClient object. + * @return the PrivateDnsZoneSuffixesClient object. */ - GetPrivateDnsZoneSuffixesClient getGetPrivateDnsZoneSuffixes(); + PrivateDnsZoneSuffixesClient getPrivateDnsZoneSuffixes(); /** * Gets the PrivateEndpointConnectionsClient object to access its operations. @@ -165,13 +158,6 @@ public interface PostgreSqlManagementClient { */ PrivateEndpointConnectionsClient getPrivateEndpointConnections(); - /** - * Gets the PrivateEndpointConnectionOperationsClient object to access its operations. - * - * @return the PrivateEndpointConnectionOperationsClient object. - */ - PrivateEndpointConnectionOperationsClient getPrivateEndpointConnectionOperations(); - /** * Gets the PrivateLinkResourcesClient object to access its operations. * @@ -194,39 +180,18 @@ public interface PostgreSqlManagementClient { ReplicasClient getReplicas(); /** - * Gets the LogFilesClient object to access its operations. - * - * @return the LogFilesClient object. - */ - LogFilesClient getLogFiles(); - - /** - * Gets the ServerThreatProtectionSettingsClient object to access its operations. - * - * @return the ServerThreatProtectionSettingsClient object. - */ - ServerThreatProtectionSettingsClient getServerThreatProtectionSettings(); - - /** - * Gets the TuningOptionsClient object to access its operations. - * - * @return the TuningOptionsClient object. - */ - TuningOptionsClient getTuningOptions(); - - /** - * Gets the TuningIndexesClient object to access its operations. + * Gets the ServersClient object to access its operations. * - * @return the TuningIndexesClient object. + * @return the ServersClient object. */ - TuningIndexesClient getTuningIndexes(); + ServersClient getServers(); /** - * Gets the TuningConfigurationsClient object to access its operations. + * Gets the TuningOptionsOperationsClient object to access its operations. * - * @return the TuningConfigurationsClient object. + * @return the TuningOptionsOperationsClient object. */ - TuningConfigurationsClient getTuningConfigurations(); + TuningOptionsOperationsClient getTuningOptionsOperations(); /** * Gets the VirtualEndpointsClient object to access its operations. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/GetPrivateDnsZoneSuffixesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateDnsZoneSuffixesClient.java similarity index 68% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/GetPrivateDnsZoneSuffixesClient.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateDnsZoneSuffixesClient.java index 70434c5dac6c..361e6ae6beaa 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/GetPrivateDnsZoneSuffixesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateDnsZoneSuffixesClient.java @@ -11,49 +11,48 @@ import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in GetPrivateDnsZoneSuffixesClient. + * An instance of this class provides access to all the operations defined in PrivateDnsZoneSuffixesClient. */ -public interface GetPrivateDnsZoneSuffixesClient { +public interface PrivateDnsZoneSuffixesClient { /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private DNS zone suffix in the cloud along with {@link Response} on successful completion of - * {@link Mono}. + * @return the private DNS zone suffix along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> executeWithResponseAsync(); + Mono> getWithResponseAsync(); /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private DNS zone suffix in the cloud on successful completion of {@link Mono}. + * @return the private DNS zone suffix on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono executeAsync(); + Mono getAsync(); /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private DNS zone suffix in the cloud along with {@link Response}. + * @return the private DNS zone suffix along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response executeWithResponse(Context context); + Response getWithResponse(Context context); /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private DNS zone suffix in the cloud. + * @return the private DNS zone suffix. */ @ServiceMethod(returns = ReturnType.SINGLE) - String execute(); + String get(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionOperationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionOperationsClient.java deleted file mode 100644 index d1b705ccd161..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionOperationsClient.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; -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 PrivateEndpointConnectionOperationsClient. - */ -public interface PrivateEndpointConnectionOperationsClient { - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( - String resourceGroupName, String serverName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters); - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateEndpointConnectionInner> beginUpdate( - String resourceGroupName, String serverName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters); - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateEndpointConnectionInner> beginUpdate( - String resourceGroupName, String serverName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, Context context); - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, - String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, - String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @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 serverName, - String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @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 serverName, - String privateEndpointConnectionName, Context context); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 serverName, String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 serverName, String privateEndpointConnectionName, Context context); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java index 5a25c9c8fee8..c2813a96317d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java @@ -9,8 +9,13 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -79,33 +84,253 @@ PrivateEndpointConnectionInner get(String resourceGroupName, String serverName, String privateEndpointConnectionName); /** - * Gets all private endpoint connections on a server. + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private endpoint connection resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( + String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters); + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateEndpointConnectionInner> beginUpdate( + String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters); + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateEndpointConnectionInner> beginUpdate( + String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, Context context); + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private endpoint connection resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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 serverName, + String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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 serverName, + String privateEndpointConnectionName, Context context); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 serverName, String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 serverName, String privateEndpointConnectionName, Context context); + + /** + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a server as paginated response with {@link PagedFlux}. + * @return list of private endpoint connections as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * Gets all private endpoint connections on a server. + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. + * @return list of private endpoint connections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets all private endpoint connections on a server. + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -113,7 +338,7 @@ PrivateEndpointConnectionInner get(String resourceGroupName, String serverName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. + * @return list of private endpoint connections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName, diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ReplicasClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ReplicasClient.java index 132a9a189fcc..abcdb60f96f0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ReplicasClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ReplicasClient.java @@ -16,7 +16,7 @@ */ public interface ReplicasClient { /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -29,7 +29,7 @@ public interface ReplicasClient { PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -42,7 +42,7 @@ public interface ReplicasClient { PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ResourceProvidersClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ResourceProvidersClient.java deleted file mode 100644 index 32448fe34435..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ResourceProvidersClient.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ResourceProvidersClient. - */ -public interface ResourceProvidersClient { - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration name's availability along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> checkMigrationNameAvailabilityWithResponseAsync( - String subscriptionId, String resourceGroupName, String targetDbServerName, - MigrationNameAvailabilityResourceInner parameters); - - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration name's availability on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono checkMigrationNameAvailabilityAsync(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationNameAvailabilityResourceInner parameters); - - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration name's availability along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response checkMigrationNameAvailabilityWithResponse(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationNameAvailabilityResourceInner parameters, - Context context); - - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration name's availability. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationNameAvailabilityResourceInner checkMigrationNameAvailability(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationNameAvailabilityResourceInner parameters); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerThreatProtectionSettingsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerThreatProtectionSettingsClient.java index e3f5a7ee75cd..6aef7aace93c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerThreatProtectionSettingsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerThreatProtectionSettingsClient.java @@ -6,14 +6,12 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerThreatProtectionSettingsModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -23,225 +21,122 @@ * An instance of this class provides access to all the operations defined in ServerThreatProtectionSettingsClient. */ public interface ServerThreatProtectionSettingsClient { - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 server's Threat Protection state as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 server's Threat Protection state as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 server's Threat Protection state as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String serverName, ThreatProtectionName threatProtectionName); - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName); - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, Context context); - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServerThreatProtectionSettingsModelInner get(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName); - /** * Creates or updates a server's Advanced Threat Protection settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server's Advanced Threat Protection settings along with {@link Response} on successful completion of + * @return advanced threat protection settings of the server along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters); + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters); /** * Creates or updates a server's Advanced Threat Protection settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 server's Advanced Threat Protection settings. + * @return the {@link PollerFlux} for polling of advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ServerThreatProtectionSettingsModelInner> + PollerFlux, AdvancedThreatProtectionSettingsModelInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, - ServerThreatProtectionSettingsModelInner parameters); + AdvancedThreatProtectionSettingsModelInner parameters); /** * Creates or updates a server's Advanced Threat Protection settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of server's Advanced Threat Protection settings. + * @return the {@link SyncPoller} for polling of advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerThreatProtectionSettingsModelInner> + SyncPoller, AdvancedThreatProtectionSettingsModelInner> beginCreateOrUpdate(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, - ServerThreatProtectionSettingsModelInner parameters); + AdvancedThreatProtectionSettingsModelInner parameters); /** * Creates or updates a server's Advanced Threat Protection settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of server's Advanced Threat Protection settings. + * @return the {@link SyncPoller} for polling of advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerThreatProtectionSettingsModelInner> + SyncPoller, AdvancedThreatProtectionSettingsModelInner> beginCreateOrUpdate(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, - ServerThreatProtectionSettingsModelInner parameters, Context context); + AdvancedThreatProtectionSettingsModelInner parameters, Context context); /** * Creates or updates a server's Advanced Threat Protection settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server's Advanced Threat Protection settings on successful completion of {@link Mono}. + * @return advanced threat protection settings of the server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters); /** * Creates or updates a server's Advanced Threat Protection settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server's Advanced Threat Protection settings. + * @return advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters); + AdvancedThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters); /** * Creates or updates a server's Advanced Threat Protection settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server's Advanced Threat Protection settings. + * @return advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters, + AdvancedThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServersClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServersClient.java index ea34f8fe5d43..98cddb79c017 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServersClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServersClient.java @@ -15,7 +15,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForUpdate; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForPatch; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -29,14 +29,14 @@ public interface ServersClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createWithResponseAsync(String resourceGroupName, String serverName, + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, ServerInner parameters); /** @@ -44,29 +44,29 @@ Mono>> createWithResponseAsync(String resourceGroupNam * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 represents a server. + * @return the {@link PollerFlux} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ServerInner> beginCreateAsync(String resourceGroupName, String serverName, - ServerInner parameters); + PollerFlux, ServerInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, ServerInner parameters); /** * Creates a new server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a server. + * @return the {@link SyncPoller} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerInner> beginCreate(String resourceGroupName, String serverName, + SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, String serverName, ServerInner parameters); /** @@ -74,15 +74,15 @@ SyncPoller, ServerInner> beginCreate(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a server. + * @return the {@link SyncPoller} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerInner> beginCreate(String resourceGroupName, String serverName, + SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, String serverName, ServerInner parameters, Context context); /** @@ -90,157 +90,157 @@ SyncPoller, ServerInner> beginCreate(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server on successful completion of {@link Mono}. + * @return properties of a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync(String resourceGroupName, String serverName, ServerInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, ServerInner parameters); /** * Creates a new server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return properties of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerInner create(String resourceGroupName, String serverName, ServerInner parameters); + ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters); /** * Creates a new server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return properties of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerInner create(String resourceGroupName, String serverName, ServerInner parameters, Context context); + ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters, Context context); /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - ServerForUpdate parameters); + ServerForPatch parameters); /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 represents a server. + * @return the {@link PollerFlux} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ServerInner> beginUpdateAsync(String resourceGroupName, String serverName, - ServerForUpdate parameters); + ServerForPatch parameters); /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a server. + * @return the {@link SyncPoller} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, - ServerForUpdate parameters); + ServerForPatch parameters); /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a server. + * @return the {@link SyncPoller} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, - ServerForUpdate parameters, Context context); + ServerForPatch parameters, Context context); /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server on successful completion of {@link Mono}. + * @return properties of a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, ServerForUpdate parameters); + Mono updateAsync(String resourceGroupName, String serverName, ServerForPatch parameters); /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return properties of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerInner update(String resourceGroupName, String serverName, ServerForUpdate parameters); + ServerInner update(String resourceGroupName, String serverName, ServerForPatch parameters); /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return properties of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerInner update(String resourceGroupName, String serverName, ServerForUpdate parameters, Context context); + ServerInner update(String resourceGroupName, String serverName, ServerForPatch parameters, Context context); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -253,7 +253,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -266,7 +266,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -279,7 +279,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou SyncPoller, Void> beginDelete(String resourceGroupName, String serverName); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -293,7 +293,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, Context context); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -306,7 +306,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou Mono deleteAsync(String resourceGroupName, String serverName); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -318,7 +318,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou void delete(String resourceGroupName, String serverName); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -331,33 +331,34 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou void delete(String resourceGroupName, String serverName, Context context); /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response} on successful completion of {@link Mono}. + * @return information about an existing server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String serverName); /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server on successful completion of {@link Mono}. + * @return information about an existing server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono getByResourceGroupAsync(String resourceGroupName, String serverName); /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -365,26 +366,26 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about an existing server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, Context context); /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about an existing server. */ @ServiceMethod(returns = ReturnType.SINGLE) ServerInner getByResourceGroup(String resourceGroupName, String serverName); /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -396,7 +397,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou PagedFlux listByResourceGroupAsync(String resourceGroupName); /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -408,7 +409,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -421,7 +422,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -431,7 +432,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou PagedFlux listAsync(); /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -441,7 +442,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou PagedIterable list(); /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -453,11 +454,11 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou PagedIterable list(Context context); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -468,11 +469,11 @@ Mono>> restartWithResponseAsync(String resourceGroupNa RestartParameter parameters); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -483,7 +484,7 @@ PollerFlux, Void> beginRestartAsync(String resourceGroupName, S RestartParameter parameters); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -496,7 +497,7 @@ PollerFlux, Void> beginRestartAsync(String resourceGroupName, S PollerFlux, Void> beginRestartAsync(String resourceGroupName, String serverName); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -509,11 +510,11 @@ PollerFlux, Void> beginRestartAsync(String resourceGroupName, S SyncPoller, Void> beginRestart(String resourceGroupName, String serverName); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -525,11 +526,11 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String RestartParameter parameters, Context context); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -539,7 +540,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String Mono restartAsync(String resourceGroupName, String serverName, RestartParameter parameters); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -552,7 +553,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String Mono restartAsync(String resourceGroupName, String serverName); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -564,11 +565,11 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String void restart(String resourceGroupName, String serverName); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -578,7 +579,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String void restart(String resourceGroupName, String serverName, RestartParameter parameters, Context context); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -591,7 +592,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String Mono>> startWithResponseAsync(String resourceGroupName, String serverName); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -604,7 +605,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String PollerFlux, Void> beginStartAsync(String resourceGroupName, String serverName); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -617,7 +618,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String SyncPoller, Void> beginStart(String resourceGroupName, String serverName); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -631,7 +632,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String SyncPoller, Void> beginStart(String resourceGroupName, String serverName, Context context); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -644,7 +645,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String Mono startAsync(String resourceGroupName, String serverName); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -656,7 +657,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String void start(String resourceGroupName, String serverName); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningConfigurationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningConfigurationsClient.java deleted file mode 100644 index 04b33e408c1a..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningConfigurationsClient.java +++ /dev/null @@ -1,540 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionDetailsResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigTuningRequestParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; -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 TuningConfigurationsClient. - */ -public interface TuningConfigurationsClient { - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> enableWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginEnableAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @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> beginEnable(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @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> beginEnable(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context); - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono enableAsync(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 enable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 enable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context); - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> disableWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDisableAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @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> beginDisable(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @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> beginDisable(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context); - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono disableAsync(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 disable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 disable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context); - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> startSessionWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest); - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginStartSessionAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest); - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStartSession(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest); - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStartSession(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest, Context context); - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono startSessionAsync(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest); - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning 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 startSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest); - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void startSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest, Context context); - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> stopSessionWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginStopSessionAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @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> beginStopSession(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @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> beginStopSession(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context); - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono stopSessionAsync(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 stopSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 stopSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context); - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return up the config tuning session status as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listSessionsAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return up the config tuning session status as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSessions(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return up the config tuning session status as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSessions(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context); - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the session details of a config tuning session as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listSessionDetailsAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId); - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the session details of a config tuning session as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSessionDetails(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId); - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the session details of a config tuning session as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSessionDetails(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId, Context context); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningIndexesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningIndexesClient.java deleted file mode 100644 index 5e2dcfa2711b..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningIndexesClient.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.IndexRecommendationResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * An instance of this class provides access to all the operations defined in TuningIndexesClient. - */ -public interface TuningIndexesClient { - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available index recommendations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listRecommendationsAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, RecommendationType recommendationType); - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 available index recommendations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listRecommendationsAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 available index recommendations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRecommendations(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available index recommendations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRecommendations(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, RecommendationType recommendationType, Context context); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningConfigurations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningOptionsOperationsClient.java similarity index 56% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningConfigurations.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningOptionsOperationsClient.java index 633b08c5980b..c714d3282f2d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningConfigurations.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningOptionsOperationsClient.java @@ -2,17 +2,26 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.fluent; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; +import reactor.core.publisher.Mono; /** - * Resource collection API of TuningConfigurations. + * An instance of this class provides access to all the operations defined in TuningOptionsOperationsClient. */ -public interface TuningConfigurations { +public interface TuningOptionsOperationsClient { /** - * Enables the config tuning. + * Gets the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -20,24 +29,14 @@ public interface TuningConfigurations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the tuning options of a server along with {@link Response} on successful completion of {@link Mono}. */ - void enable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption); /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void enable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context); - - /** - * Disables the config tuning. + * Gets the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -45,11 +44,14 @@ public interface TuningConfigurations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the tuning options of a server on successful completion of {@link Mono}. */ - void disable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption); /** - * Disables the config tuning. + * Gets the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -58,40 +60,44 @@ public interface TuningConfigurations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the tuning options of a server along with {@link Response}. */ - void disable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, Context context); /** - * Starts up the config tuning session. + * Gets the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the tuning options of a server. */ - void startSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest); + @ServiceMethod(returns = ReturnType.SINGLE) + TuningOptionsInner get(String resourceGroupName, String serverName, TuningOptionParameterEnum tuningOption); /** - * Starts up the config tuning session. + * Lists available object recommendations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @param context The context to associate with this operation. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available object recommendations as paginated response with {@link PagedFlux}. */ - void startSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listRecommendationsAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType); /** - * Stops the config tuning session. + * Lists available object recommendations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -99,79 +105,81 @@ void startSession(String resourceGroupName, String serverName, TuningOptionEnum * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 available object recommendations as paginated response with {@link PagedFlux}. */ - void stopSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listRecommendationsAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption); /** - * Stops the config tuning session. + * Lists available object recommendations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 available object recommendations as paginated response with {@link PagedIterable}. */ - void stopSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption); /** - * Gets up the config tuning session status. + * Lists available object recommendations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param tuningOption The name of the tuning option. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return up the config tuning session status as paginated response with {@link PagedIterable}. + * @return list of available object recommendations as paginated response with {@link PagedIterable}. */ - PagedIterable listSessions(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType, Context context); /** - * Gets up the config tuning session status. + * Lists the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return up the config tuning session status as paginated response with {@link PagedIterable}. + * @return list of server tuning options as paginated response with {@link PagedFlux}. */ - PagedIterable listSessions(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * Gets the session details of a config tuning session. + * Lists the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the session details of a config tuning session as paginated response with {@link PagedIterable}. + * @return list of server tuning options as paginated response with {@link PagedIterable}. */ - PagedIterable listSessionDetails(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets the session details of a config tuning session. + * Lists the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the session details of a config tuning session as paginated response with {@link PagedIterable}. + * @return list of server tuning options as paginated response with {@link PagedIterable}. */ - PagedIterable listSessionDetails(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualEndpointsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualEndpointsClient.java index be754ff80ca1..26f31f8654a1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualEndpointsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualEndpointsClient.java @@ -13,7 +13,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResourceForPatch; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -24,135 +24,131 @@ */ public interface VirtualEndpointsClient { /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server along with {@link Response} on successful completion of + * @return pair of virtual endpoints for a server along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createWithResponseAsync(String resourceGroupName, String serverName, - String virtualEndpointName, VirtualEndpointResourceInner parameters); + String virtualEndpointName, VirtualEndpointInner parameters); /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 represents a virtual endpoint for a server. + * @return the {@link PollerFlux} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, VirtualEndpointResourceInner> beginCreateAsync( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters); + PollerFlux, VirtualEndpointInner> beginCreateAsync(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointInner parameters); /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a virtual endpoint for a server. + * @return the {@link SyncPoller} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualEndpointResourceInner> beginCreate( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters); + SyncPoller, VirtualEndpointInner> beginCreate(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointInner parameters); /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a virtual endpoint for a server. + * @return the {@link SyncPoller} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualEndpointResourceInner> beginCreate( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters, Context context); + SyncPoller, VirtualEndpointInner> beginCreate(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointInner parameters, Context context); /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server on successful completion of {@link Mono}. + * @return pair of virtual endpoints for a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync(String resourceGroupName, String serverName, - String virtualEndpointName, VirtualEndpointResourceInner parameters); + Mono createAsync(String resourceGroupName, String serverName, String virtualEndpointName, + VirtualEndpointInner parameters); /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server. + * @return pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualEndpointResourceInner create(String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters); + VirtualEndpointInner create(String resourceGroupName, String serverName, String virtualEndpointName, + VirtualEndpointInner parameters); /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server. + * @return pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualEndpointResourceInner create(String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters, Context context); + VirtualEndpointInner create(String resourceGroupName, String serverName, String virtualEndpointName, + VirtualEndpointInner parameters, Context context); /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server along with {@link Response} on successful completion of + * @return pair of virtual endpoints for a server along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -160,118 +156,109 @@ Mono>> updateWithResponseAsync(String resourceGroupNam String virtualEndpointName, VirtualEndpointResourceForPatch parameters); /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 represents a virtual endpoint for a server. + * @return the {@link PollerFlux} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, VirtualEndpointResourceInner> beginUpdateAsync( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceForPatch parameters); + PollerFlux, VirtualEndpointInner> beginUpdateAsync(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters); /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a virtual endpoint for a server. + * @return the {@link SyncPoller} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualEndpointResourceInner> beginUpdate( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceForPatch parameters); + SyncPoller, VirtualEndpointInner> beginUpdate(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters); /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a virtual endpoint for a server. + * @return the {@link SyncPoller} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualEndpointResourceInner> beginUpdate( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceForPatch parameters, Context context); + SyncPoller, VirtualEndpointInner> beginUpdate(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters, Context context); /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server on successful completion of {@link Mono}. + * @return pair of virtual endpoints for a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, - String virtualEndpointName, VirtualEndpointResourceForPatch parameters); + Mono updateAsync(String resourceGroupName, String serverName, String virtualEndpointName, + VirtualEndpointResourceForPatch parameters); /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server. + * @return pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualEndpointResourceInner update(String resourceGroupName, String serverName, String virtualEndpointName, + VirtualEndpointInner update(String resourceGroupName, String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters); /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server. + * @return pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualEndpointResourceInner update(String resourceGroupName, String serverName, String virtualEndpointName, + VirtualEndpointInner update(String resourceGroupName, String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters, Context context); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -282,11 +269,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam String virtualEndpointName); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -297,11 +284,11 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St String virtualEndpointName); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -312,11 +299,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String virtualEndpointName); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -328,11 +315,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String virtualEndpointName, Context context); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -342,11 +329,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Mono deleteAsync(String resourceGroupName, String serverName, String virtualEndpointName); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -355,11 +342,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String virtualEndpointName); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -369,94 +356,93 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String virtualEndpointName, Context context); /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint along with {@link Response} on successful completion of + * @return information about a pair of virtual endpoints along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, + Mono> getWithResponseAsync(String resourceGroupName, String serverName, String virtualEndpointName); /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint on successful completion of {@link Mono}. + * @return information about a pair of virtual endpoints on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - String virtualEndpointName); + Mono getAsync(String resourceGroupName, String serverName, String virtualEndpointName); /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint along with {@link Response}. + * @return information about a pair of virtual endpoints along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, + Response getWithResponse(String resourceGroupName, String serverName, String virtualEndpointName, Context context); /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint. + * @return information about a pair of virtual endpoints. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualEndpointResourceInner get(String resourceGroupName, String serverName, String virtualEndpointName); + VirtualEndpointInner get(String resourceGroupName, String serverName, String virtualEndpointName); /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 virtual endpoints as paginated response with {@link PagedFlux}. + * @return list of virtual endpoints as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); + PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 virtual endpoints as paginated response with {@link PagedIterable}. + * @return list of virtual endpoints as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -464,9 +450,8 @@ Response getWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of virtual endpoints as paginated response with {@link PagedIterable}. + * @return list of virtual endpoints as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java index 7f71771c874a..668b0f49e094 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java @@ -8,7 +8,7 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageResultInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageModelInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; import reactor.core.publisher.Mono; @@ -17,36 +17,35 @@ */ public interface VirtualNetworkSubnetUsagesClient { /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network subnet usage for a given vNet resource id along with {@link Response} on successful - * completion of {@link Mono}. + * @return virtual network subnet usage data along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> executeWithResponseAsync(String locationName, + Mono> listWithResponseAsync(String locationName, VirtualNetworkSubnetUsageParameter parameters); /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network subnet usage for a given vNet resource id on successful completion of {@link Mono}. + * @return virtual network subnet usage data on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono executeAsync(String locationName, + Mono listAsync(String locationName, VirtualNetworkSubnetUsageParameter parameters); /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. @@ -54,22 +53,22 @@ Mono executeAsync(String locationName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network subnet usage for a given vNet resource id along with {@link Response}. + * @return virtual network subnet usage data along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response executeWithResponse(String locationName, + Response listWithResponse(String locationName, VirtualNetworkSubnetUsageParameter parameters, Context context); /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network subnet usage for a given vNet resource id. + * @return virtual network subnet usage data. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualNetworkSubnetUsageResultInner execute(String locationName, VirtualNetworkSubnetUsageParameter parameters); + VirtualNetworkSubnetUsageModelInner list(String locationName, VirtualNetworkSubnetUsageParameter parameters); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ActiveDirectoryAdministratorInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraInner.java similarity index 60% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ActiveDirectoryAdministratorInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraInner.java index fcece1847892..bcb0d456cf18 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ActiveDirectoryAdministratorInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraInner.java @@ -15,14 +15,14 @@ import java.io.IOException; /** - * Represents an Microsoft Entra Administrator. + * Server administrator associated to a Microsoft Entra principal. */ @Fluent -public final class ActiveDirectoryAdministratorInner extends ProxyResource { +public final class AdministratorMicrosoftEntraInner extends ProxyResource { /* - * Properties of the Microsoft Entra Administrator. + * Properties of a server administrator associated to a Microsoft Entra principal. */ - private AdministratorProperties innerProperties = new AdministratorProperties(); + private AdministratorMicrosoftEntraProperties innerProperties = new AdministratorMicrosoftEntraProperties(); /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -45,17 +45,17 @@ public final class ActiveDirectoryAdministratorInner extends ProxyResource { private String id; /** - * Creates an instance of ActiveDirectoryAdministratorInner class. + * Creates an instance of AdministratorMicrosoftEntraInner class. */ - public ActiveDirectoryAdministratorInner() { + public AdministratorMicrosoftEntraInner() { } /** - * Get the innerProperties property: Properties of the Microsoft Entra Administrator. + * Get the innerProperties property: Properties of a server administrator associated to a Microsoft Entra principal. * * @return the innerProperties value. */ - private AdministratorProperties innerProperties() { + private AdministratorMicrosoftEntraProperties innerProperties() { return this.innerProperties; } @@ -99,7 +99,8 @@ public String id() { } /** - * Get the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. + * Get the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. * * @return the principalType value. */ @@ -108,21 +109,22 @@ public PrincipalType principalType() { } /** - * Set the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. + * Set the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. * * @param principalType the principalType value to set. - * @return the ActiveDirectoryAdministratorInner object itself. + * @return the AdministratorMicrosoftEntraInner object itself. */ - public ActiveDirectoryAdministratorInner withPrincipalType(PrincipalType principalType) { + public AdministratorMicrosoftEntraInner withPrincipalType(PrincipalType principalType) { if (this.innerProperties() == null) { - this.innerProperties = new AdministratorProperties(); + this.innerProperties = new AdministratorMicrosoftEntraProperties(); } this.innerProperties().withPrincipalType(principalType); return this; } /** - * Get the principalName property: Microsoft Entra Administrator principal name. + * Get the principalName property: Name of the Microsoft Entra principal. * * @return the principalName value. */ @@ -131,21 +133,21 @@ public String principalName() { } /** - * Set the principalName property: Microsoft Entra Administrator principal name. + * Set the principalName property: Name of the Microsoft Entra principal. * * @param principalName the principalName value to set. - * @return the ActiveDirectoryAdministratorInner object itself. + * @return the AdministratorMicrosoftEntraInner object itself. */ - public ActiveDirectoryAdministratorInner withPrincipalName(String principalName) { + public AdministratorMicrosoftEntraInner withPrincipalName(String principalName) { if (this.innerProperties() == null) { - this.innerProperties = new AdministratorProperties(); + this.innerProperties = new AdministratorMicrosoftEntraProperties(); } this.innerProperties().withPrincipalName(principalName); return this; } /** - * Get the objectId property: The objectId of the Microsoft Entra Administrator. + * Get the objectId property: Object identifier of the Microsoft Entra principal. * * @return the objectId value. */ @@ -154,21 +156,21 @@ public String objectId() { } /** - * Set the objectId property: The objectId of the Microsoft Entra Administrator. + * Set the objectId property: Object identifier of the Microsoft Entra principal. * * @param objectId the objectId value to set. - * @return the ActiveDirectoryAdministratorInner object itself. + * @return the AdministratorMicrosoftEntraInner object itself. */ - public ActiveDirectoryAdministratorInner withObjectId(String objectId) { + public AdministratorMicrosoftEntraInner withObjectId(String objectId) { if (this.innerProperties() == null) { - this.innerProperties = new AdministratorProperties(); + this.innerProperties = new AdministratorMicrosoftEntraProperties(); } this.innerProperties().withObjectId(objectId); return this; } /** - * Get the tenantId property: The tenantId of the Microsoft Entra Administrator. + * Get the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * * @return the tenantId value. */ @@ -177,14 +179,14 @@ public String tenantId() { } /** - * Set the tenantId property: The tenantId of the Microsoft Entra Administrator. + * Set the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * * @param tenantId the tenantId value to set. - * @return the ActiveDirectoryAdministratorInner object itself. + * @return the AdministratorMicrosoftEntraInner object itself. */ - public ActiveDirectoryAdministratorInner withTenantId(String tenantId) { + public AdministratorMicrosoftEntraInner withTenantId(String tenantId) { if (this.innerProperties() == null) { - this.innerProperties = new AdministratorProperties(); + this.innerProperties = new AdministratorMicrosoftEntraProperties(); } this.innerProperties().withTenantId(tenantId); return this; @@ -199,13 +201,13 @@ public void validate() { if (innerProperties() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( - "Missing required property innerProperties in model ActiveDirectoryAdministratorInner")); + "Missing required property innerProperties in model AdministratorMicrosoftEntraInner")); } else { innerProperties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryAdministratorInner.class); + private static final ClientLogger LOGGER = new ClientLogger(AdministratorMicrosoftEntraInner.class); /** * {@inheritDoc} @@ -218,39 +220,39 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ActiveDirectoryAdministratorInner from the JsonReader. + * Reads an instance of AdministratorMicrosoftEntraInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ActiveDirectoryAdministratorInner if the JsonReader was pointing to an instance of it, or + * @return An instance of AdministratorMicrosoftEntraInner if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ActiveDirectoryAdministratorInner. + * @throws IOException If an error occurs while reading the AdministratorMicrosoftEntraInner. */ - public static ActiveDirectoryAdministratorInner fromJson(JsonReader jsonReader) throws IOException { + public static AdministratorMicrosoftEntraInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ActiveDirectoryAdministratorInner deserializedActiveDirectoryAdministratorInner - = new ActiveDirectoryAdministratorInner(); + AdministratorMicrosoftEntraInner deserializedAdministratorMicrosoftEntraInner + = new AdministratorMicrosoftEntraInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedActiveDirectoryAdministratorInner.id = reader.getString(); + deserializedAdministratorMicrosoftEntraInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedActiveDirectoryAdministratorInner.name = reader.getString(); + deserializedAdministratorMicrosoftEntraInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedActiveDirectoryAdministratorInner.type = reader.getString(); + deserializedAdministratorMicrosoftEntraInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedActiveDirectoryAdministratorInner.innerProperties - = AdministratorProperties.fromJson(reader); + deserializedAdministratorMicrosoftEntraInner.innerProperties + = AdministratorMicrosoftEntraProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedActiveDirectoryAdministratorInner.systemData = SystemData.fromJson(reader); + deserializedAdministratorMicrosoftEntraInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedActiveDirectoryAdministratorInner; + return deserializedAdministratorMicrosoftEntraInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraProperties.java similarity index 51% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorProperties.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraProperties.java index 18c36c31a1d9..dde7c8d7e3f1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraProperties.java @@ -13,38 +13,40 @@ import java.io.IOException; /** - * The properties of an Microsoft Entra Administrator. + * Properties of a server administrator associated to a Microsoft Entra principal. */ @Fluent -public final class AdministratorProperties implements JsonSerializable { +public final class AdministratorMicrosoftEntraProperties + implements JsonSerializable { /* - * The principal type used to represent the type of Microsoft Entra Administrator. + * Type of Microsoft Entra principal to which the server administrator is associated. */ private PrincipalType principalType; /* - * Microsoft Entra Administrator principal name. + * Name of the Microsoft Entra principal. */ private String principalName; /* - * The objectId of the Microsoft Entra Administrator. + * Object identifier of the Microsoft Entra principal. */ private String objectId; /* - * The tenantId of the Microsoft Entra Administrator. + * Identifier of the tenant in which the Microsoft Entra principal exists. */ private String tenantId; /** - * Creates an instance of AdministratorProperties class. + * Creates an instance of AdministratorMicrosoftEntraProperties class. */ - public AdministratorProperties() { + public AdministratorMicrosoftEntraProperties() { } /** - * Get the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. + * Get the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. * * @return the principalType value. */ @@ -53,18 +55,19 @@ public PrincipalType principalType() { } /** - * Set the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. + * Set the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. * * @param principalType the principalType value to set. - * @return the AdministratorProperties object itself. + * @return the AdministratorMicrosoftEntraProperties object itself. */ - public AdministratorProperties withPrincipalType(PrincipalType principalType) { + public AdministratorMicrosoftEntraProperties withPrincipalType(PrincipalType principalType) { this.principalType = principalType; return this; } /** - * Get the principalName property: Microsoft Entra Administrator principal name. + * Get the principalName property: Name of the Microsoft Entra principal. * * @return the principalName value. */ @@ -73,18 +76,18 @@ public String principalName() { } /** - * Set the principalName property: Microsoft Entra Administrator principal name. + * Set the principalName property: Name of the Microsoft Entra principal. * * @param principalName the principalName value to set. - * @return the AdministratorProperties object itself. + * @return the AdministratorMicrosoftEntraProperties object itself. */ - public AdministratorProperties withPrincipalName(String principalName) { + public AdministratorMicrosoftEntraProperties withPrincipalName(String principalName) { this.principalName = principalName; return this; } /** - * Get the objectId property: The objectId of the Microsoft Entra Administrator. + * Get the objectId property: Object identifier of the Microsoft Entra principal. * * @return the objectId value. */ @@ -93,18 +96,18 @@ public String objectId() { } /** - * Set the objectId property: The objectId of the Microsoft Entra Administrator. + * Set the objectId property: Object identifier of the Microsoft Entra principal. * * @param objectId the objectId value to set. - * @return the AdministratorProperties object itself. + * @return the AdministratorMicrosoftEntraProperties object itself. */ - public AdministratorProperties withObjectId(String objectId) { + public AdministratorMicrosoftEntraProperties withObjectId(String objectId) { this.objectId = objectId; return this; } /** - * Get the tenantId property: The tenantId of the Microsoft Entra Administrator. + * Get the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * * @return the tenantId value. */ @@ -113,12 +116,12 @@ public String tenantId() { } /** - * Set the tenantId property: The tenantId of the Microsoft Entra Administrator. + * Set the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * * @param tenantId the tenantId value to set. - * @return the AdministratorProperties object itself. + * @return the AdministratorMicrosoftEntraProperties object itself. */ - public AdministratorProperties withTenantId(String tenantId) { + public AdministratorMicrosoftEntraProperties withTenantId(String tenantId) { this.tenantId = tenantId; return this; } @@ -145,34 +148,36 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of AdministratorProperties from the JsonReader. + * Reads an instance of AdministratorMicrosoftEntraProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of AdministratorProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the AdministratorProperties. + * @return An instance of AdministratorMicrosoftEntraProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AdministratorMicrosoftEntraProperties. */ - public static AdministratorProperties fromJson(JsonReader jsonReader) throws IOException { + public static AdministratorMicrosoftEntraProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - AdministratorProperties deserializedAdministratorProperties = new AdministratorProperties(); + AdministratorMicrosoftEntraProperties deserializedAdministratorMicrosoftEntraProperties + = new AdministratorMicrosoftEntraProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("principalType".equals(fieldName)) { - deserializedAdministratorProperties.principalType = PrincipalType.fromString(reader.getString()); + deserializedAdministratorMicrosoftEntraProperties.principalType + = PrincipalType.fromString(reader.getString()); } else if ("principalName".equals(fieldName)) { - deserializedAdministratorProperties.principalName = reader.getString(); + deserializedAdministratorMicrosoftEntraProperties.principalName = reader.getString(); } else if ("objectId".equals(fieldName)) { - deserializedAdministratorProperties.objectId = reader.getString(); + deserializedAdministratorMicrosoftEntraProperties.objectId = reader.getString(); } else if ("tenantId".equals(fieldName)) { - deserializedAdministratorProperties.tenantId = reader.getString(); + deserializedAdministratorMicrosoftEntraProperties.tenantId = reader.getString(); } else { reader.skipChildren(); } } - return deserializedAdministratorProperties; + return deserializedAdministratorMicrosoftEntraProperties; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorPropertiesForAdd.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraPropertiesForAdd.java similarity index 51% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorPropertiesForAdd.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraPropertiesForAdd.java index c4cd2307d160..b3d07d0961d7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorPropertiesForAdd.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraPropertiesForAdd.java @@ -13,33 +13,35 @@ import java.io.IOException; /** - * The properties of an Microsoft Entra Administrator. + * Properties of a server administrator associated to a Microsoft Entra principal. */ @Fluent -public final class AdministratorPropertiesForAdd implements JsonSerializable { +public final class AdministratorMicrosoftEntraPropertiesForAdd + implements JsonSerializable { /* - * The principal type used to represent the type of Microsoft Entra Administrator. + * Type of Microsoft Entra principal to which the server administrator is associated. */ private PrincipalType principalType; /* - * Microsoft Entra Administrator principal name. + * Name of the Microsoft Entra principal. */ private String principalName; /* - * The tenantId of the Microsoft Entra Administrator. + * Identifier of the tenant in which the Microsoft Entra principal exists. */ private String tenantId; /** - * Creates an instance of AdministratorPropertiesForAdd class. + * Creates an instance of AdministratorMicrosoftEntraPropertiesForAdd class. */ - public AdministratorPropertiesForAdd() { + public AdministratorMicrosoftEntraPropertiesForAdd() { } /** - * Get the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. + * Get the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. * * @return the principalType value. */ @@ -48,18 +50,19 @@ public PrincipalType principalType() { } /** - * Set the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. + * Set the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. * * @param principalType the principalType value to set. - * @return the AdministratorPropertiesForAdd object itself. + * @return the AdministratorMicrosoftEntraPropertiesForAdd object itself. */ - public AdministratorPropertiesForAdd withPrincipalType(PrincipalType principalType) { + public AdministratorMicrosoftEntraPropertiesForAdd withPrincipalType(PrincipalType principalType) { this.principalType = principalType; return this; } /** - * Get the principalName property: Microsoft Entra Administrator principal name. + * Get the principalName property: Name of the Microsoft Entra principal. * * @return the principalName value. */ @@ -68,18 +71,18 @@ public String principalName() { } /** - * Set the principalName property: Microsoft Entra Administrator principal name. + * Set the principalName property: Name of the Microsoft Entra principal. * * @param principalName the principalName value to set. - * @return the AdministratorPropertiesForAdd object itself. + * @return the AdministratorMicrosoftEntraPropertiesForAdd object itself. */ - public AdministratorPropertiesForAdd withPrincipalName(String principalName) { + public AdministratorMicrosoftEntraPropertiesForAdd withPrincipalName(String principalName) { this.principalName = principalName; return this; } /** - * Get the tenantId property: The tenantId of the Microsoft Entra Administrator. + * Get the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * * @return the tenantId value. */ @@ -88,12 +91,12 @@ public String tenantId() { } /** - * Set the tenantId property: The tenantId of the Microsoft Entra Administrator. + * Set the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * * @param tenantId the tenantId value to set. - * @return the AdministratorPropertiesForAdd object itself. + * @return the AdministratorMicrosoftEntraPropertiesForAdd object itself. */ - public AdministratorPropertiesForAdd withTenantId(String tenantId) { + public AdministratorMicrosoftEntraPropertiesForAdd withTenantId(String tenantId) { this.tenantId = tenantId; return this; } @@ -119,34 +122,34 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of AdministratorPropertiesForAdd from the JsonReader. + * Reads an instance of AdministratorMicrosoftEntraPropertiesForAdd from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of AdministratorPropertiesForAdd if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AdministratorPropertiesForAdd. + * @return An instance of AdministratorMicrosoftEntraPropertiesForAdd if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AdministratorMicrosoftEntraPropertiesForAdd. */ - public static AdministratorPropertiesForAdd fromJson(JsonReader jsonReader) throws IOException { + public static AdministratorMicrosoftEntraPropertiesForAdd fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - AdministratorPropertiesForAdd deserializedAdministratorPropertiesForAdd - = new AdministratorPropertiesForAdd(); + AdministratorMicrosoftEntraPropertiesForAdd deserializedAdministratorMicrosoftEntraPropertiesForAdd + = new AdministratorMicrosoftEntraPropertiesForAdd(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("principalType".equals(fieldName)) { - deserializedAdministratorPropertiesForAdd.principalType + deserializedAdministratorMicrosoftEntraPropertiesForAdd.principalType = PrincipalType.fromString(reader.getString()); } else if ("principalName".equals(fieldName)) { - deserializedAdministratorPropertiesForAdd.principalName = reader.getString(); + deserializedAdministratorMicrosoftEntraPropertiesForAdd.principalName = reader.getString(); } else if ("tenantId".equals(fieldName)) { - deserializedAdministratorPropertiesForAdd.tenantId = reader.getString(); + deserializedAdministratorMicrosoftEntraPropertiesForAdd.tenantId = reader.getString(); } else { reader.skipChildren(); } } - return deserializedAdministratorPropertiesForAdd; + return deserializedAdministratorMicrosoftEntraPropertiesForAdd; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionSettingsModelInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsModelInner.java similarity index 61% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionSettingsModelInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsModelInner.java index a7682fb96887..af5f78e234d0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionSettingsModelInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsModelInner.java @@ -15,14 +15,14 @@ import java.time.OffsetDateTime; /** - * Server's Advanced Threat Protection settings. + * Advanced threat protection settings of the server. */ @Fluent -public final class ServerThreatProtectionSettingsModelInner extends ProxyResource { +public final class AdvancedThreatProtectionSettingsModelInner extends ProxyResource { /* - * Advanced Threat Protection properties. + * Advanced threat protection properties. */ - private ServerThreatProtectionProperties innerProperties; + private AdvancedThreatProtectionSettingsProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -45,17 +45,17 @@ public final class ServerThreatProtectionSettingsModelInner extends ProxyResourc private String id; /** - * Creates an instance of ServerThreatProtectionSettingsModelInner class. + * Creates an instance of AdvancedThreatProtectionSettingsModelInner class. */ - public ServerThreatProtectionSettingsModelInner() { + public AdvancedThreatProtectionSettingsModelInner() { } /** - * Get the innerProperties property: Advanced Threat Protection properties. + * Get the innerProperties property: Advanced threat protection properties. * * @return the innerProperties value. */ - private ServerThreatProtectionProperties innerProperties() { + private AdvancedThreatProtectionSettingsProperties innerProperties() { return this.innerProperties; } @@ -99,8 +99,8 @@ public String id() { } /** - * Get the state property: Specifies the state of the Threat Protection, whether it is enabled or disabled or a - * state has not been applied yet on the specific server. + * Get the state property: Specifies the state of the advanced threat protection, whether it is enabled, disabled, + * or a state has not been applied yet on the server. * * @return the state value. */ @@ -109,22 +109,22 @@ public ThreatProtectionState state() { } /** - * Set the state property: Specifies the state of the Threat Protection, whether it is enabled or disabled or a - * state has not been applied yet on the specific server. + * Set the state property: Specifies the state of the advanced threat protection, whether it is enabled, disabled, + * or a state has not been applied yet on the server. * * @param state the state value to set. - * @return the ServerThreatProtectionSettingsModelInner object itself. + * @return the AdvancedThreatProtectionSettingsModelInner object itself. */ - public ServerThreatProtectionSettingsModelInner withState(ThreatProtectionState state) { + public AdvancedThreatProtectionSettingsModelInner withState(ThreatProtectionState state) { if (this.innerProperties() == null) { - this.innerProperties = new ServerThreatProtectionProperties(); + this.innerProperties = new AdvancedThreatProtectionSettingsProperties(); } this.innerProperties().withState(state); return this; } /** - * Get the creationTime property: Specifies the UTC creation time of the policy. + * Get the creationTime property: Specifies the creation time (UTC) of the policy. * * @return the creationTime value. */ @@ -154,39 +154,39 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ServerThreatProtectionSettingsModelInner from the JsonReader. + * Reads an instance of AdvancedThreatProtectionSettingsModelInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ServerThreatProtectionSettingsModelInner if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. + * @return An instance of AdvancedThreatProtectionSettingsModelInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ServerThreatProtectionSettingsModelInner. + * @throws IOException If an error occurs while reading the AdvancedThreatProtectionSettingsModelInner. */ - public static ServerThreatProtectionSettingsModelInner fromJson(JsonReader jsonReader) throws IOException { + public static AdvancedThreatProtectionSettingsModelInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ServerThreatProtectionSettingsModelInner deserializedServerThreatProtectionSettingsModelInner - = new ServerThreatProtectionSettingsModelInner(); + AdvancedThreatProtectionSettingsModelInner deserializedAdvancedThreatProtectionSettingsModelInner + = new AdvancedThreatProtectionSettingsModelInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedServerThreatProtectionSettingsModelInner.id = reader.getString(); + deserializedAdvancedThreatProtectionSettingsModelInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedServerThreatProtectionSettingsModelInner.name = reader.getString(); + deserializedAdvancedThreatProtectionSettingsModelInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedServerThreatProtectionSettingsModelInner.type = reader.getString(); + deserializedAdvancedThreatProtectionSettingsModelInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedServerThreatProtectionSettingsModelInner.innerProperties - = ServerThreatProtectionProperties.fromJson(reader); + deserializedAdvancedThreatProtectionSettingsModelInner.innerProperties + = AdvancedThreatProtectionSettingsProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedServerThreatProtectionSettingsModelInner.systemData = SystemData.fromJson(reader); + deserializedAdvancedThreatProtectionSettingsModelInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedServerThreatProtectionSettingsModelInner; + return deserializedAdvancedThreatProtectionSettingsModelInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsProperties.java similarity index 55% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionProperties.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsProperties.java index 1bb3dd4d3121..29152e888bab 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsProperties.java @@ -16,30 +16,31 @@ import java.time.OffsetDateTime; /** - * Properties of server Threat Protection state. + * Properties of advanced threat protection state for a server. */ @Fluent -public final class ServerThreatProtectionProperties implements JsonSerializable { +public final class AdvancedThreatProtectionSettingsProperties + implements JsonSerializable { /* - * Specifies the state of the Threat Protection, whether it is enabled or disabled or a state has not been applied - * yet on the specific server. + * Specifies the state of the advanced threat protection, whether it is enabled, disabled, or a state has not been + * applied yet on the server. */ private ThreatProtectionState state; /* - * Specifies the UTC creation time of the policy. + * Specifies the creation time (UTC) of the policy. */ private OffsetDateTime creationTime; /** - * Creates an instance of ServerThreatProtectionProperties class. + * Creates an instance of AdvancedThreatProtectionSettingsProperties class. */ - public ServerThreatProtectionProperties() { + public AdvancedThreatProtectionSettingsProperties() { } /** - * Get the state property: Specifies the state of the Threat Protection, whether it is enabled or disabled or a - * state has not been applied yet on the specific server. + * Get the state property: Specifies the state of the advanced threat protection, whether it is enabled, disabled, + * or a state has not been applied yet on the server. * * @return the state value. */ @@ -48,19 +49,19 @@ public ThreatProtectionState state() { } /** - * Set the state property: Specifies the state of the Threat Protection, whether it is enabled or disabled or a - * state has not been applied yet on the specific server. + * Set the state property: Specifies the state of the advanced threat protection, whether it is enabled, disabled, + * or a state has not been applied yet on the server. * * @param state the state value to set. - * @return the ServerThreatProtectionProperties object itself. + * @return the AdvancedThreatProtectionSettingsProperties object itself. */ - public ServerThreatProtectionProperties withState(ThreatProtectionState state) { + public AdvancedThreatProtectionSettingsProperties withState(ThreatProtectionState state) { this.state = state; return this; } /** - * Get the creationTime property: Specifies the UTC creation time of the policy. + * Get the creationTime property: Specifies the creation time (UTC) of the policy. * * @return the creationTime value. */ @@ -77,11 +78,11 @@ public void validate() { if (state() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( - "Missing required property state in model ServerThreatProtectionProperties")); + "Missing required property state in model AdvancedThreatProtectionSettingsProperties")); } } - private static final ClientLogger LOGGER = new ClientLogger(ServerThreatProtectionProperties.class); + private static final ClientLogger LOGGER = new ClientLogger(AdvancedThreatProtectionSettingsProperties.class); /** * {@inheritDoc} @@ -94,34 +95,34 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ServerThreatProtectionProperties from the JsonReader. + * Reads an instance of AdvancedThreatProtectionSettingsProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ServerThreatProtectionProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. + * @return An instance of AdvancedThreatProtectionSettingsProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ServerThreatProtectionProperties. + * @throws IOException If an error occurs while reading the AdvancedThreatProtectionSettingsProperties. */ - public static ServerThreatProtectionProperties fromJson(JsonReader jsonReader) throws IOException { + public static AdvancedThreatProtectionSettingsProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ServerThreatProtectionProperties deserializedServerThreatProtectionProperties - = new ServerThreatProtectionProperties(); + AdvancedThreatProtectionSettingsProperties deserializedAdvancedThreatProtectionSettingsProperties + = new AdvancedThreatProtectionSettingsProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("state".equals(fieldName)) { - deserializedServerThreatProtectionProperties.state + deserializedAdvancedThreatProtectionSettingsProperties.state = ThreatProtectionState.fromString(reader.getString()); } else if ("creationTime".equals(fieldName)) { - deserializedServerThreatProtectionProperties.creationTime = reader + deserializedAdvancedThreatProtectionSettingsProperties.creationTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } } - return deserializedServerThreatProtectionProperties; + return deserializedAdvancedThreatProtectionSettingsProperties; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandInner.java similarity index 62% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandInner.java index f50e0ed884a7..6c96f2cf0abd 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandInner.java @@ -10,19 +10,19 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Origin; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; import java.io.IOException; import java.time.OffsetDateTime; /** - * Server backup properties. + * Properties of a backup. */ @Fluent -public final class ServerBackupInner extends ProxyResource { +public final class BackupAutomaticAndOnDemandInner extends ProxyResource { /* - * The properties of a server backup. + * Properties of a backup. */ - private ServerBackupProperties innerProperties; + private BackupAutomaticAndOnDemandProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -45,17 +45,17 @@ public final class ServerBackupInner extends ProxyResource { private String id; /** - * Creates an instance of ServerBackupInner class. + * Creates an instance of BackupAutomaticAndOnDemandInner class. */ - public ServerBackupInner() { + public BackupAutomaticAndOnDemandInner() { } /** - * Get the innerProperties property: The properties of a server backup. + * Get the innerProperties property: Properties of a backup. * * @return the innerProperties value. */ - private ServerBackupProperties innerProperties() { + private BackupAutomaticAndOnDemandProperties innerProperties() { return this.innerProperties; } @@ -99,30 +99,30 @@ public String id() { } /** - * Get the backupType property: Backup type. + * Get the backupType property: Type of backup. * * @return the backupType value. */ - public Origin backupType() { + public BackupType backupType() { return this.innerProperties() == null ? null : this.innerProperties().backupType(); } /** - * Set the backupType property: Backup type. + * Set the backupType property: Type of backup. * * @param backupType the backupType value to set. - * @return the ServerBackupInner object itself. + * @return the BackupAutomaticAndOnDemandInner object itself. */ - public ServerBackupInner withBackupType(Origin backupType) { + public BackupAutomaticAndOnDemandInner withBackupType(BackupType backupType) { if (this.innerProperties() == null) { - this.innerProperties = new ServerBackupProperties(); + this.innerProperties = new BackupAutomaticAndOnDemandProperties(); } this.innerProperties().withBackupType(backupType); return this; } /** - * Get the completedTime property: Backup completed time (ISO8601 format). + * Get the completedTime property: Time(ISO8601 format) at which the backup was completed. * * @return the completedTime value. */ @@ -131,21 +131,21 @@ public OffsetDateTime completedTime() { } /** - * Set the completedTime property: Backup completed time (ISO8601 format). + * Set the completedTime property: Time(ISO8601 format) at which the backup was completed. * * @param completedTime the completedTime value to set. - * @return the ServerBackupInner object itself. + * @return the BackupAutomaticAndOnDemandInner object itself. */ - public ServerBackupInner withCompletedTime(OffsetDateTime completedTime) { + public BackupAutomaticAndOnDemandInner withCompletedTime(OffsetDateTime completedTime) { if (this.innerProperties() == null) { - this.innerProperties = new ServerBackupProperties(); + this.innerProperties = new BackupAutomaticAndOnDemandProperties(); } this.innerProperties().withCompletedTime(completedTime); return this; } /** - * Get the source property: Backup source. + * Get the source property: Source of the backup. * * @return the source value. */ @@ -154,14 +154,14 @@ public String source() { } /** - * Set the source property: Backup source. + * Set the source property: Source of the backup. * * @param source the source value to set. - * @return the ServerBackupInner object itself. + * @return the BackupAutomaticAndOnDemandInner object itself. */ - public ServerBackupInner withSource(String source) { + public BackupAutomaticAndOnDemandInner withSource(String source) { if (this.innerProperties() == null) { - this.innerProperties = new ServerBackupProperties(); + this.innerProperties = new BackupAutomaticAndOnDemandProperties(); } this.innerProperties().withSource(source); return this; @@ -189,37 +189,39 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ServerBackupInner from the JsonReader. + * Reads an instance of BackupAutomaticAndOnDemandInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ServerBackupInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * @return An instance of BackupAutomaticAndOnDemandInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ServerBackupInner. + * @throws IOException If an error occurs while reading the BackupAutomaticAndOnDemandInner. */ - public static ServerBackupInner fromJson(JsonReader jsonReader) throws IOException { + public static BackupAutomaticAndOnDemandInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ServerBackupInner deserializedServerBackupInner = new ServerBackupInner(); + BackupAutomaticAndOnDemandInner deserializedBackupAutomaticAndOnDemandInner + = new BackupAutomaticAndOnDemandInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedServerBackupInner.id = reader.getString(); + deserializedBackupAutomaticAndOnDemandInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedServerBackupInner.name = reader.getString(); + deserializedBackupAutomaticAndOnDemandInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedServerBackupInner.type = reader.getString(); + deserializedBackupAutomaticAndOnDemandInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedServerBackupInner.innerProperties = ServerBackupProperties.fromJson(reader); + deserializedBackupAutomaticAndOnDemandInner.innerProperties + = BackupAutomaticAndOnDemandProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedServerBackupInner.systemData = SystemData.fromJson(reader); + deserializedBackupAutomaticAndOnDemandInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedServerBackupInner; + return deserializedBackupAutomaticAndOnDemandInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandProperties.java similarity index 56% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupProperties.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandProperties.java index 745949a9fc92..b561fc68c263 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandProperties.java @@ -10,59 +10,60 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Origin; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; import java.io.IOException; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; /** - * The properties of a server backup. + * Properties of a backup. */ @Fluent -public final class ServerBackupProperties implements JsonSerializable { +public final class BackupAutomaticAndOnDemandProperties + implements JsonSerializable { /* - * Backup type. + * Type of backup. */ - private Origin backupType; + private BackupType backupType; /* - * Backup completed time (ISO8601 format). + * Time(ISO8601 format) at which the backup was completed. */ private OffsetDateTime completedTime; /* - * Backup source + * Source of the backup. */ private String source; /** - * Creates an instance of ServerBackupProperties class. + * Creates an instance of BackupAutomaticAndOnDemandProperties class. */ - public ServerBackupProperties() { + public BackupAutomaticAndOnDemandProperties() { } /** - * Get the backupType property: Backup type. + * Get the backupType property: Type of backup. * * @return the backupType value. */ - public Origin backupType() { + public BackupType backupType() { return this.backupType; } /** - * Set the backupType property: Backup type. + * Set the backupType property: Type of backup. * * @param backupType the backupType value to set. - * @return the ServerBackupProperties object itself. + * @return the BackupAutomaticAndOnDemandProperties object itself. */ - public ServerBackupProperties withBackupType(Origin backupType) { + public BackupAutomaticAndOnDemandProperties withBackupType(BackupType backupType) { this.backupType = backupType; return this; } /** - * Get the completedTime property: Backup completed time (ISO8601 format). + * Get the completedTime property: Time(ISO8601 format) at which the backup was completed. * * @return the completedTime value. */ @@ -71,18 +72,18 @@ public OffsetDateTime completedTime() { } /** - * Set the completedTime property: Backup completed time (ISO8601 format). + * Set the completedTime property: Time(ISO8601 format) at which the backup was completed. * * @param completedTime the completedTime value to set. - * @return the ServerBackupProperties object itself. + * @return the BackupAutomaticAndOnDemandProperties object itself. */ - public ServerBackupProperties withCompletedTime(OffsetDateTime completedTime) { + public BackupAutomaticAndOnDemandProperties withCompletedTime(OffsetDateTime completedTime) { this.completedTime = completedTime; return this; } /** - * Get the source property: Backup source. + * Get the source property: Source of the backup. * * @return the source value. */ @@ -91,12 +92,12 @@ public String source() { } /** - * Set the source property: Backup source. + * Set the source property: Source of the backup. * * @param source the source value to set. - * @return the ServerBackupProperties object itself. + * @return the BackupAutomaticAndOnDemandProperties object itself. */ - public ServerBackupProperties withSource(String source) { + public BackupAutomaticAndOnDemandProperties withSource(String source) { this.source = source; return this; } @@ -123,33 +124,35 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ServerBackupProperties from the JsonReader. + * Reads an instance of BackupAutomaticAndOnDemandProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ServerBackupProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ServerBackupProperties. + * @return An instance of BackupAutomaticAndOnDemandProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupAutomaticAndOnDemandProperties. */ - public static ServerBackupProperties fromJson(JsonReader jsonReader) throws IOException { + public static BackupAutomaticAndOnDemandProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ServerBackupProperties deserializedServerBackupProperties = new ServerBackupProperties(); + BackupAutomaticAndOnDemandProperties deserializedBackupAutomaticAndOnDemandProperties + = new BackupAutomaticAndOnDemandProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("backupType".equals(fieldName)) { - deserializedServerBackupProperties.backupType = Origin.fromString(reader.getString()); + deserializedBackupAutomaticAndOnDemandProperties.backupType + = BackupType.fromString(reader.getString()); } else if ("completedTime".equals(fieldName)) { - deserializedServerBackupProperties.completedTime = reader + deserializedBackupAutomaticAndOnDemandProperties.completedTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("source".equals(fieldName)) { - deserializedServerBackupProperties.source = reader.getString(); + deserializedBackupAutomaticAndOnDemandProperties.source = reader.getString(); } else { reader.skipChildren(); } } - return deserializedServerBackupProperties; + return deserializedBackupAutomaticAndOnDemandProperties; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrServerBackupOperationInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionOperationInner.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrServerBackupOperationInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionOperationInner.java index bbc401a8c1a4..4f94e69ffe54 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrServerBackupOperationInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionOperationInner.java @@ -18,7 +18,7 @@ * Response for the LTR backup Operation API call. */ @Fluent -public final class LtrServerBackupOperationInner extends ProxyResource { +public final class BackupsLongTermRetentionOperationInner extends ProxyResource { /* * Long Term Retention Backup Operation Resource Properties */ @@ -45,9 +45,9 @@ public final class LtrServerBackupOperationInner extends ProxyResource { private String id; /** - * Creates an instance of LtrServerBackupOperationInner class. + * Creates an instance of BackupsLongTermRetentionOperationInner class. */ - public LtrServerBackupOperationInner() { + public BackupsLongTermRetentionOperationInner() { } /** @@ -111,9 +111,9 @@ public Long datasourceSizeInBytes() { * Set the datasourceSizeInBytes property: Size of datasource in bytes. * * @param datasourceSizeInBytes the datasourceSizeInBytes value to set. - * @return the LtrServerBackupOperationInner object itself. + * @return the BackupsLongTermRetentionOperationInner object itself. */ - public LtrServerBackupOperationInner withDatasourceSizeInBytes(Long datasourceSizeInBytes) { + public BackupsLongTermRetentionOperationInner withDatasourceSizeInBytes(Long datasourceSizeInBytes) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -134,9 +134,9 @@ public Long dataTransferredInBytes() { * Set the dataTransferredInBytes property: Data transferred in bytes. * * @param dataTransferredInBytes the dataTransferredInBytes value to set. - * @return the LtrServerBackupOperationInner object itself. + * @return the BackupsLongTermRetentionOperationInner object itself. */ - public LtrServerBackupOperationInner withDataTransferredInBytes(Long dataTransferredInBytes) { + public BackupsLongTermRetentionOperationInner withDataTransferredInBytes(Long dataTransferredInBytes) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -157,9 +157,9 @@ public String backupName() { * Set the backupName property: Name of Backup operation. * * @param backupName the backupName value to set. - * @return the LtrServerBackupOperationInner object itself. + * @return the BackupsLongTermRetentionOperationInner object itself. */ - public LtrServerBackupOperationInner withBackupName(String backupName) { + public BackupsLongTermRetentionOperationInner withBackupName(String backupName) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -182,9 +182,9 @@ public String backupMetadata() { * successful restore using this Recovery point. e.g. Versions, DataFormat etc. * * @param backupMetadata the backupMetadata value to set. - * @return the LtrServerBackupOperationInner object itself. + * @return the BackupsLongTermRetentionOperationInner object itself. */ - public LtrServerBackupOperationInner withBackupMetadata(String backupMetadata) { + public BackupsLongTermRetentionOperationInner withBackupMetadata(String backupMetadata) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -205,9 +205,9 @@ public ExecutionStatus status() { * Set the status property: Service-set extensible enum indicating the status of operation. * * @param status the status value to set. - * @return the LtrServerBackupOperationInner object itself. + * @return the BackupsLongTermRetentionOperationInner object itself. */ - public LtrServerBackupOperationInner withStatus(ExecutionStatus status) { + public BackupsLongTermRetentionOperationInner withStatus(ExecutionStatus status) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -228,9 +228,9 @@ public OffsetDateTime startTime() { * Set the startTime property: Start time of the operation. * * @param startTime the startTime value to set. - * @return the LtrServerBackupOperationInner object itself. + * @return the BackupsLongTermRetentionOperationInner object itself. */ - public LtrServerBackupOperationInner withStartTime(OffsetDateTime startTime) { + public BackupsLongTermRetentionOperationInner withStartTime(OffsetDateTime startTime) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -251,9 +251,9 @@ public OffsetDateTime endTime() { * Set the endTime property: End time of the operation. * * @param endTime the endTime value to set. - * @return the LtrServerBackupOperationInner object itself. + * @return the BackupsLongTermRetentionOperationInner object itself. */ - public LtrServerBackupOperationInner withEndTime(OffsetDateTime endTime) { + public BackupsLongTermRetentionOperationInner withEndTime(OffsetDateTime endTime) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -274,9 +274,9 @@ public Double percentComplete() { * Set the percentComplete property: PercentageCompleted. * * @param percentComplete the percentComplete value to set. - * @return the LtrServerBackupOperationInner object itself. + * @return the BackupsLongTermRetentionOperationInner object itself. */ - public LtrServerBackupOperationInner withPercentComplete(Double percentComplete) { + public BackupsLongTermRetentionOperationInner withPercentComplete(Double percentComplete) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -324,39 +324,39 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of LtrServerBackupOperationInner from the JsonReader. + * Reads an instance of BackupsLongTermRetentionOperationInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of LtrServerBackupOperationInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. + * @return An instance of BackupsLongTermRetentionOperationInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LtrServerBackupOperationInner. + * @throws IOException If an error occurs while reading the BackupsLongTermRetentionOperationInner. */ - public static LtrServerBackupOperationInner fromJson(JsonReader jsonReader) throws IOException { + public static BackupsLongTermRetentionOperationInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - LtrServerBackupOperationInner deserializedLtrServerBackupOperationInner - = new LtrServerBackupOperationInner(); + BackupsLongTermRetentionOperationInner deserializedBackupsLongTermRetentionOperationInner + = new BackupsLongTermRetentionOperationInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedLtrServerBackupOperationInner.id = reader.getString(); + deserializedBackupsLongTermRetentionOperationInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedLtrServerBackupOperationInner.name = reader.getString(); + deserializedBackupsLongTermRetentionOperationInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedLtrServerBackupOperationInner.type = reader.getString(); + deserializedBackupsLongTermRetentionOperationInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedLtrServerBackupOperationInner.innerProperties + deserializedBackupsLongTermRetentionOperationInner.innerProperties = LtrBackupOperationResponseProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedLtrServerBackupOperationInner.systemData = SystemData.fromJson(reader); + deserializedBackupsLongTermRetentionOperationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedLtrServerBackupOperationInner; + return deserializedBackupsLongTermRetentionOperationInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrBackupResponseInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseInner.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrBackupResponseInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseInner.java index bbedaaf57496..32d4bb4b95ef 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrBackupResponseInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseInner.java @@ -17,16 +17,17 @@ * Response for the LTR backup API call. */ @Fluent -public final class LtrBackupResponseInner implements JsonSerializable { +public final class BackupsLongTermRetentionResponseInner + implements JsonSerializable { /* * Long Term Retention Backup Operation Resource Properties */ private LtrBackupOperationResponseProperties innerProperties; /** - * Creates an instance of LtrBackupResponseInner class. + * Creates an instance of BackupsLongTermRetentionResponseInner class. */ - public LtrBackupResponseInner() { + public BackupsLongTermRetentionResponseInner() { } /** @@ -51,9 +52,9 @@ public Long datasourceSizeInBytes() { * Set the datasourceSizeInBytes property: Size of datasource in bytes. * * @param datasourceSizeInBytes the datasourceSizeInBytes value to set. - * @return the LtrBackupResponseInner object itself. + * @return the BackupsLongTermRetentionResponseInner object itself. */ - public LtrBackupResponseInner withDatasourceSizeInBytes(Long datasourceSizeInBytes) { + public BackupsLongTermRetentionResponseInner withDatasourceSizeInBytes(Long datasourceSizeInBytes) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -74,9 +75,9 @@ public Long dataTransferredInBytes() { * Set the dataTransferredInBytes property: Data transferred in bytes. * * @param dataTransferredInBytes the dataTransferredInBytes value to set. - * @return the LtrBackupResponseInner object itself. + * @return the BackupsLongTermRetentionResponseInner object itself. */ - public LtrBackupResponseInner withDataTransferredInBytes(Long dataTransferredInBytes) { + public BackupsLongTermRetentionResponseInner withDataTransferredInBytes(Long dataTransferredInBytes) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -97,9 +98,9 @@ public String backupName() { * Set the backupName property: Name of Backup operation. * * @param backupName the backupName value to set. - * @return the LtrBackupResponseInner object itself. + * @return the BackupsLongTermRetentionResponseInner object itself. */ - public LtrBackupResponseInner withBackupName(String backupName) { + public BackupsLongTermRetentionResponseInner withBackupName(String backupName) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -122,9 +123,9 @@ public String backupMetadata() { * successful restore using this Recovery point. e.g. Versions, DataFormat etc. * * @param backupMetadata the backupMetadata value to set. - * @return the LtrBackupResponseInner object itself. + * @return the BackupsLongTermRetentionResponseInner object itself. */ - public LtrBackupResponseInner withBackupMetadata(String backupMetadata) { + public BackupsLongTermRetentionResponseInner withBackupMetadata(String backupMetadata) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -145,9 +146,9 @@ public ExecutionStatus status() { * Set the status property: Service-set extensible enum indicating the status of operation. * * @param status the status value to set. - * @return the LtrBackupResponseInner object itself. + * @return the BackupsLongTermRetentionResponseInner object itself. */ - public LtrBackupResponseInner withStatus(ExecutionStatus status) { + public BackupsLongTermRetentionResponseInner withStatus(ExecutionStatus status) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -168,9 +169,9 @@ public OffsetDateTime startTime() { * Set the startTime property: Start time of the operation. * * @param startTime the startTime value to set. - * @return the LtrBackupResponseInner object itself. + * @return the BackupsLongTermRetentionResponseInner object itself. */ - public LtrBackupResponseInner withStartTime(OffsetDateTime startTime) { + public BackupsLongTermRetentionResponseInner withStartTime(OffsetDateTime startTime) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -191,9 +192,9 @@ public OffsetDateTime endTime() { * Set the endTime property: End time of the operation. * * @param endTime the endTime value to set. - * @return the LtrBackupResponseInner object itself. + * @return the BackupsLongTermRetentionResponseInner object itself. */ - public LtrBackupResponseInner withEndTime(OffsetDateTime endTime) { + public BackupsLongTermRetentionResponseInner withEndTime(OffsetDateTime endTime) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -214,9 +215,9 @@ public Double percentComplete() { * Set the percentComplete property: PercentageCompleted. * * @param percentComplete the percentComplete value to set. - * @return the LtrBackupResponseInner object itself. + * @return the BackupsLongTermRetentionResponseInner object itself. */ - public LtrBackupResponseInner withPercentComplete(Double percentComplete) { + public BackupsLongTermRetentionResponseInner withPercentComplete(Double percentComplete) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -264,29 +265,30 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of LtrBackupResponseInner from the JsonReader. + * Reads an instance of BackupsLongTermRetentionResponseInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of LtrBackupResponseInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the LtrBackupResponseInner. + * @return An instance of BackupsLongTermRetentionResponseInner if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupsLongTermRetentionResponseInner. */ - public static LtrBackupResponseInner fromJson(JsonReader jsonReader) throws IOException { + public static BackupsLongTermRetentionResponseInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - LtrBackupResponseInner deserializedLtrBackupResponseInner = new LtrBackupResponseInner(); + BackupsLongTermRetentionResponseInner deserializedBackupsLongTermRetentionResponseInner + = new BackupsLongTermRetentionResponseInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("properties".equals(fieldName)) { - deserializedLtrBackupResponseInner.innerProperties + deserializedBackupsLongTermRetentionResponseInner.innerProperties = LtrBackupOperationResponseProperties.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedLtrBackupResponseInner; + return deserializedBackupsLongTermRetentionResponseInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseProperties.java similarity index 67% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseProperties.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseProperties.java index bb2f3db3604f..07b7ac197ff5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseProperties.java @@ -15,7 +15,8 @@ * Response for the pre-backup request. */ @Fluent -public final class LtrPreBackupResponseProperties implements JsonSerializable { +public final class BackupsLongTermRetentionResponseProperties + implements JsonSerializable { /* * Number of storage containers the plugin will use during backup. More than one containers may be used for size * limitations, parallelism, or redundancy etc. @@ -23,9 +24,9 @@ public final class LtrPreBackupResponseProperties implements JsonSerializable { - LtrPreBackupResponseProperties deserializedLtrPreBackupResponseProperties - = new LtrPreBackupResponseProperties(); + BackupsLongTermRetentionResponseProperties deserializedBackupsLongTermRetentionResponseProperties + = new BackupsLongTermRetentionResponseProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("numberOfContainers".equals(fieldName)) { - deserializedLtrPreBackupResponseProperties.numberOfContainers = reader.getInt(); + deserializedBackupsLongTermRetentionResponseProperties.numberOfContainers = reader.getInt(); } else { reader.skipChildren(); } } - return deserializedLtrPreBackupResponseProperties; + return deserializedBackupsLongTermRetentionResponseProperties; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapabilityInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapabilityInner.java new file mode 100644 index 000000000000..150a4fed23bc --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapabilityInner.java @@ -0,0 +1,381 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityBase; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityStatus; +import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningEditionCapability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackupSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LocationRestricted; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OnlineStorageResizeSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerEditionCapability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersionCapability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrowthSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SupportedFeature; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHighAvailabilitySupport; +import java.io.IOException; +import java.util.List; + +/** + * Capability for the Azure Database for PostgreSQL flexible server. + */ +@Fluent +public final class CapabilityInner extends CapabilityBase { + /* + * Name of flexible servers capabilities. + */ + private String name; + + /* + * List of supported compute tiers. + */ + private List supportedServerEditions; + + /* + * List of supported major versions of PostgreSQL database engine. + */ + private List supportedServerVersions; + + /* + * Features supported. + */ + private List supportedFeatures; + + /* + * Indicates if fast provisioning is supported. 'Enabled' means fast provisioning is supported. 'Disabled' stands + * for fast provisioning is not supported. Will be deprecated in the future. Look to Supported Features for + * 'FastProvisioning'. + */ + private FastProvisioningSupport fastProvisioningSupported; + + /* + * List of compute tiers supporting fast provisioning. + */ + private List supportedFastProvisioningEditions; + + /* + * Indicates if geographically redundant backups are supported in this location. 'Enabled' means geographically + * redundant backups are supported. 'Disabled' stands for geographically redundant backup is not supported. Will be + * deprecated in the future. Look to Supported Features for 'GeoBackup'. + */ + private GeographicallyRedundantBackupSupport geoBackupSupported; + + /* + * Indicates if high availability with zone redundancy is supported in this location. 'Enabled' means high + * availability with zone redundancy is supported. 'Disabled' stands for high availability with zone redundancy is + * not supported. Will be deprecated in the future. Look to Supported Features for 'ZoneRedundantHa'. + */ + private ZoneRedundantHighAvailabilitySupport zoneRedundantHaSupported; + + /* + * Indicates if high availability with zone redundancy is supported in conjunction with geographically redundant + * backups in this location. 'Enabled' means high availability with zone redundancy is supported in conjunction with + * geographically redundant backups is supported. 'Disabled' stands for high availability with zone redundancy is + * supported in conjunction with geographically redundant backups is not supported. Will be deprecated in the + * future. Look to Supported Features for 'ZoneRedundantHaAndGeoBackup'. + */ + private ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport zoneRedundantHaAndGeoBackupSupported; + + /* + * Indicates if storage autogrow is supported in this location. 'Enabled' means storage autogrow is supported. + * 'Disabled' stands for storage autogrow is not supported. Will be deprecated in the future. Look to Supported + * Features for 'StorageAutoGrowth'. + */ + private StorageAutoGrowthSupport storageAutoGrowthSupported; + + /* + * Indicates if resizing the storage, without interrupting the operation of the database engine, is supported in + * this location for the given subscription. 'Enabled' means resizing the storage without interrupting the operation + * of the database engine is supported. 'Disabled' means resizing the storage without interrupting the operation of + * the database engine is not supported. Will be deprecated in the future. Look to Supported Features for + * 'OnlineResize'. + */ + private OnlineStorageResizeSupport onlineResizeSupported; + + /* + * Indicates if this location is restricted. 'Enabled' means location is restricted. 'Disabled' stands for location + * is not restricted. Will be deprecated in the future. Look to Supported Features for 'Restricted'. + */ + private LocationRestricted restricted; + + /* + * The reason for the capability not being available. + */ + private String reason; + + /* + * The status of the capability. + */ + private CapabilityStatus status; + + /** + * Creates an instance of CapabilityInner class. + */ + public CapabilityInner() { + } + + /** + * Get the name property: Name of flexible servers capabilities. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of flexible servers capabilities. + * + * @param name the name value to set. + * @return the CapabilityInner object itself. + */ + public CapabilityInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the supportedServerEditions property: List of supported compute tiers. + * + * @return the supportedServerEditions value. + */ + public List supportedServerEditions() { + return this.supportedServerEditions; + } + + /** + * Get the supportedServerVersions property: List of supported major versions of PostgreSQL database engine. + * + * @return the supportedServerVersions value. + */ + public List supportedServerVersions() { + return this.supportedServerVersions; + } + + /** + * Get the supportedFeatures property: Features supported. + * + * @return the supportedFeatures value. + */ + public List supportedFeatures() { + return this.supportedFeatures; + } + + /** + * Get the fastProvisioningSupported property: Indicates if fast provisioning is supported. 'Enabled' means fast + * provisioning is supported. 'Disabled' stands for fast provisioning is not supported. Will be deprecated in the + * future. Look to Supported Features for 'FastProvisioning'. + * + * @return the fastProvisioningSupported value. + */ + public FastProvisioningSupport fastProvisioningSupported() { + return this.fastProvisioningSupported; + } + + /** + * Get the supportedFastProvisioningEditions property: List of compute tiers supporting fast provisioning. + * + * @return the supportedFastProvisioningEditions value. + */ + public List supportedFastProvisioningEditions() { + return this.supportedFastProvisioningEditions; + } + + /** + * Get the geoBackupSupported property: Indicates if geographically redundant backups are supported in this + * location. 'Enabled' means geographically redundant backups are supported. 'Disabled' stands for geographically + * redundant backup is not supported. Will be deprecated in the future. Look to Supported Features for 'GeoBackup'. + * + * @return the geoBackupSupported value. + */ + public GeographicallyRedundantBackupSupport geoBackupSupported() { + return this.geoBackupSupported; + } + + /** + * Get the zoneRedundantHaSupported property: Indicates if high availability with zone redundancy is supported in + * this location. 'Enabled' means high availability with zone redundancy is supported. 'Disabled' stands for high + * availability with zone redundancy is not supported. Will be deprecated in the future. Look to Supported Features + * for 'ZoneRedundantHa'. + * + * @return the zoneRedundantHaSupported value. + */ + public ZoneRedundantHighAvailabilitySupport zoneRedundantHaSupported() { + return this.zoneRedundantHaSupported; + } + + /** + * Get the zoneRedundantHaAndGeoBackupSupported property: Indicates if high availability with zone redundancy is + * supported in conjunction with geographically redundant backups in this location. 'Enabled' means high + * availability with zone redundancy is supported in conjunction with geographically redundant backups is supported. + * 'Disabled' stands for high availability with zone redundancy is supported in conjunction with geographically + * redundant backups is not supported. Will be deprecated in the future. Look to Supported Features for + * 'ZoneRedundantHaAndGeoBackup'. + * + * @return the zoneRedundantHaAndGeoBackupSupported value. + */ + public ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport zoneRedundantHaAndGeoBackupSupported() { + return this.zoneRedundantHaAndGeoBackupSupported; + } + + /** + * Get the storageAutoGrowthSupported property: Indicates if storage autogrow is supported in this location. + * 'Enabled' means storage autogrow is supported. 'Disabled' stands for storage autogrow is not supported. Will be + * deprecated in the future. Look to Supported Features for 'StorageAutoGrowth'. + * + * @return the storageAutoGrowthSupported value. + */ + public StorageAutoGrowthSupport storageAutoGrowthSupported() { + return this.storageAutoGrowthSupported; + } + + /** + * Get the onlineResizeSupported property: Indicates if resizing the storage, without interrupting the operation of + * the database engine, is supported in this location for the given subscription. 'Enabled' means resizing the + * storage without interrupting the operation of the database engine is supported. 'Disabled' means resizing the + * storage without interrupting the operation of the database engine is not supported. Will be deprecated in the + * future. Look to Supported Features for 'OnlineResize'. + * + * @return the onlineResizeSupported value. + */ + public OnlineStorageResizeSupport onlineResizeSupported() { + return this.onlineResizeSupported; + } + + /** + * Get the restricted property: Indicates if this location is restricted. 'Enabled' means location is restricted. + * 'Disabled' stands for location is not restricted. Will be deprecated in the future. Look to Supported Features + * for 'Restricted'. + * + * @return the restricted value. + */ + public LocationRestricted restricted() { + return this.restricted; + } + + /** + * Get the reason property: The reason for the capability not being available. + * + * @return the reason value. + */ + @Override + public String reason() { + return this.reason; + } + + /** + * Get the status property: The status of the capability. + * + * @return the status value. + */ + @Override + public CapabilityStatus status() { + return this.status; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (supportedServerEditions() != null) { + supportedServerEditions().forEach(e -> e.validate()); + } + if (supportedServerVersions() != null) { + supportedServerVersions().forEach(e -> e.validate()); + } + if (supportedFeatures() != null) { + supportedFeatures().forEach(e -> e.validate()); + } + if (supportedFastProvisioningEditions() != null) { + supportedFastProvisioningEditions().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CapabilityInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CapabilityInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the CapabilityInner. + */ + public static CapabilityInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CapabilityInner deserializedCapabilityInner = new CapabilityInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedCapabilityInner.status = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedCapabilityInner.reason = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCapabilityInner.name = reader.getString(); + } else if ("supportedServerEditions".equals(fieldName)) { + List supportedServerEditions + = reader.readArray(reader1 -> ServerEditionCapability.fromJson(reader1)); + deserializedCapabilityInner.supportedServerEditions = supportedServerEditions; + } else if ("supportedServerVersions".equals(fieldName)) { + List supportedServerVersions + = reader.readArray(reader1 -> ServerVersionCapability.fromJson(reader1)); + deserializedCapabilityInner.supportedServerVersions = supportedServerVersions; + } else if ("supportedFeatures".equals(fieldName)) { + List supportedFeatures + = reader.readArray(reader1 -> SupportedFeature.fromJson(reader1)); + deserializedCapabilityInner.supportedFeatures = supportedFeatures; + } else if ("fastProvisioningSupported".equals(fieldName)) { + deserializedCapabilityInner.fastProvisioningSupported + = FastProvisioningSupport.fromString(reader.getString()); + } else if ("supportedFastProvisioningEditions".equals(fieldName)) { + List supportedFastProvisioningEditions + = reader.readArray(reader1 -> FastProvisioningEditionCapability.fromJson(reader1)); + deserializedCapabilityInner.supportedFastProvisioningEditions = supportedFastProvisioningEditions; + } else if ("geoBackupSupported".equals(fieldName)) { + deserializedCapabilityInner.geoBackupSupported + = GeographicallyRedundantBackupSupport.fromString(reader.getString()); + } else if ("zoneRedundantHaSupported".equals(fieldName)) { + deserializedCapabilityInner.zoneRedundantHaSupported + = ZoneRedundantHighAvailabilitySupport.fromString(reader.getString()); + } else if ("zoneRedundantHaAndGeoBackupSupported".equals(fieldName)) { + deserializedCapabilityInner.zoneRedundantHaAndGeoBackupSupported + = ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport + .fromString(reader.getString()); + } else if ("storageAutoGrowthSupported".equals(fieldName)) { + deserializedCapabilityInner.storageAutoGrowthSupported + = StorageAutoGrowthSupport.fromString(reader.getString()); + } else if ("onlineResizeSupported".equals(fieldName)) { + deserializedCapabilityInner.onlineResizeSupported + = OnlineStorageResizeSupport.fromString(reader.getString()); + } else if ("restricted".equals(fieldName)) { + deserializedCapabilityInner.restricted = LocationRestricted.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedCapabilityInner; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogInner.java similarity index 69% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogInner.java index 24ea03ff48f5..3937ff2cf034 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogInner.java @@ -14,14 +14,14 @@ import java.time.OffsetDateTime; /** - * Represents a logFile. + * Log file. */ @Fluent -public final class LogFileInner extends ProxyResource { +public final class CapturedLogInner extends ProxyResource { /* - * The properties of a logFile. + * Properties of a log file. */ - private LogFileProperties innerProperties; + private CapturedLogProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -44,17 +44,17 @@ public final class LogFileInner extends ProxyResource { private String id; /** - * Creates an instance of LogFileInner class. + * Creates an instance of CapturedLogInner class. */ - public LogFileInner() { + public CapturedLogInner() { } /** - * Get the innerProperties property: The properties of a logFile. + * Get the innerProperties property: Properties of a log file. * * @return the innerProperties value. */ - private LogFileProperties innerProperties() { + private CapturedLogProperties innerProperties() { return this.innerProperties; } @@ -110,11 +110,11 @@ public OffsetDateTime createdTime() { * Set the createdTime property: Creation timestamp of the log file. * * @param createdTime the createdTime value to set. - * @return the LogFileInner object itself. + * @return the CapturedLogInner object itself. */ - public LogFileInner withCreatedTime(OffsetDateTime createdTime) { + public CapturedLogInner withCreatedTime(OffsetDateTime createdTime) { if (this.innerProperties() == null) { - this.innerProperties = new LogFileProperties(); + this.innerProperties = new CapturedLogProperties(); } this.innerProperties().withCreatedTime(createdTime); return this; @@ -133,18 +133,18 @@ public OffsetDateTime lastModifiedTime() { * Set the lastModifiedTime property: Last modified timestamp of the log file. * * @param lastModifiedTime the lastModifiedTime value to set. - * @return the LogFileInner object itself. + * @return the CapturedLogInner object itself. */ - public LogFileInner withLastModifiedTime(OffsetDateTime lastModifiedTime) { + public CapturedLogInner withLastModifiedTime(OffsetDateTime lastModifiedTime) { if (this.innerProperties() == null) { - this.innerProperties = new LogFileProperties(); + this.innerProperties = new CapturedLogProperties(); } this.innerProperties().withLastModifiedTime(lastModifiedTime); return this; } /** - * Get the sizeInKb property: The size in kb of the logFile. + * Get the sizeInKb property: Size (in KB) of the log file. * * @return the sizeInKb value. */ @@ -153,21 +153,21 @@ public Long sizeInKb() { } /** - * Set the sizeInKb property: The size in kb of the logFile. + * Set the sizeInKb property: Size (in KB) of the log file. * * @param sizeInKb the sizeInKb value to set. - * @return the LogFileInner object itself. + * @return the CapturedLogInner object itself. */ - public LogFileInner withSizeInKb(Long sizeInKb) { + public CapturedLogInner withSizeInKb(Long sizeInKb) { if (this.innerProperties() == null) { - this.innerProperties = new LogFileProperties(); + this.innerProperties = new CapturedLogProperties(); } this.innerProperties().withSizeInKb(sizeInKb); return this; } /** - * Get the type property: Type of the log file. + * Get the type property: Type of log file. Can be 'ServerLogs' or 'UpgradeLogs'. * * @return the type value. */ @@ -176,21 +176,21 @@ public String typePropertiesType() { } /** - * Set the type property: Type of the log file. + * Set the type property: Type of log file. Can be 'ServerLogs' or 'UpgradeLogs'. * * @param type the type value to set. - * @return the LogFileInner object itself. + * @return the CapturedLogInner object itself. */ - public LogFileInner withTypePropertiesType(String type) { + public CapturedLogInner withTypePropertiesType(String type) { if (this.innerProperties() == null) { - this.innerProperties = new LogFileProperties(); + this.innerProperties = new CapturedLogProperties(); } this.innerProperties().withType(type); return this; } /** - * Get the url property: The url to download the log file from. + * Get the url property: URL to download the log file from. * * @return the url value. */ @@ -199,14 +199,14 @@ public String url() { } /** - * Set the url property: The url to download the log file from. + * Set the url property: URL to download the log file from. * * @param url the url value to set. - * @return the LogFileInner object itself. + * @return the CapturedLogInner object itself. */ - public LogFileInner withUrl(String url) { + public CapturedLogInner withUrl(String url) { if (this.innerProperties() == null) { - this.innerProperties = new LogFileProperties(); + this.innerProperties = new CapturedLogProperties(); } this.innerProperties().withUrl(url); return this; @@ -234,37 +234,37 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of LogFileInner from the JsonReader. + * Reads an instance of CapturedLogInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of LogFileInner if the JsonReader was pointing to an instance of it, or null if it was + * @return An instance of CapturedLogInner if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LogFileInner. + * @throws IOException If an error occurs while reading the CapturedLogInner. */ - public static LogFileInner fromJson(JsonReader jsonReader) throws IOException { + public static CapturedLogInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - LogFileInner deserializedLogFileInner = new LogFileInner(); + CapturedLogInner deserializedCapturedLogInner = new CapturedLogInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedLogFileInner.id = reader.getString(); + deserializedCapturedLogInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedLogFileInner.name = reader.getString(); + deserializedCapturedLogInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedLogFileInner.type = reader.getString(); + deserializedCapturedLogInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedLogFileInner.innerProperties = LogFileProperties.fromJson(reader); + deserializedCapturedLogInner.innerProperties = CapturedLogProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedLogFileInner.systemData = SystemData.fromJson(reader); + deserializedCapturedLogInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedLogFileInner; + return deserializedCapturedLogInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogProperties.java similarity index 65% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileProperties.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogProperties.java index 33fca6e804c6..68ddc394e666 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogProperties.java @@ -15,10 +15,10 @@ import java.time.format.DateTimeFormatter; /** - * The properties of a logFile. + * Properties of a log file. */ @Fluent -public final class LogFileProperties implements JsonSerializable { +public final class CapturedLogProperties implements JsonSerializable { /* * Creation timestamp of the log file. */ @@ -30,24 +30,24 @@ public final class LogFileProperties implements JsonSerializable { - LogFileProperties deserializedLogFileProperties = new LogFileProperties(); + CapturedLogProperties deserializedCapturedLogProperties = new CapturedLogProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("createdTime".equals(fieldName)) { - deserializedLogFileProperties.createdTime = reader + deserializedCapturedLogProperties.createdTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("lastModifiedTime".equals(fieldName)) { - deserializedLogFileProperties.lastModifiedTime = reader + deserializedCapturedLogProperties.lastModifiedTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("sizeInKb".equals(fieldName)) { - deserializedLogFileProperties.sizeInKb = reader.getNullable(JsonReader::getLong); + deserializedCapturedLogProperties.sizeInKb = reader.getNullable(JsonReader::getLong); } else if ("type".equals(fieldName)) { - deserializedLogFileProperties.type = reader.getString(); + deserializedCapturedLogProperties.type = reader.getString(); } else if ("url".equals(fieldName)) { - deserializedLogFileProperties.url = reader.getString(); + deserializedCapturedLogProperties.url = reader.getString(); } else { reader.skipChildren(); } } - return deserializedLogFileProperties; + return deserializedCapturedLogProperties; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationInner.java index 2ddcc39e8fc7..4e6b2db93097 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationInner.java @@ -14,12 +14,12 @@ import java.io.IOException; /** - * Represents a Configuration. + * Configuration (also known as server parameter). */ @Fluent public final class ConfigurationInner extends ProxyResource { /* - * The properties of a configuration. + * Properties of a configuration (also known as server parameter). */ private ConfigurationProperties innerProperties; @@ -50,7 +50,7 @@ public ConfigurationInner() { } /** - * Get the innerProperties property: The properties of a configuration. + * Get the innerProperties property: Properties of a configuration (also known as server parameter). * * @return the innerProperties value. */ @@ -98,7 +98,8 @@ public String id() { } /** - * Get the value property: Value of the configuration. Required to update the configuration. + * Get the value property: Value of the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. * * @return the value value. */ @@ -107,7 +108,8 @@ public String value() { } /** - * Set the value property: Value of the configuration. Required to update the configuration. + * Set the value property: Value of the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. * * @param value the value value to set. * @return the ConfigurationInner object itself. @@ -121,7 +123,7 @@ public ConfigurationInner withValue(String value) { } /** - * Get the description property: Description of the configuration. + * Get the description property: Description of the configuration (also known as server parameter). * * @return the description value. */ @@ -130,7 +132,7 @@ public String description() { } /** - * Get the defaultValue property: Default value of the configuration. + * Get the defaultValue property: Value assigned by default to the configuration (also known as server parameter). * * @return the defaultValue value. */ @@ -139,7 +141,7 @@ public String defaultValue() { } /** - * Get the dataType property: Data type of the configuration. + * Get the dataType property: Data type of the configuration (also known as server parameter). * * @return the dataType value. */ @@ -148,7 +150,7 @@ public ConfigurationDataType dataType() { } /** - * Get the allowedValues property: Allowed values of the configuration. + * Get the allowedValues property: Allowed values of the configuration (also known as server parameter). * * @return the allowedValues value. */ @@ -157,7 +159,8 @@ public String allowedValues() { } /** - * Get the source property: Source of the configuration. Required to update the configuration. + * Get the source property: Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * * @return the source value. */ @@ -166,7 +169,8 @@ public String source() { } /** - * Set the source property: Source of the configuration. Required to update the configuration. + * Set the source property: Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * * @param source the source value to set. * @return the ConfigurationInner object itself. @@ -180,7 +184,10 @@ public ConfigurationInner withSource(String source) { } /** - * Get the isDynamicConfig property: Configuration dynamic or static. + * Get the isDynamicConfig property: Indicates if it's a dynamic (true) or static (false) configuration (also known + * as server parameter). Static server parameters require a server restart after changing the value assigned to + * them, for the change to take effect. Dynamic server parameters do not require a server restart after changing the + * value assigned to them, for the change to take effect. * * @return the isDynamicConfig value. */ @@ -189,7 +196,8 @@ public Boolean isDynamicConfig() { } /** - * Get the isReadOnly property: Configuration read-only or not. + * Get the isReadOnly property: Indicates if it's a read-only (true) or modifiable (false) configuration (also known + * as server parameter). * * @return the isReadOnly value. */ @@ -198,7 +206,8 @@ public Boolean isReadOnly() { } /** - * Get the isConfigPendingRestart property: Configuration is pending restart or not. + * Get the isConfigPendingRestart property: Indicates if the value assigned to the configuration (also known as + * server parameter) is pending a server restart for it to take effect. * * @return the isConfigPendingRestart value. */ @@ -207,7 +216,7 @@ public Boolean isConfigPendingRestart() { } /** - * Get the unit property: Configuration unit. + * Get the unit property: Units in which the configuration (also known as server parameter) value is expressed. * * @return the unit value. */ @@ -216,7 +225,8 @@ public String unit() { } /** - * Get the documentationLink property: Configuration documentation link. + * Get the documentationLink property: Link pointing to the documentation of the configuration (also known as server + * parameter). * * @return the documentationLink value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationProperties.java index 2557185782c2..76389521995f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationProperties.java @@ -13,62 +13,68 @@ import java.io.IOException; /** - * The properties of a configuration. + * Properties of a configuration (also known as server parameter). */ @Fluent public final class ConfigurationProperties implements JsonSerializable { /* - * Value of the configuration. Required to update the configuration. + * Value of the configuration (also known as server parameter). Required to update the value assigned to a specific + * modifiable configuration. */ private String value; /* - * Description of the configuration. + * Description of the configuration (also known as server parameter). */ private String description; /* - * Default value of the configuration. + * Value assigned by default to the configuration (also known as server parameter). */ private String defaultValue; /* - * Data type of the configuration. + * Data type of the configuration (also known as server parameter). */ private ConfigurationDataType dataType; /* - * Allowed values of the configuration. + * Allowed values of the configuration (also known as server parameter). */ private String allowedValues; /* - * Source of the configuration. Required to update the configuration. + * Source of the value assigned to the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. */ private String source; /* - * Configuration dynamic or static. + * Indicates if it's a dynamic (true) or static (false) configuration (also known as server parameter). Static + * server parameters require a server restart after changing the value assigned to them, for the change to take + * effect. Dynamic server parameters do not require a server restart after changing the value assigned to them, for + * the change to take effect. */ private Boolean isDynamicConfig; /* - * Configuration read-only or not. + * Indicates if it's a read-only (true) or modifiable (false) configuration (also known as server parameter). */ private Boolean isReadOnly; /* - * Configuration is pending restart or not. + * Indicates if the value assigned to the configuration (also known as server parameter) is pending a server restart + * for it to take effect. */ private Boolean isConfigPendingRestart; /* - * Configuration unit. + * Units in which the configuration (also known as server parameter) value is expressed. */ private String unit; /* - * Configuration documentation link. + * Link pointing to the documentation of the configuration (also known as server parameter). */ private String documentationLink; @@ -79,7 +85,8 @@ public ConfigurationProperties() { } /** - * Get the value property: Value of the configuration. Required to update the configuration. + * Get the value property: Value of the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. * * @return the value value. */ @@ -88,7 +95,8 @@ public String value() { } /** - * Set the value property: Value of the configuration. Required to update the configuration. + * Set the value property: Value of the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. * * @param value the value value to set. * @return the ConfigurationProperties object itself. @@ -99,7 +107,7 @@ public ConfigurationProperties withValue(String value) { } /** - * Get the description property: Description of the configuration. + * Get the description property: Description of the configuration (also known as server parameter). * * @return the description value. */ @@ -108,7 +116,7 @@ public String description() { } /** - * Get the defaultValue property: Default value of the configuration. + * Get the defaultValue property: Value assigned by default to the configuration (also known as server parameter). * * @return the defaultValue value. */ @@ -117,7 +125,7 @@ public String defaultValue() { } /** - * Get the dataType property: Data type of the configuration. + * Get the dataType property: Data type of the configuration (also known as server parameter). * * @return the dataType value. */ @@ -126,7 +134,7 @@ public ConfigurationDataType dataType() { } /** - * Get the allowedValues property: Allowed values of the configuration. + * Get the allowedValues property: Allowed values of the configuration (also known as server parameter). * * @return the allowedValues value. */ @@ -135,7 +143,8 @@ public String allowedValues() { } /** - * Get the source property: Source of the configuration. Required to update the configuration. + * Get the source property: Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * * @return the source value. */ @@ -144,7 +153,8 @@ public String source() { } /** - * Set the source property: Source of the configuration. Required to update the configuration. + * Set the source property: Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * * @param source the source value to set. * @return the ConfigurationProperties object itself. @@ -155,7 +165,10 @@ public ConfigurationProperties withSource(String source) { } /** - * Get the isDynamicConfig property: Configuration dynamic or static. + * Get the isDynamicConfig property: Indicates if it's a dynamic (true) or static (false) configuration (also known + * as server parameter). Static server parameters require a server restart after changing the value assigned to + * them, for the change to take effect. Dynamic server parameters do not require a server restart after changing the + * value assigned to them, for the change to take effect. * * @return the isDynamicConfig value. */ @@ -164,7 +177,8 @@ public Boolean isDynamicConfig() { } /** - * Get the isReadOnly property: Configuration read-only or not. + * Get the isReadOnly property: Indicates if it's a read-only (true) or modifiable (false) configuration (also known + * as server parameter). * * @return the isReadOnly value. */ @@ -173,7 +187,8 @@ public Boolean isReadOnly() { } /** - * Get the isConfigPendingRestart property: Configuration is pending restart or not. + * Get the isConfigPendingRestart property: Indicates if the value assigned to the configuration (also known as + * server parameter) is pending a server restart for it to take effect. * * @return the isConfigPendingRestart value. */ @@ -182,7 +197,7 @@ public Boolean isConfigPendingRestart() { } /** - * Get the unit property: Configuration unit. + * Get the unit property: Units in which the configuration (also known as server parameter) value is expressed. * * @return the unit value. */ @@ -191,7 +206,8 @@ public String unit() { } /** - * Get the documentationLink property: Configuration documentation link. + * Get the documentationLink property: Link pointing to the documentation of the configuration (also known as server + * parameter). * * @return the documentationLink value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java index bb0ddcb7f6a6..8b4f3465efed 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java @@ -13,12 +13,12 @@ import java.io.IOException; /** - * Represents a Database. + * Represents a database. */ @Fluent public final class DatabaseInner extends ProxyResource { /* - * The properties of a database. + * Properties of a database. */ private DatabaseProperties innerProperties; @@ -49,7 +49,7 @@ public DatabaseInner() { } /** - * Get the innerProperties property: The properties of a database. + * Get the innerProperties property: Properties of a database. * * @return the innerProperties value. */ @@ -97,7 +97,7 @@ public String id() { } /** - * Get the charset property: The charset of the database. + * Get the charset property: Character set of the database. * * @return the charset value. */ @@ -106,7 +106,7 @@ public String charset() { } /** - * Set the charset property: The charset of the database. + * Set the charset property: Character set of the database. * * @param charset the charset value to set. * @return the DatabaseInner object itself. @@ -120,7 +120,7 @@ public DatabaseInner withCharset(String charset) { } /** - * Get the collation property: The collation of the database. + * Get the collation property: Collation of the database. * * @return the collation value. */ @@ -129,7 +129,7 @@ public String collation() { } /** - * Set the collation property: The collation of the database. + * Set the collation property: Collation of the database. * * @param collation the collation value to set. * @return the DatabaseInner object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseProperties.java index d36bf2b3659a..c0bc3b02cc2b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseProperties.java @@ -12,17 +12,17 @@ import java.io.IOException; /** - * The properties of a database. + * Properties of a database. */ @Fluent public final class DatabaseProperties implements JsonSerializable { /* - * The charset of the database. + * Character set of the database. */ private String charset; /* - * The collation of the database. + * Collation of the database. */ private String collation; @@ -33,7 +33,7 @@ public DatabaseProperties() { } /** - * Get the charset property: The charset of the database. + * Get the charset property: Character set of the database. * * @return the charset value. */ @@ -42,7 +42,7 @@ public String charset() { } /** - * Set the charset property: The charset of the database. + * Set the charset property: Character set of the database. * * @param charset the charset value to set. * @return the DatabaseProperties object itself. @@ -53,7 +53,7 @@ public DatabaseProperties withCharset(String charset) { } /** - * Get the collation property: The collation of the database. + * Get the collation property: Collation of the database. * * @return the collation value. */ @@ -62,7 +62,7 @@ public String collation() { } /** - * Set the collation property: The collation of the database. + * Set the collation property: Collation of the database. * * @param collation the collation value to set. * @return the DatabaseProperties object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleInner.java index 4494702a88ec..6ee2cbbe98d5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleInner.java @@ -14,12 +14,12 @@ import java.io.IOException; /** - * Represents a server firewall rule. + * Firewall rule. */ @Fluent public final class FirewallRuleInner extends ProxyResource { /* - * The properties of a firewall rule. + * Properties of a firewall rule. */ private FirewallRuleProperties innerProperties = new FirewallRuleProperties(); @@ -50,7 +50,7 @@ public FirewallRuleInner() { } /** - * Get the innerProperties property: The properties of a firewall rule. + * Get the innerProperties property: Properties of a firewall rule. * * @return the innerProperties value. */ @@ -98,7 +98,8 @@ public String id() { } /** - * Get the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format. + * Get the startIpAddress property: IP address defining the start of the range of addresses of a firewall rule. Must + * be expressed in IPv4 format. * * @return the startIpAddress value. */ @@ -107,7 +108,8 @@ public String startIpAddress() { } /** - * Set the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format. + * Set the startIpAddress property: IP address defining the start of the range of addresses of a firewall rule. Must + * be expressed in IPv4 format. * * @param startIpAddress the startIpAddress value to set. * @return the FirewallRuleInner object itself. @@ -121,7 +123,8 @@ public FirewallRuleInner withStartIpAddress(String startIpAddress) { } /** - * Get the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format. + * Get the endIpAddress property: IP address defining the end of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * * @return the endIpAddress value. */ @@ -130,7 +133,8 @@ public String endIpAddress() { } /** - * Set the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format. + * Set the endIpAddress property: IP address defining the end of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * * @param endIpAddress the endIpAddress value to set. * @return the FirewallRuleInner object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleProperties.java index 52e91af5d16d..f8b579c7aaac 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleProperties.java @@ -13,17 +13,17 @@ import java.io.IOException; /** - * The properties of a server firewall rule. + * Properties of a firewall rule. */ @Fluent public final class FirewallRuleProperties implements JsonSerializable { /* - * The start IP address of the server firewall rule. Must be IPv4 format. + * IP address defining the start of the range of addresses of a firewall rule. Must be expressed in IPv4 format. */ private String startIpAddress; /* - * The end IP address of the server firewall rule. Must be IPv4 format. + * IP address defining the end of the range of addresses of a firewall rule. Must be expressed in IPv4 format. */ private String endIpAddress; @@ -34,7 +34,8 @@ public FirewallRuleProperties() { } /** - * Get the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format. + * Get the startIpAddress property: IP address defining the start of the range of addresses of a firewall rule. Must + * be expressed in IPv4 format. * * @return the startIpAddress value. */ @@ -43,7 +44,8 @@ public String startIpAddress() { } /** - * Set the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format. + * Set the startIpAddress property: IP address defining the start of the range of addresses of a firewall rule. Must + * be expressed in IPv4 format. * * @param startIpAddress the startIpAddress value to set. * @return the FirewallRuleProperties object itself. @@ -54,7 +56,8 @@ public FirewallRuleProperties withStartIpAddress(String startIpAddress) { } /** - * Get the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format. + * Get the endIpAddress property: IP address defining the end of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * * @return the endIpAddress value. */ @@ -63,7 +66,8 @@ public String endIpAddress() { } /** - * Set the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format. + * Set the endIpAddress property: IP address defining the end of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * * @param endIpAddress the endIpAddress value to set. * @return the FirewallRuleProperties object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FlexibleServerCapabilityInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FlexibleServerCapabilityInner.java deleted file mode 100644 index 6b52db9e0bcb..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FlexibleServerCapabilityInner.java +++ /dev/null @@ -1,373 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityBase; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityStatus; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningEditionCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerEditionCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.GeoBackupSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OnlineResizeSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RestrictedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersionCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrowthSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SupportedFeature; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHaAndGeoBackupSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHaSupportedEnum; -import java.io.IOException; -import java.util.List; - -/** - * Capability for the PostgreSQL server. - */ -@Fluent -public final class FlexibleServerCapabilityInner extends CapabilityBase { - /* - * Name of flexible servers capability - */ - private String name; - - /* - * List of supported flexible server editions - */ - private List supportedServerEditions; - - /* - * The list of server versions supported for this capability. - */ - private List supportedServerVersions; - - /* - * The supported features. - */ - private List supportedFeatures; - - /* - * Gets a value indicating whether fast provisioning is supported. "Enabled" means fast provisioning is supported. - * "Disabled" stands for fast provisioning is not supported. Will be deprecated in future, please look to Supported - * Features for "FastProvisioning". - */ - private FastProvisioningSupportedEnum fastProvisioningSupported; - - /* - * List of supported server editions for fast provisioning - */ - private List supportedFastProvisioningEditions; - - /* - * Determines if geo-backup is supported in this region. "Enabled" means geo-backup is supported. "Disabled" stands - * for geo-back is not supported. Will be deprecated in future, please look to Supported Features for "GeoBackup". - */ - private GeoBackupSupportedEnum geoBackupSupported; - - /* - * A value indicating whether Zone Redundant HA is supported in this region. "Enabled" means zone redundant HA is - * supported. "Disabled" stands for zone redundant HA is not supported. Will be deprecated in future, please look to - * Supported Features for "ZoneRedundantHa". - */ - private ZoneRedundantHaSupportedEnum zoneRedundantHaSupported; - - /* - * A value indicating whether Zone Redundant HA and Geo-backup is supported in this region. "Enabled" means zone - * redundant HA and geo-backup is supported. "Disabled" stands for zone redundant HA and geo-backup is not - * supported. Will be deprecated in future, please look to Supported Features for "ZoneRedundantHaAndGeoBackup". - */ - private ZoneRedundantHaAndGeoBackupSupportedEnum zoneRedundantHaAndGeoBackupSupported; - - /* - * A value indicating whether storage auto-grow is supported in this region. "Enabled" means storage auto-grow is - * supported. "Disabled" stands for storage auto-grow is not supported. Will be deprecated in future, please look to - * Supported Features for "StorageAutoGrowth". - */ - private StorageAutoGrowthSupportedEnum storageAutoGrowthSupported; - - /* - * A value indicating whether online resize is supported in this region for the given subscription. "Enabled" means - * storage online resize is supported. "Disabled" means storage online resize is not supported. Will be deprecated - * in future, please look to Supported Features for "OnlineResize". - */ - private OnlineResizeSupportedEnum onlineResizeSupported; - - /* - * A value indicating whether this region is restricted. "Enabled" means region is restricted. "Disabled" stands for - * region is not restricted. Will be deprecated in future, please look to Supported Features for "Restricted". - */ - private RestrictedEnum restricted; - - /* - * The reason for the capability not being available. - */ - private String reason; - - /* - * The status of the capability. - */ - private CapabilityStatus status; - - /** - * Creates an instance of FlexibleServerCapabilityInner class. - */ - public FlexibleServerCapabilityInner() { - } - - /** - * Get the name property: Name of flexible servers capability. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of flexible servers capability. - * - * @param name the name value to set. - * @return the FlexibleServerCapabilityInner object itself. - */ - public FlexibleServerCapabilityInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the supportedServerEditions property: List of supported flexible server editions. - * - * @return the supportedServerEditions value. - */ - public List supportedServerEditions() { - return this.supportedServerEditions; - } - - /** - * Get the supportedServerVersions property: The list of server versions supported for this capability. - * - * @return the supportedServerVersions value. - */ - public List supportedServerVersions() { - return this.supportedServerVersions; - } - - /** - * Get the supportedFeatures property: The supported features. - * - * @return the supportedFeatures value. - */ - public List supportedFeatures() { - return this.supportedFeatures; - } - - /** - * Get the fastProvisioningSupported property: Gets a value indicating whether fast provisioning is supported. - * "Enabled" means fast provisioning is supported. "Disabled" stands for fast provisioning is not supported. Will be - * deprecated in future, please look to Supported Features for "FastProvisioning". - * - * @return the fastProvisioningSupported value. - */ - public FastProvisioningSupportedEnum fastProvisioningSupported() { - return this.fastProvisioningSupported; - } - - /** - * Get the supportedFastProvisioningEditions property: List of supported server editions for fast provisioning. - * - * @return the supportedFastProvisioningEditions value. - */ - public List supportedFastProvisioningEditions() { - return this.supportedFastProvisioningEditions; - } - - /** - * Get the geoBackupSupported property: Determines if geo-backup is supported in this region. "Enabled" means - * geo-backup is supported. "Disabled" stands for geo-back is not supported. Will be deprecated in future, please - * look to Supported Features for "GeoBackup". - * - * @return the geoBackupSupported value. - */ - public GeoBackupSupportedEnum geoBackupSupported() { - return this.geoBackupSupported; - } - - /** - * Get the zoneRedundantHaSupported property: A value indicating whether Zone Redundant HA is supported in this - * region. "Enabled" means zone redundant HA is supported. "Disabled" stands for zone redundant HA is not supported. - * Will be deprecated in future, please look to Supported Features for "ZoneRedundantHa". - * - * @return the zoneRedundantHaSupported value. - */ - public ZoneRedundantHaSupportedEnum zoneRedundantHaSupported() { - return this.zoneRedundantHaSupported; - } - - /** - * Get the zoneRedundantHaAndGeoBackupSupported property: A value indicating whether Zone Redundant HA and - * Geo-backup is supported in this region. "Enabled" means zone redundant HA and geo-backup is supported. "Disabled" - * stands for zone redundant HA and geo-backup is not supported. Will be deprecated in future, please look to - * Supported Features for "ZoneRedundantHaAndGeoBackup". - * - * @return the zoneRedundantHaAndGeoBackupSupported value. - */ - public ZoneRedundantHaAndGeoBackupSupportedEnum zoneRedundantHaAndGeoBackupSupported() { - return this.zoneRedundantHaAndGeoBackupSupported; - } - - /** - * Get the storageAutoGrowthSupported property: A value indicating whether storage auto-grow is supported in this - * region. "Enabled" means storage auto-grow is supported. "Disabled" stands for storage auto-grow is not supported. - * Will be deprecated in future, please look to Supported Features for "StorageAutoGrowth". - * - * @return the storageAutoGrowthSupported value. - */ - public StorageAutoGrowthSupportedEnum storageAutoGrowthSupported() { - return this.storageAutoGrowthSupported; - } - - /** - * Get the onlineResizeSupported property: A value indicating whether online resize is supported in this region for - * the given subscription. "Enabled" means storage online resize is supported. "Disabled" means storage online - * resize is not supported. Will be deprecated in future, please look to Supported Features for "OnlineResize". - * - * @return the onlineResizeSupported value. - */ - public OnlineResizeSupportedEnum onlineResizeSupported() { - return this.onlineResizeSupported; - } - - /** - * Get the restricted property: A value indicating whether this region is restricted. "Enabled" means region is - * restricted. "Disabled" stands for region is not restricted. Will be deprecated in future, please look to - * Supported Features for "Restricted". - * - * @return the restricted value. - */ - public RestrictedEnum restricted() { - return this.restricted; - } - - /** - * Get the reason property: The reason for the capability not being available. - * - * @return the reason value. - */ - @Override - public String reason() { - return this.reason; - } - - /** - * Get the status property: The status of the capability. - * - * @return the status value. - */ - @Override - public CapabilityStatus status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (supportedServerEditions() != null) { - supportedServerEditions().forEach(e -> e.validate()); - } - if (supportedServerVersions() != null) { - supportedServerVersions().forEach(e -> e.validate()); - } - if (supportedFeatures() != null) { - supportedFeatures().forEach(e -> e.validate()); - } - if (supportedFastProvisioningEditions() != null) { - supportedFastProvisioningEditions().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FlexibleServerCapabilityInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FlexibleServerCapabilityInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FlexibleServerCapabilityInner. - */ - public static FlexibleServerCapabilityInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FlexibleServerCapabilityInner deserializedFlexibleServerCapabilityInner - = new FlexibleServerCapabilityInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.status = CapabilityStatus.fromString(reader.getString()); - } else if ("reason".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.reason = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.name = reader.getString(); - } else if ("supportedServerEditions".equals(fieldName)) { - List supportedServerEditions - = reader.readArray(reader1 -> FlexibleServerEditionCapability.fromJson(reader1)); - deserializedFlexibleServerCapabilityInner.supportedServerEditions = supportedServerEditions; - } else if ("supportedServerVersions".equals(fieldName)) { - List supportedServerVersions - = reader.readArray(reader1 -> ServerVersionCapability.fromJson(reader1)); - deserializedFlexibleServerCapabilityInner.supportedServerVersions = supportedServerVersions; - } else if ("supportedFeatures".equals(fieldName)) { - List supportedFeatures - = reader.readArray(reader1 -> SupportedFeature.fromJson(reader1)); - deserializedFlexibleServerCapabilityInner.supportedFeatures = supportedFeatures; - } else if ("fastProvisioningSupported".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.fastProvisioningSupported - = FastProvisioningSupportedEnum.fromString(reader.getString()); - } else if ("supportedFastProvisioningEditions".equals(fieldName)) { - List supportedFastProvisioningEditions - = reader.readArray(reader1 -> FastProvisioningEditionCapability.fromJson(reader1)); - deserializedFlexibleServerCapabilityInner.supportedFastProvisioningEditions - = supportedFastProvisioningEditions; - } else if ("geoBackupSupported".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.geoBackupSupported - = GeoBackupSupportedEnum.fromString(reader.getString()); - } else if ("zoneRedundantHaSupported".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.zoneRedundantHaSupported - = ZoneRedundantHaSupportedEnum.fromString(reader.getString()); - } else if ("zoneRedundantHaAndGeoBackupSupported".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.zoneRedundantHaAndGeoBackupSupported - = ZoneRedundantHaAndGeoBackupSupportedEnum.fromString(reader.getString()); - } else if ("storageAutoGrowthSupported".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.storageAutoGrowthSupported - = StorageAutoGrowthSupportedEnum.fromString(reader.getString()); - } else if ("onlineResizeSupported".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.onlineResizeSupported - = OnlineResizeSupportedEnum.fromString(reader.getString()); - } else if ("restricted".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.restricted - = RestrictedEnum.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedFlexibleServerCapabilityInner; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/IndexRecommendationResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/IndexRecommendationResourceInner.java deleted file mode 100644 index f58f26fc84d6..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/IndexRecommendationResourceInner.java +++ /dev/null @@ -1,368 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ImpactRecord; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationDetails; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResourcePropertiesAnalyzedWorkload; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResourcePropertiesImplementationDetails; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeEnum; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Index recommendation properties. - */ -@Immutable -public final class IndexRecommendationResourceInner extends ProxyResource { - /* - * Properties of IndexRecommendationResource. - */ - private IndexRecommendationResourceProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of IndexRecommendationResourceInner class. - */ - public IndexRecommendationResourceInner() { - } - - /** - * Get the innerProperties property: Properties of IndexRecommendationResource. - * - * @return the innerProperties value. - */ - private IndexRecommendationResourceProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the initialRecommendedTime property: Creation time of this recommendation in UTC date-time string format. - * - * @return the initialRecommendedTime value. - */ - public OffsetDateTime initialRecommendedTime() { - return this.innerProperties() == null ? null : this.innerProperties().initialRecommendedTime(); - } - - /** - * Set the initialRecommendedTime property: Creation time of this recommendation in UTC date-time string format. - * - * @param initialRecommendedTime the initialRecommendedTime value to set. - * @return the IndexRecommendationResourceInner object itself. - */ - public IndexRecommendationResourceInner withInitialRecommendedTime(OffsetDateTime initialRecommendedTime) { - if (this.innerProperties() == null) { - this.innerProperties = new IndexRecommendationResourceProperties(); - } - this.innerProperties().withInitialRecommendedTime(initialRecommendedTime); - return this; - } - - /** - * Get the lastRecommendedTime property: The last refresh of this recommendation in UTC date-time string format. - * - * @return the lastRecommendedTime value. - */ - public OffsetDateTime lastRecommendedTime() { - return this.innerProperties() == null ? null : this.innerProperties().lastRecommendedTime(); - } - - /** - * Set the lastRecommendedTime property: The last refresh of this recommendation in UTC date-time string format. - * - * @param lastRecommendedTime the lastRecommendedTime value to set. - * @return the IndexRecommendationResourceInner object itself. - */ - public IndexRecommendationResourceInner withLastRecommendedTime(OffsetDateTime lastRecommendedTime) { - if (this.innerProperties() == null) { - this.innerProperties = new IndexRecommendationResourceProperties(); - } - this.innerProperties().withLastRecommendedTime(lastRecommendedTime); - return this; - } - - /** - * Get the timesRecommended property: The number of times this recommendation has encountered. - * - * @return the timesRecommended value. - */ - public Integer timesRecommended() { - return this.innerProperties() == null ? null : this.innerProperties().timesRecommended(); - } - - /** - * Set the timesRecommended property: The number of times this recommendation has encountered. - * - * @param timesRecommended the timesRecommended value to set. - * @return the IndexRecommendationResourceInner object itself. - */ - public IndexRecommendationResourceInner withTimesRecommended(Integer timesRecommended) { - if (this.innerProperties() == null) { - this.innerProperties = new IndexRecommendationResourceProperties(); - } - this.innerProperties().withTimesRecommended(timesRecommended); - return this; - } - - /** - * Get the improvedQueryIds property: The ImprovedQueryIds. The list will only be populated for CREATE INDEX - * recommendations. - * - * @return the improvedQueryIds value. - */ - public List improvedQueryIds() { - return this.innerProperties() == null ? null : this.innerProperties().improvedQueryIds(); - } - - /** - * Set the improvedQueryIds property: The ImprovedQueryIds. The list will only be populated for CREATE INDEX - * recommendations. - * - * @param improvedQueryIds the improvedQueryIds value to set. - * @return the IndexRecommendationResourceInner object itself. - */ - public IndexRecommendationResourceInner withImprovedQueryIds(List improvedQueryIds) { - if (this.innerProperties() == null) { - this.innerProperties = new IndexRecommendationResourceProperties(); - } - this.innerProperties().withImprovedQueryIds(improvedQueryIds); - return this; - } - - /** - * Get the recommendationReason property: Reason for this recommendation. - * - * @return the recommendationReason value. - */ - public String recommendationReason() { - return this.innerProperties() == null ? null : this.innerProperties().recommendationReason(); - } - - /** - * Set the recommendationReason property: Reason for this recommendation. - * - * @param recommendationReason the recommendationReason value to set. - * @return the IndexRecommendationResourceInner object itself. - */ - public IndexRecommendationResourceInner withRecommendationReason(String recommendationReason) { - if (this.innerProperties() == null) { - this.innerProperties = new IndexRecommendationResourceProperties(); - } - this.innerProperties().withRecommendationReason(recommendationReason); - return this; - } - - /** - * Get the recommendationType property: Type for this recommendation. - * - * @return the recommendationType value. - */ - public RecommendationTypeEnum recommendationType() { - return this.innerProperties() == null ? null : this.innerProperties().recommendationType(); - } - - /** - * Set the recommendationType property: Type for this recommendation. - * - * @param recommendationType the recommendationType value to set. - * @return the IndexRecommendationResourceInner object itself. - */ - public IndexRecommendationResourceInner withRecommendationType(RecommendationTypeEnum recommendationType) { - if (this.innerProperties() == null) { - this.innerProperties = new IndexRecommendationResourceProperties(); - } - this.innerProperties().withRecommendationType(recommendationType); - return this; - } - - /** - * Get the implementationDetails property: Stores implementation details for the recommended action. - * - * @return the implementationDetails value. - */ - public IndexRecommendationResourcePropertiesImplementationDetails implementationDetails() { - return this.innerProperties() == null ? null : this.innerProperties().implementationDetails(); - } - - /** - * Set the implementationDetails property: Stores implementation details for the recommended action. - * - * @param implementationDetails the implementationDetails value to set. - * @return the IndexRecommendationResourceInner object itself. - */ - public IndexRecommendationResourceInner - withImplementationDetails(IndexRecommendationResourcePropertiesImplementationDetails implementationDetails) { - if (this.innerProperties() == null) { - this.innerProperties = new IndexRecommendationResourceProperties(); - } - this.innerProperties().withImplementationDetails(implementationDetails); - return this; - } - - /** - * Get the analyzedWorkload property: Stores workload information for the recommended action. - * - * @return the analyzedWorkload value. - */ - public IndexRecommendationResourcePropertiesAnalyzedWorkload analyzedWorkload() { - return this.innerProperties() == null ? null : this.innerProperties().analyzedWorkload(); - } - - /** - * Set the analyzedWorkload property: Stores workload information for the recommended action. - * - * @param analyzedWorkload the analyzedWorkload value to set. - * @return the IndexRecommendationResourceInner object itself. - */ - public IndexRecommendationResourceInner - withAnalyzedWorkload(IndexRecommendationResourcePropertiesAnalyzedWorkload analyzedWorkload) { - if (this.innerProperties() == null) { - this.innerProperties = new IndexRecommendationResourceProperties(); - } - this.innerProperties().withAnalyzedWorkload(analyzedWorkload); - return this; - } - - /** - * Get the estimatedImpact property: The estimated impact of this recommended action. - * - * @return the estimatedImpact value. - */ - public List estimatedImpact() { - return this.innerProperties() == null ? null : this.innerProperties().estimatedImpact(); - } - - /** - * Get the details property: Stores recommendation details for the recommended action. - * - * @return the details value. - */ - public IndexRecommendationDetails details() { - return this.innerProperties() == null ? null : this.innerProperties().details(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IndexRecommendationResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IndexRecommendationResourceInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IndexRecommendationResourceInner. - */ - public static IndexRecommendationResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IndexRecommendationResourceInner deserializedIndexRecommendationResourceInner - = new IndexRecommendationResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedIndexRecommendationResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedIndexRecommendationResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedIndexRecommendationResourceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedIndexRecommendationResourceInner.innerProperties - = IndexRecommendationResourceProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedIndexRecommendationResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedIndexRecommendationResourceInner; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseInner.java index e7c116634f0a..e91943531cfb 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseInner.java @@ -20,7 +20,8 @@ public final class LtrPreBackupResponseInner implements JsonSerializable tags) { + public MigrationInner withTags(Map tags) { super.withTags(tags); return this; } /** - * Get the migrationId property: ID for migration, a GUID. + * Get the migrationId property: Identifier of a migration. * * @return the migrationId value. */ @@ -140,7 +140,7 @@ public String migrationId() { } /** - * Get the currentStatus property: Current status of migration. + * Get the currentStatus property: Current status of a migration. * * @return the currentStatus value. */ @@ -149,7 +149,7 @@ public MigrationStatus currentStatus() { } /** - * Get the migrationInstanceResourceId property: ResourceId of the private endpoint migration instance. + * Get the migrationInstanceResourceId property: Identifier of the private endpoint migration instance. * * @return the migrationInstanceResourceId value. */ @@ -158,21 +158,21 @@ public String migrationInstanceResourceId() { } /** - * Set the migrationInstanceResourceId property: ResourceId of the private endpoint migration instance. + * Set the migrationInstanceResourceId property: Identifier of the private endpoint migration instance. * * @param migrationInstanceResourceId the migrationInstanceResourceId value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withMigrationInstanceResourceId(String migrationInstanceResourceId) { + public MigrationInner withMigrationInstanceResourceId(String migrationInstanceResourceId) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withMigrationInstanceResourceId(migrationInstanceResourceId); return this; } /** - * Get the migrationMode property: There are two types of migration modes Online and Offline. + * Get the migrationMode property: Mode used to perform the migration: Online or Offline. * * @return the migrationMode value. */ @@ -181,21 +181,21 @@ public MigrationMode migrationMode() { } /** - * Set the migrationMode property: There are two types of migration modes Online and Offline. + * Set the migrationMode property: Mode used to perform the migration: Online or Offline. * * @param migrationMode the migrationMode value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withMigrationMode(MigrationMode migrationMode) { + public MigrationInner withMigrationMode(MigrationMode migrationMode) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withMigrationMode(migrationMode); return this; } /** - * Get the migrationOption property: This indicates the supported Migration option for the migration. + * Get the migrationOption property: Supported option for a migration. * * @return the migrationOption value. */ @@ -204,25 +204,24 @@ public MigrationOption migrationOption() { } /** - * Set the migrationOption property: This indicates the supported Migration option for the migration. + * Set the migrationOption property: Supported option for a migration. * * @param migrationOption the migrationOption value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withMigrationOption(MigrationOption migrationOption) { + public MigrationInner withMigrationOption(MigrationOption migrationOption) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withMigrationOption(migrationOption); return this; } /** - * Get the sourceType property: migration source server type : OnPremises, AWS, GCP, AzureVM, - * PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, - * EDB_Oracle_Server, EDB_PostgreSQL, PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, - * Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or - * Supabase_PostgreSQL. + * Get the sourceType property: Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, + * AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, + * EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, + * OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL. * * @return the sourceType value. */ @@ -231,26 +230,25 @@ public SourceType sourceType() { } /** - * Set the sourceType property: migration source server type : OnPremises, AWS, GCP, AzureVM, - * PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, - * EDB_Oracle_Server, EDB_PostgreSQL, PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, - * Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or - * Supabase_PostgreSQL. + * Set the sourceType property: Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, + * AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, + * EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, + * OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL. * * @param sourceType the sourceType value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withSourceType(SourceType sourceType) { + public MigrationInner withSourceType(SourceType sourceType) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withSourceType(sourceType); return this; } /** - * Get the sslMode property: SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and - * Prefer for other source types. + * Get the sslMode property: SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is + * 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. * * @return the sslMode value. */ @@ -259,22 +257,22 @@ public SslMode sslMode() { } /** - * Set the sslMode property: SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and - * Prefer for other source types. + * Set the sslMode property: SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is + * 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. * * @param sslMode the sslMode value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withSslMode(SslMode sslMode) { + public MigrationInner withSslMode(SslMode sslMode) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withSslMode(sslMode); return this; } /** - * Get the sourceDbServerMetadata property: Metadata of the source database server. + * Get the sourceDbServerMetadata property: Metadata of source database server. * * @return the sourceDbServerMetadata value. */ @@ -283,7 +281,7 @@ public DbServerMetadata sourceDbServerMetadata() { } /** - * Get the targetDbServerMetadata property: Metadata of the target database server. + * Get the targetDbServerMetadata property: Metadata of target database server. * * @return the targetDbServerMetadata value. */ @@ -292,8 +290,8 @@ public DbServerMetadata targetDbServerMetadata() { } /** - * Get the sourceDbServerResourceId property: ResourceId of the source database server in case the sourceType is - * PostgreSQLSingleServer. For other source types this should be ipaddress:port@username or + * Get the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or * hostname:port@username. * * @return the sourceDbServerResourceId value. @@ -303,24 +301,25 @@ public String sourceDbServerResourceId() { } /** - * Set the sourceDbServerResourceId property: ResourceId of the source database server in case the sourceType is - * PostgreSQLSingleServer. For other source types this should be ipaddress:port@username or + * Set the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or * hostname:port@username. * * @param sourceDbServerResourceId the sourceDbServerResourceId value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withSourceDbServerResourceId(String sourceDbServerResourceId) { + public MigrationInner withSourceDbServerResourceId(String sourceDbServerResourceId) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withSourceDbServerResourceId(sourceDbServerResourceId); return this; } /** - * Get the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Get the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @return the sourceDbServerFullyQualifiedDomainName value. */ @@ -329,23 +328,23 @@ public String sourceDbServerFullyQualifiedDomainName() { } /** - * Set the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Set the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @param sourceDbServerFullyQualifiedDomainName the sourceDbServerFullyQualifiedDomainName value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner - withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName) { + public MigrationInner withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withSourceDbServerFullyQualifiedDomainName(sourceDbServerFullyQualifiedDomainName); return this; } /** - * Get the targetDbServerResourceId property: ResourceId of the source database server. + * Get the targetDbServerResourceId property: Identifier of the target database server resource. * * @return the targetDbServerResourceId value. */ @@ -354,8 +353,9 @@ public String targetDbServerResourceId() { } /** - * Get the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Get the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @return the targetDbServerFullyQualifiedDomainName value. */ @@ -364,16 +364,16 @@ public String targetDbServerFullyQualifiedDomainName() { } /** - * Set the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Set the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @param targetDbServerFullyQualifiedDomainName the targetDbServerFullyQualifiedDomainName value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner - withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName) { + public MigrationInner withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withTargetDbServerFullyQualifiedDomainName(targetDbServerFullyQualifiedDomainName); return this; @@ -392,18 +392,18 @@ public MigrationSecretParameters secretParameters() { * Set the secretParameters property: Migration secret parameters. * * @param secretParameters the secretParameters value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withSecretParameters(MigrationSecretParameters secretParameters) { + public MigrationInner withSecretParameters(MigrationSecretParameters secretParameters) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withSecretParameters(secretParameters); return this; } /** - * Get the dbsToMigrate property: Number of databases to migrate. + * Get the dbsToMigrate property: Names of databases to migrate. * * @return the dbsToMigrate value. */ @@ -412,76 +412,76 @@ public List dbsToMigrate() { } /** - * Set the dbsToMigrate property: Number of databases to migrate. + * Set the dbsToMigrate property: Names of databases to migrate. * * @param dbsToMigrate the dbsToMigrate value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withDbsToMigrate(List dbsToMigrate) { + public MigrationInner withDbsToMigrate(List dbsToMigrate) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withDbsToMigrate(dbsToMigrate); return this; } /** - * Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @return the setupLogicalReplicationOnSourceDbIfNeeded value. */ - public LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded() { + public LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded() { return this.innerProperties() == null ? null : this.innerProperties().setupLogicalReplicationOnSourceDbIfNeeded(); } /** - * Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @param setupLogicalReplicationOnSourceDbIfNeeded the setupLogicalReplicationOnSourceDbIfNeeded value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withSetupLogicalReplicationOnSourceDbIfNeeded( - LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded) { + public MigrationInner withSetupLogicalReplicationOnSourceDbIfNeeded( + LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withSetupLogicalReplicationOnSourceDbIfNeeded(setupLogicalReplicationOnSourceDbIfNeeded); return this; } /** - * Get the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Get the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @return the overwriteDbsInTarget value. */ - public OverwriteDbsInTargetEnum overwriteDbsInTarget() { + public OverwriteDatabasesOnTargetServer overwriteDbsInTarget() { return this.innerProperties() == null ? null : this.innerProperties().overwriteDbsInTarget(); } /** - * Set the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Set the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @param overwriteDbsInTarget the overwriteDbsInTarget value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withOverwriteDbsInTarget(OverwriteDbsInTargetEnum overwriteDbsInTarget) { + public MigrationInner withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer overwriteDbsInTarget) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withOverwriteDbsInTarget(overwriteDbsInTarget); return this; } /** - * Get the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Get the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @return the migrationWindowStartTimeInUtc value. */ @@ -490,21 +490,21 @@ public OffsetDateTime migrationWindowStartTimeInUtc() { } /** - * Set the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Set the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @param migrationWindowStartTimeInUtc the migrationWindowStartTimeInUtc value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { + public MigrationInner withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withMigrationWindowStartTimeInUtc(migrationWindowStartTimeInUtc); return this; } /** - * Get the migrationWindowEndTimeInUtc property: End time in UTC for migration window. + * Get the migrationWindowEndTimeInUtc property: End time (UTC) for migration window. * * @return the migrationWindowEndTimeInUtc value. */ @@ -513,91 +513,91 @@ public OffsetDateTime migrationWindowEndTimeInUtc() { } /** - * Set the migrationWindowEndTimeInUtc property: End time in UTC for migration window. + * Set the migrationWindowEndTimeInUtc property: End time (UTC) for migration window. * * @param migrationWindowEndTimeInUtc the migrationWindowEndTimeInUtc value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withMigrationWindowEndTimeInUtc(OffsetDateTime migrationWindowEndTimeInUtc) { + public MigrationInner withMigrationWindowEndTimeInUtc(OffsetDateTime migrationWindowEndTimeInUtc) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withMigrationWindowEndTimeInUtc(migrationWindowEndTimeInUtc); return this; } /** - * Get the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Get the migrateRoles property: Indicates if roles and permissions must be migrated. * * @return the migrateRoles value. */ - public MigrateRolesEnum migrateRoles() { + public MigrateRolesAndPermissions migrateRoles() { return this.innerProperties() == null ? null : this.innerProperties().migrateRoles(); } /** - * Set the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Set the migrateRoles property: Indicates if roles and permissions must be migrated. * * @param migrateRoles the migrateRoles value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withMigrateRoles(MigrateRolesEnum migrateRoles) { + public MigrationInner withMigrateRoles(MigrateRolesAndPermissions migrateRoles) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withMigrateRoles(migrateRoles); return this; } /** - * Get the startDataMigration property: Indicates whether the data migration should start right away. + * Get the startDataMigration property: Indicates if data migration must start right away. * * @return the startDataMigration value. */ - public StartDataMigrationEnum startDataMigration() { + public StartDataMigration startDataMigration() { return this.innerProperties() == null ? null : this.innerProperties().startDataMigration(); } /** - * Set the startDataMigration property: Indicates whether the data migration should start right away. + * Set the startDataMigration property: Indicates if data migration must start right away. * * @param startDataMigration the startDataMigration value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withStartDataMigration(StartDataMigrationEnum startDataMigration) { + public MigrationInner withStartDataMigration(StartDataMigration startDataMigration) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withStartDataMigration(startDataMigration); return this; } /** - * Get the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Get the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @return the triggerCutover value. */ - public TriggerCutoverEnum triggerCutover() { + public TriggerCutover triggerCutover() { return this.innerProperties() == null ? null : this.innerProperties().triggerCutover(); } /** - * Set the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Set the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @param triggerCutover the triggerCutover value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withTriggerCutover(TriggerCutoverEnum triggerCutover) { + public MigrationInner withTriggerCutover(TriggerCutover triggerCutover) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withTriggerCutover(triggerCutover); return this; } /** - * Get the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Get the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToTriggerCutoverOn value. */ @@ -606,46 +606,46 @@ public List dbsToTriggerCutoverOn() { } /** - * Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @param dbsToTriggerCutoverOn the dbsToTriggerCutoverOn value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { + public MigrationInner withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withDbsToTriggerCutoverOn(dbsToTriggerCutoverOn); return this; } /** - * Get the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Get the cancel property: Indicates if cancel must be triggered for the entire migration. * * @return the cancel value. */ - public CancelEnum cancel() { + public Cancel cancel() { return this.innerProperties() == null ? null : this.innerProperties().cancel(); } /** - * Set the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Set the cancel property: Indicates if cancel must be triggered for the entire migration. * * @param cancel the cancel value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withCancel(CancelEnum cancel) { + public MigrationInner withCancel(Cancel cancel) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withCancel(cancel); return this; } /** - * Get the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Get the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToCancelMigrationOn value. */ @@ -654,15 +654,15 @@ public List dbsToCancelMigrationOn() { } /** - * Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @param dbsToCancelMigrationOn the dbsToCancelMigrationOn value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { + public MigrationInner withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withDbsToCancelMigrationOn(dbsToCancelMigrationOn); return this; @@ -692,42 +692,42 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of MigrationResourceInner from the JsonReader. + * Reads an instance of MigrationInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of MigrationResourceInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. + * @return An instance of MigrationInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MigrationResourceInner. + * @throws IOException If an error occurs while reading the MigrationInner. */ - public static MigrationResourceInner fromJson(JsonReader jsonReader) throws IOException { + public static MigrationInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - MigrationResourceInner deserializedMigrationResourceInner = new MigrationResourceInner(); + MigrationInner deserializedMigrationInner = new MigrationInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedMigrationResourceInner.id = reader.getString(); + deserializedMigrationInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedMigrationResourceInner.name = reader.getString(); + deserializedMigrationInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedMigrationResourceInner.type = reader.getString(); + deserializedMigrationInner.type = reader.getString(); } else if ("location".equals(fieldName)) { - deserializedMigrationResourceInner.withLocation(reader.getString()); + deserializedMigrationInner.withLocation(reader.getString()); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedMigrationResourceInner.withTags(tags); + deserializedMigrationInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedMigrationResourceInner.innerProperties = MigrationResourceProperties.fromJson(reader); + deserializedMigrationInner.innerProperties = MigrationProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedMigrationResourceInner.systemData = SystemData.fromJson(reader); + deserializedMigrationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedMigrationResourceInner; + return deserializedMigrationInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityInner.java similarity index 62% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityResourceInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityInner.java index 1831ad0bad99..dc056ff9a338 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityResourceInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityInner.java @@ -14,28 +14,27 @@ import java.io.IOException; /** - * Represents a migration name's availability. + * Availability of a migration name. */ @Fluent -public final class MigrationNameAvailabilityResourceInner - implements JsonSerializable { +public final class MigrationNameAvailabilityInner implements JsonSerializable { /* - * The resource name to verify. + * Name of the migration to check for validity and availability. */ private String name; /* - * The type of the resource. + * Type of resource. */ private String type; /* - * Indicates whether the resource name is available. + * Indicates if the migration name is available. */ private Boolean nameAvailable; /* - * Migration name availability reason + * Migration name availability reason. */ private MigrationNameAvailabilityReason reason; @@ -45,13 +44,13 @@ public final class MigrationNameAvailabilityResourceInner private String message; /** - * Creates an instance of MigrationNameAvailabilityResourceInner class. + * Creates an instance of MigrationNameAvailabilityInner class. */ - public MigrationNameAvailabilityResourceInner() { + public MigrationNameAvailabilityInner() { } /** - * Get the name property: The resource name to verify. + * Get the name property: Name of the migration to check for validity and availability. * * @return the name value. */ @@ -60,18 +59,18 @@ public String name() { } /** - * Set the name property: The resource name to verify. + * Set the name property: Name of the migration to check for validity and availability. * * @param name the name value to set. - * @return the MigrationNameAvailabilityResourceInner object itself. + * @return the MigrationNameAvailabilityInner object itself. */ - public MigrationNameAvailabilityResourceInner withName(String name) { + public MigrationNameAvailabilityInner withName(String name) { this.name = name; return this; } /** - * Get the type property: The type of the resource. + * Get the type property: Type of resource. * * @return the type value. */ @@ -80,18 +79,18 @@ public String type() { } /** - * Set the type property: The type of the resource. + * Set the type property: Type of resource. * * @param type the type value to set. - * @return the MigrationNameAvailabilityResourceInner object itself. + * @return the MigrationNameAvailabilityInner object itself. */ - public MigrationNameAvailabilityResourceInner withType(String type) { + public MigrationNameAvailabilityInner withType(String type) { this.type = type; return this; } /** - * Get the nameAvailable property: Indicates whether the resource name is available. + * Get the nameAvailable property: Indicates if the migration name is available. * * @return the nameAvailable value. */ @@ -126,16 +125,16 @@ public void validate() { if (name() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( - "Missing required property name in model MigrationNameAvailabilityResourceInner")); + "Missing required property name in model MigrationNameAvailabilityInner")); } if (type() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( - "Missing required property type in model MigrationNameAvailabilityResourceInner")); + "Missing required property type in model MigrationNameAvailabilityInner")); } } - private static final ClientLogger LOGGER = new ClientLogger(MigrationNameAvailabilityResourceInner.class); + private static final ClientLogger LOGGER = new ClientLogger(MigrationNameAvailabilityInner.class); /** * {@inheritDoc} @@ -149,40 +148,40 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of MigrationNameAvailabilityResourceInner from the JsonReader. + * Reads an instance of MigrationNameAvailabilityInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of MigrationNameAvailabilityResourceInner if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. + * @return An instance of MigrationNameAvailabilityInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MigrationNameAvailabilityResourceInner. + * @throws IOException If an error occurs while reading the MigrationNameAvailabilityInner. */ - public static MigrationNameAvailabilityResourceInner fromJson(JsonReader jsonReader) throws IOException { + public static MigrationNameAvailabilityInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - MigrationNameAvailabilityResourceInner deserializedMigrationNameAvailabilityResourceInner - = new MigrationNameAvailabilityResourceInner(); + MigrationNameAvailabilityInner deserializedMigrationNameAvailabilityInner + = new MigrationNameAvailabilityInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("name".equals(fieldName)) { - deserializedMigrationNameAvailabilityResourceInner.name = reader.getString(); + deserializedMigrationNameAvailabilityInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedMigrationNameAvailabilityResourceInner.type = reader.getString(); + deserializedMigrationNameAvailabilityInner.type = reader.getString(); } else if ("nameAvailable".equals(fieldName)) { - deserializedMigrationNameAvailabilityResourceInner.nameAvailable + deserializedMigrationNameAvailabilityInner.nameAvailable = reader.getNullable(JsonReader::getBoolean); } else if ("reason".equals(fieldName)) { - deserializedMigrationNameAvailabilityResourceInner.reason + deserializedMigrationNameAvailabilityInner.reason = MigrationNameAvailabilityReason.fromString(reader.getString()); } else if ("message".equals(fieldName)) { - deserializedMigrationNameAvailabilityResourceInner.message = reader.getString(); + deserializedMigrationNameAvailabilityInner.message = reader.getString(); } else { reader.skipChildren(); } } - return deserializedMigrationNameAvailabilityResourceInner; + return deserializedMigrationNameAvailabilityInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourceProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationProperties.java similarity index 53% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourceProperties.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationProperties.java index 52eb3cd8491e..e8ac145fd536 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourceProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationProperties.java @@ -10,171 +10,173 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CancelEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Cancel; import com.azure.resourcemanager.postgresqlflexibleserver.models.DbServerMetadata; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceDbEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceServer; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesAndPermissions; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationMode; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationOption; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParameters; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationStatus; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDbsInTargetEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDatabasesOnTargetServer; import com.azure.resourcemanager.postgresqlflexibleserver.models.SourceType; import com.azure.resourcemanager.postgresqlflexibleserver.models.SslMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.StartDataMigrationEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TriggerCutoverEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StartDataMigration; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TriggerCutover; import java.io.IOException; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.List; /** - * Migration resource properties. + * Migration. */ @Fluent -public final class MigrationResourceProperties implements JsonSerializable { +public final class MigrationProperties implements JsonSerializable { /* - * ID for migration, a GUID. + * Identifier of a migration. */ private String migrationId; /* - * Current status of migration + * Current status of a migration. */ private MigrationStatus currentStatus; /* - * ResourceId of the private endpoint migration instance + * Identifier of the private endpoint migration instance. */ private String migrationInstanceResourceId; /* - * There are two types of migration modes Online and Offline + * Mode used to perform the migration: Online or Offline. */ private MigrationMode migrationMode; /* - * This indicates the supported Migration option for the migration + * Supported option for a migration. */ private MigrationOption migrationOption; /* - * migration source server type : OnPremises, AWS, GCP, AzureVM, PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, - * AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, EDB_Oracle_Server, EDB_PostgreSQL, - * PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, Heroku_PostgreSQL, Crunchy_PostgreSQL, - * ApsaraDB_RDS, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or Supabase_PostgreSQL + * Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, AWS_RDS, AzureVM, + * Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, EDB_PostgreSQL, + * GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, OnPremises, + * PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL */ private SourceType sourceType; /* - * SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and Prefer for other source - * types + * SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for + * other source types is 'Prefer'. */ private SslMode sslMode; /* - * Metadata of the source database server + * Metadata of source database server. */ private DbServerMetadata sourceDbServerMetadata; /* - * Metadata of the target database server + * Metadata of target database server. */ private DbServerMetadata targetDbServerMetadata; /* - * ResourceId of the source database server in case the sourceType is PostgreSQLSingleServer. For other source types - * this should be ipaddress:port@username or hostname:port@username + * Identifier of the source database server resource, when 'sourceType' is 'PostgreSQLSingleServer'. For other + * source types this must be set to ipaddress:port@username or hostname:port@username. */ private String sourceDbServerResourceId; /* - * Source server fully qualified domain name (FQDN) or IP address. It is a optional value, if customer provide it, - * migration service will always use it for connection + * Fully qualified domain name (FQDN) or IP address of the source server. This property is optional. When provided, + * the migration service will always use it to connect to the source server. */ private String sourceDbServerFullyQualifiedDomainName; /* - * ResourceId of the source database server + * Identifier of the target database server resource. */ private String targetDbServerResourceId; /* - * Target server fully qualified domain name (FQDN) or IP address. It is a optional value, if customer provide it, - * migration service will always use it for connection + * Fully qualified domain name (FQDN) or IP address of the target server. This property is optional. When provided, + * the migration service will always use it to connect to the target server. */ private String targetDbServerFullyQualifiedDomainName; /* - * Migration secret parameters + * Migration secret parameters. */ private MigrationSecretParameters secretParameters; /* - * Number of databases to migrate + * Names of databases to migrate. */ private List dbsToMigrate; /* - * Indicates whether to setup LogicalReplicationOnSourceDb, if needed + * Indicates whether to setup logical replication on source server, if needed. */ - private LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded; + private LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded; /* - * Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the - * migration workflow will wait for a confirmation, if it detects that the database already exists. + * Indicates if databases on the target server can be overwritten when already present. If set to 'False', when the + * migration workflow detects that the database already exists on the target server, it will wait for a + * confirmation. */ - private OverwriteDbsInTargetEnum overwriteDbsInTarget; + private OverwriteDatabasesOnTargetServer overwriteDbsInTarget; /* - * Start time in UTC for migration window + * Start time (UTC) for migration window. */ private OffsetDateTime migrationWindowStartTimeInUtc; /* - * End time in UTC for migration window + * End time (UTC) for migration window. */ private OffsetDateTime migrationWindowEndTimeInUtc; /* - * To migrate roles and permissions we need to send this flag as True + * Indicates if roles and permissions must be migrated. */ - private MigrateRolesEnum migrateRoles; + private MigrateRolesAndPermissions migrateRoles; /* - * Indicates whether the data migration should start right away + * Indicates if data migration must start right away. */ - private StartDataMigrationEnum startDataMigration; + private StartDataMigration startDataMigration; /* - * To trigger cutover for entire migration we need to send this flag as True + * Indicates if cutover must be triggered for the entire migration. */ - private TriggerCutoverEnum triggerCutover; + private TriggerCutover triggerCutover; /* - * When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in - * this array + * When you want to trigger cutover for specific databases set 'triggerCutover' to 'True' and the names of the + * specific databases in this array. */ private List dbsToTriggerCutoverOn; /* - * To trigger cancel for entire migration we need to send this flag as True + * Indicates if cancel must be triggered for the entire migration. */ - private CancelEnum cancel; + private Cancel cancel; /* - * When you want to trigger cancel for specific databases send cancel flag as True and database names in this array + * When you want to trigger cancel for specific databases set 'triggerCutover' to 'True' and the names of the + * specific databases in this array. */ private List dbsToCancelMigrationOn; /** - * Creates an instance of MigrationResourceProperties class. + * Creates an instance of MigrationProperties class. */ - public MigrationResourceProperties() { + public MigrationProperties() { } /** - * Get the migrationId property: ID for migration, a GUID. + * Get the migrationId property: Identifier of a migration. * * @return the migrationId value. */ @@ -183,7 +185,7 @@ public String migrationId() { } /** - * Get the currentStatus property: Current status of migration. + * Get the currentStatus property: Current status of a migration. * * @return the currentStatus value. */ @@ -192,7 +194,7 @@ public MigrationStatus currentStatus() { } /** - * Get the migrationInstanceResourceId property: ResourceId of the private endpoint migration instance. + * Get the migrationInstanceResourceId property: Identifier of the private endpoint migration instance. * * @return the migrationInstanceResourceId value. */ @@ -201,18 +203,18 @@ public String migrationInstanceResourceId() { } /** - * Set the migrationInstanceResourceId property: ResourceId of the private endpoint migration instance. + * Set the migrationInstanceResourceId property: Identifier of the private endpoint migration instance. * * @param migrationInstanceResourceId the migrationInstanceResourceId value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withMigrationInstanceResourceId(String migrationInstanceResourceId) { + public MigrationProperties withMigrationInstanceResourceId(String migrationInstanceResourceId) { this.migrationInstanceResourceId = migrationInstanceResourceId; return this; } /** - * Get the migrationMode property: There are two types of migration modes Online and Offline. + * Get the migrationMode property: Mode used to perform the migration: Online or Offline. * * @return the migrationMode value. */ @@ -221,18 +223,18 @@ public MigrationMode migrationMode() { } /** - * Set the migrationMode property: There are two types of migration modes Online and Offline. + * Set the migrationMode property: Mode used to perform the migration: Online or Offline. * * @param migrationMode the migrationMode value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withMigrationMode(MigrationMode migrationMode) { + public MigrationProperties withMigrationMode(MigrationMode migrationMode) { this.migrationMode = migrationMode; return this; } /** - * Get the migrationOption property: This indicates the supported Migration option for the migration. + * Get the migrationOption property: Supported option for a migration. * * @return the migrationOption value. */ @@ -241,22 +243,21 @@ public MigrationOption migrationOption() { } /** - * Set the migrationOption property: This indicates the supported Migration option for the migration. + * Set the migrationOption property: Supported option for a migration. * * @param migrationOption the migrationOption value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withMigrationOption(MigrationOption migrationOption) { + public MigrationProperties withMigrationOption(MigrationOption migrationOption) { this.migrationOption = migrationOption; return this; } /** - * Get the sourceType property: migration source server type : OnPremises, AWS, GCP, AzureVM, - * PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, - * EDB_Oracle_Server, EDB_PostgreSQL, PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, - * Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or - * Supabase_PostgreSQL. + * Get the sourceType property: Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, + * AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, + * EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, + * OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL. * * @return the sourceType value. */ @@ -265,23 +266,22 @@ public SourceType sourceType() { } /** - * Set the sourceType property: migration source server type : OnPremises, AWS, GCP, AzureVM, - * PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, - * EDB_Oracle_Server, EDB_PostgreSQL, PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, - * Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or - * Supabase_PostgreSQL. + * Set the sourceType property: Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, + * AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, + * EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, + * OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL. * * @param sourceType the sourceType value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withSourceType(SourceType sourceType) { + public MigrationProperties withSourceType(SourceType sourceType) { this.sourceType = sourceType; return this; } /** - * Get the sslMode property: SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and - * Prefer for other source types. + * Get the sslMode property: SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is + * 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. * * @return the sslMode value. */ @@ -290,19 +290,19 @@ public SslMode sslMode() { } /** - * Set the sslMode property: SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and - * Prefer for other source types. + * Set the sslMode property: SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is + * 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. * * @param sslMode the sslMode value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withSslMode(SslMode sslMode) { + public MigrationProperties withSslMode(SslMode sslMode) { this.sslMode = sslMode; return this; } /** - * Get the sourceDbServerMetadata property: Metadata of the source database server. + * Get the sourceDbServerMetadata property: Metadata of source database server. * * @return the sourceDbServerMetadata value. */ @@ -311,7 +311,7 @@ public DbServerMetadata sourceDbServerMetadata() { } /** - * Get the targetDbServerMetadata property: Metadata of the target database server. + * Get the targetDbServerMetadata property: Metadata of target database server. * * @return the targetDbServerMetadata value. */ @@ -320,8 +320,8 @@ public DbServerMetadata targetDbServerMetadata() { } /** - * Get the sourceDbServerResourceId property: ResourceId of the source database server in case the sourceType is - * PostgreSQLSingleServer. For other source types this should be ipaddress:port@username or + * Get the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or * hostname:port@username. * * @return the sourceDbServerResourceId value. @@ -331,21 +331,22 @@ public String sourceDbServerResourceId() { } /** - * Set the sourceDbServerResourceId property: ResourceId of the source database server in case the sourceType is - * PostgreSQLSingleServer. For other source types this should be ipaddress:port@username or + * Set the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or * hostname:port@username. * * @param sourceDbServerResourceId the sourceDbServerResourceId value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withSourceDbServerResourceId(String sourceDbServerResourceId) { + public MigrationProperties withSourceDbServerResourceId(String sourceDbServerResourceId) { this.sourceDbServerResourceId = sourceDbServerResourceId; return this; } /** - * Get the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Get the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @return the sourceDbServerFullyQualifiedDomainName value. */ @@ -354,20 +355,21 @@ public String sourceDbServerFullyQualifiedDomainName() { } /** - * Set the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Set the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @param sourceDbServerFullyQualifiedDomainName the sourceDbServerFullyQualifiedDomainName value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties + public MigrationProperties withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName) { this.sourceDbServerFullyQualifiedDomainName = sourceDbServerFullyQualifiedDomainName; return this; } /** - * Get the targetDbServerResourceId property: ResourceId of the source database server. + * Get the targetDbServerResourceId property: Identifier of the target database server resource. * * @return the targetDbServerResourceId value. */ @@ -376,8 +378,9 @@ public String targetDbServerResourceId() { } /** - * Get the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Get the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @return the targetDbServerFullyQualifiedDomainName value. */ @@ -386,13 +389,14 @@ public String targetDbServerFullyQualifiedDomainName() { } /** - * Set the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Set the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @param targetDbServerFullyQualifiedDomainName the targetDbServerFullyQualifiedDomainName value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties + public MigrationProperties withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName) { this.targetDbServerFullyQualifiedDomainName = targetDbServerFullyQualifiedDomainName; return this; @@ -411,15 +415,15 @@ public MigrationSecretParameters secretParameters() { * Set the secretParameters property: Migration secret parameters. * * @param secretParameters the secretParameters value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withSecretParameters(MigrationSecretParameters secretParameters) { + public MigrationProperties withSecretParameters(MigrationSecretParameters secretParameters) { this.secretParameters = secretParameters; return this; } /** - * Get the dbsToMigrate property: Number of databases to migrate. + * Get the dbsToMigrate property: Names of databases to migrate. * * @return the dbsToMigrate value. */ @@ -428,65 +432,65 @@ public List dbsToMigrate() { } /** - * Set the dbsToMigrate property: Number of databases to migrate. + * Set the dbsToMigrate property: Names of databases to migrate. * * @param dbsToMigrate the dbsToMigrate value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withDbsToMigrate(List dbsToMigrate) { + public MigrationProperties withDbsToMigrate(List dbsToMigrate) { this.dbsToMigrate = dbsToMigrate; return this; } /** - * Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @return the setupLogicalReplicationOnSourceDbIfNeeded value. */ - public LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded() { + public LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded() { return this.setupLogicalReplicationOnSourceDbIfNeeded; } /** - * Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @param setupLogicalReplicationOnSourceDbIfNeeded the setupLogicalReplicationOnSourceDbIfNeeded value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withSetupLogicalReplicationOnSourceDbIfNeeded( - LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded) { + public MigrationProperties withSetupLogicalReplicationOnSourceDbIfNeeded( + LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded) { this.setupLogicalReplicationOnSourceDbIfNeeded = setupLogicalReplicationOnSourceDbIfNeeded; return this; } /** - * Get the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Get the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @return the overwriteDbsInTarget value. */ - public OverwriteDbsInTargetEnum overwriteDbsInTarget() { + public OverwriteDatabasesOnTargetServer overwriteDbsInTarget() { return this.overwriteDbsInTarget; } /** - * Set the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Set the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @param overwriteDbsInTarget the overwriteDbsInTarget value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withOverwriteDbsInTarget(OverwriteDbsInTargetEnum overwriteDbsInTarget) { + public MigrationProperties withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer overwriteDbsInTarget) { this.overwriteDbsInTarget = overwriteDbsInTarget; return this; } /** - * Get the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Get the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @return the migrationWindowStartTimeInUtc value. */ @@ -495,18 +499,18 @@ public OffsetDateTime migrationWindowStartTimeInUtc() { } /** - * Set the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Set the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @param migrationWindowStartTimeInUtc the migrationWindowStartTimeInUtc value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { + public MigrationProperties withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { this.migrationWindowStartTimeInUtc = migrationWindowStartTimeInUtc; return this; } /** - * Get the migrationWindowEndTimeInUtc property: End time in UTC for migration window. + * Get the migrationWindowEndTimeInUtc property: End time (UTC) for migration window. * * @return the migrationWindowEndTimeInUtc value. */ @@ -515,79 +519,79 @@ public OffsetDateTime migrationWindowEndTimeInUtc() { } /** - * Set the migrationWindowEndTimeInUtc property: End time in UTC for migration window. + * Set the migrationWindowEndTimeInUtc property: End time (UTC) for migration window. * * @param migrationWindowEndTimeInUtc the migrationWindowEndTimeInUtc value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withMigrationWindowEndTimeInUtc(OffsetDateTime migrationWindowEndTimeInUtc) { + public MigrationProperties withMigrationWindowEndTimeInUtc(OffsetDateTime migrationWindowEndTimeInUtc) { this.migrationWindowEndTimeInUtc = migrationWindowEndTimeInUtc; return this; } /** - * Get the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Get the migrateRoles property: Indicates if roles and permissions must be migrated. * * @return the migrateRoles value. */ - public MigrateRolesEnum migrateRoles() { + public MigrateRolesAndPermissions migrateRoles() { return this.migrateRoles; } /** - * Set the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Set the migrateRoles property: Indicates if roles and permissions must be migrated. * * @param migrateRoles the migrateRoles value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withMigrateRoles(MigrateRolesEnum migrateRoles) { + public MigrationProperties withMigrateRoles(MigrateRolesAndPermissions migrateRoles) { this.migrateRoles = migrateRoles; return this; } /** - * Get the startDataMigration property: Indicates whether the data migration should start right away. + * Get the startDataMigration property: Indicates if data migration must start right away. * * @return the startDataMigration value. */ - public StartDataMigrationEnum startDataMigration() { + public StartDataMigration startDataMigration() { return this.startDataMigration; } /** - * Set the startDataMigration property: Indicates whether the data migration should start right away. + * Set the startDataMigration property: Indicates if data migration must start right away. * * @param startDataMigration the startDataMigration value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withStartDataMigration(StartDataMigrationEnum startDataMigration) { + public MigrationProperties withStartDataMigration(StartDataMigration startDataMigration) { this.startDataMigration = startDataMigration; return this; } /** - * Get the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Get the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @return the triggerCutover value. */ - public TriggerCutoverEnum triggerCutover() { + public TriggerCutover triggerCutover() { return this.triggerCutover; } /** - * Set the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Set the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @param triggerCutover the triggerCutover value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withTriggerCutover(TriggerCutoverEnum triggerCutover) { + public MigrationProperties withTriggerCutover(TriggerCutover triggerCutover) { this.triggerCutover = triggerCutover; return this; } /** - * Get the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Get the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToTriggerCutoverOn value. */ @@ -596,40 +600,40 @@ public List dbsToTriggerCutoverOn() { } /** - * Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @param dbsToTriggerCutoverOn the dbsToTriggerCutoverOn value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { + public MigrationProperties withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { this.dbsToTriggerCutoverOn = dbsToTriggerCutoverOn; return this; } /** - * Get the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Get the cancel property: Indicates if cancel must be triggered for the entire migration. * * @return the cancel value. */ - public CancelEnum cancel() { + public Cancel cancel() { return this.cancel; } /** - * Set the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Set the cancel property: Indicates if cancel must be triggered for the entire migration. * * @param cancel the cancel value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withCancel(CancelEnum cancel) { + public MigrationProperties withCancel(Cancel cancel) { this.cancel = cancel; return this; } /** - * Get the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Get the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToCancelMigrationOn value. */ @@ -638,13 +642,13 @@ public List dbsToCancelMigrationOn() { } /** - * Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @param dbsToCancelMigrationOn the dbsToCancelMigrationOn value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { + public MigrationProperties withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { this.dbsToCancelMigrationOn = dbsToCancelMigrationOn; return this; } @@ -716,89 +720,85 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of MigrationResourceProperties from the JsonReader. + * Reads an instance of MigrationProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of MigrationResourceProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MigrationResourceProperties. + * @return An instance of MigrationProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MigrationProperties. */ - public static MigrationResourceProperties fromJson(JsonReader jsonReader) throws IOException { + public static MigrationProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - MigrationResourceProperties deserializedMigrationResourceProperties = new MigrationResourceProperties(); + MigrationProperties deserializedMigrationProperties = new MigrationProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("migrationId".equals(fieldName)) { - deserializedMigrationResourceProperties.migrationId = reader.getString(); + deserializedMigrationProperties.migrationId = reader.getString(); } else if ("currentStatus".equals(fieldName)) { - deserializedMigrationResourceProperties.currentStatus = MigrationStatus.fromJson(reader); + deserializedMigrationProperties.currentStatus = MigrationStatus.fromJson(reader); } else if ("migrationInstanceResourceId".equals(fieldName)) { - deserializedMigrationResourceProperties.migrationInstanceResourceId = reader.getString(); + deserializedMigrationProperties.migrationInstanceResourceId = reader.getString(); } else if ("migrationMode".equals(fieldName)) { - deserializedMigrationResourceProperties.migrationMode - = MigrationMode.fromString(reader.getString()); + deserializedMigrationProperties.migrationMode = MigrationMode.fromString(reader.getString()); } else if ("migrationOption".equals(fieldName)) { - deserializedMigrationResourceProperties.migrationOption - = MigrationOption.fromString(reader.getString()); + deserializedMigrationProperties.migrationOption = MigrationOption.fromString(reader.getString()); } else if ("sourceType".equals(fieldName)) { - deserializedMigrationResourceProperties.sourceType = SourceType.fromString(reader.getString()); + deserializedMigrationProperties.sourceType = SourceType.fromString(reader.getString()); } else if ("sslMode".equals(fieldName)) { - deserializedMigrationResourceProperties.sslMode = SslMode.fromString(reader.getString()); + deserializedMigrationProperties.sslMode = SslMode.fromString(reader.getString()); } else if ("sourceDbServerMetadata".equals(fieldName)) { - deserializedMigrationResourceProperties.sourceDbServerMetadata = DbServerMetadata.fromJson(reader); + deserializedMigrationProperties.sourceDbServerMetadata = DbServerMetadata.fromJson(reader); } else if ("targetDbServerMetadata".equals(fieldName)) { - deserializedMigrationResourceProperties.targetDbServerMetadata = DbServerMetadata.fromJson(reader); + deserializedMigrationProperties.targetDbServerMetadata = DbServerMetadata.fromJson(reader); } else if ("sourceDbServerResourceId".equals(fieldName)) { - deserializedMigrationResourceProperties.sourceDbServerResourceId = reader.getString(); + deserializedMigrationProperties.sourceDbServerResourceId = reader.getString(); } else if ("sourceDbServerFullyQualifiedDomainName".equals(fieldName)) { - deserializedMigrationResourceProperties.sourceDbServerFullyQualifiedDomainName = reader.getString(); + deserializedMigrationProperties.sourceDbServerFullyQualifiedDomainName = reader.getString(); } else if ("targetDbServerResourceId".equals(fieldName)) { - deserializedMigrationResourceProperties.targetDbServerResourceId = reader.getString(); + deserializedMigrationProperties.targetDbServerResourceId = reader.getString(); } else if ("targetDbServerFullyQualifiedDomainName".equals(fieldName)) { - deserializedMigrationResourceProperties.targetDbServerFullyQualifiedDomainName = reader.getString(); + deserializedMigrationProperties.targetDbServerFullyQualifiedDomainName = reader.getString(); } else if ("secretParameters".equals(fieldName)) { - deserializedMigrationResourceProperties.secretParameters - = MigrationSecretParameters.fromJson(reader); + deserializedMigrationProperties.secretParameters = MigrationSecretParameters.fromJson(reader); } else if ("dbsToMigrate".equals(fieldName)) { List dbsToMigrate = reader.readArray(reader1 -> reader1.getString()); - deserializedMigrationResourceProperties.dbsToMigrate = dbsToMigrate; + deserializedMigrationProperties.dbsToMigrate = dbsToMigrate; } else if ("setupLogicalReplicationOnSourceDbIfNeeded".equals(fieldName)) { - deserializedMigrationResourceProperties.setupLogicalReplicationOnSourceDbIfNeeded - = LogicalReplicationOnSourceDbEnum.fromString(reader.getString()); + deserializedMigrationProperties.setupLogicalReplicationOnSourceDbIfNeeded + = LogicalReplicationOnSourceServer.fromString(reader.getString()); } else if ("overwriteDbsInTarget".equals(fieldName)) { - deserializedMigrationResourceProperties.overwriteDbsInTarget - = OverwriteDbsInTargetEnum.fromString(reader.getString()); + deserializedMigrationProperties.overwriteDbsInTarget + = OverwriteDatabasesOnTargetServer.fromString(reader.getString()); } else if ("migrationWindowStartTimeInUtc".equals(fieldName)) { - deserializedMigrationResourceProperties.migrationWindowStartTimeInUtc = reader + deserializedMigrationProperties.migrationWindowStartTimeInUtc = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("migrationWindowEndTimeInUtc".equals(fieldName)) { - deserializedMigrationResourceProperties.migrationWindowEndTimeInUtc = reader + deserializedMigrationProperties.migrationWindowEndTimeInUtc = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("migrateRoles".equals(fieldName)) { - deserializedMigrationResourceProperties.migrateRoles - = MigrateRolesEnum.fromString(reader.getString()); + deserializedMigrationProperties.migrateRoles + = MigrateRolesAndPermissions.fromString(reader.getString()); } else if ("startDataMigration".equals(fieldName)) { - deserializedMigrationResourceProperties.startDataMigration - = StartDataMigrationEnum.fromString(reader.getString()); + deserializedMigrationProperties.startDataMigration + = StartDataMigration.fromString(reader.getString()); } else if ("triggerCutover".equals(fieldName)) { - deserializedMigrationResourceProperties.triggerCutover - = TriggerCutoverEnum.fromString(reader.getString()); + deserializedMigrationProperties.triggerCutover = TriggerCutover.fromString(reader.getString()); } else if ("dbsToTriggerCutoverOn".equals(fieldName)) { List dbsToTriggerCutoverOn = reader.readArray(reader1 -> reader1.getString()); - deserializedMigrationResourceProperties.dbsToTriggerCutoverOn = dbsToTriggerCutoverOn; + deserializedMigrationProperties.dbsToTriggerCutoverOn = dbsToTriggerCutoverOn; } else if ("cancel".equals(fieldName)) { - deserializedMigrationResourceProperties.cancel = CancelEnum.fromString(reader.getString()); + deserializedMigrationProperties.cancel = Cancel.fromString(reader.getString()); } else if ("dbsToCancelMigrationOn".equals(fieldName)) { List dbsToCancelMigrationOn = reader.readArray(reader1 -> reader1.getString()); - deserializedMigrationResourceProperties.dbsToCancelMigrationOn = dbsToCancelMigrationOn; + deserializedMigrationProperties.dbsToCancelMigrationOn = dbsToCancelMigrationOn; } else { reader.skipChildren(); } } - return deserializedMigrationResourceProperties; + return deserializedMigrationProperties; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourcePropertiesForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationPropertiesForPatch.java similarity index 53% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourcePropertiesForPatch.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationPropertiesForPatch.java index cc06de081e58..d007027b3586 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourcePropertiesForPatch.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationPropertiesForPatch.java @@ -10,112 +10,116 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CancelEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceDbEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Cancel; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceServer; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesAndPermissions; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParameters; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDbsInTargetEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.StartDataMigrationEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TriggerCutoverEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParametersForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDatabasesOnTargetServer; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StartDataMigration; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TriggerCutover; import java.io.IOException; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.List; /** - * Migration resource properties for patch. + * Migration properties. */ @Fluent -public final class MigrationResourcePropertiesForPatch - implements JsonSerializable { +public final class MigrationPropertiesForPatch implements JsonSerializable { /* - * ResourceId of the source database server + * Identifier of the source database server resource, when 'sourceType' is 'PostgreSQLSingleServer'. For other + * source types this must be set to ipaddress:port@username or hostname:port@username. */ private String sourceDbServerResourceId; /* - * Source server fully qualified domain name (FQDN) or IP address. It is a optional value, if customer provide it, - * migration service will always use it for connection + * Fully qualified domain name (FQDN) or IP address of the source server. This property is optional. When provided, + * the migration service will always use it to connect to the source server. */ private String sourceDbServerFullyQualifiedDomainName; /* - * Target server fully qualified domain name (FQDN) or IP address. It is a optional value, if customer provide it, - * migration service will always use it for connection + * Fully qualified domain name (FQDN) or IP address of the target server. This property is optional. When provided, + * the migration service will always use it to connect to the target server. */ private String targetDbServerFullyQualifiedDomainName; /* - * Migration secret parameters + * Migration secret parameters. */ - private MigrationSecretParameters secretParameters; + private MigrationSecretParametersForPatch secretParameters; /* - * Number of databases to migrate + * Names of databases to migrate. */ private List dbsToMigrate; /* - * Indicates whether to setup LogicalReplicationOnSourceDb, if needed + * Indicates whether to setup logical replication on source server, if needed. */ - private LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded; + private LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded; /* - * Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the - * migration workflow will wait for a confirmation, if it detects that the database already exists. + * Indicates if databases on the target server can be overwritten when already present. If set to 'False', when the + * migration workflow detects that the database already exists on the target server, it will wait for a + * confirmation. */ - private OverwriteDbsInTargetEnum overwriteDbsInTarget; + private OverwriteDatabasesOnTargetServer overwriteDbsInTarget; /* - * Start time in UTC for migration window + * Start time (UTC) for migration window. */ private OffsetDateTime migrationWindowStartTimeInUtc; /* - * To migrate roles and permissions we need to send this flag as True + * Indicates if roles and permissions must be migrated. */ - private MigrateRolesEnum migrateRoles; + private MigrateRolesAndPermissions migrateRoles; /* - * Indicates whether the data migration should start right away + * Indicates if data migration must start right away. */ - private StartDataMigrationEnum startDataMigration; + private StartDataMigration startDataMigration; /* - * To trigger cutover for entire migration we need to send this flag as True + * Indicates if cutover must be triggered for the entire migration. */ - private TriggerCutoverEnum triggerCutover; + private TriggerCutover triggerCutover; /* - * When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in - * this array + * When you want to trigger cutover for specific databases set 'triggerCutover' to 'True' and the names of the + * specific databases in this array. */ private List dbsToTriggerCutoverOn; /* - * To trigger cancel for entire migration we need to send this flag as True + * Indicates if cancel must be triggered for the entire migration. */ - private CancelEnum cancel; + private Cancel cancel; /* - * When you want to trigger cancel for specific databases send cancel flag as True and database names in this array + * When you want to trigger cancel for specific databases set 'triggerCutover' to 'True' and the names of the + * specific databases in this array. */ private List dbsToCancelMigrationOn; /* - * There are two types of migration modes Online and Offline + * Mode used to perform the migration: Online or Offline. */ private MigrationMode migrationMode; /** - * Creates an instance of MigrationResourcePropertiesForPatch class. + * Creates an instance of MigrationPropertiesForPatch class. */ - public MigrationResourcePropertiesForPatch() { + public MigrationPropertiesForPatch() { } /** - * Get the sourceDbServerResourceId property: ResourceId of the source database server. + * Get the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or + * hostname:port@username. * * @return the sourceDbServerResourceId value. */ @@ -124,19 +128,22 @@ public String sourceDbServerResourceId() { } /** - * Set the sourceDbServerResourceId property: ResourceId of the source database server. + * Set the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or + * hostname:port@username. * * @param sourceDbServerResourceId the sourceDbServerResourceId value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withSourceDbServerResourceId(String sourceDbServerResourceId) { + public MigrationPropertiesForPatch withSourceDbServerResourceId(String sourceDbServerResourceId) { this.sourceDbServerResourceId = sourceDbServerResourceId; return this; } /** - * Get the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Get the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @return the sourceDbServerFullyQualifiedDomainName value. */ @@ -145,21 +152,23 @@ public String sourceDbServerFullyQualifiedDomainName() { } /** - * Set the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Set the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @param sourceDbServerFullyQualifiedDomainName the sourceDbServerFullyQualifiedDomainName value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch + public MigrationPropertiesForPatch withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName) { this.sourceDbServerFullyQualifiedDomainName = sourceDbServerFullyQualifiedDomainName; return this; } /** - * Get the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Get the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @return the targetDbServerFullyQualifiedDomainName value. */ @@ -168,13 +177,14 @@ public String targetDbServerFullyQualifiedDomainName() { } /** - * Set the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Set the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @param targetDbServerFullyQualifiedDomainName the targetDbServerFullyQualifiedDomainName value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch + public MigrationPropertiesForPatch withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName) { this.targetDbServerFullyQualifiedDomainName = targetDbServerFullyQualifiedDomainName; return this; @@ -185,7 +195,7 @@ public String targetDbServerFullyQualifiedDomainName() { * * @return the secretParameters value. */ - public MigrationSecretParameters secretParameters() { + public MigrationSecretParametersForPatch secretParameters() { return this.secretParameters; } @@ -193,15 +203,15 @@ public MigrationSecretParameters secretParameters() { * Set the secretParameters property: Migration secret parameters. * * @param secretParameters the secretParameters value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withSecretParameters(MigrationSecretParameters secretParameters) { + public MigrationPropertiesForPatch withSecretParameters(MigrationSecretParametersForPatch secretParameters) { this.secretParameters = secretParameters; return this; } /** - * Get the dbsToMigrate property: Number of databases to migrate. + * Get the dbsToMigrate property: Names of databases to migrate. * * @return the dbsToMigrate value. */ @@ -210,65 +220,65 @@ public List dbsToMigrate() { } /** - * Set the dbsToMigrate property: Number of databases to migrate. + * Set the dbsToMigrate property: Names of databases to migrate. * * @param dbsToMigrate the dbsToMigrate value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withDbsToMigrate(List dbsToMigrate) { + public MigrationPropertiesForPatch withDbsToMigrate(List dbsToMigrate) { this.dbsToMigrate = dbsToMigrate; return this; } /** - * Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @return the setupLogicalReplicationOnSourceDbIfNeeded value. */ - public LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded() { + public LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded() { return this.setupLogicalReplicationOnSourceDbIfNeeded; } /** - * Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @param setupLogicalReplicationOnSourceDbIfNeeded the setupLogicalReplicationOnSourceDbIfNeeded value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withSetupLogicalReplicationOnSourceDbIfNeeded( - LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded) { + public MigrationPropertiesForPatch withSetupLogicalReplicationOnSourceDbIfNeeded( + LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded) { this.setupLogicalReplicationOnSourceDbIfNeeded = setupLogicalReplicationOnSourceDbIfNeeded; return this; } /** - * Get the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Get the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @return the overwriteDbsInTarget value. */ - public OverwriteDbsInTargetEnum overwriteDbsInTarget() { + public OverwriteDatabasesOnTargetServer overwriteDbsInTarget() { return this.overwriteDbsInTarget; } /** - * Set the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Set the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @param overwriteDbsInTarget the overwriteDbsInTarget value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withOverwriteDbsInTarget(OverwriteDbsInTargetEnum overwriteDbsInTarget) { + public MigrationPropertiesForPatch withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer overwriteDbsInTarget) { this.overwriteDbsInTarget = overwriteDbsInTarget; return this; } /** - * Get the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Get the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @return the migrationWindowStartTimeInUtc value. */ @@ -277,80 +287,79 @@ public OffsetDateTime migrationWindowStartTimeInUtc() { } /** - * Set the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Set the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @param migrationWindowStartTimeInUtc the migrationWindowStartTimeInUtc value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch - withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { + public MigrationPropertiesForPatch withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { this.migrationWindowStartTimeInUtc = migrationWindowStartTimeInUtc; return this; } /** - * Get the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Get the migrateRoles property: Indicates if roles and permissions must be migrated. * * @return the migrateRoles value. */ - public MigrateRolesEnum migrateRoles() { + public MigrateRolesAndPermissions migrateRoles() { return this.migrateRoles; } /** - * Set the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Set the migrateRoles property: Indicates if roles and permissions must be migrated. * * @param migrateRoles the migrateRoles value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withMigrateRoles(MigrateRolesEnum migrateRoles) { + public MigrationPropertiesForPatch withMigrateRoles(MigrateRolesAndPermissions migrateRoles) { this.migrateRoles = migrateRoles; return this; } /** - * Get the startDataMigration property: Indicates whether the data migration should start right away. + * Get the startDataMigration property: Indicates if data migration must start right away. * * @return the startDataMigration value. */ - public StartDataMigrationEnum startDataMigration() { + public StartDataMigration startDataMigration() { return this.startDataMigration; } /** - * Set the startDataMigration property: Indicates whether the data migration should start right away. + * Set the startDataMigration property: Indicates if data migration must start right away. * * @param startDataMigration the startDataMigration value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withStartDataMigration(StartDataMigrationEnum startDataMigration) { + public MigrationPropertiesForPatch withStartDataMigration(StartDataMigration startDataMigration) { this.startDataMigration = startDataMigration; return this; } /** - * Get the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Get the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @return the triggerCutover value. */ - public TriggerCutoverEnum triggerCutover() { + public TriggerCutover triggerCutover() { return this.triggerCutover; } /** - * Set the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Set the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @param triggerCutover the triggerCutover value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withTriggerCutover(TriggerCutoverEnum triggerCutover) { + public MigrationPropertiesForPatch withTriggerCutover(TriggerCutover triggerCutover) { this.triggerCutover = triggerCutover; return this; } /** - * Get the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Get the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToTriggerCutoverOn value. */ @@ -359,40 +368,40 @@ public List dbsToTriggerCutoverOn() { } /** - * Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @param dbsToTriggerCutoverOn the dbsToTriggerCutoverOn value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { + public MigrationPropertiesForPatch withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { this.dbsToTriggerCutoverOn = dbsToTriggerCutoverOn; return this; } /** - * Get the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Get the cancel property: Indicates if cancel must be triggered for the entire migration. * * @return the cancel value. */ - public CancelEnum cancel() { + public Cancel cancel() { return this.cancel; } /** - * Set the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Set the cancel property: Indicates if cancel must be triggered for the entire migration. * * @param cancel the cancel value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withCancel(CancelEnum cancel) { + public MigrationPropertiesForPatch withCancel(Cancel cancel) { this.cancel = cancel; return this; } /** - * Get the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Get the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToCancelMigrationOn value. */ @@ -401,19 +410,19 @@ public List dbsToCancelMigrationOn() { } /** - * Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @param dbsToCancelMigrationOn the dbsToCancelMigrationOn value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { + public MigrationPropertiesForPatch withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { this.dbsToCancelMigrationOn = dbsToCancelMigrationOn; return this; } /** - * Get the migrationMode property: There are two types of migration modes Online and Offline. + * Get the migrationMode property: Mode used to perform the migration: Online or Offline. * * @return the migrationMode value. */ @@ -422,12 +431,12 @@ public MigrationMode migrationMode() { } /** - * Set the migrationMode property: There are two types of migration modes Online and Offline. + * Set the migrationMode property: Mode used to perform the migration: Online or Offline. * * @param migrationMode the migrationMode value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withMigrationMode(MigrationMode migrationMode) { + public MigrationPropertiesForPatch withMigrationMode(MigrationMode migrationMode) { this.migrationMode = migrationMode; return this; } @@ -481,70 +490,67 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of MigrationResourcePropertiesForPatch from the JsonReader. + * Reads an instance of MigrationPropertiesForPatch from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of MigrationResourcePropertiesForPatch if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MigrationResourcePropertiesForPatch. + * @return An instance of MigrationPropertiesForPatch if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MigrationPropertiesForPatch. */ - public static MigrationResourcePropertiesForPatch fromJson(JsonReader jsonReader) throws IOException { + public static MigrationPropertiesForPatch fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - MigrationResourcePropertiesForPatch deserializedMigrationResourcePropertiesForPatch - = new MigrationResourcePropertiesForPatch(); + MigrationPropertiesForPatch deserializedMigrationPropertiesForPatch = new MigrationPropertiesForPatch(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("sourceDbServerResourceId".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.sourceDbServerResourceId = reader.getString(); + deserializedMigrationPropertiesForPatch.sourceDbServerResourceId = reader.getString(); } else if ("sourceDbServerFullyQualifiedDomainName".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.sourceDbServerFullyQualifiedDomainName - = reader.getString(); + deserializedMigrationPropertiesForPatch.sourceDbServerFullyQualifiedDomainName = reader.getString(); } else if ("targetDbServerFullyQualifiedDomainName".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.targetDbServerFullyQualifiedDomainName - = reader.getString(); + deserializedMigrationPropertiesForPatch.targetDbServerFullyQualifiedDomainName = reader.getString(); } else if ("secretParameters".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.secretParameters - = MigrationSecretParameters.fromJson(reader); + deserializedMigrationPropertiesForPatch.secretParameters + = MigrationSecretParametersForPatch.fromJson(reader); } else if ("dbsToMigrate".equals(fieldName)) { List dbsToMigrate = reader.readArray(reader1 -> reader1.getString()); - deserializedMigrationResourcePropertiesForPatch.dbsToMigrate = dbsToMigrate; + deserializedMigrationPropertiesForPatch.dbsToMigrate = dbsToMigrate; } else if ("setupLogicalReplicationOnSourceDbIfNeeded".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.setupLogicalReplicationOnSourceDbIfNeeded - = LogicalReplicationOnSourceDbEnum.fromString(reader.getString()); + deserializedMigrationPropertiesForPatch.setupLogicalReplicationOnSourceDbIfNeeded + = LogicalReplicationOnSourceServer.fromString(reader.getString()); } else if ("overwriteDbsInTarget".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.overwriteDbsInTarget - = OverwriteDbsInTargetEnum.fromString(reader.getString()); + deserializedMigrationPropertiesForPatch.overwriteDbsInTarget + = OverwriteDatabasesOnTargetServer.fromString(reader.getString()); } else if ("migrationWindowStartTimeInUtc".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.migrationWindowStartTimeInUtc = reader + deserializedMigrationPropertiesForPatch.migrationWindowStartTimeInUtc = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("migrateRoles".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.migrateRoles - = MigrateRolesEnum.fromString(reader.getString()); + deserializedMigrationPropertiesForPatch.migrateRoles + = MigrateRolesAndPermissions.fromString(reader.getString()); } else if ("startDataMigration".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.startDataMigration - = StartDataMigrationEnum.fromString(reader.getString()); + deserializedMigrationPropertiesForPatch.startDataMigration + = StartDataMigration.fromString(reader.getString()); } else if ("triggerCutover".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.triggerCutover - = TriggerCutoverEnum.fromString(reader.getString()); + deserializedMigrationPropertiesForPatch.triggerCutover + = TriggerCutover.fromString(reader.getString()); } else if ("dbsToTriggerCutoverOn".equals(fieldName)) { List dbsToTriggerCutoverOn = reader.readArray(reader1 -> reader1.getString()); - deserializedMigrationResourcePropertiesForPatch.dbsToTriggerCutoverOn = dbsToTriggerCutoverOn; + deserializedMigrationPropertiesForPatch.dbsToTriggerCutoverOn = dbsToTriggerCutoverOn; } else if ("cancel".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.cancel = CancelEnum.fromString(reader.getString()); + deserializedMigrationPropertiesForPatch.cancel = Cancel.fromString(reader.getString()); } else if ("dbsToCancelMigrationOn".equals(fieldName)) { List dbsToCancelMigrationOn = reader.readArray(reader1 -> reader1.getString()); - deserializedMigrationResourcePropertiesForPatch.dbsToCancelMigrationOn = dbsToCancelMigrationOn; + deserializedMigrationPropertiesForPatch.dbsToCancelMigrationOn = dbsToCancelMigrationOn; } else if ("migrationMode".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.migrationMode + deserializedMigrationPropertiesForPatch.migrationMode = MigrationMode.fromString(reader.getString()); } else { reader.skipChildren(); } } - return deserializedMigrationResourcePropertiesForPatch; + return deserializedMigrationPropertiesForPatch; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityModelInner.java similarity index 58% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityModelInner.java index 79b7c74de662..28e549e74dc0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityModelInner.java @@ -13,28 +13,29 @@ import java.io.IOException; /** - * Represents a resource name availability. + * Availability of a name. */ @Fluent -public final class NameAvailabilityInner extends CheckNameAvailabilityResponse { +public final class NameAvailabilityModelInner extends CheckNameAvailabilityResponse { /* - * name of the PostgreSQL server. + * Name for which validity and availability was checked. */ private String name; /* - * type of the server + * Type of resource. It can be 'Microsoft.DBforPostgreSQL/flexibleServers' or + * 'Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints'. */ private String type; /** - * Creates an instance of NameAvailabilityInner class. + * Creates an instance of NameAvailabilityModelInner class. */ - public NameAvailabilityInner() { + public NameAvailabilityModelInner() { } /** - * Get the name property: name of the PostgreSQL server. + * Get the name property: Name for which validity and availability was checked. * * @return the name value. */ @@ -43,7 +44,8 @@ public String name() { } /** - * Get the type property: type of the server. + * Get the type property: Type of resource. It can be 'Microsoft.DBforPostgreSQL/flexibleServers' or + * 'Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints'. * * @return the type value. */ @@ -55,7 +57,7 @@ public String type() { * {@inheritDoc} */ @Override - public NameAvailabilityInner withNameAvailable(Boolean nameAvailable) { + public NameAvailabilityModelInner withNameAvailable(Boolean nameAvailable) { super.withNameAvailable(nameAvailable); return this; } @@ -64,7 +66,7 @@ public NameAvailabilityInner withNameAvailable(Boolean nameAvailable) { * {@inheritDoc} */ @Override - public NameAvailabilityInner withReason(CheckNameAvailabilityReason reason) { + public NameAvailabilityModelInner withReason(CheckNameAvailabilityReason reason) { super.withReason(reason); return this; } @@ -73,7 +75,7 @@ public NameAvailabilityInner withReason(CheckNameAvailabilityReason reason) { * {@inheritDoc} */ @Override - public NameAvailabilityInner withMessage(String message) { + public NameAvailabilityModelInner withMessage(String message) { super.withMessage(message); return this; } @@ -100,37 +102,38 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of NameAvailabilityInner from the JsonReader. + * Reads an instance of NameAvailabilityModelInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of NameAvailabilityInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the NameAvailabilityInner. + * @return An instance of NameAvailabilityModelInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NameAvailabilityModelInner. */ - public static NameAvailabilityInner fromJson(JsonReader jsonReader) throws IOException { + public static NameAvailabilityModelInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - NameAvailabilityInner deserializedNameAvailabilityInner = new NameAvailabilityInner(); + NameAvailabilityModelInner deserializedNameAvailabilityModelInner = new NameAvailabilityModelInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("nameAvailable".equals(fieldName)) { - deserializedNameAvailabilityInner.withNameAvailable(reader.getNullable(JsonReader::getBoolean)); + deserializedNameAvailabilityModelInner + .withNameAvailable(reader.getNullable(JsonReader::getBoolean)); } else if ("reason".equals(fieldName)) { - deserializedNameAvailabilityInner + deserializedNameAvailabilityModelInner .withReason(CheckNameAvailabilityReason.fromString(reader.getString())); } else if ("message".equals(fieldName)) { - deserializedNameAvailabilityInner.withMessage(reader.getString()); + deserializedNameAvailabilityModelInner.withMessage(reader.getString()); } else if ("name".equals(fieldName)) { - deserializedNameAvailabilityInner.name = reader.getString(); + deserializedNameAvailabilityModelInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedNameAvailabilityInner.type = reader.getString(); + deserializedNameAvailabilityModelInner.type = reader.getString(); } else { reader.skipChildren(); } } - return deserializedNameAvailabilityInner; + return deserializedNameAvailabilityModelInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationInner.java new file mode 100644 index 000000000000..4e5d34938ce7 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationInner.java @@ -0,0 +1,289 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ImpactRecord; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesAnalyzedWorkload; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesImplementationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeEnum; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Object recommendation properties. + */ +@Fluent +public final class ObjectRecommendationInner extends ProxyResource { + /* + * Always empty. + */ + private String kind; + + /* + * Properties of an object recommendation. + */ + private ObjectRecommendationProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ObjectRecommendationInner class. + */ + public ObjectRecommendationInner() { + } + + /** + * Get the kind property: Always empty. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Always empty. + * + * @param kind the kind value to set. + * @return the ObjectRecommendationInner object itself. + */ + public ObjectRecommendationInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the innerProperties property: Properties of an object recommendation. + * + * @return the innerProperties value. + */ + private ObjectRecommendationProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the initialRecommendedTime property: Creation time (UTC) of this recommendation. + * + * @return the initialRecommendedTime value. + */ + public OffsetDateTime initialRecommendedTime() { + return this.innerProperties() == null ? null : this.innerProperties().initialRecommendedTime(); + } + + /** + * Get the lastRecommendedTime property: Last time (UTC) that this recommendation was produced. + * + * @return the lastRecommendedTime value. + */ + public OffsetDateTime lastRecommendedTime() { + return this.innerProperties() == null ? null : this.innerProperties().lastRecommendedTime(); + } + + /** + * Get the timesRecommended property: Number of times this recommendation has been produced. + * + * @return the timesRecommended value. + */ + public Integer timesRecommended() { + return this.innerProperties() == null ? null : this.innerProperties().timesRecommended(); + } + + /** + * Get the improvedQueryIds property: List of identifiers for all queries identified as targets for improvement if + * the recommendation is applied. The list is only populated for CREATE INDEX recommendations. + * + * @return the improvedQueryIds value. + */ + public List improvedQueryIds() { + return this.innerProperties() == null ? null : this.innerProperties().improvedQueryIds(); + } + + /** + * Get the recommendationReason property: Reason for this recommendation. + * + * @return the recommendationReason value. + */ + public String recommendationReason() { + return this.innerProperties() == null ? null : this.innerProperties().recommendationReason(); + } + + /** + * Get the currentState property: Current state. + * + * @return the currentState value. + */ + public String currentState() { + return this.innerProperties() == null ? null : this.innerProperties().currentState(); + } + + /** + * Get the recommendationType property: Type for this recommendation. + * + * @return the recommendationType value. + */ + public RecommendationTypeEnum recommendationType() { + return this.innerProperties() == null ? null : this.innerProperties().recommendationType(); + } + + /** + * Get the implementationDetails property: Implementation details for the recommended action. + * + * @return the implementationDetails value. + */ + public ObjectRecommendationPropertiesImplementationDetails implementationDetails() { + return this.innerProperties() == null ? null : this.innerProperties().implementationDetails(); + } + + /** + * Get the analyzedWorkload property: Workload information for the recommended action. + * + * @return the analyzedWorkload value. + */ + public ObjectRecommendationPropertiesAnalyzedWorkload analyzedWorkload() { + return this.innerProperties() == null ? null : this.innerProperties().analyzedWorkload(); + } + + /** + * Get the estimatedImpact property: Estimated impact of this recommended action. + * + * @return the estimatedImpact value. + */ + public List estimatedImpact() { + return this.innerProperties() == null ? null : this.innerProperties().estimatedImpact(); + } + + /** + * Get the details property: Recommendation details for the recommended action. + * + * @return the details value. + */ + public ObjectRecommendationDetails details() { + return this.innerProperties() == null ? null : this.innerProperties().details(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ObjectRecommendationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ObjectRecommendationInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ObjectRecommendationInner. + */ + public static ObjectRecommendationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ObjectRecommendationInner deserializedObjectRecommendationInner = new ObjectRecommendationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedObjectRecommendationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedObjectRecommendationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedObjectRecommendationInner.type = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedObjectRecommendationInner.kind = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedObjectRecommendationInner.innerProperties + = ObjectRecommendationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedObjectRecommendationInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedObjectRecommendationInner; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/IndexRecommendationResourceProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationProperties.java similarity index 55% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/IndexRecommendationResourceProperties.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationProperties.java index 1fdf9109ebe6..44b677e06031 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/IndexRecommendationResourceProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationProperties.java @@ -11,9 +11,9 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.postgresqlflexibleserver.models.ImpactRecord; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationDetails; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResourcePropertiesAnalyzedWorkload; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResourcePropertiesImplementationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesAnalyzedWorkload; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesImplementationDetails; import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeEnum; import java.io.IOException; import java.time.OffsetDateTime; @@ -21,28 +21,28 @@ import java.util.List; /** - * Index recommendation properties. + * Object recommendation properties. */ @Fluent -public final class IndexRecommendationResourceProperties - implements JsonSerializable { +public final class ObjectRecommendationProperties implements JsonSerializable { /* - * Creation time of this recommendation in UTC date-time string format. + * Creation time (UTC) of this recommendation. */ private OffsetDateTime initialRecommendedTime; /* - * The last refresh of this recommendation in UTC date-time string format. + * Last time (UTC) that this recommendation was produced. */ private OffsetDateTime lastRecommendedTime; /* - * The number of times this recommendation has encountered. + * Number of times this recommendation has been produced. */ private Integer timesRecommended; /* - * The ImprovedQueryIds. The list will only be populated for CREATE INDEX recommendations. + * List of identifiers for all queries identified as targets for improvement if the recommendation is applied. The + * list is only populated for CREATE INDEX recommendations. */ private List improvedQueryIds; @@ -51,39 +51,44 @@ public final class IndexRecommendationResourceProperties */ private String recommendationReason; + /* + * Current state. + */ + private String currentState; + /* * Type for this recommendation. */ private RecommendationTypeEnum recommendationType; /* - * Stores implementation details for the recommended action. + * Implementation details for the recommended action. */ - private IndexRecommendationResourcePropertiesImplementationDetails implementationDetails; + private ObjectRecommendationPropertiesImplementationDetails implementationDetails; /* - * Stores workload information for the recommended action. + * Workload information for the recommended action. */ - private IndexRecommendationResourcePropertiesAnalyzedWorkload analyzedWorkload; + private ObjectRecommendationPropertiesAnalyzedWorkload analyzedWorkload; /* - * The estimated impact of this recommended action + * Estimated impact of this recommended action. */ private List estimatedImpact; /* - * Stores recommendation details for the recommended action. + * Recommendation details for the recommended action. */ - private IndexRecommendationDetails details; + private ObjectRecommendationDetails details; /** - * Creates an instance of IndexRecommendationResourceProperties class. + * Creates an instance of ObjectRecommendationProperties class. */ - public IndexRecommendationResourceProperties() { + public ObjectRecommendationProperties() { } /** - * Get the initialRecommendedTime property: Creation time of this recommendation in UTC date-time string format. + * Get the initialRecommendedTime property: Creation time (UTC) of this recommendation. * * @return the initialRecommendedTime value. */ @@ -92,18 +97,18 @@ public OffsetDateTime initialRecommendedTime() { } /** - * Set the initialRecommendedTime property: Creation time of this recommendation in UTC date-time string format. + * Set the initialRecommendedTime property: Creation time (UTC) of this recommendation. * * @param initialRecommendedTime the initialRecommendedTime value to set. - * @return the IndexRecommendationResourceProperties object itself. + * @return the ObjectRecommendationProperties object itself. */ - public IndexRecommendationResourceProperties withInitialRecommendedTime(OffsetDateTime initialRecommendedTime) { + public ObjectRecommendationProperties withInitialRecommendedTime(OffsetDateTime initialRecommendedTime) { this.initialRecommendedTime = initialRecommendedTime; return this; } /** - * Get the lastRecommendedTime property: The last refresh of this recommendation in UTC date-time string format. + * Get the lastRecommendedTime property: Last time (UTC) that this recommendation was produced. * * @return the lastRecommendedTime value. */ @@ -112,18 +117,18 @@ public OffsetDateTime lastRecommendedTime() { } /** - * Set the lastRecommendedTime property: The last refresh of this recommendation in UTC date-time string format. + * Set the lastRecommendedTime property: Last time (UTC) that this recommendation was produced. * * @param lastRecommendedTime the lastRecommendedTime value to set. - * @return the IndexRecommendationResourceProperties object itself. + * @return the ObjectRecommendationProperties object itself. */ - public IndexRecommendationResourceProperties withLastRecommendedTime(OffsetDateTime lastRecommendedTime) { + public ObjectRecommendationProperties withLastRecommendedTime(OffsetDateTime lastRecommendedTime) { this.lastRecommendedTime = lastRecommendedTime; return this; } /** - * Get the timesRecommended property: The number of times this recommendation has encountered. + * Get the timesRecommended property: Number of times this recommendation has been produced. * * @return the timesRecommended value. */ @@ -132,19 +137,19 @@ public Integer timesRecommended() { } /** - * Set the timesRecommended property: The number of times this recommendation has encountered. + * Set the timesRecommended property: Number of times this recommendation has been produced. * * @param timesRecommended the timesRecommended value to set. - * @return the IndexRecommendationResourceProperties object itself. + * @return the ObjectRecommendationProperties object itself. */ - public IndexRecommendationResourceProperties withTimesRecommended(Integer timesRecommended) { + public ObjectRecommendationProperties withTimesRecommended(Integer timesRecommended) { this.timesRecommended = timesRecommended; return this; } /** - * Get the improvedQueryIds property: The ImprovedQueryIds. The list will only be populated for CREATE INDEX - * recommendations. + * Get the improvedQueryIds property: List of identifiers for all queries identified as targets for improvement if + * the recommendation is applied. The list is only populated for CREATE INDEX recommendations. * * @return the improvedQueryIds value. */ @@ -153,13 +158,13 @@ public List improvedQueryIds() { } /** - * Set the improvedQueryIds property: The ImprovedQueryIds. The list will only be populated for CREATE INDEX - * recommendations. + * Set the improvedQueryIds property: List of identifiers for all queries identified as targets for improvement if + * the recommendation is applied. The list is only populated for CREATE INDEX recommendations. * * @param improvedQueryIds the improvedQueryIds value to set. - * @return the IndexRecommendationResourceProperties object itself. + * @return the ObjectRecommendationProperties object itself. */ - public IndexRecommendationResourceProperties withImprovedQueryIds(List improvedQueryIds) { + public ObjectRecommendationProperties withImprovedQueryIds(List improvedQueryIds) { this.improvedQueryIds = improvedQueryIds; return this; } @@ -177,13 +182,33 @@ public String recommendationReason() { * Set the recommendationReason property: Reason for this recommendation. * * @param recommendationReason the recommendationReason value to set. - * @return the IndexRecommendationResourceProperties object itself. + * @return the ObjectRecommendationProperties object itself. */ - public IndexRecommendationResourceProperties withRecommendationReason(String recommendationReason) { + public ObjectRecommendationProperties withRecommendationReason(String recommendationReason) { this.recommendationReason = recommendationReason; return this; } + /** + * Get the currentState property: Current state. + * + * @return the currentState value. + */ + public String currentState() { + return this.currentState; + } + + /** + * Set the currentState property: Current state. + * + * @param currentState the currentState value to set. + * @return the ObjectRecommendationProperties object itself. + */ + public ObjectRecommendationProperties withCurrentState(String currentState) { + this.currentState = currentState; + return this; + } + /** * Get the recommendationType property: Type for this recommendation. * @@ -197,57 +222,57 @@ public RecommendationTypeEnum recommendationType() { * Set the recommendationType property: Type for this recommendation. * * @param recommendationType the recommendationType value to set. - * @return the IndexRecommendationResourceProperties object itself. + * @return the ObjectRecommendationProperties object itself. */ - public IndexRecommendationResourceProperties withRecommendationType(RecommendationTypeEnum recommendationType) { + public ObjectRecommendationProperties withRecommendationType(RecommendationTypeEnum recommendationType) { this.recommendationType = recommendationType; return this; } /** - * Get the implementationDetails property: Stores implementation details for the recommended action. + * Get the implementationDetails property: Implementation details for the recommended action. * * @return the implementationDetails value. */ - public IndexRecommendationResourcePropertiesImplementationDetails implementationDetails() { + public ObjectRecommendationPropertiesImplementationDetails implementationDetails() { return this.implementationDetails; } /** - * Set the implementationDetails property: Stores implementation details for the recommended action. + * Set the implementationDetails property: Implementation details for the recommended action. * * @param implementationDetails the implementationDetails value to set. - * @return the IndexRecommendationResourceProperties object itself. + * @return the ObjectRecommendationProperties object itself. */ - public IndexRecommendationResourceProperties - withImplementationDetails(IndexRecommendationResourcePropertiesImplementationDetails implementationDetails) { + public ObjectRecommendationProperties + withImplementationDetails(ObjectRecommendationPropertiesImplementationDetails implementationDetails) { this.implementationDetails = implementationDetails; return this; } /** - * Get the analyzedWorkload property: Stores workload information for the recommended action. + * Get the analyzedWorkload property: Workload information for the recommended action. * * @return the analyzedWorkload value. */ - public IndexRecommendationResourcePropertiesAnalyzedWorkload analyzedWorkload() { + public ObjectRecommendationPropertiesAnalyzedWorkload analyzedWorkload() { return this.analyzedWorkload; } /** - * Set the analyzedWorkload property: Stores workload information for the recommended action. + * Set the analyzedWorkload property: Workload information for the recommended action. * * @param analyzedWorkload the analyzedWorkload value to set. - * @return the IndexRecommendationResourceProperties object itself. + * @return the ObjectRecommendationProperties object itself. */ - public IndexRecommendationResourceProperties - withAnalyzedWorkload(IndexRecommendationResourcePropertiesAnalyzedWorkload analyzedWorkload) { + public ObjectRecommendationProperties + withAnalyzedWorkload(ObjectRecommendationPropertiesAnalyzedWorkload analyzedWorkload) { this.analyzedWorkload = analyzedWorkload; return this; } /** - * Get the estimatedImpact property: The estimated impact of this recommended action. + * Get the estimatedImpact property: Estimated impact of this recommended action. * * @return the estimatedImpact value. */ @@ -256,11 +281,11 @@ public List estimatedImpact() { } /** - * Get the details property: Stores recommendation details for the recommended action. + * Get the details property: Recommendation details for the recommended action. * * @return the details value. */ - public IndexRecommendationDetails details() { + public ObjectRecommendationDetails details() { return this.details; } @@ -302,6 +327,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("improvedQueryIds", this.improvedQueryIds, (writer, element) -> writer.writeLong(element)); jsonWriter.writeStringField("recommendationReason", this.recommendationReason); + jsonWriter.writeStringField("currentState", this.currentState); jsonWriter.writeStringField("recommendationType", this.recommendationType == null ? null : this.recommendationType.toString()); jsonWriter.writeJsonField("implementationDetails", this.implementationDetails); @@ -310,56 +336,57 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of IndexRecommendationResourceProperties from the JsonReader. + * Reads an instance of ObjectRecommendationProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of IndexRecommendationResourceProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IndexRecommendationResourceProperties. + * @return An instance of ObjectRecommendationProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ObjectRecommendationProperties. */ - public static IndexRecommendationResourceProperties fromJson(JsonReader jsonReader) throws IOException { + public static ObjectRecommendationProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - IndexRecommendationResourceProperties deserializedIndexRecommendationResourceProperties - = new IndexRecommendationResourceProperties(); + ObjectRecommendationProperties deserializedObjectRecommendationProperties + = new ObjectRecommendationProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("initialRecommendedTime".equals(fieldName)) { - deserializedIndexRecommendationResourceProperties.initialRecommendedTime = reader + deserializedObjectRecommendationProperties.initialRecommendedTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("lastRecommendedTime".equals(fieldName)) { - deserializedIndexRecommendationResourceProperties.lastRecommendedTime = reader + deserializedObjectRecommendationProperties.lastRecommendedTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("timesRecommended".equals(fieldName)) { - deserializedIndexRecommendationResourceProperties.timesRecommended + deserializedObjectRecommendationProperties.timesRecommended = reader.getNullable(JsonReader::getInt); } else if ("improvedQueryIds".equals(fieldName)) { List improvedQueryIds = reader.readArray(reader1 -> reader1.getLong()); - deserializedIndexRecommendationResourceProperties.improvedQueryIds = improvedQueryIds; + deserializedObjectRecommendationProperties.improvedQueryIds = improvedQueryIds; } else if ("recommendationReason".equals(fieldName)) { - deserializedIndexRecommendationResourceProperties.recommendationReason = reader.getString(); + deserializedObjectRecommendationProperties.recommendationReason = reader.getString(); + } else if ("currentState".equals(fieldName)) { + deserializedObjectRecommendationProperties.currentState = reader.getString(); } else if ("recommendationType".equals(fieldName)) { - deserializedIndexRecommendationResourceProperties.recommendationType + deserializedObjectRecommendationProperties.recommendationType = RecommendationTypeEnum.fromString(reader.getString()); } else if ("implementationDetails".equals(fieldName)) { - deserializedIndexRecommendationResourceProperties.implementationDetails - = IndexRecommendationResourcePropertiesImplementationDetails.fromJson(reader); + deserializedObjectRecommendationProperties.implementationDetails + = ObjectRecommendationPropertiesImplementationDetails.fromJson(reader); } else if ("analyzedWorkload".equals(fieldName)) { - deserializedIndexRecommendationResourceProperties.analyzedWorkload - = IndexRecommendationResourcePropertiesAnalyzedWorkload.fromJson(reader); + deserializedObjectRecommendationProperties.analyzedWorkload + = ObjectRecommendationPropertiesAnalyzedWorkload.fromJson(reader); } else if ("estimatedImpact".equals(fieldName)) { List estimatedImpact = reader.readArray(reader1 -> ImpactRecord.fromJson(reader1)); - deserializedIndexRecommendationResourceProperties.estimatedImpact = estimatedImpact; + deserializedObjectRecommendationProperties.estimatedImpact = estimatedImpact; } else if ("details".equals(fieldName)) { - deserializedIndexRecommendationResourceProperties.details - = IndexRecommendationDetails.fromJson(reader); + deserializedObjectRecommendationProperties.details = ObjectRecommendationDetails.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedIndexRecommendationResourceProperties; + return deserializedObjectRecommendationProperties; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationInner.java index e474c919ac20..9dc4d6666ee2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationInner.java @@ -20,22 +20,22 @@ @Fluent public final class OperationInner implements JsonSerializable { /* - * The name of the operation being performed on this particular object. + * Name of the operation being performed on this particular object. */ private String name; /* - * The localized display information for this particular operation or action. + * Localized display information for this particular operation or action. */ private OperationDisplay display; /* - * Indicates whether the operation is a data action + * Indicates if the operation is a data action. */ private Boolean isDataAction; /* - * The intended executor of the operation. + * Intended executor of the operation. */ private OperationOrigin origin; @@ -51,7 +51,7 @@ public OperationInner() { } /** - * Get the name property: The name of the operation being performed on this particular object. + * Get the name property: Name of the operation being performed on this particular object. * * @return the name value. */ @@ -60,7 +60,7 @@ public String name() { } /** - * Get the display property: The localized display information for this particular operation or action. + * Get the display property: Localized display information for this particular operation or action. * * @return the display value. */ @@ -69,7 +69,7 @@ public OperationDisplay display() { } /** - * Get the isDataAction property: Indicates whether the operation is a data action. + * Get the isDataAction property: Indicates if the operation is a data action. * * @return the isDataAction value. */ @@ -78,7 +78,7 @@ public Boolean isDataAction() { } /** - * Set the isDataAction property: Indicates whether the operation is a data action. + * Set the isDataAction property: Indicates if the operation is a data action. * * @param isDataAction the isDataAction value to set. * @return the OperationInner object itself. @@ -89,7 +89,7 @@ public OperationInner withIsDataAction(Boolean isDataAction) { } /** - * Get the origin property: The intended executor of the operation. + * Get the origin property: Intended executor of the operation. * * @return the origin value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/QuotaUsageInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/QuotaUsageInner.java index 1d4642da1c65..01b158981902 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/QuotaUsageInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/QuotaUsageInner.java @@ -13,12 +13,12 @@ import java.io.IOException; /** - * Quota usage for flexible servers. + * Quota usage for servers. */ @Fluent public final class QuotaUsageInner implements JsonSerializable { /* - * Name of quota usage for flexible servers + * Name of quota usage for servers */ private NameProperty name; @@ -49,7 +49,7 @@ public QuotaUsageInner() { } /** - * Get the name property: Name of quota usage for flexible servers. + * Get the name property: Name of quota usage for servers. * * @return the name value. */ @@ -58,7 +58,7 @@ public NameProperty name() { } /** - * Set the name property: Name of quota usage for flexible servers. + * Set the name property: Name of quota usage for servers. * * @param name the name value to set. * @return the QuotaUsageInner object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerInner.java index fa7f206b7f5e..701e2c5b2eac 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerInner.java @@ -18,10 +18,10 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow; import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Replica; import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationRole; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerState; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; import com.azure.resourcemanager.postgresqlflexibleserver.models.UserAssignedIdentity; @@ -31,22 +31,22 @@ import java.util.Map; /** - * Represents a server. + * Properties of a server. */ @Fluent public final class ServerInner extends Resource { /* - * The SKU (pricing tier) of the server. + * Compute tier and size of a server. */ private Sku sku; /* - * Describes the identity of the application. + * User assigned managed identities assigned to the server. */ private UserAssignedIdentity identity; /* - * Properties of the server. + * Properties of a server. */ private ServerProperties innerProperties; @@ -77,7 +77,7 @@ public ServerInner() { } /** - * Get the sku property: The SKU (pricing tier) of the server. + * Get the sku property: Compute tier and size of a server. * * @return the sku value. */ @@ -86,7 +86,7 @@ public Sku sku() { } /** - * Set the sku property: The SKU (pricing tier) of the server. + * Set the sku property: Compute tier and size of a server. * * @param sku the sku value to set. * @return the ServerInner object itself. @@ -97,7 +97,7 @@ public ServerInner withSku(Sku sku) { } /** - * Get the identity property: Describes the identity of the application. + * Get the identity property: User assigned managed identities assigned to the server. * * @return the identity value. */ @@ -106,7 +106,7 @@ public UserAssignedIdentity identity() { } /** - * Set the identity property: Describes the identity of the application. + * Set the identity property: User assigned managed identities assigned to the server. * * @param identity the identity value to set. * @return the ServerInner object itself. @@ -117,7 +117,7 @@ public ServerInner withIdentity(UserAssignedIdentity identity) { } /** - * Get the innerProperties property: Properties of the server. + * Get the innerProperties property: Properties of a server. * * @return the innerProperties value. */ @@ -183,8 +183,11 @@ public ServerInner withTags(Map tags) { } /** - * Get the administratorLogin property: The administrator's login name of a server. Can only be specified when the - * server is being created (and is required for creation). + * Get the administratorLogin property: Name of the login designated as the first password based administrator + * assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based + * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. + * If you disable password based authentication on a server which had it enabled, this password based role isn't + * deleted. * * @return the administratorLogin value. */ @@ -193,8 +196,11 @@ public String administratorLogin() { } /** - * Set the administratorLogin property: The administrator's login name of a server. Can only be specified when the - * server is being created (and is required for creation). + * Set the administratorLogin property: Name of the login designated as the first password based administrator + * assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based + * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. + * If you disable password based authentication on a server which had it enabled, this password based role isn't + * deleted. * * @param administratorLogin the administratorLogin value to set. * @return the ServerInner object itself. @@ -208,7 +214,8 @@ public ServerInner withAdministratorLogin(String administratorLogin) { } /** - * Get the administratorLoginPassword property: The administrator login password (required for server creation). + * Get the administratorLoginPassword property: Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * * @return the administratorLoginPassword value. */ @@ -217,7 +224,8 @@ public String administratorLoginPassword() { } /** - * Set the administratorLoginPassword property: The administrator login password (required for server creation). + * Set the administratorLoginPassword property: Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ServerInner object itself. @@ -231,21 +239,21 @@ public ServerInner withAdministratorLoginPassword(String administratorLoginPassw } /** - * Get the version property: PostgreSQL Server version. + * Get the version property: Major version of PostgreSQL database engine. * * @return the version value. */ - public ServerVersion version() { + public PostgresMajorVersion version() { return this.innerProperties() == null ? null : this.innerProperties().version(); } /** - * Set the version property: PostgreSQL Server version. + * Set the version property: Major version of PostgreSQL database engine. * * @param version the version value to set. * @return the ServerInner object itself. */ - public ServerInner withVersion(ServerVersion version) { + public ServerInner withVersion(PostgresMajorVersion version) { if (this.innerProperties() == null) { this.innerProperties = new ServerProperties(); } @@ -254,7 +262,7 @@ public ServerInner withVersion(ServerVersion version) { } /** - * Get the minorVersion property: The minor version of the server. + * Get the minorVersion property: Minor version of PostgreSQL database engine. * * @return the minorVersion value. */ @@ -263,7 +271,7 @@ public String minorVersion() { } /** - * Get the state property: A state of a server that is visible to user. + * Get the state property: Possible states of a server. * * @return the state value. */ @@ -272,7 +280,7 @@ public ServerState state() { } /** - * Get the fullyQualifiedDomainName property: The fully qualified domain name of a server. + * Get the fullyQualifiedDomainName property: Fully qualified domain name of a server. * * @return the fullyQualifiedDomainName value. */ @@ -304,7 +312,7 @@ public ServerInner withStorage(Storage storage) { } /** - * Get the authConfig property: AuthConfig properties of a server. + * Get the authConfig property: Authentication configuration properties of a server. * * @return the authConfig value. */ @@ -313,7 +321,7 @@ public AuthConfig authConfig() { } /** - * Set the authConfig property: AuthConfig properties of a server. + * Set the authConfig property: Authentication configuration properties of a server. * * @param authConfig the authConfig value to set. * @return the ServerInner object itself. @@ -373,8 +381,8 @@ public ServerInner withBackup(Backup backup) { } /** - * Get the network property: Network properties of a server. This Network property is required to be passed only in - * case you want the server to be Private access server. + * Get the network property: Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * * @return the network value. */ @@ -383,8 +391,8 @@ public Network network() { } /** - * Set the network property: Network properties of a server. This Network property is required to be passed only in - * case you want the server to be Private access server. + * Set the network property: Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * * @param network the network value to set. * @return the ServerInner object itself. @@ -444,9 +452,9 @@ public ServerInner withMaintenanceWindow(MaintenanceWindow maintenanceWindow) { } /** - * Get the sourceServerResourceId property: The source server resource ID to restore from. It's required when - * 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This property is returned - * only for Replica server. + * Get the sourceServerResourceId property: Identifier of the server to be used as the source of the new server. + * Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or 'ReviveDropped'. This property is + * returned only when the target server is a read replica. * * @return the sourceServerResourceId value. */ @@ -455,9 +463,9 @@ public String sourceServerResourceId() { } /** - * Set the sourceServerResourceId property: The source server resource ID to restore from. It's required when - * 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This property is returned - * only for Replica server. + * Set the sourceServerResourceId property: Identifier of the server to be used as the source of the new server. + * Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or 'ReviveDropped'. This property is + * returned only when the target server is a read replica. * * @param sourceServerResourceId the sourceServerResourceId value to set. * @return the ServerInner object itself. @@ -471,8 +479,8 @@ public ServerInner withSourceServerResourceId(String sourceServerResourceId) { } /** - * Get the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time to restore - * from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'ReviveDropped'. + * Get the pointInTimeUtc property: Creation time (in ISO8601 format) of the backup which you want to restore in the + * new server. It's required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', or 'ReviveDropped'. * * @return the pointInTimeUtc value. */ @@ -481,8 +489,8 @@ public OffsetDateTime pointInTimeUtc() { } /** - * Set the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time to restore - * from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'ReviveDropped'. + * Set the pointInTimeUtc property: Creation time (in ISO8601 format) of the backup which you want to restore in the + * new server. It's required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', or 'ReviveDropped'. * * @param pointInTimeUtc the pointInTimeUtc value to set. * @return the ServerInner object itself. @@ -496,7 +504,7 @@ public ServerInner withPointInTimeUtc(OffsetDateTime pointInTimeUtc) { } /** - * Get the availabilityZone property: availability zone information of the server. + * Get the availabilityZone property: Availability zone of a server. * * @return the availabilityZone value. */ @@ -505,7 +513,7 @@ public String availabilityZone() { } /** - * Set the availabilityZone property: availability zone information of the server. + * Set the availabilityZone property: Availability zone of a server. * * @param availabilityZone the availabilityZone value to set. * @return the ServerInner object itself. @@ -519,7 +527,7 @@ public ServerInner withAvailabilityZone(String availabilityZone) { } /** - * Get the replicationRole property: Replication role of the server. + * Get the replicationRole property: Role of the server in a replication set. * * @return the replicationRole value. */ @@ -528,7 +536,7 @@ public ReplicationRole replicationRole() { } /** - * Set the replicationRole property: Replication role of the server. + * Set the replicationRole property: Role of the server in a replication set. * * @param replicationRole the replicationRole value to set. * @return the ServerInner object itself. @@ -542,7 +550,7 @@ public ServerInner withReplicationRole(ReplicationRole replicationRole) { } /** - * Get the replicaCapacity property: Replicas allowed for a server. + * Get the replicaCapacity property: Maximum number of read replicas allowed for a server. * * @return the replicaCapacity value. */ @@ -551,8 +559,8 @@ public Integer replicaCapacity() { } /** - * Get the replica property: Replica properties of a server. These Replica properties are required to be passed only - * in case you want to Promote a server. + * Get the replica property: Read replica properties of a server. Required only in case that you want to promote a + * server. * * @return the replica value. */ @@ -561,8 +569,8 @@ public Replica replica() { } /** - * Set the replica property: Replica properties of a server. These Replica properties are required to be passed only - * in case you want to Promote a server. + * Set the replica property: Read replica properties of a server. Required only in case that you want to promote a + * server. * * @param replica the replica value to set. * @return the ServerInner object itself. @@ -576,7 +584,7 @@ public ServerInner withReplica(Replica replica) { } /** - * Get the createMode property: The mode to create a new PostgreSQL server. + * Get the createMode property: Creation mode of a new server. * * @return the createMode value. */ @@ -585,7 +593,7 @@ public CreateMode createMode() { } /** - * Set the createMode property: The mode to create a new PostgreSQL server. + * Set the createMode property: Creation mode of a new server. * * @param createMode the createMode value to set. * @return the ServerInner object itself. @@ -600,7 +608,7 @@ public ServerInner withCreateMode(CreateMode createMode) { /** * Get the privateEndpointConnections property: List of private endpoint connections associated with the specified - * resource. + * server. * * @return the privateEndpointConnections value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerProperties.java index d927380c4d66..0bef5b2a3f7d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerProperties.java @@ -18,10 +18,10 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow; import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Replica; import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationRole; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerState; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; import java.io.IOException; import java.time.OffsetDateTime; @@ -29,38 +29,41 @@ import java.util.List; /** - * The properties of a server. + * Properties of a server. */ @Fluent public final class ServerProperties implements JsonSerializable { /* - * The administrator's login name of a server. Can only be specified when the server is being created (and is - * required for creation). + * Name of the login designated as the first password based administrator assigned to your instance of PostgreSQL. + * Must be specified the first time that you enable password based authentication on a server. Once set to a given + * value, it cannot be changed for the rest of the life of a server. If you disable password based authentication on + * a server which had it enabled, this password based role isn't deleted. */ private String administratorLogin; /* - * The administrator login password (required for server creation). + * Password assigned to the administrator login. As long as password authentication is enabled, this password can be + * changed at any time. */ private String administratorLoginPassword; /* - * PostgreSQL Server version. + * Major version of PostgreSQL database engine. */ - private ServerVersion version; + private PostgresMajorVersion version; /* - * The minor version of the server. + * Minor version of PostgreSQL database engine. */ private String minorVersion; /* - * A state of a server that is visible to user. + * Possible states of a server. */ private ServerState state; /* - * The fully qualified domain name of a server. + * Fully qualified domain name of a server. */ private String fullyQualifiedDomainName; @@ -70,7 +73,7 @@ public final class ServerProperties implements JsonSerializable privateEndpointConnections; @@ -155,8 +158,11 @@ public ServerProperties() { } /** - * Get the administratorLogin property: The administrator's login name of a server. Can only be specified when the - * server is being created (and is required for creation). + * Get the administratorLogin property: Name of the login designated as the first password based administrator + * assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based + * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. + * If you disable password based authentication on a server which had it enabled, this password based role isn't + * deleted. * * @return the administratorLogin value. */ @@ -165,8 +171,11 @@ public String administratorLogin() { } /** - * Set the administratorLogin property: The administrator's login name of a server. Can only be specified when the - * server is being created (and is required for creation). + * Set the administratorLogin property: Name of the login designated as the first password based administrator + * assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based + * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. + * If you disable password based authentication on a server which had it enabled, this password based role isn't + * deleted. * * @param administratorLogin the administratorLogin value to set. * @return the ServerProperties object itself. @@ -177,7 +186,8 @@ public ServerProperties withAdministratorLogin(String administratorLogin) { } /** - * Get the administratorLoginPassword property: The administrator login password (required for server creation). + * Get the administratorLoginPassword property: Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * * @return the administratorLoginPassword value. */ @@ -186,7 +196,8 @@ public String administratorLoginPassword() { } /** - * Set the administratorLoginPassword property: The administrator login password (required for server creation). + * Set the administratorLoginPassword property: Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ServerProperties object itself. @@ -197,27 +208,27 @@ public ServerProperties withAdministratorLoginPassword(String administratorLogin } /** - * Get the version property: PostgreSQL Server version. + * Get the version property: Major version of PostgreSQL database engine. * * @return the version value. */ - public ServerVersion version() { + public PostgresMajorVersion version() { return this.version; } /** - * Set the version property: PostgreSQL Server version. + * Set the version property: Major version of PostgreSQL database engine. * * @param version the version value to set. * @return the ServerProperties object itself. */ - public ServerProperties withVersion(ServerVersion version) { + public ServerProperties withVersion(PostgresMajorVersion version) { this.version = version; return this; } /** - * Get the minorVersion property: The minor version of the server. + * Get the minorVersion property: Minor version of PostgreSQL database engine. * * @return the minorVersion value. */ @@ -226,7 +237,7 @@ public String minorVersion() { } /** - * Get the state property: A state of a server that is visible to user. + * Get the state property: Possible states of a server. * * @return the state value. */ @@ -235,7 +246,7 @@ public ServerState state() { } /** - * Get the fullyQualifiedDomainName property: The fully qualified domain name of a server. + * Get the fullyQualifiedDomainName property: Fully qualified domain name of a server. * * @return the fullyQualifiedDomainName value. */ @@ -264,7 +275,7 @@ public ServerProperties withStorage(Storage storage) { } /** - * Get the authConfig property: AuthConfig properties of a server. + * Get the authConfig property: Authentication configuration properties of a server. * * @return the authConfig value. */ @@ -273,7 +284,7 @@ public AuthConfig authConfig() { } /** - * Set the authConfig property: AuthConfig properties of a server. + * Set the authConfig property: Authentication configuration properties of a server. * * @param authConfig the authConfig value to set. * @return the ServerProperties object itself. @@ -324,8 +335,8 @@ public ServerProperties withBackup(Backup backup) { } /** - * Get the network property: Network properties of a server. This Network property is required to be passed only in - * case you want the server to be Private access server. + * Get the network property: Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * * @return the network value. */ @@ -334,8 +345,8 @@ public Network network() { } /** - * Set the network property: Network properties of a server. This Network property is required to be passed only in - * case you want the server to be Private access server. + * Set the network property: Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * * @param network the network value to set. * @return the ServerProperties object itself. @@ -386,9 +397,9 @@ public ServerProperties withMaintenanceWindow(MaintenanceWindow maintenanceWindo } /** - * Get the sourceServerResourceId property: The source server resource ID to restore from. It's required when - * 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This property is returned - * only for Replica server. + * Get the sourceServerResourceId property: Identifier of the server to be used as the source of the new server. + * Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or 'ReviveDropped'. This property is + * returned only when the target server is a read replica. * * @return the sourceServerResourceId value. */ @@ -397,9 +408,9 @@ public String sourceServerResourceId() { } /** - * Set the sourceServerResourceId property: The source server resource ID to restore from. It's required when - * 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This property is returned - * only for Replica server. + * Set the sourceServerResourceId property: Identifier of the server to be used as the source of the new server. + * Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or 'ReviveDropped'. This property is + * returned only when the target server is a read replica. * * @param sourceServerResourceId the sourceServerResourceId value to set. * @return the ServerProperties object itself. @@ -410,8 +421,8 @@ public ServerProperties withSourceServerResourceId(String sourceServerResourceId } /** - * Get the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time to restore - * from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'ReviveDropped'. + * Get the pointInTimeUtc property: Creation time (in ISO8601 format) of the backup which you want to restore in the + * new server. It's required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', or 'ReviveDropped'. * * @return the pointInTimeUtc value. */ @@ -420,8 +431,8 @@ public OffsetDateTime pointInTimeUtc() { } /** - * Set the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time to restore - * from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'ReviveDropped'. + * Set the pointInTimeUtc property: Creation time (in ISO8601 format) of the backup which you want to restore in the + * new server. It's required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', or 'ReviveDropped'. * * @param pointInTimeUtc the pointInTimeUtc value to set. * @return the ServerProperties object itself. @@ -432,7 +443,7 @@ public ServerProperties withPointInTimeUtc(OffsetDateTime pointInTimeUtc) { } /** - * Get the availabilityZone property: availability zone information of the server. + * Get the availabilityZone property: Availability zone of a server. * * @return the availabilityZone value. */ @@ -441,7 +452,7 @@ public String availabilityZone() { } /** - * Set the availabilityZone property: availability zone information of the server. + * Set the availabilityZone property: Availability zone of a server. * * @param availabilityZone the availabilityZone value to set. * @return the ServerProperties object itself. @@ -452,7 +463,7 @@ public ServerProperties withAvailabilityZone(String availabilityZone) { } /** - * Get the replicationRole property: Replication role of the server. + * Get the replicationRole property: Role of the server in a replication set. * * @return the replicationRole value. */ @@ -461,7 +472,7 @@ public ReplicationRole replicationRole() { } /** - * Set the replicationRole property: Replication role of the server. + * Set the replicationRole property: Role of the server in a replication set. * * @param replicationRole the replicationRole value to set. * @return the ServerProperties object itself. @@ -472,7 +483,7 @@ public ServerProperties withReplicationRole(ReplicationRole replicationRole) { } /** - * Get the replicaCapacity property: Replicas allowed for a server. + * Get the replicaCapacity property: Maximum number of read replicas allowed for a server. * * @return the replicaCapacity value. */ @@ -481,8 +492,8 @@ public Integer replicaCapacity() { } /** - * Get the replica property: Replica properties of a server. These Replica properties are required to be passed only - * in case you want to Promote a server. + * Get the replica property: Read replica properties of a server. Required only in case that you want to promote a + * server. * * @return the replica value. */ @@ -491,8 +502,8 @@ public Replica replica() { } /** - * Set the replica property: Replica properties of a server. These Replica properties are required to be passed only - * in case you want to Promote a server. + * Set the replica property: Read replica properties of a server. Required only in case that you want to promote a + * server. * * @param replica the replica value to set. * @return the ServerProperties object itself. @@ -503,7 +514,7 @@ public ServerProperties withReplica(Replica replica) { } /** - * Get the createMode property: The mode to create a new PostgreSQL server. + * Get the createMode property: Creation mode of a new server. * * @return the createMode value. */ @@ -512,7 +523,7 @@ public CreateMode createMode() { } /** - * Set the createMode property: The mode to create a new PostgreSQL server. + * Set the createMode property: Creation mode of a new server. * * @param createMode the createMode value to set. * @return the ServerProperties object itself. @@ -524,7 +535,7 @@ public ServerProperties withCreateMode(CreateMode createMode) { /** * Get the privateEndpointConnections property: List of private endpoint connections associated with the specified - * resource. + * server. * * @return the privateEndpointConnections value. */ @@ -638,7 +649,7 @@ public static ServerProperties fromJson(JsonReader jsonReader) throws IOExceptio } else if ("administratorLoginPassword".equals(fieldName)) { deserializedServerProperties.administratorLoginPassword = reader.getString(); } else if ("version".equals(fieldName)) { - deserializedServerProperties.version = ServerVersion.fromString(reader.getString()); + deserializedServerProperties.version = PostgresMajorVersion.fromString(reader.getString()); } else if ("minorVersion".equals(fieldName)) { deserializedServerProperties.minorVersion = reader.getString(); } else if ("state".equals(fieldName)) { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForPatch.java similarity index 53% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForPatch.java index 6bde0f0cae3a..16860e56eaa6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForPatch.java @@ -9,40 +9,43 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfigForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.Cluster; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForUpdate; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption; -import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow; +import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindowForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Replica; import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationRole; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; import java.io.IOException; /** - * The ServerPropertiesForUpdate model. + * Properties of a server. */ @Fluent -public final class ServerPropertiesForUpdate implements JsonSerializable { +public final class ServerPropertiesForPatch implements JsonSerializable { /* - * The administrator's login name of a server. Can only be specified when the server is trying to switch to password - * authentication and does not have default administrator login. + * Name of the login designated as the first password based administrator assigned to your instance of PostgreSQL. + * Must be specified the first time that you enable password based authentication on a server. Once set to a given + * value, it cannot be changed for the rest of the life of a server. If you disable password based authentication on + * a server which had it enabled, this password based role isn't deleted. */ private String administratorLogin; /* - * The password of the administrator login. + * Password assigned to the administrator login. As long as password authentication is enabled, this password can be + * changed at any time. */ private String administratorLoginPassword; /* - * PostgreSQL Server version. Version 17 is currently not supported for MVU. + * Major version of PostgreSQL database engine. */ - private ServerVersion version; + private PostgresMajorVersion version; /* * Storage properties of a server. @@ -52,22 +55,22 @@ public final class ServerPropertiesForUpdate implements JsonSerializable { - ServerPropertiesForUpdate deserializedServerPropertiesForUpdate = new ServerPropertiesForUpdate(); + ServerPropertiesForPatch deserializedServerPropertiesForPatch = new ServerPropertiesForPatch(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("administratorLogin".equals(fieldName)) { - deserializedServerPropertiesForUpdate.administratorLogin = reader.getString(); + deserializedServerPropertiesForPatch.administratorLogin = reader.getString(); } else if ("administratorLoginPassword".equals(fieldName)) { - deserializedServerPropertiesForUpdate.administratorLoginPassword = reader.getString(); + deserializedServerPropertiesForPatch.administratorLoginPassword = reader.getString(); } else if ("version".equals(fieldName)) { - deserializedServerPropertiesForUpdate.version = ServerVersion.fromString(reader.getString()); + deserializedServerPropertiesForPatch.version = PostgresMajorVersion.fromString(reader.getString()); } else if ("storage".equals(fieldName)) { - deserializedServerPropertiesForUpdate.storage = Storage.fromJson(reader); + deserializedServerPropertiesForPatch.storage = Storage.fromJson(reader); } else if ("backup".equals(fieldName)) { - deserializedServerPropertiesForUpdate.backup = Backup.fromJson(reader); + deserializedServerPropertiesForPatch.backup = BackupForPatch.fromJson(reader); } else if ("highAvailability".equals(fieldName)) { - deserializedServerPropertiesForUpdate.highAvailability = HighAvailability.fromJson(reader); + deserializedServerPropertiesForPatch.highAvailability = HighAvailabilityForPatch.fromJson(reader); } else if ("maintenanceWindow".equals(fieldName)) { - deserializedServerPropertiesForUpdate.maintenanceWindow = MaintenanceWindow.fromJson(reader); + deserializedServerPropertiesForPatch.maintenanceWindow = MaintenanceWindowForPatch.fromJson(reader); } else if ("authConfig".equals(fieldName)) { - deserializedServerPropertiesForUpdate.authConfig = AuthConfig.fromJson(reader); + deserializedServerPropertiesForPatch.authConfig = AuthConfigForPatch.fromJson(reader); } else if ("dataEncryption".equals(fieldName)) { - deserializedServerPropertiesForUpdate.dataEncryption = DataEncryption.fromJson(reader); + deserializedServerPropertiesForPatch.dataEncryption = DataEncryption.fromJson(reader); + } else if ("availabilityZone".equals(fieldName)) { + deserializedServerPropertiesForPatch.availabilityZone = reader.getString(); } else if ("createMode".equals(fieldName)) { - deserializedServerPropertiesForUpdate.createMode - = CreateModeForUpdate.fromString(reader.getString()); + deserializedServerPropertiesForPatch.createMode = CreateModeForPatch.fromString(reader.getString()); } else if ("replicationRole".equals(fieldName)) { - deserializedServerPropertiesForUpdate.replicationRole + deserializedServerPropertiesForPatch.replicationRole = ReplicationRole.fromString(reader.getString()); } else if ("replica".equals(fieldName)) { - deserializedServerPropertiesForUpdate.replica = Replica.fromJson(reader); + deserializedServerPropertiesForPatch.replica = Replica.fromJson(reader); } else if ("network".equals(fieldName)) { - deserializedServerPropertiesForUpdate.network = Network.fromJson(reader); + deserializedServerPropertiesForPatch.network = Network.fromJson(reader); } else if ("cluster".equals(fieldName)) { - deserializedServerPropertiesForUpdate.cluster = Cluster.fromJson(reader); + deserializedServerPropertiesForPatch.cluster = Cluster.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedServerPropertiesForUpdate; + return deserializedServerPropertiesForPatch; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SessionDetailsResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SessionDetailsResourceInner.java deleted file mode 100644 index ec9e646b87fe..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SessionDetailsResourceInner.java +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Session details properties. - */ -@Fluent -public final class SessionDetailsResourceInner implements JsonSerializable { - /* - * Iteration id. - */ - private String iterationId; - - /* - * Session id. - */ - private String sessionId; - - /* - * Applied configuration for the iteration. - */ - private String appliedConfiguration; - - /* - * Iteration start time. - */ - private String iterationStartTime; - - /* - * The aqr for the iteration. - */ - private String averageQueryRuntimeMs; - - /* - * The tps for the iteration. - */ - private String transactionsPerSecond; - - /** - * Creates an instance of SessionDetailsResourceInner class. - */ - public SessionDetailsResourceInner() { - } - - /** - * Get the iterationId property: Iteration id. - * - * @return the iterationId value. - */ - public String iterationId() { - return this.iterationId; - } - - /** - * Set the iterationId property: Iteration id. - * - * @param iterationId the iterationId value to set. - * @return the SessionDetailsResourceInner object itself. - */ - public SessionDetailsResourceInner withIterationId(String iterationId) { - this.iterationId = iterationId; - return this; - } - - /** - * Get the sessionId property: Session id. - * - * @return the sessionId value. - */ - public String sessionId() { - return this.sessionId; - } - - /** - * Set the sessionId property: Session id. - * - * @param sessionId the sessionId value to set. - * @return the SessionDetailsResourceInner object itself. - */ - public SessionDetailsResourceInner withSessionId(String sessionId) { - this.sessionId = sessionId; - return this; - } - - /** - * Get the appliedConfiguration property: Applied configuration for the iteration. - * - * @return the appliedConfiguration value. - */ - public String appliedConfiguration() { - return this.appliedConfiguration; - } - - /** - * Set the appliedConfiguration property: Applied configuration for the iteration. - * - * @param appliedConfiguration the appliedConfiguration value to set. - * @return the SessionDetailsResourceInner object itself. - */ - public SessionDetailsResourceInner withAppliedConfiguration(String appliedConfiguration) { - this.appliedConfiguration = appliedConfiguration; - return this; - } - - /** - * Get the iterationStartTime property: Iteration start time. - * - * @return the iterationStartTime value. - */ - public String iterationStartTime() { - return this.iterationStartTime; - } - - /** - * Set the iterationStartTime property: Iteration start time. - * - * @param iterationStartTime the iterationStartTime value to set. - * @return the SessionDetailsResourceInner object itself. - */ - public SessionDetailsResourceInner withIterationStartTime(String iterationStartTime) { - this.iterationStartTime = iterationStartTime; - return this; - } - - /** - * Get the averageQueryRuntimeMs property: The aqr for the iteration. - * - * @return the averageQueryRuntimeMs value. - */ - public String averageQueryRuntimeMs() { - return this.averageQueryRuntimeMs; - } - - /** - * Set the averageQueryRuntimeMs property: The aqr for the iteration. - * - * @param averageQueryRuntimeMs the averageQueryRuntimeMs value to set. - * @return the SessionDetailsResourceInner object itself. - */ - public SessionDetailsResourceInner withAverageQueryRuntimeMs(String averageQueryRuntimeMs) { - this.averageQueryRuntimeMs = averageQueryRuntimeMs; - return this; - } - - /** - * Get the transactionsPerSecond property: The tps for the iteration. - * - * @return the transactionsPerSecond value. - */ - public String transactionsPerSecond() { - return this.transactionsPerSecond; - } - - /** - * Set the transactionsPerSecond property: The tps for the iteration. - * - * @param transactionsPerSecond the transactionsPerSecond value to set. - * @return the SessionDetailsResourceInner object itself. - */ - public SessionDetailsResourceInner withTransactionsPerSecond(String transactionsPerSecond) { - this.transactionsPerSecond = transactionsPerSecond; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("iterationId", this.iterationId); - jsonWriter.writeStringField("sessionId", this.sessionId); - jsonWriter.writeStringField("appliedConfiguration", this.appliedConfiguration); - jsonWriter.writeStringField("iterationStartTime", this.iterationStartTime); - jsonWriter.writeStringField("averageQueryRuntimeMs", this.averageQueryRuntimeMs); - jsonWriter.writeStringField("transactionsPerSecond", this.transactionsPerSecond); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SessionDetailsResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SessionDetailsResourceInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SessionDetailsResourceInner. - */ - public static SessionDetailsResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SessionDetailsResourceInner deserializedSessionDetailsResourceInner = new SessionDetailsResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("iterationId".equals(fieldName)) { - deserializedSessionDetailsResourceInner.iterationId = reader.getString(); - } else if ("sessionId".equals(fieldName)) { - deserializedSessionDetailsResourceInner.sessionId = reader.getString(); - } else if ("appliedConfiguration".equals(fieldName)) { - deserializedSessionDetailsResourceInner.appliedConfiguration = reader.getString(); - } else if ("iterationStartTime".equals(fieldName)) { - deserializedSessionDetailsResourceInner.iterationStartTime = reader.getString(); - } else if ("averageQueryRuntimeMs".equals(fieldName)) { - deserializedSessionDetailsResourceInner.averageQueryRuntimeMs = reader.getString(); - } else if ("transactionsPerSecond".equals(fieldName)) { - deserializedSessionDetailsResourceInner.transactionsPerSecond = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSessionDetailsResourceInner; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SessionResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SessionResourceInner.java deleted file mode 100644 index b7092605fd89..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SessionResourceInner.java +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Session resource properties. - */ -@Fluent -public final class SessionResourceInner implements JsonSerializable { - /* - * the tuning session start time. - */ - private String sessionStartTime; - - /* - * Session id. - */ - private String sessionId; - - /* - * The status of the tuning session. - */ - private String status; - - /* - * The pre tuning aqr. - */ - private String preTuningAqr; - - /* - * The post tuning aqr. - */ - private String postTuningAqr; - - /* - * The pre tuning tps. - */ - private String preTuningTps; - - /* - * The post tuning tps. - */ - private String postTuningTps; - - /** - * Creates an instance of SessionResourceInner class. - */ - public SessionResourceInner() { - } - - /** - * Get the sessionStartTime property: the tuning session start time. - * - * @return the sessionStartTime value. - */ - public String sessionStartTime() { - return this.sessionStartTime; - } - - /** - * Set the sessionStartTime property: the tuning session start time. - * - * @param sessionStartTime the sessionStartTime value to set. - * @return the SessionResourceInner object itself. - */ - public SessionResourceInner withSessionStartTime(String sessionStartTime) { - this.sessionStartTime = sessionStartTime; - return this; - } - - /** - * Get the sessionId property: Session id. - * - * @return the sessionId value. - */ - public String sessionId() { - return this.sessionId; - } - - /** - * Set the sessionId property: Session id. - * - * @param sessionId the sessionId value to set. - * @return the SessionResourceInner object itself. - */ - public SessionResourceInner withSessionId(String sessionId) { - this.sessionId = sessionId; - return this; - } - - /** - * Get the status property: The status of the tuning session. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Set the status property: The status of the tuning session. - * - * @param status the status value to set. - * @return the SessionResourceInner object itself. - */ - public SessionResourceInner withStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the preTuningAqr property: The pre tuning aqr. - * - * @return the preTuningAqr value. - */ - public String preTuningAqr() { - return this.preTuningAqr; - } - - /** - * Set the preTuningAqr property: The pre tuning aqr. - * - * @param preTuningAqr the preTuningAqr value to set. - * @return the SessionResourceInner object itself. - */ - public SessionResourceInner withPreTuningAqr(String preTuningAqr) { - this.preTuningAqr = preTuningAqr; - return this; - } - - /** - * Get the postTuningAqr property: The post tuning aqr. - * - * @return the postTuningAqr value. - */ - public String postTuningAqr() { - return this.postTuningAqr; - } - - /** - * Set the postTuningAqr property: The post tuning aqr. - * - * @param postTuningAqr the postTuningAqr value to set. - * @return the SessionResourceInner object itself. - */ - public SessionResourceInner withPostTuningAqr(String postTuningAqr) { - this.postTuningAqr = postTuningAqr; - return this; - } - - /** - * Get the preTuningTps property: The pre tuning tps. - * - * @return the preTuningTps value. - */ - public String preTuningTps() { - return this.preTuningTps; - } - - /** - * Set the preTuningTps property: The pre tuning tps. - * - * @param preTuningTps the preTuningTps value to set. - * @return the SessionResourceInner object itself. - */ - public SessionResourceInner withPreTuningTps(String preTuningTps) { - this.preTuningTps = preTuningTps; - return this; - } - - /** - * Get the postTuningTps property: The post tuning tps. - * - * @return the postTuningTps value. - */ - public String postTuningTps() { - return this.postTuningTps; - } - - /** - * Set the postTuningTps property: The post tuning tps. - * - * @param postTuningTps the postTuningTps value to set. - * @return the SessionResourceInner object itself. - */ - public SessionResourceInner withPostTuningTps(String postTuningTps) { - this.postTuningTps = postTuningTps; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sessionStartTime", this.sessionStartTime); - jsonWriter.writeStringField("sessionId", this.sessionId); - jsonWriter.writeStringField("status", this.status); - jsonWriter.writeStringField("preTuningAqr", this.preTuningAqr); - jsonWriter.writeStringField("postTuningAqr", this.postTuningAqr); - jsonWriter.writeStringField("preTuningTps", this.preTuningTps); - jsonWriter.writeStringField("postTuningTps", this.postTuningTps); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SessionResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SessionResourceInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the SessionResourceInner. - */ - public static SessionResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SessionResourceInner deserializedSessionResourceInner = new SessionResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sessionStartTime".equals(fieldName)) { - deserializedSessionResourceInner.sessionStartTime = reader.getString(); - } else if ("sessionId".equals(fieldName)) { - deserializedSessionResourceInner.sessionId = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedSessionResourceInner.status = reader.getString(); - } else if ("preTuningAqr".equals(fieldName)) { - deserializedSessionResourceInner.preTuningAqr = reader.getString(); - } else if ("postTuningAqr".equals(fieldName)) { - deserializedSessionResourceInner.postTuningAqr = reader.getString(); - } else if ("preTuningTps".equals(fieldName)) { - deserializedSessionResourceInner.preTuningTps = reader.getString(); - } else if ("postTuningTps".equals(fieldName)) { - deserializedSessionResourceInner.postTuningTps = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSessionResourceInner; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/TuningOptionsResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/TuningOptionsInner.java similarity index 71% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/TuningOptionsResourceInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/TuningOptionsInner.java index 9bc54208f8cb..f893a71d410d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/TuningOptionsResourceInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/TuningOptionsInner.java @@ -13,10 +13,10 @@ import java.io.IOException; /** - * Stores property that features impact on some metric if this recommended action is applied. + * Impact on some metric if this recommended action is applied. */ @Immutable -public final class TuningOptionsResourceInner extends ProxyResource { +public final class TuningOptionsInner extends ProxyResource { /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @@ -38,9 +38,9 @@ public final class TuningOptionsResourceInner extends ProxyResource { private String id; /** - * Creates an instance of TuningOptionsResourceInner class. + * Creates an instance of TuningOptionsInner class. */ - public TuningOptionsResourceInner() { + public TuningOptionsInner() { } /** @@ -100,35 +100,35 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of TuningOptionsResourceInner from the JsonReader. + * Reads an instance of TuningOptionsInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of TuningOptionsResourceInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. + * @return An instance of TuningOptionsInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TuningOptionsResourceInner. + * @throws IOException If an error occurs while reading the TuningOptionsInner. */ - public static TuningOptionsResourceInner fromJson(JsonReader jsonReader) throws IOException { + public static TuningOptionsInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - TuningOptionsResourceInner deserializedTuningOptionsResourceInner = new TuningOptionsResourceInner(); + TuningOptionsInner deserializedTuningOptionsInner = new TuningOptionsInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedTuningOptionsResourceInner.id = reader.getString(); + deserializedTuningOptionsInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedTuningOptionsResourceInner.name = reader.getString(); + deserializedTuningOptionsInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedTuningOptionsResourceInner.type = reader.getString(); + deserializedTuningOptionsInner.type = reader.getString(); } else if ("systemData".equals(fieldName)) { - deserializedTuningOptionsResourceInner.systemData = SystemData.fromJson(reader); + deserializedTuningOptionsInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedTuningOptionsResourceInner; + return deserializedTuningOptionsInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointInner.java similarity index 72% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointInner.java index eace4556e332..073bec2147ab 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointInner.java @@ -15,10 +15,10 @@ import java.util.List; /** - * Represents a virtual endpoint for a server. + * Pair of virtual endpoints for a server. */ @Fluent -public final class VirtualEndpointResourceInner extends VirtualEndpointResourceForPatch { +public final class VirtualEndpointInner extends VirtualEndpointResourceForPatch { /* * Fully qualified resource ID for the resource. E.g. * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" @@ -41,14 +41,14 @@ public final class VirtualEndpointResourceInner extends VirtualEndpointResourceF private SystemData systemData; /* - * Properties of the virtual endpoint resource. + * Properties of the pair of virtual endpoints. */ private VirtualEndpointResourceProperties innerProperties; /** - * Creates an instance of VirtualEndpointResourceInner class. + * Creates an instance of VirtualEndpointInner class. */ - public VirtualEndpointResourceInner() { + public VirtualEndpointInner() { } /** @@ -90,7 +90,7 @@ public SystemData systemData() { } /** - * Get the innerProperties property: Properties of the virtual endpoint resource. + * Get the innerProperties property: Properties of the pair of virtual endpoints. * * @return the innerProperties value. */ @@ -99,7 +99,7 @@ private VirtualEndpointResourceProperties innerProperties() { } /** - * Get the endpointType property: The endpoint type for the virtual endpoint. + * Get the endpointType property: Type of endpoint for the virtual endpoints. * * @return the endpointType value. */ @@ -108,12 +108,12 @@ public VirtualEndpointType endpointType() { } /** - * Set the endpointType property: The endpoint type for the virtual endpoint. + * Set the endpointType property: Type of endpoint for the virtual endpoints. * * @param endpointType the endpointType value to set. - * @return the VirtualEndpointResourceInner object itself. + * @return the VirtualEndpointInner object itself. */ - public VirtualEndpointResourceInner withEndpointType(VirtualEndpointType endpointType) { + public VirtualEndpointInner withEndpointType(VirtualEndpointType endpointType) { if (this.innerProperties() == null) { this.innerProperties = new VirtualEndpointResourceProperties(); } @@ -122,7 +122,7 @@ public VirtualEndpointResourceInner withEndpointType(VirtualEndpointType endpoin } /** - * Get the members property: List of members for a virtual endpoint. + * Get the members property: List of servers that one of the virtual endpoints can refer to. * * @return the members value. */ @@ -131,12 +131,12 @@ public List members() { } /** - * Set the members property: List of members for a virtual endpoint. + * Set the members property: List of servers that one of the virtual endpoints can refer to. * * @param members the members value to set. - * @return the VirtualEndpointResourceInner object itself. + * @return the VirtualEndpointInner object itself. */ - public VirtualEndpointResourceInner withMembers(List members) { + public VirtualEndpointInner withMembers(List members) { if (this.innerProperties() == null) { this.innerProperties = new VirtualEndpointResourceProperties(); } @@ -176,37 +176,37 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of VirtualEndpointResourceInner from the JsonReader. + * Reads an instance of VirtualEndpointInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of VirtualEndpointResourceInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualEndpointResourceInner. + * @return An instance of VirtualEndpointInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualEndpointInner. */ - public static VirtualEndpointResourceInner fromJson(JsonReader jsonReader) throws IOException { + public static VirtualEndpointInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - VirtualEndpointResourceInner deserializedVirtualEndpointResourceInner = new VirtualEndpointResourceInner(); + VirtualEndpointInner deserializedVirtualEndpointInner = new VirtualEndpointInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("properties".equals(fieldName)) { - deserializedVirtualEndpointResourceInner.innerProperties + deserializedVirtualEndpointInner.innerProperties = VirtualEndpointResourceProperties.fromJson(reader); } else if ("id".equals(fieldName)) { - deserializedVirtualEndpointResourceInner.id = reader.getString(); + deserializedVirtualEndpointInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedVirtualEndpointResourceInner.name = reader.getString(); + deserializedVirtualEndpointInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedVirtualEndpointResourceInner.type = reader.getString(); + deserializedVirtualEndpointInner.type = reader.getString(); } else if ("systemData".equals(fieldName)) { - deserializedVirtualEndpointResourceInner.systemData = SystemData.fromJson(reader); + deserializedVirtualEndpointInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedVirtualEndpointResourceInner; + return deserializedVirtualEndpointInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceProperties.java index 1d2a47e228fa..81db8514fae6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceProperties.java @@ -14,22 +14,22 @@ import java.util.List; /** - * The properties of a virtual endpoint. + * Properties of a pair of virtual endpoints. */ @Fluent public final class VirtualEndpointResourceProperties implements JsonSerializable { /* - * The endpoint type for the virtual endpoint. + * Type of endpoint for the virtual endpoints. */ private VirtualEndpointType endpointType; /* - * List of members for a virtual endpoint + * List of servers that one of the virtual endpoints can refer to. */ private List members; /* - * List of virtual endpoints for a server + * List of virtual endpoints for a server. */ private List virtualEndpoints; @@ -40,7 +40,7 @@ public VirtualEndpointResourceProperties() { } /** - * Get the endpointType property: The endpoint type for the virtual endpoint. + * Get the endpointType property: Type of endpoint for the virtual endpoints. * * @return the endpointType value. */ @@ -49,7 +49,7 @@ public VirtualEndpointType endpointType() { } /** - * Set the endpointType property: The endpoint type for the virtual endpoint. + * Set the endpointType property: Type of endpoint for the virtual endpoints. * * @param endpointType the endpointType value to set. * @return the VirtualEndpointResourceProperties object itself. @@ -60,7 +60,7 @@ public VirtualEndpointResourceProperties withEndpointType(VirtualEndpointType en } /** - * Get the members property: List of members for a virtual endpoint. + * Get the members property: List of servers that one of the virtual endpoints can refer to. * * @return the members value. */ @@ -69,7 +69,7 @@ public List members() { } /** - * Set the members property: List of members for a virtual endpoint. + * Set the members property: List of servers that one of the virtual endpoints can refer to. * * @param members the members value to set. * @return the VirtualEndpointResourceProperties object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageModelInner.java similarity index 72% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageModelInner.java index 66e0660b0438..27a4225b8f8f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageModelInner.java @@ -17,8 +17,8 @@ * Virtual network subnet usage data. */ @Immutable -public final class VirtualNetworkSubnetUsageResultInner - implements JsonSerializable { +public final class VirtualNetworkSubnetUsageModelInner + implements JsonSerializable { /* * The delegatedSubnetsUsage property. */ @@ -35,9 +35,9 @@ public final class VirtualNetworkSubnetUsageResultInner private String subscriptionId; /** - * Creates an instance of VirtualNetworkSubnetUsageResultInner class. + * Creates an instance of VirtualNetworkSubnetUsageModelInner class. */ - public VirtualNetworkSubnetUsageResultInner() { + public VirtualNetworkSubnetUsageModelInner() { } /** @@ -88,17 +88,17 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of VirtualNetworkSubnetUsageResultInner from the JsonReader. + * Reads an instance of VirtualNetworkSubnetUsageModelInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of VirtualNetworkSubnetUsageResultInner if the JsonReader was pointing to an instance of it, + * @return An instance of VirtualNetworkSubnetUsageModelInner if the JsonReader was pointing to an instance of it, * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualNetworkSubnetUsageResultInner. + * @throws IOException If an error occurs while reading the VirtualNetworkSubnetUsageModelInner. */ - public static VirtualNetworkSubnetUsageResultInner fromJson(JsonReader jsonReader) throws IOException { + public static VirtualNetworkSubnetUsageModelInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - VirtualNetworkSubnetUsageResultInner deserializedVirtualNetworkSubnetUsageResultInner - = new VirtualNetworkSubnetUsageResultInner(); + VirtualNetworkSubnetUsageModelInner deserializedVirtualNetworkSubnetUsageModelInner + = new VirtualNetworkSubnetUsageModelInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -106,17 +106,17 @@ public static VirtualNetworkSubnetUsageResultInner fromJson(JsonReader jsonReade if ("delegatedSubnetsUsage".equals(fieldName)) { List delegatedSubnetsUsage = reader.readArray(reader1 -> DelegatedSubnetUsage.fromJson(reader1)); - deserializedVirtualNetworkSubnetUsageResultInner.delegatedSubnetsUsage = delegatedSubnetsUsage; + deserializedVirtualNetworkSubnetUsageModelInner.delegatedSubnetsUsage = delegatedSubnetsUsage; } else if ("location".equals(fieldName)) { - deserializedVirtualNetworkSubnetUsageResultInner.location = reader.getString(); + deserializedVirtualNetworkSubnetUsageModelInner.location = reader.getString(); } else if ("subscriptionId".equals(fieldName)) { - deserializedVirtualNetworkSubnetUsageResultInner.subscriptionId = reader.getString(); + deserializedVirtualNetworkSubnetUsageModelInner.subscriptionId = reader.getString(); } else { reader.skipChildren(); } } - return deserializedVirtualNetworkSubnetUsageResultInner; + return deserializedVirtualNetworkSubnetUsageModelInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/package-info.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/package-info.java index 0e1a8c2fca79..6e2e9736124e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/package-info.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/package-info.java @@ -4,8 +4,8 @@ /** * Package containing the inner data models for PostgreSqlManagementClient. - * The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL - * resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and - * configurations with new business model. + * The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure + * PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, + * log files and configurations with new business model. */ package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/package-info.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/package-info.java index f06dd5765fa3..441c2b6e546f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/package-info.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/package-info.java @@ -4,8 +4,8 @@ /** * Package containing the service clients for PostgreSqlManagementClient. - * The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL - * resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and - * configurations with new business model. + * The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure + * PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, + * log files and configurations with new business model. */ package com.azure.resourcemanager.postgresqlflexibleserver.fluent; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ActiveDirectoryAdministratorImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ActiveDirectoryAdministratorImpl.java deleted file mode 100644 index 1c7a2d41d947..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ActiveDirectoryAdministratorImpl.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministrator; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministratorAdd; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; - -public final class ActiveDirectoryAdministratorImpl - implements ActiveDirectoryAdministrator, ActiveDirectoryAdministrator.Definition { - private ActiveDirectoryAdministratorInner innerObject; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - ActiveDirectoryAdministratorImpl(ActiveDirectoryAdministratorInner innerObject, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager 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 PrincipalType principalType() { - return this.innerModel().principalType(); - } - - public String principalName() { - return this.innerModel().principalName(); - } - - public String objectId() { - return this.innerModel().objectId(); - } - - public String tenantId() { - return this.innerModel().tenantId(); - } - - public ActiveDirectoryAdministratorInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String serverName; - - private String objectId; - - private ActiveDirectoryAdministratorAdd createParameters; - - public ActiveDirectoryAdministratorImpl withExistingFlexibleServer(String resourceGroupName, String serverName) { - this.resourceGroupName = resourceGroupName; - this.serverName = serverName; - return this; - } - - public ActiveDirectoryAdministrator create() { - this.innerObject = serviceManager.serviceClient() - .getAdministrators() - .create(resourceGroupName, serverName, objectId, createParameters, Context.NONE); - return this; - } - - public ActiveDirectoryAdministrator create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getAdministrators() - .create(resourceGroupName, serverName, objectId, createParameters, context); - return this; - } - - ActiveDirectoryAdministratorImpl(String name, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerObject = new ActiveDirectoryAdministratorInner(); - this.serviceManager = serviceManager; - this.objectId = name; - this.createParameters = new ActiveDirectoryAdministratorAdd(); - } - - public ActiveDirectoryAdministrator refresh() { - this.innerObject = serviceManager.serviceClient() - .getAdministrators() - .getWithResponse(resourceGroupName, serverName, objectId, Context.NONE) - .getValue(); - return this; - } - - public ActiveDirectoryAdministrator refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getAdministrators() - .getWithResponse(resourceGroupName, serverName, objectId, context) - .getValue(); - return this; - } - - public ActiveDirectoryAdministratorImpl withPrincipalType(PrincipalType principalType) { - this.createParameters.withPrincipalType(principalType); - return this; - } - - public ActiveDirectoryAdministratorImpl withPrincipalName(String principalName) { - this.createParameters.withPrincipalName(principalName); - return this; - } - - public ActiveDirectoryAdministratorImpl withTenantId(String tenantId) { - this.createParameters.withTenantId(tenantId); - return this; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorMicrosoftEntraImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorMicrosoftEntraImpl.java new file mode 100644 index 000000000000..9002b1279e22 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorMicrosoftEntraImpl.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntra; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntraAdd; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; + +public final class AdministratorMicrosoftEntraImpl + implements AdministratorMicrosoftEntra, AdministratorMicrosoftEntra.Definition, AdministratorMicrosoftEntra.Update { + private AdministratorMicrosoftEntraInner innerObject; + + private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager 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 PrincipalType principalType() { + return this.innerModel().principalType(); + } + + public String principalName() { + return this.innerModel().principalName(); + } + + public String objectId() { + return this.innerModel().objectId(); + } + + public String tenantId() { + return this.innerModel().tenantId(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public AdministratorMicrosoftEntraInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String serverName; + + private String objectId; + + private AdministratorMicrosoftEntraAdd createParameters; + + private AdministratorMicrosoftEntraAdd updateParameters; + + public AdministratorMicrosoftEntraImpl withExistingFlexibleServer(String resourceGroupName, String serverName) { + this.resourceGroupName = resourceGroupName; + this.serverName = serverName; + return this; + } + + public AdministratorMicrosoftEntra create() { + this.innerObject = serviceManager.serviceClient() + .getAdministratorsMicrosoftEntras() + .createOrUpdate(resourceGroupName, serverName, objectId, createParameters, Context.NONE); + return this; + } + + public AdministratorMicrosoftEntra create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAdministratorsMicrosoftEntras() + .createOrUpdate(resourceGroupName, serverName, objectId, createParameters, context); + return this; + } + + AdministratorMicrosoftEntraImpl(String name, + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { + this.innerObject = new AdministratorMicrosoftEntraInner(); + this.serviceManager = serviceManager; + this.objectId = name; + this.createParameters = new AdministratorMicrosoftEntraAdd(); + } + + public AdministratorMicrosoftEntraImpl update() { + this.updateParameters = new AdministratorMicrosoftEntraAdd(); + return this; + } + + public AdministratorMicrosoftEntra apply() { + this.innerObject = serviceManager.serviceClient() + .getAdministratorsMicrosoftEntras() + .createOrUpdate(resourceGroupName, serverName, objectId, updateParameters, Context.NONE); + return this; + } + + public AdministratorMicrosoftEntra apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAdministratorsMicrosoftEntras() + .createOrUpdate(resourceGroupName, serverName, objectId, updateParameters, context); + return this; + } + + AdministratorMicrosoftEntraImpl(AdministratorMicrosoftEntraInner innerObject, + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.serverName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "flexibleServers"); + this.objectId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "administrators"); + } + + public AdministratorMicrosoftEntra refresh() { + this.innerObject = serviceManager.serviceClient() + .getAdministratorsMicrosoftEntras() + .getWithResponse(resourceGroupName, serverName, objectId, Context.NONE) + .getValue(); + return this; + } + + public AdministratorMicrosoftEntra refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAdministratorsMicrosoftEntras() + .getWithResponse(resourceGroupName, serverName, objectId, context) + .getValue(); + return this; + } + + public AdministratorMicrosoftEntraImpl withPrincipalType(PrincipalType principalType) { + if (isInCreateMode()) { + this.createParameters.withPrincipalType(principalType); + return this; + } else { + this.updateParameters.withPrincipalType(principalType); + return this; + } + } + + public AdministratorMicrosoftEntraImpl withPrincipalName(String principalName) { + if (isInCreateMode()) { + this.createParameters.withPrincipalName(principalName); + return this; + } else { + this.updateParameters.withPrincipalName(principalName); + return this; + } + } + + public AdministratorMicrosoftEntraImpl withTenantId(String tenantId) { + if (isInCreateMode()) { + this.createParameters.withTenantId(tenantId); + return this; + } else { + this.updateParameters.withTenantId(tenantId); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasClientImpl.java similarity index 74% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsClientImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasClientImpl.java index a7a6fb944cac..a1a044dc5454 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasClientImpl.java @@ -33,22 +33,22 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministratorAdd; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntraAdd; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntraList; 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 AdministratorsClient. + * An instance of this class provides access to all the operations defined in AdministratorsMicrosoftEntrasClient. */ -public final class AdministratorsClientImpl implements AdministratorsClient { +public final class AdministratorsMicrosoftEntrasClientImpl implements AdministratorsMicrosoftEntrasClient { /** * The proxy service used to perform REST calls. */ - private final AdministratorsService service; + private final AdministratorsMicrosoftEntrasService service; /** * The service client containing this operation class. @@ -56,48 +56,48 @@ public final class AdministratorsClientImpl implements AdministratorsClient { private final PostgreSqlManagementClientImpl client; /** - * Initializes an instance of AdministratorsClientImpl. + * Initializes an instance of AdministratorsMicrosoftEntrasClientImpl. * * @param client the instance of the service client containing this operation class. */ - AdministratorsClientImpl(PostgreSqlManagementClientImpl client) { - this.service - = RestProxy.create(AdministratorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + AdministratorsMicrosoftEntrasClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(AdministratorsMicrosoftEntrasService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for PostgreSqlManagementClientAdministrators to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for PostgreSqlManagementClientAdministratorsMicrosoftEntras to be used by + * the proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface AdministratorsService { + @ServiceInterface(name = "PostgreSqlManagementClientAdministratorsMicrosoftEntras") + public interface AdministratorsMicrosoftEntrasService { @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("objectId") String objectId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ActiveDirectoryAdministratorAdd parameters, + @BodyParam("application/json") AdministratorMicrosoftEntraAdd parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("objectId") String objectId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ActiveDirectoryAdministratorAdd parameters, + @BodyParam("application/json") AdministratorMicrosoftEntraAdd parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -106,7 +106,7 @@ Mono>> delete(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Response deleteSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -117,7 +117,7 @@ Response deleteSync(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("objectId") String objectId, @HeaderParam("Accept") String accept, Context context); @@ -126,7 +126,7 @@ Mono> get(@HostParam("$host") String @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("objectId") String objectId, @HeaderParam("Accept") String accept, Context context); @@ -135,7 +135,7 @@ Response getSync(@HostParam("$host") String e @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -144,7 +144,7 @@ Mono> listByServer(@HostParam("$host") String @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -153,7 +153,7 @@ Response listByServerSync(@HostParam("$host") String en @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( + Mono> listByServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -161,27 +161,28 @@ Mono> listByServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( + Response listByServerNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an Microsoft Entra Administrator along with {@link Response} on successful completion of - * {@link Mono}. + * @return server administrator associated to a Microsoft Entra principal along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createWithResponseAsync(String resourceGroupName, String serverName, - String objectId, ActiveDirectoryAdministratorAdd parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String objectId, AdministratorMicrosoftEntraAdd parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -207,26 +208,27 @@ public Mono>> createWithResponseAsync(String resourceG } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, serverName, objectId, this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an Microsoft Entra Administrator along with {@link Response}. + * @return server administrator associated to a Microsoft Entra principal along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createWithResponse(String resourceGroupName, String serverName, String objectId, - ActiveDirectoryAdministratorAdd parameters) { + private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String objectId, AdministratorMicrosoftEntraAdd parameters) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -256,26 +258,27 @@ private Response createWithResponse(String resourceGroupName, String parameters.validate(); } final String accept = "application/json"; - return service.createSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, serverName, objectId, this.client.getApiVersion(), parameters, accept, Context.NONE); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an Microsoft Entra Administrator along with {@link Response}. + * @return server administrator associated to a Microsoft Entra principal along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createWithResponse(String resourceGroupName, String serverName, String objectId, - ActiveDirectoryAdministratorAdd parameters, Context context) { + private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String objectId, AdministratorMicrosoftEntraAdd parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -305,138 +308,145 @@ private Response createWithResponse(String resourceGroupName, String parameters.validate(); } final String accept = "application/json"; - return service.createSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, serverName, objectId, this.client.getApiVersion(), parameters, accept, context); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 represents an Microsoft Entra Administrator. + * @return the {@link PollerFlux} for polling of server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ActiveDirectoryAdministratorInner> - beginCreateAsync(String resourceGroupName, String serverName, String objectId, - ActiveDirectoryAdministratorAdd parameters) { + public PollerFlux, AdministratorMicrosoftEntraInner> + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String objectId, + AdministratorMicrosoftEntraAdd parameters) { Mono>> mono - = createWithResponseAsync(resourceGroupName, serverName, objectId, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ActiveDirectoryAdministratorInner.class, - ActiveDirectoryAdministratorInner.class, this.client.getContext()); + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, objectId, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AdministratorMicrosoftEntraInner.class, + AdministratorMicrosoftEntraInner.class, this.client.getContext()); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents an Microsoft Entra Administrator. + * @return the {@link SyncPoller} for polling of server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ActiveDirectoryAdministratorInner> beginCreate( - String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters) { - Response response = createWithResponse(resourceGroupName, serverName, objectId, parameters); - return this.client.getLroResult(response, - ActiveDirectoryAdministratorInner.class, ActiveDirectoryAdministratorInner.class, Context.NONE); + public SyncPoller, AdministratorMicrosoftEntraInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, String objectId, + AdministratorMicrosoftEntraAdd parameters) { + Response response = createOrUpdateWithResponse(resourceGroupName, serverName, objectId, parameters); + return this.client.getLroResult(response, + AdministratorMicrosoftEntraInner.class, AdministratorMicrosoftEntraInner.class, Context.NONE); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents an Microsoft Entra Administrator. + * @return the {@link SyncPoller} for polling of server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ActiveDirectoryAdministratorInner> beginCreate( - String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters, - Context context) { + public SyncPoller, AdministratorMicrosoftEntraInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, String objectId, + AdministratorMicrosoftEntraAdd parameters, Context context) { Response response - = createWithResponse(resourceGroupName, serverName, objectId, parameters, context); - return this.client.getLroResult(response, - ActiveDirectoryAdministratorInner.class, ActiveDirectoryAdministratorInner.class, context); + = createOrUpdateWithResponse(resourceGroupName, serverName, objectId, parameters, context); + return this.client.getLroResult(response, + AdministratorMicrosoftEntraInner.class, AdministratorMicrosoftEntraInner.class, context); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an Microsoft Entra Administrator on successful completion of {@link Mono}. + * @return server administrator associated to a Microsoft Entra principal on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync(String resourceGroupName, String serverName, - String objectId, ActiveDirectoryAdministratorAdd parameters) { - return beginCreateAsync(resourceGroupName, serverName, objectId, parameters).last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String objectId, AdministratorMicrosoftEntraAdd parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, objectId, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an Microsoft Entra Administrator. + * @return server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ActiveDirectoryAdministratorInner create(String resourceGroupName, String serverName, String objectId, - ActiveDirectoryAdministratorAdd parameters) { - return beginCreate(resourceGroupName, serverName, objectId, parameters).getFinalResult(); + public AdministratorMicrosoftEntraInner createOrUpdate(String resourceGroupName, String serverName, String objectId, + AdministratorMicrosoftEntraAdd parameters) { + return beginCreateOrUpdate(resourceGroupName, serverName, objectId, parameters).getFinalResult(); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an Microsoft Entra Administrator. + * @return server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ActiveDirectoryAdministratorInner create(String resourceGroupName, String serverName, String objectId, - ActiveDirectoryAdministratorAdd parameters, Context context) { - return beginCreate(resourceGroupName, serverName, objectId, parameters, context).getFinalResult(); + public AdministratorMicrosoftEntraInner createOrUpdate(String resourceGroupName, String serverName, String objectId, + AdministratorMicrosoftEntraAdd parameters, Context context) { + return beginCreateOrUpdate(resourceGroupName, serverName, objectId, parameters, context).getFinalResult(); } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -471,11 +481,11 @@ public Mono>> deleteWithResponseAsync(String resourceG } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -511,11 +521,11 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -553,11 +563,11 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -572,11 +582,11 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -590,11 +600,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -609,11 +619,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -626,11 +636,11 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -641,11 +651,11 @@ public void delete(String resourceGroupName, String serverName, String objectId) } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -657,18 +667,19 @@ public void delete(String resourceGroupName, String serverName, String objectId, } /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response} on successful completion of {@link Mono}. + * @return information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, String objectId) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -696,37 +707,39 @@ public Mono> getWithResponseAsync(St } /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server on successful completion of {@link Mono}. + * @return information about a server administrator associated to a Microsoft Entra principal on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, + public Mono getAsync(String resourceGroupName, String serverName, String objectId) { return getWithResponseAsync(resourceGroupName, serverName, objectId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, + public Response getWithResponse(String resourceGroupName, String serverName, String objectId, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -756,34 +769,34 @@ public Response getWithResponse(String resour } /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about a server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ActiveDirectoryAdministratorInner get(String resourceGroupName, String serverName, String objectId) { + public AdministratorMicrosoftEntraInner get(String resourceGroupName, String serverName, String objectId) { return getWithResponse(resourceGroupName, serverName, objectId, Context.NONE).getValue(); } /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Microsoft Entra Administrators along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of server administrators associated to Microsoft Entra principals along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, + private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -804,39 +817,40 @@ private Mono> listByServerSingl return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .>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 AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Microsoft Entra Administrators as paginated response with {@link PagedFlux}. + * @return list of server administrators associated to Microsoft Entra principals as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { + public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Microsoft Entra Administrators along with {@link PagedResponse}. + * @return list of server administrators associated to Microsoft Entra principals along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -857,7 +871,7 @@ private PagedResponse listByServerSinglePage( .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -865,7 +879,7 @@ private PagedResponse listByServerSinglePage( } /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -873,10 +887,10 @@ private PagedResponse listByServerSinglePage( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Microsoft Entra Administrators along with {@link PagedResponse}. + * @return list of server administrators associated to Microsoft Entra principals along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -897,7 +911,7 @@ private PagedResponse listByServerSinglePage( .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -905,23 +919,24 @@ private PagedResponse listByServerSinglePage( } /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Microsoft Entra Administrators as paginated response with {@link PagedIterable}. + * @return list of server administrators associated to Microsoft Entra principals as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { + public PagedIterable listByServer(String resourceGroupName, String serverName) { return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), nextLink -> listByServerNextSinglePage(nextLink)); } /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -929,10 +944,11 @@ public PagedIterable listByServer(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Microsoft Entra Administrators as paginated response with {@link PagedIterable}. + * @return list of server administrators associated to Microsoft Entra principals as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePage(nextLink, context)); @@ -945,11 +961,11 @@ public PagedIterable listByServer(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Microsoft Entra Administrators along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of server administrators associated to Microsoft Entra principals along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync(String nextLink) { + private Mono> listByServerNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -960,7 +976,7 @@ private Mono> listByServerNextS final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .>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())); } @@ -972,10 +988,10 @@ private Mono> listByServerNextS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Microsoft Entra Administrators along with {@link PagedResponse}. + * @return list of server administrators associated to Microsoft Entra principals along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink) { + private PagedResponse listByServerNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -986,7 +1002,7 @@ private PagedResponse listByServerNextSingleP "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -1000,10 +1016,10 @@ private PagedResponse listByServerNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Microsoft Entra Administrators along with {@link PagedResponse}. + * @return list of server administrators associated to Microsoft Entra principals along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink, + private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { if (nextLink == null) { throw LOGGER.atError() @@ -1015,11 +1031,11 @@ private PagedResponse listByServerNextSingleP "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - private static final ClientLogger LOGGER = new ClientLogger(AdministratorsClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AdministratorsMicrosoftEntrasClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasImpl.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasImpl.java index 99a09fbdd089..ad0480a8602a 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasImpl.java @@ -9,19 +9,19 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministrator; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Administrators; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntra; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorsMicrosoftEntras; -public final class AdministratorsImpl implements Administrators { - private static final ClientLogger LOGGER = new ClientLogger(AdministratorsImpl.class); +public final class AdministratorsMicrosoftEntrasImpl implements AdministratorsMicrosoftEntras { + private static final ClientLogger LOGGER = new ClientLogger(AdministratorsMicrosoftEntrasImpl.class); - private final AdministratorsClient innerClient; + private final AdministratorsMicrosoftEntrasClient innerClient; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - public AdministratorsImpl(AdministratorsClient innerClient, + public AdministratorsMicrosoftEntrasImpl(AdministratorsMicrosoftEntrasClient innerClient, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -35,43 +35,43 @@ public void delete(String resourceGroupName, String serverName, String objectId, this.serviceClient().delete(resourceGroupName, serverName, objectId, context); } - public Response getWithResponse(String resourceGroupName, String serverName, + public Response getWithResponse(String resourceGroupName, String serverName, String objectId, Context context) { - Response inner + Response inner = this.serviceClient().getWithResponse(resourceGroupName, serverName, objectId, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ActiveDirectoryAdministratorImpl(inner.getValue(), this.manager())); + new AdministratorMicrosoftEntraImpl(inner.getValue(), this.manager())); } else { return null; } } - public ActiveDirectoryAdministrator get(String resourceGroupName, String serverName, String objectId) { - ActiveDirectoryAdministratorInner inner = this.serviceClient().get(resourceGroupName, serverName, objectId); + public AdministratorMicrosoftEntra get(String resourceGroupName, String serverName, String objectId) { + AdministratorMicrosoftEntraInner inner = this.serviceClient().get(resourceGroupName, serverName, objectId); if (inner != null) { - return new ActiveDirectoryAdministratorImpl(inner, this.manager()); + return new AdministratorMicrosoftEntraImpl(inner, this.manager()); } else { return null; } } - public PagedIterable listByServer(String resourceGroupName, String serverName) { - PagedIterable inner + public PagedIterable listByServer(String resourceGroupName, String serverName) { + PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); return ResourceManagerUtils.mapPage(inner, - inner1 -> new ActiveDirectoryAdministratorImpl(inner1, this.manager())); + inner1 -> new AdministratorMicrosoftEntraImpl(inner1, this.manager())); } - public PagedIterable listByServer(String resourceGroupName, String serverName, + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { - PagedIterable inner + PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName, context); return ResourceManagerUtils.mapPage(inner, - inner1 -> new ActiveDirectoryAdministratorImpl(inner1, this.manager())); + inner1 -> new AdministratorMicrosoftEntraImpl(inner1, this.manager())); } - public ActiveDirectoryAdministrator getById(String id) { + public AdministratorMicrosoftEntra getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -90,7 +90,7 @@ public ActiveDirectoryAdministrator getById(String id) { return this.getWithResponse(resourceGroupName, serverName, objectId, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -147,7 +147,7 @@ public void deleteByIdWithResponse(String id, Context context) { this.delete(resourceGroupName, serverName, objectId, context); } - private AdministratorsClient serviceClient() { + private AdministratorsMicrosoftEntrasClient serviceClient() { return this.innerClient; } @@ -155,7 +155,7 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man return this.serviceManager; } - public ActiveDirectoryAdministratorImpl define(String name) { - return new ActiveDirectoryAdministratorImpl(name, this.manager()); + public AdministratorMicrosoftEntraImpl define(String name) { + return new AdministratorMicrosoftEntraImpl(name, this.manager()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java similarity index 71% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsClientImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java index 42a0bc8817f8..4a369110d748 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java @@ -26,19 +26,20 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LtrBackupOperationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrServerBackupOperationInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrServerBackupOperationList; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettingsList; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in LtrBackupOperationsClient. + * An instance of this class provides access to all the operations defined in AdvancedThreatProtectionSettingsClient. */ -public final class LtrBackupOperationsClientImpl implements LtrBackupOperationsClient { +public final class AdvancedThreatProtectionSettingsClientImpl implements AdvancedThreatProtectionSettingsClient { /** * The proxy service used to perform REST calls. */ - private final LtrBackupOperationsService service; + private final AdvancedThreatProtectionSettingsService service; /** * The service client containing this operation class. @@ -46,64 +47,66 @@ public final class LtrBackupOperationsClientImpl implements LtrBackupOperationsC private final PostgreSqlManagementClientImpl client; /** - * Initializes an instance of LtrBackupOperationsClientImpl. + * Initializes an instance of AdvancedThreatProtectionSettingsClientImpl. * * @param client the instance of the service client containing this operation class. */ - LtrBackupOperationsClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(LtrBackupOperationsService.class, client.getHttpPipeline(), + AdvancedThreatProtectionSettingsClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(AdvancedThreatProtectionSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for PostgreSqlManagementClientLtrBackupOperations to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for PostgreSqlManagementClientAdvancedThreatProtectionSettings to be used + * by the proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface LtrBackupOperationsService { + @ServiceInterface(name = "PostgreSqlManagementClientAdvancedThreatProtectionSettings") + public interface AdvancedThreatProtectionSettingsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations/{backupName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations/{backupName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( + Mono> listByServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -111,26 +114,25 @@ Mono> listByServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( + Response listByServerNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operation for the flexible server along with - * {@link Response} on successful completion of {@link Mono}. + * @return list of advanced threat protection settings for a server along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String backupName) { + private Mono> + listByServerSinglePageAsync(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -146,51 +148,46 @@ public Mono> getWithResponseAsync(String if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, accept, context)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operation for the flexible server on successful - * completion of {@link Mono}. + * @return list of advanced threat protection settings for a server as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - String backupName) { - return getWithResponseAsync(resourceGroupName, serverName, backupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByServerAsync(String resourceGroupName, + String serverName) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operation for the flexible server along with - * {@link Response}. + * @return list of advanced threat protection settings for a server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String backupName, Context context) { + private PagedResponse listByServerSinglePage(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -209,141 +206,165 @@ public Response getWithResponse(String resourceGr throw LOGGER.atError() .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (backupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, backupName, accept, context); + Response res + = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operation for the flexible server. + * @return list of advanced threat protection settings for a server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LtrServerBackupOperationInner get(String resourceGroupName, String serverName, String backupName) { - return getWithResponse(resourceGroupName, serverName, backupName, Context.NONE).getValue(); + private PagedResponse listByServerSinglePage(String resourceGroupName, + String serverName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operations for the flexible server along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of advanced threat protection settings for a server as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, 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())); + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePage(nextLink)); } /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operations for the flexible server as paginated - * response with {@link PagedFlux}. + * @return list of advanced threat protection settings for a server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePageAsync(nextLink)); + public PagedIterable listByServer(String resourceGroupName, + String serverName, Context context) { + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePage(nextLink, context)); } /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operations for the flexible server along with - * {@link PagedResponse}. + * @return state of advanced threat protection settings for a server along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, - String serverName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, ThreatProtectionName threatProtectionName) { if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (threatProtectionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter threatProtectionName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, threatProtectionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return state of advanced threat protection settings for a server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName) { + return getWithResponseAsync(resourceGroupName, serverName, threatProtectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets state of advanced threat protection settings for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operations for the flexible server along with - * {@link PagedResponse}. + * @return state of advanced threat protection settings for a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, - String serverName, Context context) { + public Response getWithResponse(String resourceGroupName, + String serverName, ThreatProtectionName threatProtectionName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -362,48 +383,30 @@ private PagedResponse listByServerSinglePage(Stri throw LOGGER.atError() .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } + if (threatProtectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter threatProtectionName is required and cannot be null.")); + } final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Gets the result of the give long term retention backup operations for the flexible server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operations for the flexible server as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePage(nextLink)); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, threatProtectionName, accept, context); } /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param context The context to associate with this operation. + * @param threatProtectionName Name of the advanced threat protection settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operations for the flexible server as paginated - * response with {@link PagedIterable}. + * @return state of advanced threat protection settings for a server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public AdvancedThreatProtectionSettingsModelInner get(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName) { + return getWithResponse(resourceGroupName, serverName, threatProtectionName, Context.NONE).getValue(); } /** @@ -413,11 +416,12 @@ public PagedIterable listByServer(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backup operations for server along with {@link PagedResponse} on successful + * @return list of advanced threat protection settings for a server along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync(String nextLink) { + private Mono> + listByServerNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -428,8 +432,9 @@ private Mono> listByServerNextSingl final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .>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())); } @@ -440,10 +445,10 @@ private Mono> listByServerNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 long term retention backup operations for server along with {@link PagedResponse}. + * @return list of advanced threat protection settings for a server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink) { + private PagedResponse listByServerNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -454,7 +459,7 @@ private PagedResponse listByServerNextSinglePage( "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -468,10 +473,11 @@ private PagedResponse listByServerNextSinglePage( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 long term retention backup operations for server along with {@link PagedResponse}. + * @return list of advanced threat protection settings for a server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { + private PagedResponse listByServerNextSinglePage(String nextLink, + Context context) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -482,11 +488,11 @@ private PagedResponse listByServerNextSinglePage( "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - private static final ClientLogger LOGGER = new ClientLogger(LtrBackupOperationsClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AdvancedThreatProtectionSettingsClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java new file mode 100644 index 000000000000..174ac265df78 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettings; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettingsModel; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; + +public final class AdvancedThreatProtectionSettingsImpl implements AdvancedThreatProtectionSettings { + private static final ClientLogger LOGGER = new ClientLogger(AdvancedThreatProtectionSettingsImpl.class); + + private final AdvancedThreatProtectionSettingsClient innerClient; + + private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; + + public AdvancedThreatProtectionSettingsImpl(AdvancedThreatProtectionSettingsClient innerClient, + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByServer(String resourceGroupName, + String serverName) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AdvancedThreatProtectionSettingsModelImpl(inner1, this.manager())); + } + + public PagedIterable listByServer(String resourceGroupName, + String serverName, Context context) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AdvancedThreatProtectionSettingsModelImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, serverName, threatProtectionName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AdvancedThreatProtectionSettingsModelImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AdvancedThreatProtectionSettingsModel get(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName) { + AdvancedThreatProtectionSettingsModelInner inner + = this.serviceClient().get(resourceGroupName, serverName, threatProtectionName); + if (inner != null) { + return new AdvancedThreatProtectionSettingsModelImpl(inner, this.manager()); + } else { + return null; + } + } + + private AdvancedThreatProtectionSettingsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsModelImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsModelImpl.java similarity index 66% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsModelImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsModelImpl.java index 19b713529fa1..9813c7ab40bd 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsModelImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsModelImpl.java @@ -6,15 +6,15 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerThreatProtectionSettingsModelInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettingsModel; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettingsModel; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState; import java.time.OffsetDateTime; -public final class ServerThreatProtectionSettingsModelImpl implements ServerThreatProtectionSettingsModel, - ServerThreatProtectionSettingsModel.Definition, ServerThreatProtectionSettingsModel.Update { - private ServerThreatProtectionSettingsModelInner innerObject; +public final class AdvancedThreatProtectionSettingsModelImpl implements AdvancedThreatProtectionSettingsModel, + AdvancedThreatProtectionSettingsModel.Definition, AdvancedThreatProtectionSettingsModel.Update { + private AdvancedThreatProtectionSettingsModelInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; @@ -46,7 +46,7 @@ public String resourceGroupName() { return resourceGroupName; } - public ServerThreatProtectionSettingsModelInner innerModel() { + public AdvancedThreatProtectionSettingsModelInner innerModel() { return this.innerObject; } @@ -60,53 +60,53 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man private ThreatProtectionName threatProtectionName; - public ServerThreatProtectionSettingsModelImpl withExistingFlexibleServer(String resourceGroupName, + public AdvancedThreatProtectionSettingsModelImpl withExistingFlexibleServer(String resourceGroupName, String serverName) { this.resourceGroupName = resourceGroupName; this.serverName = serverName; return this; } - public ServerThreatProtectionSettingsModel create() { + public AdvancedThreatProtectionSettingsModel create() { this.innerObject = serviceManager.serviceClient() .getServerThreatProtectionSettings() .createOrUpdate(resourceGroupName, serverName, threatProtectionName, this.innerModel(), Context.NONE); return this; } - public ServerThreatProtectionSettingsModel create(Context context) { + public AdvancedThreatProtectionSettingsModel create(Context context) { this.innerObject = serviceManager.serviceClient() .getServerThreatProtectionSettings() .createOrUpdate(resourceGroupName, serverName, threatProtectionName, this.innerModel(), context); return this; } - ServerThreatProtectionSettingsModelImpl(ThreatProtectionName name, + AdvancedThreatProtectionSettingsModelImpl(ThreatProtectionName name, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerObject = new ServerThreatProtectionSettingsModelInner(); + this.innerObject = new AdvancedThreatProtectionSettingsModelInner(); this.serviceManager = serviceManager; this.threatProtectionName = name; } - public ServerThreatProtectionSettingsModelImpl update() { + public AdvancedThreatProtectionSettingsModelImpl update() { return this; } - public ServerThreatProtectionSettingsModel apply() { + public AdvancedThreatProtectionSettingsModel apply() { this.innerObject = serviceManager.serviceClient() .getServerThreatProtectionSettings() .createOrUpdate(resourceGroupName, serverName, threatProtectionName, this.innerModel(), Context.NONE); return this; } - public ServerThreatProtectionSettingsModel apply(Context context) { + public AdvancedThreatProtectionSettingsModel apply(Context context) { this.innerObject = serviceManager.serviceClient() .getServerThreatProtectionSettings() .createOrUpdate(resourceGroupName, serverName, threatProtectionName, this.innerModel(), context); return this; } - ServerThreatProtectionSettingsModelImpl(ServerThreatProtectionSettingsModelInner innerObject, + AdvancedThreatProtectionSettingsModelImpl(AdvancedThreatProtectionSettingsModelInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -116,23 +116,7 @@ public ServerThreatProtectionSettingsModel apply(Context context) { ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "advancedThreatProtectionSettings")); } - public ServerThreatProtectionSettingsModel refresh() { - this.innerObject = serviceManager.serviceClient() - .getServerThreatProtectionSettings() - .getWithResponse(resourceGroupName, serverName, threatProtectionName, Context.NONE) - .getValue(); - return this; - } - - public ServerThreatProtectionSettingsModel refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getServerThreatProtectionSettings() - .getWithResponse(resourceGroupName, serverName, threatProtectionName, context) - .getValue(); - return this; - } - - public ServerThreatProtectionSettingsModelImpl withState(ThreatProtectionState state) { + public AdvancedThreatProtectionSettingsModelImpl withState(ThreatProtectionState state) { this.innerModel().withState(state); return this; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerBackupImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupAutomaticAndOnDemandImpl.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerBackupImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupAutomaticAndOnDemandImpl.java index 9390f52c7a32..4371cfeaffb3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerBackupImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupAutomaticAndOnDemandImpl.java @@ -5,17 +5,17 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Origin; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerBackup; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupAutomaticAndOnDemand; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; import java.time.OffsetDateTime; -public final class ServerBackupImpl implements ServerBackup { - private ServerBackupInner innerObject; +public final class BackupAutomaticAndOnDemandImpl implements BackupAutomaticAndOnDemand { + private BackupAutomaticAndOnDemandInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - ServerBackupImpl(ServerBackupInner innerObject, + BackupAutomaticAndOnDemandImpl(BackupAutomaticAndOnDemandInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -37,7 +37,7 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public Origin backupType() { + public BackupType backupType() { return this.innerModel().backupType(); } @@ -49,7 +49,7 @@ public String source() { return this.innerModel().source(); } - public ServerBackupInner innerModel() { + public BackupAutomaticAndOnDemandInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsClientImpl.java similarity index 82% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsClientImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsClientImpl.java index 7d0a6639365a..caedea6a7443 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsClientImpl.java @@ -32,21 +32,21 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerBackupListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupAutomaticAndOnDemandList; 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 BackupsClient. + * An instance of this class provides access to all the operations defined in BackupsAutomaticAndOnDemandsClient. */ -public final class BackupsClientImpl implements BackupsClient { +public final class BackupsAutomaticAndOnDemandsClientImpl implements BackupsAutomaticAndOnDemandsClient { /** * The proxy service used to perform REST calls. */ - private final BackupsService service; + private final BackupsAutomaticAndOnDemandsService service; /** * The service client containing this operation class. @@ -54,25 +54,26 @@ public final class BackupsClientImpl implements BackupsClient { private final PostgreSqlManagementClientImpl client; /** - * Initializes an instance of BackupsClientImpl. + * Initializes an instance of BackupsAutomaticAndOnDemandsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupsClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(BackupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + BackupsAutomaticAndOnDemandsClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(BackupsAutomaticAndOnDemandsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for PostgreSqlManagementClientBackups to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for PostgreSqlManagementClientBackupsAutomaticAndOnDemands to be used by + * the proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface BackupsService { + @ServiceInterface(name = "PostgreSqlManagementClientBackupsAutomaticAndOnDemands") + public interface BackupsAutomaticAndOnDemandsService { @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> create(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -81,7 +82,7 @@ Mono>> create(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response createSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -110,7 +111,7 @@ Response deleteSync(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); @@ -119,7 +120,7 @@ Mono> get(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); @@ -128,7 +129,7 @@ Response getSync(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -137,7 +138,7 @@ Mono> listByServer(@HostParam("$host") String e @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -146,7 +147,7 @@ Response listByServerSync(@HostParam("$host") String end @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( + Mono> listByServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -154,21 +155,21 @@ Mono> listByServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( + Response listByServerNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a backup along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createWithResponseAsync(String resourceGroupName, String serverName, @@ -199,15 +200,15 @@ public Mono>> createWithResponseAsync(String resourceG } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties along with {@link Response}. + * @return properties of a backup along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, String backupName) { @@ -239,16 +240,16 @@ private Response createWithResponse(String resourceGroupName, String } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties along with {@link Response}. + * @return properties of a backup along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, String backupName, @@ -281,119 +282,122 @@ private Response createWithResponse(String resourceGroupName, String } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 server backup properties. + * @return the {@link PollerFlux} for polling of properties of a backup. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ServerBackupInner> beginCreateAsync(String resourceGroupName, - String serverName, String backupName) { + public PollerFlux, BackupAutomaticAndOnDemandInner> + beginCreateAsync(String resourceGroupName, String serverName, String backupName) { Mono>> mono = createWithResponseAsync(resourceGroupName, serverName, backupName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ServerBackupInner.class, ServerBackupInner.class, this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), BackupAutomaticAndOnDemandInner.class, BackupAutomaticAndOnDemandInner.class, + this.client.getContext()); } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of server backup properties. + * @return the {@link SyncPoller} for polling of properties of a backup. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerBackupInner> beginCreate(String resourceGroupName, - String serverName, String backupName) { + public SyncPoller, BackupAutomaticAndOnDemandInner> + beginCreate(String resourceGroupName, String serverName, String backupName) { Response response = createWithResponse(resourceGroupName, serverName, backupName); - return this.client.getLroResult(response, ServerBackupInner.class, - ServerBackupInner.class, Context.NONE); + return this.client.getLroResult(response, + BackupAutomaticAndOnDemandInner.class, BackupAutomaticAndOnDemandInner.class, Context.NONE); } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of server backup properties. + * @return the {@link SyncPoller} for polling of properties of a backup. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerBackupInner> beginCreate(String resourceGroupName, - String serverName, String backupName, Context context) { + public SyncPoller, BackupAutomaticAndOnDemandInner> + beginCreate(String resourceGroupName, String serverName, String backupName, Context context) { Response response = createWithResponse(resourceGroupName, serverName, backupName, context); - return this.client.getLroResult(response, ServerBackupInner.class, - ServerBackupInner.class, context); + return this.client.getLroResult(response, + BackupAutomaticAndOnDemandInner.class, BackupAutomaticAndOnDemandInner.class, context); } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties on successful completion of {@link Mono}. + * @return properties of a backup on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync(String resourceGroupName, String serverName, String backupName) { + public Mono createAsync(String resourceGroupName, String serverName, + String backupName) { return beginCreateAsync(resourceGroupName, serverName, backupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties. + * @return properties of a backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerBackupInner create(String resourceGroupName, String serverName, String backupName) { + public BackupAutomaticAndOnDemandInner create(String resourceGroupName, String serverName, String backupName) { return beginCreate(resourceGroupName, serverName, backupName).getFinalResult(); } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties. + * @return properties of a backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerBackupInner create(String resourceGroupName, String serverName, String backupName, Context context) { + public BackupAutomaticAndOnDemandInner create(String resourceGroupName, String serverName, String backupName, + Context context) { return beginCreate(resourceGroupName, serverName, backupName, context).getFinalResult(); } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -428,11 +432,11 @@ public Mono>> deleteWithResponseAsync(String resourceG } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -468,11 +472,11 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -510,11 +514,11 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -529,11 +533,11 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -547,11 +551,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -566,11 +570,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -583,11 +587,11 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -598,11 +602,11 @@ public void delete(String resourceGroupName, String serverName, String backupNam } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -614,19 +618,20 @@ public void delete(String resourceGroupName, String serverName, String backupNam } /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific backup for a given server along with {@link Response} on successful completion of {@link Mono}. + * @return information of an on demand backup, given its name along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String backupName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String backupName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -653,37 +658,38 @@ public Mono> getWithResponseAsync(String resourceGro } /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific backup for a given server on successful completion of {@link Mono}. + * @return information of an on demand backup, given its name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String backupName) { + public Mono getAsync(String resourceGroupName, String serverName, + String backupName) { return getWithResponseAsync(resourceGroupName, serverName, backupName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific backup for a given server along with {@link Response}. + * @return information of an on demand backup, given its name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, String backupName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String backupName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -712,33 +718,33 @@ public Response getWithResponse(String resourceGroupName, Str } /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific backup for a given server. + * @return information of an on demand backup, given its name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerBackupInner get(String resourceGroupName, String serverName, String backupName) { + public BackupAutomaticAndOnDemandInner get(String resourceGroupName, String serverName, String backupName) { return getWithResponse(resourceGroupName, serverName, backupName, Context.NONE).getValue(); } /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 server backups along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of backups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, + private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -759,39 +765,40 @@ private Mono> listByServerSinglePageAsync(Strin return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .>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 backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 server backups as paginated response with {@link PagedFlux}. + * @return list of backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { + public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 server backups along with {@link PagedResponse}. + * @return list of backups along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { + private PagedResponse listByServerSinglePage(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -811,7 +818,7 @@ private PagedResponse listByServerSinglePage(String resourceG .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -819,7 +826,7 @@ private PagedResponse listByServerSinglePage(String resourceG } /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -827,11 +834,11 @@ private PagedResponse listByServerSinglePage(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 server backups along with {@link PagedResponse}. + * @return list of backups along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, - Context context) { + private PagedResponse listByServerSinglePage(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -851,7 +858,7 @@ private PagedResponse listByServerSinglePage(String resourceG .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -859,23 +866,23 @@ private PagedResponse listByServerSinglePage(String resourceG } /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 server backups as paginated response with {@link PagedIterable}. + * @return list of backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { + public PagedIterable listByServer(String resourceGroupName, String serverName) { return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), nextLink -> listByServerNextSinglePage(nextLink)); } /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -883,10 +890,11 @@ public PagedIterable listByServer(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server backups as paginated response with {@link PagedIterable}. + * @return list of backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePage(nextLink, context)); } @@ -898,10 +906,10 @@ public PagedIterable listByServer(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server backups along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of backups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync(String nextLink) { + private Mono> listByServerNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -912,8 +920,8 @@ private Mono> listByServerNextSinglePageAsync(S final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .>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())); } @@ -924,10 +932,10 @@ private Mono> listByServerNextSinglePageAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server backups along with {@link PagedResponse}. + * @return list of backups along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink) { + private PagedResponse listByServerNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -938,7 +946,7 @@ private PagedResponse listByServerNextSinglePage(String nextL "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -952,10 +960,11 @@ private PagedResponse listByServerNextSinglePage(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 server backups along with {@link PagedResponse}. + * @return list of backups along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { + private PagedResponse listByServerNextSinglePage(String nextLink, + Context context) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -966,11 +975,11 @@ private PagedResponse listByServerNextSinglePage(String nextL "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - private static final ClientLogger LOGGER = new ClientLogger(BackupsClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BackupsAutomaticAndOnDemandsClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsImpl.java new file mode 100644 index 000000000000..f9b38ae12f73 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsImpl.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupAutomaticAndOnDemand; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsAutomaticAndOnDemands; + +public final class BackupsAutomaticAndOnDemandsImpl implements BackupsAutomaticAndOnDemands { + private static final ClientLogger LOGGER = new ClientLogger(BackupsAutomaticAndOnDemandsImpl.class); + + private final BackupsAutomaticAndOnDemandsClient innerClient; + + private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; + + public BackupsAutomaticAndOnDemandsImpl(BackupsAutomaticAndOnDemandsClient innerClient, + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public BackupAutomaticAndOnDemand create(String resourceGroupName, String serverName, String backupName) { + BackupAutomaticAndOnDemandInner inner = this.serviceClient().create(resourceGroupName, serverName, backupName); + if (inner != null) { + return new BackupAutomaticAndOnDemandImpl(inner, this.manager()); + } else { + return null; + } + } + + public BackupAutomaticAndOnDemand create(String resourceGroupName, String serverName, String backupName, + Context context) { + BackupAutomaticAndOnDemandInner inner + = this.serviceClient().create(resourceGroupName, serverName, backupName, context); + if (inner != null) { + return new BackupAutomaticAndOnDemandImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String serverName, String backupName) { + this.serviceClient().delete(resourceGroupName, serverName, backupName); + } + + public void delete(String resourceGroupName, String serverName, String backupName, Context context) { + this.serviceClient().delete(resourceGroupName, serverName, backupName, context); + } + + public Response getWithResponse(String resourceGroupName, String serverName, + String backupName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, serverName, backupName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BackupAutomaticAndOnDemandImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BackupAutomaticAndOnDemand get(String resourceGroupName, String serverName, String backupName) { + BackupAutomaticAndOnDemandInner inner = this.serviceClient().get(resourceGroupName, serverName, backupName); + if (inner != null) { + return new BackupAutomaticAndOnDemandImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByServer(String resourceGroupName, String serverName) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new BackupAutomaticAndOnDemandImpl(inner1, this.manager())); + } + + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new BackupAutomaticAndOnDemandImpl(inner1, this.manager())); + } + + private BackupsAutomaticAndOnDemandsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsImpl.java deleted file mode 100644 index d5d3e8b22591..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsImpl.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Backups; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerBackup; - -public final class BackupsImpl implements Backups { - private static final ClientLogger LOGGER = new ClientLogger(BackupsImpl.class); - - private final BackupsClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public BackupsImpl(BackupsClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public ServerBackup create(String resourceGroupName, String serverName, String backupName) { - ServerBackupInner inner = this.serviceClient().create(resourceGroupName, serverName, backupName); - if (inner != null) { - return new ServerBackupImpl(inner, this.manager()); - } else { - return null; - } - } - - public ServerBackup create(String resourceGroupName, String serverName, String backupName, Context context) { - ServerBackupInner inner = this.serviceClient().create(resourceGroupName, serverName, backupName, context); - if (inner != null) { - return new ServerBackupImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String serverName, String backupName) { - this.serviceClient().delete(resourceGroupName, serverName, backupName); - } - - public void delete(String resourceGroupName, String serverName, String backupName, Context context) { - this.serviceClient().delete(resourceGroupName, serverName, backupName, context); - } - - public Response getWithResponse(String resourceGroupName, String serverName, String backupName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, serverName, backupName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ServerBackupImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ServerBackup get(String resourceGroupName, String serverName, String backupName) { - ServerBackupInner inner = this.serviceClient().get(resourceGroupName, serverName, backupName); - if (inner != null) { - return new ServerBackupImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listByServer(String resourceGroupName, String serverName) { - PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ServerBackupImpl(inner1, this.manager())); - } - - public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ServerBackupImpl(inner1, this.manager())); - } - - private BackupsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrServerBackupOperationImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionOperationImpl.java similarity index 84% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrServerBackupOperationImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionOperationImpl.java index 98fc756d0f7a..20ef8392797f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrServerBackupOperationImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionOperationImpl.java @@ -5,17 +5,17 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrServerBackupOperationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionOperationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionOperation; import com.azure.resourcemanager.postgresqlflexibleserver.models.ExecutionStatus; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrServerBackupOperation; import java.time.OffsetDateTime; -public final class LtrServerBackupOperationImpl implements LtrServerBackupOperation { - private LtrServerBackupOperationInner innerObject; +public final class BackupsLongTermRetentionOperationImpl implements BackupsLongTermRetentionOperation { + private BackupsLongTermRetentionOperationInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - LtrServerBackupOperationImpl(LtrServerBackupOperationInner innerObject, + BackupsLongTermRetentionOperationImpl(BackupsLongTermRetentionOperationInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -77,7 +77,7 @@ public String errorMessage() { return this.innerModel().errorMessage(); } - public LtrServerBackupOperationInner innerModel() { + public BackupsLongTermRetentionOperationInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupResponseImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionResponseImpl.java similarity index 82% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupResponseImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionResponseImpl.java index 41eb434947e8..758fa7f59f9c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupResponseImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionResponseImpl.java @@ -4,17 +4,17 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrBackupResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionResponse; import com.azure.resourcemanager.postgresqlflexibleserver.models.ExecutionStatus; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupResponse; import java.time.OffsetDateTime; -public final class LtrBackupResponseImpl implements LtrBackupResponse { - private LtrBackupResponseInner innerObject; +public final class BackupsLongTermRetentionResponseImpl implements BackupsLongTermRetentionResponse { + private BackupsLongTermRetentionResponseInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - LtrBackupResponseImpl(LtrBackupResponseInner innerObject, + BackupsLongTermRetentionResponseImpl(BackupsLongTermRetentionResponseInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -60,7 +60,7 @@ public String errorMessage() { return this.innerModel().errorMessage(); } - public LtrBackupResponseInner innerModel() { + public BackupsLongTermRetentionResponseInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsClientImpl.java new file mode 100644 index 000000000000..68f41477848b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsClientImpl.java @@ -0,0 +1,909 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionOperationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionRequest; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionsCheckPrerequisitesResponse; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrServerBackupOperationList; +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 BackupsLongTermRetentionsClient. + */ +public final class BackupsLongTermRetentionsClientImpl implements BackupsLongTermRetentionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final BackupsLongTermRetentionsService service; + + /** + * The service client containing this operation class. + */ + private final PostgreSqlManagementClientImpl client; + + /** + * Initializes an instance of BackupsLongTermRetentionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BackupsLongTermRetentionsClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(BackupsLongTermRetentionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PostgreSqlManagementClientBackupsLongTermRetentions to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PostgreSqlManagementClientBackupsLongTermRetentions") + public interface BackupsLongTermRetentionsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrPreBackup") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono checkPrerequisites( + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @BodyParam("application/json") LtrPreBackupRequest parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrPreBackup") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + BackupsLongTermRetentionsCheckPrerequisitesResponse checkPrerequisitesSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @BodyParam("application/json") LtrPreBackupRequest parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/startLtrBackup") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> start(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @BodyParam("application/json") BackupsLongTermRetentionRequest parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/startLtrBackup") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response startSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @BodyParam("application/json") BackupsLongTermRetentionRequest parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations/{backupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations/{backupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServer(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByServerSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServerNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByServerNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Performs all checks required for a long term retention backup operation to succeed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR pre-backup API call on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkPrerequisitesWithResponseAsync( + String resourceGroupName, String serverName, LtrPreBackupRequest parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.checkPrerequisites(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Performs all checks required for a long term retention backup operation to succeed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR pre-backup API call on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkPrerequisitesAsync(String resourceGroupName, String serverName, + LtrPreBackupRequest parameters) { + return checkPrerequisitesWithResponseAsync(resourceGroupName, serverName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Performs all checks required for a long term retention backup operation to succeed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR pre-backup API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupsLongTermRetentionsCheckPrerequisitesResponse checkPrerequisitesWithResponse(String resourceGroupName, + String serverName, LtrPreBackupRequest parameters, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return service.checkPrerequisitesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); + } + + /** + * Performs all checks required for a long term retention backup operation to succeed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR pre-backup API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LtrPreBackupResponseInner checkPrerequisites(String resourceGroupName, String serverName, + LtrPreBackupRequest parameters) { + return checkPrerequisitesWithResponse(resourceGroupName, serverName, parameters, Context.NONE).getValue(); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR backup API call along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> startWithResponseAsync(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR backup API call along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response startWithResponse(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, Context.NONE); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR backup API call along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response startWithResponse(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, BackupsLongTermRetentionResponseInner> + beginStartAsync(String resourceGroupName, String serverName, BackupsLongTermRetentionRequest parameters) { + Mono>> mono = startWithResponseAsync(resourceGroupName, serverName, parameters); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), BackupsLongTermRetentionResponseInner.class, + BackupsLongTermRetentionResponseInner.class, this.client.getContext()); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BackupsLongTermRetentionResponseInner> + beginStart(String resourceGroupName, String serverName, BackupsLongTermRetentionRequest parameters) { + Response response = startWithResponse(resourceGroupName, serverName, parameters); + return this.client.getLroResult( + response, BackupsLongTermRetentionResponseInner.class, BackupsLongTermRetentionResponseInner.class, + Context.NONE); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BackupsLongTermRetentionResponseInner> + beginStart(String resourceGroupName, String serverName, BackupsLongTermRetentionRequest parameters, + Context context) { + Response response = startWithResponse(resourceGroupName, serverName, parameters, context); + return this.client.getLroResult( + response, BackupsLongTermRetentionResponseInner.class, BackupsLongTermRetentionResponseInner.class, + context); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR backup API call on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono startAsync(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters) { + return beginStartAsync(resourceGroupName, serverName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupsLongTermRetentionResponseInner start(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters) { + return beginStart(resourceGroupName, serverName, parameters).getFinalResult(); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupsLongTermRetentionResponseInner start(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters, Context context) { + return beginStart(resourceGroupName, serverName, parameters, context).getFinalResult(); + } + + /** + * Gets the results of a long retention backup operation for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the results of a long retention backup operation for a server along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String backupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the results of a long retention backup operation for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the results of a long retention backup operation for a server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, + String backupName) { + return getWithResponseAsync(resourceGroupName, serverName, backupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the results of a long retention backup operation for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName The name of the backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the results of a long retention backup operation for a server along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, + String backupName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, backupName, accept, context); + } + + /** + * Gets the results of a long retention backup operation for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the results of a long retention backup operation for a server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupsLongTermRetentionOperationInner get(String resourceGroupName, String serverName, String backupName) { + return getWithResponse(resourceGroupName, serverName, backupName, Context.NONE).getValue(); + } + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 long term retention backup operations for server along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByServerSinglePageAsync(String resourceGroupName, String serverName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 long term retention backup operations for server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByServerAsync(String resourceGroupName, + String serverName) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePageAsync(nextLink)); + } + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 long term retention backup operations for server along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerSinglePage(String resourceGroupName, + String serverName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 long term retention backup operations for server along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerSinglePage(String resourceGroupName, + String serverName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 long term retention backup operations for server as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, + String serverName) { + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePage(nextLink)); + } + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 long term retention backup operations for server as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, + String serverName, Context context) { + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of long term retention backup operations for server along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByServerNextSinglePageAsync(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.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of long term retention backup operations for server along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of long term retention backup operations for server along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(BackupsLongTermRetentionsClientImpl.class); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsImpl.java new file mode 100644 index 000000000000..fd27af9d207d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsImpl.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionOperationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionOperation; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionRequest; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionResponse; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentions; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionsCheckPrerequisitesResponse; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupResponse; + +public final class BackupsLongTermRetentionsImpl implements BackupsLongTermRetentions { + private static final ClientLogger LOGGER = new ClientLogger(BackupsLongTermRetentionsImpl.class); + + private final BackupsLongTermRetentionsClient innerClient; + + private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; + + public BackupsLongTermRetentionsImpl(BackupsLongTermRetentionsClient innerClient, + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response checkPrerequisitesWithResponse(String resourceGroupName, String serverName, + LtrPreBackupRequest parameters, Context context) { + BackupsLongTermRetentionsCheckPrerequisitesResponse inner + = this.serviceClient().checkPrerequisitesWithResponse(resourceGroupName, serverName, parameters, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LtrPreBackupResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public LtrPreBackupResponse checkPrerequisites(String resourceGroupName, String serverName, + LtrPreBackupRequest parameters) { + LtrPreBackupResponseInner inner + = this.serviceClient().checkPrerequisites(resourceGroupName, serverName, parameters); + if (inner != null) { + return new LtrPreBackupResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public BackupsLongTermRetentionResponse start(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters) { + BackupsLongTermRetentionResponseInner inner + = this.serviceClient().start(resourceGroupName, serverName, parameters); + if (inner != null) { + return new BackupsLongTermRetentionResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public BackupsLongTermRetentionResponse start(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters, Context context) { + BackupsLongTermRetentionResponseInner inner + = this.serviceClient().start(resourceGroupName, serverName, parameters, context); + if (inner != null) { + return new BackupsLongTermRetentionResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse(String resourceGroupName, String serverName, + String backupName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, serverName, backupName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BackupsLongTermRetentionOperationImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BackupsLongTermRetentionOperation get(String resourceGroupName, String serverName, String backupName) { + BackupsLongTermRetentionOperationInner inner + = this.serviceClient().get(resourceGroupName, serverName, backupName); + if (inner != null) { + return new BackupsLongTermRetentionOperationImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByServer(String resourceGroupName, String serverName) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new BackupsLongTermRetentionOperationImpl(inner1, this.manager())); + } + + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new BackupsLongTermRetentionOperationImpl(inner1, this.manager())); + } + + private BackupsLongTermRetentionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsClientImpl.java similarity index 68% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsClientImpl.java index f4c16136b890..6b5f3f1a4270 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsClientImpl.java @@ -26,19 +26,19 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LocationBasedCapabilitiesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilitiesListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByLocationsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityList; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in LocationBasedCapabilitiesClient. + * An instance of this class provides access to all the operations defined in CapabilitiesByLocationsClient. */ -public final class LocationBasedCapabilitiesClientImpl implements LocationBasedCapabilitiesClient { +public final class CapabilitiesByLocationsClientImpl implements CapabilitiesByLocationsClient { /** * The proxy service used to perform REST calls. */ - private final LocationBasedCapabilitiesService service; + private final CapabilitiesByLocationsService service; /** * The service client containing this operation class. @@ -46,28 +46,28 @@ public final class LocationBasedCapabilitiesClientImpl implements LocationBasedC private final PostgreSqlManagementClientImpl client; /** - * Initializes an instance of LocationBasedCapabilitiesClientImpl. + * Initializes an instance of CapabilitiesByLocationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - LocationBasedCapabilitiesClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(LocationBasedCapabilitiesService.class, client.getHttpPipeline(), + CapabilitiesByLocationsClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(CapabilitiesByLocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for PostgreSqlManagementClientLocationBasedCapabilities to be used by the + * The interface defining all the services for PostgreSqlManagementClientCapabilitiesByLocations to be used by the * proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface LocationBasedCapabilitiesService { + @ServiceInterface(name = "PostgreSqlManagementClientCapabilitiesByLocations") + public interface CapabilitiesByLocationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/capabilities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> execute(@HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); @@ -75,7 +75,7 @@ Mono> execute(@HostParam("$host") String endpoi @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/capabilities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response executeSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); @@ -83,30 +83,29 @@ Response executeSync(@HostParam("$host") String endpoint @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> executeNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response executeNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities at specified location in a given subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> executeSinglePageAsync(String locationName) { + private Mono> listSinglePageAsync(String locationName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -120,39 +119,40 @@ private Mono> executeSinglePageAsyn } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.execute(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .>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 capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities at specified location in a given subscription as paginated response with {@link PagedFlux}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux executeAsync(String locationName) { - return new PagedFlux<>(() -> executeSinglePageAsync(locationName), - nextLink -> executeNextSinglePageAsync(nextLink)); + public PagedFlux listAsync(String locationName) { + return new PagedFlux<>(() -> listSinglePageAsync(locationName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities at specified location in a given subscription along with {@link PagedResponse}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse executeSinglePage(String locationName) { + private PagedResponse listSinglePage(String locationName) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -168,24 +168,25 @@ private PagedResponse executeSinglePage(String lo .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.executeSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities at specified location in a given subscription along with {@link PagedResponse}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse executeSinglePage(String locationName, Context context) { + private PagedResponse listSinglePage(String locationName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -201,42 +202,42 @@ private PagedResponse executeSinglePage(String lo .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.executeSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, accept, context); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities at specified location in a given subscription as paginated response with + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable execute(String locationName) { - return new PagedIterable<>(() -> executeSinglePage(locationName), nextLink -> executeNextSinglePage(nextLink)); + public PagedIterable list(String locationName) { + return new PagedIterable<>(() -> listSinglePage(locationName), nextLink -> listNextSinglePage(nextLink)); } /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities at specified location in a given subscription as paginated response with + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable execute(String locationName, Context context) { - return new PagedIterable<>(() -> executeSinglePage(locationName, context), - nextLink -> executeNextSinglePage(nextLink, context)); + public PagedIterable list(String locationName, Context context) { + return new PagedIterable<>(() -> listSinglePage(locationName, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -246,11 +247,11 @@ public PagedIterable execute(String locationName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capability for the PostgreSQL server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> executeNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -259,10 +260,9 @@ private Mono> executeNextSinglePage new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.executeNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -273,10 +273,11 @@ private Mono> executeNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capability for the PostgreSQL server along with {@link PagedResponse}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse executeNextSinglePage(String nextLink) { + private PagedResponse listNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -287,8 +288,7 @@ private PagedResponse executeNextSinglePage(Strin "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.executeNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -301,10 +301,11 @@ private PagedResponse executeNextSinglePage(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capability for the PostgreSQL server along with {@link PagedResponse}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse executeNextSinglePage(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -315,11 +316,10 @@ private PagedResponse executeNextSinglePage(Strin "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.executeNextSync(nextLink, this.client.getEndpoint(), accept, context); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - private static final ClientLogger LOGGER = new ClientLogger(LocationBasedCapabilitiesClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(CapabilitiesByLocationsClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsImpl.java similarity index 60% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsImpl.java index 9112ad94efdb..3df41838a13e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsImpl.java @@ -7,35 +7,35 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LogFilesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LogFileInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogFile; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogFiles; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByLocationsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilitiesByLocations; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Capability; -public final class LogFilesImpl implements LogFiles { - private static final ClientLogger LOGGER = new ClientLogger(LogFilesImpl.class); +public final class CapabilitiesByLocationsImpl implements CapabilitiesByLocations { + private static final ClientLogger LOGGER = new ClientLogger(CapabilitiesByLocationsImpl.class); - private final LogFilesClient innerClient; + private final CapabilitiesByLocationsClient innerClient; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - public LogFilesImpl(LogFilesClient innerClient, + public CapabilitiesByLocationsImpl(CapabilitiesByLocationsClient innerClient, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable listByServer(String resourceGroupName, String serverName) { - PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LogFileImpl(inner1, this.manager())); + public PagedIterable list(String locationName) { + PagedIterable inner = this.serviceClient().list(locationName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager())); } - public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { - PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LogFileImpl(inner1, this.manager())); + public PagedIterable list(String locationName, Context context) { + PagedIterable inner = this.serviceClient().list(locationName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager())); } - private LogFilesClient serviceClient() { + private CapabilitiesByLocationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersClientImpl.java similarity index 75% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesClientImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersClientImpl.java index 79333b434ea9..0e5181f21366 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersClientImpl.java @@ -26,19 +26,19 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerCapabilitiesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilitiesListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByServersClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityList; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in ServerCapabilitiesClient. + * An instance of this class provides access to all the operations defined in CapabilitiesByServersClient. */ -public final class ServerCapabilitiesClientImpl implements ServerCapabilitiesClient { +public final class CapabilitiesByServersClientImpl implements CapabilitiesByServersClient { /** * The proxy service used to perform REST calls. */ - private final ServerCapabilitiesService service; + private final CapabilitiesByServersService service; /** * The service client containing this operation class. @@ -46,28 +46,28 @@ public final class ServerCapabilitiesClientImpl implements ServerCapabilitiesCli private final PostgreSqlManagementClientImpl client; /** - * Initializes an instance of ServerCapabilitiesClientImpl. + * Initializes an instance of CapabilitiesByServersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ServerCapabilitiesClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(ServerCapabilitiesService.class, client.getHttpPipeline(), + CapabilitiesByServersClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(CapabilitiesByServersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for PostgreSqlManagementClientServerCapabilities to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for PostgreSqlManagementClientCapabilitiesByServers to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface ServerCapabilitiesService { + @ServiceInterface(name = "PostgreSqlManagementClientCapabilitiesByServers") + public interface CapabilitiesByServersService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/capabilities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -76,7 +76,7 @@ Mono> list(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/capabilities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -85,31 +85,30 @@ Response listSync(@HostParam("$host") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities for a flexible server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String serverName) { + private Mono> listSinglePageAsync(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -129,39 +128,41 @@ private Mono> listSinglePageAsync(S return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .>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 capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities for a flexible server as paginated response with {@link PagedFlux}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String serverName) { + public PagedFlux listAsync(String resourceGroupName, String serverName) { return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, serverName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities for a flexible server along with {@link PagedResponse}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String serverName) { + private PagedResponse listSinglePage(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -181,14 +182,14 @@ private PagedResponse listSinglePage(String resou .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -196,10 +197,11 @@ private PagedResponse listSinglePage(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities for a flexible server along with {@link PagedResponse}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String serverName, + private PagedResponse listSinglePage(String resourceGroupName, String serverName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -220,30 +222,31 @@ private PagedResponse listSinglePage(String resou .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities for a flexible server as paginated response with {@link PagedIterable}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String serverName) { + public PagedIterable list(String resourceGroupName, String serverName) { return new PagedIterable<>(() -> listSinglePage(resourceGroupName, serverName), nextLink -> listNextSinglePage(nextLink)); } /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -251,11 +254,11 @@ public PagedIterable list(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities for a flexible server as paginated response with {@link PagedIterable}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String serverName, - Context context) { + public PagedIterable list(String resourceGroupName, String serverName, Context context) { return new PagedIterable<>(() -> listSinglePage(resourceGroupName, serverName, context), nextLink -> listNextSinglePage(nextLink, context)); } @@ -267,11 +270,11 @@ public PagedIterable list(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capability for the PostgreSQL server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -281,8 +284,8 @@ private Mono> listNextSinglePageAsy } 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)) + .>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())); } @@ -293,10 +296,11 @@ private Mono> listNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capability for the PostgreSQL server along with {@link PagedResponse}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { + private PagedResponse listNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -307,8 +311,7 @@ private PagedResponse listNextSinglePage(String n "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -321,10 +324,11 @@ private PagedResponse listNextSinglePage(String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capability for the PostgreSQL server along with {@link PagedResponse}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -335,11 +339,10 @@ private PagedResponse listNextSinglePage(String n "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - private static final ClientLogger LOGGER = new ClientLogger(ServerCapabilitiesClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(CapabilitiesByServersClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersImpl.java similarity index 57% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersImpl.java index 84cbacf72601..b01d2eabfe05 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersImpl.java @@ -7,35 +7,35 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LocationBasedCapabilitiesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LocationBasedCapabilities; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByServersClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilitiesByServers; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Capability; -public final class LocationBasedCapabilitiesImpl implements LocationBasedCapabilities { - private static final ClientLogger LOGGER = new ClientLogger(LocationBasedCapabilitiesImpl.class); +public final class CapabilitiesByServersImpl implements CapabilitiesByServers { + private static final ClientLogger LOGGER = new ClientLogger(CapabilitiesByServersImpl.class); - private final LocationBasedCapabilitiesClient innerClient; + private final CapabilitiesByServersClient innerClient; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - public LocationBasedCapabilitiesImpl(LocationBasedCapabilitiesClient innerClient, + public CapabilitiesByServersImpl(CapabilitiesByServersClient innerClient, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable execute(String locationName) { - PagedIterable inner = this.serviceClient().execute(locationName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FlexibleServerCapabilityImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String serverName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager())); } - public PagedIterable execute(String locationName, Context context) { - PagedIterable inner = this.serviceClient().execute(locationName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FlexibleServerCapabilityImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String serverName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, serverName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager())); } - private LocationBasedCapabilitiesClient serviceClient() { + private CapabilitiesByServersClient serviceClient() { return this.innerClient; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServerCapabilityImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilityImpl.java similarity index 74% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServerCapabilityImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilityImpl.java index 16dbb57ae0e8..055625dff382 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServerCapabilityImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilityImpl.java @@ -4,29 +4,29 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Capability; import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityStatus; import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningEditionCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerEditionCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.GeoBackupSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OnlineResizeSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RestrictedEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackupSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LocationRestricted; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OnlineStorageResizeSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerEditionCapability; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersionCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrowthSupportedEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrowthSupport; import com.azure.resourcemanager.postgresqlflexibleserver.models.SupportedFeature; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHaAndGeoBackupSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHaSupportedEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHighAvailabilitySupport; import java.util.Collections; import java.util.List; -public final class FlexibleServerCapabilityImpl implements FlexibleServerCapability { - private FlexibleServerCapabilityInner innerObject; +public final class CapabilityImpl implements Capability { + private CapabilityInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - FlexibleServerCapabilityImpl(FlexibleServerCapabilityInner innerObject, + CapabilityImpl(CapabilityInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -44,8 +44,8 @@ public String name() { return this.innerModel().name(); } - public List supportedServerEditions() { - List inner = this.innerModel().supportedServerEditions(); + public List supportedServerEditions() { + List inner = this.innerModel().supportedServerEditions(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -71,7 +71,7 @@ public List supportedFeatures() { } } - public FastProvisioningSupportedEnum fastProvisioningSupported() { + public FastProvisioningSupport fastProvisioningSupported() { return this.innerModel().fastProvisioningSupported(); } @@ -84,31 +84,31 @@ public List supportedFastProvisioningEditions } } - public GeoBackupSupportedEnum geoBackupSupported() { + public GeographicallyRedundantBackupSupport geoBackupSupported() { return this.innerModel().geoBackupSupported(); } - public ZoneRedundantHaSupportedEnum zoneRedundantHaSupported() { + public ZoneRedundantHighAvailabilitySupport zoneRedundantHaSupported() { return this.innerModel().zoneRedundantHaSupported(); } - public ZoneRedundantHaAndGeoBackupSupportedEnum zoneRedundantHaAndGeoBackupSupported() { + public ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport zoneRedundantHaAndGeoBackupSupported() { return this.innerModel().zoneRedundantHaAndGeoBackupSupported(); } - public StorageAutoGrowthSupportedEnum storageAutoGrowthSupported() { + public StorageAutoGrowthSupport storageAutoGrowthSupported() { return this.innerModel().storageAutoGrowthSupported(); } - public OnlineResizeSupportedEnum onlineResizeSupported() { + public OnlineStorageResizeSupport onlineResizeSupported() { return this.innerModel().onlineResizeSupported(); } - public RestrictedEnum restricted() { + public LocationRestricted restricted() { return this.innerModel().restricted(); } - public FlexibleServerCapabilityInner innerModel() { + public CapabilityInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFileImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogImpl.java similarity index 87% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFileImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogImpl.java index 2d19fdc0fa47..a4eb8e823b27 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFileImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogImpl.java @@ -5,16 +5,16 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LogFileInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogFile; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapturedLog; import java.time.OffsetDateTime; -public final class LogFileImpl implements LogFile { - private LogFileInner innerObject; +public final class CapturedLogImpl implements CapturedLog { + private CapturedLogInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - LogFileImpl(LogFileInner innerObject, + CapturedLogImpl(CapturedLogInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -56,7 +56,7 @@ public String url() { return this.innerModel().url(); } - public LogFileInner innerModel() { + public CapturedLogInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsClientImpl.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesClientImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsClientImpl.java index 19862148b48c..54399c7c3e64 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsClientImpl.java @@ -26,19 +26,19 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LogFilesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LogFileInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogFileListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapturedLogsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapturedLogList; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in LogFilesClient. + * An instance of this class provides access to all the operations defined in CapturedLogsClient. */ -public final class LogFilesClientImpl implements LogFilesClient { +public final class CapturedLogsClientImpl implements CapturedLogsClient { /** * The proxy service used to perform REST calls. */ - private final LogFilesService service; + private final CapturedLogsService service; /** * The service client containing this operation class. @@ -46,27 +46,28 @@ public final class LogFilesClientImpl implements LogFilesClient { private final PostgreSqlManagementClientImpl client; /** - * Initializes an instance of LogFilesClientImpl. + * Initializes an instance of CapturedLogsClientImpl. * * @param client the instance of the service client containing this operation class. */ - LogFilesClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(LogFilesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + CapturedLogsClientImpl(PostgreSqlManagementClientImpl client) { + this.service + = RestProxy.create(CapturedLogsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for PostgreSqlManagementClientLogFiles to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for PostgreSqlManagementClientCapturedLogs to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface LogFilesService { + @ServiceInterface(name = "PostgreSqlManagementClientCapturedLogs") + public interface CapturedLogsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/logFiles") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -75,7 +76,7 @@ Mono> listByServer(@HostParam("$host") String endpoi @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/logFiles") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -84,30 +85,30 @@ Response listByServerSync(@HostParam("$host") String endpoint @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Mono> listByServerNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 logFiles along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of log files along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -127,39 +128,39 @@ private Mono> listByServerSinglePageAsync(String res return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + .>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 server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 logFiles as paginated response with {@link PagedFlux}. + * @return list of log files as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { + public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 logFiles along with {@link PagedResponse}. + * @return list of log files along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -179,15 +180,14 @@ private PagedResponse listByServerSinglePage(String resourceGroupN .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -195,10 +195,10 @@ private PagedResponse listByServerSinglePage(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of logFiles along with {@link PagedResponse}. + * @return list of log files along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -219,31 +219,30 @@ private PagedResponse listByServerSinglePage(String resourceGroupN .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 logFiles as paginated response with {@link PagedIterable}. + * @return list of log files as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { + public PagedIterable listByServer(String resourceGroupName, String serverName) { return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), nextLink -> listByServerNextSinglePage(nextLink)); } /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -251,10 +250,10 @@ public PagedIterable listByServer(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of logFiles as paginated response with {@link PagedIterable}. + * @return list of log files as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePage(nextLink, context)); } @@ -266,10 +265,10 @@ public PagedIterable listByServer(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of logFiles along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of log files along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync(String nextLink) { + private Mono> listByServerNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -280,7 +279,7 @@ private Mono> listByServerNextSinglePageAsync(String final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + .>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())); } @@ -292,10 +291,10 @@ private Mono> listByServerNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of logFiles along with {@link PagedResponse}. + * @return list of log files along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink) { + private PagedResponse listByServerNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -306,7 +305,7 @@ private PagedResponse listByServerNextSinglePage(String nextLink) "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -320,10 +319,10 @@ private PagedResponse listByServerNextSinglePage(String nextLink) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of logFiles along with {@link PagedResponse}. + * @return list of log files along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { + private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -334,11 +333,11 @@ private PagedResponse listByServerNextSinglePage(String nextLink, "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - private static final ClientLogger LOGGER = new ClientLogger(LogFilesClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(CapturedLogsClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsImpl.java similarity index 56% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsImpl.java index 5695d86fc458..70236c20287d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsImpl.java @@ -7,36 +7,36 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerCapabilitiesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerCapabilities; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapturedLogsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapturedLog; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapturedLogs; -public final class ServerCapabilitiesImpl implements ServerCapabilities { - private static final ClientLogger LOGGER = new ClientLogger(ServerCapabilitiesImpl.class); +public final class CapturedLogsImpl implements CapturedLogs { + private static final ClientLogger LOGGER = new ClientLogger(CapturedLogsImpl.class); - private final ServerCapabilitiesClient innerClient; + private final CapturedLogsClient innerClient; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - public ServerCapabilitiesImpl(ServerCapabilitiesClient innerClient, + public CapturedLogsImpl(CapturedLogsClient innerClient, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String serverName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FlexibleServerCapabilityImpl(inner1, this.manager())); + public PagedIterable listByServer(String resourceGroupName, String serverName) { + PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapturedLogImpl(inner1, this.manager())); } - public PagedIterable list(String resourceGroupName, String serverName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FlexibleServerCapabilityImpl(inner1, this.manager())); + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapturedLogImpl(inner1, this.manager())); } - private ServerCapabilitiesClient serviceClient() { + private CapturedLogsClient serviceClient() { return this.innerClient; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java deleted file mode 100644 index 35de40384bc5..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.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.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CheckNameAvailabilitiesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in CheckNameAvailabilitiesClient. - */ -public final class CheckNameAvailabilitiesClientImpl implements CheckNameAvailabilitiesClient { - /** - * The proxy service used to perform REST calls. - */ - private final CheckNameAvailabilitiesService service; - - /** - * The service client containing this operation class. - */ - private final PostgreSqlManagementClientImpl client; - - /** - * Initializes an instance of CheckNameAvailabilitiesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - CheckNameAvailabilitiesClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(CheckNameAvailabilitiesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PostgreSqlManagementClientCheckNameAvailabilities to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface CheckNameAvailabilitiesService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> execute(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") CheckNameAvailabilityRequest nameAvailabilityRequest, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response executeSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") CheckNameAvailabilityRequest nameAvailabilityRequest, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - executeWithResponseAsync(CheckNameAvailabilityRequest nameAvailabilityRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (nameAvailabilityRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null.")); - } else { - nameAvailabilityRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.execute(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), nameAvailabilityRequest, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono executeAsync(CheckNameAvailabilityRequest nameAvailabilityRequest) { - return executeWithResponseAsync(nameAvailabilityRequest).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response executeWithResponse(CheckNameAvailabilityRequest nameAvailabilityRequest, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (nameAvailabilityRequest == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null.")); - } else { - nameAvailabilityRequest.validate(); - } - final String accept = "application/json"; - return service.executeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), nameAvailabilityRequest, accept, context); - } - - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NameAvailabilityInner execute(CheckNameAvailabilityRequest nameAvailabilityRequest) { - return executeWithResponse(nameAvailabilityRequest, Context.NONE).getValue(); - } - - private static final ClientLogger LOGGER = new ClientLogger(CheckNameAvailabilitiesClientImpl.class); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java deleted file mode 100644 index f2687b661f16..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CheckNameAvailabilitiesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilities; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailability; - -public final class CheckNameAvailabilitiesImpl implements CheckNameAvailabilities { - private static final ClientLogger LOGGER = new ClientLogger(CheckNameAvailabilitiesImpl.class); - - private final CheckNameAvailabilitiesClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public CheckNameAvailabilitiesImpl(CheckNameAvailabilitiesClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response executeWithResponse(CheckNameAvailabilityRequest nameAvailabilityRequest, - Context context) { - Response inner - = this.serviceClient().executeWithResponse(nameAvailabilityRequest, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NameAvailabilityImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public NameAvailability execute(CheckNameAvailabilityRequest nameAvailabilityRequest) { - NameAvailabilityInner inner = this.serviceClient().execute(nameAvailabilityRequest); - if (inner != null) { - return new NameAvailabilityImpl(inner, this.manager()); - } else { - return null; - } - } - - private CheckNameAvailabilitiesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsClientImpl.java deleted file mode 100644 index da5dd38d0384..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsClientImpl.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.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.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CheckNameAvailabilityWithLocationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in CheckNameAvailabilityWithLocationsClient. - */ -public final class CheckNameAvailabilityWithLocationsClientImpl implements CheckNameAvailabilityWithLocationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final CheckNameAvailabilityWithLocationsService service; - - /** - * The service client containing this operation class. - */ - private final PostgreSqlManagementClientImpl client; - - /** - * Initializes an instance of CheckNameAvailabilityWithLocationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - CheckNameAvailabilityWithLocationsClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(CheckNameAvailabilityWithLocationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PostgreSqlManagementClientCheckNameAvailabilityWithLocations to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface CheckNameAvailabilityWithLocationsService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> execute(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, - @BodyParam("application/json") CheckNameAvailabilityRequest nameAvailabilityRequest, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response executeSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, - @BodyParam("application/json") CheckNameAvailabilityRequest nameAvailabilityRequest, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> executeWithResponseAsync(String locationName, - CheckNameAvailabilityRequest nameAvailabilityRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (nameAvailabilityRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null.")); - } else { - nameAvailabilityRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.execute(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, nameAvailabilityRequest, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono executeAsync(String locationName, - CheckNameAvailabilityRequest nameAvailabilityRequest) { - return executeWithResponseAsync(locationName, nameAvailabilityRequest) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response executeWithResponse(String locationName, - CheckNameAvailabilityRequest nameAvailabilityRequest, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (locationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (nameAvailabilityRequest == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null.")); - } else { - nameAvailabilityRequest.validate(); - } - final String accept = "application/json"; - return service.executeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, nameAvailabilityRequest, accept, context); - } - - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NameAvailabilityInner execute(String locationName, CheckNameAvailabilityRequest nameAvailabilityRequest) { - return executeWithResponse(locationName, nameAvailabilityRequest, Context.NONE).getValue(); - } - - private static final ClientLogger LOGGER = new ClientLogger(CheckNameAvailabilityWithLocationsClientImpl.class); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsImpl.java deleted file mode 100644 index 5ef22f95fa7e..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CheckNameAvailabilityWithLocationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityWithLocations; -import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailability; - -public final class CheckNameAvailabilityWithLocationsImpl implements CheckNameAvailabilityWithLocations { - private static final ClientLogger LOGGER = new ClientLogger(CheckNameAvailabilityWithLocationsImpl.class); - - private final CheckNameAvailabilityWithLocationsClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public CheckNameAvailabilityWithLocationsImpl(CheckNameAvailabilityWithLocationsClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response executeWithResponse(String locationName, - CheckNameAvailabilityRequest nameAvailabilityRequest, Context context) { - Response inner - = this.serviceClient().executeWithResponse(locationName, nameAvailabilityRequest, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NameAvailabilityImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public NameAvailability execute(String locationName, CheckNameAvailabilityRequest nameAvailabilityRequest) { - NameAvailabilityInner inner = this.serviceClient().execute(locationName, nameAvailabilityRequest); - if (inner != null) { - return new NameAvailabilityImpl(inner, this.manager()); - } else { - return null; - } - } - - private CheckNameAvailabilityWithLocationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationImpl.java index eff6375328f5..7ca67bf684e8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationImpl.java @@ -94,6 +94,8 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man private String configurationName; + private ConfigurationForUpdate createParameters; + private ConfigurationForUpdate updateParameters; public ConfigurationImpl withExistingFlexibleServer(String resourceGroupName, String serverName) { @@ -105,14 +107,14 @@ public ConfigurationImpl withExistingFlexibleServer(String resourceGroupName, St public Configuration create() { this.innerObject = serviceManager.serviceClient() .getConfigurations() - .put(resourceGroupName, serverName, configurationName, this.innerModel(), Context.NONE); + .put(resourceGroupName, serverName, configurationName, createParameters, Context.NONE); return this; } public Configuration create(Context context) { this.innerObject = serviceManager.serviceClient() .getConfigurations() - .put(resourceGroupName, serverName, configurationName, this.innerModel(), context); + .put(resourceGroupName, serverName, configurationName, createParameters, context); return this; } @@ -121,6 +123,7 @@ public Configuration create(Context context) { this.innerObject = new ConfigurationInner(); this.serviceManager = serviceManager; this.configurationName = name; + this.createParameters = new ConfigurationForUpdate(); } public ConfigurationImpl update() { @@ -169,7 +172,7 @@ public Configuration refresh(Context context) { public ConfigurationImpl withValue(String value) { if (isInCreateMode()) { - this.innerModel().withValue(value); + this.createParameters.withValue(value); return this; } else { this.updateParameters.withValue(value); @@ -179,7 +182,7 @@ public ConfigurationImpl withValue(String value) { public ConfigurationImpl withSource(String source) { if (isInCreateMode()) { - this.innerModel().withSource(source); + this.createParameters.withSource(source); return this; } else { this.updateParameters.withSource(source); @@ -188,6 +191,6 @@ public ConfigurationImpl withSource(String source) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsClientImpl.java index 903a782d48df..54b4a8797c90 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsClientImpl.java @@ -36,7 +36,7 @@ import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationForUpdate; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -71,13 +71,13 @@ public final class ConfigurationsClientImpl implements ConfigurationsClient { * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientConfigurations") public interface ConfigurationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -86,7 +86,7 @@ Mono> listByServer(@HostParam("$host") String @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -113,7 +113,7 @@ Response getSync(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -124,7 +124,7 @@ Mono>> update(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response updateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -135,31 +135,31 @@ Response updateSync(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> put(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("configurationName") String configurationName, - @BodyParam("application/json") ConfigurationInner parameters, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConfigurationForUpdate parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response putSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("configurationName") String configurationName, - @BodyParam("application/json") ConfigurationInner parameters, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConfigurationForUpdate parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( + Mono> listByServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -167,21 +167,20 @@ Mono> listByServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 server configurations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of configurations (also known as server parameters) along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, @@ -211,14 +210,14 @@ private Mono> listByServerSinglePageAsync(Stri } /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 server configurations as paginated response with {@link PagedFlux}. + * @return list of configurations (also known as server parameters) as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -227,14 +226,14 @@ public PagedFlux listByServerAsync(String resourceGroupName, } /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 server configurations along with {@link PagedResponse}. + * @return list of configurations (also known as server parameters) along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { @@ -257,7 +256,7 @@ private PagedResponse listByServerSinglePage(String resource .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -265,7 +264,7 @@ private PagedResponse listByServerSinglePage(String resource } /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -273,7 +272,7 @@ private PagedResponse listByServerSinglePage(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server configurations along with {@link PagedResponse}. + * @return list of configurations (also known as server parameters) along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, @@ -297,7 +296,7 @@ private PagedResponse listByServerSinglePage(String resource .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -305,14 +304,15 @@ private PagedResponse listByServerSinglePage(String resource } /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 server configurations as paginated response with {@link PagedIterable}. + * @return list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -321,7 +321,7 @@ public PagedIterable listByServer(String resourceGroupName, } /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -329,7 +329,8 @@ public PagedIterable listByServer(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server configurations as paginated response with {@link PagedIterable}. + * @return list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName, @@ -339,16 +340,16 @@ public PagedIterable listByServer(String resourceGroupName, } /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server 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 information about a configuration of server along with {@link Response} on successful completion of - * {@link Mono}. + * @return information about a specific configuration (also known as server parameter) of a server along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(String resourceGroupName, String serverName, @@ -380,15 +381,16 @@ public Mono> getWithResponseAsync(String resourceGr } /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server 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 information about a configuration of server on successful completion of {@link Mono}. + * @return information about a specific configuration (also known as server parameter) of a server on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAsync(String resourceGroupName, String serverName, String configurationName) { @@ -397,16 +399,17 @@ public Mono getAsync(String resourceGroupName, String server } /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server 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 information about a configuration of server along with {@link Response}. + * @return information about a specific configuration (also known as server parameter) of a server along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String serverName, @@ -439,15 +442,15 @@ public Response getWithResponse(String resourceGroupName, St } /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server 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 information about a configuration of server. + * @return information about a specific configuration (also known as server parameter) of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) public ConfigurationInner get(String resourceGroupName, String serverName, String configurationName) { @@ -455,16 +458,18 @@ public ConfigurationInner get(String resourceGroupName, String serverName, Strin } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server 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 represents a Configuration along with {@link Response} on successful completion of {@link Mono}. + * @return configuration (also known as server parameter) along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, @@ -502,16 +507,17 @@ public Mono>> updateWithResponseAsync(String resourceG } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server 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 represents a Configuration along with {@link Response}. + * @return configuration (also known as server parameter) along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, @@ -551,17 +557,18 @@ private Response updateWithResponse(String resourceGroupName, String } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server 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 represents a Configuration along with {@link Response}. + * @return configuration (also known as server parameter) along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, @@ -601,16 +608,17 @@ private Response updateWithResponse(String resourceGroupName, String } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of represents a Configuration. + * @return the {@link PollerFlux} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ConfigurationInner> beginUpdateAsync(String resourceGroupName, @@ -622,16 +630,17 @@ public PollerFlux, ConfigurationInner> beginUpdat } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a Configuration. + * @return the {@link SyncPoller} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName, @@ -643,17 +652,18 @@ public SyncPoller, ConfigurationInner> beginUpdat } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a Configuration. + * @return the {@link SyncPoller} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName, @@ -665,16 +675,17 @@ public SyncPoller, ConfigurationInner> beginUpdat } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server 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 represents a Configuration on successful completion of {@link Mono}. + * @return configuration (also known as server parameter) on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateAsync(String resourceGroupName, String serverName, String configurationName, @@ -684,16 +695,17 @@ public Mono updateAsync(String resourceGroupName, String ser } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server 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 represents a Configuration. + * @return configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.SINGLE) public ConfigurationInner update(String resourceGroupName, String serverName, String configurationName, @@ -702,17 +714,18 @@ public ConfigurationInner update(String resourceGroupName, String serverName, St } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server 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 represents a Configuration. + * @return configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.SINGLE) public ConfigurationInner update(String resourceGroupName, String serverName, String configurationName, @@ -721,20 +734,23 @@ public ConfigurationInner update(String resourceGroupName, String serverName, St } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server 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 represents a Configuration along with {@link Response} on successful completion of {@link Mono}. + * @return configuration (also known as server parameter) along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> putWithResponseAsync(String resourceGroupName, String serverName, - String configurationName, ConfigurationInner parameters) { + String configurationName, ConfigurationForUpdate parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -768,20 +784,22 @@ public Mono>> putWithResponseAsync(String resourceGrou } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server 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 represents a Configuration along with {@link Response}. + * @return configuration (also known as server parameter) along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response putWithResponse(String resourceGroupName, String serverName, String configurationName, - ConfigurationInner parameters) { + ConfigurationForUpdate parameters) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -816,21 +834,23 @@ private Response putWithResponse(String resourceGroupName, String se } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server 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 represents a Configuration along with {@link Response}. + * @return configuration (also known as server parameter) along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response putWithResponse(String resourceGroupName, String serverName, String configurationName, - ConfigurationInner parameters, Context context) { + ConfigurationForUpdate parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -865,20 +885,22 @@ private Response putWithResponse(String resourceGroupName, String se } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of represents a Configuration. + * @return the {@link PollerFlux} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ConfigurationInner> beginPutAsync(String resourceGroupName, - String serverName, String configurationName, ConfigurationInner parameters) { + String serverName, String configurationName, ConfigurationForUpdate parameters) { Mono>> mono = putWithResponseAsync(resourceGroupName, serverName, configurationName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), @@ -886,41 +908,45 @@ public PollerFlux, ConfigurationInner> beginPutAs } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a Configuration. + * @return the {@link SyncPoller} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationInner> beginPut(String resourceGroupName, - String serverName, String configurationName, ConfigurationInner parameters) { + String serverName, String configurationName, ConfigurationForUpdate parameters) { Response response = putWithResponse(resourceGroupName, serverName, configurationName, parameters); return this.client.getLroResult(response, ConfigurationInner.class, ConfigurationInner.class, Context.NONE); } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a Configuration. + * @return the {@link SyncPoller} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationInner> beginPut(String resourceGroupName, - String serverName, String configurationName, ConfigurationInner parameters, Context context) { + String serverName, String configurationName, ConfigurationForUpdate parameters, Context context) { Response response = putWithResponse(resourceGroupName, serverName, configurationName, parameters, context); return this.client.getLroResult(response, ConfigurationInner.class, @@ -928,58 +954,64 @@ public SyncPoller, ConfigurationInner> beginPut(S } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server 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 represents a Configuration on successful completion of {@link Mono}. + * @return configuration (also known as server parameter) on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono putAsync(String resourceGroupName, String serverName, String configurationName, - ConfigurationInner parameters) { + ConfigurationForUpdate parameters) { return beginPutAsync(resourceGroupName, serverName, configurationName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server 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 represents a Configuration. + * @return configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.SINGLE) public ConfigurationInner put(String resourceGroupName, String serverName, String configurationName, - ConfigurationInner parameters) { + ConfigurationForUpdate parameters) { return beginPut(resourceGroupName, serverName, configurationName, parameters).getFinalResult(); } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server 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 represents a Configuration. + * @return configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.SINGLE) public ConfigurationInner put(String resourceGroupName, String serverName, String configurationName, - ConfigurationInner parameters, Context context) { + ConfigurationForUpdate parameters, Context context) { return beginPut(resourceGroupName, serverName, configurationName, parameters, context).getFinalResult(); } @@ -990,8 +1022,8 @@ public ConfigurationInner put(String resourceGroupName, String serverName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 server configurations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of configurations (also known as server parameters) along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -1017,7 +1049,7 @@ private Mono> listByServerNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 server configurations along with {@link PagedResponse}. + * @return list of configurations (also known as server parameters) along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { @@ -1031,7 +1063,7 @@ private PagedResponse listByServerNextSinglePage(String next "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -1045,7 +1077,7 @@ private PagedResponse listByServerNextSinglePage(String next * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 server configurations along with {@link PagedResponse}. + * @return list of configurations (also known as server parameters) along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { @@ -1059,7 +1091,7 @@ private PagedResponse listByServerNextSinglePage(String next "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesClientImpl.java index 12a9c2f0e77b..3985d46dfd6b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesClientImpl.java @@ -35,7 +35,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.DatabaseInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.DatabaseListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DatabaseList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -70,11 +70,11 @@ public final class DatabasesClientImpl implements DatabasesClient { * to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientDatabases") public interface DatabasesService { @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> create(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -84,7 +84,7 @@ Mono>> create(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response createSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -94,7 +94,7 @@ Response createSync(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -103,7 +103,7 @@ Mono>> delete(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Response deleteSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -132,7 +132,7 @@ Response getSync(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -141,7 +141,7 @@ Mono> listByServer(@HostParam("$host") String endpo @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -150,30 +150,29 @@ Response listByServerSync(@HostParam("$host") String endpoin @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Mono> listByServerNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database along with {@link Response} on successful completion of {@link Mono}. + * @return represents a database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createWithResponseAsync(String resourceGroupName, String serverName, @@ -208,16 +207,17 @@ public Mono>> createWithResponseAsync(String resourceG } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database along with {@link Response}. + * @return represents a database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, String databaseName, @@ -257,17 +257,18 @@ private Response createWithResponse(String resourceGroupName, String } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database along with {@link Response}. + * @return represents a database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, String databaseName, @@ -306,16 +307,17 @@ private Response createWithResponse(String resourceGroupName, String } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 represents a Database. + * @return the {@link PollerFlux} for polling of represents a database. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, DatabaseInner> beginCreateAsync(String resourceGroupName, @@ -327,16 +329,17 @@ public PollerFlux, DatabaseInner> beginCreateAsync(Str } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a Database. + * @return the {@link SyncPoller} for polling of represents a database. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatabaseInner> beginCreate(String resourceGroupName, String serverName, @@ -347,17 +350,18 @@ public SyncPoller, DatabaseInner> beginCreate(String r } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a Database. + * @return the {@link SyncPoller} for polling of represents a database. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatabaseInner> beginCreate(String resourceGroupName, String serverName, @@ -369,16 +373,17 @@ public SyncPoller, DatabaseInner> beginCreate(String r } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database on successful completion of {@link Mono}. + * @return represents a database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createAsync(String resourceGroupName, String serverName, String databaseName, @@ -388,16 +393,17 @@ public Mono createAsync(String resourceGroupName, String serverNa } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database. + * @return represents a database. */ @ServiceMethod(returns = ReturnType.SINGLE) public DatabaseInner create(String resourceGroupName, String serverName, String databaseName, @@ -406,17 +412,18 @@ public DatabaseInner create(String resourceGroupName, String serverName, String } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database. + * @return represents a database. */ @ServiceMethod(returns = ReturnType.SINGLE) public DatabaseInner create(String resourceGroupName, String serverName, String databaseName, @@ -425,11 +432,12 @@ public DatabaseInner create(String resourceGroupName, String serverName, String } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -464,11 +472,12 @@ public Mono>> deleteWithResponseAsync(String resourceG } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -504,11 +513,12 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -546,11 +556,12 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -565,11 +576,12 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -583,11 +595,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -602,11 +615,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -619,11 +633,12 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -634,11 +649,12 @@ public void delete(String resourceGroupName, String serverName, String databaseN } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -650,15 +666,17 @@ public void delete(String resourceGroupName, String serverName, String databaseN } /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database along with {@link Response} on successful completion of {@link Mono}. + * @return information about an existing database along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(String resourceGroupName, String serverName, @@ -689,15 +707,16 @@ public Mono> getWithResponseAsync(String resourceGroupNa } /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database on successful completion of {@link Mono}. + * @return information about an existing database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAsync(String resourceGroupName, String serverName, String databaseName) { @@ -706,16 +725,17 @@ public Mono getAsync(String resourceGroupName, String serverName, } /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database along with {@link Response}. + * @return information about an existing database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, @@ -748,15 +768,16 @@ public Response getWithResponse(String resourceGroupName, String } /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database. + * @return information about an existing database. */ @ServiceMethod(returns = ReturnType.SINGLE) public DatabaseInner get(String resourceGroupName, String serverName, String databaseName) { @@ -764,14 +785,15 @@ public DatabaseInner get(String resourceGroupName, String serverName, String dat } /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 databases along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of all databases in a server along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, @@ -801,14 +823,14 @@ private Mono> listByServerSinglePageAsync(String re } /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 databases as paginated response with {@link PagedFlux}. + * @return list of all databases in a server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -817,14 +839,14 @@ public PagedFlux listByServerAsync(String resourceGroupName, Stri } /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 databases along with {@link PagedResponse}. + * @return list of all databases in a server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { @@ -847,15 +869,14 @@ private PagedResponse listByServerSinglePage(String resourceGroup .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -863,7 +884,7 @@ private PagedResponse listByServerSinglePage(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 databases along with {@link PagedResponse}. + * @return list of all databases in a server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, @@ -887,22 +908,21 @@ private PagedResponse listByServerSinglePage(String resourceGroup .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 databases as paginated response with {@link PagedIterable}. + * @return list of all databases in a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -911,7 +931,7 @@ public PagedIterable listByServer(String resourceGroupName, Strin } /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -919,7 +939,7 @@ public PagedIterable listByServer(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 databases as paginated response with {@link PagedIterable}. + * @return list of all databases in a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { @@ -934,7 +954,8 @@ public PagedIterable listByServer(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 databases along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of all databases in a server along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -960,7 +981,7 @@ private Mono> listByServerNextSinglePageAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 databases along with {@link PagedResponse}. + * @return list of all databases in a server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { @@ -974,7 +995,7 @@ private PagedResponse listByServerNextSinglePage(String nextLink) "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -988,7 +1009,7 @@ private PagedResponse listByServerNextSinglePage(String nextLink) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of databases along with {@link PagedResponse}. + * @return list of all databases in a server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { @@ -1002,8 +1023,7 @@ private PagedResponse listByServerNextSinglePage(String nextLink, "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesClientImpl.java index fa6f66c2707a..4c92fe1d5af7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesClientImpl.java @@ -35,7 +35,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FirewallRuleInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FirewallRuleListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.FirewallRuleList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -70,11 +70,11 @@ public final class FirewallRulesClientImpl implements FirewallRulesClient { * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientFirewallRules") public interface FirewallRulesService { @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -85,7 +85,7 @@ Mono>> createOrUpdate(@HostParam("$host") String endpo @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response createOrUpdateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -96,7 +96,7 @@ Response createOrUpdateSync(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -106,7 +106,7 @@ Mono>> delete(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Response deleteSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -138,7 +138,7 @@ Response getSync(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -147,7 +147,7 @@ Mono> listByServer(@HostParam("$host") String e @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -156,7 +156,7 @@ Response listByServerSync(@HostParam("$host") String end @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( + Mono> listByServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -164,9 +164,8 @@ Mono> listByServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -174,12 +173,12 @@ Response listByServerNextSync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}. + * @return firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, @@ -221,12 +220,12 @@ public Mono>> createOrUpdateWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule along with {@link Response}. + * @return firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, @@ -270,13 +269,13 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule along with {@link Response}. + * @return firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, @@ -320,12 +319,12 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 represents a server firewall rule. + * @return the {@link PollerFlux} for polling of firewall rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, FirewallRuleInner> beginCreateOrUpdateAsync( @@ -341,12 +340,12 @@ public PollerFlux, FirewallRuleInner> beginCreateO * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a server firewall rule. + * @return the {@link SyncPoller} for polling of firewall rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName, @@ -362,13 +361,13 @@ public SyncPoller, FirewallRuleInner> beginCreateO * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a server firewall rule. + * @return the {@link SyncPoller} for polling of firewall rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName, @@ -384,12 +383,12 @@ public SyncPoller, FirewallRuleInner> beginCreateO * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule on successful completion of {@link Mono}. + * @return firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync(String resourceGroupName, String serverName, @@ -403,12 +402,12 @@ public Mono createOrUpdateAsync(String resourceGroupName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) public FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, @@ -421,13 +420,13 @@ public FirewallRuleInner createOrUpdate(String resourceGroupName, String serverN * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) public FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, @@ -437,11 +436,11 @@ public FirewallRuleInner createOrUpdate(String resourceGroupName, String serverN } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -477,11 +476,11 @@ public Mono>> deleteWithResponseAsync(String resourceG } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -518,11 +517,11 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -560,11 +559,11 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -580,11 +579,11 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -598,11 +597,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -617,11 +616,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -634,11 +633,11 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -649,11 +648,11 @@ public void delete(String resourceGroupName, String serverName, String firewallR } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -665,15 +664,16 @@ public void delete(String resourceGroupName, String serverName, String firewallR } /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}. + * @return information about a firewall rule in a server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(String resourceGroupName, String serverName, @@ -705,15 +705,15 @@ public Mono> getWithResponseAsync(String resourceGro } /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule on successful completion of {@link Mono}. + * @return information about a firewall rule in a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAsync(String resourceGroupName, String serverName, String firewallRuleName) { @@ -722,16 +722,16 @@ public Mono getAsync(String resourceGroupName, String serverN } /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule along with {@link Response}. + * @return information about a firewall rule in a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String serverName, @@ -764,15 +764,15 @@ public Response getWithResponse(String resourceGroupName, Str } /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return information about a firewall rule in a server. */ @ServiceMethod(returns = ReturnType.SINGLE) public FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName) { @@ -780,14 +780,14 @@ public FirewallRuleInner get(String resourceGroupName, String serverName, String } /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, @@ -817,14 +817,14 @@ private Mono> listByServerSinglePageAsync(Strin } /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 firewall rules as paginated response with {@link PagedFlux}. + * @return list of firewall rules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -833,14 +833,14 @@ public PagedFlux listByServerAsync(String resourceGroupName, } /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 firewall rules along with {@link PagedResponse}. + * @return list of firewall rules along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { @@ -863,7 +863,7 @@ private PagedResponse listByServerSinglePage(String resourceG .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -871,7 +871,7 @@ private PagedResponse listByServerSinglePage(String resourceG } /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -879,7 +879,7 @@ private PagedResponse listByServerSinglePage(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 firewall rules along with {@link PagedResponse}. + * @return list of firewall rules along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, @@ -903,7 +903,7 @@ private PagedResponse listByServerSinglePage(String resourceG .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -911,14 +911,14 @@ private PagedResponse listByServerSinglePage(String resourceG } /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 firewall rules as paginated response with {@link PagedIterable}. + * @return list of firewall rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -927,7 +927,7 @@ public PagedIterable listByServer(String resourceGroupName, S } /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -935,7 +935,7 @@ public PagedIterable listByServer(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of firewall rules as paginated response with {@link PagedIterable}. + * @return list of firewall rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { @@ -950,7 +950,7 @@ public PagedIterable listByServer(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -976,7 +976,7 @@ private Mono> listByServerNextSinglePageAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of firewall rules along with {@link PagedResponse}. + * @return list of firewall rules along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { @@ -990,7 +990,7 @@ private PagedResponse listByServerNextSinglePage(String nextL "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -1004,7 +1004,7 @@ private PagedResponse listByServerNextSinglePage(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 firewall rules along with {@link PagedResponse}. + * @return list of firewall rules along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { @@ -1018,7 +1018,7 @@ private PagedResponse listByServerNextSinglePage(String nextL "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersClientImpl.java deleted file mode 100644 index 0c99782d618e..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersClientImpl.java +++ /dev/null @@ -1,480 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.FlexibleServersClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrBackupResponseInner; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServersTriggerLtrPreBackupResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupRequest; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; -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 FlexibleServersClient. - */ -public final class FlexibleServersClientImpl implements FlexibleServersClient { - /** - * The proxy service used to perform REST calls. - */ - private final FlexibleServersService service; - - /** - * The service client containing this operation class. - */ - private final PostgreSqlManagementClientImpl client; - - /** - * Initializes an instance of FlexibleServersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - FlexibleServersClientImpl(PostgreSqlManagementClientImpl client) { - this.service - = RestProxy.create(FlexibleServersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PostgreSqlManagementClientFlexibleServers to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface FlexibleServersService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrPreBackup") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono triggerLtrPreBackup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") LtrPreBackupRequest parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrPreBackup") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - FlexibleServersTriggerLtrPreBackupResponse triggerLtrPreBackupSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") LtrPreBackupRequest parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/startLtrBackup") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> startLtrBackup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") LtrBackupRequest parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/startLtrBackup") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response startLtrBackupSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") LtrBackupRequest parameters, @HeaderParam("Accept") String accept, - Context context); - } - - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR pre-backup API call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono triggerLtrPreBackupWithResponseAsync( - String resourceGroupName, String serverName, LtrPreBackupRequest parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.triggerLtrPreBackup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR pre-backup API call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono triggerLtrPreBackupAsync(String resourceGroupName, String serverName, - LtrPreBackupRequest parameters) { - return triggerLtrPreBackupWithResponseAsync(resourceGroupName, serverName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR pre-backup API call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FlexibleServersTriggerLtrPreBackupResponse triggerLtrPreBackupWithResponse(String resourceGroupName, - String serverName, LtrPreBackupRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.triggerLtrPreBackupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); - } - - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR pre-backup API call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LtrPreBackupResponseInner triggerLtrPreBackup(String resourceGroupName, String serverName, - LtrPreBackupRequest parameters) { - return triggerLtrPreBackupWithResponse(resourceGroupName, serverName, parameters, Context.NONE).getValue(); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> startLtrBackupWithResponseAsync(String resourceGroupName, String serverName, - LtrBackupRequest parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.startLtrBackup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response startLtrBackupWithResponse(String resourceGroupName, String serverName, - LtrBackupRequest parameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.startLtrBackupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, Context.NONE); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response startLtrBackupWithResponse(String resourceGroupName, String serverName, - LtrBackupRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.startLtrBackupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, LtrBackupResponseInner> - beginStartLtrBackupAsync(String resourceGroupName, String serverName, LtrBackupRequest parameters) { - Mono>> mono - = startLtrBackupWithResponseAsync(resourceGroupName, serverName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LtrBackupResponseInner.class, LtrBackupResponseInner.class, - this.client.getContext()); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LtrBackupResponseInner> - beginStartLtrBackup(String resourceGroupName, String serverName, LtrBackupRequest parameters) { - Response response = startLtrBackupWithResponse(resourceGroupName, serverName, parameters); - return this.client.getLroResult(response, - LtrBackupResponseInner.class, LtrBackupResponseInner.class, Context.NONE); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LtrBackupResponseInner> - beginStartLtrBackup(String resourceGroupName, String serverName, LtrBackupRequest parameters, Context context) { - Response response = startLtrBackupWithResponse(resourceGroupName, serverName, parameters, context); - return this.client.getLroResult(response, - LtrBackupResponseInner.class, LtrBackupResponseInner.class, context); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono startLtrBackupAsync(String resourceGroupName, String serverName, - LtrBackupRequest parameters) { - return beginStartLtrBackupAsync(resourceGroupName, serverName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LtrBackupResponseInner startLtrBackup(String resourceGroupName, String serverName, - LtrBackupRequest parameters) { - return beginStartLtrBackup(resourceGroupName, serverName, parameters).getFinalResult(); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LtrBackupResponseInner startLtrBackup(String resourceGroupName, String serverName, - LtrBackupRequest parameters, Context context) { - return beginStartLtrBackup(resourceGroupName, serverName, parameters, context).getFinalResult(); - } - - private static final ClientLogger LOGGER = new ClientLogger(FlexibleServersClientImpl.class); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersImpl.java deleted file mode 100644 index d5f1f6d4fbd6..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.FlexibleServersClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrBackupResponseInner; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServers; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServersTriggerLtrPreBackupResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupRequest; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupResponse; - -public final class FlexibleServersImpl implements FlexibleServers { - private static final ClientLogger LOGGER = new ClientLogger(FlexibleServersImpl.class); - - private final FlexibleServersClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public FlexibleServersImpl(FlexibleServersClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response triggerLtrPreBackupWithResponse(String resourceGroupName, String serverName, - LtrPreBackupRequest parameters, Context context) { - FlexibleServersTriggerLtrPreBackupResponse inner - = this.serviceClient().triggerLtrPreBackupWithResponse(resourceGroupName, serverName, parameters, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new LtrPreBackupResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public LtrPreBackupResponse triggerLtrPreBackup(String resourceGroupName, String serverName, - LtrPreBackupRequest parameters) { - LtrPreBackupResponseInner inner - = this.serviceClient().triggerLtrPreBackup(resourceGroupName, serverName, parameters); - if (inner != null) { - return new LtrPreBackupResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public LtrBackupResponse startLtrBackup(String resourceGroupName, String serverName, LtrBackupRequest parameters) { - LtrBackupResponseInner inner = this.serviceClient().startLtrBackup(resourceGroupName, serverName, parameters); - if (inner != null) { - return new LtrBackupResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public LtrBackupResponse startLtrBackup(String resourceGroupName, String serverName, LtrBackupRequest parameters, - Context context) { - LtrBackupResponseInner inner - = this.serviceClient().startLtrBackup(resourceGroupName, serverName, parameters, context); - if (inner != null) { - return new LtrBackupResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - private FlexibleServersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsImpl.java deleted file mode 100644 index 4e1f59c58901..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsImpl.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LtrBackupOperationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrServerBackupOperationInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupOperations; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrServerBackupOperation; - -public final class LtrBackupOperationsImpl implements LtrBackupOperations { - private static final ClientLogger LOGGER = new ClientLogger(LtrBackupOperationsImpl.class); - - private final LtrBackupOperationsClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public LtrBackupOperationsImpl(LtrBackupOperationsClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String serverName, - String backupName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, serverName, backupName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new LtrServerBackupOperationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public LtrServerBackupOperation get(String resourceGroupName, String serverName, String backupName) { - LtrServerBackupOperationInner inner = this.serviceClient().get(resourceGroupName, serverName, backupName); - if (inner != null) { - return new LtrServerBackupOperationImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listByServer(String resourceGroupName, String serverName) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LtrServerBackupOperationImpl(inner1, this.manager())); - } - - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LtrServerBackupOperationImpl(inner1, this.manager())); - } - - private LtrBackupOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationImpl.java similarity index 70% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationResourceImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationImpl.java index fd46bca857a3..361756eec790 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationResourceImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationImpl.java @@ -7,30 +7,30 @@ import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CancelEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Cancel; import com.azure.resourcemanager.postgresqlflexibleserver.models.DbServerMetadata; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceDbEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceServer; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesAndPermissions; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Migration; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationMode; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationOption; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResource; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResourceForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParameters; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParametersForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationStatus; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDbsInTargetEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDatabasesOnTargetServer; import com.azure.resourcemanager.postgresqlflexibleserver.models.SourceType; import com.azure.resourcemanager.postgresqlflexibleserver.models.SslMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.StartDataMigrationEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TriggerCutoverEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StartDataMigration; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TriggerCutover; import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; import java.util.Map; -public final class MigrationResourceImpl - implements MigrationResource, MigrationResource.Definition, MigrationResource.Update { - private MigrationResourceInner innerObject; +public final class MigrationImpl implements Migration, Migration.Definition, Migration.Update { + private MigrationInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; @@ -128,11 +128,11 @@ public List dbsToMigrate() { } } - public LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded() { + public LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded() { return this.innerModel().setupLogicalReplicationOnSourceDbIfNeeded(); } - public OverwriteDbsInTargetEnum overwriteDbsInTarget() { + public OverwriteDatabasesOnTargetServer overwriteDbsInTarget() { return this.innerModel().overwriteDbsInTarget(); } @@ -144,15 +144,15 @@ public OffsetDateTime migrationWindowEndTimeInUtc() { return this.innerModel().migrationWindowEndTimeInUtc(); } - public MigrateRolesEnum migrateRoles() { + public MigrateRolesAndPermissions migrateRoles() { return this.innerModel().migrateRoles(); } - public StartDataMigrationEnum startDataMigration() { + public StartDataMigration startDataMigration() { return this.innerModel().startDataMigration(); } - public TriggerCutoverEnum triggerCutover() { + public TriggerCutover triggerCutover() { return this.innerModel().triggerCutover(); } @@ -165,7 +165,7 @@ public List dbsToTriggerCutoverOn() { } } - public CancelEnum cancel() { + public Cancel cancel() { return this.innerModel().cancel(); } @@ -190,7 +190,7 @@ public String resourceGroupName() { return resourceGroupName; } - public MigrationResourceInner innerModel() { + public MigrationInner innerModel() { return this.innerObject; } @@ -198,109 +198,99 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man return this.serviceManager; } - private String subscriptionId; - private String resourceGroupName; - private String targetDbServerName; + private String serverName; private String migrationName; private MigrationResourceForPatch updateParameters; - public MigrationResourceImpl withExistingFlexibleServer(String subscriptionId, String resourceGroupName, - String targetDbServerName) { - this.subscriptionId = subscriptionId; + public MigrationImpl withExistingFlexibleServer(String resourceGroupName, String serverName) { this.resourceGroupName = resourceGroupName; - this.targetDbServerName = targetDbServerName; + this.serverName = serverName; return this; } - public MigrationResource create() { + public Migration create() { this.innerObject = serviceManager.serviceClient() .getMigrations() - .createWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, this.innerModel(), - Context.NONE) + .createWithResponse(resourceGroupName, serverName, migrationName, this.innerModel(), Context.NONE) .getValue(); return this; } - public MigrationResource create(Context context) { + public Migration create(Context context) { this.innerObject = serviceManager.serviceClient() .getMigrations() - .createWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, this.innerModel(), - context) + .createWithResponse(resourceGroupName, serverName, migrationName, this.innerModel(), context) .getValue(); return this; } - MigrationResourceImpl(String name, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerObject = new MigrationResourceInner(); + MigrationImpl(String name, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { + this.innerObject = new MigrationInner(); this.serviceManager = serviceManager; this.migrationName = name; } - public MigrationResourceImpl update() { + public MigrationImpl update() { this.updateParameters = new MigrationResourceForPatch(); return this; } - public MigrationResource apply() { + public Migration apply() { this.innerObject = serviceManager.serviceClient() .getMigrations() - .updateWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, updateParameters, - Context.NONE) + .updateWithResponse(resourceGroupName, serverName, migrationName, updateParameters, Context.NONE) .getValue(); return this; } - public MigrationResource apply(Context context) { + public Migration apply(Context context) { this.innerObject = serviceManager.serviceClient() .getMigrations() - .updateWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, updateParameters, - context) + .updateWithResponse(resourceGroupName, serverName, migrationName, updateParameters, context) .getValue(); return this; } - MigrationResourceImpl(MigrationResourceInner innerObject, + MigrationImpl(MigrationInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.subscriptionId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "subscriptions"); this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.targetDbServerName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "flexibleServers"); + this.serverName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "flexibleServers"); this.migrationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "migrations"); } - public MigrationResource refresh() { + public Migration refresh() { this.innerObject = serviceManager.serviceClient() .getMigrations() - .getWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, Context.NONE) + .getWithResponse(resourceGroupName, serverName, migrationName, Context.NONE) .getValue(); return this; } - public MigrationResource refresh(Context context) { + public Migration refresh(Context context) { this.innerObject = serviceManager.serviceClient() .getMigrations() - .getWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, context) + .getWithResponse(resourceGroupName, serverName, migrationName, context) .getValue(); return this; } - public MigrationResourceImpl withRegion(Region location) { + public MigrationImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; } - public MigrationResourceImpl withRegion(String location) { + public MigrationImpl withRegion(String location) { this.innerModel().withLocation(location); return this; } - public MigrationResourceImpl withTags(Map tags) { + public MigrationImpl withTags(Map tags) { if (isInCreateMode()) { this.innerModel().withTags(tags); return this; @@ -310,12 +300,12 @@ public MigrationResourceImpl withTags(Map tags) { } } - public MigrationResourceImpl withMigrationInstanceResourceId(String migrationInstanceResourceId) { + public MigrationImpl withMigrationInstanceResourceId(String migrationInstanceResourceId) { this.innerModel().withMigrationInstanceResourceId(migrationInstanceResourceId); return this; } - public MigrationResourceImpl withMigrationMode(MigrationMode migrationMode) { + public MigrationImpl withMigrationMode(MigrationMode migrationMode) { if (isInCreateMode()) { this.innerModel().withMigrationMode(migrationMode); return this; @@ -325,22 +315,22 @@ public MigrationResourceImpl withMigrationMode(MigrationMode migrationMode) { } } - public MigrationResourceImpl withMigrationOption(MigrationOption migrationOption) { + public MigrationImpl withMigrationOption(MigrationOption migrationOption) { this.innerModel().withMigrationOption(migrationOption); return this; } - public MigrationResourceImpl withSourceType(SourceType sourceType) { + public MigrationImpl withSourceType(SourceType sourceType) { this.innerModel().withSourceType(sourceType); return this; } - public MigrationResourceImpl withSslMode(SslMode sslMode) { + public MigrationImpl withSslMode(SslMode sslMode) { this.innerModel().withSslMode(sslMode); return this; } - public MigrationResourceImpl withSourceDbServerResourceId(String sourceDbServerResourceId) { + public MigrationImpl withSourceDbServerResourceId(String sourceDbServerResourceId) { if (isInCreateMode()) { this.innerModel().withSourceDbServerResourceId(sourceDbServerResourceId); return this; @@ -350,8 +340,7 @@ public MigrationResourceImpl withSourceDbServerResourceId(String sourceDbServerR } } - public MigrationResourceImpl - withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName) { + public MigrationImpl withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName) { if (isInCreateMode()) { this.innerModel().withSourceDbServerFullyQualifiedDomainName(sourceDbServerFullyQualifiedDomainName); return this; @@ -361,8 +350,7 @@ public MigrationResourceImpl withSourceDbServerResourceId(String sourceDbServerR } } - public MigrationResourceImpl - withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName) { + public MigrationImpl withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName) { if (isInCreateMode()) { this.innerModel().withTargetDbServerFullyQualifiedDomainName(targetDbServerFullyQualifiedDomainName); return this; @@ -372,17 +360,12 @@ public MigrationResourceImpl withSourceDbServerResourceId(String sourceDbServerR } } - public MigrationResourceImpl withSecretParameters(MigrationSecretParameters secretParameters) { - if (isInCreateMode()) { - this.innerModel().withSecretParameters(secretParameters); - return this; - } else { - this.updateParameters.withSecretParameters(secretParameters); - return this; - } + public MigrationImpl withSecretParameters(MigrationSecretParameters secretParameters) { + this.innerModel().withSecretParameters(secretParameters); + return this; } - public MigrationResourceImpl withDbsToMigrate(List dbsToMigrate) { + public MigrationImpl withDbsToMigrate(List dbsToMigrate) { if (isInCreateMode()) { this.innerModel().withDbsToMigrate(dbsToMigrate); return this; @@ -392,8 +375,8 @@ public MigrationResourceImpl withDbsToMigrate(List dbsToMigrate) { } } - public MigrationResourceImpl withSetupLogicalReplicationOnSourceDbIfNeeded( - LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded) { + public MigrationImpl withSetupLogicalReplicationOnSourceDbIfNeeded( + LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded) { if (isInCreateMode()) { this.innerModel().withSetupLogicalReplicationOnSourceDbIfNeeded(setupLogicalReplicationOnSourceDbIfNeeded); return this; @@ -404,7 +387,7 @@ public MigrationResourceImpl withSetupLogicalReplicationOnSourceDbIfNeeded( } } - public MigrationResourceImpl withOverwriteDbsInTarget(OverwriteDbsInTargetEnum overwriteDbsInTarget) { + public MigrationImpl withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer overwriteDbsInTarget) { if (isInCreateMode()) { this.innerModel().withOverwriteDbsInTarget(overwriteDbsInTarget); return this; @@ -414,7 +397,7 @@ public MigrationResourceImpl withOverwriteDbsInTarget(OverwriteDbsInTargetEnum o } } - public MigrationResourceImpl withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { + public MigrationImpl withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { if (isInCreateMode()) { this.innerModel().withMigrationWindowStartTimeInUtc(migrationWindowStartTimeInUtc); return this; @@ -424,12 +407,12 @@ public MigrationResourceImpl withMigrationWindowStartTimeInUtc(OffsetDateTime mi } } - public MigrationResourceImpl withMigrationWindowEndTimeInUtc(OffsetDateTime migrationWindowEndTimeInUtc) { + public MigrationImpl withMigrationWindowEndTimeInUtc(OffsetDateTime migrationWindowEndTimeInUtc) { this.innerModel().withMigrationWindowEndTimeInUtc(migrationWindowEndTimeInUtc); return this; } - public MigrationResourceImpl withMigrateRoles(MigrateRolesEnum migrateRoles) { + public MigrationImpl withMigrateRoles(MigrateRolesAndPermissions migrateRoles) { if (isInCreateMode()) { this.innerModel().withMigrateRoles(migrateRoles); return this; @@ -439,7 +422,7 @@ public MigrationResourceImpl withMigrateRoles(MigrateRolesEnum migrateRoles) { } } - public MigrationResourceImpl withStartDataMigration(StartDataMigrationEnum startDataMigration) { + public MigrationImpl withStartDataMigration(StartDataMigration startDataMigration) { if (isInCreateMode()) { this.innerModel().withStartDataMigration(startDataMigration); return this; @@ -449,7 +432,7 @@ public MigrationResourceImpl withStartDataMigration(StartDataMigrationEnum start } } - public MigrationResourceImpl withTriggerCutover(TriggerCutoverEnum triggerCutover) { + public MigrationImpl withTriggerCutover(TriggerCutover triggerCutover) { if (isInCreateMode()) { this.innerModel().withTriggerCutover(triggerCutover); return this; @@ -459,7 +442,7 @@ public MigrationResourceImpl withTriggerCutover(TriggerCutoverEnum triggerCutove } } - public MigrationResourceImpl withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { + public MigrationImpl withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { if (isInCreateMode()) { this.innerModel().withDbsToTriggerCutoverOn(dbsToTriggerCutoverOn); return this; @@ -469,7 +452,7 @@ public MigrationResourceImpl withDbsToTriggerCutoverOn(List dbsToTrigger } } - public MigrationResourceImpl withCancel(CancelEnum cancel) { + public MigrationImpl withCancel(Cancel cancel) { if (isInCreateMode()) { this.innerModel().withCancel(cancel); return this; @@ -479,7 +462,7 @@ public MigrationResourceImpl withCancel(CancelEnum cancel) { } } - public MigrationResourceImpl withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { + public MigrationImpl withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { if (isInCreateMode()) { this.innerModel().withDbsToCancelMigrationOn(dbsToCancelMigrationOn); return this; @@ -489,7 +472,12 @@ public MigrationResourceImpl withDbsToCancelMigrationOn(List dbsToCancel } } + public MigrationImpl withSecretParameters(MigrationSecretParametersForPatch secretParameters) { + this.updateParameters.withSecretParameters(secretParameters); + return this; + } + private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityImpl.java similarity index 76% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityResourceImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityImpl.java index 55e995c46e73..a3f743bbdc0b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityResourceImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityImpl.java @@ -4,16 +4,16 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationNameAvailability; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationNameAvailabilityReason; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationNameAvailabilityResource; -public final class MigrationNameAvailabilityResourceImpl implements MigrationNameAvailabilityResource { - private MigrationNameAvailabilityResourceInner innerObject; +public final class MigrationNameAvailabilityImpl implements MigrationNameAvailability { + private MigrationNameAvailabilityInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - MigrationNameAvailabilityResourceImpl(MigrationNameAvailabilityResourceInner innerObject, + MigrationNameAvailabilityImpl(MigrationNameAvailabilityInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -39,7 +39,7 @@ public String message() { return this.innerModel().message(); } - public MigrationNameAvailabilityResourceInner innerModel() { + public MigrationNameAvailabilityInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsClientImpl.java index b89b425b71bf..98d37cf94b98 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsClientImpl.java @@ -14,6 +14,7 @@ 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; @@ -31,10 +32,11 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationList; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationListFilter; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResourceForPatch; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResourceListResult; import reactor.core.publisher.Mono; /** @@ -67,123 +69,131 @@ public final class MigrationsClientImpl implements MigrationsClient { * to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientMigrations") public interface MigrationsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, + Mono> create(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, - @PathParam("migrationName") String migrationName, - @BodyParam("application/json") MigrationResourceInner parameters, @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("migrationName") String migrationName, @BodyParam("application/json") MigrationInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createSync(@HostParam("$host") String endpoint, + Response createSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, - @PathParam("migrationName") String migrationName, - @BodyParam("application/json") MigrationResourceInner parameters, @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("migrationName") String migrationName, @BodyParam("application/json") MigrationInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("migrationName") String migrationName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("migrationName") String migrationName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("migrationName") String migrationName, @BodyParam("application/json") MigrationResourceForPatch parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("migrationName") String migrationName, @BodyParam("application/json") MigrationResourceForPatch parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, + Mono> cancel(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("migrationName") String migrationName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, + Response cancelSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("migrationName") String migrationName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByTargetServer(@HostParam("$host") String endpoint, + Mono> listByTargetServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @QueryParam("migrationListFilter") MigrationListFilter migrationListFilter, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByTargetServerSync(@HostParam("$host") String endpoint, + Response listByTargetServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @QueryParam("migrationListFilter") MigrationListFilter migrationListFilter, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/checkMigrationNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkNameAvailability(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @BodyParam("application/json") MigrationNameAvailabilityInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/checkMigrationNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response checkNameAvailabilitySync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @BodyParam("application/json") MigrationNameAvailabilityInner parameters, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByTargetServerNext( + Mono> listByTargetServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -191,7 +201,7 @@ Mono> listByTargetServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByTargetServerNextSync( + Response listByTargetServerNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -199,33 +209,32 @@ Response listByTargetServerNextSync( /** * Creates a new migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for creating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync(String subscriptionId, - String resourceGroupName, String targetDbServerName, String migrationName, MigrationResourceInner parameters) { + public Mono> createWithResponseAsync(String resourceGroupName, String serverName, + String migrationName, MigrationInner parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (migrationName == null) { return Mono.error(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); @@ -236,65 +245,63 @@ public Mono> createWithResponseAsync(String sub parameters.validate(); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - subscriptionId, resourceGroupName, targetDbServerName, migrationName, parameters, accept, context)) + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for creating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource on successful completion of {@link Mono}. + * @return properties of a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, MigrationResourceInner parameters) { - return createWithResponseAsync(subscriptionId, resourceGroupName, targetDbServerName, migrationName, parameters) + public Mono createAsync(String resourceGroupName, String serverName, String migrationName, + MigrationInner parameters) { + return createWithResponseAsync(resourceGroupName, serverName, migrationName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates a new migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for creating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource along with {@link Response}. + * @return properties of a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, MigrationResourceInner parameters, Context context) { + public Response createWithResponse(String resourceGroupName, String serverName, + String migrationName, MigrationInner parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { + if (this.client.getSubscriptionId() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { + if (serverName == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (migrationName == null) { throw LOGGER.atError() @@ -307,182 +314,172 @@ public Response createWithResponse(String subscriptionId parameters.validate(); } final String accept = "application/json"; - return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), subscriptionId, - resourceGroupName, targetDbServerName, migrationName, parameters, accept, context); + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, parameters, accept, context); } /** * Creates a new migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for creating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource. + * @return properties of a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationResourceInner create(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, MigrationResourceInner parameters) { - return createWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, parameters, - Context.NONE).getValue(); + public MigrationInner create(String resourceGroupName, String serverName, String migrationName, + MigrationInner parameters) { + return createWithResponse(resourceGroupName, serverName, migrationName, parameters, Context.NONE).getValue(); } /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration along with {@link Response} on successful completion of {@link Mono}. + * @return information about a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String migrationName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (migrationName == null) { return Mono.error(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), subscriptionId, - resourceGroupName, targetDbServerName, migrationName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration on successful completion of {@link Mono}. + * @return information about a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName) { - return getWithResponseAsync(subscriptionId, resourceGroupName, targetDbServerName, migrationName) + public Mono getAsync(String resourceGroupName, String serverName, String migrationName) { + return getWithResponseAsync(resourceGroupName, serverName, migrationName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration along with {@link Response}. + * @return information about a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, String migrationName, + Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { + if (this.client.getSubscriptionId() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { + if (serverName == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (migrationName == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), subscriptionId, - resourceGroupName, targetDbServerName, migrationName, accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, migrationName, accept, context); } /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration. + * @return information about a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationResourceInner get(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName) { - return getWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, Context.NONE) - .getValue(); + public MigrationInner get(String resourceGroupName, String serverName, String migrationName) { + return getWithResponse(resourceGroupName, serverName, migrationName, Context.NONE).getValue(); } /** * Updates an existing migration. The request body can contain one to many of the mutable properties present in the * migration definition. Certain property updates initiate migration state transitions. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for updating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required to update an existing migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync(String subscriptionId, - String resourceGroupName, String targetDbServerName, String migrationName, - MigrationResourceForPatch parameters) { + public Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String migrationName, MigrationResourceForPatch parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (migrationName == null) { return Mono.error(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); @@ -493,9 +490,8 @@ public Mono> updateWithResponseAsync(String sub parameters.validate(); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - subscriptionId, resourceGroupName, targetDbServerName, migrationName, parameters, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -503,20 +499,19 @@ public Mono> updateWithResponseAsync(String sub * Updates an existing migration. The request body can contain one to many of the mutable properties present in the * migration definition. Certain property updates initiate migration state transitions. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for updating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required to update an existing migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource on successful completion of {@link Mono}. + * @return properties of a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, MigrationResourceForPatch parameters) { - return updateWithResponseAsync(subscriptionId, resourceGroupName, targetDbServerName, migrationName, parameters) + public Mono updateAsync(String resourceGroupName, String serverName, String migrationName, + MigrationResourceForPatch parameters) { + return updateWithResponseAsync(resourceGroupName, serverName, migrationName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -524,36 +519,36 @@ public Mono updateAsync(String subscriptionId, String re * Updates an existing migration. The request body can contain one to many of the mutable properties present in the * migration definition. Certain property updates initiate migration state transitions. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for updating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required to update an existing migration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource along with {@link Response}. + * @return properties of a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, MigrationResourceForPatch parameters, Context context) { + public Response updateWithResponse(String resourceGroupName, String serverName, + String migrationName, MigrationResourceForPatch parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { + if (this.client.getSubscriptionId() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { + if (serverName == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (migrationName == null) { throw LOGGER.atError() @@ -566,347 +561,471 @@ public Response updateWithResponse(String subscriptionId parameters.validate(); } final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), subscriptionId, - resourceGroupName, targetDbServerName, migrationName, parameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, parameters, accept, context); } /** * Updates an existing migration. The request body can contain one to many of the mutable properties present in the * migration definition. Certain property updates initiate migration state transitions. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for updating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required to update an existing migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource. + * @return properties of a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationResourceInner update(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, MigrationResourceForPatch parameters) { - return updateWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, parameters, - Context.NONE).getValue(); + public MigrationInner update(String resourceGroupName, String serverName, String migrationName, + MigrationResourceForPatch parameters) { + return updateWithResponse(resourceGroupName, serverName, migrationName, parameters, Context.NONE).getValue(); } /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return properties of a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName) { + public Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, + String migrationName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (migrationName == null) { return Mono.error(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - subscriptionId, resourceGroupName, targetDbServerName, migrationName, accept, context)) + .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return properties of a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName) { - return deleteWithResponseAsync(subscriptionId, resourceGroupName, targetDbServerName, migrationName) - .flatMap(ignored -> Mono.empty()); + public Mono cancelAsync(String resourceGroupName, String serverName, String migrationName) { + return cancelWithResponseAsync(resourceGroupName, serverName, migrationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return properties of a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String subscriptionId, String resourceGroupName, String targetDbServerName, + public Response cancelWithResponse(String resourceGroupName, String serverName, String migrationName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { + if (this.client.getSubscriptionId() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { + if (serverName == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (migrationName == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); } final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), subscriptionId, - resourceGroupName, targetDbServerName, migrationName, accept, context); + return service.cancelSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, accept, context); } /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return properties of a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName) { - deleteWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, Context.NONE); + public MigrationInner cancel(String resourceGroupName, String serverName, String migrationName) { + return cancelWithResponse(resourceGroupName, serverName, migrationName, Context.NONE).getValue(); } /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationListFilter Migration list filter. Retrieves either active migrations or all migrations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationListFilter Migration list filter. Indicates if the request should retrieve only active migrations + * or all migrations. Defaults to Active. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 migration resources along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of migrations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByTargetServerSinglePageAsync(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationListFilter migrationListFilter) { + private Mono> listByTargetServerSinglePageAsync(String resourceGroupName, + String serverName, MigrationListFilter migrationListFilter) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByTargetServer(this.client.getEndpoint(), this.client.getApiVersion(), - subscriptionId, resourceGroupName, targetDbServerName, migrationListFilter, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationListFilter, 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 migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationListFilter Migration list filter. Retrieves either active migrations or all migrations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationListFilter Migration list filter. Indicates if the request should retrieve only active migrations + * or all migrations. Defaults to Active. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 migration resources as paginated response with {@link PagedFlux}. + * @return list of migrations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByTargetServerAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, MigrationListFilter migrationListFilter) { - return new PagedFlux<>(() -> listByTargetServerSinglePageAsync(subscriptionId, resourceGroupName, - targetDbServerName, migrationListFilter), nextLink -> listByTargetServerNextSinglePageAsync(nextLink)); + public PagedFlux listByTargetServerAsync(String resourceGroupName, String serverName, + MigrationListFilter migrationListFilter) { + return new PagedFlux<>( + () -> listByTargetServerSinglePageAsync(resourceGroupName, serverName, migrationListFilter), + nextLink -> listByTargetServerNextSinglePageAsync(nextLink)); } /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 migration resources as paginated response with {@link PagedFlux}. + * @return list of migrations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByTargetServerAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName) { + public PagedFlux listByTargetServerAsync(String resourceGroupName, String serverName) { final MigrationListFilter migrationListFilter = null; - return new PagedFlux<>(() -> listByTargetServerSinglePageAsync(subscriptionId, resourceGroupName, - targetDbServerName, migrationListFilter), nextLink -> listByTargetServerNextSinglePageAsync(nextLink)); + return new PagedFlux<>( + () -> listByTargetServerSinglePageAsync(resourceGroupName, serverName, migrationListFilter), + nextLink -> listByTargetServerNextSinglePageAsync(nextLink)); } /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationListFilter Migration list filter. Retrieves either active migrations or all migrations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationListFilter Migration list filter. Indicates if the request should retrieve only active migrations + * or all migrations. Defaults to Active. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 migration resources along with {@link PagedResponse}. + * @return list of migrations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByTargetServerSinglePage(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationListFilter migrationListFilter) { + private PagedResponse listByTargetServerSinglePage(String resourceGroupName, String serverName, + MigrationListFilter migrationListFilter) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { + if (this.client.getSubscriptionId() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { + if (serverName == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByTargetServerSync(this.client.getEndpoint(), this.client.getApiVersion(), subscriptionId, - resourceGroupName, targetDbServerName, migrationListFilter, accept, Context.NONE); + Response res = service.listByTargetServerSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, + migrationListFilter, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationListFilter Migration list filter. Retrieves either active migrations or all migrations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationListFilter Migration list filter. Indicates if the request should retrieve only active migrations + * or all migrations. Defaults to Active. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 migration resources along with {@link PagedResponse}. + * @return list of migrations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByTargetServerSinglePage(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationListFilter migrationListFilter, Context context) { + private PagedResponse listByTargetServerSinglePage(String resourceGroupName, String serverName, + MigrationListFilter migrationListFilter, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { + if (this.client.getSubscriptionId() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { + if (serverName == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByTargetServerSync(this.client.getEndpoint(), this.client.getApiVersion(), subscriptionId, - resourceGroupName, targetDbServerName, migrationListFilter, accept, context); + Response res + = service.listByTargetServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationListFilter, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 migration resources as paginated response with {@link PagedIterable}. + * @return list of migrations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByTargetServer(String subscriptionId, String resourceGroupName, - String targetDbServerName) { + public PagedIterable listByTargetServer(String resourceGroupName, String serverName) { final MigrationListFilter migrationListFilter = null; - return new PagedIterable<>(() -> listByTargetServerSinglePage(subscriptionId, resourceGroupName, - targetDbServerName, migrationListFilter), nextLink -> listByTargetServerNextSinglePage(nextLink)); + return new PagedIterable<>( + () -> listByTargetServerSinglePage(resourceGroupName, serverName, migrationListFilter), + nextLink -> listByTargetServerNextSinglePage(nextLink)); } /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationListFilter Migration list filter. Retrieves either active migrations or all migrations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationListFilter Migration list filter. Indicates if the request should retrieve only active migrations + * or all migrations. Defaults to Active. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 migration resources as paginated response with {@link PagedIterable}. + * @return list of migrations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByTargetServer(String subscriptionId, String resourceGroupName, - String targetDbServerName, MigrationListFilter migrationListFilter, Context context) { - return new PagedIterable<>(() -> listByTargetServerSinglePage(subscriptionId, resourceGroupName, - targetDbServerName, migrationListFilter, context), + public PagedIterable listByTargetServer(String resourceGroupName, String serverName, + MigrationListFilter migrationListFilter, Context context) { + return new PagedIterable<>( + () -> listByTargetServerSinglePage(resourceGroupName, serverName, migrationListFilter, context), nextLink -> listByTargetServerNextSinglePage(nextLink, context)); } + /** + * Check the validity and availability of the given name, to assign it to a new migration. + * + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a migration name along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkNameAvailabilityWithResponseAsync( + String resourceGroupName, String serverName, MigrationNameAvailabilityInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Check the validity and availability of the given name, to assign it to a new migration. + * + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a migration name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkNameAvailabilityAsync(String resourceGroupName, String serverName, + MigrationNameAvailabilityInner parameters) { + return checkNameAvailabilityWithResponseAsync(resourceGroupName, serverName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Check the validity and availability of the given name, to assign it to a new migration. + * + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a migration name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkNameAvailabilityWithResponse(String resourceGroupName, + String serverName, MigrationNameAvailabilityInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return service.checkNameAvailabilitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); + } + + /** + * Check the validity and availability of the given name, to assign it to a new migration. + * + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a migration name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MigrationNameAvailabilityInner checkNameAvailability(String resourceGroupName, String serverName, + MigrationNameAvailabilityInner parameters) { + return checkNameAvailabilityWithResponse(resourceGroupName, serverName, parameters, Context.NONE).getValue(); + } + /** * Get the next page of items. * @@ -914,10 +1033,10 @@ public PagedIterable listByTargetServer(String subscript * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 migration resources along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of migrations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByTargetServerNextSinglePageAsync(String nextLink) { + private Mono> listByTargetServerNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -929,8 +1048,8 @@ private Mono> listByTargetServerNextSingle return FluxUtil .withContext( context -> service.listByTargetServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .>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())); } @@ -941,10 +1060,10 @@ private Mono> listByTargetServerNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 migration resources along with {@link PagedResponse}. + * @return list of migrations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByTargetServerNextSinglePage(String nextLink) { + private PagedResponse listByTargetServerNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -955,7 +1074,7 @@ private PagedResponse listByTargetServerNextSinglePage(S "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByTargetServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -969,10 +1088,10 @@ private PagedResponse listByTargetServerNextSinglePage(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of migration resources along with {@link PagedResponse}. + * @return list of migrations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByTargetServerNextSinglePage(String nextLink, Context context) { + private PagedResponse listByTargetServerNextSinglePage(String nextLink, Context context) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -983,7 +1102,7 @@ private PagedResponse listByTargetServerNextSinglePage(S "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByTargetServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsImpl.java index f5f7fee79ce3..2949ce96596b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsImpl.java @@ -10,9 +10,11 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Migration; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationListFilter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResource; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationNameAvailability; import com.azure.resourcemanager.postgresqlflexibleserver.models.Migrations; public final class MigrationsImpl implements Migrations { @@ -28,116 +30,91 @@ public MigrationsImpl(MigrationsClient innerClient, this.serviceManager = serviceManager; } - public Response getWithResponse(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, context); + public Response getWithResponse(String resourceGroupName, String serverName, String migrationName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, serverName, migrationName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new MigrationResourceImpl(inner.getValue(), this.manager())); + new MigrationImpl(inner.getValue(), this.manager())); } else { return null; } } - public MigrationResource get(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName) { - MigrationResourceInner inner - = this.serviceClient().get(subscriptionId, resourceGroupName, targetDbServerName, migrationName); + public Migration get(String resourceGroupName, String serverName, String migrationName) { + MigrationInner inner = this.serviceClient().get(resourceGroupName, serverName, migrationName); if (inner != null) { - return new MigrationResourceImpl(inner, this.manager()); + return new MigrationImpl(inner, this.manager()); } else { return null; } } - public Response deleteWithResponse(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, Context context) { - return this.serviceClient() - .deleteWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, context); + public Response cancelWithResponse(String resourceGroupName, String serverName, String migrationName, + Context context) { + Response inner + = this.serviceClient().cancelWithResponse(resourceGroupName, serverName, migrationName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MigrationImpl(inner.getValue(), this.manager())); + } else { + return null; + } } - public void delete(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName) { - this.serviceClient().delete(subscriptionId, resourceGroupName, targetDbServerName, migrationName); + public Migration cancel(String resourceGroupName, String serverName, String migrationName) { + MigrationInner inner = this.serviceClient().cancel(resourceGroupName, serverName, migrationName); + if (inner != null) { + return new MigrationImpl(inner, this.manager()); + } else { + return null; + } } - public PagedIterable listByTargetServer(String subscriptionId, String resourceGroupName, - String targetDbServerName) { - PagedIterable inner - = this.serviceClient().listByTargetServer(subscriptionId, resourceGroupName, targetDbServerName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MigrationResourceImpl(inner1, this.manager())); + public PagedIterable listByTargetServer(String resourceGroupName, String serverName) { + PagedIterable inner = this.serviceClient().listByTargetServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MigrationImpl(inner1, this.manager())); } - public PagedIterable listByTargetServer(String subscriptionId, String resourceGroupName, - String targetDbServerName, MigrationListFilter migrationListFilter, Context context) { - PagedIterable inner = this.serviceClient() - .listByTargetServer(subscriptionId, resourceGroupName, targetDbServerName, migrationListFilter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MigrationResourceImpl(inner1, this.manager())); + public PagedIterable listByTargetServer(String resourceGroupName, String serverName, + MigrationListFilter migrationListFilter, Context context) { + PagedIterable inner + = this.serviceClient().listByTargetServer(resourceGroupName, serverName, migrationListFilter, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MigrationImpl(inner1, this.manager())); } - public MigrationResource getById(String id) { - String subscriptionId = ResourceManagerUtils.getValueFromIdByName(id, "subscriptions"); - if (subscriptionId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'subscriptions'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String targetDbServerName = ResourceManagerUtils.getValueFromIdByName(id, "flexibleServers"); - if (targetDbServerName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id))); - } - String migrationName = ResourceManagerUtils.getValueFromIdByName(id, "migrations"); - if (migrationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'migrations'.", id))); + public Response checkNameAvailabilityWithResponse(String resourceGroupName, + String serverName, MigrationNameAvailabilityInner parameters, Context context) { + Response inner = this.serviceClient() + .checkNameAvailabilityWithResponse(resourceGroupName, serverName, parameters, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MigrationNameAvailabilityImpl(inner.getValue(), this.manager())); + } else { + return null; } - return this.getWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, Context.NONE) - .getValue(); } - public Response getByIdWithResponse(String id, Context context) { - String subscriptionId = ResourceManagerUtils.getValueFromIdByName(id, "subscriptions"); - if (subscriptionId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'subscriptions'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String targetDbServerName = ResourceManagerUtils.getValueFromIdByName(id, "flexibleServers"); - if (targetDbServerName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id))); - } - String migrationName = ResourceManagerUtils.getValueFromIdByName(id, "migrations"); - if (migrationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'migrations'.", id))); + public MigrationNameAvailability checkNameAvailability(String resourceGroupName, String serverName, + MigrationNameAvailabilityInner parameters) { + MigrationNameAvailabilityInner inner + = this.serviceClient().checkNameAvailability(resourceGroupName, serverName, parameters); + if (inner != null) { + return new MigrationNameAvailabilityImpl(inner, this.manager()); + } else { + return null; } - return this.getWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, context); } - public void deleteById(String id) { - String subscriptionId = ResourceManagerUtils.getValueFromIdByName(id, "subscriptions"); - if (subscriptionId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'subscriptions'.", id))); - } + public Migration getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String targetDbServerName = ResourceManagerUtils.getValueFromIdByName(id, "flexibleServers"); - if (targetDbServerName == null) { + String serverName = ResourceManagerUtils.getValueFromIdByName(id, "flexibleServers"); + if (serverName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id))); } @@ -146,22 +123,17 @@ public void deleteById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'migrations'.", id))); } - this.deleteWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, Context.NONE); + return this.getWithResponse(resourceGroupName, serverName, migrationName, Context.NONE).getValue(); } - public Response deleteByIdWithResponse(String id, Context context) { - String subscriptionId = ResourceManagerUtils.getValueFromIdByName(id, "subscriptions"); - if (subscriptionId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'subscriptions'.", id))); - } + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String targetDbServerName = ResourceManagerUtils.getValueFromIdByName(id, "flexibleServers"); - if (targetDbServerName == null) { + String serverName = ResourceManagerUtils.getValueFromIdByName(id, "flexibleServers"); + if (serverName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id))); } @@ -170,7 +142,7 @@ public Response deleteByIdWithResponse(String id, Context context) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'migrations'.", id))); } - return this.deleteWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, context); + return this.getWithResponse(resourceGroupName, serverName, migrationName, context); } private MigrationsClient serviceClient() { @@ -181,7 +153,7 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man return this.serviceManager; } - public MigrationResourceImpl define(String name) { - return new MigrationResourceImpl(name, this.manager()); + public MigrationImpl define(String name) { + return new MigrationImpl(name, this.manager()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesClientImpl.java new file mode 100644 index 000000000000..55d6aabf7783 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesClientImpl.java @@ -0,0 +1,316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.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.core.util.logging.ClientLogger; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in NameAvailabilitiesClient. + */ +public final class NameAvailabilitiesClientImpl implements NameAvailabilitiesClient { + /** + * The proxy service used to perform REST calls. + */ + private final NameAvailabilitiesService service; + + /** + * The service client containing this operation class. + */ + private final PostgreSqlManagementClientImpl client; + + /** + * Initializes an instance of NameAvailabilitiesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NameAvailabilitiesClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(NameAvailabilitiesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PostgreSqlManagementClientNameAvailabilities to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PostgreSqlManagementClientNameAvailabilities") + public interface NameAvailabilitiesService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkGlobally(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") CheckNameAvailabilityRequest parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response checkGloballySync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") CheckNameAvailabilityRequest parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkWithLocation(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, + @BodyParam("application/json") CheckNameAvailabilityRequest parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response checkWithLocationSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, + @BodyParam("application/json") CheckNameAvailabilityRequest parameters, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + checkGloballyWithResponseAsync(CheckNameAvailabilityRequest parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.checkGlobally(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkGloballyAsync(CheckNameAvailabilityRequest parameters) { + return checkGloballyWithResponseAsync(parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkGloballyWithResponse(CheckNameAvailabilityRequest parameters, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return service.checkGloballySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), parameters, accept, context); + } + + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NameAvailabilityModelInner checkGlobally(CheckNameAvailabilityRequest parameters) { + return checkGloballyWithResponse(parameters, Context.NONE).getValue(); + } + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkWithLocationWithResponseAsync(String locationName, + CheckNameAvailabilityRequest parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.checkWithLocation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkWithLocationAsync(String locationName, + CheckNameAvailabilityRequest parameters) { + return checkWithLocationWithResponseAsync(locationName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkWithLocationWithResponse(String locationName, + CheckNameAvailabilityRequest parameters, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return service.checkWithLocationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, parameters, accept, context); + } + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NameAvailabilityModelInner checkWithLocation(String locationName, CheckNameAvailabilityRequest parameters) { + return checkWithLocationWithResponse(locationName, parameters, Context.NONE).getValue(); + } + + private static final ClientLogger LOGGER = new ClientLogger(NameAvailabilitiesClientImpl.class); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesImpl.java new file mode 100644 index 000000000000..d919ecebe8c4 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesImpl.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; +import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailabilities; +import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailabilityModel; + +public final class NameAvailabilitiesImpl implements NameAvailabilities { + private static final ClientLogger LOGGER = new ClientLogger(NameAvailabilitiesImpl.class); + + private final NameAvailabilitiesClient innerClient; + + private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; + + public NameAvailabilitiesImpl(NameAvailabilitiesClient innerClient, + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response checkGloballyWithResponse(CheckNameAvailabilityRequest parameters, + Context context) { + Response inner + = this.serviceClient().checkGloballyWithResponse(parameters, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NameAvailabilityModelImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NameAvailabilityModel checkGlobally(CheckNameAvailabilityRequest parameters) { + NameAvailabilityModelInner inner = this.serviceClient().checkGlobally(parameters); + if (inner != null) { + return new NameAvailabilityModelImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response checkWithLocationWithResponse(String locationName, + CheckNameAvailabilityRequest parameters, Context context) { + Response inner + = this.serviceClient().checkWithLocationWithResponse(locationName, parameters, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NameAvailabilityModelImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NameAvailabilityModel checkWithLocation(String locationName, CheckNameAvailabilityRequest parameters) { + NameAvailabilityModelInner inner = this.serviceClient().checkWithLocation(locationName, parameters); + if (inner != null) { + return new NameAvailabilityModelImpl(inner, this.manager()); + } else { + return null; + } + } + + private NameAvailabilitiesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityModelImpl.java similarity index 81% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityModelImpl.java index a6c3cc180e8a..0d9e63df1f11 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityModelImpl.java @@ -4,16 +4,16 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityReason; -import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailabilityModel; -public final class NameAvailabilityImpl implements NameAvailability { - private NameAvailabilityInner innerObject; +public final class NameAvailabilityModelImpl implements NameAvailabilityModel { + private NameAvailabilityModelInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - NameAvailabilityImpl(NameAvailabilityInner innerObject, + NameAvailabilityModelImpl(NameAvailabilityModelInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -39,7 +39,7 @@ public String type() { return this.innerModel().type(); } - public NameAvailabilityInner innerModel() { + public NameAvailabilityModelInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/IndexRecommendationResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ObjectRecommendationImpl.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/IndexRecommendationResourceImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ObjectRecommendationImpl.java index 2bd529464728..682345629727 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/IndexRecommendationResourceImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ObjectRecommendationImpl.java @@ -5,23 +5,23 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.IndexRecommendationResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.ImpactRecord; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationDetails; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResourcePropertiesAnalyzedWorkload; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResourcePropertiesImplementationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendation; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesAnalyzedWorkload; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesImplementationDetails; import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeEnum; import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; -public final class IndexRecommendationResourceImpl implements IndexRecommendationResource { - private IndexRecommendationResourceInner innerObject; +public final class ObjectRecommendationImpl implements ObjectRecommendation { + private ObjectRecommendationInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - IndexRecommendationResourceImpl(IndexRecommendationResourceInner innerObject, + ObjectRecommendationImpl(ObjectRecommendationInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -39,6 +39,10 @@ public String type() { return this.innerModel().type(); } + public String kind() { + return this.innerModel().kind(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -68,15 +72,19 @@ public String recommendationReason() { return this.innerModel().recommendationReason(); } + public String currentState() { + return this.innerModel().currentState(); + } + public RecommendationTypeEnum recommendationType() { return this.innerModel().recommendationType(); } - public IndexRecommendationResourcePropertiesImplementationDetails implementationDetails() { + public ObjectRecommendationPropertiesImplementationDetails implementationDetails() { return this.innerModel().implementationDetails(); } - public IndexRecommendationResourcePropertiesAnalyzedWorkload analyzedWorkload() { + public ObjectRecommendationPropertiesAnalyzedWorkload analyzedWorkload() { return this.innerModel().analyzedWorkload(); } @@ -89,11 +97,11 @@ public List estimatedImpact() { } } - public IndexRecommendationDetails details() { + public ObjectRecommendationDetails details() { return this.innerModel().details(); } - public IndexRecommendationResourceInner innerModel() { + public ObjectRecommendationInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsClientImpl.java index 3b2498e941a3..fdbc9e1814e2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsClientImpl.java @@ -28,7 +28,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.OperationsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.OperationInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OperationListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OperationList; import reactor.core.publisher.Mono; /** @@ -61,43 +61,43 @@ public final class OperationsClientImpl implements OperationsClient { * to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.DBforPostgreSQL/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.DBforPostgreSQL/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations along with {@link PagedResponse} on successful completion of + * @return list of resource provider operations along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -116,11 +116,11 @@ private Mono> listSinglePageAsync() { } /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations as paginated response with {@link PagedFlux}. + * @return list of resource provider operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync() { @@ -128,11 +128,11 @@ public PagedFlux listAsync() { } /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations along with {@link PagedResponse}. + * @return list of resource provider operations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage() { @@ -142,20 +142,20 @@ private PagedResponse listSinglePage() { "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations along with {@link PagedResponse}. + * @return list of resource provider operations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(Context context) { @@ -165,18 +165,18 @@ private PagedResponse listSinglePage(Context context) { "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations as paginated response with {@link PagedIterable}. + * @return list of resource provider operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -184,13 +184,13 @@ public PagedIterable list() { } /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations as paginated response with {@link PagedIterable}. + * @return list of resource provider operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -204,7 +204,7 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 resource provider operations along with {@link PagedResponse} on successful completion of + * @return list of resource provider operations along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -230,7 +230,7 @@ private Mono> listNextSinglePageAsync(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 resource provider operations along with {@link PagedResponse}. + * @return list of resource provider operations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { @@ -244,8 +244,7 @@ private PagedResponse listNextSinglePage(String nextLink) { "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -258,7 +257,7 @@ private PagedResponse listNextSinglePage(String nextLink) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations along with {@link PagedResponse}. + * @return list of resource provider operations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { @@ -272,7 +271,7 @@ private PagedResponse listNextSinglePage(String nextLink, Contex "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlManagementClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlManagementClientImpl.java index 47abf6881f68..7e358d1905d3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlManagementClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlManagementClientImpl.java @@ -26,33 +26,28 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CheckNameAvailabilitiesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CheckNameAvailabilityWithLocationsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByLocationsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByServersClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapturedLogsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.FlexibleServersClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.GetPrivateDnsZoneSuffixesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LocationBasedCapabilitiesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LogFilesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LtrBackupOperationsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.OperationsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PostgreSqlManagementClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionOperationsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateDnsZoneSuffixesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.QuotaUsagesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ReplicasClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ResourceProvidersClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerCapabilitiesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningConfigurationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningIndexesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualNetworkSubnetUsagesClient; import java.io.IOException; @@ -154,87 +149,101 @@ public Duration getDefaultPollInterval() { } /** - * The AdministratorsClient object to access its operations. + * The AdministratorsMicrosoftEntrasClient object to access its operations. */ - private final AdministratorsClient administrators; + private final AdministratorsMicrosoftEntrasClient administratorsMicrosoftEntras; /** - * Gets the AdministratorsClient object to access its operations. + * Gets the AdministratorsMicrosoftEntrasClient object to access its operations. * - * @return the AdministratorsClient object. + * @return the AdministratorsMicrosoftEntrasClient object. */ - public AdministratorsClient getAdministrators() { - return this.administrators; + public AdministratorsMicrosoftEntrasClient getAdministratorsMicrosoftEntras() { + return this.administratorsMicrosoftEntras; } /** - * The BackupsClient object to access its operations. + * The AdvancedThreatProtectionSettingsClient object to access its operations. */ - private final BackupsClient backups; + private final AdvancedThreatProtectionSettingsClient advancedThreatProtectionSettings; /** - * Gets the BackupsClient object to access its operations. + * Gets the AdvancedThreatProtectionSettingsClient object to access its operations. * - * @return the BackupsClient object. + * @return the AdvancedThreatProtectionSettingsClient object. */ - public BackupsClient getBackups() { - return this.backups; + public AdvancedThreatProtectionSettingsClient getAdvancedThreatProtectionSettings() { + return this.advancedThreatProtectionSettings; } /** - * The LocationBasedCapabilitiesClient object to access its operations. + * The ServerThreatProtectionSettingsClient object to access its operations. */ - private final LocationBasedCapabilitiesClient locationBasedCapabilities; + private final ServerThreatProtectionSettingsClient serverThreatProtectionSettings; /** - * Gets the LocationBasedCapabilitiesClient object to access its operations. + * Gets the ServerThreatProtectionSettingsClient object to access its operations. * - * @return the LocationBasedCapabilitiesClient object. + * @return the ServerThreatProtectionSettingsClient object. */ - public LocationBasedCapabilitiesClient getLocationBasedCapabilities() { - return this.locationBasedCapabilities; + public ServerThreatProtectionSettingsClient getServerThreatProtectionSettings() { + return this.serverThreatProtectionSettings; } /** - * The ServerCapabilitiesClient object to access its operations. + * The BackupsAutomaticAndOnDemandsClient object to access its operations. */ - private final ServerCapabilitiesClient serverCapabilities; + private final BackupsAutomaticAndOnDemandsClient backupsAutomaticAndOnDemands; /** - * Gets the ServerCapabilitiesClient object to access its operations. + * Gets the BackupsAutomaticAndOnDemandsClient object to access its operations. * - * @return the ServerCapabilitiesClient object. + * @return the BackupsAutomaticAndOnDemandsClient object. */ - public ServerCapabilitiesClient getServerCapabilities() { - return this.serverCapabilities; + public BackupsAutomaticAndOnDemandsClient getBackupsAutomaticAndOnDemands() { + return this.backupsAutomaticAndOnDemands; } /** - * The CheckNameAvailabilitiesClient object to access its operations. + * The CapabilitiesByLocationsClient object to access its operations. */ - private final CheckNameAvailabilitiesClient checkNameAvailabilities; + private final CapabilitiesByLocationsClient capabilitiesByLocations; /** - * Gets the CheckNameAvailabilitiesClient object to access its operations. + * Gets the CapabilitiesByLocationsClient object to access its operations. * - * @return the CheckNameAvailabilitiesClient object. + * @return the CapabilitiesByLocationsClient object. */ - public CheckNameAvailabilitiesClient getCheckNameAvailabilities() { - return this.checkNameAvailabilities; + public CapabilitiesByLocationsClient getCapabilitiesByLocations() { + return this.capabilitiesByLocations; } /** - * The CheckNameAvailabilityWithLocationsClient object to access its operations. + * The CapabilitiesByServersClient object to access its operations. */ - private final CheckNameAvailabilityWithLocationsClient checkNameAvailabilityWithLocations; + private final CapabilitiesByServersClient capabilitiesByServers; /** - * Gets the CheckNameAvailabilityWithLocationsClient object to access its operations. + * Gets the CapabilitiesByServersClient object to access its operations. * - * @return the CheckNameAvailabilityWithLocationsClient object. + * @return the CapabilitiesByServersClient object. */ - public CheckNameAvailabilityWithLocationsClient getCheckNameAvailabilityWithLocations() { - return this.checkNameAvailabilityWithLocations; + public CapabilitiesByServersClient getCapabilitiesByServers() { + return this.capabilitiesByServers; + } + + /** + * The CapturedLogsClient object to access its operations. + */ + private final CapturedLogsClient capturedLogs; + + /** + * Gets the CapturedLogsClient object to access its operations. + * + * @return the CapturedLogsClient object. + */ + public CapturedLogsClient getCapturedLogs() { + return this.capturedLogs; } /** @@ -280,45 +289,17 @@ public FirewallRulesClient getFirewallRules() { } /** - * The ServersClient object to access its operations. - */ - private final ServersClient servers; - - /** - * Gets the ServersClient object to access its operations. - * - * @return the ServersClient object. - */ - public ServersClient getServers() { - return this.servers; - } - - /** - * The FlexibleServersClient object to access its operations. + * The BackupsLongTermRetentionsClient object to access its operations. */ - private final FlexibleServersClient flexibleServers; + private final BackupsLongTermRetentionsClient backupsLongTermRetentions; /** - * Gets the FlexibleServersClient object to access its operations. + * Gets the BackupsLongTermRetentionsClient object to access its operations. * - * @return the FlexibleServersClient object. + * @return the BackupsLongTermRetentionsClient object. */ - public FlexibleServersClient getFlexibleServers() { - return this.flexibleServers; - } - - /** - * The LtrBackupOperationsClient object to access its operations. - */ - private final LtrBackupOperationsClient ltrBackupOperations; - - /** - * Gets the LtrBackupOperationsClient object to access its operations. - * - * @return the LtrBackupOperationsClient object. - */ - public LtrBackupOperationsClient getLtrBackupOperations() { - return this.ltrBackupOperations; + public BackupsLongTermRetentionsClient getBackupsLongTermRetentions() { + return this.backupsLongTermRetentions; } /** @@ -336,17 +317,17 @@ public MigrationsClient getMigrations() { } /** - * The ResourceProvidersClient object to access its operations. + * The NameAvailabilitiesClient object to access its operations. */ - private final ResourceProvidersClient resourceProviders; + private final NameAvailabilitiesClient nameAvailabilities; /** - * Gets the ResourceProvidersClient object to access its operations. + * Gets the NameAvailabilitiesClient object to access its operations. * - * @return the ResourceProvidersClient object. + * @return the NameAvailabilitiesClient object. */ - public ResourceProvidersClient getResourceProviders() { - return this.resourceProviders; + public NameAvailabilitiesClient getNameAvailabilities() { + return this.nameAvailabilities; } /** @@ -364,17 +345,17 @@ public OperationsClient getOperations() { } /** - * The GetPrivateDnsZoneSuffixesClient object to access its operations. + * The PrivateDnsZoneSuffixesClient object to access its operations. */ - private final GetPrivateDnsZoneSuffixesClient getPrivateDnsZoneSuffixes; + private final PrivateDnsZoneSuffixesClient privateDnsZoneSuffixes; /** - * Gets the GetPrivateDnsZoneSuffixesClient object to access its operations. + * Gets the PrivateDnsZoneSuffixesClient object to access its operations. * - * @return the GetPrivateDnsZoneSuffixesClient object. + * @return the PrivateDnsZoneSuffixesClient object. */ - public GetPrivateDnsZoneSuffixesClient getGetPrivateDnsZoneSuffixes() { - return this.getPrivateDnsZoneSuffixes; + public PrivateDnsZoneSuffixesClient getPrivateDnsZoneSuffixes() { + return this.privateDnsZoneSuffixes; } /** @@ -391,20 +372,6 @@ public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { return this.privateEndpointConnections; } - /** - * The PrivateEndpointConnectionOperationsClient object to access its operations. - */ - private final PrivateEndpointConnectionOperationsClient privateEndpointConnectionOperations; - - /** - * Gets the PrivateEndpointConnectionOperationsClient object to access its operations. - * - * @return the PrivateEndpointConnectionOperationsClient object. - */ - public PrivateEndpointConnectionOperationsClient getPrivateEndpointConnectionOperations() { - return this.privateEndpointConnectionOperations; - } - /** * The PrivateLinkResourcesClient object to access its operations. */ @@ -448,73 +415,31 @@ public ReplicasClient getReplicas() { } /** - * The LogFilesClient object to access its operations. - */ - private final LogFilesClient logFiles; - - /** - * Gets the LogFilesClient object to access its operations. - * - * @return the LogFilesClient object. - */ - public LogFilesClient getLogFiles() { - return this.logFiles; - } - - /** - * The ServerThreatProtectionSettingsClient object to access its operations. - */ - private final ServerThreatProtectionSettingsClient serverThreatProtectionSettings; - - /** - * Gets the ServerThreatProtectionSettingsClient object to access its operations. - * - * @return the ServerThreatProtectionSettingsClient object. - */ - public ServerThreatProtectionSettingsClient getServerThreatProtectionSettings() { - return this.serverThreatProtectionSettings; - } - - /** - * The TuningOptionsClient object to access its operations. - */ - private final TuningOptionsClient tuningOptions; - - /** - * Gets the TuningOptionsClient object to access its operations. - * - * @return the TuningOptionsClient object. - */ - public TuningOptionsClient getTuningOptions() { - return this.tuningOptions; - } - - /** - * The TuningIndexesClient object to access its operations. + * The ServersClient object to access its operations. */ - private final TuningIndexesClient tuningIndexes; + private final ServersClient servers; /** - * Gets the TuningIndexesClient object to access its operations. + * Gets the ServersClient object to access its operations. * - * @return the TuningIndexesClient object. + * @return the ServersClient object. */ - public TuningIndexesClient getTuningIndexes() { - return this.tuningIndexes; + public ServersClient getServers() { + return this.servers; } /** - * The TuningConfigurationsClient object to access its operations. + * The TuningOptionsOperationsClient object to access its operations. */ - private final TuningConfigurationsClient tuningConfigurations; + private final TuningOptionsOperationsClient tuningOptionsOperations; /** - * Gets the TuningConfigurationsClient object to access its operations. + * Gets the TuningOptionsOperationsClient object to access its operations. * - * @return the TuningConfigurationsClient object. + * @return the TuningOptionsOperationsClient object. */ - public TuningConfigurationsClient getTuningConfigurations() { - return this.tuningConfigurations; + public TuningOptionsOperationsClient getTuningOptionsOperations() { + return this.tuningOptionsOperations; } /** @@ -562,33 +487,28 @@ public VirtualNetworkSubnetUsagesClient getVirtualNetworkSubnetUsages() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2025-01-01-preview"; - this.administrators = new AdministratorsClientImpl(this); - this.backups = new BackupsClientImpl(this); - this.locationBasedCapabilities = new LocationBasedCapabilitiesClientImpl(this); - this.serverCapabilities = new ServerCapabilitiesClientImpl(this); - this.checkNameAvailabilities = new CheckNameAvailabilitiesClientImpl(this); - this.checkNameAvailabilityWithLocations = new CheckNameAvailabilityWithLocationsClientImpl(this); + this.apiVersion = "2025-08-01"; + this.administratorsMicrosoftEntras = new AdministratorsMicrosoftEntrasClientImpl(this); + this.advancedThreatProtectionSettings = new AdvancedThreatProtectionSettingsClientImpl(this); + this.serverThreatProtectionSettings = new ServerThreatProtectionSettingsClientImpl(this); + this.backupsAutomaticAndOnDemands = new BackupsAutomaticAndOnDemandsClientImpl(this); + this.capabilitiesByLocations = new CapabilitiesByLocationsClientImpl(this); + this.capabilitiesByServers = new CapabilitiesByServersClientImpl(this); + this.capturedLogs = new CapturedLogsClientImpl(this); this.configurations = new ConfigurationsClientImpl(this); this.databases = new DatabasesClientImpl(this); this.firewallRules = new FirewallRulesClientImpl(this); - this.servers = new ServersClientImpl(this); - this.flexibleServers = new FlexibleServersClientImpl(this); - this.ltrBackupOperations = new LtrBackupOperationsClientImpl(this); + this.backupsLongTermRetentions = new BackupsLongTermRetentionsClientImpl(this); this.migrations = new MigrationsClientImpl(this); - this.resourceProviders = new ResourceProvidersClientImpl(this); + this.nameAvailabilities = new NameAvailabilitiesClientImpl(this); this.operations = new OperationsClientImpl(this); - this.getPrivateDnsZoneSuffixes = new GetPrivateDnsZoneSuffixesClientImpl(this); + this.privateDnsZoneSuffixes = new PrivateDnsZoneSuffixesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); - this.privateEndpointConnectionOperations = new PrivateEndpointConnectionOperationsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.quotaUsages = new QuotaUsagesClientImpl(this); this.replicas = new ReplicasClientImpl(this); - this.logFiles = new LogFilesClientImpl(this); - this.serverThreatProtectionSettings = new ServerThreatProtectionSettingsClientImpl(this); - this.tuningOptions = new TuningOptionsClientImpl(this); - this.tuningIndexes = new TuningIndexesClientImpl(this); - this.tuningConfigurations = new TuningConfigurationsClientImpl(this); + this.servers = new ServersClientImpl(this); + this.tuningOptionsOperations = new TuningOptionsOperationsClientImpl(this); this.virtualEndpoints = new VirtualEndpointsClientImpl(this); this.virtualNetworkSubnetUsages = new VirtualNetworkSubnetUsagesClientImpl(this); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesClientImpl.java similarity index 66% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesClientImpl.java index ec4159c5c1db..ba89783e72b5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesClientImpl.java @@ -21,17 +21,17 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.GetPrivateDnsZoneSuffixesClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateDnsZoneSuffixesClient; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in GetPrivateDnsZoneSuffixesClient. + * An instance of this class provides access to all the operations defined in PrivateDnsZoneSuffixesClient. */ -public final class GetPrivateDnsZoneSuffixesClientImpl implements GetPrivateDnsZoneSuffixesClient { +public final class PrivateDnsZoneSuffixesClientImpl implements PrivateDnsZoneSuffixesClient { /** * The proxy service used to perform REST calls. */ - private final GetPrivateDnsZoneSuffixesService service; + private final PrivateDnsZoneSuffixesService service; /** * The service client containing this operation class. @@ -39,48 +39,47 @@ public final class GetPrivateDnsZoneSuffixesClientImpl implements GetPrivateDnsZ private final PostgreSqlManagementClientImpl client; /** - * Initializes an instance of GetPrivateDnsZoneSuffixesClientImpl. + * Initializes an instance of PrivateDnsZoneSuffixesClientImpl. * * @param client the instance of the service client containing this operation class. */ - GetPrivateDnsZoneSuffixesClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(GetPrivateDnsZoneSuffixesService.class, client.getHttpPipeline(), + PrivateDnsZoneSuffixesClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(PrivateDnsZoneSuffixesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for PostgreSqlManagementClientGetPrivateDnsZoneSuffixes to be used by the + * The interface defining all the services for PostgreSqlManagementClientPrivateDnsZoneSuffixes to be used by the * proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface GetPrivateDnsZoneSuffixesService { + @ServiceInterface(name = "PostgreSqlManagementClientPrivateDnsZoneSuffixes") + public interface PrivateDnsZoneSuffixesService { @Headers({ "Content-Type: application/json" }) @Post("/providers/Microsoft.DBforPostgreSQL/getPrivateDnsZoneSuffix") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> execute(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/providers/Microsoft.DBforPostgreSQL/getPrivateDnsZoneSuffix") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response executeSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private DNS zone suffix in the cloud along with {@link Response} on successful completion of - * {@link Mono}. + * @return the private DNS zone suffix along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> executeWithResponseAsync() { + public Mono> getWithResponseAsync() { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -88,53 +87,53 @@ public Mono> executeWithResponseAsync() { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.execute(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private DNS zone suffix in the cloud on successful completion of {@link Mono}. + * @return the private DNS zone suffix on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono executeAsync() { - return executeWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync() { + return getWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private DNS zone suffix in the cloud along with {@link Response}. + * @return the private DNS zone suffix along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response executeWithResponse(Context context) { + public Response getWithResponse(Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return service.executeSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); } /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private DNS zone suffix in the cloud. + * @return the private DNS zone suffix. */ @ServiceMethod(returns = ReturnType.SINGLE) - public String execute() { - return executeWithResponse(Context.NONE).getValue(); + public String get() { + return getWithResponse(Context.NONE).getValue(); } - private static final ClientLogger LOGGER = new ClientLogger(GetPrivateDnsZoneSuffixesClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PrivateDnsZoneSuffixesClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesImpl.java similarity index 63% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesImpl.java index 3f7112b8a706..c1d0c8343b9b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesImpl.java @@ -7,31 +7,31 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.GetPrivateDnsZoneSuffixesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.models.GetPrivateDnsZoneSuffixes; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateDnsZoneSuffixesClient; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateDnsZoneSuffixes; -public final class GetPrivateDnsZoneSuffixesImpl implements GetPrivateDnsZoneSuffixes { - private static final ClientLogger LOGGER = new ClientLogger(GetPrivateDnsZoneSuffixesImpl.class); +public final class PrivateDnsZoneSuffixesImpl implements PrivateDnsZoneSuffixes { + private static final ClientLogger LOGGER = new ClientLogger(PrivateDnsZoneSuffixesImpl.class); - private final GetPrivateDnsZoneSuffixesClient innerClient; + private final PrivateDnsZoneSuffixesClient innerClient; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - public GetPrivateDnsZoneSuffixesImpl(GetPrivateDnsZoneSuffixesClient innerClient, + public PrivateDnsZoneSuffixesImpl(PrivateDnsZoneSuffixesClient innerClient, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response executeWithResponse(Context context) { - return this.serviceClient().executeWithResponse(context); + public Response getWithResponse(Context context) { + return this.serviceClient().getWithResponse(context); } - public String execute() { - return this.serviceClient().execute(); + public String get() { + return this.serviceClient().get(); } - private GetPrivateDnsZoneSuffixesClient serviceClient() { + private PrivateDnsZoneSuffixesClient serviceClient() { return this.innerClient; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsClientImpl.java deleted file mode 100644 index f43f461bf11e..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsClientImpl.java +++ /dev/null @@ -1,623 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionOperationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; -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 PrivateEndpointConnectionOperationsClient. - */ -public final class PrivateEndpointConnectionOperationsClientImpl implements PrivateEndpointConnectionOperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final PrivateEndpointConnectionOperationsService service; - - /** - * The service client containing this operation class. - */ - private final PostgreSqlManagementClientImpl client; - - /** - * Initializes an instance of PrivateEndpointConnectionOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PrivateEndpointConnectionOperationsClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(PrivateEndpointConnectionOperationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PostgreSqlManagementClientPrivateEndpointConnectionOperations to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface PrivateEndpointConnectionOperationsService { - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200, 201, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @BodyParam("application/json") PrivateEndpointConnectionInner parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200, 201, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @BodyParam("application/json") PrivateEndpointConnectionInner parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, - parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, parameters, - accept, Context.NONE); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, parameters, - accept, context); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( - String resourceGroupName, String serverName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, - this.client.getContext()); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( - String resourceGroupName, String serverName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters) { - Response response - = updateWithResponse(resourceGroupName, serverName, privateEndpointConnectionName, parameters); - return this.client.getLroResult(response, - PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, Context.NONE); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( - String resourceGroupName, String serverName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, Context context) { - Response response - = updateWithResponse(resourceGroupName, serverName, privateEndpointConnectionName, parameters, context); - return this.client.getLroResult(response, - PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, context); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - return beginUpdateAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - return beginUpdate(resourceGroupName, serverName, privateEndpointConnectionName, parameters).getFinalResult(); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { - return beginUpdate(resourceGroupName, serverName, privateEndpointConnectionName, parameters, context) - .getFinalResult(); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, - String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String serverName, - String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, accept, - Context.NONE); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String serverName, - String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, accept, - context); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, - String privateEndpointConnectionName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @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 serverName, - String privateEndpointConnectionName) { - Response response - = deleteWithResponse(resourceGroupName, serverName, privateEndpointConnectionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @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 serverName, - String privateEndpointConnectionName, Context context) { - Response response - = deleteWithResponse(resourceGroupName, serverName, privateEndpointConnectionName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName) { - return beginDeleteAsync(resourceGroupName, serverName, privateEndpointConnectionName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 serverName, String privateEndpointConnectionName) { - beginDelete(resourceGroupName, serverName, privateEndpointConnectionName).getFinalResult(); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 serverName, String privateEndpointConnectionName, - Context context) { - beginDelete(resourceGroupName, serverName, privateEndpointConnectionName, context).getFinalResult(); - } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionOperationsClientImpl.class); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsImpl.java deleted file mode 100644 index 9ab8e1072a5c..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionOperationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnection; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnectionOperations; - -public final class PrivateEndpointConnectionOperationsImpl implements PrivateEndpointConnectionOperations { - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionOperationsImpl.class); - - private final PrivateEndpointConnectionOperationsClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public PrivateEndpointConnectionOperationsImpl(PrivateEndpointConnectionOperationsClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PrivateEndpointConnection update(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - PrivateEndpointConnectionInner inner - = this.serviceClient().update(resourceGroupName, serverName, privateEndpointConnectionName, parameters); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public PrivateEndpointConnection update(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { - PrivateEndpointConnectionInner inner = this.serviceClient() - .update(resourceGroupName, serverName, privateEndpointConnectionName, parameters, context); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName) { - this.serviceClient().delete(resourceGroupName, serverName, privateEndpointConnectionName); - } - - public void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName, - Context context) { - this.serviceClient().delete(resourceGroupName, serverName, privateEndpointConnectionName, context); - } - - private PrivateEndpointConnectionOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsClientImpl.java index 413248c603bf..66d06037ace7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsClientImpl.java @@ -4,6 +4,8 @@ package com.azure.resourcemanager.postgresqlflexibleserver.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; @@ -11,6 +13,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -23,12 +26,18 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnectionListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnectionList; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -61,7 +70,7 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi * the proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientPrivateEndpointConnections") public interface PrivateEndpointConnectionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") @@ -83,11 +92,53 @@ Response getSync(@HostParam("$host") String endp @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @BodyParam("application/json") PrivateEndpointConnectionInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @BodyParam("application/json") PrivateEndpointConnectionInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -96,7 +147,7 @@ Mono> listByServer(@HostParam("$ho @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -105,7 +156,7 @@ Response listByServerSync(@HostParam("$host @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( + Mono> listByServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -113,7 +164,7 @@ Mono> listByServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( + Response listByServerNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -238,14 +289,524 @@ public PrivateEndpointConnectionInner get(String resourceGroupName, String serve } /** - * Gets all private endpoint connections on a server. + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private endpoint connection resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, + parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private endpoint connection resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, parameters, + accept, Context.NONE); + } + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private endpoint connection resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, parameters, + accept, context); + } + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( + String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, + this.client.getContext()); + } + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( + String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters) { + Response response + = updateWithResponse(resourceGroupName, serverName, privateEndpointConnectionName, parameters); + return this.client.getLroResult(response, + PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, Context.NONE); + } + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( + String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, Context context) { + Response response + = updateWithResponse(resourceGroupName, serverName, privateEndpointConnectionName, parameters, context); + return this.client.getLroResult(response, + PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, context); + } + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private endpoint connection resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + return beginUpdateAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + return beginUpdate(resourceGroupName, serverName, privateEndpointConnectionName, parameters).getFinalResult(); + } + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { + return beginUpdate(resourceGroupName, serverName, privateEndpointConnectionName, parameters, context) + .getFinalResult(); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String serverName, + String privateEndpointConnectionName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, accept, + Context.NONE); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String serverName, + String privateEndpointConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, accept, + context); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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 serverName, + String privateEndpointConnectionName) { + Response response + = deleteWithResponse(resourceGroupName, serverName, privateEndpointConnectionName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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 serverName, + String privateEndpointConnectionName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, serverName, privateEndpointConnectionName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName) { + return beginDeleteAsync(resourceGroupName, serverName, privateEndpointConnectionName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 serverName, String privateEndpointConnectionName) { + beginDelete(resourceGroupName, serverName, privateEndpointConnectionName).getFinalResult(); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 serverName, String privateEndpointConnectionName, + Context context) { + beginDelete(resourceGroupName, serverName, privateEndpointConnectionName, context).getFinalResult(); + } + + /** + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a server along with {@link PagedResponse} on successful completion of + * @return list of private endpoint connections along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -276,14 +837,14 @@ private Mono> listByServerSinglePa } /** - * Gets all private endpoint connections on a server. + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a server as paginated response with {@link PagedFlux}. + * @return list of private endpoint connections as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -292,14 +853,14 @@ public PagedFlux listByServerAsync(String resour } /** - * Gets all private endpoint connections on a server. + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a server along with {@link PagedResponse}. + * @return list of private endpoint connections along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, @@ -323,7 +884,7 @@ private PagedResponse listByServerSinglePage(Str .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -331,7 +892,7 @@ private PagedResponse listByServerSinglePage(Str } /** - * Gets all private endpoint connections on a server. + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -339,7 +900,7 @@ private PagedResponse listByServerSinglePage(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a server along with {@link PagedResponse}. + * @return list of private endpoint connections along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, @@ -363,7 +924,7 @@ private PagedResponse listByServerSinglePage(Str .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -371,14 +932,14 @@ private PagedResponse listByServerSinglePage(Str } /** - * Gets all private endpoint connections on a server. + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. + * @return list of private endpoint connections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -387,7 +948,7 @@ public PagedIterable listByServer(String resourc } /** - * Gets all private endpoint connections on a server. + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -395,7 +956,7 @@ public PagedIterable listByServer(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. + * @return list of private endpoint connections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName, @@ -411,7 +972,7 @@ public PagedIterable listByServer(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of + * @return list of private endpoint connections along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -438,7 +999,7 @@ private Mono> listByServerNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 private endpoint connections along with {@link PagedResponse}. + * @return list of private endpoint connections along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { @@ -452,7 +1013,7 @@ private PagedResponse listByServerNextSinglePage "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -466,7 +1027,7 @@ private PagedResponse listByServerNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 private endpoint connections along with {@link PagedResponse}. + * @return list of private endpoint connections along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { @@ -480,7 +1041,7 @@ private PagedResponse listByServerNextSinglePage "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsImpl.java index c5d58ff63e8a..f3ea45388ed1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsImpl.java @@ -50,6 +50,37 @@ public PrivateEndpointConnection get(String resourceGroupName, String serverName } } + public PrivateEndpointConnection update(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + PrivateEndpointConnectionInner inner + = this.serviceClient().update(resourceGroupName, serverName, privateEndpointConnectionName, parameters); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public PrivateEndpointConnection update(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { + PrivateEndpointConnectionInner inner = this.serviceClient() + .update(resourceGroupName, serverName, privateEndpointConnectionName, parameters, context); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName) { + this.serviceClient().delete(resourceGroupName, serverName, privateEndpointConnectionName); + } + + public void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName, + Context context) { + this.serviceClient().delete(resourceGroupName, serverName, privateEndpointConnectionName, context); + } + public PagedIterable listByServer(String resourceGroupName, String serverName) { PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesClientImpl.java index 40f14c5f6fd2..7d76c3a4eabc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesClientImpl.java @@ -28,7 +28,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkResourceListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkResourceList; import reactor.core.publisher.Mono; /** @@ -61,13 +61,13 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource * proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientPrivateLinkResources") public interface PrivateLinkResourcesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -76,7 +76,7 @@ Mono> listByServer(@HostParam("$host") S @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -103,7 +103,7 @@ Response getSync(@HostParam("$host") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( + Mono> listByServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -111,7 +111,7 @@ Mono> listByServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( + Response listByServerNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -202,7 +202,7 @@ private PagedResponse listByServerSinglePage(String re .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -242,7 +242,7 @@ private PagedResponse listByServerSinglePage(String re .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -405,8 +405,8 @@ public PrivateLinkResourceInner get(String resourceGroupName, String serverName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 private link resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the private link resources for PostgreSQL server along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -432,7 +432,7 @@ private Mono> listByServerNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 private link resources along with {@link PagedResponse}. + * @return the private link resources for PostgreSQL server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { @@ -446,7 +446,7 @@ private PagedResponse listByServerNextSinglePage(Strin "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -460,7 +460,7 @@ private PagedResponse listByServerNextSinglePage(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 private link resources along with {@link PagedResponse}. + * @return the private link resources for PostgreSQL server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { @@ -474,7 +474,7 @@ private PagedResponse listByServerNextSinglePage(Strin "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsagesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsagesClientImpl.java index 3176b3cda6d5..9b05338ae9e3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsagesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsagesClientImpl.java @@ -28,7 +28,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.QuotaUsagesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.QuotaUsageInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.QuotaUsagesListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.QuotaUsageList; import reactor.core.publisher.Mono; /** @@ -61,13 +61,13 @@ public final class QuotaUsagesClientImpl implements QuotaUsagesClient { * to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientQuotaUsages") public interface QuotaUsagesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/resourceType/flexibleServers/usages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); @@ -75,7 +75,7 @@ Mono> list(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/resourceType/flexibleServers/usages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); @@ -83,14 +83,14 @@ Response listSync(@HostParam("$host") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -166,7 +166,7 @@ private PagedResponse listSinglePage(String locationName) { .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -199,7 +199,7 @@ private PagedResponse listSinglePage(String locationName, Conte .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -244,8 +244,8 @@ public PagedIterable list(String locationName, Context context) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capability for the PostgreSQL server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return quota usages at specified location in a given subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -270,7 +270,7 @@ private Mono> listNextSinglePageAsync(String next * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capability for the PostgreSQL server along with {@link PagedResponse}. + * @return quota usages at specified location in a given subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { @@ -284,8 +284,7 @@ private PagedResponse listNextSinglePage(String nextLink) { "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -298,7 +297,7 @@ private PagedResponse listNextSinglePage(String nextLink) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capability for the PostgreSQL server along with {@link PagedResponse}. + * @return quota usages at specified location in a given subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { @@ -312,8 +311,7 @@ private PagedResponse listNextSinglePage(String nextLink, Conte "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasClientImpl.java index 1bc5202200de..85b5ec9f2a22 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasClientImpl.java @@ -28,7 +28,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ReplicasClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerList; import reactor.core.publisher.Mono; /** @@ -60,13 +60,13 @@ public final class ReplicasClientImpl implements ReplicasClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientReplicas") public interface ReplicasService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/replicas") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -75,14 +75,14 @@ Mono> listByServer(@HostParam("$host") String endpoin @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/replicas") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); } /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -118,7 +118,7 @@ private Mono> listByServerSinglePageAsync(String reso } /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -133,7 +133,7 @@ public PagedFlux listByServerAsync(String resourceGroupName, String } /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -163,15 +163,14 @@ private PagedResponse listByServerSinglePage(String resourceGroupNa .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null); } /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -203,15 +202,14 @@ private PagedResponse listByServerSinglePage(String resourceGroupNa .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null); } /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -226,7 +224,7 @@ public PagedIterable listByServer(String resourceGroupName, String } /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersClientImpl.java deleted file mode 100644 index 36067daeee8e..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersClientImpl.java +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.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.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ResourceProvidersClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ResourceProvidersClient. - */ -public final class ResourceProvidersClientImpl implements ResourceProvidersClient { - /** - * The proxy service used to perform REST calls. - */ - private final ResourceProvidersService service; - - /** - * The service client containing this operation class. - */ - private final PostgreSqlManagementClientImpl client; - - /** - * Initializes an instance of ResourceProvidersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ResourceProvidersClientImpl(PostgreSqlManagementClientImpl client) { - this.service - = RestProxy.create(ResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PostgreSqlManagementClientResourceProviders to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface ResourceProvidersService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/checkMigrationNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkMigrationNameAvailability( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, - @BodyParam("application/json") MigrationNameAvailabilityResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/checkMigrationNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response checkMigrationNameAvailabilitySync( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, - @BodyParam("application/json") MigrationNameAvailabilityResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration name's availability along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> checkMigrationNameAvailabilityWithResponseAsync( - String subscriptionId, String resourceGroupName, String targetDbServerName, - MigrationNameAvailabilityResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (targetDbServerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.checkMigrationNameAvailability(this.client.getEndpoint(), - this.client.getApiVersion(), subscriptionId, resourceGroupName, targetDbServerName, parameters, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration name's availability on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono checkMigrationNameAvailabilityAsync(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationNameAvailabilityResourceInner parameters) { - return checkMigrationNameAvailabilityWithResponseAsync(subscriptionId, resourceGroupName, targetDbServerName, - parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration name's availability along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkMigrationNameAvailabilityWithResponse( - String subscriptionId, String resourceGroupName, String targetDbServerName, - MigrationNameAvailabilityResourceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (targetDbServerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.checkMigrationNameAvailabilitySync(this.client.getEndpoint(), this.client.getApiVersion(), - subscriptionId, resourceGroupName, targetDbServerName, parameters, accept, context); - } - - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration name's availability. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationNameAvailabilityResourceInner checkMigrationNameAvailability(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationNameAvailabilityResourceInner parameters) { - return checkMigrationNameAvailabilityWithResponse(subscriptionId, resourceGroupName, targetDbServerName, - parameters, Context.NONE).getValue(); - } - - private static final ClientLogger LOGGER = new ClientLogger(ResourceProvidersClientImpl.class); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersImpl.java deleted file mode 100644 index 391186cd010a..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ResourceProvidersClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationNameAvailabilityResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ResourceProviders; - -public final class ResourceProvidersImpl implements ResourceProviders { - private static final ClientLogger LOGGER = new ClientLogger(ResourceProvidersImpl.class); - - private final ResourceProvidersClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public ResourceProvidersImpl(ResourceProvidersClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response checkMigrationNameAvailabilityWithResponse(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationNameAvailabilityResourceInner parameters, - Context context) { - Response inner = this.serviceClient() - .checkMigrationNameAvailabilityWithResponse(subscriptionId, resourceGroupName, targetDbServerName, - parameters, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new MigrationNameAvailabilityResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public MigrationNameAvailabilityResource checkMigrationNameAvailability(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationNameAvailabilityResourceInner parameters) { - MigrationNameAvailabilityResourceInner inner = this.serviceClient() - .checkMigrationNameAvailability(subscriptionId, resourceGroupName, targetDbServerName, parameters); - if (inner != null) { - return new MigrationNameAvailabilityResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - private ResourceProvidersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerImpl.java index 1abda05900b2..b4960aae5c93 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerImpl.java @@ -10,23 +10,28 @@ import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfigForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.Cluster; import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForUpdate; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption; import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindowForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnection; import com.azure.resourcemanager.postgresqlflexibleserver.models.Replica; import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationRole; import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter; import com.azure.resourcemanager.postgresqlflexibleserver.models.Server; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForUpdate; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerState; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; import com.azure.resourcemanager.postgresqlflexibleserver.models.UserAssignedIdentity; import java.time.OffsetDateTime; @@ -85,7 +90,7 @@ public String administratorLoginPassword() { return this.innerModel().administratorLoginPassword(); } - public ServerVersion version() { + public PostgresMajorVersion version() { return this.innerModel().version(); } @@ -196,7 +201,7 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man private String serverName; - private ServerForUpdate updateParameters; + private ServerForPatch updateParameters; public ServerImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -206,14 +211,14 @@ public ServerImpl withExistingResourceGroup(String resourceGroupName) { public Server create() { this.innerObject = serviceManager.serviceClient() .getServers() - .create(resourceGroupName, serverName, this.innerModel(), Context.NONE); + .createOrUpdate(resourceGroupName, serverName, this.innerModel(), Context.NONE); return this; } public Server create(Context context) { this.innerObject = serviceManager.serviceClient() .getServers() - .create(resourceGroupName, serverName, this.innerModel(), context); + .createOrUpdate(resourceGroupName, serverName, this.innerModel(), context); return this; } @@ -224,7 +229,7 @@ public Server create(Context context) { } public ServerImpl update() { - this.updateParameters = new ServerForUpdate(); + this.updateParameters = new ServerForPatch(); return this; } @@ -311,13 +316,8 @@ public ServerImpl withTags(Map tags) { } public ServerImpl withSku(Sku sku) { - if (isInCreateMode()) { - this.innerModel().withSku(sku); - return this; - } else { - this.updateParameters.withSku(sku); - return this; - } + this.innerModel().withSku(sku); + return this; } public ServerImpl withIdentity(UserAssignedIdentity identity) { @@ -331,13 +331,8 @@ public ServerImpl withIdentity(UserAssignedIdentity identity) { } public ServerImpl withAdministratorLogin(String administratorLogin) { - if (isInCreateMode()) { - this.innerModel().withAdministratorLogin(administratorLogin); - return this; - } else { - this.updateParameters.withAdministratorLogin(administratorLogin); - return this; - } + this.innerModel().withAdministratorLogin(administratorLogin); + return this; } public ServerImpl withAdministratorLoginPassword(String administratorLoginPassword) { @@ -350,7 +345,7 @@ public ServerImpl withAdministratorLoginPassword(String administratorLoginPasswo } } - public ServerImpl withVersion(ServerVersion version) { + public ServerImpl withVersion(PostgresMajorVersion version) { if (isInCreateMode()) { this.innerModel().withVersion(version); return this; @@ -371,13 +366,8 @@ public ServerImpl withStorage(Storage storage) { } public ServerImpl withAuthConfig(AuthConfig authConfig) { - if (isInCreateMode()) { - this.innerModel().withAuthConfig(authConfig); - return this; - } else { - this.updateParameters.withAuthConfig(authConfig); - return this; - } + this.innerModel().withAuthConfig(authConfig); + return this; } public ServerImpl withDataEncryption(DataEncryption dataEncryption) { @@ -391,13 +381,8 @@ public ServerImpl withDataEncryption(DataEncryption dataEncryption) { } public ServerImpl withBackup(Backup backup) { - if (isInCreateMode()) { - this.innerModel().withBackup(backup); - return this; - } else { - this.updateParameters.withBackup(backup); - return this; - } + this.innerModel().withBackup(backup); + return this; } public ServerImpl withNetwork(Network network) { @@ -411,13 +396,8 @@ public ServerImpl withNetwork(Network network) { } public ServerImpl withHighAvailability(HighAvailability highAvailability) { - if (isInCreateMode()) { - this.innerModel().withHighAvailability(highAvailability); - return this; - } else { - this.updateParameters.withHighAvailability(highAvailability); - return this; - } + this.innerModel().withHighAvailability(highAvailability); + return this; } public ServerImpl withSourceServerResourceId(String sourceServerResourceId) { @@ -431,8 +411,13 @@ public ServerImpl withPointInTimeUtc(OffsetDateTime pointInTimeUtc) { } public ServerImpl withAvailabilityZone(String availabilityZone) { - this.innerModel().withAvailabilityZone(availabilityZone); - return this; + if (isInCreateMode()) { + this.innerModel().withAvailabilityZone(availabilityZone); + return this; + } else { + this.updateParameters.withAvailabilityZone(availabilityZone); + return this; + } } public ServerImpl withReplicationRole(ReplicationRole replicationRole) { @@ -460,12 +445,32 @@ public ServerImpl withCluster(Cluster cluster) { } } - public ServerImpl withMaintenanceWindow(MaintenanceWindow maintenanceWindow) { + public ServerImpl withSku(SkuForPatch sku) { + this.updateParameters.withSku(sku); + return this; + } + + public ServerImpl withBackup(BackupForPatch backup) { + this.updateParameters.withBackup(backup); + return this; + } + + public ServerImpl withHighAvailability(HighAvailabilityForPatch highAvailability) { + this.updateParameters.withHighAvailability(highAvailability); + return this; + } + + public ServerImpl withMaintenanceWindow(MaintenanceWindowForPatch maintenanceWindow) { this.updateParameters.withMaintenanceWindow(maintenanceWindow); return this; } - public ServerImpl withCreateMode(CreateModeForUpdate createMode) { + public ServerImpl withAuthConfig(AuthConfigForPatch authConfig) { + this.updateParameters.withAuthConfig(authConfig); + return this; + } + + public ServerImpl withCreateMode(CreateModeForPatch createMode) { this.updateParameters.withCreateMode(createMode); return this; } @@ -476,6 +481,6 @@ public ServerImpl withReplica(Replica replica) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsClientImpl.java index df260397c92e..6f29286c0364 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsClientImpl.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; @@ -18,10 +17,6 @@ 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; @@ -33,8 +28,7 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerThreatProtectionSettingsModelInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -70,371 +64,29 @@ public final class ServerThreatProtectionSettingsClientImpl implements ServerThr * by the proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientServerThreatProtectionSettings") public interface ServerThreatProtectionSettingsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, - @BodyParam("application/json") ServerThreatProtectionSettingsModelInner parameters, + @BodyParam("application/json") AdvancedThreatProtectionSettingsModelInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response createOrUpdateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, - @BodyParam("application/json") ServerThreatProtectionSettingsModelInner parameters, + @BodyParam("application/json") AdvancedThreatProtectionSettingsModelInner parameters, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 server's Threat Protection state along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByServerSinglePageAsync(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) - .>map( - res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 server's Threat Protection state as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, - String serverName) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 server's Threat Protection state along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, - String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 server's Threat Protection state along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, - String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 server's Threat Protection state as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, - String serverName) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePage(nextLink)); - } - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 server's Threat Protection state as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, - String serverName, Context context) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePage(nextLink, context)); - } - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, ThreatProtectionName threatProtectionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (threatProtectionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter threatProtectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, threatProtectionName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName) { - return getWithResponseAsync(resourceGroupName, serverName, threatProtectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String serverName, ThreatProtectionName threatProtectionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (threatProtectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter threatProtectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, threatProtectionName, accept, context); - } - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServerThreatProtectionSettingsModelInner get(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName) { - return getWithResponse(resourceGroupName, serverName, threatProtectionName, Context.NONE).getValue(); } /** @@ -442,17 +94,17 @@ public ServerThreatProtectionSettingsModelInner get(String resourceGroupName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server's Advanced Threat Protection settings along with {@link Response} on successful completion of + * @return advanced threat protection settings of the server along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters) { + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -490,16 +142,16 @@ public Mono>> createOrUpdateWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server's Advanced Threat Protection settings along with {@link Response}. + * @return advanced threat protection settings of the server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters) { + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -539,17 +191,17 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server's Advanced Threat Protection settings along with {@link Response}. + * @return advanced threat protection settings of the server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters, + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -590,23 +242,24 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 server's Advanced Threat Protection settings. + * @return the {@link PollerFlux} for polling of advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ServerThreatProtectionSettingsModelInner> + public + PollerFlux, AdvancedThreatProtectionSettingsModelInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, - ServerThreatProtectionSettingsModelInner parameters) { + AdvancedThreatProtectionSettingsModelInner parameters) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, threatProtectionName, parameters); return this.client - .getLroResult(mono, - this.client.getHttpPipeline(), ServerThreatProtectionSettingsModelInner.class, - ServerThreatProtectionSettingsModelInner.class, this.client.getContext()); + .getLroResult(mono, + this.client.getHttpPipeline(), AdvancedThreatProtectionSettingsModelInner.class, + AdvancedThreatProtectionSettingsModelInner.class, this.client.getContext()); } /** @@ -614,23 +267,24 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of server's Advanced Threat Protection settings. + * @return the {@link SyncPoller} for polling of advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerThreatProtectionSettingsModelInner> + public + SyncPoller, AdvancedThreatProtectionSettingsModelInner> beginCreateOrUpdate(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, - ServerThreatProtectionSettingsModelInner parameters) { + AdvancedThreatProtectionSettingsModelInner parameters) { Response response = createOrUpdateWithResponse(resourceGroupName, serverName, threatProtectionName, parameters); return this.client - .getLroResult(response, - ServerThreatProtectionSettingsModelInner.class, ServerThreatProtectionSettingsModelInner.class, - Context.NONE); + .getLroResult( + response, AdvancedThreatProtectionSettingsModelInner.class, + AdvancedThreatProtectionSettingsModelInner.class, Context.NONE); } /** @@ -638,24 +292,25 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of server's Advanced Threat Protection settings. + * @return the {@link SyncPoller} for polling of advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerThreatProtectionSettingsModelInner> + public + SyncPoller, AdvancedThreatProtectionSettingsModelInner> beginCreateOrUpdate(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, - ServerThreatProtectionSettingsModelInner parameters, Context context) { + AdvancedThreatProtectionSettingsModelInner parameters, Context context) { Response response = createOrUpdateWithResponse(resourceGroupName, serverName, threatProtectionName, parameters, context); return this.client - .getLroResult(response, - ServerThreatProtectionSettingsModelInner.class, ServerThreatProtectionSettingsModelInner.class, - context); + .getLroResult( + response, AdvancedThreatProtectionSettingsModelInner.class, + AdvancedThreatProtectionSettingsModelInner.class, context); } /** @@ -663,17 +318,17 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server's Advanced Threat Protection settings on successful completion of {@link Mono}. + * @return advanced threat protection settings of the server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, - ServerThreatProtectionSettingsModelInner parameters) { + AdvancedThreatProtectionSettingsModelInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, threatProtectionName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -683,16 +338,16 @@ public Mono createOrUpdateAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server's Advanced Threat Protection settings. + * @return advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters) { + public AdvancedThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters) { return beginCreateOrUpdate(resourceGroupName, serverName, threatProtectionName, parameters).getFinalResult(); } @@ -701,106 +356,21 @@ public ServerThreatProtectionSettingsModelInner createOrUpdate(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server's Advanced Threat Protection settings. + * @return advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters, + public AdvancedThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters, Context context) { return beginCreateOrUpdate(resourceGroupName, serverName, threatProtectionName, parameters, context) .getFinalResult(); } - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the server's Advanced Threat Protection settings along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByServerNextSinglePageAsync(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.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the server's Advanced Threat Protection settings along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the server's Advanced Threat Protection settings along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink, - Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - private static final ClientLogger LOGGER = new ClientLogger(ServerThreatProtectionSettingsClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsImpl.java index 169ad54fde8f..39fbc0b5db44 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsImpl.java @@ -4,15 +4,9 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerThreatProtectionSettingsModelInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettings; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettingsModel; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; public final class ServerThreatProtectionSettingsImpl implements ServerThreatProtectionSettings { @@ -28,87 +22,6 @@ public ServerThreatProtectionSettingsImpl(ServerThreatProtectionSettingsClient i this.serviceManager = serviceManager; } - public PagedIterable listByServer(String resourceGroupName, - String serverName) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ServerThreatProtectionSettingsModelImpl(inner1, this.manager())); - } - - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ServerThreatProtectionSettingsModelImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, serverName, threatProtectionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ServerThreatProtectionSettingsModelImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ServerThreatProtectionSettingsModel get(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName) { - ServerThreatProtectionSettingsModelInner inner - = this.serviceClient().get(resourceGroupName, serverName, threatProtectionName); - if (inner != null) { - return new ServerThreatProtectionSettingsModelImpl(inner, this.manager()); - } else { - return null; - } - } - - public ServerThreatProtectionSettingsModel getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String serverName = ResourceManagerUtils.getValueFromIdByName(id, "flexibleServers"); - if (serverName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id))); - } - String threatProtectionNameLocal - = ResourceManagerUtils.getValueFromIdByName(id, "advancedThreatProtectionSettings"); - if (threatProtectionNameLocal == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'advancedThreatProtectionSettings'.", id))); - } - ThreatProtectionName threatProtectionName = ThreatProtectionName.fromString(threatProtectionNameLocal); - return this.getWithResponse(resourceGroupName, serverName, threatProtectionName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String serverName = ResourceManagerUtils.getValueFromIdByName(id, "flexibleServers"); - if (serverName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id))); - } - String threatProtectionNameLocal - = ResourceManagerUtils.getValueFromIdByName(id, "advancedThreatProtectionSettings"); - if (threatProtectionNameLocal == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'advancedThreatProtectionSettings'.", id))); - } - ThreatProtectionName threatProtectionName = ThreatProtectionName.fromString(threatProtectionNameLocal); - return this.getWithResponse(resourceGroupName, serverName, threatProtectionName, context); - } - private ServerThreatProtectionSettingsClient serviceClient() { return this.innerClient; } @@ -117,7 +30,7 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man return this.serviceManager; } - public ServerThreatProtectionSettingsModelImpl define(ThreatProtectionName name) { - return new ServerThreatProtectionSettingsModelImpl(name, this.manager()); + public AdvancedThreatProtectionSettingsModelImpl define(ThreatProtectionName name) { + return new AdvancedThreatProtectionSettingsModelImpl(name, this.manager()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersClientImpl.java index 6ee39b4be501..eb9155277701 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersClientImpl.java @@ -38,8 +38,8 @@ import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForUpdate; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -73,13 +73,13 @@ public final class ServersClientImpl implements ServersClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientServers") public interface ServersService { @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @BodyParam("application/json") ServerInner parameters, @HeaderParam("Accept") String accept, @@ -87,9 +87,9 @@ Mono>> create(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @BodyParam("application/json") ServerInner parameters, @HeaderParam("Accept") String accept, @@ -102,7 +102,7 @@ Response createSync(@HostParam("$host") String endpoint, Mono>> update(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") ServerForUpdate parameters, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ServerForPatch parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -112,12 +112,12 @@ Mono>> update(@HostParam("$host") String endpoint, Response updateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") ServerForUpdate parameters, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ServerForPatch parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -126,7 +126,7 @@ Mono>> delete(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Response deleteSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -155,7 +155,7 @@ Response getByResourceGroupSync(@HostParam("$host") String endpoint @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, + 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); @@ -164,7 +164,7 @@ Mono> listByResourceGroup(@HostParam("$host") String @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, + Response listByResourceGroupSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @@ -173,7 +173,7 @@ Response listByResourceGroupSync(@HostParam("$host") String en @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/flexibleServers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -181,13 +181,12 @@ Mono> list(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/flexibleServers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/restart") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> restart(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -197,7 +196,7 @@ Mono>> restart(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/restart") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response restartSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -207,7 +206,7 @@ Response restartSync(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/start") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> start(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -216,7 +215,7 @@ Mono>> start(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/start") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response startSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -225,7 +224,7 @@ Response startSync(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/stop") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> stop(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -234,7 +233,7 @@ Mono>> stop(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/stop") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response stopSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -245,7 +244,7 @@ Response stopSync(@HostParam("$host") String endpoint, @QueryParam(" @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( + Mono> listByResourceGroupNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -253,22 +252,22 @@ Mono> listByResourceGroupNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response listByResourceGroupNextSync(@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> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + 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) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + Response listBySubscriptionNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -277,14 +276,14 @@ Response listNextSync(@PathParam(value = "nextLink", encoded = * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createWithResponseAsync(String resourceGroupName, String serverName, + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, ServerInner parameters) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -308,7 +307,7 @@ public Mono>> createWithResponseAsync(String resourceG } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -318,14 +317,14 @@ public Mono>> createWithResponseAsync(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server along with {@link Response}. + * @return properties of a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createWithResponse(String resourceGroupName, String serverName, + private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, ServerInner parameters) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -352,7 +351,7 @@ private Response createWithResponse(String resourceGroupName, String parameters.validate(); } final String accept = "application/json"; - return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, Context.NONE); } @@ -361,16 +360,16 @@ private Response createWithResponse(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server along with {@link Response}. + * @return properties of a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createWithResponse(String resourceGroupName, String serverName, ServerInner parameters, - Context context) { + private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + ServerInner parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -396,7 +395,7 @@ private Response createWithResponse(String resourceGroupName, String parameters.validate(); } final String accept = "application/json"; - return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); } @@ -405,16 +404,17 @@ private Response createWithResponse(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 represents a server. + * @return the {@link PollerFlux} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ServerInner> beginCreateAsync(String resourceGroupName, + public PollerFlux, ServerInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, ServerInner parameters) { - Mono>> mono = createWithResponseAsync(resourceGroupName, serverName, parameters); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ServerInner.class, ServerInner.class, this.client.getContext()); } @@ -424,16 +424,16 @@ public PollerFlux, ServerInner> beginCreateAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a server. + * @return the {@link SyncPoller} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerInner> beginCreate(String resourceGroupName, String serverName, - ServerInner parameters) { - Response response = createWithResponse(resourceGroupName, serverName, parameters); + public SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, ServerInner parameters) { + Response response = createOrUpdateWithResponse(resourceGroupName, serverName, parameters); return this.client.getLroResult(response, ServerInner.class, ServerInner.class, Context.NONE); } @@ -443,17 +443,17 @@ public SyncPoller, ServerInner> beginCreate(String resou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a server. + * @return the {@link SyncPoller} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerInner> beginCreate(String resourceGroupName, String serverName, - ServerInner parameters, Context context) { - Response response = createWithResponse(resourceGroupName, serverName, parameters, context); + public SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, ServerInner parameters, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, serverName, parameters, context); return this.client.getLroResult(response, ServerInner.class, ServerInner.class, context); } @@ -463,15 +463,15 @@ public SyncPoller, ServerInner> beginCreate(String resou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server on successful completion of {@link Mono}. + * @return properties of a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync(String resourceGroupName, String serverName, ServerInner parameters) { - return beginCreateAsync(resourceGroupName, serverName, parameters).last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, ServerInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -480,15 +480,15 @@ public Mono createAsync(String resourceGroupName, String serverName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return properties of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerInner create(String resourceGroupName, String serverName, ServerInner parameters) { - return beginCreate(resourceGroupName, serverName, parameters).getFinalResult(); + public ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters) { + return beginCreateOrUpdate(resourceGroupName, serverName, parameters).getFinalResult(); } /** @@ -496,33 +496,34 @@ public ServerInner create(String resourceGroupName, String serverName, ServerInn * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return properties of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerInner create(String resourceGroupName, String serverName, ServerInner parameters, Context context) { - return beginCreate(resourceGroupName, serverName, parameters, context).getFinalResult(); + public ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters, + Context context) { + return beginCreateOrUpdate(resourceGroupName, serverName, parameters, context).getFinalResult(); } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - ServerForUpdate parameters) { + ServerForPatch parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -551,20 +552,20 @@ public Mono>> updateWithResponseAsync(String resourceG } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server along with {@link Response}. + * @return properties of a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, - ServerForUpdate parameters) { + ServerForPatch parameters) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -595,21 +596,21 @@ private Response updateWithResponse(String resourceGroupName, String } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server along with {@link Response}. + * @return properties of a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, - ServerForUpdate parameters, Context context) { + ServerForPatch parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -640,122 +641,121 @@ private Response updateWithResponse(String resourceGroupName, String } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 represents a server. + * @return the {@link PollerFlux} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ServerInner> beginUpdateAsync(String resourceGroupName, - String serverName, ServerForUpdate parameters) { + String serverName, ServerForPatch parameters) { Mono>> mono = updateWithResponseAsync(resourceGroupName, serverName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ServerInner.class, ServerInner.class, this.client.getContext()); } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a server. + * @return the {@link SyncPoller} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, - ServerForUpdate parameters) { + ServerForPatch parameters) { Response response = updateWithResponse(resourceGroupName, serverName, parameters); return this.client.getLroResult(response, ServerInner.class, ServerInner.class, Context.NONE); } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a server. + * @return the {@link SyncPoller} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, - ServerForUpdate parameters, Context context) { + ServerForPatch parameters, Context context) { Response response = updateWithResponse(resourceGroupName, serverName, parameters, context); return this.client.getLroResult(response, ServerInner.class, ServerInner.class, context); } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server on successful completion of {@link Mono}. + * @return properties of a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, ServerForUpdate parameters) { + public Mono updateAsync(String resourceGroupName, String serverName, ServerForPatch parameters) { return beginUpdateAsync(resourceGroupName, serverName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return properties of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerInner update(String resourceGroupName, String serverName, ServerForUpdate parameters) { + public ServerInner update(String resourceGroupName, String serverName, ServerForPatch parameters) { return beginUpdate(resourceGroupName, serverName, parameters).getFinalResult(); } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return properties of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerInner update(String resourceGroupName, String serverName, ServerForUpdate parameters, - Context context) { + public ServerInner update(String resourceGroupName, String serverName, ServerForPatch parameters, Context context) { return beginUpdate(resourceGroupName, serverName, parameters, context).getFinalResult(); } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -789,7 +789,7 @@ public Mono>> deleteWithResponseAsync(String resourceG } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -824,7 +824,7 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -860,7 +860,7 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -877,7 +877,7 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -893,7 +893,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -911,7 +911,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -926,7 +926,7 @@ public Mono deleteAsync(String resourceGroupName, String serverName) { } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -940,7 +940,7 @@ public void delete(String resourceGroupName, String serverName) { } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -955,14 +955,15 @@ public void delete(String resourceGroupName, String serverName, Context context) } /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response} on successful completion of {@link Mono}. + * @return information about an existing server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, @@ -990,14 +991,14 @@ public Mono> getByResourceGroupWithResponseAsync(String re } /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server on successful completion of {@link Mono}. + * @return information about an existing server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getByResourceGroupAsync(String resourceGroupName, String serverName) { @@ -1006,7 +1007,7 @@ public Mono getByResourceGroupAsync(String resourceGroupName, Strin } /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1014,7 +1015,7 @@ public Mono getByResourceGroupAsync(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about an existing server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, @@ -1043,14 +1044,14 @@ public Response getByResourceGroupWithResponse(String resourceGroup } /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about an existing server. */ @ServiceMethod(returns = ReturnType.SINGLE) public ServerInner getByResourceGroup(String resourceGroupName, String serverName) { @@ -1058,7 +1059,7 @@ public ServerInner getByResourceGroup(String resourceGroupName, String serverNam } /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1090,7 +1091,7 @@ private Mono> listByResourceGroupSinglePageAsync(Stri } /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1105,7 +1106,7 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupName) } /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1130,14 +1131,14 @@ private PagedResponse listByResourceGroupSinglePage(String resource .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -1163,14 +1164,14 @@ private PagedResponse listByResourceGroupSinglePage(String resource .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1185,7 +1186,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName) } /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -1201,7 +1202,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName, } /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1227,7 +1228,7 @@ private Mono> listSinglePageAsync() { } /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1235,11 +1236,12 @@ private Mono> listSinglePageAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1258,14 +1260,14 @@ private PagedResponse listSinglePage() { "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1286,14 +1288,14 @@ private PagedResponse listSinglePage(Context context) { "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1301,11 +1303,11 @@ private PagedResponse listSinglePage(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1315,15 +1317,16 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1358,11 +1361,11 @@ public Mono>> restartWithResponseAsync(String resource } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1398,11 +1401,11 @@ private Response restartWithResponse(String resourceGroupName, Strin } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1439,11 +1442,11 @@ private Response restartWithResponse(String resourceGroupName, Strin } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1458,7 +1461,7 @@ public PollerFlux, Void> beginRestartAsync(String resourceGroup } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1476,11 +1479,11 @@ public PollerFlux, Void> beginRestartAsync(String resourceGroup } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1494,7 +1497,7 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1511,11 +1514,11 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1530,11 +1533,11 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1547,7 +1550,7 @@ public Mono restartAsync(String resourceGroupName, String serverName, Rest } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1564,7 +1567,7 @@ public Mono restartAsync(String resourceGroupName, String serverName) { } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1579,11 +1582,11 @@ public void restart(String resourceGroupName, String serverName) { } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1595,7 +1598,7 @@ public void restart(String resourceGroupName, String serverName, RestartParamete } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1629,7 +1632,7 @@ public Mono>> startWithResponseAsync(String resourceGr } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1664,7 +1667,7 @@ private Response startWithResponse(String resourceGroupName, String } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1700,7 +1703,7 @@ private Response startWithResponse(String resourceGroupName, String } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1717,7 +1720,7 @@ public PollerFlux, Void> beginStartAsync(String resourceGroupNa } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1733,7 +1736,7 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1750,7 +1753,7 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1765,7 +1768,7 @@ public Mono startAsync(String resourceGroupName, String serverName) { } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1779,7 +1782,7 @@ public void start(String resourceGroupName, String serverName) { } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -2040,7 +2043,7 @@ private PagedResponse listByResourceGroupNextSinglePage(String next "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -2068,7 +2071,7 @@ private PagedResponse listByResourceGroupNextSinglePage(String next "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -2084,7 +2087,7 @@ private PagedResponse listByResourceGroupNextSinglePage(String next * @return a list of servers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2093,7 +2096,9 @@ private Mono> listNextSinglePageAsync(String nextLink 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)) + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -2109,7 +2114,7 @@ private Mono> listNextSinglePageAsync(String nextLink * @return a list of servers along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -2120,8 +2125,8 @@ private PagedResponse listNextSinglePage(String nextLink) { "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -2137,7 +2142,7 @@ private PagedResponse listNextSinglePage(String nextLink) { * @return a list of servers along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -2148,7 +2153,8 @@ private PagedResponse listNextSinglePage(String nextLink, Context c "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/SessionDetailsResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/SessionDetailsResourceImpl.java deleted file mode 100644 index be90209f3940..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/SessionDetailsResourceImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionDetailsResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SessionDetailsResource; - -public final class SessionDetailsResourceImpl implements SessionDetailsResource { - private SessionDetailsResourceInner innerObject; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - SessionDetailsResourceImpl(SessionDetailsResourceInner innerObject, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String iterationId() { - return this.innerModel().iterationId(); - } - - public String sessionId() { - return this.innerModel().sessionId(); - } - - public String appliedConfiguration() { - return this.innerModel().appliedConfiguration(); - } - - public String iterationStartTime() { - return this.innerModel().iterationStartTime(); - } - - public String averageQueryRuntimeMs() { - return this.innerModel().averageQueryRuntimeMs(); - } - - public String transactionsPerSecond() { - return this.innerModel().transactionsPerSecond(); - } - - public SessionDetailsResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/SessionResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/SessionResourceImpl.java deleted file mode 100644 index 81ca8c158b36..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/SessionResourceImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SessionResource; - -public final class SessionResourceImpl implements SessionResource { - private SessionResourceInner innerObject; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - SessionResourceImpl(SessionResourceInner innerObject, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String sessionStartTime() { - return this.innerModel().sessionStartTime(); - } - - public String sessionId() { - return this.innerModel().sessionId(); - } - - public String status() { - return this.innerModel().status(); - } - - public String preTuningAqr() { - return this.innerModel().preTuningAqr(); - } - - public String postTuningAqr() { - return this.innerModel().postTuningAqr(); - } - - public String preTuningTps() { - return this.innerModel().preTuningTps(); - } - - public String postTuningTps() { - return this.innerModel().postTuningTps(); - } - - public SessionResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningConfigurationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningConfigurationsClientImpl.java deleted file mode 100644 index d950f18ec739..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningConfigurationsClientImpl.java +++ /dev/null @@ -1,1735 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningConfigurationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionDetailsResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigTuningRequestParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SessionDetailsListResult; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SessionsListResult; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; -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 TuningConfigurationsClient. - */ -public final class TuningConfigurationsClientImpl implements TuningConfigurationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final TuningConfigurationsService service; - - /** - * The service client containing this operation class. - */ - private final PostgreSqlManagementClientImpl client; - - /** - * Initializes an instance of TuningConfigurationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - TuningConfigurationsClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(TuningConfigurationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PostgreSqlManagementClientTuningConfigurations to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface TuningConfigurationsService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/enable") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> enable(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/enable") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response enableSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/disable") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> disable(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/disable") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response disableSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/startSession") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> startSession(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, - @BodyParam("application/json") ConfigTuningRequestParameter configTuningRequest, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/startSession") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response startSessionSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, - @BodyParam("application/json") ConfigTuningRequestParameter configTuningRequest, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/stopSession") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stopSession(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/stopSession") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response stopSessionSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/sessions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSessions(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/sessions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSessionsSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/sessionDetails") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSessionDetails(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @QueryParam("sessionId") String sessionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/sessionDetails") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSessionDetailsSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @QueryParam("sessionId") String sessionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSessionsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSessionsNextSync( - @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> listSessionDetailsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSessionDetailsNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> enableWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.enable(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response enableWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return service.enableSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, Context.NONE); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response enableWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return service.enableSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginEnableAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - Mono>> mono = enableWithResponseAsync(resourceGroupName, serverName, tuningOption); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @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> beginEnable(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - Response response = enableWithResponse(resourceGroupName, serverName, tuningOption); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @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> beginEnable(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - Response response = enableWithResponse(resourceGroupName, serverName, tuningOption, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono enableAsync(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - return beginEnableAsync(resourceGroupName, serverName, tuningOption).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 enable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - beginEnable(resourceGroupName, serverName, tuningOption).getFinalResult(); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 enable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context) { - beginEnable(resourceGroupName, serverName, tuningOption, context).getFinalResult(); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> disableWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.disable(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response disableWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return service.disableSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, Context.NONE); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response disableWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return service.disableSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDisableAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - Mono>> mono = disableWithResponseAsync(resourceGroupName, serverName, tuningOption); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @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> beginDisable(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - Response response = disableWithResponse(resourceGroupName, serverName, tuningOption); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @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> beginDisable(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - Response response = disableWithResponse(resourceGroupName, serverName, tuningOption, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono disableAsync(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - return beginDisableAsync(resourceGroupName, serverName, tuningOption).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 disable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - beginDisable(resourceGroupName, serverName, tuningOption).getFinalResult(); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 disable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context) { - beginDisable(resourceGroupName, serverName, tuningOption, context).getFinalResult(); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning 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) - public Mono>> startSessionWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - if (configTuningRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter configTuningRequest is required and cannot be null.")); - } else { - configTuningRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.startSession(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, configTuningRequest, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning 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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response startSessionWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - if (configTuningRequest == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter configTuningRequest is required and cannot be null.")); - } else { - configTuningRequest.validate(); - } - final String accept = "application/json"; - return service.startSessionSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, configTuningRequest, accept, - Context.NONE); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning 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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response startSessionWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - if (configTuningRequest == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter configTuningRequest is required and cannot be null.")); - } else { - configTuningRequest.validate(); - } - final String accept = "application/json"; - return service.startSessionSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, configTuningRequest, accept, - context); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginStartSessionAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest) { - Mono>> mono - = startSessionWithResponseAsync(resourceGroupName, serverName, tuningOption, configTuningRequest); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStartSession(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest) { - Response response - = startSessionWithResponse(resourceGroupName, serverName, tuningOption, configTuningRequest); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStartSession(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest, Context context) { - Response response - = startSessionWithResponse(resourceGroupName, serverName, tuningOption, configTuningRequest, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning 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) - public Mono startSessionAsync(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest) { - return beginStartSessionAsync(resourceGroupName, serverName, tuningOption, configTuningRequest).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning 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 startSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest) { - beginStartSession(resourceGroupName, serverName, tuningOption, configTuningRequest).getFinalResult(); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void startSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest, Context context) { - beginStartSession(resourceGroupName, serverName, tuningOption, configTuningRequest, context).getFinalResult(); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> stopSessionWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.stopSession(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response stopSessionWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return service.stopSessionSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, Context.NONE); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response stopSessionWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return service.stopSessionSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginStopSessionAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - Mono>> mono - = stopSessionWithResponseAsync(resourceGroupName, serverName, tuningOption); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @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> beginStopSession(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - Response response = stopSessionWithResponse(resourceGroupName, serverName, tuningOption); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @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> beginStopSession(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - Response response = stopSessionWithResponse(resourceGroupName, serverName, tuningOption, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono stopSessionAsync(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - return beginStopSessionAsync(resourceGroupName, serverName, tuningOption).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 stopSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - beginStopSession(resourceGroupName, serverName, tuningOption).getFinalResult(); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 stopSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - Context context) { - beginStopSession(resourceGroupName, serverName, tuningOption, context).getFinalResult(); - } - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return up the config tuning session status along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSessionsSinglePageAsync(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listSessions(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return up the config tuning session status as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listSessionsAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - return new PagedFlux<>(() -> listSessionsSinglePageAsync(resourceGroupName, serverName, tuningOption), - nextLink -> listSessionsNextSinglePageAsync(nextLink)); - } - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return up the config tuning session status along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSessionsSinglePage(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listSessionsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return up the config tuning session status along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSessionsSinglePage(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listSessionsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return up the config tuning session status as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSessions(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - return new PagedIterable<>(() -> listSessionsSinglePage(resourceGroupName, serverName, tuningOption), - nextLink -> listSessionsNextSinglePage(nextLink)); - } - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return up the config tuning session status as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSessions(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - return new PagedIterable<>(() -> listSessionsSinglePage(resourceGroupName, serverName, tuningOption, context), - nextLink -> listSessionsNextSinglePage(nextLink, context)); - } - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the session details of a config tuning session along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSessionDetailsSinglePageAsync(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption, String sessionId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - if (sessionId == null) { - return Mono.error(new IllegalArgumentException("Parameter sessionId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listSessionDetails(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, sessionId, accept, - context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the session details of a config tuning session as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listSessionDetailsAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId) { - return new PagedFlux<>( - () -> listSessionDetailsSinglePageAsync(resourceGroupName, serverName, tuningOption, sessionId), - nextLink -> listSessionDetailsNextSinglePageAsync(nextLink)); - } - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the session details of a config tuning session along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSessionDetailsSinglePage(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption, String sessionId) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - if (sessionId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter sessionId is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSessionDetailsSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, - sessionId, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the session details of a config tuning session along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSessionDetailsSinglePage(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption, String sessionId, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - if (sessionId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter sessionId is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSessionDetailsSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, - sessionId, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the session details of a config tuning session as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSessionDetails(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId) { - return new PagedIterable<>( - () -> listSessionDetailsSinglePage(resourceGroupName, serverName, tuningOption, sessionId), - nextLink -> listSessionDetailsNextSinglePage(nextLink)); - } - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the session details of a config tuning session as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSessionDetails(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId, Context context) { - return new PagedIterable<>( - () -> listSessionDetailsSinglePage(resourceGroupName, serverName, tuningOption, sessionId, context), - nextLink -> listSessionDetailsNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of tuning configuration sessions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSessionsNextSinglePageAsync(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.listSessionsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of tuning configuration sessions along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSessionsNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listSessionsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of tuning configuration sessions along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSessionsNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listSessionsNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of tuning configuration sessions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSessionDetailsNextSinglePageAsync(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.listSessionDetailsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of tuning configuration sessions along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSessionDetailsNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listSessionDetailsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of tuning configuration sessions along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSessionDetailsNextSinglePage(String nextLink, - Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listSessionDetailsNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - private static final ClientLogger LOGGER = new ClientLogger(TuningConfigurationsClientImpl.class); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningConfigurationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningConfigurationsImpl.java deleted file mode 100644 index b1bdeb8fe124..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningConfigurationsImpl.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.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.postgresqlflexibleserver.fluent.TuningConfigurationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionDetailsResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigTuningRequestParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SessionDetailsResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SessionResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningConfigurations; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -public final class TuningConfigurationsImpl implements TuningConfigurations { - private static final ClientLogger LOGGER = new ClientLogger(TuningConfigurationsImpl.class); - - private final TuningConfigurationsClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public TuningConfigurationsImpl(TuningConfigurationsClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public void enable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - this.serviceClient().enable(resourceGroupName, serverName, tuningOption); - } - - public void enable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context) { - this.serviceClient().enable(resourceGroupName, serverName, tuningOption, context); - } - - public void disable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - this.serviceClient().disable(resourceGroupName, serverName, tuningOption); - } - - public void disable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context) { - this.serviceClient().disable(resourceGroupName, serverName, tuningOption, context); - } - - public void startSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest) { - this.serviceClient().startSession(resourceGroupName, serverName, tuningOption, configTuningRequest); - } - - public void startSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest, Context context) { - this.serviceClient().startSession(resourceGroupName, serverName, tuningOption, configTuningRequest, context); - } - - public void stopSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - this.serviceClient().stopSession(resourceGroupName, serverName, tuningOption); - } - - public void stopSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - Context context) { - this.serviceClient().stopSession(resourceGroupName, serverName, tuningOption, context); - } - - public PagedIterable listSessions(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - PagedIterable inner - = this.serviceClient().listSessions(resourceGroupName, serverName, tuningOption); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SessionResourceImpl(inner1, this.manager())); - } - - public PagedIterable listSessions(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - PagedIterable inner - = this.serviceClient().listSessions(resourceGroupName, serverName, tuningOption, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SessionResourceImpl(inner1, this.manager())); - } - - public PagedIterable listSessionDetails(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId) { - PagedIterable inner - = this.serviceClient().listSessionDetails(resourceGroupName, serverName, tuningOption, sessionId); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SessionDetailsResourceImpl(inner1, this.manager())); - } - - public PagedIterable listSessionDetails(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId, Context context) { - PagedIterable inner - = this.serviceClient().listSessionDetails(resourceGroupName, serverName, tuningOption, sessionId, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SessionDetailsResourceImpl(inner1, this.manager())); - } - - private TuningConfigurationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningIndexesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningIndexesClientImpl.java deleted file mode 100644 index 8a93a3c793a4..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningIndexesClientImpl.java +++ /dev/null @@ -1,409 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.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.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningIndexesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.IndexRecommendationResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationListResult; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in TuningIndexesClient. - */ -public final class TuningIndexesClientImpl implements TuningIndexesClient { - /** - * The proxy service used to perform REST calls. - */ - private final TuningIndexesService service; - - /** - * The service client containing this operation class. - */ - private final PostgreSqlManagementClientImpl client; - - /** - * Initializes an instance of TuningIndexesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - TuningIndexesClientImpl(PostgreSqlManagementClientImpl client) { - this.service - = RestProxy.create(TuningIndexesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PostgreSqlManagementClientTuningIndexes to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface TuningIndexesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/recommendations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRecommendations(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, - @QueryParam("recommendationType") RecommendationType recommendationType, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/recommendations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listRecommendationsSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, - @QueryParam("recommendationType") RecommendationType recommendationType, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRecommendationsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listRecommendationsNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available index recommendations along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRecommendationsSinglePageAsync( - String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - RecommendationType recommendationType) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listRecommendations(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, recommendationType, - 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())); - } - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available index recommendations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listRecommendationsAsync(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption, RecommendationType recommendationType) { - return new PagedFlux<>( - () -> listRecommendationsSinglePageAsync(resourceGroupName, serverName, tuningOption, recommendationType), - nextLink -> listRecommendationsNextSinglePageAsync(nextLink)); - } - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 available index recommendations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listRecommendationsAsync(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption) { - final RecommendationType recommendationType = null; - return new PagedFlux<>( - () -> listRecommendationsSinglePageAsync(resourceGroupName, serverName, tuningOption, recommendationType), - nextLink -> listRecommendationsNextSinglePageAsync(nextLink)); - } - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available index recommendations along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRecommendationsSinglePage(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption, RecommendationType recommendationType) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listRecommendationsSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, - recommendationType, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available index recommendations along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRecommendationsSinglePage(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption, RecommendationType recommendationType, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listRecommendationsSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, - recommendationType, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 available index recommendations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRecommendations(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption) { - final RecommendationType recommendationType = null; - return new PagedIterable<>( - () -> listRecommendationsSinglePage(resourceGroupName, serverName, tuningOption, recommendationType), - nextLink -> listRecommendationsNextSinglePage(nextLink)); - } - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available index recommendations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRecommendations(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption, RecommendationType recommendationType, Context context) { - return new PagedIterable<>(() -> listRecommendationsSinglePage(resourceGroupName, serverName, tuningOption, - recommendationType, context), nextLink -> listRecommendationsNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available index recommendations along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listRecommendationsNextSinglePageAsync(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.listRecommendationsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available index recommendations along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRecommendationsNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listRecommendationsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available index recommendations along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRecommendationsNextSinglePage(String nextLink, - Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listRecommendationsNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - private static final ClientLogger LOGGER = new ClientLogger(TuningIndexesClientImpl.class); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningIndexesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningIndexesImpl.java deleted file mode 100644 index 93b637a0f5ed..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningIndexesImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.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.postgresqlflexibleserver.fluent.TuningIndexesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.IndexRecommendationResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningIndexes; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -public final class TuningIndexesImpl implements TuningIndexes { - private static final ClientLogger LOGGER = new ClientLogger(TuningIndexesImpl.class); - - private final TuningIndexesClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public TuningIndexesImpl(TuningIndexesClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listRecommendations(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - PagedIterable inner - = this.serviceClient().listRecommendations(resourceGroupName, serverName, tuningOption); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new IndexRecommendationResourceImpl(inner1, this.manager())); - } - - public PagedIterable listRecommendations(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, RecommendationType recommendationType, Context context) { - PagedIterable inner = this.serviceClient() - .listRecommendations(resourceGroupName, serverName, tuningOption, recommendationType, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new IndexRecommendationResourceImpl(inner1, this.manager())); - } - - private TuningIndexesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsClientImpl.java deleted file mode 100644 index 2c48b142ee0c..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsClientImpl.java +++ /dev/null @@ -1,490 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.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.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in TuningOptionsClient. - */ -public final class TuningOptionsClientImpl implements TuningOptionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final TuningOptionsService service; - - /** - * The service client containing this operation class. - */ - private final PostgreSqlManagementClientImpl client; - - /** - * Initializes an instance of TuningOptionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - TuningOptionsClientImpl(PostgreSqlManagementClientImpl client) { - this.service - = RestProxy.create(TuningOptionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PostgreSqlManagementClientTuningOptions to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface TuningOptionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Retrieve the tuning option on a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stores property that features impact on some metric if this recommended action is applied along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieve the tuning option on a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stores property that features impact on some metric if this recommended action is applied on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - return getWithResponseAsync(resourceGroupName, serverName, tuningOption) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Retrieve the tuning option on a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stores property that features impact on some metric if this recommended action is applied along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, tuningOption, accept, context); - } - - /** - * Retrieve the tuning option on a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stores property that features impact on some metric if this recommended action is applied. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TuningOptionsResourceInner get(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - return getWithResponse(resourceGroupName, serverName, tuningOption, Context.NONE).getValue(); - } - - /** - * Retrieve the list of available tuning options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 server tuning options along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, 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())); - } - - /** - * Retrieve the list of available tuning options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 server tuning options as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePageAsync(nextLink)); - } - - /** - * Retrieve the list of available tuning options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 server tuning options along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, - String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Retrieve the list of available tuning options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 server tuning options along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, - String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Retrieve the list of available tuning options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 server tuning options as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePage(nextLink)); - } - - /** - * Retrieve the list of available tuning options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 server tuning options as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server tuning options along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync(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.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server tuning options along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server tuning options along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - private static final ClientLogger LOGGER = new ClientLogger(TuningOptionsClientImpl.class); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsImpl.java index 02efa8b14405..ee4e55f1fe38 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsImpl.java @@ -4,66 +4,39 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptions; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsResource; public final class TuningOptionsImpl implements TuningOptions { - private static final ClientLogger LOGGER = new ClientLogger(TuningOptionsImpl.class); - - private final TuningOptionsClient innerClient; + private TuningOptionsInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - public TuningOptionsImpl(TuningOptionsClient innerClient, + TuningOptionsImpl(TuningOptionsInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; + this.innerObject = innerObject; this.serviceManager = serviceManager; } - public Response getWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, serverName, tuningOption, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new TuningOptionsResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public String id() { + return this.innerModel().id(); } - public TuningOptionsResource get(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - TuningOptionsResourceInner inner = this.serviceClient().get(resourceGroupName, serverName, tuningOption); - if (inner != null) { - return new TuningOptionsResourceImpl(inner, this.manager()); - } else { - return null; - } + public String name() { + return this.innerModel().name(); } - public PagedIterable listByServer(String resourceGroupName, String serverName) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new TuningOptionsResourceImpl(inner1, this.manager())); + public String type() { + return this.innerModel().type(); } - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new TuningOptionsResourceImpl(inner1, this.manager())); + public SystemData systemData() { + return this.innerModel().systemData(); } - private TuningOptionsClient serviceClient() { - return this.innerClient; + public TuningOptionsInner innerModel() { + return this.innerObject; } private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsClientImpl.java new file mode 100644 index 000000000000..334f50232370 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsClientImpl.java @@ -0,0 +1,824 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.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.core.util.logging.ClientLogger; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationList; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsList; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in TuningOptionsOperationsClient. + */ +public final class TuningOptionsOperationsClientImpl implements TuningOptionsOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final TuningOptionsOperationsService service; + + /** + * The service client containing this operation class. + */ + private final PostgreSqlManagementClientImpl client; + + /** + * Initializes an instance of TuningOptionsOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TuningOptionsOperationsClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(TuningOptionsOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PostgreSqlManagementClientTuningOptionsOperations to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PostgreSqlManagementClientTuningOptionsOperations") + public interface TuningOptionsOperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("tuningOption") TuningOptionParameterEnum tuningOption, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("tuningOption") TuningOptionParameterEnum tuningOption, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/recommendations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listRecommendations(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("tuningOption") TuningOptionParameterEnum tuningOption, + @QueryParam("recommendationType") RecommendationTypeParameterEnum recommendationType, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/recommendations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listRecommendationsSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("tuningOption") TuningOptionParameterEnum tuningOption, + @QueryParam("recommendationType") RecommendationTypeParameterEnum recommendationType, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServer(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByServerSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listRecommendationsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listRecommendationsNextSync( + @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> listByServerNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the tuning options of a server along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (tuningOption == null) { + return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the tuning options of a server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption) { + return getWithResponseAsync(resourceGroupName, serverName, tuningOption) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the tuning options of a server along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (tuningOption == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, tuningOption, accept, context); + } + + /** + * Gets the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the tuning options of a server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TuningOptionsInner get(String resourceGroupName, String serverName, TuningOptionParameterEnum tuningOption) { + return getWithResponse(resourceGroupName, serverName, tuningOption, Context.NONE).getValue(); + } + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available object recommendations along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRecommendationsSinglePageAsync(String resourceGroupName, + String serverName, TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (tuningOption == null) { + return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listRecommendations(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, recommendationType, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available object recommendations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listRecommendationsAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType) { + return new PagedFlux<>( + () -> listRecommendationsSinglePageAsync(resourceGroupName, serverName, tuningOption, recommendationType), + nextLink -> listRecommendationsNextSinglePageAsync(nextLink)); + } + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 available object recommendations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listRecommendationsAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption) { + final RecommendationTypeParameterEnum recommendationType = null; + return new PagedFlux<>( + () -> listRecommendationsSinglePageAsync(resourceGroupName, serverName, tuningOption, recommendationType), + nextLink -> listRecommendationsNextSinglePageAsync(nextLink)); + } + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available object recommendations along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listRecommendationsSinglePage(String resourceGroupName, + String serverName, TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (tuningOption == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listRecommendationsSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, + recommendationType, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available object recommendations along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listRecommendationsSinglePage(String resourceGroupName, + String serverName, TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (tuningOption == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listRecommendationsSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, + recommendationType, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 available object recommendations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption) { + final RecommendationTypeParameterEnum recommendationType = null; + return new PagedIterable<>( + () -> listRecommendationsSinglePage(resourceGroupName, serverName, tuningOption, recommendationType), + nextLink -> listRecommendationsNextSinglePage(nextLink)); + } + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available object recommendations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType, Context context) { + return new PagedIterable<>(() -> listRecommendationsSinglePage(resourceGroupName, serverName, tuningOption, + recommendationType, context), nextLink -> listRecommendationsNextSinglePage(nextLink, context)); + } + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 server tuning options along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 server tuning options as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePageAsync(nextLink)); + } + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 server tuning options along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 server tuning options along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 server tuning options as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePage(nextLink)); + } + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 server tuning options as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available object recommendations along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRecommendationsNextSinglePageAsync(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.listRecommendationsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available object recommendations along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listRecommendationsNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listRecommendationsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available object recommendations along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listRecommendationsNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listRecommendationsNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of server tuning options along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerNextSinglePageAsync(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.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of server tuning options along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of server tuning options along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(TuningOptionsOperationsClientImpl.class); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsImpl.java new file mode 100644 index 000000000000..db3ea6b26793 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsImpl.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendation; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptions; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsOperations; + +public final class TuningOptionsOperationsImpl implements TuningOptionsOperations { + private static final ClientLogger LOGGER = new ClientLogger(TuningOptionsOperationsImpl.class); + + private final TuningOptionsOperationsClient innerClient; + + private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; + + public TuningOptionsOperationsImpl(TuningOptionsOperationsClient innerClient, + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, serverName, tuningOption, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new TuningOptionsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public TuningOptions get(String resourceGroupName, String serverName, TuningOptionParameterEnum tuningOption) { + TuningOptionsInner inner = this.serviceClient().get(resourceGroupName, serverName, tuningOption); + if (inner != null) { + return new TuningOptionsImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption) { + PagedIterable inner + = this.serviceClient().listRecommendations(resourceGroupName, serverName, tuningOption); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ObjectRecommendationImpl(inner1, this.manager())); + } + + public PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType, Context context) { + PagedIterable inner = this.serviceClient() + .listRecommendations(resourceGroupName, serverName, tuningOption, recommendationType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ObjectRecommendationImpl(inner1, this.manager())); + } + + public PagedIterable listByServer(String resourceGroupName, String serverName) { + PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TuningOptionsImpl(inner1, this.manager())); + } + + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TuningOptionsImpl(inner1, this.manager())); + } + + private TuningOptionsOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsResourceImpl.java deleted file mode 100644 index becdc8f9556a..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsResourceImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsResource; - -public final class TuningOptionsResourceImpl implements TuningOptionsResource { - private TuningOptionsResourceInner innerObject; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - TuningOptionsResourceImpl(TuningOptionsResourceInner innerObject, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager 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 TuningOptionsResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointImpl.java similarity index 80% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointResourceImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointImpl.java index a65e150af19d..f8eb88475a26 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointResourceImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointImpl.java @@ -6,16 +6,15 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResource; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoint; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResourceForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; import java.util.Collections; import java.util.List; -public final class VirtualEndpointResourceImpl - implements VirtualEndpointResource, VirtualEndpointResource.Definition, VirtualEndpointResource.Update { - private VirtualEndpointResourceInner innerObject; +public final class VirtualEndpointImpl implements VirtualEndpoint, VirtualEndpoint.Definition, VirtualEndpoint.Update { + private VirtualEndpointInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; @@ -61,7 +60,7 @@ public String resourceGroupName() { return resourceGroupName; } - public VirtualEndpointResourceInner innerModel() { + public VirtualEndpointInner innerModel() { return this.innerObject; } @@ -77,53 +76,53 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man private VirtualEndpointResourceForPatch updateParameters; - public VirtualEndpointResourceImpl withExistingFlexibleServer(String resourceGroupName, String serverName) { + public VirtualEndpointImpl withExistingFlexibleServer(String resourceGroupName, String serverName) { this.resourceGroupName = resourceGroupName; this.serverName = serverName; return this; } - public VirtualEndpointResource create() { + public VirtualEndpoint create() { this.innerObject = serviceManager.serviceClient() .getVirtualEndpoints() .create(resourceGroupName, serverName, virtualEndpointName, this.innerModel(), Context.NONE); return this; } - public VirtualEndpointResource create(Context context) { + public VirtualEndpoint create(Context context) { this.innerObject = serviceManager.serviceClient() .getVirtualEndpoints() .create(resourceGroupName, serverName, virtualEndpointName, this.innerModel(), context); return this; } - VirtualEndpointResourceImpl(String name, + VirtualEndpointImpl(String name, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerObject = new VirtualEndpointResourceInner(); + this.innerObject = new VirtualEndpointInner(); this.serviceManager = serviceManager; this.virtualEndpointName = name; } - public VirtualEndpointResourceImpl update() { + public VirtualEndpointImpl update() { this.updateParameters = new VirtualEndpointResourceForPatch(); return this; } - public VirtualEndpointResource apply() { + public VirtualEndpoint apply() { this.innerObject = serviceManager.serviceClient() .getVirtualEndpoints() .update(resourceGroupName, serverName, virtualEndpointName, updateParameters, Context.NONE); return this; } - public VirtualEndpointResource apply(Context context) { + public VirtualEndpoint apply(Context context) { this.innerObject = serviceManager.serviceClient() .getVirtualEndpoints() .update(resourceGroupName, serverName, virtualEndpointName, updateParameters, context); return this; } - VirtualEndpointResourceImpl(VirtualEndpointResourceInner innerObject, + VirtualEndpointImpl(VirtualEndpointInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -132,7 +131,7 @@ public VirtualEndpointResource apply(Context context) { this.virtualEndpointName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "virtualendpoints"); } - public VirtualEndpointResource refresh() { + public VirtualEndpoint refresh() { this.innerObject = serviceManager.serviceClient() .getVirtualEndpoints() .getWithResponse(resourceGroupName, serverName, virtualEndpointName, Context.NONE) @@ -140,7 +139,7 @@ public VirtualEndpointResource refresh() { return this; } - public VirtualEndpointResource refresh(Context context) { + public VirtualEndpoint refresh(Context context) { this.innerObject = serviceManager.serviceClient() .getVirtualEndpoints() .getWithResponse(resourceGroupName, serverName, virtualEndpointName, context) @@ -148,7 +147,7 @@ public VirtualEndpointResource refresh(Context context) { return this; } - public VirtualEndpointResourceImpl withEndpointType(VirtualEndpointType endpointType) { + public VirtualEndpointImpl withEndpointType(VirtualEndpointType endpointType) { if (isInCreateMode()) { this.innerModel().withEndpointType(endpointType); return this; @@ -158,7 +157,7 @@ public VirtualEndpointResourceImpl withEndpointType(VirtualEndpointType endpoint } } - public VirtualEndpointResourceImpl withMembers(List members) { + public VirtualEndpointImpl withMembers(List members) { if (isInCreateMode()) { this.innerModel().withMembers(members); return this; @@ -169,6 +168,6 @@ public VirtualEndpointResourceImpl withMembers(List members) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsClientImpl.java index 09d852900f35..fe7e11422cee 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsClientImpl.java @@ -35,9 +35,9 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResourceForPatch; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointsListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointsList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -72,29 +72,29 @@ public final class VirtualEndpointsClientImpl implements VirtualEndpointsClient * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientVirtualEndpoints") public interface VirtualEndpointsService { @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> create(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("virtualEndpointName") String virtualEndpointName, - @BodyParam("application/json") VirtualEndpointResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); + @BodyParam("application/json") VirtualEndpointInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response createSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("virtualEndpointName") String virtualEndpointName, - @BodyParam("application/json") VirtualEndpointResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); + @BodyParam("application/json") VirtualEndpointInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") @@ -142,7 +142,7 @@ Response deleteSync(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("virtualEndpointName") String virtualEndpointName, @HeaderParam("Accept") String accept, @@ -152,7 +152,7 @@ Mono> get(@HostParam("$host") String endp @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("virtualEndpointName") String virtualEndpointName, @HeaderParam("Accept") String accept, @@ -162,7 +162,7 @@ Response getSync(@HostParam("$host") String endpoi @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -171,7 +171,7 @@ Mono> listByServer(@HostParam("$host") Stri @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -180,7 +180,7 @@ Response listByServerSync(@HostParam("$host") String @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( + Mono> listByServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -188,27 +188,27 @@ Mono> listByServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( + Response listByServerNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server along with {@link Response} on successful completion of + * @return pair of virtual endpoints for a server along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createWithResponseAsync(String resourceGroupName, String serverName, - String virtualEndpointName, VirtualEndpointResourceInner parameters) { + String virtualEndpointName, VirtualEndpointInner parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -242,20 +242,20 @@ public Mono>> createWithResponseAsync(String resourceG } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server along with {@link Response}. + * @return pair of virtual endpoints for a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, - String virtualEndpointName, VirtualEndpointResourceInner parameters) { + String virtualEndpointName, VirtualEndpointInner parameters) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -291,21 +291,21 @@ private Response createWithResponse(String resourceGroupName, String } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server along with {@link Response}. + * @return pair of virtual endpoints for a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, - String virtualEndpointName, VirtualEndpointResourceInner parameters, Context context) { + String virtualEndpointName, VirtualEndpointInner parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -341,141 +341,136 @@ private Response createWithResponse(String resourceGroupName, String } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 represents a virtual endpoint for a server. + * @return the {@link PollerFlux} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, VirtualEndpointResourceInner> beginCreateAsync( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters) { + public PollerFlux, VirtualEndpointInner> beginCreateAsync(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointInner parameters) { Mono>> mono = createWithResponseAsync(resourceGroupName, serverName, virtualEndpointName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), VirtualEndpointResourceInner.class, VirtualEndpointResourceInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VirtualEndpointInner.class, VirtualEndpointInner.class, this.client.getContext()); } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a virtual endpoint for a server. + * @return the {@link SyncPoller} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualEndpointResourceInner> beginCreate( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters) { + public SyncPoller, VirtualEndpointInner> beginCreate(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointInner parameters) { Response response = createWithResponse(resourceGroupName, serverName, virtualEndpointName, parameters); - return this.client.getLroResult(response, - VirtualEndpointResourceInner.class, VirtualEndpointResourceInner.class, Context.NONE); + return this.client.getLroResult(response, + VirtualEndpointInner.class, VirtualEndpointInner.class, Context.NONE); } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a virtual endpoint for a server. + * @return the {@link SyncPoller} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualEndpointResourceInner> beginCreate( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters, Context context) { + public SyncPoller, VirtualEndpointInner> beginCreate(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointInner parameters, Context context) { Response response = createWithResponse(resourceGroupName, serverName, virtualEndpointName, parameters, context); - return this.client.getLroResult(response, - VirtualEndpointResourceInner.class, VirtualEndpointResourceInner.class, context); + return this.client.getLroResult(response, + VirtualEndpointInner.class, VirtualEndpointInner.class, context); } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server on successful completion of {@link Mono}. + * @return pair of virtual endpoints for a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync(String resourceGroupName, String serverName, - String virtualEndpointName, VirtualEndpointResourceInner parameters) { + public Mono createAsync(String resourceGroupName, String serverName, + String virtualEndpointName, VirtualEndpointInner parameters) { return beginCreateAsync(resourceGroupName, serverName, virtualEndpointName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server. + * @return pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualEndpointResourceInner create(String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters) { + public VirtualEndpointInner create(String resourceGroupName, String serverName, String virtualEndpointName, + VirtualEndpointInner parameters) { return beginCreate(resourceGroupName, serverName, virtualEndpointName, parameters).getFinalResult(); } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server. + * @return pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualEndpointResourceInner create(String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters, Context context) { + public VirtualEndpointInner create(String resourceGroupName, String serverName, String virtualEndpointName, + VirtualEndpointInner parameters, Context context) { return beginCreate(resourceGroupName, serverName, virtualEndpointName, parameters, context).getFinalResult(); } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server along with {@link Response} on successful completion of + * @return pair of virtual endpoints for a server along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -514,17 +509,16 @@ public Mono>> updateWithResponseAsync(String resourceG } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server along with {@link Response}. + * @return pair of virtual endpoints for a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, @@ -564,18 +558,17 @@ private Response updateWithResponse(String resourceGroupName, String } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server along with {@link Response}. + * @return pair of virtual endpoints for a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, @@ -615,141 +608,131 @@ private Response updateWithResponse(String resourceGroupName, String } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 represents a virtual endpoint for a server. + * @return the {@link PollerFlux} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, VirtualEndpointResourceInner> beginUpdateAsync( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceForPatch parameters) { + public PollerFlux, VirtualEndpointInner> beginUpdateAsync(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters) { Mono>> mono = updateWithResponseAsync(resourceGroupName, serverName, virtualEndpointName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), VirtualEndpointResourceInner.class, VirtualEndpointResourceInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VirtualEndpointInner.class, VirtualEndpointInner.class, this.client.getContext()); } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a virtual endpoint for a server. + * @return the {@link SyncPoller} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualEndpointResourceInner> beginUpdate( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceForPatch parameters) { + public SyncPoller, VirtualEndpointInner> beginUpdate(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters) { Response response = updateWithResponse(resourceGroupName, serverName, virtualEndpointName, parameters); - return this.client.getLroResult(response, - VirtualEndpointResourceInner.class, VirtualEndpointResourceInner.class, Context.NONE); + return this.client.getLroResult(response, + VirtualEndpointInner.class, VirtualEndpointInner.class, Context.NONE); } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a virtual endpoint for a server. + * @return the {@link SyncPoller} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualEndpointResourceInner> beginUpdate( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceForPatch parameters, Context context) { + public SyncPoller, VirtualEndpointInner> beginUpdate(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters, Context context) { Response response = updateWithResponse(resourceGroupName, serverName, virtualEndpointName, parameters, context); - return this.client.getLroResult(response, - VirtualEndpointResourceInner.class, VirtualEndpointResourceInner.class, context); + return this.client.getLroResult(response, + VirtualEndpointInner.class, VirtualEndpointInner.class, context); } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server on successful completion of {@link Mono}. + * @return pair of virtual endpoints for a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, + public Mono updateAsync(String resourceGroupName, String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters) { return beginUpdateAsync(resourceGroupName, serverName, virtualEndpointName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server. + * @return pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualEndpointResourceInner update(String resourceGroupName, String serverName, String virtualEndpointName, + public VirtualEndpointInner update(String resourceGroupName, String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters) { return beginUpdate(resourceGroupName, serverName, virtualEndpointName, parameters).getFinalResult(); } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server. + * @return pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualEndpointResourceInner update(String resourceGroupName, String serverName, String virtualEndpointName, + public VirtualEndpointInner update(String resourceGroupName, String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters, Context context) { return beginUpdate(resourceGroupName, serverName, virtualEndpointName, parameters, context).getFinalResult(); } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -785,11 +768,11 @@ public Mono>> deleteWithResponseAsync(String resourceG } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -826,11 +809,11 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -868,11 +851,11 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -888,11 +871,11 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -906,11 +889,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -925,11 +908,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -942,11 +925,11 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -957,11 +940,11 @@ public void delete(String resourceGroupName, String serverName, String virtualEn } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -973,20 +956,20 @@ public void delete(String resourceGroupName, String serverName, String virtualEn } /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint along with {@link Response} on successful completion of + * @return information about a pair of virtual endpoints along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String virtualEndpointName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String virtualEndpointName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1014,37 +997,37 @@ public Mono> getWithResponseAsync(String } /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint on successful completion of {@link Mono}. + * @return information about a pair of virtual endpoints on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, + public Mono getAsync(String resourceGroupName, String serverName, String virtualEndpointName) { return getWithResponseAsync(resourceGroupName, serverName, virtualEndpointName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint along with {@link Response}. + * @return information about a pair of virtual endpoints along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, + public Response getWithResponse(String resourceGroupName, String serverName, String virtualEndpointName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -1074,33 +1057,33 @@ public Response getWithResponse(String resourceGro } /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint. + * @return information about a pair of virtual endpoints. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualEndpointResourceInner get(String resourceGroupName, String serverName, String virtualEndpointName) { + public VirtualEndpointInner get(String resourceGroupName, String serverName, String virtualEndpointName) { return getWithResponse(resourceGroupName, serverName, virtualEndpointName, Context.NONE).getValue(); } /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual endpoints along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of virtual endpoints along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, + private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -1121,40 +1104,39 @@ private Mono> listByServerSinglePage return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .>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 servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual endpoints as paginated response with {@link PagedFlux}. + * @return list of virtual endpoints as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { + public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual endpoints along with {@link PagedResponse}. + * @return list of virtual endpoints along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, - String serverName) { + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -1174,7 +1156,7 @@ private PagedResponse listByServerSinglePage(Strin .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -1182,7 +1164,7 @@ private PagedResponse listByServerSinglePage(Strin } /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1190,11 +1172,11 @@ private PagedResponse listByServerSinglePage(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual endpoints along with {@link PagedResponse}. + * @return list of virtual endpoints along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, - String serverName, Context context) { + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, + Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -1214,7 +1196,7 @@ private PagedResponse listByServerSinglePage(Strin .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -1222,23 +1204,23 @@ private PagedResponse listByServerSinglePage(Strin } /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual endpoints as paginated response with {@link PagedIterable}. + * @return list of virtual endpoints as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { + public PagedIterable listByServer(String resourceGroupName, String serverName) { return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), nextLink -> listByServerNextSinglePage(nextLink)); } /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1246,10 +1228,10 @@ public PagedIterable listByServer(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual endpoints as paginated response with {@link PagedIterable}. + * @return list of virtual endpoints as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePage(nextLink, context)); @@ -1262,10 +1244,10 @@ public PagedIterable listByServer(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual endpoints along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of virtual endpoints along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync(String nextLink) { + private Mono> listByServerNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1276,7 +1258,7 @@ private Mono> listByServerNextSingle final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .>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())); } @@ -1288,10 +1270,10 @@ private Mono> listByServerNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual endpoints along with {@link PagedResponse}. + * @return list of virtual endpoints along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink) { + private PagedResponse listByServerNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1302,7 +1284,7 @@ private PagedResponse listByServerNextSinglePage(S "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -1316,10 +1298,10 @@ private PagedResponse listByServerNextSinglePage(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of virtual endpoints along with {@link PagedResponse}. + * @return list of virtual endpoints along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { + private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1330,7 +1312,7 @@ private PagedResponse listByServerNextSinglePage(S "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsImpl.java index d42cf9fb48dd..d75b2491e0fe 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsImpl.java @@ -10,8 +10,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResource; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoint; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoints; public final class VirtualEndpointsImpl implements VirtualEndpoints { @@ -35,42 +35,39 @@ public void delete(String resourceGroupName, String serverName, String virtualEn this.serviceClient().delete(resourceGroupName, serverName, virtualEndpointName, context); } - public Response getWithResponse(String resourceGroupName, String serverName, + public Response getWithResponse(String resourceGroupName, String serverName, String virtualEndpointName, Context context) { - Response inner + Response inner = this.serviceClient().getWithResponse(resourceGroupName, serverName, virtualEndpointName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VirtualEndpointResourceImpl(inner.getValue(), this.manager())); + new VirtualEndpointImpl(inner.getValue(), this.manager())); } else { return null; } } - public VirtualEndpointResource get(String resourceGroupName, String serverName, String virtualEndpointName) { - VirtualEndpointResourceInner inner - = this.serviceClient().get(resourceGroupName, serverName, virtualEndpointName); + public VirtualEndpoint get(String resourceGroupName, String serverName, String virtualEndpointName) { + VirtualEndpointInner inner = this.serviceClient().get(resourceGroupName, serverName, virtualEndpointName); if (inner != null) { - return new VirtualEndpointResourceImpl(inner, this.manager()); + return new VirtualEndpointImpl(inner, this.manager()); } else { return null; } } - public PagedIterable listByServer(String resourceGroupName, String serverName) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualEndpointResourceImpl(inner1, this.manager())); + public PagedIterable listByServer(String resourceGroupName, String serverName) { + PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualEndpointImpl(inner1, this.manager())); } - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - PagedIterable inner + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { + PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualEndpointResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualEndpointImpl(inner1, this.manager())); } - public VirtualEndpointResource getById(String id) { + public VirtualEndpoint getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -89,7 +86,7 @@ public VirtualEndpointResource getById(String id) { return this.getWithResponse(resourceGroupName, serverName, virtualEndpointName, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -154,7 +151,7 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man return this.serviceManager; } - public VirtualEndpointResourceImpl define(String name) { - return new VirtualEndpointResourceImpl(name, this.manager()); + public VirtualEndpointImpl define(String name) { + return new VirtualEndpointImpl(name, this.manager()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageResultImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageModelImpl.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageResultImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageModelImpl.java index 583664b0a0f2..6afe82bf3aa6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageResultImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageModelImpl.java @@ -4,18 +4,18 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageResultInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageModelInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.DelegatedSubnetUsage; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageModel; import java.util.Collections; import java.util.List; -public final class VirtualNetworkSubnetUsageResultImpl implements VirtualNetworkSubnetUsageResult { - private VirtualNetworkSubnetUsageResultInner innerObject; +public final class VirtualNetworkSubnetUsageModelImpl implements VirtualNetworkSubnetUsageModel { + private VirtualNetworkSubnetUsageModelInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - VirtualNetworkSubnetUsageResultImpl(VirtualNetworkSubnetUsageResultInner innerObject, + VirtualNetworkSubnetUsageModelImpl(VirtualNetworkSubnetUsageModelInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -38,7 +38,7 @@ public String subscriptionId() { return this.innerModel().subscriptionId(); } - public VirtualNetworkSubnetUsageResultInner innerModel() { + public VirtualNetworkSubnetUsageModelInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesClientImpl.java index 859cf1e2e87d..e077dd44cec5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesClientImpl.java @@ -24,7 +24,7 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualNetworkSubnetUsagesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageResultInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageModelInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; import reactor.core.publisher.Mono; @@ -58,13 +58,13 @@ public final class VirtualNetworkSubnetUsagesClientImpl implements VirtualNetwor * the proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientVirtualNetworkSubnetUsages") public interface VirtualNetworkSubnetUsagesService { @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkVirtualNetworkSubnetUsage") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> execute(@HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, @BodyParam("application/json") VirtualNetworkSubnetUsageParameter parameters, @@ -74,7 +74,7 @@ Mono> execute(@HostParam("$host") @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkVirtualNetworkSubnetUsage") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response executeSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, @BodyParam("application/json") VirtualNetworkSubnetUsageParameter parameters, @@ -82,18 +82,17 @@ Response executeSync(@HostParam("$host") S } /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network subnet usage for a given vNet resource id along with {@link Response} on successful - * completion of {@link Mono}. + * @return virtual network subnet usage data along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> executeWithResponseAsync(String locationName, + public Mono> listWithResponseAsync(String locationName, VirtualNetworkSubnetUsageParameter parameters) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -113,29 +112,29 @@ public Mono> executeWithResponseA } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.execute(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network subnet usage for a given vNet resource id on successful completion of {@link Mono}. + * @return virtual network subnet usage data on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono executeAsync(String locationName, + public Mono listAsync(String locationName, VirtualNetworkSubnetUsageParameter parameters) { - return executeWithResponseAsync(locationName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + return listWithResponseAsync(locationName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. @@ -143,10 +142,10 @@ public Mono executeAsync(String locationNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network subnet usage for a given vNet resource id along with {@link Response}. + * @return virtual network subnet usage data along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response executeWithResponse(String locationName, + public Response listWithResponse(String locationName, VirtualNetworkSubnetUsageParameter parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -169,24 +168,24 @@ public Response executeWithResponse(String parameters.validate(); } final String accept = "application/json"; - return service.executeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, parameters, accept, context); + return service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + locationName, parameters, accept, context); } /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network subnet usage for a given vNet resource id. + * @return virtual network subnet usage data. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualNetworkSubnetUsageResultInner execute(String locationName, + public VirtualNetworkSubnetUsageModelInner list(String locationName, VirtualNetworkSubnetUsageParameter parameters) { - return executeWithResponse(locationName, parameters, Context.NONE).getValue(); + return listWithResponse(locationName, parameters, Context.NONE).getValue(); } private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkSubnetUsagesClientImpl.class); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesImpl.java index ec63d8056871..1eebfa8d752c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesImpl.java @@ -9,9 +9,9 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualNetworkSubnetUsagesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageResultInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageModel; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageResult; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsages; public final class VirtualNetworkSubnetUsagesImpl implements VirtualNetworkSubnetUsages { @@ -27,22 +27,22 @@ public VirtualNetworkSubnetUsagesImpl(VirtualNetworkSubnetUsagesClient innerClie this.serviceManager = serviceManager; } - public Response executeWithResponse(String locationName, + public Response listWithResponse(String locationName, VirtualNetworkSubnetUsageParameter parameters, Context context) { - Response inner - = this.serviceClient().executeWithResponse(locationName, parameters, context); + Response inner + = this.serviceClient().listWithResponse(locationName, parameters, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VirtualNetworkSubnetUsageResultImpl(inner.getValue(), this.manager())); + new VirtualNetworkSubnetUsageModelImpl(inner.getValue(), this.manager())); } else { return null; } } - public VirtualNetworkSubnetUsageResult execute(String locationName, VirtualNetworkSubnetUsageParameter parameters) { - VirtualNetworkSubnetUsageResultInner inner = this.serviceClient().execute(locationName, parameters); + public VirtualNetworkSubnetUsageModel list(String locationName, VirtualNetworkSubnetUsageParameter parameters) { + VirtualNetworkSubnetUsageModelInner inner = this.serviceClient().list(locationName, parameters); if (inner != null) { - return new VirtualNetworkSubnetUsageResultImpl(inner, this.manager()); + return new VirtualNetworkSubnetUsageModelImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/package-info.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/package-info.java index e0753268fc2d..aa03b7e448c5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/package-info.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/package-info.java @@ -4,8 +4,8 @@ /** * Package containing the implementations for PostgreSqlManagementClient. - * The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL - * resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and - * configurations with new business model. + * The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure + * PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, + * log files and configurations with new business model. */ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministrator.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministrator.java deleted file mode 100644 index 5b0f9fa1eef7..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministrator.java +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner; - -/** - * An immutable client-side representation of ActiveDirectoryAdministrator. - */ -public interface ActiveDirectoryAdministrator { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. - * - * @return the principalType value. - */ - PrincipalType principalType(); - - /** - * Gets the principalName property: Microsoft Entra Administrator principal name. - * - * @return the principalName value. - */ - String principalName(); - - /** - * Gets the objectId property: The objectId of the Microsoft Entra Administrator. - * - * @return the objectId value. - */ - String objectId(); - - /** - * Gets the tenantId property: The tenantId of the Microsoft Entra Administrator. - * - * @return the tenantId value. - */ - String tenantId(); - - /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner - * object. - * - * @return the inner object. - */ - ActiveDirectoryAdministratorInner innerModel(); - - /** - * The entirety of the ActiveDirectoryAdministrator definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The ActiveDirectoryAdministrator definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ActiveDirectoryAdministrator definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ActiveDirectoryAdministrator definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, serverName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @return the next definition stage. - */ - WithCreate withExistingFlexibleServer(String resourceGroupName, String serverName); - } - - /** - * The stage of the ActiveDirectoryAdministrator definition which contains all the minimum required properties - * for the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithPrincipalType, DefinitionStages.WithPrincipalName, - DefinitionStages.WithTenantId { - /** - * Executes the create request. - * - * @return the created resource. - */ - ActiveDirectoryAdministrator create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ActiveDirectoryAdministrator create(Context context); - } - - /** - * The stage of the ActiveDirectoryAdministrator definition allowing to specify principalType. - */ - interface WithPrincipalType { - /** - * Specifies the principalType property: The principal type used to represent the type of Microsoft Entra - * Administrator.. - * - * @param principalType The principal type used to represent the type of Microsoft Entra Administrator. - * @return the next definition stage. - */ - WithCreate withPrincipalType(PrincipalType principalType); - } - - /** - * The stage of the ActiveDirectoryAdministrator definition allowing to specify principalName. - */ - interface WithPrincipalName { - /** - * Specifies the principalName property: Microsoft Entra Administrator principal name.. - * - * @param principalName Microsoft Entra Administrator principal name. - * @return the next definition stage. - */ - WithCreate withPrincipalName(String principalName); - } - - /** - * The stage of the ActiveDirectoryAdministrator definition allowing to specify tenantId. - */ - interface WithTenantId { - /** - * Specifies the tenantId property: The tenantId of the Microsoft Entra Administrator.. - * - * @param tenantId The tenantId of the Microsoft Entra Administrator. - * @return the next definition stage. - */ - WithCreate withTenantId(String tenantId); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ActiveDirectoryAdministrator refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ActiveDirectoryAdministrator refresh(Context context); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAuthEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAuthEnum.java deleted file mode 100644 index 1b8c9800f652..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAuthEnum.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * If Enabled, Microsoft Entra authentication is enabled. - */ -public final class ActiveDirectoryAuthEnum extends ExpandableStringEnum { - /** - * Static value Enabled for ActiveDirectoryAuthEnum. - */ - public static final ActiveDirectoryAuthEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for ActiveDirectoryAuthEnum. - */ - public static final ActiveDirectoryAuthEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of ActiveDirectoryAuthEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActiveDirectoryAuthEnum() { - } - - /** - * Creates or finds a ActiveDirectoryAuthEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActiveDirectoryAuthEnum. - */ - public static ActiveDirectoryAuthEnum fromString(String name) { - return fromString(name, ActiveDirectoryAuthEnum.class); - } - - /** - * Gets known ActiveDirectoryAuthEnum values. - * - * @return known ActiveDirectoryAuthEnum values. - */ - public static Collection values() { - return values(ActiveDirectoryAuthEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentials.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentials.java index 910670d2d3f8..0409bc977c68 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentials.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentials.java @@ -13,17 +13,17 @@ import java.io.IOException; /** - * Server admin credentials. + * Credentials of administrator users for source and target servers. */ @Fluent public final class AdminCredentials implements JsonSerializable { /* - * Password for source server. + * Password for the user of the source server. */ private String sourceServerPassword; /* - * Password for target server. + * Password for the user of the target server. */ private String targetServerPassword; @@ -34,7 +34,7 @@ public AdminCredentials() { } /** - * Get the sourceServerPassword property: Password for source server. + * Get the sourceServerPassword property: Password for the user of the source server. * * @return the sourceServerPassword value. */ @@ -43,7 +43,7 @@ public String sourceServerPassword() { } /** - * Set the sourceServerPassword property: Password for source server. + * Set the sourceServerPassword property: Password for the user of the source server. * * @param sourceServerPassword the sourceServerPassword value to set. * @return the AdminCredentials object itself. @@ -54,7 +54,7 @@ public AdminCredentials withSourceServerPassword(String sourceServerPassword) { } /** - * Get the targetServerPassword property: Password for target server. + * Get the targetServerPassword property: Password for the user of the target server. * * @return the targetServerPassword value. */ @@ -63,7 +63,7 @@ public String targetServerPassword() { } /** - * Set the targetServerPassword property: Password for target server. + * Set the targetServerPassword property: Password for the user of the target server. * * @param targetServerPassword the targetServerPassword value to set. * @return the AdminCredentials object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentialsForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentialsForPatch.java new file mode 100644 index 000000000000..bdbe5a3b071e --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentialsForPatch.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Credentials of administrator users for source and target servers. + */ +@Fluent +public final class AdminCredentialsForPatch implements JsonSerializable { + /* + * Password for the user of the source server. + */ + private String sourceServerPassword; + + /* + * Password for the user of the target server. + */ + private String targetServerPassword; + + /** + * Creates an instance of AdminCredentialsForPatch class. + */ + public AdminCredentialsForPatch() { + } + + /** + * Get the sourceServerPassword property: Password for the user of the source server. + * + * @return the sourceServerPassword value. + */ + public String sourceServerPassword() { + return this.sourceServerPassword; + } + + /** + * Set the sourceServerPassword property: Password for the user of the source server. + * + * @param sourceServerPassword the sourceServerPassword value to set. + * @return the AdminCredentialsForPatch object itself. + */ + public AdminCredentialsForPatch withSourceServerPassword(String sourceServerPassword) { + this.sourceServerPassword = sourceServerPassword; + return this; + } + + /** + * Get the targetServerPassword property: Password for the user of the target server. + * + * @return the targetServerPassword value. + */ + public String targetServerPassword() { + return this.targetServerPassword; + } + + /** + * Set the targetServerPassword property: Password for the user of the target server. + * + * @param targetServerPassword the targetServerPassword value to set. + * @return the AdminCredentialsForPatch object itself. + */ + public AdminCredentialsForPatch withTargetServerPassword(String targetServerPassword) { + this.targetServerPassword = targetServerPassword; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceServerPassword", this.sourceServerPassword); + jsonWriter.writeStringField("targetServerPassword", this.targetServerPassword); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdminCredentialsForPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdminCredentialsForPatch if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AdminCredentialsForPatch. + */ + public static AdminCredentialsForPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdminCredentialsForPatch deserializedAdminCredentialsForPatch = new AdminCredentialsForPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceServerPassword".equals(fieldName)) { + deserializedAdminCredentialsForPatch.sourceServerPassword = reader.getString(); + } else if ("targetServerPassword".equals(fieldName)) { + deserializedAdminCredentialsForPatch.targetServerPassword = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAdminCredentialsForPatch; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorListResult.java deleted file mode 100644 index b547fb12c3a8..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorListResult.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of Microsoft Entra Administrators. - */ -@Fluent -public final class AdministratorListResult implements JsonSerializable { - /* - * The list of Microsoft Entra Administrators - */ - private List value; - - /* - * The link used to get the next page of Microsoft Entra administrators. - */ - private String nextLink; - - /** - * Creates an instance of AdministratorListResult class. - */ - public AdministratorListResult() { - } - - /** - * Get the value property: The list of Microsoft Entra Administrators. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of Microsoft Entra Administrators. - * - * @param value the value value to set. - * @return the AdministratorListResult object itself. - */ - public AdministratorListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link used to get the next page of Microsoft Entra administrators. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of Microsoft Entra administrators. - * - * @param nextLink the nextLink value to set. - * @return the AdministratorListResult object itself. - */ - public AdministratorListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AdministratorListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AdministratorListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the AdministratorListResult. - */ - public static AdministratorListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AdministratorListResult deserializedAdministratorListResult = new AdministratorListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ActiveDirectoryAdministratorInner.fromJson(reader1)); - deserializedAdministratorListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedAdministratorListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAdministratorListResult; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntra.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntra.java new file mode 100644 index 000000000000..9d89a4f5d581 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntra.java @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; + +/** + * An immutable client-side representation of AdministratorMicrosoftEntra. + */ +public interface AdministratorMicrosoftEntra { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. + * + * @return the principalType value. + */ + PrincipalType principalType(); + + /** + * Gets the principalName property: Name of the Microsoft Entra principal. + * + * @return the principalName value. + */ + String principalName(); + + /** + * Gets the objectId property: Object identifier of the Microsoft Entra principal. + * + * @return the objectId value. + */ + String objectId(); + + /** + * Gets the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. + * + * @return the tenantId value. + */ + String tenantId(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner + * object. + * + * @return the inner object. + */ + AdministratorMicrosoftEntraInner innerModel(); + + /** + * The entirety of the AdministratorMicrosoftEntra definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The AdministratorMicrosoftEntra definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the AdministratorMicrosoftEntra definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the AdministratorMicrosoftEntra definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, serverName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @return the next definition stage. + */ + WithCreate withExistingFlexibleServer(String resourceGroupName, String serverName); + } + + /** + * The stage of the AdministratorMicrosoftEntra definition which contains all the minimum required properties + * for the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithPrincipalType, DefinitionStages.WithPrincipalName, + DefinitionStages.WithTenantId { + /** + * Executes the create request. + * + * @return the created resource. + */ + AdministratorMicrosoftEntra create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AdministratorMicrosoftEntra create(Context context); + } + + /** + * The stage of the AdministratorMicrosoftEntra definition allowing to specify principalType. + */ + interface WithPrincipalType { + /** + * Specifies the principalType property: Type of Microsoft Entra principal to which the server administrator + * is associated.. + * + * @param principalType Type of Microsoft Entra principal to which the server administrator is associated. + * @return the next definition stage. + */ + WithCreate withPrincipalType(PrincipalType principalType); + } + + /** + * The stage of the AdministratorMicrosoftEntra definition allowing to specify principalName. + */ + interface WithPrincipalName { + /** + * Specifies the principalName property: Name of the Microsoft Entra principal.. + * + * @param principalName Name of the Microsoft Entra principal. + * @return the next definition stage. + */ + WithCreate withPrincipalName(String principalName); + } + + /** + * The stage of the AdministratorMicrosoftEntra definition allowing to specify tenantId. + */ + interface WithTenantId { + /** + * Specifies the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists.. + * + * @param tenantId Identifier of the tenant in which the Microsoft Entra principal exists. + * @return the next definition stage. + */ + WithCreate withTenantId(String tenantId); + } + } + + /** + * Begins update for the AdministratorMicrosoftEntra resource. + * + * @return the stage of resource update. + */ + AdministratorMicrosoftEntra.Update update(); + + /** + * The template for AdministratorMicrosoftEntra update. + */ + interface Update extends UpdateStages.WithPrincipalType, UpdateStages.WithPrincipalName, UpdateStages.WithTenantId { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AdministratorMicrosoftEntra apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AdministratorMicrosoftEntra apply(Context context); + } + + /** + * The AdministratorMicrosoftEntra update stages. + */ + interface UpdateStages { + /** + * The stage of the AdministratorMicrosoftEntra update allowing to specify principalType. + */ + interface WithPrincipalType { + /** + * Specifies the principalType property: Type of Microsoft Entra principal to which the server administrator + * is associated.. + * + * @param principalType Type of Microsoft Entra principal to which the server administrator is associated. + * @return the next definition stage. + */ + Update withPrincipalType(PrincipalType principalType); + } + + /** + * The stage of the AdministratorMicrosoftEntra update allowing to specify principalName. + */ + interface WithPrincipalName { + /** + * Specifies the principalName property: Name of the Microsoft Entra principal.. + * + * @param principalName Name of the Microsoft Entra principal. + * @return the next definition stage. + */ + Update withPrincipalName(String principalName); + } + + /** + * The stage of the AdministratorMicrosoftEntra update allowing to specify tenantId. + */ + interface WithTenantId { + /** + * Specifies the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists.. + * + * @param tenantId Identifier of the tenant in which the Microsoft Entra principal exists. + * @return the next definition stage. + */ + Update withTenantId(String tenantId); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AdministratorMicrosoftEntra refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AdministratorMicrosoftEntra refresh(Context context); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministratorAdd.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraAdd.java similarity index 52% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministratorAdd.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraAdd.java index ac791721746c..cc9d5cb6a453 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministratorAdd.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraAdd.java @@ -9,36 +9,38 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorPropertiesForAdd; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraPropertiesForAdd; import java.io.IOException; /** - * Represents an Microsoft Entra Administrator. + * Server administrator associated to a Microsoft Entra principal. */ @Fluent -public final class ActiveDirectoryAdministratorAdd implements JsonSerializable { +public final class AdministratorMicrosoftEntraAdd implements JsonSerializable { /* - * Properties of the Microsoft Entra Administrator. + * Properties of the server administrator associated to a Microsoft Entra principal. */ - private AdministratorPropertiesForAdd innerProperties; + private AdministratorMicrosoftEntraPropertiesForAdd innerProperties; /** - * Creates an instance of ActiveDirectoryAdministratorAdd class. + * Creates an instance of AdministratorMicrosoftEntraAdd class. */ - public ActiveDirectoryAdministratorAdd() { + public AdministratorMicrosoftEntraAdd() { } /** - * Get the innerProperties property: Properties of the Microsoft Entra Administrator. + * Get the innerProperties property: Properties of the server administrator associated to a Microsoft Entra + * principal. * * @return the innerProperties value. */ - private AdministratorPropertiesForAdd innerProperties() { + private AdministratorMicrosoftEntraPropertiesForAdd innerProperties() { return this.innerProperties; } /** - * Get the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. + * Get the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. * * @return the principalType value. */ @@ -47,21 +49,22 @@ public PrincipalType principalType() { } /** - * Set the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. + * Set the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. * * @param principalType the principalType value to set. - * @return the ActiveDirectoryAdministratorAdd object itself. + * @return the AdministratorMicrosoftEntraAdd object itself. */ - public ActiveDirectoryAdministratorAdd withPrincipalType(PrincipalType principalType) { + public AdministratorMicrosoftEntraAdd withPrincipalType(PrincipalType principalType) { if (this.innerProperties() == null) { - this.innerProperties = new AdministratorPropertiesForAdd(); + this.innerProperties = new AdministratorMicrosoftEntraPropertiesForAdd(); } this.innerProperties().withPrincipalType(principalType); return this; } /** - * Get the principalName property: Microsoft Entra Administrator principal name. + * Get the principalName property: Name of the Microsoft Entra principal. * * @return the principalName value. */ @@ -70,21 +73,21 @@ public String principalName() { } /** - * Set the principalName property: Microsoft Entra Administrator principal name. + * Set the principalName property: Name of the Microsoft Entra principal. * * @param principalName the principalName value to set. - * @return the ActiveDirectoryAdministratorAdd object itself. + * @return the AdministratorMicrosoftEntraAdd object itself. */ - public ActiveDirectoryAdministratorAdd withPrincipalName(String principalName) { + public AdministratorMicrosoftEntraAdd withPrincipalName(String principalName) { if (this.innerProperties() == null) { - this.innerProperties = new AdministratorPropertiesForAdd(); + this.innerProperties = new AdministratorMicrosoftEntraPropertiesForAdd(); } this.innerProperties().withPrincipalName(principalName); return this; } /** - * Get the tenantId property: The tenantId of the Microsoft Entra Administrator. + * Get the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * * @return the tenantId value. */ @@ -93,14 +96,14 @@ public String tenantId() { } /** - * Set the tenantId property: The tenantId of the Microsoft Entra Administrator. + * Set the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * * @param tenantId the tenantId value to set. - * @return the ActiveDirectoryAdministratorAdd object itself. + * @return the AdministratorMicrosoftEntraAdd object itself. */ - public ActiveDirectoryAdministratorAdd withTenantId(String tenantId) { + public AdministratorMicrosoftEntraAdd withTenantId(String tenantId) { if (this.innerProperties() == null) { - this.innerProperties = new AdministratorPropertiesForAdd(); + this.innerProperties = new AdministratorMicrosoftEntraPropertiesForAdd(); } this.innerProperties().withTenantId(tenantId); return this; @@ -128,30 +131,30 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ActiveDirectoryAdministratorAdd from the JsonReader. + * Reads an instance of AdministratorMicrosoftEntraAdd from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ActiveDirectoryAdministratorAdd if the JsonReader was pointing to an instance of it, or + * @return An instance of AdministratorMicrosoftEntraAdd if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ActiveDirectoryAdministratorAdd. + * @throws IOException If an error occurs while reading the AdministratorMicrosoftEntraAdd. */ - public static ActiveDirectoryAdministratorAdd fromJson(JsonReader jsonReader) throws IOException { + public static AdministratorMicrosoftEntraAdd fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ActiveDirectoryAdministratorAdd deserializedActiveDirectoryAdministratorAdd - = new ActiveDirectoryAdministratorAdd(); + AdministratorMicrosoftEntraAdd deserializedAdministratorMicrosoftEntraAdd + = new AdministratorMicrosoftEntraAdd(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("properties".equals(fieldName)) { - deserializedActiveDirectoryAdministratorAdd.innerProperties - = AdministratorPropertiesForAdd.fromJson(reader); + deserializedAdministratorMicrosoftEntraAdd.innerProperties + = AdministratorMicrosoftEntraPropertiesForAdd.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedActiveDirectoryAdministratorAdd; + return deserializedAdministratorMicrosoftEntraAdd; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraList.java new file mode 100644 index 000000000000..54e97f4d55ed --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraList.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.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; +import java.io.IOException; +import java.util.List; + +/** + * List of server administrators associated to Microsoft Entra principals. + */ +@Fluent +public final class AdministratorMicrosoftEntraList implements JsonSerializable { + /* + * List of server administrators associated to Microsoft Entra principals. + */ + private List value; + + /* + * Link used to get the next page of results. + */ + private String nextLink; + + /** + * Creates an instance of AdministratorMicrosoftEntraList class. + */ + public AdministratorMicrosoftEntraList() { + } + + /** + * Get the value property: List of server administrators associated to Microsoft Entra principals. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of server administrators associated to Microsoft Entra principals. + * + * @param value the value value to set. + * @return the AdministratorMicrosoftEntraList object itself. + */ + public AdministratorMicrosoftEntraList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link used to get the next page of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link used to get the next page of results. + * + * @param nextLink the nextLink value to set. + * @return the AdministratorMicrosoftEntraList object itself. + */ + public AdministratorMicrosoftEntraList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdministratorMicrosoftEntraList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdministratorMicrosoftEntraList if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AdministratorMicrosoftEntraList. + */ + public static AdministratorMicrosoftEntraList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdministratorMicrosoftEntraList deserializedAdministratorMicrosoftEntraList + = new AdministratorMicrosoftEntraList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> AdministratorMicrosoftEntraInner.fromJson(reader1)); + deserializedAdministratorMicrosoftEntraList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAdministratorMicrosoftEntraList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAdministratorMicrosoftEntraList; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Administrators.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorsMicrosoftEntras.java similarity index 64% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Administrators.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorsMicrosoftEntras.java index 3ae117f77073..635192c996e7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Administrators.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorsMicrosoftEntras.java @@ -9,15 +9,15 @@ import com.azure.core.util.Context; /** - * Resource collection API of Administrators. + * Resource collection API of AdministratorsMicrosoftEntras. */ -public interface Administrators { +public interface AdministratorsMicrosoftEntras { /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -25,11 +25,11 @@ public interface Administrators { void delete(String resourceGroupName, String serverName, String objectId); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -38,47 +38,49 @@ public interface Administrators { void delete(String resourceGroupName, String serverName, String objectId, Context context); /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response}. */ - Response getWithResponse(String resourceGroupName, String serverName, String objectId, + Response getWithResponse(String resourceGroupName, String serverName, String objectId, Context context); /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about a server administrator associated to a Microsoft Entra principal. */ - ActiveDirectoryAdministrator get(String resourceGroupName, String serverName, String objectId); + AdministratorMicrosoftEntra get(String resourceGroupName, String serverName, String objectId); /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 Microsoft Entra Administrators as paginated response with {@link PagedIterable}. + * @return list of server administrators associated to Microsoft Entra principals as paginated response with + * {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -86,36 +88,39 @@ Response getWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Microsoft Entra Administrators as paginated response with {@link PagedIterable}. + * @return list of server administrators associated to Microsoft Entra principals as paginated response with + * {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName, + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response}. */ - ActiveDirectoryAdministrator getById(String id); + AdministratorMicrosoftEntra getById(String id); /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + Response getByIdWithResponse(String id, Context context); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -125,7 +130,7 @@ PagedIterable listByServer(String resourceGroupNam void deleteById(String id); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -136,10 +141,10 @@ PagedIterable listByServer(String resourceGroupNam void deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new ActiveDirectoryAdministrator resource. + * Begins definition for a new AdministratorMicrosoftEntra resource. * * @param name resource name. - * @return the first stage of the new ActiveDirectoryAdministrator definition. + * @return the first stage of the new AdministratorMicrosoftEntra definition. */ - ActiveDirectoryAdministrator.DefinitionStages.Blank define(String name); + AdministratorMicrosoftEntra.DefinitionStages.Blank define(String name); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupOperations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettings.java similarity index 60% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupOperations.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettings.java index 0de0fbe4b0b2..116e18e003d3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupOperations.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettings.java @@ -9,62 +9,63 @@ import com.azure.core.util.Context; /** - * Resource collection API of LtrBackupOperations. + * Resource collection API of AdvancedThreatProtectionSettings. */ -public interface LtrBackupOperations { +public interface AdvancedThreatProtectionSettings { /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operation for the flexible server along with - * {@link Response}. + * @return list of advanced threat protection settings for a server as paginated response with + * {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String serverName, String backupName, - Context context); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operation for the flexible server. + * @return list of advanced threat protection settings for a server as paginated response with + * {@link PagedIterable}. */ - LtrServerBackupOperation get(String resourceGroupName, String serverName, String backupName); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operations for the flexible server as paginated - * response with {@link PagedIterable}. + * @return state of advanced threat protection settings for a server along with {@link Response}. */ - PagedIterable listByServer(String resourceGroupName, String serverName); + Response getWithResponse(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, Context context); /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param context The context to associate with this operation. + * @param threatProtectionName Name of the advanced threat protection settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operations for the flexible server as paginated - * response with {@link PagedIterable}. + * @return state of advanced threat protection settings for a server. */ - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + AdvancedThreatProtectionSettingsModel get(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsList.java new file mode 100644 index 000000000000..96786efbebf3 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsList.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; +import java.io.IOException; +import java.util.List; + +/** + * List of advanced threat protection settings for a server. + */ +@Fluent +public final class AdvancedThreatProtectionSettingsList + implements JsonSerializable { + /* + * Array of results. + */ + private List value; + + /* + * Link used to get the next page of results. + */ + private String nextLink; + + /** + * Creates an instance of AdvancedThreatProtectionSettingsList class. + */ + public AdvancedThreatProtectionSettingsList() { + } + + /** + * Get the value property: Array of results. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: Link used to get the next page of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link used to get the next page of results. + * + * @param nextLink the nextLink value to set. + * @return the AdvancedThreatProtectionSettingsList object itself. + */ + public AdvancedThreatProtectionSettingsList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdvancedThreatProtectionSettingsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdvancedThreatProtectionSettingsList if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AdvancedThreatProtectionSettingsList. + */ + public static AdvancedThreatProtectionSettingsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdvancedThreatProtectionSettingsList deserializedAdvancedThreatProtectionSettingsList + = new AdvancedThreatProtectionSettingsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> AdvancedThreatProtectionSettingsModelInner.fromJson(reader1)); + deserializedAdvancedThreatProtectionSettingsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAdvancedThreatProtectionSettingsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAdvancedThreatProtectionSettingsList; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettingsModel.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsModel.java similarity index 58% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettingsModel.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsModel.java index 4695bacfe895..c76f4156a8ff 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettingsModel.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsModel.java @@ -6,13 +6,13 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerThreatProtectionSettingsModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; import java.time.OffsetDateTime; /** - * An immutable client-side representation of ServerThreatProtectionSettingsModel. + * An immutable client-side representation of AdvancedThreatProtectionSettingsModel. */ -public interface ServerThreatProtectionSettingsModel { +public interface AdvancedThreatProtectionSettingsModel { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -42,15 +42,15 @@ public interface ServerThreatProtectionSettingsModel { SystemData systemData(); /** - * Gets the state property: Specifies the state of the Threat Protection, whether it is enabled or disabled or a - * state has not been applied yet on the specific server. + * Gets the state property: Specifies the state of the advanced threat protection, whether it is enabled, disabled, + * or a state has not been applied yet on the server. * * @return the state value. */ ThreatProtectionState state(); /** - * Gets the creationTime property: Specifies the UTC creation time of the policy. + * Gets the creationTime property: Specifies the creation time (UTC) of the policy. * * @return the creationTime value. */ @@ -65,31 +65,32 @@ public interface ServerThreatProtectionSettingsModel { /** * Gets the inner - * com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerThreatProtectionSettingsModelInner object. + * com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner + * object. * * @return the inner object. */ - ServerThreatProtectionSettingsModelInner innerModel(); + AdvancedThreatProtectionSettingsModelInner innerModel(); /** - * The entirety of the ServerThreatProtectionSettingsModel definition. + * The entirety of the AdvancedThreatProtectionSettingsModel definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } /** - * The ServerThreatProtectionSettingsModel definition stages. + * The AdvancedThreatProtectionSettingsModel definition stages. */ interface DefinitionStages { /** - * The first stage of the ServerThreatProtectionSettingsModel definition. + * The first stage of the AdvancedThreatProtectionSettingsModel definition. */ interface Blank extends WithParentResource { } /** - * The stage of the ServerThreatProtectionSettingsModel definition allowing to specify parent resource. + * The stage of the AdvancedThreatProtectionSettingsModel definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -103,7 +104,7 @@ interface WithParentResource { } /** - * The stage of the ServerThreatProtectionSettingsModel definition which contains all the minimum required + * The stage of the AdvancedThreatProtectionSettingsModel definition which contains all the minimum required * properties for the resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate extends DefinitionStages.WithState { @@ -112,7 +113,7 @@ interface WithCreate extends DefinitionStages.WithState { * * @return the created resource. */ - ServerThreatProtectionSettingsModel create(); + AdvancedThreatProtectionSettingsModel create(); /** * Executes the create request. @@ -120,19 +121,19 @@ interface WithCreate extends DefinitionStages.WithState { * @param context The context to associate with this operation. * @return the created resource. */ - ServerThreatProtectionSettingsModel create(Context context); + AdvancedThreatProtectionSettingsModel create(Context context); } /** - * The stage of the ServerThreatProtectionSettingsModel definition allowing to specify state. + * The stage of the AdvancedThreatProtectionSettingsModel definition allowing to specify state. */ interface WithState { /** - * Specifies the state property: Specifies the state of the Threat Protection, whether it is enabled or - * disabled or a state has not been applied yet on the specific server.. + * Specifies the state property: Specifies the state of the advanced threat protection, whether it is + * enabled, disabled, or a state has not been applied yet on the server.. * - * @param state Specifies the state of the Threat Protection, whether it is enabled or disabled or a state - * has not been applied yet on the specific server. + * @param state Specifies the state of the advanced threat protection, whether it is enabled, disabled, or a + * state has not been applied yet on the server. * @return the next definition stage. */ WithCreate withState(ThreatProtectionState state); @@ -140,14 +141,14 @@ interface WithState { } /** - * Begins update for the ServerThreatProtectionSettingsModel resource. + * Begins update for the AdvancedThreatProtectionSettingsModel resource. * * @return the stage of resource update. */ - ServerThreatProtectionSettingsModel.Update update(); + AdvancedThreatProtectionSettingsModel.Update update(); /** - * The template for ServerThreatProtectionSettingsModel update. + * The template for AdvancedThreatProtectionSettingsModel update. */ interface Update extends UpdateStages.WithState { /** @@ -155,7 +156,7 @@ interface Update extends UpdateStages.WithState { * * @return the updated resource. */ - ServerThreatProtectionSettingsModel apply(); + AdvancedThreatProtectionSettingsModel apply(); /** * Executes the update request. @@ -163,41 +164,26 @@ interface Update extends UpdateStages.WithState { * @param context The context to associate with this operation. * @return the updated resource. */ - ServerThreatProtectionSettingsModel apply(Context context); + AdvancedThreatProtectionSettingsModel apply(Context context); } /** - * The ServerThreatProtectionSettingsModel update stages. + * The AdvancedThreatProtectionSettingsModel update stages. */ interface UpdateStages { /** - * The stage of the ServerThreatProtectionSettingsModel update allowing to specify state. + * The stage of the AdvancedThreatProtectionSettingsModel update allowing to specify state. */ interface WithState { /** - * Specifies the state property: Specifies the state of the Threat Protection, whether it is enabled or - * disabled or a state has not been applied yet on the specific server.. + * Specifies the state property: Specifies the state of the advanced threat protection, whether it is + * enabled, disabled, or a state has not been applied yet on the server.. * - * @param state Specifies the state of the Threat Protection, whether it is enabled or disabled or a state - * has not been applied yet on the specific server. + * @param state Specifies the state of the advanced threat protection, whether it is enabled, disabled, or a + * state has not been applied yet on the server. * @return the next definition stage. */ Update withState(ThreatProtectionState state); } } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ServerThreatProtectionSettingsModel refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ServerThreatProtectionSettingsModel refresh(Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ArmServerKeyType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ArmServerKeyType.java deleted file mode 100644 index f1dc83e3bdd6..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ArmServerKeyType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Data encryption type to depict if it is System Managed vs Azure Key vault. - */ -public final class ArmServerKeyType extends ExpandableStringEnum { - /** - * Static value SystemManaged for ArmServerKeyType. - */ - public static final ArmServerKeyType SYSTEM_MANAGED = fromString("SystemManaged"); - - /** - * Static value AzureKeyVault for ArmServerKeyType. - */ - public static final ArmServerKeyType AZURE_KEY_VAULT = fromString("AzureKeyVault"); - - /** - * Creates a new instance of ArmServerKeyType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ArmServerKeyType() { - } - - /** - * Creates or finds a ArmServerKeyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ArmServerKeyType. - */ - public static ArmServerKeyType fromString(String name) { - return fromString(name, ArmServerKeyType.class); - } - - /** - * Gets known ArmServerKeyType values. - * - * @return known ArmServerKeyType values. - */ - public static Collection values() { - return values(ArmServerKeyType.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfig.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfig.java index 02900dbb7e6a..bc3d4fcee233 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfig.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfig.java @@ -17,17 +17,17 @@ @Fluent public final class AuthConfig implements JsonSerializable { /* - * If Enabled, Microsoft Entra authentication is enabled. + * Indicates if the server supports Microsoft Entra authentication. */ - private ActiveDirectoryAuthEnum activeDirectoryAuth; + private MicrosoftEntraAuth activeDirectoryAuth; /* - * If Enabled, Password authentication is enabled. + * Indicates if the server supports password based authentication. */ - private PasswordAuthEnum passwordAuth; + private PasswordBasedAuth passwordAuth; /* - * Tenant id of the server. + * Identifier of the tenant of the delegated resource. */ private String tenantId; @@ -38,47 +38,47 @@ public AuthConfig() { } /** - * Get the activeDirectoryAuth property: If Enabled, Microsoft Entra authentication is enabled. + * Get the activeDirectoryAuth property: Indicates if the server supports Microsoft Entra authentication. * * @return the activeDirectoryAuth value. */ - public ActiveDirectoryAuthEnum activeDirectoryAuth() { + public MicrosoftEntraAuth activeDirectoryAuth() { return this.activeDirectoryAuth; } /** - * Set the activeDirectoryAuth property: If Enabled, Microsoft Entra authentication is enabled. + * Set the activeDirectoryAuth property: Indicates if the server supports Microsoft Entra authentication. * * @param activeDirectoryAuth the activeDirectoryAuth value to set. * @return the AuthConfig object itself. */ - public AuthConfig withActiveDirectoryAuth(ActiveDirectoryAuthEnum activeDirectoryAuth) { + public AuthConfig withActiveDirectoryAuth(MicrosoftEntraAuth activeDirectoryAuth) { this.activeDirectoryAuth = activeDirectoryAuth; return this; } /** - * Get the passwordAuth property: If Enabled, Password authentication is enabled. + * Get the passwordAuth property: Indicates if the server supports password based authentication. * * @return the passwordAuth value. */ - public PasswordAuthEnum passwordAuth() { + public PasswordBasedAuth passwordAuth() { return this.passwordAuth; } /** - * Set the passwordAuth property: If Enabled, Password authentication is enabled. + * Set the passwordAuth property: Indicates if the server supports password based authentication. * * @param passwordAuth the passwordAuth value to set. * @return the AuthConfig object itself. */ - public AuthConfig withPasswordAuth(PasswordAuthEnum passwordAuth) { + public AuthConfig withPasswordAuth(PasswordBasedAuth passwordAuth) { this.passwordAuth = passwordAuth; return this; } /** - * Get the tenantId property: Tenant id of the server. + * Get the tenantId property: Identifier of the tenant of the delegated resource. * * @return the tenantId value. */ @@ -87,7 +87,7 @@ public String tenantId() { } /** - * Set the tenantId property: Tenant id of the server. + * Set the tenantId property: Identifier of the tenant of the delegated resource. * * @param tenantId the tenantId value to set. * @return the AuthConfig object itself. @@ -134,9 +134,9 @@ public static AuthConfig fromJson(JsonReader jsonReader) throws IOException { reader.nextToken(); if ("activeDirectoryAuth".equals(fieldName)) { - deserializedAuthConfig.activeDirectoryAuth = ActiveDirectoryAuthEnum.fromString(reader.getString()); + deserializedAuthConfig.activeDirectoryAuth = MicrosoftEntraAuth.fromString(reader.getString()); } else if ("passwordAuth".equals(fieldName)) { - deserializedAuthConfig.passwordAuth = PasswordAuthEnum.fromString(reader.getString()); + deserializedAuthConfig.passwordAuth = PasswordBasedAuth.fromString(reader.getString()); } else if ("tenantId".equals(fieldName)) { deserializedAuthConfig.tenantId = reader.getString(); } else { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfigForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfigForPatch.java new file mode 100644 index 000000000000..558487ee0476 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfigForPatch.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.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Authentication configuration properties of a server. + */ +@Fluent +public final class AuthConfigForPatch implements JsonSerializable { + /* + * Indicates if the server supports Microsoft Entra authentication. + */ + private MicrosoftEntraAuth activeDirectoryAuth; + + /* + * Indicates if the server supports password based authentication. + */ + private PasswordBasedAuth passwordAuth; + + /* + * Identifier of the tenant of the delegated resource. + */ + private String tenantId; + + /** + * Creates an instance of AuthConfigForPatch class. + */ + public AuthConfigForPatch() { + } + + /** + * Get the activeDirectoryAuth property: Indicates if the server supports Microsoft Entra authentication. + * + * @return the activeDirectoryAuth value. + */ + public MicrosoftEntraAuth activeDirectoryAuth() { + return this.activeDirectoryAuth; + } + + /** + * Set the activeDirectoryAuth property: Indicates if the server supports Microsoft Entra authentication. + * + * @param activeDirectoryAuth the activeDirectoryAuth value to set. + * @return the AuthConfigForPatch object itself. + */ + public AuthConfigForPatch withActiveDirectoryAuth(MicrosoftEntraAuth activeDirectoryAuth) { + this.activeDirectoryAuth = activeDirectoryAuth; + return this; + } + + /** + * Get the passwordAuth property: Indicates if the server supports password based authentication. + * + * @return the passwordAuth value. + */ + public PasswordBasedAuth passwordAuth() { + return this.passwordAuth; + } + + /** + * Set the passwordAuth property: Indicates if the server supports password based authentication. + * + * @param passwordAuth the passwordAuth value to set. + * @return the AuthConfigForPatch object itself. + */ + public AuthConfigForPatch withPasswordAuth(PasswordBasedAuth passwordAuth) { + this.passwordAuth = passwordAuth; + return this; + } + + /** + * Get the tenantId property: Identifier of the tenant of the delegated resource. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: Identifier of the tenant of the delegated resource. + * + * @param tenantId the tenantId value to set. + * @return the AuthConfigForPatch object itself. + */ + public AuthConfigForPatch withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("activeDirectoryAuth", + this.activeDirectoryAuth == null ? null : this.activeDirectoryAuth.toString()); + jsonWriter.writeStringField("passwordAuth", this.passwordAuth == null ? null : this.passwordAuth.toString()); + jsonWriter.writeStringField("tenantId", this.tenantId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AuthConfigForPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AuthConfigForPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AuthConfigForPatch. + */ + public static AuthConfigForPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AuthConfigForPatch deserializedAuthConfigForPatch = new AuthConfigForPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("activeDirectoryAuth".equals(fieldName)) { + deserializedAuthConfigForPatch.activeDirectoryAuth + = MicrosoftEntraAuth.fromString(reader.getString()); + } else if ("passwordAuth".equals(fieldName)) { + deserializedAuthConfigForPatch.passwordAuth = PasswordBasedAuth.fromString(reader.getString()); + } else if ("tenantId".equals(fieldName)) { + deserializedAuthConfigForPatch.tenantId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAuthConfigForPatch; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTier.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTier.java new file mode 100644 index 000000000000..b9f59a12e13a --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTier.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Storage tier of a server. + */ +public final class AzureManagedDiskPerformanceTier extends ExpandableStringEnum { + /** + * Static value P1 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P1 = fromString("P1"); + + /** + * Static value P2 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P2 = fromString("P2"); + + /** + * Static value P3 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P3 = fromString("P3"); + + /** + * Static value P4 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P4 = fromString("P4"); + + /** + * Static value P6 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P6 = fromString("P6"); + + /** + * Static value P10 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P10 = fromString("P10"); + + /** + * Static value P15 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P15 = fromString("P15"); + + /** + * Static value P20 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P20 = fromString("P20"); + + /** + * Static value P30 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P30 = fromString("P30"); + + /** + * Static value P40 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P40 = fromString("P40"); + + /** + * Static value P50 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P50 = fromString("P50"); + + /** + * Static value P60 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P60 = fromString("P60"); + + /** + * Static value P70 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P70 = fromString("P70"); + + /** + * Static value P80 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P80 = fromString("P80"); + + /** + * Creates a new instance of AzureManagedDiskPerformanceTier value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AzureManagedDiskPerformanceTier() { + } + + /** + * Creates or finds a AzureManagedDiskPerformanceTier from its string representation. + * + * @param name a name to look for. + * @return the corresponding AzureManagedDiskPerformanceTier. + */ + public static AzureManagedDiskPerformanceTier fromString(String name) { + return fromString(name, AzureManagedDiskPerformanceTier.class); + } + + /** + * Gets known AzureManagedDiskPerformanceTier values. + * + * @return known AzureManagedDiskPerformanceTier values. + */ + public static Collection values() { + return values(AzureManagedDiskPerformanceTier.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTiers.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTiers.java deleted file mode 100644 index bfe642c35cf5..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTiers.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Name of storage tier for IOPS. - */ -public final class AzureManagedDiskPerformanceTiers extends ExpandableStringEnum { - /** - * Static value P1 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P1 = fromString("P1"); - - /** - * Static value P2 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P2 = fromString("P2"); - - /** - * Static value P3 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P3 = fromString("P3"); - - /** - * Static value P4 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P4 = fromString("P4"); - - /** - * Static value P6 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P6 = fromString("P6"); - - /** - * Static value P10 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P10 = fromString("P10"); - - /** - * Static value P15 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P15 = fromString("P15"); - - /** - * Static value P20 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P20 = fromString("P20"); - - /** - * Static value P30 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P30 = fromString("P30"); - - /** - * Static value P40 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P40 = fromString("P40"); - - /** - * Static value P50 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P50 = fromString("P50"); - - /** - * Static value P60 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P60 = fromString("P60"); - - /** - * Static value P70 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P70 = fromString("P70"); - - /** - * Static value P80 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P80 = fromString("P80"); - - /** - * Creates a new instance of AzureManagedDiskPerformanceTiers value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AzureManagedDiskPerformanceTiers() { - } - - /** - * Creates or finds a AzureManagedDiskPerformanceTiers from its string representation. - * - * @param name a name to look for. - * @return the corresponding AzureManagedDiskPerformanceTiers. - */ - public static AzureManagedDiskPerformanceTiers fromString(String name) { - return fromString(name, AzureManagedDiskPerformanceTiers.class); - } - - /** - * Gets known AzureManagedDiskPerformanceTiers values. - * - * @return known AzureManagedDiskPerformanceTiers values. - */ - public static Collection values() { - return values(AzureManagedDiskPerformanceTiers.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backup.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backup.java index fff21b2a63ed..58c546a365e9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backup.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backup.java @@ -24,12 +24,12 @@ public final class Backup implements JsonSerializable { private Integer backupRetentionDays; /* - * A value indicating whether Geo-Redundant backup is enabled on the server. + * Indicates if the server is configured to create geographically redundant backups. */ - private GeoRedundantBackupEnum geoRedundantBackup; + private GeographicallyRedundantBackup geoRedundantBackup; /* - * The earliest restore point time (ISO8601 format) for server. + * Earliest restore point time (ISO8601 format) for a server. */ private OffsetDateTime earliestRestoreDate; @@ -60,27 +60,29 @@ public Backup withBackupRetentionDays(Integer backupRetentionDays) { } /** - * Get the geoRedundantBackup property: A value indicating whether Geo-Redundant backup is enabled on the server. + * Get the geoRedundantBackup property: Indicates if the server is configured to create geographically redundant + * backups. * * @return the geoRedundantBackup value. */ - public GeoRedundantBackupEnum geoRedundantBackup() { + public GeographicallyRedundantBackup geoRedundantBackup() { return this.geoRedundantBackup; } /** - * Set the geoRedundantBackup property: A value indicating whether Geo-Redundant backup is enabled on the server. + * Set the geoRedundantBackup property: Indicates if the server is configured to create geographically redundant + * backups. * * @param geoRedundantBackup the geoRedundantBackup value to set. * @return the Backup object itself. */ - public Backup withGeoRedundantBackup(GeoRedundantBackupEnum geoRedundantBackup) { + public Backup withGeoRedundantBackup(GeographicallyRedundantBackup geoRedundantBackup) { this.geoRedundantBackup = geoRedundantBackup; return this; } /** - * Get the earliestRestoreDate property: The earliest restore point time (ISO8601 format) for server. + * Get the earliestRestoreDate property: Earliest restore point time (ISO8601 format) for a server. * * @return the earliestRestoreDate value. */ @@ -126,7 +128,8 @@ public static Backup fromJson(JsonReader jsonReader) throws IOException { if ("backupRetentionDays".equals(fieldName)) { deserializedBackup.backupRetentionDays = reader.getNullable(JsonReader::getInt); } else if ("geoRedundantBackup".equals(fieldName)) { - deserializedBackup.geoRedundantBackup = GeoRedundantBackupEnum.fromString(reader.getString()); + deserializedBackup.geoRedundantBackup + = GeographicallyRedundantBackup.fromString(reader.getString()); } else if ("earliestRestoreDate".equals(fieldName)) { deserializedBackup.earliestRestoreDate = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerBackup.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemand.java similarity index 72% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerBackup.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemand.java index a6bd8c6c6797..df1f83f1895d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerBackup.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemand.java @@ -5,13 +5,13 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; import java.time.OffsetDateTime; /** - * An immutable client-side representation of ServerBackup. + * An immutable client-side representation of BackupAutomaticAndOnDemand. */ -public interface ServerBackup { +public interface BackupAutomaticAndOnDemand { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -41,30 +41,31 @@ public interface ServerBackup { SystemData systemData(); /** - * Gets the backupType property: Backup type. + * Gets the backupType property: Type of backup. * * @return the backupType value. */ - Origin backupType(); + BackupType backupType(); /** - * Gets the completedTime property: Backup completed time (ISO8601 format). + * Gets the completedTime property: Time(ISO8601 format) at which the backup was completed. * * @return the completedTime value. */ OffsetDateTime completedTime(); /** - * Gets the source property: Backup source. + * Gets the source property: Source of the backup. * * @return the source value. */ String source(); /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner object. + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner + * object. * * @return the inner object. */ - ServerBackupInner innerModel(); + BackupAutomaticAndOnDemandInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemandList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemandList.java new file mode 100644 index 000000000000..d0ca493dea86 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemandList.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.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; +import java.io.IOException; +import java.util.List; + +/** + * List of backups. + */ +@Fluent +public final class BackupAutomaticAndOnDemandList implements JsonSerializable { + /* + * List of available backups. + */ + private List value; + + /* + * Link used to get the next page of results. + */ + private String nextLink; + + /** + * Creates an instance of BackupAutomaticAndOnDemandList class. + */ + public BackupAutomaticAndOnDemandList() { + } + + /** + * Get the value property: List of available backups. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of available backups. + * + * @param value the value value to set. + * @return the BackupAutomaticAndOnDemandList object itself. + */ + public BackupAutomaticAndOnDemandList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link used to get the next page of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link used to get the next page of results. + * + * @param nextLink the nextLink value to set. + * @return the BackupAutomaticAndOnDemandList object itself. + */ + public BackupAutomaticAndOnDemandList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupAutomaticAndOnDemandList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupAutomaticAndOnDemandList if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupAutomaticAndOnDemandList. + */ + public static BackupAutomaticAndOnDemandList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupAutomaticAndOnDemandList deserializedBackupAutomaticAndOnDemandList + = new BackupAutomaticAndOnDemandList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> BackupAutomaticAndOnDemandInner.fromJson(reader1)); + deserializedBackupAutomaticAndOnDemandList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedBackupAutomaticAndOnDemandList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupAutomaticAndOnDemandList; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupForPatch.java new file mode 100644 index 000000000000..8d86370dcf5d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupForPatch.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Backup properties of a server. + */ +@Fluent +public final class BackupForPatch implements JsonSerializable { + /* + * Backup retention days for the server. + */ + private Integer backupRetentionDays; + + /* + * Indicates if the server is configured to create geographically redundant backups. + */ + private GeographicallyRedundantBackup geoRedundantBackup; + + /* + * Earliest restore point time (ISO8601 format) for a server. + */ + private OffsetDateTime earliestRestoreDate; + + /** + * Creates an instance of BackupForPatch class. + */ + public BackupForPatch() { + } + + /** + * Get the backupRetentionDays property: Backup retention days for the server. + * + * @return the backupRetentionDays value. + */ + public Integer backupRetentionDays() { + return this.backupRetentionDays; + } + + /** + * Set the backupRetentionDays property: Backup retention days for the server. + * + * @param backupRetentionDays the backupRetentionDays value to set. + * @return the BackupForPatch object itself. + */ + public BackupForPatch withBackupRetentionDays(Integer backupRetentionDays) { + this.backupRetentionDays = backupRetentionDays; + return this; + } + + /** + * Get the geoRedundantBackup property: Indicates if the server is configured to create geographically redundant + * backups. + * + * @return the geoRedundantBackup value. + */ + public GeographicallyRedundantBackup geoRedundantBackup() { + return this.geoRedundantBackup; + } + + /** + * Set the geoRedundantBackup property: Indicates if the server is configured to create geographically redundant + * backups. + * + * @param geoRedundantBackup the geoRedundantBackup value to set. + * @return the BackupForPatch object itself. + */ + public BackupForPatch withGeoRedundantBackup(GeographicallyRedundantBackup geoRedundantBackup) { + this.geoRedundantBackup = geoRedundantBackup; + return this; + } + + /** + * Get the earliestRestoreDate property: Earliest restore point time (ISO8601 format) for a server. + * + * @return the earliestRestoreDate value. + */ + public OffsetDateTime earliestRestoreDate() { + return this.earliestRestoreDate; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("backupRetentionDays", this.backupRetentionDays); + jsonWriter.writeStringField("geoRedundantBackup", + this.geoRedundantBackup == null ? null : this.geoRedundantBackup.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupForPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupForPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupForPatch. + */ + public static BackupForPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupForPatch deserializedBackupForPatch = new BackupForPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("backupRetentionDays".equals(fieldName)) { + deserializedBackupForPatch.backupRetentionDays = reader.getNullable(JsonReader::getInt); + } else if ("geoRedundantBackup".equals(fieldName)) { + deserializedBackupForPatch.geoRedundantBackup + = GeographicallyRedundantBackup.fromString(reader.getString()); + } else if ("earliestRestoreDate".equals(fieldName)) { + deserializedBackupForPatch.earliestRestoreDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupForPatch; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupType.java new file mode 100644 index 000000000000..3b155e19bb29 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupType.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.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of backup. + */ +public final class BackupType extends ExpandableStringEnum { + /** + * Static value Full for BackupType. + */ + public static final BackupType FULL = fromString("Full"); + + /** + * Static value Customer On-Demand for BackupType. + */ + public static final BackupType CUSTOMER_ON_DEMAND = fromString("Customer On-Demand"); + + /** + * Creates a new instance of BackupType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BackupType() { + } + + /** + * Creates or finds a BackupType from its string representation. + * + * @param name a name to look for. + * @return the corresponding BackupType. + */ + public static BackupType fromString(String name) { + return fromString(name, BackupType.class); + } + + /** + * Gets known BackupType values. + * + * @return known BackupType values. + */ + public static Collection values() { + return values(BackupType.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backups.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsAutomaticAndOnDemands.java similarity index 70% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backups.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsAutomaticAndOnDemands.java index e390b3f7cbcf..4c6f6821188f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backups.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsAutomaticAndOnDemands.java @@ -9,42 +9,42 @@ import com.azure.core.util.Context; /** - * Resource collection API of Backups. + * Resource collection API of BackupsAutomaticAndOnDemands. */ -public interface Backups { +public interface BackupsAutomaticAndOnDemands { /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties. + * @return properties of a backup. */ - ServerBackup create(String resourceGroupName, String serverName, String backupName); + BackupAutomaticAndOnDemand create(String resourceGroupName, String serverName, String backupName); /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties. + * @return properties of a backup. */ - ServerBackup create(String resourceGroupName, String serverName, String backupName, Context context); + BackupAutomaticAndOnDemand create(String resourceGroupName, String serverName, String backupName, Context context); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -52,11 +52,11 @@ public interface Backups { void delete(String resourceGroupName, String serverName, String backupName); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -65,47 +65,47 @@ public interface Backups { void delete(String resourceGroupName, String serverName, String backupName, Context context); /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific backup for a given server along with {@link Response}. + * @return information of an on demand backup, given its name along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String serverName, String backupName, + Response getWithResponse(String resourceGroupName, String serverName, String backupName, Context context); /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific backup for a given server. + * @return information of an on demand backup, given its name. */ - ServerBackup get(String resourceGroupName, String serverName, String backupName); + BackupAutomaticAndOnDemand get(String resourceGroupName, String serverName, String backupName); /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 server backups as paginated response with {@link PagedIterable}. + * @return list of backups as paginated response with {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -113,7 +113,8 @@ Response getWithResponse(String resourceGroupName, String serverNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 server backups as paginated response with {@link PagedIterable}. + * @return list of backups as paginated response with {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperation.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionOperation.java similarity index 88% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperation.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionOperation.java index fa3cdaabc060..9e4f4f16e7fc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperation.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionOperation.java @@ -5,13 +5,13 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrServerBackupOperationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionOperationInner; import java.time.OffsetDateTime; /** - * An immutable client-side representation of LtrServerBackupOperation. + * An immutable client-side representation of BackupsLongTermRetentionOperation. */ -public interface LtrServerBackupOperation { +public interface BackupsLongTermRetentionOperation { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -112,10 +112,10 @@ public interface LtrServerBackupOperation { String errorMessage(); /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrServerBackupOperationInner - * object. + * Gets the inner + * com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionOperationInner object. * * @return the inner object. */ - LtrServerBackupOperationInner innerModel(); + BackupsLongTermRetentionOperationInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupRequest.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionRequest.java similarity index 63% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupRequest.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionRequest.java index 628431d1e55e..136078b16473 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupRequest.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionRequest.java @@ -15,16 +15,16 @@ * The request that is made for a long term retention backup. */ @Fluent -public final class LtrBackupRequest extends BackupRequestBase { +public final class BackupsLongTermRetentionRequest extends BackupRequestBase { /* * Backup store detail for target server */ private BackupStoreDetails targetDetails; /** - * Creates an instance of LtrBackupRequest class. + * Creates an instance of BackupsLongTermRetentionRequest class. */ - public LtrBackupRequest() { + public BackupsLongTermRetentionRequest() { } /** @@ -40,9 +40,9 @@ public BackupStoreDetails targetDetails() { * Set the targetDetails property: Backup store detail for target server. * * @param targetDetails the targetDetails value to set. - * @return the LtrBackupRequest object itself. + * @return the BackupsLongTermRetentionRequest object itself. */ - public LtrBackupRequest withTargetDetails(BackupStoreDetails targetDetails) { + public BackupsLongTermRetentionRequest withTargetDetails(BackupStoreDetails targetDetails) { this.targetDetails = targetDetails; return this; } @@ -51,7 +51,7 @@ public LtrBackupRequest withTargetDetails(BackupStoreDetails targetDetails) { * {@inheritDoc} */ @Override - public LtrBackupRequest withBackupSettings(BackupSettings backupSettings) { + public BackupsLongTermRetentionRequest withBackupSettings(BackupSettings backupSettings) { super.withBackupSettings(backupSettings); return this; } @@ -65,20 +65,21 @@ public LtrBackupRequest withBackupSettings(BackupSettings backupSettings) { public void validate() { if (targetDetails() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property targetDetails in model LtrBackupRequest")); + .log(new IllegalArgumentException( + "Missing required property targetDetails in model BackupsLongTermRetentionRequest")); } else { targetDetails().validate(); } if (backupSettings() == null) { throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property backupSettings in model LtrBackupRequest")); + .log(new IllegalArgumentException( + "Missing required property backupSettings in model BackupsLongTermRetentionRequest")); } else { backupSettings().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(LtrBackupRequest.class); + private static final ClientLogger LOGGER = new ClientLogger(BackupsLongTermRetentionRequest.class); /** * {@inheritDoc} @@ -92,31 +93,32 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of LtrBackupRequest from the JsonReader. + * Reads an instance of BackupsLongTermRetentionRequest from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of LtrBackupRequest if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * @return An instance of BackupsLongTermRetentionRequest if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LtrBackupRequest. + * @throws IOException If an error occurs while reading the BackupsLongTermRetentionRequest. */ - public static LtrBackupRequest fromJson(JsonReader jsonReader) throws IOException { + public static BackupsLongTermRetentionRequest fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - LtrBackupRequest deserializedLtrBackupRequest = new LtrBackupRequest(); + BackupsLongTermRetentionRequest deserializedBackupsLongTermRetentionRequest + = new BackupsLongTermRetentionRequest(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("backupSettings".equals(fieldName)) { - deserializedLtrBackupRequest.withBackupSettings(BackupSettings.fromJson(reader)); + deserializedBackupsLongTermRetentionRequest.withBackupSettings(BackupSettings.fromJson(reader)); } else if ("targetDetails".equals(fieldName)) { - deserializedLtrBackupRequest.targetDetails = BackupStoreDetails.fromJson(reader); + deserializedBackupsLongTermRetentionRequest.targetDetails = BackupStoreDetails.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedLtrBackupRequest; + return deserializedBackupsLongTermRetentionRequest; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupResponse.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionResponse.java similarity index 85% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupResponse.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionResponse.java index 2325230ef147..ca9d953bceed 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupResponse.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionResponse.java @@ -4,13 +4,13 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrBackupResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseInner; import java.time.OffsetDateTime; /** - * An immutable client-side representation of LtrBackupResponse. + * An immutable client-side representation of BackupsLongTermRetentionResponse. */ -public interface LtrBackupResponse { +public interface BackupsLongTermRetentionResponse { /** * Gets the datasourceSizeInBytes property: Size of datasource in bytes. * @@ -83,9 +83,10 @@ public interface LtrBackupResponse { String errorMessage(); /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrBackupResponseInner object. + * Gets the inner + * com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseInner object. * * @return the inner object. */ - LtrBackupResponseInner innerModel(); + BackupsLongTermRetentionResponseInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LtrBackupOperationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentions.java similarity index 52% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LtrBackupOperationsClient.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentions.java index 744e0eeb2562..fc3709bea64b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LtrBackupOperationsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentions.java @@ -2,113 +2,117 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.fluent; +package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrServerBackupOperationInner; -import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in LtrBackupOperationsClient. + * Resource collection API of BackupsLongTermRetentions. */ -public interface LtrBackupOperationsClient { +public interface BackupsLongTermRetentions { /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Performs all checks required for a long term retention backup operation to succeed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operation for the flexible server along with - * {@link Response} on successful completion of {@link Mono}. + * @return response for the LTR pre-backup API call. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String backupName); + Response checkPrerequisitesWithResponse(String resourceGroupName, String serverName, + LtrPreBackupRequest parameters, Context context); /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Performs all checks required for a long term retention backup operation to succeed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operation for the flexible server on successful - * completion of {@link Mono}. + * @return response for the LTR pre-backup API call. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String backupName); + LtrPreBackupResponse checkPrerequisites(String resourceGroupName, String serverName, + LtrPreBackupRequest parameters); /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Initiates a long term retention backup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR backup API call. + */ + BackupsLongTermRetentionResponse start(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters); + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operation for the flexible server along with - * {@link Response}. + * @return response for the LTR backup API call. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - String backupName, Context context); + BackupsLongTermRetentionResponse start(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters, Context context); /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Gets the results of a long retention backup operation for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param backupName The name of the backup. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operation for the flexible server. + * @return the results of a long retention backup operation for a server along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - LtrServerBackupOperationInner get(String resourceGroupName, String serverName, String backupName); + Response getWithResponse(String resourceGroupName, String serverName, + String backupName, Context context); /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Gets the results of a long retention backup operation for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param backupName The name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operations for the flexible server as paginated - * response with {@link PagedFlux}. + * @return the results of a long retention backup operation for a server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); + BackupsLongTermRetentionOperation get(String resourceGroupName, String serverName, String backupName); /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Lists the results of the long term retention backup operations for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operations for the flexible server as paginated - * response with {@link PagedIterable}. + * @return a list of long term retention backup operations for server as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Lists the results of the long term retention backup operations for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -116,10 +120,9 @@ Response getWithResponse(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the give long term retention backup operations for the flexible server as paginated - * response with {@link PagedIterable}. + * @return a list of long term retention backup operations for server as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServersTriggerLtrPreBackupHeaders.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesHeaders.java similarity index 72% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServersTriggerLtrPreBackupHeaders.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesHeaders.java index 4779a9e1e359..75ac0065d6b6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServersTriggerLtrPreBackupHeaders.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesHeaders.java @@ -9,10 +9,10 @@ import com.azure.core.http.HttpHeaders; /** - * The FlexibleServersTriggerLtrPreBackupHeaders model. + * The BackupsLongTermRetentionsCheckPrerequisitesHeaders model. */ @Fluent -public final class FlexibleServersTriggerLtrPreBackupHeaders { +public final class BackupsLongTermRetentionsCheckPrerequisitesHeaders { /* * The x-ms-request-id property. */ @@ -20,11 +20,11 @@ public final class FlexibleServersTriggerLtrPreBackupHeaders { // HttpHeaders containing the raw property values. /** - * Creates an instance of FlexibleServersTriggerLtrPreBackupHeaders class. + * Creates an instance of BackupsLongTermRetentionsCheckPrerequisitesHeaders class. * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ - public FlexibleServersTriggerLtrPreBackupHeaders(HttpHeaders rawHeaders) { + public BackupsLongTermRetentionsCheckPrerequisitesHeaders(HttpHeaders rawHeaders) { this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); } @@ -41,9 +41,9 @@ public String xMsRequestId() { * Set the xMsRequestId property: The x-ms-request-id property. * * @param xMsRequestId the xMsRequestId value to set. - * @return the FlexibleServersTriggerLtrPreBackupHeaders object itself. + * @return the BackupsLongTermRetentionsCheckPrerequisitesHeaders object itself. */ - public FlexibleServersTriggerLtrPreBackupHeaders withXMsRequestId(String xMsRequestId) { + public BackupsLongTermRetentionsCheckPrerequisitesHeaders withXMsRequestId(String xMsRequestId) { this.xMsRequestId = xMsRequestId; return this; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServersTriggerLtrPreBackupResponse.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesResponse.java similarity index 60% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServersTriggerLtrPreBackupResponse.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesResponse.java index 833fbc162378..7c27ca25ea1f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServersTriggerLtrPreBackupResponse.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesResponse.java @@ -10,21 +10,22 @@ import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner; /** - * Contains all response data for the triggerLtrPreBackup operation. + * Contains all response data for the checkPrerequisites operation. */ -public final class FlexibleServersTriggerLtrPreBackupResponse - extends ResponseBase { +public final class BackupsLongTermRetentionsCheckPrerequisitesResponse + extends ResponseBase { /** - * Creates an instance of FlexibleServersTriggerLtrPreBackupResponse. + * Creates an instance of BackupsLongTermRetentionsCheckPrerequisitesResponse. * - * @param request the request which resulted in this FlexibleServersTriggerLtrPreBackupResponse. + * @param request the request which resulted in this BackupsLongTermRetentionsCheckPrerequisitesResponse. * @param statusCode the status code of the HTTP response. * @param rawHeaders the raw headers of the HTTP response. * @param value the deserialized value of the HTTP response. * @param headers the deserialized headers of the HTTP response. */ - public FlexibleServersTriggerLtrPreBackupResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - LtrPreBackupResponseInner value, FlexibleServersTriggerLtrPreBackupHeaders headers) { + public BackupsLongTermRetentionsCheckPrerequisitesResponse(HttpRequest request, int statusCode, + HttpHeaders rawHeaders, LtrPreBackupResponseInner value, + BackupsLongTermRetentionsCheckPrerequisitesHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cancel.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cancel.java new file mode 100644 index 000000000000..7c235c79a417 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cancel.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.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if cancel must be triggered for the entire migration. + */ +public final class Cancel extends ExpandableStringEnum { + /** + * Static value True for Cancel. + */ + public static final Cancel TRUE = fromString("True"); + + /** + * Static value False for Cancel. + */ + public static final Cancel FALSE = fromString("False"); + + /** + * Creates a new instance of Cancel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Cancel() { + } + + /** + * Creates or finds a Cancel from its string representation. + * + * @param name a name to look for. + * @return the corresponding Cancel. + */ + public static Cancel fromString(String name) { + return fromString(name, Cancel.class); + } + + /** + * Gets known Cancel values. + * + * @return known Cancel values. + */ + public static Collection values() { + return values(Cancel.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CancelEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CancelEnum.java deleted file mode 100644 index c1b2def21624..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CancelEnum.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * To trigger cancel for entire migration we need to send this flag as True. - */ -public final class CancelEnum extends ExpandableStringEnum { - /** - * Static value True for CancelEnum. - */ - public static final CancelEnum TRUE = fromString("True"); - - /** - * Static value False for CancelEnum. - */ - public static final CancelEnum FALSE = fromString("False"); - - /** - * Creates a new instance of CancelEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CancelEnum() { - } - - /** - * Creates or finds a CancelEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding CancelEnum. - */ - public static CancelEnum fromString(String name) { - return fromString(name, CancelEnum.class); - } - - /** - * Gets known CancelEnum values. - * - * @return known CancelEnum values. - */ - public static Collection values() { - return values(CancelEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationBasedCapabilities.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByLocations.java similarity index 65% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationBasedCapabilities.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByLocations.java index 12ec9499b653..52fffe0886b8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationBasedCapabilities.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByLocations.java @@ -8,31 +8,31 @@ import com.azure.core.util.Context; /** - * Resource collection API of LocationBasedCapabilities. + * Resource collection API of CapabilitiesByLocations. */ -public interface LocationBasedCapabilities { +public interface CapabilitiesByLocations { /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities at specified location in a given subscription as paginated response with + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with * {@link PagedIterable}. */ - PagedIterable execute(String locationName); + PagedIterable list(String locationName); /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities at specified location in a given subscription as paginated response with + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with * {@link PagedIterable}. */ - PagedIterable execute(String locationName, Context context); + PagedIterable list(String locationName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerCapabilities.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByServers.java similarity index 65% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerCapabilities.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByServers.java index 94060ec3d557..afdf060d82f6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerCapabilities.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByServers.java @@ -8,23 +8,24 @@ import com.azure.core.util.Context; /** - * Resource collection API of ServerCapabilities. + * Resource collection API of CapabilitiesByServers. */ -public interface ServerCapabilities { +public interface CapabilitiesByServers { /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities for a flexible server as paginated response with {@link PagedIterable}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String serverName); + PagedIterable list(String resourceGroupName, String serverName); /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -32,7 +33,8 @@ public interface ServerCapabilities { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities for a flexible server as paginated response with {@link PagedIterable}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String serverName, Context context); + PagedIterable list(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Capability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Capability.java new file mode 100644 index 000000000000..ed641fac11a3 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Capability.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; +import java.util.List; + +/** + * An immutable client-side representation of Capability. + */ +public interface Capability { + /** + * Gets the status property: The status of the capability. + * + * @return the status value. + */ + CapabilityStatus status(); + + /** + * Gets the reason property: The reason for the capability not being available. + * + * @return the reason value. + */ + String reason(); + + /** + * Gets the name property: Name of flexible servers capabilities. + * + * @return the name value. + */ + String name(); + + /** + * Gets the supportedServerEditions property: List of supported compute tiers. + * + * @return the supportedServerEditions value. + */ + List supportedServerEditions(); + + /** + * Gets the supportedServerVersions property: List of supported major versions of PostgreSQL database engine. + * + * @return the supportedServerVersions value. + */ + List supportedServerVersions(); + + /** + * Gets the supportedFeatures property: Features supported. + * + * @return the supportedFeatures value. + */ + List supportedFeatures(); + + /** + * Gets the fastProvisioningSupported property: Indicates if fast provisioning is supported. 'Enabled' means fast + * provisioning is supported. 'Disabled' stands for fast provisioning is not supported. Will be deprecated in the + * future. Look to Supported Features for 'FastProvisioning'. + * + * @return the fastProvisioningSupported value. + */ + FastProvisioningSupport fastProvisioningSupported(); + + /** + * Gets the supportedFastProvisioningEditions property: List of compute tiers supporting fast provisioning. + * + * @return the supportedFastProvisioningEditions value. + */ + List supportedFastProvisioningEditions(); + + /** + * Gets the geoBackupSupported property: Indicates if geographically redundant backups are supported in this + * location. 'Enabled' means geographically redundant backups are supported. 'Disabled' stands for geographically + * redundant backup is not supported. Will be deprecated in the future. Look to Supported Features for 'GeoBackup'. + * + * @return the geoBackupSupported value. + */ + GeographicallyRedundantBackupSupport geoBackupSupported(); + + /** + * Gets the zoneRedundantHaSupported property: Indicates if high availability with zone redundancy is supported in + * this location. 'Enabled' means high availability with zone redundancy is supported. 'Disabled' stands for high + * availability with zone redundancy is not supported. Will be deprecated in the future. Look to Supported Features + * for 'ZoneRedundantHa'. + * + * @return the zoneRedundantHaSupported value. + */ + ZoneRedundantHighAvailabilitySupport zoneRedundantHaSupported(); + + /** + * Gets the zoneRedundantHaAndGeoBackupSupported property: Indicates if high availability with zone redundancy is + * supported in conjunction with geographically redundant backups in this location. 'Enabled' means high + * availability with zone redundancy is supported in conjunction with geographically redundant backups is supported. + * 'Disabled' stands for high availability with zone redundancy is supported in conjunction with geographically + * redundant backups is not supported. Will be deprecated in the future. Look to Supported Features for + * 'ZoneRedundantHaAndGeoBackup'. + * + * @return the zoneRedundantHaAndGeoBackupSupported value. + */ + ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport zoneRedundantHaAndGeoBackupSupported(); + + /** + * Gets the storageAutoGrowthSupported property: Indicates if storage autogrow is supported in this location. + * 'Enabled' means storage autogrow is supported. 'Disabled' stands for storage autogrow is not supported. Will be + * deprecated in the future. Look to Supported Features for 'StorageAutoGrowth'. + * + * @return the storageAutoGrowthSupported value. + */ + StorageAutoGrowthSupport storageAutoGrowthSupported(); + + /** + * Gets the onlineResizeSupported property: Indicates if resizing the storage, without interrupting the operation of + * the database engine, is supported in this location for the given subscription. 'Enabled' means resizing the + * storage without interrupting the operation of the database engine is supported. 'Disabled' means resizing the + * storage without interrupting the operation of the database engine is not supported. Will be deprecated in the + * future. Look to Supported Features for 'OnlineResize'. + * + * @return the onlineResizeSupported value. + */ + OnlineStorageResizeSupport onlineResizeSupported(); + + /** + * Gets the restricted property: Indicates if this location is restricted. 'Enabled' means location is restricted. + * 'Disabled' stands for location is not restricted. Will be deprecated in the future. Look to Supported Features + * for 'Restricted'. + * + * @return the restricted value. + */ + LocationRestricted restricted(); + + /** + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner object. + * + * @return the inner object. + */ + CapabilityInner innerModel(); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityList.java similarity index 55% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityList.java index 8f86d5a9706e..d2232f3a41c1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityList.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; import java.io.IOException; import java.util.List; /** - * Capability for the PostgreSQL server. + * List of capabilities for the Azure Database for PostgreSQL flexible server. */ -@Immutable -public final class CapabilitiesListResult implements JsonSerializable { +@Fluent +public final class CapabilityList implements JsonSerializable { /* - * A list of supported capabilities. + * List of supported capabilities. */ - private List value; + private List value; /* * Link to retrieve next page of results. @@ -29,17 +29,17 @@ public final class CapabilitiesListResult implements JsonSerializable value() { + public List value() { return this.value; } @@ -52,6 +52,17 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: Link to retrieve next page of results. + * + * @param nextLink the nextLink value to set. + * @return the CapabilityList object itself. + */ + public CapabilityList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + /** * Validates the instance. * @@ -69,36 +80,36 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } /** - * Reads an instance of CapabilitiesListResult from the JsonReader. + * Reads an instance of CapabilityList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of CapabilitiesListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the CapabilitiesListResult. + * @return An instance of CapabilityList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the CapabilityList. */ - public static CapabilitiesListResult fromJson(JsonReader jsonReader) throws IOException { + public static CapabilityList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - CapabilitiesListResult deserializedCapabilitiesListResult = new CapabilitiesListResult(); + CapabilityList deserializedCapabilityList = new CapabilityList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> FlexibleServerCapabilityInner.fromJson(reader1)); - deserializedCapabilitiesListResult.value = value; + List value = reader.readArray(reader1 -> CapabilityInner.fromJson(reader1)); + deserializedCapabilityList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedCapabilitiesListResult.nextLink = reader.getString(); + deserializedCapabilityList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedCapabilitiesListResult; + return deserializedCapabilityList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFile.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLog.java similarity index 80% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFile.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLog.java index a317263b0da7..682b8d97e9d9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFile.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLog.java @@ -5,13 +5,13 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LogFileInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; import java.time.OffsetDateTime; /** - * An immutable client-side representation of LogFile. + * An immutable client-side representation of CapturedLog. */ -public interface LogFile { +public interface CapturedLog { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -55,30 +55,30 @@ public interface LogFile { OffsetDateTime lastModifiedTime(); /** - * Gets the sizeInKb property: The size in kb of the logFile. + * Gets the sizeInKb property: Size (in KB) of the log file. * * @return the sizeInKb value. */ Long sizeInKb(); /** - * Gets the typePropertiesType property: Type of the log file. + * Gets the typePropertiesType property: Type of log file. Can be 'ServerLogs' or 'UpgradeLogs'. * * @return the typePropertiesType value. */ String typePropertiesType(); /** - * Gets the url property: The url to download the log file from. + * Gets the url property: URL to download the log file from. * * @return the url value. */ String url(); /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LogFileInner object. + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner object. * * @return the inner object. */ - LogFileInner innerModel(); + CapturedLogInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogList.java new file mode 100644 index 000000000000..94da97e002e2 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogList.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.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; +import java.io.IOException; +import java.util.List; + +/** + * List of log files. + */ +@Fluent +public final class CapturedLogList implements JsonSerializable { + /* + * List of log files in a server. + */ + private List value; + + /* + * Link used to get the next page of results. + */ + private String nextLink; + + /** + * Creates an instance of CapturedLogList class. + */ + public CapturedLogList() { + } + + /** + * Get the value property: List of log files in a server. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of log files in a server. + * + * @param value the value value to set. + * @return the CapturedLogList object itself. + */ + public CapturedLogList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link used to get the next page of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link used to get the next page of results. + * + * @param nextLink the nextLink value to set. + * @return the CapturedLogList object itself. + */ + public CapturedLogList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CapturedLogList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CapturedLogList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the CapturedLogList. + */ + public static CapturedLogList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CapturedLogList deserializedCapturedLogList = new CapturedLogList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> CapturedLogInner.fromJson(reader1)); + deserializedCapturedLogList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedCapturedLogList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCapturedLogList; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFiles.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogs.java similarity index 70% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFiles.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogs.java index a26f1079e95a..817f9765a62a 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFiles.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogs.java @@ -8,23 +8,23 @@ import com.azure.core.util.Context; /** - * Resource collection API of LogFiles. + * Resource collection API of CapturedLogs. */ -public interface LogFiles { +public interface CapturedLogs { /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 logFiles as paginated response with {@link PagedIterable}. + * @return list of log files as paginated response with {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -32,7 +32,7 @@ public interface LogFiles { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 logFiles as paginated response with {@link PagedIterable}. + * @return list of log files as paginated response with {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilities.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilities.java deleted file mode 100644 index 9b3018941463..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilities.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of CheckNameAvailabilities. - */ -public interface CheckNameAvailabilities { - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability along with {@link Response}. - */ - Response executeWithResponse(CheckNameAvailabilityRequest nameAvailabilityRequest, - Context context); - - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability. - */ - NameAvailability execute(CheckNameAvailabilityRequest nameAvailabilityRequest); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityWithLocations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityWithLocations.java deleted file mode 100644 index b8fec0370571..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityWithLocations.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of CheckNameAvailabilityWithLocations. - */ -public interface CheckNameAvailabilityWithLocations { - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability along with {@link Response}. - */ - Response executeWithResponse(String locationName, - CheckNameAvailabilityRequest nameAvailabilityRequest, Context context); - - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability. - */ - NameAvailability execute(String locationName, CheckNameAvailabilityRequest nameAvailabilityRequest); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cluster.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cluster.java index 0880429954b4..e13ae5c683d0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cluster.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cluster.java @@ -17,10 +17,15 @@ @Fluent public final class Cluster implements JsonSerializable { /* - * The node count for the cluster. + * Number of nodes assigned to the elastic cluster. */ private Integer clusterSize; + /* + * Default database name for the elastic cluster. + */ + private String defaultDatabaseName; + /** * Creates an instance of Cluster class. */ @@ -28,7 +33,7 @@ public Cluster() { } /** - * Get the clusterSize property: The node count for the cluster. + * Get the clusterSize property: Number of nodes assigned to the elastic cluster. * * @return the clusterSize value. */ @@ -37,7 +42,7 @@ public Integer clusterSize() { } /** - * Set the clusterSize property: The node count for the cluster. + * Set the clusterSize property: Number of nodes assigned to the elastic cluster. * * @param clusterSize the clusterSize value to set. * @return the Cluster object itself. @@ -47,6 +52,26 @@ public Cluster withClusterSize(Integer clusterSize) { return this; } + /** + * Get the defaultDatabaseName property: Default database name for the elastic cluster. + * + * @return the defaultDatabaseName value. + */ + public String defaultDatabaseName() { + return this.defaultDatabaseName; + } + + /** + * Set the defaultDatabaseName property: Default database name for the elastic cluster. + * + * @param defaultDatabaseName the defaultDatabaseName value to set. + * @return the Cluster object itself. + */ + public Cluster withDefaultDatabaseName(String defaultDatabaseName) { + this.defaultDatabaseName = defaultDatabaseName; + return this; + } + /** * Validates the instance. * @@ -62,6 +87,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeNumberField("clusterSize", this.clusterSize); + jsonWriter.writeStringField("defaultDatabaseName", this.defaultDatabaseName); return jsonWriter.writeEndObject(); } @@ -82,6 +108,8 @@ public static Cluster fromJson(JsonReader jsonReader) throws IOException { if ("clusterSize".equals(fieldName)) { deserializedCluster.clusterSize = reader.getNullable(JsonReader::getInt); + } else if ("defaultDatabaseName".equals(fieldName)) { + deserializedCluster.defaultDatabaseName = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigTuningRequestParameter.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigTuningRequestParameter.java deleted file mode 100644 index f1593d8696b4..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigTuningRequestParameter.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Config tuning request parameters. - */ -@Fluent -public final class ConfigTuningRequestParameter implements JsonSerializable { - /* - * The name of server. - */ - private String serverName; - - /* - * Indicates whether PG should be restarted during a tuning session. - */ - private Boolean allowServerRestarts; - - /* - * The target metric the tuning session is trying to improve. - */ - private String targetImprovementMetric; - - /* - * The mode with which the feature will be enabled. - */ - private Boolean configTuningUsageMode; - - /** - * Creates an instance of ConfigTuningRequestParameter class. - */ - public ConfigTuningRequestParameter() { - } - - /** - * Get the serverName property: The name of server. - * - * @return the serverName value. - */ - public String serverName() { - return this.serverName; - } - - /** - * Set the serverName property: The name of server. - * - * @param serverName the serverName value to set. - * @return the ConfigTuningRequestParameter object itself. - */ - public ConfigTuningRequestParameter withServerName(String serverName) { - this.serverName = serverName; - return this; - } - - /** - * Get the allowServerRestarts property: Indicates whether PG should be restarted during a tuning session. - * - * @return the allowServerRestarts value. - */ - public Boolean allowServerRestarts() { - return this.allowServerRestarts; - } - - /** - * Set the allowServerRestarts property: Indicates whether PG should be restarted during a tuning session. - * - * @param allowServerRestarts the allowServerRestarts value to set. - * @return the ConfigTuningRequestParameter object itself. - */ - public ConfigTuningRequestParameter withAllowServerRestarts(Boolean allowServerRestarts) { - this.allowServerRestarts = allowServerRestarts; - return this; - } - - /** - * Get the targetImprovementMetric property: The target metric the tuning session is trying to improve. - * - * @return the targetImprovementMetric value. - */ - public String targetImprovementMetric() { - return this.targetImprovementMetric; - } - - /** - * Set the targetImprovementMetric property: The target metric the tuning session is trying to improve. - * - * @param targetImprovementMetric the targetImprovementMetric value to set. - * @return the ConfigTuningRequestParameter object itself. - */ - public ConfigTuningRequestParameter withTargetImprovementMetric(String targetImprovementMetric) { - this.targetImprovementMetric = targetImprovementMetric; - return this; - } - - /** - * Get the configTuningUsageMode property: The mode with which the feature will be enabled. - * - * @return the configTuningUsageMode value. - */ - public Boolean configTuningUsageMode() { - return this.configTuningUsageMode; - } - - /** - * Set the configTuningUsageMode property: The mode with which the feature will be enabled. - * - * @param configTuningUsageMode the configTuningUsageMode value to set. - * @return the ConfigTuningRequestParameter object itself. - */ - public ConfigTuningRequestParameter withConfigTuningUsageMode(Boolean configTuningUsageMode) { - this.configTuningUsageMode = configTuningUsageMode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("serverName", this.serverName); - jsonWriter.writeBooleanField("allowServerRestarts", this.allowServerRestarts); - jsonWriter.writeStringField("targetImprovementMetric", this.targetImprovementMetric); - jsonWriter.writeBooleanField("configTuningUsageMode", this.configTuningUsageMode); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfigTuningRequestParameter from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfigTuningRequestParameter if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConfigTuningRequestParameter. - */ - public static ConfigTuningRequestParameter fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfigTuningRequestParameter deserializedConfigTuningRequestParameter = new ConfigTuningRequestParameter(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serverName".equals(fieldName)) { - deserializedConfigTuningRequestParameter.serverName = reader.getString(); - } else if ("allowServerRestarts".equals(fieldName)) { - deserializedConfigTuningRequestParameter.allowServerRestarts - = reader.getNullable(JsonReader::getBoolean); - } else if ("targetImprovementMetric".equals(fieldName)) { - deserializedConfigTuningRequestParameter.targetImprovementMetric = reader.getString(); - } else if ("configTuningUsageMode".equals(fieldName)) { - deserializedConfigTuningRequestParameter.configTuningUsageMode - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedConfigTuningRequestParameter; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configuration.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configuration.java index e42999bd7e06..29a573d65dca 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configuration.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configuration.java @@ -41,77 +41,85 @@ public interface Configuration { SystemData systemData(); /** - * Gets the value property: Value of the configuration. Required to update the configuration. + * Gets the value property: Value of the configuration (also known as server parameter). Required to update the + * value assigned to a specific modifiable configuration. * * @return the value value. */ String value(); /** - * Gets the description property: Description of the configuration. + * Gets the description property: Description of the configuration (also known as server parameter). * * @return the description value. */ String description(); /** - * Gets the defaultValue property: Default value of the configuration. + * Gets the defaultValue property: Value assigned by default to the configuration (also known as server parameter). * * @return the defaultValue value. */ String defaultValue(); /** - * Gets the dataType property: Data type of the configuration. + * Gets the dataType property: Data type of the configuration (also known as server parameter). * * @return the dataType value. */ ConfigurationDataType dataType(); /** - * Gets the allowedValues property: Allowed values of the configuration. + * Gets the allowedValues property: Allowed values of the configuration (also known as server parameter). * * @return the allowedValues value. */ String allowedValues(); /** - * Gets the source property: Source of the configuration. Required to update the configuration. + * Gets the source property: Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * * @return the source value. */ String source(); /** - * Gets the isDynamicConfig property: Configuration dynamic or static. + * Gets the isDynamicConfig property: Indicates if it's a dynamic (true) or static (false) configuration (also known + * as server parameter). Static server parameters require a server restart after changing the value assigned to + * them, for the change to take effect. Dynamic server parameters do not require a server restart after changing the + * value assigned to them, for the change to take effect. * * @return the isDynamicConfig value. */ Boolean isDynamicConfig(); /** - * Gets the isReadOnly property: Configuration read-only or not. + * Gets the isReadOnly property: Indicates if it's a read-only (true) or modifiable (false) configuration (also + * known as server parameter). * * @return the isReadOnly value. */ Boolean isReadOnly(); /** - * Gets the isConfigPendingRestart property: Configuration is pending restart or not. + * Gets the isConfigPendingRestart property: Indicates if the value assigned to the configuration (also known as + * server parameter) is pending a server restart for it to take effect. * * @return the isConfigPendingRestart value. */ Boolean isConfigPendingRestart(); /** - * Gets the unit property: Configuration unit. + * Gets the unit property: Units in which the configuration (also known as server parameter) value is expressed. * * @return the unit value. */ String unit(); /** - * Gets the documentationLink property: Configuration documentation link. + * Gets the documentationLink property: Link pointing to the documentation of the configuration (also known as + * server parameter). * * @return the documentationLink value. */ @@ -188,9 +196,11 @@ interface WithCreate extends DefinitionStages.WithValue, DefinitionStages.WithSo */ interface WithValue { /** - * Specifies the value property: Value of the configuration. Required to update the configuration.. + * Specifies the value property: Value of the configuration (also known as server parameter). Required to + * update the value assigned to a specific modifiable configuration.. * - * @param value Value of the configuration. Required to update the configuration. + * @param value Value of the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. * @return the next definition stage. */ WithCreate withValue(String value); @@ -201,9 +211,11 @@ interface WithValue { */ interface WithSource { /** - * Specifies the source property: Source of the configuration. Required to update the configuration.. + * Specifies the source property: Source of the value assigned to the configuration (also known as server + * parameter). Required to update the value assigned to a specific modifiable configuration.. * - * @param source Source of the configuration. Required to update the configuration. + * @param source Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * @return the next definition stage. */ WithCreate withSource(String source); @@ -246,9 +258,11 @@ interface UpdateStages { */ interface WithValue { /** - * Specifies the value property: Value of the configuration. Required to update the configuration.. + * Specifies the value property: Value of the configuration (also known as server parameter). Required to + * update the value assigned to a specific modifiable configuration.. * - * @param value Value of the configuration. Required to update the configuration. + * @param value Value of the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. * @return the next definition stage. */ Update withValue(String value); @@ -259,9 +273,11 @@ interface WithValue { */ interface WithSource { /** - * Specifies the source property: Source of the configuration. Required to update the configuration.. + * Specifies the source property: Source of the value assigned to the configuration (also known as server + * parameter). Required to update the value assigned to a specific modifiable configuration.. * - * @param source Source of the configuration. Required to update the configuration. + * @param source Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * @return the next definition stage. */ Update withSource(String source); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationDataType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationDataType.java index c087e8eaaf1b..91772666e312 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationDataType.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationDataType.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Data type of the configuration. + * Data type of the configuration (also known as server parameter). */ public final class ConfigurationDataType extends ExpandableStringEnum { /** @@ -31,6 +31,16 @@ public final class ConfigurationDataType extends ExpandableStringEnum { /* - * The properties of a configuration. + * Properties of a configuration (also known as server parameter). */ private ConfigurationProperties innerProperties; @@ -29,7 +29,7 @@ public ConfigurationForUpdate() { } /** - * Get the innerProperties property: The properties of a configuration. + * Get the innerProperties property: Properties of a configuration (also known as server parameter). * * @return the innerProperties value. */ @@ -38,7 +38,8 @@ private ConfigurationProperties innerProperties() { } /** - * Get the value property: Value of the configuration. Required to update the configuration. + * Get the value property: Value of the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. * * @return the value value. */ @@ -47,7 +48,8 @@ public String value() { } /** - * Set the value property: Value of the configuration. Required to update the configuration. + * Set the value property: Value of the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. * * @param value the value value to set. * @return the ConfigurationForUpdate object itself. @@ -61,7 +63,7 @@ public ConfigurationForUpdate withValue(String value) { } /** - * Get the description property: Description of the configuration. + * Get the description property: Description of the configuration (also known as server parameter). * * @return the description value. */ @@ -70,7 +72,7 @@ public String description() { } /** - * Get the defaultValue property: Default value of the configuration. + * Get the defaultValue property: Value assigned by default to the configuration (also known as server parameter). * * @return the defaultValue value. */ @@ -79,7 +81,7 @@ public String defaultValue() { } /** - * Get the dataType property: Data type of the configuration. + * Get the dataType property: Data type of the configuration (also known as server parameter). * * @return the dataType value. */ @@ -88,7 +90,7 @@ public ConfigurationDataType dataType() { } /** - * Get the allowedValues property: Allowed values of the configuration. + * Get the allowedValues property: Allowed values of the configuration (also known as server parameter). * * @return the allowedValues value. */ @@ -97,7 +99,8 @@ public String allowedValues() { } /** - * Get the source property: Source of the configuration. Required to update the configuration. + * Get the source property: Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * * @return the source value. */ @@ -106,7 +109,8 @@ public String source() { } /** - * Set the source property: Source of the configuration. Required to update the configuration. + * Set the source property: Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * * @param source the source value to set. * @return the ConfigurationForUpdate object itself. @@ -120,7 +124,10 @@ public ConfigurationForUpdate withSource(String source) { } /** - * Get the isDynamicConfig property: Configuration dynamic or static. + * Get the isDynamicConfig property: Indicates if it's a dynamic (true) or static (false) configuration (also known + * as server parameter). Static server parameters require a server restart after changing the value assigned to + * them, for the change to take effect. Dynamic server parameters do not require a server restart after changing the + * value assigned to them, for the change to take effect. * * @return the isDynamicConfig value. */ @@ -129,7 +136,8 @@ public Boolean isDynamicConfig() { } /** - * Get the isReadOnly property: Configuration read-only or not. + * Get the isReadOnly property: Indicates if it's a read-only (true) or modifiable (false) configuration (also known + * as server parameter). * * @return the isReadOnly value. */ @@ -138,7 +146,8 @@ public Boolean isReadOnly() { } /** - * Get the isConfigPendingRestart property: Configuration is pending restart or not. + * Get the isConfigPendingRestart property: Indicates if the value assigned to the configuration (also known as + * server parameter) is pending a server restart for it to take effect. * * @return the isConfigPendingRestart value. */ @@ -147,7 +156,7 @@ public Boolean isConfigPendingRestart() { } /** - * Get the unit property: Configuration unit. + * Get the unit property: Units in which the configuration (also known as server parameter) value is expressed. * * @return the unit value. */ @@ -156,7 +165,8 @@ public String unit() { } /** - * Get the documentationLink property: Configuration documentation link. + * Get the documentationLink property: Link pointing to the documentation of the configuration (also known as server + * parameter). * * @return the documentationLink value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationList.java similarity index 62% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationList.java index 9061d91ff5f6..58d831e2f356 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationList.java @@ -14,28 +14,28 @@ import java.util.List; /** - * A list of server configurations. + * List of configurations (also known as server parameters). */ @Fluent -public final class ConfigurationListResult implements JsonSerializable { +public final class ConfigurationList implements JsonSerializable { /* - * The list of server configurations. + * List of configurations (also known as server parameters). */ private List value; /* - * The link used to get the next page of operations. + * Link used to get the next page of results. */ private String nextLink; /** - * Creates an instance of ConfigurationListResult class. + * Creates an instance of ConfigurationList class. */ - public ConfigurationListResult() { + public ConfigurationList() { } /** - * Get the value property: The list of server configurations. + * Get the value property: List of configurations (also known as server parameters). * * @return the value value. */ @@ -44,18 +44,18 @@ public List value() { } /** - * Set the value property: The list of server configurations. + * Set the value property: List of configurations (also known as server parameters). * * @param value the value value to set. - * @return the ConfigurationListResult object itself. + * @return the ConfigurationList object itself. */ - public ConfigurationListResult withValue(List value) { + public ConfigurationList withValue(List value) { this.value = value; return this; } /** - * Get the nextLink property: The link used to get the next page of operations. + * Get the nextLink property: Link used to get the next page of results. * * @return the nextLink value. */ @@ -64,12 +64,12 @@ public String nextLink() { } /** - * Set the nextLink property: The link used to get the next page of operations. + * Set the nextLink property: Link used to get the next page of results. * * @param nextLink the nextLink value to set. - * @return the ConfigurationListResult object itself. + * @return the ConfigurationList object itself. */ - public ConfigurationListResult withNextLink(String nextLink) { + public ConfigurationList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } @@ -97,31 +97,31 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ConfigurationListResult from the JsonReader. + * Reads an instance of ConfigurationList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ConfigurationListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConfigurationListResult. + * @return An instance of ConfigurationList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ConfigurationList. */ - public static ConfigurationListResult fromJson(JsonReader jsonReader) throws IOException { + public static ConfigurationList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ConfigurationListResult deserializedConfigurationListResult = new ConfigurationListResult(); + ConfigurationList deserializedConfigurationList = new ConfigurationList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ConfigurationInner.fromJson(reader1)); - deserializedConfigurationListResult.value = value; + deserializedConfigurationList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedConfigurationListResult.nextLink = reader.getString(); + deserializedConfigurationList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedConfigurationListResult; + return deserializedConfigurationList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configurations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configurations.java index 68bb82ad44c8..2e3ac07e6195 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configurations.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configurations.java @@ -13,19 +13,20 @@ */ public interface Configurations { /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 server configurations as paginated response with {@link PagedIterable}. + * @return list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -33,58 +34,62 @@ public interface Configurations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 server configurations as paginated response with {@link PagedIterable}. + * @return list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server parameter). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server along with {@link Response}. + * @return information about a specific configuration (also known as server parameter) of a server along with + * {@link Response}. */ Response getWithResponse(String resourceGroupName, String serverName, String configurationName, Context context); /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server. + * @return information about a specific configuration (also known as server parameter) of a server. */ Configuration get(String resourceGroupName, String serverName, String configurationName); /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server along with {@link Response}. + * @return information about a specific configuration (also known as server parameter) of a server along with + * {@link Response}. */ Configuration getById(String id); /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server along with {@link Response}. + * @return information about a specific configuration (also known as server parameter) of a server along with + * {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateMode.java index 770389ec932d..86d4e2b952a6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateMode.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateMode.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The mode to create a new PostgreSQL server. + * Creation mode of a new server. */ public final class CreateMode extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForPatch.java new file mode 100644 index 000000000000..e4f8900c9494 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForPatch.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.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Update mode of an existing server. + */ +public final class CreateModeForPatch extends ExpandableStringEnum { + /** + * Static value Default for CreateModeForPatch. + */ + public static final CreateModeForPatch DEFAULT = fromString("Default"); + + /** + * Static value Update for CreateModeForPatch. + */ + public static final CreateModeForPatch UPDATE = fromString("Update"); + + /** + * Creates a new instance of CreateModeForPatch value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CreateModeForPatch() { + } + + /** + * Creates or finds a CreateModeForPatch from its string representation. + * + * @param name a name to look for. + * @return the corresponding CreateModeForPatch. + */ + public static CreateModeForPatch fromString(String name) { + return fromString(name, CreateModeForPatch.class); + } + + /** + * Gets known CreateModeForPatch values. + * + * @return known CreateModeForPatch values. + */ + public static Collection values() { + return values(CreateModeForPatch.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForUpdate.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForUpdate.java deleted file mode 100644 index 10f4cee8d765..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForUpdate.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The mode to update a new PostgreSQL server. - */ -public final class CreateModeForUpdate extends ExpandableStringEnum { - /** - * Static value Default for CreateModeForUpdate. - */ - public static final CreateModeForUpdate DEFAULT = fromString("Default"); - - /** - * Static value Update for CreateModeForUpdate. - */ - public static final CreateModeForUpdate UPDATE = fromString("Update"); - - /** - * Creates a new instance of CreateModeForUpdate value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CreateModeForUpdate() { - } - - /** - * Creates or finds a CreateModeForUpdate from its string representation. - * - * @param name a name to look for. - * @return the corresponding CreateModeForUpdate. - */ - public static CreateModeForUpdate fromString(String name) { - return fromString(name, CreateModeForUpdate.class); - } - - /** - * Gets known CreateModeForUpdate values. - * - * @return known CreateModeForUpdate values. - */ - public static Collection values() { - return values(CreateModeForUpdate.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryption.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryption.java index 5d5a95ba3a02..1819c5f98ca7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryption.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryption.java @@ -17,39 +17,47 @@ @Fluent public final class DataEncryption implements JsonSerializable { /* - * URI for the key in keyvault for data encryption of the primary server. + * URI of the key in Azure Key Vault used for data encryption of the primary storage associated to a server. */ private String primaryKeyUri; /* - * Resource Id for the User assigned identity to be used for data encryption of the primary server. + * Identifier of the user assigned managed identity used to access the key in Azure Key Vault for data encryption of + * the primary storage associated to a server. */ private String primaryUserAssignedIdentityId; /* - * URI for the key in keyvault for data encryption for geo-backup of server. + * Identifier of the user assigned managed identity used to access the key in Azure Key Vault for data encryption of + * the geographically redundant storage associated to a server that is configured to support geographically + * redundant backups. */ private String geoBackupKeyUri; /* - * Resource Id for the User assigned identity to be used for data encryption for geo-backup of server. + * Identifier of the user assigned managed identity used to access the key in Azure Key Vault for data encryption of + * the geographically redundant storage associated to a server that is configured to support geographically + * redundant backups. */ private String geoBackupUserAssignedIdentityId; /* - * Data encryption type to depict if it is System Managed vs Azure Key vault. + * Data encryption type used by a server. */ - private ArmServerKeyType type; + private DataEncryptionType type; /* - * Primary encryption key status for Data encryption enabled server. + * Status of key used by a server configured with data encryption based on customer managed key, to encrypt the + * primary storage associated to the server. */ - private KeyStatusEnum primaryEncryptionKeyStatus; + private EncryptionKeyStatus primaryEncryptionKeyStatus; /* - * Geo-backup encryption key status for Data encryption enabled server. + * Status of key used by a server configured with data encryption based on customer managed key, to encrypt the + * geographically redundant storage associated to the server when it is configured to support geographically + * redundant backups. */ - private KeyStatusEnum geoBackupEncryptionKeyStatus; + private EncryptionKeyStatus geoBackupEncryptionKeyStatus; /** * Creates an instance of DataEncryption class. @@ -58,7 +66,8 @@ public DataEncryption() { } /** - * Get the primaryKeyUri property: URI for the key in keyvault for data encryption of the primary server. + * Get the primaryKeyUri property: URI of the key in Azure Key Vault used for data encryption of the primary storage + * associated to a server. * * @return the primaryKeyUri value. */ @@ -67,7 +76,8 @@ public String primaryKeyUri() { } /** - * Set the primaryKeyUri property: URI for the key in keyvault for data encryption of the primary server. + * Set the primaryKeyUri property: URI of the key in Azure Key Vault used for data encryption of the primary storage + * associated to a server. * * @param primaryKeyUri the primaryKeyUri value to set. * @return the DataEncryption object itself. @@ -78,8 +88,8 @@ public DataEncryption withPrimaryKeyUri(String primaryKeyUri) { } /** - * Get the primaryUserAssignedIdentityId property: Resource Id for the User assigned identity to be used for data - * encryption of the primary server. + * Get the primaryUserAssignedIdentityId property: Identifier of the user assigned managed identity used to access + * the key in Azure Key Vault for data encryption of the primary storage associated to a server. * * @return the primaryUserAssignedIdentityId value. */ @@ -88,8 +98,8 @@ public String primaryUserAssignedIdentityId() { } /** - * Set the primaryUserAssignedIdentityId property: Resource Id for the User assigned identity to be used for data - * encryption of the primary server. + * Set the primaryUserAssignedIdentityId property: Identifier of the user assigned managed identity used to access + * the key in Azure Key Vault for data encryption of the primary storage associated to a server. * * @param primaryUserAssignedIdentityId the primaryUserAssignedIdentityId value to set. * @return the DataEncryption object itself. @@ -100,7 +110,9 @@ public DataEncryption withPrimaryUserAssignedIdentityId(String primaryUserAssign } /** - * Get the geoBackupKeyUri property: URI for the key in keyvault for data encryption for geo-backup of server. + * Get the geoBackupKeyUri property: Identifier of the user assigned managed identity used to access the key in + * Azure Key Vault for data encryption of the geographically redundant storage associated to a server that is + * configured to support geographically redundant backups. * * @return the geoBackupKeyUri value. */ @@ -109,7 +121,9 @@ public String geoBackupKeyUri() { } /** - * Set the geoBackupKeyUri property: URI for the key in keyvault for data encryption for geo-backup of server. + * Set the geoBackupKeyUri property: Identifier of the user assigned managed identity used to access the key in + * Azure Key Vault for data encryption of the geographically redundant storage associated to a server that is + * configured to support geographically redundant backups. * * @param geoBackupKeyUri the geoBackupKeyUri value to set. * @return the DataEncryption object itself. @@ -120,8 +134,9 @@ public DataEncryption withGeoBackupKeyUri(String geoBackupKeyUri) { } /** - * Get the geoBackupUserAssignedIdentityId property: Resource Id for the User assigned identity to be used for data - * encryption for geo-backup of server. + * Get the geoBackupUserAssignedIdentityId property: Identifier of the user assigned managed identity used to access + * the key in Azure Key Vault for data encryption of the geographically redundant storage associated to a server + * that is configured to support geographically redundant backups. * * @return the geoBackupUserAssignedIdentityId value. */ @@ -130,8 +145,9 @@ public String geoBackupUserAssignedIdentityId() { } /** - * Set the geoBackupUserAssignedIdentityId property: Resource Id for the User assigned identity to be used for data - * encryption for geo-backup of server. + * Set the geoBackupUserAssignedIdentityId property: Identifier of the user assigned managed identity used to access + * the key in Azure Key Vault for data encryption of the geographically redundant storage associated to a server + * that is configured to support geographically redundant backups. * * @param geoBackupUserAssignedIdentityId the geoBackupUserAssignedIdentityId value to set. * @return the DataEncryption object itself. @@ -142,63 +158,67 @@ public DataEncryption withGeoBackupUserAssignedIdentityId(String geoBackupUserAs } /** - * Get the type property: Data encryption type to depict if it is System Managed vs Azure Key vault. + * Get the type property: Data encryption type used by a server. * * @return the type value. */ - public ArmServerKeyType type() { + public DataEncryptionType type() { return this.type; } /** - * Set the type property: Data encryption type to depict if it is System Managed vs Azure Key vault. + * Set the type property: Data encryption type used by a server. * * @param type the type value to set. * @return the DataEncryption object itself. */ - public DataEncryption withType(ArmServerKeyType type) { + public DataEncryption withType(DataEncryptionType type) { this.type = type; return this; } /** - * Get the primaryEncryptionKeyStatus property: Primary encryption key status for Data encryption enabled server. + * Get the primaryEncryptionKeyStatus property: Status of key used by a server configured with data encryption based + * on customer managed key, to encrypt the primary storage associated to the server. * * @return the primaryEncryptionKeyStatus value. */ - public KeyStatusEnum primaryEncryptionKeyStatus() { + public EncryptionKeyStatus primaryEncryptionKeyStatus() { return this.primaryEncryptionKeyStatus; } /** - * Set the primaryEncryptionKeyStatus property: Primary encryption key status for Data encryption enabled server. + * Set the primaryEncryptionKeyStatus property: Status of key used by a server configured with data encryption based + * on customer managed key, to encrypt the primary storage associated to the server. * * @param primaryEncryptionKeyStatus the primaryEncryptionKeyStatus value to set. * @return the DataEncryption object itself. */ - public DataEncryption withPrimaryEncryptionKeyStatus(KeyStatusEnum primaryEncryptionKeyStatus) { + public DataEncryption withPrimaryEncryptionKeyStatus(EncryptionKeyStatus primaryEncryptionKeyStatus) { this.primaryEncryptionKeyStatus = primaryEncryptionKeyStatus; return this; } /** - * Get the geoBackupEncryptionKeyStatus property: Geo-backup encryption key status for Data encryption enabled - * server. + * Get the geoBackupEncryptionKeyStatus property: Status of key used by a server configured with data encryption + * based on customer managed key, to encrypt the geographically redundant storage associated to the server when it + * is configured to support geographically redundant backups. * * @return the geoBackupEncryptionKeyStatus value. */ - public KeyStatusEnum geoBackupEncryptionKeyStatus() { + public EncryptionKeyStatus geoBackupEncryptionKeyStatus() { return this.geoBackupEncryptionKeyStatus; } /** - * Set the geoBackupEncryptionKeyStatus property: Geo-backup encryption key status for Data encryption enabled - * server. + * Set the geoBackupEncryptionKeyStatus property: Status of key used by a server configured with data encryption + * based on customer managed key, to encrypt the geographically redundant storage associated to the server when it + * is configured to support geographically redundant backups. * * @param geoBackupEncryptionKeyStatus the geoBackupEncryptionKeyStatus value to set. * @return the DataEncryption object itself. */ - public DataEncryption withGeoBackupEncryptionKeyStatus(KeyStatusEnum geoBackupEncryptionKeyStatus) { + public DataEncryption withGeoBackupEncryptionKeyStatus(EncryptionKeyStatus geoBackupEncryptionKeyStatus) { this.geoBackupEncryptionKeyStatus = geoBackupEncryptionKeyStatus; return this; } @@ -253,13 +273,13 @@ public static DataEncryption fromJson(JsonReader jsonReader) throws IOException } else if ("geoBackupUserAssignedIdentityId".equals(fieldName)) { deserializedDataEncryption.geoBackupUserAssignedIdentityId = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedDataEncryption.type = ArmServerKeyType.fromString(reader.getString()); + deserializedDataEncryption.type = DataEncryptionType.fromString(reader.getString()); } else if ("primaryEncryptionKeyStatus".equals(fieldName)) { deserializedDataEncryption.primaryEncryptionKeyStatus - = KeyStatusEnum.fromString(reader.getString()); + = EncryptionKeyStatus.fromString(reader.getString()); } else if ("geoBackupEncryptionKeyStatus".equals(fieldName)) { deserializedDataEncryption.geoBackupEncryptionKeyStatus - = KeyStatusEnum.fromString(reader.getString()); + = EncryptionKeyStatus.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryptionType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryptionType.java new file mode 100644 index 000000000000..a5c1f42511f1 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryptionType.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.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Data encryption type used by a server. + */ +public final class DataEncryptionType extends ExpandableStringEnum { + /** + * Static value SystemManaged for DataEncryptionType. + */ + public static final DataEncryptionType SYSTEM_MANAGED = fromString("SystemManaged"); + + /** + * Static value AzureKeyVault for DataEncryptionType. + */ + public static final DataEncryptionType AZURE_KEY_VAULT = fromString("AzureKeyVault"); + + /** + * Creates a new instance of DataEncryptionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataEncryptionType() { + } + + /** + * Creates or finds a DataEncryptionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataEncryptionType. + */ + public static DataEncryptionType fromString(String name) { + return fromString(name, DataEncryptionType.class); + } + + /** + * Gets known DataEncryptionType values. + * + * @return known DataEncryptionType values. + */ + public static Collection values() { + return values(DataEncryptionType.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Database.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Database.java index c8a68deaec30..a0cc89c4271d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Database.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Database.java @@ -41,14 +41,14 @@ public interface Database { SystemData systemData(); /** - * Gets the charset property: The charset of the database. + * Gets the charset property: Character set of the database. * * @return the charset value. */ String charset(); /** - * Gets the collation property: The collation of the database. + * Gets the collation property: Collation of the database. * * @return the collation value. */ @@ -118,9 +118,9 @@ interface WithCreate extends DefinitionStages.WithCharset, DefinitionStages.With */ interface WithCharset { /** - * Specifies the charset property: The charset of the database.. + * Specifies the charset property: Character set of the database.. * - * @param charset The charset of the database. + * @param charset Character set of the database. * @return the next definition stage. */ WithCreate withCharset(String charset); @@ -131,9 +131,9 @@ interface WithCharset { */ interface WithCollation { /** - * Specifies the collation property: The collation of the database.. + * Specifies the collation property: Collation of the database.. * - * @param collation The collation of the database. + * @param collation Collation of the database. * @return the next definition stage. */ WithCreate withCollation(String collation); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseList.java similarity index 63% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseList.java index 75079602812b..7bde8bee07fc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseList.java @@ -14,28 +14,28 @@ import java.util.List; /** - * A List of databases. + * List of all databases in a server. */ @Fluent -public final class DatabaseListResult implements JsonSerializable { +public final class DatabaseList implements JsonSerializable { /* - * The list of databases housed in a server + * List of all databases in a server. */ private List value; /* - * The link used to get the next page of databases. + * Link used to get the next page of results. */ private String nextLink; /** - * Creates an instance of DatabaseListResult class. + * Creates an instance of DatabaseList class. */ - public DatabaseListResult() { + public DatabaseList() { } /** - * Get the value property: The list of databases housed in a server. + * Get the value property: List of all databases in a server. * * @return the value value. */ @@ -44,18 +44,18 @@ public List value() { } /** - * Set the value property: The list of databases housed in a server. + * Set the value property: List of all databases in a server. * * @param value the value value to set. - * @return the DatabaseListResult object itself. + * @return the DatabaseList object itself. */ - public DatabaseListResult withValue(List value) { + public DatabaseList withValue(List value) { this.value = value; return this; } /** - * Get the nextLink property: The link used to get the next page of databases. + * Get the nextLink property: Link used to get the next page of results. * * @return the nextLink value. */ @@ -64,12 +64,12 @@ public String nextLink() { } /** - * Set the nextLink property: The link used to get the next page of databases. + * Set the nextLink property: Link used to get the next page of results. * * @param nextLink the nextLink value to set. - * @return the DatabaseListResult object itself. + * @return the DatabaseList object itself. */ - public DatabaseListResult withNextLink(String nextLink) { + public DatabaseList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } @@ -97,31 +97,31 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of DatabaseListResult from the JsonReader. + * Reads an instance of DatabaseList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of DatabaseListResult if the JsonReader was pointing to an instance of it, or null if it was + * @return An instance of DatabaseList if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IOException If an error occurs while reading the DatabaseListResult. + * @throws IOException If an error occurs while reading the DatabaseList. */ - public static DatabaseListResult fromJson(JsonReader jsonReader) throws IOException { + public static DatabaseList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - DatabaseListResult deserializedDatabaseListResult = new DatabaseListResult(); + DatabaseList deserializedDatabaseList = new DatabaseList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> DatabaseInner.fromJson(reader1)); - deserializedDatabaseListResult.value = value; + deserializedDatabaseList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedDatabaseListResult.nextLink = reader.getString(); + deserializedDatabaseList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedDatabaseListResult; + return deserializedDatabaseList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbMigrationStatus.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseMigrationState.java similarity index 60% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbMigrationStatus.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseMigrationState.java index f12d8f8a8cf7..3c3e363e5cff 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbMigrationStatus.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseMigrationState.java @@ -15,98 +15,98 @@ import java.time.format.DateTimeFormatter; /** - * Migration status of an individual database. + * Migration state of a database. */ @Fluent -public final class DbMigrationStatus implements JsonSerializable { +public final class DatabaseMigrationState implements JsonSerializable { /* - * Name of the database + * Name of database. */ private String databaseName; /* - * Migration db state of an individual database + * Migration state of a database. */ - private MigrationDbState migrationState; + private MigrationDatabaseState migrationState; /* - * Migration operation of an individual database + * Migration operation of a database. */ private String migrationOperation; /* - * Start date-time of a migration state + * Start time of a migration state. */ private OffsetDateTime startedOn; /* - * End date-time of a migration state + * End time of a migration state. */ private OffsetDateTime endedOn; /* - * Number of tables queued for the migration of a DB + * Number of tables queued for the migration of a database. */ private Integer fullLoadQueuedTables; /* - * Number of tables errored out during the migration of a DB + * Number of tables encountering errors during the migration of a database. */ private Integer fullLoadErroredTables; /* - * Number of tables loading during the migration of a DB + * Number of tables loading during the migration of a database. */ private Integer fullLoadLoadingTables; /* - * Number of tables loaded during the migration of a DB + * Number of tables loaded during the migration of a database. */ private Integer fullLoadCompletedTables; /* - * CDC update counter + * Change Data Capture update counter. */ private Integer cdcUpdateCounter; /* - * CDC delete counter + * Change Data Capture delete counter. */ private Integer cdcDeleteCounter; /* - * CDC insert counter + * Change Data Capture insert counter. */ private Integer cdcInsertCounter; /* - * CDC applied changes counter + * Change Data Capture applied changes counter. */ private Integer appliedChanges; /* - * CDC incoming changes counter + * Change Data Capture incoming changes counter. */ private Integer incomingChanges; /* - * Lag in seconds between source and target during online phase + * Lag in seconds between source and target during online phase. */ private Integer latency; /* - * Error message, if any, for the migration state + * Error message, if any, for the migration state. */ private String message; /** - * Creates an instance of DbMigrationStatus class. + * Creates an instance of DatabaseMigrationState class. */ - public DbMigrationStatus() { + public DatabaseMigrationState() { } /** - * Get the databaseName property: Name of the database. + * Get the databaseName property: Name of database. * * @return the databaseName value. */ @@ -115,38 +115,38 @@ public String databaseName() { } /** - * Set the databaseName property: Name of the database. + * Set the databaseName property: Name of database. * * @param databaseName the databaseName value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withDatabaseName(String databaseName) { + public DatabaseMigrationState withDatabaseName(String databaseName) { this.databaseName = databaseName; return this; } /** - * Get the migrationState property: Migration db state of an individual database. + * Get the migrationState property: Migration state of a database. * * @return the migrationState value. */ - public MigrationDbState migrationState() { + public MigrationDatabaseState migrationState() { return this.migrationState; } /** - * Set the migrationState property: Migration db state of an individual database. + * Set the migrationState property: Migration state of a database. * * @param migrationState the migrationState value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withMigrationState(MigrationDbState migrationState) { + public DatabaseMigrationState withMigrationState(MigrationDatabaseState migrationState) { this.migrationState = migrationState; return this; } /** - * Get the migrationOperation property: Migration operation of an individual database. + * Get the migrationOperation property: Migration operation of a database. * * @return the migrationOperation value. */ @@ -155,18 +155,18 @@ public String migrationOperation() { } /** - * Set the migrationOperation property: Migration operation of an individual database. + * Set the migrationOperation property: Migration operation of a database. * * @param migrationOperation the migrationOperation value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withMigrationOperation(String migrationOperation) { + public DatabaseMigrationState withMigrationOperation(String migrationOperation) { this.migrationOperation = migrationOperation; return this; } /** - * Get the startedOn property: Start date-time of a migration state. + * Get the startedOn property: Start time of a migration state. * * @return the startedOn value. */ @@ -175,18 +175,18 @@ public OffsetDateTime startedOn() { } /** - * Set the startedOn property: Start date-time of a migration state. + * Set the startedOn property: Start time of a migration state. * * @param startedOn the startedOn value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withStartedOn(OffsetDateTime startedOn) { + public DatabaseMigrationState withStartedOn(OffsetDateTime startedOn) { this.startedOn = startedOn; return this; } /** - * Get the endedOn property: End date-time of a migration state. + * Get the endedOn property: End time of a migration state. * * @return the endedOn value. */ @@ -195,18 +195,18 @@ public OffsetDateTime endedOn() { } /** - * Set the endedOn property: End date-time of a migration state. + * Set the endedOn property: End time of a migration state. * * @param endedOn the endedOn value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withEndedOn(OffsetDateTime endedOn) { + public DatabaseMigrationState withEndedOn(OffsetDateTime endedOn) { this.endedOn = endedOn; return this; } /** - * Get the fullLoadQueuedTables property: Number of tables queued for the migration of a DB. + * Get the fullLoadQueuedTables property: Number of tables queued for the migration of a database. * * @return the fullLoadQueuedTables value. */ @@ -215,18 +215,18 @@ public Integer fullLoadQueuedTables() { } /** - * Set the fullLoadQueuedTables property: Number of tables queued for the migration of a DB. + * Set the fullLoadQueuedTables property: Number of tables queued for the migration of a database. * * @param fullLoadQueuedTables the fullLoadQueuedTables value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withFullLoadQueuedTables(Integer fullLoadQueuedTables) { + public DatabaseMigrationState withFullLoadQueuedTables(Integer fullLoadQueuedTables) { this.fullLoadQueuedTables = fullLoadQueuedTables; return this; } /** - * Get the fullLoadErroredTables property: Number of tables errored out during the migration of a DB. + * Get the fullLoadErroredTables property: Number of tables encountering errors during the migration of a database. * * @return the fullLoadErroredTables value. */ @@ -235,18 +235,18 @@ public Integer fullLoadErroredTables() { } /** - * Set the fullLoadErroredTables property: Number of tables errored out during the migration of a DB. + * Set the fullLoadErroredTables property: Number of tables encountering errors during the migration of a database. * * @param fullLoadErroredTables the fullLoadErroredTables value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withFullLoadErroredTables(Integer fullLoadErroredTables) { + public DatabaseMigrationState withFullLoadErroredTables(Integer fullLoadErroredTables) { this.fullLoadErroredTables = fullLoadErroredTables; return this; } /** - * Get the fullLoadLoadingTables property: Number of tables loading during the migration of a DB. + * Get the fullLoadLoadingTables property: Number of tables loading during the migration of a database. * * @return the fullLoadLoadingTables value. */ @@ -255,18 +255,18 @@ public Integer fullLoadLoadingTables() { } /** - * Set the fullLoadLoadingTables property: Number of tables loading during the migration of a DB. + * Set the fullLoadLoadingTables property: Number of tables loading during the migration of a database. * * @param fullLoadLoadingTables the fullLoadLoadingTables value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withFullLoadLoadingTables(Integer fullLoadLoadingTables) { + public DatabaseMigrationState withFullLoadLoadingTables(Integer fullLoadLoadingTables) { this.fullLoadLoadingTables = fullLoadLoadingTables; return this; } /** - * Get the fullLoadCompletedTables property: Number of tables loaded during the migration of a DB. + * Get the fullLoadCompletedTables property: Number of tables loaded during the migration of a database. * * @return the fullLoadCompletedTables value. */ @@ -275,18 +275,18 @@ public Integer fullLoadCompletedTables() { } /** - * Set the fullLoadCompletedTables property: Number of tables loaded during the migration of a DB. + * Set the fullLoadCompletedTables property: Number of tables loaded during the migration of a database. * * @param fullLoadCompletedTables the fullLoadCompletedTables value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withFullLoadCompletedTables(Integer fullLoadCompletedTables) { + public DatabaseMigrationState withFullLoadCompletedTables(Integer fullLoadCompletedTables) { this.fullLoadCompletedTables = fullLoadCompletedTables; return this; } /** - * Get the cdcUpdateCounter property: CDC update counter. + * Get the cdcUpdateCounter property: Change Data Capture update counter. * * @return the cdcUpdateCounter value. */ @@ -295,18 +295,18 @@ public Integer cdcUpdateCounter() { } /** - * Set the cdcUpdateCounter property: CDC update counter. + * Set the cdcUpdateCounter property: Change Data Capture update counter. * * @param cdcUpdateCounter the cdcUpdateCounter value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withCdcUpdateCounter(Integer cdcUpdateCounter) { + public DatabaseMigrationState withCdcUpdateCounter(Integer cdcUpdateCounter) { this.cdcUpdateCounter = cdcUpdateCounter; return this; } /** - * Get the cdcDeleteCounter property: CDC delete counter. + * Get the cdcDeleteCounter property: Change Data Capture delete counter. * * @return the cdcDeleteCounter value. */ @@ -315,18 +315,18 @@ public Integer cdcDeleteCounter() { } /** - * Set the cdcDeleteCounter property: CDC delete counter. + * Set the cdcDeleteCounter property: Change Data Capture delete counter. * * @param cdcDeleteCounter the cdcDeleteCounter value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withCdcDeleteCounter(Integer cdcDeleteCounter) { + public DatabaseMigrationState withCdcDeleteCounter(Integer cdcDeleteCounter) { this.cdcDeleteCounter = cdcDeleteCounter; return this; } /** - * Get the cdcInsertCounter property: CDC insert counter. + * Get the cdcInsertCounter property: Change Data Capture insert counter. * * @return the cdcInsertCounter value. */ @@ -335,18 +335,18 @@ public Integer cdcInsertCounter() { } /** - * Set the cdcInsertCounter property: CDC insert counter. + * Set the cdcInsertCounter property: Change Data Capture insert counter. * * @param cdcInsertCounter the cdcInsertCounter value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withCdcInsertCounter(Integer cdcInsertCounter) { + public DatabaseMigrationState withCdcInsertCounter(Integer cdcInsertCounter) { this.cdcInsertCounter = cdcInsertCounter; return this; } /** - * Get the appliedChanges property: CDC applied changes counter. + * Get the appliedChanges property: Change Data Capture applied changes counter. * * @return the appliedChanges value. */ @@ -355,18 +355,18 @@ public Integer appliedChanges() { } /** - * Set the appliedChanges property: CDC applied changes counter. + * Set the appliedChanges property: Change Data Capture applied changes counter. * * @param appliedChanges the appliedChanges value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withAppliedChanges(Integer appliedChanges) { + public DatabaseMigrationState withAppliedChanges(Integer appliedChanges) { this.appliedChanges = appliedChanges; return this; } /** - * Get the incomingChanges property: CDC incoming changes counter. + * Get the incomingChanges property: Change Data Capture incoming changes counter. * * @return the incomingChanges value. */ @@ -375,12 +375,12 @@ public Integer incomingChanges() { } /** - * Set the incomingChanges property: CDC incoming changes counter. + * Set the incomingChanges property: Change Data Capture incoming changes counter. * * @param incomingChanges the incomingChanges value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withIncomingChanges(Integer incomingChanges) { + public DatabaseMigrationState withIncomingChanges(Integer incomingChanges) { this.incomingChanges = incomingChanges; return this; } @@ -398,9 +398,9 @@ public Integer latency() { * Set the latency property: Lag in seconds between source and target during online phase. * * @param latency the latency value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withLatency(Integer latency) { + public DatabaseMigrationState withLatency(Integer latency) { this.latency = latency; return this; } @@ -418,9 +418,9 @@ public String message() { * Set the message property: Error message, if any, for the migration state. * * @param message the message value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withMessage(String message) { + public DatabaseMigrationState withMessage(String message) { this.message = message; return this; } @@ -462,60 +462,61 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of DbMigrationStatus from the JsonReader. + * Reads an instance of DatabaseMigrationState from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of DbMigrationStatus if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DbMigrationStatus. + * @return An instance of DatabaseMigrationState if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseMigrationState. */ - public static DbMigrationStatus fromJson(JsonReader jsonReader) throws IOException { + public static DatabaseMigrationState fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - DbMigrationStatus deserializedDbMigrationStatus = new DbMigrationStatus(); + DatabaseMigrationState deserializedDatabaseMigrationState = new DatabaseMigrationState(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("databaseName".equals(fieldName)) { - deserializedDbMigrationStatus.databaseName = reader.getString(); + deserializedDatabaseMigrationState.databaseName = reader.getString(); } else if ("migrationState".equals(fieldName)) { - deserializedDbMigrationStatus.migrationState = MigrationDbState.fromString(reader.getString()); + deserializedDatabaseMigrationState.migrationState + = MigrationDatabaseState.fromString(reader.getString()); } else if ("migrationOperation".equals(fieldName)) { - deserializedDbMigrationStatus.migrationOperation = reader.getString(); + deserializedDatabaseMigrationState.migrationOperation = reader.getString(); } else if ("startedOn".equals(fieldName)) { - deserializedDbMigrationStatus.startedOn = reader + deserializedDatabaseMigrationState.startedOn = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endedOn".equals(fieldName)) { - deserializedDbMigrationStatus.endedOn = reader + deserializedDatabaseMigrationState.endedOn = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("fullLoadQueuedTables".equals(fieldName)) { - deserializedDbMigrationStatus.fullLoadQueuedTables = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.fullLoadQueuedTables = reader.getNullable(JsonReader::getInt); } else if ("fullLoadErroredTables".equals(fieldName)) { - deserializedDbMigrationStatus.fullLoadErroredTables = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.fullLoadErroredTables = reader.getNullable(JsonReader::getInt); } else if ("fullLoadLoadingTables".equals(fieldName)) { - deserializedDbMigrationStatus.fullLoadLoadingTables = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.fullLoadLoadingTables = reader.getNullable(JsonReader::getInt); } else if ("fullLoadCompletedTables".equals(fieldName)) { - deserializedDbMigrationStatus.fullLoadCompletedTables = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.fullLoadCompletedTables = reader.getNullable(JsonReader::getInt); } else if ("cdcUpdateCounter".equals(fieldName)) { - deserializedDbMigrationStatus.cdcUpdateCounter = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.cdcUpdateCounter = reader.getNullable(JsonReader::getInt); } else if ("cdcDeleteCounter".equals(fieldName)) { - deserializedDbMigrationStatus.cdcDeleteCounter = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.cdcDeleteCounter = reader.getNullable(JsonReader::getInt); } else if ("cdcInsertCounter".equals(fieldName)) { - deserializedDbMigrationStatus.cdcInsertCounter = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.cdcInsertCounter = reader.getNullable(JsonReader::getInt); } else if ("appliedChanges".equals(fieldName)) { - deserializedDbMigrationStatus.appliedChanges = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.appliedChanges = reader.getNullable(JsonReader::getInt); } else if ("incomingChanges".equals(fieldName)) { - deserializedDbMigrationStatus.incomingChanges = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.incomingChanges = reader.getNullable(JsonReader::getInt); } else if ("latency".equals(fieldName)) { - deserializedDbMigrationStatus.latency = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.latency = reader.getNullable(JsonReader::getInt); } else if ("message".equals(fieldName)) { - deserializedDbMigrationStatus.message = reader.getString(); + deserializedDatabaseMigrationState.message = reader.getString(); } else { reader.skipChildren(); } } - return deserializedDbMigrationStatus; + return deserializedDatabaseMigrationState; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Databases.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Databases.java index ad4f407ffe3d..f113c4121209 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Databases.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Databases.java @@ -13,11 +13,12 @@ */ public interface Databases { /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -25,11 +26,12 @@ public interface Databases { void delete(String resourceGroupName, String serverName, String databaseName); /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -38,47 +40,49 @@ public interface Databases { void delete(String resourceGroupName, String serverName, String databaseName, Context context); /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database along with {@link Response}. + * @return information about an existing database along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String serverName, String databaseName, Context context); /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database. + * @return information about an existing database. */ Database get(String resourceGroupName, String serverName, String databaseName); /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 databases as paginated response with {@link PagedIterable}. + * @return list of all databases in a server as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -86,35 +90,35 @@ Response getWithResponse(String resourceGroupName, String serverName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 databases as paginated response with {@link PagedIterable}. + * @return list of all databases in a server as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** - * Gets information about a database. + * Gets information about an existing database. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database along with {@link Response}. + * @return information about an existing database along with {@link Response}. */ Database getById(String id); /** - * Gets information about a database. + * Gets information about an existing database. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database along with {@link Response}. + * @return information about an existing database along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Deletes a database. + * Deletes an existing database. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,7 +128,7 @@ Response getWithResponse(String resourceGroupName, String serverName, void deleteById(String id); /** - * Deletes a database. + * Deletes an existing database. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbLevelValidationStatus.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbLevelValidationStatus.java index 44d26054c90f..f07e5bb308c5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbLevelValidationStatus.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbLevelValidationStatus.java @@ -16,27 +16,27 @@ import java.util.List; /** - * Validation status summary for an individual database. + * Validation status summary for a database. */ @Fluent public final class DbLevelValidationStatus implements JsonSerializable { /* - * Name of the database + * Name of database. */ private String databaseName; /* - * Start date-time of a database level validation + * Start time of a database level validation. */ private OffsetDateTime startedOn; /* - * End date-time of a database level validation + * End time of a database level validation. */ private OffsetDateTime endedOn; /* - * Summary of database level validations + * Summary of database level validations. */ private List summary; @@ -47,7 +47,7 @@ public DbLevelValidationStatus() { } /** - * Get the databaseName property: Name of the database. + * Get the databaseName property: Name of database. * * @return the databaseName value. */ @@ -56,7 +56,7 @@ public String databaseName() { } /** - * Set the databaseName property: Name of the database. + * Set the databaseName property: Name of database. * * @param databaseName the databaseName value to set. * @return the DbLevelValidationStatus object itself. @@ -67,7 +67,7 @@ public DbLevelValidationStatus withDatabaseName(String databaseName) { } /** - * Get the startedOn property: Start date-time of a database level validation. + * Get the startedOn property: Start time of a database level validation. * * @return the startedOn value. */ @@ -76,7 +76,7 @@ public OffsetDateTime startedOn() { } /** - * Set the startedOn property: Start date-time of a database level validation. + * Set the startedOn property: Start time of a database level validation. * * @param startedOn the startedOn value to set. * @return the DbLevelValidationStatus object itself. @@ -87,7 +87,7 @@ public DbLevelValidationStatus withStartedOn(OffsetDateTime startedOn) { } /** - * Get the endedOn property: End date-time of a database level validation. + * Get the endedOn property: End time of a database level validation. * * @return the endedOn value. */ @@ -96,7 +96,7 @@ public OffsetDateTime endedOn() { } /** - * Set the endedOn property: End date-time of a database level validation. + * Set the endedOn property: End time of a database level validation. * * @param endedOn the endedOn value to set. * @return the DbLevelValidationStatus object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbServerMetadata.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbServerMetadata.java index da6bdf736ef3..f894cd7321b6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbServerMetadata.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbServerMetadata.java @@ -17,22 +17,23 @@ @Fluent public final class DbServerMetadata implements JsonSerializable { /* - * Location of database server + * Location of database server. */ private String location; /* - * Version for database engine + * Major version of PostgreSQL database engine. */ private String version; /* - * Storage size in MB for database server + * Storage size (in MB) for database server. */ private Integer storageMb; /* - * SKU for the database server. This object is empty for PG single server + * Compute tier and size of the database server. This object is empty for an Azure Database for PostgreSQL single + * server. */ private ServerSku sku; @@ -52,7 +53,7 @@ public String location() { } /** - * Get the version property: Version for database engine. + * Get the version property: Major version of PostgreSQL database engine. * * @return the version value. */ @@ -61,7 +62,7 @@ public String version() { } /** - * Set the version property: Version for database engine. + * Set the version property: Major version of PostgreSQL database engine. * * @param version the version value to set. * @return the DbServerMetadata object itself. @@ -72,7 +73,7 @@ public DbServerMetadata withVersion(String version) { } /** - * Get the storageMb property: Storage size in MB for database server. + * Get the storageMb property: Storage size (in MB) for database server. * * @return the storageMb value. */ @@ -81,7 +82,7 @@ public Integer storageMb() { } /** - * Set the storageMb property: Storage size in MB for database server. + * Set the storageMb property: Storage size (in MB) for database server. * * @param storageMb the storageMb value to set. * @return the DbServerMetadata object itself. @@ -92,7 +93,8 @@ public DbServerMetadata withStorageMb(Integer storageMb) { } /** - * Get the sku property: SKU for the database server. This object is empty for PG single server. + * Get the sku property: Compute tier and size of the database server. This object is empty for an Azure Database + * for PostgreSQL single server. * * @return the sku value. */ @@ -101,7 +103,8 @@ public ServerSku sku() { } /** - * Set the sku property: SKU for the database server. This object is empty for PG single server. + * Set the sku property: Compute tier and size of the database server. This object is empty for an Azure Database + * for PostgreSQL single server. * * @param sku the sku value to set. * @return the DbServerMetadata object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/EncryptionKeyStatus.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/EncryptionKeyStatus.java new file mode 100644 index 000000000000..15b56b7b0641 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/EncryptionKeyStatus.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Status of key used by a server configured with data encryption based on customer managed key, to encrypt the primary + * storage associated to the server. + */ +public final class EncryptionKeyStatus extends ExpandableStringEnum { + /** + * Static value Valid for EncryptionKeyStatus. + */ + public static final EncryptionKeyStatus VALID = fromString("Valid"); + + /** + * Static value Invalid for EncryptionKeyStatus. + */ + public static final EncryptionKeyStatus INVALID = fromString("Invalid"); + + /** + * Creates a new instance of EncryptionKeyStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EncryptionKeyStatus() { + } + + /** + * Creates or finds a EncryptionKeyStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding EncryptionKeyStatus. + */ + public static EncryptionKeyStatus fromString(String name) { + return fromString(name, EncryptionKeyStatus.class); + } + + /** + * Gets known EncryptionKeyStatus values. + * + * @return known EncryptionKeyStatus values. + */ + public static Collection values() { + return values(EncryptionKeyStatus.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningEditionCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningEditionCapability.java index b1027ce6b918..ad719c3144f5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningEditionCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningEditionCapability.java @@ -11,32 +11,32 @@ import java.io.IOException; /** - * Represents capability of a fast provisioning edition. + * Capability of a fast provisioning compute tier. */ @Immutable public final class FastProvisioningEditionCapability extends CapabilityBase { /* - * Fast provisioning supported tier name + * Compute tier supporting fast provisioning. */ private String supportedTier; /* - * Fast provisioning supported sku name + * Compute name (SKU) supporting fast provisioning. */ private String supportedSku; /* - * Fast provisioning supported storage in Gb + * Storage size (in GB) supporting fast provisioning. */ private Integer supportedStorageGb; /* - * Fast provisioning supported version + * Major version of PostgreSQL database engine supporting fast provisioning. */ private String supportedServerVersions; /* - * Count of servers in cache matching the spec + * Count of servers in cache matching this specification. */ private Integer serverCount; @@ -57,7 +57,7 @@ public FastProvisioningEditionCapability() { } /** - * Get the supportedTier property: Fast provisioning supported tier name. + * Get the supportedTier property: Compute tier supporting fast provisioning. * * @return the supportedTier value. */ @@ -66,7 +66,7 @@ public String supportedTier() { } /** - * Get the supportedSku property: Fast provisioning supported sku name. + * Get the supportedSku property: Compute name (SKU) supporting fast provisioning. * * @return the supportedSku value. */ @@ -75,7 +75,7 @@ public String supportedSku() { } /** - * Get the supportedStorageGb property: Fast provisioning supported storage in Gb. + * Get the supportedStorageGb property: Storage size (in GB) supporting fast provisioning. * * @return the supportedStorageGb value. */ @@ -84,7 +84,8 @@ public Integer supportedStorageGb() { } /** - * Get the supportedServerVersions property: Fast provisioning supported version. + * Get the supportedServerVersions property: Major version of PostgreSQL database engine supporting fast + * provisioning. * * @return the supportedServerVersions value. */ @@ -93,7 +94,7 @@ public String supportedServerVersions() { } /** - * Get the serverCount property: Count of servers in cache matching the spec. + * Get the serverCount property: Count of servers in cache matching this specification. * * @return the serverCount value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupport.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupport.java new file mode 100644 index 000000000000..522205ee41e3 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupport.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if fast provisioning is supported. 'Enabled' means fast provisioning is supported. 'Disabled' stands for + * fast provisioning is not supported. Will be deprecated in the future. Look to Supported Features for + * 'FastProvisioning'. + */ +public final class FastProvisioningSupport extends ExpandableStringEnum { + /** + * Static value Enabled for FastProvisioningSupport. + */ + public static final FastProvisioningSupport ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for FastProvisioningSupport. + */ + public static final FastProvisioningSupport DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of FastProvisioningSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FastProvisioningSupport() { + } + + /** + * Creates or finds a FastProvisioningSupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding FastProvisioningSupport. + */ + public static FastProvisioningSupport fromString(String name) { + return fromString(name, FastProvisioningSupport.class); + } + + /** + * Gets known FastProvisioningSupport values. + * + * @return known FastProvisioningSupport values. + */ + public static Collection values() { + return values(FastProvisioningSupport.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupportedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupportedEnum.java deleted file mode 100644 index 2c0d60b0dd37..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupportedEnum.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Gets a value indicating whether fast provisioning is supported. "Enabled" means fast provisioning is supported. - * "Disabled" stands for fast provisioning is not supported. Will be deprecated in future, please look to Supported - * Features for "FastProvisioning". - */ -public final class FastProvisioningSupportedEnum extends ExpandableStringEnum { - /** - * Static value Enabled for FastProvisioningSupportedEnum. - */ - public static final FastProvisioningSupportedEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for FastProvisioningSupportedEnum. - */ - public static final FastProvisioningSupportedEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of FastProvisioningSupportedEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public FastProvisioningSupportedEnum() { - } - - /** - * Creates or finds a FastProvisioningSupportedEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding FastProvisioningSupportedEnum. - */ - public static FastProvisioningSupportedEnum fromString(String name) { - return fromString(name, FastProvisioningSupportedEnum.class); - } - - /** - * Gets known FastProvisioningSupportedEnum values. - * - * @return known FastProvisioningSupportedEnum values. - */ - public static Collection values() { - return values(FastProvisioningSupportedEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FeatureStatus.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FeatureStatus.java new file mode 100644 index 000000000000..e91d95aeea70 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FeatureStatus.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.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Status of the feature. Indicates if the feature is enabled or not. + */ +public final class FeatureStatus extends ExpandableStringEnum { + /** + * Static value Enabled for FeatureStatus. + */ + public static final FeatureStatus ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for FeatureStatus. + */ + public static final FeatureStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of FeatureStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FeatureStatus() { + } + + /** + * Creates or finds a FeatureStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding FeatureStatus. + */ + public static FeatureStatus fromString(String name) { + return fromString(name, FeatureStatus.class); + } + + /** + * Gets known FeatureStatus values. + * + * @return known FeatureStatus values. + */ + public static Collection values() { + return values(FeatureStatus.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRule.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRule.java index bf03da38012a..4ea0fb1ce268 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRule.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRule.java @@ -41,14 +41,16 @@ public interface FirewallRule { SystemData systemData(); /** - * Gets the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format. + * Gets the startIpAddress property: IP address defining the start of the range of addresses of a firewall rule. + * Must be expressed in IPv4 format. * * @return the startIpAddress value. */ String startIpAddress(); /** - * Gets the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format. + * Gets the endIpAddress property: IP address defining the end of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * * @return the endIpAddress value. */ @@ -104,10 +106,11 @@ interface WithParentResource { */ interface WithStartIpAddress { /** - * Specifies the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 - * format.. + * Specifies the startIpAddress property: IP address defining the start of the range of addresses of a + * firewall rule. Must be expressed in IPv4 format.. * - * @param startIpAddress The start IP address of the server firewall rule. Must be IPv4 format. + * @param startIpAddress IP address defining the start of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * @return the next definition stage. */ WithEndIpAddress withStartIpAddress(String startIpAddress); @@ -118,10 +121,11 @@ interface WithStartIpAddress { */ interface WithEndIpAddress { /** - * Specifies the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 - * format.. + * Specifies the endIpAddress property: IP address defining the end of the range of addresses of a firewall + * rule. Must be expressed in IPv4 format.. * - * @param endIpAddress The end IP address of the server firewall rule. Must be IPv4 format. + * @param endIpAddress IP address defining the end of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * @return the next definition stage. */ WithCreate withEndIpAddress(String endIpAddress); @@ -185,10 +189,11 @@ interface UpdateStages { */ interface WithStartIpAddress { /** - * Specifies the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 - * format.. + * Specifies the startIpAddress property: IP address defining the start of the range of addresses of a + * firewall rule. Must be expressed in IPv4 format.. * - * @param startIpAddress The start IP address of the server firewall rule. Must be IPv4 format. + * @param startIpAddress IP address defining the start of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * @return the next definition stage. */ Update withStartIpAddress(String startIpAddress); @@ -199,10 +204,11 @@ interface WithStartIpAddress { */ interface WithEndIpAddress { /** - * Specifies the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 - * format.. + * Specifies the endIpAddress property: IP address defining the end of the range of addresses of a firewall + * rule. Must be expressed in IPv4 format.. * - * @param endIpAddress The end IP address of the server firewall rule. Must be IPv4 format. + * @param endIpAddress IP address defining the end of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * @return the next definition stage. */ Update withEndIpAddress(String endIpAddress); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleList.java similarity index 62% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleList.java index ccc8da72840b..b6ab09bcb571 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleList.java @@ -14,28 +14,28 @@ import java.util.List; /** - * A list of firewall rules. + * List of firewall rules. */ @Fluent -public final class FirewallRuleListResult implements JsonSerializable { +public final class FirewallRuleList implements JsonSerializable { /* - * The list of firewall rules in a server. + * List of firewall rules in a server. */ private List value; /* - * The link used to get the next page of operations. + * Link to retrieve next page of results. */ private String nextLink; /** - * Creates an instance of FirewallRuleListResult class. + * Creates an instance of FirewallRuleList class. */ - public FirewallRuleListResult() { + public FirewallRuleList() { } /** - * Get the value property: The list of firewall rules in a server. + * Get the value property: List of firewall rules in a server. * * @return the value value. */ @@ -44,18 +44,18 @@ public List value() { } /** - * Set the value property: The list of firewall rules in a server. + * Set the value property: List of firewall rules in a server. * * @param value the value value to set. - * @return the FirewallRuleListResult object itself. + * @return the FirewallRuleList object itself. */ - public FirewallRuleListResult withValue(List value) { + public FirewallRuleList withValue(List value) { this.value = value; return this; } /** - * Get the nextLink property: The link used to get the next page of operations. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -64,12 +64,12 @@ public String nextLink() { } /** - * Set the nextLink property: The link used to get the next page of operations. + * Set the nextLink property: Link to retrieve next page of results. * * @param nextLink the nextLink value to set. - * @return the FirewallRuleListResult object itself. + * @return the FirewallRuleList object itself. */ - public FirewallRuleListResult withNextLink(String nextLink) { + public FirewallRuleList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } @@ -97,31 +97,31 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of FirewallRuleListResult from the JsonReader. + * Reads an instance of FirewallRuleList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of FirewallRuleListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the FirewallRuleListResult. + * @return An instance of FirewallRuleList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the FirewallRuleList. */ - public static FirewallRuleListResult fromJson(JsonReader jsonReader) throws IOException { + public static FirewallRuleList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - FirewallRuleListResult deserializedFirewallRuleListResult = new FirewallRuleListResult(); + FirewallRuleList deserializedFirewallRuleList = new FirewallRuleList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> FirewallRuleInner.fromJson(reader1)); - deserializedFirewallRuleListResult.value = value; + deserializedFirewallRuleList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedFirewallRuleListResult.nextLink = reader.getString(); + deserializedFirewallRuleList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedFirewallRuleListResult; + return deserializedFirewallRuleList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRules.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRules.java index e19529ca52f3..ad811508375e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRules.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRules.java @@ -13,11 +13,11 @@ */ public interface FirewallRules { /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -25,11 +25,11 @@ public interface FirewallRules { void delete(String resourceGroupName, String serverName, String firewallRuleName); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -38,47 +38,47 @@ public interface FirewallRules { void delete(String resourceGroupName, String serverName, String firewallRuleName, Context context); /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule along with {@link Response}. + * @return information about a firewall rule in a server along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String serverName, String firewallRuleName, Context context); /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return information about a firewall rule in a server. */ FirewallRule get(String resourceGroupName, String serverName, String firewallRuleName); /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 firewall rules as paginated response with {@link PagedIterable}. + * @return list of firewall rules as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -86,35 +86,35 @@ Response getWithResponse(String resourceGroupName, String serverNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 firewall rules as paginated response with {@link PagedIterable}. + * @return list of firewall rules as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule along with {@link Response}. + * @return information about a firewall rule in a server along with {@link Response}. */ FirewallRule getById(String id); /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule along with {@link Response}. + * @return information about a firewall rule in a server along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,7 +124,7 @@ Response getWithResponse(String resourceGroupName, String serverNa void deleteById(String id); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerCapability.java deleted file mode 100644 index 8c97306ca642..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerCapability.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; -import java.util.List; - -/** - * An immutable client-side representation of FlexibleServerCapability. - */ -public interface FlexibleServerCapability { - /** - * Gets the status property: The status of the capability. - * - * @return the status value. - */ - CapabilityStatus status(); - - /** - * Gets the reason property: The reason for the capability not being available. - * - * @return the reason value. - */ - String reason(); - - /** - * Gets the name property: Name of flexible servers capability. - * - * @return the name value. - */ - String name(); - - /** - * Gets the supportedServerEditions property: List of supported flexible server editions. - * - * @return the supportedServerEditions value. - */ - List supportedServerEditions(); - - /** - * Gets the supportedServerVersions property: The list of server versions supported for this capability. - * - * @return the supportedServerVersions value. - */ - List supportedServerVersions(); - - /** - * Gets the supportedFeatures property: The supported features. - * - * @return the supportedFeatures value. - */ - List supportedFeatures(); - - /** - * Gets the fastProvisioningSupported property: Gets a value indicating whether fast provisioning is supported. - * "Enabled" means fast provisioning is supported. "Disabled" stands for fast provisioning is not supported. Will be - * deprecated in future, please look to Supported Features for "FastProvisioning". - * - * @return the fastProvisioningSupported value. - */ - FastProvisioningSupportedEnum fastProvisioningSupported(); - - /** - * Gets the supportedFastProvisioningEditions property: List of supported server editions for fast provisioning. - * - * @return the supportedFastProvisioningEditions value. - */ - List supportedFastProvisioningEditions(); - - /** - * Gets the geoBackupSupported property: Determines if geo-backup is supported in this region. "Enabled" means - * geo-backup is supported. "Disabled" stands for geo-back is not supported. Will be deprecated in future, please - * look to Supported Features for "GeoBackup". - * - * @return the geoBackupSupported value. - */ - GeoBackupSupportedEnum geoBackupSupported(); - - /** - * Gets the zoneRedundantHaSupported property: A value indicating whether Zone Redundant HA is supported in this - * region. "Enabled" means zone redundant HA is supported. "Disabled" stands for zone redundant HA is not supported. - * Will be deprecated in future, please look to Supported Features for "ZoneRedundantHa". - * - * @return the zoneRedundantHaSupported value. - */ - ZoneRedundantHaSupportedEnum zoneRedundantHaSupported(); - - /** - * Gets the zoneRedundantHaAndGeoBackupSupported property: A value indicating whether Zone Redundant HA and - * Geo-backup is supported in this region. "Enabled" means zone redundant HA and geo-backup is supported. "Disabled" - * stands for zone redundant HA and geo-backup is not supported. Will be deprecated in future, please look to - * Supported Features for "ZoneRedundantHaAndGeoBackup". - * - * @return the zoneRedundantHaAndGeoBackupSupported value. - */ - ZoneRedundantHaAndGeoBackupSupportedEnum zoneRedundantHaAndGeoBackupSupported(); - - /** - * Gets the storageAutoGrowthSupported property: A value indicating whether storage auto-grow is supported in this - * region. "Enabled" means storage auto-grow is supported. "Disabled" stands for storage auto-grow is not supported. - * Will be deprecated in future, please look to Supported Features for "StorageAutoGrowth". - * - * @return the storageAutoGrowthSupported value. - */ - StorageAutoGrowthSupportedEnum storageAutoGrowthSupported(); - - /** - * Gets the onlineResizeSupported property: A value indicating whether online resize is supported in this region for - * the given subscription. "Enabled" means storage online resize is supported. "Disabled" means storage online - * resize is not supported. Will be deprecated in future, please look to Supported Features for "OnlineResize". - * - * @return the onlineResizeSupported value. - */ - OnlineResizeSupportedEnum onlineResizeSupported(); - - /** - * Gets the restricted property: A value indicating whether this region is restricted. "Enabled" means region is - * restricted. "Disabled" stands for region is not restricted. Will be deprecated in future, please look to - * Supported Features for "Restricted". - * - * @return the restricted value. - */ - RestrictedEnum restricted(); - - /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner - * object. - * - * @return the inner object. - */ - FlexibleServerCapabilityInner innerModel(); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServers.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServers.java deleted file mode 100644 index 13446d1eae74..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServers.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of FlexibleServers. - */ -public interface FlexibleServers { - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR pre-backup API call. - */ - Response triggerLtrPreBackupWithResponse(String resourceGroupName, String serverName, - LtrPreBackupRequest parameters, Context context); - - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR pre-backup API call. - */ - LtrPreBackupResponse triggerLtrPreBackup(String resourceGroupName, String serverName, - LtrPreBackupRequest parameters); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call. - */ - LtrBackupResponse startLtrBackup(String resourceGroupName, String serverName, LtrBackupRequest parameters); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call. - */ - LtrBackupResponse startLtrBackup(String resourceGroupName, String serverName, LtrBackupRequest parameters, - Context context); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoBackupSupportedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoBackupSupportedEnum.java deleted file mode 100644 index 8c098fa8361f..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoBackupSupportedEnum.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Determines if geo-backup is supported in this region. "Enabled" means geo-backup is supported. "Disabled" stands for - * geo-back is not supported. Will be deprecated in future, please look to Supported Features for "GeoBackup". - */ -public final class GeoBackupSupportedEnum extends ExpandableStringEnum { - /** - * Static value Enabled for GeoBackupSupportedEnum. - */ - public static final GeoBackupSupportedEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for GeoBackupSupportedEnum. - */ - public static final GeoBackupSupportedEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of GeoBackupSupportedEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public GeoBackupSupportedEnum() { - } - - /** - * Creates or finds a GeoBackupSupportedEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding GeoBackupSupportedEnum. - */ - public static GeoBackupSupportedEnum fromString(String name) { - return fromString(name, GeoBackupSupportedEnum.class); - } - - /** - * Gets known GeoBackupSupportedEnum values. - * - * @return known GeoBackupSupportedEnum values. - */ - public static Collection values() { - return values(GeoBackupSupportedEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoRedundantBackupEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoRedundantBackupEnum.java deleted file mode 100644 index d6a4d2d77497..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoRedundantBackupEnum.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether Geo-Redundant backup is enabled on the server. - */ -public final class GeoRedundantBackupEnum extends ExpandableStringEnum { - /** - * Static value Enabled for GeoRedundantBackupEnum. - */ - public static final GeoRedundantBackupEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for GeoRedundantBackupEnum. - */ - public static final GeoRedundantBackupEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of GeoRedundantBackupEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public GeoRedundantBackupEnum() { - } - - /** - * Creates or finds a GeoRedundantBackupEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding GeoRedundantBackupEnum. - */ - public static GeoRedundantBackupEnum fromString(String name) { - return fromString(name, GeoRedundantBackupEnum.class); - } - - /** - * Gets known GeoRedundantBackupEnum values. - * - * @return known GeoRedundantBackupEnum values. - */ - public static Collection values() { - return values(GeoRedundantBackupEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackup.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackup.java new file mode 100644 index 000000000000..c3c6f75a9862 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackup.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.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if the server is configured to create geographically redundant backups. + */ +public final class GeographicallyRedundantBackup extends ExpandableStringEnum { + /** + * Static value Enabled for GeographicallyRedundantBackup. + */ + public static final GeographicallyRedundantBackup ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for GeographicallyRedundantBackup. + */ + public static final GeographicallyRedundantBackup DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of GeographicallyRedundantBackup value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GeographicallyRedundantBackup() { + } + + /** + * Creates or finds a GeographicallyRedundantBackup from its string representation. + * + * @param name a name to look for. + * @return the corresponding GeographicallyRedundantBackup. + */ + public static GeographicallyRedundantBackup fromString(String name) { + return fromString(name, GeographicallyRedundantBackup.class); + } + + /** + * Gets known GeographicallyRedundantBackup values. + * + * @return known GeographicallyRedundantBackup values. + */ + public static Collection values() { + return values(GeographicallyRedundantBackup.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackupSupport.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackupSupport.java new file mode 100644 index 000000000000..a6ecc45998b8 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackupSupport.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if geographically redundant backups are supported in this location. 'Enabled' means geographically + * redundant backups are supported. 'Disabled' stands for geographically redundant backup is not supported. Will be + * deprecated in the future. Look to Supported Features for 'GeoBackup'. + */ +public final class GeographicallyRedundantBackupSupport + extends ExpandableStringEnum { + /** + * Static value Enabled for GeographicallyRedundantBackupSupport. + */ + public static final GeographicallyRedundantBackupSupport ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for GeographicallyRedundantBackupSupport. + */ + public static final GeographicallyRedundantBackupSupport DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of GeographicallyRedundantBackupSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GeographicallyRedundantBackupSupport() { + } + + /** + * Creates or finds a GeographicallyRedundantBackupSupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding GeographicallyRedundantBackupSupport. + */ + public static GeographicallyRedundantBackupSupport fromString(String name) { + return fromString(name, GeographicallyRedundantBackupSupport.class); + } + + /** + * Gets known GeographicallyRedundantBackupSupport values. + * + * @return known GeographicallyRedundantBackupSupport values. + */ + public static Collection values() { + return values(GeographicallyRedundantBackupSupport.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HaMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HaMode.java deleted file mode 100644 index bef85a725c03..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HaMode.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * HA mode supported for a server. - */ -public final class HaMode extends ExpandableStringEnum { - /** - * Static value SameZone for HaMode. - */ - public static final HaMode SAME_ZONE = fromString("SameZone"); - - /** - * Static value ZoneRedundant for HaMode. - */ - public static final HaMode ZONE_REDUNDANT = fromString("ZoneRedundant"); - - /** - * Creates a new instance of HaMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public HaMode() { - } - - /** - * Creates or finds a HaMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding HaMode. - */ - public static HaMode fromString(String name) { - return fromString(name, HaMode.class); - } - - /** - * Gets known HaMode values. - * - * @return known HaMode values. - */ - public static Collection values() { - return values(HaMode.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailability.java index 0319da6d63a5..59b76abe5bf5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailability.java @@ -17,17 +17,18 @@ @Fluent public final class HighAvailability implements JsonSerializable { /* - * The HA mode for the server. + * High availability mode for a server. */ private HighAvailabilityMode mode; /* - * A state of a HA server that is visible to user. + * Possible states of the standby server created when high availability is set to SameZone or ZoneRedundant. */ - private ServerHAState state; + private HighAvailabilityState state; /* - * availability zone information of the standby. + * Availability zone associated to the standby server created when high availability is set to SameZone or + * ZoneRedundant. */ private String standbyAvailabilityZone; @@ -38,7 +39,7 @@ public HighAvailability() { } /** - * Get the mode property: The HA mode for the server. + * Get the mode property: High availability mode for a server. * * @return the mode value. */ @@ -47,7 +48,7 @@ public HighAvailabilityMode mode() { } /** - * Set the mode property: The HA mode for the server. + * Set the mode property: High availability mode for a server. * * @param mode the mode value to set. * @return the HighAvailability object itself. @@ -58,16 +59,18 @@ public HighAvailability withMode(HighAvailabilityMode mode) { } /** - * Get the state property: A state of a HA server that is visible to user. + * Get the state property: Possible states of the standby server created when high availability is set to SameZone + * or ZoneRedundant. * * @return the state value. */ - public ServerHAState state() { + public HighAvailabilityState state() { return this.state; } /** - * Get the standbyAvailabilityZone property: availability zone information of the standby. + * Get the standbyAvailabilityZone property: Availability zone associated to the standby server created when high + * availability is set to SameZone or ZoneRedundant. * * @return the standbyAvailabilityZone value. */ @@ -76,7 +79,8 @@ public String standbyAvailabilityZone() { } /** - * Set the standbyAvailabilityZone property: availability zone information of the standby. + * Set the standbyAvailabilityZone property: Availability zone associated to the standby server created when high + * availability is set to SameZone or ZoneRedundant. * * @param standbyAvailabilityZone the standbyAvailabilityZone value to set. * @return the HighAvailability object itself. @@ -123,7 +127,7 @@ public static HighAvailability fromJson(JsonReader jsonReader) throws IOExceptio if ("mode".equals(fieldName)) { deserializedHighAvailability.mode = HighAvailabilityMode.fromString(reader.getString()); } else if ("state".equals(fieldName)) { - deserializedHighAvailability.state = ServerHAState.fromString(reader.getString()); + deserializedHighAvailability.state = HighAvailabilityState.fromString(reader.getString()); } else if ("standbyAvailabilityZone".equals(fieldName)) { deserializedHighAvailability.standbyAvailabilityZone = reader.getString(); } else { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityForPatch.java new file mode 100644 index 000000000000..f64ceb4d681e --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityForPatch.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * High availability properties of a server. + */ +@Fluent +public final class HighAvailabilityForPatch implements JsonSerializable { + /* + * High availability mode for a server. + */ + private HighAvailabilityMode mode; + + /* + * Possible states of the standby server created when high availability is set to SameZone or ZoneRedundant. + */ + private HighAvailabilityState state; + + /* + * Availability zone associated to the standby server created when high availability is set to SameZone or + * ZoneRedundant. + */ + private String standbyAvailabilityZone; + + /** + * Creates an instance of HighAvailabilityForPatch class. + */ + public HighAvailabilityForPatch() { + } + + /** + * Get the mode property: High availability mode for a server. + * + * @return the mode value. + */ + public HighAvailabilityMode mode() { + return this.mode; + } + + /** + * Set the mode property: High availability mode for a server. + * + * @param mode the mode value to set. + * @return the HighAvailabilityForPatch object itself. + */ + public HighAvailabilityForPatch withMode(HighAvailabilityMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the state property: Possible states of the standby server created when high availability is set to SameZone + * or ZoneRedundant. + * + * @return the state value. + */ + public HighAvailabilityState state() { + return this.state; + } + + /** + * Get the standbyAvailabilityZone property: Availability zone associated to the standby server created when high + * availability is set to SameZone or ZoneRedundant. + * + * @return the standbyAvailabilityZone value. + */ + public String standbyAvailabilityZone() { + return this.standbyAvailabilityZone; + } + + /** + * Set the standbyAvailabilityZone property: Availability zone associated to the standby server created when high + * availability is set to SameZone or ZoneRedundant. + * + * @param standbyAvailabilityZone the standbyAvailabilityZone value to set. + * @return the HighAvailabilityForPatch object itself. + */ + public HighAvailabilityForPatch withStandbyAvailabilityZone(String standbyAvailabilityZone) { + this.standbyAvailabilityZone = standbyAvailabilityZone; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("standbyAvailabilityZone", this.standbyAvailabilityZone); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HighAvailabilityForPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HighAvailabilityForPatch if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the HighAvailabilityForPatch. + */ + public static HighAvailabilityForPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HighAvailabilityForPatch deserializedHighAvailabilityForPatch = new HighAvailabilityForPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mode".equals(fieldName)) { + deserializedHighAvailabilityForPatch.mode = HighAvailabilityMode.fromString(reader.getString()); + } else if ("state".equals(fieldName)) { + deserializedHighAvailabilityForPatch.state = HighAvailabilityState.fromString(reader.getString()); + } else if ("standbyAvailabilityZone".equals(fieldName)) { + deserializedHighAvailabilityForPatch.standbyAvailabilityZone = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedHighAvailabilityForPatch; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityMode.java index 6158bbda2201..6117de1a790b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityMode.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityMode.java @@ -8,14 +8,9 @@ import java.util.Collection; /** - * The HA mode for the server. + * Modes of high availability supported for this compute. */ public final class HighAvailabilityMode extends ExpandableStringEnum { - /** - * Static value Disabled for HighAvailabilityMode. - */ - public static final HighAvailabilityMode DISABLED = fromString("Disabled"); - /** * Static value ZoneRedundant for HighAvailabilityMode. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityState.java new file mode 100644 index 000000000000..73e7dc953615 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Possible states of the standby server created when high availability is set to SameZone or ZoneRedundant. + */ +public final class HighAvailabilityState extends ExpandableStringEnum { + /** + * Static value NotEnabled for HighAvailabilityState. + */ + public static final HighAvailabilityState NOT_ENABLED = fromString("NotEnabled"); + + /** + * Static value CreatingStandby for HighAvailabilityState. + */ + public static final HighAvailabilityState CREATING_STANDBY = fromString("CreatingStandby"); + + /** + * Static value ReplicatingData for HighAvailabilityState. + */ + public static final HighAvailabilityState REPLICATING_DATA = fromString("ReplicatingData"); + + /** + * Static value FailingOver for HighAvailabilityState. + */ + public static final HighAvailabilityState FAILING_OVER = fromString("FailingOver"); + + /** + * Static value Healthy for HighAvailabilityState. + */ + public static final HighAvailabilityState HEALTHY = fromString("Healthy"); + + /** + * Static value RemovingStandby for HighAvailabilityState. + */ + public static final HighAvailabilityState REMOVING_STANDBY = fromString("RemovingStandby"); + + /** + * Creates a new instance of HighAvailabilityState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HighAvailabilityState() { + } + + /** + * Creates or finds a HighAvailabilityState from its string representation. + * + * @param name a name to look for. + * @return the corresponding HighAvailabilityState. + */ + public static HighAvailabilityState fromString(String name) { + return fromString(name, HighAvailabilityState.class); + } + + /** + * Gets known HighAvailabilityState values. + * + * @return known HighAvailabilityState values. + */ + public static Collection values() { + return values(HighAvailabilityState.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IdentityType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IdentityType.java index 0312b15e90dd..ec0666c6b94b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IdentityType.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IdentityType.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * the types of identities associated with this resource. + * Types of identities associated with a server. */ public final class IdentityType extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ImpactRecord.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ImpactRecord.java index 265cb23da1e5..7affd81ab870 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ImpactRecord.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ImpactRecord.java @@ -12,27 +12,27 @@ import java.io.IOException; /** - * Stores property that features impact on some metric if this recommended action is applied. + * Impact on some metric if this recommended action is applied. */ @Fluent public final class ImpactRecord implements JsonSerializable { /* - * Dimension name + * Dimension name. */ private String dimensionName; /* - * Dimension unit + * Dimension unit. */ private String unit; /* - * Optional property that can be used to store the QueryId if the metric is for a specific query. + * Optional property that can be used to store the identifier of the query, if the metric is for a specific query. */ private Long queryId; /* - * Absolute value + * Absolute value. */ private Double absoluteValue; @@ -83,8 +83,8 @@ public ImpactRecord withUnit(String unit) { } /** - * Get the queryId property: Optional property that can be used to store the QueryId if the metric is for a specific - * query. + * Get the queryId property: Optional property that can be used to store the identifier of the query, if the metric + * is for a specific query. * * @return the queryId value. */ @@ -93,8 +93,8 @@ public Long queryId() { } /** - * Set the queryId property: Optional property that can be used to store the QueryId if the metric is for a specific - * query. + * Set the queryId property: Optional property that can be used to store the identifier of the query, if the metric + * is for a specific query. * * @param queryId the queryId value to set. * @return the ImpactRecord object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationListResult.java deleted file mode 100644 index 1d7aaa653668..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationListResult.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.IndexRecommendationResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of available index recommendations. - */ -@Fluent -public final class IndexRecommendationListResult implements JsonSerializable { - /* - * A list of available index recommendations. - */ - private List value; - - /* - * URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - */ - private String nextLink; - - /** - * Creates an instance of IndexRecommendationListResult class. - */ - public IndexRecommendationListResult() { - } - - /** - * Get the value property: A list of available index recommendations. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of available index recommendations. - * - * @param value the value value to set. - * @return the IndexRecommendationListResult object itself. - */ - public IndexRecommendationListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - * - * @param nextLink the nextLink value to set. - * @return the IndexRecommendationListResult object itself. - */ - public IndexRecommendationListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IndexRecommendationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IndexRecommendationListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IndexRecommendationListResult. - */ - public static IndexRecommendationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IndexRecommendationListResult deserializedIndexRecommendationListResult - = new IndexRecommendationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> IndexRecommendationResourceInner.fromJson(reader1)); - deserializedIndexRecommendationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedIndexRecommendationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIndexRecommendationListResult; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/KeyStatusEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/KeyStatusEnum.java deleted file mode 100644 index d985ad1ea738..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/KeyStatusEnum.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Primary encryption key status for Data encryption enabled server. - */ -public final class KeyStatusEnum extends ExpandableStringEnum { - /** - * Static value Valid for KeyStatusEnum. - */ - public static final KeyStatusEnum VALID = fromString("Valid"); - - /** - * Static value Invalid for KeyStatusEnum. - */ - public static final KeyStatusEnum INVALID = fromString("Invalid"); - - /** - * Creates a new instance of KeyStatusEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public KeyStatusEnum() { - } - - /** - * Creates or finds a KeyStatusEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding KeyStatusEnum. - */ - public static KeyStatusEnum fromString(String name) { - return fromString(name, KeyStatusEnum.class); - } - - /** - * Gets known KeyStatusEnum values. - * - * @return known KeyStatusEnum values. - */ - public static Collection values() { - return values(KeyStatusEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationRestricted.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationRestricted.java new file mode 100644 index 000000000000..73cb1b16641b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationRestricted.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if this location is restricted. 'Enabled' means location is restricted. 'Disabled' stands for location is + * not restricted. Will be deprecated in the future. Look to Supported Features for 'Restricted'. + */ +public final class LocationRestricted extends ExpandableStringEnum { + /** + * Static value Enabled for LocationRestricted. + */ + public static final LocationRestricted ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for LocationRestricted. + */ + public static final LocationRestricted DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of LocationRestricted value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LocationRestricted() { + } + + /** + * Creates or finds a LocationRestricted from its string representation. + * + * @param name a name to look for. + * @return the corresponding LocationRestricted. + */ + public static LocationRestricted fromString(String name) { + return fromString(name, LocationRestricted.class); + } + + /** + * Gets known LocationRestricted values. + * + * @return known LocationRestricted values. + */ + public static Collection values() { + return values(LocationRestricted.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceDbEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceDbEnum.java deleted file mode 100644 index 20a461a8ba72..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceDbEnum.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Indicates whether to setup LogicalReplicationOnSourceDb, if needed. - */ -public final class LogicalReplicationOnSourceDbEnum extends ExpandableStringEnum { - /** - * Static value True for LogicalReplicationOnSourceDbEnum. - */ - public static final LogicalReplicationOnSourceDbEnum TRUE = fromString("True"); - - /** - * Static value False for LogicalReplicationOnSourceDbEnum. - */ - public static final LogicalReplicationOnSourceDbEnum FALSE = fromString("False"); - - /** - * Creates a new instance of LogicalReplicationOnSourceDbEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LogicalReplicationOnSourceDbEnum() { - } - - /** - * Creates or finds a LogicalReplicationOnSourceDbEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding LogicalReplicationOnSourceDbEnum. - */ - public static LogicalReplicationOnSourceDbEnum fromString(String name) { - return fromString(name, LogicalReplicationOnSourceDbEnum.class); - } - - /** - * Gets known LogicalReplicationOnSourceDbEnum values. - * - * @return known LogicalReplicationOnSourceDbEnum values. - */ - public static Collection values() { - return values(LogicalReplicationOnSourceDbEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceServer.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceServer.java new file mode 100644 index 000000000000..2a5ff6952fad --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceServer.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.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates whether to setup logical replication on source server, if needed. + */ +public final class LogicalReplicationOnSourceServer extends ExpandableStringEnum { + /** + * Static value True for LogicalReplicationOnSourceServer. + */ + public static final LogicalReplicationOnSourceServer TRUE = fromString("True"); + + /** + * Static value False for LogicalReplicationOnSourceServer. + */ + public static final LogicalReplicationOnSourceServer FALSE = fromString("False"); + + /** + * Creates a new instance of LogicalReplicationOnSourceServer value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LogicalReplicationOnSourceServer() { + } + + /** + * Creates or finds a LogicalReplicationOnSourceServer from its string representation. + * + * @param name a name to look for. + * @return the corresponding LogicalReplicationOnSourceServer. + */ + public static LogicalReplicationOnSourceServer fromString(String name) { + return fromString(name, LogicalReplicationOnSourceServer.class); + } + + /** + * Gets known LogicalReplicationOnSourceServer values. + * + * @return known LogicalReplicationOnSourceServer values. + */ + public static Collection values() { + return values(LogicalReplicationOnSourceServer.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperationList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperationList.java index f4976b432b29..6133a9998c8e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperationList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperationList.java @@ -9,7 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrServerBackupOperationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionOperationInner; import java.io.IOException; import java.util.List; @@ -21,7 +21,7 @@ public final class LtrServerBackupOperationList implements JsonSerializable value; + private List value; /* * The link used to get the next page of operations. @@ -39,7 +39,7 @@ public LtrServerBackupOperationList() { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -49,7 +49,7 @@ public List value() { * @param value the value value to set. * @return the LtrServerBackupOperationList object itself. */ - public LtrServerBackupOperationList withValue(List value) { + public LtrServerBackupOperationList withValue(List value) { this.value = value; return this; } @@ -112,8 +112,8 @@ public static LtrServerBackupOperationList fromJson(JsonReader jsonReader) throw reader.nextToken(); if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> LtrServerBackupOperationInner.fromJson(reader1)); + List value + = reader.readArray(reader1 -> BackupsLongTermRetentionOperationInner.fromJson(reader1)); deserializedLtrServerBackupOperationList.value = value; } else if ("nextLink".equals(fieldName)) { deserializedLtrServerBackupOperationList.nextLink = reader.getString(); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindow.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindow.java index 7e6bc5c89cf5..d087a803cf16 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindow.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindow.java @@ -17,22 +17,22 @@ @Fluent public final class MaintenanceWindow implements JsonSerializable { /* - * indicates whether custom window is enabled or disabled + * Indicates whether custom window is enabled or disabled. */ private String customWindow; /* - * start hour for maintenance window + * Start hour to be used for maintenance window. */ private Integer startHour; /* - * start minute for maintenance window + * Start minute to be used for maintenance window. */ private Integer startMinute; /* - * day of week for maintenance window + * Day of the week to be used for maintenance window. */ private Integer dayOfWeek; @@ -43,7 +43,7 @@ public MaintenanceWindow() { } /** - * Get the customWindow property: indicates whether custom window is enabled or disabled. + * Get the customWindow property: Indicates whether custom window is enabled or disabled. * * @return the customWindow value. */ @@ -52,7 +52,7 @@ public String customWindow() { } /** - * Set the customWindow property: indicates whether custom window is enabled or disabled. + * Set the customWindow property: Indicates whether custom window is enabled or disabled. * * @param customWindow the customWindow value to set. * @return the MaintenanceWindow object itself. @@ -63,7 +63,7 @@ public MaintenanceWindow withCustomWindow(String customWindow) { } /** - * Get the startHour property: start hour for maintenance window. + * Get the startHour property: Start hour to be used for maintenance window. * * @return the startHour value. */ @@ -72,7 +72,7 @@ public Integer startHour() { } /** - * Set the startHour property: start hour for maintenance window. + * Set the startHour property: Start hour to be used for maintenance window. * * @param startHour the startHour value to set. * @return the MaintenanceWindow object itself. @@ -83,7 +83,7 @@ public MaintenanceWindow withStartHour(Integer startHour) { } /** - * Get the startMinute property: start minute for maintenance window. + * Get the startMinute property: Start minute to be used for maintenance window. * * @return the startMinute value. */ @@ -92,7 +92,7 @@ public Integer startMinute() { } /** - * Set the startMinute property: start minute for maintenance window. + * Set the startMinute property: Start minute to be used for maintenance window. * * @param startMinute the startMinute value to set. * @return the MaintenanceWindow object itself. @@ -103,7 +103,7 @@ public MaintenanceWindow withStartMinute(Integer startMinute) { } /** - * Get the dayOfWeek property: day of week for maintenance window. + * Get the dayOfWeek property: Day of the week to be used for maintenance window. * * @return the dayOfWeek value. */ @@ -112,7 +112,7 @@ public Integer dayOfWeek() { } /** - * Set the dayOfWeek property: day of week for maintenance window. + * Set the dayOfWeek property: Day of the week to be used for maintenance window. * * @param dayOfWeek the dayOfWeek value to set. * @return the MaintenanceWindow object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindowForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindowForPatch.java new file mode 100644 index 000000000000..d9500a1d0df8 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindowForPatch.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Maintenance window properties of a server. + */ +@Fluent +public final class MaintenanceWindowForPatch implements JsonSerializable { + /* + * Indicates whether custom window is enabled or disabled. + */ + private String customWindow; + + /* + * Start hour to be used for maintenance window. + */ + private Integer startHour; + + /* + * Start minute to be used for maintenance window. + */ + private Integer startMinute; + + /* + * Day of the week to be used for maintenance window. + */ + private Integer dayOfWeek; + + /** + * Creates an instance of MaintenanceWindowForPatch class. + */ + public MaintenanceWindowForPatch() { + } + + /** + * Get the customWindow property: Indicates whether custom window is enabled or disabled. + * + * @return the customWindow value. + */ + public String customWindow() { + return this.customWindow; + } + + /** + * Set the customWindow property: Indicates whether custom window is enabled or disabled. + * + * @param customWindow the customWindow value to set. + * @return the MaintenanceWindowForPatch object itself. + */ + public MaintenanceWindowForPatch withCustomWindow(String customWindow) { + this.customWindow = customWindow; + return this; + } + + /** + * Get the startHour property: Start hour to be used for maintenance window. + * + * @return the startHour value. + */ + public Integer startHour() { + return this.startHour; + } + + /** + * Set the startHour property: Start hour to be used for maintenance window. + * + * @param startHour the startHour value to set. + * @return the MaintenanceWindowForPatch object itself. + */ + public MaintenanceWindowForPatch withStartHour(Integer startHour) { + this.startHour = startHour; + return this; + } + + /** + * Get the startMinute property: Start minute to be used for maintenance window. + * + * @return the startMinute value. + */ + public Integer startMinute() { + return this.startMinute; + } + + /** + * Set the startMinute property: Start minute to be used for maintenance window. + * + * @param startMinute the startMinute value to set. + * @return the MaintenanceWindowForPatch object itself. + */ + public MaintenanceWindowForPatch withStartMinute(Integer startMinute) { + this.startMinute = startMinute; + return this; + } + + /** + * Get the dayOfWeek property: Day of the week to be used for maintenance window. + * + * @return the dayOfWeek value. + */ + public Integer dayOfWeek() { + return this.dayOfWeek; + } + + /** + * Set the dayOfWeek property: Day of the week to be used for maintenance window. + * + * @param dayOfWeek the dayOfWeek value to set. + * @return the MaintenanceWindowForPatch object itself. + */ + public MaintenanceWindowForPatch withDayOfWeek(Integer dayOfWeek) { + this.dayOfWeek = dayOfWeek; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("customWindow", this.customWindow); + jsonWriter.writeNumberField("startHour", this.startHour); + jsonWriter.writeNumberField("startMinute", this.startMinute); + jsonWriter.writeNumberField("dayOfWeek", this.dayOfWeek); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceWindowForPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceWindowForPatch if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MaintenanceWindowForPatch. + */ + public static MaintenanceWindowForPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceWindowForPatch deserializedMaintenanceWindowForPatch = new MaintenanceWindowForPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("customWindow".equals(fieldName)) { + deserializedMaintenanceWindowForPatch.customWindow = reader.getString(); + } else if ("startHour".equals(fieldName)) { + deserializedMaintenanceWindowForPatch.startHour = reader.getNullable(JsonReader::getInt); + } else if ("startMinute".equals(fieldName)) { + deserializedMaintenanceWindowForPatch.startMinute = reader.getNullable(JsonReader::getInt); + } else if ("dayOfWeek".equals(fieldName)) { + deserializedMaintenanceWindowForPatch.dayOfWeek = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceWindowForPatch; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MicrosoftEntraAuth.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MicrosoftEntraAuth.java new file mode 100644 index 000000000000..a0d8b3f75413 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MicrosoftEntraAuth.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.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if the server supports Microsoft Entra authentication. + */ +public final class MicrosoftEntraAuth extends ExpandableStringEnum { + /** + * Static value Enabled for MicrosoftEntraAuth. + */ + public static final MicrosoftEntraAuth ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for MicrosoftEntraAuth. + */ + public static final MicrosoftEntraAuth DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of MicrosoftEntraAuth value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MicrosoftEntraAuth() { + } + + /** + * Creates or finds a MicrosoftEntraAuth from its string representation. + * + * @param name a name to look for. + * @return the corresponding MicrosoftEntraAuth. + */ + public static MicrosoftEntraAuth fromString(String name) { + return fromString(name, MicrosoftEntraAuth.class); + } + + /** + * Gets known MicrosoftEntraAuth values. + * + * @return known MicrosoftEntraAuth values. + */ + public static Collection values() { + return values(MicrosoftEntraAuth.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesAndPermissions.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesAndPermissions.java new file mode 100644 index 000000000000..ebb6f01ffa17 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesAndPermissions.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.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if roles and permissions must be migrated. + */ +public final class MigrateRolesAndPermissions extends ExpandableStringEnum { + /** + * Static value True for MigrateRolesAndPermissions. + */ + public static final MigrateRolesAndPermissions TRUE = fromString("True"); + + /** + * Static value False for MigrateRolesAndPermissions. + */ + public static final MigrateRolesAndPermissions FALSE = fromString("False"); + + /** + * Creates a new instance of MigrateRolesAndPermissions value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MigrateRolesAndPermissions() { + } + + /** + * Creates or finds a MigrateRolesAndPermissions from its string representation. + * + * @param name a name to look for. + * @return the corresponding MigrateRolesAndPermissions. + */ + public static MigrateRolesAndPermissions fromString(String name) { + return fromString(name, MigrateRolesAndPermissions.class); + } + + /** + * Gets known MigrateRolesAndPermissions values. + * + * @return known MigrateRolesAndPermissions values. + */ + public static Collection values() { + return values(MigrateRolesAndPermissions.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesEnum.java deleted file mode 100644 index ae42c71581ec..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesEnum.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * To migrate roles and permissions we need to send this flag as True. - */ -public final class MigrateRolesEnum extends ExpandableStringEnum { - /** - * Static value True for MigrateRolesEnum. - */ - public static final MigrateRolesEnum TRUE = fromString("True"); - - /** - * Static value False for MigrateRolesEnum. - */ - public static final MigrateRolesEnum FALSE = fromString("False"); - - /** - * Creates a new instance of MigrateRolesEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MigrateRolesEnum() { - } - - /** - * Creates or finds a MigrateRolesEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding MigrateRolesEnum. - */ - public static MigrateRolesEnum fromString(String name) { - return fromString(name, MigrateRolesEnum.class); - } - - /** - * Gets known MigrateRolesEnum values. - * - * @return known MigrateRolesEnum values. - */ - public static Collection values() { - return values(MigrateRolesEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResource.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migration.java similarity index 51% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResource.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migration.java index c181239fecb1..e52bcb7ed10e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResource.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migration.java @@ -7,15 +7,15 @@ import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** - * An immutable client-side representation of MigrationResource. + * An immutable client-side representation of Migration. */ -public interface MigrationResource { +public interface Migration { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -59,76 +59,75 @@ public interface MigrationResource { SystemData systemData(); /** - * Gets the migrationId property: ID for migration, a GUID. + * Gets the migrationId property: Identifier of a migration. * * @return the migrationId value. */ String migrationId(); /** - * Gets the currentStatus property: Current status of migration. + * Gets the currentStatus property: Current status of a migration. * * @return the currentStatus value. */ MigrationStatus currentStatus(); /** - * Gets the migrationInstanceResourceId property: ResourceId of the private endpoint migration instance. + * Gets the migrationInstanceResourceId property: Identifier of the private endpoint migration instance. * * @return the migrationInstanceResourceId value. */ String migrationInstanceResourceId(); /** - * Gets the migrationMode property: There are two types of migration modes Online and Offline. + * Gets the migrationMode property: Mode used to perform the migration: Online or Offline. * * @return the migrationMode value. */ MigrationMode migrationMode(); /** - * Gets the migrationOption property: This indicates the supported Migration option for the migration. + * Gets the migrationOption property: Supported option for a migration. * * @return the migrationOption value. */ MigrationOption migrationOption(); /** - * Gets the sourceType property: migration source server type : OnPremises, AWS, GCP, AzureVM, - * PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, - * EDB_Oracle_Server, EDB_PostgreSQL, PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, - * Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or - * Supabase_PostgreSQL. + * Gets the sourceType property: Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, + * AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, + * EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, + * OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL. * * @return the sourceType value. */ SourceType sourceType(); /** - * Gets the sslMode property: SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and - * Prefer for other source types. + * Gets the sslMode property: SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is + * 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. * * @return the sslMode value. */ SslMode sslMode(); /** - * Gets the sourceDbServerMetadata property: Metadata of the source database server. + * Gets the sourceDbServerMetadata property: Metadata of source database server. * * @return the sourceDbServerMetadata value. */ DbServerMetadata sourceDbServerMetadata(); /** - * Gets the targetDbServerMetadata property: Metadata of the target database server. + * Gets the targetDbServerMetadata property: Metadata of target database server. * * @return the targetDbServerMetadata value. */ DbServerMetadata targetDbServerMetadata(); /** - * Gets the sourceDbServerResourceId property: ResourceId of the source database server in case the sourceType is - * PostgreSQLSingleServer. For other source types this should be ipaddress:port@username or + * Gets the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or * hostname:port@username. * * @return the sourceDbServerResourceId value. @@ -136,23 +135,25 @@ public interface MigrationResource { String sourceDbServerResourceId(); /** - * Gets the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Gets the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @return the sourceDbServerFullyQualifiedDomainName value. */ String sourceDbServerFullyQualifiedDomainName(); /** - * Gets the targetDbServerResourceId property: ResourceId of the source database server. + * Gets the targetDbServerResourceId property: Identifier of the target database server resource. * * @return the targetDbServerResourceId value. */ String targetDbServerResourceId(); /** - * Gets the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Gets the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @return the targetDbServerFullyQualifiedDomainName value. */ @@ -166,82 +167,82 @@ public interface MigrationResource { MigrationSecretParameters secretParameters(); /** - * Gets the dbsToMigrate property: Number of databases to migrate. + * Gets the dbsToMigrate property: Names of databases to migrate. * * @return the dbsToMigrate value. */ List dbsToMigrate(); /** - * Gets the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Gets the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @return the setupLogicalReplicationOnSourceDbIfNeeded value. */ - LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded(); + LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded(); /** - * Gets the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Gets the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @return the overwriteDbsInTarget value. */ - OverwriteDbsInTargetEnum overwriteDbsInTarget(); + OverwriteDatabasesOnTargetServer overwriteDbsInTarget(); /** - * Gets the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Gets the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @return the migrationWindowStartTimeInUtc value. */ OffsetDateTime migrationWindowStartTimeInUtc(); /** - * Gets the migrationWindowEndTimeInUtc property: End time in UTC for migration window. + * Gets the migrationWindowEndTimeInUtc property: End time (UTC) for migration window. * * @return the migrationWindowEndTimeInUtc value. */ OffsetDateTime migrationWindowEndTimeInUtc(); /** - * Gets the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Gets the migrateRoles property: Indicates if roles and permissions must be migrated. * * @return the migrateRoles value. */ - MigrateRolesEnum migrateRoles(); + MigrateRolesAndPermissions migrateRoles(); /** - * Gets the startDataMigration property: Indicates whether the data migration should start right away. + * Gets the startDataMigration property: Indicates if data migration must start right away. * * @return the startDataMigration value. */ - StartDataMigrationEnum startDataMigration(); + StartDataMigration startDataMigration(); /** - * Gets the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Gets the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @return the triggerCutover value. */ - TriggerCutoverEnum triggerCutover(); + TriggerCutover triggerCutover(); /** - * Gets the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Gets the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToTriggerCutoverOn value. */ List dbsToTriggerCutoverOn(); /** - * Gets the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Gets the cancel property: Indicates if cancel must be triggered for the entire migration. * * @return the cancel value. */ - CancelEnum cancel(); + Cancel cancel(); /** - * Gets the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Gets the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToCancelMigrationOn value. */ @@ -269,31 +270,31 @@ public interface MigrationResource { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourceInner object. + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner object. * * @return the inner object. */ - MigrationResourceInner innerModel(); + MigrationInner innerModel(); /** - * The entirety of the MigrationResource definition. + * The entirety of the Migration definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } /** - * The MigrationResource definition stages. + * The Migration definition stages. */ interface DefinitionStages { /** - * The first stage of the MigrationResource definition. + * The first stage of the Migration definition. */ interface Blank extends WithLocation { } /** - * The stage of the MigrationResource definition allowing to specify location. + * The stage of the Migration definition allowing to specify location. */ interface WithLocation { /** @@ -314,24 +315,22 @@ interface WithLocation { } /** - * The stage of the MigrationResource definition allowing to specify parent resource. + * The stage of the Migration definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies subscriptionId, resourceGroupName, targetDbServerName. + * Specifies resourceGroupName, serverName. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. * @return the next definition stage. */ - WithCreate withExistingFlexibleServer(String subscriptionId, String resourceGroupName, - String targetDbServerName); + WithCreate withExistingFlexibleServer(String resourceGroupName, String serverName); } /** - * The stage of the MigrationResource definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. + * The stage of the Migration definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. */ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithMigrationInstanceResourceId, DefinitionStages.WithMigrationMode, DefinitionStages.WithMigrationOption, DefinitionStages.WithSourceType, @@ -349,7 +348,7 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithMig * * @return the created resource. */ - MigrationResource create(); + Migration create(); /** * Executes the create request. @@ -357,11 +356,11 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithMig * @param context The context to associate with this operation. * @return the created resource. */ - MigrationResource create(Context context); + Migration create(Context context); } /** - * The stage of the MigrationResource definition allowing to specify tags. + * The stage of the Migration definition allowing to specify tags. */ interface WithTags { /** @@ -374,92 +373,92 @@ interface WithTags { } /** - * The stage of the MigrationResource definition allowing to specify migrationInstanceResourceId. + * The stage of the Migration definition allowing to specify migrationInstanceResourceId. */ interface WithMigrationInstanceResourceId { /** - * Specifies the migrationInstanceResourceId property: ResourceId of the private endpoint migration - * instance. + * Specifies the migrationInstanceResourceId property: Identifier of the private endpoint migration + * instance.. * - * @param migrationInstanceResourceId ResourceId of the private endpoint migration instance. + * @param migrationInstanceResourceId Identifier of the private endpoint migration instance. * @return the next definition stage. */ WithCreate withMigrationInstanceResourceId(String migrationInstanceResourceId); } /** - * The stage of the MigrationResource definition allowing to specify migrationMode. + * The stage of the Migration definition allowing to specify migrationMode. */ interface WithMigrationMode { /** - * Specifies the migrationMode property: There are two types of migration modes Online and Offline. + * Specifies the migrationMode property: Mode used to perform the migration: Online or Offline.. * - * @param migrationMode There are two types of migration modes Online and Offline. + * @param migrationMode Mode used to perform the migration: Online or Offline. * @return the next definition stage. */ WithCreate withMigrationMode(MigrationMode migrationMode); } /** - * The stage of the MigrationResource definition allowing to specify migrationOption. + * The stage of the Migration definition allowing to specify migrationOption. */ interface WithMigrationOption { /** - * Specifies the migrationOption property: This indicates the supported Migration option for the migration. + * Specifies the migrationOption property: Supported option for a migration.. * - * @param migrationOption This indicates the supported Migration option for the migration. + * @param migrationOption Supported option for a migration. * @return the next definition stage. */ WithCreate withMigrationOption(MigrationOption migrationOption); } /** - * The stage of the MigrationResource definition allowing to specify sourceType. + * The stage of the Migration definition allowing to specify sourceType. */ interface WithSourceType { /** - * Specifies the sourceType property: migration source server type : OnPremises, AWS, GCP, AzureVM, - * PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, - * EDB_Oracle_Server, EDB_PostgreSQL, PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, - * Huawei_Compute, Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, Digital_Ocean_Droplets, - * Digital_Ocean_PostgreSQL, or Supabase_PostgreSQL. + * Specifies the sourceType property: Source server type used for the migration: ApsaraDB_RDS, AWS, + * AWS_AURORA, AWS_EC2, AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, + * Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, + * GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, OnPremises, PostgreSQLCosmosDB, + * PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL. * - * @param sourceType migration source server type : OnPremises, AWS, GCP, AzureVM, PostgreSQLSingleServer, - * AWS_RDS, AWS_AURORA, AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, EDB_Oracle_Server, - * EDB_PostgreSQL, PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, - * Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or - * Supabase_PostgreSQL. + * @param sourceType Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, + * AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, + * EDB_Oracle_Server, EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, + * Huawei_Compute, Huawei_RDS, OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, + * PostgreSQLSingleServer, or Supabase_PostgreSQL. * @return the next definition stage. */ WithCreate withSourceType(SourceType sourceType); } /** - * The stage of the MigrationResource definition allowing to specify sslMode. + * The stage of the Migration definition allowing to specify sslMode. */ interface WithSslMode { /** - * Specifies the sslMode property: SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is - * VerifyFull and Prefer for other source types. + * Specifies the sslMode property: SSL mode used by a migration. Default SSL mode for + * 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for other source types is 'Prefer'.. * - * @param sslMode SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and - * Prefer for other source types. + * @param sslMode SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is + * 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. * @return the next definition stage. */ WithCreate withSslMode(SslMode sslMode); } /** - * The stage of the MigrationResource definition allowing to specify sourceDbServerResourceId. + * The stage of the Migration definition allowing to specify sourceDbServerResourceId. */ interface WithSourceDbServerResourceId { /** - * Specifies the sourceDbServerResourceId property: ResourceId of the source database server in case the - * sourceType is PostgreSQLSingleServer. For other source types this should be ipaddress:port@username - * or hostname:port@username. + * Specifies the sourceDbServerResourceId property: Identifier of the source database server resource, when + * 'sourceType' is 'PostgreSQLSingleServer'. For other source types this must be set to + * ipaddress:port@username or hostname:port@username.. * - * @param sourceDbServerResourceId ResourceId of the source database server in case the sourceType is - * PostgreSQLSingleServer. For other source types this should be ipaddress:port@username or + * @param sourceDbServerResourceId Identifier of the source database server resource, when 'sourceType' is + * 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or * hostname:port@username. * @return the next definition stage. */ @@ -467,45 +466,45 @@ interface WithSourceDbServerResourceId { } /** - * The stage of the MigrationResource definition allowing to specify sourceDbServerFullyQualifiedDomainName. + * The stage of the Migration definition allowing to specify sourceDbServerFullyQualifiedDomainName. */ interface WithSourceDbServerFullyQualifiedDomainName { /** - * Specifies the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name - * (FQDN) or IP address. It is a optional value, if customer provide it, migration service will always use - * it for connection. + * Specifies the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP + * address of the source server. This property is optional. When provided, the migration service will always + * use it to connect to the source server.. * - * @param sourceDbServerFullyQualifiedDomainName Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for - * connection. + * @param sourceDbServerFullyQualifiedDomainName Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to + * connect to the source server. * @return the next definition stage. */ WithCreate withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName); } /** - * The stage of the MigrationResource definition allowing to specify targetDbServerFullyQualifiedDomainName. + * The stage of the Migration definition allowing to specify targetDbServerFullyQualifiedDomainName. */ interface WithTargetDbServerFullyQualifiedDomainName { /** - * Specifies the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name - * (FQDN) or IP address. It is a optional value, if customer provide it, migration service will always use - * it for connection. + * Specifies the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP + * address of the target server. This property is optional. When provided, the migration service will always + * use it to connect to the target server.. * - * @param targetDbServerFullyQualifiedDomainName Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for - * connection. + * @param targetDbServerFullyQualifiedDomainName Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to + * connect to the target server. * @return the next definition stage. */ WithCreate withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName); } /** - * The stage of the MigrationResource definition allowing to specify secretParameters. + * The stage of the Migration definition allowing to specify secretParameters. */ interface WithSecretParameters { /** - * Specifies the secretParameters property: Migration secret parameters. + * Specifies the secretParameters property: Migration secret parameters.. * * @param secretParameters Migration secret parameters. * @return the next definition stage. @@ -514,155 +513,154 @@ interface WithSecretParameters { } /** - * The stage of the MigrationResource definition allowing to specify dbsToMigrate. + * The stage of the Migration definition allowing to specify dbsToMigrate. */ interface WithDbsToMigrate { /** - * Specifies the dbsToMigrate property: Number of databases to migrate. + * Specifies the dbsToMigrate property: Names of databases to migrate.. * - * @param dbsToMigrate Number of databases to migrate. + * @param dbsToMigrate Names of databases to migrate. * @return the next definition stage. */ WithCreate withDbsToMigrate(List dbsToMigrate); } /** - * The stage of the MigrationResource definition allowing to specify setupLogicalReplicationOnSourceDbIfNeeded. + * The stage of the Migration definition allowing to specify setupLogicalReplicationOnSourceDbIfNeeded. */ interface WithSetupLogicalReplicationOnSourceDbIfNeeded { /** - * Specifies the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Specifies the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical + * replication on source server, if needed.. * - * @param setupLogicalReplicationOnSourceDbIfNeeded Indicates whether to setup LogicalReplicationOnSourceDb, - * if needed. + * @param setupLogicalReplicationOnSourceDbIfNeeded Indicates whether to setup logical replication on source + * server, if needed. * @return the next definition stage. */ WithCreate withSetupLogicalReplicationOnSourceDbIfNeeded( - LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded); + LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded); } /** - * The stage of the MigrationResource definition allowing to specify overwriteDbsInTarget. + * The stage of the Migration definition allowing to specify overwriteDbsInTarget. */ interface WithOverwriteDbsInTarget { /** - * Specifies the overwriteDbsInTarget property: Indicates whether the databases on the target server can be - * overwritten, if already present. If set to False, the migration workflow will wait for a confirmation, if - * it detects that the database already exists.. + * Specifies the overwriteDbsInTarget property: Indicates if databases on the target server can be + * overwritten when already present. If set to 'False', when the migration workflow detects that the + * database already exists on the target server, it will wait for a confirmation.. * - * @param overwriteDbsInTarget Indicates whether the databases on the target server can be overwritten, if - * already present. If set to False, the migration workflow will wait for a confirmation, if it detects that - * the database already exists. + * @param overwriteDbsInTarget Indicates if databases on the target server can be overwritten when already + * present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * @return the next definition stage. */ - WithCreate withOverwriteDbsInTarget(OverwriteDbsInTargetEnum overwriteDbsInTarget); + WithCreate withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer overwriteDbsInTarget); } /** - * The stage of the MigrationResource definition allowing to specify migrationWindowStartTimeInUtc. + * The stage of the Migration definition allowing to specify migrationWindowStartTimeInUtc. */ interface WithMigrationWindowStartTimeInUtc { /** - * Specifies the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Specifies the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window.. * - * @param migrationWindowStartTimeInUtc Start time in UTC for migration window. + * @param migrationWindowStartTimeInUtc Start time (UTC) for migration window. * @return the next definition stage. */ WithCreate withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc); } /** - * The stage of the MigrationResource definition allowing to specify migrationWindowEndTimeInUtc. + * The stage of the Migration definition allowing to specify migrationWindowEndTimeInUtc. */ interface WithMigrationWindowEndTimeInUtc { /** - * Specifies the migrationWindowEndTimeInUtc property: End time in UTC for migration window. + * Specifies the migrationWindowEndTimeInUtc property: End time (UTC) for migration window.. * - * @param migrationWindowEndTimeInUtc End time in UTC for migration window. + * @param migrationWindowEndTimeInUtc End time (UTC) for migration window. * @return the next definition stage. */ WithCreate withMigrationWindowEndTimeInUtc(OffsetDateTime migrationWindowEndTimeInUtc); } /** - * The stage of the MigrationResource definition allowing to specify migrateRoles. + * The stage of the Migration definition allowing to specify migrateRoles. */ interface WithMigrateRoles { /** - * Specifies the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Specifies the migrateRoles property: Indicates if roles and permissions must be migrated.. * - * @param migrateRoles To migrate roles and permissions we need to send this flag as True. + * @param migrateRoles Indicates if roles and permissions must be migrated. * @return the next definition stage. */ - WithCreate withMigrateRoles(MigrateRolesEnum migrateRoles); + WithCreate withMigrateRoles(MigrateRolesAndPermissions migrateRoles); } /** - * The stage of the MigrationResource definition allowing to specify startDataMigration. + * The stage of the Migration definition allowing to specify startDataMigration. */ interface WithStartDataMigration { /** - * Specifies the startDataMigration property: Indicates whether the data migration should start right away. + * Specifies the startDataMigration property: Indicates if data migration must start right away.. * - * @param startDataMigration Indicates whether the data migration should start right away. + * @param startDataMigration Indicates if data migration must start right away. * @return the next definition stage. */ - WithCreate withStartDataMigration(StartDataMigrationEnum startDataMigration); + WithCreate withStartDataMigration(StartDataMigration startDataMigration); } /** - * The stage of the MigrationResource definition allowing to specify triggerCutover. + * The stage of the Migration definition allowing to specify triggerCutover. */ interface WithTriggerCutover { /** - * Specifies the triggerCutover property: To trigger cutover for entire migration we need to send this flag - * as True. + * Specifies the triggerCutover property: Indicates if cutover must be triggered for the entire migration.. * - * @param triggerCutover To trigger cutover for entire migration we need to send this flag as True. + * @param triggerCutover Indicates if cutover must be triggered for the entire migration. * @return the next definition stage. */ - WithCreate withTriggerCutover(TriggerCutoverEnum triggerCutover); + WithCreate withTriggerCutover(TriggerCutover triggerCutover); } /** - * The stage of the MigrationResource definition allowing to specify dbsToTriggerCutoverOn. + * The stage of the Migration definition allowing to specify dbsToTriggerCutoverOn. */ interface WithDbsToTriggerCutoverOn { /** - * Specifies the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases - * send triggerCutover flag as True and database names in this array. + * Specifies the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array.. * - * @param dbsToTriggerCutoverOn When you want to trigger cutover for specific databases send triggerCutover - * flag as True and database names in this array. + * @param dbsToTriggerCutoverOn When you want to trigger cutover for specific databases set 'triggerCutover' + * to 'True' and the names of the specific databases in this array. * @return the next definition stage. */ WithCreate withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn); } /** - * The stage of the MigrationResource definition allowing to specify cancel. + * The stage of the Migration definition allowing to specify cancel. */ interface WithCancel { /** - * Specifies the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Specifies the cancel property: Indicates if cancel must be triggered for the entire migration.. * - * @param cancel To trigger cancel for entire migration we need to send this flag as True. + * @param cancel Indicates if cancel must be triggered for the entire migration. * @return the next definition stage. */ - WithCreate withCancel(CancelEnum cancel); + WithCreate withCancel(Cancel cancel); } /** - * The stage of the MigrationResource definition allowing to specify dbsToCancelMigrationOn. + * The stage of the Migration definition allowing to specify dbsToCancelMigrationOn. */ interface WithDbsToCancelMigrationOn { /** - * Specifies the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases - * send cancel flag as True and database names in this array. + * Specifies the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array.. * - * @param dbsToCancelMigrationOn When you want to trigger cancel for specific databases send cancel flag as - * True and database names in this array. + * @param dbsToCancelMigrationOn When you want to trigger cancel for specific databases set 'triggerCutover' + * to 'True' and the names of the specific databases in this array. * @return the next definition stage. */ WithCreate withDbsToCancelMigrationOn(List dbsToCancelMigrationOn); @@ -670,14 +668,14 @@ interface WithDbsToCancelMigrationOn { } /** - * Begins update for the MigrationResource resource. + * Begins update for the Migration resource. * * @return the stage of resource update. */ - MigrationResource.Update update(); + Migration.Update update(); /** - * The template for MigrationResource update. + * The template for Migration update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithSourceDbServerResourceId, UpdateStages.WithSourceDbServerFullyQualifiedDomainName, @@ -692,7 +690,7 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithSourceDbServerR * * @return the updated resource. */ - MigrationResource apply(); + Migration apply(); /** * Executes the update request. @@ -700,15 +698,15 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithSourceDbServerR * @param context The context to associate with this operation. * @return the updated resource. */ - MigrationResource apply(Context context); + Migration apply(Context context); } /** - * The MigrationResource update stages. + * The Migration update stages. */ interface UpdateStages { /** - * The stage of the MigrationResource update allowing to specify tags. + * The stage of the Migration update allowing to specify tags. */ interface WithTags { /** @@ -721,215 +719,218 @@ interface WithTags { } /** - * The stage of the MigrationResource update allowing to specify sourceDbServerResourceId. + * The stage of the Migration update allowing to specify sourceDbServerResourceId. */ interface WithSourceDbServerResourceId { /** - * Specifies the sourceDbServerResourceId property: ResourceId of the source database server. + * Specifies the sourceDbServerResourceId property: Identifier of the source database server resource, when + * 'sourceType' is 'PostgreSQLSingleServer'. For other source types this must be set to + * ipaddress:port@username or hostname:port@username.. * - * @param sourceDbServerResourceId ResourceId of the source database server. + * @param sourceDbServerResourceId Identifier of the source database server resource, when 'sourceType' is + * 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or + * hostname:port@username. * @return the next definition stage. */ Update withSourceDbServerResourceId(String sourceDbServerResourceId); } /** - * The stage of the MigrationResource update allowing to specify sourceDbServerFullyQualifiedDomainName. + * The stage of the Migration update allowing to specify sourceDbServerFullyQualifiedDomainName. */ interface WithSourceDbServerFullyQualifiedDomainName { /** - * Specifies the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name - * (FQDN) or IP address. It is a optional value, if customer provide it, migration service will always use - * it for connection. + * Specifies the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP + * address of the source server. This property is optional. When provided, the migration service will always + * use it to connect to the source server.. * - * @param sourceDbServerFullyQualifiedDomainName Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for - * connection. + * @param sourceDbServerFullyQualifiedDomainName Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to + * connect to the source server. * @return the next definition stage. */ Update withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName); } /** - * The stage of the MigrationResource update allowing to specify targetDbServerFullyQualifiedDomainName. + * The stage of the Migration update allowing to specify targetDbServerFullyQualifiedDomainName. */ interface WithTargetDbServerFullyQualifiedDomainName { /** - * Specifies the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name - * (FQDN) or IP address. It is a optional value, if customer provide it, migration service will always use - * it for connection. + * Specifies the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP + * address of the target server. This property is optional. When provided, the migration service will always + * use it to connect to the target server.. * - * @param targetDbServerFullyQualifiedDomainName Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for - * connection. + * @param targetDbServerFullyQualifiedDomainName Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to + * connect to the target server. * @return the next definition stage. */ Update withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName); } /** - * The stage of the MigrationResource update allowing to specify secretParameters. + * The stage of the Migration update allowing to specify secretParameters. */ interface WithSecretParameters { /** - * Specifies the secretParameters property: Migration secret parameters. + * Specifies the secretParameters property: Migration secret parameters.. * * @param secretParameters Migration secret parameters. * @return the next definition stage. */ - Update withSecretParameters(MigrationSecretParameters secretParameters); + Update withSecretParameters(MigrationSecretParametersForPatch secretParameters); } /** - * The stage of the MigrationResource update allowing to specify dbsToMigrate. + * The stage of the Migration update allowing to specify dbsToMigrate. */ interface WithDbsToMigrate { /** - * Specifies the dbsToMigrate property: Number of databases to migrate. + * Specifies the dbsToMigrate property: Names of databases to migrate.. * - * @param dbsToMigrate Number of databases to migrate. + * @param dbsToMigrate Names of databases to migrate. * @return the next definition stage. */ Update withDbsToMigrate(List dbsToMigrate); } /** - * The stage of the MigrationResource update allowing to specify setupLogicalReplicationOnSourceDbIfNeeded. + * The stage of the Migration update allowing to specify setupLogicalReplicationOnSourceDbIfNeeded. */ interface WithSetupLogicalReplicationOnSourceDbIfNeeded { /** - * Specifies the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Specifies the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical + * replication on source server, if needed.. * - * @param setupLogicalReplicationOnSourceDbIfNeeded Indicates whether to setup LogicalReplicationOnSourceDb, - * if needed. + * @param setupLogicalReplicationOnSourceDbIfNeeded Indicates whether to setup logical replication on source + * server, if needed. * @return the next definition stage. */ Update withSetupLogicalReplicationOnSourceDbIfNeeded( - LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded); + LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded); } /** - * The stage of the MigrationResource update allowing to specify overwriteDbsInTarget. + * The stage of the Migration update allowing to specify overwriteDbsInTarget. */ interface WithOverwriteDbsInTarget { /** - * Specifies the overwriteDbsInTarget property: Indicates whether the databases on the target server can be - * overwritten, if already present. If set to False, the migration workflow will wait for a confirmation, if - * it detects that the database already exists.. + * Specifies the overwriteDbsInTarget property: Indicates if databases on the target server can be + * overwritten when already present. If set to 'False', when the migration workflow detects that the + * database already exists on the target server, it will wait for a confirmation.. * - * @param overwriteDbsInTarget Indicates whether the databases on the target server can be overwritten, if - * already present. If set to False, the migration workflow will wait for a confirmation, if it detects that - * the database already exists. + * @param overwriteDbsInTarget Indicates if databases on the target server can be overwritten when already + * present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * @return the next definition stage. */ - Update withOverwriteDbsInTarget(OverwriteDbsInTargetEnum overwriteDbsInTarget); + Update withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer overwriteDbsInTarget); } /** - * The stage of the MigrationResource update allowing to specify migrationWindowStartTimeInUtc. + * The stage of the Migration update allowing to specify migrationWindowStartTimeInUtc. */ interface WithMigrationWindowStartTimeInUtc { /** - * Specifies the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Specifies the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window.. * - * @param migrationWindowStartTimeInUtc Start time in UTC for migration window. + * @param migrationWindowStartTimeInUtc Start time (UTC) for migration window. * @return the next definition stage. */ Update withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc); } /** - * The stage of the MigrationResource update allowing to specify migrateRoles. + * The stage of the Migration update allowing to specify migrateRoles. */ interface WithMigrateRoles { /** - * Specifies the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Specifies the migrateRoles property: Indicates if roles and permissions must be migrated.. * - * @param migrateRoles To migrate roles and permissions we need to send this flag as True. + * @param migrateRoles Indicates if roles and permissions must be migrated. * @return the next definition stage. */ - Update withMigrateRoles(MigrateRolesEnum migrateRoles); + Update withMigrateRoles(MigrateRolesAndPermissions migrateRoles); } /** - * The stage of the MigrationResource update allowing to specify startDataMigration. + * The stage of the Migration update allowing to specify startDataMigration. */ interface WithStartDataMigration { /** - * Specifies the startDataMigration property: Indicates whether the data migration should start right away. + * Specifies the startDataMigration property: Indicates if data migration must start right away.. * - * @param startDataMigration Indicates whether the data migration should start right away. + * @param startDataMigration Indicates if data migration must start right away. * @return the next definition stage. */ - Update withStartDataMigration(StartDataMigrationEnum startDataMigration); + Update withStartDataMigration(StartDataMigration startDataMigration); } /** - * The stage of the MigrationResource update allowing to specify triggerCutover. + * The stage of the Migration update allowing to specify triggerCutover. */ interface WithTriggerCutover { /** - * Specifies the triggerCutover property: To trigger cutover for entire migration we need to send this flag - * as True. + * Specifies the triggerCutover property: Indicates if cutover must be triggered for the entire migration.. * - * @param triggerCutover To trigger cutover for entire migration we need to send this flag as True. + * @param triggerCutover Indicates if cutover must be triggered for the entire migration. * @return the next definition stage. */ - Update withTriggerCutover(TriggerCutoverEnum triggerCutover); + Update withTriggerCutover(TriggerCutover triggerCutover); } /** - * The stage of the MigrationResource update allowing to specify dbsToTriggerCutoverOn. + * The stage of the Migration update allowing to specify dbsToTriggerCutoverOn. */ interface WithDbsToTriggerCutoverOn { /** - * Specifies the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases - * send triggerCutover flag as True and database names in this array. + * Specifies the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array.. * - * @param dbsToTriggerCutoverOn When you want to trigger cutover for specific databases send triggerCutover - * flag as True and database names in this array. + * @param dbsToTriggerCutoverOn When you want to trigger cutover for specific databases set 'triggerCutover' + * to 'True' and the names of the specific databases in this array. * @return the next definition stage. */ Update withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn); } /** - * The stage of the MigrationResource update allowing to specify cancel. + * The stage of the Migration update allowing to specify cancel. */ interface WithCancel { /** - * Specifies the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Specifies the cancel property: Indicates if cancel must be triggered for the entire migration.. * - * @param cancel To trigger cancel for entire migration we need to send this flag as True. + * @param cancel Indicates if cancel must be triggered for the entire migration. * @return the next definition stage. */ - Update withCancel(CancelEnum cancel); + Update withCancel(Cancel cancel); } /** - * The stage of the MigrationResource update allowing to specify dbsToCancelMigrationOn. + * The stage of the Migration update allowing to specify dbsToCancelMigrationOn. */ interface WithDbsToCancelMigrationOn { /** - * Specifies the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases - * send cancel flag as True and database names in this array. + * Specifies the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array.. * - * @param dbsToCancelMigrationOn When you want to trigger cancel for specific databases send cancel flag as - * True and database names in this array. + * @param dbsToCancelMigrationOn When you want to trigger cancel for specific databases set 'triggerCutover' + * to 'True' and the names of the specific databases in this array. * @return the next definition stage. */ Update withDbsToCancelMigrationOn(List dbsToCancelMigrationOn); } /** - * The stage of the MigrationResource update allowing to specify migrationMode. + * The stage of the Migration update allowing to specify migrationMode. */ interface WithMigrationMode { /** - * Specifies the migrationMode property: There are two types of migration modes Online and Offline. + * Specifies the migrationMode property: Mode used to perform the migration: Online or Offline.. * - * @param migrationMode There are two types of migration modes Online and Offline. + * @param migrationMode Mode used to perform the migration: Online or Offline. * @return the next definition stage. */ Update withMigrationMode(MigrationMode migrationMode); @@ -941,7 +942,7 @@ interface WithMigrationMode { * * @return the refreshed resource. */ - MigrationResource refresh(); + Migration refresh(); /** * Refreshes the resource to sync with Azure. @@ -949,5 +950,5 @@ interface WithMigrationMode { * @param context The context to associate with this operation. * @return the refreshed resource. */ - MigrationResource refresh(Context context); + Migration refresh(Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDatabaseState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDatabaseState.java new file mode 100644 index 000000000000..035b72a8650d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDatabaseState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Migration state of a database. + */ +public final class MigrationDatabaseState extends ExpandableStringEnum { + /** + * Static value InProgress for MigrationDatabaseState. + */ + public static final MigrationDatabaseState IN_PROGRESS = fromString("InProgress"); + + /** + * Static value WaitingForCutoverTrigger for MigrationDatabaseState. + */ + public static final MigrationDatabaseState WAITING_FOR_CUTOVER_TRIGGER = fromString("WaitingForCutoverTrigger"); + + /** + * Static value Failed for MigrationDatabaseState. + */ + public static final MigrationDatabaseState FAILED = fromString("Failed"); + + /** + * Static value Canceled for MigrationDatabaseState. + */ + public static final MigrationDatabaseState CANCELED = fromString("Canceled"); + + /** + * Static value Succeeded for MigrationDatabaseState. + */ + public static final MigrationDatabaseState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Canceling for MigrationDatabaseState. + */ + public static final MigrationDatabaseState CANCELING = fromString("Canceling"); + + /** + * Creates a new instance of MigrationDatabaseState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MigrationDatabaseState() { + } + + /** + * Creates or finds a MigrationDatabaseState from its string representation. + * + * @param name a name to look for. + * @return the corresponding MigrationDatabaseState. + */ + public static MigrationDatabaseState fromString(String name) { + return fromString(name, MigrationDatabaseState.class); + } + + /** + * Gets known MigrationDatabaseState values. + * + * @return known MigrationDatabaseState values. + */ + public static Collection values() { + return values(MigrationDatabaseState.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDbState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDbState.java deleted file mode 100644 index ed842cf5d76a..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDbState.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Migration db state of an individual database. - */ -public final class MigrationDbState extends ExpandableStringEnum { - /** - * Static value InProgress for MigrationDbState. - */ - public static final MigrationDbState IN_PROGRESS = fromString("InProgress"); - - /** - * Static value WaitingForCutoverTrigger for MigrationDbState. - */ - public static final MigrationDbState WAITING_FOR_CUTOVER_TRIGGER = fromString("WaitingForCutoverTrigger"); - - /** - * Static value Failed for MigrationDbState. - */ - public static final MigrationDbState FAILED = fromString("Failed"); - - /** - * Static value Canceled for MigrationDbState. - */ - public static final MigrationDbState CANCELED = fromString("Canceled"); - - /** - * Static value Succeeded for MigrationDbState. - */ - public static final MigrationDbState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Canceling for MigrationDbState. - */ - public static final MigrationDbState CANCELING = fromString("Canceling"); - - /** - * Creates a new instance of MigrationDbState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MigrationDbState() { - } - - /** - * Creates or finds a MigrationDbState from its string representation. - * - * @param name a name to look for. - * @return the corresponding MigrationDbState. - */ - public static MigrationDbState fromString(String name) { - return fromString(name, MigrationDbState.class); - } - - /** - * Gets known MigrationDbState values. - * - * @return known MigrationDbState values. - */ - public static Collection values() { - return values(MigrationDbState.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationList.java similarity index 53% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationList.java index bc9e2a934a56..bfde555cd22e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationList.java @@ -4,47 +4,47 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner; import java.io.IOException; import java.util.List; /** - * A list of migration resources. + * List of migrations. */ -@Immutable -public final class MigrationResourceListResult implements JsonSerializable { +@Fluent +public final class MigrationList implements JsonSerializable { /* - * A list of migration resources. + * List of migrations. */ - private List value; + private List value; /* - * The link used to get the next page of migrations. + * Link used to get the next page of results. */ private String nextLink; /** - * Creates an instance of MigrationResourceListResult class. + * Creates an instance of MigrationList class. */ - public MigrationResourceListResult() { + public MigrationList() { } /** - * Get the value property: A list of migration resources. + * Get the value property: List of migrations. * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** - * Get the nextLink property: The link used to get the next page of migrations. + * Get the nextLink property: Link used to get the next page of results. * * @return the nextLink value. */ @@ -52,6 +52,17 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: Link used to get the next page of results. + * + * @param nextLink the nextLink value to set. + * @return the MigrationList object itself. + */ + public MigrationList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + /** * Validates the instance. * @@ -69,36 +80,36 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } /** - * Reads an instance of MigrationResourceListResult from the JsonReader. + * Reads an instance of MigrationList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of MigrationResourceListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MigrationResourceListResult. + * @return An instance of MigrationList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MigrationList. */ - public static MigrationResourceListResult fromJson(JsonReader jsonReader) throws IOException { + public static MigrationList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - MigrationResourceListResult deserializedMigrationResourceListResult = new MigrationResourceListResult(); + MigrationList deserializedMigrationList = new MigrationList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> MigrationResourceInner.fromJson(reader1)); - deserializedMigrationResourceListResult.value = value; + List value = reader.readArray(reader1 -> MigrationInner.fromJson(reader1)); + deserializedMigrationList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedMigrationResourceListResult.nextLink = reader.getString(); + deserializedMigrationList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedMigrationResourceListResult; + return deserializedMigrationList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationMode.java index 36d110649206..1e2736bfa640 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationMode.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationMode.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * There are two types of migration modes Online and Offline. + * Mode used to perform the migration: Online or Offline. */ public final class MigrationMode extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailabilityResource.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailability.java similarity index 65% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailabilityResource.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailability.java index 9c330c945fe2..48d7651ec1c4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailabilityResource.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailability.java @@ -4,28 +4,28 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; /** - * An immutable client-side representation of MigrationNameAvailabilityResource. + * An immutable client-side representation of MigrationNameAvailability. */ -public interface MigrationNameAvailabilityResource { +public interface MigrationNameAvailability { /** - * Gets the name property: The resource name to verify. + * Gets the name property: Name of the migration to check for validity and availability. * * @return the name value. */ String name(); /** - * Gets the type property: The type of the resource. + * Gets the type property: Type of resource. * * @return the type value. */ String type(); /** - * Gets the nameAvailable property: Indicates whether the resource name is available. + * Gets the nameAvailable property: Indicates if the migration name is available. * * @return the nameAvailable value. */ @@ -46,10 +46,10 @@ public interface MigrationNameAvailabilityResource { String message(); /** - * Gets the inner - * com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner object. + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner + * object. * * @return the inner object. */ - MigrationNameAvailabilityResourceInner innerModel(); + MigrationNameAvailabilityInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationOption.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationOption.java index 38200446927c..9e732bdcf897 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationOption.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationOption.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Supported types of migration request include Validate, Migrate and ValidateAndMigrate. + * Supported option for a migration. */ public final class MigrationOption extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceForPatch.java index b8b0e86a95a7..4649165b23aa 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceForPatch.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceForPatch.java @@ -9,21 +9,21 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourcePropertiesForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationPropertiesForPatch; import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** - * Represents a migration resource for patch. + * Migration. */ @Fluent public final class MigrationResourceForPatch implements JsonSerializable { /* - * Migration resource properties. + * Migration properties. */ - private MigrationResourcePropertiesForPatch innerProperties; + private MigrationPropertiesForPatch innerProperties; /* * Application-specific metadata in the form of key-value pairs. @@ -37,11 +37,11 @@ public MigrationResourceForPatch() { } /** - * Get the innerProperties property: Migration resource properties. + * Get the innerProperties property: Migration properties. * * @return the innerProperties value. */ - private MigrationResourcePropertiesForPatch innerProperties() { + private MigrationPropertiesForPatch innerProperties() { return this.innerProperties; } @@ -66,7 +66,9 @@ public MigrationResourceForPatch withTags(Map tags) { } /** - * Get the sourceDbServerResourceId property: ResourceId of the source database server. + * Get the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or + * hostname:port@username. * * @return the sourceDbServerResourceId value. */ @@ -75,22 +77,25 @@ public String sourceDbServerResourceId() { } /** - * Set the sourceDbServerResourceId property: ResourceId of the source database server. + * Set the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or + * hostname:port@username. * * @param sourceDbServerResourceId the sourceDbServerResourceId value to set. * @return the MigrationResourceForPatch object itself. */ public MigrationResourceForPatch withSourceDbServerResourceId(String sourceDbServerResourceId) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withSourceDbServerResourceId(sourceDbServerResourceId); return this; } /** - * Get the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Get the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @return the sourceDbServerFullyQualifiedDomainName value. */ @@ -99,8 +104,9 @@ public String sourceDbServerFullyQualifiedDomainName() { } /** - * Set the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Set the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @param sourceDbServerFullyQualifiedDomainName the sourceDbServerFullyQualifiedDomainName value to set. * @return the MigrationResourceForPatch object itself. @@ -108,15 +114,16 @@ public String sourceDbServerFullyQualifiedDomainName() { public MigrationResourceForPatch withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withSourceDbServerFullyQualifiedDomainName(sourceDbServerFullyQualifiedDomainName); return this; } /** - * Get the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Get the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @return the targetDbServerFullyQualifiedDomainName value. */ @@ -125,8 +132,9 @@ public String targetDbServerFullyQualifiedDomainName() { } /** - * Set the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Set the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @param targetDbServerFullyQualifiedDomainName the targetDbServerFullyQualifiedDomainName value to set. * @return the MigrationResourceForPatch object itself. @@ -134,7 +142,7 @@ public String targetDbServerFullyQualifiedDomainName() { public MigrationResourceForPatch withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withTargetDbServerFullyQualifiedDomainName(targetDbServerFullyQualifiedDomainName); return this; @@ -145,7 +153,7 @@ public String targetDbServerFullyQualifiedDomainName() { * * @return the secretParameters value. */ - public MigrationSecretParameters secretParameters() { + public MigrationSecretParametersForPatch secretParameters() { return this.innerProperties() == null ? null : this.innerProperties().secretParameters(); } @@ -155,16 +163,16 @@ public MigrationSecretParameters secretParameters() { * @param secretParameters the secretParameters value to set. * @return the MigrationResourceForPatch object itself. */ - public MigrationResourceForPatch withSecretParameters(MigrationSecretParameters secretParameters) { + public MigrationResourceForPatch withSecretParameters(MigrationSecretParametersForPatch secretParameters) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withSecretParameters(secretParameters); return this; } /** - * Get the dbsToMigrate property: Number of databases to migrate. + * Get the dbsToMigrate property: Names of databases to migrate. * * @return the dbsToMigrate value. */ @@ -173,76 +181,76 @@ public List dbsToMigrate() { } /** - * Set the dbsToMigrate property: Number of databases to migrate. + * Set the dbsToMigrate property: Names of databases to migrate. * * @param dbsToMigrate the dbsToMigrate value to set. * @return the MigrationResourceForPatch object itself. */ public MigrationResourceForPatch withDbsToMigrate(List dbsToMigrate) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withDbsToMigrate(dbsToMigrate); return this; } /** - * Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @return the setupLogicalReplicationOnSourceDbIfNeeded value. */ - public LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded() { + public LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded() { return this.innerProperties() == null ? null : this.innerProperties().setupLogicalReplicationOnSourceDbIfNeeded(); } /** - * Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @param setupLogicalReplicationOnSourceDbIfNeeded the setupLogicalReplicationOnSourceDbIfNeeded value to set. * @return the MigrationResourceForPatch object itself. */ public MigrationResourceForPatch withSetupLogicalReplicationOnSourceDbIfNeeded( - LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded) { + LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withSetupLogicalReplicationOnSourceDbIfNeeded(setupLogicalReplicationOnSourceDbIfNeeded); return this; } /** - * Get the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Get the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @return the overwriteDbsInTarget value. */ - public OverwriteDbsInTargetEnum overwriteDbsInTarget() { + public OverwriteDatabasesOnTargetServer overwriteDbsInTarget() { return this.innerProperties() == null ? null : this.innerProperties().overwriteDbsInTarget(); } /** - * Set the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Set the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @param overwriteDbsInTarget the overwriteDbsInTarget value to set. * @return the MigrationResourceForPatch object itself. */ - public MigrationResourceForPatch withOverwriteDbsInTarget(OverwriteDbsInTargetEnum overwriteDbsInTarget) { + public MigrationResourceForPatch withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer overwriteDbsInTarget) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withOverwriteDbsInTarget(overwriteDbsInTarget); return this; } /** - * Get the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Get the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @return the migrationWindowStartTimeInUtc value. */ @@ -251,91 +259,91 @@ public OffsetDateTime migrationWindowStartTimeInUtc() { } /** - * Set the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Set the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @param migrationWindowStartTimeInUtc the migrationWindowStartTimeInUtc value to set. * @return the MigrationResourceForPatch object itself. */ public MigrationResourceForPatch withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withMigrationWindowStartTimeInUtc(migrationWindowStartTimeInUtc); return this; } /** - * Get the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Get the migrateRoles property: Indicates if roles and permissions must be migrated. * * @return the migrateRoles value. */ - public MigrateRolesEnum migrateRoles() { + public MigrateRolesAndPermissions migrateRoles() { return this.innerProperties() == null ? null : this.innerProperties().migrateRoles(); } /** - * Set the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Set the migrateRoles property: Indicates if roles and permissions must be migrated. * * @param migrateRoles the migrateRoles value to set. * @return the MigrationResourceForPatch object itself. */ - public MigrationResourceForPatch withMigrateRoles(MigrateRolesEnum migrateRoles) { + public MigrationResourceForPatch withMigrateRoles(MigrateRolesAndPermissions migrateRoles) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withMigrateRoles(migrateRoles); return this; } /** - * Get the startDataMigration property: Indicates whether the data migration should start right away. + * Get the startDataMigration property: Indicates if data migration must start right away. * * @return the startDataMigration value. */ - public StartDataMigrationEnum startDataMigration() { + public StartDataMigration startDataMigration() { return this.innerProperties() == null ? null : this.innerProperties().startDataMigration(); } /** - * Set the startDataMigration property: Indicates whether the data migration should start right away. + * Set the startDataMigration property: Indicates if data migration must start right away. * * @param startDataMigration the startDataMigration value to set. * @return the MigrationResourceForPatch object itself. */ - public MigrationResourceForPatch withStartDataMigration(StartDataMigrationEnum startDataMigration) { + public MigrationResourceForPatch withStartDataMigration(StartDataMigration startDataMigration) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withStartDataMigration(startDataMigration); return this; } /** - * Get the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Get the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @return the triggerCutover value. */ - public TriggerCutoverEnum triggerCutover() { + public TriggerCutover triggerCutover() { return this.innerProperties() == null ? null : this.innerProperties().triggerCutover(); } /** - * Set the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Set the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @param triggerCutover the triggerCutover value to set. * @return the MigrationResourceForPatch object itself. */ - public MigrationResourceForPatch withTriggerCutover(TriggerCutoverEnum triggerCutover) { + public MigrationResourceForPatch withTriggerCutover(TriggerCutover triggerCutover) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withTriggerCutover(triggerCutover); return this; } /** - * Get the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Get the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToTriggerCutoverOn value. */ @@ -344,46 +352,46 @@ public List dbsToTriggerCutoverOn() { } /** - * Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @param dbsToTriggerCutoverOn the dbsToTriggerCutoverOn value to set. * @return the MigrationResourceForPatch object itself. */ public MigrationResourceForPatch withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withDbsToTriggerCutoverOn(dbsToTriggerCutoverOn); return this; } /** - * Get the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Get the cancel property: Indicates if cancel must be triggered for the entire migration. * * @return the cancel value. */ - public CancelEnum cancel() { + public Cancel cancel() { return this.innerProperties() == null ? null : this.innerProperties().cancel(); } /** - * Set the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Set the cancel property: Indicates if cancel must be triggered for the entire migration. * * @param cancel the cancel value to set. * @return the MigrationResourceForPatch object itself. */ - public MigrationResourceForPatch withCancel(CancelEnum cancel) { + public MigrationResourceForPatch withCancel(Cancel cancel) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withCancel(cancel); return this; } /** - * Get the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Get the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToCancelMigrationOn value. */ @@ -392,22 +400,22 @@ public List dbsToCancelMigrationOn() { } /** - * Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @param dbsToCancelMigrationOn the dbsToCancelMigrationOn value to set. * @return the MigrationResourceForPatch object itself. */ public MigrationResourceForPatch withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withDbsToCancelMigrationOn(dbsToCancelMigrationOn); return this; } /** - * Get the migrationMode property: There are two types of migration modes Online and Offline. + * Get the migrationMode property: Mode used to perform the migration: Online or Offline. * * @return the migrationMode value. */ @@ -416,14 +424,14 @@ public MigrationMode migrationMode() { } /** - * Set the migrationMode property: There are two types of migration modes Online and Offline. + * Set the migrationMode property: Mode used to perform the migration: Online or Offline. * * @param migrationMode the migrationMode value to set. * @return the MigrationResourceForPatch object itself. */ public MigrationResourceForPatch withMigrationMode(MigrationMode migrationMode) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withMigrationMode(migrationMode); return this; @@ -468,7 +476,7 @@ public static MigrationResourceForPatch fromJson(JsonReader jsonReader) throws I if ("properties".equals(fieldName)) { deserializedMigrationResourceForPatch.innerProperties - = MigrationResourcePropertiesForPatch.fromJson(reader); + = MigrationPropertiesForPatch.fromJson(reader); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedMigrationResourceForPatch.tags = tags; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParameters.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParameters.java index 853d1b6d87a4..53bfc0a85dba 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParameters.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParameters.java @@ -18,17 +18,17 @@ @Fluent public final class MigrationSecretParameters implements JsonSerializable { /* - * Admin credentials for source and target servers + * Credentials of administrator users for source and target servers. */ private AdminCredentials adminCredentials; /* - * Gets or sets the username for the source server. This user need not be an admin. + * Gets or sets the name of the user for the source server. This user doesn't need to be an administrator. */ private String sourceServerUsername; /* - * Gets or sets the username for the target server. This user need not be an admin. + * Gets or sets the name of the user for the target server. This user doesn't need to be an administrator. */ private String targetServerUsername; @@ -39,7 +39,7 @@ public MigrationSecretParameters() { } /** - * Get the adminCredentials property: Admin credentials for source and target servers. + * Get the adminCredentials property: Credentials of administrator users for source and target servers. * * @return the adminCredentials value. */ @@ -48,7 +48,7 @@ public AdminCredentials adminCredentials() { } /** - * Set the adminCredentials property: Admin credentials for source and target servers. + * Set the adminCredentials property: Credentials of administrator users for source and target servers. * * @param adminCredentials the adminCredentials value to set. * @return the MigrationSecretParameters object itself. @@ -59,8 +59,8 @@ public MigrationSecretParameters withAdminCredentials(AdminCredentials adminCred } /** - * Get the sourceServerUsername property: Gets or sets the username for the source server. This user need not be an - * admin. + * Get the sourceServerUsername property: Gets or sets the name of the user for the source server. This user doesn't + * need to be an administrator. * * @return the sourceServerUsername value. */ @@ -69,8 +69,8 @@ public String sourceServerUsername() { } /** - * Set the sourceServerUsername property: Gets or sets the username for the source server. This user need not be an - * admin. + * Set the sourceServerUsername property: Gets or sets the name of the user for the source server. This user doesn't + * need to be an administrator. * * @param sourceServerUsername the sourceServerUsername value to set. * @return the MigrationSecretParameters object itself. @@ -81,8 +81,8 @@ public MigrationSecretParameters withSourceServerUsername(String sourceServerUse } /** - * Get the targetServerUsername property: Gets or sets the username for the target server. This user need not be an - * admin. + * Get the targetServerUsername property: Gets or sets the name of the user for the target server. This user doesn't + * need to be an administrator. * * @return the targetServerUsername value. */ @@ -91,8 +91,8 @@ public String targetServerUsername() { } /** - * Set the targetServerUsername property: Gets or sets the username for the target server. This user need not be an - * admin. + * Set the targetServerUsername property: Gets or sets the name of the user for the target server. This user doesn't + * need to be an administrator. * * @param targetServerUsername the targetServerUsername value to set. * @return the MigrationSecretParameters object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParametersForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParametersForPatch.java new file mode 100644 index 000000000000..41e7e2120873 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParametersForPatch.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.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Migration secret parameters. + */ +@Fluent +public final class MigrationSecretParametersForPatch implements JsonSerializable { + /* + * Credentials of administrator users for source and target servers. + */ + private AdminCredentialsForPatch adminCredentials; + + /* + * Gets or sets the name of the user for the source server. This user doesn't need to be an administrator. + */ + private String sourceServerUsername; + + /* + * Gets or sets the name of the user for the target server. This user doesn't need to be an administrator. + */ + private String targetServerUsername; + + /** + * Creates an instance of MigrationSecretParametersForPatch class. + */ + public MigrationSecretParametersForPatch() { + } + + /** + * Get the adminCredentials property: Credentials of administrator users for source and target servers. + * + * @return the adminCredentials value. + */ + public AdminCredentialsForPatch adminCredentials() { + return this.adminCredentials; + } + + /** + * Set the adminCredentials property: Credentials of administrator users for source and target servers. + * + * @param adminCredentials the adminCredentials value to set. + * @return the MigrationSecretParametersForPatch object itself. + */ + public MigrationSecretParametersForPatch withAdminCredentials(AdminCredentialsForPatch adminCredentials) { + this.adminCredentials = adminCredentials; + return this; + } + + /** + * Get the sourceServerUsername property: Gets or sets the name of the user for the source server. This user doesn't + * need to be an administrator. + * + * @return the sourceServerUsername value. + */ + public String sourceServerUsername() { + return this.sourceServerUsername; + } + + /** + * Set the sourceServerUsername property: Gets or sets the name of the user for the source server. This user doesn't + * need to be an administrator. + * + * @param sourceServerUsername the sourceServerUsername value to set. + * @return the MigrationSecretParametersForPatch object itself. + */ + public MigrationSecretParametersForPatch withSourceServerUsername(String sourceServerUsername) { + this.sourceServerUsername = sourceServerUsername; + return this; + } + + /** + * Get the targetServerUsername property: Gets or sets the name of the user for the target server. This user doesn't + * need to be an administrator. + * + * @return the targetServerUsername value. + */ + public String targetServerUsername() { + return this.targetServerUsername; + } + + /** + * Set the targetServerUsername property: Gets or sets the name of the user for the target server. This user doesn't + * need to be an administrator. + * + * @param targetServerUsername the targetServerUsername value to set. + * @return the MigrationSecretParametersForPatch object itself. + */ + public MigrationSecretParametersForPatch withTargetServerUsername(String targetServerUsername) { + this.targetServerUsername = targetServerUsername; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (adminCredentials() != null) { + adminCredentials().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("adminCredentials", this.adminCredentials); + jsonWriter.writeStringField("sourceServerUsername", this.sourceServerUsername); + jsonWriter.writeStringField("targetServerUsername", this.targetServerUsername); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MigrationSecretParametersForPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MigrationSecretParametersForPatch if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MigrationSecretParametersForPatch. + */ + public static MigrationSecretParametersForPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MigrationSecretParametersForPatch deserializedMigrationSecretParametersForPatch + = new MigrationSecretParametersForPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("adminCredentials".equals(fieldName)) { + deserializedMigrationSecretParametersForPatch.adminCredentials + = AdminCredentialsForPatch.fromJson(reader); + } else if ("sourceServerUsername".equals(fieldName)) { + deserializedMigrationSecretParametersForPatch.sourceServerUsername = reader.getString(); + } else if ("targetServerUsername".equals(fieldName)) { + deserializedMigrationSecretParametersForPatch.targetServerUsername = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMigrationSecretParametersForPatch; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationState.java index 096b4722de9a..c48fb234260b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationState.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationState.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Migration state. + * State of migration. */ public final class MigrationState extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationStatus.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationStatus.java index 8843c803a219..592eb787199f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationStatus.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationStatus.java @@ -12,24 +12,24 @@ import java.io.IOException; /** - * Migration status. + * State of migration. */ @Immutable public final class MigrationStatus implements JsonSerializable { /* - * State of migration + * State of migration. */ private MigrationState state; /* - * Error message, if any, for the migration state + * Error message, if any, for the migration state. */ private String error; /* - * Current Migration sub state details. + * Current migration sub state details. */ - private MigrationSubStateDetails currentSubStateDetails; + private MigrationSubstateDetails currentSubStateDetails; /** * Creates an instance of MigrationStatus class. @@ -56,11 +56,11 @@ public String error() { } /** - * Get the currentSubStateDetails property: Current Migration sub state details. + * Get the currentSubStateDetails property: Current migration sub state details. * * @return the currentSubStateDetails value. */ - public MigrationSubStateDetails currentSubStateDetails() { + public MigrationSubstateDetails currentSubStateDetails() { return this.currentSubStateDetails; } @@ -104,7 +104,7 @@ public static MigrationStatus fromJson(JsonReader jsonReader) throws IOException } else if ("error".equals(fieldName)) { deserializedMigrationStatus.error = reader.getString(); } else if ("currentSubStateDetails".equals(fieldName)) { - deserializedMigrationStatus.currentSubStateDetails = MigrationSubStateDetails.fromJson(reader); + deserializedMigrationStatus.currentSubStateDetails = MigrationSubstateDetails.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubstate.java similarity index 51% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubState.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubstate.java index 71838f0431b8..4de69ec889da 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubState.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubstate.java @@ -8,100 +8,100 @@ import java.util.Collection; /** - * Migration sub state. + * Substate of migration. */ -public final class MigrationSubState extends ExpandableStringEnum { +public final class MigrationSubstate extends ExpandableStringEnum { /** - * Static value PerformingPreRequisiteSteps for MigrationSubState. + * Static value PerformingPreRequisiteSteps for MigrationSubstate. */ - public static final MigrationSubState PERFORMING_PRE_REQUISITE_STEPS = fromString("PerformingPreRequisiteSteps"); + public static final MigrationSubstate PERFORMING_PRE_REQUISITE_STEPS = fromString("PerformingPreRequisiteSteps"); /** - * Static value WaitingForLogicalReplicationSetupRequestOnSourceDB for MigrationSubState. + * Static value WaitingForLogicalReplicationSetupRequestOnSourceDB for MigrationSubstate. */ - public static final MigrationSubState WAITING_FOR_LOGICAL_REPLICATION_SETUP_REQUEST_ON_SOURCE_DB + public static final MigrationSubstate WAITING_FOR_LOGICAL_REPLICATION_SETUP_REQUEST_ON_SOURCE_DB = fromString("WaitingForLogicalReplicationSetupRequestOnSourceDB"); /** - * Static value WaitingForDBsToMigrateSpecification for MigrationSubState. + * Static value WaitingForDBsToMigrateSpecification for MigrationSubstate. */ - public static final MigrationSubState WAITING_FOR_DBS_TO_MIGRATE_SPECIFICATION + public static final MigrationSubstate WAITING_FOR_DBS_TO_MIGRATE_SPECIFICATION = fromString("WaitingForDBsToMigrateSpecification"); /** - * Static value WaitingForTargetDBOverwriteConfirmation for MigrationSubState. + * Static value WaitingForTargetDBOverwriteConfirmation for MigrationSubstate. */ - public static final MigrationSubState WAITING_FOR_TARGET_DBOVERWRITE_CONFIRMATION + public static final MigrationSubstate WAITING_FOR_TARGET_DBOVERWRITE_CONFIRMATION = fromString("WaitingForTargetDBOverwriteConfirmation"); /** - * Static value WaitingForDataMigrationScheduling for MigrationSubState. + * Static value WaitingForDataMigrationScheduling for MigrationSubstate. */ - public static final MigrationSubState WAITING_FOR_DATA_MIGRATION_SCHEDULING + public static final MigrationSubstate WAITING_FOR_DATA_MIGRATION_SCHEDULING = fromString("WaitingForDataMigrationScheduling"); /** - * Static value WaitingForDataMigrationWindow for MigrationSubState. + * Static value WaitingForDataMigrationWindow for MigrationSubstate. */ - public static final MigrationSubState WAITING_FOR_DATA_MIGRATION_WINDOW + public static final MigrationSubstate WAITING_FOR_DATA_MIGRATION_WINDOW = fromString("WaitingForDataMigrationWindow"); /** - * Static value MigratingData for MigrationSubState. + * Static value MigratingData for MigrationSubstate. */ - public static final MigrationSubState MIGRATING_DATA = fromString("MigratingData"); + public static final MigrationSubstate MIGRATING_DATA = fromString("MigratingData"); /** - * Static value WaitingForCutoverTrigger for MigrationSubState. + * Static value WaitingForCutoverTrigger for MigrationSubstate. */ - public static final MigrationSubState WAITING_FOR_CUTOVER_TRIGGER = fromString("WaitingForCutoverTrigger"); + public static final MigrationSubstate WAITING_FOR_CUTOVER_TRIGGER = fromString("WaitingForCutoverTrigger"); /** - * Static value CompletingMigration for MigrationSubState. + * Static value CompletingMigration for MigrationSubstate. */ - public static final MigrationSubState COMPLETING_MIGRATION = fromString("CompletingMigration"); + public static final MigrationSubstate COMPLETING_MIGRATION = fromString("CompletingMigration"); /** - * Static value Completed for MigrationSubState. + * Static value Completed for MigrationSubstate. */ - public static final MigrationSubState COMPLETED = fromString("Completed"); + public static final MigrationSubstate COMPLETED = fromString("Completed"); /** - * Static value CancelingRequestedDBMigrations for MigrationSubState. + * Static value CancelingRequestedDBMigrations for MigrationSubstate. */ - public static final MigrationSubState CANCELING_REQUESTED_DBMIGRATIONS + public static final MigrationSubstate CANCELING_REQUESTED_DBMIGRATIONS = fromString("CancelingRequestedDBMigrations"); /** - * Static value ValidationInProgress for MigrationSubState. + * Static value ValidationInProgress for MigrationSubstate. */ - public static final MigrationSubState VALIDATION_IN_PROGRESS = fromString("ValidationInProgress"); + public static final MigrationSubstate VALIDATION_IN_PROGRESS = fromString("ValidationInProgress"); /** - * Creates a new instance of MigrationSubState value. + * Creates a new instance of MigrationSubstate value. * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated - public MigrationSubState() { + public MigrationSubstate() { } /** - * Creates or finds a MigrationSubState from its string representation. + * Creates or finds a MigrationSubstate from its string representation. * * @param name a name to look for. - * @return the corresponding MigrationSubState. + * @return the corresponding MigrationSubstate. */ - public static MigrationSubState fromString(String name) { - return fromString(name, MigrationSubState.class); + public static MigrationSubstate fromString(String name) { + return fromString(name, MigrationSubstate.class); } /** - * Gets known MigrationSubState values. + * Gets known MigrationSubstate values. * - * @return known MigrationSubState values. + * @return known MigrationSubstate values. */ - public static Collection values() { - return values(MigrationSubState.class); + public static Collection values() { + return values(MigrationSubstate.class); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubStateDetails.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubstateDetails.java similarity index 63% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubStateDetails.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubstateDetails.java index 2fcb3f0d63f4..66033cdcd58e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubStateDetails.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubstateDetails.java @@ -13,56 +13,56 @@ import java.util.Map; /** - * Migration sub state details. + * Details of migration substate. */ @Fluent -public final class MigrationSubStateDetails implements JsonSerializable { +public final class MigrationSubstateDetails implements JsonSerializable { /* - * Migration sub state. + * Substate of migration. */ - private MigrationSubState currentSubState; + private MigrationSubstate currentSubState; /* - * Dictionary of + * Dictionary of */ - private Map dbDetails; + private Map dbDetails; /* - * Details for the validation for migration + * Details for the validation for migration. */ private ValidationDetails validationDetails; /** - * Creates an instance of MigrationSubStateDetails class. + * Creates an instance of MigrationSubstateDetails class. */ - public MigrationSubStateDetails() { + public MigrationSubstateDetails() { } /** - * Get the currentSubState property: Migration sub state. + * Get the currentSubState property: Substate of migration. * * @return the currentSubState value. */ - public MigrationSubState currentSubState() { + public MigrationSubstate currentSubState() { return this.currentSubState; } /** - * Get the dbDetails property: Dictionary of <DbMigrationStatus>. + * Get the dbDetails property: Dictionary of <DatabaseMigrationState>. * * @return the dbDetails value. */ - public Map dbDetails() { + public Map dbDetails() { return this.dbDetails; } /** - * Set the dbDetails property: Dictionary of <DbMigrationStatus>. + * Set the dbDetails property: Dictionary of <DatabaseMigrationState>. * * @param dbDetails the dbDetails value to set. - * @return the MigrationSubStateDetails object itself. + * @return the MigrationSubstateDetails object itself. */ - public MigrationSubStateDetails withDbDetails(Map dbDetails) { + public MigrationSubstateDetails withDbDetails(Map dbDetails) { this.dbDetails = dbDetails; return this; } @@ -80,9 +80,9 @@ public ValidationDetails validationDetails() { * Set the validationDetails property: Details for the validation for migration. * * @param validationDetails the validationDetails value to set. - * @return the MigrationSubStateDetails object itself. + * @return the MigrationSubstateDetails object itself. */ - public MigrationSubStateDetails withValidationDetails(ValidationDetails validationDetails) { + public MigrationSubstateDetails withValidationDetails(ValidationDetails validationDetails) { this.validationDetails = validationDetails; return this; } @@ -117,35 +117,35 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of MigrationSubStateDetails from the JsonReader. + * Reads an instance of MigrationSubstateDetails from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of MigrationSubStateDetails if the JsonReader was pointing to an instance of it, or null if + * @return An instance of MigrationSubstateDetails if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MigrationSubStateDetails. + * @throws IOException If an error occurs while reading the MigrationSubstateDetails. */ - public static MigrationSubStateDetails fromJson(JsonReader jsonReader) throws IOException { + public static MigrationSubstateDetails fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - MigrationSubStateDetails deserializedMigrationSubStateDetails = new MigrationSubStateDetails(); + MigrationSubstateDetails deserializedMigrationSubstateDetails = new MigrationSubstateDetails(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("currentSubState".equals(fieldName)) { - deserializedMigrationSubStateDetails.currentSubState - = MigrationSubState.fromString(reader.getString()); + deserializedMigrationSubstateDetails.currentSubState + = MigrationSubstate.fromString(reader.getString()); } else if ("dbDetails".equals(fieldName)) { - Map dbDetails - = reader.readMap(reader1 -> DbMigrationStatus.fromJson(reader1)); - deserializedMigrationSubStateDetails.dbDetails = dbDetails; + Map dbDetails + = reader.readMap(reader1 -> DatabaseMigrationState.fromJson(reader1)); + deserializedMigrationSubstateDetails.dbDetails = dbDetails; } else if ("validationDetails".equals(fieldName)) { - deserializedMigrationSubStateDetails.validationDetails = ValidationDetails.fromJson(reader); + deserializedMigrationSubstateDetails.validationDetails = ValidationDetails.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedMigrationSubStateDetails; + return deserializedMigrationSubstateDetails; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migrations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migrations.java index 7d48e9e5926f..1ad1eb13b8cc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migrations.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migrations.java @@ -7,151 +7,157 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; /** * Resource collection API of Migrations. */ public interface Migrations { /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration along with {@link Response}. + * @return information about a migration along with {@link Response}. */ - Response getWithResponse(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String migrationName, + Context context); /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration. + * @return information about a migration. */ - MigrationResource get(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName); + Migration get(String resourceGroupName, String serverName, String migrationName); /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return properties of a migration along with {@link Response}. */ - Response deleteWithResponse(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, Context context); + Response cancelWithResponse(String resourceGroupName, String serverName, String migrationName, + Context context); /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return properties of a migration. */ - void delete(String subscriptionId, String resourceGroupName, String targetDbServerName, String migrationName); + Migration cancel(String resourceGroupName, String serverName, String migrationName); /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 migration resources as paginated response with {@link PagedIterable}. + * @return list of migrations as paginated response with {@link PagedIterable}. */ - PagedIterable listByTargetServer(String subscriptionId, String resourceGroupName, - String targetDbServerName); + PagedIterable listByTargetServer(String resourceGroupName, String serverName); /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationListFilter Migration list filter. Retrieves either active migrations or all migrations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationListFilter Migration list filter. Indicates if the request should retrieve only active migrations + * or all migrations. Defaults to Active. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 migration resources as paginated response with {@link PagedIterable}. + * @return list of migrations as paginated response with {@link PagedIterable}. */ - PagedIterable listByTargetServer(String subscriptionId, String resourceGroupName, - String targetDbServerName, MigrationListFilter migrationListFilter, Context context); + PagedIterable listByTargetServer(String resourceGroupName, String serverName, + MigrationListFilter migrationListFilter, Context context); /** - * Gets details of a migration. + * Check the validity and availability of the given name, to assign it to a new migration. * - * @param id the resource ID. + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration along with {@link Response}. + * @return availability of a migration name along with {@link Response}. */ - MigrationResource getById(String id); + Response checkNameAvailabilityWithResponse(String resourceGroupName, String serverName, + MigrationNameAvailabilityInner parameters, Context context); /** - * Gets details of a migration. + * Check the validity and availability of the given name, to assign it to a new migration. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration along with {@link Response}. + * @return availability of a migration name. */ - Response getByIdWithResponse(String id, Context context); + MigrationNameAvailability checkNameAvailability(String resourceGroupName, String serverName, + MigrationNameAvailabilityInner parameters); /** - * Deletes a migration. + * Gets information about a migration. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a migration along with {@link Response}. */ - void deleteById(String id); + Migration getById(String id); /** - * Deletes a migration. + * Gets information about a migration. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return information about a migration along with {@link Response}. */ - Response deleteByIdWithResponse(String id, Context context); + Response getByIdWithResponse(String id, Context context); /** - * Begins definition for a new MigrationResource resource. + * Begins definition for a new Migration resource. * * @param name resource name. - * @return the first stage of the new MigrationResource definition. + * @return the first stage of the new Migration definition. */ - MigrationResource.DefinitionStages.Blank define(String name); + Migration.DefinitionStages.Blank define(String name); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilities.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilities.java new file mode 100644 index 000000000000..7ca389e36738 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilities.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of NameAvailabilities. + */ +public interface NameAvailabilities { + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name along with {@link Response}. + */ + Response checkGloballyWithResponse(CheckNameAvailabilityRequest parameters, Context context); + + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name. + */ + NameAvailabilityModel checkGlobally(CheckNameAvailabilityRequest parameters); + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name along with {@link Response}. + */ + Response checkWithLocationWithResponse(String locationName, + CheckNameAvailabilityRequest parameters, Context context); + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name. + */ + NameAvailabilityModel checkWithLocation(String locationName, CheckNameAvailabilityRequest parameters); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilityModel.java similarity index 67% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailability.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilityModel.java index 98b858bd1770..06f5d6898ba7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilityModel.java @@ -4,12 +4,12 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner; /** - * An immutable client-side representation of NameAvailability. + * An immutable client-side representation of NameAvailabilityModel. */ -public interface NameAvailability { +public interface NameAvailabilityModel { /** * Gets the nameAvailable property: Indicates if the resource name is available. * @@ -32,23 +32,25 @@ public interface NameAvailability { String message(); /** - * Gets the name property: name of the PostgreSQL server. + * Gets the name property: Name for which validity and availability was checked. * * @return the name value. */ String name(); /** - * Gets the type property: type of the server. + * Gets the type property: Type of resource. It can be 'Microsoft.DBforPostgreSQL/flexibleServers' or + * 'Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints'. * * @return the type value. */ String type(); /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner object. + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner + * object. * * @return the inner object. */ - NameAvailabilityInner innerModel(); + NameAvailabilityModelInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Network.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Network.java index cc9b4a861b56..16f3e453fab4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Network.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Network.java @@ -17,21 +17,22 @@ @Fluent public final class Network implements JsonSerializable { /* - * public network access is enabled or not + * Indicates if public network access is enabled or not. This is only supported for servers that are not integrated + * into a virtual network which is owned and provided by customer when server is deployed. */ private ServerPublicNetworkAccessState publicNetworkAccess; /* - * Delegated subnet arm resource id. This is required to be passed during create, in case we want the server to be - * VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for - * Private DNS zone. + * Resource identifier of the delegated subnet. Required during creation of a new server, in case you want the + * server to be integrated into your own virtual network. For an update operation, you only have to provide this + * property if you want to change the value assigned for the private DNS zone. */ private String delegatedSubnetResourceId; /* - * Private dns zone arm resource id. This is required to be passed during create, in case we want the server to be - * VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for - * Private DNS zone. + * Identifier of the private DNS zone. Required during creation of a new server, in case you want the server to be + * integrated into your own virtual network. For an update operation, you only have to provide this property if you + * want to change the value assigned for the private DNS zone. */ private String privateDnsZoneArmResourceId; @@ -42,7 +43,9 @@ public Network() { } /** - * Get the publicNetworkAccess property: public network access is enabled or not. + * Get the publicNetworkAccess property: Indicates if public network access is enabled or not. This is only + * supported for servers that are not integrated into a virtual network which is owned and provided by customer when + * server is deployed. * * @return the publicNetworkAccess value. */ @@ -51,7 +54,9 @@ public ServerPublicNetworkAccessState publicNetworkAccess() { } /** - * Set the publicNetworkAccess property: public network access is enabled or not. + * Set the publicNetworkAccess property: Indicates if public network access is enabled or not. This is only + * supported for servers that are not integrated into a virtual network which is owned and provided by customer when + * server is deployed. * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the Network object itself. @@ -62,9 +67,10 @@ public Network withPublicNetworkAccess(ServerPublicNetworkAccessState publicNetw } /** - * Get the delegatedSubnetResourceId property: Delegated subnet arm resource id. This is required to be passed - * during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass - * this only if we want to update the value for Private DNS zone. + * Get the delegatedSubnetResourceId property: Resource identifier of the delegated subnet. Required during creation + * of a new server, in case you want the server to be integrated into your own virtual network. For an update + * operation, you only have to provide this property if you want to change the value assigned for the private DNS + * zone. * * @return the delegatedSubnetResourceId value. */ @@ -73,9 +79,10 @@ public String delegatedSubnetResourceId() { } /** - * Set the delegatedSubnetResourceId property: Delegated subnet arm resource id. This is required to be passed - * during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass - * this only if we want to update the value for Private DNS zone. + * Set the delegatedSubnetResourceId property: Resource identifier of the delegated subnet. Required during creation + * of a new server, in case you want the server to be integrated into your own virtual network. For an update + * operation, you only have to provide this property if you want to change the value assigned for the private DNS + * zone. * * @param delegatedSubnetResourceId the delegatedSubnetResourceId value to set. * @return the Network object itself. @@ -86,9 +93,9 @@ public Network withDelegatedSubnetResourceId(String delegatedSubnetResourceId) { } /** - * Get the privateDnsZoneArmResourceId property: Private dns zone arm resource id. This is required to be passed - * during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass - * this only if we want to update the value for Private DNS zone. + * Get the privateDnsZoneArmResourceId property: Identifier of the private DNS zone. Required during creation of a + * new server, in case you want the server to be integrated into your own virtual network. For an update operation, + * you only have to provide this property if you want to change the value assigned for the private DNS zone. * * @return the privateDnsZoneArmResourceId value. */ @@ -97,9 +104,9 @@ public String privateDnsZoneArmResourceId() { } /** - * Set the privateDnsZoneArmResourceId property: Private dns zone arm resource id. This is required to be passed - * during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass - * this only if we want to update the value for Private DNS zone. + * Set the privateDnsZoneArmResourceId property: Identifier of the private DNS zone. Required during creation of a + * new server, in case you want the server to be integrated into your own virtual network. For an update operation, + * you only have to provide this property if you want to change the value assigned for the private DNS zone. * * @param privateDnsZoneArmResourceId the privateDnsZoneArmResourceId value to set. * @return the Network object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResource.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendation.java similarity index 59% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResource.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendation.java index 3203a448662e..fd9230227f2d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResource.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendation.java @@ -5,14 +5,14 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.IndexRecommendationResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; import java.time.OffsetDateTime; import java.util.List; /** - * An immutable client-side representation of IndexRecommendationResource. + * An immutable client-side representation of ObjectRecommendation. */ -public interface IndexRecommendationResource { +public interface ObjectRecommendation { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -34,6 +34,13 @@ public interface IndexRecommendationResource { */ String type(); + /** + * Gets the kind property: Always empty. + * + * @return the kind value. + */ + String kind(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -42,29 +49,29 @@ public interface IndexRecommendationResource { SystemData systemData(); /** - * Gets the initialRecommendedTime property: Creation time of this recommendation in UTC date-time string format. + * Gets the initialRecommendedTime property: Creation time (UTC) of this recommendation. * * @return the initialRecommendedTime value. */ OffsetDateTime initialRecommendedTime(); /** - * Gets the lastRecommendedTime property: The last refresh of this recommendation in UTC date-time string format. + * Gets the lastRecommendedTime property: Last time (UTC) that this recommendation was produced. * * @return the lastRecommendedTime value. */ OffsetDateTime lastRecommendedTime(); /** - * Gets the timesRecommended property: The number of times this recommendation has encountered. + * Gets the timesRecommended property: Number of times this recommendation has been produced. * * @return the timesRecommended value. */ Integer timesRecommended(); /** - * Gets the improvedQueryIds property: The ImprovedQueryIds. The list will only be populated for CREATE INDEX - * recommendations. + * Gets the improvedQueryIds property: List of identifiers for all queries identified as targets for improvement if + * the recommendation is applied. The list is only populated for CREATE INDEX recommendations. * * @return the improvedQueryIds value. */ @@ -77,6 +84,13 @@ public interface IndexRecommendationResource { */ String recommendationReason(); + /** + * Gets the currentState property: Current state. + * + * @return the currentState value. + */ + String currentState(); + /** * Gets the recommendationType property: Type for this recommendation. * @@ -85,38 +99,37 @@ public interface IndexRecommendationResource { RecommendationTypeEnum recommendationType(); /** - * Gets the implementationDetails property: Stores implementation details for the recommended action. + * Gets the implementationDetails property: Implementation details for the recommended action. * * @return the implementationDetails value. */ - IndexRecommendationResourcePropertiesImplementationDetails implementationDetails(); + ObjectRecommendationPropertiesImplementationDetails implementationDetails(); /** - * Gets the analyzedWorkload property: Stores workload information for the recommended action. + * Gets the analyzedWorkload property: Workload information for the recommended action. * * @return the analyzedWorkload value. */ - IndexRecommendationResourcePropertiesAnalyzedWorkload analyzedWorkload(); + ObjectRecommendationPropertiesAnalyzedWorkload analyzedWorkload(); /** - * Gets the estimatedImpact property: The estimated impact of this recommended action. + * Gets the estimatedImpact property: Estimated impact of this recommended action. * * @return the estimatedImpact value. */ List estimatedImpact(); /** - * Gets the details property: Stores recommendation details for the recommended action. + * Gets the details property: Recommendation details for the recommended action. * * @return the details value. */ - IndexRecommendationDetails details(); + ObjectRecommendationDetails details(); /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.IndexRecommendationResourceInner - * object. + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner object. * * @return the inner object. */ - IndexRecommendationResourceInner innerModel(); + ObjectRecommendationInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationDetails.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationDetails.java similarity index 70% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationDetails.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationDetails.java index fccf2dc9e73b..24640033c675 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationDetails.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationDetails.java @@ -16,7 +16,7 @@ * Recommendation details for the recommended action. */ @Fluent -public final class IndexRecommendationDetails implements JsonSerializable { +public final class ObjectRecommendationDetails implements JsonSerializable { /* * Database name. */ @@ -53,9 +53,9 @@ public final class IndexRecommendationDetails implements JsonSerializable includedColumns; /** - * Creates an instance of IndexRecommendationDetails class. + * Creates an instance of ObjectRecommendationDetails class. */ - public IndexRecommendationDetails() { + public ObjectRecommendationDetails() { } /** @@ -71,9 +71,9 @@ public String databaseName() { * Set the databaseName property: Database name. * * @param databaseName the databaseName value to set. - * @return the IndexRecommendationDetails object itself. + * @return the ObjectRecommendationDetails object itself. */ - public IndexRecommendationDetails withDatabaseName(String databaseName) { + public ObjectRecommendationDetails withDatabaseName(String databaseName) { this.databaseName = databaseName; return this; } @@ -91,9 +91,9 @@ public String schema() { * Set the schema property: Schema name. * * @param schema the schema value to set. - * @return the IndexRecommendationDetails object itself. + * @return the ObjectRecommendationDetails object itself. */ - public IndexRecommendationDetails withSchema(String schema) { + public ObjectRecommendationDetails withSchema(String schema) { this.schema = schema; return this; } @@ -111,9 +111,9 @@ public String table() { * Set the table property: Table name. * * @param table the table value to set. - * @return the IndexRecommendationDetails object itself. + * @return the ObjectRecommendationDetails object itself. */ - public IndexRecommendationDetails withTable(String table) { + public ObjectRecommendationDetails withTable(String table) { this.table = table; return this; } @@ -131,9 +131,9 @@ public String indexType() { * Set the indexType property: Index type. * * @param indexType the indexType value to set. - * @return the IndexRecommendationDetails object itself. + * @return the ObjectRecommendationDetails object itself. */ - public IndexRecommendationDetails withIndexType(String indexType) { + public ObjectRecommendationDetails withIndexType(String indexType) { this.indexType = indexType; return this; } @@ -151,9 +151,9 @@ public String indexName() { * Set the indexName property: Index name. * * @param indexName the indexName value to set. - * @return the IndexRecommendationDetails object itself. + * @return the ObjectRecommendationDetails object itself. */ - public IndexRecommendationDetails withIndexName(String indexName) { + public ObjectRecommendationDetails withIndexName(String indexName) { this.indexName = indexName; return this; } @@ -171,9 +171,9 @@ public List indexColumns() { * Set the indexColumns property: Index columns. * * @param indexColumns the indexColumns value to set. - * @return the IndexRecommendationDetails object itself. + * @return the ObjectRecommendationDetails object itself. */ - public IndexRecommendationDetails withIndexColumns(List indexColumns) { + public ObjectRecommendationDetails withIndexColumns(List indexColumns) { this.indexColumns = indexColumns; return this; } @@ -191,9 +191,9 @@ public List includedColumns() { * Set the includedColumns property: Index included columns. * * @param includedColumns the includedColumns value to set. - * @return the IndexRecommendationDetails object itself. + * @return the ObjectRecommendationDetails object itself. */ - public IndexRecommendationDetails withIncludedColumns(List includedColumns) { + public ObjectRecommendationDetails withIncludedColumns(List includedColumns) { this.includedColumns = includedColumns; return this; } @@ -224,42 +224,42 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of IndexRecommendationDetails from the JsonReader. + * Reads an instance of ObjectRecommendationDetails from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of IndexRecommendationDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IndexRecommendationDetails. + * @return An instance of ObjectRecommendationDetails if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ObjectRecommendationDetails. */ - public static IndexRecommendationDetails fromJson(JsonReader jsonReader) throws IOException { + public static ObjectRecommendationDetails fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - IndexRecommendationDetails deserializedIndexRecommendationDetails = new IndexRecommendationDetails(); + ObjectRecommendationDetails deserializedObjectRecommendationDetails = new ObjectRecommendationDetails(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("databaseName".equals(fieldName)) { - deserializedIndexRecommendationDetails.databaseName = reader.getString(); + deserializedObjectRecommendationDetails.databaseName = reader.getString(); } else if ("schema".equals(fieldName)) { - deserializedIndexRecommendationDetails.schema = reader.getString(); + deserializedObjectRecommendationDetails.schema = reader.getString(); } else if ("table".equals(fieldName)) { - deserializedIndexRecommendationDetails.table = reader.getString(); + deserializedObjectRecommendationDetails.table = reader.getString(); } else if ("indexType".equals(fieldName)) { - deserializedIndexRecommendationDetails.indexType = reader.getString(); + deserializedObjectRecommendationDetails.indexType = reader.getString(); } else if ("indexName".equals(fieldName)) { - deserializedIndexRecommendationDetails.indexName = reader.getString(); + deserializedObjectRecommendationDetails.indexName = reader.getString(); } else if ("indexColumns".equals(fieldName)) { List indexColumns = reader.readArray(reader1 -> reader1.getString()); - deserializedIndexRecommendationDetails.indexColumns = indexColumns; + deserializedObjectRecommendationDetails.indexColumns = indexColumns; } else if ("includedColumns".equals(fieldName)) { List includedColumns = reader.readArray(reader1 -> reader1.getString()); - deserializedIndexRecommendationDetails.includedColumns = includedColumns; + deserializedObjectRecommendationDetails.includedColumns = includedColumns; } else { reader.skipChildren(); } } - return deserializedIndexRecommendationDetails; + return deserializedObjectRecommendationDetails; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionDetailsListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationList.java similarity index 56% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionDetailsListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationList.java index 6a0193fbdba9..7b76bcc71f93 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionDetailsListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationList.java @@ -9,55 +9,53 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionDetailsResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; import java.io.IOException; import java.util.List; /** - * A list of tuning configuration sessions. + * List of available object recommendations. */ @Fluent -public final class SessionDetailsListResult implements JsonSerializable { +public final class ObjectRecommendationList implements JsonSerializable { /* - * A list of details of the session. + * List of available object recommendations. */ - private List value; + private List value; /* - * URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. + * Link used to get the next page of results. */ private String nextLink; /** - * Creates an instance of SessionDetailsListResult class. + * Creates an instance of ObjectRecommendationList class. */ - public SessionDetailsListResult() { + public ObjectRecommendationList() { } /** - * Get the value property: A list of details of the session. + * Get the value property: List of available object recommendations. * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** - * Set the value property: A list of details of the session. + * Set the value property: List of available object recommendations. * * @param value the value value to set. - * @return the SessionDetailsListResult object itself. + * @return the ObjectRecommendationList object itself. */ - public SessionDetailsListResult withValue(List value) { + public ObjectRecommendationList withValue(List value) { this.value = value; return this; } /** - * Get the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. + * Get the nextLink property: Link used to get the next page of results. * * @return the nextLink value. */ @@ -66,13 +64,12 @@ public String nextLink() { } /** - * Set the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. + * Set the nextLink property: Link used to get the next page of results. * * @param nextLink the nextLink value to set. - * @return the SessionDetailsListResult object itself. + * @return the ObjectRecommendationList object itself. */ - public SessionDetailsListResult withNextLink(String nextLink) { + public ObjectRecommendationList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } @@ -100,32 +97,32 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of SessionDetailsListResult from the JsonReader. + * Reads an instance of ObjectRecommendationList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of SessionDetailsListResult if the JsonReader was pointing to an instance of it, or null if + * @return An instance of ObjectRecommendationList if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SessionDetailsListResult. + * @throws IOException If an error occurs while reading the ObjectRecommendationList. */ - public static SessionDetailsListResult fromJson(JsonReader jsonReader) throws IOException { + public static ObjectRecommendationList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - SessionDetailsListResult deserializedSessionDetailsListResult = new SessionDetailsListResult(); + ObjectRecommendationList deserializedObjectRecommendationList = new ObjectRecommendationList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> SessionDetailsResourceInner.fromJson(reader1)); - deserializedSessionDetailsListResult.value = value; + List value + = reader.readArray(reader1 -> ObjectRecommendationInner.fromJson(reader1)); + deserializedObjectRecommendationList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedSessionDetailsListResult.nextLink = reader.getString(); + deserializedObjectRecommendationList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedSessionDetailsListResult; + return deserializedObjectRecommendationList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResourcePropertiesAnalyzedWorkload.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesAnalyzedWorkload.java similarity index 55% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResourcePropertiesAnalyzedWorkload.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesAnalyzedWorkload.java index a4f20b53c738..74b1aface6e4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResourcePropertiesAnalyzedWorkload.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesAnalyzedWorkload.java @@ -15,34 +15,35 @@ import java.time.format.DateTimeFormatter; /** - * Stores workload information for the recommended action. + * Workload information for the recommended action. */ @Fluent -public final class IndexRecommendationResourcePropertiesAnalyzedWorkload - implements JsonSerializable { +public final class ObjectRecommendationPropertiesAnalyzedWorkload + implements JsonSerializable { /* - * Workload start time in UTC date-time string format. + * Start time (UTC) of the workload analyzed. */ private OffsetDateTime startTime; /* - * Workload end time in UTC date-time string format. + * End time (UTC) of the workload analyzed. */ private OffsetDateTime endTime; /* - * Workload query examined count. For DROP INDEX will be 0. + * Number of queries from the workload that were examined to produce this recommendation. For DROP INDEX + * recommendations it's 0 (zero). */ private Integer queryCount; /** - * Creates an instance of IndexRecommendationResourcePropertiesAnalyzedWorkload class. + * Creates an instance of ObjectRecommendationPropertiesAnalyzedWorkload class. */ - public IndexRecommendationResourcePropertiesAnalyzedWorkload() { + public ObjectRecommendationPropertiesAnalyzedWorkload() { } /** - * Get the startTime property: Workload start time in UTC date-time string format. + * Get the startTime property: Start time (UTC) of the workload analyzed. * * @return the startTime value. */ @@ -51,18 +52,18 @@ public OffsetDateTime startTime() { } /** - * Set the startTime property: Workload start time in UTC date-time string format. + * Set the startTime property: Start time (UTC) of the workload analyzed. * * @param startTime the startTime value to set. - * @return the IndexRecommendationResourcePropertiesAnalyzedWorkload object itself. + * @return the ObjectRecommendationPropertiesAnalyzedWorkload object itself. */ - public IndexRecommendationResourcePropertiesAnalyzedWorkload withStartTime(OffsetDateTime startTime) { + public ObjectRecommendationPropertiesAnalyzedWorkload withStartTime(OffsetDateTime startTime) { this.startTime = startTime; return this; } /** - * Get the endTime property: Workload end time in UTC date-time string format. + * Get the endTime property: End time (UTC) of the workload analyzed. * * @return the endTime value. */ @@ -71,18 +72,19 @@ public OffsetDateTime endTime() { } /** - * Set the endTime property: Workload end time in UTC date-time string format. + * Set the endTime property: End time (UTC) of the workload analyzed. * * @param endTime the endTime value to set. - * @return the IndexRecommendationResourcePropertiesAnalyzedWorkload object itself. + * @return the ObjectRecommendationPropertiesAnalyzedWorkload object itself. */ - public IndexRecommendationResourcePropertiesAnalyzedWorkload withEndTime(OffsetDateTime endTime) { + public ObjectRecommendationPropertiesAnalyzedWorkload withEndTime(OffsetDateTime endTime) { this.endTime = endTime; return this; } /** - * Get the queryCount property: Workload query examined count. For DROP INDEX will be 0. + * Get the queryCount property: Number of queries from the workload that were examined to produce this + * recommendation. For DROP INDEX recommendations it's 0 (zero). * * @return the queryCount value. */ @@ -91,12 +93,13 @@ public Integer queryCount() { } /** - * Set the queryCount property: Workload query examined count. For DROP INDEX will be 0. + * Set the queryCount property: Number of queries from the workload that were examined to produce this + * recommendation. For DROP INDEX recommendations it's 0 (zero). * * @param queryCount the queryCount value to set. - * @return the IndexRecommendationResourcePropertiesAnalyzedWorkload object itself. + * @return the ObjectRecommendationPropertiesAnalyzedWorkload object itself. */ - public IndexRecommendationResourcePropertiesAnalyzedWorkload withQueryCount(Integer queryCount) { + public ObjectRecommendationPropertiesAnalyzedWorkload withQueryCount(Integer queryCount) { this.queryCount = queryCount; return this; } @@ -124,37 +127,36 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of IndexRecommendationResourcePropertiesAnalyzedWorkload from the JsonReader. + * Reads an instance of ObjectRecommendationPropertiesAnalyzedWorkload from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of IndexRecommendationResourcePropertiesAnalyzedWorkload if the JsonReader was pointing to an + * @return An instance of ObjectRecommendationPropertiesAnalyzedWorkload if the JsonReader was pointing to an * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IndexRecommendationResourcePropertiesAnalyzedWorkload. + * @throws IOException If an error occurs while reading the ObjectRecommendationPropertiesAnalyzedWorkload. */ - public static IndexRecommendationResourcePropertiesAnalyzedWorkload fromJson(JsonReader jsonReader) - throws IOException { + public static ObjectRecommendationPropertiesAnalyzedWorkload fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - IndexRecommendationResourcePropertiesAnalyzedWorkload deserializedIndexRecommendationResourcePropertiesAnalyzedWorkload - = new IndexRecommendationResourcePropertiesAnalyzedWorkload(); + ObjectRecommendationPropertiesAnalyzedWorkload deserializedObjectRecommendationPropertiesAnalyzedWorkload + = new ObjectRecommendationPropertiesAnalyzedWorkload(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("startTime".equals(fieldName)) { - deserializedIndexRecommendationResourcePropertiesAnalyzedWorkload.startTime = reader + deserializedObjectRecommendationPropertiesAnalyzedWorkload.startTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endTime".equals(fieldName)) { - deserializedIndexRecommendationResourcePropertiesAnalyzedWorkload.endTime = reader + deserializedObjectRecommendationPropertiesAnalyzedWorkload.endTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("queryCount".equals(fieldName)) { - deserializedIndexRecommendationResourcePropertiesAnalyzedWorkload.queryCount + deserializedObjectRecommendationPropertiesAnalyzedWorkload.queryCount = reader.getNullable(JsonReader::getInt); } else { reader.skipChildren(); } } - return deserializedIndexRecommendationResourcePropertiesAnalyzedWorkload; + return deserializedObjectRecommendationPropertiesAnalyzedWorkload; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResourcePropertiesImplementationDetails.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesImplementationDetails.java similarity index 54% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResourcePropertiesImplementationDetails.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesImplementationDetails.java index 62f9bd9fac37..2e34b6d9b494 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResourcePropertiesImplementationDetails.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesImplementationDetails.java @@ -12,25 +12,25 @@ import java.io.IOException; /** - * Stores implementation details for the recommended action. + * Implementation details for the recommended action. */ @Fluent -public final class IndexRecommendationResourcePropertiesImplementationDetails - implements JsonSerializable { +public final class ObjectRecommendationPropertiesImplementationDetails + implements JsonSerializable { /* - * Method of implementation for recommended action + * Method of implementation for recommended action. */ private String method; /* - * Implementation script for the recommended action + * Implementation script for the recommended action. */ private String script; /** - * Creates an instance of IndexRecommendationResourcePropertiesImplementationDetails class. + * Creates an instance of ObjectRecommendationPropertiesImplementationDetails class. */ - public IndexRecommendationResourcePropertiesImplementationDetails() { + public ObjectRecommendationPropertiesImplementationDetails() { } /** @@ -46,9 +46,9 @@ public String method() { * Set the method property: Method of implementation for recommended action. * * @param method the method value to set. - * @return the IndexRecommendationResourcePropertiesImplementationDetails object itself. + * @return the ObjectRecommendationPropertiesImplementationDetails object itself. */ - public IndexRecommendationResourcePropertiesImplementationDetails withMethod(String method) { + public ObjectRecommendationPropertiesImplementationDetails withMethod(String method) { this.method = method; return this; } @@ -66,9 +66,9 @@ public String script() { * Set the script property: Implementation script for the recommended action. * * @param script the script value to set. - * @return the IndexRecommendationResourcePropertiesImplementationDetails object itself. + * @return the ObjectRecommendationPropertiesImplementationDetails object itself. */ - public IndexRecommendationResourcePropertiesImplementationDetails withScript(String script) { + public ObjectRecommendationPropertiesImplementationDetails withScript(String script) { this.script = script; return this; } @@ -93,33 +93,32 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of IndexRecommendationResourcePropertiesImplementationDetails from the JsonReader. + * Reads an instance of ObjectRecommendationPropertiesImplementationDetails from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of IndexRecommendationResourcePropertiesImplementationDetails if the JsonReader was pointing - * to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * IndexRecommendationResourcePropertiesImplementationDetails. + * @return An instance of ObjectRecommendationPropertiesImplementationDetails if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ObjectRecommendationPropertiesImplementationDetails. */ - public static IndexRecommendationResourcePropertiesImplementationDetails fromJson(JsonReader jsonReader) + public static ObjectRecommendationPropertiesImplementationDetails fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - IndexRecommendationResourcePropertiesImplementationDetails deserializedIndexRecommendationResourcePropertiesImplementationDetails - = new IndexRecommendationResourcePropertiesImplementationDetails(); + ObjectRecommendationPropertiesImplementationDetails deserializedObjectRecommendationPropertiesImplementationDetails + = new ObjectRecommendationPropertiesImplementationDetails(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("method".equals(fieldName)) { - deserializedIndexRecommendationResourcePropertiesImplementationDetails.method = reader.getString(); + deserializedObjectRecommendationPropertiesImplementationDetails.method = reader.getString(); } else if ("script".equals(fieldName)) { - deserializedIndexRecommendationResourcePropertiesImplementationDetails.script = reader.getString(); + deserializedObjectRecommendationPropertiesImplementationDetails.script = reader.getString(); } else { reader.skipChildren(); } } - return deserializedIndexRecommendationResourcePropertiesImplementationDetails; + return deserializedObjectRecommendationPropertiesImplementationDetails; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineResizeSupportedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineResizeSupportedEnum.java deleted file mode 100644 index 87b9162a1709..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineResizeSupportedEnum.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether online resize is supported in this region for the given subscription. "Enabled" means - * storage online resize is supported. "Disabled" means storage online resize is not supported. Will be deprecated in - * future, please look to Supported Features for "OnlineResize". - */ -public final class OnlineResizeSupportedEnum extends ExpandableStringEnum { - /** - * Static value Enabled for OnlineResizeSupportedEnum. - */ - public static final OnlineResizeSupportedEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for OnlineResizeSupportedEnum. - */ - public static final OnlineResizeSupportedEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of OnlineResizeSupportedEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OnlineResizeSupportedEnum() { - } - - /** - * Creates or finds a OnlineResizeSupportedEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding OnlineResizeSupportedEnum. - */ - public static OnlineResizeSupportedEnum fromString(String name) { - return fromString(name, OnlineResizeSupportedEnum.class); - } - - /** - * Gets known OnlineResizeSupportedEnum values. - * - * @return known OnlineResizeSupportedEnum values. - */ - public static Collection values() { - return values(OnlineResizeSupportedEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineStorageResizeSupport.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineStorageResizeSupport.java new file mode 100644 index 000000000000..faadde7dad4b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineStorageResizeSupport.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if resizing the storage, without interrupting the operation of the database engine, is supported in this + * location for the given subscription. 'Enabled' means resizing the storage without interrupting the operation of the + * database engine is supported. 'Disabled' means resizing the storage without interrupting the operation of the + * database engine is not supported. Will be deprecated in the future. Look to Supported Features for 'OnlineResize'. + */ +public final class OnlineStorageResizeSupport extends ExpandableStringEnum { + /** + * Static value Enabled for OnlineStorageResizeSupport. + */ + public static final OnlineStorageResizeSupport ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for OnlineStorageResizeSupport. + */ + public static final OnlineStorageResizeSupport DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of OnlineStorageResizeSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OnlineStorageResizeSupport() { + } + + /** + * Creates or finds a OnlineStorageResizeSupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding OnlineStorageResizeSupport. + */ + public static OnlineStorageResizeSupport fromString(String name) { + return fromString(name, OnlineStorageResizeSupport.class); + } + + /** + * Gets known OnlineStorageResizeSupport values. + * + * @return known OnlineStorageResizeSupport values. + */ + public static Collection values() { + return values(OnlineStorageResizeSupport.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operation.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operation.java index 4b2f806f69c6..c1afcdc793c3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operation.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operation.java @@ -12,28 +12,28 @@ */ public interface Operation { /** - * Gets the name property: The name of the operation being performed on this particular object. + * Gets the name property: Name of the operation being performed on this particular object. * * @return the name value. */ String name(); /** - * Gets the display property: The localized display information for this particular operation or action. + * Gets the display property: Localized display information for this particular operation or action. * * @return the display value. */ OperationDisplay display(); /** - * Gets the isDataAction property: Indicates whether the operation is a data action. + * Gets the isDataAction property: Indicates if the operation is a data action. * * @return the isDataAction value. */ Boolean isDataAction(); /** - * Gets the origin property: The intended executor of the operation. + * Gets the origin property: Intended executor of the operation. * * @return the origin value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationDisplay.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationDisplay.java index 5b22250f12e8..d2fe3603baa4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationDisplay.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationDisplay.java @@ -17,22 +17,22 @@ @Immutable public final class OperationDisplay implements JsonSerializable { /* - * Operation resource provider name. + * Name of the resource provider. */ private String provider; /* - * Resource on which the operation is performed. + * Type of resource on which the operation is performed. */ private String resource; /* - * Localized friendly name for the operation. + * Name of the operation. */ private String operation; /* - * Operation description. + * Description of the operation. */ private String description; @@ -43,7 +43,7 @@ public OperationDisplay() { } /** - * Get the provider property: Operation resource provider name. + * Get the provider property: Name of the resource provider. * * @return the provider value. */ @@ -52,7 +52,7 @@ public String provider() { } /** - * Get the resource property: Resource on which the operation is performed. + * Get the resource property: Type of resource on which the operation is performed. * * @return the resource value. */ @@ -61,7 +61,7 @@ public String resource() { } /** - * Get the operation property: Localized friendly name for the operation. + * Get the operation property: Name of the operation. * * @return the operation value. */ @@ -70,7 +70,7 @@ public String operation() { } /** - * Get the description property: Operation description. + * Get the description property: Description of the operation. * * @return the description value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationList.java similarity index 64% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationList.java index a009ba9cbd91..8c34887c3c0e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationList.java @@ -14,25 +14,24 @@ import java.util.List; /** - * A list of resource provider operations. + * List of resource provider operations. */ @Fluent -public final class OperationListResult implements JsonSerializable { +public final class OperationList implements JsonSerializable { /* * Collection of available operation details */ private List value; /* - * URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. + * Link used to get the next page of results. */ private String nextLink; /** - * Creates an instance of OperationListResult class. + * Creates an instance of OperationList class. */ - public OperationListResult() { + public OperationList() { } /** @@ -48,16 +47,15 @@ public List value() { * Set the value property: Collection of available operation details. * * @param value the value value to set. - * @return the OperationListResult object itself. + * @return the OperationList object itself. */ - public OperationListResult withValue(List value) { + public OperationList withValue(List value) { this.value = value; return this; } /** - * Get the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. + * Get the nextLink property: Link used to get the next page of results. * * @return the nextLink value. */ @@ -66,13 +64,12 @@ public String nextLink() { } /** - * Set the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. + * Set the nextLink property: Link used to get the next page of results. * * @param nextLink the nextLink value to set. - * @return the OperationListResult object itself. + * @return the OperationList object itself. */ - public OperationListResult withNextLink(String nextLink) { + public OperationList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } @@ -100,31 +97,31 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of OperationListResult from the JsonReader. + * Reads an instance of OperationList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was + * @return An instance of OperationList if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationListResult. + * @throws IOException If an error occurs while reading the OperationList. */ - public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { + public static OperationList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - OperationListResult deserializedOperationListResult = new OperationListResult(); + OperationList deserializedOperationList = new OperationList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); - deserializedOperationListResult.value = value; + deserializedOperationList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedOperationListResult.nextLink = reader.getString(); + deserializedOperationList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedOperationListResult; + return deserializedOperationList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationOrigin.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationOrigin.java index 3b04d1469f67..e5cda79be066 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationOrigin.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationOrigin.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The intended executor of the operation. + * Intended executor of the operation. */ public final class OperationOrigin extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operations.java index 21ec92f2e236..3c736f1ef48c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operations.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operations.java @@ -12,22 +12,22 @@ */ public interface Operations { /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations as paginated response with {@link PagedIterable}. + * @return list of resource provider operations as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations as paginated response with {@link PagedIterable}. + * @return list of resource provider operations as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Origin.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Origin.java deleted file mode 100644 index e7d922b5db80..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Origin.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Backup type. - */ -public final class Origin extends ExpandableStringEnum { - /** - * Static value Full for Origin. - */ - public static final Origin FULL = fromString("Full"); - - /** - * Static value Customer On-Demand for Origin. - */ - public static final Origin CUSTOMER_ON_DEMAND = fromString("Customer On-Demand"); - - /** - * Creates a new instance of Origin value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Origin() { - } - - /** - * Creates or finds a Origin from its string representation. - * - * @param name a name to look for. - * @return the corresponding Origin. - */ - public static Origin fromString(String name) { - return fromString(name, Origin.class); - } - - /** - * Gets known Origin values. - * - * @return known Origin values. - */ - public static Collection values() { - return values(Origin.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDatabasesOnTargetServer.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDatabasesOnTargetServer.java new file mode 100644 index 000000000000..5ddb664f5978 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDatabasesOnTargetServer.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if databases on the target server can be overwritten when already present. If set to 'False', when the + * migration workflow detects that the database already exists on the target server, it will wait for a confirmation. + */ +public final class OverwriteDatabasesOnTargetServer extends ExpandableStringEnum { + /** + * Static value True for OverwriteDatabasesOnTargetServer. + */ + public static final OverwriteDatabasesOnTargetServer TRUE = fromString("True"); + + /** + * Static value False for OverwriteDatabasesOnTargetServer. + */ + public static final OverwriteDatabasesOnTargetServer FALSE = fromString("False"); + + /** + * Creates a new instance of OverwriteDatabasesOnTargetServer value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OverwriteDatabasesOnTargetServer() { + } + + /** + * Creates or finds a OverwriteDatabasesOnTargetServer from its string representation. + * + * @param name a name to look for. + * @return the corresponding OverwriteDatabasesOnTargetServer. + */ + public static OverwriteDatabasesOnTargetServer fromString(String name) { + return fromString(name, OverwriteDatabasesOnTargetServer.class); + } + + /** + * Gets known OverwriteDatabasesOnTargetServer values. + * + * @return known OverwriteDatabasesOnTargetServer values. + */ + public static Collection values() { + return values(OverwriteDatabasesOnTargetServer.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDbsInTargetEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDbsInTargetEnum.java deleted file mode 100644 index 98675472ec45..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDbsInTargetEnum.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the - * migration workflow will wait for a confirmation, if it detects that the database already exists. - */ -public final class OverwriteDbsInTargetEnum extends ExpandableStringEnum { - /** - * Static value True for OverwriteDbsInTargetEnum. - */ - public static final OverwriteDbsInTargetEnum TRUE = fromString("True"); - - /** - * Static value False for OverwriteDbsInTargetEnum. - */ - public static final OverwriteDbsInTargetEnum FALSE = fromString("False"); - - /** - * Creates a new instance of OverwriteDbsInTargetEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OverwriteDbsInTargetEnum() { - } - - /** - * Creates or finds a OverwriteDbsInTargetEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding OverwriteDbsInTargetEnum. - */ - public static OverwriteDbsInTargetEnum fromString(String name) { - return fromString(name, OverwriteDbsInTargetEnum.class); - } - - /** - * Gets known OverwriteDbsInTargetEnum values. - * - * @return known OverwriteDbsInTargetEnum values. - */ - public static Collection values() { - return values(OverwriteDbsInTargetEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordAuthEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordAuthEnum.java deleted file mode 100644 index 51301b7a1c71..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordAuthEnum.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * If Enabled, Password authentication is enabled. - */ -public final class PasswordAuthEnum extends ExpandableStringEnum { - /** - * Static value Enabled for PasswordAuthEnum. - */ - public static final PasswordAuthEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for PasswordAuthEnum. - */ - public static final PasswordAuthEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of PasswordAuthEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PasswordAuthEnum() { - } - - /** - * Creates or finds a PasswordAuthEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding PasswordAuthEnum. - */ - public static PasswordAuthEnum fromString(String name) { - return fromString(name, PasswordAuthEnum.class); - } - - /** - * Gets known PasswordAuthEnum values. - * - * @return known PasswordAuthEnum values. - */ - public static Collection values() { - return values(PasswordAuthEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordBasedAuth.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordBasedAuth.java new file mode 100644 index 000000000000..16998ada41dd --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordBasedAuth.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.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if the server supports password based authentication. + */ +public final class PasswordBasedAuth extends ExpandableStringEnum { + /** + * Static value Enabled for PasswordBasedAuth. + */ + public static final PasswordBasedAuth ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for PasswordBasedAuth. + */ + public static final PasswordBasedAuth DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of PasswordBasedAuth value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PasswordBasedAuth() { + } + + /** + * Creates or finds a PasswordBasedAuth from its string representation. + * + * @param name a name to look for. + * @return the corresponding PasswordBasedAuth. + */ + public static PasswordBasedAuth fromString(String name) { + return fromString(name, PasswordBasedAuth.class); + } + + /** + * Gets known PasswordBasedAuth values. + * + * @return known PasswordBasedAuth values. + */ + public static Collection values() { + return values(PasswordBasedAuth.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PostgresMajorVersion.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PostgresMajorVersion.java new file mode 100644 index 000000000000..b3846939172c --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PostgresMajorVersion.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Major version of PostgreSQL database engine. + */ +public final class PostgresMajorVersion extends ExpandableStringEnum { + /** + * Static value 18 for PostgresMajorVersion. + */ + public static final PostgresMajorVersion ONE_EIGHT = fromString("18"); + + /** + * Static value 17 for PostgresMajorVersion. + */ + public static final PostgresMajorVersion ONE_SEVEN = fromString("17"); + + /** + * Static value 16 for PostgresMajorVersion. + */ + public static final PostgresMajorVersion ONE_SIX = fromString("16"); + + /** + * Static value 15 for PostgresMajorVersion. + */ + public static final PostgresMajorVersion ONE_FIVE = fromString("15"); + + /** + * Static value 14 for PostgresMajorVersion. + */ + public static final PostgresMajorVersion ONE_FOUR = fromString("14"); + + /** + * Static value 13 for PostgresMajorVersion. + */ + public static final PostgresMajorVersion ONE_THREE = fromString("13"); + + /** + * Static value 12 for PostgresMajorVersion. + */ + public static final PostgresMajorVersion ONE_TWO = fromString("12"); + + /** + * Static value 11 for PostgresMajorVersion. + */ + public static final PostgresMajorVersion ONE_ONE = fromString("11"); + + /** + * Creates a new instance of PostgresMajorVersion value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PostgresMajorVersion() { + } + + /** + * Creates or finds a PostgresMajorVersion from its string representation. + * + * @param name a name to look for. + * @return the corresponding PostgresMajorVersion. + */ + public static PostgresMajorVersion fromString(String name) { + return fromString(name, PostgresMajorVersion.class); + } + + /** + * Gets known PostgresMajorVersion values. + * + * @return known PostgresMajorVersion values. + */ + public static Collection values() { + return values(PostgresMajorVersion.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrincipalType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrincipalType.java index 3861d9728641..c791312fb102 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrincipalType.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrincipalType.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The principal type used to represent the type of Microsoft Entra Administrator. + * Type of Microsoft Entra principal to which the server administrator is associated. */ public final class PrincipalType extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GetPrivateDnsZoneSuffixes.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateDnsZoneSuffixes.java similarity index 69% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GetPrivateDnsZoneSuffixes.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateDnsZoneSuffixes.java index c88444d810f2..2d2647295b5b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GetPrivateDnsZoneSuffixes.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateDnsZoneSuffixes.java @@ -8,26 +8,26 @@ import com.azure.core.util.Context; /** - * Resource collection API of GetPrivateDnsZoneSuffixes. + * Resource collection API of PrivateDnsZoneSuffixes. */ -public interface GetPrivateDnsZoneSuffixes { +public interface PrivateDnsZoneSuffixes { /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private DNS zone suffix in the cloud along with {@link Response}. + * @return the private DNS zone suffix along with {@link Response}. */ - Response executeWithResponse(Context context); + Response getWithResponse(Context context); /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private DNS zone suffix in the cloud. + * @return the private DNS zone suffix. */ - String execute(); + String get(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionList.java similarity index 58% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionList.java index 14523227de14..1e11351ac766 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionList.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,25 +14,24 @@ import java.util.List; /** - * A list of private endpoint connections. + * List of private endpoint connections. */ -@Immutable -public final class PrivateEndpointConnectionListResult - implements JsonSerializable { +@Fluent +public final class PrivateEndpointConnectionList implements JsonSerializable { /* * Array of results. */ private List value; /* - * The URL to get the next set of results. + * Link used to get the next page of results. */ private String nextLink; /** - * Creates an instance of PrivateEndpointConnectionListResult class. + * Creates an instance of PrivateEndpointConnectionList class. */ - public PrivateEndpointConnectionListResult() { + public PrivateEndpointConnectionList() { } /** @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The URL to get the next set of results. + * Get the nextLink property: Link used to get the next page of results. * * @return the nextLink value. */ @@ -53,6 +52,17 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: Link used to get the next page of results. + * + * @param nextLink the nextLink value to set. + * @return the PrivateEndpointConnectionList object itself. + */ + public PrivateEndpointConnectionList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + /** * Validates the instance. * @@ -70,21 +80,22 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } /** - * Reads an instance of PrivateEndpointConnectionListResult from the JsonReader. + * Reads an instance of PrivateEndpointConnectionList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionListResult if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateEndpointConnectionListResult. + * @return An instance of PrivateEndpointConnectionList if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateEndpointConnectionList. */ - public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) throws IOException { + public static PrivateEndpointConnectionList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - PrivateEndpointConnectionListResult deserializedPrivateEndpointConnectionListResult - = new PrivateEndpointConnectionListResult(); + PrivateEndpointConnectionList deserializedPrivateEndpointConnectionList + = new PrivateEndpointConnectionList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -92,15 +103,15 @@ public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); - deserializedPrivateEndpointConnectionListResult.value = value; + deserializedPrivateEndpointConnectionList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedPrivateEndpointConnectionListResult.nextLink = reader.getString(); + deserializedPrivateEndpointConnectionList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedPrivateEndpointConnectionListResult; + return deserializedPrivateEndpointConnectionList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionOperations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionOperations.java deleted file mode 100644 index 842fffe652c9..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionOperations.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; - -/** - * Resource collection API of PrivateEndpointConnectionOperations. - */ -public interface PrivateEndpointConnectionOperations { - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection resource. - */ - PrivateEndpointConnection update(String resourceGroupName, String serverName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters); - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection resource. - */ - PrivateEndpointConnection update(String resourceGroupName, String serverName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, Context context); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnections.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnections.java index 8c858de04154..f8eb70a3b453 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnections.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnections.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; /** * Resource collection API of PrivateEndpointConnections. @@ -41,19 +42,75 @@ Response getWithResponse(String resourceGroupName, St PrivateEndpointConnection get(String resourceGroupName, String serverName, String privateEndpointConnectionName); /** - * Gets all private endpoint connections on a server. + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private endpoint connection resource. + */ + PrivateEndpointConnection update(String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters); + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private endpoint connection resource. + */ + PrivateEndpointConnection update(String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, Context context); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context); + + /** + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. + * @return list of private endpoint connections as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets all private endpoint connections on a server. + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -61,7 +118,7 @@ Response getWithResponse(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. + * @return list of private endpoint connections as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceList.java similarity index 64% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceList.java index 5dc1a8b2446f..a93a9bf36982 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceList.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,8 +16,8 @@ /** * A list of private link resources. */ -@Immutable -public final class PrivateLinkResourceListResult implements JsonSerializable { +@Fluent +public final class PrivateLinkResourceList implements JsonSerializable { /* * Array of results. */ @@ -29,9 +29,9 @@ public final class PrivateLinkResourceListResult implements JsonSerializable { - PrivateLinkResourceListResult deserializedPrivateLinkResourceListResult - = new PrivateLinkResourceListResult(); + PrivateLinkResourceList deserializedPrivateLinkResourceList = new PrivateLinkResourceList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -91,15 +102,15 @@ public static PrivateLinkResourceListResult fromJson(JsonReader jsonReader) thro if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> PrivateLinkResourceInner.fromJson(reader1)); - deserializedPrivateLinkResourceListResult.value = value; + deserializedPrivateLinkResourceList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedPrivateLinkResourceListResult.nextLink = reader.getString(); + deserializedPrivateLinkResourceList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedPrivateLinkResourceListResult; + return deserializedPrivateLinkResourceList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsage.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsage.java index 42fc8e3aba59..0044cd095fbb 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsage.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsage.java @@ -11,7 +11,7 @@ */ public interface QuotaUsage { /** - * Gets the name property: Name of quota usage for flexible servers. + * Gets the name property: Name of quota usage for servers. * * @return the name value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsagesListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsageList.java similarity index 66% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsagesListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsageList.java index 30745c74c1f3..a21cdcb5c556 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsagesListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsageList.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,8 +16,8 @@ /** * Capability for the PostgreSQL server. */ -@Immutable -public final class QuotaUsagesListResult implements JsonSerializable { +@Fluent +public final class QuotaUsageList implements JsonSerializable { /* * A list of quota usages. */ @@ -29,9 +29,9 @@ public final class QuotaUsagesListResult implements JsonSerializable { - QuotaUsagesListResult deserializedQuotaUsagesListResult = new QuotaUsagesListResult(); + QuotaUsageList deserializedQuotaUsageList = new QuotaUsageList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> QuotaUsageInner.fromJson(reader1)); - deserializedQuotaUsagesListResult.value = value; + deserializedQuotaUsageList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedQuotaUsagesListResult.nextLink = reader.getString(); + deserializedQuotaUsageList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedQuotaUsagesListResult; + return deserializedQuotaUsageList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteMode.java index dab7f7eff01b..c972f8a7d05c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteMode.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteMode.java @@ -8,18 +8,20 @@ import java.util.Collection; /** - * Sets the promote mode for a replica server. This is a write only property. + * Type of operation to apply on the read replica. This property is write only. Standalone means that the read replica + * will be promoted to a standalone server, and will become a completely independent entity from the replication set. + * Switchover means that the read replica will roles with the primary server. */ public final class ReadReplicaPromoteMode extends ExpandableStringEnum { /** - * Static value standalone for ReadReplicaPromoteMode. + * Static value Standalone for ReadReplicaPromoteMode. */ - public static final ReadReplicaPromoteMode STANDALONE = fromString("standalone"); + public static final ReadReplicaPromoteMode STANDALONE = fromString("Standalone"); /** - * Static value switchover for ReadReplicaPromoteMode. + * Static value Switchover for ReadReplicaPromoteMode. */ - public static final ReadReplicaPromoteMode SWITCHOVER = fromString("switchover"); + public static final ReadReplicaPromoteMode SWITCHOVER = fromString("Switchover"); /** * Creates a new instance of ReadReplicaPromoteMode value. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteOption.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteOption.java new file mode 100644 index 000000000000..10b4fc9ea6d9 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteOption.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Data synchronization option to use when processing the operation specified in the promoteMode property. This property + * is write only. + */ +public final class ReadReplicaPromoteOption extends ExpandableStringEnum { + /** + * Static value Planned for ReadReplicaPromoteOption. + */ + public static final ReadReplicaPromoteOption PLANNED = fromString("Planned"); + + /** + * Static value Forced for ReadReplicaPromoteOption. + */ + public static final ReadReplicaPromoteOption FORCED = fromString("Forced"); + + /** + * Creates a new instance of ReadReplicaPromoteOption value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ReadReplicaPromoteOption() { + } + + /** + * Creates or finds a ReadReplicaPromoteOption from its string representation. + * + * @param name a name to look for. + * @return the corresponding ReadReplicaPromoteOption. + */ + public static ReadReplicaPromoteOption fromString(String name) { + return fromString(name, ReadReplicaPromoteOption.class); + } + + /** + * Gets known ReadReplicaPromoteOption values. + * + * @return known ReadReplicaPromoteOption values. + */ + public static Collection values() { + return values(ReadReplicaPromoteOption.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationType.java deleted file mode 100644 index 884e90b6f9a0..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for RecommendationType. - */ -public final class RecommendationType extends ExpandableStringEnum { - /** - * Static value CreateIndex for RecommendationType. - */ - public static final RecommendationType CREATE_INDEX = fromString("CreateIndex"); - - /** - * Static value DropIndex for RecommendationType. - */ - public static final RecommendationType DROP_INDEX = fromString("DropIndex"); - - /** - * Creates a new instance of RecommendationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RecommendationType() { - } - - /** - * Creates or finds a RecommendationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding RecommendationType. - */ - public static RecommendationType fromString(String name) { - return fromString(name, RecommendationType.class); - } - - /** - * Gets known RecommendationType values. - * - * @return known RecommendationType values. - */ - public static Collection values() { - return values(RecommendationType.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeEnum.java index c50400a131fd..2e8af8ac605e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeEnum.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeEnum.java @@ -26,6 +26,11 @@ public final class RecommendationTypeEnum extends ExpandableStringEnum { + /** + * Static value CreateIndex for RecommendationTypeParameterEnum. + */ + public static final RecommendationTypeParameterEnum CREATE_INDEX = fromString("CreateIndex"); + + /** + * Static value DropIndex for RecommendationTypeParameterEnum. + */ + public static final RecommendationTypeParameterEnum DROP_INDEX = fromString("DropIndex"); + + /** + * Static value ReIndex for RecommendationTypeParameterEnum. + */ + public static final RecommendationTypeParameterEnum RE_INDEX = fromString("ReIndex"); + + /** + * Static value AnalyzeTable for RecommendationTypeParameterEnum. + */ + public static final RecommendationTypeParameterEnum ANALYZE_TABLE = fromString("AnalyzeTable"); + + /** + * Creates a new instance of RecommendationTypeParameterEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RecommendationTypeParameterEnum() { + } + + /** + * Creates or finds a RecommendationTypeParameterEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding RecommendationTypeParameterEnum. + */ + public static RecommendationTypeParameterEnum fromString(String name) { + return fromString(name, RecommendationTypeParameterEnum.class); + } + + /** + * Gets known RecommendationTypeParameterEnum values. + * + * @return known RecommendationTypeParameterEnum values. + */ + public static Collection values() { + return values(RecommendationTypeParameterEnum.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replica.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replica.java index d0805d9180c5..c771b5214aa8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replica.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replica.java @@ -17,30 +17,33 @@ @Fluent public final class Replica implements JsonSerializable { /* - * Used to indicate role of the server in replication set. + * Role of the server in a replication set. */ private ReplicationRole role; /* - * Replicas allowed for a server. + * Maximum number of read replicas allowed for a server. */ private Integer capacity; /* - * Gets the replication state of a replica server. This property is returned only for replicas api call. Supported - * values are Active, Catchup, Provisioning, Updating, Broken, Reconfiguring + * Indicates the replication state of a read replica. This property is returned only when the target server is a + * read replica. Possible values are Active, Broken, Catchup, Provisioning, Reconfiguring, and Updating */ private ReplicationState replicationState; /* - * Sets the promote mode for a replica server. This is a write only property. + * Type of operation to apply on the read replica. This property is write only. Standalone means that the read + * replica will be promoted to a standalone server, and will become a completely independent entity from the + * replication set. Switchover means that the read replica will roles with the primary server. */ private ReadReplicaPromoteMode promoteMode; /* - * Sets the promote options for a replica server. This is a write only property. + * Data synchronization option to use when processing the operation specified in the promoteMode property. This + * property is write only. */ - private ReplicationPromoteOption promoteOption; + private ReadReplicaPromoteOption promoteOption; /** * Creates an instance of Replica class. @@ -49,7 +52,7 @@ public Replica() { } /** - * Get the role property: Used to indicate role of the server in replication set. + * Get the role property: Role of the server in a replication set. * * @return the role value. */ @@ -58,7 +61,7 @@ public ReplicationRole role() { } /** - * Set the role property: Used to indicate role of the server in replication set. + * Set the role property: Role of the server in a replication set. * * @param role the role value to set. * @return the Replica object itself. @@ -69,7 +72,7 @@ public Replica withRole(ReplicationRole role) { } /** - * Get the capacity property: Replicas allowed for a server. + * Get the capacity property: Maximum number of read replicas allowed for a server. * * @return the capacity value. */ @@ -78,8 +81,9 @@ public Integer capacity() { } /** - * Get the replicationState property: Gets the replication state of a replica server. This property is returned only - * for replicas api call. Supported values are Active, Catchup, Provisioning, Updating, Broken, Reconfiguring. + * Get the replicationState property: Indicates the replication state of a read replica. This property is returned + * only when the target server is a read replica. Possible values are Active, Broken, Catchup, Provisioning, + * Reconfiguring, and Updating. * * @return the replicationState value. */ @@ -88,7 +92,10 @@ public ReplicationState replicationState() { } /** - * Get the promoteMode property: Sets the promote mode for a replica server. This is a write only property. + * Get the promoteMode property: Type of operation to apply on the read replica. This property is write only. + * Standalone means that the read replica will be promoted to a standalone server, and will become a completely + * independent entity from the replication set. Switchover means that the read replica will roles with the primary + * server. * * @return the promoteMode value. */ @@ -97,7 +104,10 @@ public ReadReplicaPromoteMode promoteMode() { } /** - * Set the promoteMode property: Sets the promote mode for a replica server. This is a write only property. + * Set the promoteMode property: Type of operation to apply on the read replica. This property is write only. + * Standalone means that the read replica will be promoted to a standalone server, and will become a completely + * independent entity from the replication set. Switchover means that the read replica will roles with the primary + * server. * * @param promoteMode the promoteMode value to set. * @return the Replica object itself. @@ -108,21 +118,23 @@ public Replica withPromoteMode(ReadReplicaPromoteMode promoteMode) { } /** - * Get the promoteOption property: Sets the promote options for a replica server. This is a write only property. + * Get the promoteOption property: Data synchronization option to use when processing the operation specified in the + * promoteMode property. This property is write only. * * @return the promoteOption value. */ - public ReplicationPromoteOption promoteOption() { + public ReadReplicaPromoteOption promoteOption() { return this.promoteOption; } /** - * Set the promoteOption property: Sets the promote options for a replica server. This is a write only property. + * Set the promoteOption property: Data synchronization option to use when processing the operation specified in the + * promoteMode property. This property is write only. * * @param promoteOption the promoteOption value to set. * @return the Replica object itself. */ - public Replica withPromoteOption(ReplicationPromoteOption promoteOption) { + public Replica withPromoteOption(ReadReplicaPromoteOption promoteOption) { this.promoteOption = promoteOption; return this; } @@ -171,7 +183,7 @@ public static Replica fromJson(JsonReader jsonReader) throws IOException { } else if ("promoteMode".equals(fieldName)) { deserializedReplica.promoteMode = ReadReplicaPromoteMode.fromString(reader.getString()); } else if ("promoteOption".equals(fieldName)) { - deserializedReplica.promoteOption = ReplicationPromoteOption.fromString(reader.getString()); + deserializedReplica.promoteOption = ReadReplicaPromoteOption.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replicas.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replicas.java index 5b670bf3deb4..fa95fe78bf23 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replicas.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replicas.java @@ -12,7 +12,7 @@ */ public interface Replicas { /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -24,7 +24,7 @@ public interface Replicas { PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationPromoteOption.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationPromoteOption.java deleted file mode 100644 index a8937dbd5ed9..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationPromoteOption.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Sets the promote options for a replica server. This is a write only property. - */ -public final class ReplicationPromoteOption extends ExpandableStringEnum { - /** - * Static value planned for ReplicationPromoteOption. - */ - public static final ReplicationPromoteOption PLANNED = fromString("planned"); - - /** - * Static value forced for ReplicationPromoteOption. - */ - public static final ReplicationPromoteOption FORCED = fromString("forced"); - - /** - * Creates a new instance of ReplicationPromoteOption value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ReplicationPromoteOption() { - } - - /** - * Creates or finds a ReplicationPromoteOption from its string representation. - * - * @param name a name to look for. - * @return the corresponding ReplicationPromoteOption. - */ - public static ReplicationPromoteOption fromString(String name) { - return fromString(name, ReplicationPromoteOption.class); - } - - /** - * Gets known ReplicationPromoteOption values. - * - * @return known ReplicationPromoteOption values. - */ - public static Collection values() { - return values(ReplicationPromoteOption.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationRole.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationRole.java index ae7f74ce4717..bb64fc3cf56c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationRole.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationRole.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Used to indicate role of the server in replication set. + * Role of the server in a replication set. */ public final class ReplicationRole extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationState.java index 1b71b1d08b40..46041d3abf52 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationState.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationState.java @@ -8,8 +8,8 @@ import java.util.Collection; /** - * Gets the replication state of a replica server. This property is returned only for replicas api call. Supported - * values are Active, Catchup, Provisioning, Updating, Broken, Reconfiguring. + * Indicates the replication state of a read replica. This property is returned only when the target server is a read + * replica. Possible values are Active, Broken, Catchup, Provisioning, Reconfiguring, and Updating. */ public final class ReplicationState extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ResourceProviders.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ResourceProviders.java deleted file mode 100644 index 69fa542400f5..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ResourceProviders.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; - -/** - * Resource collection API of ResourceProviders. - */ -public interface ResourceProviders { - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration name's availability along with {@link Response}. - */ - Response checkMigrationNameAvailabilityWithResponse(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationNameAvailabilityResourceInner parameters, - Context context); - - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration name's availability. - */ - MigrationNameAvailabilityResource checkMigrationNameAvailability(String subscriptionId, String resourceGroupName, - String targetDbServerName, MigrationNameAvailabilityResourceInner parameters); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestartParameter.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestartParameter.java index 9a459e14d921..af701e82f5e2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestartParameter.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestartParameter.java @@ -12,12 +12,13 @@ import java.io.IOException; /** - * Represents server restart parameters. + * PostgreSQL database engine restart parameters. */ @Fluent public final class RestartParameter implements JsonSerializable { /* - * Indicates whether to restart the server with failover. + * Indicates if restart the PostgreSQL database engine should failover or switch over from primary to standby. This + * only works if server has high availability enabled. */ private Boolean restartWithFailover; @@ -33,7 +34,8 @@ public RestartParameter() { } /** - * Get the restartWithFailover property: Indicates whether to restart the server with failover. + * Get the restartWithFailover property: Indicates if restart the PostgreSQL database engine should failover or + * switch over from primary to standby. This only works if server has high availability enabled. * * @return the restartWithFailover value. */ @@ -42,7 +44,8 @@ public Boolean restartWithFailover() { } /** - * Set the restartWithFailover property: Indicates whether to restart the server with failover. + * Set the restartWithFailover property: Indicates if restart the PostgreSQL database engine should failover or + * switch over from primary to standby. This only works if server has high availability enabled. * * @param restartWithFailover the restartWithFailover value to set. * @return the RestartParameter object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestrictedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestrictedEnum.java deleted file mode 100644 index a4432f0b0764..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestrictedEnum.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether this region is restricted. "Enabled" means region is restricted. "Disabled" stands for - * region is not restricted. Will be deprecated in future, please look to Supported Features for "Restricted". - */ -public final class RestrictedEnum extends ExpandableStringEnum { - /** - * Static value Enabled for RestrictedEnum. - */ - public static final RestrictedEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for RestrictedEnum. - */ - public static final RestrictedEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of RestrictedEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RestrictedEnum() { - } - - /** - * Creates or finds a RestrictedEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding RestrictedEnum. - */ - public static RestrictedEnum fromString(String name) { - return fromString(name, RestrictedEnum.class); - } - - /** - * Gets known RestrictedEnum values. - * - * @return known RestrictedEnum values. - */ - public static Collection values() { - return values(RestrictedEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Server.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Server.java index 5b22aebb4ac7..6979f5df6243 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Server.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Server.java @@ -52,14 +52,14 @@ public interface Server { Map tags(); /** - * Gets the sku property: The SKU (pricing tier) of the server. + * Gets the sku property: Compute tier and size of a server. * * @return the sku value. */ Sku sku(); /** - * Gets the identity property: Describes the identity of the application. + * Gets the identity property: User assigned managed identities assigned to the server. * * @return the identity value. */ @@ -73,43 +73,47 @@ public interface Server { SystemData systemData(); /** - * Gets the administratorLogin property: The administrator's login name of a server. Can only be specified when the - * server is being created (and is required for creation). + * Gets the administratorLogin property: Name of the login designated as the first password based administrator + * assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based + * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. + * If you disable password based authentication on a server which had it enabled, this password based role isn't + * deleted. * * @return the administratorLogin value. */ String administratorLogin(); /** - * Gets the administratorLoginPassword property: The administrator login password (required for server creation). + * Gets the administratorLoginPassword property: Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * * @return the administratorLoginPassword value. */ String administratorLoginPassword(); /** - * Gets the version property: PostgreSQL Server version. + * Gets the version property: Major version of PostgreSQL database engine. * * @return the version value. */ - ServerVersion version(); + PostgresMajorVersion version(); /** - * Gets the minorVersion property: The minor version of the server. + * Gets the minorVersion property: Minor version of PostgreSQL database engine. * * @return the minorVersion value. */ String minorVersion(); /** - * Gets the state property: A state of a server that is visible to user. + * Gets the state property: Possible states of a server. * * @return the state value. */ ServerState state(); /** - * Gets the fullyQualifiedDomainName property: The fully qualified domain name of a server. + * Gets the fullyQualifiedDomainName property: Fully qualified domain name of a server. * * @return the fullyQualifiedDomainName value. */ @@ -123,7 +127,7 @@ public interface Server { Storage storage(); /** - * Gets the authConfig property: AuthConfig properties of a server. + * Gets the authConfig property: Authentication configuration properties of a server. * * @return the authConfig value. */ @@ -144,8 +148,8 @@ public interface Server { Backup backup(); /** - * Gets the network property: Network properties of a server. This Network property is required to be passed only in - * case you want the server to be Private access server. + * Gets the network property: Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * * @return the network value. */ @@ -166,53 +170,53 @@ public interface Server { MaintenanceWindow maintenanceWindow(); /** - * Gets the sourceServerResourceId property: The source server resource ID to restore from. It's required when - * 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This property is returned - * only for Replica server. + * Gets the sourceServerResourceId property: Identifier of the server to be used as the source of the new server. + * Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or 'ReviveDropped'. This property is + * returned only when the target server is a read replica. * * @return the sourceServerResourceId value. */ String sourceServerResourceId(); /** - * Gets the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time to restore - * from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'ReviveDropped'. + * Gets the pointInTimeUtc property: Creation time (in ISO8601 format) of the backup which you want to restore in + * the new server. It's required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', or 'ReviveDropped'. * * @return the pointInTimeUtc value. */ OffsetDateTime pointInTimeUtc(); /** - * Gets the availabilityZone property: availability zone information of the server. + * Gets the availabilityZone property: Availability zone of a server. * * @return the availabilityZone value. */ String availabilityZone(); /** - * Gets the replicationRole property: Replication role of the server. + * Gets the replicationRole property: Role of the server in a replication set. * * @return the replicationRole value. */ ReplicationRole replicationRole(); /** - * Gets the replicaCapacity property: Replicas allowed for a server. + * Gets the replicaCapacity property: Maximum number of read replicas allowed for a server. * * @return the replicaCapacity value. */ Integer replicaCapacity(); /** - * Gets the replica property: Replica properties of a server. These Replica properties are required to be passed - * only in case you want to Promote a server. + * Gets the replica property: Read replica properties of a server. Required only in case that you want to promote a + * server. * * @return the replica value. */ Replica replica(); /** - * Gets the createMode property: The mode to create a new PostgreSQL server. + * Gets the createMode property: Creation mode of a new server. * * @return the createMode value. */ @@ -220,7 +224,7 @@ public interface Server { /** * Gets the privateEndpointConnections property: List of private endpoint connections associated with the specified - * resource. + * server. * * @return the privateEndpointConnections value. */ @@ -357,9 +361,9 @@ interface WithTags { */ interface WithSku { /** - * Specifies the sku property: The SKU (pricing tier) of the server.. + * Specifies the sku property: Compute tier and size of a server.. * - * @param sku The SKU (pricing tier) of the server. + * @param sku Compute tier and size of a server. * @return the next definition stage. */ WithCreate withSku(Sku sku); @@ -370,9 +374,9 @@ interface WithSku { */ interface WithIdentity { /** - * Specifies the identity property: Describes the identity of the application.. + * Specifies the identity property: User assigned managed identities assigned to the server.. * - * @param identity Describes the identity of the application. + * @param identity User assigned managed identities assigned to the server. * @return the next definition stage. */ WithCreate withIdentity(UserAssignedIdentity identity); @@ -383,11 +387,17 @@ interface WithIdentity { */ interface WithAdministratorLogin { /** - * Specifies the administratorLogin property: The administrator's login name of a server. Can only be - * specified when the server is being created (and is required for creation).. + * Specifies the administratorLogin property: Name of the login designated as the first password based + * administrator assigned to your instance of PostgreSQL. Must be specified the first time that you enable + * password based authentication on a server. Once set to a given value, it cannot be changed for the rest + * of the life of a server. If you disable password based authentication on a server which had it enabled, + * this password based role isn't deleted.. * - * @param administratorLogin The administrator's login name of a server. Can only be specified when the - * server is being created (and is required for creation). + * @param administratorLogin Name of the login designated as the first password based administrator assigned + * to your instance of PostgreSQL. Must be specified the first time that you enable password based + * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a + * server. If you disable password based authentication on a server which had it enabled, this password + * based role isn't deleted. * @return the next definition stage. */ WithCreate withAdministratorLogin(String administratorLogin); @@ -398,10 +408,11 @@ interface WithAdministratorLogin { */ interface WithAdministratorLoginPassword { /** - * Specifies the administratorLoginPassword property: The administrator login password (required for server - * creation).. + * Specifies the administratorLoginPassword property: Password assigned to the administrator login. As long + * as password authentication is enabled, this password can be changed at any time.. * - * @param administratorLoginPassword The administrator login password (required for server creation). + * @param administratorLoginPassword Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * @return the next definition stage. */ WithCreate withAdministratorLoginPassword(String administratorLoginPassword); @@ -412,12 +423,12 @@ interface WithAdministratorLoginPassword { */ interface WithVersion { /** - * Specifies the version property: PostgreSQL Server version.. + * Specifies the version property: Major version of PostgreSQL database engine.. * - * @param version PostgreSQL Server version. + * @param version Major version of PostgreSQL database engine. * @return the next definition stage. */ - WithCreate withVersion(ServerVersion version); + WithCreate withVersion(PostgresMajorVersion version); } /** @@ -438,9 +449,9 @@ interface WithStorage { */ interface WithAuthConfig { /** - * Specifies the authConfig property: AuthConfig properties of a server.. + * Specifies the authConfig property: Authentication configuration properties of a server.. * - * @param authConfig AuthConfig properties of a server. + * @param authConfig Authentication configuration properties of a server. * @return the next definition stage. */ WithCreate withAuthConfig(AuthConfig authConfig); @@ -477,11 +488,11 @@ interface WithBackup { */ interface WithNetwork { /** - * Specifies the network property: Network properties of a server. This Network property is required to be - * passed only in case you want the server to be Private access server.. + * Specifies the network property: Network properties of a server. Only required if you want your server to + * be integrated into a virtual network provided by customer.. * - * @param network Network properties of a server. This Network property is required to be passed only in - * case you want the server to be Private access server. + * @param network Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * @return the next definition stage. */ WithCreate withNetwork(Network network); @@ -505,13 +516,13 @@ interface WithHighAvailability { */ interface WithSourceServerResourceId { /** - * Specifies the sourceServerResourceId property: The source server resource ID to restore from. It's - * required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This - * property is returned only for Replica server. + * Specifies the sourceServerResourceId property: Identifier of the server to be used as the source of the + * new server. Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or + * 'ReviveDropped'. This property is returned only when the target server is a read replica.. * - * @param sourceServerResourceId The source server resource ID to restore from. It's required when - * 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This property is - * returned only for Replica server. + * @param sourceServerResourceId Identifier of the server to be used as the source of the new server. + * Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or 'ReviveDropped'. This + * property is returned only when the target server is a read replica. * @return the next definition stage. */ WithCreate withSourceServerResourceId(String sourceServerResourceId); @@ -522,12 +533,12 @@ interface WithSourceServerResourceId { */ interface WithPointInTimeUtc { /** - * Specifies the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time - * to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or + * Specifies the pointInTimeUtc property: Creation time (in ISO8601 format) of the backup which you want to + * restore in the new server. It's required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', or * 'ReviveDropped'.. * - * @param pointInTimeUtc Restore point creation time (ISO8601 format), specifying the time to restore from. - * It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'ReviveDropped'. + * @param pointInTimeUtc Creation time (in ISO8601 format) of the backup which you want to restore in the + * new server. It's required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', or 'ReviveDropped'. * @return the next definition stage. */ WithCreate withPointInTimeUtc(OffsetDateTime pointInTimeUtc); @@ -538,9 +549,9 @@ interface WithPointInTimeUtc { */ interface WithAvailabilityZone { /** - * Specifies the availabilityZone property: availability zone information of the server.. + * Specifies the availabilityZone property: Availability zone of a server.. * - * @param availabilityZone availability zone information of the server. + * @param availabilityZone Availability zone of a server. * @return the next definition stage. */ WithCreate withAvailabilityZone(String availabilityZone); @@ -551,9 +562,9 @@ interface WithAvailabilityZone { */ interface WithReplicationRole { /** - * Specifies the replicationRole property: Replication role of the server. + * Specifies the replicationRole property: Role of the server in a replication set.. * - * @param replicationRole Replication role of the server. + * @param replicationRole Role of the server in a replication set. * @return the next definition stage. */ WithCreate withReplicationRole(ReplicationRole replicationRole); @@ -564,9 +575,9 @@ interface WithReplicationRole { */ interface WithCreateMode { /** - * Specifies the createMode property: The mode to create a new PostgreSQL server.. + * Specifies the createMode property: Creation mode of a new server.. * - * @param createMode The mode to create a new PostgreSQL server. + * @param createMode Creation mode of a new server. * @return the next definition stage. */ WithCreate withCreateMode(CreateMode createMode); @@ -597,9 +608,9 @@ interface WithCluster { * The template for Server update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, UpdateStages.WithIdentity, - UpdateStages.WithAdministratorLogin, UpdateStages.WithAdministratorLoginPassword, UpdateStages.WithVersion, - UpdateStages.WithStorage, UpdateStages.WithBackup, UpdateStages.WithHighAvailability, - UpdateStages.WithMaintenanceWindow, UpdateStages.WithAuthConfig, UpdateStages.WithDataEncryption, + UpdateStages.WithAdministratorLoginPassword, UpdateStages.WithVersion, UpdateStages.WithStorage, + UpdateStages.WithBackup, UpdateStages.WithHighAvailability, UpdateStages.WithMaintenanceWindow, + UpdateStages.WithAuthConfig, UpdateStages.WithDataEncryption, UpdateStages.WithAvailabilityZone, UpdateStages.WithCreateMode, UpdateStages.WithReplicationRole, UpdateStages.WithReplica, UpdateStages.WithNetwork, UpdateStages.WithCluster { /** @@ -640,12 +651,12 @@ interface WithTags { */ interface WithSku { /** - * Specifies the sku property: The SKU (pricing tier) of the server.. + * Specifies the sku property: Compute tier and size of a server.. * - * @param sku The SKU (pricing tier) of the server. + * @param sku Compute tier and size of a server. * @return the next definition stage. */ - Update withSku(Sku sku); + Update withSku(SkuForPatch sku); } /** @@ -661,30 +672,16 @@ interface WithIdentity { Update withIdentity(UserAssignedIdentity identity); } - /** - * The stage of the Server update allowing to specify administratorLogin. - */ - interface WithAdministratorLogin { - /** - * Specifies the administratorLogin property: The administrator's login name of a server. Can only be - * specified when the server is trying to switch to password authentication and does not have default - * administrator login.. - * - * @param administratorLogin The administrator's login name of a server. Can only be specified when the - * server is trying to switch to password authentication and does not have default administrator login. - * @return the next definition stage. - */ - Update withAdministratorLogin(String administratorLogin); - } - /** * The stage of the Server update allowing to specify administratorLoginPassword. */ interface WithAdministratorLoginPassword { /** - * Specifies the administratorLoginPassword property: The password of the administrator login.. + * Specifies the administratorLoginPassword property: Password assigned to the administrator login. As long + * as password authentication is enabled, this password can be changed at any time.. * - * @param administratorLoginPassword The password of the administrator login. + * @param administratorLoginPassword Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * @return the next definition stage. */ Update withAdministratorLoginPassword(String administratorLoginPassword); @@ -695,13 +692,12 @@ interface WithAdministratorLoginPassword { */ interface WithVersion { /** - * Specifies the version property: PostgreSQL Server version. Version 17 is currently not supported for - * MVU.. + * Specifies the version property: Major version of PostgreSQL database engine.. * - * @param version PostgreSQL Server version. Version 17 is currently not supported for MVU. + * @param version Major version of PostgreSQL database engine. * @return the next definition stage. */ - Update withVersion(ServerVersion version); + Update withVersion(PostgresMajorVersion version); } /** @@ -727,7 +723,7 @@ interface WithBackup { * @param backup Backup properties of a server. * @return the next definition stage. */ - Update withBackup(Backup backup); + Update withBackup(BackupForPatch backup); } /** @@ -740,7 +736,7 @@ interface WithHighAvailability { * @param highAvailability High availability properties of a server. * @return the next definition stage. */ - Update withHighAvailability(HighAvailability highAvailability); + Update withHighAvailability(HighAvailabilityForPatch highAvailability); } /** @@ -753,7 +749,7 @@ interface WithMaintenanceWindow { * @param maintenanceWindow Maintenance window properties of a server. * @return the next definition stage. */ - Update withMaintenanceWindow(MaintenanceWindow maintenanceWindow); + Update withMaintenanceWindow(MaintenanceWindowForPatch maintenanceWindow); } /** @@ -761,12 +757,12 @@ interface WithMaintenanceWindow { */ interface WithAuthConfig { /** - * Specifies the authConfig property: AuthConfig properties of a server.. + * Specifies the authConfig property: Authentication configuration properties of a server.. * - * @param authConfig AuthConfig properties of a server. + * @param authConfig Authentication configuration properties of a server. * @return the next definition stage. */ - Update withAuthConfig(AuthConfig authConfig); + Update withAuthConfig(AuthConfigForPatch authConfig); } /** @@ -782,17 +778,30 @@ interface WithDataEncryption { Update withDataEncryption(DataEncryption dataEncryption); } + /** + * The stage of the Server update allowing to specify availabilityZone. + */ + interface WithAvailabilityZone { + /** + * Specifies the availabilityZone property: Availability zone of a server.. + * + * @param availabilityZone Availability zone of a server. + * @return the next definition stage. + */ + Update withAvailabilityZone(String availabilityZone); + } + /** * The stage of the Server update allowing to specify createMode. */ interface WithCreateMode { /** - * Specifies the createMode property: The mode to update a new PostgreSQL server.. + * Specifies the createMode property: Update mode of an existing server.. * - * @param createMode The mode to update a new PostgreSQL server. + * @param createMode Update mode of an existing server. * @return the next definition stage. */ - Update withCreateMode(CreateModeForUpdate createMode); + Update withCreateMode(CreateModeForPatch createMode); } /** @@ -800,9 +809,9 @@ interface WithCreateMode { */ interface WithReplicationRole { /** - * Specifies the replicationRole property: Replication role of the server. + * Specifies the replicationRole property: Role of the server in a replication set.. * - * @param replicationRole Replication role of the server. + * @param replicationRole Role of the server in a replication set. * @return the next definition stage. */ Update withReplicationRole(ReplicationRole replicationRole); @@ -813,11 +822,11 @@ interface WithReplicationRole { */ interface WithReplica { /** - * Specifies the replica property: Replica properties of a server. These Replica properties are required to - * be passed only in case you want to Promote a server.. + * Specifies the replica property: Read replica properties of a server. Required only in case that you want + * to promote a server.. * - * @param replica Replica properties of a server. These Replica properties are required to be passed only in - * case you want to Promote a server. + * @param replica Read replica properties of a server. Required only in case that you want to promote a + * server. * @return the next definition stage. */ Update withReplica(Replica replica); @@ -828,11 +837,11 @@ interface WithReplica { */ interface WithNetwork { /** - * Specifies the network property: Network properties of a server. These are required to be passed only in - * case if server is a private access server.. + * Specifies the network property: Network properties of a server. Only required if you want your server to + * be integrated into a virtual network provided by customer.. * - * @param network Network properties of a server. These are required to be passed only in case if server is - * a private access server. + * @param network Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * @return the next definition stage. */ Update withNetwork(Network network); @@ -868,7 +877,7 @@ interface WithCluster { Server refresh(Context context); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -876,9 +885,9 @@ interface WithCluster { void restart(); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -887,7 +896,7 @@ interface WithCluster { void restart(RestartParameter parameters, Context context); /** - * Starts a server. + * Starts a stopped server. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -895,7 +904,7 @@ interface WithCluster { void start(); /** - * Starts a server. + * Starts a stopped server. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerEditionCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerEditionCapability.java similarity index 65% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerEditionCapability.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerEditionCapability.java index d2c5843c34b8..9972bc7aefa0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerEditionCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerEditionCapability.java @@ -12,27 +12,27 @@ import java.util.List; /** - * Flexible server edition capabilities. + * Capabilities in terms of compute tier. */ @Immutable -public final class FlexibleServerEditionCapability extends CapabilityBase { +public final class ServerEditionCapability extends CapabilityBase { /* - * Server edition name + * Name of compute tier. */ private String name; /* - * Default sku name for the server edition + * Default compute name (SKU) for this computer tier. */ private String defaultSkuName; /* - * The list of editions supported by this server edition. + * List of storage editions supported by this compute tier and compute name. */ private List supportedStorageEditions; /* - * List of supported server SKUs. + * List of supported compute names (SKUs). */ private List supportedServerSkus; @@ -47,13 +47,13 @@ public final class FlexibleServerEditionCapability extends CapabilityBase { private CapabilityStatus status; /** - * Creates an instance of FlexibleServerEditionCapability class. + * Creates an instance of ServerEditionCapability class. */ - public FlexibleServerEditionCapability() { + public ServerEditionCapability() { } /** - * Get the name property: Server edition name. + * Get the name property: Name of compute tier. * * @return the name value. */ @@ -62,7 +62,7 @@ public String name() { } /** - * Get the defaultSkuName property: Default sku name for the server edition. + * Get the defaultSkuName property: Default compute name (SKU) for this computer tier. * * @return the defaultSkuName value. */ @@ -71,7 +71,8 @@ public String defaultSkuName() { } /** - * Get the supportedStorageEditions property: The list of editions supported by this server edition. + * Get the supportedStorageEditions property: List of storage editions supported by this compute tier and compute + * name. * * @return the supportedStorageEditions value. */ @@ -80,7 +81,7 @@ public List supportedStorageEditions() { } /** - * Get the supportedServerSkus property: List of supported server SKUs. + * Get the supportedServerSkus property: List of supported compute names (SKUs). * * @return the supportedServerSkus value. */ @@ -133,44 +134,42 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of FlexibleServerEditionCapability from the JsonReader. + * Reads an instance of ServerEditionCapability from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of FlexibleServerEditionCapability if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FlexibleServerEditionCapability. + * @return An instance of ServerEditionCapability if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerEditionCapability. */ - public static FlexibleServerEditionCapability fromJson(JsonReader jsonReader) throws IOException { + public static ServerEditionCapability fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - FlexibleServerEditionCapability deserializedFlexibleServerEditionCapability - = new FlexibleServerEditionCapability(); + ServerEditionCapability deserializedServerEditionCapability = new ServerEditionCapability(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("status".equals(fieldName)) { - deserializedFlexibleServerEditionCapability.status - = CapabilityStatus.fromString(reader.getString()); + deserializedServerEditionCapability.status = CapabilityStatus.fromString(reader.getString()); } else if ("reason".equals(fieldName)) { - deserializedFlexibleServerEditionCapability.reason = reader.getString(); + deserializedServerEditionCapability.reason = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedFlexibleServerEditionCapability.name = reader.getString(); + deserializedServerEditionCapability.name = reader.getString(); } else if ("defaultSkuName".equals(fieldName)) { - deserializedFlexibleServerEditionCapability.defaultSkuName = reader.getString(); + deserializedServerEditionCapability.defaultSkuName = reader.getString(); } else if ("supportedStorageEditions".equals(fieldName)) { List supportedStorageEditions = reader.readArray(reader1 -> StorageEditionCapability.fromJson(reader1)); - deserializedFlexibleServerEditionCapability.supportedStorageEditions = supportedStorageEditions; + deserializedServerEditionCapability.supportedStorageEditions = supportedStorageEditions; } else if ("supportedServerSkus".equals(fieldName)) { List supportedServerSkus = reader.readArray(reader1 -> ServerSkuCapability.fromJson(reader1)); - deserializedFlexibleServerEditionCapability.supportedServerSkus = supportedServerSkus; + deserializedServerEditionCapability.supportedServerSkus = supportedServerSkus; } else { reader.skipChildren(); } } - return deserializedFlexibleServerEditionCapability; + return deserializedServerEditionCapability; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForUpdate.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForPatch.java similarity index 57% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForUpdate.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForPatch.java index 165e061be555..670d701f4109 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForUpdate.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForPatch.java @@ -9,7 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerPropertiesForUpdate; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerPropertiesForPatch; import java.io.IOException; import java.util.Map; @@ -17,11 +17,11 @@ * Represents a server to be updated. */ @Fluent -public final class ServerForUpdate implements JsonSerializable { +public final class ServerForPatch implements JsonSerializable { /* - * The SKU (pricing tier) of the server. + * Compute tier and size of a server. */ - private Sku sku; + private SkuForPatch sku; /* * Describes the identity of the application. @@ -31,7 +31,7 @@ public final class ServerForUpdate implements JsonSerializable /* * Properties of the server. */ - private ServerPropertiesForUpdate innerProperties; + private ServerPropertiesForPatch innerProperties; /* * Application-specific metadata in the form of key-value pairs. @@ -39,27 +39,27 @@ public final class ServerForUpdate implements JsonSerializable private Map tags; /** - * Creates an instance of ServerForUpdate class. + * Creates an instance of ServerForPatch class. */ - public ServerForUpdate() { + public ServerForPatch() { } /** - * Get the sku property: The SKU (pricing tier) of the server. + * Get the sku property: Compute tier and size of a server. * * @return the sku value. */ - public Sku sku() { + public SkuForPatch sku() { return this.sku; } /** - * Set the sku property: The SKU (pricing tier) of the server. + * Set the sku property: Compute tier and size of a server. * * @param sku the sku value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withSku(Sku sku) { + public ServerForPatch withSku(SkuForPatch sku) { this.sku = sku; return this; } @@ -77,9 +77,9 @@ public UserAssignedIdentity identity() { * Set the identity property: Describes the identity of the application. * * @param identity the identity value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withIdentity(UserAssignedIdentity identity) { + public ServerForPatch withIdentity(UserAssignedIdentity identity) { this.identity = identity; return this; } @@ -89,7 +89,7 @@ public ServerForUpdate withIdentity(UserAssignedIdentity identity) { * * @return the innerProperties value. */ - private ServerPropertiesForUpdate innerProperties() { + private ServerPropertiesForPatch innerProperties() { return this.innerProperties; } @@ -106,16 +106,19 @@ public Map tags() { * Set the tags property: Application-specific metadata in the form of key-value pairs. * * @param tags the tags value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withTags(Map tags) { + public ServerForPatch withTags(Map tags) { this.tags = tags; return this; } /** - * Get the administratorLogin property: The administrator's login name of a server. Can only be specified when the - * server is trying to switch to password authentication and does not have default administrator login. + * Get the administratorLogin property: Name of the login designated as the first password based administrator + * assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based + * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. + * If you disable password based authentication on a server which had it enabled, this password based role isn't + * deleted. * * @return the administratorLogin value. */ @@ -124,22 +127,26 @@ public String administratorLogin() { } /** - * Set the administratorLogin property: The administrator's login name of a server. Can only be specified when the - * server is trying to switch to password authentication and does not have default administrator login. + * Set the administratorLogin property: Name of the login designated as the first password based administrator + * assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based + * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. + * If you disable password based authentication on a server which had it enabled, this password based role isn't + * deleted. * * @param administratorLogin the administratorLogin value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withAdministratorLogin(String administratorLogin) { + public ServerForPatch withAdministratorLogin(String administratorLogin) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withAdministratorLogin(administratorLogin); return this; } /** - * Get the administratorLoginPassword property: The password of the administrator login. + * Get the administratorLoginPassword property: Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * * @return the administratorLoginPassword value. */ @@ -148,37 +155,38 @@ public String administratorLoginPassword() { } /** - * Set the administratorLoginPassword property: The password of the administrator login. + * Set the administratorLoginPassword property: Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * * @param administratorLoginPassword the administratorLoginPassword value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withAdministratorLoginPassword(String administratorLoginPassword) { + public ServerForPatch withAdministratorLoginPassword(String administratorLoginPassword) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withAdministratorLoginPassword(administratorLoginPassword); return this; } /** - * Get the version property: PostgreSQL Server version. Version 17 is currently not supported for MVU. + * Get the version property: Major version of PostgreSQL database engine. * * @return the version value. */ - public ServerVersion version() { + public PostgresMajorVersion version() { return this.innerProperties() == null ? null : this.innerProperties().version(); } /** - * Set the version property: PostgreSQL Server version. Version 17 is currently not supported for MVU. + * Set the version property: Major version of PostgreSQL database engine. * * @param version the version value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withVersion(ServerVersion version) { + public ServerForPatch withVersion(PostgresMajorVersion version) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withVersion(version); return this; @@ -197,11 +205,11 @@ public Storage storage() { * Set the storage property: Storage properties of a server. * * @param storage the storage value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withStorage(Storage storage) { + public ServerForPatch withStorage(Storage storage) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withStorage(storage); return this; @@ -212,7 +220,7 @@ public ServerForUpdate withStorage(Storage storage) { * * @return the backup value. */ - public Backup backup() { + public BackupForPatch backup() { return this.innerProperties() == null ? null : this.innerProperties().backup(); } @@ -220,11 +228,11 @@ public Backup backup() { * Set the backup property: Backup properties of a server. * * @param backup the backup value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withBackup(Backup backup) { + public ServerForPatch withBackup(BackupForPatch backup) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withBackup(backup); return this; @@ -235,7 +243,7 @@ public ServerForUpdate withBackup(Backup backup) { * * @return the highAvailability value. */ - public HighAvailability highAvailability() { + public HighAvailabilityForPatch highAvailability() { return this.innerProperties() == null ? null : this.innerProperties().highAvailability(); } @@ -243,11 +251,11 @@ public HighAvailability highAvailability() { * Set the highAvailability property: High availability properties of a server. * * @param highAvailability the highAvailability value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withHighAvailability(HighAvailability highAvailability) { + public ServerForPatch withHighAvailability(HighAvailabilityForPatch highAvailability) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withHighAvailability(highAvailability); return this; @@ -258,7 +266,7 @@ public ServerForUpdate withHighAvailability(HighAvailability highAvailability) { * * @return the maintenanceWindow value. */ - public MaintenanceWindow maintenanceWindow() { + public MaintenanceWindowForPatch maintenanceWindow() { return this.innerProperties() == null ? null : this.innerProperties().maintenanceWindow(); } @@ -266,34 +274,34 @@ public MaintenanceWindow maintenanceWindow() { * Set the maintenanceWindow property: Maintenance window properties of a server. * * @param maintenanceWindow the maintenanceWindow value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withMaintenanceWindow(MaintenanceWindow maintenanceWindow) { + public ServerForPatch withMaintenanceWindow(MaintenanceWindowForPatch maintenanceWindow) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withMaintenanceWindow(maintenanceWindow); return this; } /** - * Get the authConfig property: AuthConfig properties of a server. + * Get the authConfig property: Authentication configuration properties of a server. * * @return the authConfig value. */ - public AuthConfig authConfig() { + public AuthConfigForPatch authConfig() { return this.innerProperties() == null ? null : this.innerProperties().authConfig(); } /** - * Set the authConfig property: AuthConfig properties of a server. + * Set the authConfig property: Authentication configuration properties of a server. * * @param authConfig the authConfig value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withAuthConfig(AuthConfig authConfig) { + public ServerForPatch withAuthConfig(AuthConfigForPatch authConfig) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withAuthConfig(authConfig); return this; @@ -312,41 +320,64 @@ public DataEncryption dataEncryption() { * Set the dataEncryption property: Data encryption properties of a server. * * @param dataEncryption the dataEncryption value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withDataEncryption(DataEncryption dataEncryption) { + public ServerForPatch withDataEncryption(DataEncryption dataEncryption) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withDataEncryption(dataEncryption); return this; } /** - * Get the createMode property: The mode to update a new PostgreSQL server. + * Get the availabilityZone property: Availability zone of a server. + * + * @return the availabilityZone value. + */ + public String availabilityZone() { + return this.innerProperties() == null ? null : this.innerProperties().availabilityZone(); + } + + /** + * Set the availabilityZone property: Availability zone of a server. + * + * @param availabilityZone the availabilityZone value to set. + * @return the ServerForPatch object itself. + */ + public ServerForPatch withAvailabilityZone(String availabilityZone) { + if (this.innerProperties() == null) { + this.innerProperties = new ServerPropertiesForPatch(); + } + this.innerProperties().withAvailabilityZone(availabilityZone); + return this; + } + + /** + * Get the createMode property: Update mode of an existing server. * * @return the createMode value. */ - public CreateModeForUpdate createMode() { + public CreateModeForPatch createMode() { return this.innerProperties() == null ? null : this.innerProperties().createMode(); } /** - * Set the createMode property: The mode to update a new PostgreSQL server. + * Set the createMode property: Update mode of an existing server. * * @param createMode the createMode value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withCreateMode(CreateModeForUpdate createMode) { + public ServerForPatch withCreateMode(CreateModeForPatch createMode) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withCreateMode(createMode); return this; } /** - * Get the replicationRole property: Replication role of the server. + * Get the replicationRole property: Role of the server in a replication set. * * @return the replicationRole value. */ @@ -355,22 +386,22 @@ public ReplicationRole replicationRole() { } /** - * Set the replicationRole property: Replication role of the server. + * Set the replicationRole property: Role of the server in a replication set. * * @param replicationRole the replicationRole value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withReplicationRole(ReplicationRole replicationRole) { + public ServerForPatch withReplicationRole(ReplicationRole replicationRole) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withReplicationRole(replicationRole); return this; } /** - * Get the replica property: Replica properties of a server. These Replica properties are required to be passed only - * in case you want to Promote a server. + * Get the replica property: Read replica properties of a server. Required only in case that you want to promote a + * server. * * @return the replica value. */ @@ -379,23 +410,23 @@ public Replica replica() { } /** - * Set the replica property: Replica properties of a server. These Replica properties are required to be passed only - * in case you want to Promote a server. + * Set the replica property: Read replica properties of a server. Required only in case that you want to promote a + * server. * * @param replica the replica value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withReplica(Replica replica) { + public ServerForPatch withReplica(Replica replica) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withReplica(replica); return this; } /** - * Get the network property: Network properties of a server. These are required to be passed only in case if server - * is a private access server. + * Get the network property: Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * * @return the network value. */ @@ -404,15 +435,15 @@ public Network network() { } /** - * Set the network property: Network properties of a server. These are required to be passed only in case if server - * is a private access server. + * Set the network property: Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * * @param network the network value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withNetwork(Network network) { + public ServerForPatch withNetwork(Network network) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withNetwork(network); return this; @@ -431,11 +462,11 @@ public Cluster cluster() { * Set the cluster property: Cluster properties of a server. * * @param cluster the cluster value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withCluster(Cluster cluster) { + public ServerForPatch withCluster(Cluster cluster) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withCluster(cluster); return this; @@ -472,35 +503,35 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ServerForUpdate from the JsonReader. + * Reads an instance of ServerForPatch from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ServerForUpdate if the JsonReader was pointing to an instance of it, or null if it was + * @return An instance of ServerForPatch if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IOException If an error occurs while reading the ServerForUpdate. + * @throws IOException If an error occurs while reading the ServerForPatch. */ - public static ServerForUpdate fromJson(JsonReader jsonReader) throws IOException { + public static ServerForPatch fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ServerForUpdate deserializedServerForUpdate = new ServerForUpdate(); + ServerForPatch deserializedServerForPatch = new ServerForPatch(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("sku".equals(fieldName)) { - deserializedServerForUpdate.sku = Sku.fromJson(reader); + deserializedServerForPatch.sku = SkuForPatch.fromJson(reader); } else if ("identity".equals(fieldName)) { - deserializedServerForUpdate.identity = UserAssignedIdentity.fromJson(reader); + deserializedServerForPatch.identity = UserAssignedIdentity.fromJson(reader); } else if ("properties".equals(fieldName)) { - deserializedServerForUpdate.innerProperties = ServerPropertiesForUpdate.fromJson(reader); + deserializedServerForPatch.innerProperties = ServerPropertiesForPatch.fromJson(reader); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedServerForUpdate.tags = tags; + deserializedServerForPatch.tags = tags; } else { reader.skipChildren(); } } - return deserializedServerForUpdate; + return deserializedServerForPatch; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerHAState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerHAState.java deleted file mode 100644 index a483089e1881..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerHAState.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A state of a HA server that is visible to user. - */ -public final class ServerHAState extends ExpandableStringEnum { - /** - * Static value NotEnabled for ServerHAState. - */ - public static final ServerHAState NOT_ENABLED = fromString("NotEnabled"); - - /** - * Static value CreatingStandby for ServerHAState. - */ - public static final ServerHAState CREATING_STANDBY = fromString("CreatingStandby"); - - /** - * Static value ReplicatingData for ServerHAState. - */ - public static final ServerHAState REPLICATING_DATA = fromString("ReplicatingData"); - - /** - * Static value FailingOver for ServerHAState. - */ - public static final ServerHAState FAILING_OVER = fromString("FailingOver"); - - /** - * Static value Healthy for ServerHAState. - */ - public static final ServerHAState HEALTHY = fromString("Healthy"); - - /** - * Static value RemovingStandby for ServerHAState. - */ - public static final ServerHAState REMOVING_STANDBY = fromString("RemovingStandby"); - - /** - * Creates a new instance of ServerHAState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ServerHAState() { - } - - /** - * Creates or finds a ServerHAState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ServerHAState. - */ - public static ServerHAState fromString(String name) { - return fromString(name, ServerHAState.class); - } - - /** - * Gets known ServerHAState values. - * - * @return known ServerHAState values. - */ - public static Collection values() { - return values(ServerHAState.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerList.java similarity index 70% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerList.java index 18be8a706d16..862777192d6d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerList.java @@ -17,9 +17,9 @@ * A list of servers. */ @Fluent -public final class ServerListResult implements JsonSerializable { +public final class ServerList implements JsonSerializable { /* - * The list of flexible servers + * The list of servers */ private List value; @@ -29,13 +29,13 @@ public final class ServerListResult implements JsonSerializable value() { } /** - * Set the value property: The list of flexible servers. + * Set the value property: The list of servers. * * @param value the value value to set. - * @return the ServerListResult object itself. + * @return the ServerList object itself. */ - public ServerListResult withValue(List value) { + public ServerList withValue(List value) { this.value = value; return this; } @@ -67,9 +67,9 @@ public String nextLink() { * Set the nextLink property: The link used to get the next page of operations. * * @param nextLink the nextLink value to set. - * @return the ServerListResult object itself. + * @return the ServerList object itself. */ - public ServerListResult withNextLink(String nextLink) { + public ServerList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } @@ -97,31 +97,31 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ServerListResult from the JsonReader. + * Reads an instance of ServerList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ServerListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ServerListResult. + * @return An instance of ServerList if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the ServerList. */ - public static ServerListResult fromJson(JsonReader jsonReader) throws IOException { + public static ServerList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ServerListResult deserializedServerListResult = new ServerListResult(); + ServerList deserializedServerList = new ServerList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ServerInner.fromJson(reader1)); - deserializedServerListResult.value = value; + deserializedServerList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedServerListResult.nextLink = reader.getString(); + deserializedServerList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedServerListResult; + return deserializedServerList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerPublicNetworkAccessState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerPublicNetworkAccessState.java index 095df310bd12..77c01af64dea 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerPublicNetworkAccessState.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerPublicNetworkAccessState.java @@ -8,7 +8,8 @@ import java.util.Collection; /** - * public network access is enabled or not. + * Indicates if public network access is enabled or not. This is only supported for servers that are not integrated into + * a virtual network which is owned and provided by customer when server is deployed. */ public final class ServerPublicNetworkAccessState extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSku.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSku.java index 63f99216aa9e..a2fe07ed0362 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSku.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSku.java @@ -12,17 +12,18 @@ import java.io.IOException; /** - * Sku information related properties of a server. + * Compute information of a server. */ @Fluent public final class ServerSku implements JsonSerializable { /* - * The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. + * Compute tier and size of the database server. This object is empty for an Azure Database for PostgreSQL single + * server. */ private String name; /* - * The tier of the particular SKU, e.g. Burstable. + * Tier of the compute assigned to a server. */ private SkuTier tier; @@ -33,7 +34,8 @@ public ServerSku() { } /** - * Get the name property: The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. + * Get the name property: Compute tier and size of the database server. This object is empty for an Azure Database + * for PostgreSQL single server. * * @return the name value. */ @@ -42,7 +44,8 @@ public String name() { } /** - * Set the name property: The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. + * Set the name property: Compute tier and size of the database server. This object is empty for an Azure Database + * for PostgreSQL single server. * * @param name the name value to set. * @return the ServerSku object itself. @@ -53,7 +56,7 @@ public ServerSku withName(String name) { } /** - * Get the tier property: The tier of the particular SKU, e.g. Burstable. + * Get the tier property: Tier of the compute assigned to a server. * * @return the tier value. */ @@ -62,7 +65,7 @@ public SkuTier tier() { } /** - * Set the tier property: The tier of the particular SKU, e.g. Burstable. + * Set the tier property: Tier of the compute assigned to a server. * * @param tier the tier value to set. * @return the ServerSku object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSkuCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSkuCapability.java index 3d2b935bf3ee..97a567f0ed30 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSkuCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSkuCapability.java @@ -12,47 +12,47 @@ import java.util.List; /** - * Sku capability. + * Capabilities in terms of compute. */ @Immutable public final class ServerSkuCapability extends CapabilityBase { /* - * Sku name + * Name of the compute (SKU). */ private String name; /* - * Supported vCores + * vCores available for this compute. */ private Integer vCores; /* - * Supported IOPS + * Maximum IOPS supported by this compute. */ private Integer supportedIops; /* - * Supported memory per vCore in MB + * Supported memory (in MB) per virtual core assigned to this compute. */ private Long supportedMemoryPerVcoreMb; /* - * List of supported Availability Zones. E.g. "1", "2", "3" + * List of supported availability zones. E.g. '1', '2', '3' */ private List supportedZones; /* - * Supported high availability mode + * Modes of high availability supported for this compute. */ - private List supportedHaMode; + private List supportedHaMode; /* - * The supported features. + * Features supported. */ private List supportedFeatures; /* - * The value of security profile indicating if its confidential vm + * Security profile of the compute. Indicates if it's a Confidential Compute virtual machine. */ private String securityProfile; @@ -73,7 +73,7 @@ public ServerSkuCapability() { } /** - * Get the name property: Sku name. + * Get the name property: Name of the compute (SKU). * * @return the name value. */ @@ -82,7 +82,7 @@ public String name() { } /** - * Get the vCores property: Supported vCores. + * Get the vCores property: vCores available for this compute. * * @return the vCores value. */ @@ -91,7 +91,7 @@ public Integer vCores() { } /** - * Get the supportedIops property: Supported IOPS. + * Get the supportedIops property: Maximum IOPS supported by this compute. * * @return the supportedIops value. */ @@ -100,7 +100,7 @@ public Integer supportedIops() { } /** - * Get the supportedMemoryPerVcoreMb property: Supported memory per vCore in MB. + * Get the supportedMemoryPerVcoreMb property: Supported memory (in MB) per virtual core assigned to this compute. * * @return the supportedMemoryPerVcoreMb value. */ @@ -109,7 +109,7 @@ public Long supportedMemoryPerVcoreMb() { } /** - * Get the supportedZones property: List of supported Availability Zones. E.g. "1", "2", "3". + * Get the supportedZones property: List of supported availability zones. E.g. '1', '2', '3'. * * @return the supportedZones value. */ @@ -118,16 +118,16 @@ public List supportedZones() { } /** - * Get the supportedHaMode property: Supported high availability mode. + * Get the supportedHaMode property: Modes of high availability supported for this compute. * * @return the supportedHaMode value. */ - public List supportedHaMode() { + public List supportedHaMode() { return this.supportedHaMode; } /** - * Get the supportedFeatures property: The supported features. + * Get the supportedFeatures property: Features supported. * * @return the supportedFeatures value. */ @@ -136,7 +136,8 @@ public List supportedFeatures() { } /** - * Get the securityProfile property: The value of security profile indicating if its confidential vm. + * Get the securityProfile property: Security profile of the compute. Indicates if it's a Confidential Compute + * virtual machine. * * @return the securityProfile value. */ @@ -216,7 +217,8 @@ public static ServerSkuCapability fromJson(JsonReader jsonReader) throws IOExcep List supportedZones = reader.readArray(reader1 -> reader1.getString()); deserializedServerSkuCapability.supportedZones = supportedZones; } else if ("supportedHaMode".equals(fieldName)) { - List supportedHaMode = reader.readArray(reader1 -> HaMode.fromString(reader1.getString())); + List supportedHaMode + = reader.readArray(reader1 -> HighAvailabilityMode.fromString(reader1.getString())); deserializedServerSkuCapability.supportedHaMode = supportedHaMode; } else if ("supportedFeatures".equals(fieldName)) { List supportedFeatures diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerState.java index c0d72cc1c59a..cdb7e1b2a03a 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerState.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerState.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * A state of a server that is visible to user. + * Possible states of a server. */ public final class ServerState extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionListResult.java deleted file mode 100644 index cf42365a2e8b..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionListResult.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerThreatProtectionSettingsModelInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of the server's Advanced Threat Protection settings. - */ -@Immutable -public final class ServerThreatProtectionListResult implements JsonSerializable { - /* - * Array of results. - */ - private List value; - - /* - * Link to retrieve next page of results. - */ - private String nextLink; - - /** - * Creates an instance of ServerThreatProtectionListResult class. - */ - public ServerThreatProtectionListResult() { - } - - /** - * Get the value property: Array of results. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: Link to retrieve next page of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServerThreatProtectionListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServerThreatProtectionListResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ServerThreatProtectionListResult. - */ - public static ServerThreatProtectionListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServerThreatProtectionListResult deserializedServerThreatProtectionListResult - = new ServerThreatProtectionListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ServerThreatProtectionSettingsModelInner.fromJson(reader1)); - deserializedServerThreatProtectionListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedServerThreatProtectionListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedServerThreatProtectionListResult; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettings.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettings.java index 83802a4e1ba3..028b26e00a9c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettings.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettings.java @@ -4,97 +4,15 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - /** * Resource collection API of ServerThreatProtectionSettings. */ public interface ServerThreatProtectionSettings { /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 server's Threat Protection state as paginated response with {@link PagedIterable}. - */ - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 server's Threat Protection state as paginated response with {@link PagedIterable}. - */ - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, Context context); - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings. - */ - ServerThreatProtectionSettingsModel get(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName); - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings along with {@link Response}. - */ - ServerThreatProtectionSettingsModel getById(String id); - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ServerThreatProtectionSettingsModel resource. + * Begins definition for a new AdvancedThreatProtectionSettingsModel resource. * * @param name resource name. - * @return the first stage of the new ServerThreatProtectionSettingsModel definition. + * @return the first stage of the new AdvancedThreatProtectionSettingsModel definition. */ - ServerThreatProtectionSettingsModel.DefinitionStages.Blank define(ThreatProtectionName name); + AdvancedThreatProtectionSettingsModel.DefinitionStages.Blank define(ThreatProtectionName name); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersion.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersion.java deleted file mode 100644 index d32b5c9d571f..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersion.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The version of a server. - */ -public final class ServerVersion extends ExpandableStringEnum { - /** - * Static value 17 for ServerVersion. - */ - public static final ServerVersion ONE_SEVEN = fromString("17"); - - /** - * Static value 16 for ServerVersion. - */ - public static final ServerVersion ONE_SIX = fromString("16"); - - /** - * Static value 15 for ServerVersion. - */ - public static final ServerVersion ONE_FIVE = fromString("15"); - - /** - * Static value 14 for ServerVersion. - */ - public static final ServerVersion ONE_FOUR = fromString("14"); - - /** - * Static value 13 for ServerVersion. - */ - public static final ServerVersion ONE_THREE = fromString("13"); - - /** - * Static value 12 for ServerVersion. - */ - public static final ServerVersion ONE_TWO = fromString("12"); - - /** - * Static value 11 for ServerVersion. - */ - public static final ServerVersion ONE_ONE = fromString("11"); - - /** - * Creates a new instance of ServerVersion value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ServerVersion() { - } - - /** - * Creates or finds a ServerVersion from its string representation. - * - * @param name a name to look for. - * @return the corresponding ServerVersion. - */ - public static ServerVersion fromString(String name) { - return fromString(name, ServerVersion.class); - } - - /** - * Gets known ServerVersion values. - * - * @return known ServerVersion values. - */ - public static Collection values() { - return values(ServerVersion.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersionCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersionCapability.java index c380981455ef..67436e57527d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersionCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersionCapability.java @@ -12,22 +12,22 @@ import java.util.List; /** - * Server version capabilities. + * Capabilities in terms of major versions of PostgreSQL database engine. */ @Immutable public final class ServerVersionCapability extends CapabilityBase { /* - * Server version + * Major version of PostgreSQL database engine. */ private String name; /* - * Supported servers versions to upgrade + * Major versions of PostgreSQL database engine to which this version can be automatically upgraded. */ private List supportedVersionsToUpgrade; /* - * The supported features. + * Features supported. */ private List supportedFeatures; @@ -48,7 +48,7 @@ public ServerVersionCapability() { } /** - * Get the name property: Server version. + * Get the name property: Major version of PostgreSQL database engine. * * @return the name value. */ @@ -57,7 +57,8 @@ public String name() { } /** - * Get the supportedVersionsToUpgrade property: Supported servers versions to upgrade. + * Get the supportedVersionsToUpgrade property: Major versions of PostgreSQL database engine to which this version + * can be automatically upgraded. * * @return the supportedVersionsToUpgrade value. */ @@ -66,7 +67,7 @@ public List supportedVersionsToUpgrade() { } /** - * Get the supportedFeatures property: The supported features. + * Get the supportedFeatures property: Features supported. * * @return the supportedFeatures value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Servers.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Servers.java index 5077d2a93544..f5c9744b0e41 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Servers.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Servers.java @@ -13,7 +13,7 @@ */ public interface Servers { /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -24,7 +24,7 @@ public interface Servers { void deleteByResourceGroup(String resourceGroupName, String serverName); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -36,7 +36,7 @@ public interface Servers { void delete(String resourceGroupName, String serverName, Context context); /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -44,24 +44,24 @@ public interface Servers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about an existing server along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, Context context); /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about an existing server. */ Server getByResourceGroup(String resourceGroupName, String serverName); /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,7 +72,7 @@ public interface Servers { PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -84,7 +84,7 @@ public interface Servers { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -93,7 +93,7 @@ public interface Servers { PagedIterable list(); /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -104,7 +104,7 @@ public interface Servers { PagedIterable list(Context context); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -115,11 +115,11 @@ public interface Servers { void restart(String resourceGroupName, String serverName); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -128,7 +128,7 @@ public interface Servers { void restart(String resourceGroupName, String serverName, RestartParameter parameters, Context context); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -139,7 +139,7 @@ public interface Servers { void start(String resourceGroupName, String serverName); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -174,30 +174,30 @@ public interface Servers { void stop(String resourceGroupName, String serverName, Context context); /** - * Gets information about a server. + * Gets information about an existing server. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about an existing server along with {@link Response}. */ Server getById(String id); /** - * Gets information about a server. + * Gets information about an existing server. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about an existing server along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -207,7 +207,7 @@ public interface Servers { void deleteById(String id); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionDetailsResource.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionDetailsResource.java deleted file mode 100644 index 64cf897507f4..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionDetailsResource.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionDetailsResourceInner; - -/** - * An immutable client-side representation of SessionDetailsResource. - */ -public interface SessionDetailsResource { - /** - * Gets the iterationId property: Iteration id. - * - * @return the iterationId value. - */ - String iterationId(); - - /** - * Gets the sessionId property: Session id. - * - * @return the sessionId value. - */ - String sessionId(); - - /** - * Gets the appliedConfiguration property: Applied configuration for the iteration. - * - * @return the appliedConfiguration value. - */ - String appliedConfiguration(); - - /** - * Gets the iterationStartTime property: Iteration start time. - * - * @return the iterationStartTime value. - */ - String iterationStartTime(); - - /** - * Gets the averageQueryRuntimeMs property: The aqr for the iteration. - * - * @return the averageQueryRuntimeMs value. - */ - String averageQueryRuntimeMs(); - - /** - * Gets the transactionsPerSecond property: The tps for the iteration. - * - * @return the transactionsPerSecond value. - */ - String transactionsPerSecond(); - - /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionDetailsResourceInner - * object. - * - * @return the inner object. - */ - SessionDetailsResourceInner innerModel(); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionResource.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionResource.java deleted file mode 100644 index 0b52ee8553d8..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionResource.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionResourceInner; - -/** - * An immutable client-side representation of SessionResource. - */ -public interface SessionResource { - /** - * Gets the sessionStartTime property: the tuning session start time. - * - * @return the sessionStartTime value. - */ - String sessionStartTime(); - - /** - * Gets the sessionId property: Session id. - * - * @return the sessionId value. - */ - String sessionId(); - - /** - * Gets the status property: The status of the tuning session. - * - * @return the status value. - */ - String status(); - - /** - * Gets the preTuningAqr property: The pre tuning aqr. - * - * @return the preTuningAqr value. - */ - String preTuningAqr(); - - /** - * Gets the postTuningAqr property: The post tuning aqr. - * - * @return the postTuningAqr value. - */ - String postTuningAqr(); - - /** - * Gets the preTuningTps property: The pre tuning tps. - * - * @return the preTuningTps value. - */ - String preTuningTps(); - - /** - * Gets the postTuningTps property: The post tuning tps. - * - * @return the postTuningTps value. - */ - String postTuningTps(); - - /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionResourceInner object. - * - * @return the inner object. - */ - SessionResourceInner innerModel(); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionsListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionsListResult.java deleted file mode 100644 index dc73b8e394fb..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionsListResult.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of tuning configuration sessions. - */ -@Fluent -public final class SessionsListResult implements JsonSerializable { - /* - * A list of tuning configuration sessions. - */ - private List value; - - /* - * URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - */ - private String nextLink; - - /** - * Creates an instance of SessionsListResult class. - */ - public SessionsListResult() { - } - - /** - * Get the value property: A list of tuning configuration sessions. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of tuning configuration sessions. - * - * @param value the value value to set. - * @return the SessionsListResult object itself. - */ - public SessionsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - * - * @param nextLink the nextLink value to set. - * @return the SessionsListResult object itself. - */ - public SessionsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SessionsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SessionsListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SessionsListResult. - */ - public static SessionsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SessionsListResult deserializedSessionsListResult = new SessionsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> SessionResourceInner.fromJson(reader1)); - deserializedSessionsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedSessionsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSessionsListResult; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Sku.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Sku.java index f701ebf4ec05..b357c4ab7638 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Sku.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Sku.java @@ -13,17 +13,17 @@ import java.io.IOException; /** - * Sku information related properties of a server. + * Compute information of a server. */ @Fluent public final class Sku implements JsonSerializable { /* - * The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. + * Name by which is known a given compute size assigned to a server. */ private String name; /* - * The tier of the particular SKU, e.g. Burstable. + * Tier of the compute assigned to a server. */ private SkuTier tier; @@ -34,7 +34,7 @@ public Sku() { } /** - * Get the name property: The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. + * Get the name property: Name by which is known a given compute size assigned to a server. * * @return the name value. */ @@ -43,7 +43,7 @@ public String name() { } /** - * Set the name property: The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. + * Set the name property: Name by which is known a given compute size assigned to a server. * * @param name the name value to set. * @return the Sku object itself. @@ -54,7 +54,7 @@ public Sku withName(String name) { } /** - * Get the tier property: The tier of the particular SKU, e.g. Burstable. + * Get the tier property: Tier of the compute assigned to a server. * * @return the tier value. */ @@ -63,7 +63,7 @@ public SkuTier tier() { } /** - * Set the tier property: The tier of the particular SKU, e.g. Burstable. + * Set the tier property: Tier of the compute assigned to a server. * * @param tier the tier value to set. * @return the Sku object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuForPatch.java new file mode 100644 index 000000000000..51e7fe8838bd --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuForPatch.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Compute information of a server. + */ +@Fluent +public final class SkuForPatch implements JsonSerializable { + /* + * Name by which is known a given compute size assigned to a server. + */ + private String name; + + /* + * Tier of the compute assigned to a server. + */ + private SkuTier tier; + + /** + * Creates an instance of SkuForPatch class. + */ + public SkuForPatch() { + } + + /** + * Get the name property: Name by which is known a given compute size assigned to a server. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name by which is known a given compute size assigned to a server. + * + * @param name the name value to set. + * @return the SkuForPatch object itself. + */ + public SkuForPatch withName(String name) { + this.name = name; + return this; + } + + /** + * Get the tier property: Tier of the compute assigned to a server. + * + * @return the tier value. + */ + public SkuTier tier() { + return this.tier; + } + + /** + * Set the tier property: Tier of the compute assigned to a server. + * + * @param tier the tier value to set. + * @return the SkuForPatch object itself. + */ + public SkuForPatch withTier(SkuTier tier) { + this.tier = tier; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("tier", this.tier == null ? null : this.tier.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SkuForPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SkuForPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SkuForPatch. + */ + public static SkuForPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SkuForPatch deserializedSkuForPatch = new SkuForPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedSkuForPatch.name = reader.getString(); + } else if ("tier".equals(fieldName)) { + deserializedSkuForPatch.tier = SkuTier.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSkuForPatch; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuTier.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuTier.java index c3b03fcf1340..dbdaf5ede1c0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuTier.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuTier.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The tier of the particular SKU, e.g. Burstable. + * Tier of the compute assigned to a server. */ public final class SkuTier extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SourceType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SourceType.java index a4a35c753c4c..dd9574fbaa70 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SourceType.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SourceType.java @@ -8,10 +8,10 @@ import java.util.Collection; /** - * Migration source server type : OnPremises, AWS, GCP, AzureVM, PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, AWS_EC2, - * GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, EDB_Oracle_Server, EDB_PostgreSQL, PostgreSQLFlexibleServer, - * PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, - * Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or Supabase_PostgreSQL. + * Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, AWS_RDS, AzureVM, + * Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, EDB_PostgreSQL, GCP, + * GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, OnPremises, + * PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL. */ public final class SourceType extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SslMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SslMode.java index 87df7d86f9c0..280d61b5f58c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SslMode.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SslMode.java @@ -8,8 +8,8 @@ import java.util.Collection; /** - * Supported SSL modes for migration. VerifyFull is the recommended SSL mode for Single server migration. Prefer, - * Require are recommended SSL modes for other source types. + * SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for + * other source types is 'Prefer'. */ public final class SslMode extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigration.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigration.java new file mode 100644 index 000000000000..1cece04f7e97 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigration.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.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if data migration must start right away. + */ +public final class StartDataMigration extends ExpandableStringEnum { + /** + * Static value True for StartDataMigration. + */ + public static final StartDataMigration TRUE = fromString("True"); + + /** + * Static value False for StartDataMigration. + */ + public static final StartDataMigration FALSE = fromString("False"); + + /** + * Creates a new instance of StartDataMigration value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StartDataMigration() { + } + + /** + * Creates or finds a StartDataMigration from its string representation. + * + * @param name a name to look for. + * @return the corresponding StartDataMigration. + */ + public static StartDataMigration fromString(String name) { + return fromString(name, StartDataMigration.class); + } + + /** + * Gets known StartDataMigration values. + * + * @return known StartDataMigration values. + */ + public static Collection values() { + return values(StartDataMigration.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigrationEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigrationEnum.java deleted file mode 100644 index dc18937a429f..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigrationEnum.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Indicates whether the data migration should start right away. - */ -public final class StartDataMigrationEnum extends ExpandableStringEnum { - /** - * Static value True for StartDataMigrationEnum. - */ - public static final StartDataMigrationEnum TRUE = fromString("True"); - - /** - * Static value False for StartDataMigrationEnum. - */ - public static final StartDataMigrationEnum FALSE = fromString("False"); - - /** - * Creates a new instance of StartDataMigrationEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public StartDataMigrationEnum() { - } - - /** - * Creates or finds a StartDataMigrationEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding StartDataMigrationEnum. - */ - public static StartDataMigrationEnum fromString(String name) { - return fromString(name, StartDataMigrationEnum.class); - } - - /** - * Gets known StartDataMigrationEnum values. - * - * @return known StartDataMigrationEnum values. - */ - public static Collection values() { - return values(StartDataMigrationEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Storage.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Storage.java index 2fbf44928867..65356fe6c68e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Storage.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Storage.java @@ -17,33 +17,34 @@ @Fluent public final class Storage implements JsonSerializable { /* - * Max storage allowed for a server. + * Size of storage assigned to a server. */ private Integer storageSizeGB; /* - * Flag to enable / disable Storage Auto grow for flexible server. + * Flag to enable or disable the automatic growth of storage size of a server when available space is nearing zero + * and conditions allow for automatically growing storage size. */ private StorageAutoGrow autoGrow; /* - * Name of storage tier for IOPS. + * Storage tier of a server. */ - private AzureManagedDiskPerformanceTiers tier; + private AzureManagedDiskPerformanceTier tier; /* - * Storage IOPS quantity. This property is required to be set for storage Type PremiumV2_LRS and UltraSSD_LRS. + * Maximum IOPS supported for storage. Required when type of storage is PremiumV2_LRS or UltraSSD_LRS. */ private Integer iops; /* - * Storage throughput for the server. This is required to be set for storage Type PremiumV2_LRS and UltraSSD_LRS. + * Maximum throughput supported for storage. Required when type of storage is PremiumV2_LRS or UltraSSD_LRS. */ private Integer throughput; /* - * Storage type for the server. Allowed values are Premium_LRS, PremiumV2_LRS, and UltraSSD_LRS. Default is - * Premium_LRS if not specified + * Type of storage assigned to a server. Allowed values are Premium_LRS, PremiumV2_LRS, or UltraSSD_LRS. If not + * specified, it defaults to Premium_LRS. */ private StorageType type; @@ -54,7 +55,7 @@ public Storage() { } /** - * Get the storageSizeGB property: Max storage allowed for a server. + * Get the storageSizeGB property: Size of storage assigned to a server. * * @return the storageSizeGB value. */ @@ -63,7 +64,7 @@ public Integer storageSizeGB() { } /** - * Set the storageSizeGB property: Max storage allowed for a server. + * Set the storageSizeGB property: Size of storage assigned to a server. * * @param storageSizeGB the storageSizeGB value to set. * @return the Storage object itself. @@ -74,7 +75,8 @@ public Storage withStorageSizeGB(Integer storageSizeGB) { } /** - * Get the autoGrow property: Flag to enable / disable Storage Auto grow for flexible server. + * Get the autoGrow property: Flag to enable or disable the automatic growth of storage size of a server when + * available space is nearing zero and conditions allow for automatically growing storage size. * * @return the autoGrow value. */ @@ -83,7 +85,8 @@ public StorageAutoGrow autoGrow() { } /** - * Set the autoGrow property: Flag to enable / disable Storage Auto grow for flexible server. + * Set the autoGrow property: Flag to enable or disable the automatic growth of storage size of a server when + * available space is nearing zero and conditions allow for automatically growing storage size. * * @param autoGrow the autoGrow value to set. * @return the Storage object itself. @@ -94,28 +97,28 @@ public Storage withAutoGrow(StorageAutoGrow autoGrow) { } /** - * Get the tier property: Name of storage tier for IOPS. + * Get the tier property: Storage tier of a server. * * @return the tier value. */ - public AzureManagedDiskPerformanceTiers tier() { + public AzureManagedDiskPerformanceTier tier() { return this.tier; } /** - * Set the tier property: Name of storage tier for IOPS. + * Set the tier property: Storage tier of a server. * * @param tier the tier value to set. * @return the Storage object itself. */ - public Storage withTier(AzureManagedDiskPerformanceTiers tier) { + public Storage withTier(AzureManagedDiskPerformanceTier tier) { this.tier = tier; return this; } /** - * Get the iops property: Storage IOPS quantity. This property is required to be set for storage Type PremiumV2_LRS - * and UltraSSD_LRS. + * Get the iops property: Maximum IOPS supported for storage. Required when type of storage is PremiumV2_LRS or + * UltraSSD_LRS. * * @return the iops value. */ @@ -124,8 +127,8 @@ public Integer iops() { } /** - * Set the iops property: Storage IOPS quantity. This property is required to be set for storage Type PremiumV2_LRS - * and UltraSSD_LRS. + * Set the iops property: Maximum IOPS supported for storage. Required when type of storage is PremiumV2_LRS or + * UltraSSD_LRS. * * @param iops the iops value to set. * @return the Storage object itself. @@ -136,8 +139,8 @@ public Storage withIops(Integer iops) { } /** - * Get the throughput property: Storage throughput for the server. This is required to be set for storage Type - * PremiumV2_LRS and UltraSSD_LRS. + * Get the throughput property: Maximum throughput supported for storage. Required when type of storage is + * PremiumV2_LRS or UltraSSD_LRS. * * @return the throughput value. */ @@ -146,8 +149,8 @@ public Integer throughput() { } /** - * Set the throughput property: Storage throughput for the server. This is required to be set for storage Type - * PremiumV2_LRS and UltraSSD_LRS. + * Set the throughput property: Maximum throughput supported for storage. Required when type of storage is + * PremiumV2_LRS or UltraSSD_LRS. * * @param throughput the throughput value to set. * @return the Storage object itself. @@ -158,8 +161,8 @@ public Storage withThroughput(Integer throughput) { } /** - * Get the type property: Storage type for the server. Allowed values are Premium_LRS, PremiumV2_LRS, and - * UltraSSD_LRS. Default is Premium_LRS if not specified. + * Get the type property: Type of storage assigned to a server. Allowed values are Premium_LRS, PremiumV2_LRS, or + * UltraSSD_LRS. If not specified, it defaults to Premium_LRS. * * @return the type value. */ @@ -168,8 +171,8 @@ public StorageType type() { } /** - * Set the type property: Storage type for the server. Allowed values are Premium_LRS, PremiumV2_LRS, and - * UltraSSD_LRS. Default is Premium_LRS if not specified. + * Set the type property: Type of storage assigned to a server. Allowed values are Premium_LRS, PremiumV2_LRS, or + * UltraSSD_LRS. If not specified, it defaults to Premium_LRS. * * @param type the type value to set. * @return the Storage object itself. @@ -222,7 +225,7 @@ public static Storage fromJson(JsonReader jsonReader) throws IOException { } else if ("autoGrow".equals(fieldName)) { deserializedStorage.autoGrow = StorageAutoGrow.fromString(reader.getString()); } else if ("tier".equals(fieldName)) { - deserializedStorage.tier = AzureManagedDiskPerformanceTiers.fromString(reader.getString()); + deserializedStorage.tier = AzureManagedDiskPerformanceTier.fromString(reader.getString()); } else if ("iops".equals(fieldName)) { deserializedStorage.iops = reader.getNullable(JsonReader::getInt); } else if ("throughput".equals(fieldName)) { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrow.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrow.java index c39333f9ff84..3464db964731 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrow.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrow.java @@ -8,7 +8,8 @@ import java.util.Collection; /** - * Flag to enable / disable Storage Auto grow for flexible server. + * Flag to enable or disable the automatic growth of storage size of a server when available space is nearing zero and + * conditions allow for automatically growing storage size. */ public final class StorageAutoGrow extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupport.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupport.java new file mode 100644 index 000000000000..5de2b28b18c2 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupport.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if storage autogrow is supported in this location. 'Enabled' means storage autogrow is supported. + * 'Disabled' stands for storage autogrow is not supported. Will be deprecated in the future. Look to Supported Features + * for 'StorageAutoGrowth'. + */ +public final class StorageAutoGrowthSupport extends ExpandableStringEnum { + /** + * Static value Enabled for StorageAutoGrowthSupport. + */ + public static final StorageAutoGrowthSupport ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for StorageAutoGrowthSupport. + */ + public static final StorageAutoGrowthSupport DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of StorageAutoGrowthSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StorageAutoGrowthSupport() { + } + + /** + * Creates or finds a StorageAutoGrowthSupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding StorageAutoGrowthSupport. + */ + public static StorageAutoGrowthSupport fromString(String name) { + return fromString(name, StorageAutoGrowthSupport.class); + } + + /** + * Gets known StorageAutoGrowthSupport values. + * + * @return known StorageAutoGrowthSupport values. + */ + public static Collection values() { + return values(StorageAutoGrowthSupport.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupportedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupportedEnum.java deleted file mode 100644 index 5ce1e1e5ac26..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupportedEnum.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether storage auto-grow is supported in this region. "Enabled" means storage auto-grow is - * supported. "Disabled" stands for storage auto-grow is not supported. Will be deprecated in future, please look to - * Supported Features for "StorageAutoGrowth". - */ -public final class StorageAutoGrowthSupportedEnum extends ExpandableStringEnum { - /** - * Static value Enabled for StorageAutoGrowthSupportedEnum. - */ - public static final StorageAutoGrowthSupportedEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for StorageAutoGrowthSupportedEnum. - */ - public static final StorageAutoGrowthSupportedEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of StorageAutoGrowthSupportedEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public StorageAutoGrowthSupportedEnum() { - } - - /** - * Creates or finds a StorageAutoGrowthSupportedEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding StorageAutoGrowthSupportedEnum. - */ - public static StorageAutoGrowthSupportedEnum fromString(String name) { - return fromString(name, StorageAutoGrowthSupportedEnum.class); - } - - /** - * Gets known StorageAutoGrowthSupportedEnum values. - * - * @return known StorageAutoGrowthSupportedEnum values. - */ - public static Collection values() { - return values(StorageAutoGrowthSupportedEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageEditionCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageEditionCapability.java index eb27a7d7bd27..2f78571e1f4d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageEditionCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageEditionCapability.java @@ -12,22 +12,22 @@ import java.util.List; /** - * Storage edition capability. + * Capabilities in terms of storage tier. */ @Immutable public final class StorageEditionCapability extends CapabilityBase { /* - * Storage edition name + * Name of storage tier. */ private String name; /* - * Default storage size in MB for storage edition + * Default storage size (in MB) for this storage tier. */ private Long defaultStorageSizeMb; /* - * Flexible server supported storage range in MB + * Configurations of storage supported for this storage tier. */ private List supportedStorageMb; @@ -48,7 +48,7 @@ public StorageEditionCapability() { } /** - * Get the name property: Storage edition name. + * Get the name property: Name of storage tier. * * @return the name value. */ @@ -57,7 +57,7 @@ public String name() { } /** - * Get the defaultStorageSizeMb property: Default storage size in MB for storage edition. + * Get the defaultStorageSizeMb property: Default storage size (in MB) for this storage tier. * * @return the defaultStorageSizeMb value. */ @@ -66,7 +66,7 @@ public Long defaultStorageSizeMb() { } /** - * Get the supportedStorageMb property: Flexible server supported storage range in MB. + * Get the supportedStorageMb property: Configurations of storage supported for this storage tier. * * @return the supportedStorageMb value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageMbCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageMbCapability.java index dbaeb01a635e..9e669f7962b4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageMbCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageMbCapability.java @@ -12,47 +12,47 @@ import java.util.List; /** - * storage size in MB capability. + * Storage size (in MB) capability. */ @Immutable public final class StorageMbCapability extends CapabilityBase { /* - * Supported IOPS + * Minimum IOPS supported by the storage size. */ private Integer supportedIops; /* - * Maximum IOPS supported by this #Vcores or PremiumV2_LRS Storage Size + * Maximum IOPS supported by the storage size. */ private Integer supportedMaximumIops; /* - * Storage size in MB + * Minimum supported size (in MB) of storage. */ private Long storageSizeMb; /* - * Maximum value of Storage size in MB + * Maximum supported size (in MB) of storage. */ private Long maximumStorageSizeMb; /* - * Values of throughput in MB/s + * Minimum supported throughput (in MB/s) of storage. */ private Integer supportedThroughput; /* - * Maximum values of throughput in MB/s + * Maximum supported throughput (in MB/s) of storage. */ private Integer supportedMaximumThroughput; /* - * Default tier for IOPS + * Default IOPS for this tier and storage size. */ private String defaultIopsTier; /* - * List of available options to upgrade the storage performance + * List of all supported storage tiers for this tier and storage size. */ private List supportedIopsTiers; @@ -73,7 +73,7 @@ public StorageMbCapability() { } /** - * Get the supportedIops property: Supported IOPS. + * Get the supportedIops property: Minimum IOPS supported by the storage size. * * @return the supportedIops value. */ @@ -82,7 +82,7 @@ public Integer supportedIops() { } /** - * Get the supportedMaximumIops property: Maximum IOPS supported by this #Vcores or PremiumV2_LRS Storage Size. + * Get the supportedMaximumIops property: Maximum IOPS supported by the storage size. * * @return the supportedMaximumIops value. */ @@ -91,7 +91,7 @@ public Integer supportedMaximumIops() { } /** - * Get the storageSizeMb property: Storage size in MB. + * Get the storageSizeMb property: Minimum supported size (in MB) of storage. * * @return the storageSizeMb value. */ @@ -100,7 +100,7 @@ public Long storageSizeMb() { } /** - * Get the maximumStorageSizeMb property: Maximum value of Storage size in MB. + * Get the maximumStorageSizeMb property: Maximum supported size (in MB) of storage. * * @return the maximumStorageSizeMb value. */ @@ -109,7 +109,7 @@ public Long maximumStorageSizeMb() { } /** - * Get the supportedThroughput property: Values of throughput in MB/s. + * Get the supportedThroughput property: Minimum supported throughput (in MB/s) of storage. * * @return the supportedThroughput value. */ @@ -118,7 +118,7 @@ public Integer supportedThroughput() { } /** - * Get the supportedMaximumThroughput property: Maximum values of throughput in MB/s. + * Get the supportedMaximumThroughput property: Maximum supported throughput (in MB/s) of storage. * * @return the supportedMaximumThroughput value. */ @@ -127,7 +127,7 @@ public Integer supportedMaximumThroughput() { } /** - * Get the defaultIopsTier property: Default tier for IOPS. + * Get the defaultIopsTier property: Default IOPS for this tier and storage size. * * @return the defaultIopsTier value. */ @@ -136,7 +136,7 @@ public String defaultIopsTier() { } /** - * Get the supportedIopsTiers property: List of available options to upgrade the storage performance. + * Get the supportedIopsTiers property: List of all supported storage tiers for this tier and storage size. * * @return the supportedIopsTiers value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageTierCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageTierCapability.java index 537025404534..c886ec63fe26 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageTierCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageTierCapability.java @@ -11,17 +11,17 @@ import java.io.IOException; /** - * Represents capability of a storage tier. + * Capability of a storage tier. */ @Immutable public final class StorageTierCapability extends CapabilityBase { /* - * Name to represent Storage tier capability + * Name of the storage tier. */ private String name; /* - * Supported IOPS for this storage tier + * Supported IOPS for the storage tier. */ private Integer iops; @@ -42,7 +42,7 @@ public StorageTierCapability() { } /** - * Get the name property: Name to represent Storage tier capability. + * Get the name property: Name of the storage tier. * * @return the name value. */ @@ -51,7 +51,7 @@ public String name() { } /** - * Get the iops property: Supported IOPS for this storage tier. + * Get the iops property: Supported IOPS for the storage tier. * * @return the iops value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageType.java index 95d307215ab0..2c0b523f7b07 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageType.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageType.java @@ -8,8 +8,8 @@ import java.util.Collection; /** - * Storage type for the server. Allowed values are Premium_LRS, PremiumV2_LRS, and UltraSSD_LRS. Default is Premium_LRS - * if not specified. + * Type of storage assigned to a server. Allowed values are Premium_LRS, PremiumV2_LRS, or UltraSSD_LRS. If not + * specified, it defaults to Premium_LRS. */ public final class StorageType extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeature.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeature.java index 10ea9a216afd..57964df1a66e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeature.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeature.java @@ -12,19 +12,19 @@ import java.io.IOException; /** - * The supported features. + * Features supported. */ @Immutable public final class SupportedFeature implements JsonSerializable { /* - * Name of feature + * Name of the feature. */ private String name; /* - * Status of feature + * Status of the feature. Indicates if the feature is enabled or not. */ - private SupportedFeatureStatusEnum status; + private FeatureStatus status; /** * Creates an instance of SupportedFeature class. @@ -33,7 +33,7 @@ public SupportedFeature() { } /** - * Get the name property: Name of feature. + * Get the name property: Name of the feature. * * @return the name value. */ @@ -42,11 +42,11 @@ public String name() { } /** - * Get the status property: Status of feature. + * Get the status property: Status of the feature. Indicates if the feature is enabled or not. * * @return the status value. */ - public SupportedFeatureStatusEnum status() { + public FeatureStatus status() { return this.status; } @@ -85,7 +85,7 @@ public static SupportedFeature fromJson(JsonReader jsonReader) throws IOExceptio if ("name".equals(fieldName)) { deserializedSupportedFeature.name = reader.getString(); } else if ("status".equals(fieldName)) { - deserializedSupportedFeature.status = SupportedFeatureStatusEnum.fromString(reader.getString()); + deserializedSupportedFeature.status = FeatureStatus.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeatureStatusEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeatureStatusEnum.java deleted file mode 100644 index 2d1e2755bc6d..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeatureStatusEnum.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Status of feature. - */ -public final class SupportedFeatureStatusEnum extends ExpandableStringEnum { - /** - * Static value Enabled for SupportedFeatureStatusEnum. - */ - public static final SupportedFeatureStatusEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for SupportedFeatureStatusEnum. - */ - public static final SupportedFeatureStatusEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of SupportedFeatureStatusEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SupportedFeatureStatusEnum() { - } - - /** - * Creates or finds a SupportedFeatureStatusEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding SupportedFeatureStatusEnum. - */ - public static SupportedFeatureStatusEnum fromString(String name) { - return fromString(name, SupportedFeatureStatusEnum.class); - } - - /** - * Gets known SupportedFeatureStatusEnum values. - * - * @return known SupportedFeatureStatusEnum values. - */ - public static Collection values() { - return values(SupportedFeatureStatusEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ThreatProtectionState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ThreatProtectionState.java index da405aa4bf57..a253e5c69e92 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ThreatProtectionState.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ThreatProtectionState.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; /** - * Specifies the state of the Threat Protection, whether it is enabled or disabled or a state has not been applied yet - * on the specific server. + * Specifies the state of the advanced threat protection, whether it is enabled, disabled, or a state has not been + * applied yet on the server. */ public enum ThreatProtectionState { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TriggerCutover.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TriggerCutover.java new file mode 100644 index 000000000000..66b6d0b61ec1 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TriggerCutover.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.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if cutover must be triggered for the entire migration. + */ +public final class TriggerCutover extends ExpandableStringEnum { + /** + * Static value True for TriggerCutover. + */ + public static final TriggerCutover TRUE = fromString("True"); + + /** + * Static value False for TriggerCutover. + */ + public static final TriggerCutover FALSE = fromString("False"); + + /** + * Creates a new instance of TriggerCutover value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TriggerCutover() { + } + + /** + * Creates or finds a TriggerCutover from its string representation. + * + * @param name a name to look for. + * @return the corresponding TriggerCutover. + */ + public static TriggerCutover fromString(String name) { + return fromString(name, TriggerCutover.class); + } + + /** + * Gets known TriggerCutover values. + * + * @return known TriggerCutover values. + */ + public static Collection values() { + return values(TriggerCutover.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TriggerCutoverEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TriggerCutoverEnum.java deleted file mode 100644 index 38fa75b73176..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TriggerCutoverEnum.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * To trigger cutover for entire migration we need to send this flag as True. - */ -public final class TriggerCutoverEnum extends ExpandableStringEnum { - /** - * Static value True for TriggerCutoverEnum. - */ - public static final TriggerCutoverEnum TRUE = fromString("True"); - - /** - * Static value False for TriggerCutoverEnum. - */ - public static final TriggerCutoverEnum FALSE = fromString("False"); - - /** - * Creates a new instance of TriggerCutoverEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TriggerCutoverEnum() { - } - - /** - * Creates or finds a TriggerCutoverEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding TriggerCutoverEnum. - */ - public static TriggerCutoverEnum fromString(String name) { - return fromString(name, TriggerCutoverEnum.class); - } - - /** - * Gets known TriggerCutoverEnum values. - * - * @return known TriggerCutoverEnum values. - */ - public static Collection values() { - return values(TriggerCutoverEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningIndexes.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningIndexes.java deleted file mode 100644 index d5960ae63403..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningIndexes.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of TuningIndexes. - */ -public interface TuningIndexes { - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 available index recommendations as paginated response with {@link PagedIterable}. - */ - PagedIterable listRecommendations(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available index recommendations as paginated response with {@link PagedIterable}. - */ - PagedIterable listRecommendations(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, RecommendationType recommendationType, Context context); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionEnum.java deleted file mode 100644 index 2050090c9a3b..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionEnum.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for TuningOptionEnum. - */ -public final class TuningOptionEnum extends ExpandableStringEnum { - /** - * Static value index for TuningOptionEnum. - */ - public static final TuningOptionEnum INDEX = fromString("index"); - - /** - * Static value configuration for TuningOptionEnum. - */ - public static final TuningOptionEnum CONFIGURATION = fromString("configuration"); - - /** - * Creates a new instance of TuningOptionEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TuningOptionEnum() { - } - - /** - * Creates or finds a TuningOptionEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding TuningOptionEnum. - */ - public static TuningOptionEnum fromString(String name) { - return fromString(name, TuningOptionEnum.class); - } - - /** - * Gets known TuningOptionEnum values. - * - * @return known TuningOptionEnum values. - */ - public static Collection values() { - return values(TuningOptionEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionParameterEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionParameterEnum.java new file mode 100644 index 000000000000..fb3f287cdf26 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionParameterEnum.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.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for TuningOptionParameterEnum. + */ +public final class TuningOptionParameterEnum extends ExpandableStringEnum { + /** + * Static value index for TuningOptionParameterEnum. + */ + public static final TuningOptionParameterEnum INDEX = fromString("index"); + + /** + * Static value table for TuningOptionParameterEnum. + */ + public static final TuningOptionParameterEnum TABLE = fromString("table"); + + /** + * Creates a new instance of TuningOptionParameterEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TuningOptionParameterEnum() { + } + + /** + * Creates or finds a TuningOptionParameterEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding TuningOptionParameterEnum. + */ + public static TuningOptionParameterEnum fromString(String name) { + return fromString(name, TuningOptionParameterEnum.class); + } + + /** + * Gets known TuningOptionParameterEnum values. + * + * @return known TuningOptionParameterEnum values. + */ + public static Collection values() { + return values(TuningOptionParameterEnum.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptions.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptions.java index 35f1f517f30e..575ba179e7c0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptions.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptions.java @@ -4,65 +4,45 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; /** - * Resource collection API of TuningOptions. + * An immutable client-side representation of TuningOptions. */ public interface TuningOptions { /** - * Retrieve the tuning option on a server. + * Gets the id property: Fully qualified resource Id for the resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stores property that features impact on some metric if this recommended action is applied along with - * {@link Response}. + * @return the id value. */ - Response getWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context); + String id(); /** - * Retrieve the tuning option on a server. + * Gets the name property: The name of the resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stores property that features impact on some metric if this recommended action is applied. + * @return the name value. */ - TuningOptionsResource get(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); + String name(); /** - * Retrieve the list of available tuning options. + * Gets the type property: The type of the resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 server tuning options as paginated response with {@link PagedIterable}. + * @return the type value. */ - PagedIterable listByServer(String resourceGroupName, String serverName); + String type(); /** - * Retrieve the list of available tuning options. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 server tuning options as paginated response with {@link PagedIterable}. + * @return the systemData value. */ - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner object. + * + * @return the inner object. + */ + TuningOptionsInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFileListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsList.java similarity index 61% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFileListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsList.java index 83517b041fb4..56de034101e1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFileListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsList.java @@ -9,53 +9,53 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LogFileInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; import java.io.IOException; import java.util.List; /** - * A List of logFiles. + * List of server tuning options. */ @Fluent -public final class LogFileListResult implements JsonSerializable { +public final class TuningOptionsList implements JsonSerializable { /* - * The list of logFiles in a server + * List of available tuning options. */ - private List value; + private List value; /* - * The link used to get the next page of operations. + * Link used to get the next page of results. */ private String nextLink; /** - * Creates an instance of LogFileListResult class. + * Creates an instance of TuningOptionsList class. */ - public LogFileListResult() { + public TuningOptionsList() { } /** - * Get the value property: The list of logFiles in a server. + * Get the value property: List of available tuning options. * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** - * Set the value property: The list of logFiles in a server. + * Set the value property: List of available tuning options. * * @param value the value value to set. - * @return the LogFileListResult object itself. + * @return the TuningOptionsList object itself. */ - public LogFileListResult withValue(List value) { + public TuningOptionsList withValue(List value) { this.value = value; return this; } /** - * Get the nextLink property: The link used to get the next page of operations. + * Get the nextLink property: Link used to get the next page of results. * * @return the nextLink value. */ @@ -64,12 +64,12 @@ public String nextLink() { } /** - * Set the nextLink property: The link used to get the next page of operations. + * Set the nextLink property: Link used to get the next page of results. * * @param nextLink the nextLink value to set. - * @return the LogFileListResult object itself. + * @return the TuningOptionsList object itself. */ - public LogFileListResult withNextLink(String nextLink) { + public TuningOptionsList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } @@ -97,31 +97,31 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of LogFileListResult from the JsonReader. + * Reads an instance of TuningOptionsList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of LogFileListResult if the JsonReader was pointing to an instance of it, or null if it was + * @return An instance of TuningOptionsList if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IOException If an error occurs while reading the LogFileListResult. + * @throws IOException If an error occurs while reading the TuningOptionsList. */ - public static LogFileListResult fromJson(JsonReader jsonReader) throws IOException { + public static TuningOptionsList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - LogFileListResult deserializedLogFileListResult = new LogFileListResult(); + TuningOptionsList deserializedTuningOptionsList = new TuningOptionsList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> LogFileInner.fromJson(reader1)); - deserializedLogFileListResult.value = value; + List value = reader.readArray(reader1 -> TuningOptionsInner.fromJson(reader1)); + deserializedTuningOptionsList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedLogFileListResult.nextLink = reader.getString(); + deserializedTuningOptionsList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedLogFileListResult; + return deserializedTuningOptionsList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsListResult.java deleted file mode 100644 index db3fbdfdcca7..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsListResult.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of server tuning options. - */ -@Fluent -public final class TuningOptionsListResult implements JsonSerializable { - /* - * A list of available tuning options. - */ - private List value; - - /* - * URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - */ - private String nextLink; - - /** - * Creates an instance of TuningOptionsListResult class. - */ - public TuningOptionsListResult() { - } - - /** - * Get the value property: A list of available tuning options. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of available tuning options. - * - * @param value the value value to set. - * @return the TuningOptionsListResult object itself. - */ - public TuningOptionsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - * - * @param nextLink the nextLink value to set. - * @return the TuningOptionsListResult object itself. - */ - public TuningOptionsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TuningOptionsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TuningOptionsListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the TuningOptionsListResult. - */ - public static TuningOptionsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TuningOptionsListResult deserializedTuningOptionsListResult = new TuningOptionsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> TuningOptionsResourceInner.fromJson(reader1)); - deserializedTuningOptionsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedTuningOptionsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTuningOptionsListResult; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsOperations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsOperations.java new file mode 100644 index 000000000000..8916c88d3fa9 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsOperations.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of TuningOptionsOperations. + */ +public interface TuningOptionsOperations { + /** + * Gets the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the tuning options of a server along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, Context context); + + /** + * Gets the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the tuning options of a server. + */ + TuningOptions get(String resourceGroupName, String serverName, TuningOptionParameterEnum tuningOption); + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 available object recommendations as paginated response with {@link PagedIterable}. + */ + PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption); + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available object recommendations as paginated response with {@link PagedIterable}. + */ + PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType, Context context); + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 server tuning options as paginated response with {@link PagedIterable}. + */ + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 server tuning options as paginated response with {@link PagedIterable}. + */ + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsResource.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsResource.java deleted file mode 100644 index a998e785913a..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsResource.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsResourceInner; - -/** - * An immutable client-side representation of TuningOptionsResource. - */ -public interface TuningOptionsResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsResourceInner - * object. - * - * @return the inner object. - */ - TuningOptionsResourceInner innerModel(); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserAssignedIdentity.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserAssignedIdentity.java index 37460b560aab..99ba4c9f680c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserAssignedIdentity.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserAssignedIdentity.java @@ -14,27 +14,27 @@ import java.util.Map; /** - * Information describing the identities associated with this application. + * Identities associated with a server. */ @Fluent public final class UserAssignedIdentity implements JsonSerializable { /* - * represents user assigned identities map. + * Map of user assigned managed identities. */ private Map userAssignedIdentities; /* - * the identity principal Id of the server. + * Identifier of the object of the service principal associated to the user assigned managed identity. */ private String principalId; /* - * the types of identities associated with this resource + * Types of identities associated with a server. */ private IdentityType type; /* - * Tenant id of the server. + * Identifier of the tenant of a server. */ private String tenantId; @@ -45,7 +45,7 @@ public UserAssignedIdentity() { } /** - * Get the userAssignedIdentities property: represents user assigned identities map. + * Get the userAssignedIdentities property: Map of user assigned managed identities. * * @return the userAssignedIdentities value. */ @@ -54,7 +54,7 @@ public Map userAssignedIdentities() { } /** - * Set the userAssignedIdentities property: represents user assigned identities map. + * Set the userAssignedIdentities property: Map of user assigned managed identities. * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the UserAssignedIdentity object itself. @@ -65,7 +65,8 @@ public UserAssignedIdentity withUserAssignedIdentities(Map } /** - * Get the principalId property: the identity principal Id of the server. + * Get the principalId property: Identifier of the object of the service principal associated to the user assigned + * managed identity. * * @return the principalId value. */ @@ -74,7 +75,8 @@ public String principalId() { } /** - * Set the principalId property: the identity principal Id of the server. + * Set the principalId property: Identifier of the object of the service principal associated to the user assigned + * managed identity. * * @param principalId the principalId value to set. * @return the UserAssignedIdentity object itself. @@ -85,7 +87,7 @@ public UserAssignedIdentity withPrincipalId(String principalId) { } /** - * Get the type property: the types of identities associated with this resource. + * Get the type property: Types of identities associated with a server. * * @return the type value. */ @@ -94,7 +96,7 @@ public IdentityType type() { } /** - * Set the type property: the types of identities associated with this resource. + * Set the type property: Types of identities associated with a server. * * @param type the type value to set. * @return the UserAssignedIdentity object itself. @@ -105,7 +107,7 @@ public UserAssignedIdentity withType(IdentityType type) { } /** - * Get the tenantId property: Tenant id of the server. + * Get the tenantId property: Identifier of the tenant of a server. * * @return the tenantId value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserIdentity.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserIdentity.java index 9f72c7a2e49e..b280a19f40e8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserIdentity.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserIdentity.java @@ -12,17 +12,17 @@ import java.io.IOException; /** - * Describes a single user-assigned identity associated with the application. + * User assigned managed identity associated with a server. */ @Fluent public final class UserIdentity implements JsonSerializable { /* - * the object identifier of the Service Principal which this identity represents. + * Identifier of the object of the service principal associated to the user assigned managed identity. */ private String principalId; /* - * the client identifier of the Service Principal which this identity represents. + * Identifier of the client of the service principal associated to the user assigned managed identity. */ private String clientId; @@ -33,7 +33,8 @@ public UserIdentity() { } /** - * Get the principalId property: the object identifier of the Service Principal which this identity represents. + * Get the principalId property: Identifier of the object of the service principal associated to the user assigned + * managed identity. * * @return the principalId value. */ @@ -42,7 +43,8 @@ public String principalId() { } /** - * Set the principalId property: the object identifier of the Service Principal which this identity represents. + * Set the principalId property: Identifier of the object of the service principal associated to the user assigned + * managed identity. * * @param principalId the principalId value to set. * @return the UserIdentity object itself. @@ -53,7 +55,8 @@ public UserIdentity withPrincipalId(String principalId) { } /** - * Get the clientId property: the client identifier of the Service Principal which this identity represents. + * Get the clientId property: Identifier of the client of the service principal associated to the user assigned + * managed identity. * * @return the clientId value. */ @@ -62,7 +65,8 @@ public String clientId() { } /** - * Set the clientId property: the client identifier of the Service Principal which this identity represents. + * Set the clientId property: Identifier of the client of the service principal associated to the user assigned + * managed identity. * * @param clientId the clientId value to set. * @return the UserIdentity object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationDetails.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationDetails.java index a17d3218a63d..05135027c8a7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationDetails.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationDetails.java @@ -21,27 +21,27 @@ @Fluent public final class ValidationDetails implements JsonSerializable { /* - * Validation status for migration + * Validation status for migration. */ private ValidationState status; /* - * Validation Start date-time in UTC + * Start time (UTC) for validation. */ private OffsetDateTime validationStartTimeInUtc; /* - * Validation End date-time in UTC + * End time (UTC) for validation. */ private OffsetDateTime validationEndTimeInUtc; /* - * Details of server level validations + * Details of server level validations. */ private List serverLevelValidationDetails; /* - * Details of server level validations + * Details of server level validations. */ private List dbLevelValidationDetails; @@ -72,7 +72,7 @@ public ValidationDetails withStatus(ValidationState status) { } /** - * Get the validationStartTimeInUtc property: Validation Start date-time in UTC. + * Get the validationStartTimeInUtc property: Start time (UTC) for validation. * * @return the validationStartTimeInUtc value. */ @@ -81,7 +81,7 @@ public OffsetDateTime validationStartTimeInUtc() { } /** - * Set the validationStartTimeInUtc property: Validation Start date-time in UTC. + * Set the validationStartTimeInUtc property: Start time (UTC) for validation. * * @param validationStartTimeInUtc the validationStartTimeInUtc value to set. * @return the ValidationDetails object itself. @@ -92,7 +92,7 @@ public ValidationDetails withValidationStartTimeInUtc(OffsetDateTime validationS } /** - * Get the validationEndTimeInUtc property: Validation End date-time in UTC. + * Get the validationEndTimeInUtc property: End time (UTC) for validation. * * @return the validationEndTimeInUtc value. */ @@ -101,7 +101,7 @@ public OffsetDateTime validationEndTimeInUtc() { } /** - * Set the validationEndTimeInUtc property: Validation End date-time in UTC. + * Set the validationEndTimeInUtc property: End time (UTC) for validation. * * @param validationEndTimeInUtc the validationEndTimeInUtc value to set. * @return the ValidationDetails object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationMessage.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationMessage.java index 944cb1940af4..6e8bed7063db 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationMessage.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationMessage.java @@ -17,12 +17,12 @@ @Fluent public final class ValidationMessage implements JsonSerializable { /* - * Severity of validation message + * Severity of validation message. */ private ValidationState state; /* - * Validation message string + * Validation message string. */ private String message; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationSummaryItem.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationSummaryItem.java index 4345153db6aa..c00bb4c432f2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationSummaryItem.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationSummaryItem.java @@ -18,17 +18,17 @@ @Fluent public final class ValidationSummaryItem implements JsonSerializable { /* - * Validation type + * Validation type. */ private String type; /* - * Validation status for migration + * Validation status for migration. */ private ValidationState state; /* - * Validation messages + * Validation messages. */ private List messages; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResource.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoint.java similarity index 66% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResource.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoint.java index 94e1cfbba840..c408365e4654 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResource.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoint.java @@ -6,22 +6,22 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; import java.util.List; /** - * An immutable client-side representation of VirtualEndpointResource. + * An immutable client-side representation of VirtualEndpoint. */ -public interface VirtualEndpointResource { +public interface VirtualEndpoint { /** - * Gets the endpointType property: The endpoint type for the virtual endpoint. + * Gets the endpointType property: Type of endpoint for the virtual endpoints. * * @return the endpointType value. */ VirtualEndpointType endpointType(); /** - * Gets the members property: List of members for a virtual endpoint. + * Gets the members property: List of servers that one of the virtual endpoints can refer to. * * @return the members value. */ @@ -72,32 +72,31 @@ public interface VirtualEndpointResource { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceInner - * object. + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner object. * * @return the inner object. */ - VirtualEndpointResourceInner innerModel(); + VirtualEndpointInner innerModel(); /** - * The entirety of the VirtualEndpointResource definition. + * The entirety of the VirtualEndpoint definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } /** - * The VirtualEndpointResource definition stages. + * The VirtualEndpoint definition stages. */ interface DefinitionStages { /** - * The first stage of the VirtualEndpointResource definition. + * The first stage of the VirtualEndpoint definition. */ interface Blank extends WithParentResource { } /** - * The stage of the VirtualEndpointResource definition allowing to specify parent resource. + * The stage of the VirtualEndpoint definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -111,8 +110,8 @@ interface WithParentResource { } /** - * The stage of the VirtualEndpointResource definition which contains all the minimum required properties for - * the resource to be created, but also allows for any other optional properties to be specified. + * The stage of the VirtualEndpoint definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate extends DefinitionStages.WithEndpointType, DefinitionStages.WithMembers { /** @@ -120,7 +119,7 @@ interface WithCreate extends DefinitionStages.WithEndpointType, DefinitionStages * * @return the created resource. */ - VirtualEndpointResource create(); + VirtualEndpoint create(); /** * Executes the create request. @@ -128,30 +127,30 @@ interface WithCreate extends DefinitionStages.WithEndpointType, DefinitionStages * @param context The context to associate with this operation. * @return the created resource. */ - VirtualEndpointResource create(Context context); + VirtualEndpoint create(Context context); } /** - * The stage of the VirtualEndpointResource definition allowing to specify endpointType. + * The stage of the VirtualEndpoint definition allowing to specify endpointType. */ interface WithEndpointType { /** - * Specifies the endpointType property: The endpoint type for the virtual endpoint.. + * Specifies the endpointType property: Type of endpoint for the virtual endpoints.. * - * @param endpointType The endpoint type for the virtual endpoint. + * @param endpointType Type of endpoint for the virtual endpoints. * @return the next definition stage. */ WithCreate withEndpointType(VirtualEndpointType endpointType); } /** - * The stage of the VirtualEndpointResource definition allowing to specify members. + * The stage of the VirtualEndpoint definition allowing to specify members. */ interface WithMembers { /** - * Specifies the members property: List of members for a virtual endpoint. + * Specifies the members property: List of servers that one of the virtual endpoints can refer to.. * - * @param members List of members for a virtual endpoint. + * @param members List of servers that one of the virtual endpoints can refer to. * @return the next definition stage. */ WithCreate withMembers(List members); @@ -159,14 +158,14 @@ interface WithMembers { } /** - * Begins update for the VirtualEndpointResource resource. + * Begins update for the VirtualEndpoint resource. * * @return the stage of resource update. */ - VirtualEndpointResource.Update update(); + VirtualEndpoint.Update update(); /** - * The template for VirtualEndpointResource update. + * The template for VirtualEndpoint update. */ interface Update extends UpdateStages.WithEndpointType, UpdateStages.WithMembers { /** @@ -174,7 +173,7 @@ interface Update extends UpdateStages.WithEndpointType, UpdateStages.WithMembers * * @return the updated resource. */ - VirtualEndpointResource apply(); + VirtualEndpoint apply(); /** * Executes the update request. @@ -182,34 +181,34 @@ interface Update extends UpdateStages.WithEndpointType, UpdateStages.WithMembers * @param context The context to associate with this operation. * @return the updated resource. */ - VirtualEndpointResource apply(Context context); + VirtualEndpoint apply(Context context); } /** - * The VirtualEndpointResource update stages. + * The VirtualEndpoint update stages. */ interface UpdateStages { /** - * The stage of the VirtualEndpointResource update allowing to specify endpointType. + * The stage of the VirtualEndpoint update allowing to specify endpointType. */ interface WithEndpointType { /** - * Specifies the endpointType property: The endpoint type for the virtual endpoint.. + * Specifies the endpointType property: Type of endpoint for the virtual endpoints.. * - * @param endpointType The endpoint type for the virtual endpoint. + * @param endpointType Type of endpoint for the virtual endpoints. * @return the next definition stage. */ Update withEndpointType(VirtualEndpointType endpointType); } /** - * The stage of the VirtualEndpointResource update allowing to specify members. + * The stage of the VirtualEndpoint update allowing to specify members. */ interface WithMembers { /** - * Specifies the members property: List of members for a virtual endpoint. + * Specifies the members property: List of servers that one of the virtual endpoints can refer to.. * - * @param members List of members for a virtual endpoint. + * @param members List of servers that one of the virtual endpoints can refer to. * @return the next definition stage. */ Update withMembers(List members); @@ -221,7 +220,7 @@ interface WithMembers { * * @return the refreshed resource. */ - VirtualEndpointResource refresh(); + VirtualEndpoint refresh(); /** * Refreshes the resource to sync with Azure. @@ -229,5 +228,5 @@ interface WithMembers { * @param context The context to associate with this operation. * @return the refreshed resource. */ - VirtualEndpointResource refresh(Context context); + VirtualEndpoint refresh(Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResourceForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResourceForPatch.java index 979ecb992ddb..22ec5fa5b809 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResourceForPatch.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResourceForPatch.java @@ -14,12 +14,12 @@ import java.util.List; /** - * Represents a virtual endpoint for a server. + * Pair of virtual endpoints for a server. */ @Fluent public class VirtualEndpointResourceForPatch implements JsonSerializable { /* - * Properties of the virtual endpoint resource. + * Properties of the pair of virtual endpoints. */ private VirtualEndpointResourceProperties innerProperties; @@ -30,7 +30,7 @@ public VirtualEndpointResourceForPatch() { } /** - * Get the innerProperties property: Properties of the virtual endpoint resource. + * Get the innerProperties property: Properties of the pair of virtual endpoints. * * @return the innerProperties value. */ @@ -39,7 +39,7 @@ private VirtualEndpointResourceProperties innerProperties() { } /** - * Set the innerProperties property: Properties of the virtual endpoint resource. + * Set the innerProperties property: Properties of the pair of virtual endpoints. * * @param innerProperties the innerProperties value to set. * @return the VirtualEndpointResourceForPatch object itself. @@ -50,7 +50,7 @@ VirtualEndpointResourceForPatch withInnerProperties(VirtualEndpointResourcePrope } /** - * Get the endpointType property: The endpoint type for the virtual endpoint. + * Get the endpointType property: Type of endpoint for the virtual endpoints. * * @return the endpointType value. */ @@ -59,7 +59,7 @@ public VirtualEndpointType endpointType() { } /** - * Set the endpointType property: The endpoint type for the virtual endpoint. + * Set the endpointType property: Type of endpoint for the virtual endpoints. * * @param endpointType the endpointType value to set. * @return the VirtualEndpointResourceForPatch object itself. @@ -73,7 +73,7 @@ public VirtualEndpointResourceForPatch withEndpointType(VirtualEndpointType endp } /** - * Get the members property: List of members for a virtual endpoint. + * Get the members property: List of servers that one of the virtual endpoints can refer to. * * @return the members value. */ @@ -82,7 +82,7 @@ public List members() { } /** - * Set the members property: List of members for a virtual endpoint. + * Set the members property: List of servers that one of the virtual endpoints can refer to. * * @param members the members value to set. * @return the VirtualEndpointResourceForPatch object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointType.java index 4dc3ffcb3e75..fca4579d570b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointType.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointType.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The endpoint type for the virtual endpoint. + * Type of endpoint for the virtual endpoints. */ public final class VirtualEndpointType extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoints.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoints.java index 7cdc907e4bbe..e04ee5714df7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoints.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoints.java @@ -13,11 +13,11 @@ */ public interface VirtualEndpoints { /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -25,11 +25,11 @@ public interface VirtualEndpoints { void delete(String resourceGroupName, String serverName, String virtualEndpointName); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -38,47 +38,47 @@ public interface VirtualEndpoints { void delete(String resourceGroupName, String serverName, String virtualEndpointName, Context context); /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint along with {@link Response}. + * @return information about a pair of virtual endpoints along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String serverName, - String virtualEndpointName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String virtualEndpointName, + Context context); /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint. + * @return information about a pair of virtual endpoints. */ - VirtualEndpointResource get(String resourceGroupName, String serverName, String virtualEndpointName); + VirtualEndpoint get(String resourceGroupName, String serverName, String virtualEndpointName); /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 virtual endpoints as paginated response with {@link PagedIterable}. + * @return list of virtual endpoints as paginated response with {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -86,35 +86,35 @@ Response getWithResponse(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of virtual endpoints as paginated response with {@link PagedIterable}. + * @return list of virtual endpoints as paginated response with {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint along with {@link Response}. + * @return information about a pair of virtual endpoints along with {@link Response}. */ - VirtualEndpointResource getById(String id); + VirtualEndpoint getById(String id); /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint along with {@link Response}. + * @return information about a pair of virtual endpoints along with {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + Response getByIdWithResponse(String id, Context context); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,7 +124,7 @@ Response getWithResponse(String resourceGroupName, Stri void deleteById(String id); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -135,10 +135,10 @@ Response getWithResponse(String resourceGroupName, Stri void deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new VirtualEndpointResource resource. + * Begins definition for a new VirtualEndpoint resource. * * @param name resource name. - * @return the first stage of the new VirtualEndpointResource definition. + * @return the first stage of the new VirtualEndpoint definition. */ - VirtualEndpointResource.DefinitionStages.Blank define(String name); + VirtualEndpoint.DefinitionStages.Blank define(String name); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerBackupListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointsList.java similarity index 57% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerBackupListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointsList.java index 858cae530190..3c29b9a5ac37 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerBackupListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointsList.java @@ -9,53 +9,53 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; import java.io.IOException; import java.util.List; /** - * A list of server backups. + * List of virtual endpoints. */ @Fluent -public final class ServerBackupListResult implements JsonSerializable { +public final class VirtualEndpointsList implements JsonSerializable { /* - * The list of backups of a server. + * List of virtual endpoints. */ - private List value; + private List value; /* - * The link used to get the next page of operations. + * Link used to get the next page of results. */ private String nextLink; /** - * Creates an instance of ServerBackupListResult class. + * Creates an instance of VirtualEndpointsList class. */ - public ServerBackupListResult() { + public VirtualEndpointsList() { } /** - * Get the value property: The list of backups of a server. + * Get the value property: List of virtual endpoints. * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** - * Set the value property: The list of backups of a server. + * Set the value property: List of virtual endpoints. * * @param value the value value to set. - * @return the ServerBackupListResult object itself. + * @return the VirtualEndpointsList object itself. */ - public ServerBackupListResult withValue(List value) { + public VirtualEndpointsList withValue(List value) { this.value = value; return this; } /** - * Get the nextLink property: The link used to get the next page of operations. + * Get the nextLink property: Link used to get the next page of results. * * @return the nextLink value. */ @@ -64,12 +64,12 @@ public String nextLink() { } /** - * Set the nextLink property: The link used to get the next page of operations. + * Set the nextLink property: Link used to get the next page of results. * * @param nextLink the nextLink value to set. - * @return the ServerBackupListResult object itself. + * @return the VirtualEndpointsList object itself. */ - public ServerBackupListResult withNextLink(String nextLink) { + public VirtualEndpointsList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } @@ -97,31 +97,32 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ServerBackupListResult from the JsonReader. + * Reads an instance of VirtualEndpointsList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ServerBackupListResult if the JsonReader was pointing to an instance of it, or null if it + * @return An instance of VirtualEndpointsList if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ServerBackupListResult. + * @throws IOException If an error occurs while reading the VirtualEndpointsList. */ - public static ServerBackupListResult fromJson(JsonReader jsonReader) throws IOException { + public static VirtualEndpointsList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ServerBackupListResult deserializedServerBackupListResult = new ServerBackupListResult(); + VirtualEndpointsList deserializedVirtualEndpointsList = new VirtualEndpointsList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ServerBackupInner.fromJson(reader1)); - deserializedServerBackupListResult.value = value; + List value + = reader.readArray(reader1 -> VirtualEndpointInner.fromJson(reader1)); + deserializedVirtualEndpointsList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedServerBackupListResult.nextLink = reader.getString(); + deserializedVirtualEndpointsList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedServerBackupListResult; + return deserializedVirtualEndpointsList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointsListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointsListResult.java deleted file mode 100644 index 6ab12b620882..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointsListResult.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of virtual endpoints. - */ -@Fluent -public final class VirtualEndpointsListResult implements JsonSerializable { - /* - * The list of virtual endpoints - */ - private List value; - - /* - * The link used to get the next page of operations. - */ - private String nextLink; - - /** - * Creates an instance of VirtualEndpointsListResult class. - */ - public VirtualEndpointsListResult() { - } - - /** - * Get the value property: The list of virtual endpoints. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of virtual endpoints. - * - * @param value the value value to set. - * @return the VirtualEndpointsListResult object itself. - */ - public VirtualEndpointsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the VirtualEndpointsListResult object itself. - */ - public VirtualEndpointsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualEndpointsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualEndpointsListResult if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualEndpointsListResult. - */ - public static VirtualEndpointsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualEndpointsListResult deserializedVirtualEndpointsListResult = new VirtualEndpointsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> VirtualEndpointResourceInner.fromJson(reader1)); - deserializedVirtualEndpointsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedVirtualEndpointsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualEndpointsListResult; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageModel.java similarity index 83% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageModel.java index d43ba8509089..847409abb36e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageModel.java @@ -4,13 +4,13 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageResultInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageModelInner; import java.util.List; /** - * An immutable client-side representation of VirtualNetworkSubnetUsageResult. + * An immutable client-side representation of VirtualNetworkSubnetUsageModel. */ -public interface VirtualNetworkSubnetUsageResult { +public interface VirtualNetworkSubnetUsageModel { /** * Gets the delegatedSubnetsUsage property: The delegatedSubnetsUsage property. * @@ -34,9 +34,9 @@ public interface VirtualNetworkSubnetUsageResult { /** * Gets the inner - * com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageResultInner object. + * com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageModelInner object. * * @return the inner object. */ - VirtualNetworkSubnetUsageResultInner innerModel(); + VirtualNetworkSubnetUsageModelInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsages.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsages.java index 7c2b9420e91b..7a58b27450f9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsages.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsages.java @@ -12,7 +12,7 @@ */ public interface VirtualNetworkSubnetUsages { /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. @@ -20,20 +20,20 @@ public interface VirtualNetworkSubnetUsages { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network subnet usage for a given vNet resource id along with {@link Response}. + * @return virtual network subnet usage data along with {@link Response}. */ - Response executeWithResponse(String locationName, + Response listWithResponse(String locationName, VirtualNetworkSubnetUsageParameter parameters, Context context); /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network subnet usage for a given vNet resource id. + * @return virtual network subnet usage data. */ - VirtualNetworkSubnetUsageResult execute(String locationName, VirtualNetworkSubnetUsageParameter parameters); + VirtualNetworkSubnetUsageModel list(String locationName, VirtualNetworkSubnetUsageParameter parameters); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHaAndGeoBackupSupportedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHaAndGeoBackupSupportedEnum.java deleted file mode 100644 index 3d603c02c172..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHaAndGeoBackupSupportedEnum.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether Zone Redundant HA and Geo-backup is supported in this region. "Enabled" means zone - * redundant HA and geo-backup is supported. "Disabled" stands for zone redundant HA and geo-backup is not supported. - * Will be deprecated in future, please look to Supported Features for "ZoneRedundantHaAndGeoBackup". - */ -public final class ZoneRedundantHaAndGeoBackupSupportedEnum - extends ExpandableStringEnum { - /** - * Static value Enabled for ZoneRedundantHaAndGeoBackupSupportedEnum. - */ - public static final ZoneRedundantHaAndGeoBackupSupportedEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for ZoneRedundantHaAndGeoBackupSupportedEnum. - */ - public static final ZoneRedundantHaAndGeoBackupSupportedEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of ZoneRedundantHaAndGeoBackupSupportedEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ZoneRedundantHaAndGeoBackupSupportedEnum() { - } - - /** - * Creates or finds a ZoneRedundantHaAndGeoBackupSupportedEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding ZoneRedundantHaAndGeoBackupSupportedEnum. - */ - public static ZoneRedundantHaAndGeoBackupSupportedEnum fromString(String name) { - return fromString(name, ZoneRedundantHaAndGeoBackupSupportedEnum.class); - } - - /** - * Gets known ZoneRedundantHaAndGeoBackupSupportedEnum values. - * - * @return known ZoneRedundantHaAndGeoBackupSupportedEnum values. - */ - public static Collection values() { - return values(ZoneRedundantHaAndGeoBackupSupportedEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHaSupportedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHaSupportedEnum.java deleted file mode 100644 index afa367f7b085..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHaSupportedEnum.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether Zone Redundant HA is supported in this region. "Enabled" means zone redundant HA is - * supported. "Disabled" stands for zone redundant HA is not supported. Will be deprecated in future, please look to - * Supported Features for "ZoneRedundantHa". - */ -public final class ZoneRedundantHaSupportedEnum extends ExpandableStringEnum { - /** - * Static value Enabled for ZoneRedundantHaSupportedEnum. - */ - public static final ZoneRedundantHaSupportedEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for ZoneRedundantHaSupportedEnum. - */ - public static final ZoneRedundantHaSupportedEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of ZoneRedundantHaSupportedEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ZoneRedundantHaSupportedEnum() { - } - - /** - * Creates or finds a ZoneRedundantHaSupportedEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding ZoneRedundantHaSupportedEnum. - */ - public static ZoneRedundantHaSupportedEnum fromString(String name) { - return fromString(name, ZoneRedundantHaSupportedEnum.class); - } - - /** - * Gets known ZoneRedundantHaSupportedEnum values. - * - * @return known ZoneRedundantHaSupportedEnum values. - */ - public static Collection values() { - return values(ZoneRedundantHaSupportedEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport.java new file mode 100644 index 000000000000..126dee36fd15 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if high availability with zone redundancy is supported in conjunction with geographically redundant backups + * in this location. 'Enabled' means high availability with zone redundancy is supported in conjunction with + * geographically redundant backups is supported. 'Disabled' stands for high availability with zone redundancy is + * supported in conjunction with geographically redundant backups is not supported. Will be deprecated in the future. + * Look to Supported Features for 'ZoneRedundantHaAndGeoBackup'. + */ +public final class ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport + extends ExpandableStringEnum { + /** + * Static value Enabled for ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport. + */ + public static final ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport ENABLED + = fromString("Enabled"); + + /** + * Static value Disabled for ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport. + */ + public static final ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport DISABLED + = fromString("Disabled"); + + /** + * Creates a new instance of ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport() { + } + + /** + * Creates or finds a ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport from its string + * representation. + * + * @param name a name to look for. + * @return the corresponding ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport. + */ + public static ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport fromString(String name) { + return fromString(name, ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport.class); + } + + /** + * Gets known ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport values. + * + * @return known ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport values. + */ + public static Collection values() { + return values(ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilitySupport.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilitySupport.java new file mode 100644 index 000000000000..eaa3073c0715 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilitySupport.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if high availability with zone redundancy is supported in this location. 'Enabled' means high availability + * with zone redundancy is supported. 'Disabled' stands for high availability with zone redundancy is not supported. + * Will be deprecated in the future. Look to Supported Features for 'ZoneRedundantHa'. + */ +public final class ZoneRedundantHighAvailabilitySupport + extends ExpandableStringEnum { + /** + * Static value Enabled for ZoneRedundantHighAvailabilitySupport. + */ + public static final ZoneRedundantHighAvailabilitySupport ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for ZoneRedundantHighAvailabilitySupport. + */ + public static final ZoneRedundantHighAvailabilitySupport DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ZoneRedundantHighAvailabilitySupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ZoneRedundantHighAvailabilitySupport() { + } + + /** + * Creates or finds a ZoneRedundantHighAvailabilitySupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding ZoneRedundantHighAvailabilitySupport. + */ + public static ZoneRedundantHighAvailabilitySupport fromString(String name) { + return fromString(name, ZoneRedundantHighAvailabilitySupport.class); + } + + /** + * Gets known ZoneRedundantHighAvailabilitySupport values. + * + * @return known ZoneRedundantHighAvailabilitySupport values. + */ + public static Collection values() { + return values(ZoneRedundantHighAvailabilitySupport.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/package-info.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/package-info.java index 0a81bec78ff1..4be91fe90b9d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/package-info.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/package-info.java @@ -4,8 +4,8 @@ /** * Package containing the data models for PostgreSqlManagementClient. - * The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL - * resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and - * configurations with new business model. + * The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure + * PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, + * log files and configurations with new business model. */ package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/package-info.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/package-info.java index fa3c7eaa8d7c..ce951214f674 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/package-info.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/package-info.java @@ -4,8 +4,8 @@ /** * Package containing the classes for PostgreSqlManagementClient. - * The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL - * resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and - * configurations with new business model. + * The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure + * PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, + * log files and configurations with new business model. */ package com.azure.resourcemanager.postgresqlflexibleserver; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-postgresqlflexibleserver/proxy-config.json b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-postgresqlflexibleserver/proxy-config.json index 7f70e5e05fa3..d89ef7f7f6c0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-postgresqlflexibleserver/proxy-config.json +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-postgresqlflexibleserver/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.postgresqlflexibleserver.implementation.AdministratorsClientImpl$AdministratorsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.BackupsClientImpl$BackupsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.CheckNameAvailabilitiesClientImpl$CheckNameAvailabilitiesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.CheckNameAvailabilityWithLocationsClientImpl$CheckNameAvailabilityWithLocationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ConfigurationsClientImpl$ConfigurationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.DatabasesClientImpl$DatabasesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.FirewallRulesClientImpl$FirewallRulesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.FlexibleServersClientImpl$FlexibleServersService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.GetPrivateDnsZoneSuffixesClientImpl$GetPrivateDnsZoneSuffixesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.LocationBasedCapabilitiesClientImpl$LocationBasedCapabilitiesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.LogFilesClientImpl$LogFilesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.LtrBackupOperationsClientImpl$LtrBackupOperationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.MigrationsClientImpl$MigrationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateEndpointConnectionOperationsClientImpl$PrivateEndpointConnectionOperationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.QuotaUsagesClientImpl$QuotaUsagesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ReplicasClientImpl$ReplicasService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ResourceProvidersClientImpl$ResourceProvidersService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerCapabilitiesClientImpl$ServerCapabilitiesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerThreatProtectionSettingsClientImpl$ServerThreatProtectionSettingsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServersClientImpl$ServersService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.TuningConfigurationsClientImpl$TuningConfigurationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.TuningIndexesClientImpl$TuningIndexesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.TuningOptionsClientImpl$TuningOptionsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.VirtualEndpointsClientImpl$VirtualEndpointsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.VirtualNetworkSubnetUsagesClientImpl$VirtualNetworkSubnetUsagesService"]] \ No newline at end of file +[["com.azure.resourcemanager.postgresqlflexibleserver.implementation.AdministratorsMicrosoftEntrasClientImpl$AdministratorsMicrosoftEntrasService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.AdvancedThreatProtectionSettingsClientImpl$AdvancedThreatProtectionSettingsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.BackupsAutomaticAndOnDemandsClientImpl$BackupsAutomaticAndOnDemandsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.BackupsLongTermRetentionsClientImpl$BackupsLongTermRetentionsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.CapabilitiesByLocationsClientImpl$CapabilitiesByLocationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.CapabilitiesByServersClientImpl$CapabilitiesByServersService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.CapturedLogsClientImpl$CapturedLogsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ConfigurationsClientImpl$ConfigurationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.DatabasesClientImpl$DatabasesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.FirewallRulesClientImpl$FirewallRulesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.MigrationsClientImpl$MigrationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.NameAvailabilitiesClientImpl$NameAvailabilitiesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateDnsZoneSuffixesClientImpl$PrivateDnsZoneSuffixesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.QuotaUsagesClientImpl$QuotaUsagesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ReplicasClientImpl$ReplicasService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerThreatProtectionSettingsClientImpl$ServerThreatProtectionSettingsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServersClientImpl$ServersService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.TuningOptionsOperationsClientImpl$TuningOptionsOperationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.VirtualEndpointsClientImpl$VirtualEndpointsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.VirtualNetworkSubnetUsagesClientImpl$VirtualNetworkSubnetUsagesService"]] \ No newline at end of file diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsDeleteSamples.java deleted file mode 100644 index a1525a223f2a..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsDeleteSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for Administrators Delete. - */ -public final class AdministratorsDeleteSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * AdministratorDelete.json - */ - /** - * Sample code: AdministratorDelete. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - administratorDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.administrators() - .delete("testrg", "testserver", "oooooooo-oooo-oooo-oooo-oooooooooooo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsGetSamples.java deleted file mode 100644 index ed5440a383a2..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for Administrators Get. - */ -public final class AdministratorsGetSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * AdministratorGet.json - */ - /** - * Sample code: ServerGet. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void serverGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.administrators() - .getWithResponse("testrg", "pgtestsvc1", "oooooooo-oooo-oooo-oooo-oooooooooooo", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsListByServerSamples.java deleted file mode 100644 index 037cf0d88b51..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsListByServerSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for Administrators ListByServer. - */ -public final class AdministratorsListByServerSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * AdministratorsListByServer.json - */ - /** - * Sample code: AdministratorsListByServer. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - administratorsListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.administrators().listByServer("testrg", "pgtestsvc1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraCreateOrUpdateSamples.java similarity index 58% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsCreateSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraCreateOrUpdateSamples.java index e143b6ff5413..6b8b765b74bc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsCreateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraCreateOrUpdateSamples.java @@ -7,26 +7,26 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; /** - * Samples for Administrators Create. + * Samples for AdministratorsMicrosoftEntra CreateOrUpdate. */ -public final class AdministratorsCreateSamples { +public final class AdministratorsMicrosoftEntraCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * AdministratorAdd.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdministratorsMicrosoftEntraAdd.json */ /** - * Sample code: Adds an Microsoft Entra Administrator for the server. + * Sample code: Add a server administrator associated to a Microsoft Entra principal. * * @param manager Entry point to PostgreSqlManager. */ - public static void addsAnMicrosoftEntraAdministratorForTheServer( + public static void addAServerAdministratorAssociatedToAMicrosoftEntraPrincipal( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.administrators() + manager.administratorsMicrosoftEntras() .define("oooooooo-oooo-oooo-oooo-oooooooooooo") - .withExistingFlexibleServer("testrg", "testserver") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withPrincipalType(PrincipalType.USER) - .withPrincipalName("testuser1@microsoft.com") + .withPrincipalName("exampleuser@contoso.com") .withTenantId("tttttttt-tttt-tttt-tttt-tttttttttttt") .create(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraDeleteSamples.java similarity index 51% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationDeleteSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraDeleteSamples.java index 6e63c7746916..6544d969ec34 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraDeleteSamples.java @@ -5,23 +5,23 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; /** - * Samples for PrivateEndpointConnectionOperation Delete. + * Samples for AdministratorsMicrosoftEntra Delete. */ -public final class PrivateEndpointConnectionOperationDeleteSamples { +public final class AdministratorsMicrosoftEntraDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateEndpointConnectionDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdministratorsMicrosoftEntraDelete.json */ /** - * Sample code: Deletes a private endpoint connection with a given name. + * Sample code: Delete a server administrator associated to a Microsoft Entra principal. * * @param manager Entry point to PostgreSqlManager. */ - public static void deletesAPrivateEndpointConnectionWithAGivenName( + public static void deleteAServerAdministratorAssociatedToAMicrosoftEntraPrincipal( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateEndpointConnectionOperations() - .delete("Default", "test-svr", "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", + manager.administratorsMicrosoftEntras() + .delete("exampleresourcegroup", "exampleserver", "oooooooo-oooo-oooo-oooo-oooooooooooo", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraGetSamples.java new file mode 100644 index 000000000000..0c59c058f589 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraGetSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for AdministratorsMicrosoftEntra Get. + */ +public final class AdministratorsMicrosoftEntraGetSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdministratorsMicrosoftEntraGet.json + */ + /** + * Sample code: Get information about a server administrator associated to a Microsoft Entra principal. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void getInformationAboutAServerAdministratorAssociatedToAMicrosoftEntraPrincipal( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.administratorsMicrosoftEntras() + .getWithResponse("exampleresourcegroup", "exampleserver", "oooooooo-oooo-oooo-oooo-oooooooooooo", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraListByServerSamples.java new file mode 100644 index 000000000000..d4eb4fcc22f9 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraListByServerSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for AdministratorsMicrosoftEntra ListByServer. + */ +public final class AdministratorsMicrosoftEntraListByServerSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdministratorsMicrosoftEntraListByServer.json + */ + /** + * Sample code: List information about all server administrators associated to Microsoft Entra principals. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listInformationAboutAllServerAdministratorsAssociatedToMicrosoftEntraPrincipals( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.administratorsMicrosoftEntras() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetSamples.java similarity index 56% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsGetSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetSamples.java index 0618d0313953..dac7d747c178 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetSamples.java @@ -7,23 +7,23 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; /** - * Samples for ServerThreatProtectionSettings Get. + * Samples for AdvancedThreatProtectionSettings Get. */ -public final class ServerThreatProtectionSettingsGetSamples { +public final class AdvancedThreatProtectionSettingsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerThreatProtectionSettingsGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdvancedThreatProtectionSettingsGet.json */ /** - * Sample code: Get a server's Threat Protection settings. + * Sample code: Get state of advanced threat protection settings for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void getAServerSThreatProtectionSettings( + public static void getStateOfAdvancedThreatProtectionSettingsForAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.serverThreatProtectionSettings() - .getWithResponse("threatprotection-6852", "threatprotection-2080", ThreatProtectionName.DEFAULT, + manager.advancedThreatProtectionSettings() + .getWithResponse("exampleresourcegroup", "exampleserver", ThreatProtectionName.DEFAULT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerSamples.java new file mode 100644 index 000000000000..05251efe6118 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for AdvancedThreatProtectionSettings ListByServer. + */ +public final class AdvancedThreatProtectionSettingsListByServerSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdvancedThreatProtectionSettingsListByServer.json + */ + /** + * Sample code: List state of advanced threat protection settings for a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listStateOfAdvancedThreatProtectionSettingsForAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.advancedThreatProtectionSettings() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandCreateSamples.java new file mode 100644 index 000000000000..a4600bab59b2 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandCreateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for BackupsAutomaticAndOnDemand Create. + */ +public final class BackupsAutomaticAndOnDemandCreateSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsAutomaticAndOnDemandCreate.json + */ + /** + * Sample code: Create an on demand backup of a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + createAnOnDemandBackupOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsAutomaticAndOnDemands() + .create("exampleresourcegroup", "exampleserver", "ondemandbackup-20250601T183022", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrBackupOperationsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandDeleteSamples.java similarity index 50% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrBackupOperationsListByServerSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandDeleteSamples.java index 8cd7161a5f0d..7360f2d62277 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrBackupOperationsListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandDeleteSamples.java @@ -5,22 +5,23 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; /** - * Samples for LtrBackupOperations ListByServer. + * Samples for BackupsAutomaticAndOnDemand Delete. */ -public final class LtrBackupOperationsListByServerSamples { +public final class BackupsAutomaticAndOnDemandDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LongTermRetentionOperationListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsAutomaticAndOnDemandDelete.json */ /** - * Sample code: Sample List of Long Tern Retention Operations by Flexible Server. + * Sample code: Delete an on demand backup, given its name. * * @param manager Entry point to PostgreSqlManager. */ - public static void sampleListOfLongTernRetentionOperationsByFlexibleServer( + public static void deleteAnOnDemandBackupGivenItsName( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.ltrBackupOperations() - .listByServer("rgLongTermRetention", "pgsqlltrtestserver", com.azure.core.util.Context.NONE); + manager.backupsAutomaticAndOnDemands() + .delete("exampleresourcegroup", "exampleserver", "ondemandbackup-20250601T183022", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandGetSamples.java new file mode 100644 index 000000000000..7ddf221053f9 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandGetSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for BackupsAutomaticAndOnDemand Get. + */ +public final class BackupsAutomaticAndOnDemandGetSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsAutomaticAndOnDemandGet.json + */ + /** + * Sample code: Get an on demand backup, given its name. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + getAnOnDemandBackupGivenItsName(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsAutomaticAndOnDemands() + .getWithResponse("exampleresourcegroup", "exampleserver", "backup_638830782181266873", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandListByServerSamples.java new file mode 100644 index 000000000000..3d0880157955 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandListByServerSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for BackupsAutomaticAndOnDemand ListByServer. + */ +public final class BackupsAutomaticAndOnDemandListByServerSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsAutomaticAndOnDemandListByServer.json + */ + /** + * Sample code: List all available backups of a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + listAllAvailableBackupsOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsAutomaticAndOnDemands() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsDeleteSamples.java deleted file mode 100644 index a244ecab93a8..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for Backups Delete. - */ -public final class BackupsDeleteSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * BackupDelete.json - */ - /** - * Sample code: Delete a specific backup. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - deleteASpecificBackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.backups().delete("TestGroup", "testserver", "backup_20250303T160516", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsGetSamples.java deleted file mode 100644 index 21d653002839..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for Backups Get. - */ -public final class BackupsGetSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/BackupGet - * .json - */ - /** - * Sample code: Get a backup for a server. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - getABackupForAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.backups() - .getWithResponse("TestGroup", "postgresqltestserver", "daily_20250303T160516", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsListByServerSamples.java deleted file mode 100644 index 9ad6c27b13f0..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsListByServerSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for Backups ListByServer. - */ -public final class BackupsListByServerSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * BackupListByServer.json - */ - /** - * Sample code: List backups for a server. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - listBackupsForAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.backups().listByServer("TestGroup", "postgresqltestserver", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServerTriggerLtrPreBackupSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionCheckPrerequisitesSamples.java similarity index 50% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServerTriggerLtrPreBackupSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionCheckPrerequisitesSamples.java index 424845d3271c..9d9c5113cebf 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServerTriggerLtrPreBackupSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionCheckPrerequisitesSamples.java @@ -8,23 +8,24 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; /** - * Samples for FlexibleServer TriggerLtrPreBackup. + * Samples for BackupsLongTermRetention CheckPrerequisites. */ -public final class FlexibleServerTriggerLtrPreBackupSamples { +public final class BackupsLongTermRetentionCheckPrerequisitesSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LongTermRetentionPreBackup.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsLongTermRetentionCheckPrerequisites.json */ /** - * Sample code: Sample_Prebackup. + * Sample code: Perform all checks required for a long term retention backup operation to succeed. * * @param manager Entry point to PostgreSqlManager. */ - public static void samplePrebackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.flexibleServers() - .triggerLtrPreBackupWithResponse("rgLongTermRetention", "pgsqlltrtestserver", - new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("backup1")), + public static void performAllChecksRequiredForALongTermRetentionBackupOperationToSucceed( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsLongTermRetentions() + .checkPrerequisitesWithResponse("exampleresourcegroup", "exampleserver", + new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("exampleltrbackup")), com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionGetSamples.java new file mode 100644 index 000000000000..2c53f4c4b5ee --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionGetSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for BackupsLongTermRetention Get. + */ +public final class BackupsLongTermRetentionGetSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsLongTermRetentionGet.json + */ + /** + * Sample code: Get the results of a long retention backup operation for a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void getTheResultsOfALongRetentionBackupOperationForAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsLongTermRetentions() + .getWithResponse("exampleresourcegroup", "exampleserver", "exampleltrbackup", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionListByServerSamples.java new file mode 100644 index 000000000000..74d93de9e121 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionListByServerSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for BackupsLongTermRetention ListByServer. + */ +public final class BackupsLongTermRetentionListByServerSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsLongTermRetentionListByServer.json + */ + /** + * Sample code: List the results of the long term retention backup operations for a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listTheResultsOfTheLongTermRetentionBackupOperationsForAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsLongTermRetentions() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServerStartLtrBackupSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionStartSamples.java similarity index 56% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServerStartLtrBackupSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionStartSamples.java index d0db810e140a..9d0c6ab9ab1b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServerStartLtrBackupSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionStartSamples.java @@ -6,28 +6,29 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupStoreDetails; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupRequest; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionRequest; import java.util.Arrays; /** - * Samples for FlexibleServer StartLtrBackup. + * Samples for BackupsLongTermRetention Start. */ -public final class FlexibleServerStartLtrBackupSamples { +public final class BackupsLongTermRetentionStartSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LongTermRetentionBackup.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsLongTermRetentionStart.json */ /** - * Sample code: Sample_ExecuteBackup. + * Sample code: Initiate a long term retention backup. * * @param manager Entry point to PostgreSqlManager. */ public static void - sampleExecuteBackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.flexibleServers() - .startLtrBackup("rgLongTermRetention", "pgsqlltrtestserver", - new LtrBackupRequest().withBackupSettings(new BackupSettings().withBackupName("backup1")) + initiateALongTermRetentionBackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsLongTermRetentions() + .start("exampleresourcegroup", "exampleserver", + new BackupsLongTermRetentionRequest() + .withBackupSettings(new BackupSettings().withBackupName("exampleltrbackup")) .withTargetDetails(new BackupStoreDetails().withSasUriList(Arrays.asList("sasuri"))), com.azure.core.util.Context.NONE); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationListSamples.java new file mode 100644 index 000000000000..2be7ee86c9ea --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for CapabilitiesByLocation List. + */ +public final class CapabilitiesByLocationListSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * CapabilitiesByLocationList.json + */ + /** + * Sample code: List the capabilities available in a given location for a specific subscription. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listTheCapabilitiesAvailableInAGivenLocationForASpecificSubscription( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.capabilitiesByLocations().list("eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServerListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServerListSamples.java new file mode 100644 index 000000000000..e863118ce555 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServerListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for CapabilitiesByServer List. + */ +public final class CapabilitiesByServerListSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * CapabilitiesByServerList.json + */ + /** + * Sample code: List the capabilities available for a given server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listTheCapabilitiesAvailableForAGivenServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.capabilitiesByServers().list("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerSamples.java similarity index 54% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsCreateSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerSamples.java index 723466f0536c..96eb7dda0e4b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsCreateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerSamples.java @@ -5,22 +5,21 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; /** - * Samples for Backups Create. + * Samples for CapturedLogs ListByServer. */ -public final class BackupsCreateSamples { +public final class CapturedLogsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * BackupCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * CapturedLogsListByServer.json */ /** - * Sample code: Create a new Backup for a flexible server. + * Sample code: List all captured logs for download in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void createANewBackupForAFlexibleServer( + public static void listAllCapturedLogsForDownloadInAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.backups() - .create("TestGroup", "postgresqltestserver", "backup_20250303T160516", com.azure.core.util.Context.NONE); + manager.capturedLogs().listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityExecuteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityExecuteSamples.java deleted file mode 100644 index 123b614436de..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityExecuteSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; - -/** - * Samples for CheckNameAvailability Execute. - */ -public final class CheckNameAvailabilityExecuteSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * CheckNameAvailability.json - */ - /** - * Sample code: NameAvailability. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void nameAvailability(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.checkNameAvailabilities() - .executeWithResponse(new CheckNameAvailabilityRequest().withName("name1") - .withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityWithLocationExecuteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityWithLocationExecuteSamples.java deleted file mode 100644 index 81c5255e966d..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityWithLocationExecuteSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; - -/** - * Samples for CheckNameAvailabilityWithLocation Execute. - */ -public final class CheckNameAvailabilityWithLocationExecuteSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * CheckNameAvailabilityLocationBased.json - */ - /** - * Sample code: NameAvailability. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void nameAvailability(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.checkNameAvailabilityWithLocations() - .executeWithResponse("westus", new CheckNameAvailabilityRequest().withName("name1") - .withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetSamples.java index 71c407fc1147..7bb881bdac61 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetSamples.java @@ -10,16 +10,17 @@ public final class ConfigurationsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ConfigurationGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ConfigurationsGet. + * json */ /** - * Sample code: ConfigurationGet. + * Sample code: Get information about a specific configuration (also known as server parameter) of a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void configurationGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void getInformationAboutASpecificConfigurationAlsoKnownAsServerParameterOfAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.configurations() - .getWithResponse("testrg", "testserver", "array_nulls", com.azure.core.util.Context.NONE); + .getWithResponse("exampleresourcegroup", "exampleserver", "array_nulls", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerSamples.java index 02537eb0552a..9a2356cb2c07 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerSamples.java @@ -10,15 +10,17 @@ public final class ConfigurationsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ConfigurationListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ConfigurationsListByServer.json */ /** - * Sample code: ConfigurationList. + * Sample code: List all configurations (also known as server parameters) of a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void configurationList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.configurations().listByServer("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void listAllConfigurationsAlsoKnownAsServerParametersOfAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.configurations() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutSamples.java index 09776d77f4ca..9466687d8135 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutSamples.java @@ -10,19 +10,21 @@ public final class ConfigurationsPutSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ConfigurationUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ConfigurationsUpdateUsingPut.json */ /** - * Sample code: Update a user configuration. + * Sample code: Update, using Put verb, the value assigned to a specific modifiable configuration (also known as + * server parameter) of a server. * * @param manager Entry point to PostgreSqlManager. */ public static void - updateAUserConfiguration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + updateUsingPutVerbTheValueAssignedToASpecificModifiableConfigurationAlsoKnownAsServerParameterOfAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.configurations() .define("constraint_exclusion") - .withExistingFlexibleServer("testrg", "testserver") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withValue("on") .withSource("user-override") .create(); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsUpdateSamples.java index aff7bc555e9e..c75988cff7a3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsUpdateSamples.java @@ -12,18 +12,20 @@ public final class ConfigurationsUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ConfigurationUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ConfigurationsUpdate.json */ /** - * Sample code: Update a user configuration. + * Sample code: Update the value assigned to a specific modifiable configuration (also known as server parameter) of + * a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - updateAUserConfiguration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void updateTheValueAssignedToASpecificModifiableConfigurationAlsoKnownAsServerParameterOfAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Configuration resource = manager.configurations() - .getWithResponse("testrg", "testserver", "constraint_exclusion", com.azure.core.util.Context.NONE) + .getWithResponse("exampleresourcegroup", "exampleserver", "constraint_exclusion", + com.azure.core.util.Context.NONE) .getValue(); resource.update().withValue("on").withSource("user-override").apply(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateSamples.java index 77a77204da47..054e0a36a2e7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateSamples.java @@ -10,8 +10,8 @@ public final class DatabasesCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * DatabaseCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesCreate. + * json */ /** * Sample code: Create a database. @@ -20,8 +20,8 @@ public final class DatabasesCreateSamples { */ public static void createADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.databases() - .define("db1") - .withExistingFlexibleServer("TestGroup", "testserver") + .define("exampledatabase") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withCharset("utf8") .withCollation("en_US.utf8") .create(); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteSamples.java index 991c2b9aa5a6..6a36d90fc658 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteSamples.java @@ -10,15 +10,17 @@ public final class DatabasesDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * DatabaseDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesDelete. + * json */ /** - * Sample code: Delete a database. + * Sample code: Delete an existing database. * * @param manager Entry point to PostgreSqlManager. */ - public static void deleteADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.databases().delete("TestGroup", "testserver", "db1", com.azure.core.util.Context.NONE); + public static void + deleteAnExistingDatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.databases() + .delete("exampleresourcegroup", "exampleserver", "exampledatabase", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetSamples.java index 5d36c746aa3c..f2b8ec1d1e9f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetSamples.java @@ -10,15 +10,17 @@ public final class DatabasesGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * DatabaseGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesGet.json */ /** - * Sample code: Get a database. + * Sample code: Get information about an existing database. * * @param manager Entry point to PostgreSqlManager. */ - public static void getADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.databases().getWithResponse("TestGroup", "testserver", "db1", com.azure.core.util.Context.NONE); + public static void getInformationAboutAnExistingDatabase( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.databases() + .getWithResponse("exampleresourcegroup", "exampleserver", "exampledatabase", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerSamples.java index 1fed2eac0881..d7f2436ea5c7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerSamples.java @@ -10,16 +10,16 @@ public final class DatabasesListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * DatabasesListByServer.json */ /** - * Sample code: List databases in a server. + * Sample code: List all databases in a server. * * @param manager Entry point to PostgreSqlManager. */ public static void - listDatabasesInAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.databases().listByServer("TestGroup", "testserver", com.azure.core.util.Context.NONE); + listAllDatabasesInAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.databases().listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateSamples.java index 06fa11067ea6..9d48148ab60f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateSamples.java @@ -10,19 +10,19 @@ public final class FirewallRulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * FirewallRuleCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * FirewallRulesCreateOrUpdate.json */ /** - * Sample code: FirewallRuleCreate. + * Sample code: Create a new firewall rule or update an existing firewall rule. * * @param manager Entry point to PostgreSqlManager. */ - public static void - firewallRuleCreate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void createANewFirewallRuleOrUpdateAnExistingFirewallRule( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.firewallRules() - .define("rule1") - .withExistingFlexibleServer("testrg", "testserver") + .define("examplefirewallrule") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withStartIpAddress("0.0.0.0") .withEndIpAddress("255.255.255.255") .create(); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteSamples.java index 6501c0749027..d336fdfa0846 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteSamples.java @@ -10,16 +10,17 @@ public final class FirewallRulesDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * FirewallRuleDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * FirewallRulesDelete.json */ /** - * Sample code: FirewallRuleDelete. + * Sample code: Delete an existing firewall rule. * * @param manager Entry point to PostgreSqlManager. */ public static void - firewallRuleDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.firewallRules().delete("testrg", "testserver", "rule1", com.azure.core.util.Context.NONE); + deleteAnExistingFirewallRule(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.firewallRules() + .delete("exampleresourcegroup", "exampleserver", "examplefirewallrule", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetSamples.java index 8794b840ff97..b611392bcafe 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetSamples.java @@ -10,15 +10,18 @@ public final class FirewallRulesGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * FirewallRuleGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/FirewallRulesGet. + * json */ /** - * Sample code: FirewallRuleList. + * Sample code: Get information about a firewall rule in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void firewallRuleList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.firewallRules().getWithResponse("testrg", "testserver", "rule1", com.azure.core.util.Context.NONE); + public static void getInformationAboutAFirewallRuleInAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.firewallRules() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplefirewallrule", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerSamples.java index 50e295e870ff..514d36ebe14b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerSamples.java @@ -10,15 +10,16 @@ public final class FirewallRulesListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * FirewallRuleListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * FirewallRulesListByServer.json */ /** - * Sample code: FirewallRuleList. + * Sample code: List information about all firewall rules in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void firewallRuleList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.firewallRules().listByServer("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void listInformationAboutAllFirewallRulesInAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.firewallRules().listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/GetPrivateDnsZoneSuffixExecuteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/GetPrivateDnsZoneSuffixExecuteSamples.java deleted file mode 100644 index 43f61c40b939..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/GetPrivateDnsZoneSuffixExecuteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for GetPrivateDnsZoneSuffix Execute. - */ -public final class GetPrivateDnsZoneSuffixExecuteSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * GetPrivateDnsZoneSuffix.json - */ - /** - * Sample code: GetPrivateDnsZoneSuffix. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - getPrivateDnsZoneSuffix(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.getPrivateDnsZoneSuffixes().executeWithResponse(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LocationBasedCapabilitiesExecuteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LocationBasedCapabilitiesExecuteSamples.java deleted file mode 100644 index ab59124b8f86..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LocationBasedCapabilitiesExecuteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for LocationBasedCapabilities Execute. - */ -public final class LocationBasedCapabilitiesExecuteSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * CapabilitiesByLocation.json - */ - /** - * Sample code: CapabilitiesList. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void capabilitiesList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.locationBasedCapabilities().execute("eastus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LogFilesListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LogFilesListByServerSamples.java deleted file mode 100644 index 340a1125c0ec..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LogFilesListByServerSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for LogFiles ListByServer. - */ -public final class LogFilesListByServerSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LogFilesListByServer.json - */ - /** - * Sample code: List all server log files for a server. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - listAllServerLogFilesForAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.logFiles().listByServer("testrg", "postgresqltestsvc1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrBackupOperationsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrBackupOperationsGetSamples.java deleted file mode 100644 index 42e7112ad748..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrBackupOperationsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for LtrBackupOperations Get. - */ -public final class LtrBackupOperationsGetSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LongTermRetentionOperationGet.json - */ - /** - * Sample code: Sample. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void sample(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.ltrBackupOperations() - .getWithResponse("rgLongTermRetention", "pgsqlltrtestserver", "backup1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCancelSamples.java similarity index 54% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsDeleteSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCancelSamples.java index e42aaf8c27ed..39ae8ac0aca5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCancelSamples.java @@ -5,22 +5,23 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; /** - * Samples for Migrations Delete. + * Samples for Migrations Cancel. */ -public final class MigrationsDeleteSamples { +public final class MigrationsCancelSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Delete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsCancel. + * json */ /** - * Sample code: Migrations_Delete. + * Sample code: Cancel an active migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + cancelAnActiveMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .deleteWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", + .cancelWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilitySamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilitySamples.java new file mode 100644 index 000000000000..2e6e0169c251 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilitySamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; + +/** + * Samples for Migrations CheckNameAvailability. + */ +public final class MigrationsCheckNameAvailabilitySamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCheckNameAvailability.json + */ + /** + * Sample code: Check the validity and availability of the given name, to assign it to a new migration. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void checkTheValidityAndAvailabilityOfTheGivenNameToAssignItToANewMigration( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .checkNameAvailabilityWithResponse("exampleresourcegroup", "exampleserver", + new MigrationNameAvailabilityInner().withName("examplemigration") + .withType("Microsoft.DBforPostgreSQL/flexibleServers/migrations"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCreateSamples.java index e4679b5666af..d4c73c668391 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCreateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCreateSamples.java @@ -5,11 +5,11 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.resourcemanager.postgresqlflexibleserver.models.AdminCredentials; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesAndPermissions; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationMode; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationOption; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParameters; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDbsInTargetEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDatabasesOnTargetServer; import com.azure.resourcemanager.postgresqlflexibleserver.models.SourceType; import com.azure.resourcemanager.postgresqlflexibleserver.models.SslMode; import java.util.Arrays; @@ -20,198 +20,205 @@ public final class MigrationsCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_With_PrivateEndpoint_Servers.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateWithOtherUsers.json */ /** - * Sample code: Migrations Create with private endpoint. + * Sample code: Create a migration specifying user names. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsCreateWithPrivateEndpoint( + public static void createAMigrationSpecifyingUserNames( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") - .withMigrationInstanceResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testsourcemigration") + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withMigrationMode(MigrationMode.OFFLINE) .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") .withSecretParameters(new MigrationSecretParameters() .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) + .withTargetServerPassword("fakeTokenPlaceholder")) + .withSourceServerUsername("newadmin@examplesource") + .withTargetServerUsername("targetadmin")) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_With_Roles.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateOtherSourceTypesValidateMigrate.json */ /** - * Sample code: Migrations Create with roles. + * Sample code: Create a migration with other source type for validating and migrating. * * @param manager Entry point to PostgreSqlManager. */ - public static void - migrationsCreateWithRoles(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void createAMigrationWithOtherSourceTypeForValidatingAndMigrating( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withMigrationMode(MigrationMode.OFFLINE) - .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") + .withMigrationOption(MigrationOption.VALIDATE_AND_MIGRATE) + .withSourceType(SourceType.ON_PREMISES) + .withSslMode(SslMode.PREFER) + .withSourceDbServerResourceId("examplesource:5432@exampleuser") .withSecretParameters(new MigrationSecretParameters() .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) - .withMigrateRoles(MigrateRolesEnum.TRUE) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_With_FullyQualifiedDomainName.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateWithPrivateEndpointServers.json */ /** - * Sample code: Migrations Create with fully qualified domain name. + * Sample code: Create a migration with private endpoint. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsCreateWithFullyQualifiedDomainName( + public static void createAMigrationWithPrivateEndpoint( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withMigrationInstanceResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/examplesourcemigration") .withMigrationMode(MigrationMode.OFFLINE) .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") - .withSourceDbServerFullyQualifiedDomainName("testsourcefqdn.example.com") - .withTargetDbServerFullyQualifiedDomainName("test-target-fqdn.example.com") + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") .withSecretParameters(new MigrationSecretParameters() .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_Validate_Only.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsCreate. + * json */ /** - * Sample code: Create Pre-migration Validation. + * Sample code: Create a migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void - createPreMigrationValidation(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void createAMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withMigrationMode(MigrationMode.OFFLINE) - .withMigrationOption(MigrationOption.VALIDATE) .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") .withSecretParameters(new MigrationSecretParameters() .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_With_Other_Users.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateWithRoles.json */ /** - * Sample code: Migrations Create by passing user names. + * Sample code: Create a migration with roles. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsCreateByPassingUserNames( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + createAMigrationWithRoles(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withMigrationMode(MigrationMode.OFFLINE) .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") .withSecretParameters(new MigrationSecretParameters() .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder")) - .withSourceServerUsername("newadmin@testsource") - .withTargetServerUsername("targetadmin")) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) + .withTargetServerPassword("fakeTokenPlaceholder"))) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) + .withMigrateRoles(MigrateRolesAndPermissions.TRUE) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateWithFullyQualifiedDomainName.json */ /** - * Sample code: Migrations_Create. + * Sample code: Create a migration with fully qualified domain names for source and target servers. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsCreate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void createAMigrationWithFullyQualifiedDomainNamesForSourceAndTargetServers( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withMigrationMode(MigrationMode.OFFLINE) .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") + .withSourceDbServerFullyQualifiedDomainName("examplesource.contoso.com") + .withTargetDbServerFullyQualifiedDomainName("exampletarget.contoso.com") .withSecretParameters(new MigrationSecretParameters() .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_Other_SourceTypes_Validate_Migrate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateValidateOnly.json */ /** - * Sample code: Create Migration with other source types for Validate and Migrate. + * Sample code: Create a migration for validating only. * * @param manager Entry point to PostgreSqlManager. */ - public static void createMigrationWithOtherSourceTypesForValidateAndMigrate( + public static void createAMigrationForValidatingOnly( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withMigrationMode(MigrationMode.OFFLINE) - .withMigrationOption(MigrationOption.VALIDATE_AND_MIGRATE) - .withSourceType(SourceType.ON_PREMISES) - .withSslMode(SslMode.PREFER) - .withSourceDbServerResourceId("testsource:5432@pguser") + .withMigrationOption(MigrationOption.VALIDATE) + .withSourceDbServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") .withSecretParameters(new MigrationSecretParameters() .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) .create(); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsGetSamples.java index 3afdecbfe1e6..b030aa579d2c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsGetSamples.java @@ -10,85 +10,85 @@ public final class MigrationsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_GetMigrationWithSuccessfulValidationOnly.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsGetMigrationWithSuccessfulValidationOnly.json */ /** - * Sample code: Migrations_GetMigrationWithSuccessfulValidationOnly. + * Sample code: Get information about a migration with successful validation only. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGetMigrationWithSuccessfulValidationOnly( + public static void getInformationAboutAMigrationWithSuccessfulValidationOnly( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - "testmigrationwithsuccessfulvalidationonly", com.azure.core.util.Context.NONE); + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Get.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsGetMigrationWithSuccessfulValidationAndMigration.json */ /** - * Sample code: Migrations_Get. + * Sample code: Get information about a migration with successful validation and successful migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void getInformationAboutAMigrationWithSuccessfulValidationAndSuccessfulMigration( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_GetMigrationWithSuccessfulValidationButMigrationFailure.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsGetMigrationWithSuccessfulValidationButMigrationFailure.json */ /** - * Sample code: Migrations_GetMigrationWithSuccessfulValidationButMigrationFailure. + * Sample code: Get information about a migration with successful validation but failed migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGetMigrationWithSuccessfulValidationButMigrationFailure( + public static void getInformationAboutAMigrationWithSuccessfulValidationButFailedMigration( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - "testmigrationwithsuccessfulvalidationbutmigrationfailure", com.azure.core.util.Context.NONE); + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_GetMigrationWithSuccessfulValidationAndMigration.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsGetMigrationWithValidationFailures.json */ /** - * Sample code: Migrations_GetMigrationWithSuccessfulValidationAndMigration. + * Sample code: Get information about a migration with validation failures. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGetMigrationWithSuccessfulValidationAndMigration( + public static void getInformationAboutAMigrationWithValidationFailures( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - "testmigrationwithsuccessfulvalidationandmigration", com.azure.core.util.Context.NONE); + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_GetMigrationWithValidationFailures.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGet.json */ /** - * Sample code: Migrations_GetMigrationWithValidationFailures. + * Sample code: Get information about a migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGetMigrationWithValidationFailures( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + getInformationAboutAMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - "testmigrationwithvalidationfailure", com.azure.core.util.Context.NONE); + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsListByTargetServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsListByTargetServerSamples.java index ed455ca7348a..becd7ce3531e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsListByTargetServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsListByTargetServerSamples.java @@ -12,18 +12,18 @@ public final class MigrationsListByTargetServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_ListByTargetServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsListByTargetServer.json */ /** - * Sample code: Migrations_ListByTargetServer. + * Sample code: List all migrations of a target flexible server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - migrationsListByTargetServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void listAllMigrationsOfATargetFlexibleServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .listByTargetServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", MigrationListFilter.ALL, + .listByTargetServer("exampleresourcegroup", "exampleserver", MigrationListFilter.ALL, com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsUpdateSamples.java index d18fe57294e3..bc56196e44ca 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsUpdateSamples.java @@ -4,9 +4,8 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CancelEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceDbEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResource; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceServer; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Migration; /** * Samples for Migrations Update. @@ -14,37 +13,20 @@ public final class MigrationsUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Cancel.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsUpdate. + * json */ /** - * Sample code: Cancel migration. + * Sample code: Update an existing migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void cancelMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - MigrationResource resource = manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", + public static void + updateAnExistingMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + Migration resource = manager.migrations() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withCancel(CancelEnum.TRUE).apply(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Update.json - */ - /** - * Sample code: Migrations_Update. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void migrationsUpdate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - MigrationResource resource = manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withSetupLogicalReplicationOnSourceDbIfNeeded(LogicalReplicationOnSourceDbEnum.TRUE).apply(); + resource.update().withSetupLogicalReplicationOnSourceDbIfNeeded(LogicalReplicationOnSourceServer.TRUE).apply(); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckGloballySamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckGloballySamples.java new file mode 100644 index 000000000000..a727ee61a817 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckGloballySamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; + +/** + * Samples for NameAvailability CheckGlobally. + */ +public final class NameAvailabilityCheckGloballySamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * NameAvailabilityCheckGlobally.json + */ + /** + * Sample code: Check the validity and availability of the given name, to assign it to a new server or to use it as + * the base name of a new pair of virtual endpoints. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + checkTheValidityAndAvailabilityOfTheGivenNameToAssignItToANewServerOrToUseItAsTheBaseNameOfANewPairOfVirtualEndpoints( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.nameAvailabilities() + .checkGloballyWithResponse(new CheckNameAvailabilityRequest().withName("exampleserver") + .withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckWithLocationSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckWithLocationSamples.java new file mode 100644 index 000000000000..0a461b63149b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckWithLocationSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; + +/** + * Samples for NameAvailability CheckWithLocation. + */ +public final class NameAvailabilityCheckWithLocationSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * NameAvailabilityCheckWithLocation.json + */ + /** + * Sample code: Check the validity and availability of the given name, in the given location, to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + checkTheValidityAndAvailabilityOfTheGivenNameInTheGivenLocationToAssignItToANewServerOrToUseItAsTheBaseNameOfANewPairOfVirtualEndpoints( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.nameAvailabilities() + .checkWithLocationWithResponse("eastus", new CheckNameAvailabilityRequest().withName("exampleserver") + .withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListSamples.java index efe722b23299..ed926e36d4b0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListSamples.java @@ -10,15 +10,16 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * OperationList.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/OperationsList. + * json */ /** - * Sample code: OperationList. + * Sample code: List all available REST API operations. * * @param manager Entry point to PostgreSqlManager. */ - public static void operationList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void listAllAvailableRESTAPIOperations( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerCapabilitiesListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixGetSamples.java similarity index 56% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerCapabilitiesListSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixGetSamples.java index 1b06c9d34a8c..70b453043d90 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerCapabilitiesListSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixGetSamples.java @@ -5,21 +5,21 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; /** - * Samples for ServerCapabilities List. + * Samples for PrivateDnsZoneSuffix Get. */ -public final class ServerCapabilitiesListSamples { +public final class PrivateDnsZoneSuffixGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCapabilities.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateDnsZoneSuffixGet.json */ /** - * Sample code: ServerCapabilitiesList. + * Sample code: Get the private DNS suffix. * * @param manager Entry point to PostgreSqlManager. */ public static void - serverCapabilitiesList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.serverCapabilities().list("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE); + getThePrivateDNSSuffix(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateDnsZoneSuffixes().getWithResponse(com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsDeleteSamples.java new file mode 100644 index 000000000000..a2d54858b036 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for PrivateEndpointConnections Delete. + */ +public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateEndpointConnectionsDelete.json + */ + /** + * Sample code: Delete a private endpoint connection. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + deleteAPrivateEndpointConnection(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateEndpointConnections() + .delete("exampleresourcegroup", "exampleserver", + "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetSamples.java index ca86d978097a..bb26636d82af 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetSamples.java @@ -10,18 +10,18 @@ public final class PrivateEndpointConnectionsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateEndpointConnectionGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateEndpointConnectionsGet.json */ /** - * Sample code: Gets private endpoint connection. + * Sample code: Get a private endpoint connection. * * @param manager Entry point to PostgreSqlManager. */ public static void - getsPrivateEndpointConnection(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + getAPrivateEndpointConnection(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.privateEndpointConnections() - .getWithResponse("Default", "test-svr", + .getWithResponse("exampleresourcegroup", "exampleserver", "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", com.azure.core.util.Context.NONE); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerSamples.java index b269a97e90e4..44338ecc7ae7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerSamples.java @@ -10,16 +10,17 @@ public final class PrivateEndpointConnectionsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateEndpointConnectionList.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateEndpointConnectionsList.json */ /** - * Sample code: Gets list of private endpoint connections on a server. + * Sample code: List all private endpoint connections on a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void getsListOfPrivateEndpointConnectionsOnAServer( + public static void listAllPrivateEndpointConnectionsOnAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateEndpointConnections().listByServer("Default", "test-svr", com.azure.core.util.Context.NONE); + manager.privateEndpointConnections() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateSamples.java similarity index 75% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationUpdateSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateSamples.java index df28322ad6c2..f49499e80907 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateSamples.java @@ -9,23 +9,24 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionState; /** - * Samples for PrivateEndpointConnectionOperation Update. + * Samples for PrivateEndpointConnections Update. */ -public final class PrivateEndpointConnectionOperationUpdateSamples { +public final class PrivateEndpointConnectionsUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateEndpointConnectionUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateEndpointConnectionsUpdate.json */ /** - * Sample code: Approve or reject a private endpoint connection with a given name. + * Sample code: Approve or reject a private endpoint connection. * * @param manager Entry point to PostgreSqlManager. */ - public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName( + public static void approveOrRejectAPrivateEndpointConnection( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateEndpointConnectionOperations() - .update("Default", "test-svr", "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", + manager.privateEndpointConnections() + .update("exampleresourcegroup", "exampleserver", + "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", new PrivateEndpointConnectionInner().withPrivateLinkServiceConnectionState( new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) .withDescription("Approved by johndoe@contoso.com")), diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetSamples.java index a19014df95d5..06b363803049 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetSamples.java @@ -10,7 +10,7 @@ public final class PrivateLinkResourcesGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * PrivateLinkResourcesGet.json */ /** @@ -20,6 +20,8 @@ public final class PrivateLinkResourcesGetSamples { */ public static void getsAPrivateLinkResourceForPostgreSQL( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateLinkResources().getWithResponse("Default", "test-svr", "plr", com.azure.core.util.Context.NONE); + manager.privateLinkResources() + .getWithResponse("exampleresourcegroup", "exampleserver", "exampleprivatelink", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerSamples.java index 225b5b3b2811..09df133a3368 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerSamples.java @@ -10,7 +10,7 @@ public final class PrivateLinkResourcesListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * PrivateLinkResourcesList.json */ /** @@ -20,6 +20,7 @@ public final class PrivateLinkResourcesListByServerSamples { */ public static void getsPrivateLinkResourcesForPostgreSQL( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateLinkResources().listByServer("Default", "test-svr", com.azure.core.util.Context.NONE); + manager.privateLinkResources() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListSamples.java index 0aafad9b5dc7..160a52278faf 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListSamples.java @@ -10,16 +10,16 @@ public final class QuotaUsagesListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * QuotaUsagesForFlexibleServers.json */ /** - * Sample code: List of quota usages for flexible servers. + * Sample code: List of quota usages for servers. * * @param manager Entry point to PostgreSqlManager. */ - public static void listOfQuotaUsagesForFlexibleServers( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.quotaUsages().list("westus", com.azure.core.util.Context.NONE); + public static void + listOfQuotaUsagesForServers(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.quotaUsages().list("eastus", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicasListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicasListByServerSamples.java index dec17080dec6..ccd67ee28ee5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicasListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicasListByServerSamples.java @@ -10,16 +10,16 @@ public final class ReplicasListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * ReplicasListByServer.json */ /** - * Sample code: ReplicasListByServer. + * Sample code: List all read replicas of a server. * * @param manager Entry point to PostgreSqlManager. */ public static void - replicasListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.replicas().listByServer("testrg", "sourcepgservername", com.azure.core.util.Context.NONE); + listAllReadReplicasOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.replicas().listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ResourceProviderCheckMigrationNameAvailabilitySamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ResourceProviderCheckMigrationNameAvailabilitySamples.java deleted file mode 100644 index 634166243f74..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ResourceProviderCheckMigrationNameAvailabilitySamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; - -/** - * Samples for ResourceProvider CheckMigrationNameAvailability. - */ -public final class ResourceProviderCheckMigrationNameAvailabilitySamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * CheckMigrationNameAvailability.json - */ - /** - * Sample code: CheckMigrationNameAvailability. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - checkMigrationNameAvailability(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.resourceProviders() - .checkMigrationNameAvailabilityWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - new MigrationNameAvailabilityResourceInner().withName("name1") - .withType("Microsoft.DBforPostgreSQL/flexibleServers/migrations"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateSamples.java deleted file mode 100644 index 94229f939356..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateSamples.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettingsModel; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState; - -/** - * Samples for ServerThreatProtectionSettings CreateOrUpdate. - */ -public final class ServerThreatProtectionSettingsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerThreatProtectionSettingsCreateOrUpdate.json - */ - /** - * Sample code: Update a server's Threat Protection settings. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void updateAServerSThreatProtectionSettings( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - ServerThreatProtectionSettingsModel resource = manager.serverThreatProtectionSettings() - .getWithResponse("threatprotection-4799", "threatprotection-6440", ThreatProtectionName.DEFAULT, - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withState(ThreatProtectionState.ENABLED).apply(); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsListByServerSamples.java deleted file mode 100644 index a883cb18a8f7..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsListByServerSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for ServerThreatProtectionSettings ListByServer. - */ -public final class ServerThreatProtectionSettingsListByServerSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerThreatProtectionSettingsListByServer.json - */ - /** - * Sample code: Get a server's Advanced Threat Protection settings. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void getAServerSAdvancedThreatProtectionSettings( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.serverThreatProtectionSettings() - .listByServer("threatprotection-6852", "threatprotection-2080", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateOrUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..54da2b76e959 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateOrUpdateSamples.java @@ -0,0 +1,431 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTier; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Cluster; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryptionType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MicrosoftEntraAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordBasedAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerPublicNetworkAccessState; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrow; +import com.azure.resourcemanager.postgresqlflexibleserver.models.UserAssignedIdentity; +import com.azure.resourcemanager.postgresqlflexibleserver.models.UserIdentity; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Servers CreateOrUpdate. + */ +public final class ServersCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateReviveDropped.json + */ + /** + * Sample code: Create a new server using a backup of a server that was deleted or dropped recently. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createANewServerUsingABackupOfAServerThatWasDeletedOrDroppedRecently( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSourceServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampledeletedserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:30:22.123456Z")) + .withCreateMode(CreateMode.REVIVE_DROPPED) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateInMicrosoftOwnedVirtualNetworkWithZoneRedundantHighAvailability.json + */ + /** + * Sample code: Create a new server in Microsoft owned virtual network with zone redundant high availability. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createANewServerInMicrosoftOwnedVirtualNetworkWithZoneRedundantHighAvailability( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withTags(mapOf("InCustomerVnet", "false", "InMicrosoftVnet", "true")) + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.ENABLED)) + .withNetwork(new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.ENABLED)) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) + .withAvailabilityZone("1") + .withCreateMode(CreateMode.CREATE) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateGeoRestoreWithDataEncryptionEnabledAutoUpdate.json + */ + /** + * Sample code: Create a new server using a restore of a geographically redundant backup of an existing server, with + * data encryption based on customer managed key with automatic key version update. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + createANewServerUsingARestoreOfAGeographicallyRedundantBackupOfAnExistingServerWithDataEncryptionBasedOnCustomerManagedKeyWithAutomaticKeyVersionUpdate( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity", + new UserIdentity(), + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withSourceServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:35:22.123456Z")) + .withCreateMode(CreateMode.GEO_RESTORE) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateWithDataEncryptionEnabled.json + */ + /** + * Sample code: Create a new server with data encryption based on customer managed key. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createANewServerWithDataEncryptionBasedOnCustomerManagedKey( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId("") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) + .withNetwork(new Network().withDelegatedSubnetResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") + .withPrivateDnsZoneArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) + .withAvailabilityZone("1") + .withCreateMode(CreateMode.CREATE) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateGeoRestoreWithDataEncryptionEnabled.json + */ + /** + * Sample code: Create a new server using a restore of a geographically redundant backup of an existing server, with + * data encryption based on customer managed key. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + createANewServerUsingARestoreOfAGeographicallyRedundantBackupOfAnExistingServerWithDataEncryptionBasedOnCustomerManagedKey( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity", + new UserIdentity(), + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withSourceServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:35:22.123456Z")) + .withCreateMode(CreateMode.GEO_RESTORE) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateReplica.json + */ + /** + * Sample code: Create a read replica of an existing server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createAReadReplicaOfAnExistingServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId("") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withSourceServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:35:22.123456Z")) + .withCreateMode(CreateMode.REPLICA) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateInYourOwnVirtualNetworkWithSameZoneHighAvailability.json + */ + /** + * Sample code: Create a new server in your own virtual network with same zone high availability. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createANewServerInYourOwnVirtualNetworkWithSameZoneHighAvailability( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withTags(mapOf("InCustomerVnet", "true", "InMicrosoftVnet", "false")) + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.ENABLED)) + .withNetwork(new Network().withDelegatedSubnetResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") + .withPrivateDnsZoneArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.private.postgres.database")) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.SAME_ZONE)) + .withAvailabilityZone("1") + .withCreateMode(CreateMode.CREATE) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersClusterCreate.json + */ + /** + * Sample code: Create a new elastic cluster. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + createANewElasticCluster(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLogin("examplelogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SIX) + .withStorage(new Storage().withStorageSizeGB(256) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P15)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) + .withNetwork(new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.DISABLED)) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.fromString("Disabled"))) + .withCreateMode(CreateMode.CREATE) + .withCluster(new Cluster().withClusterSize(2).withDefaultDatabaseName("clusterdb")) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreatePointInTimeRestore.json + */ + /** + * Sample code: Create a new server using a point in time restore of a backup of an existing server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createANewServerUsingAPointInTimeRestoreOfABackupOfAnExistingServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSourceServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:35:22.123456Z")) + .withCreateMode(CreateMode.POINT_IN_TIME_RESTORE) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateWithMicrosoftEntraEnabledInYourOwnVirtualNetworkWithoutHighAvailability.json + */ + /** + * Sample code: Create a new server with Microsoft Entra authentication enabled in your own virtual network and + * without high availability. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + createANewServerWithMicrosoftEntraAuthenticationEnabledInYourOwnVirtualNetworkAndWithoutHighAvailability( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(MicrosoftEntraAuth.ENABLED) + .withPasswordAuth(PasswordBasedAuth.ENABLED) + .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) + .withDataEncryption(new DataEncryption().withType(DataEncryptionType.SYSTEM_MANAGED)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) + .withNetwork(new Network().withDelegatedSubnetResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") + .withPrivateDnsZoneArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.fromString("Disabled"))) + .withAvailabilityZone("1") + .withCreateMode(CreateMode.CREATE) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateWithDataEncryptionEnabledAutoUpdate.json + */ + /** + * Sample code: Create a new server with data encryption based on customer managed key with automatic key version + * update. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createANewServerWithDataEncryptionBasedOnCustomerManagedKeyWithAutomaticKeyVersionUpdate( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId("") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) + .withNetwork(new Network().withDelegatedSubnetResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") + .withPrivateDnsZoneArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) + .withAvailabilityZone("1") + .withCreateMode(CreateMode.CREATE) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateSamples.java deleted file mode 100644 index 114c96b9bad9..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateSamples.java +++ /dev/null @@ -1,307 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAuthEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ArmServerKeyType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTiers; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Cluster; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption; -import com.azure.resourcemanager.postgresqlflexibleserver.models.GeoRedundantBackupEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordAuthEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerPublicNetworkAccessState; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; -import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrow; -import com.azure.resourcemanager.postgresqlflexibleserver.models.UserAssignedIdentity; -import com.azure.resourcemanager.postgresqlflexibleserver.models.UserIdentity; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Servers Create. - */ -public final class ServersCreateSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateWithDataEncryptionEnabled.json - */ - /** - * Sample code: ServerCreateWithDataEncryptionEnabled. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void serverCreateWithDataEncryptionEnabled( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .define("pgtestsvc4") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) - .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity", - new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) - .withAdministratorLogin("login") - .withAdministratorLoginPassword("Password1") - .withVersion(ServerVersion.ONE_SIX) - .withStorage(new Storage().withStorageSizeGB(512) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P20)) - .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") - .withPrimaryUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity") - .withGeoBackupKeyUri("fakeTokenPlaceholder") - .withGeoBackupUserAssignedIdentityId("") - .withType(ArmServerKeyType.AZURE_KEY_VAULT)) - .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED)) - .withNetwork(new Network().withDelegatedSubnetResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet") - .withPrivateDnsZoneArmResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) - .withAvailabilityZone("1") - .withCreateMode(CreateMode.CREATE) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateReviveDropped.json - */ - /** - * Sample code: ServerCreateReviveDropped. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - serverCreateReviveDropped(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .define("pgtestsvc5-rev") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withSourceServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc5") - .withPointInTimeUtc(OffsetDateTime.parse("2023-04-27T00:04:59.4078005+00:00")) - .withCreateMode(CreateMode.REVIVE_DROPPED) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateGeoRestoreWithDataEncryptionEnabled.json - */ - /** - * Sample code: Create a database as a geo-restore in geo-paired location. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void createADatabaseAsAGeoRestoreInGeoPairedLocation( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .define("pgtestsvc5geo") - .withRegion("eastus") - .withExistingResourceGroup("testrg") - .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity", - new UserIdentity(), - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity", - new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) - .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") - .withPrimaryUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity") - .withGeoBackupKeyUri("fakeTokenPlaceholder") - .withGeoBackupUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity") - .withType(ArmServerKeyType.AZURE_KEY_VAULT)) - .withSourceServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/sourcepgservername") - .withPointInTimeUtc(OffsetDateTime.parse("2021-06-27T00:04:59.4078005+00:00")) - .withCreateMode(CreateMode.GEO_RESTORE) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreate.json - */ - /** - * Sample code: Create a new server. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void createANewServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .define("testpgflex") - .withRegion("eastus") - .withExistingResourceGroup("testrg") - .withTags(mapOf("VNetServer", "1")) - .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLogin("login") - .withAdministratorLoginPassword("Password1") - .withVersion(ServerVersion.ONE_SIX) - .withStorage(new Storage().withStorageSizeGB(512) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P20)) - .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.ENABLED)) - .withNetwork(new Network().withDelegatedSubnetResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-subnet") - .withPrivateDnsZoneArmResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/privateDnsZones/testpgflex.private.postgres.database")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) - .withAvailabilityZone("1") - .withCreateMode(CreateMode.CREATE) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateWithMicrosoftEntraEnabled.json - */ - /** - * Sample code: Create a new server with Microsoft Entra authentication enabled. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void createANewServerWithMicrosoftEntraAuthenticationEnabled( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .define("pgtestsvc4") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withTags(mapOf("ElasticServer", "1")) - .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLogin("login") - .withAdministratorLoginPassword("Password1") - .withVersion(ServerVersion.ONE_SIX) - .withStorage(new Storage().withStorageSizeGB(512) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P20)) - .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(ActiveDirectoryAuthEnum.ENABLED) - .withPasswordAuth(PasswordAuthEnum.ENABLED) - .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) - .withDataEncryption(new DataEncryption().withType(ArmServerKeyType.SYSTEM_MANAGED)) - .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED)) - .withNetwork(new Network().withDelegatedSubnetResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet") - .withPrivateDnsZoneArmResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) - .withAvailabilityZone("1") - .withCreateMode(CreateMode.CREATE) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateReplica.json - */ - /** - * Sample code: ServerCreateReplica. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - serverCreateReplica(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .define("pgtestsvc5rep") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity", - new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) - .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") - .withPrimaryUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity") - .withGeoBackupKeyUri("fakeTokenPlaceholder") - .withGeoBackupUserAssignedIdentityId("") - .withType(ArmServerKeyType.AZURE_KEY_VAULT)) - .withSourceServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/sourcepgservername") - .withPointInTimeUtc(OffsetDateTime.parse("2021-06-27T00:04:59.4078005+00:00")) - .withCreateMode(CreateMode.REPLICA) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ClusterCreate.json - */ - /** - * Sample code: ClusterCreate. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void clusterCreate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .define("pgtestcluster") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLogin("login") - .withAdministratorLoginPassword("Password1") - .withVersion(ServerVersion.ONE_SIX) - .withStorage(new Storage().withStorageSizeGB(256) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P15)) - .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED)) - .withNetwork(new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.DISABLED)) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.DISABLED)) - .withCreateMode(CreateMode.CREATE) - .withCluster(new Cluster().withClusterSize(2)) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreatePointInTimeRestore.json - */ - /** - * Sample code: Create a database as a point in time restore. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void createADatabaseAsAPointInTimeRestore( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .define("pgtestsvc5") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withSourceServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/sourcepgservername") - .withPointInTimeUtc(OffsetDateTime.parse("2021-06-27T00:04:59.4078005+00:00")) - .withCreateMode(CreateMode.POINT_IN_TIME_RESTORE) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteSamples.java index ded3289d49fd..829ca4139aed 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteSamples.java @@ -10,15 +10,15 @@ public final class ServersDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersDelete.json */ /** - * Sample code: ServerDelete. + * Sample code: Delete or drop an existing server. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().delete("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void + deleteOrDropAnExistingServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().delete("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersGetByResourceGroupSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersGetByResourceGroupSamples.java index 2022d7ad4685..79042f4faeee 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersGetByResourceGroupSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersGetByResourceGroupSamples.java @@ -10,44 +10,51 @@ public final class ServersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerGetWithPrivateEndpoints.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersGetWithPrivateEndpoints.json */ /** - * Sample code: ServerGetWithPrivateEndpoints. + * Sample code: Get information about an existing server that isn't integrated into a virtual network provided by + * customer and has private endpoint connections. * * @param manager Entry point to PostgreSqlManager. */ public static void - serverGetWithPrivateEndpoints(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().getByResourceGroupWithResponse("testrg", "pgtestsvc2", com.azure.core.util.Context.NONE); + getInformationAboutAnExistingServerThatIsnTIntegratedIntoAVirtualNetworkProvidedByCustomerAndHasPrivateEndpointConnections( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ServerGet + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersGetWithVnet * .json */ /** - * Sample code: ServerGet. + * Sample code: Get information about an existing server that is integrated into a virtual network provided by + * customer. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().getByResourceGroupWithResponse("testrg", "testpgflex", com.azure.core.util.Context.NONE); + public static void getInformationAboutAnExistingServerThatIsIntegratedIntoAVirtualNetworkProvidedByCustomer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerGetWithVnet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersGet.json */ /** - * Sample code: ServerGetWithVnet. + * Sample code: Get information about an existing server. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverGetWithVnet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().getByResourceGroupWithResponse("testrg", "testpgflex", com.azure.core.util.Context.NONE); + public static void getInformationAboutAnExistingServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListByResourceGroupSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListByResourceGroupSamples.java index a00499c9a33e..c7864f1a402d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListByResourceGroupSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListByResourceGroupSamples.java @@ -10,16 +10,16 @@ public final class ServersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerListByResourceGroup.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersListByResourceGroup.json */ /** - * Sample code: ServerListByResourceGroup. + * Sample code: List all servers in a resource group. * * @param manager Entry point to PostgreSqlManager. */ public static void - serverListByResourceGroup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().listByResourceGroup("testrgn", com.azure.core.util.Context.NONE); + listAllServersInAResourceGroup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().listByResourceGroup("exampleresourcegroup", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListSamples.java index 5d95c0d67633..e715d1df9820 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListSamples.java @@ -10,15 +10,16 @@ public final class ServersListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerList.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersListBySubscription.json */ /** - * Sample code: ServerList. + * Sample code: List all servers in a subscription. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + listAllServersInASubscription(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartSamples.java index 47965aed7b3c..4caca8d0d288 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartSamples.java @@ -13,33 +13,34 @@ public final class ServersRestartSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerRestart.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersRestartWithFailover.json */ /** - * Sample code: ServerRestart. + * Sample code: Restart PostgreSQL database engine in a server with a forced failover to standby server. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverRestart(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().restart("testrg", "testserver", null, com.azure.core.util.Context.NONE); + public static void restartPostgreSQLDatabaseEngineInAServerWithAForcedFailoverToStandbyServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .restart("exampleresourcegroup", "exampleserver", + new RestartParameter().withRestartWithFailover(true).withFailoverMode(FailoverMode.FORCED_FAILOVER), + com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerRestartWithFailover.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersRestart. + * json */ /** - * Sample code: ServerRestartWithFailover. + * Sample code: Restart PostgreSQL database engine in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - serverRestartWithFailover(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .restart("testrg", "testserver", - new RestartParameter().withRestartWithFailover(true).withFailoverMode(FailoverMode.FORCED_FAILOVER), - com.azure.core.util.Context.NONE); + public static void restartPostgreSQLDatabaseEngineInAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().restart("exampleresourcegroup", "exampleserver", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartSamples.java index 55fadc31dcfb..693846408651 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartSamples.java @@ -10,15 +10,15 @@ public final class ServersStartSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerStart.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersStart.json */ /** - * Sample code: ServerStart. + * Sample code: Start a stopped server. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverStart(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().start("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void + startAStoppedServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().start("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopSamples.java index 7185755a2f11..80f6564cd943 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopSamples.java @@ -10,15 +10,14 @@ public final class ServersStopSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerStop.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersStop.json */ /** - * Sample code: ServerStop. + * Sample code: Stop a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverStop(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().stop("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void stopAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().stop("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersUpdateSamples.java index ba0715516b92..f77a1378a4ed 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersUpdateSamples.java @@ -4,22 +4,22 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAuthEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ArmServerKeyType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTiers; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForUpdate; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfigForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTier; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryptionType; import com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordAuthEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindowForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MicrosoftEntraAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordBasedAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.ReadReplicaPromoteMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ReadReplicaPromoteOption; import com.azure.resourcemanager.postgresqlflexibleserver.models.Replica; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationPromoteOption; import com.azure.resourcemanager.postgresqlflexibleserver.models.Server; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrow; @@ -34,223 +34,264 @@ public final class ServersUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdateWithDataEncryptionEnabled.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersPromoteReplicaAsForcedSwitchover.json */ /** - * Sample code: ServerUpdateWithDataEncryptionEnabled. + * Sample code: Switch over a read replica to primary server with forced data synchronization. Meaning that it + * doesn't wait for data in the read replica to be synchronized with its source server before it initiates the + * switching of roles between the read replica and the primary server. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdateWithDataEncryptionEnabled( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + switchOverAReadReplicaToPrimaryServerWithForcedDataSynchronizationMeaningThatItDoesnTWaitForDataInTheReadReplicaToBeSynchronizedWithItsSourceServerBeforeItInitiatesTheSwitchingOfRolesBetweenTheReadReplicaAndThePrimaryServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("TestGroup", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withSku(new Sku().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) - .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity", - new UserIdentity(), - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity", - new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) - .withAdministratorLoginPassword("newpassword") - .withBackup(new Backup().withBackupRetentionDays(20)) - .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") - .withPrimaryUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity") - .withGeoBackupKeyUri("fakeTokenPlaceholder") - .withGeoBackupUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity") - .withType(ArmServerKeyType.AZURE_KEY_VAULT)) - .withCreateMode(CreateModeForUpdate.UPDATE) + .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.SWITCHOVER) + .withPromoteOption(ReadReplicaPromoteOption.FORCED)) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PromoteReplicaAsPlannedSwitchover.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersPromoteReplicaAsPlannedSwitchover.json */ /** - * Sample code: SwitchOver a replica server as planned, i.e. it will wait for replication to complete before - * promoting replica as Primary and original primary as replica. + * Sample code: Switch over a read replica to primary server with planned data synchronization. Meaning that it + * waits for data in the read replica to be fully synchronized with its source server before it initiates the + * switching of roles between the read replica and the primary server. * * @param manager Entry point to PostgreSqlManager. */ public static void - switchOverAReplicaServerAsPlannedIEItWillWaitForReplicationToCompleteBeforePromotingReplicaAsPrimaryAndOriginalPrimaryAsReplica( + switchOverAReadReplicaToPrimaryServerWithPlannedDataSynchronizationMeaningThatItWaitsForDataInTheReadReplicaToBeFullySynchronizedWithItsSourceServerBeforeItInitiatesTheSwitchingOfRolesBetweenTheReadReplicaAndThePrimaryServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.SWITCHOVER) - .withPromoteOption(ReplicationPromoteOption.PLANNED)) + .withPromoteOption(ReadReplicaPromoteOption.PLANNED)) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PromoteReplicaAsForcedSwitchover.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithMicrosoftEntraEnabled.json */ /** - * Sample code: SwitchOver a replica server as forced, i.e. it will replica as Primary and original primary as - * replica immediately without waiting for primary and replica to be in sync. + * Sample code: Update an existing server with Microsoft Entra authentication enabled. * * @param manager Entry point to PostgreSqlManager. */ - public static void - switchOverAReplicaServerAsForcedIEItWillReplicaAsPrimaryAndOriginalPrimaryAsReplicaImmediatelyWithoutWaitingForPrimaryAndReplicaToBeInSync( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void updateAnExistingServerWithMicrosoftEntraAuthenticationEnabled( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.SWITCHOVER) - .withPromoteOption(ReplicationPromoteOption.FORCED)) + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLoginPassword("examplenewpassword") + .withStorage(new Storage().withStorageSizeGB(1024) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P30)) + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withAuthConfig(new AuthConfigForPatch().withActiveDirectoryAuth(MicrosoftEntraAuth.ENABLED) + .withPasswordAuth(PasswordBasedAuth.ENABLED) + .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) + .withCreateMode(CreateModeForPatch.UPDATE) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithDataEncryptionEnabledAutoUpdate.json */ /** - * Sample code: ServerUpdate. + * Sample code: Update an existing server with data encryption based on customer managed key with automatic key + * version update. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void updateAnExistingServerWithDataEncryptionBasedOnCustomerManagedKeyWithAutomaticKeyVersionUpdate( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("TestGroup", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withSku(new Sku().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLoginPassword("newpassword") - .withStorage(new Storage().withStorageSizeGB(1024) - .withAutoGrow(StorageAutoGrow.ENABLED) - .withTier(AzureManagedDiskPerformanceTiers.P30)) - .withBackup(new Backup().withBackupRetentionDays(20)) - .withCreateMode(CreateModeForUpdate.UPDATE) + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity", + new UserIdentity(), + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withAdministratorLoginPassword("examplenewpassword") + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withCreateMode(CreateModeForPatch.UPDATE) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdateWithMajorVersionUpgrade.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithMajorVersionUpgrade.json */ /** - * Sample code: ServerUpdateWithMajorVersionUpgrade. + * Sample code: Update an existing server to upgrade the major version of PostgreSQL database engine. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdateWithMajorVersionUpgrade( + public static void updateAnExistingServerToUpgradeTheMajorVersionOfPostgreSQLDatabaseEngine( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withVersion(ServerVersion.ONE_SIX).withCreateMode(CreateModeForUpdate.UPDATE).apply(); + resource.update().withVersion(PostgresMajorVersion.ONE_SEVEN).withCreateMode(CreateModeForPatch.UPDATE).apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdateWithCustomerMaintenanceWindow.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithCustomMaintenanceWindow.json */ /** - * Sample code: ServerUpdateWithCustomerMaintenanceWindow. + * Sample code: Update an existing server with custom maintenance window. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdateWithCustomerMaintenanceWindow( + public static void updateAnExistingServerWithCustomMaintenanceWindow( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withMaintenanceWindow(new MaintenanceWindow().withCustomWindow("Enabled") + .withMaintenanceWindow(new MaintenanceWindowForPatch().withCustomWindow("Enabled") .withStartHour(8) .withStartMinute(0) .withDayOfWeek(0)) - .withCreateMode(CreateModeForUpdate.UPDATE) + .withCreateMode(CreateModeForPatch.UPDATE) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdateWithMicrosoftEntraEnabled.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithDataEncryptionEnabled.json */ /** - * Sample code: ServerUpdateWithMicrosoftEntraEnabled. + * Sample code: Update an existing server with data encryption based on customer managed key. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdateWithMicrosoftEntraEnabled( + public static void updateAnExistingServerWithDataEncryptionBasedOnCustomerManagedKey( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("TestGroup", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withSku(new Sku().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLoginPassword("newpassword") + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity", + new UserIdentity(), + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withAdministratorLoginPassword("examplenewpassword") + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withCreateMode(CreateModeForPatch.UPDATE) + .apply(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersUpdate.json + */ + /** + * Sample code: Update an existing server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + updateAnExistingServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + Server resource = manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLoginPassword("examplenewpassword") .withStorage(new Storage().withStorageSizeGB(1024) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P30)) - .withBackup(new Backup().withBackupRetentionDays(20)) - .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(ActiveDirectoryAuthEnum.ENABLED) - .withPasswordAuth(PasswordAuthEnum.ENABLED) - .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) - .withCreateMode(CreateModeForUpdate.UPDATE) + .withAutoGrow(StorageAutoGrow.ENABLED) + .withTier(AzureManagedDiskPerformanceTier.P30)) + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withCreateMode(CreateModeForPatch.UPDATE) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PromoteReplicaAsForcedStandaloneServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersPromoteReplicaAsForcedStandaloneServer.json */ /** - * Sample code: Promote a replica server as a Standalone server as forced, i.e. it will promote a replica server - * immediately without waiting for primary and replica to be in sync. + * Sample code: Promote a read replica to a standalone server with forced data synchronization. Meaning that it + * doesn't wait for data in the read replica to be synchronized with its source server before it initiates the + * promotion to a standalone server. * * @param manager Entry point to PostgreSqlManager. */ public static void - promoteAReplicaServerAsAStandaloneServerAsForcedIEItWillPromoteAReplicaServerImmediatelyWithoutWaitingForPrimaryAndReplicaToBeInSync( + promoteAReadReplicaToAStandaloneServerWithForcedDataSynchronizationMeaningThatItDoesnTWaitForDataInTheReadReplicaToBeSynchronizedWithItsSourceServerBeforeItInitiatesThePromotionToAStandaloneServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.STANDALONE) - .withPromoteOption(ReplicationPromoteOption.FORCED)) + .withPromoteOption(ReadReplicaPromoteOption.FORCED)) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PromoteReplicaAsPlannedStandaloneServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersPromoteReplicaAsPlannedStandaloneServer.json */ /** - * Sample code: Promote a replica server as a Standalone server as planned, i.e. it will wait for replication to - * complete. + * Sample code: Promote a read replica to a standalone server with planned data synchronization. Meaning that it + * waits for data in the read replica to be fully synchronized with its source server before it initiates the + * promotion to a standalone server. * * @param manager Entry point to PostgreSqlManager. */ - public static void promoteAReplicaServerAsAStandaloneServerAsPlannedIEItWillWaitForReplicationToComplete( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + promoteAReadReplicaToAStandaloneServerWithPlannedDataSynchronizationMeaningThatItWaitsForDataInTheReadReplicaToBeFullySynchronizedWithItsSourceServerBeforeItInitiatesThePromotionToAStandaloneServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.STANDALONE) - .withPromoteOption(ReplicationPromoteOption.PLANNED)) + .withPromoteOption(ReadReplicaPromoteOption.PLANNED)) .apply(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationDisableSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationDisableSamples.java deleted file mode 100644 index f36a34096904..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationDisableSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * Samples for TuningConfiguration Disable. - */ -public final class TuningConfigurationDisableSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_Disable.json - */ - /** - * Sample code: TuningConfiguration_Disable. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - tuningConfigurationDisable(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .disable("testrg", "testserver", TuningOptionEnum.CONFIGURATION, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationEnableSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationEnableSamples.java deleted file mode 100644 index 52edc04a36bd..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationEnableSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * Samples for TuningConfiguration Enable. - */ -public final class TuningConfigurationEnableSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_Enable.json - */ - /** - * Sample code: TuningConfiguration_Enable. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - tuningConfigurationEnable(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .enable("testrg", "testserver", TuningOptionEnum.CONFIGURATION, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationListSessionDetailsSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationListSessionDetailsSamples.java deleted file mode 100644 index 546a4d3e1912..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationListSessionDetailsSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * Samples for TuningConfiguration ListSessionDetails. - */ -public final class TuningConfigurationListSessionDetailsSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_ListSessionDetails.json - */ - /** - * Sample code: TuningConfiguration_ListSessionDetails. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void tuningConfigurationListSessionDetails( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .listSessionDetails("testrg", "testserver", TuningOptionEnum.CONFIGURATION, - "oooooooo-oooo-oooo-oooo-oooooooooooo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationListSessionsSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationListSessionsSamples.java deleted file mode 100644 index dd6044b10b78..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationListSessionsSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * Samples for TuningConfiguration ListSessions. - */ -public final class TuningConfigurationListSessionsSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_ListSessions.json - */ - /** - * Sample code: TuningConfiguration_ListSessions. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - tuningConfigurationListSessions(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .listSessions("testrg", "testserver", TuningOptionEnum.CONFIGURATION, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationStartSessionSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationStartSessionSamples.java deleted file mode 100644 index 9509be701cfc..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationStartSessionSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigTuningRequestParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * Samples for TuningConfiguration StartSession. - */ -public final class TuningConfigurationStartSessionSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_StartSession.json - */ - /** - * Sample code: TuningConfiguration_StartSession. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - tuningConfigurationStartSession(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .startSession("testrg", "testserver", TuningOptionEnum.CONFIGURATION, - new ConfigTuningRequestParameter().withAllowServerRestarts(false) - .withTargetImprovementMetric("targetImprovementMetric"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationStopSessionSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationStopSessionSamples.java deleted file mode 100644 index 6d183f5bb366..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationStopSessionSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * Samples for TuningConfiguration StopSession. - */ -public final class TuningConfigurationStopSessionSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_StopSession.json - */ - /** - * Sample code: TuningConfiguration_StopSession. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - tuningConfigurationStopSession(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .stopSession("testrg", "testserver", TuningOptionEnum.CONFIGURATION, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningIndexListRecommendationsSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningIndexListRecommendationsSamples.java deleted file mode 100644 index 78119d315e35..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningIndexListRecommendationsSamples.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * Samples for TuningIndex ListRecommendations. - */ -public final class TuningIndexListRecommendationsSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningIndex_GetFilteredRecommendations.json - */ - /** - * Sample code: TuningIndex_ListFilteredRecommendations. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void tuningIndexListFilteredRecommendations( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningIndexes() - .listRecommendations("testrg", "pgtestrecs", TuningOptionEnum.INDEX, RecommendationType.CREATE_INDEX, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningIndex_GetRecommendations.json - */ - /** - * Sample code: TuningIndex_ListRecommendations. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - tuningIndexListRecommendations(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningIndexes() - .listRecommendations("testrg", "pgtestsvc4", TuningOptionEnum.INDEX, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsGetSamples.java deleted file mode 100644 index 50f364ae79cc..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * Samples for TuningOptions Get. - */ -public final class TuningOptionsGetSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Tuning_GetTuningOption.json - */ - /** - * Sample code: TuningOptions_Get. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void tuningOptionsGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningOptions() - .getWithResponse("testrg", "testserver", TuningOptionEnum.INDEX, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListByServerSamples.java deleted file mode 100644 index 1e241568361b..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListByServerSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for TuningOptions ListByServer. - */ -public final class TuningOptionsListByServerSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Tuning_ListTuningOptions.json - */ - /** - * Sample code: TuningOptions_ListByServer. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - tuningOptionsListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningOptions().listByServer("testrg", "testserver", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationGetSamples.java new file mode 100644 index 000000000000..084e694e58e8 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationGetSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; + +/** + * Samples for TuningOptionsOperation Get. + */ +public final class TuningOptionsOperationGetSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/TuningOptionsGet. + * json + */ + /** + * Sample code: Get the tuning options of a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + getTheTuningOptionsOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .getWithResponse("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.INDEX, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListByServerSamples.java new file mode 100644 index 000000000000..4cab630713c1 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListByServerSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for TuningOptionsOperation ListByServer. + */ +public final class TuningOptionsOperationListByServerSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListByServer.json + */ + /** + * Sample code: List the tuning options of a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + listTheTuningOptionsOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListRecommendationsSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListRecommendationsSamples.java new file mode 100644 index 000000000000..5d281d530cdf --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListRecommendationsSamples.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; + +/** + * Samples for TuningOptionsOperation ListRecommendations. + */ +public final class TuningOptionsOperationListRecommendationsSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListIndexRecommendations.json + */ + /** + * Sample code: List available index recommendations. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listAvailableIndexRecommendations( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listRecommendations("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.INDEX, null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListTableRecommendations.json + */ + /** + * Sample code: List available table recommendations. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listAvailableTableRecommendations( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listRecommendations("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.TABLE, null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListIndexRecommendationsFilteredForCreateIndex.json + */ + /** + * Sample code: List available index recommendations, filtered to exclusively get those of CREATE INDEX type. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listAvailableIndexRecommendationsFilteredToExclusivelyGetThoseOfCREATEINDEXType( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listRecommendations("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.INDEX, + RecommendationTypeParameterEnum.CREATE_INDEX, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListTableRecommendationsFilteredForAnalyzeTable.json + */ + /** + * Sample code: List available table recommendations, filtered to exclusively get those of ANALYZE TABLE type. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listAvailableTableRecommendationsFilteredToExclusivelyGetThoseOfANALYZETABLEType( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listRecommendations("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.TABLE, + RecommendationTypeParameterEnum.ANALYZE_TABLE, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateSamples.java index cc87c9e45078..eef8520b25e5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateSamples.java @@ -13,21 +13,21 @@ public final class VirtualEndpointsCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * VirtualEndpointCreate.json */ /** - * Sample code: Create a new virtual endpoint for a flexible server. + * Sample code: Create a pair of virtual endpoints for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void createANewVirtualEndpointForAFlexibleServer( + public static void createAPairOfVirtualEndpointsForAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.virtualEndpoints() - .define("pgVirtualEndpoint1") - .withExistingFlexibleServer("testrg", "pgtestsvc4") + .define("examplebasename") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withEndpointType(VirtualEndpointType.READ_WRITE) - .withMembers(Arrays.asList("testPrimary1")) + .withMembers(Arrays.asList("exampleprimaryserver")) .create(); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsDeleteSamples.java index 1d93491f21b6..4ce11332d8b2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsDeleteSamples.java @@ -10,17 +10,17 @@ public final class VirtualEndpointsDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * VirtualEndpointDelete.json */ /** - * Sample code: Delete a virtual endpoint. + * Sample code: Delete a pair of virtual endpoints. * * @param manager Entry point to PostgreSqlManager. */ public static void - deleteAVirtualEndpoint(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + deleteAPairOfVirtualEndpoints(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.virtualEndpoints() - .delete("testrg", "pgtestsvc4", "pgVirtualEndpoint1", com.azure.core.util.Context.NONE); + .delete("exampleresourcegroup", "exampleserver", "examplebasename", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetSamples.java index 3e14be038bbf..4ec2297e6715 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetSamples.java @@ -10,17 +10,18 @@ public final class VirtualEndpointsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * VirtualEndpointsGet.json */ /** - * Sample code: Get a virtual endpoint. + * Sample code: Get information about a pair of virtual endpoints. * * @param manager Entry point to PostgreSqlManager. */ - public static void - getAVirtualEndpoint(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void getInformationAboutAPairOfVirtualEndpoints( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.virtualEndpoints() - .getWithResponse("testrg", "pgtestsvc4", "pgVirtualEndpoint1", com.azure.core.util.Context.NONE); + .getWithResponse("exampleresourcegroup", "exampleserver", "examplebasename", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerSamples.java index 6b60ccf14627..b3bad9315212 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerSamples.java @@ -10,16 +10,17 @@ public final class VirtualEndpointsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * VirtualEndpointsListByServer.json */ /** - * Sample code: VirtualEndpointListByServer. + * Sample code: List pair of virtual endpoints associated to a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - virtualEndpointListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.virtualEndpoints().listByServer("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE); + public static void listPairOfVirtualEndpointsAssociatedToAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.virtualEndpoints() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsUpdateSamples.java index a72338b64c50..363f44e1ae17 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsUpdateSamples.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResource; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoint; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; import java.util.Arrays; @@ -14,22 +14,23 @@ public final class VirtualEndpointsUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * VirtualEndpointUpdate.json */ /** - * Sample code: Update a virtual endpoint for a server to update the. + * Sample code: Update a pair of virtual endpoints for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void updateAVirtualEndpointForAServerToUpdateThe( + public static void updateAPairOfVirtualEndpointsForAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - VirtualEndpointResource resource = manager.virtualEndpoints() - .getWithResponse("testrg", "pgtestsvc4", "pgVirtualEndpoint1", com.azure.core.util.Context.NONE) + VirtualEndpoint resource = manager.virtualEndpoints() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplebasename", + com.azure.core.util.Context.NONE) .getValue(); resource.update() .withEndpointType(VirtualEndpointType.READ_WRITE) - .withMembers(Arrays.asList("testReplica1")) + .withMembers(Arrays.asList("exampleprimaryserver")) .apply(); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageExecuteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageListSamples.java similarity index 50% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageExecuteSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageListSamples.java index 383d56df2a30..e8bcce758553 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageExecuteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageListSamples.java @@ -7,24 +7,24 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; /** - * Samples for VirtualNetworkSubnetUsage Execute. + * Samples for VirtualNetworkSubnetUsage List. */ -public final class VirtualNetworkSubnetUsageExecuteSamples { +public final class VirtualNetworkSubnetUsageListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * VirtualNetworkSubnetUsage.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * VirtualNetworkSubnetUsageList.json */ /** - * Sample code: VirtualNetworkSubnetUsageList. + * Sample code: List the virtual network subnet usage for a given virtual network. * * @param manager Entry point to PostgreSqlManager. */ - public static void - virtualNetworkSubnetUsageList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void listTheVirtualNetworkSubnetUsageForAGivenVirtualNetwork( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.virtualNetworkSubnetUsages() - .executeWithResponse("westus", new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/testvnet"), + .listWithResponse("eastus", new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManagerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManagerTests.java index b6d5139c6d59..87536bb94d99 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManagerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManagerTests.java @@ -13,20 +13,20 @@ import com.azure.core.test.annotation.LiveOnly; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryptionType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MicrosoftEntraAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordBasedAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.test.utils.TestUtilities; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAuthEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ArmServerKeyType; import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig; import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption; -import com.azure.resourcemanager.postgresqlflexibleserver.models.GeoRedundantBackupEnum; import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode; import com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordAuthEnum; import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationRole; import com.azure.resourcemanager.postgresqlflexibleserver.models.Server; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; @@ -98,16 +98,16 @@ public void testCreateServer() { .withAdministratorLogin(adminName) .withAdministratorLoginPassword(adminPwd) .withSku(new Sku().withName("Standard_D2ds_v4").withTier(SkuTier.GENERAL_PURPOSE)) - .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(ActiveDirectoryAuthEnum.DISABLED) - .withPasswordAuth(PasswordAuthEnum.ENABLED)) + .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(MicrosoftEntraAuth.DISABLED) + .withPasswordAuth(PasswordBasedAuth.ENABLED)) .withIdentity(new UserAssignedIdentity().withType(IdentityType.NONE)) - .withDataEncryption(new DataEncryption().withType(ArmServerKeyType.SYSTEM_MANAGED)) - .withVersion(ServerVersion.ONE_FOUR) + .withDataEncryption(new DataEncryption().withType(DataEncryptionType.SYSTEM_MANAGED)) + .withVersion(PostgresMajorVersion.ONE_FOUR) .withAvailabilityZone("2") .withStorage(new Storage().withStorageSizeGB(128)) - .withBackup( - new Backup().withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED).withBackupRetentionDays(7)) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.DISABLED)) + .withBackup(new Backup().withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED) + .withBackupRetentionDays(7)) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.SAME_ZONE)) .withReplicationRole(ReplicationRole.PRIMARY) .create(); // @embedmeEnd diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraAddTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraAddTests.java new file mode 100644 index 000000000000..5bf630cde256 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraAddTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntraAdd; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; +import org.junit.jupiter.api.Assertions; + +public final class AdministratorMicrosoftEntraAddTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdministratorMicrosoftEntraAdd model = BinaryData + .fromString( + "{\"properties\":{\"principalType\":\"Unknown\",\"principalName\":\"uv\",\"tenantId\":\"xpyb\"}}") + .toObject(AdministratorMicrosoftEntraAdd.class); + Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); + Assertions.assertEquals("uv", model.principalName()); + Assertions.assertEquals("xpyb", model.tenantId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdministratorMicrosoftEntraAdd model + = new AdministratorMicrosoftEntraAdd().withPrincipalType(PrincipalType.UNKNOWN) + .withPrincipalName("uv") + .withTenantId("xpyb"); + model = BinaryData.fromObject(model).toObject(AdministratorMicrosoftEntraAdd.class); + Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); + Assertions.assertEquals("uv", model.principalName()); + Assertions.assertEquals("xpyb", model.tenantId()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraInnerTests.java new file mode 100644 index 000000000000..845bbf348fe2 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraInnerTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; +import org.junit.jupiter.api.Assertions; + +public final class AdministratorMicrosoftEntraInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdministratorMicrosoftEntraInner model = BinaryData.fromString( + "{\"properties\":{\"principalType\":\"Unknown\",\"principalName\":\"msxaobhd\",\"objectId\":\"mtqio\",\"tenantId\":\"zehtbmu\"},\"id\":\"ownoizhw\",\"name\":\"rxybqsoq\",\"type\":\"jgkdmbpazlobcu\"}") + .toObject(AdministratorMicrosoftEntraInner.class); + Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); + Assertions.assertEquals("msxaobhd", model.principalName()); + Assertions.assertEquals("mtqio", model.objectId()); + Assertions.assertEquals("zehtbmu", model.tenantId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdministratorMicrosoftEntraInner model + = new AdministratorMicrosoftEntraInner().withPrincipalType(PrincipalType.UNKNOWN) + .withPrincipalName("msxaobhd") + .withObjectId("mtqio") + .withTenantId("zehtbmu"); + model = BinaryData.fromObject(model).toObject(AdministratorMicrosoftEntraInner.class); + Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); + Assertions.assertEquals("msxaobhd", model.principalName()); + Assertions.assertEquals("mtqio", model.objectId()); + Assertions.assertEquals("zehtbmu", model.tenantId()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraListTests.java new file mode 100644 index 000000000000..4b5d83469b18 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraListTests.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntraList; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AdministratorMicrosoftEntraListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdministratorMicrosoftEntraList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"principalType\":\"User\",\"principalName\":\"xrifkwmrvkts\",\"objectId\":\"nt\",\"tenantId\":\"ipa\"},\"id\":\"ajpsquc\",\"name\":\"poyfdkfogkn\",\"type\":\"gjofjd\"},{\"properties\":{\"principalType\":\"Unknown\",\"principalName\":\"rd\",\"objectId\":\"pewnw\",\"tenantId\":\"itjz\"},\"id\":\"lusarh\",\"name\":\"ofcqhsm\",\"type\":\"urkdtmlx\"},{\"properties\":{\"principalType\":\"Group\",\"principalName\":\"k\",\"objectId\":\"txukcdmp\",\"tenantId\":\"cryuan\"},\"id\":\"uxzdxtay\",\"name\":\"lhmwhfpmrqobm\",\"type\":\"u\"},{\"properties\":{\"principalType\":\"User\",\"principalName\":\"yrtih\",\"objectId\":\"tijbpzvgnwzsymgl\",\"tenantId\":\"fcyzkohdbihanufh\"},\"id\":\"bj\",\"name\":\"s\",\"type\":\"git\"}],\"nextLink\":\"qhabifpikxwcz\"}") + .toObject(AdministratorMicrosoftEntraList.class); + Assertions.assertEquals(PrincipalType.USER, model.value().get(0).principalType()); + Assertions.assertEquals("xrifkwmrvkts", model.value().get(0).principalName()); + Assertions.assertEquals("nt", model.value().get(0).objectId()); + Assertions.assertEquals("ipa", model.value().get(0).tenantId()); + Assertions.assertEquals("qhabifpikxwcz", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdministratorMicrosoftEntraList model = new AdministratorMicrosoftEntraList().withValue(Arrays.asList( + new AdministratorMicrosoftEntraInner().withPrincipalType(PrincipalType.USER) + .withPrincipalName("xrifkwmrvkts") + .withObjectId("nt") + .withTenantId("ipa"), + new AdministratorMicrosoftEntraInner().withPrincipalType(PrincipalType.UNKNOWN) + .withPrincipalName("rd") + .withObjectId("pewnw") + .withTenantId("itjz"), + new AdministratorMicrosoftEntraInner().withPrincipalType(PrincipalType.GROUP) + .withPrincipalName("k") + .withObjectId("txukcdmp") + .withTenantId("cryuan"), + new AdministratorMicrosoftEntraInner().withPrincipalType(PrincipalType.USER) + .withPrincipalName("yrtih") + .withObjectId("tijbpzvgnwzsymgl") + .withTenantId("fcyzkohdbihanufh"))) + .withNextLink("qhabifpikxwcz"); + model = BinaryData.fromObject(model).toObject(AdministratorMicrosoftEntraList.class); + Assertions.assertEquals(PrincipalType.USER, model.value().get(0).principalType()); + Assertions.assertEquals("xrifkwmrvkts", model.value().get(0).principalName()); + Assertions.assertEquals("nt", model.value().get(0).objectId()); + Assertions.assertEquals("ipa", model.value().get(0).tenantId()); + Assertions.assertEquals("qhabifpikxwcz", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesForAddTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesForAddTests.java new file mode 100644 index 000000000000..9a518322d7bf --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesForAddTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraPropertiesForAdd; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; +import org.junit.jupiter.api.Assertions; + +public final class AdministratorMicrosoftEntraPropertiesForAddTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdministratorMicrosoftEntraPropertiesForAdd model = BinaryData + .fromString( + "{\"principalType\":\"Unknown\",\"principalName\":\"hmtzopbsphrup\",\"tenantId\":\"gsybbejhp\"}") + .toObject(AdministratorMicrosoftEntraPropertiesForAdd.class); + Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); + Assertions.assertEquals("hmtzopbsphrup", model.principalName()); + Assertions.assertEquals("gsybbejhp", model.tenantId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdministratorMicrosoftEntraPropertiesForAdd model + = new AdministratorMicrosoftEntraPropertiesForAdd().withPrincipalType(PrincipalType.UNKNOWN) + .withPrincipalName("hmtzopbsphrup") + .withTenantId("gsybbejhp"); + model = BinaryData.fromObject(model).toObject(AdministratorMicrosoftEntraPropertiesForAdd.class); + Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); + Assertions.assertEquals("hmtzopbsphrup", model.principalName()); + Assertions.assertEquals("gsybbejhp", model.tenantId()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesTests.java new file mode 100644 index 000000000000..c97133beb0b5 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraProperties; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; +import org.junit.jupiter.api.Assertions; + +public final class AdministratorMicrosoftEntraPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdministratorMicrosoftEntraProperties model = BinaryData.fromString( + "{\"principalType\":\"Group\",\"principalName\":\"nrbtcqqjnq\",\"objectId\":\"hqgnufooojywif\",\"tenantId\":\"esaagdfm\"}") + .toObject(AdministratorMicrosoftEntraProperties.class); + Assertions.assertEquals(PrincipalType.GROUP, model.principalType()); + Assertions.assertEquals("nrbtcqqjnq", model.principalName()); + Assertions.assertEquals("hqgnufooojywif", model.objectId()); + Assertions.assertEquals("esaagdfm", model.tenantId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdministratorMicrosoftEntraProperties model + = new AdministratorMicrosoftEntraProperties().withPrincipalType(PrincipalType.GROUP) + .withPrincipalName("nrbtcqqjnq") + .withObjectId("hqgnufooojywif") + .withTenantId("esaagdfm"); + model = BinaryData.fromObject(model).toObject(AdministratorMicrosoftEntraProperties.class); + Assertions.assertEquals(PrincipalType.GROUP, model.principalType()); + Assertions.assertEquals("nrbtcqqjnq", model.principalName()); + Assertions.assertEquals("hqgnufooojywif", model.objectId()); + Assertions.assertEquals("esaagdfm", model.tenantId()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsDeleteMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsDeleteMockTests.java deleted file mode 100644 index 00d6cccbf39a..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AdministratorsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.administrators().delete("eqw", "gp", "bu", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsCreateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasCreateOrUpdateMockTests.java similarity index 58% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsCreateMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasCreateOrUpdateMockTests.java index 973c838e9bbd..34dca5f9eff5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsCreateMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasCreateOrUpdateMockTests.java @@ -10,7 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministrator; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntra; import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class AdministratorsCreateMockTests { +public final class AdministratorsMicrosoftEntrasCreateOrUpdateMockTests { @Test - public void testCreate() throws Exception { + public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"principalType\":\"Unknown\",\"principalName\":\"tuodxeszabbelaw\",\"objectId\":\"ua\",\"tenantId\":\"zkwrrwoyc\"},\"id\":\"cwyhahno\",\"name\":\"drkywuhps\",\"type\":\"fuurutlwexx\"}"; + = "{\"properties\":{\"principalType\":\"Group\",\"principalName\":\"eaahhvjhhn\",\"objectId\":\"zybbj\",\"tenantId\":\"dj\"},\"id\":\"yxkyxvx\",\"name\":\"vblbjednljlageua\",\"type\":\"lxunsmjbnkppxy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,17 +31,17 @@ public void testCreate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ActiveDirectoryAdministrator response = manager.administrators() - .define("hmkdasvfl") - .withExistingFlexibleServer("uwwltvuqjctz", "nkeifz") - .withPrincipalType(PrincipalType.GROUP) - .withPrincipalName("udchxgsrboldforo") - .withTenantId("jlvizbfhfovva") + AdministratorMicrosoftEntra response = manager.administratorsMicrosoftEntras() + .define("xakjsqzhzb") + .withExistingFlexibleServer("omfaj", "wasqvdaeyyg") + .withPrincipalType(PrincipalType.UNKNOWN) + .withPrincipalName("msidxasicddyvv") + .withTenantId("kgfmocwahpq") .create(); - Assertions.assertEquals(PrincipalType.UNKNOWN, response.principalType()); - Assertions.assertEquals("tuodxeszabbelaw", response.principalName()); - Assertions.assertEquals("ua", response.objectId()); - Assertions.assertEquals("zkwrrwoyc", response.tenantId()); + Assertions.assertEquals(PrincipalType.GROUP, response.principalType()); + Assertions.assertEquals("eaahhvjhhn", response.principalName()); + Assertions.assertEquals("zybbj", response.objectId()); + Assertions.assertEquals("dj", response.tenantId()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasGetWithResponseMockTests.java similarity index 64% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsGetWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasGetWithResponseMockTests.java index 6c27bb75e383..a423ac18ec27 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasGetWithResponseMockTests.java @@ -10,7 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministrator; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntra; import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class AdministratorsGetWithResponseMockTests { +public final class AdministratorsMicrosoftEntrasGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"principalType\":\"Group\",\"principalName\":\"xpdlcgqlsis\",\"objectId\":\"qfrddgam\",\"tenantId\":\"hiosrsjuiv\"},\"id\":\"disyirnxz\",\"name\":\"czexrxzbujrtrhqv\",\"type\":\"revkhgnlnzo\"}"; + = "{\"properties\":{\"principalType\":\"User\",\"principalName\":\"iv\",\"objectId\":\"oyzunbixxr\",\"tenantId\":\"kvcpwpgclr\"},\"id\":\"vtsoxf\",\"name\":\"kenx\",\"type\":\"m\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ActiveDirectoryAdministrator response = manager.administrators() - .getWithResponse("qwyxebeybpm", "znrtffyaqit", "hheioqaqhvseuf", com.azure.core.util.Context.NONE) + AdministratorMicrosoftEntra response = manager.administratorsMicrosoftEntras() + .getWithResponse("qzdz", "tilaxh", "fhqlyvi", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(PrincipalType.GROUP, response.principalType()); - Assertions.assertEquals("xpdlcgqlsis", response.principalName()); - Assertions.assertEquals("qfrddgam", response.objectId()); - Assertions.assertEquals("hiosrsjuiv", response.tenantId()); + Assertions.assertEquals(PrincipalType.USER, response.principalType()); + Assertions.assertEquals("iv", response.principalName()); + Assertions.assertEquals("oyzunbixxr", response.objectId()); + Assertions.assertEquals("kvcpwpgclr", response.tenantId()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasListByServerMockTests.java similarity index 66% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsListByServerMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasListByServerMockTests.java index 0718ba74ac17..6242a523c14e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasListByServerMockTests.java @@ -11,7 +11,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministrator; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntra; import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -19,11 +19,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class AdministratorsListByServerMockTests { +public final class AdministratorsMicrosoftEntrasListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"principalType\":\"ServicePrincipal\",\"principalName\":\"jkv\",\"objectId\":\"ljeamu\",\"tenantId\":\"zmlovuanash\"},\"id\":\"lpmjerb\",\"name\":\"kelvidizozsdb\",\"type\":\"cxjmonfdgnwncyp\"}]}"; + = "{\"value\":[{\"properties\":{\"principalType\":\"Group\",\"principalName\":\"bnpqfrtqlkzme\",\"objectId\":\"itgvkx\",\"tenantId\":\"yqdrf\"},\"id\":\"cealzxwh\",\"name\":\"ansym\",\"type\":\"yqhlwigdivbkbx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testListByServer() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.administrators().listByServer("zlrpiqywncvj", "szcofizeht", com.azure.core.util.Context.NONE); + PagedIterable response = manager.administratorsMicrosoftEntras() + .listByServer("yefrpmpdnqqska", "ao", com.azure.core.util.Context.NONE); - Assertions.assertEquals(PrincipalType.SERVICE_PRINCIPAL, response.iterator().next().principalType()); - Assertions.assertEquals("jkv", response.iterator().next().principalName()); - Assertions.assertEquals("ljeamu", response.iterator().next().objectId()); - Assertions.assertEquals("zmlovuanash", response.iterator().next().tenantId()); + Assertions.assertEquals(PrincipalType.GROUP, response.iterator().next().principalType()); + Assertions.assertEquals("bnpqfrtqlkzme", response.iterator().next().principalName()); + Assertions.assertEquals("itgvkx", response.iterator().next().objectId()); + Assertions.assertEquals("yqdrf", response.iterator().next().tenantId()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetWithResponseMockTests.java similarity index 72% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsGetWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetWithResponseMockTests.java index d1c62205ea0e..2291983321cb 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetWithResponseMockTests.java @@ -10,7 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettingsModel; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettingsModel; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState; import java.nio.charset.StandardCharsets; @@ -19,11 +19,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class ServerThreatProtectionSettingsGetWithResponseMockTests { +public final class AdvancedThreatProtectionSettingsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"state\":\"Disabled\",\"creationTime\":\"2021-06-09T03:17:06Z\"},\"id\":\"yqyybxubmdna\",\"name\":\"cbq\",\"type\":\"remj\"}"; + = "{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-06-22T06:39:41Z\"},\"id\":\"ibabxvititvtzeex\",\"name\":\"vo\",\"type\":\"tfgle\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,10 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ServerThreatProtectionSettingsModel response = manager.serverThreatProtectionSettings() - .getWithResponse("qthwmgnmbscbb", "igdhxiidlo", ThreatProtectionName.DEFAULT, - com.azure.core.util.Context.NONE) + AdvancedThreatProtectionSettingsModel response = manager.advancedThreatProtectionSettings() + .getWithResponse("eesvecu", "jpxtxsuwprtuj", ThreatProtectionName.DEFAULT, com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(ThreatProtectionState.DISABLED, response.state()); + Assertions.assertEquals(ThreatProtectionState.ENABLED, response.state()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerMockTests.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsListByServerMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerMockTests.java index c718255997cd..f3f16f405260 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerMockTests.java @@ -11,7 +11,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettingsModel; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettingsModel; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -19,11 +19,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class ServerThreatProtectionSettingsListByServerMockTests { +public final class AdvancedThreatProtectionSettingsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-02-14T18:09:59Z\"},\"id\":\"oawjqoyueay\",\"name\":\"bpcms\",\"type\":\"lbyrru\"}]}"; + = "{\"value\":[{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-06-20T13:46:53Z\"},\"id\":\"ymerteeammxq\",\"name\":\"ekkkzd\",\"type\":\"rtkgdojbmxvavref\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testListByServer() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.serverThreatProtectionSettings() - .listByServer("sgl", "rczezkhhlt", com.azure.core.util.Context.NONE); + PagedIterable response = manager.advancedThreatProtectionSettings() + .listByServer("enlsvxeizzgwkln", "rmffeyc", com.azure.core.util.Context.NONE); Assertions.assertEquals(ThreatProtectionState.ENABLED, response.iterator().next().state()); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListTests.java new file mode 100644 index 000000000000..31106f8a6ba6 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettingsList; +import org.junit.jupiter.api.Assertions; + +public final class AdvancedThreatProtectionSettingsListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdvancedThreatProtectionSettingsList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-02-24T21:11:33Z\"},\"id\":\"uhivyqniw\",\"name\":\"ybrk\",\"type\":\"vd\"},{\"properties\":{\"state\":\"Disabled\",\"creationTime\":\"2021-10-08T05:03:40Z\"},\"id\":\"fwvuk\",\"name\":\"gaudcc\",\"type\":\"nhsjcnyej\"},{\"properties\":{\"state\":\"Disabled\",\"creationTime\":\"2021-10-13T18:09:40Z\"},\"id\":\"napczwlokjy\",\"name\":\"mkkvnip\",\"type\":\"oxzjnchgejspod\"}],\"nextLink\":\"ilzyd\"}") + .toObject(AdvancedThreatProtectionSettingsList.class); + Assertions.assertEquals("ilzyd", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdvancedThreatProtectionSettingsList model = new AdvancedThreatProtectionSettingsList().withNextLink("ilzyd"); + model = BinaryData.fromObject(model).toObject(AdvancedThreatProtectionSettingsList.class); + Assertions.assertEquals("ilzyd", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsModelInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsModelInnerTests.java new file mode 100644 index 000000000000..8128cb3ea365 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsModelInnerTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState; +import org.junit.jupiter.api.Assertions; + +public final class AdvancedThreatProtectionSettingsModelInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdvancedThreatProtectionSettingsModelInner model = BinaryData.fromString( + "{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-01-09T01:59:33Z\"},\"id\":\"ahuxinpm\",\"name\":\"njaqwixjspro\",\"type\":\"vcputegj\"}") + .toObject(AdvancedThreatProtectionSettingsModelInner.class); + Assertions.assertEquals(ThreatProtectionState.ENABLED, model.state()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdvancedThreatProtectionSettingsModelInner model + = new AdvancedThreatProtectionSettingsModelInner().withState(ThreatProtectionState.ENABLED); + model = BinaryData.fromObject(model).toObject(AdvancedThreatProtectionSettingsModelInner.class); + Assertions.assertEquals(ThreatProtectionState.ENABLED, model.state()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsPropertiesTests.java new file mode 100644 index 000000000000..fe5af36aec36 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsProperties; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState; +import org.junit.jupiter.api.Assertions; + +public final class AdvancedThreatProtectionSettingsPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdvancedThreatProtectionSettingsProperties model + = BinaryData.fromString("{\"state\":\"Disabled\",\"creationTime\":\"2021-06-23T09:15:06Z\"}") + .toObject(AdvancedThreatProtectionSettingsProperties.class); + Assertions.assertEquals(ThreatProtectionState.DISABLED, model.state()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdvancedThreatProtectionSettingsProperties model + = new AdvancedThreatProtectionSettingsProperties().withState(ThreatProtectionState.DISABLED); + model = BinaryData.fromObject(model).toObject(AdvancedThreatProtectionSettingsProperties.class); + Assertions.assertEquals(ThreatProtectionState.DISABLED, model.state()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandInnerTests.java new file mode 100644 index 000000000000..0e466aff4ea8 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandInnerTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class BackupAutomaticAndOnDemandInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupAutomaticAndOnDemandInner model = BinaryData.fromString( + "{\"properties\":{\"backupType\":\"Full\",\"completedTime\":\"2021-09-13T14:44:26Z\",\"source\":\"dvpjhulsuuvmk\"},\"id\":\"zkrwfn\",\"name\":\"iodjp\",\"type\":\"lwejdpv\"}") + .toObject(BackupAutomaticAndOnDemandInner.class); + Assertions.assertEquals(BackupType.FULL, model.backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T14:44:26Z"), model.completedTime()); + Assertions.assertEquals("dvpjhulsuuvmk", model.source()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupAutomaticAndOnDemandInner model = new BackupAutomaticAndOnDemandInner().withBackupType(BackupType.FULL) + .withCompletedTime(OffsetDateTime.parse("2021-09-13T14:44:26Z")) + .withSource("dvpjhulsuuvmk"); + model = BinaryData.fromObject(model).toObject(BackupAutomaticAndOnDemandInner.class); + Assertions.assertEquals(BackupType.FULL, model.backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T14:44:26Z"), model.completedTime()); + Assertions.assertEquals("dvpjhulsuuvmk", model.source()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandListTests.java new file mode 100644 index 000000000000..f149153d8b18 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandListTests.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.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupAutomaticAndOnDemandList; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BackupAutomaticAndOnDemandListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupAutomaticAndOnDemandList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"backupType\":\"Full\",\"completedTime\":\"2021-10-01T21:39:25Z\",\"source\":\"fdfdosygexpa\"},\"id\":\"akhmsbzjhcrz\",\"name\":\"vdphlxaolthqtr\",\"type\":\"qjbpfzfsin\"}],\"nextLink\":\"v\"}") + .toObject(BackupAutomaticAndOnDemandList.class); + Assertions.assertEquals(BackupType.FULL, model.value().get(0).backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-01T21:39:25Z"), model.value().get(0).completedTime()); + Assertions.assertEquals("fdfdosygexpa", model.value().get(0).source()); + Assertions.assertEquals("v", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupAutomaticAndOnDemandList model = new BackupAutomaticAndOnDemandList() + .withValue(Arrays.asList(new BackupAutomaticAndOnDemandInner().withBackupType(BackupType.FULL) + .withCompletedTime(OffsetDateTime.parse("2021-10-01T21:39:25Z")) + .withSource("fdfdosygexpa"))) + .withNextLink("v"); + model = BinaryData.fromObject(model).toObject(BackupAutomaticAndOnDemandList.class); + Assertions.assertEquals(BackupType.FULL, model.value().get(0).backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-01T21:39:25Z"), model.value().get(0).completedTime()); + Assertions.assertEquals("fdfdosygexpa", model.value().get(0).source()); + Assertions.assertEquals("v", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandPropertiesTests.java new file mode 100644 index 000000000000..c065ac61d19a --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandPropertiesTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandProperties; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class BackupAutomaticAndOnDemandPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupAutomaticAndOnDemandProperties model = BinaryData.fromString( + "{\"backupType\":\"Customer On-Demand\",\"completedTime\":\"2021-02-03T13:19:32Z\",\"source\":\"soacctazakl\"}") + .toObject(BackupAutomaticAndOnDemandProperties.class); + Assertions.assertEquals(BackupType.CUSTOMER_ON_DEMAND, model.backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-03T13:19:32Z"), model.completedTime()); + Assertions.assertEquals("soacctazakl", model.source()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupAutomaticAndOnDemandProperties model + = new BackupAutomaticAndOnDemandProperties().withBackupType(BackupType.CUSTOMER_ON_DEMAND) + .withCompletedTime(OffsetDateTime.parse("2021-02-03T13:19:32Z")) + .withSource("soacctazakl"); + model = BinaryData.fromObject(model).toObject(BackupAutomaticAndOnDemandProperties.class); + Assertions.assertEquals(BackupType.CUSTOMER_ON_DEMAND, model.backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-03T13:19:32Z"), model.completedTime()); + Assertions.assertEquals("soacctazakl", model.source()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupForPatchTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupForPatchTests.java new file mode 100644 index 000000000000..96ab7bdc0a6a --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupForPatchTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackup; +import org.junit.jupiter.api.Assertions; + +public final class BackupForPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupForPatch model = BinaryData.fromString( + "{\"backupRetentionDays\":704877183,\"geoRedundantBackup\":\"Disabled\",\"earliestRestoreDate\":\"2021-01-17T07:38:08Z\"}") + .toObject(BackupForPatch.class); + Assertions.assertEquals(704877183, model.backupRetentionDays()); + Assertions.assertEquals(GeographicallyRedundantBackup.DISABLED, model.geoRedundantBackup()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupForPatch model = new BackupForPatch().withBackupRetentionDays(704877183) + .withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED); + model = BinaryData.fromObject(model).toObject(BackupForPatch.class); + Assertions.assertEquals(704877183, model.backupRetentionDays()); + Assertions.assertEquals(GeographicallyRedundantBackup.DISABLED, model.geoRedundantBackup()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupRequestBaseTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupRequestBaseTests.java new file mode 100644 index 000000000000..395ff65bc1e6 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupRequestBaseTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupRequestBase; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; +import org.junit.jupiter.api.Assertions; + +public final class BackupRequestBaseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupRequestBase model = BinaryData.fromString("{\"backupSettings\":{\"backupName\":\"kbogqxndlkzgx\"}}") + .toObject(BackupRequestBase.class); + Assertions.assertEquals("kbogqxndlkzgx", model.backupSettings().backupName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupRequestBase model + = new BackupRequestBase().withBackupSettings(new BackupSettings().withBackupName("kbogqxndlkzgx")); + model = BinaryData.fromObject(model).toObject(BackupRequestBase.class); + Assertions.assertEquals("kbogqxndlkzgx", model.backupSettings().backupName()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupSettingsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupSettingsTests.java new file mode 100644 index 000000000000..7941c85d35e6 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupSettingsTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; +import org.junit.jupiter.api.Assertions; + +public final class BackupSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupSettings model + = BinaryData.fromString("{\"backupName\":\"uriplbpodxunkb\"}").toObject(BackupSettings.class); + Assertions.assertEquals("uriplbpodxunkb", model.backupName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupSettings model = new BackupSettings().withBackupName("uriplbpodxunkb"); + model = BinaryData.fromObject(model).toObject(BackupSettings.class); + Assertions.assertEquals("uriplbpodxunkb", model.backupName()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupStoreDetailsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupStoreDetailsTests.java new file mode 100644 index 000000000000..8318533b93f5 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupStoreDetailsTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupStoreDetails; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BackupStoreDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupStoreDetails model + = BinaryData.fromString("{\"sasUriList\":[\"wlauwzizxbmpg\"]}").toObject(BackupStoreDetails.class); + Assertions.assertEquals("wlauwzizxbmpg", model.sasUriList().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupStoreDetails model = new BackupStoreDetails().withSasUriList(Arrays.asList("wlauwzizxbmpg")); + model = BinaryData.fromObject(model).toObject(BackupStoreDetails.class); + Assertions.assertEquals("wlauwzizxbmpg", model.sasUriList().get(0)); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupTests.java new file mode 100644 index 000000000000..dfd8ee9ac090 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackup; +import org.junit.jupiter.api.Assertions; + +public final class BackupTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Backup model = BinaryData.fromString( + "{\"backupRetentionDays\":1112510482,\"geoRedundantBackup\":\"Disabled\",\"earliestRestoreDate\":\"2021-10-31T10:15:37Z\"}") + .toObject(Backup.class); + Assertions.assertEquals(1112510482, model.backupRetentionDays()); + Assertions.assertEquals(GeographicallyRedundantBackup.DISABLED, model.geoRedundantBackup()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Backup model = new Backup().withBackupRetentionDays(1112510482) + .withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED); + model = BinaryData.fromObject(model).toObject(Backup.class); + Assertions.assertEquals(1112510482, model.backupRetentionDays()); + Assertions.assertEquals(GeographicallyRedundantBackup.DISABLED, model.geoRedundantBackup()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsCreateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsCreateMockTests.java similarity index 68% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsCreateMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsCreateMockTests.java index dca992549738..ddee7d2f3fa9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsCreateMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsCreateMockTests.java @@ -10,19 +10,19 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Origin; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerBackup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupAutomaticAndOnDemand; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class BackupsCreateMockTests { +public final class BackupsAutomaticAndOnDemandsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"backupType\":\"Customer On-Demand\",\"completedTime\":\"2021-02-19T23:36:25Z\",\"source\":\"rkcxkj\"},\"id\":\"nxm\",\"name\":\"suxswqrntvlwijp\",\"type\":\"ttexoqqpwcyyufmh\"}"; + = "{\"properties\":{\"backupType\":\"Customer On-Demand\",\"completedTime\":\"2021-11-19T03:35:41Z\",\"source\":\"nrzvuljraaer\"},\"id\":\"okqgukkjq\",\"name\":\"vbroylaxxu\",\"type\":\"cdisd\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testCreate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ServerBackup response - = manager.backups().create("lalniex", "srzpgepqtybbww", "gdakchz", com.azure.core.util.Context.NONE); + BackupAutomaticAndOnDemand response + = manager.backupsAutomaticAndOnDemands().create("nac", "cc", "knh", com.azure.core.util.Context.NONE); - Assertions.assertEquals(Origin.CUSTOMER_ON_DEMAND, response.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-19T23:36:25Z"), response.completedTime()); - Assertions.assertEquals("rkcxkj", response.source()); + Assertions.assertEquals(BackupType.CUSTOMER_ON_DEMAND, response.backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-19T03:35:41Z"), response.completedTime()); + Assertions.assertEquals("nrzvuljraaer", response.source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsGetWithResponseMockTests.java similarity index 67% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsGetWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsGetWithResponseMockTests.java index 2ecd04ac2d24..e3220c47c8df 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsGetWithResponseMockTests.java @@ -10,19 +10,19 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Origin; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerBackup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupAutomaticAndOnDemand; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class BackupsGetWithResponseMockTests { +public final class BackupsAutomaticAndOnDemandsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"backupType\":\"Customer On-Demand\",\"completedTime\":\"2021-06-20T13:20:36Z\",\"source\":\"gydcw\"},\"id\":\"xjumvq\",\"name\":\"olihrra\",\"type\":\"ouau\"}"; + = "{\"properties\":{\"backupType\":\"Customer On-Demand\",\"completedTime\":\"2021-02-24T21:00:57Z\",\"source\":\"ttzaefed\"},\"id\":\"hchrphkmcrjdqn\",\"name\":\"dfzpbgtgkylkdg\",\"type\":\"rjeuut\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,12 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ServerBackup response = manager.backups() - .getWithResponse("uncuw", "qspkcdqzhlctd", "unqndyfpchrqb", com.azure.core.util.Context.NONE) + BackupAutomaticAndOnDemand response = manager.backupsAutomaticAndOnDemands() + .getWithResponse("sfjbjsvg", "rwhryvycytd", "lxgccknfnwmbtm", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(Origin.CUSTOMER_ON_DEMAND, response.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-20T13:20:36Z"), response.completedTime()); - Assertions.assertEquals("gydcw", response.source()); + Assertions.assertEquals(BackupType.CUSTOMER_ON_DEMAND, response.backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-24T21:00:57Z"), response.completedTime()); + Assertions.assertEquals("ttzaefed", response.source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsListByServerMockTests.java similarity index 68% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsListByServerMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsListByServerMockTests.java index 7507b376b5df..d4036ec44a1f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsListByServerMockTests.java @@ -11,19 +11,19 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Origin; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerBackup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupAutomaticAndOnDemand; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class BackupsListByServerMockTests { +public final class BackupsAutomaticAndOnDemandsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"backupType\":\"Full\",\"completedTime\":\"2021-09-29T00:55:24Z\",\"source\":\"cb\"},\"id\":\"imzdlyj\",\"name\":\"fqwmkyoquf\",\"type\":\"vruzslzojhpctfnm\"}]}"; + = "{\"value\":[{\"properties\":{\"backupType\":\"Full\",\"completedTime\":\"2021-03-11T01:19:47Z\",\"source\":\"pifhpfeoajvgcxtx\"},\"id\":\"sheafid\",\"name\":\"tugsresmkssjh\",\"type\":\"iftxfkf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testListByServer() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.backups().listByServer("rjtloq", "fuojrngif", com.azure.core.util.Context.NONE); + PagedIterable response = manager.backupsAutomaticAndOnDemands() + .listByServer("wxezwzhok", "bwnhhtql", com.azure.core.util.Context.NONE); - Assertions.assertEquals(Origin.FULL, response.iterator().next().backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-29T00:55:24Z"), + Assertions.assertEquals(BackupType.FULL, response.iterator().next().backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-11T01:19:47Z"), response.iterator().next().completedTime()); - Assertions.assertEquals("cb", response.iterator().next().source()); + Assertions.assertEquals("pifhpfeoajvgcxtx", response.iterator().next().source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionRequestTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionRequestTests.java new file mode 100644 index 000000000000..d89d35905bc9 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionRequestTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupStoreDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionRequest; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BackupsLongTermRetentionRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupsLongTermRetentionRequest model = BinaryData.fromString( + "{\"targetDetails\":{\"sasUriList\":[\"ubyyntw\",\"rbqtkoie\"]},\"backupSettings\":{\"backupName\":\"seotgqrllt\"}}") + .toObject(BackupsLongTermRetentionRequest.class); + Assertions.assertEquals("seotgqrllt", model.backupSettings().backupName()); + Assertions.assertEquals("ubyyntw", model.targetDetails().sasUriList().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupsLongTermRetentionRequest model = new BackupsLongTermRetentionRequest() + .withBackupSettings(new BackupSettings().withBackupName("seotgqrllt")) + .withTargetDetails(new BackupStoreDetails().withSasUriList(Arrays.asList("ubyyntw", "rbqtkoie"))); + model = BinaryData.fromObject(model).toObject(BackupsLongTermRetentionRequest.class); + Assertions.assertEquals("seotgqrllt", model.backupSettings().backupName()); + Assertions.assertEquals("ubyyntw", model.targetDetails().sasUriList().get(0)); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionResponsePropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionResponsePropertiesTests.java new file mode 100644 index 000000000000..a9b6ecfd14c3 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionResponsePropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseProperties; +import org.junit.jupiter.api.Assertions; + +public final class BackupsLongTermRetentionResponsePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupsLongTermRetentionResponseProperties model = BinaryData.fromString("{\"numberOfContainers\":1097302991}") + .toObject(BackupsLongTermRetentionResponseProperties.class); + Assertions.assertEquals(1097302991, model.numberOfContainers()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupsLongTermRetentionResponseProperties model + = new BackupsLongTermRetentionResponseProperties().withNumberOfContainers(1097302991); + model = BinaryData.fromObject(model).toObject(BackupsLongTermRetentionResponseProperties.class); + Assertions.assertEquals(1097302991, model.numberOfContainers()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServersTriggerLtrPreBackupWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionsCheckPrerequisitesWithResponseMockTests.java similarity index 70% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServersTriggerLtrPreBackupWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionsCheckPrerequisitesWithResponseMockTests.java index 102edb5978e3..2aa46b41b80d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServersTriggerLtrPreBackupWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionsCheckPrerequisitesWithResponseMockTests.java @@ -19,10 +19,10 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class FlexibleServersTriggerLtrPreBackupWithResponseMockTests { +public final class BackupsLongTermRetentionsCheckPrerequisitesWithResponseMockTests { @Test - public void testTriggerLtrPreBackupWithResponse() throws Exception { - String responseStr = "{\"properties\":{\"numberOfContainers\":64736512}}"; + public void testCheckPrerequisitesWithResponse() throws Exception { + String responseStr = "{\"properties\":{\"numberOfContainers\":1706604371}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,12 @@ public void testTriggerLtrPreBackupWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - LtrPreBackupResponse response - = manager.flexibleServers() - .triggerLtrPreBackupWithResponse("bsre", "rfqkfuar", - new LtrPreBackupRequest().withBackupSettings( - new BackupSettings().withBackupName("nlvhhtklnvnafvv")), - com.azure.core.util.Context.NONE) - .getValue(); + LtrPreBackupResponse response = manager.backupsLongTermRetentions() + .checkPrerequisitesWithResponse("lrohkpig", "fusuckzmkwklsno", + new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("axmqeqal")), + com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals(64736512, response.numberOfContainers()); + Assertions.assertEquals(1706604371, response.numberOfContainers()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationsListMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationsListMockTests.java new file mode 100644 index 000000000000..20ccc42a3c6d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationsListMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Capability; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class CapabilitiesByLocationsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"name\":\"cbiqtgdqoh\",\"supportedServerEditions\":[{\"name\":\"ldrizetpwbra\",\"defaultSkuName\":\"libph\",\"supportedStorageEditions\":[{\"name\":\"izakak\",\"defaultStorageSizeMb\":2736442030278845624,\"supportedStorageMb\":[{},{}],\"status\":\"Available\",\"reason\":\"ha\"},{\"name\":\"ylhjlm\",\"defaultStorageSizeMb\":1077522990830391189,\"supportedStorageMb\":[{},{}],\"status\":\"Available\",\"reason\":\"sopteecj\"},{\"name\":\"islstv\",\"defaultStorageSizeMb\":2601870801725359637,\"supportedStorageMb\":[{}],\"status\":\"Visible\",\"reason\":\"umweoohguufuzboy\"}],\"supportedServerSkus\":[{\"name\":\"wtzolbaemwmdxmeb\",\"vCores\":8048243,\"supportedIops\":120953176,\"supportedMemoryPerVcoreMb\":4829986004787621888,\"supportedZones\":[\"veabfqxnmwmqtib\",\"yijddtvqcttad\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"sieekpndzaapm\",\"status\":\"Disabled\",\"reason\":\"eqw\"},{\"name\":\"pibudqwyxebeybpm\",\"vCores\":11524370,\"supportedIops\":1945693134,\"supportedMemoryPerVcoreMb\":7788648309029183931,\"supportedZones\":[\"itmhhei\",\"qaqhvseufu\",\"yrxpdlcgqls\",\"smjqfrddgam\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"uivfcdis\",\"status\":\"Available\",\"reason\":\"xzhczexrxz\"}],\"status\":\"Default\",\"reason\":\"trhqvw\"},{\"name\":\"vk\",\"defaultSkuName\":\"nlnzonzlrpi\",\"supportedStorageEditions\":[{\"name\":\"cvjtszcofiz\",\"defaultStorageSizeMb\":4146962922880294634,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Visible\",\"reason\":\"vreljea\"},{\"name\":\"rvzmlovuana\",\"defaultStorageSizeMb\":1138155605453758000,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Disabled\",\"reason\":\"rbdkelvidiz\"},{\"name\":\"sdbccxjmonfdgnwn\",\"defaultStorageSizeMb\":4527807456286813914,\"supportedStorageMb\":[{}],\"status\":\"Visible\",\"reason\":\"v\"},{\"name\":\"jctzenkei\",\"defaultStorageSizeMb\":3883485074610487115,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Visible\",\"reason\":\"vflyhbxcu\"}],\"supportedServerSkus\":[{\"name\":\"gsrboldforobw\",\"vCores\":2116230034,\"supportedIops\":447073477,\"supportedMemoryPerVcoreMb\":6875255372638477871,\"supportedZones\":[\"vvacqpb\",\"uodxesza\",\"belawumuaslzkwr\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"wyh\",\"status\":\"Disabled\",\"reason\":\"mdr\"},{\"name\":\"wuhpsvfuur\",\"vCores\":1702145471,\"supportedIops\":1783251204,\"supportedMemoryPerVcoreMb\":6951866972489132006,\"supportedZones\":[\"lniexz\",\"rzpgep\",\"tybbwwpgda\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"nrkcxkj\",\"status\":\"Visible\",\"reason\":\"mysu\"},{\"name\":\"wq\",\"vCores\":1550616862,\"supportedIops\":790882759,\"supportedMemoryPerVcoreMb\":7173540378190876196,\"supportedZones\":[\"ttexoqqpwcyyufmh\",\"uncuw\"],\"supportedHaMode\":[\"SameZone\",\"SameZone\"],\"supportedFeatures\":[{}],\"securityProfile\":\"zhlctddunqndyfpc\",\"status\":\"Visible\",\"reason\":\"njjrcgegydcwbox\"}],\"status\":\"Available\",\"reason\":\"qqoli\"},{\"name\":\"raiouaubrjtl\",\"defaultSkuName\":\"xfuojrn\",\"supportedStorageEditions\":[{\"name\":\"rzpasccbiuimzdly\",\"defaultStorageSizeMb\":2207814252603311282,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Default\",\"reason\":\"qufdvruzslzojh\"},{\"name\":\"tfnmdx\",\"defaultStorageSizeMb\":9149647349466202254,\"supportedStorageMb\":[{}],\"status\":\"Disabled\",\"reason\":\"eyzihgrky\"}],\"supportedServerSkus\":[{\"name\":\"bsnmfpph\",\"vCores\":917571686,\"supportedIops\":474168225,\"supportedMemoryPerVcoreMb\":3280820966134981534,\"supportedZones\":[\"gzfc\",\"bgomfgbegl\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\",\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"nlu\",\"status\":\"Available\",\"reason\":\"rfxeeebtij\"}],\"status\":\"Available\",\"reason\":\"bmqzbqqxlajrnwx\"},{\"name\":\"evehjkuyxoaf\",\"defaultSkuName\":\"oqltfae\",\"supportedStorageEditions\":[{\"name\":\"mfgvxirpghriypo\",\"defaultStorageSizeMb\":7116262338386252749,\"supportedStorageMb\":[{},{},{}],\"status\":\"Default\",\"reason\":\"prlpy\"},{\"name\":\"uciqdsme\",\"defaultStorageSizeMb\":4627205265824000180,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Default\",\"reason\":\"yasiibmiy\"},{\"name\":\"nustgnljh\",\"defaultStorageSizeMb\":430611531006551205,\"supportedStorageMb\":[{},{},{}],\"status\":\"Available\",\"reason\":\"vmqfoud\"}],\"supportedServerSkus\":[{\"name\":\"gyyprotwy\",\"vCores\":677853893,\"supportedIops\":915134983,\"supportedMemoryPerVcoreMb\":6016947306008941575,\"supportedZones\":[\"cmjkavlgorbmftpm\",\"tzfjltf\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{}],\"securityProfile\":\"tpvopvpbdb\",\"status\":\"Default\",\"reason\":\"q\"},{\"name\":\"edsvqwthmk\",\"vCores\":1468707412,\"supportedIops\":669264341,\"supportedMemoryPerVcoreMb\":4975334479567653005,\"supportedZones\":[\"qcwdhoh\",\"dtmcd\",\"sufco\",\"dxbzlmcmuap\"],\"supportedHaMode\":[\"SameZone\",\"SameZone\",\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"xeyskonqzinkfkbg\",\"status\":\"Available\",\"reason\":\"wxeqocljmygvkzqk\"},{\"name\":\"eokbze\",\"vCores\":50022372,\"supportedIops\":2083826558,\"supportedMemoryPerVcoreMb\":8813876269554898921,\"supportedZones\":[\"tleipqxbkw\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"d\",\"status\":\"Disabled\",\"reason\":\"q\"}],\"status\":\"Disabled\",\"reason\":\"awopqh\"}],\"supportedServerVersions\":[{\"name\":\"tmcg\",\"supportedVersionsToUpgrade\":[\"stzelndlatut\",\"zlbiojlvfhrbbpn\",\"qvcww\"],\"supportedFeatures\":[{\"name\":\"mochpprprsnmok\",\"status\":\"Enabled\"},{\"name\":\"jnhlbkpbzpcpiljh\",\"status\":\"Enabled\"},{\"name\":\"echndbnwieholew\",\"status\":\"Disabled\"}],\"status\":\"Available\",\"reason\":\"wefqsfapaqtferr\"},{\"name\":\"ex\",\"supportedVersionsToUpgrade\":[\"fxapjwogqqnobpu\",\"cdabtqwpwya\",\"bzasqbucljgkyexa\",\"guyaip\"],\"supportedFeatures\":[{\"name\":\"ault\",\"status\":\"Enabled\"},{\"name\":\"um\",\"status\":\"Enabled\"},{\"name\":\"z\",\"status\":\"Disabled\"}],\"status\":\"Visible\",\"reason\":\"jng\"},{\"name\":\"dqxtbjwgnyf\",\"supportedVersionsToUpgrade\":[\"zsvtuikzhajqgl\",\"fh\",\"l\"],\"supportedFeatures\":[{\"name\":\"xynqnz\",\"status\":\"Enabled\"},{\"name\":\"ovw\",\"status\":\"Disabled\"},{\"name\":\"tgoe\",\"status\":\"Enabled\"}],\"status\":\"Available\",\"reason\":\"pfhvfslk\"}],\"supportedFeatures\":[{\"name\":\"lrigjkskyri\",\"status\":\"Disabled\"},{\"name\":\"idsxwaabzmifry\",\"status\":\"Disabled\"},{\"name\":\"maxriz\",\"status\":\"Enabled\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"lhslnelxieixyn\",\"supportedSku\":\"xecwcro\",\"supportedStorageGb\":1356428247,\"supportedServerVersions\":\"lhc\",\"serverCount\":1923192565,\"status\":\"Default\",\"reason\":\"fdwfmvigorqj\"}],\"geoBackupSupported\":\"Enabled\",\"zoneRedundantHaSupported\":\"Enabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Disabled\",\"storageAutoGrowthSupported\":\"Disabled\",\"onlineResizeSupported\":\"Enabled\",\"restricted\":\"Disabled\",\"status\":\"Visible\",\"reason\":\"juj\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PostgreSqlManager manager = PostgreSqlManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.capabilitiesByLocations().list("egprhptil", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("cbiqtgdqoh", response.iterator().next().name()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServersListMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServersListMockTests.java new file mode 100644 index 000000000000..c1dd72f96086 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServersListMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Capability; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class CapabilitiesByServersListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"name\":\"clt\",\"supportedServerEditions\":[{\"name\":\"ex\",\"defaultSkuName\":\"lfmk\",\"supportedStorageEditions\":[{\"name\":\"zuawxtzxpuamwa\",\"defaultStorageSizeMb\":5681353698337068642,\"supportedStorageMb\":[{},{}],\"status\":\"Available\",\"reason\":\"hsphaivmxyas\"},{\"name\":\"vgsgzwywakoihkn\",\"defaultStorageSizeMb\":3757192969147775574,\"supportedStorageMb\":[{}],\"status\":\"Disabled\",\"reason\":\"lnymzotqy\"}],\"supportedServerSkus\":[{\"name\":\"cbm\",\"vCores\":1331204401,\"supportedIops\":351004258,\"supportedMemoryPerVcoreMb\":3776684670219420412,\"supportedZones\":[\"ayxonsupeujl\"],\"supportedHaMode\":[\"SameZone\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"ql\",\"status\":\"Available\",\"reason\":\"ibg\"},{\"name\":\"gnxf\",\"vCores\":570995057,\"supportedIops\":1604903119,\"supportedMemoryPerVcoreMb\":4786688185160172368,\"supportedZones\":[\"dofdbxiqx\",\"iiqbi\",\"htmwwinh\"],\"supportedHaMode\":[\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"vwbcblembnkbwv\",\"status\":\"Visible\",\"reason\":\"divqi\"}],\"status\":\"Visible\",\"reason\":\"tswbzuwfmd\"},{\"name\":\"agegiz\",\"defaultSkuName\":\"jfelisdjubggbqig\",\"supportedStorageEditions\":[{\"name\":\"sazgakgacyrcmj\",\"defaultStorageSizeMb\":3103718277552317709,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Visible\",\"reason\":\"uhrylniofr\"},{\"name\":\"bzjedmstk\",\"defaultStorageSizeMb\":110896961983578283,\"supportedStorageMb\":[{},{}],\"status\":\"Disabled\",\"reason\":\"iznk\"}],\"supportedServerSkus\":[{\"name\":\"nsnvpd\",\"vCores\":671836726,\"supportedIops\":115574776,\"supportedMemoryPerVcoreMb\":4456554415141615101,\"supportedZones\":[\"bkiw\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"fy\",\"status\":\"Default\",\"reason\":\"rpfbcunezz\"}],\"status\":\"Default\",\"reason\":\"lfwyfwlwxjwetn\"},{\"name\":\"ihclafzv\",\"defaultSkuName\":\"lpt\",\"supportedStorageEditions\":[{\"name\":\"wztcmwqkchc\",\"defaultStorageSizeMb\":4460871614096839788,\"supportedStorageMb\":[{},{},{}],\"status\":\"Default\",\"reason\":\"kjexfdeqvhp\"},{\"name\":\"lkkshkbffmbmx\",\"defaultStorageSizeMb\":6471426075457466306,\"supportedStorageMb\":[{}],\"status\":\"Disabled\",\"reason\":\"jx\"}],\"supportedServerSkus\":[{\"name\":\"fujg\",\"vCores\":1062138693,\"supportedIops\":1279529449,\"supportedMemoryPerVcoreMb\":6918440632186080085,\"supportedZones\":[\"aqutdewemxswvruu\",\"zzjgehkfki\",\"rtixokff\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"whixmonstsh\",\"status\":\"Disabled\",\"reason\":\"velfcldu\"},{\"name\":\"birdsvuwcobiegs\",\"vCores\":1923237132,\"supportedIops\":2099523600,\"supportedMemoryPerVcoreMb\":2784649228663949858,\"supportedZones\":[\"i\",\"nghgshej\",\"tbxqmuluxlxq\",\"vnersbycucrw\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"rqbsmswziq\",\"status\":\"Visible\",\"reason\":\"okzrus\"},{\"name\":\"vhczznvfby\",\"vCores\":1906628483,\"supportedIops\":728305495,\"supportedMemoryPerVcoreMb\":2787720683354183168,\"supportedZones\":[\"vumwmxqh\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"sehaohdjhhflzok\",\"status\":\"Visible\",\"reason\":\"pelnjetag\"},{\"name\":\"sxoa\",\"vCores\":1674614666,\"supportedIops\":2037643049,\"supportedMemoryPerVcoreMb\":4444044351696890783,\"supportedZones\":[\"wvefloccsrmoz\",\"hmipgawtxxpkyjc\",\"cjxgrytf\",\"pcycilrmcaykg\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\",\"SameZone\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"sxwpndfcpfnznthj\",\"status\":\"Default\",\"reason\":\"aosrxuz\"}],\"status\":\"Disabled\",\"reason\":\"ktcqio\"}],\"supportedServerVersions\":[{\"name\":\"zah\",\"supportedVersionsToUpgrade\":[\"dl\",\"rtltla\"],\"supportedFeatures\":[{\"name\":\"zkatb\",\"status\":\"Disabled\"},{\"name\":\"nnbsoqeqa\",\"status\":\"Disabled\"},{\"name\":\"lagun\",\"status\":\"Enabled\"},{\"name\":\"ebwlnbmhyreeudzq\",\"status\":\"Disabled\"}],\"status\":\"Available\",\"reason\":\"mjxlyyzglgouw\"},{\"name\":\"mjjyuojq\",\"supportedVersionsToUpgrade\":[\"axkjeytunlbfjk\"],\"supportedFeatures\":[{\"name\":\"nkqbhsyrq\",\"status\":\"Enabled\"}],\"status\":\"Default\",\"reason\":\"enx\"},{\"name\":\"l\",\"supportedVersionsToUpgrade\":[\"kdk\",\"fmjnnawtqa\",\"pxuckpggq\",\"wey\"],\"supportedFeatures\":[{\"name\":\"lisn\",\"status\":\"Enabled\"},{\"name\":\"qqmpizruwnpqx\",\"status\":\"Disabled\"},{\"name\":\"fcngjsa\",\"status\":\"Enabled\"},{\"name\":\"xtmkzjvkviir\",\"status\":\"Disabled\"}],\"status\":\"Available\",\"reason\":\"sdp\"}],\"supportedFeatures\":[{\"name\":\"zvzbglbyv\",\"status\":\"Disabled\"}],\"fastProvisioningSupported\":\"Enabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"kjzwrgxf\",\"supportedSku\":\"shkwfbkgozxwopd\",\"supportedStorageGb\":1179999545,\"supportedServerVersions\":\"izqaclnapxbiyg\",\"serverCount\":966053961,\"status\":\"Disabled\",\"reason\":\"fsmfcttuxuuyi\"},{\"supportedTier\":\"lq\",\"supportedSku\":\"quvre\",\"supportedStorageGb\":2121197417,\"supportedServerVersions\":\"jhvsujztczyt\",\"serverCount\":178479099,\"status\":\"Visible\",\"reason\":\"uunfprnjletlxsm\"},{\"supportedTier\":\"ddoui\",\"supportedSku\":\"mowaziynknlqwzdv\",\"supportedStorageGb\":39952136,\"supportedServerVersions\":\"xqszdtmaajquh\",\"serverCount\":578758071,\"status\":\"Disabled\",\"reason\":\"vmtygj\"},{\"supportedTier\":\"zyos\",\"supportedSku\":\"p\",\"supportedStorageGb\":26175151,\"supportedServerVersions\":\"fkyjpmspbpssdfpp\",\"serverCount\":386298045,\"status\":\"Available\",\"reason\":\"yujtvczkcnyx\"}],\"geoBackupSupported\":\"Disabled\",\"zoneRedundantHaSupported\":\"Disabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Enabled\",\"storageAutoGrowthSupported\":\"Enabled\",\"onlineResizeSupported\":\"Enabled\",\"restricted\":\"Enabled\",\"status\":\"Visible\",\"reason\":\"xpaglqivbgkc\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PostgreSqlManager manager = PostgreSqlManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.capabilitiesByServers().list("ickpz", "cpopmxel", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("clt", response.iterator().next().name()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityBaseTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityBaseTests.java new file mode 100644 index 000000000000..95ea79ceb249 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityBaseTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityBase; + +public final class CapabilityBaseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapabilityBase model = BinaryData.fromString("{\"status\":\"Disabled\",\"reason\":\"twrupqsxvnm\"}") + .toObject(CapabilityBase.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CapabilityBase model = new CapabilityBase(); + model = BinaryData.fromObject(model).toObject(CapabilityBase.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityInnerTests.java new file mode 100644 index 000000000000..4103f11972d9 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityInnerTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; +import org.junit.jupiter.api.Assertions; + +public final class CapabilityInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapabilityInner model = BinaryData.fromString( + "{\"name\":\"fqpte\",\"supportedServerEditions\":[{\"name\":\"vypyqrimzinpv\",\"defaultSkuName\":\"jdkirsoodqx\",\"supportedStorageEditions\":[{\"name\":\"nohjt\",\"defaultStorageSizeMb\":2935021461506555781,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Disabled\",\"reason\":\"iy\"},{\"name\":\"jxsqwpgrjbz\",\"defaultStorageSizeMb\":6117195169735305207,\"supportedStorageMb\":[{}],\"status\":\"Visible\",\"reason\":\"byxqabn\"}],\"supportedServerSkus\":[{\"name\":\"cyshurzafbljjgp\",\"vCores\":293333183,\"supportedIops\":71717444,\"supportedMemoryPerVcoreMb\":7458924632572162672,\"supportedZones\":[\"a\",\"bqidtqaj\",\"yulpkudjkr\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"pgzgq\",\"status\":\"Visible\",\"reason\":\"ocxscpaierhhbcs\"}],\"status\":\"Default\",\"reason\":\"majtjaod\"},{\"name\":\"bnbdxkqpxokajion\",\"defaultSkuName\":\"mexgstxgcp\",\"supportedStorageEditions\":[{\"name\":\"aajrm\",\"defaultStorageSizeMb\":5608732709320879366,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Disabled\",\"reason\":\"mcl\"},{\"name\":\"ijcoejctb\",\"defaultStorageSizeMb\":4652283960591475965,\"supportedStorageMb\":[{},{}],\"status\":\"Available\",\"reason\":\"kbfkg\"}],\"supportedServerSkus\":[{\"name\":\"exxppofmxaxcfjp\",\"vCores\":1240813814,\"supportedIops\":1410609059,\"supportedMemoryPerVcoreMb\":8556120198731757598,\"supportedZones\":[\"vpmouexhdzxib\",\"eojnxqbzvddn\"],\"supportedHaMode\":[\"SameZone\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"btwnpzaoqvuhrhcf\",\"status\":\"Visible\",\"reason\":\"dglmjthjqkwp\"},{\"name\":\"icxm\",\"vCores\":1686193188,\"supportedIops\":102046613,\"supportedMemoryPerVcoreMb\":3455031391724056303,\"supportedZones\":[\"xuigdtopbobj\",\"ghmewuam\",\"uhrzayvvt\",\"gvdfgiotkftutq\"],\"supportedHaMode\":[\"SameZone\",\"SameZone\",\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{}],\"securityProfile\":\"gnxkrxdqmidtth\",\"status\":\"Available\",\"reason\":\"drabhjybige\"},{\"name\":\"qfbow\",\"vCores\":1200482188,\"supportedIops\":974943815,\"supportedMemoryPerVcoreMb\":6101929070226653978,\"supportedZones\":[\"u\",\"y\",\"gqywgndrv\"],\"supportedHaMode\":[\"SameZone\",\"SameZone\",\"SameZone\",\"SameZone\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"gyncocpecfvmmc\",\"status\":\"Disabled\",\"reason\":\"xlzevgbmqjqabcy\"}],\"status\":\"Disabled\",\"reason\":\"kwlzuvccfwnfn\"},{\"name\":\"cfionl\",\"defaultSkuName\":\"x\",\"supportedStorageEditions\":[{\"name\":\"tzxdpnqbqqwx\",\"defaultStorageSizeMb\":83601086548866102,\"supportedStorageMb\":[{},{}],\"status\":\"Default\",\"reason\":\"sub\"}],\"supportedServerSkus\":[{\"name\":\"ampmngnz\",\"vCores\":1460212605,\"supportedIops\":431293436,\"supportedMemoryPerVcoreMb\":4377641915122156936,\"supportedZones\":[\"cbonqvpk\",\"lrxnjeaseiphe\",\"f\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"nj\",\"status\":\"Default\",\"reason\":\"tgrhpdjpjumas\"},{\"name\":\"zj\",\"vCores\":1063088657,\"supportedIops\":973371108,\"supportedMemoryPerVcoreMb\":5443053800820392121,\"supportedZones\":[\"xxhejjzzvd\"],\"supportedHaMode\":[\"SameZone\",\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"otwmcyn\",\"status\":\"Disabled\",\"reason\":\"jnpg\"}],\"status\":\"Disabled\",\"reason\":\"adehxnltyfsopp\"},{\"name\":\"uesnzwdejbavo\",\"defaultSkuName\":\"zdmohctbqvu\",\"supportedStorageEditions\":[{\"name\":\"ndnvo\",\"defaultStorageSizeMb\":4292877192766299113,\"supportedStorageMb\":[{}],\"status\":\"Default\",\"reason\":\"kcglhslaz\"}],\"supportedServerSkus\":[{\"name\":\"gdtjixhbkuofqwey\",\"vCores\":1047075786,\"supportedIops\":31402912,\"supportedMemoryPerVcoreMb\":7006208031114197055,\"supportedZones\":[\"xfw\",\"ybcibvyvdcsit\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"ctehfiqscjey\",\"status\":\"Available\",\"reason\":\"zrkgqhcjrefovg\"},{\"name\":\"qsl\",\"vCores\":1641560645,\"supportedIops\":1069395538,\"supportedMemoryPerVcoreMb\":7599917226673683957,\"supportedZones\":[\"cattpngjcrcczsq\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{}],\"securityProfile\":\"ysou\",\"status\":\"Visible\",\"reason\":\"a\"},{\"name\":\"ae\",\"vCores\":1901274446,\"supportedIops\":1111397810,\"supportedMemoryPerVcoreMb\":9024707891893513418,\"supportedZones\":[\"mopjmc\",\"atuokthfuiu\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"odpuozmyzydag\",\"status\":\"Default\",\"reason\":\"bezy\"}],\"status\":\"Default\",\"reason\":\"ktwh\"}],\"supportedServerVersions\":[{\"name\":\"zywqsmbsu\",\"supportedVersionsToUpgrade\":[\"imoryocfsfksym\"],\"supportedFeatures\":[{\"name\":\"tki\",\"status\":\"Disabled\"}],\"status\":\"Visible\",\"reason\":\"udxorrqn\"}],\"supportedFeatures\":[{\"name\":\"zvyifqrvkdvj\",\"status\":\"Enabled\"},{\"name\":\"mvvd\",\"status\":\"Enabled\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"ulexxbczwtr\",\"supportedSku\":\"iqzbq\",\"supportedStorageGb\":1378529430,\"supportedServerVersions\":\"vmyokacspkwl\",\"serverCount\":1196709774,\"status\":\"Available\",\"reason\":\"xjmflbvv\"}],\"geoBackupSupported\":\"Enabled\",\"zoneRedundantHaSupported\":\"Disabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Disabled\",\"storageAutoGrowthSupported\":\"Disabled\",\"onlineResizeSupported\":\"Disabled\",\"restricted\":\"Disabled\",\"status\":\"Visible\",\"reason\":\"rsa\"}") + .toObject(CapabilityInner.class); + Assertions.assertEquals("fqpte", model.name()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CapabilityInner model = new CapabilityInner().withName("fqpte"); + model = BinaryData.fromObject(model).toObject(CapabilityInner.class); + Assertions.assertEquals("fqpte", model.name()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityListTests.java new file mode 100644 index 000000000000..07d2729a2717 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityListTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityList; +import org.junit.jupiter.api.Assertions; + +public final class CapabilityListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapabilityList model = BinaryData.fromString( + "{\"value\":[{\"name\":\"wzo\",\"supportedServerEditions\":[{\"name\":\"felluwfzitonpe\",\"defaultSkuName\":\"pjkjlxofpdv\",\"supportedStorageEditions\":[{},{},{},{}],\"supportedServerSkus\":[{},{},{},{}],\"status\":\"Visible\",\"reason\":\"ninmayhuyb\"}],\"supportedServerVersions\":[{\"name\":\"depoog\",\"supportedVersionsToUpgrade\":[\"vamih\",\"ognarxzxtheotus\",\"vyevcciqi\",\"nhungbw\"],\"supportedFeatures\":[{},{},{}],\"status\":\"Disabled\",\"reason\":\"gxg\"},{\"name\":\"pemvtzfkufubljof\",\"supportedVersionsToUpgrade\":[\"ofjaeqjhqjb\",\"s\",\"msmjqulngsntn\"],\"supportedFeatures\":[{},{},{}],\"status\":\"Available\",\"reason\":\"cwrwclxxwrljdous\"}],\"supportedFeatures\":[{\"name\":\"kocrcjdkwtnhx\",\"status\":\"Disabled\"},{\"name\":\"iksqr\",\"status\":\"Disabled\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"p\",\"supportedSku\":\"nzl\",\"supportedStorageGb\":1104675227,\"supportedServerVersions\":\"ppeebvmgxsab\",\"serverCount\":1248526317,\"status\":\"Available\",\"reason\":\"jitcjczdzevn\"},{\"supportedTier\":\"krwpdap\",\"supportedSku\":\"sbdkvwr\",\"supportedStorageGb\":1914162243,\"supportedServerVersions\":\"usnhutje\",\"serverCount\":1438650135,\"status\":\"Disabled\",\"reason\":\"hugjzzdatqxhoc\"},{\"supportedTier\":\"eablg\",\"supportedSku\":\"uticndvkaozwyif\",\"supportedStorageGb\":655079148,\"supportedServerVersions\":\"hurokftyxoln\",\"serverCount\":1438714337,\"status\":\"Available\",\"reason\":\"kjfkg\"},{\"supportedTier\":\"w\",\"supportedSku\":\"lryplwckbasyy\",\"supportedStorageGb\":893627335,\"supportedServerVersions\":\"hsgcbacphejkot\",\"serverCount\":2116203102,\"status\":\"Default\",\"reason\":\"l\"}],\"geoBackupSupported\":\"Disabled\",\"zoneRedundantHaSupported\":\"Enabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Disabled\",\"storageAutoGrowthSupported\":\"Disabled\",\"onlineResizeSupported\":\"Enabled\",\"restricted\":\"Enabled\",\"status\":\"Available\",\"reason\":\"adgakeqsrxybz\"},{\"name\":\"e\",\"supportedServerEditions\":[{\"name\":\"bciqfouflm\",\"defaultSkuName\":\"kzsmodm\",\"supportedStorageEditions\":[{},{}],\"supportedServerSkus\":[{},{},{}],\"status\":\"Visible\",\"reason\":\"wtmutduq\"}],\"supportedServerVersions\":[{\"name\":\"spwgcuertumkdosv\",\"supportedVersionsToUpgrade\":[\"bmdg\",\"bjf\",\"dgmb\"],\"supportedFeatures\":[{}],\"status\":\"Default\",\"reason\":\"bhtqqrolfpfpsa\"}],\"supportedFeatures\":[{\"name\":\"uxig\",\"status\":\"Disabled\"},{\"name\":\"zjaoyfhrtxil\",\"status\":\"Enabled\"}],\"fastProvisioningSupported\":\"Enabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"vlejuvfqa\",\"supportedSku\":\"lyxwjkcprbnwbx\",\"supportedStorageGb\":590807378,\"supportedServerVersions\":\"bvpyss\",\"serverCount\":881911115,\"status\":\"Visible\",\"reason\":\"qguhmuo\"},{\"supportedTier\":\"f\",\"supportedSku\":\"wzwbnguitn\",\"supportedStorageGb\":1661646001,\"supportedServerVersions\":\"gazxuf\",\"serverCount\":1325323583,\"status\":\"Visible\",\"reason\":\"fihrfi\"},{\"supportedTier\":\"vzwdzuhtymwis\",\"supportedSku\":\"fthwxmnteiwa\",\"supportedStorageGb\":1147717382,\"supportedServerVersions\":\"mijcmmxdcufufs\",\"serverCount\":1460749034,\"status\":\"Disabled\",\"reason\":\"dnsezcxtbzs\"}],\"geoBackupSupported\":\"Enabled\",\"zoneRedundantHaSupported\":\"Enabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Disabled\",\"storageAutoGrowthSupported\":\"Disabled\",\"onlineResizeSupported\":\"Disabled\",\"restricted\":\"Enabled\",\"status\":\"Disabled\",\"reason\":\"ac\"}],\"nextLink\":\"oosflnr\"}") + .toObject(CapabilityList.class); + Assertions.assertEquals("oosflnr", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CapabilityList model = new CapabilityList().withNextLink("oosflnr"); + model = BinaryData.fromObject(model).toObject(CapabilityList.class); + Assertions.assertEquals("oosflnr", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogInnerTests.java new file mode 100644 index 000000000000..6b7ceff8fb4f --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogInnerTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class CapturedLogInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapturedLogInner model = BinaryData.fromString( + "{\"properties\":{\"createdTime\":\"2021-03-18T11:55:12Z\",\"lastModifiedTime\":\"2021-03-31T11:05:30Z\",\"sizeInKb\":2907518339137583712,\"type\":\"vmeueci\",\"url\":\"hzceuojgjrwjue\"},\"id\":\"twm\",\"name\":\"dytdxwitx\",\"type\":\"rjaw\"}") + .toObject(CapturedLogInner.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-18T11:55:12Z"), model.createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-31T11:05:30Z"), model.lastModifiedTime()); + Assertions.assertEquals(2907518339137583712L, model.sizeInKb()); + Assertions.assertEquals("vmeueci", model.typePropertiesType()); + Assertions.assertEquals("hzceuojgjrwjue", model.url()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CapturedLogInner model = new CapturedLogInner().withCreatedTime(OffsetDateTime.parse("2021-03-18T11:55:12Z")) + .withLastModifiedTime(OffsetDateTime.parse("2021-03-31T11:05:30Z")) + .withSizeInKb(2907518339137583712L) + .withTypePropertiesType("vmeueci") + .withUrl("hzceuojgjrwjue"); + model = BinaryData.fromObject(model).toObject(CapturedLogInner.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-18T11:55:12Z"), model.createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-31T11:05:30Z"), model.lastModifiedTime()); + Assertions.assertEquals(2907518339137583712L, model.sizeInKb()); + Assertions.assertEquals("vmeueci", model.typePropertiesType()); + Assertions.assertEquals("hzceuojgjrwjue", model.url()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogListTests.java new file mode 100644 index 000000000000..4748924b9ec9 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogListTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapturedLogList; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class CapturedLogListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapturedLogList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"createdTime\":\"2021-06-09T13:42:27Z\",\"lastModifiedTime\":\"2021-10-13T05:34:59Z\",\"sizeInKb\":8070378860350059324,\"type\":\"lf\",\"url\":\"sgwbnbbeld\"},\"id\":\"k\",\"name\":\"baliourqhakauha\",\"type\":\"hsfwxosowzxcug\"}],\"nextLink\":\"jooxdjebw\"}") + .toObject(CapturedLogList.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T13:42:27Z"), model.value().get(0).createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T05:34:59Z"), model.value().get(0).lastModifiedTime()); + Assertions.assertEquals(8070378860350059324L, model.value().get(0).sizeInKb()); + Assertions.assertEquals("lf", model.value().get(0).typePropertiesType()); + Assertions.assertEquals("sgwbnbbeld", model.value().get(0).url()); + Assertions.assertEquals("jooxdjebw", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CapturedLogList model = new CapturedLogList().withValue( + Arrays.asList(new CapturedLogInner().withCreatedTime(OffsetDateTime.parse("2021-06-09T13:42:27Z")) + .withLastModifiedTime(OffsetDateTime.parse("2021-10-13T05:34:59Z")) + .withSizeInKb(8070378860350059324L) + .withTypePropertiesType("lf") + .withUrl("sgwbnbbeld"))) + .withNextLink("jooxdjebw"); + model = BinaryData.fromObject(model).toObject(CapturedLogList.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T13:42:27Z"), model.value().get(0).createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T05:34:59Z"), model.value().get(0).lastModifiedTime()); + Assertions.assertEquals(8070378860350059324L, model.value().get(0).sizeInKb()); + Assertions.assertEquals("lf", model.value().get(0).typePropertiesType()); + Assertions.assertEquals("sgwbnbbeld", model.value().get(0).url()); + Assertions.assertEquals("jooxdjebw", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogPropertiesTests.java new file mode 100644 index 000000000000..9308f71d5eae --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogPropertiesTests.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.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogProperties; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class CapturedLogPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapturedLogProperties model = BinaryData.fromString( + "{\"createdTime\":\"2021-05-13T06:47:58Z\",\"lastModifiedTime\":\"2021-10-18T22:59:22Z\",\"sizeInKb\":1588366635739120038,\"type\":\"kxfbkpycgklwndn\",\"url\":\"dauwhvylwzbtd\"}") + .toObject(CapturedLogProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-13T06:47:58Z"), model.createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T22:59:22Z"), model.lastModifiedTime()); + Assertions.assertEquals(1588366635739120038L, model.sizeInKb()); + Assertions.assertEquals("kxfbkpycgklwndn", model.type()); + Assertions.assertEquals("dauwhvylwzbtd", model.url()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CapturedLogProperties model + = new CapturedLogProperties().withCreatedTime(OffsetDateTime.parse("2021-05-13T06:47:58Z")) + .withLastModifiedTime(OffsetDateTime.parse("2021-10-18T22:59:22Z")) + .withSizeInKb(1588366635739120038L) + .withType("kxfbkpycgklwndn") + .withUrl("dauwhvylwzbtd"); + model = BinaryData.fromObject(model).toObject(CapturedLogProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-13T06:47:58Z"), model.createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T22:59:22Z"), model.lastModifiedTime()); + Assertions.assertEquals(1588366635739120038L, model.sizeInKb()); + Assertions.assertEquals("kxfbkpycgklwndn", model.type()); + Assertions.assertEquals("dauwhvylwzbtd", model.url()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LogFilesListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerMockTests.java similarity index 63% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LogFilesListByServerMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerMockTests.java index d7aec15fd9f7..c813b1519ac6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LogFilesListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerMockTests.java @@ -11,18 +11,18 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogFile; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapturedLog; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class LogFilesListByServerMockTests { +public final class CapturedLogsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"createdTime\":\"2021-04-22T23:18:02Z\",\"lastModifiedTime\":\"2021-03-11T16:19:04Z\",\"sizeInKb\":8880020840563284611,\"type\":\"rblmli\",\"url\":\"xihspnxwq\"},\"id\":\"nepzwakls\",\"name\":\"sbq\",\"type\":\"qagwwrxaomz\"}]}"; + = "{\"value\":[{\"properties\":{\"createdTime\":\"2021-09-15T09:21:05Z\",\"lastModifiedTime\":\"2021-08-22T03:52:29Z\",\"sizeInKb\":6217391043756366085,\"type\":\"dibgqjxgpnrhgov\",\"url\":\"pikqmh\"},\"id\":\"owjrmzvuporqz\",\"name\":\"fuyd\",\"type\":\"vkfvxcnqmxqpswok\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testListByServer() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.logFiles().listByServer("bpizxqltgr", "ogypxrxvbfihwu", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.capturedLogs().listByServer("khpzvuqdflv", "niypfpubcpzg", com.azure.core.util.Context.NONE); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-22T23:18:02Z"), response.iterator().next().createdTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-11T16:19:04Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-15T09:21:05Z"), response.iterator().next().createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-22T03:52:29Z"), response.iterator().next().lastModifiedTime()); - Assertions.assertEquals(8880020840563284611L, response.iterator().next().sizeInKb()); - Assertions.assertEquals("rblmli", response.iterator().next().typePropertiesType()); - Assertions.assertEquals("xihspnxwq", response.iterator().next().url()); + Assertions.assertEquals(6217391043756366085L, response.iterator().next().sizeInKb()); + Assertions.assertEquals("dibgqjxgpnrhgov", response.iterator().next().typePropertiesType()); + Assertions.assertEquals("pikqmh", response.iterator().next().url()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityRequestTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityRequestTests.java new file mode 100644 index 000000000000..864595646b72 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityRequestTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; +import org.junit.jupiter.api.Assertions; + +public final class CheckNameAvailabilityRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CheckNameAvailabilityRequest model = BinaryData.fromString("{\"name\":\"flsjc\",\"type\":\"szfjvfbgofelja\"}") + .toObject(CheckNameAvailabilityRequest.class); + Assertions.assertEquals("flsjc", model.name()); + Assertions.assertEquals("szfjvfbgofelja", model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CheckNameAvailabilityRequest model + = new CheckNameAvailabilityRequest().withName("flsjc").withType("szfjvfbgofelja"); + model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); + Assertions.assertEquals("flsjc", model.name()); + Assertions.assertEquals("szfjvfbgofelja", model.type()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityResponseTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityResponseTests.java new file mode 100644 index 000000000000..f9e0ae10780a --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityResponseTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityReason; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityResponse; +import org.junit.jupiter.api.Assertions; + +public final class CheckNameAvailabilityResponseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CheckNameAvailabilityResponse model + = BinaryData.fromString("{\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"hftqsxhqxujxukn\"}") + .toObject(CheckNameAvailabilityResponse.class); + Assertions.assertTrue(model.nameAvailable()); + Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); + Assertions.assertEquals("hftqsxhqxujxukn", model.message()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CheckNameAvailabilityResponse model = new CheckNameAvailabilityResponse().withNameAvailable(true) + .withReason(CheckNameAvailabilityReason.INVALID) + .withMessage("hftqsxhqxujxukn"); + model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponse.class); + Assertions.assertTrue(model.nameAvailable()); + Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); + Assertions.assertEquals("hftqsxhqxujxukn", model.message()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ClusterTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ClusterTests.java new file mode 100644 index 000000000000..756d30a3439a --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ClusterTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Cluster; +import org.junit.jupiter.api.Assertions; + +public final class ClusterTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Cluster model = BinaryData.fromString("{\"clusterSize\":179532208,\"defaultDatabaseName\":\"tg\"}") + .toObject(Cluster.class); + Assertions.assertEquals(179532208, model.clusterSize()); + Assertions.assertEquals("tg", model.defaultDatabaseName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Cluster model = new Cluster().withClusterSize(179532208).withDefaultDatabaseName("tg"); + model = BinaryData.fromObject(model).toObject(Cluster.class); + Assertions.assertEquals(179532208, model.clusterSize()); + Assertions.assertEquals("tg", model.defaultDatabaseName()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationForUpdateTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationForUpdateTests.java new file mode 100644 index 000000000000..1f2aa4ffc550 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationForUpdateTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationForUpdate; +import org.junit.jupiter.api.Assertions; + +public final class ConfigurationForUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConfigurationForUpdate model = BinaryData.fromString( + "{\"properties\":{\"value\":\"bkdmo\",\"description\":\"postmgrcfbunrm\",\"defaultValue\":\"jhhkxbp\",\"dataType\":\"Numeric\",\"allowedValues\":\"jhxxjyn\",\"source\":\"divkrt\",\"isDynamicConfig\":false,\"isReadOnly\":false,\"isConfigPendingRestart\":true,\"unit\":\"zjf\",\"documentationLink\":\"vjfdx\"}}") + .toObject(ConfigurationForUpdate.class); + Assertions.assertEquals("bkdmo", model.value()); + Assertions.assertEquals("divkrt", model.source()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConfigurationForUpdate model = new ConfigurationForUpdate().withValue("bkdmo").withSource("divkrt"); + model = BinaryData.fromObject(model).toObject(ConfigurationForUpdate.class); + Assertions.assertEquals("bkdmo", model.value()); + Assertions.assertEquals("divkrt", model.source()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationInnerTests.java new file mode 100644 index 000000000000..f1cc0d2ee767 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationInnerTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationInner; +import org.junit.jupiter.api.Assertions; + +public final class ConfigurationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConfigurationInner model = BinaryData.fromString( + "{\"properties\":{\"value\":\"yofd\",\"description\":\"uusdttouwa\",\"defaultValue\":\"ekqvkeln\",\"dataType\":\"Boolean\",\"allowedValues\":\"xwyjsflhhc\",\"source\":\"lnjixisxya\",\"isDynamicConfig\":true,\"isReadOnly\":false,\"isConfigPendingRestart\":false,\"unit\":\"lyjpk\",\"documentationLink\":\"dzyexznelixh\"},\"id\":\"ztfolhbnxk\",\"name\":\"alaulppggdtpnapn\",\"type\":\"iropuhpigvpgylg\"}") + .toObject(ConfigurationInner.class); + Assertions.assertEquals("yofd", model.value()); + Assertions.assertEquals("lnjixisxya", model.source()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConfigurationInner model = new ConfigurationInner().withValue("yofd").withSource("lnjixisxya"); + model = BinaryData.fromObject(model).toObject(ConfigurationInner.class); + Assertions.assertEquals("yofd", model.value()); + Assertions.assertEquals("lnjixisxya", model.source()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationListTests.java new file mode 100644 index 000000000000..f4ccd2964d20 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationListTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ConfigurationListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConfigurationList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"value\":\"nbmpowuwprzq\",\"description\":\"eualupjmkhf\",\"defaultValue\":\"bbcswsrtjri\",\"dataType\":\"Enumeration\",\"allowedValues\":\"pbewtghfgblcgwx\",\"source\":\"lvqhjkbegibtnmx\",\"isDynamicConfig\":false,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"ayqcgw\",\"documentationLink\":\"zjuzgwyz\"},\"id\":\"txon\",\"name\":\"mtsavjcbpwxqp\",\"type\":\"rknftguvriuhprwm\"},{\"properties\":{\"value\":\"xqtayriwwro\",\"description\":\"bexrmcq\",\"defaultValue\":\"ycnojvknmefqsg\",\"dataType\":\"Enumeration\",\"allowedValues\":\"apj\",\"source\":\"hpvgqz\",\"isDynamicConfig\":true,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"lmwlxkvugfhzo\",\"documentationLink\":\"wjvzunluthnn\"},\"id\":\"nxipeil\",\"name\":\"jzuaejxdultskzbb\",\"type\":\"dzumveekg\"}],\"nextLink\":\"ozuhkfp\"}") + .toObject(ConfigurationList.class); + Assertions.assertEquals("nbmpowuwprzq", model.value().get(0).value()); + Assertions.assertEquals("lvqhjkbegibtnmx", model.value().get(0).source()); + Assertions.assertEquals("ozuhkfp", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConfigurationList model + = new ConfigurationList() + .withValue( + Arrays.asList(new ConfigurationInner().withValue("nbmpowuwprzq").withSource("lvqhjkbegibtnmx"), + new ConfigurationInner().withValue("xqtayriwwro").withSource("hpvgqz"))) + .withNextLink("ozuhkfp"); + model = BinaryData.fromObject(model).toObject(ConfigurationList.class); + Assertions.assertEquals("nbmpowuwprzq", model.value().get(0).value()); + Assertions.assertEquals("lvqhjkbegibtnmx", model.value().get(0).source()); + Assertions.assertEquals("ozuhkfp", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationPropertiesTests.java new file mode 100644 index 000000000000..4062e6f0eb1a --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationPropertiesTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationProperties; +import org.junit.jupiter.api.Assertions; + +public final class ConfigurationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConfigurationProperties model = BinaryData.fromString( + "{\"value\":\"itxmedjvcslynqww\",\"description\":\"wzz\",\"defaultValue\":\"gktrmgucnapkte\",\"dataType\":\"String\",\"allowedValues\":\"wptfdy\",\"source\":\"fqbuaceopzf\",\"isDynamicConfig\":false,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"ppcqeqxolz\",\"documentationLink\":\"hzxct\"}") + .toObject(ConfigurationProperties.class); + Assertions.assertEquals("itxmedjvcslynqww", model.value()); + Assertions.assertEquals("fqbuaceopzf", model.source()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConfigurationProperties model + = new ConfigurationProperties().withValue("itxmedjvcslynqww").withSource("fqbuaceopzf"); + model = BinaryData.fromObject(model).toObject(ConfigurationProperties.class); + Assertions.assertEquals("itxmedjvcslynqww", model.value()); + Assertions.assertEquals("fqbuaceopzf", model.source()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.java index c877fdfc29e9..93973b986ee3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class ConfigurationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"value\":\"hgfgrwsd\",\"description\":\"ra\",\"defaultValue\":\"vzbglbyvi\",\"dataType\":\"Enumeration\",\"allowedValues\":\"brxkjzwr\",\"source\":\"ffm\",\"isDynamicConfig\":false,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"ozxwopd\",\"documentationLink\":\"dpizq\"},\"id\":\"lnapxbiygn\",\"name\":\"gjkn\",\"type\":\"smfcttuxuuyilfl\"}"; + = "{\"properties\":{\"value\":\"xnjmxm\",\"description\":\"qudtcvclx\",\"defaultValue\":\"pdkvg\",\"dataType\":\"Integer\",\"allowedValues\":\"iyji\",\"source\":\"zphdugneiknp\",\"isDynamicConfig\":false,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"hibtozipqwjedmur\",\"documentationLink\":\"x\"},\"id\":\"wpktvqylkmqpzoyh\",\"name\":\"fbcgwgcloxoebqin\",\"type\":\"ipnwj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Configuration response = manager.configurations() - .getWithResponse("uwnpqxpxiwfcng", "saasiixtmkzj", "kv", com.azure.core.util.Context.NONE) + .getWithResponse("mribiat", "gplucfotangcfhny", "zcugswvxwlmzqw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hgfgrwsd", response.value()); - Assertions.assertEquals("ffm", response.source()); + Assertions.assertEquals("xnjmxm", response.value()); + Assertions.assertEquals("zphdugneiknp", response.source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerMockTests.java index c6b3189f960f..c628683cf3ad 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerMockTests.java @@ -22,7 +22,7 @@ public final class ConfigurationsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"value\":\"ouwtl\",\"description\":\"jyuojqtobaxkjeyt\",\"defaultValue\":\"lbfjkwr\",\"dataType\":\"Integer\",\"allowedValues\":\"qbhsyrq\",\"source\":\"jqhden\",\"isDynamicConfig\":false,\"isReadOnly\":false,\"isConfigPendingRestart\":true,\"unit\":\"d\",\"documentationLink\":\"fmjnnawtqa\"},\"id\":\"xuckpggqoweyir\",\"name\":\"hlisngw\",\"type\":\"lqqmpiz\"}]}"; + = "{\"value\":[{\"properties\":{\"value\":\"wtglxx\",\"description\":\"jfpgpicrmn\",\"defaultValue\":\"rgmqgjs\",\"dataType\":\"Enumeration\",\"allowedValues\":\"cbfrm\",\"source\":\"dths\",\"isDynamicConfig\":true,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"a\",\"documentationLink\":\"lacjfrnxo\"},\"id\":\"xauzlwvsgmwohqfz\",\"name\":\"zvuxm\",\"type\":\"kjsvthnwpzteko\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.configurations().listByServer("nbmhyree", "dzqavbpdqmjxlyyz", com.azure.core.util.Context.NONE); + = manager.configurations().listByServer("vkhlggdhbemz", "kzsz", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ouwtl", response.iterator().next().value()); - Assertions.assertEquals("jqhden", response.iterator().next().source()); + Assertions.assertEquals("wtglxx", response.iterator().next().value()); + Assertions.assertEquals("dths", response.iterator().next().source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutMockTests.java index 6d8a91cdd28a..634537854366 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutMockTests.java @@ -21,7 +21,7 @@ public final class ConfigurationsPutMockTests { @Test public void testPut() throws Exception { String responseStr - = "{\"properties\":{\"value\":\"bgkc\",\"description\":\"hpzvuqdflvoniyp\",\"defaultValue\":\"ubcpzgpxti\",\"dataType\":\"Boolean\",\"allowedValues\":\"nidibgqjxg\",\"source\":\"r\",\"isDynamicConfig\":false,\"isReadOnly\":false,\"isConfigPendingRestart\":false,\"unit\":\"kqmhhaowjr\",\"documentationLink\":\"vuporqzdfuydzv\"},\"id\":\"vxcnqmxqps\",\"name\":\"okmvkhlggd\",\"type\":\"bemzqkzszuwi\"}"; + = "{\"properties\":{\"value\":\"rngbtcjuahokqtob\",\"description\":\"uxofshfphwpnulai\",\"defaultValue\":\"zejywhslw\",\"dataType\":\"Integer\",\"allowedValues\":\"llndnpd\",\"source\":\"pqafgfugsnnfhy\",\"isDynamicConfig\":false,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"octfjgtixrjvzuyt\",\"documentationLink\":\"mlmuowol\"},\"id\":\"uir\",\"name\":\"p\",\"type\":\"ons\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testPut() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Configuration response = manager.configurations() - .define("w") - .withExistingFlexibleServer("oiquvrehmrnjhvs", "jztczytqj") - .withValue("unfprnjletlxs") - .withSource("mzyospspshck") + .define("kkholvdndvia") + .withExistingFlexibleServer("ujqlafcbahh", "zpofoiyjwpfilk") + .withValue("phuartv") + .withSource("snewmozqvbub") .create(); - Assertions.assertEquals("bgkc", response.value()); - Assertions.assertEquals("r", response.source()); + Assertions.assertEquals("rngbtcjuahokqtob", response.value()); + Assertions.assertEquals("pqafgfugsnnfhy", response.source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseInnerTests.java new file mode 100644 index 000000000000..39d3709c0e1b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseInnerTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.DatabaseInner; +import org.junit.jupiter.api.Assertions; + +public final class DatabaseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DatabaseInner model = BinaryData.fromString( + "{\"properties\":{\"charset\":\"e\",\"collation\":\"t\"},\"id\":\"aqtdoqmcbx\",\"name\":\"wvxysl\",\"type\":\"bhsfxob\"}") + .toObject(DatabaseInner.class); + Assertions.assertEquals("e", model.charset()); + Assertions.assertEquals("t", model.collation()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DatabaseInner model = new DatabaseInner().withCharset("e").withCollation("t"); + model = BinaryData.fromObject(model).toObject(DatabaseInner.class); + Assertions.assertEquals("e", model.charset()); + Assertions.assertEquals("t", model.collation()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseListTests.java new file mode 100644 index 000000000000..36681967bf75 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseListTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.DatabaseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DatabaseList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DatabaseListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DatabaseList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"charset\":\"ohxcrsbfova\",\"collation\":\"ruvw\"},\"id\":\"sqfsubcgjbirxb\",\"name\":\"ybsrfbjfdtwss\",\"type\":\"t\"},{\"properties\":{\"charset\":\"vjz\",\"collation\":\"xilzznf\"},\"id\":\"nvwpmqtaruouj\",\"name\":\"kcjhwqytjrybnwj\",\"type\":\"wgdrjervnaenqp\"},{\"properties\":{\"charset\":\"ndoygmifthnzdnd\",\"collation\":\"gnayqigynduh\"},\"id\":\"hqlkthumaqo\",\"name\":\"bgycduiertgccym\",\"type\":\"aolps\"},{\"properties\":{\"charset\":\"lfmmdnbbglzpswi\",\"collation\":\"mcwyhzdxssadb\"},\"id\":\"nvdfznuda\",\"name\":\"dvxzbncblylpst\",\"type\":\"bhhxsrzdzuc\"}],\"nextLink\":\"scdntnevf\"}") + .toObject(DatabaseList.class); + Assertions.assertEquals("ohxcrsbfova", model.value().get(0).charset()); + Assertions.assertEquals("ruvw", model.value().get(0).collation()); + Assertions.assertEquals("scdntnevf", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DatabaseList model = new DatabaseList() + .withValue(Arrays.asList(new DatabaseInner().withCharset("ohxcrsbfova").withCollation("ruvw"), + new DatabaseInner().withCharset("vjz").withCollation("xilzznf"), + new DatabaseInner().withCharset("ndoygmifthnzdnd").withCollation("gnayqigynduh"), + new DatabaseInner().withCharset("lfmmdnbbglzpswi").withCollation("mcwyhzdxssadb"))) + .withNextLink("scdntnevf"); + model = BinaryData.fromObject(model).toObject(DatabaseList.class); + Assertions.assertEquals("ohxcrsbfova", model.value().get(0).charset()); + Assertions.assertEquals("ruvw", model.value().get(0).collation()); + Assertions.assertEquals("scdntnevf", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseMigrationStateTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseMigrationStateTests.java new file mode 100644 index 000000000000..f0ed5985d27f --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseMigrationStateTests.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DatabaseMigrationState; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationDatabaseState; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class DatabaseMigrationStateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DatabaseMigrationState model = BinaryData.fromString( + "{\"databaseName\":\"obqwcsdbnwdcfh\",\"migrationState\":\"Succeeded\",\"migrationOperation\":\"pfuvglsbjjca\",\"startedOn\":\"2021-05-27T00:53:27Z\",\"endedOn\":\"2021-05-06T23:29:51Z\",\"fullLoadQueuedTables\":152007455,\"fullLoadErroredTables\":596883756,\"fullLoadLoadingTables\":1601872964,\"fullLoadCompletedTables\":1320056895,\"cdcUpdateCounter\":574519404,\"cdcDeleteCounter\":175295404,\"cdcInsertCounter\":1945766703,\"appliedChanges\":1218996877,\"incomingChanges\":1229712399,\"latency\":754766432,\"message\":\"dflvkg\"}") + .toObject(DatabaseMigrationState.class); + Assertions.assertEquals("obqwcsdbnwdcfh", model.databaseName()); + Assertions.assertEquals(MigrationDatabaseState.SUCCEEDED, model.migrationState()); + Assertions.assertEquals("pfuvglsbjjca", model.migrationOperation()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-27T00:53:27Z"), model.startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T23:29:51Z"), model.endedOn()); + Assertions.assertEquals(152007455, model.fullLoadQueuedTables()); + Assertions.assertEquals(596883756, model.fullLoadErroredTables()); + Assertions.assertEquals(1601872964, model.fullLoadLoadingTables()); + Assertions.assertEquals(1320056895, model.fullLoadCompletedTables()); + Assertions.assertEquals(574519404, model.cdcUpdateCounter()); + Assertions.assertEquals(175295404, model.cdcDeleteCounter()); + Assertions.assertEquals(1945766703, model.cdcInsertCounter()); + Assertions.assertEquals(1218996877, model.appliedChanges()); + Assertions.assertEquals(1229712399, model.incomingChanges()); + Assertions.assertEquals(754766432, model.latency()); + Assertions.assertEquals("dflvkg", model.message()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DatabaseMigrationState model = new DatabaseMigrationState().withDatabaseName("obqwcsdbnwdcfh") + .withMigrationState(MigrationDatabaseState.SUCCEEDED) + .withMigrationOperation("pfuvglsbjjca") + .withStartedOn(OffsetDateTime.parse("2021-05-27T00:53:27Z")) + .withEndedOn(OffsetDateTime.parse("2021-05-06T23:29:51Z")) + .withFullLoadQueuedTables(152007455) + .withFullLoadErroredTables(596883756) + .withFullLoadLoadingTables(1601872964) + .withFullLoadCompletedTables(1320056895) + .withCdcUpdateCounter(574519404) + .withCdcDeleteCounter(175295404) + .withCdcInsertCounter(1945766703) + .withAppliedChanges(1218996877) + .withIncomingChanges(1229712399) + .withLatency(754766432) + .withMessage("dflvkg"); + model = BinaryData.fromObject(model).toObject(DatabaseMigrationState.class); + Assertions.assertEquals("obqwcsdbnwdcfh", model.databaseName()); + Assertions.assertEquals(MigrationDatabaseState.SUCCEEDED, model.migrationState()); + Assertions.assertEquals("pfuvglsbjjca", model.migrationOperation()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-27T00:53:27Z"), model.startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T23:29:51Z"), model.endedOn()); + Assertions.assertEquals(152007455, model.fullLoadQueuedTables()); + Assertions.assertEquals(596883756, model.fullLoadErroredTables()); + Assertions.assertEquals(1601872964, model.fullLoadLoadingTables()); + Assertions.assertEquals(1320056895, model.fullLoadCompletedTables()); + Assertions.assertEquals(574519404, model.cdcUpdateCounter()); + Assertions.assertEquals(175295404, model.cdcDeleteCounter()); + Assertions.assertEquals(1945766703, model.cdcInsertCounter()); + Assertions.assertEquals(1218996877, model.appliedChanges()); + Assertions.assertEquals(1229712399, model.incomingChanges()); + Assertions.assertEquals(754766432, model.latency()); + Assertions.assertEquals("dflvkg", model.message()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasePropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasePropertiesTests.java new file mode 100644 index 000000000000..170250a5719d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasePropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.DatabaseProperties; +import org.junit.jupiter.api.Assertions; + +public final class DatabasePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DatabaseProperties model = BinaryData.fromString("{\"charset\":\"tkblmpewww\",\"collation\":\"krvrns\"}") + .toObject(DatabaseProperties.class); + Assertions.assertEquals("tkblmpewww", model.charset()); + Assertions.assertEquals("krvrns", model.collation()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DatabaseProperties model = new DatabaseProperties().withCharset("tkblmpewww").withCollation("krvrns"); + model = BinaryData.fromObject(model).toObject(DatabaseProperties.class); + Assertions.assertEquals("tkblmpewww", model.charset()); + Assertions.assertEquals("krvrns", model.collation()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateMockTests.java index 3c8c884b51e8..93e01c30f16b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateMockTests.java @@ -21,7 +21,7 @@ public final class DatabasesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"charset\":\"nwjfu\",\"collation\":\"lafcbahh\"},\"id\":\"pofoi\",\"name\":\"jwpfilkm\",\"type\":\"kholvd\"}"; + = "{\"properties\":{\"charset\":\"lbnseqac\",\"collation\":\"vpilg\"},\"id\":\"oq\",\"name\":\"agmdit\",\"type\":\"ueio\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Database response = manager.databases() - .define("oxgjiuqhibt") - .withExistingFlexibleServer("dkvgfabuiyjibuzp", "dugneiknp") - .withCharset("pqwjedm") - .withCollation("r") + .define("cnwfepbnwgfmxjg") + .withExistingFlexibleServer("o", "gebx") + .withCharset("jbgdlfgtdysnaquf") + .withCollation("bctqhamzjrwd") .create(); - Assertions.assertEquals("nwjfu", response.charset()); - Assertions.assertEquals("lafcbahh", response.collation()); + Assertions.assertEquals("lbnseqac", response.charset()); + Assertions.assertEquals("vpilg", response.collation()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteMockTests.java deleted file mode 100644 index cc17c89bc865..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DatabasesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.databases().delete("tglxx", "ljfp", "picrmnzhrgmqgjsx", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetWithResponseMockTests.java index baf269a4b70d..a0417baef6f3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class DatabasesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"charset\":\"usx\",\"collation\":\"zlwvsgmwohqfz\"},\"id\":\"vux\",\"name\":\"mk\",\"type\":\"svth\"}"; + = "{\"properties\":{\"charset\":\"ekhenl\",\"collation\":\"fnrdtjxtxr\"},\"id\":\"qtj\",\"name\":\"idttgepus\",\"type\":\"vyjtcvu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Database response = manager.databases() - .getWithResponse("pqcbfrmbodthsq", "gvriibakclac", "fr", com.azure.core.util.Context.NONE) + .getWithResponse("onwpnga", "innixjawrtmjfj", "yccxlzhcox", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("usx", response.charset()); - Assertions.assertEquals("zlwvsgmwohqfz", response.collation()); + Assertions.assertEquals("ekhenl", response.charset()); + Assertions.assertEquals("fnrdtjxtxr", response.collation()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerMockTests.java index ed4b73701b23..0d453e7f1518 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerMockTests.java @@ -22,7 +22,7 @@ public final class DatabasesListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"charset\":\"fhnykzcugs\",\"collation\":\"x\"},\"id\":\"mzqwmvtxnjmxmcu\",\"name\":\"udtc\",\"type\":\"clxyn\"}]}"; + = "{\"value\":[{\"properties\":{\"charset\":\"ygtuhx\",\"collation\":\"cbuewmrswnjlxuz\"},\"id\":\"wpusxjbaqehg\",\"name\":\"dohzjq\",\"type\":\"tu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.databases().listByServer("wpztekovmribia", "tgplucfota", com.azure.core.util.Context.NONE); + = manager.databases().listByServer("kasizie", "fuughtuqfec", com.azure.core.util.Context.NONE); - Assertions.assertEquals("fhnykzcugs", response.iterator().next().charset()); - Assertions.assertEquals("x", response.iterator().next().collation()); + Assertions.assertEquals("ygtuhx", response.iterator().next().charset()); + Assertions.assertEquals("cbuewmrswnjlxuz", response.iterator().next().collation()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbLevelValidationStatusTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbLevelValidationStatusTests.java new file mode 100644 index 000000000000..f4f5ed37e2c4 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbLevelValidationStatusTests.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DbLevelValidationStatus; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationMessage; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationState; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationSummaryItem; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DbLevelValidationStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DbLevelValidationStatus model = BinaryData.fromString( + "{\"databaseName\":\"yuhhziu\",\"startedOn\":\"2021-07-06T04:06:38Z\",\"endedOn\":\"2021-08-01T09:41:30Z\",\"summary\":[{\"type\":\"msmlmzq\",\"state\":\"Failed\",\"messages\":[{\"state\":\"Failed\",\"message\":\"qu\"},{\"state\":\"Succeeded\",\"message\":\"icslfaoq\"}]},{\"type\":\"iyylhalnswhccsp\",\"state\":\"Warning\",\"messages\":[{\"state\":\"Succeeded\",\"message\":\"qscywu\"},{\"state\":\"Succeeded\",\"message\":\"luhczbw\"},{\"state\":\"Succeeded\",\"message\":\"i\"}]},{\"type\":\"brgz\",\"state\":\"Warning\",\"messages\":[{\"state\":\"Succeeded\",\"message\":\"qwdxggicc\"}]},{\"type\":\"xqhuexm\",\"state\":\"Failed\",\"messages\":[{\"state\":\"Failed\",\"message\":\"zywemhzrncsdtclu\"},{\"state\":\"Succeeded\",\"message\":\"bsfgytguslfea\"},{\"state\":\"Succeeded\",\"message\":\"qukyhejhzi\"},{\"state\":\"Succeeded\",\"message\":\"pelol\"}]}]}") + .toObject(DbLevelValidationStatus.class); + Assertions.assertEquals("yuhhziu", model.databaseName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-06T04:06:38Z"), model.startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-01T09:41:30Z"), model.endedOn()); + Assertions.assertEquals("msmlmzq", model.summary().get(0).type()); + Assertions.assertEquals(ValidationState.FAILED, model.summary().get(0).state()); + Assertions.assertEquals(ValidationState.FAILED, model.summary().get(0).messages().get(0).state()); + Assertions.assertEquals("qu", model.summary().get(0).messages().get(0).message()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DbLevelValidationStatus model + = new DbLevelValidationStatus().withDatabaseName("yuhhziu") + .withStartedOn(OffsetDateTime.parse("2021-07-06T04:06:38Z")) + .withEndedOn(OffsetDateTime.parse("2021-08-01T09:41:30Z")) + .withSummary( + Arrays + .asList( + new ValidationSummaryItem().withType("msmlmzq") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList( + new ValidationMessage().withState(ValidationState.FAILED).withMessage("qu"), + new ValidationMessage().withState(ValidationState.SUCCEEDED) + .withMessage("icslfaoq"))), + new ValidationSummaryItem().withType("iyylhalnswhccsp") + .withState(ValidationState.WARNING) + .withMessages(Arrays.asList( + new ValidationMessage().withState(ValidationState.SUCCEEDED).withMessage("qscywu"), + new ValidationMessage().withState(ValidationState.SUCCEEDED) + .withMessage("luhczbw"), + new ValidationMessage().withState(ValidationState.SUCCEEDED).withMessage("i"))), + new ValidationSummaryItem().withType("brgz") + .withState(ValidationState.WARNING) + .withMessages( + Arrays + .asList(new ValidationMessage().withState(ValidationState.SUCCEEDED) + .withMessage("qwdxggicc"))), + new ValidationSummaryItem().withType("xqhuexm") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList( + new ValidationMessage().withState(ValidationState.FAILED) + .withMessage("zywemhzrncsdtclu"), + new ValidationMessage() + .withState(ValidationState.SUCCEEDED) + .withMessage("bsfgytguslfea"), + new ValidationMessage() + .withState(ValidationState.SUCCEEDED) + .withMessage("qukyhejhzi"), + new ValidationMessage().withState(ValidationState.SUCCEEDED) + .withMessage("pelol"))))); + model = BinaryData.fromObject(model).toObject(DbLevelValidationStatus.class); + Assertions.assertEquals("yuhhziu", model.databaseName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-06T04:06:38Z"), model.startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-01T09:41:30Z"), model.endedOn()); + Assertions.assertEquals("msmlmzq", model.summary().get(0).type()); + Assertions.assertEquals(ValidationState.FAILED, model.summary().get(0).state()); + Assertions.assertEquals(ValidationState.FAILED, model.summary().get(0).messages().get(0).state()); + Assertions.assertEquals("qu", model.summary().get(0).messages().get(0).message()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbServerMetadataTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbServerMetadataTests.java new file mode 100644 index 000000000000..29cd27678fe4 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbServerMetadataTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DbServerMetadata; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerSku; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; +import org.junit.jupiter.api.Assertions; + +public final class DbServerMetadataTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DbServerMetadata model = BinaryData.fromString( + "{\"location\":\"vk\",\"version\":\"pqvujzraehtwdwrf\",\"storageMb\":575939452,\"sku\":{\"name\":\"yrcdlbhshfwprac\",\"tier\":\"Burstable\"}}") + .toObject(DbServerMetadata.class); + Assertions.assertEquals("pqvujzraehtwdwrf", model.version()); + Assertions.assertEquals(575939452, model.storageMb()); + Assertions.assertEquals("yrcdlbhshfwprac", model.sku().name()); + Assertions.assertEquals(SkuTier.BURSTABLE, model.sku().tier()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DbServerMetadata model = new DbServerMetadata().withVersion("pqvujzraehtwdwrf") + .withStorageMb(575939452) + .withSku(new ServerSku().withName("yrcdlbhshfwprac").withTier(SkuTier.BURSTABLE)); + model = BinaryData.fromObject(model).toObject(DbServerMetadata.class); + Assertions.assertEquals("pqvujzraehtwdwrf", model.version()); + Assertions.assertEquals(575939452, model.storageMb()); + Assertions.assertEquals("yrcdlbhshfwprac", model.sku().name()); + Assertions.assertEquals(SkuTier.BURSTABLE, model.sku().tier()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DelegatedSubnetUsageTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DelegatedSubnetUsageTests.java new file mode 100644 index 000000000000..555d2e44725b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DelegatedSubnetUsageTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DelegatedSubnetUsage; + +public final class DelegatedSubnetUsageTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DelegatedSubnetUsage model + = BinaryData.fromString("{\"subnetName\":\"brlttymsjnygq\",\"usage\":5868166807959460587}") + .toObject(DelegatedSubnetUsage.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DelegatedSubnetUsage model = new DelegatedSubnetUsage(); + model = BinaryData.fromObject(model).toObject(DelegatedSubnetUsage.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FastProvisioningEditionCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FastProvisioningEditionCapabilityTests.java new file mode 100644 index 000000000000..775232e0dbdb --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FastProvisioningEditionCapabilityTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningEditionCapability; + +public final class FastProvisioningEditionCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FastProvisioningEditionCapability model = BinaryData.fromString( + "{\"supportedTier\":\"eemaofmxagkvtme\",\"supportedSku\":\"qkrhahvljua\",\"supportedStorageGb\":836090349,\"supportedServerVersions\":\"hcdhmdual\",\"serverCount\":115440556,\"status\":\"Default\",\"reason\":\"fadmws\"}") + .toObject(FastProvisioningEditionCapability.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FastProvisioningEditionCapability model = new FastProvisioningEditionCapability(); + model = BinaryData.fromObject(model).toObject(FastProvisioningEditionCapability.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleInnerTests.java new file mode 100644 index 000000000000..571fdc7e4763 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleInnerTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FirewallRuleInner; +import org.junit.jupiter.api.Assertions; + +public final class FirewallRuleInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FirewallRuleInner model = BinaryData.fromString( + "{\"properties\":{\"startIpAddress\":\"wjmy\",\"endIpAddress\":\"tdss\"},\"id\":\"wtmwerio\",\"name\":\"zpyqsemwab\",\"type\":\"ets\"}") + .toObject(FirewallRuleInner.class); + Assertions.assertEquals("wjmy", model.startIpAddress()); + Assertions.assertEquals("tdss", model.endIpAddress()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FirewallRuleInner model = new FirewallRuleInner().withStartIpAddress("wjmy").withEndIpAddress("tdss"); + model = BinaryData.fromObject(model).toObject(FirewallRuleInner.class); + Assertions.assertEquals("wjmy", model.startIpAddress()); + Assertions.assertEquals("tdss", model.endIpAddress()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleListTests.java new file mode 100644 index 000000000000..7795d1274bda --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleListTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FirewallRuleInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.FirewallRuleList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class FirewallRuleListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FirewallRuleList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"startIpAddress\":\"k\",\"endIpAddress\":\"wtppjflcxogaoko\"},\"id\":\"m\",\"name\":\"sikvmkqzeqqkdlt\",\"type\":\"zxmhhvhgu\"}],\"nextLink\":\"odkwobd\"}") + .toObject(FirewallRuleList.class); + Assertions.assertEquals("k", model.value().get(0).startIpAddress()); + Assertions.assertEquals("wtppjflcxogaoko", model.value().get(0).endIpAddress()); + Assertions.assertEquals("odkwobd", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FirewallRuleList model = new FirewallRuleList() + .withValue( + Arrays.asList(new FirewallRuleInner().withStartIpAddress("k").withEndIpAddress("wtppjflcxogaoko"))) + .withNextLink("odkwobd"); + model = BinaryData.fromObject(model).toObject(FirewallRuleList.class); + Assertions.assertEquals("k", model.value().get(0).startIpAddress()); + Assertions.assertEquals("wtppjflcxogaoko", model.value().get(0).endIpAddress()); + Assertions.assertEquals("odkwobd", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulePropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulePropertiesTests.java new file mode 100644 index 000000000000..bc8a3535404b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulePropertiesTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FirewallRuleProperties; +import org.junit.jupiter.api.Assertions; + +public final class FirewallRulePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FirewallRuleProperties model + = BinaryData.fromString("{\"startIpAddress\":\"hszhedplvwiwu\",\"endIpAddress\":\"mwmbes\"}") + .toObject(FirewallRuleProperties.class); + Assertions.assertEquals("hszhedplvwiwu", model.startIpAddress()); + Assertions.assertEquals("mwmbes", model.endIpAddress()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FirewallRuleProperties model + = new FirewallRuleProperties().withStartIpAddress("hszhedplvwiwu").withEndIpAddress("mwmbes"); + model = BinaryData.fromObject(model).toObject(FirewallRuleProperties.class); + Assertions.assertEquals("hszhedplvwiwu", model.startIpAddress()); + Assertions.assertEquals("mwmbes", model.endIpAddress()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateMockTests.java index 2283ce9a8b3c..ea6767a839c9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateMockTests.java @@ -21,7 +21,7 @@ public final class FirewallRulesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"startIpAddress\":\"jxtxrdc\",\"endIpAddress\":\"tjvidt\"},\"id\":\"epu\",\"name\":\"lvyjtcvuwkas\",\"type\":\"zies\"}"; + = "{\"properties\":{\"startIpAddress\":\"nchrszizoyu\",\"endIpAddress\":\"lyetndnbfqygg\"},\"id\":\"flnlgmtr\",\"name\":\"ahzjmucftb\",\"type\":\"r\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FirewallRule response = manager.firewallRules() - .define("rmlmuowo") - .withExistingFlexibleServer("tefypococtfjgti", "rjvzuyt") - .withStartIpAddress("bauiropi") - .withEndIpAddress("nszonwpngaj") + .define("guaucmfdjwnla") + .withExistingFlexibleServer("penuy", "bqeqqekewvnqvcd") + .withStartIpAddress("punj") + .withEndIpAddress("ikczvvitacgxmf") .create(); - Assertions.assertEquals("jxtxrdc", response.startIpAddress()); - Assertions.assertEquals("tjvidt", response.endIpAddress()); + Assertions.assertEquals("nchrszizoyu", response.startIpAddress()); + Assertions.assertEquals("lyetndnbfqygg", response.endIpAddress()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteMockTests.java deleted file mode 100644 index 11e519e7d722..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FirewallRulesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.firewallRules().delete("dviauogp", "uartvti", "kyefchnmnahmnxhk", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetWithResponseMockTests.java index 47f7d4eb28fd..48618e3c3ff6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class FirewallRulesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"startIpAddress\":\"hx\",\"endIpAddress\":\"rsnewmozqvbubqma\"},\"id\":\"sycxhxzgaz\",\"name\":\"taboidvmf\",\"type\":\"hppubowsepdfgkmt\"}"; + = "{\"properties\":{\"startIpAddress\":\"xofvcjk\",\"endIpAddress\":\"dirazf\"},\"id\":\"ejwabmdujtmvco\",\"name\":\"excmjurbuhhl\",\"type\":\"yqltqsro\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FirewallRule response = manager.firewallRules() - .getWithResponse("jqirwrw", "ooxf", "i", com.azure.core.util.Context.NONE) + .getWithResponse("kjbsah", "tdtpdelqacslmo", "oebn", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hx", response.startIpAddress()); - Assertions.assertEquals("rsnewmozqvbubqma", response.endIpAddress()); + Assertions.assertEquals("xofvcjk", response.startIpAddress()); + Assertions.assertEquals("dirazf", response.endIpAddress()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerMockTests.java index 2d66516df0eb..4877dba352c4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerMockTests.java @@ -22,7 +22,7 @@ public final class FirewallRulesListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"startIpAddress\":\"uahokq\",\"endIpAddress\":\"obkauxofsh\"},\"id\":\"hwpnulaiywzejywh\",\"name\":\"lwkojpllndnpdw\",\"type\":\"pqafgfugsnnfhy\"}]}"; + = "{\"value\":[{\"properties\":{\"startIpAddress\":\"fvcl\",\"endIpAddress\":\"lxnfuijtkbusqogs\"},\"id\":\"kayi\",\"name\":\"nsharujtjiqxfzyj\",\"type\":\"ttvwkpqh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.firewallRules().listByServer("herngb", "c", com.azure.core.util.Context.NONE); + = manager.firewallRules().listByServer("tuwkffdj", "tsysi", com.azure.core.util.Context.NONE); - Assertions.assertEquals("uahokq", response.iterator().next().startIpAddress()); - Assertions.assertEquals("obkauxofsh", response.iterator().next().endIpAddress()); + Assertions.assertEquals("fvcl", response.iterator().next().startIpAddress()); + Assertions.assertEquals("lxnfuijtkbusqogs", response.iterator().next().endIpAddress()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityForPatchTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityForPatchTests.java new file mode 100644 index 000000000000..2dd804451484 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityForPatchTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode; +import org.junit.jupiter.api.Assertions; + +public final class HighAvailabilityForPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HighAvailabilityForPatch model = BinaryData + .fromString("{\"mode\":\"SameZone\",\"state\":\"Healthy\",\"standbyAvailabilityZone\":\"fkyrk\"}") + .toObject(HighAvailabilityForPatch.class); + Assertions.assertEquals(HighAvailabilityMode.SAME_ZONE, model.mode()); + Assertions.assertEquals("fkyrk", model.standbyAvailabilityZone()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HighAvailabilityForPatch model = new HighAvailabilityForPatch().withMode(HighAvailabilityMode.SAME_ZONE) + .withStandbyAvailabilityZone("fkyrk"); + model = BinaryData.fromObject(model).toObject(HighAvailabilityForPatch.class); + Assertions.assertEquals(HighAvailabilityMode.SAME_ZONE, model.mode()); + Assertions.assertEquals("fkyrk", model.standbyAvailabilityZone()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityTests.java new file mode 100644 index 000000000000..8aee4f3a7ab7 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode; +import org.junit.jupiter.api.Assertions; + +public final class HighAvailabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HighAvailability model = BinaryData + .fromString( + "{\"mode\":\"ZoneRedundant\",\"state\":\"FailingOver\",\"standbyAvailabilityZone\":\"hgkfmin\"}") + .toObject(HighAvailability.class); + Assertions.assertEquals(HighAvailabilityMode.ZONE_REDUNDANT, model.mode()); + Assertions.assertEquals("hgkfmin", model.standbyAvailabilityZone()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HighAvailability model = new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT) + .withStandbyAvailabilityZone("hgkfmin"); + model = BinaryData.fromObject(model).toObject(HighAvailability.class); + Assertions.assertEquals(HighAvailabilityMode.ZONE_REDUNDANT, model.mode()); + Assertions.assertEquals("hgkfmin", model.standbyAvailabilityZone()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ImpactRecordTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ImpactRecordTests.java new file mode 100644 index 000000000000..ef00c91f2f6d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ImpactRecordTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ImpactRecord; +import org.junit.jupiter.api.Assertions; + +public final class ImpactRecordTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ImpactRecord model = BinaryData.fromString( + "{\"dimensionName\":\"qikfxcv\",\"unit\":\"fsphuagrttikt\",\"queryId\":6566397554835939309,\"absoluteValue\":40.716755209430964}") + .toObject(ImpactRecord.class); + Assertions.assertEquals("qikfxcv", model.dimensionName()); + Assertions.assertEquals("fsphuagrttikt", model.unit()); + Assertions.assertEquals(6566397554835939309L, model.queryId()); + Assertions.assertEquals(40.716755209430964D, model.absoluteValue()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ImpactRecord model = new ImpactRecord().withDimensionName("qikfxcv") + .withUnit("fsphuagrttikt") + .withQueryId(6566397554835939309L) + .withAbsoluteValue(40.716755209430964D); + model = BinaryData.fromObject(model).toObject(ImpactRecord.class); + Assertions.assertEquals("qikfxcv", model.dimensionName()); + Assertions.assertEquals("fsphuagrttikt", model.unit()); + Assertions.assertEquals(6566397554835939309L, model.queryId()); + Assertions.assertEquals(40.716755209430964D, model.absoluteValue()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LocationBasedCapabilitiesExecuteMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LocationBasedCapabilitiesExecuteMockTests.java deleted file mode 100644 index 9389521161db..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LocationBasedCapabilitiesExecuteMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerCapability; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LocationBasedCapabilitiesExecuteMockTests { - @Test - public void testExecute() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"i\",\"supportedServerEditions\":[{\"name\":\"yui\",\"defaultSkuName\":\"bsnmfpph\",\"supportedStorageEditions\":[{\"name\":\"vyhyhsgzfc\",\"defaultStorageSizeMb\":1704315015203532161,\"supportedStorageMb\":[{},{}],\"status\":\"Available\",\"reason\":\"glqgleoh\"}],\"supportedServerSkus\":[{\"name\":\"nlu\",\"vCores\":1087949642,\"supportedIops\":416708927,\"supportedMemoryPerVcoreMb\":8132506550445245383,\"supportedZones\":[\"btijvacvbm\",\"z\",\"qqxlajr\",\"wxacevehj\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"aoqltfaey\",\"status\":\"Visible\",\"reason\":\"fgvxirpghriypoqe\"},{\"name\":\"lqhykprlpyz\",\"vCores\":1860731641,\"supportedIops\":184808617,\"supportedMemoryPerVcoreMb\":987189156165861537,\"supportedZones\":[\"iitdfuxt\",\"asiibmiybnnust\",\"nlj\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"vmqfoud\",\"status\":\"Default\",\"reason\":\"gyyprotwy\"},{\"name\":\"ndm\",\"vCores\":384308231,\"supportedIops\":2095603265,\"supportedMemoryPerVcoreMb\":4812116818794427948,\"supportedZones\":[\"vlgo\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"tzfjltf\",\"status\":\"Available\",\"reason\":\"yj\"}],\"status\":\"Default\",\"reason\":\"vopvp\"},{\"name\":\"bzqgqqi\",\"defaultSkuName\":\"dsvqwt\",\"supportedStorageEditions\":[{\"name\":\"ibcysihsgqc\",\"defaultStorageSizeMb\":5483811337729194379,\"supportedStorageMb\":[{},{}],\"status\":\"Default\",\"reason\":\"cdzsu\"}],\"supportedServerSkus\":[{\"name\":\"dxbzlmcmuap\",\"vCores\":1828890303,\"supportedIops\":311384823,\"supportedMemoryPerVcoreMb\":258255264781262334,\"supportedZones\":[\"xeyskonqzinkfkbg\",\"z\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"SameZone\",\"SameZone\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"mygvkzqkj\",\"status\":\"Available\",\"reason\":\"bzefezr\"},{\"name\":\"czurtlei\",\"vCores\":1316938253,\"supportedIops\":796775151,\"supportedMemoryPerVcoreMb\":1743008436896438735,\"supportedZones\":[\"zvd\",\"bzdixzmq\",\"noda\",\"opqhewjptmc\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"lnd\",\"status\":\"Available\",\"reason\":\"tmzlbiojlv\"},{\"name\":\"rbbpneqvcwwyy\",\"vCores\":1475443279,\"supportedIops\":996816888,\"supportedMemoryPerVcoreMb\":2957311369623929946,\"supportedZones\":[\"rsnm\",\"k\",\"yzejnhlbk\",\"bzpcpiljhahzvec\"],\"supportedHaMode\":[\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"ehol\",\"status\":\"Disabled\",\"reason\":\"iuubwefqsf\"}],\"status\":\"Available\",\"reason\":\"tf\"}],\"supportedServerVersions\":[{\"name\":\"wexjkmfxapjwogq\",\"supportedVersionsToUpgrade\":[\"bpudcdab\"],\"supportedFeatures\":[{\"name\":\"wyawbzasqbuc\",\"status\":\"Disabled\"},{\"name\":\"yexaoguy\",\"status\":\"Enabled\"}],\"status\":\"Disabled\",\"reason\":\"daultxijjumfq\"},{\"name\":\"z\",\"supportedVersionsToUpgrade\":[\"nm\",\"jng\",\"qdqx\"],\"supportedFeatures\":[{\"name\":\"gny\",\"status\":\"Enabled\"}],\"status\":\"Disabled\",\"reason\":\"vtuikzhajq\"},{\"name\":\"cfhmlrqryxyn\",\"supportedVersionsToUpgrade\":[\"rd\",\"sovwxznptgoeiyb\",\"abpfhvfs\",\"kvntjlrigjkskyri\"],\"supportedFeatures\":[{\"name\":\"idsxwaabzmifry\",\"status\":\"Disabled\"},{\"name\":\"maxriz\",\"status\":\"Enabled\"},{\"name\":\"gopxlhslnelxie\",\"status\":\"Enabled\"}],\"status\":\"Available\",\"reason\":\"xecwcro\"},{\"name\":\"hslhca\",\"supportedVersionsToUpgrade\":[\"tifdwfmvi\"],\"supportedFeatures\":[{\"name\":\"jbt\",\"status\":\"Enabled\"}],\"status\":\"Default\",\"reason\":\"lkafhonqjuje\"}],\"supportedFeatures\":[{\"name\":\"zvcpopm\",\"status\":\"Disabled\"},{\"name\":\"wcltyjede\",\"status\":\"Enabled\"},{\"name\":\"f\",\"status\":\"Disabled\"},{\"name\":\"cazuaw\",\"status\":\"Enabled\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"wabzxrvxcushsp\",\"supportedSku\":\"ivmxyasfl\",\"supportedStorageGb\":1652128908,\"supportedServerVersions\":\"zwywako\",\"serverCount\":1976456758,\"status\":\"Disabled\",\"reason\":\"jblmljhlnymz\"},{\"supportedTier\":\"qyryuzcbmqqvxm\",\"supportedSku\":\"fgtayxonsup\",\"supportedStorageGb\":1744580177,\"supportedServerVersions\":\"zqn\",\"serverCount\":1503247909,\"status\":\"Visible\",\"reason\":\"tnzoibgsxgnxfy\"},{\"supportedTier\":\"nmpqoxwdofdb\",\"supportedSku\":\"qxeiiqbimhtmwwi\",\"supportedStorageGb\":708075307,\"supportedServerVersions\":\"f\",\"serverCount\":1711839978,\"status\":\"Disabled\",\"reason\":\"bcblemb\"},{\"supportedTier\":\"bwvqvxkdi\",\"supportedSku\":\"ihebwtsw\",\"supportedStorageGb\":1832502698,\"supportedServerVersions\":\"fmd\",\"serverCount\":1559781271,\"status\":\"Available\",\"reason\":\"izvcjfe\"}],\"geoBackupSupported\":\"Disabled\",\"zoneRedundantHaSupported\":\"Disabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Enabled\",\"storageAutoGrowthSupported\":\"Enabled\",\"onlineResizeSupported\":\"Enabled\",\"restricted\":\"Disabled\",\"status\":\"Default\",\"reason\":\"bsazgakg\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.locationBasedCapabilities().execute("xotngfdguge", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("i", response.iterator().next().name()); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupRequestTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupRequestTests.java new file mode 100644 index 000000000000..237b78c26f50 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupRequestTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; +import org.junit.jupiter.api.Assertions; + +public final class LtrPreBackupRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LtrPreBackupRequest model = BinaryData.fromString("{\"backupSettings\":{\"backupName\":\"gxtibqdxbxw\"}}") + .toObject(LtrPreBackupRequest.class); + Assertions.assertEquals("gxtibqdxbxw", model.backupSettings().backupName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LtrPreBackupRequest model + = new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("gxtibqdxbxw")); + model = BinaryData.fromObject(model).toObject(LtrPreBackupRequest.class); + Assertions.assertEquals("gxtibqdxbxw", model.backupSettings().backupName()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupResponseInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupResponseInnerTests.java new file mode 100644 index 000000000000..a77feacfa140 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupResponseInnerTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner; +import org.junit.jupiter.api.Assertions; + +public final class LtrPreBackupResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LtrPreBackupResponseInner model = BinaryData.fromString("{\"properties\":{\"numberOfContainers\":81041412}}") + .toObject(LtrPreBackupResponseInner.class); + Assertions.assertEquals(81041412, model.numberOfContainers()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LtrPreBackupResponseInner model = new LtrPreBackupResponseInner().withNumberOfContainers(81041412); + model = BinaryData.fromObject(model).toObject(LtrPreBackupResponseInner.class); + Assertions.assertEquals(81041412, model.numberOfContainers()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowForPatchTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowForPatchTests.java new file mode 100644 index 000000000000..a5b3671cdeed --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowForPatchTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindowForPatch; +import org.junit.jupiter.api.Assertions; + +public final class MaintenanceWindowForPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceWindowForPatch model = BinaryData + .fromString( + "{\"customWindow\":\"dg\",\"startHour\":649228036,\"startMinute\":1593534784,\"dayOfWeek\":1141536781}") + .toObject(MaintenanceWindowForPatch.class); + Assertions.assertEquals("dg", model.customWindow()); + Assertions.assertEquals(649228036, model.startHour()); + Assertions.assertEquals(1593534784, model.startMinute()); + Assertions.assertEquals(1141536781, model.dayOfWeek()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MaintenanceWindowForPatch model = new MaintenanceWindowForPatch().withCustomWindow("dg") + .withStartHour(649228036) + .withStartMinute(1593534784) + .withDayOfWeek(1141536781); + model = BinaryData.fromObject(model).toObject(MaintenanceWindowForPatch.class); + Assertions.assertEquals("dg", model.customWindow()); + Assertions.assertEquals(649228036, model.startHour()); + Assertions.assertEquals(1593534784, model.startMinute()); + Assertions.assertEquals(1141536781, model.dayOfWeek()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowTests.java new file mode 100644 index 000000000000..c68e3b5fdd60 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow; +import org.junit.jupiter.api.Assertions; + +public final class MaintenanceWindowTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceWindow model = BinaryData.fromString( + "{\"customWindow\":\"owzfttsttkt\",\"startHour\":631157488,\"startMinute\":1941309010,\"dayOfWeek\":520028629}") + .toObject(MaintenanceWindow.class); + Assertions.assertEquals("owzfttsttkt", model.customWindow()); + Assertions.assertEquals(631157488, model.startHour()); + Assertions.assertEquals(1941309010, model.startMinute()); + Assertions.assertEquals(520028629, model.dayOfWeek()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MaintenanceWindow model = new MaintenanceWindow().withCustomWindow("owzfttsttkt") + .withStartHour(631157488) + .withStartMinute(1941309010) + .withDayOfWeek(520028629); + model = BinaryData.fromObject(model).toObject(MaintenanceWindow.class); + Assertions.assertEquals("owzfttsttkt", model.customWindow()); + Assertions.assertEquals(631157488, model.startHour()); + Assertions.assertEquals(1941309010, model.startMinute()); + Assertions.assertEquals(520028629, model.dayOfWeek()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationNameAvailabilityInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationNameAvailabilityInnerTests.java new file mode 100644 index 000000000000..4a0df8accef0 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationNameAvailabilityInnerTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; +import org.junit.jupiter.api.Assertions; + +public final class MigrationNameAvailabilityInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MigrationNameAvailabilityInner model = BinaryData.fromString( + "{\"name\":\"xrjqcirgzpfrlazs\",\"type\":\"rnwoiindfp\",\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"bt\"}") + .toObject(MigrationNameAvailabilityInner.class); + Assertions.assertEquals("xrjqcirgzpfrlazs", model.name()); + Assertions.assertEquals("rnwoiindfp", model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MigrationNameAvailabilityInner model + = new MigrationNameAvailabilityInner().withName("xrjqcirgzpfrlazs").withType("rnwoiindfp"); + model = BinaryData.fromObject(model).toObject(MigrationNameAvailabilityInner.class); + Assertions.assertEquals("xrjqcirgzpfrlazs", model.name()); + Assertions.assertEquals("rnwoiindfp", model.type()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationStatusTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationStatusTests.java new file mode 100644 index 000000000000..117b37b40940 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationStatusTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationStatus; + +public final class MigrationStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MigrationStatus model = BinaryData.fromString( + "{\"state\":\"Succeeded\",\"error\":\"c\",\"currentSubStateDetails\":{\"currentSubState\":\"WaitingForDataMigrationScheduling\",\"dbDetails\":{\"npkukghimdblx\":{\"databaseName\":\"nxxmueedndrdv\",\"migrationState\":\"Canceling\",\"migrationOperation\":\"qqtch\",\"startedOn\":\"2021-06-10T11:36:20Z\",\"endedOn\":\"2021-05-03T12:58:02Z\",\"fullLoadQueuedTables\":669500000,\"fullLoadErroredTables\":1035796586,\"fullLoadLoadingTables\":1434664141,\"fullLoadCompletedTables\":2035762000,\"cdcUpdateCounter\":2007823107,\"cdcDeleteCounter\":1689077175,\"cdcInsertCounter\":772691250,\"appliedChanges\":490559476,\"incomingChanges\":976430532,\"latency\":434631779,\"message\":\"fudxepxgyqagvrv\"},\"abfatkl\":{\"databaseName\":\"imfnjhfjx\",\"migrationState\":\"Succeeded\",\"migrationOperation\":\"kkfoqr\",\"startedOn\":\"2021-06-21T22:48:50Z\",\"endedOn\":\"2021-05-31T03:25:20Z\",\"fullLoadQueuedTables\":508782992,\"fullLoadErroredTables\":2032728059,\"fullLoadLoadingTables\":1528851064,\"fullLoadCompletedTables\":398738394,\"cdcUpdateCounter\":693357808,\"cdcDeleteCounter\":641008490,\"cdcInsertCounter\":322973840,\"appliedChanges\":1950360907,\"incomingChanges\":1038031643,\"latency\":1240770029,\"message\":\"elsfeaen\"},\"zikhl\":{\"databaseName\":\"xbjhwuaanozjosph\",\"migrationState\":\"Succeeded\",\"migrationOperation\":\"pjrvxagl\",\"startedOn\":\"2021-11-16T13:26:47Z\",\"endedOn\":\"2021-09-23T10:13:50Z\",\"fullLoadQueuedTables\":1410903229,\"fullLoadErroredTables\":2140169496,\"fullLoadLoadingTables\":861887507,\"fullLoadCompletedTables\":802895356,\"cdcUpdateCounter\":835762361,\"cdcDeleteCounter\":992939840,\"cdcInsertCounter\":212130052,\"appliedChanges\":1489104850,\"incomingChanges\":2030573756,\"latency\":1569245436,\"message\":\"ke\"}},\"validationDetails\":{\"status\":\"Warning\",\"validationStartTimeInUtc\":\"2021-06-13T17:28:05Z\",\"validationEndTimeInUtc\":\"2021-02-18T07:54:44Z\",\"serverLevelValidationDetails\":[{\"type\":\"dunyg\",\"state\":\"Succeeded\",\"messages\":[{}]},{\"type\":\"qfatpxllrxcyjm\",\"state\":\"Failed\",\"messages\":[{},{},{},{}]}],\"dbLevelValidationDetails\":[{\"databaseName\":\"m\",\"startedOn\":\"2021-04-05T03:20:46Z\",\"endedOn\":\"2021-05-10T10:07:34Z\",\"summary\":[{},{}]}]}}}") + .toObject(MigrationStatus.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MigrationStatus model = new MigrationStatus(); + model = BinaryData.fromObject(model).toObject(MigrationStatus.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationSubstateDetailsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationSubstateDetailsTests.java new file mode 100644 index 000000000000..fc76d5e8440b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationSubstateDetailsTests.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DatabaseMigrationState; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DbLevelValidationStatus; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationDatabaseState; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSubstateDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationMessage; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationState; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationSummaryItem; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class MigrationSubstateDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MigrationSubstateDetails model = BinaryData.fromString( + "{\"currentSubState\":\"MigratingData\",\"dbDetails\":{\"cqqudf\":{\"databaseName\":\"yxxrwlycoduh\",\"migrationState\":\"Failed\",\"migrationOperation\":\"gymare\",\"startedOn\":\"2021-03-16T20:45:43Z\",\"endedOn\":\"2021-11-23T08:29:11Z\",\"fullLoadQueuedTables\":1568573740,\"fullLoadErroredTables\":1691251601,\"fullLoadLoadingTables\":432489630,\"fullLoadCompletedTables\":1068546777,\"cdcUpdateCounter\":314169873,\"cdcDeleteCounter\":642347272,\"cdcInsertCounter\":1615439443,\"appliedChanges\":2056337569,\"incomingChanges\":1063119881,\"latency\":1853639964,\"message\":\"zqalkrmnjijpx\"},\"aytdwkqbrq\":{\"databaseName\":\"yxbaaabjyvayf\",\"migrationState\":\"InProgress\",\"migrationOperation\":\"zrtuzq\",\"startedOn\":\"2021-05-14T21:16:38Z\",\"endedOn\":\"2021-10-01T08:47:38Z\",\"fullLoadQueuedTables\":218306871,\"fullLoadErroredTables\":850324011,\"fullLoadLoadingTables\":1536688095,\"fullLoadCompletedTables\":512160368,\"cdcUpdateCounter\":2059840008,\"cdcDeleteCounter\":377160768,\"cdcInsertCounter\":1440499034,\"appliedChanges\":10547913,\"incomingChanges\":1475196585,\"latency\":1576556557,\"message\":\"oibjudpfrxtrthz\"}},\"validationDetails\":{\"status\":\"Failed\",\"validationStartTimeInUtc\":\"2021-06-19T07:52:19Z\",\"validationEndTimeInUtc\":\"2021-08-03T15:35:30Z\",\"serverLevelValidationDetails\":[{\"type\":\"ivpdtiir\",\"state\":\"Failed\",\"messages\":[{\"state\":\"Failed\",\"message\":\"r\"},{\"state\":\"Succeeded\",\"message\":\"squyfxrxxlep\"},{\"state\":\"Succeeded\",\"message\":\"xje\"}]}],\"dbLevelValidationDetails\":[{\"databaseName\":\"nwxuqlcvydyp\",\"startedOn\":\"2021-03-01T02:46:01Z\",\"endedOn\":\"2021-08-27T20:00:04Z\",\"summary\":[{\"type\":\"kniod\",\"state\":\"Warning\",\"messages\":[{}]},{\"type\":\"nuj\",\"state\":\"Failed\",\"messages\":[{},{},{},{}]}]},{\"databaseName\":\"vdkcrodtj\",\"startedOn\":\"2021-03-09T18:26:05Z\",\"endedOn\":\"2021-03-22T21:04:29Z\",\"summary\":[{\"type\":\"kacjvefkdlfo\",\"state\":\"Warning\",\"messages\":[{},{}]}]},{\"databaseName\":\"pagao\",\"startedOn\":\"2021-02-23T21:26:17Z\",\"endedOn\":\"2021-11-09T20:51:35Z\",\"summary\":[{\"type\":\"ylsyxkqjnsje\",\"state\":\"Warning\",\"messages\":[{},{},{}]},{\"type\":\"xsdszuempsb\",\"state\":\"Failed\",\"messages\":[{},{},{},{}]},{\"type\":\"yvpnqicvinvkjj\",\"state\":\"Warning\",\"messages\":[{},{},{},{}]},{\"type\":\"ukzclewyhmlwpaz\",\"state\":\"Failed\",\"messages\":[{}]}]},{\"databaseName\":\"cckwyfzqwhxxbu\",\"startedOn\":\"2021-05-27T03:07:24Z\",\"endedOn\":\"2020-12-30T00:37:41Z\",\"summary\":[{\"type\":\"ztppriolxorjalto\",\"state\":\"Succeeded\",\"messages\":[{},{},{}]}]}]}}") + .toObject(MigrationSubstateDetails.class); + Assertions.assertEquals("yxxrwlycoduh", model.dbDetails().get("cqqudf").databaseName()); + Assertions.assertEquals(MigrationDatabaseState.FAILED, model.dbDetails().get("cqqudf").migrationState()); + Assertions.assertEquals("gymare", model.dbDetails().get("cqqudf").migrationOperation()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-16T20:45:43Z"), + model.dbDetails().get("cqqudf").startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-23T08:29:11Z"), + model.dbDetails().get("cqqudf").endedOn()); + Assertions.assertEquals(1568573740, model.dbDetails().get("cqqudf").fullLoadQueuedTables()); + Assertions.assertEquals(1691251601, model.dbDetails().get("cqqudf").fullLoadErroredTables()); + Assertions.assertEquals(432489630, model.dbDetails().get("cqqudf").fullLoadLoadingTables()); + Assertions.assertEquals(1068546777, model.dbDetails().get("cqqudf").fullLoadCompletedTables()); + Assertions.assertEquals(314169873, model.dbDetails().get("cqqudf").cdcUpdateCounter()); + Assertions.assertEquals(642347272, model.dbDetails().get("cqqudf").cdcDeleteCounter()); + Assertions.assertEquals(1615439443, model.dbDetails().get("cqqudf").cdcInsertCounter()); + Assertions.assertEquals(2056337569, model.dbDetails().get("cqqudf").appliedChanges()); + Assertions.assertEquals(1063119881, model.dbDetails().get("cqqudf").incomingChanges()); + Assertions.assertEquals(1853639964, model.dbDetails().get("cqqudf").latency()); + Assertions.assertEquals("zqalkrmnjijpx", model.dbDetails().get("cqqudf").message()); + Assertions.assertEquals(ValidationState.FAILED, model.validationDetails().status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T07:52:19Z"), + model.validationDetails().validationStartTimeInUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T15:35:30Z"), + model.validationDetails().validationEndTimeInUtc()); + Assertions.assertEquals("ivpdtiir", model.validationDetails().serverLevelValidationDetails().get(0).type()); + Assertions.assertEquals(ValidationState.FAILED, + model.validationDetails().serverLevelValidationDetails().get(0).state()); + Assertions.assertEquals(ValidationState.FAILED, + model.validationDetails().serverLevelValidationDetails().get(0).messages().get(0).state()); + Assertions.assertEquals("r", + model.validationDetails().serverLevelValidationDetails().get(0).messages().get(0).message()); + Assertions.assertEquals("nwxuqlcvydyp", + model.validationDetails().dbLevelValidationDetails().get(0).databaseName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-01T02:46:01Z"), + model.validationDetails().dbLevelValidationDetails().get(0).startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-27T20:00:04Z"), + model.validationDetails().dbLevelValidationDetails().get(0).endedOn()); + Assertions.assertEquals("kniod", + model.validationDetails().dbLevelValidationDetails().get(0).summary().get(0).type()); + Assertions.assertEquals(ValidationState.WARNING, + model.validationDetails().dbLevelValidationDetails().get(0).summary().get(0).state()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MigrationSubstateDetails model + = new MigrationSubstateDetails() + .withDbDetails(mapOf("cqqudf", + new DatabaseMigrationState().withDatabaseName("yxxrwlycoduh") + .withMigrationState(MigrationDatabaseState.FAILED) + .withMigrationOperation("gymare") + .withStartedOn(OffsetDateTime.parse("2021-03-16T20:45:43Z")) + .withEndedOn(OffsetDateTime.parse("2021-11-23T08:29:11Z")) + .withFullLoadQueuedTables(1568573740) + .withFullLoadErroredTables(1691251601) + .withFullLoadLoadingTables(432489630) + .withFullLoadCompletedTables(1068546777) + .withCdcUpdateCounter(314169873) + .withCdcDeleteCounter(642347272) + .withCdcInsertCounter(1615439443) + .withAppliedChanges(2056337569) + .withIncomingChanges(1063119881) + .withLatency(1853639964) + .withMessage("zqalkrmnjijpx"), + "aytdwkqbrq", + new DatabaseMigrationState().withDatabaseName("yxbaaabjyvayf") + .withMigrationState(MigrationDatabaseState.IN_PROGRESS) + .withMigrationOperation("zrtuzq") + .withStartedOn(OffsetDateTime.parse("2021-05-14T21:16:38Z")) + .withEndedOn(OffsetDateTime.parse("2021-10-01T08:47:38Z")) + .withFullLoadQueuedTables(218306871) + .withFullLoadErroredTables(850324011) + .withFullLoadLoadingTables(1536688095) + .withFullLoadCompletedTables(512160368) + .withCdcUpdateCounter(2059840008) + .withCdcDeleteCounter(377160768) + .withCdcInsertCounter(1440499034) + .withAppliedChanges(10547913) + .withIncomingChanges(1475196585) + .withLatency(1576556557) + .withMessage("oibjudpfrxtrthz"))) + .withValidationDetails( + new ValidationDetails().withStatus(ValidationState.FAILED) + .withValidationStartTimeInUtc(OffsetDateTime.parse("2021-06-19T07:52:19Z")) + .withValidationEndTimeInUtc(OffsetDateTime.parse("2021-08-03T15:35:30Z")) + .withServerLevelValidationDetails(Arrays.asList(new ValidationSummaryItem().withType("ivpdtiir") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList( + new ValidationMessage().withState(ValidationState.FAILED).withMessage("r"), + new ValidationMessage().withState(ValidationState.SUCCEEDED) + .withMessage("squyfxrxxlep"), + new ValidationMessage().withState(ValidationState.SUCCEEDED).withMessage("xje"))))) + .withDbLevelValidationDetails(Arrays.asList( + new DbLevelValidationStatus().withDatabaseName("nwxuqlcvydyp") + .withStartedOn(OffsetDateTime.parse("2021-03-01T02:46:01Z")) + .withEndedOn(OffsetDateTime.parse("2021-08-27T20:00:04Z")) + .withSummary(Arrays.asList( + new ValidationSummaryItem().withType("kniod") + .withState(ValidationState.WARNING) + .withMessages(Arrays.asList(new ValidationMessage())), + new ValidationSummaryItem().withType("nuj") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), + new ValidationMessage(), new ValidationMessage())))), + new DbLevelValidationStatus().withDatabaseName("vdkcrodtj") + .withStartedOn(OffsetDateTime.parse("2021-03-09T18:26:05Z")) + .withEndedOn(OffsetDateTime.parse("2021-03-22T21:04:29Z")) + .withSummary(Arrays.asList(new ValidationSummaryItem().withType("kacjvefkdlfo") + .withState(ValidationState.WARNING) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage())))), + new DbLevelValidationStatus().withDatabaseName("pagao") + .withStartedOn(OffsetDateTime.parse("2021-02-23T21:26:17Z")) + .withEndedOn(OffsetDateTime.parse("2021-11-09T20:51:35Z")) + .withSummary(Arrays.asList( + new ValidationSummaryItem().withType("ylsyxkqjnsje") + .withState(ValidationState.WARNING) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), + new ValidationMessage())), + new ValidationSummaryItem().withType("xsdszuempsb") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), + new ValidationMessage(), new ValidationMessage())), + new ValidationSummaryItem().withType("yvpnqicvinvkjj") + .withState(ValidationState.WARNING) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), + new ValidationMessage(), new ValidationMessage())), + new ValidationSummaryItem().withType("ukzclewyhmlwpaz") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList(new ValidationMessage())))), + new DbLevelValidationStatus().withDatabaseName("cckwyfzqwhxxbu") + .withStartedOn(OffsetDateTime.parse("2021-05-27T03:07:24Z")) + .withEndedOn(OffsetDateTime.parse("2020-12-30T00:37:41Z")) + .withSummary(Arrays.asList(new ValidationSummaryItem().withType("ztppriolxorjalto") + .withState(ValidationState.SUCCEEDED) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), + new ValidationMessage()))))))); + model = BinaryData.fromObject(model).toObject(MigrationSubstateDetails.class); + Assertions.assertEquals("yxxrwlycoduh", model.dbDetails().get("cqqudf").databaseName()); + Assertions.assertEquals(MigrationDatabaseState.FAILED, model.dbDetails().get("cqqudf").migrationState()); + Assertions.assertEquals("gymare", model.dbDetails().get("cqqudf").migrationOperation()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-16T20:45:43Z"), + model.dbDetails().get("cqqudf").startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-23T08:29:11Z"), + model.dbDetails().get("cqqudf").endedOn()); + Assertions.assertEquals(1568573740, model.dbDetails().get("cqqudf").fullLoadQueuedTables()); + Assertions.assertEquals(1691251601, model.dbDetails().get("cqqudf").fullLoadErroredTables()); + Assertions.assertEquals(432489630, model.dbDetails().get("cqqudf").fullLoadLoadingTables()); + Assertions.assertEquals(1068546777, model.dbDetails().get("cqqudf").fullLoadCompletedTables()); + Assertions.assertEquals(314169873, model.dbDetails().get("cqqudf").cdcUpdateCounter()); + Assertions.assertEquals(642347272, model.dbDetails().get("cqqudf").cdcDeleteCounter()); + Assertions.assertEquals(1615439443, model.dbDetails().get("cqqudf").cdcInsertCounter()); + Assertions.assertEquals(2056337569, model.dbDetails().get("cqqudf").appliedChanges()); + Assertions.assertEquals(1063119881, model.dbDetails().get("cqqudf").incomingChanges()); + Assertions.assertEquals(1853639964, model.dbDetails().get("cqqudf").latency()); + Assertions.assertEquals("zqalkrmnjijpx", model.dbDetails().get("cqqudf").message()); + Assertions.assertEquals(ValidationState.FAILED, model.validationDetails().status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T07:52:19Z"), + model.validationDetails().validationStartTimeInUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T15:35:30Z"), + model.validationDetails().validationEndTimeInUtc()); + Assertions.assertEquals("ivpdtiir", model.validationDetails().serverLevelValidationDetails().get(0).type()); + Assertions.assertEquals(ValidationState.FAILED, + model.validationDetails().serverLevelValidationDetails().get(0).state()); + Assertions.assertEquals(ValidationState.FAILED, + model.validationDetails().serverLevelValidationDetails().get(0).messages().get(0).state()); + Assertions.assertEquals("r", + model.validationDetails().serverLevelValidationDetails().get(0).messages().get(0).message()); + Assertions.assertEquals("nwxuqlcvydyp", + model.validationDetails().dbLevelValidationDetails().get(0).databaseName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-01T02:46:01Z"), + model.validationDetails().dbLevelValidationDetails().get(0).startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-27T20:00:04Z"), + model.validationDetails().dbLevelValidationDetails().get(0).endedOn()); + Assertions.assertEquals("kniod", + model.validationDetails().dbLevelValidationDetails().get(0).summary().get(0).type()); + Assertions.assertEquals(ValidationState.WARNING, + model.validationDetails().dbLevelValidationDetails().get(0).summary().get(0).state()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ResourceProvidersCheckMigrationNameAvailabilityWithRMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilityWithResponseMockTests.java similarity index 64% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ResourceProvidersCheckMigrationNameAvailabilityWithRMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilityWithResponseMockTests.java index 7a20fa55d3e9..13c473a5ad33 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ResourceProvidersCheckMigrationNameAvailabilityWithRMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilityWithResponseMockTests.java @@ -10,19 +10,19 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationNameAvailabilityResource; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationNameAvailability; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class ResourceProvidersCheckMigrationNameAvailabilityWithRMockTests { +public final class MigrationsCheckNameAvailabilityWithResponseMockTests { @Test - public void testCheckMigrationNameAvailabilityWithResponse() throws Exception { + public void testCheckNameAvailabilityWithResponse() throws Exception { String responseStr - = "{\"name\":\"idwcwvmzegjon\",\"type\":\"hj\",\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"qzbrf\"}"; + = "{\"name\":\"c\",\"type\":\"jikzoeovvtzej\",\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"tikyj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testCheckMigrationNameAvailabilityWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - MigrationNameAvailabilityResource response = manager.resourceProviders() - .checkMigrationNameAvailabilityWithResponse("pjhmqrhvthl", "iwdcxsmlzzhzd", "xetlgydlhqv", - new MigrationNameAvailabilityResourceInner().withName("n").withType("pxy"), + MigrationNameAvailability response = manager.migrations() + .checkNameAvailabilityWithResponse("agb", "idqlvhu", + new MigrationNameAvailabilityInner().withName("oveofizrvjfnmj").withType("vlwyzg"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("idwcwvmzegjon", response.name()); - Assertions.assertEquals("hj", response.type()); + Assertions.assertEquals("c", response.name()); + Assertions.assertEquals("jikzoeovvtzej", response.type()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsDeleteWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsDeleteWithResponseMockTests.java deleted file mode 100644 index 1c6fce22d126..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MigrationsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.migrations() - .deleteWithResponse("llklmtk", "lowkxxpvb", "dfjmzsyzfhotlh", "k", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityWithLocationsExecuteWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckGloballyWithResponseMockTests.java similarity index 70% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityWithLocationsExecuteWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckGloballyWithResponseMockTests.java index e883c95bc05f..253cecafe025 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityWithLocationsExecuteWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckGloballyWithResponseMockTests.java @@ -12,18 +12,18 @@ import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityReason; import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailabilityModel; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class CheckNameAvailabilityWithLocationsExecuteWithResponseMockTests { +public final class NameAvailabilitiesCheckGloballyWithResponseMockTests { @Test - public void testExecuteWithResponse() throws Exception { + public void testCheckGloballyWithResponse() throws Exception { String responseStr - = "{\"name\":\"atbhjmznn\",\"type\":\"oqeq\",\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"agunbtgfebw\"}"; + = "{\"name\":\"glklb\",\"type\":\"lidwcwvmzegjon\",\"nameAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"gdn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,13 @@ public void testExecuteWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - NameAvailability response = manager.checkNameAvailabilityWithLocations() - .executeWithResponse("tcqiosmg", - new CheckNameAvailabilityRequest().withName("ahgx").withType("lyrtltlaprlt"), + NameAvailabilityModel response = manager.nameAvailabilities() + .checkGloballyWithResponse(new CheckNameAvailabilityRequest().withName("qvlnnpxybafiqgea").withType("bgj"), com.azure.core.util.Context.NONE) .getValue(); Assertions.assertTrue(response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("agunbtgfebw", response.message()); + Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, response.reason()); + Assertions.assertEquals("gdn", response.message()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckWithLocationWithResponseMockTests.java similarity index 71% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckWithLocationWithResponseMockTests.java index 0aaa43412389..135fe8b2b5b7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckWithLocationWithResponseMockTests.java @@ -12,18 +12,18 @@ import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityReason; import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailabilityModel; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class CheckNameAvailabilitiesExecuteWithResponseMockTests { +public final class NameAvailabilitiesCheckWithLocationWithResponseMockTests { @Test - public void testExecuteWithResponse() throws Exception { + public void testCheckWithLocationWithResponse() throws Exception { String responseStr - = "{\"name\":\"t\",\"type\":\"sxwpndfcpfnznthj\",\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"srxuzvoam\"}"; + = "{\"name\":\"acht\",\"type\":\"flrytswfpfm\",\"nameAvailable\":false,\"reason\":\"Invalid\",\"message\":\"mskwhqjjysl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testExecuteWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - NameAvailability response = manager.checkNameAvailabilities() - .executeWithResponse( - new CheckNameAvailabilityRequest().withName("pkyjcxcjxgrytfm").withType("ycilrmcaykggnox"), + NameAvailabilityModel response = manager.nameAvailabilities() + .checkWithLocationWithResponse("z", + new CheckNameAvailabilityRequest().withName("fkspzhzmtksjci").withType("igsxcdgljplk"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertTrue(response.nameAvailable()); + Assertions.assertFalse(response.nameAvailable()); Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("srxuzvoam", response.message()); + Assertions.assertEquals("mskwhqjjysl", response.message()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityModelInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityModelInnerTests.java new file mode 100644 index 000000000000..b9978cafc7ff --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityModelInnerTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityReason; +import org.junit.jupiter.api.Assertions; + +public final class NameAvailabilityModelInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NameAvailabilityModelInner model = BinaryData.fromString( + "{\"name\":\"qmqhldvriii\",\"type\":\"nalghfkvtvsexso\",\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"hhahhxvrhmzkwpjg\"}") + .toObject(NameAvailabilityModelInner.class); + Assertions.assertFalse(model.nameAvailable()); + Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); + Assertions.assertEquals("hhahhxvrhmzkwpjg", model.message()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NameAvailabilityModelInner model = new NameAvailabilityModelInner().withNameAvailable(false) + .withReason(CheckNameAvailabilityReason.ALREADY_EXISTS) + .withMessage("hhahhxvrhmzkwpjg"); + model = BinaryData.fromObject(model).toObject(NameAvailabilityModelInner.class); + Assertions.assertFalse(model.nameAvailable()); + Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); + Assertions.assertEquals("hhahhxvrhmzkwpjg", model.message()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NamePropertyTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NamePropertyTests.java new file mode 100644 index 000000000000..a0738f425a7e --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NamePropertyTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.NameProperty; +import org.junit.jupiter.api.Assertions; + +public final class NamePropertyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NameProperty model = BinaryData.fromString("{\"value\":\"gfwsrtaw\",\"localizedValue\":\"ezbrhubskh\"}") + .toObject(NameProperty.class); + Assertions.assertEquals("gfwsrtaw", model.value()); + Assertions.assertEquals("ezbrhubskh", model.localizedValue()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NameProperty model = new NameProperty().withValue("gfwsrtaw").withLocalizedValue("ezbrhubskh"); + model = BinaryData.fromObject(model).toObject(NameProperty.class); + Assertions.assertEquals("gfwsrtaw", model.value()); + Assertions.assertEquals("ezbrhubskh", model.localizedValue()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NetworkTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NetworkTests.java new file mode 100644 index 000000000000..211418763ecf --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NetworkTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerPublicNetworkAccessState; +import org.junit.jupiter.api.Assertions; + +public final class NetworkTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Network model = BinaryData.fromString( + "{\"publicNetworkAccess\":\"Enabled\",\"delegatedSubnetResourceId\":\"w\",\"privateDnsZoneArmResourceId\":\"oupfgfb\"}") + .toObject(Network.class); + Assertions.assertEquals(ServerPublicNetworkAccessState.ENABLED, model.publicNetworkAccess()); + Assertions.assertEquals("w", model.delegatedSubnetResourceId()); + Assertions.assertEquals("oupfgfb", model.privateDnsZoneArmResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Network model = new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.ENABLED) + .withDelegatedSubnetResourceId("w") + .withPrivateDnsZoneArmResourceId("oupfgfb"); + model = BinaryData.fromObject(model).toObject(Network.class); + Assertions.assertEquals(ServerPublicNetworkAccessState.ENABLED, model.publicNetworkAccess()); + Assertions.assertEquals("w", model.delegatedSubnetResourceId()); + Assertions.assertEquals("oupfgfb", model.privateDnsZoneArmResourceId()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationDetailsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationDetailsTests.java new file mode 100644 index 000000000000..719ea00bf98c --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationDetailsTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationDetails; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ObjectRecommendationDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ObjectRecommendationDetails model = BinaryData.fromString( + "{\"databaseName\":\"yklxubyjaffmmfbl\",\"schema\":\"cuubgq\",\"table\":\"rtalmet\",\"indexType\":\"wgdsl\",\"indexName\":\"ihhrmo\",\"indexColumns\":[\"qseypxiutcxa\"],\"includedColumns\":[\"y\",\"petogebjox\",\"lhvnhlab\",\"q\"]}") + .toObject(ObjectRecommendationDetails.class); + Assertions.assertEquals("yklxubyjaffmmfbl", model.databaseName()); + Assertions.assertEquals("cuubgq", model.schema()); + Assertions.assertEquals("rtalmet", model.table()); + Assertions.assertEquals("wgdsl", model.indexType()); + Assertions.assertEquals("ihhrmo", model.indexName()); + Assertions.assertEquals("qseypxiutcxa", model.indexColumns().get(0)); + Assertions.assertEquals("y", model.includedColumns().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ObjectRecommendationDetails model = new ObjectRecommendationDetails().withDatabaseName("yklxubyjaffmmfbl") + .withSchema("cuubgq") + .withTable("rtalmet") + .withIndexType("wgdsl") + .withIndexName("ihhrmo") + .withIndexColumns(Arrays.asList("qseypxiutcxa")) + .withIncludedColumns(Arrays.asList("y", "petogebjox", "lhvnhlab", "q")); + model = BinaryData.fromObject(model).toObject(ObjectRecommendationDetails.class); + Assertions.assertEquals("yklxubyjaffmmfbl", model.databaseName()); + Assertions.assertEquals("cuubgq", model.schema()); + Assertions.assertEquals("rtalmet", model.table()); + Assertions.assertEquals("wgdsl", model.indexType()); + Assertions.assertEquals("ihhrmo", model.indexName()); + Assertions.assertEquals("qseypxiutcxa", model.indexColumns().get(0)); + Assertions.assertEquals("y", model.includedColumns().get(0)); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationInnerTests.java new file mode 100644 index 000000000000..cc5472eb6723 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationInnerTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; +import org.junit.jupiter.api.Assertions; + +public final class ObjectRecommendationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ObjectRecommendationInner model = BinaryData.fromString( + "{\"kind\":\"pvz\",\"properties\":{\"initialRecommendedTime\":\"2021-10-27T23:39:54Z\",\"lastRecommendedTime\":\"2021-08-29T10:44:42Z\",\"timesRecommended\":763019330,\"improvedQueryIds\":[1962664267869044370,7705373271443062413,7572255712595871668],\"recommendationReason\":\"pkc\",\"currentState\":\"yzriykhy\",\"recommendationType\":\"AnalyzeTable\",\"implementationDetails\":{\"method\":\"lboxqvkjl\",\"script\":\"ho\"},\"analyzedWorkload\":{\"startTime\":\"2021-10-09T04:46:26Z\",\"endTime\":\"2021-11-30T18:11:35Z\",\"queryCount\":2141225677},\"estimatedImpact\":[{\"dimensionName\":\"mbnraauzzp\",\"unit\":\"a\",\"queryId\":8740215687103788004,\"absoluteValue\":53.76406796396901},{\"dimensionName\":\"wwvaiqyuvvfonk\",\"unit\":\"hqyikvy\",\"queryId\":4524825461883558353,\"absoluteValue\":68.83579712649399},{\"dimensionName\":\"wmn\",\"unit\":\"ttijfybvpoekrs\",\"queryId\":4160555160765706368,\"absoluteValue\":33.48124737837169},{\"dimensionName\":\"qgnjdgkynscli\",\"unit\":\"zvhxnk\",\"queryId\":620897221549417842,\"absoluteValue\":10.444343586936233}],\"details\":{\"databaseName\":\"pnvdxz\",\"schema\":\"ihfrbbcevqa\",\"table\":\"ltd\",\"indexType\":\"fkqojpy\",\"indexName\":\"gtrd\",\"indexColumns\":[\"fmzzsdymbrny\",\"u\"],\"includedColumns\":[\"rafwgckhocxvdf\",\"fwafqrouda\",\"pavehhr\"]}},\"id\":\"bunzozudh\",\"name\":\"xg\",\"type\":\"moy\"}") + .toObject(ObjectRecommendationInner.class); + Assertions.assertEquals("pvz", model.kind()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ObjectRecommendationInner model = new ObjectRecommendationInner().withKind("pvz"); + model = BinaryData.fromObject(model).toObject(ObjectRecommendationInner.class); + Assertions.assertEquals("pvz", model.kind()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationListTests.java new file mode 100644 index 000000000000..7fe16b933af4 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationListTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ObjectRecommendationListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ObjectRecommendationList model = BinaryData.fromString( + "{\"value\":[{\"kind\":\"podbzevwrdnh\",\"properties\":{\"initialRecommendedTime\":\"2021-08-05T14:25:50Z\",\"lastRecommendedTime\":\"2021-04-26T19:15:59Z\",\"timesRecommended\":437386763,\"improvedQueryIds\":[5191466923245315601,841676963872449061,5004966782756902203,4895796694367228378],\"recommendationReason\":\"ypfcvlerchpqbmf\",\"currentState\":\"babwidfcxss\",\"recommendationType\":\"DropIndex\",\"implementationDetails\":{\"method\":\"oxyhkxgqddrihpf\",\"script\":\"qcaaewdaomdjvl\"},\"analyzedWorkload\":{\"startTime\":\"2021-04-29T09:29:01Z\",\"endTime\":\"2021-05-04T10:40:20Z\",\"queryCount\":1445056578},\"estimatedImpact\":[{\"dimensionName\":\"eivsiykzkdnc\",\"unit\":\"xonbzoggculapz\",\"queryId\":1506759531951154202,\"absoluteValue\":74.37869960880928},{\"dimensionName\":\"qxepnylbfuaj\",\"unit\":\"jtlvofqzhvfciby\",\"queryId\":3860000272436496584,\"absoluteValue\":43.901636834880186}],\"details\":{\"databaseName\":\"pvdwxf\",\"schema\":\"iivwzjbhyzsxjrka\",\"table\":\"trnegvmnvuqeqvld\",\"indexType\":\"astjbkkdmflvestm\",\"indexName\":\"xrrilozapee\",\"indexColumns\":[\"pxlktwkuziycsl\",\"vu\",\"uztcktyhjtqed\",\"gzulwmmrqzzr\"],\"includedColumns\":[\"pglydz\",\"krvq\"]}},\"id\":\"vtoepryutnw\",\"name\":\"tpzdmovzvfvaawzq\",\"type\":\"dflgzuri\"}],\"nextLink\":\"aecxndtic\"}") + .toObject(ObjectRecommendationList.class); + Assertions.assertEquals("podbzevwrdnh", model.value().get(0).kind()); + Assertions.assertEquals("aecxndtic", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ObjectRecommendationList model = new ObjectRecommendationList() + .withValue(Arrays.asList(new ObjectRecommendationInner().withKind("podbzevwrdnh"))) + .withNextLink("aecxndtic"); + model = BinaryData.fromObject(model).toObject(ObjectRecommendationList.class); + Assertions.assertEquals("podbzevwrdnh", model.value().get(0).kind()); + Assertions.assertEquals("aecxndtic", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesAnalyzedWorkloadTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesAnalyzedWorkloadTests.java new file mode 100644 index 000000000000..834aae0e7999 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesAnalyzedWorkloadTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesAnalyzedWorkload; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class ObjectRecommendationPropertiesAnalyzedWorkloadTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ObjectRecommendationPropertiesAnalyzedWorkload model = BinaryData.fromString( + "{\"startTime\":\"2021-03-15T08:57:58Z\",\"endTime\":\"2021-09-15T05:47:21Z\",\"queryCount\":594381501}") + .toObject(ObjectRecommendationPropertiesAnalyzedWorkload.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-15T08:57:58Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-15T05:47:21Z"), model.endTime()); + Assertions.assertEquals(594381501, model.queryCount()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ObjectRecommendationPropertiesAnalyzedWorkload model = new ObjectRecommendationPropertiesAnalyzedWorkload() + .withStartTime(OffsetDateTime.parse("2021-03-15T08:57:58Z")) + .withEndTime(OffsetDateTime.parse("2021-09-15T05:47:21Z")) + .withQueryCount(594381501); + model = BinaryData.fromObject(model).toObject(ObjectRecommendationPropertiesAnalyzedWorkload.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-15T08:57:58Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-15T05:47:21Z"), model.endTime()); + Assertions.assertEquals(594381501, model.queryCount()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesImplementationDetailsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesImplementationDetailsTests.java new file mode 100644 index 000000000000..68025d4152d4 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesImplementationDetailsTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesImplementationDetails; +import org.junit.jupiter.api.Assertions; + +public final class ObjectRecommendationPropertiesImplementationDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ObjectRecommendationPropertiesImplementationDetails model + = BinaryData.fromString("{\"method\":\"txmwoteyow\",\"script\":\"uqovekqvgqouwif\"}") + .toObject(ObjectRecommendationPropertiesImplementationDetails.class); + Assertions.assertEquals("txmwoteyow", model.method()); + Assertions.assertEquals("uqovekqvgqouwif", model.script()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ObjectRecommendationPropertiesImplementationDetails model + = new ObjectRecommendationPropertiesImplementationDetails().withMethod("txmwoteyow") + .withScript("uqovekqvgqouwif"); + model = BinaryData.fromObject(model).toObject(ObjectRecommendationPropertiesImplementationDetails.class); + Assertions.assertEquals("txmwoteyow", model.method()); + Assertions.assertEquals("uqovekqvgqouwif", model.script()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesTests.java new file mode 100644 index 000000000000..52f52a335c61 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesTests.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationProperties; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesAnalyzedWorkload; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesImplementationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeEnum; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ObjectRecommendationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ObjectRecommendationProperties model = BinaryData.fromString( + "{\"initialRecommendedTime\":\"2021-11-01T06:19:12Z\",\"lastRecommendedTime\":\"2021-04-27T04:32:10Z\",\"timesRecommended\":1904472040,\"improvedQueryIds\":[2557149039383671323],\"recommendationReason\":\"bzydvfvfcj\",\"currentState\":\"eoisrvhmgor\",\"recommendationType\":\"ReIndex\",\"implementationDetails\":{\"method\":\"scvwmzhwplef\",\"script\":\"vxilcbt\"},\"analyzedWorkload\":{\"startTime\":\"2021-02-03T00:44:07Z\",\"endTime\":\"2021-09-14T23:20:53Z\",\"queryCount\":1529157680},\"estimatedImpact\":[{\"dimensionName\":\"jfzqlqhycavodgg\",\"unit\":\"beesmieknlra\",\"queryId\":5499561988006889896,\"absoluteValue\":94.1788999123394}],\"details\":{\"databaseName\":\"ydwqfbylyrf\",\"schema\":\"agt\",\"table\":\"jocqwogfnzjvusf\",\"indexType\":\"dmozu\",\"indexName\":\"lfsbtkadpysow\",\"indexColumns\":[\"gkbugrjqct\",\"jc\",\"isofieypefojyqd\",\"cuplcplcwkhih\"],\"includedColumns\":[\"hzdsqtzbsrgnow\",\"jhf\",\"mvec\"]}}") + .toObject(ObjectRecommendationProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T06:19:12Z"), model.initialRecommendedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T04:32:10Z"), model.lastRecommendedTime()); + Assertions.assertEquals(1904472040, model.timesRecommended()); + Assertions.assertEquals(2557149039383671323L, model.improvedQueryIds().get(0)); + Assertions.assertEquals("bzydvfvfcj", model.recommendationReason()); + Assertions.assertEquals("eoisrvhmgor", model.currentState()); + Assertions.assertEquals(RecommendationTypeEnum.RE_INDEX, model.recommendationType()); + Assertions.assertEquals("scvwmzhwplef", model.implementationDetails().method()); + Assertions.assertEquals("vxilcbt", model.implementationDetails().script()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-03T00:44:07Z"), model.analyzedWorkload().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-14T23:20:53Z"), model.analyzedWorkload().endTime()); + Assertions.assertEquals(1529157680, model.analyzedWorkload().queryCount()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ObjectRecommendationProperties model = new ObjectRecommendationProperties() + .withInitialRecommendedTime(OffsetDateTime.parse("2021-11-01T06:19:12Z")) + .withLastRecommendedTime(OffsetDateTime.parse("2021-04-27T04:32:10Z")) + .withTimesRecommended(1904472040) + .withImprovedQueryIds(Arrays.asList(2557149039383671323L)) + .withRecommendationReason("bzydvfvfcj") + .withCurrentState("eoisrvhmgor") + .withRecommendationType(RecommendationTypeEnum.RE_INDEX) + .withImplementationDetails( + new ObjectRecommendationPropertiesImplementationDetails().withMethod("scvwmzhwplef") + .withScript("vxilcbt")) + .withAnalyzedWorkload(new ObjectRecommendationPropertiesAnalyzedWorkload() + .withStartTime(OffsetDateTime.parse("2021-02-03T00:44:07Z")) + .withEndTime(OffsetDateTime.parse("2021-09-14T23:20:53Z")) + .withQueryCount(1529157680)); + model = BinaryData.fromObject(model).toObject(ObjectRecommendationProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T06:19:12Z"), model.initialRecommendedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T04:32:10Z"), model.lastRecommendedTime()); + Assertions.assertEquals(1904472040, model.timesRecommended()); + Assertions.assertEquals(2557149039383671323L, model.improvedQueryIds().get(0)); + Assertions.assertEquals("bzydvfvfcj", model.recommendationReason()); + Assertions.assertEquals("eoisrvhmgor", model.currentState()); + Assertions.assertEquals(RecommendationTypeEnum.RE_INDEX, model.recommendationType()); + Assertions.assertEquals("scvwmzhwplef", model.implementationDetails().method()); + Assertions.assertEquals("vxilcbt", model.implementationDetails().script()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-03T00:44:07Z"), model.analyzedWorkload().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-14T23:20:53Z"), model.analyzedWorkload().endTime()); + Assertions.assertEquals(1529157680, model.analyzedWorkload().queryCount()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationDisplayTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationDisplayTests.java new file mode 100644 index 000000000000..f01790b8cae4 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationDisplayTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OperationDisplay; + +public final class OperationDisplayTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationDisplay model = BinaryData + .fromString("{\"provider\":\"zpxdt\",\"resource\":\"dm\",\"operation\":\"j\",\"description\":\"wuenvr\"}") + .toObject(OperationDisplay.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OperationDisplay model = new OperationDisplay(); + model = BinaryData.fromObject(model).toObject(OperationDisplay.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationInnerTests.java new file mode 100644 index 000000000000..8ca2f5b7c615 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationInnerTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.OperationInner; +import org.junit.jupiter.api.Assertions; + +public final class OperationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationInner model = BinaryData.fromString( + "{\"name\":\"xt\",\"display\":{\"provider\":\"mhjglikkxwslolb\",\"resource\":\"vuzlm\",\"operation\":\"elfk\",\"description\":\"plcrpwjxeznoig\"},\"isDataAction\":true,\"origin\":\"user\",\"properties\":{\"azej\":\"datakpnb\",\"hsxttaugzxnf\":\"dataoqkag\"}}") + .toObject(OperationInner.class); + Assertions.assertTrue(model.isDataAction()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OperationInner model = new OperationInner().withIsDataAction(true); + model = BinaryData.fromObject(model).toObject(OperationInner.class); + Assertions.assertTrue(model.isDataAction()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationListTests.java new file mode 100644 index 000000000000..db88f539f891 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationListTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.OperationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OperationList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class OperationListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationList model = BinaryData.fromString( + "{\"value\":[{\"name\":\"grjguufzd\",\"display\":{\"provider\":\"qtfihwhbotzinga\",\"resource\":\"pph\",\"operation\":\"zqzudph\",\"description\":\"mvdk\"},\"isDataAction\":false,\"origin\":\"system\",\"properties\":{\"atkzwpcnpw\":\"datatbvkayhmtnvyq\",\"cyajguqf\":\"datacjaesgvvs\"}},{\"name\":\"ygz\",\"display\":{\"provider\":\"nk\",\"resource\":\"usemdwzrmuhap\",\"operation\":\"qdpsqxqvpsvu\",\"description\":\"mgccelvezrypq\"},\"isDataAction\":false,\"origin\":\"user\",\"properties\":{\"kobopgxed\":\"datarqwky\",\"ccsnjvcdwxlpq\":\"dataowepbqpcrfkb\",\"wfqatmtd\":\"datakftnkhtjsyin\",\"ywkbirryuzhlhkjo\":\"datatmdvypgikdgs\"}},{\"name\":\"vqqaatjinrvgo\",\"display\":{\"provider\":\"fiibfggjioolvr\",\"resource\":\"kvtkkg\",\"operation\":\"qwjygvja\",\"description\":\"blmhvkzuhb\"},\"isDataAction\":false,\"origin\":\"user\",\"properties\":{\"wz\":\"dataopbyrqufegxu\"}},{\"name\":\"nhlmctlpdng\",\"display\":{\"provider\":\"gbmhrixkwmyi\",\"resource\":\"jvegrhbpnaixexcc\",\"operation\":\"reaxhcexdr\",\"description\":\"qahqkghtpwijn\"},\"isDataAction\":true,\"origin\":\"system\",\"properties\":{\"mtg\":\"datacxzbfvoowvr\",\"y\":\"dataqp\",\"ronzmyhgfip\":\"datas\"}}],\"nextLink\":\"xkmcwaekrrjre\"}") + .toObject(OperationList.class); + Assertions.assertFalse(model.value().get(0).isDataAction()); + Assertions.assertEquals("xkmcwaekrrjre", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OperationList model = new OperationList().withValue( + Arrays.asList(new OperationInner().withIsDataAction(false), new OperationInner().withIsDataAction(false), + new OperationInner().withIsDataAction(false), new OperationInner().withIsDataAction(true))) + .withNextLink("xkmcwaekrrjre"); + model = BinaryData.fromObject(model).toObject(OperationList.class); + Assertions.assertFalse(model.value().get(0).isDataAction()); + Assertions.assertEquals("xkmcwaekrrjre", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListMockTests.java index 1af78e32632b..7f39c3fcd04e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListMockTests.java @@ -22,7 +22,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"pzhz\",\"display\":{\"provider\":\"sjcitdigsxc\",\"resource\":\"l\",\"operation\":\"lkeuac\",\"description\":\"omflrytswfp\"},\"isDataAction\":true,\"origin\":\"system\",\"properties\":{\"yslu\":\"datanmskwhqj\"}}]}"; + = "{\"value\":[{\"name\":\"lpshhkvpedwqslsr\",\"display\":{\"provider\":\"qvwwsko\",\"resource\":\"cbrwi\",\"operation\":\"vqejosovy\",\"description\":\"leaesi\"},\"isDataAction\":true,\"origin\":\"system\",\"properties\":{\"cy\":\"dataobbpihehc\",\"kfrexcrseqwjks\":\"datamrqbrjbbmpxdlv\",\"zhxogjggsvo\":\"datahud\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/GetPrivateDnsZoneSuffixesExecuteWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixesGetWithResponseMockTests.java similarity index 75% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/GetPrivateDnsZoneSuffixesExecuteWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixesGetWithResponseMockTests.java index b6673ecda65d..3c7a290f5887 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/GetPrivateDnsZoneSuffixesExecuteWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixesGetWithResponseMockTests.java @@ -16,10 +16,10 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class GetPrivateDnsZoneSuffixesExecuteWithResponseMockTests { +public final class PrivateDnsZoneSuffixesGetWithResponseMockTests { @Test - public void testExecuteWithResponse() throws Exception { - String responseStr = "\"lpshhkvpedwqslsr\""; + public void testGetWithResponse() throws Exception { + String responseStr = "\"jkxibda\""; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -28,9 +28,8 @@ public void testExecuteWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - String response - = manager.getPrivateDnsZoneSuffixes().executeWithResponse(com.azure.core.util.Context.NONE).getValue(); + String response = manager.privateDnsZoneSuffixes().getWithResponse(com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("lpshhkvpedwqslsr", response); + Assertions.assertEquals("jkxibda", response); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionInnerTests.java new file mode 100644 index 000000000000..c186bef8cc30 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionInnerTests.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.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpoint; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionInner model = BinaryData.fromString( + "{\"properties\":{\"groupIds\":[\"uaibrebqaaysj\"],\"privateEndpoint\":{\"id\":\"qtnqtt\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"fffiak\",\"actionsRequired\":\"pqqmted\"},\"provisioningState\":\"Succeeded\"},\"id\":\"jihy\",\"name\":\"ozphvwauyqncygu\",\"type\":\"kvi\"}") + .toObject(PrivateEndpointConnectionInner.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("fffiak", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("pqqmted", model.privateLinkServiceConnectionState().actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpointConnectionInner model + = new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) + .withDescription("fffiak") + .withActionsRequired("pqqmted")); + model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("fffiak", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("pqqmted", model.privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionListTests.java new file mode 100644 index 000000000000..7abc69caa1f2 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionListTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnectionList; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"groupIds\":[\"ntwjch\",\"dgoihxumwctondzj\",\"uu\"],\"privateEndpoint\":{\"id\":\"lwg\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"bwtovvtgseinqf\",\"actionsRequired\":\"fxqknpirgneptt\"},\"provisioningState\":\"Creating\"},\"id\":\"niffcdmqnroj\",\"name\":\"pij\",\"type\":\"k\"}],\"nextLink\":\"frddhcrati\"}") + .toObject(PrivateEndpointConnectionList.class); + Assertions.assertEquals("frddhcrati", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpointConnectionList model = new PrivateEndpointConnectionList().withNextLink("frddhcrati"); + model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionList.class); + Assertions.assertEquals("frddhcrati", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionPropertiesTests.java new file mode 100644 index 000000000000..fd46c37f8195 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionPropertiesTests.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.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionProperties; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpoint; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionProperties model = BinaryData.fromString( + "{\"groupIds\":[\"scw\",\"qupevzh\",\"stotxh\",\"jujbypelmcuvhixb\"],\"privateEndpoint\":{\"id\":\"fw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"coolsttpkiwkkb\",\"actionsRequired\":\"jrywvtylbfpnc\"},\"provisioningState\":\"Creating\"}") + .toObject(PrivateEndpointConnectionProperties.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("coolsttpkiwkkb", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("jrywvtylbfpnc", model.privateLinkServiceConnectionState().actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpointConnectionProperties model + = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) + .withDescription("coolsttpkiwkkb") + .withActionsRequired("jrywvtylbfpnc")); + model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("coolsttpkiwkkb", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("jrywvtylbfpnc", model.privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java index 379f24c98b72..6d28655f657d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class PrivateEndpointConnectionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"groupIds\":[\"nu\",\"tljqobbpih\"],\"privateEndpoint\":{\"id\":\"ecybmrqbrj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"xdlvykfrexc\",\"actionsRequired\":\"eqwjksgh\"},\"provisioningState\":\"Creating\"},\"id\":\"hxogjggsvoujkxi\",\"name\":\"dafhr\",\"type\":\"mdyomkxfbvfbh\"}"; + = "{\"properties\":{\"groupIds\":[\"eimawzovgkkumui\",\"jcjcazt\",\"wsnsqowx\"],\"privateEndpoint\":{\"id\":\"mlikytw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"swkacvej\",\"actionsRequired\":\"dvlvhbwrnfxtgdd\"},\"provisioningState\":\"Succeeded\"},\"id\":\"ehnmnaoyankco\",\"name\":\"qswankltytmhdr\",\"type\":\"znnhd\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateEndpointConnection response = manager.privateEndpointConnections() - .getWithResponse("mpqvwwsk", "ndcbrwi", "uvqejosovyrrle", com.azure.core.util.Context.NONE) + .getWithResponse("hrkmdyomkxfbvfbh", "y", "rhpw", com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("xdlvykfrexc", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("eqwjksgh", response.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("swkacvej", response.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("dvlvhbwrnfxtgdd", response.privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerMockTests.java index cb744ed5767e..bf3d58a68487 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerMockTests.java @@ -23,7 +23,7 @@ public final class PrivateEndpointConnectionsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"groupIds\":[\"eimawzovgkkumui\",\"jcjcazt\",\"wsnsqowx\"],\"privateEndpoint\":{\"id\":\"mlikytw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"swkacvej\",\"actionsRequired\":\"dvlvhbwrnfxtgdd\"},\"provisioningState\":\"Succeeded\"},\"id\":\"ehnmnaoyankco\",\"name\":\"qswankltytmhdr\",\"type\":\"znnhd\"}]}"; + = "{\"value\":[{\"properties\":{\"groupIds\":[\"jpmcub\",\"mifoxxkub\"],\"privateEndpoint\":{\"id\":\"avp\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"bqgvgovpbbtte\",\"actionsRequired\":\"oknssqyzqedikdf\"},\"provisioningState\":\"Deleting\"},\"id\":\"qmrjg\",\"name\":\"ihfqlggwfiwzc\",\"type\":\"mjpb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,13 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.privateEndpointConnections().listByServer("y", "rhpw", com.azure.core.util.Context.NONE); + = manager.privateEndpointConnections().listByServer("d", "fypiv", com.azure.core.util.Context.NONE); Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("swkacvej", + Assertions.assertEquals("bqgvgovpbbtte", response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dvlvhbwrnfxtgdd", + Assertions.assertEquals("oknssqyzqedikdf", response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationsUpdateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateMockTests.java similarity index 96% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationsUpdateMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateMockTests.java index 5cf96841db06..b2657b3bf9e9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationsUpdateMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateMockTests.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class PrivateEndpointConnectionOperationsUpdateMockTests { +public final class PrivateEndpointConnectionsUpdateMockTests { @Test public void testUpdate() throws Exception { String responseStr @@ -34,7 +34,7 @@ public void testUpdate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PrivateEndpointConnection response = manager.privateEndpointConnectionOperations() + PrivateEndpointConnection response = manager.privateEndpointConnections() .update("lktgjc", "gguxhemlwyw", "eeczgfbu", new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointTests.java new file mode 100644 index 000000000000..a4c31e75acd2 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpoint; + +public final class PrivateEndpointTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpoint model = BinaryData.fromString("{\"id\":\"iwii\"}").toObject(PrivateEndpoint.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpoint model = new PrivateEndpoint(); + model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceInnerTests.java new file mode 100644 index 000000000000..cdbd27ea0fd1 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceInnerTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateLinkResourceInner; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceInner model = BinaryData.fromString( + "{\"properties\":{\"groupId\":\"rsre\",\"requiredMembers\":[\"xurisjnhnyt\",\"ifqjz\",\"xmrhu\",\"lw\"],\"requiredZoneNames\":[\"sutrgjup\",\"uutpwoqhih\",\"jqgwzp\",\"fqntcyp\"]},\"id\":\"jv\",\"name\":\"oimwkslirc\",\"type\":\"zjxvydfcea\"}") + .toObject(PrivateLinkResourceInner.class); + Assertions.assertEquals("sutrgjup", model.requiredZoneNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateLinkResourceInner model = new PrivateLinkResourceInner() + .withRequiredZoneNames(Arrays.asList("sutrgjup", "uutpwoqhih", "jqgwzp", "fqntcyp")); + model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); + Assertions.assertEquals("sutrgjup", model.requiredZoneNames().get(0)); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceListTests.java new file mode 100644 index 000000000000..b446270bfe9f --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceListTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkResourceList; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"groupId\":\"asxifto\",\"requiredMembers\":[\"zh\",\"tw\",\"sgogczhonnxk\",\"lgnyhmo\"],\"requiredZoneNames\":[\"kkgthr\"]},\"id\":\"hxjbdhqxvc\",\"name\":\"gf\",\"type\":\"pdso\"},{\"properties\":{\"groupId\":\"hrnsvbu\",\"requiredMembers\":[\"vz\",\"ybycnunvj\",\"rtkfawnopq\"],\"requiredZoneNames\":[\"yzirtxdyuxzejn\",\"psew\",\"ioilqukrydxtq\"]},\"id\":\"eoxorggufhyao\",\"name\":\"tbghhavgrvkf\",\"type\":\"ovjzhpjbibgjmfx\"},{\"properties\":{\"groupId\":\"fcluyov\",\"requiredMembers\":[\"bkfezzxscyhwzdgi\",\"ujb\",\"bomvzzbtdcqv\"],\"requiredZoneNames\":[\"yujviylwdshfssn\",\"bgye\",\"rymsgaojfmw\",\"cotmr\"]},\"id\":\"irctymoxoftpipiw\",\"name\":\"czuhxacpqjlihh\",\"type\":\"usps\"}],\"nextLink\":\"sdvlmfwdgzxulucv\"}") + .toObject(PrivateLinkResourceList.class); + Assertions.assertEquals("sdvlmfwdgzxulucv", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateLinkResourceList model = new PrivateLinkResourceList().withNextLink("sdvlmfwdgzxulucv"); + model = BinaryData.fromObject(model).toObject(PrivateLinkResourceList.class); + Assertions.assertEquals("sdvlmfwdgzxulucv", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcePropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcePropertiesTests.java new file mode 100644 index 000000000000..79db0b00ca1d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcePropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateLinkResourceProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceProperties model = BinaryData.fromString( + "{\"groupId\":\"lhvygdyftu\",\"requiredMembers\":[\"wnawjslbiw\",\"ojgcyzt\",\"fmznba\",\"qphchqnrnrpxehuw\"],\"requiredZoneNames\":[\"qgaifmviklbydv\"]}") + .toObject(PrivateLinkResourceProperties.class); + Assertions.assertEquals("qgaifmviklbydv", model.requiredZoneNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateLinkResourceProperties model + = new PrivateLinkResourceProperties().withRequiredZoneNames(Arrays.asList("qgaifmviklbydv")); + model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); + Assertions.assertEquals("qgaifmviklbydv", model.requiredZoneNames().get(0)); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetWithResponseMockTests.java index cf2c94484b4c..40a7778e4ed7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class PrivateLinkResourcesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"groupId\":\"vrcmyfqipgxhnpo\",\"requiredMembers\":[\"wcabvnuileeya\",\"wlpaugmrmfjlrxwt\",\"aukhfkvcisiz\"],\"requiredZoneNames\":[\"eds\"]},\"id\":\"wuived\",\"name\":\"cgyee\",\"type\":\"xeiqbpsmg\"}"; + = "{\"properties\":{\"groupId\":\"aoypny\",\"requiredMembers\":[\"hxcylhkgm\",\"sghpx\",\"cphdrwjjkhvyo\"],\"requiredZoneNames\":[\"luzvxnq\"]},\"id\":\"rpqpd\",\"name\":\"wmkoisq\",\"type\":\"ssffxuifmc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateLinkResource response = manager.privateLinkResources() - .getWithResponse("lg", "wfiwzcxmj", "byephmgt", com.azure.core.util.Context.NONE) + .getWithResponse("gmsplzgaufcshhv", "ewgnxkympqanxrj", "ixt", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("eds", response.requiredZoneNames().get(0)); + Assertions.assertEquals("luzvxnq", response.requiredZoneNames().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerMockTests.java index 2ae1bc7ba7e3..996f3255803f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerMockTests.java @@ -22,7 +22,7 @@ public final class PrivateLinkResourcesListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"bjpmcubk\",\"requiredMembers\":[\"oxxkubvp\"],\"requiredZoneNames\":[\"pmhbrbq\"]},\"id\":\"govpbbtte\",\"name\":\"joknssqyzqedik\",\"type\":\"frdbiqmrjgeihf\"}]}"; + = "{\"value\":[{\"properties\":{\"groupId\":\"myqwcab\",\"requiredMembers\":[\"ilee\"],\"requiredZoneNames\":[\"wlpaugmrmfjlrxwt\",\"aukhfkvcisiz\",\"oaedsxjwuivedwcg\"]},\"id\":\"ewxeiqbpsm\",\"name\":\"omguamlj\",\"type\":\"l\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.privateLinkResources().listByServer("d", "fypiv", com.azure.core.util.Context.NONE); + = manager.privateLinkResources().listByServer("ephmgtvljvrcmyfq", "pgxh", com.azure.core.util.Context.NONE); - Assertions.assertEquals("pmhbrbq", response.iterator().next().requiredZoneNames().get(0)); + Assertions.assertEquals("wlpaugmrmfjlrxwt", response.iterator().next().requiredZoneNames().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkServiceConnectionStateTests.java new file mode 100644 index 000000000000..e0ed2d208bbf --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkServiceConnectionStateTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkServiceConnectionStateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkServiceConnectionState model + = BinaryData.fromString("{\"status\":\"Pending\",\"description\":\"wubxc\",\"actionsRequired\":\"h\"}") + .toObject(PrivateLinkServiceConnectionState.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); + Assertions.assertEquals("wubxc", model.description()); + Assertions.assertEquals("h", model.actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateLinkServiceConnectionState model + = new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.PENDING) + .withDescription("wubxc") + .withActionsRequired("h"); + model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); + Assertions.assertEquals("wubxc", model.description()); + Assertions.assertEquals("h", model.actionsRequired()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageInnerTests.java new file mode 100644 index 000000000000..5ef1a452572b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageInnerTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.QuotaUsageInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.NameProperty; +import org.junit.jupiter.api.Assertions; + +public final class QuotaUsageInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + QuotaUsageInner model = BinaryData.fromString( + "{\"name\":{\"value\":\"ostgkts\",\"localizedValue\":\"dxeclzedqbcvh\"},\"limit\":236699607082183058,\"unit\":\"odqkdlwwqfb\",\"currentValue\":3679022657074806419,\"id\":\"trqjfsmlmbtx\"}") + .toObject(QuotaUsageInner.class); + Assertions.assertEquals("ostgkts", model.name().value()); + Assertions.assertEquals("dxeclzedqbcvh", model.name().localizedValue()); + Assertions.assertEquals(236699607082183058L, model.limit()); + Assertions.assertEquals("odqkdlwwqfb", model.unit()); + Assertions.assertEquals(3679022657074806419L, model.currentValue()); + Assertions.assertEquals("trqjfsmlmbtx", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + QuotaUsageInner model = new QuotaUsageInner() + .withName(new NameProperty().withValue("ostgkts").withLocalizedValue("dxeclzedqbcvh")) + .withLimit(236699607082183058L) + .withUnit("odqkdlwwqfb") + .withCurrentValue(3679022657074806419L) + .withId("trqjfsmlmbtx"); + model = BinaryData.fromObject(model).toObject(QuotaUsageInner.class); + Assertions.assertEquals("ostgkts", model.name().value()); + Assertions.assertEquals("dxeclzedqbcvh", model.name().localizedValue()); + Assertions.assertEquals(236699607082183058L, model.limit()); + Assertions.assertEquals("odqkdlwwqfb", model.unit()); + Assertions.assertEquals(3679022657074806419L, model.currentValue()); + Assertions.assertEquals("trqjfsmlmbtx", model.id()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageListTests.java new file mode 100644 index 000000000000..42f5277aa015 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageListTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.QuotaUsageList; +import org.junit.jupiter.api.Assertions; + +public final class QuotaUsageListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + QuotaUsageList model = BinaryData.fromString( + "{\"value\":[{\"name\":{\"value\":\"dznx\",\"localizedValue\":\"dsrhnjiv\"},\"limit\":8488959780262323,\"unit\":\"ovqfzge\",\"currentValue\":4588468813568796443,\"id\":\"uljltduceamtmcz\"},{\"name\":{\"value\":\"ejwcwwqiok\",\"localizedValue\":\"sx\"},\"limit\":9165184616629712222,\"unit\":\"vpkjpr\",\"currentValue\":2543879941778862448,\"id\":\"zqljyxgtczh\"},{\"name\":{\"value\":\"bsdshmkxmaehvbbx\",\"localizedValue\":\"iplt\"},\"limit\":3525559326756666639,\"unit\":\"axkgx\",\"currentValue\":1452554072563405259,\"id\":\"pyklyhpluodpvru\"}],\"nextLink\":\"lgzi\"}") + .toObject(QuotaUsageList.class); + Assertions.assertEquals("lgzi", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + QuotaUsageList model = new QuotaUsageList().withNextLink("lgzi"); + model = BinaryData.fromObject(model).toObject(QuotaUsageList.class); + Assertions.assertEquals("lgzi", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListMockTests.java index df11da6ce1a0..6d2286bcedbf 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListMockTests.java @@ -22,7 +22,7 @@ public final class QuotaUsagesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":{\"value\":\"rgmsplzga\",\"localizedValue\":\"cshhv\"},\"limit\":5821657988601371961,\"unit\":\"xkym\",\"currentValue\":5759368920772451636,\"id\":\"rjkixtw\"}]}"; + = "{\"value\":[{\"name\":{\"value\":\"ylollgtrczzydmxz\",\"localizedValue\":\"jpvuaurkihcirld\"},\"limit\":3662886964591682986,\"unit\":\"c\",\"currentValue\":4478329422803924367,\"id\":\"kjanur\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.quotaUsages().list("mguaml", com.azure.core.util.Context.NONE); + PagedIterable response = manager.quotaUsages().list("ypobkdqzr", com.azure.core.util.Context.NONE); - Assertions.assertEquals("rgmsplzga", response.iterator().next().name().value()); - Assertions.assertEquals("cshhv", response.iterator().next().name().localizedValue()); - Assertions.assertEquals(5821657988601371961L, response.iterator().next().limit()); - Assertions.assertEquals("xkym", response.iterator().next().unit()); - Assertions.assertEquals(5759368920772451636L, response.iterator().next().currentValue()); - Assertions.assertEquals("rjkixtw", response.iterator().next().id()); + Assertions.assertEquals("ylollgtrczzydmxz", response.iterator().next().name().value()); + Assertions.assertEquals("jpvuaurkihcirld", response.iterator().next().name().localizedValue()); + Assertions.assertEquals(3662886964591682986L, response.iterator().next().limit()); + Assertions.assertEquals("c", response.iterator().next().unit()); + Assertions.assertEquals(4478329422803924367L, response.iterator().next().currentValue()); + Assertions.assertEquals("kjanur", response.iterator().next().id()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicaTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicaTests.java new file mode 100644 index 000000000000..63b2baed7dd2 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicaTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ReadReplicaPromoteMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ReadReplicaPromoteOption; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Replica; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationRole; +import org.junit.jupiter.api.Assertions; + +public final class ReplicaTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Replica model = BinaryData.fromString( + "{\"role\":\"GeoAsyncReplica\",\"capacity\":118535522,\"replicationState\":\"Updating\",\"promoteMode\":\"Switchover\",\"promoteOption\":\"Forced\"}") + .toObject(Replica.class); + Assertions.assertEquals(ReplicationRole.GEO_ASYNC_REPLICA, model.role()); + Assertions.assertEquals(ReadReplicaPromoteMode.SWITCHOVER, model.promoteMode()); + Assertions.assertEquals(ReadReplicaPromoteOption.FORCED, model.promoteOption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Replica model = new Replica().withRole(ReplicationRole.GEO_ASYNC_REPLICA) + .withPromoteMode(ReadReplicaPromoteMode.SWITCHOVER) + .withPromoteOption(ReadReplicaPromoteOption.FORCED); + model = BinaryData.fromObject(model).toObject(Replica.class); + Assertions.assertEquals(ReplicationRole.GEO_ASYNC_REPLICA, model.role()); + Assertions.assertEquals(ReadReplicaPromoteMode.SWITCHOVER, model.promoteMode()); + Assertions.assertEquals(ReadReplicaPromoteOption.FORCED, model.promoteOption()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/RestartParameterTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/RestartParameterTests.java new file mode 100644 index 000000000000..beb891f591be --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/RestartParameterTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.FailoverMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter; +import org.junit.jupiter.api.Assertions; + +public final class RestartParameterTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RestartParameter model + = BinaryData.fromString("{\"restartWithFailover\":true,\"failoverMode\":\"PlannedFailover\"}") + .toObject(RestartParameter.class); + Assertions.assertTrue(model.restartWithFailover()); + Assertions.assertEquals(FailoverMode.PLANNED_FAILOVER, model.failoverMode()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RestartParameter model + = new RestartParameter().withRestartWithFailover(true).withFailoverMode(FailoverMode.PLANNED_FAILOVER); + model = BinaryData.fromObject(model).toObject(RestartParameter.class); + Assertions.assertTrue(model.restartWithFailover()); + Assertions.assertEquals(FailoverMode.PLANNED_FAILOVER, model.failoverMode()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerCapabilitiesListMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerCapabilitiesListMockTests.java deleted file mode 100644 index e7c73705ed1e..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerCapabilitiesListMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerCapability; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServerCapabilitiesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"ylnio\",\"supportedServerEditions\":[{\"name\":\"bzjedmstk\",\"defaultSkuName\":\"l\",\"supportedStorageEditions\":[{\"name\":\"uiiznktwfansnvpd\",\"defaultStorageSizeMb\":2885516766254746853,\"supportedStorageMb\":[{},{},{}],\"status\":\"Disabled\",\"reason\":\"z\"},{\"name\":\"iwbuqny\",\"defaultStorageSizeMb\":5628376431700848630,\"supportedStorageMb\":[{}],\"status\":\"Disabled\",\"reason\":\"crpfbcunez\"}],\"supportedServerSkus\":[{\"name\":\"elfwy\",\"vCores\":2072196821,\"supportedIops\":1173398556,\"supportedMemoryPerVcoreMb\":989271166878506268,\"supportedZones\":[\"psihcla\",\"zvaylptrsqqw\",\"tcmwqkchc\"],\"supportedHaMode\":[\"SameZone\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"zjkjexfdeqv\",\"status\":\"Available\",\"reason\":\"lkkshkbffmbmx\"}],\"status\":\"Available\",\"reason\":\"ywwpgjxsnptfuj\"}],\"supportedServerVersions\":[{\"name\":\"aaoepttaqut\",\"supportedVersionsToUpgrade\":[\"emxswvruu\",\"zzjgehkfki\",\"rtixokff\",\"yinljqe\"],\"supportedFeatures\":[{\"name\":\"ixmonstshiyxg\",\"status\":\"Enabled\"},{\"name\":\"clduc\",\"status\":\"Disabled\"},{\"name\":\"ds\",\"status\":\"Enabled\"}],\"status\":\"Visible\",\"reason\":\"iegstm\"}],\"supportedFeatures\":[{\"name\":\"jizcilnghgs\",\"status\":\"Disabled\"},{\"name\":\"tbxqmuluxlxq\",\"status\":\"Enabled\"},{\"name\":\"rsbycucrwn\",\"status\":\"Enabled\"},{\"name\":\"ze\",\"status\":\"Enabled\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"ziqgfuh\",\"supportedSku\":\"zruswh\",\"supportedStorageGb\":1276166311,\"supportedServerVersions\":\"znvfbycjsxjww\",\"serverCount\":184999250,\"status\":\"Default\",\"reason\":\"wmxqhndvnoamlds\"},{\"supportedTier\":\"aohdjh\",\"supportedSku\":\"lzok\",\"supportedStorageGb\":434777672,\"supportedServerVersions\":\"pelnjetag\",\"serverCount\":1066573650,\"status\":\"Disabled\",\"reason\":\"tft\"}],\"geoBackupSupported\":\"Disabled\",\"zoneRedundantHaSupported\":\"Disabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Disabled\",\"storageAutoGrowthSupported\":\"Disabled\",\"onlineResizeSupported\":\"Disabled\",\"restricted\":\"Enabled\",\"status\":\"Visible\",\"reason\":\"rmozihmipgawt\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.serverCapabilities().list("cyrcmjdmspo", "apvu", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ylnio", response.iterator().next().name()); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerEditionCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerEditionCapabilityTests.java new file mode 100644 index 000000000000..b66b303dc588 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerEditionCapabilityTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerEditionCapability; + +public final class ServerEditionCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServerEditionCapability model = BinaryData.fromString( + "{\"name\":\"wkuofoskghsauu\",\"defaultSkuName\":\"jmvxie\",\"supportedStorageEditions\":[{\"name\":\"idyjrrfbyaosvexc\",\"defaultStorageSizeMb\":2728585991559305610,\"supportedStorageMb\":[{\"supportedIops\":817727758,\"supportedMaximumIops\":675704984,\"storageSizeMb\":7973148990313454716,\"maximumStorageSizeMb\":1899078480578944633,\"supportedThroughput\":1486272447,\"supportedMaximumThroughput\":529592400,\"defaultIopsTier\":\"fbuhfmvfaxkffe\",\"supportedIopsTiers\":[{}],\"status\":\"Disabled\",\"reason\":\"m\"},{\"supportedIops\":1857517478,\"supportedMaximumIops\":2122365511,\"storageSizeMb\":2218388246099346962,\"maximumStorageSizeMb\":5112966990971322380,\"supportedThroughput\":2042967034,\"supportedMaximumThroughput\":681165656,\"defaultIopsTier\":\"igrxwburvjxxjn\",\"supportedIopsTiers\":[{},{}],\"status\":\"Default\",\"reason\":\"koen\"},{\"supportedIops\":232907016,\"supportedMaximumIops\":333094369,\"storageSizeMb\":316131865784554272,\"maximumStorageSizeMb\":5918766078843387031,\"supportedThroughput\":1340454664,\"supportedMaximumThroughput\":45967354,\"defaultIopsTier\":\"ngkpocipazy\",\"supportedIopsTiers\":[{},{},{}],\"status\":\"Disabled\",\"reason\":\"g\"}],\"status\":\"Visible\",\"reason\":\"ucgygevqz\"},{\"name\":\"yp\",\"defaultStorageSizeMb\":7669982417206267558,\"supportedStorageMb\":[{\"supportedIops\":2078386445,\"supportedMaximumIops\":1616487247,\"storageSizeMb\":8467461328750687020,\"maximumStorageSizeMb\":5607759174193347785,\"supportedThroughput\":1342514759,\"supportedMaximumThroughput\":1880549577,\"defaultIopsTier\":\"de\",\"supportedIopsTiers\":[{},{},{}],\"status\":\"Default\",\"reason\":\"w\"},{\"supportedIops\":764179455,\"supportedMaximumIops\":1909902819,\"storageSizeMb\":1558927295996088992,\"maximumStorageSizeMb\":7437509251632449086,\"supportedThroughput\":22083476,\"supportedMaximumThroughput\":643021552,\"defaultIopsTier\":\"hajdeyeamdpha\",\"supportedIopsTiers\":[{},{},{},{}],\"status\":\"Available\",\"reason\":\"xw\"},{\"supportedIops\":9013568,\"supportedMaximumIops\":1260987021,\"storageSizeMb\":8145480673542216699,\"maximumStorageSizeMb\":6256253136283246565,\"supportedThroughput\":1714142157,\"supportedMaximumThroughput\":1446067033,\"defaultIopsTier\":\"kix\",\"supportedIopsTiers\":[{},{}],\"status\":\"Default\",\"reason\":\"pu\"},{\"supportedIops\":885179399,\"supportedMaximumIops\":1846682482,\"storageSizeMb\":4290539980849845271,\"maximumStorageSizeMb\":4868014576917618697,\"supportedThroughput\":591392190,\"supportedMaximumThroughput\":1184256001,\"defaultIopsTier\":\"zrnkcqvyxlwh\",\"supportedIopsTiers\":[{},{},{},{}],\"status\":\"Available\",\"reason\":\"hoqqnwvlr\"}],\"status\":\"Disabled\",\"reason\":\"hheunmmqhgyx\"}],\"supportedServerSkus\":[{\"name\":\"ocukoklyax\",\"vCores\":891942589,\"supportedIops\":1520112594,\"supportedMemoryPerVcoreMb\":6577393684401905724,\"supportedZones\":[\"beypewrmjmw\",\"vjektcxsenh\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\",\"SameZone\",\"SameZone\"],\"supportedFeatures\":[{\"name\":\"v\",\"status\":\"Disabled\"},{\"name\":\"gbiqylihkaet\",\"status\":\"Disabled\"}],\"securityProfile\":\"fcivfsnkym\",\"status\":\"Default\",\"reason\":\"hjfbebrjcxe\"},{\"name\":\"uwutttxfvjrbi\",\"vCores\":1236632858,\"supportedIops\":684290279,\"supportedMemoryPerVcoreMb\":427273766733730009,\"supportedZones\":[\"hfnljkyq\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{\"name\":\"idokgjlj\",\"status\":\"Enabled\"},{\"name\":\"vcltbgsncgh\",\"status\":\"Enabled\"},{\"name\":\"zz\",\"status\":\"Enabled\"}],\"securityProfile\":\"htxfvgxbfsmxnehm\",\"status\":\"Visible\",\"reason\":\"xgodebfqkkrbmp\"}],\"status\":\"Visible\",\"reason\":\"iw\"}") + .toObject(ServerEditionCapability.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServerEditionCapability model = new ServerEditionCapability(); + model = BinaryData.fromObject(model).toObject(ServerEditionCapability.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuCapabilityTests.java new file mode 100644 index 000000000000..7d6be6b12e5d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuCapabilityTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerSkuCapability; + +public final class ServerSkuCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServerSkuCapability model = BinaryData.fromString( + "{\"name\":\"ykvceoveil\",\"vCores\":1344905503,\"supportedIops\":2133356892,\"supportedMemoryPerVcoreMb\":1277468706791148582,\"supportedZones\":[\"njbkcnxdhbttkph\",\"wpn\",\"jtoqne\"],\"supportedHaMode\":[\"ZoneRedundant\"],\"supportedFeatures\":[{\"name\":\"phoxus\",\"status\":\"Enabled\"},{\"name\":\"bgyepsbj\",\"status\":\"Enabled\"}],\"securityProfile\":\"ugxywpmueef\",\"status\":\"Available\",\"reason\":\"qkqujidsu\"}") + .toObject(ServerSkuCapability.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServerSkuCapability model = new ServerSkuCapability(); + model = BinaryData.fromObject(model).toObject(ServerSkuCapability.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuTests.java new file mode 100644 index 000000000000..804ae16be3aa --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerSku; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; +import org.junit.jupiter.api.Assertions; + +public final class ServerSkuTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServerSku model + = BinaryData.fromString("{\"name\":\"ty\",\"tier\":\"MemoryOptimized\"}").toObject(ServerSku.class); + Assertions.assertEquals("ty", model.name()); + Assertions.assertEquals(SkuTier.MEMORY_OPTIMIZED, model.tier()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServerSku model = new ServerSku().withName("ty").withTier(SkuTier.MEMORY_OPTIMIZED); + model = BinaryData.fromObject(model).toObject(ServerSku.class); + Assertions.assertEquals("ty", model.name()); + Assertions.assertEquals(SkuTier.MEMORY_OPTIMIZED, model.tier()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateMockTests.java index ef5cbc0affc3..30661eca4524 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateMockTests.java @@ -10,7 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettingsModel; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettingsModel; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState; import java.nio.charset.StandardCharsets; @@ -23,7 +23,7 @@ public final class ServerThreatProtectionSettingsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-01-23T08:15:21Z\"},\"id\":\"gyki\",\"name\":\"emv\",\"type\":\"nbwzohmnrxxbso\"}"; + = "{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-01-18T07:47:20Z\"},\"id\":\"kdlpa\",\"name\":\"zrcxfailcfxwmdbo\",\"type\":\"dfgsftufqobrj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testCreateOrUpdate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ServerThreatProtectionSettingsModel response = manager.serverThreatProtectionSettings() + AdvancedThreatProtectionSettingsModel response = manager.serverThreatProtectionSettings() .define(ThreatProtectionName.DEFAULT) - .withExistingFlexibleServer("laqacigele", "hdbvqvwzkjop") + .withExistingFlexibleServer("dmdqb", "pypqtgsfj") .withState(ThreatProtectionState.DISABLED) .create(); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerVersionCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerVersionCapabilityTests.java new file mode 100644 index 000000000000..8d526b7160a4 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerVersionCapabilityTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersionCapability; + +public final class ServerVersionCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServerVersionCapability model = BinaryData.fromString( + "{\"name\":\"mgyudxytlmoyrxv\",\"supportedVersionsToUpgrade\":[\"dw\"],\"supportedFeatures\":[{\"name\":\"xhdzhlrqjbhckf\",\"status\":\"Enabled\"},{\"name\":\"xsbkyvpyca\",\"status\":\"Enabled\"},{\"name\":\"p\",\"status\":\"Enabled\"},{\"name\":\"kuwbcrnwb\",\"status\":\"Enabled\"}],\"status\":\"Available\",\"reason\":\"yvjusrtslhsp\"}") + .toObject(ServerVersionCapability.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServerVersionCapability model = new ServerVersionCapability(); + model = BinaryData.fromObject(model).toObject(ServerVersionCapability.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteMockTests.java deleted file mode 100644 index 4e0a529cad19..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.servers().delete("uughtuqfecjxeyg", "uhxu", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartMockTests.java deleted file mode 100644 index d6639dd41255..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FailoverMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServersRestartMockTests { - @Test - public void testRestart() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.servers() - .restart("er", "htvs", - new RestartParameter().withRestartWithFailover(true).withFailoverMode(FailoverMode.PLANNED_SWITCHOVER), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartMockTests.java deleted file mode 100644 index 0f3b46898fa9..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServersStartMockTests { - @Test - public void testStart() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.servers().start("ntsj", "qrsxyp", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopMockTests.java deleted file mode 100644 index ce90e0af8699..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServersStopMockTests { - @Test - public void testStop() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.servers().stop("uuuybnchrsziz", "yuel", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuForPatchTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuForPatchTests.java new file mode 100644 index 000000000000..b182cc001ffc --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuForPatchTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; +import org.junit.jupiter.api.Assertions; + +public final class SkuForPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SkuForPatch model + = BinaryData.fromString("{\"name\":\"j\",\"tier\":\"MemoryOptimized\"}").toObject(SkuForPatch.class); + Assertions.assertEquals("j", model.name()); + Assertions.assertEquals(SkuTier.MEMORY_OPTIMIZED, model.tier()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SkuForPatch model = new SkuForPatch().withName("j").withTier(SkuTier.MEMORY_OPTIMIZED); + model = BinaryData.fromObject(model).toObject(SkuForPatch.class); + Assertions.assertEquals("j", model.name()); + Assertions.assertEquals(SkuTier.MEMORY_OPTIMIZED, model.tier()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuTests.java new file mode 100644 index 000000000000..1e63fe910f81 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; +import org.junit.jupiter.api.Assertions; + +public final class SkuTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Sku model = BinaryData.fromString("{\"name\":\"rk\",\"tier\":\"Burstable\"}").toObject(Sku.class); + Assertions.assertEquals("rk", model.name()); + Assertions.assertEquals(SkuTier.BURSTABLE, model.tier()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Sku model = new Sku().withName("rk").withTier(SkuTier.BURSTABLE); + model = BinaryData.fromObject(model).toObject(Sku.class); + Assertions.assertEquals("rk", model.name()); + Assertions.assertEquals(SkuTier.BURSTABLE, model.tier()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageEditionCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageEditionCapabilityTests.java new file mode 100644 index 000000000000..f65e54374f4a --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageEditionCapabilityTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageEditionCapability; + +public final class StorageEditionCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StorageEditionCapability model = BinaryData.fromString( + "{\"name\":\"zlfbxzpuzycispnq\",\"defaultStorageSizeMb\":276524201323621430,\"supportedStorageMb\":[{\"supportedIops\":318334591,\"supportedMaximumIops\":567432535,\"storageSizeMb\":7247932824726952770,\"maximumStorageSizeMb\":762877145565948123,\"supportedThroughput\":312010573,\"supportedMaximumThroughput\":486608625,\"defaultIopsTier\":\"ik\",\"supportedIopsTiers\":[{\"name\":\"vtq\",\"iops\":122034029,\"status\":\"Available\",\"reason\":\"nhijggmebfsi\"},{\"name\":\"butr\",\"iops\":1477198207,\"status\":\"Disabled\",\"reason\":\"zmhjrunmp\"}],\"status\":\"Default\",\"reason\":\"bh\"},{\"supportedIops\":826548714,\"supportedMaximumIops\":1474388654,\"storageSizeMb\":1322573122193945613,\"maximumStorageSizeMb\":8942368239178938465,\"supportedThroughput\":734884561,\"supportedMaximumThroughput\":1438226066,\"defaultIopsTier\":\"nbtkcxywnytnr\",\"supportedIopsTiers\":[{\"name\":\"qidybyx\",\"iops\":2121722850,\"status\":\"Default\",\"reason\":\"aaxdbabphlwrq\"},{\"name\":\"ktsthsucocmny\",\"iops\":533461500,\"status\":\"Visible\",\"reason\":\"twwrqp\"},{\"name\":\"dckzywbiexz\",\"iops\":1043765409,\"status\":\"Available\",\"reason\":\"xibxujwbhqwalm\"}],\"status\":\"Visible\",\"reason\":\"xaepdkzjancuxr\"},{\"supportedIops\":714190447,\"supportedMaximumIops\":1879785159,\"storageSizeMb\":8686302020366055834,\"maximumStorageSizeMb\":6669094246951991149,\"supportedThroughput\":485576970,\"supportedMaximumThroughput\":413176852,\"defaultIopsTier\":\"tsdbpgn\",\"supportedIopsTiers\":[{\"name\":\"hpzxbzpfzab\",\"iops\":687811406,\"status\":\"Visible\",\"reason\":\"wtctyqi\"}],\"status\":\"Disabled\",\"reason\":\"ovplw\"},{\"supportedIops\":869574502,\"supportedMaximumIops\":487628587,\"storageSizeMb\":151235075959718301,\"maximumStorageSizeMb\":4627558794387697712,\"supportedThroughput\":1732351990,\"supportedMaximumThroughput\":1013735837,\"defaultIopsTier\":\"sxqu\",\"supportedIopsTiers\":[{\"name\":\"l\",\"iops\":1362242180,\"status\":\"Default\",\"reason\":\"kjz\"}],\"status\":\"Visible\",\"reason\":\"lpvlopw\"}],\"status\":\"Available\",\"reason\":\"hxpkd\"}") + .toObject(StorageEditionCapability.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StorageEditionCapability model = new StorageEditionCapability(); + model = BinaryData.fromObject(model).toObject(StorageEditionCapability.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageMbCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageMbCapabilityTests.java new file mode 100644 index 000000000000..6e902260d2e8 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageMbCapabilityTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageMbCapability; + +public final class StorageMbCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StorageMbCapability model = BinaryData.fromString( + "{\"supportedIops\":1060544654,\"supportedMaximumIops\":413325201,\"storageSizeMb\":3085775452141512212,\"maximumStorageSizeMb\":574738342939177032,\"supportedThroughput\":1617320432,\"supportedMaximumThroughput\":635482352,\"defaultIopsTier\":\"ped\",\"supportedIopsTiers\":[{\"name\":\"a\",\"iops\":996509936,\"status\":\"Default\",\"reason\":\"txp\"}],\"status\":\"Default\",\"reason\":\"tfhvpesapskrdqmh\"}") + .toObject(StorageMbCapability.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StorageMbCapability model = new StorageMbCapability(); + model = BinaryData.fromObject(model).toObject(StorageMbCapability.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTests.java new file mode 100644 index 000000000000..c5f32b6e2ab2 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTier; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrow; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageType; +import org.junit.jupiter.api.Assertions; + +public final class StorageTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Storage model = BinaryData.fromString( + "{\"storageSizeGB\":1828523289,\"autoGrow\":\"Enabled\",\"tier\":\"P3\",\"iops\":836392203,\"throughput\":313242233,\"type\":\"Premium_LRS\"}") + .toObject(Storage.class); + Assertions.assertEquals(1828523289, model.storageSizeGB()); + Assertions.assertEquals(StorageAutoGrow.ENABLED, model.autoGrow()); + Assertions.assertEquals(AzureManagedDiskPerformanceTier.P3, model.tier()); + Assertions.assertEquals(836392203, model.iops()); + Assertions.assertEquals(313242233, model.throughput()); + Assertions.assertEquals(StorageType.PREMIUM_LRS, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Storage model = new Storage().withStorageSizeGB(1828523289) + .withAutoGrow(StorageAutoGrow.ENABLED) + .withTier(AzureManagedDiskPerformanceTier.P3) + .withIops(836392203) + .withThroughput(313242233) + .withType(StorageType.PREMIUM_LRS); + model = BinaryData.fromObject(model).toObject(Storage.class); + Assertions.assertEquals(1828523289, model.storageSizeGB()); + Assertions.assertEquals(StorageAutoGrow.ENABLED, model.autoGrow()); + Assertions.assertEquals(AzureManagedDiskPerformanceTier.P3, model.tier()); + Assertions.assertEquals(836392203, model.iops()); + Assertions.assertEquals(313242233, model.throughput()); + Assertions.assertEquals(StorageType.PREMIUM_LRS, model.type()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTierCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTierCapabilityTests.java new file mode 100644 index 000000000000..3df6574b3866 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTierCapabilityTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageTierCapability; + +public final class StorageTierCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StorageTierCapability model = BinaryData + .fromString("{\"name\":\"dhtldwkyz\",\"iops\":1335454628,\"status\":\"Visible\",\"reason\":\"cwscwsvlx\"}") + .toObject(StorageTierCapability.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StorageTierCapability model = new StorageTierCapability(); + model = BinaryData.fromObject(model).toObject(StorageTierCapability.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SupportedFeatureTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SupportedFeatureTests.java new file mode 100644 index 000000000000..ba1803665412 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SupportedFeatureTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SupportedFeature; + +public final class SupportedFeatureTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SupportedFeature model + = BinaryData.fromString("{\"name\":\"nobglaocq\",\"status\":\"Enabled\"}").toObject(SupportedFeature.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SupportedFeature model = new SupportedFeature(); + model = BinaryData.fromObject(model).toObject(SupportedFeature.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationsListSessionDetailsMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationsListSessionDetailsMockTests.java deleted file mode 100644 index bf6ed55b8b4b..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationsListSessionDetailsMockTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SessionDetailsResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TuningConfigurationsListSessionDetailsMockTests { - @Test - public void testListSessionDetails() throws Exception { - String responseStr - = "{\"value\":[{\"iterationId\":\"mecvogygzyvneeza\",\"sessionId\":\"gh\",\"appliedConfiguration\":\"oqqtl\",\"iterationStartTime\":\"hzbkrkjj\",\"averageQueryRuntimeMs\":\"vfqnvhnqoewdo\",\"transactionsPerSecond\":\"yetesy\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.tuningConfigurations() - .listSessionDetails("ygbpvnwswmt", "k", TuningOptionEnum.INDEX, "twwgzwx", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mecvogygzyvneeza", response.iterator().next().iterationId()); - Assertions.assertEquals("gh", response.iterator().next().sessionId()); - Assertions.assertEquals("oqqtl", response.iterator().next().appliedConfiguration()); - Assertions.assertEquals("hzbkrkjj", response.iterator().next().iterationStartTime()); - Assertions.assertEquals("vfqnvhnqoewdo", response.iterator().next().averageQueryRuntimeMs()); - Assertions.assertEquals("yetesy", response.iterator().next().transactionsPerSecond()); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationsListSessionsMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationsListSessionsMockTests.java deleted file mode 100644 index 740b03e018d0..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationsListSessionsMockTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SessionResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TuningConfigurationsListSessionsMockTests { - @Test - public void testListSessions() throws Exception { - String responseStr - = "{\"value\":[{\"sessionStartTime\":\"tlbijpzg\",\"sessionId\":\"srfhf\",\"status\":\"lmknbnxwcdom\",\"preTuningAqr\":\"vfqawzfgbrttuiac\",\"postTuningAqr\":\"iexhajl\",\"preTuningTps\":\"t\",\"postTuningTps\":\"qfyuttd\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.tuningConfigurations() - .listSessions("wvqsgny", "uuzivensrpmeyyvp", TuningOptionEnum.INDEX, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("tlbijpzg", response.iterator().next().sessionStartTime()); - Assertions.assertEquals("srfhf", response.iterator().next().sessionId()); - Assertions.assertEquals("lmknbnxwcdom", response.iterator().next().status()); - Assertions.assertEquals("vfqawzfgbrttuiac", response.iterator().next().preTuningAqr()); - Assertions.assertEquals("iexhajl", response.iterator().next().postTuningAqr()); - Assertions.assertEquals("t", response.iterator().next().preTuningTps()); - Assertions.assertEquals("qfyuttd", response.iterator().next().postTuningTps()); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningIndexesListRecommendationsMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningIndexesListRecommendationsMockTests.java deleted file mode 100644 index 6d0d63923e8d..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningIndexesListRecommendationsMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TuningIndexesListRecommendationsMockTests { - @Test - public void testListRecommendations() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"initialRecommendedTime\":\"2021-08-14T01:37:51Z\",\"lastRecommendedTime\":\"2021-05-27T22:38:34Z\",\"timesRecommended\":1214046395,\"improvedQueryIds\":[1464612539790608915,8608381823862362175,5891893224233637084,7315546447064539633],\"recommendationReason\":\"tzlswvaj\",\"recommendationType\":\"DropIndex\",\"implementationDetails\":{\"method\":\"x\",\"script\":\"qzasunwqrjzfrgqh\"},\"analyzedWorkload\":{\"startTime\":\"2021-04-05T15:21:07Z\",\"endTime\":\"2021-06-25T08:11:06Z\",\"queryCount\":280737276},\"estimatedImpact\":[{\"dimensionName\":\"r\",\"unit\":\"mbpyryxamebly\",\"queryId\":5825870420723879875,\"absoluteValue\":47.90070362234346},{\"dimensionName\":\"ocxnehvsmtodl\",\"unit\":\"yapucygvoa\",\"queryId\":6485859784985209976,\"absoluteValue\":72.88003049869354},{\"dimensionName\":\"ghiee\",\"unit\":\"lgvvpaseksgbu\",\"queryId\":6893190449137526055,\"absoluteValue\":92.07427386165983}],\"details\":{\"databaseName\":\"gaqi\",\"schema\":\"rpiwrqofulo\",\"table\":\"jnlex\",\"indexType\":\"cbjpibkephuu\",\"indexName\":\"rctat\",\"indexColumns\":[\"ntqpbr\",\"cyrduczkg\",\"fxyfsrucvcrrpcj\"],\"includedColumns\":[\"st\",\"jeaq\"]}},\"id\":\"mvvfko\",\"name\":\"mlghktuidvrmazlp\",\"type\":\"wwexymzvlazipbh\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.tuningIndexes() - .listRecommendations("z", "izvg", TuningOptionEnum.INDEX, RecommendationType.CREATE_INDEX, - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsInnerTests.java new file mode 100644 index 000000000000..b3a7f4fdb9fd --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsInnerTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; + +public final class TuningOptionsInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TuningOptionsInner model + = BinaryData.fromString("{\"id\":\"yhddvia\",\"name\":\"egfnmntfpmvmemfn\",\"type\":\"zdwvvbalxl\"}") + .toObject(TuningOptionsInner.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TuningOptionsInner model = new TuningOptionsInner(); + model = BinaryData.fromObject(model).toObject(TuningOptionsInner.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListTests.java new file mode 100644 index 000000000000..d3fb62b57dce --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class TuningOptionsListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TuningOptionsList model = BinaryData.fromString( + "{\"value\":[{\"id\":\"jcjbt\",\"name\":\"gaehvvibrxjjst\",\"type\":\"qbeitpkxztmoob\"},{\"id\":\"ft\",\"name\":\"dgfcwqmp\",\"type\":\"maqxzhemjyh\"},{\"id\":\"uj\",\"name\":\"wtwko\",\"type\":\"zwculkbawpfajnj\"}],\"nextLink\":\"tlwtjjguktalhsn\"}") + .toObject(TuningOptionsList.class); + Assertions.assertEquals("tlwtjjguktalhsn", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TuningOptionsList model = new TuningOptionsList() + .withValue(Arrays.asList(new TuningOptionsInner(), new TuningOptionsInner(), new TuningOptionsInner())) + .withNextLink("tlwtjjguktalhsn"); + model = BinaryData.fromObject(model).toObject(TuningOptionsList.class); + Assertions.assertEquals("tlwtjjguktalhsn", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsGetWithResponseMockTests.java similarity index 76% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsGetWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsGetWithResponseMockTests.java index a83c42f47e02..12fb647b35c8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsGetWithResponseMockTests.java @@ -10,17 +10,17 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsResource; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptions; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class TuningOptionsGetWithResponseMockTests { +public final class TuningOptionsOperationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - String responseStr = "{\"id\":\"iufiqwo\",\"name\":\"xqvapcohh\",\"type\":\"ucqpqojxcxzrz\"}"; + String responseStr = "{\"id\":\"ghihpvecms\",\"name\":\"clbl\",\"type\":\"jxl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -29,8 +29,9 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - TuningOptionsResource response = manager.tuningOptions() - .getWithResponse("klinhmdptysprq", "gnzxojpslsvj", TuningOptionEnum.INDEX, com.azure.core.util.Context.NONE) + TuningOptions response = manager.tuningOptionsOperations() + .getWithResponse("ccxnafbwqroohtuo", "maonurj", TuningOptionParameterEnum.TABLE, + com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListByServerMockTests.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListByServerMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListByServerMockTests.java index 1198c9fb0e16..15dfbc7062e6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListByServerMockTests.java @@ -11,16 +11,16 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsResource; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptions; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class TuningOptionsListByServerMockTests { +public final class TuningOptionsOperationsListByServerMockTests { @Test public void testListByServer() throws Exception { - String responseStr = "{\"value\":[{\"id\":\"etzqd\",\"name\":\"tjwfljhznamtua\",\"type\":\"mzwcjjncqt\"}]}"; + String responseStr = "{\"value\":[{\"id\":\"k\",\"name\":\"utvlxhr\",\"type\":\"qhvmblcouqe\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -29,8 +29,8 @@ public void testListByServer() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.tuningOptions().listByServer("cgdz", "enribc", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.tuningOptionsOperations().listByServer("yskbruff", "l", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListRecommendationsMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListRecommendationsMockTests.java new file mode 100644 index 000000000000..b7dea5f701e3 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListRecommendationsMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendation; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class TuningOptionsOperationsListRecommendationsMockTests { + @Test + public void testListRecommendations() throws Exception { + String responseStr + = "{\"value\":[{\"kind\":\"rtceukdqkkyihzt\",\"properties\":{\"initialRecommendedTime\":\"2021-05-22T15:04:10Z\",\"lastRecommendedTime\":\"2021-04-01T19:50:36Z\",\"timesRecommended\":1149844590,\"improvedQueryIds\":[6059301836291431066,3026246036385723404],\"recommendationReason\":\"illcecfehu\",\"currentState\":\"oaguhic\",\"recommendationType\":\"DropIndex\",\"implementationDetails\":{\"method\":\"stacsjvhrweftkwq\",\"script\":\"pmvssehaep\"},\"analyzedWorkload\":{\"startTime\":\"2021-03-25T19:23:18Z\",\"endTime\":\"2021-08-18T20:43:29Z\",\"queryCount\":1805575440},\"estimatedImpact\":[{\"dimensionName\":\"euknijduyyes\",\"unit\":\"djfbocyv\",\"queryId\":2704241280285106932,\"absoluteValue\":37.16266942814275},{\"dimensionName\":\"ikdmhlakuflgbhga\",\"unit\":\"cdixmx\",\"queryId\":2007885947993273503,\"absoluteValue\":18.025093855472196},{\"dimensionName\":\"gdkfnoz\",\"unit\":\"oqbvjhvefgwbmqj\",\"queryId\":2962662676791309250,\"absoluteValue\":12.358462224037792},{\"dimensionName\":\"ymxbulpzealb\",\"unit\":\"kyojwyvfk\",\"queryId\":2743088131386651750,\"absoluteValue\":59.117992706724365}],\"details\":{\"databaseName\":\"gxjc\",\"schema\":\"zrrscub\",\"table\":\"sd\",\"indexType\":\"pxqwo\",\"indexName\":\"ffjxcjrmmuabwib\",\"indexColumns\":[\"gjonmcy\"],\"includedColumns\":[\"y\",\"bamwineo\",\"vfkakpold\",\"vevboclzh\"]}},\"id\":\"knyuxgvttxpn\",\"name\":\"upzaamrdixtre\",\"type\":\"ids\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PostgreSqlManager manager = PostgreSqlManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.tuningOptionsOperations() + .listRecommendations("bsjuscvsfx", "gctmgxuupbezq", TuningOptionParameterEnum.TABLE, + RecommendationTypeParameterEnum.DROP_INDEX, com.azure.core.util.Context.NONE); + + Assertions.assertEquals("rtceukdqkkyihzt", response.iterator().next().kind()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserAssignedIdentityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserAssignedIdentityTests.java new file mode 100644 index 000000000000..89ffb608594c --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserAssignedIdentityTests.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.UserAssignedIdentity; +import com.azure.resourcemanager.postgresqlflexibleserver.models.UserIdentity; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class UserAssignedIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserAssignedIdentity model = BinaryData.fromString( + "{\"userAssignedIdentities\":{\"ox\":{\"principalId\":\"jhhgdnhxmsi\",\"clientId\":\"omi\"},\"fgdo\":{\"principalId\":\"dufiq\",\"clientId\":\"ieuzaofjchvcyyy\"},\"shqvcimpev\":{\"principalId\":\"ubiipuipwoqonma\",\"clientId\":\"ekni\"}},\"principalId\":\"mblrrilbywd\",\"type\":\"SystemAssigned\",\"tenantId\":\"icc\"}") + .toObject(UserAssignedIdentity.class); + Assertions.assertEquals("jhhgdnhxmsi", model.userAssignedIdentities().get("ox").principalId()); + Assertions.assertEquals("omi", model.userAssignedIdentities().get("ox").clientId()); + Assertions.assertEquals("mblrrilbywd", model.principalId()); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserAssignedIdentity model = new UserAssignedIdentity() + .withUserAssignedIdentities( + mapOf("ox", new UserIdentity().withPrincipalId("jhhgdnhxmsi").withClientId("omi"), "fgdo", + new UserIdentity().withPrincipalId("dufiq").withClientId("ieuzaofjchvcyyy"), "shqvcimpev", + new UserIdentity().withPrincipalId("ubiipuipwoqonma").withClientId("ekni"))) + .withPrincipalId("mblrrilbywd") + .withType(IdentityType.SYSTEM_ASSIGNED); + model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); + Assertions.assertEquals("jhhgdnhxmsi", model.userAssignedIdentities().get("ox").principalId()); + Assertions.assertEquals("omi", model.userAssignedIdentities().get("ox").clientId()); + Assertions.assertEquals("mblrrilbywd", model.principalId()); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.type()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserIdentityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserIdentityTests.java new file mode 100644 index 000000000000..10e85a8f531f --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserIdentityTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.UserIdentity; +import org.junit.jupiter.api.Assertions; + +public final class UserIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserIdentity model = BinaryData.fromString("{\"principalId\":\"wfscjfn\",\"clientId\":\"szqujizdvoq\"}") + .toObject(UserIdentity.class); + Assertions.assertEquals("wfscjfn", model.principalId()); + Assertions.assertEquals("szqujizdvoq", model.clientId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserIdentity model = new UserIdentity().withPrincipalId("wfscjfn").withClientId("szqujizdvoq"); + model = BinaryData.fromObject(model).toObject(UserIdentity.class); + Assertions.assertEquals("wfscjfn", model.principalId()); + Assertions.assertEquals("szqujizdvoq", model.clientId()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationDetailsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationDetailsTests.java new file mode 100644 index 000000000000..d744a0c3ef3e --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationDetailsTests.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DbLevelValidationStatus; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationMessage; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationState; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationSummaryItem; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ValidationDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ValidationDetails model = BinaryData.fromString( + "{\"status\":\"Succeeded\",\"validationStartTimeInUtc\":\"2021-08-28T01:51:20Z\",\"validationEndTimeInUtc\":\"2021-09-06T22:54:10Z\",\"serverLevelValidationDetails\":[{\"type\":\"saznqntoruds\",\"state\":\"Failed\",\"messages\":[{\"state\":\"Warning\",\"message\":\"grauwjuetaebur\"},{\"state\":\"Warning\",\"message\":\"ovsm\"}]},{\"type\":\"xwabmqoe\",\"state\":\"Succeeded\",\"messages\":[{\"state\":\"Failed\",\"message\":\"u\"}]},{\"type\":\"jmqlgkfb\",\"state\":\"Warning\",\"messages\":[{\"state\":\"Succeeded\",\"message\":\"bjcntujitc\"},{\"state\":\"Succeeded\",\"message\":\"twwaezkojvdcpzf\"}]},{\"type\":\"ouicybxarzgszu\",\"state\":\"Failed\",\"messages\":[{\"state\":\"Warning\",\"message\":\"idoamciodhkha\"},{\"state\":\"Succeeded\",\"message\":\"nz\"},{\"state\":\"Succeeded\",\"message\":\"wntoegokdwbwh\"},{\"state\":\"Failed\",\"message\":\"cmrvexzt\"}]}],\"dbLevelValidationDetails\":[{\"databaseName\":\"gsfraoyzkoow\",\"startedOn\":\"2021-01-01T04:06:13Z\",\"endedOn\":\"2021-11-23T22:05:35Z\",\"summary\":[{\"type\":\"wqaldsyu\",\"state\":\"Warning\",\"messages\":[{}]},{\"type\":\"qfobwyz\",\"state\":\"Succeeded\",\"messages\":[{},{}]},{\"type\":\"t\",\"state\":\"Failed\",\"messages\":[{},{},{}]},{\"type\":\"gmhrskdsnfdsdoak\",\"state\":\"Warning\",\"messages\":[{},{},{}]}]}]}") + .toObject(ValidationDetails.class); + Assertions.assertEquals(ValidationState.SUCCEEDED, model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-28T01:51:20Z"), model.validationStartTimeInUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T22:54:10Z"), model.validationEndTimeInUtc()); + Assertions.assertEquals("saznqntoruds", model.serverLevelValidationDetails().get(0).type()); + Assertions.assertEquals(ValidationState.FAILED, model.serverLevelValidationDetails().get(0).state()); + Assertions.assertEquals(ValidationState.WARNING, + model.serverLevelValidationDetails().get(0).messages().get(0).state()); + Assertions.assertEquals("grauwjuetaebur", + model.serverLevelValidationDetails().get(0).messages().get(0).message()); + Assertions.assertEquals("gsfraoyzkoow", model.dbLevelValidationDetails().get(0).databaseName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T04:06:13Z"), + model.dbLevelValidationDetails().get(0).startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-23T22:05:35Z"), + model.dbLevelValidationDetails().get(0).endedOn()); + Assertions.assertEquals("wqaldsyu", model.dbLevelValidationDetails().get(0).summary().get(0).type()); + Assertions.assertEquals(ValidationState.WARNING, + model.dbLevelValidationDetails().get(0).summary().get(0).state()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ValidationDetails model + = new ValidationDetails().withStatus(ValidationState.SUCCEEDED) + .withValidationStartTimeInUtc(OffsetDateTime.parse("2021-08-28T01:51:20Z")) + .withValidationEndTimeInUtc(OffsetDateTime.parse("2021-09-06T22:54:10Z")) + .withServerLevelValidationDetails( + Arrays.asList( + new ValidationSummaryItem() + .withType("saznqntoruds") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList( + new ValidationMessage().withState(ValidationState.WARNING) + .withMessage("grauwjuetaebur"), + new ValidationMessage().withState(ValidationState.WARNING).withMessage("ovsm"))), + new ValidationSummaryItem() + .withType("xwabmqoe") + .withState(ValidationState.SUCCEEDED) + .withMessages(Arrays + .asList(new ValidationMessage().withState(ValidationState.FAILED).withMessage("u"))), + new ValidationSummaryItem().withType("jmqlgkfb") + .withState(ValidationState.WARNING) + .withMessages(Arrays.asList( + new ValidationMessage().withState(ValidationState.SUCCEEDED).withMessage("bjcntujitc"), + new ValidationMessage().withState(ValidationState.SUCCEEDED) + .withMessage("twwaezkojvdcpzf"))), + new ValidationSummaryItem().withType("ouicybxarzgszu") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList( + new ValidationMessage().withState(ValidationState.WARNING).withMessage("idoamciodhkha"), + new ValidationMessage().withState(ValidationState.SUCCEEDED).withMessage("nz"), + new ValidationMessage().withState(ValidationState.SUCCEEDED) + .withMessage("wntoegokdwbwh"), + new ValidationMessage().withState(ValidationState.FAILED).withMessage("cmrvexzt"))))) + .withDbLevelValidationDetails( + Arrays.asList(new DbLevelValidationStatus().withDatabaseName("gsfraoyzkoow") + .withStartedOn(OffsetDateTime.parse("2021-01-01T04:06:13Z")) + .withEndedOn(OffsetDateTime.parse("2021-11-23T22:05:35Z")) + .withSummary(Arrays.asList( + new ValidationSummaryItem().withType("wqaldsyu") + .withState(ValidationState.WARNING) + .withMessages(Arrays.asList(new ValidationMessage())), + new ValidationSummaryItem().withType("qfobwyz") + .withState(ValidationState.SUCCEEDED) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage())), + new ValidationSummaryItem().withType("t") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), + new ValidationMessage())), + new ValidationSummaryItem().withType("gmhrskdsnfdsdoak") + .withState(ValidationState.WARNING) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), + new ValidationMessage())))))); + model = BinaryData.fromObject(model).toObject(ValidationDetails.class); + Assertions.assertEquals(ValidationState.SUCCEEDED, model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-28T01:51:20Z"), model.validationStartTimeInUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T22:54:10Z"), model.validationEndTimeInUtc()); + Assertions.assertEquals("saznqntoruds", model.serverLevelValidationDetails().get(0).type()); + Assertions.assertEquals(ValidationState.FAILED, model.serverLevelValidationDetails().get(0).state()); + Assertions.assertEquals(ValidationState.WARNING, + model.serverLevelValidationDetails().get(0).messages().get(0).state()); + Assertions.assertEquals("grauwjuetaebur", + model.serverLevelValidationDetails().get(0).messages().get(0).message()); + Assertions.assertEquals("gsfraoyzkoow", model.dbLevelValidationDetails().get(0).databaseName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T04:06:13Z"), + model.dbLevelValidationDetails().get(0).startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-23T22:05:35Z"), + model.dbLevelValidationDetails().get(0).endedOn()); + Assertions.assertEquals("wqaldsyu", model.dbLevelValidationDetails().get(0).summary().get(0).type()); + Assertions.assertEquals(ValidationState.WARNING, + model.dbLevelValidationDetails().get(0).summary().get(0).state()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationMessageTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationMessageTests.java new file mode 100644 index 000000000000..d86bef56a4b8 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationMessageTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationMessage; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationState; +import org.junit.jupiter.api.Assertions; + +public final class ValidationMessageTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ValidationMessage model = BinaryData.fromString("{\"state\":\"Warning\",\"message\":\"uzkopbminrfd\"}") + .toObject(ValidationMessage.class); + Assertions.assertEquals(ValidationState.WARNING, model.state()); + Assertions.assertEquals("uzkopbminrfd", model.message()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ValidationMessage model + = new ValidationMessage().withState(ValidationState.WARNING).withMessage("uzkopbminrfd"); + model = BinaryData.fromObject(model).toObject(ValidationMessage.class); + Assertions.assertEquals(ValidationState.WARNING, model.state()); + Assertions.assertEquals("uzkopbminrfd", model.message()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationSummaryItemTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationSummaryItemTests.java new file mode 100644 index 000000000000..dc39dc689145 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationSummaryItemTests.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.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationMessage; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationState; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationSummaryItem; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ValidationSummaryItemTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ValidationSummaryItem model = BinaryData.fromString( + "{\"type\":\"kzevdlhewpusds\",\"state\":\"Warning\",\"messages\":[{\"state\":\"Warning\",\"message\":\"bejdcn\"},{\"state\":\"Failed\",\"message\":\"oakufgm\"},{\"state\":\"Failed\",\"message\":\"rdgrtw\"}]}") + .toObject(ValidationSummaryItem.class); + Assertions.assertEquals("kzevdlhewpusds", model.type()); + Assertions.assertEquals(ValidationState.WARNING, model.state()); + Assertions.assertEquals(ValidationState.WARNING, model.messages().get(0).state()); + Assertions.assertEquals("bejdcn", model.messages().get(0).message()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ValidationSummaryItem model = new ValidationSummaryItem().withType("kzevdlhewpusds") + .withState(ValidationState.WARNING) + .withMessages( + Arrays.asList(new ValidationMessage().withState(ValidationState.WARNING).withMessage("bejdcn"), + new ValidationMessage().withState(ValidationState.FAILED).withMessage("oakufgm"), + new ValidationMessage().withState(ValidationState.FAILED).withMessage("rdgrtw"))); + model = BinaryData.fromObject(model).toObject(ValidationSummaryItem.class); + Assertions.assertEquals("kzevdlhewpusds", model.type()); + Assertions.assertEquals(ValidationState.WARNING, model.state()); + Assertions.assertEquals(ValidationState.WARNING, model.messages().get(0).state()); + Assertions.assertEquals("bejdcn", model.messages().get(0).message()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointInnerTests.java new file mode 100644 index 000000000000..2d9195d23c20 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointInnerTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VirtualEndpointInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualEndpointInner model = BinaryData.fromString( + "{\"id\":\"cdmxzrpoaiml\",\"name\":\"iaaomylweazul\",\"type\":\"ethwwnpjhlfz\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"hfbousnfepgfew\",\"twly\"],\"virtualEndpoints\":[\"cxy\",\"xhdjhl\",\"mmbcxfhbcp\",\"rxvxcjzh\"]}}") + .toObject(VirtualEndpointInner.class); + Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); + Assertions.assertEquals("hfbousnfepgfew", model.members().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualEndpointInner model = new VirtualEndpointInner().withEndpointType(VirtualEndpointType.READ_WRITE) + .withMembers(Arrays.asList("hfbousnfepgfew", "twly")); + model = BinaryData.fromObject(model).toObject(VirtualEndpointInner.class); + Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); + Assertions.assertEquals("hfbousnfepgfew", model.members().get(0)); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourceForPatchTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourceForPatchTests.java new file mode 100644 index 000000000000..64eee632762d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourceForPatchTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResourceForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VirtualEndpointResourceForPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualEndpointResourceForPatch model = BinaryData.fromString( + "{\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"xtgqscjavftjuh\",\"qaz\",\"mtggu\"],\"virtualEndpoints\":[\"jrajcivm\"]}}") + .toObject(VirtualEndpointResourceForPatch.class); + Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); + Assertions.assertEquals("xtgqscjavftjuh", model.members().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualEndpointResourceForPatch model + = new VirtualEndpointResourceForPatch().withEndpointType(VirtualEndpointType.READ_WRITE) + .withMembers(Arrays.asList("xtgqscjavftjuh", "qaz", "mtggu")); + model = BinaryData.fromObject(model).toObject(VirtualEndpointResourceForPatch.class); + Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); + Assertions.assertEquals("xtgqscjavftjuh", model.members().get(0)); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourcePropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourcePropertiesTests.java new file mode 100644 index 000000000000..0a1c5e0872ff --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourcePropertiesTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceProperties; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VirtualEndpointResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualEndpointResourceProperties model = BinaryData + .fromString( + "{\"endpointType\":\"ReadWrite\",\"members\":[\"fiwrxgkn\"],\"virtualEndpoints\":[\"yinzqodfvpgs\"]}") + .toObject(VirtualEndpointResourceProperties.class); + Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); + Assertions.assertEquals("fiwrxgkn", model.members().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualEndpointResourceProperties model + = new VirtualEndpointResourceProperties().withEndpointType(VirtualEndpointType.READ_WRITE) + .withMembers(Arrays.asList("fiwrxgkn")); + model = BinaryData.fromObject(model).toObject(VirtualEndpointResourceProperties.class); + Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); + Assertions.assertEquals("fiwrxgkn", model.members().get(0)); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateMockTests.java index cc3df2e33cd7..49812ea6f50d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateMockTests.java @@ -10,7 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResource; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoint; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -23,7 +23,7 @@ public final class VirtualEndpointsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"id\":\"cmmzrrs\",\"name\":\"biwsd\",\"type\":\"pxqwo\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"jrmmuabwib\",\"jogjonmc\"],\"virtualEndpoints\":[\"oyzbamwineofvf\",\"akpoldtvevbo\",\"lz\",\"zjknyuxg\"]}}"; + = "{\"id\":\"jszlb\",\"name\":\"mnlzijiufehgmvf\",\"type\":\"wyvq\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"iylylyfw\",\"zutgqztwhghmupg\"],\"virtualEndpoints\":[\"tcdxabbujftaben\",\"bklqpxz\",\"cafeddw\",\"nlzafwxudgnh\"]}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testCreate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - VirtualEndpointResource response = manager.virtualEndpoints() - .define("hulrtywikdmhla") - .withExistingFlexibleServer("c", "v") + VirtualEndpoint response = manager.virtualEndpoints() + .define("pt") + .withExistingFlexibleServer("abzoghktdpyczhco", "ocnhzqrottjzcfyj") .withEndpointType(VirtualEndpointType.READ_WRITE) - .withMembers(Arrays.asList("mqjch")) + .withMembers(Arrays.asList("psjoqcjenk", "hf")) .create(); Assertions.assertEquals(VirtualEndpointType.READ_WRITE, response.endpointType()); - Assertions.assertEquals("jrmmuabwib", response.members().get(0)); + Assertions.assertEquals("iylylyfw", response.members().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetWithResponseMockTests.java index baf1228423fd..363d69e8d94e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetWithResponseMockTests.java @@ -10,7 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResource; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoint; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,7 +22,7 @@ public final class VirtualEndpointsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"id\":\"upia\",\"name\":\"xnafbw\",\"type\":\"oohtuovmaonurjtu\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"ecmslclbl\"],\"virtualEndpoints\":[\"lt\",\"sjuscvsfxigctmg\",\"uupb\"]}}"; + = "{\"id\":\"rmkfqlwxldykals\",\"name\":\"aolnjpnnbmjk\",\"type\":\"bjgsjjxxahmrn\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"xyivpinbm\",\"wbjijkgq\",\"nhmbkez\"],\"virtualEndpoints\":[\"ujvaannggi\",\"cwkdtaaw\"]}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - VirtualEndpointResource response = manager.virtualEndpoints() - .getWithResponse("vidbztjhqtfb", "vnynkb", "etnjuhpsprkz", com.azure.core.util.Context.NONE) + VirtualEndpoint response = manager.virtualEndpoints() + .getWithResponse("bhbcdszir", "randoypmb", "t", com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(VirtualEndpointType.READ_WRITE, response.endpointType()); - Assertions.assertEquals("ecmslclbl", response.members().get(0)); + Assertions.assertEquals("xyivpinbm", response.members().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerMockTests.java index 90f876a7f433..7541aaccdfba 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerMockTests.java @@ -11,7 +11,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResource; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoint; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -23,7 +23,7 @@ public final class VirtualEndpointsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"id\":\"qm\",\"name\":\"zgwldoychillcec\",\"type\":\"huwaoaguhic\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"ac\"],\"virtualEndpoints\":[\"hrweftkw\",\"ejpmvssehaepwa\",\"cxtczhupeukn\",\"jduyyespydjfb\"]}}]}"; + = "{\"value\":[{\"id\":\"nxwbjsidbirkfp\",\"name\":\"okdgoge\",\"type\":\"jymrhbg\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"wnf\"],\"virtualEndpoints\":[\"hhqosmffjku\",\"ycyarnroohg\"]}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testListByServer() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.virtualEndpoints().listByServer("zqccydrtce", "kdqkkyihzt", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.virtualEndpoints().listByServer("wfekaumrrqmb", "mqkra", com.azure.core.util.Context.NONE); Assertions.assertEquals(VirtualEndpointType.READ_WRITE, response.iterator().next().endpointType()); - Assertions.assertEquals("ac", response.iterator().next().members().get(0)); + Assertions.assertEquals("wnf", response.iterator().next().members().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListTests.java new file mode 100644 index 000000000000..4465c682b37f --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointsList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VirtualEndpointsListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualEndpointsList model = BinaryData.fromString( + "{\"value\":[{\"id\":\"sgbpfgzdjtx\",\"name\":\"flbqvgaq\",\"type\":\"gafcqu\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"wsdtutnwl\",\"uycvuzhyrmewip\",\"vekdxukuqgsjjxu\",\"dxgketwzhhzjhfj\"],\"virtualEndpoints\":[\"vmuvgpmu\"]}}],\"nextLink\":\"qsxvmhf\"}") + .toObject(VirtualEndpointsList.class); + Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.value().get(0).endpointType()); + Assertions.assertEquals("wsdtutnwl", model.value().get(0).members().get(0)); + Assertions.assertEquals("qsxvmhf", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualEndpointsList model = new VirtualEndpointsList() + .withValue(Arrays.asList(new VirtualEndpointInner().withEndpointType(VirtualEndpointType.READ_WRITE) + .withMembers(Arrays.asList("wsdtutnwl", "uycvuzhyrmewip", "vekdxukuqgsjjxu", "dxgketwzhhzjhfj")))) + .withNextLink("qsxvmhf"); + model = BinaryData.fromObject(model).toObject(VirtualEndpointsList.class); + Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.value().get(0).endpointType()); + Assertions.assertEquals("wsdtutnwl", model.value().get(0).members().get(0)); + Assertions.assertEquals("qsxvmhf", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageModelInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageModelInnerTests.java new file mode 100644 index 000000000000..61cc3c4d01bf --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageModelInnerTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageModelInner; + +public final class VirtualNetworkSubnetUsageModelInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkSubnetUsageModelInner model = BinaryData.fromString( + "{\"delegatedSubnetsUsage\":[{\"subnetName\":\"bhu\",\"usage\":7040334631304760179}],\"location\":\"yue\",\"subscriptionId\":\"lynsqyrpf\"}") + .toObject(VirtualNetworkSubnetUsageModelInner.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualNetworkSubnetUsageModelInner model = new VirtualNetworkSubnetUsageModelInner(); + model = BinaryData.fromObject(model).toObject(VirtualNetworkSubnetUsageModelInner.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageParameterTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageParameterTests.java new file mode 100644 index 000000000000..ae77a8f84c82 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageParameterTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkSubnetUsageParameterTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkSubnetUsageParameter model = BinaryData.fromString("{\"virtualNetworkArmResourceId\":\"zjyi\"}") + .toObject(VirtualNetworkSubnetUsageParameter.class); + Assertions.assertEquals("zjyi", model.virtualNetworkArmResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualNetworkSubnetUsageParameter model + = new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId("zjyi"); + model = BinaryData.fromObject(model).toObject(VirtualNetworkSubnetUsageParameter.class); + Assertions.assertEquals("zjyi", model.virtualNetworkArmResourceId()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsagesExecuteWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsagesListWithResponseMockTests.java similarity index 68% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsagesExecuteWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsagesListWithResponseMockTests.java index 5ef740a70eff..b75b7cb4cf3f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsagesExecuteWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsagesListWithResponseMockTests.java @@ -10,18 +10,18 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageModel; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageResult; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class VirtualNetworkSubnetUsagesExecuteWithResponseMockTests { +public final class VirtualNetworkSubnetUsagesListWithResponseMockTests { @Test - public void testExecuteWithResponse() throws Exception { + public void testListWithResponse() throws Exception { String responseStr - = "{\"delegatedSubnetsUsage\":[{\"subnetName\":\"dswys\",\"usage\":1520186438026533179},{\"subnetName\":\"fgllukkutvlx\",\"usage\":8876141444455718154}],\"location\":\"vmblcouqe\",\"subscriptionId\":\"hbcdsziry\"}"; + = "{\"delegatedSubnetsUsage\":[{\"subnetName\":\"yrdnqod\",\"usage\":5546827774753159814},{\"subnetName\":\"hqfaqnvz\",\"usage\":6550733116742453800},{\"subnetName\":\"pem\",\"usage\":1397083088436358597},{\"subnetName\":\"sczuejdtxptlghwz\",\"usage\":4250319032943911677}],\"location\":\"jjstliuhqawmo\",\"subscriptionId\":\"ancz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,9 +30,9 @@ public void testExecuteWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - VirtualNetworkSubnetUsageResult response = manager.virtualNetworkSubnetUsages() - .executeWithResponse("ttxpnrupza", - new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId("rdixt"), + VirtualNetworkSubnetUsageModel response = manager.virtualNetworkSubnetUsages() + .listWithResponse("ookrtalvnbw", + new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId("bemeluclvd"), com.azure.core.util.Context.NONE) .getValue(); From 4d443591e1a7ea5079a6812b6bcf330743116a71 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Sun, 23 Nov 2025 23:40:46 -0800 Subject: [PATCH 035/186] [Automation] Generate Fluent Lite from Swagger newrelic#package-2025-05-01-preview (#47364) --- .../CHANGELOG.md | 80 +- .../README.md | 8 +- .../SAMPLE.md | 326 +- .../pom.xml | 4 +- .../NewRelicObservabilityManager.java | 53 +- .../fluent/AccountsClient.java | 6 +- .../fluent/BillingInfoesClient.java | 13 +- .../ConnectedPartnerResourcesClient.java | 4 + .../fluent/MonitoredSubscriptionsClient.java | 91 +- .../fluent/MonitorsClient.java | 385 +- .../fluent/NewRelicObservability.java | 19 +- .../fluent/OrganizationsClient.java | 6 +- .../fluent/PlansClient.java | 4 +- .../fluent/SaaSClient.java | 43 + .../fluent/TagRulesClient.java | 88 +- .../models/LatestLinkedSaaSResponseInner.java | 122 + .../fluent/models/MetricRulesInner.java | 6 +- .../fluent/models/MonitorProperties.java | 32 + .../MonitoredSubscriptionPropertiesInner.java | 17 + .../models/NewRelicMonitorResourceInner.java | 24 + ...wRelicMonitorResourceUpdateProperties.java | 32 + .../SaaSResourceDetailsResponseInner.java | 163 + .../implementation/AccountsClientImpl.java | 185 +- .../BillingInfoesClientImpl.java | 98 +- .../ConnectedPartnerResourcesClientImpl.java | 206 +- .../LatestLinkedSaaSResponseImpl.java | 36 + .../MonitoredSubscriptionPropertiesImpl.java | 9 +- .../MonitoredSubscriptionsClientImpl.java | 935 +++-- .../implementation/MonitorsClientImpl.java | 3216 ++++++++++++----- .../implementation/MonitorsImpl.java | 136 +- .../NewRelicMonitorResourceImpl.java | 81 +- .../NewRelicObservabilityImpl.java | 64 +- .../implementation/OperationsClientImpl.java | 127 +- .../OrganizationsClientImpl.java | 187 +- .../implementation/PlansClientImpl.java | 171 +- .../implementation/SaaSClientImpl.java | 176 + .../implementation/SaaSImpl.java | 58 + .../SaaSResourceDetailsResponseImpl.java | 49 + .../implementation/TagRuleImpl.java | 2 +- .../implementation/TagRulesClientImpl.java | 871 +++-- .../models/AccountInfo.java | 6 +- .../models/Accounts.java | 6 +- .../models/ActivateSaaSParameterRequest.java | 135 + .../models/AppServicesGetRequest.java | 6 +- .../models/BillingCycle.java | 56 - .../models/BillingInfoes.java | 13 +- .../models/ConnectedPartnerResources.java | 4 + ...ConnectedPartnerResourcesListResponse.java | 22 +- .../models/HostsGetRequest.java | 6 +- .../models/LatestLinkedSaaSResponse.java | 34 + .../models/LinkedResourceListResponse.java | 22 +- .../models/ManagedServiceIdentityType.java | 4 +- .../models/MarketplaceSaaSInfo.java | 56 + .../models/MetricRules.java | 2 +- .../models/MetricsRequest.java | 6 +- .../models/MetricsStatusRequest.java | 6 +- .../MonitoredSubscriptionProperties.java | 8 + .../MonitoredSubscriptionPropertiesList.java | 18 +- .../models/MonitoredSubscriptions.java | 61 +- .../models/Monitors.java | 238 +- .../models/MonitorsSwitchBillingHeaders.java | 2 + .../models/NewRelicMonitorResource.java | 206 +- .../models/NewRelicMonitorResourceUpdate.java | 23 + .../models/Organizations.java | 6 +- .../models/PlanData.java | 16 +- .../newrelicobservability/models/Plans.java | 4 +- .../models/ResubscribeProperties.java | 265 ++ .../newrelicobservability/models/SaaS.java | 37 + .../models/SaaSData.java | 93 + .../models/SaaSResourceDetailsResponse.java | 56 + .../models/SwitchBillingRequest.java | 6 +- .../models/TagRules.java | 38 +- .../models/UserInfo.java | 6 +- .../proxy-config.json | 2 +- ...cemanager-newrelicobservability.properties | 1 + .../generated/AccountsListSamples.java | 6 +- .../generated/BillingInfoGetSamples.java | 3 +- .../ConnectedPartnerResourcesListSamples.java | 3 +- ...edSubscriptionsCreateOrUpdateSamples.java} | 9 +- .../MonitoredSubscriptionsDeleteSamples.java | 3 +- .../MonitoredSubscriptionsGetSamples.java | 3 +- .../MonitoredSubscriptionsListSamples.java | 3 +- .../MonitoredSubscriptionsUpdateSamples.java | 3 +- .../MonitorsCreateOrUpdateSamples.java | 9 +- .../generated/MonitorsDeleteSamples.java | 10 +- .../MonitorsGetByResourceGroupSamples.java | 3 +- .../MonitorsGetMetricRulesSamples.java | 6 +- .../MonitorsGetMetricStatusSamples.java | 6 +- .../MonitorsLatestLinkedSaaSSamples.java | 42 + .../generated/MonitorsLinkSaaSSamples.java | 30 + .../MonitorsListAppServicesSamples.java | 6 +- .../MonitorsListByResourceGroupSamples.java | 3 +- .../generated/MonitorsListHostsSamples.java | 6 +- .../MonitorsListLinkedResourcesSamples.java | 4 +- ...MonitorsListMonitoredResourcesSamples.java | 6 +- .../generated/MonitorsListSamples.java | 3 +- .../MonitorsRefreshIngestionKeySamples.java | 26 + .../generated/MonitorsResubscribeSamples.java | 25 + .../MonitorsSwitchBillingSamples.java | 9 +- .../generated/MonitorsUpdateSamples.java | 6 +- .../MonitorsVmHostPayloadSamples.java | 6 +- .../generated/OperationsListSamples.java | 6 +- .../generated/OrganizationsListSamples.java | 6 +- .../generated/PlansListSamples.java | 6 +- .../SaaSActivateResourceSamples.java | 31 + .../TagRulesCreateOrUpdateSamples.java | 6 +- .../generated/TagRulesDeleteSamples.java | 6 +- .../generated/TagRulesGetSamples.java | 6 +- ...sListByNewRelicMonitorResourceSamples.java | 6 +- .../generated/TagRulesUpdateSamples.java | 6 +- .../generated/AccountsListMockTests.java | 16 +- .../ActivateSaaSParameterRequestTests.java | 29 + .../generated/AppServiceInfoInnerTests.java | 23 +- .../generated/AppServicesGetRequestTests.java | 18 +- .../AppServicesListResponseTests.java | 34 +- .../BillingInfoResponseInnerTests.java | 49 +- ...BillingInfoesGetWithResponseMockTests.java | 24 +- ...nnectedPartnerResourcePropertiesTests.java | 27 +- ...dPartnerResourcesListFormatInnerTests.java | 26 +- ...onnectedPartnerResourcesListMockTests.java | 18 +- ...ctedPartnerResourcesListResponseTests.java | 53 +- .../generated/FilteringTagTests.java | 19 +- .../generated/HostsGetRequestTests.java | 13 +- .../LatestLinkedSaaSResponseInnerTests.java | 29 + .../generated/LinkedResourceInnerTests.java | 8 +- .../LinkedResourceListResponseTests.java | 18 +- .../generated/LogRulesTests.java | 28 +- .../ManagedServiceIdentityTests.java | 14 +- .../generated/MarketplaceSaaSInfoTests.java | 38 +- .../generated/MetricRulesInnerTests.java | 34 +- .../generated/MetricsRequestTests.java | 8 +- .../generated/MetricsStatusRequestTests.java | 19 +- .../MetricsStatusResponseInnerTests.java | 9 +- .../MonitoredResourceInnerTests.java | 26 +- .../MonitoredResourceListResponseTests.java | 34 +- .../MonitoredSubscriptionInnerTests.java | 82 +- ...toredSubscriptionPropertiesInnerTests.java | 55 +- ...itoredSubscriptionPropertiesListTests.java | 85 +- ...SubscriptionsCreateOrUpdateMockTests.java} | 44 +- ...SubscriptionsGetWithResponseMockTests.java | 16 +- .../MonitoredSubscriptionsListMockTests.java | 14 +- ...onitoringTagRulesPropertiesInnerTests.java | 65 +- .../generated/MonitorsDeleteMockTests.java | 6 +- ...rsGetMetricRulesWithResponseMockTests.java | 16 +- ...sGetMetricStatusWithResponseMockTests.java | 22 +- ...LatestLinkedSaaSWithResponseMockTests.java | 39 + .../MonitorsListAppServicesMockTests.java | 19 +- .../generated/MonitorsListHostsMockTests.java | 19 +- .../MonitorsListLinkedResourcesMockTests.java | 10 +- ...nitorsListMonitoredResourcesMockTests.java | 16 +- ...reshIngestionKeyWithResponseMockTests.java | 33 + .../NewRelicSingleSignOnPropertiesTests.java | 26 +- .../generated/OperationsListMockTests.java | 6 +- .../generated/OrganizationInfoTests.java | 8 +- .../OrganizationPropertiesTests.java | 16 +- .../OrganizationResourceInnerTests.java | 20 +- .../generated/OrganizationsListMockTests.java | 14 +- .../OrganizationsListResponseTests.java | 33 +- .../generated/PartnerBillingEntityTests.java | 12 +- .../generated/PlanDataListResponseTests.java | 59 +- .../generated/PlanDataPropertiesTests.java | 27 +- .../generated/PlanDataResourceInnerTests.java | 33 +- .../generated/PlanDataTests.java | 21 +- .../generated/PlansListMockTests.java | 17 +- .../generated/ResubscribePropertiesTests.java | 44 + ...ActivateResourceWithResponseMockTests.java | 42 + .../generated/SaaSDataTests.java | 24 + ...SaaSResourceDetailsResponseInnerTests.java | 26 + .../generated/SubscriptionListTests.java | 90 +- .../generated/SwitchBillingRequestTests.java | 45 +- .../generated/TagRuleInnerTests.java | 67 +- .../generated/TagRuleListResultTests.java | 47 +- .../generated/TagRuleUpdateInnerTests.java | 61 +- .../TagRuleUpdatePropertiesInnerTests.java | 62 +- .../TagRulesCreateOrUpdateMockTests.java | 48 +- .../generated/TagRulesDeleteMockTests.java | 6 +- .../TagRulesGetWithResponseMockTests.java | 28 +- ...istByNewRelicMonitorResourceMockTests.java | 29 +- .../generated/UserAssignedIdentityTests.java | 2 +- .../generated/UserInfoTests.java | 32 +- .../generated/VMHostsListResponseTests.java | 28 +- .../generated/VMInfoInnerTests.java | 21 +- 182 files changed, 8592 insertions(+), 3478 deletions(-) create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/SaaSClient.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/LatestLinkedSaaSResponseInner.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/SaaSResourceDetailsResponseInner.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/LatestLinkedSaaSResponseImpl.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSClientImpl.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSImpl.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSResourceDetailsResponseImpl.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ActivateSaaSParameterRequest.java delete 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/LatestLinkedSaaSResponse.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ResubscribeProperties.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaS.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaSData.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaSResourceDetailsResponse.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/resources/azure-resourcemanager-newrelicobservability.properties rename sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/{MonitoredSubscriptionsCreateorUpdateSamples.java => MonitoredSubscriptionsCreateOrUpdateSamples.java} (72%) create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLatestLinkedSaaSSamples.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLinkSaaSSamples.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsRefreshIngestionKeySamples.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsResubscribeSamples.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSActivateResourceSamples.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ActivateSaaSParameterRequestTests.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LatestLinkedSaaSResponseInnerTests.java rename sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/{MonitoredSubscriptionsCreateorUpdateMockTests.java => MonitoredSubscriptionsCreateOrUpdateMockTests.java} (59%) create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLatestLinkedSaaSWithResponseMockTests.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsRefreshIngestionKeyWithResponseMockTests.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ResubscribePropertiesTests.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSActivateResourceWithResponseMockTests.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSDataTests.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSResourceDetailsResponseInnerTests.java diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md index c33a6a0f4e61..e42f57197c73 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md @@ -1,14 +1,86 @@ # Release History -## 1.3.0-beta.1 (Unreleased) +## 1.3.0-beta.1 (2025-11-24) -### Features Added +- Azure Resource Manager NewRelicObservability client library for Java. This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. Package tag package-2025-05-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.BillingCycle` was removed + +#### `models.PlanData` was modified + +* `models.BillingCycle billingCycle()` -> `java.lang.String billingCycle()` +* `withBillingCycle(models.BillingCycle)` was removed + +### Features Added + +* `models.SaaS` was added + +* `models.LatestLinkedSaaSResponse` was added + +* `models.ActivateSaaSParameterRequest` was added + +* `models.ResubscribeProperties` was added + +* `models.SaaSData` was added + +* `models.SaaSResourceDetailsResponse` was added + +#### `models.PlanData` was modified + +* `withBillingCycle(java.lang.String)` was added + +#### `models.MarketplaceSaaSInfo` was modified + +* `withOfferId(java.lang.String)` was added +* `offerId()` was added +* `withPublisherId(java.lang.String)` was added +* `publisherId()` was added + +#### `models.NewRelicMonitorResource$Update` was modified + +* `withSaaSData(models.SaaSData)` was added + +#### `models.NewRelicMonitorResource` was modified + +* `resubscribe(models.ResubscribeProperties,com.azure.core.util.Context)` was added +* `saaSData()` was added +* `latestLinkedSaaSWithResponse(com.azure.core.util.Context)` was added +* `linkSaaS(models.SaaSData,com.azure.core.util.Context)` was added +* `resubscribe()` was added +* `refreshIngestionKey()` was added +* `latestLinkedSaaS()` was added +* `linkSaaS(models.SaaSData)` was added +* `refreshIngestionKeyWithResponse(com.azure.core.util.Context)` was added + +#### `models.NewRelicMonitorResource$Definition` was modified + +* `withSaaSData(models.SaaSData)` was added + +#### `models.NewRelicMonitorResourceUpdate` was modified + +* `saaSData()` was added +* `withSaaSData(models.SaaSData)` was added + +#### `models.MonitoredSubscriptionProperties` was modified + +* `systemData()` was added + +#### `models.Monitors` was modified + +* `refreshIngestionKey(java.lang.String,java.lang.String)` was added +* `linkSaaS(java.lang.String,java.lang.String,models.SaaSData,com.azure.core.util.Context)` was added +* `refreshIngestionKeyWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `resubscribe(java.lang.String,java.lang.String,models.ResubscribeProperties,com.azure.core.util.Context)` was added +* `latestLinkedSaaSWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `latestLinkedSaaS(java.lang.String,java.lang.String)` was added +* `linkSaaS(java.lang.String,java.lang.String,models.SaaSData)` was added +* `resubscribe(java.lang.String,java.lang.String)` was added + +#### `NewRelicObservabilityManager` was modified -### Other Changes +* `saaS()` was added ## 1.2.0 (2024-12-19) diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/README.md b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/README.md index c59c56d1ba2b..def001411d76 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/README.md +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/README.md @@ -2,7 +2,7 @@ Azure Resource Manager NewRelicObservability client library for Java. -This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. Package tag package-2024-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. Package tag package-2025-05-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 @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ NewRelicObservabilityManager manager = NewRelicObservabilityManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/SAMPLE.md b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/SAMPLE.md index c2df2326dd3b..9be8fa73682a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/SAMPLE.md +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/SAMPLE.md @@ -15,7 +15,7 @@ ## MonitoredSubscriptions -- [CreateorUpdate](#monitoredsubscriptions_createorupdate) +- [CreateOrUpdate](#monitoredsubscriptions_createorupdate) - [Delete](#monitoredsubscriptions_delete) - [Get](#monitoredsubscriptions_get) - [List](#monitoredsubscriptions_list) @@ -28,12 +28,16 @@ - [GetByResourceGroup](#monitors_getbyresourcegroup) - [GetMetricRules](#monitors_getmetricrules) - [GetMetricStatus](#monitors_getmetricstatus) +- [LatestLinkedSaaS](#monitors_latestlinkedsaas) +- [LinkSaaS](#monitors_linksaas) - [List](#monitors_list) - [ListAppServices](#monitors_listappservices) - [ListByResourceGroup](#monitors_listbyresourcegroup) - [ListHosts](#monitors_listhosts) - [ListLinkedResources](#monitors_listlinkedresources) - [ListMonitoredResources](#monitors_listmonitoredresources) +- [RefreshIngestionKey](#monitors_refreshingestionkey) +- [Resubscribe](#monitors_resubscribe) - [SwitchBilling](#monitors_switchbilling) - [Update](#monitors_update) - [VmHostPayload](#monitors_vmhostpayload) @@ -50,6 +54,10 @@ - [List](#plans_list) +## SaaS + +- [ActivateResource](#saas_activateresource) + ## TagRules - [CreateOrUpdate](#tagrules_createorupdate) @@ -65,7 +73,8 @@ */ public final class AccountsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Accounts_List_MinimumSet_Gen.json */ /** @@ -79,7 +88,8 @@ public final class AccountsListSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Accounts_List_MaximumSet_Gen.json */ /** @@ -103,7 +113,8 @@ public final class AccountsListSamples { public final class BillingInfoGetSamples { /* * x-ms-original-file: - * specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/BillingInfo_Get.json + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * BillingInfo_Get.json */ /** * Sample code: BillingInfo_Get. @@ -125,7 +136,8 @@ public final class BillingInfoGetSamples { */ public final class ConnectedPartnerResourcesListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * ConnectedPartnerResources_List.json */ /** @@ -141,18 +153,19 @@ public final class ConnectedPartnerResourcesListSamples { } ``` -### MonitoredSubscriptions_CreateorUpdate +### MonitoredSubscriptions_CreateOrUpdate ```java import com.azure.resourcemanager.newrelicobservability.models.ConfigurationName; /** - * Samples for MonitoredSubscriptions CreateorUpdate. + * Samples for MonitoredSubscriptions CreateOrUpdate. */ -public final class MonitoredSubscriptionsCreateorUpdateSamples { +public final class MonitoredSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ - * MonitoredSubscriptions_CreateorUpdate.json + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * MonitoredSubscriptions_CreateOrUpdate.json */ /** * Sample code: Monitors_AddMonitoredSubscriptions. @@ -179,7 +192,8 @@ import com.azure.resourcemanager.newrelicobservability.models.ConfigurationName; */ public final class MonitoredSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * MonitoredSubscriptions_Delete.json */ /** @@ -205,7 +219,8 @@ import com.azure.resourcemanager.newrelicobservability.models.ConfigurationName; */ public final class MonitoredSubscriptionsGetSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * MonitoredSubscriptions_Get.json */ /** @@ -230,7 +245,8 @@ public final class MonitoredSubscriptionsGetSamples { */ public final class MonitoredSubscriptionsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * MonitoredSubscriptions_List.json */ /** @@ -256,7 +272,8 @@ import com.azure.resourcemanager.newrelicobservability.models.MonitoredSubscript */ public final class MonitoredSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * MonitoredSubscriptions_Update.json */ /** @@ -280,7 +297,6 @@ public final class MonitoredSubscriptionsUpdateSamples { ```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; @@ -289,6 +305,7 @@ 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.SaaSData; import com.azure.resourcemanager.newrelicobservability.models.SingleSignOnStates; import com.azure.resourcemanager.newrelicobservability.models.UsageType; import com.azure.resourcemanager.newrelicobservability.models.UserAssignedIdentity; @@ -302,7 +319,8 @@ import java.util.Map; */ public final class MonitorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_CreateOrUpdate_MaximumSet_Gen.json */ /** @@ -335,9 +353,11 @@ public final class MonitorsCreateOrUpdateSamples { .withPhoneNumber("krf") .withCountry("hslqnwdanrconqyekwbnttaetv")) .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.YEARLY) + .withBillingCycle("Yearly") .withPlanDetails("tbbiaga") .withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z"))) + .withSaaSData(new SaaSData().withSaaSResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/Microsoft.SaaS/resources/abcd")) .withOrgCreationSource(OrgCreationSource.LIFTR) .withAccountCreationSource(AccountCreationSource.LIFTR) .withSubscriptionState("Suspended") @@ -367,7 +387,8 @@ public final class MonitorsCreateOrUpdateSamples { */ public final class MonitorsDeleteSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_Delete_MinimumSet_Gen.json */ /** @@ -378,12 +399,13 @@ public final class MonitorsDeleteSamples { public static void monitorsDeleteMinimumSetGen( com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { manager.monitors() - .delete("rgopenapi", "ruxvg@xqkmdhrnoo.hlmbpm", "ipxmlcbonyxtolzejcjshkmlron", + .delete("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "ruxvg@xqkmdhrnoo.hlmbpm", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_Delete_MaximumSet_Gen.json */ /** @@ -394,7 +416,7 @@ public final class MonitorsDeleteSamples { public static void monitorsDeleteMaximumSetGen( com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { manager.monitors() - .delete("rgopenapi", "ruxvg@xqkmdhrnoo.hlmbpm", "ipxmlcbonyxtolzejcjshkmlron", + .delete("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "ruxvg@xqkmdhrnoo.hlmbpm", com.azure.core.util.Context.NONE); } } @@ -408,7 +430,8 @@ public final class MonitorsDeleteSamples { */ public final class MonitorsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_Get_MaximumSet_Gen.json */ /** @@ -433,7 +456,8 @@ import com.azure.resourcemanager.newrelicobservability.models.MetricsRequest; */ public final class MonitorsGetMetricRulesSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_GetMetricRules_MinimumSet_Gen.json */ /** @@ -449,7 +473,8 @@ public final class MonitorsGetMetricRulesSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_GetMetricRules_MaximumSet_Gen.json */ /** @@ -477,7 +502,8 @@ import java.util.Arrays; */ public final class MonitorsGetMetricStatusSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_GetMetricStatus_MinimumSet_Gen.json */ /** @@ -496,7 +522,8 @@ public final class MonitorsGetMetricStatusSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_GetMetricStatus_MaximumSet_Gen.json */ /** @@ -516,6 +543,76 @@ public final class MonitorsGetMetricStatusSamples { } ``` +### Monitors_LatestLinkedSaaS + +```java +/** + * Samples for Monitors LatestLinkedSaaS. + */ +public final class MonitorsLatestLinkedSaaSSamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_LatestLinkedSaaS_MinimumSet_Gen.json + */ + /** + * Sample code: Monitors_LatestLinkedSaaS_MinimumSet_Gen. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void monitorsLatestLinkedSaaSMinimumSetGen( + com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors() + .latestLinkedSaaSWithResponse("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_LatestLinkedSaaS_MaximumSet_Gen.json + */ + /** + * Sample code: Monitors_LatestLinkedSaaS_MaximumSet_Gen. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void monitorsLatestLinkedSaaSMaximumSetGen( + com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors() + .latestLinkedSaaSWithResponse("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", com.azure.core.util.Context.NONE); + } +} +``` + +### Monitors_LinkSaaS + +```java +import com.azure.resourcemanager.newrelicobservability.models.SaaSData; + +/** + * Samples for Monitors LinkSaaS. + */ +public final class MonitorsLinkSaaSSamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_LinkSaaS.json + */ + /** + * Sample code: Monitors_LinkSaaS. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void + monitorsLinkSaaS(com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors() + .linkSaaS("myResourceGroup", "myMonitor", new SaaSData().withSaaSResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/Microsoft.SaaS/resources/abcd"), + com.azure.core.util.Context.NONE); + } +} +``` + ### Monitors_List ```java @@ -524,7 +621,8 @@ public final class MonitorsGetMetricStatusSamples { */ public final class MonitorsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListBySubscription_MaximumSet_Gen.json */ /** @@ -550,7 +648,8 @@ import java.util.Arrays; */ public final class MonitorsListAppServicesSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListAppServices_MaximumSet_Gen.json */ /** @@ -569,7 +668,8 @@ public final class MonitorsListAppServicesSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListAppServices_MinimumSet_Gen.json */ /** @@ -597,7 +697,8 @@ public final class MonitorsListAppServicesSamples { */ public final class MonitorsListByResourceGroupSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListByResourceGroup_MaximumSet_Gen.json */ /** @@ -623,7 +724,8 @@ import java.util.Arrays; */ public final class MonitorsListHostsSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListHosts_MinimumSet_Gen.json */ /** @@ -641,7 +743,8 @@ public final class MonitorsListHostsSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListHosts_MaximumSet_Gen.json */ /** @@ -669,8 +772,8 @@ public final class MonitorsListHostsSamples { public final class MonitorsListLinkedResourcesSamples { /* * x-ms-original-file: - * specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/LinkedResources_List. - * json + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * LinkedResources_List.json */ /** * Sample code: Monitors_ListLinkedResources. @@ -692,7 +795,8 @@ public final class MonitorsListLinkedResourcesSamples { */ public final class MonitorsListMonitoredResourcesSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListMonitoredResources_MinimumSet_Gen.json */ /** @@ -707,7 +811,8 @@ public final class MonitorsListMonitoredResourcesSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListMonitoredResources_MaximumSet_Gen.json */ /** @@ -723,10 +828,59 @@ public final class MonitorsListMonitoredResourcesSamples { } ``` +### Monitors_RefreshIngestionKey + +```java +/** + * Samples for Monitors RefreshIngestionKey. + */ +public final class MonitorsRefreshIngestionKeySamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_RefreshIngestionKey.json + */ + /** + * Sample code: Monitors_RefreshIngestionKey. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void monitorsRefreshIngestionKey( + com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors() + .refreshIngestionKeyWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} +``` + +### Monitors_Resubscribe + +```java + +/** + * Samples for Monitors Resubscribe. + */ +public final class MonitorsResubscribeSamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_Resubscribe.json + */ + /** + * Sample code: Monitors_Resubscribe. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void + monitorsResubscribe(com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors().resubscribe("myResourceGroup", "myMonitor", null, 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; @@ -737,7 +891,8 @@ import java.time.OffsetDateTime; */ public final class MonitorsSwitchBillingSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_SwitchBilling_MinimumSet_Gen.json */ /** @@ -753,7 +908,8 @@ public final class MonitorsSwitchBillingSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_SwitchBilling_MaximumSet_Gen.json */ /** @@ -769,7 +925,7 @@ public final class MonitorsSwitchBillingSamples { "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz") .withOrganizationId("k") .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.YEARLY) + .withBillingCycle("Yearly") .withPlanDetails("tbbiaga") .withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z"))) .withUserEmail("ruxvg@xqkmdhrnoo.hlmbpm"), @@ -783,7 +939,6 @@ public final class MonitorsSwitchBillingSamples { ```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; @@ -806,7 +961,8 @@ import java.util.Map; */ public final class MonitorsUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_Update_MaximumSet_Gen.json */ /** @@ -839,7 +995,7 @@ public final class MonitorsUpdateSamples { .withPhoneNumber("krf") .withCountry("hslqnwdanrconqyekwbnttaetv")) .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.YEARLY) + .withBillingCycle("Yearly") .withPlanDetails("tbbiaga") .withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z"))) .withOrgCreationSource(OrgCreationSource.LIFTR) @@ -869,7 +1025,8 @@ public final class MonitorsUpdateSamples { */ public final class MonitorsVmHostPayloadSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_VmHostPayload_MinimumSet_Gen.json */ /** @@ -884,7 +1041,8 @@ public final class MonitorsVmHostPayloadSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_VmHostPayload_MaximumSet_Gen.json */ /** @@ -908,7 +1066,8 @@ public final class MonitorsVmHostPayloadSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Operations_List_MinimumSet_Gen.json */ /** @@ -922,7 +1081,8 @@ public final class OperationsListSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Operations_List_MaximumSet_Gen.json */ /** @@ -945,7 +1105,8 @@ public final class OperationsListSamples { */ public final class OrganizationsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Organizations_List_MinimumSet_Gen.json */ /** @@ -959,7 +1120,8 @@ public final class OrganizationsListSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Organizations_List_MaximumSet_Gen.json */ /** @@ -982,7 +1144,8 @@ public final class OrganizationsListSamples { */ public final class PlansListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Plans_List_MaximumSet_Gen.json */ /** @@ -996,7 +1159,8 @@ public final class PlansListSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Plans_List_MinimumSet_Gen.json */ /** @@ -1011,6 +1175,36 @@ public final class PlansListSamples { } ``` +### SaaS_ActivateResource + +```java +import com.azure.resourcemanager.newrelicobservability.models.ActivateSaaSParameterRequest; + +/** + * Samples for SaaS ActivateResource. + */ +public final class SaaSActivateResourceSamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ActivateSaaS. + * json + */ + /** + * Sample code: ActivateSaaS. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void + activateSaaS(com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.saaS() + .activateResourceWithResponse( + new ActivateSaaSParameterRequest().withSaasGuid("00000000-0000-0000-0000-000005430000") + .withPublisherId("publisherId"), + com.azure.core.util.Context.NONE); + } +} +``` + ### TagRules_CreateOrUpdate ```java @@ -1028,7 +1222,8 @@ import java.util.Arrays; */ public final class TagRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_CreateOrUpdate_MaximumSet_Gen.json */ /** @@ -1056,7 +1251,8 @@ public final class TagRulesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_CreateOrUpdate_MinimumSet_Gen.json */ /** @@ -1082,7 +1278,8 @@ public final class TagRulesCreateOrUpdateSamples { */ public final class TagRulesDeleteSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Delete_MinimumSet_Gen.json */ /** @@ -1098,7 +1295,8 @@ public final class TagRulesDeleteSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Delete_MaximumSet_Gen.json */ /** @@ -1123,7 +1321,8 @@ public final class TagRulesDeleteSamples { */ public final class TagRulesGetSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Get_MinimumSet_Gen.json */ /** @@ -1139,7 +1338,8 @@ public final class TagRulesGetSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Get_MaximumSet_Gen.json */ /** @@ -1164,7 +1364,8 @@ public final class TagRulesGetSamples { */ public final class TagRulesListByNewRelicMonitorResourceSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_ListByNewRelicMonitorResource_MinimumSet_Gen.json */ /** @@ -1180,7 +1381,8 @@ public final class TagRulesListByNewRelicMonitorResourceSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_ListByNewRelicMonitorResource_MaximumSet_Gen.json */ /** @@ -1215,7 +1417,8 @@ import java.util.Arrays; */ public final class TagRulesUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Update_MaximumSet_Gen.json */ /** @@ -1245,7 +1448,8 @@ public final class TagRulesUpdateSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Update_MinimumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml index 639c2590f2ca..8d4aebe84ea3 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml @@ -18,7 +18,7 @@ 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-2024-01-01. + 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-2025-05-01-preview. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,7 @@ UTF-8 0 0 - false + true 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 index 37e31488cc71..065dbe346afe 100644 --- 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 @@ -22,6 +22,7 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.newrelicobservability.fluent.NewRelicObservability; import com.azure.resourcemanager.newrelicobservability.implementation.AccountsImpl; @@ -33,6 +34,7 @@ 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.SaaSImpl; import com.azure.resourcemanager.newrelicobservability.implementation.TagRulesImpl; import com.azure.resourcemanager.newrelicobservability.models.Accounts; import com.azure.resourcemanager.newrelicobservability.models.BillingInfoes; @@ -42,11 +44,13 @@ 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.SaaS; 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.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -58,6 +62,8 @@ public final class NewRelicObservabilityManager { private Accounts accounts; + private SaaS saaS; + private Monitors monitors; private Organizations organizations; @@ -68,10 +74,10 @@ public final class NewRelicObservabilityManager { private ConnectedPartnerResources connectedPartnerResources; - private TagRules tagRules; - private MonitoredSubscriptions monitoredSubscriptions; + private TagRules tagRules; + private final NewRelicObservability clientObject; private NewRelicObservabilityManager(HttpPipeline httpPipeline, AzureProfile profile, @@ -125,6 +131,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-newrelicobservability.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -232,12 +241,14 @@ public NewRelicObservabilityManager authenticate(TokenCredential credential, Azu Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.newrelicobservability") .append("/") - .append("1.2.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -307,6 +318,18 @@ public Accounts accounts() { return accounts; } + /** + * Gets the resource collection API of SaaS. + * + * @return Resource collection API of SaaS. + */ + public SaaS saaS() { + if (this.saaS == null) { + this.saaS = new SaaSImpl(clientObject.getSaaS(), this); + } + return saaS; + } + /** * Gets the resource collection API of Monitors. It manages NewRelicMonitorResource. * @@ -368,18 +391,6 @@ public ConnectedPartnerResources connectedPartnerResources() { return connectedPartnerResources; } - /** - * 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; - } - /** * Gets the resource collection API of MonitoredSubscriptions. It manages MonitoredSubscriptionProperties. * @@ -393,6 +404,18 @@ public MonitoredSubscriptions monitoredSubscriptions() { return monitoredSubscriptions; } + /** + * 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; + } + /** * Gets wrapped service client NewRelicObservability providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. 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 index c8897603e468..dcb32fb4dbf3 100644 --- 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 @@ -15,7 +15,8 @@ */ public interface AccountsClient { /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -28,7 +29,8 @@ public interface AccountsClient { PagedIterable list(String userEmail, String location); /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/BillingInfoesClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/BillingInfoesClient.java index 24fbecdcd7ca..c9c0bb41cad3 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/BillingInfoesClient.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/BillingInfoesClient.java @@ -15,7 +15,9 @@ */ public interface BillingInfoesClient { /** - * Get marketplace info mapped to the given monitor. + * Retrieves marketplace and organization information mapped to the given New Relic monitor resource + * + * A synchronous resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -23,20 +25,23 @@ public interface BillingInfoesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return marketplace info mapped to the given monitor along with {@link Response}. + * @return marketplace Subscription and Organization details to which resource gets billed into along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String monitorName, Context context); /** - * Get marketplace info mapped to the given monitor. + * Retrieves marketplace and organization information mapped to the given New Relic monitor resource + * + * A synchronous resource action. * * @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 marketplace info mapped to the given monitor. + * @return marketplace Subscription and Organization details to which resource gets billed into. */ @ServiceMethod(returns = ReturnType.SINGLE) BillingInfoResponseInner get(String resourceGroupName, String monitorName); diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/ConnectedPartnerResourcesClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/ConnectedPartnerResourcesClient.java index fdb42682cc57..dc7939712ef0 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/ConnectedPartnerResourcesClient.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/ConnectedPartnerResourcesClient.java @@ -17,6 +17,8 @@ public interface ConnectedPartnerResourcesClient { /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @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. @@ -30,6 +32,8 @@ public interface ConnectedPartnerResourcesClient { /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param body Email Id of the user. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitoredSubscriptionsClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitoredSubscriptionsClient.java index 9363f36ddcc4..cc878c80383c 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitoredSubscriptionsClient.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitoredSubscriptionsClient.java @@ -19,20 +19,25 @@ */ public interface MonitoredSubscriptionsClient { /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties 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 paginated response with {@link PagedIterable}. + * @return paged collection of MonitoredSubscriptionProperties items as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String monitorName); /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -40,14 +45,17 @@ public interface MonitoredSubscriptionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return paged collection of MonitoredSubscriptionProperties items as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String monitorName, Context context); /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -56,15 +64,16 @@ PagedIterable list(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response}. + * @return a MonitoredSubscriptionProperties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String monitorName, ConfigurationName configurationName, Context context); /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -72,14 +81,16 @@ Response getWithResponse(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource. + * @return a MonitoredSubscriptionProperties. */ @ServiceMethod(returns = ReturnType.SINGLE) MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String monitorName, ConfigurationName configurationName); /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -92,10 +103,12 @@ MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String monito */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, MonitoredSubscriptionPropertiesInner> - beginCreateorUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName); + beginCreateOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName); /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -110,11 +123,13 @@ MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String monito */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, MonitoredSubscriptionPropertiesInner> - beginCreateorUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, + beginCreateOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context); /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -125,11 +140,13 @@ MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String monito * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, String monitorName, + MonitoredSubscriptionPropertiesInner createOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName); /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -142,11 +159,14 @@ MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, St * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, String monitorName, + MonitoredSubscriptionPropertiesInner createOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -162,7 +182,10 @@ MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, St beginUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -181,7 +204,10 @@ SyncPoller, MonitoredSubscripti MonitoredSubscriptionPropertiesInner body, Context context); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -196,7 +222,10 @@ MonitoredSubscriptionPropertiesInner update(String resourceGroupName, String mon ConfigurationName configurationName); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -213,7 +242,10 @@ MonitoredSubscriptionPropertiesInner update(String resourceGroupName, String mon ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -228,7 +260,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String ConfigurationName configurationName); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -244,7 +279,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String ConfigurationName configurationName, Context context); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -257,7 +295,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String monitorName, ConfigurationName configurationName); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. 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 index 549902266fa9..480f4bdeae16 100644 --- 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 @@ -12,6 +12,7 @@ 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.LatestLinkedSaaSResponseInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.LinkedResourceInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricRulesInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricsStatusResponseInner; @@ -25,6 +26,8 @@ import com.azure.resourcemanager.newrelicobservability.models.MetricsStatusRequest; import com.azure.resourcemanager.newrelicobservability.models.MonitorsSwitchBillingResponse; import com.azure.resourcemanager.newrelicobservability.models.NewRelicMonitorResourceUpdate; +import com.azure.resourcemanager.newrelicobservability.models.ResubscribeProperties; +import com.azure.resourcemanager.newrelicobservability.models.SaaSData; import com.azure.resourcemanager.newrelicobservability.models.SwitchBillingRequest; /** @@ -32,7 +35,7 @@ */ public interface MonitorsClient { /** - * List NewRelicMonitorResource resources by subscription ID. + * Lists all New Relic monitor resources either within a specific subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -43,7 +46,7 @@ public interface MonitorsClient { PagedIterable list(); /** - * List NewRelicMonitorResource resources by subscription ID. + * Lists all New Relic monitor resources either within a specific subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -56,7 +59,7 @@ public interface MonitorsClient { PagedIterable list(Context context); /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -69,7 +72,7 @@ public interface MonitorsClient { PagedIterable listByResourceGroup(String resourceGroupName); /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -83,7 +86,8 @@ public interface MonitorsClient { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -91,27 +95,30 @@ public interface MonitorsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, String monitorName, Context context); /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @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. + * @return a Monitor Resource by NewRelic. */ @ServiceMethod(returns = ReturnType.SINGLE) NewRelicMonitorResourceInner getByResourceGroup(String resourceGroupName, String monitorName); /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -126,7 +133,9 @@ Response getByResourceGroupWithResponse(String res beginCreateOrUpdate(String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource); /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -142,7 +151,9 @@ SyncPoller, NewRelicMonitorResourceInne String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource, Context context); /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -157,7 +168,9 @@ NewRelicMonitorResourceInner createOrUpdate(String resourceGroupName, String mon NewRelicMonitorResourceInner resource); /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -173,7 +186,22 @@ NewRelicMonitorResourceInner createOrUpdate(String resourceGroupName, String mon NewRelicMonitorResourceInner resource, Context context); /** - * Update a NewRelicMonitorResource. + * Updates an existing New Relic monitor resource from your Azure subscription. + * + * @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 the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NewRelicMonitorResourceInner> + beginUpdate(String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate properties); + + /** + * Updates an existing New Relic monitor resource from your Azure subscription. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -182,14 +210,14 @@ NewRelicMonitorResourceInner createOrUpdate(String resourceGroupName, String mon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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}. + * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String monitorName, - NewRelicMonitorResourceUpdate properties, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NewRelicMonitorResourceInner> beginUpdate( + String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate properties, Context context); /** - * Update a NewRelicMonitorResource. + * Updates an existing New Relic monitor resource from your Azure subscription. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -204,25 +232,43 @@ NewRelicMonitorResourceInner update(String resourceGroupName, String monitorName NewRelicMonitorResourceUpdate properties); /** - * Delete a NewRelicMonitorResource. + * Updates an existing New Relic monitor resource from your Azure subscription. * * @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 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NewRelicMonitorResourceInner update(String resourceGroupName, String monitorName, + NewRelicMonitorResourceUpdate properties, Context context); + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @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); + SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String userEmail); /** - * Delete a NewRelicMonitorResource. + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. * * @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 userEmail User Email. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -230,38 +276,40 @@ NewRelicMonitorResourceInner update(String resourceGroupName, String monitorName * @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, + SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String userEmail, Context context); /** - * Delete a NewRelicMonitorResource. + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. * * @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 userEmail User Email. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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); + void delete(String resourceGroupName, String monitorName, String userEmail); /** - * Delete a NewRelicMonitorResource. + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. * * @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 userEmail User Email. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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); + void delete(String resourceGroupName, String monitorName, String userEmail, Context context); /** - * Get metric rules. + * Retrieves the metric rules that are configured in the New Relic monitor resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -270,14 +318,14 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metric rules along with {@link Response}. + * @return set of rules for sending metrics for the Monitor resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getMetricRulesWithResponse(String resourceGroupName, String monitorName, MetricsRequest request, Context context); /** - * Get metric rules. + * Retrieves the metric rules that are configured in the New Relic monitor resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -285,13 +333,13 @@ Response getMetricRulesWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metric rules. + * @return set of rules for sending metrics for the Monitor resource. */ @ServiceMethod(returns = ReturnType.SINGLE) MetricRulesInner getMetricRules(String resourceGroupName, String monitorName, MetricsRequest request); /** - * Get metric status. + * Retrieves the metric status that are configured in the New Relic monitor resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -300,14 +348,14 @@ Response getMetricRulesWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metric status along with {@link Response}. + * @return response of get metrics status Operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getMetricStatusWithResponse(String resourceGroupName, String monitorName, MetricsStatusRequest request, Context context); /** - * Get metric status. + * Retrieves the metric status that are configured in the New Relic monitor resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -315,76 +363,136 @@ Response getMetricStatusWithResponse(String 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 metric status. + * @return response of get metrics status Operation. */ @ServiceMethod(returns = ReturnType.SINGLE) MetricsStatusResponseInner getMetricStatus(String resourceGroupName, String monitorName, MetricsStatusRequest request); /** - * List the app service resources currently being monitored by the NewRelic resource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * * @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}. + * @return response of get latest linked SaaS resource operation along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAppServices(String resourceGroupName, String monitorName, - AppServicesGetRequest request); + @ServiceMethod(returns = ReturnType.SINGLE) + Response latestLinkedSaaSWithResponse(String resourceGroupName, String monitorName, + Context context); /** - * List the app service resources currently being monitored by the NewRelic resource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * * @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}. + * @return response of get latest linked SaaS resource operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAppServices(String resourceGroupName, String monitorName, - AppServicesGetRequest request, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + LatestLinkedSaaSResponseInner latestLinkedSaaS(String resourceGroupName, String monitorName); /** - * Switches the billing for NewRelic monitor resource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @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 body Link SaaS body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NewRelicMonitorResourceInner> + beginLinkSaaS(String resourceGroupName, String monitorName, SaaSData body); + + /** + * Links a new SaaS to the newrelic organization of the underlying monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param body Link SaaS body parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NewRelicMonitorResourceInner> + beginLinkSaaS(String resourceGroupName, String monitorName, SaaSData body, Context context); + + /** + * Links a new SaaS to the newrelic organization of the underlying monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param body Link SaaS body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Monitor Resource by NewRelic. */ @ServiceMethod(returns = ReturnType.SINGLE) - MonitorsSwitchBillingResponse switchBillingWithResponse(String resourceGroupName, String monitorName, - SwitchBillingRequest request, Context context); + NewRelicMonitorResourceInner linkSaaS(String resourceGroupName, String monitorName, SaaSData body); /** - * Switches the billing for NewRelic monitor resource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @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 body Link SaaS body parameter. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Monitor Resource by NewRelic. */ @ServiceMethod(returns = ReturnType.SINGLE) - NewRelicMonitorResourceInner switchBilling(String resourceGroupName, String monitorName, - SwitchBillingRequest request); + NewRelicMonitorResourceInner linkSaaS(String resourceGroupName, String monitorName, SaaSData body, Context context); + + /** + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. + * + * @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 compute vm resources currently being monitored by the NewRelic resource. + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. + * + * @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); + + /** + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -398,7 +506,8 @@ NewRelicMonitorResourceInner switchBilling(String resourceGroupName, String moni PagedIterable listHosts(String resourceGroupName, String monitorName, HostsGetRequest request); /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -414,7 +523,38 @@ PagedIterable listHosts(String resourceGroupName, String monitorNam Context context); /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. + * + * @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 a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listLinkedResources(String resourceGroupName, String monitorName); + + /** + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. + * + * @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 a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listLinkedResources(String resourceGroupName, String monitorName, + Context context); + + /** + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -428,7 +568,8 @@ PagedIterable listHosts(String resourceGroupName, String monitorNam PagedIterable listMonitoredResources(String resourceGroupName, String monitorName); /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -444,35 +585,132 @@ PagedIterable listMonitoredResources(String resourceGrou Context context); /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. * * @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 a list operation as paginated response with {@link PagedIterable}. + * @return the {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listLinkedResources(String resourceGroupName, String monitorName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response refreshIngestionKeyWithResponse(String resourceGroupName, String monitorName, Context context); /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. * * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void refreshIngestionKey(String resourceGroupName, String monitorName); + + /** + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. + * + * @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 {@link SyncPoller} for polling of a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NewRelicMonitorResourceInner> + beginResubscribe(String resourceGroupName, String monitorName); + + /** + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param body Resubscribe Properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listLinkedResources(String resourceGroupName, String monitorName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NewRelicMonitorResourceInner> + beginResubscribe(String resourceGroupName, String monitorName, ResubscribeProperties body, Context context); + + /** + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. + * + * @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 Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NewRelicMonitorResourceInner resubscribe(String resourceGroupName, String monitorName); + + /** + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param body Resubscribe Properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 resubscribe(String resourceGroupName, String monitorName, ResubscribeProperties body, Context context); /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + * + * @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 a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MonitorsSwitchBillingResponse switchBillingWithResponse(String resourceGroupName, String monitorName, + SwitchBillingRequest request, Context context); + + /** + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + * + * @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. + * @return a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NewRelicMonitorResourceInner switchBilling(String resourceGroupName, String monitorName, + SwitchBillingRequest request); + + /** + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -487,7 +725,8 @@ Response vmHostPayloadWithResponse(String resourceGroup Context context); /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. 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 index 7e0ff48dea9d..86cba2bb9dd9 100644 --- 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 @@ -60,6 +60,13 @@ public interface NewRelicObservability { */ AccountsClient getAccounts(); + /** + * Gets the SaaSClient object to access its operations. + * + * @return the SaaSClient object. + */ + SaaSClient getSaaS(); + /** * Gets the MonitorsClient object to access its operations. * @@ -96,16 +103,16 @@ public interface NewRelicObservability { ConnectedPartnerResourcesClient getConnectedPartnerResources(); /** - * Gets the TagRulesClient object to access its operations. + * Gets the MonitoredSubscriptionsClient object to access its operations. * - * @return the TagRulesClient object. + * @return the MonitoredSubscriptionsClient object. */ - TagRulesClient getTagRules(); + MonitoredSubscriptionsClient getMonitoredSubscriptions(); /** - * Gets the MonitoredSubscriptionsClient object to access its operations. + * Gets the TagRulesClient object to access its operations. * - * @return the MonitoredSubscriptionsClient object. + * @return the TagRulesClient object. */ - MonitoredSubscriptionsClient getMonitoredSubscriptions(); + TagRulesClient getTagRules(); } 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 index 491a4703922a..fb94d3ee469e 100644 --- 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 @@ -15,7 +15,8 @@ */ public interface OrganizationsClient { /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -28,7 +29,8 @@ public interface OrganizationsClient { PagedIterable list(String userEmail, String location); /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. 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 index 0b27f3e793e2..a32f6ad514e2 100644 --- 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 @@ -15,7 +15,7 @@ */ public interface PlansClient { /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -25,7 +25,7 @@ public interface PlansClient { PagedIterable list(); /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @param accountId Account Id. * @param organizationId Organization Id. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/SaaSClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/SaaSClient.java new file mode 100644 index 000000000000..daa2eb9bbfbe --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/SaaSClient.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.newrelicobservability.fluent.models.SaaSResourceDetailsResponseInner; +import com.azure.resourcemanager.newrelicobservability.models.ActivateSaaSParameterRequest; + +/** + * An instance of this class provides access to all the operations defined in SaaSClient. + */ +public interface SaaSClient { + /** + * Resolve the token to get the SaaS resource ID and activate the SaaS resource. + * + * @param request The request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response activateResourceWithResponse(ActivateSaaSParameterRequest request, + Context context); + + /** + * Resolve the token to get the SaaS resource ID and activate the SaaS resource. + * + * @param request The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SaaSResourceDetailsResponseInner activateResource(ActivateSaaSParameterRequest request); +} 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 index e3d1e34d15e1..80a143d06ef8 100644 --- 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 @@ -19,7 +19,8 @@ */ public interface TagRulesClient { /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -32,7 +33,8 @@ public interface TagRulesClient { PagedIterable listByNewRelicMonitorResource(String resourceGroupName, String monitorName); /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -47,7 +49,8 @@ PagedIterable listByNewRelicMonitorResource(String resourceGroupNa Context context); /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -56,14 +59,15 @@ PagedIterable listByNewRelicMonitorResource(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a TagRule along with {@link Response}. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String monitorName, String ruleSetName, Context context); /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -71,13 +75,14 @@ Response getWithResponse(String resourceGroupName, String monitorN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a tag rule belonging to NewRelic account. */ @ServiceMethod(returns = ReturnType.SINGLE) TagRuleInner get(String resourceGroupName, String monitorName, String ruleSetName); /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -93,7 +98,8 @@ SyncPoller, TagRuleInner> beginCreateOrUpdate(String re String ruleSetName, TagRuleInner resource); /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -110,7 +116,8 @@ SyncPoller, TagRuleInner> beginCreateOrUpdate(String re String ruleSetName, TagRuleInner resource, Context context); /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -126,7 +133,8 @@ TagRuleInner createOrUpdate(String resourceGroupName, String monitorName, String TagRuleInner resource); /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -143,37 +151,43 @@ TagRuleInner createOrUpdate(String resourceGroupName, String monitorName, String Context context); /** - * Delete a TagRule. + * Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control + * which Azure resources are monitored. * * @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 the {@link SyncPoller} for polling of long-running operation. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String ruleSetName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + TagRuleUpdateInner properties, Context context); /** - * Delete a TagRule. + * Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control + * which Azure resources are monitored. * * @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. + * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return a tag rule belonging to NewRelic account. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String ruleSetName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + TagRuleInner update(String resourceGroupName, String monitorName, String ruleSetName, + TagRuleUpdateInner properties); /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -181,12 +195,14 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String monitorName, String ruleSetName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String ruleSetName); /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -195,40 +211,38 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String monitorName, String ruleSetName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String ruleSetName, + Context context); /** - * Update a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @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); + void delete(String resourceGroupName, String monitorName, String ruleSetName); /** - * Update a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - TagRuleInner update(String resourceGroupName, String monitorName, String ruleSetName, - TagRuleUpdateInner properties); + void delete(String resourceGroupName, String monitorName, String ruleSetName, Context context); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/LatestLinkedSaaSResponseInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/LatestLinkedSaaSResponseInner.java new file mode 100644 index 000000000000..f8b66e5a312a --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/LatestLinkedSaaSResponseInner.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Response of get latest linked SaaS resource operation. + */ +@Fluent +public final class LatestLinkedSaaSResponseInner implements JsonSerializable { + /* + * SaaS resource id + */ + private String saaSResourceId; + + /* + * Flag indicating if the SaaS resource is hidden + */ + private Boolean isHiddenSaaS; + + /** + * Creates an instance of LatestLinkedSaaSResponseInner class. + */ + public LatestLinkedSaaSResponseInner() { + } + + /** + * Get the saaSResourceId property: SaaS resource id. + * + * @return the saaSResourceId value. + */ + public String saaSResourceId() { + return this.saaSResourceId; + } + + /** + * Set the saaSResourceId property: SaaS resource id. + * + * @param saaSResourceId the saaSResourceId value to set. + * @return the LatestLinkedSaaSResponseInner object itself. + */ + public LatestLinkedSaaSResponseInner withSaaSResourceId(String saaSResourceId) { + this.saaSResourceId = saaSResourceId; + return this; + } + + /** + * Get the isHiddenSaaS property: Flag indicating if the SaaS resource is hidden. + * + * @return the isHiddenSaaS value. + */ + public Boolean isHiddenSaaS() { + return this.isHiddenSaaS; + } + + /** + * Set the isHiddenSaaS property: Flag indicating if the SaaS resource is hidden. + * + * @param isHiddenSaaS the isHiddenSaaS value to set. + * @return the LatestLinkedSaaSResponseInner object itself. + */ + public LatestLinkedSaaSResponseInner withIsHiddenSaaS(Boolean isHiddenSaaS) { + this.isHiddenSaaS = isHiddenSaaS; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("saaSResourceId", this.saaSResourceId); + jsonWriter.writeBooleanField("isHiddenSaaS", this.isHiddenSaaS); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LatestLinkedSaaSResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LatestLinkedSaaSResponseInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LatestLinkedSaaSResponseInner. + */ + public static LatestLinkedSaaSResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LatestLinkedSaaSResponseInner deserializedLatestLinkedSaaSResponseInner + = new LatestLinkedSaaSResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("saaSResourceId".equals(fieldName)) { + deserializedLatestLinkedSaaSResponseInner.saaSResourceId = reader.getString(); + } else if ("isHiddenSaaS".equals(fieldName)) { + deserializedLatestLinkedSaaSResponseInner.isHiddenSaaS = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedLatestLinkedSaaSResponseInner; + }); + } +} 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 index 737bb3631ac9..4ffb4c3dc6c0 100644 --- 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 @@ -30,7 +30,7 @@ public final class MetricRulesInner implements JsonSerializable filteringTags; /* - * User Email + * Reusable representation of an email address */ private String userEmail; @@ -81,7 +81,7 @@ public MetricRulesInner withFilteringTags(List filteringTags) { } /** - * Get the userEmail property: User Email. + * Get the userEmail property: Reusable representation of an email address. * * @return the userEmail value. */ @@ -90,7 +90,7 @@ public String userEmail() { } /** - * Set the userEmail property: User Email. + * Set the userEmail property: Reusable representation of an email address. * * @param userEmail the userEmail value to set. * @return the MetricRulesInner object itself. 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 index 454404c3be46..0946bdf977b8 100644 --- 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 @@ -17,6 +17,7 @@ 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.SaaSData; import com.azure.resourcemanager.newrelicobservability.models.UserInfo; import java.io.IOException; @@ -60,6 +61,11 @@ public final class MonitorProperties implements JsonSerializable { + SaaSResourceDetailsResponseInner deserializedSaaSResourceDetailsResponseInner + = new SaaSResourceDetailsResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSaaSResourceDetailsResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSaaSResourceDetailsResponseInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSaaSResourceDetailsResponseInner.type = reader.getString(); + } else if ("saasId".equals(fieldName)) { + deserializedSaaSResourceDetailsResponseInner.saasId = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedSaaSResourceDetailsResponseInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSaaSResourceDetailsResponseInner; + }); + } +} 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 index 354f27cf8b47..2ad72d769a8e 100644 --- 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 @@ -25,6 +25,7 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.newrelicobservability.fluent.AccountsClient; import com.azure.resourcemanager.newrelicobservability.fluent.models.AccountResourceInner; import com.azure.resourcemanager.newrelicobservability.models.AccountsListResponse; @@ -59,7 +60,7 @@ public final class AccountsClientImpl implements AccountsClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityAccounts") public interface AccountsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/accounts") @@ -70,16 +71,33 @@ Mono> list(@HostParam("$host") String endpoint, @QueryParam("userEmail") String userEmail, @QueryParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/accounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@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); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -115,61 +133,63 @@ private Mono> listSinglePageAsync(String use } /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @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}. + * @return response of get all accounts Operation as paginated response with {@link PagedFlux}. */ - @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)); + @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. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @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}. + * @return response of get all accounts Operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String userEmail, String location) { - return new PagedFlux<>(() -> listSinglePageAsync(userEmail, location), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String userEmail, String location) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (userEmail == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter userEmail is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), userEmail, location, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -177,16 +197,38 @@ private PagedFlux listAsync(String userEmail, String locat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return response of get all accounts Operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String userEmail, String location, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(userEmail, location, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String userEmail, String location, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (userEmail == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter userEmail is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), userEmail, location, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -197,11 +239,12 @@ private PagedFlux listAsync(String userEmail, String locat */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String userEmail, String location) { - return new PagedIterable<>(listAsync(userEmail, location)); + return new PagedIterable<>(() -> listSinglePage(userEmail, location), nextLink -> listNextSinglePage(nextLink)); } /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -213,7 +256,8 @@ public PagedIterable list(String userEmail, String locatio */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String userEmail, String location, Context context) { - return new PagedIterable<>(listAsync(userEmail, location, context)); + return new PagedIterable<>(() -> listSinglePage(userEmail, location, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -242,6 +286,33 @@ private Mono> listNextSinglePageAsync(String .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of get all accounts Operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -250,22 +321,24 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of get all accounts Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return response of get all accounts Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(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)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(AccountsClientImpl.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/BillingInfoesClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/BillingInfoesClientImpl.java index 8751c9d24dfd..c9f50bf28e86 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/BillingInfoesClientImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/BillingInfoesClientImpl.java @@ -21,6 +21,7 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.newrelicobservability.fluent.BillingInfoesClient; import com.azure.resourcemanager.newrelicobservability.fluent.models.BillingInfoResponseInner; import reactor.core.publisher.Mono; @@ -55,7 +56,7 @@ public final class BillingInfoesClientImpl implements BillingInfoesClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityBillingInfoes") public interface BillingInfoesService { @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/getBillingInfo") @@ -65,18 +66,29 @@ Mono> get(@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}/getBillingInfo") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@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); } /** - * Get marketplace info mapped to the given monitor. + * Retrieves marketplace and organization information mapped to the given New Relic monitor resource + * + * A synchronous resource action. * * @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 marketplace info mapped to the given monitor along with {@link Response} on successful completion of - * {@link Mono}. + * @return marketplace Subscription and Organization details to which resource gets billed into along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, @@ -104,50 +116,17 @@ private Mono> getWithResponseAsync(String res } /** - * Get marketplace info mapped to the given monitor. + * Retrieves marketplace and organization information mapped to the given New Relic 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 marketplace info mapped to the given monitor along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, accept, context); - } - - /** - * Get marketplace info mapped to the given monitor. + * A synchronous resource action. * * @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 marketplace info mapped to the given monitor on successful completion of {@link Mono}. + * @return marketplace Subscription and Organization details to which resource gets billed into on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String monitorName) { @@ -155,7 +134,9 @@ private Mono getAsync(String resourceGroupName, String } /** - * Get marketplace info mapped to the given monitor. + * Retrieves marketplace and organization information mapped to the given New Relic monitor resource + * + * A synchronous resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -163,26 +144,51 @@ private Mono getAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return marketplace info mapped to the given monitor along with {@link Response}. + * @return marketplace Subscription and Organization details to which resource gets billed into along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String monitorName, Context context) { - return getWithResponseAsync(resourceGroupName, monitorName, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, accept, context); } /** - * Get marketplace info mapped to the given monitor. + * Retrieves marketplace and organization information mapped to the given New Relic monitor resource + * + * A synchronous resource action. * * @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 marketplace info mapped to the given monitor. + * @return marketplace Subscription and Organization details to which resource gets billed into. */ @ServiceMethod(returns = ReturnType.SINGLE) public BillingInfoResponseInner get(String resourceGroupName, String monitorName) { return getWithResponse(resourceGroupName, monitorName, Context.NONE).getValue(); } + + private static final ClientLogger LOGGER = new ClientLogger(BillingInfoesClientImpl.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/ConnectedPartnerResourcesClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/ConnectedPartnerResourcesClientImpl.java index 0d8517e85136..2e46e35bc460 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/ConnectedPartnerResourcesClientImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/ConnectedPartnerResourcesClientImpl.java @@ -27,6 +27,7 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.newrelicobservability.fluent.ConnectedPartnerResourcesClient; import com.azure.resourcemanager.newrelicobservability.fluent.models.ConnectedPartnerResourcesListFormatInner; import com.azure.resourcemanager.newrelicobservability.models.ConnectedPartnerResourcesListResponse; @@ -62,7 +63,7 @@ public final class ConnectedPartnerResourcesClientImpl implements ConnectedPartn * proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityConnectedPartnerResources") public interface ConnectedPartnerResourcesService { @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listConnectedPartnerResources") @@ -73,6 +74,15 @@ Mono> list(@HostParam("$host") S @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @BodyParam("application/json") String body, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listConnectedPartnerResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") String body, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -80,11 +90,21 @@ Mono> list(@HostParam("$host") S Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param body Email Id of the user. @@ -125,57 +145,39 @@ private Mono> listSingle /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param body Email Id of the user. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 active newrelic deployments along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of all active newrelic deployments as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String monitorName, String body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, body, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String monitorName, + String body) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, body), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param body Email Id of the user. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 active newrelic deployments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String monitorName, - String body) { + private PagedFlux listAsync(String resourceGroupName, + String monitorName) { + final String body = null; return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, body), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -183,24 +185,50 @@ private PagedFlux listAsync(String res /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @param body Email Id of the user. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 active newrelic deployments as paginated response with {@link PagedFlux}. + * @return list of all active newrelic deployments along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, - String monitorName) { - final String body = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, body), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String monitorName, String body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, body, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param body Email Id of the user. @@ -208,18 +236,42 @@ private PagedFlux listAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all active newrelic deployments as paginated response with {@link PagedFlux}. + * @return list of all active newrelic deployments along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String monitorName, - String body, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, body, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String monitorName, String body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, body, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @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. @@ -230,12 +282,15 @@ private PagedFlux listAsync(String res @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String monitorName) { final String body = null; - return new PagedIterable<>(listAsync(resourceGroupName, monitorName, body)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, monitorName, body), + nextLink -> listNextSinglePage(nextLink)); } /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param body Email Id of the user. @@ -248,10 +303,13 @@ public PagedIterable list(String resou @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String monitorName, String body, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, monitorName, body, context)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, monitorName, body, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** + * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -279,6 +337,37 @@ private Mono> listNextSi } /** + * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of all active newrelic deployments along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -286,23 +375,26 @@ private Mono> listNextSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 active newrelic deployments along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of all active newrelic deployments along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(ConnectedPartnerResourcesClientImpl.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/LatestLinkedSaaSResponseImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/LatestLinkedSaaSResponseImpl.java new file mode 100644 index 000000000000..ab1a1e2a106a --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/LatestLinkedSaaSResponseImpl.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.implementation; + +import com.azure.resourcemanager.newrelicobservability.fluent.models.LatestLinkedSaaSResponseInner; +import com.azure.resourcemanager.newrelicobservability.models.LatestLinkedSaaSResponse; + +public final class LatestLinkedSaaSResponseImpl implements LatestLinkedSaaSResponse { + private LatestLinkedSaaSResponseInner innerObject; + + private final com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager; + + LatestLinkedSaaSResponseImpl(LatestLinkedSaaSResponseInner innerObject, + com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String saaSResourceId() { + return this.innerModel().saaSResourceId(); + } + + public Boolean isHiddenSaaS() { + return this.innerModel().isHiddenSaaS(); + } + + public LatestLinkedSaaSResponseInner 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/MonitoredSubscriptionPropertiesImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionPropertiesImpl.java index 72257cb8dd98..37be0cb7a972 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionPropertiesImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionPropertiesImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.newrelicobservability.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.newrelicobservability.fluent.models.MonitoredSubscriptionPropertiesInner; import com.azure.resourcemanager.newrelicobservability.models.ConfigurationName; @@ -32,6 +33,10 @@ public SubscriptionList properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -59,14 +64,14 @@ public MonitoredSubscriptionPropertiesImpl withExistingMonitor(String resourceGr public MonitoredSubscriptionProperties create() { this.innerObject = serviceManager.serviceClient() .getMonitoredSubscriptions() - .createorUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), Context.NONE); + .createOrUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), Context.NONE); return this; } public MonitoredSubscriptionProperties create(Context context) { this.innerObject = serviceManager.serviceClient() .getMonitoredSubscriptions() - .createorUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), context); + .createOrUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), context); return this; } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionsClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionsClientImpl.java index 78b8b8f60490..57fc62716664 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionsClientImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionsClientImpl.java @@ -28,8 +28,10 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.newrelicobservability.fluent.MonitoredSubscriptionsClient; @@ -70,36 +72,65 @@ public final class MonitoredSubscriptionsClientImpl implements MonitoredSubscrip * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityMonitoredSubscriptions") public interface MonitoredSubscriptionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@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("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("configurationName") ConfigurationName configurationName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("configurationName") ConfigurationName configurationName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}") + @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, @PathParam("configurationName") ConfigurationName configurationName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @BodyParam("application/json") MonitoredSubscriptionPropertiesInner body, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createorUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @PathParam("configurationName") ConfigurationName configurationName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") MonitoredSubscriptionPropertiesInner body, @HeaderParam("Accept") String accept, Context context); @@ -108,10 +139,20 @@ Mono>> createorUpdate(@HostParam("$host") String endpo @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("configurationName") ConfigurationName configurationName, + @BodyParam("application/json") MonitoredSubscriptionPropertiesInner body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @PathParam("configurationName") ConfigurationName configurationName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") MonitoredSubscriptionPropertiesInner body, @HeaderParam("Accept") String accept, Context context); @@ -120,10 +161,20 @@ Mono>> update(@HostParam("$host") String endpoint, @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, - @PathParam("configurationName") ConfigurationName configurationName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("configurationName") ConfigurationName configurationName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("configurationName") ConfigurationName configurationName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @@ -132,17 +183,28 @@ Mono>> delete(@HostParam("$host") String endpoint, Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties 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 ManagementException thrown 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 PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of MonitoredSubscriptionProperties items along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, @@ -164,69 +226,76 @@ private Mono> listSinglePage } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(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 subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of MonitoredSubscriptionProperties items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String monitorName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties 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 ManagementException thrown 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 PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of MonitoredSubscriptionProperties items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String monitorName, Context context) { + private PagedResponse listSinglePage(String resourceGroupName, + String monitorName) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions 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 the paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String monitorName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -234,32 +303,60 @@ private PagedFlux listAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedFlux}. + * @return paged collection of MonitoredSubscriptionProperties items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String monitorName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties 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 ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return paged collection of MonitoredSubscriptionProperties items as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String monitorName) { - return new PagedIterable<>(listAsync(resourceGroupName, monitorName)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, monitorName), + nextLink -> listNextSinglePage(nextLink)); } /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -267,16 +364,20 @@ public PagedIterable list(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return paged collection of MonitoredSubscriptionProperties items as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String monitorName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, monitorName, context)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, monitorName, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -284,8 +385,7 @@ public PagedIterable list(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response} on successful completion of {@link Mono}. + * @return a MonitoredSubscriptionProperties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, @@ -311,54 +411,15 @@ private Mono> getWithResponseAsyn } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, configurationName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions 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 configurationName The configuration name. Only 'default' value is supported. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String monitorName, ConfigurationName configurationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - if (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, - configurationName, this.client.getApiVersion(), accept, context); - } - - /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Get a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -366,8 +427,7 @@ private Mono> getWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource on successful - * completion of {@link Mono}. + * @return a MonitoredSubscriptionProperties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String monitorName, @@ -377,7 +437,9 @@ private Mono getAsync(String resourceGroup } /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -386,17 +448,42 @@ private Mono getAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response}. + * @return a MonitoredSubscriptionProperties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String monitorName, ConfigurationName configurationName, Context context) { - return getWithResponseAsync(resourceGroupName, monitorName, configurationName, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (configurationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, configurationName, accept, context); } /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -404,7 +491,7 @@ public Response getWithResponse(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource. + * @return a MonitoredSubscriptionProperties. */ @ServiceMethod(returns = ReturnType.SINGLE) public MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String monitorName, @@ -413,7 +500,9 @@ public MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -426,7 +515,7 @@ public MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createorUpdateWithResponseAsync(String resourceGroupName, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -452,13 +541,65 @@ private Mono>> createorUpdateWithResponseAsync(String } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createorUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, configurationName, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param configurationName The configuration name. Only 'default' value is supported. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (configurationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept, + Context.NONE); + } + + /** + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -469,42 +610,45 @@ private Mono>> createorUpdateWithResponseAsync(String * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createorUpdateWithResponseAsync(String resourceGroupName, - String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, - Context context) { + private Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } if (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } if (body != null) { body.validate(); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createorUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - monitorName, configurationName, this.client.getApiVersion(), body, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept, context); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -518,17 +662,19 @@ private Mono>> createorUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, MonitoredSubscriptionPropertiesInner> - beginCreateorUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName, + beginCreateOrUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body) { Mono>> mono - = createorUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body); + = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body); return this.client.getLroResult( mono, this.client.getHttpPipeline(), MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, this.client.getContext()); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -541,43 +687,45 @@ private Mono>> createorUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, MonitoredSubscriptionPropertiesInner> - beginCreateorUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName) { + beginCreateOrUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName) { final MonitoredSubscriptionPropertiesInner body = null; Mono>> mono - = createorUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body); + = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body); return this.client.getLroResult( mono, this.client.getHttpPipeline(), MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, this.client.getContext()); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param configurationName The configuration name. Only 'default' value is supported. * @param body The body parameter. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the request to update subscriptions needed to be monitored by the + * @return the {@link SyncPoller} for polling of the request to update subscriptions needed to be monitored by the * NewRelic monitor resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MonitoredSubscriptionPropertiesInner> - beginCreateorUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName, - MonitoredSubscriptionPropertiesInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createorUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body, context); + public SyncPoller, MonitoredSubscriptionPropertiesInner> + beginCreateOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, + MonitoredSubscriptionPropertiesInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, monitorName, configurationName, body); return this.client.getLroResult( - mono, this.client.getHttpPipeline(), MonitoredSubscriptionPropertiesInner.class, - MonitoredSubscriptionPropertiesInner.class, context); + response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, + Context.NONE); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -590,13 +738,19 @@ private Mono>> createorUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MonitoredSubscriptionPropertiesInner> - beginCreateorUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName) { + beginCreateOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName) { final MonitoredSubscriptionPropertiesInner body = null; - return this.beginCreateorUpdateAsync(resourceGroupName, monitorName, configurationName, body).getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, monitorName, configurationName, body); + return this.client.getLroResult( + response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, + Context.NONE); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -611,14 +765,18 @@ private Mono>> createorUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MonitoredSubscriptionPropertiesInner> - beginCreateorUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, + beginCreateOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) { - return this.beginCreateorUpdateAsync(resourceGroupName, monitorName, configurationName, body, context) - .getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, monitorName, configurationName, body, context); + return this.client.getLroResult( + response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, context); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -631,14 +789,16 @@ private Mono>> createorUpdateWithResponseAsync(String * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createorUpdateAsync(String resourceGroupName, String monitorName, + private Mono createOrUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body) { - return beginCreateorUpdateAsync(resourceGroupName, monitorName, configurationName, body).last() + return beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -650,36 +810,17 @@ private Mono createorUpdateAsync(String re * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createorUpdateAsync(String resourceGroupName, String monitorName, + private Mono createOrUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName) { final MonitoredSubscriptionPropertiesInner body = null; - return beginCreateorUpdateAsync(resourceGroupName, monitorName, configurationName, body).last() + return beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Name of the Monitors resource. - * @param configurationName The configuration name. Only 'default' value is supported. - * @param body The body parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createorUpdateAsync(String resourceGroupName, String monitorName, - ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) { - return beginCreateorUpdateAsync(resourceGroupName, monitorName, configurationName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -690,14 +831,16 @@ private Mono createorUpdateAsync(String re * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, String monitorName, + public MonitoredSubscriptionPropertiesInner createOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName) { final MonitoredSubscriptionPropertiesInner body = null; - return createorUpdateAsync(resourceGroupName, monitorName, configurationName, body).block(); + return beginCreateOrUpdate(resourceGroupName, monitorName, configurationName, body).getFinalResult(); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -710,13 +853,16 @@ public MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupN * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, String monitorName, + public MonitoredSubscriptionPropertiesInner createOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) { - return createorUpdateAsync(resourceGroupName, monitorName, configurationName, body, context).block(); + return beginCreateOrUpdate(resourceGroupName, monitorName, configurationName, body, context).getFinalResult(); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -754,14 +900,66 @@ private Mono>> updateWithResponseAsync(String resource body.validate(); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, configurationName, this.client.getApiVersion(), body, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param configurationName The configuration name. Only 'default' value is supported. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String monitorName, + ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (configurationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept, + Context.NONE); + } + + /** + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -772,41 +970,46 @@ private Mono>> updateWithResponseAsync(String resource * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String monitorName, + private Response updateWithResponse(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } if (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } if (body != null) { body.validate(); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - monitorName, configurationName, this.client.getApiVersion(), body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept, context); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -830,7 +1033,10 @@ private Mono>> updateWithResponseAsync(String resource } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -853,33 +1059,36 @@ private Mono>> updateWithResponseAsync(String resource } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param configurationName The configuration name. Only 'default' value is supported. * @param body The body parameter. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the request to update subscriptions needed to be monitored by the + * @return the {@link SyncPoller} for polling of the request to update subscriptions needed to be monitored by the * NewRelic monitor resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MonitoredSubscriptionPropertiesInner> - beginUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName, - MonitoredSubscriptionPropertiesInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, monitorName, configurationName, body, context); + public SyncPoller, MonitoredSubscriptionPropertiesInner> + beginUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, + MonitoredSubscriptionPropertiesInner body) { + Response response = updateWithResponse(resourceGroupName, monitorName, configurationName, body); return this.client.getLroResult( - mono, this.client.getHttpPipeline(), MonitoredSubscriptionPropertiesInner.class, - MonitoredSubscriptionPropertiesInner.class, context); + response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, + Context.NONE); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -894,11 +1103,17 @@ private Mono>> updateWithResponseAsync(String resource public SyncPoller, MonitoredSubscriptionPropertiesInner> beginUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName) { final MonitoredSubscriptionPropertiesInner body = null; - return this.beginUpdateAsync(resourceGroupName, monitorName, configurationName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, monitorName, configurationName, body); + return this.client.getLroResult( + response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, + Context.NONE); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -915,11 +1130,17 @@ private Mono>> updateWithResponseAsync(String resource public SyncPoller, MonitoredSubscriptionPropertiesInner> beginUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) { - return this.beginUpdateAsync(resourceGroupName, monitorName, configurationName, body, context).getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, monitorName, configurationName, body, context); + return this.client.getLroResult( + response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, context); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -939,7 +1160,10 @@ private Mono updateAsync(String resourceGr } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -959,28 +1183,10 @@ private Mono updateAsync(String resourceGr } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Name of the Monitors resource. - * @param configurationName The configuration name. Only 'default' value is supported. - * @param body The body parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String monitorName, - ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) { - return beginUpdateAsync(resourceGroupName, monitorName, configurationName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -994,11 +1200,14 @@ private Mono updateAsync(String resourceGr public MonitoredSubscriptionPropertiesInner update(String resourceGroupName, String monitorName, ConfigurationName configurationName) { final MonitoredSubscriptionPropertiesInner body = null; - return updateAsync(resourceGroupName, monitorName, configurationName, body).block(); + return beginUpdate(resourceGroupName, monitorName, configurationName, body).getFinalResult(); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -1013,11 +1222,14 @@ public MonitoredSubscriptionPropertiesInner update(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) public MonitoredSubscriptionPropertiesInner update(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) { - return updateAsync(resourceGroupName, monitorName, configurationName, body, context).block(); + return beginUpdate(resourceGroupName, monitorName, configurationName, body, context).getFinalResult(); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -1051,78 +1263,109 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, configurationName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param configurationName The configuration name. Only 'default' value is supported. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName, - ConfigurationName configurationName, Context context) { + private Response deleteWithResponse(String resourceGroupName, String monitorName, + ConfigurationName configurationName) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } if (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - monitorName, configurationName, this.client.getApiVersion(), accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, accept, Context.NONE); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param configurationName The configuration name. Only 'default' value is supported. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, - ConfigurationName configurationName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, monitorName, configurationName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String monitorName, + ConfigurationName configurationName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (configurationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, accept, context); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param configurationName The configuration name. Only 'default' value is supported. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1130,16 +1373,18 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, - ConfigurationName configurationName, Context context) { - context = this.client.mergeContext(context); + ConfigurationName configurationName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, monitorName, configurationName, context); + = deleteWithResponseAsync(resourceGroupName, monitorName, configurationName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -1152,11 +1397,15 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, ConfigurationName configurationName) { - return this.beginDeleteAsync(resourceGroupName, monitorName, configurationName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, monitorName, configurationName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -1170,11 +1419,15 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, ConfigurationName configurationName, Context context) { - return this.beginDeleteAsync(resourceGroupName, monitorName, configurationName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, monitorName, configurationName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -1191,26 +1444,10 @@ private Mono deleteAsync(String resourceGroupName, String monitorName, Con } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Name of the Monitors resource. - * @param configurationName The configuration name. Only 'default' value is supported. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName, - Context context) { - return beginDeleteAsync(resourceGroupName, monitorName, configurationName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -1221,11 +1458,14 @@ private Mono deleteAsync(String resourceGroupName, String monitorName, Con */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String monitorName, ConfigurationName configurationName) { - deleteAsync(resourceGroupName, monitorName, configurationName).block(); + beginDelete(resourceGroupName, monitorName, configurationName).getFinalResult(); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -1238,17 +1478,20 @@ public void delete(String resourceGroupName, String monitorName, ConfigurationNa @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String monitorName, ConfigurationName configurationName, Context context) { - deleteAsync(resourceGroupName, monitorName, configurationName, context).block(); + beginDelete(resourceGroupName, monitorName, configurationName, context).getFinalResult(); } /** + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of MonitoredSubscriptionProperties items along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1267,6 +1510,37 @@ private Mono> listNextSingle } /** + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of MonitoredSubscriptionProperties items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1274,22 +1548,25 @@ private Mono> listNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of MonitoredSubscriptionProperties items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(MonitoredSubscriptionsClientImpl.class); } 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 index 4c2acd40e870..511b9e6c4ca1 100644 --- 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 @@ -29,12 +29,15 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; 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.LatestLinkedSaaSResponseInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.LinkedResourceInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricRulesInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricsStatusResponseInner; @@ -52,6 +55,8 @@ import com.azure.resourcemanager.newrelicobservability.models.MonitorsSwitchBillingResponse; import com.azure.resourcemanager.newrelicobservability.models.NewRelicMonitorResourceListResult; import com.azure.resourcemanager.newrelicobservability.models.NewRelicMonitorResourceUpdate; +import com.azure.resourcemanager.newrelicobservability.models.ResubscribeProperties; +import com.azure.resourcemanager.newrelicobservability.models.SaaSData; import com.azure.resourcemanager.newrelicobservability.models.SwitchBillingRequest; import com.azure.resourcemanager.newrelicobservability.models.VMHostsListResponse; import java.nio.ByteBuffer; @@ -87,7 +92,7 @@ public final class MonitorsClientImpl implements MonitorsClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityMonitors") public interface MonitorsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/monitors") @@ -97,6 +102,14 @@ Mono> list(@HostParam("$host") Strin @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/monitors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@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 }) @@ -106,6 +119,15 @@ Mono> listByResourceGroup(@HostParam @PathParam("resourceGroupName") String resourceGroupName, @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) + Response listByResourceGroupSync(@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 }) @@ -115,6 +137,15 @@ Mono> getByResourceGroup(@HostParam("$hos @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @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) + Response getByResourceGroupSync(@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 }) @@ -125,11 +156,31 @@ Mono>> createOrUpdate(@HostParam("$host") String endpo @BodyParam("application/json") NewRelicMonitorResourceInner resource, @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) + Response createOrUpdateSync(@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 }) + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") NewRelicMonitorResourceUpdate properties, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Response updateSync(@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, @@ -141,8 +192,17 @@ Mono> update(@HostParam("$host") String e @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); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("userEmail") String userEmail, @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) + Response deleteSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("userEmail") String userEmail, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/getMetricRules") @@ -154,6 +214,16 @@ Mono> getMetricRules(@HostParam("$host") String endpo @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}/getMetricRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getMetricRulesSync(@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 }) @@ -164,6 +234,52 @@ Mono> getMetricStatus(@HostParam("$host") S @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}/getMetricStatus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getMetricStatusSync(@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}/latestLinkedSaaS") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> latestLinkedSaaS(@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}/latestLinkedSaaS") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response latestLinkedSaaSSync(@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}/linkSaaS") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> linkSaaS(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") SaaSData body, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/linkSaaS") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response linkSaaSSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") SaaSData body, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listAppServices") @ExpectedResponses({ 200 }) @@ -175,13 +291,13 @@ Mono> listAppServices(@HostParam("$host") Stri Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/switchBilling") - @ExpectedResponses({ 200, 202, 204 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listAppServices") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono switchBilling(@HostParam("$host") String endpoint, + Response listAppServicesSync(@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, + @BodyParam("application/json") AppServicesGetRequest request, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -194,6 +310,34 @@ Mono> listHosts(@HostParam("$host") String endpoin @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}/listHosts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listHostsSync(@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}/listLinkedResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listLinkedResources(@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}/listLinkedResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listLinkedResourcesSync(@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}/monitoredResources") @ExpectedResponses({ 200 }) @@ -204,13 +348,71 @@ Mono> listMonitoredResources(@HostParam( @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listLinkedResources") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listLinkedResources(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listMonitoredResourcesSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/refreshIngestionKey") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> refreshIngestionKey(@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}/refreshIngestionKey") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response refreshIngestionKeySync(@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}/resubscribe") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resubscribe(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") ResubscribeProperties body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/resubscribe") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response resubscribeSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") ResubscribeProperties body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/switchBilling") + @ExpectedResponses({ 200, 202, 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}/switchBilling") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + MonitorsSwitchBillingResponse switchBillingSync(@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}/vmHostPayloads") @@ -221,6 +423,15 @@ Mono> vmHostPayload(@HostParam("$host") String @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) + Response vmHostPayloadSync(@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 }) @@ -229,6 +440,14 @@ 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) + Response listBySubscriptionNextSync( + @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 }) @@ -237,6 +456,14 @@ 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) + Response listByResourceGroupNextSync( + @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 }) @@ -245,6 +472,14 @@ 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) + Response listAppServicesNextSync( + @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 }) @@ -253,6 +488,29 @@ 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) + Response listHostsNextSync(@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> listLinkedResourcesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listLinkedResourcesNextSync( + @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 }) @@ -265,13 +523,13 @@ Mono> listMonitoredResourcesNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listLinkedResourcesNext( + Response listMonitoredResourcesNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List NewRelicMonitorResource resources by subscription ID. + * Lists all New Relic monitor resources either within a specific subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -298,36 +556,7 @@ private Mono> listSinglePageAsync() } /** - * 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. + * Lists all New Relic monitor resources either within a specific subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -340,35 +569,74 @@ private PagedFlux listAsync() { } /** - * List NewRelicMonitorResource resources by subscription ID. + * Lists all New Relic monitor resources either within a specific subscription. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a NewRelicMonitorResource list operation as paginated response with {@link PagedFlux}. + * @return the response of a NewRelicMonitorResource list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NewRelicMonitorResource resources by subscription ID. + * Lists all New Relic monitor resources either within a specific subscription. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a NewRelicMonitorResource list operation as paginated response with + * @return the response of a NewRelicMonitorResource list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all New Relic monitor resources either within a specific subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NewRelicMonitorResource list operation as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List NewRelicMonitorResource resources by subscription ID. + * Lists all New Relic monitor resources either within a specific subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -379,11 +647,12 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -417,74 +686,88 @@ public PagedIterable list(Context context) { } /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific 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}. + * @return the response of a NewRelicMonitorResource list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific 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}. + * @return the response of a NewRelicMonitorResource list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific 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}. + * @return the response of a NewRelicMonitorResource list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -495,11 +778,12 @@ private PagedFlux listByResourceGroupAsync(String */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -511,18 +795,20 @@ public PagedIterable listByResourceGroup(String re */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @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}. + * @return a Monitor Resource by NewRelic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, @@ -550,49 +836,15 @@ private Mono> getByResourceGroupWithRespo } /** - * 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. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @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}. + * @return a Monitor Resource by NewRelic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String monitorName) { @@ -601,7 +853,8 @@ private Mono getByResourceGroupAsync(String resour } /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -609,23 +862,44 @@ private Mono getByResourceGroupAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String monitorName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, monitorName, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context); } /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @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. + * @return a Monitor Resource by NewRelic. */ @ServiceMethod(returns = ReturnType.SINGLE) public NewRelicMonitorResourceInner getByResourceGroup(String resourceGroupName, String monitorName) { @@ -633,7 +907,9 @@ public NewRelicMonitorResourceInner getByResourceGroup(String resourceGroupName, } /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -674,92 +950,123 @@ private Mono>> createOrUpdateWithResponseAsync(String } /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @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}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String monitorName, NewRelicMonitorResourceInner resource, Context context) { + private Response createOrUpdateWithResponse(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(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); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, resource, accept, Context.NONE); } /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @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. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + NewRelicMonitorResourceInner resource, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, resource, accept, context); } /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @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); + private PollerFlux, NewRelicMonitorResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, resource, context); + = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, resource); return this.client.getLroResult(mono, this.client.getHttpPipeline(), NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, - context); + this.client.getContext()); } /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -772,11 +1079,15 @@ private PollerFlux, NewRelicMonitorReso @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NewRelicMonitorResourceInner> beginCreateOrUpdate(String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, monitorName, resource).getSyncPoller(); + Response response = createOrUpdateWithResponse(resourceGroupName, monitorName, resource); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, Context.NONE); } /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -790,11 +1101,15 @@ private PollerFlux, NewRelicMonitorReso @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(); + Response response = createOrUpdateWithResponse(resourceGroupName, monitorName, resource, context); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, context); } /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -812,26 +1127,9 @@ private Mono createOrUpdateAsync(String resourceGr } /** - * 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. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -844,11 +1142,13 @@ private Mono createOrUpdateAsync(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) public NewRelicMonitorResourceInner createOrUpdate(String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource) { - return createOrUpdateAsync(resourceGroupName, monitorName, resource).block(); + return beginCreateOrUpdate(resourceGroupName, monitorName, resource).getFinalResult(); } /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -862,11 +1162,11 @@ public NewRelicMonitorResourceInner createOrUpdate(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) public NewRelicMonitorResourceInner createOrUpdate(String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, monitorName, resource, context).block(); + return beginCreateOrUpdate(resourceGroupName, monitorName, resource, context).getFinalResult(); } /** - * Update a NewRelicMonitorResource. + * Updates an existing New Relic monitor resource from your Azure subscription. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -877,8 +1177,8 @@ public NewRelicMonitorResourceInner createOrUpdate(String resourceGroupName, Str * @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) { + 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.")); @@ -907,7 +1207,50 @@ private Mono> updateWithResponseAsync(Str } /** - * Update a NewRelicMonitorResource. + * Updates an existing New Relic monitor resource from your Azure subscription. + * + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String monitorName, + NewRelicMonitorResourceUpdate properties) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, properties, accept, Context.NONE); + } + + /** + * Updates an existing New Relic monitor resource from your Azure subscription. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -916,11 +1259,641 @@ private Mono> updateWithResponseAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Monitor Resource by NewRelic along with {@link Response} on successful completion of {@link Mono}. + * @return a Monitor Resource by NewRelic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String monitorName, + NewRelicMonitorResourceUpdate properties, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, properties, accept, context); + } + + /** + * Updates an existing New Relic monitor resource from your Azure subscription. + * + * @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 the {@link PollerFlux} for polling of a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NewRelicMonitorResourceInner> + beginUpdateAsync(String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate properties) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, monitorName, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, + this.client.getContext()); + } + + /** + * Updates an existing New Relic monitor resource from your Azure subscription. + * + * @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 the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NewRelicMonitorResourceInner> + beginUpdate(String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate properties) { + Response response = updateWithResponse(resourceGroupName, monitorName, properties); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, Context.NONE); + } + + /** + * Updates an existing New Relic monitor resource from your Azure subscription. + * + * @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 the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NewRelicMonitorResourceInner> beginUpdate( + String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate properties, Context context) { + Response response = updateWithResponse(resourceGroupName, monitorName, properties, context); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, context); + } + + /** + * Updates an existing New Relic monitor resource from your Azure subscription. + * + * @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 beginUpdateAsync(resourceGroupName, monitorName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an existing New Relic monitor resource from your Azure subscription. + * + * @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 beginUpdate(resourceGroupName, monitorName, properties).getFinalResult(); + } + + /** + * Updates an existing New Relic monitor resource from your Azure subscription. + * + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NewRelicMonitorResourceInner update(String resourceGroupName, String monitorName, + NewRelicMonitorResourceUpdate properties, Context context) { + return beginUpdate(resourceGroupName, monitorName, properties, context).getFinalResult(); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName, + String userEmail) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (userEmail == null) { + return Mono.error(new IllegalArgumentException("Parameter userEmail 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, monitorName, userEmail, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String monitorName, String userEmail) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (userEmail == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter userEmail is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, userEmail, accept, Context.NONE); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String monitorName, String userEmail, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (userEmail == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter userEmail is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, userEmail, accept, context); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, + String userEmail) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, monitorName, userEmail); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, + String userEmail) { + Response response = deleteWithResponse(resourceGroupName, monitorName, userEmail); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, + String userEmail, Context context) { + Response response = deleteWithResponse(resourceGroupName, monitorName, userEmail, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String monitorName, String userEmail) { + return beginDeleteAsync(resourceGroupName, monitorName, userEmail).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String monitorName, String userEmail) { + beginDelete(resourceGroupName, monitorName, userEmail).getFinalResult(); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String monitorName, String userEmail, Context context) { + beginDelete(resourceGroupName, monitorName, userEmail, context).getFinalResult(); + } + + /** + * Retrieves the metric rules that are configured in the New Relic 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 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 set of rules for sending metrics for the Monitor resource 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())); + } + + /** + * Retrieves the metric rules that are configured in the New Relic 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 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 set of rules for sending metrics for the Monitor resource 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())); + } + + /** + * Retrieves the metric rules that are configured in the New Relic 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 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 set of rules for sending metrics for the Monitor resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMetricRulesWithResponse(String resourceGroupName, String monitorName, + MetricsRequest request, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (request == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return service.getMetricRulesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context); + } + + /** + * Retrieves the metric rules that are configured in the New Relic 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 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 set of rules for sending metrics for the Monitor resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MetricRulesInner getMetricRules(String resourceGroupName, String monitorName, MetricsRequest request) { + return getMetricRulesWithResponse(resourceGroupName, monitorName, request, Context.NONE).getValue(); + } + + /** + * Retrieves the metric status that are configured in the New Relic 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 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 response of get metrics status Operation 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())); + } + + /** + * Retrieves the metric status that are configured in the New Relic 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 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 response of get metrics status Operation 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())); + } + + /** + * Retrieves the metric status that are configured in the New Relic 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 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 response of get metrics status Operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMetricStatusWithResponse(String resourceGroupName, + String monitorName, MetricsStatusRequest request, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (request == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return service.getMetricStatusSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context); + } + + /** + * Retrieves the metric status that are configured in the New Relic 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 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 response of get metrics status Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MetricsStatusResponseInner getMetricStatus(String resourceGroupName, String monitorName, + MetricsStatusRequest request) { + return getMetricStatusWithResponse(resourceGroupName, monitorName, request, Context.NONE).getValue(); + } + + /** + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. + * + * @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 get latest linked SaaS resource operation 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) { + private Mono> latestLinkedSaaSWithResponseAsync(String resourceGroupName, + String monitorName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -936,84 +1909,95 @@ private Mono> updateWithResponseAsync(Str 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); + return FluxUtil + .withContext(context -> service.latestLinkedSaaS(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a NewRelicMonitorResource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * * @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}. + * @return response of get latest linked SaaS resource operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String monitorName, - NewRelicMonitorResourceUpdate properties) { - return updateWithResponseAsync(resourceGroupName, monitorName, properties) + private Mono latestLinkedSaaSAsync(String resourceGroupName, String monitorName) { + return latestLinkedSaaSWithResponseAsync(resourceGroupName, monitorName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Update a NewRelicMonitorResource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * * @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}. + * @return response of get latest linked SaaS resource operation 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(); + public Response latestLinkedSaaSWithResponse(String resourceGroupName, + String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.latestLinkedSaaSSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context); } /** - * Update a NewRelicMonitorResource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * * @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. + * @return response of get latest linked SaaS resource operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NewRelicMonitorResourceInner update(String resourceGroupName, String monitorName, - NewRelicMonitorResourceUpdate properties) { - return updateWithResponse(resourceGroupName, monitorName, properties, Context.NONE).getValue(); + public LatestLinkedSaaSResponseInner latestLinkedSaaS(String resourceGroupName, String monitorName) { + return latestLinkedSaaSWithResponse(resourceGroupName, monitorName, Context.NONE).getValue(); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @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 body Link SaaS body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return a Monitor Resource by NewRelic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String userEmail, - String monitorName) { + private Mono>> linkSaaSWithResponseAsync(String resourceGroupName, String monitorName, + SaaSData body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1026,214 +2010,232 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, userEmail, monitorName, accept, context)) + .withContext(context -> service.linkSaaS(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @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. + * @param body Link SaaS body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String userEmail, - String monitorName, Context context) { + private Response linkSaaSWithResponse(String resourceGroupName, String monitorName, SaaSData body) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.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.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, userEmail, monitorName, accept, context); + return service.linkSaaSSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, body, accept, Context.NONE); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @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 body Link SaaS body parameter. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response linkSaaSWithResponse(String resourceGroupName, String monitorName, SaaSData body, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return service.linkSaaSSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, body, accept, context); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @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. + * @param body Link SaaS body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of a Monitor Resource by NewRelic. */ @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); + private PollerFlux, NewRelicMonitorResourceInner> + beginLinkSaaSAsync(String resourceGroupName, String monitorName, SaaSData body) { + Mono>> mono = linkSaaSWithResponseAsync(resourceGroupName, monitorName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, + this.client.getContext()); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @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 body Link SaaS body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String userEmail, - String monitorName) { - return this.beginDeleteAsync(resourceGroupName, userEmail, monitorName).getSyncPoller(); + public SyncPoller, NewRelicMonitorResourceInner> + beginLinkSaaS(String resourceGroupName, String monitorName, SaaSData body) { + Response response = linkSaaSWithResponse(resourceGroupName, monitorName, body); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, Context.NONE); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @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 body Link SaaS body parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. */ @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); + public SyncPoller, NewRelicMonitorResourceInner> + beginLinkSaaS(String resourceGroupName, String monitorName, SaaSData body, Context context) { + Response response = linkSaaSWithResponse(resourceGroupName, monitorName, body, context); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, context); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @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. + * @param body Link SaaS body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return a Monitor Resource by NewRelic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String userEmail, String monitorName, Context context) { - return beginDeleteAsync(resourceGroupName, userEmail, monitorName, context).last() + private Mono linkSaaSAsync(String resourceGroupName, String monitorName, + SaaSData body) { + return beginLinkSaaSAsync(resourceGroupName, monitorName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @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 body Link SaaS body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Monitor Resource by NewRelic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String userEmail, String monitorName) { - deleteAsync(resourceGroupName, userEmail, monitorName).block(); + public NewRelicMonitorResourceInner linkSaaS(String resourceGroupName, String monitorName, SaaSData body) { + return beginLinkSaaS(resourceGroupName, monitorName, body).getFinalResult(); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @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 body Link SaaS body parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Monitor Resource by NewRelic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String userEmail, String monitorName, Context context) { - deleteAsync(resourceGroupName, userEmail, monitorName, context).block(); + public NewRelicMonitorResourceInner linkSaaS(String resourceGroupName, String monitorName, SaaSData body, + Context context) { + return beginLinkSaaS(resourceGroupName, monitorName, body, context).getFinalResult(); } /** - * Get metric rules. + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. * * @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 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 metric rules along with {@link Response} on successful completion of {@link Mono}. + * @return response of a list app services Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getMetricRulesWithResponseAsync(String resourceGroupName, - String monitorName, MetricsRequest request) { + 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.")); @@ -1256,254 +2258,377 @@ private Mono> getMetricRulesWithResponseAsync(String } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getMetricRules(this.client.getEndpoint(), this.client.getApiVersion(), + .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())); } /** - * Get metric rules. + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. * * @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. + * @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)); + } + + /** + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. + * + * @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 metric rules along with {@link Response} on successful completion of {@link Mono}. + * @return response of a list app services Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getMetricRulesWithResponseAsync(String resourceGroupName, - String monitorName, MetricsRequest request, Context context) { + private PagedResponse listAppServicesSinglePage(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(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); + Response res + = service.listAppServicesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get metric rules. + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. * * @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 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 metric rules on successful completion of {@link Mono}. + * @return response of a list app services Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getMetricRulesAsync(String resourceGroupName, String monitorName, - MetricsRequest request) { - return getMetricRulesWithResponseAsync(resourceGroupName, monitorName, request) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listAppServicesSinglePage(String resourceGroupName, String monitorName, + AppServicesGetRequest request, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (request == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + Response res + = service.listAppServicesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get metric rules. + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. * * @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 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<>(() -> listAppServicesSinglePage(resourceGroupName, monitorName, request), + nextLink -> listAppServicesNextSinglePage(nextLink)); + } + + /** + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. + * + * @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 metric rules along with {@link Response}. + * @return response of a list app services Operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getMetricRulesWithResponse(String resourceGroupName, String monitorName, - MetricsRequest request, Context context) { - return getMetricRulesWithResponseAsync(resourceGroupName, monitorName, request, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAppServices(String resourceGroupName, String monitorName, + AppServicesGetRequest request, Context context) { + return new PagedIterable<>(() -> listAppServicesSinglePage(resourceGroupName, monitorName, request, context), + nextLink -> listAppServicesNextSinglePage(nextLink, context)); } /** - * Get metric rules. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @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 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 metric rules. + * @return response of a list VM Host Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MetricRulesInner getMetricRules(String resourceGroupName, String monitorName, MetricsRequest request) { - return getMetricRulesWithResponse(resourceGroupName, monitorName, request, Context.NONE).getValue(); + 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())); + } + + /** + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. + * + * @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)); } /** - * Get metric status. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @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 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 metric status along with {@link Response} on successful completion of {@link Mono}. + * @return response of a list VM Host Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getMetricStatusWithResponseAsync(String resourceGroupName, - String monitorName, MetricsStatusRequest request) { + private PagedResponse listHostsSinglePage(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(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())); + Response res + = service.listHostsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get metric status. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @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 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 metric status along with {@link Response} on successful completion of {@link Mono}. + * @return response of a list VM Host Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getMetricStatusWithResponseAsync(String resourceGroupName, - String monitorName, MetricsStatusRequest request, Context context) { + private PagedResponse listHostsSinglePage(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(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); + Response res + = service.listHostsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get metric status. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @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 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 metric status on successful completion of {@link Mono}. + * @return response of a list VM Host Operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getMetricStatusAsync(String resourceGroupName, String monitorName, - MetricsStatusRequest request) { - return getMetricStatusWithResponseAsync(resourceGroupName, monitorName, request) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHosts(String resourceGroupName, String monitorName, HostsGetRequest request) { + return new PagedIterable<>(() -> listHostsSinglePage(resourceGroupName, monitorName, request), + nextLink -> listHostsNextSinglePage(nextLink)); } /** - * Get metric status. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @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 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 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. + * @return response of a list VM Host Operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MetricsStatusResponseInner getMetricStatus(String resourceGroupName, String monitorName, - MetricsStatusRequest request) { - return getMetricStatusWithResponse(resourceGroupName, monitorName, request, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHosts(String resourceGroupName, String monitorName, HostsGetRequest request, + Context context) { + return new PagedIterable<>(() -> listHostsSinglePage(resourceGroupName, monitorName, request, context), + nextLink -> listHostsNextSinglePage(nextLink, context)); } /** - * List the app service resources currently being monitored by the NewRelic resource. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. * * @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}. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAppServicesSinglePageAsync(String resourceGroupName, - String monitorName, AppServicesGetRequest request) { + private Mono> listLinkedResourcesSinglePageAsync(String resourceGroupName, + String monitorName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1519,151 +2644,164 @@ private Mono> listAppServicesSinglePageAsync( 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(), + .withContext(context -> service.listLinkedResources(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 app service resources currently being monitored by the NewRelic resource. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. * * @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}. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listLinkedResourcesAsync(String resourceGroupName, String monitorName) { + return new PagedFlux<>(() -> listLinkedResourcesSinglePageAsync(resourceGroupName, monitorName), + nextLink -> listLinkedResourcesNextSinglePageAsync(nextLink)); } /** - * List the app service resources currently being monitored by the NewRelic resource. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. * * @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}. + * @return response of a list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAppServicesAsync(String resourceGroupName, String monitorName, - AppServicesGetRequest request) { - return new PagedFlux<>(() -> listAppServicesSinglePageAsync(resourceGroupName, monitorName, request), - nextLink -> listAppServicesNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listLinkedResourcesSinglePage(String resourceGroupName, + String monitorName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listLinkedResourcesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, Context.NONE); + return 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. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. * * @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}. + * @return response of a list operation along with {@link PagedResponse}. */ - @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)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listLinkedResourcesSinglePage(String resourceGroupName, + String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listLinkedResourcesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context); + return 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. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. * * @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}. + * @return response of a list 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)); + public PagedIterable listLinkedResources(String resourceGroupName, String monitorName) { + return new PagedIterable<>(() -> listLinkedResourcesSinglePage(resourceGroupName, monitorName), + nextLink -> listLinkedResourcesNextSinglePage(nextLink)); } /** - * List the app service resources currently being monitored by the NewRelic resource. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. * * @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}. + * @return response of a list 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)); + public PagedIterable listLinkedResources(String resourceGroupName, String monitorName, + Context context) { + return new PagedIterable<>(() -> listLinkedResourcesSinglePage(resourceGroupName, monitorName, context), + nextLink -> listLinkedResourcesNextSinglePage(nextLink, context)); } /** - * Switches the billing for NewRelic monitor resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @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 Monitor Resource by NewRelic on successful completion of {@link Mono}. + * @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 switchBillingWithResponseAsync(String resourceGroupName, - String monitorName, SwitchBillingRequest request) { + 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.")); @@ -1679,172 +2817,166 @@ private Mono switchBillingWithResponseAsync(Strin 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)) + .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())); } /** - * Switches the billing for NewRelic monitor resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @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 a Monitor Resource by NewRelic on successful completion of {@link Mono}. + * @return list of all the resources being monitored by NewRelic monitor resource as paginated response with + * {@link PagedFlux}. */ - @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); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMonitoredResourcesAsync(String resourceGroupName, + String monitorName) { + return new PagedFlux<>(() -> listMonitoredResourcesSinglePageAsync(resourceGroupName, monitorName), + nextLink -> listMonitoredResourcesNextSinglePageAsync(nextLink)); } /** - * Switches the billing for NewRelic monitor resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @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 Monitor Resource by NewRelic on successful completion of {@link Mono}. + * @return list of all the resources being monitored by NewRelic monitor resource along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono switchBillingAsync(String resourceGroupName, String monitorName, - SwitchBillingRequest request) { - return switchBillingWithResponseAsync(resourceGroupName, monitorName, request) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listMonitoredResourcesSinglePage(String resourceGroupName, + String monitorName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listMonitoredResourcesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Switches the billing for NewRelic monitor resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @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 a Monitor Resource by NewRelic. + * @return list of all the resources being monitored by NewRelic monitor resource along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MonitorsSwitchBillingResponse switchBillingWithResponse(String resourceGroupName, String monitorName, - SwitchBillingRequest request, Context context) { - return switchBillingWithResponseAsync(resourceGroupName, monitorName, request, context).block(); + private PagedResponse listMonitoredResourcesSinglePage(String resourceGroupName, + String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listMonitoredResourcesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Switches the billing for NewRelic monitor resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @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 Monitor Resource by NewRelic. + * @return list of all the resources being monitored by NewRelic monitor resource as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NewRelicMonitorResourceInner switchBilling(String resourceGroupName, String monitorName, - SwitchBillingRequest request) { - return switchBillingWithResponse(resourceGroupName, monitorName, request, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName) { + return new PagedIterable<>(() -> listMonitoredResourcesSinglePage(resourceGroupName, monitorName), + nextLink -> listMonitoredResourcesNextSinglePage(nextLink)); } /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @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}. + * @return list of all the resources being monitored by NewRelic monitor resource as paginated response with + * {@link PagedIterable}. */ - @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())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + Context context) { + return new PagedIterable<>(() -> listMonitoredResourcesSinglePage(resourceGroupName, monitorName, context), + nextLink -> listMonitoredResourcesNextSinglePage(nextLink, context)); } /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. * * @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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listHostsSinglePageAsync(String resourceGroupName, String monitorName, - HostsGetRequest request, Context context) { + private Mono> refreshIngestionKeyWithResponseAsync(String resourceGroupName, String monitorName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1860,105 +2992,95 @@ private Mono> listHostsSinglePageAsync(String resourc 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)); + return FluxUtil + .withContext(context -> service.refreshIngestionKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. * * @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}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listHostsAsync(String resourceGroupName, String monitorName, - HostsGetRequest request) { - return new PagedFlux<>(() -> listHostsSinglePageAsync(resourceGroupName, monitorName, request), - nextLink -> listHostsNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono refreshIngestionKeyAsync(String resourceGroupName, String monitorName) { + return refreshIngestionKeyWithResponseAsync(resourceGroupName, monitorName).flatMap(ignored -> Mono.empty()); } /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. * * @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}. + * @return the {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listHostsAsync(String resourceGroupName, String monitorName, HostsGetRequest request, + @ServiceMethod(returns = ReturnType.SINGLE) + public Response refreshIngestionKeyWithResponse(String resourceGroupName, String monitorName, Context context) { - return new PagedFlux<>(() -> listHostsSinglePageAsync(resourceGroupName, monitorName, request, context), - nextLink -> listHostsNextSinglePageAsync(nextLink, context)); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.refreshIngestionKeySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context); } /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. * * @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)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void refreshIngestionKey(String resourceGroupName, String monitorName) { + refreshIngestionKeyWithResponse(resourceGroupName, monitorName, Context.NONE); } /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace * - * @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. + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @param body Resubscribe Properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return a Monitor Resource by NewRelic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMonitoredResourcesSinglePageAsync(String resourceGroupName, - String monitorName) { + private Mono>> resubscribeWithResponseAsync(String resourceGroupName, String monitorName, + ResubscribeProperties body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1974,282 +3096,300 @@ private Mono> listMonitoredResourcesSingle if (monitorName == null) { return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } + if (body != null) { + body.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.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)) + .withContext(context -> service.resubscribe(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @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. + * @param body Resubscribe Properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMonitoredResourcesSinglePageAsync(String resourceGroupName, - String monitorName, Context context) { + private Response resubscribeWithResponse(String resourceGroupName, String monitorName, + ResubscribeProperties body) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (body != null) { + body.validate(); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .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)); + return service.resubscribeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, body, accept, Context.NONE); } /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @param body Resubscribe Properties. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listMonitoredResourcesAsync(String resourceGroupName, - String monitorName) { - return new PagedFlux<>(() -> listMonitoredResourcesSinglePageAsync(resourceGroupName, monitorName), - nextLink -> listMonitoredResourcesNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response resubscribeWithResponse(String resourceGroupName, String monitorName, + ResubscribeProperties body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return service.resubscribeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, body, accept, context); } /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @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. + * @param body Resubscribe Properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return the {@link PollerFlux} for polling of a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listMonitoredResourcesAsync(String resourceGroupName, String monitorName, - Context context) { - return new PagedFlux<>(() -> listMonitoredResourcesSinglePageAsync(resourceGroupName, monitorName, context), - nextLink -> listMonitoredResourcesNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NewRelicMonitorResourceInner> + beginResubscribeAsync(String resourceGroupName, String monitorName, ResubscribeProperties body) { + Mono>> mono = resubscribeWithResponseAsync(resourceGroupName, monitorName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, + this.client.getContext()); } /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @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}. + * @return the {@link PollerFlux} for polling of a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName) { - return new PagedIterable<>(listMonitoredResourcesAsync(resourceGroupName, monitorName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NewRelicMonitorResourceInner> + beginResubscribeAsync(String resourceGroupName, String monitorName) { + final ResubscribeProperties body = null; + Mono>> mono = resubscribeWithResponseAsync(resourceGroupName, monitorName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, + this.client.getContext()); } /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @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. + * @param body Resubscribe Properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, - Context context) { - return new PagedIterable<>(listMonitoredResourcesAsync(resourceGroupName, monitorName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NewRelicMonitorResourceInner> + beginResubscribe(String resourceGroupName, String monitorName, ResubscribeProperties body) { + Response response = resubscribeWithResponse(resourceGroupName, monitorName, body); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, Context.NONE); } /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @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 a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listLinkedResourcesSinglePageAsync(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.listLinkedResources(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NewRelicMonitorResourceInner> + beginResubscribe(String resourceGroupName, String monitorName) { + final ResubscribeProperties body = null; + Response response = resubscribeWithResponse(resourceGroupName, monitorName, body); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, Context.NONE); } /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @param body Resubscribe Properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listLinkedResourcesSinglePageAsync(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 - .listLinkedResources(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - monitorName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NewRelicMonitorResourceInner> + beginResubscribe(String resourceGroupName, String monitorName, ResubscribeProperties body, Context context) { + Response response = resubscribeWithResponse(resourceGroupName, monitorName, body, context); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, context); } /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @param body Resubscribe Properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedFlux}. + * @return a Monitor Resource by NewRelic on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listLinkedResourcesAsync(String resourceGroupName, String monitorName) { - return new PagedFlux<>(() -> listLinkedResourcesSinglePageAsync(resourceGroupName, monitorName), - nextLink -> listLinkedResourcesNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resubscribeAsync(String resourceGroupName, String monitorName, + ResubscribeProperties body) { + return beginResubscribeAsync(resourceGroupName, monitorName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @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 a list operation as paginated response with {@link PagedFlux}. + * @return a Monitor Resource by NewRelic on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listLinkedResourcesAsync(String resourceGroupName, String monitorName, - Context context) { - return new PagedFlux<>(() -> listLinkedResourcesSinglePageAsync(resourceGroupName, monitorName, context), - nextLink -> listLinkedResourcesNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resubscribeAsync(String resourceGroupName, String monitorName) { + final ResubscribeProperties body = null; + return beginResubscribeAsync(resourceGroupName, monitorName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @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 a list operation as paginated response with {@link PagedIterable}. + * @return a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listLinkedResources(String resourceGroupName, String monitorName) { - return new PagedIterable<>(listLinkedResourcesAsync(resourceGroupName, monitorName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public NewRelicMonitorResourceInner resubscribe(String resourceGroupName, String monitorName) { + final ResubscribeProperties body = null; + return beginResubscribe(resourceGroupName, monitorName, body).getFinalResult(); } /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @param body Resubscribe Properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedIterable}. + * @return a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listLinkedResources(String resourceGroupName, String monitorName, - Context context) { - return new PagedIterable<>(listLinkedResourcesAsync(resourceGroupName, monitorName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public NewRelicMonitorResourceInner resubscribe(String resourceGroupName, String monitorName, + ResubscribeProperties body, Context context) { + return beginResubscribe(resourceGroupName, monitorName, body, context).getFinalResult(); } /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. * * @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 response of payload to be passed while installing VM agent along with {@link Response} on successful - * completion of {@link Mono}. + * @return a Monitor Resource by NewRelic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> vmHostPayloadWithResponseAsync(String resourceGroupName, - String monitorName) { + 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.")); @@ -2265,28 +3405,112 @@ private Mono> vmHostPayloadWithResponseAsync(S 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.vmHostPayload(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context)) + .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())); } /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + * + * @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 Monitor Resource by NewRelic on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono switchBillingAsync(String resourceGroupName, String monitorName, + SwitchBillingRequest request) { + return switchBillingWithResponseAsync(resourceGroupName, monitorName, request) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. * * @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 a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MonitorsSwitchBillingResponse switchBillingWithResponse(String resourceGroupName, String monitorName, + SwitchBillingRequest request, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (request == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return service.switchBillingSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context); + } + + /** + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + * + * @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 Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NewRelicMonitorResourceInner switchBilling(String resourceGroupName, String monitorName, + SwitchBillingRequest request) { + return switchBillingWithResponse(resourceGroupName, monitorName, request, Context.NONE).getValue(); + } + + /** + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. + * + * @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, Context context) { + String monitorName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2303,13 +3527,15 @@ private Mono> vmHostPayloadWithResponseAsync(S 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); + 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. + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -2325,7 +3551,8 @@ private Mono vmHostPayloadAsync(String resourceGroupNam } /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -2338,11 +3565,32 @@ private Mono vmHostPayloadAsync(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) public Response vmHostPayloadWithResponse(String resourceGroupName, String monitorName, Context context) { - return vmHostPayloadWithResponseAsync(resourceGroupName, monitorName, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.vmHostPayloadSync(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. + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -2384,6 +3632,33 @@ private Mono> listBySubscriptionNext .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NewRelicMonitorResource list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2392,24 +3667,25 @@ private Mono> listBySubscriptionNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the 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}. + * @return the response of a NewRelicMonitorResource list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2440,6 +3716,33 @@ private Mono> listByResourceGroupNex .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NewRelicMonitorResource list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2448,24 +3751,25 @@ private Mono> listByResourceGroupNex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the 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}. + * @return the response of a NewRelicMonitorResource list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2495,6 +3799,33 @@ private Mono> listAppServicesNextSinglePageAs .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list app services Operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAppServicesNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listAppServicesNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2503,24 +3834,24 @@ private Mono> listAppServicesNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return response of a list app services Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAppServicesNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listAppServicesNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listAppServicesNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listAppServicesNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2550,6 +3881,33 @@ private Mono> listHostsNextSinglePageAsync(String nex .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listHostsNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listHostsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2558,37 +3916,40 @@ private Mono> listHostsNextSinglePageAsync(String nex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return response of a list VM Host Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listHostsNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listHostsNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listHostsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listHostsNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the resources being monitored by NewRelic monitor resource along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMonitoredResourcesNextSinglePageAsync(String nextLink) { + private Mono> listLinkedResourcesNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2599,13 +3960,46 @@ private Mono> listMonitoredResourcesNextSi final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listMonitoredResourcesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + context -> service.listLinkedResourcesNext(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())); } /** + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listLinkedResourcesNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listLinkedResourcesNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2613,24 +4007,24 @@ private Mono> listMonitoredResourcesNextSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return response of a list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMonitoredResourcesNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listLinkedResourcesNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listMonitoredResourcesNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listLinkedResourcesNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2640,10 +4034,11 @@ private Mono> listMonitoredResourcesNextSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + * @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> listLinkedResourcesNextSinglePageAsync(String nextLink) { + private Mono> listMonitoredResourcesNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2654,12 +4049,39 @@ private Mono> listLinkedResourcesNextSinglePa final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listLinkedResourcesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + context -> service.listMonitoredResourcesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listMonitoredResourcesNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listMonitoredResourcesNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2668,22 +4090,26 @@ private Mono> listLinkedResourcesNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of all the resources being monitored by NewRelic monitor resource along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listLinkedResourcesNextSinglePageAsync(String nextLink, + private PagedResponse listMonitoredResourcesNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listLinkedResourcesNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listMonitoredResourcesNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(MonitorsClientImpl.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitorsImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitorsImpl.java index 6b5c40a49849..ee402a75836a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitorsImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitorsImpl.java @@ -11,6 +11,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.newrelicobservability.fluent.MonitorsClient; import com.azure.resourcemanager.newrelicobservability.fluent.models.AppServiceInfoInner; +import com.azure.resourcemanager.newrelicobservability.fluent.models.LatestLinkedSaaSResponseInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.LinkedResourceInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricRulesInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricsStatusResponseInner; @@ -21,6 +22,7 @@ import com.azure.resourcemanager.newrelicobservability.models.AppServiceInfo; import com.azure.resourcemanager.newrelicobservability.models.AppServicesGetRequest; import com.azure.resourcemanager.newrelicobservability.models.HostsGetRequest; +import com.azure.resourcemanager.newrelicobservability.models.LatestLinkedSaaSResponse; import com.azure.resourcemanager.newrelicobservability.models.LinkedResource; import com.azure.resourcemanager.newrelicobservability.models.MetricRules; import com.azure.resourcemanager.newrelicobservability.models.MetricsRequest; @@ -30,6 +32,8 @@ import com.azure.resourcemanager.newrelicobservability.models.Monitors; import com.azure.resourcemanager.newrelicobservability.models.MonitorsSwitchBillingResponse; import com.azure.resourcemanager.newrelicobservability.models.NewRelicMonitorResource; +import com.azure.resourcemanager.newrelicobservability.models.ResubscribeProperties; +import com.azure.resourcemanager.newrelicobservability.models.SaaSData; import com.azure.resourcemanager.newrelicobservability.models.SwitchBillingRequest; import com.azure.resourcemanager.newrelicobservability.models.VMExtensionPayload; import com.azure.resourcemanager.newrelicobservability.models.VMInfo; @@ -89,12 +93,12 @@ public NewRelicMonitorResource getByResourceGroup(String resourceGroupName, Stri } } - public void delete(String resourceGroupName, String userEmail, String monitorName) { - this.serviceClient().delete(resourceGroupName, userEmail, monitorName); + public void delete(String resourceGroupName, String monitorName, String userEmail) { + this.serviceClient().delete(resourceGroupName, monitorName, userEmail); } - public void delete(String resourceGroupName, String userEmail, String monitorName, Context context) { - this.serviceClient().delete(resourceGroupName, userEmail, monitorName, context); + public void delete(String resourceGroupName, String monitorName, String userEmail, Context context) { + this.serviceClient().delete(resourceGroupName, monitorName, userEmail, context); } public Response getMetricRulesWithResponse(String resourceGroupName, String monitorName, @@ -141,36 +145,40 @@ public MetricsStatusResponse getMetricStatus(String resourceGroupName, String mo } } - public PagedIterable listAppServices(String resourceGroupName, String monitorName, - AppServicesGetRequest request) { - PagedIterable inner - = this.serviceClient().listAppServices(resourceGroupName, monitorName, request); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AppServiceInfoImpl(inner1, this.manager())); + public Response latestLinkedSaaSWithResponse(String resourceGroupName, String monitorName, + Context context) { + Response inner + = this.serviceClient().latestLinkedSaaSWithResponse(resourceGroupName, monitorName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LatestLinkedSaaSResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } } - public PagedIterable listAppServices(String resourceGroupName, String monitorName, - AppServicesGetRequest request, Context context) { - PagedIterable inner - = this.serviceClient().listAppServices(resourceGroupName, monitorName, request, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AppServiceInfoImpl(inner1, this.manager())); + public LatestLinkedSaaSResponse latestLinkedSaaS(String resourceGroupName, String monitorName) { + LatestLinkedSaaSResponseInner inner = this.serviceClient().latestLinkedSaaS(resourceGroupName, monitorName); + if (inner != null) { + return new LatestLinkedSaaSResponseImpl(inner, this.manager()); + } else { + return null; + } } - public Response switchBillingWithResponse(String resourceGroupName, String monitorName, - SwitchBillingRequest request, Context context) { - MonitorsSwitchBillingResponse inner - = this.serviceClient().switchBillingWithResponse(resourceGroupName, monitorName, request, context); + public NewRelicMonitorResource linkSaaS(String resourceGroupName, String monitorName, SaaSData body) { + NewRelicMonitorResourceInner inner = this.serviceClient().linkSaaS(resourceGroupName, monitorName, body); if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NewRelicMonitorResourceImpl(inner.getValue(), this.manager())); + return new NewRelicMonitorResourceImpl(inner, this.manager()); } else { return null; } } - public NewRelicMonitorResource switchBilling(String resourceGroupName, String monitorName, - SwitchBillingRequest request) { + public NewRelicMonitorResource linkSaaS(String resourceGroupName, String monitorName, SaaSData body, + Context context) { NewRelicMonitorResourceInner inner - = this.serviceClient().switchBilling(resourceGroupName, monitorName, request); + = this.serviceClient().linkSaaS(resourceGroupName, monitorName, body, context); if (inner != null) { return new NewRelicMonitorResourceImpl(inner, this.manager()); } else { @@ -178,6 +186,20 @@ public NewRelicMonitorResource switchBilling(String resourceGroupName, String mo } } + public PagedIterable listAppServices(String resourceGroupName, String monitorName, + AppServicesGetRequest request) { + PagedIterable inner + = this.serviceClient().listAppServices(resourceGroupName, monitorName, request); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AppServiceInfoImpl(inner1, this.manager())); + } + + public PagedIterable listAppServices(String resourceGroupName, String monitorName, + AppServicesGetRequest request, Context context) { + PagedIterable inner + = this.serviceClient().listAppServices(resourceGroupName, monitorName, request, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AppServiceInfoImpl(inner1, this.manager())); + } + public PagedIterable listHosts(String resourceGroupName, String monitorName, HostsGetRequest request) { PagedIterable inner = this.serviceClient().listHosts(resourceGroupName, monitorName, request); return ResourceManagerUtils.mapPage(inner, inner1 -> new VMInfoImpl(inner1, this.manager())); @@ -190,6 +212,19 @@ public PagedIterable listHosts(String resourceGroupName, String monitorN return ResourceManagerUtils.mapPage(inner, inner1 -> new VMInfoImpl(inner1, this.manager())); } + public PagedIterable listLinkedResources(String resourceGroupName, String monitorName) { + PagedIterable inner + = this.serviceClient().listLinkedResources(resourceGroupName, monitorName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LinkedResourceImpl(inner1, this.manager())); + } + + public PagedIterable listLinkedResources(String resourceGroupName, String monitorName, + Context context) { + PagedIterable inner + = this.serviceClient().listLinkedResources(resourceGroupName, monitorName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LinkedResourceImpl(inner1, this.manager())); + } + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName) { PagedIterable inner = this.serviceClient().listMonitoredResources(resourceGroupName, monitorName); @@ -203,17 +238,56 @@ public PagedIterable listMonitoredResources(String resourceGr return ResourceManagerUtils.mapPage(inner, inner1 -> new MonitoredResourceImpl(inner1, this.manager())); } - public PagedIterable listLinkedResources(String resourceGroupName, String monitorName) { - PagedIterable inner - = this.serviceClient().listLinkedResources(resourceGroupName, monitorName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LinkedResourceImpl(inner1, this.manager())); + public Response refreshIngestionKeyWithResponse(String resourceGroupName, String monitorName, + Context context) { + return this.serviceClient().refreshIngestionKeyWithResponse(resourceGroupName, monitorName, context); } - public PagedIterable listLinkedResources(String resourceGroupName, String monitorName, + public void refreshIngestionKey(String resourceGroupName, String monitorName) { + this.serviceClient().refreshIngestionKey(resourceGroupName, monitorName); + } + + public NewRelicMonitorResource resubscribe(String resourceGroupName, String monitorName) { + NewRelicMonitorResourceInner inner = this.serviceClient().resubscribe(resourceGroupName, monitorName); + if (inner != null) { + return new NewRelicMonitorResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public NewRelicMonitorResource resubscribe(String resourceGroupName, String monitorName, ResubscribeProperties body, Context context) { - PagedIterable inner - = this.serviceClient().listLinkedResources(resourceGroupName, monitorName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LinkedResourceImpl(inner1, this.manager())); + NewRelicMonitorResourceInner inner + = this.serviceClient().resubscribe(resourceGroupName, monitorName, body, context); + if (inner != null) { + return new NewRelicMonitorResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response switchBillingWithResponse(String resourceGroupName, String monitorName, + SwitchBillingRequest request, Context context) { + MonitorsSwitchBillingResponse inner + = this.serviceClient().switchBillingWithResponse(resourceGroupName, monitorName, request, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NewRelicMonitorResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NewRelicMonitorResource switchBilling(String resourceGroupName, String monitorName, + SwitchBillingRequest request) { + NewRelicMonitorResourceInner inner + = this.serviceClient().switchBilling(resourceGroupName, monitorName, request); + if (inner != null) { + return new NewRelicMonitorResourceImpl(inner, this.manager()); + } else { + return null; + } } public Response vmHostPayloadWithResponse(String resourceGroupName, String monitorName, diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicMonitorResourceImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicMonitorResourceImpl.java index ea4a7248f58a..0beed0c38f20 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicMonitorResourceImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicMonitorResourceImpl.java @@ -14,6 +14,7 @@ import com.azure.resourcemanager.newrelicobservability.models.AppServiceInfo; import com.azure.resourcemanager.newrelicobservability.models.AppServicesGetRequest; import com.azure.resourcemanager.newrelicobservability.models.HostsGetRequest; +import com.azure.resourcemanager.newrelicobservability.models.LatestLinkedSaaSResponse; import com.azure.resourcemanager.newrelicobservability.models.LiftrResourceCategories; import com.azure.resourcemanager.newrelicobservability.models.LinkedResource; import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentity; @@ -30,6 +31,8 @@ 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.ResubscribeProperties; +import com.azure.resourcemanager.newrelicobservability.models.SaaSData; import com.azure.resourcemanager.newrelicobservability.models.SwitchBillingRequest; import com.azure.resourcemanager.newrelicobservability.models.UserInfo; import com.azure.resourcemanager.newrelicobservability.models.VMExtensionPayload; @@ -104,6 +107,10 @@ public PlanData planData() { return this.innerModel().planData(); } + public SaaSData saaSData() { + return this.innerModel().saaSData(); + } + public LiftrResourceCategories liftrResourceCategory() { return this.innerModel().liftrResourceCategory(); } @@ -188,16 +195,14 @@ public NewRelicMonitorResourceImpl update() { public NewRelicMonitorResource apply() { this.innerObject = serviceManager.serviceClient() .getMonitors() - .updateWithResponse(resourceGroupName, monitorName, updateProperties, Context.NONE) - .getValue(); + .update(resourceGroupName, monitorName, updateProperties, Context.NONE); return this; } public NewRelicMonitorResource apply(Context context) { this.innerObject = serviceManager.serviceClient() .getMonitors() - .updateWithResponse(resourceGroupName, monitorName, updateProperties, context) - .getValue(); + .update(resourceGroupName, monitorName, updateProperties, context); return this; } @@ -241,20 +246,28 @@ public MetricsStatusResponse getMetricStatus(MetricsStatusRequest request) { return serviceManager.monitors().getMetricStatus(resourceGroupName, monitorName, request); } - public PagedIterable listAppServices(AppServicesGetRequest request) { - return serviceManager.monitors().listAppServices(resourceGroupName, monitorName, request); + public Response latestLinkedSaaSWithResponse(Context context) { + return serviceManager.monitors().latestLinkedSaaSWithResponse(resourceGroupName, monitorName, context); } - public PagedIterable listAppServices(AppServicesGetRequest request, Context context) { - return serviceManager.monitors().listAppServices(resourceGroupName, monitorName, request, context); + public LatestLinkedSaaSResponse latestLinkedSaaS() { + return serviceManager.monitors().latestLinkedSaaS(resourceGroupName, monitorName); } - public Response switchBillingWithResponse(SwitchBillingRequest request, Context context) { - return serviceManager.monitors().switchBillingWithResponse(resourceGroupName, monitorName, request, context); + public NewRelicMonitorResource linkSaaS(SaaSData body) { + return serviceManager.monitors().linkSaaS(resourceGroupName, monitorName, body); } - public NewRelicMonitorResource switchBilling(SwitchBillingRequest request) { - return serviceManager.monitors().switchBilling(resourceGroupName, monitorName, request); + public NewRelicMonitorResource linkSaaS(SaaSData body, Context context) { + return serviceManager.monitors().linkSaaS(resourceGroupName, monitorName, body, context); + } + + public PagedIterable listAppServices(AppServicesGetRequest request) { + return serviceManager.monitors().listAppServices(resourceGroupName, monitorName, request); + } + + public PagedIterable listAppServices(AppServicesGetRequest request, Context context) { + return serviceManager.monitors().listAppServices(resourceGroupName, monitorName, request, context); } public PagedIterable listHosts(HostsGetRequest request) { @@ -265,6 +278,14 @@ public PagedIterable listHosts(HostsGetRequest request, Context context) return serviceManager.monitors().listHosts(resourceGroupName, monitorName, request, context); } + public PagedIterable listLinkedResources() { + return serviceManager.monitors().listLinkedResources(resourceGroupName, monitorName); + } + + public PagedIterable listLinkedResources(Context context) { + return serviceManager.monitors().listLinkedResources(resourceGroupName, monitorName, context); + } + public PagedIterable listMonitoredResources() { return serviceManager.monitors().listMonitoredResources(resourceGroupName, monitorName); } @@ -273,12 +294,28 @@ public PagedIterable listMonitoredResources(Context context) return serviceManager.monitors().listMonitoredResources(resourceGroupName, monitorName, context); } - public PagedIterable listLinkedResources() { - return serviceManager.monitors().listLinkedResources(resourceGroupName, monitorName); + public Response refreshIngestionKeyWithResponse(Context context) { + return serviceManager.monitors().refreshIngestionKeyWithResponse(resourceGroupName, monitorName, context); } - public PagedIterable listLinkedResources(Context context) { - return serviceManager.monitors().listLinkedResources(resourceGroupName, monitorName, context); + public void refreshIngestionKey() { + serviceManager.monitors().refreshIngestionKey(resourceGroupName, monitorName); + } + + public NewRelicMonitorResource resubscribe() { + return serviceManager.monitors().resubscribe(resourceGroupName, monitorName); + } + + public NewRelicMonitorResource resubscribe(ResubscribeProperties body, Context context) { + return serviceManager.monitors().resubscribe(resourceGroupName, monitorName, body, context); + } + + public Response switchBillingWithResponse(SwitchBillingRequest request, Context context) { + return serviceManager.monitors().switchBillingWithResponse(resourceGroupName, monitorName, request, context); + } + + public NewRelicMonitorResource switchBilling(SwitchBillingRequest request) { + return serviceManager.monitors().switchBilling(resourceGroupName, monitorName, request); } public Response vmHostPayloadWithResponse(Context context) { @@ -350,6 +387,16 @@ public NewRelicMonitorResourceImpl withPlanData(PlanData planData) { } } + public NewRelicMonitorResourceImpl withSaaSData(SaaSData saaSData) { + if (isInCreateMode()) { + this.innerModel().withSaaSData(saaSData); + return this; + } else { + this.updateProperties.withSaaSData(saaSData); + return this; + } + } + public NewRelicMonitorResourceImpl withOrgCreationSource(OrgCreationSource orgCreationSource) { if (isInCreateMode()) { this.innerModel().withOrgCreationSource(orgCreationSource); @@ -381,6 +428,6 @@ public NewRelicMonitorResourceImpl withSaaSAzureSubscriptionStatus(String saaSAz } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicObservabilityImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicObservabilityImpl.java index 4a492601703a..2459f422aa5b 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicObservabilityImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicObservabilityImpl.java @@ -15,12 +15,15 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.SyncPollerFactory; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.newrelicobservability.fluent.AccountsClient; @@ -32,6 +35,7 @@ import com.azure.resourcemanager.newrelicobservability.fluent.OperationsClient; import com.azure.resourcemanager.newrelicobservability.fluent.OrganizationsClient; import com.azure.resourcemanager.newrelicobservability.fluent.PlansClient; +import com.azure.resourcemanager.newrelicobservability.fluent.SaaSClient; import com.azure.resourcemanager.newrelicobservability.fluent.TagRulesClient; import java.io.IOException; import java.lang.reflect.Type; @@ -159,6 +163,20 @@ public AccountsClient getAccounts() { return this.accounts; } + /** + * The SaaSClient object to access its operations. + */ + private final SaaSClient saaS; + + /** + * Gets the SaaSClient object to access its operations. + * + * @return the SaaSClient object. + */ + public SaaSClient getSaaS() { + return this.saaS; + } + /** * The MonitorsClient object to access its operations. */ @@ -230,31 +248,31 @@ public ConnectedPartnerResourcesClient getConnectedPartnerResources() { } /** - * The TagRulesClient object to access its operations. + * The MonitoredSubscriptionsClient object to access its operations. */ - private final TagRulesClient tagRules; + private final MonitoredSubscriptionsClient monitoredSubscriptions; /** - * Gets the TagRulesClient object to access its operations. + * Gets the MonitoredSubscriptionsClient object to access its operations. * - * @return the TagRulesClient object. + * @return the MonitoredSubscriptionsClient object. */ - public TagRulesClient getTagRules() { - return this.tagRules; + public MonitoredSubscriptionsClient getMonitoredSubscriptions() { + return this.monitoredSubscriptions; } /** - * The MonitoredSubscriptionsClient object to access its operations. + * The TagRulesClient object to access its operations. */ - private final MonitoredSubscriptionsClient monitoredSubscriptions; + private final TagRulesClient tagRules; /** - * Gets the MonitoredSubscriptionsClient object to access its operations. + * Gets the TagRulesClient object to access its operations. * - * @return the MonitoredSubscriptionsClient object. + * @return the TagRulesClient object. */ - public MonitoredSubscriptionsClient getMonitoredSubscriptions() { - return this.monitoredSubscriptions; + public TagRulesClient getTagRules() { + return this.tagRules; } /** @@ -274,16 +292,17 @@ public MonitoredSubscriptionsClient getMonitoredSubscriptions() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2024-01-01"; + this.apiVersion = "2025-05-01-preview"; this.operations = new OperationsClientImpl(this); this.accounts = new AccountsClientImpl(this); + this.saaS = new SaaSClientImpl(this); this.monitors = new MonitorsClientImpl(this); this.organizations = new OrganizationsClientImpl(this); this.plans = new PlansClientImpl(this); this.billingInfoes = new BillingInfoesClientImpl(this); this.connectedPartnerResources = new ConnectedPartnerResourcesClientImpl(this); - this.tagRules = new TagRulesClientImpl(this); this.monitoredSubscriptions = new MonitoredSubscriptionsClientImpl(this); + this.tagRules = new TagRulesClientImpl(this); } /** @@ -323,6 +342,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result. + * @param type of final result. + * @return SyncPoller for poll result and final result. + */ + public SyncPoller, U> getLroResult(Response activationResponse, + Type pollResultType, Type finalResultType, Context context) { + return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, () -> activationResponse, context); + } + /** * Gets the final result, or an error, based on last async poll response. * diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OperationsClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OperationsClientImpl.java index 677c5fd1c791..37a12f0f1fd0 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OperationsClientImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OperationsClientImpl.java @@ -25,6 +25,7 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.newrelicobservability.fluent.OperationsClient; import com.azure.resourcemanager.newrelicobservability.fluent.models.OperationInner; import com.azure.resourcemanager.newrelicobservability.models.OperationListResult; @@ -60,7 +61,7 @@ public final class OperationsClientImpl implements OperationsClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/NewRelic.Observability/operations") @@ -69,12 +70,26 @@ public interface OperationsService { Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/providers/NewRelic.Observability/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -103,24 +118,14 @@ private Mono> listSinglePageAsync() { /** * List the operations for the provider. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -128,12 +133,20 @@ private Mono> listSinglePageAsync(Context context) * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -143,13 +156,20 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -162,7 +182,7 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** @@ -177,7 +197,7 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -206,6 +226,33 @@ private Mono> listNextSinglePageAsync(String nextL .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -214,22 +261,24 @@ private Mono> listNextSinglePageAsync(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(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)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(OperationsClientImpl.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OrganizationsClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OrganizationsClientImpl.java index c566f056f48d..837afddfcf58 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OrganizationsClientImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OrganizationsClientImpl.java @@ -25,6 +25,7 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.newrelicobservability.fluent.OrganizationsClient; import com.azure.resourcemanager.newrelicobservability.fluent.models.OrganizationResourceInner; import com.azure.resourcemanager.newrelicobservability.models.OrganizationsListResponse; @@ -60,7 +61,7 @@ public final class OrganizationsClientImpl implements OrganizationsClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityOrganizations") public interface OrganizationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/organizations") @@ -71,6 +72,15 @@ Mono> list(@HostParam("$host") String endpoi @QueryParam("userEmail") String userEmail, @QueryParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/organizations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@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 }) @@ -78,10 +88,18 @@ Mono> list(@HostParam("$host") String endpoi Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -117,61 +135,63 @@ private Mono> listSinglePageAsync(Strin } /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @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 organizations Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return response of get all organizations Operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String userEmail, String location) { + return new PagedFlux<>(() -> listSinglePageAsync(userEmail, location), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @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 organizations Operation as paginated response with {@link PagedFlux}. + * @return response of get all organizations Operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String userEmail, String location) { - return new PagedFlux<>(() -> listSinglePageAsync(userEmail, location), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String userEmail, String location) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (userEmail == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter userEmail is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), userEmail, location, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -179,16 +199,39 @@ private PagedFlux listAsync(String userEmail, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of get all organizations Operation as paginated response with {@link PagedFlux}. + * @return response of get all organizations Operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String userEmail, String location, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(userEmail, location, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String userEmail, String location, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (userEmail == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter userEmail is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), userEmail, location, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -199,11 +242,12 @@ private PagedFlux listAsync(String userEmail, String */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String userEmail, String location) { - return new PagedIterable<>(listAsync(userEmail, location)); + return new PagedIterable<>(() -> listSinglePage(userEmail, location), nextLink -> listNextSinglePage(nextLink)); } /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -215,7 +259,8 @@ public PagedIterable list(String userEmail, String lo */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String userEmail, String location, Context context) { - return new PagedIterable<>(listAsync(userEmail, location, context)); + return new PagedIterable<>(() -> listSinglePage(userEmail, location, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -244,6 +289,33 @@ private Mono> listNextSinglePageAsync(S .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of get all organizations Operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -252,22 +324,25 @@ private Mono> listNextSinglePageAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of get all organizations Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return response of get all organizations Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(OrganizationsClientImpl.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/PlansClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/PlansClientImpl.java index 2f74169245a2..cdf38684d3c0 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/PlansClientImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/PlansClientImpl.java @@ -25,6 +25,7 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.newrelicobservability.fluent.PlansClient; import com.azure.resourcemanager.newrelicobservability.fluent.models.PlanDataResourceInner; import com.azure.resourcemanager.newrelicobservability.models.PlanDataListResponse; @@ -59,7 +60,7 @@ public final class PlansClientImpl implements PlansClient { * REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityPlans") public interface PlansService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/plans") @@ -70,16 +71,32 @@ Mono> list(@HostParam("$host") String endpoint, @QueryParam("accountId") String accountId, @QueryParam("organizationId") String organizationId, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/plans") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("accountId") String accountId, @QueryParam("organizationId") String organizationId, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @param accountId Account Id. * @param organizationId Organization Id. @@ -109,39 +126,7 @@ private Mono> listSinglePageAsync(String ac } /** - * 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 ManagementException 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 along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String accountId, String organizationId, - 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(), accountId, - organizationId, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @param accountId Account Id. * @param organizationId Organization Id. @@ -157,7 +142,7 @@ private PagedFlux listAsync(String accountId, String orga } /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -172,7 +157,36 @@ private PagedFlux listAsync() { } /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. + * + * @param accountId Account Id. + * @param organizationId Organization Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String accountId, String organizationId) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accountId, organizationId, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @param accountId Account Id. * @param organizationId Organization Id. @@ -180,16 +194,30 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of get all plan data Operation as paginated response with {@link PagedFlux}. + * @return response of get all plan data Operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String accountId, String organizationId, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(accountId, organizationId, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String accountId, String organizationId, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accountId, organizationId, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -199,11 +227,12 @@ private PagedFlux listAsync(String accountId, String orga public PagedIterable list() { final String accountId = null; final String organizationId = null; - return new PagedIterable<>(listAsync(accountId, organizationId)); + return new PagedIterable<>(() -> listSinglePage(accountId, organizationId), + nextLink -> listNextSinglePage(nextLink)); } /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @param accountId Account Id. * @param organizationId Organization Id. @@ -215,7 +244,8 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String accountId, String organizationId, Context context) { - return new PagedIterable<>(listAsync(accountId, organizationId, context)); + return new PagedIterable<>(() -> listSinglePage(accountId, organizationId, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -244,6 +274,33 @@ private Mono> listNextSinglePageAsync(Strin .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of get all plan data Operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -252,22 +309,24 @@ private Mono> listNextSinglePageAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return response of get all plan data Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(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)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(PlansClientImpl.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSClientImpl.java new file mode 100644 index 000000000000..a99cb67a0daf --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSClientImpl.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.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.core.util.logging.ClientLogger; +import com.azure.resourcemanager.newrelicobservability.fluent.SaaSClient; +import com.azure.resourcemanager.newrelicobservability.fluent.models.SaaSResourceDetailsResponseInner; +import com.azure.resourcemanager.newrelicobservability.models.ActivateSaaSParameterRequest; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SaaSClient. + */ +public final class SaaSClientImpl implements SaaSClient { + /** + * The proxy service used to perform REST calls. + */ + private final SaaSService service; + + /** + * The service client containing this operation class. + */ + private final NewRelicObservabilityImpl client; + + /** + * Initializes an instance of SaaSClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SaaSClientImpl(NewRelicObservabilityImpl client) { + this.service = RestProxy.create(SaaSService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NewRelicObservabilitySaaS to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "NewRelicObservabilitySaaS") + public interface SaaSService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/activateSaaS") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> activateResource(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") ActivateSaaSParameterRequest request, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/activateSaaS") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response activateResourceSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") ActivateSaaSParameterRequest request, @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Resolve the token to get the SaaS resource ID and activate the SaaS resource. + * + * @param request The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + activateResourceWithResponseAsync(ActivateSaaSParameterRequest 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 (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.activateResource(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), request, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Resolve the token to get the SaaS resource ID and activate the SaaS resource. + * + * @param request The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono activateResourceAsync(ActivateSaaSParameterRequest request) { + return activateResourceWithResponseAsync(request).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Resolve the token to get the SaaS resource ID and activate the SaaS resource. + * + * @param request The request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response activateResourceWithResponse(ActivateSaaSParameterRequest request, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (request == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return service.activateResourceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), request, accept, context); + } + + /** + * Resolve the token to get the SaaS resource ID and activate the SaaS resource. + * + * @param request The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SaaSResourceDetailsResponseInner activateResource(ActivateSaaSParameterRequest request) { + return activateResourceWithResponse(request, Context.NONE).getValue(); + } + + private static final ClientLogger LOGGER = new ClientLogger(SaaSClientImpl.class); +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSImpl.java new file mode 100644 index 000000000000..3ca44b9fec4f --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSImpl.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.newrelicobservability.fluent.SaaSClient; +import com.azure.resourcemanager.newrelicobservability.fluent.models.SaaSResourceDetailsResponseInner; +import com.azure.resourcemanager.newrelicobservability.models.ActivateSaaSParameterRequest; +import com.azure.resourcemanager.newrelicobservability.models.SaaS; +import com.azure.resourcemanager.newrelicobservability.models.SaaSResourceDetailsResponse; + +public final class SaaSImpl implements SaaS { + private static final ClientLogger LOGGER = new ClientLogger(SaaSImpl.class); + + private final SaaSClient innerClient; + + private final com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager; + + public SaaSImpl(SaaSClient innerClient, + com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response activateResourceWithResponse(ActivateSaaSParameterRequest request, + Context context) { + Response inner + = this.serviceClient().activateResourceWithResponse(request, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SaaSResourceDetailsResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SaaSResourceDetailsResponse activateResource(ActivateSaaSParameterRequest request) { + SaaSResourceDetailsResponseInner inner = this.serviceClient().activateResource(request); + if (inner != null) { + return new SaaSResourceDetailsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private SaaSClient 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/SaaSResourceDetailsResponseImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSResourceDetailsResponseImpl.java new file mode 100644 index 000000000000..0ec75f80b4f7 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSResourceDetailsResponseImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.newrelicobservability.fluent.models.SaaSResourceDetailsResponseInner; +import com.azure.resourcemanager.newrelicobservability.models.SaaSResourceDetailsResponse; + +public final class SaaSResourceDetailsResponseImpl implements SaaSResourceDetailsResponse { + private SaaSResourceDetailsResponseInner innerObject; + + private final com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager; + + SaaSResourceDetailsResponseImpl(SaaSResourceDetailsResponseInner 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 String saasId() { + return this.innerModel().saasId(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public SaaSResourceDetailsResponseInner 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/TagRuleImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRuleImpl.java index 3bf70202a68e..7aa55be22f40 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRuleImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRuleImpl.java @@ -166,6 +166,6 @@ public TagRuleImpl withMetricRules(MetricRulesInner metricRules) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRulesClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRulesClientImpl.java index 54daa8f39d7a..2bfd926d1829 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRulesClientImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRulesClientImpl.java @@ -28,8 +28,10 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.newrelicobservability.fluent.TagRulesClient; @@ -69,7 +71,7 @@ public final class TagRulesClientImpl implements TagRulesClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityTagRules") public interface TagRulesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules") @@ -80,6 +82,15 @@ Mono> listByNewRelicMonitorResource(@HostParam("$hos @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByNewRelicMonitorResourceSync(@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("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") @ExpectedResponses({ 200 }) @@ -89,6 +100,15 @@ Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @PathParam("ruleSetName") String ruleSetName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("ruleSetName") String ruleSetName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") @ExpectedResponses({ 200, 201 }) @@ -100,13 +120,14 @@ Mono>> createOrUpdate(@HostParam("$host") String endpo @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") - @ExpectedResponses({ 200, 202, 204 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, - @PathParam("ruleSetName") String ruleSetName, @HeaderParam("Accept") String accept, Context context); + @PathParam("ruleSetName") String ruleSetName, @BodyParam("application/json") TagRuleInner resource, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") @@ -118,6 +139,34 @@ Mono> update(@HostParam("$host") String endpoint, @PathParam("ruleSetName") String ruleSetName, @BodyParam("application/json") TagRuleUpdateInner properties, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("ruleSetName") String ruleSetName, @BodyParam("application/json") TagRuleUpdateInner properties, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("ruleSetName") String ruleSetName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("ruleSetName") String ruleSetName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -125,10 +174,19 @@ Mono> update(@HostParam("$host") String endpoint, Mono> listByNewRelicMonitorResourceNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByNewRelicMonitorResourceNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -167,62 +225,65 @@ private Mono> listByNewRelicMonitorResourceSinglePag } /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @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 the response of a TagRule list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a TagRule list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNewRelicMonitorResourceSinglePageAsync(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 - .listByNewRelicMonitorResource(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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNewRelicMonitorResourceAsync(String resourceGroupName, String monitorName) { + return new PagedFlux<>(() -> listByNewRelicMonitorResourceSinglePageAsync(resourceGroupName, monitorName), + nextLink -> listByNewRelicMonitorResourceNextSinglePageAsync(nextLink)); } /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @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 the response of a TagRule list operation as paginated response with {@link PagedFlux}. + * @return the response of a TagRule list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNewRelicMonitorResourceAsync(String resourceGroupName, String monitorName) { - return new PagedFlux<>(() -> listByNewRelicMonitorResourceSinglePageAsync(resourceGroupName, monitorName), - nextLink -> listByNewRelicMonitorResourceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNewRelicMonitorResourceSinglePage(String resourceGroupName, + String monitorName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByNewRelicMonitorResourceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -230,18 +291,40 @@ private PagedFlux listByNewRelicMonitorResourceAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the 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 PagedFlux}. + * @return the response of a TagRule list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNewRelicMonitorResourceAsync(String resourceGroupName, String monitorName, - Context context) { - return new PagedFlux<>( - () -> listByNewRelicMonitorResourceSinglePageAsync(resourceGroupName, monitorName, context), - nextLink -> listByNewRelicMonitorResourceNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNewRelicMonitorResourceSinglePage(String resourceGroupName, + String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByNewRelicMonitorResourceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -252,11 +335,13 @@ private PagedFlux listByNewRelicMonitorResourceAsync(String resour */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNewRelicMonitorResource(String resourceGroupName, String monitorName) { - return new PagedIterable<>(listByNewRelicMonitorResourceAsync(resourceGroupName, monitorName)); + return new PagedIterable<>(() -> listByNewRelicMonitorResourceSinglePage(resourceGroupName, monitorName), + nextLink -> listByNewRelicMonitorResourceNextSinglePage(nextLink)); } /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -269,11 +354,14 @@ public PagedIterable listByNewRelicMonitorResource(String resource @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNewRelicMonitorResource(String resourceGroupName, String monitorName, Context context) { - return new PagedIterable<>(listByNewRelicMonitorResourceAsync(resourceGroupName, monitorName, context)); + return new PagedIterable<>( + () -> listByNewRelicMonitorResourceSinglePage(resourceGroupName, monitorName, context), + nextLink -> listByNewRelicMonitorResourceNextSinglePage(nextLink, context)); } /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -281,7 +369,8 @@ public PagedIterable listByNewRelicMonitorResource(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a TagRule along with {@link Response} on successful completion of {@link Mono}. + * @return a tag rule belonging to NewRelic account along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, @@ -312,46 +401,8 @@ private Mono> getWithResponseAsync(String resourceGroupNa } /** - * 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 ManagementException 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, - String ruleSetName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - if (ruleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, ruleSetName, accept, context); - } - - /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -359,7 +410,7 @@ private Mono> getWithResponseAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a TagRule on successful completion of {@link Mono}. + * @return a tag rule belonging to NewRelic account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String monitorName, String ruleSetName) { @@ -368,7 +419,8 @@ private Mono getAsync(String resourceGroupName, String monitorName } /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -377,16 +429,41 @@ private Mono getAsync(String resourceGroupName, String monitorName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String monitorName, String ruleSetName, Context context) { - return getWithResponseAsync(resourceGroupName, monitorName, ruleSetName, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, ruleSetName, accept, context); } /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -394,7 +471,7 @@ public Response getWithResponse(String resourceGroupName, String m * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a tag rule belonging to NewRelic account. */ @ServiceMethod(returns = ReturnType.SINGLE) public TagRuleInner get(String resourceGroupName, String monitorName, String ruleSetName) { @@ -402,7 +479,8 @@ public TagRuleInner get(String resourceGroupName, String monitorName, String rul } /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -449,80 +527,113 @@ private Mono>> createOrUpdateWithResponseAsync(String } /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @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 ManagementException 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} on successful completion of - * {@link Mono}. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String monitorName, String ruleSetName, TagRuleInner resource, Context context) { + private Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + String ruleSetName, TagRuleInner resource) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } if (ruleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); } if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + throw LOGGER.atError() + .log(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, ruleSetName, resource, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, resource, accept, + Context.NONE); } /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @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 ManagementException thrown 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 tag rule belonging to NewRelic account. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, TagRuleInner> beginCreateOrUpdateAsync(String resourceGroupName, - String monitorName, String ruleSetName, TagRuleInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - TagRuleInner.class, TagRuleInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + String ruleSetName, TagRuleInner resource, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, resource, accept, context); } /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @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 ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -530,16 +641,16 @@ private PollerFlux, TagRuleInner> beginCreateOrUpdateAs */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, TagRuleInner> beginCreateOrUpdateAsync(String resourceGroupName, - String monitorName, String ruleSetName, TagRuleInner resource, Context context) { - context = this.client.mergeContext(context); + String monitorName, String ruleSetName, TagRuleInner resource) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, resource, context); + = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, resource); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - TagRuleInner.class, TagRuleInner.class, context); + TagRuleInner.class, TagRuleInner.class, this.client.getContext()); } /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -553,11 +664,15 @@ private PollerFlux, TagRuleInner> beginCreateOrUpdateAs @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TagRuleInner> beginCreateOrUpdate(String resourceGroupName, String monitorName, String ruleSetName, TagRuleInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, monitorName, ruleSetName, resource).getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, monitorName, ruleSetName, resource); + return this.client.getLroResult(response, TagRuleInner.class, TagRuleInner.class, + Context.NONE); } /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -572,12 +687,15 @@ public SyncPoller, TagRuleInner> beginCreateOrUpdate(St @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TagRuleInner> beginCreateOrUpdate(String resourceGroupName, String monitorName, String ruleSetName, TagRuleInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, monitorName, ruleSetName, resource, context) - .getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, monitorName, ruleSetName, resource, context); + return this.client.getLroResult(response, TagRuleInner.class, TagRuleInner.class, + context); } /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -596,27 +714,8 @@ private Mono createOrUpdateAsync(String resourceGroupName, String } /** - * 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 ManagementException 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String monitorName, String ruleSetName, - TagRuleInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, monitorName, ruleSetName, resource, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -630,11 +729,12 @@ private Mono createOrUpdateAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public TagRuleInner createOrUpdate(String resourceGroupName, String monitorName, String ruleSetName, TagRuleInner resource) { - return createOrUpdateAsync(resourceGroupName, monitorName, ruleSetName, resource).block(); + return beginCreateOrUpdate(resourceGroupName, monitorName, ruleSetName, resource).getFinalResult(); } /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -649,23 +749,26 @@ public TagRuleInner createOrUpdate(String resourceGroupName, String monitorName, @ServiceMethod(returns = ReturnType.SINGLE) public TagRuleInner createOrUpdate(String resourceGroupName, String monitorName, String ruleSetName, TagRuleInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, monitorName, ruleSetName, resource, context).block(); + return beginCreateOrUpdate(resourceGroupName, monitorName, ruleSetName, resource, context).getFinalResult(); } /** - * Delete a TagRule. + * Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control + * which Azure resources are monitored. * * @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 ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return a tag rule belonging to NewRelic account along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName, - String ruleSetName) { + private Mono> updateWithResponseAsync(String resourceGroupName, String monitorName, + String ruleSetName, TagRuleUpdateInner properties) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -684,130 +787,109 @@ private Mono>> deleteWithResponseAsync(String resource if (ruleSetName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleSetName 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.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, properties, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a TagRule. + * Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control + * which Azure resources are monitored. * * @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. + * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return a tag rule belonging to NewRelic account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName, - String ruleSetName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - if (ruleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, ruleSetName, accept, 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, - String ruleSetName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, monitorName, ruleSetName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + private Mono updateAsync(String resourceGroupName, String monitorName, String ruleSetName, + TagRuleUpdateInner properties) { + return updateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Delete a TagRule. + * Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control + * which Azure resources are monitored. * * @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 ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, - String ruleSetName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, monitorName, ruleSetName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, - String ruleSetName) { - return this.beginDeleteAsync(resourceGroupName, monitorName, ruleSetName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + TagRuleUpdateInner properties, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, properties, accept, context); } /** - * Delete a TagRule. + * Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control + * which Azure resources are monitored. * * @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. + * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return a tag rule belonging to NewRelic account. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, - String ruleSetName, Context context) { - return this.beginDeleteAsync(resourceGroupName, monitorName, ruleSetName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public TagRuleInner update(String resourceGroupName, String monitorName, String ruleSetName, + TagRuleUpdateInner properties) { + return updateWithResponse(resourceGroupName, monitorName, ruleSetName, properties, Context.NONE).getValue(); } /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -815,208 +897,228 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String monitorName, String ruleSetName) { - return beginDeleteAsync(resourceGroupName, monitorName, ruleSetName).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName, + String ruleSetName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @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 ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String monitorName, String ruleSetName, Context context) { - return beginDeleteAsync(resourceGroupName, monitorName, ruleSetName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response deleteWithResponse(String resourceGroupName, String monitorName, String ruleSetName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, accept, Context.NONE); } /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @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 ManagementException thrown 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 void delete(String resourceGroupName, String monitorName, String ruleSetName) { - deleteAsync(resourceGroupName, monitorName, ruleSetName).block(); + private Response deleteWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, accept, context); } /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @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 ManagementException thrown 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.SINGLE) - public void delete(String resourceGroupName, String monitorName, String ruleSetName, Context context) { - deleteAsync(resourceGroupName, monitorName, ruleSetName, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, + String ruleSetName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, monitorName, ruleSetName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Update a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @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 ManagementException 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} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String monitorName, - String ruleSetName, TagRuleUpdateInner 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 (ruleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleSetName 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, ruleSetName, properties, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, + String ruleSetName) { + Response response = deleteWithResponse(resourceGroupName, monitorName, ruleSetName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @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 ManagementException 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} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String monitorName, - String ruleSetName, TagRuleUpdateInner 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 (ruleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleSetName 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, ruleSetName, properties, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, + String ruleSetName, Context context) { + Response response = deleteWithResponse(resourceGroupName, monitorName, ruleSetName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @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 ManagementException 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 on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String monitorName, String ruleSetName, - TagRuleUpdateInner properties) { - return updateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, properties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono deleteAsync(String resourceGroupName, String monitorName, String ruleSetName) { + return beginDeleteAsync(resourceGroupName, monitorName, ruleSetName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Update a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @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 ManagementException 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) - public Response updateWithResponse(String resourceGroupName, String monitorName, String ruleSetName, - TagRuleUpdateInner properties, Context context) { - return updateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, properties, context).block(); + public void delete(String resourceGroupName, String monitorName, String ruleSetName) { + beginDelete(resourceGroupName, monitorName, ruleSetName).getFinalResult(); } /** - * Update a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @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 ManagementException 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) - public TagRuleInner update(String resourceGroupName, String monitorName, String ruleSetName, - TagRuleUpdateInner properties) { - return updateWithResponse(resourceGroupName, monitorName, ruleSetName, properties, Context.NONE).getValue(); + public void delete(String resourceGroupName, String monitorName, String ruleSetName, Context context) { + beginDelete(resourceGroupName, monitorName, ruleSetName, context).getFinalResult(); } /** @@ -1046,6 +1148,33 @@ private Mono> listByNewRelicMonitorResourceNextSingl .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a TagRule list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNewRelicMonitorResourceNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByNewRelicMonitorResourceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1054,23 +1183,25 @@ private Mono> listByNewRelicMonitorResourceNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the 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 along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a TagRule list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNewRelicMonitorResourceNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listByNewRelicMonitorResourceNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByNewRelicMonitorResourceNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByNewRelicMonitorResourceNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(TagRulesClientImpl.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AccountInfo.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AccountInfo.java index 00cbaac977b3..e4175cc2f974 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AccountInfo.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AccountInfo.java @@ -22,7 +22,7 @@ public final class AccountInfo implements JsonSerializable { private String accountId; /* - * ingestion key of account + * Credential string. */ private String ingestionKey; @@ -58,7 +58,7 @@ public AccountInfo withAccountId(String accountId) { } /** - * Get the ingestionKey property: ingestion key of account. + * Get the ingestionKey property: Credential string. * * @return the ingestionKey value. */ @@ -67,7 +67,7 @@ public String ingestionKey() { } /** - * Set the ingestionKey property: ingestion key of account. + * Set the ingestionKey property: Credential string. * * @param ingestionKey the ingestionKey value to set. * @return the AccountInfo object itself. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Accounts.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Accounts.java index ded2222f68a8..f5b05c224029 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Accounts.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Accounts.java @@ -12,7 +12,8 @@ */ public interface Accounts { /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -24,7 +25,8 @@ public interface Accounts { PagedIterable list(String userEmail, String location); /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ActivateSaaSParameterRequest.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ActivateSaaSParameterRequest.java new file mode 100644 index 000000000000..345489bed89e --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ActivateSaaSParameterRequest.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * SaaS guid & PublishedId for Activate and Validate SaaS Resource. + */ +@Fluent +public final class ActivateSaaSParameterRequest implements JsonSerializable { + /* + * SaaS guid for Activate and Validate SaaS Resource + */ + private String saasGuid; + + /* + * Publisher Id for NewRelic resource + */ + private String publisherId; + + /** + * Creates an instance of ActivateSaaSParameterRequest class. + */ + public ActivateSaaSParameterRequest() { + } + + /** + * Get the saasGuid property: SaaS guid for Activate and Validate SaaS Resource. + * + * @return the saasGuid value. + */ + public String saasGuid() { + return this.saasGuid; + } + + /** + * Set the saasGuid property: SaaS guid for Activate and Validate SaaS Resource. + * + * @param saasGuid the saasGuid value to set. + * @return the ActivateSaaSParameterRequest object itself. + */ + public ActivateSaaSParameterRequest withSaasGuid(String saasGuid) { + this.saasGuid = saasGuid; + return this; + } + + /** + * Get the publisherId property: Publisher Id for NewRelic resource. + * + * @return the publisherId value. + */ + public String publisherId() { + return this.publisherId; + } + + /** + * Set the publisherId property: Publisher Id for NewRelic resource. + * + * @param publisherId the publisherId value to set. + * @return the ActivateSaaSParameterRequest object itself. + */ + public ActivateSaaSParameterRequest withPublisherId(String publisherId) { + this.publisherId = publisherId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (saasGuid() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property saasGuid in model ActivateSaaSParameterRequest")); + } + if (publisherId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property publisherId in model ActivateSaaSParameterRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ActivateSaaSParameterRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("saasGuid", this.saasGuid); + jsonWriter.writeStringField("publisherId", this.publisherId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActivateSaaSParameterRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActivateSaaSParameterRequest if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ActivateSaaSParameterRequest. + */ + public static ActivateSaaSParameterRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActivateSaaSParameterRequest deserializedActivateSaaSParameterRequest = new ActivateSaaSParameterRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("saasGuid".equals(fieldName)) { + deserializedActivateSaaSParameterRequest.saasGuid = reader.getString(); + } else if ("publisherId".equals(fieldName)) { + deserializedActivateSaaSParameterRequest.publisherId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedActivateSaaSParameterRequest; + }); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AppServicesGetRequest.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AppServicesGetRequest.java index f9ffd7d72560..dfeabab0e7e6 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AppServicesGetRequest.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AppServicesGetRequest.java @@ -24,7 +24,7 @@ public final class AppServicesGetRequest implements JsonSerializable azureResourceIds; /* - * User Email + * Reusable representation of an email address */ private String userEmail; @@ -55,7 +55,7 @@ public AppServicesGetRequest withAzureResourceIds(List azureResourceIds) } /** - * Get the userEmail property: User Email. + * Get the userEmail property: Reusable representation of an email address. * * @return the userEmail value. */ @@ -64,7 +64,7 @@ public String userEmail() { } /** - * Set the userEmail property: User Email. + * Set the userEmail property: Reusable representation of an email address. * * @param userEmail the userEmail value to set. * @return the AppServicesGetRequest object itself. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/BillingCycle.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/BillingCycle.java deleted file mode 100644 index feebfc64e425..000000000000 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/BillingCycle.java +++ /dev/null @@ -1,56 +0,0 @@ -// 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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Different usage type like YEARLY/MONTHLY. - */ -public final class BillingCycle extends ExpandableStringEnum { - /** - * Static value YEARLY for BillingCycle. - */ - public static final BillingCycle YEARLY = fromString("YEARLY"); - - /** - * Static value MONTHLY for BillingCycle. - */ - public static final BillingCycle MONTHLY = fromString("MONTHLY"); - - /** - * Static value WEEKLY for BillingCycle. - */ - public static final BillingCycle WEEKLY = fromString("WEEKLY"); - - /** - * Creates a new instance of BillingCycle value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BillingCycle() { - } - - /** - * Creates or finds a BillingCycle from its string representation. - * - * @param name a name to look for. - * @return the corresponding BillingCycle. - */ - public static BillingCycle fromString(String name) { - return fromString(name, BillingCycle.class); - } - - /** - * Gets known BillingCycle values. - * - * @return known BillingCycle values. - */ - public static Collection values() { - return values(BillingCycle.class); - } -} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/BillingInfoes.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/BillingInfoes.java index 16ae0506b26f..8338a5d72fd3 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/BillingInfoes.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/BillingInfoes.java @@ -12,7 +12,9 @@ */ public interface BillingInfoes { /** - * Get marketplace info mapped to the given monitor. + * Retrieves marketplace and organization information mapped to the given New Relic monitor resource + * + * A synchronous resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -20,19 +22,22 @@ public interface BillingInfoes { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return marketplace info mapped to the given monitor along with {@link Response}. + * @return marketplace Subscription and Organization details to which resource gets billed into along with + * {@link Response}. */ Response getWithResponse(String resourceGroupName, String monitorName, Context context); /** - * Get marketplace info mapped to the given monitor. + * Retrieves marketplace and organization information mapped to the given New Relic monitor resource + * + * A synchronous resource action. * * @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 marketplace info mapped to the given monitor. + * @return marketplace Subscription and Organization details to which resource gets billed into. */ BillingInfoResponse get(String resourceGroupName, String monitorName); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ConnectedPartnerResources.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ConnectedPartnerResources.java index 43e14ff91e51..ce50c123c28a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ConnectedPartnerResources.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ConnectedPartnerResources.java @@ -14,6 +14,8 @@ public interface ConnectedPartnerResources { /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @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. @@ -26,6 +28,8 @@ public interface ConnectedPartnerResources { /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param body Email Id of the user. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ConnectedPartnerResourcesListResponse.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ConnectedPartnerResourcesListResponse.java index 7d481faf8208..2721e2fd0d06 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ConnectedPartnerResourcesListResponse.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ConnectedPartnerResourcesListResponse.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.newrelicobservability.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,12 +21,12 @@ public final class ConnectedPartnerResourcesListResponse implements JsonSerializable { /* - * Results of a list operation. + * The ConnectedPartnerResourcesListFormat items on this page */ private List value; /* - * Link to the next set of results, if any. + * The link to the next page of items */ private String nextLink; @@ -36,7 +37,7 @@ public ConnectedPartnerResourcesListResponse() { } /** - * Get the value property: Results of a list operation. + * Get the value property: The ConnectedPartnerResourcesListFormat items on this page. * * @return the value value. */ @@ -45,7 +46,7 @@ public List value() { } /** - * Set the value property: Results of a list operation. + * Set the value property: The ConnectedPartnerResourcesListFormat items on this page. * * @param value the value value to set. * @return the ConnectedPartnerResourcesListResponse object itself. @@ -56,7 +57,7 @@ public ConnectedPartnerResourcesListResponse withValue(List e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ConnectedPartnerResourcesListResponse.class); + /** * {@inheritDoc} */ @@ -103,6 +110,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ConnectedPartnerResourcesListResponse if the JsonReader was pointing to an instance of it, * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ConnectedPartnerResourcesListResponse. */ public static ConnectedPartnerResourcesListResponse fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/HostsGetRequest.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/HostsGetRequest.java index 2e2ee7fe1d1e..56f672493a74 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/HostsGetRequest.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/HostsGetRequest.java @@ -24,7 +24,7 @@ public final class HostsGetRequest implements JsonSerializable private List vmIds; /* - * User Email + * Reusable representation of an email address */ private String userEmail; @@ -55,7 +55,7 @@ public HostsGetRequest withVmIds(List vmIds) { } /** - * Get the userEmail property: User Email. + * Get the userEmail property: Reusable representation of an email address. * * @return the userEmail value. */ @@ -64,7 +64,7 @@ public String userEmail() { } /** - * Set the userEmail property: User Email. + * Set the userEmail property: Reusable representation of an email address. * * @param userEmail the userEmail value to set. * @return the HostsGetRequest object itself. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/LatestLinkedSaaSResponse.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/LatestLinkedSaaSResponse.java new file mode 100644 index 000000000000..3dd52d39c82a --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/LatestLinkedSaaSResponse.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.models; + +import com.azure.resourcemanager.newrelicobservability.fluent.models.LatestLinkedSaaSResponseInner; + +/** + * An immutable client-side representation of LatestLinkedSaaSResponse. + */ +public interface LatestLinkedSaaSResponse { + /** + * Gets the saaSResourceId property: SaaS resource id. + * + * @return the saaSResourceId value. + */ + String saaSResourceId(); + + /** + * Gets the isHiddenSaaS property: Flag indicating if the SaaS resource is hidden. + * + * @return the isHiddenSaaS value. + */ + Boolean isHiddenSaaS(); + + /** + * Gets the inner com.azure.resourcemanager.newrelicobservability.fluent.models.LatestLinkedSaaSResponseInner + * object. + * + * @return the inner object. + */ + LatestLinkedSaaSResponseInner innerModel(); +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/LinkedResourceListResponse.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/LinkedResourceListResponse.java index aae3ce0d7903..0a4f855a8d3f 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/LinkedResourceListResponse.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/LinkedResourceListResponse.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.newrelicobservability.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,12 +20,12 @@ @Fluent public final class LinkedResourceListResponse implements JsonSerializable { /* - * Results of a list operation. + * The LinkedResource items on this page */ private List value; /* - * Link to the next set of results, if any. + * The link to the next page of items */ private String nextLink; @@ -35,7 +36,7 @@ public LinkedResourceListResponse() { } /** - * Get the value property: Results of a list operation. + * Get the value property: The LinkedResource items on this page. * * @return the value value. */ @@ -44,7 +45,7 @@ public List value() { } /** - * Set the value property: Results of a list operation. + * Set the value property: The LinkedResource items on this page. * * @param value the value value to set. * @return the LinkedResourceListResponse object itself. @@ -55,7 +56,7 @@ public LinkedResourceListResponse withValue(List value) { } /** - * Get the nextLink property: Link to the next set of results, if any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -64,7 +65,7 @@ public String nextLink() { } /** - * Set the nextLink property: Link to the next set of results, if any. + * Set the nextLink property: The link to the next page of items. * * @param nextLink the nextLink value to set. * @return the LinkedResourceListResponse object itself. @@ -80,11 +81,17 @@ public LinkedResourceListResponse withNextLink(String nextLink) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model LinkedResourceListResponse")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(LinkedResourceListResponse.class); + /** * {@inheritDoc} */ @@ -102,6 +109,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of LinkedResourceListResponse if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the LinkedResourceListResponse. */ public static LinkedResourceListResponse fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ManagedServiceIdentityType.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ManagedServiceIdentityType.java index f99582aab2d5..b676c3a46261 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ManagedServiceIdentityType.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ManagedServiceIdentityType.java @@ -27,10 +27,10 @@ public final class ManagedServiceIdentityType extends ExpandableStringEnum filteringTags(); /** - * Gets the userEmail property: User Email. + * Gets the userEmail property: Reusable representation of an email address. * * @return the userEmail value. */ diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsRequest.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsRequest.java index 828a11625efb..41be92f4d225 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsRequest.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsRequest.java @@ -18,7 +18,7 @@ @Fluent public final class MetricsRequest implements JsonSerializable { /* - * User Email + * Reusable representation of an email address */ private String userEmail; @@ -29,7 +29,7 @@ public MetricsRequest() { } /** - * Get the userEmail property: User Email. + * Get the userEmail property: Reusable representation of an email address. * * @return the userEmail value. */ @@ -38,7 +38,7 @@ public String userEmail() { } /** - * Set the userEmail property: User Email. + * Set the userEmail property: Reusable representation of an email address. * * @param userEmail the userEmail value to set. * @return the MetricsRequest object itself. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsStatusRequest.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsStatusRequest.java index fa78a76607e5..2f91207f0111 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsStatusRequest.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsStatusRequest.java @@ -24,7 +24,7 @@ public final class MetricsStatusRequest implements JsonSerializable azureResourceIds; /* - * User Email + * Reusable representation of an email address */ private String userEmail; @@ -55,7 +55,7 @@ public MetricsStatusRequest withAzureResourceIds(List azureResourceIds) } /** - * Get the userEmail property: User Email. + * Get the userEmail property: Reusable representation of an email address. * * @return the userEmail value. */ @@ -64,7 +64,7 @@ public String userEmail() { } /** - * Set the userEmail property: User Email. + * Set the userEmail property: Reusable representation of an email address. * * @param userEmail the userEmail value to set. * @return the MetricsStatusRequest object itself. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptionProperties.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptionProperties.java index 45a7565b4328..a7a06db01d72 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptionProperties.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptionProperties.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.newrelicobservability.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.newrelicobservability.fluent.models.MonitoredSubscriptionPropertiesInner; @@ -40,6 +41,13 @@ public interface MonitoredSubscriptionProperties { */ SubscriptionList properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the name of the resource group. * diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptionPropertiesList.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptionPropertiesList.java index 2ad12d3124ef..8edd668a69ec 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptionPropertiesList.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptionPropertiesList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.newrelicobservability.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,13 +15,13 @@ import java.util.List; /** - * The MonitoredSubscriptionPropertiesList model. + * Paged collection of MonitoredSubscriptionProperties items. */ @Fluent public final class MonitoredSubscriptionPropertiesList implements JsonSerializable { /* - * The value property. + * The MonitoredSubscriptionProperties items on this page */ private List value; @@ -36,7 +37,7 @@ public MonitoredSubscriptionPropertiesList() { } /** - * Get the value property: The value property. + * Get the value property: The MonitoredSubscriptionProperties items on this page. * * @return the value value. */ @@ -45,7 +46,7 @@ public List value() { } /** - * Set the value property: The value property. + * Set the value property: The MonitoredSubscriptionProperties items on this page. * * @param value the value value to set. * @return the MonitoredSubscriptionPropertiesList object itself. @@ -81,11 +82,17 @@ public MonitoredSubscriptionPropertiesList withNextLink(String nextLink) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model MonitoredSubscriptionPropertiesList")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(MonitoredSubscriptionPropertiesList.class); + /** * {@inheritDoc} */ @@ -103,6 +110,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of MonitoredSubscriptionPropertiesList if the JsonReader was pointing to an instance of it, * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the MonitoredSubscriptionPropertiesList. */ public static MonitoredSubscriptionPropertiesList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptions.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptions.java index ca59ee5b8b01..75ab3fabcc80 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptions.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptions.java @@ -13,19 +13,24 @@ */ public interface MonitoredSubscriptions { /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties 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 paginated response with {@link PagedIterable}. + * @return paged collection of MonitoredSubscriptionProperties items as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String monitorName); /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -33,12 +38,15 @@ public interface MonitoredSubscriptions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return paged collection of MonitoredSubscriptionProperties items as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String monitorName, Context context); /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -47,14 +55,15 @@ public interface MonitoredSubscriptions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response}. + * @return a MonitoredSubscriptionProperties along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String monitorName, ConfigurationName configurationName, Context context); /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -62,13 +71,16 @@ Response getWithResponse(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource. + * @return a MonitoredSubscriptionProperties. */ MonitoredSubscriptionProperties get(String resourceGroupName, String monitorName, ConfigurationName configurationName); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -80,7 +92,10 @@ MonitoredSubscriptionProperties get(String resourceGroupName, String monitorName void delete(String resourceGroupName, String monitorName, ConfigurationName configurationName); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -93,32 +108,37 @@ MonitoredSubscriptionProperties get(String resourceGroupName, String monitorName void delete(String resourceGroupName, String monitorName, ConfigurationName configurationName, Context context); /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response}. + * @return a MonitoredSubscriptionProperties along with {@link Response}. */ MonitoredSubscriptionProperties getById(String id); /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response}. + * @return a MonitoredSubscriptionProperties along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -128,7 +148,10 @@ MonitoredSubscriptionProperties get(String resourceGroupName, String monitorName void deleteById(String id); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Monitors.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Monitors.java index 726947bd0e70..41f5dd9b4c28 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Monitors.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Monitors.java @@ -13,7 +13,7 @@ */ public interface Monitors { /** - * List NewRelicMonitorResource resources by subscription ID. + * Lists all New Relic monitor resources either within a specific subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -23,7 +23,7 @@ public interface Monitors { PagedIterable list(); /** - * List NewRelicMonitorResource resources by subscription ID. + * Lists all New Relic monitor resources either within a specific subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -35,7 +35,7 @@ public interface Monitors { PagedIterable list(Context context); /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,7 +47,7 @@ public interface Monitors { PagedIterable listByResourceGroup(String resourceGroupName); /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -60,7 +60,8 @@ public interface Monitors { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -68,50 +69,53 @@ public interface Monitors { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String monitorName, Context context); /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @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. + * @return a Monitor Resource by NewRelic. */ NewRelicMonitorResource getByResourceGroup(String resourceGroupName, String monitorName); /** - * Delete a NewRelicMonitorResource. + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. * * @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 userEmail User Email. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete(String resourceGroupName, String userEmail, String monitorName); + void delete(String resourceGroupName, String monitorName, String userEmail); /** - * Delete a NewRelicMonitorResource. + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. * * @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 userEmail User Email. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete(String resourceGroupName, String userEmail, String monitorName, Context context); + void delete(String resourceGroupName, String monitorName, String userEmail, Context context); /** - * Get metric rules. + * Retrieves the metric rules that are configured in the New Relic monitor resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -120,13 +124,13 @@ Response getByResourceGroupWithResponse(String 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 metric rules along with {@link Response}. + * @return set of rules for sending metrics for the Monitor resource along with {@link Response}. */ Response getMetricRulesWithResponse(String resourceGroupName, String monitorName, MetricsRequest request, Context context); /** - * Get metric rules. + * Retrieves the metric rules that are configured in the New Relic monitor resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -134,12 +138,12 @@ Response getMetricRulesWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metric rules. + * @return set of rules for sending metrics for the Monitor resource. */ MetricRules getMetricRules(String resourceGroupName, String monitorName, MetricsRequest request); /** - * Get metric status. + * Retrieves the metric status that are configured in the New Relic monitor resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -148,13 +152,13 @@ Response getMetricRulesWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metric status along with {@link Response}. + * @return response of get metrics status Operation along with {@link Response}. */ Response getMetricStatusWithResponse(String resourceGroupName, String monitorName, MetricsStatusRequest request, Context context); /** - * Get metric status. + * Retrieves the metric status that are configured in the New Relic monitor resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -162,69 +166,97 @@ Response getMetricStatusWithResponse(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return response of get metrics status Operation. */ MetricsStatusResponse getMetricStatus(String resourceGroupName, String monitorName, MetricsStatusRequest request); /** - * List the app service resources currently being monitored by the NewRelic resource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * * @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}. + * @return response of get latest linked SaaS resource operation along with {@link Response}. */ - PagedIterable listAppServices(String resourceGroupName, String monitorName, - AppServicesGetRequest request); + Response latestLinkedSaaSWithResponse(String resourceGroupName, String monitorName, + Context context); /** - * List the app service resources currently being monitored by the NewRelic resource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * * @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}. + * @return response of get latest linked SaaS resource operation. */ - PagedIterable listAppServices(String resourceGroupName, String monitorName, - AppServicesGetRequest request, Context context); + LatestLinkedSaaSResponse latestLinkedSaaS(String resourceGroupName, String monitorName); /** - * Switches the billing for NewRelic monitor resource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @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. + * @param body Link SaaS body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Monitor Resource by NewRelic. */ - Response switchBillingWithResponse(String resourceGroupName, String monitorName, - SwitchBillingRequest request, Context context); + NewRelicMonitorResource linkSaaS(String resourceGroupName, String monitorName, SaaSData body); /** - * Switches the billing for NewRelic monitor resource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @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 body Link SaaS body parameter. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Monitor Resource by NewRelic. */ - NewRelicMonitorResource switchBilling(String resourceGroupName, String monitorName, SwitchBillingRequest request); + NewRelicMonitorResource linkSaaS(String resourceGroupName, String monitorName, SaaSData body, Context context); + + /** + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. + * + * @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}. + */ + PagedIterable listAppServices(String resourceGroupName, String monitorName, + AppServicesGetRequest request); + + /** + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. + * + * @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}. + */ + PagedIterable listAppServices(String resourceGroupName, String monitorName, + AppServicesGetRequest request, Context context); /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -237,7 +269,8 @@ Response switchBillingWithResponse(String resourceGroup PagedIterable listHosts(String resourceGroupName, String monitorName, HostsGetRequest request); /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -252,7 +285,35 @@ PagedIterable listHosts(String resourceGroupName, String monitorName, Ho Context context); /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. + * + * @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 a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listLinkedResources(String resourceGroupName, String monitorName); + + /** + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. + * + * @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 a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listLinkedResources(String resourceGroupName, String monitorName, Context context); + + /** + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -265,7 +326,8 @@ PagedIterable listHosts(String resourceGroupName, String monitorName, Ho PagedIterable listMonitoredResources(String resourceGroupName, String monitorName); /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -280,32 +342,91 @@ PagedIterable listMonitoredResources(String resourceGroupName Context context); /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. * * @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 a list operation as paginated response with {@link PagedIterable}. + * @return the {@link Response}. */ - PagedIterable listLinkedResources(String resourceGroupName, String monitorName); + Response refreshIngestionKeyWithResponse(String resourceGroupName, String monitorName, Context context); + + /** + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. + * + * @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. + */ + void refreshIngestionKey(String resourceGroupName, String monitorName); /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @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 Monitor Resource by NewRelic. + */ + NewRelicMonitorResource resubscribe(String resourceGroupName, String monitorName); + + /** + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param body Resubscribe Properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedIterable}. + * @return a Monitor Resource by NewRelic. */ - PagedIterable listLinkedResources(String resourceGroupName, String monitorName, Context context); + NewRelicMonitorResource resubscribe(String resourceGroupName, String monitorName, ResubscribeProperties body, + Context context); + + /** + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + * + * @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 a Monitor Resource by NewRelic. + */ + Response switchBillingWithResponse(String resourceGroupName, String monitorName, + SwitchBillingRequest request, Context context); + + /** + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + * + * @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. + * @return a Monitor Resource by NewRelic. + */ + NewRelicMonitorResource switchBilling(String resourceGroupName, String monitorName, SwitchBillingRequest request); /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -319,7 +440,8 @@ Response vmHostPayloadWithResponse(String resourceGroupName, Context context); /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -331,25 +453,27 @@ Response vmHostPayloadWithResponse(String resourceGroupName, VMExtensionPayload vmHostPayload(String resourceGroupName, String monitorName); /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a NewRelicMonitorResource along with {@link Response}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ NewRelicMonitorResource getById(String id); /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a NewRelicMonitorResource along with {@link Response}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitorsSwitchBillingHeaders.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitorsSwitchBillingHeaders.java index 3964b79e475d..e09bcf8db1f4 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitorsSwitchBillingHeaders.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitorsSwitchBillingHeaders.java @@ -28,6 +28,8 @@ public MonitorsSwitchBillingHeaders(HttpHeaders rawHeaders) { String retryAfter = rawHeaders.getValue(HttpHeaderName.RETRY_AFTER); if (retryAfter != null) { this.retryAfter = Integer.parseInt(retryAfter); + } else { + this.retryAfter = null; } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResource.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResource.java index 2ee32c6ed8c6..3f8c9669163a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResource.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResource.java @@ -114,6 +114,13 @@ public interface NewRelicMonitorResource { */ PlanData planData(); + /** + * Gets the saaSData property: SaaS details. + * + * @return the saaSData value. + */ + SaaSData saaSData(); + /** * Gets the liftrResourceCategory property: Liftr resource category. * @@ -241,7 +248,7 @@ interface WithResourceGroup { */ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithNewRelicAccountProperties, DefinitionStages.WithUserInfo, - DefinitionStages.WithPlanData, DefinitionStages.WithOrgCreationSource, + DefinitionStages.WithPlanData, DefinitionStages.WithSaaSData, DefinitionStages.WithOrgCreationSource, DefinitionStages.WithAccountCreationSource, DefinitionStages.WithSubscriptionState, DefinitionStages.WithSaaSAzureSubscriptionStatus { /** @@ -325,6 +332,19 @@ interface WithPlanData { WithCreate withPlanData(PlanData planData); } + /** + * The stage of the NewRelicMonitorResource definition allowing to specify saaSData. + */ + interface WithSaaSData { + /** + * Specifies the saaSData property: SaaS details. + * + * @param saaSData SaaS details. + * @return the next definition stage. + */ + WithCreate withSaaSData(SaaSData saaSData); + } + /** * The stage of the NewRelicMonitorResource definition allowing to specify orgCreationSource. */ @@ -392,7 +412,7 @@ interface WithSaaSAzureSubscriptionStatus { */ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithNewRelicAccountProperties, UpdateStages.WithUserInfo, UpdateStages.WithPlanData, - UpdateStages.WithOrgCreationSource, UpdateStages.WithAccountCreationSource { + UpdateStages.WithSaaSData, UpdateStages.WithOrgCreationSource, UpdateStages.WithAccountCreationSource { /** * Executes the update request. * @@ -478,6 +498,19 @@ interface WithPlanData { Update withPlanData(PlanData planData); } + /** + * The stage of the NewRelicMonitorResource update allowing to specify saaSData. + */ + interface WithSaaSData { + /** + * Specifies the saaSData property: SaaS details. + * + * @param saaSData SaaS details. + * @return the next definition stage. + */ + Update withSaaSData(SaaSData saaSData); + } + /** * The stage of the NewRelicMonitorResource update allowing to specify orgCreationSource. */ @@ -521,99 +554,122 @@ interface WithAccountCreationSource { NewRelicMonitorResource refresh(Context context); /** - * Get metric rules. + * Retrieves the metric rules that are configured in the New Relic monitor 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}. + * @return set of rules for sending metrics for the Monitor resource along with {@link Response}. */ Response getMetricRulesWithResponse(MetricsRequest request, Context context); /** - * Get metric rules. + * Retrieves the metric rules that are configured in the New Relic monitor 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. + * @return set of rules for sending metrics for the Monitor resource. */ MetricRules getMetricRules(MetricsRequest request); /** - * Get metric status. + * Retrieves the metric status that are configured in the New Relic monitor 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}. + * @return response of get metrics status Operation along with {@link Response}. */ Response getMetricStatusWithResponse(MetricsStatusRequest request, Context context); /** - * Get metric status. + * Retrieves the metric status that are configured in the New Relic monitor 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. + * @return response of get metrics status Operation. */ MetricsStatusResponse getMetricStatus(MetricsStatusRequest request); /** - * List the app service resources currently being monitored by the NewRelic resource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * - * @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}. + * @return response of get latest linked SaaS resource operation along with {@link Response}. */ - PagedIterable listAppServices(AppServicesGetRequest request); + Response latestLinkedSaaSWithResponse(Context context); /** - * List the app service resources currently being monitored by the NewRelic resource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * - * @param request The details of the app services get request. - * @param context The context to associate with this operation. + * @throws com.azure.core.management.exception.ManagementException 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 latest linked SaaS resource operation. + */ + LatestLinkedSaaSResponse latestLinkedSaaS(); + + /** + * Links a new SaaS to the newrelic organization of the underlying monitor. + * + * @param body Link SaaS body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list app services Operation as paginated response with {@link PagedIterable}. + * @return a Monitor Resource by NewRelic. */ - PagedIterable listAppServices(AppServicesGetRequest request, Context context); + NewRelicMonitorResource linkSaaS(SaaSData body); /** - * Switches the billing for NewRelic monitor resource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * - * @param request The details of the switch billing request. + * @param body Link SaaS body parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Monitor Resource by NewRelic. */ - Response switchBillingWithResponse(SwitchBillingRequest request, Context context); + NewRelicMonitorResource linkSaaS(SaaSData body, Context context); /** - * Switches the billing for NewRelic monitor resource. + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. * - * @param request The details of the switch billing request. + * @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 a Monitor Resource by NewRelic. + * @return response of a list app services Operation as paginated response with {@link PagedIterable}. */ - NewRelicMonitorResource switchBilling(SwitchBillingRequest request); + PagedIterable listAppServices(AppServicesGetRequest request); /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. + * + * @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}. + */ + PagedIterable listAppServices(AppServicesGetRequest request, Context context); + + /** + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @param request The details of the Hosts get request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -624,7 +680,8 @@ interface WithAccountCreationSource { PagedIterable listHosts(HostsGetRequest request); /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @param request The details of the Hosts get request. * @param context The context to associate with this operation. @@ -636,7 +693,30 @@ interface WithAccountCreationSource { PagedIterable listHosts(HostsGetRequest request, Context context); /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listLinkedResources(); + + /** + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listLinkedResources(Context context); + + /** + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -646,7 +726,8 @@ interface WithAccountCreationSource { PagedIterable listMonitoredResources(); /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -658,27 +739,75 @@ interface WithAccountCreationSource { PagedIterable listMonitoredResources(Context context); /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedIterable}. + * @return the {@link Response}. */ - PagedIterable listLinkedResources(); + Response refreshIngestionKeyWithResponse(Context context); + + /** + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void refreshIngestionKey(); /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace * + * A long-running resource action. + * + * @throws com.azure.core.management.exception.ManagementException 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. + */ + NewRelicMonitorResource resubscribe(); + + /** + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. + * + * @param body Resubscribe Properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedIterable}. + * @return a Monitor Resource by NewRelic. */ - PagedIterable listLinkedResources(Context context); + NewRelicMonitorResource resubscribe(ResubscribeProperties body, Context context); + + /** + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + * + * @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 a Monitor Resource by NewRelic. + */ + Response switchBillingWithResponse(SwitchBillingRequest request, Context context); + + /** + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + * + * @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. + * @return a Monitor Resource by NewRelic. + */ + NewRelicMonitorResource switchBilling(SwitchBillingRequest request); /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -689,7 +818,8 @@ interface WithAccountCreationSource { Response vmHostPayloadWithResponse(Context context); /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResourceUpdate.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResourceUpdate.java index cb2401c5c93b..2ca577e307a7 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResourceUpdate.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResourceUpdate.java @@ -158,6 +158,29 @@ public NewRelicMonitorResourceUpdate withPlanData(PlanData planData) { return this; } + /** + * Get the saaSData property: SaaS details. + * + * @return the saaSData value. + */ + public SaaSData saaSData() { + return this.innerProperties() == null ? null : this.innerProperties().saaSData(); + } + + /** + * Set the saaSData property: SaaS details. + * + * @param saaSData the saaSData value to set. + * @return the NewRelicMonitorResourceUpdate object itself. + */ + public NewRelicMonitorResourceUpdate withSaaSData(SaaSData saaSData) { + if (this.innerProperties() == null) { + this.innerProperties = new NewRelicMonitorResourceUpdateProperties(); + } + this.innerProperties().withSaaSData(saaSData); + return this; + } + /** * Get the orgCreationSource property: Source of org creation. * diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Organizations.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Organizations.java index 691a8c4b7900..11528bf9848b 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Organizations.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Organizations.java @@ -12,7 +12,8 @@ */ public interface Organizations { /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -24,7 +25,8 @@ public interface Organizations { PagedIterable list(String userEmail, String location); /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/PlanData.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/PlanData.java index f272e0357177..0c5e84025a0e 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/PlanData.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/PlanData.java @@ -25,9 +25,9 @@ public final class PlanData implements JsonSerializable { private UsageType usageType; /* - * Different billing cycles like MONTHLY/WEEKLY. this could be enum + * Different billing cycles like Monthly/Weekly. */ - private BillingCycle billingCycle; + private String billingCycle; /* * plan id as published by NewRelic @@ -66,21 +66,21 @@ public PlanData withUsageType(UsageType usageType) { } /** - * Get the billingCycle property: Different billing cycles like MONTHLY/WEEKLY. this could be enum. + * Get the billingCycle property: Different billing cycles like Monthly/Weekly. * * @return the billingCycle value. */ - public BillingCycle billingCycle() { + public String billingCycle() { return this.billingCycle; } /** - * Set the billingCycle property: Different billing cycles like MONTHLY/WEEKLY. this could be enum. + * Set the billingCycle property: Different billing cycles like Monthly/Weekly. * * @param billingCycle the billingCycle value to set. * @return the PlanData object itself. */ - public PlanData withBillingCycle(BillingCycle billingCycle) { + public PlanData withBillingCycle(String billingCycle) { this.billingCycle = billingCycle; return this; } @@ -140,7 +140,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("usageType", this.usageType == null ? null : this.usageType.toString()); - jsonWriter.writeStringField("billingCycle", this.billingCycle == null ? null : this.billingCycle.toString()); + jsonWriter.writeStringField("billingCycle", this.billingCycle); jsonWriter.writeStringField("planDetails", this.planDetails); jsonWriter.writeStringField("effectiveDate", this.effectiveDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.effectiveDate)); @@ -165,7 +165,7 @@ public static PlanData fromJson(JsonReader jsonReader) throws IOException { if ("usageType".equals(fieldName)) { deserializedPlanData.usageType = UsageType.fromString(reader.getString()); } else if ("billingCycle".equals(fieldName)) { - deserializedPlanData.billingCycle = BillingCycle.fromString(reader.getString()); + deserializedPlanData.billingCycle = reader.getString(); } else if ("planDetails".equals(fieldName)) { deserializedPlanData.planDetails = reader.getString(); } else if ("effectiveDate".equals(fieldName)) { diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Plans.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Plans.java index bc1920e6e8c8..d423041be17c 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Plans.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Plans.java @@ -12,7 +12,7 @@ */ public interface Plans { /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -21,7 +21,7 @@ public interface Plans { PagedIterable list(); /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @param accountId Account Id. * @param organizationId Organization Id. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ResubscribeProperties.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ResubscribeProperties.java new file mode 100644 index 000000000000..ae5e979f8ade --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ResubscribeProperties.java @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Resubscribe Properties. + */ +@Fluent +public final class ResubscribeProperties implements JsonSerializable { + /* + * Newly selected plan Id to create the new Marketplace subscription for Resubscribe + */ + private String planId; + + /* + * Newly selected term Id to create the new Marketplace subscription for Resubscribe + */ + private String termId; + + /* + * Newly selected Azure Subscription Id in which the new Marketplace subscription will be created for Resubscribe + */ + private String subscriptionId; + + /* + * Newly selected Azure resource group in which the new Marketplace subscription will be created for Resubscribe + */ + private String resourceGroup; + + /* + * Organization Id of the NewRelic Organization that needs to be resubscribed + */ + private String organizationId; + + /* + * Publisher Id of the NewRelic offer that needs to be resubscribed + */ + private String publisherId; + + /* + * Offer Id of the NewRelic offer that needs to be resubscribed + */ + private String offerId; + + /** + * Creates an instance of ResubscribeProperties class. + */ + public ResubscribeProperties() { + } + + /** + * Get the planId property: Newly selected plan Id to create the new Marketplace subscription for Resubscribe. + * + * @return the planId value. + */ + public String planId() { + return this.planId; + } + + /** + * Set the planId property: Newly selected plan Id to create the new Marketplace subscription for Resubscribe. + * + * @param planId the planId value to set. + * @return the ResubscribeProperties object itself. + */ + public ResubscribeProperties withPlanId(String planId) { + this.planId = planId; + return this; + } + + /** + * Get the termId property: Newly selected term Id to create the new Marketplace subscription for Resubscribe. + * + * @return the termId value. + */ + public String termId() { + return this.termId; + } + + /** + * Set the termId property: Newly selected term Id to create the new Marketplace subscription for Resubscribe. + * + * @param termId the termId value to set. + * @return the ResubscribeProperties object itself. + */ + public ResubscribeProperties withTermId(String termId) { + this.termId = termId; + return this; + } + + /** + * Get the subscriptionId property: Newly selected Azure Subscription Id in which the new Marketplace subscription + * will be created for Resubscribe. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Newly selected Azure Subscription Id in which the new Marketplace subscription + * will be created for Resubscribe. + * + * @param subscriptionId the subscriptionId value to set. + * @return the ResubscribeProperties object itself. + */ + public ResubscribeProperties withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the resourceGroup property: Newly selected Azure resource group in which the new Marketplace subscription + * will be created for Resubscribe. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: Newly selected Azure resource group in which the new Marketplace subscription + * will be created for Resubscribe. + * + * @param resourceGroup the resourceGroup value to set. + * @return the ResubscribeProperties object itself. + */ + public ResubscribeProperties withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the organizationId property: Organization Id of the NewRelic Organization that needs to be resubscribed. + * + * @return the organizationId value. + */ + public String organizationId() { + return this.organizationId; + } + + /** + * Set the organizationId property: Organization Id of the NewRelic Organization that needs to be resubscribed. + * + * @param organizationId the organizationId value to set. + * @return the ResubscribeProperties object itself. + */ + public ResubscribeProperties withOrganizationId(String organizationId) { + this.organizationId = organizationId; + return this; + } + + /** + * Get the publisherId property: Publisher Id of the NewRelic offer that needs to be resubscribed. + * + * @return the publisherId value. + */ + public String publisherId() { + return this.publisherId; + } + + /** + * Set the publisherId property: Publisher Id of the NewRelic offer that needs to be resubscribed. + * + * @param publisherId the publisherId value to set. + * @return the ResubscribeProperties object itself. + */ + public ResubscribeProperties withPublisherId(String publisherId) { + this.publisherId = publisherId; + return this; + } + + /** + * Get the offerId property: Offer Id of the NewRelic offer that needs to be resubscribed. + * + * @return the offerId value. + */ + public String offerId() { + return this.offerId; + } + + /** + * Set the offerId property: Offer Id of the NewRelic offer that needs to be resubscribed. + * + * @param offerId the offerId value to set. + * @return the ResubscribeProperties object itself. + */ + public ResubscribeProperties withOfferId(String offerId) { + this.offerId = offerId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("planId", this.planId); + jsonWriter.writeStringField("termId", this.termId); + jsonWriter.writeStringField("subscriptionId", this.subscriptionId); + jsonWriter.writeStringField("resourceGroup", this.resourceGroup); + jsonWriter.writeStringField("organizationId", this.organizationId); + jsonWriter.writeStringField("publisherId", this.publisherId); + jsonWriter.writeStringField("offerId", this.offerId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResubscribeProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResubscribeProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ResubscribeProperties. + */ + public static ResubscribeProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResubscribeProperties deserializedResubscribeProperties = new ResubscribeProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("planId".equals(fieldName)) { + deserializedResubscribeProperties.planId = reader.getString(); + } else if ("termId".equals(fieldName)) { + deserializedResubscribeProperties.termId = reader.getString(); + } else if ("subscriptionId".equals(fieldName)) { + deserializedResubscribeProperties.subscriptionId = reader.getString(); + } else if ("resourceGroup".equals(fieldName)) { + deserializedResubscribeProperties.resourceGroup = reader.getString(); + } else if ("organizationId".equals(fieldName)) { + deserializedResubscribeProperties.organizationId = reader.getString(); + } else if ("publisherId".equals(fieldName)) { + deserializedResubscribeProperties.publisherId = reader.getString(); + } else if ("offerId".equals(fieldName)) { + deserializedResubscribeProperties.offerId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResubscribeProperties; + }); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaS.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaS.java new file mode 100644 index 000000000000..a09b67cba136 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaS.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of SaaS. + */ +public interface SaaS { + /** + * Resolve the token to get the SaaS resource ID and activate the SaaS resource. + * + * @param request The request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details along with {@link Response}. + */ + Response activateResourceWithResponse(ActivateSaaSParameterRequest request, + Context context); + + /** + * Resolve the token to get the SaaS resource ID and activate the SaaS resource. + * + * @param request The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details. + */ + SaaSResourceDetailsResponse activateResource(ActivateSaaSParameterRequest request); +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaSData.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaSData.java new file mode 100644 index 000000000000..39dd2aaa4af1 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaSData.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * SaaS details. + */ +@Fluent +public final class SaaSData implements JsonSerializable { + /* + * SaaS resource id + */ + private String saaSResourceId; + + /** + * Creates an instance of SaaSData class. + */ + public SaaSData() { + } + + /** + * Get the saaSResourceId property: SaaS resource id. + * + * @return the saaSResourceId value. + */ + public String saaSResourceId() { + return this.saaSResourceId; + } + + /** + * Set the saaSResourceId property: SaaS resource id. + * + * @param saaSResourceId the saaSResourceId value to set. + * @return the SaaSData object itself. + */ + public SaaSData withSaaSResourceId(String saaSResourceId) { + this.saaSResourceId = saaSResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("saaSResourceId", this.saaSResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SaaSData from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SaaSData if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the SaaSData. + */ + public static SaaSData fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SaaSData deserializedSaaSData = new SaaSData(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("saaSResourceId".equals(fieldName)) { + deserializedSaaSData.saaSResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSaaSData; + }); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaSResourceDetailsResponse.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaSResourceDetailsResponse.java new file mode 100644 index 000000000000..6084bb92f365 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaSResourceDetailsResponse.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.newrelicobservability.fluent.models.SaaSResourceDetailsResponseInner; + +/** + * An immutable client-side representation of SaaSResourceDetailsResponse. + */ +public interface SaaSResourceDetailsResponse { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the saasId property: Id of the Marketplace SaaS Resource. + * + * @return the saasId value. + */ + String saasId(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.newrelicobservability.fluent.models.SaaSResourceDetailsResponseInner + * object. + * + * @return the inner object. + */ + SaaSResourceDetailsResponseInner innerModel(); +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SwitchBillingRequest.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SwitchBillingRequest.java index 32c61191bba2..189db1af2f85 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SwitchBillingRequest.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SwitchBillingRequest.java @@ -33,7 +33,7 @@ public final class SwitchBillingRequest implements JsonSerializable listByNewRelicMonitorResource(String resourceGroupName, String monitorName); /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -38,7 +40,8 @@ public interface TagRules { PagedIterable listByNewRelicMonitorResource(String resourceGroupName, String monitorName, Context context); /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -47,13 +50,14 @@ public interface TagRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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}. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String monitorName, String ruleSetName, Context context); /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -61,12 +65,13 @@ Response getWithResponse(String resourceGroupName, String monitorName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a tag rule belonging to NewRelic account. */ TagRule get(String resourceGroupName, String monitorName, String ruleSetName); /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -78,7 +83,8 @@ Response getWithResponse(String resourceGroupName, String monitorName, void delete(String resourceGroupName, String monitorName, String ruleSetName); /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -91,30 +97,33 @@ Response getWithResponse(String resourceGroupName, String monitorName, void delete(String resourceGroupName, String monitorName, String ruleSetName, Context context); /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a TagRule along with {@link Response}. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ TagRule getById(String id); /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a TagRule along with {@link Response}. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,7 +133,8 @@ Response getWithResponse(String resourceGroupName, String monitorName, void deleteById(String id); /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/UserInfo.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/UserInfo.java index 606178ef5cbb..cf1c61cdc38e 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/UserInfo.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/UserInfo.java @@ -27,7 +27,7 @@ public final class UserInfo implements JsonSerializable { private String lastName; /* - * User Email + * Reusable representation of an email address */ private String emailAddress; @@ -88,7 +88,7 @@ public UserInfo withLastName(String lastName) { } /** - * Get the emailAddress property: User Email. + * Get the emailAddress property: Reusable representation of an email address. * * @return the emailAddress value. */ @@ -97,7 +97,7 @@ public String emailAddress() { } /** - * Set the emailAddress property: User Email. + * Set the emailAddress property: Reusable representation of an email address. * * @param emailAddress the emailAddress value to set. * @return the UserInfo object itself. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-newrelicobservability/proxy-config.json b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-newrelicobservability/proxy-config.json index a384731a470b..c481c718da74 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-newrelicobservability/proxy-config.json +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-newrelicobservability/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.newrelicobservability.implementation.AccountsClientImpl$AccountsService"],["com.azure.resourcemanager.newrelicobservability.implementation.BillingInfoesClientImpl$BillingInfoesService"],["com.azure.resourcemanager.newrelicobservability.implementation.ConnectedPartnerResourcesClientImpl$ConnectedPartnerResourcesService"],["com.azure.resourcemanager.newrelicobservability.implementation.MonitoredSubscriptionsClientImpl$MonitoredSubscriptionsService"],["com.azure.resourcemanager.newrelicobservability.implementation.MonitorsClientImpl$MonitorsService"],["com.azure.resourcemanager.newrelicobservability.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.newrelicobservability.implementation.OrganizationsClientImpl$OrganizationsService"],["com.azure.resourcemanager.newrelicobservability.implementation.PlansClientImpl$PlansService"],["com.azure.resourcemanager.newrelicobservability.implementation.TagRulesClientImpl$TagRulesService"]] \ No newline at end of file +[["com.azure.resourcemanager.newrelicobservability.implementation.AccountsClientImpl$AccountsService"],["com.azure.resourcemanager.newrelicobservability.implementation.BillingInfoesClientImpl$BillingInfoesService"],["com.azure.resourcemanager.newrelicobservability.implementation.ConnectedPartnerResourcesClientImpl$ConnectedPartnerResourcesService"],["com.azure.resourcemanager.newrelicobservability.implementation.MonitoredSubscriptionsClientImpl$MonitoredSubscriptionsService"],["com.azure.resourcemanager.newrelicobservability.implementation.MonitorsClientImpl$MonitorsService"],["com.azure.resourcemanager.newrelicobservability.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.newrelicobservability.implementation.OrganizationsClientImpl$OrganizationsService"],["com.azure.resourcemanager.newrelicobservability.implementation.PlansClientImpl$PlansService"],["com.azure.resourcemanager.newrelicobservability.implementation.SaaSClientImpl$SaaSService"],["com.azure.resourcemanager.newrelicobservability.implementation.TagRulesClientImpl$TagRulesService"]] \ No newline at end of file diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/resources/azure-resourcemanager-newrelicobservability.properties b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/resources/azure-resourcemanager-newrelicobservability.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/resources/azure-resourcemanager-newrelicobservability.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListSamples.java index 0fa7cfb503cf..dc2d89510ef7 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListSamples.java @@ -9,7 +9,8 @@ */ public final class AccountsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Accounts_List_MinimumSet_Gen.json */ /** @@ -23,7 +24,8 @@ public static void accountsListMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Accounts_List_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoGetSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoGetSamples.java index e9162f8cee18..6fd2f3117bbe 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoGetSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoGetSamples.java @@ -10,7 +10,8 @@ public final class BillingInfoGetSamples { /* * x-ms-original-file: - * specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/BillingInfo_Get.json + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * BillingInfo_Get.json */ /** * Sample code: BillingInfo_Get. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListSamples.java index aabca36166aa..65d3eca142a0 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListSamples.java @@ -9,7 +9,8 @@ */ public final class ConnectedPartnerResourcesListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * ConnectedPartnerResources_List.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateorUpdateSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateOrUpdateSamples.java similarity index 72% rename from sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateorUpdateSamples.java rename to sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateOrUpdateSamples.java index f22bd2447d04..123280a7d738 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateorUpdateSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateOrUpdateSamples.java @@ -7,12 +7,13 @@ import com.azure.resourcemanager.newrelicobservability.models.ConfigurationName; /** - * Samples for MonitoredSubscriptions CreateorUpdate. + * Samples for MonitoredSubscriptions CreateOrUpdate. */ -public final class MonitoredSubscriptionsCreateorUpdateSamples { +public final class MonitoredSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ - * MonitoredSubscriptions_CreateorUpdate.json + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * MonitoredSubscriptions_CreateOrUpdate.json */ /** * Sample code: Monitors_AddMonitoredSubscriptions. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsDeleteSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsDeleteSamples.java index dda1ebeffa06..eef4658ca554 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsDeleteSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsDeleteSamples.java @@ -11,7 +11,8 @@ */ public final class MonitoredSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * MonitoredSubscriptions_Delete.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsGetSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsGetSamples.java index d11b01e302af..b82dd96db6dc 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsGetSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsGetSamples.java @@ -11,7 +11,8 @@ */ public final class MonitoredSubscriptionsGetSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * MonitoredSubscriptions_Get.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsListSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsListSamples.java index b791d83fb4e8..860414389fa3 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsListSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsListSamples.java @@ -9,7 +9,8 @@ */ public final class MonitoredSubscriptionsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * MonitoredSubscriptions_List.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsUpdateSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsUpdateSamples.java index e7943bd2125c..4c43bb39849a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsUpdateSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsUpdateSamples.java @@ -12,7 +12,8 @@ */ public final class MonitoredSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * MonitoredSubscriptions_Update.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsCreateOrUpdateSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsCreateOrUpdateSamples.java index f963a84b8a06..376cfe6e101f 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsCreateOrUpdateSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsCreateOrUpdateSamples.java @@ -6,7 +6,6 @@ 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; @@ -15,6 +14,7 @@ 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.SaaSData; import com.azure.resourcemanager.newrelicobservability.models.SingleSignOnStates; import com.azure.resourcemanager.newrelicobservability.models.UsageType; import com.azure.resourcemanager.newrelicobservability.models.UserAssignedIdentity; @@ -28,7 +28,8 @@ */ public final class MonitorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_CreateOrUpdate_MaximumSet_Gen.json */ /** @@ -61,9 +62,11 @@ public static void monitorsCreateOrUpdateMaximumSetGen( .withPhoneNumber("krf") .withCountry("hslqnwdanrconqyekwbnttaetv")) .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.YEARLY) + .withBillingCycle("Yearly") .withPlanDetails("tbbiaga") .withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z"))) + .withSaaSData(new SaaSData().withSaaSResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/Microsoft.SaaS/resources/abcd")) .withOrgCreationSource(OrgCreationSource.LIFTR) .withAccountCreationSource(AccountCreationSource.LIFTR) .withSubscriptionState("Suspended") diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteSamples.java index e33d392f62b4..3d7577771f94 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class MonitorsDeleteSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_Delete_MinimumSet_Gen.json */ /** @@ -20,12 +21,13 @@ public final class MonitorsDeleteSamples { public static void monitorsDeleteMinimumSetGen( com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { manager.monitors() - .delete("rgopenapi", "ruxvg@xqkmdhrnoo.hlmbpm", "ipxmlcbonyxtolzejcjshkmlron", + .delete("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "ruxvg@xqkmdhrnoo.hlmbpm", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_Delete_MaximumSet_Gen.json */ /** @@ -36,7 +38,7 @@ public static void monitorsDeleteMinimumSetGen( public static void monitorsDeleteMaximumSetGen( com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { manager.monitors() - .delete("rgopenapi", "ruxvg@xqkmdhrnoo.hlmbpm", "ipxmlcbonyxtolzejcjshkmlron", + .delete("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "ruxvg@xqkmdhrnoo.hlmbpm", com.azure.core.util.Context.NONE); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetByResourceGroupSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetByResourceGroupSamples.java index caf1a6615ccb..2eb017ef2ad4 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetByResourceGroupSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetByResourceGroupSamples.java @@ -9,7 +9,8 @@ */ public final class MonitorsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_Get_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesSamples.java index 19ac552fbf44..2202db56a69d 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesSamples.java @@ -11,7 +11,8 @@ */ public final class MonitorsGetMetricRulesSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_GetMetricRules_MinimumSet_Gen.json */ /** @@ -27,7 +28,8 @@ public static void monitorsGetMetricRulesMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_GetMetricRules_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusSamples.java index 3115d777c5d7..f134ab241e25 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusSamples.java @@ -12,7 +12,8 @@ */ public final class MonitorsGetMetricStatusSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_GetMetricStatus_MinimumSet_Gen.json */ /** @@ -31,7 +32,8 @@ public static void monitorsGetMetricStatusMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_GetMetricStatus_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLatestLinkedSaaSSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLatestLinkedSaaSSamples.java new file mode 100644 index 000000000000..3a11f683e768 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLatestLinkedSaaSSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +/** + * Samples for Monitors LatestLinkedSaaS. + */ +public final class MonitorsLatestLinkedSaaSSamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_LatestLinkedSaaS_MinimumSet_Gen.json + */ + /** + * Sample code: Monitors_LatestLinkedSaaS_MinimumSet_Gen. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void monitorsLatestLinkedSaaSMinimumSetGen( + com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors() + .latestLinkedSaaSWithResponse("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_LatestLinkedSaaS_MaximumSet_Gen.json + */ + /** + * Sample code: Monitors_LatestLinkedSaaS_MaximumSet_Gen. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void monitorsLatestLinkedSaaSMaximumSetGen( + com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors() + .latestLinkedSaaSWithResponse("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLinkSaaSSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLinkSaaSSamples.java new file mode 100644 index 000000000000..6d69642c3326 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLinkSaaSSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.resourcemanager.newrelicobservability.models.SaaSData; + +/** + * Samples for Monitors LinkSaaS. + */ +public final class MonitorsLinkSaaSSamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_LinkSaaS.json + */ + /** + * Sample code: Monitors_LinkSaaS. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void + monitorsLinkSaaS(com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors() + .linkSaaS("myResourceGroup", "myMonitor", new SaaSData().withSaaSResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/Microsoft.SaaS/resources/abcd"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesSamples.java index c2268bddffca..c1c7988adc2e 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesSamples.java @@ -12,7 +12,8 @@ */ public final class MonitorsListAppServicesSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListAppServices_MaximumSet_Gen.json */ /** @@ -31,7 +32,8 @@ public static void monitorsListAppServicesMaximumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListAppServices_MinimumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListByResourceGroupSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListByResourceGroupSamples.java index f32f6675d047..e7c3e309061b 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListByResourceGroupSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListByResourceGroupSamples.java @@ -9,7 +9,8 @@ */ public final class MonitorsListByResourceGroupSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListByResourceGroup_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsSamples.java index ae8c0bc0836c..0d241647f615 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsSamples.java @@ -12,7 +12,8 @@ */ public final class MonitorsListHostsSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListHosts_MinimumSet_Gen.json */ /** @@ -30,7 +31,8 @@ public static void monitorsListHostsMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListHosts_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListLinkedResourcesSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListLinkedResourcesSamples.java index 7010b26e26bd..c476b3ef5c05 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListLinkedResourcesSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListLinkedResourcesSamples.java @@ -10,8 +10,8 @@ public final class MonitorsListLinkedResourcesSamples { /* * x-ms-original-file: - * specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/LinkedResources_List. - * json + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * LinkedResources_List.json */ /** * Sample code: Monitors_ListLinkedResources. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesSamples.java index 85a54990ace6..85b87c5d1747 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesSamples.java @@ -9,7 +9,8 @@ */ public final class MonitorsListMonitoredResourcesSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListMonitoredResources_MinimumSet_Gen.json */ /** @@ -24,7 +25,8 @@ public static void monitorsListMonitoredResourcesMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListMonitoredResources_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListSamples.java index d4462aa2861c..127bfe544c8a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListSamples.java @@ -9,7 +9,8 @@ */ public final class MonitorsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListBySubscription_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsRefreshIngestionKeySamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsRefreshIngestionKeySamples.java new file mode 100644 index 000000000000..1da06ecbd8e8 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsRefreshIngestionKeySamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +/** + * Samples for Monitors RefreshIngestionKey. + */ +public final class MonitorsRefreshIngestionKeySamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_RefreshIngestionKey.json + */ + /** + * Sample code: Monitors_RefreshIngestionKey. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void monitorsRefreshIngestionKey( + com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors() + .refreshIngestionKeyWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsResubscribeSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsResubscribeSamples.java new file mode 100644 index 000000000000..34c43398165d --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsResubscribeSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +/** + * Samples for Monitors Resubscribe. + */ +public final class MonitorsResubscribeSamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_Resubscribe.json + */ + /** + * Sample code: Monitors_Resubscribe. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void + monitorsResubscribe(com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors().resubscribe("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsSwitchBillingSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsSwitchBillingSamples.java index 4090f02b2adf..90586d80f071 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsSwitchBillingSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsSwitchBillingSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.newrelicobservability.generated; -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; @@ -15,7 +14,8 @@ */ public final class MonitorsSwitchBillingSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_SwitchBilling_MinimumSet_Gen.json */ /** @@ -31,7 +31,8 @@ public static void monitorsSwitchBillingMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_SwitchBilling_MaximumSet_Gen.json */ /** @@ -47,7 +48,7 @@ public static void monitorsSwitchBillingMaximumSetGen( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz") .withOrganizationId("k") .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.YEARLY) + .withBillingCycle("Yearly") .withPlanDetails("tbbiaga") .withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z"))) .withUserEmail("ruxvg@xqkmdhrnoo.hlmbpm"), diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsUpdateSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsUpdateSamples.java index 172bbc349a46..2330066d1739 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsUpdateSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsUpdateSamples.java @@ -6,7 +6,6 @@ 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; @@ -29,7 +28,8 @@ */ public final class MonitorsUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_Update_MaximumSet_Gen.json */ /** @@ -62,7 +62,7 @@ public static void monitorsUpdateMaximumSetGen( .withPhoneNumber("krf") .withCountry("hslqnwdanrconqyekwbnttaetv")) .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.YEARLY) + .withBillingCycle("Yearly") .withPlanDetails("tbbiaga") .withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z"))) .withOrgCreationSource(OrgCreationSource.LIFTR) diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsVmHostPayloadSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsVmHostPayloadSamples.java index 0a8f98ffe524..4a582262607f 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsVmHostPayloadSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsVmHostPayloadSamples.java @@ -9,7 +9,8 @@ */ public final class MonitorsVmHostPayloadSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_VmHostPayload_MinimumSet_Gen.json */ /** @@ -24,7 +25,8 @@ public static void monitorsVmHostPayloadMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_VmHostPayload_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListSamples.java index 1f94f848d7c1..8d5654e7dcb0 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListSamples.java @@ -9,7 +9,8 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Operations_List_MinimumSet_Gen.json */ /** @@ -23,7 +24,8 @@ public static void operationsListMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Operations_List_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListSamples.java index 99ba2b9bf7f6..8345345266c2 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListSamples.java @@ -9,7 +9,8 @@ */ public final class OrganizationsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Organizations_List_MinimumSet_Gen.json */ /** @@ -23,7 +24,8 @@ public static void organizationsListMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Organizations_List_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListSamples.java index 4d834629fc24..50f79c2e6cb0 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListSamples.java @@ -9,7 +9,8 @@ */ public final class PlansListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Plans_List_MaximumSet_Gen.json */ /** @@ -23,7 +24,8 @@ public final class PlansListSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Plans_List_MinimumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSActivateResourceSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSActivateResourceSamples.java new file mode 100644 index 000000000000..c68827d2fd73 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSActivateResourceSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.resourcemanager.newrelicobservability.models.ActivateSaaSParameterRequest; + +/** + * Samples for SaaS ActivateResource. + */ +public final class SaaSActivateResourceSamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ActivateSaaS. + * json + */ + /** + * Sample code: ActivateSaaS. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void + activateSaaS(com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.saaS() + .activateResourceWithResponse( + new ActivateSaaSParameterRequest().withSaasGuid("00000000-0000-0000-0000-000005430000") + .withPublisherId("publisherId"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateSamples.java index 1b92c64f14a7..de552b583f01 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateSamples.java @@ -18,7 +18,8 @@ */ public final class TagRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_CreateOrUpdate_MaximumSet_Gen.json */ /** @@ -46,7 +47,8 @@ public static void tagRulesCreateOrUpdateMaximumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_CreateOrUpdate_MinimumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteSamples.java index aad10088dbe7..de78b519240c 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class TagRulesDeleteSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Delete_MinimumSet_Gen.json */ /** @@ -25,7 +26,8 @@ public static void tagRulesDeleteMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Delete_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetSamples.java index 5017e02836c5..7d9a4d06c718 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetSamples.java @@ -9,7 +9,8 @@ */ public final class TagRulesGetSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Get_MinimumSet_Gen.json */ /** @@ -25,7 +26,8 @@ public final class TagRulesGetSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Get_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceSamples.java index 23dbdf45b781..9211189ca6b2 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceSamples.java @@ -9,7 +9,8 @@ */ public final class TagRulesListByNewRelicMonitorResourceSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_ListByNewRelicMonitorResource_MinimumSet_Gen.json */ /** @@ -25,7 +26,8 @@ public static void tagRulesListByNewRelicMonitorResourceMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_ListByNewRelicMonitorResource_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesUpdateSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesUpdateSamples.java index 9249ac8a0748..aec8af3d8ac8 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesUpdateSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesUpdateSamples.java @@ -19,7 +19,8 @@ */ public final class TagRulesUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Update_MaximumSet_Gen.json */ /** @@ -49,7 +50,8 @@ public static void tagRulesUpdateMaximumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Update_MinimumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListMockTests.java index ba1c02a87ee5..c8d594e5813a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.AccountResource; @@ -22,21 +22,21 @@ public final class AccountsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"organizationId\":\"bnxknalaulppg\",\"accountId\":\"tpnapnyiropuhpig\",\"accountName\":\"gylgqgitxmedjvcs\",\"region\":\"n\"},\"id\":\"wncwzzhxgktrmg\",\"name\":\"cnapkteoell\",\"type\":\"pt\"}]}"; + = "{\"value\":[{\"properties\":{\"organizationId\":\"pigvpgylgqgitx\",\"accountId\":\"djvcsl\",\"accountName\":\"qwwncw\",\"region\":\"hxg\"},\"id\":\"rmgucnap\",\"name\":\"t\",\"type\":\"oellwp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.accounts().list("iidzyexzne", "ixhnrztf", com.azure.core.util.Context.NONE); + = manager.accounts().list("p", "gdtpnapnyiro", com.azure.core.util.Context.NONE); - Assertions.assertEquals("bnxknalaulppg", response.iterator().next().organizationId()); - Assertions.assertEquals("tpnapnyiropuhpig", response.iterator().next().accountId()); - Assertions.assertEquals("gylgqgitxmedjvcs", response.iterator().next().accountName()); - Assertions.assertEquals("n", response.iterator().next().region()); + Assertions.assertEquals("pigvpgylgqgitx", response.iterator().next().organizationId()); + Assertions.assertEquals("djvcsl", response.iterator().next().accountId()); + Assertions.assertEquals("qwwncw", response.iterator().next().accountName()); + Assertions.assertEquals("hxg", response.iterator().next().region()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ActivateSaaSParameterRequestTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ActivateSaaSParameterRequestTests.java new file mode 100644 index 000000000000..e1ad8e3da2ff --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ActivateSaaSParameterRequestTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.newrelicobservability.models.ActivateSaaSParameterRequest; +import org.junit.jupiter.api.Assertions; + +public final class ActivateSaaSParameterRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActivateSaaSParameterRequest model + = BinaryData.fromString("{\"saasGuid\":\"jozkrwfndiod\",\"publisherId\":\"pslwejdpvw\"}") + .toObject(ActivateSaaSParameterRequest.class); + Assertions.assertEquals("jozkrwfndiod", model.saasGuid()); + Assertions.assertEquals("pslwejdpvw", model.publisherId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ActivateSaaSParameterRequest model + = new ActivateSaaSParameterRequest().withSaasGuid("jozkrwfndiod").withPublisherId("pslwejdpvw"); + model = BinaryData.fromObject(model).toObject(ActivateSaaSParameterRequest.class); + Assertions.assertEquals("jozkrwfndiod", model.saasGuid()); + Assertions.assertEquals("pslwejdpvw", model.publisherId()); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServiceInfoInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServiceInfoInnerTests.java index 631e32632295..bb35fc53b5f9 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServiceInfoInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServiceInfoInnerTests.java @@ -11,22 +11,23 @@ public final class AppServiceInfoInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AppServiceInfoInner model = BinaryData.fromString( - "{\"azureResourceId\":\"zvddntwndeicbtwn\",\"agentVersion\":\"aoqvuh\",\"agentStatus\":\"cffcyddglmj\"}") + AppServiceInfoInner model = BinaryData + .fromString( + "{\"azureResourceId\":\"jbavorxzdm\",\"agentVersion\":\"ctbqvudwx\",\"agentStatus\":\"dnvowg\"}") .toObject(AppServiceInfoInner.class); - Assertions.assertEquals("zvddntwndeicbtwn", model.azureResourceId()); - Assertions.assertEquals("aoqvuh", model.agentVersion()); - Assertions.assertEquals("cffcyddglmj", model.agentStatus()); + Assertions.assertEquals("jbavorxzdm", model.azureResourceId()); + Assertions.assertEquals("ctbqvudwx", model.agentVersion()); + Assertions.assertEquals("dnvowg", model.agentStatus()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AppServiceInfoInner model = new AppServiceInfoInner().withAzureResourceId("zvddntwndeicbtwn") - .withAgentVersion("aoqvuh") - .withAgentStatus("cffcyddglmj"); + AppServiceInfoInner model = new AppServiceInfoInner().withAzureResourceId("jbavorxzdm") + .withAgentVersion("ctbqvudwx") + .withAgentStatus("dnvowg"); model = BinaryData.fromObject(model).toObject(AppServiceInfoInner.class); - Assertions.assertEquals("zvddntwndeicbtwn", model.azureResourceId()); - Assertions.assertEquals("aoqvuh", model.agentVersion()); - Assertions.assertEquals("cffcyddglmj", model.agentStatus()); + Assertions.assertEquals("jbavorxzdm", model.azureResourceId()); + Assertions.assertEquals("ctbqvudwx", model.agentVersion()); + Assertions.assertEquals("dnvowg", model.agentStatus()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesGetRequestTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesGetRequestTests.java index 7db997430b41..1392f1380a2f 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesGetRequestTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesGetRequestTests.java @@ -12,20 +12,20 @@ public final class AppServicesGetRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AppServicesGetRequest model - = BinaryData.fromString("{\"azureResourceIds\":[\"sglumma\",\"tjaodxobnb\"],\"userEmail\":\"xkqpxo\"}") - .toObject(AppServicesGetRequest.class); - Assertions.assertEquals("sglumma", model.azureResourceIds().get(0)); - Assertions.assertEquals("xkqpxo", model.userEmail()); + AppServicesGetRequest model = BinaryData + .fromString("{\"azureResourceIds\":[\"dlwtgrhpdj\",\"jumasx\",\"zj\",\"qyeg\"],\"userEmail\":\"alhbx\"}") + .toObject(AppServicesGetRequest.class); + Assertions.assertEquals("dlwtgrhpdj", model.azureResourceIds().get(0)); + Assertions.assertEquals("alhbx", model.userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AppServicesGetRequest model - = new AppServicesGetRequest().withAzureResourceIds(Arrays.asList("sglumma", "tjaodxobnb")) - .withUserEmail("xkqpxo"); + = new AppServicesGetRequest().withAzureResourceIds(Arrays.asList("dlwtgrhpdj", "jumasx", "zj", "qyeg")) + .withUserEmail("alhbx"); model = BinaryData.fromObject(model).toObject(AppServicesGetRequest.class); - Assertions.assertEquals("sglumma", model.azureResourceIds().get(0)); - Assertions.assertEquals("xkqpxo", model.userEmail()); + Assertions.assertEquals("dlwtgrhpdj", model.azureResourceIds().get(0)); + Assertions.assertEquals("alhbx", model.userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesListResponseTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesListResponseTests.java index 85fc634ed835..bcb6a17e7244 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesListResponseTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesListResponseTests.java @@ -14,32 +14,26 @@ public final class AppServicesListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AppServicesListResponse model = BinaryData.fromString( - "{\"value\":[{\"azureResourceId\":\"ionpimexg\",\"agentVersion\":\"xgcp\",\"agentStatus\":\"gmaajrm\"},{\"azureResourceId\":\"jwzrl\",\"agentVersion\":\"mcl\",\"agentStatus\":\"ijcoejctb\"},{\"azureResourceId\":\"qsqsy\",\"agentVersion\":\"kbfkg\",\"agentStatus\":\"dkexxppofm\"},{\"azureResourceId\":\"x\",\"agentVersion\":\"jpgd\",\"agentStatus\":\"ocjjxhvpmouexh\"}],\"nextLink\":\"xibqeojnx\"}") + "{\"value\":[{\"azureResourceId\":\"jj\",\"agentVersion\":\"v\",\"agentStatus\":\"dgwdslfhot\"},{\"azureResourceId\":\"cynpwlbjnp\",\"agentVersion\":\"cftadeh\",\"agentStatus\":\"ltyfsop\"}],\"nextLink\":\"suesnzw\"}") .toObject(AppServicesListResponse.class); - Assertions.assertEquals("ionpimexg", model.value().get(0).azureResourceId()); - Assertions.assertEquals("xgcp", model.value().get(0).agentVersion()); - Assertions.assertEquals("gmaajrm", model.value().get(0).agentStatus()); - Assertions.assertEquals("xibqeojnx", model.nextLink()); + Assertions.assertEquals("jj", model.value().get(0).azureResourceId()); + Assertions.assertEquals("v", model.value().get(0).agentVersion()); + Assertions.assertEquals("dgwdslfhot", model.value().get(0).agentStatus()); + Assertions.assertEquals("suesnzw", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AppServicesListResponse model = new AppServicesListResponse().withValue(Arrays.asList( - new AppServiceInfoInner().withAzureResourceId("ionpimexg") - .withAgentVersion("xgcp") - .withAgentStatus("gmaajrm"), - new AppServiceInfoInner().withAzureResourceId("jwzrl").withAgentVersion("mcl").withAgentStatus("ijcoejctb"), - new AppServiceInfoInner().withAzureResourceId("qsqsy") - .withAgentVersion("kbfkg") - .withAgentStatus("dkexxppofm"), - new AppServiceInfoInner().withAzureResourceId("x") - .withAgentVersion("jpgd") - .withAgentStatus("ocjjxhvpmouexh"))) - .withNextLink("xibqeojnx"); + new AppServiceInfoInner().withAzureResourceId("jj").withAgentVersion("v").withAgentStatus("dgwdslfhot"), + new AppServiceInfoInner().withAzureResourceId("cynpwlbjnp") + .withAgentVersion("cftadeh") + .withAgentStatus("ltyfsop"))) + .withNextLink("suesnzw"); model = BinaryData.fromObject(model).toObject(AppServicesListResponse.class); - Assertions.assertEquals("ionpimexg", model.value().get(0).azureResourceId()); - Assertions.assertEquals("xgcp", model.value().get(0).agentVersion()); - Assertions.assertEquals("gmaajrm", model.value().get(0).agentStatus()); - Assertions.assertEquals("xibqeojnx", model.nextLink()); + Assertions.assertEquals("jj", model.value().get(0).azureResourceId()); + Assertions.assertEquals("v", model.value().get(0).agentVersion()); + Assertions.assertEquals("dgwdslfhot", model.value().get(0).agentStatus()); + Assertions.assertEquals("suesnzw", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoResponseInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoResponseInnerTests.java index 252ab1418bef..c5a99421fa62 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoResponseInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoResponseInnerTests.java @@ -14,34 +14,39 @@ public final class BillingInfoResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BillingInfoResponseInner model = BinaryData.fromString( - "{\"marketplaceSaasInfo\":{\"marketplaceSubscriptionId\":\"eo\",\"marketplaceSubscriptionName\":\"okeyyienj\",\"marketplaceResourceId\":\"lwtgrhpdj\",\"marketplaceStatus\":\"umasxazjpq\",\"billedAzureSubscriptionId\":\"gual\"},\"partnerBillingEntity\":{\"organizationId\":\"xhejjzzvdud\",\"organizationName\":\"dslfhotwmcy\"}}") + "{\"marketplaceSaasInfo\":{\"marketplaceSubscriptionId\":\"qsycbkbfkgu\",\"marketplaceSubscriptionName\":\"kexxppof\",\"marketplaceResourceId\":\"axcfjpgddtocjjx\",\"marketplaceStatus\":\"pmouexhdz\",\"billedAzureSubscriptionId\":\"bqe\",\"publisherId\":\"nxqbzvddn\",\"offerId\":\"ndei\"},\"partnerBillingEntity\":{\"organizationId\":\"w\",\"organizationName\":\"zao\"}}") .toObject(BillingInfoResponseInner.class); - Assertions.assertEquals("eo", model.marketplaceSaasInfo().marketplaceSubscriptionId()); - Assertions.assertEquals("okeyyienj", model.marketplaceSaasInfo().marketplaceSubscriptionName()); - Assertions.assertEquals("lwtgrhpdj", model.marketplaceSaasInfo().marketplaceResourceId()); - Assertions.assertEquals("umasxazjpq", model.marketplaceSaasInfo().marketplaceStatus()); - Assertions.assertEquals("gual", model.marketplaceSaasInfo().billedAzureSubscriptionId()); - Assertions.assertEquals("xhejjzzvdud", model.partnerBillingEntity().organizationId()); - Assertions.assertEquals("dslfhotwmcy", model.partnerBillingEntity().organizationName()); + Assertions.assertEquals("qsycbkbfkgu", model.marketplaceSaasInfo().marketplaceSubscriptionId()); + Assertions.assertEquals("kexxppof", model.marketplaceSaasInfo().marketplaceSubscriptionName()); + Assertions.assertEquals("axcfjpgddtocjjx", model.marketplaceSaasInfo().marketplaceResourceId()); + Assertions.assertEquals("pmouexhdz", model.marketplaceSaasInfo().marketplaceStatus()); + Assertions.assertEquals("bqe", model.marketplaceSaasInfo().billedAzureSubscriptionId()); + Assertions.assertEquals("nxqbzvddn", model.marketplaceSaasInfo().publisherId()); + Assertions.assertEquals("ndei", model.marketplaceSaasInfo().offerId()); + Assertions.assertEquals("w", model.partnerBillingEntity().organizationId()); + Assertions.assertEquals("zao", model.partnerBillingEntity().organizationName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BillingInfoResponseInner model = new BillingInfoResponseInner() - .withMarketplaceSaasInfo(new MarketplaceSaaSInfo().withMarketplaceSubscriptionId("eo") - .withMarketplaceSubscriptionName("okeyyienj") - .withMarketplaceResourceId("lwtgrhpdj") - .withMarketplaceStatus("umasxazjpq") - .withBilledAzureSubscriptionId("gual")) - .withPartnerBillingEntity( - new PartnerBillingEntity().withOrganizationId("xhejjzzvdud").withOrganizationName("dslfhotwmcy")); + .withMarketplaceSaasInfo(new MarketplaceSaaSInfo().withMarketplaceSubscriptionId("qsycbkbfkgu") + .withMarketplaceSubscriptionName("kexxppof") + .withMarketplaceResourceId("axcfjpgddtocjjx") + .withMarketplaceStatus("pmouexhdz") + .withBilledAzureSubscriptionId("bqe") + .withPublisherId("nxqbzvddn") + .withOfferId("ndei")) + .withPartnerBillingEntity(new PartnerBillingEntity().withOrganizationId("w").withOrganizationName("zao")); model = BinaryData.fromObject(model).toObject(BillingInfoResponseInner.class); - Assertions.assertEquals("eo", model.marketplaceSaasInfo().marketplaceSubscriptionId()); - Assertions.assertEquals("okeyyienj", model.marketplaceSaasInfo().marketplaceSubscriptionName()); - Assertions.assertEquals("lwtgrhpdj", model.marketplaceSaasInfo().marketplaceResourceId()); - Assertions.assertEquals("umasxazjpq", model.marketplaceSaasInfo().marketplaceStatus()); - Assertions.assertEquals("gual", model.marketplaceSaasInfo().billedAzureSubscriptionId()); - Assertions.assertEquals("xhejjzzvdud", model.partnerBillingEntity().organizationId()); - Assertions.assertEquals("dslfhotwmcy", model.partnerBillingEntity().organizationName()); + Assertions.assertEquals("qsycbkbfkgu", model.marketplaceSaasInfo().marketplaceSubscriptionId()); + Assertions.assertEquals("kexxppof", model.marketplaceSaasInfo().marketplaceSubscriptionName()); + Assertions.assertEquals("axcfjpgddtocjjx", model.marketplaceSaasInfo().marketplaceResourceId()); + Assertions.assertEquals("pmouexhdz", model.marketplaceSaasInfo().marketplaceStatus()); + Assertions.assertEquals("bqe", model.marketplaceSaasInfo().billedAzureSubscriptionId()); + Assertions.assertEquals("nxqbzvddn", model.marketplaceSaasInfo().publisherId()); + Assertions.assertEquals("ndei", model.marketplaceSaasInfo().offerId()); + Assertions.assertEquals("w", model.partnerBillingEntity().organizationId()); + Assertions.assertEquals("zao", model.partnerBillingEntity().organizationName()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoesGetWithResponseMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoesGetWithResponseMockTests.java index 3ebe4e42b308..059ac191b71b 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoesGetWithResponseMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoesGetWithResponseMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.BillingInfoResponse; @@ -21,25 +21,27 @@ public final class BillingInfoesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"marketplaceSaasInfo\":{\"marketplaceSubscriptionId\":\"mkcxozapvh\",\"marketplaceSubscriptionName\":\"xprglyatddc\",\"marketplaceResourceId\":\"bcuejrjxgci\",\"marketplaceStatus\":\"brh\",\"billedAzureSubscriptionId\":\"xsdqrhzoymibmrqy\"},\"partnerBillingEntity\":{\"organizationId\":\"hwflu\",\"organizationName\":\"dtmhrkwofyyvoqa\"}}"; + = "{\"marketplaceSaasInfo\":{\"marketplaceSubscriptionId\":\"kallatmel\",\"marketplaceSubscriptionName\":\"ipicc\",\"marketplaceResourceId\":\"kzivgvvcnayrh\",\"marketplaceStatus\":\"nxxmueedndrdv\",\"billedAzureSubscriptionId\":\"kwqqtchealmf\",\"publisherId\":\"d\",\"offerId\":\"ygdvwv\"},\"partnerBillingEntity\":{\"organizationId\":\"ohgwxrtfudxepxg\",\"organizationName\":\"agvrvmnpkuk\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BillingInfoResponse response = manager.billingInfoes() - .getWithResponse("gkopkwhojvpajqgx", "smocmbq", com.azure.core.util.Context.NONE) + .getWithResponse("oocrkvcikhnv", "amqgxqquezikyw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("mkcxozapvh", response.marketplaceSaasInfo().marketplaceSubscriptionId()); - Assertions.assertEquals("xprglyatddc", response.marketplaceSaasInfo().marketplaceSubscriptionName()); - Assertions.assertEquals("bcuejrjxgci", response.marketplaceSaasInfo().marketplaceResourceId()); - Assertions.assertEquals("brh", response.marketplaceSaasInfo().marketplaceStatus()); - Assertions.assertEquals("xsdqrhzoymibmrqy", response.marketplaceSaasInfo().billedAzureSubscriptionId()); - Assertions.assertEquals("hwflu", response.partnerBillingEntity().organizationId()); - Assertions.assertEquals("dtmhrkwofyyvoqa", response.partnerBillingEntity().organizationName()); + Assertions.assertEquals("kallatmel", response.marketplaceSaasInfo().marketplaceSubscriptionId()); + Assertions.assertEquals("ipicc", response.marketplaceSaasInfo().marketplaceSubscriptionName()); + Assertions.assertEquals("kzivgvvcnayrh", response.marketplaceSaasInfo().marketplaceResourceId()); + Assertions.assertEquals("nxxmueedndrdv", response.marketplaceSaasInfo().marketplaceStatus()); + Assertions.assertEquals("kwqqtchealmf", response.marketplaceSaasInfo().billedAzureSubscriptionId()); + Assertions.assertEquals("d", response.marketplaceSaasInfo().publisherId()); + Assertions.assertEquals("ygdvwv", response.marketplaceSaasInfo().offerId()); + Assertions.assertEquals("ohgwxrtfudxepxg", response.partnerBillingEntity().organizationId()); + Assertions.assertEquals("agvrvmnpkuk", response.partnerBillingEntity().organizationName()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcePropertiesTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcePropertiesTests.java index 78a5f626f134..2ec0c46766b0 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcePropertiesTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcePropertiesTests.java @@ -12,25 +12,24 @@ public final class ConnectedPartnerResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConnectedPartnerResourceProperties model = BinaryData.fromString( - "{\"accountName\":\"agfuaxbezyiu\",\"accountId\":\"ktwh\",\"azureResourceId\":\"xw\",\"location\":\"wqsmbsur\"}") + "{\"accountName\":\"czvyifq\",\"accountId\":\"kdvjsll\",\"azureResourceId\":\"vvdfwatkpnpul\",\"location\":\"xbczwtruwiqz\"}") .toObject(ConnectedPartnerResourceProperties.class); - Assertions.assertEquals("agfuaxbezyiu", model.accountName()); - Assertions.assertEquals("ktwh", model.accountId()); - Assertions.assertEquals("xw", model.azureResourceId()); - Assertions.assertEquals("wqsmbsur", model.location()); + Assertions.assertEquals("czvyifq", model.accountName()); + Assertions.assertEquals("kdvjsll", model.accountId()); + Assertions.assertEquals("vvdfwatkpnpul", model.azureResourceId()); + Assertions.assertEquals("xbczwtruwiqz", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConnectedPartnerResourceProperties model - = new ConnectedPartnerResourceProperties().withAccountName("agfuaxbezyiu") - .withAccountId("ktwh") - .withAzureResourceId("xw") - .withLocation("wqsmbsur"); + ConnectedPartnerResourceProperties model = new ConnectedPartnerResourceProperties().withAccountName("czvyifq") + .withAccountId("kdvjsll") + .withAzureResourceId("vvdfwatkpnpul") + .withLocation("xbczwtruwiqz"); model = BinaryData.fromObject(model).toObject(ConnectedPartnerResourceProperties.class); - Assertions.assertEquals("agfuaxbezyiu", model.accountName()); - Assertions.assertEquals("ktwh", model.accountId()); - Assertions.assertEquals("xw", model.azureResourceId()); - Assertions.assertEquals("wqsmbsur", model.location()); + Assertions.assertEquals("czvyifq", model.accountName()); + Assertions.assertEquals("kdvjsll", model.accountId()); + Assertions.assertEquals("vvdfwatkpnpul", model.azureResourceId()); + Assertions.assertEquals("xbczwtruwiqz", model.location()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListFormatInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListFormatInnerTests.java index 2098027dad22..01addb99f688 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListFormatInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListFormatInnerTests.java @@ -13,25 +13,25 @@ public final class ConnectedPartnerResourcesListFormatInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConnectedPartnerResourcesListFormatInner model = BinaryData.fromString( - "{\"properties\":{\"accountName\":\"eupfhyhltrpm\",\"accountId\":\"jmcmatuokthfu\",\"azureResourceId\":\"aodsfcpkv\",\"location\":\"dpuozmyz\"}}") + "{\"properties\":{\"accountName\":\"reximoryocfs\",\"accountId\":\"s\",\"azureResourceId\":\"ddystkiiuxhqy\",\"location\":\"xorrqnb\"}}") .toObject(ConnectedPartnerResourcesListFormatInner.class); - Assertions.assertEquals("eupfhyhltrpm", model.properties().accountName()); - Assertions.assertEquals("jmcmatuokthfu", model.properties().accountId()); - Assertions.assertEquals("aodsfcpkv", model.properties().azureResourceId()); - Assertions.assertEquals("dpuozmyz", model.properties().location()); + Assertions.assertEquals("reximoryocfs", model.properties().accountName()); + Assertions.assertEquals("s", model.properties().accountId()); + Assertions.assertEquals("ddystkiiuxhqy", model.properties().azureResourceId()); + Assertions.assertEquals("xorrqnb", model.properties().location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ConnectedPartnerResourcesListFormatInner model = new ConnectedPartnerResourcesListFormatInner() - .withProperties(new ConnectedPartnerResourceProperties().withAccountName("eupfhyhltrpm") - .withAccountId("jmcmatuokthfu") - .withAzureResourceId("aodsfcpkv") - .withLocation("dpuozmyz")); + .withProperties(new ConnectedPartnerResourceProperties().withAccountName("reximoryocfs") + .withAccountId("s") + .withAzureResourceId("ddystkiiuxhqy") + .withLocation("xorrqnb")); model = BinaryData.fromObject(model).toObject(ConnectedPartnerResourcesListFormatInner.class); - Assertions.assertEquals("eupfhyhltrpm", model.properties().accountName()); - Assertions.assertEquals("jmcmatuokthfu", model.properties().accountId()); - Assertions.assertEquals("aodsfcpkv", model.properties().azureResourceId()); - Assertions.assertEquals("dpuozmyz", model.properties().location()); + Assertions.assertEquals("reximoryocfs", model.properties().accountName()); + Assertions.assertEquals("s", model.properties().accountId()); + Assertions.assertEquals("ddystkiiuxhqy", model.properties().azureResourceId()); + Assertions.assertEquals("xorrqnb", model.properties().location()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListMockTests.java index 7a755063b322..b1b43e0a4fd2 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.ConnectedPartnerResourcesListFormat; @@ -22,21 +22,21 @@ public final class ConnectedPartnerResourcesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"accountName\":\"nqxwbp\",\"accountId\":\"ulpiuj\",\"azureResourceId\":\"asipqiio\",\"location\":\"uqerpqlpqwc\"}}]}"; + = "{\"value\":[{\"properties\":{\"accountName\":\"zk\",\"accountId\":\"oqreyfkzikfjawn\",\"azureResourceId\":\"ivx\",\"location\":\"zel\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.connectedPartnerResources() - .list("piexpbtgiw", "wo", "nwashrtd", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.connectedPartnerResources().list("himdbl", "gwimfn", "hfjx", com.azure.core.util.Context.NONE); - Assertions.assertEquals("nqxwbp", response.iterator().next().properties().accountName()); - Assertions.assertEquals("ulpiuj", response.iterator().next().properties().accountId()); - Assertions.assertEquals("asipqiio", response.iterator().next().properties().azureResourceId()); - Assertions.assertEquals("uqerpqlpqwc", response.iterator().next().properties().location()); + Assertions.assertEquals("zk", response.iterator().next().properties().accountName()); + Assertions.assertEquals("oqreyfkzikfjawn", response.iterator().next().properties().accountId()); + Assertions.assertEquals("ivx", response.iterator().next().properties().azureResourceId()); + Assertions.assertEquals("zel", response.iterator().next().properties().location()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListResponseTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListResponseTests.java index 0050e646ca84..8dd9495863c5 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListResponseTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListResponseTests.java @@ -15,13 +15,13 @@ public final class ConnectedPartnerResourcesListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConnectedPartnerResourcesListResponse model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"accountName\":\"ggd\",\"accountId\":\"ixhbkuofqweykhm\",\"azureResourceId\":\"evfyexfwhybcib\",\"location\":\"vdcsitynn\"}},{\"properties\":{\"accountName\":\"dectehfiqsc\",\"accountId\":\"ypvhezrkg\",\"azureResourceId\":\"c\",\"location\":\"efovgmk\"}},{\"properties\":{\"accountName\":\"eyyvxyqjpkcat\",\"accountId\":\"ngj\",\"azureResourceId\":\"cczsq\",\"location\":\"hvmdajvnysounq\"}}],\"nextLink\":\"a\"}") + "{\"value\":[{\"properties\":{\"accountName\":\"gwdkcglhsl\",\"accountId\":\"jdyggdtji\",\"azureResourceId\":\"b\",\"location\":\"ofqweykhmenevfye\"}},{\"properties\":{\"accountName\":\"hybcibv\",\"accountId\":\"dcsi\",\"azureResourceId\":\"nnaamdectehfiqsc\",\"location\":\"ypvhezrkg\"}},{\"properties\":{\"accountName\":\"jrefovgmkqsle\",\"accountId\":\"vxyqjpkcattpngjc\",\"azureResourceId\":\"czsqpjhvm\",\"location\":\"jvnysounqe\"}},{\"properties\":{\"accountName\":\"oaeupfhyhltrpmo\",\"accountId\":\"mcmatuokthfuiu\",\"azureResourceId\":\"dsfcpkvxodpuoz\",\"location\":\"zydagfuaxbezyiuo\"}}],\"nextLink\":\"twhrdxwzywqsm\"}") .toObject(ConnectedPartnerResourcesListResponse.class); - Assertions.assertEquals("ggd", model.value().get(0).properties().accountName()); - Assertions.assertEquals("ixhbkuofqweykhm", model.value().get(0).properties().accountId()); - Assertions.assertEquals("evfyexfwhybcib", model.value().get(0).properties().azureResourceId()); - Assertions.assertEquals("vdcsitynn", model.value().get(0).properties().location()); - Assertions.assertEquals("a", model.nextLink()); + Assertions.assertEquals("gwdkcglhsl", model.value().get(0).properties().accountName()); + Assertions.assertEquals("jdyggdtji", model.value().get(0).properties().accountId()); + Assertions.assertEquals("b", model.value().get(0).properties().azureResourceId()); + Assertions.assertEquals("ofqweykhmenevfye", model.value().get(0).properties().location()); + Assertions.assertEquals("twhrdxwzywqsm", model.nextLink()); } @org.junit.jupiter.api.Test @@ -29,26 +29,31 @@ public void testSerialize() throws Exception { ConnectedPartnerResourcesListResponse model = new ConnectedPartnerResourcesListResponse().withValue(Arrays.asList( new ConnectedPartnerResourcesListFormatInner() - .withProperties(new ConnectedPartnerResourceProperties().withAccountName("ggd") - .withAccountId("ixhbkuofqweykhm") - .withAzureResourceId("evfyexfwhybcib") - .withLocation("vdcsitynn")), + .withProperties(new ConnectedPartnerResourceProperties().withAccountName("gwdkcglhsl") + .withAccountId("jdyggdtji") + .withAzureResourceId("b") + .withLocation("ofqweykhmenevfye")), new ConnectedPartnerResourcesListFormatInner() - .withProperties(new ConnectedPartnerResourceProperties().withAccountName("dectehfiqsc") - .withAccountId("ypvhezrkg") - .withAzureResourceId("c") - .withLocation("efovgmk")), + .withProperties(new ConnectedPartnerResourceProperties().withAccountName("hybcibv") + .withAccountId("dcsi") + .withAzureResourceId("nnaamdectehfiqsc") + .withLocation("ypvhezrkg")), new ConnectedPartnerResourcesListFormatInner() - .withProperties(new ConnectedPartnerResourceProperties().withAccountName("eyyvxyqjpkcat") - .withAccountId("ngj") - .withAzureResourceId("cczsq") - .withLocation("hvmdajvnysounq")))) - .withNextLink("a"); + .withProperties(new ConnectedPartnerResourceProperties().withAccountName("jrefovgmkqsle") + .withAccountId("vxyqjpkcattpngjc") + .withAzureResourceId("czsqpjhvm") + .withLocation("jvnysounqe")), + new ConnectedPartnerResourcesListFormatInner() + .withProperties(new ConnectedPartnerResourceProperties().withAccountName("oaeupfhyhltrpmo") + .withAccountId("mcmatuokthfuiu") + .withAzureResourceId("dsfcpkvxodpuoz") + .withLocation("zydagfuaxbezyiuo")))) + .withNextLink("twhrdxwzywqsm"); model = BinaryData.fromObject(model).toObject(ConnectedPartnerResourcesListResponse.class); - Assertions.assertEquals("ggd", model.value().get(0).properties().accountName()); - Assertions.assertEquals("ixhbkuofqweykhm", model.value().get(0).properties().accountId()); - Assertions.assertEquals("evfyexfwhybcib", model.value().get(0).properties().azureResourceId()); - Assertions.assertEquals("vdcsitynn", model.value().get(0).properties().location()); - Assertions.assertEquals("a", model.nextLink()); + Assertions.assertEquals("gwdkcglhsl", model.value().get(0).properties().accountName()); + Assertions.assertEquals("jdyggdtji", model.value().get(0).properties().accountId()); + Assertions.assertEquals("b", model.value().get(0).properties().azureResourceId()); + Assertions.assertEquals("ofqweykhmenevfye", model.value().get(0).properties().location()); + Assertions.assertEquals("twhrdxwzywqsm", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/FilteringTagTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/FilteringTagTests.java index fb4a30587bf4..915dd5652e3e 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/FilteringTagTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/FilteringTagTests.java @@ -12,19 +12,22 @@ public final class FilteringTagTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FilteringTag model = BinaryData.fromString("{\"name\":\"ajzyul\",\"value\":\"u\",\"action\":\"Exclude\"}") + FilteringTag model = BinaryData + .fromString("{\"name\":\"xlzevgbmqjqabcy\",\"value\":\"ivkwlzuvccfwnfnb\",\"action\":\"Include\"}") .toObject(FilteringTag.class); - Assertions.assertEquals("ajzyul", model.name()); - Assertions.assertEquals("u", model.value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.action()); + Assertions.assertEquals("xlzevgbmqjqabcy", model.name()); + Assertions.assertEquals("ivkwlzuvccfwnfnb", model.value()); + Assertions.assertEquals(TagAction.INCLUDE, model.action()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FilteringTag model = new FilteringTag().withName("ajzyul").withValue("u").withAction(TagAction.EXCLUDE); + FilteringTag model = new FilteringTag().withName("xlzevgbmqjqabcy") + .withValue("ivkwlzuvccfwnfnb") + .withAction(TagAction.INCLUDE); model = BinaryData.fromObject(model).toObject(FilteringTag.class); - Assertions.assertEquals("ajzyul", model.name()); - Assertions.assertEquals("u", model.value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.action()); + Assertions.assertEquals("xlzevgbmqjqabcy", model.name()); + Assertions.assertEquals("ivkwlzuvccfwnfnb", model.value()); + Assertions.assertEquals(TagAction.INCLUDE, model.action()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/HostsGetRequestTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/HostsGetRequestTests.java index 2dc98d1789da..21ab3b528813 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/HostsGetRequestTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/HostsGetRequestTests.java @@ -12,18 +12,17 @@ public final class HostsGetRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - HostsGetRequest model = BinaryData.fromString("{\"vmIds\":[\"uhrzayvvt\"],\"userEmail\":\"gvdfgiotkftutq\"}") + HostsGetRequest model = BinaryData.fromString("{\"vmIds\":[\"vsovmyokac\"],\"userEmail\":\"pkwlhz\"}") .toObject(HostsGetRequest.class); - Assertions.assertEquals("uhrzayvvt", model.vmIds().get(0)); - Assertions.assertEquals("gvdfgiotkftutq", model.userEmail()); + Assertions.assertEquals("vsovmyokac", model.vmIds().get(0)); + Assertions.assertEquals("pkwlhz", model.userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HostsGetRequest model - = new HostsGetRequest().withVmIds(Arrays.asList("uhrzayvvt")).withUserEmail("gvdfgiotkftutq"); + HostsGetRequest model = new HostsGetRequest().withVmIds(Arrays.asList("vsovmyokac")).withUserEmail("pkwlhz"); model = BinaryData.fromObject(model).toObject(HostsGetRequest.class); - Assertions.assertEquals("uhrzayvvt", model.vmIds().get(0)); - Assertions.assertEquals("gvdfgiotkftutq", model.userEmail()); + Assertions.assertEquals("vsovmyokac", model.vmIds().get(0)); + Assertions.assertEquals("pkwlhz", model.userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LatestLinkedSaaSResponseInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LatestLinkedSaaSResponseInnerTests.java new file mode 100644 index 000000000000..570f0927999f --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LatestLinkedSaaSResponseInnerTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.newrelicobservability.fluent.models.LatestLinkedSaaSResponseInner; +import org.junit.jupiter.api.Assertions; + +public final class LatestLinkedSaaSResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LatestLinkedSaaSResponseInner model + = BinaryData.fromString("{\"saaSResourceId\":\"lokeyy\",\"isHiddenSaaS\":false}") + .toObject(LatestLinkedSaaSResponseInner.class); + Assertions.assertEquals("lokeyy", model.saaSResourceId()); + Assertions.assertFalse(model.isHiddenSaaS()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LatestLinkedSaaSResponseInner model + = new LatestLinkedSaaSResponseInner().withSaaSResourceId("lokeyy").withIsHiddenSaaS(false); + model = BinaryData.fromObject(model).toObject(LatestLinkedSaaSResponseInner.class); + Assertions.assertEquals("lokeyy", model.saaSResourceId()); + Assertions.assertFalse(model.isHiddenSaaS()); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LinkedResourceInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LinkedResourceInnerTests.java index b66a3d9a7dfc..a6db944eaa3b 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LinkedResourceInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LinkedResourceInnerTests.java @@ -11,14 +11,14 @@ public final class LinkedResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LinkedResourceInner model = BinaryData.fromString("{\"id\":\"hkfpbs\"}").toObject(LinkedResourceInner.class); - Assertions.assertEquals("hkfpbs", model.id()); + LinkedResourceInner model = BinaryData.fromString("{\"id\":\"gygev\"}").toObject(LinkedResourceInner.class); + Assertions.assertEquals("gygev", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LinkedResourceInner model = new LinkedResourceInner().withId("hkfpbs"); + LinkedResourceInner model = new LinkedResourceInner().withId("gygev"); model = BinaryData.fromObject(model).toObject(LinkedResourceInner.class); - Assertions.assertEquals("hkfpbs", model.id()); + Assertions.assertEquals("gygev", model.id()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LinkedResourceListResponseTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LinkedResourceListResponseTests.java index 9f573a57da3f..6feb3e598b0e 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LinkedResourceListResponseTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LinkedResourceListResponseTests.java @@ -14,20 +14,20 @@ public final class LinkedResourceListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LinkedResourceListResponse model = BinaryData.fromString( - "{\"value\":[{\"id\":\"ovawjvzunlu\"},{\"id\":\"nnprn\"},{\"id\":\"peilpjzuaejxdu\"},{\"id\":\"skzbb\"}],\"nextLink\":\"zumveekgpwo\"}") + "{\"value\":[{\"id\":\"rvjx\"},{\"id\":\"nspydptkoenkoukn\"},{\"id\":\"dwtiukbldngkp\"}],\"nextLink\":\"ipazyxoegukgjnpi\"}") .toObject(LinkedResourceListResponse.class); - Assertions.assertEquals("ovawjvzunlu", model.value().get(0).id()); - Assertions.assertEquals("zumveekgpwo", model.nextLink()); + Assertions.assertEquals("rvjx", model.value().get(0).id()); + Assertions.assertEquals("ipazyxoegukgjnpi", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LinkedResourceListResponse model = new LinkedResourceListResponse().withValue( - Arrays.asList(new LinkedResourceInner().withId("ovawjvzunlu"), new LinkedResourceInner().withId("nnprn"), - new LinkedResourceInner().withId("peilpjzuaejxdu"), new LinkedResourceInner().withId("skzbb"))) - .withNextLink("zumveekgpwo"); + LinkedResourceListResponse model + = new LinkedResourceListResponse().withValue(Arrays.asList(new LinkedResourceInner().withId("rvjx"), + new LinkedResourceInner().withId("nspydptkoenkoukn"), + new LinkedResourceInner().withId("dwtiukbldngkp"))).withNextLink("ipazyxoegukgjnpi"); model = BinaryData.fromObject(model).toObject(LinkedResourceListResponse.class); - Assertions.assertEquals("ovawjvzunlu", model.value().get(0).id()); - Assertions.assertEquals("zumveekgpwo", model.nextLink()); + Assertions.assertEquals("rvjx", model.value().get(0).id()); + Assertions.assertEquals("ipazyxoegukgjnpi", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LogRulesTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LogRulesTests.java index aa0ce282df42..e5cea768f784 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LogRulesTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LogRulesTests.java @@ -18,33 +18,29 @@ public final class LogRulesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LogRules model = BinaryData.fromString( - "{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"cohoq\",\"value\":\"wvl\",\"action\":\"Exclude\"},{\"name\":\"w\",\"value\":\"eun\",\"action\":\"Exclude\"},{\"name\":\"gyxzk\",\"value\":\"ocukoklyax\",\"action\":\"Include\"},{\"name\":\"uqszfk\",\"value\":\"ypewrmjmwvvjekt\",\"action\":\"Include\"}]}") + "{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"lpvlopw\",\"value\":\"ighxpk\",\"action\":\"Include\"}]}") .toObject(LogRules.class); Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.sendAadLogs()); Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.sendActivityLogs()); - Assertions.assertEquals("cohoq", model.filteringTags().get(0).name()); - Assertions.assertEquals("wvl", model.filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.filteringTags().get(0).action()); + Assertions.assertEquals("lpvlopw", model.filteringTags().get(0).name()); + Assertions.assertEquals("ighxpk", model.filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.filteringTags().get(0).action()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LogRules model - = new LogRules().withSendAadLogs(SendAadLogsStatus.DISABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) - .withSendActivityLogs(SendActivityLogsStatus.ENABLED) - .withFilteringTags(Arrays.asList( - new FilteringTag().withName("cohoq").withValue("wvl").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("w").withValue("eun").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("gyxzk").withValue("ocukoklyax").withAction(TagAction.INCLUDE), - new FilteringTag().withName("uqszfk").withValue("ypewrmjmwvvjekt").withAction(TagAction.INCLUDE))); + LogRules model = new LogRules().withSendAadLogs(SendAadLogsStatus.DISABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) + .withSendActivityLogs(SendActivityLogsStatus.ENABLED) + .withFilteringTags(Arrays + .asList(new FilteringTag().withName("lpvlopw").withValue("ighxpk").withAction(TagAction.INCLUDE))); model = BinaryData.fromObject(model).toObject(LogRules.class); Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.sendAadLogs()); Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.sendActivityLogs()); - Assertions.assertEquals("cohoq", model.filteringTags().get(0).name()); - Assertions.assertEquals("wvl", model.filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.filteringTags().get(0).action()); + Assertions.assertEquals("lpvlopw", model.filteringTags().get(0).name()); + Assertions.assertEquals("ighxpk", model.filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.filteringTags().get(0).action()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ManagedServiceIdentityTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ManagedServiceIdentityTests.java index 708b84daff54..15a8b4676018 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ManagedServiceIdentityTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ManagedServiceIdentityTests.java @@ -16,18 +16,20 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"75fdddf1-34ed-403d-a999-eec88656d385\",\"tenantId\":\"cb80e5fd-eeda-441a-9d44-7f1c05d10843\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ouskcqvkocrc\":{\"principalId\":\"836ffa5f-e375-4881-a6a8-acd28aed400d\",\"clientId\":\"22362e8c-fd72-46b4-a17a-7f7f0bee706b\"},\"wtnhxbnjbiksqr\":{\"principalId\":\"a007c039-a4df-48d8-b027-7bd359606dab\",\"clientId\":\"5556f777-4590-42f3-bab6-93752d3cb33a\"}}}") + "{\"principalId\":\"3859c678-22ca-4169-99be-588188ce673a\",\"tenantId\":\"c4207531-7bbd-4851-a4f7-b7dde05019f0\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"gphuticndvka\":{\"principalId\":\"f8db801d-7e2f-46ca-aad1-a772e171f766\",\"clientId\":\"d9a49088-f6b0-47c6-815d-c19a1d12c699\"},\"yiftyhxhuro\":{\"principalId\":\"45af7d1d-0093-40cd-a434-0642bfc87518\",\"clientId\":\"80a186a0-5d2b-4bde-ae09-25c2113a5165\"},\"yxolniwp\":{\"principalId\":\"3eb4b09a-5f2b-443a-b283-2c4ad2d3df33\",\"clientId\":\"d58e40ae-c8ae-46a3-adce-9f35a9f6ed21\"},\"kjfkg\":{\"principalId\":\"3c0635ef-ff91-491d-8a73-87ebee31d842\",\"clientId\":\"a0527428-cad5-4fc3-91b4-fa1cd5ed9bad\"}}}") .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("ouskcqvkocrc", new UserAssignedIdentity(), "wtnhxbnjbiksqr", new UserAssignedIdentity())); + ManagedServiceIdentity model + = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf("gphuticndvka", new UserAssignedIdentity(), "yiftyhxhuro", new UserAssignedIdentity(), + "yxolniwp", new UserAssignedIdentity(), "kjfkg", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } // Use "Map.of" if available diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MarketplaceSaaSInfoTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MarketplaceSaaSInfoTests.java index df3fd2aa3011..b6abe976dacd 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MarketplaceSaaSInfoTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MarketplaceSaaSInfoTests.java @@ -12,27 +12,33 @@ public final class MarketplaceSaaSInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MarketplaceSaaSInfo model = BinaryData.fromString( - "{\"marketplaceSubscriptionId\":\"wlbjnpgacftade\",\"marketplaceSubscriptionName\":\"nltyfsoppusuesnz\",\"marketplaceResourceId\":\"ej\",\"marketplaceStatus\":\"vorxzdmohct\",\"billedAzureSubscriptionId\":\"vudwx\"}") + "{\"marketplaceSubscriptionId\":\"uhrhcffcyddgl\",\"marketplaceSubscriptionName\":\"t\",\"marketplaceResourceId\":\"qkwpyeicxmqc\",\"marketplaceStatus\":\"q\",\"billedAzureSubscriptionId\":\"khixuigdtopbo\",\"publisherId\":\"og\",\"offerId\":\"e\"}") .toObject(MarketplaceSaaSInfo.class); - Assertions.assertEquals("wlbjnpgacftade", model.marketplaceSubscriptionId()); - Assertions.assertEquals("nltyfsoppusuesnz", model.marketplaceSubscriptionName()); - Assertions.assertEquals("ej", model.marketplaceResourceId()); - Assertions.assertEquals("vorxzdmohct", model.marketplaceStatus()); - Assertions.assertEquals("vudwx", model.billedAzureSubscriptionId()); + Assertions.assertEquals("uhrhcffcyddgl", model.marketplaceSubscriptionId()); + Assertions.assertEquals("t", model.marketplaceSubscriptionName()); + Assertions.assertEquals("qkwpyeicxmqc", model.marketplaceResourceId()); + Assertions.assertEquals("q", model.marketplaceStatus()); + Assertions.assertEquals("khixuigdtopbo", model.billedAzureSubscriptionId()); + Assertions.assertEquals("og", model.publisherId()); + Assertions.assertEquals("e", model.offerId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MarketplaceSaaSInfo model = new MarketplaceSaaSInfo().withMarketplaceSubscriptionId("wlbjnpgacftade") - .withMarketplaceSubscriptionName("nltyfsoppusuesnz") - .withMarketplaceResourceId("ej") - .withMarketplaceStatus("vorxzdmohct") - .withBilledAzureSubscriptionId("vudwx"); + MarketplaceSaaSInfo model = new MarketplaceSaaSInfo().withMarketplaceSubscriptionId("uhrhcffcyddgl") + .withMarketplaceSubscriptionName("t") + .withMarketplaceResourceId("qkwpyeicxmqc") + .withMarketplaceStatus("q") + .withBilledAzureSubscriptionId("khixuigdtopbo") + .withPublisherId("og") + .withOfferId("e"); model = BinaryData.fromObject(model).toObject(MarketplaceSaaSInfo.class); - Assertions.assertEquals("wlbjnpgacftade", model.marketplaceSubscriptionId()); - Assertions.assertEquals("nltyfsoppusuesnz", model.marketplaceSubscriptionName()); - Assertions.assertEquals("ej", model.marketplaceResourceId()); - Assertions.assertEquals("vorxzdmohct", model.marketplaceStatus()); - Assertions.assertEquals("vudwx", model.billedAzureSubscriptionId()); + Assertions.assertEquals("uhrhcffcyddgl", model.marketplaceSubscriptionId()); + Assertions.assertEquals("t", model.marketplaceSubscriptionName()); + Assertions.assertEquals("qkwpyeicxmqc", model.marketplaceResourceId()); + Assertions.assertEquals("q", model.marketplaceStatus()); + Assertions.assertEquals("khixuigdtopbo", model.billedAzureSubscriptionId()); + Assertions.assertEquals("og", model.publisherId()); + Assertions.assertEquals("e", model.offerId()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricRulesInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricRulesInnerTests.java index afcb03cd0f1e..931bcdc9c605 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricRulesInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricRulesInnerTests.java @@ -16,28 +16,30 @@ public final class MetricRulesInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MetricRulesInner model = BinaryData.fromString( - "{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"dsoifiyipj\",\"value\":\"qwpgrjbzn\",\"action\":\"Exclude\"},{\"name\":\"xv\",\"value\":\"byxqabn\",\"action\":\"Include\"},{\"name\":\"cyshurzafbljjgp\",\"value\":\"oq\",\"action\":\"Include\"}],\"userEmail\":\"ljavbqid\"}") + "{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"efgugnxk\",\"value\":\"dqmidtt\",\"action\":\"Include\"},{\"name\":\"qdrabhjybigehoqf\",\"value\":\"wska\",\"action\":\"Exclude\"},{\"name\":\"zlcuiywgqywgndrv\",\"value\":\"hzgpphrcgyncocpe\",\"action\":\"Include\"}],\"userEmail\":\"mcoo\"}") .toObject(MetricRulesInner.class); - Assertions.assertEquals(SendMetricsStatus.ENABLED, model.sendMetrics()); - Assertions.assertEquals("dsoifiyipj", model.filteringTags().get(0).name()); - Assertions.assertEquals("qwpgrjbzn", model.filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.filteringTags().get(0).action()); - Assertions.assertEquals("ljavbqid", model.userEmail()); + Assertions.assertEquals(SendMetricsStatus.DISABLED, model.sendMetrics()); + Assertions.assertEquals("efgugnxk", model.filteringTags().get(0).name()); + Assertions.assertEquals("dqmidtt", model.filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.filteringTags().get(0).action()); + Assertions.assertEquals("mcoo", model.userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MetricRulesInner model = new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) + MetricRulesInner model = new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) .withFilteringTags(Arrays.asList( - new FilteringTag().withName("dsoifiyipj").withValue("qwpgrjbzn").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("xv").withValue("byxqabn").withAction(TagAction.INCLUDE), - new FilteringTag().withName("cyshurzafbljjgp").withValue("oq").withAction(TagAction.INCLUDE))) - .withUserEmail("ljavbqid"); + new FilteringTag().withName("efgugnxk").withValue("dqmidtt").withAction(TagAction.INCLUDE), + new FilteringTag().withName("qdrabhjybigehoqf").withValue("wska").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("zlcuiywgqywgndrv") + .withValue("hzgpphrcgyncocpe") + .withAction(TagAction.INCLUDE))) + .withUserEmail("mcoo"); model = BinaryData.fromObject(model).toObject(MetricRulesInner.class); - Assertions.assertEquals(SendMetricsStatus.ENABLED, model.sendMetrics()); - Assertions.assertEquals("dsoifiyipj", model.filteringTags().get(0).name()); - Assertions.assertEquals("qwpgrjbzn", model.filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.filteringTags().get(0).action()); - Assertions.assertEquals("ljavbqid", model.userEmail()); + Assertions.assertEquals(SendMetricsStatus.DISABLED, model.sendMetrics()); + Assertions.assertEquals("efgugnxk", model.filteringTags().get(0).name()); + Assertions.assertEquals("dqmidtt", model.filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.filteringTags().get(0).action()); + Assertions.assertEquals("mcoo", model.userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsRequestTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsRequestTests.java index 01a90ad8d6ed..2a18f02d2da7 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsRequestTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsRequestTests.java @@ -12,14 +12,14 @@ public final class MetricsRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MetricsRequest model - = BinaryData.fromString("{\"userEmail\":\"rsoodqxhcrmnoh\"}").toObject(MetricsRequest.class); - Assertions.assertEquals("rsoodqxhcrmnoh", model.userEmail()); + = BinaryData.fromString("{\"userEmail\":\"gvdfgiotkftutq\"}").toObject(MetricsRequest.class); + Assertions.assertEquals("gvdfgiotkftutq", model.userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MetricsRequest model = new MetricsRequest().withUserEmail("rsoodqxhcrmnoh"); + MetricsRequest model = new MetricsRequest().withUserEmail("gvdfgiotkftutq"); model = BinaryData.fromObject(model).toObject(MetricsRequest.class); - Assertions.assertEquals("rsoodqxhcrmnoh", model.userEmail()); + Assertions.assertEquals("gvdfgiotkftutq", model.userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusRequestTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusRequestTests.java index 736ace07e176..5af6ebb19117 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusRequestTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusRequestTests.java @@ -12,19 +12,20 @@ public final class MetricsStatusRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MetricsStatusRequest model - = BinaryData.fromString("{\"azureResourceIds\":[\"khbzhfepgzg\",\"e\"],\"userEmail\":\"zloc\"}") - .toObject(MetricsStatusRequest.class); - Assertions.assertEquals("khbzhfepgzg", model.azureResourceIds().get(0)); - Assertions.assertEquals("zloc", model.userEmail()); + MetricsStatusRequest model = BinaryData.fromString( + "{\"azureResourceIds\":[\"nlebxetqgtzxd\",\"nqbqqwxr\",\"feallnwsu\",\"isnjampmngnz\"],\"userEmail\":\"c\"}") + .toObject(MetricsStatusRequest.class); + Assertions.assertEquals("nlebxetqgtzxd", model.azureResourceIds().get(0)); + Assertions.assertEquals("c", model.userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MetricsStatusRequest model - = new MetricsStatusRequest().withAzureResourceIds(Arrays.asList("khbzhfepgzg", "e")).withUserEmail("zloc"); + MetricsStatusRequest model = new MetricsStatusRequest() + .withAzureResourceIds(Arrays.asList("nlebxetqgtzxd", "nqbqqwxr", "feallnwsu", "isnjampmngnz")) + .withUserEmail("c"); model = BinaryData.fromObject(model).toObject(MetricsStatusRequest.class); - Assertions.assertEquals("khbzhfepgzg", model.azureResourceIds().get(0)); - Assertions.assertEquals("zloc", model.userEmail()); + Assertions.assertEquals("nlebxetqgtzxd", model.azureResourceIds().get(0)); + Assertions.assertEquals("c", model.userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusResponseInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusResponseInnerTests.java index a70fc21e72ec..b6ae20155a92 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusResponseInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusResponseInnerTests.java @@ -13,15 +13,16 @@ public final class MetricsStatusResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MetricsStatusResponseInner model - = BinaryData.fromString("{\"azureResourceIds\":[\"paierh\"]}").toObject(MetricsStatusResponseInner.class); - Assertions.assertEquals("paierh", model.azureResourceIds().get(0)); + = BinaryData.fromString("{\"azureResourceIds\":[\"wooc\",\"cbonqvpk\",\"lrxnjeaseiphe\"]}") + .toObject(MetricsStatusResponseInner.class); + Assertions.assertEquals("wooc", model.azureResourceIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MetricsStatusResponseInner model - = new MetricsStatusResponseInner().withAzureResourceIds(Arrays.asList("paierh")); + = new MetricsStatusResponseInner().withAzureResourceIds(Arrays.asList("wooc", "cbonqvpk", "lrxnjeaseiphe")); model = BinaryData.fromObject(model).toObject(MetricsStatusResponseInner.class); - Assertions.assertEquals("paierh", model.azureResourceIds().get(0)); + Assertions.assertEquals("wooc", model.azureResourceIds().get(0)); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceInnerTests.java index b674772c4048..8061b9dfa77d 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceInnerTests.java @@ -14,27 +14,27 @@ public final class MonitoredResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitoredResourceInner model = BinaryData.fromString( - "{\"id\":\"scxaq\",\"sendingMetrics\":\"Disabled\",\"reasonForMetricsStatus\":\"hcbonqvpkvlr\",\"sendingLogs\":\"Enabled\",\"reasonForLogsStatus\":\"ase\"}") + "{\"id\":\"mryw\",\"sendingMetrics\":\"Disabled\",\"reasonForMetricsStatus\":\"qftiy\",\"sendingLogs\":\"Disabled\",\"reasonForLogsStatus\":\"kcqvyxl\"}") .toObject(MonitoredResourceInner.class); - Assertions.assertEquals("scxaq", model.id()); + Assertions.assertEquals("mryw", model.id()); Assertions.assertEquals(SendingMetricsStatus.DISABLED, model.sendingMetrics()); - Assertions.assertEquals("hcbonqvpkvlr", model.reasonForMetricsStatus()); - Assertions.assertEquals(SendingLogsStatus.ENABLED, model.sendingLogs()); - Assertions.assertEquals("ase", model.reasonForLogsStatus()); + Assertions.assertEquals("qftiy", model.reasonForMetricsStatus()); + Assertions.assertEquals(SendingLogsStatus.DISABLED, model.sendingLogs()); + Assertions.assertEquals("kcqvyxl", model.reasonForLogsStatus()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MonitoredResourceInner model = new MonitoredResourceInner().withId("scxaq") + MonitoredResourceInner model = new MonitoredResourceInner().withId("mryw") .withSendingMetrics(SendingMetricsStatus.DISABLED) - .withReasonForMetricsStatus("hcbonqvpkvlr") - .withSendingLogs(SendingLogsStatus.ENABLED) - .withReasonForLogsStatus("ase"); + .withReasonForMetricsStatus("qftiy") + .withSendingLogs(SendingLogsStatus.DISABLED) + .withReasonForLogsStatus("kcqvyxl"); model = BinaryData.fromObject(model).toObject(MonitoredResourceInner.class); - Assertions.assertEquals("scxaq", model.id()); + Assertions.assertEquals("mryw", model.id()); Assertions.assertEquals(SendingMetricsStatus.DISABLED, model.sendingMetrics()); - Assertions.assertEquals("hcbonqvpkvlr", model.reasonForMetricsStatus()); - Assertions.assertEquals(SendingLogsStatus.ENABLED, model.sendingLogs()); - Assertions.assertEquals("ase", model.reasonForLogsStatus()); + Assertions.assertEquals("qftiy", model.reasonForMetricsStatus()); + Assertions.assertEquals(SendingLogsStatus.DISABLED, model.sendingLogs()); + Assertions.assertEquals("kcqvyxl", model.reasonForLogsStatus()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceListResponseTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceListResponseTests.java index 9624c2c18453..7da54f82515f 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceListResponseTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceListResponseTests.java @@ -16,36 +16,36 @@ public final class MonitoredResourceListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitoredResourceListResponse model = BinaryData.fromString( - "{\"value\":[{\"id\":\"gyncocpecfvmmc\",\"sendingMetrics\":\"Disabled\",\"reasonForMetricsStatus\":\"xlzevgbmqjqabcy\",\"sendingLogs\":\"Disabled\",\"reasonForLogsStatus\":\"kwlzuvccfwnfn\"},{\"id\":\"cfionl\",\"sendingMetrics\":\"Enabled\",\"reasonForMetricsStatus\":\"tqgtzxdpnqbqq\",\"sendingLogs\":\"Disabled\",\"reasonForLogsStatus\":\"feallnwsu\"}],\"nextLink\":\"snjampmng\"}") + "{\"value\":[{\"id\":\"typmrbpizcdrqjsd\",\"sendingMetrics\":\"Disabled\",\"reasonForMetricsStatus\":\"fyhxde\",\"sendingLogs\":\"Disabled\",\"reasonForLogsStatus\":\"icwifsjtt\"},{\"id\":\"fbishcbkha\",\"sendingMetrics\":\"Enabled\",\"reasonForMetricsStatus\":\"eamdp\",\"sendingLogs\":\"Enabled\",\"reasonForLogsStatus\":\"lpbuxwgipwhonowk\"}],\"nextLink\":\"hwankixzbinjepu\"}") .toObject(MonitoredResourceListResponse.class); - Assertions.assertEquals("gyncocpecfvmmc", model.value().get(0).id()); + Assertions.assertEquals("typmrbpizcdrqjsd", model.value().get(0).id()); Assertions.assertEquals(SendingMetricsStatus.DISABLED, model.value().get(0).sendingMetrics()); - Assertions.assertEquals("xlzevgbmqjqabcy", model.value().get(0).reasonForMetricsStatus()); + Assertions.assertEquals("fyhxde", model.value().get(0).reasonForMetricsStatus()); Assertions.assertEquals(SendingLogsStatus.DISABLED, model.value().get(0).sendingLogs()); - Assertions.assertEquals("kwlzuvccfwnfn", model.value().get(0).reasonForLogsStatus()); - Assertions.assertEquals("snjampmng", model.nextLink()); + Assertions.assertEquals("icwifsjtt", model.value().get(0).reasonForLogsStatus()); + Assertions.assertEquals("hwankixzbinjepu", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MonitoredResourceListResponse model = new MonitoredResourceListResponse().withValue(Arrays.asList( - new MonitoredResourceInner().withId("gyncocpecfvmmc") + new MonitoredResourceInner().withId("typmrbpizcdrqjsd") .withSendingMetrics(SendingMetricsStatus.DISABLED) - .withReasonForMetricsStatus("xlzevgbmqjqabcy") + .withReasonForMetricsStatus("fyhxde") .withSendingLogs(SendingLogsStatus.DISABLED) - .withReasonForLogsStatus("kwlzuvccfwnfn"), - new MonitoredResourceInner().withId("cfionl") + .withReasonForLogsStatus("icwifsjtt"), + new MonitoredResourceInner().withId("fbishcbkha") .withSendingMetrics(SendingMetricsStatus.ENABLED) - .withReasonForMetricsStatus("tqgtzxdpnqbqq") - .withSendingLogs(SendingLogsStatus.DISABLED) - .withReasonForLogsStatus("feallnwsu"))) - .withNextLink("snjampmng"); + .withReasonForMetricsStatus("eamdp") + .withSendingLogs(SendingLogsStatus.ENABLED) + .withReasonForLogsStatus("lpbuxwgipwhonowk"))) + .withNextLink("hwankixzbinjepu"); model = BinaryData.fromObject(model).toObject(MonitoredResourceListResponse.class); - Assertions.assertEquals("gyncocpecfvmmc", model.value().get(0).id()); + Assertions.assertEquals("typmrbpizcdrqjsd", model.value().get(0).id()); Assertions.assertEquals(SendingMetricsStatus.DISABLED, model.value().get(0).sendingMetrics()); - Assertions.assertEquals("xlzevgbmqjqabcy", model.value().get(0).reasonForMetricsStatus()); + Assertions.assertEquals("fyhxde", model.value().get(0).reasonForMetricsStatus()); Assertions.assertEquals(SendingLogsStatus.DISABLED, model.value().get(0).sendingLogs()); - Assertions.assertEquals("kwlzuvccfwnfn", model.value().get(0).reasonForLogsStatus()); - Assertions.assertEquals("snjampmng", model.nextLink()); + Assertions.assertEquals("icwifsjtt", model.value().get(0).reasonForLogsStatus()); + Assertions.assertEquals("hwankixzbinjepu", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionInnerTests.java index 0418322d95f1..237d5895d12c 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionInnerTests.java @@ -23,67 +23,59 @@ public final class MonitoredSubscriptionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitoredSubscriptionInner model = BinaryData.fromString( - "{\"subscriptionId\":\"jawgqwg\",\"status\":\"InProgress\",\"error\":\"skxfbk\",\"tagRules\":{\"provisioningState\":\"Accepted\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"uwhvylwzbtdhxujz\",\"value\":\"mpowuwpr\",\"action\":\"Include\"},{\"name\":\"eualupjmkhf\",\"value\":\"bbcswsrtjri\",\"action\":\"Exclude\"},{\"name\":\"pbewtghfgblcgwx\",\"value\":\"lvqhjkbegibtnmx\",\"action\":\"Include\"},{\"name\":\"waloayqcgwr\",\"value\":\"j\",\"action\":\"Include\"}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"xongmtsavjcbpwxq\",\"value\":\"rknftguvriuhprwm\",\"action\":\"Exclude\"},{\"name\":\"qtayri\",\"value\":\"ro\",\"action\":\"Include\"},{\"name\":\"xrmcqibycnojvk\",\"value\":\"e\",\"action\":\"Exclude\"},{\"name\":\"zvahapjy\",\"value\":\"pvgqzcjrvxdjzlm\",\"action\":\"Exclude\"}],\"userEmail\":\"vu\"}}}") + "{\"subscriptionId\":\"buynhijggm\",\"status\":\"Failed\",\"error\":\"iarbutrcvpna\",\"tagRules\":{\"provisioningState\":\"Deleting\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"bh\",\"value\":\"nlankxmyskpb\",\"action\":\"Exclude\"},{\"name\":\"tkcxywnytnrsy\",\"value\":\"qidybyx\",\"action\":\"Exclude\"},{\"name\":\"lhaaxdbabp\",\"value\":\"wrqlfktsthsuco\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"bt\",\"value\":\"rq\",\"action\":\"Exclude\"}],\"userEmail\":\"ckzywbiexzfeyue\"}}}") .toObject(MonitoredSubscriptionInner.class); - Assertions.assertEquals("jawgqwg", model.subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.status()); - Assertions.assertEquals("skxfbk", model.error()); + Assertions.assertEquals("buynhijggm", model.subscriptionId()); + Assertions.assertEquals(Status.FAILED, model.status()); + Assertions.assertEquals("iarbutrcvpna", model.error()); Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.tagRules().logRules().sendAadLogs()); Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.tagRules().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.tagRules().logRules().sendActivityLogs()); - Assertions.assertEquals("uwhvylwzbtdhxujz", model.tagRules().logRules().filteringTags().get(0).name()); - Assertions.assertEquals("mpowuwpr", model.tagRules().logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.tagRules().logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.tagRules().logRules().sendActivityLogs()); + Assertions.assertEquals("bh", model.tagRules().logRules().filteringTags().get(0).name()); + Assertions.assertEquals("nlankxmyskpb", model.tagRules().logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, model.tagRules().logRules().filteringTags().get(0).action()); Assertions.assertEquals(SendMetricsStatus.ENABLED, model.tagRules().metricRules().sendMetrics()); - Assertions.assertEquals("xongmtsavjcbpwxq", model.tagRules().metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("rknftguvriuhprwm", model.tagRules().metricRules().filteringTags().get(0).value()); + Assertions.assertEquals("bt", model.tagRules().metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("rq", model.tagRules().metricRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.EXCLUDE, model.tagRules().metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("vu", model.tagRules().metricRules().userEmail()); + Assertions.assertEquals("ckzywbiexzfeyue", model.tagRules().metricRules().userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MonitoredSubscriptionInner model = new MonitoredSubscriptionInner().withSubscriptionId("jawgqwg") - .withStatus(Status.IN_PROGRESS) - .withError("skxfbk") - .withTagRules(new MonitoringTagRulesPropertiesInner().withLogRules(new LogRules() - .withSendAadLogs(SendAadLogsStatus.ENABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) - .withSendActivityLogs(SendActivityLogsStatus.DISABLED) - .withFilteringTags(Arrays.asList( - new FilteringTag().withName("uwhvylwzbtdhxujz").withValue("mpowuwpr").withAction(TagAction.INCLUDE), - new FilteringTag().withName("eualupjmkhf").withValue("bbcswsrtjri").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("pbewtghfgblcgwx") - .withValue("lvqhjkbegibtnmx") - .withAction(TagAction.INCLUDE), - new FilteringTag().withName("waloayqcgwr").withValue("j").withAction(TagAction.INCLUDE)))) - .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) + MonitoredSubscriptionInner model = new MonitoredSubscriptionInner().withSubscriptionId("buynhijggm") + .withStatus(Status.FAILED) + .withError("iarbutrcvpna") + .withTagRules(new MonitoringTagRulesPropertiesInner() + .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) + .withSendActivityLogs(SendActivityLogsStatus.ENABLED) .withFilteringTags(Arrays.asList( - new FilteringTag().withName("xongmtsavjcbpwxq") - .withValue("rknftguvriuhprwm") - .withAction(TagAction.EXCLUDE), - new FilteringTag().withName("qtayri").withValue("ro").withAction(TagAction.INCLUDE), - new FilteringTag().withName("xrmcqibycnojvk").withValue("e").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("zvahapjy") - .withValue("pvgqzcjrvxdjzlm") - .withAction(TagAction.EXCLUDE))) - .withUserEmail("vu"))); + new FilteringTag().withName("bh").withValue("nlankxmyskpb").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("tkcxywnytnrsy").withValue("qidybyx").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("lhaaxdbabp") + .withValue("wrqlfktsthsuco") + .withAction(TagAction.EXCLUDE)))) + .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) + .withFilteringTags( + Arrays.asList(new FilteringTag().withName("bt").withValue("rq").withAction(TagAction.EXCLUDE))) + .withUserEmail("ckzywbiexzfeyue"))); model = BinaryData.fromObject(model).toObject(MonitoredSubscriptionInner.class); - Assertions.assertEquals("jawgqwg", model.subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.status()); - Assertions.assertEquals("skxfbk", model.error()); + Assertions.assertEquals("buynhijggm", model.subscriptionId()); + Assertions.assertEquals(Status.FAILED, model.status()); + Assertions.assertEquals("iarbutrcvpna", model.error()); Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.tagRules().logRules().sendAadLogs()); Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.tagRules().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.tagRules().logRules().sendActivityLogs()); - Assertions.assertEquals("uwhvylwzbtdhxujz", model.tagRules().logRules().filteringTags().get(0).name()); - Assertions.assertEquals("mpowuwpr", model.tagRules().logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.tagRules().logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.tagRules().logRules().sendActivityLogs()); + Assertions.assertEquals("bh", model.tagRules().logRules().filteringTags().get(0).name()); + Assertions.assertEquals("nlankxmyskpb", model.tagRules().logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, model.tagRules().logRules().filteringTags().get(0).action()); Assertions.assertEquals(SendMetricsStatus.ENABLED, model.tagRules().metricRules().sendMetrics()); - Assertions.assertEquals("xongmtsavjcbpwxq", model.tagRules().metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("rknftguvriuhprwm", model.tagRules().metricRules().filteringTags().get(0).value()); + Assertions.assertEquals("bt", model.tagRules().metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("rq", model.tagRules().metricRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.EXCLUDE, model.tagRules().metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("vu", model.tagRules().metricRules().userEmail()); + Assertions.assertEquals("ckzywbiexzfeyue", model.tagRules().metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionPropertiesInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionPropertiesInnerTests.java index 8df93283648e..5f911d929ff2 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionPropertiesInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionPropertiesInnerTests.java @@ -25,69 +25,58 @@ public final class MonitoredSubscriptionPropertiesInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitoredSubscriptionPropertiesInner model = BinaryData.fromString( - "{\"properties\":{\"patchOperation\":\"AddComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"ywpmueefjzwfqkq\",\"status\":\"InProgress\",\"error\":\"suyonobglaocq\",\"tagRules\":{\"provisioningState\":\"Failed\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{},{}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{}],\"userEmail\":\"wfudwpzntxhdzhl\"}}},{\"subscriptionId\":\"jbhckfrlhr\",\"status\":\"Active\",\"error\":\"yvpycanuzbpzk\",\"tagRules\":{\"provisioningState\":\"Accepted\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{},{},{},{}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{},{},{}],\"userEmail\":\"jusrtslhspk\"}}}],\"provisioningState\":\"Updating\"},\"id\":\"maofmxagkv\",\"name\":\"melmqkrha\",\"type\":\"vljua\"}") + "{\"properties\":{\"patchOperation\":\"DeleteComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"etcktvfcivfsnk\",\"status\":\"Failed\",\"error\":\"tqhjfbebrjcx\",\"tagRules\":{\"provisioningState\":\"Succeeded\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{},{},{},{}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{},{},{}],\"userEmail\":\"xepcyvahfn\"}}}],\"provisioningState\":\"Deleted\"},\"id\":\"qxj\",\"name\":\"uujqgidokgjljyo\",\"type\":\"gvcl\"}") .toObject(MonitoredSubscriptionPropertiesInner.class); - Assertions.assertEquals(PatchOperation.ADD_COMPLETE, model.properties().patchOperation()); - Assertions.assertEquals("ywpmueefjzwfqkq", + Assertions.assertEquals(PatchOperation.DELETE_COMPLETE, model.properties().patchOperation()); + Assertions.assertEquals("etcktvfcivfsnk", model.properties().monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("suyonobglaocq", model.properties().monitoredSubscriptionList().get(0).error()); + Assertions.assertEquals(Status.FAILED, model.properties().monitoredSubscriptionList().get(0).status()); + Assertions.assertEquals("tqhjfbebrjcx", model.properties().monitoredSubscriptionList().get(0).error()); Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendActivityLogs()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.properties().monitoredSubscriptionList().get(0).tagRules().metricRules().sendMetrics()); - Assertions.assertEquals("wfudwpzntxhdzhl", + Assertions.assertEquals("xepcyvahfn", model.properties().monitoredSubscriptionList().get(0).tagRules().metricRules().userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MonitoredSubscriptionPropertiesInner model = new MonitoredSubscriptionPropertiesInner() - .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.ADD_COMPLETE) - .withMonitoredSubscriptionList(Arrays.asList( - new MonitoredSubscriptionInner().withSubscriptionId("ywpmueefjzwfqkq") - .withStatus(Status.IN_PROGRESS) - .withError("suyonobglaocq") + .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.DELETE_COMPLETE) + .withMonitoredSubscriptionList( + Arrays.asList(new MonitoredSubscriptionInner().withSubscriptionId("etcktvfcivfsnk") + .withStatus(Status.FAILED) + .withError("tqhjfbebrjcx") .withTagRules(new MonitoringTagRulesPropertiesInner() .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.DISABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) .withSendActivityLogs(SendActivityLogsStatus.DISABLED) - .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag()))) - .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) - .withFilteringTags(Arrays.asList(new FilteringTag())) - .withUserEmail("wfudwpzntxhdzhl"))), - new MonitoredSubscriptionInner().withSubscriptionId("jbhckfrlhr") - .withStatus(Status.ACTIVE) - .withError("yvpycanuzbpzk") - .withTagRules(new MonitoringTagRulesPropertiesInner() - .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) - .withSendActivityLogs(SendActivityLogsStatus.ENABLED) .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag(), new FilteringTag(), new FilteringTag()))) .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) .withFilteringTags( Arrays.asList(new FilteringTag(), new FilteringTag(), new FilteringTag())) - .withUserEmail("jusrtslhspk")))))); + .withUserEmail("xepcyvahfn")))))); model = BinaryData.fromObject(model).toObject(MonitoredSubscriptionPropertiesInner.class); - Assertions.assertEquals(PatchOperation.ADD_COMPLETE, model.properties().patchOperation()); - Assertions.assertEquals("ywpmueefjzwfqkq", + Assertions.assertEquals(PatchOperation.DELETE_COMPLETE, model.properties().patchOperation()); + Assertions.assertEquals("etcktvfcivfsnk", model.properties().monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("suyonobglaocq", model.properties().monitoredSubscriptionList().get(0).error()); + Assertions.assertEquals(Status.FAILED, model.properties().monitoredSubscriptionList().get(0).status()); + Assertions.assertEquals("tqhjfbebrjcx", model.properties().monitoredSubscriptionList().get(0).error()); Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendActivityLogs()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.properties().monitoredSubscriptionList().get(0).tagRules().metricRules().sendMetrics()); - Assertions.assertEquals("wfudwpzntxhdzhl", + Assertions.assertEquals("xepcyvahfn", model.properties().monitoredSubscriptionList().get(0).tagRules().metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionPropertiesListTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionPropertiesListTests.java index 2d2fdf000276..3c96c34ce28d 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionPropertiesListTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionPropertiesListTests.java @@ -19,88 +19,41 @@ public final class MonitoredSubscriptionPropertiesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitoredSubscriptionPropertiesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"patchOperation\":\"AddComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"kx\",\"status\":\"Deleting\",\"error\":\"pbh\",\"tagRules\":{}},{\"subscriptionId\":\"tkcxywnytnrsy\",\"status\":\"Active\",\"error\":\"dybyxczfclhaa\",\"tagRules\":{}},{\"subscriptionId\":\"abphlw\",\"status\":\"Active\",\"error\":\"ktsthsucocmny\",\"tagRules\":{}},{\"subscriptionId\":\"t\",\"status\":\"Active\",\"error\":\"wrqpue\",\"tagRules\":{}}],\"provisioningState\":\"Succeeded\"},\"id\":\"ywbiexzfeyueax\",\"name\":\"bxu\",\"type\":\"wbhqwal\"},{\"properties\":{\"patchOperation\":\"DeleteComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"epdkzja\",\"status\":\"InProgress\",\"error\":\"rhdwbavxbniw\",\"tagRules\":{}},{\"subscriptionId\":\"wz\",\"status\":\"Failed\",\"error\":\"pgn\",\"tagRules\":{}},{\"subscriptionId\":\"x\",\"status\":\"Failed\",\"error\":\"bzpfzab\",\"tagRules\":{}},{\"subscriptionId\":\"uhxwtctyqiklbbov\",\"status\":\"Failed\",\"error\":\"bhvgy\",\"tagRules\":{}}],\"provisioningState\":\"Succeeded\"},\"id\":\"svmkfssxquk\",\"name\":\"fpl\",\"type\":\"mg\"},{\"properties\":{\"patchOperation\":\"Active\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"deslp\",\"status\":\"InProgress\",\"error\":\"wiyighxpkdw\",\"tagRules\":{}}],\"provisioningState\":\"Updating\"},\"id\":\"uebbaumnyqup\",\"name\":\"deoj\",\"type\":\"a\"},{\"properties\":{\"patchOperation\":\"Active\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"xpsiebtfhvpes\",\"status\":\"Failed\",\"error\":\"rdqmhjjdhtldwkyz\",\"tagRules\":{}},{\"subscriptionId\":\"tkncwsc\",\"status\":\"Deleting\",\"error\":\"xotogtwrupqsxv\",\"tagRules\":{}},{\"subscriptionId\":\"cykvceo\",\"status\":\"Active\",\"error\":\"ovnotyfjfcnjbkcn\",\"tagRules\":{}}],\"provisioningState\":\"Creating\"},\"id\":\"ttkphywpnvjtoqne\",\"name\":\"mclfplphoxuscr\",\"type\":\"abgy\"}],\"nextLink\":\"sbj\"}") + "{\"value\":[{\"properties\":{\"patchOperation\":\"DeleteBegin\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"hoqqnwvlr\",\"status\":\"Deleting\",\"error\":\"hheunmmqhgyx\",\"tagRules\":{}},{\"subscriptionId\":\"noc\",\"status\":\"Failed\",\"error\":\"lyaxuc\",\"tagRules\":{}}],\"provisioningState\":\"Failed\"},\"id\":\"zf\",\"name\":\"beypewrmjmw\",\"type\":\"vjektcxsenh\"}],\"nextLink\":\"rsffrzpwvlqdqgbi\"}") .toObject(MonitoredSubscriptionPropertiesList.class); - Assertions.assertEquals(PatchOperation.ADD_COMPLETE, model.value().get(0).properties().patchOperation()); - Assertions.assertEquals("kx", + Assertions.assertEquals(PatchOperation.DELETE_BEGIN, model.value().get(0).properties().patchOperation()); + Assertions.assertEquals("hoqqnwvlr", model.value().get(0).properties().monitoredSubscriptionList().get(0).subscriptionId()); Assertions.assertEquals(Status.DELETING, model.value().get(0).properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("pbh", model.value().get(0).properties().monitoredSubscriptionList().get(0).error()); - Assertions.assertEquals("sbj", model.nextLink()); + Assertions.assertEquals("hheunmmqhgyx", + model.value().get(0).properties().monitoredSubscriptionList().get(0).error()); + Assertions.assertEquals("rsffrzpwvlqdqgbi", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MonitoredSubscriptionPropertiesList model = new MonitoredSubscriptionPropertiesList().withValue(Arrays.asList( - new MonitoredSubscriptionPropertiesInner() - .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.ADD_COMPLETE) + MonitoredSubscriptionPropertiesList model = new MonitoredSubscriptionPropertiesList() + .withValue(Arrays.asList(new MonitoredSubscriptionPropertiesInner() + .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.DELETE_BEGIN) .withMonitoredSubscriptionList(Arrays.asList( - new MonitoredSubscriptionInner().withSubscriptionId("kx") + new MonitoredSubscriptionInner().withSubscriptionId("hoqqnwvlr") .withStatus(Status.DELETING) - .withError("pbh") + .withError("hheunmmqhgyx") .withTagRules(new MonitoringTagRulesPropertiesInner()), - new MonitoredSubscriptionInner().withSubscriptionId("tkcxywnytnrsy") - .withStatus(Status.ACTIVE) - .withError("dybyxczfclhaa") - .withTagRules(new MonitoringTagRulesPropertiesInner()), - new MonitoredSubscriptionInner().withSubscriptionId("abphlw") - .withStatus(Status.ACTIVE) - .withError("ktsthsucocmny") - .withTagRules(new MonitoringTagRulesPropertiesInner()), - new MonitoredSubscriptionInner().withSubscriptionId("t") - .withStatus(Status.ACTIVE) - .withError("wrqpue") - .withTagRules(new MonitoringTagRulesPropertiesInner())))), - new MonitoredSubscriptionPropertiesInner() - .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.DELETE_COMPLETE) - .withMonitoredSubscriptionList(Arrays.asList( - new MonitoredSubscriptionInner().withSubscriptionId("epdkzja") - .withStatus(Status.IN_PROGRESS) - .withError("rhdwbavxbniw") - .withTagRules(new MonitoringTagRulesPropertiesInner()), - new MonitoredSubscriptionInner().withSubscriptionId("wz") + new MonitoredSubscriptionInner().withSubscriptionId("noc") .withStatus(Status.FAILED) - .withError("pgn") - .withTagRules(new MonitoringTagRulesPropertiesInner()), - new MonitoredSubscriptionInner().withSubscriptionId("x") - .withStatus(Status.FAILED) - .withError("bzpfzab") - .withTagRules(new MonitoringTagRulesPropertiesInner()), - new MonitoredSubscriptionInner().withSubscriptionId("uhxwtctyqiklbbov") - .withStatus(Status.FAILED) - .withError("bhvgy") - .withTagRules(new MonitoringTagRulesPropertiesInner())))), - new MonitoredSubscriptionPropertiesInner() - .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.ACTIVE) - .withMonitoredSubscriptionList( - Arrays.asList(new MonitoredSubscriptionInner().withSubscriptionId("deslp") - .withStatus(Status.IN_PROGRESS) - .withError("wiyighxpkdw") - .withTagRules(new MonitoringTagRulesPropertiesInner())))), - new MonitoredSubscriptionPropertiesInner() - .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.ACTIVE) - .withMonitoredSubscriptionList(Arrays.asList( - new MonitoredSubscriptionInner().withSubscriptionId("xpsiebtfhvpes") - .withStatus(Status.FAILED) - .withError("rdqmhjjdhtldwkyz") - .withTagRules(new MonitoringTagRulesPropertiesInner()), - new MonitoredSubscriptionInner().withSubscriptionId("tkncwsc") - .withStatus(Status.DELETING) - .withError("xotogtwrupqsxv") - .withTagRules(new MonitoringTagRulesPropertiesInner()), - new MonitoredSubscriptionInner().withSubscriptionId("cykvceo") - .withStatus(Status.ACTIVE) - .withError("ovnotyfjfcnjbkcn") + .withError("lyaxuc") .withTagRules(new MonitoringTagRulesPropertiesInner())))))) - .withNextLink("sbj"); + .withNextLink("rsffrzpwvlqdqgbi"); model = BinaryData.fromObject(model).toObject(MonitoredSubscriptionPropertiesList.class); - Assertions.assertEquals(PatchOperation.ADD_COMPLETE, model.value().get(0).properties().patchOperation()); - Assertions.assertEquals("kx", + Assertions.assertEquals(PatchOperation.DELETE_BEGIN, model.value().get(0).properties().patchOperation()); + Assertions.assertEquals("hoqqnwvlr", model.value().get(0).properties().monitoredSubscriptionList().get(0).subscriptionId()); Assertions.assertEquals(Status.DELETING, model.value().get(0).properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("pbh", model.value().get(0).properties().monitoredSubscriptionList().get(0).error()); - Assertions.assertEquals("sbj", model.nextLink()); + Assertions.assertEquals("hheunmmqhgyx", + model.value().get(0).properties().monitoredSubscriptionList().get(0).error()); + Assertions.assertEquals("rsffrzpwvlqdqgbi", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateorUpdateMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateOrUpdateMockTests.java similarity index 59% rename from sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateorUpdateMockTests.java rename to sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateOrUpdateMockTests.java index cae666317e6a..6fa2c81fbd87 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateorUpdateMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateOrUpdateMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricRulesInner; @@ -26,49 +26,45 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class MonitoredSubscriptionsCreateorUpdateMockTests { +public final class MonitoredSubscriptionsCreateOrUpdateMockTests { @Test - public void testCreateorUpdate() throws Exception { + public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"patchOperation\":\"Active\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"zkoj\",\"status\":\"InProgress\",\"error\":\"zfoqouicybxar\",\"tagRules\":{\"provisioningState\":\"NotSpecified\",\"logRules\":{},\"metricRules\":{}}}],\"provisioningState\":\"Succeeded\"},\"id\":\"ciqopidoa\",\"name\":\"ciodhkhaz\",\"type\":\"khnzbonlw\"}"; + = "{\"properties\":{\"patchOperation\":\"DeleteComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"ujhemmsbvdkcrodt\",\"status\":\"Deleting\",\"error\":\"wj\",\"tagRules\":{\"provisioningState\":\"Failed\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"jvefkdlfoakggkfp\",\"status\":\"InProgress\",\"error\":\"wpu\",\"tagRules\":{\"provisioningState\":\"Failed\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"s\",\"status\":\"InProgress\",\"error\":\"jnsjervtiagxsd\",\"tagRules\":{\"provisioningState\":\"Updating\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"bzkfzbeyvpn\",\"status\":\"Deleting\",\"error\":\"invkjjxdxrbuu\",\"tagRules\":{\"provisioningState\":\"Updating\",\"logRules\":{},\"metricRules\":{}}}],\"provisioningState\":\"Succeeded\"},\"id\":\"lw\",\"name\":\"aztz\",\"type\":\"ofncckwyfzqwhxxb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); MonitoredSubscriptionProperties response = manager.monitoredSubscriptions() .define(ConfigurationName.DEFAULT) - .withExistingMonitor("pfuvglsbjjca", "vxb") - .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.DELETE_COMPLETE) + .withExistingMonitor("byxbaaabjy", "ayffim") + .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.ADD_BEGIN) .withMonitoredSubscriptionList(Arrays.asList( - new MonitoredSubscriptionInner().withSubscriptionId("cormr") - .withStatus(Status.DELETING) - .withError("vcofudfl") - .withTagRules(new MonitoringTagRulesPropertiesInner().withLogRules(new LogRules()) - .withMetricRules(new MetricRulesInner())), - new MonitoredSubscriptionInner().withSubscriptionId("dknnqvsazn") + new MonitoredSubscriptionInner().withSubscriptionId("gsexne") .withStatus(Status.IN_PROGRESS) - .withError("rudsg") + .withError("wnwmewzs") .withTagRules(new MonitoringTagRulesPropertiesInner().withLogRules(new LogRules()) .withMetricRules(new MetricRulesInner())), - new MonitoredSubscriptionInner().withSubscriptionId("grauwjuetaebur") - .withStatus(Status.ACTIVE) - .withError("ovsm") + new MonitoredSubscriptionInner().withSubscriptionId("oibjudpfrxtrthz") + .withStatus(Status.IN_PROGRESS) + .withError("dwkqbrq") .withTagRules(new MonitoringTagRulesPropertiesInner().withLogRules(new LogRules()) .withMetricRules(new MetricRulesInner())), - new MonitoredSubscriptionInner().withSubscriptionId("q") - .withStatus(Status.ACTIVE) - .withError("ifrvtpu") + new MonitoredSubscriptionInner().withSubscriptionId("xiilivpdtiirqt") + .withStatus(Status.FAILED) + .withError("xoruzfgsquyfxrx") .withTagRules(new MonitoringTagRulesPropertiesInner().withLogRules(new LogRules()) .withMetricRules(new MetricRulesInner()))))) .create(); - Assertions.assertEquals(PatchOperation.ACTIVE, response.properties().patchOperation()); - Assertions.assertEquals("zkoj", response.properties().monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, response.properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("zfoqouicybxar", response.properties().monitoredSubscriptionList().get(0).error()); + Assertions.assertEquals(PatchOperation.DELETE_COMPLETE, response.properties().patchOperation()); + Assertions.assertEquals("ujhemmsbvdkcrodt", + response.properties().monitoredSubscriptionList().get(0).subscriptionId()); + Assertions.assertEquals(Status.DELETING, response.properties().monitoredSubscriptionList().get(0).status()); + Assertions.assertEquals("wj", response.properties().monitoredSubscriptionList().get(0).error()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsGetWithResponseMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsGetWithResponseMockTests.java index efdd10afc509..1b1c3d3d21e1 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsGetWithResponseMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsGetWithResponseMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.ConfigurationName; @@ -24,23 +24,23 @@ public final class MonitoredSubscriptionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"patchOperation\":\"AddComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"kfpagao\",\"status\":\"Deleting\",\"error\":\"pqblylsyxkqjnsj\",\"tagRules\":{\"provisioningState\":\"Updating\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"xsdszuempsb\",\"status\":\"InProgress\",\"error\":\"beyvpnqicvinvkjj\",\"tagRules\":{\"provisioningState\":\"Canceled\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"kzclewyh\",\"status\":\"InProgress\",\"error\":\"aztz\",\"tagRules\":{\"provisioningState\":\"Creating\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"wyfzqwhxxbuyqa\",\"status\":\"Failed\",\"error\":\"qztpp\",\"tagRules\":{\"provisioningState\":\"Updating\",\"logRules\":{},\"metricRules\":{}}}],\"provisioningState\":\"NotSpecified\"},\"id\":\"altol\",\"name\":\"ncwsob\",\"type\":\"wcsdbnwdcfhucq\"}"; + = "{\"properties\":{\"patchOperation\":\"DeleteComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"ygaeqidbqfatpxl\",\"status\":\"Deleting\",\"error\":\"yjmoadsu\",\"tagRules\":{\"provisioningState\":\"NotSpecified\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"mjsjqb\",\"status\":\"Deleting\",\"error\":\"x\",\"tagRules\":{\"provisioningState\":\"NotSpecified\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"duhpk\",\"status\":\"Active\",\"error\":\"mareqnajxqugj\",\"tagRules\":{\"provisioningState\":\"NotSpecified\",\"logRules\":{},\"metricRules\":{}}}],\"provisioningState\":\"Failed\"},\"id\":\"gssofwq\",\"name\":\"zqalkrmnjijpx\",\"type\":\"cqqudf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); MonitoredSubscriptionProperties response = manager.monitoredSubscriptions() - .getWithResponse("vdkcrodtj", "nfwjlfltkacjvefk", ConfigurationName.DEFAULT, - com.azure.core.util.Context.NONE) + .getWithResponse("zikhl", "fjhdg", ConfigurationName.DEFAULT, com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(PatchOperation.ADD_COMPLETE, response.properties().patchOperation()); - Assertions.assertEquals("kfpagao", response.properties().monitoredSubscriptionList().get(0).subscriptionId()); + Assertions.assertEquals(PatchOperation.DELETE_COMPLETE, response.properties().patchOperation()); + Assertions.assertEquals("ygaeqidbqfatpxl", + response.properties().monitoredSubscriptionList().get(0).subscriptionId()); Assertions.assertEquals(Status.DELETING, response.properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("pqblylsyxkqjnsj", response.properties().monitoredSubscriptionList().get(0).error()); + Assertions.assertEquals("yjmoadsu", response.properties().monitoredSubscriptionList().get(0).error()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsListMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsListMockTests.java index ef1dbc9f1644..7a357f4e2460 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsListMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsListMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.MonitoredSubscriptionProperties; @@ -24,24 +24,24 @@ public final class MonitoredSubscriptionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"patchOperation\":\"AddComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"q\",\"status\":\"Failed\",\"error\":\"axoruzfgsquy\",\"tagRules\":{\"provisioningState\":\"Updating\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"ptramxj\",\"status\":\"Failed\",\"error\":\"wnwxuqlcvyd\",\"tagRules\":{\"provisioningState\":\"Deleting\",\"logRules\":{},\"metricRules\":{}}}],\"provisioningState\":\"Deleted\"},\"id\":\"ojknio\",\"name\":\"kooebwnu\",\"type\":\"hemms\"}]}"; + = "{\"value\":[{\"properties\":{\"patchOperation\":\"AddBegin\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"nwabfatkldd\",\"status\":\"Failed\",\"error\":\"wuaanoz\",\"tagRules\":{\"provisioningState\":\"Updating\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"ulpjr\",\"status\":\"InProgress\",\"error\":\"l\",\"tagRules\":{\"provisioningState\":\"Failed\",\"logRules\":{},\"metricRules\":{}}}],\"provisioningState\":\"Succeeded\"},\"id\":\"tx\",\"name\":\"tcs\",\"type\":\"fcktqumiekke\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.monitoredSubscriptions().list("ytdw", "qbrqubpaxhexiili", com.azure.core.util.Context.NONE); + = manager.monitoredSubscriptions().list("c", "r", com.azure.core.util.Context.NONE); - Assertions.assertEquals(PatchOperation.ADD_COMPLETE, response.iterator().next().properties().patchOperation()); - Assertions.assertEquals("q", + Assertions.assertEquals(PatchOperation.ADD_BEGIN, response.iterator().next().properties().patchOperation()); + Assertions.assertEquals("nwabfatkldd", response.iterator().next().properties().monitoredSubscriptionList().get(0).subscriptionId()); Assertions.assertEquals(Status.FAILED, response.iterator().next().properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("axoruzfgsquy", + Assertions.assertEquals("wuaanoz", response.iterator().next().properties().monitoredSubscriptionList().get(0).error()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoringTagRulesPropertiesInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoringTagRulesPropertiesInnerTests.java index 064a06377dca..ed6f967a5b1a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoringTagRulesPropertiesInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoringTagRulesPropertiesInnerTests.java @@ -21,48 +21,47 @@ public final class MonitoringTagRulesPropertiesInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitoringTagRulesPropertiesInner model = BinaryData.fromString( - "{\"provisioningState\":\"Failed\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"kpoc\",\"value\":\"azyxoegukg\",\"action\":\"Include\"},{\"name\":\"ucgygevqz\",\"value\":\"yp\",\"action\":\"Exclude\"},{\"name\":\"izcdrqjsd\",\"value\":\"dnfyhxdeoejzicwi\",\"action\":\"Include\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"ishc\",\"value\":\"hajdeyeamdpha\",\"action\":\"Exclude\"},{\"name\":\"buxwgip\",\"value\":\"onowk\",\"action\":\"Exclude\"},{\"name\":\"ankixzbinjeput\",\"value\":\"rywn\",\"action\":\"Exclude\"}],\"userEmail\":\"ftiyqzrnkcq\"}}") + "{\"provisioningState\":\"NotSpecified\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"lmuzy\",\"value\":\"aepdkzjanc\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"xbniwdjs\",\"value\":\"tsdbpgn\",\"action\":\"Include\"},{\"name\":\"hpzxbzpfzab\",\"value\":\"cuh\",\"action\":\"Include\"},{\"name\":\"tyq\",\"value\":\"lbbovplw\",\"action\":\"Exclude\"},{\"name\":\"gy\",\"value\":\"uosvmkfssxqukk\",\"action\":\"Include\"}],\"userEmail\":\"mg\"}}") .toObject(MonitoringTagRulesPropertiesInner.class); - Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.logRules().sendActivityLogs()); - Assertions.assertEquals("kpoc", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("azyxoegukg", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.logRules().sendAadLogs()); + Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, model.logRules().sendSubscriptionLogs()); + Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.logRules().sendActivityLogs()); + Assertions.assertEquals("lmuzy", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("aepdkzjanc", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); Assertions.assertEquals(SendMetricsStatus.DISABLED, model.metricRules().sendMetrics()); - Assertions.assertEquals("ishc", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("hajdeyeamdpha", model.metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("ftiyqzrnkcq", model.metricRules().userEmail()); + Assertions.assertEquals("xbniwdjs", model.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("tsdbpgn", model.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); + Assertions.assertEquals("mg", model.metricRules().userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MonitoringTagRulesPropertiesInner model = new MonitoringTagRulesPropertiesInner().withLogRules(new LogRules() - .withSendAadLogs(SendAadLogsStatus.DISABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) - .withSendActivityLogs(SendActivityLogsStatus.DISABLED) - .withFilteringTags(Arrays.asList( - new FilteringTag().withName("kpoc").withValue("azyxoegukg").withAction(TagAction.INCLUDE), - new FilteringTag().withName("ucgygevqz").withValue("yp").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("izcdrqjsd").withValue("dnfyhxdeoejzicwi").withAction(TagAction.INCLUDE)))) + MonitoringTagRulesPropertiesInner model = new MonitoringTagRulesPropertiesInner() + .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) + .withSendActivityLogs(SendActivityLogsStatus.ENABLED) + .withFilteringTags(Arrays.asList( + new FilteringTag().withName("lmuzy").withValue("aepdkzjanc").withAction(TagAction.EXCLUDE)))) .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) .withFilteringTags(Arrays.asList( - new FilteringTag().withName("ishc").withValue("hajdeyeamdpha").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("buxwgip").withValue("onowk").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("ankixzbinjeput").withValue("rywn").withAction(TagAction.EXCLUDE))) - .withUserEmail("ftiyqzrnkcq")); + new FilteringTag().withName("xbniwdjs").withValue("tsdbpgn").withAction(TagAction.INCLUDE), + new FilteringTag().withName("hpzxbzpfzab").withValue("cuh").withAction(TagAction.INCLUDE), + new FilteringTag().withName("tyq").withValue("lbbovplw").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("gy").withValue("uosvmkfssxqukk").withAction(TagAction.INCLUDE))) + .withUserEmail("mg")); model = BinaryData.fromObject(model).toObject(MonitoringTagRulesPropertiesInner.class); - Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.logRules().sendActivityLogs()); - Assertions.assertEquals("kpoc", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("azyxoegukg", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.logRules().sendAadLogs()); + Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, model.logRules().sendSubscriptionLogs()); + Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.logRules().sendActivityLogs()); + Assertions.assertEquals("lmuzy", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("aepdkzjanc", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); Assertions.assertEquals(SendMetricsStatus.DISABLED, model.metricRules().sendMetrics()); - Assertions.assertEquals("ishc", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("hajdeyeamdpha", model.metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("ftiyqzrnkcq", model.metricRules().userEmail()); + Assertions.assertEquals("xbniwdjs", model.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("tsdbpgn", model.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); + Assertions.assertEquals("mg", model.metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteMockTests.java index 964e6e7d380f..cac56f83e233 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.monitors().delete("lmpewwwfbkr", "rn", "vshqjohxcr", com.azure.core.util.Context.NONE); + manager.monitors().delete("nfqqnvwp", "qtaruoujmkcjhwq", "tjrybnwjewgdr", com.azure.core.util.Context.NONE); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesWithResponseMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesWithResponseMockTests.java index 7d345a39a31e..80a15444eed3 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesWithResponseMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesWithResponseMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.MetricRules; @@ -24,24 +24,24 @@ public final class MonitorsGetMetricRulesWithResponseMockTests { @Test public void testGetMetricRulesWithResponse() throws Exception { String responseStr - = "{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"bsrfbj\",\"value\":\"twss\",\"action\":\"Exclude\"},{\"name\":\"pvjzbe\",\"value\":\"l\",\"action\":\"Include\"},{\"name\":\"qqnvwpmq\",\"value\":\"ruoujmk\",\"action\":\"Include\"}],\"userEmail\":\"qytjrybnwjewgd\"}"; + = "{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"qig\",\"value\":\"duhavhqlkt\",\"action\":\"Exclude\"},{\"name\":\"qolbgyc\",\"value\":\"iertgccymvaolp\",\"action\":\"Include\"},{\"name\":\"lfmmdnbbglzpswi\",\"value\":\"mcwyhzdxssadb\",\"action\":\"Exclude\"}],\"userEmail\":\"dfznudaodv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); MetricRules response = manager.monitors() - .getMetricRulesWithResponse("bfovasrruvwbhsq", "sub", new MetricsRequest().withUserEmail("gjb"), + .getMetricRulesWithResponse("ervnaenqpehi", "doy", new MetricsRequest().withUserEmail("mifthnzdnd"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(SendMetricsStatus.ENABLED, response.sendMetrics()); - Assertions.assertEquals("bsrfbj", response.filteringTags().get(0).name()); - Assertions.assertEquals("twss", response.filteringTags().get(0).value()); + Assertions.assertEquals(SendMetricsStatus.DISABLED, response.sendMetrics()); + Assertions.assertEquals("qig", response.filteringTags().get(0).name()); + Assertions.assertEquals("duhavhqlkt", response.filteringTags().get(0).value()); Assertions.assertEquals(TagAction.EXCLUDE, response.filteringTags().get(0).action()); - Assertions.assertEquals("qytjrybnwjewgd", response.userEmail()); + Assertions.assertEquals("dfznudaodv", response.userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusWithResponseMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusWithResponseMockTests.java index 8a97fd034cdb..9a7fac4b90ad 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusWithResponseMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusWithResponseMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.MetricsStatusRequest; @@ -22,23 +22,23 @@ public final class MonitorsGetMetricStatusWithResponseMockTests { @Test public void testGetMetricStatusWithResponse() throws Exception { - String responseStr = "{\"azureResourceIds\":[\"duhavhqlkt\",\"umaq\",\"lbg\",\"cdui\"]}"; + String responseStr = "{\"azureResourceIds\":[\"iwubmwmbesldnk\",\"wtppjflcxogaoko\"]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - MetricsStatusResponse response - = manager.monitors() - .getMetricStatusWithResponse("jervnaenqpehi", "doy", - new MetricsStatusRequest().withAzureResourceIds(Arrays.asList("fthnzdn", "sl")) - .withUserEmail("nayqi"), - com.azure.core.util.Context.NONE) - .getValue(); + MetricsStatusResponse response = manager.monitors() + .getMetricStatusWithResponse("zbn", "blylpstdbh", + new MetricsStatusRequest() + .withAzureResourceIds(Arrays.asList("rzdzucerscdnt", "evfiwjmygt", "sslswtmweriof", "pyqs")) + .withUserEmail("mwabnetshhszhedp"), + com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals("duhavhqlkt", response.azureResourceIds().get(0)); + Assertions.assertEquals("iwubmwmbesldnk", response.azureResourceIds().get(0)); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLatestLinkedSaaSWithResponseMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLatestLinkedSaaSWithResponseMockTests.java new file mode 100644 index 000000000000..8eca7d178e7a --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLatestLinkedSaaSWithResponseMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; +import com.azure.resourcemanager.newrelicobservability.models.LatestLinkedSaaSResponse; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MonitorsLatestLinkedSaaSWithResponseMockTests { + @Test + public void testLatestLinkedSaaSWithResponse() throws Exception { + String responseStr = "{\"saaSResourceId\":\"zxmhhvhgu\",\"isHiddenSaaS\":false}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + LatestLinkedSaaSResponse response = manager.monitors() + .latestLinkedSaaSWithResponse("z", "nsikvmkqzeqqkdl", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("zxmhhvhgu", response.saaSResourceId()); + Assertions.assertFalse(response.isHiddenSaaS()); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesMockTests.java index 979849a70da4..924635411d51 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.AppServiceInfo; @@ -24,23 +24,24 @@ public final class MonitorsListAppServicesMockTests { @Test public void testListAppServices() throws Exception { String responseStr - = "{\"value\":[{\"azureResourceId\":\"dvxzbncblylpst\",\"agentVersion\":\"hh\",\"agentStatus\":\"rzdzucerscdnt\"}]}"; + = "{\"value\":[{\"azureResourceId\":\"vithh\",\"agentVersion\":\"o\",\"agentStatus\":\"sg\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.monitors() - .listAppServices("r", "gccymvaolpssl", - new AppServicesGetRequest().withAzureResourceIds(Arrays.asList("mmdnbbglzps", "iydmcwyhzdxs")) - .withUserEmail("adbzmnvdfznud"), + .listAppServices("pbttdum", "rp", + new AppServicesGetRequest() + .withAzureResourceIds(Arrays.asList("bmnzbtbhjpgl", "fgohdneuelfphs", "yhtozfikdowwqu", "v")) + .withUserEmail("zx"), com.azure.core.util.Context.NONE); - Assertions.assertEquals("dvxzbncblylpst", response.iterator().next().azureResourceId()); - Assertions.assertEquals("hh", response.iterator().next().agentVersion()); - Assertions.assertEquals("rzdzucerscdnt", response.iterator().next().agentStatus()); + Assertions.assertEquals("vithh", response.iterator().next().azureResourceId()); + Assertions.assertEquals("o", response.iterator().next().agentVersion()); + Assertions.assertEquals("sg", response.iterator().next().agentStatus()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsMockTests.java index 24794359d7d1..95d10e905d57 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.HostsGetRequest; @@ -24,24 +24,21 @@ public final class MonitorsListHostsMockTests { @Test public void testListHosts() throws Exception { String responseStr - = "{\"value\":[{\"vmId\":\"koievseo\",\"agentVersion\":\"q\",\"agentStatus\":\"ltmuwlauwzizx\"}]}"; + = "{\"value\":[{\"vmId\":\"fuflrwdmhdlx\",\"agentVersion\":\"rxsagafcnihgwqa\",\"agentStatus\":\"edgfbcvkcvq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.monitors() - .listHosts("ur", "odkwobd", - new HostsGetRequest() - .withVmIds(Arrays.asList("tibqdxbxwakb", "gqxndlkzgxhuripl", "podxunkb", "bxmubyynt")) - .withUserEmail("lrb"), - com.azure.core.util.Context.NONE); + .listHosts("b", "c", new HostsGetRequest().withVmIds(Arrays.asList("wdsjnkalju", "iiswacffgdkzze")) + .withUserEmail("kfvhqcrailvpn"), com.azure.core.util.Context.NONE); - Assertions.assertEquals("koievseo", response.iterator().next().vmId()); - Assertions.assertEquals("q", response.iterator().next().agentVersion()); - Assertions.assertEquals("ltmuwlauwzizx", response.iterator().next().agentStatus()); + Assertions.assertEquals("fuflrwdmhdlx", response.iterator().next().vmId()); + Assertions.assertEquals("rxsagafcnihgwqa", response.iterator().next().agentVersion()); + Assertions.assertEquals("edgfbcvkcvq", response.iterator().next().agentStatus()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListLinkedResourcesMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListLinkedResourcesMockTests.java index d25911a89f2c..177bc74df9e6 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListLinkedResourcesMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListLinkedResourcesMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.LinkedResource; @@ -21,18 +21,18 @@ public final class MonitorsListLinkedResourcesMockTests { @Test public void testListLinkedResources() throws Exception { - String responseStr = "{\"value\":[{\"id\":\"xzxcl\"}]}"; + String responseStr = "{\"value\":[{\"id\":\"opcjwvnhd\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.monitors().listLinkedResources("phsdyhto", "fikdowwqu", com.azure.core.util.Context.NONE); + = manager.monitors().listLinkedResources("pkeqdcvdrhvoo", "sotbob", com.azure.core.util.Context.NONE); - Assertions.assertEquals("xzxcl", response.iterator().next().id()); + Assertions.assertEquals("opcjwvnhd", response.iterator().next().id()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesMockTests.java index 66f20f28a294..d017e144e8b4 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.MonitoredResource; @@ -24,22 +24,22 @@ public final class MonitorsListMonitoredResourcesMockTests { @Test public void testListMonitoredResources() throws Exception { String responseStr - = "{\"value\":[{\"id\":\"orppxebmnzbtb\",\"sendingMetrics\":\"Enabled\",\"reasonForMetricsStatus\":\"lkfg\",\"sendingLogs\":\"Enabled\",\"reasonForLogsStatus\":\"euel\"}]}"; + = "{\"value\":[{\"id\":\"wuoegrpk\",\"sendingMetrics\":\"Disabled\",\"reasonForMetricsStatus\":\"iyq\",\"sendingLogs\":\"Enabled\",\"reasonForLogsStatus\":\"cpdggkzzlvmbmp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.monitors().listMonitoredResources("mpgcjefuzmuvpbt", "d", com.azure.core.util.Context.NONE); + = manager.monitors().listMonitoredResources("d", "mgxcxrslpm", com.azure.core.util.Context.NONE); - Assertions.assertEquals("orppxebmnzbtb", response.iterator().next().id()); - Assertions.assertEquals(SendingMetricsStatus.ENABLED, response.iterator().next().sendingMetrics()); - Assertions.assertEquals("lkfg", response.iterator().next().reasonForMetricsStatus()); + Assertions.assertEquals("wuoegrpk", response.iterator().next().id()); + Assertions.assertEquals(SendingMetricsStatus.DISABLED, response.iterator().next().sendingMetrics()); + Assertions.assertEquals("iyq", response.iterator().next().reasonForMetricsStatus()); Assertions.assertEquals(SendingLogsStatus.ENABLED, response.iterator().next().sendingLogs()); - Assertions.assertEquals("euel", response.iterator().next().reasonForLogsStatus()); + Assertions.assertEquals("cpdggkzzlvmbmp", response.iterator().next().reasonForLogsStatus()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsRefreshIngestionKeyWithResponseMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsRefreshIngestionKeyWithResponseMockTests.java new file mode 100644 index 000000000000..0032a40b15d5 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsRefreshIngestionKeyWithResponseMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MonitorsRefreshIngestionKeyWithResponseMockTests { + @Test + public void testRefreshIngestionKeyWithResponse() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 204, responseStr.getBytes(StandardCharsets.UTF_8))); + NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.monitors().refreshIngestionKeyWithResponse("xmodf", "uefywsbpfvmwy", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/NewRelicSingleSignOnPropertiesTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/NewRelicSingleSignOnPropertiesTests.java index 186893bcc448..198e0c067ad9 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/NewRelicSingleSignOnPropertiesTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/NewRelicSingleSignOnPropertiesTests.java @@ -14,25 +14,25 @@ public final class NewRelicSingleSignOnPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NewRelicSingleSignOnProperties model = BinaryData.fromString( - "{\"singleSignOnState\":\"Enable\",\"enterpriseAppId\":\"o\",\"singleSignOnUrl\":\"si\",\"provisioningState\":\"Deleting\"}") + "{\"singleSignOnState\":\"Initial\",\"enterpriseAppId\":\"cjdkwtnhxbnjbi\",\"singleSignOnUrl\":\"qrglssainqpjwn\",\"provisioningState\":\"Canceled\"}") .toObject(NewRelicSingleSignOnProperties.class); - Assertions.assertEquals(SingleSignOnStates.ENABLE, model.singleSignOnState()); - Assertions.assertEquals("o", model.enterpriseAppId()); - Assertions.assertEquals("si", model.singleSignOnUrl()); - Assertions.assertEquals(ProvisioningState.DELETING, model.provisioningState()); + Assertions.assertEquals(SingleSignOnStates.INITIAL, model.singleSignOnState()); + Assertions.assertEquals("cjdkwtnhxbnjbi", model.enterpriseAppId()); + Assertions.assertEquals("qrglssainqpjwn", model.singleSignOnUrl()); + Assertions.assertEquals(ProvisioningState.CANCELED, model.provisioningState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NewRelicSingleSignOnProperties model - = new NewRelicSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.ENABLE) - .withEnterpriseAppId("o") - .withSingleSignOnUrl("si") - .withProvisioningState(ProvisioningState.DELETING); + = new NewRelicSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.INITIAL) + .withEnterpriseAppId("cjdkwtnhxbnjbi") + .withSingleSignOnUrl("qrglssainqpjwn") + .withProvisioningState(ProvisioningState.CANCELED); model = BinaryData.fromObject(model).toObject(NewRelicSingleSignOnProperties.class); - Assertions.assertEquals(SingleSignOnStates.ENABLE, model.singleSignOnState()); - Assertions.assertEquals("o", model.enterpriseAppId()); - Assertions.assertEquals("si", model.singleSignOnUrl()); - Assertions.assertEquals(ProvisioningState.DELETING, model.provisioningState()); + Assertions.assertEquals(SingleSignOnStates.INITIAL, model.singleSignOnState()); + Assertions.assertEquals("cjdkwtnhxbnjbi", model.enterpriseAppId()); + Assertions.assertEquals("qrglssainqpjwn", model.singleSignOnUrl()); + Assertions.assertEquals(ProvisioningState.CANCELED, model.provisioningState()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListMockTests.java index f75d7a1206fc..95577f69a32a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.Operation; @@ -21,14 +21,14 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"uusdttouwa\",\"isDataAction\":false,\"display\":{\"provider\":\"v\",\"resource\":\"lns\",\"operation\":\"bxwyjsflhhcaa\",\"description\":\"jixisxyawjoyaqcs\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"vbxwyjsflhh\",\"isDataAction\":false,\"display\":{\"provider\":\"jixisxyawjoyaqcs\",\"resource\":\"jpkiidzyexznelix\",\"operation\":\"rzt\",\"description\":\"lhbnxkna\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationInfoTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationInfoTests.java index 15c572cc37d1..1006704ac61f 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationInfoTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationInfoTests.java @@ -12,14 +12,14 @@ public final class OrganizationInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OrganizationInfo model - = BinaryData.fromString("{\"organizationId\":\"amiheognarxz\"}").toObject(OrganizationInfo.class); - Assertions.assertEquals("amiheognarxz", model.organizationId()); + = BinaryData.fromString("{\"organizationId\":\"rljdouskcqv\"}").toObject(OrganizationInfo.class); + Assertions.assertEquals("rljdouskcqv", model.organizationId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OrganizationInfo model = new OrganizationInfo().withOrganizationId("amiheognarxz"); + OrganizationInfo model = new OrganizationInfo().withOrganizationId("rljdouskcqv"); model = BinaryData.fromObject(model).toObject(OrganizationInfo.class); - Assertions.assertEquals("amiheognarxz", model.organizationId()); + Assertions.assertEquals("rljdouskcqv", model.organizationId()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationPropertiesTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationPropertiesTests.java index 078ad0d538f4..343e17ef5b0e 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationPropertiesTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationPropertiesTests.java @@ -12,22 +12,22 @@ public final class OrganizationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OrganizationProperties model = BinaryData.fromString( - "{\"organizationId\":\"utduqktapspwgcu\",\"organizationName\":\"tumkdosvqwhbm\",\"billingSource\":\"NEWRELIC\"}") + OrganizationProperties model = BinaryData + .fromString("{\"organizationId\":\"q\",\"organizationName\":\"ol\",\"billingSource\":\"NEWRELIC\"}") .toObject(OrganizationProperties.class); - Assertions.assertEquals("utduqktapspwgcu", model.organizationId()); - Assertions.assertEquals("tumkdosvqwhbm", model.organizationName()); + Assertions.assertEquals("q", model.organizationId()); + Assertions.assertEquals("ol", model.organizationName()); Assertions.assertEquals(BillingSource.NEWRELIC, model.billingSource()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OrganizationProperties model = new OrganizationProperties().withOrganizationId("utduqktapspwgcu") - .withOrganizationName("tumkdosvqwhbm") + OrganizationProperties model = new OrganizationProperties().withOrganizationId("q") + .withOrganizationName("ol") .withBillingSource(BillingSource.NEWRELIC); model = BinaryData.fromObject(model).toObject(OrganizationProperties.class); - Assertions.assertEquals("utduqktapspwgcu", model.organizationId()); - Assertions.assertEquals("tumkdosvqwhbm", model.organizationName()); + Assertions.assertEquals("q", model.organizationId()); + Assertions.assertEquals("ol", model.organizationName()); Assertions.assertEquals(BillingSource.NEWRELIC, model.billingSource()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationResourceInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationResourceInnerTests.java index 07d30c4b7482..984522485267 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationResourceInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationResourceInnerTests.java @@ -13,21 +13,21 @@ public final class OrganizationResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OrganizationResourceInner model = BinaryData.fromString( - "{\"properties\":{\"organizationId\":\"kgfg\",\"organizationName\":\"madgakeqsrxyb\",\"billingSource\":\"NEWRELIC\"},\"id\":\"dqytbciqfouflmm\",\"name\":\"kzsmodm\",\"type\":\"lougpbkw\"}") + "{\"properties\":{\"organizationId\":\"gcue\",\"organizationName\":\"umkdosvqwhbmd\",\"billingSource\":\"AZURE\"},\"id\":\"f\",\"name\":\"dgmb\",\"type\":\"bexppb\"}") .toObject(OrganizationResourceInner.class); - Assertions.assertEquals("kgfg", model.organizationId()); - Assertions.assertEquals("madgakeqsrxyb", model.organizationName()); - Assertions.assertEquals(BillingSource.NEWRELIC, model.billingSource()); + Assertions.assertEquals("gcue", model.organizationId()); + Assertions.assertEquals("umkdosvqwhbmd", model.organizationName()); + Assertions.assertEquals(BillingSource.AZURE, model.billingSource()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OrganizationResourceInner model = new OrganizationResourceInner().withOrganizationId("kgfg") - .withOrganizationName("madgakeqsrxyb") - .withBillingSource(BillingSource.NEWRELIC); + OrganizationResourceInner model = new OrganizationResourceInner().withOrganizationId("gcue") + .withOrganizationName("umkdosvqwhbmd") + .withBillingSource(BillingSource.AZURE); model = BinaryData.fromObject(model).toObject(OrganizationResourceInner.class); - Assertions.assertEquals("kgfg", model.organizationId()); - Assertions.assertEquals("madgakeqsrxyb", model.organizationName()); - Assertions.assertEquals(BillingSource.NEWRELIC, model.billingSource()); + Assertions.assertEquals("gcue", model.organizationId()); + Assertions.assertEquals("umkdosvqwhbmd", model.organizationName()); + Assertions.assertEquals(BillingSource.AZURE, model.billingSource()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListMockTests.java index bdd1bb744e71..c1167dc567d8 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.BillingSource; @@ -23,20 +23,20 @@ public final class OrganizationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"organizationId\":\"cjwvn\",\"organizationName\":\"ld\",\"billingSource\":\"AZURE\"},\"id\":\"cxrslpmutwuoe\",\"name\":\"rpkhjwn\",\"type\":\"yqsluic\"}]}"; + = "{\"value\":[{\"properties\":{\"organizationId\":\"orzihle\",\"organizationName\":\"jswsrmslyz\",\"billingSource\":\"NEWRELIC\"},\"id\":\"c\",\"name\":\"ckqqzqioxiysui\",\"type\":\"zynkedya\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.organizations().list("rhvoods", "tbobz", com.azure.core.util.Context.NONE); + = manager.organizations().list("saknynfsyn", "jphuopxodlqi", com.azure.core.util.Context.NONE); - Assertions.assertEquals("cjwvn", response.iterator().next().organizationId()); - Assertions.assertEquals("ld", response.iterator().next().organizationName()); - Assertions.assertEquals(BillingSource.AZURE, response.iterator().next().billingSource()); + Assertions.assertEquals("orzihle", response.iterator().next().organizationId()); + Assertions.assertEquals("jswsrmslyz", response.iterator().next().organizationName()); + Assertions.assertEquals(BillingSource.NEWRELIC, response.iterator().next().billingSource()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListResponseTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListResponseTests.java index 3f0dbb07152a..943312c0b8ad 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListResponseTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListResponseTests.java @@ -15,31 +15,28 @@ public final class OrganizationsListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OrganizationsListResponse model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"organizationId\":\"nqpjwnzlljfmpp\",\"organizationName\":\"bvmgxsabkyqduuji\",\"billingSource\":\"NEWRELIC\"},\"id\":\"zdzevndh\",\"name\":\"rwpdappdsbdkvwrw\",\"type\":\"feusnhut\"},{\"properties\":{\"organizationId\":\"tmrldhugjzzdatq\",\"organizationName\":\"oc\",\"billingSource\":\"AZURE\"},\"id\":\"blgphuticn\",\"name\":\"vkaozwyiftyhxhur\",\"type\":\"k\"},{\"properties\":{\"organizationId\":\"xolniwpwcukjfk\",\"organizationName\":\"awxklr\",\"billingSource\":\"NEWRELIC\"},\"id\":\"ckbasyypndd\",\"name\":\"sgcbac\",\"type\":\"hejkotynqgou\"}],\"nextLink\":\"ndlik\"}") + "{\"value\":[{\"properties\":{\"organizationId\":\"ryplwckbasyypn\",\"organizationName\":\"hsgcbacphejkot\",\"billingSource\":\"AZURE\"},\"id\":\"oulzndlikwyq\",\"name\":\"gfgibm\",\"type\":\"dgak\"},{\"properties\":{\"organizationId\":\"rxybz\",\"organizationName\":\"e\",\"billingSource\":\"AZURE\"},\"id\":\"bciqfouflm\",\"name\":\"nkzsmodmglou\",\"type\":\"pbkwtmu\"}],\"nextLink\":\"uqktap\"}") .toObject(OrganizationsListResponse.class); - Assertions.assertEquals("nqpjwnzlljfmpp", model.value().get(0).organizationId()); - Assertions.assertEquals("bvmgxsabkyqduuji", model.value().get(0).organizationName()); - Assertions.assertEquals(BillingSource.NEWRELIC, model.value().get(0).billingSource()); - Assertions.assertEquals("ndlik", model.nextLink()); + Assertions.assertEquals("ryplwckbasyypn", model.value().get(0).organizationId()); + Assertions.assertEquals("hsgcbacphejkot", model.value().get(0).organizationName()); + Assertions.assertEquals(BillingSource.AZURE, model.value().get(0).billingSource()); + Assertions.assertEquals("uqktap", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { OrganizationsListResponse model = new OrganizationsListResponse().withValue(Arrays.asList( - new OrganizationResourceInner().withOrganizationId("nqpjwnzlljfmpp") - .withOrganizationName("bvmgxsabkyqduuji") - .withBillingSource(BillingSource.NEWRELIC), - new OrganizationResourceInner().withOrganizationId("tmrldhugjzzdatq") - .withOrganizationName("oc") + new OrganizationResourceInner().withOrganizationId("ryplwckbasyypn") + .withOrganizationName("hsgcbacphejkot") .withBillingSource(BillingSource.AZURE), - new OrganizationResourceInner().withOrganizationId("xolniwpwcukjfk") - .withOrganizationName("awxklr") - .withBillingSource(BillingSource.NEWRELIC))) - .withNextLink("ndlik"); + new OrganizationResourceInner().withOrganizationId("rxybz") + .withOrganizationName("e") + .withBillingSource(BillingSource.AZURE))) + .withNextLink("uqktap"); model = BinaryData.fromObject(model).toObject(OrganizationsListResponse.class); - Assertions.assertEquals("nqpjwnzlljfmpp", model.value().get(0).organizationId()); - Assertions.assertEquals("bvmgxsabkyqduuji", model.value().get(0).organizationName()); - Assertions.assertEquals(BillingSource.NEWRELIC, model.value().get(0).billingSource()); - Assertions.assertEquals("ndlik", model.nextLink()); + Assertions.assertEquals("ryplwckbasyypn", model.value().get(0).organizationId()); + Assertions.assertEquals("hsgcbacphejkot", model.value().get(0).organizationName()); + Assertions.assertEquals(BillingSource.AZURE, model.value().get(0).billingSource()); + Assertions.assertEquals("uqktap", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PartnerBillingEntityTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PartnerBillingEntityTests.java index ef9070a10cbc..ad6af2990bab 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PartnerBillingEntityTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PartnerBillingEntityTests.java @@ -12,18 +12,18 @@ public final class PartnerBillingEntityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartnerBillingEntity model - = BinaryData.fromString("{\"organizationId\":\"dnvowg\",\"organizationName\":\"jugwdkcglhsl\"}") + = BinaryData.fromString("{\"organizationId\":\"a\",\"organizationName\":\"uhrzayvvt\"}") .toObject(PartnerBillingEntity.class); - Assertions.assertEquals("dnvowg", model.organizationId()); - Assertions.assertEquals("jugwdkcglhsl", model.organizationName()); + Assertions.assertEquals("a", model.organizationId()); + Assertions.assertEquals("uhrzayvvt", model.organizationName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PartnerBillingEntity model - = new PartnerBillingEntity().withOrganizationId("dnvowg").withOrganizationName("jugwdkcglhsl"); + = new PartnerBillingEntity().withOrganizationId("a").withOrganizationName("uhrzayvvt"); model = BinaryData.fromObject(model).toObject(PartnerBillingEntity.class); - Assertions.assertEquals("dnvowg", model.organizationId()); - Assertions.assertEquals("jugwdkcglhsl", model.organizationName()); + Assertions.assertEquals("a", model.organizationId()); + Assertions.assertEquals("uhrzayvvt", model.organizationName()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataListResponseTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataListResponseTests.java index 87e038e497f3..d46f1c637198 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataListResponseTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataListResponseTests.java @@ -7,7 +7,6 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.newrelicobservability.fluent.models.PlanDataResourceInner; import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource; -import com.azure.resourcemanager.newrelicobservability.models.BillingCycle; import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource; import com.azure.resourcemanager.newrelicobservability.models.PlanData; import com.azure.resourcemanager.newrelicobservability.models.PlanDataListResponse; @@ -20,35 +19,53 @@ public final class PlanDataListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlanDataListResponse model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"planData\":{\"usageType\":\"PAYG\",\"billingCycle\":\"WEEKLY\",\"planDetails\":\"mbe\",\"effectiveDate\":\"2021-10-01T04:14:33Z\"},\"orgCreationSource\":\"NEWRELIC\",\"accountCreationSource\":\"LIFTR\"},\"id\":\"rolfpfp\",\"name\":\"algbquxigjyjg\",\"type\":\"jaoyfhrtx\"}],\"nextLink\":\"n\"}") + "{\"value\":[{\"properties\":{\"planData\":{\"usageType\":\"PAYG\",\"billingCycle\":\"qux\",\"planDetails\":\"jyj\",\"effectiveDate\":\"2021-06-25T17:47:27Z\"},\"orgCreationSource\":\"LIFTR\",\"accountCreationSource\":\"NEWRELIC\"},\"id\":\"rtxilner\",\"name\":\"ujysvle\",\"type\":\"uvfqawrlyxwj\"},{\"properties\":{\"planData\":{\"usageType\":\"COMMITTED\",\"billingCycle\":\"wbxgjvt\",\"planDetails\":\"p\",\"effectiveDate\":\"2021-04-27T05:48:18Z\"},\"orgCreationSource\":\"NEWRELIC\",\"accountCreationSource\":\"LIFTR\"},\"id\":\"jq\",\"name\":\"uhmuouqfprwzwbn\",\"type\":\"uitnwuiz\"},{\"properties\":{\"planData\":{\"usageType\":\"COMMITTED\",\"billingCycle\":\"izuckyfihrfidfvz\",\"planDetails\":\"zuhtymwisdkfthwx\",\"effectiveDate\":\"2021-12-09T20:21:41Z\"},\"orgCreationSource\":\"LIFTR\",\"accountCreationSource\":\"LIFTR\"},\"id\":\"pvkmijcmmxdcuf\",\"name\":\"fsrpymzidnse\",\"type\":\"cxtbzsg\"}],\"nextLink\":\"c\"}") .toObject(PlanDataListResponse.class); Assertions.assertEquals(UsageType.PAYG, model.value().get(0).planData().usageType()); - Assertions.assertEquals(BillingCycle.WEEKLY, model.value().get(0).planData().billingCycle()); - Assertions.assertEquals("mbe", model.value().get(0).planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-01T04:14:33Z"), + Assertions.assertEquals("qux", model.value().get(0).planData().billingCycle()); + Assertions.assertEquals("jyj", model.value().get(0).planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-25T17:47:27Z"), model.value().get(0).planData().effectiveDate()); - Assertions.assertEquals(OrgCreationSource.NEWRELIC, model.value().get(0).orgCreationSource()); - Assertions.assertEquals(AccountCreationSource.LIFTR, model.value().get(0).accountCreationSource()); - Assertions.assertEquals("n", model.nextLink()); + Assertions.assertEquals(OrgCreationSource.LIFTR, model.value().get(0).orgCreationSource()); + Assertions.assertEquals(AccountCreationSource.NEWRELIC, model.value().get(0).accountCreationSource()); + Assertions.assertEquals("c", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PlanDataListResponse model = new PlanDataListResponse().withValue(Arrays.asList(new PlanDataResourceInner() - .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.WEEKLY) - .withPlanDetails("mbe") - .withEffectiveDate(OffsetDateTime.parse("2021-10-01T04:14:33Z"))) - .withOrgCreationSource(OrgCreationSource.NEWRELIC) - .withAccountCreationSource(AccountCreationSource.LIFTR))).withNextLink("n"); + PlanDataListResponse model + = new PlanDataListResponse() + .withValue(Arrays.asList( + new PlanDataResourceInner() + .withPlanData(new PlanData().withUsageType(UsageType.PAYG) + .withBillingCycle("qux") + .withPlanDetails("jyj") + .withEffectiveDate(OffsetDateTime.parse("2021-06-25T17:47:27Z"))) + .withOrgCreationSource(OrgCreationSource.LIFTR) + .withAccountCreationSource(AccountCreationSource.NEWRELIC), + new PlanDataResourceInner() + .withPlanData(new PlanData().withUsageType(UsageType.COMMITTED) + .withBillingCycle("wbxgjvt") + .withPlanDetails("p") + .withEffectiveDate(OffsetDateTime.parse("2021-04-27T05:48:18Z"))) + .withOrgCreationSource(OrgCreationSource.NEWRELIC) + .withAccountCreationSource(AccountCreationSource.LIFTR), + new PlanDataResourceInner() + .withPlanData(new PlanData().withUsageType(UsageType.COMMITTED) + .withBillingCycle("izuckyfihrfidfvz") + .withPlanDetails("zuhtymwisdkfthwx") + .withEffectiveDate(OffsetDateTime.parse("2021-12-09T20:21:41Z"))) + .withOrgCreationSource(OrgCreationSource.LIFTR) + .withAccountCreationSource(AccountCreationSource.LIFTR))) + .withNextLink("c"); model = BinaryData.fromObject(model).toObject(PlanDataListResponse.class); Assertions.assertEquals(UsageType.PAYG, model.value().get(0).planData().usageType()); - Assertions.assertEquals(BillingCycle.WEEKLY, model.value().get(0).planData().billingCycle()); - Assertions.assertEquals("mbe", model.value().get(0).planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-01T04:14:33Z"), + Assertions.assertEquals("qux", model.value().get(0).planData().billingCycle()); + Assertions.assertEquals("jyj", model.value().get(0).planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-25T17:47:27Z"), model.value().get(0).planData().effectiveDate()); - Assertions.assertEquals(OrgCreationSource.NEWRELIC, model.value().get(0).orgCreationSource()); - Assertions.assertEquals(AccountCreationSource.LIFTR, model.value().get(0).accountCreationSource()); - Assertions.assertEquals("n", model.nextLink()); + Assertions.assertEquals(OrgCreationSource.LIFTR, model.value().get(0).orgCreationSource()); + Assertions.assertEquals(AccountCreationSource.NEWRELIC, model.value().get(0).accountCreationSource()); + Assertions.assertEquals("c", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataPropertiesTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataPropertiesTests.java index 1a24aa4aca48..1fe69866befd 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataPropertiesTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataPropertiesTests.java @@ -7,7 +7,6 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.newrelicobservability.fluent.models.PlanDataProperties; import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource; -import com.azure.resourcemanager.newrelicobservability.models.BillingCycle; import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource; import com.azure.resourcemanager.newrelicobservability.models.PlanData; import com.azure.resourcemanager.newrelicobservability.models.UsageType; @@ -18,31 +17,31 @@ public final class PlanDataPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlanDataProperties model = BinaryData.fromString( - "{\"planData\":{\"usageType\":\"PAYG\",\"billingCycle\":\"WEEKLY\",\"planDetails\":\"rwzwbng\",\"effectiveDate\":\"2021-01-28T09:21:30Z\"},\"orgCreationSource\":\"LIFTR\",\"accountCreationSource\":\"LIFTR\"}") + "{\"planData\":{\"usageType\":\"PAYG\",\"billingCycle\":\"jtckwhdso\",\"planDetails\":\"iy\",\"effectiveDate\":\"2021-01-18T03:53:41Z\"},\"orgCreationSource\":\"LIFTR\",\"accountCreationSource\":\"NEWRELIC\"}") .toObject(PlanDataProperties.class); Assertions.assertEquals(UsageType.PAYG, model.planData().usageType()); - Assertions.assertEquals(BillingCycle.WEEKLY, model.planData().billingCycle()); - Assertions.assertEquals("rwzwbng", model.planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-28T09:21:30Z"), model.planData().effectiveDate()); + Assertions.assertEquals("jtckwhdso", model.planData().billingCycle()); + Assertions.assertEquals("iy", model.planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T03:53:41Z"), model.planData().effectiveDate()); Assertions.assertEquals(OrgCreationSource.LIFTR, model.orgCreationSource()); - Assertions.assertEquals(AccountCreationSource.LIFTR, model.accountCreationSource()); + Assertions.assertEquals(AccountCreationSource.NEWRELIC, model.accountCreationSource()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlanDataProperties model = new PlanDataProperties() .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.WEEKLY) - .withPlanDetails("rwzwbng") - .withEffectiveDate(OffsetDateTime.parse("2021-01-28T09:21:30Z"))) + .withBillingCycle("jtckwhdso") + .withPlanDetails("iy") + .withEffectiveDate(OffsetDateTime.parse("2021-01-18T03:53:41Z"))) .withOrgCreationSource(OrgCreationSource.LIFTR) - .withAccountCreationSource(AccountCreationSource.LIFTR); + .withAccountCreationSource(AccountCreationSource.NEWRELIC); model = BinaryData.fromObject(model).toObject(PlanDataProperties.class); Assertions.assertEquals(UsageType.PAYG, model.planData().usageType()); - Assertions.assertEquals(BillingCycle.WEEKLY, model.planData().billingCycle()); - Assertions.assertEquals("rwzwbng", model.planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-28T09:21:30Z"), model.planData().effectiveDate()); + Assertions.assertEquals("jtckwhdso", model.planData().billingCycle()); + Assertions.assertEquals("iy", model.planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T03:53:41Z"), model.planData().effectiveDate()); Assertions.assertEquals(OrgCreationSource.LIFTR, model.orgCreationSource()); - Assertions.assertEquals(AccountCreationSource.LIFTR, model.accountCreationSource()); + Assertions.assertEquals(AccountCreationSource.NEWRELIC, model.accountCreationSource()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataResourceInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataResourceInnerTests.java index cc403280df95..0f28c7dd2efb 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataResourceInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataResourceInnerTests.java @@ -7,7 +7,6 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.newrelicobservability.fluent.models.PlanDataResourceInner; import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource; -import com.azure.resourcemanager.newrelicobservability.models.BillingCycle; import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource; import com.azure.resourcemanager.newrelicobservability.models.PlanData; import com.azure.resourcemanager.newrelicobservability.models.UsageType; @@ -18,31 +17,31 @@ public final class PlanDataResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlanDataResourceInner model = BinaryData.fromString( - "{\"properties\":{\"planData\":{\"usageType\":\"PAYG\",\"billingCycle\":\"MONTHLY\",\"planDetails\":\"l\",\"effectiveDate\":\"2020-12-23T01:20:43Z\"},\"orgCreationSource\":\"NEWRELIC\",\"accountCreationSource\":\"LIFTR\"},\"id\":\"rlyxwjkcprbnw\",\"name\":\"xgjvtbv\",\"type\":\"ysszdnrujqguh\"}") + "{\"properties\":{\"planData\":{\"usageType\":\"COMMITTED\",\"billingCycle\":\"dwzjeiach\",\"planDetails\":\"osfln\",\"effectiveDate\":\"2021-02-05T00:34:52Z\"},\"orgCreationSource\":\"LIFTR\",\"accountCreationSource\":\"LIFTR\"},\"id\":\"ehzzvypyqrim\",\"name\":\"inpvswjdkirsoodq\",\"type\":\"hc\"}") .toObject(PlanDataResourceInner.class); - Assertions.assertEquals(UsageType.PAYG, model.planData().usageType()); - Assertions.assertEquals(BillingCycle.MONTHLY, model.planData().billingCycle()); - Assertions.assertEquals("l", model.planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-23T01:20:43Z"), model.planData().effectiveDate()); - Assertions.assertEquals(OrgCreationSource.NEWRELIC, model.orgCreationSource()); + Assertions.assertEquals(UsageType.COMMITTED, model.planData().usageType()); + Assertions.assertEquals("dwzjeiach", model.planData().billingCycle()); + Assertions.assertEquals("osfln", model.planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-05T00:34:52Z"), model.planData().effectiveDate()); + Assertions.assertEquals(OrgCreationSource.LIFTR, model.orgCreationSource()); Assertions.assertEquals(AccountCreationSource.LIFTR, model.accountCreationSource()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlanDataResourceInner model = new PlanDataResourceInner() - .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.MONTHLY) - .withPlanDetails("l") - .withEffectiveDate(OffsetDateTime.parse("2020-12-23T01:20:43Z"))) - .withOrgCreationSource(OrgCreationSource.NEWRELIC) + .withPlanData(new PlanData().withUsageType(UsageType.COMMITTED) + .withBillingCycle("dwzjeiach") + .withPlanDetails("osfln") + .withEffectiveDate(OffsetDateTime.parse("2021-02-05T00:34:52Z"))) + .withOrgCreationSource(OrgCreationSource.LIFTR) .withAccountCreationSource(AccountCreationSource.LIFTR); model = BinaryData.fromObject(model).toObject(PlanDataResourceInner.class); - Assertions.assertEquals(UsageType.PAYG, model.planData().usageType()); - Assertions.assertEquals(BillingCycle.MONTHLY, model.planData().billingCycle()); - Assertions.assertEquals("l", model.planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-23T01:20:43Z"), model.planData().effectiveDate()); - Assertions.assertEquals(OrgCreationSource.NEWRELIC, model.orgCreationSource()); + Assertions.assertEquals(UsageType.COMMITTED, model.planData().usageType()); + Assertions.assertEquals("dwzjeiach", model.planData().billingCycle()); + Assertions.assertEquals("osfln", model.planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-05T00:34:52Z"), model.planData().effectiveDate()); + Assertions.assertEquals(OrgCreationSource.LIFTR, model.orgCreationSource()); Assertions.assertEquals(AccountCreationSource.LIFTR, model.accountCreationSource()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataTests.java index f7427e96d244..e2c4ca9555eb 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataTests.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.newrelicobservability.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.newrelicobservability.models.BillingCycle; import com.azure.resourcemanager.newrelicobservability.models.PlanData; import com.azure.resourcemanager.newrelicobservability.models.UsageType; import java.time.OffsetDateTime; @@ -15,24 +14,24 @@ public final class PlanDataTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlanData model = BinaryData.fromString( - "{\"usageType\":\"COMMITTED\",\"billingCycle\":\"WEEKLY\",\"planDetails\":\"gsntnbybkzgcwr\",\"effectiveDate\":\"2021-09-26T22:03:54Z\"}") + "{\"usageType\":\"COMMITTED\",\"billingCycle\":\"vwrwj\",\"planDetails\":\"usnhutje\",\"effectiveDate\":\"2021-05-06T12:31:07Z\"}") .toObject(PlanData.class); Assertions.assertEquals(UsageType.COMMITTED, model.usageType()); - Assertions.assertEquals(BillingCycle.WEEKLY, model.billingCycle()); - Assertions.assertEquals("gsntnbybkzgcwr", model.planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-26T22:03:54Z"), model.effectiveDate()); + Assertions.assertEquals("vwrwj", model.billingCycle()); + Assertions.assertEquals("usnhutje", model.planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T12:31:07Z"), model.effectiveDate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlanData model = new PlanData().withUsageType(UsageType.COMMITTED) - .withBillingCycle(BillingCycle.WEEKLY) - .withPlanDetails("gsntnbybkzgcwr") - .withEffectiveDate(OffsetDateTime.parse("2021-09-26T22:03:54Z")); + .withBillingCycle("vwrwj") + .withPlanDetails("usnhutje") + .withEffectiveDate(OffsetDateTime.parse("2021-05-06T12:31:07Z")); model = BinaryData.fromObject(model).toObject(PlanData.class); Assertions.assertEquals(UsageType.COMMITTED, model.usageType()); - Assertions.assertEquals(BillingCycle.WEEKLY, model.billingCycle()); - Assertions.assertEquals("gsntnbybkzgcwr", model.planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-26T22:03:54Z"), model.effectiveDate()); + Assertions.assertEquals("vwrwj", model.billingCycle()); + Assertions.assertEquals("usnhutje", model.planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T12:31:07Z"), model.effectiveDate()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListMockTests.java index a3a931ee7706..064d5a58e07d 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListMockTests.java @@ -7,12 +7,11 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource; -import com.azure.resourcemanager.newrelicobservability.models.BillingCycle; import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource; import com.azure.resourcemanager.newrelicobservability.models.PlanDataResource; import com.azure.resourcemanager.newrelicobservability.models.UsageType; @@ -26,24 +25,24 @@ public final class PlansListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"planData\":{\"usageType\":\"PAYG\",\"billingCycle\":\"MONTHLY\",\"planDetails\":\"ft\",\"effectiveDate\":\"2021-05-16T02:46:56Z\"},\"orgCreationSource\":\"NEWRELIC\",\"accountCreationSource\":\"NEWRELIC\"},\"id\":\"zvqtmnubexkp\",\"name\":\"ksmond\",\"type\":\"mquxvypo\"}]}"; + = "{\"value\":[{\"properties\":{\"planData\":{\"usageType\":\"PAYG\",\"billingCycle\":\"mnzgmwznmabi\",\"planDetails\":\"sorgj\",\"effectiveDate\":\"2021-10-23T19:23:01Z\"},\"orgCreationSource\":\"NEWRELIC\",\"accountCreationSource\":\"LIFTR\"},\"id\":\"wrlkdmtn\",\"name\":\"vokotllxdyh\",\"type\":\"syocogjltdtbnnha\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.plans().list("dggkzzlvmbmpa", "modfvuefywsbpfvm", com.azure.core.util.Context.NONE); + = manager.plans().list("rwyhqmibzyhwitsm", "pyy", com.azure.core.util.Context.NONE); Assertions.assertEquals(UsageType.PAYG, response.iterator().next().planData().usageType()); - Assertions.assertEquals(BillingCycle.MONTHLY, response.iterator().next().planData().billingCycle()); - Assertions.assertEquals("ft", response.iterator().next().planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-16T02:46:56Z"), + Assertions.assertEquals("mnzgmwznmabi", response.iterator().next().planData().billingCycle()); + Assertions.assertEquals("sorgj", response.iterator().next().planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-23T19:23:01Z"), response.iterator().next().planData().effectiveDate()); Assertions.assertEquals(OrgCreationSource.NEWRELIC, response.iterator().next().orgCreationSource()); - Assertions.assertEquals(AccountCreationSource.NEWRELIC, response.iterator().next().accountCreationSource()); + Assertions.assertEquals(AccountCreationSource.LIFTR, response.iterator().next().accountCreationSource()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ResubscribePropertiesTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ResubscribePropertiesTests.java new file mode 100644 index 000000000000..702815d3a7b0 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ResubscribePropertiesTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.newrelicobservability.models.ResubscribeProperties; +import org.junit.jupiter.api.Assertions; + +public final class ResubscribePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ResubscribeProperties model = BinaryData.fromString( + "{\"planId\":\"aiuebbaumnyqu\",\"termId\":\"deoj\",\"subscriptionId\":\"bckhsmtxpsi\",\"resourceGroup\":\"tfhvpesapskrdqmh\",\"organizationId\":\"dhtldwkyz\",\"publisherId\":\"utknc\",\"offerId\":\"cwsvlxotog\"}") + .toObject(ResubscribeProperties.class); + Assertions.assertEquals("aiuebbaumnyqu", model.planId()); + Assertions.assertEquals("deoj", model.termId()); + Assertions.assertEquals("bckhsmtxpsi", model.subscriptionId()); + Assertions.assertEquals("tfhvpesapskrdqmh", model.resourceGroup()); + Assertions.assertEquals("dhtldwkyz", model.organizationId()); + Assertions.assertEquals("utknc", model.publisherId()); + Assertions.assertEquals("cwsvlxotog", model.offerId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ResubscribeProperties model = new ResubscribeProperties().withPlanId("aiuebbaumnyqu") + .withTermId("deoj") + .withSubscriptionId("bckhsmtxpsi") + .withResourceGroup("tfhvpesapskrdqmh") + .withOrganizationId("dhtldwkyz") + .withPublisherId("utknc") + .withOfferId("cwsvlxotog"); + model = BinaryData.fromObject(model).toObject(ResubscribeProperties.class); + Assertions.assertEquals("aiuebbaumnyqu", model.planId()); + Assertions.assertEquals("deoj", model.termId()); + Assertions.assertEquals("bckhsmtxpsi", model.subscriptionId()); + Assertions.assertEquals("tfhvpesapskrdqmh", model.resourceGroup()); + Assertions.assertEquals("dhtldwkyz", model.organizationId()); + Assertions.assertEquals("utknc", model.publisherId()); + Assertions.assertEquals("cwsvlxotog", model.offerId()); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSActivateResourceWithResponseMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSActivateResourceWithResponseMockTests.java new file mode 100644 index 000000000000..3599752bd48e --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSActivateResourceWithResponseMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; +import com.azure.resourcemanager.newrelicobservability.models.ActivateSaaSParameterRequest; +import com.azure.resourcemanager.newrelicobservability.models.SaaSResourceDetailsResponse; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SaaSActivateResourceWithResponseMockTests { + @Test + public void testActivateResourceWithResponse() throws Exception { + String responseStr + = "{\"saasId\":\"pppcqeqxo\",\"id\":\"dahzxctobg\",\"name\":\"kdmoi\",\"type\":\"postmgrcfbunrm\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + SaaSResourceDetailsResponse response = manager.saaS() + .activateResourceWithResponse( + new ActivateSaaSParameterRequest().withSaasGuid("fdygpfqbuaceopz").withPublisherId("qrhhu"), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("pppcqeqxo", response.saasId()); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSDataTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSDataTests.java new file mode 100644 index 000000000000..e9f9a9b0fecf --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSDataTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.newrelicobservability.models.SaaSData; +import org.junit.jupiter.api.Assertions; + +public final class SaaSDataTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SaaSData model = BinaryData.fromString("{\"saaSResourceId\":\"ldhugjzzdatqxh\"}").toObject(SaaSData.class); + Assertions.assertEquals("ldhugjzzdatqxh", model.saaSResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SaaSData model = new SaaSData().withSaaSResourceId("ldhugjzzdatqxh"); + model = BinaryData.fromObject(model).toObject(SaaSData.class); + Assertions.assertEquals("ldhugjzzdatqxh", model.saaSResourceId()); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSResourceDetailsResponseInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSResourceDetailsResponseInnerTests.java new file mode 100644 index 000000000000..89054e62fd63 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSResourceDetailsResponseInnerTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.newrelicobservability.fluent.models.SaaSResourceDetailsResponseInner; +import org.junit.jupiter.api.Assertions; + +public final class SaaSResourceDetailsResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SaaSResourceDetailsResponseInner model + = BinaryData.fromString("{\"saasId\":\"oqpsoa\",\"id\":\"tazak\",\"name\":\"j\",\"type\":\"ahbc\"}") + .toObject(SaaSResourceDetailsResponseInner.class); + Assertions.assertEquals("oqpsoa", model.saasId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SaaSResourceDetailsResponseInner model = new SaaSResourceDetailsResponseInner().withSaasId("oqpsoa"); + model = BinaryData.fromObject(model).toObject(SaaSResourceDetailsResponseInner.class); + Assertions.assertEquals("oqpsoa", model.saasId()); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SubscriptionListTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SubscriptionListTests.java index 2f3f8b7af179..7a1e3af4d58d 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SubscriptionListTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SubscriptionListTests.java @@ -24,81 +24,69 @@ public final class SubscriptionListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubscriptionList model = BinaryData.fromString( - "{\"patchOperation\":\"DeleteComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"dhmdua\",\"status\":\"InProgress\",\"error\":\"qpv\",\"tagRules\":{\"provisioningState\":\"Creating\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{},{},{},{}],\"userEmail\":\"fmisg\"}}},{\"subscriptionId\":\"nbbelda\",\"status\":\"Failed\",\"error\":\"ali\",\"tagRules\":{\"provisioningState\":\"Deleting\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{},{},{},{}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{}],\"userEmail\":\"owzxcu\"}}},{\"subscriptionId\":\"cjooxdjebwpucwwf\",\"status\":\"Active\",\"error\":\"vmeueci\",\"tagRules\":{\"provisioningState\":\"Deleted\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{},{}],\"userEmail\":\"wmcdytdxwi\"}}}],\"provisioningState\":\"Deleting\"}") + "{\"patchOperation\":\"AddComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"ghkjeszzhbi\",\"status\":\"Active\",\"error\":\"fvgxbfsmxneh\",\"tagRules\":{\"provisioningState\":\"Canceled\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{},{}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{},{}],\"userEmail\":\"ukgri\"}}},{\"subscriptionId\":\"lzlfbxzpuz\",\"status\":\"Deleting\",\"error\":\"pnq\",\"tagRules\":{\"provisioningState\":\"NotSpecified\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{},{},{}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{},{},{}],\"userEmail\":\"kpikadrgvt\"}}}],\"provisioningState\":\"Deleted\"}") .toObject(SubscriptionList.class); - Assertions.assertEquals(PatchOperation.DELETE_COMPLETE, model.patchOperation()); - Assertions.assertEquals("dhmdua", model.monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("qpv", model.monitoredSubscriptionList().get(0).error()); - Assertions.assertEquals(SendAadLogsStatus.ENABLED, + Assertions.assertEquals(PatchOperation.ADD_COMPLETE, model.patchOperation()); + Assertions.assertEquals("ghkjeszzhbi", model.monitoredSubscriptionList().get(0).subscriptionId()); + Assertions.assertEquals(Status.ACTIVE, model.monitoredSubscriptionList().get(0).status()); + Assertions.assertEquals("fvgxbfsmxneh", model.monitoredSubscriptionList().get(0).error()); + Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.monitoredSubscriptionList().get(0).tagRules().logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.monitoredSubscriptionList().get(0).tagRules().logRules().sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.monitoredSubscriptionList().get(0).tagRules().logRules().sendActivityLogs()); - Assertions.assertEquals(SendMetricsStatus.ENABLED, + Assertions.assertEquals(SendMetricsStatus.DISABLED, model.monitoredSubscriptionList().get(0).tagRules().metricRules().sendMetrics()); - Assertions.assertEquals("fmisg", model.monitoredSubscriptionList().get(0).tagRules().metricRules().userEmail()); + Assertions.assertEquals("ukgri", model.monitoredSubscriptionList().get(0).tagRules().metricRules().userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SubscriptionList model - = new SubscriptionList().withPatchOperation(PatchOperation.DELETE_COMPLETE) + = new SubscriptionList().withPatchOperation(PatchOperation.ADD_COMPLETE) .withMonitoredSubscriptionList( Arrays .asList( - new MonitoredSubscriptionInner().withSubscriptionId("dhmdua") - .withStatus(Status.IN_PROGRESS) - .withError("qpv") + new MonitoredSubscriptionInner().withSubscriptionId("ghkjeszzhbi") + .withStatus(Status.ACTIVE) + .withError("fvgxbfsmxneh") .withTagRules(new MonitoringTagRulesPropertiesInner() - .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) + .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.DISABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) .withSendActivityLogs(SendActivityLogsStatus.ENABLED) - .withFilteringTags(Arrays.asList(new FilteringTag()))) + .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag()))) .withMetricRules( - new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) - .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag(), - new FilteringTag(), new FilteringTag())) - .withUserEmail("fmisg"))), - new MonitoredSubscriptionInner().withSubscriptionId("nbbelda") - .withStatus(Status.FAILED) - .withError("ali") - .withTagRules( - new MonitoringTagRulesPropertiesInner() - .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.DISABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) - .withSendActivityLogs(SendActivityLogsStatus.DISABLED) - .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag(), - new FilteringTag(), new FilteringTag()))) - .withMetricRules( - new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) - .withFilteringTags(Arrays.asList(new FilteringTag())) - .withUserEmail("owzxcu"))), - new MonitoredSubscriptionInner().withSubscriptionId("cjooxdjebwpucwwf") - .withStatus(Status.ACTIVE) - .withError("vmeueci") + new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) + .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag())) + .withUserEmail("ukgri"))), + new MonitoredSubscriptionInner().withSubscriptionId("lzlfbxzpuz") + .withStatus(Status.DELETING) + .withError("pnq") .withTagRules(new MonitoringTagRulesPropertiesInner() - .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) - .withSendActivityLogs(SendActivityLogsStatus.DISABLED) - .withFilteringTags(Arrays.asList(new FilteringTag()))) + .withLogRules( + new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) + .withSendActivityLogs(SendActivityLogsStatus.ENABLED) + .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag(), + new FilteringTag()))) .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) - .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag())) - .withUserEmail("wmcdytdxwi"))))); + .withFilteringTags( + Arrays.asList(new FilteringTag(), new FilteringTag(), new FilteringTag())) + .withUserEmail("kpikadrgvt"))))); model = BinaryData.fromObject(model).toObject(SubscriptionList.class); - Assertions.assertEquals(PatchOperation.DELETE_COMPLETE, model.patchOperation()); - Assertions.assertEquals("dhmdua", model.monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("qpv", model.monitoredSubscriptionList().get(0).error()); - Assertions.assertEquals(SendAadLogsStatus.ENABLED, + Assertions.assertEquals(PatchOperation.ADD_COMPLETE, model.patchOperation()); + Assertions.assertEquals("ghkjeszzhbi", model.monitoredSubscriptionList().get(0).subscriptionId()); + Assertions.assertEquals(Status.ACTIVE, model.monitoredSubscriptionList().get(0).status()); + Assertions.assertEquals("fvgxbfsmxneh", model.monitoredSubscriptionList().get(0).error()); + Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.monitoredSubscriptionList().get(0).tagRules().logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.monitoredSubscriptionList().get(0).tagRules().logRules().sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.monitoredSubscriptionList().get(0).tagRules().logRules().sendActivityLogs()); - Assertions.assertEquals(SendMetricsStatus.ENABLED, + Assertions.assertEquals(SendMetricsStatus.DISABLED, model.monitoredSubscriptionList().get(0).tagRules().metricRules().sendMetrics()); - Assertions.assertEquals("fmisg", model.monitoredSubscriptionList().get(0).tagRules().metricRules().userEmail()); + Assertions.assertEquals("ukgri", model.monitoredSubscriptionList().get(0).tagRules().metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SwitchBillingRequestTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SwitchBillingRequestTests.java index d3319906b60f..e8b34ff3fd76 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SwitchBillingRequestTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SwitchBillingRequestTests.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.newrelicobservability.generated; import com.azure.core.util.BinaryData; -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; @@ -16,33 +15,33 @@ public final class SwitchBillingRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SwitchBillingRequest model = BinaryData.fromString( - "{\"azureResourceId\":\"jqkwpyeicx\",\"organizationId\":\"ciwqvhk\",\"planData\":{\"usageType\":\"COMMITTED\",\"billingCycle\":\"WEEKLY\",\"planDetails\":\"topbobjogh\",\"effectiveDate\":\"2021-04-17T11:58:30Z\"},\"userEmail\":\"u\"}") + "{\"azureResourceId\":\"rupqsxvnmicy\",\"organizationId\":\"ceoveilovno\",\"planData\":{\"usageType\":\"PAYG\",\"billingCycle\":\"cnjbkcnxdhbt\",\"planDetails\":\"phywpnvj\",\"effectiveDate\":\"2021-06-01T03:51:12Z\"},\"userEmail\":\"nermcl\"}") .toObject(SwitchBillingRequest.class); - Assertions.assertEquals("jqkwpyeicx", model.azureResourceId()); - Assertions.assertEquals("ciwqvhk", model.organizationId()); - Assertions.assertEquals(UsageType.COMMITTED, model.planData().usageType()); - Assertions.assertEquals(BillingCycle.WEEKLY, model.planData().billingCycle()); - Assertions.assertEquals("topbobjogh", model.planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-17T11:58:30Z"), model.planData().effectiveDate()); - Assertions.assertEquals("u", model.userEmail()); + Assertions.assertEquals("rupqsxvnmicy", model.azureResourceId()); + Assertions.assertEquals("ceoveilovno", model.organizationId()); + Assertions.assertEquals(UsageType.PAYG, model.planData().usageType()); + Assertions.assertEquals("cnjbkcnxdhbt", model.planData().billingCycle()); + Assertions.assertEquals("phywpnvj", model.planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-01T03:51:12Z"), model.planData().effectiveDate()); + Assertions.assertEquals("nermcl", model.userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SwitchBillingRequest model = new SwitchBillingRequest().withAzureResourceId("jqkwpyeicx") - .withOrganizationId("ciwqvhk") - .withPlanData(new PlanData().withUsageType(UsageType.COMMITTED) - .withBillingCycle(BillingCycle.WEEKLY) - .withPlanDetails("topbobjogh") - .withEffectiveDate(OffsetDateTime.parse("2021-04-17T11:58:30Z"))) - .withUserEmail("u"); + SwitchBillingRequest model = new SwitchBillingRequest().withAzureResourceId("rupqsxvnmicy") + .withOrganizationId("ceoveilovno") + .withPlanData(new PlanData().withUsageType(UsageType.PAYG) + .withBillingCycle("cnjbkcnxdhbt") + .withPlanDetails("phywpnvj") + .withEffectiveDate(OffsetDateTime.parse("2021-06-01T03:51:12Z"))) + .withUserEmail("nermcl"); model = BinaryData.fromObject(model).toObject(SwitchBillingRequest.class); - Assertions.assertEquals("jqkwpyeicx", model.azureResourceId()); - Assertions.assertEquals("ciwqvhk", model.organizationId()); - Assertions.assertEquals(UsageType.COMMITTED, model.planData().usageType()); - Assertions.assertEquals(BillingCycle.WEEKLY, model.planData().billingCycle()); - Assertions.assertEquals("topbobjogh", model.planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-17T11:58:30Z"), model.planData().effectiveDate()); - Assertions.assertEquals("u", model.userEmail()); + Assertions.assertEquals("rupqsxvnmicy", model.azureResourceId()); + Assertions.assertEquals("ceoveilovno", model.organizationId()); + Assertions.assertEquals(UsageType.PAYG, model.planData().usageType()); + Assertions.assertEquals("cnjbkcnxdhbt", model.planData().billingCycle()); + Assertions.assertEquals("phywpnvj", model.planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-01T03:51:12Z"), model.planData().effectiveDate()); + Assertions.assertEquals("nermcl", model.userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleInnerTests.java index 407da58ba8e2..97b563c2d75d 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleInnerTests.java @@ -21,48 +21,49 @@ public final class TagRuleInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TagRuleInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Deleting\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"yokacspkw\",\"value\":\"zdobpxjmflbvvnch\",\"action\":\"Include\"},{\"name\":\"iwwzjuqk\",\"value\":\"sa\",\"action\":\"Exclude\"},{\"name\":\"uo\",\"value\":\"skghsauuimj\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"idyjrrfbyaosvexc\",\"value\":\"npc\",\"action\":\"Exclude\"},{\"name\":\"ohslkevlegg\",\"value\":\"buhfmvfaxkffeiit\",\"action\":\"Include\"}],\"userEmail\":\"ez\"}},\"id\":\"shxmzsbbzoggigrx\",\"name\":\"burvjxxjnspy\",\"type\":\"ptkoenkoukn\"}") + "{\"properties\":{\"provisioningState\":\"Creating\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"yvjusrtslhsp\",\"value\":\"eemaofmxagkvtme\",\"action\":\"Exclude\"},{\"name\":\"rhahvljuahaquhcd\",\"value\":\"duala\",\"action\":\"Include\"}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"ws\",\"value\":\"r\",\"action\":\"Include\"},{\"name\":\"vgomz\",\"value\":\"misgwbnb\",\"action\":\"Exclude\"},{\"name\":\"awkz\",\"value\":\"liourqhak\",\"action\":\"Exclude\"},{\"name\":\"shsfwxosowzxcu\",\"value\":\"cjooxdjebwpucwwf\",\"action\":\"Include\"}],\"userEmail\":\"vmeueci\"}},\"id\":\"hzceuojgjrwjue\",\"name\":\"otwmcdyt\",\"type\":\"x\"}") .toObject(TagRuleInner.class); Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.logRules().sendActivityLogs()); - Assertions.assertEquals("yokacspkw", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("zdobpxjmflbvvnch", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, model.metricRules().sendMetrics()); - Assertions.assertEquals("idyjrrfbyaosvexc", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("npc", model.metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("ez", model.metricRules().userEmail()); + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.logRules().sendSubscriptionLogs()); + Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.logRules().sendActivityLogs()); + Assertions.assertEquals("yvjusrtslhsp", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("eemaofmxagkvtme", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.metricRules().sendMetrics()); + Assertions.assertEquals("ws", model.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("r", model.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); + Assertions.assertEquals("vmeueci", model.metricRules().userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { TagRuleInner model = new TagRuleInner().withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) - .withSendActivityLogs(SendActivityLogsStatus.DISABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) + .withSendActivityLogs(SendActivityLogsStatus.ENABLED) .withFilteringTags(Arrays.asList( - new FilteringTag().withName("yokacspkw").withValue("zdobpxjmflbvvnch").withAction(TagAction.INCLUDE), - new FilteringTag().withName("iwwzjuqk").withValue("sa").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("uo").withValue("skghsauuimj").withAction(TagAction.EXCLUDE)))) - .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) - .withFilteringTags(Arrays.asList( - new FilteringTag().withName("idyjrrfbyaosvexc").withValue("npc").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("ohslkevlegg") - .withValue("buhfmvfaxkffeiit") - .withAction(TagAction.INCLUDE))) - .withUserEmail("ez")); + new FilteringTag().withName("yvjusrtslhsp").withValue("eemaofmxagkvtme").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("rhahvljuahaquhcd").withValue("duala").withAction(TagAction.INCLUDE)))) + .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) + .withFilteringTags( + Arrays.asList(new FilteringTag().withName("ws").withValue("r").withAction(TagAction.INCLUDE), + new FilteringTag().withName("vgomz").withValue("misgwbnb").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("awkz").withValue("liourqhak").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("shsfwxosowzxcu") + .withValue("cjooxdjebwpucwwf") + .withAction(TagAction.INCLUDE))) + .withUserEmail("vmeueci")); model = BinaryData.fromObject(model).toObject(TagRuleInner.class); Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.logRules().sendActivityLogs()); - Assertions.assertEquals("yokacspkw", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("zdobpxjmflbvvnch", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, model.metricRules().sendMetrics()); - Assertions.assertEquals("idyjrrfbyaosvexc", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("npc", model.metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("ez", model.metricRules().userEmail()); + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.logRules().sendSubscriptionLogs()); + Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.logRules().sendActivityLogs()); + Assertions.assertEquals("yvjusrtslhsp", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("eemaofmxagkvtme", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.metricRules().sendMetrics()); + Assertions.assertEquals("ws", model.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("r", model.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); + Assertions.assertEquals("vmeueci", model.metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleListResultTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleListResultTests.java index c17779ba63ad..4d403d67f861 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleListResultTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleListResultTests.java @@ -21,36 +21,45 @@ public final class TagRuleListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TagRuleListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"NotSpecified\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{},{}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{},{},{},{}],\"userEmail\":\"stkiiuxhqyud\"}},\"id\":\"rrqnbpoczvyifqrv\",\"name\":\"dvjsllrmvvdf\",\"type\":\"atkpnp\"}],\"nextLink\":\"exxbczwtr\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{},{}],\"userEmail\":\"bjtazqugxywpmu\"}},\"id\":\"fjz\",\"name\":\"fqkquj\",\"type\":\"dsuyonobgla\"},{\"properties\":{\"provisioningState\":\"Failed\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{},{},{},{}],\"userEmail\":\"yrxvwfudwpznt\"}},\"id\":\"dzhlrq\",\"name\":\"bh\",\"type\":\"kfrlhrxsbky\"}],\"nextLink\":\"ycanuzbpzkafku\"}") .toObject(TagRuleListResult.class); Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.value().get(0).logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.value().get(0).logRules().sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.value().get(0).logRules().sendActivityLogs()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, model.value().get(0).metricRules().sendMetrics()); - Assertions.assertEquals("stkiiuxhqyud", model.value().get(0).metricRules().userEmail()); - Assertions.assertEquals("exxbczwtr", model.nextLink()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.value().get(0).metricRules().sendMetrics()); + Assertions.assertEquals("bjtazqugxywpmu", model.value().get(0).metricRules().userEmail()); + Assertions.assertEquals("ycanuzbpzkafku", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TagRuleListResult model = new TagRuleListResult().withValue(Arrays.asList(new TagRuleInner() - .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) - .withSendActivityLogs(SendActivityLogsStatus.ENABLED) - .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag()))) - .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) - .withFilteringTags( - Arrays.asList(new FilteringTag(), new FilteringTag(), new FilteringTag(), new FilteringTag())) - .withUserEmail("stkiiuxhqyud")))) - .withNextLink("exxbczwtr"); + TagRuleListResult model = new TagRuleListResult().withValue(Arrays.asList( + new TagRuleInner() + .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) + .withSendActivityLogs(SendActivityLogsStatus.ENABLED) + .withFilteringTags(Arrays.asList(new FilteringTag()))) + .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) + .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag())) + .withUserEmail("bjtazqugxywpmu")), + new TagRuleInner() + .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) + .withSendActivityLogs(SendActivityLogsStatus.DISABLED) + .withFilteringTags(Arrays.asList(new FilteringTag()))) + .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) + .withFilteringTags( + Arrays.asList(new FilteringTag(), new FilteringTag(), new FilteringTag(), new FilteringTag())) + .withUserEmail("yrxvwfudwpznt")))) + .withNextLink("ycanuzbpzkafku"); model = BinaryData.fromObject(model).toObject(TagRuleListResult.class); Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.value().get(0).logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.value().get(0).logRules().sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.value().get(0).logRules().sendActivityLogs()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, model.value().get(0).metricRules().sendMetrics()); - Assertions.assertEquals("stkiiuxhqyud", model.value().get(0).metricRules().userEmail()); - Assertions.assertEquals("exxbczwtr", model.nextLink()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.value().get(0).metricRules().sendMetrics()); + Assertions.assertEquals("bjtazqugxywpmu", model.value().get(0).metricRules().userEmail()); + Assertions.assertEquals("ycanuzbpzkafku", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdateInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdateInnerTests.java index 27c37b9679eb..5d0ecd6dfd50 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdateInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdateInnerTests.java @@ -21,48 +21,51 @@ public final class TagRuleUpdateInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TagRuleUpdateInner model = BinaryData.fromString( - "{\"properties\":{\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"pwvlqdq\",\"value\":\"iqylihkaetck\",\"action\":\"Exclude\"},{\"name\":\"ivfsnk\",\"value\":\"uctqhjfbe\",\"action\":\"Exclude\"},{\"name\":\"xerf\",\"value\":\"utttxfvjrbirp\",\"action\":\"Exclude\"},{\"name\":\"c\",\"value\":\"ahfn\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"ujqgidok\",\"value\":\"ljyoxgvcltb\",\"action\":\"Include\"},{\"name\":\"ghkjeszzhbi\",\"value\":\"txfvgx\",\"action\":\"Include\"}],\"userEmail\":\"xnehmpvec\"}}}") + "{\"properties\":{\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"gxhnisk\",\"value\":\"bkpyc\",\"action\":\"Include\"},{\"name\":\"ndnhj\",\"value\":\"uwhvylwzbtdhxujz\",\"action\":\"Include\"},{\"name\":\"ow\",\"value\":\"przqlveu\",\"action\":\"Include\"}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"xobbcswsrt\",\"value\":\"iplrbpbewtghfgb\",\"action\":\"Include\"},{\"name\":\"xzvlvqhjkbegib\",\"value\":\"mxiebw\",\"action\":\"Include\"},{\"name\":\"ayqcgw\",\"value\":\"zjuzgwyz\",\"action\":\"Include\"},{\"name\":\"ongmtsa\",\"value\":\"cbpwxqpsrknft\",\"action\":\"Exclude\"}],\"userEmail\":\"iuhprwmdyvxqta\"}}}") .toObject(TagRuleUpdateInner.class); Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.logRules().sendActivityLogs()); - Assertions.assertEquals("pwvlqdq", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("iqylihkaetck", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, model.metricRules().sendMetrics()); - Assertions.assertEquals("ujqgidok", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("ljyoxgvcltb", model.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, model.logRules().sendSubscriptionLogs()); + Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.logRules().sendActivityLogs()); + Assertions.assertEquals("gxhnisk", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("bkpyc", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.metricRules().sendMetrics()); + Assertions.assertEquals("xobbcswsrt", model.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("iplrbpbewtghfgb", model.metricRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("xnehmpvec", model.metricRules().userEmail()); + Assertions.assertEquals("iuhprwmdyvxqta", model.metricRules().userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { TagRuleUpdateInner model = new TagRuleUpdateInner() .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.DISABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) - .withSendActivityLogs(SendActivityLogsStatus.DISABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) + .withSendActivityLogs(SendActivityLogsStatus.ENABLED) .withFilteringTags(Arrays.asList( - new FilteringTag().withName("pwvlqdq").withValue("iqylihkaetck").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("ivfsnk").withValue("uctqhjfbe").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("xerf").withValue("utttxfvjrbirp").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("c").withValue("ahfn").withAction(TagAction.EXCLUDE)))) - .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) + new FilteringTag().withName("gxhnisk").withValue("bkpyc").withAction(TagAction.INCLUDE), + new FilteringTag().withName("ndnhj").withValue("uwhvylwzbtdhxujz").withAction(TagAction.INCLUDE), + new FilteringTag().withName("ow").withValue("przqlveu").withAction(TagAction.INCLUDE)))) + .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) .withFilteringTags(Arrays.asList( - new FilteringTag().withName("ujqgidok").withValue("ljyoxgvcltb").withAction(TagAction.INCLUDE), - new FilteringTag().withName("ghkjeszzhbi").withValue("txfvgx").withAction(TagAction.INCLUDE))) - .withUserEmail("xnehmpvec")); + new FilteringTag().withName("xobbcswsrt") + .withValue("iplrbpbewtghfgb") + .withAction(TagAction.INCLUDE), + new FilteringTag().withName("xzvlvqhjkbegib").withValue("mxiebw").withAction(TagAction.INCLUDE), + new FilteringTag().withName("ayqcgw").withValue("zjuzgwyz").withAction(TagAction.INCLUDE), + new FilteringTag().withName("ongmtsa").withValue("cbpwxqpsrknft").withAction(TagAction.EXCLUDE))) + .withUserEmail("iuhprwmdyvxqta")); model = BinaryData.fromObject(model).toObject(TagRuleUpdateInner.class); Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.logRules().sendActivityLogs()); - Assertions.assertEquals("pwvlqdq", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("iqylihkaetck", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, model.metricRules().sendMetrics()); - Assertions.assertEquals("ujqgidok", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("ljyoxgvcltb", model.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, model.logRules().sendSubscriptionLogs()); + Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.logRules().sendActivityLogs()); + Assertions.assertEquals("gxhnisk", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("bkpyc", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.metricRules().sendMetrics()); + Assertions.assertEquals("xobbcswsrt", model.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("iplrbpbewtghfgb", model.metricRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("xnehmpvec", model.metricRules().userEmail()); + Assertions.assertEquals("iuhprwmdyvxqta", model.metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdatePropertiesInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdatePropertiesInnerTests.java index b1b26ba8c490..e316919534b7 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdatePropertiesInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdatePropertiesInnerTests.java @@ -21,48 +21,48 @@ public final class TagRuleUpdatePropertiesInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TagRuleUpdatePropertiesInner model = BinaryData.fromString( - "{\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"bmpukgriwflz\",\"value\":\"bxzpuzycisp\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"rp\",\"value\":\"dhibnuq\",\"action\":\"Include\"},{\"name\":\"kadrgvt\",\"value\":\"gnbuy\",\"action\":\"Exclude\"},{\"name\":\"gg\",\"value\":\"bfs\",\"action\":\"Include\"},{\"name\":\"utrc\",\"value\":\"na\",\"action\":\"Exclude\"}],\"userEmail\":\"jrunmpxtt\"}}") + "{\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"xrmcqibycnojvk\",\"value\":\"e\",\"action\":\"Exclude\"},{\"name\":\"zvahapjy\",\"value\":\"pvgqzcjrvxdjzlm\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"zovawjvz\",\"value\":\"luthn\",\"action\":\"Include\"},{\"name\":\"xipeilpjzuaejx\",\"value\":\"ltskzbbtd\",\"action\":\"Include\"},{\"name\":\"e\",\"value\":\"gpw\",\"action\":\"Include\"},{\"name\":\"kfpbs\",\"value\":\"ofd\",\"action\":\"Exclude\"}],\"userEmail\":\"sd\"}}") .toObject(TagRuleUpdatePropertiesInner.class); - Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.logRules().sendAadLogs()); + Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.logRules().sendAadLogs()); Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.logRules().sendActivityLogs()); - Assertions.assertEquals("bmpukgriwflz", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("bxzpuzycisp", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.logRules().sendActivityLogs()); + Assertions.assertEquals("xrmcqibycnojvk", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("e", model.logRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, model.metricRules().sendMetrics()); - Assertions.assertEquals("rp", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("dhibnuq", model.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.metricRules().sendMetrics()); + Assertions.assertEquals("zovawjvz", model.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("luthn", model.metricRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("jrunmpxtt", model.metricRules().userEmail()); + Assertions.assertEquals("sd", model.metricRules().userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TagRuleUpdatePropertiesInner model = new TagRuleUpdatePropertiesInner() - .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.DISABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) - .withSendActivityLogs(SendActivityLogsStatus.ENABLED) - .withFilteringTags(Arrays.asList(new FilteringTag().withName("bmpukgriwflz") - .withValue("bxzpuzycisp") - .withAction(TagAction.EXCLUDE)))) - .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) - .withFilteringTags( - Arrays.asList(new FilteringTag().withName("rp").withValue("dhibnuq").withAction(TagAction.INCLUDE), - new FilteringTag().withName("kadrgvt").withValue("gnbuy").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("gg").withValue("bfs").withAction(TagAction.INCLUDE), - new FilteringTag().withName("utrc").withValue("na").withAction(TagAction.EXCLUDE))) - .withUserEmail("jrunmpxtt")); + TagRuleUpdatePropertiesInner model = new TagRuleUpdatePropertiesInner().withLogRules(new LogRules() + .withSendAadLogs(SendAadLogsStatus.ENABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) + .withSendActivityLogs(SendActivityLogsStatus.DISABLED) + .withFilteringTags(Arrays.asList( + new FilteringTag().withName("xrmcqibycnojvk").withValue("e").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("zvahapjy").withValue("pvgqzcjrvxdjzlm").withAction(TagAction.EXCLUDE)))) + .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) + .withFilteringTags(Arrays.asList( + new FilteringTag().withName("zovawjvz").withValue("luthn").withAction(TagAction.INCLUDE), + new FilteringTag().withName("xipeilpjzuaejx").withValue("ltskzbbtd").withAction(TagAction.INCLUDE), + new FilteringTag().withName("e").withValue("gpw").withAction(TagAction.INCLUDE), + new FilteringTag().withName("kfpbs").withValue("ofd").withAction(TagAction.EXCLUDE))) + .withUserEmail("sd")); model = BinaryData.fromObject(model).toObject(TagRuleUpdatePropertiesInner.class); - Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.logRules().sendAadLogs()); + Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.logRules().sendAadLogs()); Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.logRules().sendActivityLogs()); - Assertions.assertEquals("bmpukgriwflz", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("bxzpuzycisp", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.logRules().sendActivityLogs()); + Assertions.assertEquals("xrmcqibycnojvk", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("e", model.logRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, model.metricRules().sendMetrics()); - Assertions.assertEquals("rp", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("dhibnuq", model.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.metricRules().sendMetrics()); + Assertions.assertEquals("zovawjvz", model.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("luthn", model.metricRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("jrunmpxtt", model.metricRules().userEmail()); + Assertions.assertEquals("sd", model.metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateMockTests.java index 2459b19c945c..e5eb4095ee6d 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricRulesInner; @@ -30,44 +30,46 @@ public final class TagRulesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"jmoadsuv\",\"value\":\"m\",\"action\":\"Include\"},{\"name\":\"jsjqbjhhyx\",\"value\":\"wlycoduhpkxkg\",\"action\":\"Include\"},{\"name\":\"eqnajxqugjhkycu\",\"value\":\"ddg\",\"action\":\"Include\"},{\"name\":\"wqm\",\"value\":\"alkrmn\",\"action\":\"Include\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"udfnbyxba\",\"value\":\"bjyvay\",\"action\":\"Exclude\"}],\"userEmail\":\"rzrtuzqogsex\"}},\"id\":\"vfdnwnwmewzsyyce\",\"name\":\"zsoibjudpfrxtr\",\"type\":\"hzv\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"acstwityk\",\"value\":\"vxccedcp\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"xltjcvnhltiu\",\"value\":\"xnavvwxq\",\"action\":\"Include\"},{\"name\":\"unyowxwl\",\"value\":\"jrkvfgbvfvpdbo\",\"action\":\"Exclude\"}],\"userEmail\":\"zsjqlh\"}},\"id\":\"r\",\"name\":\"bdeibqipqk\",\"type\":\"hvxndzwmkrefajpj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); TagRule response = manager.tagRules() - .define("hfjx") - .withExistingMonitor("himdbl", "gwimfn") + .define("enuuzkopbm") + .withExistingMonitor("zr", "rdgrtw") .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.DISABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) .withSendActivityLogs(SendActivityLogsStatus.ENABLED) .withFilteringTags(Arrays.asList( - new FilteringTag().withName("kzikfjawneaivxwc") - .withValue("lpcirelsf") - .withAction(TagAction.EXCLUDE), - new FilteringTag().withName("wabfatkl") - .withValue("xbjhwuaanozjosph") - .withAction(TagAction.INCLUDE)))) + new FilteringTag().withName("u").withValue("fozbhdmsmlmzqhof").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("equi").withValue("xicslfao").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("yylhalnswhccsp") + .withValue("aivwitqscywu") + .withAction(TagAction.EXCLUDE)))) .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) - .withFilteringTags( - Arrays.asList(new FilteringTag().withName("ag").withValue("vimjwos").withAction(TagAction.INCLUDE))) - .withUserEmail("tcs")) + .withFilteringTags(Arrays.asList( + new FilteringTag().withName("bwemhairs").withValue("gzd").withAction(TagAction.INCLUDE), + new FilteringTag().withName("eypqwdxggicccn").withValue("huexmk").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("tvlz").withValue("emhzrncsdtc").withAction(TagAction.INCLUDE), + new FilteringTag().withName("ypbsfgytguslfead").withValue("gq").withAction(TagAction.EXCLUDE))) + .withUserEmail("ejhzisxg")) .create(); - Assertions.assertEquals(SendAadLogsStatus.ENABLED, response.logRules().sendAadLogs()); + Assertions.assertEquals(SendAadLogsStatus.DISABLED, response.logRules().sendAadLogs()); Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, response.logRules().sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.DISABLED, response.logRules().sendActivityLogs()); - Assertions.assertEquals("jmoadsuv", response.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("m", response.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, response.logRules().filteringTags().get(0).action()); + Assertions.assertEquals("acstwityk", response.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("vxccedcp", response.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, response.logRules().filteringTags().get(0).action()); Assertions.assertEquals(SendMetricsStatus.DISABLED, response.metricRules().sendMetrics()); - Assertions.assertEquals("udfnbyxba", response.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("bjyvay", response.metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, response.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("rzrtuzqogsex", response.metricRules().userEmail()); + Assertions.assertEquals("xltjcvnhltiu", response.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("xnavvwxq", response.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, response.metricRules().filteringTags().get(0).action()); + Assertions.assertEquals("zsjqlh", response.metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteMockTests.java index 43af27ef8aec..3d201d0bafed 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.tagRules().delete("g", "xrtfudxep", "gyqagvrvmnpkuk", com.azure.core.util.Context.NONE); + manager.tagRules().delete("ewpusdsttwvogvb", "ejdcngqqmoakuf", "m", com.azure.core.util.Context.NONE); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetWithResponseMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetWithResponseMockTests.java index 94300f4e0caf..dbe6cda2c213 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetWithResponseMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetWithResponseMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.SendAadLogsStatus; @@ -26,29 +26,29 @@ public final class TagRulesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"zqioxiysuii\",\"value\":\"nkedyatrwyhqmib\",\"action\":\"Include\"},{\"name\":\"itsmypyyn\",\"value\":\"dpumnzgmw\",\"action\":\"Exclude\"},{\"name\":\"biknsorgjhxbld\",\"value\":\"wwrlkdmtncv\",\"action\":\"Exclude\"},{\"name\":\"llxdyhgs\",\"value\":\"cogjltdtbn\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"vcikhnvpamqgx\",\"value\":\"u\",\"action\":\"Include\"},{\"name\":\"ywggx\",\"value\":\"lla\",\"action\":\"Include\"},{\"name\":\"wuipiccjzkzivg\",\"value\":\"c\",\"action\":\"Include\"}],\"userEmail\":\"hyrnxxmu\"}},\"id\":\"dndrdvstkwqqtche\",\"name\":\"lmfmtdaay\",\"type\":\"dvwvgpio\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"vexztvbtqgs\",\"value\":\"aoyzkoow\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"q\",\"value\":\"dsyuuximerqfob\",\"action\":\"Exclude\"}],\"userEmail\":\"kby\"}},\"id\":\"t\",\"name\":\"pfhpagmhrskdsnfd\",\"type\":\"doakgtdlmkkzevdl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); TagRule response = manager.tagRules() - .getWithResponse("synljphuopxodl", "iyntorzihle", "sjswsrms", com.azure.core.util.Context.NONE) + .getWithResponse("haz", "khnzbonlw", "toego", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(SendAadLogsStatus.DISABLED, response.logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, response.logRules().sendSubscriptionLogs()); + Assertions.assertEquals(SendAadLogsStatus.ENABLED, response.logRules().sendAadLogs()); + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, response.logRules().sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.DISABLED, response.logRules().sendActivityLogs()); - Assertions.assertEquals("zqioxiysuii", response.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("nkedyatrwyhqmib", response.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, response.logRules().filteringTags().get(0).action()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, response.metricRules().sendMetrics()); - Assertions.assertEquals("vcikhnvpamqgx", response.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("u", response.metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, response.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("hyrnxxmu", response.metricRules().userEmail()); + Assertions.assertEquals("vexztvbtqgs", response.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("aoyzkoow", response.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, response.logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, response.metricRules().sendMetrics()); + Assertions.assertEquals("q", response.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("dsyuuximerqfob", response.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, response.metricRules().filteringTags().get(0).action()); + Assertions.assertEquals("kby", response.metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceMockTests.java index 0c942c71e49f..ab71547b4755 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.SendAadLogsStatus; @@ -27,33 +27,32 @@ public final class TagRulesListByNewRelicMonitorResourceMockTests { @Test public void testListByNewRelicMonitorResource() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"lpichk\",\"value\":\"mkcdyhbpkkpwdre\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"ljxywsu\",\"value\":\"yrs\",\"action\":\"Exclude\"},{\"name\":\"tgadgvraeaen\",\"value\":\"nzar\",\"action\":\"Exclude\"},{\"name\":\"uu\",\"value\":\"fqka\",\"action\":\"Include\"}],\"userEmail\":\"ipfpubji\"}},\"id\":\"wifto\",\"name\":\"qkvpuvksgplsakn\",\"type\":\"n\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"altol\",\"value\":\"cwsobqwcs\",\"action\":\"Include\"},{\"name\":\"dcfhucqdpf\",\"value\":\"glsbjjc\",\"action\":\"Include\"},{\"name\":\"bvtvudutncormr\",\"value\":\"qtvcofudflvkgj\",\"action\":\"Include\"}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"saznqntoruds\",\"value\":\"a\",\"action\":\"Exclude\"},{\"name\":\"c\",\"value\":\"auwjuetaebu\",\"action\":\"Exclude\"},{\"name\":\"movsmzlxwabmqoe\",\"value\":\"ifrvtpu\",\"action\":\"Include\"},{\"name\":\"qlgkfbtn\",\"value\":\"aongbj\",\"action\":\"Exclude\"}],\"userEmail\":\"jitcjedftwwaez\"}},\"id\":\"jvdcpzfoqouic\",\"name\":\"bxarzgszufoxci\",\"type\":\"opidoamciodh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.tagRules() - .listByNewRelicMonitorResource("iuqgbdbutauv", "btkuwhh", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.tagRules().listByNewRelicMonitorResource("yq", "xzfe", com.azure.core.util.Context.NONE); Assertions.assertEquals(SendAadLogsStatus.DISABLED, response.iterator().next().logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, + Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, response.iterator().next().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.ENABLED, + Assertions.assertEquals(SendActivityLogsStatus.DISABLED, response.iterator().next().logRules().sendActivityLogs()); - Assertions.assertEquals("lpichk", response.iterator().next().logRules().filteringTags().get(0).name()); - Assertions.assertEquals("mkcdyhbpkkpwdre", - response.iterator().next().logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, + Assertions.assertEquals("altol", response.iterator().next().logRules().filteringTags().get(0).name()); + Assertions.assertEquals("cwsobqwcs", response.iterator().next().logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, response.iterator().next().logRules().filteringTags().get(0).action()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, response.iterator().next().metricRules().sendMetrics()); - Assertions.assertEquals("ljxywsu", response.iterator().next().metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("yrs", response.iterator().next().metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, response.iterator().next().metricRules().sendMetrics()); + Assertions.assertEquals("saznqntoruds", response.iterator().next().metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("a", response.iterator().next().metricRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.EXCLUDE, response.iterator().next().metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("ipfpubji", response.iterator().next().metricRules().userEmail()); + Assertions.assertEquals("jitcjedftwwaez", response.iterator().next().metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserAssignedIdentityTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserAssignedIdentityTests.java index c341cdf7e5df..aa3d05ebe33a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserAssignedIdentityTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserAssignedIdentityTests.java @@ -11,7 +11,7 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"2afaa392-448a-47a3-891b-b41604fbc1f0\",\"clientId\":\"594a5240-c392-4d0f-93ac-15a1f61c66fe\"}") + "{\"principalId\":\"857d57c8-aeaf-4787-b131-2d2c96d8d9d2\",\"clientId\":\"65e03782-4f29-45d0-ae85-b1c20468aa09\"}") .toObject(UserAssignedIdentity.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserInfoTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserInfoTests.java index 0e4b3ba1775c..e02ddde6013f 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserInfoTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserInfoTests.java @@ -12,27 +12,27 @@ public final class UserInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UserInfo model = BinaryData.fromString( - "{\"firstName\":\"cciqihnhungbwjz\",\"lastName\":\"fygxgispemvtzfk\",\"emailAddress\":\"ubljofxqe\",\"phoneNumber\":\"jaeq\",\"country\":\"qjbasvms\"}") + "{\"firstName\":\"fmppe\",\"lastName\":\"vmgxsab\",\"emailAddress\":\"qduujitcjczdz\",\"phoneNumber\":\"ndhkrw\",\"country\":\"appd\"}") .toObject(UserInfo.class); - Assertions.assertEquals("cciqihnhungbwjz", model.firstName()); - Assertions.assertEquals("fygxgispemvtzfk", model.lastName()); - Assertions.assertEquals("ubljofxqe", model.emailAddress()); - Assertions.assertEquals("jaeq", model.phoneNumber()); - Assertions.assertEquals("qjbasvms", model.country()); + Assertions.assertEquals("fmppe", model.firstName()); + Assertions.assertEquals("vmgxsab", model.lastName()); + Assertions.assertEquals("qduujitcjczdz", model.emailAddress()); + Assertions.assertEquals("ndhkrw", model.phoneNumber()); + Assertions.assertEquals("appd", model.country()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UserInfo model = new UserInfo().withFirstName("cciqihnhungbwjz") - .withLastName("fygxgispemvtzfk") - .withEmailAddress("ubljofxqe") - .withPhoneNumber("jaeq") - .withCountry("qjbasvms"); + UserInfo model = new UserInfo().withFirstName("fmppe") + .withLastName("vmgxsab") + .withEmailAddress("qduujitcjczdz") + .withPhoneNumber("ndhkrw") + .withCountry("appd"); model = BinaryData.fromObject(model).toObject(UserInfo.class); - Assertions.assertEquals("cciqihnhungbwjz", model.firstName()); - Assertions.assertEquals("fygxgispemvtzfk", model.lastName()); - Assertions.assertEquals("ubljofxqe", model.emailAddress()); - Assertions.assertEquals("jaeq", model.phoneNumber()); - Assertions.assertEquals("qjbasvms", model.country()); + Assertions.assertEquals("fmppe", model.firstName()); + Assertions.assertEquals("vmgxsab", model.lastName()); + Assertions.assertEquals("qduujitcjczdz", model.emailAddress()); + Assertions.assertEquals("ndhkrw", model.phoneNumber()); + Assertions.assertEquals("appd", model.country()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMHostsListResponseTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMHostsListResponseTests.java index 03f5b171bd3e..2ea683f44fe8 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMHostsListResponseTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMHostsListResponseTests.java @@ -14,24 +14,28 @@ public final class VMHostsListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VMHostsListResponse model = BinaryData.fromString( - "{\"value\":[{\"vmId\":\"gxlefgugnxkrxd\",\"agentVersion\":\"i\",\"agentStatus\":\"thz\"}],\"nextLink\":\"qdrabhjybigehoqf\"}") + "{\"value\":[{\"vmId\":\"pxjmflbvvnchr\",\"agentVersion\":\"ciwwzjuqkhr\",\"agentStatus\":\"jiwkuofoskghsau\"},{\"vmId\":\"mjmvxieduugidyjr\",\"agentVersion\":\"byao\",\"agentStatus\":\"e\"},{\"vmId\":\"sonpclhocohs\",\"agentVersion\":\"ev\",\"agentStatus\":\"ggzfbu\"}],\"nextLink\":\"mvfaxkffeiith\"}") .toObject(VMHostsListResponse.class); - Assertions.assertEquals("gxlefgugnxkrxd", model.value().get(0).vmId()); - Assertions.assertEquals("i", model.value().get(0).agentVersion()); - Assertions.assertEquals("thz", model.value().get(0).agentStatus()); - Assertions.assertEquals("qdrabhjybigehoqf", model.nextLink()); + Assertions.assertEquals("pxjmflbvvnchr", model.value().get(0).vmId()); + Assertions.assertEquals("ciwwzjuqkhr", model.value().get(0).agentVersion()); + Assertions.assertEquals("jiwkuofoskghsau", model.value().get(0).agentStatus()); + Assertions.assertEquals("mvfaxkffeiith", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VMHostsListResponse model = new VMHostsListResponse() - .withValue(Arrays - .asList(new VMInfoInner().withVmId("gxlefgugnxkrxd").withAgentVersion("i").withAgentStatus("thz"))) - .withNextLink("qdrabhjybigehoqf"); + .withValue(Arrays.asList( + new VMInfoInner().withVmId("pxjmflbvvnchr") + .withAgentVersion("ciwwzjuqkhr") + .withAgentStatus("jiwkuofoskghsau"), + new VMInfoInner().withVmId("mjmvxieduugidyjr").withAgentVersion("byao").withAgentStatus("e"), + new VMInfoInner().withVmId("sonpclhocohs").withAgentVersion("ev").withAgentStatus("ggzfbu"))) + .withNextLink("mvfaxkffeiith"); model = BinaryData.fromObject(model).toObject(VMHostsListResponse.class); - Assertions.assertEquals("gxlefgugnxkrxd", model.value().get(0).vmId()); - Assertions.assertEquals("i", model.value().get(0).agentVersion()); - Assertions.assertEquals("thz", model.value().get(0).agentStatus()); - Assertions.assertEquals("qdrabhjybigehoqf", model.nextLink()); + Assertions.assertEquals("pxjmflbvvnchr", model.value().get(0).vmId()); + Assertions.assertEquals("ciwwzjuqkhr", model.value().get(0).agentVersion()); + Assertions.assertEquals("jiwkuofoskghsau", model.value().get(0).agentStatus()); + Assertions.assertEquals("mvfaxkffeiith", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMInfoInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMInfoInnerTests.java index 8fc9411a20b8..22ddbe58feaa 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMInfoInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMInfoInnerTests.java @@ -11,21 +11,20 @@ public final class VMInfoInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VMInfoInner model = BinaryData - .fromString("{\"vmId\":\"wska\",\"agentVersion\":\"ktzlcuiywg\",\"agentStatus\":\"wgndrvynhzgpp\"}") - .toObject(VMInfoInner.class); - Assertions.assertEquals("wska", model.vmId()); - Assertions.assertEquals("ktzlcuiywg", model.agentVersion()); - Assertions.assertEquals("wgndrvynhzgpp", model.agentStatus()); + VMInfoInner model + = BinaryData.fromString("{\"vmId\":\"m\",\"agentVersion\":\"yvshxmz\",\"agentStatus\":\"bzoggigrx\"}") + .toObject(VMInfoInner.class); + Assertions.assertEquals("m", model.vmId()); + Assertions.assertEquals("yvshxmz", model.agentVersion()); + Assertions.assertEquals("bzoggigrx", model.agentStatus()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VMInfoInner model - = new VMInfoInner().withVmId("wska").withAgentVersion("ktzlcuiywg").withAgentStatus("wgndrvynhzgpp"); + VMInfoInner model = new VMInfoInner().withVmId("m").withAgentVersion("yvshxmz").withAgentStatus("bzoggigrx"); model = BinaryData.fromObject(model).toObject(VMInfoInner.class); - Assertions.assertEquals("wska", model.vmId()); - Assertions.assertEquals("ktzlcuiywg", model.agentVersion()); - Assertions.assertEquals("wgndrvynhzgpp", model.agentStatus()); + Assertions.assertEquals("m", model.vmId()); + Assertions.assertEquals("yvshxmz", model.agentVersion()); + Assertions.assertEquals("bzoggigrx", model.agentStatus()); } } From 55ef86eadb3e8e36dfebab55dcf08229fa0acf83 Mon Sep 17 00:00:00 2001 From: Xiaofei Cao <92354331+XiaofeiCao@users.noreply.github.com> Date: Tue, 25 Nov 2025 00:04:05 +0800 Subject: [PATCH 036/186] update knowledgebase (#47362) --- .../azure-search-documents/swagger/Update-Codegeneration.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/search/azure-search-documents/swagger/Update-Codegeneration.ps1 b/sdk/search/azure-search-documents/swagger/Update-Codegeneration.ps1 index 6e74dd78c585..735787bcf7f8 100644 --- a/sdk/search/azure-search-documents/swagger/Update-Codegeneration.ps1 +++ b/sdk/search/azure-search-documents/swagger/Update-Codegeneration.ps1 @@ -1,3 +1,3 @@ & (Join-Path $PSScriptRoot ".." ".." ".." ".." eng scripts Invoke-Codegeneration.ps1) -Directory $PSScriptRoot -AutorestOptions '--tag=searchindex' & (Join-Path $PSScriptRoot ".." ".." ".." ".." eng scripts Invoke-Codegeneration.ps1) -Directory $PSScriptRoot -AutorestOptions '--tag=searchservice' -& (Join-Path $PSScriptRoot ".." ".." ".." ".." eng scripts Invoke-Codegeneration.ps1) -Directory $PSScriptRoot -AutorestOptions '--tag=knowledgeagent' +& (Join-Path $PSScriptRoot ".." ".." ".." ".." eng scripts Invoke-Codegeneration.ps1) -Directory $PSScriptRoot -AutorestOptions '--tag=knowledgebase' From 8ed4b90a4a8d75d018c4f1cf90ede50db2b4b6ce Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 24 Nov 2025 10:01:39 -0800 Subject: [PATCH 037/186] Sync eng/common directory with azure-sdk-tools for PR 13045 (#47365) * Enforce an array for single element * Enforced an array for where filter --------- Co-authored-by: ray chen --- eng/common/scripts/Create-APIReview.ps1 | 2 +- eng/common/scripts/Validate-All-Packages.ps1 | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/eng/common/scripts/Create-APIReview.ps1 b/eng/common/scripts/Create-APIReview.ps1 index ff98d4570485..ec76326d9992 100644 --- a/eng/common/scripts/Create-APIReview.ps1 +++ b/eng/common/scripts/Create-APIReview.ps1 @@ -374,7 +374,7 @@ elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0) { # Lowest Priority: Direct PackageInfoFiles (new method) Write-Host "Using PackageInfoFiles parameter with $($PackageInfoFiles.Count) files" # Filter out empty strings or whitespace-only entries - $ProcessedPackageInfoFiles = $PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } + $ProcessedPackageInfoFiles = @($PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) }) } else { Write-Error "No package information provided. Please provide either 'PackageName', 'ArtifactList', or 'PackageInfoFiles' parameters." diff --git a/eng/common/scripts/Validate-All-Packages.ps1 b/eng/common/scripts/Validate-All-Packages.ps1 index 24cfdc85468b..ab65e1d4bdbd 100644 --- a/eng/common/scripts/Validate-All-Packages.ps1 +++ b/eng/common/scripts/Validate-All-Packages.ps1 @@ -278,12 +278,11 @@ if ($ArtifactList -and $ArtifactList.Count -gt 0) } } } -elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0) -{ +elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0) { # Direct PackageInfoFiles (new method) Write-Host "Using PackageInfoFiles parameter with $($PackageInfoFiles.Count) files" # Filter out empty strings or whitespace-only entries - $ProcessedPackageInfoFiles = $PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } + $ProcessedPackageInfoFiles = @($PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) }) } # Validate that we have package info files to process From 680d47670f2dded3d2729b4761beec02026f5a41 Mon Sep 17 00:00:00 2001 From: Sameeksha Vaity Date: Mon, 24 Nov 2025 10:21:31 -0800 Subject: [PATCH 038/186] Deprecation and removal of Azure Media Services Track 1 code (#47354) --- eng/.docsettings.yml | 2 - eng/pipelines/aggregate-reports.yml | 4 +- eng/pipelines/pullrequest.yml | 2 - eng/versioning/external_dependencies.txt | 17 - eng/versioning/version_client.txt | 1 - sdk/mediaservices/ci.data.yml | 40 - .../microsoft-azure-media/pom.xml | 209 ----- .../services/blob/BlobConfiguration.java | 44 - .../services/blob/BlobContract.java | 563 ------------- .../services/blob/BlobService.java | 99 --- .../windowsazure/services/blob/Exports.java | 36 - .../BlobExceptionProcessor.java | 343 -------- .../BlobOperationRestProxy.java | 578 ------------- .../blob/implementation/BlobRestProxy.java | 119 --- .../ContainerACLDateAdapter.java | 37 - .../blob/implementation/HmacSHA256Sign.java | 42 - .../blob/implementation/MetadataAdapter.java | 67 -- .../blob/implementation/SharedKeyFilter.java | 241 ------ .../implementation/SharedKeyLiteFilter.java | 167 ---- .../blob/implementation/SharedKeyUtils.java | 135 --- .../services/blob/implementation/package.html | 5 - .../services/blob/models/AccessCondition.java | 446 ---------- .../blob/models/AcquireLeaseOptions.java | 76 -- .../blob/models/AcquireLeaseResult.java | 61 -- .../services/blob/models/BlobProperties.java | 321 ------- .../blob/models/BlobServiceOptions.java | 55 -- .../services/blob/models/BlockList.java | 166 ---- .../blob/models/BreakLeaseResult.java | 39 - .../blob/models/CommitBlobBlocksOptions.java | 324 -------- .../services/blob/models/Constants.java | 694 ---------------- .../services/blob/models/ContainerACL.java | 484 ----------- .../services/blob/models/CopyBlobOptions.java | 254 ------ .../services/blob/models/CopyBlobResult.java | 84 -- .../blob/models/CreateBlobBlockOptions.java | 103 --- .../blob/models/CreateBlobOptions.java | 497 ----------- .../blob/models/CreateBlobPagesOptions.java | 135 --- .../blob/models/CreateBlobPagesResult.java | 151 ---- .../blob/models/CreateBlobResult.java | 85 -- .../models/CreateBlobSnapshotOptions.java | 156 ---- .../blob/models/CreateBlobSnapshotResult.java | 130 --- .../blob/models/CreateContainerOptions.java | 154 ---- .../blob/models/DeleteBlobOptions.java | 180 ---- .../blob/models/DeleteContainerOptions.java | 83 -- .../blob/models/GetBlobMetadataOptions.java | 131 --- .../blob/models/GetBlobMetadataResult.java | 125 --- .../services/blob/models/GetBlobOptions.java | 236 ------ .../blob/models/GetBlobPropertiesOptions.java | 131 --- .../blob/models/GetBlobPropertiesResult.java | 87 -- .../services/blob/models/GetBlobResult.java | 112 --- .../blob/models/GetContainerACLResult.java | 60 -- .../models/GetContainerPropertiesResult.java | 122 --- .../models/GetServicePropertiesResult.java | 63 -- .../blob/models/ListBlobBlocksOptions.java | 162 ---- .../blob/models/ListBlobBlocksResult.java | 280 ------- .../blob/models/ListBlobRegionsOptions.java | 201 ----- .../blob/models/ListBlobRegionsResult.java | 151 ---- .../blob/models/ListBlobsOptions.java | 316 ------- .../services/blob/models/ListBlobsResult.java | 590 ------------- .../blob/models/ListContainersOptions.java | 191 ----- .../blob/models/ListContainersResult.java | 449 ---------- .../services/blob/models/PageRange.java | 152 ---- .../blob/models/ServiceProperties.java | 419 ---------- .../blob/models/SetBlobMetadataOptions.java | 105 --- .../blob/models/SetBlobMetadataResult.java | 93 --- .../blob/models/SetBlobPropertiesOptions.java | 388 --------- .../blob/models/SetBlobPropertiesResult.java | 123 --- .../models/SetContainerMetadataOptions.java | 83 -- .../services/blob/models/package.html | 5 - .../windowsazure/services/blob/package.html | 5 - .../services/media/EncryptionUtils.java | 85 -- .../windowsazure/services/media/Exports.java | 89 -- .../services/media/MediaConfiguration.java | 71 -- .../services/media/MediaContract.java | 38 - .../services/media/MediaService.java | 70 -- .../services/media/OperationUtils.java | 57 -- .../media/WritableBlobContainerContract.java | 124 --- .../authentication/AzureAdAccessToken.java | 48 -- .../AzureAdClientSymmetricKey.java | 44 - .../AzureAdClientUsernamePassword.java | 44 - .../AzureAdTokenCredentialType.java | 28 - .../AzureAdTokenCredentials.java | 160 ---- .../authentication/AzureAdTokenFactory.java | 20 - .../authentication/AzureAdTokenProvider.java | 104 --- .../authentication/AzureEnvironment.java | 83 -- .../AzureEnvironmentConstants.java | 74 -- .../authentication/AzureEnvironments.java | 44 - .../media/authentication/TokenProvider.java | 13 - .../media/authentication/package-info.java | 1 - .../DefaultActionOperation.java | 237 ------ .../DefaultDeleteOperation.java | 67 -- .../DefaultEntityActionOperation.java | 282 ------- .../DefaultEntityTypeActionOperation.java | 215 ----- .../entityoperations/DefaultGetOperation.java | 53 -- .../DefaultListOperation.java | 121 --- .../EntityActionBodyParameterMapper.java | 66 -- .../EntityActionOperation.java | 86 -- .../EntityBatchOperation.java | 83 -- .../entityoperations/EntityContract.java | 114 --- .../EntityCreateOperation.java | 39 - .../EntityDeleteOperation.java | 33 - .../entityoperations/EntityGetOperation.java | 23 - .../entityoperations/EntityLinkOperation.java | 158 ---- .../entityoperations/EntityListOperation.java | 42 - .../entityoperations/EntityOperation.java | 62 -- .../entityoperations/EntityOperationBase.java | 210 ----- .../EntityOperationSingleResult.java | 26 - .../EntityOperationSingleResultBase.java | 58 -- .../entityoperations/EntityProxyData.java | 32 - .../entityoperations/EntityRestProxy.java | 302 ------- .../EntityTypeActionOperation.java | 90 -- .../EntityUnlinkOperation.java | 74 -- .../EntityUpdateOperation.java | 29 - .../EntityWithOperationIdentifier.java | 11 - .../media/entityoperations/package.html | 5 - .../media/implementation/ActiveToken.java | 64 -- .../implementation/BatchMimeMultipart.java | 40 - .../BatchMimeMultipartBodyWritter.java | 37 - .../implementation/MediaBatchOperations.java | 578 ------------- .../MediaBlobContainerWriter.java | 248 ------ .../implementation/MediaBlobRestProxy.java | 147 ---- .../implementation/MediaContentProvider.java | 83 -- .../MediaExceptionProcessor.java | 280 ------- .../media/implementation/MediaRestProxy.java | 230 ------ .../media/implementation/OAuthFilter.java | 65 -- .../implementation/ODataAtomMarshaller.java | 166 ---- .../implementation/ODataAtomUnmarshaller.java | 256 ------ .../implementation/ODataDateAdapter.java | 63 -- .../media/implementation/ODataEntity.java | 183 ---- .../ODataEntityCollectionProvider.java | 100 --- .../implementation/ODataEntityProvider.java | 128 --- .../media/implementation/RedirectFilter.java | 71 -- .../ResourceLocationManager.java | 52 -- .../media/implementation/SASTokenFilter.java | 65 -- .../SetBoundaryMultipartDataSource.java | 63 -- .../media/implementation/StatusLine.java | 105 --- .../implementation/VersionHeadersFilter.java | 46 -- .../implementation/atom/CategoryType.java | 210 ----- .../implementation/atom/ContentType.java | 228 ----- .../implementation/atom/DateTimeType.java | 159 ---- .../media/implementation/atom/EntryType.java | 213 ----- .../media/implementation/atom/FeedType.java | 216 ----- .../implementation/atom/GeneratorType.java | 210 ----- .../media/implementation/atom/IconType.java | 162 ---- .../media/implementation/atom/IdType.java | 162 ---- .../media/implementation/atom/LinkType.java | 312 ------- .../media/implementation/atom/LogoType.java | 162 ---- .../implementation/atom/ObjectFactory.java | 670 --------------- .../media/implementation/atom/PersonType.java | 187 ----- .../media/implementation/atom/SourceType.java | 213 ----- .../media/implementation/atom/TextType.java | 212 ----- .../media/implementation/atom/UriType.java | 158 ---- .../implementation/atom/package-info.java | 25 - .../content/AccessPolicyType.java | 145 ---- .../content/AkamaiAccessControlType.java | 25 - ...kamaiSignatureHeaderAuthenticationKey.java | 44 - .../content/AssetDeliveryPolicyRestType.java | 197 ----- .../implementation/content/AssetFileType.java | 297 ------- .../implementation/content/AssetType.java | 199 ----- .../implementation/content/ChannelType.java | 282 ------- .../implementation/content/Constants.java | 70 -- ...ntentKeyAuthorizationPolicyOptionType.java | 74 -- ...KeyAuthorizationPolicyRestrictionType.java | 49 -- .../ContentKeyAuthorizationPolicyType.java | 47 -- .../content/ContentKeyRestType.java | 283 ------- .../content/CrossSiteAccessPoliciesType.java | 31 - .../content/EncodingReservedUnitRestType.java | 97 --- .../content/ErrorDetailType.java | 80 -- .../implementation/content/ErrorType.java | 83 -- .../content/IPAccessControlType.java | 24 - .../implementation/content/IPRangeType.java | 43 - .../JobNotificationSubscriptionType.java | 81 -- .../media/implementation/content/JobType.java | 315 ------- .../content/LocatorRestType.java | 256 ------ .../content/MediaProcessorType.java | 115 --- .../content/MediaServiceDTO.java | 28 - .../implementation/content/MediaUriType.java | 48 -- .../content/NotificationEndPointType.java | 158 ---- .../content/ODataActionType.java | 91 -- .../implementation/content/ObjectFactory.java | 236 ------ .../implementation/content/OperationType.java | 155 ---- .../implementation/content/ProgramType.java | 296 ------- .../content/ProtectionKeyIdType.java | 49 -- .../content/ProtectionKeyRestType.java | 48 -- .../content/RebindContentKeyType.java | 53 -- .../content/StorageAccountType.java | 81 -- .../StreamingEndpointAccessControlType.java | 31 - .../StreamingEndpointCacheControlType.java | 20 - .../content/StreamingEndpointType.java | 178 ---- .../content/TaskHistoricalEventType.java | 107 --- .../implementation/content/TaskType.java | 286 ------- .../implementation/content/package-info.java | 22 - .../media/implementation/package.html | 5 - .../fairplay/FairPlayConfiguration.java | 73 -- .../templates/fairplay/package-info.java | 1 - .../AgcAndColorStripeRestriction.java | 30 - .../ContentEncryptionKeyFromHeader.java | 11 - ...ContentEncryptionKeyFromKeyIdentifier.java | 45 - .../playreadylicense/ErrorMessages.java | 41 - .../ExplicitAnalogTelevisionRestriction.java | 51 -- ...ediaServicesLicenseTemplateSerializer.java | 177 ---- .../playreadylicense/PlayReadyContentKey.java | 10 - .../PlayReadyLicenseResponseTemplate.java | 80 -- .../PlayReadyLicenseTemplate.java | 214 ----- .../PlayReadyLicenseType.java | 48 -- .../playreadylicense/PlayReadyPlayRight.java | 277 ------- .../playreadylicense/ScmsRestriction.java | 36 - .../UnknownOutputPassingOption.java | 51 -- .../playreadylicense/package-info.java | 7 - .../AsymmetricTokenVerificationKey.java | 34 - .../tokenrestriction/ErrorMessages.java | 16 - .../OpenIdConnectDiscoveryDocument.java | 29 - .../SymmetricVerificationKey.java | 49 -- .../tokenrestriction/TokenClaim.java | 79 -- .../TokenRestrictionTemplate.java | 176 ---- .../TokenRestrictionTemplateSerializer.java | 239 ------ .../templates/tokenrestriction/TokenType.java | 51 -- .../TokenVerificationKey.java | 10 - .../X509CertTokenVerificationKey.java | 57 -- .../tokenrestriction/package-info.java | 7 - .../templates/widevine/AllowedTrackTypes.java | 5 - .../templates/widevine/ContentKeySpecs.java | 76 -- .../templates/widevine/Hdcp.java | 5 - .../widevine/RequiredOutputProtection.java | 21 - .../templates/widevine/WidevineMessage.java | 58 -- .../templates/widevine/package-info.java | 16 - .../services/media/models/AccessPolicy.java | 134 --- .../media/models/AccessPolicyInfo.java | 98 --- .../media/models/AccessPolicyPermission.java | 80 -- .../services/media/models/Asset.java | 391 --------- .../media/models/AssetDeliveryPolicy.java | 246 ------ .../AssetDeliveryPolicyConfigurationKey.java | 110 --- .../media/models/AssetDeliveryPolicyInfo.java | 108 --- .../media/models/AssetDeliveryPolicyType.java | 86 -- .../media/models/AssetDeliveryProtocol.java | 102 --- .../services/media/models/AssetFile.java | 364 -------- .../services/media/models/AssetFileInfo.java | 162 ---- .../services/media/models/AssetInfo.java | 167 ---- .../services/media/models/AssetOption.java | 73 -- .../services/media/models/AssetState.java | 73 -- .../services/media/models/ContentKey.java | 438 ---------- .../models/ContentKeyAuthorizationPolicy.java | 164 ---- .../ContentKeyAuthorizationPolicyInfo.java | 67 -- .../ContentKeyAuthorizationPolicyOption.java | 232 ------ ...ntentKeyAuthorizationPolicyOptionInfo.java | 103 --- ...tentKeyAuthorizationPolicyRestriction.java | 87 -- .../media/models/ContentKeyDeliveryType.java | 81 -- .../services/media/models/ContentKeyInfo.java | 135 --- .../services/media/models/ContentKeyType.java | 91 -- .../media/models/EncodingReservedUnit.java | 139 ---- .../models/EncodingReservedUnitInfo.java | 67 -- .../models/EncodingReservedUnitType.java | 73 -- .../services/media/models/EndPointType.java | 65 -- .../services/media/models/ErrorDetail.java | 59 -- .../services/media/models/Ipv4.java | 62 -- .../services/media/models/Job.java | 487 ----------- .../services/media/models/JobInfo.java | 189 ----- .../models/JobNotificationSubscription.java | 60 -- ...obNotificationSubscriptionListFactory.java | 47 -- .../services/media/models/JobState.java | 94 --- .../services/media/models/LinkInfo.java | 43 - .../services/media/models/ListResult.java | 152 ---- .../services/media/models/Locator.java | 303 ------- .../services/media/models/LocatorInfo.java | 139 ---- .../services/media/models/LocatorType.java | 73 -- .../services/media/models/MediaProcessor.java | 43 - .../media/models/MediaProcessorInfo.java | 93 --- .../media/models/NotificationEndPoint.java | 181 ---- .../models/NotificationEndPointInfo.java | 90 -- .../services/media/models/Operation.java | 48 -- .../services/media/models/OperationInfo.java | 57 -- .../services/media/models/OperationState.java | 71 -- .../services/media/models/ProtectionKey.java | 224 ----- .../media/models/ProtectionKeyType.java | 66 -- .../media/models/StorageAccountInfo.java | 66 -- .../media/models/StorageAccounts.java | 48 -- .../media/models/StreamingEndpoint.java | 441 ---------- .../media/models/StreamingEndpointInfo.java | 188 ----- .../media/models/StreamingEndpointState.java | 79 -- .../services/media/models/TargetJobState.java | 74 -- .../services/media/models/Task.java | 226 ----- .../media/models/TaskHistoricalEvent.java | 76 -- .../services/media/models/TaskInfo.java | 260 ------ .../services/media/models/TaskOption.java | 69 -- .../services/media/models/TaskState.java | 95 --- .../services/media/models/package.html | 5 - .../windowsazure/services/media/package.html | 5 - .../windowsazure/services/queue/Exports.java | 34 - .../services/queue/QueueConfiguration.java | 27 - .../services/queue/QueueContract.java | 516 ------------ .../services/queue/QueueService.java | 102 --- .../QueueExceptionProcessor.java | 415 ---------- .../queue/implementation/QueueMessage.java | 36 - .../queue/implementation/QueueRestProxy.java | 519 ------------ .../queue/implementation/SharedKeyFilter.java | 31 - .../implementation/SharedKeyLiteFilter.java | 32 - .../queue/implementation/package.html | 5 - .../queue/models/CreateMessageOptions.java | 118 --- .../queue/models/CreateQueueOptions.java | 96 --- .../queue/models/GetQueueMetadataResult.java | 79 -- .../models/GetServicePropertiesResult.java | 63 -- .../queue/models/ListMessagesOptions.java | 101 --- .../queue/models/ListMessagesResult.java | 262 ------ .../queue/models/ListQueuesOptions.java | 175 ---- .../queue/models/ListQueuesResult.java | 332 -------- .../queue/models/PeekMessagesOptions.java | 73 -- .../queue/models/PeekMessagesResult.java | 202 ----- .../queue/models/QueueServiceOptions.java | 56 -- .../queue/models/ServiceProperties.java | 480 ----------- .../queue/models/UpdateMessageResult.java | 86 -- .../services/queue/models/package.html | 5 - .../windowsazure/services/queue/package.html | 5 - ...icrosoft.windowsazure.core.Builder$Exports | 3 - .../AzureAdTokenProviderTest.java | 118 --- .../media/authentication/package-info.java | 1 - .../blob/BlobServiceIntegrationTest.java | 782 ------------------ .../services/blob/IntegrationTestBase.java | 48 -- .../media/AccessPolicyIntegrationTest.java | 240 ------ .../media/AssetFileIntegrationTest.java | 279 ------- .../services/media/AssetIntegrationTest.java | 563 ------------- .../media/ContentKeyIntegrationTest.java | 518 ------------ ...codingReservedUnitTypeIntegrationTest.java | 99 --- .../services/media/EncryptionHelper.java | 167 ---- .../media/EncryptionIntegrationTest.java | 376 --------- .../services/media/EntityProxyTest.java | 161 ---- .../services/media/ExportsTest.java | 50 -- .../services/media/IntegrationTestBase.java | 487 ----------- .../services/media/JobIntegrationTest.java | 525 ------------ .../media/LocatorIntegrationTests.java | 356 -------- .../media/MediaProcessorIntegrationTest.java | 101 --- .../NotificationEndPointIntegrationTest.java | 221 ----- .../media/ProtectionKeyIntegrationTest.java | 54 -- .../media/ServiceExceptionMatcher.java | 48 -- .../services/media/StorageAccountsTest.java | 41 - .../StreamingEndopointIntegrationTest.java | 310 ------- .../services/media/TaskIntegrationTest.java | 337 -------- .../media/UploadingIntegrationTest.java | 173 ---- ...ntentKeyAuthorizationPolicyEntityTest.java | 107 --- ...ContentKeyAuthorizationPolicyInfoTest.java | 53 -- ...eyAuthorizationPolicyOptionEntityTest.java | 109 --- ...tKeyAuthorizationPolicyOptionInfoTest.java | 110 --- ...KeyAuthorizationPolicyRestrictionTest.java | 44 - .../implementation/LinkRetrievalTest.java | 109 --- .../MediaBatchOperationsTest.java | 138 ---- .../implementation/ODataDateParsingTest.java | 146 ---- .../ODataSerializationFromJerseyTest.java | 105 --- .../ODataSerializationTest.java | 108 --- .../implementation/RedirectionFilterTest.java | 182 ---- .../ResourceLocationManagerTest.java | 63 -- .../implementation/SASTokenFilterTest.java | 135 --- .../media/implementation/StatusLineTest.java | 75 -- .../AgcAndColorStripeRestrictionTests.java | 43 - ...licitAnalogTelevisionRestrictionTests.java | 64 -- ...ervicesLicenseTemplateSerializerTests.java | 539 ------------ .../PlayReadyContentKeyTests.java | 71 -- .../PlayReadyLicenseTypeTests.java | 71 -- .../PlayReadyPlayRightTest.java | 31 - .../ScmsRestrictionTests.java | 43 - .../UnknownOutputPassingOptionTests.java | 86 -- .../SymmetricVerificationKeyTests.java | 52 -- .../tokenrestriction/TokenClaimTests.java | 72 -- ...kenRestrictionTemplateSerializerTests.java | 321 ------- .../tokenrestriction/TokenTypeTests.java | 84 -- .../X509CertTokenVerificationKeyTests.java | 102 --- .../WidevineMessageSerializerTests.java | 92 --- .../media/models/AccessPolicyEntityTest.java | 91 -- .../media/models/AccessPolicyInfoTest.java | 96 --- .../models/AccessPolicyPermissionTest.java | 104 --- .../models/AssetDeliveryPolicyEntityTest.java | 107 --- .../media/models/AssetEntityTest.java | 207 ----- .../media/models/AssetFileEntityTest.java | 156 ---- .../media/models/AssetFileInfoTest.java | 199 ----- .../services/media/models/AssetInfoTest.java | 129 --- .../media/models/ChannelEntityTest.java | 207 ----- .../media/models/ContentKeyEntityTest.java | 104 --- .../media/models/ContentKeyInfoTest.java | 178 ---- .../media/models/GenericListResultTest.java | 431 ---------- .../services/media/models/JobEntityTest.java | 86 -- .../services/media/models/JobInfoTest.java | 167 ---- .../media/models/LocatorEntityTest.java | 189 ----- .../media/models/LocatorInfoTest.java | 157 ---- .../models/MediaProcessorEntityTest.java | 46 -- .../media/models/MediaProcessorInfoTest.java | 112 --- .../NotificationEndPointEntityTest.java | 149 ---- .../models/NotificationEndPointInfoTest.java | 106 --- .../media/models/ProtectionKeyEntityTest.java | 54 -- .../services/media/models/TaskEntityTest.java | 195 ----- .../services/media/models/TaskInfoTest.java | 292 ------- .../services/queue/IntegrationTestBase.java | 48 -- .../queue/QueueServiceIntegrationTest.java | 600 -------------- .../scenarios/MediaServiceScenarioTest.java | 231 ------ .../scenarios/MediaServiceValidation.java | 298 ------- .../scenarios/MediaServiceWrapper.java | 549 ------------ .../services/scenarios/ScenarioTestBase.java | 152 ---- .../utils/ServiceExceptionFactoryTest.java | 107 --- .../com.microsoft.windowsazure.properties | 19 - .../src/test/resources/certificate/server.crt | 17 - .../src/test/resources/certificate/server.der | Bin 634 -> 0 bytes .../src/test/resources/media/MPEG4-H264.mp4 | Bin 8697 -> 0 bytes .../PlayReadyLicenseResponseTemplate.xsd | 220 ----- .../schemas/TokenRestrictionTemplate.xsd | 46 -- sdk/mediaservices/pom.xml | 1 - 401 files changed, 2 insertions(+), 56362 deletions(-) delete mode 100644 sdk/mediaservices/ci.data.yml delete mode 100644 sdk/mediaservices/microsoft-azure-media/pom.xml delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobConfiguration.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobContract.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobService.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/Exports.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobExceptionProcessor.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobOperationRestProxy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobRestProxy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/ContainerACLDateAdapter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/HmacSHA256Sign.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/MetadataAdapter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyFilter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyLiteFilter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyUtils.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AccessCondition.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobProperties.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobServiceOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlockList.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BreakLeaseResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CommitBlobBlocksOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/Constants.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ContainerACL.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobBlockOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateContainerOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteBlobOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteContainerOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerACLResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerPropertiesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetServicePropertiesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/PageRange.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ServiceProperties.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetContainerMetadataOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/EncryptionUtils.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/Exports.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaConfiguration.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaContract.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaService.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/OperationUtils.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/WritableBlobContainerContract.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdAccessToken.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdClientSymmetricKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdClientUsernamePassword.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenCredentialType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenCredentials.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenFactory.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenProvider.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironment.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironmentConstants.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironments.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/TokenProvider.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/package-info.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultActionOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultDeleteOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityActionOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityTypeActionOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultGetOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultListOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityActionBodyParameterMapper.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityActionOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityBatchOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityContract.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityCreateOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityDeleteOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityGetOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityLinkOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityListOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationBase.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationSingleResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationSingleResultBase.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityProxyData.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityRestProxy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityTypeActionOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityUnlinkOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityUpdateOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityWithOperationIdentifier.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ActiveToken.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/BatchMimeMultipart.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/BatchMimeMultipartBodyWritter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBlobContainerWriter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBlobRestProxy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaContentProvider.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaExceptionProcessor.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaRestProxy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/OAuthFilter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomMarshaller.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomUnmarshaller.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataDateAdapter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntity.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntityCollectionProvider.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntityProvider.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/RedirectFilter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ResourceLocationManager.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/SASTokenFilter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/SetBoundaryMultipartDataSource.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/StatusLine.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/VersionHeadersFilter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/CategoryType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ContentType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/DateTimeType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/EntryType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/FeedType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/GeneratorType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IconType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IdType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LinkType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LogoType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ObjectFactory.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/PersonType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/SourceType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/TextType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/UriType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/package-info.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AccessPolicyType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AkamaiAccessControlType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AkamaiSignatureHeaderAuthenticationKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetDeliveryPolicyRestType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetFileType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ChannelType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/Constants.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyOptionType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyRestrictionType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyRestType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/CrossSiteAccessPoliciesType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/EncodingReservedUnitRestType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ErrorDetailType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ErrorType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/IPAccessControlType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/IPRangeType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobNotificationSubscriptionType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/LocatorRestType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaProcessorType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaServiceDTO.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaUriType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/NotificationEndPointType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ODataActionType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ObjectFactory.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/OperationType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProgramType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProtectionKeyIdType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProtectionKeyRestType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/RebindContentKeyType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StorageAccountType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointAccessControlType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointCacheControlType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/TaskHistoricalEventType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/TaskType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/package-info.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/fairplay/FairPlayConfiguration.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/fairplay/package-info.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/AgcAndColorStripeRestriction.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ContentEncryptionKeyFromHeader.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ContentEncryptionKeyFromKeyIdentifier.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ErrorMessages.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ExplicitAnalogTelevisionRestriction.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/MediaServicesLicenseTemplateSerializer.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyContentKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseResponseTemplate.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseTemplate.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyPlayRight.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ScmsRestriction.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/UnknownOutputPassingOption.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/package-info.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/AsymmetricTokenVerificationKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/ErrorMessages.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/OpenIdConnectDiscoveryDocument.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/SymmetricVerificationKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenClaim.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplate.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplateSerializer.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenVerificationKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/X509CertTokenVerificationKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/package-info.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/AllowedTrackTypes.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/ContentKeySpecs.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/Hdcp.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/RequiredOutputProtection.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/WidevineMessage.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/package-info.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicyInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicyPermission.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Asset.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyConfigurationKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryProtocol.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFile.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFileInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetOption.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetState.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOption.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOptionInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyRestriction.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyDeliveryType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnit.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnitInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnitType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EndPointType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ErrorDetail.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Ipv4.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Job.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobNotificationSubscription.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobNotificationSubscriptionListFactory.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobState.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LinkInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ListResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Locator.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LocatorInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LocatorType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/MediaProcessor.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/MediaProcessorInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPoint.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Operation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/OperationInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/OperationState.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKeyType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StorageAccountInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StorageAccounts.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpoint.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpointInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpointState.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TargetJobState.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Task.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskHistoricalEvent.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskOption.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskState.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/Exports.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueConfiguration.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueContract.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueService.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueExceptionProcessor.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueMessage.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueRestProxy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/SharedKeyFilter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/SharedKeyLiteFilter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/CreateMessageOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/CreateQueueOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/GetQueueMetadataResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/GetServicePropertiesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListMessagesOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListMessagesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListQueuesOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListQueuesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/PeekMessagesOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/PeekMessagesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/QueueServiceOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ServiceProperties.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/UpdateMessageResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/resources/META-INF/services/com.microsoft.windowsazure.core.Builder$Exports delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/media/authentication/AzureAdTokenProviderTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/media/authentication/package-info.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/blob/BlobServiceIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/blob/IntegrationTestBase.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AccessPolicyIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AssetFileIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AssetIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ContentKeyIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncodingReservedUnitTypeIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncryptionHelper.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncryptionIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EntityProxyTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ExportsTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/IntegrationTestBase.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/JobIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/LocatorIntegrationTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/MediaProcessorIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/NotificationEndPointIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ProtectionKeyIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ServiceExceptionMatcher.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/StorageAccountsTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/StreamingEndopointIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/TaskIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/UploadingIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyOptionEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyOptionInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyRestrictionTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/LinkRetrievalTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperationsTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataDateParsingTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataSerializationFromJerseyTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataSerializationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/RedirectionFilterTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ResourceLocationManagerTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/SASTokenFilterTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/StatusLineTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/AgcAndColorStripeRestrictionTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ExplicitAnalogTelevisionRestrictionTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/MediaServicesLicenseTemplateSerializerTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyContentKeyTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseTypeTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyPlayRightTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ScmsRestrictionTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/UnknownOutputPassingOptionTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/SymmetricVerificationKeyTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenClaimTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplateSerializerTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenTypeTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/X509CertTokenVerificationKeyTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/WidevineMessageSerializerTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyPermissionTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ChannelEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/GenericListResultTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/JobEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/JobInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/MediaProcessorEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/MediaProcessorInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ProtectionKeyEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/TaskEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/TaskInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/queue/IntegrationTestBase.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/queue/QueueServiceIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceScenarioTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceValidation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceWrapper.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/ScenarioTestBase.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/utils/ServiceExceptionFactoryTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/resources/META-INF/com.microsoft.windowsazure.properties delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/resources/certificate/server.crt delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/resources/certificate/server.der delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/resources/media/MPEG4-H264.mp4 delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/resources/schemas/PlayReadyLicenseResponseTemplate.xsd delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/resources/schemas/TokenRestrictionTemplate.xsd diff --git a/eng/.docsettings.yml b/eng/.docsettings.yml index b93948f76346..e8bdd397627d 100644 --- a/eng/.docsettings.yml +++ b/eng/.docsettings.yml @@ -31,7 +31,6 @@ required_readme_sections: - ^Next steps$ - ^Contributing$ known_presence_issues: - - ['sdk/mediaservices/microsoft-azure-media', '#2847'] - ['sdk/servicebus/microsoft-azure-servicebus', '#2847'] # Changelog List - ['sdk/authorization/microsoft-azure-authentication-msi-token-provider/CHANGELOG.md', '#2847'] @@ -48,7 +47,6 @@ known_presence_issues: - ['sdk/keyvault/microsoft-azure-keyvault-extensions/CHANGELOG.md', '#2847'] - ['sdk/keyvault/microsoft-azure-keyvault-webkey/CHANGELOG.md', '#2847'] - ['sdk/keyvault/microsoft-azure-keyvault-test/CHANGELOG.md', '#2847'] - - ['sdk/mediaservices/microsoft-azure-media/CHANGELOG.md', '#2847'] - ['sdk/servicebus/microsoft-azure-servicebus/CHANGELOG.md', '#2847'] - ['sdk/keyvault/microsoft-azure-keyvault-complete/CHANGELOG.md', '#2847'] diff --git a/eng/pipelines/aggregate-reports.yml b/eng/pipelines/aggregate-reports.yml index 9c69a195b44c..b59dafd62459 100644 --- a/eng/pipelines/aggregate-reports.yml +++ b/eng/pipelines/aggregate-reports.yml @@ -48,7 +48,7 @@ extends: displayName: 'Build all libraries that support Java $(JavaBuildVersion)' inputs: mavenPomFile: pom.xml - options: '$(DefaultOptions) -T 2C -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcodesnippet.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Djacoco.skip=true -Drevapi.skip=true -Dshade.skip=true -Dspotless.skip=true -pl !com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12,!com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12,!com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12,!com.azure.cosmos.spark:azure-cosmos-spark-account-data-resolver-sample,!com.azure.cosmos.kafka:azure-cosmos-kafka-connect,!com.microsoft.azure:azure-batch,!com.microsoft.azure:azure-media' + options: '$(DefaultOptions) -T 2C -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcodesnippet.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Djacoco.skip=true -Drevapi.skip=true -Dshade.skip=true -Dspotless.skip=true -pl !com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12,!com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12,!com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12,!com.azure.cosmos.spark:azure-cosmos-spark-account-data-resolver-sample,!com.azure.cosmos.kafka:azure-cosmos-kafka-connect,!com.microsoft.azure:azure-batch' mavenOptions: '$(MemoryOptions) $(LoggingOptions)' javaHomeOption: 'JDKVersion' jdkVersionOption: $(JavaBuildVersion) @@ -60,7 +60,7 @@ extends: displayName: 'Build remaining libraries with Java $(FallbackJavaBuildVersion)' inputs: mavenPomFile: pom.xml - options: '$(DefaultOptions) -T 2C -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcodesnippet.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Djacoco.skip=true -Drevapi.skip=true -Dspotless.skip=true -pl com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12,com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12,com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12,com.azure.cosmos.spark:azure-cosmos-spark-account-data-resolver-sample,com.azure.cosmos.kafka:azure-cosmos-kafka-connect,com.microsoft.azure:azure-batch,com.microsoft.azure:azure-media' + options: '$(DefaultOptions) -T 2C -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcodesnippet.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Djacoco.skip=true -Drevapi.skip=true -Dspotless.skip=true -pl com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12,com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12,com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12,com.azure.cosmos.spark:azure-cosmos-spark-account-data-resolver-sample,com.azure.cosmos.kafka:azure-cosmos-kafka-connect,com.microsoft.azure:azure-batch' mavenOptions: '$(MemoryOptions) $(LoggingOptions)' javaHomeOption: 'JDKVersion' jdkVersionOption: $(FallbackJavaBuildVersion) diff --git a/eng/pipelines/pullrequest.yml b/eng/pipelines/pullrequest.yml index 5d5c68924276..8ce1923d8cce 100644 --- a/eng/pipelines/pullrequest.yml +++ b/eng/pipelines/pullrequest.yml @@ -29,7 +29,6 @@ pr: - sdk/e2e/ # no pipeline, nothing to build - sdk/eventhubs/microsoft-azure-eventhubs/ # track 1 - sdk/eventhubs/microsoft-azure-eventhubs-eph/ # track 1 - - sdk/mediaservices/microsoft-azure-media/ # track 1 - sdk/servicebus/microsoft-azure-servicebus/ # track 1 - sdk/spring/ @@ -77,6 +76,5 @@ extends: - sdk/e2e/ # no pipeline, nothing to build - sdk/eventhubs/microsoft-azure-eventhubs/ # track 1 - sdk/eventhubs/microsoft-azure-eventhubs-eph/ # track 1 - - sdk/mediaservices/microsoft-azure-media/ # track 1 - sdk/servicebus/microsoft-azure-servicebus/ # track 1 - sdk/spring/ diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 30cd272f5fbb..20ffea53823b 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -30,7 +30,6 @@ com.h3xstream.findsecbugs:findsecbugs-plugin;1.9.0 com.knuddels:jtokkit;1.0.0 com.microsoft.azure:azure-client-authentication;1.7.14 com.microsoft.azure:azure-client-runtime;1.7.14 -com.microsoft.azure:azure-core;0.9.8 com.microsoft.azure:azure-keyvault-cryptography;1.2.2 com.microsoft.azure:qpid-proton-j-extensions;1.2.6 com.microsoft.sqlserver:mssql-jdbc;10.2.3.jre8 @@ -135,7 +134,6 @@ com.squareup.okio:okio-jvm;3.16.0 junit:junit;4.13.2 commons-cli:commons-cli;1.9.0 org.assertj:assertj-core;3.22.0 -org.bouncycastle:bcprov-jdk15to18;1.81 org.bouncycastle:bcprov-jdk18on;1.81 org.bouncycastle:bcpkix-lts8on;2.73.8 org.eclipse.jetty:jetty-alpn-conscrypt-server;9.4.58.v20250814 @@ -181,7 +179,6 @@ org.apache.maven.plugins:maven-clean-plugin;3.5.0 org.apache.maven.plugins:maven-compiler-plugin;3.14.0 org.apache.maven.plugins:maven-enforcer-plugin;3.6.1 org.apache.maven.plugins:maven-failsafe-plugin;3.5.3 -org.apache.maven.plugins:maven-help-plugin;3.5.1 org.apache.maven.plugins:maven-install-plugin;3.1.4 org.apache.maven.plugins:maven-jar-plugin;3.4.2 org.apache.maven.plugins:maven-javadoc-plugin;3.11.3 @@ -293,17 +290,6 @@ cosmos_io.confluent:kafka-avro-serializer;7.6.0 cosmos_org.apache.avro:avro;1.11.4 # Maven Tools for Cosmos Kafka connector only -# sdk\mediaservices\microsoft-azure-media\pom.xml which hasn't been released for 2 years -# all of these unique references below are listed here because they're old, some are over 10 years old -media_javax.xml.bind:jaxb-api;2.2.7 -media_javax.inject:javax.inject;1 -media_javax.mail:mail;1.4.5 -media_com.sun.jersey:jersey-client;1.19 -media_com.sun.jersey:jersey-json;1.19 -media_commons-logging:commons-logging;1.1.1 -media_io.jsonwebtoken:jjwt;0.5.1 -media_org.mockito:mockito-all;1.9.0 -media_com.microsoft.azure:adal4j;1.2.0 # sdk\resourcemanager\azure-resourcemanager\pom.xml # sdk\resourcemanager\azure-resourcemanager-compute\pom.xml resourcemanager_com.jcraft:jsch;0.1.55 @@ -417,8 +403,5 @@ springboot3_org.springframework.cloud:spring-cloud-dependencies;2025.0.0 # Jackson dropped support for Java 7 with the release of 2.14.0. # Add custom Jackson dependencies for Track 1 libraries using Jackson. -java7support_com.fasterxml.jackson.core:jackson-annotations;2.13.5 -java7support_com.fasterxml.jackson.core:jackson-core;2.13.5 -java7support_com.fasterxml.jackson.core:jackson-databind;2.13.5 org.mockito:mockito-junit-jupiter;4.11.0 com.github.tomakehurst:wiremock-jre8;2.35.2 diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 4cd240170f10..23ca49424c33 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -214,7 +214,6 @@ com.azure:identity-test-webapp;1.0.0-beta.1;1.0.0-beta.1 com.microsoft.azure:azure-batch;11.2.0;11.3.0-beta.1 com.microsoft.azure:azure-eventhubs;3.3.0;3.4.0-beta.1 com.microsoft.azure:azure-servicebus;3.6.7;3.7.0-beta.1 -com.microsoft.azure:azure-media;1.0.0-beta.1;1.0.0-beta.1 com.azure.spring:azure-monitor-spring-native-test;1.0.0-beta.1;1.0.0-beta.1 com.azure.spring:spring-cloud-azure-appconfiguration-config-web;6.0.0;6.1.0-beta.1 com.azure.spring:spring-cloud-azure-appconfiguration-config;6.0.0;6.1.0-beta.1 diff --git a/sdk/mediaservices/ci.data.yml b/sdk/mediaservices/ci.data.yml deleted file mode 100644 index 834d9076f3cc..000000000000 --- a/sdk/mediaservices/ci.data.yml +++ /dev/null @@ -1,40 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - -trigger: - branches: - include: - - main - - hotfix/* - - release/* - paths: - include: - - sdk/mediaservices/ci.data.yml - - sdk/mediaservices/microsoft-azure-media/ - exclude: - - sdk/mediaservices/pom.xml - - sdk/mediaservices/microsoft-azure-media/pom.xml - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/mediaservices/ci.data.yml - - sdk/mediaservices/microsoft-azure-media/ - exclude: - - sdk/mediaservices/pom.xml - - sdk/mediaservices/microsoft-azure-media/pom.xml - -extends: - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - SDKType: data - ServiceDirectory: mediaservices - Artifacts: - - name: azure-media - groupId: com.microsoft.azure - safeName: azuremedia \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/pom.xml b/sdk/mediaservices/microsoft-azure-media/pom.xml deleted file mode 100644 index 50545303be46..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/pom.xml +++ /dev/null @@ -1,209 +0,0 @@ - - - 4.0.0 - com.microsoft.azure - azure-media - 1.0.0-beta.1 - jar - Microsoft Azure SDK for Media Services - This package contains Microsoft Azure SDK for Media Services. - https://github.com/Azure/azure-sdk-for-java - - - com.azure - azure-data-sdk-parent - 1.3.0 - ../../parents/azure-data-sdk-parent - - - - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - UTF-8 - - true - true - - - - - microsoft - Microsoft - - - - - - com.microsoft.azure - azure-core - 0.9.8 - - - com.microsoft.azure - adal4j - 1.2.0 - - - org.apache.httpcomponents - httpclient - 4.5.14 - - - javax.xml.bind - jaxb-api - 2.2.7 - provided - - - javax.mail - mail - 1.4.5 - - - javax.inject - javax.inject - 1 - - - com.sun.jersey - jersey-client - 1.19 - - - com.sun.jersey - jersey-json - 1.19 - - - commons-logging - commons-logging - 1.1.1 - - - com.fasterxml.jackson.core - jackson-databind - 2.13.5 - - - com.fasterxml.jackson.core - jackson-annotations - 2.13.5 - - - com.fasterxml.jackson.core - jackson-core - 2.13.5 - - - io.jsonwebtoken - jjwt - 0.5.1 - - - - org.hamcrest - hamcrest-all - 1.3 - test - - - org.mockito - mockito-all - 1.9.0 - test - - - junit - junit - 4.13.2 - test - - - org.bouncycastle - bcprov-jdk15to18 - 1.81 - test - - - - - - - org.apache.maven.plugins - maven-help-plugin - 3.5.1 - - - validate - - evaluate - - - legal - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.14.0 - - 1.7 - 1.7 - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.11.3 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.storage - /** -
* Copyright Microsoft Corporation -
* -
* Licensed under the Apache License, Version 2.0 (the "License"); -
* you may not use this file except in compliance with the License. -
* You may obtain a copy of the License at -
* http://www.apache.org/licenses/LICENSE-2.0 -
* -
* Unless required by applicable law or agreed to in writing, software -
* distributed under the License is distributed on an "AS IS" BASIS, -
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -
* See the License for the specific language governing permissions and -
* limitations under the License. -
*/]]>
-
-
- -
-
-
diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobConfiguration.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobConfiguration.java deleted file mode 100644 index 59e9653e5bd0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobConfiguration.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob; - -/** - * This class contains static strings used to identify parts of a service - * configuration instance associated with the Windows Azure Blob service. - *

- * These values must not be altered. - */ -public abstract class BlobConfiguration { - /** - * The Blob configuration account name constant. This String - * value is used as a key in the configuration file, to identify the value - * for the DNS prefix name for the storage account. - */ - public static final String ACCOUNT_NAME = "blob.accountName"; - - /** - * The Blob configuration account key constant. This String - * value is used as a key in the configuration file, to identify the value - * for the storage service account key. - */ - public static final String ACCOUNT_KEY = "blob.accountKey"; - - /** - * The Blob configuration URI constant. This String value is - * used as a key in the configuration file, to identify the URI value for - * the Blob storage service REST API address for the storage account. - */ - public static final String URI = "blob.uri"; -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobContract.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobContract.java deleted file mode 100644 index 2c71143accc5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobContract.java +++ /dev/null @@ -1,563 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob; - -import java.io.InputStream; - -import com.microsoft.windowsazure.core.pipeline.jersey.JerseyFilterableService; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.blob.models.BlockList; -import com.microsoft.windowsazure.services.blob.models.CommitBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobBlockOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobResult; -import com.microsoft.windowsazure.services.blob.models.CreateContainerOptions; -import com.microsoft.windowsazure.services.blob.models.DeleteBlobOptions; -import com.microsoft.windowsazure.services.blob.models.DeleteContainerOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesResult; -import com.microsoft.windowsazure.services.blob.models.GetBlobResult; -import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksResult; -import com.microsoft.windowsazure.services.blob.models.ListContainersOptions; -import com.microsoft.windowsazure.services.blob.models.ListContainersResult; - -/** - * Defines the methods available on the Windows Azure blob storage service. - * Construct an object instance implementing BlobContract with one - * of the static create methods on {@link BlobService}. These methods - * associate a Configuration with the implementation, so the - * methods on the instance of BlobContract all work with a - * particular storage account. - */ -public interface BlobContract extends JerseyFilterableService { - - /** - * Marks a blob for deletion. - *

- * This method marks the properties, metadata, and content of the blob - * specified by the blob and container parameters for - * deletion. - *

- * When a blob is successfully deleted, it is immediately removed from the - * storage account's index and is no longer accessible to clients. The - * blob's data is later removed from the service during garbage collection. - *

- * Note that in order to delete a blob, you must delete all of its - * snapshots. You can delete an individual snapshot, only the snapshots, or - * both the blob and its snapshots with the - * {@link #deleteBlob(String, String, DeleteBlobOptions)} method. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the blob to delete. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void deleteBlob(String container, String blob) throws ServiceException; - - /** - * Marks a blob or snapshot for deletion, using the specified options. - *

- * This method marks the properties, metadata, and content of the blob or - * snapshot specified by the blob and container parameters - * for deletion. Use the {@link DeleteBlobOptions options} parameter to set - * an optional server timeout for the operation, a snapshot timestamp to - * specify an individual snapshot to delete, a blob lease ID to delete a - * blob with an active lease, a flag indicating whether to delete all - * snapshots but not the blob, or both the blob and all snapshots, and any - * access conditions to satisfy. - *

- * When a blob is successfully deleted, it is immediately removed from the - * storage account's index and is no longer accessible to clients. The - * blob's data is later removed from the service during garbage collection. - *

- * If the blob has an active lease, the client must specify a valid lease ID - * in the options parameter in order to delete it. - *

- * If a blob has a large number of snapshots, it's possible that the delete - * blob operation will time out. If this happens, the client should retry - * the request. - * - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the blob to delete. - * @param options - * A {@link DeleteBlobOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void deleteBlob(String container, String blob, DeleteBlobOptions options) - throws ServiceException; - - /** - * Gets a list of the containers in the blob storage account. - * - * @return A {@link ListContainersResult} reference to the result of the - * list containers operation. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - ListContainersResult listContainers() throws ServiceException; - - /** - * Gets a list of the containers in the blob storage account using the - * specified options. - *

- * Use the {@link ListContainersOptions options} parameter to specify - * options, including a server response timeout for the request, a container - * name prefix filter, a marker for continuing requests, the maximum number - * of results to return in a request, and whether to include container - * metadata in the results. - * - * @param options - * A {@link ListContainersOptions} instance containing options - * for the request. - * @return A {@link ListContainersResult} reference to the result of the - * list containers operation. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - ListContainersResult listContainers(ListContainersOptions options) - throws ServiceException; - - /** - * Creates a container with the specified name. - *

- * Container names must be unique within a storage account, and must follow - * the naming rules specified in Naming and Referencing Containers, Blobs, and Metadata. - * - * @param container - * A {@link String} containing the name of the container to - * create. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void createContainer(String container) throws ServiceException; - - /** - * Creates a container with the specified name, using the specified options. - *

- * Use the {@link CreateContainerOptions options} parameter to specify - * options, including a server response timeout for the request, metadata to - * set on the container, and the public access level for container and blob - * data. Container names must be unique within a storage account, and must - * follow the naming rules specified in Naming and Referencing Containers, Blobs, and Metadata. - * - * @param container - * A {@link String} containing the name of the container to - * create. - * @param options - * A {@link CreateContainerOptions} instance containing options - * for the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void createContainer(String container, CreateContainerOptions options) - throws ServiceException; - - /** - * Marks a container for deletion. The container and any blobs contained - * within it are later deleted during garbage collection. - *

- * When a container is deleted, a container with the same name cannot be - * created for at least 30 seconds; the container may not be available for - * more than 30 seconds if the service is still processing the request. - * - * @param container - * A {@link String} containing the name of the container to - * delete. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void deleteContainer(String container) throws ServiceException; - - /** - * Marks a container for deletion, using the specified options. The - * container and any blobs contained within it are later deleted during - * garbage collection. - *

- * Use the {@link DeleteContainerOptions options} parameter to specify the - * server response timeout and any access conditions for the container - * deletion operation. Access conditions can be used to make the operation - * conditional on the value of the Etag or last modified time of the - * container. - *

- * When a container is deleted, a container with the same name cannot be - * created for at least 30 seconds; the container may not be available for - * more than 30 seconds if the service is still processing the request. - * - * @param container - * A {@link String} containing the name of the container to - * delete. - * @param options - * A {@link DeleteContainerOptions} instance containing options - * for the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void deleteContainer(String container, DeleteContainerOptions options) - throws ServiceException; - - /** - * Creates a block blob from a content stream. - * - * @param container - * A {@link String} containing the name of the container to - * create the blob in. - * @param blob - * A {@link String} containing the name of the blob to create. A - * blob name can contain any combination of characters, but - * reserved URL characters must be properly escaped. A blob name - * must be at least one character long and cannot be more than - * 1,024 characters long, and must be unique within the - * container. - * @param contentStream - * An {@link InputStream} reference to the content stream to - * upload to the new blob. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - CreateBlobResult createBlockBlob(String container, String blob, - InputStream contentStream) throws ServiceException; - - /** - * Creates a block blob from a content stream, using the specified options. - *

- * Use the {@link CreateBlobOptions options} parameter to optionally specify - * the server timeout for the operation, the MIME content type and content - * encoding for the blob, the content language, the MD5 hash, a cache - * control value, and blob metadata. - * - * @param container - * A {@link String} containing the name of the container to - * create the blob in. - * @param blob - * A {@link String} containing the name of the blob to create. A - * blob name can contain any combination of characters, but - * reserved URL characters must be properly escaped. A blob name - * must be at least one character long and cannot be more than - * 1,024 characters long, and must be unique within the - * container. - * @param contentStream - * An {@link InputStream} reference to the content to upload to - * the new blob. - * @param options - * A {@link CreateBlobOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - CreateBlobResult createBlockBlob(String container, String blob, - InputStream contentStream, CreateBlobOptions options) - throws ServiceException; - - /** - * Creates a new uncommited block from a content stream. - *

- * This method creates an uncommitted block for a block blob specified by - * the blob and container parameters. The blockId - * parameter is a client-specified ID for the block, which must be less than - * or equal to 64 bytes in size. For a given blob, the length of the value - * specified for the blockId parameter must be the same size for - * each block. The contentStream parameter specifies the content to - * be copied to the block. The content for the block must be less than or - * equal to 4 MB in size. - *

- * To create or update a block blob, the blocks that have been successfully - * written to the server with this method must be committed using a call to - * {@link com.microsoft.windowsazure.services.blob.BlobContract#commitBlobBlocks(String, String, BlockList)} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#commitBlobBlocks(String, String, BlockList, CommitBlobBlocksOptions)}. - * - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the blob to create the - * block for. - * @param blockId - * A {@link String} containing a client-specified ID for the - * block. - * @param contentStream - * An {@link InputStream} reference to the content to copy to the - * block. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void createBlobBlock(String container, String blob, String blockId, - InputStream contentStream) throws ServiceException; - - /** - * Creates a new uncommitted block from a content stream, using the - * specified options. - *

- * This method creates an uncommitted block for a block blob specified by - * the blob and container parameters. The blockId - * parameter is a client-specified ID for the block, which must be less than - * or equal to 64 bytes in size. For a given blob, the length of the value - * specified for the blockId parameter must be the same size for - * each block. The contentStream parameter specifies the content to - * be copied to the block. The content for the block must be less than or - * equal to 4 MB in size. Use the {@link CreateBlobBlockOptions options} - * parameter to optionally specify the server timeout for the operation, the - * lease ID if the blob has an active lease, and the MD5 hash value for the - * block content. - *

- * To create or update a block blob, the blocks that have been successfully - * written to the server with this method must be committed using a call to - * {@link com.microsoft.windowsazure.services.blob.BlobContract#commitBlobBlocks(String, String, BlockList)} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#commitBlobBlocks(String, String, BlockList, CommitBlobBlocksOptions)}. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the blob to create the - * block for. - * @param blockId - * A {@link String} containing a client-specified ID for the - * block. - * @param contentStream - * An {@link InputStream} reference to the content to copy to the - * block. - * @param options - * A {@link CreateBlobBlockOptions} instance containing options - * for the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void createBlobBlock(String container, String blob, String blockId, - InputStream contentStream, CreateBlobBlockOptions options) - throws ServiceException; - - /** - * Commits a list of blocks to a block blob. - *

- * This method creates or updates the block blob specified by the - * blob and container parameters. You can call this method - * to update a blob by uploading only those blocks that have changed, then - * committing the new and existing blocks together. You can do this with the - * blockList parameter by specifying whether to commit a block from - * the committed block list or from the uncommitted block list, or to commit - * the most recently uploaded version of the block, whichever list it may - * belong to. - *

- * In order to be written as part of a blob, each block in the list must - * have been successfully written to the server with a call to - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobBlock(String, String, String, InputStream)} - * or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobBlock(String, String, String, InputStream, CreateBlobBlockOptions)}. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the block blob to - * create or update. - * @param blockList - * A {@link BlockList} containing the list of blocks to commit to - * the block blob. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void commitBlobBlocks(String container, String blob, BlockList blockList) - throws ServiceException; - - /** - * Commits a block list to a block blob, using the specified options. - *

- * This method creates or updates the block blob specified by the - * blob and container parameters. You can call this method - * to update a blob by uploading only those blocks that have changed, then - * committing the new and existing blocks together. You can do this with the - * blockList parameter by specifying whether to commit a block from - * the committed block list or from the uncommitted block list, or to commit - * the most recently uploaded version of the block, whichever list it may - * belong to. Use the {@link CommitBlobBlocksOptions options} parameter to - * optionally specify the server timeout for the operation, the MIME content - * type and content encoding for the blob, the content language, the MD5 - * hash, a cache control value, blob metadata, the lease ID if the blob has - * an active lease, and any access conditions for the operation. - *

- * In order to be written as part of a blob, each block in the list must - * have been successfully written to the server with a call to - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobBlock(String, String, String, InputStream)} - * or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobBlock(String, String, String, InputStream, CreateBlobBlockOptions)}. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the block blob to - * create or update. - * @param blockList - * A {@link BlockList} containing the list of blocks to commit to - * the block blob. - * @param options - * A {@link CommitBlobBlocksOptions} instance containing options - * for the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void commitBlobBlocks(String container, String blob, BlockList blockList, - CommitBlobBlocksOptions options) throws ServiceException; - - /** - * Lists the blocks of a blob. - *

- * This method lists the committed blocks of the block blob specified by the - * blob and container parameters. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the block blob to - * list. - * @return A {@link ListBlobBlocksResult} instance containing the list of - * blocks returned for the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - ListBlobBlocksResult listBlobBlocks(String container, String blob) - throws ServiceException; - - /** - * Lists the blocks of a blob, using the specified options. - *

- * This method lists the committed blocks, uncommitted blocks, or both, of - * the block blob specified by the blob and container - * parameters. Use the {@link ListBlobBlocksOptions options} parameter to - * specify an optional server timeout for the operation, the lease ID if the - * blob has an active lease, the snapshot timestamp to get the committed - * blocks of a snapshot, whether to return the committed block list, and - * whether to return the uncommitted block list. By default, only the - * committed blocks of the blob are returned. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the block blob to - * list. - * @param options - * A {@link ListBlobBlocksOptions} instance containing options - * for the request. - * @return A {@link ListBlobBlocksResult} instance containing the list of - * blocks returned for the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - ListBlobBlocksResult listBlobBlocks(String container, String blob, - ListBlobBlocksOptions options) throws ServiceException; - - /** - * Gets the properties of a blob. - *

- * This method lists the properties of the blob specified by the - * blob and container parameters. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the blob to get - * properties for. - * @return A {@link GetBlobPropertiesResult} instance containing the blob - * properties returned for the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - GetBlobPropertiesResult getBlobProperties(String container, String blob) - throws ServiceException; - - /** - * Gets the properties of a blob, using the specified options. - *

- * This method lists the properties of the blob specified by the - * blob and container parameters. Use the - * {@link GetBlobPropertiesOptions options} parameter to set an optional - * server timeout for the operation, the lease ID if the blob has an active - * lease, the snapshot timestamp to get the properties of a snapshot, and - * any access conditions for the request. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the blob to get - * properties for. - * @param options - * A {@link GetBlobPropertiesOptions} instance containing options - * for the request. - * @return A {@link GetBlobPropertiesResult} instance containing the blob - * properties returned for the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - GetBlobPropertiesResult getBlobProperties(String container, String blob, - GetBlobPropertiesOptions options) throws ServiceException; - - /** - * Gets the properties, metadata, and content of a blob. - *

- * This method gets the properties, metadata, and content of the blob - * specified by the blob and container parameters. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the blob to get. - * @return A {@link GetBlobResult} instance containing the properties, - * metadata, and content of the blob from the server response to the - * request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - GetBlobResult getBlob(String container, String blob) - throws ServiceException; - - /** - * Gets the properties, metadata, and content of a blob or blob snapshot, - * using the specified options. - *

- * This method gets the properties, metadata, and content of the blob - * specified by the blob and container parameters. Use the - * {@link GetBlobOptions options} parameter to set an optional server - * timeout for the operation, a snapshot timestamp to specify a snapshot, a - * blob lease ID to get a blob with an active lease, an optional start and - * end range for blob content to return, and any access conditions to - * satisfy. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the blob to get. - * @param options - * A {@link GetBlobOptions} instance containing options for the - * request. - * @return A {@link GetBlobResult} instance containing the properties, - * metadata, and content of the blob from the server response to the - * request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - GetBlobResult getBlob(String container, String blob, GetBlobOptions options) - throws ServiceException; - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobService.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobService.java deleted file mode 100644 index 2d0ccf5c5bd9..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobService.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob; - -import com.microsoft.windowsazure.Configuration; - -/** - * A class for static factory methods that return instances implementing - * {@link com.microsoft.windowsazure.services.blob.BlobContract}. - */ -public final class BlobService { - private BlobService() { - } - - /** - * A static factory method that returns an instance implementing - * {@link com.microsoft.windowsazure.services.blob.BlobContract} using default values for initializing a - * {@link Configuration} instance. Note that the returned interface will not - * work unless storage account credentials have been added to the - * "META-INF/com.microsoft.windowsazure.properties" resource file. - * - * @return An instance implementing {@link com.microsoft.windowsazure.services.blob.BlobContract} for interacting - * with the blob service. - */ - public static BlobContract create() { - return create(null, Configuration.getInstance()); - } - - /** - * A static factory method that returns an instance implementing - * {@link com.microsoft.windowsazure.services.blob.BlobContract} using the specified {@link Configuration} instance. - * The {@link Configuration} instance must have storage account information - * and credentials set before this method is called for the returned - * interface to work. - * - * @param config - * A {@link Configuration} instance configured with storage - * account information and credentials. - * - * @return An instance implementing {@link com.microsoft.windowsazure.services.blob.BlobContract} for interacting - * with the blob service. - */ - public static BlobContract create(Configuration config) { - return create(null, config); - } - - /** - * A static factory method that returns an instance implementing - * {@link com.microsoft.windowsazure.services.blob.BlobContract} using default values for initializing a - * {@link Configuration} instance, and using the specified profile prefix - * for service settings. Note that the returned interface will not work - * unless storage account settings and credentials have been added to the - * "META-INF/com.microsoft.windowsazure.properties" resource file with the - * specified profile prefix. - * - * @param profile - * A string prefix for the account name and credentials settings - * in the {@link Configuration} instance. - * @return An instance implementing {@link com.microsoft.windowsazure.services.blob.BlobContract} for interacting - * with the blob service. - */ - public static BlobContract create(String profile) { - return create(profile, Configuration.getInstance()); - } - - /** - * A static factory method that returns an instance implementing - * {@link com.microsoft.windowsazure.services.blob.BlobContract} using the specified {@link Configuration} instance - * and profile prefix for service settings. The {@link Configuration} - * instance must have storage account information and credentials set with - * the specified profile prefix before this method is called for the - * returned interface to work. - * - * @param profile - * A string prefix for the account name and credentials settings - * in the {@link Configuration} instance. - * @param config - * A {@link Configuration} instance configured with storage - * account information and credentials. - * - * @return An instance implementing {@link com.microsoft.windowsazure.services.blob.BlobContract} for interacting - * with the blob service. - */ - public static BlobContract create(String profile, Configuration config) { - return config.create(profile, BlobContract.class); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/Exports.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/Exports.java deleted file mode 100644 index 7b43f1b3b108..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/Exports.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob; - -import com.microsoft.windowsazure.core.Builder; -import com.microsoft.windowsazure.core.ISO8601DateConverter; -import com.microsoft.windowsazure.core.UserAgentFilter; -import com.microsoft.windowsazure.services.blob.implementation.BlobExceptionProcessor; -import com.microsoft.windowsazure.services.blob.implementation.BlobRestProxy; -import com.microsoft.windowsazure.services.blob.implementation.SharedKeyFilter; -import com.microsoft.windowsazure.services.blob.implementation.SharedKeyLiteFilter; - -public class Exports implements Builder.Exports { - @Override - public void register(Builder.Registry registry) { - registry.add(BlobContract.class, BlobExceptionProcessor.class); - registry.add(BlobExceptionProcessor.class); - registry.add(BlobRestProxy.class); - registry.add(SharedKeyLiteFilter.class); - registry.add(SharedKeyFilter.class); - registry.add(ISO8601DateConverter.class); - registry.add(UserAgentFilter.class); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobExceptionProcessor.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobExceptionProcessor.java deleted file mode 100644 index 66a82fbc9fce..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobExceptionProcessor.java +++ /dev/null @@ -1,343 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.implementation; - -import java.io.InputStream; - -import javax.inject.Inject; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.exception.ServiceExceptionFactory; -import com.microsoft.windowsazure.services.blob.BlobContract; -import com.microsoft.windowsazure.services.blob.models.BlockList; -import com.microsoft.windowsazure.services.blob.models.CommitBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobBlockOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobResult; -import com.microsoft.windowsazure.services.blob.models.CreateContainerOptions; -import com.microsoft.windowsazure.services.blob.models.DeleteBlobOptions; -import com.microsoft.windowsazure.services.blob.models.DeleteContainerOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesResult; -import com.microsoft.windowsazure.services.blob.models.GetBlobResult; -import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksResult; -import com.microsoft.windowsazure.services.blob.models.ListContainersOptions; -import com.microsoft.windowsazure.services.blob.models.ListContainersResult; -import com.sun.jersey.api.client.ClientHandlerException; -import com.sun.jersey.api.client.UniformInterfaceException; - -public class BlobExceptionProcessor implements BlobContract { - private static Log log = LogFactory.getLog(BlobExceptionProcessor.class); - private final BlobContract service; - - @Inject - public BlobExceptionProcessor(BlobRestProxy service) { - this.service = service; - } - - public BlobExceptionProcessor(BlobContract service) { - this.service = service; - } - - @Override - public BlobContract withFilter(ServiceFilter filter) { - return new BlobExceptionProcessor(service.withFilter(filter)); - } - - @Override - public BlobContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter) { - return new BlobExceptionProcessor( - service.withRequestFilterFirst(serviceRequestFilter)); - } - - @Override - public BlobContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter) { - return new BlobExceptionProcessor( - service.withRequestFilterLast(serviceRequestFilter)); - } - - @Override - public BlobContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter) { - return new BlobExceptionProcessor( - service.withResponseFilterFirst(serviceResponseFilter)); - } - - @Override - public BlobContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter) { - return new BlobExceptionProcessor( - service.withResponseFilterLast(serviceResponseFilter)); - } - - private ServiceException processCatch(ServiceException e) { - log.warn(e.getMessage(), e.getCause()); - return ServiceExceptionFactory.process("blob", e); - } - - @Override - public CreateBlobResult createBlockBlob(String container, String blob, - InputStream contentStream) throws ServiceException { - try { - return service.createBlockBlob(container, blob, contentStream); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public CreateBlobResult createBlockBlob(String container, String blob, - InputStream contentStream, CreateBlobOptions options) - throws ServiceException { - try { - return service.createBlockBlob(container, blob, contentStream, - options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void createBlobBlock(String container, String blob, String blockId, - InputStream contentStream) throws ServiceException { - try { - service.createBlobBlock(container, blob, blockId, contentStream); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void createBlobBlock(String container, String blob, String blockId, - InputStream contentStream, CreateBlobBlockOptions options) - throws ServiceException { - try { - service.createBlobBlock(container, blob, blockId, contentStream, - options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void commitBlobBlocks(String container, String blob, - BlockList blockList) throws ServiceException { - try { - service.commitBlobBlocks(container, blob, blockList); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void commitBlobBlocks(String container, String blob, - BlockList blockList, CommitBlobBlocksOptions options) - throws ServiceException { - try { - service.commitBlobBlocks(container, blob, blockList, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void deleteBlob(String container, String blob) - throws ServiceException { - try { - service.deleteBlob(container, blob); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void deleteBlob(String container, String blob, - DeleteBlobOptions options) throws ServiceException { - try { - service.deleteBlob(container, blob, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public ListContainersResult listContainers() throws ServiceException { - try { - return service.listContainers(); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public ListContainersResult listContainers(ListContainersOptions options) - throws ServiceException { - try { - return service.listContainers(options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void createContainer(String container) throws ServiceException { - try { - service.createContainer(container); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void createContainer(String container, CreateContainerOptions options) - throws ServiceException { - try { - service.createContainer(container, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void deleteContainer(String container) throws ServiceException { - try { - service.deleteContainer(container); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void deleteContainer(String container, DeleteContainerOptions options) - throws ServiceException { - try { - service.deleteContainer(container, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public ListBlobBlocksResult listBlobBlocks(String container, String blob) - throws ServiceException { - try { - return service.listBlobBlocks(container, blob); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public ListBlobBlocksResult listBlobBlocks(String container, String blob, - ListBlobBlocksOptions options) throws ServiceException { - try { - return service.listBlobBlocks(container, blob, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public GetBlobPropertiesResult getBlobProperties(String container, - String blob) throws ServiceException { - try { - return service.getBlobProperties(container, blob); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public GetBlobPropertiesResult getBlobProperties(String container, - String blob, GetBlobPropertiesOptions options) - throws ServiceException { - try { - return service.getBlobProperties(container, blob, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public GetBlobResult getBlob(String container, String blob) - throws ServiceException { - try { - return service.getBlob(container, blob); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public GetBlobResult getBlob(String container, String blob, - GetBlobOptions options) throws ServiceException { - try { - return service.getBlob(container, blob, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobOperationRestProxy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobOperationRestProxy.java deleted file mode 100644 index 5d99dfd59b91..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobOperationRestProxy.java +++ /dev/null @@ -1,578 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.blob.implementation; - -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.util.HashMap; -import java.util.Map; - -import com.microsoft.windowsazure.core.RFC1123DateConverter; -import com.microsoft.windowsazure.core.pipeline.PipelineHelpers; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; -import com.microsoft.windowsazure.core.utils.CollectionStringBuilder; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.blob.BlobContract; -import com.microsoft.windowsazure.services.blob.models.BlobProperties; -import com.microsoft.windowsazure.services.blob.models.BlobServiceOptions; -import com.microsoft.windowsazure.services.blob.models.BlockList; -import com.microsoft.windowsazure.services.blob.models.CommitBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobBlockOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobResult; -import com.microsoft.windowsazure.services.blob.models.CreateContainerOptions; -import com.microsoft.windowsazure.services.blob.models.DeleteBlobOptions; -import com.microsoft.windowsazure.services.blob.models.DeleteContainerOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesResult; -import com.microsoft.windowsazure.services.blob.models.GetBlobResult; -import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksResult; -import com.microsoft.windowsazure.services.blob.models.ListContainersOptions; -import com.microsoft.windowsazure.services.blob.models.ListContainersResult; -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.WebResource; -import com.sun.jersey.api.client.WebResource.Builder; -import com.sun.jersey.api.client.filter.ClientFilter; -import com.sun.jersey.core.util.Base64; - -public abstract class BlobOperationRestProxy implements BlobContract { - - private static final String API_VERSION = "2011-08-18"; - private final Client channel; - private final String accountName; - private final String url; - private final RFC1123DateConverter dateMapper; - private final ClientFilter[] filters; - - protected BlobOperationRestProxy(Client channel, String accountName, - String url) { - this(channel, new ClientFilter[0], accountName, url, - new RFC1123DateConverter()); - } - - protected BlobOperationRestProxy(Client channel, ClientFilter[] filters, - String accountName, String url, RFC1123DateConverter dateMapper) { - this.channel = channel; - this.accountName = accountName; - this.url = url; - this.filters = filters; - this.dateMapper = dateMapper; - } - - @Override - public abstract BlobContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter); - - @Override - public abstract BlobContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter); - - @Override - public abstract BlobContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter); - - @Override - public abstract BlobContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter); - - protected Client getChannel() { - return channel; - } - - protected String getAccountName() { - return accountName; - } - - protected String getUrl() { - return url; - } - - protected RFC1123DateConverter getDateMapper() { - return dateMapper; - } - - protected ClientFilter[] getFilters() { - return filters; - } - - private void throwIfError(ClientResponse r) { - PipelineHelpers.throwIfError(r); - } - - private void throwIfNotSuccess(ClientResponse clientResponse) { - PipelineHelpers.throwIfNotSuccess(clientResponse); - } - - private WebResource addOptionalQueryParam(WebResource webResource, - String key, Object value) { - return PipelineHelpers.addOptionalQueryParam(webResource, key, value); - } - - private Builder addOptionalRangeHeader(Builder builder, Long rangeStart, - Long rangeEnd) { - return PipelineHelpers.addOptionalRangeHeader(builder, rangeStart, - rangeEnd); - } - - private WebResource addOptionalQueryParam(WebResource webResource, - String key, int value, int defaultValue) { - return PipelineHelpers.addOptionalQueryParam(webResource, key, value, - defaultValue); - } - - private WebResource addOptionalContainerIncludeQueryParam( - ListContainersOptions options, WebResource webResource) { - CollectionStringBuilder sb = new CollectionStringBuilder(); - sb.addValue(options.isIncludeMetadata(), "metadata"); - webResource = addOptionalQueryParam(webResource, "include", - sb.toString()); - return webResource; - } - - private Builder addOptionalHeader(Builder builder, String name, Object value) { - return PipelineHelpers.addOptionalHeader(builder, name, value); - } - - private Builder addOptionalMetadataHeader(Builder builder, - Map metadata) { - return PipelineHelpers.addOptionalMetadataHeader(builder, metadata); - } - - private Builder addOptionalAccessConditionHeader(Builder builder, - AccessConditionHeader accessCondition) { - return PipelineHelpers.addOptionalAccessConditionHeader(builder, - accessCondition); - } - - private Builder addPutBlobHeaders(CreateBlobOptions options, Builder builder) { - builder = addOptionalHeader(builder, "Content-Type", - options.getContentType()); - if (options.getContentType() == null) { - // Note: Add content type here to enable proper HMAC signing - builder = builder.type("application/octet-stream"); - } - builder = addOptionalHeader(builder, "Content-Encoding", - options.getContentEncoding()); - builder = addOptionalHeader(builder, "Content-Language", - options.getContentLanguage()); - builder = addOptionalHeader(builder, "Content-MD5", - options.getContentMD5()); - builder = addOptionalHeader(builder, "Cache-Control", - options.getCacheControl()); - builder = addOptionalHeader(builder, "x-ms-blob-content-type", - options.getBlobContentType()); - builder = addOptionalHeader(builder, "x-ms-blob-content-encoding", - options.getBlobContentEncoding()); - builder = addOptionalHeader(builder, "x-ms-blob-content-language", - options.getBlobContentLanguage()); - builder = addOptionalHeader(builder, "x-ms-blob-content-md5", - options.getBlobContentMD5()); - builder = addOptionalHeader(builder, "x-ms-blob-cache-control", - options.getBlobCacheControl()); - builder = addOptionalHeader(builder, "x-ms-lease-id", - options.getLeaseId()); - builder = addOptionalMetadataHeader(builder, options.getMetadata()); - builder = addOptionalAccessConditionHeader(builder, - options.getAccessCondition()); - - return builder; - } - - private WebResource getResource(BlobServiceOptions options) { - WebResource webResource = channel.resource(url).path("/"); - webResource = addOptionalQueryParam(webResource, "timeout", - options.getTimeout()); - for (ClientFilter filter : filters) { - webResource.addFilter(filter); - } - - return webResource; - } - - @Override - public void createContainer(String container) throws ServiceException { - createContainer(container, new CreateContainerOptions()); - } - - @Override - public void createContainer(String container, CreateContainerOptions options) - throws ServiceException { - if (container == null || container.isEmpty()) { - throw new IllegalArgumentException( - "The container cannot be null or empty."); - } - WebResource webResource = getResource(options).path(container) - .queryParam("resType", "container"); - - WebResource.Builder builder = webResource.header("x-ms-version", - API_VERSION); - builder = addOptionalMetadataHeader(builder, options.getMetadata()); - builder = addOptionalHeader(builder, "x-ms-blob-public-access", - options.getPublicAccess()); - - builder.put(); - } - - @Override - public void deleteContainer(String container) throws ServiceException { - deleteContainer(container, new DeleteContainerOptions()); - } - - @Override - public void deleteContainer(String container, DeleteContainerOptions options) - throws ServiceException { - if ((container == null) || (container.isEmpty())) { - throw new IllegalArgumentException( - "The root container has already been created."); - } - WebResource webResource = getResource(options).path(container) - .queryParam("resType", "container"); - - WebResource.Builder builder = webResource.header("x-ms-version", - API_VERSION); - builder = addOptionalAccessConditionHeader(builder, - options.getAccessCondition()); - - builder.delete(); - } - - @Override - public void deleteBlob(String container, String blob) - throws ServiceException { - deleteBlob(container, blob, new DeleteBlobOptions()); - } - - @Override - public void deleteBlob(String container, String blob, - DeleteBlobOptions options) throws ServiceException { - String path = createPathFromContainer(container); - WebResource webResource = getResource(options).path(path).path(blob); - webResource = addOptionalQueryParam(webResource, "snapshot", - options.getSnapshot()); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - builder = addOptionalHeader(builder, "x-ms-lease-id", - options.getLeaseId()); - if (options.getDeleteSnaphotsOnly() != null) { - builder = addOptionalHeader(builder, "x-ms-delete-snapshots", - options.getDeleteSnaphotsOnly() ? "only" : "include"); - } - builder = addOptionalAccessConditionHeader(builder, - options.getAccessCondition()); - - builder.delete(); - } - - @Override - public ListContainersResult listContainers() throws ServiceException { - return listContainers(new ListContainersOptions()); - } - - @Override - public ListContainersResult listContainers(ListContainersOptions options) - throws ServiceException { - WebResource webResource = getResource(options).path("/").queryParam( - "comp", "list"); - webResource = addOptionalQueryParam(webResource, "prefix", - options.getPrefix()); - webResource = addOptionalQueryParam(webResource, "marker", - options.getMarker()); - webResource = addOptionalQueryParam(webResource, "maxresults", - options.getMaxResults(), 0); - webResource = addOptionalContainerIncludeQueryParam(options, - webResource); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - return builder.get(ListContainersResult.class); - } - - @Override - public CreateBlobResult createBlockBlob(String container, String blob, - InputStream contentStream) throws ServiceException { - return createBlockBlob(container, blob, contentStream, - new CreateBlobOptions()); - } - - @Override - public CreateBlobResult createBlockBlob(String container, String blob, - InputStream contentStream, CreateBlobOptions options) - throws ServiceException { - String path = createPathFromContainer(container); - WebResource webResource = getResource(options).path(path).path(blob); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - builder = builder.header("x-ms-blob-type", "BlockBlob"); - builder = addPutBlobHeaders(options, builder); - - Object contentObject = (contentStream == null ? new byte[0] - : contentStream); - ClientResponse clientResponse = builder.put(ClientResponse.class, - contentObject); - throwIfError(clientResponse); - - CreateBlobResult createBlobResult = new CreateBlobResult(); - createBlobResult.setEtag(clientResponse.getHeaders().getFirst("ETag")); - createBlobResult.setLastModified(dateMapper.parse(clientResponse - .getHeaders().getFirst("Last-Modified"))); - - return createBlobResult; - } - - @Override - public void createBlobBlock(String container, String blob, String blockId, - InputStream contentStream) throws ServiceException { - createBlobBlock(container, blob, blockId, contentStream, - new CreateBlobBlockOptions()); - } - - @Override - public void createBlobBlock(String container, String blob, String blockId, - InputStream contentStream, CreateBlobBlockOptions options) - throws ServiceException { - String path = createPathFromContainer(container); - WebResource webResource = getResource(options).path(path).path(blob) - .queryParam("comp", "block"); - try { - webResource = addOptionalQueryParam(webResource, "blockid", - new String(Base64.encode(blockId), "UTF-8")); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } - - Builder builder = webResource.header("x-ms-version", API_VERSION); - builder = addOptionalHeader(builder, "x-ms-lease-id", - options.getLeaseId()); - builder = addOptionalHeader(builder, "Content-MD5", - options.getContentMD5()); - - builder.put(contentStream); - } - - @Override - public void commitBlobBlocks(String container, String blob, - BlockList blockList) throws ServiceException { - commitBlobBlocks(container, blob, blockList, - new CommitBlobBlocksOptions()); - } - - @Override - public void commitBlobBlocks(String container, String blob, - BlockList blockList, CommitBlobBlocksOptions options) - throws ServiceException { - String path = createPathFromContainer(container); - WebResource webResource = getResource(options).path(path).path(blob) - .queryParam("comp", "blocklist"); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - builder = addOptionalHeader(builder, "x-ms-lease-id", - options.getLeaseId()); - builder = addOptionalHeader(builder, "x-ms-blob-cache-control", - options.getBlobCacheControl()); - builder = addOptionalHeader(builder, "x-ms-blob-content-type", - options.getBlobContentType()); - builder = addOptionalHeader(builder, "x-ms-blob-content-encoding", - options.getBlobContentEncoding()); - builder = addOptionalHeader(builder, "x-ms-blob-content-language", - options.getBlobContentLanguage()); - builder = addOptionalHeader(builder, "x-ms-blob-content-md5", - options.getBlobContentMD5()); - builder = addOptionalMetadataHeader(builder, options.getMetadata()); - builder = addOptionalAccessConditionHeader(builder, - options.getAccessCondition()); - - builder.put(blockList); - } - - @Override - public GetBlobPropertiesResult getBlobProperties(String container, - String blob) throws ServiceException { - return getBlobProperties(container, blob, - new GetBlobPropertiesOptions()); - } - - @Override - public GetBlobPropertiesResult getBlobProperties(String container, - String blob, GetBlobPropertiesOptions options) - throws ServiceException { - String path = createPathFromContainer(container); - WebResource webResource = getResource(options).path(path).path(blob); - webResource = addOptionalQueryParam(webResource, "snapshot", - options.getSnapshot()); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - builder = addOptionalHeader(builder, "x-ms-lease-id", - options.getLeaseId()); - builder = addOptionalAccessConditionHeader(builder, - options.getAccessCondition()); - - ClientResponse response = builder.method("HEAD", ClientResponse.class); - throwIfNotSuccess(response); - - return getBlobPropertiesResultFromResponse(response); - } - - @Override - public GetBlobResult getBlob(String container, String blob) - throws ServiceException { - return getBlob(container, blob, new GetBlobOptions()); - } - - @Override - public GetBlobResult getBlob(String container, String blob, - GetBlobOptions options) throws ServiceException { - String path = createPathFromContainer(container); - WebResource webResource = getResource(options).path(path).path(blob); - webResource = addOptionalQueryParam(webResource, "snapshot", - options.getSnapshot()); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - builder = addOptionalHeader(builder, "x-ms-lease-id", - options.getLeaseId()); - builder = addOptionalRangeHeader(builder, options.getRangeStart(), - options.getRangeEnd()); - builder = addOptionalAccessConditionHeader(builder, - options.getAccessCondition()); - if (options.isComputeRangeMD5()) { - builder = addOptionalHeader(builder, "x-ms-range-get-content-md5", - "true"); - } - - ClientResponse response = builder.get(ClientResponse.class); - throwIfNotSuccess(response); - - GetBlobPropertiesResult properties = getBlobPropertiesResultFromResponse(response); - GetBlobResult blobResult = new GetBlobResult(); - blobResult.setProperties(properties.getProperties()); - blobResult.setMetadata(properties.getMetadata()); - blobResult.setContentStream(response.getEntityInputStream()); - return blobResult; - } - - private GetBlobPropertiesResult getBlobPropertiesResultFromResponse( - ClientResponse response) { - // Properties - BlobProperties properties = new BlobProperties(); - properties.setLastModified(dateMapper.parse(response.getHeaders() - .getFirst("Last-Modified"))); - properties - .setBlobType(response.getHeaders().getFirst("x-ms-blob-type")); - properties.setLeaseStatus(response.getHeaders().getFirst( - "x-ms-lease-status")); - - properties.setContentLength(Long.parseLong(response.getHeaders() - .getFirst("Content-Length"))); - properties.setContentType(response.getHeaders() - .getFirst("Content-Type")); - properties.setContentMD5(response.getHeaders().getFirst("Content-MD5")); - properties.setContentEncoding(response.getHeaders().getFirst( - "Content-Encoding")); - properties.setContentLanguage(response.getHeaders().getFirst( - "Content-Language")); - properties.setCacheControl(response.getHeaders().getFirst( - "Cache-Control")); - - properties.setEtag(response.getHeaders().getFirst("Etag")); - if (response.getHeaders().containsKey("x-ms-blob-sequence-number")) { - properties.setSequenceNumber(Long.parseLong(response.getHeaders() - .getFirst("x-ms-blob-sequence-number"))); - } - - // Metadata - HashMap metadata = getMetadataFromHeaders(response); - - // Result - GetBlobPropertiesResult result = new GetBlobPropertiesResult(); - result.setMetadata(metadata); - result.setProperties(properties); - return result; - } - - @Override - public ListBlobBlocksResult listBlobBlocks(String container, String blob) - throws ServiceException { - return listBlobBlocks(container, blob, new ListBlobBlocksOptions()); - } - - @Override - public ListBlobBlocksResult listBlobBlocks(String container, String blob, - ListBlobBlocksOptions options) throws ServiceException { - String path = createPathFromContainer(container); - WebResource webResource = getResource(options).path(path).path(blob) - .queryParam("comp", "blocklist"); - webResource = addOptionalQueryParam(webResource, "snapshot", - options.getSnapshot()); - if (options.isCommittedList() && options.isUncommittedList()) { - webResource = addOptionalQueryParam(webResource, "blocklisttype", - "all"); - } else if (options.isCommittedList()) { - webResource = addOptionalQueryParam(webResource, "blocklisttype", - "committed"); - } else if (options.isUncommittedList()) { - webResource = addOptionalQueryParam(webResource, "blocklisttype", - "uncommitted"); - } - - Builder builder = webResource.header("x-ms-version", API_VERSION); - builder = addOptionalHeader(builder, "x-ms-lease-id", - options.getLeaseId()); - - ClientResponse response = builder.get(ClientResponse.class); - throwIfError(response); - - ListBlobBlocksResult result = response - .getEntity(ListBlobBlocksResult.class); - result.setEtag(response.getHeaders().getFirst("ETag")); - result.setContentType(response.getHeaders().getFirst("Content-Type")); - - String blobContentLength = response.getHeaders().getFirst( - "x-ms-blob-content-length"); - if (blobContentLength != null) { - result.setContentLength(Long.parseLong(blobContentLength)); - } else { - result.setContentLength(0); - } - - String lastModified = response.getHeaders().getFirst("Last-Modified"); - if (lastModified != null) { - result.setLastModified(dateMapper.parse(lastModified)); - } - - return result; - } - - private HashMap getMetadataFromHeaders( - ClientResponse response) { - return PipelineHelpers.getMetadataFromHeaders(response); - } - - private String createPathFromContainer(String containerName) { - String path; - if (containerName == null || containerName.isEmpty()) { - path = "$root"; - } else { - path = containerName; - } - return path; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobRestProxy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobRestProxy.java deleted file mode 100644 index f2d95c1bc608..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobRestProxy.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.implementation; - -import java.util.Arrays; - -import javax.inject.Inject; -import javax.inject.Named; - -import com.microsoft.windowsazure.core.RFC1123DateConverter; -import com.microsoft.windowsazure.core.UserAgentFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterRequestAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterResponseAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.HttpURLConnectionClient; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.services.blob.BlobConfiguration; -import com.microsoft.windowsazure.services.blob.BlobContract; -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.filter.ClientFilter; - -public class BlobRestProxy extends BlobOperationRestProxy implements - BlobContract { - private final SharedKeyFilter sharedKeyFilter; - - @Inject - public BlobRestProxy(HttpURLConnectionClient channel, - @Named(BlobConfiguration.ACCOUNT_NAME) String accountName, - @Named(BlobConfiguration.URI) String url, - SharedKeyFilter sharedKeyFilter, UserAgentFilter userAgentFilter) { - super(channel, accountName, url); - - this.sharedKeyFilter = sharedKeyFilter; - - channel.addFilter(sharedKeyFilter); - channel.addFilter(new ClientFilterRequestAdapter(userAgentFilter)); - } - - public BlobRestProxy(Client client, ClientFilter[] filters, - String accountName, String url, SharedKeyFilter sharedKeyFilter, - RFC1123DateConverter dateMapper) { - super(client, filters, accountName, url, dateMapper); - - this.sharedKeyFilter = sharedKeyFilter; - } - - @Override - public BlobContract withFilter(ServiceFilter filter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterAdapter(filter); - return new BlobRestProxy(getChannel(), newFilters, getAccountName(), - getUrl(), this.sharedKeyFilter, getDateMapper()); - } - - @Override - public BlobContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = new ClientFilter[currentFilters.length + 1]; - System.arraycopy(currentFilters, 0, newFilters, 1, - currentFilters.length); - newFilters[0] = new ClientFilterRequestAdapter(serviceRequestFilter); - return new BlobRestProxy(getChannel(), newFilters, getAccountName(), - getUrl(), this.sharedKeyFilter, getDateMapper()); - } - - @Override - public BlobContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterRequestAdapter( - serviceRequestFilter); - return new BlobRestProxy(getChannel(), newFilters, getAccountName(), - getUrl(), this.sharedKeyFilter, getDateMapper()); - } - - @Override - public BlobContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = new ClientFilter[currentFilters.length + 1]; - System.arraycopy(currentFilters, 0, newFilters, 1, - currentFilters.length); - newFilters[0] = new ClientFilterResponseAdapter(serviceResponseFilter); - return new BlobRestProxy(getChannel(), newFilters, getAccountName(), - getUrl(), this.sharedKeyFilter, getDateMapper()); - } - - @Override - public BlobContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterResponseAdapter( - serviceResponseFilter); - return new BlobRestProxy(getChannel(), newFilters, getAccountName(), - getUrl(), this.sharedKeyFilter, getDateMapper()); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/ContainerACLDateAdapter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/ContainerACLDateAdapter.java deleted file mode 100644 index afd028fae911..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/ContainerACLDateAdapter.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.implementation; - -import java.util.Date; - -import javax.xml.bind.annotation.adapters.XmlAdapter; - -import com.microsoft.windowsazure.core.ISO8601DateConverter; - -/* - * JAXB adapter for a "not quite" ISO 8601 date time element - */ -public class ContainerACLDateAdapter extends XmlAdapter { - - @Override - public Date unmarshal(String arg0) throws Exception { - return new ISO8601DateConverter().parse(arg0); - } - - @Override - public String marshal(Date arg0) throws Exception { - return new ISO8601DateConverter().shortFormat(arg0); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/HmacSHA256Sign.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/HmacSHA256Sign.java deleted file mode 100644 index 6e66eec8117b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/HmacSHA256Sign.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.implementation; - -import javax.crypto.Mac; -import javax.crypto.spec.SecretKeySpec; - -import com.sun.jersey.core.util.Base64; - -public class HmacSHA256Sign { - private final String accessKey; - - public HmacSHA256Sign(String accessKey) { - this.accessKey = accessKey; - } - - public String sign(String stringToSign) { - try { - // Encoding the Signature - // Signature=Base64(HMAC-SHA256(UTF8(StringToSign))) - - Mac hmac = Mac.getInstance("hmacSHA256"); - hmac.init(new SecretKeySpec(Base64.decode(accessKey), "hmacSHA256")); - byte[] digest = hmac.doFinal(stringToSign.getBytes("UTF-8")); - return new String(Base64.encode(digest), "UTF-8"); - } catch (Exception e) { - throw new IllegalArgumentException("accessKey", e); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/MetadataAdapter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/MetadataAdapter.java deleted file mode 100644 index 790a2535a0e2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/MetadataAdapter.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * - * Copyright (c) Microsoft and contributors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.microsoft.windowsazure.services.blob.implementation; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import javax.naming.OperationNotSupportedException; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.adapters.XmlAdapter; - -import org.w3c.dom.Element; - -/* - * JAXB adapter for element - */ -public class MetadataAdapter - extends - XmlAdapter> { - - @Override - public HashMap unmarshal(MetadataHashMapType arg0) - throws Exception { - HashMap result = new HashMap(); - for (Element entry : arg0.getEntries()) { - result.put(entry.getLocalName(), entry.getFirstChild() - .getNodeValue()); - } - return result; - } - - @Override - public MetadataHashMapType marshal(HashMap arg0) - throws Exception { - // We don't need marshaling for blob/container metadata - throw new OperationNotSupportedException(); - } - - public static class MetadataHashMapType { - private List entries = new ArrayList(); - - @XmlAnyElement - public List getEntries() { - return entries; - } - - public void setEntries(List entries) { - this.entries = entries; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyFilter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyFilter.java deleted file mode 100644 index 7d8f73607876..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyFilter.java +++ /dev/null @@ -1,241 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.implementation; - -import java.util.Collections; -import java.util.Date; -import java.util.List; -import java.util.Locale; - -import javax.inject.Named; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import com.microsoft.windowsazure.core.RFC1123DateConverter; -import com.microsoft.windowsazure.core.pipeline.jersey.EntityStreamingListener; -import com.microsoft.windowsazure.services.blob.BlobConfiguration; -import com.microsoft.windowsazure.services.blob.implementation.SharedKeyUtils.QueryParam; -import com.sun.jersey.api.client.ClientRequest; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.filter.ClientFilter; - -public class SharedKeyFilter extends ClientFilter implements - EntityStreamingListener { - private static Log log = LogFactory.getLog(SharedKeyFilter.class); - - private final String accountName; - private final HmacSHA256Sign signer; - - public SharedKeyFilter( - @Named(BlobConfiguration.ACCOUNT_NAME) String accountName, - @Named(BlobConfiguration.ACCOUNT_KEY) String accountKey) { - this.accountName = accountName; - this.signer = new HmacSHA256Sign(accountKey); - } - - protected String getHeader(ClientRequest cr, String headerKey) { - return SharedKeyUtils.getHeader(cr, headerKey); - } - - protected HmacSHA256Sign getSigner() { - return signer; - } - - protected String getAccountName() { - return accountName; - } - - @Override - public ClientResponse handle(ClientRequest cr) { - // Only sign if no other filter is handling authorization - if (cr.getProperties().get(SharedKeyUtils.AUTHORIZATION_FILTER_MARKER) == null) { - cr.getProperties().put(SharedKeyUtils.AUTHORIZATION_FILTER_MARKER, - null); - - // Register ourselves as listener so we are called back when the - // entity is - // written to the output stream by the next filter in line. - if (cr.getProperties().get(EntityStreamingListener.class.getName()) == null) { - cr.getProperties().put(EntityStreamingListener.class.getName(), - this); - } - - } - return this.getNext().handle(cr); - } - - @Override - public void onBeforeStreamingEntity(ClientRequest clientRequest) { - // All headers should be known at this point, time to sign! - sign(clientRequest); - } - - /* - * StringToSign = VERB + "\n" + Content-Encoding + "\n" Content-Language + - * "\n" Content-Length + "\n" Content-MD5 + "\n" + Content-Type + "\n" + - * Date + "\n" + If-Modified-Since + "\n" If-Match + "\n" If-None-Match + - * "\n" If-Unmodified-Since + "\n" Range + "\n" CanonicalizedHeaders + - * CanonicalizedResource; - */ - public void sign(ClientRequest cr) { - // gather signed material - addOptionalDateHeader(cr); - - // build signed string - String stringToSign = cr.getMethod() + "\n" - + getHeader(cr, "Content-Encoding") + "\n" - + getHeader(cr, "Content-Language") + "\n" - + getHeader(cr, "Content-Length") + "\n" - + getHeader(cr, "Content-MD5") + "\n" - + getHeader(cr, "Content-Type") + "\n" + getHeader(cr, "Date") - + "\n" + getHeader(cr, "If-Modified-Since") + "\n" - + getHeader(cr, "If-Match") + "\n" - + getHeader(cr, "If-None-Match") + "\n" - + getHeader(cr, "If-Unmodified-Since") + "\n" - + getHeader(cr, "Range") + "\n"; - - stringToSign += getCanonicalizedHeaders(cr); - stringToSign += getCanonicalizedResource(cr); - - if (log.isDebugEnabled()) { - log.debug(String.format("String to sign: \"%s\"", stringToSign)); - } - // System.out.println(String.format("String to sign: \"%s\"", - // stringToSign)); - - String signature = this.signer.sign(stringToSign); - cr.getHeaders().putSingle("Authorization", - "SharedKey " + this.accountName + ":" + signature); - } - - protected void addOptionalDateHeader(ClientRequest cr) { - String date = getHeader(cr, "Date"); - if (date == "") { - date = new RFC1123DateConverter().format(new Date()); - cr.getHeaders().putSingle("Date", date); - } - } - - /** - * Constructing the Canonicalized Headers String - * - * To construct the CanonicalizedHeaders portion of the signature string, - * follow these steps: - * - * 1. Retrieve all headers for the resource that begin with x-ms-, including - * the x-ms-date header. - * - * 2. Convert each HTTP header name to lowercase. - * - * 3. Sort the headers lexicographically by header name, in ascending order. - * Note that each header may appear only once in the string. - * - * 4. Unfold the string by replacing any breaking white space with a single - * space. - * - * 5. Trim any white space around the colon in the header. - * - * 6. Finally, append a new line character to each canonicalized header in - * the resulting list. Construct the CanonicalizedHeaders string by - * concatenating all headers in this list into a single string. - */ - private String getCanonicalizedHeaders(ClientRequest cr) { - return SharedKeyUtils.getCanonicalizedHeaders(cr); - } - - /** - * This format supports Shared Key authentication for the 2009-09-19 version - * of the Blob and Queue services. Construct the CanonicalizedResource - * string in this format as follows: - * - * 1. Beginning with an empty string (""), append a forward slash (/), - * followed by the name of the account that owns the resource being - * accessed. - * - * 2. Append the resource's encoded URI path, without any query parameters. - * - * 3. Retrieve all query parameters on the resource URI, including the comp - * parameter if it exists. - * - * 4. Convert all parameter names to lowercase. - * - * 5. Sort the query parameters lexicographically by parameter name, in - * ascending order. - * - * 6. URL-decode each query parameter name and value. - * - * 7. Append each query parameter name and value to the string in the - * following format, making sure to include the colon (:) between the name - * and the value: - * - * parameter-name:parameter-value - * - * 8. If a query parameter has more than one value, sort all values - * lexicographically, then include them in a comma-separated list: - * - * parameter-name:parameter-value-1,parameter-value-2,parameter-value-n - * - * 9. Append a new line character (\n) after each name-value pair. - */ - private String getCanonicalizedResource(ClientRequest cr) { - // 1. Beginning with an empty string (""), append a forward slash (/), - // followed by the name of the account that owns - // the resource being accessed. - String result = "/" + this.accountName; - - // 2. Append the resource's encoded URI path, without any query - // parameters. - result += cr.getURI().getPath(); - - // 3. Retrieve all query parameters on the resource URI, including the - // comp parameter if it exists. - // 6. URL-decode each query parameter name and value. - List queryParams = SharedKeyUtils.getQueryParams(cr - .getURI().getQuery()); - - // 4. Convert all parameter names to lowercase. - for (QueryParam param : queryParams) { - param.setName(param.getName().toLowerCase(Locale.US)); - } - - // 5. Sort the query parameters lexicographically by parameter name, in - // ascending order. - Collections.sort(queryParams); - - // 7. Append each query parameter name and value to the string - // 8. If a query parameter has more than one value, sort all values - // lexicographically, then include them in a comma-separated list - for (int i = 0; i < queryParams.size(); i++) { - QueryParam param = queryParams.get(i); - - List values = param.getValues(); - // Collections.sort(values); - - // 9. Append a new line character (\n) after each name-value pair. - result += "\n"; - result += param.getName(); - result += ":"; - for (int j = 0; j < values.size(); j++) { - if (j > 0) { - result += ","; - } - result += values.get(j); - } - } - - return result; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyLiteFilter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyLiteFilter.java deleted file mode 100644 index 45fe7b3d0e00..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyLiteFilter.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.implementation; - -import java.util.Date; -import java.util.List; - -import javax.inject.Named; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import com.microsoft.windowsazure.core.RFC1123DateConverter; -import com.microsoft.windowsazure.core.pipeline.jersey.EntityStreamingListener; -import com.microsoft.windowsazure.services.blob.BlobConfiguration; -import com.microsoft.windowsazure.services.blob.implementation.SharedKeyUtils.QueryParam; -import com.sun.jersey.api.client.ClientRequest; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.filter.ClientFilter; - -public class SharedKeyLiteFilter extends ClientFilter implements - EntityStreamingListener { - private static Log log = LogFactory.getLog(SharedKeyLiteFilter.class); - - private final String accountName; - private final HmacSHA256Sign signer; - - public SharedKeyLiteFilter( - @Named(BlobConfiguration.ACCOUNT_NAME) String accountName, - @Named(BlobConfiguration.ACCOUNT_KEY) String accountKey) { - - this.accountName = accountName; - this.signer = new HmacSHA256Sign(accountKey); - } - - @Override - public ClientResponse handle(ClientRequest cr) { - // Only sign if no other filter is handling authorization - if (cr.getProperties().get(SharedKeyUtils.AUTHORIZATION_FILTER_MARKER) == null) { - cr.getProperties().put(SharedKeyUtils.AUTHORIZATION_FILTER_MARKER, - null); - - // Register ourselves as listener so we are called back when the - // entity is - // written to the output stream by the next filter in line. - if (cr.getProperties().get(EntityStreamingListener.class.getName()) == null) { - cr.getProperties().put(EntityStreamingListener.class.getName(), - this); - } - } - - return this.getNext().handle(cr); - } - - @Override - public void onBeforeStreamingEntity(ClientRequest clientRequest) { - // All headers should be known at this point, time to sign! - sign(clientRequest); - } - - /* - * StringToSign = VERB + "\n" + Content-MD5 + "\n" + Content-Type + "\n" + - * Date + "\n" + CanonicalizedHeaders + CanonicalizedResource; - */ - public void sign(ClientRequest cr) { - // gather signed material - String requestMethod = cr.getMethod(); - String contentMD5 = getHeader(cr, "Content-MD5"); - String contentType = getHeader(cr, "Content-Type"); - String date = getHeader(cr, "Date"); - - if (date == "") { - date = new RFC1123DateConverter().format(new Date()); - cr.getHeaders().add("Date", date); - } - - // build signed string - String stringToSign = requestMethod + "\n" + contentMD5 + "\n" - + contentType + "\n" + date + "\n"; - - stringToSign += addCanonicalizedHeaders(cr); - stringToSign += addCanonicalizedResource(cr); - - if (log.isDebugEnabled()) { - log.debug(String.format("String to sign: \"%s\"", stringToSign)); - } - - String signature = this.signer.sign(stringToSign); - cr.getHeaders().putSingle("Authorization", - "SharedKeyLite " + this.accountName + ":" + signature); - } - - /** - * Constructing the Canonicalized Headers String - * - * To construct the CanonicalizedHeaders portion of the signature string, - * follow these steps: - * - * 1. Retrieve all headers for the resource that begin with x-ms-, including - * the x-ms-date header. - * - * 2. Convert each HTTP header name to lowercase. - * - * 3. Sort the headers lexicographically by header name in ascending order. - * Note that each header may appear only once in the string. - * - * 4. Unfold the string by replacing any breaking white space with a single - * space. - * - * 5. Trim any white space around the colon in the header. - * - * 6. Finally, append a new line character to each canonicalized header in - * the resulting list. Construct the CanonicalizedHeaders string by - * concatenating all headers in this list into a single string. - */ - private String addCanonicalizedHeaders(ClientRequest cr) { - return SharedKeyUtils.getCanonicalizedHeaders(cr); - } - - /** - * This format supports Shared Key and Shared Key Lite for all versions of - * the Table service, and Shared Key Lite for the 2009-09-19 version of the - * Blob and Queue services. This format is identical to that used with - * previous versions of the storage services. Construct the - * CanonicalizedResource string in this format as follows: - * - * 1. Beginning with an empty string (""), append a forward slash (/), - * followed by the name of the account that owns the resource being - * accessed. - * - * 2. Append the resource's encoded URI path. If the request URI addresses a - * component of the resource, append the appropriate query string. The query - * string should include the question mark and the comp parameter (for - * example, ?comp=metadata). No other parameters should be included on the - * query string. - */ - private String addCanonicalizedResource(ClientRequest cr) { - String result = "/" + this.accountName; - - result += cr.getURI().getPath(); - - List queryParams = SharedKeyUtils.getQueryParams(cr - .getURI().getQuery()); - for (QueryParam p : queryParams) { - if ("comp".equals(p.getName())) { - result += "?" + p.getName() + "=" + p.getValues().get(0); - } - } - return result; - } - - private String getHeader(ClientRequest cr, String headerKey) { - return SharedKeyUtils.getHeader(cr, headerKey); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyUtils.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyUtils.java deleted file mode 100644 index 431594d51d64..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyUtils.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * - * Copyright (c) Microsoft and contributors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.microsoft.windowsazure.services.blob.implementation; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Locale; - -import com.sun.jersey.api.client.ClientRequest; - -public abstract class SharedKeyUtils { - public static final String AUTHORIZATION_FILTER_MARKER = SharedKeyUtils.class - .getName(); - - /* - * Constructing the Canonicalized Headers String - * - * To construct the CanonicalizedHeaders portion of the signature string, - * follow these steps: 1. Retrieve all headers for the resource that begin - * with x-ms-, including the x-ms-date header. 2. Convert each HTTP header - * name to lowercase. 3. Sort the headers lexicographically by header name, - * in ascending order. Note that each header may appear only once in the - * string. 4. Unfold the string by replacing any breaking white space with a - * single space. 5. Trim any white space around the colon in the header. 6. - * Finally, append a new line character to each canonicalized header in the - * resulting list. Construct the CanonicalizedHeaders string by - * concatenating all headers in this list into a single string. - */ - public static String getCanonicalizedHeaders(ClientRequest cr) { - ArrayList msHeaders = new ArrayList(); - for (String key : cr.getHeaders().keySet()) { - if (key.toLowerCase(Locale.US).startsWith("x-ms-")) { - msHeaders.add(key.toLowerCase(Locale.US)); - } - } - Collections.sort(msHeaders); - - String result = ""; - for (String msHeader : msHeaders) { - result += msHeader + ":" + cr.getHeaders().getFirst(msHeader) - + "\n"; - } - return result; - } - - public static String getHeader(ClientRequest cr, String headerKey) { - List values = cr.getHeaders().get(headerKey); - if (values == null || values.size() != 1) { - return nullEmpty(null); - } - - return nullEmpty(values.get(0).toString()); - } - - private static String nullEmpty(String value) { - return value != null ? value : ""; - } - - public static List getQueryParams(String queryString) { - ArrayList result = new ArrayList(); - - if (queryString != null) { - String[] params = queryString.split("&"); - for (String param : params) { - result.add(getQueryParam(param)); - } - } - - return result; - } - - private static QueryParam getQueryParam(String param) { - QueryParam result = new QueryParam(); - - int index = param.indexOf("="); - if (index < 0) { - result.setName(param); - } else { - result.setName(param.substring(0, index)); - - String value = param.substring(index + 1); - int commaIndex = value.indexOf(','); - if (commaIndex < 0) { - result.addValue(value); - } else { - for (String v : value.split(",")) { - result.addValue(v); - } - } - } - - return result; - } - - public static class QueryParam implements Comparable { - private String name; - private final List values = new ArrayList(); - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public List getValues() { - return values; - } - - public void addValue(String value) { - values.add(value); - } - - public int compareTo(QueryParam o) { - return this.name.compareTo(o.name); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/package.html deleted file mode 100644 index d44ec4f38bce..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the implementation of the blob service classes and utilities. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AccessCondition.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AccessCondition.java deleted file mode 100644 index 3594c82eaf68..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AccessCondition.java +++ /dev/null @@ -1,446 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.net.HttpURLConnection; -import java.util.Date; - -import com.microsoft.windowsazure.core.utils.Utility; - -/** - * Represents a set of access conditions to be used for operations against the - * storage services. - */ -public final class AccessCondition { - /** - * Generates a new empty AccessCondition. - *

- * For more information, see Specifying - * Conditional Headers for Blob Service Operations. - * - * @return An AccessCondition object that has no conditions - * set. - */ - public static AccessCondition generateEmptyCondition() { - return new AccessCondition(); - } - - /** - * Returns an access condition such that an operation will be performed only - * if the resource's ETag value matches the specified ETag value. - *

- * Setting this access condition modifies the request to include the HTTP - * If-Match conditional header. If this access condition is set, the - * operation is performed only if the ETag of the resource matches the - * specified ETag. - *

- * For more information, see Specifying - * Conditional Headers for Blob Service Operations. - * - * @param etag - * A String that represents the ETag value to check. - * - * @return An AccessCondition object that represents the - * If-Match condition. - */ - public static AccessCondition generateIfMatchCondition(final String etag) { - AccessCondition retCondition = new AccessCondition(); - retCondition.setIfMatch(etag); - return retCondition; - } - - /** - * Returns an access condition such that an operation will be performed only - * if the resource has been modified since the specified time. - *

- * Setting this access condition modifies the request to include the HTTP - * If-Modified-Since conditional header. If this access condition is - * set, the operation is performed only if the resource has been modified - * since the specified time. - *

- * For more information, see Specifying - * Conditional Headers for Blob Service Operations. - * - * @param lastMotified - * A java.util.Date object that represents the - * last-modified time to check for the resource. - * - * @return An AccessCondition object that represents the - * If-Modified-Since condition. - */ - public static AccessCondition generateIfModifiedSinceCondition( - final Date lastMotified) { - AccessCondition retCondition = new AccessCondition(); - retCondition.ifModifiedSinceDate = lastMotified; - return retCondition; - } - - /** - * Returns an access condition such that an operation will be performed only - * if the resource's ETag value does not match the specified ETag value. - *

- * Setting this access condition modifies the request to include the HTTP - * If-None-Match conditional header. If this access condition is set, - * the operation is performed only if the ETag of the resource does not - * match the specified ETag. - *

- * For more information, see Specifying - * Conditional Headers for Blob Service Operations. - * - * @param etag - * A String that represents the ETag value to check. - * - * @return An AccessCondition object that represents the - * If-None-Match condition. - */ - public static AccessCondition generateIfNoneMatchCondition(final String etag) { - AccessCondition retCondition = new AccessCondition(); - retCondition.setIfNoneMatch(etag); - return retCondition; - } - - /** - * Returns an access condition such that an operation will be performed only - * if the resource has not been modified since the specified time. - *

- * Setting this access condition modifies the request to include the HTTP - * If-Unmodified-Since conditional header. If this access condition - * is set, the operation is performed only if the resource has not been - * modified since the specified time. - *

- * For more information, see Specifying - * Conditional Headers for Blob Service Operations. - * - * @param lastMotified - * A java.util.Date object that represents the - * last-modified time to check for the resource. - * - * @return An AccessCondition object that represents the - * If-Unmodified-Since condition. - */ - public static AccessCondition generateIfNotModifiedSinceCondition( - final Date lastMotified) { - AccessCondition retCondition = new AccessCondition(); - retCondition.ifUnmodifiedSinceDate = lastMotified; - return retCondition; - } - - /** - * Returns an access condition such that an operation will be performed only - * if the resource is accessible under the specified lease id. - *

- * Setting this access condition modifies the request to include the HTTP - * If-Unmodified-Since conditional header. If this access condition - * is set, the operation is performed only if the resource has not been - * modified since the specified time. - *

- * For more information, see Specifying - * Conditional Headers for Blob Service Operations. - * - * @param leaseID - * The lease id to specify. - * - */ - public static AccessCondition generateLeaseCondition(final String leaseID) { - AccessCondition retCondition = new AccessCondition(); - retCondition.leaseID = leaseID; - return retCondition; - } - - private String leaseID = null; - - /** - * Represents the etag of the resource for if [none] match conditions - */ - private String etag = null; - - /** - * Represents the date for IfModifiedSince conditions. - */ - private Date ifModifiedSinceDate = null; - - /** - * Represents the date for IfUn,odifiedSince conditions. - */ - private Date ifUnmodifiedSinceDate = null; - - /** - * Represents the ifMatchHeaderType type. - */ - private String ifMatchHeaderType = null; - - /** - * Creates an instance of the AccessCondition class. - */ - public AccessCondition() { - // Empty Default Ctor - } - - /** - * RESERVED FOR INTERNAL USE. Applies the access condition to the request. - * - * @param request - * A java.net.HttpURLConnection object that - * represents the request to which the condition is being - * applied. - * - * @throws StorageException - * If there is an error parsing the date value of the access - * condition. - */ - public void applyConditionToRequest(final HttpURLConnection request) { - applyConditionToRequest(request, false); - } - - /** - * RESERVED FOR INTERNAL USE. Applies the access condition to the request. - * - * @param request - * A java.net.HttpURLConnection object that - * represents the request to which the condition is being - * applied. - * @param useSourceAccessHeaders - * If true will use the Source_ headers for the conditions, - * otherwise standard headers are used. - * @throws StorageException - * If there is an error parsing the date value of the access - * condition. - */ - public void applyConditionToRequest(final HttpURLConnection request, - boolean useSourceAccessHeaders) { - // When used as a source access condition - if (useSourceAccessHeaders) { - if (!Utility.isNullOrEmpty(this.leaseID)) { - request.setRequestProperty( - Constants.HeaderConstants.SOURCE_LEASE_ID_HEADER, - this.leaseID); - } - - if (this.ifModifiedSinceDate != null) { - request.setRequestProperty( - Constants.HeaderConstants.SOURCE_IF_MODIFIED_SINCE_HEADER, - Utility.getGMTTime(this.ifModifiedSinceDate)); - } - - if (this.ifUnmodifiedSinceDate != null) { - request.setRequestProperty( - Constants.HeaderConstants.SOURCE_IF_UNMODIFIED_SINCE_HEADER, - Utility.getGMTTime(this.ifUnmodifiedSinceDate)); - } - - if (!Utility.isNullOrEmpty(this.etag)) { - if (this.ifMatchHeaderType - .equals(Constants.HeaderConstants.IF_MATCH)) { - request.setRequestProperty( - Constants.HeaderConstants.SOURCE_IF_MATCH_HEADER, - this.etag); - } else if (this.ifMatchHeaderType - .equals(Constants.HeaderConstants.IF_NONE_MATCH)) { - request.setRequestProperty( - Constants.HeaderConstants.SOURCE_IF_NONE_MATCH_HEADER, - this.etag); - } - } - } else { - if (!Utility.isNullOrEmpty(this.leaseID)) { - addOptionalHeader(request, "x-ms-lease-id", this.leaseID); - - } - - if (this.ifModifiedSinceDate != null) { - // The IfModifiedSince has a special helper in - // HttpURLConnection, use it instead of manually setting the - // header. - request.setIfModifiedSince(this.ifModifiedSinceDate.getTime()); - } - - if (this.ifUnmodifiedSinceDate != null) { - request.setRequestProperty( - Constants.HeaderConstants.IF_UNMODIFIED_SINCE, - Utility.getGMTTime(this.ifUnmodifiedSinceDate)); - } - - if (!Utility.isNullOrEmpty(this.etag)) { - request.setRequestProperty(this.ifMatchHeaderType, this.etag); - } - } - } - - /** - * @return the etag when the If-Match condition is set. - */ - public String getIfMatch() { - return this.ifMatchHeaderType - .equals(Constants.HeaderConstants.IF_MATCH) ? this.etag : null; - } - - /** - * @return the ifModifiedSinceDate - */ - public Date getIfModifiedSinceDate() { - return this.ifModifiedSinceDate; - } - - /** - * @return the etag when the If-None-Match condition is set. - */ - public String getIfNoneMatch() { - return this.ifMatchHeaderType - .equals(Constants.HeaderConstants.IF_NONE_MATCH) ? this.etag - : null; - } - - /** - * @return the ifUnmodifiedSinceDate - */ - public Date getIfUnmodifiedSinceDate() { - return this.ifUnmodifiedSinceDate; - } - - /** - * @return the leaseID - */ - public String getLeaseID() { - return this.leaseID; - } - - /** - * @param etag - * the etag to set - */ - public void setIfMatch(String etag) { - this.etag = normalizeEtag(etag); - this.ifMatchHeaderType = Constants.HeaderConstants.IF_MATCH; - } - - /** - * @param ifModifiedSinceDate - * the ifModifiedSinceDate to set - */ - public void setIfModifiedSinceDate(Date ifModifiedSinceDate) { - this.ifModifiedSinceDate = ifModifiedSinceDate; - } - - /** - * @param etag - * the etag to set - */ - public void setIfNoneMatch(String etag) { - this.etag = normalizeEtag(etag); - this.ifMatchHeaderType = Constants.HeaderConstants.IF_NONE_MATCH; - } - - /** - * @param ifUnmodifiedSinceDate - * the ifUnmodifiedSinceDate to set - */ - public void setIfUnmodifiedSinceDate(Date ifUnmodifiedSinceDate) { - this.ifUnmodifiedSinceDate = ifUnmodifiedSinceDate; - } - - /** - * @param leaseID - * the leaseID to set - */ - public void setLeaseID(String leaseID) { - this.leaseID = leaseID; - } - - /** - * Reserved for internal use. Verifies the condition is satisfied. - * - * @param etag - * A String that represents the ETag to check. - * @param lastModified - * A java.util.Date object that represents the last - * modified date/time. - * - * @return true if the condition is satisfied; otherwise, - * false. - * - */ - public boolean verifyConditional(final String etag, final Date lastModified) { - if (this.ifModifiedSinceDate != null) { - // The IfModifiedSince has a special helper in HttpURLConnection, - // use it instead of manually setting the - // header. - if (!lastModified.after(this.ifModifiedSinceDate)) { - return false; - } - } - - if (this.ifUnmodifiedSinceDate != null) { - if (lastModified.after(this.ifUnmodifiedSinceDate)) { - return false; - } - } - - if (!Utility.isNullOrEmpty(this.etag)) { - if (this.ifMatchHeaderType - .equals(Constants.HeaderConstants.IF_MATCH)) { - if (!this.etag.equals(etag) && !this.etag.equals("*")) { - return false; - } - } else if (this.ifMatchHeaderType - .equals(Constants.HeaderConstants.IF_NONE_MATCH)) { - if (this.etag.equals(etag)) { - return false; - } - } - } - - return true; - } - - /** - * Normalizes an Etag to be quoted, unless it is * - * - * @param inTag - * the etag to normalize - * @return the quoted etag - */ - private static String normalizeEtag(String inTag) { - if (Utility.isNullOrEmpty(inTag) || inTag.equals("*")) { - return inTag; - } else if (inTag.startsWith("\"") && inTag.endsWith("\"")) { - return inTag; - } else { - return String.format("\"%s\"", inTag); - } - } - - /** - * Adds the optional header. - * - * @param request - * a HttpURLConnection for the operation. - * @param name - * the metadata name. - * @param value - * the metadata value. - */ - public static void addOptionalHeader(final HttpURLConnection request, - final String name, final String value) { - if (value != null && !value.equals(Constants.EMPTY_STRING)) { - request.setRequestProperty(name, value); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseOptions.java deleted file mode 100644 index 84f327368347..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseOptions.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - - -/** - * Represents the options that may be set on an - * {@link com.microsoft.windowsazure.services.blob.BlobContract#acquireLease(String, String, AcquireLeaseOptions) - * acquireLease} request. These options include an optional server timeout for - * the operation and any access conditions for the operation. - */ -public class AcquireLeaseOptions extends BlobServiceOptions { - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link AcquireLeaseOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link AcquireLeaseOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link AcquireLeaseOptions} instance. - */ - @Override - public AcquireLeaseOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the access conditions set in this {@link AcquireLeaseOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions for acquiring a lease on a blob. By default, - * the operation will acquire the lease unconditionally. Use this method to - * specify conditions on the ETag or last modified time value for performing - * the operation. - *

- * The accessCondition value only affects calls made on methods - * where this {@link AcquireLeaseOptions} instance is passed as a parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link AcquireLeaseOptions} instance. - */ - public AcquireLeaseOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseResult.java deleted file mode 100644 index dea8a5c853b1..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseResult.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - - -/** - * A wrapper class for the response returned from a Blob Service REST API Lease - * Blob operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#acquireLease(String, String)}, - * {@link com.microsoft.windowsazure.services.blob.BlobContract#acquireLease(String, String, AcquireLeaseOptions)}, - * {@link com.microsoft.windowsazure.services.blob.BlobContract#renewLease(String, String, String, BlobServiceOptions)}, - * and {@link com.microsoft.windowsazure.services.blob.BlobContract#renewLease(String, String, String)}. - *

- * See the Lease Blob documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class AcquireLeaseResult { - private String leaseId; - - /** - * Gets the lease ID of the blob. - *

- * This value is used when updating or deleting a blob with an active lease, - * and when renewing or releasing the lease. - * - * @return A {@link String} containing the server-assigned lease ID for the - * blob. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Reserved for internal use. Sets the lease ID of the blob from the - * x-ms-lease-id header of the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param leaseId - * A {@link String} containing the server-assigned lease ID for - * the blob. - */ - public void setLeaseId(String leaseId) { - this.leaseId = leaseId; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobProperties.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobProperties.java deleted file mode 100644 index 751eaea619b1..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobProperties.java +++ /dev/null @@ -1,321 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.core.RFC1123DateAdapter; - -/** - * Represents the HTML properties and system properties that may be set on a - * blob. - */ -public class BlobProperties { - private Date lastModified; - private String etag; - private String contentType; - private long contentLength; - private String contentEncoding; - private String contentLanguage; - private String contentMD5; - private String cacheControl; - private String blobType; - private String leaseStatus; - private long sequenceNumber; - - /** - * Gets the last modified time of the blob. For block blobs, this value is - * returned only if the blob has committed blocks. - *

- * Any operation that modifies the blob, including updates to the blob's - * metadata or properties, changes the last modified time of the blob. This - * value can be used in an access condition when updating or deleting a blob - * to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link java.util.Date} containing the last modified time of the - * blob. - */ - @XmlElement(name = "Last-Modified") - @XmlJavaTypeAdapter(RFC1123DateAdapter.class) - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the blob from - * the Last-Modified header value returned in a server - * response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the blob. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - /** - * Gets the ETag of the blob. For block blobs, this value is returned only - * if the blob has committed blocks. - *

- * This value can be used in an access condition when updating or deleting a - * blob to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link String} containing the server-assigned ETag value for - * the blob. - */ - @XmlElement(name = "Etag") - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag value of the blob from the - * ETag header value returned in a server response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the MIME content type of the blob. - * - * @return A {@link String} containing the MIME content type value for the - * blob. - */ - @XmlElement(name = "Content-Type") - public String getContentType() { - return contentType; - } - - /** - * Reserved for internal use. Sets the MIME content type value for the blob - * from the Content-Type header value returned in the server - * response. - * - * @param contentType - * A {@link String} containing the MIME content type value for - * the blob. - */ - public void setContentType(String contentType) { - this.contentType = contentType; - } - - /** - * Gets the size of the blob in bytes. - * - * @return The size of the blob in bytes. - */ - @XmlElement(name = "Content-Length") - public long getContentLength() { - return contentLength; - } - - /** - * Reserved for internal use. Sets the content length value for the blob - * from the Content-Length header value returned in the server - * response. - * - * @param contentLength - * The size of the blob in bytes. - */ - public void setContentLength(long contentLength) { - this.contentLength = contentLength; - } - - /** - * Gets the HTTP content encoding value of the blob. - * - * @return A {@link String} containing the HTTP content encoding value set, - * if any. - */ - @XmlElement(name = "Content-Encoding") - public String getContentEncoding() { - return contentEncoding; - } - - /** - * Reserved for internal use. Sets the HTTP content encoding value for the - * blob from the Content-Encoding header value returned in the - * server response. - * - * @param contentEncoding - * A {@link String} containing the HTTP content encoding value to - * set. - */ - public void setContentEncoding(String contentEncoding) { - this.contentEncoding = contentEncoding; - } - - /** - * Gets the HTTP content language value of the blob. - * - * @return A {@link String} containing the HTTP content language value set, - * if any. - */ - @XmlElement(name = "Content-Language") - public String getContentLanguage() { - return contentLanguage; - } - - /** - * Reserved for internal use. Sets the HTTP content language value for the - * blob from the Content-Language header value returned in the - * server response. - * - * @param contentLanguage - * A {@link String} containing the HTTP content language value to - * set. - */ - public void setContentLanguage(String contentLanguage) { - this.contentLanguage = contentLanguage; - } - - /** - * Gets the MD5 hash value of the blob content. - * - * @return A {@link String} containing the MD5 hash value of the blob - * content. - */ - @XmlElement(name = "Content-MD5") - public String getContentMD5() { - return contentMD5; - } - - /** - * Reserved for internal use. Sets the MD5 hash value of the blob content - * from the Content-MD5 header value returned in the server - * response. - * - * @param contentMD5 - * A {@link String} containing the MD5 hash value of the blob - * content. - */ - public void setContentMD5(String contentMD5) { - this.contentMD5 = contentMD5; - } - - /** - * Gets the HTTP cache control value of the blob. - * - * @return A {@link String} containing the HTTP cache control value of the - * blob. - */ - @XmlElement(name = "Cache-Control") - public String getCacheControl() { - return cacheControl; - } - - /** - * Reserved for internal use. Sets the HTTP cache control value of the blob - * from the Cache-Control header value returned in the server - * response. - * - * @param cacheControl - * A {@link String} containing the HTTP cache control value of - * the blob. - */ - public void setCacheControl(String cacheControl) { - this.cacheControl = cacheControl; - } - - /** - * Gets a string representing the type of the blob, with a value of - * "BlockBlob" for block blobs, and "PageBlob" for page blobs. - * - * @return A {@link String} containing "BlockBlob" for block blobs, or - * "PageBlob" for page blobs. - */ - @XmlElement(name = "BlobType") - public String getBlobType() { - return blobType; - } - - /** - * Reserved for internal use. Sets the blob type from the - * x-ms-blob-type header value returned in the server response. - * - * @param blobType - * A {@link String} containing "BlockBlob" for block blobs, or - * "PageBlob" for page blobs. - */ - public void setBlobType(String blobType) { - this.blobType = blobType; - } - - /** - * Gets a string representing the lease status of the blob, with a value of - * "locked" for blobs with an active lease, and "unlocked" for blobs without - * an active lease. - * - * @return A {@link String} containing "locked" for blobs with an active - * lease, and "unlocked" for blobs without an active lease. - */ - @XmlElement(name = "LeaseStatus") - public String getLeaseStatus() { - return leaseStatus; - } - - /** - * Reserved for internal use. Sets the blob lease status from the - * x-ms-lease-status header value returned in the server - * response. - * - * @param leaseStatus - * A {@link String} containing "locked" for blobs with an active - * lease, and "unlocked" for blobs without an active lease. - */ - public void setLeaseStatus(String leaseStatus) { - this.leaseStatus = leaseStatus; - } - - /** - * Gets the current sequence number for a page blob. This value is not set - * for block blobs. - * - * @return The current sequence number of the page blob. - */ - @XmlElement(name = "x-ms-blob-sequence-number") - public long getSequenceNumber() { - return sequenceNumber; - } - - /** - * Reserved for internal use. Sets the page blob sequence number from the - * x-ms-blob-sequence-number header value returned in the - * server response. - * - * @param sequenceNumber - * The current sequence number of the page blob. - */ - public void setSequenceNumber(long sequenceNumber) { - this.sequenceNumber = sequenceNumber; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobServiceOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobServiceOptions.java deleted file mode 100644 index b6813f598a51..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobServiceOptions.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - - -/** - * Represents the base class for options that may be set on Blob Service REST - * API operations invoked through the {@link com.microsoft.windowsazure.services.blob.BlobContract} interface. This class - * defines a server request timeout, which can be applied to all operations. - */ -public class BlobServiceOptions { - // Nullable because it is optional - private Integer timeout; - - /** - * Gets the server request timeout value associated with this - * {@link BlobServiceOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link BlobServiceOptions} instance is passed as a parameter. - * - * @return The server request timeout value in milliseconds. - */ - public Integer getTimeout() { - return timeout; - } - - /** - * Sets the server request timeout value associated with this - * {@link BlobServiceOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link BlobServiceOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link BlobServiceOptions} instance. - */ - public BlobServiceOptions setTimeout(Integer timeout) { - this.timeout = timeout; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlockList.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlockList.java deleted file mode 100644 index a8e4d003e31b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlockList.java +++ /dev/null @@ -1,166 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.core.pipeline.Base64StringAdapter; - -/** - * Represents a list of blocks that may be committed to a block blob. - */ -@XmlRootElement(name = "BlockList") -public class BlockList { - private List entries = new ArrayList(); - - /** - * Adds the committed block specified by the block ID to the block list. - * - * @param blockId - * A {@link String} containing the client-specified block ID for - * a committed block. - * @return A reference to this {@link BlockList} instance. - */ - public BlockList addCommittedEntry(String blockId) { - CommittedEntry entry = new CommittedEntry(); - entry.setBlockId(blockId); - getEntries().add(entry); - return this; - } - - /** - * Adds the uncommitted block specified by the block ID to the block list. - * - * @param blockId - * A {@link String} containing the client-specified block ID for - * an uncommitted block. - * @return A reference to this {@link BlockList} instance. - */ - public BlockList addUncommittedEntry(String blockId) { - UncommittedEntry entry = new UncommittedEntry(); - entry.setBlockId(blockId); - getEntries().add(entry); - return this; - } - - /** - * Adds the latest block specified by the block ID to the block list. An - * entry of this type will cause the server commit the most recent - * uncommitted block with the specified block ID, or the committed block - * with the specified block ID if no uncommitted block is found. - * - * @param blockId - * A {@link String} containing the client-specified block ID for - * the latest matching block. - * @return A reference to this {@link BlockList} instance. - */ - public BlockList addLatestEntry(String blockId) { - LatestEntry entry = new LatestEntry(); - entry.setBlockId(blockId); - getEntries().add(entry); - return this; - } - - /** - * Gets the collection of entries for the block list. - * - * @return A {@link List} of {@link Entry} instances specifying the blocks - * to commit. - */ - @XmlElementRefs({ - @XmlElementRef(name = "Committed", type = CommittedEntry.class), - @XmlElementRef(name = "Uncommitted", type = UncommittedEntry.class), - @XmlElementRef(name = "Latest", type = LatestEntry.class) }) - @XmlMixed - public List getEntries() { - return entries; - } - - /** - * Sets the block list to the specified collection of entries. - * - * @param entries - * A {@link List} of {@link Entry} instances specifying the - * blocks to commit. - * @return A reference to this {@link BlockList} instance. - */ - public BlockList setEntries(List entries) { - this.entries = entries; - return this; - } - - /** - * The abstract base class for an entry in a {@link BlockList}, representing - * a committed or uncommitted block. - */ - public abstract static class Entry { - private String blockId; - - /** - * Gets the client-specified block ID for a {@link BlockList} entry. - * - * @return A {@link String} containing the client-specified block ID for - * a block. - */ - @XmlJavaTypeAdapter(Base64StringAdapter.class) - @XmlValue - public String getBlockId() { - return blockId; - } - - /** - * Sets the client-specified block ID for a {@link BlockList} entry. - * - * @param blockId - * A {@link String} containing the client-specified block ID - * for the block. - */ - public void setBlockId(String blockId) { - this.blockId = blockId; - } - } - - /** - * Represents an entry in a {@link BlockList} for a previously committed - * block. - */ - @XmlRootElement(name = "Committed") - public static class CommittedEntry extends Entry { - } - - /** - * Represents an entry in a {@link BlockList} for an uncommitted block. - */ - @XmlRootElement(name = "Uncommitted") - public static class UncommittedEntry extends Entry { - } - - /** - * Represents an entry in a {@link BlockList} for the most recent - * uncommitted block with the specified block ID, or the committed block - * with the specified block ID if no uncommitted block is found. - */ - @XmlRootElement(name = "Latest") - public static class LatestEntry extends Entry { - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BreakLeaseResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BreakLeaseResult.java deleted file mode 100644 index 948c5b4c7afc..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BreakLeaseResult.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.blob.models; - -/** - * A wrapper class for the response returned from a Blob Service REST API Break - * Lease Blob operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#breakLease(String, String, BlobServiceOptions)} - * , - *

- * See the Lease Blob documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class BreakLeaseResult { - private int remainingLeaseTimeInSeconds; - - public int getRemainingLeaseTimeInSeconds() { - return remainingLeaseTimeInSeconds; - } - - public void setRemainingLeaseTimeInSeconds(int remainingLeaseTimeInSeconds) { - this.remainingLeaseTimeInSeconds = remainingLeaseTimeInSeconds; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CommitBlobBlocksOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CommitBlobBlocksOptions.java deleted file mode 100644 index 7b664103c1fa..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CommitBlobBlocksOptions.java +++ /dev/null @@ -1,324 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.HashMap; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#commitBlobBlocks(String, String, BlockList, CommitBlobBlocksOptions) - * commitBlobBlocks} request. These options include an optional server timeout - * for the operation, the MIME content type and content encoding for the blob, - * the content language, the MD5 hash, a cache control value, blob metadata, a - * blob lease ID, and any access conditions for the operation. - */ -public class CommitBlobBlocksOptions extends BlobServiceOptions { - private String blobContentType; - private String blobContentEncoding; - private String blobContentLanguage; - private String blobContentMD5; - private String blobCacheControl; - private HashMap metadata = new HashMap(); - private String leaseId; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link CommitBlobBlocksOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CommitBlobBlocksOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - @Override - public CommitBlobBlocksOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the MIME content type value set in this - * {@link CommitBlobBlocksOptions} instance. - * - * @return A {@link String} containing the MIME content type value set, if - * any. - */ - public String getBlobContentType() { - return blobContentType; - } - - /** - * Sets the optional MIME content type for the blob content. This value will - * be returned to clients in the Content-Type header of the - * response when the blob data or blob properties are requested. If no - * content type is specified, the default content type is - * application/octet-stream. - *

- * Note that this value only affects calls made on methods where this - * {@link CommitBlobBlocksOptions} instance is passed as a parameter. - * - * @param blobContentType - * A {@link String} containing the MIME content type value to - * set. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions setBlobContentType(String blobContentType) { - this.blobContentType = blobContentType; - return this; - } - - /** - * Gets the HTTP content encoding value set in this - * {@link CommitBlobBlocksOptions} instance. - * - * @return A {@link String} containing the HTTP content encoding value set, - * if any. - */ - public String getBlobContentEncoding() { - return blobContentEncoding; - } - - /** - * Sets the optional HTTP content encoding value for the blob content. Use - * this value to specify any HTTP content encodings applied to the blob, - * passed as a x-ms-blob-content-encoding header value to the - * server. This value will be returned to clients in the headers of the - * response when the blob data or blob properties are requested. Pass an - * empty value to update a blob to the default value, which will cause no - * content encoding header to be returned with the blob. - *

- * Note that this value only affects calls made on methods where this - * {@link CommitBlobBlocksOptions} instance is passed as a parameter. - * - * @param blobContentEncoding - * A {@link String} containing the - * x-ms-blob-content-encoding header value to set. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions setBlobContentEncoding( - String blobContentEncoding) { - this.blobContentEncoding = blobContentEncoding; - return this; - } - - /** - * Gets the HTTP content language header value set in this - * {@link CommitBlobBlocksOptions} instance. - * - * @return A {@link String} containing the HTTP content language header - * value set, if any. - */ - public String getBlobContentLanguage() { - return blobContentLanguage; - } - - /** - * Sets the optional HTTP content language header value for the blob - * content. Use this value to specify the content language of the blob. This - * value will be returned to clients in the - * x-ms-blob-content-language header of the response when the - * blob data or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CommitBlobBlocksOptions} instance is passed as a parameter. - * - * @param blobContentLanguage - * A {@link String} containing the - * x-ms-blob-content-language header value to set. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions setBlobContentLanguage( - String blobContentLanguage) { - this.blobContentLanguage = blobContentLanguage; - return this; - } - - /** - * Gets the MD5 hash value for the blob content set in this - * {@link CommitBlobBlocksOptions} instance. - * - * @return A {@link String} containing the MD5 hash value for the blob - * content set, if any. - */ - public String getBlobContentMD5() { - return blobContentMD5; - } - - /** - * Sets the optional MD5 hash value for the blob content. This value will be - * returned to clients in the x-ms-blob-content-md5 header - * value of the response when the blob data or blob properties are - * requested. This hash is used to verify the integrity of the blob during - * transport. When this header is specified, the storage service checks the - * hash of the content that has arrived with the one that was sent. If the - * two hashes do not match, the operation will fail with error code 400 (Bad - * Request), which will cause a ServiceException to be thrown. - *

- * Note that this value only affects calls made on methods where this - * {@link CommitBlobBlocksOptions} instance is passed as a parameter. - * - * @param blobContentMD5 - * A {@link String} containing the MD5 hash value for the blob - * content to set. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions setBlobContentMD5(String blobContentMD5) { - this.blobContentMD5 = blobContentMD5; - return this; - } - - /** - * Gets the HTTP cache control value set in this - * {@link CommitBlobBlocksOptions} instance. - * - * @return A {@link String} containing the HTTP cache control value set, if - * any. - */ - public String getBlobCacheControl() { - return blobCacheControl; - } - - /** - * Sets the optional HTTP cache control value for the blob content. The Blob - * service stores this value but does not use or modify it. This value will - * be returned to clients in the headers of the response when the blob data - * or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CommitBlobBlocksOptions} instance is passed as a parameter. - * - * @param blobCacheControl - * A {@link String} containing the HTTP cache control value to - * set. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions setBlobCacheControl(String blobCacheControl) { - this.blobCacheControl = blobCacheControl; - return this; - } - - /** - * Gets the blob metadata collection set in this - * {@link CommitBlobBlocksOptions} instance. - * - * @return A {@link HashMap} of name-value pairs of {@link String} - * containing the blob metadata set, if any. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Sets the blob metadata collection to associate with the created blob. - * Metadata is a collection of name-value {@link String} pairs for client - * use and is opaque to the server. Metadata names must adhere to the naming - * rules for C# - * identifiers. - *

- * The metadata value only affects calls made on methods where this - * {@link CommitBlobBlocksOptions} instance is passed as a parameter. - * - * @param metadata - * A {@link HashMap} of name-value pairs of {@link String} - * containing the blob metadata to set. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions setMetadata(HashMap metadata) { - this.metadata = metadata; - return this; - } - - /** - * Adds a name-value pair to the blob metadata collection associated with - * this {@link CommitBlobBlocksOptions} instance. - * - * @param key - * A {@link String} containing the name portion of the name-value - * pair to add to the metadata collection. - * @param value - * A {@link String} containing the value portion of the - * name-value pair to add to the metadata collection. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions addMetadata(String key, String value) { - this.getMetadata().put(key, value); - return this; - } - - /** - * Gets the lease ID for the blob set in this - * {@link CommitBlobBlocksOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets a lease ID value to match when updating the blob. If the blob has a - * lease, this parameter must be set with the matching leaseId value for the - * commit block blobs operation to succeed. - *

- * The leaseId value only affects calls made on methods where this - * {@link CommitBlobBlocksOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the access conditions set in this {@link CommitBlobBlocksOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions for updating a blob. By default, the commit - * block blobs operation will set the container metadata unconditionally. - * Use this method to specify conditions on the ETag or last modified time - * value for performing the commit block blobs operation. - *

- * The accessCondition value only affects calls made on methods - * where this {@link CommitBlobBlocksOptions} instance is passed as a - * parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/Constants.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/Constants.java deleted file mode 100644 index 54c99e0ef946..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/Constants.java +++ /dev/null @@ -1,694 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -/** - * Defines constants for use with blob operations, HTTP headers, and query - * strings. - */ -public final class Constants { - /** - * Defines constants for use Analytics requests. - */ - public static class AnalyticsConstants { - /** - * The XML element for the Analytics RetentionPolicy Days. - */ - public static final String DAYS_ELEMENT = "Days"; - - /** - * The XML element for the Default Service Version. - */ - public static final String DEFAULT_SERVICE_VERSION = "DefaultServiceVersion"; - - /** - * The XML element for the Analytics Logging Delete type. - */ - public static final String DELETE_ELEMENT = "Delete"; - - /** - * The XML element for the Analytics RetentionPolicy Enabled. - */ - public static final String ENABLED_ELEMENT = "Enabled"; - - /** - * The XML element for the Analytics Metrics IncludeAPIs. - */ - public static final String INCLUDE_APIS_ELEMENT = "IncludeAPIs"; - - /** - * The XML element for the Analytics Logging - */ - public static final String LOGGING_ELEMENT = "Logging"; - - /** - * The XML element for the Analytics Metrics - */ - public static final String METRICS_ELEMENT = "Metrics"; - - /** - * The XML element for the Analytics Logging Read type. - */ - public static final String READ_ELEMENT = "Read"; - - /** - * The XML element for the Analytics RetentionPolicy. - */ - public static final String RETENTION_POLICY_ELEMENT = "RetentionPolicy"; - - /** - * The XML element for the StorageServiceProperties - */ - public static final String STORAGE_SERVICE_PROPERTIES_ELEMENT = "StorageServiceProperties"; - - /** - * The XML element for the Analytics Version - */ - public static final String VERSION_ELEMENT = "Version"; - - /** - * The XML element for the Analytics Logging Write type. - */ - public static final String WRITE_ELEMENT = "Write"; - } - - /** - * Defines constants for use with HTTP headers. - */ - public static class HeaderConstants { - /** - * The Accept header. - */ - public static final String ACCEPT = "Accept"; - - /** - * The Accept header. - */ - public static final String ACCEPT_CHARSET = "Accept-Charset"; - - /** - * The Authorization header. - */ - public static final String AUTHORIZATION = "Authorization"; - - /** - * The CacheControl header. - */ - public static final String CACHE_CONTROL = "Cache-Control"; - - /** - * The header that specifies blob caching control. - */ - public static final String CACHE_CONTROL_HEADER = PREFIX_FOR_STORAGE_HEADER - + "blob-cache-control"; - - /** - * The Comp value. - */ - public static final String COMP = "comp"; - - /** - * The ContentEncoding header. - */ - public static final String CONTENT_ENCODING = "Content-Encoding"; - - /** - * The ContentLangauge header. - */ - public static final String CONTENT_LANGUAGE = "Content-Language"; - - /** - * The ContentLength header. - */ - public static final String CONTENT_LENGTH = "Content-Length"; - - /** - * The ContentMD5 header. - */ - public static final String CONTENT_MD5 = "Content-MD5"; - - /** - * The ContentRange header. - */ - public static final String CONTENT_RANGE = "Cache-Range"; - - /** - * The ContentType header. - */ - public static final String CONTENT_TYPE = "Content-Type"; - - /** - * The header for copy source. - */ - public static final String COPY_SOURCE_HEADER = PREFIX_FOR_STORAGE_HEADER - + "copy-source"; - - /** - * The header that specifies the date. - */ - public static final String DATE = PREFIX_FOR_STORAGE_HEADER + "date"; - - /** - * The header to delete snapshots. - */ - public static final String DELETE_SNAPSHOT_HEADER = PREFIX_FOR_STORAGE_HEADER - + "delete-snapshots"; - - /** - * The ETag header. - */ - public static final String ETAG = "ETag"; - - /** - * Buffer width used to copy data to output streams. - */ - public static final int HTTP_UNUSED_306 = 306; - - /** - * The IfMatch header. - */ - public static final String IF_MATCH = "If-Match"; - - /** - * The IfModifiedSince header. - */ - public static final String IF_MODIFIED_SINCE = "If-Modified-Since"; - - /** - * The IfNoneMatch header. - */ - public static final String IF_NONE_MATCH = "If-None-Match"; - - /** - * The IfUnmodifiedSince header. - */ - public static final String IF_UNMODIFIED_SINCE = "If-Unmodified-Since"; - - /** - * The header that specifies lease ID. - */ - public static final String LEASE_ID_HEADER = PREFIX_FOR_STORAGE_HEADER - + "lease-id"; - - /** - * The header that specifies lease status. - */ - public static final String LEASE_STATUS = PREFIX_FOR_STORAGE_HEADER - + "lease-status"; - - /** - * The header that specifies lease state. - */ - public static final String LEASE_STATE = PREFIX_FOR_STORAGE_HEADER - + "lease-state"; - - /** - * The header that specifies lease duration. - */ - public static final String LEASE_DURATION = PREFIX_FOR_STORAGE_HEADER - + "lease-duration"; - - /** - * The header that specifies copy status. - */ - public static final String COPY_STATUS = PREFIX_FOR_STORAGE_HEADER - + "copy-status"; - - /** - * The header that specifies copy progress. - */ - public static final String COPY_PROGRESS = PREFIX_FOR_STORAGE_HEADER - + "copy-progress"; - - /** - * The header that specifies copy status description. - */ - public static final String COPY_STATUS_DESCRIPTION = PREFIX_FOR_STORAGE_HEADER - + "copy-status-description"; - - /** - * The header that specifies copy id. - */ - public static final String COPY_ID = PREFIX_FOR_STORAGE_HEADER - + "copy-id"; - - /** - * The header that specifies copy source. - */ - public static final String COPY_SOURCE = PREFIX_FOR_STORAGE_HEADER - + "copy-source"; - - /** - * The header that specifies copy completion time. - */ - public static final String COPY_COMPLETION_TIME = PREFIX_FOR_STORAGE_HEADER - + "copy-completion-time"; - - /** - * The header prefix for metadata. - */ - public static final String PREFIX_FOR_STORAGE_METADATA = "x-ms-meta-"; - - /** - * The header prefix for properties. - */ - public static final String PREFIX_FOR_STORAGE_PROPERTIES = "x-ms-prop-"; - - /** - * The Range header. - */ - public static final String RANGE = "Range"; - - /** - * The header that specifies if the request will populate the ContentMD5 - * header for range gets. - */ - public static final String RANGE_GET_CONTENT_MD5 = PREFIX_FOR_STORAGE_HEADER - + "range-get-content-md5"; - - /** - * The format string for specifying ranges. - */ - public static final String RANGE_HEADER_FORMAT = "bytes=%d-%d"; - - /** - * The header that indicates the request ID. - */ - public static final String REQUEST_ID_HEADER = PREFIX_FOR_STORAGE_HEADER - + "request-id"; - - /** - * The header that indicates the client request ID. - */ - public static final String CLIENT_REQUEST_ID_HEADER = PREFIX_FOR_STORAGE_HEADER - + "client-request-id"; - - /** - * The header for the If-Match condition. - */ - public static final String SOURCE_IF_MATCH_HEADER = PREFIX_FOR_STORAGE_HEADER - + "source-if-match"; - - /** - * The header for the If-Modified-Since condition. - */ - public static final String SOURCE_IF_MODIFIED_SINCE_HEADER = PREFIX_FOR_STORAGE_HEADER - + "source-if-modified-since"; - - /** - * The header for the If-None-Match condition. - */ - public static final String SOURCE_IF_NONE_MATCH_HEADER = PREFIX_FOR_STORAGE_HEADER - + "source-if-none-match"; - - /** - * The header for the If-Unmodified-Since condition. - */ - public static final String SOURCE_IF_UNMODIFIED_SINCE_HEADER = PREFIX_FOR_STORAGE_HEADER - + "source-if-unmodified-since"; - - /** - * The header for the source lease id. - */ - public static final String SOURCE_LEASE_ID_HEADER = PREFIX_FOR_STORAGE_HEADER - + "source-lease-id"; - - /** - * The header for data ranges. - */ - public static final String STORAGE_RANGE_HEADER = PREFIX_FOR_STORAGE_HEADER - + "range"; - - /** - * The header for storage version. - */ - public static final String STORAGE_VERSION_HEADER = PREFIX_FOR_STORAGE_HEADER - + "version"; - - /** - * The current storage version header value. - */ - public static final String TARGET_STORAGE_VERSION = "2012-02-12"; - - /** - * The UserAgent header. - */ - public static final String USER_AGENT = "User-Agent"; - - /** - * Specifies the value to use for UserAgent header. - */ - public static final String USER_AGENT_PREFIX = "WA-Storage"; - - /** - * Specifies the value to use for UserAgent header. - */ - public static final String USER_AGENT_VERSION = "Client v0.1.3.2"; - } - - /** - * Defines constants for use with query strings. - */ - public static class QueryConstants { - /** - * The query component for the SAS signature. - */ - public static final String SIGNATURE = "sig"; - - /** - * The query component for the signed SAS expiry time. - */ - public static final String SIGNED_EXPIRY = "se"; - - /** - * The query component for the signed SAS identifier. - */ - public static final String SIGNED_IDENTIFIER = "si"; - - /** - * The query component for the signed SAS permissions. - */ - public static final String SIGNED_PERMISSIONS = "sp"; - - /** - * The query component for the signed SAS resource. - */ - public static final String SIGNED_RESOURCE = "sr"; - - /** - * The query component for the signed SAS start time. - */ - public static final String SIGNED_START = "st"; - - /** - * The query component for the SAS start partition key. - */ - public static final String START_PARTITION_KEY = "spk"; - - /** - * The query component for the SAS start row key. - */ - public static final String START_ROW_KEY = "srk"; - - /** - * The query component for the SAS end partition key. - */ - public static final String END_PARTITION_KEY = "epk"; - - /** - * The query component for the SAS end row key. - */ - public static final String END_ROW_KEY = "erk"; - - /** - * The query component for the SAS table name. - */ - public static final String SAS_TABLE_NAME = "tn"; - - /** - * The query component for the signing SAS key. - */ - public static final String SIGNED_KEY = "sk"; - - /** - * The query component for the signed SAS version. - */ - public static final String SIGNED_VERSION = "sv"; - - /** - * The query component for snapshot time. - */ - public static final String SNAPSHOT = "snapshot"; - } - - /** - * The master Windows Azure Storage header prefix. - */ - public static final String PREFIX_FOR_STORAGE_HEADER = "x-ms-"; - - /** - * Constant representing a kilobyte (Non-SI version). - */ - public static final int KB = 1024; - - /** - * Constant representing a megabyte (Non-SI version). - */ - public static final int MB = 1024 * KB; - - /** - * Constant representing a gigabyte (Non-SI version). - */ - public static final int GB = 1024 * MB; - - /** - * Buffer width used to copy data to output streams. - */ - public static final int BUFFER_COPY_LENGTH = 8 * KB; - - /** - * Default client side timeout, in milliseconds, for all service clients. - */ - public static final int DEFAULT_TIMEOUT_IN_MS = 90 * 1000; - - /** - * XML element for delimiters. - */ - public static final String DELIMITER_ELEMENT = "Delimiter"; - - /** - * An empty String to use for comparison. - */ - public static final String EMPTY_STRING = ""; - - /** - * XML element for page range end elements. - */ - public static final String END_ELEMENT = "End"; - - /** - * XML element for error codes. - */ - public static final String ERROR_CODE = "Code"; - - /** - * XML element for exception details. - */ - public static final String ERROR_EXCEPTION = "ExceptionDetails"; - - /** - * XML element for exception messages. - */ - public static final String ERROR_EXCEPTION_MESSAGE = "ExceptionMessage"; - - /** - * XML element for stack traces. - */ - public static final String ERROR_EXCEPTION_STACK_TRACE = "StackTrace"; - - /** - * XML element for error messages. - */ - public static final String ERROR_MESSAGE = "Message"; - - /** - * XML root element for errors. - */ - public static final String ERROR_ROOT_ELEMENT = "Error"; - - /** - * XML element for the ETag. - */ - public static final String ETAG_ELEMENT = "Etag"; - - /** - * Constant for False. - */ - public static final String FALSE = "false"; - - /** - * Specifies HTTP. - */ - public static final String HTTP = "http"; - - /** - * Specifies HTTPS. - */ - public static final String HTTPS = "https"; - - /** - * XML attribute for IDs. - */ - public static final String ID = "Id"; - - /** - * XML element for an invalid metadata name. - */ - public static final String INVALID_METADATA_NAME = "x-ms-invalid-name"; - - /** - * XML element for the last modified date. - */ - public static final String LAST_MODIFIED_ELEMENT = "Last-Modified"; - - /** - * XML element for the lease status. - */ - public static final String LEASE_STATUS_ELEMENT = "LeaseStatus"; - - /** - * XML element for the lease state. - */ - public static final String LEASE_STATE_ELEMENT = "LeaseState"; - - /** - * XML element for the lease duration. - */ - public static final String LEASE_DURATION_ELEMENT = "LeaseDuration"; - - /** - * XML element for the copy id. - */ - public static final String COPY_ID_ELEMENT = "CopyId"; - - /** - * XML element for the copy status. - */ - public static final String COPY_STATUS_ELEMENT = "CopyStatus"; - - /** - * XML element for the copy source . - */ - public static final String COPY_SOURCE_ELEMENT = "CopySource"; - - /** - * XML element for the copy progress. - */ - public static final String COPY_PROGRESS_ELEMENT = "CopyProgress"; - - /** - * XML element for the copy completion time. - */ - public static final String COPY_COMPLETION_TIME_ELEMENT = "CopyCompletionTime"; - - /** - * XML element for the copy status description. - */ - public static final String COPY_STATUS_DESCRIPTION_ELEMENT = "CopyStatusDescription"; - - /** - * Constant signaling the resource is locked. - */ - public static final String LOCKED_VALUE = "Locked"; - - /** - * XML element for a marker. - */ - public static final String MARKER_ELEMENT = "Marker"; - - /** - * XML element for maximum results. - */ - public static final String MAX_RESULTS_ELEMENT = "MaxResults"; - - /** - * Number of default concurrent requests for parallel operation. - */ - public static final int MAXIMUM_SEGMENTED_RESULTS = 5000; - - /** - * The maximum size, in bytes, of a given stream mark operation. - */ - // Note if BlobConstants.MAX_SINGLE_UPLOAD_BLOB_SIZE_IN_BYTES is updated - // then this needs to be as well. - public static final int MAX_MARK_LENGTH = 64 * MB; - - /** - * XML element for the metadata. - */ - public static final String METADATA_ELEMENT = "Metadata"; - - /** - * XML element for names. - */ - public static final String NAME_ELEMENT = "Name"; - - /** - * XML element for the next marker. - */ - public static final String NEXT_MARKER_ELEMENT = "NextMarker"; - - /** - * XML element for a prefix. - */ - public static final String PREFIX_ELEMENT = "Prefix"; - - /** - * Constant for True. - */ - public static final String TRUE = "true"; - - /** - * Constant signaling the resource is unlocked. - */ - public static final String UNLOCKED_VALUE = "Unlocked"; - - /** - * XML element for the URL. - */ - public static final String URL_ELEMENT = "Url"; - - /** - * XML element for a signed identifier. - */ - public static final String SIGNED_IDENTIFIER_ELEMENT = "SignedIdentifier"; - - /** - * XML element for signed identifiers. - */ - public static final String SIGNED_IDENTIFIERS_ELEMENT = "SignedIdentifiers"; - - /** - * XML element for an access policy. - */ - public static final String ACCESS_POLICY = "AccessPolicy"; - - /** - * Maximum number of shared access policy identifiers supported by server. - */ - public static final int MAX_SHARED_ACCESS_POLICY_IDENTIFIERS = 5; - - /** - * XML element for the start time of an access policy. - */ - public static final String START = "Start"; - - /** - * XML element for the end time of an access policy. - */ - public static final String EXPIRY = "Expiry"; - - /** - * XML element for the permission of an access policy. - */ - public static final String PERMISSION = "Permission"; - - /** - * Private Default Ctor - */ - private Constants() { - // No op - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ContainerACL.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ContainerACL.java deleted file mode 100644 index 5ea90a0abff7..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ContainerACL.java +++ /dev/null @@ -1,484 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.services.blob.implementation.ContainerACLDateAdapter; - -/** - * Represents the public access properties and the container-level access - * policies of a container in the Blob storage service. This is returned by - * calls to implementations of {@link com.microsoft.windowsazure.services.blob.BlobContract#getContainerACL(String)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getContainerACL(String, BlobServiceOptions)}, and passed - * as a parameter to calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)} - * . - *

- * See the Get - * Container ACL and the Set - * Container ACL documentation on MSDN for details of the underlying Blob - * Service REST API operations. - */ -public class ContainerACL { - private String etag; - private Date lastModified; - private PublicAccessType publicAccess; - private List signedIdentifiers = new ArrayList(); - - /** - * Gets the Etag value associated with this - * {@link ContainerACL} instance. This is the value returned for a container - * by a Blob service REST API Get Container ACL operation, or the value to - * set on a container with a Set Container ACL operation. - * - * @return A {@link String} containing the Etag value - * associated with this {@link ContainerACL} instance. - */ - public String getEtag() { - return etag; - } - - /** - * Sets the Etag value to associate with this - * {@link ContainerACL} instance. - *

- * This value is only set on a container when this {@link ContainerACL} - * instance is passed as a parameter to a call to an implementation of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL)} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)}. - * - * @param etag - * A {@link String} containing the Etag value to - * associate with this {@link ContainerACL} instance. - * - * @return A reference to this {@link ContainerACL} instance. - */ - public ContainerACL setEtag(String etag) { - this.etag = etag; - return this; - } - - /** - * Gets the last modified time associated with this {@link ContainerACL} - * instance. This is the value returned for a container by a Blob service - * REST API Get Container ACL operation, or the value to set on a container - * with a Set Container ACL operation. - * - * @return A {@link Date} containing the last modified time associated with - * this {@link ContainerACL} instance. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Sets the last modified time to associate with this {@link ContainerACL} - * instance. - *

- * This value is only set on a container when this {@link ContainerACL} - * instance is passed as a parameter to a call to an implementation of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL)} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)}. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time to - * associate with this {@link ContainerACL} instance. - * @return A reference to this {@link ContainerACL} instance. - */ - public ContainerACL setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * Gets the public access level associated with this {@link ContainerACL} - * instance. This is the value returned for a container by a Blob service - * REST API Get Container ACL operation, or the value to set on a container - * with a Set Container ACL operation. - * - * @return A {@link PublicAccessType} value representing the public access - * level associated with this {@link ContainerACL} instance. - */ - public PublicAccessType getPublicAccess() { - return publicAccess; - } - - /** - * Sets the public access level to associate with this {@link ContainerACL} - * instance. - *

- * This value is only set on a container when this {@link ContainerACL} - * instance is passed as a parameter to a call to an implementation of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL)} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)}. - * - * @param publicAccess - * A {@link PublicAccessType} value representing the public - * access level to associate with this {@link ContainerACL} - * instance. - * @return A reference to this {@link ContainerACL} instance. - */ - public ContainerACL setPublicAccess(PublicAccessType publicAccess) { - this.publicAccess = publicAccess; - return this; - } - - /** - * Gets the list of container-level access policies associated with this - * {@link ContainerACL} instance. This is the value returned for a container - * by a Blob service REST API Get Container ACL operation, or the value to - * set on a container with a Set Container ACL operation. - * - * @return A {@link List} of {@link SignedIdentifier} instances containing - * up to five container-level access policies associated with this - * {@link ContainerACL} instance. - */ - public List getSignedIdentifiers() { - return signedIdentifiers; - } - - /** - * Sets the list of container-level access policies to associate with this - * {@link ContainerACL} instance. - *

- * This value is only set on a container when this {@link ContainerACL} - * instance is passed as a parameter to a call to an implementation of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL)} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)}. - * - * @param signedIdentifiers - * A {@link List} of {@link SignedIdentifier} instances - * containing up to five container-level access policies to - * associate with this {@link ContainerACL} instance. - * @return A reference to this {@link ContainerACL} instance. - */ - public ContainerACL setSignedIdentifiers( - List signedIdentifiers) { - this.signedIdentifiers = signedIdentifiers; - return this; - } - - /** - * Adds a container-level access policy to the list associated with this - * {@link ContainerACL} instance. A container may have up to five - * container-level access policies. - *

- * Use the id parameter to specify a name for the access policy. - * The name may be up to 64 characters in length and must be unique within - * the container. - *

- * Use the start parameter to specify the start time for valid - * access to a resource using the access policy. If this value is - * null, the start time for any resource request using the - * access policy is assumed to be the time when the Blob service receives - * the request. - *

- * Use the expiry parameter to specify the expiration time for - * valid access to a resource using the access policy. If this value is - * null, the expiry time must be included in the Shared Access - * Signature for any resource request using the access policy. - *

- * Use the permission parameter to specify the operations that can - * be performed on a blob that is accessed with the access policy. Supported - * permissions include read (r), write (w), delete (d), and list (l). - * Permissions may be grouped so as to allow multiple operations to be - * performed with the access policy. For example, to grant all permissions - * to a resource, specify "rwdl" for the parameter. To grant only read/write - * permissions, specify "rw" for the parameter. - *

- * This value is only set on a container when this {@link ContainerACL} - * instance is passed as a parameter to a call to an implementation of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL)} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)}. - * - * @param id - * A {@link String} containing the name for the access policy. - * @param start - * A {@link Date} representing the start time for the access - * policy. If this value is null, any Shared Access - * Signature that refers to this policy may specify the start - * time. - * @param expiry - * A {@link Date} representing the expiration time for the access - * policy. If this value is null, any Shared Access - * Signature that refers to this policy must specify the expiry - * value. Resource access using a Shared Access Signature that - * refers to this policy after this time is not valid. - * @param permission - * A {@link String} containing the permissions specified for the - * access policy. - */ - public void addSignedIdentifier(String id, Date start, Date expiry, - String permission) { - AccessPolicy accessPolicy = new AccessPolicy(); - accessPolicy.setStart(start); - accessPolicy.setExpiry(expiry); - accessPolicy.setPermission(permission); - - SignedIdentifier signedIdentifier = new SignedIdentifier(); - signedIdentifier.setId(id); - signedIdentifier.setAccessPolicy(accessPolicy); - - this.getSignedIdentifiers().add(signedIdentifier); - } - - /** - * A static inner class representing a collection of container-level access - * policies. A container may have up to five container-level access - * policies, which may be associated with any number of Shared Access - * Signatures. - */ - @XmlRootElement(name = "SignedIdentifiers") - public static class SignedIdentifiers { - private List signedIdentifiers = new ArrayList(); - - /** - * Gets the list of container-level access policies associated with this - * {@link SignedIdentifiers} instance. - * - * @return A {@link List} of {@link SignedIdentifier} instances - * containing container-level access policies. - */ - @XmlElement(name = "SignedIdentifier") - public List getSignedIdentifiers() { - return signedIdentifiers; - } - - /** - * Sets the list of container-level access policies associated with this - * {@link SignedIdentifiers} instance. - * - * @param signedIdentifiers - * A {@link List} of {@link SignedIdentifier} instances - * containing container-level access policies. - */ - public void setSignedIdentifiers( - List signedIdentifiers) { - this.signedIdentifiers = signedIdentifiers; - } - } - - /** - * A static inner class representing a container-level access policy with a - * unique name. - */ - public static class SignedIdentifier { - private String id; - private AccessPolicy accessPolicy; - - /** - * Gets the name of the container-level access policy. The name may be - * up to 64 characters in length and must be unique within the - * container. - * - * @return A {@link String} containing the name for the access policy. - */ - @XmlElement(name = "Id") - public String getId() { - return id; - } - - /** - * Sets the name of the container-level access policy. The name may be - * up to 64 characters in length and must be unique within the - * container. - * - * @param id - * A {@link String} containing the name for the access - * policy. - * @return A reference to this {@link SignedIdentifier} instance. - */ - public SignedIdentifier setId(String id) { - this.id = id; - return this; - } - - /** - * Gets an {@link AccessPolicy} reference containing the start time, - * expiration time, and permissions associated with the container-level - * access policy. - * - * @return An {@link AccessPolicy} reference containing the start time, - * expiration time, and permissions associated with the access - * policy. - */ - @XmlElement(name = "AccessPolicy") - public AccessPolicy getAccessPolicy() { - return accessPolicy; - } - - /** - * Sets an {@link AccessPolicy} reference containing the start time, - * expiration time, and permissions to associate with the - * container-level access policy. - * - * @param accessPolicy - * An {@link AccessPolicy} reference containing the start - * time, expiration time, and permissions to associate with - * the access policy. - * @return A reference to this {@link SignedIdentifier} instance. - */ - public SignedIdentifier setAccessPolicy(AccessPolicy accessPolicy) { - this.accessPolicy = accessPolicy; - return this; - } - } - - /** - * An inner class representing the start time, expiration time, and - * permissions associated with an access policy. - */ - public static class AccessPolicy { - private Date start; - private Date expiry; - private String permission; - - /** - * Gets the start time for valid access to a resource using the access - * policy. If this value is null, the start time for any - * resource request using the access policy is assumed to be the time - * when the Blob service receives the request. - * - * @return A {@link Date} representing the start time for the access - * policy, or null if none is specified. - */ - @XmlElement(name = "Start") - @XmlJavaTypeAdapter(ContainerACLDateAdapter.class) - public Date getStart() { - return start; - } - - /** - * Sets the start time for valid access to a resource using the access - * policy. If this value is null, the start time for any - * resource request using the access policy is assumed to be the time - * when the Blob service receives the request. - * - * @param start - * A {@link Date} representing the start time for the access - * policy, or null to leave the time - * unspecified. - * @return A reference to this {@link AccessPolicy} instance. - */ - public AccessPolicy setStart(Date start) { - this.start = start; - return this; - } - - /** - * Gets the expiration time for valid access to a resource using the - * access policy. If this value is null, any Shared Access - * Signature that refers to this access policy must specify the expiry - * value. - * - * @return A {@link Date} representing the expiration time for the - * access policy, or null if none is specified. - */ - @XmlElement(name = "Expiry") - @XmlJavaTypeAdapter(ContainerACLDateAdapter.class) - public Date getExpiry() { - return expiry; - } - - /** - * Sets the expiration time for valid access to a resource using the - * access policy. If this value is null, any Shared Access - * Signature that refers to this access policy must specify the expiry - * value. - * - * @param expiry - * A {@link Date} representing the expiration time for the - * access policy, or null to leave the time - * unspecified. - * @return A reference to this {@link AccessPolicy} instance. - */ - public AccessPolicy setExpiry(Date expiry) { - this.expiry = expiry; - return this; - } - - /** - * Gets the permissions for operations on resources specified by the - * access policy. Supported permissions include read (r), write (w), - * delete (d), and list (l). Permissions may be grouped so as to allow - * multiple operations to be performed with the access policy. For - * example, if all permissions to a resource are granted, the method - * returns "rwdl" as the result. If only read/write permissions are - * granted, the method returns "rw" as the result. - * - * @return A {@link String} containing the permissions specified for the - * access policy. - */ - @XmlElement(name = "Permission") - public String getPermission() { - return permission; - } - - /** - * Sets the permissions for operations on resources specified by the - * access policy. Supported permissions include read (r), write (w), - * delete (d), and list (l). Permissions may be grouped so as to allow - * multiple operations to be performed with the access policy. For - * example, to grant all permissions to a resource, specify "rwdl" for - * the parameter. To grant only read/write permissions, specify "rw" for - * the parameter. - * - * @param permission - * A {@link String} containing the permissions specified for - * the access policy. - * @return A reference to this {@link AccessPolicy} instance. - */ - public AccessPolicy setPermission(String permission) { - this.permission = permission; - return this; - } - } - - /** - * An enumeration type for the public access levels that can be set on a - * blob container. - */ - public static enum PublicAccessType { - /** - * Access to this container and its blobs is restricted to calls made - * with the storage account private key. - */ - NONE, - /** - * Anonymous public read-only access is allowed for individual blobs - * within the container, but it is not possible to enumerate the blobs - * within the container or to enumerate the containers in the storage - * account. - */ - BLOBS_ONLY, - /** - * Anonymous public read-only access is allowed for individual blobs - * within the container, and the blobs within the container can be - * enumerated, but it is not possible to enumerate the containers in the - * storage account. - */ - CONTAINER_AND_BLOBS, - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobOptions.java deleted file mode 100644 index 5c99629c9303..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobOptions.java +++ /dev/null @@ -1,254 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.HashMap; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#copyBlob(String, String, String, String, CopyBlobOptions) - * copyBlob} request. These options include an optional server timeout for the - * operation, an optional source snapshot timestamp value to copy from a - * particular snapshot of the source blob, blob metadata to set on the - * destination blob, a blob lease ID to overwrite a blob with an active lease, a - * source lease ID to copy from a source blob with an active lease, any access - * conditions to satisfy on the destination, and any access conditions to - * satisfy on the source. - */ -public class CopyBlobOptions extends BlobServiceOptions { - private String leaseId; - private AccessConditionHeader accessCondition; - private String sourceLeaseId; - private String sourceSnapshot; - private HashMap metadata = new HashMap(); - private AccessConditionHeader sourceAccessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link CopyBlobOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CopyBlobOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CopyBlobOptions} instance. - */ - @Override - public CopyBlobOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the source snapshot timestamp value set in this - * {@link CopyBlobOptions} instance. - * - * @return A {@link String} containing the snapshot timestamp value of the - * source blob snapshot to list. - */ - public String getSourceSnapshot() { - return sourceSnapshot; - } - - /** - * Sets the snapshot timestamp value used to identify the particular - * snapshot of the source blob to copy. The snapshot timestamp value is an - * opaque value returned by the server to identify a snapshot. When this - * option is set, the properties, metadata, and content of the snapshot are - * copied to the destination. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobBlocksOptions} instance is passed as a parameter. - * - * @param sourceSnapshot - * A {@link String} containing the snapshot timestamp value of - * the source blob snapshot to list. - * @return A reference to this {@link ListBlobBlocksOptions} instance. - */ - public CopyBlobOptions setSourceSnapshot(String sourceSnapshot) { - this.sourceSnapshot = sourceSnapshot; - return this; - } - - /** - * Gets the blob metadata collection set in this {@link CopyBlobOptions} - * instance. - * - * @return A {@link HashMap} of name-value pairs of {@link String} - * containing the blob metadata set, if any. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Sets the blob metadata collection to associate with the destination blob. - * Metadata is a collection of name-value {@link String} pairs for client - * use and is opaque to the server. Metadata names must adhere to the naming - * rules for C# - * identifiers. - *

- * Note that if any metadata is set with this option, no source blob - * metadata will be copied to the destination blob. - *

- * The metadata value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param metadata - * A {@link HashMap} of name-value pairs of {@link String} - * containing the blob metadata to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CopyBlobOptions setMetadata(HashMap metadata) { - this.metadata = metadata; - return this; - } - - /** - * Adds a name-value pair to the blob metadata collection associated with - * this {@link CopyBlobOptions} instance. - *

- * Note that if any metadata is set with this option, no source blob - * metadata will be copied to the destination blob. - * - * @param key - * A {@link String} containing the name portion of the name-value - * pair to add to the metadata collection. - * @param value - * A {@link String} containing the value portion of the - * name-value pair to add to the metadata collection. - * @return A reference to this {@link CopyBlobOptions} instance. - */ - public CopyBlobOptions addMetadata(String key, String value) { - this.getMetadata().put(key, value); - return this; - } - - /** - * Gets the lease ID to match for the destination blob set in this - * {@link CopyBlobOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets a lease ID value to match on the destination blob. If set, there - * must be an active lease with a matching lease ID set on the destination - * blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link CopyBlobOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link CopyBlobOptions} instance. - */ - public CopyBlobOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the lease ID to match for the source blob set in this - * {@link CopyBlobOptions} instance. - * - * @return A {@link String} containing the source blob lease ID set, if any. - */ - public String getSourceLeaseId() { - return sourceLeaseId; - } - - /** - * Sets a lease ID value to match on the source blob. If set, there must be - * an active lease with a matching lease ID set on the source blob for the - * operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link CopyBlobOptions} instance is passed as a parameter. - * - * @param sourceLeaseId - * A {@link String} containing the source blob lease ID to set. - * @return A reference to this {@link CopyBlobOptions} instance. - */ - public CopyBlobOptions setSourceLeaseId(String sourceLeaseId) { - this.sourceLeaseId = sourceLeaseId; - return this; - } - - /** - * Gets the access conditions on the destination blob set in this - * {@link CopyBlobOptions} instance. - * - * @return An {@link AccessCondition} containing the destination blob access - * conditions set, if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets optional access conditions for the destination blob. The operation - * will return an error if the access conditions are not met. - *

- * Note that this value only affects calls made on methods where this - * {@link CopyBlobOptions} instance is passed as a parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the destination blob - * access conditions to set. - * @return A reference to this {@link CopyBlobOptions} instance. - */ - public CopyBlobOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } - - /** - * Gets the access conditions on the source blob set in this - * {@link CopyBlobOptions} instance. - * - * @return An {@link AccessCondition} containing the source blob access - * conditions set, if any. - */ - public AccessConditionHeader getSourceAccessCondition() { - return sourceAccessCondition; - } - - /** - * Sets optional access conditions for the source blob. The operation will - * return an error if the access conditions are not met. - *

- * Note that this value only affects calls made on methods where this - * {@link CopyBlobOptions} instance is passed as a parameter. - * - * @param sourceAccessCondition - * An {@link AccessCondition} containing the source blob access - * conditions to set. - * @return A reference to this {@link CopyBlobOptions} instance. - */ - public CopyBlobOptions setSourceAccessCondition( - AccessConditionHeader sourceAccessCondition) { - this.sourceAccessCondition = sourceAccessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobResult.java deleted file mode 100644 index edf0bb952033..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobResult.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; - -/** - * A wrapper class for the response returned from a Blob Service REST API Copy - * Blob operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#copyBlob(String, String, String, String, CopyBlobOptions)} - * . - *

- * See the Copy Blob documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class CopyBlobResult { - private String etag; - private Date lastModified; - - /** - * Gets the ETag of the blob. - * - * @return A {@link String} containing the server-assigned ETag value for - * the copy blob. - */ - public String getEtag() { - return etag; - } - - /** - * Sets the ETag of the blob from the ETag header returned in - * the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the last modified time of the blob. - *

- * - * @return A {@link java.util.Date} containing the last modified time of the - * blob. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Sets the last modified time of the blob from the - * Last-Modified header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the blob. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobBlockOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobBlockOptions.java deleted file mode 100644 index 64f93bab2f3e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobBlockOptions.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobBlock(String, String, String, java.io.InputStream, CreateBlobBlockOptions) - * createBlobBlock} request. These options include an optional server timeout - * for the operation, the lease ID if the blob has an active lease, and the MD5 - * hash value for the block content. - */ -public class CreateBlobBlockOptions extends BlobServiceOptions { - private String leaseId; - private String contentMD5; - - /** - * Sets the optional server request timeout value associated with this - * {@link CreateBlobBlockOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CreateBlobBlockOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CreateBlobBlockOptions} instance. - */ - @Override - public CreateBlobBlockOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link CreateBlobBlockOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets a lease ID value to match when updating the blob. This value must - * match the lease ID set on a leased blob for an update to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobBlockOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link CreateBlobBlockOptions} instance. - */ - public CreateBlobBlockOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the MD5 hash value for the block content set in this - * {@link CreateBlobBlockOptions} instance. - * - * @return A {@link String} containing the MD5 hash value for the block - * content set, if any. - */ - public String getContentMD5() { - return contentMD5; - } - - /** - * Sets the optional MD5 hash value for the block content. This hash is used - * to verify the integrity of the blob during transport. When this value is - * specified, the storage service checks the hash of the content that has - * arrived with the one that was sent. If the two hashes do not match, the - * operation will fail with error code 400 (Bad Request), which will cause a - * ServiceException to be thrown. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobBlockOptions} instance is passed as a parameter. - * - * @param contentMD5 - * A {@link String} containing the MD5 hash value for the block - * content to set. - * @return A reference to this {@link CreateBlobBlockOptions} instance. - */ - public CreateBlobBlockOptions setContentMD5(String contentMD5) { - this.contentMD5 = contentMD5; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobOptions.java deleted file mode 100644 index c5e0c0ca8ebb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobOptions.java +++ /dev/null @@ -1,497 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.HashMap; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createPageBlob(String, String, long, CreateBlobOptions) - * createPageBlob} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlockBlob(String, String, java.io.InputStream, CreateBlobOptions) - * createBlockBlob} request. These options include an optional server timeout - * for the operation, the MIME content type and content encoding for the blob, - * the content language, the MD5 hash, a cache control value, blob metadata, a - * blob lease ID, a sequence number, and access conditions. - */ -public class CreateBlobOptions extends BlobServiceOptions { - private String contentType; - private String contentEncoding; - private String contentLanguage; - private String contentMD5; - private String cacheControl; - private String blobContentType; - private String blobContentEncoding; - private String blobContentLanguage; - private String blobContentMD5; - private String blobCacheControl; - private HashMap metadata = new HashMap(); - private String leaseId; - private Long sequenceNumber; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link CreateBlobOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - @Override - public CreateBlobOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the Content-Type header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the Content-Type header - * value set, if any. - */ - public String getContentType() { - return contentType; - } - - /** - * Sets the optional Content-Type header value for the blob - * content. This value will be returned to clients in the headers of the - * response when the blob data or blob properties are requested. If no - * content type is specified, the default content type is - * application/octet-stream. - * - * @param contentType - * A {@link String} containing the Content-Type - * header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setContentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Gets the Content-Encoding header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the Content-Encoding - * header value set, if any. - */ - public String getContentEncoding() { - return contentEncoding; - } - - /** - * Sets the optional Content-Encoding header value for the blob - * content. Use this value to specify the content encodings applied to the - * blob. This value will be returned to clients in the headers of the - * response when the blob data or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param contentEncoding - * A {@link String} containing the Content-Encoding - * header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setContentEncoding(String contentEncoding) { - this.contentEncoding = contentEncoding; - return this; - } - - /** - * Gets the Content-Language header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the Content-Language - * header value set, if any. - */ - public String getContentLanguage() { - return contentLanguage; - } - - /** - * Sets the optional Content-Language header value for the blob - * content. Use this value to specify the content language of the blob. This - * value will be returned to clients in the headers of the response when the - * blob data or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param contentLanguage - * A {@link String} containing the Content-Language - * header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setContentLanguage(String contentLanguage) { - this.contentLanguage = contentLanguage; - return this; - } - - /** - * Gets the Content-MD5 header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the Content-MD5 header - * value set, if any. - */ - public String getContentMD5() { - return contentMD5; - } - - /** - * Sets the optional Content-MD5 header value for the blob - * content. Use this value to specify an MD5 hash of the blob content. This - * hash is used to verify the integrity of the blob during transport. When - * this header is specified, the storage service checks the hash that has - * arrived with the one that was sent. If the two hashes do not match, the - * operation will fail with error code 400 (Bad Request). This value will be - * returned to clients in the headers of the response when the blob data or - * blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param contentMD5 - * A {@link String} containing the Content-MD5 - * header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setContentMD5(String contentMD5) { - this.contentMD5 = contentMD5; - return this; - } - - /** - * Gets the Cache-Control header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the Cache-Control header - * value set, if any. - */ - public String getCacheControl() { - return cacheControl; - } - - /** - * Sets the optional Cache-Control header value for the blob - * content. The Blob service stores this value but does not use or modify - * it. This value will be returned to clients in the headers of the response - * when the blob data or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param cacheControl - * A {@link String} containing the Cache-Control - * header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setCacheControl(String cacheControl) { - this.cacheControl = cacheControl; - return this; - } - - /** - * Gets the x-ms-blob-content-type header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the - * x-ms-blob-content-type header value set, if any. - */ - public String getBlobContentType() { - return blobContentType; - } - - /** - * Sets the optional x-ms-blob-content-type header value for - * the blob content. This value will be returned to clients in the headers - * of the response when the blob data or blob properties are requested. If - * no content type is specified, the default content type is - * application/octet-stream. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param blobContentType - * A {@link String} containing the - * x-ms-blob-content-type header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setBlobContentType(String blobContentType) { - this.blobContentType = blobContentType; - return this; - } - - /** - * Gets the x-ms-blob-content-encoding header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the - * x-ms-blob-content-encoding header value set, if any. - */ - public String getBlobContentEncoding() { - return blobContentEncoding; - } - - /** - * Sets the optional x-ms-blob-content-encoding header value - * for the blob content. Use this value to specify the content encodings - * applied to the blob. This value will be returned to clients in the - * headers of the response when the blob data or blob properties are - * requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param blobContentEncoding - * A {@link String} containing the - * x-ms-blob-content-encoding header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setBlobContentEncoding(String blobContentEncoding) { - this.blobContentEncoding = blobContentEncoding; - return this; - } - - /** - * Gets the x-ms-blob-content-language header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the - * x-ms-blob-content-language header value set, if any. - */ - public String getBlobContentLanguage() { - return blobContentLanguage; - } - - /** - * Sets the optional x-ms-blob-content-language header value - * for the blob content. Use this value to specify the content language of - * the blob. This value will be returned to clients in the headers of the - * response when the blob data or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param blobContentLanguage - * A {@link String} containing the - * x-ms-blob-content-language header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setBlobContentLanguage(String blobContentLanguage) { - this.blobContentLanguage = blobContentLanguage; - return this; - } - - /** - * Gets the x-ms-blob-content-md5 header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the - * x-ms-blob-content-md5 header value set, if any. - */ - public String getBlobContentMD5() { - return blobContentMD5; - } - - /** - * Sets the optional MD5 hash value for the blob content. This value will be - * returned to clients in the x-ms-blob-content-md5 header - * value of the response when the blob data or blob properties are - * requested. This hash is used to verify the integrity of the blob during - * transport. When this header is specified, the storage service checks the - * hash of the content that has arrived with the one that was sent. If the - * two hashes do not match, the operation will fail with error code 400 (Bad - * Request), which will cause a ServiceException to be thrown. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param blobContentMD5 - * A {@link String} containing the - * x-ms-blob-content-md5 header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setBlobContentMD5(String blobContentMD5) { - this.blobContentMD5 = blobContentMD5; - return this; - } - - /** - * Gets the x-ms-blob-cache-control header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the - * x-ms-blob-cache-control header value set, if any. - */ - public String getBlobCacheControl() { - return blobCacheControl; - } - - /** - * Sets the optional x-ms-blob-cache-control header value for - * the blob content. The Blob service stores this value but does not use or - * modify it. This value will be returned to clients in the headers of the - * response when the blob data or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param blobCacheControl - * A {@link String} containing the - * x-ms-blob-cache-control header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setBlobCacheControl(String blobCacheControl) { - this.blobCacheControl = blobCacheControl; - return this; - } - - /** - * Gets the blob metadata collection set in this {@link CreateBlobOptions} - * instance. - * - * @return A {@link HashMap} of name-value pairs of {@link String} - * containing the blob metadata set, if any. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Sets the blob metadata collection to associate with the created blob. - * Metadata is a collection of name-value {@link String} pairs for client - * use and is opaque to the server. Metadata names must adhere to the naming - * rules for C# - * identifiers. - *

- * The metadata value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param metadata - * A {@link HashMap} of name-value pairs of {@link String} - * containing the blob metadata to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setMetadata(HashMap metadata) { - this.metadata = metadata; - return this; - } - - /** - * Adds a name-value pair to the blob metadata collection associated with - * this {@link CreateBlobOptions} instance. - * - * @param key - * A {@link String} containing the name portion of the name-value - * pair to add to the metadata collection. - * @param value - * A {@link String} containing the value portion of the - * name-value pair to add to the metadata collection. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions addMetadata(String key, String value) { - this.getMetadata().put(key, value); - return this; - } - - /** - * Gets the lease ID for the blob set in this {@link CreateBlobOptions} - * instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets a lease ID value to match when updating the blob. This value is not - * used when creating a blob. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the sequence number set in this {@link CreateBlobOptions} instance. - * - * @return The page blob sequence number value set. - */ - public Long getSequenceNumber() { - return sequenceNumber; - } - - /** - * Sets the optional sequence number for a page blob in this - * {@link CreateBlobOptions} instance. This value is not used for block - * blobs. The sequence number is a user-controlled value that you can use to - * track requests. The value of the sequence number must be between 0 and - * 2^63 - 1. The default value is 0. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param sequenceNumber - * The page blob sequence number value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setSequenceNumber(Long sequenceNumber) { - this.sequenceNumber = sequenceNumber; - return this; - } - - /** - * Gets the access conditions set in this {@link CreateBlobOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions for updating a blob. This value is not used - * when creating a blob. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesOptions.java deleted file mode 100644 index 49a601b6b8ab..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesOptions.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobPages(String, String, PageRange, long, java.io.InputStream, CreateBlobPagesOptions)} - * request. These options include an optional server timeout for the operation, - * a blob lease ID to create pages in a blob with an active lease, an optional - * MD5 hash for the content, and any access conditions to satisfy. - */ -public class CreateBlobPagesOptions extends BlobServiceOptions { - private String leaseId; - private String contentMD5; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link CreateBlobPagesOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CreateBlobPagesOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CreateBlobPagesOptions} instance. - */ - @Override - public CreateBlobPagesOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link CreateBlobPagesOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets an optional lease ID value to match when getting the blob. If set, - * the lease must be active and the value must match the lease ID set on the - * leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobPagesOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link CreateBlobPagesOptions} instance. - */ - public CreateBlobPagesOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the MD5 hash value for the page content set in this - * {@link CreateBlobPagesOptions} instance. - * - * @return A {@link String} containing the MD5 hash value for the block - * content set, if any. - */ - public String getContentMD5() { - return contentMD5; - } - - /** - * Sets the optional MD5 hash value for the page content. This hash is used - * to verify the integrity of the blob during transport. When this value is - * specified, the storage service checks the hash of the content that has - * arrived with the one that was sent. If the two hashes do not match, the - * operation will fail with error code 400 (Bad Request), which will cause a - * ServiceException to be thrown. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobPagesOptions} instance is passed as a parameter. - * - * @param contentMD5 - * A {@link String} containing the MD5 hash value for the block - * content to set. - * @return A reference to this {@link CreateBlobPagesOptions} instance. - */ - public CreateBlobPagesOptions setContentMD5(String contentMD5) { - this.contentMD5 = contentMD5; - return this; - } - - /** - * Gets the access conditions set in this {@link CreateBlobPagesOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets optional access conditions for getting the blob. The operation will - * return an error if the access conditions are not met. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobPagesOptions} instance is passed as a parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link CreateBlobPagesOptions} instance. - */ - public CreateBlobPagesOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesResult.java deleted file mode 100644 index 2b24f46acb48..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesResult.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; - -/** - * A wrapper class for the response returned from a Blob Service REST API Put - * Page operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#clearBlobPages(String, String, PageRange)}, - * {@link com.microsoft.windowsazure.services.blob.BlobContract#clearBlobPages(String, String, PageRange, CreateBlobPagesOptions)} - * , - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobPages(String, String, PageRange, long, java.io.InputStream)} - * and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobPages(String, String, PageRange, long, java.io.InputStream, CreateBlobPagesOptions)} - * . - *

- * See the Put - * Page documentation on MSDN for details of the underlying Blob Service - * REST API operation. - */ -public class CreateBlobPagesResult { - private String etag; - private Date lastModified; - private String contentMD5; - private long sequenceNumber; - - /** - * Gets the ETag of the blob. - *

- * This value can be used in an access condition when updating or deleting a - * blob to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag of the blob from the - * ETag element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the last modified time of the blob. - *

- * Any operation that modifies the blob, including updates to the blob's - * metadata or properties, changes the last modified time of the blob. This - * value can be used in an access condition when updating or deleting a blob - * to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link java.util.Date} containing the last modified time of the - * page blob. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the blob from - * the Last-Modified element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the blob. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - /** - * Gets the MD5 hash value of the page blob. This value can be used to - * determine if the blob content has been corrupted in transmission. - * - * @return A {@link String} containing the MD5 hash value of the page blob. - */ - public String getContentMD5() { - return contentMD5; - } - - /** - * Reserved for internal use. Sets the MD5 hash value of the page blob from - * the Content-MD5 element returned in the response. - * - * @param contentMD5 - * A {@link String} containing the MD5 hash value of the page - * blob. - */ - public void setContentMD5(String contentMD5) { - this.contentMD5 = contentMD5; - } - - /** - * Gets the sequence number of the page blob. This value can be used when - * updating or deleting a page blob using an optimistic concurrency model to - * prevent the client from modifying data that has been changed by another - * client. - * - * @return A {@link String} containing the client-assigned sequence number - * value for the page blob. - */ - public long getSequenceNumber() { - return sequenceNumber; - } - - /** - * Reserved for internal use. Sets the sequence number of the page blob from - * the x-ms-blob-sequence-number element returned in the - * response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param sequenceNumber - * A {@link String} containing the client-assigned sequence - * number value for the page blob. - */ - public void setSequenceNumber(long sequenceNumber) { - this.sequenceNumber = sequenceNumber; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobResult.java deleted file mode 100644 index a4db1f50702b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobResult.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; - -/** - * A wrapper class for the response returned from a Blob Service REST API Create - * Blob operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createPageBlob(String, String, long, CreateBlobOptions)} - * and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlockBlob(String, String, java.io.InputStream, CreateBlobOptions)} - * . - *

- * See the Put - * Blob documentation on MSDN for details of the underlying Blob Service - * REST API operation. - */ -public class CreateBlobResult { - private String etag; - private Date lastModified; - - /** - * Gets the ETag of the blob. - * - * @return A {@link String} containing the server-assigned ETag value for - * the snapshot. - */ - public String getEtag() { - return etag; - } - - /** - * Sets the ETag of the snapshot from the ETag header returned - * in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the last modified time of the snapshot. - * - * @return A {@link java.util.Date} containing the last modified time of the - * blob. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the snapshot - * from the Last-Modified header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the snapshot. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotOptions.java deleted file mode 100644 index 9086a0cc6e08..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotOptions.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.HashMap; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobSnapshot(String, String, CreateBlobSnapshotOptions) - * createBlobSnapshot} request. These options include an optional server timeout - * for the operation, blob metadata to set on the snapshot, a blob lease ID to - * get a blob with an active lease, an optional start and end range for blob - * content to return, and any access conditions to satisfy. - */ -public class CreateBlobSnapshotOptions extends BlobServiceOptions { - private HashMap metadata = new HashMap(); - private String leaseId; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link CreateBlobSnapshotOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CreateBlobSnapshotOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CreateBlobSnapshotOptions} instance. - */ - @Override - public CreateBlobSnapshotOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the metadata collection set in this - * {@link CreateBlobSnapshotOptions} instance. - * - * @return A {@link HashMap} of name-value pairs of {@link String} - * containing the blob metadata set, if any. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Sets the metadata collection to associate with a snapshot. Metadata is a - * collection of name-value {@link String} pairs for client use and is - * opaque to the server. Metadata names must adhere to the naming rules for - * C# - * identifiers. - *

- * The metadata value only affects calls made on methods where this - * {@link CreateBlobSnapshotOptions} instance is passed as a parameter. - * - * @param metadata - * A {@link java.util.HashMap} of name-value pairs of - * {@link String} containing the names and values of the metadata - * to set. - * @return A reference to this {@link CreateBlobSnapshotOptions} instance. - */ - public CreateBlobSnapshotOptions setMetadata( - HashMap metadata) { - this.metadata = metadata; - return this; - } - - /** - * Adds a name-value pair to the metadata collection associated with this - * {@link CreateBlobSnapshotOptions} instance. - * - * @param key - * A {@link String} containing the name portion of the name-value - * pair to add to the metadata collection. - * @param value - * A {@link String} containing the value portion of the - * name-value pair to add to the metadata collection. - * @return A reference to this {@link CreateBlobSnapshotOptions} instance. - */ - public CreateBlobSnapshotOptions addMetadata(String key, String value) { - this.getMetadata().put(key, value); - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link CreateBlobSnapshotOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets an optional lease ID value to match when creating a snapshot of the - * blob. If set, the lease must be active and the value must match the lease - * ID set on the leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobSnapshotOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link CreateBlobSnapshotOptions} instance. - */ - public CreateBlobSnapshotOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the access conditions set in this {@link CreateBlobSnapshotOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets optional access conditions for creating a snapshot of the blob. The - * operation will return an error if the access conditions are not met. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobSnapshotOptions} instance is passed as a parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link CreateBlobSnapshotOptions} instance. - */ - public CreateBlobSnapshotOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotResult.java deleted file mode 100644 index e70741c58ff6..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotResult.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; - -/** - * A wrapper class for the response returned from a Blob Service REST API - * Snapshot Blob operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobSnapshot(String, String)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobSnapshot(String, String, CreateBlobSnapshotOptions)} - * . - *

- * See the Snapshot Blob documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class CreateBlobSnapshotResult { - private String snapshot; - private String etag; - private Date lastModified; - - /** - * Gets the snapshot timestamp value returned by the server to uniquely - * identify the newly created snapshot. - *

- * The snapshot timestamp value is an opaque value returned by the server to - * uniquely identify a snapshot version, and may be used in subsequent - * requests to access the snapshot. - *

- * - * @return A {@link String} containing the snapshot timestamp value of the - * newly created snapshot. - */ - public String getSnapshot() { - return snapshot; - } - - /** - * Reserved for internal use. Sets the snapshot timestamp value from the - * x-ms-snapshot header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param snapshot - * A {@link String} containing the snapshot timestamp value of - * the newly created snapshot. - */ - public void setSnapshot(String snapshot) { - this.snapshot = snapshot; - } - - /** - * Gets the ETag of the snapshot. - *

- * Note that a snapshot cannot be written to, so the ETag of a given - * snapshot will never change. However, the ETag of the snapshot will differ - * from that of the base blob if new metadata was supplied with the create - * blob snapshot request. If no metadata was specified with the request, the - * ETag of the snapshot will be identical to that of the base blob at the - * time the snapshot was taken. - * - * @return A {@link String} containing the server-assigned ETag value for - * the snapshot. - */ - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag of the snapshot from the - * ETag header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the last modified time of the snapshot. - *

- * Note that a snapshot cannot be written to, so the last modified time of a - * given snapshot will never change. However, the last modified time of the - * snapshot will differ from that of the base blob if new metadata was - * supplied with the create blob snapshot request. If no metadata was - * specified with the request, the last modified time of the snapshot will - * be identical to that of the base blob at the time the snapshot was taken. - * - * @return A {@link java.util.Date} containing the last modified time of the - * snapshot. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the snapshot - * from the Last-Modified header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the snapshot. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateContainerOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateContainerOptions.java deleted file mode 100644 index ba74a2c16d30..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateContainerOptions.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.HashMap; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createContainer(String, CreateContainerOptions) - * createContainer} request. These options include a server response timeout for - * the request, metadata to set on the container, and the public access level - * for container and blob data. Options that are not set will not be passed to - * the server with a request. - */ -public class CreateContainerOptions extends BlobServiceOptions { - private String publicAccess; - private HashMap metadata = new HashMap(); - - /** - * Sets the server request timeout value associated with this - * {@link CreateContainerOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CreateContainerOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CreateContainerOptions} instance. - */ - @Override - public CreateContainerOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the metadata collection associated with this - * {@link CreateContainerOptions} instance. - * - * @return A {@link java.util.HashMap} of name-value pairs of {@link String} - * containing the names and values of the container metadata to set. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Sets the metadata collection associated with this - * {@link CreateContainerOptions} instance. Metadata is a collection of - * name-value {@link String} pairs for client use and is opaque to the - * server. Metadata names must adhere to the naming rules for C# - * identifiers. - *

- * The metadata value only affects calls made on methods where this - * {@link CreateContainerOptions} instance is passed as a parameter. - * - * @param metadata - * A {@link java.util.HashMap} of name-value pairs of - * {@link String} containing the names and values of the - * container metadata to set. - * @return A reference to this {@link CreateContainerOptions} instance. - */ - public CreateContainerOptions setMetadata(HashMap metadata) { - this.metadata = metadata; - return this; - } - - /** - * Adds a metadata name-value pair to the metadata collection associated - * with this {@link CreateContainerOptions} instance. - * - * @param key - * A {@link String} containing the name portion of the name-value - * pair to add to the metadata collection. - * @param value - * A {@link String} containing the value portion of the - * name-value pair to add to the metadata collection. - * @return A reference to this {@link CreateContainerOptions} instance. - */ - public CreateContainerOptions addMetadata(String key, String value) { - this.getMetadata().put(key, value); - return this; - } - - /** - * Gets the public access level value associated with this - * {@link CreateContainerOptions} instance. The public access level - * specifies whether data in the container may be accessed publicly and the - * level of access. Possible values include: - *

    - *
  • container  Specifies full public read access for - * container and blob data. Clients can enumerate blobs within the container - * via anonymous request, but cannot enumerate containers within the storage - * account.
  • - *
  • blob  Specifies public read access for blobs. Blob - * data within this container can be read via anonymous request, but - * container data is not available. Clients cannot enumerate blobs within - * the container via anonymous request.
  • - *
- * The default value of null sets the container data private to - * the storage account owner. - * - * @return A {@link String} containing the public access level value to set, - * or null. - */ - public String getPublicAccess() { - return publicAccess; - } - - /** - * Sets the public access level value associated with this - * {@link CreateContainerOptions} instance. The public access level - * specifies whether data in the container may be accessed publicly and the - * level of access. Possible values include: - *
    - *
  • container  Specifies full public read access for - * container and blob data. Clients can enumerate blobs within the container - * via anonymous request, but cannot enumerate containers within the storage - * account.
  • - *
  • blob  Specifies public read access for blobs. Blob - * data within this container can be read via anonymous request, but - * container data is not available. Clients cannot enumerate blobs within - * the container via anonymous request.
  • - *
- * The default value of null sets the container data private to - * the storage account owner. - *

- * The publicAccess value only affects calls made on methods where - * this {@link CreateContainerOptions} instance is passed as a parameter. - * - * @param publicAccess - * A {@link String} containing the public access level value to - * set, or null to set the container data private to - * the storage account owner. - * @return A reference to this {@link CreateContainerOptions} instance. - */ - public CreateContainerOptions setPublicAccess(String publicAccess) { - this.publicAccess = publicAccess; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteBlobOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteBlobOptions.java deleted file mode 100644 index 066093601c5f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteBlobOptions.java +++ /dev/null @@ -1,180 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#deleteBlob(String, String, DeleteBlobOptions) deleteBlob} - * request. These options include an optional server timeout for the operation, - * a snapshot timestamp to specify an individual snapshot to delete, a blob - * lease ID to delete a blob with an active lease, a flag indicating whether to - * delete all snapshots but not the blob, or both the blob and all snapshots, - * and any access conditions to satisfy. - */ -public class DeleteBlobOptions extends BlobServiceOptions { - private String snapshot; - private String leaseId; - private Boolean deleteSnaphotsOnly; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link DeleteBlobOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link DeleteBlobOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link DeleteBlobOptions} instance. - */ - @Override - public DeleteBlobOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the snapshot timestamp value set in this {@link DeleteBlobOptions} - * instance. - * - * @return A {@link String} containing the snapshot timestamp value of the - * blob snapshot to get. - */ - public String getSnapshot() { - return snapshot; - } - - /** - * Reserved for future use. Sets an optional snapshot timestamp value used - * to identify the particular snapshot of the blob to delete. - *

- * The snapshot timestamp value is an opaque value returned by the server to - * identify a snapshot. This option cannot be set if the delete snapshots - * only option is set to true or false. - *

- * Note that this value only affects calls made on methods where this - * {@link DeleteBlobOptions} instance is passed as a parameter. - * - * @param snapshot - * A {@link String} containing the snapshot timestamp value of - * the blob snapshot to get. - * @return A reference to this {@link DeleteBlobOptions} instance. - */ - public DeleteBlobOptions setSnapshot(String snapshot) { - this.snapshot = snapshot; - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link DeleteBlobOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets an optional lease ID value to match when deleting the blob. If set, - * the lease must be active and the value must match the lease ID set on the - * leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link DeleteBlobOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link DeleteBlobOptions} instance. - */ - public DeleteBlobOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the flag indicating whether to delete only snapshots of the blob, or - * both the blob and all its snapshots set in this {@link DeleteBlobOptions} - * instance. - * - * @return A value of true to delete only the snapshots, or - * false to delete both snapshots and the blob. When - * the value null is set, x-ms-delete-snapshots in the - * header will not be set. - */ - public Boolean getDeleteSnaphotsOnly() { - return deleteSnaphotsOnly; - } - - /** - * Sets a flag indicating whether to delete only snapshots of the blob, or - * both the blob and all its snapshots. - *

- * If the deleteSnaphotsOnly parameter is set to true, - * only the snapshots of the blob are deleted by the operation. If the - * parameter is set to false, both the blob and all its - * snapshots are deleted by the operation. If this option is not set on a - * request, and the blob has associated snapshots, the Blob service returns - * a 409 (Conflict) status code and a {@link com.microsoft.windowsazure.exception.ServiceException} is thrown. - *

- * This option is not compatible with the snapshot option; if both are set - * the Blob service returns status code 400 (Bad Request) and a - * {@link StorageException} is thrown. - *

- * Note that this value only affects calls made on methods where this - * {@link DeleteBlobOptions} instance is passed as a parameter. - * - * @param deleteSnaphotsOnly - * Set to true to delete only the snapshots, or - * false to delete both snapshots and the blob. - * @return A reference to this {@link DeleteBlobOptions} instance. - */ - public DeleteBlobOptions setDeleteSnaphotsOnly(boolean deleteSnaphotsOnly) { - this.deleteSnaphotsOnly = deleteSnaphotsOnly; - return this; - } - - /** - * Gets the access conditions set in this {@link DeleteBlobOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets optional access conditions for getting the blob. The operation will - * return an error if the access conditions are not met. - *

- * Note that this value only affects calls made on methods where this - * {@link DeleteBlobOptions} instance is passed as a parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link DeleteBlobOptions} instance. - */ - public DeleteBlobOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteContainerOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteContainerOptions.java deleted file mode 100644 index f4768f294395..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteContainerOptions.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#deleteContainer(String, DeleteContainerOptions) - * deleteContainer} request. These options include a server response timeout for - * the request and access conditions that specify whether to perform the - * operation or not depending on the values of the Etag or last modified time of - * the container. Options that are not set will not be passed to the server with - * a request. - */ -public class DeleteContainerOptions extends BlobServiceOptions { - private AccessConditionHeader accessCondition; - - /** - * Sets the server request timeout value associated with this - * {@link DeleteContainerOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link DeleteContainerOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link DeleteContainerOptions} instance. - */ - @Override - public DeleteContainerOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the access conditions associated with this - * {@link DeleteContainerOptions} instance. - * - * @return An {@link AccessCondition} reference containing the Etag and last - * modified time conditions for performing the delete container - * operation, or null if not set. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions associated with this - * {@link DeleteContainerOptions} instance. By default, the delete container - * operation will delete the container unconditionally. Use this method to - * specify conditions on the Etag or last modified time value for performing - * the delete container operation. - *

- * The accessCondition value only affects calls made on methods - * where this {@link DeleteContainerOptions} instance is passed as a - * parameter. - * - * @param accessCondition - * An {@link AccessCondition} reference containing the Etag and - * last modified time conditions for performing the delete - * container operation. Specify null to make the - * operation unconditional. - * @return A reference to this {@link DeleteContainerOptions} instance. - */ - public DeleteContainerOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataOptions.java deleted file mode 100644 index e12b21152335..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataOptions.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getBlobMetadata(String, String, GetBlobMetadataOptions) - * getBlobMetadata} request. These options include an optional server timeout - * for the operation, the lease ID if the blob has an active lease, the snapshot - * timestamp to get the properties of a snapshot, and any access conditions for - * the request. - */ -public class GetBlobMetadataOptions extends BlobServiceOptions { - private String snapshot; - private String leaseId; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link GetBlobMetadataOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link GetBlobMetadataOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link GetBlobMetadataOptions} instance. - */ - @Override - public GetBlobMetadataOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the snapshot timestamp value set in this - * {@link GetBlobMetadataOptions} instance. - * - * @return A {@link String} containing the snapshot timestamp value of the - * blob snapshot to get metadata for. - */ - public String getSnapshot() { - return snapshot; - } - - /** - * Sets the snapshot timestamp value used to identify the particular - * snapshot of the blob to get metadata for. The snapshot timestamp value is - * an opaque value returned by the server to identify a snapshot. When this - * option is set, only the metadata of the snapshot is returned. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobMetadataOptions} instance is passed as a parameter. - * - * @param snapshot - * A {@link String} containing the snapshot timestamp value of - * the blob snapshot to get metadata for. - * @return A reference to this {@link GetBlobMetadataOptions} instance. - */ - public GetBlobMetadataOptions setSnapshot(String snapshot) { - this.snapshot = snapshot; - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link GetBlobMetadataOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets a lease ID value to match when getting the metadata of the blob. If - * set, the lease must be active and the value must match the lease ID set - * on the leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobMetadataOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link GetBlobMetadataOptions} instance. - */ - public GetBlobMetadataOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the access conditions set in this {@link GetBlobMetadataOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions for getting the metadata of the blob. The - * operation will return an error if the access conditions are not met. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link GetBlobMetadataOptions} instance. - */ - public GetBlobMetadataOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataResult.java deleted file mode 100644 index c1fb178df988..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataResult.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; -import java.util.HashMap; - -/** - * A wrapper class for the response returned from a Blob Service REST API Get - * Blob Metadata operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getBlobMetadata(String, String)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getBlobMetadata(String, String, GetBlobMetadataOptions)}. - *

- * See the Get - * Blob Metadata documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class GetBlobMetadataResult { - private String etag; - private Date lastModified; - private HashMap metadata; - - /** - * Gets the ETag of the blob. For block blobs, this value is returned only - * if the blob has committed blocks. - *

- * This value can be used in an access condition when updating or deleting a - * blob to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag of the blob from the - * ETag header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the last modified time of the block blob. For block blobs, this - * value is returned only if the blob has committed blocks. - *

- * Any operation that modifies the blob, including updates to the blob's - * metadata or properties, changes the last modified time of the blob. This - * value can be used in an access condition when updating or deleting a blob - * to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link java.util.Date} containing the last modified time of the - * blob. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the blob from - * the Last-Modified header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the blob. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - /** - * Gets the user-defined blob metadata as a map of name and value pairs. The - * metadata is for client use and is opaque to the server. - * - * @return A {@link java.util.HashMap} of name-value pairs of {@link String} - * containing the names and values of the blob metadata. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Reserved for internal use. Sets the blob metadata from the - * x-ms-meta-name:value headers returned in the - * response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param metadata - * A {@link java.util.HashMap} of name-value pairs of - * {@link String} containing the names and values of the blob - * metadata. - */ - public void setMetadata(HashMap metadata) { - this.metadata = metadata; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobOptions.java deleted file mode 100644 index c56df960828f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobOptions.java +++ /dev/null @@ -1,236 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getBlob(String, String, GetBlobOptions) getBlob} request. - * These options include an optional server timeout for the operation, a - * snapshot timestamp to specify a snapshot, a blob lease ID to get a blob with - * an active lease, an optional start and end range for blob content to return, - * and any access conditions to satisfy. - */ -public class GetBlobOptions extends BlobServiceOptions { - private String snapshot; - private String leaseId; - private boolean computeRangeMD5; - private Long rangeStart; - private Long rangeEnd; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link GetBlobOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link GetBlobOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link GetBlobOptions} instance. - */ - @Override - public GetBlobOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the snapshot timestamp value set in this {@link GetBlobOptions} - * instance. - * - * @return A {@link String} containing the snapshot timestamp value of the - * blob snapshot to get. - */ - public String getSnapshot() { - return snapshot; - } - - /** - * Sets an optional snapshot timestamp value used to identify the particular - * snapshot of the blob to get properties, metadata, and content for. The - * snapshot timestamp value is an opaque value returned by the server to - * identify a snapshot. When this option is set, only the properties, - * metadata, and content of the snapshot are returned. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobOptions} instance is passed as a parameter. - * - * @param snapshot - * A {@link String} containing the snapshot timestamp value of - * the blob snapshot to get. - * @return A reference to this {@link GetBlobOptions} instance. - */ - public GetBlobOptions setSnapshot(String snapshot) { - this.snapshot = snapshot; - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link GetBlobOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets an optional lease ID value to match when getting the blob. If set, - * the lease must be active and the value must match the lease ID set on the - * leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link GetBlobOptions} instance. - */ - public GetBlobOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Reserved for future use. Gets a flag indicating whether to return an MD5 - * hash for the specified range of blob content set in this - * {@link GetBlobOptions} instance. - * - * @return A flag value of true to get the MD5 hash value for - * the specified range, otherwise false. - */ - public boolean isComputeRangeMD5() { - return computeRangeMD5; - } - - /** - * Reserved for future use. Sets a flag indicating whether to return an MD5 - * hash for the specified range of blob content. - *

- * When the computeRangeMD5 parameter is set to true - * and specified together with a range less than or equal to 4 MB in size, - * the get blob operation response includes the MD5 hash for the range. If - * the computeRangeMD5 parameter is set to true and no - * range is specified or the range exceeds 4 MB in size, a - * {@link com.microsoft.windowsazure.exception.ServiceException} is thrown. - * - * @param computeRangeMD5 - * Reserved for future use. Set a flag value of true - * to get the MD5 hash value for the specified range, otherwise - * false. - * @return A reference to this {@link GetBlobOptions} instance. - */ - public GetBlobOptions setComputeRangeMD5(boolean computeRangeMD5) { - this.computeRangeMD5 = computeRangeMD5; - return this; - } - - /** - * Gets the beginning byte offset value of the blob content range to return - * set in this {@link GetBlobOptions} instance. - * - * @return The beginning offset value in bytes for the blob content range to - * return. - */ - public Long getRangeStart() { - return rangeStart; - } - - /** - * Sets an optional beginning byte offset value of the blob content range to - * return for the request, inclusive. - *

- * When this value is set, the blob content beginning at the byte offset - * specified by the rangeStart value and ending at the range end - * value, inclusive, is returned in the server response to the get blob - * operation. If the range end is not set, the response includes blob - * content from the rangeStart value to the end of the blob. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobOptions} instance is passed as a parameter. - * - * @param rangeStart - * The beginning offset value in bytes for the blob content range - * to return, inclusive. - * @return A reference to this {@link GetBlobOptions} instance. - */ - public GetBlobOptions setRangeStart(Long rangeStart) { - this.rangeStart = rangeStart; - return this; - } - - /** - * Gets the ending byte offset value for the blob content range to return - * set in this {@link GetBlobOptions} instance. - * - * @return The ending offset value in bytes for the blob content range to - * return. - */ - public Long getRangeEnd() { - return rangeEnd; - } - - /** - * Sets an optional ending byte offset value of the blob content range to - * return for the request, inclusive. - *

- * If the range start is not set, this value is ignored and the response - * includes content from the entire blob. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobOptions} instance is passed as a parameter. - * - * @param rangeEnd - * The ending offset value in bytes for the blob content range to - * return, inclusive. - * @return A reference to this {@link GetBlobOptions} instance. - */ - public GetBlobOptions setRangeEnd(Long rangeEnd) { - this.rangeEnd = rangeEnd; - return this; - } - - /** - * Gets the access conditions set in this {@link GetBlobOptions} instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets optional access conditions for getting the blob. The operation will - * return an error if the access conditions are not met. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobOptions} instance is passed as a parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link GetBlobOptions} instance. - */ - public GetBlobOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesOptions.java deleted file mode 100644 index f2aa5a0c673a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesOptions.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getBlobProperties(String, String, GetBlobPropertiesOptions) - * getBlobProperties} request. These options include an optional server timeout - * for the operation, the lease ID if the blob has an active lease, the snapshot - * timestamp to get the properties of a snapshot, and any access conditions for - * the request. - */ -public class GetBlobPropertiesOptions extends BlobServiceOptions { - private String snapshot; - private String leaseId; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link GetBlobPropertiesOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link GetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link GetBlobPropertiesOptions} instance. - */ - @Override - public GetBlobPropertiesOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the snapshot timestamp value set in this - * {@link GetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the snapshot timestamp value of the - * blob snapshot to get properties for. - */ - public String getSnapshot() { - return snapshot; - } - - /** - * Sets the snapshot timestamp value used to identify the particular - * snapshot of the blob to get properties for. The snapshot timestamp value - * is an opaque value returned by the server to identify a snapshot. When - * this option is set, only the properties of the snapshot are returned. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param snapshot - * A {@link String} containing the snapshot timestamp value of - * the blob snapshot to get properties for. - * @return A reference to this {@link GetBlobPropertiesOptions} instance. - */ - public GetBlobPropertiesOptions setSnapshot(String snapshot) { - this.snapshot = snapshot; - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link GetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets a lease ID value to match when getting the properties of the blob. - * If set, the lease must be active and the value must match the lease ID - * set on the leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link GetBlobPropertiesOptions} instance. - */ - public GetBlobPropertiesOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the access conditions set in this {@link GetBlobPropertiesOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions for getting the properties of the blob. The - * operation will return an error if the access conditions are not met. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link GetBlobPropertiesOptions} instance. - */ - public GetBlobPropertiesOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesResult.java deleted file mode 100644 index c0ec8117c678..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesResult.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.HashMap; - -/** - * A wrapper class for the response returned from a Blob Service REST API Get - * Blob Properties operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getBlobProperties(String, String)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getBlobProperties(String, String, GetBlobPropertiesOptions)} - * . - *

- * See the Get - * Blob Properties documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class GetBlobPropertiesResult { - private BlobProperties properties; - private HashMap metadata = new HashMap(); - - /** - * Gets the standard HTTP properties and system properties of the blob. - * - * @return A {@link BlobProperties} instance containing the properties of - * the blob. - */ - public BlobProperties getProperties() { - return properties; - } - - /** - * Reserved for internal use. Sets the blob properties from the headers - * returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param properties - * A {@link BlobProperties} instance containing the properties of - * the blob. - */ - public void setProperties(BlobProperties properties) { - this.properties = properties; - } - - /** - * Gets the user-defined blob metadata as a map of name and value pairs. The - * metadata is for client use and is opaque to the server. - * - * @return A {@link java.util.HashMap} of key-value pairs of {@link String} - * containing the names and values of the blob metadata. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Reserved for internal use. Sets the blob metadata from the - * x-ms-meta-name:value headers returned in the - * response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param metadata - * A {@link java.util.HashMap} of key-value pairs of - * {@link String} containing the names and values of the blob - * metadata. - */ - public void setMetadata(HashMap metadata) { - this.metadata = metadata; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobResult.java deleted file mode 100644 index 6650d0ac8079..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobResult.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.io.InputStream; -import java.util.HashMap; - -/** - * A wrapper class for the response returned from a Blob Service REST API Get - * Blob operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getBlob(String, String, GetBlobOptions)}. - *

- * See the Get - * Blob documentation on MSDN for details of the underlying Blob Service - * REST API operation. - */ -public class GetBlobResult { - private InputStream contentStream; - private BlobProperties properties; - private HashMap metadata; - - /** - * Gets the content of the blob. - * - * @return An {@link InputStream} instance containing the content of the - * blob. - */ - public InputStream getContentStream() { - return contentStream; - } - - /** - * Reserved for internal use. Sets the blob content from the body returned - * in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param contentStream - * An {@link InputStream} instance containing the content of the - * blob. - */ - public void setContentStream(InputStream contentStream) { - this.contentStream = contentStream; - } - - /** - * Gets the standard HTTP properties and system properties of the blob. - * - * @return A {@link BlobProperties} instance containing the properties of - * the blob. - */ - public BlobProperties getProperties() { - return properties; - } - - /** - * Reserved for internal use. Sets the blob properties from the headers - * returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param properties - * A {@link BlobProperties} instance containing the properties of - * the blob. - */ - public void setProperties(BlobProperties properties) { - this.properties = properties; - } - - /** - * Gets the user-defined blob metadata as a map of name and value pairs. The - * metadata is for client use and is opaque to the server. - * - * @return A {@link java.util.HashMap} of key-value pairs of {@link String} - * containing the names and values of the blob metadata. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Reserved for internal use. Sets the blob metadata from the - * x-ms-meta-name:value headers returned in the - * response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param metadata - * A {@link java.util.HashMap} of key-value pairs of - * {@link String} containing the names and values of the blob - * metadata. - */ - public void setMetadata(HashMap metadata) { - this.metadata = metadata; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerACLResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerACLResult.java deleted file mode 100644 index 2098b14faa2b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerACLResult.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - - -/** - * A wrapper class for the response returned from a Blob Service REST API Get - * Container ACL operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getContainerACL(String)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getContainerACL(String, BlobServiceOptions)}. - *

- * See the Get - * Container ACL documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class GetContainerACLResult { - private ContainerACL containerACL; - - /** - * Gets the container's public access level and container-level access - * policies from the headers and body returned in the response. - * - * @return A {@link ContainerACL} instance representing the public access - * level and container-level access policies returned by the - * request. - */ - public ContainerACL getContainerACL() { - return containerACL; - } - - /** - * Reserved for internal use. Sets the container's public access level and - * container-level access policies from the headers and body returned in the - * response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param containerACL - * A {@link ContainerACL} instance representing the public access - * level and container-level access policies returned by the - * request. - */ - public void setValue(ContainerACL containerACL) { - this.containerACL = containerACL; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerPropertiesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerPropertiesResult.java deleted file mode 100644 index 1bc06b7e5ba7..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerPropertiesResult.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; -import java.util.HashMap; - -/** - * A wrapper class for the response returned from a Blob Service REST API Get - * Container Properties and Get Container Metadata operations. This is returned - * by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getContainerProperties(String)}, - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getContainerProperties(String, BlobServiceOptions)}, - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getContainerMetadata(String)}, and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getContainerMetadata(String, BlobServiceOptions)}. - *

- * See the Get - * Container Properties and Get - * Container Metadata documentation on MSDN for details of the underlying - * Blob Service REST API operations. - */ -public class GetContainerPropertiesResult { - private String etag; - private Date lastModified; - private HashMap metadata; - - /** - * Gets the Etag of the container. This value can be used when updating or - * deleting a container using an optimistic concurrency model to prevent the - * client from modifying data that has been changed by another client. - * - * @return A {@link String} containing the server-assigned Etag value for - * the container. - */ - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the Etag of the container from the - * ETag header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned Etag value for - * the container. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the last modifed time of the container. This value can be used when - * updating or deleting a container using an optimistic concurrency model to - * prevent the client from modifying data that has been changed by another - * client. - * - * @return A {@link java.util.Date} containing the last modified time of the - * container. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the container - * from the Last-Modified header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the container. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - /** - * Gets the container metadata as a map of name and value pairs. The - * container metadata is for client use and is opaque to the server. - * - * @return A {@link java.util.HashMap} of key-value pairs of {@link String} - * containing the names and values of the container metadata. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Reserved for internal use. Sets the container metadata from the - * x-ms-meta-name headers returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param metadata - * A {@link java.util.HashMap} of key-value pairs of - * {@link String} containing the names and values of the - * container metadata. - */ - public void setMetadata(HashMap metadata) { - this.metadata = metadata; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetServicePropertiesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetServicePropertiesResult.java deleted file mode 100644 index d4441781c484..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetServicePropertiesResult.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - - -/** - * A wrapper class for the service properties returned in response to Blob - * Service REST API operations. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getServiceProperties()} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getServiceProperties(BlobServiceOptions)}. - *

- * See the Get - * Blob Service Properties documentation on MSDN for details of the - * underlying Blob Service REST API operation. - */ -public class GetServicePropertiesResult { - private ServiceProperties value; - - /** - * Gets a {@link ServiceProperties} instance containing the service property - * values associated with the storage account. - *

- * Modifying the values in the {@link ServiceProperties} instance returned - * does not affect the values associated with the storage account. To change - * the values in the storage account, call the - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setServiceProperties} method and pass the modified - * {@link ServiceProperties} instance as a parameter. - * - * @return A {@link ServiceProperties} instance containing the property - * values associated with the storage account. - */ - public ServiceProperties getValue() { - return value; - } - - /** - * Reserved for internal use. Sets the value of the - * {@link ServiceProperties} instance associated with a storage service call - * result. This method is invoked by the API to store service properties - * returned by a call to a REST operation and is not intended for public - * use. - * - * @param value - * A {@link ServiceProperties} instance containing the property - * values associated with the storage account. - */ - public void setValue(ServiceProperties value) { - this.value = value; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksOptions.java deleted file mode 100644 index 4833d2cfd0af..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksOptions.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobBlocks(String, String, ListBlobBlocksOptions) - * listBlobBlocks} request. These options include an optional server timeout for - * the operation, the lease ID if the blob has an active lease, the snapshot - * timestamp to get the committed blocks of a snapshot, whether to return the - * committed block list, and whether to return the uncommitted block list. - */ -public class ListBlobBlocksOptions extends BlobServiceOptions { - private String leaseId; - private String snapshot; - private boolean committedList; - private boolean uncommittedList; - - /** - * Sets the optional server request timeout value associated with this - * {@link ListBlobBlocksOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link ListBlobBlocksOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link ListBlobBlocksOptions} instance. - */ - @Override - public ListBlobBlocksOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link ListBlobBlocksOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets a lease ID value to match when listing the blocks of the blob. If - * set, the lease must be active and the value must match the lease ID set - * on the leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobBlocksOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link ListBlobBlocksOptions} instance. - */ - public ListBlobBlocksOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the snapshot timestamp value set in this - * {@link ListBlobBlocksOptions} instance. - * - * @return A {@link String} containing the snapshot timestamp value of the - * blob snapshot to list. - */ - public String getSnapshot() { - return snapshot; - } - - /** - * Sets the snapshot timestamp value used to identify the particular - * snapshot of the blob to list blocks for. The snapshot timestamp value is - * an opaque value returned by the server to identify a snapshot. When this - * option is set, only the list of committed blocks of the snapshot is - * returned. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobBlocksOptions} instance is passed as a parameter. - * - * @param snapshot - * A {@link String} containing the snapshot timestamp value of - * the blob snapshot to list. - * @return A reference to this {@link ListBlobBlocksOptions} instance. - */ - public ListBlobBlocksOptions setSnapshot(String snapshot) { - this.snapshot = snapshot; - return this; - } - - /** - * Gets the flag value indicating whether to return the committed blocks of - * the blob set in this {@link ListBlobBlocksOptions} instance. - * - * @return A boolean flag value indicating whether to return - * the committed blocks of the blob. - */ - public boolean isCommittedList() { - return committedList; - } - - /** - * Sets a flag indicating whether to return the committed blocks of the blob - * in the response to the list blob blocks request. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobBlocksOptions} instance is passed as a parameter. - * - * @param committedList - * Set to true to return the committed blocks of the - * blob; otherwise, false. - * @return A reference to this {@link ListBlobBlocksOptions} instance. - */ - public ListBlobBlocksOptions setCommittedList(boolean committedList) { - this.committedList = committedList; - return this; - } - - /** - * Gets the flag value indicating whether to return the uncommitted blocks - * of the blob set in this {@link ListBlobBlocksOptions} instance. - * - * @return A boolean flag value indicating whether to return - * the uncommitted blocks of the blob. - */ - public boolean isUncommittedList() { - return uncommittedList; - } - - /** - * Sets a flag indicating whether to return the uncommitted blocks of the - * blob in the response to the list blob blocks request. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobBlocksOptions} instance is passed as a parameter. - * - * @param uncommittedList - * Set to true to return the uncommitted blocks of - * the blob; otherwise, false. - * @return A reference to this {@link ListBlobBlocksOptions} instance. - */ - public ListBlobBlocksOptions setUncommittedList(boolean uncommittedList) { - this.uncommittedList = uncommittedList; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksResult.java deleted file mode 100644 index 2c025b6cd2f2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksResult.java +++ /dev/null @@ -1,280 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.core.pipeline.Base64StringAdapter; - -/** - * A wrapper class for the response returned from a Blob Service REST API Get - * Block List operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobBlocks(String, String)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobBlocks(String, String, ListBlobBlocksOptions)}. - *

- * See the Get - * Block List documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -@XmlRootElement(name = "BlockList") -public class ListBlobBlocksResult { - private Date lastModified; - private String etag; - private String contentType; - private long contentLength; - private List committedBlocks = new ArrayList(); - private List uncommittedBlocks = new ArrayList(); - - /** - * Gets the last modified time of the block blob. This value is returned - * only if the blob has committed blocks. - *

- * Any operation that modifies the blob, including updates to the blob's - * metadata or properties, changes the last modified time of the blob. This - * value can be used in an access condition when updating or deleting a blob - * to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link java.util.Date} containing the last modified time of the - * blob. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the blob from - * the Last-Modified header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the blob. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - /** - * Gets the ETag of the blob. This value is returned only if the blob has - * committed blocks. - *

- * This value can be used in an access condition when updating or deleting a - * blob to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag of the blob from the - * ETag header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the MIME content type of the blob. This value defaults to - * application/xml. - * - * @return A {@link String} containing the MIME content type value for the - * blob. - */ - public String getContentType() { - return contentType; - } - - /** - * Reserved for internal use. Sets the MIME content type of the blob from - * the Content-Type header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param contentType - * A {@link String} containing the MIME content type value for - * the blob. - */ - public void setContentType(String contentType) { - this.contentType = contentType; - } - - /** - * Gets the size of the blob in bytes. For blobs with no committed blocks, - * this value is 0. - * - * @return The size of the blob in bytes. - */ - public long getContentLength() { - return contentLength; - } - - /** - * Reserved for internal use. Sets the content length of the blob from the - * x-ms-blob-content-length header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param contentLength - * The size of the blob in bytes. - */ - public void setContentLength(long contentLength) { - this.contentLength = contentLength; - } - - /** - * Gets a list of the committed blocks of the blob. This list may be empty - * if no blocks have been committed or if committed blocks were not - * specified in the request. - * - * @return A {@link List} of {@link Entry} instances representing the - * committed blocks of the blob. - */ - @XmlElementWrapper(name = "CommittedBlocks") - @XmlElement(name = "Block") - public List getCommittedBlocks() { - return committedBlocks; - } - - /** - * Reserved for internal use. Sets the list of the committed blocks of the - * blob from the Block elements in the - * CommittedBlocks element of the - * BlockList element in the response body returned by the - * server. - * - * @param committedBlocks - * A {@link List} of {@link Entry} instances representing the - * committed blocks of the blob. - */ - public void setCommittedBlocks(List committedBlocks) { - this.committedBlocks = committedBlocks; - } - - /** - * Gets a list of the uncommitted blocks of the blob. This list may be empty - * if no uncommitted blocks are associated with the blob, or if uncommitted - * blocks were not specified in the {@link ListBlobBlocksOptions options} - * parameter of the request. - * - * @return A {@link List} of {@link Entry} instances representing the - * uncommitted blocks of the blob. - */ - @XmlElementWrapper(name = "UncommittedBlocks") - @XmlElement(name = "Block") - public List getUncommittedBlocks() { - return uncommittedBlocks; - } - - /** - * Reserved for internal use. Sets the list of the uncommitted blocks of the - * blob from the Block elements in the - * UncommittedBlocks element of the - * BlockList element in the response body returned by the - * server. - * - * @param uncommittedBlocks - * A {@link List} of {@link Entry} instances representing the - * uncommitted blocks of the blob. - */ - public void setUncommittedBlocks(List uncommittedBlocks) { - this.uncommittedBlocks = uncommittedBlocks; - } - - /** - * The class for an entry in a list of blocks, representing a committed or - * uncommitted block. - */ - public static class Entry { - private String blockId; - private long blockLength; - - /** - * Gets the client-specified block ID for a block list entry. - * - * @return A {@link String} containing the client-specified block ID for - * a block. - */ - @XmlElement(name = "Name") - @XmlJavaTypeAdapter(Base64StringAdapter.class) - public String getBlockId() { - return blockId; - } - - /** - * Reserved for internal use. Sets the client-specified block ID for a - * block list entry from the Name element in the - * Block element in the list in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param blockId - * A {@link String} containing the client-specified block ID - * for the block. - */ - public void setBlockId(String blockId) { - this.blockId = blockId; - } - - /** - * Gets the length in bytes of a block list entry. - * - * @return The length of the block in bytes. - */ - @XmlElement(name = "Size") - public long getBlockLength() { - return blockLength; - } - - /** - * Reserved for internal use. Sets the length in bytes of a block list - * entry from the Size element in the - * Block element in the list in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param blockLength - * The length of the block in bytes. - */ - public void setBlockLength(long blockLength) { - this.blockLength = blockLength; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsOptions.java deleted file mode 100644 index b928d33abfd0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsOptions.java +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobRegions(String, String, ListBlobRegionsOptions) - * listBlobRegions} request. These options include an optional server timeout - * for the operation, the lease ID if the blob has an active lease, the snapshot - * timestamp to get the valid page ranges of a snapshot, the start offset and/or - * end offset to use to narrow the returned valid page range results, and any - * access conditions for the request. - */ -public class ListBlobRegionsOptions extends BlobServiceOptions { - private String leaseId; - private String snapshot; - private Long rangeStart; - private Long rangeEnd; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link ListBlobRegionsOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link ListBlobRegionsOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link ListBlobRegionsOptions} instance. - */ - @Override - public ListBlobRegionsOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link ListBlobRegionsOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets an optional lease ID value to match when getting the valid page - * ranges of the blob. If set, the lease must be active and the value must - * match the lease ID set on the leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobRegionsOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link ListBlobRegionsOptions} instance. - */ - public ListBlobRegionsOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the snapshot timestamp value set in this - * {@link ListBlobRegionsOptions} instance. - * - * @return A {@link String} containing the snapshot timestamp value of the - * blob snapshot to get valid page ranges for. - */ - public String getSnapshot() { - return snapshot; - } - - /** - * Sets an optional snapshot timestamp value used to identify the particular - * snapshot of the blob to get valid page ranges for. The snapshot timestamp - * value is an opaque value returned by the server to identify a snapshot. - * When this option is set, only the valid page ranges of the snapshot are - * returned. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobRegionsOptions} instance is passed as a parameter. - * - * @param snapshot - * A {@link String} containing the snapshot timestamp value of - * the blob snapshot to get valid page ranges for. - * @return A reference to this {@link ListBlobRegionsOptions} instance. - */ - public ListBlobRegionsOptions setSnapshot(String snapshot) { - this.snapshot = snapshot; - return this; - } - - /** - * Gets the beginning byte offset value of the valid page ranges to return - * set in this {@link ListBlobRegionsOptions} instance. - * - * @return The beginning offset value in bytes for the valid page ranges to - * return. - */ - public Long getRangeStart() { - return rangeStart; - } - - /** - * Sets an optional beginning byte offset value of the valid page ranges to - * return for the request, inclusive. - *

- * If the range end is not set, the response includes valid page ranges from - * the rangeStart value to the end of the blob. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobRegionsOptions} instance is passed as a parameter. - * - * @param rangeStart - * The beginning offset value in bytes for the valid page ranges - * to return, inclusive. - * @return A reference to this {@link ListBlobRegionsOptions} instance. - */ - public ListBlobRegionsOptions setRangeStart(Long rangeStart) { - this.rangeStart = rangeStart; - return this; - } - - /** - * Gets the ending byte offset value for the valid page ranges to return set - * in this {@link ListBlobRegionsOptions} instance. - * - * @return The ending offset value in bytes for the valid page ranges to - * return. - */ - public Long getRangeEnd() { - return rangeEnd; - } - - /** - * Sets an optional ending byte offset value of the valid page ranges to - * return for the request, inclusive. - *

- * If the range start is not set, this value is ignored and the response - * includes valid page ranges from the entire blob. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobRegionsOptions} instance is passed as a parameter. - * - * @param rangeEnd - * The ending offset value in bytes for the valid page ranges to - * return, inclusive. - * @return A reference to this {@link ListBlobRegionsOptions} instance. - */ - public ListBlobRegionsOptions setRangeEnd(Long rangeEnd) { - this.rangeEnd = rangeEnd; - return this; - } - - /** - * Gets the access conditions set in this {@link ListBlobRegionsOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets optional access conditions for getting the valid page ranges of the - * blob. The operation will return an error if the access conditions are not - * met. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobRegionsOptions} instance is passed as a parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link ListBlobRegionsOptions} instance. - */ - public ListBlobRegionsOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsResult.java deleted file mode 100644 index 8cd8a58cd860..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsResult.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; -import java.util.List; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * A wrapper class for the response returned from a Blob Service REST API Get - * Page Ranges operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobRegions(String, String, ListBlobRegionsOptions)}. - *

- * See the Get - * Page Ranges documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -@XmlRootElement(name = "PageList") -public class ListBlobRegionsResult { - private Date lastModified; - private String etag; - private long contentLength; - private List pageRanges; - - /** - * Gets the last modified time of the blob. - *

- * Any operation that modifies the blob, including updates to the blob's - * metadata or properties, changes the last modified time of the blob. This - * value can be used in an access condition when updating or deleting a blob - * to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link java.util.Date} containing the last modified time of the - * blob. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the blob from - * the Last-Modified header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the blob. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - /** - * Gets the ETag of the blob. - *

- * This value can be used in an access condition when updating or deleting a - * blob to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag of the blob from the - * ETag header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the size of the blob in bytes. - * - * @return The size of the blob in bytes. - */ - public long getContentLength() { - return contentLength; - } - - /** - * Reserved for internal use. Sets the content length of the blob from the - * x-ms-blob-content-length header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param contentLength - * The size of the blob in bytes. - */ - public void setContentLength(long contentLength) { - this.contentLength = contentLength; - } - - /** - * Gets the list of non-overlapping valid page ranges in the blob that match - * the parameters of the request, sorted by increasing address page range. - * - * @return A {@link List} of {@link PageRange} instances containing the - * valid page ranges for the blob. - */ - @XmlElement(name = "PageRange") - public List getPageRanges() { - return pageRanges; - } - - /** - * Reserved for internal use. Sets the list of valid page ranges in the blob - * that match the parameters of the request from the - * PageRange elements of the PageList - * element returned by the server in the response body. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param pageRanges - * A {@link List} of {@link PageRange} instances containing the - * valid page ranges for the blob. - */ - public void setPageRanges(List pageRanges) { - this.pageRanges = pageRanges; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsOptions.java deleted file mode 100644 index 19cfc8e1a0f0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsOptions.java +++ /dev/null @@ -1,316 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobs(String, ListBlobsOptions)} request. These - * options include a server response timeout for the request, a prefix for blobs - * to match, a marker to continue a list operation, a maximum number of results - * to return with one list operation, a delimiter for structuring virtual blob - * hierarchies, and whether to include blob metadata, blob snapshots, and - * uncommitted blobs in the results. - */ -public class ListBlobsOptions extends BlobServiceOptions { - private String prefix; - private String marker; - private int maxResults; - private String delimiter; - private boolean includeMetadata; - private boolean includeSnapshots; - private boolean includeUncommittedBlobs; - - /** - * Sets the optional server request timeout value associated with this - * {@link ListBlobsOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link ListBlobsOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link ListBlobsOptions} instance. - */ - @Override - public ListBlobsOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the prefix filter associated with this {@link ListBlobsOptions} - * instance. This value is used to return only blobs beginning with the - * prefix from the container in methods where this {@link ListBlobsOptions} - * instance is passed as a parameter. - * - * @return A {@link String} containing the prefix used to filter the blob - * names returned, if any. - */ - public String getPrefix() { - return prefix; - } - - /** - * Sets the optional blob name prefix filter value to use in a request. If - * this value is set, the server will return only blob names that match the - * prefix value in the response. - *

- * The prefix value only affects calls made on methods where this - * {@link ListBlobsOptions} instance is passed as a parameter. - * - * @param prefix - * A {@link String} containing a prefix to use to filter the blob - * names returned. - */ - public ListBlobsOptions setPrefix(String prefix) { - this.prefix = prefix; - return this; - } - - /** - * Gets the marker value set in this {@link ListBlobsOptions} instance. If - * this value is set, the server will return blob names beginning at the - * specified marker in the response. - * - * @return A {@link String} containing the marker value to use to specify - * the beginning of the request results, if any. - */ - public String getMarker() { - return marker; - } - - /** - * Sets the optional marker value to use in a request. If this value is set, - * the server will return blob names beginning at the specified marker in - * the response. Leave this value unset for an initial request. - *

- * The List Blobs operation returns a marker value in a - * NextMarker element if the blob list returned is not - * complete. The marker value may then be used in a subsequent call to - * request the next set of blob list items. The marker value is opaque to - * the client. - *

- * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method on a - * {@link ListBlobsResult} instance to get the marker value to set on a - * {@link ListBlobsOptions} instance using a call to this method. Pass the - * {@link ListBlobsOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobs(String, ListBlobsOptions)} call to get the - * next portion of the blob list. - *

- * The marker value only affects calls made on methods where this - * {@link ListBlobsOptions} instance is passed as a parameter. - * - * @param marker - * A {@link String} containing the marker value to use to specify - * the beginning of the request results. - * @return A reference to this {@link ListBlobsOptions} instance. - */ - public ListBlobsOptions setMarker(String marker) { - this.marker = marker; - return this; - } - - /** - * Gets the value of the maximum number of results to return set in this - * {@link ListBlobsOptions} instance. - * - * @return The maximum number of results to return. If the value is zero, - * the server will return up to 5,000 items. - */ - public int getMaxResults() { - return maxResults; - } - - /** - * Sets the optional maximum number of results to return for a request. If - * this value is set, the server will return up to this number of blob and - * blob prefix results in the response. If a value is not specified, or a - * value greater than 5,000 is specified, the server will return up to 5,000 - * items. - *

- * If there are more blobs and blob prefixes that can be returned than this - * maximum, the server returns a marker value in a - * NextMarker element in the response. The marker value may - * then be used in a subsequent call to request the next set of blob list - * items. The marker value is opaque to the client. - *

- * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method on a - * {@link ListBlobsResult} instance to get the marker value to set on a - * {@link ListBlobsOptions} instance using a call to - * {@link ListBlobsOptions#setMarker(String)}. Pass the - * {@link ListBlobsOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobs(String, ListBlobsOptions)} call to get the - * next portion of the blob list. - *

- * The maxResults value only affects calls made on methods where - * this {@link ListBlobsOptions} instance is passed as a parameter. - * - * @param maxResults - * The maximum number of results to return. - * @return A reference to this {@link ListBlobsOptions} instance. - */ - public ListBlobsOptions setMaxResults(int maxResults) { - this.maxResults = maxResults; - return this; - } - - /** - * Gets the value of the delimiter to use for grouping virtual blob - * hierarchy set in this {@link ListBlobsOptions} instance. - * - * @return A {@link String} containing the delimiter value, if any. - */ - public String getDelimiter() { - return delimiter; - } - - /** - * Sets the value of the optional delimiter to use for grouping in a virtual - * blob hierarchy. - *

- * When the request includes this optional parameter, the operation returns - * a blob prefix in a BlobPrefix element in the response - * that acts as a placeholder for all blobs whose names begin with the same - * substring up to the appearance of the delimiter character. The delimiter - * may be a single character or a string. - *

- * The delimiter parameter enables the caller to traverse the blob - * namespace by using a user-configured delimiter. In this way, you can - * traverse a virtual hierarchy of blobs as though it were a file system. - * The delimiter is a string that may be one or more characters long. When - * the request includes this parameter, the operation response includes one - * BlobPrefix element for each set of blobs whose names - * begin with a common substring up to the first appearance of the delimiter - * string that comes after any prefix specified for the request. The value - * of the BlobPrefix element is - * substring+delimiter, where substring is the - * common substring that begins one or more blob names, and - * delimiter is the value of the delimiter parameter. - *

- * The BlobPrefix elements in the response are accessed - * with the {@link ListBlobsResult#getBlobPrefixes()} method. You can use - * each value in the list returned to make a list blobs request for the - * blobs that begin with that blob prefix value, by specifying the value as - * the prefix option with a call to the - * {@link ListBlobsOptions#setPrefix(String) setPrefix} method on a - * {@link ListBlobsOptions} instance passed as a parameter to the request. - *

- * Note that each blob prefix returned in the response counts toward the - * maximum number of blob results, just as each blob does. - *

- * Note that if a delimiter is set, you cannot include snapshots. A request - * that includes both returns an InvalidQueryParameter error (HTTP status - * code 400 - Bad Request), which causes a {@link com.microsoft.windowsazure.exception.ServiceException} to be - * thrown. - *

- * The delimiter value only affects calls made on methods where - * this {@link ListBlobsOptions} instance is passed as a parameter. - * - * @param delimiter - * A {@link String} containing the delimiter value to use for - * grouping virtual blob hierarchy. - * @return A reference to this {@link ListBlobsOptions} instance. - */ - public ListBlobsOptions setDelimiter(String delimiter) { - this.delimiter = delimiter; - return this; - } - - /** - * Gets the value of a flag indicating whether to include blob metadata with - * a response set in this {@link ListBlobsOptions} instance. - * - * @return A value of true to include blob metadata with a - * response, otherwise, false. - */ - public boolean isIncludeMetadata() { - return includeMetadata; - } - - /** - * Sets the value of an optional flag indicating whether to include blob - * metadata with a response. - * - * @param includeMetadata - * Set a value of true to include blob metadata with - * a response, otherwise, false. - * @return A reference to this {@link ListBlobsOptions} instance. - */ - public ListBlobsOptions setIncludeMetadata(boolean includeMetadata) { - this.includeMetadata = includeMetadata; - return this; - } - - /** - * Gets the value of a flag indicating whether to include blob snapshots - * with a response set in this {@link ListBlobsOptions} instance. - * - * @return A value of true to include blob metadata with a - * response, otherwise, false. - */ - public boolean isIncludeSnapshots() { - return includeSnapshots; - } - - /** - * Sets the value of an optional flag indicating whether to include blob - * snapshots with a response. - *

- * Note that if this flag is set, you cannot set a delimiter. A request that - * includes both returns an InvalidQueryParameter error (HTTP status code - * 400 - Bad Request), which causes a {@link com.microsoft.windowsazure.exception.ServiceException} to be thrown. - * - * @param includeSnapshots - * Set a value of true to include blob metadata with - * a response, otherwise, false. - * @return A reference to this {@link ListBlobsOptions} instance. - */ - public ListBlobsOptions setIncludeSnapshots(boolean includeSnapshots) { - this.includeSnapshots = includeSnapshots; - return this; - } - - /** - * Gets the value of a flag indicating whether to include uncommitted blobs - * with a response set in this {@link ListBlobsOptions} instance. - * - * @return A value of true to include uncommitted blobs with a - * response, otherwise, false. - */ - public boolean isIncludeUncommittedBlobs() { - return includeUncommittedBlobs; - } - - /** - * Sets the value of an optional flag indicating whether to include - * uncommitted blobs with a response. Uncommitted blobs are blobs for which - * blocks have been uploaded, but which have not been committed with a - * request to - * {@link com.microsoft.windowsazure.services.blob.BlobContract#commitBlobBlocks(String, String, BlockList)} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#commitBlobBlocks(String, String, BlockList, CommitBlobBlocksOptions)} - * . - * - * @param includeUncommittedBlobs - * Set a value of true to include uncommitted blobs - * with a response, otherwise, false. - * @return A reference to this {@link ListBlobsOptions} instance. - */ - public ListBlobsOptions setIncludeUncommittedBlobs( - boolean includeUncommittedBlobs) { - this.includeUncommittedBlobs = includeUncommittedBlobs; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsResult.java deleted file mode 100644 index 0a967a92b342..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsResult.java +++ /dev/null @@ -1,590 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.services.blob.implementation.MetadataAdapter; - -/** - * A wrapper class for the response returned from a Blob Service REST API List - * Blobs operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobs(String)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobs(String, ListBlobsOptions)}. - *

- * See the List Blobs documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -@XmlRootElement(name = "EnumerationResults") -public class ListBlobsResult { - private List blobPrefixes = new ArrayList(); - private List blobs = new ArrayList(); - private String containerName; - private String prefix; - private String marker; - private String nextMarker; - private String delimiter; - private int maxResults; - - /** - * Gets the list of ListBlobsEntry entries generated from the - * server response to the list blobs request. - * - * @return The {@link List} of {@link ListBlobsEntry} entries generated from - * the server response to the list blobs request. - */ - @XmlElementWrapper(name = "Blobs") - @XmlElementRefs({ - @XmlElementRef(name = "BlobPrefix", type = BlobPrefixEntry.class), - @XmlElementRef(name = "Blob", type = BlobEntry.class) }) - public List getEntries() { - ArrayList result = new ArrayList(); - result.addAll(this.blobPrefixes); - result.addAll(this.blobs); - return result; - } - - /** - * Sets the lists of blob entries and blob prefix entries from a common list - * of ListBlobsEntry entries generated from the server response - * to the list blobs request. - * - * @param entries - * The {@link List} of {@link ListBlobsEntry} entries to set the - * lists of blob entries and blob prefix entries from. - */ - public void setEntries(List entries) { - // Split collection into "blobs" and "blobPrefixes" collections - this.blobPrefixes = new ArrayList(); - this.blobs = new ArrayList(); - - for (ListBlobsEntry entry : entries) { - if (entry instanceof BlobPrefixEntry) { - this.blobPrefixes.add((BlobPrefixEntry) entry); - } else if (entry instanceof BlobEntry) { - this.blobs.add((BlobEntry) entry); - } - } - } - - /** - * Gets the list of blob prefix entries that satisfied the request. Each - * BlobPrefixEntry represents one or more blobs that have a - * common substring up to the delimiter specified in the request options. - *

- * This list may contain only a portion of the blob prefix entries that - * satisfy the request, limited by a server timeout or a maximum results - * parameter. If there are more blob entries and blob prefix entries that - * could satisfy the result, the server returns a - * NextMarker element with the response. - *

- * The delimiter option enables the caller to traverse the blob namespace by - * using a user-configured delimiter. In this way, you can traverse a - * virtual hierarchy of blobs as though it were a file system. The delimiter - * may be a single character or a string. When the request includes the - * delimiter option, the response includes a BlobPrefixEntry in - * place of all blobs whose names begin with the same substring up to the - * appearance of the delimiter string. The value of - * {@link BlobPrefixEntry#getName()} is substring+ - * delimiter , where substring is the common substring - * that begins one or more blob names, and delimiter is the value - * of the delimiter option. - *

- * To move down a level in the virtual hierarchy, you can use the - * {@link BlobPrefixEntry#getName()} method to get the prefix value to use - * to make a subsequent call to list blobs that begin with this prefix. - *

- * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method to - * get this value and pass it as a marker option to a subsequent list blobs - * request to get the next set of blob results. - *

- * Blobs are listed in alphabetical order in the response body, with - * upper-case letters listed first. - * - * @return A {@link List} of {@link BlobEntry} instances for the blobs that - * satisfied the request. - */ - public List getBlobPrefixes() { - return this.blobPrefixes; - } - - /** - * Gets the list of blobs that satisfied the request from the response. This - * list may contain only a portion of the blobs that satisfy the request, - * limited by a server timeout or a maximum results parameter. If there are - * more blobs or blob prefixes that could satisfy the result, the server - * returns a NextMarker element with the response. - *

- * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method to - * get this value and pass it as a marker option to a subsequent list blobs - * request to get the next set of blob results. - *

- * Blobs are listed in alphabetical order in the response body, with - * upper-case letters listed first. - * - * @return A {@link List} of {@link BlobEntry} instances for the blobs that - * satisfied the request. - */ - public List getBlobs() { - return this.blobs; - } - - /** - * Gets the value of the filter used to return only blobs beginning with the - * prefix. This value is not set if a prefix was not specified in the list - * blobs request. - * - * @return A {@link String} containing the prefix used to filter the blob - * names returned, if any. - */ - @XmlElement(name = "Prefix") - public String getPrefix() { - return prefix; - } - - /** - * Reserved for internal use. Sets the filter used to return only blobs - * beginning with the prefix from the Prefix element - * returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param prefix - * A {@link String} containing the prefix used to filter the blob - * names returned, if any. - */ - public void setPrefix(String prefix) { - this.prefix = prefix; - } - - /** - * Gets the value of the marker that was used to specify the beginning of - * the container list to return with the request. This value is not set if a - * marker was not specified in the request. - *

- * The list blobs operation returns a marker value in a - * NextMarker element if the blob list returned is not - * complete. The marker value may then be used in a subsequent call to - * request the next set of blob list items. The marker value is opaque to - * the client. - *

- * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method to - * get the marker value to set on a {@link ListBlobsOptions} instance using - * a call to {@link ListBlobsOptions#setMarker(String)}. Pass the - * {@link ListBlobsOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobs(String, ListBlobsOptions) listBlobs} call - * to get the next portion of the blob list. - * - * @return A {@link String} containing the marker used to specify the - * beginning of the blob list returned, if any. - */ - @XmlElement(name = "Marker") - public String getMarker() { - return marker; - } - - /** - * Reserved for internal use. Sets the marker used to specify the beginning - * of the blob list to return from the Marker element - * returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param marker - * A {@link String} containing the marker used to specify the - * beginning of the blob list returned. - */ - public void setMarker(String marker) { - this.marker = marker; - } - - /** - * Gets the next marker value needed to specify the beginning of the next - * portion of the blob list to return, if any was set in the response from - * the server. - *

- * The list blobs operation returns a marker value in a - * NextMarker element if the blob list returned is not - * complete. The marker value may then be used in a subsequent call to - * request the next set of blob list items. The marker value is opaque to - * the client. - *

- * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method to - * get the marker value to set on a {@link ListBlobsOptions} instance using - * a call to {@link ListBlobsOptions#setMarker(String)}. Pass the - * {@link ListBlobsOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobs(String, ListBlobsOptions) listBlobs} call - * to get the next portion of the blob list. - * - * @return A {@link String} containing the next marker value needed to - * specify the beginning of the next portion of the blob list to - * return, if any was set in the response from the server. - */ - @XmlElement(name = "NextMarker") - public String getNextMarker() { - return nextMarker; - } - - /** - * Reserved for internal use. Sets the next marker value needed to specify - * the beginning of the next portion of the blob list to return from the - * NextMarker element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param nextMarker - * A {@link String} containing the next marker value needed to - * specify the beginning of the next portion of the blob list to - * return. - */ - public void setNextMarker(String nextMarker) { - this.nextMarker = nextMarker; - } - - /** - * Gets the maximum results to return used to generate the response, if - * present. The number of entries returned in the response will not exceed - * this number, including all BlobPrefix elements. This - * value is not set if a maximum number was not specified in the request. If - * the request does not specify this parameter or specifies a value greater - * than 5,000, the server will return up to 5,000 items. If there are more - * blobs or blob prefixes that satisfy the request than this maximum value, - * the server will include a next marker value in the response, which can be - * used to get the remaining blobs with a subsequent request. - *

- * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method to - * get the marker value to set on a {@link ListBlobsOptions} instance using - * a call to {@link ListBlobsOptions#setMarker(String)}. Pass the - * {@link ListBlobsOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobs(String, ListBlobsOptions) listBlobs} call - * to get the next portion of the blob list. - * - * @return The maximum results to return value in the response, if any. - */ - @XmlElement(name = "MaxResults") - public int getMaxResults() { - return maxResults; - } - - /** - * Reserved for internal use. Sets the maximum results to return value from - * the MaxResults element of the - * EnumerationResults element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param maxResults - * The maximum results to return value in the response, if any. - */ - public void setMaxResults(int maxResults) { - this.maxResults = maxResults; - } - - /** - * Gets the delimiter value used to generate the response, if present. When - * the request includes this parameter, the operation returns - * BlobPrefix elements in the response body that act as a - * placeholder for all blobs whose names begin with the same substring up to - * the appearance of the delimiter character. - * - * @return A {@link String} containing the delimiter value used as a request - * parameter. - */ - @XmlElement(name = "Delimiter") - public String getDelimiter() { - return delimiter; - } - - /** - * Reserved for internal use. Sets the delimiter value from the - * Delimiter element of the - * EnumerationResults element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param delimiter - * A {@link String} containing the delimiter value in the - * response, if any. - */ - public void setDelimiter(String delimiter) { - this.delimiter = delimiter; - } - - /** - * Gets the container URI. This value is returned in the - * ContainerName attribute of the - * EnumerationResults element returned in the response. - * - * @return A {@link String} containing the container URI. - */ - @XmlAttribute(name = "ContainerName") - public String getContainerName() { - return containerName; - } - - /** - * Reserved for internal use. Sets the container URI value from the - * ContainerName attribute of the - * EnumerationResults element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param containerName - * A {@link String} containing the container URI. - */ - public void setContainerName(String containerName) { - this.containerName = containerName; - } - - /** - * The abstract base class for Blob and BlobPrefix - * entries in the list of results returned in the response. - */ - public abstract static class ListBlobsEntry { - - } - - /** - * Represents a BlobPrefix element returned in the - * response. When the request includes a delimiter parameter, a single - * BlobPrefix element is returned in place of all blobs - * whose names begin with the same substring up to the appearance of the - * delimiter character. - */ - @XmlRootElement(name = "BlobPrefix") - public static class BlobPrefixEntry extends ListBlobsEntry { - private String name; - - /** - * Gets the value of the Name element within a - * BlobPrefix element returned in the response. The - * value of the element is substring+delimiter, where - * substring is the common substring that begins one or more - * blob names, and delimiter is the value of the delimiter - * parameter. - * - * @return A {@link String} containing the common substring that begins - * one or more blob names up to and including the delimiter - * specified in the request. - */ - @XmlElement(name = "Name") - public String getName() { - return name; - } - - /** - * Reserved for internal use. Sets the blob prefix name from the - * Name element in the BlobPrefix - * element in the Blobs list in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param name - * A {@link String} containing the value of the - * Name element within a - * BlobPrefix element. - */ - public void setName(String name) { - this.name = name; - } - } - - /** - * Represents a Blob element returned in the response. A - * BlobEntry includes committed blobs, and can optionally - * include blob metadata, blob snapshots, and uncommitted blobs, depending - * on the request options set. - */ - @XmlRootElement(name = "Blob") - public static class BlobEntry extends ListBlobsEntry { - private String name; - private String url; - private String snapshot; - private HashMap metadata = new HashMap(); - private BlobProperties properties; - - /** - * Gets the value of the Name element within a - * Blob element returned in the response. The value of - * the element is the complete name of the blob, including any virtual - * hierarchy. - * - * @return A {@link String} containing the complete blob name. - */ - @XmlElement(name = "Name") - public String getName() { - return name; - } - - /** - * Reserved for internal use. Sets the blob name from the - * Name element in the Blob element in - * the Blobs list in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param name - * A {@link String} containing the value of the - * Name element within a - * Blob element. - */ - public void setName(String name) { - this.name = name; - } - - /** - * Gets the value of the Url element within a - * Blob element returned in the response. The value of - * the element is the complete URI address of the blob, including any - * virtual hierarchy. - * - * @return A {@link String} containing the complete URI address of the - * blob. - */ - @XmlElement(name = "Url") - public String getUrl() { - return url; - } - - /** - * Reserved for internal use. Sets the blob URI address from the - * Uri element in the Blob element in - * the Blobs list in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param url - * A {@link String} containing the complete URI address of - * the blob. - */ - public void setUrl(String url) { - this.url = url; - } - - /** - * Gets a {@link BlobProperties} instance with the blob properties - * returned in the response. - * - * @return A {@link BlobProperties} instance with the blob properties - * returned in the response. - */ - @XmlElement(name = "Properties") - public BlobProperties getProperties() { - return properties; - } - - /** - * Reserved for internal use. Sets the blob properties from the - * Uri element in the Blob element in - * the Blobs list in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param properties - * A {@link BlobProperties} instance with the blob properties - * returned in the response. - */ - public void setProperties(BlobProperties properties) { - this.properties = properties; - } - - /** - * Gets the snapshot timestamp value for a blob snapshot returned in the - * response. The value is set from the Snapshot element - * in the Blob element in the Blobs - * list in the response. Snapshots are included in the enumeration only - * if specified in the request options. Snapshots are listed from oldest - * to newest in the response. - * - * @return A {@link String} containing the snapshot timestamp of the - * blob snapshot. - */ - @XmlElement(name = "Snapshot") - public String getSnapshot() { - return snapshot; - } - - /** - * Reserved for internal use. Sets the blob snapshot timestamp from the - * Snapshot element in the Blob - * element in the Blobs list in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param snapshot - * A {@link String} containing the snapshot timestamp of the - * blob snapshot. - */ - public void setSnapshot(String snapshot) { - this.snapshot = snapshot; - } - - /** - * Gets the blob's metadata collection set in the - * Metadata element in the Blob - * element in the Blobs list in the response. Metadata - * is included in the enumeration only if specified in the request - * options. - * - * @return A {@link HashMap} of name-value pairs of {@link String} - * containing the blob metadata set, if any. - */ - @XmlElement(name = "Metadata") - @XmlJavaTypeAdapter(MetadataAdapter.class) - public HashMap getMetadata() { - return metadata; - } - - /** - * Reserved for internal use. Sets the blob metadata from the - * Metadata element in the Blob - * element in the Blobs list in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param metadata - * A {@link java.util.HashMap} of name-value pairs of - * {@link String} containing the names and values of the blob - * metadata, if present. - */ - public void setMetadata(HashMap metadata) { - this.metadata = metadata; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersOptions.java deleted file mode 100644 index 624ed9882883..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersOptions.java +++ /dev/null @@ -1,191 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listContainers(ListContainersOptions) listContainers} - * request. These options include a server response timeout for the request, a - * container name prefix filter, a marker for continuing requests, the maximum - * number of results to return in a request, and whether to include container - * metadata in the results. Options that are not set will not be passed to the - * server with a request. - */ -public class ListContainersOptions extends BlobServiceOptions { - private String prefix; - private String marker; - private int maxResults; - private boolean includeMetadata; - - /** - * Sets the optional server request timeout value associated with this - * {@link ListContainersOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link ListContainersOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link ListContainersOptions} instance. - */ - @Override - public ListContainersOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the container name prefix filter value set in this - * {@link ListContainersOptions} instance. - * - * @return A {@link String} containing the container name prefix value, if - * any. - */ - public String getPrefix() { - return prefix; - } - - /** - * Sets the optional container name prefix filter value to use in a request. - * If this value is set, the server will return only container names that - * match the prefix value in the response. - *

- * The prefix value only affects calls made on methods where this - * {@link ListContainersOptions} instance is passed as a parameter. - * - * @param prefix - * A {@link String} containing the container name prefix value to - * use to filter the request results. - * @return A reference to this {@link ListContainersOptions} instance. - */ - public ListContainersOptions setPrefix(String prefix) { - this.prefix = prefix; - return this; - } - - /** - * Gets the marker value set in this {@link ListContainersOptions} instance. - * - * @return A {@link String} containing the marker value to use to specify - * the beginning of the request results. - */ - public String getMarker() { - return marker; - } - - /** - * Sets the optional marker value to use in a request. If this value is set, - * the server will return container names beginning at the specified marker - * in the response. - *

- * The List Containers operation returns a marker value in a - * NextMarker element if the container list returned is not - * complete. The marker value may then be used in a subsequent call to - * request the next set of container list items. The marker value is opaque - * to the client. - *

- * Use the {@link ListContainersResult#getNextMarker() getNextMarker} method - * on a {@link ListContainersResult} instance to get the marker value to set - * on a {@link ListContainersOptions} instance using a call to this method. - * Pass the {@link ListContainersOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listContainers(ListContainersOptions)} call to get - * the next portion of the container list. - *

- * The marker value only affects calls made on methods where this - * {@link ListContainersOptions} instance is passed as a parameter. - * - * @param marker - * A {@link String} containing the marker value to use to specify - * the beginning of the request results. - * @return A reference to this {@link ListContainersOptions} instance. - */ - public ListContainersOptions setMarker(String marker) { - this.marker = marker; - return this; - } - - /** - * Gets the value of the maximum number of results to return set in this - * {@link ListContainersOptions} instance. - * - * @return The maximum number of results to return. - */ - public int getMaxResults() { - return maxResults; - } - - /** - * Sets the optional maximum number of results to return for a request. If - * this value is set, the server will return up to this number of results in - * the response. If a value is not specified, or a value greater than 5,000 - * is specified, the server will return up to 5,000 items. - *

- * If there are more containers than this value that can be returned, the - * server returns a marker value in a NextMarker element in - * the response. The marker value may then be used in a subsequent call to - * request the next set of container list items. The marker value is opaque - * to the client. - *

- * Use the {@link ListContainersResult#getNextMarker() getNextMarker} method - * on a {@link ListContainersResult} instance to get the marker value to set - * on a {@link ListContainersOptions} instance using a call to - * {@link ListContainersOptions#setMarker(String)}. Pass the - * {@link ListContainersOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listContainers(ListContainersOptions)} call to get - * the next portion of the container list. - *

- * The maxResults value only affects calls made on methods where - * this {@link ListContainersOptions} instance is passed as a parameter. - * - * @param maxResults - * The maximum number of results to return. - * @return A reference to this {@link ListContainersOptions} instance. - */ - public ListContainersOptions setMaxResults(int maxResults) { - this.maxResults = maxResults; - return this; - } - - /** - * Gets the value of a flag set in this {@link ListContainersOptions} - * instance indicating whether to include container metadata in the response - * to the request. - * - * @return true to include container metadata in the response - * to the request. - */ - public boolean isIncludeMetadata() { - return includeMetadata; - } - - /** - * Sets the value of an optional flag indicating whether to include - * container metadata with the response to the request. - *

- * The includeMetadata value only affects calls made on methods - * where this {@link ListContainersOptions} instance is passed as a - * parameter. - * - * @param includeMetadata - * Set to true to include container metadata in the - * response to the request. - * @return A reference to this {@link ListContainersOptions} instance. - */ - public ListContainersOptions setIncludeMetadata(boolean includeMetadata) { - this.includeMetadata = includeMetadata; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersResult.java deleted file mode 100644 index 17421846bb3e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersResult.java +++ /dev/null @@ -1,449 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; -import java.util.HashMap; -import java.util.List; - -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.core.RFC1123DateAdapter; -import com.microsoft.windowsazure.services.blob.implementation.MetadataAdapter; - -/** - * A wrapper class for the response returned from a Blob Service REST API List - * Containers operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listContainers} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listContainers(ListContainersOptions)}. - *

- * See the List Containers documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -@XmlRootElement(name = "EnumerationResults") -public class ListContainersResult { - private List containers; - private String accountName; - private String prefix; - private String marker; - private String nextMarker; - private int maxResults; - - /** - * Gets the container list returned in the response. - * - * @return A {@link List} of {@link Container} instances representing the - * blob containers returned by the request. - */ - @XmlElementWrapper(name = "Containers") - @XmlElement(name = "Container") - public List getContainers() { - return containers; - } - - /** - * Reserved for internal use. Sets the container list from the - * Containers element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param value - * A {@link List} of {@link Container} instances representing the - * blob containers returned by the request. - */ - public void setContainers(List value) { - this.containers = value; - } - - /** - * Gets the base URI for invoking Blob Service REST API operations on the - * storage account. - * - * @return A {@link String} containing the base URI for Blob Service REST - * API operations on the storage account. - */ - @XmlAttribute(name = "AccountName") - public String getAccountName() { - return accountName; - } - - /** - * Reserved for internal use. Sets the base URI for invoking Blob Service - * REST API operations on the storage account from the value of the - * AccountName attribute of the - * EnumerationResults element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param accountName - * A {@link String} containing the base URI for Blob Service REST - * API operations on the storage account. - */ - public void setAccountName(String accountName) { - this.accountName = accountName; - } - - /** - * Gets the value of the filter used to return only containers beginning - * with the prefix. This value is not set if a prefix was not specified in - * the list containers request. - * - * @return A {@link String} containing the prefix used to filter the - * container names returned, if any. - */ - @XmlElement(name = "Prefix") - public String getPrefix() { - return prefix; - } - - /** - * Reserved for internal use. Sets the filter used to return only containers - * beginning with the prefix from the Prefix element - * returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param prefix - * A {@link String} containing the prefix used to filter the - * container names returned, if any. - */ - public void setPrefix(String prefix) { - this.prefix = prefix; - } - - /** - * Gets the value of the marker that was used to specify the beginning of - * the container list to return with the request. This value is not set if a - * marker was not specified in the request. - *

- * The List Containers operation returns a marker value in a - * NextMarker element if the container list returned is not - * complete. The marker value may then be used in a subsequent call to - * request the next set of container list items. The marker value is opaque - * to the client. - *

- * Use the {@link ListContainersResult#getNextMarker() getNextMarker} method - * to get the marker value to set on a {@link ListContainersOptions} - * instance using a call to {@link ListContainersOptions#setMarker(String)}. - * Pass the {@link ListContainersOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listContainers(ListContainersOptions)} call to get - * the next portion of the container list. - * - * @return A {@link String} containing the marker used to specify the - * beginning of the container list returned, if any. - */ - @XmlElement(name = "Marker") - public String getMarker() { - return marker; - } - - /** - * Reserved for internal use. Sets the marker used to specify the beginning - * of the container list to return from the Marker element - * returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param marker - * A {@link String} containing the marker used to specify the - * beginning of the container list returned. - */ - public void setMarker(String marker) { - this.marker = marker; - } - - /** - * Gets the next marker value needed to specify the beginning of the next - * portion of the container list to return, if any was set in the response - * from the server. - *

- * The List Containers operation returns a marker value in a - * NextMarker element if the container list returned is not - * complete. The marker value may then be used in a subsequent call to - * request the next set of container list items. The marker value is opaque - * to the client. - *

- * Use the {@link ListContainersResult#getNextMarker() getNextMarker} method - * to get the marker value to set on a {@link ListContainersOptions} - * instance using a call to {@link ListContainersOptions#setMarker(String)}. - * Pass the {@link ListContainersOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listContainers(ListContainersOptions)} call to get - * the next portion of the container list. - * - * @return A {@link String} containing the next marker value needed to - * specify the beginning of the next portion of the container list - * to return, if any was set in the response from the server. - */ - @XmlElement(name = "NextMarker") - public String getNextMarker() { - return nextMarker; - } - - /** - * Reserved for internal use. Sets the next marker value needed to specify - * the beginning of the next portion of the container list to return from - * the NextMarker element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param nextMarker - * A {@link String} containing the next marker value needed to - * specify the beginning of the next portion of the container - * list to return. - */ - public void setNextMarker(String nextMarker) { - this.nextMarker = nextMarker; - } - - /** - * Gets the maximum number of container list items to return that was - * specified in the request. The number of containers returned in a single - * response will not exceed this value. This value is not set if a maximum - * number was not specified in the request. If there are more containers - * that satisfy the request than this maximum value, the server will include - * a next marker value in the response, which can be used to get the - * remaining containers with a subsequent request. - *

- * Use the {@link ListContainersResult#getNextMarker() getNextMarker} method - * to get the marker value to set on a {@link ListContainersOptions} - * instance using a call to {@link ListContainersOptions#setMarker(String)}. - * Pass the {@link ListContainersOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listContainers(ListContainersOptions)} call to get - * the next portion of the container list. - * - * @return The maximum number of container list items to return that was - * specified in the request, if any. - */ - @XmlElement(name = "MaxResults") - public int getMaxResults() { - return maxResults; - } - - /** - * Reserved for internal use. Sets the maximum number of container list - * items to return that was specified in the request from the - * MaxResults element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param maxResults - * The maximum number of container list items to return that was - * specified in the request, if any. - */ - public void setMaxResults(int maxResults) { - this.maxResults = maxResults; - } - - /** - * Represents a container for blob storage returned by the server. A - * {@link Container} instance contains a copy of the container properties - * and metadata in the storage service as of the time the container list was - * requested. - */ - public static class Container { - private String name; - private String url; - private HashMap metadata = new HashMap(); - private ContainerProperties properties; - - /** - * Gets the name of the container. - * - * @return A {@link String} containing the name of the container. - */ - @XmlElement(name = "Name") - public String getName() { - return name; - } - - /** - * Reserved for internal use. Sets the name of the container from the - * Name element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param name - * A {@link String} containing the name of the container. - */ - public void setName(String name) { - this.name = name; - } - - /** - * Gets the URI of the container. - * - * @return A {@link String} containing the URI of the container. - */ - @XmlElement(name = "Url") - public String getUrl() { - return url; - } - - /** - * Reserved for internal use. Sets the URI of the container from the - * Url element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param url - * A {@link String} containing the URI of the container. - */ - public void setUrl(String url) { - this.url = url; - } - - /** - * Gets the container properties. The container properties include the - * last modified time and an ETag value. - * - * @return A {@link ContainerProperties} instance containing the - * properties associated with the container. - */ - @XmlElement(name = "Properties") - public ContainerProperties getProperties() { - return properties; - } - - /** - * Reserved for internal use. Sets the container properties from the - * Properties element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param properties - * A {@link ContainerProperties} instance containing the - * properties associated with the container. - */ - public void setProperties(ContainerProperties properties) { - this.properties = properties; - } - - /** - * Gets the container metadata as a map of name and value pairs. The - * container metadata is for client use and is opaque to the server. - * - * @return A {@link java.util.HashMap} of key-value pairs of - * {@link String} containing the names and values of the - * container metadata. - */ - @XmlElement(name = "Metadata") - @XmlJavaTypeAdapter(MetadataAdapter.class) - public HashMap getMetadata() { - return metadata; - } - - /** - * Reserved for internal use. Sets the container metadata from the - * Metadata element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param metadata - * A {@link java.util.HashMap} of key-value pairs of - * {@link String} containing the names and values of the - * container metadata. - */ - public void setMetadata(HashMap metadata) { - this.metadata = metadata; - } - } - - /** - * Represents the properties of a container for blob storage returned by the - * server. A {@link ContainerProperties} instance contains a copy of the - * container properties in the storage service as of the time the container - * list was requested. - */ - public static class ContainerProperties { - private Date lastModified; - private String etag; - - /** - * Gets the last modifed time of the container. This value can be used - * when updating or deleting a container using an optimistic concurrency - * model to prevent the client from modifying data that has been changed - * by another client. - * - * @return A {@link java.util.Date} containing the last modified time of - * the container. - */ - @XmlElement(name = "Last-Modified") - @XmlJavaTypeAdapter(RFC1123DateAdapter.class) - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the - * container from the Last-Modified element returned in - * the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time - * of the container. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - /** - * Gets the ETag of the container. This value can be used when updating - * or deleting a container using an optimistic concurrency model to - * prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link String} containing the server-assigned ETag value - * for the container. - */ - @XmlElement(name = "Etag") - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag of the container from the - * ETag element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value - * for the container. - */ - public void setEtag(String etag) { - this.etag = etag; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/PageRange.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/PageRange.java deleted file mode 100644 index 044b44cffb29..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/PageRange.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import javax.xml.bind.annotation.XmlElement; - -/** - * Represents the range of bytes in a single page within a page blob. - *

- * For a page update operation, the page range can be up to 4 MB in size. For a - * page clear operation, the page range can be up to the value of the blob's - * full size. - *

- * Pages are aligned with 512-byte boundaries. When specifying a page range, the - * start offset must be a modulus of 512 and the end offset must be a modulus of - * 512 - 1. Examples of valid byte ranges are 0-511, 512-1023, etc. - */ -public class PageRange { - private long start; - private long end; - - /** - * Default constructor. The start and end values must be set for this - * {@link PageRange} instance to be valid. - */ - public PageRange() { - } - - /** - * Creates a page range from the specified start and end byte offsets, - * inclusive. - *

- * Pages are aligned with 512-byte boundaries. When specifying a page range, - * the start offset must be a modulus of 512 and the end offset must be a - * modulus of 512 - 1. Examples of valid byte ranges are 0-511, 512-1023, - * etc. - * - * @param start - * The beginning offset value in bytes for the page range, - * inclusive. - * @param end - * The ending offset value in bytes for the page range, - * inclusive. - */ - public PageRange(long start, long end) { - this.start = start; - this.end = end; - } - - /** - * Gets the byte offset of the start of the page range within the blob, - * inclusive. - * - * @return The beginning offset value in bytes for the page range, - * inclusive. - */ - @XmlElement(name = "Start") - public long getStart() { - return start; - } - - /** - * Sets the byte offset of the start of the page range within the blob, - * inclusive. - *

- * Pages are aligned with 512-byte boundaries. When specifying a page range, - * the start offset must be a modulus of 512 and the end offset must be a - * modulus of 512 - 1. Examples of valid byte ranges are 0-511, 512-1023, - * etc. - * - * @param start - * The beginning offset value in bytes for the page range, - * inclusive. - * @return A reference to this {@link PageRange} instance. - */ - public PageRange setStart(long start) { - this.start = start; - return this; - } - - /** - * Gets the byte offset of the end of the page range within the blob, - * inclusive. - * - * @return The ending offset value in bytes for the page range, inclusive. - */ - @XmlElement(name = "End") - public long getEnd() { - return end; - } - - /** - * Sets the byte offset of the end of the page range within the blob, - * inclusive. - *

- * Pages are aligned with 512-byte boundaries. When specifying a page range, - * the start offset must be a modulus of 512 and the end offset must be a - * modulus of 512 - 1. Examples of valid byte ranges are 0-511, 512-1023, - * etc. - * - * @param end - * The ending offset value in bytes for the page range, - * inclusive. - * @return A reference to this {@link PageRange} instance. - */ - public PageRange setEnd(long end) { - this.end = end; - return this; - } - - /** - * Gets the size of the page range in bytes. - * - * @return The size of the page range in bytes. - */ - public long getLength() { - return end - start + 1; - } - - /** - * Sets the length of the page range in bytes. This updates the byte offset - * of the end of the page range to the start value plus the length specified - * by the value parameter. The length must be a positive multiple - * of 512 bytes. - *

- * Pages are aligned with 512-byte boundaries. When specifying a page range, - * the start offset must be a modulus of 512 and the end offset must be a - * modulus of 512 - 1. Examples of valid byte ranges are 0-511, 512-1023, - * etc. - * - * @param value - * The ending offset value in bytes for the page range, - * inclusive. - * @return A reference to this {@link PageRange} instance. - */ - public PageRange setLength(long value) { - this.end = this.start + value - 1; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ServiceProperties.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ServiceProperties.java deleted file mode 100644 index 778e5051ae6f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ServiceProperties.java +++ /dev/null @@ -1,419 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * Represents the Blob service properties that can be set on a storage account, - * including Windows Azure Storage Analytics. This class is used by the - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getServiceProperties()} method to return the service - * property values set on the storage account, and by the - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setServiceProperties(ServiceProperties)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setServiceProperties(ServiceProperties, BlobServiceOptions)} - * methods to set the values of the service properties. - */ -@XmlRootElement(name = "StorageServiceProperties") -public class ServiceProperties { - private Logging logging = new Logging(); - private Metrics metrics = new Metrics(); - private String defaultServiceVersion; - - /** - * Gets the value of the logging options on the storage account. - * - * @return A {@link Logging} instance containing the logging options. - */ - @XmlElement(name = "Logging") - public Logging getLogging() { - return logging; - } - - /** - * Sets the value of the logging options on the storage account. - * - * @param logging - * A {@link Logging} instance containing the logging options. - * @return A reference to this {@link ServiceProperties} instance. - */ - public ServiceProperties setLogging(Logging logging) { - this.logging = logging; - return this; - } - - /** - * Gets the value of the metrics options on the storage account. - * - * @return A {@link Metrics} instance containing the metrics options. - */ - @XmlElement(name = "Metrics") - public Metrics getMetrics() { - return metrics; - } - - /** - * Sets the value of the metrics options on the storage account. - * - * @param metrics - * A {@link Metrics} instance containing the metrics options. - * @return A reference to this {@link ServiceProperties} instance. - */ - public ServiceProperties setMetrics(Metrics metrics) { - this.metrics = metrics; - return this; - } - - /** - * Gets the default service version string used for operations on the - * storage account. - * - * @return A {@link String} containing the default service version string - * used for operations on the storage account. - */ - @XmlElement(name = "DefaultServiceVersion") - public String getDefaultServiceVersion() { - return defaultServiceVersion; - } - - /** - * Sets the default service version string used for operations on the - * storage account. This value is optional for a set service properties - * request. Allowed values include version 2009-09-19 and more recent - * versions. - *

- * See Storage Services Versioning on MSDN for more information on - * applicable versions. - * - * @param defaultServiceVersion - * A {@link String} containing the default service version string - * used for operations on the storage account. - * @return A reference to this {@link ServiceProperties} instance. - */ - public ServiceProperties setDefaultServiceVersion( - String defaultServiceVersion) { - this.defaultServiceVersion = defaultServiceVersion; - return this; - } - - /** - * Represents the logging options that can be set on a storage account. - */ - public static class Logging { - private String version; - private Boolean delete; - private Boolean read; - private Boolean write; - private RetentionPolicy retentionPolicy; - - /** - * Gets the retention policy for logging data set on the storage - * account. - * - * @return The {@link RetentionPolicy} set on the storage account. - */ - @XmlElement(name = "RetentionPolicy") - public RetentionPolicy getRetentionPolicy() { - return retentionPolicy; - } - - /** - * Sets the retention policy to use for logging data on the storage - * account. - * - * @param retentionPolicy - * The {@link RetentionPolicy} to set on the storage account. - * @return A reference to this {@link Logging} instance. - */ - public Logging setRetentionPolicy(RetentionPolicy retentionPolicy) { - this.retentionPolicy = retentionPolicy; - return this; - } - - /** - * Gets a flag indicating whether all write requests are logged. - * - * @return A flag value of true if all write operations are - * logged; otherwise, false. - */ - @XmlElement(name = "Write") - public boolean isWrite() { - return write; - } - - /** - * Sets a flag indicating whether all write requests should be logged. - * - * @param write - * Set a flag value of true to log all write - * operations; otherwise, false. - * @return A reference to this {@link Logging} instance. - */ - public Logging setWrite(boolean write) { - this.write = write; - return this; - } - - /** - * Gets a flag indicating whether all read requests are logged. - * - * @return A flag value of true if all read operations are - * logged; otherwise, false. - */ - @XmlElement(name = "Read") - public boolean isRead() { - return read; - } - - /** - * Sets a flag indicating whether all read requests should be logged. - * - * @param read - * Set a flag value of true to log all read - * operations; otherwise, false. - * @return A reference to this {@link Logging} instance. - */ - public Logging setRead(boolean read) { - this.read = read; - return this; - } - - /** - * Gets a flag indicating whether all delete requests are logged. - * - * @return A flag value of true if all delete operations - * are logged; otherwise, false. - */ - @XmlElement(name = "Delete") - public boolean isDelete() { - return delete; - } - - /** - * Sets a flag indicating whether all delete requests should be logged. - * - * @param delete - * Set a flag value of true to log all delete - * operations; otherwise, false. - * @return A reference to this {@link Logging} instance. - */ - public Logging setDelete(boolean delete) { - this.delete = delete; - return this; - } - - /** - * Gets the version of logging configured on the storage account. - * - * @return A {@link String} containing the version of logging configured - * on the storage account. - */ - @XmlElement(name = "Version") - public String getVersion() { - return version; - } - - /** - * Sets the version of logging configured on the storage account. - * - * @param version - * A {@link String} containing the version of logging - * configured on the storage account. - * @return A reference to this {@link Logging} instance. - */ - public Logging setVersion(String version) { - this.version = version; - return this; - } - } - - /** - * Represents the metrics options that can be set on a storage account. - */ - public static class Metrics { - private String version; - private boolean enabled; - private Boolean includeAPIs; - private RetentionPolicy retentionPolicy; - - /** - * Gets the retention policy for metrics data set on the storage - * account. - * - * @return The {@link RetentionPolicy} set on the storage account. - */ - @XmlElement(name = "RetentionPolicy") - public RetentionPolicy getRetentionPolicy() { - return retentionPolicy; - } - - /** - * Sets the retention policy to use for metrics data on the storage - * account. - * - * @param retentionPolicy - * The {@link RetentionPolicy} to set on the storage account. - * @return A reference to this {@link Metrics} instance. - */ - public Metrics setRetentionPolicy(RetentionPolicy retentionPolicy) { - this.retentionPolicy = retentionPolicy; - return this; - } - - /** - * Gets a flag indicating whether metrics generates summary statistics - * for called API operations. - * - * @return A flag value of true if metrics generates - * summary statistics for called API operations; otherwise, - * false. - */ - @XmlElement(name = "IncludeAPIs") - public Boolean isIncludeAPIs() { - return includeAPIs; - } - - /** - * Sets a flag indicating whether metrics should generate summary - * statistics for called API operations. This flag is optional if - * metrics is not enabled. - * - * @param includeAPIs - * Set a flag value of true to generate summary - * statistics for called API operations; otherwise, - * false. - * @return A reference to this {@link Metrics} instance. - */ - public Metrics setIncludeAPIs(Boolean includeAPIs) { - this.includeAPIs = includeAPIs; - return this; - } - - /** - * Gets a flag indicating whether metrics is enabled for the storage - * account. - * - * @return A flag value of true if metrics is enabled for - * the storage account; otherwise, false. - */ - @XmlElement(name = "Enabled") - public boolean isEnabled() { - return enabled; - } - - /** - * Sets a flag indicating whether to enable metrics for the storage - * account. - * - * @param enabled - * Set a flag value of true to enable metrics - * for the storage account; otherwise, false. - * @return A reference to this {@link Metrics} instance. - */ - public Metrics setEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Gets the version of Storage Analytics configured on the storage - * account. - * - * @return A {@link String} containing the version of Storage Analytics - * configured on the storage account. - */ - @XmlElement(name = "Version") - public String getVersion() { - return version; - } - - /** - * Sets the version of Storage Analytics configured on the storage - * account. - * - * @param version - * A {@link String} containing the version of Storage - * Analytics configured on the storage account. - * @return A reference to this {@link Metrics} instance. - */ - public Metrics setVersion(String version) { - this.version = version; - return this; - } - } - - /** - * Represents the optional retention policy that can be applied to logging - * or metrics on the storage account. - */ - public static class RetentionPolicy { - private boolean enabled; - private Integer days; // nullable, because optional if "enabled" is - // false - - /** - * Gets the number of days that metrics or logging data should be - * retained, if logging is enabled. - * - * @return The number of days to retain logging or metrics data if - * logging is enabled, or null. - */ - @XmlElement(name = "Days") - public Integer getDays() { - return days; - } - - /** - * Sets the number of days that metrics or logging data should be - * retained. The minimum value you can specify is 1; the largest value - * is 365 (one year). This value must be specified even if the enabled - * flag is set to false. - * - * @param days - * The number of days to retain logging or metrics data. - * @return A reference to this {@link RetentionPolicy} instance. - */ - public RetentionPolicy setDays(Integer days) { - this.days = days; - return this; - } - - /** - * Gets a flag indicating whether a retention policy is enabled. - * - * @return A flag value of true if a retention policy is - * enabled; otherwise, false. - */ - @XmlElement(name = "Enabled") - public boolean isEnabled() { - return enabled; - } - - /** - * Sets a flag indicating whether to enable a retention policy. - * - * @param enabled - * Set a flag value of true to enable a - * retention policy; otherwise, false. - * @return A reference to this {@link RetentionPolicy} instance. - */ - public RetentionPolicy setEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataOptions.java deleted file mode 100644 index 0d7f5f24b2ec..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataOptions.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setBlobMetadata(String, String, java.util.HashMap, SetBlobMetadataOptions) - * setBlobMetadata} request. These options include an optional server timeout - * for the operation, a blob lease ID, and any access conditions for the - * operation. - */ -public class SetBlobMetadataOptions extends BlobServiceOptions { - private String leaseId; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link SetBlobMetadataOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link SetBlobMetadataOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link SetBlobMetadataOptions} instance. - */ - @Override - public SetBlobMetadataOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link SetBlobMetadataOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets an optional lease ID value to match when setting metadata of the - * blob. If set, the lease must be active and the value must match the lease - * ID set on the leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobMetadataOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link SetBlobMetadataOptions} instance. - */ - public SetBlobMetadataOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the access conditions set in this {@link SetBlobMetadataOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions for setting the metadata of a blob. By - * default, the set blob metadata operation will set the metadata - * unconditionally. Use this method to specify conditions on the ETag or - * last modified time value for performing the operation. - *

- * The accessCondition value only affects calls made on methods - * where this {@link SetBlobMetadataOptions} instance is passed as a - * parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link SetBlobMetadataOptions} instance. - */ - public SetBlobMetadataOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataResult.java deleted file mode 100644 index a75d488f8ab4..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataResult.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; - -/** - * A wrapper class for the response returned from a Blob Service REST API Set - * Blob Metadata operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setBlobMetadata(String, String, java.util.HashMap, SetBlobMetadataOptions)} - * . - *

- * See the Set - * Blob Metadata documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class SetBlobMetadataResult { - private String etag; - private Date lastModified; - - /** - * Gets the ETag of the blob. - *

- * This value can be used in an access condition when updating or deleting a - * blob to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag of the blob from the - * ETag element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the last modified time of the blob. - *

- * Any operation that modifies the blob, including updates to the blob's - * metadata or properties, changes the last modified time of the blob. This - * value can be used in an access condition when updating or deleting a blob - * to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link java.util.Date} containing the last modified time of the - * page blob. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the blob from - * the Last-Modified element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the blob. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesOptions.java deleted file mode 100644 index 12efe7b7055c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesOptions.java +++ /dev/null @@ -1,388 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setBlobProperties(String, String, SetBlobPropertiesOptions) - * setBlobProperties} request. These options include an optional server timeout - * for the operation, the MIME content type and content encoding for the blob, - * the content length, the content language, the MD5 hash, a cache control - * value, a blob lease ID, a sequence number and sequence number action value, - * and any access conditions for the operation. - */ -public class SetBlobPropertiesOptions extends BlobServiceOptions { - private String leaseId; - private String contentType; - private Long contentLength; - private String contentEncoding; - private String contentLanguage; - private String contentMD5; - private String cacheControl; - private String sequenceNumberAction; - private Long sequenceNumber; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link SetBlobPropertiesOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - @Override - public SetBlobPropertiesOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the MIME content type value set in this - * {@link SetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the MIME content type value set, if - * any. - */ - public String getContentType() { - return contentType; - } - - /** - * Sets the optional MIME content type for the blob content. This value will - * be returned to clients in the Content-Type header of the - * response when the blob data or blob properties are requested. If no - * content type is specified, the default content type is - * application/octet-stream. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param contentType - * A {@link String} containing the MIME content type value to - * set. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setContentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Gets the new page blob size set in this {@link SetBlobPropertiesOptions} - * instance. - * - * @return The new size to set for a page blob. - */ - public Long getContentLength() { - return contentLength; - } - - /** - * Sets the size of a page blob to the specified size. If the specified - * contentLength value is less than the current size of the blob, - * then all pages above the specified value are cleared. - *

- * This property cannot be used to change the size of a block blob. Setting - * this property for a block blob causes a {@link com.microsoft.windowsazure.exception.ServiceException} to be - * thrown. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param contentLength - * The new size to set for a page blob. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setContentLength(Long contentLength) { - this.contentLength = contentLength; - return this; - } - - /** - * Gets the HTTP content encoding value set in this - * {@link SetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the HTTP content encoding value set, - * if any. - */ - public String getContentEncoding() { - return contentEncoding; - } - - /** - * Sets the optional HTML content encoding value for the blob content. Use - * this value to specify any HTTP content encodings applied to the blob, - * passed as a x-ms-blob-content-encoding header value to the - * server. This value will be returned to clients in the headers of the - * response when the blob data or blob properties are requested. Pass an - * empty value to update a blob to the default value, which will cause no - * content encoding header to be returned with the blob. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param contentEncoding - * A {@link String} containing the - * x-ms-blob-content-encoding header value to set. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setContentEncoding(String contentEncoding) { - this.contentEncoding = contentEncoding; - return this; - } - - /** - * Gets the HTTP content language header value set in this - * {@link SetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the HTTP content language header - * value set, if any. - */ - public String getContentLanguage() { - return contentLanguage; - } - - /** - * Sets the optional HTTP content language header value for the blob - * content. Use this value to specify the content language of the blob. This - * value will be returned to clients in the - * x-ms-blob-content-language header of the response when the - * blob data or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param contentLanguage - * A {@link String} containing the - * x-ms-blob-content-language header value to set. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setContentLanguage(String contentLanguage) { - this.contentLanguage = contentLanguage; - return this; - } - - /** - * Gets the MD5 hash value for the blob content set in this - * {@link SetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the MD5 hash value for the blob - * content set, if any. - */ - public String getContentMD5() { - return contentMD5; - } - - /** - * Sets the optional MD5 hash value for the blob content. This value will be - * returned to clients in the x-ms-blob-content-md5 header - * value of the response when the blob data or blob properties are - * requested. This hash is used to verify the integrity of the blob during - * transport. When this header is specified, the storage service checks the - * hash of the content that has arrived with the one that was sent. If the - * two hashes do not match, the operation will fail with error code 400 (Bad - * Request), which will cause a ServiceException to be thrown. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param contentMD5 - * A {@link String} containing the MD5 hash value for the blob - * content to set. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setContentMD5(String contentMD5) { - this.contentMD5 = contentMD5; - return this; - } - - /** - * Gets the HTTP cache control value set in this - * {@link SetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the HTTP cache control value set, if - * any. - */ - public String getCacheControl() { - return cacheControl; - } - - /** - * Sets the optional HTTP cache control value for the blob content. The Blob - * service stores this value but does not use or modify it. This value will - * be returned to clients in the headers of the response when the blob data - * or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param cacheControl - * A {@link String} containing the HTTP cache control value to - * set. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setCacheControl(String cacheControl) { - this.cacheControl = cacheControl; - return this; - } - - /** - * Gets the sequence number value set in this - * {@link SetBlobPropertiesOptions} instance. - * - * @return The sequence number to set, if any. - */ - public Long getSequenceNumber() { - return sequenceNumber; - } - - /** - * Sets the page blob sequence number. The sequence number is a - * user-controlled property that you can use to track requests and manage - * concurrency issues. This value is optional, but is required if the - * sequence number action value is set to max or - * update. - *

- * Use the sequenceNumber parameter together with the sequence - * number action to update the blob's sequence number, either to the - * specified value or to the higher of the values specified with the request - * or currently stored with the blob. This header should not be specified if - * the sequence number action is set to increment; in this case - * the service automatically increments the sequence number by one. - *

- * To set the sequence number to a value of your choosing, this property - * must be specified on the request together with a sequence number action - * value of update. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param sequenceNumber - * The sequence number to set. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setSequenceNumber(Long sequenceNumber) { - this.sequenceNumber = sequenceNumber; - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link SetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets an optional lease ID value to match when setting properties of the - * blob. If set, the lease must be active and the value must match the lease - * ID set on the leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the sequence number action set in this - * {@link SetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the sequence number action set, if - * any. - */ - public String getSequenceNumberAction() { - return sequenceNumberAction; - } - - /** - * Sets an optional sequence number action for a page blob. This value is - * required if a sequence number is set for the request. - *

- * The sequenceNumberAction parameter indicates how the service - * should modify the page blob's sequence number. Specify one of the - * following strings for this parameter: - *

    - *
  • max - Sets the sequence number to be the higher of the - * value included with the request and the value currently stored for the - * blob.
  • - *
  • update - Sets the sequence number to the value included - * with the request.
  • - *
  • increment - Increments the value of the sequence number - * by 1. If specifying this option, do not set the sequence number value; - * doing so will cause a {@link com.microsoft.windowsazure.exception.ServiceException} to be thrown.
  • - *
- *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param sequenceNumberAction - * A {@link String} containing the sequence number action to set - * on the page blob. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setSequenceNumberAction( - String sequenceNumberAction) { - this.sequenceNumberAction = sequenceNumberAction; - return this; - } - - /** - * Gets the access conditions set in this {@link SetBlobPropertiesOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions for setting the properties of a blob. By - * default, the set blob properties operation will set the properties - * unconditionally. Use this method to specify conditions on the ETag or - * last modified time value for performing the operation. - *

- * The accessCondition value only affects calls made on methods - * where this {@link SetBlobPropertiesOptions} instance is passed as a - * parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesResult.java deleted file mode 100644 index 3a98e2ffcf22..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesResult.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; - -/** - * A wrapper class for the response returned from a Blob Service REST API Set - * Blob Properties operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setBlobProperties(String, String, SetBlobPropertiesOptions)} - * . - *

- * See the Set - * Blob Properties documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class SetBlobPropertiesResult { - private String etag; - private Date lastModified; - private Long sequenceNumber; - - /** - * Gets the ETag of the blob. - *

- * This value can be used in an access condition when updating or deleting a - * blob to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag of the blob from the - * ETag element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the last modified time of the blob. - *

- * Any operation that modifies the blob, including updates to the blob's - * metadata or properties, changes the last modified time of the blob. This - * value can be used in an access condition when updating or deleting a blob - * to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link java.util.Date} containing the last modified time of the - * page blob. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the blob from - * the Last-Modified element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the blob. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - /** - * Gets the sequence number of the page blob. This value can be used when - * updating or deleting a page blob using an optimistic concurrency model to - * prevent the client from modifying data that has been changed by another - * client. - * - * @return A {@link String} containing the client-assigned sequence number - * value for the page blob. - */ - public Long getSequenceNumber() { - return sequenceNumber; - } - - /** - * Reserved for internal use. Sets the sequence number of the page blob from - * the x-ms-blob-sequence-number element returned in the - * response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param sequenceNumber - * A {@link String} containing the client-assigned sequence - * number value for the page blob. - */ - public void setSequenceNumber(Long sequenceNumber) { - this.sequenceNumber = sequenceNumber; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetContainerMetadataOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetContainerMetadataOptions.java deleted file mode 100644 index 66ed029c84dc..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetContainerMetadataOptions.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerMetadata(String, java.util.HashMap, SetContainerMetadataOptions)} - * request. These options include a server response timeout for the request and - * access conditions that specify whether to perform the operation or not - * depending on the values of the Etag or last modified time of the container. - * Options that are not set will not be passed to the server with a request. - */ -public class SetContainerMetadataOptions extends BlobServiceOptions { - private AccessConditionHeader accessCondition; - - /** - * Sets the server request timeout value associated with this - * {@link SetContainerMetadataOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link SetContainerMetadataOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link SetContainerMetadataOptions} instance. - */ - @Override - public SetContainerMetadataOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the access conditions associated with this - * {@link SetContainerMetadataOptions} instance. - * - * @return An {@link AccessCondition} reference containing the Etag and last - * modified time conditions for performing the set container - * metadata operation, or null if not set. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions associated with this - * {@link SetContainerMetadataOptions} instance. By default, the set - * container metadata operation will set the container metadata - * unconditionally. Use this method to specify conditions on the Etag or - * last modified time value for performing the set container metadata - * operation. - *

- * The accessCondition value only affects calls made on methods - * where this {@link SetContainerMetadataOptions} instance is passed as a - * parameter. - * - * @param accessCondition - * An {@link AccessCondition} reference containing the Etag and - * last modified time conditions for performing the set container - * metadata operation. Specify null to make the - * operation unconditional. - * @return A reference to this {@link SetContainerMetadataOptions} instance. - */ - public SetContainerMetadataOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/package.html deleted file mode 100644 index 161010acd848..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the blob data transfer object classes. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/package.html deleted file mode 100644 index 7795f32cd9e5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the blob service class, interface, and associated configuration and utility classes. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/EncryptionUtils.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/EncryptionUtils.java deleted file mode 100644 index c22a8927aabb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/EncryptionUtils.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.microsoft.windowsazure.services.media; - -import java.security.Key; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; -import java.security.cert.CertificateEncodingException; -import java.security.cert.X509Certificate; -import java.util.UUID; - -import javax.crypto.Cipher; -import javax.crypto.spec.SecretKeySpec; - -import com.microsoft.windowsazure.core.utils.Base64; - -public final class EncryptionUtils { - - // Enforce noninstantiability with a private constructor - private EncryptionUtils() { - // not called - } - - public static byte[] encryptSymmetricKeyData(X509Certificate certificate, byte[] contentKey) { - try { - Cipher cipher = Cipher.getInstance("RSA/ECB/OAEPWithSHA-1AndMGF1Padding"); - Key publicKey = certificate.getPublicKey(); - cipher.init(Cipher.ENCRYPT_MODE, publicKey, new SecureRandom()); - return cipher.doFinal(contentKey); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - public static String calculateChecksum(byte[] contentKey, UUID contentKeyIdUuid) { - try { - Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); - SecretKeySpec secretKeySpec = new SecretKeySpec(contentKey, "AES"); - cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec); - byte[] encryptionResult = cipher.doFinal(contentKeyIdUuid.toString().getBytes("UTF8")); - byte[] checksumByteArray = new byte[8]; - System.arraycopy(encryptionResult, 0, checksumByteArray, 0, 8); - return Base64.encode(checksumByteArray); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - /** - * Overwrites the supplied byte array with RNG generated data which destroys - * the original contents. - * - * @param keyToErase - * The content key to erase. - */ - public static void eraseKey(byte[] keyToErase) { - if (keyToErase != null) { - SecureRandom random; - try { - random = SecureRandom.getInstance("SHA1PRNG"); - random.nextBytes(keyToErase); - } catch (NoSuchAlgorithmException e) { - // never reached - } - } - } - - public static String getThumbPrint(X509Certificate cert) - throws NoSuchAlgorithmException, CertificateEncodingException { - MessageDigest md = MessageDigest.getInstance("SHA-1"); - byte[] der = cert.getEncoded(); - md.update(der); - byte[] digest = md.digest(); - return hexify(digest); - } - - public static String hexify(byte[] bytes) { - char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; - StringBuffer buf = new StringBuffer(bytes.length * 2); - for (int i = 0; i < bytes.length; ++i) { - buf.append(hexDigits[(bytes[i] & 0xf0) >> 4]); - buf.append(hexDigits[bytes[i] & 0x0f]); - } - return buf.toString(); - } -} \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/Exports.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/Exports.java deleted file mode 100644 index 38c00dfbb8a4..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/Exports.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media; - -import java.util.Map; - -import javax.xml.bind.JAXBException; -import javax.xml.parsers.ParserConfigurationException; - -import com.microsoft.windowsazure.core.Builder; -import com.microsoft.windowsazure.core.UserAgentFilter; -import com.microsoft.windowsazure.services.media.authentication.AzureAdTokenFactory; -import com.microsoft.windowsazure.services.media.implementation.BatchMimeMultipartBodyWritter; -import com.microsoft.windowsazure.services.media.implementation.MediaContentProvider; -import com.microsoft.windowsazure.services.media.implementation.MediaExceptionProcessor; -import com.microsoft.windowsazure.services.media.implementation.MediaRestProxy; -import com.microsoft.windowsazure.services.media.implementation.OAuthFilter; -import com.microsoft.windowsazure.services.media.implementation.ODataEntityCollectionProvider; -import com.microsoft.windowsazure.services.media.implementation.ODataEntityProvider; -import com.microsoft.windowsazure.services.media.implementation.RedirectFilter; -import com.microsoft.windowsazure.services.media.implementation.ResourceLocationManager; -import com.microsoft.windowsazure.services.media.implementation.VersionHeadersFilter; -import com.sun.jersey.api.client.config.ClientConfig; -import com.sun.jersey.api.json.JSONConfiguration; - -public class Exports implements Builder.Exports { - - /** - * register the Media services. - */ - @Override - public void register(Builder.Registry registry) { - registry.add(new AzureAdTokenFactory()); - registry.add(MediaContract.class, MediaExceptionProcessor.class); - registry.add(MediaRestProxy.class); - registry.add(OAuthFilter.class); - registry.add(ResourceLocationManager.class); - registry.add(RedirectFilter.class); - registry.add(VersionHeadersFilter.class); - registry.add(UserAgentFilter.class); - - registry.alter(MediaContract.class, ClientConfig.class, - new Builder.Alteration() { - @SuppressWarnings("rawtypes") - @Override - public ClientConfig alter(String profile, - ClientConfig instance, Builder builder, - Map properties) { - - instance.getProperties().put( - JSONConfiguration.FEATURE_POJO_MAPPING, true); - - // Turn off auto-follow redirects, because Media - // Services rest calls break if it's on - instance.getProperties().put( - ClientConfig.PROPERTY_FOLLOW_REDIRECTS, false); - - try { - instance.getSingletons().add( - new ODataEntityProvider()); - instance.getSingletons().add( - new ODataEntityCollectionProvider()); - instance.getSingletons().add( - new MediaContentProvider()); - instance.getSingletons().add( - new BatchMimeMultipartBodyWritter()); - } catch (JAXBException e) { - throw new RuntimeException(e); - } catch (ParserConfigurationException e) { - throw new RuntimeException(e); - } - - return instance; - } - }); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaConfiguration.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaConfiguration.java deleted file mode 100644 index c58423062c79..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaConfiguration.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media; - -import java.net.URI; - -import com.microsoft.windowsazure.Configuration; -import com.microsoft.windowsazure.services.media.authentication.TokenProvider; - -/** - * Provides functionality to create a media services configuration. - * - */ -public final class MediaConfiguration { - - private MediaConfiguration() { - } - - /** - * The token provider object - */ - public static final String AZURE_AD_TOKEN_PROVIDER = "media.azuread.tokenprovider"; - - /** - * The azure media services account uri - */ - public static final String AZURE_AD_API_SERVER = "media.azuread.account_api_uri"; - - /** - * Returns the default Configuration provisioned for the specified AMS account and token provider. - * @param apiServer the AMS account uri - * @param azureAdTokenProvider the token provider - * @return a Configuration - */ - public static Configuration configureWithAzureAdTokenProvider( - URI apiServer, - TokenProvider azureAdTokenProvider) { - - return configureWithAzureAdTokenProvider(Configuration.getInstance(), apiServer, azureAdTokenProvider); - } - - /** - * Setup a Configuration with specified Configuration, AMS account and token provider - * @param configuration The target configuration - * @param apiServer the AMS account uri - * @param azureAdTokenProvider the token provider - * @return the target Configuration - */ - public static Configuration configureWithAzureAdTokenProvider( - Configuration configuration, - URI apiServer, - TokenProvider azureAdTokenProvider) { - - configuration.setProperty(AZURE_AD_API_SERVER, apiServer.toString()); - configuration.setProperty(AZURE_AD_TOKEN_PROVIDER, azureAdTokenProvider); - - return configuration; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaContract.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaContract.java deleted file mode 100644 index eebebf03c13a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaContract.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import com.microsoft.windowsazure.core.pipeline.jersey.JerseyFilterableService; -import com.microsoft.windowsazure.services.media.entityoperations.EntityContract; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; - -/** - * Contract for interacting with the back end of Media Services - * - */ -public interface MediaContract extends JerseyFilterableService, - EntityContract { - /** - * Creates an instance of the WritableBlobContainerContract API - * that will write to the blob container given by the provided locator. - * - * @param locator - * locator specifying where to upload to - * @return the implementation of WritableBlobContainerContract - */ - WritableBlobContainerContract createBlobWriter(LocatorInfo locator); - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaService.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaService.java deleted file mode 100644 index c7a8e9c77e2e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaService.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media; - -import com.microsoft.windowsazure.Configuration; - -/** - * - * Access media services functionality. This class cannot be instantiated. - * - */ -public final class MediaService { - - private MediaService() { - } - - /** - * Creates an instance of the MediaServicesContract API. - * - */ - public static MediaContract create() { - return Configuration.getInstance().create(MediaContract.class); - } - - /** - * Creates an instance of the MediaServicesContract API using - * the specified configuration. - * - * @param config - * A Configuration object that represents the - * configuration for the media service account. - * - */ - public static MediaContract create(Configuration config) { - return config.create(MediaContract.class); - } - - /** - * Creates an instance of the MediaServicesContract API. - * - */ - public static MediaContract create(String profile) { - return Configuration.getInstance().create(profile, MediaContract.class); - } - - /** - * Creates an instance of the MediaServicesContract API using - * the specified configuration. - * - * @param config - * A Configuration object that represents the - * configuration for the media service account. - * - */ - public static MediaContract create(String profile, Configuration config) { - return config.create(profile, MediaContract.class); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/OperationUtils.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/OperationUtils.java deleted file mode 100644 index d64001e67087..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/OperationUtils.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.microsoft.windowsazure.services.media; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.EntityWithOperationIdentifier; -import com.microsoft.windowsazure.services.media.models.Operation; -import com.microsoft.windowsazure.services.media.models.OperationInfo; -import com.microsoft.windowsazure.services.media.models.OperationState; - -public final class OperationUtils { - - private OperationUtils() { - // do nothing - } - - /** - * Awaits for an operation to be completed. - * - * @param service - * the media contract - * @param operationId - * the operation id to wait for. - * @return the final state of the operation. If operationId is null, returns OperationState.Succeeded. - * @throws ServiceException - */ - public static OperationState await(MediaContract service, String operationId) throws ServiceException { - if (operationId == null) { - return OperationState.Succeeded; - } - OperationInfo opinfo; - do { - opinfo = service.get(Operation.get(operationId)); - try { - Thread.sleep(2000); - } catch (InterruptedException e) { - // intentionally do nothing - } - } while (opinfo.getState().equals(OperationState.InProgress)); - return opinfo.getState(); - } - - /** - * Awaits for an operation to be completed. - * - * @param service - * the media contract - * @param operation - * the operation id to wait for. - * @return the final state of the operation. If the entity has not operationId, returns OperationState.Succeeded. - * @throws ServiceException - */ - public static OperationState await(MediaContract service, EntityWithOperationIdentifier entity) throws ServiceException { - if (entity.hasOperationIdentifier()) { - return await(service, entity.getOperationId()); - } - return OperationState.Succeeded; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/WritableBlobContainerContract.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/WritableBlobContainerContract.java deleted file mode 100644 index 64a99599bf1b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/WritableBlobContainerContract.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import java.io.InputStream; - -import com.microsoft.windowsazure.core.pipeline.jersey.JerseyFilterableService; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.blob.models.BlockList; -import com.microsoft.windowsazure.services.blob.models.CommitBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobBlockOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobResult; - -/** - * The Interface WritableBlobContainerContract. - */ -public interface WritableBlobContainerContract extends - JerseyFilterableService { - - /** - * Creates the block blob. - * - * @param blob - * the blob - * @param contentStream - * the content stream - * @return the creates the blob result - * @throws ServiceException - * the service exception - */ - CreateBlobResult createBlockBlob(String blob, InputStream contentStream) - throws ServiceException; - - /** - * Creates the block blob. - * - * @param blob - * the blob - * @param contentStream - * the content stream - * @param options - * the options - * @return the creates the blob result - * @throws ServiceException - * the service exception - */ - CreateBlobResult createBlockBlob(String blob, InputStream contentStream, - CreateBlobOptions options) throws ServiceException; - - /** - * Creates the blob block. - * - * @param blob - * the blob - * @param blockId - * the block id - * @param contentStream - * the content stream - * @throws ServiceException - * the service exception - */ - void createBlobBlock(String blob, String blockId, InputStream contentStream) - throws ServiceException; - - /** - * Creates the blob block. - * - * @param blob - * the blob - * @param blockId - * the block id - * @param contentStream - * the content stream - * @param options - * the options - * @throws ServiceException - * the service exception - */ - void createBlobBlock(String blob, String blockId, - InputStream contentStream, CreateBlobBlockOptions options) - throws ServiceException; - - /** - * Commit blob blocks. - * - * @param blob - * the blob - * @param blockList - * the block list - * @throws ServiceException - * the service exception - */ - void commitBlobBlocks(String blob, BlockList blockList) - throws ServiceException; - - /** - * Commit blob blocks. - * - * @param blob - * the blob - * @param blockList - * the block list - * @param options - * the options - * @throws ServiceException - * the service exception - */ - void commitBlobBlocks(String blob, BlockList blockList, - CommitBlobBlocksOptions options) throws ServiceException; -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdAccessToken.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdAccessToken.java deleted file mode 100644 index b13d3daecf72..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdAccessToken.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -import java.util.Date; - -/** - * Represents an access token - */ -public class AzureAdAccessToken { - - private final String accessToken; - - private final Date expiresOn; - - /** - * Gets the access token - * @return the access token - */ - public String getAccessToken() { - return this.accessToken; - } - - /** - * Gets the expiration date - * @return the expiration date - */ - public Date getExpiresOnDate() { - return this.expiresOn; - } - - /** - * Instantiate a representation of an access token - * @param accessToken the access token - * @param expiresOn the expiration date - */ - public AzureAdAccessToken(String accessToken, Date expiresOn) { - - if (accessToken == null || accessToken.trim().isEmpty()) { - throw new IllegalArgumentException("accessToken"); - } - - if (expiresOn == null) { - throw new NullPointerException("expiresOn"); - } - - this.accessToken = accessToken; - this.expiresOn = expiresOn; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdClientSymmetricKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdClientSymmetricKey.java deleted file mode 100644 index ad0e0aa143d2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdClientSymmetricKey.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -/** - * Represents a symmetric key pair of ClientId & ClientKey - */ -public class AzureAdClientSymmetricKey { - - private final String clientId; - private final String clientKey; - - /** - * Gets the client ID. - * @return the client ID. - */ - public String getClientId() { - return this.clientId; - } - - /** - * Gets the client key. - * @return the client key. - */ - public String getClientKey() { - return this.clientKey; - } - - /** - * Initializes a new instance of the AzureAdClientSymmetricKey class. - * @param clientId The client ID. - * @param clientKey The client key. - */ - public AzureAdClientSymmetricKey(String clientId, String clientKey) { - if (clientId == null || clientId.trim().isEmpty()) { - throw new IllegalArgumentException("clientId"); - } - - if (clientKey == null || clientKey.trim().isEmpty()) { - throw new IllegalArgumentException("clientKey"); - } - - this.clientId = clientId; - this.clientKey = clientKey; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdClientUsernamePassword.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdClientUsernamePassword.java deleted file mode 100644 index c9d51cbce115..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdClientUsernamePassword.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -/** - * Represents a pair of username & password credentials - */ -public class AzureAdClientUsernamePassword { - - private final String username; - private final String password; - - /** - * Gets the username. - * @return the username. - */ - public String getUsername() { - return this.username; - } - - /** - * Gets the password. - * @return the password. - */ - public String getPassword() { - return this.password; - } - - /** - * Initializes a new instance of the AzureAdClientSymmetricKey class. - * @param clientId The client ID. - * @param clientKey The client key. - */ - public AzureAdClientUsernamePassword(String username, String password) { - if (username == null || username.trim().isEmpty()) { - throw new IllegalArgumentException("username"); - } - - if (password == null || password.trim().isEmpty()) { - throw new IllegalArgumentException("password"); - } - - this.username = username; - this.password = password; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenCredentialType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenCredentialType.java deleted file mode 100644 index b83277a64981..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenCredentialType.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -/** - * Enumerates the different types of credentials available - * - */ -public enum AzureAdTokenCredentialType { - - /** - * User Credential by prompting user for user name and password. - */ - UserCredential, - - /** - * User Secret Credential by providing user name and password via configuration. - */ - UserSecretCredential, - - /** - * Service Principal with the symmetric key credential. - */ - ServicePrincipalWithClientSymmetricKey, - - /** - * Service Principal with the certificate credential. - */ - ServicePrincipalWithClientCertificate -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenCredentials.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenCredentials.java deleted file mode 100644 index e64ffc4465ae..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenCredentials.java +++ /dev/null @@ -1,160 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -import com.microsoft.aad.adal4j.AsymmetricKeyCredential; -import com.microsoft.aad.adal4j.ClientCredential; - -/** - * Represents an Azure AD Credential for a specific resource - */ -public class AzureAdTokenCredentials { - - private String tenant; - - private ClientCredential clientKey; - - private AsymmetricKeyCredential asymmetricKeyCredential; - - private AzureAdClientUsernamePassword azureAdClientUsernamePassword; - - private AzureAdTokenCredentialType credentialType; - - private AzureEnvironment azureEnvironment; - - /** - * Gets the tenant. - * @return the tenant. - */ - public String getTenant() { - return this.tenant; - } - - /** - * Gets the client username password - * @return the client symmetric key. - */ - public AzureAdClientUsernamePassword getAzureAdClientUsernamePassword() { - return this.azureAdClientUsernamePassword; - } - - /** - * Gets the client symmetric key credential. - * @return the ClientCredential - */ - public ClientCredential getClientKey() { - return this.clientKey; - } - - /** - * Gets the AsymmetricKeyCredential - * @return the AsymmetricKeyCredential - */ - public AsymmetricKeyCredential getAsymmetricKeyCredential() { - return this.asymmetricKeyCredential; - } - - /** - * Gets the credential type. - * @return the credential type. - */ - public AzureAdTokenCredentialType getCredentialType() { - return this.credentialType; - } - - /** - * Gets the environment. - * @return the environment. - */ - public AzureEnvironment getAzureEnvironment() { - return this.azureEnvironment; - } - - /** - * Initializes a new instance of the AzureAdTokenCredentials class. - * @param tenant The tenant - * @param azureAdClientUsernamePassword the user credentials - * @param azureEnvironment The environment - */ - public AzureAdTokenCredentials(String tenant, AzureAdClientUsernamePassword azureAdClientUsernamePassword, AzureEnvironment azureEnvironment) { - if (tenant == null || tenant.trim().isEmpty()) { - throw new IllegalArgumentException("tenant"); - } - - if (azureAdClientUsernamePassword == null) { - throw new NullPointerException("azureAdClientUsernamePassword"); - } - - if (azureEnvironment == null) { - throw new NullPointerException("azureEnvironment"); - } - - this.tenant = tenant; - this.azureAdClientUsernamePassword = azureAdClientUsernamePassword; - this.azureEnvironment = azureEnvironment; - this.credentialType = AzureAdTokenCredentialType.UserSecretCredential; - } - - /** - * Initializes a new instance of the AzureAdTokenCredentials class. - * @param tenant The tenant - * @param azureEnvironment The environment - */ - public AzureAdTokenCredentials(String tenant, AzureEnvironment azureEnvironment) { - if (tenant == null || tenant.trim().isEmpty()) { - throw new IllegalArgumentException("tenant"); - } - - if (azureEnvironment == null) { - throw new NullPointerException("azureEnvironment"); - } - - this.tenant = tenant; - this.azureEnvironment = azureEnvironment; - this.credentialType = AzureAdTokenCredentialType.UserSecretCredential; - } - - /** - * Initializes a new instance of the AzureAdTokenCredentials class. - * @param tenant The tenant - * @param azureAdClientSymmetricKey an instance of AzureAdClientSymmetricKey - * @param azureEnvironment The environment - */ - public AzureAdTokenCredentials(String tenant, AzureAdClientSymmetricKey azureAdClientSymmetricKey, AzureEnvironment azureEnvironment) { - if (tenant == null || tenant.trim().isEmpty()) { - throw new IllegalArgumentException("tenant"); - } - - if (azureAdClientSymmetricKey == null) { - throw new NullPointerException("azureAdClientSymmetricKey"); - } - - if (azureEnvironment == null) { - throw new NullPointerException("azureEnvironment"); - } - - this.tenant = tenant; - this.azureEnvironment = azureEnvironment; - this.clientKey = new ClientCredential(azureAdClientSymmetricKey.getClientId(), azureAdClientSymmetricKey.getClientKey()); - this.credentialType = AzureAdTokenCredentialType.ServicePrincipalWithClientSymmetricKey; - } - - - public AzureAdTokenCredentials(String tenant, AsymmetricKeyCredential asymmetricKeyCredential, AzureEnvironment azureEnvironment) { - if (tenant == null || tenant.trim().isEmpty()) { - throw new IllegalArgumentException("tenant"); - } - - if (asymmetricKeyCredential == null) { - throw new NullPointerException("asymmetricKeyCredential"); - } - - if (azureEnvironment == null) { - throw new NullPointerException("azureEnvironment"); - } - - this.tenant = tenant; - this.azureEnvironment = azureEnvironment; - this.asymmetricKeyCredential = asymmetricKeyCredential; - - this.credentialType = AzureAdTokenCredentialType.ServicePrincipalWithClientCertificate; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenFactory.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenFactory.java deleted file mode 100644 index f4ce7d19597a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenFactory.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -import java.util.Map; - -import com.microsoft.windowsazure.core.Builder; - -/** - * AzureAdTokenProvider's Factory - * - * Internal use. - */ -public class AzureAdTokenFactory implements Builder.Factory { - - @Override - public TokenProvider create(String profile, Class service, Builder builder, - Map properties) { - return (TokenProvider) properties.get(profile); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenProvider.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenProvider.java deleted file mode 100644 index 63e87e1e2125..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenProvider.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -import java.net.MalformedURLException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Future; - -import org.apache.commons.lang.NotImplementedException; - -import com.microsoft.aad.adal4j.AuthenticationContext; -import com.microsoft.aad.adal4j.AuthenticationResult; - -/** - * Azure Active Directory Access Token Provider for - * the Azure Media Services JDK. - */ -public class AzureAdTokenProvider implements TokenProvider { - private final AuthenticationContext authenticationContext; - private final AzureAdTokenCredentials tokenCredentials; - private final ExecutorService executorService; - - /** - * Creates an instance of the AzureAdTokenProvider - * @param tokenCredentials The credentials - * @param executorService An ExecutorService - * @throws MalformedURLException - */ - public AzureAdTokenProvider(AzureAdTokenCredentials tokenCredentials, ExecutorService executorService) throws MalformedURLException { - if (tokenCredentials == null) { - throw new NullPointerException("tokenCredentials"); - } - - if (executorService == null) { - throw new NullPointerException("executorService"); - } - - this.tokenCredentials = tokenCredentials; - - StringBuilder authority = new StringBuilder(); - - authority.append(canonicalizeUri(this.tokenCredentials.getAzureEnvironment().getActiveDirectoryEndpoint().toString())); - authority.append(tokenCredentials.getTenant()); - - this.executorService = executorService; - this.authenticationContext = new AuthenticationContext(authority.toString(), false, this.executorService); - } - - /** - * Acquires an access token - * @see com.microsoft.windowsazure.services.media.authentication.TokenProvider#acquireAccessToken() - */ - @Override - public AzureAdAccessToken acquireAccessToken() throws Exception { - AuthenticationResult authResult = getToken().get(); - return new AzureAdAccessToken(authResult.getAccessToken(), authResult.getExpiresOnDate()); - } - - private Future getToken() { - String mediaServicesResource = this.tokenCredentials.getAzureEnvironment().getMediaServicesResource(); - - switch (this.tokenCredentials.getCredentialType()) { - case UserSecretCredential: - return this.authenticationContext.acquireToken( - mediaServicesResource, - this.tokenCredentials.getAzureEnvironment().getMediaServicesSdkClientId(), - this.tokenCredentials.getAzureAdClientUsernamePassword().getUsername(), - this.tokenCredentials.getAzureAdClientUsernamePassword().getPassword(), - null); - - case ServicePrincipalWithClientSymmetricKey: - return this.authenticationContext.acquireToken( - mediaServicesResource, - this.tokenCredentials.getClientKey(), - null); - - case ServicePrincipalWithClientCertificate: - return this.authenticationContext.acquireToken( - mediaServicesResource, - this.tokenCredentials.getAsymmetricKeyCredential(), - null); - - case UserCredential: - throw new NotImplementedException( - String.format( - "Interactive user credential is currently not supported by the java sdk", - this.tokenCredentials.getCredentialType())); - default: - throw new NotImplementedException( - String.format( - "Token Credential type %s is not supported.", - this.tokenCredentials.getCredentialType())); - } - } - - private String canonicalizeUri(String authority) { - if (authority != null - && !authority.trim().isEmpty() - && !authority.endsWith("/")) { - - authority += "/"; - } - - return authority; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironment.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironment.java deleted file mode 100644 index c3998578619e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironment.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -import java.net.URI; - -/** - * Represents an Azure Environment - */ -public class AzureEnvironment { - - private URI activeDirectoryEndpoint; - - private String mediaServicesResource; - - private String mediaServicesSdkClientId; - - private URI mediaServicesSdkRedirectUri; - - /** - * Gets the Active Directory endpoint. - * @return Active Directory endpoint. - */ - public URI getActiveDirectoryEndpoint() { - return this.activeDirectoryEndpoint; - } - - /** - * Gets the Media Services resource. - * @return Media Services resource - */ - public String getMediaServicesResource() { - return this.mediaServicesResource; - } - - /** - * Gets the Media Services SDK client ID. - * @return Media Services SDK client ID - */ - public String getMediaServicesSdkClientId() { - return this.mediaServicesSdkClientId; - } - - /** - * Gets Media Services SDK application redirect URI. - * @return Media Services SDK application redirect URI. - */ - public URI getMediaServicesSdkRedirectUri() { - return this.mediaServicesSdkRedirectUri; - } - - /** - * Initializes a new instance of the AzureEnvironment class. - * @param activeDirectoryEndpoint The Active Directory endpoint. - * @param mediaServicesResource The Media Services resource. - * @param mediaServicesSdkClientId The Media Services SDK client ID. - * @param mediaServicesSdkRedirectUri The Media Services SDK redirect URI. - */ - public AzureEnvironment( - URI activeDirectoryEndpoint, - String mediaServicesResource, - String mediaServicesSdkClientId, - URI mediaServicesSdkRedirectUri) { - if (activeDirectoryEndpoint == null) { - throw new NullPointerException("activeDirectoryEndpoint"); - } - - if (mediaServicesResource == null || mediaServicesResource.trim().isEmpty()) { - throw new IllegalArgumentException("mediaServicesResource"); - } - - if (mediaServicesSdkClientId == null || mediaServicesSdkClientId.trim().isEmpty()) { - throw new IllegalArgumentException("mediaServicesSdkClientId"); - } - - if (mediaServicesSdkRedirectUri == null) { - throw new NullPointerException("mediaServicesSdkRedirectUri"); - } - - this.activeDirectoryEndpoint = activeDirectoryEndpoint; - this.mediaServicesResource = mediaServicesResource; - this.mediaServicesSdkClientId = mediaServicesSdkClientId; - this.mediaServicesSdkRedirectUri = mediaServicesSdkRedirectUri; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironmentConstants.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironmentConstants.java deleted file mode 100644 index ddbd4b5119df..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironmentConstants.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -import java.net.URI; -import java.net.URISyntaxException; - -public final class AzureEnvironmentConstants { - - // Utility classes should not have a public or default constructor. - private AzureEnvironmentConstants() { - } - - /** - * The Active Directory endpoint for Azure Cloud environment. - */ - public static final URI AZURE_CLOUD_ACTIVE_DIRECTORY_ENDPOINT = makeURI("https://login.microsoftonline.com/"); - - /** - * The Media Services resource for Azure Cloud environment. - */ - public static final String AZURE_CLOUD_MEDIA_SERVICES_RESOURCE = "https://rest.media.azure.net"; - - /** - * The Active Directory endpoint for Azure China Cloud environment. - */ - public static final URI AZURE_CHINA_CLOUD_ACTIVE_DIRECTORY_ENDPOINT = makeURI("https://login.chinacloudapi.cn/"); - - /** - * The Media Services resource for Azure China Cloud environment. - */ - public static final String AZURE_CHINA_CLOUD_MEDIA_SERVICES_RESOURCE = "https://rest.media.chinacloudapi.cn"; - - /** - * The Active Directory endpoint for Azure US Government environment. - */ - public static final URI AZURE_US_GOVERNMENT_ACTIVE_DIRECTORY_ENDPOINT = makeURI("https://login-us.microsoftonline.com/"); - - /** - * The Media Services resource for Azure US Government environment. - */ - public static final String AZURE_US_GOVERNMENT_MEDIA_SERVICES_RESOURCE = "https://rest.media.usgovcloudapi.net"; - - /** - * The native SDK AAD application ID for Azure US Government environment. - */ - public static final String AZURE_US_GOVERNMENT_SDK_AAD_APPLIATION_ID = "68dac91e-cab5-461b-ab4a-ec7dcff0bd67"; - - /** - * The Active Directory endpoint for Azure German cloud environment. - */ - public static final URI AZURE_GERMAN_CLOUD_ACTIVE_DIRECTORY_ENDPOINT = makeURI("https://login.microsoftonline.de/"); - - /** - * The Media Services resource for Azure German Cloud environment. - */ - public static final String AZURE_GERMAN_CLOUD_MEDIA_SERVICES_RESOURCE = "https://rest.media.cloudapi.de"; - - /** - * The native SDK AAD application ID for Azure Cloud, Azure China Cloud and Azure German Cloud environment. - */ - public static final String SDK_AAD_APPLICATION_ID = "d476653d-842c-4f52-862d-397463ada5e7"; - - /** - * The native SDK AAD application's redirect URL for all environments. - */ - public static final URI SDK_AAD_APPLICATION_REDIRECT_URI = makeURI("https://AzureMediaServicesNativeSDK"); - - private static URI makeURI(String urlString) { - try { - return new URI(urlString); - } catch (URISyntaxException e) { - return null; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironments.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironments.java deleted file mode 100644 index f2ad26a38a1b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironments.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -public final class AzureEnvironments { - - // Utility classes should not have a public or default constructor. - private AzureEnvironments() { - } - - /** - * Azure Cloud environment. - */ - public static final AzureEnvironment AZURE_CLOUD_ENVIRONMENT = new AzureEnvironment( - AzureEnvironmentConstants.AZURE_CLOUD_ACTIVE_DIRECTORY_ENDPOINT, - AzureEnvironmentConstants.AZURE_CLOUD_MEDIA_SERVICES_RESOURCE, - AzureEnvironmentConstants.SDK_AAD_APPLICATION_ID, - AzureEnvironmentConstants.SDK_AAD_APPLICATION_REDIRECT_URI); - - /** - * Azure China Cloud environment. - */ - public static final AzureEnvironment AZURE_CHINA_CLOUD_ENVIRONMENT = new AzureEnvironment( - AzureEnvironmentConstants.AZURE_CHINA_CLOUD_ACTIVE_DIRECTORY_ENDPOINT, - AzureEnvironmentConstants.AZURE_CHINA_CLOUD_MEDIA_SERVICES_RESOURCE, - AzureEnvironmentConstants.SDK_AAD_APPLICATION_ID, - AzureEnvironmentConstants.SDK_AAD_APPLICATION_REDIRECT_URI); - - /** - * Azure US Government environment. - */ - public static final AzureEnvironment AZURE_US_GOVERNMENT_ENVIRONMENT = new AzureEnvironment( - AzureEnvironmentConstants.AZURE_US_GOVERNMENT_ACTIVE_DIRECTORY_ENDPOINT, - AzureEnvironmentConstants.AZURE_US_GOVERNMENT_MEDIA_SERVICES_RESOURCE, - AzureEnvironmentConstants.AZURE_US_GOVERNMENT_SDK_AAD_APPLIATION_ID, - AzureEnvironmentConstants.SDK_AAD_APPLICATION_REDIRECT_URI); - - /** - * Azure German Cloud environment. - */ - public static final AzureEnvironment AZURE_GERMAN_CLOUD_ENVIRONMENT = new AzureEnvironment( - AzureEnvironmentConstants.AZURE_GERMAN_CLOUD_ACTIVE_DIRECTORY_ENDPOINT, - AzureEnvironmentConstants.AZURE_GERMAN_CLOUD_MEDIA_SERVICES_RESOURCE, - AzureEnvironmentConstants.SDK_AAD_APPLICATION_ID, - AzureEnvironmentConstants.SDK_AAD_APPLICATION_REDIRECT_URI); -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/TokenProvider.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/TokenProvider.java deleted file mode 100644 index ca4e9b62156f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/TokenProvider.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -public interface TokenProvider { - - /** - * Acquire an access token - * - * @return a valid access token - * @throws Exception - */ - AzureAdAccessToken acquireAccessToken() throws Exception; - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/package-info.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/package-info.java deleted file mode 100644 index bd769aaa63ca..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultActionOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultActionOperation.java deleted file mode 100644 index a50ad8ff9dc0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultActionOperation.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.util.HashMap; -import java.util.Map; - -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; - -import com.microsoft.windowsazure.core.pipeline.PipelineHelpers; -import com.microsoft.windowsazure.exception.ServiceException; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.core.util.MultivaluedMapImpl; - -/** - * Generic implementation of Delete operation usable by most entities. - */ -public class DefaultActionOperation implements EntityActionOperation { - - /** The proxy data. */ - private EntityProxyData proxyData; - - /** The name. */ - private String name; - - /** The content type. */ - private MediaType contentType = MediaType.APPLICATION_XML_TYPE; - - /** The accept type. */ - private MediaType acceptType = MediaType.APPLICATION_ATOM_XML_TYPE; - - /** The query parameters. */ - private MultivaluedMap queryParameters; - - /** The body parameters. */ - private Map bodyParameters; - - /** - * The default action operation. - * - * @param name - * the name - */ - public DefaultActionOperation(String name) { - this(); - this.name = name; - } - - /** - * Instantiates a new default action operation. - */ - public DefaultActionOperation() { - this.queryParameters = new MultivaluedMapImpl(); - this.bodyParameters = new HashMap(); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media.entityoperations. - * EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - this.proxyData = proxyData; - } - - /** - * Get the current proxy data. - * - * @return the proxy data - */ - protected EntityProxyData getProxyData() { - return proxyData; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getUri() - */ - @Override - public String getUri() { - return name; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#getQueryParameters() - */ - @Override - public MultivaluedMap getQueryParameters() { - return this.queryParameters; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#addQueryParameter(java.lang.String, - * java.lang.String) - */ - @Override - public DefaultActionOperation addQueryParameter(String key, String value) { - this.queryParameters.add(key, value); - return this; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getContentType() - */ - @Override - public MediaType getContentType() { - return this.contentType; - } - - /** - * Sets the content type. - * - * @param contentType - * the content type - * @return the default action operation - */ - @Override - public DefaultActionOperation setContentType(MediaType contentType) { - this.contentType = contentType; - return this; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getAcceptType() - */ - @Override - public MediaType getAcceptType() { - return this.acceptType; - } - - /** - * Sets the accept type. - * - * @param acceptType - * the accept type - * @return the default action operation - */ - public DefaultActionOperation setAcceptType(MediaType acceptType) { - this.acceptType = acceptType; - return this; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#getVerb() - */ - @Override - public String getVerb() { - return "GET"; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - return null; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #processResponse(java.lang.Object) - */ - @Override - public Object processResponse(Object rawResponse) throws ServiceException { - PipelineHelpers.throwIfNotSuccess((ClientResponse) rawResponse); - return rawResponse; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#getBodyParameters() - */ - @Override - public Map getBodyParameters() { - return this.bodyParameters; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#addBodyParameter(java.lang.String, - * java.lang.Object) - */ - @Override - public EntityActionOperation addBodyParameter(String key, Object value) { - this.bodyParameters.put(key, value); - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultDeleteOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultDeleteOperation.java deleted file mode 100644 index 7b65fa565c01..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultDeleteOperation.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -/** - * Generic implementation of Delete operation usable by most entities - * - */ -public class DefaultDeleteOperation implements EntityDeleteOperation { - private final EntityOperationBase.EntityUriBuilder uriBuilder; - private EntityProxyData proxyData; - - /** - * - */ - public DefaultDeleteOperation(String entityUri, String entityId) { - uriBuilder = new EntityOperationBase.EntityIdUriBuilder(entityUri, - entityId); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityDeleteOperation - * #setProxyData(com.microsoft.windowsazure.services.media - * .entityoperations.EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - this.proxyData = proxyData; - } - - /** - * Get currently set proxy data - * - * @return the proxyData - */ - protected EntityProxyData getProxyData() { - return proxyData; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entities.EntityDeleteOperation - * #getUri() - */ - @Override - public String getUri() { - return uriBuilder.getUri(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityActionOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityActionOperation.java deleted file mode 100644 index ea8099eec143..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityActionOperation.java +++ /dev/null @@ -1,282 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.util.HashMap; -import java.util.Map; - -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; - -import com.microsoft.windowsazure.core.pipeline.PipelineHelpers; -import com.microsoft.windowsazure.exception.ServiceException; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.core.util.MultivaluedMapImpl; - -/** - * Generic implementation of Delete operation usable by most entities. - */ -public class DefaultEntityActionOperation implements EntityActionOperation { - - /** The proxy data. */ - private EntityProxyData proxyData; - - /** The uri builder. */ - private final EntityOperationBase.EntityUriBuilder uriBuilder; - - /** The content type. */ - private MediaType contentType = MediaType.APPLICATION_JSON_TYPE; - - /** The accept type. */ - private MediaType acceptType = MediaType.APPLICATION_ATOM_XML_TYPE; - - /** The query parameters. */ - private MultivaluedMap queryParameters; - - /** The entity name. */ - private final String entityName; - - /** The entity id. */ - private final String entityId; - - /** The action name. */ - private final String actionName; - - /** The body parameters. */ - private Map bodyParameters; - - /** - * The default action operation. - * - * @param entityName - * the entity name - * @param entityId - * the entity id - * @param actionName - * the action name - */ - public DefaultEntityActionOperation(String entityName, String entityId, - String actionName) { - this.queryParameters = new MultivaluedMapImpl(); - this.bodyParameters = new HashMap(); - this.entityName = entityName; - this.entityId = entityId; - this.actionName = actionName; - this.uriBuilder = new EntityOperationBase.EntityIdUriBuilder( - entityName, entityId).setActionName(actionName); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media.entityoperations. - * EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - this.proxyData = proxyData; - } - - /** - * Get the current proxy data. - * - * @return the proxy data - */ - protected EntityProxyData getProxyData() { - return proxyData; - } - - /** - * Gets the entity name. - * - * @return the entity name - */ - public String getEntityName() { - return this.entityName; - } - - /** - * Gets the entity id. - * - * @return the entity id - */ - public String getEntityId() { - return this.entityId; - } - - /** - * Gets the action name. - * - * @return the action name - */ - public String getActionName() { - return this.actionName; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getUri() - */ - @Override - public String getUri() { - return uriBuilder.getUri(); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#getQueryParameters() - */ - @Override - public MultivaluedMap getQueryParameters() { - return this.queryParameters; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#addQueryParameter(java.lang.String, - * java.lang.String) - */ - @Override - public DefaultEntityActionOperation addQueryParameter(String key, - String value) { - this.queryParameters.add(key, value); - return this; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#getBodyParameters() - */ - @Override - public Map getBodyParameters() { - return this.bodyParameters; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getContentType() - */ - @Override - public MediaType getContentType() { - return this.contentType; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#setContentType(javax.ws.rs.core.MediaType) - */ - @Override - public DefaultEntityActionOperation setContentType(MediaType contentType) { - this.contentType = contentType; - return this; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getAcceptType() - */ - @Override - public MediaType getAcceptType() { - return this.acceptType; - } - - /** - * Sets the accept type. - * - * @param acceptType - * the accept type - * @return the default action operation - */ - public DefaultEntityActionOperation setAcceptType(MediaType acceptType) { - this.acceptType = acceptType; - return this; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#getVerb() - */ - @Override - public String getVerb() { - return "POST"; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - if (this.bodyParameters.size() == 0) { - return "{}"; - } else { - String jsonString = ""; - EntityActionBodyParameterMapper mapper = new EntityActionBodyParameterMapper(); - jsonString = mapper.toString(this.bodyParameters); - return jsonString; - } - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #processResponse(java.lang.Object) - */ - @Override - public Object processResponse(Object rawResponse) throws ServiceException { - PipelineHelpers.throwIfNotSuccess((ClientResponse) rawResponse); - return rawResponse; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#addBodyParameter(java.lang.String, - * java.lang.Object) - */ - @Override - public EntityActionOperation addBodyParameter(String key, Object value) { - this.bodyParameters.put(key, value); - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityTypeActionOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityTypeActionOperation.java deleted file mode 100644 index 115adeef1427..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityTypeActionOperation.java +++ /dev/null @@ -1,215 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.core.util.MultivaluedMapImpl; - -/** - * The Class DefaultTypeActionOperation. - * - * @param - * the generic type - */ -public class DefaultEntityTypeActionOperation implements - EntityTypeActionOperation { - - /** The name. */ - private String name; - - /** The content type. */ - private MediaType contentType = MediaType.APPLICATION_XML_TYPE; - - /** The accept type. */ - private MediaType acceptType = MediaType.APPLICATION_ATOM_XML_TYPE; - - /** The query parameters. */ - private final MultivaluedMap queryParameters; - - /** The proxy data. */ - private EntityProxyData proxyData; - - /** - * Instantiates a new default type action operation. - * - * @param name - * the name - */ - public DefaultEntityTypeActionOperation(String name) { - this(); - this.name = name; - } - - /** - * Instantiates a new default type action operation. - */ - public DefaultEntityTypeActionOperation() { - this.queryParameters = new MultivaluedMapImpl(); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityTypeActionOperation - * #processTypeResponse(com.sun.jersey.api.client.ClientResponse) - */ - @Override - public T processTypeResponse(ClientResponse clientResponse) { - return null; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityTypeActionOperation#getQueryParameters() - */ - @Override - public MultivaluedMap getQueryParameters() { - return this.queryParameters; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityTypeActionOperation#getVerb() - */ - @Override - public String getVerb() { - return "GET"; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityTypeActionOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - return null; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media.entityoperations. - * EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - this.proxyData = proxyData; - } - - public EntityProxyData getProxyData() { - return this.proxyData; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getUri() - */ - @Override - public String getUri() { - return this.name; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getContentType() - */ - @Override - public MediaType getContentType() { - return this.contentType; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getAcceptType() - */ - @Override - public MediaType getAcceptType() { - return this.acceptType; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #processResponse(java.lang.Object) - */ - @Override - public Object processResponse(Object rawResponse) throws ServiceException { - return null; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityTypeActionOperation#addQueryParameter(java.lang.String, - * java.lang.String) - */ - @Override - public DefaultEntityTypeActionOperation addQueryParameter(String key, - String value) { - this.queryParameters.add(key, value); - return this; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityTypeActionOperation#setContentType(javax.ws.rs.core.MediaType) - */ - @Override - public EntityTypeActionOperation setContentType(MediaType contentType) { - this.contentType = contentType; - return this; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityTypeActionOperation#setAcceptType(javax.ws.rs.core.MediaType) - */ - @Override - public EntityTypeActionOperation setAcceptType(MediaType acceptType) { - this.acceptType = acceptType; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultGetOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultGetOperation.java deleted file mode 100644 index 34311506cedb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultGetOperation.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -/** - * Generic implementation of the get operation usable for most entities - * - */ -public class DefaultGetOperation extends EntityOperationSingleResultBase - implements EntityGetOperation { - - /** - * Construct a new DefaultGetOperation to return the given entity id - * - * @param entityTypeUri - * Entity set URI - * @param entityId - * id of entity - * @param responseClass - * class to return from the get operation - */ - public DefaultGetOperation(String entityTypeUri, String entityId, - Class responseClass) { - super(new EntityOperationBase.EntityIdUriBuilder(entityTypeUri, - entityId), responseClass); - } - - /** - * Construct a new DefaultGetOperation to return the entity from the given - * uri - * - * @param uri - * Uri for entity - * @param responseClass - * class to return from the get operation - */ - public DefaultGetOperation(String uri, Class responseClass) { - super(uri, responseClass); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultListOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultListOperation.java deleted file mode 100644 index 49ae17daf9ac..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultListOperation.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import javax.ws.rs.core.MultivaluedMap; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.sun.jersey.api.client.GenericType; -import com.sun.jersey.core.util.MultivaluedMapImpl; - -/** - * Generic implementation of the list operation, usable by most entities - * - */ -public class DefaultListOperation extends EntityOperationBase implements - EntityListOperation { - private final MultivaluedMap queryParameters; - private final GenericType> responseType; - - public DefaultListOperation(String entityUri, - GenericType> responseType) { - super(entityUri); - queryParameters = new MultivaluedMapImpl(); - this.responseType = responseType; - } - - public DefaultListOperation(String entityUri, - GenericType> responseType, - MultivaluedMap queryParameters) { - this(entityUri, responseType); - this.queryParameters.putAll(queryParameters); - } - - /** - * Add a "$top" query parameter to set the number of values to return - * - * @param topValue - * number of values to return - * @return this - */ - public DefaultListOperation setTop(int topValue) { - queryParameters.add("$top", Integer.toString(topValue)); - return this; - } - - /** - * Add a "$skip" query parameter to set the number of values to skip - * - * @param skipValue - * the number of values to skip - * @return this - */ - public DefaultListOperation setSkip(int skipValue) { - queryParameters.add("$skip", Integer.toString(skipValue)); - return this; - } - - /** - * Add an arbitrary query parameter - * - * @param parameterName - * name of query parameter - * @param parameterValue - * value for query parameter - * @return this - */ - public DefaultListOperation set(String parameterName, - String parameterValue) { - queryParameters.add(parameterName, parameterValue); - return this; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entities.EntityListOperation - * #getQueryParameters() - */ - @Override - public MultivaluedMap getQueryParameters() { - return queryParameters; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entities.EntityListOperation - * #getResponseGenericType() - */ - @Override - public GenericType> getResponseGenericType() { - return responseType; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperationBase#processResponse(java.lang.Object) - */ - @Override - public Object processResponse(Object rawResponse) throws ServiceException { - return rawResponse; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityActionBodyParameterMapper.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityActionBodyParameterMapper.java deleted file mode 100644 index 105fc2cb909c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityActionBodyParameterMapper.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.io.IOException; -import java.io.StringWriter; -import java.io.Writer; -import java.util.Map; - -import org.codehaus.jackson.JsonGenerationException; -import org.codehaus.jackson.map.JsonMappingException; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.SerializationConfig; - -/** - * The Class entity action body parameter mapper. - */ -public class EntityActionBodyParameterMapper { - - /** The mapper. */ - private ObjectMapper mapper; - - /** - * Instantiates a new entity action body parameter mapper. - */ - public EntityActionBodyParameterMapper() { - mapper = new ObjectMapper(); - mapper.configure(SerializationConfig.Feature.WRITE_DATES_AS_TIMESTAMPS, - false); - } - - /** - * To string. - * - * @param value - * the value - * @return the string - */ - public String toString(Map value) { - Writer writer = new StringWriter(); - try { - mapper.writeValue(writer, value); - } catch (JsonGenerationException e) { - throw new RuntimeException(e); - } catch (JsonMappingException e) { - throw new RuntimeException(e); - } catch (IOException e) { - throw new RuntimeException(e); - } - return writer.toString(); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityActionOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityActionOperation.java deleted file mode 100644 index 642d06e73fa2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityActionOperation.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.util.Map; - -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; - -/** - * Action operation for Entities. - */ -public interface EntityActionOperation extends EntityOperation { - - /** - * Gets the query parameters. - * - * @return the query parameters - */ - MultivaluedMap getQueryParameters(); - - /** - * Adds the query parameter. - * - * @param key - * the key - * @param value - * the value - * @return the entity action operation - */ - EntityActionOperation addQueryParameter(String key, String value); - - /** - * Gets the verb. - * - * @return the verb - */ - String getVerb(); - - /** - * Gets the request contents. - * - * @return the request contents - */ - Object getRequestContents(); - - /** - * Sets the content type. - * - * @param contentType - * the content type - * @return the default action operation - */ - EntityActionOperation setContentType(MediaType contentType); - - /** - * Gets the body parameters. - * - * @return the body parameters - */ - Map getBodyParameters(); - - /** - * Adds the body parameter. - * - * @param key - * the key - * @param value - * the value - * @return the entity action operation - */ - EntityActionOperation addBodyParameter(String key, Object value); -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityBatchOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityBatchOperation.java deleted file mode 100644 index 6cdad409fc91..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityBatchOperation.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import javax.xml.bind.JAXBElement; -import javax.xml.namespace.QName; - -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.atom.LinkType; -import com.microsoft.windowsazure.services.media.implementation.content.Constants; - -public class EntityBatchOperation { - - private String verb; - private EntryType entryType; - - public EntityBatchOperation() { - this.entryType = new EntryType(); - } - - public EntryType getEntryType() { - return entryType; - } - - public EntityBatchOperation setEntityType(EntryType entryType) { - this.entryType = entryType; - return this; - } - - protected EntityBatchOperation setVerb(String verb) { - this.verb = verb; - return this; - } - - public String getVerb() { - return this.verb; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - public EntityBatchOperation addContentObject(Object contentObject) { - ContentType atomContent = new ContentType(); - atomContent.setType("application/xml"); - atomContent - .getContent() - .add(new JAXBElement(new QName(Constants.ODATA_METADATA_NS, - "properties"), contentObject.getClass(), contentObject)); - - this.entryType.getEntryChildren().add( - new JAXBElement(new QName(Constants.ATOM_NS, "content"), - ContentType.class, atomContent)); - return this; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - protected EntityBatchOperation addLink(String title, String href, - String type, String rel) { - LinkType linkType = new LinkType(); - linkType.setTitle(title); - linkType.setHref(href); - linkType.setType(type); - linkType.setRel(rel); - this.entryType.getEntryChildren().add( - new JAXBElement(new QName(Constants.ATOM_NS, "link"), - LinkType.class, linkType)); - return this; - - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityContract.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityContract.java deleted file mode 100644 index 36ada552644d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityContract.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.ListResult; - -/** - * Contract for interacting with the back end service providing various odata - * entities. - * - */ -public interface EntityContract { - - /** - * Create a new instance of an entity. - * - * @param - * the generic type - * @param creator - * Object providing the details of the entity to be created - * @return the t - * @throws ServiceException - * the service exception The created entity - */ - T create(EntityCreateOperation creator) throws ServiceException; - - /** - * Retrieve an existing entity by id. - * - * @param - * the generic type - * @param getter - * object providing the details of the entity to be retrieved - * @return The retrieved entity - * @throws ServiceException - * the service exception - */ - T get(EntityGetOperation getter) throws ServiceException; - - /** - * Retrieve a list of entities. - * - * @param - * the generic type - * @param lister - * object providing details of entities to list - * @return The resulting list - * @throws ServiceException - * the service exception - */ - ListResult list(EntityListOperation lister) - throws ServiceException; - - /** - * Update an existing entity. - * - * @param updater - * Object providing details of the update - * @throws ServiceException - * the service exception - */ - String update(EntityUpdateOperation updater) throws ServiceException; - - /** - * Delete an entity. - * - * @param deleter - * Object providing details of the delete - * @return - * @throws ServiceException - * the service exception - */ - String delete(EntityDeleteOperation deleter) throws ServiceException; - - /** - * Perform an action on an entity. - * - * @param action - * Object providing details of the action - * @return - * @throws ServiceException - * the service exception - */ - String action(EntityActionOperation action) throws ServiceException; - - /** - * Action. - * - * @param - * the generic type - * @param entityActionOperation - * the entity action operation - * @return the t - * @throws ServiceException - * the service exception - */ - T action(EntityTypeActionOperation entityActionOperation) - throws ServiceException; - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityCreateOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityCreateOperation.java deleted file mode 100644 index bcb6dec2d74a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityCreateOperation.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import com.microsoft.windowsazure.exception.ServiceException; - -/** - * The Interface EntityCreateOperation. - * - * @param - * the generic type - */ -public interface EntityCreateOperation extends - EntityOperationSingleResult { - - /** - * Get the object to be sent to the server containing the request data for - * entity creation. - * - * @return The payload to be marshalled and sent to the server. - * @throws ServiceException - * the service exception - */ - Object getRequestContents() throws ServiceException; - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityDeleteOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityDeleteOperation.java deleted file mode 100644 index c0203287e094..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityDeleteOperation.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -public interface EntityDeleteOperation { - - /** - * Supplies the current proxy information to the action. - * - * @param proxyData - */ - void setProxyData(EntityProxyData proxyData); - - /** - * Get the URI to use to delete an entity - * - * @return The uri - */ - String getUri(); -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityGetOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityGetOperation.java deleted file mode 100644 index f9a34fce9990..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityGetOperation.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -/** - * Get operation for Entities - * - */ -public interface EntityGetOperation extends EntityOperationSingleResult { -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityLinkOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityLinkOperation.java deleted file mode 100644 index d0ea4e7ffcc2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityLinkOperation.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.io.UnsupportedEncodingException; -import java.net.URI; -import java.net.URLEncoder; -import java.security.InvalidParameterException; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.namespace.QName; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; - -import com.microsoft.windowsazure.services.media.implementation.content.Constants; -import com.microsoft.windowsazure.services.media.implementation.content.MediaUriType; - -/** - * Generic implementation of $link operation of two entities. - */ -public class EntityLinkOperation extends DefaultActionOperation { - - /** The primary entity set. */ - private final String primaryEntitySet; - - /** The primary entity id. */ - private final String primaryEntityId; - - /** The secondary entity set. */ - private final String secondaryEntitySet; - - /** The secondary entity uri. */ - private final URI secondaryEntityUri; - - /** The jaxb context. */ - private final JAXBContext jaxbContext; - - /** The marshaller. */ - private final Marshaller marshaller; - - /** The document builder. */ - private final DocumentBuilder documentBuilder; - - /** The document builder factory. */ - private final DocumentBuilderFactory documentBuilderFactory; - - /** - * Instantiates a new entity link operation. - * - * @param primaryEntitySet - * the primary entity set - * @param primaryEntityId - * the primary entity id - * @param secondaryEntitySet - * the secondary entity set - * @param secondaryEntityUri - * the secondary entity uri - */ - public EntityLinkOperation(String primaryEntitySet, String primaryEntityId, - String secondaryEntitySet, URI secondaryEntityUri) { - super(); - this.primaryEntitySet = primaryEntitySet; - this.primaryEntityId = primaryEntityId; - this.secondaryEntitySet = secondaryEntitySet; - this.secondaryEntityUri = secondaryEntityUri; - try { - jaxbContext = JAXBContext.newInstance(MediaUriType.class); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - try { - marshaller = jaxbContext.createMarshaller(); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - documentBuilderFactory = DocumentBuilderFactory.newInstance(); - try { - documentBuilder = documentBuilderFactory.newDocumentBuilder(); - } catch (ParserConfigurationException e) { - throw new RuntimeException(e); - } - - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entities.EntityDeleteOperation - * #getUri() - */ - @Override - public String getUri() { - String escapedEntityId; - try { - escapedEntityId = URLEncoder.encode(primaryEntityId, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new InvalidParameterException( - "UTF-8 encoding is not supported."); - } - return String.format("%s('%s')/$links/%s", primaryEntitySet, - escapedEntityId, secondaryEntitySet); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * DefaultActionOperation#getVerb() - */ - @Override - public String getVerb() { - return "POST"; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * DefaultActionOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - MediaUriType mediaUriType = new MediaUriType(); - mediaUriType.setUri(getProxyData().getServiceUri().toString() - + this.secondaryEntityUri.toString()); - JAXBElement mediaUriTypeElement = new JAXBElement( - new QName(Constants.ODATA_DATA_NS, "uri"), MediaUriType.class, - mediaUriType); - Document document = documentBuilder.newDocument(); - document.setXmlStandalone(true); - try { - marshaller.marshal(mediaUriTypeElement, document); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - return document; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityListOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityListOperation.java deleted file mode 100644 index 80d0d146a89b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityListOperation.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import javax.ws.rs.core.MultivaluedMap; - -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.sun.jersey.api.client.GenericType; - -/** - * Operation class to retrieve a list of entities - * - */ -public interface EntityListOperation extends EntityOperation { - - /** - * Get query parameters to add to the uri - * - * @return The query parameters collection - */ - MultivaluedMap getQueryParameters(); - - /** - * Get a GenericType object representing the result list type - * - * @return the type of the operation's result - */ - GenericType> getResponseGenericType(); -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperation.java deleted file mode 100644 index 7c824905301e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperation.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import javax.ws.rs.core.MediaType; - -import com.microsoft.windowsazure.exception.ServiceException; - -public interface EntityOperation { - - /** - * Supplies the current proxy information to the action. - * - * @param proxyData - */ - void setProxyData(EntityProxyData proxyData); - - /** - * Get the URI the creation request should be sent to. - * - * @return The uri - */ - String getUri(); - - /** - * Get the MIME type for the content that's being sent to the server. - * - * @return The MIME type - * @throws ServiceException - */ - MediaType getContentType(); - - /** - * Get the MIME type that we're expecting the server to send back. - */ - MediaType getAcceptType(); - - /** - * Process response process. - * - * @param rawResponse - * the raw response - * @return the object - * @throws ServiceException - * the service exception - */ - Object processResponse(Object rawResponse) throws ServiceException; - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationBase.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationBase.java deleted file mode 100644 index da30c9d99621..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationBase.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.security.InvalidParameterException; - -import javax.ws.rs.core.MediaType; - -import com.microsoft.windowsazure.exception.ServiceException; - -/** - * Default implementation of EntityOperation to provide default values for - * common methods. - * - */ -public abstract class EntityOperationBase implements EntityOperation { - - /** The uri builder. */ - private final EntityUriBuilder uriBuilder; - - /** The proxy data. */ - private EntityProxyData proxyData; - - /** - * Instantiates a new entity operation base. - * - * @param uri - * the uri - */ - protected EntityOperationBase(final String uri) { - this.uriBuilder = new EntityUriBuilder() { - @Override - public String getUri() { - return uri; - } - }; - } - - /** - * Instantiates a new entity operation base. - * - * @param uriBuilder - * the uri builder - */ - protected EntityOperationBase(EntityUriBuilder uriBuilder) { - this.uriBuilder = uriBuilder; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media.entityoperations. - * EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - this.proxyData = proxyData; - } - - /** - * Get the currently set proxy data. - * - * @return the proxy data - */ - protected EntityProxyData getProxyData() { - return proxyData; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entities.EntityOperation#getUri - * () - */ - @Override - public String getUri() { - return uriBuilder.getUri(); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entities.EntityOperation# - * getContentType() - */ - @Override - public MediaType getContentType() { - return MediaType.APPLICATION_ATOM_XML_TYPE; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entities.EntityOperation# - * getAcceptType() - */ - @Override - public MediaType getAcceptType() { - return MediaType.APPLICATION_ATOM_XML_TYPE; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #processResponse(java.lang.Object) - */ - @Override - public Object processResponse(Object rawResponse) throws ServiceException { - return rawResponse; - } - - /** - * The Interface EntityUriBuilder. - */ - public interface EntityUriBuilder { - - /** - * Gets the uri. - * - * @return the uri - */ - String getUri(); - } - - /** - * The Class EntityIdUriBuilder. - */ - public static class EntityIdUriBuilder implements EntityUriBuilder { - - /** The entity type. */ - private final String entityType; - - /** The entity id. */ - private final String entityId; - - /** The action name. */ - private String actionName; - - /** - * Instantiates a new entity id uri builder. - * - * @param entityName - * the entity name - * @param entityId - * the entity id - */ - public EntityIdUriBuilder(String entityName, String entityId) { - super(); - this.entityType = entityName; - this.entityId = entityId; - } - - /** - * Sets the action name. - * - * @param actionName - * the action name - * @return the entity id uri builder - */ - public EntityIdUriBuilder setActionName(String actionName) { - this.actionName = actionName; - return this; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entities.EntityOperationBase - * .EntityUriBuilder#getUri() - */ - @Override - public String getUri() { - String escapedEntityId; - try { - escapedEntityId = URLEncoder.encode(entityId, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new InvalidParameterException(entityId); - } - String result = null; - if ((this.actionName == null) || this.actionName.isEmpty()) { - result = String.format("%s('%s')", entityType, escapedEntityId); - } else { - result = String.format("%s('%s')/%s", entityType, - escapedEntityId, this.actionName); - } - return result; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationSingleResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationSingleResult.java deleted file mode 100644 index a98090a14e89..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationSingleResult.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -public interface EntityOperationSingleResult extends EntityOperation { - /** - * Get the Java class object for the type that the response should be - * unmarshalled into. - * - * @return Class object for response. - */ - Class getResponseClass(); -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationSingleResultBase.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationSingleResultBase.java deleted file mode 100644 index 19a68c1dbaae..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationSingleResultBase.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import com.microsoft.windowsazure.exception.ServiceException; - -/** - * - * - */ -public class EntityOperationSingleResultBase extends EntityOperationBase - implements EntityOperationSingleResult { - private final Class responseClass; - - /** - * - */ - public EntityOperationSingleResultBase(String uri, Class responseClass) { - super(uri); - this.responseClass = responseClass; - } - - public EntityOperationSingleResultBase( - EntityOperationBase.EntityUriBuilder uriBuilder, - Class responseClass) { - super(uriBuilder); - this.responseClass = responseClass; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entities. - * EntityOperationSingleResult#getResponseClass() - */ - @Override - public Class getResponseClass() { - return responseClass; - } - - @Override - public Object processResponse(Object rawResponse) throws ServiceException { - return rawResponse; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityProxyData.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityProxyData.java deleted file mode 100644 index ec5a3c688b03..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityProxyData.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.net.URI; - -/** - * Interface used to communicate details about the proxy to the operations, if - * they need it. - * - */ -public interface EntityProxyData { - /** - * Gets the absolute URI currently being used by proxy. - * - * @return The URI - */ - URI getServiceUri(); -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityRestProxy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityRestProxy.java deleted file mode 100644 index 193603463a25..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityRestProxy.java +++ /dev/null @@ -1,302 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.util.List; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -import javax.ws.rs.core.MediaType; - -import com.microsoft.windowsazure.core.pipeline.PipelineHelpers; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.WebResource; -import com.sun.jersey.api.client.WebResource.Builder; -import com.sun.jersey.api.client.filter.ClientFilter; - -/** - * The Class EntityRestProxy. - */ -public abstract class EntityRestProxy implements EntityContract { - - /** The executor service. */ - private final ExecutorService executorService; - /** The channel. */ - private final Client channel; - /** The filters. */ - private final ClientFilter[] filters; - - /** - * Instantiates a new entity rest proxy. - * - * @param channel - * the channel - * @param filters - * the filters - */ - public EntityRestProxy(Client channel, ClientFilter[] filters) { - this.channel = channel; - this.filters = filters; - this.executorService = Executors.newCachedThreadPool(); - } - - /** - * Gets the channel. - * - * @return the channel - */ - protected Client getChannel() { - return channel; - } - - /** - * Gets the executor service. - * - * @return the executor service - */ - protected ExecutorService getExecutorService() { - return executorService; - } - - /** - * Gets the filters. - * - * @return the filters - */ - protected ClientFilter[] getFilters() { - return filters; - } - - /** - * Get the proxy data to pass to operations. - * - * @return The proxy data. - */ - protected abstract EntityProxyData createProxyData(); - - /** - * Gets the resource. - * - * @param entityName - * the entity name - * @return the resource - */ - private WebResource getResource(String entityName) { - WebResource resource = channel.resource(entityName); - for (ClientFilter filter : filters) { - resource.addFilter(filter); - } - return resource; - } - - /** - * Gets the resource. - * - * @param operation - * the operation - * @return the resource - * @throws ServiceException - * the service exception - */ - private Builder getResource(EntityOperation operation) - throws ServiceException { - return getResource(operation.getUri()).type(operation.getContentType()) - .accept(operation.getAcceptType()); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #create(com.microsoft.windowsazure.services.media.entityoperations. - * EntityCreateOperation) - */ - @SuppressWarnings("unchecked") - @Override - public T create(EntityCreateOperation creator) - throws ServiceException { - creator.setProxyData(createProxyData()); - Object rawResponse = getResource(creator).post( - creator.getResponseClass(), creator.getRequestContents()); - Object processedResponse = creator.processResponse(rawResponse); - return (T) processedResponse; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #get(com.microsoft.windowsazure.services.media.entityoperations. - * EntityGetOperation) - */ - @SuppressWarnings("unchecked") - @Override - public T get(EntityGetOperation getter) throws ServiceException { - getter.setProxyData(createProxyData()); - Object rawResponse = getResource(getter).get(getter.getResponseClass()); - Object processedResponse = getter.processResponse(rawResponse); - return (T) processedResponse; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #list(com.microsoft.windowsazure.services.media.entityoperations. - * EntityListOperation) - */ - @SuppressWarnings("unchecked") - @Override - public ListResult list(EntityListOperation lister) - throws ServiceException { - lister.setProxyData(createProxyData()); - Object rawResponse = getResource(lister.getUri()) - .queryParams(lister.getQueryParameters()) - .type(lister.getContentType()).accept(lister.getAcceptType()) - .get(lister.getResponseGenericType()); - Object processedResponse = lister.processResponse(rawResponse); - return (ListResult) processedResponse; - - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #update(com.microsoft.windowsazure.services.media.entityoperations. - * EntityUpdateOperation) - */ - @Override - public String update(EntityUpdateOperation updater) throws ServiceException { - updater.setProxyData(createProxyData()); - ClientResponse clientResponse = getResource(updater).header("X-HTTP-METHOD", - "MERGE").post(ClientResponse.class, - updater.getRequestContents()); - PipelineHelpers.throwIfNotSuccess(clientResponse); - updater.processResponse(clientResponse); - if (clientResponse.getHeaders().containsKey("operation-id")) { - List operationIds = clientResponse.getHeaders().get("operation-id"); - if (operationIds.size() >= 0) { - return operationIds.get(0); - } - } - return null; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #delete(com.microsoft.windowsazure.services.media.entityoperations. - * EntityDeleteOperation) - * @return operation-id if any otherwise null. - */ - @Override - public String delete(EntityDeleteOperation deleter) throws ServiceException { - deleter.setProxyData(createProxyData()); - ClientResponse clientResponse = getResource(deleter.getUri()).delete(ClientResponse.class); - PipelineHelpers.throwIfNotSuccess(clientResponse); - if (clientResponse.getHeaders().containsKey("operation-id")) { - List operationIds = clientResponse.getHeaders().get("operation-id"); - if (operationIds.size() >= 0) { - return operationIds.get(0); - } - } - return null; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #action(com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation) - */ - @Override - public T action(EntityTypeActionOperation entityTypeActionOperation) - throws ServiceException { - entityTypeActionOperation.setProxyData(createProxyData()); - Builder webResource = getResource(entityTypeActionOperation.getUri()) - .queryParams(entityTypeActionOperation.getQueryParameters()) - .accept(entityTypeActionOperation.getAcceptType()) - .accept(MediaType.APPLICATION_XML_TYPE) - .entity(entityTypeActionOperation.getRequestContents(), - MediaType.APPLICATION_XML_TYPE) - .type(MediaType.APPLICATION_XML); - - ClientResponse clientResponse = webResource.method( - entityTypeActionOperation.getVerb(), ClientResponse.class); - return entityTypeActionOperation.processTypeResponse(clientResponse); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #action(com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation) - */ - @Override - public String action(EntityActionOperation entityActionOperation) - throws ServiceException { - ClientResponse clientResponse = getActionClientResponse(entityActionOperation); - entityActionOperation.processResponse(clientResponse); - - //PipelineHelpers.throwIfNotSuccess(clientResponse); - - if (clientResponse.getHeaders().containsKey("operation-id")) { - List operationIds = clientResponse.getHeaders().get("operation-id"); - if (operationIds.size() >= 0) { - return operationIds.get(0); - } - } - return null; - } - - /** - * Gets the action client response. - * - * @param entityActionOperation - * the entity action operation - * @return the action client response - */ - private ClientResponse getActionClientResponse( - EntityActionOperation entityActionOperation) { - entityActionOperation.setProxyData(createProxyData()); - Builder webResource = getResource(entityActionOperation.getUri()) - .queryParams(entityActionOperation.getQueryParameters()) - .accept(entityActionOperation.getAcceptType()) - .accept(MediaType.APPLICATION_XML_TYPE) - .type(MediaType.APPLICATION_XML_TYPE); - if (entityActionOperation.getRequestContents() != null) { - webResource = webResource.entity( - entityActionOperation.getRequestContents(), - entityActionOperation.getContentType()); - } - return webResource.method(entityActionOperation.getVerb(), - ClientResponse.class); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityTypeActionOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityTypeActionOperation.java deleted file mode 100644 index d089aaff24c3..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityTypeActionOperation.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; - -import com.sun.jersey.api.client.ClientResponse; - -/** - * The Interface EntityTypeActionOperation. - * - * @param - * the generic type - */ -public interface EntityTypeActionOperation extends EntityOperation { - - /** - * Process type response. - * - * @param clientResponse - * the client response - * @return the t - */ - T processTypeResponse(ClientResponse clientResponse); - - /** - * Gets the query parameters. - * - * @return the query parameters - */ - MultivaluedMap getQueryParameters(); - - /** - * Adds the query parameter. - * - * @param key - * the key - * @param value - * the value - * @return the entity action operation - */ - EntityTypeActionOperation addQueryParameter(String key, String value); - - /** - * Gets the verb. - * - * @return the verb - */ - String getVerb(); - - /** - * Gets the request contents. - * - * @return the request contents - */ - Object getRequestContents(); - - /** - * Sets the content type. - * - * @param contentType - * the content type - * @return the entity type action operation - */ - EntityTypeActionOperation setContentType(MediaType contentType); - - /** - * Sets the accept type. - * - * @param acceptType - * the accept type - * @return the entity type action operation - */ - EntityTypeActionOperation setAcceptType(MediaType acceptType); - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityUnlinkOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityUnlinkOperation.java deleted file mode 100644 index 5ed5695613d7..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityUnlinkOperation.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.security.InvalidParameterException; - -/** - * Generic implementation of $link operation of two entities. - */ -public class EntityUnlinkOperation extends DefaultDeleteOperation { - - /** The primary entity set. */ - private final String primaryEntitySet; - - /** The primary entity id. */ - private final String primaryEntityId; - - /** The secondary entity set. */ - private final String secondaryEntitySet; - - /** The secondary entity id. */ - private final String secondaryEntityId; - - /** - * Instantiates a new entity unlink operation. - * - * @param primaryEntitySet - * the primary entity set - * @param primaryEntityId - * the primary entity id - * @param secondaryEntitySet - * the secondary entity set - * @param secondaryEntityUri - * the secondary entity id - */ - public EntityUnlinkOperation(String primaryEntitySet, String primaryEntityId, - String secondaryEntitySet, String secondaryEntityId) { - super(primaryEntitySet, primaryEntityId); - this.primaryEntitySet = primaryEntitySet; - this.primaryEntityId = primaryEntityId; - this.secondaryEntitySet = secondaryEntitySet; - this.secondaryEntityId = secondaryEntityId; - } - - @Override - public String getUri() { - String escapedPrimaryEntityId; - String escapedSecondaryEntityId; - try { - escapedPrimaryEntityId = URLEncoder.encode(primaryEntityId, "UTF-8"); - escapedSecondaryEntityId = URLEncoder.encode(secondaryEntityId, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new InvalidParameterException( - "UTF-8 encoding is not supported."); - } - return String.format("%s('%s')/$links/%s('%s')", primaryEntitySet, - escapedPrimaryEntityId, secondaryEntitySet, escapedSecondaryEntityId); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityUpdateOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityUpdateOperation.java deleted file mode 100644 index 7917c91a24dd..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityUpdateOperation.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -/** - * - * - */ -public interface EntityUpdateOperation extends EntityOperation { - /** - * Get the contents of the merge request that will be sent to the server. - * - * @return The payload object - */ - Object getRequestContents(); -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityWithOperationIdentifier.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityWithOperationIdentifier.java deleted file mode 100644 index 145b34edef60..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityWithOperationIdentifier.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.microsoft.windowsazure.services.media.entityoperations; - -public interface EntityWithOperationIdentifier { - - String getOperationId(); - - void setOperationId(String string); - - boolean hasOperationIdentifier(); - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/package.html deleted file mode 100644 index e7819f147963..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the media service OData operation class, interface, and utility classes. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ActiveToken.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ActiveToken.java deleted file mode 100644 index 062fa73b09c3..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ActiveToken.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.util.Date; - -/** - * A class representing active token. - * - */ -public class ActiveToken { - - private Date expiresUtc; - private String accessToken; - - /** - * Gets the expiration time in UTC. - * - * @return The token expiration time in UTC. - */ - public Date getExpiresUtc() { - return expiresUtc; - } - - /** - * Sets the token expiration time in UTC. - * - * @param expiresUtc - */ - public void setExpiresUtc(Date expiresUtc) { - this.expiresUtc = expiresUtc; - } - - /** - * Gets access token. - * - * @return String - */ - public String getAccessToken() { - return this.accessToken; - } - - /** - * Sets the access token. - * - * @param accessToken - */ - public void setAccessToken(String accessToken) { - this.accessToken = accessToken; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/BatchMimeMultipart.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/BatchMimeMultipart.java deleted file mode 100644 index 03369112c670..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/BatchMimeMultipart.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.OutputStream; - -import javax.mail.BodyPart; -import javax.mail.MessagingException; -import javax.mail.internet.MimeMultipart; - -public class BatchMimeMultipart extends MimeMultipart { - - public BatchMimeMultipart(SetBoundaryMultipartDataSource setBoundaryMultipartDataSource) throws MessagingException { - super(setBoundaryMultipartDataSource); - } - - @Override - public synchronized void writeTo(OutputStream os) - throws IOException, MessagingException { - - resetInputStreams(); - super.writeTo(os); - } - - // reset all input streams to allow redirect filter to write the output twice - private void resetInputStreams() throws IOException, MessagingException { - for (int ix = 0; ix < this.getCount(); ix++) { - BodyPart part = this.getBodyPart(ix); - if (part.getContent() instanceof MimeMultipart) { - MimeMultipart subContent = (MimeMultipart) part.getContent(); - for (int jx = 0; jx < subContent.getCount(); jx++) { - BodyPart subPart = subContent.getBodyPart(jx); - if (subPart.getContent() instanceof ByteArrayInputStream) { - ((ByteArrayInputStream) subPart.getContent()).reset(); - } - } - } - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/BatchMimeMultipartBodyWritter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/BatchMimeMultipartBodyWritter.java deleted file mode 100644 index 1c3e1ae87ade..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/BatchMimeMultipartBodyWritter.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.IOException; -import java.io.OutputStream; -import java.lang.annotation.Annotation; -import java.lang.reflect.Type; - -import javax.mail.MessagingException; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.MessageBodyWriter; - -@Produces("multipart/mixed") -public class BatchMimeMultipartBodyWritter implements MessageBodyWriter { - - @Override - public long getSize(BatchMimeMultipart bmm, Class arg1, Type arg2, Annotation[] arg3, MediaType arg4) { - return -1; - } - - @Override - public boolean isWriteable(Class type, Type arg1, Annotation[] arg2, MediaType arg3) { - return type == BatchMimeMultipart.class; - } - - @Override - public void writeTo(BatchMimeMultipart t, Class arg1, Type arg2, Annotation[] arg3, MediaType arg4, - MultivaluedMap arg5, OutputStream entityStream) throws IOException, WebApplicationException { - try { - t.writeTo(entityStream); - } catch (MessagingException ex) { - throw new WebApplicationException(ex); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java deleted file mode 100644 index 5fa40cd64206..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java +++ /dev/null @@ -1,578 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.UnsupportedEncodingException; -import java.net.URI; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import javax.activation.DataHandler; -import javax.activation.DataSource; -import javax.mail.BodyPart; -import javax.mail.Header; -import javax.mail.MessagingException; -import javax.mail.internet.InternetHeaders; -import javax.mail.internet.MimeBodyPart; -import javax.mail.internet.MimeMultipart; -import javax.mail.internet.MimePartDataSource; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriBuilder; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.ParserConfigurationException; - -import com.microsoft.windowsazure.core.utils.InputStreamDataSource; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.EntityBatchOperation; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.models.Job; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.Task; -import com.microsoft.windowsazure.services.media.models.TaskInfo; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.UniformInterfaceException; -import com.sun.jersey.core.header.InBoundHeaders; -import com.sun.jersey.core.util.ReaderWriter; - -/** - * The Class MediaBatchOperations. - */ -public class MediaBatchOperations { - - private static final int BUFFER_SIZE = 1024; - - private static final int HTTP_ERROR = 400; - - /** The operations. */ - private final List entityBatchOperations; - - /** The service uri. */ - private final URI serviceURI; - - /** The Odata atom marshaller. */ - private final ODataAtomMarshaller oDataAtomMarshaller; - - /** The o data atom unmarshaller. */ - private final ODataAtomUnmarshaller oDataAtomUnmarshaller; - - private final String batchId; - - /** - * Instantiates a new media batch operations. - * - * @param serviceURI - * the service uri - * @throws ParserConfigurationException - * @throws JAXBException - */ - public MediaBatchOperations(URI serviceURI) throws JAXBException, - ParserConfigurationException { - if (serviceURI == null) { - throw new IllegalArgumentException( - "The service URI cannot be null."); - } - this.serviceURI = serviceURI; - this.oDataAtomMarshaller = new ODataAtomMarshaller(); - this.oDataAtomUnmarshaller = new ODataAtomUnmarshaller(); - this.entityBatchOperations = new ArrayList(); - batchId = String.format("batch_%s", UUID.randomUUID().toString()); - } - - /** - * Gets the mime multipart. - * - * @return the mime multipart - * @throws MessagingException - * the messaging exception - * @throws IOException - * Signals that an I/O exception has occurred. - * @throws JAXBException - * the jAXB exception - */ - public MimeMultipart getMimeMultipart() throws MessagingException, - IOException, JAXBException { - List bodyPartContents = createRequestBody(); - return toMimeMultipart(bodyPartContents); - - } - - private List createRequestBody() throws JAXBException { - List bodyPartContents = new ArrayList(); - int contentId = 1; - - URI jobURI = UriBuilder.fromUri(serviceURI).path("Jobs").build(); - int jobContentId = addJobPart(bodyPartContents, jobURI, contentId); - contentId++; - - URI taskURI = UriBuilder.fromUri(serviceURI) - .path(String.format("$%d", jobContentId)).path("Tasks").build(); - addTaskPart(bodyPartContents, taskURI, contentId); - return bodyPartContents; - - } - - /** - * Adds the job part. - * - * @param bodyPartContents - * the body part contents - * @param contentId - * the content id - * @return the int - * @throws JAXBException - * the jAXB exception - */ - private int addJobPart(List bodyPartContents, URI jobURI, - int contentId) throws JAXBException { - int jobContentId = contentId; - validateJobOperation(); - - for (EntityBatchOperation entityBatchOperation : entityBatchOperations) { - DataSource bodyPartContent = null; - if (entityBatchOperation instanceof Job.CreateBatchOperation) { - Job.CreateBatchOperation jobCreateBatchOperation = (Job.CreateBatchOperation) entityBatchOperation; - jobContentId = contentId; - bodyPartContent = createBatchCreateEntityPart( - jobCreateBatchOperation.getVerb(), "Jobs", - jobCreateBatchOperation.getEntryType(), jobURI, - contentId); - contentId++; - if (bodyPartContent != null) { - bodyPartContents.add(bodyPartContent); - break; - } - } - } - return jobContentId; - } - - private void validateJobOperation() { - int jobCount = 0; - for (EntityBatchOperation entityBatchOperation : entityBatchOperations) { - if (entityBatchOperation instanceof Job.CreateBatchOperation) { - jobCount++; - } - } - - if (jobCount != 1) { - throw new IllegalArgumentException( - String.format( - "The Job operation is invalid, expect 1 but get %s job(s). ", - jobCount)); - } - } - - /** - * Adds the task part. - * - * @param bodyPartContents - * the body part contents - * @param taskURI - * the task uri - * @param contentId - * the content id - * @throws JAXBException - * the jAXB exception - */ - private void addTaskPart(List bodyPartContents, URI taskURI, - int contentId) throws JAXBException { - for (EntityBatchOperation entityBatchOperation : entityBatchOperations) { - DataSource bodyPartContent = null; - if (entityBatchOperation instanceof Task.CreateBatchOperation) { - Task.CreateBatchOperation createTaskOperation = (Task.CreateBatchOperation) entityBatchOperation; - bodyPartContent = createBatchCreateEntityPart( - createTaskOperation.getVerb(), "Tasks", - createTaskOperation.getEntryType(), taskURI, contentId); - contentId++; - } - - if (bodyPartContent != null) { - bodyPartContents.add(bodyPartContent); - } - } - } - - /** - * To mime multipart. - * - * @param bodyPartContents - * the body part contents - * @return the mime multipart - * @throws MessagingException - * the messaging exception - * @throws IOException - * Signals that an I/O exception has occurred. - */ - private MimeMultipart toMimeMultipart(List bodyPartContents) - throws MessagingException, IOException { - String changeSetId = String.format("changeset_%s", UUID.randomUUID() - .toString()); - MimeMultipart changeSets = createChangeSets(bodyPartContents, - changeSetId); - MimeBodyPart mimeBodyPart = createMimeBodyPart(changeSets, changeSetId); - - MimeMultipart mimeMultipart = new BatchMimeMultipart( - new SetBoundaryMultipartDataSource(batchId)); - mimeMultipart.addBodyPart(mimeBodyPart); - return mimeMultipart; - - } - - private MimeBodyPart createMimeBodyPart(MimeMultipart changeSets, - String changeSetId) throws MessagingException { - MimeBodyPart mimeBodyPart = new MimeBodyPart(); - mimeBodyPart.setContent(changeSets); - String contentType = String.format("multipart/mixed; boundary=%s", - changeSetId); - mimeBodyPart.setHeader("Content-Type", contentType); - return mimeBodyPart; - } - - private MimeMultipart createChangeSets(List bodyPartContents, - String changeSetId) throws MessagingException { - - MimeMultipart changeSets = new MimeMultipart( - new SetBoundaryMultipartDataSource(changeSetId)); - - for (DataSource bodyPart : bodyPartContents) { - MimeBodyPart mimeBodyPart = new MimeBodyPart(); - - mimeBodyPart.setDataHandler(new DataHandler(bodyPart)); - mimeBodyPart.setHeader("Content-Type", bodyPart.getContentType()); - mimeBodyPart.setHeader("Content-Transfer-Encoding", "binary"); - - changeSets.addBodyPart(mimeBodyPart); - } - - return changeSets; - } - - /** - * Creates the batch create entity part. - * - * @param entityName - * the entity name - * @param entity - * the entity - * @param uri - * the uri - * @param contentId - * the content id - * @return the data source - * @throws JAXBException - * the jAXB exception - */ - private DataSource createBatchCreateEntityPart(String verb, - String entityName, EntryType entryType, URI uri, int contentId) - throws JAXBException { - ByteArrayOutputStream stream = new ByteArrayOutputStream(); - this.oDataAtomMarshaller.marshalEntryType(entryType, stream); - byte[] bytes = stream.toByteArray(); - - // adds header - InternetHeaders headers = new InternetHeaders(); - headers.addHeader("Content-ID", Integer.toString(contentId)); - headers.addHeader("Content-Type", "application/atom+xml;type=entry"); - headers.addHeader("Content-Length", Integer.toString(bytes.length)); - headers.addHeader("DataServiceVersion", "3.0;NetFx"); - headers.addHeader("MaxDataServiceVersion", "3.0;NetFx"); - - // adds body - ByteArrayOutputStream httpRequest = new ByteArrayOutputStream(); - addHttpMethod(httpRequest, verb, uri); - appendHeaders(httpRequest, headers); - appendEntity(httpRequest, new ByteArrayInputStream(bytes)); - - DataSource bodyPartContent = new InputStreamDataSource( - new ByteArrayInputStream(httpRequest.toByteArray()), - "application/http"); - return bodyPartContent; - } - - /** - * Parses the batch result. - * - * @param response - * the response - * @param mediaBatchOperations - * the media batch operations - * @throws IOException - * Signals that an I/O exception has occurred. - * @throws ServiceException - * the service exception - */ - public void parseBatchResult(ClientResponse response) throws IOException, - ServiceException { - ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - InputStream inputStream = response.getEntityInputStream(); - ReaderWriter.writeTo(inputStream, byteArrayOutputStream); - response.setEntityInputStream(new ByteArrayInputStream( - byteArrayOutputStream.toByteArray())); - JobInfo jobInfo; - - List parts = parseParts(response.getEntityInputStream(), - response.getHeaders().getFirst("Content-Type")); - - if (parts.size() == 0 || parts.size() > entityBatchOperations.size()) { - throw new UniformInterfaceException(String.format( - "Batch response from server does not contain the correct amount " - + "of parts (expecting %d, received %d instead)", - parts.size(), entityBatchOperations.size()), response); - } - - for (int i = 0; i < parts.size(); i++) { - DataSource ds = parts.get(i); - EntityBatchOperation entityBatchOperation = entityBatchOperations - .get(i); - - StatusLine status = StatusLine.create(ds); - InternetHeaders headers = parseHeaders(ds); - InputStream content = parseEntity(ds); - - if (status.getStatus() >= HTTP_ERROR) { - - InBoundHeaders inBoundHeaders = new InBoundHeaders(); - @SuppressWarnings("unchecked") - Enumeration

e = headers.getAllHeaders(); - while (e.hasMoreElements()) { - Header header = e.nextElement(); - inBoundHeaders.putSingle(header.getName(), - header.getValue()); - } - - ClientResponse clientResponse = new ClientResponse( - status.getStatus(), inBoundHeaders, content, null); - - UniformInterfaceException uniformInterfaceException = new UniformInterfaceException( - clientResponse); - throw uniformInterfaceException; - } else if (entityBatchOperation instanceof Job.CreateBatchOperation) { - - try { - jobInfo = oDataAtomUnmarshaller.unmarshalEntry(content, - JobInfo.class); - Job.CreateBatchOperation jobCreateBatchOperation = (Job.CreateBatchOperation) entityBatchOperation; - jobCreateBatchOperation.setJobInfo(jobInfo); - } catch (JAXBException e) { - throw new ServiceException(e); - } - } else if (entityBatchOperation instanceof Task.CreateBatchOperation) { - try { - oDataAtomUnmarshaller.unmarshalEntry(content, - TaskInfo.class); - } catch (JAXBException e) { - throw new ServiceException(e); - } - } - } - } - - /** - * Parses the headers. - * - * @param ds - * the ds - * @return the internet headers - */ - private InternetHeaders parseHeaders(DataSource ds) { - try { - return new InternetHeaders(ds.getInputStream()); - } catch (MessagingException e) { - throw new RuntimeException(e); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - /** - * Parses the entity. - * - * @param ds - * the ds - * @return the input stream - */ - private InputStream parseEntity(DataSource ds) { - try { - return ds.getInputStream(); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - /** - * Parses the parts. - * - * @param entityInputStream - * the entity input stream - * @param contentType - * the content type - * @return the list - */ - private List parseParts(final InputStream entityInputStream, - final String contentType) { - try { - return parsePartsCore(entityInputStream, contentType); - } catch (IOException e) { - throw new RuntimeException(e); - } catch (MessagingException e) { - throw new RuntimeException(e); - } - } - - /** - * Parses the parts core. - * - * @param entityInputStream - * the entity input stream - * @param contentType - * the content type - * @return the list - * @throws MessagingException - * the messaging exception - * @throws IOException - * Signals that an I/O exception has occurred. - */ - private List parsePartsCore(InputStream entityInputStream, - String contentType) throws MessagingException, IOException { - DataSource dataSource = new InputStreamDataSource(entityInputStream, - contentType); - MimeMultipart batch = new MimeMultipart(dataSource); - MimeBodyPart batchBody = (MimeBodyPart) batch.getBodyPart(0); - - MimeMultipart changeSets = new MimeMultipart(new MimePartDataSource( - batchBody)); - - List result = new ArrayList(); - for (int i = 0; i < changeSets.getCount(); i++) { - BodyPart part = changeSets.getBodyPart(i); - - result.add(new InputStreamDataSource(part.getInputStream(), part - .getContentType())); - } - return result; - } - - /** - * Adds the operation. - * - * @param entityBatchOperation - * the operation - */ - public void addOperation(EntityBatchOperation entityBatchOperation) { - this.entityBatchOperations.add(entityBatchOperation); - } - - /** - * Adds the http method. - * - * @param outputStream - * the output stream - * @param verb - * the verb - * @param uri - * the uri - */ - private void addHttpMethod(ByteArrayOutputStream outputStream, String verb, - URI uri) { - try { - String method = String.format("%s %s HTTP/1.1\r\n", verb, uri); - outputStream.write(method.getBytes("UTF-8")); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - /** - * Append headers. - * - * @param outputStream - * the output stream - * @param internetHeaders - * the internet headers - */ - private void appendHeaders(OutputStream outputStream, - InternetHeaders internetHeaders) { - try { - // Headers - @SuppressWarnings("unchecked") - Enumeration
headers = internetHeaders.getAllHeaders(); - while (headers.hasMoreElements()) { - Header header = headers.nextElement(); - String headerLine = String.format("%s: %s\r\n", - header.getName(), header.getValue()); - outputStream.write(headerLine.getBytes("UTF-8")); - } - - // Empty line - outputStream.write("\r\n".getBytes("UTF-8")); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - /** - * Append entity. - * - * @param outputStream - * the output stream - * @param byteArrayInputStream - * the byte array input stream - */ - private void appendEntity(OutputStream outputStream, - ByteArrayInputStream byteArrayInputStream) { - try { - byte[] buffer = new byte[BUFFER_SIZE]; - while (true) { - int bytesRead = byteArrayInputStream.read(buffer); - if (bytesRead <= 0) { - break; - } - outputStream.write(buffer, 0, bytesRead); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - public List getOperations() { - return entityBatchOperations; - } - - public String getBatchId() { - return this.batchId; - } - - public MediaType getContentType() { - Map parameters = new Hashtable(); - parameters.put("boundary", this.batchId); - MediaType contentType = new MediaType("multipart", "mixed", parameters); - return contentType; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBlobContainerWriter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBlobContainerWriter.java deleted file mode 100644 index 7adaed6ad3ed..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBlobContainerWriter.java +++ /dev/null @@ -1,248 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.InputStream; - -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.blob.BlobContract; -import com.microsoft.windowsazure.services.blob.implementation.BlobExceptionProcessor; -import com.microsoft.windowsazure.services.blob.models.BlockList; -import com.microsoft.windowsazure.services.blob.models.CommitBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobBlockOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobResult; -import com.microsoft.windowsazure.services.media.WritableBlobContainerContract; -import com.sun.jersey.api.client.Client; - -/** - * Implementation of WritableBlobContainerContract, used to upload blobs to the - * Media Services storage. - * - */ -public class MediaBlobContainerWriter implements WritableBlobContainerContract { - - private final BlobContract blobService; - private BlobContract restProxy; - - public BlobContract getBlobContract() { - return this.restProxy; - } - - public void setBlobContract(BlobContract blobContract) { - this.restProxy = blobContract; - } - - private final String containerName; - - public MediaBlobContainerWriter(Client client, String accountName, - String blobServiceUri, String containerName, String sasToken) { - this.containerName = containerName; - this.restProxy = new MediaBlobRestProxy(client, accountName, - blobServiceUri, new SASTokenFilter(sasToken)); - this.blobService = new BlobExceptionProcessor(this.restProxy); - } - - private MediaBlobContainerWriter(MediaBlobContainerWriter baseWriter, - ServiceFilter filter) { - this.containerName = baseWriter.containerName; - this.restProxy = baseWriter.restProxy.withFilter(filter); - this.blobService = new BlobExceptionProcessor(this.restProxy); - } - - private MediaBlobContainerWriter(MediaBlobContainerWriter baseWriter) { - this.containerName = baseWriter.containerName; - this.restProxy = baseWriter.restProxy; - this.blobService = new BlobExceptionProcessor(this.restProxy); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.core.JerseyFilterableService#withFilter - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public WritableBlobContainerContract withFilter(ServiceFilter filter) { - MediaBlobContainerWriter mediaBlobContainerWriter = new MediaBlobContainerWriter( - this, filter); - return mediaBlobContainerWriter; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.core.FilterableService# - * withRequestFilterFirst - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public WritableBlobContainerContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter) { - MediaBlobContainerWriter mediaBlobContainerWriter = new MediaBlobContainerWriter( - this); - mediaBlobContainerWriter - .setBlobContract(mediaBlobContainerWriter.getBlobContract() - .withRequestFilterFirst(serviceRequestFilter)); - return mediaBlobContainerWriter; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.core.FilterableService# - * withRequestFilterLast - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public WritableBlobContainerContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter) { - MediaBlobContainerWriter mediaBlobContainerWriter = new MediaBlobContainerWriter( - this); - mediaBlobContainerWriter.setBlobContract(mediaBlobContainerWriter - .getBlobContract().withRequestFilterLast(serviceRequestFilter)); - return mediaBlobContainerWriter; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.core.FilterableService# - * withResponseFilterFirst - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public WritableBlobContainerContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter) { - MediaBlobContainerWriter mediaBlobContainerWriter = new MediaBlobContainerWriter( - this); - mediaBlobContainerWriter.setBlobContract(mediaBlobContainerWriter - .getBlobContract().withResponseFilterFirst( - serviceResponseFilter)); - return mediaBlobContainerWriter; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.core.FilterableService# - * withResponseFilterLast - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public WritableBlobContainerContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter) { - MediaBlobContainerWriter mediaBlobContainerWriter = new MediaBlobContainerWriter( - this); - mediaBlobContainerWriter.setBlobContract(mediaBlobContainerWriter - .getBlobContract() - .withResponseFilterLast(serviceResponseFilter)); - return mediaBlobContainerWriter; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.WritableBlobContainerContract - * #createBlockBlob(java.lang.String, java.io.InputStream) - */ - @Override - public CreateBlobResult createBlockBlob(String blob, - InputStream contentStream) throws ServiceException { - return blobService.createBlockBlob(containerName, blob, contentStream); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.WritableBlobContainerContract - * #createBlockBlob(java.lang.String, java.io.InputStream, - * com.microsoft.windowsazure.services.blob.models.CreateBlobOptions) - */ - @Override - public CreateBlobResult createBlockBlob(String blob, - InputStream contentStream, CreateBlobOptions options) - throws ServiceException { - return blobService.createBlockBlob(containerName, blob, contentStream, - options); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.WritableBlobContainerContract - * #createBlobBlock(java.lang.String, java.lang.String, java.io.InputStream) - */ - @Override - public void createBlobBlock(String blob, String blockId, - InputStream contentStream) throws ServiceException { - blobService - .createBlobBlock(containerName, blob, blockId, contentStream); - - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.WritableBlobContainerContract - * #createBlobBlock(java.lang.String, java.lang.String, java.io.InputStream, - * com.microsoft.windowsazure.services.blob.models.CreateBlobBlockOptions) - */ - @Override - public void createBlobBlock(String blob, String blockId, - InputStream contentStream, CreateBlobBlockOptions options) - throws ServiceException { - blobService.createBlobBlock(containerName, blob, blockId, - contentStream, options); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.WritableBlobContainerContract - * #commitBlobBlocks(java.lang.String, - * com.microsoft.windowsazure.services.blob.models.BlockList) - */ - @Override - public void commitBlobBlocks(String blob, BlockList blockList) - throws ServiceException { - blobService.commitBlobBlocks(containerName, blob, blockList); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.WritableBlobContainerContract - * #commitBlobBlocks(java.lang.String, - * com.microsoft.windowsazure.services.blob.models.BlockList, - * com.microsoft.windowsazure.services.blob.models.CommitBlobBlocksOptions) - */ - @Override - public void commitBlobBlocks(String blob, BlockList blockList, - CommitBlobBlocksOptions options) throws ServiceException { - blobService.commitBlobBlocks(containerName, blob, blockList, options); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBlobRestProxy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBlobRestProxy.java deleted file mode 100644 index d6ddadfae219..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBlobRestProxy.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.util.Arrays; - -import com.microsoft.windowsazure.core.RFC1123DateConverter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterRequestAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterResponseAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.services.blob.BlobContract; -import com.microsoft.windowsazure.services.blob.implementation.BlobOperationRestProxy; -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.filter.ClientFilter; - -/** - * Rest proxy for blob operations that's specialized for working with the blobs - * created by and for Media Services storage. - * - */ -class MediaBlobRestProxy extends BlobOperationRestProxy { - private final SASTokenFilter tokenFilter; - - /** - * Construct instance of MediaBlobRestProxy with given parameters. - * - * @param channel - * Jersey Client object used to communicate with blob service - * @param accountName - * Account name for blob storage - * @param url - * URL for blob storage - * @param tokenFilter - * filter used to add SAS tokens to requests. - */ - public MediaBlobRestProxy(Client channel, String accountName, String url, - SASTokenFilter tokenFilter) { - super(channel, accountName, url); - - this.tokenFilter = tokenFilter; - channel.addFilter(tokenFilter); - } - - /** - * Construct instance of MediaBlobRestProxy with given parameters. - * - * @param channel - * Jersey Client object used to communicate with blob service - * @param filters - * Additional ServiceFilters to manipulate requests and responses - * @param accountName - * Account name for blob storage - * @param url - * URL for blob storage - * @param dateMapper - * date conversion helper object - */ - public MediaBlobRestProxy(Client channel, ClientFilter[] filters, - String accountName, String url, SASTokenFilter tokenFilter, - RFC1123DateConverter dateMapper) { - super(channel, filters, accountName, url, dateMapper); - - this.tokenFilter = tokenFilter; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.blob.implementation. - * BlobOperationRestProxy - * #withFilter(com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public BlobContract withFilter(ServiceFilter filter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterAdapter(filter); - return new MediaBlobRestProxy(getChannel(), newFilters, - getAccountName(), getUrl(), this.tokenFilter, getDateMapper()); - } - - @Override - public BlobContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = new ClientFilter[currentFilters.length + 1]; - System.arraycopy(currentFilters, 0, newFilters, 1, - currentFilters.length); - newFilters[0] = new ClientFilterRequestAdapter(serviceRequestFilter); - return new MediaBlobRestProxy(getChannel(), newFilters, - getAccountName(), getUrl(), this.tokenFilter, getDateMapper()); - } - - @Override - public BlobContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterRequestAdapter( - serviceRequestFilter); - return new MediaBlobRestProxy(getChannel(), newFilters, - getAccountName(), getUrl(), this.tokenFilter, getDateMapper()); - } - - @Override - public BlobContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = new ClientFilter[currentFilters.length + 1]; - System.arraycopy(currentFilters, 0, newFilters, 1, - currentFilters.length); - newFilters[0] = new ClientFilterResponseAdapter(serviceResponseFilter); - return new MediaBlobRestProxy(getChannel(), newFilters, - getAccountName(), getUrl(), this.tokenFilter, getDateMapper()); - } - - @Override - public BlobContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterResponseAdapter( - serviceResponseFilter); - return new MediaBlobRestProxy(getChannel(), newFilters, - getAccountName(), getUrl(), this.tokenFilter, getDateMapper()); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaContentProvider.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaContentProvider.java deleted file mode 100644 index e9601e2efa90..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaContentProvider.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.lang.annotation.Annotation; -import java.lang.reflect.Type; - -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.ParserConfigurationException; - -import com.microsoft.windowsazure.services.media.implementation.content.MediaServiceDTO; -import com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider; - -/** - * Class to plug into Jersey to properly serialize raw Media Services DTO types. - * - */ -public class MediaContentProvider extends - AbstractMessageReaderWriterProvider { - private final ODataAtomMarshaller marshaller; - - /** - * Creates the instance - * - * @throws JAXBException - * @throws ParserConfigurationException - */ - public MediaContentProvider() throws JAXBException, - ParserConfigurationException { - marshaller = new ODataAtomMarshaller(); - } - - @Override - public boolean isReadable(Class type, Type genericType, - Annotation[] annotations, MediaType mediaType) { - // This class only does marshalling, not unmarshalling. - return false; - } - - @Override - public T readFrom(Class type, Type genericType, - Annotation[] annotations, MediaType mediaType, - MultivaluedMap httpHeaders, InputStream entityStream) - throws IOException { - throw new UnsupportedOperationException(); - } - - @Override - public boolean isWriteable(Class type, Type genericType, - Annotation[] annotations, MediaType mediaType) { - return MediaServiceDTO.class.isAssignableFrom(type); - } - - @Override - public void writeTo(T t, Class type, Type genericType, - Annotation[] annotations, MediaType mediaType, - MultivaluedMap httpHeaders, - OutputStream entityStream) throws IOException { - try { - marshaller.marshalEntry(t, entityStream); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaExceptionProcessor.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaExceptionProcessor.java deleted file mode 100644 index 9dec8145f62c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaExceptionProcessor.java +++ /dev/null @@ -1,280 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import javax.inject.Inject; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.exception.ServiceExceptionFactory; -import com.microsoft.windowsazure.services.media.MediaContract; -import com.microsoft.windowsazure.services.media.WritableBlobContainerContract; -import com.microsoft.windowsazure.services.media.entityoperations.EntityActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityTypeActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; -import com.sun.jersey.api.client.ClientHandlerException; -import com.sun.jersey.api.client.UniformInterfaceException; - -/** - * /** Wrapper implementation of MediaEntityContract that - * translates exceptions into ServiceExceptions. - * - */ -public class MediaExceptionProcessor implements MediaContract { - - /** The service. */ - private final MediaContract service; - - /** The log. */ - private static Log log = LogFactory.getLog(MediaContract.class); - - /** - * Instantiates a new media exception processor. - * - * @param service - * the service - */ - public MediaExceptionProcessor(MediaContract service) { - this.service = service; - } - - /** - * Instantiates a new media exception processor. - * - * @param service - * the service - */ - @Inject - public MediaExceptionProcessor(MediaRestProxy service) { - this.service = service; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.core.FilterableService#withFilter - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public MediaContract withFilter(ServiceFilter filter) { - return new MediaExceptionProcessor(service.withFilter(filter)); - } - - @Override - public MediaContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter) { - return new MediaExceptionProcessor( - service.withRequestFilterFirst(serviceRequestFilter)); - } - - @Override - public MediaContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter) { - return new MediaExceptionProcessor( - service.withRequestFilterLast(serviceRequestFilter)); - } - - @Override - public MediaContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter) { - return new MediaExceptionProcessor( - service.withResponseFilterFirst(serviceResponseFilter)); - } - - @Override - public MediaContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter) { - return new MediaExceptionProcessor( - service.withResponseFilterLast(serviceResponseFilter)); - } - - /** - * Process a catch. - * - * @param e - * the e - * @return the service exception - */ - private ServiceException processCatch(ServiceException e) { - log.warn(e.getMessage(), e.getCause()); - return ServiceExceptionFactory.process("MediaServices", e); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #create(com.microsoft.windowsazure.services.media.entityoperations. - * EntityCreateOperation) - */ - @Override - public T create(EntityCreateOperation creator) - throws ServiceException { - try { - return service.create(creator); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #get(com.microsoft.windowsazure.services.media.entityoperations. - * EntityGetOperation) - */ - @Override - public T get(EntityGetOperation getter) throws ServiceException { - try { - return service.get(getter); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #list(com.microsoft.windowsazure.services.media.entityoperations. - * EntityListOperation) - */ - @Override - public ListResult list(EntityListOperation lister) - throws ServiceException { - try { - return service.list(lister); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #update(com.microsoft.windowsazure.services.media.entityoperations. - * EntityUpdateOperation) - */ - @Override - public String update(EntityUpdateOperation updater) throws ServiceException { - try { - return service.update(updater); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #delete(com.microsoft.windowsazure.services.media.entityoperations. - * EntityDeleteOperation) - * - * @return operation-id if any otherwise null. - */ - @Override - public String delete(EntityDeleteOperation deleter) throws ServiceException { - try { - return service.delete(deleter); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #action(com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation) - */ - @Override - public String action(EntityActionOperation entityActionOperation) - throws ServiceException { - try { - return service.action(entityActionOperation); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #action(com.microsoft.windowsazure.services.media.entityoperations. - * EntityTypeActionOperation) - */ - @Override - public T action(EntityTypeActionOperation entityTypeActionOperation) - throws ServiceException { - try { - return service.action(entityTypeActionOperation); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.MediaContract#createBlobWriter - * (com.microsoft.windowsazure.services.media.models.LocatorInfo) - */ - @Override - public WritableBlobContainerContract createBlobWriter(LocatorInfo locator) { - return service.createBlobWriter(locator); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaRestProxy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaRestProxy.java deleted file mode 100644 index ca6bce4fe599..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaRestProxy.java +++ /dev/null @@ -1,230 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.net.URI; -import java.util.Arrays; - -import javax.inject.Inject; - -import com.microsoft.windowsazure.core.UserAgentFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientConfigSettings; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterRequestAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterResponseAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.services.media.MediaContract; -import com.microsoft.windowsazure.services.media.WritableBlobContainerContract; -import com.microsoft.windowsazure.services.media.entityoperations.EntityProxyData; -import com.microsoft.windowsazure.services.media.entityoperations.EntityRestProxy; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; -import com.microsoft.windowsazure.services.media.models.LocatorType; -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.config.ClientConfig; -import com.sun.jersey.api.client.config.DefaultClientConfig; -import com.sun.jersey.api.client.filter.ClientFilter; - -/** - * The Class MediaRestProxy. - */ -public class MediaRestProxy extends EntityRestProxy implements MediaContract { - /** The redirect filter. */ - private RedirectFilter redirectFilter; - - private final ClientConfigSettings clientConfigSettings; - - /** - * Instantiates a new media rest proxy. - * - * @param channel - * the channel - * @param authFilter - * the auth filter - * @param redirectFilter - * the redirect filter - * @param versionHeadersFilter - * the version headers filter - * @param userAgentFilter - * the user agent filter - * @param clientConfigSettings - * Currently configured HTTP client settings - * - */ - @Inject - public MediaRestProxy(Client channel, OAuthFilter authFilter, - RedirectFilter redirectFilter, - VersionHeadersFilter versionHeadersFilter, - UserAgentFilter userAgentFilter, - ClientConfigSettings clientConfigSettings) { - super(channel, new ClientFilter[0]); - - this.clientConfigSettings = clientConfigSettings; - this.redirectFilter = redirectFilter; - channel.addFilter(redirectFilter); - channel.addFilter(authFilter); - channel.addFilter(versionHeadersFilter); - channel.addFilter(new ClientFilterRequestAdapter(userAgentFilter)); - } - - /** - * Instantiates a new media rest proxy. - * - * @param channel - * the channel - * @param filters - * the filters - * @param clientConfigSettings - * currently configured HTTP client settings - */ - private MediaRestProxy(Client channel, ClientFilter[] filters, - ClientConfigSettings clientConfigSettings) { - super(channel, filters); - this.clientConfigSettings = clientConfigSettings; - } - - @Override - public MediaContract withFilter(ServiceFilter filter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterAdapter(filter); - return new MediaRestProxy(getChannel(), newFilters, - clientConfigSettings); - } - - @Override - public MediaContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = new ClientFilter[currentFilters.length + 1]; - System.arraycopy(currentFilters, 0, newFilters, 1, - currentFilters.length); - newFilters[0] = new ClientFilterRequestAdapter(serviceRequestFilter); - return new MediaRestProxy(getChannel(), newFilters, - clientConfigSettings); - } - - @Override - public MediaContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterRequestAdapter( - serviceRequestFilter); - return new MediaRestProxy(getChannel(), newFilters, - clientConfigSettings); - } - - @Override - public MediaContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = new ClientFilter[currentFilters.length + 1]; - System.arraycopy(currentFilters, 0, newFilters, 1, - currentFilters.length); - newFilters[0] = new ClientFilterResponseAdapter(serviceResponseFilter); - return new MediaRestProxy(getChannel(), newFilters, - clientConfigSettings); - } - - @Override - public MediaContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterResponseAdapter( - serviceResponseFilter); - return new MediaRestProxy(getChannel(), newFilters, - clientConfigSettings); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityRestProxy - * #createProxyData() - */ - @Override - protected EntityProxyData createProxyData() { - return new EntityProxyData() { - @Override - public URI getServiceUri() { - return redirectFilter.getBaseURI(); - } - }; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.MediaContract#createBlobWriter - * (com.microsoft.windowsazure.services.media.models.LocatorInfo) - */ - @Override - public WritableBlobContainerContract createBlobWriter(LocatorInfo locator) { - if (locator.getLocatorType() != LocatorType.SAS) { - throw new IllegalArgumentException("Can only write to SAS locators"); - } - - LocatorParser p = new LocatorParser(locator); - - return new MediaBlobContainerWriter(createUploaderClient(), - p.getAccountName(), p.getStorageUri(), p.getContainer(), - p.getSASToken()); - } - - /** - * Helper class to encapsulate pulling information out of the locator. - */ - private static class LocatorParser { - private URI locatorPath; - - public LocatorParser(LocatorInfo locator) { - locatorPath = URI.create(locator.getPath()); - } - - public String getAccountName() { - return locatorPath.getHost().split("\\.")[0]; - } - - public String getStorageUri() { - return locatorPath.getScheme() + "://" + locatorPath.getAuthority(); - } - - public String getContainer() { - return locatorPath.getPath().substring(1); - } - - public String getSASToken() { - return locatorPath.getRawQuery(); - } - } - - private Client createUploaderClient() { - ClientConfig clientConfig = new DefaultClientConfig(); - clientConfigSettings.applyConfig(clientConfig); - Client client = Client.create(clientConfig); - clientConfigSettings.applyConfig(client); - return client; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/OAuthFilter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/OAuthFilter.java deleted file mode 100644 index 23f1122ed770..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/OAuthFilter.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.implementation; - -import javax.inject.Named; - -import com.microsoft.windowsazure.core.pipeline.jersey.IdempotentClientFilter; -import com.microsoft.windowsazure.services.media.MediaConfiguration; -import com.microsoft.windowsazure.services.media.authentication.AzureAdAccessToken; -import com.microsoft.windowsazure.services.media.authentication.TokenProvider; -import com.sun.jersey.api.client.ClientHandlerException; -import com.sun.jersey.api.client.ClientRequest; -import com.sun.jersey.api.client.ClientResponse; - -/** - * The Jersey filter for OAuth. - * - */ -public class OAuthFilter extends IdempotentClientFilter { - private final TokenProvider azureAdTokenProvider; - - /** - * Creates an OAuthFilter object with specified - * TokenProvider instance. - * - * @param azureAdTokenProvider - */ - public OAuthFilter(@Named(MediaConfiguration.AZURE_AD_TOKEN_PROVIDER) TokenProvider azureAdTokenProvider) { - this.azureAdTokenProvider = azureAdTokenProvider; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.core.IdempotentClientFilter#doHandle - * (com.sun.jersey.api.client.ClientRequest) - */ - @Override - public ClientResponse doHandle(ClientRequest clientRequest) { - AzureAdAccessToken accessToken; - - try { - accessToken = azureAdTokenProvider.acquireAccessToken(); - } catch (Exception e) { - throw new ClientHandlerException("Failed to acquire access token", e); - } - - clientRequest.getHeaders().add("Authorization", "Bearer " + accessToken.getAccessToken()); - - return this.getNext().handle(clientRequest); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomMarshaller.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomMarshaller.java deleted file mode 100644 index 11d6c8a81afe..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomMarshaller.java +++ /dev/null @@ -1,166 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.OutputStream; -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.namespace.QName; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; - -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.atom.FeedType; -import com.microsoft.windowsazure.services.media.implementation.content.AccessPolicyType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetDeliveryPolicyRestType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetFileType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; -import com.microsoft.windowsazure.services.media.implementation.content.ChannelType; -import com.microsoft.windowsazure.services.media.implementation.content.Constants; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyOptionType; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyType; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyRestType; -import com.microsoft.windowsazure.services.media.implementation.content.EncodingReservedUnitRestType; -import com.microsoft.windowsazure.services.media.implementation.content.JobNotificationSubscriptionType; -import com.microsoft.windowsazure.services.media.implementation.content.JobType; -import com.microsoft.windowsazure.services.media.implementation.content.LocatorRestType; -import com.microsoft.windowsazure.services.media.implementation.content.NotificationEndPointType; -import com.microsoft.windowsazure.services.media.implementation.content.OperationType; -import com.microsoft.windowsazure.services.media.implementation.content.ProgramType; -import com.microsoft.windowsazure.services.media.implementation.content.StorageAccountType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointType; -import com.microsoft.windowsazure.services.media.implementation.content.TaskType; - -/** - * A class to manage marshalling of request parameters into ATOM entry elements - * for sending to the Media Services REST endpoints. - * - */ -public class ODataAtomMarshaller { - private final Marshaller marshaller; - private final DocumentBuilder documentBuilder; - - public ODataAtomMarshaller() throws JAXBException, - ParserConfigurationException { - JAXBContext context = JAXBContext.newInstance(getMarshalledClasses(), - null); - marshaller = context.createMarshaller(); - - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - dbf.setNamespaceAware(true); - documentBuilder = dbf.newDocumentBuilder(); - } - - /** - * Convert the given content object into an ATOM entry (represented as a DOM - * document) suitable for sending up to the Media Services service. - * - * @param content - * The content object to send - * @return The generated DOM - * @throws JAXBException - * if content is malformed/not marshallable - */ - public Document marshalEntry(Object content) throws JAXBException { - JAXBElement entryElement = createEntry(content); - - Document doc = documentBuilder.newDocument(); - doc.setXmlStandalone(true); - - marshaller.marshal(entryElement, doc); - - return doc; - - } - - /** - * Convert the given content into an ATOM entry and write it to the given - * stream. - * - * @param content - * Content object to send - * @param stream - * Stream to write to - * @throws JAXBException - * if content is malformed/not marshallable - */ - public void marshalEntry(Object content, OutputStream stream) - throws JAXBException { - marshaller.marshal(createEntry(content), stream); - } - - public void marshalEntryType(EntryType entryType, OutputStream stream) - throws JAXBException { - marshaller.marshal(new JAXBElement(new QName( - Constants.ATOM_NS, "entry"), EntryType.class, entryType), - stream); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - private JAXBElement createEntry(Object content) { - ContentType atomContent = new ContentType(); - EntryType atomEntry = new EntryType(); - - atomContent.setType("application/xml"); - atomContent.getContent().add( - new JAXBElement(new QName(Constants.ODATA_METADATA_NS, - "properties"), content.getClass(), content)); - - atomEntry.getEntryChildren().add( - new JAXBElement(new QName(Constants.ATOM_NS, "content"), - ContentType.class, atomContent)); - - JAXBElement entryElement = new JAXBElement( - new QName(Constants.ATOM_NS, "entry"), EntryType.class, - atomEntry); - - return entryElement; - } - - private static Class[] getMarshalledClasses() { - List> classes = new ArrayList>(); - classes.add(AccessPolicyType.class); - classes.add(AssetDeliveryPolicyRestType.class); - classes.add(AssetType.class); - classes.add(AssetFileType.class); - classes.add(ChannelType.class); - classes.add(ContentKeyAuthorizationPolicyType.class); - classes.add(ContentKeyAuthorizationPolicyOptionType.class); - classes.add(ContentKeyRestType.class); - classes.add(EncodingReservedUnitRestType.class); - classes.add(EntryType.class); - classes.add(FeedType.class); - classes.add(JobNotificationSubscriptionType.class); - classes.add(JobType.class); - classes.add(LocatorRestType.class); - classes.add(NotificationEndPointType.class); - classes.add(OperationType.class); - classes.add(ProgramType.class); - classes.add(StorageAccountType.class); - classes.add(StreamingEndpointType.class); - classes.add(TaskType.class); - return classes.toArray(new Class[0]); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomUnmarshaller.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomUnmarshaller.java deleted file mode 100644 index 7d223b465104..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomUnmarshaller.java +++ /dev/null @@ -1,256 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.InputStream; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.ParameterizedType; -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import javax.xml.namespace.QName; -import javax.xml.transform.stream.StreamSource; - -import org.w3c.dom.Element; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.atom.FeedType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; -import com.microsoft.windowsazure.services.media.implementation.content.Constants; -import com.microsoft.windowsazure.services.media.implementation.content.ODataActionType; -import com.microsoft.windowsazure.services.media.models.ListResult; - -/** - * This class implements unmarshalling from OData over Atom into Java classes. - * - */ -public class ODataAtomUnmarshaller { - private final JAXBContext atomContext; - private final JAXBContext mediaContentContext; - private final Unmarshaller atomUnmarshaller; - private final Unmarshaller mediaContentUnmarshaller; - - /** - * @throws JAXBException - */ - public ODataAtomUnmarshaller() throws JAXBException { - atomContext = JAXBContext.newInstance(FeedType.class.getPackage() - .getName()); - atomUnmarshaller = atomContext.createUnmarshaller(); - mediaContentContext = JAXBContext.newInstance(AssetType.class - .getPackage().getName()); - mediaContentUnmarshaller = mediaContentContext.createUnmarshaller(); - } - - /** - * Given a stream that contains XML with an atom Feed element at the root, - * unmarshal it into Java objects with the given content type in the - * entries. - * - * @param - * - * @param stream - * - stream containing the XML data - * @param contentType - * - Java type to unmarshal the entry contents into - * @return an instance of contentType that contains the unmarshalled data. - * @throws JAXBException - * @throws ServiceException - */ - @SuppressWarnings("rawtypes") - public ListResult unmarshalFeed( - InputStream stream, Class contentType) throws JAXBException, - ServiceException { - validateNotNull(stream, "stream"); - validateNotNull(contentType, "contentType"); - - List entries = new ArrayList(); - FeedType feed = unmarshalFeed(stream); - Class marshallingContentType = getMarshallingContentType(contentType); - - for (Object feedChild : feed.getFeedChildren()) { - EntryType entry = asEntry(feedChild); - if (entry != null) { - entries.add(contentFromEntry(contentType, - marshallingContentType, entry)); - } - } - return new ListResult(entries); - } - - /** - * Given a stream containing XML with an Atom entry element at the root, - * unmarshal it into an instance of contentType - * - * @param stream - * - stream containing XML data - * @param contentType - * - type of object to return - * @return An instance of contentType - * @throws JAXBException - * @throws ServiceException - */ - @SuppressWarnings("rawtypes") - public T unmarshalEntry(InputStream stream, - Class contentType) throws JAXBException, ServiceException { - validateNotNull(stream, "stream"); - validateNotNull(contentType, "contentType"); - - Class marshallingContentType = getMarshallingContentType(contentType); - - EntryType entry = unmarshalEntry(stream); - return contentFromEntry(contentType, marshallingContentType, entry); - } - - @SuppressWarnings("rawtypes") - private T contentFromEntry(Class contentType, - Class marshallingContentType, EntryType entry) - throws JAXBException, ServiceException { - unmarshalODataContent(entry, contentType); - ContentType contentElement = getFirstOfType(ContentType.class, - entry.getEntryChildren()); - Object contentObject = getFirstOfType(marshallingContentType, - contentElement.getContent()); - return constructResultObject(contentType, entry, contentObject); - } - - private EntryType asEntry(Object o) { - if (o instanceof JAXBElement) { - @SuppressWarnings("rawtypes") - JAXBElement e = (JAXBElement) o; - if (e.getDeclaredType() == EntryType.class) { - return (EntryType) e.getValue(); - } - } - return null; - } - - private void unmarshalODataContent(EntryType entry, Class contentType) - throws JAXBException { - unmarshalEntryActions(entry); - unmarshalEntryContent(entry, contentType); - } - - private void unmarshalEntryActions(EntryType entry) throws JAXBException { - List children = entry.getEntryChildren(); - for (int i = 0; i < children.size(); ++i) { - Object child = children.get(i); - if (child instanceof Element) { - Element e = (Element) child; - if (qnameFromElement(e).equals( - Constants.ODATA_ACTION_ELEMENT_NAME)) { - JAXBElement actionElement = mediaContentUnmarshaller - .unmarshal(e, ODataActionType.class); - children.set(i, actionElement); - } - } - } - } - - @SuppressWarnings("rawtypes") - private void unmarshalEntryContent(EntryType entry, Class contentType) - throws JAXBException { - Class marshallingContentType = getMarshallingContentType(contentType); - ContentType contentElement = getFirstOfType(ContentType.class, - entry.getEntryChildren()); - List contentChildren = contentElement.getContent(); - for (int i = 0; i < contentChildren.size(); ++i) { - Object child = contentChildren.get(i); - if (child instanceof Element) { - Element e = (Element) child; - if (qnameFromElement(e).equals( - Constants.ODATA_PROPERTIES_ELEMENT_NAME)) { - JAXBElement actualContentElement = mediaContentUnmarshaller - .unmarshal(e, marshallingContentType); - contentChildren.set(i, actualContentElement); - } - } - } - } - - @SuppressWarnings("unchecked") - private T getFirstOfType(Class targetType, List collection) { - for (Object c : collection) { - if (c instanceof JAXBElement) { - @SuppressWarnings("rawtypes") - JAXBElement e = (JAXBElement) c; - if (e.getDeclaredType() == targetType) { - return (T) e.getValue(); - } - } - } - return null; - } - - @SuppressWarnings("rawtypes") - private T constructResultObject( - Class contentType, EntryType entry, Object contentObject) - throws ServiceException { - Class marshallingType = getMarshallingContentType(contentType); - try { - Constructor resultCtor = contentType.getConstructor( - EntryType.class, marshallingType); - return resultCtor.newInstance(entry, contentObject); - } catch (IllegalArgumentException e) { - throw new ServiceException(e); - } catch (SecurityException e) { - throw new ServiceException(e); - } catch (InstantiationException e) { - throw new ServiceException(e); - } catch (IllegalAccessException e) { - throw new ServiceException(e); - } catch (InvocationTargetException e) { - throw new ServiceException(e); - } catch (NoSuchMethodException e) { - throw new ServiceException(e); - } - } - - public EntryType unmarshalEntry(InputStream stream) throws JAXBException { - JAXBElement entryElement = atomUnmarshaller.unmarshal( - new StreamSource(stream), EntryType.class); - return entryElement.getValue(); - } - - private FeedType unmarshalFeed(InputStream stream) throws JAXBException { - JAXBElement feedElement = atomUnmarshaller.unmarshal( - new StreamSource(stream), FeedType.class); - return feedElement.getValue(); - } - - private static QName qnameFromElement(Element e) { - return new QName(e.getLocalName(), e.getNamespaceURI()); - } - - private static Class getMarshallingContentType(Class contentType) { - ParameterizedType pt = (ParameterizedType) contentType - .getGenericSuperclass(); - return (Class) pt.getActualTypeArguments()[0]; - } - - private static void validateNotNull(Object param, String paramName) { - if (param == null) { - throw new IllegalArgumentException(paramName); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataDateAdapter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataDateAdapter.java deleted file mode 100644 index 1ed0518fc596..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataDateAdapter.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.util.Calendar; -import java.util.Date; -import java.util.TimeZone; -import java.util.regex.Pattern; - -import javax.xml.bind.DatatypeConverter; -import javax.xml.bind.annotation.adapters.XmlAdapter; - -/** - * Adapter to convert OData time zone conventions into Java Dates and back. - * - */ -public class ODataDateAdapter extends XmlAdapter { - - private static final Pattern HAS_TIMEZONE_REGEX; - private static final TimeZone UTC; - - static { - HAS_TIMEZONE_REGEX = Pattern.compile("^.*(\\+|-)\\d\\d:\\d\\d$"); - - UTC = TimeZone.getDefault(); - UTC.setRawOffset(0); - } - - @Override - public Date unmarshal(String dateString) throws Exception { - if (!hasTimezone(dateString)) { - dateString += "Z"; - } - Calendar parsedDate = DatatypeConverter.parseDateTime(dateString); - return parsedDate.getTime(); - } - - @Override - public String marshal(Date date) throws Exception { - Calendar dateToMarshal = Calendar.getInstance(); - dateToMarshal.setTime(date); - dateToMarshal.setTimeZone(UTC); - return DatatypeConverter.printDateTime(dateToMarshal); - } - - private boolean hasTimezone(String dateString) { - return dateString.endsWith("Z") - || HAS_TIMEZONE_REGEX.matcher(dateString).matches(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntity.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntity.java deleted file mode 100644 index 883282a5359e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntity.java +++ /dev/null @@ -1,183 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.lang.reflect.ParameterizedType; -import java.lang.reflect.Type; - -import javax.xml.bind.JAXBElement; - -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.atom.LinkType; -import com.microsoft.windowsazure.services.media.implementation.content.Constants; -import com.microsoft.windowsazure.services.media.models.LinkInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; - -/** - * Class wrapping deserialized OData entities. Allows easy access to entry and - * content types. - * - */ -public abstract class ODataEntity { - - private final EntryType entry; - private final T content; - - protected ODataEntity(EntryType entry, T content) { - this.entry = entry; - this.content = content; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - protected ODataEntity(T content) { - this.content = content; - - ContentType contentElement = new ContentType(); - contentElement.getContent().add( - new JAXBElement(Constants.ODATA_PROPERTIES_ELEMENT_NAME, - content.getClass(), content)); - entry = new EntryType(); - entry.getEntryChildren().add( - new JAXBElement(Constants.ATOM_CONTENT_ELEMENT_NAME, - ContentType.class, contentElement)); - } - - /** - * @return the entry - */ - protected EntryType getEntry() { - return entry; - } - - /** - * @return the content - */ - protected T getContent() { - return content; - } - - /** - * Test if the entity contains a link with the given rel attribute. - * - * @param rel - * Rel of link to check for - * @return True if link is found, false if not. - */ - public boolean hasLink(String rel) { - return getLink(rel) != null; - } - - /** - * Get the link with the given rel attribute - * - * @param rel - * rel of link to retrieve - * @return The link if found, null if not. - */ - public > LinkInfo getLink(String rel) { - for (Object child : entry.getEntryChildren()) { - - LinkType link = linkFromChild(child); - if (link != null && link.getRel().equals(rel)) { - return new LinkInfo(link); - } - } - return null; - } - - /** - * Get the link to navigate an OData relationship - * - * @param relationName - * name of the OData relationship - * @return the link if found, null if not. - */ - public > LinkInfo getRelationLink( - String relationName) { - return this. getLink(Constants.ODATA_DATA_NS + "/related/" - + relationName); - } - - @SuppressWarnings("rawtypes") - private static LinkType linkFromChild(Object child) { - if (child instanceof JAXBElement) { - return linkFromElement((JAXBElement) child); - } - return null; - } - - private static LinkType linkFromElement( - @SuppressWarnings("rawtypes") JAXBElement element) { - if (element.getDeclaredType() == LinkType.class) { - return (LinkType) element.getValue(); - } - return null; - } - - /** - * Is the given type inherited from ODataEntity - * - * @param type - * Type to check - * @return true if derived from ODataEntity - */ - public static boolean isODataEntityType(Class type) { - return ODataEntity.class.isAssignableFrom(type); - } - - /** - * Is the given type a collection of ODataEntity - * - * @param type - * Base type - * @param genericType - * Generic type - * @return true if it's List<OEntity> or derive from. - */ - public static boolean isODataEntityCollectionType(Class type, - Type genericType) { - if (ListResult.class != type) { - return false; - } - - ParameterizedType pt = (ParameterizedType) genericType; - - if (pt.getActualTypeArguments().length != 1) { - return false; - } - - Class typeClass = getCollectedType(genericType); - - return isODataEntityType(typeClass); - } - - /** - * Reflection helper to pull out the type parameter for a List, where T - * is a ODataEntity derived type. - * - * @param genericType - * type object for collection - * @return The class object for the type parameter. - */ - public static Class getCollectedType(Type genericType) { - ParameterizedType pt = (ParameterizedType) genericType; - if (pt.getActualTypeArguments().length != 1) { - throw new IllegalArgumentException("genericType"); - } - return (Class) pt.getActualTypeArguments()[0]; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntityCollectionProvider.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntityCollectionProvider.java deleted file mode 100644 index 1c4e36f509be..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntityCollectionProvider.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.lang.annotation.Annotation; -import java.lang.reflect.Type; - -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.xml.bind.JAXBException; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider; - -/** - * Jersey provider to unmarshal lists of entities from Media Services. - * - */ -public class ODataEntityCollectionProvider extends - AbstractMessageReaderWriterProvider>> { - private final ODataAtomUnmarshaller unmarshaller; - - public ODataEntityCollectionProvider() throws JAXBException { - unmarshaller = new ODataAtomUnmarshaller(); - } - - @Override - public boolean isReadable(Class type, Type genericType, - Annotation[] annotations, MediaType mediaType) { - return ODataEntity.isODataEntityCollectionType(type, genericType); - } - - @SuppressWarnings("unchecked") - @Override - public ListResult> readFrom( - Class>> type, Type genericType, - Annotation[] annotations, MediaType mediaType, - MultivaluedMap httpHeaders, InputStream entityStream) - throws IOException { - - String responseType = mediaType.getParameters().get("type"); - try { - if (responseType == null || responseType.equals("feed")) { - return unmarshaller.unmarshalFeed(entityStream, - (Class>) ODataEntity - .getCollectedType(genericType)); - } else { - throw new RuntimeException(); - } - } catch (JAXBException e) { - throw new RuntimeException(e); - } catch (ServiceException e) { - throw new RuntimeException(e); - } - } - - /** - * Can this type be written by this provider? - * - * @return false - we don't support writing - */ - @Override - public boolean isWriteable(Class type, Type genericType, - Annotation[] annotations, MediaType mediaType) { - return false; - } - - /** - * Write the given object to the stream. This method implementation throws, - * we don't support writing. - * - * @throws UnsupportedOperationException - */ - @Override - public void writeTo(ListResult> t, Class type, - Type genericType, Annotation[] annotations, MediaType mediaType, - MultivaluedMap httpHeaders, - OutputStream entityStream) throws IOException { - - throw new UnsupportedOperationException(); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntityProvider.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntityProvider.java deleted file mode 100644 index 574e192ee312..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntityProvider.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.lang.annotation.Annotation; -import java.lang.reflect.Type; -import java.util.List; - -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.ParserConfigurationException; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider; - -/** - * An implementation of {@link AbstractMessageReaderWriterProvider } that is used - * to marshal and unmarshal instances of the ODataEntity type. - * - */ -public class ODataEntityProvider extends - AbstractMessageReaderWriterProvider> { - private final ODataAtomUnmarshaller unmarshaller; - - public ODataEntityProvider() throws JAXBException, - ParserConfigurationException { - unmarshaller = new ODataAtomUnmarshaller(); - } - - /* - * (non-Javadoc) - * - * @see javax.ws.rs.ext.MessageBodyReader#isReadable(java.lang.Class, - * java.lang.reflect.Type, java.lang.annotation.Annotation[], - * javax.ws.rs.core.MediaType) - */ - @Override - public boolean isReadable(Class type, Type genericType, - Annotation[] annotations, MediaType mediaType) { - return ODataEntity.isODataEntityType(type); - } - - /* - * (non-Javadoc) - * - * @see javax.ws.rs.ext.MessageBodyReader#readFrom(java.lang.Class, - * java.lang.reflect.Type, java.lang.annotation.Annotation[], - * javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap, - * java.io.InputStream) - */ - @Override - public ODataEntity readFrom(Class> type, - Type genericType, Annotation[] annotations, MediaType mediaType, - MultivaluedMap httpHeaders, InputStream entityStream) - throws IOException { - - ODataEntity result = null; - String responseType = mediaType.getParameters().get("type"); - try { - if (responseType == null || responseType.equals("feed")) { - List> feedContents = null; - synchronized (unmarshaller) { - feedContents = unmarshaller.unmarshalFeed(entityStream, - type); - } - return feedContents.get(0); - } else if (responseType.equals("entry")) { - synchronized (unmarshaller) { - result = unmarshaller.unmarshalEntry(entityStream, type); - } - } else { - throw new RuntimeException(); - } - } catch (JAXBException e) { - throw new RuntimeException(e); - } catch (ServiceException e) { - throw new RuntimeException(e); - } - - return result; - } - - /* - * (non-Javadoc) - * - * @see javax.ws.rs.ext.MessageBodyWriter#isWriteable(java.lang.Class, - * java.lang.reflect.Type, java.lang.annotation.Annotation[], - * javax.ws.rs.core.MediaType) - */ - @Override - public boolean isWriteable(Class type, Type genericType, - Annotation[] annotations, MediaType mediaType) { - return false; - } - - /* - * (non-Javadoc) - * - * @see javax.ws.rs.ext.MessageBodyWriter#writeTo(java.lang.Object, - * java.lang.Class, java.lang.reflect.Type, - * java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, - * javax.ws.rs.core.MultivaluedMap, java.io.OutputStream) - */ - @Override - public void writeTo(ODataEntity t, Class type, Type genericType, - Annotation[] annotations, MediaType mediaType, - MultivaluedMap httpHeaders, - OutputStream entityStream) throws IOException { - throw new UnsupportedOperationException(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/RedirectFilter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/RedirectFilter.java deleted file mode 100644 index 76ef360a0b91..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/RedirectFilter.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.net.URI; -import java.net.URISyntaxException; - -import com.microsoft.windowsazure.core.pipeline.jersey.IdempotentClientFilter; -import com.sun.jersey.api.client.ClientHandlerException; -import com.sun.jersey.api.client.ClientRequest; -import com.sun.jersey.api.client.ClientResponse; - -public class RedirectFilter extends IdempotentClientFilter { - private final ResourceLocationManager locationManager; - - public RedirectFilter(ResourceLocationManager locationManager) { - this.locationManager = locationManager; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.core.IdempotentClientFilter#doHandle - * (com.sun.jersey.api.client.ClientRequest) - */ - @Override - public ClientResponse doHandle(ClientRequest request) { - if (request == null) { - throw new IllegalArgumentException("Request should not be null"); - } - - URI originalURI = request.getURI(); - request.setURI(locationManager.getRedirectedURI(originalURI)); - - ClientResponse response = getNext().handle(request); - while (response.getClientResponseStatus() == ClientResponse.Status.MOVED_PERMANENTLY) { - try { - locationManager.setRedirectedURI(response.getHeaders() - .getFirst("Location")); - } catch (NullPointerException e) { - throw new ClientHandlerException( - "HTTP Redirect did not include Location header"); - } catch (URISyntaxException e) { - throw new ClientHandlerException( - "HTTP Redirect location is not a valid URI"); - } - - request.setURI(locationManager.getRedirectedURI(originalURI)); - response = getNext().handle(request); - } - return response; - } - - public URI getBaseURI() { - return this.locationManager.getBaseURI(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ResourceLocationManager.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ResourceLocationManager.java deleted file mode 100644 index 19300b5ba264..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ResourceLocationManager.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.net.URI; -import java.net.URISyntaxException; - -import javax.inject.Named; -import javax.ws.rs.core.UriBuilder; - -import com.microsoft.windowsazure.services.media.MediaConfiguration; - -public class ResourceLocationManager { - private URI baseURI; - - public ResourceLocationManager(@Named(MediaConfiguration.AZURE_AD_API_SERVER) String baseUri) - throws URISyntaxException { - this.baseURI = new URI(baseUri); - } - - public URI getBaseURI() { - return baseURI; - } - - public URI getRedirectedURI(URI originalURI) { - UriBuilder uriBuilder = UriBuilder.fromUri(baseURI).path( - originalURI.getPath()); - String queryString = originalURI.getRawQuery(); - - if (queryString != null && !queryString.isEmpty()) { - uriBuilder.replaceQuery(queryString); - } - return uriBuilder.build(); - } - - public void setRedirectedURI(String newURI) throws URISyntaxException { - baseURI = new URI(newURI); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/SASTokenFilter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/SASTokenFilter.java deleted file mode 100644 index 7f631b8ff4b0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/SASTokenFilter.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import javax.ws.rs.core.UriBuilder; - -import com.microsoft.windowsazure.core.pipeline.jersey.IdempotentClientFilter; -import com.sun.jersey.api.client.ClientRequest; -import com.sun.jersey.api.client.ClientResponse; - -/** - * Filter responsible for adding SAS tokens to outgoing requests. - * - */ -public class SASTokenFilter extends IdempotentClientFilter { - private final String sasToken; - - /** - * Construct a SASTokenFilter that will insert the tokens given in the - * provided sasUrl. - * - * @param sasUrl - * URL containing authentication information - */ - public SASTokenFilter(String sasToken) { - this.sasToken = sasToken; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.core.IdempotentClientFilter#doHandle - * (com.sun.jersey.api.client.ClientRequest) - */ - @Override - public ClientResponse doHandle(ClientRequest cr) { - UriBuilder newUri = UriBuilder.fromUri(cr.getURI()); - String currentQuery = cr.getURI().getRawQuery(); - if (currentQuery == null) { - currentQuery = ""; - } else if (currentQuery.length() > 0) { - currentQuery += "&"; - } - currentQuery += "api-version=2016-05-31&" + sasToken; - - newUri.replaceQuery(currentQuery); - cr.setURI(newUri.build()); - - return getNext().handle(cr); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/SetBoundaryMultipartDataSource.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/SetBoundaryMultipartDataSource.java deleted file mode 100644 index 98af8d57b125..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/SetBoundaryMultipartDataSource.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - -import javax.mail.BodyPart; -import javax.mail.MessagingException; -import javax.mail.MultipartDataSource; - -public class SetBoundaryMultipartDataSource implements MultipartDataSource { - - private final String boundary; - - public SetBoundaryMultipartDataSource(String boundary) { - this.boundary = boundary; - } - - @Override - public String getContentType() { - return "multipart/mixed; boundary=" + boundary; - } - - @Override - public InputStream getInputStream() throws IOException { - return null; - } - - @Override - public String getName() { - return null; - } - - @Override - public OutputStream getOutputStream() throws IOException { - return null; - } - - @Override - public int getCount() { - return 0; - } - - @Override - public BodyPart getBodyPart(int index) throws MessagingException { - return null; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/StatusLine.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/StatusLine.java deleted file mode 100644 index f4a889706b50..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/StatusLine.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.IOException; -import java.io.Reader; -import java.io.StringReader; - -import javax.activation.DataSource; - -import com.sun.mail.util.LineInputStream; - -public class StatusLine { - private static final int DELIMITER = -1; - private int status; - private String reason; - - public static StatusLine create(DataSource dataSource) { - try { - LineInputStream stream = new LineInputStream( - dataSource.getInputStream()); - try { - String line = stream.readLine(); - StringReader lineReader = new StringReader(line); - - expect(lineReader, "HTTP/1.1"); - expect(lineReader, " "); - String statusString = extractInput(lineReader, ' '); - String reason = extractInput(lineReader, DELIMITER); - - return new StatusLine().setStatus( - Integer.parseInt(statusString)).setReason(reason); - } finally { - stream.close(); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - private static void expect(Reader reader, String string) { - try { - byte[] byteArray = string.getBytes("UTF-8"); - int ch; - for (int i = 0; i < string.length(); i++) { - ch = reader.read(); - if (ch != byteArray[i]) { - throw new RuntimeException(String.format( - "Expected '%s', found '%s' instead", string, - string.substring(0, i) + (char) ch)); - } - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - private static String extractInput(Reader reader, int delimiter) { - try { - StringBuilder sb = new StringBuilder(); - while (true) { - int ch = reader.read(); - if (ch == DELIMITER || ch == delimiter) { - break; - } - - sb.append((char) ch); - } - return sb.toString(); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - public int getStatus() { - return status; - } - - public StatusLine setStatus(int status) { - this.status = status; - return this; - } - - public String getReason() { - return reason; - } - - public StatusLine setReason(String reason) { - this.reason = reason; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/VersionHeadersFilter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/VersionHeadersFilter.java deleted file mode 100644 index bba0269d4752..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/VersionHeadersFilter.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import javax.ws.rs.core.MultivaluedMap; - -import com.microsoft.windowsazure.core.pipeline.jersey.IdempotentClientFilter; -import com.sun.jersey.api.client.ClientRequest; -import com.sun.jersey.api.client.ClientResponse; - -/** - * A small filter that adds the required Media services/OData 3 version headers - * to the request as it goes through. - * - */ -public class VersionHeadersFilter extends IdempotentClientFilter { - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.core.IdempotentClientFilter#doHandle - * (com.sun.jersey.api.client.ClientRequest) - */ - @Override - public ClientResponse doHandle(ClientRequest cr) { - MultivaluedMap headers = cr.getHeaders(); - headers.add("DataServiceVersion", "3.0"); - headers.add("MaxDataServiceVersion", "3.0"); - headers.add("x-ms-version", "2.17"); - return getNext().handle(cr); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/CategoryType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/CategoryType.java deleted file mode 100644 index 064df1b35ddd..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/CategoryType.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom cagegory construct is defined in section 4.2.2 of the format spec. - * - * - *

- * Java class for categoryType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="categoryType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <attribute name="term" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <attribute name="scheme" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *       <attribute name="label" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <anyAttribute namespace='##other'/>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "categoryType") -public class CategoryType { - - @XmlAttribute(required = true) - private String term; - @XmlAttribute - @XmlSchemaType(name = "anyURI") - private String scheme; - @XmlAttribute - private String label; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the term property. - * - * @return possible object is {@link String } - * - */ - public String getTerm() { - return term; - } - - /** - * Sets the value of the term property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setTerm(String value) { - this.term = value; - } - - /** - * Gets the value of the scheme property. - * - * @return possible object is {@link String } - * - */ - public String getScheme() { - return scheme; - } - - /** - * Sets the value of the scheme property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setScheme(String value) { - this.scheme = value; - } - - /** - * Gets the value of the label property. - * - * @return possible object is {@link String } - * - */ - public String getLabel() { - return label; - } - - /** - * Sets the value of the label property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLabel(String value) { - this.label = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ContentType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ContentType.java deleted file mode 100644 index 3d57ebeaaee5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ContentType.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom content construct is defined in section 4.1.3 of the format spec. - * - * - *

- * Java class for contentType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="contentType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <any namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
- *       </sequence>
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <attribute name="src" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *       <anyAttribute namespace='##other'/>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "contentType", propOrder = { "content" }) -public class ContentType { - - @XmlMixed - @XmlAnyElement(lax = true) - private List content; - @XmlAttribute - private String type; - @XmlAttribute - @XmlSchemaType(name = "anyURI") - private String src; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * - * The Atom content construct is defined in section 4.1.3 of the format - * spec. Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, not a - * snapshot. Therefore any modification you make to the returned list will - * be present inside the JAXB object. This is why there is not a - * set method for the content property. - * - *

- * For example, to add a new item, do as follows: - * - *

-     * getContent().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link Object } - * {@link String } - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - /** - * Gets the value of the type property. - * - * @return possible object is {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - - /** - * Gets the value of the src property. - * - * @return possible object is {@link String } - * - */ - public String getSrc() { - return src; - } - - /** - * Sets the value of the src property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setSrc(String value) { - this.src = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/DateTimeType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/DateTimeType.java deleted file mode 100644 index 9825fc58b66c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/DateTimeType.java +++ /dev/null @@ -1,159 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.datatype.XMLGregorianCalendar; -import javax.xml.namespace.QName; - -/** - *

- * Java class for dateTimeType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="dateTimeType">
- *   <simpleContent>
- *     <extension base="<http://www.w3.org/2001/XMLSchema>dateTime">
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </extension>
- *   </simpleContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "dateTimeType", propOrder = { "value" }) -public class DateTimeType { - - @XmlValue - @XmlSchemaType(name = "dateTime") - private XMLGregorianCalendar value; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the value property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setValue(XMLGregorianCalendar value) { - this.value = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/EntryType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/EntryType.java deleted file mode 100644 index 76aef53799a5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/EntryType.java +++ /dev/null @@ -1,213 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom entry construct is defined in section 4.1.2 of the format spec. - * - * - *

- * Java class for entryType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="entryType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice maxOccurs="unbounded">
- *         <element name="author" type="{http://www.w3.org/2005/Atom}personType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="category" type="{http://www.w3.org/2005/Atom}categoryType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="content" type="{http://www.w3.org/2005/Atom}contentType" minOccurs="0"/>
- *         <element name="contributor" type="{http://www.w3.org/2005/Atom}personType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="id" type="{http://www.w3.org/2005/Atom}idType"/>
- *         <element name="link" type="{http://www.w3.org/2005/Atom}linkType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="published" type="{http://www.w3.org/2005/Atom}dateTimeType" minOccurs="0"/>
- *         <element name="rights" type="{http://www.w3.org/2005/Atom}textType" minOccurs="0"/>
- *         <element name="source" type="{http://www.w3.org/2005/Atom}textType" minOccurs="0"/>
- *         <element name="summary" type="{http://www.w3.org/2005/Atom}textType" minOccurs="0"/>
- *         <element name="title" type="{http://www.w3.org/2005/Atom}textType"/>
- *         <element name="updated" type="{http://www.w3.org/2005/Atom}dateTimeType"/>
- *         <any namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
- *       </choice>
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "entryType", propOrder = { "entryChildren" }) -public class EntryType { - - @XmlElementRefs({ - @XmlElementRef(name = "category", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "rights", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "published", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "author", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "link", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "title", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "summary", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "id", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "source", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "content", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "updated", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "contributor", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class) }) - @XmlAnyElement(lax = true) - private List entryChildren; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the entryChildren property. - * - *

- * This accessor method returns a reference to the live list, not a - * snapshot. Therefore any modification you make to the returned list will - * be present inside the JAXB object. This is why there is not a - * set method for the entryChildren property. - * - *

- * For example, to add a new item, do as follows: - * - *

-     * getEntryChildren().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link CategoryType }{@code >} - * {@link JAXBElement }{@code <}{@link TextType }{@code >} {@link JAXBElement } - * {@code <}{@link DateTimeType }{@code >} {@link JAXBElement }{@code <} - * {@link PersonType }{@code >} {@link JAXBElement }{@code <}{@link LinkType } - * {@code >} {@link JAXBElement }{@code <}{@link TextType }{@code >} - * {@link JAXBElement }{@code <}{@link DateTimeType }{@code >} - * {@link JAXBElement }{@code <}{@link PersonType }{@code >} - * {@link JAXBElement }{@code <}{@link TextType }{@code >} {@link JAXBElement } - * {@code <}{@link TextType }{@code >} {@link JAXBElement }{@code <} - * {@link IdType }{@code >} {@link JAXBElement }{@code <}{@link ContentType } - * {@code >} {@link Object } - * - * - */ - public List getEntryChildren() { - if (entryChildren == null) { - entryChildren = new ArrayList(); - } - return this.entryChildren; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/FeedType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/FeedType.java deleted file mode 100644 index 319c1cfd2323..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/FeedType.java +++ /dev/null @@ -1,216 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.18 at 11:05:53 AM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom feed construct is defined in section 4.1.1 of the format spec. - * - * - *

- * Java class for feedType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="feedType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice maxOccurs="unbounded" minOccurs="3">
- *         <element name="author" type="{http://www.w3.org/2005/Atom}personType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="category" type="{http://www.w3.org/2005/Atom}categoryType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="contributor" type="{http://www.w3.org/2005/Atom}personType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="generator" type="{http://www.w3.org/2005/Atom}generatorType" minOccurs="0"/>
- *         <element name="icon" type="{http://www.w3.org/2005/Atom}iconType" minOccurs="0"/>
- *         <element name="id" type="{http://www.w3.org/2005/Atom}idType"/>
- *         <element name="link" type="{http://www.w3.org/2005/Atom}linkType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="logo" type="{http://www.w3.org/2005/Atom}logoType" minOccurs="0"/>
- *         <element name="rights" type="{http://www.w3.org/2005/Atom}textType" minOccurs="0"/>
- *         <element name="subtitle" type="{http://www.w3.org/2005/Atom}textType" minOccurs="0"/>
- *         <element name="title" type="{http://www.w3.org/2005/Atom}textType"/>
- *         <element name="updated" type="{http://www.w3.org/2005/Atom}dateTimeType"/>
- *         <element name="entry" type="{http://www.w3.org/2005/Atom}entryType" maxOccurs="unbounded" minOccurs="0"/>
- *         <any namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
- *       </choice>
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "feedType", propOrder = { "feedChildren" }) -public class FeedType { - - @XmlElementRefs({ - @XmlElementRef(name = "updated", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "generator", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "rights", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "id", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "link", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "subtitle", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "contributor", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "entry", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "logo", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "icon", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "author", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "category", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "title", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class) }) - @XmlAnyElement(lax = true) - private List feedChildren; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the feedChildren property. - * - *

- * This accessor method returns a reference to the live list, not a - * snapshot. Therefore any modification you make to the returned list will - * be present inside the JAXB object. This is why there is not a - * set method for the feedChildren property. - * - *

- * For example, to add a new item, do as follows: - * - *

-     * getFeedChildren().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link DateTimeType }{@code >} - * {@link JAXBElement }{@code <}{@link GeneratorType }{@code >} - * {@link JAXBElement }{@code <}{@link TextType }{@code >} {@link JAXBElement } - * {@code <}{@link IdType }{@code >} {@link JAXBElement }{@code <} - * {@link LinkType }{@code >} {@link JAXBElement }{@code <}{@link TextType } - * {@code >} {@link JAXBElement }{@code <}{@link PersonType }{@code >} - * {@link Object } {@link JAXBElement }{@code <}{@link EntryType }{@code >} - * {@link JAXBElement }{@code <}{@link LogoType }{@code >} {@link JAXBElement } - * {@code <}{@link IconType }{@code >} {@link JAXBElement }{@code <} - * {@link PersonType }{@code >} {@link JAXBElement }{@code <} - * {@link CategoryType }{@code >} {@link JAXBElement }{@code <} - * {@link TextType }{@code >} - * - * - */ - public List getFeedChildren() { - if (feedChildren == null) { - feedChildren = new ArrayList(); - } - return this.feedChildren; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/GeneratorType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/GeneratorType.java deleted file mode 100644 index 841656d31285..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/GeneratorType.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom generator element is defined in section 4.2.4 of the format spec. - * - * - *

- * Java class for generatorType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="generatorType">
- *   <simpleContent>
- *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <attribute name="uri" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *       <attribute name="version" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <anyAttribute namespace='##other'/>
- *     </extension>
- *   </simpleContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "generatorType", propOrder = { "value" }) -public class GeneratorType { - - @XmlValue - private String value; - @XmlAttribute - @XmlSchemaType(name = "anyURI") - private String uri; - @XmlAttribute - private String version; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the uri property. - * - * @return possible object is {@link String } - * - */ - public String getUri() { - return uri; - } - - /** - * Sets the value of the uri property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setUri(String value) { - this.uri = value; - } - - /** - * Gets the value of the version property. - * - * @return possible object is {@link String } - * - */ - public String getVersion() { - return version; - } - - /** - * Sets the value of the version property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setVersion(String value) { - this.version = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IconType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IconType.java deleted file mode 100644 index e98d74d6ae07..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IconType.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom icon construct is defined in section 4.2.5 of the format spec. - * - * - *

- * Java class for iconType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="iconType">
- *   <simpleContent>
- *     <extension base="<http://www.w3.org/2001/XMLSchema>anyURI">
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </extension>
- *   </simpleContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "iconType", propOrder = { "value" }) -public class IconType { - - @XmlValue - @XmlSchemaType(name = "anyURI") - private String value; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IdType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IdType.java deleted file mode 100644 index b3b4a215d51d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IdType.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom id construct is defined in section 4.2.6 of the format spec. - * - * - *

- * Java class for idType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="idType">
- *   <simpleContent>
- *     <extension base="<http://www.w3.org/2001/XMLSchema>anyURI">
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </extension>
- *   </simpleContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "idType", propOrder = { "value" }) -public class IdType { - - @XmlValue - @XmlSchemaType(name = "anyURI") - private String value; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LinkType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LinkType.java deleted file mode 100644 index 109c22639ac3..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LinkType.java +++ /dev/null @@ -1,312 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.math.BigInteger; -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom link construct is defined in section 3.4 of the format spec. - * - * - *

- * Java class for linkType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="linkType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <attribute name="href" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *       <attribute name="rel" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <attribute name="hreflang" type="{http://www.w3.org/2001/XMLSchema}NMTOKEN" />
- *       <attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <attribute name="length" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
- *       <anyAttribute namespace='##other'/>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "linkType", propOrder = { "content" }) -public class LinkType { - - @XmlValue - private String content; - @XmlAttribute(required = true) - @XmlSchemaType(name = "anyURI") - private String href; - @XmlAttribute - private String rel; - @XmlAttribute - private String type; - @XmlAttribute - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "NMTOKEN") - private String hreflang; - @XmlAttribute - private String title; - @XmlAttribute - @XmlSchemaType(name = "positiveInteger") - private BigInteger length; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * - * The Atom link construct is defined in section 3.4 of the format spec. - * - * - * @return possible object is {@link String } - * - */ - public String getContent() { - return content; - } - - /** - * Sets the value of the content property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setContent(String value) { - this.content = value; - } - - /** - * Gets the value of the href property. - * - * @return possible object is {@link String } - * - */ - public String getHref() { - return href; - } - - /** - * Sets the value of the href property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setHref(String value) { - this.href = value; - } - - /** - * Gets the value of the rel property. - * - * @return possible object is {@link String } - * - */ - public String getRel() { - return rel; - } - - /** - * Sets the value of the rel property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setRel(String value) { - this.rel = value; - } - - /** - * Gets the value of the type property. - * - * @return possible object is {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - - /** - * Gets the value of the hreflang property. - * - * @return possible object is {@link String } - * - */ - public String getHreflang() { - return hreflang; - } - - /** - * Sets the value of the hreflang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setHreflang(String value) { - this.hreflang = value; - } - - /** - * Gets the value of the title property. - * - * @return possible object is {@link String } - * - */ - public String getTitle() { - return title; - } - - /** - * Sets the value of the title property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setTitle(String value) { - this.title = value; - } - - /** - * Gets the value of the length property. - * - * @return possible object is {@link BigInteger } - * - */ - public BigInteger getLength() { - return length; - } - - /** - * Sets the value of the length property. - * - * @param value - * allowed object is {@link BigInteger } - * - */ - public void setLength(BigInteger value) { - this.length = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LogoType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LogoType.java deleted file mode 100644 index fa0c6be3491f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LogoType.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom logo construct is defined in section 4.2.8 of the format spec. - * - * - *

- * Java class for logoType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="logoType">
- *   <simpleContent>
- *     <extension base="<http://www.w3.org/2001/XMLSchema>anyURI">
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </extension>
- *   </simpleContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "logoType", propOrder = { "value" }) -public class LogoType { - - @XmlValue - @XmlSchemaType(name = "anyURI") - private String value; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ObjectFactory.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ObjectFactory.java deleted file mode 100644 index c664661da68b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ObjectFactory.java +++ /dev/null @@ -1,670 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlElementDecl; -import javax.xml.bind.annotation.XmlRegistry; -import javax.xml.bind.annotation.adapters.NormalizedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * This object contains factory methods for each Java content interface and Java - * element interface generated in the - * com.microsoft.windowsazure.services.media.implementation.atom package. - *

- * An ObjectFactory allows you to programatically construct new instances of the - * Java representation for XML content. The Java representation of XML content - * can consist of schema derived interfaces and classes representing the binding - * of schema type definitions, element declarations and model groups. Factory - * methods for each of these are provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - private static final QName ENTRY_QNAME = new QName( - "http://www.w3.org/2005/Atom", "entry"); - private static final QName FEED_QNAME = new QName( - "http://www.w3.org/2005/Atom", "feed"); - private static final QName PERSON_TYPE_NAME_QNAME = new QName( - "http://www.w3.org/2005/Atom", "name"); - private static final QName PERSON_TYPE_EMAIL_QNAME = new QName( - "http://www.w3.org/2005/Atom", "email"); - private static final QName PERSON_TYPE_URI_QNAME = new QName( - "http://www.w3.org/2005/Atom", "uri"); - private static final QName ENTRY_TYPE_TITLE_QNAME = new QName( - "http://www.w3.org/2005/Atom", "title"); - private static final QName ENTRY_TYPE_CATEGORY_QNAME = new QName( - "http://www.w3.org/2005/Atom", "category"); - private static final QName ENTRY_TYPE_AUTHOR_QNAME = new QName( - "http://www.w3.org/2005/Atom", "author"); - private static final QName ENTRY_TYPE_SUMMARY_QNAME = new QName( - "http://www.w3.org/2005/Atom", "summary"); - private static final QName ENTRY_TYPE_ID_QNAME = new QName( - "http://www.w3.org/2005/Atom", "id"); - private static final QName ENTRY_TYPE_CONTENT_QNAME = new QName( - "http://www.w3.org/2005/Atom", "content"); - private static final QName ENTRY_TYPE_LINK_QNAME = new QName( - "http://www.w3.org/2005/Atom", "link"); - private static final QName ENTRY_TYPE_CONTRIBUTOR_QNAME = new QName( - "http://www.w3.org/2005/Atom", "contributor"); - private static final QName ENTRY_TYPE_UPDATED_QNAME = new QName( - "http://www.w3.org/2005/Atom", "updated"); - private static final QName ENTRY_TYPE_SOURCE_QNAME = new QName( - "http://www.w3.org/2005/Atom", "source"); - private static final QName ENTRY_TYPE_RIGHTS_QNAME = new QName( - "http://www.w3.org/2005/Atom", "rights"); - private static final QName ENTRY_TYPE_PUBLISHED_QNAME = new QName( - "http://www.w3.org/2005/Atom", "published"); - private static final QName FEED_TYPE_GENERATOR_QNAME = new QName( - "http://www.w3.org/2005/Atom", "generator"); - private static final QName FEED_TYPE_SUBTITLE_QNAME = new QName( - "http://www.w3.org/2005/Atom", "subtitle"); - private static final QName FEED_TYPE_LOGO_QNAME = new QName( - "http://www.w3.org/2005/Atom", "logo"); - private static final QName FEED_TYPE_ICON_QNAME = new QName( - "http://www.w3.org/2005/Atom", "icon"); - - /** - * Create a new ObjectFactory that can be used to create new instances of - * schema derived classes for package: - * com.microsoft.windowsazure.services.media.implementation.atom - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link PersonType } - * - */ - public PersonType createPersonType() { - return new PersonType(); - } - - /** - * Create an instance of {@link EntryType } - * - */ - public EntryType createEntryType() { - return new EntryType(); - } - - /** - * Create an instance of {@link IconType } - * - */ - public IconType createIconType() { - return new IconType(); - } - - /** - * Create an instance of {@link UriType } - * - */ - public UriType createUriType() { - return new UriType(); - } - - /** - * Create an instance of {@link TextType } - * - */ - public TextType createTextType() { - return new TextType(); - } - - /** - * Create an instance of {@link FeedType } - * - */ - public FeedType createFeedType() { - return new FeedType(); - } - - /** - * Create an instance of {@link DateTimeType } - * - */ - public DateTimeType createDateTimeType() { - return new DateTimeType(); - } - - /** - * Create an instance of {@link IdType } - * - */ - public IdType createIdType() { - return new IdType(); - } - - /** - * Create an instance of {@link SourceType } - * - */ - public SourceType createSourceType() { - return new SourceType(); - } - - /** - * Create an instance of {@link LinkType } - * - */ - public LinkType createLinkType() { - return new LinkType(); - } - - /** - * Create an instance of {@link LogoType } - * - */ - public LogoType createLogoType() { - return new LogoType(); - } - - /** - * Create an instance of {@link GeneratorType } - * - */ - public GeneratorType createGeneratorType() { - return new GeneratorType(); - } - - /** - * Create an instance of {@link ContentType } - * - */ - public ContentType createContentType() { - return new ContentType(); - } - - /** - * Create an instance of {@link CategoryType } - * - */ - public CategoryType createCategoryType() { - return new CategoryType(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link EntryType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "entry") - public JAXBElement createEntry(EntryType value) { - return new JAXBElement(ENTRY_QNAME, EntryType.class, null, - value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link FeedType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "feed") - public JAXBElement createFeed(FeedType value) { - return new JAXBElement(FEED_QNAME, FeedType.class, null, - value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "name", scope = PersonType.class) - public JAXBElement createPersonTypeName(String value) { - return new JAXBElement(PERSON_TYPE_NAME_QNAME, String.class, - PersonType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "email", scope = PersonType.class) - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - public JAXBElement createPersonTypeEmail(String value) { - return new JAXBElement(PERSON_TYPE_EMAIL_QNAME, String.class, - PersonType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link UriType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "uri", scope = PersonType.class) - public JAXBElement createPersonTypeUri(UriType value) { - return new JAXBElement(PERSON_TYPE_URI_QNAME, UriType.class, - PersonType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "title", scope = EntryType.class) - public JAXBElement createEntryTypeTitle(TextType value) { - return new JAXBElement(ENTRY_TYPE_TITLE_QNAME, TextType.class, - EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link CategoryType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "category", scope = EntryType.class) - public JAXBElement createEntryTypeCategory(CategoryType value) { - return new JAXBElement(ENTRY_TYPE_CATEGORY_QNAME, - CategoryType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link PersonType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "author", scope = EntryType.class) - public JAXBElement createEntryTypeAuthor(PersonType value) { - return new JAXBElement(ENTRY_TYPE_AUTHOR_QNAME, - PersonType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "summary", scope = EntryType.class) - public JAXBElement createEntryTypeSummary(TextType value) { - return new JAXBElement(ENTRY_TYPE_SUMMARY_QNAME, - TextType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link IdType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "id", scope = EntryType.class) - public JAXBElement createEntryTypeId(IdType value) { - return new JAXBElement(ENTRY_TYPE_ID_QNAME, IdType.class, - EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link ContentType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "content", scope = EntryType.class) - public JAXBElement createEntryTypeContent(ContentType value) { - return new JAXBElement(ENTRY_TYPE_CONTENT_QNAME, - ContentType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link LinkType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "link", scope = EntryType.class) - public JAXBElement createEntryTypeLink(LinkType value) { - return new JAXBElement(ENTRY_TYPE_LINK_QNAME, LinkType.class, - EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link PersonType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "contributor", scope = EntryType.class) - public JAXBElement createEntryTypeContributor(PersonType value) { - return new JAXBElement(ENTRY_TYPE_CONTRIBUTOR_QNAME, - PersonType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link DateTimeType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "updated", scope = EntryType.class) - public JAXBElement createEntryTypeUpdated(DateTimeType value) { - return new JAXBElement(ENTRY_TYPE_UPDATED_QNAME, - DateTimeType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "source", scope = EntryType.class) - public JAXBElement createEntryTypeSource(TextType value) { - return new JAXBElement(ENTRY_TYPE_SOURCE_QNAME, - TextType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "rights", scope = EntryType.class) - public JAXBElement createEntryTypeRights(TextType value) { - return new JAXBElement(ENTRY_TYPE_RIGHTS_QNAME, - TextType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link DateTimeType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "published", scope = EntryType.class) - public JAXBElement createEntryTypePublished(DateTimeType value) { - return new JAXBElement(ENTRY_TYPE_PUBLISHED_QNAME, - DateTimeType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link CategoryType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "category", scope = FeedType.class) - public JAXBElement createFeedTypeCategory(CategoryType value) { - return new JAXBElement(ENTRY_TYPE_CATEGORY_QNAME, - CategoryType.class, FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "title", scope = FeedType.class) - public JAXBElement createFeedTypeTitle(TextType value) { - return new JAXBElement(ENTRY_TYPE_TITLE_QNAME, TextType.class, - FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link PersonType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "author", scope = FeedType.class) - public JAXBElement createFeedTypeAuthor(PersonType value) { - return new JAXBElement(ENTRY_TYPE_AUTHOR_QNAME, - PersonType.class, FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link IdType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "id", scope = FeedType.class) - public JAXBElement createFeedTypeId(IdType value) { - return new JAXBElement(ENTRY_TYPE_ID_QNAME, IdType.class, - FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link EntryType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "entry", scope = FeedType.class) - public JAXBElement createFeedTypeEntry(EntryType value) { - return new JAXBElement(ENTRY_QNAME, EntryType.class, - FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link PersonType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "contributor", scope = FeedType.class) - public JAXBElement createFeedTypeContributor(PersonType value) { - return new JAXBElement(ENTRY_TYPE_CONTRIBUTOR_QNAME, - PersonType.class, FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link DateTimeType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "updated", scope = FeedType.class) - public JAXBElement createFeedTypeUpdated(DateTimeType value) { - return new JAXBElement(ENTRY_TYPE_UPDATED_QNAME, - DateTimeType.class, FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link GeneratorType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "generator", scope = FeedType.class) - public JAXBElement createFeedTypeGenerator( - GeneratorType value) { - return new JAXBElement(FEED_TYPE_GENERATOR_QNAME, - GeneratorType.class, FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "subtitle", scope = FeedType.class) - public JAXBElement createFeedTypeSubtitle(TextType value) { - return new JAXBElement(FEED_TYPE_SUBTITLE_QNAME, - TextType.class, FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link LogoType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "logo", scope = FeedType.class) - public JAXBElement createFeedTypeLogo(LogoType value) { - return new JAXBElement(FEED_TYPE_LOGO_QNAME, LogoType.class, - FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link IconType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "icon", scope = FeedType.class) - public JAXBElement createFeedTypeIcon(IconType value) { - return new JAXBElement(FEED_TYPE_ICON_QNAME, IconType.class, - FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link LinkType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "link", scope = FeedType.class) - public JAXBElement createFeedTypeLink(LinkType value) { - return new JAXBElement(ENTRY_TYPE_LINK_QNAME, LinkType.class, - FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "rights", scope = FeedType.class) - public JAXBElement createFeedTypeRights(TextType value) { - return new JAXBElement(ENTRY_TYPE_RIGHTS_QNAME, - TextType.class, FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "title", scope = SourceType.class) - public JAXBElement createSourceTypeTitle(TextType value) { - return new JAXBElement(ENTRY_TYPE_TITLE_QNAME, TextType.class, - SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link CategoryType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "category", scope = SourceType.class) - public JAXBElement createSourceTypeCategory(CategoryType value) { - return new JAXBElement(ENTRY_TYPE_CATEGORY_QNAME, - CategoryType.class, SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link IconType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "icon", scope = SourceType.class) - public JAXBElement createSourceTypeIcon(IconType value) { - return new JAXBElement(FEED_TYPE_ICON_QNAME, IconType.class, - SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link PersonType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "author", scope = SourceType.class) - public JAXBElement createSourceTypeAuthor(PersonType value) { - return new JAXBElement(ENTRY_TYPE_AUTHOR_QNAME, - PersonType.class, SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link LogoType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "logo", scope = SourceType.class) - public JAXBElement createSourceTypeLogo(LogoType value) { - return new JAXBElement(FEED_TYPE_LOGO_QNAME, LogoType.class, - SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link IdType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "id", scope = SourceType.class) - public JAXBElement createSourceTypeId(IdType value) { - return new JAXBElement(ENTRY_TYPE_ID_QNAME, IdType.class, - SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link LinkType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "link", scope = SourceType.class) - public JAXBElement createSourceTypeLink(LinkType value) { - return new JAXBElement(ENTRY_TYPE_LINK_QNAME, LinkType.class, - SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link PersonType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "contributor", scope = SourceType.class) - public JAXBElement createSourceTypeContributor(PersonType value) { - return new JAXBElement(ENTRY_TYPE_CONTRIBUTOR_QNAME, - PersonType.class, SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link DateTimeType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "updated", scope = SourceType.class) - public JAXBElement createSourceTypeUpdated(DateTimeType value) { - return new JAXBElement(ENTRY_TYPE_UPDATED_QNAME, - DateTimeType.class, SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link GeneratorType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "generator", scope = SourceType.class) - public JAXBElement createSourceTypeGenerator( - GeneratorType value) { - return new JAXBElement(FEED_TYPE_GENERATOR_QNAME, - GeneratorType.class, SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "rights", scope = SourceType.class) - public JAXBElement createSourceTypeRights(TextType value) { - return new JAXBElement(ENTRY_TYPE_RIGHTS_QNAME, - TextType.class, SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "subtitle", scope = SourceType.class) - public JAXBElement createSourceTypeSubtitle(TextType value) { - return new JAXBElement(FEED_TYPE_SUBTITLE_QNAME, - TextType.class, SourceType.class, value); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/PersonType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/PersonType.java deleted file mode 100644 index 11f46bcdc0d0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/PersonType.java +++ /dev/null @@ -1,187 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom person construct is defined in section 3.2 of the format spec. - * - * - *

- * Java class for personType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="personType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice maxOccurs="unbounded">
- *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="uri" type="{http://www.w3.org/2005/Atom}uriType" minOccurs="0"/>
- *         <element name="email" type="{http://www.w3.org/2005/Atom}emailType" minOccurs="0"/>
- *         <any namespace='##other'/>
- *       </choice>
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "personType", propOrder = { "nameOrUriOrEmail" }) -public class PersonType { - - @XmlElementRefs({ - @XmlElementRef(name = "email", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "uri", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "name", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class) }) - @XmlAnyElement(lax = true) - private List nameOrUriOrEmail; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the nameOrUriOrEmail property. - * - *

- * This accessor method returns a reference to the live list, not a - * snapshot. Therefore any modification you make to the returned list will - * be present inside the JAXB object. This is why there is not a - * set method for the nameOrUriOrEmail property. - * - *

- * For example, to add a new item, do as follows: - * - *

-     * getNameOrUriOrEmail().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link String }{@code >} {@link Object } - * {@link JAXBElement }{@code <}{@link String }{@code >} {@link JAXBElement } - * {@code <}{@link UriType }{@code >} - * - * - */ - public List getNameOrUriOrEmail() { - if (nameOrUriOrEmail == null) { - nameOrUriOrEmail = new ArrayList(); - } - return this.nameOrUriOrEmail; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/SourceType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/SourceType.java deleted file mode 100644 index a11d845fec13..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/SourceType.java +++ /dev/null @@ -1,213 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom source construct is defined in section 4.2.11 of the format spec. - * - * - *

- * Java class for sourceType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="sourceType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice maxOccurs="unbounded">
- *         <element name="author" type="{http://www.w3.org/2005/Atom}personType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="category" type="{http://www.w3.org/2005/Atom}categoryType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="contributor" type="{http://www.w3.org/2005/Atom}personType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="generator" type="{http://www.w3.org/2005/Atom}generatorType" minOccurs="0"/>
- *         <element name="icon" type="{http://www.w3.org/2005/Atom}iconType" minOccurs="0"/>
- *         <element name="id" type="{http://www.w3.org/2005/Atom}idType" minOccurs="0"/>
- *         <element name="link" type="{http://www.w3.org/2005/Atom}linkType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="logo" type="{http://www.w3.org/2005/Atom}logoType" minOccurs="0"/>
- *         <element name="rights" type="{http://www.w3.org/2005/Atom}textType" minOccurs="0"/>
- *         <element name="subtitle" type="{http://www.w3.org/2005/Atom}textType" minOccurs="0"/>
- *         <element name="title" type="{http://www.w3.org/2005/Atom}textType" minOccurs="0"/>
- *         <element name="updated" type="{http://www.w3.org/2005/Atom}dateTimeType" minOccurs="0"/>
- *         <any namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
- *       </choice>
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "sourceType", propOrder = { "authorOrCategoryOrContributor" }) -public class SourceType { - - @XmlElementRefs({ - @XmlElementRef(name = "contributor", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "title", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "author", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "category", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "generator", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "logo", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "id", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "icon", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "link", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "rights", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "subtitle", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "updated", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class) }) - @XmlAnyElement(lax = true) - private List authorOrCategoryOrContributor; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the authorOrCategoryOrContributor property. - * - *

- * This accessor method returns a reference to the live list, not a - * snapshot. Therefore any modification you make to the returned list will - * be present inside the JAXB object. This is why there is not a - * set method for the authorOrCategoryOrContributor property. - * - *

- * For example, to add a new item, do as follows: - * - *

-     * getAuthorOrCategoryOrContributor().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link PersonType }{@code >} - * {@link JAXBElement }{@code <}{@link TextType }{@code >} {@link JAXBElement } - * {@code <}{@link PersonType }{@code >} {@link JAXBElement }{@code <} - * {@link GeneratorType }{@code >} {@link JAXBElement }{@code <} - * {@link LogoType }{@code >} {@link JAXBElement }{@code <}{@link IdType } - * {@code >} {@link JAXBElement }{@code <}{@link TextType }{@code >} - * {@link JAXBElement }{@code <}{@link DateTimeType }{@code >} - * {@link JAXBElement }{@code <}{@link CategoryType }{@code >} {@link Object } - * {@link JAXBElement }{@code <}{@link IconType }{@code >} {@link JAXBElement } - * {@code <}{@link LinkType }{@code >} {@link JAXBElement }{@code <} - * {@link TextType }{@code >} - * - * - */ - public List getAuthorOrCategoryOrContributor() { - if (authorOrCategoryOrContributor == null) { - authorOrCategoryOrContributor = new ArrayList(); - } - return this.authorOrCategoryOrContributor; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/TextType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/TextType.java deleted file mode 100644 index c18bd847bd81..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/TextType.java +++ /dev/null @@ -1,212 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom text construct is defined in section 3.1 of the format spec. - * - * - *

- * Java class for textType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="textType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <any namespace='http://www.w3.org/1999/xhtml' minOccurs="0"/>
- *       </sequence>
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <attribute name="type">
- *         <simpleType>
- *           <restriction base="{http://www.w3.org/2001/XMLSchema}token">
- *             <enumeration value="text"/>
- *             <enumeration value="html"/>
- *             <enumeration value="xhtml"/>
- *           </restriction>
- *         </simpleType>
- *       </attribute>
- *       <anyAttribute namespace='##other'/>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "textType", propOrder = { "content" }) -public class TextType { - - @XmlMixed - @XmlAnyElement(lax = true) - private List content; - @XmlAttribute - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - private String type; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * - * The Atom text construct is defined in section 3.1 of the format spec. - * Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, not a - * snapshot. Therefore any modification you make to the returned list will - * be present inside the JAXB object. This is why there is not a - * set method for the content property. - * - *

- * For example, to add a new item, do as follows: - * - *

-     * getContent().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link Object } - * {@link String } - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - /** - * Gets the value of the type property. - * - * @return possible object is {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/UriType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/UriType.java deleted file mode 100644 index 057e580264bc..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/UriType.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - *

- * Java class for uriType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="uriType">
- *   <simpleContent>
- *     <extension base="<http://www.w3.org/2001/XMLSchema>anyURI">
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </extension>
- *   </simpleContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "uriType", propOrder = { "value" }) -public class UriType { - - @XmlValue - @XmlSchemaType(name = "anyURI") - private String value; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/package-info.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/package-info.java deleted file mode 100644 index 23a179781afe..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/package-info.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.w3.org/2005/Atom", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) -package com.microsoft.windowsazure.services.media.implementation.atom; - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AccessPolicyType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AccessPolicyType.java deleted file mode 100644 index 4bb71e8b9b3c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AccessPolicyType.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * Wrapper DTO for Media Services access policies. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class AccessPolicyType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "DurationInMinutes", namespace = Constants.ODATA_DATA_NS) - private Double durationInMinutes; - - @XmlElement(name = "Permissions", namespace = Constants.ODATA_DATA_NS) - private Integer permissions; - - /** - * @return the id - */ - public String getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public AccessPolicyType setId(String id) { - this.id = id; - return this; - } - - /** - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * @param created - * the created to set - */ - public AccessPolicyType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * @return the lastModified - */ - public Date getLastModified() { - return lastModified; - } - - /** - * @param lastModified - * the lastModified to set - */ - public AccessPolicyType setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name - * the name to set - */ - public AccessPolicyType setName(String name) { - this.name = name; - return this; - } - - /** - * @return the durationInMinutes - */ - public Double getDurationInMinutes() { - return durationInMinutes; - } - - /** - * @param durationInMinutes - * the durationInMinutes to set - */ - public AccessPolicyType setDurationInMinutes(double durationInMinutes) { - this.durationInMinutes = durationInMinutes; - return this; - } - - /** - * @return the permissions - */ - public Integer getPermissions() { - return permissions; - } - - /** - * @param permissions - * the permissions to set - */ - public AccessPolicyType setPermissions(Integer permissions) { - this.permissions = permissions; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AkamaiAccessControlType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AkamaiAccessControlType.java deleted file mode 100644 index d1415036a3c1..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AkamaiAccessControlType.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; - -@XmlAccessorType(XmlAccessType.FIELD) -public class AkamaiAccessControlType { - - @XmlElementWrapper(name = "AkamaiSignatureHeaderAuthenticationKeyList", namespace = Constants.ODATA_DATA_NS) - @XmlElement(name = "element", namespace = Constants.ODATA_DATA_NS) - private List akamaiSignatureHeaderAuthenticationKeyList; - - public List getAkamaiSignatureHeaderAuthenticationKeyList() { - return akamaiSignatureHeaderAuthenticationKeyList; - } - - public void setAkamaiSignatureHeaderAuthenticationKeyList(List akamaiSignatureHeaderAuthenticationKeyList) { - this.akamaiSignatureHeaderAuthenticationKeyList = akamaiSignatureHeaderAuthenticationKeyList; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AkamaiSignatureHeaderAuthenticationKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AkamaiSignatureHeaderAuthenticationKey.java deleted file mode 100644 index 198ac88e52dd..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AkamaiSignatureHeaderAuthenticationKey.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -@XmlAccessorType(XmlAccessType.FIELD) -public class AkamaiSignatureHeaderAuthenticationKey { - - @XmlElement(name = "Identifier", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Expiration", namespace = Constants.ODATA_DATA_NS) - private Date expiration; - - @XmlElement(name = "Base64Key", namespace = Constants.ODATA_DATA_NS) - private String base64Key; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public Date getExpiration() { - return expiration; - } - - public void setExpiration(Date expiration) { - this.expiration = expiration; - } - - public String getBase64Key() { - return base64Key; - } - - public void setBase64Key(String base64Key) { - this.base64Key = base64Key; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetDeliveryPolicyRestType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetDeliveryPolicyRestType.java deleted file mode 100644 index 263a4b4a628f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetDeliveryPolicyRestType.java +++ /dev/null @@ -1,197 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -import org.codehaus.jettison.json.JSONArray; -import org.codehaus.jettison.json.JSONObject; - -import com.microsoft.windowsazure.services.media.models.AssetDeliveryPolicyConfigurationKey; - -/** - * This type maps the XML returned in the odata ATOM serialization for Asset - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class AssetDeliveryPolicyRestType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "AssetDeliveryProtocol", namespace = Constants.ODATA_DATA_NS) - private Integer assetDeliveryProtocol; - - @XmlElement(name = "AssetDeliveryPolicyType", namespace = Constants.ODATA_DATA_NS) - private Integer assetDeliveryPolicyType; - - @XmlElement(name = "AssetDeliveryConfiguration", namespace = Constants.ODATA_DATA_NS) - private String assetDeliveryConfiguration; - - /** - * @return the id - */ - public String getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public AssetDeliveryPolicyRestType setId(String id) { - this.id = id; - return this; - } - - /** - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * @param created - * the created to set - */ - public AssetDeliveryPolicyRestType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * @return the lastModified - */ - public Date getLastModified() { - return lastModified; - } - - /** - * @param lastModified - * the lastModified to set - */ - public AssetDeliveryPolicyRestType setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * @return the alternateId - */ - public Integer getAssetDeliveryProtocol() { - return assetDeliveryProtocol; - } - - /** - * @param alternateId - * the alternateId to set - */ - public AssetDeliveryPolicyRestType setAssetDeliveryProtocol(Integer assetDeliveryProtocol) { - this.assetDeliveryProtocol = assetDeliveryProtocol; - return this; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name - * the name to set - */ - public AssetDeliveryPolicyRestType setName(String name) { - this.name = name; - return this; - } - - /** - * @return the asset delivery policy type - */ - public Integer getAssetDeliveryPolicyType() { - return assetDeliveryPolicyType; - } - - /** - * @param assetDeliveryPolicyType - * the asset delivery policy type - */ - public AssetDeliveryPolicyRestType setAssetDeliveryPolicyType(Integer assetDeliveryPolicyType) { - this.assetDeliveryPolicyType = assetDeliveryPolicyType; - return this; - } - - /** - * @return the asset delivery configuration - */ - public Map getAssetDeliveryConfiguration() { - try { - Map results - = new HashMap(); - JSONArray source = new JSONArray(assetDeliveryConfiguration); - for (int i = 0; i < source.length(); i++) { - JSONObject row = source.getJSONObject(i); - results.put(AssetDeliveryPolicyConfigurationKey.fromCode(row.getInt("Key")), - row.getString("Value")); - } - return results; - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - /** - * @param assetDeliveryConfiguration - * the asset delivery configuration - * @return - */ - public AssetDeliveryPolicyRestType setAssetDeliveryConfiguration(Map assetDeliveryConfiguration) { - try { - JSONArray result = new JSONArray(); - if (assetDeliveryConfiguration != null) { - for (Map.Entry item : assetDeliveryConfiguration.entrySet()) { - JSONObject obj = new JSONObject(); - obj.put("Key", item.getKey().getCode()); - obj.put("Value", item.getValue()); - result.put(obj); - } - this.assetDeliveryConfiguration = result.toString(); - } - } catch (Exception e) { - throw new RuntimeException(e); - } - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetFileType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetFileType.java deleted file mode 100644 index 259659d5755d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetFileType.java +++ /dev/null @@ -1,297 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * Serialization for the AssetFile entity - * - */ - -@XmlAccessorType(XmlAccessType.FIELD) -public class AssetFileType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "ContentFileSize", namespace = Constants.ODATA_DATA_NS) - private Long contentFileSize; - - @XmlElement(name = "ParentAssetId", namespace = Constants.ODATA_DATA_NS) - private String parentAssetId; - - @XmlElement(name = "EncryptionVersion", namespace = Constants.ODATA_DATA_NS) - private String encryptionVersion; - - @XmlElement(name = "EncryptionScheme", namespace = Constants.ODATA_DATA_NS) - private String encryptionScheme; - - @XmlElement(name = "IsEncrypted", namespace = Constants.ODATA_DATA_NS) - private Boolean isEncrypted; - - @XmlElement(name = "EncryptionKeyId", namespace = Constants.ODATA_DATA_NS) - private String encryptionKeyId; - - @XmlElement(name = "InitializationVector", namespace = Constants.ODATA_DATA_NS) - private String initializationVector; - - @XmlElement(name = "IsPrimary", namespace = Constants.ODATA_DATA_NS) - private Boolean isPrimary; - - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - @XmlElement(name = "MimeType", namespace = Constants.ODATA_DATA_NS) - private String mimeType; - - @XmlElement(name = "ContentChecksum", namespace = Constants.ODATA_DATA_NS) - private String contentChecksum; - - /** - * @return the id - */ - public String getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public AssetFileType setId(String id) { - this.id = id; - return this; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name - * the name to set - */ - public AssetFileType setName(String name) { - this.name = name; - return this; - } - - /** - * @return the contentFileSize - */ - public Long getContentFileSize() { - return contentFileSize; - } - - /** - * @param contentFileSize - * the contentFileSize to set - */ - public AssetFileType setContentFileSize(Long contentFileSize) { - this.contentFileSize = contentFileSize; - return this; - } - - /** - * @return the parentAssetId - */ - public String getParentAssetId() { - return parentAssetId; - } - - /** - * @param parentAssetId - * the parentAssetId to set - */ - public AssetFileType setParentAssetId(String parentAssetId) { - this.parentAssetId = parentAssetId; - return this; - } - - /** - * @return the encryptionVersion - */ - public String getEncryptionVersion() { - return encryptionVersion; - } - - /** - * @param encryptionVersion - * the encryptionVersion to set - */ - public AssetFileType setEncryptionVersion(String encryptionVersion) { - this.encryptionVersion = encryptionVersion; - return this; - } - - /** - * @return the encryptionScheme - */ - public String getEncryptionScheme() { - return encryptionScheme; - } - - /** - * @param encryptionScheme - * the encryptionScheme to set - */ - public AssetFileType setEncryptionScheme(String encryptionScheme) { - this.encryptionScheme = encryptionScheme; - return this; - } - - /** - * @return the isEncrypted - */ - public Boolean getIsEncrypted() { - return isEncrypted; - } - - /** - * @param isEncrypted - * the isEncrypted to set - */ - public AssetFileType setIsEncrypted(Boolean isEncrypted) { - this.isEncrypted = isEncrypted; - return this; - } - - /** - * @return the encryptionKeyId - */ - public String getEncryptionKeyId() { - return encryptionKeyId; - } - - /** - * @param encryptionKeyId - * the encryptionKeyId to set - */ - public AssetFileType setEncryptionKeyId(String encryptionKeyId) { - this.encryptionKeyId = encryptionKeyId; - return this; - } - - /** - * @return the initializationVector - */ - public String getInitializationVector() { - return initializationVector; - } - - /** - * @param initializationVector - * the initializationVector to set - */ - public AssetFileType setInitializationVector(String initializationVector) { - this.initializationVector = initializationVector; - return this; - } - - /** - * @return the isPrimary - */ - public Boolean getIsPrimary() { - return isPrimary; - } - - /** - * @param isPrimary - * the isPrimary to set - */ - public AssetFileType setIsPrimary(Boolean isPrimary) { - this.isPrimary = isPrimary; - return this; - } - - /** - * @return the lastModified - */ - public Date getLastModified() { - return lastModified; - } - - /** - * @param lastModified - * the lastModified to set - */ - public AssetFileType setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * @param created - * the created to set - */ - public AssetFileType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * @return the mimeType - */ - public String getMimeType() { - return mimeType; - } - - /** - * @param mimeType - * the mimeType to set - */ - public AssetFileType setMimeType(String mimeType) { - this.mimeType = mimeType; - return this; - } - - /** - * @return the contentChecksum - */ - public String getContentChecksum() { - return contentChecksum; - } - - /** - * @param contentChecksum - * the contentChecksum to set - */ - public AssetFileType setContentChecksum(String contentChecksum) { - this.contentChecksum = contentChecksum; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetType.java deleted file mode 100644 index 68ba2fb637f2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetType.java +++ /dev/null @@ -1,199 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for Asset - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class AssetType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "State", namespace = Constants.ODATA_DATA_NS) - private Integer state; - - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - @XmlElement(name = "AlternateId", namespace = Constants.ODATA_DATA_NS) - private String alternateId; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "Options", namespace = Constants.ODATA_DATA_NS) - private Integer options; - - @XmlElement(name = "Uri", namespace = Constants.ODATA_DATA_NS) - private String uri; - - @XmlElement(name = "StorageAccountName", namespace = Constants.ODATA_DATA_NS) - private String storageAccountName; - - /** - * @return the id - */ - public String getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public AssetType setId(String id) { - this.id = id; - return this; - } - - /** - * @return the state - */ - public Integer getState() { - return state; - } - - /** - * @param state - * the state to set - */ - public AssetType setState(Integer state) { - this.state = state; - return this; - } - - /** - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * @param created - * the created to set - */ - public AssetType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * @return the lastModified - */ - public Date getLastModified() { - return lastModified; - } - - /** - * @param lastModified - * the lastModified to set - */ - public AssetType setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * @return the alternateId - */ - public String getAlternateId() { - return alternateId; - } - - /** - * @param alternateId - * the alternateId to set - */ - public AssetType setAlternateId(String alternateId) { - this.alternateId = alternateId; - return this; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name - * the name to set - */ - public AssetType setName(String name) { - this.name = name; - return this; - } - - /** - * @return the options - */ - public Integer getOptions() { - return options; - } - - /** - * @param options - * the options to set - */ - public AssetType setOptions(Integer options) { - this.options = options; - return this; - } - - /** - * @return The Name of the storage account that contains the asset’s blob container. - */ - public String getStorageAccountName() { - return storageAccountName; - } - - /** - * @param storageAccountName - * Name of the storage account that contains the asset’s blob container. - */ - public void setStorageAccountName(String storageAccountName) { - this.storageAccountName = storageAccountName; - } - - /** - * @return The URI of the blob storage container of the specified Asset - */ - public String getUri() { - return uri; - } - - /** - * @param The URI of the blob storage container of the specified Asset - */ - public void setUri(String uri) { - this.uri = uri; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ChannelType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ChannelType.java deleted file mode 100644 index 705bd40bd637..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ChannelType.java +++ /dev/null @@ -1,282 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.net.URI; -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for Asset - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class ChannelType implements MediaServiceDTO { - - /** The id. */ - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - /** The name. */ - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - /** The description. */ - @XmlElement(name = "Description", namespace = Constants.ODATA_DATA_NS) - private String description; - - /** The created. */ - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - /** The last modified. */ - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - /** The preview uri. */ - @XmlElement(name = "PreviewUri", namespace = Constants.ODATA_DATA_NS) - private URI previewUri; - - /** The ingest uri. */ - @XmlElement(name = "IngestUri", namespace = Constants.ODATA_DATA_NS) - private URI ingestUri; - - /** The state. */ - @XmlElement(name = "State", namespace = Constants.ODATA_DATA_NS) - private String state; - - /** The size. */ - @XmlElement(name = "Size", namespace = Constants.ODATA_DATA_NS) - private String size; - - /** The settings. */ - @XmlElement(name = "Settings", namespace = Constants.ODATA_DATA_NS) - private String settings; - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return this.id; - } - - /** - * Sets the id. - * - * @param id - * the id - * @return the channel type - */ - public ChannelType setId(String id) { - this.id = id; - return this; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Sets the name. - * - * @param name - * the name to set - * @return the channel type - */ - public ChannelType setName(String name) { - this.name = name; - return this; - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Sets the description. - * - * @param description - * the description - * @return the channel type - */ - public ChannelType setDescription(String description) { - this.description = description; - return this; - } - - /** - * Gets the created. - * - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * Sets the created. - * - * @param created - * the created - * @return the channel type - */ - public ChannelType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * Gets the last modified. - * - * @return the lastModified - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Sets the last modified. - * - * @param lastModified - * the last modified - * @return the channel type - */ - public ChannelType setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * Sets the preview uri. - * - * @param previewUri - * the preview uri - * @return the channel type - */ - public ChannelType setPreviewUri(URI previewUri) { - this.previewUri = previewUri; - return this; - } - - /** - * Gets the preview uri. - * - * @return the preview - */ - public URI getPreviewUri() { - return previewUri; - } - - /** - * Sets the ingest uri. - * - * @param ingestUri - * the ingest uri - * @return the channel type - */ - public ChannelType setIngestUri(URI ingestUri) { - this.ingestUri = ingestUri; - return this; - } - - /** - * Gets the ingest uri. - * - * @return the ingest uri - */ - public URI getIngestUri() { - return ingestUri; - } - - /** - * Sets the state. - * - * @param state - * the state - * @return the channel type - */ - public ChannelType setState(String state) { - this.state = state; - return this; - } - - /** - * Gets the state. - * - * @return the state - */ - public String getState() { - return this.state; - } - - /** - * Gets the size. - * - * @return the name - */ - public String getSize() { - return this.size; - } - - /** - * Sets the size. - * - * @param size - * the size - * @return the channel type - */ - public ChannelType setSize(String size) { - this.size = size; - return this; - } - - /** - * Gets the settings. - * - * @return the settings - */ - public String getSettings() { - return this.settings; - } - - /** - * Sets the settings. - * - * @param settings - * the settings - * @return the channel type - */ - public ChannelType setSettings(String settings) { - this.settings = settings; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/Constants.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/Constants.java deleted file mode 100644 index 747a8e0e4813..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/Constants.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.namespace.QName; - -/** - * This class provides a set of constants for element names and namespaces used - * throughout the serialization of media services entities. - */ - -public final class Constants { - - private Constants() { - } - - /** - * XML Namespace for Atom syndication format, as defined by IETF RFC 4287 - */ - public static final String ATOM_NS = "http://www.w3.org/2005/Atom"; - - /** - * XML Namespace for OData data as serialized inside Atom syndication - * format. - */ - public static final String ODATA_DATA_NS = "http://schemas.microsoft.com/ado/2007/08/dataservices"; - - /** - * XML Namespace for OData metadata as serialized inside Atom syndication - * format. - */ - public static final String ODATA_METADATA_NS = "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"; - - /** - * EDM namespace for Azure Media Services entities, as defined in Media - * Services EDMX file. - */ - public static final String MEDIA_SERVICES_EDM_NAMESPACE = "Microsoft.Cloud.Media.Vod.Rest.Data.Models"; - - /** - * Element name for Atom content element, including namespace - */ - public static final QName ATOM_CONTENT_ELEMENT_NAME = new QName("content", - ATOM_NS); - - /** - * Element name for OData action elements, including namespace - */ - public static final QName ODATA_ACTION_ELEMENT_NAME = new QName("action", - ODATA_METADATA_NS); - - /** - * Element name for the metadata properties element, including namespace. - */ - public static final QName ODATA_PROPERTIES_ELEMENT_NAME = new QName( - "properties", ODATA_METADATA_NS); -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyOptionType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyOptionType.java deleted file mode 100644 index 4d0eb6f54e83..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyOptionType.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; - -@XmlAccessorType(XmlAccessType.FIELD) -public class ContentKeyAuthorizationPolicyOptionType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "KeyDeliveryType", namespace = Constants.ODATA_DATA_NS) - private int keyDeliveryType; - - @XmlElement(name = "KeyDeliveryConfiguration", namespace = Constants.ODATA_DATA_NS) - private String keyDeliveryConfiguration; - - @XmlElementWrapper(name = "Restrictions", namespace = Constants.ODATA_DATA_NS) - @XmlElement(name = "element", namespace = Constants.ODATA_DATA_NS) - private List restrictions; - - public String getId() { - return id; - } - - public ContentKeyAuthorizationPolicyOptionType setId(String id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public ContentKeyAuthorizationPolicyOptionType setName(String name) { - this.name = name; - return this; - } - - public int getKeyDeliveryType() { - return keyDeliveryType; - } - - public ContentKeyAuthorizationPolicyOptionType setKeyDeliveryType(int keyDeliveryType) { - this.keyDeliveryType = keyDeliveryType; - return this; - } - - public String getKeyDeliveryConfiguration() { - return keyDeliveryConfiguration; - } - - public ContentKeyAuthorizationPolicyOptionType setKeyDeliveryConfiguration(String keyDeliveryConfiguration) { - this.keyDeliveryConfiguration = keyDeliveryConfiguration; - return this; - } - - public List getRestrictions() { - return restrictions; - } - - public ContentKeyAuthorizationPolicyOptionType setRestrictions( - List restrictions) { - this.restrictions = restrictions; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyRestrictionType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyRestrictionType.java deleted file mode 100644 index 89d592c22429..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyRestrictionType.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -@XmlAccessorType(XmlAccessType.FIELD) -public class ContentKeyAuthorizationPolicyRestrictionType implements MediaServiceDTO { - - /** The name. */ - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - /** The KeyRestrictionType. */ - @XmlElement(name = "KeyRestrictionType", namespace = Constants.ODATA_DATA_NS) - private int keyRestrictionType; - - /** The KeyRestrictionType. */ - @XmlElement(name = "Requirements", namespace = Constants.ODATA_DATA_NS) - private String requirements; - - public String getName() { - return name; - } - - public ContentKeyAuthorizationPolicyRestrictionType setName(String name) { - this.name = name; - return this; - } - - public int getKeyRestrictionType() { - return keyRestrictionType; - } - - public ContentKeyAuthorizationPolicyRestrictionType setKeyRestrictionType(int keyRestrictionType) { - this.keyRestrictionType = keyRestrictionType; - return this; - } - - public String getRequirements() { - return requirements; - } - - public ContentKeyAuthorizationPolicyRestrictionType setRequirements(String requirements) { - this.requirements = requirements; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyType.java deleted file mode 100644 index 8bc56b024c0d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyType.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -@XmlAccessorType(XmlAccessType.FIELD) -public class ContentKeyAuthorizationPolicyType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - /** - * @return the id - */ - public String getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public ContentKeyAuthorizationPolicyType setId(String id) { - this.id = id; - return this; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name - * the name to set - */ - public ContentKeyAuthorizationPolicyType setName(String name) { - this.name = name; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyRestType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyRestType.java deleted file mode 100644 index 79dc66e11e41..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyRestType.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for Asset - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class ContentKeyRestType implements MediaServiceDTO { - - /** The id. */ - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - /** The created. */ - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - /** The last modified. */ - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - /** The content key type. */ - @XmlElement(name = "ContentKeyType", namespace = Constants.ODATA_DATA_NS) - private Integer contentKeyType; - - /** The encrypted content key. */ - @XmlElement(name = "EncryptedContentKey", namespace = Constants.ODATA_DATA_NS) - private String encryptedContentKey; - - /** The name. */ - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - /** The protection key id. */ - @XmlElement(name = "ProtectionKeyId", namespace = Constants.ODATA_DATA_NS) - private String protectionKeyId; - - /** The protection key type. */ - @XmlElement(name = "ProtectionKeyType", namespace = Constants.ODATA_DATA_NS) - private Integer protectionKeyType; - - /** The checksum. */ - @XmlElement(name = "Checksum", namespace = Constants.ODATA_DATA_NS) - private String checksum; - - /** The authorization policy id . */ - @XmlElement(name = "AuthorizationPolicyId", namespace = Constants.ODATA_DATA_NS) - private String authorizationPolicyId; - - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return id; - } - - /** - * Sets the id. - * - * @param id - * the id to set - * @return the content key rest type - */ - public ContentKeyRestType setId(String id) { - this.id = id; - return this; - } - - /** - * Gets the created. - * - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * Sets the created. - * - * @param created - * the created to set - * @return the content key rest type - */ - public ContentKeyRestType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * Gets the last modified. - * - * @return the lastModified - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Sets the last modified. - * - * @param lastModified - * the lastModified to set - * @return the content key rest type - */ - public ContentKeyRestType setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * Gets the content key type. - * - * @return the content key type - */ - public Integer getContentKeyType() { - return contentKeyType; - } - - /** - * Sets the content key type. - * - * @param contentKeyType - * the new content key type - * @return the content key rest type - */ - public ContentKeyRestType setContentKeyType(Integer contentKeyType) { - this.contentKeyType = contentKeyType; - return this; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Sets the name. - * - * @param name - * the name to set - * @return the content key rest type - */ - public ContentKeyRestType setName(String name) { - this.name = name; - return this; - } - - /** - * Sets the checksum. - * - * @param checksum - * the new checksum - * @return the content key rest type - */ - public ContentKeyRestType setChecksum(String checksum) { - this.checksum = checksum; - return this; - } - - /** - * Gets the checksum. - * - * @return the checksum - */ - public String getChecksum() { - return this.checksum; - } - - /** - * Sets the protection key type. - * - * @param protectionKeyType - * the new protection key type - * @return the content key rest type - */ - public ContentKeyRestType setProtectionKeyType(Integer protectionKeyType) { - this.protectionKeyType = protectionKeyType; - return this; - } - - /** - * Gets the protection key type. - * - * @return the protection key type - */ - public Integer getProtectionKeyType() { - return this.protectionKeyType; - } - - /** - * Sets the protection key id. - * - * @param protectionKeyId - * the new protection key id - * @return the content key rest type - */ - public ContentKeyRestType setProtectionKeyId(String protectionKeyId) { - this.protectionKeyId = protectionKeyId; - return this; - } - - /** - * Gets the protection key id. - * - * @return the protection key id - */ - public String getProtectionKeyId() { - return this.protectionKeyId; - } - - /** - * Sets the encrypted content key. - * - * @param encryptedContentKey - * the encrypted content key - * @return the content key rest type - */ - public ContentKeyRestType setEncryptedContentKey(String encryptedContentKey) { - this.encryptedContentKey = encryptedContentKey; - return this; - } - - /** - * Gets the encrypted content key. - * - * @return the encrypted content key - */ - public String getEncryptedContentKey() { - return this.encryptedContentKey; - } - - - /** - * Sets the authorization policy id. - * - * @param authorizationPolicyId - * the authorization policy id - * @return the content key rest type - */ - public ContentKeyRestType setAuthorizationPolicyId(String authorizationPolicyId) { - this.authorizationPolicyId = authorizationPolicyId; - return this; - } - - /** - * Gets the the authorization policy id. - * - * @return the authorization policy id - */ - public String getAuthorizationPolicyId() { - return authorizationPolicyId; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/CrossSiteAccessPoliciesType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/CrossSiteAccessPoliciesType.java deleted file mode 100644 index 3e4165a6694b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/CrossSiteAccessPoliciesType.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -@XmlAccessorType(XmlAccessType.FIELD) -public class CrossSiteAccessPoliciesType { - - @XmlElement(name = "ClientAccessPolicy", namespace = Constants.ODATA_DATA_NS) - private String clientAccessPolicy; - - @XmlElement(name = "CrossDomainPolicy", namespace = Constants.ODATA_DATA_NS) - private String crossDomainPolicy; - - public String getClientAccessPolicy() { - return clientAccessPolicy; - } - - public void setClientAccessPolicy(String clientAccessPolicy) { - this.clientAccessPolicy = clientAccessPolicy; - } - - public String getCrossDomainPolicy() { - return crossDomainPolicy; - } - - public void setCrossDomainPolicy(String crossDomainPolicy) { - this.crossDomainPolicy = crossDomainPolicy; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/EncodingReservedUnitRestType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/EncodingReservedUnitRestType.java deleted file mode 100644 index bab01b35b10c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/EncodingReservedUnitRestType.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * Wrapper DTO for Media Services access policies. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class EncodingReservedUnitRestType implements MediaServiceDTO { - - @XmlElement(name = "AccountId", namespace = Constants.ODATA_DATA_NS) - private String accountId; - - @XmlElement(name = "ReservedUnitType", namespace = Constants.ODATA_DATA_NS) - private int reservedUnitType; - - @XmlElement(name = "MaxReservableUnits", namespace = Constants.ODATA_DATA_NS) - private Integer maxReservableUnits; - - @XmlElement(name = "CurrentReservedUnits", namespace = Constants.ODATA_DATA_NS) - private int currentReservedUnits; - - /** - * @return the accountId - */ - public String getAccountId() { - return accountId; - } - - /** - * @param accountId the accountId to set - */ - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - /** - * @return the reservedUnitType - */ - public int getReservedUnitType() { - return reservedUnitType; - } - - /** - * @param reservedUnitType the reservedUnitType to set - */ - public void setReservedUnitType(int reservedUnitType) { - this.reservedUnitType = reservedUnitType; - } - - /** - * @return the maxReservableUnits - */ - public int getMaxReservableUnits() { - return maxReservableUnits; - } - - /** - * @param maxReservableUnits the maxReservableUnits to set - */ - public void setMaxReservableUnits(int maxReservableUnits) { - this.maxReservableUnits = maxReservableUnits; - } - - /** - * @return the currentReservedUnits - */ - public int getCurrentReservedUnits() { - return currentReservedUnits; - } - - /** - * @param currentReservedUnits the currentReservedUnits to set - */ - public void setCurrentReservedUnits(int currentReservedUnits) { - this.currentReservedUnits = currentReservedUnits; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ErrorDetailType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ErrorDetailType.java deleted file mode 100644 index cbb6a32bb6cb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ErrorDetailType.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for - * ErrorDetail entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class ErrorDetailType implements MediaServiceDTO { - - /** The code. */ - @XmlElement(name = "Code", namespace = Constants.ODATA_DATA_NS) - private String code; - - /** The message. */ - @XmlElement(name = "Message", namespace = Constants.ODATA_DATA_NS) - private String message; - - /** - * Gets the code. - * - * @return the code - */ - public String getCode() { - return code; - } - - /** - * Sets the code. - * - * @param code - * the id to set - * @return the error detail type - */ - public ErrorDetailType setCode(String code) { - this.code = code; - return this; - } - - /** - * Gets the message. - * - * @return the message - */ - public String getMessage() { - return message; - } - - /** - * Sets the message. - * - * @param message - * the message to set - * @return the error detail type - */ - public ErrorDetailType setMessage(String message) { - this.message = message; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ErrorType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ErrorType.java deleted file mode 100644 index f736fabe3605..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ErrorType.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for - * ErrorDetail entities. - * - */ - -@XmlRootElement(name = "error", namespace = Constants.ODATA_METADATA_NS) -@XmlAccessorType(XmlAccessType.FIELD) -public class ErrorType { - - /** The code. */ - @XmlElement(name = "code", namespace = Constants.ODATA_METADATA_NS) - private String code; - - /** The message. */ - @XmlElement(name = "message", namespace = Constants.ODATA_METADATA_NS) - private String message; - - /** - * Gets the code. - * - * @return the code - */ - public String getCode() { - return code; - } - - /** - * Sets the code. - * - * @param code - * the id to set - * @return the error type - */ - public ErrorType setCode(String code) { - this.code = code; - return this; - } - - /** - * Gets the message. - * - * @return the message - */ - public String getMessage() { - return message; - } - - /** - * Sets the message. - * - * @param message - * the message to set - * @return the error type - */ - public ErrorType setMessage(String message) { - this.message = message; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/IPAccessControlType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/IPAccessControlType.java deleted file mode 100644 index 3c288be62aed..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/IPAccessControlType.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; - -@XmlAccessorType(XmlAccessType.FIELD) -public class IPAccessControlType { - - @XmlElementWrapper(name = "Allow", namespace = Constants.ODATA_DATA_NS) - @XmlElement(name = "element", namespace = Constants.ODATA_DATA_NS) - private List ipRange; - - public List getIpRange() { - return ipRange; - } - - public void setIpRange(List ipRange) { - this.ipRange = ipRange; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/IPRangeType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/IPRangeType.java deleted file mode 100644 index 0ff87d89d4f5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/IPRangeType.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -@XmlAccessorType(XmlAccessType.FIELD) -public class IPRangeType { - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "Address", namespace = Constants.ODATA_DATA_NS) - private String address; - - @XmlElement(name = "SubnetPrefixLength", namespace = Constants.ODATA_DATA_NS) - private int subnetPrefixLength; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - public int getSubnetPrefixLength() { - return subnetPrefixLength; - } - - public void setSubnetPrefixLength(int subnetPrefixLength) { - this.subnetPrefixLength = subnetPrefixLength; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobNotificationSubscriptionType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobNotificationSubscriptionType.java deleted file mode 100644 index f2df8847e70e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobNotificationSubscriptionType.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for job - * notification subscription. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class JobNotificationSubscriptionType implements MediaServiceDTO { - - /** The ID of the notification end point. */ - @XmlElement(name = "NotificationEndPointId", namespace = Constants.ODATA_DATA_NS) - private String notificationEndPointId; - - /** The target state of the job. */ - @XmlElement(name = "TargetJobState", namespace = Constants.ODATA_DATA_NS) - private int targetJobState; - - /** - * Gets the ID of the notification end point. - * - * @return the ID of the notification end point. - */ - public String getNotificationEndPointId() { - return this.notificationEndPointId; - } - - /** - * Sets the ID of the notification end point. - * - * @param notificationEndPointId - * the ID of the notification end point to set - * @return the job notification subscription type - */ - public JobNotificationSubscriptionType setNotificationEndPointId( - String notificationEndPointId) { - this.notificationEndPointId = notificationEndPointId; - return this; - } - - /** - * Gets the target job state. - * - * @return an integer representing the target job state. - */ - public int getTargetJobState() { - return targetJobState; - } - - /** - * Sets the target job state. - * - * @param targetJobState - * the target job state - * @return the target job state - */ - public JobNotificationSubscriptionType setTargetJobState(int targetJobState) { - this.targetJobState = targetJobState; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobType.java deleted file mode 100644 index c3661b7b9ae6..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobType.java +++ /dev/null @@ -1,315 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; - -/** - * This type maps the XML returned in the odata ATOM serialization for Job - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class JobType implements MediaServiceDTO { - - /** The id. */ - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - /** The job notification subscriptions. */ - @XmlElementWrapper(name = "JobNotificationSubscriptions", namespace = Constants.ODATA_DATA_NS) - @XmlElement(name = "element", namespace = Constants.ODATA_DATA_NS) - private List jobNotificationSubscriptionTypes; - - /** The name. */ - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - /** The created. */ - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - /** The last modified. */ - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - /** The end time. */ - @XmlElement(name = "EndTime", namespace = Constants.ODATA_DATA_NS) - private Date endTime; - - /** The priority. */ - @XmlElement(name = "Priority", namespace = Constants.ODATA_DATA_NS) - private Integer priority; - - /** The running duration. */ - @XmlElement(name = "RunningDuration", namespace = Constants.ODATA_DATA_NS) - private Double runningDuration; - - /** The start time. */ - @XmlElement(name = "StartTime", namespace = Constants.ODATA_DATA_NS) - private Date startTime; - - /** The state. */ - @XmlElement(name = "State", namespace = Constants.ODATA_DATA_NS) - private Integer state; - - /** The template id. */ - @XmlElement(name = "TemplateId", namespace = Constants.ODATA_DATA_NS) - private String templateId; - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return id; - } - - /** - * Sets the id. - * - * @param id - * the new id - * @return the job type - */ - public JobType setId(String id) { - this.id = id; - return this; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Sets the name. - * - * @param name - * the new name - * @return the job type - */ - public JobType setName(String name) { - this.name = name; - return this; - } - - /** - * Gets the created. - * - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * Sets the created. - * - * @param created - * the new created - * @return the job type - */ - public JobType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * Gets the last modified. - * - * @return the last modified - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Sets the last modified. - * - * @param lastModified - * the new last modified - * @return the job type - */ - public JobType setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * Gets the end time. - * - * @return the end time - */ - public Date getEndTime() { - return endTime; - } - - /** - * Sets the end time. - * - * @param endTime - * the new end time - * @return the job type - */ - public JobType setEndTime(Date endTime) { - this.endTime = endTime; - return this; - } - - /** - * Gets the priority. - * - * @return the priority - */ - public Integer getPriority() { - return priority; - } - - /** - * Sets the priority. - * - * @param priority - * the new priority - * @return the job type - */ - public JobType setPriority(Integer priority) { - this.priority = priority; - return this; - } - - /** - * Gets the running duration. - * - * @return the running duration - */ - public Double getRunningDuration() { - return runningDuration; - } - - /** - * Sets the running duration. - * - * @param runningDuration - * the new running duration - * @return the job type - */ - public JobType setRunningDuration(Double runningDuration) { - this.runningDuration = runningDuration; - return this; - } - - /** - * Gets the start time. - * - * @return the start time - */ - public Date getStartTime() { - return startTime; - } - - /** - * Sets the start time. - * - * @param startTime - * the new start time - * @return the job type - */ - public JobType setStartTime(Date startTime) { - this.startTime = startTime; - return this; - } - - /** - * Gets the state. - * - * @return the state - */ - public Integer getState() { - return state; - } - - /** - * Sets the state. - * - * @param state - * the new state - * @return the job type - */ - public JobType setState(Integer state) { - this.state = state; - return this; - } - - /** - * Gets the template id. - * - * @return the template id - */ - public String getTemplateId() { - return templateId; - } - - /** - * Sets the template id. - * - * @param templateId - * the new template id - * @return the job type - */ - public JobType setTemplateId(String templateId) { - this.templateId = templateId; - return this; - } - - /** - * Gets the job notification subscriptions. - * - * @return the job notification subscriptions - */ - public List getJobNotificationSubscriptionTypes() { - return this.jobNotificationSubscriptionTypes; - } - - /** - * Adds the job notification subscription type. - * - * @param jobNotificationSubscription - * the job notification subscription - * @return the job type - */ - public JobType addJobNotificationSubscriptionType( - JobNotificationSubscriptionType jobNotificationSubscription) { - if (this.jobNotificationSubscriptionTypes == null) { - this.jobNotificationSubscriptionTypes = new ArrayList(); - } - this.jobNotificationSubscriptionTypes.add(jobNotificationSubscription); - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/LocatorRestType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/LocatorRestType.java deleted file mode 100644 index f010311c73bb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/LocatorRestType.java +++ /dev/null @@ -1,256 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * Wrapper DTO for Media Services Locator. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class LocatorRestType implements MediaServiceDTO { - - /** The id. */ - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - /** The expiration date time. */ - @XmlElement(name = "ExpirationDateTime", namespace = Constants.ODATA_DATA_NS) - private Date expirationDateTime; - - /** The type. */ - @XmlElement(name = "Type", namespace = Constants.ODATA_DATA_NS) - private Integer type; - - /** The path. */ - @XmlElement(name = "Path", namespace = Constants.ODATA_DATA_NS) - private String path; - - /** The access policy id. */ - @XmlElement(name = "AccessPolicyId", namespace = Constants.ODATA_DATA_NS) - private String accessPolicyId; - - /** The asset id. */ - @XmlElement(name = "AssetId", namespace = Constants.ODATA_DATA_NS) - private String assetId; - - /** The start time. */ - @XmlElement(name = "StartTime", namespace = Constants.ODATA_DATA_NS) - private Date startTime; - - /** The base uri. */ - @XmlElement(name = "BaseUri", namespace = Constants.ODATA_DATA_NS) - private String baseUri; - - /** The content access component. */ - @XmlElement(name = "ContentAccessComponent", namespace = Constants.ODATA_DATA_NS) - private String contentAccessComponent; - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return id; - } - - /** - * Sets the id. - * - * @param id - * the id to set - * @return the locator rest type - */ - public LocatorRestType setId(String id) { - this.id = id; - return this; - } - - /** - * Gets the expiration date time. - * - * @return the expiration date time - */ - public Date getExpirationDateTime() { - return expirationDateTime; - } - - /** - * Sets the expiration date time. - * - * @param expirationDateTime - * the expiration date time - * @return the locator rest type - */ - public LocatorRestType setExpirationDateTime(Date expirationDateTime) { - this.expirationDateTime = expirationDateTime; - return this; - } - - /** - * Gets the type. - * - * @return the type - */ - public Integer getType() { - return this.type; - } - - /** - * Sets the type. - * - * @param type - * the type - * @return the locator rest type - */ - public LocatorRestType setType(Integer type) { - this.type = type; - return this; - } - - /** - * Gets the access policy id. - * - * @return the access policy id - */ - public String getAccessPolicyId() { - return this.accessPolicyId; - } - - /** - * Sets the access policy id. - * - * @param accessPolicyId - * the access policy id - * @return the locator rest type - */ - public LocatorRestType setAccessPolicyId(String accessPolicyId) { - this.accessPolicyId = accessPolicyId; - return this; - } - - /** - * Gets the asset id. - * - * @return the asset id - */ - public String getAssetId() { - return this.assetId; - } - - /** - * Sets the asset id. - * - * @param assetId - * the asset id - * @return the locator rest type - */ - public LocatorRestType setAssetId(String assetId) { - this.assetId = assetId; - return this; - } - - /** - * Gets the start time. - * - * @return the start time - */ - public Date getStartTime() { - return this.startTime; - } - - /** - * Sets the start time. - * - * @param startTime - * the start time - * @return the locator rest type - */ - public LocatorRestType setStartTime(Date startTime) { - this.startTime = startTime; - return this; - } - - /** - * Gets the path. - * - * @return the path - */ - public String getPath() { - return this.path; - } - - /** - * Sets the path. - * - * @param path - * the path - * @return the locator rest type - */ - public LocatorRestType setPath(String path) { - this.path = path; - return this; - } - - /** - * Gets the base uri. - * - * @return the base uri - */ - public String getBaseUri() { - return this.baseUri; - } - - /** - * Sets the base uri. - * - * @param baseUri - * the base uri - * @return the locator rest type - */ - public LocatorRestType setBaseUri(String baseUri) { - this.baseUri = baseUri; - return this; - } - - /** - * Gets the content access component. - * - * @return the content access component - */ - public String getContentAccessComponent() { - return this.contentAccessComponent; - } - - /** - * Sets the content access component. - * - * @param contentAccessComponent - * the content access component - * @return the locator rest type - */ - public LocatorRestType setContentAccessComponent( - String contentAccessComponent) { - this.contentAccessComponent = contentAccessComponent; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaProcessorType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaProcessorType.java deleted file mode 100644 index 809707af4117..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaProcessorType.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for Asset - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class MediaProcessorType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "Description", namespace = Constants.ODATA_DATA_NS) - private String description; - - @XmlElement(name = "Sku", namespace = Constants.ODATA_DATA_NS) - private String sku; - - @XmlElement(name = "Vendor", namespace = Constants.ODATA_DATA_NS) - private String vendor; - - @XmlElement(name = "Version", namespace = Constants.ODATA_DATA_NS) - private String version; - - /** - * @return the id - */ - public String getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public MediaProcessorType setId(String id) { - this.id = id; - return this; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name - * the name to set - */ - public MediaProcessorType setName(String name) { - this.name = name; - return this; - } - - public String getDescription() { - return this.description; - } - - public MediaProcessorType setDescription(String description) { - this.description = description; - return this; - } - - public String getSku() { - return this.sku; - } - - public MediaProcessorType setSku(String sku) { - this.sku = sku; - return this; - } - - public String getVendor() { - return vendor; - } - - public MediaProcessorType setVendor(String vendor) { - this.vendor = vendor; - return this; - } - - public String getVersion() { - return this.version; - } - - public MediaProcessorType setVersion(String version) { - this.version = version; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaServiceDTO.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaServiceDTO.java deleted file mode 100644 index 588e613ec096..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaServiceDTO.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -/** - * Marker interface to mark types as a data transfer object to or from Media - * Services. - * - * This is a marker interface rather than an annotation so that it can be used - * as a generic type parameter or restriction. - * - */ -public interface MediaServiceDTO { - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaUriType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaUriType.java deleted file mode 100644 index 682cbddbec10..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaUriType.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlValue; - -/** - * This type maps the URI. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "uri", namespace = Constants.ODATA_DATA_NS) -public class MediaUriType implements MediaServiceDTO { - @XmlValue - private String uri; - - /** - * @return the uri. - */ - public String getUri() { - return uri; - } - - /** - * @param uri - * uri the uri to set - */ - public void setUri(String uri) { - this.uri = uri; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/NotificationEndPointType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/NotificationEndPointType.java deleted file mode 100644 index 99a129354dbd..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/NotificationEndPointType.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * The type of notification end point. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "NotificationEndPointType", namespace = Constants.ODATA_DATA_NS) -public class NotificationEndPointType implements MediaServiceDTO { - - /** The id. */ - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - /** The name. */ - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - /** The created. */ - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - /** The end point type. */ - @XmlElement(name = "EndPointType", namespace = Constants.ODATA_DATA_NS) - private int endPointType; - - /** The end point address. */ - @XmlElement(name = "EndPointAddress", namespace = Constants.ODATA_DATA_NS) - private String endPointAddress; - - /** - * Gets the id. - * - * @return the id. - */ - public String getId() { - return id; - } - - /** - * Sets the id. - * - * @param id - * id the id to set - * @return the notification end point type - */ - public NotificationEndPointType setId(String id) { - this.id = id; - return this; - } - - /** - * Gets the name. - * - * @return the name. - */ - public String getName() { - return name; - } - - /** - * Sets the name. - * - * @param name - * name the name to set - * @return the notification end point type - */ - public NotificationEndPointType setName(String name) { - this.name = name; - return this; - } - - /** - * Gets the created. - * - * @return the created - */ - public Date getCreated() { - return this.created; - } - - /** - * Sets the created. - * - * @param created - * the created - * @return the notification end point type - */ - public NotificationEndPointType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * Gets the end point type. - * - * @return the end point type - */ - public int getEndPointType() { - return this.endPointType; - } - - /** - * Sets the end point type. - * - * @param endpointType - * the endpoint type - * @return the notification end point type - */ - public NotificationEndPointType setEndPointType(int endpointType) { - this.endPointType = endpointType; - return this; - } - - /** - * Gets the end point address. - * - * @return the end point address - */ - public String getEndPointAddress() { - return this.endPointAddress; - } - - /** - * Sets the end point address. - * - * @param endpointAddress - * the endpoint address - * @return the notification end point type - */ - public NotificationEndPointType setEndPointAddress(String endpointAddress) { - this.endPointAddress = endpointAddress; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ODataActionType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ODataActionType.java deleted file mode 100644 index f8f81e75da8e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ODataActionType.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; - -/** - * XML Serialization class for odata m:action elements - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class ODataActionType { - - @XmlAttribute(required = true) - private String metadata; - - @XmlAttribute(required = true) - private String target; - - @XmlAttribute(required = true) - private String title; - - /** - * Get metadata - * - * @return the metadata - */ - public String getMetadata() { - return metadata; - } - - /** - * Set metadata - * - * @param metadata - */ - public void setMetadata(String metadata) { - this.metadata = metadata; - } - - /** - * Get target - * - * @return the target - */ - public String getTarget() { - return target; - } - - /** - * set target - * - * @param target - */ - public void setTarget(String target) { - this.target = target; - } - - /** - * Get title - * - * @return the title - */ - public String getTitle() { - return title; - } - - /** - * set title - * - * @param title - */ - public void setTitle(String title) { - this.title = title; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ObjectFactory.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ObjectFactory.java deleted file mode 100644 index e085840222ff..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ObjectFactory.java +++ /dev/null @@ -1,236 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlRegistry; - -/** - * Class used by JAXB to instantiate the types in this package. - * - */ -@XmlRegistry -public class ObjectFactory { - - /** - * Create a new ObjectFactory that can be used to create new instances of - * schema derived classes for package: - * com.microsoft.windowsazure.services.media.implementation.atom - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link AssetType }. - * - * @return a new AssetType instance. - */ - public AssetType createAssetType() { - return new AssetType(); - } - - /** - * Create an instance of {@link ODataActionType }. - * - * @return a new ODataActionType instance. - */ - public ODataActionType createODataActionType() { - return new ODataActionType(); - } - - /** - * Create an instance of {@link AccessPolicyType }. - * - * @return a new AccessPolicyType instance. - */ - public AccessPolicyType createAccessPolicyType() { - return new AccessPolicyType(); - } - - /** - * Create an instance of {@link LocatorRestType }. - * - * @return a new LocatorRestType instance. - */ - public LocatorRestType createLocatorRestType() { - return new LocatorRestType(); - } - - /** - * Create an instance of {@link MediaProcessorType }. - * - * @return a new MediaProcessorType instance. - */ - public MediaProcessorType createMediaProcessorType() { - return new MediaProcessorType(); - } - - /** - * Create an instance of {@link JobType}. - * - * @return a new JobType instance. - */ - public JobType createJobType() { - return new JobType(); - } - - /** - * Create an instance of {@link TaskType}. - * - * @return a new TaskType instance. - */ - public TaskType createTaskType() { - return new TaskType(); - } - - /** - * Creates a new Object object. - * - * @return the content key rest type - */ - public ContentKeyRestType createContentKeyRestType() { - return new ContentKeyRestType(); - } - - /** - * Create an instance of {@link AssetFileType}. - * - * @return a new AssetFileType instance. - */ - public AssetFileType createAssetFileType() { - return new AssetFileType(); - } - - /** - * Creates an instance of (@link RebindContentKeyType). - * - * @return the rebind content key type instance. - */ - public RebindContentKeyType createRebindContentKeyType() { - return new RebindContentKeyType(); - } - - /** - * Creates an instance of (@link ChannelType). - * - * @return the channel type. - */ - public ChannelType createChannelType() { - return new ChannelType(); - } - - /** - * Creates an instance of (@link JobNotificationSubscriptionType). - * - * @return the job notification subscription type. - */ - public JobNotificationSubscriptionType createJobNotificationSubscriptionType() { - return new JobNotificationSubscriptionType(); - } - - /** - * Creates an instance of (@link NotificationEndPointType). - * - * @return the notification end point type. - */ - public NotificationEndPointType createNotificationEndPointType() { - return new NotificationEndPointType(); - } - - /** - * Creates an instance of (@link OperationType). - * - * @return the operation type - */ - public OperationType createOperationType() { - return new OperationType(); - } - - /** - * Creates a instance of (@link @ProgramType). - * - * @return the program type - */ - public ProgramType createProgramType() { - return new ProgramType(); - } - - /** - * Creates a instance of (@link ContentKeyAuthorizationPolicyOptionType). - * - * @return the content key authorization policy option type - */ - public ContentKeyAuthorizationPolicyOptionType createContentKeyAuthorizationPolicyOptionType() { - return new ContentKeyAuthorizationPolicyOptionType(); - } - - /** - * Creates a instance of (@link ContentKeyAuthorizationPolicyRestrictionType). - * - * @return the content key authorization policy restriction type - */ - public ContentKeyAuthorizationPolicyRestrictionType createContentKeyAuthorizationPolicyRestrictionType() { - return new ContentKeyAuthorizationPolicyRestrictionType(); - } - - /** - * Creates a instance of (@link ContentKeyAuthorizationPolicyType). - * - * @return the content key authorization policy type - */ - public ContentKeyAuthorizationPolicyType createContentKeyAuthorizationPolicyType() { - return new ContentKeyAuthorizationPolicyType(); - } - - /** - * Creates a instance of (@link AssetDeliveryPolicyType). - * - * @return the asset delivery policy type - */ - public AssetDeliveryPolicyRestType createAssetDeliveryPolicyType() { - return new AssetDeliveryPolicyRestType(); - } - - - /** - * Creates a instance of (@link StreamingEndpointType). - * - * @return the streaming endpoint type - */ - public StreamingEndpointType createStreamingEndpointType() { - return new StreamingEndpointType(); - } - - /** - * Creates a instance of (@link EncodingReservedUnitType). - * - * @return the encoding reserved unit type - */ - public EncodingReservedUnitRestType createEncodingReservedUnitType() { - return new EncodingReservedUnitRestType(); - } - - /** - * Creates a instance of (@link StorageAccountType). - * - * @return the storage account type - */ - public StorageAccountType createStorageAccountType() { - return new StorageAccountType(); - } - - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/OperationType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/OperationType.java deleted file mode 100644 index 3ace5b3903cb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/OperationType.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for operation - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class OperationType implements MediaServiceDTO { - - /** The id. */ - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - /** The target entity id. */ - @XmlElement(name = "TargetEntityId", namespace = Constants.ODATA_DATA_NS) - private String targetEntityId; - - /** The state. */ - @XmlElement(name = "State", namespace = Constants.ODATA_DATA_NS) - private String state; - - /** The error code. */ - @XmlElement(name = "ErrorCode", namespace = Constants.ODATA_DATA_NS) - private String errorCode; - - /** The error message. */ - @XmlElement(name = "ErrorMessage", namespace = Constants.ODATA_DATA_NS) - private String errorMessage; - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return id; - } - - /** - * Sets the id. - * - * @param id - * the id to set - * @return the operation type - */ - public OperationType setId(String id) { - this.id = id; - return this; - } - - /** - * Gets the target entity id. - * - * @return the target entity id - */ - public String getTargetEntityId() { - return targetEntityId; - } - - /** - * Sets the target entity id. - * - * @param targetEntityId - * the target entity id - * @return the operation type - */ - public OperationType setTargetEntityId(String targetEntityId) { - this.targetEntityId = targetEntityId; - return this; - } - - /** - * Gets the state. - * - * @return the state - */ - public String getState() { - return state; - } - - /** - * Sets the state. - * - * @param state - * the state to set - * @return the operation type - */ - public OperationType setState(String state) { - this.state = state; - return this; - } - - /** - * Gets the error code. - * - * @return the error code - */ - public String getErrorCode() { - return this.errorCode; - } - - /** - * Sets the error code. - * - * @param errorCode - * the error code - * @return the operation type - */ - public OperationType setErrorCode(String errorCode) { - this.errorCode = errorCode; - return this; - } - - /** - * Gets the error message. - * - * @return the error message - */ - public String getErrorMessage() { - return this.errorMessage; - } - - /** - * Sets the error message. - * - * @param errorMessage - * the error message - * @return the operation type - */ - public OperationType setErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProgramType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProgramType.java deleted file mode 100644 index 12bb3aa37b91..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProgramType.java +++ /dev/null @@ -1,296 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for Asset - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class ProgramType implements MediaServiceDTO { - - /** The id. */ - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - /** The name. */ - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - /** The description. */ - @XmlElement(name = "Description", namespace = Constants.ODATA_DATA_NS) - private String description; - - /** The created. */ - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - /** The last modified. */ - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - /** The channel id. */ - @XmlElement(name = "ChannelId", namespace = Constants.ODATA_DATA_NS) - private String channelId; - - /** The asset id. */ - @XmlElement(name = "AssetId", namespace = Constants.ODATA_DATA_NS) - private String assetId; - - /** The dvr window length seconds. */ - @XmlElement(name = "DvrWindowLengthSeconds", namespace = Constants.ODATA_DATA_NS) - private int dvrWindowLengthSeconds; - - /** The estimated duration seconds. */ - @XmlElement(name = "EstimatedDurationSeconds", namespace = Constants.ODATA_DATA_NS) - private int estimatedDurationSeconds; - - /** The enable archive. */ - @XmlElement(name = "EnableArchive", namespace = Constants.ODATA_DATA_NS) - private boolean enableArchive; - - /** The state. */ - @XmlElement(name = "State", namespace = Constants.ODATA_DATA_NS) - private String state; - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return this.id; - } - - /** - * Sets the id. - * - * @param id - * the id - * @return the channel type - */ - public ProgramType setId(String id) { - this.id = id; - return this; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Sets the name. - * - * @param name - * the name to set - * @return the channel type - */ - public ProgramType setName(String name) { - this.name = name; - return this; - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Sets the description. - * - * @param description - * the description - * @return the channel type - */ - public ProgramType setDescription(String description) { - this.description = description; - return this; - } - - /** - * Gets the created. - * - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * Sets the created. - * - * @param created - * the created - * @return the channel type - */ - public ProgramType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * Gets the last modified. - * - * @return the lastModified - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Sets the last modified. - * - * @param lastModified - * the last modified - * @return the channel type - */ - public ProgramType setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * Sets the state. - * - * @param state - * the state - * @return the channel type - */ - public ProgramType setState(String state) { - this.state = state; - return this; - } - - /** - * Gets the state. - * - * @return the state - */ - public String getState() { - return this.state; - } - - /** - * Gets the channel id. - * - * @return the channel id - */ - public String getChannelId() { - return this.channelId; - } - - /** - * Gets the asset id. - * - * @return the asset id - */ - public String getAssetId() { - return this.assetId; - } - - /** - * Gets the dvr window length seconds. - * - * @return the dvr window length seconds - */ - public int getDvrWindowLengthSeconds() { - return this.dvrWindowLengthSeconds; - } - - /** - * Gets the estimated duration seconds. - * - * @return the estimated duration seconds - */ - public int getEstimatedDurationSeconds() { - return this.estimatedDurationSeconds; - } - - /** - * Checks if is enable archive. - * - * @return true, if is enable archive - */ - public boolean isEnableArchive() { - return this.enableArchive; - } - - /** - * Sets the enable archive. - * - * @param enableArchive - * the new enable archive - */ - public void setEnableArchive(boolean enableArchive) { - this.enableArchive = enableArchive; - } - - /** - * Sets the asset id. - * - * @param assetId - * the new asset id - */ - public void setAssetId(String assetId) { - this.assetId = assetId; - } - - /** - * Sets the channel id. - * - * @param channelId - * the new channel id - */ - public void setChannelId(String channelId) { - this.channelId = channelId; - } - - /** - * Sets the estimated duration seconds. - * - * @param estimatedDurationSeconds - * the new estimated duration seconds - */ - public void setEstimatedDurationSeconds(int estimatedDurationSeconds) { - this.estimatedDurationSeconds = estimatedDurationSeconds; - } - - /** - * Sets the dvr window length seconds. - * - * @param dvrWindowLengthSeconds - * the new dvr window length seconds - */ - public void setDvrWindowLengthSeconds(int dvrWindowLengthSeconds) { - this.dvrWindowLengthSeconds = dvrWindowLengthSeconds; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProtectionKeyIdType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProtectionKeyIdType.java deleted file mode 100644 index c2cd0e429c9c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProtectionKeyIdType.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlValue; - -/** - * This type maps the XML returned in the odata ATOM serialization for Asset - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "GetProtectionKeyId", namespace = Constants.ODATA_DATA_NS) -public class ProtectionKeyIdType implements MediaServiceDTO { - @XmlValue - private String protectionKeyId; - - /** - * @return the protection key id - */ - public String getProtectionKeyId() { - return protectionKeyId; - } - - /** - * @param protection - * key id the protection key id to set - */ - public void setProtectionKeyId(String protectionKeyId) { - this.protectionKeyId = protectionKeyId; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProtectionKeyRestType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProtectionKeyRestType.java deleted file mode 100644 index 855fa9d74bf6..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProtectionKeyRestType.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlValue; - -/** - * This type maps the XML returned in protection key. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "GetProtectionKey", namespace = Constants.ODATA_DATA_NS) -public class ProtectionKeyRestType implements MediaServiceDTO { - @XmlValue - private String protectionKey; - - /** - * @return the protection key - */ - public String getProtectionKey() { - return protectionKey; - } - - /** - * @param protection - * key id the protection key id to set - */ - public void setProtectionKey(String protectionKey) { - this.protectionKey = protectionKey; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/RebindContentKeyType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/RebindContentKeyType.java deleted file mode 100644 index 8cdf5c52014d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/RebindContentKeyType.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlValue; - -/** - * The Class RebindContentKeyType. - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "RebindContentKey", namespace = Constants.ODATA_DATA_NS) -public class RebindContentKeyType implements MediaServiceDTO { - - /** The rebind content key. */ - @XmlValue - private String rebindContentKey; - - /** - * Gets the content key. - * - * @return the content key - */ - public String getContentKey() { - return rebindContentKey; - } - - /** - * Sets the content key. - * - * @param rebindContentKey - * the new content key - */ - public void setContentKey(String rebindContentKey) { - this.rebindContentKey = rebindContentKey; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StorageAccountType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StorageAccountType.java deleted file mode 100644 index 34e5426a538d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StorageAccountType.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for StorageAccountType - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class StorageAccountType implements MediaServiceDTO { - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "IsDefault", namespace = Constants.ODATA_DATA_NS) - private boolean isdefault; - - @XmlElement(name = "BytesUsed", namespace = Constants.ODATA_DATA_NS) - private long bytesUsed; - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name the name to set - */ - public void setName(String name) { - this.name = name; - } - - /** - * @return the isdefault - */ - public boolean isDefault() { - return isdefault; - } - - /** - * @param isdefault the isdefault to set - */ - public void setAsDefault(boolean isdefault) { - this.isdefault = isdefault; - } - - /** - * @return the bytesUsed - */ - public long getBytesUsed() { - return bytesUsed; - } - - /** - * @param bytesUsed the bytesUsed to set - */ - public void setBytesUsed(long bytesUsed) { - this.bytesUsed = bytesUsed; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointAccessControlType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointAccessControlType.java deleted file mode 100644 index c27cf3520169..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointAccessControlType.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -@XmlAccessorType(XmlAccessType.FIELD) -public class StreamingEndpointAccessControlType { - - @XmlElement(name = "Akamai", namespace = Constants.ODATA_DATA_NS) - private AkamaiAccessControlType akamai; - - @XmlElement(name = "IP", namespace = Constants.ODATA_DATA_NS) - private IPAccessControlType iP; - - public AkamaiAccessControlType getAkamai() { - return akamai; - } - - public void setAkamai(AkamaiAccessControlType akamai) { - this.akamai = akamai; - } - - public IPAccessControlType getIP() { - return iP; - } - - public void setIP(IPAccessControlType iP) { - this.iP = iP; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointCacheControlType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointCacheControlType.java deleted file mode 100644 index 3d20cb6c5394..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointCacheControlType.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -@XmlAccessorType(XmlAccessType.FIELD) -public class StreamingEndpointCacheControlType { - - @XmlElement(name = "MaxAge", namespace = Constants.ODATA_DATA_NS) - private Integer maxAge; - - public int getMaxAge() { - return maxAge == null ? 0 : maxAge.intValue(); - } - - public void setMaxAge(int maxRange) { - this.maxAge = maxRange; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointType.java deleted file mode 100644 index 4d8e2aa2687a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointType.java +++ /dev/null @@ -1,178 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; - - -/** - * This type maps the XML returned in the odata ATOM serialization for Asset - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class StreamingEndpointType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "Description", namespace = Constants.ODATA_DATA_NS) - private String description; - - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - @XmlElement(name = "State", namespace = Constants.ODATA_DATA_NS) - private String state; - - @XmlElement(name = "HostName", namespace = Constants.ODATA_DATA_NS) - private String hostName; - - @XmlElement(name = "ScaleUnits", namespace = Constants.ODATA_DATA_NS) - private Integer scaleUnits; - - @XmlElement(name = "CdnEnabled", namespace = Constants.ODATA_DATA_NS) - private boolean cdnEnabled; - - @XmlElementWrapper(name = "CustomHostNames", namespace = Constants.ODATA_DATA_NS) - @XmlElement(name = "CustomHostName", namespace = Constants.ODATA_DATA_NS) - private List customHostName; - - @XmlElement(name = "AccessControl", namespace = Constants.ODATA_DATA_NS) - private StreamingEndpointAccessControlType streamingEndpointAccessControl; - - @XmlElement(name = "CacheControl", namespace = Constants.ODATA_DATA_NS) - private StreamingEndpointCacheControlType streamingEndpointCacheControl; - - @XmlElement(name = "CrossSiteAccessPolicies", namespace = Constants.ODATA_DATA_NS) - private CrossSiteAccessPoliciesType crossSiteAccessPolicies; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Date getCreated() { - return created; - } - - public void setCreated(Date created) { - this.created = created; - } - - public Date getLastModified() { - return lastModified; - } - - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public String getHostName() { - return hostName; - } - - public void setHostName(String hostName) { - this.hostName = hostName; - } - - public int getScaleUnits() { - return scaleUnits; - } - - public void setScaleUnits(int scaleUnits) { - this.scaleUnits = scaleUnits; - } - - public List getCustomHostName() { - return customHostName; - } - - public void setCustomHostName(List customHostName) { - this.customHostName = customHostName; - } - - public boolean isCdnEnabled() { - return cdnEnabled; - } - - public void setCdnEnabled(boolean cdnEnabled) { - this.cdnEnabled = cdnEnabled; - } - - public StreamingEndpointAccessControlType getAccessControl() { - return streamingEndpointAccessControl; - } - - public void setAccessControl(StreamingEndpointAccessControlType streamingEndpointAccessControl) { - this.streamingEndpointAccessControl = streamingEndpointAccessControl; - } - - public StreamingEndpointCacheControlType getCacheControl() { - return streamingEndpointCacheControl; - } - - public void setCacheControl(StreamingEndpointCacheControlType streamingEndpointCacheControl) { - this.streamingEndpointCacheControl = streamingEndpointCacheControl; - } - - public CrossSiteAccessPoliciesType getCrossSiteAccessPolicies() { - return crossSiteAccessPolicies; - } - - public void setCrossSiteAccessPolicies(CrossSiteAccessPoliciesType crossSiteAccessPolicies) { - this.crossSiteAccessPolicies = crossSiteAccessPolicies; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/TaskHistoricalEventType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/TaskHistoricalEventType.java deleted file mode 100644 index 90aca8bdfe1e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/TaskHistoricalEventType.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for - * ErrorDetail entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class TaskHistoricalEventType implements MediaServiceDTO { - - /** The code. */ - @XmlElement(name = "Code", namespace = Constants.ODATA_DATA_NS) - private String code; - - /** The message. */ - @XmlElement(name = "Message", namespace = Constants.ODATA_DATA_NS) - private String message; - - /** The time stamp. */ - @XmlElement(name = "TimeStamp", namespace = Constants.ODATA_DATA_NS) - private Date timeStamp; - - /** - * Gets the code. - * - * @return the code - */ - public String getCode() { - return code; - } - - /** - * Sets the code. - * - * @param code - * the id to set - * @return the error detail type - */ - public TaskHistoricalEventType setCode(String code) { - this.code = code; - return this; - } - - /** - * Gets the message. - * - * @return the message - */ - public String getMessage() { - return message; - } - - /** - * Sets the message. - * - * @param message - * the message to set - * @return the error detail type - */ - public TaskHistoricalEventType setMessage(String message) { - this.message = message; - return this; - } - - /** - * Gets the time stamp. - * - * @return the time stamp - */ - public Date getTimeStamp() { - return timeStamp; - } - - /** - * Sets the time stamp. - * - * @param timeStamp - * the time stamp - * @return the task historical event type - */ - public TaskHistoricalEventType setTimeStamp(Date timeStamp) { - this.timeStamp = timeStamp; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/TaskType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/TaskType.java deleted file mode 100644 index 0f53679eb084..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/TaskType.java +++ /dev/null @@ -1,286 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; - -/** - * This type maps the XML returned in the odata ATOM serialization for Task - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class TaskType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Configuration", namespace = Constants.ODATA_DATA_NS) - private String configuration; - - @XmlElement(name = "EndTime", namespace = Constants.ODATA_DATA_NS) - private Date endTime; - - @XmlElementWrapper(name = "ErrorDetails", namespace = Constants.ODATA_DATA_NS) - @XmlElement(name = "element", namespace = Constants.ODATA_DATA_NS) - private List errorDetails; - - @XmlElementWrapper(name = "HistoricalEvents", namespace = Constants.ODATA_DATA_NS) - @XmlElement(name = "element", namespace = Constants.ODATA_DATA_NS) - private List historicalEventTypes; - - @XmlElement(name = "MediaProcessorId", namespace = Constants.ODATA_DATA_NS) - private String mediaProcessorId; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "PerfMessage", namespace = Constants.ODATA_DATA_NS) - private String perfMessage; - - @XmlElement(name = "Priority", namespace = Constants.ODATA_DATA_NS) - private Integer priority; - - @XmlElement(name = "Progress", namespace = Constants.ODATA_DATA_NS) - private Double progress; - - @XmlElement(name = "RunningDuration", namespace = Constants.ODATA_DATA_NS) - private Double runningDuration; - - @XmlElement(name = "StartTime", namespace = Constants.ODATA_DATA_NS) - private Date startTime; - - @XmlElement(name = "State", namespace = Constants.ODATA_DATA_NS) - private Integer state; - - @XmlElement(name = "TaskBody", namespace = Constants.ODATA_DATA_NS) - private String taskBody; - - @XmlElement(name = "Options", namespace = Constants.ODATA_DATA_NS) - private Integer options; - - @XmlElement(name = "EncryptionKeyId", namespace = Constants.ODATA_DATA_NS) - private String encryptionKeyId; - - @XmlElement(name = "EncryptionScheme", namespace = Constants.ODATA_DATA_NS) - private String encryptionScheme; - - @XmlElement(name = "EncryptionVersion", namespace = Constants.ODATA_DATA_NS) - private String encryptionVersion; - - @XmlElement(name = "InitializationVector", namespace = Constants.ODATA_DATA_NS) - private String initializationVector; - - private List outputMediaAssets; - - private List inputMediaAssets; - - public String getId() { - return id; - } - - public TaskType setId(String id) { - this.id = id; - return this; - } - - public String getConfiguration() { - return configuration; - } - - public TaskType setConfiguration(String configuration) { - this.configuration = configuration; - return this; - } - - public Date getEndTime() { - return endTime; - } - - public TaskType setEndTime(Date endTime) { - this.endTime = endTime; - return this; - } - - public List getErrorDetails() { - return errorDetails; - } - - public TaskType setErrorDetails(List errorDetails) { - this.errorDetails = errorDetails; - return this; - } - - public String getMediaProcessorId() { - return mediaProcessorId; - } - - public TaskType setMediaProcessorId(String mediaProcessorId) { - this.mediaProcessorId = mediaProcessorId; - return this; - } - - public String getName() { - return name; - } - - public TaskType setName(String name) { - this.name = name; - return this; - } - - public String getPerfMessage() { - return perfMessage; - } - - public TaskType setPerfMessage(String perfMessage) { - this.perfMessage = perfMessage; - return this; - } - - public Integer getPriority() { - return priority; - } - - public TaskType setPriority(Integer priority) { - this.priority = priority; - return this; - } - - public Double getProgress() { - return progress; - } - - public TaskType setProgress(Double progress) { - this.progress = progress; - return this; - } - - public Double getRunningDuration() { - return runningDuration; - } - - public TaskType setRunningDuration(Double runningDuration) { - this.runningDuration = runningDuration; - return this; - } - - public Date getStartTime() { - return startTime; - } - - public TaskType setStartTime(Date startTime) { - this.startTime = startTime; - return this; - } - - public Integer getState() { - return state; - } - - public TaskType setState(Integer state) { - this.state = state; - return this; - } - - public String getTaskBody() { - return taskBody; - } - - public TaskType setTaskBody(String taskBody) { - this.taskBody = taskBody; - return this; - } - - public Integer getOptions() { - return options; - } - - public TaskType setOptions(Integer options) { - this.options = options; - return this; - } - - public String getEncryptionKeyId() { - return encryptionKeyId; - } - - public TaskType setEncryptionKeyId(String encryptionKeyId) { - this.encryptionKeyId = encryptionKeyId; - return this; - } - - public String getEncryptionScheme() { - return encryptionScheme; - } - - public TaskType setEncryptionScheme(String encryptionScheme) { - this.encryptionScheme = encryptionScheme; - return this; - } - - public String getEncryptionVersion() { - return encryptionVersion; - } - - public TaskType setEncryptionVersion(String encryptionVersion) { - this.encryptionVersion = encryptionVersion; - return this; - } - - public String getInitializationVector() { - return initializationVector; - } - - public TaskType setInitializationVector(String initializationVector) { - this.initializationVector = initializationVector; - return this; - } - - public List getOutputMediaAssets() { - return outputMediaAssets; - } - - public TaskType setOutputMediaAssets(List outputMediaAssets) { - this.outputMediaAssets = outputMediaAssets; - return this; - } - - public List getInputMediaAssets() { - return inputMediaAssets; - } - - public TaskType setInputMediaAssets(List inputMediaAssets) { - this.inputMediaAssets = inputMediaAssets; - return this; - } - - public List getHistoricalEventTypes() { - return historicalEventTypes; - } - - public TaskType setHistoricalEventTypes( - List historicalEventTypes) { - this.historicalEventTypes = historicalEventTypes; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/package-info.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/package-info.java deleted file mode 100644 index 1c9ecda9766d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/package-info.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@XmlJavaTypeAdapter(value = ODataDateAdapter.class, type = java.util.Date.class) -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.services.media.implementation.ODataDateAdapter; - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/package.html deleted file mode 100644 index e7819f147963..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the media service OData operation class, interface, and utility classes. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/fairplay/FairPlayConfiguration.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/fairplay/FairPlayConfiguration.java deleted file mode 100644 index 9e2ef2c54b9f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/fairplay/FairPlayConfiguration.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.fairplay; - -import java.io.ByteArrayOutputStream; -import java.security.KeyStore; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.microsoft.windowsazure.core.utils.Base64; - -@JsonInclude(JsonInclude.Include.NON_NULL) -public class FairPlayConfiguration { - - private String askId; - - private String fairPlayPfxPasswordId; - - private String fairPlayPfx; - - private String contentEncryptionIV; - - public static String createSerializedFairPlayOptionConfiguration( - KeyStore keyStore, String pfxPassword, String pfxPasswordKeyId, String askId, - String contentIv) { - try { - ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - keyStore.store(outputStream, pfxPassword.toCharArray()); - String certString = Base64.encode(outputStream.toByteArray()); - FairPlayConfiguration config = new FairPlayConfiguration(); - config.askId = askId; - config.contentEncryptionIV = contentIv; - config.fairPlayPfx = certString; - config.fairPlayPfxPasswordId = pfxPasswordKeyId; - ObjectMapper mapper = new ObjectMapper(); - String configuration = mapper.writeValueAsString(config); - - return configuration; - } catch (Throwable t) { - throw new RuntimeException(t); - } - } - - static final char[] HEXARRAY = "0123456789ABCDEF".toCharArray(); - public static String bytesToHex(byte[] bytes) { - char[] hexChars = new char[bytes.length * 2]; - for (int j = 0; j < bytes.length; j++) { - int v = bytes[j] & 0xFF; - hexChars[j * 2] = HEXARRAY[v >>> 4]; - hexChars[j * 2 + 1] = HEXARRAY[v & 0x0F]; - } - return new String(hexChars); - } - - @JsonProperty("ASkId") - public String getASkId() { - return askId; - } - - @JsonProperty("FairPlayPfxPasswordId") - public String getFairPlayPfxPasswordId() { - return fairPlayPfxPasswordId; - } - - @JsonProperty("FairPlayPfx") - public String getFairPlayPfx() { - return fairPlayPfx; - } - - @JsonProperty("ContentEncryptionIV") - public String getContentEncryptionIV() { - return contentEncryptionIV; - }; -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/fairplay/package-info.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/fairplay/package-info.java deleted file mode 100644 index 345253ed44c1..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/fairplay/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.fairplay; diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/AgcAndColorStripeRestriction.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/AgcAndColorStripeRestriction.java deleted file mode 100644 index 995bd36f64bc..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/AgcAndColorStripeRestriction.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AgcAndColorStripeRestriction") -public class AgcAndColorStripeRestriction { - - @XmlElement(name = "ConfigurationData") - private byte configurationData; - - @SuppressWarnings("unused") - private AgcAndColorStripeRestriction() { - } - - public AgcAndColorStripeRestriction(byte configurationData) { - ScmsRestriction.verifyTwoBitConfigurationData(configurationData); - this.configurationData = configurationData; - } - - /** - * @return the configurationData - */ - public byte getConfigurationData() { - return configurationData; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ContentEncryptionKeyFromHeader.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ContentEncryptionKeyFromHeader.java deleted file mode 100644 index 6ea2b47df76e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ContentEncryptionKeyFromHeader.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ContentEncryptionKeyFromHeader") -public class ContentEncryptionKeyFromHeader extends PlayReadyContentKey { - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ContentEncryptionKeyFromKeyIdentifier.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ContentEncryptionKeyFromKeyIdentifier.java deleted file mode 100644 index b26e3460684f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ContentEncryptionKeyFromKeyIdentifier.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import java.security.InvalidParameterException; -import java.util.UUID; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ContentEncryptionKeyFromKeyIdentifier") -public class ContentEncryptionKeyFromKeyIdentifier extends PlayReadyContentKey { - - @XmlElement(name = "KeyIdentifier") - private UUID keyIdentifier; - - public ContentEncryptionKeyFromKeyIdentifier() { - - } - - public ContentEncryptionKeyFromKeyIdentifier(UUID keyIdentifier) { - if (keyIdentifier.equals(new UUID(0L, 0L))) { - throw new InvalidParameterException("keyIdentifier"); - } - - this.keyIdentifier = keyIdentifier; - } - - /** - * @return the keyIdentifier - */ - public UUID getKeyIdentifier() { - return keyIdentifier; - } - - /** - * @param keyIdentifier - * the keyIdentifier to set - */ - public void setKeyIdentifier(UUID keyIdentifier) { - this.keyIdentifier = keyIdentifier; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ErrorMessages.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ErrorMessages.java deleted file mode 100644 index e10337f21242..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ErrorMessages.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -public final class ErrorMessages { - - public static final String UNCOMPRESSED_DIGITAL_AUDIO_OPL_VALUE_ERROR - = "The value can only be set to null, 100, 150, 200, 250, or 300."; - public static final String UNCOMPRESSED_DIGITAL_VIDEO_OPL_VALUE_ERROR - = "The value can only be set to null, 100, 250, 270, or 300."; - public static final String BEGIN_DATE_AND_RELATIVE_BEGIN_DATE_CANNOTBE_SET_SIMULTANEOUSLY_ERROR - = "Set BeginDate or RelativeBeginDate but not both"; - public static final String EXPIRATION_DATE_AND_RELATIVE_EXPIRATION_DATE_CANNOTBE_SET_SIMULTANEOUSLY_ERROR - = "Set ExpirationDate or RelativeExpirationDate but not both"; - public static final String PLAY_READY_PLAY_RIGHT_REQUIRED - = "Each PlayReadyLicenseTemplate in the PlayReadyLicenseResponseTemplate must have a PlayReadyPlayRight"; - public static final String PLAY_READY_CONTENT_KEY_REQUIRED - = "Each PlayReadyLicenseTemplate in the PlayReadyLicenseResponseTemplate must have either a ContentEncryptionKeyFromHeader or a ContentEncryptionKeyFromKeyIdentifier"; - public static final String INVALID_TWO_BIT_CONFIGURATION_DATA - = "ConfigurationData must be 0, 1, 2, or 3"; - public static final String GRACE_PERIOD_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE - = "GracePeriod cannot be set on Non Persistent licenses."; - public static final String FIRST_PLAY_EXPIRATION_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE - = "FirstPlayExpiration cannot be set on the PlayRight of a Non Persistent license."; - public static final String EXPIRATION_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE - = "ExpirationDate cannot be set on Non Persistent licenses."; - public static final String DIGITAL_VIDEO_ONLY_MUTUALLY_EXCLUSIVE_WITH_PASSING_TO_UNKNOWN_OUTPUT_ERROR - = "PlayReady does not allow passing to unknown outputs if the DigitalVideoOnlyContentRestriction is enabled."; - public static final String COMPRESSED_DIGITAL_VIDEO_OPL_VALUE_ERROR - = "The value can only be set to null, 400, or 500."; - public static final String COMPRESSED_DIGITAL_AUDIO_OPL_VALUE_ERROR - = "The value can only be set to null, 100, 150, 200, 250, or 300."; - public static final String BEGIN_DATE_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE - = "BeginDate cannot be set on Non Persistent licenses."; - public static final String AT_LEAST_ONE_LICENSE_TEMPLATE_REQUIRED - = "A PlayReadyLicenseResponseTemplate must have at least one PlayReadyLicenseTemplate"; - public static final String ANALOG_VIDEO_OPL_VALUE_ERROR - = "The value can only be set to null, 100, 150, or 200."; - - private ErrorMessages() { - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ExplicitAnalogTelevisionRestriction.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ExplicitAnalogTelevisionRestriction.java deleted file mode 100644 index e49cddaee34b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ExplicitAnalogTelevisionRestriction.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ExplicitAnalogTelevisionRestriction") -public class ExplicitAnalogTelevisionRestriction { - - @XmlElement(name = "BestEffort") - private boolean bestEffort; - - @XmlElement(name = "ConfigurationData") - private byte configurationData; - - @SuppressWarnings("unused") - private ExplicitAnalogTelevisionRestriction() { - } - - public ExplicitAnalogTelevisionRestriction(boolean bestEffort, byte configurationData) { - ScmsRestriction.verifyTwoBitConfigurationData(configurationData); - this.bestEffort = bestEffort; - this.configurationData = configurationData; - } - - /** - * @return the bestEffort - */ - public boolean isBestEffort() { - return bestEffort; - } - - /** - * @param bestEffort - * the bestEffort to set - * @return this - */ - public ExplicitAnalogTelevisionRestriction setBestEffort(boolean bestEffort) { - this.bestEffort = bestEffort; - return this; - } - - /** - * @return the configurationData - */ - public byte getConfigurationData() { - return configurationData; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/MediaServicesLicenseTemplateSerializer.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/MediaServicesLicenseTemplateSerializer.java deleted file mode 100644 index 9f092460c752..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/MediaServicesLicenseTemplateSerializer.java +++ /dev/null @@ -1,177 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import java.io.File; -import java.io.StringReader; -import java.io.StringWriter; - -import javax.xml.XMLConstants; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; -import javax.xml.validation.Schema; -import javax.xml.validation.SchemaFactory; - -import org.xml.sax.SAXException; - -import com.sun.xml.bind.marshaller.NamespacePrefixMapper; - -public final class MediaServicesLicenseTemplateSerializer { - - private MediaServicesLicenseTemplateSerializer() { - - } - - public static String serialize(PlayReadyLicenseResponseTemplate template) throws JAXBException { - - validateLicenseResponseTemplate(template); - - StringWriter writer = new StringWriter(); - JAXBContext context = JAXBContext.newInstance(PlayReadyLicenseResponseTemplate.class); - Marshaller m = context.createMarshaller(); - m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); - m.setProperty("com.sun.xml.bind.namespacePrefixMapper", new NamespacePrefixMapper() { - @Override - public String[] getPreDeclaredNamespaceUris() { - return new String[] { - XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI - }; - } - - @Override - public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) { - if (namespaceUri.equals(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI)) { - return "i"; - } - return suggestion; - } - }); - m.marshal(template, writer); - return writer.toString(); - } - - public static PlayReadyLicenseResponseTemplate deserialize(String xml) throws JAXBException { - try { - return deserialize(xml, null); - } catch (SAXException e) { - // never reached. - return null; - } - } - - public static PlayReadyLicenseResponseTemplate deserialize(String xml, String validationSchemaFileName) - throws JAXBException, SAXException { - JAXBContext context = JAXBContext.newInstance(PlayReadyLicenseResponseTemplate.class); - Unmarshaller u = context.createUnmarshaller(); - if (validationSchemaFileName != null) { - SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); - Schema schema = factory.newSchema(new File(validationSchemaFileName)); - u.setSchema(schema); - } - PlayReadyLicenseResponseTemplate template = (PlayReadyLicenseResponseTemplate) u - .unmarshal(new StringReader(xml)); - - validateLicenseResponseTemplate(template); - - return template; - } - - private static void validateLicenseResponseTemplate(PlayReadyLicenseResponseTemplate templateToValidate) { - // Validate the PlayReadyLicenseResponseTemplate has at least one - // license - if (templateToValidate.getLicenseTemplates().size() <= 0) { - throw new IllegalArgumentException(ErrorMessages.AT_LEAST_ONE_LICENSE_TEMPLATE_REQUIRED); - } - - for (PlayReadyLicenseTemplate template : templateToValidate.getLicenseTemplates()) { - // This is actually enforced in the DataContract with the IsRequired - // attribute - // so this check should never fail. - if (template.getContentKey() == null) { - throw new IllegalArgumentException(ErrorMessages.PLAY_READY_CONTENT_KEY_REQUIRED); - } - - // A PlayReady license must have at least one Right in it. Today we - // only - // support the PlayRight so it is required. In the future we might - // support - // other types of rights (CopyRight, perhaps an extensible Right, - // whatever) - // so we enforce this in code and not in the DataContract itself. - if (template.getPlayRight() == null) { - throw new IllegalArgumentException(ErrorMessages.PLAY_READY_PLAY_RIGHT_REQUIRED); - } - - // - // Per the PlayReady Compliance rules (section 3.8 - Output Control - // for Unknown Outputs), passing content to - // unknown output is prohibited if the - // DigitalVideoOnlyContentRestriction is enabled. - // - if (template.getPlayRight().isDigitalVideoOnlyContentRestriction()) { - if ((template.getPlayRight() - .getAllowPassingVideoContentToUnknownOutput() == UnknownOutputPassingOption.Allowed) - || (template.getPlayRight() - .getAllowPassingVideoContentToUnknownOutput() == UnknownOutputPassingOption.AllowedWithVideoConstriction)) { - throw new IllegalArgumentException( - ErrorMessages.DIGITAL_VIDEO_ONLY_MUTUALLY_EXCLUSIVE_WITH_PASSING_TO_UNKNOWN_OUTPUT_ERROR); - } - } - - if (template.getLicenseType() == PlayReadyLicenseType.Nonpersistent) { - // - // The PlayReady Rights Manager SDK will return an error if you - // try to specify a license - // that is non-persistent and has a first play expiration set. - // The event log message related - // to the error will say "LicenseGenerationFailure: - // FirstPlayExpiration can not be set on Non - // Persistent license PlayRight." - // - if (template.getPlayRight().getFirstPlayExpiration() != null) { - throw new IllegalArgumentException( - ErrorMessages.FIRST_PLAY_EXPIRATION_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE); - } - - // - // The PlayReady Rights Manager SDK will return an error if you - // try to specify a license - // that is non-persistent and has a GracePeriod set. - // - if (template.getGracePeriod() != null) { - throw new IllegalArgumentException( - ErrorMessages.GRACE_PERIOD_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE); - } - - // - // The PlayReady Rights Manager SDK will return an error if you - // try to specify a license - // that is non-persistent and has a GracePeriod set. The event - // log message related - // to the error will say "LicenseGenerationFailure: BeginDate or - // ExpirationDate should not be set - // on Non Persistent licenses" - // - if (template.getBeginDate() != null) { - throw new IllegalArgumentException( - ErrorMessages.BEGIN_DATE_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE); - } - - // - // The PlayReady Rights Manager SDK will return an error if you - // try to specify a license - // that is non-persistent and has a GracePeriod set. The event - // log message related - // to the error will say "LicenseGenerationFailure: BeginDate or - // ExpirationDate should not be set - // on Non Persistent licenses" - // - if (template.getExpirationDate() != null) { - throw new IllegalArgumentException( - ErrorMessages.EXPIRATION_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE); - } - } - } - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyContentKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyContentKey.java deleted file mode 100644 index c24c4fa8b549..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyContentKey.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlTransient; - -@XmlTransient -@XmlSeeAlso({ ContentEncryptionKeyFromHeader.class, ContentEncryptionKeyFromKeyIdentifier.class }) -public abstract class PlayReadyContentKey { - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseResponseTemplate.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseResponseTemplate.java deleted file mode 100644 index aa4bf93c3838..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseResponseTemplate.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.Element; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; - -@XmlRootElement(name = "PlayReadyLicenseResponseTemplate") -@XmlAccessorType(XmlAccessType.FIELD) -public class PlayReadyLicenseResponseTemplate { - - @XmlElementWrapper(name = "LicenseTemplates") - @XmlElement(name = "PlayReadyLicenseTemplate") - private List licenseTemplates; - - @XmlElement(name = "ResponseCustomData") - private String responseCustomData; - - // mimics IExtensibleDataObject - @XmlAnyElement - private List extensionData; - - public PlayReadyLicenseResponseTemplate() { - internalConstruct(); - } - - private void internalConstruct() { - setLicenseTemplates(new ArrayList()); - setExtensionData(new ArrayList()); - } - - /** - * @return the licenseTemplates - */ - public List getLicenseTemplates() { - return licenseTemplates; - } - - /** - * @param licenseTemplates the licenseTemplates to set - */ - private void setLicenseTemplates(List licenseTemplates) { - this.licenseTemplates = licenseTemplates; - } - - /** - * @return the responseCustomData - */ - public String getResponseCustomData() { - return responseCustomData; - } - - /** - * @param responseCustomData the responseCustomData to set - */ - public void setResponseCustomData(String responseCustomData) { - this.responseCustomData = responseCustomData; - } - - /** - * @return the extensionData - */ - public List getExtensionData() { - return extensionData; - } - - /** - * @param extensionData the extensionData to set - */ - public void setExtensionData(List extensionData) { - this.extensionData = extensionData; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseTemplate.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseTemplate.java deleted file mode 100644 index 01c8aa29c753..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseTemplate.java +++ /dev/null @@ -1,214 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import java.util.Date; -import java.util.List; - -import javax.xml.bind.Element; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.datatype.Duration; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "PlayReadyLicenseTemplate") -public class PlayReadyLicenseTemplate { - - @XmlElement(name = "AllowTestDevices") - private boolean allowTestDevices; - - @XmlElement(name = "BeginDate") - private Date beginDate; - - @XmlElement(name = "ContentKey") - private PlayReadyContentKey contentKey; - - @XmlElement(name = "ExpirationDate") - private Date expirationDate; - - @XmlElement(name = "GracePeriod") - private Duration gracePeriod; - - @XmlElement(name = "LicenseType") - private PlayReadyLicenseType licenseType; - - @XmlElement(name = "PlayRight") - private PlayReadyPlayRight playRight; - - @XmlElement(name = "RelativeBeginDate") - private Duration relativeBeginDate; - - @XmlElement(name = "RelativeExpirationDate") - private Duration relativeExpirationDate; - - // mimics IExtensibleDataObject - @XmlAnyElement - private List extensionData; - - - /** - * @return the allowTestDevices - */ - public boolean isAllowTestDevices() { - return allowTestDevices; - } - - /** - * @param allowTestDevices the allowTestDevices to set - */ - public void setAllowTestDevices(boolean allowTestDevices) { - this.allowTestDevices = allowTestDevices; - } - - /** - * @return the beginDate - */ - public Date getBeginDate() { - return beginDate; - } - - /** - * @param beginDate the beginDate to set - */ - public void setBeginDate(Date beginDate) { - // - // License template should not have both BeginDate and RelativeBeginDate set. - // Only one of these two values should be set. - if (relativeBeginDate != null) { - throw new IllegalArgumentException(ErrorMessages.BEGIN_DATE_AND_RELATIVE_BEGIN_DATE_CANNOTBE_SET_SIMULTANEOUSLY_ERROR); - } - this.beginDate = beginDate; - } - - /** - * @return the expirationDate - */ - public Date getExpirationDate() { - return expirationDate; - } - - /** - * @param expirationDate the expirationDate to set - */ - public void setExpirationDate(Date expirationDate) { - // - // License template should not have both ExpirationDate and RelativeExpirationDate set. - // Only one of these two values should be set. - if (relativeExpirationDate != null) { - throw new IllegalArgumentException("Set ExpirationDate or RelativeExpirationDate but not both"); - } - this.expirationDate = expirationDate; - } - - /** - * @return the relativeBeginDate - */ - public Duration getRelativeBeginDate() { - return relativeBeginDate; - } - - /** - * @param relativeBeginDate the relativeBeginDate to set - */ - public void setRelativeBeginDate(Duration relativeBeginDate) { - // - // License template should not have both BeginDate and RelativeBeginDate set. - // Only one of these two values should be set. - if (beginDate != null) { - throw new IllegalArgumentException("Set BeginDate or RelativeBeginDate but not both"); - } - this.relativeBeginDate = relativeBeginDate; - } - - /** - * @return the relativeExpirationDate - */ - public Duration getRelativeExpirationDate() { - return relativeExpirationDate; - } - - /** - * @param relativeExpirationDate the relativeExpirationDate to set - */ - public void setRelativeExpirationDate(Duration relativeExpirationDate) { - // - // License template should not have both ExpirationDate and RelativeExpirationDate set. - // Only one of these two values should be set. - if (expirationDate != null) { - throw new IllegalArgumentException("Set ExpirationDate or RelativeExpirationDate but not both"); - } - this.relativeExpirationDate = relativeExpirationDate; - } - - /** - * @return the gracePeriod - */ - public Duration getGracePeriod() { - return gracePeriod; - } - - /** - * @param gracePeriod the gracePeriod to set - */ - public void setGracePeriod(Duration gracePeriod) { - this.gracePeriod = gracePeriod; - } - - /** - * @return the playRight - */ - public PlayReadyPlayRight getPlayRight() { - return playRight; - } - - /** - * @param playRight the playRight to set - */ - public void setPlayRight(PlayReadyPlayRight playRight) { - this.playRight = playRight; - } - - /** - * @return the licenseType - */ - public PlayReadyLicenseType getLicenseType() { - return licenseType; - } - - /** - * @param licenseType the licenseType to set - */ - public void setLicenseType(PlayReadyLicenseType licenseType) { - this.licenseType = licenseType; - } - - /** - * @return the contentKey - */ - public PlayReadyContentKey getContentKey() { - return contentKey; - } - - /** - * @param contentKey the contentKey to set - */ - public void setContentKey(PlayReadyContentKey contentKey) { - this.contentKey = contentKey; - } - - /** - * @return the extensionData - */ - public List getExtensionData() { - return extensionData; - } - - /** - * @param extensionData the extensionData to set - */ - public void setExtensionData(List extensionData) { - this.extensionData = extensionData; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseType.java deleted file mode 100644 index 176c02c03e0f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseType.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import java.security.InvalidParameterException; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -@XmlType -@XmlEnum -public enum PlayReadyLicenseType { - - @XmlEnumValue("Nonpersistent") Nonpersistent(0), - @XmlEnumValue("Persistent") Persistent(1); - - private int playReadyLicenseType; - - private PlayReadyLicenseType(int playReadyLicenseType) { - this.playReadyLicenseType = playReadyLicenseType; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return playReadyLicenseType; - } - - /** - * From code. - * - * @param code - * the code - * @return the content key type - */ - public static PlayReadyLicenseType fromCode(int code) { - switch (code) { - case 0: - return PlayReadyLicenseType.Nonpersistent; - case 1: - return PlayReadyLicenseType.Persistent; - default: - throw new InvalidParameterException("code"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyPlayRight.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyPlayRight.java deleted file mode 100644 index 49cee38578d0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyPlayRight.java +++ /dev/null @@ -1,277 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import java.util.List; - -import javax.xml.bind.Element; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.datatype.Duration; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "PlayRight") -public class PlayReadyPlayRight { - - @XmlElement(name = "AgcAndColorStripeRestriction") - private AgcAndColorStripeRestriction agcAndColorStripeRestriction; - - @XmlElement(name = "AllowPassingVideoContentToUnknownOutput") - private UnknownOutputPassingOption allowPassingVideoContentToUnknownOutput; - - @XmlElement(name = "AnalogVideoOpl") - private Integer analogVideoOpl; - - @XmlElement(name = "CompressedDigitalAudioOpl") - private Integer compressedDigitalAudioOpl; - - @XmlElement(name = "CompressedDigitalVideoOpl") - private Integer compressedDigitalVideoOpl; - - @XmlElement(name = "DigitalVideoOnlyContentRestriction") - private boolean digitalVideoOnlyContentRestriction; - - @XmlElement(name = "ExplicitAnalogTelevisionOutputRestriction") - private ExplicitAnalogTelevisionRestriction explicitAnalogTelevisionOutputRestriction; - - @XmlElement(name = "FirstPlayExpiration") - private Duration firstPlayExpiration; - - @XmlElement(name = "ImageConstraintForAnalogComponentVideoRestriction") - private boolean imageConstraintForAnalogComponentVideoRestriction; - - @XmlElement(name = "ImageConstraintForAnalogComputerMonitorRestriction") - private boolean imageConstraintForAnalogComputerMonitorRestriction; - - @XmlElement(name = "ScmsRestriction") - private ScmsRestriction scmsRestriction; - - @XmlElement(name = "UncompressedDigitalAudioOpl") - private Integer uncompressedDigitalAudioOpl; - - @XmlElement(name = "UncompressedDigitalVideoOpl") - private Integer uncompressedDigitalVideoOpl; - - // mimics IExtensibleDataObject - @XmlAnyElement - private List extensionData; - - /** - * @return the firstPlayExpiration - */ - public Duration getFirstPlayExpiration() { - return firstPlayExpiration; - } - - /** - * @param firstPlayExpiration the firstPlayExpiration to set - */ - public void setFirstPlayExpiration(Duration firstPlayExpiration) { - this.firstPlayExpiration = firstPlayExpiration; - } - - /** - * @return the scmsRestriction - */ - public ScmsRestriction getScmsRestriction() { - return scmsRestriction; - } - - /** - * @param scmsRestriction the scmsRestriction to set - */ - public void setScmsRestriction(ScmsRestriction scmsRestriction) { - this.scmsRestriction = scmsRestriction; - } - - /** - * @return the agcAndColorStripeRestriction - */ - public AgcAndColorStripeRestriction getAgcAndColorStripeRestriction() { - return agcAndColorStripeRestriction; - } - - /** - * @param agcAndColorStripeRestriction the agcAndColorStripeRestriction to set - */ - public void setAgcAndColorStripeRestriction(AgcAndColorStripeRestriction agcAndColorStripeRestriction) { - this.agcAndColorStripeRestriction = agcAndColorStripeRestriction; - } - - /** - * @return the explicitAnalogTelevisionOutputRestriction - */ - public ExplicitAnalogTelevisionRestriction getExplicitAnalogTelevisionOutputRestriction() { - return explicitAnalogTelevisionOutputRestriction; - } - - /** - * @param explicitAnalogTelevisionOutputRestriction the explicitAnalogTelevisionOutputRestriction to set - */ - public void setExplicitAnalogTelevisionOutputRestriction(ExplicitAnalogTelevisionRestriction explicitAnalogTelevisionOutputRestriction) { - this.explicitAnalogTelevisionOutputRestriction = explicitAnalogTelevisionOutputRestriction; - } - - /** - * @return the digitalVideoOnlyContentRestriction - */ - public boolean isDigitalVideoOnlyContentRestriction() { - return digitalVideoOnlyContentRestriction; - } - - /** - * @param digitalVideoOnlyContentRestriction the digitalVideoOnlyContentRestriction to set - */ - public void setDigitalVideoOnlyContentRestriction(boolean digitalVideoOnlyContentRestriction) { - this.digitalVideoOnlyContentRestriction = digitalVideoOnlyContentRestriction; - } - - /** - * @return the imageConstraintForAnalogComponentVideoRestriction - */ - public boolean isImageConstraintForAnalogComponentVideoRestriction() { - return imageConstraintForAnalogComponentVideoRestriction; - } - - /** - * @param imageConstraintForAnalogComponentVideoRestriction the imageConstraintForAnalogComponentVideoRestriction to set - */ - public void setImageConstraintForAnalogComponentVideoRestriction( - boolean imageConstraintForAnalogComponentVideoRestriction) { - this.imageConstraintForAnalogComponentVideoRestriction = imageConstraintForAnalogComponentVideoRestriction; - } - - /** - * @return the allowPassingVideoContentToUnknownOutput - */ - public UnknownOutputPassingOption getAllowPassingVideoContentToUnknownOutput() { - return allowPassingVideoContentToUnknownOutput; - } - - /** - * @param allowPassingVideoContentToUnknownOutput the allowPassingVideoContentToUnknownOutput to set - */ - public void setAllowPassingVideoContentToUnknownOutput(UnknownOutputPassingOption allowPassingVideoContentToUnknownOutput) { - this.allowPassingVideoContentToUnknownOutput = allowPassingVideoContentToUnknownOutput; - } - - /** - * @return the uncompressedDigitalVideoOpl - */ - public Integer getUncompressedDigitalVideoOpl() { - return uncompressedDigitalVideoOpl; - } - - /** - * @param uncompressedDigitalVideoOpl the uncompressedDigitalVideoOpl to set - */ - public void setUncompressedDigitalVideoOpl(Integer uncompressedDigitalVideoOpl) { - int value = uncompressedDigitalVideoOpl != null ? uncompressedDigitalVideoOpl.intValue() : -1; - if ((uncompressedDigitalVideoOpl != null) && (value != 100) && (value != 250) && (value != 270) && (value != 300)) { - throw new IllegalArgumentException(ErrorMessages.UNCOMPRESSED_DIGITAL_VIDEO_OPL_VALUE_ERROR); - } - this.uncompressedDigitalVideoOpl = uncompressedDigitalVideoOpl; - } - - /** - * @return the compressedDigitalVideoOpl - */ - public Integer getCompressedDigitalVideoOpl() { - return compressedDigitalVideoOpl; - } - - /** - * @param compressedDigitalVideoOpl the compressedDigitalVideoOpl to set - */ - public void setCompressedDigitalVideoOpl(Integer compressedDigitalVideoOpl) { - int value = compressedDigitalVideoOpl != null ? compressedDigitalVideoOpl.intValue() : -1; - if ((compressedDigitalVideoOpl != null) && (value != 400) && (value != 500)) { - throw new IllegalArgumentException(ErrorMessages.COMPRESSED_DIGITAL_VIDEO_OPL_VALUE_ERROR); - } - this.compressedDigitalVideoOpl = compressedDigitalVideoOpl; - } - - /** - * @return the analogVideoOpl - */ - public Integer getAnalogVideoOpl() { - return analogVideoOpl; - } - - /** - * @param analogVideoOpl the analogVideoOpl to set - */ - public void setAnalogVideoOpl(Integer analogVideoOpl) { - int value = analogVideoOpl != null ? analogVideoOpl.intValue() : -1; - if ((analogVideoOpl != null) && (value != 100) && (value != 150) && (value != 200)) { - throw new IllegalArgumentException(ErrorMessages.ANALOG_VIDEO_OPL_VALUE_ERROR); - } - this.analogVideoOpl = analogVideoOpl; - } - - /** - * @return the compressedDigitalAudioOpl - */ - public Integer getCompressedDigitalAudioOpl() { - return compressedDigitalAudioOpl; - } - - /** - * @param compressedDigitalAudioOpl the compressedDigitalAudioOpl to set - */ - public void setCompressedDigitalAudioOpl(Integer compressedDigitalAudioOpl) { - int value = compressedDigitalAudioOpl != null ? compressedDigitalAudioOpl.intValue() : -1; - if ((compressedDigitalAudioOpl != null) && (value != 100) && (value != 150) && (value != 200) && (value != 250) && (value != 300)) { - throw new IllegalArgumentException(ErrorMessages.COMPRESSED_DIGITAL_AUDIO_OPL_VALUE_ERROR); - } - this.compressedDigitalAudioOpl = compressedDigitalAudioOpl; - } - - /** - * @return the uncompressedDigitalAudioOpl - */ - public Integer getUncompressedDigitalAudioOpl() { - return uncompressedDigitalAudioOpl; - } - - /** - * @param uncompressedDigitalAudioOpl the uncompressedDigitalAudioOpl to set - */ - public void setUncompressedDigitalAudioOpl(Integer uncompressedDigitalAudioOpl) { - int value = uncompressedDigitalAudioOpl != null ? uncompressedDigitalAudioOpl.intValue() : -1; - if ((uncompressedDigitalAudioOpl != null) && (value != 100) && (value != 150) && (value != 200) && (value != 250) && (value != 300)) { - throw new IllegalArgumentException(ErrorMessages.UNCOMPRESSED_DIGITAL_AUDIO_OPL_VALUE_ERROR); - } - this.uncompressedDigitalAudioOpl = uncompressedDigitalAudioOpl; - } - - /** - * @return the imageConstraintForAnalogComputerMonitorRestriction - */ - public boolean isImageConstraintForAnalogComputerMonitorRestriction() { - return imageConstraintForAnalogComputerMonitorRestriction; - } - - /** - * @param imageConstraintForAnalogComputerMonitorRestriction the imageConstraintForAnalogComputerMonitorRestriction to set - */ - public void setImageConstraintForAnalogComputerMonitorRestriction( - boolean imageConstraintForAnalogComputerMonitorRestriction) { - this.imageConstraintForAnalogComputerMonitorRestriction = imageConstraintForAnalogComputerMonitorRestriction; - } - - /** - * @return the extensionData - */ - public List getExtensionData() { - return extensionData; - } - - /** - * @param extensionData the extensionData to set - */ - public void setExtensionData(List extensionData) { - this.extensionData = extensionData; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ScmsRestriction.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ScmsRestriction.java deleted file mode 100644 index cec697844afd..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ScmsRestriction.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ScmsRestriction") -public class ScmsRestriction { - - @XmlElement(name = "ConfigurationData") - private byte configurationData; - - @SuppressWarnings("unused") - private ScmsRestriction() { - } - - public ScmsRestriction(byte configurationData) { - verifyTwoBitConfigurationData(configurationData); - this.configurationData = configurationData; - } - - /** - * @return the configurationData - */ - public byte getConfigurationData() { - return configurationData; - } - - public static void verifyTwoBitConfigurationData(byte configurationData) { - if ((configurationData & 0x3) != configurationData) { - throw new IllegalArgumentException(ErrorMessages.INVALID_TWO_BIT_CONFIGURATION_DATA); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/UnknownOutputPassingOption.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/UnknownOutputPassingOption.java deleted file mode 100644 index 16e4f32d9ea0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/UnknownOutputPassingOption.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import java.security.InvalidParameterException; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -@XmlType -@XmlEnum -public enum UnknownOutputPassingOption { - - @XmlEnumValue("NotAllowed") NotAllowed(0), - @XmlEnumValue("Allowed") Allowed(1), - @XmlEnumValue("AllowedWithVideoConstriction") AllowedWithVideoConstriction(2); - - private int unknownOutputPassingOption; - - private UnknownOutputPassingOption(int unknownOutputPassingOption) { - this.unknownOutputPassingOption = unknownOutputPassingOption; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return unknownOutputPassingOption; - } - - /** - * From code. - * - * @param code - * the code - * @return the content key type - */ - public static UnknownOutputPassingOption fromCode(int code) { - switch (code) { - case 0: - return UnknownOutputPassingOption.NotAllowed; - case 1: - return UnknownOutputPassingOption.Allowed; - case 2: - return UnknownOutputPassingOption.AllowedWithVideoConstriction; - default: - throw new InvalidParameterException("code"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/package-info.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/package-info.java deleted file mode 100644 index 5a7638be202f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@XmlSchema( - namespace = "http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1", - elementFormDefault = XmlNsForm.QUALIFIED) -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import javax.xml.bind.annotation.XmlNsForm; -import javax.xml.bind.annotation.XmlSchema; \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/AsymmetricTokenVerificationKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/AsymmetricTokenVerificationKey.java deleted file mode 100644 index 9b77eb309ec6..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/AsymmetricTokenVerificationKey.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * Class AsymmetricTokenVerificationKey represents asymmetric keys which are used in token verification scenarios. - */ -@XmlAccessorType(XmlAccessType.PUBLIC_MEMBER) -public abstract class AsymmetricTokenVerificationKey extends TokenVerificationKey { - - /** - * the raw body of a key. - */ - private byte[] rawBody; - - /** - * Gets the raw body of a key. - * @return the rawBody - */ - @XmlElement(name = "RawBody", required = true, nillable = true) - public byte[] getRawBody() { - return rawBody; - } - - /** - * Sets the raw body of a key. - * @param rawBody the rawBody to set - */ - public void setRawBody(byte[] rawBody) { - this.rawBody = rawBody; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/ErrorMessages.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/ErrorMessages.java deleted file mode 100644 index 2aa265178a82..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/ErrorMessages.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -public final class ErrorMessages { - - public static final String PRIMARY_VERIFICATIONKEY_AND_OPENIDCONNECTDISCOVERYDOCUMENT_ARE_NULL - = "Both PrimaryVerificationKey and OpenIdConnectDiscoveryDocument are null."; - - public static final String OPENIDDISCOVERYURI_STRING_IS_NULL_OR_EMPTY - = "OpenIdConnectDiscoveryDocument.OpenIdDiscoveryUri string value is null or empty."; - - public static final String OPENIDDISCOVERYURI_STRING_IS_NOT_ABSOLUTE_URI - = "String representation of OpenIdConnectDiscoveryDocument.OpenIdDiscoveryUri is not valid absolute Uri."; - - private ErrorMessages() { - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/OpenIdConnectDiscoveryDocument.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/OpenIdConnectDiscoveryDocument.java deleted file mode 100644 index e285949cf938..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/OpenIdConnectDiscoveryDocument.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "OpenIdConnectDiscoveryDocument") -public class OpenIdConnectDiscoveryDocument { - - @XmlElement(name = "OpenIdDiscoveryUri") - private String openIdDiscoveryUri; - - /** - * @return the openIdDiscoveryUri - */ - public String getOpenIdDiscoveryUri() { - return openIdDiscoveryUri; - } - - /** - * @param openIdDiscoveryUri the openIdDiscoveryUri to set - */ - public void setOpenIdDiscoveryUri(String openIdDiscoveryUri) { - this.openIdDiscoveryUri = openIdDiscoveryUri; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/SymmetricVerificationKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/SymmetricVerificationKey.java deleted file mode 100644 index 414955366465..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/SymmetricVerificationKey.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -import com.microsoft.windowsazure.services.media.EncryptionUtils; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SymmetricVerificationKey") -public class SymmetricVerificationKey extends TokenVerificationKey { - - @XmlElement(name = "KeyValue") - private byte[] keyValue; - - /** - * Constructs a SymmetricVerificationKey using a randomly generated key value. - * The key value generated is 64 bytes long. - */ - public SymmetricVerificationKey() { - keyValue = new byte[64]; - EncryptionUtils.eraseKey(keyValue); - } - - /** - * Constructs a SymmetricVerificationKey using the provided key value. - * @param keyValue the provided key value - */ - public SymmetricVerificationKey(byte[] keyValue) { - this.keyValue = keyValue; - } - - /** - * @return the keyValue - */ - public byte[] getKeyValue() { - return keyValue; - } - - /** - * @param keyValue the keyValue to set - */ - public void setKeyValue(byte[] keyValue) { - this.keyValue = keyValue; - } - - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenClaim.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenClaim.java deleted file mode 100644 index 86cd62ff4018..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenClaim.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "TokenClaim") -public class TokenClaim { - - private static final String CONTENT_KEY_ID_CLAIM_TYPE = "urn:microsoft:azure:mediaservices:contentkeyidentifier"; - - private static final TokenClaim CONTENT_KEY_ID_CLAIM = new TokenClaim(CONTENT_KEY_ID_CLAIM_TYPE, null); - - @XmlElement(name = "ClaimType", required = true) - private String claimType; - - @XmlElement(name = "ClaimValue", required = true, nillable = true) - private String claimValue; - - public TokenClaim() { - - } - - public TokenClaim(String claimType, String claimValue) { - if (claimType == null) { - throw new NullPointerException("claimType"); - } - setClaimType(claimType); - setClaimValue(claimValue); - } - - /** - * @return the claimType - */ - public String getClaimType() { - return claimType; - } - - /** - * @param claimType the claimType to set - * @return this - */ - public TokenClaim setClaimType(String claimType) { - this.claimType = claimType; - return this; - } - - /** - * @return the claimValue - */ - public String getClaimValue() { - return claimValue; - } - - /** - * @param claimValue the claimValue to set - * @return this - */ - public TokenClaim setClaimValue(String claimValue) { - this.claimValue = claimValue; - return this; - } - - /** - * @return the contentKeyIdentifierClaimType - */ - public static String getContentKeyIdentifierClaimType() { - return CONTENT_KEY_ID_CLAIM_TYPE; - } - - /** - * @return the contentkeyidentifierclaim - */ - public static TokenClaim getContentKeyIdentifierClaim() { - return CONTENT_KEY_ID_CLAIM; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplate.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplate.java deleted file mode 100644 index 1979757a9ea9..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplate.java +++ /dev/null @@ -1,176 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import java.net.URI; -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; - -@XmlRootElement(name = "TokenRestrictionTemplate") -@XmlAccessorType(XmlAccessType.FIELD) -public class TokenRestrictionTemplate { - - @XmlElementWrapper(name = "AlternateVerificationKeys") - @XmlElement(name = "TokenVerificationKey") - private List alternateVerificationKeys; - - @XmlElement(name = "Audience", required = true) - private URI audience; - - @XmlElement(name = "Issuer", required = true) - private URI issuer; - - @XmlElement(name = "PrimaryVerificationKey", nillable = true) - private TokenVerificationKey primaryVerificationKey; - - @XmlElementWrapper(name = "RequiredClaims") - @XmlElement(name = "TokenClaim") - private List requiredClaims; - - @XmlElement(name = "TokenType") - private TokenType tokenType; - - @XmlElement(name = "OpenIdConnectDiscoveryDocument") - private OpenIdConnectDiscoveryDocument openIdConnectDiscoveryDocument; - - @SuppressWarnings("unused") - private TokenRestrictionTemplate() { - this.setTokenType(TokenType.SWT); - initCollections(); - } - - public TokenRestrictionTemplate(TokenType tokenType) { - this.setTokenType(tokenType); - initCollections(); - } - - private void initCollections() { - setRequiredClaims(new ArrayList()); - setAlternateVerificationKeys(new ArrayList()); - } - - /** - * @return the audience - */ - public URI getAudience() { - return audience; - } - - /** - * @param audience - * the audience to set - * @return this - */ - public TokenRestrictionTemplate setAudience(URI audience) { - this.audience = audience; - return this; - } - - /** - * @return the issuer - */ - public URI getIssuer() { - return issuer; - } - - /** - * @param issuer - * the issuer to set - * @return this - */ - public TokenRestrictionTemplate setIssuer(URI issuer) { - this.issuer = issuer; - return this; - } - - /** - * @return the tokenType - */ - public TokenType getTokenType() { - return tokenType; - } - - /** - * @param tokenType - * the tokenType to set - * @return this - */ - public TokenRestrictionTemplate setTokenType(TokenType tokenType) { - this.tokenType = tokenType; - return this; - } - - /** - * @return the primaryVerificationKey - */ - public TokenVerificationKey getPrimaryVerificationKey() { - return primaryVerificationKey; - } - - /** - * @param primaryVerificationKey - * the primaryVerificationKey to set - * @return this - */ - public TokenRestrictionTemplate setPrimaryVerificationKey(TokenVerificationKey primaryVerificationKey) { - this.primaryVerificationKey = primaryVerificationKey; - return this; - } - - /** - * @return the requiredClaims - */ - public List getRequiredClaims() { - return requiredClaims; - } - - /** - * @param requiredClaims - * the requiredClaims to set - * @return this - */ - public TokenRestrictionTemplate setRequiredClaims(List requiredClaims) { - this.requiredClaims = requiredClaims; - return this; - } - - /** - * @return the alternateVerificationKeys - */ - public List getAlternateVerificationKeys() { - return alternateVerificationKeys; - } - - /** - * @param alternateVerificationKeys - * the alternateVerificationKeys to set - * @return this - */ - public TokenRestrictionTemplate setAlternateVerificationKeys(List alternateVerificationKeys) { - this.alternateVerificationKeys = alternateVerificationKeys; - return this; - } - - /** - * @return the alternateVerificationKeys - */ - public OpenIdConnectDiscoveryDocument getOpenIdConnectDiscoveryDocument() { - return openIdConnectDiscoveryDocument; - } - - /** - * @param alternateVerificationKeys - * the alternateVerificationKeys to set - * @return this - */ - public TokenRestrictionTemplate setOpenIdConnectDiscoveryDocument( - OpenIdConnectDiscoveryDocument openIdConnectDiscoveryDocument) { - this.openIdConnectDiscoveryDocument = openIdConnectDiscoveryDocument; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplateSerializer.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplateSerializer.java deleted file mode 100644 index 3d4923ede2ec..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplateSerializer.java +++ /dev/null @@ -1,239 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import java.io.File; -import java.io.StringReader; -import java.io.StringWriter; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLEncoder; -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; -import java.util.Calendar; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -import javax.crypto.Mac; -import javax.crypto.spec.SecretKeySpec; -import javax.xml.XMLConstants; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; -import javax.xml.validation.Schema; -import javax.xml.validation.SchemaFactory; - -import org.xml.sax.SAXException; - -import com.microsoft.windowsazure.core.utils.Base64; -import com.sun.xml.bind.marshaller.NamespacePrefixMapper; - -import io.jsonwebtoken.Jwts; -import io.jsonwebtoken.SignatureAlgorithm; - -public final class TokenRestrictionTemplateSerializer { - - private TokenRestrictionTemplateSerializer() { - - } - - public static String serialize(TokenRestrictionTemplate template) throws JAXBException { - - validateTokenRestrictionTemplate(template); - - StringWriter writer = new StringWriter(); - JAXBContext context = JAXBContext.newInstance(TokenRestrictionTemplate.class); - Marshaller m = context.createMarshaller(); - m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); - m.setProperty("com.sun.xml.bind.namespacePrefixMapper", new NamespacePrefixMapper() { - @Override - public String[] getPreDeclaredNamespaceUris() { - return new String[] { - XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI - }; - } - - @Override - public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) { - if (namespaceUri.equals(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI)) { - return "i"; - } - return suggestion; - } - }); - m.marshal(template, writer); - return writer.toString(); - } - - private static void validateTokenRestrictionTemplate(TokenRestrictionTemplate template) { - if (template.getPrimaryVerificationKey() == null && template.getOpenIdConnectDiscoveryDocument() == null) { - throw new IllegalArgumentException( - ErrorMessages.PRIMARY_VERIFICATIONKEY_AND_OPENIDCONNECTDISCOVERYDOCUMENT_ARE_NULL); - } - - if (template.getOpenIdConnectDiscoveryDocument() != null) { - if (template.getOpenIdConnectDiscoveryDocument().getOpenIdDiscoveryUri() == null - || template.getOpenIdConnectDiscoveryDocument().getOpenIdDiscoveryUri().isEmpty()) { - throw new IllegalArgumentException(ErrorMessages.OPENIDDISCOVERYURI_STRING_IS_NULL_OR_EMPTY); - } - - boolean openIdDiscoveryUrlValid = true; - try { - new URL(template.getOpenIdConnectDiscoveryDocument().getOpenIdDiscoveryUri()); - } catch (MalformedURLException e) { - openIdDiscoveryUrlValid = false; - } - - if (!openIdDiscoveryUrlValid) { - throw new IllegalArgumentException(ErrorMessages.OPENIDDISCOVERYURI_STRING_IS_NOT_ABSOLUTE_URI); - } - } - } - - public static TokenRestrictionTemplate deserialize(String xml) throws JAXBException { - try { - return deserialize(xml, null); - } catch (SAXException e) { - // never reached. - return null; - } - } - - public static TokenRestrictionTemplate deserialize(String xml, String validationSchemaFileName) - throws JAXBException, SAXException { - JAXBContext context = JAXBContext.newInstance(TokenRestrictionTemplate.class); - Unmarshaller u = context.createUnmarshaller(); - if (validationSchemaFileName != null) { - SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); - Schema schema = factory.newSchema(new File(validationSchemaFileName)); - u.setSchema(schema); - } - TokenRestrictionTemplate template = (TokenRestrictionTemplate) u.unmarshal(new StringReader(xml)); - validateTokenRestrictionTemplate(template); - return template; - } - - private static String generateTokenExpiry(Date expiry) { - return Long.toString(expiry.getTime() / 1000L); - } - - @SuppressWarnings("deprecation") - private static String urlEncode(String toEncode) { - StringBuilder encoded = new StringBuilder(URLEncoder.encode(toEncode)); - // This code provides uppercase url encoding in order to - // get generateTestToken test working. - for (int i = 0; i < encoded.length() - 2; i++) { - if (encoded.charAt(i) == '%') { - encoded.setCharAt(i + 1, Character.toLowerCase(encoded.charAt(i + 1))); - encoded.setCharAt(i + 2, Character.toLowerCase(encoded.charAt(i + 2))); - } - } - return encoded.toString(); - } - - public static String generateTestToken(TokenRestrictionTemplate tokenTemplate, TokenVerificationKey signingKeyToUse, - UUID keyIdForContentKeyIdentifierClaim, Date tokenExpiration, Date notBefore) { - - if (tokenTemplate == null) { - throw new NullPointerException("tokenTemplate"); - } - - if (signingKeyToUse == null) { - signingKeyToUse = tokenTemplate.getPrimaryVerificationKey(); - } - - if (tokenExpiration == null) { - Calendar cal = Calendar.getInstance(); - cal.setTime(new Date()); - cal.add(Calendar.MINUTE, 10); - tokenExpiration = cal.getTime(); - } - - if (notBefore == null) { - Calendar cal = Calendar.getInstance(); - cal.setTime(new Date()); - cal.add(Calendar.MINUTE, -5); - notBefore = cal.getTime(); - } - - if (tokenTemplate.getTokenType().equals(TokenType.SWT)) { - return generateTestTokenSWT(tokenTemplate, signingKeyToUse, keyIdForContentKeyIdentifierClaim, - tokenExpiration); - } else { - return generateTestTokenJWT(tokenTemplate, signingKeyToUse, keyIdForContentKeyIdentifierClaim, - tokenExpiration, notBefore); - } - } - - public static String generateTestTokenJWT(TokenRestrictionTemplate tokenTemplate, - TokenVerificationKey signingKeyToUse, UUID keyIdForContentKeyIdentifierClaim, Date tokenExpiration, - Date notBefore) { - - SymmetricVerificationKey signingKey = (SymmetricVerificationKey) signingKeyToUse; - SecretKeySpec secretKey = new SecretKeySpec(signingKey.getKeyValue(), "HmacSHA256"); - - // Mapping Claims. - Map claims = new HashMap(); - for (TokenClaim claim : tokenTemplate.getRequiredClaims()) { - String claimValue = claim.getClaimValue(); - if (claimValue == null && claim.getClaimType().equals(TokenClaim.getContentKeyIdentifierClaimType())) { - if (keyIdForContentKeyIdentifierClaim == null) { - throw new IllegalArgumentException(String.format( - "The 'keyIdForContentKeyIdentifierClaim' parameter cannot be null when the token template contains a required '%s' claim type.", - TokenClaim.getContentKeyIdentifierClaimType())); - } - claimValue = keyIdForContentKeyIdentifierClaim.toString(); - } - claims.put(claim.getClaimType(), claimValue); - } - - return Jwts.builder().setHeaderParam("typ", "JWT").setClaims(claims) - .setIssuer(tokenTemplate.getIssuer().toString()).setAudience(tokenTemplate.getAudience().toString()) - .setIssuedAt(notBefore).setExpiration(tokenExpiration).signWith(SignatureAlgorithm.HS256, secretKey) - .compact(); - } - - public static String generateTestTokenSWT(TokenRestrictionTemplate tokenTemplate, - TokenVerificationKey signingKeyToUse, UUID keyIdForContentKeyIdentifierClaim, Date tokenExpiration) { - - StringBuilder builder = new StringBuilder(); - - for (TokenClaim claim : tokenTemplate.getRequiredClaims()) { - String claimValue = claim.getClaimValue(); - if (claim.getClaimType().equals(TokenClaim.getContentKeyIdentifierClaimType())) { - if (keyIdForContentKeyIdentifierClaim == null) { - throw new IllegalArgumentException(String.format( - "The 'keyIdForContentKeyIdentifierClaim' parameter cannot be null when the token template contains a required '%s' claim type.", - TokenClaim.getContentKeyIdentifierClaimType())); - } - claimValue = keyIdForContentKeyIdentifierClaim.toString(); - } - builder.append(String.format("%s=%s&", urlEncode(claim.getClaimType()), urlEncode(claimValue))); - } - - builder.append(String.format("Audience=%s&", urlEncode(tokenTemplate.getAudience().toString()))); - builder.append(String.format("ExpiresOn=%s&", generateTokenExpiry(tokenExpiration))); - builder.append(String.format("Issuer=%s", urlEncode(tokenTemplate.getIssuer().toString()))); - - SymmetricVerificationKey signingKey = (SymmetricVerificationKey) signingKeyToUse; - SecretKeySpec secretKey = new SecretKeySpec(signingKey.getKeyValue(), "HmacSHA256"); - Mac mac; - try { - mac = Mac.getInstance("HmacSHA256"); - mac.init(secretKey); - } catch (NoSuchAlgorithmException e) { - throw new RuntimeException(e); - } catch (InvalidKeyException e) { - throw new RuntimeException(e); - } - byte[] unsignedTokenAsBytes = builder.toString().getBytes(); - byte[] signatureBytes = mac.doFinal(unsignedTokenAsBytes); - String encoded = new String(Base64.encode(signatureBytes)); - - builder.append(String.format("&HMACSHA256=%s", urlEncode(encoded))); - - return builder.toString(); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenType.java deleted file mode 100644 index e8e86d75e0ae..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenType.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import java.security.InvalidParameterException; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -@XmlType -@XmlEnum -public enum TokenType { - - @XmlEnumValue("Undefined") Undefined(0), - @XmlEnumValue("SWT") SWT(1), - @XmlEnumValue("JWT") JWT(2); - - private int tokenType; - - private TokenType(int tokenType) { - this.tokenType = tokenType; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return tokenType; - } - - /** - * From code. - * - * @param code - * the code - * @return the content key type - */ - public static TokenType fromCode(int code) { - switch (code) { - case 0: - return TokenType.Undefined; - case 1: - return TokenType.SWT; - case 2: - return TokenType.JWT; - default: - throw new InvalidParameterException("code"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenVerificationKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenVerificationKey.java deleted file mode 100644 index 96b0e36c724c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenVerificationKey.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlTransient; - -@XmlTransient -@XmlSeeAlso({ SymmetricVerificationKey.class, X509CertTokenVerificationKey.class }) -public abstract class TokenVerificationKey { - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/X509CertTokenVerificationKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/X509CertTokenVerificationKey.java deleted file mode 100644 index 1d43d1991bb7..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/X509CertTokenVerificationKey.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import java.io.ByteArrayInputStream; -import java.security.cert.CertificateEncodingException; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlTransient; -import javax.xml.bind.annotation.XmlType; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "X509CertTokenVerificationKey") -public class X509CertTokenVerificationKey extends AsymmetricTokenVerificationKey { - - @XmlTransient - private X509Certificate x509Certificate; - - public X509CertTokenVerificationKey() { - } - - public X509CertTokenVerificationKey(X509Certificate x509Certificate) throws CertificateEncodingException { - this.setX509Certificate(x509Certificate); - super.setRawBody(x509Certificate.getEncoded()); - } - - /** - * @return the x509Certificate - */ - public X509Certificate getX509Certificate() { - return x509Certificate; - } - - /** - * @param x509Certificate the x509Certificate to set - */ - public void setX509Certificate(X509Certificate x509Certificate) { - this.x509Certificate = x509Certificate; - } - - @Override - public void setRawBody(byte[] rawBody) { - super.setRawBody(rawBody); - ByteArrayInputStream input = new ByteArrayInputStream(rawBody); - try { - this.x509Certificate = (X509Certificate) - CertificateFactory.getInstance("X.509").generateCertificate(input); - } catch (CertificateException e) { - super.setRawBody(null); - } - - } - - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/package-info.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/package-info.java deleted file mode 100644 index f19c1edb5dfc..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@XmlSchema( - namespace = "http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1", - elementFormDefault = XmlNsForm.QUALIFIED) -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import javax.xml.bind.annotation.XmlNsForm; -import javax.xml.bind.annotation.XmlSchema; \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/AllowedTrackTypes.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/AllowedTrackTypes.java deleted file mode 100644 index 8e3325cbd8ec..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/AllowedTrackTypes.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.widevine; - -public enum AllowedTrackTypes { - SD_ONLY, SD_HD -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/ContentKeySpecs.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/ContentKeySpecs.java deleted file mode 100644 index 30d03f7a95eb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/ContentKeySpecs.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.widevine; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ContentKeySpecs { - /** - * A track type name. - */ - @JsonProperty("track_type") - private String trackType; - - /** - * Unique identifier for the key. - */ - @JsonProperty("key_id") - private String keyId; - - /** - * Defines client robustness requirements for playback. 1 - Software-based - * whitebox crypto is required. 2 - Software crypto and an obfuscated - * decoder is required. 3 - The key material and crypto operations must be - * performed within a hardware backed trusted execution environment. 4 - The - * crypto and decoding of content must be performed within a hardware backed - * trusted execution environment. 5 - The crypto, decoding and all handling - * of the media (compressed and uncompressed) must be handled within a - * hardware backed trusted execution environment. - */ - @JsonProperty("security_level") - private Integer securityLevel; - - /** - * Indicates whether HDCP V1 or V2 is required or not. - */ - @JsonProperty("required_output_protection") - private RequiredOutputProtection requiredOutputProtection; - - @JsonProperty("track_type") - public String getTrackType() { - return trackType; - } - - @JsonProperty("track_type") - public void setTrackType(String trackType) { - this.trackType = trackType; - } - - @JsonProperty("key_id") - public String getKeyId() { - return keyId; - } - - @JsonProperty("key_id") - public void setKeyId(String keyId) { - this.keyId = keyId; - } - - @JsonProperty("security_level") - public Integer getSecurityLevel() { - return securityLevel; - } - - @JsonProperty("security_level") - public void setSecurityLevel(Integer securityLevel) { - this.securityLevel = securityLevel; - } - - @JsonProperty("required_output_protection") - public RequiredOutputProtection getRequiredOutputProtection() { - return requiredOutputProtection; - } - - @JsonProperty("required_output_protection") - public void setRequiredOutputProtection(RequiredOutputProtection requiredOutputProtection) { - this.requiredOutputProtection = requiredOutputProtection; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/Hdcp.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/Hdcp.java deleted file mode 100644 index f27b7c490a40..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/Hdcp.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.widevine; - -public enum Hdcp { - HDCP_NONE, HDCP_V1, HDCP_V2 -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/RequiredOutputProtection.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/RequiredOutputProtection.java deleted file mode 100644 index 99b9d474385f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/RequiredOutputProtection.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.widevine; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class RequiredOutputProtection { - /** - * Indicates whether HDCP is required. - */ - @JsonProperty("hdcp") - private Hdcp hdcp; - - @JsonProperty("hdcp") - public Hdcp getHdcp() { - return hdcp; - } - - @JsonProperty("hdcp") - public void setHdcp(Hdcp hdcp) { - this.hdcp = hdcp; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/WidevineMessage.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/WidevineMessage.java deleted file mode 100644 index d2d383451091..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/WidevineMessage.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.widevine; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -@JsonInclude(JsonInclude.Include.NON_NULL) -public class WidevineMessage { - /** - * Controls which content keys should be included in a license. Only one of - * allowed_track_types and content_key_specs can be specified. - */ - @JsonProperty("allowed_track_types") - private AllowedTrackTypes allowedTrackTypes; - - /** - * A finer grained control on what content keys to return. Only one of - * allowed_track_types and content_key_specs can be specified. - */ - @JsonProperty("content_key_specs") - private ContentKeySpecs[] contentKeySpecs; - - /** - * Policy settings for this license. In the event this asset has a - * pre-defined policy, these specified values will be used. - */ - @JsonProperty("policy_overrides") - private Object policyOverrides; - - @JsonProperty("allowed_track_types") - public AllowedTrackTypes getAllowedTrackTypes() { - return allowedTrackTypes; - } - - @JsonProperty("allowed_track_types") - public void setAllowedTrackTypes(AllowedTrackTypes allowedTrackTypes) { - this.allowedTrackTypes = allowedTrackTypes; - } - - @JsonProperty("content_key_specs") - public ContentKeySpecs[] getContentKeySpecs() { - return contentKeySpecs; - } - - @JsonProperty("content_key_specs") - public void setContentKeySpecs(ContentKeySpecs[] contentKeySpecs) { - this.contentKeySpecs = contentKeySpecs; - } - - @JsonProperty("policy_overrides") - public Object getPolicyOverrides() { - return policyOverrides; - } - - @JsonProperty("policy_overrides") - public void setPolicyOverrides(Object policyOverrides) { - this.policyOverrides = policyOverrides; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/package-info.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/package-info.java deleted file mode 100644 index 7f36a4577668..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/package-info.java +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.templates.widevine; \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicy.java deleted file mode 100644 index d0988b833755..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicy.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.EnumSet; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.implementation.content.AccessPolicyType; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate Access Policy entities. - * - */ -public final class AccessPolicy { - - private static final String ENTITY_SET = "AccessPolicies"; - - private AccessPolicy() { - } - - /** - * Creates an operation to create a new access policy - * - * @param name - * name of the access policy - * @param durationInMinutes - * how long the access policy will be in force - * @param permissions - * permissions allowed by this access policy - * @return The operation - */ - public static EntityCreateOperation create(String name, - double durationInMinutes, - EnumSet permissions) { - return new Creator(name, durationInMinutes, permissions); - } - - private static class Creator extends - EntityOperationSingleResultBase implements - EntityCreateOperation { - private final String policyName; - private final double durationInMinutes; - private final EnumSet permissions; - - public Creator(String policyName, double durationInMinutes, - EnumSet permissions) { - - super(ENTITY_SET, AccessPolicyInfo.class); - - this.policyName = policyName; - this.durationInMinutes = durationInMinutes; - this.permissions = permissions; - } - - @Override - public Object getRequestContents() { - return new AccessPolicyType() - .setName(policyName) - .setDurationInMinutes(durationInMinutes) - .setPermissions( - AccessPolicyPermission - .bitsFromPermissions(permissions)); - } - - } - - /** - * Create an operation that will retrieve the given access policy - * - * @param accessPolicyId - * id of access policy to retrieve - * @return the operation - */ - public static EntityGetOperation get(String accessPolicyId) { - return new DefaultGetOperation(ENTITY_SET, - accessPolicyId, AccessPolicyInfo.class); - } - - /** - * Create an operation that will retrieve the access policy at the given - * link - * - * @param link - * the link - * @return the operation - */ - public static EntityGetOperation get( - LinkInfo link) { - return new DefaultGetOperation(link.getHref(), - AccessPolicyInfo.class); - } - - /** - * Create an operation that will retrieve all access policies - * - * @return the operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation to delete the given access policy - * - * @param accessPolicyId - * id of access policy to delete - * @return the delete operation - */ - public static EntityDeleteOperation delete(String accessPolicyId) { - return new DefaultDeleteOperation(ENTITY_SET, accessPolicyId); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicyInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicyInfo.java deleted file mode 100644 index a51c533b6245..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicyInfo.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; -import java.util.EnumSet; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.AccessPolicyType; - -/** - * Type containing data about access policies. - * - */ -public class AccessPolicyInfo extends ODataEntity { - - /** - * Creates a new {@link AccessPolicyInfo} wrapping the given ATOM entry and - * content objects. - * - * @param entry - * Entry containing this AccessPolicy data - * @param content - * Content with the AccessPolicy data - */ - public AccessPolicyInfo(EntryType entry, AccessPolicyType content) { - super(entry, content); - } - - /** - * Get the access policy id. - * - * @return the id. - */ - public String getId() { - return getContent().getId(); - } - - /** - * Get the creation date. - * - * @return the date. - */ - public Date getCreated() { - return getContent().getCreated(); - } - - /** - * Get the last modified date. - * - * @return the date. - */ - public Date getLastModified() { - return getContent().getLastModified(); - } - - /** - * Get the name. - * - * @return the name. - */ - public String getName() { - return getContent().getName(); - } - - /** - * Get the duration. - * - * @return the duration. - */ - public double getDurationInMinutes() { - return getContent().getDurationInMinutes(); - } - - /** - * Get the permissions. - * - * @return the permissions. - */ - public EnumSet getPermissions() { - return AccessPolicyPermission.permissionsFromBits(getContent() - .getPermissions()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicyPermission.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicyPermission.java deleted file mode 100644 index f9f658a1bbfb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicyPermission.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import java.util.EnumSet; - -/** - * Permissions available to an access policy - * - */ -public enum AccessPolicyPermission { - NONE(0), READ(1), WRITE(2), DELETE(4), LIST(8); - - private int flagValue; - - private AccessPolicyPermission(int value) { - flagValue = value; - } - - /** - * Get the flag bit value associated with this permission - * - * @return The integer permission value - */ - public int getFlagValue() { - return flagValue; - } - - /** - * Given an integer representing the permissions as a bit vector, convert it - * into an EnumSet<AccessPolicyPermission> object - * containing the correct permissions * - * - * @param bits - * The bit vector of permissions - * @return The set of permissions in an EnumSet object. - */ - public static EnumSet permissionsFromBits(int bits) { - EnumSet perms = EnumSet - .of(AccessPolicyPermission.NONE); - - for (AccessPolicyPermission p : AccessPolicyPermission.values()) { - if ((bits & p.getFlagValue()) != 0) { - perms.remove(AccessPolicyPermission.NONE); - perms.add(p); - } - } - - return perms; - } - - /** - * Convert an EnumSet containing permissions into the - * corresponding integer bit vector to be passed to Media services. - * - * @param perms - * The permissions - * @return The bit vector to go out over the wire. - */ - public static int bitsFromPermissions(EnumSet perms) { - int result = 0; - for (AccessPolicyPermission p : perms) { - result |= p.getFlagValue(); - } - - return result; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Asset.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Asset.java deleted file mode 100644 index 362e2e7b2cde..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Asset.java +++ /dev/null @@ -1,391 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.io.UnsupportedEncodingException; -import java.net.URI; -import java.net.URLEncoder; -import java.security.InvalidParameterException; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityLinkOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityProxyData; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUnlinkOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate Asset entities. - * - */ -public final class Asset { - - /** The Constant ENTITY_SET. */ - private static final String ENTITY_SET = "Assets"; - - // Prevent instantiation - /** - * Instantiates a new asset. - */ - private Asset() { - } - - /** - * Creates an Asset Creator. - * - * @return the creator - */ - public static Creator create() { - return new Creator(); - } - - /** - * The Class Creator. - */ - public static class Creator extends - EntityOperationSingleResultBase implements - EntityCreateOperation { - - /** The name. */ - private String name; - - /** The alternate id. */ - private String alternateId; - - /** The Name of the storage account that contains the asset blob container.. */ - private String storageAccountName; - - /** The options. */ - private AssetOption options; - - /** The state. */ - private AssetState state; - - /** - * Instantiates a new creator. - */ - public Creator() { - super(ENTITY_SET, AssetInfo.class); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityCreateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - AssetType assetType = new AssetType(); - assetType.setName(name); - assetType.setAlternateId(alternateId); - assetType.setStorageAccountName(storageAccountName); - if (options != null) { - assetType.setOptions(options.getCode()); - } - if (state != null) { - assetType.setState(state.getCode()); - } - return assetType; - } - - /** - * Set the name of the asset to be created. - * - * @param name - * The name - * @return The creator object (for call chaining) - */ - public Creator setName(String name) { - this.name = name; - return this; - } - - /** - * Sets the alternate id of the asset to be created. - * - * @param alternateId - * The id - * - * @return The creator object (for call chaining) - */ - public Creator setAlternateId(String alternateId) { - this.alternateId = alternateId; - return this; - } - - /** - * Sets the options. - * - * @param options - * the options - * @return the creator - */ - public Creator setOptions(AssetOption options) { - this.options = options; - return this; - } - - /** - * Sets the state. - * - * @param state - * the state - * @return the creator - */ - public Creator setState(AssetState state) { - this.state = state; - return this; - } - - /** - * Sets Name of the storage account that contains the asset's blob container. - * @param storageAccountName Name of the storage account that contains the asset's blob container. - */ - public Creator setStorageAccountName(String storageAccountName) { - this.storageAccountName = storageAccountName; - return this; - } - } - - /** - * Create an operation object that will get the state of the given asset. - * - * @param assetId - * id of asset to retrieve - * @return the get operation - */ - public static EntityGetOperation get(String assetId) { - return new DefaultGetOperation(ENTITY_SET, assetId, - AssetInfo.class); - } - - /** - * Get the asset at the given link - * - * @param link - * the link - * @return the get operation - */ - public static EntityGetOperation get(LinkInfo link) { - return new DefaultGetOperation(link.getHref(), - AssetInfo.class); - } - - /** - * Create an operation that will list all the assets. - * - * @return The list operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation that will list all the assets at the given link. - * - * @param link - * Link to request assets from. - * @return The list operation. - */ - public static DefaultListOperation list(LinkInfo link) { - return new DefaultListOperation(link.getHref(), - new GenericType>() { - }); - } - - /** - * Create an operation that will update the given asset. - * - * @param assetId - * id of the asset to update - * @return the update operation - */ - public static Updater update(String assetId) { - return new Updater(assetId); - } - - /** - * The Class Updater. - */ - public static class Updater extends EntityOperationBase implements - EntityUpdateOperation { - - /** The name. */ - private String name; - - /** The alternate id. */ - private String alternateId; - - /** - * Instantiates a new updater. - * - * @param assetId - * the asset id - */ - protected Updater(String assetId) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, - assetId)); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media - * .entityoperations.EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - // Deliberately empty - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityUpdateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - AssetType assetType = new AssetType(); - assetType.setName(name); - assetType.setAlternateId(alternateId); - return assetType; - } - - /** - * Sets new name for asset. - * - * @param name - * The new name - * @return Updater instance - */ - public Updater setName(String name) { - this.name = name; - return this; - } - - /** - * Sets new alternate id for asset. - * - * @param alternateId - * the new alternate id - * @return Updater instance - */ - public Updater setAlternateId(String alternateId) { - this.alternateId = alternateId; - return this; - } - } - - /** - * Create an operation to delete the given asset. - * - * @param assetId - * id of asset to delete - * @return the delete operation - */ - public static EntityDeleteOperation delete(String assetId) { - return new DefaultDeleteOperation(ENTITY_SET, assetId); - } - - /** - * Link content key. - * - * @param assetId - * the asset id - * @param contentKeyId - * the content key id - * @return the entity action operation - */ - public static EntityLinkOperation linkContentKey(String assetId, - String contentKeyId) { - String escapedContentKeyId = null; - try { - escapedContentKeyId = URLEncoder.encode(contentKeyId, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new InvalidParameterException("contentKeyId"); - } - URI contentKeyUri = URI.create(String.format("ContentKeys('%s')", - escapedContentKeyId)); - return new EntityLinkOperation(ENTITY_SET, assetId, "ContentKeys", - contentKeyUri); - } - - /** - * unlink a content key. - * - * @param assetId - * the asset id - * @param contentKeyId - * the content key id - * @return the entity action operation - */ - public static EntityUnlinkOperation unlinkContentKey(String assetId, - String contentKeyId) { - return new EntityUnlinkOperation(ENTITY_SET, assetId, "ContentKeys", contentKeyId); - } - - /** - * Link delivery policy - * - * @param assetId - * the asset id - * @param deliveryPolicyId - * the content key id - * @return the entity action operation - */ - public static EntityLinkOperation linkDeliveryPolicy(String assetId, - String deliveryPolicyId) { - String escapedContentKeyId = null; - try { - escapedContentKeyId = URLEncoder.encode(deliveryPolicyId, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new InvalidParameterException("deliveryPolicyId"); - } - URI contentKeyUri = URI.create(String.format("AssetDeliveryPolicies('%s')", - escapedContentKeyId)); - return new EntityLinkOperation(ENTITY_SET, assetId, "DeliveryPolicies", - contentKeyUri); - } - - /** - * unlink an asset delivery policy - * - * @param assetId - * the asset id - * @param adpId - * the asset delivery policy id - * @return the entity action operation - */ - public static EntityUnlinkOperation unlinkDeliveryPolicy(String assetId, - String adpId) { - return new EntityUnlinkOperation(ENTITY_SET, assetId, "DeliveryPolicies", adpId); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicy.java deleted file mode 100644 index 6fa384495ac0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicy.java +++ /dev/null @@ -1,246 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.EnumSet; -import java.util.Map; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.AssetDeliveryPolicyRestType; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate Asset Delivery Policy entities. - * - */ -public final class AssetDeliveryPolicy { - - private static final String ENTITY_SET = "AssetDeliveryPolicies"; - - private AssetDeliveryPolicy() { - } - - /** - * Creates an operation to create a new AssetDeliveryPolicy - * - * @param name - * name of the asset delivery policy - * @return The operation - */ - public static Creator create() { - return new Creator(); - } - - public static class Creator extends EntityOperationSingleResultBase - implements EntityCreateOperation { - - private String name; - private EnumSet assetDeliveryProtocol; - private AssetDeliveryPolicyType assetDeliveryPolicyType; - private Map assetDeliveryConfiguration; - - public Creator() { - super(ENTITY_SET, AssetDeliveryPolicyInfo.class); - } - - @Override - public Object getRequestContents() { - return new AssetDeliveryPolicyRestType().setName(name) - .setAssetDeliveryConfiguration(assetDeliveryConfiguration) - .setAssetDeliveryPolicyType(assetDeliveryPolicyType.getCode()) - .setAssetDeliveryProtocol(AssetDeliveryProtocol.bitsFromProtocols(assetDeliveryProtocol)); - } - - /** - * Set the name of the Asset Delivery Policy to be created. - * - * @param name - * The name - * @return The creator object (for call chaining) - */ - public Creator setName(String name) { - this.name = name; - return this; - } - - /** - * Set the protocol of the Asset Delivery Policy to be created. - * - * @param assetDeliveryProtocol - * The protocol - * @return The creator object (for call chaining) - */ - public Creator setAssetDeliveryProtocol(EnumSet assetDeliveryProtocol) { - this.assetDeliveryProtocol = assetDeliveryProtocol; - return this; - } - - /** - * Set the type of the Asset Delivery Policy to be created. - * - * @param assetDeliveryPolicyType - * The type - * @return The creator object (for call chaining) - */ - public Creator setAssetDeliveryPolicyType(AssetDeliveryPolicyType assetDeliveryPolicyType) { - this.assetDeliveryPolicyType = assetDeliveryPolicyType; - return this; - } - - /** - * Set the configuration of the Asset Delivery Policy to be created. - * - * @param assetDeliveryPolicyConfiguration - * The configuration - * @return The creator object (for call chaining) - */ - public Creator setAssetDeliveryConfiguration(Map assetDeliveryPolicyConfiguration) { - this.assetDeliveryConfiguration = assetDeliveryPolicyConfiguration; - return this; - } - - } - - /** - * Create an operation that will retrieve the given asset delivery policy - * - * @param assetDeliveryPolicyId - * id of asset delivery policy to retrieve - * @return the operation - */ - public static EntityGetOperation get(String assetDeliveryPolicyId) { - return new DefaultGetOperation(ENTITY_SET, assetDeliveryPolicyId, - AssetDeliveryPolicyInfo.class); - } - - /** - * Create an operation that will retrieve all asset delivery policies - * - * @return the operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation that will list all the asset delivery policies at the - * given link. - * - * @param link - * Link to request all the asset delivery policies. - * - * @return The list operation. - */ - public static DefaultListOperation list(LinkInfo link) { - return new DefaultListOperation(link.getHref(), - new GenericType>() { - }); - } - - /** - * Create an operation to delete the given asset delivery policy - * - * @param contentKeyAuthorizationPolicyId - * id of content key authorization policy to delete - * @return the delete operation - */ - - public static EntityDeleteOperation delete(String assetDeliveryPolicyId) { - return new DefaultDeleteOperation(ENTITY_SET, assetDeliveryPolicyId); - } - - /** - * Create an operation that will update the given asset delivery policy. - * - * @param assetDeliveryPolicyId - * id of the asset delivery policy to update - * @return the update operation - */ - public static Updater update(String assetDeliveryPolicyId) { - return new Updater(assetDeliveryPolicyId); - } - - /** - * The Class Updater. - */ - public static class Updater extends EntityOperationBase implements EntityUpdateOperation { - - private EnumSet assetDeliveryProtocol; - private AssetDeliveryPolicyType assetDeliveryPolicyType; - private Map assetDeliveryConfiguration; - - protected Updater(String assetDeliveryPolicyId) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, assetDeliveryPolicyId)); - - } - - @Override - public Object getRequestContents() { - return new AssetDeliveryPolicyRestType() - .setAssetDeliveryConfiguration(assetDeliveryConfiguration) - .setAssetDeliveryPolicyType(assetDeliveryPolicyType.getCode()) - .setAssetDeliveryProtocol(AssetDeliveryProtocol.bitsFromProtocols(assetDeliveryProtocol)); - } - - /** - * Set the protocol of the Asset Delivery Policy to be created. - * - * @param assetDeliveryProtocol - * The protocol - * @return The creator object (for call chaining) - */ - public Updater setAssetDeliveryProtocol(EnumSet assetDeliveryProtocol) { - this.assetDeliveryProtocol = assetDeliveryProtocol; - return this; - } - - /** - * Set the type of the Asset Delivery Policy to be created. - * - * @param assetDeliveryPolicyType - * The type - * @return The creator object (for call chaining) - */ - public Updater setAssetDeliveryPolicyType(AssetDeliveryPolicyType assetDeliveryPolicyType) { - this.assetDeliveryPolicyType = assetDeliveryPolicyType; - return this; - } - - /** - * Set the configuration of the Asset Delivery Policy to be created. - * - * @param assetDeliveryPolicyConfiguration - * The configuration - * @return The creator object (for call chaining) - */ - public Updater setAssetDeliveryConfiguration( - Map assetDeliveryPolicyConfiguration) { - this.assetDeliveryConfiguration = assetDeliveryPolicyConfiguration; - return this; - } - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyConfigurationKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyConfigurationKey.java deleted file mode 100644 index c32bce8d42f3..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyConfigurationKey.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Specifies the AssetDeliveryPolicyType. - */ -public enum AssetDeliveryPolicyConfigurationKey { - - /** No policies. */ - None(0), - /** Exact Envelope key URL. */ - EnvelopeKeyAcquisitionUrl(1), - /** Base key url that will have KID= appended for Envelope. */ - EnvelopeBaseKeyAcquisitionUrl(2), - /** The initialization vector to use for envelope encryption in Base64 format. */ - EnvelopeEncryptionIVAsBase64(3), - /** The PlayReady License Acquisition Url to use for common encryption. */ - PlayReadyLicenseAcquisitionUrl(4), - /** The PlayReady Custom Attributes to add to the PlayReady Content Header. */ - PlayReadyCustomAttributes(5), - /** The initialization vector to use for envelope encryption. */ - EnvelopeEncryptionIV(6), - /** Widevine DRM Acquisition Url to use for common encryption. */ - WidevineLicenseAcquisitionUrl(7), - /** Base Widevine url that will have KID= appended */ - WidevineBaseLicenseAcquisitionUrl(8), - /** FairPlay license acquisition URL. */ - FairPlayLicenseAcquisitionUrl(9), - /** Base FairPlay license acquisition URL that will have KID= appended. */ - FairPlayBaseLicenseAcquisitionUrl(10), - /** Initialization Vector that will be used for encrypting the content. Must match - IV in the AssetDeliveryPolicy. */ - CommonEncryptionIVForCbcs(11); - - /** The AssetDeliveryPolicyType code. */ - private int assetDeliveryPolicyConfigurationKey; - - /** - * Instantiates a new AssetDeliveryPolicyConfigurationKey. - * - * @param assetDeliveryPolicyConfigurationKey - * the AssetDeliveryPolicyConfigurationKey code - */ - private AssetDeliveryPolicyConfigurationKey(int assetDeliveryPolicyConfigurationKey) { - this.assetDeliveryPolicyConfigurationKey = assetDeliveryPolicyConfigurationKey; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return assetDeliveryPolicyConfigurationKey; - } - - /** - * Create an AssetDeliveryPolicyConfigurationKey instance based on the given integer. - * - * @param option - * the integer value of option - * @return The AssetDeliveryPolicyType - */ - public static AssetDeliveryPolicyConfigurationKey fromCode(int option) { - switch (option) { - case 0: - return AssetDeliveryPolicyConfigurationKey.None; - case 1: - return AssetDeliveryPolicyConfigurationKey.EnvelopeKeyAcquisitionUrl; - case 2: - return AssetDeliveryPolicyConfigurationKey.EnvelopeBaseKeyAcquisitionUrl; - case 3: - return AssetDeliveryPolicyConfigurationKey.EnvelopeEncryptionIVAsBase64; - case 4: - return AssetDeliveryPolicyConfigurationKey.PlayReadyLicenseAcquisitionUrl; - case 5: - return AssetDeliveryPolicyConfigurationKey.PlayReadyCustomAttributes; - case 6: - return AssetDeliveryPolicyConfigurationKey.EnvelopeEncryptionIV; - case 7: - return AssetDeliveryPolicyConfigurationKey.WidevineLicenseAcquisitionUrl; - case 8: - return AssetDeliveryPolicyConfigurationKey.WidevineBaseLicenseAcquisitionUrl; - case 9: - return AssetDeliveryPolicyConfigurationKey.FairPlayLicenseAcquisitionUrl; - case 10: - return AssetDeliveryPolicyConfigurationKey.FairPlayBaseLicenseAcquisitionUrl; - case 11: - return AssetDeliveryPolicyConfigurationKey.CommonEncryptionIVForCbcs; - default: - throw new InvalidParameterException("option"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyInfo.java deleted file mode 100644 index 4665ce3bf620..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyInfo.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; -import java.util.EnumSet; -import java.util.Map; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetDeliveryPolicyRestType; - -/** - * Type containing data about asset delivery policy. - * - */ -public class AssetDeliveryPolicyInfo extends ODataEntity { - - /** - * Creates a new {@link AssetDeliveryPolicyInfo} wrapping the given ATOM - * entry and content objects. - * - * @param entry - * the entry - * @param content - * the content - */ - public AssetDeliveryPolicyInfo(EntryType entry, AssetDeliveryPolicyRestType content) { - super(entry, content); - } - - /** - * Get the asset delivery policy id. - * - * @return the id. - */ - public String getId() { - return getContent().getId(); - } - - /** - * Get the asset delivery policy name. - * - * @return the name. - */ - public String getName() { - return getContent().getName(); - } - - /** - * Get the asset delivery policy type. - * - * @return the type. - */ - public AssetDeliveryPolicyType getAssetDeliveryPolicyType() { - return AssetDeliveryPolicyType.fromCode(getContent().getAssetDeliveryPolicyType()); - } - - /** - * Get the asset delivery policy protocol. - * - * @return the protocol. - */ - public EnumSet getAssetDeliveryProtocol() { - return AssetDeliveryProtocol.protocolsFromBits(getContent().getAssetDeliveryProtocol()); - } - - /** - * Get the asset delivery policy configuration. - * - * @return the configuration. - */ - public Map getAssetDeliveryConfiguration() { - return getContent().getAssetDeliveryConfiguration(); - } - - /** - * Get the asset delivery policy creation date. - * - * @return the creation date. - */ - public Date getCreated() { - return getContent().getCreated(); - } - - /** - * Get last date where any asset delivery policy's property was changed. - * - * @return the last date where any property was changed. - */ - public Date getLastModified() { - return getContent().getLastModified(); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyType.java deleted file mode 100644 index b1aab0531623..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyType.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Specifies the AssetDeliveryPolicyType. - */ -public enum AssetDeliveryPolicyType { - - /** Delivery Policy Type not set. An invalid value. */ - None(0), - /** The Asset should not be delivered via this AssetDeliveryProtocol. */ - Blocked(1), - /** Do not apply dynamic encryption to the asset. */ - NoDynamicEncryption(2), - /** Apply Dynamic Envelope encryption. */ - DynamicEnvelopeEncryption(3), - /** Apply Dynamic Common encryption. */ - DynamicCommonEncryption(4), - /** Apply Dynamic Common encryption with cbcs */ - DynamicCommonEncryptionCbcs(5); - - - /** The AssetDeliveryPolicyType code. */ - private int assetDeliveryPolicyTypeCode; - - /** - * Instantiates a new AssetDeliveryPolicyType. - * - * @param assetDeliveryPolicyTypeCode - * the AssetDeliveryPolicyType code - */ - private AssetDeliveryPolicyType(int assetDeliveryPolicyTypeCode) { - this.assetDeliveryPolicyTypeCode = assetDeliveryPolicyTypeCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return assetDeliveryPolicyTypeCode; - } - - /** - * Create an AssetDeliveryPolicyType instance based on the given integer. - * - * @param option - * the integer value of option - * @return The AssetDeliveryPolicyType - */ - public static AssetDeliveryPolicyType fromCode(int option) { - switch (option) { - case 0: - return AssetDeliveryPolicyType.None; - case 1: - return AssetDeliveryPolicyType.Blocked; - case 2: - return AssetDeliveryPolicyType.NoDynamicEncryption; - case 3: - return AssetDeliveryPolicyType.DynamicEnvelopeEncryption; - case 4: - return AssetDeliveryPolicyType.DynamicCommonEncryption; - case 5: - return AssetDeliveryPolicyType.DynamicCommonEncryptionCbcs; - default: - throw new InvalidParameterException("option"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryProtocol.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryProtocol.java deleted file mode 100644 index ad0721519bd5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryProtocol.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.EnumSet; - -/** - * - * Specifies the protocol of an AssetDeliveryPolicy. - * - */ -public enum AssetDeliveryProtocol { - - /** No protocols. */ - None(0), - /** Smooth streaming protocol. */ - SmoothStreaming (1), - /** MPEG Dynamic Adaptive Streaming over HTTP (DASH). */ - Dash(2), - /** Apple HTTP Live Streaming protocol. */ - HLS(4), - /** Adobe HTTP Dynamic Streaming (HDS). */ - Hds(8), - /** Include all protocols */ - All(0xFFFF); - - /** The content key type code. */ - private int falgValue; - - /** - * Instantiates a new content key type. - * - * @param contentKeyTypeCode - * the content key type code - */ - private AssetDeliveryProtocol(int falgValue) { - this.falgValue = falgValue; - } - - /** - * Gets the flags value. - * - * @return the flags value - */ - public int getFlagValue() { - return falgValue; - } - - /** - * Given an integer representing the protocols as a bit vector, convert it - * into an EnumSet<AssetDeliveryProtocol> object - * containing the correct protocols * - * - * @param bits - * The bit vector of protocols - * @return The set of protocols in an EnumSet object. - */ - public static EnumSet protocolsFromBits(int bits) { - EnumSet perms = EnumSet - .of(AssetDeliveryProtocol.None); - - for (AssetDeliveryProtocol p : AssetDeliveryProtocol.values()) { - if ((bits & p.getFlagValue()) == p.getFlagValue()) { - perms.remove(AssetDeliveryProtocol.None); - perms.add(p); - } - } - - return perms; - } - - /** - * Convert an EnumSet containing protocols into the - * corresponding integer bit vector to be passed to Media services. - * - * @param perms - * The protocols - * @return The bit vector to go out over the wire. - */ - public static int bitsFromProtocols(EnumSet protos) { - int result = 0; - - for (AssetDeliveryProtocol p : protos) { - result |= p.getFlagValue(); - } - - return result; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFile.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFile.java deleted file mode 100644 index 1b2178e02831..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFile.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityProxyData; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.AssetFileType; -import com.sun.jersey.api.client.GenericType; - -public final class AssetFile { - private static final String ENTITY_SET = "Files"; - - // Prevent instantiation - private AssetFile() { - } - - public static Creator create(String parentAssetId, String name) { - return new Creator(parentAssetId, name); - } - - public static final class Creator extends - EntityOperationSingleResultBase implements - EntityCreateOperation { - private final String parentAssetId; - private final String name; - private String contentChecksum; - private Long contentFileSize; - private String encryptionKeyId; - private String encryptionScheme; - private String encryptionVersion; - private String initializationVector; - private Boolean isEncrypted; - private Boolean isPrimary; - private String mimeType; - - private Creator(String parentAssetId, String name) { - super(ENTITY_SET, AssetFileInfo.class); - this.parentAssetId = parentAssetId; - this.name = name; - } - - @Override - public Object getRequestContents() throws ServiceException { - AssetFileType content = new AssetFileType().setName(name) - .setParentAssetId(parentAssetId) - .setContentChecksum(contentChecksum) - .setContentFileSize(contentFileSize) - .setEncryptionKeyId(encryptionKeyId) - .setEncryptionScheme(encryptionScheme) - .setEncryptionVersion(encryptionVersion) - .setInitializationVector(initializationVector) - .setIsEncrypted(isEncrypted).setIsPrimary(isPrimary) - .setMimeType(mimeType); - - return content; - } - - /** - * @param contentChecksum - * the contentChecksum to set - */ - public Creator setContentChecksum(String contentChecksum) { - this.contentChecksum = contentChecksum; - return this; - } - - /** - * @param contentFileSize - * the contentFileSize to set - */ - public Creator setContentFileSize(Long contentFileSize) { - this.contentFileSize = contentFileSize; - return this; - } - - /** - * @param encryptionKeyId - * the encryptionKeyId to set - */ - public Creator setEncryptionKeyId(String encryptionKeyId) { - this.encryptionKeyId = encryptionKeyId; - return this; - } - - /** - * @param encryptionScheme - * the encryptionScheme to set - */ - public Creator setEncryptionScheme(String encryptionScheme) { - this.encryptionScheme = encryptionScheme; - return this; - } - - /** - * @param encryptionVersion - * the encryptionVersion to set - */ - public Creator setEncryptionVersion(String encryptionVersion) { - this.encryptionVersion = encryptionVersion; - return this; - } - - /** - * @param initializationVector - * the initializationVector to set - */ - public Creator setInitializationVector(String initializationVector) { - this.initializationVector = initializationVector; - return this; - } - - /** - * @param isEncrypted - * the isEncrypted to set - */ - public Creator setIsEncrypted(Boolean isEncrypted) { - this.isEncrypted = isEncrypted; - return this; - } - - /** - * @param isPrimary - * the isPrimary to set - */ - public Creator setIsPrimary(Boolean isPrimary) { - this.isPrimary = isPrimary; - return this; - } - - /** - * @param mimeType - * the mimeType to set - */ - public Creator setMimeType(String mimeType) { - this.mimeType = mimeType; - return this; - } - - } - - /** - * Call the CreateFileInfos action on the server for the given asset - * - * @param assetId - * asset to create file infos for - * @return The action operation object to pass to rest proxy. - * @throws UnsupportedEncodingException - */ - public static EntityActionOperation createFileInfos(String assetId) { - String encodedId; - try { - encodedId = URLEncoder.encode(assetId, "UTF-8"); - } catch (UnsupportedEncodingException ex) { - // This can never happen unless JVM is broken - throw new RuntimeException(ex); - } - return new DefaultActionOperation("CreateFileInfos").addQueryParameter( - "assetid", "'" + encodedId + "'"); - } - - /** - * Call the service to get a single asset file entity - * - * @param assetFileId - * id of file to get - * @return the get operation to pass to rest proxy - */ - public static EntityGetOperation get(String assetFileId) { - return new DefaultGetOperation(ENTITY_SET, assetFileId, - AssetFileInfo.class); - } - - /** - * Calls the service to list all files - * - * @return The list operation to pass to rest proxy. - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation that will list all the AssetFiles at the given link. - * - * @param link - * Link to request AssetFiles from. - * @return The list operation. - */ - public static DefaultListOperation list( - LinkInfo link) { - return new DefaultListOperation(link.getHref(), - new GenericType>() { - }); - } - - public static Updater update(String assetFileId) { - return new Updater(assetFileId); - } - - public static final class Updater extends EntityOperationBase implements - EntityUpdateOperation { - private String contentChecksum; - private Long contentFileSize; - private String encryptionKeyId; - private String encryptionScheme; - private String encryptionVersion; - private String initializationVector; - private Boolean isEncrypted; - private Boolean isPrimary; - private String mimeType; - - private Updater(String assetFileId) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, - assetFileId)); - } - - @Override - public Object getRequestContents() { - return new AssetFileType().setContentChecksum(contentChecksum) - .setContentFileSize(contentFileSize) - .setEncryptionKeyId(encryptionKeyId) - .setEncryptionScheme(encryptionScheme) - .setEncryptionVersion(encryptionVersion) - .setInitializationVector(initializationVector) - .setIsEncrypted(isEncrypted).setIsPrimary(isPrimary) - .setMimeType(mimeType); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media - * .entityoperations.EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - // Deliberately empty - } - - /** - * @param contentChecksum - * the contentChecksum to set - */ - public Updater setContentChecksum(String contentChecksum) { - this.contentChecksum = contentChecksum; - return this; - } - - /** - * @param contentFileSize - * the contentFileSize to set - */ - public Updater setContentFileSize(Long contentFileSize) { - this.contentFileSize = contentFileSize; - return this; - } - - /** - * @param encryptionKeyId - * the encryptionKeyId to set - */ - public Updater setEncryptionKeyId(String encryptionKeyId) { - this.encryptionKeyId = encryptionKeyId; - return this; - } - - /** - * @param encryptionScheme - * the encryptionScheme to set - */ - public Updater setEncryptionScheme(String encryptionScheme) { - this.encryptionScheme = encryptionScheme; - return this; - } - - /** - * @param encryptionVersion - * the encryptionVersion to set - */ - public Updater setEncryptionVersion(String encryptionVersion) { - this.encryptionVersion = encryptionVersion; - return this; - } - - /** - * @param initializationVector - * the initializationVector to set - */ - public Updater setInitializationVector(String initializationVector) { - this.initializationVector = initializationVector; - return this; - } - - /** - * @param isEncrypted - * the isEncrypted to set - */ - public Updater setIsEncrypted(Boolean isEncrypted) { - this.isEncrypted = isEncrypted; - return this; - } - - /** - * @param isPrimary - * the isPrimary to set - */ - public Updater setIsPrimary(Boolean isPrimary) { - this.isPrimary = isPrimary; - return this; - } - - /** - * @param mimeType - * the mimeType to set - */ - public Updater setMimeType(String mimeType) { - this.mimeType = mimeType; - return this; - } - - } - - /** - * Calls the service to delete an asset file entity - * - * @param assetFileId - * file to delete - * @return the delete operation object - */ - public static EntityDeleteOperation delete(String assetFileId) { - return new DefaultDeleteOperation(ENTITY_SET, assetFileId); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFileInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFileInfo.java deleted file mode 100644 index 813b6567dfe3..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFileInfo.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetFileType; - -/** - * The Class AssetFileInfo. - */ -public class AssetFileInfo extends ODataEntity { - - public AssetFileInfo(EntryType entry, AssetFileType content) { - super(entry, content); - } - - public AssetFileInfo() { - super(new AssetFileType()); - } - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return this.getContent().getId(); - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return this.getContent().getName(); - } - - /** - * Gets the content file size. - * - * @return the content file size - */ - public long getContentFileSize() { - return this.getContent().getContentFileSize(); - } - - /** - * Gets the parent asset id. - * - * @return the parent asset id - */ - public String getParentAssetId() { - return this.getContent().getParentAssetId(); - } - - /** - * Gets the encryption version. - * - * @return the encryption version - */ - public String getEncryptionVersion() { - return this.getContent().getEncryptionVersion(); - } - - /** - * Gets the encryption scheme. - * - * @return the encryption scheme - */ - public String getEncryptionScheme() { - return this.getContent().getEncryptionScheme(); - } - - /** - * Gets the checks if is encrypted. - * - * @return the checks if is encrypted - */ - public boolean getIsEncrypted() { - return this.getContent().getIsEncrypted(); - } - - /** - * Gets the encryption key id. - * - * @return the encryption key id - */ - public String getEncryptionKeyId() { - return this.getContent().getEncryptionKeyId(); - } - - /** - * Gets the initialization vector. - * - * @return the initialization vector - */ - public String getInitializationVector() { - return this.getContent().getInitializationVector(); - } - - /** - * Gets the checks if is primary. - * - * @return the checks if is primary - */ - public boolean getIsPrimary() { - return this.getContent().getIsPrimary(); - } - - /** - * Gets the last modified. - * - * @return the last modified - */ - public Date getLastModified() { - return this.getContent().getLastModified(); - } - - /** - * Gets the created. - * - * @return the created - */ - public Date getCreated() { - return this.getContent().getCreated(); - } - - /** - * Gets the mime type. - * - * @return the mime type - */ - public String getMimeType() { - return this.getContent().getMimeType(); - } - - /** - * Gets the content checksum. - * - * @return the content checksum - */ - public String getContentChecksum() { - return this.getContent().getContentChecksum(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetInfo.java deleted file mode 100644 index daa2e7ce6627..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetInfo.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; - -/** - * Data about a Media Services Asset entity. - * - */ -public class AssetInfo extends ODataEntity { - - /** - * Instantiates a new asset info. - * - * @param entry - * the entry - * @param content - * the content - */ - public AssetInfo(EntryType entry, AssetType content) { - super(entry, content); - } - - /** - * Get the asset id. - * - * @return the id - */ - public String getId() { - return getContent().getId(); - } - - /** - * Get the asset name. - * - * @return the name - */ - public String getName() { - return this.getContent().getName(); - } - - /** - * Get the asset state. - * - * @return the state - */ - public AssetState getState() { - return AssetState.fromCode(getContent().getState()); - } - - /** - * Get the creation date. - * - * @return the date - */ - public Date getCreated() { - return this.getContent().getCreated(); - } - - /** - * Get last modified date. - * - * @return the date - */ - public Date getLastModified() { - return getContent().getLastModified(); - } - - /** - * Get the alternate id. - * - * @return the id - */ - public String getAlternateId() { - return getContent().getAlternateId(); - } - - /** - * Get the options. - * - * @return the options - */ - public AssetOption getOptions() { - return AssetOption.fromCode(getContent().getOptions()); - } - - /** - * Get the URI of the blob storage container of the specified Asset. - * - * @return the URI of the blob storage container of the specified Asset. - */ - public String getUri() { - return getContent().getUri(); - } - - /** - * Get the Name of the storage account that contains the asset’s blob container. - * - * @return the Name of the storage account that contains the asset’s blob container. - */ - public String getStorageAccountName() { - return getContent().getStorageAccountName(); - } - - /** - * Get a link to the asset's files - * - * @return the link - */ - public LinkInfo getAssetFilesLink() { - return this. getRelationLink("Files"); - } - - /** - * Get a link to the asset's content keys - * - * @return the link - */ - public LinkInfo getContentKeysLink() { - return this. getRelationLink("ContentKeys"); - } - - /** - * Get a link to the asset's locators - * - * @return the link - */ - public LinkInfo getLocatorsLink() { - return this. getRelationLink("Locators"); - } - - /** - * Get a link to this asset's parents - * - * @return the link - */ - public LinkInfo getParentAssetsLink() { - return this. getRelationLink("ParentAssets"); - } - - /** - * Get a link to this asset's delivery policies - * - * @return the link - */ - public LinkInfo getDeliveryPoliciesLink() { - return this. getRelationLink("DeliveryPolicies"); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetOption.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetOption.java deleted file mode 100644 index ff0984205dec..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetOption.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Specifies the options for encryption. - */ -public enum AssetOption { - - /** The None. */ - None(0), - /** The Storage encrypted. */ - StorageEncrypted(1), - /** The Common encryption protected. */ - CommonEncryptionProtected(2); - - /** The encryption option code. */ - private int encryptionOptionCode; - - /** - * Instantiates a new encryption option. - * - * @param encryptionOptionCode - * the encryption option code - */ - private AssetOption(int encryptionOptionCode) { - this.encryptionOptionCode = encryptionOptionCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return encryptionOptionCode; - } - - /** - * Create an AssetOption instance based on the given integer. - * - * @param option - * the integer value of option - * @return The AssetOption - */ - public static AssetOption fromCode(int option) { - switch (option) { - case 0: - return AssetOption.None; - case 1: - return AssetOption.StorageEncrypted; - case 2: - return AssetOption.CommonEncryptionProtected; - default: - throw new InvalidParameterException("option"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetState.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetState.java deleted file mode 100644 index bbadf9a1bc20..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetState.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Specifies the states of the asset. - */ -public enum AssetState { - - /** The Initialized. */ - Initialized(0), - /** The Published. */ - Published(1), - /** The Deleted. */ - Deleted(2); - - /** The asset state code. */ - private int assetStateCode; - - /** - * Instantiates a new asset state. - * - * @param assetStateCode - * the asset state code - */ - private AssetState(int assetStateCode) { - this.assetStateCode = assetStateCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return assetStateCode; - } - - /** - * Create an AssetState instance from the corresponding int. - * - * @param state - * state as integer - * @return new AssetState instance - */ - public static AssetState fromCode(int state) { - switch (state) { - case 0: - return AssetState.Initialized; - case 1: - return AssetState.Published; - case 2: - return AssetState.Deleted; - default: - throw new InvalidParameterException("state"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKey.java deleted file mode 100644 index 89d9caba04d5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKey.java +++ /dev/null @@ -1,438 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.security.InvalidParameterException; - -import javax.ws.rs.core.MediaType; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import javax.xml.transform.stream.StreamSource; - -import org.codehaus.jettison.json.JSONException; -import org.codehaus.jettison.json.JSONObject; - -import com.microsoft.windowsazure.core.pipeline.PipelineHelpers; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultEntityTypeActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityTypeActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyRestType; -import com.microsoft.windowsazure.services.media.implementation.content.RebindContentKeyType; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate content key entities. - * - */ -public final class ContentKey { - - /** The Constant ENTITY_SET. */ - private static final String ENTITY_SET = "ContentKeys"; - - /** - * Instantiates a new content key. - */ - private ContentKey() { - } - - /** - * Creates an operation to create a new content key. - * - * @param id - * the id - * @param contentKeyType - * the content key type - * @param encryptedContentKey - * the encrypted content key - * @return The operation - */ - public static Creator create(String id, ContentKeyType contentKeyType, - String encryptedContentKey) { - return new Creator(id, contentKeyType, encryptedContentKey); - } - - /** - * The Class Creator. - */ - public static class Creator extends - EntityOperationSingleResultBase implements - EntityCreateOperation { - - /** The id. */ - private final String id; - - /** The content key type. */ - private final ContentKeyType contentKeyType; - - /** The encrypted content key. */ - private final String encryptedContentKey; - - /** The name. */ - private String name; - - /** The checksum. */ - private String checksum; - - /** The protection key id. */ - private String protectionKeyId; - - /** The protection key type. */ - private ProtectionKeyType protectionKeyType; - - /** - * Instantiates a new creator. - * - * @param id - * the id - * @param contentKeyType - * the content key type - * @param encryptedContentKey - * the encrypted content key - */ - public Creator(String id, ContentKeyType contentKeyType, - String encryptedContentKey) { - super(ENTITY_SET, ContentKeyInfo.class); - - this.id = id; - this.contentKeyType = contentKeyType; - this.encryptedContentKey = encryptedContentKey; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityCreateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - ContentKeyRestType contentKeyRestType = new ContentKeyRestType(); - contentKeyRestType.setId(id); - if (contentKeyType != null) { - contentKeyRestType.setContentKeyType(contentKeyType.getCode()); - } - if (protectionKeyType != null) { - contentKeyRestType.setProtectionKeyType(protectionKeyType - .getCode()); - } - contentKeyRestType.setEncryptedContentKey(encryptedContentKey); - contentKeyRestType.setName(name); - contentKeyRestType.setChecksum(checksum); - contentKeyRestType.setProtectionKeyId(protectionKeyId); - return contentKeyRestType; - } - - /** - * Sets the name. - * - * @param name - * the name - * @return the creator - */ - public Creator setName(String name) { - this.name = name; - return this; - } - - /** - * Sets the checksum. - * - * @param checksum - * the checksum - * @return the creator - */ - public Creator setChecksum(String checksum) { - this.checksum = checksum; - return this; - } - - /** - * Sets the protection key id. - * - * @param protectionKeyId - * the protection key id - * @return the creator - */ - public Creator setProtectionKeyId(String protectionKeyId) { - this.protectionKeyId = protectionKeyId; - return this; - } - - /** - * Sets the protection key type. - * - * @param protectionKeyType - * the protection key type - * @return the creator - */ - public Creator setProtectionKeyType(ProtectionKeyType protectionKeyType) { - this.protectionKeyType = protectionKeyType; - return this; - } - } - - /** - * Create an operation that will retrieve the given content key. - * - * @param contentKeyId - * id of content key to retrieve - * @return the operation - */ - public static EntityGetOperation get(String contentKeyId) { - return new DefaultGetOperation(ENTITY_SET, - contentKeyId, ContentKeyInfo.class); - } - - /** - * Create an operation that will retrieve all access policies. - * - * @return the operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation that will list all the content keys at the given - * link. - * - * @param link - * Link to request content keys from. - * @return The list operation. - */ - public static DefaultListOperation list( - LinkInfo link) { - return new DefaultListOperation(link.getHref(), - new GenericType>() { - }); - } - - /** - * Create an operation to delete the given content key. - * - * @param contentKeyId - * id of content key to delete - * @return the delete operation - */ - public static EntityDeleteOperation delete(String contentKeyId) { - return new DefaultDeleteOperation(ENTITY_SET, contentKeyId); - } - - /** - * Rebind content key with specified content key and X509 Certificate. - * - * @param contentKeyId - * the content key id - * @param x509Certificate - * the x509 certificate - * @return the entity action operation - */ - public static EntityTypeActionOperation rebind(String contentKeyId, - String x509Certificate) { - return new RebindContentKeyActionOperation(contentKeyId, - x509Certificate); - } - - /** - * Rebind content key with specified content key Id. - * - * @param contentKeyId - * the content key id - * @return the entity action operation - */ - public static EntityTypeActionOperation rebind(String contentKeyId) { - return rebind(contentKeyId, ""); - } - - private static class RebindContentKeyActionOperation extends - DefaultEntityTypeActionOperation { - private final JAXBContext jaxbContext; - - private final Unmarshaller unmarshaller; - - public RebindContentKeyActionOperation(String contentKeyId, - String x509Certificate) { - super("RebindContentKey"); - - String escapedContentKeyId; - try { - escapedContentKeyId = URLEncoder.encode(contentKeyId, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new InvalidParameterException( - "UTF-8 encoding is not supported."); - } - this.addQueryParameter("x509Certificate", "'" + x509Certificate - + "'"); - this.addQueryParameter("id", "'" + escapedContentKeyId + "'"); - - try { - jaxbContext = JAXBContext - .newInstance(RebindContentKeyType.class); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - - try { - unmarshaller = jaxbContext.createUnmarshaller(); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - } - - @Override - public String processTypeResponse(ClientResponse clientResponse) { - PipelineHelpers.throwIfNotSuccess(clientResponse); - RebindContentKeyType rebindContentKeyType = parseResponse(clientResponse); - return rebindContentKeyType.getContentKey(); - } - - private RebindContentKeyType parseResponse(ClientResponse clientResponse) { - InputStream inputStream = clientResponse.getEntityInputStream(); - JAXBElement rebindContentKeyTypeJaxbElement; - try { - rebindContentKeyTypeJaxbElement = unmarshaller.unmarshal( - new StreamSource(inputStream), - RebindContentKeyType.class); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - return rebindContentKeyTypeJaxbElement.getValue(); - } - - } - - - public static KeyDeliveryUrlGetter getKeyDeliveryUrl(String contentKeyId, ContentKeyDeliveryType contentKeyDeliveryType) { - return new KeyDeliveryUrlGetter(contentKeyId, contentKeyDeliveryType); - } - - private static class KeyDeliveryUrlGetter extends - EntityOperationSingleResultBase implements - EntityCreateOperation { - /** The contentKeyId */ - private final String contentKeyId; - - /** content Key delivery type */ - private final ContentKeyDeliveryType contentKeyDeliveryType; - - public KeyDeliveryUrlGetter(String contentKeyId, - ContentKeyDeliveryType contentKeyDeliveryType) { - super(ENTITY_SET, String.class); - - this.contentKeyId = contentKeyId; - this.contentKeyDeliveryType = contentKeyDeliveryType; - } - - @Override - public String getUri() { - String escapedEntityId; - try { - escapedEntityId = URLEncoder.encode(contentKeyId, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new InvalidParameterException( - "UTF-8 encoding is not supported."); - } - return String.format("%s('%s')/GetKeyDeliveryUrl", ENTITY_SET, escapedEntityId); - } - - @Override - public Object getRequestContents() throws ServiceException { - JSONObject document = new JSONObject(); - try { - document.put("keyDeliveryType", contentKeyDeliveryType.getCode()); - } catch (JSONException e) { - throw new ServiceException("JSON Exception", e); - } - return document.toString(); - } - - @Override - public MediaType getContentType() { - return MediaType.APPLICATION_JSON_TYPE; - } - - @Override - public MediaType getAcceptType() { - return MediaType.APPLICATION_JSON_TYPE; - } - - @Override - public Object processResponse(Object rawResponse) throws ServiceException { - try { - JSONObject object = new JSONObject(rawResponse.toString()); - return object.getString("value"); - } catch (JSONException e) { - throw new ServiceException(e); - } - } - } - - /** Updates a ContentKey with an ContentKeyAuthorizationPolicyId - * - * @param contentKeyId The id of the ContentKey to be updated. - * @param contentKeyAuthorizationPolicyId The id of the ContentKeyAuthorizationPolicy - * @return Entity Operation - */ - public static Updater update(String contentKeyId, String contentKeyAuthorizationPolicyId) { - return new Updater(contentKeyId, contentKeyAuthorizationPolicyId); - } - - public static class Updater extends EntityOperationBase implements - EntityUpdateOperation { - - private String contentKeyAuthorizationPolicyId; - - protected Updater(String contentKeyId, String contentKeyAuthorizationPolicyId) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, - contentKeyId)); - this.contentKeyAuthorizationPolicyId = contentKeyAuthorizationPolicyId; - } - - @Override - public MediaType getContentType() { - return MediaType.APPLICATION_JSON_TYPE; - } - - @Override - public Object getRequestContents() { - JSONObject document = new JSONObject(); - try { - document.put("AuthorizationPolicyId", contentKeyAuthorizationPolicyId); - } catch (JSONException e) { - throw new RuntimeException("JSON Exception", e); - } - return document.toString(); - } - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java deleted file mode 100644 index 608b03d9ac94..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.io.UnsupportedEncodingException; -import java.net.URI; -import java.net.URLEncoder; -import java.security.InvalidParameterException; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityLinkOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUnlinkOperation; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyType; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate Content Key Authorization Policy - * entities. - * - */ -public final class ContentKeyAuthorizationPolicy { - - private static final String ENTITY_SET = "ContentKeyAuthorizationPolicies"; - - private ContentKeyAuthorizationPolicy() { - } - - /** - * Creates an operation to create a new ContentKeyAuthorizationPolicy - * - * @param name - * name of the content key authorization policy - * @return The operation - */ - public static EntityCreateOperation create(String name) { - return new Creator(name); - } - - private static class Creator extends EntityOperationSingleResultBase - implements EntityCreateOperation { - - private String name; - - public Creator(String name) { - - super(ENTITY_SET, ContentKeyAuthorizationPolicyInfo.class); - - this.name = name; - } - - @Override - public Object getRequestContents() { - return new ContentKeyAuthorizationPolicyType().setName(name); - } - - } - - /** - * Create an operation that will retrieve the given content key - * authorization policy - * - * @param contentKeyAuthorizationPolicyId - * id of content key authorization policy to retrieve - * @return the operation - */ - public static EntityGetOperation get(String contentKeyAuthorizationPolicyId) { - return new DefaultGetOperation(ENTITY_SET, contentKeyAuthorizationPolicyId, - ContentKeyAuthorizationPolicyInfo.class); - } - - /** - * Create an operation that will retrieve the content key authorization - * policy at the given link - * - * @param link - * the link - * @return the operation - */ - public static EntityGetOperation get( - LinkInfo link) { - return new DefaultGetOperation(link.getHref(), - ContentKeyAuthorizationPolicyInfo.class); - } - - /** - * Create an operation that will retrieve all content key authorization - * polices - * - * @return the operation - */ - - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation to delete the given content key authorization policy - * - * @param contentKeyAuthorizationPolicyId - * id of content key authorization policy to delete - * @return the delete operation - */ - - public static EntityDeleteOperation delete(String contentKeyAuthorizationPolicyId) { - return new DefaultDeleteOperation(ENTITY_SET, contentKeyAuthorizationPolicyId); - } - - /** - * Link a content key authorization policy options. - * - * @param contentKeyAuthorizationPolicyId - * the content key authorization policy id - * @param contentKeyAuthorizationPolicyOptionId - * the content key authorization policy option id - * @return the entity action operation - */ - public static EntityLinkOperation linkOptions(String contentKeyAuthorizationPolicyId, - String contentKeyAuthorizationPolicyOptionId) { - String escapedContentKeyId = null; - try { - escapedContentKeyId = URLEncoder.encode(contentKeyAuthorizationPolicyOptionId, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new InvalidParameterException("contentKeyId"); - } - URI contentKeyUri = URI - .create(String.format("ContentKeyAuthorizationPolicyOptions('%s')", escapedContentKeyId)); - return new EntityLinkOperation(ENTITY_SET, contentKeyAuthorizationPolicyId, "Options", contentKeyUri); - } - - /** - * Unlink content key authorization policy options. - * - * @param assetId - * the asset id - * @param adpId - * the Asset Delivery Policy id - * @return the entity action operation - */ - public static EntityUnlinkOperation unlinkOptions(String contentKeyAuthorizationPolicyId, - String contentKeyAuthorizationPolicyOptionId) { - return new EntityUnlinkOperation(ENTITY_SET, contentKeyAuthorizationPolicyId, "Options", contentKeyAuthorizationPolicyOptionId); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyInfo.java deleted file mode 100644 index 7cdcff50b84b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyInfo.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyType; - -/** - * Type containing data about content key authorization policy options. - * - */ -public class ContentKeyAuthorizationPolicyInfo extends ODataEntity { - - /** - * Creates a new {@link ContentKeyAuthorizationPolicyInfo} wrapping the - * given ATOM entry and content objects. - * - * @param entry - * the entry - * @param content - * the content - */ - public ContentKeyAuthorizationPolicyInfo(EntryType entry, ContentKeyAuthorizationPolicyType content) { - super(entry, content); - } - - /** - * Get the content key authorization policy id. - * - * @return the id. - */ - public String getId() { - return getContent().getId(); - } - - /** - * Get the content key authorization policy name. - * - * @return the name. - */ - public String getName() { - return getContent().getName(); - } - - /** - * Get a link to the content key authorization policy's options - * - * @return the link to the content key authorization policy's options - */ - public LinkInfo getOptions() { - return this. getRelationLink("Options"); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOption.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOption.java deleted file mode 100644 index cd6b6479c000..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOption.java +++ /dev/null @@ -1,232 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.ArrayList; -import java.util.List; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyOptionType; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyRestrictionType; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate Access Policy entities. - * - */ -public final class ContentKeyAuthorizationPolicyOption { - - private static final String ENTITY_SET = "ContentKeyAuthorizationPolicyOptions"; - - private ContentKeyAuthorizationPolicyOption() { - } - - /** - * Creates an operation to create a new content key authorization options - * - * @param name - * Friendly name of the authorization policy - * @param keyDeliveryType - * Delivery method of the content key to the client - * @param keyDeliveryConfiguration - * Xml data, specific to the key delivery type that defines how - * the key is delivered to the client - * @param restrictions - * Requirements defined in each restriction must be met in order - * to deliver the key using the key delivery data - * @return The operation - */ - public static EntityCreateOperation create(String name, - int keyDeliveryType, String keyDeliveryConfiguration, - List restrictions) { - return new Creator(name, keyDeliveryType, keyDeliveryConfiguration, restrictions); - } - - private static class Creator extends EntityOperationSingleResultBase - implements EntityCreateOperation { - - private String name; - private int keyDeliveryType; - private String keyDeliveryConfiguration; - private List restrictions; - - public Creator(String name, int keyDeliveryType, String keyDeliveryConfiguration, - List restrictions) { - - super(ENTITY_SET, ContentKeyAuthorizationPolicyOptionInfo.class); - - this.name = name; - this.keyDeliveryType = keyDeliveryType; - this.keyDeliveryConfiguration = keyDeliveryConfiguration; - this.restrictions = new ArrayList(); - for (ContentKeyAuthorizationPolicyRestriction restriction : restrictions) { - this.restrictions.add(new ContentKeyAuthorizationPolicyRestrictionType().setName(restriction.getName()) - .setKeyRestrictionType(restriction.getKeyRestrictionType()) - .setRequirements(restriction.getRequirements())); - } - } - - @Override - public Object getRequestContents() { - return new ContentKeyAuthorizationPolicyOptionType().setName(name).setKeyDeliveryType(keyDeliveryType) - .setKeyDeliveryConfiguration(keyDeliveryConfiguration).setRestrictions(restrictions); - } - } - - /** - * - * - * Create an operation that will retrieve the given content key - * authorization policy option - * - * @param contentKeyAuthorizationPolicyOptionId - * id of content key authorization policy option to retrieve - * @return the operation - */ - public static EntityGetOperation get( - String contentKeyAuthorizationPolicyOptionId) { - return new DefaultGetOperation(ENTITY_SET, - contentKeyAuthorizationPolicyOptionId, ContentKeyAuthorizationPolicyOptionInfo.class); - } - - /** - * Create an operation that will list all the content keys authorization - * policy options at the given link. - * - * @param link - * Link to request content keys authorization policy options - * from. - * @return The list operation. - */ - public static DefaultListOperation list( - LinkInfo link) { - return new DefaultListOperation(link.getHref(), - new GenericType>() { - }); - } - - /** - * Create an operation that will retrieve all content key authorization - * policy options - * - * @return the operation - */ - - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation to delete the given content key authorization policy - * option - * - * @param contentKeyAuthorizationPolicyOptionId - * id of content key authorization policy option to delete - * @return the delete operation - */ - - public static EntityDeleteOperation delete(String contentKeyAuthorizationPolicyOptionId) { - return new DefaultDeleteOperation(ENTITY_SET, contentKeyAuthorizationPolicyOptionId); - } - - /** - * Create an operation that will update the given content key authorization policy option. - * - * @param contentKeyAuthorizationPolicyOptionId - * id of the acontent key authorization policy option to update - * @return the update operation - */ - public static Updater update(String contentKeyAuthorizationPolicyOptionId) { - return new Updater(contentKeyAuthorizationPolicyOptionId); - } - - /** - * The Class Updater. - */ - public static class Updater extends EntityOperationBase implements EntityUpdateOperation { - - private int keyDeliveryType; - private String keyDeliveryConfiguration; - private List restrictions; - - protected Updater(String contentKeyAuthorizationPolicyOptionId) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, - contentKeyAuthorizationPolicyOptionId)); - - } - - @Override - public Object getRequestContents() { - return new ContentKeyAuthorizationPolicyOptionType().setKeyDeliveryType(keyDeliveryType) - .setKeyDeliveryConfiguration(keyDeliveryConfiguration).setRestrictions(restrictions); - - } - - /** - * Set the protocol of the Asset Delivery Policy to be created. - * - * @param assetDeliveryProtocol - * The protocol - * @return The creator object (for call chaining) - */ - public Updater setKeyDeliveryType(int keyDeliveryType) { - this.keyDeliveryType = keyDeliveryType; - return this; - } - - /** - * Set the type of the Asset Delivery Policy to be created. - * - * @param assetDeliveryPolicyType - * The type - * @return The creator object (for call chaining) - */ - public Updater setKeyDeliveryConfiguration(String keyDeliveryConfiguration) { - this.keyDeliveryConfiguration = keyDeliveryConfiguration; - return this; - } - - /** - * Set the configuration of the Asset Delivery Policy to be created. - * - * @param assetDeliveryPolicyConfiguration - * The configuration - * @return The creator object (for call chaining) - */ - public Updater setRestrictions( - List restrictions) { - - this.restrictions = new ArrayList(); - for (ContentKeyAuthorizationPolicyRestriction restriction : restrictions) { - this.restrictions.add(new ContentKeyAuthorizationPolicyRestrictionType() - .setName(restriction.getName()) - .setKeyRestrictionType(restriction.getKeyRestrictionType()) - .setRequirements(restriction.getRequirements())); - } - return this; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOptionInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOptionInfo.java deleted file mode 100644 index 59b7ddd22b5a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOptionInfo.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.ArrayList; -import java.util.List; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyOptionType; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyRestrictionType; - -/** - * Type containing data about content key authorization policy options. - * - */ -public class ContentKeyAuthorizationPolicyOptionInfo extends ODataEntity { - - /** - * Creates a new {@link ContentKeyAuthorizationPolicyOptionInfo} wrapping - * the given ATOM entry and content objects. - * - * @param entry - * the entry - * @param content - * the content - */ - public ContentKeyAuthorizationPolicyOptionInfo(EntryType entry, ContentKeyAuthorizationPolicyOptionType content) { - super(entry, content); - } - - /** - * Get the access policy id. - * - * @return the id. - */ - public String getId() { - return getContent().getId(); - } - - /** - * Get the name. - * - * @return the name. - */ - public String getName() { - return getContent().getName(); - } - - /** - * Get the content key authorization policy options key delivery type. - * - * @return the key delivery type. - */ - public int getKeyDeliveryType() { - return getContent().getKeyDeliveryType(); - } - - /** - * Get the content key authorization policy options key delivery - * configuration. - * - * @return the key delivery configuration. - */ - public String getKeyDeliveryConfiguration() { - return getContent().getKeyDeliveryConfiguration(); - } - - /** - * Get the content key authorization policy options restrictions. - * - * @return the restrictions. - */ - public List getRestrictions() { - List result = new ArrayList(); - List restrictionsTypes = getContent().getRestrictions(); - - if (restrictionsTypes != null) { - for (ContentKeyAuthorizationPolicyRestrictionType restrictionType : restrictionsTypes) { - ContentKeyAuthorizationPolicyRestriction contentKeyAuthPolicyRestriction = new ContentKeyAuthorizationPolicyRestriction( - restrictionType.getName(), restrictionType.getKeyRestrictionType(), - restrictionType.getRequirements()); - result.add(contentKeyAuthPolicyRestriction); - } - } - - return result; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyRestriction.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyRestriction.java deleted file mode 100644 index 292d906edd6a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyRestriction.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -/** - * The Class ContentKeyAuthorizationPolicyRestriction. - */ -public class ContentKeyAuthorizationPolicyRestriction { - - public enum ContentKeyRestrictionType { - Open(0), - TokenRestricted(1), - IPRestricted(2); - - private final int value; - private ContentKeyRestrictionType(int value) { - this.value = value; - } - - public int getValue() { - return value; - } - - } - - private final String name; - - private final int keyRestrictionType; - - private final String requirements; - - /** - * Instantiates a new Content Key Authorization Policy Restriction - * - * @param name - * the name - * @param keyRestrictionType - * the keyRestrictionType - * @param requirements - * the requirements - */ - public ContentKeyAuthorizationPolicyRestriction(String name, int keyRestrictionType, String requirements) { - this.name = name; - this.keyRestrictionType = keyRestrictionType; - this.requirements = requirements; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return this.name; - } - - /** - * Gets the key restriction type. - * - * @return the key restriction type - */ - public int getKeyRestrictionType() { - return this.keyRestrictionType; - } - - /** - * Gets the requirements. - * - * @return the time requirements - */ - public String getRequirements() { - return this.requirements; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyDeliveryType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyDeliveryType.java deleted file mode 100644 index 60b00c6f3caa..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyDeliveryType.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Specifies the AssetDeliveryPolicyType. - */ -public enum ContentKeyDeliveryType { - - /** None. */ - None(0), - /** Use PlayReady License acquisition protocol. */ - PlayReadyLicense(1), - /** Use MPEG Baseline HTTP key protocol. */ - BaselineHttp(2), - /** Use Widevine license acquisition protocol. */ - Widevine(3), - /** Send FairPlay SPC to Key Delivery server and get CKC back */ - FairPlay(4); - - /** The AssetDeliveryPolicyType code. */ - private int contentKeyDeliveryType; - - /** - * Instantiates a new ContentKeyDeliveryType. - * - * @param contentKeyDeliveryType - * the ContentKeyDeliveryType code - */ - private ContentKeyDeliveryType(int contentKeyDeliveryType) { - this.contentKeyDeliveryType = contentKeyDeliveryType; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return contentKeyDeliveryType; - } - - /** - * Create an AssetDeliveryPolicyConfigurationKey instance based on the given integer. - * - * @param option - * the integer value of option - * @return The AssetDeliveryPolicyType - */ - public static ContentKeyDeliveryType fromCode(int option) { - switch (option) { - case 0: - return ContentKeyDeliveryType.None; - case 1: - return ContentKeyDeliveryType.PlayReadyLicense; - case 2: - return ContentKeyDeliveryType.BaselineHttp; - case 3: - return ContentKeyDeliveryType.Widevine; - case 4: - return ContentKeyDeliveryType.FairPlay; - default: - throw new InvalidParameterException("option"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfo.java deleted file mode 100644 index ec4666e646fe..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfo.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyRestType; - -/** - * The Class ContentKeyInfo. - */ -public class ContentKeyInfo extends ODataEntity { - - /** - * Instantiates a new content key info. - * - * @param entry - * the entry - * @param content - * the content - */ - public ContentKeyInfo(EntryType entry, ContentKeyRestType content) { - super(entry, content); - } - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return getContent().getId(); - } - - /** - * Gets the created. - * - * @return the created - */ - public Date getCreated() { - return getContent().getCreated(); - } - - /** - * Gets the last modified. - * - * @return the last modified - */ - public Date getLastModified() { - return getContent().getLastModified(); - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return getContent().getName(); - } - - /** - * Gets the check sum. - * - * @return the check sum - */ - public String getChecksum() { - return getContent().getChecksum(); - } - - /** - * Gets the protection key type. - * - * @return the protection key type - */ - public ProtectionKeyType getProtectionKeyType() { - return ProtectionKeyType.fromCode(getContent().getProtectionKeyType()); - } - - /** - * Gets the protection key id. - * - * @return the protection key id - */ - public String getProtectionKeyId() { - return getContent().getProtectionKeyId(); - } - - /** - * Gets the encrypted content key. - * - * @return the encrypted content key - */ - public String getEncryptedContentKey() { - return getContent().getEncryptedContentKey(); - } - - /** - * Gets the authorization policy id. - * - * @return the authorization policy id - */ - public String getAuthorizationPolicyId() { - return getContent().getAuthorizationPolicyId(); - } - - /** - * Gets the content key type. - * - * @return the content key type - */ - public ContentKeyType getContentKeyType() { - Integer contentKeyTypeInteger = getContent().getContentKeyType(); - ContentKeyType contentKeyType = null; - if (contentKeyTypeInteger != null) { - contentKeyType = ContentKeyType.fromCode(contentKeyTypeInteger); - } - return contentKeyType; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyType.java deleted file mode 100644 index fbb6542cbad0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyType.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * - * Specifies the type of a content key. - * - */ -public enum ContentKeyType { - - /** The Common encryption. */ - CommonEncryption(0), - /** The Storage encryption. */ - StorageEncryption(1), - /** The Configuration encryption. */ - ConfigurationEncryption(2), - /** The Envelope encryption. */ - EnvelopeEncryption(4), - /** Specifies a content key for common encryption with CBCS. */ - CommonEncryptionCbcs(6), - /** Application Secret key for FairPlay. */ - FairPlayASk (7), - /** Password for FairPlay application certificate. */ - FairPlayPfxPassword (8); - - /** The content key type code. */ - private int contentKeyTypeCode; - - /** - * Instantiates a new content key type. - * - * @param contentKeyTypeCode - * the content key type code - */ - private ContentKeyType(int contentKeyTypeCode) { - this.contentKeyTypeCode = contentKeyTypeCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return contentKeyTypeCode; - } - - /** - * From code. - * - * @param code - * the code - * @return the content key type - */ - public static ContentKeyType fromCode(int code) { - switch (code) { - case 0: - return ContentKeyType.CommonEncryption; - case 1: - return ContentKeyType.StorageEncryption; - case 2: - return ContentKeyType.ConfigurationEncryption; - case 4: - return ContentKeyType.EnvelopeEncryption; - case 6: - return ContentKeyType.CommonEncryptionCbcs; - case 7: - return ContentKeyType.FairPlayASk; - case 8: - return ContentKeyType.FairPlayPfxPassword; - default: - throw new InvalidParameterException("code"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnit.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnit.java deleted file mode 100644 index b4e2824fe884..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnit.java +++ /dev/null @@ -1,139 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.net.URI; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityProxyData; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.EncodingReservedUnitRestType; - -/** - * Class for updating EncodingReservedUnitTypes - * - */ -public final class EncodingReservedUnit { - - private static final String ENTITY_SET = "EncodingReservedUnitTypes"; - - private EncodingReservedUnit() { - } - - /** - * Get the EncodingReservedUnitTypes - * - * @return the operation - */ - public static EntityGetOperation get() { - return new DefaultGetOperation(ENTITY_SET, - EncodingReservedUnitInfo.class); - } - - /** - * Update the EncodingReservedUnitTypes - * @param encodingReservedUnitInfo - * - * @return the update operation - */ - public static Updater update(EncodingReservedUnitInfo encodingReservedUnitInfo) { - return new Updater(encodingReservedUnitInfo); - } - - /** - * The Class Updater. - */ - public static class Updater extends EntityOperationBase implements - EntityUpdateOperation { - - private int reservedUnitType; - private int currentReservedUnits; - - /** - * Instantiates a new updater. - * @param encodingReservedUnitInfo - * - * @param assetId - * the asset id - */ - protected Updater(final EncodingReservedUnitInfo encodingReservedUnitInfo) { - super(new EntityUriBuilder() { - @Override - public String getUri() { - URI uri = URI.create(String.format("%s(guid'%s')", ENTITY_SET, - encodingReservedUnitInfo.getAccountId())); - return uri.toString(); - } - }); - this.setReservedUnitType(encodingReservedUnitInfo.getReservedUnitType()); - this.setCurrentReservedUnits(encodingReservedUnitInfo.getCurrentReservedUnits()); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media - * .entityoperations.EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - // Deliberately empty - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityUpdateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - EncodingReservedUnitRestType encodingReservedUnitType = new EncodingReservedUnitRestType(); - encodingReservedUnitType.setAccountId(null); // never send account Id - encodingReservedUnitType.setCurrentReservedUnits(currentReservedUnits); - encodingReservedUnitType.setReservedUnitType(reservedUnitType); - return encodingReservedUnitType; - } - - /** - * Sets new quantity of reserved units. - * - * @param currentReservedUnits - * the new quantity of reserved units. - * @return Updater instance - */ - public Updater setCurrentReservedUnits(int currentReservedUnits) { - this.currentReservedUnits = currentReservedUnits; - return this; - } - - /** - * Sets new reserved units type. - * - * @param encodingReservedUnitType - * the new quantity of reserved units. - * @return Updater instance - */ - public Updater setReservedUnitType(EncodingReservedUnitType encodingReservedUnitType) { - this.reservedUnitType = encodingReservedUnitType.getCode(); - return this; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnitInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnitInfo.java deleted file mode 100644 index 81436e6a59c8..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnitInfo.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.EncodingReservedUnitRestType; - -/** - * Type containing data about access policies. - * - */ -public class EncodingReservedUnitInfo extends ODataEntity { - - /** - * Creates a new {@link EncodingReservedUnitInfo} wrapping the given ATOM entry and - * content objects. - * - * @param entry - * Entry containing this AccessPolicy data - * @param content - * Content with the AccessPolicy data - */ - public EncodingReservedUnitInfo(EntryType entry, EncodingReservedUnitRestType content) { - super(entry, content); - } - /** - * @return the accountId - */ - public String getAccountId() { - return getContent().getAccountId(); - } - - /** - * @return the reservedUnitType - */ - public EncodingReservedUnitType getReservedUnitType() { - return EncodingReservedUnitType.fromCode(getContent().getReservedUnitType()); - } - - /** - * @return the maxReservableUnits - */ - public int getMaxReservableUnits() { - return getContent().getMaxReservableUnits(); - } - - /** - * @return the currentReservedUnits - */ - public int getCurrentReservedUnits() { - return getContent().getCurrentReservedUnits(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnitType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnitType.java deleted file mode 100644 index 6e7b24194d17..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnitType.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Specifies the types of Encoding Reserved Units. - */ -public enum EncodingReservedUnitType { - - /** The Basic. */ - Basic(0), - /** The Standard. */ - Standard (1), - /** The Premium . */ - Premium (2); - - /** The Encoding Reserved Unit type code. */ - private int encodingReservedUnitType; - - /** - * Instantiates a new asset state. - * - * @param encodingReservedUnitType - * the EncodingReservedUnitType code - */ - private EncodingReservedUnitType(int encodingReservedUnitType) { - this.encodingReservedUnitType = encodingReservedUnitType; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return encodingReservedUnitType; - } - - /** - * Create an EncodingReservedUnitType instance from the corresponding int. - * - * @param type - * type as integer - * @return new EncodingReservedUnitType instance - */ - public static EncodingReservedUnitType fromCode(int state) { - switch (state) { - case 0: - return EncodingReservedUnitType.Basic; - case 1: - return EncodingReservedUnitType.Standard; - case 2: - return EncodingReservedUnitType.Premium; - default: - throw new InvalidParameterException("state"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EndPointType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EndPointType.java deleted file mode 100644 index 9a135b1645a8..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EndPointType.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Enum defining the type of the end point. - */ -public enum EndPointType { - - /** Azure Queue. */ - AzureQueue(1); - - /** The code. */ - private int code; - - /** - * Instantiates a new end point type. - * - * @param code - * the code - */ - private EndPointType(int code) { - this.code = code; - } - - /** - * Get integer code corresponding to enum value. - * - * @return the code - */ - public int getCode() { - return code; - } - - /** - * Convert code into enum value. - * - * @param code - * the code - * @return the corresponding enum value - */ - public static EndPointType fromCode(int code) { - switch (code) { - case 1: - return AzureQueue; - default: - throw new InvalidParameterException("code"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ErrorDetail.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ErrorDetail.java deleted file mode 100644 index 7d3b9344bdf6..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ErrorDetail.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -/** - * The Class ErrorDetail. - */ -public class ErrorDetail { - - /** The code. */ - private final String code; - - /** The message. */ - private final String message; - - /** - * Instantiates a new error detail. - * - * @param code - * the code - * @param message - * the message - */ - public ErrorDetail(String code, String message) { - this.code = code; - this.message = message; - } - - /** - * Gets the code. - * - * @return the code - */ - public String getCode() { - return this.code; - } - - /** - * Gets the message. - * - * @return the message - */ - public String getMessage() { - return this.message; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Ipv4.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Ipv4.java deleted file mode 100644 index e2889f30d29d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Ipv4.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import org.codehaus.jackson.annotate.JsonProperty; - -/** - * The Class Ipv4. - */ -public class Ipv4 { - - /** The name. */ - private String name; - - /** The ip. */ - private String ip; - - /** - * Gets the name. - * - * @return the name - */ - @JsonProperty("Name") - public String getName() { - return this.name; - } - - @JsonProperty("Name") - public Ipv4 setName(String name) { - this.name = name; - return this; - } - - /** - * Gets the ip. - * - * @return the ip - */ - @JsonProperty("IP") - public String getIp() { - return this.ip; - } - - @JsonProperty("IP") - public Ipv4 setIp(String ip) { - this.ip = ip; - return this; - } -} \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Job.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Job.java deleted file mode 100644 index 7e97528703ea..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Job.java +++ /dev/null @@ -1,487 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.io.IOException; -import java.net.URI; -import java.util.ArrayList; -import java.util.List; - -import javax.mail.MessagingException; -import javax.mail.internet.MimeMultipart; -import javax.ws.rs.core.MediaType; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.ParserConfigurationException; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityBatchOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.implementation.MediaBatchOperations; -import com.microsoft.windowsazure.services.media.implementation.content.JobNotificationSubscriptionType; -import com.microsoft.windowsazure.services.media.implementation.content.JobType; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate Job entities. - * - */ -public final class Job { - - /** The Constant ENTITY_SET. */ - private static final String ENTITY_SET = "Jobs"; - - // Prevent instantiation - /** - * Instantiates a new job. - */ - private Job() { - } - - /** - * Creates an operation to create a new job. - * - * @return the creator - */ - public static Creator create() { - return new Creator(); - } - - /** - * The Class Creator. - */ - public static class Creator extends - EntityOperationSingleResultBase implements - EntityCreateOperation { - - /** The name. */ - private String name; - - /** The priority. */ - private Integer priority; - - /** The input media assets. */ - private final List inputMediaAssets; - - /** The content type. */ - private MediaType contentType; - - /** The task create batch operations. */ - private final List taskCreateBatchOperations; - - /** The fresh. */ - private Boolean fresh; - - /** The mime multipart. */ - private MimeMultipart mimeMultipart;; - - /** The media batch operations. */ - private MediaBatchOperations mediaBatchOperations; - - /** The job notification subscriptions. */ - private final List jobNotificationSubscriptions = new ArrayList(); - - /** - * Builds the mime multipart. - * - * @param serviceUri - * the service uri - */ - private void buildMimeMultipart(URI serviceUri) { - mediaBatchOperations = null; - CreateBatchOperation createJobBatchOperation = CreateBatchOperation - .create(serviceUri, this); - - try { - mediaBatchOperations = new MediaBatchOperations(serviceUri); - } catch (JAXBException e) { - throw new RuntimeException(e); - } catch (ParserConfigurationException e) { - throw new RuntimeException(e); - } - - mediaBatchOperations.addOperation(createJobBatchOperation); - for (Task.CreateBatchOperation taskCreateBatchOperation : taskCreateBatchOperations) { - mediaBatchOperations.addOperation(taskCreateBatchOperation); - } - - try { - mimeMultipart = mediaBatchOperations.getMimeMultipart(); - } catch (MessagingException e) { - throw new RuntimeException(e); - } catch (IOException e) { - throw new RuntimeException(e); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - - this.contentType = mediaBatchOperations.getContentType(); - this.fresh = false; - } - - /** - * Instantiates a new creator. - * - */ - public Creator() { - super(ENTITY_SET, JobInfo.class); - this.inputMediaAssets = new ArrayList(); - this.taskCreateBatchOperations = new ArrayList(); - this.fresh = true; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityCreateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() throws ServiceException { - if (fresh) { - buildMimeMultipart(getProxyData().getServiceUri()); - } - return mimeMultipart; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperationSingleResultBase#getResponseClass() - */ - @Override - public Class getResponseClass() { - return ClientResponse.class; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityCreateOperation#processResponse(java.lang.Object) - */ - @Override - public Object processResponse(Object clientResponse) - throws ServiceException { - try { - this.mediaBatchOperations - .parseBatchResult((ClientResponse) clientResponse); - } catch (IOException e) { - throw new ServiceException(e); - } - JobInfo jobInfo = null; - for (EntityBatchOperation entityBatchOperation : this.mediaBatchOperations - .getOperations()) { - if (entityBatchOperation instanceof Job.CreateBatchOperation) { - jobInfo = ((Job.CreateBatchOperation) entityBatchOperation) - .getJobInfo(); - break; - } - } - return jobInfo; - - } - - /** - * Adds the task creator. - * - * @param taskCreateBatchOperation - * the task create batch operation - * @return the creator - */ - public Creator addTaskCreator( - Task.CreateBatchOperation taskCreateBatchOperation) { - this.taskCreateBatchOperations.add(taskCreateBatchOperation); - this.fresh = true; - return this; - } - - /** - * Set the name of the job to be created. - * - * @param name - * The name - * @return The creator object (for call chaining) - */ - public Creator setName(String name) { - this.name = name; - this.fresh = true; - return this; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return this.name; - } - - /** - * Sets the priority. - * - * @param priority - * the priority - * @return the creator - */ - public Creator setPriority(Integer priority) { - this.priority = priority; - this.fresh = true; - return this; - } - - /** - * Gets the priority. - * - * @return the priority - */ - public Integer getPriority() { - return this.priority; - } - - /** - * Gets the input media assets. - * - * @return the input media assets - */ - public List getInputMediaAssets() { - return inputMediaAssets; - } - - /** - * Gets the task creators. - * - * @return the task creators - */ - public List getTaskCreators() { - return this.taskCreateBatchOperations; - } - - /** - * Adds the input media asset. - * - * @param assetId - * the asset id - * @return the creator - */ - public Creator addInputMediaAsset(String assetId) { - this.inputMediaAssets.add(assetId); - this.fresh = true; - return this; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperationBase#getContentType() - */ - @Override - public MediaType getContentType() { - if (fresh) { - buildMimeMultipart(getProxyData().getServiceUri()); - } - return this.contentType; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperationBase#getUri() - */ - @Override - public String getUri() { - return "$batch"; - } - - /** - * Adds the job notification subscription. - * - * @param jobNotificationSubscription - * the job notification subscription - * @return the creator - */ - public Creator addJobNotificationSubscription( - JobNotificationSubscription jobNotificationSubscription) { - this.jobNotificationSubscriptions.add(jobNotificationSubscription); - this.fresh = true; - return this; - } - - /** - * Gets the job notification subscription. - * - * @return the job notification subscription - */ - public List getJobNotificationSubscription() { - return this.jobNotificationSubscriptions; - } - } - - /** - * The Class CreateBatchOperation. - */ - public static class CreateBatchOperation extends EntityBatchOperation { - - /** The service uri. */ - private final URI serviceUri; - - /** The job info. */ - private JobInfo jobInfo; - - /** - * Instantiates a new creates the batch operation. - * - * @param serviceUri - * the service uri - */ - public CreateBatchOperation(URI serviceUri) { - this.serviceUri = serviceUri; - this.setVerb("POST"); - } - - /** - * Creates the. - * - * @param serviceUri - * the service uri - * @param creator - * the creator - * @return the creates the batch operation - */ - public static CreateBatchOperation create(URI serviceUri, - Creator creator) { - CreateBatchOperation createBatchOperation = new CreateBatchOperation( - serviceUri); - - JobType jobType = new JobType(); - jobType.setName(creator.getName()); - jobType.setPriority(creator.getPriority()); - for (JobNotificationSubscription jobNotificationSubscription : creator - .getJobNotificationSubscription()) { - JobNotificationSubscriptionType jobNotificationSubscriptionType = new JobNotificationSubscriptionType(); - jobNotificationSubscriptionType - .setNotificationEndPointId(jobNotificationSubscription - .getNotificationEndPointId()); - jobNotificationSubscriptionType - .setTargetJobState(jobNotificationSubscription - .getTargetJobState().getCode()); - jobType.addJobNotificationSubscriptionType(jobNotificationSubscriptionType); - } - - for (String inputMediaAsset : creator.getInputMediaAssets()) { - createBatchOperation - .addLink( - "InputMediaAssets", - String.format("%s/Assets('%s')", - createBatchOperation.getServiceUri() - .toString(), inputMediaAsset), - "application/atom+xml;type=feed", - "http://schemas.microsoft.com/ado/2007/08/dataservices/related/InputMediaAssets"); - } - createBatchOperation.addContentObject(jobType); - return createBatchOperation; - } - - /** - * Gets the service uri. - * - * @return the service uri - */ - public URI getServiceUri() { - return this.serviceUri; - } - - /** - * Sets the job info. - * - * @param jobInfo - * the job info - * @return the creates the batch operation - */ - public CreateBatchOperation setJobInfo(JobInfo jobInfo) { - this.jobInfo = jobInfo; - return this; - } - - /** - * Gets the job info. - * - * @return the job info - */ - public JobInfo getJobInfo() { - return this.jobInfo; - } - - } - - /** - * Create an operation object that will get the state of the given job. - * - * @param jobId - * id of job to retrieve - * @return the get operation - */ - public static EntityGetOperation get(String jobId) { - return new DefaultGetOperation(ENTITY_SET, jobId, - JobInfo.class); - } - - /** - * Create an operation that will list all the jobs. - * - * @return The list operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation to delete the given job. - * - * @param jobId - * id of job to delete - * @return the delete operation - */ - public static EntityDeleteOperation delete(String jobId) { - return new DefaultDeleteOperation(ENTITY_SET, jobId); - } - - /** - * Cancel. - * - * @param jobId - * the job id - * @return the entity action operation - */ - public static EntityActionOperation cancel(String jobId) { - return new DefaultActionOperation("CancelJob").addQueryParameter( - "jobId", String.format("'%s'", jobId)); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobInfo.java deleted file mode 100644 index ad8948b05676..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobInfo.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; -import java.util.List; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.JobNotificationSubscriptionType; -import com.microsoft.windowsazure.services.media.implementation.content.JobType; - -/** - * The Class JobInfo. - */ -public class JobInfo extends ODataEntity { - - /** - * Instantiates a new job info. - * - * @param entry - * the entry - * @param content - * the content - */ - public JobInfo(EntryType entry, JobType content) { - super(entry, content); - } - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return getContent().getId(); - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return getContent().getName(); - } - - /** - * Gets the created. - * - * @return the created - */ - public Date getCreated() { - return getContent().getCreated(); - } - - /** - * Gets the last modified. - * - * @return the last modified - */ - public Date getLastModified() { - return getContent().getLastModified(); - } - - /** - * Gets the end time. - * - * @return the end time - */ - public Date getEndTime() { - return getContent().getEndTime(); - } - - /** - * Gets the priority. - * - * @return the priority - */ - public int getPriority() { - return getContent().getPriority(); - } - - /** - * Gets the running duration. - * - * @return the running duration - */ - public double getRunningDuration() { - return getContent().getRunningDuration(); - } - - /** - * Gets the start time. - * - * @return the start time - */ - public Date getStartTime() { - return getContent().getStartTime(); - } - - /** - * Gets the state. - * - * @return the state - */ - public JobState getState() { - return JobState.fromCode(getContent().getState()); - } - - /** - * Gets the template id. - * - * @return the template id - */ - public String getTemplateId() { - return getContent().getTemplateId(); - } - - /** - * Get a link which, when listed, will return the input assets for the job. - * - * @return Link if found, null if not. - */ - public LinkInfo getInputAssetsLink() { - return this. getRelationLink("InputMediaAssets"); - } - - /** - * Get a link which, when listed, will return the output assets for the job. - * - * @return Link if found, null if not. - */ - public LinkInfo getOutputAssetsLink() { - return this. getRelationLink("OutputMediaAssets"); - } - - /** - * Gets the tasks link. - * - * @return the tasks link - */ - public LinkInfo getTasksLink() { - return this. getRelationLink("Tasks"); - } - - /** - * Gets the job notification subscriptions. - * - * @return the job notification subscriptions - */ - public List getJobNotificationSubscriptions() { - return JobNotificationSubscriptionListFactory.create(getContent() - .getJobNotificationSubscriptionTypes()); - } - - /** - * Adds the job notification subscription. - * - * @param jobNotificationSubscription - * the job notification subscription - * @return the job info - */ - public JobInfo addJobNotificationSubscription( - JobNotificationSubscription jobNotificationSubscription) { - getContent().addJobNotificationSubscriptionType( - new JobNotificationSubscriptionType() - .setNotificationEndPointId( - jobNotificationSubscription - .getNotificationEndPointId()) - .setTargetJobState( - jobNotificationSubscription.getTargetJobState() - .getCode())); - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobNotificationSubscription.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobNotificationSubscription.java deleted file mode 100644 index 9e5360a9344c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobNotificationSubscription.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -/** - * The Class JobNotificationSubscription. - */ -public class JobNotificationSubscription { - - /** The notification end point id. */ - private final String notificationEndPointId; - - /** The target job state. */ - private final TargetJobState targetJobState; - - /** - * Instantiates a new job notification subscription. - * - * @param uuid - * the notification end point id - * @param targetJobState - * the target job state - */ - public JobNotificationSubscription(String notificationEndPointId, - TargetJobState targetJobState) { - this.notificationEndPointId = notificationEndPointId; - this.targetJobState = targetJobState; - } - - /** - * Gets the notification end point. - * - * @return the code - */ - public String getNotificationEndPointId() { - return this.notificationEndPointId; - } - - /** - * Gets the message. - * - * @return the message - */ - public TargetJobState getTargetJobState() { - return this.targetJobState; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobNotificationSubscriptionListFactory.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobNotificationSubscriptionListFactory.java deleted file mode 100644 index 86006d630148..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobNotificationSubscriptionListFactory.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.ArrayList; -import java.util.List; - -import com.microsoft.windowsazure.services.media.implementation.content.JobNotificationSubscriptionType; - -/** - * The Class JobNotificationSubscription factory. - */ -public abstract class JobNotificationSubscriptionListFactory { - - public static List create( - List jobNotificationSubscriptionTypeList) { - if (jobNotificationSubscriptionTypeList == null) { - throw new IllegalArgumentException( - "The jobNotificationSubscriptionTypeList cannot be null."); - } - List jobNotificationSubscriptionList = new ArrayList(); - for (JobNotificationSubscriptionType jobNotificationSubscriptionType : jobNotificationSubscriptionTypeList) { - jobNotificationSubscriptionList - .add(new JobNotificationSubscription( - jobNotificationSubscriptionType - .getNotificationEndPointId(), - TargetJobState - .fromCode(jobNotificationSubscriptionType - .getTargetJobState()))); - } - return jobNotificationSubscriptionList; - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobState.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobState.java deleted file mode 100644 index b1edbc7e1d23..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobState.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * The Enum JobState. - */ -public enum JobState { - /** The Queued. */ - Queued(0), - - /** The Scheduled. */ - Scheduled(1), - - /** The Processing. */ - Processing(2), - - /** The Finished. */ - Finished(3), - - /** The Error. */ - Error(4), - - /** The Canceled. */ - Canceled(5), - - /** The Canceling. */ - Canceling(6); - - /** The job state code. */ - private int jobStateCode; - - /** - * Instantiates a new job state. - * - * @param jobStateCode - * the job state code - */ - private JobState(int jobStateCode) { - this.jobStateCode = jobStateCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return this.jobStateCode; - } - - /** - * From code. - * - * @param jobStateCode - * the job state code - * @return the job state - */ - public static JobState fromCode(int jobStateCode) { - switch (jobStateCode) { - case 0: - return JobState.Queued; - case 1: - return JobState.Scheduled; - case 2: - return JobState.Processing; - case 3: - return JobState.Finished; - case 4: - return JobState.Error; - case 5: - return JobState.Canceled; - case 6: - return JobState.Canceling; - default: - throw new InvalidParameterException("jobStateCode"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LinkInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LinkInfo.java deleted file mode 100644 index 7ffac5539bb0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LinkInfo.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.LinkType; - -/** - * Provides access to OData links - * - */ -public class LinkInfo> { - private final LinkType rawLink; - - /** - * Construct a new {@link LinkInfo} instance - */ - public LinkInfo(LinkType rawLink) { - this.rawLink = rawLink; - } - - /** - * Get link href - * - * @return the href - */ - public String getHref() { - return rawLink.getHref(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ListResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ListResult.java deleted file mode 100644 index c60001afd701..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ListResult.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; - -/** - * Wrapper class for all returned lists from Media Services - * - */ -public class ListResult implements List { - - private final List contents; - - public ListResult(Collection contentList) { - contents = Collections.unmodifiableList(new ArrayList(contentList)); - } - - @Override - public boolean add(T element) { - return contents.add(element); - } - - @Override - public void add(int index, T element) { - contents.add(index, element); - } - - @Override - public boolean addAll(Collection c) { - return contents.addAll(c); - } - - @Override - public boolean addAll(int index, Collection c) { - return contents.addAll(index, c); - } - - @Override - public void clear() { - contents.clear(); - } - - @Override - public boolean contains(Object object) { - return contents.contains(object); - } - - @Override - public boolean containsAll(Collection c) { - return contents.containsAll(c); - } - - @Override - public T get(int index) { - return contents.get(index); - } - - @Override - public int indexOf(Object object) { - return contents.indexOf(object); - } - - @Override - public boolean isEmpty() { - return contents.isEmpty(); - } - - @Override - public Iterator iterator() { - return contents.iterator(); - } - - @Override - public int lastIndexOf(Object object) { - return contents.lastIndexOf(object); - } - - @Override - public ListIterator listIterator() { - return contents.listIterator(); - } - - @Override - public ListIterator listIterator(int index) { - return contents.listIterator(index); - - } - - @Override - public boolean remove(Object o) { - return contents.remove(o); - } - - @Override - public T remove(int index) { - return contents.remove(index); - } - - @Override - public boolean removeAll(Collection c) { - return contents.removeAll(c); - } - - @Override - public boolean retainAll(Collection c) { - return contents.retainAll(c); - } - - @Override - public T set(int index, T element) { - return contents.set(index, element); - } - - @Override - public int size() { - return contents.size(); - } - - @Override - public List subList(int fromIndex, int toIndex) { - return contents.subList(fromIndex, toIndex); - } - - @Override - public Object[] toArray() { - return contents.toArray(); - } - - @Override - public U[] toArray(U[] a) { - return contents.toArray(a); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Locator.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Locator.java deleted file mode 100644 index 11402e7e0b74..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Locator.java +++ /dev/null @@ -1,303 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityProxyData; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.LocatorRestType; -import com.sun.jersey.api.client.GenericType; - -/** - * Implementation of Locator entity. - */ -public final class Locator { - - /** The Constant ENTITY_SET. */ - private static final String ENTITY_SET = "Locators"; - - /** - * Instantiates a new locator. - */ - private Locator() { - } - - /** - * Create an operation to create a new locator entity. - * - * @param accessPolicyId - * id of access policy for locator - * @param assetId - * id of asset for locator - * @param locatorType - * locator type - * @return the operation - */ - public static Creator create(String accessPolicyId, String assetId, - LocatorType locatorType) { - return new Creator(accessPolicyId, assetId, locatorType); - } - - /** - * The Class Creator. - */ - public static class Creator extends - EntityOperationSingleResultBase implements - EntityCreateOperation { - - /** The access policy id. */ - private final String accessPolicyId; - - /** The asset id. */ - private final String assetId; - - /** The base uri. */ - private String baseUri; - - /** The content access token. */ - private String contentAccessComponent; - - /** The locator type. */ - private final LocatorType locatorType; - - /** The path. */ - private String path; - - /** The start date time. */ - private Date startDateTime; - - /** The id. */ - private String id; - - /** - * Instantiates a new creator. - * - * @param accessPolicyId - * the access policy id - * @param assetId - * the asset id - * @param locatorType - * the locator type - */ - protected Creator(String accessPolicyId, String assetId, - LocatorType locatorType) { - super(ENTITY_SET, LocatorInfo.class); - this.accessPolicyId = accessPolicyId; - this.assetId = assetId; - this.locatorType = locatorType; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityCreateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - return new LocatorRestType().setId(id) - .setAccessPolicyId(accessPolicyId).setAssetId(assetId) - .setStartTime(startDateTime).setType(locatorType.getCode()) - .setBaseUri(baseUri) - .setContentAccessComponent(contentAccessComponent) - .setPath(path); - } - - /** - * Sets the base uri. - * - * @param baseUri - * the base uri - * @return the creator - */ - public Creator setBaseUri(String baseUri) { - this.baseUri = baseUri; - return this; - } - - /** - * Sets the path. - * - * @param path - * the path - * @return the creator - */ - public Creator setPath(String path) { - this.path = path; - return this; - } - - /** - * Set the date and time for when the locator starts to be available. - * - * @param startDateTime - * The date/time - * @return The creator instance (for function chaining) - */ - public Creator setStartDateTime(Date startDateTime) { - this.startDateTime = startDateTime; - return this; - } - - /** - * Sets the content access component. - * - * @param contentAccessComponent - * the content access component - * @return The creator instance - */ - public Creator setContentAccessComponent(String contentAccessComponent) { - this.contentAccessComponent = contentAccessComponent; - return this; - } - - /** - * Sets the id. - * - * @param id - * the id - * @return the entity creation operation - */ - public EntityCreateOperation setId(String id) { - this.id = id; - return this; - } - } - - /** - * Create an operation to get the given locator. - * - * @param locatorId - * id of locator to retrieve - * @return the get operation - */ - public static EntityGetOperation get(String locatorId) { - return new DefaultGetOperation(ENTITY_SET, locatorId, - LocatorInfo.class); - } - - /** - * Create an operation to list all locators. - * - * @return the list operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation that will list all the locators at the given link. - * - * @param link - * Link to request locators from. - * @return The list operation. - */ - public static DefaultListOperation list( - LinkInfo link) { - return new DefaultListOperation(link.getHref(), - new GenericType>() { - }); - } - - /** - * Create an operation to update the given locator. - * - * @param locatorId - * id of locator to update - * @return the update operation - */ - public static Updater update(String locatorId) { - return new Updater(locatorId); - } - - /** - * The Class Updater. - */ - public static class Updater extends EntityOperationBase implements - EntityUpdateOperation { - - /** The start date time. */ - private Date startDateTime; - - /** - * Instantiates a new updater. - * - * @param locatorId - * the locator id - */ - public Updater(String locatorId) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, - locatorId)); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityUpdateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - return new LocatorRestType().setStartTime(startDateTime); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media - * .entityoperations.EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - // Deliberately empty - } - - /** - * Set when the locator will become available. - * - * @param startDateTime - * the date & time - * @return Updater instance - */ - public Updater setStartDateTime(Date startDateTime) { - this.startDateTime = startDateTime; - return this; - } - } - - /** - * Create an operation to delete the given locator. - * - * @param locatorId - * id of locator to delete - * @return the operation - */ - public static EntityDeleteOperation delete(String locatorId) { - return new DefaultDeleteOperation(ENTITY_SET, locatorId); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LocatorInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LocatorInfo.java deleted file mode 100644 index 79b6775bcb60..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LocatorInfo.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.LocatorRestType; - -/** - * The Class LocatorInfo. - */ -public class LocatorInfo extends ODataEntity { - - /** - * Instantiates a new locator info. - * - * @param entry - * the entry - * @param content - * the content - */ - public LocatorInfo(EntryType entry, LocatorRestType content) { - super(entry, content); - } - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return getContent().getId(); - } - - /** - * Gets the expiration date time. - * - * @return the expiration date time - */ - public Date getExpirationDateTime() { - return getContent().getExpirationDateTime(); - } - - /** - * Gets the locator type. - * - * @return the locator type - */ - public LocatorType getLocatorType() { - return LocatorType.fromCode(getContent().getType()); - } - - /** - * Gets the path. - * - * @return the path - */ - public String getPath() { - return getContent().getPath(); - } - - /** - * Gets the access policy id. - * - * @return the access policy id - */ - public String getAccessPolicyId() { - return getContent().getAccessPolicyId(); - } - - /** - * Gets the asset id. - * - * @return the asset id - */ - public String getAssetId() { - return getContent().getAssetId(); - } - - /** - * Gets the start time. - * - * @return the start time - */ - public Date getStartTime() { - return getContent().getStartTime(); - } - - /** - * Gets the base uri. - * - * @return the base uri - */ - public String getBaseUri() { - return getContent().getBaseUri(); - } - - /** - * Gets the content access token. - * - * @return the content access token - */ - public String getContentAccessToken() { - return this.getContent().getContentAccessComponent(); - } - - /** - * Return a link that gets this locator's access policy - * - * @return the link - */ - public LinkInfo getAccessPolicyLink() { - return this. getRelationLink("AccessPolicy"); - } - - /** - * Return a link that gets this locator's asset - * - * @return the link - */ - public LinkInfo getAssetLink() { - return this. getRelationLink("Asset"); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LocatorType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LocatorType.java deleted file mode 100644 index 4fa6409e72b3..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LocatorType.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * The Enum LocatorType. - */ -public enum LocatorType { - - /** The None. */ - None(0), - /** The sas. */ - SAS(1), - /** The Origin. */ - OnDemandOrigin(2); - - /** The locator type code. */ - private int locatorTypeCode; - - /** - * Instantiates a new locator type. - * - * @param locatorTypeCode - * the locator type code - */ - private LocatorType(int locatorTypeCode) { - this.locatorTypeCode = locatorTypeCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return this.locatorTypeCode; - } - - /** - * From code. - * - * @param type - * the type - * @return the locator type - */ - public static LocatorType fromCode(int type) { - switch (type) { - case 0: - return LocatorType.None; - case 1: - return LocatorType.SAS; - case 2: - return LocatorType.OnDemandOrigin; - default: - throw new InvalidParameterException("type"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/MediaProcessor.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/MediaProcessor.java deleted file mode 100644 index adc6186c2694..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/MediaProcessor.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.sun.jersey.api.client.GenericType; - -/** - * Entity operations for Media processors - * - */ -public final class MediaProcessor { - - private static final String ENTITY_SET = "MediaProcessors"; - - private MediaProcessor() { - } - - /** - * Create an operation to list all Media processors - * - * @return the list operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/MediaProcessorInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/MediaProcessorInfo.java deleted file mode 100644 index 9f3a0df22bcb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/MediaProcessorInfo.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.MediaProcessorType; - -/** - * Data about a Media Processor entity. - * - */ -public class MediaProcessorInfo extends ODataEntity { - - /** - * Instantiates a new media processor info. - * - * @param entry - * the entry - * @param content - * the content - */ - public MediaProcessorInfo(EntryType entry, MediaProcessorType content) { - super(entry, content); - } - - /** - * Get the asset id. - * - * @return the id - */ - public String getId() { - return getContent().getId(); - } - - /** - * Get the asset name. - * - * @return the name - */ - public String getName() { - return this.getContent().getName(); - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return this.getContent().getDescription(); - } - - /** - * Gets the sku. - * - * @return the sku - */ - public String getSku() { - return this.getContent().getSku(); - } - - /** - * Gets the vendor. - * - * @return the vendor - */ - public String getVendor() { - return this.getContent().getVendor(); - } - - /** - * Gets the version. - * - * @return the version - */ - public String getVersion() { - return this.getContent().getVersion(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPoint.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPoint.java deleted file mode 100644 index 7226b842db24..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPoint.java +++ /dev/null @@ -1,181 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.NotificationEndPointType; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate notification end point entities. - * - */ -public final class NotificationEndPoint { - - private static final String ENTITY_SET = "NotificationEndPoints"; - - private NotificationEndPoint() { - } - - /** - * Creates an operation to create a new notification end point. - * - * @param name - * name of the notification end point. - * @param endPointType - * the type of the notification end point. - * @param endPointAddress - * the address of the end point. - * @return The operation - */ - public static EntityCreateOperation create( - String name, EndPointType endPointType, String endPointAddress) { - return new Creator(name, endPointType, endPointAddress); - } - - public static class Creator extends - EntityOperationSingleResultBase implements - EntityCreateOperation { - private final String name; - private final EndPointType endPointType; - private final String endPointAddress; - - public Creator(String name, EndPointType endPointType, - String endPointAddress) { - - super(ENTITY_SET, NotificationEndPointInfo.class); - - this.name = name; - this.endPointType = endPointType; - this.endPointAddress = endPointAddress; - } - - @Override - public Object getRequestContents() { - return new NotificationEndPointType().setName(name) - .setEndPointType(endPointType.getCode()) - .setEndPointAddress(endPointAddress); - } - } - - /** - * Create an operation that will retrieve the given notification end point - * - * @param notificationEndPointId - * id of notification end point to retrieve - * @return the operation - */ - public static EntityGetOperation get( - String notificationEndPointId) { - return new DefaultGetOperation(ENTITY_SET, - notificationEndPointId, NotificationEndPointInfo.class); - } - - /** - * Create an operation that will retrieve the notification end point at the - * given link - * - * @param link - * the link - * @return the operation - */ - public static EntityGetOperation get( - LinkInfo link) { - return new DefaultGetOperation( - link.getHref(), NotificationEndPointInfo.class); - } - - /** - * Create an operation that will retrieve all notification end points - * - * @return the operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - public static Updater update(String notificationEndPointId) { - return new Updater(notificationEndPointId); - } - - /** - * Create an operation to delete the given notification end point - * - * @param notificationEndPointId - * id of notification end point to delete - * @return the delete operation - */ - public static EntityDeleteOperation delete(String notificationEndPointId) { - return new DefaultDeleteOperation(ENTITY_SET, notificationEndPointId); - } - - /** - * The Class Updater. - */ - public static class Updater extends EntityOperationBase implements - EntityUpdateOperation { - - /** The name. */ - private String name; - - /** - * Instantiates a new updater. - * - * @param notificationEndPointId - * the asset id - */ - protected Updater(String notificationEndPointId) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, - notificationEndPointId)); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityUpdateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - NotificationEndPointType notificationEndPointType = new NotificationEndPointType(); - notificationEndPointType.setName(name); - return notificationEndPointType; - } - - /** - * Sets new name for asset. - * - * @param name - * The new name - * @return Updater instance - */ - public Updater setName(String name) { - this.name = name; - return this; - } - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointInfo.java deleted file mode 100644 index 8b7b2a1ae389..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointInfo.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.NotificationEndPointType; - -/** - * Type containing data about notification end points. - * - */ -public class NotificationEndPointInfo extends - ODataEntity { - - /** - * Creates a new {@link NotificationEndPointInfo} wrapping the given ATOM - * entry and content objects. - * - * @param entry - * Entry containing this AccessPolicy data - * @param content - * Content with the AccessPolicy data - */ - public NotificationEndPointInfo(EntryType entry, - NotificationEndPointType content) { - super(entry, content); - } - - /** - * Get the notification end point id. - * - * @return the id. - */ - public String getId() { - return getContent().getId(); - } - - /** - * Get the name. - * - * @return the name. - */ - public String getName() { - return getContent().getName(); - } - - /** - * Get the creation date. - * - * @return the date. - */ - public Date getCreated() { - return getContent().getCreated(); - } - - /** - * Get the type of the end point. - * - * @return the end point type. - */ - public EndPointType getEndPointType() { - return EndPointType.fromCode(getContent().getEndPointType()); - } - - /** - * Gets the end point address. - * - * @return the end point address - */ - public String getEndPointAddress() { - return getContent().getEndPointAddress(); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Operation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Operation.java deleted file mode 100644 index 2c9303ee80ad..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Operation.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; - -/** - * Class for creating operations to manipulate Asset entities. - * - */ -public final class Operation { - - /** The Constant ENTITY_SET. */ - private static final String ENTITY_SET = "Operations"; - - // Prevent instantiation - /** - * Instantiates a new asset. - */ - private Operation() { - } - - /** - * Create an operation object that will get the state of the given asset. - * - * @param assetId - * id of asset to retrieve - * @return the get operation - */ - public static EntityGetOperation get(String operationId) { - return new DefaultGetOperation(ENTITY_SET, operationId, - OperationInfo.class); - } -} \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/OperationInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/OperationInfo.java deleted file mode 100644 index 5df101fade86..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/OperationInfo.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.OperationType; - -public class OperationInfo extends ODataEntity { - - public OperationInfo(EntryType entry, OperationType content) { - super(entry, content); - } - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return getContent().getId(); - } - - /** - * Gets the target entity id. - * - * @return the target entity id - */ - public String getTargetEntityId() { - return getContent().getTargetEntityId(); - } - - /** - * Gets the state. - * - * @return the state - */ - public OperationState getState() { - return OperationState.fromCode(getContent().getState()); - } - - /** - * Gets the error code. - * - * @return the error code - */ - public String getErrorCode() { - return getContent().getErrorCode(); - } - - /** - * Gets the error message. - * - * @return the error message - */ - public String getErrorMessage() { - return getContent().getErrorMessage(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/OperationState.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/OperationState.java deleted file mode 100644 index 22e96d8c3b73..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/OperationState.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Specifies the states of the se. - */ -public enum OperationState { - - Succeeded("Succeeded"), - - Failed("Failed"), - - InProgress("InProgress"); - - /** The op state code. */ - private String operationStateCode; - - /** - * Instantiates a new op state. - * - * @param operationStateCode - * the op state code - */ - private OperationState(String operationStateCode) { - this.operationStateCode = operationStateCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public String getCode() { - return operationStateCode; - } - - /** - * Create an OperationState instance from the corresponding String. - * - * @param state - * state as integer - * @return new StreamingEndpointState instance - */ - public static OperationState fromCode(String state) { - if (state.equals("Succeeded")) { - return OperationState.Succeeded; - } else if (state.equals("Failed")) { - return OperationState.Failed; - } else if (state.equals("InProgress")) { - return OperationState.InProgress; - } else { - throw new InvalidParameterException("state"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKey.java deleted file mode 100644 index 30cd690a9f58..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKey.java +++ /dev/null @@ -1,224 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.io.InputStream; - -import javax.ws.rs.core.MediaType; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import javax.xml.transform.stream.StreamSource; - -import com.microsoft.windowsazure.core.pipeline.PipelineHelpers; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultEntityTypeActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityTypeActionOperation; -import com.microsoft.windowsazure.services.media.implementation.content.ProtectionKeyIdType; -import com.microsoft.windowsazure.services.media.implementation.content.ProtectionKeyRestType; -import com.sun.jersey.api.client.ClientResponse; - -/** - * Class for creating operations to manipulate protection key pseudo-entities. - * - */ -public final class ProtectionKey { - - private ProtectionKey() { - } - - /** - * Gets the protection key id. - * - * @param contentKeyType - * the content key type - * @return the protection key id - */ - public static EntityTypeActionOperation getProtectionKeyId( - ContentKeyType contentKeyType) { - return new GetProtectionKeyIdActionOperation("GetProtectionKeyId") - .addQueryParameter("contentKeyType", - String.format("%d", contentKeyType.getCode())) - .setAcceptType(MediaType.APPLICATION_XML_TYPE); - } - - /** - * Gets the protection key. - * - * @param protectionKeyId - * the protection key id - * @return the protection key - */ - public static EntityTypeActionOperation getProtectionKey( - String protectionKeyId) { - return new GetProtectionKeyActionOperation("GetProtectionKey") - .addQueryParameter("ProtectionKeyId", - String.format("'%s'", protectionKeyId)).setAcceptType( - MediaType.APPLICATION_XML_TYPE); - } - - /** - * The Class GetProtectionKeyIdActionOperation. - * - * @param - */ - private static class GetProtectionKeyIdActionOperation extends - DefaultEntityTypeActionOperation { - - /** The jaxb context. */ - private final JAXBContext jaxbContext; - - /** The unmarshaller. */ - private final Unmarshaller unmarshaller; - - /** - * Instantiates a new gets the protection key id action operation. - * - * @param name - * the name - */ - public GetProtectionKeyIdActionOperation(String name) { - super(name); - try { - jaxbContext = JAXBContext - .newInstance(ProtectionKeyIdType.class); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - - try { - unmarshaller = jaxbContext.createUnmarshaller(); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * DefaultActionOperation - * #processResponse(com.sun.jersey.api.client.ClientResponse) - */ - @Override - public String processTypeResponse(ClientResponse clientResponse) { - PipelineHelpers.throwIfNotSuccess(clientResponse); - ProtectionKeyIdType protectionKeyIdType; - try { - protectionKeyIdType = parseResponse(clientResponse); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - - return protectionKeyIdType.getProtectionKeyId(); - } - - /** - * Parses the response. - * - * @param clientResponse - * the client response - * @return the protection key id type - * @throws JAXBException - * the jAXB exception - */ - private ProtectionKeyIdType parseResponse(ClientResponse clientResponse) - throws JAXBException { - - InputStream inputStream = clientResponse.getEntityInputStream(); - JAXBElement protectionKeyIdTypeJaxbElement = unmarshaller - .unmarshal(new StreamSource(inputStream), - ProtectionKeyIdType.class); - return protectionKeyIdTypeJaxbElement.getValue(); - - } - - } - - /** - * The Class GetProtectionKeyActionOperation. - */ - private static class GetProtectionKeyActionOperation extends - DefaultEntityTypeActionOperation { - - /** The jaxb context. */ - private final JAXBContext jaxbContext; - - /** The unmarshaller. */ - private final Unmarshaller unmarshaller; - - /** - * Instantiates a new gets the protection key action operation. - * - * @param name - * the name - */ - public GetProtectionKeyActionOperation(String name) { - super(name); - try { - jaxbContext = JAXBContext - .newInstance(ProtectionKeyRestType.class); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - - try { - unmarshaller = jaxbContext.createUnmarshaller(); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * DefaultActionOperation - * #processResponse(com.sun.jersey.api.client.ClientResponse) - */ - @Override - public String processTypeResponse(ClientResponse clientResponse) { - PipelineHelpers.throwIfNotSuccess(clientResponse); - ProtectionKeyRestType protectionKeyRestType; - try { - protectionKeyRestType = parseResponse(clientResponse); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - - return protectionKeyRestType.getProtectionKey(); - } - - /** - * Parses the response. - * - * @param clientResponse - * the client response - * @return the protection key rest type - * @throws JAXBException - * the jAXB exception - */ - private ProtectionKeyRestType parseResponse( - ClientResponse clientResponse) throws JAXBException { - InputStream inputStream = clientResponse.getEntityInputStream(); - JAXBElement protectionKeyTypeJaxbElement = unmarshaller - .unmarshal(new StreamSource(inputStream), - ProtectionKeyRestType.class); - return protectionKeyTypeJaxbElement.getValue(); - - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKeyType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKeyType.java deleted file mode 100644 index 3c3f893fe993..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKeyType.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * The Enum ProtectionKeyType. - */ -public enum ProtectionKeyType { - - /** The X509 certificate thumbprint. */ - X509CertificateThumbprint(0); - - /** The protection key type code. */ - private int protectionKeyTypeCode; - - /** - * Instantiates a new protection key type. - * - * @param protectionKeyTypeCode - * the protection key type code - */ - private ProtectionKeyType(int protectionKeyTypeCode) { - this.protectionKeyTypeCode = protectionKeyTypeCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return protectionKeyTypeCode; - } - - /** - * Create an ProtectionKeyType instance from the corresponding int. - * - * @param protectionKeyTypeCode - * protectionKeyTypeCode as integer - * @return new ProtectionKeyType instance - */ - public static ProtectionKeyType fromCode(int protectionKeyTypeCode) { - switch (protectionKeyTypeCode) { - case 0: - return ProtectionKeyType.X509CertificateThumbprint; - default: - throw new InvalidParameterException("state"); - } - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StorageAccountInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StorageAccountInfo.java deleted file mode 100644 index 74f7550f4b05..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StorageAccountInfo.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.StorageAccountType; - -/** - * Data about a Media Services Asset entity. - * - */ -public class StorageAccountInfo extends ODataEntity { - - /** - * Instantiates a new asset info. - * - * @param entry - * the entry - * @param content - * the content - */ - public StorageAccountInfo(EntryType entry, StorageAccountType content) { - super(entry, content); - } - - /** - * Get the asset name. - * - * @return the name - */ - public String getName() { - return this.getContent().getName(); - } - - /** - * Get the bytes used - * - * @return the bytes used - */ - public long getBytesUsed() { - return getContent().getBytesUsed(); - } - - /** - * Gets true if this storage account is the default one. - * - * @return true if this storage account is the default one, instead false. - */ - public boolean isDefault() { - return getContent().isDefault(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StorageAccounts.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StorageAccounts.java deleted file mode 100644 index 04862a5f932c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StorageAccounts.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate Asset entities. - * - */ -public final class StorageAccounts { - - /** The Constant ENTITY_SET. */ - private static final String ENTITY_SET = "StorageAccounts"; - - // Prevent instantiation - /** - * Instantiates a new asset. - */ - private StorageAccounts() { - } - - /** - * Create an operation that will list all the assets. - * - * @return The list operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpoint.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpoint.java deleted file mode 100644 index 93391379b74c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpoint.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.List; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultEntityActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityProxyData; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.CrossSiteAccessPoliciesType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointAccessControlType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointCacheControlType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointType; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.GenericType; -import com.sun.jersey.api.client.UniformInterfaceException; - -/** - * Class for creating operations to manipulate Asset entities. - * - */ -public final class StreamingEndpoint { - - /** The Constant ENTITY_SET. */ - private static final String ENTITY_SET = "StreamingEndpoints"; - - // Prevent instantiation - /** - * Instantiates a new asset. - */ - private StreamingEndpoint() { - } - - /** - * Creates an Asset Creator. - * - * @return the creator - */ - public static Creator create() { - return new Creator(); - } - - /** - * The Class Creator. - */ - public static class Creator extends EntityOperationSingleResultBase - implements EntityCreateOperation { - - private String name; - private String description; - private int scaleUnits; - private boolean cdnEnabled; - private List customHostNames; - private StreamingEndpointAccessControlType streamingEndpointAccessControl; - private StreamingEndpointCacheControlType streamingEndpointCacheControl; - private CrossSiteAccessPoliciesType crossSiteAccessPolicies; - - /** - * Instantiates a new creator. - */ - public Creator() { - super(ENTITY_SET, StreamingEndpointInfo.class); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public Class getResponseClass() { - return ClientResponse.class; - } - - @Override - public Object processResponse(Object rawResponse) throws ServiceException { - ClientResponse clientResponse = (ClientResponse) rawResponse; - - if (clientResponse.getStatus() >= 300) { - clientResponse.bufferEntity(); - throw new UniformInterfaceException( - String.format("Received: %s", clientResponse.getEntity(String.class)), clientResponse); - } - - StreamingEndpointInfo streamingEndpointInfo = clientResponse.getEntity(StreamingEndpointInfo.class); - - if (clientResponse.getHeaders().containsKey("operation-id")) { - List operationIds = clientResponse.getHeaders().get("operation-id"); - if (operationIds.size() >= 0) { - streamingEndpointInfo.setOperationId(operationIds.get(0)); - } - } - return streamingEndpointInfo; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityCreateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - StreamingEndpointType streamingEndpointType = new StreamingEndpointType(); - streamingEndpointType.setName(name); - streamingEndpointType.setDescription(description); - streamingEndpointType.setCdnEnabled(cdnEnabled); - streamingEndpointType.setCustomHostName(customHostNames); - streamingEndpointType.setCrossSiteAccessPolicies(crossSiteAccessPolicies); - streamingEndpointType.setScaleUnits(scaleUnits); - streamingEndpointType.setAccessControl(streamingEndpointAccessControl); - streamingEndpointType.setCacheControl(streamingEndpointCacheControl); - return streamingEndpointType; - } - - /** - * Set the name of the streaming endpoint to be created. - * - * @param name - * The name - * @return The creator object (for call chaining) - */ - public Creator setName(String name) { - this.name = name; - return this; - } - - /** - * Set the description of the streaming endpoint to be created. - * - * @param description - * The description - * @return The creator object (for call chaining) - */ - public Creator setDescription(String description) { - this.description = description; - return this; - } - - /** - * Set the scale units of the streaming endpoint to be created. - * - * @param scaleUnits - * the scale units - * @return The creator object (for call chaining) - */ - public Creator setScaleUnits(int scaleUnits) { - this.scaleUnits = scaleUnits; - return this; - } - - /** - * Set if CDN is enabled on the streaming endpoint to be created. - * - * @param cdnEnabled - * true if CDN is enabled - * @return The creator object (for call chaining) - */ - public Creator setCdnEnabled(boolean cdnEnabled) { - this.cdnEnabled = cdnEnabled; - return this; - } - - /** - * Set the access control policies of the streaming endpoint to be - * created. - * - * @param streamingEndpointAccessControl - * the access control policies - * @return The creator object (for call chaining) - */ - public Creator setAccessControl(StreamingEndpointAccessControlType streamingEndpointAccessControl) { - this.streamingEndpointAccessControl = streamingEndpointAccessControl; - return this; - } - - /** - * Set the list of custom host names of the streaming endpoint to be - * created. - * - * @param customHostNames - * the list of custom host names - * @return The creator object (for call chaining) - */ - public Creator setCustomHostNames(List customHostNames) { - this.customHostNames = customHostNames; - return this; - } - - /** - * Set the streaming endpoint cache control of the streaming endpoint to - * be created. - * - * @param streamingEndpointCacheControl - * the streaming endpoint cache control - * @return The creator object (for call chaining) - */ - public Creator setCacheControl(StreamingEndpointCacheControlType streamingEndpointCacheControl) { - this.streamingEndpointCacheControl = streamingEndpointCacheControl; - return this; - } - - /** - * Set the cross site access policies of the streaming endpoint to be - * created. - * - * @param crossSiteAccessPolicies - * the cross site access policies - * @return The creator object (for call chaining) - */ - public Creator setCrossSiteAccessPolicies(CrossSiteAccessPoliciesType crossSiteAccessPolicies) { - this.crossSiteAccessPolicies = crossSiteAccessPolicies; - return this; - } - - } - - /** - * Create an operation object that will get the state of the given asset. - * - * @param assetId - * id of asset to retrieve - * @return the get operation - */ - public static EntityGetOperation get(String streamingEndpointId) { - return new DefaultGetOperation(ENTITY_SET, streamingEndpointId, - StreamingEndpointInfo.class); - } - - /** - * Create an operation that will list all the assets. - * - * @return The list operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation that will update the given asset. - * - * @param assetId - * id of the asset to update - * @return the update operation - */ - public static Updater update(String streamingEndpointId) { - return new Updater(streamingEndpointId); - } - - public static Updater update(StreamingEndpointInfo streamingEndpointInfo) { - return new Updater(streamingEndpointInfo); - } - - /** - * The Class Updater. - */ - public static class Updater extends EntityOperationBase implements EntityUpdateOperation { - - private String description = null; - private boolean cdnEnabled; - private List customHostNames = null; - private StreamingEndpointAccessControlType streamingEndpointAccessControl = null; - private StreamingEndpointCacheControlType streamingEndpointCacheControl = null; - private CrossSiteAccessPoliciesType crossSiteAccessPolicies = null; - - /** - * Instantiates a new updater. - * - * @param assetId - * the asset id - */ - protected Updater(String streamingEndpointId) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, streamingEndpointId)); - } - - protected Updater(StreamingEndpointInfo streamingEndpointInfo) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, streamingEndpointInfo.getId())); - this.setCdnEnabled(streamingEndpointInfo.isCdnEnabled()); - this.setCustomHostNames(streamingEndpointInfo.getCustomHostNames()); - this.setDescription(streamingEndpointInfo.getDescription()); - this.setCrossSiteAccessPolicies(streamingEndpointInfo.getCrossSiteAccessPolicies()); - this.setAccessControl(streamingEndpointInfo.getAccessControl()); - this.setCacheControl(streamingEndpointInfo.getCacheControl()); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media - * .entityoperations.EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - // Deliberately empty - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityUpdateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - StreamingEndpointType streamingEndpointType = new StreamingEndpointType(); - streamingEndpointType.setDescription(description); - streamingEndpointType.setCdnEnabled(cdnEnabled); - streamingEndpointType.setCustomHostName(customHostNames); - streamingEndpointType.setCrossSiteAccessPolicies(crossSiteAccessPolicies); - streamingEndpointType.setAccessControl(streamingEndpointAccessControl); - streamingEndpointType.setCacheControl(streamingEndpointCacheControl); - return streamingEndpointType; - } - - /** - * Set the new description of the streaming endpoint to be updated. - * - * @param description - * The description - * @return The creator object (for call chaining) - */ - public Updater setDescription(String description) { - this.description = description; - return this; - } - - /** - * Set the new value for CDN enabled on the streaming endpoint to be - * updated. - * - * @param cdnEnabled - * true if CDN is enabled - * @return The creator object (for call chaining) - */ - public Updater setCdnEnabled(boolean cdnEnabled) { - this.cdnEnabled = cdnEnabled; - return this; - } - - /** - * Set the new access control policies of the streaming endpoint to be - * updated. - * - * @param streamingEndpointAccessControl - * the access control policies - * @return The creator object (for call chaining) - */ - public Updater setAccessControl(StreamingEndpointAccessControlType streamingEndpointAccessControl) { - this.streamingEndpointAccessControl = streamingEndpointAccessControl; - return this; - } - - /** - * Set the new list of custom host names of the streaming endpoint to be - * updated. - * - * @param customHostNames - * the list of custom host names - * @return The creator object (for call chaining) - */ - public Updater setCustomHostNames(List customHostNames) { - this.customHostNames = customHostNames; - return this; - } - - /** - * Set the new streaming endpoint cache control of the streaming - * endpoint to be updated. - * - * @param streamingEndpointCacheControl - * the streaming endpoint cache control - * @return The creator object (for call chaining) - */ - public Updater setCacheControl(StreamingEndpointCacheControlType streamingEndpointCacheControl) { - this.streamingEndpointCacheControl = streamingEndpointCacheControl; - return this; - } - - /** - * Set the new cross site access policies of the streaming endpoint to - * be updated. - * - * @param crossSiteAccessPolicies - * the cross site access policies - * @return The creator object (for call chaining) - */ - public Updater setCrossSiteAccessPolicies(CrossSiteAccessPoliciesType crossSiteAccessPolicies) { - this.crossSiteAccessPolicies = crossSiteAccessPolicies; - return this; - } - } - - /** - * Create an operation to delete the given streaming endpoint - * - * @param assetId - * id of asset to delete - * @return the delete operation - */ - public static EntityDeleteOperation delete(String streamingEndpointId) { - return new DefaultDeleteOperation(ENTITY_SET, streamingEndpointId); - } - - public static EntityActionOperation start(String streamingEndpointId) { - return new DefaultEntityActionOperation(ENTITY_SET, streamingEndpointId, "Start"); - } - - public static EntityActionOperation stop(String streamingEndpointId) { - return new DefaultEntityActionOperation(ENTITY_SET, streamingEndpointId, "Stop"); - } - - public static EntityActionOperation scale(String streamingEndpointId, int scaleUnits) { - DefaultEntityActionOperation operation = new DefaultEntityActionOperation(ENTITY_SET, streamingEndpointId, - "Scale"); - operation.addBodyParameter("scaleUnits", scaleUnits); - return operation; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpointInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpointInfo.java deleted file mode 100644 index 07b7e2edb8de..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpointInfo.java +++ /dev/null @@ -1,188 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; -import java.util.List; - -import com.microsoft.windowsazure.services.media.entityoperations.EntityWithOperationIdentifier; -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.CrossSiteAccessPoliciesType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointAccessControlType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointCacheControlType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointType; - -/** - * Data about a Media Services Asset entity. - * - */ -public class StreamingEndpointInfo extends ODataEntity - implements EntityWithOperationIdentifier { - - private String operationIdentifier = null; - - /** - * Instantiates a new streaming end point info. - * - * @param entry - * the entry - * @param content - * the content - */ - public StreamingEndpointInfo(EntryType entry, StreamingEndpointType content) { - super(entry, content); - } - - /** - * Get the streaming end point id. - * - * @return the id - */ - public String getId() { - return getContent().getId(); - } - - /** - * Get the streaming end point name. - * - * @return the name - */ - public String getName() { - return this.getContent().getName(); - } - - /** - * Get the streaming end point description. - * - * @return the description - */ - public String getDescription() { - return this.getContent().getDescription(); - } - - /** - * Get the creation date. - * - * @return the date - */ - public Date getCreated() { - return this.getContent().getCreated(); - } - - /** - * Get last modified date. - * - * @return the date - */ - public Date getLastModified() { - return getContent().getLastModified(); - } - - /** - * Get the streaming end point state. - * - * @return the state - */ - public StreamingEndpointState getState() { - return StreamingEndpointState.fromCode(getContent().getState()); - } - - /** - * Get the host name - * - * @return the host name - */ - public String getHostName() { - return getContent().getHostName(); - } - - /** - * Get the scale units - * - * @return the scale units - */ - public int getScaleUnits() { - return getContent().getScaleUnits(); - } - - /** - * Get the list of custom host names. - * - * @return the id - */ - public List getCustomHostNames() { - return getContent().getCustomHostName(); - } - - /** - * True if CDN is enabled. - */ - public boolean isCdnEnabled() { - return getContent().isCdnEnabled(); - } - - /** - * Get the access control policy - * - * @return the access control policy - */ - public StreamingEndpointAccessControlType getAccessControl() { - return getContent().getAccessControl(); - } - - /** - * Get the cache control policy - * - * @return the cahe control policy - */ - public StreamingEndpointCacheControlType getCacheControl() { - return getContent().getCacheControl(); - } - - /** - * Get the cross site access policy - * - * @return the cross site access policy - */ - public CrossSiteAccessPoliciesType getCrossSiteAccessPolicies() { - return getContent().getCrossSiteAccessPolicies(); - } - - /** - * Get the operation-id if any. - */ - @Override - public String getOperationId() { - return operationIdentifier; - } - - /** - * Set the operation-id. - */ - @Override - public void setOperationId(String operationIdentifier) { - this.operationIdentifier = operationIdentifier; - } - - /** - * @return true if the entity has an operation-id. - */ - @Override - public boolean hasOperationIdentifier() { - return operationIdentifier != null; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpointState.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpointState.java deleted file mode 100644 index 1b26974fb5c0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpointState.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Specifies the states of the se. - */ -public enum StreamingEndpointState { - - Stopped("Stopped"), - - Starting("Starting"), - - Running("Running"), - - Scaling("Scaling"), - - Stopping("Stopping"); - - /** The se state code. */ - private String streamingEndpointStateCode; - - /** - * Instantiates a new se state. - * - * @param streamingEndpointStateCode - * the se state code - */ - private StreamingEndpointState(String streamingEndpointStateCode) { - this.streamingEndpointStateCode = streamingEndpointStateCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public String getCode() { - return streamingEndpointStateCode; - } - - /** - * Create an StreamingEndpointState instance from the corresponding int. - * - * @param state - * state as integer - * @return new StreamingEndpointState instance - */ - public static StreamingEndpointState fromCode(String state) { - if (state.equals("Stopped")) { - return StreamingEndpointState.Stopped; - } else if (state.equals("Starting")) { - return StreamingEndpointState.Starting; - } else if (state.equals("Running")) { - return StreamingEndpointState.Running; - } else if (state.equals("Scaling")) { - return StreamingEndpointState.Scaling; - } else if (state.equals("Stopping")) { - return StreamingEndpointState.Stopping; - } else { - throw new InvalidParameterException("state"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TargetJobState.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TargetJobState.java deleted file mode 100644 index d7b87705c119..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TargetJobState.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * The Enum TargetJobState. - */ -public enum TargetJobState { - /** None. */ - None(0), - - /** FinalStatesOnly. */ - FinalStatesOnly(1), - - /** All. */ - All(2); - - /** The target job state code. */ - private int targetJobStateCode; - - /** - * Instantiates a new job state. - * - * @param targetJobStateCode - * the job state code - */ - private TargetJobState(int targetJobStateCode) { - this.targetJobStateCode = targetJobStateCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return this.targetJobStateCode; - } - - /** - * From code. - * - * @param targetJobStateCode - * the target job state code - * @return the job state - */ - public static TargetJobState fromCode(int targetJobStateCode) { - switch (targetJobStateCode) { - case 0: - return TargetJobState.None; - case 1: - return TargetJobState.FinalStatesOnly; - case 2: - return TargetJobState.All; - default: - throw new InvalidParameterException("targetJobStateCode"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Task.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Task.java deleted file mode 100644 index bdb8d2d377ea..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Task.java +++ /dev/null @@ -1,226 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityBatchOperation; -import com.microsoft.windowsazure.services.media.implementation.content.TaskType; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate Task entities. - * - */ -public final class Task { - - /** The Constant ENTITY_SET. */ - private static final String ENTITY_SET = "Tasks"; - - // Prevent instantiation - /** - * Instantiates a new task. - */ - private Task() { - } - - /** - * Creates the. - * - * @param mediaProcessorId - * the media processor id - * @param taskBody - * the task body - * @return the creates the batch operation - */ - public static CreateBatchOperation create(String mediaProcessorId, - String taskBody) { - return new CreateBatchOperation(mediaProcessorId, taskBody); - } - - /** - * Create an operation that will list all the tasks. - * - * @return The list operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation that will list the tasks pointed to by the given - * link. - * - * @param link - * link to tasks - * @return the list operation. - */ - public static DefaultListOperation list(LinkInfo link) { - return new DefaultListOperation(link.getHref(), - new GenericType>() { - }); - } - - /** - * The Class CreateBatchOperation. - */ - public static class CreateBatchOperation extends EntityBatchOperation { - - /** The task type. */ - private final TaskType taskType; - - /** - * Instantiates a new creates the batch operation. - * - * @param mediaProcessorId - * the media processor id - * @param taskBody - * the task body - */ - public CreateBatchOperation(String mediaProcessorId, String taskBody) { - this.setVerb("POST"); - taskType = new TaskType(); - addContentObject(taskType); - this.taskType.setMediaProcessorId(mediaProcessorId); - this.taskType.setTaskBody(taskBody); - } - - /** - * Sets the options. - * - * @param options - * the options - * @return the creates the batch operation - */ - public CreateBatchOperation setOptions(TaskOption options) { - this.taskType.setOptions(options.getCode()); - return this; - } - - /** - * Sets the configuration. - * - * @param configuration - * the configuration - * @return the creates the batch operation - */ - public CreateBatchOperation setConfiguration(String configuration) { - this.taskType.setConfiguration(configuration); - return this; - } - - /** - * Sets the name. - * - * @param name - * the name - * @return the creates the batch operation - */ - public CreateBatchOperation setName(String name) { - this.taskType.setName(name); - return this; - } - - /** - * Sets the task body. - * - * @param taskBody - * the task body - * @return the creates the batch operation - */ - public CreateBatchOperation setTaskBody(String taskBody) { - this.taskType.setTaskBody(taskBody); - return this; - } - - /** - * Sets the media processor id. - * - * @param mediaProcessorId - * the media processor id - * @return the creates the batch operation - */ - public CreateBatchOperation setMediaProcessorId(String mediaProcessorId) { - this.taskType.setMediaProcessorId(mediaProcessorId); - return this; - } - - /** - * Sets the priority. - * - * @param priority - * the priority - * @return the creates the batch operation - */ - public CreateBatchOperation setPriority(int priority) { - this.taskType.setPriority(priority); - return this; - } - - /** - * Sets the encryption key id. - * - * @param encryptionKeyId - * the encryption key id - * @return the creates the batch operation - */ - public CreateBatchOperation setEncryptionKeyId(String encryptionKeyId) { - this.taskType.setEncryptionKeyId(encryptionKeyId); - return this; - } - - /** - * Sets the encryption scheme. - * - * @param encryptionScheme - * the encryption scheme - * @return the creates the batch operation - */ - public CreateBatchOperation setEncryptionScheme(String encryptionScheme) { - this.taskType.setEncryptionScheme(encryptionScheme); - return this; - } - - /** - * Sets the encryption version. - * - * @param encryptionVersion - * the encryption version - * @return the creates the batch operation - */ - public CreateBatchOperation setEncryptionVersion( - String encryptionVersion) { - this.taskType.setEncryptionVersion(encryptionVersion); - return this; - } - - /** - * Sets the initialization vector. - * - * @param initializationVector - * the initialization vector - * @return the creates the batch operation - */ - public CreateBatchOperation setInitializationVector( - String initializationVector) { - this.taskType.setInitializationVector(initializationVector); - return this; - } - - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskHistoricalEvent.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskHistoricalEvent.java deleted file mode 100644 index bd7d13f7daa1..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskHistoricalEvent.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; - -/** - * The Class TaskHistoricalEvent. - */ -public class TaskHistoricalEvent { - - /** The code. */ - private final String code; - - /** The message. */ - private final String message; - - /** The time stamp. */ - private final Date timeStamp; - - /** - * Instantiates a new task historical event. - * - * @param code - * the code - * @param message - * the message - * @param timeStamp - * the time stamp - */ - public TaskHistoricalEvent(String code, String message, Date timeStamp) { - this.code = code; - this.message = message; - this.timeStamp = timeStamp; - } - - /** - * Gets the code. - * - * @return the code - */ - public String getCode() { - return this.code; - } - - /** - * Gets the message. - * - * @return the message - */ - public String getMessage() { - return this.message; - } - - /** - * Gets the time stamp. - * - * @return the time stamp - */ - public Date getTimeStamp() { - return this.timeStamp; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskInfo.java deleted file mode 100644 index 3dc4636e0654..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskInfo.java +++ /dev/null @@ -1,260 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.ErrorDetailType; -import com.microsoft.windowsazure.services.media.implementation.content.TaskHistoricalEventType; -import com.microsoft.windowsazure.services.media.implementation.content.TaskType; - -/** - * The Class TaskInfo. - */ -public class TaskInfo extends ODataEntity { - - /** - * Instantiates a new task info. - * - * @param entry - * the entry - * @param content - * the content - */ - public TaskInfo(EntryType entry, TaskType content) { - super(entry, content); - } - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return getContent().getId(); - } - - /** - * Gets the configuration. - * - * @return the configuration - */ - public String getConfiguration() { - return getContent().getConfiguration(); - } - - /** - * Gets the end time. - * - * @return the end time - */ - public Date getEndTime() { - return getContent().getEndTime(); - } - - /** - * Gets the error details. - * - * @return the error details - */ - public List getErrorDetails() { - List result = new ArrayList(); - List errorDetailTypes = getContent().getErrorDetails(); - if (errorDetailTypes != null) { - for (ErrorDetailType errorDetailType : errorDetailTypes) { - ErrorDetail errorDetail = new ErrorDetail( - errorDetailType.getCode(), errorDetailType.getMessage()); - result.add(errorDetail); - } - return result; - } - return null; - } - - /** - * Gets the task historical events. - * - * @return the task historical events - */ - public List getHistoricalEvents() { - List result = new ArrayList(); - List historicalEventTypes = getContent() - .getHistoricalEventTypes(); - - if (historicalEventTypes != null) { - for (TaskHistoricalEventType taskHistoricalEventType : historicalEventTypes) { - String message = taskHistoricalEventType.getMessage(); - if ((message != null) && (message.isEmpty())) { - message = null; - } - TaskHistoricalEvent taskHistoricalEvent = new TaskHistoricalEvent( - taskHistoricalEventType.getCode(), message, - taskHistoricalEventType.getTimeStamp()); - result.add(taskHistoricalEvent); - } - } - - return result; - } - - /** - * Gets the media processor id. - * - * @return the media processor id - */ - public String getMediaProcessorId() { - return getContent().getMediaProcessorId(); - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return getContent().getName(); - } - - /** - * Gets the perf message. - * - * @return the perf message - */ - public String getPerfMessage() { - return getContent().getPerfMessage(); - } - - /** - * Gets the priority. - * - * @return the priority - */ - public int getPriority() { - return getContent().getPriority(); - } - - /** - * Gets the progress. - * - * @return the progress - */ - public double getProgress() { - return getContent().getProgress(); - } - - /** - * Gets the running duration. - * - * @return the running duration - */ - public double getRunningDuration() { - return getContent().getRunningDuration(); - } - - /** - * Gets the start time. - * - * @return the start time - */ - public Date getStartTime() { - return getContent().getStartTime(); - } - - /** - * Gets the state. - * - * @return the state - */ - public TaskState getState() { - return TaskState.fromCode(getContent().getState()); - } - - /** - * Gets the task body. - * - * @return the task body - */ - public String getTaskBody() { - return getContent().getTaskBody(); - } - - /** - * Gets the options. - * - * @return the options - */ - public TaskOption getOptions() { - return TaskOption.fromCode(getContent().getOptions()); - } - - /** - * Gets the encryption key id. - * - * @return the encryption key id - */ - public String getEncryptionKeyId() { - return getContent().getEncryptionKeyId(); - } - - /** - * Gets the encryption scheme. - * - * @return the encryption scheme - */ - public String getEncryptionScheme() { - return getContent().getEncryptionScheme(); - } - - /** - * Gets the encryption version. - * - * @return the encryption version - */ - public String getEncryptionVersion() { - return getContent().getEncryptionVersion(); - } - - /** - * Gets the initialization vector. - * - * @return the initialization vector - */ - public String getInitializationVector() { - return getContent().getInitializationVector(); - } - - /** - * Gets link to the task's input assets. - * - * @return the link - */ - public LinkInfo getInputAssetsLink() { - return this. getRelationLink("InputMediaAssets"); - } - - /** - * Gets link to the task's output assets. - * - * @return the link - */ - public LinkInfo getOutputAssetsLink() { - return this. getRelationLink("OutputMediaAssets"); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskOption.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskOption.java deleted file mode 100644 index 252b30e04e96..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskOption.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Enum describing options for creating tasks - * - */ -public enum TaskOption { - - /** - * None - */ - None(0), - - /** - * Encrypt task configuration - */ - ProtectedConfiguration(1); - - private int code; - - private TaskOption(int code) { - this.code = code; - } - - /** - * Get integer code corresponding to enum value - * - * @return the code - */ - public int getCode() { - return code; - } - - /** - * Return enum value corresponding to integer code - * - * @param code - * the code - * @return the enum value - */ - public static TaskOption fromCode(int code) { - switch (code) { - case 0: - return None; - case 1: - return ProtectedConfiguration; - - default: - throw new InvalidParameterException("code"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskState.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskState.java deleted file mode 100644 index 67651ad9f930..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskState.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Enum defining the state of various tasks. - */ -public enum TaskState { - - /** No state. */ - None(0), - - /** Active. */ - Active(1), - - /** Running. */ - Running(2), - - /** Completed. */ - Completed(3), - - /** Error. */ - Error(4), - - /** The Canceled. */ - Canceled(5), - - /** The Canceling. */ - Canceling(6); - - /** The code. */ - private int code; - - /** - * Instantiates a new task state. - * - * @param code - * the code - */ - private TaskState(int code) { - this.code = code; - } - - /** - * Get integer code corresponding to enum value. - * - * @return the code - */ - public int getCode() { - return code; - } - - /** - * Convert code into enum value. - * - * @param code - * the code - * @return the corresponding enum value - */ - public static TaskState fromCode(int code) { - switch (code) { - case 0: - return None; - case 1: - return Active; - case 2: - return Running; - case 3: - return Completed; - case 4: - return Error; - case 5: - return Canceled; - case 6: - return Canceling; - default: - throw new InvalidParameterException("code"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/package.html deleted file mode 100644 index 719e4d9b595c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the media service data transfer object classes. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/package.html deleted file mode 100644 index 324cb3246c05..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the media services, interface, and associated configuration and utility classes. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/Exports.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/Exports.java deleted file mode 100644 index b16c68775883..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/Exports.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue; - -import com.microsoft.windowsazure.core.Builder; -import com.microsoft.windowsazure.core.UserAgentFilter; -import com.microsoft.windowsazure.services.queue.implementation.QueueExceptionProcessor; -import com.microsoft.windowsazure.services.queue.implementation.QueueRestProxy; -import com.microsoft.windowsazure.services.queue.implementation.SharedKeyFilter; -import com.microsoft.windowsazure.services.queue.implementation.SharedKeyLiteFilter; - -public class Exports implements Builder.Exports { - @Override - public void register(Builder.Registry registry) { - registry.add(QueueContract.class, QueueExceptionProcessor.class); - registry.add(QueueExceptionProcessor.class); - registry.add(QueueRestProxy.class); - registry.add(SharedKeyLiteFilter.class); - registry.add(SharedKeyFilter.class); - registry.add(UserAgentFilter.class); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueConfiguration.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueConfiguration.java deleted file mode 100644 index a8e30604a8b0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueConfiguration.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue; - -/** - * A class that contains static strings used to identify parts of a service - * configuration instance associated with the Windows Azure Queue service. - *

- * These values must not be altered. - */ -public abstract class QueueConfiguration { - public static final String ACCOUNT_NAME = "queue.accountName"; - public static final String ACCOUNT_KEY = "queue.accountKey"; - public static final String URI = "queue.uri"; -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueContract.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueContract.java deleted file mode 100644 index 4eede912e5a5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueContract.java +++ /dev/null @@ -1,516 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue; - -import java.util.HashMap; - -import com.microsoft.windowsazure.core.pipeline.jersey.JerseyFilterableService; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.queue.models.CreateMessageOptions; -import com.microsoft.windowsazure.services.queue.models.CreateQueueOptions; -import com.microsoft.windowsazure.services.queue.models.GetQueueMetadataResult; -import com.microsoft.windowsazure.services.queue.models.GetServicePropertiesResult; -import com.microsoft.windowsazure.services.queue.models.ListMessagesOptions; -import com.microsoft.windowsazure.services.queue.models.ListMessagesResult; -import com.microsoft.windowsazure.services.queue.models.ListQueuesOptions; -import com.microsoft.windowsazure.services.queue.models.ListQueuesResult; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesOptions; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesResult; -import com.microsoft.windowsazure.services.queue.models.QueueServiceOptions; -import com.microsoft.windowsazure.services.queue.models.ServiceProperties; -import com.microsoft.windowsazure.services.queue.models.UpdateMessageResult; - -/** - * Defines the methods available on the Windows Azure storage queue service. - * Construct an object instance implementing QueueContract with - * one of the static create methods on {@link QueueService}. These - * methods associate a {@link Configuration} with the implementation, so the - * methods on the instance of QueueContract all work with a - * particular storage account. - */ -public interface QueueContract extends JerseyFilterableService { - /** - * Gets the service properties of the queue. - * - * @return A {@link GetServicePropertiesResult} reference to the queue - * service properties. - * - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - GetServicePropertiesResult getServiceProperties() throws ServiceException; - - /** - * Gets the service properties of the queue, using the specified options. - * Use the {@link QueueServiceOptions options} parameter to specify the - * server timeout for the operation. - * - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @return A {@link GetServicePropertiesResult} reference to the queue - * service properties. - * - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - GetServicePropertiesResult getServiceProperties(QueueServiceOptions options) - throws ServiceException; - - /** - * Sets the service properties of the queue. - * - * @param serviceProperties - * A {@link ServiceProperties} instance containing the queue - * service properties to set. - * - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void setServiceProperties(ServiceProperties serviceProperties) - throws ServiceException; - - /** - * Sets the service properties of the queue, using the specified options. - * Use the {@link QueueServiceOptions options} parameter to specify the - * server timeout for the operation. - * - * @param serviceProperties - * A {@link ServiceProperties} instance containing the queue - * service properties to set. - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void setServiceProperties(ServiceProperties serviceProperties, - QueueServiceOptions options) throws ServiceException; - - /** - * Creates a queue in the storage account with the specified queue name. - * - * @param queue - * A {@link String} containing the name of the queue to create. - * - * @throws ServiceException - * if an error occurs in the storage service. - */ - void createQueue(String queue) throws ServiceException; - - /** - * Creates a queue in the storage account with the specified queue name, - * using the specified options. Use the {@link QueueServiceOptions options} - * parameter to specify the server timeout for the operation. - * - * @param queue - * A {@link String} containing the name of the queue to create. - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void createQueue(String queue, CreateQueueOptions options) - throws ServiceException; - - /** - * Deletes the queue in the storage account with the specified queue name. - * - * @param queue - * A {@link String} containing the name of the queue to delete. - * - * @throws ServiceException - * if an error occurs in the storage service. - */ - void deleteQueue(String queue) throws ServiceException; - - /** - * Deletes the queue in the storage account with the specified queue name, - * using the specified options. Use the {@link QueueServiceOptions options} - * parameter to specify the server timeout for the operation. - * - * @param queue - * A {@link String} containing the name of the queue to delete. - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void deleteQueue(String queue, QueueServiceOptions options) - throws ServiceException; - - /** - * Gets a list of the queues in the storage account. - * - * @return A {@link ListQueuesResult} reference to the queues returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - ListQueuesResult listQueues() throws ServiceException; - - /** - * Gets a list of the queues in the storage account, using the specified - * options. Use the {@link ListQueuesOptions options} parameter to specify - * the server timeout for the operation, the prefix for queue names to - * match, the marker for the beginning of the queues to list, the maximum - * number of results to return, and whether to include queue metadata with - * the results. - * - * @param options - * A {@link ListQueuesOptions} instance containing options for - * the request. - * @return A {@link ListQueuesResult} reference to the queues returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - ListQueuesResult listQueues(ListQueuesOptions options) - throws ServiceException; - - /** - * Gets the metadata for the named queue in the storage account. Queue - * metadata is a user-defined collection of key-value {@link String} pairs - * that is opaque to the server. - * - * @param queue - * A {@link String} containing the name of the queue to get the - * metadata for. - * @return A {@link GetQueueMetadataResult} reference to the metadata for - * the queue. - * @throws ServiceException - * if an error occurs in the storage service. - */ - GetQueueMetadataResult getQueueMetadata(String queue) - throws ServiceException; - - /** - * Gets the metadata for the named queue in the storage account, using the - * specified options. Use the {@link QueueServiceOptions options} parameter - * to specify the server timeout for the operation. Queue metadata is a - * user-defined collection of key-value {@link String} pairs that is opaque - * to the server. - * - * @param queue - * A {@link String} containing the name of the queue to get the - * metadata for. - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @return A {@link ListQueuesResult} reference to the queues returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - GetQueueMetadataResult getQueueMetadata(String queue, - QueueServiceOptions options) throws ServiceException; - - /** - * Sets the specified metadata on the named queue in the storage account. - * Queue metadata is a user-defined collection of key-value {@link String} - * pairs that is opaque to the server. - * - * @param queue - * A {@link String} containing the name of the queue to set the - * metadata on. - * @param metadata - * A {@link java.util.HashMap} of metadata key-value - * {@link String} pairs to set on the queue. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void setQueueMetadata(String queue, HashMap metadata) - throws ServiceException; - - /** - * Sets the specified metadata on the named queue in the storage account, - * using the specified options. Use the {@link QueueServiceOptions options} - * parameter to specify the server timeout for the operation. Queue metadata - * is a user-defined collection of key-value {@link String} pairs that is - * opaque to the server. - * - * @param queue - * A {@link String} containing the name of the queue to set the - * metadata on. - * @param metadata - * A {@link java.util.HashMap} of metadata key-value - * {@link String} pairs to set on the queue. - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void setQueueMetadata(String queue, HashMap metadata, - QueueServiceOptions options) throws ServiceException; - - /** - * Appends a message with the specified text to the tail of the named queue - * in the storage account. - * - * @param queue - * A {@link String} containing the name of the queue to append - * the message to. - * @param messageText - * A {@link String} containing the text of the message to append - * to the queue. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void createMessage(String queue, String messageText) - throws ServiceException; - - /** - * Appends a message with the specified text to the tail of the named queue - * in the storage account, using the specified options. Use the - * {@link CreateMessageOptions options} parameter to specify the server - * timeout for the operation, the message visibility timeout, and the - * message time to live in the queue. - * - * @param queue - * A {@link String} containing the name of the queue to append - * the message to. - * @param messageText - * A {@link String} containing the text of the message to append - * to the queue. - * @param options - * A {@link CreateMessageOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void createMessage(String queue, String messageText, - CreateMessageOptions options) throws ServiceException; - - /** - * Updates the message in the named queue with the specified message ID and - * pop receipt value to have the specified message text and visibility - * timeout value. - * - * @param queue - * A {@link String} containing the name of the queue with the - * message to update. - * @param messageId - * A {@link String} containing the ID of the message to update. - * @param popReceipt - * A {@link String} containing the pop receipt for the message - * returned by a call to updateMessage or listMessages. - * @param messageText - * A {@link String} containing the updated text to set for the - * message. - * @param visibilityTimeoutInSeconds - * The new visibility timeout to set on the message, in seconds. - * @return An {@link UpdateMessageResult} reference to the updated message - * result returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - UpdateMessageResult updateMessage(String queue, String messageId, - String popReceipt, String messageText, - int visibilityTimeoutInSeconds) throws ServiceException; - - /** - * Updates the message in the named queue with the specified message ID and - * pop receipt value to have the specified message text and visibility - * timeout value, using the specified options. Use the - * {@link QueueServiceOptions options} parameter to specify the server - * timeout for the operation. - * - * @param queue - * A {@link String} containing the name of the queue with the - * message to update. - * @param messageId - * A {@link String} containing the ID of the message to update. - * @param popReceipt - * A {@link String} containing the pop receipt for the message - * returned by a call to updateMessage or listMessages. - * @param messageText - * A {@link String} containing the updated text to set for the - * message. - * @param visibilityTimeoutInSeconds - * The new visibility timeout to set on the message, in seconds. - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @return An {@link UpdateMessageResult} reference to the updated message - * result returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - UpdateMessageResult updateMessage(String queue, String messageId, - String popReceipt, String messageText, - int visibilityTimeoutInSeconds, QueueServiceOptions options) - throws ServiceException; - - /** - * Deletes the message in the named queue with the specified message ID and - * pop receipt value. - * - * @param queue - * A {@link String} containing the name of the queue with the - * message to delete. - * @param messageId - * A {@link String} containing the ID of the message to delete. - * @param popReceipt - * A {@link String} containing the pop receipt for the message - * returned by a call to updateMessage or listMessages. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void deleteMessage(String queue, String messageId, String popReceipt) - throws ServiceException; - - /** - * Deletes the message in the named queue with the specified message ID and - * popReceipt value, using the specified options. Use the - * {@link QueueServiceOptions options} parameter to specify the server - * timeout for the operation. - * - * @param queue - * A {@link String} containing the name of the queue with the - * message to delete. - * @param messageId - * A {@link String} containing the ID of the message to delete. - * @param popReceipt - * A {@link String} containing the pop receipt for the message - * returned by a call to updateMessage or listMessages. - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void deleteMessage(String queue, String messageId, String popReceipt, - QueueServiceOptions options) throws ServiceException; - - /** - * Retrieves the first message from head of the named queue in the storage - * account. This marks the message as invisible for the default visibility - * timeout period. When message processing is complete, the message must be - * deleted with a call to - * {@link com.microsoft.windowsazure.services.queue.QueueContract#deleteMessage(String, String, String, QueueServiceOptions) - * deleteMessage}. If message processing will take longer than the - * visibility timeout period, use the - * {@link com.microsoft.windowsazure.services.queue.QueueContract#updateMessage(String, String, String, String, int, QueueServiceOptions) - * updateMessage} method to extend the visibility timeout. The message will - * become visible in the queue again when the timeout completes if it is not - * deleted. - *

- * To get a list of multiple messages from the head of the queue, call the - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listMessages(String, ListMessagesOptions)} method - * with options set specifying the number of messages to return. - * - * @param queue - * A {@link String} containing the name of the queue to get the - * message from. - * @return A {@link ListMessagesResult} reference to the message result - * returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - ListMessagesResult listMessages(String queue) throws ServiceException; - - /** - * Retrieves up to 32 messages from the head of the named queue in the - * storage account, using the specified options. Use the - * {@link ListMessagesOptions options} parameter to specify the server - * timeout for the operation, the number of messages to retrieve, and the - * visibility timeout to set on the retrieved messages. When message - * processing is complete, each message must be deleted with a call to - * {@link com.microsoft.windowsazure.services.queue.QueueContract#deleteMessage(String, String, String, QueueServiceOptions) - * deleteMessage}. If message processing takes longer than the default - * timeout period, use the - * {@link com.microsoft.windowsazure.services.queue.QueueContract#updateMessage(String, String, String, String, int, QueueServiceOptions) - * updateMessage} method to extend the visibility timeout. Each message will - * become visible in the queue again when the timeout completes if it is not - * deleted. - * - * @param queue - * A {@link String} containing the name of the queue to get the - * messages from. - * @param options - * A {@link ListMessagesOptions} instance containing options for - * the request. - * @return A {@link ListMessagesResult} reference to the message result - * returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - ListMessagesResult listMessages(String queue, ListMessagesOptions options) - throws ServiceException; - - /** - * Peeks a message from the named queue. A peek request retrieves a message - * from the head of the queue without changing its visibility. - * - * @param queue - * A {@link String} containing the name of the queue to peek the - * message from. - * @return A {@link PeekMessagesResult} reference to the message result - * returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - PeekMessagesResult peekMessages(String queue) throws ServiceException; - - /** - * Peeks messages from the named queue, using the specified options. A peek - * request retrieves messages from the head of the queue without changing - * their visibility. Use the {@link PeekMessagesOptions options} parameter - * to specify the server timeout for the operation and the number of - * messages to retrieve. - * - * @param queue - * A {@link String} containing the name of the queue to peek the - * message from. - * @param options - * A {@link PeekMessagesOptions} instance containing options for - * the request. - * @return A {@link PeekMessagesResult} reference to the message result - * returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - PeekMessagesResult peekMessages(String queue, PeekMessagesOptions options) - throws ServiceException; - - /** - * Deletes all messages in the named queue. - * - * @param queue - * A {@link String} containing the name of the queue to delete - * all messages from. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void clearMessages(String queue) throws ServiceException; - - /** - * Deletes all messages in the named queue, using the specified options. Use - * the {@link QueueServiceOptions options} parameter to specify the server - * timeout for the operation. - * - * @param queue - * A {@link String} containing the name of the queue to delete - * all messages from. - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void clearMessages(String queue, QueueServiceOptions options) - throws ServiceException; - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueService.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueService.java deleted file mode 100644 index babf9cadc88b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueService.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue; - -import com.microsoft.windowsazure.Configuration; - -/** - * A class for static factory methods that return instances implementing - * {@link com.microsoft.windowsazure.services.queue.QueueContract}. - */ -public final class QueueService { - /** - * Private default constructor. - */ - private QueueService() { - } - - /** - * A static factory method that returns an instance implementing - * {@link com.microsoft.windowsazure.services.queue.QueueContract} using default values for initializing a - * {@link Configuration} instance. Note that the returned interface will not - * work unless storage account credentials have been added to the - * "META-INF/com.microsoft.windowsazure.properties" resource file. - * - * @return An instance implementing {@link com.microsoft.windowsazure.services.queue.QueueContract} for interacting - * with the queue service. - */ - public static QueueContract create() { - return create(null, Configuration.getInstance()); - } - - /** - * A static factory method that returns an instance implementing - * {@link com.microsoft.windowsazure.services.queue.QueueContract} using the specified {@link Configuration} instance. - * The {@link Configuration} instance must have storage account information - * and credentials set before this method is called for the returned - * interface to work. - * - * @param config - * A {@link Configuration} instance configured with storage - * account information and credentials. - * - * @return An instance implementing {@link com.microsoft.windowsazure.services.queue.QueueContract} for interacting - * with the queue service. - */ - public static QueueContract create(Configuration config) { - return create(null, config); - } - - /** - * A static factory method that returns an instance implementing - * {@link com.microsoft.windowsazure.services.queue.QueueContract} using default values for initializing a - * {@link Configuration} instance, and using the specified profile prefix - * for service settings. Note that the returned interface will not work - * unless storage account settings and credentials have been added to the - * "META-INF/com.microsoft.windowsazure.properties" resource file with the - * specified profile prefix. - * - * @param profile - * A string prefix for the account name and credentials settings - * in the {@link Configuration} instance. - * @return An instance implementing {@link com.microsoft.windowsazure.services.queue.QueueContract} for interacting - * with the queue service. - */ - public static QueueContract create(String profile) { - return create(profile, Configuration.getInstance()); - } - - /** - * A static factory method that returns an instance implementing - * {@link com.microsoft.windowsazure.services.queue.QueueContract} using the specified {@link Configuration} instance - * and profile prefix for service settings. The {@link Configuration} - * instance must have storage account information and credentials set with - * the specified profile prefix before this method is called for the - * returned interface to work. - * - * @param profile - * A string prefix for the account name and credentials settings - * in the {@link Configuration} instance. - * @param config - * A {@link Configuration} instance configured with storage - * account information and credentials. - * - * @return An instance implementing {@link com.microsoft.windowsazure.services.queue.QueueContract} for interacting - * with the queue service. - */ - public static QueueContract create(String profile, Configuration config) { - return config.create(profile, QueueContract.class); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueExceptionProcessor.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueExceptionProcessor.java deleted file mode 100644 index 2e50c29347e5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueExceptionProcessor.java +++ /dev/null @@ -1,415 +0,0 @@ -/** - * - * Copyright (c) Microsoft and contributors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.microsoft.windowsazure.services.queue.implementation; - -import java.util.HashMap; - -import javax.inject.Inject; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.exception.ServiceExceptionFactory; -import com.microsoft.windowsazure.services.queue.QueueContract; -import com.microsoft.windowsazure.services.queue.models.CreateMessageOptions; -import com.microsoft.windowsazure.services.queue.models.CreateQueueOptions; -import com.microsoft.windowsazure.services.queue.models.GetQueueMetadataResult; -import com.microsoft.windowsazure.services.queue.models.GetServicePropertiesResult; -import com.microsoft.windowsazure.services.queue.models.ListMessagesOptions; -import com.microsoft.windowsazure.services.queue.models.ListMessagesResult; -import com.microsoft.windowsazure.services.queue.models.ListQueuesOptions; -import com.microsoft.windowsazure.services.queue.models.ListQueuesResult; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesOptions; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesResult; -import com.microsoft.windowsazure.services.queue.models.QueueServiceOptions; -import com.microsoft.windowsazure.services.queue.models.ServiceProperties; -import com.microsoft.windowsazure.services.queue.models.UpdateMessageResult; -import com.sun.jersey.api.client.ClientHandlerException; -import com.sun.jersey.api.client.UniformInterfaceException; - -public class QueueExceptionProcessor implements QueueContract { - private static Log log = LogFactory.getLog(QueueExceptionProcessor.class); - private final QueueContract service; - - @Inject - public QueueExceptionProcessor(QueueRestProxy service) { - this.service = service; - } - - public QueueExceptionProcessor(QueueContract service) { - this.service = service; - } - - public QueueContract withFilter(ServiceFilter filter) { - return new QueueExceptionProcessor(service.withFilter(filter)); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.core.FilterableService# - * withRequestFilterFirst - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public QueueContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter) { - return new QueueExceptionProcessor( - service.withRequestFilterFirst(serviceRequestFilter)); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.core.FilterableService# - * withRequestFilterLast - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public QueueContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter) { - return new QueueExceptionProcessor( - service.withRequestFilterLast(serviceRequestFilter)); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.core.FilterableService# - * withResponseFilterFirst - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public QueueContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter) { - return new QueueExceptionProcessor( - service.withResponseFilterFirst(serviceResponseFilter)); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.core.FilterableService# - * withResponseFilterLast - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public QueueContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter) { - return new QueueExceptionProcessor( - service.withResponseFilterLast(serviceResponseFilter)); - } - - private ServiceException processCatch(ServiceException e) { - log.warn(e.getMessage(), e.getCause()); - return ServiceExceptionFactory.process("queue", e); - } - - public GetServicePropertiesResult getServiceProperties() - throws ServiceException { - try { - return service.getServiceProperties(); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public GetServicePropertiesResult getServiceProperties( - QueueServiceOptions options) throws ServiceException { - try { - return service.getServiceProperties(options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void setServiceProperties(ServiceProperties serviceProperties) - throws ServiceException { - try { - service.setServiceProperties(serviceProperties); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void setServiceProperties(ServiceProperties serviceProperties, - QueueServiceOptions options) throws ServiceException { - try { - service.setServiceProperties(serviceProperties, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void createQueue(String queue) throws ServiceException { - try { - service.createQueue(queue); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void createQueue(String queue, CreateQueueOptions options) - throws ServiceException { - try { - service.createQueue(queue, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void deleteQueue(String queue) throws ServiceException { - try { - service.deleteQueue(queue); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void deleteQueue(String queue, QueueServiceOptions options) - throws ServiceException { - try { - service.deleteQueue(queue, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public ListQueuesResult listQueues() throws ServiceException { - try { - return service.listQueues(); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public ListQueuesResult listQueues(ListQueuesOptions options) - throws ServiceException { - try { - return service.listQueues(options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public GetQueueMetadataResult getQueueMetadata(String queue) - throws ServiceException { - try { - return service.getQueueMetadata(queue); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public GetQueueMetadataResult getQueueMetadata(String queue, - QueueServiceOptions options) throws ServiceException { - try { - return service.getQueueMetadata(queue, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void setQueueMetadata(String queue, HashMap metadata) - throws ServiceException { - try { - service.setQueueMetadata(queue, metadata); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void setQueueMetadata(String queue, - HashMap metadata, QueueServiceOptions options) - throws ServiceException { - try { - service.setQueueMetadata(queue, metadata, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void createMessage(String queue, String messageText) - throws ServiceException { - try { - service.createMessage(queue, messageText); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void createMessage(String queue, String messageText, - CreateMessageOptions options) throws ServiceException { - try { - service.createMessage(queue, messageText, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public UpdateMessageResult updateMessage(String queue, String messageId, - String popReceipt, String messageText, - int visibilityTimeoutInSeconds) throws ServiceException { - try { - return service.updateMessage(queue, messageId, popReceipt, - messageText, visibilityTimeoutInSeconds); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public UpdateMessageResult updateMessage(String queue, String messageId, - String popReceipt, String messageText, - int visibilityTimeoutInSeconds, QueueServiceOptions options) - throws ServiceException { - try { - return service.updateMessage(queue, messageId, popReceipt, - messageText, visibilityTimeoutInSeconds, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public ListMessagesResult listMessages(String queue) - throws ServiceException { - try { - return service.listMessages(queue); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public ListMessagesResult listMessages(String queue, - ListMessagesOptions options) throws ServiceException { - try { - return service.listMessages(queue, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public PeekMessagesResult peekMessages(String queue) - throws ServiceException { - try { - return service.peekMessages(queue); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public PeekMessagesResult peekMessages(String queue, - PeekMessagesOptions options) throws ServiceException { - try { - return service.peekMessages(queue, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void deleteMessage(String queue, String messageId, String popReceipt) - throws ServiceException { - try { - service.deleteMessage(queue, messageId, popReceipt); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void deleteMessage(String queue, String messageId, - String popReceipt, QueueServiceOptions options) - throws ServiceException { - try { - service.deleteMessage(queue, messageId, popReceipt, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void clearMessages(String queue) throws ServiceException { - try { - service.clearMessages(queue); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void clearMessages(String queue, QueueServiceOptions options) - throws ServiceException { - try { - service.clearMessages(queue, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueMessage.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueMessage.java deleted file mode 100644 index 7f5445bcc4ec..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueMessage.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Copyright (c) Microsoft and contributors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.microsoft.windowsazure.services.queue.implementation; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -@XmlRootElement(name = "QueueMessage") -public class QueueMessage { - private String messageText; - - @XmlElement(name = "MessageText") - public String getMessageText() { - return messageText; - } - - public void setMessageText(String messageText) { - this.messageText = messageText; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueRestProxy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueRestProxy.java deleted file mode 100644 index 97da2aa56501..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueRestProxy.java +++ /dev/null @@ -1,519 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.implementation; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -import javax.inject.Inject; -import javax.inject.Named; - -import com.microsoft.windowsazure.core.RFC1123DateConverter; -import com.microsoft.windowsazure.core.UserAgentFilter; -import com.microsoft.windowsazure.core.pipeline.PipelineHelpers; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterRequestAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterResponseAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.HttpURLConnectionClient; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.queue.QueueConfiguration; -import com.microsoft.windowsazure.services.queue.QueueContract; -import com.microsoft.windowsazure.services.queue.models.CreateMessageOptions; -import com.microsoft.windowsazure.services.queue.models.CreateQueueOptions; -import com.microsoft.windowsazure.services.queue.models.GetQueueMetadataResult; -import com.microsoft.windowsazure.services.queue.models.GetServicePropertiesResult; -import com.microsoft.windowsazure.services.queue.models.ListMessagesOptions; -import com.microsoft.windowsazure.services.queue.models.ListMessagesResult; -import com.microsoft.windowsazure.services.queue.models.ListQueuesOptions; -import com.microsoft.windowsazure.services.queue.models.ListQueuesResult; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesOptions; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesResult; -import com.microsoft.windowsazure.services.queue.models.QueueServiceOptions; -import com.microsoft.windowsazure.services.queue.models.ServiceProperties; -import com.microsoft.windowsazure.services.queue.models.UpdateMessageResult; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.WebResource; -import com.sun.jersey.api.client.WebResource.Builder; -import com.sun.jersey.api.client.filter.ClientFilter; - -public class QueueRestProxy implements QueueContract { - // private static Log log = LogFactory.getLog(QueueRestProxy.class); - - private static final String API_VERSION = "2011-08-18"; - private final HttpURLConnectionClient channel; - private final String accountName; - private final String url; - private final RFC1123DateConverter dateMapper; - private final ClientFilter[] filters; - private final SharedKeyFilter sharedKeyFilter; - - @Inject - public QueueRestProxy(HttpURLConnectionClient channel, - @Named(QueueConfiguration.ACCOUNT_NAME) String accountName, - @Named(QueueConfiguration.URI) String url, - SharedKeyFilter sharedKeyFilter, UserAgentFilter userAgentFilter) { - - this.channel = channel; - this.accountName = accountName; - this.url = url; - this.sharedKeyFilter = sharedKeyFilter; - this.dateMapper = new RFC1123DateConverter(); - this.filters = new ClientFilter[0]; - channel.addFilter(sharedKeyFilter); - channel.addFilter(new ClientFilterRequestAdapter(userAgentFilter)); - } - - public QueueRestProxy(HttpURLConnectionClient channel, - ClientFilter[] filters, String accountName, String url, - SharedKeyFilter filter, RFC1123DateConverter dateMapper) { - - this.channel = channel; - this.filters = filters; - this.accountName = accountName; - this.url = url; - this.sharedKeyFilter = filter; - this.dateMapper = dateMapper; - } - - @Override - public QueueContract withFilter(ServiceFilter filter) { - ClientFilter[] currentFilters = filters; - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterAdapter(filter); - return new QueueRestProxy(this.channel, newFilters, this.accountName, - this.url, this.sharedKeyFilter, this.dateMapper); - } - - @Override - public QueueContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter) { - ClientFilter[] currentFilters = filters; - ClientFilter[] newFilters = new ClientFilter[currentFilters.length + 1]; - System.arraycopy(currentFilters, 0, newFilters, 1, - currentFilters.length); - newFilters[0] = new ClientFilterRequestAdapter(serviceRequestFilter); - return new QueueRestProxy(this.channel, newFilters, this.accountName, - this.url, this.sharedKeyFilter, this.dateMapper); - } - - @Override - public QueueContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter) { - ClientFilter[] currentFilters = filters; - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterRequestAdapter( - serviceRequestFilter); - return new QueueRestProxy(this.channel, newFilters, this.accountName, - this.url, this.sharedKeyFilter, this.dateMapper); - } - - @Override - public QueueContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter) { - ClientFilter[] currentFilters = filters; - ClientFilter[] newFilters = new ClientFilter[currentFilters.length + 1]; - System.arraycopy(currentFilters, 0, newFilters, 1, - currentFilters.length); - newFilters[0] = new ClientFilterResponseAdapter(serviceResponseFilter); - return new QueueRestProxy(this.channel, newFilters, this.accountName, - this.url, this.sharedKeyFilter, this.dateMapper); - } - - @Override - public QueueContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter) { - ClientFilter[] currentFilters = filters; - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterResponseAdapter( - serviceResponseFilter); - return new QueueRestProxy(this.channel, newFilters, this.accountName, - this.url, this.sharedKeyFilter, this.dateMapper); - } - - private void throwIfError(ClientResponse r) { - PipelineHelpers.throwIfError(r); - } - - private WebResource addOptionalQueryParam(WebResource webResource, - String key, Object value) { - return PipelineHelpers.addOptionalQueryParam(webResource, key, value); - } - - private WebResource addOptionalQueryParam(WebResource webResource, - String key, int value, int defaultValue) { - return PipelineHelpers.addOptionalQueryParam(webResource, key, value, - defaultValue); - } - - private Builder addOptionalMetadataHeader(Builder builder, - Map metadata) { - return PipelineHelpers.addOptionalMetadataHeader(builder, metadata); - } - - private HashMap getMetadataFromHeaders( - ClientResponse response) { - return PipelineHelpers.getMetadataFromHeaders(response); - } - - private WebResource getResource(QueueServiceOptions options) { - WebResource webResource = channel.resource(url).path("/"); - webResource = addOptionalQueryParam(webResource, "timeout", - options.getTimeout()); - for (ClientFilter filter : filters) { - webResource.addFilter(filter); - } - - return webResource; - } - - @Override - public GetServicePropertiesResult getServiceProperties() - throws ServiceException { - return getServiceProperties(new QueueServiceOptions()); - } - - @Override - public GetServicePropertiesResult getServiceProperties( - QueueServiceOptions options) throws ServiceException { - WebResource webResource = getResource(options).path("/") - .queryParam("resType", "service") - .queryParam("comp", "properties"); - - WebResource.Builder builder = webResource.header("x-ms-version", - API_VERSION); - - GetServicePropertiesResult result = new GetServicePropertiesResult(); - result.setValue(builder.get(ServiceProperties.class)); - return result; - } - - @Override - public void setServiceProperties(ServiceProperties serviceProperties) - throws ServiceException { - setServiceProperties(serviceProperties, new QueueServiceOptions()); - } - - @Override - public void setServiceProperties(ServiceProperties serviceProperties, - QueueServiceOptions options) throws ServiceException { - WebResource webResource = getResource(options).path("/") - .queryParam("resType", "service") - .queryParam("comp", "properties"); - - WebResource.Builder builder = webResource.header("x-ms-version", - API_VERSION); - - builder.put(serviceProperties); - } - - @Override - public void createQueue(String queue) throws ServiceException { - createQueue(queue, new CreateQueueOptions()); - - } - - @Override - public void createQueue(String queue, CreateQueueOptions options) - throws ServiceException { - if (queue == null) { - throw new NullPointerException(); - } - - WebResource webResource = getResource(options).path(queue); - - WebResource.Builder builder = webResource.header("x-ms-version", - API_VERSION); - builder = addOptionalMetadataHeader(builder, options.getMetadata()); - - builder.put(); - } - - @Override - public void deleteQueue(String queue) throws ServiceException { - deleteQueue(queue, new QueueServiceOptions()); - } - - @Override - public void deleteQueue(String queue, QueueServiceOptions options) - throws ServiceException { - if (queue == null) { - throw new NullPointerException(); - } - - WebResource webResource = getResource(options).path(queue); - - WebResource.Builder builder = webResource.header("x-ms-version", - API_VERSION); - - builder.delete(); - } - - @Override - public ListQueuesResult listQueues() throws ServiceException { - return listQueues(new ListQueuesOptions()); - } - - @Override - public ListQueuesResult listQueues(ListQueuesOptions options) - throws ServiceException { - WebResource webResource = getResource(options).path("/").queryParam( - "comp", "list"); - webResource = addOptionalQueryParam(webResource, "prefix", - options.getPrefix()); - webResource = addOptionalQueryParam(webResource, "marker", - options.getMarker()); - webResource = addOptionalQueryParam(webResource, "maxresults", - options.getMaxResults(), 0); - if (options.isIncludeMetadata()) { - webResource = webResource.queryParam("include", "metadata"); - } - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - return builder.get(ListQueuesResult.class); - } - - @Override - public GetQueueMetadataResult getQueueMetadata(String queue) - throws ServiceException { - return getQueueMetadata(queue, new QueueServiceOptions()); - } - - @Override - public GetQueueMetadataResult getQueueMetadata(String queue, - QueueServiceOptions options) throws ServiceException { - if (queue == null) { - throw new NullPointerException(); - } - - WebResource webResource = getResource(options).path(queue).queryParam( - "comp", "metadata"); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - ClientResponse response = builder.get(ClientResponse.class); - throwIfError(response); - - GetQueueMetadataResult result = new GetQueueMetadataResult(); - result.setApproximateMessageCount(Integer.parseInt(response - .getHeaders().getFirst("x-ms-approximate-messages-count"))); - result.setMetadata(getMetadataFromHeaders(response)); - - return result; - } - - @Override - public void setQueueMetadata(String queue, HashMap metadata) - throws ServiceException { - setQueueMetadata(queue, metadata, new QueueServiceOptions()); - } - - @Override - public void setQueueMetadata(String queue, - HashMap metadata, QueueServiceOptions options) - throws ServiceException { - if (queue == null) { - throw new NullPointerException(); - } - - WebResource webResource = getResource(options).path(queue).queryParam( - "comp", "metadata"); - - WebResource.Builder builder = webResource.header("x-ms-version", - API_VERSION); - builder = addOptionalMetadataHeader(builder, metadata); - - builder.put(); - } - - @Override - public void createMessage(String queue, String messageText) - throws ServiceException { - createMessage(queue, messageText, new CreateMessageOptions()); - } - - @Override - public void createMessage(String queue, String messageText, - CreateMessageOptions options) throws ServiceException { - if (queue == null) { - throw new NullPointerException("queue"); - } - if (messageText == null) { - throw new NullPointerException("messageText"); - } - - WebResource webResource = getResource(options).path(queue).path( - "messages"); - webResource = addOptionalQueryParam(webResource, "visibilitytimeout", - options.getVisibilityTimeoutInSeconds()); - webResource = addOptionalQueryParam(webResource, "messagettl", - options.getTimeToLiveInSeconds()); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - QueueMessage queueMessage = new QueueMessage(); - queueMessage.setMessageText(messageText); - - builder.post(queueMessage); - } - - @Override - public UpdateMessageResult updateMessage(String queue, String messageId, - String popReceipt, String messageText, - int visibilityTimeoutInSeconds) throws ServiceException { - return updateMessage(queue, messageId, popReceipt, messageText, - visibilityTimeoutInSeconds, new QueueServiceOptions()); - } - - @Override - public UpdateMessageResult updateMessage(String queue, String messageId, - String popReceipt, String messageText, - int visibilityTimeoutInSeconds, QueueServiceOptions options) - throws ServiceException { - if (queue == null) { - throw new NullPointerException("queue"); - } - if (messageId == null) { - throw new NullPointerException("messageId"); - } - if (messageText == null) { - throw new NullPointerException("messageText"); - } - - WebResource webResource = getResource(options).path(queue) - .path("messages").path(messageId); - webResource = addOptionalQueryParam(webResource, "popreceipt", - popReceipt); - webResource = addOptionalQueryParam(webResource, "visibilitytimeout", - visibilityTimeoutInSeconds); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - QueueMessage queueMessage = new QueueMessage(); - queueMessage.setMessageText(messageText); - - ClientResponse response = builder.put(ClientResponse.class, - queueMessage); - throwIfError(response); - - UpdateMessageResult result = new UpdateMessageResult(); - result.setPopReceipt(response.getHeaders().getFirst("x-ms-popreceipt")); - result.setTimeNextVisible(dateMapper.parse(response.getHeaders() - .getFirst("x-ms-time-next-visible"))); - return result; - } - - @Override - public ListMessagesResult listMessages(String queue) - throws ServiceException { - return listMessages(queue, new ListMessagesOptions()); - } - - @Override - public ListMessagesResult listMessages(String queue, - ListMessagesOptions options) throws ServiceException { - if (queue == null) { - throw new NullPointerException(); - } - - WebResource webResource = getResource(options).path(queue).path( - "messages"); - webResource = addOptionalQueryParam(webResource, "visibilitytimeout", - options.getVisibilityTimeoutInSeconds()); - webResource = addOptionalQueryParam(webResource, "numofmessages", - options.getNumberOfMessages()); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - return builder.get(ListMessagesResult.class); - } - - @Override - public PeekMessagesResult peekMessages(String queue) - throws ServiceException { - return peekMessages(queue, new PeekMessagesOptions()); - } - - @Override - public PeekMessagesResult peekMessages(String queue, - PeekMessagesOptions options) throws ServiceException { - if (queue == null) { - throw new NullPointerException(); - } - - WebResource webResource = getResource(options).path(queue) - .path("messages").queryParam("peekonly", "true"); - webResource = addOptionalQueryParam(webResource, "numofmessages", - options.getNumberOfMessages()); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - return builder.get(PeekMessagesResult.class); - } - - @Override - public void deleteMessage(String queue, String messageId, String popReceipt) - throws ServiceException { - deleteMessage(queue, messageId, popReceipt, new QueueServiceOptions()); - } - - @Override - public void deleteMessage(String queue, String messageId, - String popReceipt, QueueServiceOptions options) - throws ServiceException { - if (queue == null) { - throw new NullPointerException(); - } - if (messageId == null) { - throw new NullPointerException(); - } - - WebResource webResource = getResource(options).path(queue) - .path("messages").path(messageId); - webResource = addOptionalQueryParam(webResource, "popreceipt", - popReceipt); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - builder.delete(); - } - - @Override - public void clearMessages(String queue) throws ServiceException { - clearMessages(queue, new QueueServiceOptions()); - } - - @Override - public void clearMessages(String queue, QueueServiceOptions options) - throws ServiceException { - if (queue == null) { - throw new NullPointerException(); - } - - WebResource webResource = getResource(options).path(queue).path( - "messages"); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - builder.delete(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/SharedKeyFilter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/SharedKeyFilter.java deleted file mode 100644 index 9df31e5344ac..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/SharedKeyFilter.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * - * Copyright (c) Microsoft and contributors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.microsoft.windowsazure.services.queue.implementation; - -import javax.inject.Named; - -import com.microsoft.windowsazure.services.queue.QueueConfiguration; - -public class SharedKeyFilter extends - com.microsoft.windowsazure.services.blob.implementation.SharedKeyFilter { - public SharedKeyFilter( - @Named(QueueConfiguration.ACCOUNT_NAME) String accountName, - @Named(QueueConfiguration.ACCOUNT_KEY) String accountKey) { - super(accountName, accountKey); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/SharedKeyLiteFilter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/SharedKeyLiteFilter.java deleted file mode 100644 index a04f1437ebe3..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/SharedKeyLiteFilter.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * - * Copyright (c) Microsoft and contributors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.microsoft.windowsazure.services.queue.implementation; - -import javax.inject.Named; - -import com.microsoft.windowsazure.services.queue.QueueConfiguration; - -public class SharedKeyLiteFilter - extends - com.microsoft.windowsazure.services.blob.implementation.SharedKeyLiteFilter { - public SharedKeyLiteFilter( - @Named(QueueConfiguration.ACCOUNT_NAME) String accountName, - @Named(QueueConfiguration.ACCOUNT_KEY) String accountKey) { - super(accountName, accountKey); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/package.html deleted file mode 100644 index 7cfd5ada0c07..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the implementation of the queue service classes and utilities. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/CreateMessageOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/CreateMessageOptions.java deleted file mode 100644 index 9520eaf05ce9..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/CreateMessageOptions.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - - -/** - * Represents the options that may be set on the Queue service for - * {@link com.microsoft.windowsazure.services.queue.QueueContract#createMessage(String, String, CreateMessageOptions) - * createMessage} requests. These options include a server response timeout for - * the request, the visibility timeout to set on the created message, and the - * time-to-live value to set on the message. - */ -public class CreateMessageOptions extends QueueServiceOptions { - private Integer visibilityTimeoutInSeconds; - private Integer timeToLiveInSeconds; - - /** - * Sets the server request timeout value associated with this - * {@link CreateMessageOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CreateMessageOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CreateMessageOptions} instance. - */ - @Override - public CreateMessageOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the message visibility timeout in seconds value in this - * {@link CreateMessageOptions} instance. to set on messages when making a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#createMessage(String, String, CreateMessageOptions) - * createMessage} request. - * - * @return The message visibility timeout in seconds. - */ - public Integer getVisibilityTimeoutInSeconds() { - return visibilityTimeoutInSeconds; - } - - /** - * Sets the message visibility timeout in seconds value to set on messages - * when making a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#createMessage(String, String, CreateMessageOptions) - * createMessage} request. This allows messages to be loaded into the queue - * but not become visible until the visibility timeout has passed. Valid - * visibility timeout values range from 0 to 604800 seconds (0 to 7 days), - * and must be less than the time-to-live value. - *

- * The visibilityTimeoutInSeconds value only affects calls made on - * methods where this {@link CreateMessageOptions} instance is passed as a - * parameter. - * - * @param visibilityTimeoutInSeconds - * The length of time during which the message will be invisible, - * starting when it is added to the queue, or 0 to make the - * message visible immediately. This value must be greater than - * or equal to zero and less than or equal to the time-to-live - * value. - * @return A reference to this {@link CreateMessageOptions} instance. - */ - public CreateMessageOptions setVisibilityTimeoutInSeconds( - Integer visibilityTimeoutInSeconds) { - this.visibilityTimeoutInSeconds = visibilityTimeoutInSeconds; - return this; - } - - /** - * Gets the message time-to-live in seconds value associated with this - * {@link CreateMessageOptions} instance. - * - * @return The message time-to-live value in seconds. - */ - public Integer getTimeToLiveInSeconds() { - return timeToLiveInSeconds; - } - - /** - * Sets the message time-to-live timeout value to set on messages when - * making a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#createMessage(String, String, CreateMessageOptions) - * createMessage} request. This is the maximum duration in seconds for the - * message to remain in the queue after it is created. Valid - * timeToLiveInSeconds values range from 0 to 604800 seconds (0 to - * 7 days), with the default value set to seven days. - *

- * The timeToLiveInSeconds value only affects calls made on methods - * where this {@link CreateMessageOptions} instance is passed as a - * parameter. - * - * @param timeToLiveInSeconds - * The maximum time to allow the message to be in the queue, in - * seconds. - * @return A reference to this {@link CreateMessageOptions} instance. - */ - public CreateMessageOptions setTimeToLiveInSeconds( - Integer timeToLiveInSeconds) { - this.timeToLiveInSeconds = timeToLiveInSeconds; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/CreateQueueOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/CreateQueueOptions.java deleted file mode 100644 index 0f31007b3713..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/CreateQueueOptions.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - -import java.util.HashMap; - -/** - * Represents the options that may be set on a queue when created in the storage - * service with a {@link com.microsoft.windowsazure.services.queue.QueueContract#createQueue(String, CreateQueueOptions) - * createQueue} request. These options include a server response timeout for the - * request and the metadata to associate with the created queue. - */ -public class CreateQueueOptions extends QueueServiceOptions { - private HashMap metadata = new HashMap(); - - /** - * Sets the server request timeout value associated with this - * {@link CreateQueueOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CreateQueueOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CreateQueueOptions} instance. - */ - @Override - public CreateQueueOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the metadata collection of key-value {@link String} pairs to set on - * a queue when the queue is created. - * - * @return A {@link java.util.HashMap} of key-value {@link String} pairs - * containing the metadata to set on the queue. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Sets the metadata collection of key-value {@link String} pairs to set on - * a queue when the queue is created. Queue metadata is a user-defined - * collection of key-value pairs that is opaque to the server. - *

- * The metadata value is only added to a newly created queue where - * this {@link CreateQueueOptions} instance is passed as a parameter. - * - * @param metadata - * The {@link java.util.HashMap} of key-value {@link String} - * pairs containing the metadata to set on the queue. - * @return A reference to this {@link CreateQueueOptions} instance. - */ - public CreateQueueOptions setMetadata(HashMap metadata) { - this.metadata = metadata; - return this; - } - - /** - * Adds a key-value pair of {@link String} to the metadata collection to set - * on a queue when the queue is created. Queue metadata is a user-defined - * collection of key-value pairs that is opaque to the server. If the key - * already exists in the metadata collection, the value parameter will - * overwrite the existing value paired with that key without notification. - *

- * The updated metadata is only added to a newly created queue where this - * {@link CreateQueueOptions} instance is passed as a parameter. - * - * @param key - * A {@link String} containing the key part of the key-value pair - * to add to the metadata. - * @param value - * A {@link String} containing the value part of the key-value - * pair to add to the metadata. - * @return A reference to this {@link CreateQueueOptions} instance. - */ - public CreateQueueOptions addMetadata(String key, String value) { - this.metadata.put(key, value); - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/GetQueueMetadataResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/GetQueueMetadataResult.java deleted file mode 100644 index c8729f40f97d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/GetQueueMetadataResult.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - -import java.util.HashMap; - -/** - * A wrapper class for the result returned from a Queue Service REST API - * operation to get queue metadata. This is returned by calls to implementations - * of {@link com.microsoft.windowsazure.services.queue.QueueContract#getQueueMetadata(String)} and - * {@link com.microsoft.windowsazure.services.queue.QueueContract#getQueueMetadata(String, QueueServiceOptions)}. - *

- * See the Get - * Queue Metadata documentation on MSDN for details of the underlying Queue - * Service REST API operation. - */ -public class GetQueueMetadataResult { - private long approximateMessageCount; - private HashMap metadata; - - /** - * Gets the queue's approximate message count, as reported by the server. - * - * @return The queue's approximate message count. - */ - public long getApproximateMessageCount() { - return approximateMessageCount; - } - - /** - * Reserved for internal use. This method is invoked by the API as part of - * the response generation from the Queue Service REST API operation to set - * the value for the approximate message count returned by the server. - * - * @param approximateMessageCount - * The queue's approximate message count to set. - */ - public void setApproximateMessageCount(long approximateMessageCount) { - this.approximateMessageCount = approximateMessageCount; - } - - /** - * Gets the metadata collection of key-value {@link String} pairs currently - * set on a queue. Queue metadata is a user-defined collection of key-value - * pairs that is opaque to the server. - * - * @return A {@link java.util.HashMap} of key-value {@link String} pairs - * containing the metadata set on the queue. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Reserved for internal use. This method is invoked by the API as part of - * the response generation from the Queue Service REST API operation to set - * the value from the queue metadata returned by the server. - * - * @param metadata - * A {@link java.util.HashMap} of key-value {@link String} pairs - * containing the metadata set on the queue. - */ - public void setMetadata(HashMap metadata) { - this.metadata = metadata; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/GetServicePropertiesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/GetServicePropertiesResult.java deleted file mode 100644 index bc2144dfdde9..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/GetServicePropertiesResult.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - - -/** - * A wrapper class for the service properties returned in response to Queue - * Service REST API operations. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.queue.QueueContract#getServiceProperties()} and - * {@link com.microsoft.windowsazure.services.queue.QueueContract#getServiceProperties(QueueServiceOptions)}. - *

- * See the Get - * Queue Service Properties documentation on MSDN for details of the - * underlying Queue Service REST API operation. - */ -public class GetServicePropertiesResult { - private ServiceProperties value; - - /** - * Gets a {@link ServiceProperties} instance containing the service property - * values associated with the storage account. - *

- * Modifying the values in the {@link ServiceProperties} instance returned - * does not affect the values associated with the storage account. To change - * the values in the storage account, call the - * {@link com.microsoft.windowsazure.services.queue.QueueContract#setServiceProperties} method and pass the modified - * {@link ServiceProperties} instance as a parameter. - * - * @return A {@link ServiceProperties} instance containing the property - * values associated with the storage account. - */ - public ServiceProperties getValue() { - return value; - } - - /** - * Reserved for internal use. Sets the value of the - * {@link ServiceProperties} instance associated with a storage service call - * result. This method is invoked by the API to store service properties - * returned by a call to a REST operation and is not intended for public - * use. - * - * @param value - * A {@link ServiceProperties} instance containing the property - * values associated with the storage account. - */ - public void setValue(ServiceProperties value) { - this.value = value; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListMessagesOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListMessagesOptions.java deleted file mode 100644 index 7e6515df3700..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListMessagesOptions.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listMessages(String, ListMessagesOptions) listMessages} - * request. These options include a server response timeout for the request, the - * number of messages to retrieve from the queue, and the visibility timeout to - * set on the retrieved messages. - */ -public class ListMessagesOptions extends QueueServiceOptions { - private Integer numberOfMessages; - private Integer visibilityTimeoutInSeconds; - - /** - * Sets the server request timeout value associated with this - * {@link ListMessagesOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link ListMessagesOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link ListMessagesOptions} instance. - */ - @Override - public ListMessagesOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the number of messages to request from the queue with this - * {@link ListMessagesOptions} instance. - * - * @return The number of messages requested. - */ - public Integer getNumberOfMessages() { - return numberOfMessages; - } - - /** - * Sets the number of messages to request from the queue with this - * {@link ListMessagesOptions} instance. - *

- * The numberOfMessages value is only used for requests where this - * {@link ListMessagesOptions} instance is passed as a parameter. - * - * @param numberOfMessages - * The number of messages to request. The valid range of values - * is 0 to 32. - * @return A reference to this {@link ListMessagesOptions} instance. - */ - public ListMessagesOptions setNumberOfMessages(Integer numberOfMessages) { - this.numberOfMessages = numberOfMessages; - return this; - } - - /** - * Gets the visibility timeout to set on the messages requested from the - * queue with this {@link ListMessagesOptions} instance. - * - * @return The visibility timeout to set on the messages requested from the - * queue. - */ - public Integer getVisibilityTimeoutInSeconds() { - return visibilityTimeoutInSeconds; - } - - /** - * Sets the visibility timeout value to set on the messages requested from - * the queue with this {@link ListMessagesOptions} instance. - *

- * The visibilityTimeoutInSeconds value is only used for requests - * where this {@link ListMessagesOptions} instance is passed as a parameter. - * - * @param visibilityTimeoutInSeconds - * The visibility timeout to set on the messages requested from - * the queue. The valid range of values is 0 to 604800 seconds. - * @return A reference to this {@link ListMessagesOptions} instance. - */ - public ListMessagesOptions setVisibilityTimeoutInSeconds( - Integer visibilityTimeoutInSeconds) { - this.visibilityTimeoutInSeconds = visibilityTimeoutInSeconds; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListMessagesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListMessagesResult.java deleted file mode 100644 index 1d2b26f26d1d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListMessagesResult.java +++ /dev/null @@ -1,262 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.core.RFC1123DateAdapter; - -/** - * A wrapper class for the result returned from a Queue Service REST API - * operation to get a list of messages. This is returned by calls to - * implementations of {@link com.microsoft.windowsazure.services.queue.QueueContract#listMessages(String)} and - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listMessages(String, ListMessagesOptions)}. - *

- * See the Get - * Messages documentation on MSDN for details of the underlying Queue - * Service REST API operation. - */ -@XmlRootElement(name = "QueueMessagesList") -public class ListMessagesResult { - private List queueMessages = new ArrayList(); - - /** - * Gets the list of queue messages returned by a {@link com.microsoft.windowsazure.services.queue.QueueContract} - * .listMessages request. The queue messages returned have their - * visibility timeout set to allow for processing by the client. The client - * must delete the messages once processing is complete, or they will become - * visible in the queue when the visibility timeout period is over. - * - * @return A {@link List} of {@link QueueMessage} instances representing the - * messages returned by the request. - */ - @XmlElement(name = "QueueMessage") - public List getQueueMessages() { - return queueMessages; - } - - /** - * Reserved for internal use. Sets the list of queue messages returned by a - * {@link com.microsoft.windowsazure.services.queue.QueueContract} .listMessages request. This method is - * invoked by the API as part of the response generation from the Queue - * Service REST API operation to set the value from the queue message list - * returned by the server. - * - * @param queueMessages - * A {@link List} of {@link QueueMessage} instances representing - * the messages returned by the request. - */ - public void setQueueMessages(List queueMessages) { - this.queueMessages = queueMessages; - } - - /** - * Represents a message in the queue returned by the server. A - * {@link QueueMessage} instance contains a copy of the queue message data - * in the storage service as of the time the message was requested. - */ - public static class QueueMessage { - private String messageId; - private Date insertionDate; - private Date expirationDate; - private String popReceipt; - private Date timeNextVisible; - private int dequeueCount; - private String messageText; - - /** - * Gets the message ID for the message in the queue. The message ID is a - * value that is opaque to the client that must be used along with the - * pop receipt to validate an update message or delete message - * operation. - * - * @return A {@link String} containing the message ID. - */ - @XmlElement(name = "MessageId") - public String getMessageId() { - return messageId; - } - - /** - * Reserved for internal use. Sets the value of the message ID for the - * queue message. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set - * the value with the message ID returned by the server. - * - * @param messageId - * A {@link String} containing the message ID. - */ - public void setMessageId(String messageId) { - this.messageId = messageId; - } - - /** - * Gets the {@link Date} when this message was added to the queue. - * - * @return The {@link Date} when this message was added to the queue. - */ - @XmlElement(name = "InsertionTime") - @XmlJavaTypeAdapter(RFC1123DateAdapter.class) - public Date getInsertionDate() { - return insertionDate; - } - - /** - * Reserved for internal use. Sets the value of the insertion time for - * the queue message. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set - * the value with the insertion time returned by the server. - * - * @param insertionDate - * The {@link Date} when this message was added to the queue. - */ - public void setInsertionDate(Date insertionDate) { - this.insertionDate = insertionDate; - } - - /** - * Gets the {@link Date} when this message will expire and be - * automatically removed from the queue. - * - * @return The {@link Date} when this message will expire. - */ - @XmlElement(name = "ExpirationTime") - @XmlJavaTypeAdapter(RFC1123DateAdapter.class) - public Date getExpirationDate() { - return expirationDate; - } - - /** - * Reserved for internal use. Sets the value of the expiration time for - * the queue message. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set - * the value with the expiration time returned by the server. - * - * @param expirationDate - * The {@link Date} when this message will expire. - */ - public void setExpirationDate(Date expirationDate) { - this.expirationDate = expirationDate; - } - - /** - * Gets the pop receipt value for the queue message. The pop receipt is - * a value that is opaque to the client that must be used along with the - * message ID to validate an update message or delete message operation. - * - * @return A {@link String} containing the pop receipt value for the - * queue message. - */ - @XmlElement(name = "PopReceipt") - public String getPopReceipt() { - return popReceipt; - } - - /** - * Reserved for internal use. Sets the value of the pop receipt for the - * queue message. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set - * the value with the pop receipt returned by the server. - * - * @param popReceipt - * A {@link String} containing the pop receipt value for the - * queue message. - */ - public void setPopReceipt(String popReceipt) { - this.popReceipt = popReceipt; - } - - /** - * Gets the {@link Date} when this message will become visible in the - * queue. - * - * @return The {@link Date} when this message will become visible in the - * queue. - */ - @XmlElement(name = "TimeNextVisible") - @XmlJavaTypeAdapter(RFC1123DateAdapter.class) - public Date getTimeNextVisible() { - return timeNextVisible; - } - - /** - * Reserved for internal use. Sets the value of the time the message - * will become visible. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set - * the value with the time next visible returned by the server. - * - * @param timeNextVisible - * The {@link Date} when this message will become visible in - * the queue. - */ - public void setTimeNextVisible(Date timeNextVisible) { - this.timeNextVisible = timeNextVisible; - } - - /** - * Gets the number of times this queue message has been retrieved with a - * list messages operation. - * - * @return The number of times this queue message has been retrieved. - */ - @XmlElement(name = "DequeueCount") - public int getDequeueCount() { - return dequeueCount; - } - - /** - * Reserved for internal use. Sets the value of the dequeue count of the - * message. This method is invoked by the API as part of the response - * generation from the Queue Service REST API operation to set the value - * with the queue message dequeue count returned by the server. - * - * @param dequeueCount - * The number of times this queue message has been retrieved. - */ - public void setDequeueCount(int dequeueCount) { - this.dequeueCount = dequeueCount; - } - - /** - * Gets the {@link String} containing the content of the queue message. - * - * @return A {@link String} containing the content of the queue message. - */ - @XmlElement(name = "MessageText") - public String getMessageText() { - return messageText; - } - - /** - * Reserved for internal use. Sets the {@link String} containing the - * content of the message. This method is invoked by the API as part of - * the response generation from the Queue Service REST API operation to - * set the value with the queue message content returned by the server. - * - * @param messageText - * A {@link String} containing the content of the message. - */ - public void setMessageText(String messageText) { - this.messageText = messageText; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListQueuesOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListQueuesOptions.java deleted file mode 100644 index 3b6e1deee6b7..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListQueuesOptions.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - - -/** - * Represents the options that may be set on the Queue service for - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions)} requests. These options - * include a server response timeout for the request, a prefix to match queue - * names to return, a marker to specify where to resume a list queues query, the - * maximum number of queues to return in a single response, and whether to - * include queue metadata with the response. - */ -public class ListQueuesOptions extends QueueServiceOptions { - private String prefix; - private String marker; - private int maxResults; - private boolean includeMetadata; - - /** - * Sets the server request timeout value associated with this - * {@link ListQueuesOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link ListQueuesOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link ListQueuesOptions} instance. - */ - @Override - public ListQueuesOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the prefix {@link String} used to match queue names to return in a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} request. - * - * @return The prefix {@link String} used to match queue names to return in - * a {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} - * request. - */ - public String getPrefix() { - return prefix; - } - - /** - * Sets the prefix {@link String} to use to match queue names to return in a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} request. - *

- * The prefix value only affects calls made on methods where this - * {@link ListQueuesOptions} instance is passed as a parameter. - * - * @param prefix - * The prefix {@link String} to use to match queue names to - * return in a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} - * request. - * @return A reference to this {@link ListQueuesOptions} instance. - */ - public ListQueuesOptions setPrefix(String prefix) { - this.prefix = prefix; - return this; - } - - /** - * Gets a {@link String} value that identifies the beginning of the list of - * queues to be returned with a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} request. - *

- * The {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} method - * returns a NextMarker element within the response if the - * list returned was not complete, which can be accessed with the - * {@link ListQueuesResult#getNextMarker()} method. This opaque value may - * then be set on a {@link ListQueuesOptions} instance with a call to - * {@link ListQueuesOptions#setMarker(String) setMarker} to be used in a - * subsequent {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} - * call to request the next portion of the list of queues. - * - * @return The marker value that identifies the beginning of the list of - * queues to be returned. - */ - public String getMarker() { - return marker; - } - - /** - * Sets a {@link String} marker value that identifies the beginning of the - * list of queues to be returned with a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} request. - *

- * The {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} method - * returns a NextMarker element within the response if the - * list returned was not complete, which can be accessed with the - * {@link ListQueuesResult#getNextMarker()} method. This opaque value may - * then be set on a {@link ListQueuesOptions} instance with a call to - * {@link ListQueuesOptions#setMarker(String) setMarker} to be used in a - * subsequent {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} - * call to request the next portion of the list of queues. - * - * @param marker - * The {@link String} marker value to set. - * @return A reference to this {@link ListQueuesOptions} instance. - */ - public ListQueuesOptions setMarker(String marker) { - this.marker = marker; - return this; - } - - /** - * Gets the maximum number of queues to return with a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} request. - * If the value is not specified, the server will return up to 5,000 items. - * - * @return The maximum number of queues to return. - */ - public int getMaxResults() { - return maxResults; - } - - /** - * Sets the maximum number of queues to return with a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} request. - * If the value is not specified, by default the server will return up to - * 5,000 items. - *

- * The maxResults value only affects calls made on methods where this - * {@link ListQueuesOptions} instance is passed as a parameter. - * - * @param maxResults - * The maximum number of queues to return. - * @return A reference to this {@link ListQueuesOptions} instance. - */ - public ListQueuesOptions setMaxResults(int maxResults) { - this.maxResults = maxResults; - return this; - } - - /** - * Gets a flag indicating whether to return metadata with a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} request. - * - * @return true to return metadata. - */ - public boolean isIncludeMetadata() { - return includeMetadata; - } - - /** - * Sets a flag indicating whether to return metadata with a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} request. - * - * @param includeMetadata - * true to return metadata. - * @return A reference to this {@link ListQueuesOptions} instance. - */ - public ListQueuesOptions setIncludeMetadata(boolean includeMetadata) { - this.includeMetadata = includeMetadata; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListQueuesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListQueuesResult.java deleted file mode 100644 index bba9354d417e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListQueuesResult.java +++ /dev/null @@ -1,332 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.services.blob.implementation.MetadataAdapter; - -/** - * A wrapper class for the results returned in response to Queue service REST - * API operations to list queues. This is returned by calls to implementations - * of {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues()} and - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions)}. - *

- * See the List Queues documentation on MSDN for details of the underlying Queue - * service REST API operation. - */ -@XmlRootElement(name = "EnumerationResults") -public class ListQueuesResult { - private List queues = new ArrayList(); - private String accountName; - private String prefix; - private String marker; - private String nextMarker; - private int maxResults; - - /** - * Gets the list of queues returned by a {@link com.microsoft.windowsazure.services.queue.QueueContract} - * .listQueues request. - * - * @return A {@link List} of {@link Queue} instances representing the queues - * returned by the request. - */ - @XmlElementWrapper(name = "Queues") - @XmlElement(name = "Queue") - public List getQueues() { - return queues; - } - - /** - * Reserved for internal use. Sets the list of queues returned by a - * {@link com.microsoft.windowsazure.services.queue.QueueContract}.listQueues request. This method is invoked - * by the API as part of the response generation from the Queue service REST - * API operation to set the value from the queue list returned by the - * server. - * - * @param value - * A {@link List} of {@link Queue} instances representing the - * queues returned by the request. - */ - public void setQueues(List value) { - this.queues = value; - } - - /** - * Gets the base URI for Queue service REST API operations on the storage - * account. The URI consists of the protocol along with the DNS prefix name - * for the account followed by ".queue.core.windows.net". For example, if - * the DNS prefix name for the storage account is "myaccount" then the value - * returned by this method is "http://myaccount.queue.core.windows.net". - * - * @return A {@link String} containing the base URI for Queue service REST - * API operations on the storage account. - */ - @XmlAttribute(name = "AccountName") - public String getAccountName() { - return accountName; - } - - /** - * Reserved for internal use. Sets the base URI for Queue service REST API - * operations on the storage account. This method is invoked by the API as - * part of the response generation from the Queue service REST API operation - * to set the value from the response returned by the server. - * - * @param accountName - * A {@link String} containing the base URI for Queue service - * REST API operations on the storage account. - */ - public void setAccountName(String accountName) { - this.accountName = accountName; - } - - /** - * Gets the prefix {@link String} used to qualify the results returned by - * the {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} - * request. Only queues with names that start with the prefix are returned - * by the request. By default, the prefix is empty and all queues are - * returned. - * - * @return The {@link String} prefix used to qualify the names of the queues - * returned. - */ - @XmlElement(name = "Prefix") - public String getPrefix() { - return prefix; - } - - /** - * Reserved for internal use. Sets the prefix {@link String} used to qualify - * the results returned by the Queue service REST API list queues operation - * invoked with a call to - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues}. This - * method is invoked by the API as part of the response generation from the - * Queue service REST API operation to set the value from the - * Prefix element returned by the server. - * - * @param prefix - * The {@link String} prefix used to qualify the names of the - * queues returned. - */ - public void setPrefix(String prefix) { - this.prefix = prefix; - } - - /** - * Gets the marker value for the beginning of the queue results returned by - * the {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} - * request. The marker is used by the server to specify the place to resume - * a query for queues. The marker value is a {@link String} opaque to the - * client. A {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} - * request response may include a NextMarker value if there - * are more queue results than can be returned in a single response. Call - * the {@link ListQueuesResult#getNextMarker() getNextMarker} method to get - * this value. The client can request the next set of queue results by - * setting the marker to this value in the {@link ListQueuesOptions} - * parameter. By default, this value is empty and the server responds with - * the first queues that match the request. - * - * @return A {@link String} containing the marker value used for the - * response. - */ - @XmlElement(name = "Marker") - public String getMarker() { - return marker; - } - - /** - * Reserved for internal use. Sets the marker value specifying the beginning - * of the results returned by the Queue service REST API list queues - * operation invoked with a call to - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues}. This - * method is invoked by the API as part of the response generation from the - * Queue service REST API operation to set the value from the - * Marker element returned by the server. - * - * @param marker - * A {@link String} containing the marker value used for the - * response. - */ - public void setMarker(String marker) { - this.marker = marker; - } - - /** - * Gets the next marker value needed to retrieve additional queues. If more - * queues are available that satisfy a listQueues request than can - * be returned in the response, the server generates a marker value to - * specify the beginning of the queues to return in a subsequent request. - * The client can request the next set of queue results by setting the - * marker to this value in the {@link ListQueuesOptions} parameter. This - * value is empty if there are no more queues that satisfy the request than - * are included in the response. - * - * @return A {@link String} containing the marker value to use to resume the - * list queues request. - */ - @XmlElement(name = "NextMarker") - public String getNextMarker() { - return nextMarker; - } - - /** - * Reserved for internal use. Sets the next marker value specifying the - * place to resume a list queues query if more results are available than - * have been returned by the Queue service REST API list queues operation - * response. This method is invoked by the API as part of the response - * generation from the Queue service REST API operation to set the value - * from the NextMarker element returned by the server. - * - * @param nextMarker - * A {@link String} containing the marker value to use to resume - * the list queues request. - */ - public void setNextMarker(String nextMarker) { - this.nextMarker = nextMarker; - } - - /** - * Gets the value specified for the number of queue results to return for - * the {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} - * request. The server will not return more than this number of queues in - * the response. If the value is not specified, the server will return up to - * 5,000 items. - *

- * If there are more queues available that match the request than the number - * returned, the response will include a next marker value to specify the - * beginning of the queues to return in a subsequent request. Call the - * {@link ListQueuesResult#getNextMarker() getNextMarker} method to get this - * value. The client can request the next set of queue results by setting - * the marker to this value in the {@link ListQueuesOptions} parameter. - * - * @return The maximum number of results to return specified by the request. - */ - @XmlElement(name = "MaxResults") - public int getMaxResults() { - return maxResults; - } - - /** - * Reserved for internal use. Sets the value returned by the Queue service - * REST API list queues operation response for the maximum number of queues - * to return. This method is invoked by the API as part of the response - * generation from the Queue service REST API operation to set the value - * from the MaxResults element returned by the server. - * - * @param maxResults - * The maximum number of results to return specified by the - * request. - */ - public void setMaxResults(int maxResults) { - this.maxResults = maxResults; - } - - /** - * Represents a queue in the storage account returned by the server. A - * {@link Queue} instance contains a copy of the queue name, URI, and - * metadata in the storage service as of the time the queue was requested. - */ - public static class Queue { - private String name; - private String url; - private HashMap metadata = new HashMap(); - - /** - * Gets the name of this queue. - * - * @return A {@link String} containing the name of this queue. - */ - @XmlElement(name = "Name") - public String getName() { - return name; - } - - /** - * Reserved for internal use. Sets the name of this queue. This method - * is invoked by the API as part of the response generation from the - * Queue service REST API operation to set the value from the - * Name element returned by the server. - * - * @param name - * A {@link String} containing the name of this queue. - */ - public void setName(String name) { - this.name = name; - } - - /** - * Gets the URI for Queue service REST API operations on this queue. - * - * @return A {@link String} containing the URI for Queue service REST - * API operations on this queue. - */ - @XmlElement(name = "Url") - public String getUrl() { - return url; - } - - /** - * Reserved for internal use. Sets the URI of this queue. This method is - * invoked by the API as part of the response generation from the Queue - * service REST API operation to set the value from the - * Url element returned by the server. - * - * @param url - * A {@link String} containing the URI for Queue service REST - * API operations on this queue. - */ - public void setUrl(String url) { - this.url = url; - } - - /** - * Gets the metadata collection of key-value {@link String} pairs - * associated with this queue. - * - * @return A {@link java.util.HashMap} of key-value {@link String} pairs - * containing the queue metadata. - */ - @XmlElement(name = "Metadata") - @XmlJavaTypeAdapter(MetadataAdapter.class) - public HashMap getMetadata() { - return metadata; - } - - /** - * Reserved for internal use. Sets the metadata of this queue. This - * method is invoked by the API as part of the response generation from - * the Queue service REST API operation to set the value from the - * Metadata element returned by the server. - * - * @param metadata - * A {@link java.util.HashMap} of key-value {@link String} - * pairs containing the queue metadata. - */ - public void setMetadata(HashMap metadata) { - this.metadata = metadata; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/PeekMessagesOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/PeekMessagesOptions.java deleted file mode 100644 index a4f7c0dca208..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/PeekMessagesOptions.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#peekMessages(String, PeekMessagesOptions) peekMessages} - * request. These options include a server response timeout for the request and - * the number of messages to peek from the queue. - */ -public class PeekMessagesOptions extends QueueServiceOptions { - private Integer numberOfMessages; - - /** - * Sets the server request timeout value associated with this - * {@link PeekMessagesOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link PeekMessagesOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link PeekMessagesOptions} instance. - */ - @Override - public PeekMessagesOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the number of messages to return in the response to a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#peekMessages(String, PeekMessagesOptions) - * peekMessages} request specified in this instance. - * - * @return The number of messages to return in the response. - */ - public Integer getNumberOfMessages() { - return numberOfMessages; - } - - /** - * Sets the number of messages to return in the response to a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#peekMessages(String, PeekMessagesOptions) - * peekMessages} request. - *

- * The numberOfMessages value only affects calls made on methods - * where this {@link PeekMessagesOptions} instance is passed as a parameter. - * - * - * @param numberOfMessages - * The number of messages to return in the response. This value - * must be in the range from 0 to 32. - * @return A reference to this {@link PeekMessagesOptions} instance. - */ - public PeekMessagesOptions setNumberOfMessages(Integer numberOfMessages) { - this.numberOfMessages = numberOfMessages; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/PeekMessagesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/PeekMessagesResult.java deleted file mode 100644 index 2c02b7c1f2c2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/PeekMessagesResult.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.core.RFC1123DateAdapter; - -/** - * A wrapper class for the results returned in response to Queue Service REST - * API operations to peek messages. This is returned by calls to implementations - * of {@link com.microsoft.windowsazure.services.queue.QueueContract#peekMessages(String)} and - * {@link com.microsoft.windowsazure.services.queue.QueueContract#peekMessages(String, PeekMessagesOptions)}. - *

- * See the Peek Messages documentation on MSDN for details of the underlying Queue - * Service REST API operation. - */ -@XmlRootElement(name = "QueueMessagesList") -public class PeekMessagesResult { - private List queueMessages = new ArrayList(); - - /** - * Gets the list of queue messages returned by a {@link com.microsoft.windowsazure.services.queue.QueueContract} - * .peekMessages request. The queue messages returned do not have a - * visibility timeout set, and they can be retrieved by other clients for - * processing. - * - * @return A {@link List} of {@link QueueMessage} instances representing the - * messages returned by the request. - */ - @XmlElement(name = "QueueMessage") - public List getQueueMessages() { - return queueMessages; - } - - /** - * Reserved for internal use. Sets the list of queue messages returned by a - * {@link com.microsoft.windowsazure.services.queue.QueueContract} .peekMessages request. This method is - * invoked by the API as part of the response generation from the Queue - * Service REST API operation to set the value from the queue message list - * returned by the server. - * - * @param queueMessages - * A {@link List} of {@link QueueMessage} instances representing - * the messages returned by the request. - */ - public void setQueueMessages(List queueMessages) { - this.queueMessages = queueMessages; - } - - /** - * Represents a message in the queue returned by the server. A - * {@link QueueMessage} instance contains a copy of the queue message data - * in the storage service as of the time the message was requested. - */ - public static class QueueMessage { - private String messageId; - private Date insertionDate; - private Date expirationDate; - private int dequeueCount; - private String messageText; - - /** - * Gets the message ID for the message in the queue. * - * - * @return A {@link String} containing the message ID. - */ - @XmlElement(name = "MessageId") - public String getMessageId() { - return messageId; - } - - /** - * Reserved for internal use. Sets the value of the message ID for the - * queue message. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set - * the value with the message ID returned by the server. - * - * @param messageId - * A {@link String} containing the message ID. - */ - public void setMessageId(String messageId) { - this.messageId = messageId; - } - - /** - * Gets the {@link Date} when this message was added to the queue. - * - * @return The {@link Date} when this message was added to the queue. - */ - @XmlElement(name = "InsertionTime") - @XmlJavaTypeAdapter(RFC1123DateAdapter.class) - public Date getInsertionDate() { - return insertionDate; - } - - /** - * Reserved for internal use. Sets the value of the insertion time for - * the queue message. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set - * the value with the insertion time returned by the server. - * - * @param insertionDate - * The {@link Date} when this message was added to the queue. - */ - public void setInsertionDate(Date insertionDate) { - this.insertionDate = insertionDate; - } - - /** - * Gets the {@link Date} when this message will expire and be - * automatically removed from the queue. - * - * @return The {@link Date} when this message will expire. - */ - @XmlElement(name = "ExpirationTime") - @XmlJavaTypeAdapter(RFC1123DateAdapter.class) - public Date getExpirationDate() { - return expirationDate; - } - - /** - * Reserved for internal use. Sets the value of the expiration time for - * the queue message. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set - * the value with the expiration time returned by the server. - * - * @param expirationDate - * The {@link Date} when this message will expire. - */ - public void setExpirationDate(Date expirationDate) { - this.expirationDate = expirationDate; - } - - /** - * Gets the number of times this queue message has been retrieved with a - * list messages operation. - * - * @return The number of times this queue message has been retrieved. - */ - @XmlElement(name = "DequeueCount") - public int getDequeueCount() { - return dequeueCount; - } - - /** - * Reserved for internal use. Sets the value of the dequeue count of the - * message. This method is invoked by the API as part of the response - * generation from the Queue Service REST API operation to set the value - * with the queue message dequeue count returned by the server. - * - * @param dequeueCount - * The number of times this queue message has been retrieved. - */ - public void setDequeueCount(int dequeueCount) { - this.dequeueCount = dequeueCount; - } - - /** - * Gets the {@link String} containing the content of the queue message. - * - * @return A {@link String} containing the content of the queue message. - */ - @XmlElement(name = "MessageText") - public String getMessageText() { - return messageText; - } - - /** - * Reserved for internal use. Sets the {@link String} containing the - * content of the message. This method is invoked by the API as part of - * the response generation from the Queue Service REST API operation to - * set the value with the queue message content returned by the server. - * - * @param messageText - * A {@link String} containing the content of the message. - */ - public void setMessageText(String messageText) { - this.messageText = messageText; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/QueueServiceOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/QueueServiceOptions.java deleted file mode 100644 index d273936c8487..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/QueueServiceOptions.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - - -/** - * Represents the base class for options that may be set on Queue Service REST - * API operations invoked through the {@link com.microsoft.windowsazure.services.queue.QueueContract} interface. This - * class defines a server request timeout, which can be applied to all - * operations. - */ -public class QueueServiceOptions { - // Nullable because it is optional - private Integer timeout; - - /** - * Gets the current server request timeout value associated with this - * {@link QueueServiceOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link QueueServiceOptions} instance is passed as a parameter. - * - * @return The server request timeout value in milliseconds. - */ - public Integer getTimeout() { - return timeout; - } - - /** - * Sets the server request timeout value associated with this - * {@link QueueServiceOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link QueueServiceOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link QueueServiceOptions} instance. - */ - public QueueServiceOptions setTimeout(Integer timeout) { - this.timeout = timeout; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ServiceProperties.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ServiceProperties.java deleted file mode 100644 index 0723e6f4fbab..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ServiceProperties.java +++ /dev/null @@ -1,480 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * A wrapper class for the Queue service properties set or retrieved with Queue - * Service REST API operations. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.queue.QueueContract#getServiceProperties()} and - * {@link com.microsoft.windowsazure.services.queue.QueueContract#getServiceProperties(QueueServiceOptions)} and passed to - * the server with calls to - * {@link com.microsoft.windowsazure.services.queue.QueueContract#setServiceProperties(ServiceProperties)} and - * {@link com.microsoft.windowsazure.services.queue.QueueContract#setServiceProperties(ServiceProperties, QueueServiceOptions)} - * . - *

- * See the Get - * Queue Service Properties and Set - * Queue Service Properties documentation on MSDN for details of the - * underlying Queue Service REST API operations. See the Storage Analytics Overview documentation on MSDN for more information - * about logging and metrics. - */ -@XmlRootElement(name = "StorageServiceProperties") -public class ServiceProperties { - private Logging logging = new Logging(); - private Metrics metrics = new Metrics(); - - /** - * Gets a reference to the {@link Logging} instance in this - * {@link ServiceProperties} instance. - *

- * This {@link ServiceProperties} instance holds a local copy of the Queue - * service properties when returned by a call to {@link com.microsoft.windowsazure.services.queue.QueueContract} - * .getServiceProperties. - *

- * Note that changes to this value are not reflected in the Queue service - * properties until they have been set on the storage account with a call to - * {@link com.microsoft.windowsazure.services.queue.QueueContract}.setServiceProperties. - * - * @return A reference to the {@link Logging} instance in this - * {@link ServiceProperties} instance. - */ - @XmlElement(name = "Logging") - public Logging getLogging() { - return logging; - } - - /** - * Sets the {@link Logging} instance in this {@link ServiceProperties} - * instance. - *

- * Note that changes to this value are not reflected in the Queue service - * properties until they have been set on the storage account with a call to - * {@link com.microsoft.windowsazure.services.queue.QueueContract}.setServiceProperties. - * - * @param logging - * The {@link Logging} instance to set in this - * {@link ServiceProperties} instance. - * @return A reference to this {@link ServiceProperties} instance. - */ - public ServiceProperties setLogging(Logging logging) { - this.logging = logging; - return this; - } - - /** - * Gets a reference to the {@link Metrics} instance in this - * {@link ServiceProperties} instance. - *

- * This {@link ServiceProperties} instance holds a local copy of the Queue - * service properties when returned by a call to {@link com.microsoft.windowsazure.services.queue.QueueContract} - * .getServiceProperties. - *

- * Note that changes to this value are not reflected in the Queue service - * properties until they have been set on the storage account with a call to - * {@link com.microsoft.windowsazure.services.queue.QueueContract}.setServiceProperties. - * - * @return A reference to the {@link Metrics} instance in this - * {@link ServiceProperties} instance. - */ - @XmlElement(name = "Metrics") - public Metrics getMetrics() { - return metrics; - } - - /** - * Sets the {@link Metrics} instance in this {@link ServiceProperties} - * instance. - *

- * Note that changes to this value are not reflected in the Queue service - * properties until they have been set on the storage account with a call to - * {@link com.microsoft.windowsazure.services.queue.QueueContract}.setServiceProperties. - * - * @param metrics - * The {@link Metrics} instance to set in this - * {@link ServiceProperties} instance. - * @return A reference to this {@link ServiceProperties} instance. - */ - public ServiceProperties setMetrics(Metrics metrics) { - this.metrics = metrics; - return this; - } - - /** - * This inner class represents the settings for logging on the Queue service - * of the storage account. These settings include the Storage Analytics - * version, whether to log delete requests, read requests, or write - * requests, and a {@link RetentionPolicy} instance for retention policy - * settings. - */ - public static class Logging { - private String version; - private Boolean delete; - private Boolean read; - private Boolean write; - private RetentionPolicy retentionPolicy; - - /** - * Gets a reference to the {@link RetentionPolicy} instance in this - * {@link Logging} instance. - * - * @return A reference to the {@link RetentionPolicy} instance in this - * {@link Logging} instance. - */ - @XmlElement(name = "RetentionPolicy") - public RetentionPolicy getRetentionPolicy() { - return retentionPolicy; - } - - /** - * Sets the {@link RetentionPolicy} instance in this {@link Logging} - * instance. - * - * @param retentionPolicy - * The {@link RetentionPolicy} instance to set in this - * {@link Logging} instance. - * @return A reference to this {@link Logging} instance. - */ - public Logging setRetentionPolicy(RetentionPolicy retentionPolicy) { - this.retentionPolicy = retentionPolicy; - return this; - } - - /** - * Gets a flag indicating whether queue write operations are logged. If - * this value is true then all requests that write to the - * Queue service will be logged. These requests include adding a - * message, updating a message, setting queue metadata, and creating a - * queue. - * - * @return true if queue write operations are logged, - * otherwise false. - */ - @XmlElement(name = "Write") - public boolean isWrite() { - return write; - } - - /** - * Sets a flag indicating whether queue write operations are logged. If - * this value is true then all requests that write to the - * Queue service will be logged. These requests include adding a - * message, updating a message, setting queue metadata, and creating a - * queue. - * - * @param write - * true to enable logging of queue write - * operations, otherwise false. - * @return A reference to this {@link Logging} instance. - */ - public Logging setWrite(boolean write) { - this.write = write; - return this; - } - - /** - * Gets a flag indicating whether queue read operations are logged. If - * this value is true then all requests that read from the - * Queue service will be logged. These requests include listing queues, - * getting queue metadata, listing messages, and peeking messages. - * - * @return true if queue read operations are logged, - * otherwise false. - */ - @XmlElement(name = "Read") - public boolean isRead() { - return read; - } - - /** - * Sets a flag indicating whether queue read operations are logged. If - * this value is true then all requests that read from the - * Queue service will be logged. These requests include listing queues, - * getting queue metadata, listing messages, and peeking messages. - * - * @param read - * true to enable logging of queue read - * operations, otherwise false. - * @return A reference to this {@link Logging} instance. - */ - public Logging setRead(boolean read) { - this.read = read; - return this; - } - - /** - * Gets a flag indicating whether queue delete operations are logged. If - * this value is true then all requests that delete from - * the Queue service will be logged. These requests include deleting - * queues, deleting messages, and clearing messages. - * - * @return true if queue delete operations are logged, - * otherwise false. - */ - @XmlElement(name = "Delete") - public boolean isDelete() { - return delete; - } - - /** - * Sets a flag indicating whether queue delete operations are logged. If - * this value is true then all requests that delete from - * the Queue service will be logged. These requests include deleting - * queues, deleting messages, and clearing messages. - * - * @param delete - * true to enable logging of queue delete - * operations, otherwise false. - * @return A reference to this {@link Logging} instance. - */ - public Logging setDelete(boolean delete) { - this.delete = delete; - return this; - } - - /** - * Gets the Storage Analytics version number associated with this - * {@link Logging} instance. - * - * @return A {@link String} containing the Storage Analytics version - * number. - */ - @XmlElement(name = "Version") - public String getVersion() { - return version; - } - - /** - * Sets the Storage Analytics version number to associate with this - * {@link Logging} instance. The current supported version number is - * "1.0". - *

- * See the Storage Analytics Overview documentation on MSDN for more - * information. - * - * @param version - * A {@link String} containing the Storage Analytics version - * number to set. - * @return A reference to this {@link Logging} instance. - */ - public Logging setVersion(String version) { - this.version = version; - return this; - } - } - - /** - * This inner class represents the settings for metrics on the Queue service - * of the storage account. These settings include the Storage Analytics - * version, whether metrics are enabled, whether to include API operation - * summary statistics, and a {@link RetentionPolicy} instance for retention - * policy settings. - */ - public static class Metrics { - private String version; - private boolean enabled; - private Boolean includeAPIs; - private RetentionPolicy retentionPolicy; - - /** - * Gets a reference to the {@link RetentionPolicy} instance in this - * {@link Metrics} instance. - * - * @return A reference to the {@link RetentionPolicy} instance in this - * {@link Metrics} instance. - */ - @XmlElement(name = "RetentionPolicy") - public RetentionPolicy getRetentionPolicy() { - return retentionPolicy; - } - - /** - * Sets the {@link RetentionPolicy} instance in this {@link Metrics} - * instance. - * - * @param retentionPolicy - * The {@link RetentionPolicy} instance to set in this - * {@link Metrics} instance. - * @return A reference to this {@link Metrics} instance. - */ - public Metrics setRetentionPolicy(RetentionPolicy retentionPolicy) { - this.retentionPolicy = retentionPolicy; - return this; - } - - /** - * Gets a flag indicating whether metrics should generate summary - * statistics for called API operations. If this value is - * true then all Queue service REST API operations will be - * included in the metrics. - * - * @return true if Queue service REST API operations are - * included in metrics, otherwise false. - */ - @XmlElement(name = "IncludeAPIs") - public Boolean isIncludeAPIs() { - return includeAPIs; - } - - /** - * Sets a flag indicating whether metrics should generate summary - * statistics for called API operations. If this value is - * true then all Queue service REST API operations will be - * included in the metrics. - * - * @param includeAPIs - * true to include Queue service REST API - * operations in metrics, otherwise false. - * @return A reference to this {@link Metrics} instance. - */ - public Metrics setIncludeAPIs(Boolean includeAPIs) { - this.includeAPIs = includeAPIs; - return this; - } - - /** - * Gets a flag indicating whether metrics is enabled for the Queue - * storage service. - * - * @return A flag indicating whether metrics is enabled for the Queue - * storage service. - */ - @XmlElement(name = "Enabled") - public boolean isEnabled() { - return enabled; - } - - /** - * Sets a flag indicating whether to enable metrics for the Queue - * storage service. - * - * @param enabled - * true to enable metrics for the Queue storage - * service, otherwise false. - * @return A reference to this {@link Metrics} instance. - */ - public Metrics setEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Gets the Storage Analytics version number associated with this - * {@link Metrics} instance. - * - * @return A {@link String} containing the Storage Analytics version - * number. - */ - @XmlElement(name = "Version") - public String getVersion() { - return version; - } - - /** - * Sets the Storage Analytics version number to associate with this - * {@link Metrics} instance. The current supported version number is - * "1.0". - *

- * See the Storage Analytics Overview documentation on MSDN for more - * information. - * - * @param version - * A {@link String} containing the Storage Analytics version - * number to set. - * @return A reference to this {@link Metrics} instance. - */ - public Metrics setVersion(String version) { - this.version = version; - return this; - } - } - - /** - * This inner class represents the retention policy settings for logging or - * metrics on the Queue service of the storage account. These settings - * include whether a retention policy is enabled for the data, and the - * number of days that metrics or logging data should be retained. - */ - public static class RetentionPolicy { - private boolean enabled; - private Integer days; // nullable, because optional if "enabled" is - // false - - /** - * Gets the number of days that metrics or logging data should be - * retained. All data older than this value will be deleted. The value - * may be null if a retention policy is not enabled. - * - * @return The number of days that metrics or logging data should be - * retained. - */ - @XmlElement(name = "Days") - public Integer getDays() { - return days; - } - - /** - * Sets the number of days that metrics or logging data should be - * retained. All data older than this value will be deleted. The value - * must be in the range from 1 to 365. This value must be set if a - * retention policy is enabled, but is not required if a retention - * policy is not enabled. - * - * @param days - * The number of days that metrics or logging data should be - * retained. - * @return A reference to this {@link RetentionPolicy} instance. - */ - public RetentionPolicy setDays(Integer days) { - this.days = days; - return this; - } - - /** - * Gets a flag indicating whether a retention policy is enabled for the - * storage service. - * - * @return true if data retention is enabled, otherwise - * false. - */ - @XmlElement(name = "Enabled") - public boolean isEnabled() { - return enabled; - } - - /** - * Sets a flag indicating whether a retention policy is enabled for the - * storage service. - * - * @param enabled - * Set true to enable data retention. - * @return A reference to this {@link RetentionPolicy} instance. - */ - public RetentionPolicy setEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/UpdateMessageResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/UpdateMessageResult.java deleted file mode 100644 index f8a7decde7b8..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/UpdateMessageResult.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - -import java.util.Date; - -/** - * A wrapper class for the results returned in response to Queue Service REST - * API operations to update a message. This is returned by calls to - * implementations of - * {@link com.microsoft.windowsazure.services.queue.QueueContract#updateMessage(String, String, String, String, int)} and - * {@link com.microsoft.windowsazure.services.queue.QueueContract#updateMessage(String, String, String, String, int, QueueServiceOptions)} - * . - *

- * See the Update Message documentation on MSDN for details of the underlying Queue - * Service REST API operation. - */ -public class UpdateMessageResult { - private String popReceipt; - private Date timeNextVisible; - - /** - * Gets the pop receipt value for the updated queue message. The pop receipt - * is a value that is opaque to the client that must be used along with the - * message ID to validate an update message or delete message operation. - * - * @return A {@link String} containing the pop receipt value for the queue - * message. - */ - public String getPopReceipt() { - return popReceipt; - } - - /** - * Reserved for internal use. Sets the value of the pop receipt for the - * updated queue message. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set the - * value with the pop receipt returned by the server. - * - * @param popReceipt - * A {@link String} containing the pop receipt value for the - * queue message. - */ - public void setPopReceipt(String popReceipt) { - this.popReceipt = popReceipt; - } - - /** - * Gets the {@link Date} when the updated message will become visible in the - * queue. - * - * @return The {@link Date} when the updated message will become visible in - * the queue. - */ - public Date getTimeNextVisible() { - return timeNextVisible; - } - - /** - * Reserved for internal use. Sets the value of the time the updated message - * will become visible. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set the - * value with the time next visible returned by the server. - * - * @param timeNextVisible - * The {@link Date} when the updated message will become visible - * in the queue. - */ - public void setTimeNextVisible(Date timeNextVisible) { - this.timeNextVisible = timeNextVisible; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/package.html deleted file mode 100644 index 6d2f45a3fae7..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the queue data transfer object classes. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/package.html deleted file mode 100644 index 4847f5461cb6..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the queue service class, interface, and associated configuration and utility classes. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/resources/META-INF/services/com.microsoft.windowsazure.core.Builder$Exports b/sdk/mediaservices/microsoft-azure-media/src/main/resources/META-INF/services/com.microsoft.windowsazure.core.Builder$Exports deleted file mode 100644 index 834120dd4c16..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/resources/META-INF/services/com.microsoft.windowsazure.core.Builder$Exports +++ /dev/null @@ -1,3 +0,0 @@ -com.microsoft.windowsazure.services.blob.Exports -com.microsoft.windowsazure.services.queue.Exports -com.microsoft.windowsazure.services.media.Exports \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/media/authentication/AzureAdTokenProviderTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/media/authentication/AzureAdTokenProviderTest.java deleted file mode 100644 index 6e44272f2c61..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/media/authentication/AzureAdTokenProviderTest.java +++ /dev/null @@ -1,118 +0,0 @@ -package com.microsoft.windowsazure.media.authentication; - -import static org.junit.Assert.*; -import static org.junit.Assume.*; - -import java.io.FileInputStream; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.aad.adal4j.AsymmetricKeyCredential; -import com.microsoft.windowsazure.Configuration; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.IntegrationTestBase; -import com.microsoft.windowsazure.services.media.MediaConfiguration; -import com.microsoft.windowsazure.services.media.MediaContract; -import com.microsoft.windowsazure.services.media.MediaService; -import com.microsoft.windowsazure.services.media.authentication.AzureAdClientSymmetricKey; -import com.microsoft.windowsazure.services.media.authentication.AzureAdClientUsernamePassword; -import com.microsoft.windowsazure.services.media.authentication.AzureAdTokenCredentials; -import com.microsoft.windowsazure.services.media.authentication.AzureAdTokenProvider; -import com.microsoft.windowsazure.services.media.authentication.AzureEnvironments; -import com.microsoft.windowsazure.services.media.authentication.TokenProvider; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; - -public class AzureAdTokenProviderTest extends IntegrationTestBase { - - @Test - public void ServicePrincipalClientSymmetricKeyShouldWork() throws Exception { - // Arrange - String tenant = config.getProperty("media.azuread.test.tenant").toString(); - String restApiEndpoint = config.getProperty("media.azuread.test.account_api_uri").toString(); - String clientId = config.getProperty("media.azuread.test.clientid").toString(); - String clientKey = config.getProperty("media.azuread.test.clientkey").toString(); - AzureAdTokenCredentials credentials = new AzureAdTokenCredentials( - tenant, - new AzureAdClientSymmetricKey(clientId, clientKey), - AzureEnvironments.AZURE_CLOUD_ENVIRONMENT); - TokenProvider provider = new AzureAdTokenProvider(credentials, executorService); - Configuration configuration = MediaConfiguration.configureWithAzureAdTokenProvider( - new URI(restApiEndpoint), - provider); - MediaContract mediaService = MediaService.create(configuration); - - // Act - ListResult assets = mediaService.list(Asset.list()); - - // Assert - assertNotNull(assets); - } - - @Test - public void UserPasswordShouldWork() throws Exception { - // Arrange - String tenant = config.getProperty("media.azuread.test.tenant").toString(); - String restApiEndpoint = config.getProperty("media.azuread.test.account_api_uri").toString(); - String username = config.getProperty("media.azuread.test.useraccount").toString(); - String password = config.getProperty("media.azuread.test.userpassword").toString(); - - assumeFalse(username.equals("undefined")); - assumeFalse(password.equals("undefined")); - - AzureAdTokenCredentials credentials = new AzureAdTokenCredentials( - tenant, - new AzureAdClientUsernamePassword(username, password), - AzureEnvironments.AZURE_CLOUD_ENVIRONMENT); - TokenProvider provider = new AzureAdTokenProvider(credentials, executorService); - Configuration configuration = MediaConfiguration.configureWithAzureAdTokenProvider( - new URI(restApiEndpoint), - provider); - MediaContract mediaService = MediaService.create(configuration); - - // Act - ListResult assets = mediaService.list(Asset.list()); - - // Assert - assertNotNull(assets); - } - - @Test - public void ServicePrincipalWithCertificateShouldWork() throws Exception { - // Arrange - String tenant = config.getProperty("media.azuread.test.tenant").toString(); - String restApiEndpoint = config.getProperty("media.azuread.test.account_api_uri").toString(); - String clientId = config.getProperty("media.azuread.test.clientid").toString(); - String pfxFile = config.getProperty("media.azuread.test.pfxfile").toString(); - String pfxPassword = config.getProperty("media.azuread.test.pfxpassword").toString(); - - assumeFalse(pfxFile.equals("undefined")); - assumeFalse(pfxPassword.equals("undefined")); - - InputStream pfx = new FileInputStream(pfxFile); - AzureAdTokenCredentials credentials = new AzureAdTokenCredentials( - tenant, - AsymmetricKeyCredential.create(clientId, pfx, pfxPassword), - AzureEnvironments.AZURE_CLOUD_ENVIRONMENT); - TokenProvider provider = new AzureAdTokenProvider(credentials, executorService); - Configuration configuration = MediaConfiguration.configureWithAzureAdTokenProvider( - new URI(restApiEndpoint), - provider); - MediaContract mediaService = MediaService.create(configuration); - - // Act - ListResult assets = mediaService.list(Asset.list()); - - // Assert - assertNotNull(assets); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/media/authentication/package-info.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/media/authentication/package-info.java deleted file mode 100644 index 4374821a2931..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/media/authentication/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.microsoft.windowsazure.media.authentication; \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/blob/BlobServiceIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/blob/BlobServiceIntegrationTest.java deleted file mode 100644 index 05a4a5fc4453..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/blob/BlobServiceIntegrationTest.java +++ /dev/null @@ -1,782 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.io.BufferedReader; -import java.io.ByteArrayInputStream; -import java.io.FilterInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.io.StringWriter; -import java.io.Writer; -import java.util.HashSet; -import java.util.Set; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.Configuration; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestContext; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseContext; -import com.microsoft.windowsazure.core.pipeline.jersey.ExponentialRetryPolicy; -import com.microsoft.windowsazure.core.pipeline.jersey.RetryPolicyFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.blob.models.BlobProperties; -import com.microsoft.windowsazure.services.blob.models.BlockList; -import com.microsoft.windowsazure.services.blob.models.CreateBlobOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobResult; -import com.microsoft.windowsazure.services.blob.models.CreateContainerOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesResult; -import com.microsoft.windowsazure.services.blob.models.GetBlobResult; -import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksResult; -import com.microsoft.windowsazure.services.blob.models.ListContainersOptions; -import com.microsoft.windowsazure.services.blob.models.ListContainersResult; -import com.microsoft.windowsazure.services.blob.models.ListContainersResult.Container; - -public class BlobServiceIntegrationTest extends IntegrationTestBase { - private static final String testContainersPrefix = "sdktest-"; - private static final String createableContainersPrefix = "csdktest-"; - private static String CREATEABLE_CONTAINER_1; - private static String TEST_CONTAINER_FOR_BLOBS; - private static String[] creatableContainers; - private static String[] testContainers; - private static boolean createdRoot; - - @BeforeClass - public static void setup() throws Exception { - // Setup container names array (list of container names used by - // integration tests) - testContainers = new String[10]; - for (int i = 0; i < testContainers.length; i++) { - testContainers[i] = String.format("%s%d", testContainersPrefix, - i + 1); - } - - creatableContainers = new String[10]; - for (int i = 0; i < creatableContainers.length; i++) { - creatableContainers[i] = String.format("%s%d", - createableContainersPrefix, i + 1); - } - - CREATEABLE_CONTAINER_1 = creatableContainers[0]; - TEST_CONTAINER_FOR_BLOBS = testContainers[0]; - // Create all test containers and their content - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - createContainers(service, testContainersPrefix, testContainers); - - try { - service.createContainer("$root"); - createdRoot = true; - } catch (ServiceException e) { - // e.printStackTrace(); - } - } - - @AfterClass - public static void cleanup() throws Exception { - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - deleteContainers(service, testContainersPrefix, testContainers); - deleteContainers(service, createableContainersPrefix, - creatableContainers); - - // If container was created, delete it - if (createdRoot) { - try { - service.deleteContainer("$root"); - createdRoot = false; - } catch (ServiceException e) { - // e.printStackTrace(); - } - } - } - - private static void createContainers(BlobContract service, String prefix, - String[] list) throws Exception { - Set containers = listContainers(service, prefix); - for (String item : list) { - if (!containers.contains(item)) { - service.createContainer(item); - } - } - } - - private static void deleteContainers(BlobContract service, String prefix, - String[] list) throws Exception { - Set containers = listContainers(service, prefix); - for (String item : list) { - if (containers.contains(item)) { - service.deleteContainer(item); - } - } - } - - private static Set listContainers(BlobContract service, - String prefix) throws Exception { - HashSet result = new HashSet(); - ListContainersResult list = service - .listContainers(new ListContainersOptions().setPrefix(prefix)); - for (Container item : list.getContainers()) { - result.add(item.getName()); - } - return result; - } - - @Test - public void createContainerWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - service.createContainer(CREATEABLE_CONTAINER_1); - - // Assert - } - - @Test(expected = IllegalArgumentException.class) - public void createNullContainerFail() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - service.createContainer(null); - - // Assert - assertTrue(false); - } - - @Test - public void deleteContainerWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - String containerName = "deletecontainerworks"; - service.createContainer(containerName, new CreateContainerOptions() - .setPublicAccess("blob").addMetadata("test", "bar") - .addMetadata("blah", "bleah")); - - // Act - service.deleteContainer(containerName); - ListContainersResult listContainerResult = service.listContainers(); - - // Assert - for (Container container : listContainerResult.getContainers()) { - assertTrue(!container.getName().equals(containerName)); - } - } - - @Test(expected = IllegalArgumentException.class) - public void deleteNullContainerFail() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - service.deleteContainer(null); - - // Assert - assertTrue(false); - } - - @Test - public void listContainersWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - ListContainersResult results = service.listContainers(); - - // Assert - assertNotNull(results); - assertTrue(testContainers.length <= results.getContainers().size()); - assertNotNull(results.getContainers().get(0).getName()); - assertNotNull(results.getContainers().get(0).getMetadata()); - assertNotNull(results.getContainers().get(0).getProperties()); - assertNotNull(results.getContainers().get(0).getProperties().getEtag()); - assertNotNull(results.getContainers().get(0).getProperties() - .getLastModified()); - assertNotNull(results.getContainers().get(0).getUrl()); - } - - @Test - public void listContainersWithPaginationWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - ListContainersResult results = service - .listContainers(new ListContainersOptions().setMaxResults(3)); - ListContainersResult results2 = service - .listContainers(new ListContainersOptions().setMarker(results - .getNextMarker())); - - // Assert - assertNotNull(results); - assertEquals(3, results.getContainers().size()); - assertNotNull(results.getNextMarker()); - assertEquals(3, results.getMaxResults()); - - assertNotNull(results2); - assertTrue(testContainers.length - 3 <= results2.getContainers().size()); - assertEquals("", results2.getNextMarker()); - assertEquals(0, results2.getMaxResults()); - } - - @Test - public void listContainersWithPrefixWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - ListContainersResult results = service - .listContainers(new ListContainersOptions().setPrefix( - testContainersPrefix).setMaxResults(3)); - // Assert - assertNotNull(results); - assertEquals(3, results.getContainers().size()); - assertNotNull(results.getNextMarker()); - assertEquals(3, results.getMaxResults()); - - // Act - ListContainersResult results2 = service - .listContainers(new ListContainersOptions().setPrefix( - testContainersPrefix) - .setMarker(results.getNextMarker())); - - // Assert - assertNotNull(results2); - assertNotNull(results2.getNextMarker()); - assertEquals(0, results2.getMaxResults()); - - // Act - ListContainersResult results3 = service - .listContainers(new ListContainersOptions() - .setPrefix(testContainersPrefix)); - - // Assert - assertEquals(results.getContainers().size() - + results2.getContainers().size(), results3.getContainers() - .size()); - } - - @Test - public void listBlockBlobWithNoCommittedBlocksWorks() throws Exception { - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - String container = TEST_CONTAINER_FOR_BLOBS; - String blob = "listBlockBlobWithNoCommittedBlocksWorks"; - - service.createBlockBlob(container, blob, null); - service.createBlobBlock(container, blob, "01", - new ByteArrayInputStream(new byte[] { 0x00 })); - service.deleteBlob(container, blob); - - try { - // Note: This next two lines should give a 404, because the blob no - // longer - // exists. However, the service sometimes allow this improper - // access, so - // the SDK has to handle the situation gracefully. - service.createBlobBlock(container, blob, "01", - new ByteArrayInputStream(new byte[] { 0x00 })); - ListBlobBlocksResult result = service.listBlobBlocks(container, - blob); - assertEquals(0, result.getCommittedBlocks().size()); - } catch (ServiceException ex) { - assertEquals(404, ex.getHttpStatusCode()); - } - } - - @Test - public void listBlobBlocksOnEmptyBlobWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String container = TEST_CONTAINER_FOR_BLOBS; - String blob = "test13"; - String content = new String(new char[512]); - service.createBlockBlob(container, blob, new ByteArrayInputStream( - content.getBytes("UTF-8"))); - - ListBlobBlocksResult result = service.listBlobBlocks(container, blob); - - // Assert - assertNotNull(result); - assertNotNull(result.getLastModified()); - assertNotNull(result.getEtag()); - assertEquals(512, result.getContentLength()); - assertNotNull(result.getCommittedBlocks()); - assertEquals(0, result.getCommittedBlocks().size()); - assertNotNull(result.getUncommittedBlocks()); - assertEquals(0, result.getUncommittedBlocks().size()); - } - - @Test - public void listBlobBlocksWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String container = TEST_CONTAINER_FOR_BLOBS; - String blob = "test14"; - service.createBlockBlob(container, blob, null); - service.createBlobBlock(container, blob, "123", - new ByteArrayInputStream(new byte[256])); - service.createBlobBlock(container, blob, "124", - new ByteArrayInputStream(new byte[512])); - service.createBlobBlock(container, blob, "125", - new ByteArrayInputStream(new byte[195])); - - ListBlobBlocksResult result = service.listBlobBlocks(container, blob, - new ListBlobBlocksOptions().setCommittedList(true) - .setUncommittedList(true)); - - // Assert - assertNotNull(result); - assertNotNull(result.getLastModified()); - assertNotNull(result.getEtag()); - assertEquals(0, result.getContentLength()); - assertNotNull(result.getCommittedBlocks()); - assertEquals(0, result.getCommittedBlocks().size()); - assertNotNull(result.getUncommittedBlocks()); - assertEquals(3, result.getUncommittedBlocks().size()); - assertEquals("123", result.getUncommittedBlocks().get(0).getBlockId()); - assertEquals(256, result.getUncommittedBlocks().get(0).getBlockLength()); - assertEquals("124", result.getUncommittedBlocks().get(1).getBlockId()); - assertEquals(512, result.getUncommittedBlocks().get(1).getBlockLength()); - assertEquals("125", result.getUncommittedBlocks().get(2).getBlockId()); - assertEquals(195, result.getUncommittedBlocks().get(2).getBlockLength()); - } - - @Test - public void listBlobBlocksWithOptionsWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String container = TEST_CONTAINER_FOR_BLOBS; - String blob = "test14"; - service.createBlockBlob(container, blob, null); - service.createBlobBlock(container, blob, "123", - new ByteArrayInputStream(new byte[256])); - - BlockList blockList = new BlockList(); - blockList.addUncommittedEntry("123"); - service.commitBlobBlocks(container, blob, blockList); - - service.createBlobBlock(container, blob, "124", - new ByteArrayInputStream(new byte[512])); - service.createBlobBlock(container, blob, "125", - new ByteArrayInputStream(new byte[195])); - - ListBlobBlocksResult result1 = service.listBlobBlocks(container, blob, - new ListBlobBlocksOptions().setCommittedList(true) - .setUncommittedList(true)); - ListBlobBlocksResult result2 = service.listBlobBlocks(container, blob, - new ListBlobBlocksOptions().setCommittedList(true)); - ListBlobBlocksResult result3 = service.listBlobBlocks(container, blob, - new ListBlobBlocksOptions().setUncommittedList(true)); - - // Assert - assertEquals(1, result1.getCommittedBlocks().size()); - assertEquals(2, result1.getUncommittedBlocks().size()); - - assertEquals(1, result2.getCommittedBlocks().size()); - assertEquals(0, result2.getUncommittedBlocks().size()); - - assertEquals(0, result3.getCommittedBlocks().size()); - assertEquals(2, result3.getUncommittedBlocks().size()); - } - - @Test - public void commitBlobBlocksWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String container = TEST_CONTAINER_FOR_BLOBS; - String blob = "test14"; - String blockId1 = "1fedcba"; - String blockId2 = "2abcdef"; - String blockId3 = "3zzzzzz"; - service.createBlockBlob(container, blob, null); - service.createBlobBlock(container, blob, blockId1, - new ByteArrayInputStream(new byte[256])); - service.createBlobBlock(container, blob, blockId2, - new ByteArrayInputStream(new byte[512])); - service.createBlobBlock(container, blob, blockId3, - new ByteArrayInputStream(new byte[195])); - - BlockList blockList = new BlockList(); - blockList.addUncommittedEntry(blockId1).addLatestEntry(blockId3); - service.commitBlobBlocks(container, blob, blockList); - - ListBlobBlocksResult result = service.listBlobBlocks(container, blob, - new ListBlobBlocksOptions().setCommittedList(true) - .setUncommittedList(true)); - - // Assert - assertNotNull(result); - assertNotNull(result.getLastModified()); - assertNotNull(result.getEtag()); - assertEquals(256 + 195, result.getContentLength()); - - assertNotNull(result.getCommittedBlocks()); - assertEquals(2, result.getCommittedBlocks().size()); - assertEquals(blockId1, result.getCommittedBlocks().get(0).getBlockId()); - assertEquals(256, result.getCommittedBlocks().get(0).getBlockLength()); - assertEquals(blockId3, result.getCommittedBlocks().get(1).getBlockId()); - assertEquals(195, result.getCommittedBlocks().get(1).getBlockLength()); - - assertNotNull(result.getUncommittedBlocks()); - assertEquals(0, result.getUncommittedBlocks().size()); - } - - @Test - public void createBlobBlockWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String container = TEST_CONTAINER_FOR_BLOBS; - String blob = "test13"; - String content = new String(new char[512]); - service.createBlockBlob(container, blob, new ByteArrayInputStream( - content.getBytes("UTF-8"))); - service.createBlobBlock(container, blob, "123", - new ByteArrayInputStream(content.getBytes("UTF-8"))); - service.createBlobBlock(container, blob, "124", - new ByteArrayInputStream(content.getBytes("UTF-8"))); - - // Assert - } - - @Test - public void createBlobBlockNullContainerWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String container = null; - String blob = "createblobblocknullcontainerworks"; - String content = new String(new char[512]); - service.createBlockBlob(container, blob, new ByteArrayInputStream( - content.getBytes("UTF-8"))); - GetBlobPropertiesResult result = service.getBlobProperties(null, blob); - GetBlobResult getBlobResult = service.getBlob(null, blob); - - // Assert - assertNotNull(result); - assertNotNull(result.getMetadata()); - assertEquals(0, result.getMetadata().size()); - BlobProperties props = result.getProperties(); - assertNotNull(props); - - assertEquals(content, - inputStreamToString(getBlobResult.getContentStream(), "UTF-8")); - } - - @Test - public void createBlockBlobWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - service.createBlockBlob(TEST_CONTAINER_FOR_BLOBS, "test2", - new ByteArrayInputStream("some content".getBytes())); - - // Assert - } - - @Test - public void createBlockBlobWithValidEtag() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - CreateBlobResult createBlobResult = service.createBlockBlob( - TEST_CONTAINER_FOR_BLOBS, "test2", new ByteArrayInputStream( - "some content".getBytes())); - - // Assert - assertNotNull(createBlobResult); - assertNotNull(createBlobResult.getEtag()); - } - - @Test - public void createBlockBlobWithOptionsWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String content = "some content"; - service.createBlockBlob( - TEST_CONTAINER_FOR_BLOBS, - "test2", - new ByteArrayInputStream(content.getBytes("UTF-8")), - new CreateBlobOptions() - .setBlobCacheControl("test") - .setBlobContentEncoding("UTF-8") - .setBlobContentLanguage("en-us") - /* .setBlobContentMD5("1234") */.setBlobContentType( - "text/plain") - .setCacheControl("test") - .setContentEncoding("UTF-8") - /* .setContentMD5("1234") */.setContentType( - "text/plain")); - - GetBlobPropertiesResult result = service.getBlobProperties( - TEST_CONTAINER_FOR_BLOBS, "test2"); - - // Assert - assertNotNull(result); - - assertNotNull(result.getMetadata()); - assertEquals(0, result.getMetadata().size()); - - BlobProperties props = result.getProperties(); - assertNotNull(props); - assertEquals("test", props.getCacheControl()); - assertEquals("UTF-8", props.getContentEncoding()); - assertEquals("en-us", props.getContentLanguage()); - assertEquals("text/plain", props.getContentType()); - assertEquals(content.length(), props.getContentLength()); - assertNotNull(props.getEtag()); - assertNull(props.getContentMD5()); - assertNotNull(props.getLastModified()); - assertEquals("BlockBlob", props.getBlobType()); - assertEquals("unlocked", props.getLeaseStatus()); - assertEquals(0, props.getSequenceNumber()); - } - - @Test - public void getBlockBlobWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String content = "some content"; - service.createBlockBlob( - TEST_CONTAINER_FOR_BLOBS, - "test2", - new ByteArrayInputStream(content.getBytes("UTF-8")), - new CreateBlobOptions() - .setBlobCacheControl("test") - .setBlobContentEncoding("UTF-8") - .setBlobContentLanguage("en-us") - /* .setBlobContentMD5("1234") */.setBlobContentType( - "text/plain") - .setCacheControl("test") - .setContentEncoding("UTF-8") - /* .setContentMD5("1234") */.setContentType( - "text/plain")); - - GetBlobResult result = service.getBlob(TEST_CONTAINER_FOR_BLOBS, - "test2"); - - // Assert - assertNotNull(result); - - assertNotNull(result.getMetadata()); - assertEquals(0, result.getMetadata().size()); - - BlobProperties props = result.getProperties(); - assertNotNull(props); - assertEquals("test", props.getCacheControl()); - assertEquals("UTF-8", props.getContentEncoding()); - assertEquals("en-us", props.getContentLanguage()); - assertEquals("text/plain", props.getContentType()); - assertEquals(content.length(), props.getContentLength()); - assertNotNull(props.getEtag()); - assertNull(props.getContentMD5()); - assertNotNull(props.getLastModified()); - assertEquals("BlockBlob", props.getBlobType()); - assertEquals("unlocked", props.getLeaseStatus()); - assertEquals(0, props.getSequenceNumber()); - assertEquals(content, - inputStreamToString(result.getContentStream(), "UTF-8")); - } - - @Test - public void deleteBlobWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String content = "some content"; - service.createBlockBlob(TEST_CONTAINER_FOR_BLOBS, "test2", - new ByteArrayInputStream(content.getBytes("UTF-8"))); - - service.deleteBlob(TEST_CONTAINER_FOR_BLOBS, "test2"); - - // Assert - } - - class RetryPolicyObserver implements ServiceFilter { - public int requestCount; - - @Override - public ServiceResponseContext handle(ServiceRequestContext request, - Next next) throws Exception { - requestCount++; - return next.handle(request); - } - } - - private class NonResetableInputStream extends FilterInputStream { - - protected NonResetableInputStream(InputStream in) { - super(in); - } - - @Override - public boolean markSupported() { - return false; - } - } - - @Test - public void retryPolicyThrowsOnInvalidInputStream() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - service = service.withFilter(new RetryPolicyFilter( - new ExponentialRetryPolicy(100/* deltaBackoff */, - 3/* maximumAttempts */, new int[] { 400, 500, 503 }))); - - Exception error = null; - try { - String content = "foo"; - InputStream contentStream = new ByteArrayInputStream( - content.getBytes("UTF-8")); - InputStream stream = new NonResetableInputStream(contentStream); - - service.createBlockBlob(TEST_CONTAINER_FOR_BLOBS, "testretry", - stream); - } catch (Exception e) { - error = e; - } - - // Assert - assertNotNull(error); - } - - private class ResetableInputStream extends FilterInputStream { - private boolean resetCalled; - - protected ResetableInputStream(InputStream in) { - super(in); - } - - @Override - public void reset() throws IOException { - super.reset(); - setResetCalled(true); - } - - public boolean isResetCalled() { - return resetCalled; - } - - public void setResetCalled(boolean resetCalled) { - this.resetCalled = resetCalled; - } - } - - @Test - public void retryPolicyCallsResetOnValidInputStream() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - service = service.withFilter(new RetryPolicyFilter( - new ExponentialRetryPolicy(100/* deltaBackoff */, - 3/* maximumAttempts */, new int[] { 403 }))); - - ServiceException error = null; - ResetableInputStream stream = null; - try { - String content = "foo"; - InputStream contentStream = new ByteArrayInputStream( - content.getBytes("UTF-8")); - stream = new ResetableInputStream(contentStream); - - service.createBlockBlob(TEST_CONTAINER_FOR_BLOBS, - "invalidblobname @#$#@$@", stream); - } catch (ServiceException e) { - error = e; - } - - // Assert - assertNotNull(error); - assertEquals(403, error.getHttpStatusCode()); - assertNotNull(stream); - assertTrue(stream.isResetCalled()); - } - - private String inputStreamToString(InputStream inputStream, String encoding) - throws IOException { - Writer writer = new StringWriter(); - - char[] buffer = new char[1024]; - try { - Reader reader = new BufferedReader(new InputStreamReader( - inputStream, encoding)); - while (true) { - int n = reader.read(buffer); - if (n == -1) - break; - writer.write(buffer, 0, n); - } - } finally { - inputStream.close(); - } - return writer.toString(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/blob/IntegrationTestBase.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/blob/IntegrationTestBase.java deleted file mode 100644 index b5b99d5c910e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/blob/IntegrationTestBase.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * - * Copyright (c) Microsoft and contributors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.microsoft.windowsazure.services.blob; - -import com.microsoft.windowsazure.Configuration; - -public abstract class IntegrationTestBase { - protected static Configuration createConfiguration() { - Configuration config = Configuration.getInstance(); - overrideWithEnv(config, BlobConfiguration.ACCOUNT_NAME); - overrideWithEnv(config, BlobConfiguration.ACCOUNT_KEY); - overrideWithEnv(config, BlobConfiguration.URI); - return config; - } - - private static void overrideWithEnv(Configuration config, String key) { - String value = System.getenv(key); - if (value == null) - return; - - config.setProperty(key, value); - } - - protected static boolean isRunningWithEmulator(Configuration config) { - String accountName = "devstoreaccount1"; - String accountKey = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="; - - return accountName.equals(config - .getProperty(BlobConfiguration.ACCOUNT_NAME)) - && accountKey.equals(config - .getProperty(BlobConfiguration.ACCOUNT_KEY)); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AccessPolicyIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AccessPolicyIntegrationTest.java deleted file mode 100644 index b6a1e5ce37bd..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AccessPolicyIntegrationTest.java +++ /dev/null @@ -1,240 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.util.ArrayList; -import java.util.EnumSet; -import java.util.List; - -import org.junit.Test; - -import com.microsoft.windowsazure.core.pipeline.jersey.ExponentialRetryPolicy; -import com.microsoft.windowsazure.core.pipeline.jersey.RetryPolicyFilter; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.AccessPolicy; -import com.microsoft.windowsazure.services.media.models.AccessPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AccessPolicyPermission; - -public class AccessPolicyIntegrationTest extends IntegrationTestBase { - private void verifyInfosEqual(String message, AccessPolicyInfo expected, - AccessPolicyInfo actual) { - verifyPolicyProperties(message, expected.getName(), - expected.getDurationInMinutes(), expected.getPermissions(), - actual); - } - - private void verifyPolicyProperties(String message, String testName, - double duration, AccessPolicyPermission permission, - AccessPolicyInfo policy) { - verifyPolicyProperties(message, testName, duration, - EnumSet.of(permission), policy); - } - - private void verifyPolicyProperties(String message, String testName, - double duration, EnumSet permissions, - AccessPolicyInfo policy) { - assertNotNull(message, policy); - assertEquals(message + " Name", testName, policy.getName()); - assertEquals(message + " DurationInMinutes", duration, - policy.getDurationInMinutes(), 0.00001); - for (AccessPolicyPermission permission : permissions) { - if (permission != AccessPolicyPermission.NONE) { - assertTrue( - message + "permissions should contain " + permission, - policy.getPermissions().contains(permission)); - } - } - assertEquals(message + " Permissions", permissions, - policy.getPermissions()); - - assertNotNull(message + " Id", policy.getId()); - assertNotNull(message + " Created", policy.getCreated()); - assertNotNull(message + " LastModified", policy.getLastModified()); - assertEquals(message + " Created & LastModified", policy.getCreated(), - policy.getLastModified()); - } - - @Test - public void canCreateAccessPolicy() throws Exception { - String testName = testPolicyPrefix + "CanCreate"; - double duration = 5; - - AccessPolicyInfo policy = service.create(AccessPolicy.create(testName, - duration, EnumSet.of(AccessPolicyPermission.WRITE))); - - verifyPolicyProperties("policy", testName, duration, - AccessPolicyPermission.WRITE, policy); - } - - @Test - public void canCreateAccessPolicyWithReadPermissions() throws Exception { - String testName = testPolicyPrefix + "CanCreateRead"; - double duration = 5; - - AccessPolicyInfo policy = service.create(AccessPolicy.create(testName, - duration, EnumSet.of(AccessPolicyPermission.READ))); - - verifyPolicyProperties("policy", testName, duration, - AccessPolicyPermission.READ, policy); - } - - @Test - public void canGetSinglePolicyById() throws Exception { - String expectedName = testPolicyPrefix + "GetOne"; - double duration = 1; - AccessPolicyInfo policyToGet = service.create(AccessPolicy.create( - expectedName, duration, - EnumSet.of(AccessPolicyPermission.WRITE))); - - AccessPolicyInfo retrievedPolicy = service.get(AccessPolicy - .get(policyToGet.getId())); - - assertEquals(policyToGet.getId(), retrievedPolicy.getId()); - verifyPolicyProperties("retrievedPolicy", expectedName, duration, - AccessPolicyPermission.WRITE, retrievedPolicy); - } - - @Test - public void canGetSinglePolicyByInvalidId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.get(AccessPolicy.get(invalidId)); - } - - @Test - public void canGetSinglePolicyByNonexistId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.get(AccessPolicy.get(validButNonexistAccessPolicyId)); - } - - @Test - public void canRetrieveListOfAccessPolicies() throws Exception { - String[] policyNames = new String[] { testPolicyPrefix + "ListOne", - testPolicyPrefix + "ListTwo" }; - double duration = 3; - EnumSet permissions = EnumSet.of( - AccessPolicyPermission.WRITE, AccessPolicyPermission.LIST); - - List expectedAccessPolicies = new ArrayList(); - for (int i = 0; i < policyNames.length; i++) { - AccessPolicyInfo policy = service.create(AccessPolicy.create( - policyNames[i], duration, permissions)); - expectedAccessPolicies.add(policy); - } - - List actualAccessPolicies = service.list(AccessPolicy - .list()); - - verifyListResultContains("listAccessPolicies", expectedAccessPolicies, - actualAccessPolicies, new ComponentDelegate() { - @Override - public void verifyEquals(String message, Object expected, - Object actual) { - verifyInfosEqual(message, (AccessPolicyInfo) expected, - (AccessPolicyInfo) actual); - } - }); - } - - @Test - public void canUseQueryParametersWhenListingAccessPolicies() - throws Exception { - String[] policyNames = new String[] { testPolicyPrefix + "ListThree", - testPolicyPrefix + "ListFour", testPolicyPrefix + "ListFive", - testPolicyPrefix + "ListSix", testPolicyPrefix + "ListSeven" }; - - double duration = 3; - EnumSet permissions = EnumSet.of( - AccessPolicyPermission.WRITE, AccessPolicyPermission.LIST); - - List expectedAccessPolicies = new ArrayList(); - for (int i = 0; i < policyNames.length; i++) { - AccessPolicyInfo policy = service.create(AccessPolicy.create( - policyNames[i], duration, permissions)); - expectedAccessPolicies.add(policy); - } - - List actualAccessPolicies = service.list(AccessPolicy - .list().setTop(2)); - - assertEquals(2, actualAccessPolicies.size()); - } - - // Note: Access Policy cannot be updated. - - @Test - public void canDeleteAccessPolicyById() throws Exception { - String policyName = testPolicyPrefix + "ToDelete"; - double duration = 1; - AccessPolicyInfo policyToDelete = service - .create(AccessPolicy.create(policyName, duration, - EnumSet.of(AccessPolicyPermission.WRITE))); - List listPoliciesResult = service.list(AccessPolicy - .list()); - int policyCountBaseline = listPoliciesResult.size(); - - service.delete(AccessPolicy.delete(policyToDelete.getId())); - - listPoliciesResult = service.list(AccessPolicy.list()); - assertEquals("listPoliciesResult.size", policyCountBaseline - 1, - listPoliciesResult.size()); - - for (AccessPolicyInfo policy : service.list(AccessPolicy.list())) { - assertFalse(policyToDelete.getId().equals(policy.getId())); - } - - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.get(AccessPolicy.get(policyToDelete.getId())); - } - - @Test - public void canDeleteAccessPolicyByInvalidId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.delete(AccessPolicy.delete(invalidId)); - } - - @Test - public void canDeleteAccessPolicyByNonexistId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.delete(AccessPolicy.delete(validButNonexistAccessPolicyId)); - } - - @Test - public void canRetryAccessPolicyCreation() throws Exception { - String name = testPolicyPrefix + "canRetryAccessPolicyCreationPolicy"; - double duration = 1; - EnumSet write = EnumSet - .of(AccessPolicyPermission.WRITE); - service.create(AccessPolicy.create(name + "1", duration, write)); - - ExponentialRetryPolicy forceRetryPolicy = new ExponentialRetryPolicy(1, - 1, new int[] { 201 }); - MediaContract forceRetryService = service - .withFilter(new RetryPolicyFilter(forceRetryPolicy)); - - forceRetryService.create(AccessPolicy.create(name + "2", duration, - write)); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AssetFileIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AssetFileIntegrationTest.java deleted file mode 100644 index 4e7b7cb969b9..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AssetFileIntegrationTest.java +++ /dev/null @@ -1,279 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.Date; -import java.util.EnumSet; - -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.AccessPolicy; -import com.microsoft.windowsazure.services.media.models.AccessPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AccessPolicyPermission; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetFile; -import com.microsoft.windowsazure.services.media.models.AssetFileInfo; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; - -public class AssetFileIntegrationTest extends IntegrationTestBase { - - // Some dummy binary data for uploading - private static byte[] firstPrimes = new byte[] { 2, 3, 5, 7, 11, 13, 17, - 19, 23, 29 }; - private static byte[] onesAndZeros = new byte[] { 1, 0, 1, 0, 1, 0, 1, 0 }; - private static byte[] countingUp = new byte[] { 3, 4, 5, 6, 7, 8, 9, 10, 11 }; - - private static final String BLOB_NAME = "primes.bin"; - private static final String BLOB_NAME_2 = "primes2.bin"; - - private static AccessPolicyInfo writePolicy; - - @BeforeClass - public static void setup() throws Exception { - IntegrationTestBase.setup(); - - writePolicy = createWritePolicy("uploadWritePolicy", 30); - } - - @Test - public void canCreateFileForUploadedBlob() throws Exception { - AssetInfo asset = createTestAsset("createFileForUploadedBlob"); - LocatorInfo locator = createLocator(writePolicy, asset, 5); - WritableBlobContainerContract blobWriter = service - .createBlobWriter(locator); - - createAndUploadBlob(blobWriter, BLOB_NAME, firstPrimes); - - service.action(AssetFile.createFileInfos(asset.getId())); - - ListResult files = service.list(AssetFile.list(asset - .getAssetFilesLink())); - - assertEquals(1, files.size()); - AssetFileInfo file = files.get(0); - assertEquals(BLOB_NAME, file.getName()); - } - - @Test - public void canCreateFileEntityDirectly() throws Exception { - AssetInfo asset = createTestAsset("createFileEntityDirectly"); - LocatorInfo locator = createLocator(writePolicy, asset, 5); - WritableBlobContainerContract blobWriter = service - .createBlobWriter(locator); - - createAndUploadBlob(blobWriter, BLOB_NAME_2, firstPrimes); - - service.create(AssetFile.create(asset.getId(), BLOB_NAME_2)); - - ListResult files = service.list(AssetFile.list(asset - .getAssetFilesLink())); - - boolean found = false; - for (AssetFileInfo file : files) { - if (file.getName().equals(BLOB_NAME_2)) { - found = true; - break; - } - } - - assertTrue(found); - } - - @Test - public void canCreateAssetWithMultipleFiles() throws Exception { - AssetInfo asset = createTestAsset("createWithMultipleFiles"); - AccessPolicyInfo policy = createWritePolicy("createWithMultipleFiles", - 10); - LocatorInfo locator = createLocator(policy, asset, 5); - - WritableBlobContainerContract blobWriter = service - .createBlobWriter(locator); - - createAndUploadBlob(blobWriter, "blob1.bin", firstPrimes); - createAndUploadBlob(blobWriter, "blob2.bin", onesAndZeros); - createAndUploadBlob(blobWriter, "blob3.bin", countingUp); - - AssetFileInfo file1 = service.create(AssetFile - .create(asset.getId(), "blob1.bin").setIsPrimary(true) - .setIsEncrypted(false) - .setContentFileSize(new Long(firstPrimes.length))); - - AssetFileInfo file2 = service.create(AssetFile - .create(asset.getId(), "blob2.bin").setIsPrimary(false) - .setIsEncrypted(false) - .setContentFileSize(new Long(onesAndZeros.length))); - - AssetFileInfo file3 = service.create(AssetFile - .create(asset.getId(), "blob3.bin").setIsPrimary(false) - .setIsEncrypted(false) - .setContentFileSize(new Long(countingUp.length)) - .setContentChecksum("1234")); - - ListResult files = service.list(AssetFile.list(asset - .getAssetFilesLink())); - - assertEquals(3, files.size()); - - ArrayList results = new ArrayList(files); - Collections.sort(results, new Comparator() { - @Override - public int compare(AssetFileInfo o1, AssetFileInfo o2) { - return o1.getName().compareTo(o2.getName()); - } - }); - - assertAssetFileInfoEquals("results.get(0)", file1, results.get(0)); - assertAssetFileInfoEquals("results.get(1)", file2, results.get(1)); - assertAssetFileInfoEquals("results.get(2)", file3, results.get(2)); - } - - @Test - public void canCreateFileAndThenUpdateIt() throws Exception { - AssetInfo asset = createTestAsset("createAndUpdate"); - AccessPolicyInfo policy = createWritePolicy("createAndUpdate", 10); - LocatorInfo locator = createLocator(policy, asset, 5); - WritableBlobContainerContract blobWriter = service - .createBlobWriter(locator); - - createAndUploadBlob(blobWriter, "toUpdate.bin", firstPrimes); - - AssetFileInfo file = service.create(AssetFile.create(asset.getId(), - "toUpdate.bin")); - - service.update(AssetFile.update(file.getId()).setMimeType( - "application/octet-stream")); - - AssetFileInfo fromServer = service.get(AssetFile.get(file.getId())); - - assertEquals("application/octet-stream", fromServer.getMimeType()); - } - - @Test - public void canDeleteFileFromAsset() throws Exception { - AssetInfo asset = createTestAsset("deleteFile"); - AccessPolicyInfo policy = createWritePolicy("deleteFile", 10); - LocatorInfo locator = createLocator(policy, asset, 5); - WritableBlobContainerContract blobWriter = service - .createBlobWriter(locator); - - createAndUploadBlob(blobWriter, "todelete.bin", firstPrimes); - createAndUploadBlob(blobWriter, "tokeep.bin", onesAndZeros); - - service.action(AssetFile.createFileInfos(asset.getId())); - - ListResult originalFiles = service.list(AssetFile - .list(asset.getAssetFilesLink())); - assertEquals(2, originalFiles.size()); - - for (AssetFileInfo file : originalFiles) { - if (file.getName().equals("todelete.bin")) { - service.delete(AssetFile.delete(file.getId())); - break; - } - } - - ListResult newFiles = service.list(AssetFile.list(asset - .getAssetFilesLink())); - assertEquals(1, newFiles.size()); - assertEquals("tokeep.bin", newFiles.get(0).getName()); - } - - // - // Helper functions to create various media services entities - // - private static AssetInfo createTestAsset(String name) - throws ServiceException { - return service.create(Asset.create().setName(testAssetPrefix + name)); - } - - private static AccessPolicyInfo createWritePolicy(String name, - int durationInMinutes) throws ServiceException { - return service.create(AccessPolicy.create(testPolicyPrefix + name, - durationInMinutes, EnumSet.of(AccessPolicyPermission.WRITE))); - } - - private static void createAndUploadBlob( - WritableBlobContainerContract blobWriter, String blobName, - byte[] data) throws ServiceException { - InputStream blobContent = new ByteArrayInputStream(data); - blobWriter.createBlockBlob(blobName, blobContent); - } - - // - // Assertion helpers - // - - private void assertAssetFileInfoEquals(String message, - AssetFileInfo expected, AssetFileInfo actual) { - verifyAssetInfoProperties(message, expected.getId(), - expected.getName(), expected.getParentAssetId(), - expected.getIsPrimary(), expected.getIsEncrypted(), - expected.getEncryptionKeyId(), expected.getEncryptionScheme(), - expected.getEncryptionVersion(), - expected.getInitializationVector(), expected.getCreated(), - expected.getLastModified(), expected.getContentChecksum(), - expected.getMimeType(), actual); - } - - private void verifyAssetInfoProperties(String message, String id, - String name, String parentAssetId, boolean isPrimary, - boolean isEncrypted, String encryptionKeyId, - String encryptionScheme, String encryptionVersion, - String initializationVector, Date created, Date lastModified, - String contentChecksum, String mimeType, AssetFileInfo assetFile) { - assertNotNull(message, assetFile); - - assertEquals(message + ".getId", id, assetFile.getId()); - assertEquals(message + ".getName", name, assetFile.getName()); - assertEquals(message + ".getParentAssetId", parentAssetId, - assetFile.getParentAssetId()); - assertEquals(message + ".getIsPrimary", isPrimary, - assetFile.getIsPrimary()); - - assertEquals(message + ".getIsEncrypted", isEncrypted, - assetFile.getIsEncrypted()); - assertEquals(message + ".getEncryptionKeyId", encryptionKeyId, - assetFile.getEncryptionKeyId()); - assertEquals(message + ".getEncryptionScheme", encryptionScheme, - assetFile.getEncryptionScheme()); - assertEquals(message + ".getEncryptionVersion", encryptionVersion, - assetFile.getEncryptionVersion()); - assertEquals(message + ".getInitializationVector", - initializationVector, assetFile.getInitializationVector()); - - assertDateApproxEquals(message + ".getCreated", created, - assetFile.getCreated()); - assertDateApproxEquals(message + ".getLastModified", lastModified, - assetFile.getLastModified()); - assertEquals(message + ".getContentChecksum", contentChecksum, - assetFile.getContentChecksum()); - assertEquals(message + ".getMimeType", mimeType, - assetFile.getMimeType()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AssetIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AssetIntegrationTest.java deleted file mode 100644 index 53ec341ecce7..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AssetIntegrationTest.java +++ /dev/null @@ -1,563 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.net.URISyntaxException; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; -import java.util.EnumSet; -import java.util.List; -import java.util.UUID; - -import org.junit.Test; - -import com.microsoft.windowsazure.core.utils.Base64; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.AccessPolicy; -import com.microsoft.windowsazure.services.media.models.AccessPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AccessPolicyPermission; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetDeliveryPolicy; -import com.microsoft.windowsazure.services.media.models.AssetDeliveryPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AssetDeliveryPolicyType; -import com.microsoft.windowsazure.services.media.models.AssetDeliveryProtocol; -import com.microsoft.windowsazure.services.media.models.AssetFile; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.AssetOption; -import com.microsoft.windowsazure.services.media.models.AssetState; -import com.microsoft.windowsazure.services.media.models.ContentKey; -import com.microsoft.windowsazure.services.media.models.ContentKeyInfo; -import com.microsoft.windowsazure.services.media.models.ContentKeyType; -import com.microsoft.windowsazure.services.media.models.Job; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.LinkInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.Locator; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; -import com.microsoft.windowsazure.services.media.models.LocatorType; -import com.microsoft.windowsazure.services.media.models.ProtectionKey; -import com.microsoft.windowsazure.services.media.models.Task; -import com.microsoft.windowsazure.services.media.models.Task.CreateBatchOperation; - -public class AssetIntegrationTest extends IntegrationTestBase { - - private void verifyInfosEqual(String message, AssetInfo expected, - AssetInfo actual) { - verifyAssetProperties(message, expected.getName(), - expected.getAlternateId(), expected.getOptions(), - expected.getState(), actual); - } - - private void verifyAssetProperties(String message, String testName, - String altId, AssetOption encryptionOption, AssetState assetState, - AssetInfo actualAsset) { - verifyAssetProperties(message, testName, altId, encryptionOption, - assetState, null, null, null, actualAsset); - } - - private void verifyAssetProperties(String message, String testName, - String altId, AssetOption encryptionOption, AssetState assetState, - String id, Date created, Date lastModified, AssetInfo actualAsset) { - assertNotNull(message, actualAsset); - assertEquals(message + " Name", testName, actualAsset.getName()); - assertEquals(message + " AlternateId", altId, - actualAsset.getAlternateId()); - assertEquals(message + " Options", encryptionOption, - actualAsset.getOptions()); - assertEquals(message + " State", assetState, actualAsset.getState()); - if (id != null) { - assertEquals(message + " Id", id, actualAsset.getId()); - } - if (created != null) { - assertEquals(message + " Created", created, - actualAsset.getCreated()); - } - if (lastModified != null) { - assertEquals(message + " LastModified", lastModified, - actualAsset.getLastModified()); - } - } - - @Test - public void createAssetOptionsSuccess() throws Exception { - // Arrange - String testName = testAssetPrefix + "createAssetOptionsSuccess"; - String altId = "altId"; - AssetOption encryptionOption = AssetOption.StorageEncrypted; - AssetState assetState = AssetState.Published; - - // Act - AssetInfo actualAsset = service.create(Asset.create() - .setAlternateId(altId).setOptions(encryptionOption) - .setState(assetState).setName(testName)); - - // Assert - verifyAssetProperties("actualAsset", testName, altId, encryptionOption, - assetState, actualAsset); - } - - @Test - public void createAssetMeanString() throws Exception { - // Arrange - String meanString = "'\"(?++\\+&==/&?''$@:// +ne " - + "{\"jsonLike\":\"Created\":\"\\/Date(1336368841597)\\/\",\"Name\":null,cksum value\"}}" - + "Some unicode: \uB2E4\uB974\uB2E4\uB294\u0625 \u064A\u062F\u064A\u0648\u0009\r\n"; - - String testName = testAssetPrefix + "createAssetMeanString" - + meanString; - - // Act - AssetInfo actualAsset = service - .create(Asset.create().setName(testName)); - - // Assert - assertEquals("actualAsset Name", testName, actualAsset.getName()); - } - - @Test - public void createAssetNullNameSuccess() throws Exception { - // Arrange - - // Act - AssetInfo actualAsset = null; - try { - actualAsset = service.create(Asset.create()); - // Assert - verifyAssetProperties("actualAsset", "", "", AssetOption.None, - AssetState.Initialized, actualAsset); - } finally { - // Clean up the anonymous asset now while we have the id, because we - // do not want to delete all anonymous assets in the bulk-cleanup - // code. - try { - if (actualAsset != null) { - service.delete(Asset.delete(actualAsset.getId())); - } - } catch (ServiceException ex) { - // ex.printStackTrace(); - } - } - } - - @Test - public void getAssetSuccess() throws Exception { - // Arrange - String testName = testAssetPrefix + "GetAssetSuccess"; - String altId = "altId"; - AssetOption encryptionOption = AssetOption.StorageEncrypted; - AssetState assetState = AssetState.Published; - - AssetInfo assetInfo = service.create(Asset.create().setName(testName) - .setAlternateId(altId).setOptions(encryptionOption) - .setState(assetState)); - - // Act - AssetInfo actualAsset = service.get(Asset.get(assetInfo.getId())); - - // Assert - verifyInfosEqual("actualAsset", assetInfo, actualAsset); - } - - @Test - public void getAssetInvalidId() throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.get(Asset.get(invalidId)); - } - - @Test - public void getAssetNonexistId() throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.get(Asset.get(validButNonexistAssetId)); - } - - @Test - public void listAssetSuccess() throws ServiceException { - // Arrange - String altId = "altId"; - AssetOption encryptionOption = AssetOption.StorageEncrypted; - AssetState assetState = AssetState.Published; - - String[] assetNames = new String[] { testAssetPrefix + "assetA", - testAssetPrefix + "assetB" }; - List expectedAssets = new ArrayList(); - for (int i = 0; i < assetNames.length; i++) { - String name = assetNames[i]; - expectedAssets.add(service.create(Asset.create().setName(name) - .setAlternateId(altId).setOptions(encryptionOption) - .setState(assetState))); - } - - // Act - Collection listAssetResult = service.list(Asset.list()); - - // Assert - - verifyListResultContains("listAssets", expectedAssets, listAssetResult, - new ComponentDelegate() { - @Override - public void verifyEquals(String message, Object expected, - Object actual) { - verifyInfosEqual(message, (AssetInfo) expected, - (AssetInfo) actual); - } - }); - } - - @Test - public void canListAssetsWithOptions() throws ServiceException { - String[] assetNames = new String[] { - testAssetPrefix + "assetListOptionsA", - testAssetPrefix + "assetListOptionsB", - testAssetPrefix + "assetListOptionsC", - testAssetPrefix + "assetListOptionsD" }; - List expectedAssets = new ArrayList(); - for (int i = 0; i < assetNames.length; i++) { - String name = assetNames[i]; - expectedAssets.add(service.create(Asset.create().setName(name))); - } - - Collection listAssetResult = service.list(Asset.list() - .setTop(2)); - - // Assert - - assertEquals(2, listAssetResult.size()); - } - - @Test - public void updateAssetSuccess() throws Exception { - // Arrange - String originalTestName = testAssetPrefix - + "updateAssetSuccessOriginal"; - AssetOption originalEncryptionOption = AssetOption.StorageEncrypted; - AssetState originalAssetState = AssetState.Initialized; - AssetInfo originalAsset = service.create(Asset.create() - .setName(originalTestName).setAlternateId("altId") - .setOptions(originalEncryptionOption)); - - String updatedTestName = testAssetPrefix + "updateAssetSuccessUpdated"; - String altId = "otherAltId"; - - // Act - service.update(Asset.update(originalAsset.getId()) - .setName(updatedTestName).setAlternateId(altId)); - AssetInfo updatedAsset = service.get(Asset.get(originalAsset.getId())); - - // Assert - verifyAssetProperties("updatedAsset", updatedTestName, altId, - originalEncryptionOption, originalAssetState, updatedAsset); - } - - @Test - public void updateAssetNoChangesSuccess() throws Exception { - // Arrange - String originalTestName = testAssetPrefix - + "updateAssetNoChangesSuccess"; - String altId = "altId"; - AssetInfo originalAsset = service.create(Asset.create() - .setName(originalTestName).setAlternateId(altId)); - - // Act - service.update(Asset.update(originalAsset.getId())); - AssetInfo updatedAsset = service.get(Asset.get(originalAsset.getId())); - - // Assert - verifyInfosEqual("updatedAsset", originalAsset, updatedAsset); - } - - @Test - public void updateAssetFailedWithInvalidId() throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.update(Asset.update(validButNonexistAssetId)); - } - - @Test - public void deleteAssetSuccess() throws Exception { - // Arrange - String assetName = testAssetPrefix + "deleteAssetSuccess"; - AssetInfo assetInfo = service.create(Asset.create().setName(assetName)); - List listAssetsResult = service.list(Asset.list()); - int assetCountBaseline = listAssetsResult.size(); - - // Act - service.delete(Asset.delete(assetInfo.getId())); - - // Assert - listAssetsResult = service.list(Asset.list()); - assertEquals("listAssetsResult.size", assetCountBaseline - 1, - listAssetsResult.size()); - - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.get(Asset.get(assetInfo.getId())); - } - - @Test - public void deleteAssetFailedWithInvalidId() throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.delete(Asset.delete(validButNonexistAssetId)); - } - - @Test - public void linkAssetContentKeySuccess() throws ServiceException, - URISyntaxException, CertificateException { - // Arrange - String originalTestName = testAssetPrefix - + "linkAssetContentKeySuccess"; - AssetInfo assetInfo = service.create(Asset.create() - .setName(originalTestName) - .setOptions(AssetOption.StorageEncrypted)); - - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.StorageEncryption)); - String contentKeyId = String - .format("nb:kid:UUID:%s", UUID.randomUUID()); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - service.create(ContentKey.create(contentKeyId, - ContentKeyType.StorageEncryption, encryptedContentKey) - .setProtectionKeyId(protectionKeyId)); - - // Act - service.action(Asset.linkContentKey(assetInfo.getId(), contentKeyId)); - - // Assert - - List contentKeys = service.list(ContentKey - .list(assetInfo.getContentKeysLink())); - assertEquals(1, contentKeys.size()); - assertEquals(contentKeyId, contentKeys.get(0).getId()); - } - - @Test - public void linkAssetContentKeyInvalidIdFailed() throws ServiceException, - URISyntaxException { - // Arrange - - // Act - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.action(Asset.linkContentKey(validButNonexistAssetId, - "nb:kid:UUID:invalidContentKeyId")); - - // Assert - } - - @Test - public void canGetParentBackFromAsset() throws ServiceException, - InterruptedException { - // Arrange - String originalAssetName = testAssetPrefix - + "canGetParentBackFromAsset"; - AssetInfo originalAsset = service.create(Asset.create().setName( - originalAssetName)); - - int durationInMinutes = 10; - AccessPolicyInfo accessPolicyInfo = service.create(AccessPolicy.create( - testPolicyPrefix + "uploadAesPortectedAssetSuccess", - durationInMinutes, EnumSet.of(AccessPolicyPermission.WRITE))); - - LocatorInfo locatorInfo = service.create(Locator.create( - accessPolicyInfo.getId(), originalAsset.getId(), - LocatorType.SAS)); - WritableBlobContainerContract blobWriter = service - .createBlobWriter(locatorInfo); - - InputStream mpeg4H264InputStream = getClass().getResourceAsStream( - "/media/MPEG4-H264.mp4"); - blobWriter.createBlockBlob("MPEG4-H264.mp4", mpeg4H264InputStream); - service.action(AssetFile.createFileInfos(originalAsset.getId())); - - String jobName = testJobPrefix + "createJobSuccess"; - CreateBatchOperation taskCreator = Task - .create(MEDIA_ENCODER_MEDIA_PROCESSOR_ID, - "" - + "JobInputAsset(0)" - + "JobOutputAsset(0)" - + "") - .setConfiguration("H.264 256k DSL CBR") - .setName("My encoding Task"); - JobInfo jobInfo = service.create(Job.create().setName(jobName) - .addInputMediaAsset(originalAsset.getId()) - .addTaskCreator(taskCreator)); - - // Act - ListResult outputAssets = service.list(Asset.list(jobInfo - .getOutputAssetsLink())); - assertEquals(1, outputAssets.size()); - AssetInfo childAsset = outputAssets.get(0); - - LinkInfo parentAssetLink = childAsset.getParentAssetsLink(); - AssetInfo parentAsset = service.get(Asset.get(parentAssetLink)); - - // Assert - assertEquals(originalAsset.getId(), parentAsset.getId()); - } - - @Test - public void unlinkAssetContentKeySuccess() throws ServiceException, - URISyntaxException, CertificateException { - // Arrange - String originalTestName = testAssetPrefix - + "linkAssetContentKeySuccess"; - AssetInfo assetInfo = service.create(Asset.create() - .setName(originalTestName) - .setOptions(AssetOption.StorageEncrypted)); - - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.StorageEncryption)); - String contentKeyId = String - .format("nb:kid:UUID:%s", UUID.randomUUID()); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - service.create(ContentKey.create(contentKeyId, - ContentKeyType.StorageEncryption, encryptedContentKey) - .setProtectionKeyId(protectionKeyId)); - service.action(Asset.linkContentKey(assetInfo.getId(), contentKeyId)); - - // Act - service.delete(Asset.unlinkContentKey(assetInfo.getId(), contentKeyId)); - - // Assert - List contentKeys = service.list(ContentKey - .list(assetInfo.getContentKeysLink())); - assertEquals(0, contentKeys.size()); - } - - @Test - public void linkAssetDeliveryPolicySuccess() throws ServiceException, - URISyntaxException, CertificateException { - // Arrange - String originalTestName = testAssetPrefix - + "linkAssetContentKeySuccess"; - AssetDeliveryPolicyInfo adpInfo = service.create(AssetDeliveryPolicy.create() - .setName(originalTestName) - .setAssetDeliveryPolicyType(AssetDeliveryPolicyType.NoDynamicEncryption) - .setAssetDeliveryProtocol(EnumSet.of(AssetDeliveryProtocol.SmoothStreaming))); - - AssetInfo assetInfo = service.create(Asset.create() - .setName(originalTestName) - .setOptions(AssetOption.StorageEncrypted)); - - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.StorageEncryption)); - String contentKeyId = String - .format("nb:kid:UUID:%s", UUID.randomUUID()); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - service.create(ContentKey.create(contentKeyId, - ContentKeyType.StorageEncryption, encryptedContentKey) - .setProtectionKeyId(protectionKeyId)); - service.action(Asset.linkContentKey(assetInfo.getId(), contentKeyId)); - - // Act - service.action(Asset.linkDeliveryPolicy(assetInfo.getId(), adpInfo.getId())); - - // Assert - AssetInfo assetInfo2 = service.get(Asset.get(assetInfo.getId())); - ListResult listResult = service.list(AssetDeliveryPolicy.list(assetInfo2.getDeliveryPoliciesLink())); - assertNotNull(listResult); - assertEquals(listResult.size(), 1); - assertEquals(listResult.get(0).getName(), originalTestName); - assertEquals(listResult.get(0).getAssetDeliveryPolicyType(), AssetDeliveryPolicyType.NoDynamicEncryption); - } - - @Test - public void unlinkAssetDeliveryPolicySuccess() throws ServiceException, - URISyntaxException, CertificateException { - // Arrange - String originalTestName = testAssetPrefix - + "unlinkAssetContentKeySuccess"; - AssetDeliveryPolicyInfo adpInfo = service.create(AssetDeliveryPolicy.create() - .setName(originalTestName) - .setAssetDeliveryPolicyType(AssetDeliveryPolicyType.NoDynamicEncryption) - .setAssetDeliveryProtocol(EnumSet.of(AssetDeliveryProtocol.SmoothStreaming))); - - AssetInfo assetInfo = service.create(Asset.create() - .setName(originalTestName) - .setOptions(AssetOption.StorageEncrypted)); - - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.StorageEncryption)); - String contentKeyId = String - .format("nb:kid:UUID:%s", UUID.randomUUID()); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - service.create(ContentKey.create(contentKeyId, - ContentKeyType.StorageEncryption, encryptedContentKey) - .setProtectionKeyId(protectionKeyId)); - service.action(Asset.linkContentKey(assetInfo.getId(), contentKeyId)); - service.action(Asset.linkDeliveryPolicy(assetInfo.getId(), adpInfo.getId())); - - // Act - service.delete(Asset.unlinkDeliveryPolicy(assetInfo.getId(), adpInfo.getId())); - - // Assert - AssetInfo assetInfo2 = service.get(Asset.get(assetInfo.getId())); - ListResult listResult = service.list(AssetDeliveryPolicy.list(assetInfo2.getDeliveryPoliciesLink())); - assertNotNull(listResult); - assertEquals(listResult.size(), 0); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ContentKeyIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ContentKeyIntegrationTest.java deleted file mode 100644 index cc6d0431318e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ContentKeyIntegrationTest.java +++ /dev/null @@ -1,518 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; - -import java.io.ByteArrayInputStream; -import java.net.URI; -import java.net.URL; -import java.net.URLDecoder; -import java.net.URLEncoder; -import java.security.PrivateKey; -import java.security.Security; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.core.utils.Base64; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.ContentKey; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicy; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyInfo; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyOption; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyOptionInfo; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyRestriction; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType; -import com.microsoft.windowsazure.services.media.models.ContentKeyDeliveryType; -import com.microsoft.windowsazure.services.media.models.ContentKeyInfo; -import com.microsoft.windowsazure.services.media.models.ContentKeyType; -import com.microsoft.windowsazure.services.media.models.ProtectionKey; -import com.microsoft.windowsazure.services.media.models.ProtectionKeyType; - -public class ContentKeyIntegrationTest extends IntegrationTestBase { - - private final String validButNonexistContentKeyId = "nb:kid:UUID:80dfe751-e5a1-4b29-a992-4a75276473af"; - private final ContentKeyType testContentKeyType = ContentKeyType.CommonEncryption; - private final String testEncryptedContentKey = "bFE4M/kZrKi00AoLOVpbQ4R9xja5P/pfBv9SC9I1Gw8yx+OIWdazGNpT7MgpeOLSebkxO5iDAIUKX5Es6oRUiH6pTNAMEtiHFBrKywODKnTQ09pCAMmdIA4q1gLeEUpsXPY/YXaLsTrBGbmRtlUYyaZEjestsngV8JpkJemCGjmMF0bHCoQRKt0LCVl/cqyWawzBuyaJniUCDdU8jem7sjrw8BbgCDmTAUmaj9TYxEP98d3wEJcL4pzDzOloYWXqzNB9assXgcQ0eouT7onSHa1d76X2E5q16AIIoOndLyIuAxlwFqpzF6LFy3X9mNGEY1iLXeFA89DE0PPx8EHtyg=="; - - private void assertByteArrayEquals(byte[] source, byte[] target) { - assertEquals(source.length, target.length); - for (int i = 0; i < source.length; i++) { - assertEquals(source[i], target[i]); - } - } - - private ContentKeyInfo createTestContentKey(String contentKeyNameSuffix) - throws ServiceException { - String testContentKeyId = createRandomContentKeyId(); - String testContentKeyName = testContentKeyPrefix + contentKeyNameSuffix; - - ContentKeyInfo contentKeyInfo = service.create(ContentKey.create( - testContentKeyId, testContentKeyType, testEncryptedContentKey) - .setName(testContentKeyName)); - return contentKeyInfo; - } - - private ContentKeyInfo createValidTestContentKeyWithAesKey( - String contentKeyNameSuffix, byte[] aesKey) throws Exception { - String testContnetKeyName = testContentKeyPrefix + contentKeyNameSuffix; - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.StorageEncryption)); - String protectionKey = service.action(ProtectionKey - .getProtectionKey(protectionKeyId)); - - String testContentKeyIdUuid = UUID.randomUUID().toString(); - String testContentKeyId = String.format("nb:kid:UUID:%s", - testContentKeyIdUuid); - - byte[] encryptedContentKey = EncryptionHelper.encryptSymmetricKey( - protectionKey, aesKey); - String encryptedContentKeyString = Base64.encode(encryptedContentKey); - String checksum = EncryptionHelper.calculateContentKeyChecksum( - testContentKeyIdUuid, aesKey); - - ContentKeyInfo contentKeyInfo = service.create(ContentKey - .create(testContentKeyId, ContentKeyType.StorageEncryption, - encryptedContentKeyString).setChecksum(checksum) - .setProtectionKeyId(protectionKeyId) - .setName(testContnetKeyName)); - - return contentKeyInfo; - } - - private ContentKeyInfo createValidTestContentKey(String contentKeyNameSuffix) - throws Exception { - byte[] aesKey = createTestAesKey(); - return createValidTestContentKeyWithAesKey(contentKeyNameSuffix, aesKey); - } - - private byte[] createTestAesKey() { - byte[] aesKey = new byte[32]; - int i; - for (i = 0; i < 32; i++) { - aesKey[i] = 1; - } - - return aesKey; - } - - private String createRandomContentKeyId() { - UUID uuid = UUID.randomUUID(); - String randomContentKey = String.format("nb:kid:UUID:%s", uuid); - return randomContentKey; - } - - private void verifyInfosEqual(String message, ContentKeyInfo expected, - ContentKeyInfo actual) { - verifyContentKeyProperties(message, expected.getId(), - expected.getContentKeyType(), - expected.getEncryptedContentKey(), expected.getName(), - expected.getProtectionKeyId(), expected.getProtectionKeyType(), - expected.getChecksum(), actual); - } - - private void verifyContentKeyProperties(String message, String id, - ContentKeyType contentKeyType, String encryptedContentKey, - String name, String protectionKeyId, - ProtectionKeyType protectionKeyType, String checksum, - ContentKeyInfo actual) { - assertNotNull(message, actual); - assertEquals(message + " Id", id, actual.getId()); - assertEquals(message + " ContentKeyType", contentKeyType, - actual.getContentKeyType()); - assertEquals(message + " EncryptedContentKey", encryptedContentKey, - actual.getEncryptedContentKey()); - assertEquals(message + " Name", name, actual.getName()); - assertEquals(message + " ProtectionKeyId", protectionKeyId, - actual.getProtectionKeyId()); - assertEquals(message + " ProtectionKeyType", protectionKeyType, - actual.getProtectionKeyType()); - assertEquals(message + " Checksum", checksum, actual.getChecksum()); - } - - @BeforeClass - public static void Setup() { - Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); - } - - @Test - public void canCreateContentKey() throws Exception { - // Arrange - String testCanCreateContentKeyId = createRandomContentKeyId(); - String testCanCreateContentKeyName = testContentKeyPrefix - + "testCanCreateContentKey"; - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(testContentKeyType)); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - // Act - ContentKeyInfo contentKeyInfo = service.create(ContentKey - .create(testCanCreateContentKeyId, testContentKeyType, encryptedContentKey) - .setName(testCanCreateContentKeyName) - .setProtectionKeyId(protectionKeyId)); - - // Assert - verifyContentKeyProperties("ContentKey", testCanCreateContentKeyId, - testContentKeyType, encryptedContentKey, - testCanCreateContentKeyName, protectionKeyId, - ProtectionKeyType.fromCode(0), "", contentKeyInfo); - } - - @Test - public void canGetSingleContentKeyById() throws Exception { - // Arrange - String expectedName = testContentKeyPrefix + "GetOne"; - String testGetSingleContentKeyByIdId = createRandomContentKeyId(); - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(testContentKeyType)); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - ContentKeyInfo ContentKeyToGet = service.create(ContentKey - .create(testGetSingleContentKeyByIdId, testContentKeyType, encryptedContentKey) - .setName(expectedName) - .setProtectionKeyId(protectionKeyId)); - - // Act - ContentKeyInfo retrievedContentKeyInfo = service.get(ContentKey - .get(ContentKeyToGet.getId())); - - // Assert - assertEquals(ContentKeyToGet.getId(), retrievedContentKeyInfo.getId()); - verifyContentKeyProperties("ContentKey", testGetSingleContentKeyByIdId, - testContentKeyType, encryptedContentKey, expectedName, - protectionKeyId, ProtectionKeyType.fromCode(0), "", - retrievedContentKeyInfo); - } - - @Test - public void cannotGetSingleContentKeyByInvalidId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.get(ContentKey.get(invalidId)); - } - - @Test - public void canRetrieveListOfContentKeys() throws Exception { - // Arrange - String[] ContentKeyNames = new String[] { - testContentKeyPrefix + "ListOne", - testContentKeyPrefix + "ListTwo" }; - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(testContentKeyType)); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - List expectedContentKeys = new ArrayList(); - for (int i = 0; i < ContentKeyNames.length; i++) { - String testCanRetrieveListOfContentKeysId = createRandomContentKeyId(); - ContentKeyInfo contentKey = service.create(ContentKey.create( - testCanRetrieveListOfContentKeysId, testContentKeyType, encryptedContentKey) - .setProtectionKeyId(protectionKeyId)); - expectedContentKeys.add(contentKey); - } - - // Act - List actualContentKeys = service - .list(ContentKey.list()); - - // Assert - verifyListResultContains("listContentKeyss", expectedContentKeys, - actualContentKeys, new ComponentDelegate() { - @Override - public void verifyEquals(String message, Object expected, - Object actual) { - verifyInfosEqual(message, (ContentKeyInfo) expected, - (ContentKeyInfo) actual); - } - }); - } - - @Test - public void canUseQueryParametersWhenListingContentKeys() throws Exception { - // Arrange - String[] ContentKeyNames = new String[] { - testContentKeyPrefix + "ListThree", - testContentKeyPrefix + "ListFour", - testContentKeyPrefix + "ListFive", - testContentKeyPrefix + "ListSix", - testContentKeyPrefix + "ListSeven" }; - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(testContentKeyType)); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - List expectedContentKeys = new ArrayList(); - for (int i = 0; i < ContentKeyNames.length; i++) { - ContentKeyInfo contentKeyInfo = service.create(ContentKey.create( - createRandomContentKeyId(), testContentKeyType, encryptedContentKey) - .setProtectionKeyId(protectionKeyId)); - expectedContentKeys.add(contentKeyInfo); - } - - // Act - List actualContentKeys = service.list(ContentKey.list() - .setTop(2)); - - // Assert - assertEquals(2, actualContentKeys.size()); - } - - @Test - public void canDeleteContentKeyById() throws Exception { - // Arrange - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(testContentKeyType)); - String contentKeyName = testContentKeyPrefix + "ToDelete"; - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - ContentKeyInfo contentKeyToDelete = service.create(ContentKey - .create(createRandomContentKeyId(), testContentKeyType, encryptedContentKey) - .setName(contentKeyName) - .setProtectionKeyId(protectionKeyId)); - List listContentKeysResult = service.list(ContentKey - .list()); - int ContentKeyCountBaseline = listContentKeysResult.size(); - - // Act - service.delete(ContentKey.delete(contentKeyToDelete.getId())); - - // Assert - listContentKeysResult = service.list(ContentKey.list()); - assertEquals("listPoliciesResult.size", ContentKeyCountBaseline - 1, - listContentKeysResult.size()); - - for (ContentKeyInfo contentKey : service.list(ContentKey.list())) { - assertFalse(contentKeyToDelete.getId().equals(contentKey.getId())); - } - - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.get(ContentKey.get(contentKeyToDelete.getId())); - } - - @Test - public void cannotDeleteContentKeyByInvalidId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.delete(ContentKey.delete(invalidId)); - } - - @Test - public void cannotDeleteContentKeyByNonexistId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.delete(ContentKey.delete(validButNonexistContentKeyId)); - } - - @Test - public void rebindContentKeyNoX509CertificateSuccess() throws Exception { - - ContentKeyInfo contentKeyInfo = createValidTestContentKey("rebindContentKeyNoX509Success"); - - String contentKey = service.action(ContentKey.rebind(contentKeyInfo - .getId())); - assertNotNull(contentKey); - - } - - @Test - public void rebindInvalidContentKeyNoX509CertificateFail() - throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - ContentKeyInfo contentKeyInfo = createTestContentKey("rebindInvalidContentKeyNoX509Fail"); - - service.action(ContentKey.rebind(contentKeyInfo.getId())); - - } - - @Test - public void rebindContentKeyWithX509CertficateSuccess() throws Exception { - Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); - byte[] aesKey = createTestAesKey(); - ContentKeyInfo contentKeyInfo = createValidTestContentKeyWithAesKey( - "rebindContentKeyWithX509Success", aesKey); - URL serverCertificateUri = getClass().getResource( - "/certificate/server.crt"); - X509Certificate x509Certificate = EncryptionHelper - .loadX509Certificate(URLDecoder.decode( - serverCertificateUri.getFile(), "UTF-8")); - URL serverPrivateKey = getClass() - .getResource("/certificate/server.der"); - PrivateKey privateKey = EncryptionHelper.getPrivateKey(URLDecoder - .decode(serverPrivateKey.getFile(), "UTF-8")); - - String rebindedContentKey = service.action(ContentKey.rebind( - contentKeyInfo.getId(), URLEncoder.encode( - Base64.encode(x509Certificate.getEncoded()), "UTF-8"))); - byte[] decryptedAesKey = EncryptionHelper.decryptSymmetricKey( - rebindedContentKey, privateKey); - assertByteArrayEquals(aesKey, decryptedAesKey); - } - - @Test - public void rebindContentKeyWithIncorrectContentKeyIdFailed() - throws ServiceException { - expectedException.expect(ServiceException.class); - service.action(ContentKey.rebind("invalidContentKeyId")); - } - - @Test - public void rebindContentKeyWithIncorrectX509CertificateFailed() - throws ServiceException { - expectedException.expect(ServiceException.class); - ContentKeyInfo contentKeyInfo = createTestContentKey("rebindContentKeyWithIncorrectX509CertficateFailed"); - - service.action(ContentKey.rebind(contentKeyInfo.getId(), - "InvalidX509Certificate")); - } - - @Test - public void canSetContentKeyAuthorizationPolicySuccess() throws Exception { - // Arrange - String testCanCreateContentKeyId = createRandomContentKeyId(); - String testCanCreateContentKeyName = testContentKeyPrefix - + "testSetContentKeyAuthorizationPolicy"; - - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.EnvelopeEncryption)); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - ContentKeyInfo contentKeyInfo = service.create(ContentKey - .create(testCanCreateContentKeyId, ContentKeyType.EnvelopeEncryption, encryptedContentKey) - .setName(testCanCreateContentKeyName) - .setProtectionKeyId(protectionKeyId)); - List restrictions = new ArrayList(); - restrictions.add(new ContentKeyAuthorizationPolicyRestriction(testCanCreateContentKeyName, ContentKeyRestrictionType.Open.getValue(), null)); - ContentKeyAuthorizationPolicyOptionInfo contentKeyAuthPoliceOptionInfo = service.create( - ContentKeyAuthorizationPolicyOption.create(testCanCreateContentKeyName, - ContentKeyDeliveryType.BaselineHttp.getCode(), null, restrictions)); - ContentKeyAuthorizationPolicyInfo contentKeyAuthorizationPolicyInfo = service.create( - ContentKeyAuthorizationPolicy.create(testCanCreateContentKeyName)); - service.action(ContentKeyAuthorizationPolicy.linkOptions(contentKeyAuthorizationPolicyInfo.getId(), contentKeyAuthPoliceOptionInfo.getId())); - - // Act - service.update(ContentKey.update(contentKeyInfo.getId(), contentKeyAuthorizationPolicyInfo.getId())); - - // Assert - ContentKeyInfo contentKeyInfo2 = service.get(ContentKey.get(contentKeyInfo.getId())); - assertNotNull(contentKeyInfo2); - assertEquals(contentKeyInfo2.getName(), contentKeyInfo.getName()); - assertEquals(contentKeyInfo2.getAuthorizationPolicyId(), contentKeyAuthorizationPolicyInfo.getId()); - } - - @Test - public void canGetDeliveryUrlSuccess() throws Exception { - // Arrange - String testCanCreateContentKeyId = createRandomContentKeyId(); - String testCanCreateContentKeyName = testContentKeyPrefix - + "testGetDeliveryUrl"; - - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.EnvelopeEncryption)); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - ContentKeyInfo contentKeyInfo = service.create(ContentKey - .create(testCanCreateContentKeyId, ContentKeyType.EnvelopeEncryption, encryptedContentKey) - .setName(testCanCreateContentKeyName) - .setProtectionKeyId(protectionKeyId)); - List restrictions = new ArrayList(); - restrictions.add(new ContentKeyAuthorizationPolicyRestriction(testCanCreateContentKeyName, ContentKeyRestrictionType.Open.getValue(), null)); - ContentKeyAuthorizationPolicyOptionInfo contentKeyAuthPoliceOptionInfo = service.create( - ContentKeyAuthorizationPolicyOption.create(testCanCreateContentKeyName, - ContentKeyDeliveryType.BaselineHttp.getCode(), null, restrictions)); - ContentKeyAuthorizationPolicyInfo contentKeyAuthorizationPolicyInfo = service.create( - ContentKeyAuthorizationPolicy.create(testCanCreateContentKeyName)); - service.action(ContentKeyAuthorizationPolicy.linkOptions(contentKeyAuthorizationPolicyInfo.getId(), contentKeyAuthPoliceOptionInfo.getId())); - - // Act - String acquisitionUrlString = service - .create(ContentKey.getKeyDeliveryUrl(contentKeyInfo.getId(), ContentKeyDeliveryType.BaselineHttp)); - - // Assert - URI acquisitionUrl = URI.create(acquisitionUrlString); - assertNotNull(acquisitionUrl); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncodingReservedUnitTypeIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncodingReservedUnitTypeIntegrationTest.java deleted file mode 100644 index bf170c72fa50..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncodingReservedUnitTypeIntegrationTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.EncodingReservedUnit; -import com.microsoft.windowsazure.services.media.models.EncodingReservedUnitInfo; -import com.microsoft.windowsazure.services.media.models.EncodingReservedUnitType; -import com.microsoft.windowsazure.services.media.models.OperationState; - -public class EncodingReservedUnitTypeIntegrationTest extends IntegrationTestBase { - private static EncodingReservedUnitInfo encodingReservedUnitInfo; - - @BeforeClass - public static void beforeTesting() throws ServiceException { - encodingReservedUnitInfo = service.get(EncodingReservedUnit.get()); - } - - @AfterClass - public static void afterTesting() throws ServiceException { - String opId = service.update(EncodingReservedUnit.update(encodingReservedUnitInfo) - .setCurrentReservedUnits(encodingReservedUnitInfo.getCurrentReservedUnits()) - .setReservedUnitType(encodingReservedUnitInfo.getReservedUnitType())); - - OperationUtils.await(service, opId); - } - - @Test - public void getEncodingReservedUnitType() throws Exception { - // Arrange - // Act - EncodingReservedUnitInfo encodingReservedUnitInfo = service.get(EncodingReservedUnit.get()); - - // Assert - assertNotNull(encodingReservedUnitInfo); - } - - @Test - public void updateCurrentEncodingReservedUnits() throws Exception { - // Arrange - int expectedReservedUnits = 2; - EncodingReservedUnitInfo encodingReservedUnitInfo = service.get(EncodingReservedUnit.get()); - assertNotNull(encodingReservedUnitInfo); - - // Act - String opId = service.update(EncodingReservedUnit.update(encodingReservedUnitInfo) - .setCurrentReservedUnits(expectedReservedUnits)); - - OperationState state = OperationUtils.await(service, opId); - - encodingReservedUnitInfo = service.get(EncodingReservedUnit.get()); - - // Assert - assertEquals(OperationState.Succeeded, state); - assertNotNull(encodingReservedUnitInfo); - assertEquals(encodingReservedUnitInfo.getCurrentReservedUnits(), expectedReservedUnits); - } - - @Test - public void updateTypeofEncodingReservedUnits() throws Exception { - // Arrange - EncodingReservedUnitType expectedReservedUnitType = EncodingReservedUnitType.Standard; - EncodingReservedUnitInfo encodingReservedUnitInfo = service.get(EncodingReservedUnit.get()); - assertNotNull(encodingReservedUnitInfo); - - // Act - String opId = service.update(EncodingReservedUnit.update(encodingReservedUnitInfo) - .setReservedUnitType(expectedReservedUnitType)); - - OperationState state = OperationUtils.await(service, opId); - - encodingReservedUnitInfo = service.get(EncodingReservedUnit.get()); - - // Assert - assertEquals(OperationState.Succeeded, state); - assertNotNull(encodingReservedUnitInfo); - assertEquals(encodingReservedUnitInfo.getReservedUnitType(), expectedReservedUnitType); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncryptionHelper.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncryptionHelper.java deleted file mode 100644 index ecf9f4727d27..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncryptionHelper.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import java.io.ByteArrayInputStream; -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.security.Key; -import java.security.KeyFactory; -import java.security.PrivateKey; -import java.security.SecureRandom; -import java.security.cert.Certificate; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.security.spec.PKCS8EncodedKeySpec; - -import javax.crypto.Cipher; -import javax.crypto.CipherInputStream; -import javax.crypto.spec.IvParameterSpec; -import javax.crypto.spec.SecretKeySpec; - -import com.microsoft.windowsazure.core.utils.Base64; - -class EncryptionHelper { - public static boolean canUseStrongCrypto() { - try { - Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); - SecretKeySpec secretKeySpec = new SecretKeySpec(new byte[32], "AES"); - cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec); - } catch (Exception e) { - return false; - } - return true; - } - - public static byte[] encryptSymmetricKey(String protectionKey, - byte[] inputData) throws Exception { - byte[] protectionKeyBytes = Base64.decode(protectionKey); - return encryptSymmetricKey(protectionKeyBytes, inputData); - } - - public static byte[] encryptSymmetricKey(byte[] protectionKey, - byte[] inputData) throws Exception { - CertificateFactory certificateFactory = CertificateFactory - .getInstance("X.509"); - ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream( - protectionKey); - Certificate certificate = certificateFactory - .generateCertificate(byteArrayInputStream); - return encryptSymmetricKey(certificate, inputData); - } - - public static byte[] encryptSymmetricKey(Certificate certificate, - byte[] inputData) throws Exception { - Cipher cipher = Cipher.getInstance( - "RSA/None/OAEPWithSHA1AndMGF1Padding", "BC"); - Key publicKey = certificate.getPublicKey(); - SecureRandom secureRandom = new SecureRandom(); - cipher.init(Cipher.ENCRYPT_MODE, publicKey, secureRandom); - byte[] cipherText = cipher.doFinal(inputData); - return cipherText; - } - - public static String calculateContentKeyChecksum(String uuid, byte[] aesKey) - throws Exception { - Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); - SecretKeySpec secretKeySpec = new SecretKeySpec(aesKey, "AES"); - cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec); - byte[] encryptionResult = cipher.doFinal(uuid.getBytes("UTF8")); - byte[] checksumByteArray = new byte[8]; - System.arraycopy(encryptionResult, 0, checksumByteArray, 0, 8); - String checksum = Base64.encode(checksumByteArray); - return checksum; - } - - public static InputStream encryptFile(InputStream inputStream, byte[] key, - byte[] iv) throws Exception { - Cipher cipher = Cipher.getInstance("AES/CTR/NoPadding"); - SecretKeySpec keySpec = new SecretKeySpec(key, "AES"); - IvParameterSpec ivParameterSpec = new IvParameterSpec(iv); - cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivParameterSpec); - CipherInputStream cipherInputStream = new CipherInputStream( - inputStream, cipher); - return cipherInputStream; - } - - public static byte[] decryptSymmetricKey(String encryptedContent, - PrivateKey privateKey) throws Exception { - byte[] encryptedContentByteArray = Base64.decode(encryptedContent); - return decryptSymmetricKey(encryptedContentByteArray, privateKey); - } - - public static byte[] decryptSymmetricKey(byte[] encryptedContent, - PrivateKey privateKey) throws Exception { - if (encryptedContent == null) { - throw new IllegalArgumentException( - "The encrypted content cannot be null."); - } - - if (encryptedContent.length == 0) { - throw new IllegalArgumentException( - "The encrypted content cannot be empty."); - } - - if (privateKey == null) { - throw new IllegalArgumentException( - "The private key cannot be null."); - } - - Cipher cipher = Cipher.getInstance( - "RSA/ECB/OAEPWithSHA1AndMGF1Padding", "BC"); - cipher.init(Cipher.DECRYPT_MODE, privateKey); - byte[] decrypted = cipher.doFinal(encryptedContent); - return decrypted; - } - - public static X509Certificate loadX509Certificate(String certificateFileName) - throws Exception { - if ((certificateFileName == null) || certificateFileName.isEmpty()) { - throw new IllegalArgumentException( - "certificate file name cannot be null or empty."); - } - - CertificateFactory certificateFactory = CertificateFactory - .getInstance("X.509"); - FileInputStream certificateInputStream = new FileInputStream( - certificateFileName); - X509Certificate x509Certificate = (X509Certificate) certificateFactory - .generateCertificate(certificateInputStream); - return x509Certificate; - } - - public static PrivateKey getPrivateKey(String certificateFileName) - throws Exception { - if ((certificateFileName == null) || certificateFileName.isEmpty()) { - throw new IllegalArgumentException( - "certificate file name cannot be null or empty."); - } - - File file = new File(certificateFileName); - FileInputStream fis = new FileInputStream(file); - DataInputStream dataInputStream = new DataInputStream(fis); - byte[] keyBytes = new byte[(int) file.length()]; - dataInputStream.readFully(keyBytes); - dataInputStream.close(); - - PKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec( - keyBytes); - KeyFactory keyFactory = KeyFactory.getInstance("RSA"); - return keyFactory.generatePrivate(pkcs8EncodedKeySpec); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncryptionIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncryptionIntegrationTest.java deleted file mode 100644 index 75e195968f07..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncryptionIntegrationTest.java +++ /dev/null @@ -1,376 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigInteger; -import java.net.URL; -import java.net.URLDecoder; -import java.security.Key; -import java.security.KeyPair; -import java.security.KeyPairGenerator; -import java.security.PrivateKey; -import java.security.SecureRandom; -import java.security.Security; -import java.security.cert.X509Certificate; -import java.util.EnumSet; -import java.util.List; -import java.util.Random; -import java.util.UUID; - -import javax.crypto.Cipher; - -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.core.utils.Base64; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.AccessPolicy; -import com.microsoft.windowsazure.services.media.models.AccessPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AccessPolicyPermission; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetFile; -import com.microsoft.windowsazure.services.media.models.AssetFileInfo; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.AssetOption; -import com.microsoft.windowsazure.services.media.models.ContentKey; -import com.microsoft.windowsazure.services.media.models.ContentKeyInfo; -import com.microsoft.windowsazure.services.media.models.ContentKeyType; -import com.microsoft.windowsazure.services.media.models.Job; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.JobState; -import com.microsoft.windowsazure.services.media.models.LinkInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.Locator; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; -import com.microsoft.windowsazure.services.media.models.LocatorType; -import com.microsoft.windowsazure.services.media.models.MediaProcessor; -import com.microsoft.windowsazure.services.media.models.MediaProcessorInfo; -import com.microsoft.windowsazure.services.media.models.ProtectionKey; -import com.microsoft.windowsazure.services.media.models.Task; -import com.microsoft.windowsazure.services.media.models.TaskInfo; -import com.microsoft.windowsazure.services.media.models.TaskState; - -public class EncryptionIntegrationTest extends IntegrationTestBase { - private final String storageDecryptionProcessor = "Storage Decryption"; - - private void assertByteArrayEquals(byte[] source, byte[] target) { - assertEquals(source.length, target.length); - for (int i = 0; i < source.length; i++) { - assertEquals(source[i], target[i]); - } - } - - @BeforeClass - public static void Setup() { - Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); - } - - @Test - public void uploadAesProtectedAssetAndDownloadSuccess() throws Exception { - // Arrange - if (!EncryptionHelper.canUseStrongCrypto()) { - throw new UnsupportedOperationException("JVM does not support the required encryption. Please download unlimited strength jurisdiction policy files."); - } - - // Media Services requires 256-bit (32-byte) keys and - // 128-bit (16-byte) initialization vectors (IV) for AES encryption, - // and also requires that only the first 8 bytes of the IV is filled. - Random random = new Random(); - byte[] aesKey = new byte[32]; - random.nextBytes(aesKey); - byte[] effectiveIv = new byte[8]; - random.nextBytes(effectiveIv); - byte[] iv = new byte[16]; - System.arraycopy(effectiveIv, 0, iv, 0, effectiveIv.length); - - InputStream mpeg4H264InputStream = getClass().getResourceAsStream( - "/media/MPEG4-H264.mp4"); - InputStream encryptedContent = EncryptionHelper.encryptFile( - mpeg4H264InputStream, aesKey, iv); - int durationInMinutes = 10; - - // Act - AssetInfo assetInfo = service.create(Asset.create() - .setName(testAssetPrefix + "uploadAesProtectedAssetSuccess") - .setOptions(AssetOption.StorageEncrypted)); - WritableBlobContainerContract blobWriter = getBlobWriter( - assetInfo.getId(), durationInMinutes); - - // gets the public key for storage encryption. - String contentKeyId = createContentKey(aesKey); - - // link the content key with the asset. - service.action(Asset.linkContentKey(assetInfo.getId(), contentKeyId)); - - // upload the encrypted file to the server. - uploadEncryptedAssetFile(assetInfo, blobWriter, "MPEG4-H264.mp4", - encryptedContent, contentKeyId, iv); - - // submit and execute the decoding job. - JobInfo jobInfo = decodeAsset(testJobPrefix - + "uploadAesProtectedAssetSuccess", assetInfo.getId()); - - // assert - LinkInfo taskLinkInfo = jobInfo.getTasksLink(); - List taskInfos = service.list(Task.list(taskLinkInfo)); - for (TaskInfo taskInfo : taskInfos) { - assertEquals(TaskState.Completed, taskInfo.getState()); - ListResult outputs = service.list(Asset.list(taskInfo - .getOutputAssetsLink())); - assertEquals(1, outputs.size()); - } - assertEquals(JobState.Finished, jobInfo.getState()); - - // Verify that the contents match - InputStream expected = getClass().getResourceAsStream( - "/media/MPEG4-H264.mp4"); - - ListResult outputAssets = service.list(Asset.list(jobInfo - .getOutputAssetsLink())); - assertEquals(1, outputAssets.size()); - AssetInfo outputAsset = outputAssets.get(0); - ListResult assetFiles = service.list(AssetFile - .list(assetInfo.getAssetFilesLink())); - assertEquals(1, assetFiles.size()); - AssetFileInfo outputFile = assetFiles.get(0); - - InputStream actual = getFileContents(outputAsset.getId(), - outputFile.getName(), durationInMinutes); - assertStreamsEqual(expected, actual); - } - - @Test - public void testEncryptedContentCanBeDecrypted() throws Exception { - byte[] aesKey = new byte[32]; - for (int i = 0; i < 32; i++) { - aesKey[i] = 1; - } - URL serverCertificateUri = getClass().getResource( - "/certificate/server.crt"); - X509Certificate x509Certificate = EncryptionHelper - .loadX509Certificate(URLDecoder.decode( - serverCertificateUri.getFile(), "UTF-8")); - URL serverPrivateKey = getClass() - .getResource("/certificate/server.der"); - PrivateKey privateKey = EncryptionHelper.getPrivateKey(URLDecoder - .decode(serverPrivateKey.getFile(), "UTF-8")); - byte[] encryptedAesKey = EncryptionHelper.encryptSymmetricKey( - x509Certificate, aesKey); - byte[] decryptedAesKey = EncryptionHelper.decryptSymmetricKey( - encryptedAesKey, privateKey); - - assertByteArrayEquals(aesKey, decryptedAesKey); - } - - @Test - public void testEncryptedContentCanBeDecryptedUsingPreGeneratedKeyPair() - throws Exception { - byte[] input = "abc".getBytes(); - Cipher cipher = Cipher.getInstance( - "RSA/ECB/OAEPWithSHA1AndMGF1Padding", "BC"); - SecureRandom random = new SecureRandom(); - URL serverCertificateUri = getClass().getResource( - "/certificate/server.crt"); - X509Certificate x509Certificate = EncryptionHelper - .loadX509Certificate(URLDecoder.decode( - serverCertificateUri.getFile(), "UTF-8")); - URL serverPrivateKey = getClass() - .getResource("/certificate/server.der"); - PrivateKey privateKey = EncryptionHelper.getPrivateKey(URLDecoder - .decode(serverPrivateKey.getFile(), "UTF-8")); - Key pubKey = x509Certificate.getPublicKey(); - cipher.init(Cipher.ENCRYPT_MODE, pubKey, random); - byte[] cipherText = cipher.doFinal(input); - cipher.init(Cipher.DECRYPT_MODE, privateKey); - - // Act - byte[] plainText = cipher.doFinal(cipherText); - - // Assert - assertByteArrayEquals(input, plainText); - } - - @Test - public void testEncryptionDecryptionFunctionUsingGeneratedKeyPair() - throws Exception { - // Arrange - byte[] input = "abc".getBytes(); - Cipher cipher = Cipher.getInstance( - "RSA/ECB/OAEPWithSHA1AndMGF1Padding", "BC"); - SecureRandom random = new SecureRandom(); - KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA", "BC"); - generator.initialize(386, random); - KeyPair pair = generator.generateKeyPair(); - Key pubKey = pair.getPublic(); - Key privKey = pair.getPrivate(); - cipher.init(Cipher.ENCRYPT_MODE, pubKey, random); - byte[] cipherText = cipher.doFinal(input); - cipher.init(Cipher.DECRYPT_MODE, privKey); - - // Act - byte[] plainText = cipher.doFinal(cipherText); - - // Assert - assertByteArrayEquals(input, plainText); - } - - private JobInfo decodeAsset(String name, String inputAssetId) - throws ServiceException, InterruptedException { - MediaProcessorInfo mediaProcessorInfo = service.list( - MediaProcessor.list().set("$filter", - "Name eq '" + storageDecryptionProcessor + "'")).get(0); - - String taskBody = "" - + "JobInputAsset(0)JobOutputAsset(0)"; - JobInfo jobInfo = service.create(Job - .create() - .addInputMediaAsset(inputAssetId) - .addTaskCreator( - Task.create(mediaProcessorInfo.getId(), taskBody) - .setName(name))); - - JobInfo currentJobInfo = jobInfo; - int retryCounter = 0; - while (currentJobInfo.getState().getCode() < 3 && retryCounter < 30) { - Thread.sleep(10000); - currentJobInfo = service.get(Job.get(jobInfo.getId())); - retryCounter++; - } - return currentJobInfo; - } - - private String createContentKey(byte[] aesKey) throws ServiceException, - Exception { - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.StorageEncryption)); - String protectionKey = service.action(ProtectionKey - .getProtectionKey(protectionKeyId)); - - String contentKeyIdUuid = UUID.randomUUID().toString(); - String contentKeyId = String.format("nb:kid:UUID:%s", contentKeyIdUuid); - - byte[] encryptedContentKey = EncryptionHelper.encryptSymmetricKey( - protectionKey, aesKey); - String encryptedContentKeyString = Base64.encode(encryptedContentKey); - String checksum = EncryptionHelper.calculateContentKeyChecksum( - contentKeyIdUuid, aesKey); - - ContentKeyInfo contentKeyInfo = service.create(ContentKey - .create(contentKeyId, ContentKeyType.StorageEncryption, - encryptedContentKeyString).setChecksum(checksum) - .setProtectionKeyId(protectionKeyId)); - return contentKeyInfo.getId(); - } - - private void uploadEncryptedAssetFile(AssetInfo asset, - WritableBlobContainerContract blobWriter, String blobName, - InputStream blobContent, String encryptionKeyId, byte[] iv) - throws ServiceException { - blobWriter.createBlockBlob(blobName, blobContent); - service.action(AssetFile.createFileInfos(asset.getId())); - ListResult files = service.list(AssetFile.list( - asset.getAssetFilesLink()).set("$filter", - "Name eq '" + blobName + "'")); - assertEquals(1, files.size()); - AssetFileInfo file = files.get(0); - byte[] sub = new byte[9]; - // Offset bytes to ensure that the sign-bit is not set. - // Media Services expects unsigned Int64 values. - System.arraycopy(iv, 0, sub, 1, 8); - BigInteger longIv = new BigInteger(sub); - String initializationVector = longIv.toString(); - - service.update(AssetFile.update(file.getId()).setIsEncrypted(true) - .setEncryptionKeyId(encryptionKeyId) - .setEncryptionScheme("StorageEncryption") - .setEncryptionVersion("1.0") - .setInitializationVector(initializationVector)); - } - - private WritableBlobContainerContract getBlobWriter(String assetId, - int durationInMinutes) throws ServiceException { - AccessPolicyInfo accessPolicyInfo = service.create(AccessPolicy.create( - testPolicyPrefix + "uploadAesPortectedAssetSuccess", - durationInMinutes, EnumSet.of(AccessPolicyPermission.WRITE))); - - // creates locator for the input media asset - LocatorInfo locatorInfo = service.create(Locator.create( - accessPolicyInfo.getId(), assetId, LocatorType.SAS)); - WritableBlobContainerContract blobWriter = service - .createBlobWriter(locatorInfo); - return blobWriter; - } - - private InputStream getFileContents(String assetId, String fileName, - int availabilityWindowInMinutes) throws ServiceException, - InterruptedException, IOException { - AccessPolicyInfo readAP = service.create(AccessPolicy.create( - testPolicyPrefix + "tempAccessPolicy", - availabilityWindowInMinutes, - EnumSet.of(AccessPolicyPermission.READ))); - LocatorInfo readLocator = service.create(Locator.create(readAP.getId(), - assetId, LocatorType.SAS)); - URL file = new URL(readLocator.getBaseUri() + "/" + fileName - + readLocator.getContentAccessToken()); - - // There can be a delay before a new read locator is applied for the - // asset files. - InputStream reader = null; - for (int counter = 0; true; counter++) { - try { - reader = file.openConnection().getInputStream(); - break; - } catch (IOException e) { - System.out.println("Got error, wait a bit and try again"); - if (counter < 6) { - Thread.sleep(10000); - } else { - // No more retries. - throw e; - } - } - } - - return reader; - } - - private void assertStreamsEqual(InputStream inputStream1, - InputStream inputStream2) throws IOException { - byte[] buffer1 = new byte[1024]; - byte[] buffer2 = new byte[1024]; - try { - while (true) { - int n1 = inputStream1.read(buffer1); - int n2 = inputStream2.read(buffer2); - assertEquals("number of bytes read from streams", n1, n2); - if (n1 == -1) { - break; - } - for (int i = 0; i < n1; i++) { - assertEquals("byte " + i + " read from streams", - buffer1[i], buffer2[i]); - } - } - } finally { - inputStream1.close(); - inputStream2.close(); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EntityProxyTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EntityProxyTest.java deleted file mode 100644 index f9b29118eb6c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EntityProxyTest.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.util.HashSet; -import java.util.Set; - -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; - -public class EntityProxyTest extends IntegrationTestBase { - private static MediaContract entityService; - - @BeforeClass - public static void entityProxyTestSetup() { - entityService = config.create(MediaContract.class); - } - - @Test - public void canCreateEntityProxy() { - assertNotNull(entityService); - } - - @Test - public void canCreateDefaultAssetEntity() throws Exception { - - AssetInfo asset = entityService.create(Asset.create()); - - assertNotNull(asset.getId()); - } - - @Test - public void canCreateAssetOnServerWithNameAndAltId() throws Exception { - String name = testAssetPrefix + "AName"; - String altId = "unit test alt id"; - - AssetInfo asset = entityService.create(Asset.create().setName(name) - .setAlternateId(altId)); - - assertNotNull(asset.getId()); - assertEquals(name, asset.getName()); - assertEquals(altId, asset.getAlternateId()); - } - - @Test - public void canRetrieveAssetById() throws Exception { - AssetInfo createdAsset = entityService.create(Asset.create().setName( - testAssetPrefix + "canRetrieveAssetById")); - - AssetInfo retrieved = entityService - .get(Asset.get(createdAsset.getId())); - - assertEquals(createdAsset.getId(), retrieved.getId()); - assertEquals(createdAsset.getName(), retrieved.getName()); - - } - - @Test - public void canListAllAssets() throws Exception { - int numAssetsToCreate = 4; - Set expectedAssets = createTestAssets(numAssetsToCreate, - "canList"); - - ListResult assets = entityService.list(Asset.list()); - - assertTrue(assets.size() >= numAssetsToCreate); - - for (AssetInfo asset : assets) { - if (expectedAssets.contains(asset.getId())) { - expectedAssets.remove(asset.getId()); - } - } - assertEquals(0, expectedAssets.size()); - } - - @Test - public void canListAssetsWithQueryParameters() throws Exception { - createTestAssets(4, "withQuery"); - - ListResult assets = entityService.list(Asset.list() - .setTop(2)); - - assertEquals(2, assets.size()); - } - - @Test - public void canUpdateAssetNameAndAltId() throws Exception { - String newName = testAssetPrefix + "newName"; - String newAltId = "updated alt id"; - - AssetInfo initialAsset = entityService.create(Asset.create().setName( - testAssetPrefix + "originalName")); - - entityService.update(Asset.update(initialAsset.getId()) - .setName(newName).setAlternateId(newAltId)); - - AssetInfo updatedAsset = entityService.get(Asset.get(initialAsset - .getId())); - - assertEquals(initialAsset.getId(), updatedAsset.getId()); - assertEquals(newName, updatedAsset.getName()); - assertEquals(newAltId, updatedAsset.getAlternateId()); - } - - @Test - public void canDeleteAssetsById() throws Exception { - int numToDelete = 3; - Set assetsToDelete = createTestAssets(numToDelete, "toDelete"); - - ListResult currentAssets = entityService.list(Asset.list()); - - for (String id : assetsToDelete) { - entityService.delete(Asset.delete(id)); - } - - ListResult afterDeleteAssets = entityService.list(Asset - .list()); - - assertEquals(currentAssets.size() - numToDelete, - afterDeleteAssets.size()); - - for (AssetInfo asset : afterDeleteAssets) { - assetsToDelete.remove(asset.getId()); - } - - assertEquals(numToDelete, assetsToDelete.size()); - } - - private Set createTestAssets(int numAssets, String namePart) - throws Exception { - Set expectedAssets = new HashSet(); - - for (int i = 0; i < numAssets; ++i) { - AssetInfo asset = entityService.create(Asset.create().setName( - testAssetPrefix + namePart + Integer.toString(i))); - expectedAssets.add(asset.getId()); - } - return expectedAssets; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ExportsTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ExportsTest.java deleted file mode 100644 index 2e166db4fb4a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ExportsTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import java.net.URI; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.RedirectFilter; -import com.microsoft.windowsazure.services.media.implementation.ResourceLocationManager; - -/** - * Tests to verify the items exported from media services can be resolved from - * configuration. - * - */ -public class ExportsTest extends IntegrationTestBase { - - @Test - public void canResolveLocationManagerFromConfig() throws Exception { - ResourceLocationManager rlm = config - .create(ResourceLocationManager.class); - URI rootUri = new URI( - (String) config.getProperty(MediaConfiguration.AZURE_AD_API_SERVER)); - - assertEquals(rootUri, rlm.getBaseURI()); - } - - @Test - public void canResolveRedirectFilterFromConfig() throws Exception { - RedirectFilter filter = config.create(RedirectFilter.class); - assertNotNull(filter); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/IntegrationTestBase.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/IntegrationTestBase.java deleted file mode 100644 index 731348634a40..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/IntegrationTestBase.java +++ /dev/null @@ -1,487 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.lang.reflect.Method; -import java.net.URI; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; -import java.util.EnumSet; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.rules.ExpectedException; - -import com.microsoft.windowsazure.Configuration; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.authentication.AzureAdClientSymmetricKey; -import com.microsoft.windowsazure.services.media.authentication.AzureAdTokenCredentials; -import com.microsoft.windowsazure.services.media.authentication.AzureAdTokenProvider; -import com.microsoft.windowsazure.services.media.authentication.AzureEnvironments; -import com.microsoft.windowsazure.services.media.authentication.TokenProvider; -import com.microsoft.windowsazure.services.media.models.AccessPolicy; -import com.microsoft.windowsazure.services.media.models.AccessPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AccessPolicyPermission; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetFile; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.ContentKey; -import com.microsoft.windowsazure.services.media.models.ContentKeyInfo; -import com.microsoft.windowsazure.services.media.models.Job; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.JobState; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.Locator; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; -import com.microsoft.windowsazure.services.media.models.LocatorType; -import com.microsoft.windowsazure.services.media.models.MediaProcessor; -import com.microsoft.windowsazure.services.media.models.MediaProcessorInfo; -import com.microsoft.windowsazure.services.media.models.NotificationEndPoint; -import com.microsoft.windowsazure.services.media.models.NotificationEndPointInfo; -import com.microsoft.windowsazure.services.media.models.StreamingEndpoint; -import com.microsoft.windowsazure.services.media.models.StreamingEndpointInfo; -import com.microsoft.windowsazure.services.media.models.StreamingEndpointState; -import com.microsoft.windowsazure.services.queue.QueueConfiguration; -import com.microsoft.windowsazure.services.queue.QueueContract; -import com.microsoft.windowsazure.services.queue.QueueService; -import com.microsoft.windowsazure.services.queue.models.ListQueuesResult; -import com.microsoft.windowsazure.services.queue.models.ListQueuesResult.Queue; - -public abstract class IntegrationTestBase { - protected static MediaContract service; - protected static QueueContract queueService; - protected static Configuration config; - protected static ExecutorService executorService; - protected static TokenProvider tokenProvider; - - protected static final String testAssetPrefix = "testAsset"; - protected static final String testPolicyPrefix = "testPolicy"; - protected static final String testContentKeyPrefix = "testContentKey"; - protected static final String testJobPrefix = "testJobPrefix"; - protected static final String testQueuePrefix = "testqueueprefix"; - protected static final String testChannelPrefix = "testChannel"; - protected static final String testProgramPrefix = "testProgram"; - protected static final String testNotificationEndPointPrefix = "testNotificationEndPointPrefix"; - protected static final String testStreamingEndPointPrefix = "testSEPPrfx"; - - protected static final String validButNonexistAssetId = "nb:cid:UUID:0239f11f-2d36-4e5f-aa35-44d58ccc0973"; - protected static final String validButNonexistAccessPolicyId = "nb:pid:UUID:38dcb3a0-ef64-4ad0-bbb5-67a14c6df2f7"; - protected static final String validButNonexistLocatorId = "nb:lid:UUID:92a70402-fca9-4aa3-80d7-d4de3792a27a"; - - protected static String MEDIA_ENCODER_MEDIA_PROCESSOR_ID = "nb:mpid:UUID:ff4df607-d419-42f0-bc17-a481b1331e56"; - protected static final String invalidId = "notAValidId"; - - @Rule - public ExpectedException expectedException = ExpectedException.none(); - - @BeforeClass - public static void setup() throws Exception { - executorService = Executors.newFixedThreadPool(5); - config = Configuration.getInstance(); - - String tenant = config.getProperty("media.azuread.test.tenant").toString(); - String clientId = config.getProperty("media.azuread.test.clientid").toString(); - String clientKey = config.getProperty("media.azuread.test.clientkey").toString(); - String apiserver = config.getProperty("media.azuread.test.account_api_uri").toString(); - - // Setup Azure AD Credentials (in this case using username and password) - AzureAdTokenCredentials credentials = new AzureAdTokenCredentials( - tenant, - new AzureAdClientSymmetricKey(clientId, clientKey), - AzureEnvironments.AZURE_CLOUD_ENVIRONMENT); - - tokenProvider = new AzureAdTokenProvider(credentials, executorService); - - // configure the account endpoint and the token provider for injection - config.setProperty(MediaConfiguration.AZURE_AD_API_SERVER, apiserver); - config.setProperty(MediaConfiguration.AZURE_AD_TOKEN_PROVIDER, tokenProvider); - - overrideWithEnv(config, QueueConfiguration.ACCOUNT_KEY, - "media.queue.account.key"); - overrideWithEnv(config, QueueConfiguration.ACCOUNT_NAME, - "media.queue.account.name"); - overrideWithEnv(config, QueueConfiguration.URI, "media.queue.uri"); - - service = MediaService.create(config); - queueService = QueueService.create(config); - - cleanupEnvironment(); - } - - protected static void getLatestMediaProcessorID() throws Exception { - ListResult listMediaProcessorsResult = service - .list(MediaProcessor.list()); - List ps = listMediaProcessorsResult; - double latestVersion = 0.0; - int position = -1; - for (int i = 0; i < ps.size(); i++) { - MediaProcessorInfo mediaProcessorInfo = ps.get(i); - double d = Double.parseDouble(mediaProcessorInfo.getVersion()); - if (d > latestVersion) { - latestVersion = d; - position = i; - } - } - - if (position != -1) { - MEDIA_ENCODER_MEDIA_PROCESSOR_ID = ps.get(position).getId(); - } - } - - protected static void overrideWithEnv(Configuration config, String key) { - String value = System.getenv(key); - if (value == null) - return; - - config.setProperty(key, value); - } - - protected static void overrideWithEnv(Configuration config, String key, - String enviromentKey) { - String value = System.getenv(enviromentKey); - if (value == null) - return; - - config.setProperty(key, value); - } - - @AfterClass - public static void cleanup() throws Exception { - cleanupEnvironment(); - - // shutdown the executor service required by ADAL4J - executorService.shutdown(); - } - - protected static void cleanupEnvironment() { - removeAllTestLocators(); - removeAllTestAssets(); - removeAllTestAccessPolicies(); - removeAllTestJobs(); - removeAllTestContentKeys(); - removeAllTestQueues(); - removeAllTestNotificationEndPoints(); - removeAllTestStreamingEndPoints(); - } - - private static boolean ensureStreamingPointStopped(String streamingEndpointId) throws ServiceException { - StreamingEndpointInfo streamingEndPoint = service.get(StreamingEndpoint.get(streamingEndpointId)); - if (streamingEndPoint.getState().equals(StreamingEndpointState.Stopped)) { - return true; - } - if (streamingEndPoint.getState().equals(StreamingEndpointState.Running)) { - String opid = service.action(StreamingEndpoint.stop(streamingEndpointId)); - OperationUtils.await(service, opid); - return ensureStreamingPointStopped(streamingEndpointId); - } - try { - Thread.sleep(5000); - } catch (InterruptedException e) { - // do nothing - } - return ensureStreamingPointStopped(streamingEndpointId); - } - - private static void removeAllTestStreamingEndPoints() - { - try { - ListResult listStreamingEndpointResult = service.list(StreamingEndpoint.list()); - for (StreamingEndpointInfo streamingEndPoint : listStreamingEndpointResult) { - if (streamingEndPoint.getName().startsWith(testStreamingEndPointPrefix)) { - try { - ensureStreamingPointStopped(streamingEndPoint.getId()); - String operationId = service.delete(StreamingEndpoint.delete(streamingEndPoint.getId())); - if (operationId != null) { - OperationUtils.await(service, operationId); - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - - private static void removeAllTestNotificationEndPoints() - { - try { - ListResult listNotificationEndPointResult = service.list(NotificationEndPoint.list()); - for (NotificationEndPointInfo notificationEndPoint : listNotificationEndPointResult) { - if (notificationEndPoint.getName().startsWith(testNotificationEndPointPrefix)); - try { - service.delete(NotificationEndPoint.delete(notificationEndPoint.getId())); - } catch (Exception e) { - // e.printStackTrace(); - } - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - - private static void removeAllTestQueues() { - try { - ListQueuesResult listQueueResult = queueService.listQueues(); - for (Queue queue : listQueueResult.getQueues()) { - try { - queueService.deleteQueue(queue.getName()); - } catch (Exception e) { - // e.printStackTrace(); - } - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - - private static void removeAllTestContentKeys() { - try { - List contentKeyInfos = service.list(ContentKey - .list()); - - for (ContentKeyInfo contentKeyInfo : contentKeyInfos) { - try { - service.delete(ContentKey.delete(contentKeyInfo.getId())); - } catch (Exception e) { - // e.printStackTrace(); - } - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - - private static void removeAllTestAccessPolicies() { - try { - List policies = service.list(AccessPolicy.list()); - - for (AccessPolicyInfo policy : policies) { - if (policy.getName().startsWith(testPolicyPrefix)) { - service.delete(AccessPolicy.delete(policy.getId())); - } - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - - private static void removeAllTestAssets() { - try { - List listAssetsResult = service.list(Asset.list()); - for (AssetInfo assetInfo : listAssetsResult) { - try { - if (assetInfo.getName().startsWith(testAssetPrefix)) { - service.delete(Asset.delete(assetInfo.getId())); - } else if (assetInfo.getName() - .startsWith("JobOutputAsset(") - && assetInfo.getName().contains(testJobPrefix)) { - // Delete the temp assets associated with Job results. - service.delete(Asset.delete(assetInfo.getId())); - } else if (assetInfo.getName().startsWith("Output")) { - service.delete(Asset.delete(assetInfo.getId())); - } else if (assetInfo.getName().isEmpty()) { - service.delete(Asset.delete(assetInfo.getId())); - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - - private static void removeAllTestLocators() { - try { - ListResult listLocatorsResult = service.list(Locator - .list()); - for (LocatorInfo locatorInfo : listLocatorsResult) { - AssetInfo ai = service.get(Asset.get(locatorInfo.getAssetId())); - if (ai.getName().startsWith(testAssetPrefix)) { - service.delete(Locator.delete(locatorInfo.getId())); - } - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - - private static void removeAllTestJobs() { - try { - ListResult jobs = service.list(Job.list()); - for (JobInfo job : jobs) { - if (job.getName().startsWith(testJobPrefix)) { - // Job can't be deleted when it's state is - // canceling, scheduled,queued or processing - try { - if (isJobBusy(job.getState())) { - service.action(Job.cancel(job.getId())); - job = service.get(Job.get(job.getId())); - } - - int retryCounter = 0; - while (isJobBusy(job.getState()) && retryCounter < 10) { - Thread.sleep(2000); - job = service.get(Job.get(job.getId())); - retryCounter++; - } - - if (!isJobBusy(job.getState())) { - service.delete(Job.delete(job.getId())); - } else { - // Not much to do so except wait. - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - - private static boolean isJobBusy(JobState state) { - return state == JobState.Canceling || state == JobState.Scheduled - || state == JobState.Queued || state == JobState.Processing; - } - - interface ComponentDelegate { - void verifyEquals(String message, Object expected, Object actual); - } - - protected static AssetInfo setupAssetWithFile() throws ServiceException { - String name = UUID.randomUUID().toString(); - String testBlobName = "test" + name + ".bin"; - AssetInfo assetInfo = service.create(Asset.create().setName( - testAssetPrefix + name)); - - AccessPolicyInfo accessPolicyInfo = service.create(AccessPolicy.create( - testPolicyPrefix + name, 10, - EnumSet.of(AccessPolicyPermission.WRITE))); - LocatorInfo locator = createLocator(accessPolicyInfo, assetInfo, 5); - WritableBlobContainerContract blobWriter = service - .createBlobWriter(locator); - InputStream blobContent = new ByteArrayInputStream(new byte[] { 4, 8, - 15, 16, 23, 42 }); - blobWriter.createBlockBlob(testBlobName, blobContent); - - service.action(AssetFile.createFileInfos(assetInfo.getId())); - - return assetInfo; - } - - protected static LocatorInfo createLocator(AccessPolicyInfo accessPolicy, - AssetInfo asset, int startDeltaMinutes) throws ServiceException { - - Date now = new Date(); - Date start = new Date(now.getTime() - (startDeltaMinutes * 60 * 1000)); - - return service.create(Locator.create(accessPolicy.getId(), - asset.getId(), LocatorType.SAS).setStartDateTime(start)); - } - - protected void verifyListResultContains(List expectedInfos, - Collection actualInfos, ComponentDelegate delegate) { - verifyListResultContains("", expectedInfos, actualInfos, delegate); - } - - protected void verifyListResultContains(String message, - List expectedInfos, Collection actualInfos, - ComponentDelegate delegate) { - assertNotNull(message + ": actualInfos", actualInfos); - assertTrue( - message - + ": actual size should be same size or larger than expected size", - actualInfos.size() >= expectedInfos.size()); - - List orderedAndFilteredActualInfo = new ArrayList(); - try { - for (T expectedInfo : expectedInfos) { - Method getId = expectedInfo.getClass().getMethod("getId"); - String expectedId = (String) getId.invoke(expectedInfo); - for (T actualInfo : actualInfos) { - if (((String) getId.invoke(actualInfo)).equals(expectedId)) { - orderedAndFilteredActualInfo.add(actualInfo); - break; - } - } - } - } catch (Exception e) { - // Don't worry about problems here. - // e.printStackTrace(); - } - - assertEquals(message - + ": actual filtered size should be same as expected size", - expectedInfos.size(), orderedAndFilteredActualInfo.size()); - - if (delegate != null) { - for (int i = 0; i < expectedInfos.size(); i++) { - delegate.verifyEquals(message - + ": orderedAndFilteredActualInfo " + i, - expectedInfos.get(i), - orderedAndFilteredActualInfo.get(i)); - } - } - } - - protected void assertEqualsNullEmpty(String message, String expected, - String actual) { - if ((expected == null || expected.length() == 0) - && (actual == null || actual.length() == 0)) { - // both nullOrEmpty, so match. - } else { - assertEquals(message, expected, actual); - } - } - - protected void assertDateApproxEquals(Date expected, Date actual) { - assertDateApproxEquals("", expected, actual); - } - - protected void assertDateApproxEquals(String message, Date expected, - Date actual) { - // Default allows for a 2:30 minutes difference in dates, for clock skew, - // network delays, etc. - long deltaInMilliseconds = 150000; - - if (expected == null || actual == null) { - assertEquals(message, expected, actual); - } else { - long diffInMilliseconds = Math.abs(expected.getTime() - - actual.getTime()); - - if (diffInMilliseconds > deltaInMilliseconds) { - assertEquals(message, expected, actual); - } - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/JobIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/JobIntegrationTest.java deleted file mode 100644 index a5bdc5bea3c1..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/JobIntegrationTest.java +++ /dev/null @@ -1,525 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; -import static org.hamcrest.core.Is.is; -import static org.hamcrest.core.AnyOf.anyOf; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.UUID; - -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.EndPointType; -import com.microsoft.windowsazure.services.media.models.ErrorDetail; -import com.microsoft.windowsazure.services.media.models.Job; -import com.microsoft.windowsazure.services.media.models.Job.Creator; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.JobNotificationSubscription; -import com.microsoft.windowsazure.services.media.models.JobState; -import com.microsoft.windowsazure.services.media.models.LinkInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.NotificationEndPoint; -import com.microsoft.windowsazure.services.media.models.NotificationEndPointInfo; -import com.microsoft.windowsazure.services.media.models.TargetJobState; -import com.microsoft.windowsazure.services.media.models.Task; -import com.microsoft.windowsazure.services.media.models.Task.CreateBatchOperation; -import com.microsoft.windowsazure.services.media.models.TaskHistoricalEvent; -import com.microsoft.windowsazure.services.media.models.TaskInfo; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesResult.QueueMessage; - -public class JobIntegrationTest extends IntegrationTestBase { - - private static AssetInfo assetInfo; - - private void verifyJobInfoEqual(String message, JobInfo expected, - JobInfo actual) throws ServiceException { - verifyJobProperties(message, expected.getName(), - expected.getPriority(), expected.getRunningDuration(), - expected.getState(), expected.getTemplateId(), - expected.getCreated(), expected.getLastModified(), - expected.getStartTime(), expected.getEndTime(), null, actual); - } - - private void verifyJobProperties(String message, String testName, - Integer priority, double runningDuration, JobState state, - String templateId, Date created, Date lastModified, Date startTime, - Date endTime, Integer expectedTaskCount, JobInfo actualJob) - throws ServiceException { - assertNotNull(message, actualJob); - - assertNotNull(message + "Id", actualJob.getId()); - - assertEquals(message + " Name", testName, actualJob.getName()); - // comment out due to issue 464 - // assertEquals(message + " Priority", priority, - // actualJob.getPriority()); - assertEquals(message + " RunningDuration", runningDuration, - actualJob.getRunningDuration(), 0.001); - assertEquals(message + " State", state, actualJob.getState()); - assertEqualsNullEmpty(message + " TemplateId", templateId, - actualJob.getTemplateId()); - - assertDateApproxEquals(message + " Created", created, - actualJob.getCreated()); - assertDateApproxEquals(message + " LastModified", lastModified, - actualJob.getLastModified()); - assertDateApproxEquals(message + " StartTime", startTime, - actualJob.getStartTime()); - assertDateApproxEquals(message + " EndTime", endTime, - actualJob.getEndTime()); - - if (expectedTaskCount != null) { - LinkInfo tasksLink = actualJob.getTasksLink(); - ListResult actualTasks = service.list(Task - .list(tasksLink)); - assertEquals(message + " tasks size", expectedTaskCount.intValue(), - actualTasks.size()); - } - } - - private JobNotificationSubscription getJobNotificationSubscription( - String jobNotificationSubscriptionId, TargetJobState targetJobState) { - return new JobNotificationSubscription(jobNotificationSubscriptionId, - targetJobState); - } - - private JobInfo createJob(String name) throws ServiceException { - return service.create(Job.create().setName(name).setPriority(3) - .addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0))); - } - - private CreateBatchOperation getTaskCreator(int outputAssetPosition) { - return Task - .create(MEDIA_ENCODER_MEDIA_PROCESSOR_ID, - "" - + "JobInputAsset(0)" - + "JobOutputAsset(" - + outputAssetPosition + ")" - + "") - .setConfiguration("H.264 256k DSL CBR") - .setName("My encoding Task"); - } - - @BeforeClass - public static void setup() throws Exception { - IntegrationTestBase.setup(); - assetInfo = setupAssetWithFile(); - } - - @Test - public void createJobSuccess() throws ServiceException { - // Arrange - String name = testJobPrefix + "createJobSuccess"; - int priority = 3; - double duration = 0.0; - JobState state = JobState.Queued; - String templateId = null; - Date created = new Date(); - Date lastModified = new Date(); - Date stateTime = null; - Date endTime = null; - - // Act - JobInfo actualJob = service.create(Job.create().setName(name) - .setPriority(priority).addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0))); - - // Assert - verifyJobProperties("actualJob", name, priority, duration, state, - templateId, created, lastModified, stateTime, endTime, 1, - actualJob); - } - - @Test - public void createJobWithFreshMediaContractSuccess() throws ServiceException { - // Arrange - String name = testJobPrefix + "createJobSuccess"; - int priority = 3; - double duration = 0.0; - JobState state = JobState.Queued; - String templateId = null; - Date created = new Date(); - Date lastModified = new Date(); - Date stateTime = null; - Date endTime = null; - - MediaContract freshService = MediaService.create(config); - - // Act - JobInfo actualJob = freshService.create(Job.create().setName(name) - .setPriority(priority).addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0))); - - // Assert - verifyJobProperties("actualJob", name, priority, duration, state, - templateId, created, lastModified, stateTime, endTime, 1, - actualJob); - } - - @Test - public void createJobWithNotificationSuccess() throws ServiceException { - // Arrange - String name = testJobPrefix + "createJobWithNotificationSuccess"; - String queueName = testQueuePrefix + "createjobwithnotificationsuccess"; - int priority = 3; - double duration = 0.0; - JobState state = JobState.Queued; - String templateId = null; - Date created = new Date(); - Date lastModified = new Date(); - Date stateTime = null; - Date endTime = null; - - queueService.createQueue(queueName); - String notificationEndPointName = UUID.randomUUID().toString(); - - service.create(NotificationEndPoint.create(notificationEndPointName, - EndPointType.AzureQueue, queueName)); - ListResult listNotificationEndPointInfos = service - .list(NotificationEndPoint.list()); - String notificationEndPointId = null; - - for (NotificationEndPointInfo notificationEndPointInfo : listNotificationEndPointInfos) { - if (notificationEndPointInfo.getName().equals( - notificationEndPointName)) { - notificationEndPointId = notificationEndPointInfo.getId(); - } - } - - JobNotificationSubscription jobNotificationSubcription = getJobNotificationSubscription( - notificationEndPointId, TargetJobState.All); - - Creator creator = Job.create().setName(name).setPriority(priority) - .addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0)) - .addJobNotificationSubscription(jobNotificationSubcription); - - // Act - JobInfo actualJob = service.create(creator); - - // Assert - JobInfo pendingJobInfo = service.get(Job.get(actualJob.getId())); - int retryCounter = 0; - while (pendingJobInfo.getState() != JobState.Error - && retryCounter < 100) { - try { - Thread.sleep(2000); - } catch (InterruptedException e) { - } - pendingJobInfo = service.get(Job.get(actualJob.getId())); - retryCounter++; - } - verifyJobProperties("actualJob", name, priority, duration, state, - templateId, created, lastModified, stateTime, endTime, 1, - actualJob); - List queueMessages = queueService.peekMessages(queueName) - .getQueueMessages(); - assertEquals(1, queueMessages.size()); - } - - @Test - public void createJobTwoTasksSuccess() throws ServiceException { - // Arrange - String name = testJobPrefix + "createJobSuccess"; - int priority = 3; - double duration = 0.0; - JobState state = JobState.Queued; - String templateId = null; - Date created = new Date(); - Date lastModified = new Date(); - Date stateTime = null; - Date endTime = null; - List tasks = new ArrayList(); - tasks.add(getTaskCreator(0)); - tasks.add(getTaskCreator(1)); - - // Act - JobInfo actualJob = service.create(Job.create().setName(name) - .setPriority(priority).addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(tasks.get(0)).addTaskCreator(tasks.get(1))); - - // Assert - verifyJobProperties("actualJob", name, priority, duration, state, - templateId, created, lastModified, stateTime, endTime, 2, - actualJob); - } - - @Test - public void getJobSuccess() throws ServiceException { - // Arrange - String name = testJobPrefix + "getJobSuccess"; - int priority = 3; - double duration = 0.0; - JobState state = JobState.Queued; - String templateId = null; - String jobId = createJob(name).getId(); - Date created = new Date(); - Date lastModified = new Date(); - Date stateTime = null; - Date endTime = null; - - // Act - JobInfo actualJob = service.get(Job.get(jobId)); - - // Assert - verifyJobProperties("actualJob", name, priority, duration, state, - templateId, created, lastModified, stateTime, endTime, 1, - actualJob); - } - - @Test - public void getJobInvalidIdFailed() throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.get(Job.get(invalidId)); - } - - @Test - public void listJobSuccess() throws ServiceException { - // Arrange - JobInfo jobInfo = createJob(testJobPrefix + "listJobSuccess"); - List jobInfos = new ArrayList(); - jobInfos.add(jobInfo); - ListResult expectedListJobsResult = new ListResult( - jobInfos); - - // Act - ListResult actualListJobResult = service.list(Job.list()); - - // Assert - verifyListResultContains("listJobs", expectedListJobsResult, - actualListJobResult, new ComponentDelegate() { - @Override - public void verifyEquals(String message, Object expected, - Object actual) { - try { - verifyJobInfoEqual(message, (JobInfo) expected, - (JobInfo) actual); - } catch (ServiceException e) { - fail(e.getMessage()); - } - } - }); - } - - @Test - public void canListJobsWithOptions() throws ServiceException { - String[] assetNameSuffixes = new String[] { "A", "B", "C", "D" }; - List expectedJobs = new ArrayList(); - for (String suffix : assetNameSuffixes) { - JobInfo jobInfo = createJob(testJobPrefix + "assetListOptions" - + suffix); - expectedJobs.add(jobInfo); - } - - ListResult listJobsResult = service.list(Job.list().setTop(2)); - - // Assert - assertEquals(2, listJobsResult.size()); - } - - @Test - public void cancelJobSuccess() throws ServiceException { - // Arrange - JobInfo jobInfo = createJob(testJobPrefix + "cancelJobSuccess"); - - // Act - service.action(Job.cancel(jobInfo.getId())); - - // Assert - JobInfo canceledJob = service.get(Job.get(jobInfo.getId())); - assertThat(canceledJob.getState(), anyOf(is(JobState.Canceling), is(JobState.Canceled))); - } - - @Test - public void cancelJobFailedWithInvalidId() throws ServiceException { - // Arrange - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - - // Act - service.action(Job.cancel(invalidId)); - - // Assert - } - - @Test - public void deleteJobSuccess() throws ServiceException, - InterruptedException { - // Arrange - JobInfo jobInfo = createJob(testJobPrefix + "deleteJobSuccess"); - service.action(Job.cancel(jobInfo.getId())); - JobInfo cancellingJobInfo = service.get(Job.get(jobInfo.getId())); - int retryCounter = 0; - while (cancellingJobInfo.getState() == JobState.Canceling - && retryCounter < 100) { - Thread.sleep(2000); - cancellingJobInfo = service.get(Job.get(jobInfo.getId())); - retryCounter++; - } - - // Act - service.delete(Job.delete(jobInfo.getId())); - - // Assert - expectedException.expect(ServiceException.class); - service.get(Job.get(jobInfo.getId())); - - } - - @Test - public void deleteJobInvalidIdFail() throws ServiceException { - // Arrange - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - - // Act - service.delete(Job.delete(invalidId)); - - // Assert - } - - @Test - public void canGetInputOutputAssetsFromJob() throws Exception { - String name = testJobPrefix + "canGetInputOutputAssetsFromJob"; - int priority = 3; - - JobInfo actualJob = service.create(Job.create().setName(name) - .setPriority(priority).addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0))); - - ListResult inputs = service.list(Asset.list(actualJob - .getInputAssetsLink())); - ListResult outputs = service.list(Asset.list(actualJob - .getOutputAssetsLink())); - - assertEquals(1, inputs.size()); - assertEquals(assetInfo.getId(), inputs.get(0).getId()); - - assertEquals(1, outputs.size()); - assertTrue(outputs.get(0).getName().contains(name)); - } - - @Test - public void canGetTasksFromJob() throws Exception { - String name = testJobPrefix + "canGetTaskAssetsFromJob"; - int priority = 3; - - JobInfo actualJob = service.create(Job.create().setName(name) - .setPriority(priority).addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0))); - - ListResult tasks = service.list(Task.list(actualJob - .getTasksLink())); - - assertEquals(1, tasks.size()); - } - - @Test - public void canGetErrorDetailsFromTask() throws Exception { - String name = testJobPrefix + "canGetErrorDetailsFromTask"; - - JobInfo actualJob = service.create(Job.create().setName(name) - .addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0))); - - JobInfo currentJobInfo = actualJob; - int retryCounter = 0; - while (currentJobInfo.getState().getCode() < 3 && retryCounter < 30) { - Thread.sleep(10000); - currentJobInfo = service.get(Job.get(actualJob.getId())); - retryCounter++; - } - - ListResult tasks = service.list(Task.list(actualJob - .getTasksLink())); - TaskInfo taskInfo = tasks.get(0); - List errorDetails = taskInfo.getErrorDetails(); - - assertEquals(1, errorDetails.size()); - ErrorDetail errorDetail = errorDetails.get(0); - assertNotNull(errorDetail.getCode()); - assertNotNull(errorDetail.getMessage()); - } - - @Test - public void canGetInputOutputAssetsFromTask() throws Exception { - String name = testJobPrefix + "canGetInputOutputAssetsFromTask"; - int priority = 3; - - JobInfo actualJob = service.create(Job.create().setName(name) - .setPriority(priority).addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0))); - - ListResult tasks = service.list(Task.list(actualJob - .getTasksLink())); - ListResult inputs = service.list(Asset.list(tasks.get(0) - .getInputAssetsLink())); - ListResult outputs = service.list(Asset.list(tasks.get(0) - .getOutputAssetsLink())); - - assertEquals(1, inputs.size()); - assertEquals(assetInfo.getId(), inputs.get(0).getId()); - - assertEquals(1, outputs.size()); - assertTrue(outputs.get(0).getName().contains(name)); - } - - @Test - public void canGetTaskHistoricalEventsFromTask() throws Exception { - // Arrange - String jobName = testJobPrefix + "canGetTaskHistoricalEventsFromTask"; - int priority = 3; - int retryCounter = 0; - - // Act - JobInfo actualJobInfo = service.create(Job.create().setName(jobName) - .setPriority(priority).addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0))); - - while (actualJobInfo.getState().getCode() < 3 && retryCounter < 30) { - Thread.sleep(10000); - actualJobInfo = service.get(Job.get(actualJobInfo.getId())); - retryCounter++; - } - ListResult tasks = service.list(Task.list(actualJobInfo - .getTasksLink())); - TaskInfo taskInfo = tasks.get(0); - List historicalEvents = taskInfo - .getHistoricalEvents(); - TaskHistoricalEvent historicalEvent = historicalEvents.get(0); - - // Assert - assertTrue(historicalEvents.size() >= 4); - assertNotNull(historicalEvent.getCode()); - assertNotNull(historicalEvent.getTimeStamp()); - assertNull(historicalEvent.getMessage()); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/LocatorIntegrationTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/LocatorIntegrationTests.java deleted file mode 100644 index f5a951214c14..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/LocatorIntegrationTests.java +++ /dev/null @@ -1,356 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import java.util.ArrayList; -import java.util.Date; -import java.util.EnumSet; -import java.util.List; -import java.util.UUID; - -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.AccessPolicy; -import com.microsoft.windowsazure.services.media.models.AccessPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AccessPolicyPermission; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.Locator; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; -import com.microsoft.windowsazure.services.media.models.LocatorType; - -public class LocatorIntegrationTests extends IntegrationTestBase { - - private static AssetInfo assetInfo; - private static AccessPolicyInfo accessPolicyInfo; - private static AccessPolicyInfo accessPolicyInfoRead; - private static int minuteInMS = 60 * 1000; - private static int tenMinutesInMS = 10 * 60 * 1000; - - private void verifyLocatorInfosEqual(String message, LocatorInfo expected, - LocatorInfo actual) { - verifyLocatorProperties(message, expected.getAccessPolicyId(), - expected.getAssetId(), expected.getLocatorType(), - expected.getStartTime(), expected.getId(), expected.getPath(), - actual); - } - - private void verifyLocatorProperties(String message, String accessPolicyId, - String assetId, LocatorType locatorType, Date startTime, - LocatorInfo actualLocator) { - verifyLocatorProperties(message, accessPolicyId, assetId, locatorType, - startTime, null, null, actualLocator); - } - - private void verifyLocatorProperties(String message, String accessPolicyId, - String assetId, LocatorType locatorType, Date startTime, String id, - String path, LocatorInfo actualLocator) { - assertNotNull(message, actualLocator); - assertEquals(message + " accessPolicyId", accessPolicyId, - actualLocator.getAccessPolicyId()); - assertEquals(message + " assetId", assetId, actualLocator.getAssetId()); - assertEquals(message + " locatorType", locatorType, - actualLocator.getLocatorType()); - - assertDateApproxEquals(message + " startTime", startTime, - actualLocator.getStartTime()); - - if (id == null) { - assertNotNull(message + " Id", actualLocator.getId()); - } else { - assertEquals(message + " Id", id, actualLocator.getId()); - } - if (path == null) { - assertNotNull(message + " path", actualLocator.getPath()); - } else { - assertEquals(message + " path", path, actualLocator.getPath()); - } - } - - @BeforeClass - public static void setup() throws Exception { - IntegrationTestBase.setup(); - accessPolicyInfo = service - .create(AccessPolicy.create( - testPolicyPrefix + "ForLocatorTest", 5, - EnumSet.of(AccessPolicyPermission.WRITE))); - accessPolicyInfoRead = service.create(AccessPolicy.create( - testPolicyPrefix + "ForLocatorTestRead", 15, - EnumSet.of(AccessPolicyPermission.READ))); - } - - @Before - public void instanceSetup() throws Exception { - assetInfo = service.create(Asset.create().setName( - testAssetPrefix + "ForLocatorTest")); - } - - @Test - public void createLocatorSuccess() throws ServiceException { - // Arrange - LocatorType locatorType = LocatorType.SAS; - - // Act - LocatorInfo locatorInfo = service.create(Locator.create( - accessPolicyInfoRead.getId(), assetInfo.getId(), locatorType)); - - // Assert - verifyLocatorProperties("locatorInfo", accessPolicyInfoRead.getId(), - assetInfo.getId(), locatorType, null, locatorInfo); - } - - @Test - public void createLocatorWithSpecifiedIdSuccess() throws ServiceException { - // Arrange - LocatorType locatorType = LocatorType.SAS; - - // Act - LocatorInfo locatorInfo = service.create(Locator.create( - accessPolicyInfoRead.getId(), assetInfo.getId(), locatorType) - .setId(String.format("nb:lid:UUID:%s", UUID.randomUUID() - .toString()))); - - // Assert - verifyLocatorProperties("locatorInfo", accessPolicyInfoRead.getId(), - assetInfo.getId(), locatorType, null, locatorInfo); - } - - @Test - public void createLocatorOptionsSetStartTimeSuccess() - throws ServiceException { - // Arrange - Date expectedStartDateTime = new Date(); - expectedStartDateTime.setTime(expectedStartDateTime.getTime() - + tenMinutesInMS); - LocatorType locatorType = LocatorType.SAS; - - // Act - LocatorInfo locatorInfo = service.create(Locator.create( - accessPolicyInfo.getId(), assetInfo.getId(), locatorType) - .setStartDateTime(expectedStartDateTime)); - - // Assert - verifyLocatorProperties("locatorInfo", accessPolicyInfo.getId(), - assetInfo.getId(), locatorType, expectedStartDateTime, - locatorInfo); - } - - @Test - public void getLocatorSuccess() throws ServiceException { - // Arrange - LocatorType locatorType = LocatorType.SAS; - Date expectedStartDateTime = new Date(); - expectedStartDateTime.setTime(expectedStartDateTime.getTime() - + tenMinutesInMS); - - LocatorInfo expectedLocatorInfo = service.create(Locator.create( - accessPolicyInfo.getId(), assetInfo.getId(), locatorType) - .setStartDateTime(expectedStartDateTime)); - - // Act - LocatorInfo actualLocatorInfo = service.get(Locator - .get(expectedLocatorInfo.getId())); - - // Assert - verifyLocatorInfosEqual("actualLocatorInfo", expectedLocatorInfo, - actualLocatorInfo); - } - - @Test - public void getLocatorInvalidId() throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.get(Locator.get(invalidId)); - } - - @Test - public void getLocatorNonexistId() throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.get(Locator.get(validButNonexistLocatorId)); - } - - @Test - public void listLocatorsSuccess() throws ServiceException { - // Arrange - LocatorType locatorType = LocatorType.SAS; - List expectedLocators = new ArrayList(); - for (int i = 0; i < 2; i++) { - expectedLocators.add(service.create(Locator.create( - accessPolicyInfo.getId(), assetInfo.getId(), locatorType))); - } - - // Act - ListResult listLocatorsResult = service.list(Locator - .list()); - - // Assert - assertNotNull(listLocatorsResult); - verifyListResultContains("listLocatorsResult", expectedLocators, - listLocatorsResult, new ComponentDelegate() { - @Override - public void verifyEquals(String message, Object expected, - Object actual) { - verifyLocatorInfosEqual(message, - (LocatorInfo) expected, (LocatorInfo) actual); - } - }); - } - - @Test - public void listLocatorsWithOptions() throws ServiceException { - List expectedLocators = new ArrayList(); - for (int i = 0; i < 5; i++) { - expectedLocators.add(service.create(Locator.create( - accessPolicyInfo.getId(), assetInfo.getId(), - LocatorType.SAS))); - } - - ListResult result = service.list(Locator - .list() - .setTop(3) - .set("$filter", - "(Id eq '" + expectedLocators.get(1).getId() - + "') or (" + "Id eq '" - + expectedLocators.get(3).getId() + "')")); - - assertEquals(2, result.size()); - } - - @Test - public void updateLocatorSuccess() throws ServiceException { - // Arrange - LocatorType locatorType = LocatorType.OnDemandOrigin; - LocatorInfo locatorInfo = service.create(Locator.create( - accessPolicyInfoRead.getId(), assetInfo.getId(), locatorType)); - - Date startTime = new Date(); - startTime.setTime(startTime.getTime() - tenMinutesInMS); - - // Act - service.update(Locator.update(locatorInfo.getId()).setStartDateTime( - startTime)); - LocatorInfo updatedLocatorInfo = service.get(Locator.get(locatorInfo - .getId())); - - // Assert - Date expectedExpiration = new Date(); - expectedExpiration.setTime(startTime.getTime() - + (long) accessPolicyInfoRead.getDurationInMinutes() - * minuteInMS); - - verifyLocatorProperties("updatedLocatorInfo", - locatorInfo.getAccessPolicyId(), locatorInfo.getAssetId(), - locatorInfo.getLocatorType(), startTime, locatorInfo.getId(), - locatorInfo.getPath(), updatedLocatorInfo); - } - - @Test - public void updateLocatorNoChangesSuccess() throws ServiceException { - // Arrange - LocatorType locatorType = LocatorType.OnDemandOrigin; - Date expirationDateTime = new Date(); - expirationDateTime.setTime(expirationDateTime.getTime() - + tenMinutesInMS); - Date startTime = new Date(); - startTime.setTime(startTime.getTime() - tenMinutesInMS); - - LocatorInfo locatorInfo = service.create(Locator.create( - accessPolicyInfoRead.getId(), assetInfo.getId(), locatorType) - .setStartDateTime(startTime)); - - // Act - service.update(Locator.update(locatorInfo.getId())); - LocatorInfo updatedLocatorInfo = service.get(Locator.get(locatorInfo - .getId())); - - // Assert - verifyLocatorInfosEqual("updatedLocatorInfo", locatorInfo, - updatedLocatorInfo); - } - - @Test - public void deleteLocatorSuccess() throws ServiceException { - // Arrange - LocatorType locatorType = LocatorType.SAS; - LocatorInfo locatorInfo = service.create(Locator.create( - accessPolicyInfo.getId(), assetInfo.getId(), locatorType)); - ListResult listLocatorsResult = service.list(Locator - .list()); - int assetCountBaseline = listLocatorsResult.size(); - - // Act - service.delete(Locator.delete(locatorInfo.getId())); - - // Assert - listLocatorsResult = service.list(Locator.list()); - assertEquals("listLocatorsResult.size", assetCountBaseline - 1, - listLocatorsResult.size()); - - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.get(Locator.get(locatorInfo.getId())); - } - - @Test - public void deleteLocatorInvalidIdFailed() throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.delete(Locator.delete(invalidId)); - } - - @Test - public void canGetLocatorBackFromAsset() throws Exception { - LocatorInfo locator = service.create(Locator.create( - accessPolicyInfo.getId(), assetInfo.getId(), LocatorType.SAS)); - - ListResult locators = service.list(Locator.list(assetInfo - .getLocatorsLink())); - - assertEquals(1, locators.size()); - assertEquals(locator.getId(), locators.get(0).getId()); - - } - - @Test - public void canGetAssetFromLocator() throws Exception { - LocatorInfo locator = service.create(Locator.create( - accessPolicyInfo.getId(), assetInfo.getId(), LocatorType.SAS)); - - AssetInfo asset = service.get(Asset.get(locator.getAssetLink())); - - assertEquals(assetInfo.getId(), asset.getId()); - } - - @Test - public void canGetAccessPolicyFromLocator() throws Exception { - LocatorInfo locator = service.create(Locator.create( - accessPolicyInfo.getId(), assetInfo.getId(), LocatorType.SAS)); - - AccessPolicyInfo accessPolicy = service.get(AccessPolicy.get(locator - .getAccessPolicyLink())); - - assertEquals(accessPolicyInfo.getId(), accessPolicy.getId()); - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/MediaProcessorIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/MediaProcessorIntegrationTest.java deleted file mode 100644 index 83c34ad2da98..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/MediaProcessorIntegrationTest.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.util.List; - -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.MediaProcessor; -import com.microsoft.windowsazure.services.media.models.MediaProcessorInfo; - -public class MediaProcessorIntegrationTest extends IntegrationTestBase { - - private void verifyMediaProcessorInfo(String message, - MediaProcessorInfo mediaProcessorInfo) { - assertEquals(message + " id length", 49, mediaProcessorInfo.getId() - .length()); - assertTrue(message + " name length > 0", mediaProcessorInfo.getName() - .length() > 0); - assertNotNull(message + " description", - mediaProcessorInfo.getDescription()); - assertNotNull(message + " sku", mediaProcessorInfo.getSku()); - assertTrue(message + " vendor length > 0", mediaProcessorInfo - .getVendor().length() > 0); - assertTrue(message + " version length > 0", mediaProcessorInfo - .getVersion().length() > 0); - } - - private void verifyMediaProcessorInfo(String message, String id, - String name, String description, String sku, String vendor, - MediaProcessorInfo mediaProcessorInfo) { - assertEquals(message + " id", id, mediaProcessorInfo.getId()); - assertEquals(message + " name", name, mediaProcessorInfo.getName()); - assertEquals(message + " description", description, - mediaProcessorInfo.getDescription()); - assertEquals(message + " sku", sku, mediaProcessorInfo.getSku()); - assertEquals(message + " vendor", vendor, - mediaProcessorInfo.getVendor()); - assertTrue(message + "version length > 0", mediaProcessorInfo - .getVersion().length() > 0); - } - - @Test - public void listMediaProcessorsSuccess() throws ServiceException { - // Arrange - - // Act - ListResult listMediaProcessorsResult = service - .list(MediaProcessor.list()); - - // Assert - assertNotNull("listMediaProcessorsResult", listMediaProcessorsResult); - assertTrue("listMediaProcessorsResult size > 0", - listMediaProcessorsResult.size() > 0); - List ps = listMediaProcessorsResult; - for (int i = 0; i < ps.size(); i++) { - MediaProcessorInfo mediaProcessorInfo = ps.get(i); - verifyMediaProcessorInfo("mediaProcessorInfo:" + i, - mediaProcessorInfo); - } - } - - @Test - public void listMediaProcessorWithOptionSuccess() throws ServiceException { - ListResult listMediaProcessorsResult = service - .list(MediaProcessor - .list() - .setTop(2) - .set("$filter", - "Id eq 'nb:mpid:UUID:aec03716-7c5e-4f68-b592-f4850eba9f10'")); - - assertNotNull("listMediaProcessorsResult", listMediaProcessorsResult); - assertEquals("listMediaProcessors size", 1, - listMediaProcessorsResult.size()); - MediaProcessorInfo mediaProcessorInfo = listMediaProcessorsResult - .get(0); - verifyMediaProcessorInfo("mediaProcessorInfo", - "nb:mpid:UUID:aec03716-7c5e-4f68-b592-f4850eba9f10", - "Storage Decryption", "Storage Decryption", "", "Microsoft", - mediaProcessorInfo); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/NotificationEndPointIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/NotificationEndPointIntegrationTest.java deleted file mode 100644 index 0a921d4b7fac..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/NotificationEndPointIntegrationTest.java +++ /dev/null @@ -1,221 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; - -import java.util.ArrayList; -import java.util.List; - -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.EndPointType; -import com.microsoft.windowsazure.services.media.models.NotificationEndPoint; -import com.microsoft.windowsazure.services.media.models.NotificationEndPointInfo; - -public class NotificationEndPointIntegrationTest extends IntegrationTestBase { - private final String validButNonexistNotificationEndPointId = "notificationEndPointId"; - private final String testEndPointAddress = "testendpointaddress"; - - private void verifyNotificationEndPointInfosEqual(String message, - NotificationEndPointInfo expected, NotificationEndPointInfo actual) { - verifyNotificationEndPointProperties(message, expected.getName(), - expected.getEndPointType(), expected.getEndPointAddress(), - actual); - } - - private void verifyNotificationEndPointProperties(String message, - String name, EndPointType endPointType, String endPointAddress, - NotificationEndPointInfo notificationEndPointInfo) { - assertNotNull(message, notificationEndPointInfo); - assertEquals(message + " Name", name, - notificationEndPointInfo.getName()); - assertEquals(message + " EndPointType", endPointType, - notificationEndPointInfo.getEndPointType()); - assertEquals(message + " EndPointAddress", endPointAddress, - notificationEndPointInfo.getEndPointAddress()); - assertNotNull(message + " Created", - notificationEndPointInfo.getCreated()); - assertNotNull(message + " Id", notificationEndPointInfo.getId()); - } - - @Test - public void canCreateNotificationEndPoint() throws Exception { - String testName = testNotificationEndPointPrefix + "CanCreate"; - - NotificationEndPointInfo actualNotificationEndPoint = service - .create(NotificationEndPoint.create(testName, - EndPointType.AzureQueue, testEndPointAddress)); - - verifyNotificationEndPointProperties("notification end point ", - testName, EndPointType.AzureQueue, testEndPointAddress, - actualNotificationEndPoint); - } - - @Test - public void canCreateNotificationEndPointWithReadPermissions() - throws Exception { - String testName = testNotificationEndPointPrefix + "CanCreate"; - - NotificationEndPointInfo actualNotificationEndPoint = service - .create(NotificationEndPoint.create(testName, - EndPointType.AzureQueue, testEndPointAddress)); - - verifyNotificationEndPointProperties("notification end point", - testName, EndPointType.AzureQueue, testEndPointAddress, - actualNotificationEndPoint); - } - - @Test - public void canGetSingleNotificationEndPointById() throws Exception { - String expectedName = testNotificationEndPointPrefix + "GetOne"; - NotificationEndPointInfo expectedNotificationEndPointInfo = service - .create(NotificationEndPoint.create(expectedName, - EndPointType.AzureQueue, testEndPointAddress)); - - NotificationEndPointInfo actualNotificationEndPointInfo = service - .get(NotificationEndPoint.get(expectedNotificationEndPointInfo - .getId())); - - assertEquals(expectedNotificationEndPointInfo.getId(), - actualNotificationEndPointInfo.getId()); - verifyNotificationEndPointProperties("notification end point", - expectedName, EndPointType.AzureQueue, testEndPointAddress, - actualNotificationEndPointInfo); - } - - @Test - public void canGetSingleNotificationEndPointByInvalidId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.get(NotificationEndPoint.get(invalidId)); - } - - @Test - public void cannotGetSingleNotificationEndPointByNonexistId() - throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.get(NotificationEndPoint - .get(validButNonexistNotificationEndPointId)); - } - - @Test - public void canRetrieveListOfNotificationEndPoints() throws Exception { - String[] notificationEndPointNames = new String[] { - testNotificationEndPointPrefix + "ListOne", - testNotificationEndPointPrefix + "ListTwo" }; - - List expectedNotificationEndPoints = new ArrayList(); - for (int i = 0; i < notificationEndPointNames.length; i++) { - NotificationEndPointInfo notificationEndPointInfo = service - .create(NotificationEndPoint.create( - notificationEndPointNames[i], - EndPointType.AzureQueue, testEndPointAddress)); - expectedNotificationEndPoints.add(notificationEndPointInfo); - } - - List actualAccessPolicies = service - .list(NotificationEndPoint.list()); - - verifyListResultContains("listNotificationEndPoints", - expectedNotificationEndPoints, actualAccessPolicies, - new ComponentDelegate() { - @Override - public void verifyEquals(String message, Object expected, - Object actual) { - verifyNotificationEndPointInfosEqual(message, - (NotificationEndPointInfo) expected, - (NotificationEndPointInfo) actual); - } - }); - } - - @Test - public void canUseQueryParametersWhenListingNotificationEndPoints() - throws Exception { - String[] notificationEndPointNames = new String[] { - testNotificationEndPointPrefix + "ListThree", - testNotificationEndPointPrefix + "ListFour", - testNotificationEndPointPrefix + "ListFive", - testNotificationEndPointPrefix + "ListSix", - testNotificationEndPointPrefix + "ListSeven" }; - - List expectedNotificationEndPointInfos = new ArrayList(); - for (int i = 0; i < notificationEndPointNames.length; i++) { - NotificationEndPointInfo notificationEndPointInfo = service - .create(NotificationEndPoint.create( - notificationEndPointNames[i], - EndPointType.AzureQueue, testEndPointAddress)); - expectedNotificationEndPointInfos.add(notificationEndPointInfo); - } - - List actualNotificationEndPointInfos = service - .list(NotificationEndPoint.list().setTop(2)); - - assertEquals(2, actualNotificationEndPointInfos.size()); - } - - @Test - public void canDeleteNotificationEndPointById() throws Exception { - String testNotificationEndPointName = testNotificationEndPointPrefix - + "ToDelete"; - NotificationEndPointInfo notificationEndPointToBeDeleted = service - .create(NotificationEndPoint.create( - testNotificationEndPointName, EndPointType.AzureQueue, - testEndPointAddress)); - List listNotificationEndPointsResult = service - .list(NotificationEndPoint.list()); - int notificationEndPointBaseline = listNotificationEndPointsResult.size(); - - service.delete(NotificationEndPoint - .delete(notificationEndPointToBeDeleted.getId())); - - listNotificationEndPointsResult = service.list(NotificationEndPoint.list()); - assertEquals("listNotificationEndPointResult.size", notificationEndPointBaseline - 1, - listNotificationEndPointsResult.size()); - - for (NotificationEndPointInfo policy : service - .list(NotificationEndPoint.list())) { - assertFalse(notificationEndPointToBeDeleted.getId().equals( - policy.getId())); - } - - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.get(NotificationEndPoint.get(notificationEndPointToBeDeleted - .getId())); - } - - @Test - public void canDeleteNotificationEndPointByInvalidId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.delete(NotificationEndPoint.delete(invalidId)); - } - - @Test - public void cannotDeleteNotificationEndPointByNonexistId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.delete(NotificationEndPoint - .delete(validButNonexistNotificationEndPointId)); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ProtectionKeyIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ProtectionKeyIntegrationTest.java deleted file mode 100644 index a96b0a5ddd9a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ProtectionKeyIntegrationTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertNotNull; - -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.ContentKeyType; -import com.microsoft.windowsazure.services.media.models.ProtectionKey; - -public class ProtectionKeyIntegrationTest extends IntegrationTestBase { - - @Test - public void canGetProtectionKeyId() throws ServiceException { - // Arrange - - // Act - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.CommonEncryption)); - - // Assert - assertNotNull(protectionKeyId); - } - - @Test - public void canGetProtectionKey() throws ServiceException { - // Arrange - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.CommonEncryption)); - - // Act - String protectionKey = service.action(ProtectionKey - .getProtectionKey(protectionKeyId)); - - // Assert - assertNotNull(protectionKey); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ServiceExceptionMatcher.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ServiceExceptionMatcher.java deleted file mode 100644 index 3031e792f553..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ServiceExceptionMatcher.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import org.hamcrest.BaseMatcher; -import org.hamcrest.Description; - -import com.microsoft.windowsazure.exception.ServiceException; - -public class ServiceExceptionMatcher extends BaseMatcher { - private final int httpStatusCode; - - public ServiceExceptionMatcher(int httpStatusCode) { - this.httpStatusCode = httpStatusCode; - } - - @Override - public boolean matches(Object item) { - if (item == null || item.getClass() != ServiceException.class) { - return false; - } - - if (((ServiceException) item).getHttpStatusCode() != this.httpStatusCode) { - return false; - } - - return true; - } - - @Override - public void describeTo(Description description) { - description.appendText("Must be ServiceException with status code" - + this.httpStatusCode); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/StorageAccountsTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/StorageAccountsTest.java deleted file mode 100644 index 40b8017992f2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/StorageAccountsTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.StorageAccountInfo; -import com.microsoft.windowsazure.services.media.models.StorageAccounts; - -public class StorageAccountsTest extends IntegrationTestBase { - - @Test - public void listStorageAccountsSuccess() throws Exception { - // Arrange - - // Act - ListResult storageAccounts = service.list(StorageAccounts.list()); - - // Assert - assertNotNull(storageAccounts); - assertTrue(storageAccounts.size() > 0); - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/StreamingEndopointIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/StreamingEndopointIntegrationTest.java deleted file mode 100644 index 91457c62e792..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/StreamingEndopointIntegrationTest.java +++ /dev/null @@ -1,310 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assume.assumeTrue; - -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; -import java.util.List; - -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.AkamaiAccessControlType; -import com.microsoft.windowsazure.services.media.implementation.content.AkamaiSignatureHeaderAuthenticationKey; -import com.microsoft.windowsazure.services.media.implementation.content.CrossSiteAccessPoliciesType; -import com.microsoft.windowsazure.services.media.implementation.content.IPAccessControlType; -import com.microsoft.windowsazure.services.media.implementation.content.IPRangeType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointAccessControlType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointCacheControlType; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.OperationState; -import com.microsoft.windowsazure.services.media.models.StreamingEndpoint; -import com.microsoft.windowsazure.services.media.models.StreamingEndpointInfo; -import com.microsoft.windowsazure.services.media.models.StreamingEndpointState; - -public class StreamingEndopointIntegrationTest extends IntegrationTestBase { - - @Test - public void streamingEndpointReachEndpointsLimit() throws Exception { - // Arrange - String endpoint1 = testStreamingEndPointPrefix + "ReachEndpointsLimit1"; - String endpoint2 = testStreamingEndPointPrefix + "ReachEndpointsLimit2"; - - StreamingEndpointInfo streamingEndpointInfo = service.create(StreamingEndpoint.create().setName(endpoint1)); - - OperationUtils.await(service, streamingEndpointInfo); - - // Act - try { - StreamingEndpointInfo streamingEndpoint2Info = service.create(StreamingEndpoint.create().setName(endpoint2)); - - // mark this test as ignored if the subscription supports more than 2 streaming endpoints - assumeTrue(streamingEndpoint2Info == null); - - } catch(Exception e) { - - // Assert Act - assertTrue("Error should be ExceededResourceQuota", e.getMessage().contains("ExceededResourceQuota")); - } - - // Cleanup - String deleteOpId = service.delete(StreamingEndpoint.delete(streamingEndpointInfo.getId())); - OperationState state = OperationUtils.await(service, deleteOpId); - - // Assert Cleanup - assertEquals(state, OperationState.Succeeded); - } - - @Test - public void streamingEndpointCreateListByNameAndDelete() throws Exception { - // Arrange - String expectedName = testStreamingEndPointPrefix + "ListByNameTest"; - StreamingEndpointInfo streamingEndpointInfo = service.create(StreamingEndpoint.create().setName(expectedName)); - - OperationUtils.await(service, streamingEndpointInfo); - - // Act - ListResult listStreamingEndpointResult = service.list(StreamingEndpoint.list() - .set("$filter", "(Name eq '" + expectedName + "')")); - - // Assert - assertNotNull(listStreamingEndpointResult); - assertEquals(1, listStreamingEndpointResult.size()); - StreamingEndpointInfo info = listStreamingEndpointResult.get(0); - assertNotNull(info); - assertEquals(info.getName(), expectedName); - - // Cleanup - String deleteOpId = service.delete(StreamingEndpoint.delete(info.getId())); - OperationState state = OperationUtils.await(service, deleteOpId); - - // Assert Cleanup - assertEquals(state, OperationState.Succeeded); - } - - @Test - public void streamingEndpointCreateStartStopDeleteTest() throws Exception { - // Arrange - String expectedName = testStreamingEndPointPrefix + "Startable"; - StreamingEndpointInfo streamingEndpointInfo = service.create(StreamingEndpoint.create().setName(expectedName)); - - OperationUtils.await(service, streamingEndpointInfo); - - // Act - String startingOpId = service.action(StreamingEndpoint.start(streamingEndpointInfo.getId())); - OperationState state = OperationUtils.await(service, startingOpId); - - // Assert - assertEquals(state, OperationState.Succeeded); - streamingEndpointInfo = service.get(StreamingEndpoint.get(streamingEndpointInfo.getId())); - assertNotNull(streamingEndpointInfo); - assertEquals(StreamingEndpointState.Running, streamingEndpointInfo.getState()); - - // Act 2 - startingOpId = service.action(StreamingEndpoint.stop(streamingEndpointInfo.getId())); - state = OperationUtils.await(service, startingOpId); - - // Assert 2 - assertEquals(state, OperationState.Succeeded); - - // Cleanup - String deleteOpId = service.delete(StreamingEndpoint.delete(streamingEndpointInfo.getId())); - state = OperationUtils.await(service, deleteOpId); - // Assert Cleanup - assertEquals(state, OperationState.Succeeded); - } - - @Test - public void streamingEndpointCreateStartScaleStopDeleteTest() throws Exception { - // Arrange - int expectedScaleUnits = 2; - String expectedName = testStreamingEndPointPrefix + "Scalable"; - StreamingEndpointInfo streamingEndpointInfo = service.create(StreamingEndpoint.create().setName(expectedName)); - - OperationUtils.await(service, streamingEndpointInfo); - - // Act - String startingOpId = service.action(StreamingEndpoint.start(streamingEndpointInfo.getId())); - OperationState state = OperationUtils.await(service, startingOpId); - - // Assert - assertEquals(state, OperationState.Succeeded); - streamingEndpointInfo = service.get(StreamingEndpoint.get(streamingEndpointInfo.getId())); - assertNotNull(streamingEndpointInfo); - assertEquals(StreamingEndpointState.Running, streamingEndpointInfo.getState()); - - startingOpId = service.action(StreamingEndpoint.scale(streamingEndpointInfo.getId(), expectedScaleUnits)); - state = OperationUtils.await(service, startingOpId); - // Assert 3 - assertEquals(state, OperationState.Succeeded); - streamingEndpointInfo = service.get(StreamingEndpoint.get(streamingEndpointInfo.getId())); - assertNotNull(streamingEndpointInfo); - assertEquals(expectedScaleUnits, streamingEndpointInfo.getScaleUnits()); - - // Act 3 - startingOpId = service.action(StreamingEndpoint.stop(streamingEndpointInfo.getId())); - state = OperationUtils.await(service, startingOpId); - // Assert 3 - assertEquals(state, OperationState.Succeeded); - - // Cleanup - String deleteOpId = service.delete(StreamingEndpoint.delete(streamingEndpointInfo.getId())); - state = OperationUtils.await(service, deleteOpId); - // Assert Cleanup - assertEquals(state, OperationState.Succeeded); - } - - @Test - public void streamingEndpointEnableCDNTest() throws Exception { - // Arrange - int expectedScaleUnits = 1; - String expectedName = testStreamingEndPointPrefix + "EnableCDN"; - - // Act 1 - StreamingEndpointInfo streamingEndpointInfo = service.create(StreamingEndpoint.create().setName(expectedName)); - OperationState state = OperationUtils.await(service, streamingEndpointInfo); - // Assert 1 - assertEquals(state, OperationState.Succeeded); - - // Act 2 - String opId = service.action(StreamingEndpoint.scale(streamingEndpointInfo.getId(), expectedScaleUnits)); - state = OperationUtils.await(service, opId); - // Assert 2 - assertEquals(state, OperationState.Succeeded); - - // Act 3 - opId = service.update(StreamingEndpoint.update(streamingEndpointInfo).setCdnEnabled(true)); - state = OperationUtils.await(service, opId); - // Assert 3 - assertEquals(state, OperationState.Succeeded); - - // Act 4 - streamingEndpointInfo = service.get(StreamingEndpoint.get(streamingEndpointInfo.getId())); - // Assert 4 - assertTrue(streamingEndpointInfo.isCdnEnabled()); - - // Cleanup - String deleteOpId = service.delete(StreamingEndpoint.delete(streamingEndpointInfo.getId())); - state = OperationUtils.await(service, deleteOpId); - // Assert Cleanup - assertEquals(state, OperationState.Succeeded); - } - - @Test - public void createAndRetrieveTheSameStreamingEndpointTest() throws Exception { - // Arrange - int expectedScaleUnits = 1; - boolean expectedCdnState = false; - String expectedName = testStreamingEndPointPrefix + "createAndRetrieve"; - String expectedDesc = "expected description"; - int expectedMaxAge = 1800; - String expectedClientAccessPolicy = ""; - String expectedCrossDomainPolicy = ""; - String expectedAkamaiIdentifier = "akamaikey"; - - Calendar cal = Calendar.getInstance(); - cal.setTime(new Date()); - cal.add(Calendar.HOUR, 48); - Date expectedAkamaiExpiration = cal.getTime(); - String expectedAkamaiB64 = "/31iWKdqNC7YUnj8zQ3XHA=="; - String expectedIPAddress = "0.0.0.0"; - String expectedIPName = "Allow All"; - - CrossSiteAccessPoliciesType expectedCrossSiteAccessPolicies = new CrossSiteAccessPoliciesType(); - expectedCrossSiteAccessPolicies.setClientAccessPolicy(expectedClientAccessPolicy); - expectedCrossSiteAccessPolicies.setCrossDomainPolicy(expectedCrossDomainPolicy); - - IPAccessControlType expectedIP = new IPAccessControlType(); - expectedIP.setIpRange(new ArrayList()); - expectedIP.getIpRange().add(new IPRangeType()); - expectedIP.getIpRange().get(0).setAddress(expectedIPAddress); - expectedIP.getIpRange().get(0).setName(expectedIPName); - expectedIP.getIpRange().get(0).setSubnetPrefixLength(0); - - AkamaiAccessControlType expectedAkamai = new AkamaiAccessControlType(); - List akamaiSignatureHeaderAuthenticationKeyList = - new ArrayList(); - akamaiSignatureHeaderAuthenticationKeyList.add(new AkamaiSignatureHeaderAuthenticationKey()); - akamaiSignatureHeaderAuthenticationKeyList.get(0).setExpiration(expectedAkamaiExpiration); - akamaiSignatureHeaderAuthenticationKeyList.get(0).setId(expectedAkamaiIdentifier); - akamaiSignatureHeaderAuthenticationKeyList.get(0).setBase64Key(expectedAkamaiB64); - expectedAkamai.setAkamaiSignatureHeaderAuthenticationKeyList(akamaiSignatureHeaderAuthenticationKeyList); - - StreamingEndpointAccessControlType expectedStreamingEndpointAccessControl = new StreamingEndpointAccessControlType(); - expectedStreamingEndpointAccessControl.setAkamai(expectedAkamai); - expectedStreamingEndpointAccessControl.setIP(expectedIP); - - StreamingEndpointCacheControlType expectedStreamingEndpointCacheControl = new StreamingEndpointCacheControlType(); - - expectedStreamingEndpointCacheControl.setMaxAge(expectedMaxAge ); - - // Act - StreamingEndpointInfo streamingEndpointInfo = service.create( - StreamingEndpoint.create() - .setName(expectedName) - .setCdnEnabled(expectedCdnState) - .setDescription(expectedDesc) - .setScaleUnits(expectedScaleUnits) - .setCrossSiteAccessPolicies(expectedCrossSiteAccessPolicies) - .setAccessControl(expectedStreamingEndpointAccessControl) - .setCacheControl(expectedStreamingEndpointCacheControl ) - ); - - OperationState state = OperationUtils.await(service, streamingEndpointInfo); - - // Act validations - assertEquals(OperationState.Succeeded, state); - assertNotNull(streamingEndpointInfo); - - // Retrieve the StramingEndpoint again. - StreamingEndpointInfo result = service.get(StreamingEndpoint.get(streamingEndpointInfo.getId())); - - // Assert - assertNotNull(result); - assertEquals(result.getScaleUnits(), expectedScaleUnits); - assertEquals(result.getName(), expectedName); - assertEquals(result.getDescription(), expectedDesc); - assertEquals(result.getCrossSiteAccessPolicies().getClientAccessPolicy(), expectedClientAccessPolicy); - assertEquals(result.getCrossSiteAccessPolicies().getCrossDomainPolicy(), expectedCrossDomainPolicy); - assertEquals(result.getCacheControl().getMaxAge(), expectedMaxAge); - List akamai = result.getAccessControl().getAkamai().getAkamaiSignatureHeaderAuthenticationKeyList(); - assertNotNull(akamai); - assertEquals(akamai.size(), 1); - assertEquals(akamai.get(0).getId(), expectedAkamaiIdentifier); - assertEquals(akamai.get(0).getExpiration(), expectedAkamaiExpiration); - assertEquals(akamai.get(0).getBase64Key(), expectedAkamaiB64); - List ip = result.getAccessControl().getIP().getIpRange(); - assertNotNull(ip); - assertEquals(ip.size(), 1); - assertEquals(ip.get(0).getAddress(), expectedIPAddress); - assertEquals(ip.get(0).getName(), expectedIPName); - assertEquals(ip.get(0).getSubnetPrefixLength(), 0); - - // Cleanup - String deleteOpId = service.delete(StreamingEndpoint.delete(result.getId())); - state = OperationUtils.await(service, deleteOpId); - // Assert Cleanup - assertEquals(state, OperationState.Succeeded); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/TaskIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/TaskIntegrationTest.java deleted file mode 100644 index bdb2da64a3f5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/TaskIntegrationTest.java +++ /dev/null @@ -1,337 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.io.UnsupportedEncodingException; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.UUID; - -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.Job; -import com.microsoft.windowsazure.services.media.models.Job.Creator; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.JobState; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.Task; -import com.microsoft.windowsazure.services.media.models.Task.CreateBatchOperation; -import com.microsoft.windowsazure.services.media.models.TaskInfo; -import com.microsoft.windowsazure.services.media.models.TaskOption; -import com.microsoft.windowsazure.services.media.models.TaskState; -import com.sun.jersey.core.util.Base64; - -public class TaskIntegrationTest extends IntegrationTestBase { - private static AssetInfo assetInfo; - private Creator jobCreator; - - private static final String commonConfiguration = "H.264 256k DSL CBR"; - - @BeforeClass - public static void setup() throws Exception { - IntegrationTestBase.setup(); - assetInfo = setupAssetWithFile(); - } - - @Before - public void instanceSetup() { - this.jobCreator = Job.create() - .setName(testJobPrefix + UUID.randomUUID().toString()) - .setPriority(3).addInputMediaAsset(assetInfo.getId()); - } - - @Test - public void createTaskSuccess() throws ServiceException, - UnsupportedEncodingException { - // Arrange - - // Required - String mediaProcessorId = MEDIA_ENCODER_MEDIA_PROCESSOR_ID; - String taskBody = constructTaskBody(0); - - // Optional parameters - String configuration = new String(Base64.encode(commonConfiguration), - "UTF8"); - String name = "My encoding Task " + UUID.randomUUID().toString(); - int jobPriority = 3; - TaskOption options = TaskOption.ProtectedConfiguration; - // Use a fake id, to simulate real use. - String encryptionKeyId = "nb:kid:UUID:" + UUID.randomUUID().toString(); - String encryptionScheme = "ConfigurationEncryption"; - String encryptionVersion = "1.0"; - // Use a trivial vector, 16 bytes of zeros, base-64 encoded. - String initializationVector = new String(Base64.encode(new byte[16]), - "UTF8"); - - CreateBatchOperation taskCreator = Task - .create(mediaProcessorId, taskBody) - .setConfiguration(configuration).setName(name) - .setPriority(jobPriority).setOptions(options) - .setEncryptionKeyId(encryptionKeyId) - .setEncryptionScheme(encryptionScheme) - .setEncryptionVersion(encryptionVersion) - .setInitializationVector(initializationVector); - jobCreator.addTaskCreator(taskCreator); - - // Act - JobInfo job = service.create(jobCreator); - List taskInfos = service.list(Task.list(job.getTasksLink())); - - // Assert - assertEquals("taskInfos count", 1, taskInfos.size()); - verifyTaskPropertiesJustStarted("taskInfo", mediaProcessorId, options, - taskBody, configuration, name, jobPriority, encryptionKeyId, - encryptionScheme, encryptionVersion, initializationVector, - taskInfos.get(0)); - } - - @Test - public void createTwoTasksSuccess() throws ServiceException { - // Arrange - - // Required - String mediaProcessorId = MEDIA_ENCODER_MEDIA_PROCESSOR_ID; - String[] taskBodies = new String[] { constructTaskBody(0), - constructTaskBody(1) }; - - // Optional parameters - String configuration = commonConfiguration; - String baseName = "My encoding Task " + UUID.randomUUID().toString(); - String[] suffixes = new String[] { " 1", " 2" }; - int jobPriority = 3; - TaskOption options = TaskOption.None; - - List taskCreators = new ArrayList(); - - for (int i = 0; i < taskBodies.length; i++) { - CreateBatchOperation taskCreator = Task - .create(mediaProcessorId, taskBodies[i]) - .setConfiguration(configuration) - .setName(baseName + suffixes[i]); - taskCreators.add(taskCreator); - jobCreator.addTaskCreator(taskCreator); - } - - // Act - JobInfo job = service.create(jobCreator); - List taskInfos = service.list(Task.list(job.getTasksLink())); - - // Assert - assertEquals("taskInfos count", taskCreators.size(), taskInfos.size()); - for (int i = 0; i < taskCreators.size(); i++) { - verifyTaskPropertiesJustStartedNoEncryption("taskInfo", - mediaProcessorId, options, taskBodies[i], configuration, - baseName + suffixes[i], jobPriority, taskInfos.get(i)); - } - } - - @Test - public void canListTasksWithOptions() throws ServiceException { - // Arrange - String mediaProcessorId = MEDIA_ENCODER_MEDIA_PROCESSOR_ID; - String configuration = commonConfiguration; - String[] taskNameSuffixes = new String[] { "A", "B", "C", "D" }; - String baseName = "My encoding Task " + UUID.randomUUID().toString(); - int taskCounter = 0; - for (String suffix : taskNameSuffixes) { - CreateBatchOperation taskCreator = Task - .create(mediaProcessorId, constructTaskBody(taskCounter++)) - .setConfiguration(configuration).setName(baseName + suffix); - jobCreator.addTaskCreator(taskCreator); - } - - service.create(jobCreator); - - // Act - ListResult listTaskResult1 = service.list(Task.list().set( - "$filter", "startswith(Name, '" + baseName + "') eq true")); - ListResult listTaskResult2 = service.list(Task.list() - .set("$filter", "startswith(Name, '" + baseName + "') eq true") - .setTop(2)); - - // Assert - assertEquals("listTaskResult1.size", 4, listTaskResult1.size()); - assertEquals("listTaskResult2.size", 2, listTaskResult2.size()); - } - - @Test - public void cancelTaskSuccess() throws ServiceException, - InterruptedException { - // Arrange - String mediaProcessorId = MEDIA_ENCODER_MEDIA_PROCESSOR_ID; - String taskBody = constructTaskBody(0); - String configuration = commonConfiguration; - String name = "My encoding Task " + UUID.randomUUID().toString(); - CreateBatchOperation taskCreator = Task - .create(mediaProcessorId, taskBody) - .setConfiguration(configuration).setName(name); - jobCreator.addTaskCreator(taskCreator); - - JobInfo jobInfo = service.create(jobCreator); - - // Act - service.action(Job.cancel(jobInfo.getId())); - JobInfo cancellingJobInfo = service.get(Job.get(jobInfo.getId())); - while (cancellingJobInfo.getState() == JobState.Canceling) { - Thread.sleep(2000); - cancellingJobInfo = service.get(Job.get(jobInfo.getId())); - } - - // Assert - List taskInfos = service.list(Task.list(cancellingJobInfo - .getTasksLink())); - for (TaskInfo taskInfo : taskInfos) { - verifyTaskPropertiesNoEncryption("canceled task", mediaProcessorId, - TaskOption.None, taskBody, configuration, name, 3, - null, null, 0.0, 0.0, null, TaskState.Canceled, - taskInfo); - } - } - - private void verifyTaskProperties(String message, String mediaProcessorId, - TaskOption options, String taskBody, String configuration, - String name, int priority, String encryptionKeyId, - String encryptionScheme, String encryptionVersion, - String initializationVector, Date endTime, String errorDetails, - double progress, double runningDuration, Date startTime, - TaskState state, TaskInfo actual) throws ServiceException { - assertNotNull(message, actual); - assertNotNull(message + " id", actual.getId()); - - // Required fields - assertEquals(message + " getMediaProcessorId", mediaProcessorId, - actual.getMediaProcessorId()); - assertEquals(message + " getOptions", options, actual.getOptions()); - assertEquals(message + " getTaskBody", taskBody, actual.getTaskBody()); - - // Optional fields - assertEquals(message + " getConfiguration", configuration, - actual.getConfiguration()); - assertEquals(message + " getName", name, actual.getName()); - assertEquals(message + " getPriority", priority, actual.getPriority()); - - // Optional encryption fields - assertEqualsNullEmpty(message + " getEncryptionKeyId", encryptionKeyId, - actual.getEncryptionKeyId()); - assertEqualsNullEmpty(message + " getEncryptionScheme", - encryptionScheme, actual.getEncryptionScheme()); - assertEqualsNullEmpty(message + " getEncryptionVersion", - encryptionVersion, actual.getEncryptionVersion()); - assertEqualsNullEmpty(message + " getInitializationVector", - initializationVector, actual.getInitializationVector()); - - // Read-only fields - assertNotNull(message + " getErrorDetails", actual.getErrorDetails()); - assertEquals(message + " getErrorDetails.size", 0, actual - .getErrorDetails().size()); - - ListResult inputAssets = service.list(Asset.list(actual - .getInputAssetsLink())); - ListResult outputAssets = service.list(Asset.list(actual - .getOutputAssetsLink())); - - assertEquals(message + " inputAssets.size", 1, inputAssets.size()); - assertEquals(message + " inputAssets.get(0).getId", assetInfo.getId(), - inputAssets.get(0).getId()); - - assertEquals(message + " outputAssets.size", 1, outputAssets.size()); - // Because this is a new asset, there is not much else to test - assertTrue(message + " outputAssets.get(0).getId != assetInfo.getId", - !assetInfo.getId().equals(outputAssets.get(0).getId())); - - assertEquals(message + " getProgress", progress, actual.getProgress(), - 0.01); - assertEquals(message + " getRunningDuration", runningDuration, - actual.getRunningDuration(), 0.01); - assertDateApproxEquals(message + " getStartTime", startTime, - actual.getStartTime()); - assertEquals(message + " getState", state, actual.getState()); - - // Note: The PerfMessage is not validated because it is server - // generated. - } - - private void verifyTaskPropertiesJustStarted(String message, - String mediaProcessorId, TaskOption options, String taskBody, - String configuration, String name, int priority, - String encryptionKeyId, String encryptionScheme, - String encryptionVersion, String initializationVector, - TaskInfo actual) throws ServiceException { - - // Read-only - Date endTime = null; - String errorDetails = null; - double progress = 0.0; - int runningDuration = 0; - Date startTime = null; - TaskState state = TaskState.None; - - verifyTaskProperties(message, mediaProcessorId, options, taskBody, - configuration, name, priority, encryptionKeyId, - encryptionScheme, encryptionVersion, initializationVector, - endTime, errorDetails, progress, runningDuration, startTime, - state, actual); - } - - private void verifyTaskPropertiesJustStartedNoEncryption(String message, - String mediaProcessorId, TaskOption options, String taskBody, - String configuration, String name, int priority, TaskInfo actual) - throws ServiceException { - String encryptionKeyId = null; - String encryptionScheme = "None"; - String encryptionVersion = null; - String initializationVector = null; - - verifyTaskPropertiesJustStarted(message, mediaProcessorId, options, - taskBody, configuration, name, priority, encryptionKeyId, - encryptionScheme, encryptionVersion, initializationVector, - actual); - } - - private void verifyTaskPropertiesNoEncryption(String message, - String mediaProcessorId, TaskOption options, String taskBody, - String configuration, String name, int priority, Date endTime, - String errorDetails, double progress, double runningDuration, - Date startTime, TaskState state, TaskInfo actual) - throws ServiceException { - String encryptionKeyId = null; - String encryptionScheme = "None"; - String encryptionVersion = null; - String initializationVector = null; - - verifyTaskProperties(message, mediaProcessorId, options, taskBody, - configuration, name, priority, encryptionKeyId, - encryptionScheme, encryptionVersion, initializationVector, - endTime, errorDetails, progress, runningDuration, startTime, - state, actual); - } - - private String constructTaskBody(int outputIndex) { - return "JobInputAsset(0)" - + "JobOutputAsset(" + outputIndex - + ")"; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/UploadingIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/UploadingIntegrationTest.java deleted file mode 100644 index ffd0f5f07d4d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/UploadingIntegrationTest.java +++ /dev/null @@ -1,173 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.EnumSet; -import java.util.Random; - -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.core.pipeline.jersey.ExponentialRetryPolicy; -import com.microsoft.windowsazure.core.pipeline.jersey.RetryPolicyFilter; -import com.microsoft.windowsazure.services.blob.models.BlockList; -import com.microsoft.windowsazure.services.blob.models.CommitBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobBlockOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobOptions; -import com.microsoft.windowsazure.services.media.models.AccessPolicy; -import com.microsoft.windowsazure.services.media.models.AccessPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AccessPolicyPermission; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; - -/** - * Testing uploading in various permutations. - * - */ -public class UploadingIntegrationTest extends IntegrationTestBase { - private static WritableBlobContainerContract blobWriter; - private static byte[] firstPrimes = new byte[] { 2, 3, 5, 7, 11, 13, 17, - 19, 23, 29 }; - - @BeforeClass - public static void setup() throws Exception { - IntegrationTestBase.setup(); - - AssetInfo asset = service.create(Asset.create().setName( - testAssetPrefix + "uploadBlockBlobAsset")); - - AccessPolicyInfo policy = service.create(AccessPolicy.create( - testPolicyPrefix + "uploadWritePolicy", 10, - EnumSet.of(AccessPolicyPermission.WRITE))); - - LocatorInfo locator = createLocator(policy, asset, 5); - - blobWriter = service.createBlobWriter(locator); - - ExponentialRetryPolicy retryPolicy = new ExponentialRetryPolicy(5000, - 5, new int[] { 400, 404 }); - blobWriter = blobWriter.withFilter(new RetryPolicyFilter(retryPolicy)); - } - - @Test - public void canUploadBlockBlob() throws Exception { - InputStream blobContent = new ByteArrayInputStream(firstPrimes); - blobWriter.createBlockBlob("uploadBlockBlobTest", blobContent); - } - - @Test - public void canUploadLargeBlockBlob() throws Exception { - - InputStream blobContent = new InputStream() { - private int count = 0; - private int _mark = 0; - private int invalidate = 0; - - private Random rand = new Random(); - - @Override - public int read() throws IOException { - if ((this.count++) > 1024*1024*66) { - return -1; - } - if (invalidate > 0) { - this.invalidate--; - if (this.invalidate == 0) { - this._mark = 0; - } - } - return rand.nextInt(256); - } - - @Override - public void mark(int mark) { - this._mark = this.count; - } - - @Override - public void reset() { - this.count = this._mark; - this._mark = 0; - } - - @Override - public boolean markSupported() { - return true; - } - }; - - blobWriter.createBlockBlob("uploadLargeBlockBlobTest", blobContent); - } - - @Test - public void canUploadBlockBlobWithOptions() throws Exception { - InputStream blobContent = new ByteArrayInputStream(firstPrimes); - CreateBlobOptions options = new CreateBlobOptions().addMetadata( - "testMetadataKey", "testMetadataValue"); - blobWriter.createBlockBlob("canUploadBlockBlobWithOptions", - blobContent, options); - } - - @Test - public void canCreateBlobBlock() throws Exception { - InputStream blobContent = new ByteArrayInputStream(firstPrimes); - blobWriter.createBlobBlock("canCreateBlobBlock", "123", blobContent); - } - - @Test - public void canCreateBlobBlockWithOptions() throws Exception { - InputStream blobContent = new ByteArrayInputStream(firstPrimes); - CreateBlobBlockOptions options = new CreateBlobBlockOptions() - .setTimeout(100); - blobWriter.createBlobBlock("canCreateBlobBlockWithOptions", "123", - blobContent, options); - } - - @Test - public void canCommitBlobBlocks() throws Exception { - BlockList blockList = new BlockList(); - blobWriter.commitBlobBlocks("canCommitBlobBlocks", blockList); - } - - @Test - public void canCommitBlobBlocksWithOptions() throws Exception { - BlockList blockList = new BlockList(); - CommitBlobBlocksOptions options = new CommitBlobBlocksOptions() - .setBlobContentType("text/html;charset=ISO-8859-1"); - blobWriter.commitBlobBlocks("canCommitBlobBlocksWithOptions", - blockList, options); - } - - @Test - public void canUploadBlockBlobWithExplicitRetry() throws Exception { - InputStream blobContent = new ByteArrayInputStream(firstPrimes); - blobWriter.createBlockBlob("canUploadBlockBlobWithExplicitRetry1", - blobContent); - - ExponentialRetryPolicy forceRetryPolicy = new ExponentialRetryPolicy(1, - 1, new int[] { 201 }); - WritableBlobContainerContract forceRetryBlobWriter = blobWriter - .withFilter(new RetryPolicyFilter(forceRetryPolicy)); - - blobContent.reset(); - forceRetryBlobWriter.createBlockBlob( - "canUploadBlockBlobWithExplicitRetry2", blobContent); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyEntityTest.java deleted file mode 100644 index 55f264fee908..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyEntityTest.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.contentprotection; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import java.net.URLEncoder; - -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyType; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicy; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyInfo; - -/** - * Tests for the methods and factories of the Asset entity. - */ -public class ContentKeyAuthorizationPolicyEntityTest { - // Common Arrange - private static final String ENTITY_SET = "ContentKeyAuthorizationPolicies"; - private static final String sampleCKAPId = "nb:ckpid:UUID:e640675d-adf5-4a15-b8c5-021e3ab01a10"; - private static final String sampleCKAPName = "sampleContentKeyAuthPolicyName"; - private final String expectedUri = String.format("%s('%s')", ENTITY_SET, URLEncoder.encode(sampleCKAPId, "UTF-8")); - - public ContentKeyAuthorizationPolicyEntityTest() throws Exception { - } - - @Test - public void ckapCreateReturnsValidPayload() throws ServiceException { - // Act - ContentKeyAuthorizationPolicyType payload = (ContentKeyAuthorizationPolicyType) ContentKeyAuthorizationPolicy - .create(sampleCKAPName).getRequestContents(); - - // Assert - assertNotNull(payload); - assertNull(payload.getId()); - assertEquals(payload.getName(), sampleCKAPName); - - } - - @Test - public void ckapGetReturnsExpectedUri() throws Exception { - // Act - EntityGetOperation getter = ContentKeyAuthorizationPolicy.get(sampleCKAPId); - - // Assert - assertEquals(expectedUri, getter.getUri()); - } - - @Test - public void ckapListReturnsExpectedUri() { - // Act - EntityListOperation lister = ContentKeyAuthorizationPolicy.list(); - - // Assert - assertEquals(ENTITY_SET, lister.getUri()); - assertNotNull(lister.getQueryParameters()); - assertEquals(0, lister.getQueryParameters().size()); - } - - @Test - public void ckapListCanTakeQueryParameters() { - EntityListOperation lister = ContentKeyAuthorizationPolicy.list().setTop(10) - .setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void ckapListCanTakeQueryParametersChained() { - EntityListOperation lister = ContentKeyAuthorizationPolicy.list().setTop(10) - .setSkip(2).set("filter", "something"); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals("something", lister.getQueryParameters().getFirst("filter")); - assertEquals(3, lister.getQueryParameters().size()); - } - - @Test - public void ckapDeleteReturnsExpectedUri() throws Exception { - EntityDeleteOperation deleter = ContentKeyAuthorizationPolicy.delete(sampleCKAPId); - - assertEquals(expectedUri, deleter.getUri()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyInfoTest.java deleted file mode 100644 index 93cb32e7cc9e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyInfoTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.contentprotection; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyType; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyInfo; - -public class ContentKeyAuthorizationPolicyInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "expectedId"; - ContentKeyAuthorizationPolicyInfo contentKeyAuthorizationPolicyInfo = new ContentKeyAuthorizationPolicyInfo( - null, new ContentKeyAuthorizationPolicyType().setId(expectedId)); - - // Act - String actualId = contentKeyAuthorizationPolicyInfo.getId(); - - // Assert - assertEquals(expectedId, actualId); - } - - @Test - public void testGetSetName() { - // Arrange - String expectedName = "expectedName"; - ContentKeyAuthorizationPolicyInfo contentKeyAuthorizationPolicyInfo = new ContentKeyAuthorizationPolicyInfo( - null, new ContentKeyAuthorizationPolicyType().setName(expectedName)); - - // Act - String actualName = contentKeyAuthorizationPolicyInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyOptionEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyOptionEntityTest.java deleted file mode 100644 index 8f517f4456a4..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyOptionEntityTest.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.contentprotection; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import java.net.URLEncoder; -import java.util.ArrayList; -import java.util.List; - -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyOptionType; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyOption; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyOptionInfo; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyRestriction; - -/** - * Tests for the methods and factories of the Asset entity. - */ -public class ContentKeyAuthorizationPolicyOptionEntityTest { - private static final String ENTITY_SET = "ContentKeyAuthorizationPolicyOptions"; - private static final String sampleCKAPOId = "nb:ckpoid:UUID:c244a5a7-a3d9-4ba0-a707-4336554f09b2"; - private static final String sampleCKAPOName = "sampleContentKeyAuthPolicyOptName"; - private static final String sampleCKAPOKDC = "sampleKeyDeliveryConfiguration"; - private final String expectedUri = String.format("%s('%s')", ENTITY_SET, URLEncoder.encode(sampleCKAPOId, "UTF-8")); - - public ContentKeyAuthorizationPolicyOptionEntityTest() throws Exception { - } - - @Test - public void ckapoCreateReturnsValidPayload() throws ServiceException { - List restrictions = new ArrayList(); - ContentKeyAuthorizationPolicyOptionType payload = (ContentKeyAuthorizationPolicyOptionType) ContentKeyAuthorizationPolicyOption - .create(sampleCKAPOName, 2, sampleCKAPOKDC, restrictions).getRequestContents(); - - assertNotNull(payload); - assertNull(payload.getId()); - assertEquals(payload.getName(), sampleCKAPOName); - assertEquals(payload.getKeyDeliveryType(), 2); - assertEquals(payload.getKeyDeliveryConfiguration(), sampleCKAPOKDC); - assertNotNull(payload.getRestrictions()); - } - - @Test - public void ckapoGetReturnsExpectedUri() throws Exception { - EntityGetOperation getter = ContentKeyAuthorizationPolicyOption - .get(sampleCKAPOId); - - assertEquals(expectedUri, getter.getUri()); - } - - @Test - public void ckapoListReturnsExpectedUri() { - EntityListOperation lister = ContentKeyAuthorizationPolicyOption - .list(); - - assertEquals(ENTITY_SET, lister.getUri()); - assertNotNull(lister.getQueryParameters()); - assertEquals(0, lister.getQueryParameters().size()); - } - - @Test - public void ckapoListCanTakeQueryParameters() { - EntityListOperation lister = ContentKeyAuthorizationPolicyOption.list() - .setTop(10).setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void ckapoListCanTakeQueryParametersChained() { - EntityListOperation lister = ContentKeyAuthorizationPolicyOption.list() - .setTop(10).setSkip(2).set("filter", "something"); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals("something", lister.getQueryParameters().getFirst("filter")); - assertEquals(3, lister.getQueryParameters().size()); - } - - @Test - public void ckapoDeleteReturnsExpectedUri() throws Exception { - EntityDeleteOperation deleter = ContentKeyAuthorizationPolicyOption.delete(sampleCKAPOId); - - assertEquals(expectedUri, deleter.getUri()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyOptionInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyOptionInfoTest.java deleted file mode 100644 index c5128f90d42f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyOptionInfoTest.java +++ /dev/null @@ -1,110 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.contentprotection; - -import static org.junit.Assert.assertEquals; - -import java.util.ArrayList; -import java.util.List; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyOptionType; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyRestrictionType; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyOptionInfo; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyRestriction; - -public class ContentKeyAuthorizationPolicyOptionInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "expectedId"; - ContentKeyAuthorizationPolicyOptionInfo contentKeyAuthorizationPolicyOptionInfo = new ContentKeyAuthorizationPolicyOptionInfo( - null, new ContentKeyAuthorizationPolicyOptionType().setId(expectedId)); - - // Act - String actualId = contentKeyAuthorizationPolicyOptionInfo.getId(); - - // Assert - assertEquals(expectedId, actualId); - } - - @Test - public void testGetSetName() { - // Arrange - String expectedName = "expectedName"; - ContentKeyAuthorizationPolicyOptionInfo contentKeyAuthorizationPolicyOptionInfo = new ContentKeyAuthorizationPolicyOptionInfo( - null, new ContentKeyAuthorizationPolicyOptionType().setName(expectedName)); - - // Act - String actualName = contentKeyAuthorizationPolicyOptionInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } - - @Test - public void testGetSetKeyDeliveryConfiguration() { - // Arrange - String expectedKeyDeliveryConfiguration = "expectedKeyDeliveryConfiguration"; - ContentKeyAuthorizationPolicyOptionInfo contentKeyAuthorizationPolicyOptionInfo = new ContentKeyAuthorizationPolicyOptionInfo( - null, new ContentKeyAuthorizationPolicyOptionType() - .setKeyDeliveryConfiguration(expectedKeyDeliveryConfiguration)); - - // Act - String actualKeyDeliveryConfiguration = contentKeyAuthorizationPolicyOptionInfo.getKeyDeliveryConfiguration(); - - // Assert - assertEquals(expectedKeyDeliveryConfiguration, actualKeyDeliveryConfiguration); - - } - - @Test - public void testGetSetKeyDeliveryType() { - // Arrange - int expectedKeyDeliveryType = 2; - ContentKeyAuthorizationPolicyOptionInfo contentKeyAuthorizationPolicyOptionInfo = new ContentKeyAuthorizationPolicyOptionInfo( - null, new ContentKeyAuthorizationPolicyOptionType().setKeyDeliveryType(expectedKeyDeliveryType)); - - // Act - int actualKeyDeliveryType = contentKeyAuthorizationPolicyOptionInfo.getKeyDeliveryType(); - - // Assert - assertEquals(expectedKeyDeliveryType, actualKeyDeliveryType); - } - - @Test - public void testGetSetRestrictions() { - // Arrange - String expectedRestrictionName = "expectedRestriction"; - String expectedRestrictionReq = ""; - int expectedRestrictionType = 2; - List settedRestrictions = new ArrayList(); - settedRestrictions.add(new ContentKeyAuthorizationPolicyRestrictionType().setName(expectedRestrictionName) - .setKeyRestrictionType(expectedRestrictionType).setRequirements(expectedRestrictionReq)); - ContentKeyAuthorizationPolicyOptionInfo contentKeyAuthorizationPolicyOptionInfo = new ContentKeyAuthorizationPolicyOptionInfo( - null, new ContentKeyAuthorizationPolicyOptionType().setRestrictions(settedRestrictions)); - - // Act - List actualRestrictions = contentKeyAuthorizationPolicyOptionInfo - .getRestrictions(); - - // Assert - assertEquals(actualRestrictions.get(0).getName(), expectedRestrictionName); - assertEquals(actualRestrictions.get(0).getKeyRestrictionType(), expectedRestrictionType); - assertEquals(actualRestrictions.get(0).getRequirements(), expectedRestrictionReq); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyRestrictionTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyRestrictionTest.java deleted file mode 100644 index 739b91fd1ce2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyRestrictionTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.contentprotection; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyRestriction; - -/** - * Tests for the methods and factories of the Asset entity. - */ -public class ContentKeyAuthorizationPolicyRestrictionTest { - - @Test - public void roundTripTest() { - // provides full code coverage - assertEquals(ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.Open, ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.valueOf("Open")); - assertEquals(ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.TokenRestricted, ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.valueOf("TokenRestricted")); - assertEquals(ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.IPRestricted, ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.valueOf("IPRestricted")); - } - - @Test - public void getValueOfContentKeyRestrictionTypeTest() { - // provides full code coverage - assertEquals(ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.Open.getValue(), 0); - assertEquals(ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.TokenRestricted.getValue(), 1); - assertEquals(ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.IPRestricted.getValue(), 2); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/LinkRetrievalTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/LinkRetrievalTest.java deleted file mode 100644 index 2d027a525238..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/LinkRetrievalTest.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import javax.xml.bind.JAXBElement; -import javax.xml.namespace.QName; - -import org.junit.Before; -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.atom.LinkType; -import com.microsoft.windowsazure.services.media.implementation.content.Constants; -import com.microsoft.windowsazure.services.media.implementation.content.MediaProcessorType; -import com.microsoft.windowsazure.services.media.models.LinkInfo; -import com.microsoft.windowsazure.services.media.models.MediaProcessorInfo; - -/** - * Testing retrieval of links from ATOM entities - * - */ -public class LinkRetrievalTest { - private static QName linkName = new QName("link", Constants.ATOM_NS); - private MediaProcessorInfo info; - private LinkType link1; - private LinkType link2; - - @Before - public void setup() { - EntryType entry = new EntryType(); - - link1 = new LinkType(); - link1.setTitle("someLink"); - link1.setRel("Related/something"); - link1.setHref("some/uri/somewhere"); - - link2 = new LinkType(); - link2.setTitle("someOtherLink"); - link2.setRel("Related/else"); - link2.setHref("some/other/href/somewhere"); - - entry.getEntryChildren().add( - new JAXBElement(linkName, LinkType.class, link1)); - entry.getEntryChildren().add( - new JAXBElement(linkName, LinkType.class, link2)); - - MediaProcessorType payload = new MediaProcessorType().setId("DummyId") - .setName("Dummy Name").setVersion("0.0.0").setVendor("Contoso") - .setSku("sku skiddo").setDescription("For testing links only"); - - ContentType contentElement = new ContentType(); - contentElement.getContent().add( - new JAXBElement( - Constants.ODATA_PROPERTIES_ELEMENT_NAME, - MediaProcessorType.class, payload)); - - entry.getEntryChildren().add( - new JAXBElement( - Constants.ATOM_CONTENT_ELEMENT_NAME, ContentType.class, - contentElement)); - - info = new MediaProcessorInfo(entry, payload); - } - - @Test - public void canRetrieveSingleLinkFromEntity() { - assertTrue(info.hasLink(link1.getRel())); - } - - @Test - public void getFalseWhenLinkIsntThere() { - assertFalse(info.hasLink("noSuchLink")); - } - - @Test - public void canRetrieveEntireLinkByRel() { - LinkInfo link = info.getLink(link2.getRel()); - - assertLinksEqual(link2, link); - } - - @Test - public void getNullWhenLinkIsntThere() { - assertNull(info.getLink("noSuchLink")); - } - - private static void assertLinksEqual(LinkType expected, LinkInfo actual) { - assertEquals(expected.getHref(), actual.getHref()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperationsTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperationsTest.java deleted file mode 100644 index 05615e3c458b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperationsTest.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.net.URI; - -import javax.mail.MessagingException; -import javax.mail.internet.MimeMultipart; -import javax.ws.rs.core.UriBuilder; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.ParserConfigurationException; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.models.Job; -import com.microsoft.windowsazure.services.media.models.Task; - -public class MediaBatchOperationsTest { - - @Test - public void createMediaBatchOperationSuccess() throws JAXBException, - ParserConfigurationException { - // Arrange - URI serviceUri = UriBuilder.fromPath("http://www.contoso.com/media") - .build(); - - // Act - MediaBatchOperations mediaBatchOperations = new MediaBatchOperations( - serviceUri); - - // Assert - assertNotNull(mediaBatchOperations); - - } - - @Test(expected = IllegalArgumentException.class) - public void createMediaBatchOperationFailedWithNullUri() - throws JAXBException, ParserConfigurationException { - // Arrange - URI serviceUri = null; - - // Act - @SuppressWarnings("unused") - MediaBatchOperations mediaBatchOperations = new MediaBatchOperations( - serviceUri); - - // Assert - assertTrue(false); - - } - - @Test - public void addCreateJobOperationToMediaBatchOperationsSuccess() - throws JAXBException, ParserConfigurationException { - // Arrange - URI serviceUri = UriBuilder.fromPath("http://www.contoso.com/media") - .build(); - Job.CreateBatchOperation createJobOperation = new Job.CreateBatchOperation( - serviceUri); - - // Act - MediaBatchOperations mediaBatchOperations = new MediaBatchOperations( - serviceUri); - mediaBatchOperations.addOperation(createJobOperation); - - // Assert - assertNotNull(mediaBatchOperations); - assertEquals(1, mediaBatchOperations.getOperations().size()); - - } - - @Test - public void addCreateTaskOperationToMediaBatchOperationsSuccess() - throws JAXBException, ParserConfigurationException { - // Arrange - URI serviceUri = UriBuilder.fromPath("http://www.contoso.com/media") - .build(); - String mediaProcessorId = "testMediaProcessorId"; - String taskBody = "testTaskBody"; - - Task.CreateBatchOperation taskCreateBatchOperation = new Task.CreateBatchOperation( - mediaProcessorId, taskBody); - - // Act - MediaBatchOperations mediaBatchOperations = new MediaBatchOperations( - serviceUri); - mediaBatchOperations.addOperation(taskCreateBatchOperation); - - // Assert - assertNotNull(mediaBatchOperations); - assertEquals(1, mediaBatchOperations.getOperations().size()); - } - - @Test - public void getMimeMultipartSuccess() throws JAXBException, - ParserConfigurationException, MessagingException, IOException { - // Arrange - String mediaProcessorId = "testMediaProcessorId"; - String taskBody = "testTaskBody"; - URI serviceUri = UriBuilder.fromPath("http://www.contoso.com/media") - .build(); - Task.CreateBatchOperation taskCreateBatchOperation = new Task.CreateBatchOperation( - mediaProcessorId, taskBody); - Job.CreateBatchOperation jobCreateBatchOperation = new Job.CreateBatchOperation( - serviceUri); - - // Act - MediaBatchOperations mediaBatchOperations = new MediaBatchOperations( - serviceUri); - mediaBatchOperations.addOperation(jobCreateBatchOperation); - mediaBatchOperations.addOperation(taskCreateBatchOperation); - MimeMultipart mimeMultipart = mediaBatchOperations.getMimeMultipart(); - - // Assert - assertNotNull(mediaBatchOperations); - assertEquals(2, mediaBatchOperations.getOperations().size()); - assertNotNull(mimeMultipart); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataDateParsingTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataDateParsingTest.java deleted file mode 100644 index 8e46df841647..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataDateParsingTest.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import static org.junit.Assert.assertEquals; - -import java.util.Calendar; -import java.util.Date; -import java.util.GregorianCalendar; -import java.util.TimeZone; - -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests around parsing dates - OData requires date strings without timezones be - * treated as UTC. ISO spec, and Java default, is to use local timezone. So we - * need to plug in to tweak Jaxb to use OData conventions. - * - */ -public class ODataDateParsingTest { - private static TimeZone utc; - private static TimeZone pst; - - @BeforeClass - public static void setupClass() { - utc = TimeZone.getDefault(); - utc.setRawOffset(0); - - pst = TimeZone.getDefault(); - pst.setRawOffset(-8 * 60 * 60 * 1000); - } - - @Test - public void canConvertDateToString() throws Exception { - - Calendar sampleTime = new GregorianCalendar(2012, 11, 28, 17, 43, 12); - sampleTime.setTimeZone(utc); - - Date sampleDate = sampleTime.getTime(); - - String formatted = new ODataDateAdapter().marshal(sampleDate); - - assertEquals("2012-12-28T17:43:12Z", formatted); - - } - - @Test - public void stringWithTimezoneRoundTripsCorrectly() throws Exception { - String exampleDate = "2012-11-28T17:43:12-08:00"; - - Date parsedTime = new ODataDateAdapter().unmarshal(exampleDate); - - Calendar expectedTime = new GregorianCalendar(2012, 10, 28, 17, 43, 12); - expectedTime.setTimeZone(pst); - - assertEquals(expectedTime.getTimeInMillis(), parsedTime.getTime()); - } - - @Test - public void stringWithUTCTimezoneRoundTripsCorrectly() throws Exception { - String exampleDate = "2012-11-28T17:43:12Z"; - - Date parsedTime = new ODataDateAdapter().unmarshal(exampleDate); - - Calendar expectedTime = new GregorianCalendar(2012, 10, 28, 17, 43, 12); - expectedTime.setTimeZone(utc); - - assertEquals(expectedTime.getTimeInMillis(), parsedTime.getTime()); - } - - @Test - public void stringWithNoTimezoneActsAsUTC() throws Exception { - String exampleDate = "2012-11-28T17:43:12"; - - Date parsedTime = new ODataDateAdapter().unmarshal(exampleDate); - - Calendar expectedTime = new GregorianCalendar(2012, 10, 28, 17, 43, 12); - expectedTime.setTimeZone(utc); - - assertEquals(expectedTime.getTimeInMillis(), parsedTime.getTime()); - } - - @Test - public void stringWithFractionalTimeReturnsCorrectMillisecondsTo100nsBoundary() - throws Exception { - String exampleDate = "2012-11-28T17:43:12.1234567Z"; - - Date parsedTime = new ODataDateAdapter().unmarshal(exampleDate); - - Calendar timeToNearestSecond = Calendar.getInstance(); - timeToNearestSecond.setTimeZone(utc); - timeToNearestSecond.set(2012, 10, 28, 17, 43, 12); - timeToNearestSecond.set(Calendar.MILLISECOND, 0); - - long millis = parsedTime.getTime() - - timeToNearestSecond.getTimeInMillis(); - - assertEquals(123, millis); - } - - @Test - public void stringWithFractionalTimeReturnsCorrectMillisecondsAsFractionNotCount() - throws Exception { - String exampleDate = "2012-11-28T17:43:12.1Z"; - - Date parsedTime = new ODataDateAdapter().unmarshal(exampleDate); - - Calendar timeToNearestSecond = Calendar.getInstance(); - timeToNearestSecond.setTimeZone(utc); - timeToNearestSecond.set(2012, 10, 28, 17, 43, 12); - timeToNearestSecond.set(Calendar.MILLISECOND, 0); - - long millis = parsedTime.getTime() - - timeToNearestSecond.getTimeInMillis(); - assertEquals(100, millis); - - } - - @Test - public void stringWithFractionalSecondsAndTimezoneOffsetParses() - throws Exception { - String exampleDate = "2012-11-28T17:43:12.1-08:00"; - Date parsedTime = new ODataDateAdapter().unmarshal(exampleDate); - - Calendar expectedTime = new GregorianCalendar(2012, 10, 28, 17, 43, 12); - expectedTime.setTimeZone(pst); - expectedTime.set(Calendar.MILLISECOND, 100); - - assertEquals(expectedTime.getTimeInMillis(), parsedTime.getTime()); - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataSerializationFromJerseyTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataSerializationFromJerseyTest.java deleted file mode 100644 index 1cbb12fc34e9..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataSerializationFromJerseyTest.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.net.URISyntaxException; -import java.util.List; - -import javax.ws.rs.core.MediaType; - -import org.junit.Assert; -import org.junit.Test; - -import com.microsoft.windowsazure.core.UserAgentFilter; -import com.microsoft.windowsazure.core.utils.DefaultDateFactory; -import com.microsoft.windowsazure.services.media.IntegrationTestBase; -import com.microsoft.windowsazure.services.media.MediaConfiguration; -import com.microsoft.windowsazure.services.media.MediaContract; -import com.microsoft.windowsazure.services.media.authentication.AzureAdTokenProvider; -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.WebResource; -import com.sun.jersey.api.client.config.ClientConfig; -import com.sun.jersey.api.client.config.DefaultClientConfig; -import com.sun.jersey.api.json.JSONConfiguration; - -public class ODataSerializationFromJerseyTest extends IntegrationTestBase { - - @Test - public void canBuildJerseyClientToCreateAnAssetWhichIsProperlyDeserialized() - throws Exception { - // Build a jersey client object by hand; this is working up to the - // full integration into the media services rest proxy, but we - // need to go step by step to begin. - - ClientConfig cc = new DefaultClientConfig(); - cc.getProperties().put(ClientConfig.PROPERTY_FOLLOW_REDIRECTS, false); - cc.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, true); - cc.getSingletons().add(new ODataEntityProvider()); - Client c = Client.create(cc); - - // c.addFilter(new LoggingFilter(System.out)); - c.addFilter(new RedirectFilter(createLocationManager())); - c.addFilter(new OAuthFilter(tokenProvider)); - c.addFilter(new VersionHeadersFilter()); - - WebResource assetResource = c.resource("Assets"); - - ODataAtomMarshaller m = new ODataAtomMarshaller(); - AssetType requestData = new AssetType(); - requestData.setName(testAssetPrefix + "firstTestAsset"); - requestData.setAlternateId("some external id"); - - AssetInfo newAsset = assetResource.type(MediaType.APPLICATION_ATOM_XML) - .accept(MediaType.APPLICATION_ATOM_XML) - .post(AssetInfo.class, m.marshalEntry(requestData)); - - Assert.assertNotNull(newAsset); - Assert.assertEquals(testAssetPrefix + "firstTestAsset", - newAsset.getName()); - Assert.assertEquals("some external id", newAsset.getAlternateId()); - } - - private ResourceLocationManager createLocationManager() - throws URISyntaxException { - return new ResourceLocationManager( - (String) config.getProperty(MediaConfiguration.AZURE_AD_API_SERVER)); - } - - @Test - public void canCreateAssetThroughMediaServiceAPI() throws Exception { - MediaContract client = createService(); - AssetInfo newAsset = client.create(Asset.create().setName( - testAssetPrefix + "secondTestAsset")); - - Assert.assertEquals(testAssetPrefix + "secondTestAsset", - newAsset.getName()); - } - - @Test - public void canRetrieveListOfAssets() throws Exception { - MediaContract client = createService(); - List assets = client.list(Asset.list()); - - Assert.assertNotNull(assets); - } - - private MediaContract createService() { - return config.create(MediaContract.class); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataSerializationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataSerializationTest.java deleted file mode 100644 index ee91f1291fad..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataSerializationTest.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.util.List; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.Marshaller; -import javax.xml.namespace.QName; - -import org.junit.Assert; -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; -import com.microsoft.windowsazure.services.media.implementation.content.Constants; -import com.microsoft.windowsazure.services.media.models.AssetInfo; - -public class ODataSerializationTest { - - private final String sampleFeedOneAsset = "\n" - + "\n" - + " https://wamsbayclus001rest-hs.cloudapp.net/api/Assets\n" - + " Assets\n" - + " 2012-08-28T18:35:15Z\n" - + " \n" - + " \n" - + " https://wamsbayclus001rest-hs.cloudapp.net/api/Assets('nb%3Acid%3AUUID%3A1f6c7bb4-8013-486e-b4c9-2e4a6842b9a6')\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " <updated>2012-08-28T18:35:15Z</updated>\n" - + " <author>\n" - + " <name />\n" - + " </author>\n" - + " <m:action metadata=\"https://wamsbayclus001rest-hs.cloudapp.net/api/$metadata#WindowsAzureMediaServices.Publish\" title=\"Publish\" target=\"https://wamsbayclus001rest-hs.cloudapp.net/api/Assets('nb%3Acid%3AUUID%3A1f6c7bb4-8013-486e-b4c9-2e4a6842b9a6')/Publish\" />\n" - + " <content type=\"application/xml\">\n" - + " <m:properties>\n" - + " <d:Id>nb:cid:UUID:1f6c7bb4-8013-486e-b4c9-2e4a6842b9a6</d:Id>\n" - + " <d:State m:type=\"Edm.Int32\">0</d:State>\n" - + " <d:Created m:type=\"Edm.DateTime\">2012-08-28T18:34:06.123</d:Created>\n" - + " <d:LastModified m:type=\"Edm.DateTime\">2012-08-28T18:34:06.123</d:LastModified>\n" - + " <d:AlternateId m:null=\"true\" />\n" - + " <d:Name>testAsset</d:Name>\n" - + " <d:Options m:type=\"Edm.Int32\">0</d:Options>\n" - + " </m:properties>\n" - + " </content>\n" - + " </entry>\n" - + "</feed>"; - - @Test - public void canUnmarshallAssetFromFeed() throws Exception { - ODataAtomUnmarshaller um = new ODataAtomUnmarshaller(); - InputStream input = new ByteArrayInputStream( - sampleFeedOneAsset.getBytes("UTF-8")); - List<AssetInfo> entries = um.unmarshalFeed(input, AssetInfo.class); - Assert.assertEquals(1, entries.size()); - Assert.assertEquals("nb:cid:UUID:1f6c7bb4-8013-486e-b4c9-2e4a6842b9a6", - entries.get(0).getId()); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Test - public void canMarshalEntryFromJavaObject() throws Exception { - AssetType a = new AssetType(); - a.setName("testNewAsset"); - a.setOptions(0); - a.setAlternateId("some other id"); - - JAXBContext context = JAXBContext.newInstance(EntryType.class, - AssetType.class); - Marshaller m = context.createMarshaller(); - - EntryType e = new EntryType(); - ContentType c = new ContentType(); - c.getContent().add( - new JAXBElement(Constants.ODATA_PROPERTIES_ELEMENT_NAME, - AssetType.class, a)); - e.getEntryChildren().add( - new JAXBElement(Constants.ATOM_CONTENT_ELEMENT_NAME, - ContentType.class, c)); - - m.marshal(new JAXBElement(new QName(Constants.ATOM_NS, "entry"), - EntryType.class, e), System.out); - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/RedirectionFilterTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/RedirectionFilterTest.java deleted file mode 100644 index b87632d6250f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/RedirectionFilterTest.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import static org.junit.Assert.assertEquals; - -import javax.ws.rs.core.MultivaluedMap; - -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.mockito.Mockito; - -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.ClientHandlerException; -import com.sun.jersey.api.client.ClientRequest; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.filter.ClientFilter; -import com.sun.jersey.core.header.InBoundHeaders; - -public class RedirectionFilterTest { - @Rule - public ExpectedException thrown = ExpectedException.none(); - - private final String originalBaseURI = "https://base.somewhere.example/API/"; - private final String redirectedBaseURI = "http://redirected.somewhere.example/Stuff/"; - - @Test - public void whenInvokedAndNotRedirected_shouldAddBaseURIToRequest() - throws Exception { - RequestRecordingFilter sink = new RequestRecordingFilter(); - Client c = Client.create(); - c.addFilter(sink); - c.addFilter(new RedirectFilter(new ResourceLocationManager( - originalBaseURI))); - - c.resource("Files").get(ClientResponse.class); - - assertEquals(originalBaseURI + "Files", sink.request.getURI() - .toString()); - } - - @Test - public void whenInvokedAndRedirected_shouldHaveRedirectedURIInRequest() - throws Exception { - RequestRecordingFilter sink = new RequestRecordingFilter(); - Client c = Client.create(); - c.addFilter(sink); - c.addFilter(new RedirectingTestFilter(originalBaseURI, - redirectedBaseURI)); - - c.addFilter(new RedirectFilter(new ResourceLocationManager( - originalBaseURI))); - - ClientResponse response = c.resource("Things") - .get(ClientResponse.class); - - assertEquals(200, response.getStatus()); - assertEquals(redirectedBaseURI + "Things", sink.request.getURI() - .toString()); - } - - @Test - public void whenRedirectedMultipleTimes_requestEndsUpAtFinalRediret() - throws Exception { - RequestRecordingFilter sink = new RequestRecordingFilter(); - Client c = Client.create(); - c.addFilter(sink); - c.addFilter(new RedirectingTestFilter("https://a.example/API/", - "https://b.example/API/")); - c.addFilter(new RedirectingTestFilter("https://b.example/API/", - "https://c.example/API/")); - c.addFilter(new RedirectingTestFilter("https://c.example/API/", - "https://final.example/Code/")); - - c.addFilter(new RedirectFilter(new ResourceLocationManager( - "https://a.example/API/"))); - - ClientResponse response = c.resource("Stuff").get(ClientResponse.class); - - assertEquals(200, response.getStatus()); - - assertEquals("https://final.example/Code/Stuff", sink.request.getURI() - .toString()); - } - - @Test - public void whenRedirectingToNull_shouldGetClientException() - throws Exception { - RequestRecordingFilter sink = new RequestRecordingFilter(); - Client c = Client.create(); - c.addFilter(sink); - c.addFilter(new RedirectingTestFilter(originalBaseURI, null)); - c.addFilter(new RedirectFilter(new ResourceLocationManager( - originalBaseURI))); - - thrown.expect(ClientHandlerException.class); - c.resource("Something").get(ClientResponse.class); - } - - @Test - public void whenRedirectingToBadURI_shouldGetClientException() - throws Exception { - RequestRecordingFilter sink = new RequestRecordingFilter(); - Client c = Client.create(); - c.addFilter(sink); - c.addFilter(new RedirectingTestFilter(originalBaseURI, - "no way this is valid!")); - c.addFilter(new RedirectFilter(new ResourceLocationManager( - originalBaseURI))); - - thrown.expect(ClientHandlerException.class); - c.resource("Something").get(ClientResponse.class); - } - - // Test support classes - - // - // Filter that acts as a "sink" so the request doesn't go out over - // the wire. Also holds onto the request object that went through - // the pipeline so that it can be asserted against in the test. - // - private class RequestRecordingFilter extends ClientFilter { - public ClientRequest request; - - @Override - public ClientResponse handle(ClientRequest request) - throws ClientHandlerException { - this.request = request; - - ClientResponse response = Mockito.mock(ClientResponse.class); - Mockito.when(response.getStatus()).thenReturn(200); - return response; - } - } - - // - // Filter that will 301-redirect requests depending on which URI - // the request goes to. - // - - private class RedirectingTestFilter extends ClientFilter { - private final String uriToRedirect; - private final String uriRedirectedTo; - - public RedirectingTestFilter(String uriToRedirect, - String uriRedirectedTo) { - this.uriToRedirect = uriToRedirect; - this.uriRedirectedTo = uriRedirectedTo; - } - - @Override - public ClientResponse handle(ClientRequest request) - throws ClientHandlerException { - - if (request.getURI().toString().startsWith(uriToRedirect)) { - ClientResponse response = Mockito.mock(ClientResponse.class); - Mockito.when(response.getClientResponseStatus()).thenReturn( - ClientResponse.Status.MOVED_PERMANENTLY); - MultivaluedMap<String, String> headers = new InBoundHeaders(); - headers.add("location", uriRedirectedTo); - Mockito.when(response.getHeaders()).thenReturn(headers); - return response; - } else { - return getNext().handle(request); - } - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ResourceLocationManagerTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ResourceLocationManagerTest.java deleted file mode 100644 index f7585471f74a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ResourceLocationManagerTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import static org.junit.Assert.assertEquals; - -import java.net.URI; - -import org.junit.Test; - -public class ResourceLocationManagerTest { - - @Test - public void testCanCreateWithBaseUri() throws Exception { - String baseUri = "https://base.uri.example"; - ResourceLocationManager m = new ResourceLocationManager(baseUri); - - assertEquals(baseUri, m.getBaseURI().toString()); - } - - @Test - public void testWhenCallingGetRedirectedURI_shouldReturnURIWithBaseURIPreprended() - throws Exception { - String baseURI = "http://base.uri.example/path/"; - ResourceLocationManager m = new ResourceLocationManager(baseURI); - - URI originalURI = new URI("Assets"); - - URI redirectedURI = m.getRedirectedURI(originalURI); - - assertEquals(baseURI + "Assets", redirectedURI.toString()); - } - - @Test - public void settingBaseURIAfterRedirecting_shouldReturnURIWithNewBaseURI() - throws Exception { - String baseURI = "http://base.uri.example/path/"; - String redirectedBaseURI = "http://other.uri.example/API/"; - ResourceLocationManager m = new ResourceLocationManager(baseURI); - - URI targetURI = new URI("Assets"); - - URI originalURI = m.getRedirectedURI(targetURI); - m.setRedirectedURI(redirectedBaseURI); - URI redirectedURI = m.getRedirectedURI(targetURI); - - assertEquals(baseURI + "Assets", originalURI.toString()); - assertEquals(redirectedBaseURI + "Assets", redirectedURI.toString()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/SASTokenFilterTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/SASTokenFilterTest.java deleted file mode 100644 index 5fd980cb7d37..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/SASTokenFilterTest.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.net.URI; -import java.util.HashMap; -import java.util.Map; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mockito; - -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.ClientHandlerException; -import com.sun.jersey.api.client.ClientRequest; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.WebResource; -import com.sun.jersey.api.client.filter.ClientFilter; - -public class SASTokenFilterTest { - - private final String sampleSASToken = "st=2012-10-05T21%3A10%3A25Z&se=2012-10-05T21%3A15%3A25Z&sr=c&si=89fa57b4-293f-40df-a0cb-9d84ee493b8c&sig=iMDPr8V%2FIJrYG8t2GeSqBh5tTUdM7ykOObFVICa%2F%2F1Q%3D"; - private RequestRecordingFilter sink; - private Client client; - - @Before - public void setup() throws Exception { - sink = new RequestRecordingFilter(); - client = Client.create(); - client.addFilter(sink); - client.addFilter(new SASTokenFilter(sampleSASToken)); - } - - @Test - public void filterAddsQueryParameterToRequestUrl() throws Exception { - - WebResource r = client - .resource("http://astorageaccount.blob.something.example/asset-abcd"); - - r.get(ClientResponse.class); - - assertContainsSASToken(sink.request.getURI()); - } - - @Test - public void filterPreservesQueryParameters() throws Exception { - client.resource("http://storage.service.example/asset-efgh") - .queryParam("param0", "first").queryParam("param1", "second") - .get(ClientResponse.class); - - assertContainsSASToken(sink.request.getURI()); - - Map<String, String> queryParams = parseQueryParameters(sink.request - .getURI()); - assertTrue(queryParams.containsKey("param0")); - assertTrue(queryParams.containsKey("param1")); - assertEquals("first", queryParams.get("param0")); - assertEquals("second", queryParams.get("param1")); - } - - // Test support code - - // - // Filter that acts as a "sink" so the request doesn't go out over - // the wire. Also holds onto the request object that went through - // the pipeline so that it can be asserted against in the test. - // - private class RequestRecordingFilter extends ClientFilter { - public ClientRequest request; - - @Override - public ClientResponse handle(ClientRequest request) - throws ClientHandlerException { - this.request = request; - - ClientResponse response = Mockito.mock(ClientResponse.class); - Mockito.when(response.getStatus()).thenReturn(200); - return response; - } - } - - // Assertion helpers - - private void assertContainsSASToken(URI uri) { - Map<String, String> queryParams = parseQueryParameters(uri); - - assertTrue(queryParams.containsKey("st")); - assertTrue(queryParams.containsKey("se")); - assertTrue(queryParams.containsKey("sr")); - assertTrue(queryParams.containsKey("si")); - assertTrue(queryParams.containsKey("sig")); - - assertEquals("iMDPr8V%2FIJrYG8t2GeSqBh5tTUdM7ykOObFVICa%2F%2F1Q%3D", - queryParams.get("sig")); - } - - // Simplistic parsing of query parameters into map so we can assert against - // contents - // easily. - private Map<String, String> parseQueryParameters(URI uri) { - HashMap<String, String> queryParameters = new HashMap<String, String>(); - String queryString = uri.getRawQuery(); - if (queryString.startsWith("?")) { - queryString = queryString.substring(1); - } - - String[] parameters = queryString.split("&"); - - for (String param : parameters) { - int firstEqualIndex = param.indexOf('='); - String paramName = param.substring(0, firstEqualIndex); - String value = param.substring(firstEqualIndex + 1); - - queryParameters.put(paramName, value); - } - return queryParameters; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/StatusLineTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/StatusLineTest.java deleted file mode 100644 index 18a74eddbd77..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/StatusLineTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import static org.junit.Assert.assertEquals; - -import java.io.ByteArrayInputStream; - -import javax.activation.DataSource; - -import org.junit.Test; - -import com.microsoft.windowsazure.core.utils.InputStreamDataSource; - -public class StatusLineTest { - - @Test - public void testCanCreateStatus() throws Exception { - // Arrange - String httpResponse = "HTTP/1.1 200 OK"; - int expectedStatus = 200; - String expectedReason = "OK"; - ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream( - httpResponse.getBytes()); - DataSource dataSource = new InputStreamDataSource(byteArrayInputStream, - "defaultContentType"); - - // Act - StatusLine statusLine = StatusLine.create(dataSource); - - // Assert - assertEquals(expectedStatus, statusLine.getStatus()); - assertEquals(expectedReason, statusLine.getReason()); - } - - @Test - public void testGetSetStatus() { - // Arrange - String httpResponse = "HTTP/1.1 200 OK"; - int expectedStatus = 300; - String expectedReason = "NotOK"; - ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream( - httpResponse.getBytes()); - DataSource dataSource = new InputStreamDataSource(byteArrayInputStream, - "defaultContentType"); - StatusLine statusLine = StatusLine.create(dataSource); - - // Act - statusLine.setStatus(expectedStatus); - statusLine.setReason(expectedReason); - - // Assert - assertEquals(expectedStatus, statusLine.getStatus()); - assertEquals(expectedReason, statusLine.getReason()); - } - - @Test - public void testGetSetReason() { - - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/AgcAndColorStripeRestrictionTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/AgcAndColorStripeRestrictionTests.java deleted file mode 100644 index bbfdedb0b647..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/AgcAndColorStripeRestrictionTests.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import static org.junit.Assert.*; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.AgcAndColorStripeRestriction; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ErrorMessages; - -public class AgcAndColorStripeRestrictionTests { - - @Test - public void NewAgcAndColorStripeRestrictionTests() { - // Arrange - byte expectedConfigurationData = 2; - - // Act - AgcAndColorStripeRestriction agcAndColorStripeRestriction = new AgcAndColorStripeRestriction( - expectedConfigurationData); - byte resultConfigurationData = agcAndColorStripeRestriction.getConfigurationData(); - - // Assert - assertEquals(expectedConfigurationData, resultConfigurationData); - } - - @Test - public void BadConfigurationDataAgcAndColorStripeRestrictionShouldThrown() { - // Arrange - byte expectedConfigurationData = 4; - - // Act - try { - @SuppressWarnings("unused") - AgcAndColorStripeRestriction agcAndColorStripeRestriction = new AgcAndColorStripeRestriction( - expectedConfigurationData); - fail("Should Thrown"); - - } catch (IllegalArgumentException e) { - // Assert - assertEquals(e.getMessage(), ErrorMessages.INVALID_TWO_BIT_CONFIGURATION_DATA); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ExplicitAnalogTelevisionRestrictionTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ExplicitAnalogTelevisionRestrictionTests.java deleted file mode 100644 index f3e81330d7e2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ExplicitAnalogTelevisionRestrictionTests.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import static org.junit.Assert.*; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ErrorMessages; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ExplicitAnalogTelevisionRestriction; - -public class ExplicitAnalogTelevisionRestrictionTests { - - @Test - public void NewExplicitAnalogTelevisionRestrictionTest() { - // Arrange - boolean expectedBestEffort = true; - byte expectedConfigurationData = 2; - - // Act - ExplicitAnalogTelevisionRestriction explicitAnalogTelevisionRestriction = new ExplicitAnalogTelevisionRestriction( - expectedBestEffort, expectedConfigurationData); - boolean resultBestEffort = explicitAnalogTelevisionRestriction.isBestEffort(); - byte resultConfigurationData = explicitAnalogTelevisionRestriction.getConfigurationData(); - - // Assert - assertEquals(expectedBestEffort, resultBestEffort); - assertEquals(expectedConfigurationData, resultConfigurationData); - } - - @Test - public void GetterSetterExplicitAnalogTelevisionRestrictionTest() { - // Arrange - boolean expectedBestEffort = true; - byte expectedConfigurationData = 2; - - // Act - ExplicitAnalogTelevisionRestriction explicitAnalogTelevisionRestriction = new ExplicitAnalogTelevisionRestriction( - false, expectedConfigurationData); - explicitAnalogTelevisionRestriction.setBestEffort(expectedBestEffort); - boolean resultBestEffort = explicitAnalogTelevisionRestriction.isBestEffort(); - byte resultConfigurationData = explicitAnalogTelevisionRestriction.getConfigurationData(); - - // Assert - assertEquals(expectedBestEffort, resultBestEffort); - assertEquals(expectedConfigurationData, resultConfigurationData); - } - - @Test - public void BadConfigurationDataExplicitAnalogTelevisionRestrictionShouldThrown() { - // Arrange - byte expectedConfigurationData = 4; - - // Act - try { - @SuppressWarnings("unused") - ExplicitAnalogTelevisionRestriction explicitAnalogTelevisionRestriction = new ExplicitAnalogTelevisionRestriction( - false, expectedConfigurationData); - fail("Should Thrown"); - - // Assert - } catch (IllegalArgumentException e) { - assertEquals(e.getMessage(), ErrorMessages.INVALID_TWO_BIT_CONFIGURATION_DATA); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/MediaServicesLicenseTemplateSerializerTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/MediaServicesLicenseTemplateSerializerTests.java deleted file mode 100644 index 4fce03454e6a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/MediaServicesLicenseTemplateSerializerTests.java +++ /dev/null @@ -1,539 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import static org.junit.Assert.*; - -import java.util.Date; -import java.util.UUID; -import java.util.Arrays; - -import javax.xml.datatype.DatatypeFactory; -import javax.xml.datatype.Duration; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.AgcAndColorStripeRestriction; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ContentEncryptionKeyFromHeader; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ContentEncryptionKeyFromKeyIdentifier; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ErrorMessages; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ExplicitAnalogTelevisionRestriction; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.MediaServicesLicenseTemplateSerializer; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.PlayReadyLicenseResponseTemplate; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.PlayReadyLicenseTemplate; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.PlayReadyLicenseType; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.PlayReadyPlayRight; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ScmsRestriction; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.UnknownOutputPassingOption; - -public class MediaServicesLicenseTemplateSerializerTests { - - private final String schemaFile = null; // MediaServicesLicenseTemplateSerializerTests.class - /// .getClassLoader().getResource("") - /// .getPath() + "schemas/TokenRestrictionTemplate.xsd"; - - @Test - public void roundTripTest() throws Exception { - PlayReadyLicenseResponseTemplate template = new PlayReadyLicenseResponseTemplate(); - template.setResponseCustomData("This is my response custom data"); - PlayReadyLicenseTemplate licenseTemplate = new PlayReadyLicenseTemplate(); - template.getLicenseTemplates().add(licenseTemplate); - - //@Act - - licenseTemplate.setLicenseType(PlayReadyLicenseType.Persistent); - licenseTemplate.setBeginDate(new Date()); - licenseTemplate.setExpirationDate(new Date()); - licenseTemplate.setContentKey(new ContentEncryptionKeyFromKeyIdentifier(UUID.randomUUID())); - - PlayReadyPlayRight playRight = new PlayReadyPlayRight(); - licenseTemplate.setPlayRight(playRight); - - playRight.setAgcAndColorStripeRestriction(new AgcAndColorStripeRestriction((byte) 1)); - playRight.setAllowPassingVideoContentToUnknownOutput(UnknownOutputPassingOption.Allowed); - playRight.setAnalogVideoOpl(100); - playRight.setCompressedDigitalAudioOpl(300); - playRight.setCompressedDigitalVideoOpl(400); - playRight.setExplicitAnalogTelevisionOutputRestriction(new ExplicitAnalogTelevisionRestriction(true, (byte)0)); - playRight.setImageConstraintForAnalogComponentVideoRestriction(true); - playRight.setImageConstraintForAnalogComputerMonitorRestriction(true); - playRight.setScmsRestriction(new ScmsRestriction((byte)2)); - playRight.setUncompressedDigitalAudioOpl(250); - playRight.setUncompressedDigitalVideoOpl(270); - - String result = MediaServicesLicenseTemplateSerializer.serialize(template); - assertNotNull(result); - - PlayReadyLicenseResponseTemplate deserialized = MediaServicesLicenseTemplateSerializer.deserialize(result, schemaFile); - assertNotNull(deserialized); - } - - @Test - public void roundTripTestWithRelativeBeginDateRelativeEndDate() throws Exception { - PlayReadyLicenseResponseTemplate template = new PlayReadyLicenseResponseTemplate(); - template.setResponseCustomData("This is my response custom data"); - PlayReadyLicenseTemplate licenseTemplate = new PlayReadyLicenseTemplate(); - template.getLicenseTemplates().add(licenseTemplate); - - licenseTemplate.setLicenseType(PlayReadyLicenseType.Persistent); - licenseTemplate.setRelativeBeginDate(DatatypeFactory.newInstance().newDuration("PT1H")); - licenseTemplate.setRelativeExpirationDate(DatatypeFactory.newInstance().newDuration("PT1H")); - licenseTemplate.setContentKey(new ContentEncryptionKeyFromKeyIdentifier(UUID.randomUUID())); - - PlayReadyPlayRight playRight = new PlayReadyPlayRight(); - licenseTemplate.setPlayRight(playRight); - - playRight.setAgcAndColorStripeRestriction(new AgcAndColorStripeRestriction((byte) 1)); - playRight.setAllowPassingVideoContentToUnknownOutput(UnknownOutputPassingOption.Allowed); - playRight.setAnalogVideoOpl(100); - playRight.setCompressedDigitalAudioOpl(300); - playRight.setCompressedDigitalVideoOpl(400); - playRight.setExplicitAnalogTelevisionOutputRestriction(new ExplicitAnalogTelevisionRestriction(true, (byte)0)); - playRight.setImageConstraintForAnalogComponentVideoRestriction(true); - playRight.setImageConstraintForAnalogComputerMonitorRestriction(true); - playRight.setScmsRestriction(new ScmsRestriction((byte)2)); - playRight.setUncompressedDigitalAudioOpl(250); - playRight.setUncompressedDigitalVideoOpl(270); - - String result = MediaServicesLicenseTemplateSerializer.serialize(template); - assertNotNull(result); - - PlayReadyLicenseResponseTemplate deserialized = MediaServicesLicenseTemplateSerializer.deserialize(result, schemaFile); - assertNotNull(deserialized); - } - - @Test - public void roundTripTestErrorWithRelativeBeginDateBeginDate() throws Exception { - try { - PlayReadyLicenseResponseTemplate template = new PlayReadyLicenseResponseTemplate(); - template.setResponseCustomData("This is my response custom data"); - PlayReadyLicenseTemplate licenseTemplate = new PlayReadyLicenseTemplate(); - template.getLicenseTemplates().add(licenseTemplate); - - licenseTemplate.setLicenseType(PlayReadyLicenseType.Persistent); - licenseTemplate.setBeginDate(new Date()); - licenseTemplate.setRelativeBeginDate(DatatypeFactory.newInstance().newDuration("PT1H")); - - fail("Should Thrown"); - } catch (IllegalArgumentException e) { - assertTrue(e.getMessage().contains("both")); - } - } - - @Test - public void roundTripTestErrorWithBeginDateRelativeBeginDate() throws Exception { - try { - PlayReadyLicenseResponseTemplate template = new PlayReadyLicenseResponseTemplate(); - template.setResponseCustomData("This is my response custom data"); - PlayReadyLicenseTemplate licenseTemplate = new PlayReadyLicenseTemplate(); - template.getLicenseTemplates().add(licenseTemplate); - - licenseTemplate.setLicenseType(PlayReadyLicenseType.Persistent); - licenseTemplate.setRelativeBeginDate(DatatypeFactory.newInstance().newDuration("PT1H")); - licenseTemplate.setBeginDate(new Date()); - - fail("Should Thrown"); - } catch (IllegalArgumentException e) { - assertTrue(e.getMessage().contains("both")); - } - } - - @Test - public void roundTripTestErrorWithRelativeExpirationDateExpirationDate() throws Exception { - try { - PlayReadyLicenseResponseTemplate template = new PlayReadyLicenseResponseTemplate(); - template.setResponseCustomData("This is my response custom data"); - PlayReadyLicenseTemplate licenseTemplate = new PlayReadyLicenseTemplate(); - template.getLicenseTemplates().add(licenseTemplate); - - licenseTemplate.setLicenseType(PlayReadyLicenseType.Persistent); - licenseTemplate.setExpirationDate(new Date()); - licenseTemplate.setRelativeExpirationDate(DatatypeFactory.newInstance().newDuration("PT1H")); - - fail("Should Thrown"); - } catch (IllegalArgumentException e) { - assertTrue(e.getMessage().contains("both")); - } - } - - @Test - public void roundTripTestErrorWithExpirationDateRelativeExpirationDate() throws Exception { - try { - PlayReadyLicenseResponseTemplate template = new PlayReadyLicenseResponseTemplate(); - template.setResponseCustomData("This is my response custom data"); - PlayReadyLicenseTemplate licenseTemplate = new PlayReadyLicenseTemplate(); - template.getLicenseTemplates().add(licenseTemplate); - - licenseTemplate.setLicenseType(PlayReadyLicenseType.Persistent); - licenseTemplate.setRelativeExpirationDate(DatatypeFactory.newInstance().newDuration("PT1H")); - licenseTemplate.setExpirationDate(new Date()); - - fail("Should Thrown"); - } catch (IllegalArgumentException e) { - assertTrue(e.getMessage().contains("both")); - } - } - - @Test - public void validateNonPersistentLicenseConstraints() throws Exception { - // Arrange - @SuppressWarnings("unused") - String serializedTemplate = null; - Duration durationSanmple = DatatypeFactory.newInstance().newDuration("PT1H"); - PlayReadyLicenseResponseTemplate template = new PlayReadyLicenseResponseTemplate(); - PlayReadyLicenseTemplate licenseTemplate = new PlayReadyLicenseTemplate(); - template.getLicenseTemplates().add(licenseTemplate); - PlayReadyPlayRight playRight = new PlayReadyPlayRight(); - licenseTemplate.setPlayRight(playRight); - // Set as Nonpersistent - licenseTemplate.setLicenseType(PlayReadyLicenseType.Nonpersistent); - - // ACT 1: Make sure we cannot set GracePeriod on a NonPersistent license - try - { - serializedTemplate = MediaServicesLicenseTemplateSerializer.serialize(template); - fail("Expected IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.PLAY_READY_CONTENT_KEY_REQUIRED, e.getMessage()); - licenseTemplate.setContentKey(new ContentEncryptionKeyFromHeader()); - } - - // ACT 2: Make sure we cannot set GracePeriod on a NonPersistent license - licenseTemplate.setGracePeriod(durationSanmple); - try - { - serializedTemplate = MediaServicesLicenseTemplateSerializer.serialize(template); - fail("Expected IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.GRACE_PERIOD_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE, e.getMessage()); - } - - // ACT 3: Make sure we cannot set a FirstPlayExpiration on a NonPersistent license. - licenseTemplate.setGracePeriod(null); - playRight.setFirstPlayExpiration(durationSanmple); - - try - { - serializedTemplate = MediaServicesLicenseTemplateSerializer.serialize(template); - fail("Expected IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.FIRST_PLAY_EXPIRATION_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE, e.getMessage()); - } - - // ACT 4: Make sure we cannot set a BeginDate on a NonPersistent license. - playRight.setFirstPlayExpiration(null); - licenseTemplate.setBeginDate(new Date()); - - try - { - serializedTemplate = MediaServicesLicenseTemplateSerializer.serialize(template); - fail("Expected IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.BEGIN_DATE_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE, e.getMessage()); - } - - // ACT 5: Make sure we cannot set an ExpirationDate on a NonPersistent license. - licenseTemplate.setBeginDate(null); - licenseTemplate.setExpirationDate(new Date()); - - try - { - serializedTemplate = MediaServicesLicenseTemplateSerializer.serialize(template); - fail("Expected IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.EXPIRATION_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE, e.getMessage()); - } - } - - @Test - public void digitalVideoOnlyContentRestrictionAndAllowPassingVideoContentToUnknownOutputMutuallyExclusive() throws Exception { - String serializedTemplate = null; - PlayReadyLicenseResponseTemplate template = new PlayReadyLicenseResponseTemplate(); - PlayReadyLicenseTemplate licenseTemplate = new PlayReadyLicenseTemplate(); - template.getLicenseTemplates().add(licenseTemplate); - // Set as Nonpersistent - licenseTemplate.setLicenseType(PlayReadyLicenseType.Nonpersistent); - licenseTemplate.setContentKey(new ContentEncryptionKeyFromHeader()); - PlayReadyPlayRight playRight = new PlayReadyPlayRight(); - licenseTemplate.setPlayRight(playRight); - - // ACT 1: Make sure we cannot set DigitalVideoOnlyContentRestriction to true if - // UnknownOutputPassingOption.Allowed is set - playRight.setAllowPassingVideoContentToUnknownOutput(UnknownOutputPassingOption.Allowed); - playRight.setDigitalVideoOnlyContentRestriction(true); - try - { - serializedTemplate = MediaServicesLicenseTemplateSerializer.serialize(template); - fail("Expected IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - // ASSERT 1 - assertEquals(ErrorMessages.DIGITAL_VIDEO_ONLY_MUTUALLY_EXCLUSIVE_WITH_PASSING_TO_UNKNOWN_OUTPUT_ERROR, e.getMessage()); - } - - // ACT 2: Make sure we cannot set UnknownOutputPassingOption.AllowedWithVideoConstriction - // if DigitalVideoOnlyContentRestriction is true - playRight.setAllowPassingVideoContentToUnknownOutput(UnknownOutputPassingOption.AllowedWithVideoConstriction); - try - { - serializedTemplate = MediaServicesLicenseTemplateSerializer.serialize(template); - fail("Expected IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - // ASSERT 2 - assertEquals(ErrorMessages.DIGITAL_VIDEO_ONLY_MUTUALLY_EXCLUSIVE_WITH_PASSING_TO_UNKNOWN_OUTPUT_ERROR, e.getMessage()); - } - - // ACT 3: Make sure we can set DigitalVideoOnlyContentRestriction to true if - // UnknownOutputPassingOption.NotAllowed is set - playRight.setAllowPassingVideoContentToUnknownOutput(UnknownOutputPassingOption.NotAllowed); - serializedTemplate = MediaServicesLicenseTemplateSerializer.serialize(template); - - // ASSERT 3 - assertNotNull(serializedTemplate); - assertNotNull(MediaServicesLicenseTemplateSerializer.deserialize(serializedTemplate)); - } - - @Test - public void knownGoodInputTest() throws Exception - { - String serializedTemplate = "<PlayReadyLicenseResponseTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1\"><LicenseTemplates><PlayReadyLicenseTemplate><AllowTestDevices>false</AllowTestDevices><BeginDate i:nil=\"true\" /><ContentKey i:type=\"ContentEncryptionKeyFromHeader\" /><ContentType>Unspecified</ContentType><ExpirationDate i:nil=\"true\" /><LicenseType>Nonpersistent</LicenseType><PlayRight><AgcAndColorStripeRestriction><ConfigurationData>1</ConfigurationData></AgcAndColorStripeRestriction><AllowPassingVideoContentToUnknownOutput>Allowed</AllowPassingVideoContentToUnknownOutput><AnalogVideoOpl>100</AnalogVideoOpl><CompressedDigitalAudioOpl>300</CompressedDigitalAudioOpl><CompressedDigitalVideoOpl>400</CompressedDigitalVideoOpl><DigitalVideoOnlyContentRestriction>false</DigitalVideoOnlyContentRestriction><ExplicitAnalogTelevisionOutputRestriction><BestEffort>true</BestEffort><ConfigurationData>0</ConfigurationData></ExplicitAnalogTelevisionOutputRestriction><ImageConstraintForAnalogComponentVideoRestriction>true</ImageConstraintForAnalogComponentVideoRestriction><ImageConstraintForAnalogComputerMonitorRestriction>true</ImageConstraintForAnalogComputerMonitorRestriction><ScmsRestriction><ConfigurationData>2</ConfigurationData></ScmsRestriction><UncompressedDigitalAudioOpl>250</UncompressedDigitalAudioOpl><UncompressedDigitalVideoOpl>270</UncompressedDigitalVideoOpl></PlayRight></PlayReadyLicenseTemplate></LicenseTemplates><ResponseCustomData>This is my response custom data</ResponseCustomData></PlayReadyLicenseResponseTemplate>"; - - PlayReadyLicenseResponseTemplate responseTemplate2 = MediaServicesLicenseTemplateSerializer.deserialize(serializedTemplate, schemaFile); - assertNotNull(responseTemplate2); - } - - @Test - public void knownGoodInputMinimalLicenseTest() throws Exception - { - String serializedTemplate = "<PlayReadyLicenseResponseTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1\"><LicenseTemplates><PlayReadyLicenseTemplate><ContentKey i:type=\"ContentEncryptionKeyFromHeader\" /><PlayRight /></PlayReadyLicenseTemplate></LicenseTemplates></PlayReadyLicenseResponseTemplate>"; - - PlayReadyLicenseResponseTemplate responseTemplate2 = MediaServicesLicenseTemplateSerializer.deserialize(serializedTemplate, schemaFile); - assertNotNull(responseTemplate2); - } - - @Test - public void inputMissingContentKeyShouldThrowArgumentException() throws Exception - { - String serializedTemplate = "<PlayReadyLicenseResponseTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1\"><LicenseTemplates><PlayReadyLicenseTemplate><PlayRight /></PlayReadyLicenseTemplate></LicenseTemplates></PlayReadyLicenseResponseTemplate>"; - - try - { - MediaServicesLicenseTemplateSerializer.deserialize(serializedTemplate, schemaFile); - fail("Should throw an IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.PLAY_READY_CONTENT_KEY_REQUIRED, e.getMessage()); - } - } - - @Test - public void inputMissingPlayRightShouldThrowArgumentException() throws Exception - { - String serializedTemplate = "<PlayReadyLicenseResponseTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1\"><LicenseTemplates><PlayReadyLicenseTemplate><ContentKey i:type=\"ContentEncryptionKeyFromHeader\" /></PlayReadyLicenseTemplate></LicenseTemplates></PlayReadyLicenseResponseTemplate>"; - - try - { - MediaServicesLicenseTemplateSerializer.deserialize(serializedTemplate, schemaFile); - fail("Should throw an IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.PLAY_READY_PLAY_RIGHT_REQUIRED, e.getMessage()); - } - } - - @Test - public void inputMissingLicenseTemplatesShouldThrowArgumentException() throws Exception - { - String serializedTemplate = "<PlayReadyLicenseResponseTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1\"><LicenseTemplates></LicenseTemplates></PlayReadyLicenseResponseTemplate>"; - - try - { - MediaServicesLicenseTemplateSerializer.deserialize(serializedTemplate, schemaFile); - fail("Should throw an IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.AT_LEAST_ONE_LICENSE_TEMPLATE_REQUIRED, e.getMessage()); - } - } - - @Test - public void ScmsRestrictionConfigurationDataValidationTest() - { - byte[] validConfigurationValues = new byte[] { 0, 1, 2, 3 }; - byte[] invalidConfigurationValues = new byte[] {(byte) 255, (byte) 128, 4, 5, 15}; - - for (byte configurationData : validConfigurationValues) - { - new ScmsRestriction(configurationData); - } - - for (byte configurationData : invalidConfigurationValues) - { - try - { - new ScmsRestriction(configurationData); - fail("Invalid configuration data accepted"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.INVALID_TWO_BIT_CONFIGURATION_DATA, e.getMessage()); - } - } - } - - @Test - public void validateOutputProtectionLevelValueChecks() - { - // From the PlayReady Compliance Rules for issuing PlayReady Licenses. - // - // Table 6.6: Allowed Output Protection Level Values - // - // Field Allowed Values - // - // Minimum Compressed Digital Audio Output Protection Level 100, 150, 200, 250, 300 - // Minimum Uncompressed Digital Audio Output Protection Level 100, 150, 200, 250, 300 - // Minimum Compressed Digital Video Output Protection Level 400, 500 - // Minimum Uncompressed Digital Video Output Protection Level 100, 250, 270, 300 - // Minimum Analog Television Output Protection Level 100, 150, 200 - // - - boolean[] expectedResult = null; - - // First check null, which all of the Opls values support. Setting Opl values is optional - // and null is the way the user signals that they do not want to set a value. - boolean[] currentResult = setOutputProtectionLevelValues(null); - expectedResult = new boolean[] { true, true, true, true, true }; - assertTrue("null result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - - for (int i = 0; i <= 550; i += 10) - { - currentResult = setOutputProtectionLevelValues(i); - - switch (i) - { - case 100: - expectedResult = new boolean[] {true, true, false, true, true }; - assertTrue("100 result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - case 150: - expectedResult = new boolean[] {true, true, false, false, true }; - assertTrue("150 result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - case 200: - expectedResult = new boolean[] {true, true, false, false, true }; - assertTrue("200 result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - case 250: - expectedResult = new boolean[] {true, true, false, true, false }; - assertTrue("250 result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - case 270: - expectedResult = new boolean[] { false, false, false, true, false }; - assertTrue("270 result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - case 300: - expectedResult = new boolean[] { true, true, false, true, false }; - assertTrue("300 result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - case 400: - expectedResult = new boolean[] { false, false, true, false, false }; - assertTrue("400 result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - case 500: - expectedResult = new boolean[] { false, false, true, false, false }; - assertTrue("500 result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - default: - // These values should always return false for all types - expectedResult = new boolean[] { false, false, false, false, false }; - assertTrue("" + i + " result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - } - - } - } - - private boolean[] setOutputProtectionLevelValues(Integer valueToSet) - { - PlayReadyPlayRight playRight = new PlayReadyPlayRight(); - boolean[] returnValue = new boolean[5]; - - try - { - playRight.setCompressedDigitalAudioOpl(valueToSet); - returnValue[0] = true; - } - catch (IllegalArgumentException ae) - { - if (!ae.getMessage().equals(ErrorMessages.COMPRESSED_DIGITAL_AUDIO_OPL_VALUE_ERROR)) { - throw ae; - } - } - - try - { - playRight.setUncompressedDigitalAudioOpl(valueToSet); - returnValue[1] = true; - } - catch (IllegalArgumentException ae) - { - if (!ae.getMessage().equals(ErrorMessages.UNCOMPRESSED_DIGITAL_AUDIO_OPL_VALUE_ERROR)) { - throw ae; - } - } - - try - { - playRight.setCompressedDigitalVideoOpl(valueToSet); - returnValue[2] = true; - } - catch (IllegalArgumentException ae) - { - if (!ae.getMessage().equals(ErrorMessages.COMPRESSED_DIGITAL_VIDEO_OPL_VALUE_ERROR)) { - throw ae; - } - } - - try - { - playRight.setUncompressedDigitalVideoOpl(valueToSet); - returnValue[3] = true; - } - catch (IllegalArgumentException ae) - { - if (!ae.getMessage().equals(ErrorMessages.UNCOMPRESSED_DIGITAL_VIDEO_OPL_VALUE_ERROR)) { - throw ae; - } - } - - try - { - playRight.setAnalogVideoOpl(valueToSet); - returnValue[4] = true; - } - catch (IllegalArgumentException ae) - { - if (!ae.getMessage().equals(ErrorMessages.ANALOG_VIDEO_OPL_VALUE_ERROR)) { - throw ae; - } - } - - return returnValue; - } - -} - diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyContentKeyTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyContentKeyTests.java deleted file mode 100644 index 441e53414fde..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyContentKeyTests.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import static org.junit.Assert.*; - -import java.security.InvalidParameterException; -import java.util.UUID; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ContentEncryptionKeyFromHeader; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ContentEncryptionKeyFromKeyIdentifier; - -public class PlayReadyContentKeyTests { - - @Test - public void InvalidUUIDContentEncryptionKeyFromKeyIdentifierTest() { - // Arrange - UUID invalidUUID = new UUID(0L, 0L); - - // Act - try { - @SuppressWarnings("unused") - ContentEncryptionKeyFromKeyIdentifier contentEncryptionKeyFromKeyIdentifier = - new ContentEncryptionKeyFromKeyIdentifier(invalidUUID); - fail("Should Thrown"); - } catch (InvalidParameterException e) { - assertEquals(e.getMessage(), "keyIdentifier"); - } - } - - @Test - public void ValidUUIDContentEncryptionKeyFromKeyIdentifierTest() { - // Arrange - UUID validUUID = UUID.randomUUID(); - - // Act - ContentEncryptionKeyFromKeyIdentifier contentEncryptionKeyFromKeyIdentifier = - new ContentEncryptionKeyFromKeyIdentifier(validUUID); - UUID resultUUID = contentEncryptionKeyFromKeyIdentifier.getKeyIdentifier(); - - // Assert - assertEquals(resultUUID, validUUID); - } - - @Test - public void GetterSetterUUIDContentEncryptionKeyFromKeyIdentifierTest() { - // Arrange - UUID expectedUUID = UUID.randomUUID(); - - // Act - ContentEncryptionKeyFromKeyIdentifier contentEncryptionKeyFromKeyIdentifier = - new ContentEncryptionKeyFromKeyIdentifier(UUID.randomUUID()); - - contentEncryptionKeyFromKeyIdentifier.setKeyIdentifier(expectedUUID); - UUID resultUUID = contentEncryptionKeyFromKeyIdentifier.getKeyIdentifier(); - - // Assert - assertEquals(resultUUID, expectedUUID); - } - - @Test - public void NewContentEncryptionKeyFromHeaderTest() { - // Arrange - // Act - ContentEncryptionKeyFromHeader contentEncryptionKeyFromHeader = - new ContentEncryptionKeyFromHeader(); - // Assert - assertNotNull(contentEncryptionKeyFromHeader); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseTypeTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseTypeTests.java deleted file mode 100644 index 34d743db8036..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseTypeTests.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import static org.junit.Assert.*; - -import java.security.InvalidParameterException; -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.PlayReadyLicenseType; - -public class PlayReadyLicenseTypeTests { - - @Test - public void valueOfPlayReadyLicenseTypeTestsTests() { - // provides full code coverage - assertEquals(PlayReadyLicenseType.Nonpersistent, PlayReadyLicenseType.valueOf("Nonpersistent")); - assertEquals(PlayReadyLicenseType.Persistent, PlayReadyLicenseType.valueOf("Persistent")); - } - - @Test - public void fromCodeNonpersistentPlayReadyLicenseTypeTest() { - // Arrange - PlayReadyLicenseType expectedPlayReadyLicenseType = PlayReadyLicenseType.Nonpersistent; - - // Act - PlayReadyLicenseType playReadyLicenseType = PlayReadyLicenseType.fromCode(0); - - // Assert - assertEquals(playReadyLicenseType, expectedPlayReadyLicenseType); - } - - @Test - public void fromCodePersistentPlayReadyLicenseTypeTest() { - // Arrange - PlayReadyLicenseType expectedPlayReadyLicenseType = PlayReadyLicenseType.Persistent; - - // Act - PlayReadyLicenseType playReadyLicenseType = PlayReadyLicenseType.fromCode(1); - - // Assert - assertEquals(playReadyLicenseType, expectedPlayReadyLicenseType); - } - - @Test - public void fromCodeInvalidTokenTypeTests() { - // Arrange - int invalidCode = 666; - String expectedMessage = "code"; - // Act - try { - @SuppressWarnings("unused") - PlayReadyLicenseType tokenPlayReadyLicenseType = PlayReadyLicenseType.fromCode(invalidCode); - fail("Should throw"); - } catch (InvalidParameterException e) { - // Assert - assertEquals(e.getMessage(), expectedMessage); - } - } - - @Test - public void getCodePersistentPlayReadyLicenseTypeTests() { - // Arrange - int expectedCode = 1; - - // Act - PlayReadyLicenseType tokenTypeResult = PlayReadyLicenseType.Persistent; - int resultCode = tokenTypeResult.getCode(); - - // Assert - assertEquals(resultCode, expectedCode); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyPlayRightTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyPlayRightTest.java deleted file mode 100644 index 14ac67042de8..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyPlayRightTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import static org.junit.Assert.*; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.AgcAndColorStripeRestriction; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ExplicitAnalogTelevisionRestriction; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.PlayReadyPlayRight; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.UnknownOutputPassingOption; - -public class PlayReadyPlayRightTest { - - @Test - public void RoundTripTest() throws Exception { - // Arrange - PlayReadyPlayRight playRight = new PlayReadyPlayRight(); - // Act - playRight.setAgcAndColorStripeRestriction(new AgcAndColorStripeRestriction((byte) 0)); - playRight.setAllowPassingVideoContentToUnknownOutput(UnknownOutputPassingOption.NotAllowed); - playRight.setAnalogVideoOpl(100); - playRight.setCompressedDigitalAudioOpl(200); - playRight.setCompressedDigitalVideoOpl(400); - playRight.setDigitalVideoOnlyContentRestriction(true); - playRight.setExplicitAnalogTelevisionOutputRestriction(new ExplicitAnalogTelevisionRestriction(true, (byte)0)); - // Test - assertEquals(playRight.getAgcAndColorStripeRestriction().getConfigurationData(), (byte)0); - assertEquals(playRight.getAllowPassingVideoContentToUnknownOutput(), UnknownOutputPassingOption.NotAllowed); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ScmsRestrictionTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ScmsRestrictionTests.java deleted file mode 100644 index c969d03052bc..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ScmsRestrictionTests.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import static org.junit.Assert.*; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ErrorMessages; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ScmsRestriction; - -public class ScmsRestrictionTests { - - @Test - public void NewScmsRestrictionTests() { - // Arrange - byte expectedConfigurationData = 2; - - // Act - ScmsRestriction scmsRestriction = new ScmsRestriction( - expectedConfigurationData); - byte resultConfigurationData = scmsRestriction.getConfigurationData(); - - // Assert - assertEquals(expectedConfigurationData, resultConfigurationData); - } - - @Test - public void BadConfigurationDataScmsRestrictionShouldThrown() { - // Arrange - byte expectedConfigurationData = 4; - - // Act - try { - @SuppressWarnings("unused") - ScmsRestriction scmsRestriction = new ScmsRestriction( - expectedConfigurationData); - fail("Should Thrown"); - - } catch (IllegalArgumentException e) { - // Assert - assertEquals(e.getMessage(), ErrorMessages.INVALID_TWO_BIT_CONFIGURATION_DATA); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/UnknownOutputPassingOptionTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/UnknownOutputPassingOptionTests.java deleted file mode 100644 index 2dfa9f05787a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/UnknownOutputPassingOptionTests.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import static org.junit.Assert.*; - -import java.security.InvalidParameterException; -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.UnknownOutputPassingOption; - -public class UnknownOutputPassingOptionTests { - - @Test - public void valueOfPlayReadyLicenseTypeTestsTests() { - // provides full code coverage - assertEquals(UnknownOutputPassingOption.NotAllowed, UnknownOutputPassingOption.valueOf("NotAllowed")); - assertEquals(UnknownOutputPassingOption.Allowed, UnknownOutputPassingOption.valueOf("Allowed")); - assertEquals(UnknownOutputPassingOption.AllowedWithVideoConstriction, - UnknownOutputPassingOption.valueOf("AllowedWithVideoConstriction")); - } - - @Test - public void fromCodeNotAllowedUnknownOutputPassingOption() { - // Arrange - UnknownOutputPassingOption expectedUnknownOutputPassingOption = UnknownOutputPassingOption.NotAllowed; - - // Act - UnknownOutputPassingOption unknownOutputPassingOptionResult = UnknownOutputPassingOption.fromCode(0); - - // Assert - assertEquals(expectedUnknownOutputPassingOption, unknownOutputPassingOptionResult); - } - - @Test - public void fromCodeAllowedUnknownOutputPassingOptionTests() { - // Arrange - UnknownOutputPassingOption expectedUnknownOutputPassingOption = UnknownOutputPassingOption.Allowed; - - // Act - UnknownOutputPassingOption unknownOutputPassingOptionResult = UnknownOutputPassingOption.fromCode(1); - - // Assert - assertEquals(expectedUnknownOutputPassingOption, unknownOutputPassingOptionResult); - } - - @Test - public void fromCodeAllowedWithVideoConstrictionUnknownOutputPassingOptionTests() { - // Arrange - UnknownOutputPassingOption expectedUnknownOutputPassingOption = UnknownOutputPassingOption.AllowedWithVideoConstriction; - - // Act - UnknownOutputPassingOption unknownOutputPassingOptionResult = UnknownOutputPassingOption.fromCode(2); - - // Assert - assertEquals(expectedUnknownOutputPassingOption, unknownOutputPassingOptionResult); - } - - @Test - public void fromCodeInvalidUnknownOutputPassingOptionTests() { - // Arrange - int invalidCode = 666; - String expectedMessage = "code"; - // Act - try { - @SuppressWarnings("unused") - UnknownOutputPassingOption unknownOutputPassingOptionResult = UnknownOutputPassingOption - .fromCode(invalidCode); - fail("Should throw"); - } catch (InvalidParameterException e) { - // Assert - assertEquals(e.getMessage(), expectedMessage); - } - } - - @Test - public void getCodeJWTTokenTypeTests() { - // Arrange - int expectedCode = 2; - - // Act - UnknownOutputPassingOption unknownOutputPassingOptionResult = UnknownOutputPassingOption.AllowedWithVideoConstriction; - int resultCode = unknownOutputPassingOptionResult.getCode(); - - // Assert - assertEquals(resultCode, expectedCode); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/SymmetricVerificationKeyTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/SymmetricVerificationKeyTests.java deleted file mode 100644 index fe0965a618fb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/SymmetricVerificationKeyTests.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import static org.junit.Assert.*; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction.SymmetricVerificationKey; - -public class SymmetricVerificationKeyTests { - - @Test - public void NewSymmetricVerificationKeyShouldCreateNewKey() { - // Arrange - SymmetricVerificationKey key = new SymmetricVerificationKey(); - - // Act - byte[] resultKey = key.getKeyValue(); - - // Assert - assertNotNull(resultKey); - } - - @Test - public void GetterSetterSymmetricVerificationKey() { - // Arrange - SymmetricVerificationKey key = new SymmetricVerificationKey(); - byte[] keyValue = key.getKeyValue(); - - // Act - SymmetricVerificationKey key2 = new SymmetricVerificationKey(); - key2.setKeyValue(keyValue); - byte[] resultsValue = key2.getKeyValue(); - - // Assert - assertArrayEquals(keyValue, resultsValue); - } - - @Test - public void KeyInConstructorSymmetricVerificationKeyShouldMatch() { - // Arrange - SymmetricVerificationKey key = new SymmetricVerificationKey(); - byte[] keyValue = key.getKeyValue(); - - // Act - SymmetricVerificationKey key2 = new SymmetricVerificationKey(keyValue); - byte[] resultsValue = key2.getKeyValue(); - - // Assert - assertArrayEquals(keyValue, resultsValue); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenClaimTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenClaimTests.java deleted file mode 100644 index 5fb9f9738ee4..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenClaimTests.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import static org.junit.Assert.*; - -import org.junit.Test; - -public class TokenClaimTests { - - @Test - public void defaultConstructorTest() { - // Arrange and Act - TokenClaim value = new TokenClaim(); - // Asset - assertNotNull(value); - } - - @Test - public void constructorTest() { - // Arrange - String expectedType = "type"; - String expectedValue = "value"; - // Act - TokenClaim value = new TokenClaim(expectedType, expectedValue); - - // Assert - assertNotNull(value); - assertEquals(value.getClaimType(), expectedType); - assertEquals(value.getClaimValue(), expectedValue); - } - - @Test - public void nullInConstructorShouldThrownTest() { - // Arrange - String providedType = null; - String expectedValue = "value"; - - // Act - try { - @SuppressWarnings("unused") - TokenClaim value = new TokenClaim(providedType, expectedValue); - fail("Should thrown"); - } catch (NullPointerException e) { - // Assert - assertTrue(e.getMessage().contains("claimType")); - } - } - - @Test - public void staticValuesTest() { - // Arrange - String expectedTokenClaimType = "urn:microsoft:azure:mediaservices:contentkeyidentifier"; - - // Act - String results = TokenClaim.getContentKeyIdentifierClaimType(); - - // Assert - assertEquals(results, expectedTokenClaimType); - } - - @Test - public void staticValues2Test() { - // Arrange - String expectedTokenClaimType = "urn:microsoft:azure:mediaservices:contentkeyidentifier"; - TokenClaim claim = TokenClaim.getContentKeyIdentifierClaim(); - - // Act - String results = claim.getClaimType(); - - // Assert - assertEquals(results, expectedTokenClaimType); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplateSerializerTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplateSerializerTests.java deleted file mode 100644 index 9cae3f6526df..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplateSerializerTests.java +++ /dev/null @@ -1,321 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.net.URI; -import java.net.URISyntaxException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Locale; -import java.util.TimeZone; -import java.util.UUID; - -import javax.xml.bind.JAXBException; - -import org.junit.Test; -import org.xml.sax.SAXException; - -public class TokenRestrictionTemplateSerializerTests { - - private final String schemaFile = TokenRestrictionTemplateSerializerTests.class.getClassLoader().getResource("") - .getPath() + "schemas/TokenRestrictionTemplate.xsd"; - private final String _sampleIssuer = "http://sampleIssuerUrl"; - private final String _sampleAudience = "http://sampleAudience"; - - @Test - public void RoundTripTest() throws JAXBException, URISyntaxException { - TokenRestrictionTemplate template = new TokenRestrictionTemplate(TokenType.SWT); - - template.setPrimaryVerificationKey(new SymmetricVerificationKey()); - template.getAlternateVerificationKeys().add(new SymmetricVerificationKey()); - template.setAudience(new URI(_sampleAudience)); - template.setIssuer(new URI(_sampleIssuer)); - template.getRequiredClaims().add(TokenClaim.getContentKeyIdentifierClaim()); - template.getRequiredClaims().add(new TokenClaim("Rental", "true")); - - String serializedTemplate = TokenRestrictionTemplateSerializer.serialize(template); - assertTrue(serializedTemplate != null && serializedTemplate.length() > 0); - - TokenRestrictionTemplate template2 = TokenRestrictionTemplateSerializer.deserialize(serializedTemplate); - assertNotNull(template2); - assertEquals(template.getIssuer(), template2.getIssuer()); - assertEquals(template.getAudience(), template2.getAudience()); - assertEquals(template.getTokenType(), TokenType.SWT); - SymmetricVerificationKey fromTemplate = (SymmetricVerificationKey) template.getPrimaryVerificationKey(); - SymmetricVerificationKey fromTemplate2 = (SymmetricVerificationKey) template2.getPrimaryVerificationKey(); - - assertArrayEquals(fromTemplate.getKeyValue(), fromTemplate2.getKeyValue()); - } - - @Test - public void KnownGoodInputForSwtOnlyScheme() throws JAXBException { - String tokenTemplate = "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\"><AlternateVerificationKeys><TokenVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>FakeTestKey</KeyValue></TokenVerificationKey></AlternateVerificationKeys><Audience>http://sampleaudience/</Audience><Issuer>http://sampleissuerurl/</Issuer><PrimaryVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>FakeTestKey</KeyValue></PrimaryVerificationKey><RequiredClaims><TokenClaim><ClaimType>urn:microsoft:azure:mediaservices:contentkeyidentifier</ClaimType><ClaimValue i:nil=\"true\" /></TokenClaim><TokenClaim><ClaimType>urn:myservice:claims:rental</ClaimType><ClaimValue>true</ClaimValue></TokenClaim></RequiredClaims></TokenRestrictionTemplate>"; - - TokenRestrictionTemplate template = TokenRestrictionTemplateSerializer.deserialize(tokenTemplate); - assertNotNull(template); - assertEquals(TokenType.SWT, template.getTokenType()); - } - - @Test - public void KnownGoodInputForJWT() throws JAXBException { - String tokenTemplate = "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\"><AlternateVerificationKeys /><Audience>http://sampleissuerurl/</Audience><Issuer>http://sampleaudience/</Issuer><PrimaryVerificationKey i:type=\"X509CertTokenVerificationKey\"><RawBody>MIIDAzCCAeugAwIBAgIQ2cl0q8oGkaFG+ZTZYsilhDANBgkqhkiG9w0BAQ0FADARMQ8wDQYDVQQDEwZDQVJvb3QwHhcNMTQxMjAxMTg0NzI5WhcNMzkxMjMxMjM1OTU5WjARMQ8wDQYDVQQDEwZDQVJvb3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDjgMbtZcLtKNdJXHSGQ7l6xJBtNCVhjF4+BLZq+D2RmubKTAnGXhNGY4FO2LrPjfkWumdnv5DOlFuwHy2qrsZu1TFZxxQzU9/Yp3VAD1Afk7ShUOxniPpIO9vfkUH+FEX1Taq4ncR/TkiwnIZLy+bBa0DlF2MsPGC62KbiN4xJqvSIuecxQvcN8MZ78NDejtj1/XHF7VBmVjWi5B79GpTvY9ap39BU8nM0Q8vWb9DwmpWLz8j7hm25f+8laHIE6U8CpeeD/OrZT8ncCD0hbhR3ZGGoFqJbyv2CLPVGeaIhIxBH41zgrBYR53NjkRLTB4IEUCgeTGvSzweqlb+4totdAgMBAAGjVzBVMA8GA1UdEwEB/wQFMAMBAf8wQgYDVR0BBDswOYAQSHiCUWtQlUe79thqsTDbbqETMBExDzANBgNVBAMTBkNBUm9vdIIQ2cl0q8oGkaFG+ZTZYsilhDANBgkqhkiG9w0BAQ0FAAOCAQEABa/2D+Rxo6tp63sDFRViikNkDa5GFZscQLn4Rm35NmUt35Wc/AugLaTJ7iP5zJTYIBUI9DDhHbgFqmYpW0p14NebJlBzrRFIaoHBOsHhy4VYrxIB8Q/OvSGPgbI2c39ni/odyTYKVtJacxPrIt+MqeiFMjJ19cJSOkKT2AFoPMa/L0++znMcEObSAHYMy1U51J1njpQvNJ+MQiR8y2gvmMbGEcMgicIJxbLB2imqJWCQkFUlsrxwuuzSvNaLkdd/HyhsR1JXc+kOREO8gWjhT6MAdgGKC9+neamR7sqwJHPNfcLYTDFOhi6cJH10z74mU1Xa5uLsX+aZp2YYHUFw4Q==</RawBody></PrimaryVerificationKey><RequiredClaims /><TokenType>JWT</TokenType></TokenRestrictionTemplate>"; - TokenRestrictionTemplate template = TokenRestrictionTemplateSerializer.deserialize(tokenTemplate); - assertNotNull(template); - assertEquals(TokenType.JWT, template.getTokenType()); - } - - @Test - public void KnownGoodInputForSWT() throws JAXBException { - String tokenTemplate = "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\"><AlternateVerificationKeys /><Audience>http://sampleissuerurl/</Audience><Issuer>http://sampleaudience/</Issuer><PrimaryVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>FakeTestKey</KeyValue></PrimaryVerificationKey><RequiredClaims><TokenClaim><ClaimType>urn:microsoft:azure:mediaservices:contentkeyidentifier</ClaimType><ClaimValue i:nil=\"true\" /></TokenClaim><TokenClaim><ClaimType>urn:myservice:claims:rental</ClaimType><ClaimValue>true</ClaimValue></TokenClaim></RequiredClaims><TokenType>SWT</TokenType></TokenRestrictionTemplate>"; - TokenRestrictionTemplate template = TokenRestrictionTemplateSerializer.deserialize(tokenTemplate); - assertNotNull(template); - assertEquals(TokenType.SWT, template.getTokenType()); - } - - @Test - public void InputMissingIssuerShouldThrow() { - String tokenTemplate = "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\"><AlternateVerificationKeys><TokenVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>RmFrZVRlc3RLZXk=</KeyValue></TokenVerificationKey></AlternateVerificationKeys><Audience>http://sampleaudience/</Audience><PrimaryVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>RmFrZVRlc3RLZXk=</KeyValue></PrimaryVerificationKey><RequiredClaims><TokenClaim><ClaimType>urn:microsoft:azure:mediaservices:contentkeyidentifier</ClaimType><ClaimValue i:nil=\"true\" /></TokenClaim><TokenClaim><ClaimType>urn:myservice:claims:rental</ClaimType><ClaimValue>true</ClaimValue></TokenClaim></RequiredClaims></TokenRestrictionTemplate>"; - - try { - @SuppressWarnings("unused") - TokenRestrictionTemplate template = TokenRestrictionTemplateSerializer.deserialize(tokenTemplate, - schemaFile); - fail("Should throw"); - } catch (JAXBException e) { - assertTrue(e.getLinkedException().getMessage().contains("Issuer")); - } catch (SAXException e) { - fail("Invalid Schema"); - } - } - - @Test - public void InputMissingAudienceShouldThrow() { - String tokenTemplate = "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\"><AlternateVerificationKeys><TokenVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>RmFrZVRlc3RLZXk=</KeyValue></TokenVerificationKey></AlternateVerificationKeys><Issuer>http://sampleissuerurl/</Issuer><PrimaryVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>RmFrZVRlc3RLZXk=</KeyValue></PrimaryVerificationKey><RequiredClaims><TokenClaim><ClaimType>urn:microsoft:azure:mediaservices:contentkeyidentifier</ClaimType><ClaimValue i:nil=\"true\" /></TokenClaim><TokenClaim><ClaimType>urn:myservice:claims:rental</ClaimType><ClaimValue>true</ClaimValue></TokenClaim></RequiredClaims></TokenRestrictionTemplate>"; - - try { - @SuppressWarnings("unused") - TokenRestrictionTemplate template = TokenRestrictionTemplateSerializer.deserialize(tokenTemplate, - schemaFile); - fail("Should throw"); - } catch (JAXBException e) { - assertTrue(e.getLinkedException().getMessage().contains("Audience")); - } catch (SAXException e) { - fail("Invalid Schema"); - } - } - - @Test - public void InputMissingPrimaryKeyShouldThrow() { - String tokenTemplate = "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\"><AlternateVerificationKeys><TokenVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>RmFrZVRlc3RLZXk=</KeyValue></TokenVerificationKey></AlternateVerificationKeys><Audience>http://sampleaudience/</Audience><Issuer>http://sampleissuerurl/</Issuer><RequiredClaims><TokenClaim><ClaimType>urn:microsoft:azure:mediaservices:contentkeyidentifier</ClaimType><ClaimValue i:nil=\"true\" /></TokenClaim><TokenClaim><ClaimType>urn:myservice:claims:rental</ClaimType><ClaimValue>true</ClaimValue></TokenClaim></RequiredClaims></TokenRestrictionTemplate>"; - - try { - @SuppressWarnings("unused") - TokenRestrictionTemplate template = TokenRestrictionTemplateSerializer.deserialize(tokenTemplate, - schemaFile); - fail("Should throw"); - } catch (JAXBException e) { - assertTrue(e.getLinkedException().getMessage().contains("PrimaryVerificationKey")); - } catch (SAXException e) { - fail("Invalid Schema"); - } - } - - @Test - public void InputMissingRequiredClaimsOkay() throws JAXBException { - String tokenTemplate = "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\"><AlternateVerificationKeys><TokenVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>FakeTestKey</KeyValue></TokenVerificationKey></AlternateVerificationKeys><Audience>http://sampleaudience/</Audience><Issuer>http://sampleissuerurl/</Issuer><PrimaryVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>FakeTestKey</KeyValue></PrimaryVerificationKey></TokenRestrictionTemplate>"; - - TokenRestrictionTemplate template = TokenRestrictionTemplateSerializer.deserialize(tokenTemplate); - assertNotNull(template); - assertEquals(template.getTokenType(), TokenType.SWT); - } - - @Test - public void knownGoodGenerateTestTokenSWT() throws Exception { - // Arrange - String expectedToken = "urn%3amicrosoft%3aazure%3amediaservices%3acontentkeyidentifier=24734598-f050-4cbb-8b98-2dad6eaa260a&Audience=http%3a%2f%2faudience.com&ExpiresOn=1451606400&Issuer=http%3a%2f%2fissuer.com&HMACSHA256=2XrNjMo1EIZflJOovHxt9dekEhb2DhqG9fU5MjQy9vI%3d"; - byte[] knownSymetricKey = "64bytes6RNhi8EsxcYsdYQ9zpFuNR1Ks9milykbxYWGILaK0LKzd5dCtYonsr456".getBytes(); - UUID knownGuid = UUID.fromString("24734598-f050-4cbb-8b98-2dad6eaa260a"); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH); - sdf.setTimeZone(TimeZone.getTimeZone("UTC")); - Date knownExpireOn = sdf.parse("2016-01-01"); - String knownAudience = "http://audience.com"; - String knownIssuer = "http://issuer.com"; - TokenRestrictionTemplate template = new TokenRestrictionTemplate(TokenType.SWT); - template.setPrimaryVerificationKey(new SymmetricVerificationKey(knownSymetricKey)); - template.setAudience(new URI(knownAudience)); - template.setIssuer(new URI(knownIssuer)); - template.getRequiredClaims().add(TokenClaim.getContentKeyIdentifierClaim()); - - // Act - String resultsToken = TokenRestrictionTemplateSerializer.generateTestToken(template, - template.getPrimaryVerificationKey(), knownGuid, knownExpireOn, null); - - // Assert - assertEquals(expectedToken, resultsToken); - } - - @Test - public void knownGoodGenerateTestTokenJWT() throws Exception { - // Arrange - String expectedToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ1cm46Y29udG9zbyIsInVybjptaWNyb3NvZnQ6YXp1cmU6bWVkaWFzZXJ2aWNlczpjb250ZW50a2V5aWRlbnRpZmllciI6IjA5MTQ0MzVkLTE1MDAtODBjNC02YzJiLWYxZTUyZmRhNDdhZSIsImlzcyI6Imh0dHBzOi8vdHN0LmNvbnRvc28uY29tIiwiZXhwIjoxNDUxNjA2NDAwLCJpYXQiOjE0MjAwNzA0MDB9.Lv3YphKPyakYwcX3CAcA--VKOrvBG0CuAARejz3DDLM"; - byte[] knownSymetricKey = "64bytes6RNhi8EsxcYsdYQ9zpFuNR1Ks9milykbxYWGILaK0LKzd5dCtYonsr456".getBytes(); - String strUuid = "0914435d-1500-80c4-6c2b-f1e52fda47ae"; - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH); - sdf.setTimeZone(TimeZone.getTimeZone("UTC")); - Date notBefore = sdf.parse("2015-01-01"); - Date expires = sdf.parse("2016-01-01"); - String knownAudience = "urn:contoso"; - String knownIssuer = "https://tst.contoso.com"; - TokenRestrictionTemplate template = new TokenRestrictionTemplate(TokenType.JWT); - template.setPrimaryVerificationKey(new SymmetricVerificationKey(knownSymetricKey)); - template.setAudience(new URI(knownAudience)); - template.setIssuer(new URI(knownIssuer)); - template.getRequiredClaims().add(new TokenClaim(TokenClaim.getContentKeyIdentifierClaimType(), strUuid)); - - // Act - String resultsToken = TokenRestrictionTemplateSerializer.generateTestToken(template, null, null, expires, notBefore); - - // Assert - assertEquals(expectedToken, resultsToken); - } - - @Test - public void NullContentKeyIdentifierClaimShouldThrownSWT() throws Exception { - byte[] knownSymetricKey = "64bytes6RNhi8EsxcYsdYQ9zpFuNR1Ks9milykbxYWGILaK0LKzd5dCtYonsr456".getBytes(); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH); - sdf.setTimeZone(TimeZone.getTimeZone("UTC")); - Date knownExpireOn = sdf.parse("2016-01-01"); - String knownAudience = "http://audience.com"; - String knownIssuer = "http://issuer.com"; - TokenRestrictionTemplate template = new TokenRestrictionTemplate(TokenType.SWT); - template.setPrimaryVerificationKey(new SymmetricVerificationKey(knownSymetricKey)); - template.setAudience(new URI(knownAudience)); - template.setIssuer(new URI(knownIssuer)); - template.getRequiredClaims().add(TokenClaim.getContentKeyIdentifierClaim()); - - // Act - try { - TokenRestrictionTemplateSerializer.generateTestToken(template, - template.getPrimaryVerificationKey(), null, knownExpireOn, null); - fail("Null ContentKeyIdentifier Claim Should thrown."); - } catch(IllegalArgumentException e) { - // Assert - assertTrue(e.getMessage().contains("keyIdForContentKeyIdentifierClaim")); - } - } - - @Test - public void NullContentKeyIdentifierClaimShouldThrownJWT() throws Exception { - byte[] knownSymetricKey = "64bytes6RNhi8EsxcYsdYQ9zpFuNR1Ks9milykbxYWGILaK0LKzd5dCtYonsr456".getBytes(); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH); - sdf.setTimeZone(TimeZone.getTimeZone("UTC")); - Date knownExpireOn = sdf.parse("2016-01-01"); - String knownAudience = "http://audience.com"; - String knownIssuer = "http://issuer.com"; - TokenRestrictionTemplate template = new TokenRestrictionTemplate(TokenType.JWT); - template.setPrimaryVerificationKey(new SymmetricVerificationKey(knownSymetricKey)); - template.setAudience(new URI(knownAudience)); - template.setIssuer(new URI(knownIssuer)); - template.getRequiredClaims().add(TokenClaim.getContentKeyIdentifierClaim()); - - // Act - try { - TokenRestrictionTemplateSerializer.generateTestToken(template, - template.getPrimaryVerificationKey(), null, knownExpireOn, null); - fail("Null ContentKeyIdentifier Claim Should thrown."); - } catch(IllegalArgumentException e) { - // Assert - assertTrue(e.getMessage().contains("keyIdForContentKeyIdentifierClaim")); - } - } - - @Test - public void OpenIdDocumentAsVerificationKeyRoundTrip() throws JAXBException, URISyntaxException - { - String openConnectId = "https://openconnectIddiscoveryUri"; - String expectedElement = - "<OpenIdDiscoveryUri>https://openconnectIddiscoveryUri</OpenIdDiscoveryUri>"; - - TokenRestrictionTemplate template = new TokenRestrictionTemplate(TokenType.JWT); - template.setAudience(new URI(_sampleAudience)); - template.setIssuer(new URI(_sampleIssuer)); - OpenIdConnectDiscoveryDocument openId = new OpenIdConnectDiscoveryDocument(); - openId.setOpenIdDiscoveryUri(openConnectId); - template.setOpenIdConnectDiscoveryDocument(openId); - String templateAsString = TokenRestrictionTemplateSerializer.serialize(template); - assertTrue(templateAsString.contains("<PrimaryVerificationKey i:nil=\"true\"/>")); - assertTrue(templateAsString.contains(expectedElement)); - TokenRestrictionTemplate output = TokenRestrictionTemplateSerializer.deserialize(templateAsString); - assertNotNull(output); - assertNotNull(output.getOpenIdConnectDiscoveryDocument()); - assertNull(output.getPrimaryVerificationKey()); - assertTrue(output.getAlternateVerificationKeys().isEmpty()); - assertEquals(output.getOpenIdConnectDiscoveryDocument().getOpenIdDiscoveryUri(), openConnectId); - - } - - @Test - public void TokenRestrictionTemplateSerializeNotPrimaryKeyAndNoOpenConnectIdDocument() throws URISyntaxException - { - TokenRestrictionTemplate template = new TokenRestrictionTemplate(TokenType.JWT); - template.setAudience(new URI(_sampleAudience)); - template.setIssuer(new URI(_sampleIssuer)); - try { - TokenRestrictionTemplateSerializer.serialize(template); - fail(); - } - catch (Exception ex) { - assertEquals("Both PrimaryVerificationKey and OpenIdConnectDiscoveryDocument are null.", ex.getMessage()); - } - } - - @Test - public void InputMissingPrimaryKeyShouldNotThrow() - { - String tokenTemplate = "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\"><AlternateVerificationKeys><TokenVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>FakeTestKey</KeyValue></TokenVerificationKey></AlternateVerificationKeys><Audience>http://sampleaudience/</Audience><Issuer>http://sampleissuerurl/</Issuer><RequiredClaims><TokenClaim><ClaimType>urn:microsoft:azure:mediaservices:contentkeyidentifier</ClaimType><ClaimValue i:nil=\"true\" /></TokenClaim><TokenClaim><ClaimType>urn:myservice:claims:rental</ClaimType><ClaimValue>true</ClaimValue></TokenClaim></RequiredClaims></TokenRestrictionTemplate>"; - try { - TokenRestrictionTemplateSerializer.deserialize(tokenTemplate); - fail(); - } catch (Exception ex) { - assertEquals("Both PrimaryVerificationKey and OpenIdConnectDiscoveryDocument are null.", ex.getMessage()); - } - } - - @Test - public void TokenRestrictionTemplateDeserializeNotAbsoluteDiscoveryUri() - { - String body = - "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\" ><AlternateVerificationKeys /><Audience>http://sampleissuerurl/</Audience><Issuer>http://sampleaudience/</Issuer><OpenIdConnectDiscoveryDocument ><OpenIdDiscoveryUri >RelativeUri</OpenIdDiscoveryUri></OpenIdConnectDiscoveryDocument></TokenRestrictionTemplate>"; - - try - { - TokenRestrictionTemplateSerializer.deserialize(body); - fail(); - } - catch (Exception ex) - { - assertEquals("String representation of OpenIdConnectDiscoveryDocument.OpenIdDiscoveryUri is not valid absolute Uri.", ex.getMessage()); - } - } - - @Test - public void TokenRestrictionTemplateDeserializeNilOpenConnectIdDocumentUriNoPrimaryKey() - { - String body = - "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\" ><AlternateVerificationKeys /><Audience>http://sampleissuerurl/</Audience><Issuer>http://sampleaudience/</Issuer><OpenIdConnectDiscoveryDocument ><OpenIdDiscoveryUri i:nil=\"true\"></OpenIdDiscoveryUri></OpenIdConnectDiscoveryDocument></TokenRestrictionTemplate>"; - try - { - TokenRestrictionTemplateSerializer.deserialize(body); - fail(); - } - catch (Exception ex) - { - assertEquals("OpenIdConnectDiscoveryDocument.OpenIdDiscoveryUri string value is null or empty.", ex.getMessage()); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenTypeTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenTypeTests.java deleted file mode 100644 index b51451310d0e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenTypeTests.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import static org.junit.Assert.*; - -import java.security.InvalidParameterException; -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction.TokenType; - -public class TokenTypeTests { - - @Test - public void valueOfUndefinedTokenTypeTests() { - // provides full code coverage - assertEquals(TokenType.Undefined, TokenType.valueOf("Undefined")); - assertEquals(TokenType.SWT, TokenType.valueOf("SWT")); - assertEquals(TokenType.JWT, TokenType.valueOf("JWT")); - } - - @Test - public void fromCodeUndefinedTokenTypeTests() { - // Arrange - TokenType expectedTokenType = TokenType.Undefined; - - // Act - TokenType tokenTypeResult = TokenType.fromCode(0); - - // Assert - assertEquals(tokenTypeResult, expectedTokenType); - } - - @Test - public void fromCodeSWTTokenTypeTests() { - // Arrange - TokenType expectedTokenType = TokenType.SWT; - - // Act - TokenType tokenTypeResult = TokenType.fromCode(1); - - // Assert - assertEquals(tokenTypeResult, expectedTokenType); - } - - @Test - public void fromCodeJWTTokenTypeTests() { - // Arrange - TokenType expectedTokenType = TokenType.JWT; - - // Act - TokenType tokenTypeResult = TokenType.fromCode(2); - - // Assert - assertEquals(tokenTypeResult, expectedTokenType); - } - - @Test - public void fromCodeInvalidTokenTypeTests() { - // Arrange - int invalidCode = 666; - String expectedMessage = "code"; - // Act - try { - @SuppressWarnings("unused") - TokenType tokenTypeResult = TokenType.fromCode(invalidCode); - fail("Should throw"); - } catch (InvalidParameterException e) { - // Assert - assertEquals(e.getMessage(), expectedMessage); - } - } - - @Test - public void getCodeJWTTokenTypeTests() { - // Arrange - int expectedCode = 2; - - // Act - TokenType tokenTypeResult = TokenType.JWT; - int resultCode = tokenTypeResult.getCode(); - - // Assert - assertEquals(resultCode, expectedCode); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/X509CertTokenVerificationKeyTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/X509CertTokenVerificationKeyTests.java deleted file mode 100644 index 21daf4e1011a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/X509CertTokenVerificationKeyTests.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import static org.junit.Assert.*; - -import java.io.BufferedInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction.X509CertTokenVerificationKey; - -public class X509CertTokenVerificationKeyTests { - - private final URL certFileName = getClass().getResource("/certificate/server.crt"); - - @Test - public void EmptyX509Certificate() { - // Arrange - X509CertTokenVerificationKey certKey = new X509CertTokenVerificationKey(); - - // Act - X509Certificate cert = certKey.getX509Certificate(); - - // Assert - assertNull(cert); - } - - @Test - public void X509CertificateInConstructorShouldExists() throws CertificateException, IOException { - // Arrange - InputStream certFile = certFileName.openStream(); - BufferedInputStream certInStream = new BufferedInputStream(certFile); - X509Certificate cert = (X509Certificate) - CertificateFactory.getInstance("X.509").generateCertificate(certInStream); - - // Act - X509CertTokenVerificationKey certKey = new X509CertTokenVerificationKey(cert); - X509Certificate resultCert = certKey.getX509Certificate(); - - // Assert - assertNotNull(resultCert); - assertEquals(cert, resultCert); - } - - @Test - public void GetterSetterX509Certificate() throws CertificateException, IOException { - // Arrange - InputStream certFile = certFileName.openStream(); - BufferedInputStream certInStream = new BufferedInputStream(certFile); - X509Certificate cert = (X509Certificate) - CertificateFactory.getInstance("X.509").generateCertificate(certInStream); - - // Act - X509CertTokenVerificationKey certKey = new X509CertTokenVerificationKey(); - certKey.setX509Certificate(cert); - X509Certificate resultCert = certKey.getX509Certificate(); - - // Assert - assertNotNull(resultCert); - assertEquals(cert, resultCert); - } - - @Test - public void RawBodyOfX509CertificateShouldMatch() throws CertificateException, IOException { - // Arrange - InputStream certFile = certFileName.openStream(); - BufferedInputStream certInStream = new BufferedInputStream(certFile); - X509Certificate cert = (X509Certificate) - CertificateFactory.getInstance("X.509").generateCertificate(certInStream); - X509CertTokenVerificationKey certKey = new X509CertTokenVerificationKey(cert); - - // Act - byte[] rawBody = certKey.getRawBody(); - X509CertTokenVerificationKey secondCertKey = new X509CertTokenVerificationKey(); - secondCertKey.setRawBody(rawBody); - X509Certificate resultCert = secondCertKey.getX509Certificate(); - - // Assert - assertNotNull(resultCert); - assertEquals(cert, resultCert); - } - - @Test - public void InvalidRawBodyOfX509CertificateShouldNullRawBody() throws CertificateException, IOException { - // Arrange - X509CertTokenVerificationKey certKey = new X509CertTokenVerificationKey(); - - // Act - certKey.setRawBody("invalid rawbody".getBytes()); - byte[] resultRawBody = certKey.getRawBody(); - - // Assert - assertNull(resultRawBody); - } - - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/WidevineMessageSerializerTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/WidevineMessageSerializerTests.java deleted file mode 100644 index e23d2c7d1d0b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/WidevineMessageSerializerTests.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.widevine; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import java.io.IOException; -import java.net.URISyntaxException; -import javax.xml.bind.JAXBException; - -import org.junit.Test; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; - -public class WidevineMessageSerializerTests { - - @Test - public void RoundTripTest() throws JAXBException, URISyntaxException, IOException { - ObjectMapper mapper = new ObjectMapper(); - WidevineMessage message = new WidevineMessage(); - message.setAllowedTrackTypes(AllowedTrackTypes.SD_HD); - ContentKeySpecs ckspecs = new ContentKeySpecs(); - message.setContentKeySpecs(new ContentKeySpecs[] { ckspecs }); - ckspecs.setRequiredOutputProtection(new RequiredOutputProtection()); - ckspecs.getRequiredOutputProtection().setHdcp(Hdcp.HDCP_NONE); - ckspecs.setSecurityLevel(1); - ckspecs.setTrackType("SD"); - message.setPolicyOverrides(new Object() { - public boolean can_play = true; - public boolean can_persist = true; - public boolean can_renew = false; - }); - - String json = mapper.writeValueAsString(message); - - WidevineMessage result = mapper.readValue(json, WidevineMessage.class); - - assertEqualsWidevineMessage(message, result); - } - - @Test - public void FromJsonTest() throws JAXBException, URISyntaxException, JsonProcessingException { - String expected = "{\"allowed_track_types\":\"SD_HD\",\"content_key_specs\":[{\"track_type\":\"SD\",\"key_id\":null,\"security_level\":1,\"required_output_protection\":{\"hdcp\":\"HDCP_NONE\"}}],\"policy_overrides\":{\"can_play\":true,\"can_persist\":true,\"can_renew\":false}}"; - ObjectMapper mapper = new ObjectMapper(); - WidevineMessage message = new WidevineMessage(); - message.setAllowedTrackTypes(AllowedTrackTypes.SD_HD); - ContentKeySpecs ckspecs = new ContentKeySpecs(); - message.setContentKeySpecs(new ContentKeySpecs[] { ckspecs }); - ckspecs.setRequiredOutputProtection(new RequiredOutputProtection()); - ckspecs.getRequiredOutputProtection().setHdcp(Hdcp.HDCP_NONE); - ckspecs.setSecurityLevel(1); - ckspecs.setTrackType("SD"); - message.setPolicyOverrides(new Object() { - public boolean can_play = true; - public boolean can_persist = true; - public boolean can_renew = false; - }); - - String json = mapper.writeValueAsString(message); - - assertEquals(expected, json); - } - - private static void assertEqualsWidevineMessage(WidevineMessage expected, WidevineMessage actual) { - assertEquals(expected.getAllowedTrackTypes(), actual.getAllowedTrackTypes()); - if (expected.getContentKeySpecs() == null) { - assertNull(actual.getContentKeySpecs()); - } else { - assertNotNull(actual.getContentKeySpecs()); - assertEquals(expected.getContentKeySpecs().length, actual.getContentKeySpecs().length); - for (int i = 0; i < expected.getContentKeySpecs().length; i++) { - ContentKeySpecs expectedCks = expected.getContentKeySpecs()[i]; - ContentKeySpecs actualCks = actual.getContentKeySpecs()[i]; - assertEquals(expectedCks.getKeyId(), actualCks.getKeyId()); - assertEquals(expectedCks.getSecurityLevel(), actualCks.getSecurityLevel()); - assertEquals(expectedCks.getTrackType(), actualCks.getTrackType()); - if (expectedCks.getRequiredOutputProtection() != null) { - assertNotNull(actualCks.getRequiredOutputProtection()); - assertEquals(expectedCks.getRequiredOutputProtection().getHdcp(), - actualCks.getRequiredOutputProtection().getHdcp()); - } else { - assertNull(actualCks.getRequiredOutputProtection()); - } - assertEquals(expectedCks.getKeyId(), actualCks.getKeyId()); - } - } - if (expected.getPolicyOverrides() == null) { - assertNull(actual.getPolicyOverrides()); - } else { - assertNotNull(actual.getPolicyOverrides()); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyEntityTest.java deleted file mode 100644 index d875f988d51b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyEntityTest.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.net.URLEncoder; -import java.util.EnumSet; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.implementation.content.AccessPolicyType; - -/** - * Tests for access policy entity - * - */ -public class AccessPolicyEntityTest { - private static final String examplePolicyId = "nb:pid:UUID:c577052a-6c0a-45b0-bf15-3ff3a2a41802"; - private final String expectedUri; - - public AccessPolicyEntityTest() throws Exception { - expectedUri = String.format("AccessPolicies('%s')", - URLEncoder.encode(examplePolicyId, "UTF-8")); - } - - @Test - public void createAccessPolicyProvidesExpectedPayload() throws Exception { - String name = "some Access Policy"; - double duration = 10; - EnumSet<AccessPolicyPermission> permissions = EnumSet.of( - AccessPolicyPermission.READ, AccessPolicyPermission.LIST); - - EntityCreateOperation<AccessPolicyInfo> creator = AccessPolicy.create( - name, duration, permissions); - - AccessPolicyType payload = (AccessPolicyType) creator - .getRequestContents(); - - assertEquals(name, payload.getName()); - assertEquals(duration, payload.getDurationInMinutes(), 0.0); - assertEquals(AccessPolicyPermission.bitsFromPermissions(permissions), - payload.getPermissions().intValue()); - } - - @Test - public void getReturnsExpectedUri() throws Exception { - EntityGetOperation<AccessPolicyInfo> getter = AccessPolicy - .get(examplePolicyId); - - assertEquals(expectedUri, getter.getUri()); - } - - @Test - public void listReturnsExpectedUri() throws Exception { - EntityListOperation<AccessPolicyInfo> lister = AccessPolicy.list(); - - assertEquals("AccessPolicies", lister.getUri()); - } - - @Test - public void listWithQueryParametersReturnsThem() throws Exception { - EntityListOperation<AccessPolicyInfo> lister = AccessPolicy.list() - .setTop(10).setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void deleteReturnsExpectedUri() throws Exception { - assertEquals(expectedUri, AccessPolicy.delete(examplePolicyId).getUri()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyInfoTest.java deleted file mode 100644 index 07732ab7cc13..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyInfoTest.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; -import java.util.EnumSet; - -import org.junit.Assert; -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.AccessPolicyType; - -public class AccessPolicyInfoTest { - - @Test - public void getSetId() { - String expected = "expectedId"; - - AccessPolicyInfo policy = new AccessPolicyInfo(null, - new AccessPolicyType().setId(expected)); - - String actual = policy.getId(); - - Assert.assertEquals(expected, actual); - } - - @Test - public void getSetCreated() { - Date expected = new Date(); - AccessPolicyInfo policy = new AccessPolicyInfo(null, - new AccessPolicyType().setCreated(expected)); - - Date actual = policy.getCreated(); - - Assert.assertEquals(expected, actual); - } - - @Test - public void getSetLastModified() { - Date expected = new Date(); - AccessPolicyInfo policy = new AccessPolicyInfo(null, - new AccessPolicyType().setLastModified(expected)); - - Date actual = policy.getLastModified(); - - Assert.assertEquals(expected, actual); - } - - @Test - public void getSetName() { - String expected = "policy name goes here"; - AccessPolicyInfo policy = new AccessPolicyInfo(null, - new AccessPolicyType().setName(expected)); - - String actual = policy.getName(); - - Assert.assertEquals(expected, actual); - } - - @Test - public void getSetDurationInMinutes() { - double expected = 60; // arbitrary value - AccessPolicyInfo policy = new AccessPolicyInfo(null, - new AccessPolicyType().setDurationInMinutes(expected)); - - double actual = policy.getDurationInMinutes(); - - Assert.assertEquals(expected, actual, 0.0); - } - - @Test - public void getSetPermissions() { - EnumSet<AccessPolicyPermission> expected = EnumSet.of( - AccessPolicyPermission.LIST, AccessPolicyPermission.WRITE); - AccessPolicyInfo policy = new AccessPolicyInfo(null, - new AccessPolicyType().setPermissions(AccessPolicyPermission - .bitsFromPermissions(expected))); - - EnumSet<AccessPolicyPermission> actual = policy.getPermissions(); - - Assert.assertEquals(expected, actual); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyPermissionTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyPermissionTest.java deleted file mode 100644 index f9134fb1eac2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyPermissionTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import java.util.EnumSet; - -import org.junit.Test; - -public class AccessPolicyPermissionTest { - - @Test - public void testGetFlagValue() { - assertEquals(0, AccessPolicyPermission.NONE.getFlagValue()); - assertEquals(1, AccessPolicyPermission.READ.getFlagValue()); - assertEquals(2, AccessPolicyPermission.WRITE.getFlagValue()); - assertEquals(4, AccessPolicyPermission.DELETE.getFlagValue()); - assertEquals(8, AccessPolicyPermission.LIST.getFlagValue()); - } - - @Test - public void testZeroResultsInNonePermission() { - EnumSet<AccessPolicyPermission> perms = AccessPolicyPermission - .permissionsFromBits(0); - assertTrue(perms.contains(AccessPolicyPermission.NONE)); - } - - @Test - public void testAllBitsSetResultsInAllPermissions() { - EnumSet<AccessPolicyPermission> perms = AccessPolicyPermission - .permissionsFromBits(1 + 2 + 4 + 8); - - assertFalse(perms.contains(AccessPolicyPermission.NONE)); - assertTrue(perms.contains(AccessPolicyPermission.READ)); - assertTrue(perms.contains(AccessPolicyPermission.WRITE)); - assertTrue(perms.contains(AccessPolicyPermission.DELETE)); - assertTrue(perms.contains(AccessPolicyPermission.LIST)); - } - - @Test - public void testWriteBitsResultsInOnlyWritePermissions() { - EnumSet<AccessPolicyPermission> perms = AccessPolicyPermission - .permissionsFromBits(2); - - assertFalse(perms.contains(AccessPolicyPermission.NONE)); - assertFalse(perms.contains(AccessPolicyPermission.READ)); - assertTrue(perms.contains(AccessPolicyPermission.WRITE)); - assertFalse(perms.contains(AccessPolicyPermission.DELETE)); - assertFalse(perms.contains(AccessPolicyPermission.LIST)); - } - - @Test - public void testEmptyPermissionsResultsInZeroBits() { - EnumSet<AccessPolicyPermission> perms = EnumSet - .noneOf(AccessPolicyPermission.class); - int bits = AccessPolicyPermission.bitsFromPermissions(perms); - - assertEquals(0, bits); - } - - @Test - public void allPermissionsInSetResultsInCorrectValue() { - EnumSet<AccessPolicyPermission> perms = EnumSet.of( - AccessPolicyPermission.READ, AccessPolicyPermission.WRITE, - AccessPolicyPermission.DELETE, AccessPolicyPermission.LIST, - AccessPolicyPermission.NONE); - int bits = AccessPolicyPermission.bitsFromPermissions(perms); - - assertEquals(1 + 2 + 4 + 8, bits); - } - - @Test - public void writePermissionsInSetResultsInCorrectValue() { - EnumSet<AccessPolicyPermission> perms = EnumSet - .of(AccessPolicyPermission.WRITE); - int bits = AccessPolicyPermission.bitsFromPermissions(perms); - - assertEquals(2, bits); - } - - @Test - public void unknownPermissionBitsAreIgnored() { - EnumSet<AccessPolicyPermission> perms = AccessPolicyPermission - .permissionsFromBits(16 + 32); - - assertTrue(perms.contains(AccessPolicyPermission.NONE)); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyEntityTest.java deleted file mode 100644 index ce801b584bee..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyEntityTest.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import java.io.StringReader; -import java.io.StringWriter; -import java.util.Date; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; -import javax.xml.namespace.QName; -import javax.xml.transform.stream.StreamSource; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.AssetDeliveryPolicyRestType; - -/** - * Tests for access policy entity - * - */ -public class AssetDeliveryPolicyEntityTest { - - private final String sampleAdpId = "nb:adpid:UUID:92b0f6ba-3c9f-49b6-a5fa-2a8703b04ecd"; - - public AssetDeliveryPolicyEntityTest() throws Exception { - } - - @Test - public void restTypeRoundTripTest() throws Exception { - // Arrange - String expectedName = "restTypeRoundTripTest"; - String expectedEnvelopeBaseKeyAcquisitionUrl = "expectedEnvelopeBaseKeyAcquisitionUrl"; - String expectedEnvelopeEncryptionIV = "expectedEnvelopeEncryptionIV"; - String expectedEnvelopeEncryptionIVAsBase64 = "expectedEnvelopeEncryptionIVAsBase64"; - String expectedEnvelopeKeyAcquisitionUrl = "expectedEnvelopeKeyAcquisitionUrl"; - String expectedPlayReadyCustomAttributes = "expectedPlayReadyCustomAttributes"; - String expectedPlayReadyLicenseAcquisitionUrl = "expectedPlayReadyLicenseAcquisitionUrl"; - AssetDeliveryPolicyType expectedAssetDeliveryPolicyType = AssetDeliveryPolicyType.DynamicCommonEncryption; - Date expectedDate = new Date(); - AssetDeliveryPolicyRestType adp = new AssetDeliveryPolicyRestType(); - adp.setId(sampleAdpId); - adp.setCreated(expectedDate); - adp.setName(expectedName); - adp.setAssetDeliveryProtocol(AssetDeliveryProtocol.bitsFromProtocols(EnumSet.of(AssetDeliveryProtocol.Dash, AssetDeliveryProtocol.Hds, AssetDeliveryProtocol.HLS, AssetDeliveryProtocol.SmoothStreaming))); - Map<AssetDeliveryPolicyConfigurationKey, String> assetDeliveryConfiguration - = new HashMap<AssetDeliveryPolicyConfigurationKey, String>(); - assetDeliveryConfiguration.put(AssetDeliveryPolicyConfigurationKey.EnvelopeBaseKeyAcquisitionUrl, expectedEnvelopeBaseKeyAcquisitionUrl); - assetDeliveryConfiguration.put(AssetDeliveryPolicyConfigurationKey.EnvelopeEncryptionIV, expectedEnvelopeEncryptionIV); - assetDeliveryConfiguration.put(AssetDeliveryPolicyConfigurationKey.EnvelopeEncryptionIVAsBase64, expectedEnvelopeEncryptionIVAsBase64); - assetDeliveryConfiguration.put(AssetDeliveryPolicyConfigurationKey.EnvelopeKeyAcquisitionUrl, expectedEnvelopeKeyAcquisitionUrl); - assetDeliveryConfiguration.put(AssetDeliveryPolicyConfigurationKey.PlayReadyCustomAttributes, expectedPlayReadyCustomAttributes); - assetDeliveryConfiguration.put(AssetDeliveryPolicyConfigurationKey.PlayReadyLicenseAcquisitionUrl, expectedPlayReadyLicenseAcquisitionUrl); - adp.setAssetDeliveryConfiguration(assetDeliveryConfiguration); - adp.setAssetDeliveryPolicyType(expectedAssetDeliveryPolicyType.getCode()); - - JAXBContext context = JAXBContext.newInstance(AssetDeliveryPolicyRestType.class); - JAXBContext context2 = JAXBContext.newInstance(AssetDeliveryPolicyRestType.class); - Marshaller marshaller = context.createMarshaller(); - Unmarshaller unmarshaller = context2.createUnmarshaller(); - StringWriter writer = new StringWriter(); - QName qName = new QName("test.schema", "AssetDeliveryPolicyRestType"); - JAXBElement<AssetDeliveryPolicyRestType> root = new JAXBElement<AssetDeliveryPolicyRestType>(qName, AssetDeliveryPolicyRestType.class, adp); - // Act - marshaller.marshal(root, writer); - String xml = writer.toString(); - - JAXBElement<AssetDeliveryPolicyRestType> root2 = (JAXBElement<AssetDeliveryPolicyRestType>) unmarshaller.unmarshal(new StreamSource(new StringReader(xml)), AssetDeliveryPolicyRestType.class); - AssetDeliveryPolicyRestType results = root2.getValue(); - - // Assert - assertNotNull(results); - Map<AssetDeliveryPolicyConfigurationKey, String> resultADC = results.getAssetDeliveryConfiguration(); - assertEquals(resultADC.get(AssetDeliveryPolicyConfigurationKey.EnvelopeBaseKeyAcquisitionUrl), expectedEnvelopeBaseKeyAcquisitionUrl); - assertEquals(resultADC.get(AssetDeliveryPolicyConfigurationKey.EnvelopeEncryptionIV), expectedEnvelopeEncryptionIV); - assertEquals(resultADC.get(AssetDeliveryPolicyConfigurationKey.EnvelopeEncryptionIVAsBase64), expectedEnvelopeEncryptionIVAsBase64); - assertEquals(resultADC.get(AssetDeliveryPolicyConfigurationKey.EnvelopeKeyAcquisitionUrl), expectedEnvelopeKeyAcquisitionUrl); - assertEquals(resultADC.get(AssetDeliveryPolicyConfigurationKey.PlayReadyCustomAttributes), expectedPlayReadyCustomAttributes); - assertEquals(resultADC.get(AssetDeliveryPolicyConfigurationKey.PlayReadyLicenseAcquisitionUrl), expectedPlayReadyLicenseAcquisitionUrl); - assertEquals(results.getAssetDeliveryPolicyType().intValue(), expectedAssetDeliveryPolicyType.getCode()); - assertEquals(results.getCreated(), expectedDate); - assertEquals(results.getName(), expectedName); - assertEquals(results.getId(), sampleAdpId); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetEntityTest.java deleted file mode 100644 index aa72b1811cfd..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetEntityTest.java +++ /dev/null @@ -1,207 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import java.net.URLEncoder; - -import javax.xml.bind.JAXBElement; -import javax.xml.namespace.QName; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.atom.LinkType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; -import com.microsoft.windowsazure.services.media.implementation.content.Constants; -import com.microsoft.windowsazure.services.media.implementation.content.JobType; - -/** - * Tests for the methods and factories of the Asset entity. - */ -public class AssetEntityTest { - static final String sampleAssetId = "nb:cid:UUID:1151b8bd-9ada-4e7f-9787-8dfa49968eab"; - private final String expectedUri = String.format("Assets('%s')", - URLEncoder.encode(sampleAssetId, "UTF-8")); - - public AssetEntityTest() throws Exception { - } - - @Test - public void assetCreateReturnsDefaultCreatePayload() { - AssetType payload = (AssetType) Asset.create().getRequestContents(); - - assertNotNull(payload); - assertNull(payload.getId()); - assertNull(payload.getState()); - assertNull(payload.getCreated()); - assertNull(payload.getLastModified()); - assertNull(payload.getAlternateId()); - assertNull(payload.getName()); - assertNull(payload.getOptions()); - } - - @Test - public void assetCreateCanSetAssetName() { - String name = "assetCreateCanSetAssetName"; - - Asset.Creator creator = Asset.create().setName( - "assetCreateCanSetAssetName"); - - AssetType payload = (AssetType) creator.getRequestContents(); - - assertNotNull(payload); - assertNull(payload.getId()); - assertNull(payload.getState()); - assertNull(payload.getCreated()); - assertNull(payload.getLastModified()); - assertNull(payload.getAlternateId()); - assertEquals(name, payload.getName()); - assertNull(payload.getOptions()); - } - - @Test - public void assetGetReturnsExpectedUri() throws Exception { - String expectedUri = String.format("Assets('%s')", - URLEncoder.encode(sampleAssetId, "UTF-8")); - - EntityGetOperation<AssetInfo> getter = Asset.get(sampleAssetId); - - assertEquals(expectedUri, getter.getUri()); - } - - @Test - public void assetListReturnsExpectedUri() { - EntityListOperation<AssetInfo> lister = Asset.list(); - - assertEquals("Assets", lister.getUri()); - assertNotNull(lister.getQueryParameters()); - assertEquals(0, lister.getQueryParameters().size()); - } - - @Test - public void assetListCanTakeQueryParameters() { - EntityListOperation<AssetInfo> lister = Asset.list().setTop(10) - .setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void assetListCanTakeQueryParametersChained() { - EntityListOperation<AssetInfo> lister = Asset.list().setTop(10) - .setSkip(2).set("filter", "something"); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals("something", lister.getQueryParameters() - .getFirst("filter")); - assertEquals(3, lister.getQueryParameters().size()); - } - - @Test - public void assetUpdateReturnsExpectedUri() throws Exception { - EntityUpdateOperation updater = Asset.update(sampleAssetId); - assertEquals(expectedUri, updater.getUri()); - } - - @Test - public void assetUpdateCanSetNameAndAltId() throws Exception { - - String expectedName = "newAssetName"; - String expectedAltId = "newAltId"; - - EntityUpdateOperation updater = Asset.update(sampleAssetId) - .setName(expectedName).setAlternateId(expectedAltId); - - AssetType payload = (AssetType) updater.getRequestContents(); - - assertEquals(expectedName, payload.getName()); - assertEquals(expectedAltId, payload.getAlternateId()); - } - - @Test - public void assetDeleteReturnsExpectedUri() throws Exception { - EntityDeleteOperation deleter = Asset.delete(sampleAssetId); - - assertEquals(expectedUri, deleter.getUri()); - } - - private static final String expectedOutputAsset = "Job(someJobId)/OutputAssets"; - private static final String expectedInputAsset = "Job(someJobId)/InputAssets"; - - @Test - public void listForLinkReturnsExpectedUri() throws Exception { - JobInfo fakeJob = createJob(); - - EntityListOperation<AssetInfo> lister = Asset.list(fakeJob - .getInputAssetsLink()); - - assertEquals(lister.getUri(), expectedInputAsset); - } - - private JobInfo createJob() { - EntryType fakeJobEntry = new EntryType(); - addEntryLink(fakeJobEntry, Constants.ODATA_DATA_NS - + "/related/OutputMediaAssets", expectedOutputAsset, - "application/atom+xml;type=feed", "OutputAssets"); - addEntryLink(fakeJobEntry, Constants.ODATA_DATA_NS - + "/related/InputMediaAssets", expectedInputAsset, - "application/atom+xml;type=feed", "InputAssets"); - - JobType payload = new JobType().setId("SomeId").setName("FakeJob"); - addEntryContent(fakeJobEntry, payload); - - return new JobInfo(fakeJobEntry, payload); - } - - private void addEntryLink(EntryType entry, String rel, String href, - String type, String title) { - LinkType link = new LinkType(); - link.setRel(rel); - link.setHref(href); - link.setType(type); - link.setTitle(title); - - JAXBElement<LinkType> linkElement = new JAXBElement<LinkType>( - new QName("link", Constants.ATOM_NS), LinkType.class, link); - entry.getEntryChildren().add(linkElement); - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - private ContentType addEntryContent(EntryType entry, Object content) { - ContentType contentWrapper = new ContentType(); - contentWrapper.getContent().add( - new JAXBElement(Constants.ODATA_PROPERTIES_ELEMENT_NAME, - content.getClass(), content)); - - entry.getEntryChildren().add( - new JAXBElement<ContentType>( - Constants.ATOM_CONTENT_ELEMENT_NAME, ContentType.class, - contentWrapper)); - return contentWrapper; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileEntityTest.java deleted file mode 100644 index 5ec2a9ec5579..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileEntityTest.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.entityoperations.EntityActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.AssetFileType; - -public class AssetFileEntityTest { - private final String exampleAssetId = "nb:cid:UUID:bfe1c840-36c3-4a78-9b63-38e6eebd94c2"; - private final String exampleFileId = "nb:cid:UUID:49a229ad-8cc5-470f-9e0b-11838283aa58"; - private final String encodedAssetId = "'nb%3Acid%3AUUID%3Abfe1c840-36c3-4a78-9b63-38e6eebd94c2'"; - private final String encodedFileId = "'nb%3Acid%3AUUID%3A49a229ad-8cc5-470f-9e0b-11838283aa58'"; - - public AssetFileEntityTest() throws Exception { - - } - - @Test - public void createFileInfosHasExpectedUri() throws Exception { - EntityActionOperation action = AssetFile - .createFileInfos(exampleAssetId); - - assertEquals("CreateFileInfos", action.getUri()); - assertEquals(encodedAssetId, - action.getQueryParameters().getFirst("assetid")); - } - - @Test - public void createWithOptionsSetsOptionsAsExpected() throws Exception { - String expectedName = "newFile.mp4"; - Long expectedSize = 65432L; - String expectedChecksum = "check"; - String expectedEncryptionKey = "ooh, secret!"; - String expectedEncryptionScheme = "scheme"; - String expectedEncryptionVersion = "some version"; - String expectedInitializationVector = "cross product"; - Boolean expectedIsEncrypted = true; - Boolean expectedIsPrimary = true; - String expectedMimeType = "application/octet-stream"; - - EntityCreateOperation<AssetFileInfo> creator = AssetFile - .create(exampleAssetId, expectedName) - .setContentChecksum(expectedChecksum) - .setContentFileSize(expectedSize) - .setEncryptionKeyId(expectedEncryptionKey) - .setEncryptionScheme(expectedEncryptionScheme) - .setEncryptionVersion(expectedEncryptionVersion) - .setInitializationVector(expectedInitializationVector) - .setIsEncrypted(expectedIsEncrypted) - .setIsPrimary(expectedIsPrimary).setMimeType(expectedMimeType); - - AssetFileType payload = (AssetFileType) creator.getRequestContents(); - - assertEquals(expectedName, payload.getName()); - assertEquals(exampleAssetId, payload.getParentAssetId()); - assertEquals(expectedSize, payload.getContentFileSize()); - assertEquals(expectedChecksum, payload.getContentChecksum()); - assertEquals(expectedEncryptionKey, payload.getEncryptionKeyId()); - assertEquals(expectedEncryptionScheme, payload.getEncryptionScheme()); - assertEquals(expectedEncryptionVersion, payload.getEncryptionVersion()); - assertEquals(expectedInitializationVector, - payload.getInitializationVector()); - assertEquals(expectedIsEncrypted, payload.getIsEncrypted()); - assertEquals(expectedIsPrimary, payload.getIsPrimary()); - assertEquals(expectedMimeType, payload.getMimeType()); - assertNull(payload.getCreated()); - assertNull(payload.getLastModified()); - } - - @Test - public void getByIdHasCorrectUri() throws Exception { - String expectedUri = String.format("Files(%s)", encodedFileId); - EntityGetOperation<AssetFileInfo> getter = AssetFile.get(exampleFileId); - - assertEquals(expectedUri, getter.getUri()); - } - - @Test - public void listAllFileInfosHasCorrectUri() throws Exception { - String expectedUri = "Files"; - EntityListOperation<AssetFileInfo> lister = AssetFile.list(); - assertEquals(expectedUri, lister.getUri()); - } - - @Test - public void updateWithAllOptionsHasCorrectPayload() throws Exception { - Long expectedSize = 65432L; - String expectedChecksum = "check"; - String expectedEncryptionKey = "ooh, secret!"; - String expectedEncryptionScheme = "scheme"; - String expectedEncryptionVersion = "some version"; - String expectedInitializationVector = "cross product"; - Boolean expectedIsEncrypted = true; - Boolean expectedIsPrimary = true; - String expectedMimeType = "application/octet-stream"; - - EntityUpdateOperation updater = AssetFile.update(exampleFileId) - .setContentChecksum(expectedChecksum) - .setContentFileSize(expectedSize) - .setEncryptionKeyId(expectedEncryptionKey) - .setEncryptionScheme(expectedEncryptionScheme) - .setEncryptionVersion(expectedEncryptionVersion) - .setInitializationVector(expectedInitializationVector) - .setIsEncrypted(expectedIsEncrypted) - .setIsPrimary(expectedIsPrimary).setMimeType(expectedMimeType); - - AssetFileType payload = (AssetFileType) updater.getRequestContents(); - - assertNull(payload.getName()); - assertNull(payload.getId()); - assertNull(payload.getParentAssetId()); - assertEquals(expectedSize, payload.getContentFileSize()); - assertEquals(expectedChecksum, payload.getContentChecksum()); - assertEquals(expectedEncryptionKey, payload.getEncryptionKeyId()); - assertEquals(expectedEncryptionScheme, payload.getEncryptionScheme()); - assertEquals(expectedEncryptionVersion, payload.getEncryptionVersion()); - assertEquals(expectedInitializationVector, - payload.getInitializationVector()); - assertEquals(expectedIsEncrypted, payload.getIsEncrypted()); - assertEquals(expectedIsPrimary, payload.getIsPrimary()); - assertEquals(expectedMimeType, payload.getMimeType()); - assertNull(payload.getCreated()); - assertNull(payload.getLastModified()); - } - - @Test - public void deleteHasCorrectUri() throws Exception { - String expectedUri = String.format("Files(%s)", encodedFileId); - EntityDeleteOperation deleter = AssetFile.delete(exampleFileId); - - assertEquals(expectedUri, deleter.getUri()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileInfoTest.java deleted file mode 100644 index 568b6bc70f8c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileInfoTest.java +++ /dev/null @@ -1,199 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.util.Date; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.AssetFileType; - -public class AssetFileInfoTest { - - @Test - public void testGetSetId() { - String expectedId = "testId"; - AssetFileInfo file = new AssetFileInfo(null, - new AssetFileType().setId(expectedId)); - - String actualId = file.getId(); - - // Assert - assertEquals(expectedId, actualId); - } - - @Test - public void testGetSetName() { - String expectedName = "testName"; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setName(expectedName)); - - String actualName = fileInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } - - @Test - public void testGetSetContentFileSize() { - // Arrange - Long expectedContentFileSize = 1234l; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setContentFileSize(expectedContentFileSize)); - - // Act - long actualContentFileSize = fileInfo.getContentFileSize(); - - // Assert - assertEquals(expectedContentFileSize.longValue(), actualContentFileSize); - - } - - @Test - public void testGetSetParentAssetId() { - String expectedParentAssetId = "testParentAssetId"; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setParentAssetId(expectedParentAssetId)); - - String actualParentAssetId = fileInfo.getParentAssetId(); - - assertEquals(expectedParentAssetId, actualParentAssetId); - } - - @Test - public void testGetSetEncryptionVersion() { - String expectedEncryptionVersion = "testEncryptionVersion"; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType() - .setEncryptionVersion(expectedEncryptionVersion)); - - String actualEncryptionVersion = fileInfo.getEncryptionVersion(); - - assertEquals(expectedEncryptionVersion, actualEncryptionVersion); - } - - @Test - public void testGetSetEncryptionScheme() { - // Arrange - String expectedEncryptionScheme = "testEncryptionScheme"; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType() - .setEncryptionScheme(expectedEncryptionScheme)); - - // Act - String actualEncryptionScheme = fileInfo.getEncryptionScheme(); - - // Assert - assertEquals(expectedEncryptionScheme, actualEncryptionScheme); - } - - @Test - public void testGetSetIsEncrypted() { - // Arrange - Boolean expectedIsEncrypted = true; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setIsEncrypted(expectedIsEncrypted)); - - // Act - Boolean actualIsEncrypted = fileInfo.getIsEncrypted(); - - // Assert - assertEquals(expectedIsEncrypted, actualIsEncrypted); - } - - @Test - public void testGetSetEncryptionKeyId() { - String expectedEncryptionKeyId = "testEncryptionKeyId"; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setEncryptionKeyId(expectedEncryptionKeyId)); - - String actualEncryptionKeyId = fileInfo.getEncryptionKeyId(); - - assertEquals(expectedEncryptionKeyId, actualEncryptionKeyId); - } - - @Test - public void testGetSetInitializationVector() { - String expectedInitializationVector = "testInitializationVector"; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType() - .setInitializationVector(expectedInitializationVector)); - - String actualInitializationVector = fileInfo.getInitializationVector(); - - assertEquals(expectedInitializationVector, actualInitializationVector); - - } - - @Test - public void testGetSetIsPrimary() { - // Arrange - Boolean expectedIsPrimary = true; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setIsPrimary(expectedIsPrimary)); - - // Act - Boolean actualIsPrimary = fileInfo.getIsPrimary(); - - // Assert - assertEquals(expectedIsPrimary, actualIsPrimary); - } - - @Test - public void testGetSetLastModified() { - Date expectedLastModified = new Date(); - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setLastModified(expectedLastModified)); - - Date actualLastModified = fileInfo.getLastModified(); - - assertEquals(expectedLastModified, actualLastModified); - } - - @Test - public void testGetSetCreated() { - Date expectedCreated = new Date(); - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setCreated(expectedCreated)); - - Date actualCreated = fileInfo.getCreated(); - - assertEquals(expectedCreated, actualCreated); - } - - @Test - public void testGetSetMimeType() { - String expectedMimeType = "testMimeType"; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setMimeType(expectedMimeType)); - - String actualMimeType = fileInfo.getMimeType(); - - assertEquals(expectedMimeType, actualMimeType); - } - - @Test - public void testGetSetContentChecksum() { - String expectedContentChecksum = "testContentChecksum"; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setContentChecksum(expectedContentChecksum)); - - String actualContentChecksum = fileInfo.getContentChecksum(); - - assertEquals(expectedContentChecksum, actualContentChecksum); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetInfoTest.java deleted file mode 100644 index 6c7e0b1f3f47..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetInfoTest.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.util.Date; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; - -public class AssetInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "expectedId"; - AssetInfo assetInfo = new AssetInfo(null, - new AssetType().setId(expectedId)); - - // Act - String actualId = assetInfo.getId(); - - // Assert - assertEquals(expectedId, actualId); - - } - - @Test - public void testGetSetState() { - // Arrange - AssetState expectedState = AssetState.Published; - AssetInfo assetInfo = new AssetInfo(null, - new AssetType().setState(expectedState.getCode())); - - // Act - AssetState actualState = assetInfo.getState(); - - // Assert - assertEquals(expectedState, actualState); - } - - @Test - public void testGetSetCreated() throws Exception { - // Arrange - Date expectedCreated = new Date(); - - AssetInfo assetInfo = new AssetInfo(null, - new AssetType().setCreated(expectedCreated)); - - // Act - Date actualCreated = assetInfo.getCreated(); - - // Assert - assertEquals(expectedCreated, actualCreated); - - } - - @Test - public void testGetSetLastModified() throws Exception { - // Arrange - Date expectedLastModified = new Date(); - AssetInfo assetInfo = new AssetInfo(null, - new AssetType().setLastModified(expectedLastModified)); - - // Act - Date actualLastModified = assetInfo.getLastModified(); - - // Assert - assertEquals(expectedLastModified, actualLastModified); - } - - @Test - public void testGetSetAlternateId() { - // Arrange - String expectedAlternateId = "testAlternateId"; - AssetInfo assetInfo = new AssetInfo(null, - new AssetType().setAlternateId(expectedAlternateId)); - - // Act - String actualAlternateId = assetInfo.getAlternateId(); - - // Assert - assertEquals(expectedAlternateId, actualAlternateId); - } - - @Test - public void testGetSetName() { - // Arrange - String expectedName = "testName"; - AssetInfo assetInfo = new AssetInfo(null, - new AssetType().setName(expectedName)); - - // Act - String actualName = assetInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } - - @Test - public void testGetSetOptions() { - // Arrange - - AssetOption expectedOptions = AssetOption.None; - AssetInfo assetInfo = new AssetInfo(null, - new AssetType().setOptions(expectedOptions.getCode())); - - // Act - AssetOption actualOptions = assetInfo.getOptions(); - - // Assert - assertEquals(expectedOptions, actualOptions); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ChannelEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ChannelEntityTest.java deleted file mode 100644 index bcec8d340d25..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ChannelEntityTest.java +++ /dev/null @@ -1,207 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import java.net.URLEncoder; - -import javax.xml.bind.JAXBElement; -import javax.xml.namespace.QName; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.atom.LinkType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; -import com.microsoft.windowsazure.services.media.implementation.content.Constants; -import com.microsoft.windowsazure.services.media.implementation.content.JobType; - -/** - * Tests for the methods and factories of the Asset entity. - */ -public class ChannelEntityTest { - static final String sampleAssetId = "nb:cid:UUID:1151b8bd-9ada-4e7f-9787-8dfa49968eab"; - private final String expectedUri = String.format("Assets('%s')", - URLEncoder.encode(sampleAssetId, "UTF-8")); - - public ChannelEntityTest() throws Exception { - } - - @Test - public void assetCreateReturnsDefaultCreatePayload() { - AssetType payload = (AssetType) Asset.create().getRequestContents(); - - assertNotNull(payload); - assertNull(payload.getId()); - assertNull(payload.getState()); - assertNull(payload.getCreated()); - assertNull(payload.getLastModified()); - assertNull(payload.getAlternateId()); - assertNull(payload.getName()); - assertNull(payload.getOptions()); - } - - @Test - public void assetCreateCanSetAssetName() { - String name = "assetCreateCanSetAssetName"; - - Asset.Creator creator = Asset.create().setName( - "assetCreateCanSetAssetName"); - - AssetType payload = (AssetType) creator.getRequestContents(); - - assertNotNull(payload); - assertNull(payload.getId()); - assertNull(payload.getState()); - assertNull(payload.getCreated()); - assertNull(payload.getLastModified()); - assertNull(payload.getAlternateId()); - assertEquals(name, payload.getName()); - assertNull(payload.getOptions()); - } - - @Test - public void assetGetReturnsExpectedUri() throws Exception { - String expectedUri = String.format("Assets('%s')", - URLEncoder.encode(sampleAssetId, "UTF-8")); - - EntityGetOperation<AssetInfo> getter = Asset.get(sampleAssetId); - - assertEquals(expectedUri, getter.getUri()); - } - - @Test - public void assetListReturnsExpectedUri() { - EntityListOperation<AssetInfo> lister = Asset.list(); - - assertEquals("Assets", lister.getUri()); - assertNotNull(lister.getQueryParameters()); - assertEquals(0, lister.getQueryParameters().size()); - } - - @Test - public void assetListCanTakeQueryParameters() { - EntityListOperation<AssetInfo> lister = Asset.list().setTop(10) - .setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void assetListCanTakeQueryParametersChained() { - EntityListOperation<AssetInfo> lister = Asset.list().setTop(10) - .setSkip(2).set("filter", "something"); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals("something", lister.getQueryParameters() - .getFirst("filter")); - assertEquals(3, lister.getQueryParameters().size()); - } - - @Test - public void assetUpdateReturnsExpectedUri() throws Exception { - EntityUpdateOperation updater = Asset.update(sampleAssetId); - assertEquals(expectedUri, updater.getUri()); - } - - @Test - public void assetUpdateCanSetNameAndAltId() throws Exception { - - String expectedName = "newAssetName"; - String expectedAltId = "newAltId"; - - EntityUpdateOperation updater = Asset.update(sampleAssetId) - .setName(expectedName).setAlternateId(expectedAltId); - - AssetType payload = (AssetType) updater.getRequestContents(); - - assertEquals(expectedName, payload.getName()); - assertEquals(expectedAltId, payload.getAlternateId()); - } - - @Test - public void assetDeleteReturnsExpectedUri() throws Exception { - EntityDeleteOperation deleter = Asset.delete(sampleAssetId); - - assertEquals(expectedUri, deleter.getUri()); - } - - private static final String expectedOutputAsset = "Job(someJobId)/OutputAssets"; - private static final String expectedInputAsset = "Job(someJobId)/InputAssets"; - - @Test - public void listForLinkReturnsExpectedUri() throws Exception { - JobInfo fakeJob = createJob(); - - EntityListOperation<AssetInfo> lister = Asset.list(fakeJob - .getInputAssetsLink()); - - assertEquals(lister.getUri(), expectedInputAsset); - } - - private JobInfo createJob() { - EntryType fakeJobEntry = new EntryType(); - addEntryLink(fakeJobEntry, Constants.ODATA_DATA_NS - + "/related/OutputMediaAssets", expectedOutputAsset, - "application/atom+xml;type=feed", "OutputAssets"); - addEntryLink(fakeJobEntry, Constants.ODATA_DATA_NS - + "/related/InputMediaAssets", expectedInputAsset, - "application/atom+xml;type=feed", "InputAssets"); - - JobType payload = new JobType().setId("SomeId").setName("FakeJob"); - addEntryContent(fakeJobEntry, payload); - - return new JobInfo(fakeJobEntry, payload); - } - - private void addEntryLink(EntryType entry, String rel, String href, - String type, String title) { - LinkType link = new LinkType(); - link.setRel(rel); - link.setHref(href); - link.setType(type); - link.setTitle(title); - - JAXBElement<LinkType> linkElement = new JAXBElement<LinkType>( - new QName("link", Constants.ATOM_NS), LinkType.class, link); - entry.getEntryChildren().add(linkElement); - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - private ContentType addEntryContent(EntryType entry, Object content) { - ContentType contentWrapper = new ContentType(); - contentWrapper.getContent().add( - new JAXBElement(Constants.ODATA_PROPERTIES_ELEMENT_NAME, - content.getClass(), content)); - - entry.getEntryChildren().add( - new JAXBElement<ContentType>( - Constants.ATOM_CONTENT_ELEMENT_NAME, ContentType.class, - contentWrapper)); - return contentWrapper; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyEntityTest.java deleted file mode 100644 index 7173ad58f121..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyEntityTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import java.net.URLEncoder; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyRestType; - -/** - * Tests for the ContentKey entity - * - */ -public class ContentKeyEntityTest { - private final String testContentKeyId = "nb:kid:UUID:c82307be-1a81-4554-ba7d-cf6dfa735a5a"; - private final ContentKeyType testContentKeyType = ContentKeyType.StorageEncryption; - private final String testEncryptedContentKey = "testEncryptedContentKey"; - private final String testExpectedContentKeyUri = String.format( - "ContentKeys('%s')", URLEncoder.encode(testContentKeyId, "UTF-8")); - - public ContentKeyEntityTest() throws Exception { - - } - - @Test - public void createContentKeyHasCorrectUrl() throws Exception { - EntityCreateOperation<ContentKeyInfo> creator = ContentKey.create( - testContentKeyId, testContentKeyType, testEncryptedContentKey); - - assertEquals("ContentKeys", creator.getUri()); - } - - @Test - public void createContentKeyHasCorrectPayload() throws Exception { - ContentKeyRestType contentKeyRestType = (ContentKeyRestType) ContentKey - .create(testContentKeyId, testContentKeyType, - testEncryptedContentKey).getRequestContents(); - - assertEquals(testContentKeyId, contentKeyRestType.getId()); - assertEquals(testContentKeyType.getCode(), contentKeyRestType - .getContentKeyType().intValue()); - assertEquals(testEncryptedContentKey, - contentKeyRestType.getEncryptedContentKey()); - assertNull(contentKeyRestType.getChecksum()); - assertNull(contentKeyRestType.getCreated()); - assertNull(contentKeyRestType.getLastModified()); - assertNull(contentKeyRestType.getName()); - assertNull(contentKeyRestType.getProtectionKeyId()); - assertNull(contentKeyRestType.getProtectionKeyType()); - } - - @Test - public void getContentKeyGivesExpectedUri() throws Exception { - assertEquals(testExpectedContentKeyUri, ContentKey - .get(testContentKeyId).getUri()); - } - - @Test - public void listContentKeyReturnsExpectedUri() { - EntityListOperation<ContentKeyInfo> lister = ContentKey.list(); - - assertEquals("ContentKeys", lister.getUri()); - assertNotNull(lister.getQueryParameters()); - assertEquals(0, lister.getQueryParameters().size()); - } - - @Test - public void listContentKeyCanTakeQueryParameters() { - - EntityListOperation<ContentKeyInfo> lister = ContentKey.list() - .setTop(10).setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void ContentKeyDeleteReturnsExpectedUri() throws Exception { - EntityDeleteOperation deleter = ContentKey.delete(testContentKeyId); - assertEquals(testExpectedContentKeyUri, deleter.getUri()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfoTest.java deleted file mode 100644 index bf609b39e41d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfoTest.java +++ /dev/null @@ -1,178 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.util.Date; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyRestType; - -public class ContentKeyInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "expectedId"; - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType().setId(expectedId)); - - // Act - String actualId = contentKeyInfo.getId(); - - // Assert - assertEquals(expectedId, actualId); - } - - @Test - public void testGetSetCreated() { - // Arrange - Date expectedCreated = new Date(); - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType().setCreated(expectedCreated)); - - // Act - Date actualCreated = contentKeyInfo.getCreated(); - - // Assert - assertEquals(expectedCreated, actualCreated); - } - - @Test - public void testGetSetLastModified() { - // Arrange - Date expectedLastModified = new Date(); - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType().setLastModified(expectedLastModified)); - - // Act - Date actualLastModified = contentKeyInfo.getLastModified(); - - // Assert - assertEquals(expectedLastModified, actualLastModified); - } - - @Test - public void testGetSetContentKeyType() { - // Arrange - ContentKeyType expectedContentKeyType = ContentKeyType.ConfigurationEncryption; - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType() - .setContentKeyType(expectedContentKeyType.getCode())); - - // Act - ContentKeyType actualContentKeyType = contentKeyInfo - .getContentKeyType(); - - // Assert - assertEquals(expectedContentKeyType, actualContentKeyType); - - } - - @Test - public void testGetSetEncryptedContentKey() { - // Arrange - String expectedEncryptedContentKey = "testX509Certificate"; - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType() - .setEncryptedContentKey(expectedEncryptedContentKey)); - - // Act - String actualEncryptedContentKey = contentKeyInfo - .getEncryptedContentKey(); - - // Assert - assertEquals(expectedEncryptedContentKey, actualEncryptedContentKey); - } - - @Test - public void testGetSetName() { - // Arrange - String expectedName = "expectedName"; - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType().setName(expectedName)); - - // Act - String actualName = contentKeyInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } - - @Test - public void testGetSetProtectionKeyId() { - // Arrange - String expectedProtectionKeyId = "expectedProtectionKeyId"; - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType() - .setProtectionKeyId(expectedProtectionKeyId)); - - // Act - String actualProtectionKeyId = contentKeyInfo.getProtectionKeyId(); - - // Assert - assertEquals(expectedProtectionKeyId, actualProtectionKeyId); - - } - - @Test - public void testGetSetProtectionKeyType() { - // Arrange - ProtectionKeyType expectedProtectionKeyType = ProtectionKeyType.X509CertificateThumbprint; - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType() - .setProtectionKeyType(expectedProtectionKeyType - .getCode())); - - // Act - ProtectionKeyType actualProtectionKeyType = contentKeyInfo - .getProtectionKeyType(); - - // Assert - assertEquals(expectedProtectionKeyType, actualProtectionKeyType); - } - - @Test - public void testGetSetCheckSum() { - // Arrange - String expectedCheckSum = "testCheckSum"; - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType().setChecksum(expectedCheckSum)); - - // Act - String actualCheckSum = contentKeyInfo.getChecksum(); - - // Assert - assertEquals(expectedCheckSum, actualCheckSum); - - } - - @Test - public void testGetSetAuthorizationPolicyId() { - // Arrange - String expectedAuthorizationPolicyId = "testAuthorizationPolicyId"; - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType().setAuthorizationPolicyId(expectedAuthorizationPolicyId)); - - // Act - String actualAuthorizationPolicyId = contentKeyInfo.getAuthorizationPolicyId(); - - // Assert - assertEquals(expectedAuthorizationPolicyId, actualAuthorizationPolicyId); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/GenericListResultTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/GenericListResultTest.java deleted file mode 100644 index f754ea0fc665..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/GenericListResultTest.java +++ /dev/null @@ -1,431 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.ListIterator; -import java.util.NoSuchElementException; - -import org.junit.Test; - -/** - * Test for the {link ListResult<T>} type. - * - */ -public class GenericListResultTest { - private final String[] expectedStrings = { "One", "Two", "Three" }; - - @Test - public void emptyListResultIsEmpty() throws Exception { - assertTrue(new ListResult<String>(new ArrayList<String>()).isEmpty()); - } - - @Test - public void listWithContentsIsNotEmpty() throws Exception { - ListResult<String> result = createStringListResult(); - - assertFalse(result.isEmpty()); - } - - @Test - public void createWithEmptyCollectionGivesNoResults() throws Exception { - List<AssetInfo> result = new ListResult<AssetInfo>( - new ArrayList<AssetInfo>()); - - assertEquals(0, result.size()); - } - - @Test - public void createWithCollectionContentsContainsContents() throws Exception { - List<String> result = createStringListResult(); - - assertEquals(expectedStrings.length, result.size()); - } - - @Test - public void createWithCollectionContentsCanRetrieveContents() - throws Exception { - List<String> result = createStringListResult(); - - for (int i = 0; i < expectedStrings.length; ++i) { - assertEquals(expectedStrings[i], result.get(i)); - } - } - - @Test - public void canIterateThroughResults() throws Exception { - List<String> result = createStringListResult(); - - int i = 0; - for (String s : result) { - assertEquals(expectedStrings[i], s); - ++i; - } - } - - @Test - public void canCheckContainsForObjectInList() throws Exception { - ListResult<String> result = createStringListResult(); - - assertTrue(result.contains(expectedStrings[1])); - } - - @Test - public void canCheckContainsForObjectNotInList() throws Exception { - ListResult<String> result = createStringListResult(); - - assertFalse(result.contains("This is not a string in the list")); - } - - @Test - public void canCheckContainsAllForObjectsInList() throws Exception { - ListResult<String> result = createStringListResult(); - List<String> contains = new ArrayList<String>(); - contains.add(expectedStrings[2]); - contains.add(expectedStrings[1]); - - assertTrue(result.containsAll(contains)); - } - - @Test - public void canCheckContainsAllForObjectsNotInList() throws Exception { - ListResult<String> result = createStringListResult(); - List<String> contains = new ArrayList<String>(); - contains.add(expectedStrings[2]); - contains.add("This is not in the list"); - - assertFalse(result.containsAll(contains)); - } - - @Test - public void canGetIndexOfItemInList() throws Exception { - ListResult<String> result = createStringListResult(); - - assertEquals(1, result.indexOf(expectedStrings[1])); - } - - @Test - public void indexOfItemNotInListIsMinusOne() throws Exception { - ListResult<String> result = createStringListResult(); - - assertEquals(-1, result.indexOf("Not in collection")); - } - - @Test - public void lastIndexOfItemInCollectionIsCorrect() throws Exception { - ListResult<String> result = new ListResult<String>(Arrays.asList("c", - "b", "c", "a")); - - assertEquals(2, result.lastIndexOf("c")); - } - - @Test - public void lastIndexOfItemNotInCollectionIsMinusOne() throws Exception { - ListResult<String> result = createStringListResult(); - - assertEquals(-1, result.lastIndexOf("Not in collection")); - } - - @Test - public void optionalListMethodsAreUnsupported() throws Exception { - final ListResult<String> result = createStringListResult(); - - assertListIsImmutable(result); - } - - @Test - public void canGetWorkingListIteratorFromResult() throws Exception { - ListResult<String> result = createStringListResult(); - - ListIterator<String> iterator = result.listIterator(); - int i = 0; - for (i = 0; i < expectedStrings.length; ++i) { - assertIteratorAtPositionMovingForward(i, iterator); - } - - for (; i >= 0; --i) { - assertIteratorAtPositionMovingBackward(i, iterator); - } - } - - @Test - public void canGetWorkingListIteratorAtIndexFromResult() throws Exception { - ListResult<String> result = createStringListResult(); - - ListIterator<String> iterator = result.listIterator(1); - int i = 1; - for (; i < expectedStrings.length; ++i) { - assertIteratorAtPositionMovingForward(i, iterator); - } - - for (; i >= 0; --i) { - assertIteratorAtPositionMovingBackward(i, iterator); - } - } - - @Test - public void listIteratorIsImmutable() throws Exception { - ListResult<String> result = createStringListResult(); - final ListIterator<String> iterator = result.listIterator(); - - assertUnsupported(new Action() { - @Override - public void Do() { - iterator.add("new string"); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - iterator.remove(); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - iterator.set("replace string"); - } - }); - } - - @Test - public void listIteratorIsImmutableWhenCreatedWithIndex() throws Exception { - ListResult<String> result = createStringListResult(); - final ListIterator<String> iterator = result.listIterator(1); - - assertUnsupported(new Action() { - @Override - public void Do() { - iterator.add("new string"); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - iterator.remove(); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - iterator.set("replace string"); - } - }); - } - - @Test - public void canGetObjectArrayFromResult() throws Exception { - ListResult<String> result = createStringListResult(); - Object[] array = result.toArray(); - - assertNotNull(array); - assertEquals(result.size(), array.length); - for (int i = 0; i < result.size(); ++i) { - assertEquals(result.get(i), array[i]); - } - } - - @Test - public void canGetTypedArrayFromResult() throws Exception { - ListResult<String> result = createStringListResult(); - String[] array = result.toArray(new String[0]); - - assertNotNull(array); - assertEquals(result.size(), array.length); - for (int i = 0; i < result.size(); ++i) { - assertEquals(result.get(i), array[i]); - } - } - - @Test - public void canGetExpectedSublistFromResult() throws Exception { - ListResult<String> result = createStringListResult(); - List<String> sublist = result.subList(1, 3); - - assertEquals(2, sublist.size()); - assertEquals(result.get(1), sublist.get(0)); - assertEquals(result.get(2), sublist.get(1)); - } - - @Test - public void sublistIsImmutable() throws Exception { - ListResult<String> result = createStringListResult(); - final List<String> sublist = result.subList(1, 3); - - assertListIsImmutable(sublist); - } - - private ListResult<String> createStringListResult() { - ListResult<String> result = new ListResult<String>( - Arrays.asList(expectedStrings)); - - return result; - } - - // / Assertion helpers /// - - private void assertIteratorState(int position, ListIterator<String> iterator) { - boolean expectHasNext = position < expectedStrings.length; - boolean expectHasPrevious = position != 0; - - assertNotNull("Iterator is null", iterator); - assertEquals(String.format("HasNext at position %d", position), - expectHasNext, iterator.hasNext()); - assertEquals(String.format("HasPrevious at position %d", position), - expectHasPrevious, iterator.hasPrevious()); - - if (expectHasNext) { - assertEquals(String.format("NextIndex at position %d", position), - position, iterator.nextIndex()); - } - - if (expectHasPrevious) { - assertEquals( - String.format("PreviousIndex at position %d", position), - position - 1, iterator.previousIndex()); - } - - } - - private void assertIteratorAtPositionMovingForward(int position, - ListIterator<String> iterator) { - assertIteratorState(position, iterator); - - if (iterator.hasNext()) { - assertEquals(expectedStrings[position], iterator.next()); - } else { - try { - iterator.next(); - fail("Exception should have been thrown"); - } catch (NoSuchElementException ex) { - // Ok, we expected this - } - } - } - - private void assertIteratorAtPositionMovingBackward(int position, - ListIterator<String> iterator) { - assertIteratorState(position, iterator); - - if (iterator.hasPrevious()) { - assertEquals(expectedStrings[position - 1], iterator.previous()); - } else { - try { - iterator.previous(); - fail("Exception should have been thrown"); - } catch (NoSuchElementException ex) { - // Ok, we expected this - } - } - } - - private interface Action { - void Do(); - } - - private void assertUnsupported(Action action) { - try { - action.Do(); - fail("Expected UnsupportedOperationException"); - } catch (UnsupportedOperationException ex) { - // This is ok - } - } - - private void assertListIsImmutable(final List<String> list) { - assertUnsupported(new Action() { - @Override - public void Do() { - list.add("new string"); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.add(2, "new string"); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.addAll(Arrays.asList("a", "b")); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.addAll(2, Arrays.asList("a", "b")); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.clear(); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.remove(1); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.remove(list.get(1)); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.removeAll(Arrays.asList(list.get(0), list.get(1))); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.retainAll(Arrays.asList(list.get(1))); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.set(1, "new string"); - } - }); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/JobEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/JobEntityTest.java deleted file mode 100644 index b17a8f220043..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/JobEntityTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import java.net.URI; - -import javax.mail.internet.MimeMultipart; - -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityProxyData; - -/** - * Tests for the methods and factories of the Job entity. - */ -public class JobEntityTest { - - private EntityProxyData createProxyData() { - return new EntityProxyData() { - @Override - public URI getServiceUri() { - return URI.create("http://contoso.com"); - } - }; - } - - public JobEntityTest() throws Exception { - } - - @Test - public void JobCreateReturnsDefaultCreatePayload() throws ServiceException { - Job.Creator jobCreator = Job.create(); - jobCreator.setProxyData(createProxyData()); - MimeMultipart payload = (MimeMultipart) jobCreator.getRequestContents(); - assertNotNull(payload); - } - - @Test - public void JobListReturnsExpectedUri() { - EntityListOperation<JobInfo> lister = Job.list(); - - assertEquals("Jobs", lister.getUri()); - assertNotNull(lister.getQueryParameters()); - assertEquals(0, lister.getQueryParameters().size()); - } - - @Test - public void JobListCanTakeQueryParameters() { - EntityListOperation<JobInfo> lister = Job.list().setTop(10).setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void JobListCanTakeQueryParametersChained() { - EntityListOperation<JobInfo> lister = Job.list().setTop(10).setSkip(2) - .set("filter", "something"); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals("something", lister.getQueryParameters() - .getFirst("filter")); - assertEquals(3, lister.getQueryParameters().size()); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/JobInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/JobInfoTest.java deleted file mode 100644 index a1c92e73ebbf..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/JobInfoTest.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.util.Date; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.JobNotificationSubscriptionType; -import com.microsoft.windowsazure.services.media.implementation.content.JobType; - -public class JobInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "expectedId"; - JobInfo JobInfo = new JobInfo(null, new JobType().setId(expectedId)); - - // Act - String actualId = JobInfo.getId(); - - // Assert - assertEquals(expectedId, actualId); - - } - - @Test - public void testGetSetName() { - // Arrange - String expectedName = "testGetSetName"; - JobInfo JobInfo = new JobInfo(null, new JobType().setName(expectedName)); - - // Act - String actualName = JobInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } - - @Test - public void testGetSetCreated() throws Exception { - // Arrange - Date expectedCreated = new Date(); - - JobInfo JobInfo = new JobInfo(null, - new JobType().setCreated(expectedCreated)); - - // Act - Date actualCreated = JobInfo.getCreated(); - - // Assert - assertEquals(expectedCreated, actualCreated); - - } - - @Test - public void testGetSetLastModified() throws Exception { - // Arrange - Date expectedLastModified = new Date(); - JobInfo JobInfo = new JobInfo(null, - new JobType().setLastModified(expectedLastModified)); - - // Act - Date actualLastModified = JobInfo.getLastModified(); - - // Assert - assertEquals(expectedLastModified, actualLastModified); - } - - @Test - public void testGetSetPriority() { - // Arrange - int expectedPriority = 3; - JobInfo JobInfo = new JobInfo(null, - new JobType().setPriority(expectedPriority)); - - // Act - int actualPriority = JobInfo.getPriority(); - - // Assert - assertEquals(expectedPriority, actualPriority); - } - - @Test - public void testGetSetRunningDuration() { - // Arrange - Double expectedRunningDuration = 1234.5; - JobInfo JobInfo = new JobInfo(null, - new JobType().setRunningDuration(expectedRunningDuration)); - - // Act - Double actualRunningDuration = JobInfo.getRunningDuration(); - - // Assert - assertEquals(expectedRunningDuration, actualRunningDuration); - } - - @Test - public void testGetSetStartTime() { - // Arrange - Date expectedStartTime = new Date(); - JobInfo JobInfo = new JobInfo(null, - new JobType().setLastModified(expectedStartTime)); - - // Act - Date actualStartTime = JobInfo.getLastModified(); - - // Assert - assertEquals(expectedStartTime, actualStartTime); - } - - @Test - public void testGetSetState() { - // Arrange - JobState expectedJobState = JobState.Finished; - JobInfo JobInfo = new JobInfo(null, - new JobType().setState(expectedJobState.getCode())); - - // Act - JobState actualJobState = JobInfo.getState(); - - // Assert - assertEquals(expectedJobState, actualJobState); - } - - @Test - public void testGetSetNotificationEndPoint() { - // Arrange - String expectedNotificationEndPointId = "testNotificationEndPointId"; - JobNotificationSubscription expectedJobNotificationSubscription = new JobNotificationSubscription( - expectedNotificationEndPointId, TargetJobState.All); - JobNotificationSubscriptionType expectedJobNotificationSubscriptionType = new JobNotificationSubscriptionType(); - JobType expectedJobType = new JobType(); - expectedJobType - .addJobNotificationSubscriptionType(expectedJobNotificationSubscriptionType - .setNotificationEndPointId( - expectedNotificationEndPointId) - .setTargetJobState(TargetJobState.All.getCode())); - JobInfo jobInfo = new JobInfo(null, expectedJobType); - - // Act - JobNotificationSubscription actualJobNotificationSubscription = jobInfo - .getJobNotificationSubscriptions().get(0); - - // Assert - assertEquals( - expectedJobNotificationSubscription.getNotificationEndPointId(), - actualJobNotificationSubscription.getNotificationEndPointId()); - assertEquals(expectedJobNotificationSubscription.getTargetJobState(), - actualJobNotificationSubscription.getTargetJobState()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorEntityTest.java deleted file mode 100644 index 05dc90122a51..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorEntityTest.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import java.net.URLEncoder; -import java.util.Date; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.LocatorRestType; - -/** - * Tests for the Locator entity - * - */ -public class LocatorEntityTest { - private final String exampleAssetId = "nb:cid:UUID:61a5ebbe-d5e0-49a5-b28c-e9535321b6cd"; - private final String exampleAccessPolicyId = "nb:pid:UUID:c82307be-1a81-4554-ba7d-cf6dfa735a5a"; - private final String exampleLocatorId = "nb:lid:UUID:f282b0a1-fb21-4b83-87d6-d4c96d77aef9"; - private final String expectedLocatorUri = String.format("Locators('%s')", - URLEncoder.encode(exampleLocatorId, "UTF-8")); - - public LocatorEntityTest() throws Exception { - - } - - @Test - public void createLocatorHasCorrectUrl() throws Exception { - EntityCreateOperation<LocatorInfo> creator = Locator.create( - exampleAccessPolicyId, exampleAssetId, LocatorType.SAS); - - assertEquals("Locators", creator.getUri()); - } - - @Test - public void createLocatorHasCorrectPayload() throws Exception { - LocatorRestType locatorType = (LocatorRestType) Locator.create( - exampleAccessPolicyId, exampleAssetId, LocatorType.SAS) - .getRequestContents(); - - assertEquals(exampleAssetId, locatorType.getAssetId()); - assertEquals(exampleAccessPolicyId, locatorType.getAccessPolicyId()); - assertEquals(LocatorType.SAS.getCode(), locatorType.getType() - .intValue()); - assertNull(locatorType.getStartTime()); - assertNull(locatorType.getExpirationDateTime()); - } - - @Test - public void createLocatorCanSetStartTime() throws Exception { - Date now = new Date(); - - EntityCreateOperation<LocatorInfo> creator = Locator.create( - exampleAccessPolicyId, exampleAssetId, LocatorType.SAS) - .setStartDateTime(now); - - LocatorRestType locatorType = (LocatorRestType) creator - .getRequestContents(); - - assertEquals(exampleAssetId, locatorType.getAssetId()); - assertEquals(exampleAccessPolicyId, locatorType.getAccessPolicyId()); - assertEquals(LocatorType.SAS.getCode(), locatorType.getType() - .intValue()); - assertEquals(now, locatorType.getStartTime()); - } - - @Test - public void createLocatorCanSetPath() throws Exception { - - String expectedPath = "testExpectedPath"; - - EntityCreateOperation<LocatorInfo> creator = Locator.create( - exampleAccessPolicyId, exampleAssetId, LocatorType.SAS) - .setPath(expectedPath); - - LocatorRestType locatorType = (LocatorRestType) creator - .getRequestContents(); - - assertEquals(expectedPath, locatorType.getPath()); - - } - - @Test - public void createLocatorCanSetBaseUri() throws Exception { - - String expectedBaseUri = "testExpectedBaseUri"; - - EntityCreateOperation<LocatorInfo> creator = Locator.create( - exampleAccessPolicyId, exampleAssetId, LocatorType.SAS) - .setBaseUri(expectedBaseUri); - - LocatorRestType locatorType = (LocatorRestType) creator - .getRequestContents(); - - assertEquals(expectedBaseUri, locatorType.getBaseUri()); - - } - - @Test - public void createLocatorCanSetContentAccessComponent() throws Exception { - - String expectedContentAccessComponent = "testExpectedContentAccessComponent"; - - EntityCreateOperation<LocatorInfo> creator = Locator.create( - exampleAccessPolicyId, exampleAssetId, LocatorType.SAS) - .setContentAccessComponent(expectedContentAccessComponent); - - LocatorRestType locatorType = (LocatorRestType) creator - .getRequestContents(); - - assertEquals(expectedContentAccessComponent, - locatorType.getContentAccessComponent()); - - } - - @Test - public void getLocatorGivesExpectedUri() throws Exception { - assertEquals(expectedLocatorUri, Locator.get(exampleLocatorId).getUri()); - } - - @Test - public void listLocatorReturnsExpectedUri() { - EntityListOperation<LocatorInfo> lister = Locator.list(); - - assertEquals("Locators", lister.getUri()); - assertNotNull(lister.getQueryParameters()); - assertEquals(0, lister.getQueryParameters().size()); - } - - @Test - public void listLocatorCanTakeQueryParameters() { - - EntityListOperation<LocatorInfo> lister = Locator.list().setTop(10) - .setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void locatorUpdateReturnsExpectedUri() throws Exception { - EntityUpdateOperation updater = Locator.update(exampleLocatorId); - assertEquals(expectedLocatorUri, updater.getUri()); - } - - @Test - public void locatorUpdateCanSetStarTime() throws Exception { - Date now = new Date(); - - Date tenMinutesAgo = new Date(now.getTime() - 10 * 60 * 1000); - - EntityUpdateOperation updater = Locator.update(exampleLocatorId) - .setStartDateTime(tenMinutesAgo); - - LocatorRestType payload = (LocatorRestType) updater - .getRequestContents(); - - assertEquals(tenMinutesAgo, payload.getStartTime()); - } - - @Test - public void locatorDeleteReturnsExpectedUri() throws Exception { - EntityDeleteOperation deleter = Locator.delete(exampleLocatorId); - - assertEquals(expectedLocatorUri, deleter.getUri()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorInfoTest.java deleted file mode 100644 index d038b3e0f98e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorInfoTest.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.util.Date; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.LocatorRestType; - -public class LocatorInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "testId"; - LocatorInfo locator = new LocatorInfo(null, - new LocatorRestType().setId(expectedId)); - - // Act - String actualId = locator.getId(); - - // Assert - assertEquals(expectedId, actualId); - } - - @Test - public void testGetSetExpirationDateTime() { - // Arrange - Date expectedExpirationDateTime = new Date(); - LocatorInfo locatorInfo = new LocatorInfo(null, - new LocatorRestType() - .setExpirationDateTime(expectedExpirationDateTime)); - - // Act - Date actualExpirationDateTime = locatorInfo.getExpirationDateTime(); - - // Assert - assertEquals(expectedExpirationDateTime, actualExpirationDateTime); - } - - @Test - public void testGetSetType() { - // Arrange - LocatorType expectedLocatorType = LocatorType.SAS; - LocatorInfo locatorInfo = new LocatorInfo(null, - new LocatorRestType().setType(expectedLocatorType.getCode())); - - // Act - LocatorType actualLocatorType = locatorInfo.getLocatorType(); - - // Assert - assertEquals(expectedLocatorType, actualLocatorType); - } - - @Test - public void testGetSetPath() { - // Arrange - String expectedPath = "testPath"; - LocatorInfo locatorInfo = new LocatorInfo(null, - new LocatorRestType().setPath(expectedPath)); - - // Act - String actualPath = locatorInfo.getPath(); - - // Assert - assertEquals(expectedPath, actualPath); - } - - @Test - public void testGetSetAccessPolicyId() { - // Arrange - String expectedAccessPolicyId = "testAccessPolicyId"; - LocatorInfo locatorInfo = new LocatorInfo(null, - new LocatorRestType().setAccessPolicyId(expectedAccessPolicyId)); - - // Act - String actualAccessPolicyId = locatorInfo.getAccessPolicyId(); - - // Assert - assertEquals(expectedAccessPolicyId, actualAccessPolicyId); - } - - @Test - public void testGetSetAssetId() { - // Arrange - String expectedAssetId = "testAssetId"; - LocatorInfo locatorInfo = new LocatorInfo(null, - new LocatorRestType().setAssetId(expectedAssetId)); - - // Act - String actualAssetId = locatorInfo.getAssetId(); - - // Assert - assertEquals(expectedAssetId, actualAssetId); - } - - @Test - public void testGetSetStartTime() { - // Arrange - Date expectedStartTime = new Date(); - LocatorInfo locatorInfo = new LocatorInfo(null, - new LocatorRestType().setStartTime(expectedStartTime)); - - // Act - Date actualStartTime = locatorInfo.getStartTime(); - - // Assert - assertEquals(expectedStartTime, actualStartTime); - } - - @Test - public void testGetSetBaseUri() { - // Arrange - String expectedBaseUri = "testBaseUri"; - LocatorInfo locatorInfo = new LocatorInfo(null, - new LocatorRestType().setBaseUri(expectedBaseUri)); - - // Act - String actualBaseUri = locatorInfo.getBaseUri(); - - // Assert - assertEquals(expectedBaseUri, actualBaseUri); - } - - @Test - public void testGetSetContentAccessComponent() { - // Arrange - String expectedContentAccessComponent = "testContentAccessToken"; - LocatorInfo locatorInfo = new LocatorInfo( - null, - new LocatorRestType() - .setContentAccessComponent(expectedContentAccessComponent)); - - // Act - String actualContentAccessComponent = locatorInfo - .getContentAccessToken(); - - // Assert - assertEquals(expectedContentAccessComponent, - actualContentAccessComponent); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/MediaProcessorEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/MediaProcessorEntityTest.java deleted file mode 100644 index f3c3f572d7ef..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/MediaProcessorEntityTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; - -/** - * Tests for the MediaProcessor entity - * - */ -public class MediaProcessorEntityTest { - - @Test - public void listMediaProcessorsReturnsExpectedUri() { - assertEquals("MediaProcessors", MediaProcessor.list().getUri()); - } - - @Test - public void listMediaProcessorsCanTakeQueryParmeters() { - - EntityListOperation<MediaProcessorInfo> lister = MediaProcessor.list() - .setTop(10).setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/MediaProcessorInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/MediaProcessorInfoTest.java deleted file mode 100644 index b161eafbe2c8..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/MediaProcessorInfoTest.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.MediaProcessorType; - -public class MediaProcessorInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "expectedId"; - MediaProcessorInfo mediaProcessorInfo = new MediaProcessorInfo(null, - new MediaProcessorType().setId(expectedId)); - - // Act - String actualId = mediaProcessorInfo.getId(); - - // Assert - assertEquals(expectedId, actualId); - - } - - @Test - public void testGetSetName() { - // Arrange - String expectedName = "testName"; - MediaProcessorInfo mediaProcessorInfo = new MediaProcessorInfo(null, - new MediaProcessorType().setName(expectedName)); - - // Act - String actualName = mediaProcessorInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } - - @Test - public void testGetSetDescription() throws Exception { - // Arrange - String expectedDescription = "testDescription"; - - MediaProcessorInfo mediaProcessorInfo = new MediaProcessorInfo(null, - new MediaProcessorType().setDescription(expectedDescription)); - - // Act - String actualDescription = mediaProcessorInfo.getDescription(); - - // Assert - assertEquals(expectedDescription, actualDescription); - - } - - @Test - public void testGetSetSku() throws Exception { - // Arrange - String expectedSku = "testSku"; - MediaProcessorInfo mediaProcessorInfo = new MediaProcessorInfo(null, - new MediaProcessorType().setSku(expectedSku)); - - // Act - String actualSku = mediaProcessorInfo.getSku(); - - // Assert - assertEquals(expectedSku, actualSku); - } - - @Test - public void testGetSetVendor() { - // Arrange - String expectedVendor = "testVendor"; - MediaProcessorInfo mediaProcessorInfo = new MediaProcessorInfo(null, - new MediaProcessorType().setVendor(expectedVendor)); - - // Act - String actualVendor = mediaProcessorInfo.getVendor(); - - // Assert - assertEquals(expectedVendor, actualVendor); - } - - @Test - public void testGetSetVersion() { - // Arrange - String expectedVersion = "testVersion"; - MediaProcessorInfo mediaProcessorInfo = new MediaProcessorInfo(null, - new MediaProcessorType().setVersion(expectedVersion)); - - // Act - String actualVersion = mediaProcessorInfo.getVersion(); - - // Assert - assertEquals(expectedVersion, actualVersion); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointEntityTest.java deleted file mode 100644 index 03e8c9ce0ea4..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointEntityTest.java +++ /dev/null @@ -1,149 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import java.net.URLEncoder; - -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.NotificationEndPointType; -import com.microsoft.windowsazure.services.media.models.NotificationEndPoint.Creator; - -/** - * Tests for the methods and factories of the NotificationEndPoint entity. - */ -public class NotificationEndPointEntityTest { - static final String sampleNotificationEndPointId = "nb:cid:UUID:1151b8bd-9ada-4e7f-9787-8dfa49968eab"; - private final String expectedUri = String.format( - "NotificationEndPoints('%s')", - URLEncoder.encode(sampleNotificationEndPointId, "UTF-8")); - private final String testNotificationEndPoint = "testNotificationEndPoint"; - private final String testQueueName = "testqueue"; - - public NotificationEndPointEntityTest() throws Exception { - } - - @Test - public void NotificationEndPointCreateReturnsDefaultCreatePayload() - throws ServiceException { - NotificationEndPointType payload = (NotificationEndPointType) NotificationEndPoint - .create(testNotificationEndPoint, EndPointType.AzureQueue, - testQueueName).getRequestContents(); - - assertNotNull(payload); - assertNull(payload.getId()); - assertNull(payload.getCreated()); - assertNotNull(payload.getName()); - assertNotNull(payload.getEndPointAddress()); - assertNotNull(payload.getEndPointType()); - } - - @Test - public void NotificationEndPointCreateCanSetNotificationEndPointName() { - String name = "NotificationEndPointCreateCanSetNotificationEndPointName"; - - NotificationEndPoint.Creator creator = (Creator) NotificationEndPoint - .create(name, EndPointType.AzureQueue, testQueueName); - - NotificationEndPointType payload = (NotificationEndPointType) creator - .getRequestContents(); - - assertNotNull(payload); - assertNull(payload.getId()); - assertNull(payload.getCreated()); - assertEquals(name, payload.getName()); - } - - @Test - public void NotificationEndPointGetReturnsExpectedUri() throws Exception { - String expectedUri = String.format("NotificationEndPoints('%s')", - URLEncoder.encode(sampleNotificationEndPointId, "UTF-8")); - - EntityGetOperation<NotificationEndPointInfo> getter = NotificationEndPoint - .get(sampleNotificationEndPointId); - - assertEquals(expectedUri, getter.getUri()); - } - - @Test - public void NotificationEndPointListReturnsExpectedUri() { - EntityListOperation<NotificationEndPointInfo> lister = NotificationEndPoint - .list(); - - assertEquals("NotificationEndPoints", lister.getUri()); - assertNotNull(lister.getQueryParameters()); - assertEquals(0, lister.getQueryParameters().size()); - } - - @Test - public void NotificationEndPointListCanTakeQueryParameters() { - EntityListOperation<NotificationEndPointInfo> lister = NotificationEndPoint - .list().setTop(10).setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void NotificationEndPointListCanTakeQueryParametersChained() { - EntityListOperation<NotificationEndPointInfo> lister = NotificationEndPoint - .list().setTop(10).setSkip(2).set("filter", "something"); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals("something", lister.getQueryParameters() - .getFirst("filter")); - assertEquals(3, lister.getQueryParameters().size()); - } - - @Test - public void NotificationEndPointUpdateReturnsExpectedUri() throws Exception { - EntityUpdateOperation updater = NotificationEndPoint - .update(sampleNotificationEndPointId); - assertEquals(expectedUri, updater.getUri()); - } - - @Test - public void NotificationEndPointUpdateCanSetNameAndAltId() throws Exception { - - String expectedName = "newNotificationEndPointName"; - - EntityUpdateOperation updater = NotificationEndPoint.update( - sampleNotificationEndPointId).setName(expectedName); - - NotificationEndPointType payload = (NotificationEndPointType) updater - .getRequestContents(); - - assertEquals(expectedName, payload.getName()); - } - - @Test - public void NotificationEndPointDeleteReturnsExpectedUri() throws Exception { - EntityDeleteOperation deleter = NotificationEndPoint - .delete(sampleNotificationEndPointId); - assertEquals(expectedUri, deleter.getUri()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointInfoTest.java deleted file mode 100644 index fb589ee8585c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointInfoTest.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.util.Date; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.NotificationEndPointType; - -public class NotificationEndPointInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "expectedId"; - NotificationEndPointInfo notificationEndPointInfo = new NotificationEndPointInfo( - null, new NotificationEndPointType().setId(expectedId)); - - // Act - String actualId = notificationEndPointInfo.getId(); - - // Assert - assertEquals(expectedId, actualId); - - } - - @Test - public void testGetSetName() { - // Arrange - String expectedName = "notificationEndPointName"; - NotificationEndPointInfo notificationEndPointInfo = new NotificationEndPointInfo( - null, new NotificationEndPointType().setName(expectedName)); - - // Act - String actualName = notificationEndPointInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } - - @Test - public void testGetSetCreated() throws Exception { - // Arrange - Date expectedCreated = new Date(); - - NotificationEndPointInfo notificationEndPointInfo = new NotificationEndPointInfo( - null, - new NotificationEndPointType().setCreated(expectedCreated)); - - // Act - Date actualCreated = notificationEndPointInfo.getCreated(); - - // Assert - assertEquals(expectedCreated, actualCreated); - - } - - @Test - public void testGetSetEndPointType() throws Exception { - // Arrange - EndPointType expectedEndPointType = EndPointType.AzureQueue; - NotificationEndPointInfo notificationEndPointInfo = new NotificationEndPointInfo( - null, - new NotificationEndPointType() - .setEndPointType(expectedEndPointType.getCode())); - - // Act - EndPointType actualEndPointType = notificationEndPointInfo - .getEndPointType(); - - // Assert - assertEquals(expectedEndPointType, actualEndPointType); - } - - @Test - public void testGetSetEndPointAddress() { - // Arrange - String expectedEndPointAddress = "testGetSetEndPointAddress"; - NotificationEndPointInfo notificationEndPointInfo = new NotificationEndPointInfo( - null, - new NotificationEndPointType() - .setEndPointAddress(expectedEndPointAddress)); - - // Act - String actualEndPointAddress = notificationEndPointInfo - .getEndPointAddress(); - - // Assert - assertEquals(expectedEndPointAddress, actualEndPointAddress); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ProtectionKeyEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ProtectionKeyEntityTest.java deleted file mode 100644 index 91889681025f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ProtectionKeyEntityTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.util.List; - -import org.junit.Test; - -/** - * Tests for the methods and factories of the ProtectionKey entity. - */ -public class ProtectionKeyEntityTest { - - public ProtectionKeyEntityTest() throws Exception { - } - - @Test - public void ProtectionKeyIdReturnsPayloadWithTheRightProtectionKeyType() { - List<String> contentKeyTypeArray = ProtectionKey - .getProtectionKeyId(ContentKeyType.StorageEncryption) - .getQueryParameters().get("contentKeyType"); - String actualContentKeyType = contentKeyTypeArray.get(0); - - assertEquals(ContentKeyType.StorageEncryption.getCode(), - Integer.parseInt(actualContentKeyType)); - } - - @Test - public void ProtectionKeyReturnsPayloadWithTheRightProtectionKeyId() { - String expectedProtectionKeyId = "expectedProtectionKey"; - String actualProtectionKeyId = ProtectionKey - .getProtectionKey(expectedProtectionKeyId).getQueryParameters() - .getFirst("ProtectionKeyId"); - expectedProtectionKeyId = String - .format("'%s'", expectedProtectionKeyId); - - assertEquals(expectedProtectionKeyId, actualProtectionKeyId); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/TaskEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/TaskEntityTest.java deleted file mode 100644 index 7927eff9a139..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/TaskEntityTest.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import javax.xml.bind.JAXBElement; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.TaskType; - -/** - * Tests for the methods and factories of the Task entity. - */ -public class TaskEntityTest { - static final String sampleTaskId = "nb:cid:UUID:1151b8bd-9ada-4e7f-9787-8dfa49968eab"; - - private TaskType getTaskType(EntryType entryType) { - for (Object child : entryType.getEntryChildren()) { - if (child instanceof JAXBElement) { - @SuppressWarnings("rawtypes") - JAXBElement element = (JAXBElement) child; - if (element.getDeclaredType() == ContentType.class) { - ContentType contentType = (ContentType) element.getValue(); - for (Object grandChild : contentType.getContent()) { - if (grandChild instanceof JAXBElement) { - @SuppressWarnings("rawtypes") - JAXBElement contentElement = (JAXBElement) grandChild; - TaskType taskType = (TaskType) contentElement - .getValue(); - return taskType; - } - } - return null; - } - } - } - return null; - } - - public TaskEntityTest() throws Exception { - } - - @Test - public void taskCreateReturnsDefaultCreatePayload() { - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task.create(expectedMediaProcessorId, - expectedTaskBody).getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedMediaProcessorId, taskType.getMediaProcessorId()); - assertEquals(expectedTaskBody, taskType.getTaskBody()); - } - - @Test - public void taskCreateCanSetTaskName() { - String expectedName = "TaskCreateCanSetTaskName"; - - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task - .create(expectedMediaProcessorId, expectedTaskBody) - .setName(expectedName).getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedName, taskType.getName()); - } - - @Test - public void taskCreateCanSetConfiguration() { - String expectedConfiguration = "TaskCreateCanSetTaskCofniguration"; - - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task - .create(expectedMediaProcessorId, expectedTaskBody) - .setConfiguration(expectedConfiguration).getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedConfiguration, taskType.getConfiguration()); - } - - @Test - public void taskCreateCanSetPriority() { - Integer expectedPriority = 3; - - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task - .create(expectedMediaProcessorId, expectedTaskBody) - .setPriority(expectedPriority).getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedPriority, taskType.getPriority()); - } - - @Test - public void taskCreateCanSetTaskBody() { - String expectedTaskBodyResult = "expectedTaskBodyResult"; - - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task - .create(expectedMediaProcessorId, expectedTaskBody) - .setTaskBody(expectedTaskBodyResult).getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedTaskBodyResult, taskType.getTaskBody()); - } - - @Test - public void taskCreateCanSetEncryptionKeyId() { - String expectedEncryptionKeyId = "expectedEncryptionKeyId"; - - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task - .create(expectedMediaProcessorId, expectedTaskBody) - .setEncryptionKeyId(expectedEncryptionKeyId).getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedEncryptionKeyId, taskType.getEncryptionKeyId()); - } - - @Test - public void taskCreateCanSetEncryptionScheme() { - String expectedEncryptionScheme = "expectedEncryptionScheme"; - - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task - .create(expectedMediaProcessorId, expectedTaskBody) - .setEncryptionScheme(expectedEncryptionScheme).getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedEncryptionScheme, taskType.getEncryptionScheme()); - } - - @Test - public void taskCreateCanSetEncryptionVersion() { - String expectedEncryptionVersion = "expectedEncryptionVersion"; - - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task - .create(expectedMediaProcessorId, expectedTaskBody) - .setEncryptionVersion(expectedEncryptionVersion).getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedEncryptionVersion, taskType.getEncryptionVersion()); - } - - @Test - public void taskCreateCanSetInitializationVector() { - String expectedInitializationVector = "expectedEncryptionKeyId"; - - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task - .create(expectedMediaProcessorId, expectedTaskBody) - .setInitializationVector(expectedInitializationVector) - .getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedInitializationVector, - taskType.getInitializationVector()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/TaskInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/TaskInfoTest.java deleted file mode 100644 index ec0f74296fa5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/TaskInfoTest.java +++ /dev/null @@ -1,292 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.ErrorDetailType; -import com.microsoft.windowsazure.services.media.implementation.content.TaskType; - -public class TaskInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "expectedId"; - TaskInfo taskInfo = new TaskInfo(null, new TaskType().setId(expectedId)); - - // Act - String actualId = taskInfo.getId(); - - // Assert - assertEquals(expectedId, actualId); - - } - - @Test - public void testGetSetConfiguration() { - // Arrange - String expectedConfiguration = "expectedConfiguration"; - TaskInfo taskInfo = new TaskInfo(null, - new TaskType().setConfiguration(expectedConfiguration)); - - // Act - String actualConfiguration = taskInfo.getConfiguration(); - - // Assert - assertEquals(expectedConfiguration, actualConfiguration); - } - - @Test - public void testGetSetEndTime() throws Exception { - // Arrange - Date expectedEndTime = new Date(); - - TaskInfo taskInfo = new TaskInfo(null, - new TaskType().setEndTime(expectedEndTime)); - - // Act - Date actualEndTime = taskInfo.getEndTime(); - - // Assert - assertEquals(expectedEndTime, actualEndTime); - - } - - @Test - public void testGetSetErrorDetails() throws Exception { - // Arrange - List<ErrorDetail> expectedErrorDetails = new ArrayList<ErrorDetail>(); - List<ErrorDetailType> expectedErrorDetailsType = new ArrayList<ErrorDetailType>(); - for (ErrorDetailType errorDetailType : expectedErrorDetailsType) { - ErrorDetail errorDetail = new ErrorDetail( - errorDetailType.getCode(), errorDetailType.getMessage()); - expectedErrorDetails.add(errorDetail); - } - TaskInfo taskInfo = new TaskInfo(null, - new TaskType().setErrorDetails(expectedErrorDetailsType)); - - // Act - List<ErrorDetail> actualErrorDetails = taskInfo.getErrorDetails(); - - // Assert - assertEquals(expectedErrorDetails, actualErrorDetails); - } - - @Test - public void testGetSetMediaProcessorId() { - // Arrange - String expectedName = "testName"; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setName(expectedName)); - - // Act - String actualName = TaskInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } - - @Test - public void testGetSetName() { - // Arrange - - TaskOption expectedOptions = TaskOption.None; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setOptions(expectedOptions.getCode())); - - // Act - TaskOption actualOptions = TaskInfo.getOptions(); - - // Assert - assertEquals(expectedOptions, actualOptions); - } - - @Test - public void testGetSetPerfMessage() { - // Arrange - String expectedPerfMessage = "testGetSetPerfMessage"; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setPerfMessage(expectedPerfMessage)); - - // Act - String actualPerfMessage = TaskInfo.getPerfMessage(); - - // Assert - assertEquals(expectedPerfMessage, actualPerfMessage); - } - - @Test - public void testGetSetPriority() { - // Arrange - int expectedPriority = 3; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setPriority(expectedPriority)); - - // Act - int actualPriority = TaskInfo.getPriority(); - - // Assert - assertEquals(expectedPriority, actualPriority); - } - - @Test - public void testGetSetProgress() { - // Arrange - double expectedProgress = 3; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setProgress(expectedProgress)); - - // Act - double actualProgress = TaskInfo.getProgress(); - - // Assert - assertEquals(expectedProgress, actualProgress, 0.00001); - } - - @Test - public void testGetSetRunningDuration() { - // Arrange - double expectedRunningDuration = 3; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setRunningDuration(expectedRunningDuration)); - - // Act - double actualRunningDuration = TaskInfo.getRunningDuration(); - - // Assert - assertEquals(expectedRunningDuration, actualRunningDuration, 0.00001); - } - - @Test - public void testGetSetStartTime() { - // Arrange - Date expectedStartTime = new Date(); - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setStartTime(expectedStartTime)); - - // Act - Date actualStartTime = TaskInfo.getStartTime(); - - // Assert - assertEquals(expectedStartTime, actualStartTime); - } - - @Test - public void testGetSetState() { - // Arrange - TaskState expectedState = TaskState.Completed; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setState(expectedState.getCode())); - - // Act - TaskState actualState = TaskInfo.getState(); - - // Assert - assertEquals(expectedState, actualState); - } - - @Test - public void testGetSetTaskBody() { - // Arrange - String expectedTaskBody = "getSetTaskBody"; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setTaskBody(expectedTaskBody)); - - // Act - String actualTaskBody = TaskInfo.getTaskBody(); - - // Assert - assertEquals(expectedTaskBody, actualTaskBody); - } - - @Test - public void testGetSetOptions() { - // Arrange - TaskOption expectedTaskOption = TaskOption.ProtectedConfiguration; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setOptions(expectedTaskOption.getCode())); - - // Act - TaskOption actualTaskOption = TaskInfo.getOptions(); - - // Assert - assertEquals(expectedTaskOption, actualTaskOption); - } - - @Test - public void testGetSetEncryptionKeyId() { - // Arrange - String expectedEncryptionKeyId = "getSetEncryptionKeyId"; - TaskInfo taskInfo = new TaskInfo(null, - new TaskType().setEncryptionKeyId(expectedEncryptionKeyId)); - - // Act - String actualEncryptionKeyId = taskInfo.getEncryptionKeyId(); - - // Assert - assertEquals(expectedEncryptionKeyId, actualEncryptionKeyId); - } - - @Test - public void testGetSetEncryptionScheme() { - // Arrange - String expectedEncryptionScheme = "getSetEncryptionScheme"; - TaskInfo taskInfo = new TaskInfo(null, - new TaskType().setEncryptionScheme(expectedEncryptionScheme)); - - // Act - String actualEncryptionScheme = taskInfo.getEncryptionScheme(); - - // Assert - assertEquals(expectedEncryptionScheme, actualEncryptionScheme); - } - - @Test - public void testGetSetEncryptionVersion() { - // Arrange - String expectedEncryptionVersion = "1.5"; - TaskInfo taskInfo = new TaskInfo(null, - new TaskType().setEncryptionVersion(expectedEncryptionVersion)); - - // Act - String actualEncryptionVersion = taskInfo.getEncryptionVersion(); - - // Assert - assertEquals(expectedEncryptionVersion, actualEncryptionVersion); - } - - @Test - public void testGetSetInitializationVector() { - // Arrange - String expectedInitializationVector = "testInitializationVector"; - TaskInfo taskInfo = new TaskInfo(null, - new TaskType() - .setEncryptionVersion(expectedInitializationVector)); - - // Act - String actualInitializationVector = taskInfo.getEncryptionVersion(); - - // Assert - assertEquals(expectedInitializationVector, actualInitializationVector); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/queue/IntegrationTestBase.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/queue/IntegrationTestBase.java deleted file mode 100644 index 307a62cdfc84..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/queue/IntegrationTestBase.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * - * Copyright (c) Microsoft and contributors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.microsoft.windowsazure.services.queue; - -import com.microsoft.windowsazure.Configuration; - -public abstract class IntegrationTestBase { - protected static Configuration createConfiguration() { - Configuration config = Configuration.getInstance(); - overrideWithEnv(config, QueueConfiguration.ACCOUNT_NAME); - overrideWithEnv(config, QueueConfiguration.ACCOUNT_KEY); - overrideWithEnv(config, QueueConfiguration.URI); - return config; - } - - private static void overrideWithEnv(Configuration config, String key) { - String value = System.getenv(key); - if (value == null) - return; - - config.setProperty(key, value); - } - - protected static boolean isRunningWithEmulator(Configuration config) { - String accountName = "devstoreaccount1"; - String accountKey = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="; - - return accountName.equals(config - .getProperty(QueueConfiguration.ACCOUNT_NAME)) - && accountKey.equals(config - .getProperty(QueueConfiguration.ACCOUNT_KEY)); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/queue/QueueServiceIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/queue/QueueServiceIntegrationTest.java deleted file mode 100644 index af2db32d929b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/queue/QueueServiceIntegrationTest.java +++ /dev/null @@ -1,600 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.util.Date; -import java.util.GregorianCalendar; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Set; -import java.util.TimeZone; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; - -import com.microsoft.windowsazure.Configuration; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.queue.models.CreateQueueOptions; -import com.microsoft.windowsazure.services.queue.models.GetQueueMetadataResult; -import com.microsoft.windowsazure.services.queue.models.ListMessagesOptions; -import com.microsoft.windowsazure.services.queue.models.ListMessagesResult; -import com.microsoft.windowsazure.services.queue.models.ListMessagesResult.QueueMessage; -import com.microsoft.windowsazure.services.queue.models.ListQueuesOptions; -import com.microsoft.windowsazure.services.queue.models.ListQueuesResult; -import com.microsoft.windowsazure.services.queue.models.ListQueuesResult.Queue; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesOptions; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesResult; -import com.microsoft.windowsazure.services.queue.models.ServiceProperties; -import com.microsoft.windowsazure.services.queue.models.UpdateMessageResult; - -public class QueueServiceIntegrationTest extends IntegrationTestBase { - private static final String testQueuesPrefix = "sdktest-"; - private static final String createableQueuesPrefix = "csdktest-"; - private static String TEST_QUEUE_FOR_MESSAGES; - private static String TEST_QUEUE_FOR_MESSAGES_2; - private static String TEST_QUEUE_FOR_MESSAGES_3; - private static String TEST_QUEUE_FOR_MESSAGES_4; - private static String TEST_QUEUE_FOR_MESSAGES_5; - private static String TEST_QUEUE_FOR_MESSAGES_6; - private static String TEST_QUEUE_FOR_MESSAGES_7; - private static String TEST_QUEUE_FOR_MESSAGES_8; - private static String CREATABLE_QUEUE_1; - private static String CREATABLE_QUEUE_2; - private static String CREATABLE_QUEUE_3; - private static String CREATABLE_QUEUE_4; - private static String[] creatableQueues; - private static String[] testQueues; - private static QueueContract service; - private static Configuration config; - - @Rule - public ExpectedException expectedException = ExpectedException.none(); - - @BeforeClass - public static void setup() throws Exception { - // Setup container names array (list of container names used by - // integration tests) - testQueues = new String[10]; - for (int i = 0; i < testQueues.length; i++) { - testQueues[i] = String.format("%s%d", testQueuesPrefix, i + 1); - } - - creatableQueues = new String[10]; - for (int i = 0; i < creatableQueues.length; i++) { - creatableQueues[i] = String.format("%s%d", createableQueuesPrefix, - i + 1); - } - - TEST_QUEUE_FOR_MESSAGES = testQueues[0]; - TEST_QUEUE_FOR_MESSAGES_2 = testQueues[1]; - TEST_QUEUE_FOR_MESSAGES_3 = testQueues[2]; - TEST_QUEUE_FOR_MESSAGES_4 = testQueues[3]; - TEST_QUEUE_FOR_MESSAGES_5 = testQueues[4]; - TEST_QUEUE_FOR_MESSAGES_6 = testQueues[5]; - TEST_QUEUE_FOR_MESSAGES_7 = testQueues[6]; - TEST_QUEUE_FOR_MESSAGES_8 = testQueues[7]; - - CREATABLE_QUEUE_1 = creatableQueues[0]; - CREATABLE_QUEUE_2 = creatableQueues[1]; - CREATABLE_QUEUE_3 = creatableQueues[2]; - CREATABLE_QUEUE_4 = creatableQueues[3]; - - // Create all test containers and their content - config = createConfiguration(); - service = QueueService.create(config); - - createQueues(service, testQueuesPrefix, testQueues); - } - - @AfterClass - public static void cleanup() throws Exception { - - deleteQueues(service, testQueuesPrefix, testQueues); - deleteQueues(service, createableQueuesPrefix, creatableQueues); - } - - private static void createQueues(QueueContract service, String prefix, - String[] list) throws Exception { - Set<String> containers = listQueues(service, prefix); - for (String item : list) { - if (!containers.contains(item)) { - service.createQueue(item); - } - } - } - - private static void deleteQueues(QueueContract service, String prefix, - String[] list) throws Exception { - Set<String> containers = listQueues(service, prefix); - for (String item : list) { - if (containers.contains(item)) { - service.deleteQueue(item); - } - } - } - - private static Set<String> listQueues(QueueContract service, String prefix) - throws Exception { - HashSet<String> result = new HashSet<String>(); - ListQueuesResult list = service.listQueues(new ListQueuesOptions() - .setPrefix(prefix)); - for (Queue item : list.getQueues()) { - result.add(item.getName()); - } - return result; - } - - @Test - public void getServicePropertiesWorks() throws Exception { - // Arrange - - // Don't run this test with emulator, as v1.6 doesn't support this - // method - if (isRunningWithEmulator(config)) { - return; - } - - // Act - ServiceProperties props = service.getServiceProperties().getValue(); - - // Assert - assertNotNull(props); - assertNotNull(props.getLogging()); - assertNotNull(props.getLogging().getRetentionPolicy()); - assertNotNull(props.getLogging().getVersion()); - assertNotNull(props.getMetrics().getRetentionPolicy()); - assertNotNull(props.getMetrics().getVersion()); - } - - @Test - public void setServicePropertiesWorks() throws Exception { - // Arrange - - // Don't run this test with emulator, as v1.6 doesn't support this - // method - if (isRunningWithEmulator(config)) { - return; - } - - // Act - ServiceProperties props = service.getServiceProperties().getValue(); - - props.getLogging().setRead(true); - service.setServiceProperties(props); - - props = service.getServiceProperties().getValue(); - - // Assert - assertNotNull(props); - assertNotNull(props.getLogging()); - assertNotNull(props.getLogging().getRetentionPolicy()); - assertNotNull(props.getLogging().getVersion()); - assertTrue(props.getLogging().isRead()); - assertNotNull(props.getMetrics().getRetentionPolicy()); - assertNotNull(props.getMetrics().getVersion()); - } - - @Test - public void createQueueWorks() throws Exception { - // Arrange - - // Act - service.createQueue(CREATABLE_QUEUE_1); - GetQueueMetadataResult result = service - .getQueueMetadata(CREATABLE_QUEUE_1); - service.deleteQueue(CREATABLE_QUEUE_1); - - // Assert - assertNotNull(result); - assertEquals(0, result.getApproximateMessageCount()); - assertNotNull(result.getMetadata()); - assertEquals(0, result.getMetadata().size()); - } - - @Test - public void deleteQueueWorks() throws Exception { - // Arrange - expectedException.expect(ServiceException.class); - - service.createQueue(CREATABLE_QUEUE_4); - - // Act - service.deleteQueue(CREATABLE_QUEUE_4); - GetQueueMetadataResult result = service - .getQueueMetadata(CREATABLE_QUEUE_4); - - // Assert - assertNull(result); - } - - @Test - public void createQueueWithOptionsWorks() throws Exception { - // Arrange - - // Act - service.createQueue(CREATABLE_QUEUE_2, new CreateQueueOptions() - .addMetadata("foo", "bar").addMetadata("test", "blah")); - GetQueueMetadataResult result = service - .getQueueMetadata(CREATABLE_QUEUE_2); - service.deleteQueue(CREATABLE_QUEUE_2); - - // Assert - assertNotNull(result); - assertEquals(0, result.getApproximateMessageCount()); - assertNotNull(result.getMetadata()); - assertEquals(2, result.getMetadata().size()); - assertEquals("bar", result.getMetadata().get("foo")); - assertEquals("blah", result.getMetadata().get("test")); - } - - @Test - public void listQueuesWorks() throws Exception { - // Arrange - - // Act - ListQueuesResult result = service.listQueues(); - - // Assert - assertNotNull(result); - assertNotNull(result.getQueues()); - assertNotNull(result.getAccountName()); - assertNull(result.getMarker()); - assertEquals(0, result.getMaxResults()); - assertTrue(testQueues.length <= result.getQueues().size()); - } - - @Test - public void listQueuesWithOptionsWorks() throws Exception { - // Arrange - - // Act - ListQueuesResult result = service.listQueues(new ListQueuesOptions() - .setMaxResults(3).setPrefix(testQueuesPrefix)); - ListQueuesResult result2 = service.listQueues(new ListQueuesOptions() - .setMarker(result.getNextMarker()).setPrefix(testQueuesPrefix) - .setIncludeMetadata(true)); - - // Assert - assertNotNull(result); - assertNotNull(result.getQueues()); - assertEquals(3, result.getQueues().size()); - assertEquals(3, result.getMaxResults()); - assertNotNull(result.getAccountName()); - assertNull(result.getMarker()); - assertNotNull(result.getQueues().get(0)); - assertNotNull(result.getQueues().get(0).getMetadata()); - assertNotNull(result.getQueues().get(0).getName()); - assertNotNull(result.getQueues().get(0).getUrl()); - - assertNotNull(result2); - assertNotNull(result2.getQueues()); - assertTrue(testQueues.length - 3 <= result2.getQueues().size()); - assertEquals(0, result2.getMaxResults()); - assertNotNull(result2.getAccountName()); - assertEquals(result.getNextMarker(), result2.getMarker()); - assertNotNull(result2.getQueues().get(0)); - assertNotNull(result2.getQueues().get(0).getMetadata()); - assertNotNull(result2.getQueues().get(0).getName()); - assertNotNull(result2.getQueues().get(0).getUrl()); - } - - @Test - public void setQueueMetadataWorks() throws Exception { - // Arrange - - // Act - service.createQueue(CREATABLE_QUEUE_3); - - HashMap<String, String> metadata = new HashMap<String, String>(); - metadata.put("foo", "bar"); - metadata.put("test", "blah"); - service.setQueueMetadata(CREATABLE_QUEUE_3, metadata); - - GetQueueMetadataResult result = service - .getQueueMetadata(CREATABLE_QUEUE_3); - - service.deleteQueue(CREATABLE_QUEUE_3); - - // Assert - assertNotNull(result); - assertEquals(0, result.getApproximateMessageCount()); - assertNotNull(result.getMetadata()); - assertEquals(2, result.getMetadata().size()); - assertEquals("bar", result.getMetadata().get("foo")); - assertEquals("blah", result.getMetadata().get("test")); - } - - @Test - public void createMessageWorks() throws Exception { - // Arrange - - // Act - service.createMessage(TEST_QUEUE_FOR_MESSAGES, "message1"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES, "message2"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES, "message3"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES, "message4"); - - // Assert - } - - @Test - public void createNullMessageException() throws Exception { - // Arrange - - // Act - expectedException.expect(NullPointerException.class); - service.createMessage(TEST_QUEUE_FOR_MESSAGES, null); - } - - @Test - public void listMessagesWorks() throws Exception { - // Arrange - GregorianCalendar calendar = new GregorianCalendar(); - calendar.setTimeZone(TimeZone.getTimeZone("UTC")); - calendar.set(2010, 01, 01); - Date year2010 = calendar.getTime(); - - // Act - service.createMessage(TEST_QUEUE_FOR_MESSAGES_2, "message1"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_2, "message2"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_2, "message3"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_2, "message4"); - ListMessagesResult result = service - .listMessages(TEST_QUEUE_FOR_MESSAGES_2); - - // Assert - assertNotNull(result); - assertEquals(1, result.getQueueMessages().size()); - - QueueMessage entry = result.getQueueMessages().get(0); - - assertNotNull(entry.getMessageId()); - assertNotNull(entry.getMessageText()); - assertNotNull(entry.getPopReceipt()); - assertEquals(1, entry.getDequeueCount()); - - assertNotNull(entry.getExpirationDate()); - assertTrue(year2010.before(entry.getExpirationDate())); - - assertNotNull(entry.getInsertionDate()); - assertTrue(year2010.before(entry.getInsertionDate())); - - assertNotNull(entry.getTimeNextVisible()); - assertTrue(year2010.before(entry.getTimeNextVisible())); - } - - @Test - public void listMessagesWithOptionsWorks() throws Exception { - // Arrange - GregorianCalendar calendar = new GregorianCalendar(); - calendar.setTimeZone(TimeZone.getTimeZone("UTC")); - calendar.set(2010, 01, 01); - Date year2010 = calendar.getTime(); - - // Act - service.createMessage(TEST_QUEUE_FOR_MESSAGES_3, "message1"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_3, "message2"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_3, "message3"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_3, "message4"); - ListMessagesResult result = service.listMessages( - TEST_QUEUE_FOR_MESSAGES_3, - new ListMessagesOptions().setNumberOfMessages(4) - .setVisibilityTimeoutInSeconds(20)); - - // Assert - assertNotNull(result); - assertEquals(4, result.getQueueMessages().size()); - for (int i = 0; i < 4; i++) { - QueueMessage entry = result.getQueueMessages().get(i); - - assertNotNull(entry.getMessageId()); - assertNotNull(entry.getMessageText()); - assertNotNull(entry.getPopReceipt()); - assertEquals(1, entry.getDequeueCount()); - - assertNotNull(entry.getExpirationDate()); - assertTrue(year2010.before(entry.getExpirationDate())); - - assertNotNull(entry.getInsertionDate()); - assertTrue(year2010.before(entry.getInsertionDate())); - - assertNotNull(entry.getTimeNextVisible()); - assertTrue(year2010.before(entry.getTimeNextVisible())); - } - } - - @Test - public void peekMessagesWorks() throws Exception { - // Arrange - GregorianCalendar calendar = new GregorianCalendar(); - calendar.setTimeZone(TimeZone.getTimeZone("UTC")); - calendar.set(2010, 01, 01); - Date year2010 = calendar.getTime(); - - // Act - service.createMessage(TEST_QUEUE_FOR_MESSAGES_4, "message1"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_4, "message2"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_4, "message3"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_4, "message4"); - PeekMessagesResult result = service - .peekMessages(TEST_QUEUE_FOR_MESSAGES_4); - - // Assert - assertNotNull(result); - assertEquals(1, result.getQueueMessages().size()); - - com.microsoft.windowsazure.services.queue.models.PeekMessagesResult.QueueMessage entry = result - .getQueueMessages().get(0); - - assertNotNull(entry.getMessageId()); - assertNotNull(entry.getMessageText()); - assertEquals(0, entry.getDequeueCount()); - - assertNotNull(entry.getExpirationDate()); - assertTrue(year2010.before(entry.getExpirationDate())); - - assertNotNull(entry.getInsertionDate()); - assertTrue(year2010.before(entry.getInsertionDate())); - } - - @Test - public void peekMessagesWithOptionsWorks() throws Exception { - // Arrange - GregorianCalendar calendar = new GregorianCalendar(); - calendar.setTimeZone(TimeZone.getTimeZone("UTC")); - calendar.set(2010, 01, 01); - Date year2010 = calendar.getTime(); - - // Act - service.createMessage(TEST_QUEUE_FOR_MESSAGES_5, "message1"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_5, "message2"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_5, "message3"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_5, "message4"); - PeekMessagesResult result = service.peekMessages( - TEST_QUEUE_FOR_MESSAGES_5, - new PeekMessagesOptions().setNumberOfMessages(4)); - - // Assert - assertNotNull(result); - assertEquals(4, result.getQueueMessages().size()); - for (int i = 0; i < 4; i++) { - com.microsoft.windowsazure.services.queue.models.PeekMessagesResult.QueueMessage entry = result - .getQueueMessages().get(i); - - assertNotNull(entry.getMessageId()); - assertNotNull(entry.getMessageText()); - assertEquals(0, entry.getDequeueCount()); - - assertNotNull(entry.getExpirationDate()); - assertTrue(year2010.before(entry.getExpirationDate())); - - assertNotNull(entry.getInsertionDate()); - assertTrue(year2010.before(entry.getInsertionDate())); - } - } - - @Test - public void clearMessagesWorks() throws Exception { - // Arrange - - // Act - service.createMessage(TEST_QUEUE_FOR_MESSAGES_6, "message1"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_6, "message2"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_6, "message3"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_6, "message4"); - service.clearMessages(TEST_QUEUE_FOR_MESSAGES_6); - - PeekMessagesResult result = service - .peekMessages(TEST_QUEUE_FOR_MESSAGES_6); - - // Assert - assertNotNull(result); - assertEquals(0, result.getQueueMessages().size()); - } - - @Test - public void deleteMessageWorks() throws Exception { - // Arrange - - // Act - service.createMessage(TEST_QUEUE_FOR_MESSAGES_7, "message1"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_7, "message2"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_7, "message3"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_7, "message4"); - - ListMessagesResult result = service - .listMessages(TEST_QUEUE_FOR_MESSAGES_7); - service.deleteMessage(TEST_QUEUE_FOR_MESSAGES_7, result - .getQueueMessages().get(0).getMessageId(), result - .getQueueMessages().get(0).getPopReceipt()); - ListMessagesResult result2 = service.listMessages( - TEST_QUEUE_FOR_MESSAGES_7, - new ListMessagesOptions().setNumberOfMessages(32)); - - // Assert - assertNotNull(result2); - assertEquals(3, result2.getQueueMessages().size()); - } - - @Test - public void updateNullMessageException() throws Exception { - // Arrange - String messageId = "messageId"; - - String popReceipt = "popReceipt"; - String messageText = null; - int visibilityTimeoutInSeconds = 10; - - // Act - expectedException.expect(NullPointerException.class); - service.updateMessage(TEST_QUEUE_FOR_MESSAGES_8, messageId, popReceipt, - messageText, visibilityTimeoutInSeconds); - - } - - @Test - public void updateMessageWorks() throws Exception { - // Arrange - GregorianCalendar calendar = new GregorianCalendar(); - calendar.setTimeZone(TimeZone.getTimeZone("UTC")); - calendar.set(2010, 01, 01); - Date year2010 = calendar.getTime(); - - // Act - service.createMessage(TEST_QUEUE_FOR_MESSAGES_8, "message1"); - - ListMessagesResult listResult1 = service - .listMessages(TEST_QUEUE_FOR_MESSAGES_8); - UpdateMessageResult updateResult = service.updateMessage( - TEST_QUEUE_FOR_MESSAGES_8, listResult1.getQueueMessages() - .get(0).getMessageId(), listResult1.getQueueMessages() - .get(0).getPopReceipt(), "new text", 0); - ListMessagesResult listResult2 = service - .listMessages(TEST_QUEUE_FOR_MESSAGES_8); - - // Assert - assertNotNull(updateResult); - assertNotNull(updateResult.getPopReceipt()); - assertNotNull(updateResult.getTimeNextVisible()); - assertTrue(year2010.before(updateResult.getTimeNextVisible())); - - assertNotNull(listResult2); - QueueMessage entry = listResult2.getQueueMessages().get(0); - - assertEquals(listResult1.getQueueMessages().get(0).getMessageId(), - entry.getMessageId()); - assertEquals("new text", entry.getMessageText()); - assertNotNull(entry.getPopReceipt()); - assertEquals(2, entry.getDequeueCount()); - - assertNotNull(entry.getExpirationDate()); - assertTrue(year2010.before(entry.getExpirationDate())); - - assertNotNull(entry.getInsertionDate()); - assertTrue(year2010.before(entry.getInsertionDate())); - - assertNotNull(entry.getTimeNextVisible()); - assertTrue(year2010.before(entry.getTimeNextVisible())); - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceScenarioTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceScenarioTest.java deleted file mode 100644 index 44ae452e53da..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceScenarioTest.java +++ /dev/null @@ -1,231 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.scenarios; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; - -import java.io.InputStream; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.List; -import java.util.Random; -import java.util.UUID; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.MediaContract; -import com.microsoft.windowsazure.services.media.MediaService; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.AssetOption; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.Task; -import com.microsoft.windowsazure.services.scenarios.MediaServiceWrapper.EncoderType; - -public class MediaServiceScenarioTest extends ScenarioTestBase { - private static final String rootTestAssetPrefix = "testAssetPrefix-"; - private static final String testJobPrefix = "testJobPrefix"; - private static String testAssetPrefix; - private static MediaServiceWrapper wrapper; - private static MediaServiceValidation validator; - - @BeforeClass - public static void setup() throws ServiceException { - ScenarioTestBase.initializeConfig(); - MediaContract service = MediaService.create(config); - wrapper = new MediaServiceWrapper(service); - validator = new MediaServiceValidation(service); - testAssetPrefix = rootTestAssetPrefix + UUID.randomUUID() + "-"; - } - - @AfterClass - public static void cleanup() throws ServiceException { - wrapper.removeAllAssetsWithPrefix(rootTestAssetPrefix); - wrapper.removeAllAccessPoliciesWithPrefix(); - wrapper.removeAllJobWithPrefix(testJobPrefix); - ScenarioTestBase.cleanupConfig(); - } - - @Test - public void newAsset() throws Exception { - AssetInfo asset = wrapper.createAsset(testAssetPrefix + "newAsset", - AssetOption.None); - validator.validateAsset(asset, testAssetPrefix + "newAsset", - AssetOption.None); - } - - @Test - public void pageOverAssets() throws ServiceException { - signalSetupStarting(); - String rootName = testAssetPrefix + "pageOverAssets"; - List<String> assetNames = createListOfAssetNames(rootName, 4); - for (String assetName : assetNames) { - wrapper.createAsset(assetName, AssetOption.None); - } - signalSetupFinished(); - - List<ListResult<AssetInfo>> pages = wrapper.getAssetSortedPagedResults( - rootName, 3); - validator.validateAssetSortedPages(pages, assetNames, 3); - } - - @Test - public void uploadFiles() throws Exception { - signalSetupStarting(); - AssetInfo asset = wrapper.createAsset(testAssetPrefix + "uploadFiles", - AssetOption.None); - signalSetupFinished(); - - wrapper.uploadFilesToAsset(asset, 10, getTestAssetFiles()); - validator.validateAssetFiles(asset, getTestAssetFiles()); - } - - @Test - public void uploadEncryptedFiles() throws Exception { - signalSetupStarting(); - byte[] aesKey = getNewAesKey(); - AssetInfo asset = wrapper.createAsset(testAssetPrefix - + "uploadEncryptedFiles", AssetOption.StorageEncrypted); - - signalSetupFinished(); - - wrapper.uploadFilesToAsset(asset, 10, getTestAssetFiles(), aesKey); - validator.validateAssetFiles(asset, getTestAssetFiles()); - } - - @Test - public void downloadFiles() throws Exception { - signalSetupStarting(); - AssetInfo asset = wrapper.createAsset( - testAssetPrefix + "downloadFiles", AssetOption.None); - wrapper.uploadFilesToAsset(asset, 10, getTestAssetFiles()); - signalSetupFinished(); - - Map<String, InputStream> actualFileStreams = wrapper - .downloadFilesFromAsset(asset, 10); - validator.validateAssetFiles(getTestAssetFiles(), actualFileStreams); - } - - @Test - public void createJob() throws Exception { - signalSetupStarting(); - AssetInfo asset = wrapper.createAsset(testAssetPrefix + "createJob", - AssetOption.None); - wrapper.uploadFilesToAsset(asset, 10, getTestAssetFiles()); - signalSetupFinished(); - - String jobName = testJobPrefix + UUID.randomUUID().toString(); - JobInfo job = wrapper.createJob(jobName, asset, createTasks()); - validator.validateJob(job, jobName, asset, createTasks()); - } - - @Test - public void transformAsset() throws Exception { - signalSetupStarting(); - AssetInfo asset = wrapper.createAsset(testAssetPrefix - + "transformAsset", AssetOption.None); - wrapper.uploadFilesToAsset(asset, 10, getTestAssetFiles()); - String jobName = testJobPrefix + UUID.randomUUID().toString(); - - JobInfo job = wrapper.createJob(jobName, asset, wrapper - .createTaskOptions("Transform", 0, 0, - EncoderType.WindowsAzureMediaEncoder)); - signalSetupFinished(); - - waitForJobToFinish(job); - List<AssetInfo> outputAssets = wrapper.getJobOutputMediaAssets(job); - - validator.validateOutputAssets(outputAssets, getTestAssetFiles().keySet()); - } - - @Test - public void transformEncryptedAsset() throws Exception { - signalSetupStarting(); - byte[] aesKey = getNewAesKey(); - AssetInfo asset = wrapper.createAsset(testAssetPrefix - + "transformEncryptedAsset", AssetOption.StorageEncrypted); - - wrapper.uploadFilesToAsset(asset, 10, getTestAssetFiles(), aesKey); - String jobName = "my job transformEncryptedAsset" - + UUID.randomUUID().toString(); - JobInfo job = wrapper.createJob(jobName, asset, wrapper - .createTaskOptions("Decode", 0, 0, - EncoderType.StorageDecryption)); - signalSetupFinished(); - - waitForJobToFinish(job); - List<AssetInfo> outputAssets = wrapper.getJobOutputMediaAssets(job); - validator.validateOutputAssets(outputAssets, getTestAssetFiles().keySet()); - - // Verify output asset files. - assertEquals("output assets count", 1, outputAssets.size()); - AssetInfo outputAsset = outputAssets.get(0); - validator.validateAssetFiles(outputAsset, getTestAssetFiles()); - - // Verify assets were decoded. - Map<String, InputStream> actualFileStreams = wrapper.downloadFilesFromAsset(outputAsset, 10); - validator.validateAssetFiles(getTestAssetFiles(), actualFileStreams); - } - - private byte[] getNewAesKey() { - // Media Services requires 256-bit (32-byte) keys for AES encryption. - Random random = new Random(); - byte[] aesKey = new byte[32]; - random.nextBytes(aesKey); - return aesKey; - } - - private void waitForJobToFinish(JobInfo job) throws InterruptedException, - ServiceException { - for (int counter = 0; !wrapper.isJobFinished(job); counter++) { - if (counter > 30) { - fail("Took took long for the job to finish"); - } - Thread.sleep(10000); - } - } - - private List<Task.CreateBatchOperation> createTasks() - throws ServiceException { - List<Task.CreateBatchOperation> tasks = new ArrayList<Task.CreateBatchOperation>(); - - tasks.add(wrapper.createTaskOptions("Decryptor", 0, 0, - EncoderType.StorageDecryption)); - tasks.add(wrapper.createTaskOptions("Processor", 0, 1, - EncoderType.WindowsAzureMediaEncoder)); - return tasks; - } - - private Map<String, InputStream> getTestAssetFiles() { - Map<String, InputStream> inputFiles = new HashMap<String, InputStream>(); - inputFiles.put("MPEG4-H264.mp4", - getClass().getResourceAsStream("/media/MPEG4-H264.mp4")); - return inputFiles; - } - - private List<String> createListOfAssetNames(String rootName, int count) { - List<String> assetNames = new ArrayList<String>(); - for (int i = 0; i < count; i++) { - assetNames.add(rootName + i); - } - return assetNames; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceValidation.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceValidation.java deleted file mode 100644 index 9f9ccec71cbb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceValidation.java +++ /dev/null @@ -1,298 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.scenarios; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.io.InputStream; -import java.security.NoSuchAlgorithmException; -import java.util.ArrayList; -import java.util.Date; -import java.util.Map; -import java.util.List; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.MediaContract; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetFile; -import com.microsoft.windowsazure.services.media.models.AssetFileInfo; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.AssetOption; -import com.microsoft.windowsazure.services.media.models.AssetState; -import com.microsoft.windowsazure.services.media.models.ContentKey; -import com.microsoft.windowsazure.services.media.models.ContentKeyInfo; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.Task; -import java.util.Set; - -class MediaServiceValidation { - private final MediaContract service; - - public MediaServiceValidation(MediaContract service) { - this.service = service; - } - - public void validateAsset(AssetInfo asset, String name, - AssetOption encryption) throws ServiceException { - // Check the asset state. - assertNotNull("asset", asset); - assertNotNull("asset.getId", asset.getId()); - assertFalse("asset.getId != ''", "".equals(asset.getId())); - assertEquals("asset.state", AssetState.Initialized, asset.getState()); - assertEquals("asset.getOptions", encryption, asset.getOptions()); - - // Verify no files by default. - List<AssetFileInfo> initialFiles = service.list(AssetFile.list(asset - .getAssetFilesLink())); - assertNotNull("initialFiles", initialFiles); - assertEquals("initialFiles.size", 0, initialFiles.size()); - - // Reload asset from server for ID - AssetInfo reloadedAsset = service.get(Asset.get(asset.getId())); - - // Verify names match - assertNotNull("reloadedAsset", reloadedAsset); - assertNotNull("reloadedAsset.getId", reloadedAsset.getId()); - assertEquals("reloadedAsset.getId, asset.getId", asset.getId(), - reloadedAsset.getId()); - assertEquals("reloadedAsset.state", AssetState.Initialized, - reloadedAsset.getState()); - assertEquals("reloadedAsset.getOptions", encryption, - reloadedAsset.getOptions()); - } - - public void validateAssetSortedPages(List<ListResult<AssetInfo>> pages, - List<String> assetNames, int pageSize) { - int sumSizeOfPages = 0; - List<String> actualAssetNames = new ArrayList<String>(); - - for (ListResult<AssetInfo> page : pages) { - sumSizeOfPages += page.size(); - for (AssetInfo asset : page) { - actualAssetNames.add(asset.getName()); - } - } - - assertEquals("sumSizeOfPages", assetNames.size(), sumSizeOfPages); - assertEquals("size of last page", 0, pages.get(pages.size() - 1).size()); - - // Do not worry about comparing the details of the sorted pages, - // because Media Services splits on the internal order, then sorts - // each page individually. - } - - public void validateAssetFiles(AssetInfo asset, - Map<String, InputStream> inputFiles) throws ServiceException, - IOException, NoSuchAlgorithmException { - List<AssetFileInfo> assetFiles = service.list(AssetFile.list(asset - .getAssetFilesLink())); - - assertNotNull("assetFiles", assetFiles); - assertEquals("assetFiles.size", inputFiles.size(), assetFiles.size()); - - ContentKeyInfo contentKey = null; - if (asset.getOptions() == AssetOption.StorageEncrypted) { - ListResult<ContentKeyInfo> contentKeys = service.list(ContentKey - .list(asset.getContentKeysLink())); - assertEquals("contentKeys size", 1, contentKeys.size()); - contentKey = contentKeys.get(0); - } - - // Compare encryption info for asset files - for (AssetFileInfo assetFile : assetFiles) { - if (asset.getOptions() == AssetOption.StorageEncrypted) { - assertEquals("assetFile.getIsEncrypted", true, - assetFile.getIsEncrypted()); - assertEquals("assetFile.getEncryptionKeyId", - contentKey.getId(), assetFile.getEncryptionKeyId()); - assertNotNullOrEmpty("assetFile.getEncryptionScheme", - assetFile.getEncryptionScheme()); - assertNotNullOrEmpty("assetFile.getEncryptionVersion", - assetFile.getEncryptionVersion()); - assertNotNullOrEmpty("assetFile.getInitializationVector", - assetFile.getInitializationVector()); - } else { - assertEquals("assetFile.getIsEncrypted", false, - assetFile.getIsEncrypted()); - assertNullOrEmpty("assetFile.getEncryptionKeyId", - assetFile.getEncryptionKeyId()); - assertNullOrEmpty("assetFile.getEncryptionScheme", - assetFile.getEncryptionScheme()); - assertNullOrEmpty("assetFile.getEncryptionVersion", - assetFile.getEncryptionVersion()); - assertNullOrEmpty("assetFile.getInitializationVector", - assetFile.getInitializationVector()); - } - } - - // Compare the asset files with all files - List<AssetFileInfo> allFiles = service.list(AssetFile.list()); - for (AssetFileInfo assetFile : assetFiles) { - assertEquals("fi.getParentAssetId", asset.getId(), - assetFile.getParentAssetId()); - AssetFileInfo match = null; - for (AssetFileInfo aFile : allFiles) { - if (aFile.getId().equals(assetFile.getId())) { - match = aFile; - break; - } - } - - assertFileInfosEqual("match from all files", assetFile, match); - } - } - - public void validateAssetFiles(Map<String, InputStream> inputFiles, - Map<String, InputStream> actualFileStreams) - throws IOException, InterruptedException { - assertEquals("fileUrls count", inputFiles.size(), - actualFileStreams.size()); - for (String fileName : actualFileStreams.keySet()) { - InputStream expected = inputFiles.get(fileName); - InputStream actual = actualFileStreams.get(fileName); - assertStreamsEqual(expected, actual); - } - } - - public void validateJob(JobInfo job, String name, AssetInfo asset, - List<Task.CreateBatchOperation> createTasks) - throws ServiceException { - assertDateApproxEquals("getEndTime", new Date(), job.getCreated()); - assertEquals("job.getName", name, job.getName()); - - List<AssetInfo> inputAssets = service.list(Asset.list(job - .getInputAssetsLink())); - assertNotNull("inputAssets", inputAssets); - assertEquals("inputAssets.size()", 1, inputAssets.size()); - assertEquals("inputAssets.get(0)", asset.getId(), inputAssets.get(0) - .getId()); - - List<AssetInfo> outputAssets = service.list(Asset.list(job - .getOutputAssetsLink())); - assertNotNull("outputAssets", outputAssets); - assertEquals("outputAssets.size()", createTasks.size(), - outputAssets.size()); - } - - public void validateOutputAssets(List<AssetInfo> outputAssets, - Set<String> enumeration) { - assertNotNull("outputAssets", outputAssets); - for (AssetInfo asset : outputAssets) { - assertNotNull("asset", asset); - assertNotNull("asset.getId", asset.getId()); - assertFalse("asset.getId != ''", "".equals(asset.getId())); - assertEquals("asset.state", AssetState.Initialized, - asset.getState()); - assertEquals("asset.getOptions", AssetOption.None, - asset.getOptions()); - } - } - - public void assertFileInfosEqual(String message, AssetFileInfo fi, - AssetFileInfo match) { - assertNotNull(message + ":fi", fi); - assertNotNull(message + ":match", match); - assertEquals(message + ":getContentChecksum", fi.getContentChecksum(), - match.getContentChecksum()); - assertEquals(message + ":getContentFileSize", fi.getContentFileSize(), - match.getContentFileSize()); - assertEquals(message + ":getCreated", fi.getCreated(), - match.getCreated()); - assertEquals(message + ":getEncryptionKeyId", fi.getEncryptionKeyId(), - match.getEncryptionKeyId()); - assertEquals(message + ":getEncryptionScheme", - fi.getEncryptionScheme(), match.getEncryptionScheme()); - assertEquals(message + ":getEncryptionVersion", - fi.getEncryptionVersion(), match.getEncryptionVersion()); - assertEquals(message + ":getId", fi.getId(), match.getId()); - assertEquals(message + ":getIsEncrypted", fi.getIsEncrypted(), - match.getIsEncrypted()); - assertEquals(message + ":getIsPrimary", fi.getIsPrimary(), - match.getIsPrimary()); - assertEquals(message + ":getLastModified", fi.getLastModified(), - match.getLastModified()); - assertEquals(message + ":getMimeType", fi.getMimeType(), - match.getMimeType()); - assertEquals(message + ":getName", fi.getName(), match.getName()); - assertEquals(message + ":getParentAssetId", fi.getParentAssetId(), - match.getParentAssetId()); - } - - protected void assertDateApproxEquals(String message, Date expected, - Date actual) { - // Default allows for a 30 seconds difference in dates, for clock skew, - // network delays, etc. - long deltaInMilliseconds = 30000; - - if (expected == null || actual == null) { - assertEquals(message, expected, actual); - } else { - long diffInMilliseconds = Math.abs(expected.getTime() - - actual.getTime()); - - if (diffInMilliseconds > deltaInMilliseconds) { - assertEquals(message, expected, actual); - } - } - } - - private void assertStreamsEqual(InputStream inputStream1, - InputStream inputStream2) throws IOException { - byte[] buffer1 = new byte[1024]; - byte[] buffer2 = new byte[1024]; - try { - while (true) { - int n1 = inputStream1.read(buffer1); - int n2 = inputStream2.read(buffer2); - assertEquals("number of bytes read from streams", n1, n2); - if (n1 == -1) { - break; - } - for (int i = 0; i < n1; i++) { - assertEquals("byte " + i + " read from streams", - buffer1[i], buffer2[i]); - } - } - } finally { - inputStream1.close(); - inputStream2.close(); - } - } - - private void assertNullOrEmpty(String message, String actual) { - if (actual == null) { - assertNull(message, actual); - } else { - assertEquals(message, "", actual); - } - } - - private void assertNotNullOrEmpty(String message, String actual) { - if (actual == null) { - assertNotNull(message, actual); - } else { - assertTrue(message + ": expect " + actual + " to be null or empty", - actual.length() > 0); - } - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceWrapper.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceWrapper.java deleted file mode 100644 index 26b5d99e8052..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceWrapper.java +++ /dev/null @@ -1,549 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.scenarios; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.math.BigInteger; -import java.net.MalformedURLException; -import java.net.URL; -import java.security.DigestInputStream; -import java.security.Key; -import java.security.MessageDigest; -import java.security.SecureRandom; -import java.security.cert.Certificate; -import java.security.cert.CertificateFactory; -import java.util.ArrayList; -import java.util.EnumSet; -import java.util.Map; -import java.util.List; -import java.util.Random; -import java.util.UUID; - -import javax.crypto.Cipher; -import javax.crypto.CipherInputStream; -import javax.crypto.spec.IvParameterSpec; -import javax.crypto.spec.SecretKeySpec; - -import com.microsoft.windowsazure.core.utils.Base64; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.MediaContract; -import com.microsoft.windowsazure.services.media.WritableBlobContainerContract; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.implementation.content.AssetFileType; -import com.microsoft.windowsazure.services.media.models.AccessPolicy; -import com.microsoft.windowsazure.services.media.models.AccessPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AccessPolicyPermission; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetFile; -import com.microsoft.windowsazure.services.media.models.AssetFile.Updater; -import com.microsoft.windowsazure.services.media.models.AssetFileInfo; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.AssetOption; -import com.microsoft.windowsazure.services.media.models.ContentKey; -import com.microsoft.windowsazure.services.media.models.ContentKeyType; -import com.microsoft.windowsazure.services.media.models.Job; -import com.microsoft.windowsazure.services.media.models.Job.Creator; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.Locator; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; -import com.microsoft.windowsazure.services.media.models.LocatorType; -import com.microsoft.windowsazure.services.media.models.MediaProcessor; -import com.microsoft.windowsazure.services.media.models.MediaProcessorInfo; -import com.microsoft.windowsazure.services.media.models.ProtectionKey; -import com.microsoft.windowsazure.services.media.models.Task; -import java.util.HashMap; - -import org.junit.Assert; - -class MediaServiceWrapper { - private final MediaContract service; - - private static final String accessPolicyPrefix = "scenarioTestPrefix"; - - private final String MEDIA_PROCESSOR_STORAGE_DECRYPTION = "Storage Decryption"; - private final String MEDIA_PROCESSOR_WINDOWS_AZURE_MEDIA_ENCODER = "Media Encoder Standard"; - - public static enum EncoderType { - WindowsAzureMediaEncoder, StorageDecryption - } - - public MediaServiceWrapper(MediaContract service) { - this.service = service; - } - - // Manage - public AssetInfo createAsset(String name, AssetOption encryption) - throws ServiceException { - if (encryption == AssetOption.StorageEncrypted - && !EncryptionHelper.canUseStrongCrypto()) { - Assert.fail("JVM does not support the required encryption"); - } - - // Create asset. The SDK's top-level method is the simplest way to do - // that. - return service.create(Asset.create().setName(name) - .setAlternateId("altId").setOptions(encryption)); - } - - public List<ListResult<AssetInfo>> getAssetSortedPagedResults( - String rootName, int pageSize) throws ServiceException { - List<ListResult<AssetInfo>> pages = new ArrayList<ListResult<AssetInfo>>(); - for (int skip = 0; true; skip += pageSize) { - EntityListOperation<AssetInfo> listOperation = Asset.list() - .setTop(pageSize).setSkip(skip) - .set("$filter", "startswith(Name,'" + rootName + "')") - .set("$orderby", "Name"); - - ListResult<AssetInfo> listAssetResult = service.list(listOperation); - pages.add(listAssetResult); - if (listAssetResult.isEmpty()) { - break; - } - } - - return pages; - } - - // Ingest - public void uploadFilesToAsset(AssetInfo asset, int uploadWindowInMinutes, - Map<String, InputStream> inputFiles) throws Exception { - uploadFilesToAsset(asset, uploadWindowInMinutes, inputFiles, null); - } - - public void uploadFilesToAsset(AssetInfo asset, int uploadWindowInMinutes, - Map<String, InputStream> inputFiles, byte[] aesKey) - throws Exception { - AccessPolicyInfo accessPolicy = service.create(AccessPolicy.create( - accessPolicyPrefix + "tempAccessPolicy", uploadWindowInMinutes, - EnumSet.of(AccessPolicyPermission.WRITE))); - LocatorInfo locator = service.create(Locator.create( - accessPolicy.getId(), asset.getId(), LocatorType.SAS)); - - String contentKeyId = createAssetContentKey(asset, aesKey); - - WritableBlobContainerContract uploader = service - .createBlobWriter(locator); - - Map<String, AssetFileInfo> infoToUpload = new HashMap<String, AssetFileInfo>(); - - boolean isFirst = true; - for (String fileName : inputFiles.keySet()) { - MessageDigest digest = MessageDigest.getInstance("MD5"); - - InputStream inputStream = inputFiles.get(fileName); - - byte[] iv = null; - if (aesKey != null) { - iv = createIV(); - inputStream = EncryptionHelper.encryptFile(inputStream, aesKey, - iv); - } - - InputStream digestStream = new DigestInputStream(inputStream, - digest); - CountingStream countingStream = new CountingStream(digestStream); - uploader.createBlockBlob(fileName, countingStream); - - inputStream.close(); - byte[] md5hash = digest.digest(); - String md5 = Base64.encode(md5hash); - - AssetFileInfo fi = new AssetFileInfo(null, new AssetFileType() - .setContentChecksum(md5) - .setContentFileSize(countingStream.getCount()) - .setIsPrimary(isFirst).setName(fileName) - .setInitializationVector(getIVString(iv))); - infoToUpload.put(fileName, fi); - - isFirst = false; - } - - service.action(AssetFile.createFileInfos(asset.getId())); - for (AssetFileInfo assetFile : service.list(AssetFile.list(asset - .getAssetFilesLink()))) { - AssetFileInfo fileInfo = infoToUpload.get(assetFile.getName()); - Updater updateOp = AssetFile.update(assetFile.getId()) - .setContentChecksum(fileInfo.getContentChecksum()) - .setContentFileSize(fileInfo.getContentFileSize()) - .setIsPrimary(fileInfo.getIsPrimary()); - - if (aesKey != null) { - updateOp.setIsEncrypted(true) - .setEncryptionKeyId(contentKeyId) - .setEncryptionScheme("StorageEncryption") - .setEncryptionVersion("1.0") - .setInitializationVector( - fileInfo.getInitializationVector()); - } - - service.update(updateOp); - } - - service.list(AssetFile.list(asset.getAssetFilesLink())); - - service.delete(Locator.delete(locator.getId())); - service.delete(AccessPolicy.delete(accessPolicy.getId())); - } - - private String getIVString(byte[] iv) { - if (iv == null) { - return null; - } - - // Offset the bytes to ensure that the sign-bit is not set. - // Media Services expects unsigned Int64 values. - byte[] sub = new byte[9]; - System.arraycopy(iv, 0, sub, 1, 8); - BigInteger longIv = new BigInteger(sub); - return longIv.toString(); - } - - private byte[] createIV() { - // Media Services requires 128-bit (16-byte) initialization vectors (IV) - // for AES encryption, but also that only the first 8 bytes are filled. - Random random = new Random(); - byte[] effectiveIv = new byte[8]; - random.nextBytes(effectiveIv); - byte[] iv = new byte[16]; - System.arraycopy(effectiveIv, 0, iv, 0, effectiveIv.length); - return iv; - } - - private String createAssetContentKey(AssetInfo asset, byte[] aesKey) - throws Exception { - if (aesKey == null) { - return null; - } - - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.StorageEncryption)); - String protectionKey = service.action(ProtectionKey - .getProtectionKey(protectionKeyId)); - - String contentKeyIdUuid = UUID.randomUUID().toString(); - String contentKeyId = "nb:kid:UUID:" + contentKeyIdUuid; - - byte[] encryptedContentKey = EncryptionHelper.encryptSymmetricKey( - protectionKey, aesKey); - String encryptedContentKeyString = Base64.encode(encryptedContentKey); - String checksum = EncryptionHelper.calculateContentKeyChecksum( - contentKeyIdUuid, aesKey); - - service.create(ContentKey - .create(contentKeyId, ContentKeyType.StorageEncryption, - encryptedContentKeyString).setChecksum(checksum) - .setProtectionKeyId(protectionKeyId)); - service.action(Asset.linkContentKey(asset.getId(), contentKeyId)); - return contentKeyId; - } - - private static class CountingStream extends InputStream { - private final InputStream wrappedStream; - private long count; - - public CountingStream(InputStream wrapped) { - wrappedStream = wrapped; - count = 0; - } - - @Override - public int read() throws IOException { - count++; - return wrappedStream.read(); - } - - public long getCount() { - return count; - } - } - - // Process - public JobInfo createJob(String jobName, AssetInfo inputAsset, - Task.CreateBatchOperation task) throws ServiceException { - List<Task.CreateBatchOperation> tasks = new ArrayList<Task.CreateBatchOperation>(); - tasks.add(task); - return createJob(jobName, inputAsset, tasks); - } - - public JobInfo createJob(String jobName, AssetInfo inputAsset, - List<Task.CreateBatchOperation> tasks) throws ServiceException { - Creator jobCreator = Job.create().setName(jobName) - .addInputMediaAsset(inputAsset.getId()).setPriority(2); - - for (Task.CreateBatchOperation task : tasks) { - jobCreator.addTaskCreator(task); - } - - return service.create(jobCreator); - } - - // Process - public Task.CreateBatchOperation createTaskOptions(String taskName, - int inputAssetId, int outputAssetId, EncoderType encoderType) - throws ServiceException { - String taskBody = getTaskBody(inputAssetId, outputAssetId); - - String processor = null; - String configuration = null; - switch (encoderType) { - case WindowsAzureMediaEncoder: - processor = getMediaProcessorIdByName(MEDIA_PROCESSOR_WINDOWS_AZURE_MEDIA_ENCODER); - // Full list of configurations strings for version 2.1 is at: - // http://msdn.microsoft.com/en-us/library/jj129582.aspx - configuration = "VC1 Broadband SD 4x3"; - break; - case StorageDecryption: - processor = getMediaProcessorIdByName(MEDIA_PROCESSOR_STORAGE_DECRYPTION); - configuration = null; - break; - default: - break; - } - - Task.CreateBatchOperation taskCreate = Task.create(processor, taskBody) - .setName(taskName).setConfiguration(configuration); - - return taskCreate; - } - - private String getTaskBody(int inputAssetId, int outputAssetId) { - return "<taskBody><inputAsset>JobInputAsset(" + inputAssetId - + ")</inputAsset>" + "<outputAsset>JobOutputAsset(" - + outputAssetId + ")</outputAsset></taskBody>"; - } - - private String getMediaProcessorIdByName(String processorName) - throws ServiceException { - EntityListOperation<MediaProcessorInfo> operation = MediaProcessor - .list(); - operation.getQueryParameters().putSingle("$filter", - "(Name eq '" + processorName + "')"); - MediaProcessorInfo processor = service.list(operation).get(0); - return processor.getId(); - } - - // Process - public boolean isJobFinished(JobInfo initialJobInfo) - throws ServiceException { - JobInfo currentJob = service.get(Job.get(initialJobInfo.getId())); - System.out.println(currentJob.getState()); - switch (currentJob.getState()) { - case Finished: - case Canceled: - case Error: - return true; - default: - return false; - } - } - - public List<AssetInfo> getJobOutputMediaAssets(JobInfo job) - throws ServiceException { - return service.list(Asset.list(job.getOutputAssetsLink())); - } - - // Process - public void cancelJob(JobInfo job) throws ServiceException { - // Use the service function - service.action(Job.cancel(job.getId())); - } - - // Deliver - private Map<String, URL> createFileURLsFromAsset(AssetInfo asset, - int availabilityWindowInMinutes) throws ServiceException, - MalformedURLException { - Map<String, URL> ret = new HashMap<String, URL>(); - - AccessPolicyInfo readAP = service.create(AccessPolicy.create( - accessPolicyPrefix + "tempAccessPolicy", - availabilityWindowInMinutes, - EnumSet.of(AccessPolicyPermission.READ))); - LocatorInfo readLocator = service.create(Locator.create(readAP.getId(), - asset.getId(), LocatorType.SAS)); - - List<AssetFileInfo> publishedFiles = service.list(AssetFile.list(asset - .getAssetFilesLink())); - for (AssetFileInfo fi : publishedFiles) { - ret.put(fi.getName(), - new URL(readLocator.getBaseUri() + "/" + fi.getName() - + readLocator.getContentAccessToken())); - } - - return ret; - } - - // Deliver - public Map<String, InputStream> downloadFilesFromAsset( - AssetInfo asset, int downloadWindowInMinutes) throws Exception { - Map<String, URL> urls = createFileURLsFromAsset(asset, - downloadWindowInMinutes); - Map<String, InputStream> ret = new HashMap<String, InputStream>(); - - for (String fileName : urls.keySet()) { - URL url = urls.get(fileName); - InputStream stream = getInputStreamWithRetry(url); - ret.put(fileName, stream); - } - - return ret; - } - - // This method is needed because there can be a delay before a new read - // locator - // is applied for the asset files. - private InputStream getInputStreamWithRetry(URL file) throws IOException, - InterruptedException { - InputStream reader = null; - for (int counter = 0; true; counter++) { - try { - reader = file.openConnection().getInputStream(); - break; - } catch (IOException e) { - System.out.println("Got error, wait a bit and try again"); - if (counter < 6) { - Thread.sleep(10000); - } else { - // No more retries. - throw e; - } - } - } - - return reader; - } - - public void removeAllAssetsWithPrefix(String assetPrefix) - throws ServiceException { - ListResult<LocatorInfo> locators = service.list(Locator.list()); - EntityListOperation<AssetInfo> operation = Asset.list(); - operation.getQueryParameters().add("$filter", - "startswith(Name,'" + assetPrefix + "')"); - List<AssetInfo> assets = service.list(operation); - for (AssetInfo asset : assets) { - if (asset.getName().length() > assetPrefix.length() - && asset.getName().substring(0, assetPrefix.length()) - .equals(assetPrefix)) { - for (LocatorInfo locator : locators) { - if (locator.getAssetId().equals(asset.getId())) { - try { - service.delete(Locator.delete(locator.getId())); - } catch (ServiceException e) { - // Don't worry if cannot delete now. - // Might be held on to by a running job - } - } - } - - try { - service.delete(Asset.delete(asset.getId())); - } catch (ServiceException e) { - // Don't worry if cannot delete now. - // Might be held on to by a running job - } - } - } - } - - public void removeAllAccessPoliciesWithPrefix() throws ServiceException { - List<AccessPolicyInfo> accessPolicies = service.list(AccessPolicy - .list()); - for (AccessPolicyInfo accessPolicy : accessPolicies) { - if (accessPolicy.getName().length() > accessPolicyPrefix.length() - && accessPolicy.getName() - .substring(0, accessPolicyPrefix.length()) - .equals(accessPolicyPrefix)) { - try { - service.delete(AccessPolicy.delete(accessPolicy.getId())); - } catch (ServiceException e) { - // Don't worry if cannot delete now. - // Might be held on to by a running job - } - } - } - } - - public void removeAllJobWithPrefix(String testJobPrefix) - throws ServiceException { - List<JobInfo> jobInfos = service.list(Job.list()); - for (JobInfo jobInfo : jobInfos) { - if (jobInfo.getName().startsWith(testJobPrefix)) { - try { - service.delete(Job.delete(jobInfo.getId())); - } catch (ServiceException e) { - } - } - } - } - - private static class EncryptionHelper { - public static boolean canUseStrongCrypto() { - try { - Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); - SecretKeySpec secretKeySpec = new SecretKeySpec(new byte[32], - "AES"); - cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec); - } catch (Exception e) { - return false; - } - return true; - } - - public static byte[] encryptSymmetricKey(String protectionKey, - byte[] inputData) throws Exception { - Cipher cipher = Cipher - .getInstance("RSA/ECB/OAEPWithSHA-1AndMGF1Padding"); - CertificateFactory certificateFactory = CertificateFactory - .getInstance("X.509"); - byte[] protectionKeyBytes = Base64.decode(protectionKey); - ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream( - protectionKeyBytes); - Certificate certificate = certificateFactory - .generateCertificate(byteArrayInputStream); - Key publicKey = certificate.getPublicKey(); - SecureRandom secureRandom = new SecureRandom(); - cipher.init(Cipher.ENCRYPT_MODE, publicKey, secureRandom); - byte[] cipherText = cipher.doFinal(inputData); - return cipherText; - } - - public static String calculateContentKeyChecksum(String uuid, - byte[] aesKey) throws Exception { - Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); - SecretKeySpec secretKeySpec = new SecretKeySpec(aesKey, "AES"); - cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec); - byte[] encryptionResult = cipher.doFinal(uuid.getBytes("UTF8")); - byte[] checksumByteArray = new byte[8]; - System.arraycopy(encryptionResult, 0, checksumByteArray, 0, 8); - String checksum = Base64.encode(checksumByteArray); - return checksum; - } - - public static InputStream encryptFile(InputStream inputStream, - byte[] key, byte[] iv) throws Exception { - Cipher cipher = Cipher.getInstance("AES/CTR/NoPadding"); - SecretKeySpec keySpec = new SecretKeySpec(key, "AES"); - IvParameterSpec ivParameterSpec = new IvParameterSpec(iv); - cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivParameterSpec); - CipherInputStream cipherInputStream = new CipherInputStream( - inputStream, cipher); - return cipherInputStream; - } - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/ScenarioTestBase.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/ScenarioTestBase.java deleted file mode 100644 index 9aa6ac457453..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/ScenarioTestBase.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.scenarios; - -import static org.junit.Assert.fail; - -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -import org.junit.Rule; -import org.junit.rules.MethodRule; -import org.junit.runners.model.FrameworkMethod; -import org.junit.runners.model.Statement; - -import com.microsoft.windowsazure.Configuration; -import com.microsoft.windowsazure.services.blob.BlobConfiguration; -import com.microsoft.windowsazure.services.media.MediaConfiguration; -import com.microsoft.windowsazure.services.media.authentication.AzureAdClientSymmetricKey; -import com.microsoft.windowsazure.services.media.authentication.AzureAdTokenCredentials; -import com.microsoft.windowsazure.services.media.authentication.AzureAdTokenProvider; -import com.microsoft.windowsazure.services.media.authentication.AzureEnvironments; -import com.microsoft.windowsazure.services.media.authentication.TokenProvider; -import com.microsoft.windowsazure.services.queue.QueueConfiguration; - -public abstract class ScenarioTestBase { - protected static Configuration config; - protected static ExecutorService executorService; - - @Rule - public SetupManager setupManager = new SetupManager(); - - protected static void initializeConfig() { - executorService = Executors.newFixedThreadPool(5); - config = Configuration.getInstance(); - - String tenant = config.getProperty("media.azuread.test.tenant").toString(); - String clientId = config.getProperty("media.azuread.test.clientid").toString(); - String clientKey = config.getProperty("media.azuread.test.clientkey").toString(); - String apiserver = config.getProperty("media.azuread.test.account_api_uri").toString(); - - // Setup Azure AD Credentials (in this case using username and password) - AzureAdTokenCredentials credentials = new AzureAdTokenCredentials( - tenant, - new AzureAdClientSymmetricKey(clientId, clientKey), - AzureEnvironments.AZURE_CLOUD_ENVIRONMENT); - - TokenProvider provider = null; - - try { - provider = new AzureAdTokenProvider(credentials, executorService); - } catch (MalformedURLException e) { - throw new RuntimeException(e); - } - - // configure the account endpoint and the token provider for injection - config.setProperty(MediaConfiguration.AZURE_AD_API_SERVER, apiserver); - config.setProperty(MediaConfiguration.AZURE_AD_TOKEN_PROVIDER, provider); - - overrideWithEnv(config, QueueConfiguration.ACCOUNT_KEY, - "media.queue.account.key"); - overrideWithEnv(config, QueueConfiguration.ACCOUNT_NAME, - "media.queue.account.name"); - overrideWithEnv(config, QueueConfiguration.URI, "media.queue.uri"); - } - - protected static void cleanupConfig() { - - // shutdown the executor service required by ADAL4J - executorService.shutdown(); - } - - private static void overrideWithEnv(Configuration config, String key) { - String value = System.getenv(key); - if (value == null) - return; - - config.setProperty(key, value); - } - - protected static void overrideWithEnv(Configuration config, String key, - String enviromentKey) { - String value = System.getenv(enviromentKey); - if (value == null) - return; - - config.setProperty(key, value); - } - - protected void signalSetupStarting() { - setupManager.startSetup(); - } - - protected void signalSetupFinished() { - setupManager.endSetup(); - } - - protected class SetupManager implements MethodRule { - private boolean shouldCapture; - - @Override - public Statement apply(Statement base, FrameworkMethod method, - Object target) { - return new SetupManagerStatement(base); - } - - public void startSetup() { - this.shouldCapture = true; - } - - public void endSetup() { - this.shouldCapture = false; - } - - private class SetupManagerStatement extends Statement { - private final Statement next; - - public SetupManagerStatement(Statement base) { - next = base; - } - - @Override - public void evaluate() throws Throwable { - try { - next.evaluate(); - } catch (Throwable e) { - if (shouldCapture) { - // e.printStackTrace(); - fail("Error occured during setup: " + e.getMessage()); - } else { - throw e; - } - } - } - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/utils/ServiceExceptionFactoryTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/utils/ServiceExceptionFactoryTest.java deleted file mode 100644 index d07fcb8c8c30..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/utils/ServiceExceptionFactoryTest.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.utils; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertSame; - -import java.io.ByteArrayInputStream; -import java.net.SocketTimeoutException; - -import org.junit.Test; - -import com.microsoft.windowsazure.core.ServiceTimeoutException; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.exception.ServiceExceptionFactory; -import com.sun.jersey.api.client.ClientHandlerException; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.UniformInterfaceException; - -public class ServiceExceptionFactoryTest { - @Test - public void serviceNameAndMessageAndCauseAppearInException() { - // Arrange - ClientResponse response = new ClientResponse(404, null, - new ByteArrayInputStream(new byte[0]), null); - UniformInterfaceException cause = new UniformInterfaceException( - response); - - // Act - ServiceException exception = ServiceExceptionFactory.process("testing", - new ServiceException("this is a test", cause)); - - // Assert - assertNotNull(exception); - assertEquals("testing", exception.getServiceName()); - assertEquals("this is a test", exception.getMessage()); - assertEquals(cause, exception.getCause()); - } - - @Test - public void httpStatusCodeAndReasonPhraseAppearInException() { - // Arrange - ClientResponse response = new ClientResponse(404, null, - new ByteArrayInputStream(new byte[0]), null); - UniformInterfaceException cause = new UniformInterfaceException( - response); - - // Act - ServiceException exception = ServiceExceptionFactory.process("testing", - new ServiceException("this is a test", cause)); - - // Assert - assertNotNull(exception); - assertEquals(404, exception.getHttpStatusCode()); - assertEquals("Not Found", exception.getHttpReasonPhrase()); - } - - @Test - public void informationWillPassUpIfServiceExceptionIsRootCauseOfClientHandlerExceptions() { - // Arrange - ClientResponse response = new ClientResponse(503, null, - new ByteArrayInputStream(new byte[0]), null); - UniformInterfaceException rootCause = new UniformInterfaceException( - response); - ServiceException originalDescription = ServiceExceptionFactory.process( - "underlying", new ServiceException(rootCause)); - ClientHandlerException wrappingException = new ClientHandlerException( - originalDescription); - - // Act - ServiceException exception = ServiceExceptionFactory.process("actual", - new ServiceException(wrappingException)); - - // Assert - assertEquals(503, exception.getHttpStatusCode()); - assertEquals("underlying", exception.getServiceName()); - } - - @Test - public void socketTimeoutWillPassUpIfInsideClientHandlerException() { - String expectedMessage = "connect timeout"; - SocketTimeoutException rootCause = new SocketTimeoutException( - expectedMessage); - ClientHandlerException wrappingException = new ClientHandlerException( - rootCause); - - ServiceException exception = ServiceExceptionFactory.process("testing", - new ServiceException(wrappingException)); - - assertSame(ServiceTimeoutException.class, exception.getClass()); - assertEquals(expectedMessage, exception.getMessage()); - assertEquals("testing", exception.getServiceName()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/resources/META-INF/com.microsoft.windowsazure.properties b/sdk/mediaservices/microsoft-azure-media/src/test/resources/META-INF/com.microsoft.windowsazure.properties deleted file mode 100644 index 9291222647c9..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/resources/META-INF/com.microsoft.windowsazure.properties +++ /dev/null @@ -1,19 +0,0 @@ -blob.accountName= -blob.accountKey= -blob.uri= -queue.accountName= -queue.accountKey= -queue.uri= -table.accountName= -table.accountKey= -table.uri= -testprefix.com.microsoft.windowsazure.services.core.Configuration.connectTimeout=3 -testprefix.com.microsoft.windowsazure.services.core.Configuration.readTimeout=7 -media.azuread.test.tenant= -media.azuread.test.clientid= -media.azuread.test.clientkey= -media.azuread.test.account_api_uri= -media.azuread.test.useraccount=undefined -media.azuread.test.userpassword=undefined -media.azuread.test.pfxfile=undefined -media.azuread.test.pfxpassword=undefined diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/resources/certificate/server.crt b/sdk/mediaservices/microsoft-azure-media/src/test/resources/certificate/server.crt deleted file mode 100644 index 45100ad45f50..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/resources/certificate/server.crt +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICqTCCAhICCQDm00hjjGf/ITANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UEBhMC -VVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdSZWRtb25kMRMwEQYDVQQKEwpNaWNy -b3NvZnQgMRYwFAYDVQQLEw1XaW5kb3dzIEF6dXJlMRUwEwYDVQQDEwxBbGJlcnQg -Q2hlbmcxJTAjBgkqhkiG9w0BCQEWFmdvbmdjaGVuQG1pY3Jvc29mdC5jb20wIBcN -MTMwMzA2MDAxNzU2WhgPMTkyMzA5MTIyMDMxNDhaMIGXMQswCQYDVQQGEwJVUzEL -MAkGA1UECBMCV0ExEDAOBgNVBAcTB1JlZG1vbmQxEzARBgNVBAoTCk1pY3Jvc29m -dCAxFjAUBgNVBAsTDVdpbmRvd3MgQXp1cmUxFTATBgNVBAMTDEFsYmVydCBDaGVu -ZzElMCMGCSqGSIb3DQEJARYWZ29uZ2NoZW5AbWljcm9zb2Z0LmNvbTCBnzANBgkq -hkiG9w0BAQEFAAOBjQAwgYkCgYEAxct8f2TOECFGtZs5zJN9Vmtk6Jeo2ThbJ8XO -0GPgjKjfLGUgUHrUKSpaHrObaEQWtU9/qdCmctHep5veulGApZ6cBKjL+7xKGQfP -KHq+6nsvF2EutZenPvsFDb7msezcT+Ut1yMnCUd9sjcD0/g2AO5CpplnUR7MOIaq -j/ifsNMCAwEAATANBgkqhkiG9w0BAQUFAAOBgQCAY9QBsXtEfDTZ6Gmplkd2mGGf -aFxRXtEtEXxBrEjhq3c2F8le1ZpMysWfmgpsImZODf3rPN5+UMmL2cqxF0RU+7kG -qPSo8egxg33IfEMTeH5WYHr8ilOxBfw25nnUGr7Cym0m0JAmh5xR47vmEb/EHIXf -iFKpK6o4bjjnszUV2g== ------END CERTIFICATE----- diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/resources/certificate/server.der b/sdk/mediaservices/microsoft-azure-media/src/test/resources/certificate/server.der deleted file mode 100644 index e34ad905b9f157d99e71e21fea545291d011b2a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 634 zcmV-=0)_oBf&z8|0RS)!1_>&LNQU<f0RaI800e>pU@(FLTmk_A0)c@5#mjtuWX=#F zMzxzc%#(dqYh>t`sM$DMC&kXtW8jRa-z;SyP<qrUDq0@1n`lH9wNHPk(57<H-lv=1 zx>10oo}2`z%lo`a83)fOdcNv=FBf4hwU?(p`vncY=CSPDPvtGwBPR(*eX=(L)A%+3 z?n0)SXHg!^IEJc^_@A)T0s{d60Rn-51N+@R6QQ!<c(Wh1LQ$41uWb<GJse{0GZx_6 zfv0>e%8>F{d`5i_cQWaFWS#8+C>6QXiN{cQxvN%?UEo$;_KEexd9k~9-C$?ZG{6I5 zqt6%l`e$zfa8B7DX+?rs<?k8&0tM@)^>JFO5rX&H`Zh)d8Vj2MN@!M~iZ*aT0zm-e z{U6|uDW4S{Nc$W4{COoL{$Di82tI8Ibv%1i=Z^#q!Q;Qi=@Pom$q`swAD>6#Fx=JU z5kcSX{qLyToQ>ZCK>*z#V!|TI=p{_-U7(NHBR=d%UfcT3GAC%qWd7Etho~9$Pk<HM z9r01ZR(0p^n5;VNfxSvW{J+b+N9&s66O95uW@sT|Zv+7*6Q(uJ+$^FE506I*x3iib zZ&YL15H5m}Ap2_^FdMoFn?mNJ>W3xQqizkw2Cae>V6SEe(KjJy0zeUzGlj2mW(FY{ zVNeubU|sGu%A>wYb;LkMDYrnSOxcD;*oPc7u_>?+Jp*2j<C;B;^Sg4L&{PKmV<k<< z&p84?0J+kz908ncB$3RjXMD!1KlOmNtF`IXS8T~#RWs5|p)19$_KWs@d>`068y7%M UN!}B-i;Qe13_leN%CIL3vQ8Hx+W-In diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/resources/media/MPEG4-H264.mp4 b/sdk/mediaservices/microsoft-azure-media/src/test/resources/media/MPEG4-H264.mp4 deleted file mode 100644 index 54c15e4ec7532491d1e5ebd6cecc6a06413edfcc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8697 zcmeHN30PBC7QT6j5SG$ZD58V<aKW_@!Xl<95pYU7h_=Wgitr!=C<#fk0MZ~4gGIVw zZ5a})sBOjK0=4z44pkATWeOFh9i_Ey*oqaZVv!0KVa^R(NSYa#iZfroUUT2M_y5mb z-Z|%<muEl-ISAzIBqE6i2SEYpmLwC45Skbv;!|>rL1959Eb!IcY@936Nv-IXERlZ9 z32ZN(yU1f%Qk+yQ6AR>IpbN*#gIt;tC+5dX$uKt;PZxKjf?+q!#<kQQvVEga=6`PQ zp3nRWJ%t@IX&l#`OyqJr*kl^lox>&t5*e4X&}HEQHYpKsy}U?as*vkJ#&X$Y><bc5 zP7q7D3)y56Uy6lH7{_%Z<3tkRVJ<fkbT}TQl#<7D-8|X2kdk;R84p(o1YA!q4xpqo zUI4nVdLk@JQo0886|oY4C6tuwMY_X3X$l_(#!<0U97rKdO~%Pn<j|%Re9#n9xSb|V z1|n6FgpqYpxcd0uJEjTZb5(!o?QOfW0<osw&AXI&cj%LKD#E`lyy`L{9W>JzmTE+g zLF8<;x+Y(9xrxx2Gwo`dwu_Pti`CwwpdL?I%fZk!S?#=fg`zQP==13luFdL(<$6eC zl>APIzDncr|0S(n>=0vZf18JR3t0Akh_-WXHNodOOT5_@le|g)S*y<(mdX|nP3M`< z_Z5Z8O24o^_ugUSQh{(_vf*k@X$e<UFbrTA0%n$N7Q(?HizqFVapF|eg}zexHtWJY z^}T<Z-CA9lncNy3d9U&8@xvXZ2Y$6vHaN{hN^5EM$-FZSMT~o26)(%5;%IyIr>@LZ zmV<kt#ZX#n!qu|v;|1jxTECNed@=P}W3_XDbJpVHP8=uqu8!LlTP%v|OLK#AgL*QR zetf@#_SP%5(`<c<qFEZ2ru$x}x<+09TL*>s?tt|?ovr7c^tgB{t^AzbWi5ycH!LN~ zK-~N}$J-gi-534dwv7UDY*(<wK@b-kiW!X{ZY73fCxb})XwFGb-2|52k>a%SUlxDn zxaE}cUXL?BsJ<w=x^A<ky|q)b#eH#RmMzCQp}zErAfT?RqdTZZQ?&TRW{s`;wZ_}- z(*(bH$fY}O?(=30SsG<fS{tI&vi)3~v%9al>xSFbi6=Vo9xvRuUAwI?XJPBj*k-5T zj9&_m=7#Jz-s}=<cdhj3%m10M--Zp7S+}NoPSxb_P{|?9oFa8+>dl*X%Uh+Iq@tlc z(6&)p79G4Doz@!OwI_sq;<<N9|BH`}IIWxeNjF(+1>vOp<lFf(U+P>PdG_6({A!f5 zD!Y`&qg}mfEvO#*vxnbblz(WdMH?W0t^MLqWkgoa;RDYv=g)tsQVGb_pW20G1yh?u z$&p*Xv2toFGMMn^hcO|iX4RwWPQ1aZ&3K2K6eahmGcDh>J$ptGQhf5M&@;hB<G`?7 zrJW*b<@E;+FRE|bysdlQz^SEuKxxO*AyAr?GbJ~s_GI9o?A@^&;<WeLUI<;^t`;24 zV@0%trHAC)x&GCjOB?P=edFr0cCUQKwkeY<zy9&%`?>!|fX|75y>HH{ij;rbw!V7m z2Q3NR9lFd_zXoTiht;_s+^~NZqLX~b2YVd|2joU+?I0XF-kei;?(AXbr>&eyW-{(a z+O;$khvjfTnsa7X@BvFjV#q$f?Eqd1&(0kj>P%_vbwek24Dg17GS^y?`uYx|)Som; zeaBJiPZ^~?IZFL$qtu@<N`2=M=s(!N>6=a8r?W?}2Yvmyqtu^2N`046>a$0w&l#n@ z$0+r^Myc;T0{yX$0qzL)Fc1So0j2c;{gdB|X%$b+H+Qy2#JKbDw&0QnjelI8UO>0C zLNwxsw#RB|n{!lXgM5&LFVTOSjhGX76^N{=Kug&+h?vYmj3c}$h(KRfAl8%H+3<Q{ zjR^BStD@>?Fw*sq1hGCkkX{B&M6=pBBQV^1$vS28Yss&yjrjEHh%T$LX)5zORzBv$ z!sS8pEmlrH^<~~sf_pK;&;RHn$MO=Msr_;P@e?^qi|VhncXjt<`RX;UTwML6F$&0~ z-x<8I=4%^bVT>CaEba0-&9Tg(FamtF6#H@~BBSgO!)iBnXFBt$>ifzH#4E>dMLLH{ zD$tTV70Q#d5$k#dnptIbu-P2Z(2I$PIXSoxJP18{6`8(SMguRqyb*&~hjl)60iSMl zd--LDBOi?L@}bg4$(mbWv&C%g_uss_Q~r{4=Fw}}L+>?AO1qd|s{cv_2+s)dGeQE4 zkUtwCfkwzPMo5qj8PhWhcNA>2?g}I1IU{7H5fWyEL>M8FM#vf?WUUbrqeI5p4zWh- z@{JII5t3+xJa2>ujgS;0L}G+UjS#sG8EZSF4qKP-r?lyirEeb#51sI=A~e(*G3?oh zsjWtINU(t_oN!ZDAQtCUoN&z$VYVsatvW|iMmEucE-~lt{kyudzWAck3s$*n{H{!3 z9m%P78QxjHproY)$}Sbk{uI${BUDI<7#8{7h)IJqu`AzPg;bOC5yQH8+1%jE-YmNs zsC5mS&btN0$NwA_?NBZL`p0z!=~kC&7YT9?lohZ<=ie&ddVE+m?$5;A+kanhkC)4C zFy_9JCNSpdK4YeXF<G2&Hn!)}2=PvPRDnTRh&f5)Gd<gkW5Z+$SgRU7ZwPcX<sxui z^sCrMB`rr{5cwew1)L=j6Cpa<Fn;6H=W&WA5zCW<8*|{vJn^(Pk)BOVv>}Lq4G{y6 zd}K#yGw@f07~9r{KOK9ntZ40QVkqIVD6MjUoiaJ&an;~BVAh*tR3@2hlZ@IVvuPMJ zriTsgDtFjw`uCe>l6l1>^O{K}-z4*fN#;$HOo2(J&?KWB#*DRH-yXJ_zFl{iWOkZl zcAI40HOcHT$?P@Bl$d1pn`90SW5(L9Wy4m}x9g!{jH!Jf#M~?ri&J5wP?Va;2dP)~ z2f+9BUPvMMGgO9k05<6JhBSYzMTaa^Czn#mK(3J|>(<ntp|6eCH7xpCm^0|}FoZ8{ zP!T;*#80B2L5lc>_oWz*Xwk2SR%1Q%L?T}()wSS~n#7MEXk!@$eQ_X_!WYJ49lEV3 zDMbJcyHt_U#%J*RI7dGGqJsxR!CSOeNQGoyoA^p5kH!Dtzf~re4Hz5iY@|}-+(6=D za9g^YYD0m*;ED^)a!Hs!=`V%_6Z#Ott3xj~-xDyaKh3Y=k=`a`p8)c$oh#O>5qk7p zM1No9mF+Z1MMI3l(>^Ltc96;Cvi^DS79!zxe*hT)TaD|-%|K$#vR{HPkwt%-p@*C6 z;qX)%)W_ops4xdj3G-$^d!WF2ga$f~>D8y8JsotP2MPP8y$7`%+D}4dKe$Tlgt^8) z{7Ni?HK#zG^pLB!OdcnOHF3c{nce3`D_?{j@kfYt7u)~=WD9<@hu>T$)WPqsGeFM{ ze5M~G;77)|e{+_xufeUu&oT}mqafFTnCL6Kfrd`fcbPuReL3pa&azCbNYS4r1p0iv zvmDfamRYjCvpk?Xf^$q~^`B$D!8u+DKUh=!6Aj%Gq5Hua!B%l$$IJLSBhpnW)l>i& zAnkaMBL^@`ny!umgc#2<qhSLY9?WbQ0Wg}acQE@86|w;wuZx|Em7q;H8XPnjkMKeM zqyAw7gG9jG524cvkE~me1m1xpun+R$hmZtFNCN2)iVgS=F(7sz{s$8QbWwnUFUN83 gA&S>YjFI{eRye?e4_Qn?VI~P>_zyam5s*Rt1xb%oW&i*H diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/resources/schemas/PlayReadyLicenseResponseTemplate.xsd b/sdk/mediaservices/microsoft-azure-media/src/test/resources/schemas/PlayReadyLicenseResponseTemplate.xsd deleted file mode 100644 index 0c9915d69a88..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/resources/schemas/PlayReadyLicenseResponseTemplate.xsd +++ /dev/null @@ -1,220 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<xs:schema xmlns:tns="http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1" xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" /> - <xs:complexType name="AgcAndColorStripeRestriction"> - <xs:sequence> - <xs:element minOccurs="0" name="ConfigurationData" type="xs:unsignedByte" /> - </xs:sequence> - </xs:complexType> - <xs:element name="AgcAndColorStripeRestriction" nillable="true" type="tns:AgcAndColorStripeRestriction" /> - <xs:simpleType name="ContentType"> - <xs:restriction base="xs:string"> - <xs:enumeration value="Unspecified" /> - <xs:enumeration value="UltravioletDownload" /> - <xs:enumeration value="UltravioletStreaming" /> - </xs:restriction> - </xs:simpleType> - <xs:element name="ContentType" nillable="true" type="tns:ContentType" /> - <xs:complexType name="ExplicitAnalogTelevisionRestriction"> - <xs:sequence> - <xs:element minOccurs="0" name="BestEffort" type="xs:boolean" /> - <xs:element minOccurs="0" name="ConfigurationData" type="xs:unsignedByte" /> - </xs:sequence> - </xs:complexType> - <xs:element name="ExplicitAnalogTelevisionRestriction" nillable="true" type="tns:ExplicitAnalogTelevisionRestriction" /> - <xs:complexType name="PlayReadyContentKey"> - <xs:sequence /> - </xs:complexType> - <xs:element name="PlayReadyContentKey" nillable="true" type="tns:PlayReadyContentKey" /> - <xs:complexType name="ContentEncryptionKeyFromHeader"> - <xs:complexContent mixed="false"> - <xs:extension base="tns:PlayReadyContentKey"> - <xs:sequence /> - </xs:extension> - </xs:complexContent> - </xs:complexType> - <xs:element name="ContentEncryptionKeyFromHeader" nillable="true" type="tns:ContentEncryptionKeyFromHeader" /> - <xs:complexType name="ContentEncryptionKeyFromKeyIdentifier"> - <xs:complexContent mixed="false"> - <xs:extension base="tns:PlayReadyContentKey"> - <xs:sequence> - <xs:element minOccurs="0" name="KeyIdentifier" type="ser:guid" /> - </xs:sequence> - </xs:extension> - </xs:complexContent> - </xs:complexType> - <xs:element name="ContentEncryptionKeyFromKeyIdentifier" nillable="true" type="tns:ContentEncryptionKeyFromKeyIdentifier" /> - <xs:complexType name="PlayReadyLicenseResponseTemplate"> - <xs:sequence> - <xs:element name="LicenseTemplates" nillable="true" type="tns:ArrayOfPlayReadyLicenseTemplate" /> - <xs:element minOccurs="0" name="ResponseCustomData" nillable="true" type="xs:string"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:complexType> - <xs:element name="PlayReadyLicenseResponseTemplate" nillable="true" type="tns:PlayReadyLicenseResponseTemplate" /> - <xs:complexType name="ArrayOfPlayReadyLicenseTemplate"> - <xs:sequence> - <xs:element minOccurs="0" maxOccurs="unbounded" name="PlayReadyLicenseTemplate" nillable="true" type="tns:PlayReadyLicenseTemplate" /> - </xs:sequence> - </xs:complexType> - <xs:element name="ArrayOfPlayReadyLicenseTemplate" nillable="true" type="tns:ArrayOfPlayReadyLicenseTemplate" /> - <xs:complexType name="PlayReadyLicenseTemplate"> - <xs:sequence> - <xs:element minOccurs="0" name="AllowTestDevices" type="xs:boolean" /> - <xs:element minOccurs="0" name="BeginDate" nillable="true" type="xs:dateTime"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element name="ContentKey" nillable="true" type="tns:PlayReadyContentKey" /> - <xs:element minOccurs="0" name="ContentType" type="tns:ContentType"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="ExpirationDate" nillable="true" type="xs:dateTime"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="GracePeriod" nillable="true" type="ser:duration"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="LicenseType" type="tns:PlayReadyLicenseType" /> - <xs:element minOccurs="0" name="PlayRight" nillable="true" type="tns:PlayReadyPlayRight" /> - </xs:sequence> - </xs:complexType> - <xs:element name="PlayReadyLicenseTemplate" nillable="true" type="tns:PlayReadyLicenseTemplate" /> - <xs:simpleType name="PlayReadyLicenseType"> - <xs:restriction base="xs:string"> - <xs:enumeration value="Nonpersistent" /> - <xs:enumeration value="Persistent" /> - </xs:restriction> - </xs:simpleType> - <xs:element name="PlayReadyLicenseType" nillable="true" type="tns:PlayReadyLicenseType" /> - <xs:complexType name="PlayReadyPlayRight"> - <xs:sequence> - <xs:element minOccurs="0" name="AgcAndColorStripeRestriction" nillable="true" type="tns:AgcAndColorStripeRestriction"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="AllowPassingVideoContentToUnknownOutput" type="tns:UnknownOutputPassingOption"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="AnalogVideoOpl" nillable="true" type="xs:int"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="CompressedDigitalAudioOpl" nillable="true" type="xs:int"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="CompressedDigitalVideoOpl" nillable="true" type="xs:int"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="DigitalVideoOnlyContentRestriction" type="xs:boolean"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="ExplicitAnalogTelevisionOutputRestriction" nillable="true" type="tns:ExplicitAnalogTelevisionRestriction"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="FirstPlayExpiration" nillable="true" type="ser:duration"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="ImageConstraintForAnalogComponentVideoRestriction" type="xs:boolean"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="ImageConstraintForAnalogComputerMonitorRestriction" type="xs:boolean"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="ScmsRestriction" nillable="true" type="tns:ScmsRestriction"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="UncompressedDigitalAudioOpl" nillable="true" type="xs:int"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="UncompressedDigitalVideoOpl" nillable="true" type="xs:int"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:complexType> - <xs:element name="PlayReadyPlayRight" nillable="true" type="tns:PlayReadyPlayRight" /> - <xs:simpleType name="UnknownOutputPassingOption"> - <xs:restriction base="xs:string"> - <xs:enumeration value="NotAllowed" /> - <xs:enumeration value="Allowed" /> - <xs:enumeration value="AllowedWithVideoConstriction" /> - </xs:restriction> - </xs:simpleType> - <xs:element name="UnknownOutputPassingOption" nillable="true" type="tns:UnknownOutputPassingOption" /> - <xs:complexType name="ScmsRestriction"> - <xs:sequence> - <xs:element minOccurs="0" name="ConfigurationData" type="xs:unsignedByte" /> - </xs:sequence> - </xs:complexType> - <xs:element name="ScmsRestriction" nillable="true" type="tns:ScmsRestriction" /> -</xs:schema> \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/resources/schemas/TokenRestrictionTemplate.xsd b/sdk/mediaservices/microsoft-azure-media/src/test/resources/schemas/TokenRestrictionTemplate.xsd deleted file mode 100644 index 3cdece201f81..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/resources/schemas/TokenRestrictionTemplate.xsd +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<xs:schema xmlns:tns="http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:complexType name="TokenClaim"> - <xs:sequence> - <xs:element name="ClaimType" nillable="true" type="xs:string" /> - <xs:element minOccurs="0" name="ClaimValue" nillable="true" type="xs:string" /> - </xs:sequence> - </xs:complexType> - <xs:element name="TokenClaim" nillable="true" type="tns:TokenClaim" /> - <xs:complexType name="TokenRestrictionTemplate"> - <xs:sequence> - <xs:element minOccurs="0" name="AlternateVerificationKeys" nillable="true" type="tns:ArrayOfTokenVerificationKey" /> - <xs:element name="Audience" nillable="true" type="xs:anyURI" /> - <xs:element name="Issuer" nillable="true" type="xs:anyURI" /> - <xs:element name="PrimaryVerificationKey" nillable="true" type="tns:TokenVerificationKey" /> - <xs:element minOccurs="0" name="RequiredClaims" nillable="true" type="tns:ArrayOfTokenClaim" /> - </xs:sequence> - </xs:complexType> - <xs:element name="TokenRestrictionTemplate" nillable="true" type="tns:TokenRestrictionTemplate" /> - <xs:complexType name="ArrayOfTokenVerificationKey"> - <xs:sequence> - <xs:element minOccurs="0" maxOccurs="unbounded" name="TokenVerificationKey" nillable="true" type="tns:TokenVerificationKey" /> - </xs:sequence> - </xs:complexType> - <xs:element name="ArrayOfTokenVerificationKey" nillable="true" type="tns:ArrayOfTokenVerificationKey" /> - <xs:complexType name="TokenVerificationKey"> - <xs:sequence /> - </xs:complexType> - <xs:element name="TokenVerificationKey" nillable="true" type="tns:TokenVerificationKey" /> - <xs:complexType name="ArrayOfTokenClaim"> - <xs:sequence> - <xs:element minOccurs="0" maxOccurs="unbounded" name="TokenClaim" nillable="true" type="tns:TokenClaim" /> - </xs:sequence> - </xs:complexType> - <xs:element name="ArrayOfTokenClaim" nillable="true" type="tns:ArrayOfTokenClaim" /> - <xs:complexType name="SymmetricVerificationKey"> - <xs:complexContent mixed="false"> - <xs:extension base="tns:TokenVerificationKey"> - <xs:sequence> - <xs:element name="KeyValue" nillable="true" type="xs:base64Binary" /> - </xs:sequence> - </xs:extension> - </xs:complexContent> - </xs:complexType> - <xs:element name="SymmetricVerificationKey" nillable="true" type="tns:SymmetricVerificationKey" /> -</xs:schema> \ No newline at end of file diff --git a/sdk/mediaservices/pom.xml b/sdk/mediaservices/pom.xml index 8eb47b2b97c1..a9c73511bc7f 100644 --- a/sdk/mediaservices/pom.xml +++ b/sdk/mediaservices/pom.xml @@ -10,6 +10,5 @@ <modules> <module>azure-resourcemanager-mediaservices</module> - <module>microsoft-azure-media</module> </modules> </project> From 44d7ea86d04cfdce7bd46b30a6db318547553430 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 24 Nov 2025 12:18:36 -0800 Subject: [PATCH 039/186] Increment package versions for computelimit releases (#47366) --- eng/versioning/version_client.txt | 2 +- .../azure-resourcemanager-computelimit/CHANGELOG.md | 10 ++++++++++ .../azure-resourcemanager-computelimit/pom.xml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 23ca49424c33..0ea94f0a1f2a 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -512,7 +512,7 @@ com.azure.resourcemanager:azure-resourcemanager-azurestackhci-vm;1.0.0-beta.1;1. com.azure.resourcemanager:azure-resourcemanager-workloadorchestration;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-disconnectedoperations;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-compute-recommender;1.0.0-beta.1;1.0.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-computelimit;1.0.0-beta.1;1.0.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-computelimit;1.0.0-beta.1;1.0.0-beta.2 com.azure.tools:azure-sdk-archetype;1.0.0;1.2.0-beta.1 com.azure.tools:azure-sdk-build-tool;1.0.0;1.1.0-beta.1 com.azure.v2:azure-client-sdk-parent;2.0.0-beta.2;2.0.0-beta.2 diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md b/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md index b2ca1a2b2f77..3dc86eb03faf 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md +++ b/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.0.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.0.0-beta.1 (2025-11-12) - Azure Resource Manager ComputeLimit client library for Java. This package contains Microsoft Azure SDK for ComputeLimit Management SDK. Microsoft Azure Compute Limit Resource Provider. Package api-version 2025-08-15. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/pom.xml b/sdk/computelimit/azure-resourcemanager-computelimit/pom.xml index e67eb68c0570..4f756900b0e9 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/pom.xml +++ b/sdk/computelimit/azure-resourcemanager-computelimit/pom.xml @@ -14,7 +14,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-computelimit</artifactId> - <version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-computelimit;current} --> + <version>1.0.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-computelimit;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for ComputeLimit Management</name> From 90a04e734cdb579166a9af9865c3a65ca138a134 Mon Sep 17 00:00:00 2001 From: Fabian Meiswinkel <fabianm@microsoft.com> Date: Mon, 24 Nov 2025 23:23:18 +0100 Subject: [PATCH 040/186] Enables EndpointValidation (#47111) * Enables EndpointValidation * Update Configs.java * Fixing test failures * Update TestSuiteBase.java * Create InvalidHostnameTest.java * Update InvalidHostnameTest.java * Updating changelog * Updated changelogs * Adding tests for direct mode * Fixing test flakiness due to Client leak * Fixed changelog * Iterating on test fixes * Adding more memory related logs * Iterating on test fixes * Revert unnecessary changes * Update TestSuiteBase.java * Update TestSuiteBase.java * Update TestSuiteBase.java * Update log4j2-test.properties * Update RxDocumentClientImpl.java * Update InvalidHostnameTest.java * Update CosmosDiagnosticsTest.java --- .../azure-cosmos-encryption/CHANGELOG.md | 1 + .../azure-cosmos-kafka-connect/CHANGELOG.md | 1 + .../azure-cosmos-spark_3-3_2-12/CHANGELOG.md | 1 + .../azure-cosmos-spark_3-4_2-12/CHANGELOG.md | 1 + .../azure-cosmos-spark_3-5_2-12/CHANGELOG.md | 1 + .../azure/cosmos/CosmosDiagnosticsTest.java | 22 +- .../com/azure/cosmos/InvalidHostnameTest.java | 275 ++++++++++++++++++ .../RntbdTransportClientTest.java | 5 + sdk/cosmos/azure-cosmos/CHANGELOG.md | 1 + .../azure/cosmos/implementation/Configs.java | 51 ++++ .../SharedTransportClient.java | 2 +- .../directconnectivity/TransportClient.java | 2 +- .../rntbd/RntbdClientChannelHandler.java | 14 +- .../rntbd/RntbdClientChannelPool.java | 8 +- .../rntbd/RntbdEndpoint.java | 2 + .../rntbd/RntbdServiceEndpoint.java | 5 + 16 files changed, 383 insertions(+), 9 deletions(-) create mode 100644 sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/InvalidHostnameTest.java diff --git a/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md b/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md index 5917cc663840..a7cc8f227e3b 100644 --- a/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md @@ -9,6 +9,7 @@ #### Bugs Fixed #### Other Changes +* Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) ### 2.24.0 (2025-10-21) #### Other Changes diff --git a/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md b/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md index a24e5d7790aa..0fec6fe0780b 100644 --- a/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md @@ -9,6 +9,7 @@ #### Bugs Fixed #### Other Changes +* Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) ### 2.6.1 (2025-11-18) diff --git a/sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md b/sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md index 7e38c12f591c..6191c9707903 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md @@ -9,6 +9,7 @@ #### Bugs Fixed #### Other Changes +* Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) ### 4.41.0 (2025-10-21) diff --git a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md index f9f00bf3c533..d685256cc544 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md @@ -9,6 +9,7 @@ #### Bugs Fixed #### Other Changes +* Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) ### 4.41.0 (2025-10-21) diff --git a/sdk/cosmos/azure-cosmos-spark_3-5_2-12/CHANGELOG.md b/sdk/cosmos/azure-cosmos-spark_3-5_2-12/CHANGELOG.md index 94c2ec2d138d..aa37319a326e 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-5_2-12/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-spark_3-5_2-12/CHANGELOG.md @@ -9,6 +9,7 @@ #### Bugs Fixed #### Other Changes +* Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) ### 4.41.0 (2025-10-21) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosDiagnosticsTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosDiagnosticsTest.java index ab5d26f0d4c4..efb25bdfd288 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosDiagnosticsTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosDiagnosticsTest.java @@ -569,8 +569,16 @@ public void databaseAccountToClients() { String diagnostics = createResponse.getDiagnostics().toString(); // assert diagnostics shows the correct format for tracking client instances - assertThat(diagnostics).contains(String.format("\"clientEndpoints\"" + - ":{\"%s\"", TestConfigurations.HOST)); + String prefix = "\"clientEndpoints\":{"; + int startIndex = diagnostics.indexOf(prefix); + assertThat(startIndex).isGreaterThanOrEqualTo(0); + startIndex += prefix.length(); + int endIndex = diagnostics.indexOf("}", startIndex); + assertThat(endIndex).isGreaterThan(startIndex); + int matchingIndex = diagnostics.indexOf(TestConfigurations.HOST, startIndex); + assertThat(matchingIndex).isGreaterThanOrEqualTo(startIndex); + assertThat(matchingIndex).isLessThanOrEqualTo(endIndex); + // track number of clients currently mapped to account int clientsIndex = diagnostics.indexOf("\"clientEndpoints\":"); // we do end at +120 to ensure we grab the bracket even if the account is very long or if @@ -592,8 +600,14 @@ public void databaseAccountToClients() { createResponse = cosmosContainer.createItem(internalObjectNode); diagnostics = createResponse.getDiagnostics().toString(); // assert diagnostics shows the correct format for tracking client instances - assertThat(diagnostics).contains(String.format("\"clientEndpoints\"" + - ":{\"%s\"", TestConfigurations.HOST)); + startIndex = diagnostics.indexOf(prefix); + assertThat(startIndex).isGreaterThanOrEqualTo(0); + startIndex += prefix.length(); + endIndex = diagnostics.indexOf("}", startIndex); + assertThat(endIndex).isGreaterThan(startIndex); + matchingIndex = diagnostics.indexOf(TestConfigurations.HOST, startIndex); + assertThat(matchingIndex).isGreaterThanOrEqualTo(startIndex); + assertThat(matchingIndex).isLessThanOrEqualTo(endIndex); // grab new value and assert one additional client is mapped to the same account used previously clientsIndex = diagnostics.indexOf("\"clientEndpoints\":"); substrings = diagnostics.substring(clientsIndex, clientsIndex + 120) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/InvalidHostnameTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/InvalidHostnameTest.java new file mode 100644 index 000000000000..7420eab8d9f6 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/InvalidHostnameTest.java @@ -0,0 +1,275 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + * + */ +package com.azure.cosmos; + +import com.azure.cosmos.implementation.Configs; +import com.azure.cosmos.implementation.GlobalEndpointManager; +import com.azure.cosmos.implementation.GoneException; +import com.azure.cosmos.implementation.HttpConstants; +import com.azure.cosmos.implementation.InternalServerErrorException; +import com.azure.cosmos.implementation.RxDocumentServiceRequest; +import com.azure.cosmos.implementation.Utils; +import com.azure.cosmos.implementation.directconnectivity.ReflectionUtils; +import com.azure.cosmos.implementation.directconnectivity.StoreResponse; +import com.azure.cosmos.implementation.directconnectivity.TransportClient; +import com.azure.cosmos.implementation.directconnectivity.Uri; +import com.azure.cosmos.implementation.directconnectivity.rntbd.ProactiveOpenConnectionsProcessor; +import com.azure.cosmos.implementation.faultinjection.IFaultInjectorProvider; +import com.azure.cosmos.models.CosmosContainerIdentity; +import com.azure.cosmos.models.ThroughputProperties; +import com.azure.cosmos.rx.TestSuiteBase; +import com.fasterxml.jackson.databind.node.ObjectNode; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufAllocator; +import org.testng.SkipException; +import org.testng.annotations.Factory; +import org.testng.annotations.Test; +import reactor.core.publisher.Mono; + +import javax.net.ssl.SSLHandshakeException; +import java.net.InetAddress; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.UnknownHostException; +import java.util.List; +import java.util.UUID; + +import static org.assertj.core.api.Assertions.fail; +import static org.assertj.core.api.Assertions.assertThat; + +public class InvalidHostnameTest extends TestSuiteBase { + @Factory(dataProvider = "clientBuildersWithSessionConsistency") + public InvalidHostnameTest(CosmosClientBuilder clientBuilder) { + super(clientBuilder); + } + + @Test(groups = { "fast", "fi-multi-master", "multi-region" }, timeOut = TIMEOUT) + public void gatewayConnectionFailsWhenHostnameIsInvalid() throws Exception { + gatewayConnectionFailsWhenHostnameIsInvalidCore(null); + gatewayConnectionFailsWhenHostnameIsInvalidCore(false); + } + + @Test(groups = { "fast", "fi-multi-master", "multi-region" }, timeOut = TIMEOUT) + public void gatewayConnectionFailsWhenHostnameIsInvalidEvenWhenHostnameValidationIsDisabled() throws Exception { + gatewayConnectionFailsWhenHostnameIsInvalidCore(true); + } + + @Test(groups = { "fast", "fi-multi-master", "multi-region" }, timeOut = TIMEOUT) + public void directConnectionSucceedsWhenHostnameIsInvalidAndHostnameValidationIsDisabled() throws Exception { + directConnectionTestCore(true); + } + + @Test(groups = { "fast", "fi-multi-master", "multi-region" }, timeOut = TIMEOUT) + public void directConnectionFailsWhenHostnameIsInvalidAndHostnameValidationIsNotSet() throws Exception { + directConnectionFailsWhenHostnameIsInvalidCore(null); + } + + @Test(groups = { "fast", "fi-multi-master", "multi-region" }, timeOut = TIMEOUT) + public void directConnectionFailsWhenHostnameIsInvalidAndHostnameValidationIsEnabled() throws Exception { + directConnectionFailsWhenHostnameIsInvalidCore(false); + } + + private void directConnectionFailsWhenHostnameIsInvalidCore(Boolean disableHostnameValidation) throws Exception { + try { + directConnectionTestCore(disableHostnameValidation); + fail("The test should have failed with invalid hostname when hostname " + + "validation is enabled or not set."); + } catch (InternalServerErrorException cosmosException) { + assertThat(cosmosException.getStatusCode()).isEqualTo(500); + assertThat(cosmosException.getSubStatusCode()) + .isEqualTo(HttpConstants.SubStatusCodes.INVALID_RESULT); + assertThat(cosmosException).hasCauseInstanceOf(RuntimeException.class); + RuntimeException runtimeException = (RuntimeException)cosmosException.getCause(); + assertThat(runtimeException).hasCauseInstanceOf(GoneException.class); + GoneException goneException = (GoneException)runtimeException.getCause(); + assertThat(goneException).hasCauseInstanceOf(SSLHandshakeException.class); + logger.info("Expected exception was thrown", cosmosException); + } + } + + private void directConnectionTestCore(Boolean disableHostnameValidation) throws Exception { + CosmosDatabase createdDatabase = null; + CosmosClient client = null; + CosmosClientBuilder builder = getClientBuilder(); + + if (builder.getEndpoint().contains("localhost")) { + throw new SkipException("This test is irrelevant for emulator"); + } + + if (builder.getConnectionPolicy().getConnectionMode() != ConnectionMode.DIRECT) { + throw new SkipException("This test is only relevant for direct mode"); + } + + try { + if (disableHostnameValidation != null) { + System.setProperty("COSMOS.HOSTNAME_VALIDATION_DISABLED", disableHostnameValidation.toString()); + } else { + System.clearProperty("COSMOS.HOSTNAME_VALIDATION_DISABLED"); + } + Configs.resetIsHostnameValidationDisabledForTests(); + + client = builder.buildClient(); + + TransportClient originalTransportClient = ReflectionUtils.getTransportClient(client); + + ReflectionUtils.setTransportClient( + client, + new HostnameInvalidationTransportClient(originalTransportClient)); + + String dbName = CosmosDatabaseForTest.generateId(); + createdDatabase = createSyncDatabase(client, dbName); + createdDatabase.createContainer( + "TestContainer", + "/id", + ThroughputProperties.createManualThroughput(400)); + CosmosContainer createdContainer = client.getDatabase(dbName).getContainer("TestContainer"); + ObjectNode newObject = Utils.getSimpleObjectMapper().createObjectNode(); + newObject.put("id", UUID.randomUUID().toString()); + createdContainer.upsertItem(newObject); + } + finally { + if (createdDatabase != null) { + safeDeleteSyncDatabase(createdDatabase); + } + + if (client != null) { + safeCloseSyncClient(client); + } + + System.clearProperty("COSMOS.HOSTNAME_VALIDATION_DISABLED"); + Configs.resetIsHostnameValidationDisabledForTests(); + } + } + + private void gatewayConnectionFailsWhenHostnameIsInvalidCore(Boolean disableHostnameValidation) throws Exception { + CosmosDatabase createdDatabase = null; + CosmosClient client = null; + CosmosClientBuilder builder = getClientBuilder(); + + if (builder.getEndpoint().contains("localhost")) { + throw new SkipException("This test is irrelevant for emulator"); + } + + try { + if (disableHostnameValidation != null) { + System.setProperty("COSMOS.HOSTNAME_VALIDATION_DISABLED", disableHostnameValidation.toString()); + } else { + System.clearProperty("COSMOS.HOSTNAME_VALIDATION_DISABLED"); + } + Configs.resetIsHostnameValidationDisabledForTests(); + + URI uri = URI.create(builder.getEndpoint()); + InetAddress address = InetAddress.getByName(uri.getHost()); + URI uriWithInvalidHostname = new URI( + uri.getScheme(), + uri.getUserInfo(), + address.getHostAddress(), // Use the DNS-resolved IP-address as new hostname - this is invalid form TLS cert perspective + uri.getPort(), + uri.getPath(), + uri.getQuery(), + uri.getFragment() + ); + builder.endpoint(uriWithInvalidHostname.toString()); + client = builder.buildClient(); + String dbName = CosmosDatabaseForTest.generateId(); + createdDatabase = createSyncDatabase(client, dbName); + fail("The attempt to connect to the Gateway endpoint to create a database " + + "should have failed due to invalid hostname."); + } catch (RuntimeException e) { + assertThat(e).hasCauseInstanceOf(CosmosException.class); + CosmosException cosmosException = (CosmosException)e.getCause(); + assertThat(cosmosException.getStatusCode()).isEqualTo(503); + assertThat(cosmosException.getSubStatusCode()) + .isEqualTo(HttpConstants.SubStatusCodes.GATEWAY_ENDPOINT_UNAVAILABLE); + assertThat(cosmosException).hasCauseInstanceOf(SSLHandshakeException.class); + logger.info("Expected exception was thrown", cosmosException); + } + finally { + if (createdDatabase != null) { + safeDeleteSyncDatabase(createdDatabase); + } + + if (client != null) { + safeCloseSyncClient(client); + } + + System.clearProperty("COSMOS.HOSTNAME_VALIDATION_DISABLED"); + Configs.resetIsHostnameValidationDisabledForTests(); + } + } + + private static class HostnameInvalidationTransportClient extends TransportClient { + private final TransportClient inner; + + public HostnameInvalidationTransportClient(TransportClient transportClient) { + this.inner = transportClient; + } + + @Override + public void close() throws Exception { + this.inner.close(); + } + + @Override + public Mono<StoreResponse> invokeStoreAsync(Uri physicalAddress, RxDocumentServiceRequest request) { + URI uri = physicalAddress.getURI(); + InetAddress address = null; + try { + address = InetAddress.getByName(uri.getHost()); + } catch (UnknownHostException e) { + throw new RuntimeException(e); + } + String uriWithInvalidHostname; + try { + uriWithInvalidHostname = new URI( + uri.getScheme(), + uri.getUserInfo(), + address.getHostAddress(), // Use the DNS-resolved IP-address as new hostname - this is invalid form TLS cert perspective + uri.getPort(), + uri.getPath(), + uri.getQuery(), + uri.getFragment() + ).toString(); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + + Uri ipBasedAddress = Uri.create(uriWithInvalidHostname); + + logger.info("Changed physical address '{}' into '{}'.", physicalAddress, ipBasedAddress); + + return this + .inner + .invokeStoreAsync(ipBasedAddress, request) + .onErrorMap(t -> new RuntimeException(t)); + } + + @Override + public void configureFaultInjectorProvider(IFaultInjectorProvider injectorProvider) { + this.inner.configureFaultInjectorProvider(injectorProvider); + } + + @Override + public GlobalEndpointManager getGlobalEndpointManager() { + return this.inner.getGlobalEndpointManager(); + } + + @Override + public ProactiveOpenConnectionsProcessor getProactiveOpenConnectionsProcessor() { + return this.inner.getProactiveOpenConnectionsProcessor(); + } + + @Override + public void recordOpenConnectionsAndInitCachesCompleted(List<CosmosContainerIdentity> cosmosContainerIdentities) { + this.inner.recordOpenConnectionsAndInitCachesCompleted(cosmosContainerIdentities); + } + + @Override + public void recordOpenConnectionsAndInitCachesStarted(List<CosmosContainerIdentity> cosmosContainerIdentities) { + this.inner.recordOpenConnectionsAndInitCachesStarted(cosmosContainerIdentities); + } + } +} diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClientTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClientTest.java index 07af54b8c73c..b1c93b2ee7a3 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClientTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClientTest.java @@ -1138,6 +1138,11 @@ public URI serviceEndpoint() { return null; } + @Override + public URI serverKeyUsedAsActualRemoteAddress() { + return this.remoteURI; + } + @Override public void injectConnectionErrors(String ruleId, double threshold, Class<?> eventType) { throw new NotImplementedException("injectConnectionErrors is not supported in FakeEndpoint"); diff --git a/sdk/cosmos/azure-cosmos/CHANGELOG.md b/sdk/cosmos/azure-cosmos/CHANGELOG.md index 5e2a89e6a2bb..b9a62661e695 100644 --- a/sdk/cosmos/azure-cosmos/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos/CHANGELOG.md @@ -10,6 +10,7 @@ * Fixed a possible memory leak (Netty buffers) in Gateway mode caused by a race condition when timeouts are happening. - [47228](https://github.com/Azure/azure-sdk-for-java/pull/47228) and [47251](https://github.com/Azure/azure-sdk-for-java/pull/47251) #### Other Changes +* Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) * Changed to use incremental change feed to get partition key ranges. - [46810](https://github.com/Azure/azure-sdk-for-java/pull/46810) ### 4.75.0 (2025-10-21) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java index b656b84e66db..18cca304ecd7 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java @@ -19,6 +19,8 @@ import java.time.Duration; import java.util.EnumSet; import java.util.Locale; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; import static com.azure.cosmos.implementation.guava25.base.MoreObjects.firstNonNull; import static com.azure.cosmos.implementation.guava25.base.Strings.emptyToNull; @@ -328,6 +330,17 @@ public class Configs { private static final String HTTP_CONNECTION_WITHOUT_TLS_ALLOWED = "COSMOS.HTTP_CONNECTION_WITHOUT_TLS_ALLOWED"; private static final String HTTP_CONNECTION_WITHOUT_TLS_ALLOWED_VARIABLE = "COSMOS_HTTP_CONNECTION_WITHOUT_TLS_ALLOWED"; + // Config to indicate whether hostname validation for TLS connections to the Cosmos DB endpoints + // (Gateway and Backend) should be disabled + // By default Netty 4.1 is not enabling hostname validation - this is not ideal form security perspective + // because it makes man-in-the-middle attacks easier. It only impacts direct mode connections because + // connections to the Gateway always use ReactorNetty (which enables hostname validation). So all HTTP connections + // are fine - RNTBD is what is in scope for the configs below. + // By default, the Cosmos DB SDK enables hostname validation for RNTBD as well. + private static final boolean DEFAULT_HOSTNAME_VALIDATION_DISABLED = false; + private static final String HOSTNAME_VALIDATION_DISABLED = "COSMOS.HOSTNAME_VALIDATION_DISABLED"; + private static final String HOSTNAME_VALIDATION_DISABLED_VARIABLE = "COSMOS_HOSTNAME_VALIDATION_DISABLED"; + // Config to indicate whether disable server certificate validation for emulator // Please note that this config should only during development or test, please do not use in prod env private static final boolean DEFAULT_EMULATOR_SERVER_CERTIFICATE_VALIDATION_DISABLED = false; @@ -378,6 +391,9 @@ public class Configs { private static final boolean DEFAULT_CLIENT_LEAK_DETECTION_ENABLED = false; private static final String CLIENT_LEAK_DETECTION_ENABLED = "COSMOS.CLIENT_LEAK_DETECTION_ENABLED"; + private static final Object lockObject = new Object(); + private static Boolean cachedIsHostnameValidationDisabled = null; + public static int getCPUCnt() { return CPU_CNT; } @@ -391,6 +407,8 @@ private SslContext sslContextInit(boolean serverCertVerificationDisabled, boolea if (serverCertVerificationDisabled) { sslContextBuilder.trustManager(InsecureTrustManagerFactory.INSTANCE); // disable cert verification + } else if (!isHostnameValidationDisabled()) { + sslContextBuilder.endpointIdentificationAlgorithm("HTTPS"); } if (http2Enabled) { @@ -405,6 +423,7 @@ private SslContext sslContextInit(boolean serverCertVerificationDisabled, boolea ) ); } + return sslContextBuilder.build(); } catch (SSLException sslException) { logger.error("Fatal error cannot instantiate ssl context due to {}", sslException.getMessage(), sslException); @@ -1193,6 +1212,38 @@ public static boolean isEmulatorServerCertValidationDisabled() { return Boolean.parseBoolean(certVerificationDisabledConfig); } + private static boolean isHostnameValidationDisabledCore() { + String hostNameVerificationDisabledConfig = System.getProperty( + HOSTNAME_VALIDATION_DISABLED, + firstNonNull( + emptyToNull(System.getenv().get(HOSTNAME_VALIDATION_DISABLED_VARIABLE)), + String.valueOf(DEFAULT_HOSTNAME_VALIDATION_DISABLED))); + + return Boolean.parseBoolean(hostNameVerificationDisabledConfig); + } + + public static void resetIsHostnameValidationDisabledForTests() { + synchronized (lockObject) { + cachedIsHostnameValidationDisabled = null; + } + } + + private static boolean isHostnameValidationDisabled() { + Boolean isHostnameValidationSnapshot = cachedIsHostnameValidationDisabled; + if (isHostnameValidationSnapshot != null) { + return isHostnameValidationSnapshot; + } + + synchronized (lockObject) { + isHostnameValidationSnapshot = cachedIsHostnameValidationDisabled; + if (isHostnameValidationSnapshot != null) { + return isHostnameValidationSnapshot; + } + + return cachedIsHostnameValidationDisabled = isHostnameValidationDisabledCore(); + } + } + public static String getEmulatorHost() { return System.getProperty( EMULATOR_HOST, diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/SharedTransportClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/SharedTransportClient.java index 2bec51b95c90..d97b961238a8 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/SharedTransportClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/SharedTransportClient.java @@ -96,7 +96,7 @@ private SharedTransportClient( } @Override - protected Mono<StoreResponse> invokeStoreAsync(Uri physicalAddress, RxDocumentServiceRequest request) { + public Mono<StoreResponse> invokeStoreAsync(Uri physicalAddress, RxDocumentServiceRequest request) { return transportClient.invokeStoreAsync(physicalAddress, request); } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/TransportClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/TransportClient.java index 2498e5807a4a..4c99cbed55d2 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/TransportClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/TransportClient.java @@ -65,7 +65,7 @@ public Mono<StoreResponse> invokeResourceOperationInternalAsync(Uri physicalAddr return this.invokeStoreInternalAsync(physicalAddress, request); } - protected abstract Mono<StoreResponse> invokeStoreAsync( + public abstract Mono<StoreResponse> invokeStoreAsync( Uri physicalAddress, RxDocumentServiceRequest request); diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelHandler.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelHandler.java index 716b1d7ede98..cd85424105f6 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelHandler.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelHandler.java @@ -18,6 +18,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.net.URI; import java.util.concurrent.TimeUnit; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull; @@ -30,19 +31,23 @@ public class RntbdClientChannelHandler extends ChannelInitializer<Channel> imple private final Config config; private final RntbdConnectionStateListener connectionStateListener; private final RntbdServerErrorInjector serverErrorInjector; + private final URI serviceKeyUsedAsActualRemoteAddress; RntbdClientChannelHandler( final Config config, final ChannelHealthChecker healthChecker, final RntbdConnectionStateListener connectionStateListener, - final RntbdServerErrorInjector serverErrorInjector) { + final RntbdServerErrorInjector serverErrorInjector, + final URI serviceKeyUsedAsActualRemoteAddress) { checkNotNull(healthChecker, "expected non-null healthChecker"); checkNotNull(config, "expected non-null config"); + checkNotNull(serviceKeyUsedAsActualRemoteAddress, "serviceKeyUsedAsActualRemoteAddress"); this.healthChecker = healthChecker; this.config = config; this.connectionStateListener = connectionStateListener; this.serverErrorInjector = serverErrorInjector; + this.serviceKeyUsedAsActualRemoteAddress = serviceKeyUsedAsActualRemoteAddress; } /** @@ -127,7 +132,12 @@ protected void initChannel(final Channel channel) { } // Initialize sslHandler with jdkCompatibilityMode = true for openssl context. - SslHandler sslHandler = new SslHandler(this.config.sslContext().newEngine(channel.alloc())); + // Use the actual host-name and port to allow SNI and hostname validation being enabled. + SslHandler sslHandler = new SslHandler( + this.config.sslContext().newEngine( + channel.alloc(), + this.serviceKeyUsedAsActualRemoteAddress.getHost(), + this.serviceKeyUsedAsActualRemoteAddress.getPort())); sslHandler.setHandshakeTimeout(config.sslHandshakeTimeoutInMillis(), TimeUnit.MILLISECONDS); pipeline.addFirst(SslHandler.class.toString(), sslHandler); diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelPool.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelPool.java index e3babbd65b07..a302cdd253b4 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelPool.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelPool.java @@ -219,7 +219,13 @@ public final class RntbdClientChannelPool implements ChannelPool { checkNotNull(durableEndpointMetrics, "expected non-null durableEndpointMetrics"); RntbdClientChannelHealthChecker healthChecker = new RntbdClientChannelHealthChecker(config, clientTelemetry); - this.poolHandler = new RntbdClientChannelHandler(config, healthChecker, connectionStateListener, serverErrorInjector); + this.poolHandler = new RntbdClientChannelHandler( + config, + healthChecker, + connectionStateListener, + serverErrorInjector, + endpoint.serverKeyUsedAsActualRemoteAddress()); + this.executor = bootstrap.config().group().next(); this.healthChecker = healthChecker; this.serverErrorInjector = serverErrorInjector; diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdEndpoint.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdEndpoint.java index 15a1a8e374df..442d5a63f583 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdEndpoint.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdEndpoint.java @@ -81,6 +81,8 @@ public interface RntbdEndpoint extends AutoCloseable { URI serviceEndpoint(); + URI serverKeyUsedAsActualRemoteAddress(); + void injectConnectionErrors( String faultInjectionRuleId, double threshold, diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java index f0120e54cf30..feb8cdb32a7e 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java @@ -327,6 +327,11 @@ public URI serviceEndpoint() { return this.serviceEndpoint; } + @Override + public URI serverKeyUsedAsActualRemoteAddress() { + return this.serverKey; + } + @Override public void injectConnectionErrors( String faultInjectionRuleId, From c54a779377f9a1856872fb51ad528497b51b3b9b Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 24 Nov 2025 15:08:21 -0800 Subject: [PATCH 041/186] Configurations: 'specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/ServiceFabricManagedClusters/tspconfig.yaml', API Version: 2025-10-01-preview, SDK Release Type: beta, and CommitSHA: '833aeb9992144f6e04d99de1316a7f37a001ee94' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5554955 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. (#47219) --- .../CHANGELOG.md | 67 +- .../README.md | 4 +- .../SAMPLE.md | 318 ++++++-- .../pom.xml | 2 +- .../fluent/ApplicationsClient.java | 248 +++++- .../fluent/ManagedClustersClient.java | 39 +- .../fluent/NodeTypesClient.java | 8 +- .../fluent/ServicesClient.java | 69 ++ .../ApplicationResourceImpl.java | 42 +- .../ApplicationsClientImpl.java | 767 +++++++++++++++++- .../implementation/ApplicationsImpl.java | 34 + .../implementation/ManagedClusterImpl.java | 6 +- .../ManagedClustersClientImpl.java | 119 ++- .../implementation/NodeTypesClientImpl.java | 18 +- ...ceFabricManagedClustersMgmtClientImpl.java | 2 +- .../implementation/ServiceResourceImpl.java | 11 + .../implementation/ServicesClientImpl.java | 216 +++++ .../implementation/ServicesImpl.java | 12 + .../models/ApplicationFetchHealthRequest.java | 221 +++++ .../models/ApplicationResource.java | 82 +- .../models/ApplicationUpdateParameters.java | 29 + ...ApplicationUpdateParametersProperties.java | 92 +++ .../models/Applications.java | 91 +++ .../models/HealthFilter.java | 71 ++ .../RestartDeployedCodePackageRequest.java | 227 ++++++ .../models/RestartKind.java | 46 ++ .../models/RestartReplicaRequest.java | 208 +++++ .../models/RollingUpgradeMode.java | 3 +- .../RuntimeApplicationHealthPolicy.java | 204 +++++ .../models/RuntimeFailureAction.java | 53 ++ .../models/RuntimeRollingUpgradeMode.java | 57 ++ ...eRollingUpgradeUpdateMonitoringPolicy.java | 424 ++++++++++ .../RuntimeServiceTypeHealthPolicy.java | 217 +++++ ...imeUpdateApplicationUpgradeParameters.java | 181 +++++ .../models/RuntimeUpgradeKind.java | 46 ++ .../models/ServiceResource.java | 21 + .../models/Services.java | 31 + ...ricmanagedclusters_apiview_properties.json | 25 +- ...servicefabricmanagedclusters_metadata.json | 2 +- ...tionTypeVersionsCreateOrUpdateSamples.java | 2 +- .../ApplicationTypeVersionsDeleteSamples.java | 2 +- .../ApplicationTypeVersionsGetSamples.java | 2 +- ...eVersionsListByApplicationTypeSamples.java | 2 +- .../ApplicationTypeVersionsUpdateSamples.java | 2 +- ...ApplicationTypesCreateOrUpdateSamples.java | 2 +- .../ApplicationTypesDeleteSamples.java | 2 +- .../generated/ApplicationTypesGetSamples.java | 2 +- .../ApplicationTypesListSamples.java | 2 +- .../ApplicationTypesUpdateSamples.java | 2 +- .../ApplicationsCreateOrUpdateSamples.java | 4 +- .../generated/ApplicationsDeleteSamples.java | 2 +- .../ApplicationsFetchHealthSamples.java | 33 + .../generated/ApplicationsGetSamples.java | 2 +- .../generated/ApplicationsListSamples.java | 2 +- .../ApplicationsReadUpgradeSamples.java | 2 +- ...ionsRestartDeployedCodePackageSamples.java | 32 + .../ApplicationsResumeUpgradeSamples.java | 2 +- .../ApplicationsStartRollbackSamples.java | 2 +- .../generated/ApplicationsUpdateSamples.java | 9 +- .../ApplicationsUpdateUpgradeSamples.java | 68 ++ ...agedApplyMaintenanceWindowPostSamples.java | 2 +- ...ManagedAzResiliencyStatusesGetSamples.java | 2 +- ...ClusterVersionGetByEnvironmentSamples.java | 2 +- .../ManagedClusterVersionGetSamples.java | 2 +- ...lusterVersionListByEnvironmentSamples.java | 2 +- .../ManagedClusterVersionListSamples.java | 2 +- .../ManagedClustersCreateOrUpdateSamples.java | 4 +- .../ManagedClustersDeleteSamples.java | 2 +- ...agedClustersGetByResourceGroupSamples.java | 2 +- ...agedClustersGetFaultSimulationSamples.java | 2 +- ...gedClustersListByResourceGroupSamples.java | 2 +- ...gedClustersListFaultSimulationSamples.java | 2 +- .../generated/ManagedClustersListSamples.java | 2 +- ...edClustersStartFaultSimulationSamples.java | 2 +- ...gedClustersStopFaultSimulationSamples.java | 2 +- .../ManagedClustersUpdateSamples.java | 2 +- ...edMaintenanceWindowStatusesGetSamples.java | 2 +- .../ManagedUnsupportedVMSizesGetSamples.java | 2 +- .../ManagedUnsupportedVMSizesListSamples.java | 2 +- .../generated/NodeTypeSkusListSamples.java | 2 +- .../NodeTypesCreateOrUpdateSamples.java | 16 +- .../generated/NodeTypesDeallocateSamples.java | 2 +- .../generated/NodeTypesDeleteNodeSamples.java | 2 +- .../generated/NodeTypesDeleteSamples.java | 2 +- .../NodeTypesGetFaultSimulationSamples.java | 2 +- .../generated/NodeTypesGetSamples.java | 2 +- ...NodeTypesListByManagedClustersSamples.java | 2 +- .../NodeTypesListFaultSimulationSamples.java | 2 +- .../generated/NodeTypesRedeploySamples.java | 4 +- .../generated/NodeTypesReimageSamples.java | 4 +- .../generated/NodeTypesRestartSamples.java | 2 +- .../NodeTypesStartFaultSimulationSamples.java | 2 +- .../generated/NodeTypesStartSamples.java | 2 +- .../NodeTypesStopFaultSimulationSamples.java | 2 +- .../generated/NodeTypesUpdateSamples.java | 4 +- .../generated/OperationsListSamples.java | 2 +- .../ServicesCreateOrUpdateSamples.java | 4 +- .../generated/ServicesDeleteSamples.java | 2 +- .../generated/ServicesGetSamples.java | 2 +- .../ServicesListByApplicationsSamples.java | 2 +- .../ServicesRestartReplicaSamples.java | 34 + .../generated/ServicesUpdateSamples.java | 2 +- ...talNamedPartitionScalingMechanisTests.java | 20 +- ...nalNetworkInterfaceConfigurationTests.java | 135 +-- .../ApplicationFetchHealthRequestTests.java | 40 + .../ApplicationResourceListTests.java | 58 +- .../ApplicationTypeResourceInnerTests.java | 16 +- .../ApplicationTypeResourceListTests.java | 8 +- ...pplicationTypeResourcePropertiesTests.java | 2 +- .../ApplicationTypeUpdateParametersTests.java | 10 +- ...licationTypeVersionResourceInnerTests.java | 21 +- ...plicationTypeVersionResourceListTests.java | 10 +- ...ionTypeVersionResourcePropertiesTests.java | 8 +- ...ationTypeVersionUpdateParametersTests.java | 8 +- ...icationTypeVersionsCleanupPolicyTests.java | 8 +- ...onTypeVersionsCreateOrUpdateMockTests.java | 18 +- ...nTypeVersionsGetWithResponseMockTests.java | 10 +- ...rsionsListByApplicationTypesMockTests.java | 10 +- ...esCreateOrUpdateWithResponseMockTests.java | 14 +- ...licationTypesGetWithResponseMockTests.java | 8 +- .../ApplicationTypesListMockTests.java | 8 +- ...cationUpdateParametersPropertiesTests.java | 40 + .../ApplicationUpdateParametersTests.java | 12 +- .../ApplicationsCreateOrUpdateMockTests.java | 125 ++- .../ApplicationsGetWithResponseMockTests.java | 57 +- .../generated/ApplicationsListMockTests.java | 54 +- ...eragePartitionLoadScalingTriggerTests.java | 26 +- ...AverageServiceLoadScalingTriggerTests.java | 32 +- .../generated/AzureActiveDirectoryTests.java | 23 +- .../generated/ClientCertificateTests.java | 23 +- .../generated/ClusterHealthPolicyTests.java | 14 +- .../ClusterMonitoringPolicyTests.java | 32 +- .../ClusterUpgradeDeltaHealthPolicyTests.java | 20 +- .../generated/ClusterUpgradePolicyTests.java | 74 +- .../EndpointRangeDescriptionTests.java | 13 +- .../FaultSimulationConstraintsTests.java | 8 +- .../FaultSimulationContentTests.java | 8 +- .../FaultSimulationContentWrapperTests.java | 14 +- .../FaultSimulationDetailsTests.java | 16 +- .../FaultSimulationIdContentTests.java | 8 +- .../generated/FaultSimulationInnerTests.java | 25 +- .../FaultSimulationListResultTests.java | 30 +- .../generated/FrontendConfigurationTests.java | 26 +- ...tionPublicIpAddressConfigurationTests.java | 27 +- .../generated/IpConfigurationTests.java | 67 +- .../generated/IpTagTests.java | 12 +- .../generated/LoadBalancingRuleTests.java | 44 +- ...enanceWindowsPostWithResponsMockTests.java | 3 +- .../ManagedAzResiliencyStatusInnerTests.java | 2 +- ...iencyStatusesGetWithResponseMockTests.java | 4 +- .../ManagedClusterUpdateParametersTests.java | 11 +- ...tFaultSimulationWithResponseMockTests.java | 30 +- ...dClustersListFaultSimulationMockTests.java | 26 +- ...agedMaintenanceWindowStatusInnerTests.java | 2 +- ...eWindowStatusesGetWithResponMockTests.java | 4 +- ...portedVMSizesGetWithResponseMockTests.java | 5 +- ...anagedUnsupportedVMSizesListMockTests.java | 4 +- .../generated/ManagedVMSizeInnerTests.java | 2 +- .../generated/ManagedVMSizesResultTests.java | 4 +- .../generated/NamedPartitionSchemeTests.java | 13 +- .../generated/NetworkSecurityRuleTests.java | 80 +- .../NodeTypeActionParametersTests.java | 21 +- .../NodeTypeAvailableSkuInnerTests.java | 2 +- .../NodeTypeFaultSimulationTests.java | 8 +- .../generated/NodeTypeListSkuResultTests.java | 4 +- .../generated/NodeTypeNatConfigTests.java | 20 +- .../generated/NodeTypeSkuCapacityTests.java | 2 +- .../generated/NodeTypeSkuTests.java | 20 +- .../generated/NodeTypeSkusListMockTests.java | 4 +- .../generated/NodeTypeSupportedSkuTests.java | 2 +- .../NodeTypeUpdateParametersTests.java | 22 +- ...tFaultSimulationWithResponseMockTests.java | 30 +- ...NodeTypesListFaultSimulationMockTests.java | 28 +- .../generated/OperationsListMockTests.java | 18 +- ...itionInstanceCountScaleMechanismTests.java | 20 +- .../generated/ResourceAzStatusTests.java | 2 +- .../generated/RestartReplicaRequestTests.java | 40 + .../RuntimeApplicationHealthPolicyTests.java | 78 ++ ...sumeApplicationUpgradeParametersTests.java | 11 +- ...ingUpgradeUpdateMonitoringPolicyTests.java | 56 ++ .../RuntimeServiceTypeHealthPolicyTests.java | 33 + ...dateApplicationUpgradeParametersTests.java | 137 ++++ .../generated/ServiceCorrelationTests.java | 17 +- .../generated/ServiceEndpointTests.java | 21 +- .../generated/ServiceLoadMetricTests.java | 32 +- ...vicePlacementInvalidDomainPolicyTests.java | 9 +- ...acementPreferPrimaryDomainPolicyTests.java | 8 +- ...tRequireDomainDistributionPolicyTests.java | 8 +- ...icePlacementRequiredDomainPolicyTests.java | 9 +- .../generated/ServiceResourceInnerTests.java | 98 +-- .../generated/ServiceResourceListTests.java | 28 +- .../ServiceResourcePropertiesBaseTests.java | 84 +- .../ServiceResourcePropertiesTests.java | 96 ++- .../ServiceUpdateParametersTests.java | 9 +- .../ServicesCreateOrUpdateMockTests.java | 75 +- .../ServicesGetWithResponseMockTests.java | 31 +- .../ServicesListByApplicationsMockTests.java | 28 +- .../SettingsParameterDescriptionTests.java | 14 +- .../SettingsSectionDescriptionTests.java | 25 +- .../generated/SkuTests.java | 8 +- .../StatefulServicePropertiesTests.java | 118 +-- .../StatelessServicePropertiesTests.java | 116 +-- .../generated/SubnetTests.java | 26 +- .../VMSSExtensionPropertiesTests.java | 46 +- .../generated/VMSizeTests.java | 2 +- .../generated/VaultCertificateTests.java | 17 +- .../generated/VaultSecretGroupTests.java | 21 +- .../generated/VmApplicationTests.java | 32 +- .../generated/VmManagedIdentityTests.java | 14 +- .../generated/VmssDataDiskTests.java | 26 +- .../generated/VmssExtensionTests.java | 51 +- .../ZoneFaultSimulationContentTests.java | 20 +- .../tsp-location.yaml | 4 +- 213 files changed, 6170 insertions(+), 1544 deletions(-) create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationFetchHealthRequest.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParametersProperties.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/HealthFilter.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartDeployedCodePackageRequest.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartKind.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartReplicaRequest.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeApplicationHealthPolicy.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeFailureAction.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeMode.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeUpdateMonitoringPolicy.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeServiceTypeHealthPolicy.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpdateApplicationUpgradeParameters.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpgradeKind.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsFetchHealthSamples.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsRestartDeployedCodePackageSamples.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateUpgradeSamples.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesRestartReplicaSamples.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationFetchHealthRequestTests.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersPropertiesTests.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RestartReplicaRequestTests.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeApplicationHealthPolicyTests.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeRollingUpgradeUpdateMonitoringPolicyTests.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeServiceTypeHealthPolicyTests.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeUpdateApplicationUpgradeParametersTests.java diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/CHANGELOG.md b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/CHANGELOG.md index cea3c568bb76..6c778eafc2f5 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/CHANGELOG.md +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/CHANGELOG.md @@ -1,14 +1,73 @@ # Release History -## 1.1.0-beta.3 (Unreleased) +## 1.1.0-beta.3 (2025-11-10) + +- Azure Resource Manager Service Fabric Managed Clusters client library for Java. This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. Service Fabric Managed Clusters Management Client. Package api-version 2025-10-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +* `models.RuntimeUpdateApplicationUpgradeParameters` was added -### Bugs Fixed +* `models.RestartKind` was added -### Other Changes +* `models.ApplicationFetchHealthRequest` was added + +* `models.RestartDeployedCodePackageRequest` was added + +* `models.RestartReplicaRequest` was added + +* `models.RuntimeApplicationHealthPolicy` was added + +* `models.RuntimeRollingUpgradeMode` was added + +* `models.RuntimeRollingUpgradeUpdateMonitoringPolicy` was added + +* `models.RuntimeUpgradeKind` was added + +* `models.RuntimeServiceTypeHealthPolicy` was added + +* `models.RuntimeFailureAction` was added + +* `models.ApplicationUpdateParametersProperties` was added + +* `models.HealthFilter` was added + +#### `models.ApplicationResource` was modified + +* `updateUpgrade(models.RuntimeUpdateApplicationUpgradeParameters)` was added +* `restartDeployedCodePackage(models.RestartDeployedCodePackageRequest)` was added +* `fetchHealth(models.ApplicationFetchHealthRequest)` was added +* `updateUpgrade(models.RuntimeUpdateApplicationUpgradeParameters,com.azure.core.util.Context)` was added +* `restartDeployedCodePackage(models.RestartDeployedCodePackageRequest,com.azure.core.util.Context)` was added +* `fetchHealth(models.ApplicationFetchHealthRequest,com.azure.core.util.Context)` was added + +#### `models.ApplicationUpdateParameters` was modified + +* `withProperties(models.ApplicationUpdateParametersProperties)` was added +* `properties()` was added + +#### `models.Services` was modified + +* `restartReplica(java.lang.String,java.lang.String,java.lang.String,java.lang.String,models.RestartReplicaRequest,com.azure.core.util.Context)` was added +* `restartReplica(java.lang.String,java.lang.String,java.lang.String,java.lang.String,models.RestartReplicaRequest)` was added + +#### `models.Applications` was modified + +* `fetchHealth(java.lang.String,java.lang.String,java.lang.String,models.ApplicationFetchHealthRequest)` was added +* `updateUpgrade(java.lang.String,java.lang.String,java.lang.String,models.RuntimeUpdateApplicationUpgradeParameters)` was added +* `updateUpgrade(java.lang.String,java.lang.String,java.lang.String,models.RuntimeUpdateApplicationUpgradeParameters,com.azure.core.util.Context)` was added +* `restartDeployedCodePackage(java.lang.String,java.lang.String,java.lang.String,models.RestartDeployedCodePackageRequest)` was added +* `restartDeployedCodePackage(java.lang.String,java.lang.String,java.lang.String,models.RestartDeployedCodePackageRequest,com.azure.core.util.Context)` was added +* `fetchHealth(java.lang.String,java.lang.String,java.lang.String,models.ApplicationFetchHealthRequest,com.azure.core.util.Context)` was added + +#### `models.ServiceResource` was modified + +* `restartReplica(models.RestartReplicaRequest)` was added +* `restartReplica(models.RestartReplicaRequest,com.azure.core.util.Context)` was added + +#### `models.ApplicationResource$Update` was modified + +* `withProperties(models.ApplicationUpdateParametersProperties)` was added ## 1.1.0-beta.2 (2025-08-11) diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/README.md b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/README.md index 11f309c7c124..ff80581d40a0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/README.md +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Service Fabric Managed Clusters client library for Java. -This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. Service Fabric Managed Clusters Management Client. Package api-version 2025-06-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. Service Fabric Managed Clusters Management Client. Package api-version 2025-10-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-servicefabricmanagedclusters</artifactId> - <version>1.1.0-beta.2</version> + <version>1.1.0-beta.3</version> </dependency> ``` [//]: # ({x-version-update-end}) diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/SAMPLE.md b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/SAMPLE.md index 9b27e8e16f97..00e17a41a359 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/SAMPLE.md +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/SAMPLE.md @@ -21,12 +21,15 @@ - [CreateOrUpdate](#applications_createorupdate) - [Delete](#applications_delete) +- [FetchHealth](#applications_fetchhealth) - [Get](#applications_get) - [List](#applications_list) - [ReadUpgrade](#applications_readupgrade) +- [RestartDeployedCodePackage](#applications_restartdeployedcodepackage) - [ResumeUpgrade](#applications_resumeupgrade) - [StartRollback](#applications_startrollback) - [Update](#applications_update) +- [UpdateUpgrade](#applications_updateupgrade) ## ManagedApplyMaintenanceWindow @@ -97,6 +100,7 @@ - [Delete](#services_delete) - [Get](#services_get) - [ListByApplications](#services_listbyapplications) +- [RestartReplica](#services_restartreplica) - [Update](#services_update) ### ApplicationTypeVersions_CreateOrUpdate @@ -106,7 +110,7 @@ */ public final class ApplicationTypeVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPutOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionPutOperation_example.json */ /** * Sample code: Put an application type version. @@ -133,7 +137,7 @@ public final class ApplicationTypeVersionsCreateOrUpdateSamples { */ public final class ApplicationTypeVersionsDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionDeleteOperation_example.json */ /** * Sample code: Delete an application type version. @@ -156,7 +160,7 @@ public final class ApplicationTypeVersionsDeleteSamples { */ public final class ApplicationTypeVersionsGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionGetOperation_example.json */ /** * Sample code: Get an application type version. @@ -179,7 +183,7 @@ public final class ApplicationTypeVersionsGetSamples { */ public final class ApplicationTypeVersionsListByApplicationTypeSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionListOperation_example.json */ /** * Sample code: Get a list of application type version resources. @@ -206,7 +210,7 @@ import java.util.Map; */ public final class ApplicationTypeVersionsUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionPatchOperation_example.json */ /** * Sample code: Patch an application type version. @@ -243,7 +247,7 @@ public final class ApplicationTypeVersionsUpdateSamples { */ public final class ApplicationTypesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePutOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNamePutOperation_example.json */ /** * Sample code: Put an application type. @@ -269,7 +273,7 @@ public final class ApplicationTypesCreateOrUpdateSamples { */ public final class ApplicationTypesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNameDeleteOperation_example.json */ /** * Sample code: Delete an application type. @@ -291,7 +295,7 @@ public final class ApplicationTypesDeleteSamples { */ public final class ApplicationTypesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNameGetOperation_example.json */ /** * Sample code: Get an application type. @@ -313,7 +317,7 @@ public final class ApplicationTypesGetSamples { */ public final class ApplicationTypesListSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNameListOperation_example.json */ /** * Sample code: Get a list of application type name resources. @@ -339,7 +343,7 @@ import java.util.Map; */ public final class ApplicationTypesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNamePatchOperation_example.json */ /** * Sample code: Patch an application type. @@ -385,7 +389,7 @@ import java.util.Map; */ public final class ApplicationsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationPutOperation_example_max.json + * x-ms-original-file: 2025-10-01-preview/ApplicationPutOperation_example_max.json */ /** * Sample code: Put an application with maximum parameters. @@ -428,7 +432,7 @@ public final class ApplicationsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/ApplicationPutOperation_example_min.json + * x-ms-original-file: 2025-10-01-preview/ApplicationPutOperation_example_min.json */ /** * Sample code: Put an application with minimum parameters. @@ -468,7 +472,7 @@ public final class ApplicationsCreateOrUpdateSamples { */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationDeleteOperation_example.json */ /** * Sample code: Delete an application. @@ -482,6 +486,38 @@ public final class ApplicationsDeleteSamples { } ``` +### Applications_FetchHealth + +```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.HealthFilter; + +/** + * Samples for Applications FetchHealth. + */ +public final class ApplicationsFetchHealthSamples { + /* + * x-ms-original-file: 2025-10-01-preview/ApplicationActionFetchHealth_example.json + */ + /** + * Sample code: Fetch application health. + * + * @param manager Entry point to ServiceFabricManagedClustersManager. + */ + public static void fetchApplicationHealth( + com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + manager.applications() + .fetchHealth("resRg", "myCluster", "myApp", + new ApplicationFetchHealthRequest().withEventsHealthStateFilter(HealthFilter.ERROR) + .withDeployedApplicationsHealthStateFilter(HealthFilter.ERROR) + .withServicesHealthStateFilter(HealthFilter.ERROR) + .withExcludeHealthStatistics(true) + .withTimeout(30L), + com.azure.core.util.Context.NONE); + } +} +``` + ### Applications_Get ```java @@ -490,7 +526,7 @@ public final class ApplicationsDeleteSamples { */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationGetOperation_example.json */ /** * Sample code: Get an application. @@ -512,7 +548,7 @@ public final class ApplicationsGetSamples { */ public final class ApplicationsListSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationListOperation_example.json */ /** * Sample code: Get a list of application resources. @@ -534,7 +570,7 @@ public final class ApplicationsListSamples { */ public final class ApplicationsReadUpgradeSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationActionGetUpgrade_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationActionGetUpgrade_example.json */ /** * Sample code: Get an application upgrade. @@ -548,6 +584,37 @@ public final class ApplicationsReadUpgradeSamples { } ``` +### Applications_RestartDeployedCodePackage + +```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartDeployedCodePackageRequest; + +/** + * Samples for Applications RestartDeployedCodePackage. + */ +public final class ApplicationsRestartDeployedCodePackageSamples { + /* + * x-ms-original-file: 2025-10-01-preview/ApplicationActionRestartDeployedCodePackage_example.json + */ + /** + * Sample code: Restart deployed code package. + * + * @param manager Entry point to ServiceFabricManagedClustersManager. + */ + public static void restartDeployedCodePackage( + com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + manager.applications() + .restartDeployedCodePackage("resRg", "myCluster", "myApp", + new RestartDeployedCodePackageRequest().withNodeName("nt1_0") + .withServiceManifestName("TestPkg") + .withCodePackageName("fakeTokenPlaceholder") + .withCodePackageInstanceId("fakeTokenPlaceholder") + .withServicePackageActivationId("sharedProcess"), + com.azure.core.util.Context.NONE); + } +} +``` + ### Applications_ResumeUpgrade ```java @@ -558,7 +625,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResu */ public final class ApplicationsResumeUpgradeSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationActionResumeUpgrade_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationActionResumeUpgrade_example.json */ /** * Sample code: Resume upgrade. @@ -583,7 +650,7 @@ public final class ApplicationsResumeUpgradeSamples { */ public final class ApplicationsStartRollbackSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationActionStartRollback_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationActionStartRollback_example.json */ /** * Sample code: Start an application upgrade rollback. @@ -601,6 +668,7 @@ public final class ApplicationsStartRollbackSamples { ```java import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationResource; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParametersProperties; import java.util.HashMap; import java.util.Map; @@ -609,7 +677,7 @@ import java.util.Map; */ public final class ApplicationsUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationPatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationPatchOperation_example.json */ /** * Sample code: Patch an application. @@ -621,7 +689,78 @@ public final class ApplicationsUpdateSamples { ApplicationResource resource = manager.applications() .getWithResponse("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("a", "b")).apply(); + resource.update() + .withTags(mapOf("a", "b")) + .withProperties(new ApplicationUpdateParametersProperties() + .withParameters(mapOf("param1", "value1", "param2", "value2"))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### Applications_UpdateUpgrade + +```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeApplicationHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeFailureAction; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeMode; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeUpdateMonitoringPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeServiceTypeHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpgradeKind; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Applications UpdateUpgrade. + */ +public final class ApplicationsUpdateUpgradeSamples { + /* + * x-ms-original-file: 2025-10-01-preview/ApplicationActionUpdateUpgrade_example.json + */ + /** + * Sample code: Update an application upgrade. + * + * @param manager Entry point to ServiceFabricManagedClustersManager. + */ + public static void updateAnApplicationUpgrade( + com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + manager.applications() + .updateUpgrade("resRg", "myCluster", "myApp", + new RuntimeUpdateApplicationUpgradeParameters().withName("fabric:/Voting") + .withUpgradeKind(RuntimeUpgradeKind.ROLLING) + .withApplicationHealthPolicy(new RuntimeApplicationHealthPolicy().withConsiderWarningAsError(true) + .withMaxPercentUnhealthyDeployedApplications(10) + .withDefaultServiceTypeHealthPolicy( + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(12) + .withMaxPercentUnhealthyPartitionsPerService(10) + .withMaxPercentUnhealthyReplicasPerPartition(11)) + .withServiceTypeHealthPolicyMap(mapOf("VotingWeb", + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(15) + .withMaxPercentUnhealthyPartitionsPerService(13) + .withMaxPercentUnhealthyReplicasPerPartition(14)))) + .withUpdateDescription(new RuntimeRollingUpgradeUpdateMonitoringPolicy() + .withRollingUpgradeMode(RuntimeRollingUpgradeMode.MONITORED) + .withForceRestart(true) + .withFailureAction(RuntimeFailureAction.MANUAL) + .withHealthCheckWaitDurationInMilliseconds("PT0H0M10S") + .withHealthCheckStableDurationInMilliseconds("PT1H0M0S") + .withHealthCheckRetryTimeoutInMilliseconds("PT0H15M0S") + .withUpgradeTimeoutInMilliseconds("PT2H0M0S") + .withUpgradeDomainTimeoutInMilliseconds("PT2H0M0S")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -646,7 +785,7 @@ public final class ApplicationsUpdateSamples { */ public final class ManagedApplyMaintenanceWindowPostSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedApplyMaintenanceWindowPost_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedApplyMaintenanceWindowPost_example.json */ /** * Sample code: Apply Maintenance Window Status. @@ -669,7 +808,7 @@ public final class ManagedApplyMaintenanceWindowPostSamples { */ public final class ManagedAzResiliencyStatusesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/managedAzResiliencyStatusGet_example.json + * x-ms-original-file: 2025-10-01-preview/managedAzResiliencyStatusGet_example.json */ /** * Sample code: Az Resiliency status of Base Resources. @@ -692,7 +831,7 @@ public final class ManagedAzResiliencyStatusesGetSamples { */ public final class ManagedClusterVersionGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGet_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterVersionGet_example.json */ /** * Sample code: Get cluster version. @@ -716,7 +855,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClus */ public final class ManagedClusterVersionGetByEnvironmentSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGetByEnvironment_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterVersionGetByEnvironment_example.json */ /** * Sample code: Get cluster version by environment. @@ -740,7 +879,7 @@ public final class ManagedClusterVersionGetByEnvironmentSamples { */ public final class ManagedClusterVersionListSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionList_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterVersionList_example.json */ /** * Sample code: List cluster versions. @@ -764,7 +903,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClus */ public final class ManagedClusterVersionListByEnvironmentSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionListByEnvironment.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterVersionListByEnvironment.json */ /** * Sample code: List cluster versions by environment. @@ -818,7 +957,7 @@ import java.util.Map; */ public final class ManagedClustersCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterPutOperation_example_max.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterPutOperation_example_max.json */ /** * Sample code: Put a cluster with maximum parameters. @@ -927,7 +1066,7 @@ public final class ManagedClustersCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterPutOperation_example_min.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterPutOperation_example_min.json */ /** * Sample code: Put a cluster with minimum parameters. @@ -974,7 +1113,7 @@ public final class ManagedClustersCreateOrUpdateSamples { */ public final class ManagedClustersDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterDeleteOperation_example.json */ /** * Sample code: Delete a cluster. @@ -996,7 +1135,7 @@ public final class ManagedClustersDeleteSamples { */ public final class ManagedClustersGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterGetOperation_example.json */ /** * Sample code: Get a cluster. @@ -1021,7 +1160,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimula */ public final class ManagedClustersGetFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterGetFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/ManagedClusterGetFaultSimulation_example.json */ /** * Sample code: Get Managed Cluster Fault Simulation. @@ -1046,7 +1185,7 @@ public final class ManagedClustersGetFaultSimulationSamples { */ public final class ManagedClustersListSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterListBySubscriptionOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterListBySubscriptionOperation_example.json */ /** * Sample code: List managed clusters. @@ -1068,7 +1207,7 @@ public final class ManagedClustersListSamples { */ public final class ManagedClustersListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterListByResourceGroupOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterListByResourceGroupOperation_example.json */ /** * Sample code: List cluster by resource group. @@ -1090,7 +1229,7 @@ public final class ManagedClustersListByResourceGroupSamples { */ public final class ManagedClustersListFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterListFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/ManagedClusterListFaultSimulation_example.json */ /** * Sample code: List Managed Cluster Fault Simulation. @@ -1116,7 +1255,7 @@ import java.util.Arrays; */ public final class ManagedClustersStartFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStartFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/ManagedClusterStartFaultSimulation_example.json */ /** * Sample code: Start Managed Cluster Fault Simulation. @@ -1142,7 +1281,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimula */ public final class ManagedClustersStopFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStopFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/ManagedClusterStopFaultSimulation_example.json */ /** * Sample code: Stop Managed Cluster Fault Simulation. @@ -1171,7 +1310,7 @@ import java.util.Map; */ public final class ManagedClustersUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterPatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterPatchOperation_example.json */ /** * Sample code: Patch a managed cluster. @@ -1208,7 +1347,7 @@ public final class ManagedClustersUpdateSamples { */ public final class ManagedMaintenanceWindowStatusesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedMaintenanceWindowStatusGet_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedMaintenanceWindowStatusGet_example.json */ /** * Sample code: Get Maintenance Window Status. @@ -1231,7 +1370,7 @@ public final class ManagedMaintenanceWindowStatusesGetSamples { */ public final class ManagedUnsupportedVMSizesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesGet_example.json + * x-ms-original-file: 2025-10-01-preview/managedUnsupportedVMSizesGet_example.json */ /** * Sample code: Get unsupported vm sizes. @@ -1254,7 +1393,7 @@ public final class ManagedUnsupportedVMSizesGetSamples { */ public final class ManagedUnsupportedVMSizesListSamples { /* - * x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesList_example.json + * x-ms-original-file: 2025-10-01-preview/managedUnsupportedVMSizesList_example.json */ /** * Sample code: List unsupported vm sizes. @@ -1276,7 +1415,7 @@ public final class ManagedUnsupportedVMSizesListSamples { */ public final class NodeTypeSkusListSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypeSkusListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypeSkusListOperation_example.json */ /** * Sample code: List a node type SKUs. @@ -1326,7 +1465,7 @@ import java.util.Map; */ public final class NodeTypesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationStateless_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationStateless_example.json */ /** * Sample code: Put an stateless node type with temporary disk for service fabric. @@ -1361,7 +1500,7 @@ public final class NodeTypesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperation_example_max.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperation_example_max.json */ /** * Sample code: Put a node type with maximum parameters. @@ -1477,7 +1616,7 @@ public final class NodeTypesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationAutoScale_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationAutoScale_example.json */ /** * Sample code: Put a node type with auto-scale parameters. @@ -1523,7 +1662,7 @@ public final class NodeTypesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperation_example_min.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperation_example_min.json */ /** * Sample code: Put a node type with minimum parameters. @@ -1547,7 +1686,7 @@ public final class NodeTypesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationDedicatedHost_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationDedicatedHost_example.json */ /** * Sample code: Put node type with dedicated hosts. @@ -1577,7 +1716,7 @@ public final class NodeTypesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationVmImagePlan_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationVmImagePlan_example.json */ /** * Sample code: Put node type with vm image plan. @@ -1604,7 +1743,7 @@ public final class NodeTypesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json */ /** * Sample code: Put node type with shared galleries custom vm image. @@ -1626,7 +1765,7 @@ public final class NodeTypesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationCustomImage_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationCustomImage_example.json */ /** * Sample code: Put node type with custom vm image. @@ -1672,7 +1811,7 @@ import java.util.Arrays; */ public final class NodeTypesDeallocateSamples { /* - * x-ms-original-file: 2025-06-01-preview/DeallocateNodes_example.json + * x-ms-original-file: 2025-10-01-preview/DeallocateNodes_example.json */ /** * Sample code: Deallocate nodes. @@ -1697,7 +1836,7 @@ public final class NodeTypesDeallocateSamples { */ public final class NodeTypesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypeDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypeDeleteOperation_example.json */ /** * Sample code: Delete a node type. @@ -1722,7 +1861,7 @@ import java.util.Arrays; */ public final class NodeTypesDeleteNodeSamples { /* - * x-ms-original-file: 2025-06-01-preview/DeleteNodes_example.json + * x-ms-original-file: 2025-10-01-preview/DeleteNodes_example.json */ /** * Sample code: Delete nodes. @@ -1747,7 +1886,7 @@ public final class NodeTypesDeleteNodeSamples { */ public final class NodeTypesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypeGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypeGetOperation_example.json */ /** * Sample code: Get a node type. @@ -1771,7 +1910,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimula */ public final class NodeTypesGetFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeGetFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/NodeTypeGetFaultSimulation_example.json */ /** * Sample code: Get Node Type Fault Simulation. @@ -1796,7 +1935,7 @@ public final class NodeTypesGetFaultSimulationSamples { */ public final class NodeTypesListByManagedClustersSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypeListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypeListOperation_example.json */ /** * Sample code: List node type of the specified managed cluster. @@ -1818,7 +1957,7 @@ public final class NodeTypesListByManagedClustersSamples { */ public final class NodeTypesListFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeListFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/NodeTypeListFaultSimulation_example.json */ /** * Sample code: List Node Type Fault Simulation. @@ -1844,7 +1983,7 @@ import java.util.Arrays; */ public final class NodeTypesRedeploySamples { /* - * x-ms-original-file: 2025-06-01-preview/RedeployNodes_UD_example.json + * x-ms-original-file: 2025-10-01-preview/RedeployNodes_UD_example.json */ /** * Sample code: Redeploy all nodes by upgrade domain. @@ -1860,7 +1999,7 @@ public final class NodeTypesRedeploySamples { } /* - * x-ms-original-file: 2025-06-01-preview/RedeployNodes_example.json + * x-ms-original-file: 2025-10-01-preview/RedeployNodes_example.json */ /** * Sample code: Redeploy nodes. @@ -1889,7 +2028,7 @@ import java.util.Arrays; */ public final class NodeTypesReimageSamples { /* - * x-ms-original-file: 2025-06-01-preview/ReimageNodes_example.json + * x-ms-original-file: 2025-10-01-preview/ReimageNodes_example.json */ /** * Sample code: Reimage nodes. @@ -1905,7 +2044,7 @@ public final class NodeTypesReimageSamples { } /* - * x-ms-original-file: 2025-06-01-preview/ReimageNodes_UD_example.json + * x-ms-original-file: 2025-10-01-preview/ReimageNodes_UD_example.json */ /** * Sample code: Reimage all nodes by upgrade domain. @@ -1933,7 +2072,7 @@ import java.util.Arrays; */ public final class NodeTypesRestartSamples { /* - * x-ms-original-file: 2025-06-01-preview/RestartNodes_example.json + * x-ms-original-file: 2025-10-01-preview/RestartNodes_example.json */ /** * Sample code: Restart nodes. @@ -1961,7 +2100,7 @@ import java.util.Arrays; */ public final class NodeTypesStartSamples { /* - * x-ms-original-file: 2025-06-01-preview/StartNodes_example.json + * x-ms-original-file: 2025-10-01-preview/StartNodes_example.json */ /** * Sample code: Start nodes. @@ -1989,7 +2128,7 @@ import java.util.Arrays; */ public final class NodeTypesStartFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStartFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/NodeTypeStartFaultSimulation_example.json */ /** * Sample code: Start Node Type Fault Simulation. @@ -2015,7 +2154,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimula */ public final class NodeTypesStopFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStopFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/NodeTypeStopFaultSimulation_example.json */ /** * Sample code: Stop Node Type Fault Simulation. @@ -2045,7 +2184,7 @@ import java.util.Map; */ public final class NodeTypesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePatchOperation_example.json */ /** * Sample code: Patch a node type. @@ -2061,7 +2200,7 @@ public final class NodeTypesUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePatchOperationAutoScale_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePatchOperationAutoScale_example.json */ /** * Sample code: Patch a node type while auto-scaling. @@ -2101,7 +2240,7 @@ public final class NodeTypesUpdateSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: 2025-06-01-preview/OperationsList_example.json + * x-ms-original-file: 2025-10-01-preview/OperationsList_example.json */ /** * Sample code: List the operations for the provider. @@ -2139,7 +2278,7 @@ import java.util.Map; */ public final class ServicesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServicePutOperation_example_min.json + * x-ms-original-file: 2025-10-01-preview/ServicePutOperation_example_min.json */ /** * Sample code: Put a service with minimum parameters. @@ -2159,7 +2298,7 @@ public final class ServicesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/ServicePutOperation_example_max.json + * x-ms-original-file: 2025-10-01-preview/ServicePutOperation_example_max.json */ /** * Sample code: Put a service with maximum parameters. @@ -2223,7 +2362,7 @@ public final class ServicesCreateOrUpdateSamples { */ public final class ServicesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServiceDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ServiceDeleteOperation_example.json */ /** * Sample code: Delete a service. @@ -2245,7 +2384,7 @@ public final class ServicesDeleteSamples { */ public final class ServicesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServiceGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ServiceGetOperation_example.json */ /** * Sample code: Get a service. @@ -2268,7 +2407,7 @@ public final class ServicesGetSamples { */ public final class ServicesListByApplicationsSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServiceListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ServiceListOperation_example.json */ /** * Sample code: Get a list of service resources. @@ -2282,6 +2421,39 @@ public final class ServicesListByApplicationsSamples { } ``` +### Services_RestartReplica + +```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartKind; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest; +import java.util.Arrays; + +/** + * Samples for Services RestartReplica. + */ +public final class ServicesRestartReplicaSamples { + /* + * x-ms-original-file: 2025-10-01-preview/ServiceActionRestartReplica_example.json + */ + /** + * Sample code: Restart replicas. + * + * @param manager Entry point to ServiceFabricManagedClustersManager. + */ + public static void restartReplicas( + com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + manager.services() + .restartReplica("resRg", "myCluster", "myApp", "myService", + new RestartReplicaRequest().withPartitionId("00000000-0000-0000-0000-000000000000") + .withReplicaIds(Arrays.asList(123456789012345680L)) + .withRestartKind(RestartKind.SIMULTANEOUS) + .withForceRestart(false) + .withTimeout(60L), + com.azure.core.util.Context.NONE); + } +} +``` + ### Services_Update ```java @@ -2294,7 +2466,7 @@ import java.util.Map; */ public final class ServicesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServicePatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ServicePatchOperation_example.json */ /** * Sample code: Patch a service. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/pom.xml b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/pom.xml index 5220975afa24..90cf7b6b46cb 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/pom.xml +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/pom.xml @@ -18,7 +18,7 @@ <packaging>jar</packaging> <name>Microsoft Azure SDK for Service Fabric Managed Clusters Management</name> - <description>This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Service Fabric Managed Clusters Management Client. Package api-version 2025-06-01-preview.</description> + <description>This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Service Fabric Managed Clusters Management Client. Package api-version 2025-10-01-preview.</description> <url>https://github.com/Azure/azure-sdk-for-java</url> <licenses> diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationsClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationsClient.java index c02bb0eceb0d..782ef62f3709 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationsClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationsClient.java @@ -12,8 +12,11 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartDeployedCodePackageRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters; /** * An instance of this class provides access to all the operations defined in ApplicationsClient. @@ -121,7 +124,23 @@ ApplicationResourceInner createOrUpdate(String resourceGroupName, String cluster ApplicationResourceInner parameters, Context context); /** - * Updates the tags of an application resource of a given managed cluster. + * Updates an application resource of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The application resource updated tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the application resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ApplicationResourceInner>, ApplicationResourceInner> beginUpdate(String resourceGroupName, + String clusterName, String applicationName, ApplicationUpdateParameters parameters); + + /** + * Updates an application resource of a given managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -131,14 +150,14 @@ ApplicationResourceInner createOrUpdate(String resourceGroupName, String cluster * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the application resource along with {@link Response}. + * @return the {@link SyncPoller} for polling of the application resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response<ApplicationResourceInner> updateWithResponse(String resourceGroupName, String clusterName, - String applicationName, ApplicationUpdateParameters parameters, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ApplicationResourceInner>, ApplicationResourceInner> beginUpdate(String resourceGroupName, + String clusterName, String applicationName, ApplicationUpdateParameters parameters, Context context); /** - * Updates the tags of an application resource of a given managed cluster. + * Updates an application resource of a given managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -153,6 +172,23 @@ Response<ApplicationResourceInner> updateWithResponse(String resourceGroupName, ApplicationResourceInner update(String resourceGroupName, String clusterName, String applicationName, ApplicationUpdateParameters parameters); + /** + * Updates an application resource of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The application resource updated tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the application resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApplicationResourceInner update(String resourceGroupName, String clusterName, String applicationName, + ApplicationUpdateParameters parameters, Context context); + /** * Delete a Service Fabric managed application resource with the specified name. * @@ -433,4 +469,204 @@ SyncPoller<PollResult<Void>, Void> beginStartRollback(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) void startRollback(String resourceGroupName, String clusterName, String applicationName, Context context); + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginUpdateUpgrade(String resourceGroupName, String clusterName, + String applicationName, RuntimeUpdateApplicationUpgradeParameters parameters); + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginUpdateUpgrade(String resourceGroupName, String clusterName, + String applicationName, RuntimeUpdateApplicationUpgradeParameters parameters, Context context); + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 updateUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters); + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 updateUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters, Context context); + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the status of the deployed application health. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginFetchHealth(String resourceGroupName, String clusterName, + String applicationName, ApplicationFetchHealthRequest parameters); + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the status of the deployed application health. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginFetchHealth(String resourceGroupName, String clusterName, + String applicationName, ApplicationFetchHealthRequest parameters, Context context); + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 fetchHealth(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters); + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 fetchHealth(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters, Context context); + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginRestartDeployedCodePackage(String resourceGroupName, String clusterName, + String applicationName, RestartDeployedCodePackageRequest parameters); + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginRestartDeployedCodePackage(String resourceGroupName, String clusterName, + String applicationName, RestartDeployedCodePackageRequest parameters, Context context); + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void restartDeployedCodePackage(String resourceGroupName, String clusterName, String applicationName, + RestartDeployedCodePackageRequest parameters); + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void restartDeployedCodePackage(String resourceGroupName, String clusterName, String applicationName, + RestartDeployedCodePackageRequest parameters, Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java index f1f196c6f690..064c432bc32a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java @@ -114,6 +114,21 @@ SyncPoller<PollResult<ManagedClusterInner>, ManagedClusterInner> beginCreateOrUp ManagedClusterInner createOrUpdate(String resourceGroupName, String clusterName, ManagedClusterInner parameters, Context context); + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ManagedClusterInner>, ManagedClusterInner> beginUpdate(String resourceGroupName, + String clusterName, ManagedClusterUpdateParameters parameters); + /** * Update the tags of of a Service Fabric managed cluster resource with the specified name. * @@ -124,11 +139,11 @@ ManagedClusterInner createOrUpdate(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the managed cluster resource along with {@link Response}. + * @return the {@link SyncPoller} for polling of the managed cluster resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response<ManagedClusterInner> updateWithResponse(String resourceGroupName, String clusterName, - ManagedClusterUpdateParameters parameters, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ManagedClusterInner>, ManagedClusterInner> beginUpdate(String resourceGroupName, + String clusterName, ManagedClusterUpdateParameters parameters, Context context); /** * Update the tags of of a Service Fabric managed cluster resource with the specified name. @@ -144,6 +159,22 @@ Response<ManagedClusterInner> updateWithResponse(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) ManagedClusterInner update(String resourceGroupName, String clusterName, ManagedClusterUpdateParameters parameters); + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterInner update(String resourceGroupName, String clusterName, ManagedClusterUpdateParameters parameters, + Context context); + /** * Delete a Service Fabric managed cluster resource with the specified name. * diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java index 4f930568b9db..c2e1ca8b8dff 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java @@ -121,7 +121,7 @@ NodeTypeInner createOrUpdate(String resourceGroupName, String clusterName, Strin NodeTypeInner parameters, Context context); /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -138,7 +138,7 @@ SyncPoller<PollResult<NodeTypeInner>, NodeTypeInner> beginUpdate(String resource String nodeTypeName, NodeTypeUpdateParameters parameters); /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -156,7 +156,7 @@ SyncPoller<PollResult<NodeTypeInner>, NodeTypeInner> beginUpdate(String resource String nodeTypeName, NodeTypeUpdateParameters parameters, Context context); /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -172,7 +172,7 @@ NodeTypeInner update(String resourceGroupName, String clusterName, String nodeTy NodeTypeUpdateParameters parameters); /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServicesClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServicesClient.java index fc0e429a1189..5a341183af9f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServicesClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServicesClient.java @@ -12,6 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ServiceResourceInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceUpdateParameters; /** @@ -257,4 +258,72 @@ PagedIterable<ServiceResourceInner> listByApplications(String resourceGroupName, @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ServiceResourceInner> listByApplications(String resourceGroupName, String clusterName, String applicationName, Context context); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginRestartReplica(String resourceGroupName, String clusterName, + String applicationName, String serviceName, RestartReplicaRequest parameters); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginRestartReplica(String resourceGroupName, String clusterName, + String applicationName, String serviceName, RestartReplicaRequest parameters, Context context); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 restartReplica(String resourceGroupName, String clusterName, String applicationName, String serviceName, + RestartReplicaRequest parameters); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 restartReplica(String resourceGroupName, String clusterName, String applicationName, String serviceName, + RestartReplicaRequest parameters, Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationResourceImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationResourceImpl.java index 1851337b8069..eb9ee14edfe0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationResourceImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationResourceImpl.java @@ -8,12 +8,16 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationResource; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParametersProperties; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpgradePolicy; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUserAssignedIdentity; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedIdentity; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartDeployedCodePackageRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters; import java.util.Collections; import java.util.List; import java.util.Map; @@ -150,16 +154,14 @@ public ApplicationResourceImpl update() { public ApplicationResource apply() { this.innerObject = serviceManager.serviceClient() .getApplications() - .updateWithResponse(resourceGroupName, clusterName, applicationName, updateParameters, Context.NONE) - .getValue(); + .update(resourceGroupName, clusterName, applicationName, updateParameters, Context.NONE); return this; } public ApplicationResource apply(Context context) { this.innerObject = serviceManager.serviceClient() .getApplications() - .updateWithResponse(resourceGroupName, clusterName, applicationName, updateParameters, context) - .getValue(); + .update(resourceGroupName, clusterName, applicationName, updateParameters, context); return this; } @@ -213,6 +215,33 @@ public void startRollback(Context context) { serviceManager.applications().startRollback(resourceGroupName, clusterName, applicationName, context); } + public void updateUpgrade(RuntimeUpdateApplicationUpgradeParameters parameters) { + serviceManager.applications().updateUpgrade(resourceGroupName, clusterName, applicationName, parameters); + } + + public void updateUpgrade(RuntimeUpdateApplicationUpgradeParameters parameters, Context context) { + serviceManager.applications() + .updateUpgrade(resourceGroupName, clusterName, applicationName, parameters, context); + } + + public void fetchHealth(ApplicationFetchHealthRequest parameters) { + serviceManager.applications().fetchHealth(resourceGroupName, clusterName, applicationName, parameters); + } + + public void fetchHealth(ApplicationFetchHealthRequest parameters, Context context) { + serviceManager.applications().fetchHealth(resourceGroupName, clusterName, applicationName, parameters, context); + } + + public void restartDeployedCodePackage(RestartDeployedCodePackageRequest parameters) { + serviceManager.applications() + .restartDeployedCodePackage(resourceGroupName, clusterName, applicationName, parameters); + } + + public void restartDeployedCodePackage(RestartDeployedCodePackageRequest parameters, Context context) { + serviceManager.applications() + .restartDeployedCodePackage(resourceGroupName, clusterName, applicationName, parameters, context); + } + public ApplicationResourceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -258,6 +287,11 @@ public ApplicationResourceImpl withUpgradePolicy(ApplicationUpgradePolicy upgrad return this; } + public ApplicationResourceImpl withProperties(ApplicationUpdateParametersProperties properties) { + this.updateParameters.withProperties(properties); + return this; + } + private boolean isInCreateMode() { return this.innerModel() == null || this.innerModel().id() == null; } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsClientImpl.java index 72a689b6d972..edb07d802187 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsClientImpl.java @@ -37,8 +37,11 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceInner; import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationResourceList; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartDeployedCodePackageRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -116,9 +119,9 @@ Response<BinaryData> createOrUpdateSync(@HostParam("endpoint") String endpoint, Context context); @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<ApplicationResourceInner>> update(@HostParam("endpoint") String endpoint, + Mono<Response<Flux<ByteBuffer>>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, @@ -126,9 +129,9 @@ Mono<Response<ApplicationResourceInner>> update(@HostParam("endpoint") String en Context context); @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response<ApplicationResourceInner> updateSync(@HostParam("endpoint") String endpoint, + Response<BinaryData> updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, @@ -227,6 +230,66 @@ Response<BinaryData> startRollbackSync(@HostParam("endpoint") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("applicationName") String applicationName, Context context); + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/updateUpgrade") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> updateUpgrade(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RuntimeUpdateApplicationUpgradeParameters parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/updateUpgrade") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> updateUpgradeSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RuntimeUpdateApplicationUpgradeParameters parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/fetchHealth") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> fetchHealth(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ApplicationFetchHealthRequest parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/fetchHealth") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> fetchHealthSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ApplicationFetchHealthRequest parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/restartDeployedCodePackage") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> restartDeployedCodePackage(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RestartDeployedCodePackageRequest parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/restartDeployedCodePackage") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> restartDeployedCodePackageSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RestartDeployedCodePackageRequest parameters, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -518,7 +581,7 @@ public ApplicationResourceInner createOrUpdate(String resourceGroupName, String } /** - * Updates the tags of an application resource of a given managed cluster. + * Updates an application resource of a given managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -530,8 +593,8 @@ public ApplicationResourceInner createOrUpdate(String resourceGroupName, String * @return the application resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<ApplicationResourceInner>> updateWithResponseAsync(String resourceGroupName, - String clusterName, String applicationName, ApplicationUpdateParameters parameters) { + private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String applicationName, ApplicationUpdateParameters parameters) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -542,7 +605,7 @@ private Mono<Response<ApplicationResourceInner>> updateWithResponseAsync(String } /** - * Updates the tags of an application resource of a given managed cluster. + * Updates an application resource of a given managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -551,17 +614,20 @@ private Mono<Response<ApplicationResourceInner>> updateWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the application resource on successful completion of {@link Mono}. + * @return the application resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<ApplicationResourceInner> updateAsync(String resourceGroupName, String clusterName, + private Response<BinaryData> updateWithResponse(String resourceGroupName, String clusterName, String applicationName, ApplicationUpdateParameters parameters) { - return updateWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, accept, + parameters, Context.NONE); } /** - * Updates the tags of an application resource of a given managed cluster. + * Updates an application resource of a given managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -574,7 +640,7 @@ private Mono<ApplicationResourceInner> updateAsync(String resourceGroupName, Str * @return the application resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response<ApplicationResourceInner> updateWithResponse(String resourceGroupName, String clusterName, + private Response<BinaryData> updateWithResponse(String resourceGroupName, String clusterName, String applicationName, ApplicationUpdateParameters parameters, Context context) { final String contentType = "application/json"; final String accept = "application/json"; @@ -584,7 +650,91 @@ public Response<ApplicationResourceInner> updateWithResponse(String resourceGrou } /** - * Updates the tags of an application resource of a given managed cluster. + * Updates an application resource of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The application resource updated tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the application resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ApplicationResourceInner>, ApplicationResourceInner> beginUpdateAsync( + String resourceGroupName, String clusterName, String applicationName, ApplicationUpdateParameters parameters) { + Mono<Response<Flux<ByteBuffer>>> mono + = updateWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters); + return this.client.<ApplicationResourceInner, ApplicationResourceInner>getLroResult(mono, + this.client.getHttpPipeline(), ApplicationResourceInner.class, ApplicationResourceInner.class, + this.client.getContext()); + } + + /** + * Updates an application resource of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The application resource updated tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the application resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ApplicationResourceInner>, ApplicationResourceInner> beginUpdate( + String resourceGroupName, String clusterName, String applicationName, ApplicationUpdateParameters parameters) { + Response<BinaryData> response = updateWithResponse(resourceGroupName, clusterName, applicationName, parameters); + return this.client.<ApplicationResourceInner, ApplicationResourceInner>getLroResult(response, + ApplicationResourceInner.class, ApplicationResourceInner.class, Context.NONE); + } + + /** + * Updates an application resource of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The application resource updated tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the application resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ApplicationResourceInner>, ApplicationResourceInner> beginUpdate( + String resourceGroupName, String clusterName, String applicationName, ApplicationUpdateParameters parameters, + Context context) { + Response<BinaryData> response + = updateWithResponse(resourceGroupName, clusterName, applicationName, parameters, context); + return this.client.<ApplicationResourceInner, ApplicationResourceInner>getLroResult(response, + ApplicationResourceInner.class, ApplicationResourceInner.class, context); + } + + /** + * Updates an application resource of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The application resource updated tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the application resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ApplicationResourceInner> updateAsync(String resourceGroupName, String clusterName, + String applicationName, ApplicationUpdateParameters parameters) { + return beginUpdateAsync(resourceGroupName, clusterName, applicationName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an application resource of a given managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -598,7 +748,26 @@ public Response<ApplicationResourceInner> updateWithResponse(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) public ApplicationResourceInner update(String resourceGroupName, String clusterName, String applicationName, ApplicationUpdateParameters parameters) { - return updateWithResponse(resourceGroupName, clusterName, applicationName, parameters, Context.NONE).getValue(); + return beginUpdate(resourceGroupName, clusterName, applicationName, parameters).getFinalResult(); + } + + /** + * Updates an application resource of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The application resource updated tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the application resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApplicationResourceInner update(String resourceGroupName, String clusterName, String applicationName, + ApplicationUpdateParameters parameters, Context context) { + return beginUpdate(resourceGroupName, clusterName, applicationName, parameters, context).getFinalResult(); } /** @@ -1422,6 +1591,572 @@ public void startRollback(String resourceGroupName, String clusterName, String a beginStartRollback(resourceGroupName, clusterName, applicationName, context).getFinalResult(); } + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<Response<Flux<ByteBuffer>>> updateUpgradeWithResponseAsync(String resourceGroupName, + String clusterName, String applicationName, RuntimeUpdateApplicationUpgradeParameters parameters) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.updateUpgrade(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, + parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateUpgradeWithResponse(String resourceGroupName, String clusterName, + String applicationName, RuntimeUpdateApplicationUpgradeParameters parameters) { + final String contentType = "application/json"; + return service.updateUpgradeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, parameters, + Context.NONE); + } + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateUpgradeWithResponse(String resourceGroupName, String clusterName, + String applicationName, RuntimeUpdateApplicationUpgradeParameters parameters, Context context) { + final String contentType = "application/json"; + return service.updateUpgradeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, parameters, + context); + } + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<PollResult<Void>, Void> beginUpdateUpgradeAsync(String resourceGroupName, String clusterName, + String applicationName, RuntimeUpdateApplicationUpgradeParameters parameters) { + Mono<Response<Flux<ByteBuffer>>> mono + = updateUpgradeWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginUpdateUpgrade(String resourceGroupName, String clusterName, + String applicationName, RuntimeUpdateApplicationUpgradeParameters parameters) { + Response<BinaryData> response + = updateUpgradeWithResponse(resourceGroupName, clusterName, applicationName, parameters); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginUpdateUpgrade(String resourceGroupName, String clusterName, + String applicationName, RuntimeUpdateApplicationUpgradeParameters parameters, Context context) { + Response<BinaryData> response + = updateUpgradeWithResponse(resourceGroupName, clusterName, applicationName, parameters, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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<Void> updateUpgradeAsync(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters) { + return beginUpdateUpgradeAsync(resourceGroupName, clusterName, applicationName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 updateUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters) { + beginUpdateUpgrade(resourceGroupName, clusterName, applicationName, parameters).getFinalResult(); + } + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 updateUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters, Context context) { + beginUpdateUpgrade(resourceGroupName, clusterName, applicationName, parameters, context).getFinalResult(); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of the deployed application health along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> fetchHealthWithResponseAsync(String resourceGroupName, String clusterName, + String applicationName, ApplicationFetchHealthRequest parameters) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.fetchHealth(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, + parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of the deployed application health along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> fetchHealthWithResponse(String resourceGroupName, String clusterName, + String applicationName, ApplicationFetchHealthRequest parameters) { + final String contentType = "application/json"; + return service.fetchHealthSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, parameters, + Context.NONE); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of the deployed application health along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> fetchHealthWithResponse(String resourceGroupName, String clusterName, + String applicationName, ApplicationFetchHealthRequest parameters, Context context) { + final String contentType = "application/json"; + return service.fetchHealthSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, parameters, + context); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the status of the deployed application health. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<Void>, Void> beginFetchHealthAsync(String resourceGroupName, String clusterName, + String applicationName, ApplicationFetchHealthRequest parameters) { + Mono<Response<Flux<ByteBuffer>>> mono + = fetchHealthWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the status of the deployed application health. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginFetchHealth(String resourceGroupName, String clusterName, + String applicationName, ApplicationFetchHealthRequest parameters) { + Response<BinaryData> response + = fetchHealthWithResponse(resourceGroupName, clusterName, applicationName, parameters); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the status of the deployed application health. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginFetchHealth(String resourceGroupName, String clusterName, + String applicationName, ApplicationFetchHealthRequest parameters, Context context) { + Response<BinaryData> response + = fetchHealthWithResponse(resourceGroupName, clusterName, applicationName, parameters, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of the deployed application health on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Void> fetchHealthAsync(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters) { + return beginFetchHealthAsync(resourceGroupName, clusterName, applicationName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 fetchHealth(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters) { + beginFetchHealth(resourceGroupName, clusterName, applicationName, parameters).getFinalResult(); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 fetchHealth(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters, Context context) { + beginFetchHealth(resourceGroupName, clusterName, applicationName, parameters, context).getFinalResult(); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> restartDeployedCodePackageWithResponseAsync(String resourceGroupName, + String clusterName, String applicationName, RestartDeployedCodePackageRequest parameters) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.restartDeployedCodePackage(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + applicationName, contentType, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> restartDeployedCodePackageWithResponse(String resourceGroupName, String clusterName, + String applicationName, RestartDeployedCodePackageRequest parameters) { + final String contentType = "application/json"; + return service.restartDeployedCodePackageSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, parameters, + Context.NONE); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> restartDeployedCodePackageWithResponse(String resourceGroupName, String clusterName, + String applicationName, RestartDeployedCodePackageRequest parameters, Context context) { + final String contentType = "application/json"; + return service.restartDeployedCodePackageSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, parameters, + context); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<Void>, Void> beginRestartDeployedCodePackageAsync(String resourceGroupName, + String clusterName, String applicationName, RestartDeployedCodePackageRequest parameters) { + Mono<Response<Flux<ByteBuffer>>> mono + = restartDeployedCodePackageWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginRestartDeployedCodePackage(String resourceGroupName, + String clusterName, String applicationName, RestartDeployedCodePackageRequest parameters) { + Response<BinaryData> response + = restartDeployedCodePackageWithResponse(resourceGroupName, clusterName, applicationName, parameters); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginRestartDeployedCodePackage(String resourceGroupName, + String clusterName, String applicationName, RestartDeployedCodePackageRequest parameters, Context context) { + Response<BinaryData> response = restartDeployedCodePackageWithResponse(resourceGroupName, clusterName, + applicationName, parameters, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Void> restartDeployedCodePackageAsync(String resourceGroupName, String clusterName, + String applicationName, RestartDeployedCodePackageRequest parameters) { + return beginRestartDeployedCodePackageAsync(resourceGroupName, clusterName, applicationName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restartDeployedCodePackage(String resourceGroupName, String clusterName, String applicationName, + RestartDeployedCodePackageRequest parameters) { + beginRestartDeployedCodePackage(resourceGroupName, clusterName, applicationName, parameters).getFinalResult(); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restartDeployedCodePackage(String resourceGroupName, String clusterName, String applicationName, + RestartDeployedCodePackageRequest parameters, Context context) { + beginRestartDeployedCodePackage(resourceGroupName, clusterName, applicationName, parameters, context) + .getFinalResult(); + } + /** * Get the next page of items. * diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsImpl.java index 0754e8b6959d..9f29662a261e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsImpl.java @@ -11,9 +11,12 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationResource; import com.azure.resourcemanager.servicefabricmanagedclusters.models.Applications; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartDeployedCodePackageRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters; public final class ApplicationsImpl implements Applications { private static final ClientLogger LOGGER = new ClientLogger(ApplicationsImpl.class); @@ -94,6 +97,37 @@ public void startRollback(String resourceGroupName, String clusterName, String a this.serviceClient().startRollback(resourceGroupName, clusterName, applicationName, context); } + public void updateUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters) { + this.serviceClient().updateUpgrade(resourceGroupName, clusterName, applicationName, parameters); + } + + public void updateUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters, Context context) { + this.serviceClient().updateUpgrade(resourceGroupName, clusterName, applicationName, parameters, context); + } + + public void fetchHealth(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters) { + this.serviceClient().fetchHealth(resourceGroupName, clusterName, applicationName, parameters); + } + + public void fetchHealth(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters, Context context) { + this.serviceClient().fetchHealth(resourceGroupName, clusterName, applicationName, parameters, context); + } + + public void restartDeployedCodePackage(String resourceGroupName, String clusterName, String applicationName, + RestartDeployedCodePackageRequest parameters) { + this.serviceClient().restartDeployedCodePackage(resourceGroupName, clusterName, applicationName, parameters); + } + + public void restartDeployedCodePackage(String resourceGroupName, String clusterName, String applicationName, + RestartDeployedCodePackageRequest parameters, Context context) { + this.serviceClient() + .restartDeployedCodePackage(resourceGroupName, clusterName, applicationName, parameters, context); + } + public ApplicationResource getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java index 64ef33d05d29..6643c6a27b2d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java @@ -356,16 +356,14 @@ public ManagedClusterImpl update() { public ManagedCluster apply() { this.innerObject = serviceManager.serviceClient() .getManagedClusters() - .updateWithResponse(resourceGroupName, clusterName, updateParameters, Context.NONE) - .getValue(); + .update(resourceGroupName, clusterName, updateParameters, Context.NONE); return this; } public ManagedCluster apply(Context context) { this.innerObject = serviceManager.serviceClient() .getManagedClusters() - .updateWithResponse(resourceGroupName, clusterName, updateParameters, context) - .getValue(); + .update(resourceGroupName, clusterName, updateParameters, context); return this; } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java index 58acf59180cd..09e59ea0c8ba 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java @@ -115,18 +115,18 @@ Response<BinaryData> createOrUpdateSync(@HostParam("endpoint") String endpoint, @BodyParam("application/json") ManagedClusterInner parameters, Context context); @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<ManagedClusterInner>> update(@HostParam("endpoint") String endpoint, + Mono<Response<Flux<ByteBuffer>>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") ManagedClusterUpdateParameters parameters, Context context); @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response<ManagedClusterInner> updateSync(@HostParam("endpoint") String endpoint, + Response<BinaryData> updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @@ -576,7 +576,7 @@ public ManagedClusterInner createOrUpdate(String resourceGroupName, String clust * @return the managed cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<ManagedClusterInner>> updateWithResponseAsync(String resourceGroupName, String clusterName, + private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, String clusterName, ManagedClusterUpdateParameters parameters) { final String contentType = "application/json"; final String accept = "application/json"; @@ -594,13 +594,16 @@ private Mono<Response<ManagedClusterInner>> updateWithResponseAsync(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the managed cluster resource on successful completion of {@link Mono}. + * @return the managed cluster resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<ManagedClusterInner> updateAsync(String resourceGroupName, String clusterName, + private Response<BinaryData> updateWithResponse(String resourceGroupName, String clusterName, ManagedClusterUpdateParameters parameters) { - return updateWithResponseAsync(resourceGroupName, clusterName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, parameters, + Context.NONE); } /** @@ -616,7 +619,7 @@ private Mono<ManagedClusterInner> updateAsync(String resourceGroupName, String c * @return the managed cluster resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response<ManagedClusterInner> updateWithResponse(String resourceGroupName, String clusterName, + private Response<BinaryData> updateWithResponse(String resourceGroupName, String clusterName, ManagedClusterUpdateParameters parameters, Context context) { final String contentType = "application/json"; final String accept = "application/json"; @@ -624,6 +627,82 @@ public Response<ManagedClusterInner> updateWithResponse(String resourceGroupName this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, parameters, context); } + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ManagedClusterInner>, ManagedClusterInner> beginUpdateAsync(String resourceGroupName, + String clusterName, ManagedClusterUpdateParameters parameters) { + Mono<Response<Flux<ByteBuffer>>> mono = updateWithResponseAsync(resourceGroupName, clusterName, parameters); + return this.client.<ManagedClusterInner, ManagedClusterInner>getLroResult(mono, this.client.getHttpPipeline(), + ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); + } + + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ManagedClusterInner>, ManagedClusterInner> beginUpdate(String resourceGroupName, + String clusterName, ManagedClusterUpdateParameters parameters) { + Response<BinaryData> response = updateWithResponse(resourceGroupName, clusterName, parameters); + return this.client.<ManagedClusterInner, ManagedClusterInner>getLroResult(response, ManagedClusterInner.class, + ManagedClusterInner.class, Context.NONE); + } + + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ManagedClusterInner>, ManagedClusterInner> beginUpdate(String resourceGroupName, + String clusterName, ManagedClusterUpdateParameters parameters, Context context) { + Response<BinaryData> response = updateWithResponse(resourceGroupName, clusterName, parameters, context); + return this.client.<ManagedClusterInner, ManagedClusterInner>getLroResult(response, ManagedClusterInner.class, + ManagedClusterInner.class, context); + } + + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the managed cluster resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ManagedClusterInner> updateAsync(String resourceGroupName, String clusterName, + ManagedClusterUpdateParameters parameters) { + return beginUpdateAsync(resourceGroupName, clusterName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + /** * Update the tags of of a Service Fabric managed cluster resource with the specified name. * @@ -638,7 +717,25 @@ public Response<ManagedClusterInner> updateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) public ManagedClusterInner update(String resourceGroupName, String clusterName, ManagedClusterUpdateParameters parameters) { - return updateWithResponse(resourceGroupName, clusterName, parameters, Context.NONE).getValue(); + return beginUpdate(resourceGroupName, clusterName, parameters).getFinalResult(); + } + + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner update(String resourceGroupName, String clusterName, + ManagedClusterUpdateParameters parameters, Context context) { + return beginUpdate(resourceGroupName, clusterName, parameters, context).getFinalResult(); } /** diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java index 569461b5ba16..4ad520fb18a7 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java @@ -676,7 +676,7 @@ public NodeTypeInner createOrUpdate(String resourceGroupName, String clusterName } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -701,7 +701,7 @@ private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resource } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -724,7 +724,7 @@ private Response<BinaryData> updateWithResponse(String resourceGroupName, String } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -748,7 +748,7 @@ private Response<BinaryData> updateWithResponse(String resourceGroupName, String } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -770,7 +770,7 @@ private PollerFlux<PollResult<NodeTypeInner>, NodeTypeInner> beginUpdateAsync(St } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -791,7 +791,7 @@ public SyncPoller<PollResult<NodeTypeInner>, NodeTypeInner> beginUpdate(String r } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -814,7 +814,7 @@ public SyncPoller<PollResult<NodeTypeInner>, NodeTypeInner> beginUpdate(String r } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -834,7 +834,7 @@ private Mono<NodeTypeInner> updateAsync(String resourceGroupName, String cluster } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -852,7 +852,7 @@ public NodeTypeInner update(String resourceGroupName, String clusterName, String } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientImpl.java index 0a9a84413d99..414fe9078395 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientImpl.java @@ -337,7 +337,7 @@ public NodeTypeSkusClient getNodeTypeSkus() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2025-06-01-preview"; + this.apiVersion = "2025-10-01-preview"; this.operations = new OperationsClientImpl(this); this.applications = new ApplicationsClientImpl(this); this.applicationTypes = new ApplicationTypesClientImpl(this); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceResourceImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceResourceImpl.java index ba396666eb02..757868522a3d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceResourceImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceResourceImpl.java @@ -8,6 +8,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ServiceResourceInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResource; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResourceProperties; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceUpdateParameters; @@ -160,6 +161,16 @@ public ServiceResource refresh(Context context) { return this; } + public void restartReplica(RestartReplicaRequest parameters) { + serviceManager.services() + .restartReplica(resourceGroupName, clusterName, applicationName, serviceName, parameters); + } + + public void restartReplica(RestartReplicaRequest parameters, Context context) { + serviceManager.services() + .restartReplica(resourceGroupName, clusterName, applicationName, serviceName, parameters, context); + } + public ServiceResourceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesClientImpl.java index 2a6a31084ee7..b9d79cd49ac1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesClientImpl.java @@ -14,6 +14,7 @@ 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; @@ -36,6 +37,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ServiceResourceInner; import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ServiceResourceList; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -172,6 +174,28 @@ Response<ServiceResourceList> listByApplicationsSync(@HostParam("endpoint") Stri @PathParam("applicationName") String applicationName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}/restartReplica") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> restartReplica(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("applicationName") String applicationName, @PathParam("serviceName") String serviceName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RestartReplicaRequest parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}/restartReplica") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> restartReplicaSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("applicationName") String applicationName, @PathParam("serviceName") String serviceName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RestartReplicaRequest parameters, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -882,6 +906,198 @@ public PagedIterable<ServiceResourceInner> listByApplications(String resourceGro nextLink -> listByApplicationsNextSinglePage(nextLink, context)); } + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<Response<Flux<ByteBuffer>>> restartReplicaWithResponseAsync(String resourceGroupName, + String clusterName, String applicationName, String serviceName, RestartReplicaRequest parameters) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.restartReplica(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, serviceName, + contentType, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> restartReplicaWithResponse(String resourceGroupName, String clusterName, + String applicationName, String serviceName, RestartReplicaRequest parameters) { + final String contentType = "application/json"; + return service.restartReplicaSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, serviceName, contentType, + parameters, Context.NONE); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> restartReplicaWithResponse(String resourceGroupName, String clusterName, + String applicationName, String serviceName, RestartReplicaRequest parameters, Context context) { + final String contentType = "application/json"; + return service.restartReplicaSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, serviceName, contentType, + parameters, context); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<PollResult<Void>, Void> beginRestartReplicaAsync(String resourceGroupName, String clusterName, + String applicationName, String serviceName, RestartReplicaRequest parameters) { + Mono<Response<Flux<ByteBuffer>>> mono + = restartReplicaWithResponseAsync(resourceGroupName, clusterName, applicationName, serviceName, parameters); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginRestartReplica(String resourceGroupName, String clusterName, + String applicationName, String serviceName, RestartReplicaRequest parameters) { + Response<BinaryData> response + = restartReplicaWithResponse(resourceGroupName, clusterName, applicationName, serviceName, parameters); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginRestartReplica(String resourceGroupName, String clusterName, + String applicationName, String serviceName, RestartReplicaRequest parameters, Context context) { + Response<BinaryData> response = restartReplicaWithResponse(resourceGroupName, clusterName, applicationName, + serviceName, parameters, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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<Void> restartReplicaAsync(String resourceGroupName, String clusterName, String applicationName, + String serviceName, RestartReplicaRequest parameters) { + return beginRestartReplicaAsync(resourceGroupName, clusterName, applicationName, serviceName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 restartReplica(String resourceGroupName, String clusterName, String applicationName, String serviceName, + RestartReplicaRequest parameters) { + beginRestartReplica(resourceGroupName, clusterName, applicationName, serviceName, parameters).getFinalResult(); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 restartReplica(String resourceGroupName, String clusterName, String applicationName, String serviceName, + RestartReplicaRequest parameters, Context context) { + beginRestartReplica(resourceGroupName, clusterName, applicationName, serviceName, parameters, context) + .getFinalResult(); + } + /** * Get the next page of items. * diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesImpl.java index 40c3afe21a72..93fd30986ec3 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesImpl.java @@ -11,6 +11,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ServiceResourceInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResource; import com.azure.resourcemanager.servicefabricmanagedclusters.models.Services; @@ -73,6 +74,17 @@ public PagedIterable<ServiceResource> listByApplications(String resourceGroupNam return ResourceManagerUtils.mapPage(inner, inner1 -> new ServiceResourceImpl(inner1, this.manager())); } + public void restartReplica(String resourceGroupName, String clusterName, String applicationName, String serviceName, + RestartReplicaRequest parameters) { + this.serviceClient().restartReplica(resourceGroupName, clusterName, applicationName, serviceName, parameters); + } + + public void restartReplica(String resourceGroupName, String clusterName, String applicationName, String serviceName, + RestartReplicaRequest parameters, Context context) { + this.serviceClient() + .restartReplica(resourceGroupName, clusterName, applicationName, serviceName, parameters, context); + } + public ServiceResource getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationFetchHealthRequest.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationFetchHealthRequest.java new file mode 100644 index 000000000000..82d6d228b5cc --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationFetchHealthRequest.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Parameters for fetching the health of an application. + */ +@Fluent +public final class ApplicationFetchHealthRequest implements JsonSerializable<ApplicationFetchHealthRequest> { + /* + * Allows filtering of the health events returned in the response based on health state. + */ + private HealthFilter eventsHealthStateFilter; + + /* + * Allows filtering of the deployed applications health state objects returned in the result of application health + * query based on their health state. + */ + private HealthFilter deployedApplicationsHealthStateFilter; + + /* + * Allows filtering of the services health state objects returned in the result of services health query based on + * their health state. + */ + private HealthFilter servicesHealthStateFilter; + + /* + * Indicates whether the health statistics should be returned as part of the query result. False by default. The + * statistics show the number of children entities in health state Ok, Warning, and Error. + */ + private Boolean excludeHealthStatistics; + + /* + * Request timeout for the health query in seconds. The default value is 60 seconds. + */ + private Long timeout; + + /** + * Creates an instance of ApplicationFetchHealthRequest class. + */ + public ApplicationFetchHealthRequest() { + } + + /** + * Get the eventsHealthStateFilter property: Allows filtering of the health events returned in the response based on + * health state. + * + * @return the eventsHealthStateFilter value. + */ + public HealthFilter eventsHealthStateFilter() { + return this.eventsHealthStateFilter; + } + + /** + * Set the eventsHealthStateFilter property: Allows filtering of the health events returned in the response based on + * health state. + * + * @param eventsHealthStateFilter the eventsHealthStateFilter value to set. + * @return the ApplicationFetchHealthRequest object itself. + */ + public ApplicationFetchHealthRequest withEventsHealthStateFilter(HealthFilter eventsHealthStateFilter) { + this.eventsHealthStateFilter = eventsHealthStateFilter; + return this; + } + + /** + * Get the deployedApplicationsHealthStateFilter property: Allows filtering of the deployed applications health + * state objects returned in the result of application health query based on their health state. + * + * @return the deployedApplicationsHealthStateFilter value. + */ + public HealthFilter deployedApplicationsHealthStateFilter() { + return this.deployedApplicationsHealthStateFilter; + } + + /** + * Set the deployedApplicationsHealthStateFilter property: Allows filtering of the deployed applications health + * state objects returned in the result of application health query based on their health state. + * + * @param deployedApplicationsHealthStateFilter the deployedApplicationsHealthStateFilter value to set. + * @return the ApplicationFetchHealthRequest object itself. + */ + public ApplicationFetchHealthRequest + withDeployedApplicationsHealthStateFilter(HealthFilter deployedApplicationsHealthStateFilter) { + this.deployedApplicationsHealthStateFilter = deployedApplicationsHealthStateFilter; + return this; + } + + /** + * Get the servicesHealthStateFilter property: Allows filtering of the services health state objects returned in the + * result of services health query based on their health state. + * + * @return the servicesHealthStateFilter value. + */ + public HealthFilter servicesHealthStateFilter() { + return this.servicesHealthStateFilter; + } + + /** + * Set the servicesHealthStateFilter property: Allows filtering of the services health state objects returned in the + * result of services health query based on their health state. + * + * @param servicesHealthStateFilter the servicesHealthStateFilter value to set. + * @return the ApplicationFetchHealthRequest object itself. + */ + public ApplicationFetchHealthRequest withServicesHealthStateFilter(HealthFilter servicesHealthStateFilter) { + this.servicesHealthStateFilter = servicesHealthStateFilter; + return this; + } + + /** + * Get the excludeHealthStatistics property: Indicates whether the health statistics should be returned as part of + * the query result. False by default. The statistics show the number of children entities in health state Ok, + * Warning, and Error. + * + * @return the excludeHealthStatistics value. + */ + public Boolean excludeHealthStatistics() { + return this.excludeHealthStatistics; + } + + /** + * Set the excludeHealthStatistics property: Indicates whether the health statistics should be returned as part of + * the query result. False by default. The statistics show the number of children entities in health state Ok, + * Warning, and Error. + * + * @param excludeHealthStatistics the excludeHealthStatistics value to set. + * @return the ApplicationFetchHealthRequest object itself. + */ + public ApplicationFetchHealthRequest withExcludeHealthStatistics(Boolean excludeHealthStatistics) { + this.excludeHealthStatistics = excludeHealthStatistics; + return this; + } + + /** + * Get the timeout property: Request timeout for the health query in seconds. The default value is 60 seconds. + * + * @return the timeout value. + */ + public Long timeout() { + return this.timeout; + } + + /** + * Set the timeout property: Request timeout for the health query in seconds. The default value is 60 seconds. + * + * @param timeout the timeout value to set. + * @return the ApplicationFetchHealthRequest object itself. + */ + public ApplicationFetchHealthRequest withTimeout(Long timeout) { + this.timeout = timeout; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("eventsHealthStateFilter", + this.eventsHealthStateFilter == null ? null : this.eventsHealthStateFilter.toString()); + jsonWriter.writeStringField("deployedApplicationsHealthStateFilter", + this.deployedApplicationsHealthStateFilter == null + ? null + : this.deployedApplicationsHealthStateFilter.toString()); + jsonWriter.writeStringField("servicesHealthStateFilter", + this.servicesHealthStateFilter == null ? null : this.servicesHealthStateFilter.toString()); + jsonWriter.writeBooleanField("excludeHealthStatistics", this.excludeHealthStatistics); + jsonWriter.writeNumberField("timeout", this.timeout); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ApplicationFetchHealthRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ApplicationFetchHealthRequest if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ApplicationFetchHealthRequest. + */ + public static ApplicationFetchHealthRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ApplicationFetchHealthRequest deserializedApplicationFetchHealthRequest + = new ApplicationFetchHealthRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("eventsHealthStateFilter".equals(fieldName)) { + deserializedApplicationFetchHealthRequest.eventsHealthStateFilter + = HealthFilter.fromString(reader.getString()); + } else if ("deployedApplicationsHealthStateFilter".equals(fieldName)) { + deserializedApplicationFetchHealthRequest.deployedApplicationsHealthStateFilter + = HealthFilter.fromString(reader.getString()); + } else if ("servicesHealthStateFilter".equals(fieldName)) { + deserializedApplicationFetchHealthRequest.servicesHealthStateFilter + = HealthFilter.fromString(reader.getString()); + } else if ("excludeHealthStatistics".equals(fieldName)) { + deserializedApplicationFetchHealthRequest.excludeHealthStatistics + = reader.getNullable(JsonReader::getBoolean); + } else if ("timeout".equals(fieldName)) { + deserializedApplicationFetchHealthRequest.timeout = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedApplicationFetchHealthRequest; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResource.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResource.java index 24de821e8ec1..dc075d8bd72f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResource.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResource.java @@ -303,7 +303,7 @@ interface WithUpgradePolicy { /** * The template for ApplicationResource update. */ - interface Update extends UpdateStages.WithTags { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * @@ -336,6 +336,19 @@ interface WithTags { */ Update withTags(Map<String, String> tags); } + + /** + * The stage of the ApplicationResource update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Application update parameters properties.. + * + * @param properties Application update parameters properties. + * @return the next definition stage. + */ + Update withProperties(ApplicationUpdateParametersProperties properties); + } } /** @@ -415,4 +428,71 @@ interface WithTags { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void startRollback(Context context); + + /** + * Send a request to update the current application upgrade. + * + * @param parameters The parameters for updating an application upgrade. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void updateUpgrade(RuntimeUpdateApplicationUpgradeParameters parameters); + + /** + * Send a request to update the current application upgrade. + * + * @param parameters The parameters for updating an application upgrade. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void updateUpgrade(RuntimeUpdateApplicationUpgradeParameters parameters, Context context); + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param parameters The parameters for fetching the health of a deployed application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void fetchHealth(ApplicationFetchHealthRequest parameters); + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param parameters The parameters for fetching the health of a deployed application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void fetchHealth(ApplicationFetchHealthRequest parameters, Context context); + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param parameters The parameters for restarting a deployed code package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restartDeployedCodePackage(RestartDeployedCodePackageRequest parameters); + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param parameters The parameters for restarting a deployed code package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restartDeployedCodePackage(RestartDeployedCodePackageRequest parameters, Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParameters.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParameters.java index 19f7e04d836f..0cacd002bf76 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParameters.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParameters.java @@ -22,6 +22,11 @@ public final class ApplicationUpdateParameters implements JsonSerializable<Appli */ private Map<String, String> tags; + /* + * Application update parameters properties. + */ + private ApplicationUpdateParametersProperties properties; + /** * Creates an instance of ApplicationUpdateParameters class. */ @@ -48,6 +53,26 @@ public ApplicationUpdateParameters withTags(Map<String, String> tags) { return this; } + /** + * Get the properties property: Application update parameters properties. + * + * @return the properties value. + */ + public ApplicationUpdateParametersProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Application update parameters properties. + * + * @param properties the properties value to set. + * @return the ApplicationUpdateParameters object itself. + */ + public ApplicationUpdateParameters withProperties(ApplicationUpdateParametersProperties properties) { + this.properties = properties; + return this; + } + /** * {@inheritDoc} */ @@ -55,6 +80,7 @@ public ApplicationUpdateParameters withTags(Map<String, String> tags) { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -76,6 +102,9 @@ public static ApplicationUpdateParameters fromJson(JsonReader jsonReader) throws if ("tags".equals(fieldName)) { Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); deserializedApplicationUpdateParameters.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedApplicationUpdateParameters.properties + = ApplicationUpdateParametersProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParametersProperties.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParametersProperties.java new file mode 100644 index 000000000000..332ea296bf02 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParametersProperties.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Properties for application update request. + */ +@Fluent +public final class ApplicationUpdateParametersProperties + implements JsonSerializable<ApplicationUpdateParametersProperties> { + /* + * List of application parameters with overridden values from their default values specified in the application + * manifest. + */ + private Map<String, String> parameters; + + /** + * Creates an instance of ApplicationUpdateParametersProperties class. + */ + public ApplicationUpdateParametersProperties() { + } + + /** + * Get the parameters property: List of application parameters with overridden values from their default values + * specified in the application manifest. + * + * @return the parameters value. + */ + public Map<String, String> parameters() { + return this.parameters; + } + + /** + * Set the parameters property: List of application parameters with overridden values from their default values + * specified in the application manifest. + * + * @param parameters the parameters value to set. + * @return the ApplicationUpdateParametersProperties object itself. + */ + public ApplicationUpdateParametersProperties withParameters(Map<String, String> parameters) { + this.parameters = parameters; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("parameters", this.parameters, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ApplicationUpdateParametersProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ApplicationUpdateParametersProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ApplicationUpdateParametersProperties. + */ + public static ApplicationUpdateParametersProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ApplicationUpdateParametersProperties deserializedApplicationUpdateParametersProperties + = new ApplicationUpdateParametersProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("parameters".equals(fieldName)) { + Map<String, String> parameters = reader.readMap(reader1 -> reader1.getString()); + deserializedApplicationUpdateParametersProperties.parameters = parameters; + } else { + reader.skipChildren(); + } + } + + return deserializedApplicationUpdateParametersProperties; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Applications.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Applications.java index 158e1bcaa514..7871d7f36dd9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Applications.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Applications.java @@ -183,6 +183,97 @@ void resumeUpgrade(String resourceGroupName, String clusterName, String applicat */ void startRollback(String resourceGroupName, String clusterName, String applicationName, Context context); + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void updateUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters); + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void updateUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters, Context context); + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void fetchHealth(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters); + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void fetchHealth(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters, Context context); + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restartDeployedCodePackage(String resourceGroupName, String clusterName, String applicationName, + RestartDeployedCodePackageRequest parameters); + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restartDeployedCodePackage(String resourceGroupName, String clusterName, String applicationName, + RestartDeployedCodePackageRequest parameters, Context context); + /** * Get a Service Fabric managed application resource created or in the process of being created in the Service * Fabric cluster resource. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/HealthFilter.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/HealthFilter.java new file mode 100644 index 000000000000..698180e3a4eb --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/HealthFilter.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum for filtering health events. + */ +public final class HealthFilter extends ExpandableStringEnum<HealthFilter> { + /** + * Default value. Matches any health state. + */ + public static final HealthFilter DEFAULT = fromString("Default"); + + /** + * Filter that doesn't match any health state. Used to return no results on a given collection of health entities. + */ + public static final HealthFilter NONE = fromString("None"); + + /** + * Filter for health state Ok. + */ + public static final HealthFilter OK = fromString("Ok"); + + /** + * Filter for health state Warning. + */ + public static final HealthFilter WARNING = fromString("Warning"); + + /** + * Filter for health state Error. + */ + public static final HealthFilter ERROR = fromString("Error"); + + /** + * Filter that matches input with any health state. + */ + public static final HealthFilter ALL = fromString("All"); + + /** + * Creates a new instance of HealthFilter value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HealthFilter() { + } + + /** + * Creates or finds a HealthFilter from its string representation. + * + * @param name a name to look for. + * @return the corresponding HealthFilter. + */ + public static HealthFilter fromString(String name) { + return fromString(name, HealthFilter.class); + } + + /** + * Gets known HealthFilter values. + * + * @return known HealthFilter values. + */ + public static Collection<HealthFilter> values() { + return values(HealthFilter.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartDeployedCodePackageRequest.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartDeployedCodePackageRequest.java new file mode 100644 index 000000000000..fc298f4f0e49 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartDeployedCodePackageRequest.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Parameters for restarting a deployed code package. + */ +@Fluent +public final class RestartDeployedCodePackageRequest implements JsonSerializable<RestartDeployedCodePackageRequest> { + /* + * The name of the node where the code package needs to be restarted. Use '*' to restart on all nodes where the code + * package is running. + */ + private String nodeName; + + /* + * The name of the service manifest as specified in the code package. + */ + private String serviceManifestName; + + /* + * The name of the code package as specified in the service manifest. + */ + private String codePackageName; + + /* + * The instance ID for currently running entry point. For a code package setup entry point (if specified) runs first + * and after it finishes main entry point is started. Each time entry point executable is run, its instance ID will + * change. If 0 is passed in as the code package instance ID, the API will restart the code package with whatever + * instance ID it is currently running. If an instance ID other than 0 is passed in, the API will restart the code + * package only if the current Instance ID matches the passed in instance ID. Note, passing in the exact instance ID + * (not 0) in the API is safer, because if ensures at most one restart of the code package. + */ + private String codePackageInstanceId; + + /* + * The activation id of a deployed service package. If ServicePackageActivationMode specified at the time of + * creating the service is 'SharedProcess' (or if it is not specified, in which case it defaults to + * 'SharedProcess'), then value of ServicePackageActivationId is always an empty string. + */ + private String servicePackageActivationId; + + /** + * Creates an instance of RestartDeployedCodePackageRequest class. + */ + public RestartDeployedCodePackageRequest() { + } + + /** + * Get the nodeName property: The name of the node where the code package needs to be restarted. Use '*' to restart + * on all nodes where the code package is running. + * + * @return the nodeName value. + */ + public String nodeName() { + return this.nodeName; + } + + /** + * Set the nodeName property: The name of the node where the code package needs to be restarted. Use '*' to restart + * on all nodes where the code package is running. + * + * @param nodeName the nodeName value to set. + * @return the RestartDeployedCodePackageRequest object itself. + */ + public RestartDeployedCodePackageRequest withNodeName(String nodeName) { + this.nodeName = nodeName; + return this; + } + + /** + * Get the serviceManifestName property: The name of the service manifest as specified in the code package. + * + * @return the serviceManifestName value. + */ + public String serviceManifestName() { + return this.serviceManifestName; + } + + /** + * Set the serviceManifestName property: The name of the service manifest as specified in the code package. + * + * @param serviceManifestName the serviceManifestName value to set. + * @return the RestartDeployedCodePackageRequest object itself. + */ + public RestartDeployedCodePackageRequest withServiceManifestName(String serviceManifestName) { + this.serviceManifestName = serviceManifestName; + return this; + } + + /** + * Get the codePackageName property: The name of the code package as specified in the service manifest. + * + * @return the codePackageName value. + */ + public String codePackageName() { + return this.codePackageName; + } + + /** + * Set the codePackageName property: The name of the code package as specified in the service manifest. + * + * @param codePackageName the codePackageName value to set. + * @return the RestartDeployedCodePackageRequest object itself. + */ + public RestartDeployedCodePackageRequest withCodePackageName(String codePackageName) { + this.codePackageName = codePackageName; + return this; + } + + /** + * Get the codePackageInstanceId property: The instance ID for currently running entry point. For a code package + * setup entry point (if specified) runs first and after it finishes main entry point is started. Each time entry + * point executable is run, its instance ID will change. If 0 is passed in as the code package instance ID, the API + * will restart the code package with whatever instance ID it is currently running. If an instance ID other than 0 + * is passed in, the API will restart the code package only if the current Instance ID matches the passed in + * instance ID. Note, passing in the exact instance ID (not 0) in the API is safer, because if ensures at most one + * restart of the code package. + * + * @return the codePackageInstanceId value. + */ + public String codePackageInstanceId() { + return this.codePackageInstanceId; + } + + /** + * Set the codePackageInstanceId property: The instance ID for currently running entry point. For a code package + * setup entry point (if specified) runs first and after it finishes main entry point is started. Each time entry + * point executable is run, its instance ID will change. If 0 is passed in as the code package instance ID, the API + * will restart the code package with whatever instance ID it is currently running. If an instance ID other than 0 + * is passed in, the API will restart the code package only if the current Instance ID matches the passed in + * instance ID. Note, passing in the exact instance ID (not 0) in the API is safer, because if ensures at most one + * restart of the code package. + * + * @param codePackageInstanceId the codePackageInstanceId value to set. + * @return the RestartDeployedCodePackageRequest object itself. + */ + public RestartDeployedCodePackageRequest withCodePackageInstanceId(String codePackageInstanceId) { + this.codePackageInstanceId = codePackageInstanceId; + return this; + } + + /** + * Get the servicePackageActivationId property: The activation id of a deployed service package. If + * ServicePackageActivationMode specified at the time of creating the service is 'SharedProcess' (or if it is not + * specified, in which case it defaults to 'SharedProcess'), then value of ServicePackageActivationId is always an + * empty string. + * + * @return the servicePackageActivationId value. + */ + public String servicePackageActivationId() { + return this.servicePackageActivationId; + } + + /** + * Set the servicePackageActivationId property: The activation id of a deployed service package. If + * ServicePackageActivationMode specified at the time of creating the service is 'SharedProcess' (or if it is not + * specified, in which case it defaults to 'SharedProcess'), then value of ServicePackageActivationId is always an + * empty string. + * + * @param servicePackageActivationId the servicePackageActivationId value to set. + * @return the RestartDeployedCodePackageRequest object itself. + */ + public RestartDeployedCodePackageRequest withServicePackageActivationId(String servicePackageActivationId) { + this.servicePackageActivationId = servicePackageActivationId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nodeName", this.nodeName); + jsonWriter.writeStringField("serviceManifestName", this.serviceManifestName); + jsonWriter.writeStringField("codePackageName", this.codePackageName); + jsonWriter.writeStringField("codePackageInstanceId", this.codePackageInstanceId); + jsonWriter.writeStringField("servicePackageActivationId", this.servicePackageActivationId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RestartDeployedCodePackageRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RestartDeployedCodePackageRequest if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RestartDeployedCodePackageRequest. + */ + public static RestartDeployedCodePackageRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RestartDeployedCodePackageRequest deserializedRestartDeployedCodePackageRequest + = new RestartDeployedCodePackageRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nodeName".equals(fieldName)) { + deserializedRestartDeployedCodePackageRequest.nodeName = reader.getString(); + } else if ("serviceManifestName".equals(fieldName)) { + deserializedRestartDeployedCodePackageRequest.serviceManifestName = reader.getString(); + } else if ("codePackageName".equals(fieldName)) { + deserializedRestartDeployedCodePackageRequest.codePackageName = reader.getString(); + } else if ("codePackageInstanceId".equals(fieldName)) { + deserializedRestartDeployedCodePackageRequest.codePackageInstanceId = reader.getString(); + } else if ("servicePackageActivationId".equals(fieldName)) { + deserializedRestartDeployedCodePackageRequest.servicePackageActivationId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRestartDeployedCodePackageRequest; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartKind.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartKind.java new file mode 100644 index 000000000000..dd7bcd25b64d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartKind.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The kind of restart to perform. + */ +public final class RestartKind extends ExpandableStringEnum<RestartKind> { + /** + * Restart all listed replicas at the same time. + */ + public static final RestartKind SIMULTANEOUS = fromString("Simultaneous"); + + /** + * Creates a new instance of RestartKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RestartKind() { + } + + /** + * Creates or finds a RestartKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding RestartKind. + */ + public static RestartKind fromString(String name) { + return fromString(name, RestartKind.class); + } + + /** + * Gets known RestartKind values. + * + * @return known RestartKind values. + */ + public static Collection<RestartKind> values() { + return values(RestartKind.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartReplicaRequest.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartReplicaRequest.java new file mode 100644 index 000000000000..22fcc9c0a368 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartReplicaRequest.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Request to restart a replica. + */ +@Fluent +public final class RestartReplicaRequest implements JsonSerializable<RestartReplicaRequest> { + /* + * The ID of the partition. + */ + private String partitionId; + + /* + * The IDs of the replicas to be restarted. + */ + private List<Long> replicaIds; + + /* + * The kind of restart to perform. + */ + private RestartKind restartKind; + + /* + * If true, the restart operation will be forced. Use this option with care, as it may cause data loss. + */ + private Boolean forceRestart; + + /* + * The server timeout for performing the operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The default value for this parameter is 60 + * seconds. + */ + private Long timeout; + + /** + * Creates an instance of RestartReplicaRequest class. + */ + public RestartReplicaRequest() { + } + + /** + * Get the partitionId property: The ID of the partition. + * + * @return the partitionId value. + */ + public String partitionId() { + return this.partitionId; + } + + /** + * Set the partitionId property: The ID of the partition. + * + * @param partitionId the partitionId value to set. + * @return the RestartReplicaRequest object itself. + */ + public RestartReplicaRequest withPartitionId(String partitionId) { + this.partitionId = partitionId; + return this; + } + + /** + * Get the replicaIds property: The IDs of the replicas to be restarted. + * + * @return the replicaIds value. + */ + public List<Long> replicaIds() { + return this.replicaIds; + } + + /** + * Set the replicaIds property: The IDs of the replicas to be restarted. + * + * @param replicaIds the replicaIds value to set. + * @return the RestartReplicaRequest object itself. + */ + public RestartReplicaRequest withReplicaIds(List<Long> replicaIds) { + this.replicaIds = replicaIds; + return this; + } + + /** + * Get the restartKind property: The kind of restart to perform. + * + * @return the restartKind value. + */ + public RestartKind restartKind() { + return this.restartKind; + } + + /** + * Set the restartKind property: The kind of restart to perform. + * + * @param restartKind the restartKind value to set. + * @return the RestartReplicaRequest object itself. + */ + public RestartReplicaRequest withRestartKind(RestartKind restartKind) { + this.restartKind = restartKind; + return this; + } + + /** + * Get the forceRestart property: If true, the restart operation will be forced. Use this option with care, as it + * may cause data loss. + * + * @return the forceRestart value. + */ + public Boolean forceRestart() { + return this.forceRestart; + } + + /** + * Set the forceRestart property: If true, the restart operation will be forced. Use this option with care, as it + * may cause data loss. + * + * @param forceRestart the forceRestart value to set. + * @return the RestartReplicaRequest object itself. + */ + public RestartReplicaRequest withForceRestart(Boolean forceRestart) { + this.forceRestart = forceRestart; + return this; + } + + /** + * Get the timeout property: The server timeout for performing the operation in seconds. This timeout specifies the + * time duration that the client is willing to wait for the requested operation to complete. The default value for + * this parameter is 60 seconds. + * + * @return the timeout value. + */ + public Long timeout() { + return this.timeout; + } + + /** + * Set the timeout property: The server timeout for performing the operation in seconds. This timeout specifies the + * time duration that the client is willing to wait for the requested operation to complete. The default value for + * this parameter is 60 seconds. + * + * @param timeout the timeout value to set. + * @return the RestartReplicaRequest object itself. + */ + public RestartReplicaRequest withTimeout(Long timeout) { + this.timeout = timeout; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("partitionId", this.partitionId); + jsonWriter.writeArrayField("replicaIds", this.replicaIds, (writer, element) -> writer.writeLong(element)); + jsonWriter.writeStringField("restartKind", this.restartKind == null ? null : this.restartKind.toString()); + jsonWriter.writeBooleanField("forceRestart", this.forceRestart); + jsonWriter.writeNumberField("timeout", this.timeout); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RestartReplicaRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RestartReplicaRequest if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RestartReplicaRequest. + */ + public static RestartReplicaRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RestartReplicaRequest deserializedRestartReplicaRequest = new RestartReplicaRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("partitionId".equals(fieldName)) { + deserializedRestartReplicaRequest.partitionId = reader.getString(); + } else if ("replicaIds".equals(fieldName)) { + List<Long> replicaIds = reader.readArray(reader1 -> reader1.getLong()); + deserializedRestartReplicaRequest.replicaIds = replicaIds; + } else if ("restartKind".equals(fieldName)) { + deserializedRestartReplicaRequest.restartKind = RestartKind.fromString(reader.getString()); + } else if ("forceRestart".equals(fieldName)) { + deserializedRestartReplicaRequest.forceRestart = reader.getNullable(JsonReader::getBoolean); + } else if ("timeout".equals(fieldName)) { + deserializedRestartReplicaRequest.timeout = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedRestartReplicaRequest; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMode.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMode.java index 9476ffeebaa8..63276bbc698f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMode.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMode.java @@ -13,12 +13,11 @@ public final class RollingUpgradeMode extends ExpandableStringEnum<RollingUpgradeMode> { /** * The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. - * The value is 0. */ public static final RollingUpgradeMode MONITORED = fromString("Monitored"); /** - * The upgrade will proceed automatically without performing any health monitoring. The value is 1. + * The upgrade will proceed automatically without performing any health monitoring. */ public static final RollingUpgradeMode UNMONITORED_AUTO = fromString("UnmonitoredAuto"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeApplicationHealthPolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeApplicationHealthPolicy.java new file mode 100644 index 000000000000..27f755e2458a --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeApplicationHealthPolicy.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Cluster level definition for a health policy used to evaluate the health of an application or one of its children + * entities. + */ +@Fluent +public final class RuntimeApplicationHealthPolicy implements JsonSerializable<RuntimeApplicationHealthPolicy> { + /* + * Indicates whether warnings are treated with the same severity as errors. + */ + private boolean considerWarningAsError; + + /* + * The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to + * 100. + * The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before + * the application is considered in error. + * This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the + * application is currently deployed on in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. + */ + private int maxPercentUnhealthyDeployedApplications; + + /* + * The health policy used by default to evaluate the health of a service type. + */ + private RuntimeServiceTypeHealthPolicy defaultServiceTypeHealthPolicy; + + /* + * The map with service type health policy per service type name. The map is empty by default. + */ + private Map<String, RuntimeServiceTypeHealthPolicy> serviceTypeHealthPolicyMap; + + /** + * Creates an instance of RuntimeApplicationHealthPolicy class. + */ + public RuntimeApplicationHealthPolicy() { + } + + /** + * Get the considerWarningAsError property: Indicates whether warnings are treated with the same severity as errors. + * + * @return the considerWarningAsError value. + */ + public boolean considerWarningAsError() { + return this.considerWarningAsError; + } + + /** + * Set the considerWarningAsError property: Indicates whether warnings are treated with the same severity as errors. + * + * @param considerWarningAsError the considerWarningAsError value to set. + * @return the RuntimeApplicationHealthPolicy object itself. + */ + public RuntimeApplicationHealthPolicy withConsiderWarningAsError(boolean considerWarningAsError) { + this.considerWarningAsError = considerWarningAsError; + return this; + } + + /** + * Get the maxPercentUnhealthyDeployedApplications property: The maximum allowed percentage of unhealthy deployed + * applications. Allowed values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before + * the application is considered in error. + * This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the + * application is currently deployed on in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. + * + * @return the maxPercentUnhealthyDeployedApplications value. + */ + public int maxPercentUnhealthyDeployedApplications() { + return this.maxPercentUnhealthyDeployedApplications; + } + + /** + * Set the maxPercentUnhealthyDeployedApplications property: The maximum allowed percentage of unhealthy deployed + * applications. Allowed values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before + * the application is considered in error. + * This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the + * application is currently deployed on in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. + * + * @param maxPercentUnhealthyDeployedApplications the maxPercentUnhealthyDeployedApplications value to set. + * @return the RuntimeApplicationHealthPolicy object itself. + */ + public RuntimeApplicationHealthPolicy + withMaxPercentUnhealthyDeployedApplications(int maxPercentUnhealthyDeployedApplications) { + this.maxPercentUnhealthyDeployedApplications = maxPercentUnhealthyDeployedApplications; + return this; + } + + /** + * Get the defaultServiceTypeHealthPolicy property: The health policy used by default to evaluate the health of a + * service type. + * + * @return the defaultServiceTypeHealthPolicy value. + */ + public RuntimeServiceTypeHealthPolicy defaultServiceTypeHealthPolicy() { + return this.defaultServiceTypeHealthPolicy; + } + + /** + * Set the defaultServiceTypeHealthPolicy property: The health policy used by default to evaluate the health of a + * service type. + * + * @param defaultServiceTypeHealthPolicy the defaultServiceTypeHealthPolicy value to set. + * @return the RuntimeApplicationHealthPolicy object itself. + */ + public RuntimeApplicationHealthPolicy + withDefaultServiceTypeHealthPolicy(RuntimeServiceTypeHealthPolicy defaultServiceTypeHealthPolicy) { + this.defaultServiceTypeHealthPolicy = defaultServiceTypeHealthPolicy; + return this; + } + + /** + * Get the serviceTypeHealthPolicyMap property: The map with service type health policy per service type name. The + * map is empty by default. + * + * @return the serviceTypeHealthPolicyMap value. + */ + public Map<String, RuntimeServiceTypeHealthPolicy> serviceTypeHealthPolicyMap() { + return this.serviceTypeHealthPolicyMap; + } + + /** + * Set the serviceTypeHealthPolicyMap property: The map with service type health policy per service type name. The + * map is empty by default. + * + * @param serviceTypeHealthPolicyMap the serviceTypeHealthPolicyMap value to set. + * @return the RuntimeApplicationHealthPolicy object itself. + */ + public RuntimeApplicationHealthPolicy + withServiceTypeHealthPolicyMap(Map<String, RuntimeServiceTypeHealthPolicy> serviceTypeHealthPolicyMap) { + this.serviceTypeHealthPolicyMap = serviceTypeHealthPolicyMap; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("considerWarningAsError", this.considerWarningAsError); + jsonWriter.writeIntField("maxPercentUnhealthyDeployedApplications", + this.maxPercentUnhealthyDeployedApplications); + jsonWriter.writeJsonField("defaultServiceTypeHealthPolicy", this.defaultServiceTypeHealthPolicy); + jsonWriter.writeMapField("serviceTypeHealthPolicyMap", this.serviceTypeHealthPolicyMap, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RuntimeApplicationHealthPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RuntimeApplicationHealthPolicy if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RuntimeApplicationHealthPolicy. + */ + public static RuntimeApplicationHealthPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RuntimeApplicationHealthPolicy deserializedRuntimeApplicationHealthPolicy + = new RuntimeApplicationHealthPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("considerWarningAsError".equals(fieldName)) { + deserializedRuntimeApplicationHealthPolicy.considerWarningAsError = reader.getBoolean(); + } else if ("maxPercentUnhealthyDeployedApplications".equals(fieldName)) { + deserializedRuntimeApplicationHealthPolicy.maxPercentUnhealthyDeployedApplications + = reader.getInt(); + } else if ("defaultServiceTypeHealthPolicy".equals(fieldName)) { + deserializedRuntimeApplicationHealthPolicy.defaultServiceTypeHealthPolicy + = RuntimeServiceTypeHealthPolicy.fromJson(reader); + } else if ("serviceTypeHealthPolicyMap".equals(fieldName)) { + Map<String, RuntimeServiceTypeHealthPolicy> serviceTypeHealthPolicyMap + = reader.readMap(reader1 -> RuntimeServiceTypeHealthPolicy.fromJson(reader1)); + deserializedRuntimeApplicationHealthPolicy.serviceTypeHealthPolicyMap = serviceTypeHealthPolicyMap; + } else { + reader.skipChildren(); + } + } + + return deserializedRuntimeApplicationHealthPolicy; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeFailureAction.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeFailureAction.java new file mode 100644 index 000000000000..239d7eb137ee --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeFailureAction.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Cluster level definition for the compensating action to perform when a Monitored upgrade encounters monitoring policy + * or health policy violations. + */ +public final class RuntimeFailureAction extends ExpandableStringEnum<RuntimeFailureAction> { + /** + * Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade fails. + */ + public static final RuntimeFailureAction ROLLBACK = fromString("Rollback"); + + /** + * Indicates that a manual repair will need to be performed by the administrator if the upgrade fails. Service + * Fabric will not proceed to the next upgrade domain automatically. + */ + public static final RuntimeFailureAction MANUAL = fromString("Manual"); + + /** + * Creates a new instance of RuntimeFailureAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RuntimeFailureAction() { + } + + /** + * Creates or finds a RuntimeFailureAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding RuntimeFailureAction. + */ + public static RuntimeFailureAction fromString(String name) { + return fromString(name, RuntimeFailureAction.class); + } + + /** + * Gets known RuntimeFailureAction values. + * + * @return known RuntimeFailureAction values. + */ + public static Collection<RuntimeFailureAction> values() { + return values(RuntimeFailureAction.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeMode.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeMode.java new file mode 100644 index 000000000000..6fd45e186d6f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeMode.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Cluster level definition for the mode used to monitor health during a rolling upgrade. + */ +public final class RuntimeRollingUpgradeMode extends ExpandableStringEnum<RuntimeRollingUpgradeMode> { + /** + * The upgrade will proceed automatically without performing any health monitoring. + */ + public static final RuntimeRollingUpgradeMode UNMONITORED_AUTO = fromString("UnmonitoredAuto"); + + /** + * The upgrade will stop after completing each upgrade domain, giving the opportunity to manually monitor health + * before proceeding. + */ + public static final RuntimeRollingUpgradeMode UNMONITORED_MANUAL = fromString("UnmonitoredManual"); + + /** + * The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. + */ + public static final RuntimeRollingUpgradeMode MONITORED = fromString("Monitored"); + + /** + * Creates a new instance of RuntimeRollingUpgradeMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RuntimeRollingUpgradeMode() { + } + + /** + * Creates or finds a RuntimeRollingUpgradeMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding RuntimeRollingUpgradeMode. + */ + public static RuntimeRollingUpgradeMode fromString(String name) { + return fromString(name, RuntimeRollingUpgradeMode.class); + } + + /** + * Gets known RuntimeRollingUpgradeMode values. + * + * @return known RuntimeRollingUpgradeMode values. + */ + public static Collection<RuntimeRollingUpgradeMode> values() { + return values(RuntimeRollingUpgradeMode.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeUpdateMonitoringPolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeUpdateMonitoringPolicy.java new file mode 100644 index 000000000000..22e2716dd607 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeUpdateMonitoringPolicy.java @@ -0,0 +1,424 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes the parameters for updating a rolling upgrade of application or cluster. + */ +@Fluent +public final class RuntimeRollingUpgradeUpdateMonitoringPolicy + implements JsonSerializable<RuntimeRollingUpgradeUpdateMonitoringPolicy> { + /* + * The mode used to monitor health during a rolling upgrade. + */ + private RuntimeRollingUpgradeMode rollingUpgradeMode; + + /* + * If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the + * upgrade only changes configuration or data). + */ + private Boolean forceRestart; + + /* + * The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there + * are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + * availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 + * and 42949672925 inclusive. (unsigned 32-bit integer). + */ + private Long replicaSetCheckTimeoutInMilliseconds; + + /* + * The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy + * violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start + * rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode + */ + private RuntimeFailureAction failureAction; + + /* + * The amount of time to wait after completing an upgrade domain before applying health policies. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number + * representing the total number of milliseconds. + */ + private String healthCheckWaitDurationInMilliseconds; + + /* + * The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next + * upgrade domain. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + * interpreted as a number representing the total number of milliseconds. + */ + private String healthCheckStableDurationInMilliseconds; + + /* + * The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + * interpreted as a number representing the total number of milliseconds. + */ + private String healthCheckRetryTimeoutInMilliseconds; + + /* + * The amount of time the overall upgrade has to complete before FailureAction is executed. It is first interpreted + * as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + */ + private String upgradeTimeoutInMilliseconds; + + /* + * The amount of time each upgrade domain has to complete before FailureAction is executed. It is first interpreted + * as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + */ + private String upgradeDomainTimeoutInMilliseconds; + + /* + * Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain + * gracefully. This would be effective when the instance is closing during the application/cluster upgrade, only for + * those instances which have a non-zero delay duration configured in the service description. + */ + private Long instanceCloseDelayDurationInSeconds; + + /** + * Creates an instance of RuntimeRollingUpgradeUpdateMonitoringPolicy class. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy() { + } + + /** + * Get the rollingUpgradeMode property: The mode used to monitor health during a rolling upgrade. + * + * @return the rollingUpgradeMode value. + */ + public RuntimeRollingUpgradeMode rollingUpgradeMode() { + return this.rollingUpgradeMode; + } + + /** + * Set the rollingUpgradeMode property: The mode used to monitor health during a rolling upgrade. + * + * @param rollingUpgradeMode the rollingUpgradeMode value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy + withRollingUpgradeMode(RuntimeRollingUpgradeMode rollingUpgradeMode) { + this.rollingUpgradeMode = rollingUpgradeMode; + return this; + } + + /** + * Get the forceRestart property: If true, then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). + * + * @return the forceRestart value. + */ + public Boolean forceRestart() { + return this.forceRestart; + } + + /** + * Set the forceRestart property: If true, then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). + * + * @param forceRestart the forceRestart value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy withForceRestart(Boolean forceRestart) { + this.forceRestart = forceRestart; + return this; + } + + /** + * Get the replicaSetCheckTimeoutInMilliseconds property: The maximum amount of time to block processing of an + * upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, + * processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the + * start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + * + * @return the replicaSetCheckTimeoutInMilliseconds value. + */ + public Long replicaSetCheckTimeoutInMilliseconds() { + return this.replicaSetCheckTimeoutInMilliseconds; + } + + /** + * Set the replicaSetCheckTimeoutInMilliseconds property: The maximum amount of time to block processing of an + * upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, + * processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the + * start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + * + * @param replicaSetCheckTimeoutInMilliseconds the replicaSetCheckTimeoutInMilliseconds value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy + withReplicaSetCheckTimeoutInMilliseconds(Long replicaSetCheckTimeoutInMilliseconds) { + this.replicaSetCheckTimeoutInMilliseconds = replicaSetCheckTimeoutInMilliseconds; + return this; + } + + /** + * Get the failureAction property: The compensating action to perform when a Monitored upgrade encounters monitoring + * policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the + * upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual + * upgrade mode. + * + * @return the failureAction value. + */ + public RuntimeFailureAction failureAction() { + return this.failureAction; + } + + /** + * Set the failureAction property: The compensating action to perform when a Monitored upgrade encounters monitoring + * policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the + * upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual + * upgrade mode. + * + * @param failureAction the failureAction value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy withFailureAction(RuntimeFailureAction failureAction) { + this.failureAction = failureAction; + return this; + } + + /** + * Get the healthCheckWaitDurationInMilliseconds property: The amount of time to wait after completing an upgrade + * domain before applying health policies. It is first interpreted as a string representing an ISO 8601 duration. If + * that fails, then it is interpreted as a number representing the total number of milliseconds. + * + * @return the healthCheckWaitDurationInMilliseconds value. + */ + public String healthCheckWaitDurationInMilliseconds() { + return this.healthCheckWaitDurationInMilliseconds; + } + + /** + * Set the healthCheckWaitDurationInMilliseconds property: The amount of time to wait after completing an upgrade + * domain before applying health policies. It is first interpreted as a string representing an ISO 8601 duration. If + * that fails, then it is interpreted as a number representing the total number of milliseconds. + * + * @param healthCheckWaitDurationInMilliseconds the healthCheckWaitDurationInMilliseconds value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy + withHealthCheckWaitDurationInMilliseconds(String healthCheckWaitDurationInMilliseconds) { + this.healthCheckWaitDurationInMilliseconds = healthCheckWaitDurationInMilliseconds; + return this; + } + + /** + * Get the healthCheckStableDurationInMilliseconds property: The amount of time that the application or cluster must + * remain healthy before the upgrade proceeds to the next upgrade domain. It is first interpreted as a string + * representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + * number of milliseconds. + * + * @return the healthCheckStableDurationInMilliseconds value. + */ + public String healthCheckStableDurationInMilliseconds() { + return this.healthCheckStableDurationInMilliseconds; + } + + /** + * Set the healthCheckStableDurationInMilliseconds property: The amount of time that the application or cluster must + * remain healthy before the upgrade proceeds to the next upgrade domain. It is first interpreted as a string + * representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + * number of milliseconds. + * + * @param healthCheckStableDurationInMilliseconds the healthCheckStableDurationInMilliseconds value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy + withHealthCheckStableDurationInMilliseconds(String healthCheckStableDurationInMilliseconds) { + this.healthCheckStableDurationInMilliseconds = healthCheckStableDurationInMilliseconds; + return this; + } + + /** + * Get the healthCheckRetryTimeoutInMilliseconds property: The amount of time to retry health evaluation when the + * application or cluster is unhealthy before FailureAction is executed. It is first interpreted as a string + * representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + * number of milliseconds. + * + * @return the healthCheckRetryTimeoutInMilliseconds value. + */ + public String healthCheckRetryTimeoutInMilliseconds() { + return this.healthCheckRetryTimeoutInMilliseconds; + } + + /** + * Set the healthCheckRetryTimeoutInMilliseconds property: The amount of time to retry health evaluation when the + * application or cluster is unhealthy before FailureAction is executed. It is first interpreted as a string + * representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + * number of milliseconds. + * + * @param healthCheckRetryTimeoutInMilliseconds the healthCheckRetryTimeoutInMilliseconds value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy + withHealthCheckRetryTimeoutInMilliseconds(String healthCheckRetryTimeoutInMilliseconds) { + this.healthCheckRetryTimeoutInMilliseconds = healthCheckRetryTimeoutInMilliseconds; + return this; + } + + /** + * Get the upgradeTimeoutInMilliseconds property: The amount of time the overall upgrade has to complete before + * FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of milliseconds. + * + * @return the upgradeTimeoutInMilliseconds value. + */ + public String upgradeTimeoutInMilliseconds() { + return this.upgradeTimeoutInMilliseconds; + } + + /** + * Set the upgradeTimeoutInMilliseconds property: The amount of time the overall upgrade has to complete before + * FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of milliseconds. + * + * @param upgradeTimeoutInMilliseconds the upgradeTimeoutInMilliseconds value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy + withUpgradeTimeoutInMilliseconds(String upgradeTimeoutInMilliseconds) { + this.upgradeTimeoutInMilliseconds = upgradeTimeoutInMilliseconds; + return this; + } + + /** + * Get the upgradeDomainTimeoutInMilliseconds property: The amount of time each upgrade domain has to complete + * before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that + * fails, then it is interpreted as a number representing the total number of milliseconds. + * + * @return the upgradeDomainTimeoutInMilliseconds value. + */ + public String upgradeDomainTimeoutInMilliseconds() { + return this.upgradeDomainTimeoutInMilliseconds; + } + + /** + * Set the upgradeDomainTimeoutInMilliseconds property: The amount of time each upgrade domain has to complete + * before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that + * fails, then it is interpreted as a number representing the total number of milliseconds. + * + * @param upgradeDomainTimeoutInMilliseconds the upgradeDomainTimeoutInMilliseconds value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy + withUpgradeDomainTimeoutInMilliseconds(String upgradeDomainTimeoutInMilliseconds) { + this.upgradeDomainTimeoutInMilliseconds = upgradeDomainTimeoutInMilliseconds; + return this; + } + + /** + * Get the instanceCloseDelayDurationInSeconds property: Duration in seconds, to wait before a stateless instance is + * closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing + * during the application/cluster upgrade, only for those instances which have a non-zero delay duration configured + * in the service description. + * + * @return the instanceCloseDelayDurationInSeconds value. + */ + public Long instanceCloseDelayDurationInSeconds() { + return this.instanceCloseDelayDurationInSeconds; + } + + /** + * Set the instanceCloseDelayDurationInSeconds property: Duration in seconds, to wait before a stateless instance is + * closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing + * during the application/cluster upgrade, only for those instances which have a non-zero delay duration configured + * in the service description. + * + * @param instanceCloseDelayDurationInSeconds the instanceCloseDelayDurationInSeconds value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy + withInstanceCloseDelayDurationInSeconds(Long instanceCloseDelayDurationInSeconds) { + this.instanceCloseDelayDurationInSeconds = instanceCloseDelayDurationInSeconds; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("rollingUpgradeMode", + this.rollingUpgradeMode == null ? null : this.rollingUpgradeMode.toString()); + jsonWriter.writeBooleanField("forceRestart", this.forceRestart); + jsonWriter.writeNumberField("replicaSetCheckTimeoutInMilliseconds", this.replicaSetCheckTimeoutInMilliseconds); + jsonWriter.writeStringField("failureAction", this.failureAction == null ? null : this.failureAction.toString()); + jsonWriter.writeStringField("healthCheckWaitDurationInMilliseconds", + this.healthCheckWaitDurationInMilliseconds); + jsonWriter.writeStringField("healthCheckStableDurationInMilliseconds", + this.healthCheckStableDurationInMilliseconds); + jsonWriter.writeStringField("healthCheckRetryTimeoutInMilliseconds", + this.healthCheckRetryTimeoutInMilliseconds); + jsonWriter.writeStringField("upgradeTimeoutInMilliseconds", this.upgradeTimeoutInMilliseconds); + jsonWriter.writeStringField("upgradeDomainTimeoutInMilliseconds", this.upgradeDomainTimeoutInMilliseconds); + jsonWriter.writeNumberField("instanceCloseDelayDurationInSeconds", this.instanceCloseDelayDurationInSeconds); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RuntimeRollingUpgradeUpdateMonitoringPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RuntimeRollingUpgradeUpdateMonitoringPolicy if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RuntimeRollingUpgradeUpdateMonitoringPolicy. + */ + public static RuntimeRollingUpgradeUpdateMonitoringPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RuntimeRollingUpgradeUpdateMonitoringPolicy deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy + = new RuntimeRollingUpgradeUpdateMonitoringPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("rollingUpgradeMode".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.rollingUpgradeMode + = RuntimeRollingUpgradeMode.fromString(reader.getString()); + } else if ("forceRestart".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.forceRestart + = reader.getNullable(JsonReader::getBoolean); + } else if ("replicaSetCheckTimeoutInMilliseconds".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.replicaSetCheckTimeoutInMilliseconds + = reader.getNullable(JsonReader::getLong); + } else if ("failureAction".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.failureAction + = RuntimeFailureAction.fromString(reader.getString()); + } else if ("healthCheckWaitDurationInMilliseconds".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.healthCheckWaitDurationInMilliseconds + = reader.getString(); + } else if ("healthCheckStableDurationInMilliseconds".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.healthCheckStableDurationInMilliseconds + = reader.getString(); + } else if ("healthCheckRetryTimeoutInMilliseconds".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.healthCheckRetryTimeoutInMilliseconds + = reader.getString(); + } else if ("upgradeTimeoutInMilliseconds".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.upgradeTimeoutInMilliseconds + = reader.getString(); + } else if ("upgradeDomainTimeoutInMilliseconds".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.upgradeDomainTimeoutInMilliseconds + = reader.getString(); + } else if ("instanceCloseDelayDurationInSeconds".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.instanceCloseDelayDurationInSeconds + = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeServiceTypeHealthPolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeServiceTypeHealthPolicy.java new file mode 100644 index 000000000000..375a08de9142 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeServiceTypeHealthPolicy.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Cluster level definition that represents the health policy used to evaluate the health of services belonging to a + * service type. + */ +@Fluent +public final class RuntimeServiceTypeHealthPolicy implements JsonSerializable<RuntimeServiceTypeHealthPolicy> { + /* + * The maximum allowed percentage of unhealthy services. + * + * The percentage represents the maximum tolerated percentage of services that can be unhealthy before the + * application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the specific service type over the total + * number of services of the specific service type. + * The computation rounds up to tolerate one failure on small numbers of services. + */ + private int maxPercentUnhealthyServices; + + /* + * The maximum allowed percentage of unhealthy partitions per service. + * + * The percentage represents the maximum tolerated percentage of partitions that can be unhealthy before the service + * is considered in error. + * If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions + * in the service. + * The computation rounds up to tolerate one failure on small numbers of partitions. + */ + private int maxPercentUnhealthyPartitionsPerService; + + /* + * The maximum allowed percentage of unhealthy replicas per partition. + * + * The percentage represents the maximum tolerated percentage of replicas that can be unhealthy before the partition + * is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in + * the partition. + * The computation rounds up to tolerate one failure on small numbers of replicas. + */ + private int maxPercentUnhealthyReplicasPerPartition; + + /** + * Creates an instance of RuntimeServiceTypeHealthPolicy class. + */ + public RuntimeServiceTypeHealthPolicy() { + } + + /** + * Get the maxPercentUnhealthyServices property: The maximum allowed percentage of unhealthy services. + * + * The percentage represents the maximum tolerated percentage of services that can be unhealthy before the + * application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the specific service type over the total + * number of services of the specific service type. + * The computation rounds up to tolerate one failure on small numbers of services. + * + * @return the maxPercentUnhealthyServices value. + */ + public int maxPercentUnhealthyServices() { + return this.maxPercentUnhealthyServices; + } + + /** + * Set the maxPercentUnhealthyServices property: The maximum allowed percentage of unhealthy services. + * + * The percentage represents the maximum tolerated percentage of services that can be unhealthy before the + * application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the specific service type over the total + * number of services of the specific service type. + * The computation rounds up to tolerate one failure on small numbers of services. + * + * @param maxPercentUnhealthyServices the maxPercentUnhealthyServices value to set. + * @return the RuntimeServiceTypeHealthPolicy object itself. + */ + public RuntimeServiceTypeHealthPolicy withMaxPercentUnhealthyServices(int maxPercentUnhealthyServices) { + this.maxPercentUnhealthyServices = maxPercentUnhealthyServices; + return this; + } + + /** + * Get the maxPercentUnhealthyPartitionsPerService property: The maximum allowed percentage of unhealthy partitions + * per service. + * + * The percentage represents the maximum tolerated percentage of partitions that can be unhealthy before the service + * is considered in error. + * If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions + * in the service. + * The computation rounds up to tolerate one failure on small numbers of partitions. + * + * @return the maxPercentUnhealthyPartitionsPerService value. + */ + public int maxPercentUnhealthyPartitionsPerService() { + return this.maxPercentUnhealthyPartitionsPerService; + } + + /** + * Set the maxPercentUnhealthyPartitionsPerService property: The maximum allowed percentage of unhealthy partitions + * per service. + * + * The percentage represents the maximum tolerated percentage of partitions that can be unhealthy before the service + * is considered in error. + * If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions + * in the service. + * The computation rounds up to tolerate one failure on small numbers of partitions. + * + * @param maxPercentUnhealthyPartitionsPerService the maxPercentUnhealthyPartitionsPerService value to set. + * @return the RuntimeServiceTypeHealthPolicy object itself. + */ + public RuntimeServiceTypeHealthPolicy + withMaxPercentUnhealthyPartitionsPerService(int maxPercentUnhealthyPartitionsPerService) { + this.maxPercentUnhealthyPartitionsPerService = maxPercentUnhealthyPartitionsPerService; + return this; + } + + /** + * Get the maxPercentUnhealthyReplicasPerPartition property: The maximum allowed percentage of unhealthy replicas + * per partition. + * + * The percentage represents the maximum tolerated percentage of replicas that can be unhealthy before the partition + * is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in + * the partition. + * The computation rounds up to tolerate one failure on small numbers of replicas. + * + * @return the maxPercentUnhealthyReplicasPerPartition value. + */ + public int maxPercentUnhealthyReplicasPerPartition() { + return this.maxPercentUnhealthyReplicasPerPartition; + } + + /** + * Set the maxPercentUnhealthyReplicasPerPartition property: The maximum allowed percentage of unhealthy replicas + * per partition. + * + * The percentage represents the maximum tolerated percentage of replicas that can be unhealthy before the partition + * is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in + * the partition. + * The computation rounds up to tolerate one failure on small numbers of replicas. + * + * @param maxPercentUnhealthyReplicasPerPartition the maxPercentUnhealthyReplicasPerPartition value to set. + * @return the RuntimeServiceTypeHealthPolicy object itself. + */ + public RuntimeServiceTypeHealthPolicy + withMaxPercentUnhealthyReplicasPerPartition(int maxPercentUnhealthyReplicasPerPartition) { + this.maxPercentUnhealthyReplicasPerPartition = maxPercentUnhealthyReplicasPerPartition; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("maxPercentUnhealthyServices", this.maxPercentUnhealthyServices); + jsonWriter.writeIntField("maxPercentUnhealthyPartitionsPerService", + this.maxPercentUnhealthyPartitionsPerService); + jsonWriter.writeIntField("maxPercentUnhealthyReplicasPerPartition", + this.maxPercentUnhealthyReplicasPerPartition); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RuntimeServiceTypeHealthPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RuntimeServiceTypeHealthPolicy if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RuntimeServiceTypeHealthPolicy. + */ + public static RuntimeServiceTypeHealthPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RuntimeServiceTypeHealthPolicy deserializedRuntimeServiceTypeHealthPolicy + = new RuntimeServiceTypeHealthPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maxPercentUnhealthyServices".equals(fieldName)) { + deserializedRuntimeServiceTypeHealthPolicy.maxPercentUnhealthyServices = reader.getInt(); + } else if ("maxPercentUnhealthyPartitionsPerService".equals(fieldName)) { + deserializedRuntimeServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService + = reader.getInt(); + } else if ("maxPercentUnhealthyReplicasPerPartition".equals(fieldName)) { + deserializedRuntimeServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition + = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedRuntimeServiceTypeHealthPolicy; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpdateApplicationUpgradeParameters.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpdateApplicationUpgradeParameters.java new file mode 100644 index 000000000000..f607a97ef4b7 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpdateApplicationUpgradeParameters.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Parameters for the Update Upgrade action. + */ +@Fluent +public final class RuntimeUpdateApplicationUpgradeParameters + implements JsonSerializable<RuntimeUpdateApplicationUpgradeParameters> { + /* + * The name of the application, including the 'fabric:' URI scheme. + */ + private String name; + + /* + * The kind of the upgrade. + */ + private RuntimeUpgradeKind upgradeKind; + + /* + * Defines a health policy used to evaluate the health of an application or one of its children entities. + */ + private RuntimeApplicationHealthPolicy applicationHealthPolicy; + + /* + * Describes the parameters for updating a rolling upgrade of application or cluster and a monitoring policy. + */ + private RuntimeRollingUpgradeUpdateMonitoringPolicy updateDescription; + + /** + * Creates an instance of RuntimeUpdateApplicationUpgradeParameters class. + */ + public RuntimeUpdateApplicationUpgradeParameters() { + } + + /** + * Get the name property: The name of the application, including the 'fabric:' URI scheme. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the application, including the 'fabric:' URI scheme. + * + * @param name the name value to set. + * @return the RuntimeUpdateApplicationUpgradeParameters object itself. + */ + public RuntimeUpdateApplicationUpgradeParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the upgradeKind property: The kind of the upgrade. + * + * @return the upgradeKind value. + */ + public RuntimeUpgradeKind upgradeKind() { + return this.upgradeKind; + } + + /** + * Set the upgradeKind property: The kind of the upgrade. + * + * @param upgradeKind the upgradeKind value to set. + * @return the RuntimeUpdateApplicationUpgradeParameters object itself. + */ + public RuntimeUpdateApplicationUpgradeParameters withUpgradeKind(RuntimeUpgradeKind upgradeKind) { + this.upgradeKind = upgradeKind; + return this; + } + + /** + * Get the applicationHealthPolicy property: Defines a health policy used to evaluate the health of an application + * or one of its children entities. + * + * @return the applicationHealthPolicy value. + */ + public RuntimeApplicationHealthPolicy applicationHealthPolicy() { + return this.applicationHealthPolicy; + } + + /** + * Set the applicationHealthPolicy property: Defines a health policy used to evaluate the health of an application + * or one of its children entities. + * + * @param applicationHealthPolicy the applicationHealthPolicy value to set. + * @return the RuntimeUpdateApplicationUpgradeParameters object itself. + */ + public RuntimeUpdateApplicationUpgradeParameters + withApplicationHealthPolicy(RuntimeApplicationHealthPolicy applicationHealthPolicy) { + this.applicationHealthPolicy = applicationHealthPolicy; + return this; + } + + /** + * Get the updateDescription property: Describes the parameters for updating a rolling upgrade of application or + * cluster and a monitoring policy. + * + * @return the updateDescription value. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy updateDescription() { + return this.updateDescription; + } + + /** + * Set the updateDescription property: Describes the parameters for updating a rolling upgrade of application or + * cluster and a monitoring policy. + * + * @param updateDescription the updateDescription value to set. + * @return the RuntimeUpdateApplicationUpgradeParameters object itself. + */ + public RuntimeUpdateApplicationUpgradeParameters + withUpdateDescription(RuntimeRollingUpgradeUpdateMonitoringPolicy updateDescription) { + this.updateDescription = updateDescription; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("upgradeKind", this.upgradeKind == null ? null : this.upgradeKind.toString()); + jsonWriter.writeJsonField("applicationHealthPolicy", this.applicationHealthPolicy); + jsonWriter.writeJsonField("updateDescription", this.updateDescription); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RuntimeUpdateApplicationUpgradeParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RuntimeUpdateApplicationUpgradeParameters if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RuntimeUpdateApplicationUpgradeParameters. + */ + public static RuntimeUpdateApplicationUpgradeParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RuntimeUpdateApplicationUpgradeParameters deserializedRuntimeUpdateApplicationUpgradeParameters + = new RuntimeUpdateApplicationUpgradeParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedRuntimeUpdateApplicationUpgradeParameters.name = reader.getString(); + } else if ("upgradeKind".equals(fieldName)) { + deserializedRuntimeUpdateApplicationUpgradeParameters.upgradeKind + = RuntimeUpgradeKind.fromString(reader.getString()); + } else if ("applicationHealthPolicy".equals(fieldName)) { + deserializedRuntimeUpdateApplicationUpgradeParameters.applicationHealthPolicy + = RuntimeApplicationHealthPolicy.fromJson(reader); + } else if ("updateDescription".equals(fieldName)) { + deserializedRuntimeUpdateApplicationUpgradeParameters.updateDescription + = RuntimeRollingUpgradeUpdateMonitoringPolicy.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRuntimeUpdateApplicationUpgradeParameters; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpgradeKind.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpgradeKind.java new file mode 100644 index 000000000000..f346430d945b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpgradeKind.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Cluster level definition for the kind of upgrade. + */ +public final class RuntimeUpgradeKind extends ExpandableStringEnum<RuntimeUpgradeKind> { + /** + * The upgrade progresses one upgrade domain at a time. + */ + public static final RuntimeUpgradeKind ROLLING = fromString("Rolling"); + + /** + * Creates a new instance of RuntimeUpgradeKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RuntimeUpgradeKind() { + } + + /** + * Creates or finds a RuntimeUpgradeKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding RuntimeUpgradeKind. + */ + public static RuntimeUpgradeKind fromString(String name) { + return fromString(name, RuntimeUpgradeKind.class); + } + + /** + * Gets known RuntimeUpgradeKind values. + * + * @return known RuntimeUpgradeKind values. + */ + public static Collection<RuntimeUpgradeKind> values() { + return values(RuntimeUpgradeKind.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResource.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResource.java index 15ee9e179cea..5d04d7f0d797 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResource.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResource.java @@ -252,4 +252,25 @@ interface WithTags { * @return the refreshed resource. */ ServiceResource refresh(Context context); + + /** + * A long-running resource action. + * + * @param parameters The parameters for restarting replicas. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restartReplica(RestartReplicaRequest parameters); + + /** + * A long-running resource action. + * + * @param parameters The parameters for restarting replicas. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restartReplica(RestartReplicaRequest parameters, Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Services.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Services.java index 525801838065..306723c06fed 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Services.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Services.java @@ -107,6 +107,37 @@ PagedIterable<ServiceResource> listByApplications(String resourceGroupName, Stri PagedIterable<ServiceResource> listByApplications(String resourceGroupName, String clusterName, String applicationName, Context context); + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restartReplica(String resourceGroupName, String clusterName, String applicationName, String serviceName, + RestartReplicaRequest parameters); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restartReplica(String resourceGroupName, String clusterName, String applicationName, String serviceName, + RestartReplicaRequest parameters, Context context); + /** * Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed * application resource. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/META-INF/azure-resourcemanager-servicefabricmanagedclusters_apiview_properties.json b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/META-INF/azure-resourcemanager-servicefabricmanagedclusters_apiview_properties.json index c2ee5c0b925a..d3248ef0be3f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/META-INF/azure-resourcemanager-servicefabricmanagedclusters_apiview_properties.json +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/META-INF/azure-resourcemanager-servicefabricmanagedclusters_apiview_properties.json @@ -24,19 +24,25 @@ "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient": "Microsoft.ServiceFabric.Applications", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginCreateOrUpdate": "Microsoft.ServiceFabric.Applications.createOrUpdate", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginDelete": "Microsoft.ServiceFabric.Applications.delete", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginFetchHealth": "Microsoft.ServiceFabric.Applications.fetchHealth", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginReadUpgrade": "Microsoft.ServiceFabric.Applications.readUpgrade", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginRestartDeployedCodePackage": "Microsoft.ServiceFabric.Applications.restartDeployedCodePackage", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginResumeUpgrade": "Microsoft.ServiceFabric.Applications.resumeUpgrade", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginStartRollback": "Microsoft.ServiceFabric.Applications.startRollback", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginUpdate": "Microsoft.ServiceFabric.Applications.update", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginUpdateUpgrade": "Microsoft.ServiceFabric.Applications.updateUpgrade", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.createOrUpdate": "Microsoft.ServiceFabric.Applications.createOrUpdate", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.delete": "Microsoft.ServiceFabric.Applications.delete", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.fetchHealth": "Microsoft.ServiceFabric.Applications.fetchHealth", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.get": "Microsoft.ServiceFabric.Applications.get", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.getWithResponse": "Microsoft.ServiceFabric.Applications.get", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.list": "Microsoft.ServiceFabric.Applications.list", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.readUpgrade": "Microsoft.ServiceFabric.Applications.readUpgrade", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.restartDeployedCodePackage": "Microsoft.ServiceFabric.Applications.restartDeployedCodePackage", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.resumeUpgrade": "Microsoft.ServiceFabric.Applications.resumeUpgrade", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.startRollback": "Microsoft.ServiceFabric.Applications.startRollback", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.update": "Microsoft.ServiceFabric.Applications.update", - "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.updateWithResponse": "Microsoft.ServiceFabric.Applications.update", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.updateUpgrade": "Microsoft.ServiceFabric.Applications.updateUpgrade", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient": "Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient.post": "Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient.postWithResponse": "Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post", @@ -57,6 +63,7 @@ "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginDelete": "Microsoft.ServiceFabric.ManagedClusters.delete", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginStartFaultSimulation": "Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginStopFaultSimulation": "Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginUpdate": "Microsoft.ServiceFabric.ManagedClusters.update", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.createOrUpdate": "Microsoft.ServiceFabric.ManagedClusters.createOrUpdate", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.delete": "Microsoft.ServiceFabric.ManagedClusters.delete", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getByResourceGroup": "Microsoft.ServiceFabric.ManagedClusters.get", @@ -69,7 +76,6 @@ "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.startFaultSimulation": "Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.stopFaultSimulation": "Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.update": "Microsoft.ServiceFabric.ManagedClusters.update", - "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.updateWithResponse": "Microsoft.ServiceFabric.ManagedClusters.update", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient.get": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient.getWithResponse": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get", @@ -114,11 +120,13 @@ "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient": "Microsoft.ServiceFabric.Services", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.beginCreateOrUpdate": "Microsoft.ServiceFabric.Services.createOrUpdate", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.beginDelete": "Microsoft.ServiceFabric.Services.delete", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.beginRestartReplica": "Microsoft.ServiceFabric.Services.restartReplica", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.createOrUpdate": "Microsoft.ServiceFabric.Services.createOrUpdate", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.delete": "Microsoft.ServiceFabric.Services.delete", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.get": "Microsoft.ServiceFabric.Services.get", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.getWithResponse": "Microsoft.ServiceFabric.Services.get", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.listByApplications": "Microsoft.ServiceFabric.Services.listByApplications", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.restartReplica": "Microsoft.ServiceFabric.Services.restartReplica", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.update": "Microsoft.ServiceFabric.Services.update", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.updateWithResponse": "Microsoft.ServiceFabric.Services.update", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceInner": "Microsoft.ServiceFabric.ApplicationResource", @@ -155,11 +163,13 @@ "com.azure.resourcemanager.servicefabricmanagedclusters.models.Access": "Microsoft.ServiceFabric.Access", "com.azure.resourcemanager.servicefabricmanagedclusters.models.AddRemoveIncrementalNamedPartitionScalingMechanism": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism", "com.azure.resourcemanager.servicefabricmanagedclusters.models.AdditionalNetworkInterfaceConfiguration": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest": "Microsoft.ServiceFabric.ApplicationFetchHealthRequest", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationHealthPolicy": "Microsoft.ServiceFabric.ApplicationHealthPolicy", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeUpdateParameters": "Microsoft.ServiceFabric.ApplicationTypeUpdateParameters", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionUpdateParameters": "Microsoft.ServiceFabric.ApplicationTypeVersionUpdateParameters", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionsCleanupPolicy": "Microsoft.ServiceFabric.ApplicationTypeVersionsCleanupPolicy", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParameters": "Microsoft.ServiceFabric.ApplicationUpdateParameters", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParametersProperties": "Microsoft.ServiceFabric.ApplicationUpdateParametersProperties", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpgradePolicy": "Microsoft.ServiceFabric.ApplicationUpgradePolicy", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUserAssignedIdentity": "Microsoft.ServiceFabric.ApplicationUserAssignedIdentity", "com.azure.resourcemanager.servicefabricmanagedclusters.models.AutoGeneratedDomainNameLabelScope": "Microsoft.ServiceFabric.AutoGeneratedDomainNameLabelScope", @@ -188,6 +198,7 @@ "com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationIdContent": "Microsoft.ServiceFabric.FaultSimulationIdContent", "com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationStatus": "Microsoft.ServiceFabric.FaultSimulationStatus", "com.azure.resourcemanager.servicefabricmanagedclusters.models.FrontendConfiguration": "Microsoft.ServiceFabric.FrontendConfiguration", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.HealthFilter": "Microsoft.ServiceFabric.HealthFilter", "com.azure.resourcemanager.servicefabricmanagedclusters.models.IpAddressType": "Microsoft.ServiceFabric.IPAddressType", "com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfiguration": "Microsoft.ServiceFabric.IpConfiguration", "com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfigurationPublicIpAddressConfiguration": "Microsoft.ServiceFabric.PublicIPAddressConfiguration", @@ -222,9 +233,19 @@ "com.azure.resourcemanager.servicefabricmanagedclusters.models.Protocol": "Microsoft.ServiceFabric.Protocol", "com.azure.resourcemanager.servicefabricmanagedclusters.models.PublicIpAddressVersion": "Microsoft.ServiceFabric.PublicIPAddressVersion", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ResourceAzStatus": "Microsoft.ServiceFabric.ResourceAzStatus", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartDeployedCodePackageRequest": "Microsoft.ServiceFabric.RestartDeployedCodePackageRequest", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartKind": "Microsoft.ServiceFabric.RestartKind", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest": "Microsoft.ServiceFabric.RestartReplicaRequest", "com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMode": "Microsoft.ServiceFabric.RollingUpgradeMode", "com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMonitoringPolicy": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeApplicationHealthPolicy": "Microsoft.ServiceFabric.RuntimeApplicationHealthPolicy", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeFailureAction": "Microsoft.ServiceFabric.RuntimeFailureAction", "com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters": "Microsoft.ServiceFabric.RuntimeResumeApplicationUpgradeParameters", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeMode": "Microsoft.ServiceFabric.RuntimeRollingUpgradeMode", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeUpdateMonitoringPolicy": "Microsoft.ServiceFabric.RuntimeRollingUpgradeUpdateMonitoringPolicy", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeServiceTypeHealthPolicy": "Microsoft.ServiceFabric.RuntimeServiceTypeHealthPolicy", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters": "Microsoft.ServiceFabric.RuntimeUpdateApplicationUpgradeParameters", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpgradeKind": "Microsoft.ServiceFabric.RuntimeUpgradeKind", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingMechanism": "Microsoft.ServiceFabric.ScalingMechanism", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingPolicy": "Microsoft.ServiceFabric.ScalingPolicy", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingTrigger": "Microsoft.ServiceFabric.ScalingTrigger", diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/META-INF/azure-resourcemanager-servicefabricmanagedclusters_metadata.json b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/META-INF/azure-resourcemanager-servicefabricmanagedclusters_metadata.json index 3054efc976b4..832c790c231d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/META-INF/azure-resourcemanager-servicefabricmanagedclusters_metadata.json +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/META-INF/azure-resourcemanager-servicefabricmanagedclusters_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersion":"2025-06-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient":"Microsoft.ServiceFabric.ApplicationTypeVersions","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.ApplicationTypeVersions.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.beginDelete":"Microsoft.ServiceFabric.ApplicationTypeVersions.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.createOrUpdate":"Microsoft.ServiceFabric.ApplicationTypeVersions.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.delete":"Microsoft.ServiceFabric.ApplicationTypeVersions.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.get":"Microsoft.ServiceFabric.ApplicationTypeVersions.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.getWithResponse":"Microsoft.ServiceFabric.ApplicationTypeVersions.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.listByApplicationTypes":"Microsoft.ServiceFabric.ApplicationTypeVersions.listByApplicationTypes","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.update":"Microsoft.ServiceFabric.ApplicationTypeVersions.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.updateWithResponse":"Microsoft.ServiceFabric.ApplicationTypeVersions.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient":"Microsoft.ServiceFabric.ApplicationTypes","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.beginDelete":"Microsoft.ServiceFabric.ApplicationTypes.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.createOrUpdate":"Microsoft.ServiceFabric.ApplicationTypes.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.createOrUpdateWithResponse":"Microsoft.ServiceFabric.ApplicationTypes.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.delete":"Microsoft.ServiceFabric.ApplicationTypes.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.get":"Microsoft.ServiceFabric.ApplicationTypes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.getWithResponse":"Microsoft.ServiceFabric.ApplicationTypes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.list":"Microsoft.ServiceFabric.ApplicationTypes.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.update":"Microsoft.ServiceFabric.ApplicationTypes.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.updateWithResponse":"Microsoft.ServiceFabric.ApplicationTypes.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient":"Microsoft.ServiceFabric.Applications","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.Applications.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginDelete":"Microsoft.ServiceFabric.Applications.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginReadUpgrade":"Microsoft.ServiceFabric.Applications.readUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginResumeUpgrade":"Microsoft.ServiceFabric.Applications.resumeUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginStartRollback":"Microsoft.ServiceFabric.Applications.startRollback","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.createOrUpdate":"Microsoft.ServiceFabric.Applications.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.delete":"Microsoft.ServiceFabric.Applications.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.get":"Microsoft.ServiceFabric.Applications.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.getWithResponse":"Microsoft.ServiceFabric.Applications.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.list":"Microsoft.ServiceFabric.Applications.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.readUpgrade":"Microsoft.ServiceFabric.Applications.readUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.resumeUpgrade":"Microsoft.ServiceFabric.Applications.resumeUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.startRollback":"Microsoft.ServiceFabric.Applications.startRollback","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.update":"Microsoft.ServiceFabric.Applications.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.updateWithResponse":"Microsoft.ServiceFabric.Applications.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient":"Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient.post":"Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient.postWithResponse":"Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedAzResiliencyStatusesClient":"Microsoft.ServiceFabric.ManagedAzResiliencyStatus","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedAzResiliencyStatusesClient.get":"Microsoft.ServiceFabric.ManagedAzResiliencyStatus.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedAzResiliencyStatusesClient.getWithResponse":"Microsoft.ServiceFabric.ManagedAzResiliencyStatus.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient":"Microsoft.ServiceFabric.ManagedClusterVersion","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.get":"Microsoft.ServiceFabric.ManagedClusterVersion.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.getByEnvironment":"Microsoft.ServiceFabric.ManagedClusterVersion.getByEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.getByEnvironmentWithResponse":"Microsoft.ServiceFabric.ManagedClusterVersion.getByEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.getWithResponse":"Microsoft.ServiceFabric.ManagedClusterVersion.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.list":"Microsoft.ServiceFabric.ManagedClusterVersion.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.listByEnvironment":"Microsoft.ServiceFabric.ManagedClusterVersion.listByEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.listByEnvironmentWithResponse":"Microsoft.ServiceFabric.ManagedClusterVersion.listByEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.listWithResponse":"Microsoft.ServiceFabric.ManagedClusterVersion.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient":"Microsoft.ServiceFabric.ManagedClusters","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.ManagedClusters.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginDelete":"Microsoft.ServiceFabric.ManagedClusters.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginStartFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginStopFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.createOrUpdate":"Microsoft.ServiceFabric.ManagedClusters.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.delete":"Microsoft.ServiceFabric.ManagedClusters.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getByResourceGroup":"Microsoft.ServiceFabric.ManagedClusters.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getByResourceGroupWithResponse":"Microsoft.ServiceFabric.ManagedClusters.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.getFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getFaultSimulationWithResponse":"Microsoft.ServiceFabric.ManagedClusters.getFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.list":"Microsoft.ServiceFabric.ManagedClusters.listBySubscription","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.listByResourceGroup":"Microsoft.ServiceFabric.ManagedClusters.listByResourceGroup","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.listFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.listFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.startFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.stopFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.update":"Microsoft.ServiceFabric.ManagedClusters.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.updateWithResponse":"Microsoft.ServiceFabric.ManagedClusters.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient":"Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient.get":"Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient.getWithResponse":"Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedUnsupportedVMSizesClient":"Microsoft.ServiceFabric.ManagedUnsupportedVMSizes","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedUnsupportedVMSizesClient.get":"Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedUnsupportedVMSizesClient.getWithResponse":"Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedUnsupportedVMSizesClient.list":"Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypeSkusClient":"Microsoft.ServiceFabric.NodeTypeSkus","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypeSkusClient.list":"Microsoft.ServiceFabric.NodeTypeSkus.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient":"Microsoft.ServiceFabric.NodeTypes","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.NodeTypes.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginDeallocate":"Microsoft.ServiceFabric.NodeTypes.deallocate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginDelete":"Microsoft.ServiceFabric.NodeTypes.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginDeleteNode":"Microsoft.ServiceFabric.NodeTypes.deleteNode","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginRedeploy":"Microsoft.ServiceFabric.NodeTypes.redeploy","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginReimage":"Microsoft.ServiceFabric.NodeTypes.reimage","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginRestart":"Microsoft.ServiceFabric.NodeTypes.restart","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginStart":"Microsoft.ServiceFabric.NodeTypes.start","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginStartFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.startFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginStopFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.stopFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginUpdate":"Microsoft.ServiceFabric.NodeTypes.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.createOrUpdate":"Microsoft.ServiceFabric.NodeTypes.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.deallocate":"Microsoft.ServiceFabric.NodeTypes.deallocate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.delete":"Microsoft.ServiceFabric.NodeTypes.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.deleteNode":"Microsoft.ServiceFabric.NodeTypes.deleteNode","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.get":"Microsoft.ServiceFabric.NodeTypes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.getFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.getFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.getFaultSimulationWithResponse":"Microsoft.ServiceFabric.NodeTypes.getFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.getWithResponse":"Microsoft.ServiceFabric.NodeTypes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.listByManagedClusters":"Microsoft.ServiceFabric.NodeTypes.listByManagedClusters","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.listFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.listFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.redeploy":"Microsoft.ServiceFabric.NodeTypes.redeploy","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.reimage":"Microsoft.ServiceFabric.NodeTypes.reimage","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.restart":"Microsoft.ServiceFabric.NodeTypes.restart","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.start":"Microsoft.ServiceFabric.NodeTypes.start","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.startFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.startFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.stopFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.stopFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.update":"Microsoft.ServiceFabric.NodeTypes.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.OperationsClient":"Microsoft.ServiceFabric.Operations","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.OperationsClient.list":"Microsoft.ServiceFabric.Operations.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServiceFabricManagedClustersMgmtClient":"Microsoft.ServiceFabric","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient":"Microsoft.ServiceFabric.Services","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.Services.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.beginDelete":"Microsoft.ServiceFabric.Services.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.createOrUpdate":"Microsoft.ServiceFabric.Services.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.delete":"Microsoft.ServiceFabric.Services.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.get":"Microsoft.ServiceFabric.Services.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.getWithResponse":"Microsoft.ServiceFabric.Services.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.listByApplications":"Microsoft.ServiceFabric.Services.listByApplications","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.update":"Microsoft.ServiceFabric.Services.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.updateWithResponse":"Microsoft.ServiceFabric.Services.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceInner":"Microsoft.ServiceFabric.ApplicationResource","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceProperties":"Microsoft.ServiceFabric.ApplicationResourceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeResourceInner":"Microsoft.ServiceFabric.ApplicationTypeResource","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeResourceProperties":"Microsoft.ServiceFabric.ApplicationTypeResourceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeVersionResourceInner":"Microsoft.ServiceFabric.ApplicationTypeVersionResource","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeVersionResourceProperties":"Microsoft.ServiceFabric.ApplicationTypeVersionResourceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.FaultSimulationInner":"Microsoft.ServiceFabric.FaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedAzResiliencyStatusInner":"Microsoft.ServiceFabric.ManagedAzResiliencyStatusContent","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterCodeVersionResultInner":"Microsoft.ServiceFabric.ManagedClusterCodeVersionResult","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterInner":"Microsoft.ServiceFabric.ManagedCluster","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterProperties":"Microsoft.ServiceFabric.ManagedClusterProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterVersionDetails":"Microsoft.ServiceFabric.ManagedClusterVersionDetails","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedMaintenanceWindowStatusInner":"Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedVMSizeInner":"Microsoft.ServiceFabric.ManagedVMSize","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeAvailableSkuInner":"Microsoft.ServiceFabric.NodeTypeAvailableSku","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeInner":"Microsoft.ServiceFabric.NodeType","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeProperties":"Microsoft.ServiceFabric.NodeTypeProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.OperationResultInner":"Microsoft.ServiceFabric.OperationResult","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ServiceResourceInner":"Microsoft.ServiceFabric.ServiceResource","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.VMSSExtensionProperties":"Microsoft.ServiceFabric.VMSSExtensionProperties","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.ServiceFabricManagedClustersMgmtClientBuilder":"Microsoft.ServiceFabric","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationResourceList":"Microsoft.ServiceFabric.ApplicationResourceList","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationTypeResourceList":"Microsoft.ServiceFabric.ApplicationTypeResourceList","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationTypeVersionResourceList":"Microsoft.ServiceFabric.ApplicationTypeVersionResourceList","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.FaultSimulationListResult":"Microsoft.ServiceFabric.FaultSimulationListResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ManagedClusterListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ManagedVMSizesResult":"Microsoft.ServiceFabric.ManagedVMSizesResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.NodeTypeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.NodeTypeListSkuResult":"Microsoft.ServiceFabric.NodeTypeListSkuResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.OperationListResult":"Microsoft.ServiceFabric.OperationListResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ServiceResourceList":"Microsoft.ServiceFabric.ServiceResourceList","com.azure.resourcemanager.servicefabricmanagedclusters.models.Access":"Microsoft.ServiceFabric.Access","com.azure.resourcemanager.servicefabricmanagedclusters.models.AddRemoveIncrementalNamedPartitionScalingMechanism":"Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism","com.azure.resourcemanager.servicefabricmanagedclusters.models.AdditionalNetworkInterfaceConfiguration":"Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationHealthPolicy":"Microsoft.ServiceFabric.ApplicationHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeUpdateParameters":"Microsoft.ServiceFabric.ApplicationTypeUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionUpdateParameters":"Microsoft.ServiceFabric.ApplicationTypeVersionUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionsCleanupPolicy":"Microsoft.ServiceFabric.ApplicationTypeVersionsCleanupPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParameters":"Microsoft.ServiceFabric.ApplicationUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpgradePolicy":"Microsoft.ServiceFabric.ApplicationUpgradePolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUserAssignedIdentity":"Microsoft.ServiceFabric.ApplicationUserAssignedIdentity","com.azure.resourcemanager.servicefabricmanagedclusters.models.AutoGeneratedDomainNameLabelScope":"Microsoft.ServiceFabric.AutoGeneratedDomainNameLabelScope","com.azure.resourcemanager.servicefabricmanagedclusters.models.AvailableOperationDisplay":"Microsoft.ServiceFabric.AvailableOperationDisplay","com.azure.resourcemanager.servicefabricmanagedclusters.models.AveragePartitionLoadScalingTrigger":"Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger","com.azure.resourcemanager.servicefabricmanagedclusters.models.AverageServiceLoadScalingTrigger":"Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger","com.azure.resourcemanager.servicefabricmanagedclusters.models.AzureActiveDirectory":"Microsoft.ServiceFabric.AzureActiveDirectory","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClientCertificate":"Microsoft.ServiceFabric.ClientCertificate","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterHealthPolicy":"Microsoft.ServiceFabric.ClusterHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterMonitoringPolicy":"Microsoft.ServiceFabric.ClusterMonitoringPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterState":"Microsoft.ServiceFabric.ClusterState","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeCadence":"Microsoft.ServiceFabric.ClusterUpgradeCadence","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeDeltaHealthPolicy":"Microsoft.ServiceFabric.ClusterUpgradeDeltaHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeMode":"Microsoft.ServiceFabric.ClusterUpgradeMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradePolicy":"Microsoft.ServiceFabric.ClusterUpgradePolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.Direction":"Microsoft.ServiceFabric.Direction","com.azure.resourcemanager.servicefabricmanagedclusters.models.DiskType":"Microsoft.ServiceFabric.DiskType","com.azure.resourcemanager.servicefabricmanagedclusters.models.EndpointRangeDescription":"Microsoft.ServiceFabric.EndpointRangeDescription","com.azure.resourcemanager.servicefabricmanagedclusters.models.EvictionPolicyType":"Microsoft.ServiceFabric.EvictionPolicyType","com.azure.resourcemanager.servicefabricmanagedclusters.models.FailureAction":"Microsoft.ServiceFabric.FailureAction","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultKind":"Microsoft.ServiceFabric.FaultKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationConstraints":"Microsoft.ServiceFabric.FaultSimulationConstraints","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContent":"Microsoft.ServiceFabric.FaultSimulationContent","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContentWrapper":"Microsoft.ServiceFabric.FaultSimulationContentWrapper","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationDetails":"Microsoft.ServiceFabric.FaultSimulationDetails","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationIdContent":"Microsoft.ServiceFabric.FaultSimulationIdContent","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationStatus":"Microsoft.ServiceFabric.FaultSimulationStatus","com.azure.resourcemanager.servicefabricmanagedclusters.models.FrontendConfiguration":"Microsoft.ServiceFabric.FrontendConfiguration","com.azure.resourcemanager.servicefabricmanagedclusters.models.IpAddressType":"Microsoft.ServiceFabric.IPAddressType","com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfiguration":"Microsoft.ServiceFabric.IpConfiguration","com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfigurationPublicIpAddressConfiguration":"Microsoft.ServiceFabric.PublicIPAddressConfiguration","com.azure.resourcemanager.servicefabricmanagedclusters.models.IpTag":"Microsoft.ServiceFabric.IpTag","com.azure.resourcemanager.servicefabricmanagedclusters.models.LoadBalancingRule":"Microsoft.ServiceFabric.LoadBalancingRule","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterAddOnFeature":"Microsoft.ServiceFabric.ManagedClusterAddOnFeature","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterUpdateParameters":"Microsoft.ServiceFabric.ManagedClusterUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterVersionEnvironment":"Microsoft.ServiceFabric.ManagedClusterVersionEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedIdentity":"Microsoft.ServiceFabric.ManagedIdentity","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedIdentityType":"Microsoft.ServiceFabric.ManagedIdentityType","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedResourceProvisioningState":"Microsoft.ServiceFabric.ManagedResourceProvisioningState","com.azure.resourcemanager.servicefabricmanagedclusters.models.MoveCost":"Microsoft.ServiceFabric.MoveCost","com.azure.resourcemanager.servicefabricmanagedclusters.models.NamedPartitionScheme":"Microsoft.ServiceFabric.NamedPartitionScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.NetworkSecurityRule":"Microsoft.ServiceFabric.NetworkSecurityRule","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters":"Microsoft.ServiceFabric.NodeTypeActionParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeFaultSimulation":"Microsoft.ServiceFabric.NodeTypeFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeNatConfig":"Microsoft.ServiceFabric.NodeTypeNatConfig","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSku":"Microsoft.ServiceFabric.NodeTypeSku","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSkuCapacity":"Microsoft.ServiceFabric.NodeTypeSkuCapacity","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSkuScaleType":"Microsoft.ServiceFabric.NodeTypeSkuScaleType","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSupportedSku":"Microsoft.ServiceFabric.NodeTypeSupportedSku","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeUpdateParameters":"Microsoft.ServiceFabric.NodeTypeUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.NsgProtocol":"Microsoft.ServiceFabric.NsgProtocol","com.azure.resourcemanager.servicefabricmanagedclusters.models.OsType":"Microsoft.ServiceFabric.OsType","com.azure.resourcemanager.servicefabricmanagedclusters.models.Partition":"Microsoft.ServiceFabric.Partition","com.azure.resourcemanager.servicefabricmanagedclusters.models.PartitionInstanceCountScaleMechanism":"Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism","com.azure.resourcemanager.servicefabricmanagedclusters.models.PartitionScheme":"Microsoft.ServiceFabric.PartitionScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateEndpointNetworkPolicies":"Microsoft.ServiceFabric.PrivateEndpointNetworkPolicies","com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateIpAddressVersion":"Microsoft.ServiceFabric.PrivateIPAddressVersion","com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateLinkServiceNetworkPolicies":"Microsoft.ServiceFabric.PrivateLinkServiceNetworkPolicies","com.azure.resourcemanager.servicefabricmanagedclusters.models.ProbeProtocol":"Microsoft.ServiceFabric.ProbeProtocol","com.azure.resourcemanager.servicefabricmanagedclusters.models.Protocol":"Microsoft.ServiceFabric.Protocol","com.azure.resourcemanager.servicefabricmanagedclusters.models.PublicIpAddressVersion":"Microsoft.ServiceFabric.PublicIPAddressVersion","com.azure.resourcemanager.servicefabricmanagedclusters.models.ResourceAzStatus":"Microsoft.ServiceFabric.ResourceAzStatus","com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMode":"Microsoft.ServiceFabric.RollingUpgradeMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMonitoringPolicy":"Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters":"Microsoft.ServiceFabric.RuntimeResumeApplicationUpgradeParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingMechanism":"Microsoft.ServiceFabric.ScalingMechanism","com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingPolicy":"Microsoft.ServiceFabric.ScalingPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingTrigger":"Microsoft.ServiceFabric.ScalingTrigger","com.azure.resourcemanager.servicefabricmanagedclusters.models.SecurityEncryptionType":"Microsoft.ServiceFabric.SecurityEncryptionType","com.azure.resourcemanager.servicefabricmanagedclusters.models.SecurityType":"Microsoft.ServiceFabric.SecurityType","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceCorrelation":"Microsoft.ServiceFabric.ServiceCorrelation","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceCorrelationScheme":"Microsoft.ServiceFabric.ServiceCorrelationScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceEndpoint":"Microsoft.ServiceFabric.ServiceEndpoint","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceKind":"Microsoft.ServiceFabric.ServiceKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceLoadMetric":"Microsoft.ServiceFabric.ServiceLoadMetric","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceLoadMetricWeight":"Microsoft.ServiceFabric.ServiceLoadMetricWeight","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePackageActivationMode":"Microsoft.ServiceFabric.ServicePackageActivationMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementInvalidDomainPolicy":"Microsoft.ServiceFabric.ServicePlacementInvalidDomainPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementNonPartiallyPlaceServicePolicy":"Microsoft.ServiceFabric.ServicePlacementNonPartiallyPlaceServicePolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementPolicy":"Microsoft.ServiceFabric.ServicePlacementPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementPolicyType":"Microsoft.ServiceFabric.ServicePlacementPolicyType","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementPreferPrimaryDomainPolicy":"Microsoft.ServiceFabric.ServicePlacementPreferPrimaryDomainPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementRequireDomainDistributionPolicy":"Microsoft.ServiceFabric.ServicePlacementRequireDomainDistributionPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementRequiredDomainPolicy":"Microsoft.ServiceFabric.ServicePlacementRequiredDomainPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResourceProperties":"Microsoft.ServiceFabric.ServiceResourceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResourcePropertiesBase":"Microsoft.ServiceFabric.ServiceResourcePropertiesBase","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceScalingMechanismKind":"Microsoft.ServiceFabric.ServiceScalingMechanismKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceScalingTriggerKind":"Microsoft.ServiceFabric.ServiceScalingTriggerKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceTypeHealthPolicy":"Microsoft.ServiceFabric.ServiceTypeHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceUpdateParameters":"Microsoft.ServiceFabric.ServiceUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.SettingsParameterDescription":"Microsoft.ServiceFabric.SettingsParameterDescription","com.azure.resourcemanager.servicefabricmanagedclusters.models.SettingsSectionDescription":"Microsoft.ServiceFabric.SettingsSectionDescription","com.azure.resourcemanager.servicefabricmanagedclusters.models.SfmcOperationStatus":"Microsoft.ServiceFabric.SfmcOperationStatus","com.azure.resourcemanager.servicefabricmanagedclusters.models.SingletonPartitionScheme":"Microsoft.ServiceFabric.SingletonPartitionScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.Sku":"Microsoft.ServiceFabric.Sku","com.azure.resourcemanager.servicefabricmanagedclusters.models.SkuName":"Microsoft.ServiceFabric.SkuName","com.azure.resourcemanager.servicefabricmanagedclusters.models.StatefulServiceProperties":"Microsoft.ServiceFabric.StatefulServiceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.models.StatelessServiceProperties":"Microsoft.ServiceFabric.StatelessServiceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.models.Subnet":"Microsoft.ServiceFabric.Subnet","com.azure.resourcemanager.servicefabricmanagedclusters.models.UniformInt64RangePartitionScheme":"Microsoft.ServiceFabric.UniformInt64RangePartitionScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.UpdateType":"Microsoft.ServiceFabric.UpdateType","com.azure.resourcemanager.servicefabricmanagedclusters.models.UserAssignedIdentity":"Microsoft.ServiceFabric.UserAssignedIdentity","com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSize":"Microsoft.ServiceFabric.VMSize","com.azure.resourcemanager.servicefabricmanagedclusters.models.VaultCertificate":"Microsoft.ServiceFabric.VaultCertificate","com.azure.resourcemanager.servicefabricmanagedclusters.models.VaultSecretGroup":"Microsoft.ServiceFabric.VaultSecretGroup","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmApplication":"Microsoft.ServiceFabric.VmApplication","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmImagePlan":"Microsoft.ServiceFabric.VmImagePlan","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmManagedIdentity":"Microsoft.ServiceFabric.VmManagedIdentity","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmSetupAction":"Microsoft.ServiceFabric.VmSetupAction","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssDataDisk":"Microsoft.ServiceFabric.VmssDataDisk","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtension":"Microsoft.ServiceFabric.VMSSExtension","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtensionSetupOrder":"Microsoft.ServiceFabric.VmssExtensionSetupOrder","com.azure.resourcemanager.servicefabricmanagedclusters.models.ZonalUpdateMode":"Microsoft.ServiceFabric.ZonalUpdateMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.ZoneFaultSimulationContent":"Microsoft.ServiceFabric.ZoneFaultSimulationContent"},"generatedFiles":["src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/ServiceFabricManagedClustersManager.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationTypeVersionsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationTypesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedApplyMaintenanceWindowsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedAzResiliencyStatusesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClusterVersionsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedMaintenanceWindowStatusesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedUnsupportedVMSizesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypeSkusClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServiceFabricManagedClustersMgmtClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServicesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationResourceInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationResourceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeResourceInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeResourceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeVersionResourceInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeVersionResourceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/FaultSimulationInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedAzResiliencyStatusInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterCodeVersionResultInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterVersionDetails.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedMaintenanceWindowStatusInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedVMSizeInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/NodeTypeAvailableSkuInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/NodeTypeInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/NodeTypeProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/OperationResultInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ServiceResourceInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/VMSSExtensionProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/package-info.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationResourceImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeResourceImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionResourceImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/FaultSimulationImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedApplyMaintenanceWindowsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedApplyMaintenanceWindowsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterCodeVersionResultImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterVersionsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedUnsupportedVMSizesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedUnsupportedVMSizesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedVMSizeImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeAvailableSkuImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeSkusClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeSkusImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationResultImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientBuilder.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceResourceImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationResourceList.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationTypeResourceList.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationTypeVersionResourceList.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/FaultSimulationListResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ManagedClusterListResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ManagedVMSizesResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/NodeTypeListResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/NodeTypeListSkuResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ServiceResourceList.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/package-info.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Access.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AddRemoveIncrementalNamedPartitionScalingMechanism.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AdditionalNetworkInterfaceConfiguration.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResource.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeResource.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionResource.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersions.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionsCleanupPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypes.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpgradePolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Applications.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AutoGeneratedDomainNameLabelScope.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AvailableOperationDisplay.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AveragePartitionLoadScalingTrigger.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AverageServiceLoadScalingTrigger.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AzureActiveDirectory.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClientCertificate.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterMonitoringPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterState.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeCadence.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeDeltaHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradePolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Direction.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/DiskType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/EndpointRangeDescription.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/EvictionPolicyType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FailureAction.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulation.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationConstraints.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationContent.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationContentWrapper.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationDetails.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationIdContent.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FrontendConfiguration.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpAddressType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpConfiguration.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpConfigurationPublicIpAddressConfiguration.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpTag.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/LoadBalancingRule.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedApplyMaintenanceWindows.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedAzResiliencyStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedAzResiliencyStatuses.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedCluster.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterAddOnFeature.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterCodeVersionResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterVersionEnvironment.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterVersions.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedIdentity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedIdentityType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedMaintenanceWindowStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedMaintenanceWindowStatuses.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedUnsupportedVMSizes.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedVMSize.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/MoveCost.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NamedPartitionScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NetworkSecurityRule.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeActionParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeAvailableSku.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeFaultSimulation.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeNatConfig.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSku.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkuCapacity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkuScaleType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSupportedSku.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypes.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NsgProtocol.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Operations.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OsType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Partition.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PartitionInstanceCountScaleMechanism.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PartitionScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateEndpointNetworkPolicies.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateIpAddressVersion.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateLinkServiceNetworkPolicies.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ProbeProtocol.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Protocol.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PublicIpAddressVersion.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ResourceAzStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMonitoringPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeResumeApplicationUpgradeParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingMechanism.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingTrigger.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SecurityEncryptionType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SecurityType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceCorrelation.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceCorrelationScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceEndpoint.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceLoadMetric.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceLoadMetricWeight.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePackageActivationMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementInvalidDomainPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementNonPartiallyPlaceServicePolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPolicyType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPreferPrimaryDomainPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementRequireDomainDistributionPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementRequiredDomainPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResource.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourcePropertiesBase.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceScalingMechanismKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceScalingTriggerKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceTypeHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Services.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SettingsParameterDescription.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SettingsSectionDescription.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SfmcOperationStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SingletonPartitionScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Sku.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SkuName.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/StatefulServiceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/StatelessServiceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Subnet.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UniformInt64RangePartitionScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UpdateType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VMSize.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VaultCertificate.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VaultSecretGroup.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmApplication.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmImagePlan.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmManagedIdentity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmSetupAction.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssDataDisk.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssExtension.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssExtensionSetupOrder.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ZonalUpdateMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ZoneFaultSimulationContent.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/package-info.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersion":"2025-10-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient":"Microsoft.ServiceFabric.ApplicationTypeVersions","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.ApplicationTypeVersions.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.beginDelete":"Microsoft.ServiceFabric.ApplicationTypeVersions.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.createOrUpdate":"Microsoft.ServiceFabric.ApplicationTypeVersions.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.delete":"Microsoft.ServiceFabric.ApplicationTypeVersions.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.get":"Microsoft.ServiceFabric.ApplicationTypeVersions.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.getWithResponse":"Microsoft.ServiceFabric.ApplicationTypeVersions.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.listByApplicationTypes":"Microsoft.ServiceFabric.ApplicationTypeVersions.listByApplicationTypes","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.update":"Microsoft.ServiceFabric.ApplicationTypeVersions.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.updateWithResponse":"Microsoft.ServiceFabric.ApplicationTypeVersions.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient":"Microsoft.ServiceFabric.ApplicationTypes","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.beginDelete":"Microsoft.ServiceFabric.ApplicationTypes.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.createOrUpdate":"Microsoft.ServiceFabric.ApplicationTypes.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.createOrUpdateWithResponse":"Microsoft.ServiceFabric.ApplicationTypes.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.delete":"Microsoft.ServiceFabric.ApplicationTypes.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.get":"Microsoft.ServiceFabric.ApplicationTypes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.getWithResponse":"Microsoft.ServiceFabric.ApplicationTypes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.list":"Microsoft.ServiceFabric.ApplicationTypes.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.update":"Microsoft.ServiceFabric.ApplicationTypes.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.updateWithResponse":"Microsoft.ServiceFabric.ApplicationTypes.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient":"Microsoft.ServiceFabric.Applications","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.Applications.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginDelete":"Microsoft.ServiceFabric.Applications.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginFetchHealth":"Microsoft.ServiceFabric.Applications.fetchHealth","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginReadUpgrade":"Microsoft.ServiceFabric.Applications.readUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginRestartDeployedCodePackage":"Microsoft.ServiceFabric.Applications.restartDeployedCodePackage","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginResumeUpgrade":"Microsoft.ServiceFabric.Applications.resumeUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginStartRollback":"Microsoft.ServiceFabric.Applications.startRollback","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginUpdate":"Microsoft.ServiceFabric.Applications.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginUpdateUpgrade":"Microsoft.ServiceFabric.Applications.updateUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.createOrUpdate":"Microsoft.ServiceFabric.Applications.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.delete":"Microsoft.ServiceFabric.Applications.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.fetchHealth":"Microsoft.ServiceFabric.Applications.fetchHealth","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.get":"Microsoft.ServiceFabric.Applications.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.getWithResponse":"Microsoft.ServiceFabric.Applications.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.list":"Microsoft.ServiceFabric.Applications.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.readUpgrade":"Microsoft.ServiceFabric.Applications.readUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.restartDeployedCodePackage":"Microsoft.ServiceFabric.Applications.restartDeployedCodePackage","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.resumeUpgrade":"Microsoft.ServiceFabric.Applications.resumeUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.startRollback":"Microsoft.ServiceFabric.Applications.startRollback","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.update":"Microsoft.ServiceFabric.Applications.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.updateUpgrade":"Microsoft.ServiceFabric.Applications.updateUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient":"Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient.post":"Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient.postWithResponse":"Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedAzResiliencyStatusesClient":"Microsoft.ServiceFabric.ManagedAzResiliencyStatus","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedAzResiliencyStatusesClient.get":"Microsoft.ServiceFabric.ManagedAzResiliencyStatus.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedAzResiliencyStatusesClient.getWithResponse":"Microsoft.ServiceFabric.ManagedAzResiliencyStatus.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient":"Microsoft.ServiceFabric.ManagedClusterVersion","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.get":"Microsoft.ServiceFabric.ManagedClusterVersion.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.getByEnvironment":"Microsoft.ServiceFabric.ManagedClusterVersion.getByEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.getByEnvironmentWithResponse":"Microsoft.ServiceFabric.ManagedClusterVersion.getByEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.getWithResponse":"Microsoft.ServiceFabric.ManagedClusterVersion.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.list":"Microsoft.ServiceFabric.ManagedClusterVersion.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.listByEnvironment":"Microsoft.ServiceFabric.ManagedClusterVersion.listByEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.listByEnvironmentWithResponse":"Microsoft.ServiceFabric.ManagedClusterVersion.listByEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.listWithResponse":"Microsoft.ServiceFabric.ManagedClusterVersion.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient":"Microsoft.ServiceFabric.ManagedClusters","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.ManagedClusters.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginDelete":"Microsoft.ServiceFabric.ManagedClusters.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginStartFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginStopFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginUpdate":"Microsoft.ServiceFabric.ManagedClusters.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.createOrUpdate":"Microsoft.ServiceFabric.ManagedClusters.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.delete":"Microsoft.ServiceFabric.ManagedClusters.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getByResourceGroup":"Microsoft.ServiceFabric.ManagedClusters.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getByResourceGroupWithResponse":"Microsoft.ServiceFabric.ManagedClusters.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.getFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getFaultSimulationWithResponse":"Microsoft.ServiceFabric.ManagedClusters.getFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.list":"Microsoft.ServiceFabric.ManagedClusters.listBySubscription","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.listByResourceGroup":"Microsoft.ServiceFabric.ManagedClusters.listByResourceGroup","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.listFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.listFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.startFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.stopFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.update":"Microsoft.ServiceFabric.ManagedClusters.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient":"Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient.get":"Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient.getWithResponse":"Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedUnsupportedVMSizesClient":"Microsoft.ServiceFabric.ManagedUnsupportedVMSizes","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedUnsupportedVMSizesClient.get":"Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedUnsupportedVMSizesClient.getWithResponse":"Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedUnsupportedVMSizesClient.list":"Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypeSkusClient":"Microsoft.ServiceFabric.NodeTypeSkus","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypeSkusClient.list":"Microsoft.ServiceFabric.NodeTypeSkus.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient":"Microsoft.ServiceFabric.NodeTypes","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.NodeTypes.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginDeallocate":"Microsoft.ServiceFabric.NodeTypes.deallocate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginDelete":"Microsoft.ServiceFabric.NodeTypes.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginDeleteNode":"Microsoft.ServiceFabric.NodeTypes.deleteNode","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginRedeploy":"Microsoft.ServiceFabric.NodeTypes.redeploy","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginReimage":"Microsoft.ServiceFabric.NodeTypes.reimage","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginRestart":"Microsoft.ServiceFabric.NodeTypes.restart","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginStart":"Microsoft.ServiceFabric.NodeTypes.start","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginStartFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.startFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginStopFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.stopFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginUpdate":"Microsoft.ServiceFabric.NodeTypes.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.createOrUpdate":"Microsoft.ServiceFabric.NodeTypes.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.deallocate":"Microsoft.ServiceFabric.NodeTypes.deallocate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.delete":"Microsoft.ServiceFabric.NodeTypes.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.deleteNode":"Microsoft.ServiceFabric.NodeTypes.deleteNode","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.get":"Microsoft.ServiceFabric.NodeTypes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.getFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.getFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.getFaultSimulationWithResponse":"Microsoft.ServiceFabric.NodeTypes.getFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.getWithResponse":"Microsoft.ServiceFabric.NodeTypes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.listByManagedClusters":"Microsoft.ServiceFabric.NodeTypes.listByManagedClusters","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.listFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.listFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.redeploy":"Microsoft.ServiceFabric.NodeTypes.redeploy","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.reimage":"Microsoft.ServiceFabric.NodeTypes.reimage","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.restart":"Microsoft.ServiceFabric.NodeTypes.restart","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.start":"Microsoft.ServiceFabric.NodeTypes.start","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.startFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.startFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.stopFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.stopFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.update":"Microsoft.ServiceFabric.NodeTypes.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.OperationsClient":"Microsoft.ServiceFabric.Operations","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.OperationsClient.list":"Microsoft.ServiceFabric.Operations.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServiceFabricManagedClustersMgmtClient":"Microsoft.ServiceFabric","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient":"Microsoft.ServiceFabric.Services","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.Services.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.beginDelete":"Microsoft.ServiceFabric.Services.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.beginRestartReplica":"Microsoft.ServiceFabric.Services.restartReplica","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.createOrUpdate":"Microsoft.ServiceFabric.Services.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.delete":"Microsoft.ServiceFabric.Services.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.get":"Microsoft.ServiceFabric.Services.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.getWithResponse":"Microsoft.ServiceFabric.Services.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.listByApplications":"Microsoft.ServiceFabric.Services.listByApplications","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.restartReplica":"Microsoft.ServiceFabric.Services.restartReplica","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.update":"Microsoft.ServiceFabric.Services.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.updateWithResponse":"Microsoft.ServiceFabric.Services.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceInner":"Microsoft.ServiceFabric.ApplicationResource","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceProperties":"Microsoft.ServiceFabric.ApplicationResourceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeResourceInner":"Microsoft.ServiceFabric.ApplicationTypeResource","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeResourceProperties":"Microsoft.ServiceFabric.ApplicationTypeResourceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeVersionResourceInner":"Microsoft.ServiceFabric.ApplicationTypeVersionResource","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeVersionResourceProperties":"Microsoft.ServiceFabric.ApplicationTypeVersionResourceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.FaultSimulationInner":"Microsoft.ServiceFabric.FaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedAzResiliencyStatusInner":"Microsoft.ServiceFabric.ManagedAzResiliencyStatusContent","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterCodeVersionResultInner":"Microsoft.ServiceFabric.ManagedClusterCodeVersionResult","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterInner":"Microsoft.ServiceFabric.ManagedCluster","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterProperties":"Microsoft.ServiceFabric.ManagedClusterProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterVersionDetails":"Microsoft.ServiceFabric.ManagedClusterVersionDetails","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedMaintenanceWindowStatusInner":"Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedVMSizeInner":"Microsoft.ServiceFabric.ManagedVMSize","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeAvailableSkuInner":"Microsoft.ServiceFabric.NodeTypeAvailableSku","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeInner":"Microsoft.ServiceFabric.NodeType","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeProperties":"Microsoft.ServiceFabric.NodeTypeProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.OperationResultInner":"Microsoft.ServiceFabric.OperationResult","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ServiceResourceInner":"Microsoft.ServiceFabric.ServiceResource","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.VMSSExtensionProperties":"Microsoft.ServiceFabric.VMSSExtensionProperties","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.ServiceFabricManagedClustersMgmtClientBuilder":"Microsoft.ServiceFabric","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationResourceList":"Microsoft.ServiceFabric.ApplicationResourceList","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationTypeResourceList":"Microsoft.ServiceFabric.ApplicationTypeResourceList","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationTypeVersionResourceList":"Microsoft.ServiceFabric.ApplicationTypeVersionResourceList","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.FaultSimulationListResult":"Microsoft.ServiceFabric.FaultSimulationListResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ManagedClusterListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ManagedVMSizesResult":"Microsoft.ServiceFabric.ManagedVMSizesResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.NodeTypeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.NodeTypeListSkuResult":"Microsoft.ServiceFabric.NodeTypeListSkuResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.OperationListResult":"Microsoft.ServiceFabric.OperationListResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ServiceResourceList":"Microsoft.ServiceFabric.ServiceResourceList","com.azure.resourcemanager.servicefabricmanagedclusters.models.Access":"Microsoft.ServiceFabric.Access","com.azure.resourcemanager.servicefabricmanagedclusters.models.AddRemoveIncrementalNamedPartitionScalingMechanism":"Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism","com.azure.resourcemanager.servicefabricmanagedclusters.models.AdditionalNetworkInterfaceConfiguration":"Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest":"Microsoft.ServiceFabric.ApplicationFetchHealthRequest","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationHealthPolicy":"Microsoft.ServiceFabric.ApplicationHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeUpdateParameters":"Microsoft.ServiceFabric.ApplicationTypeUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionUpdateParameters":"Microsoft.ServiceFabric.ApplicationTypeVersionUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionsCleanupPolicy":"Microsoft.ServiceFabric.ApplicationTypeVersionsCleanupPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParameters":"Microsoft.ServiceFabric.ApplicationUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParametersProperties":"Microsoft.ServiceFabric.ApplicationUpdateParametersProperties","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpgradePolicy":"Microsoft.ServiceFabric.ApplicationUpgradePolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUserAssignedIdentity":"Microsoft.ServiceFabric.ApplicationUserAssignedIdentity","com.azure.resourcemanager.servicefabricmanagedclusters.models.AutoGeneratedDomainNameLabelScope":"Microsoft.ServiceFabric.AutoGeneratedDomainNameLabelScope","com.azure.resourcemanager.servicefabricmanagedclusters.models.AvailableOperationDisplay":"Microsoft.ServiceFabric.AvailableOperationDisplay","com.azure.resourcemanager.servicefabricmanagedclusters.models.AveragePartitionLoadScalingTrigger":"Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger","com.azure.resourcemanager.servicefabricmanagedclusters.models.AverageServiceLoadScalingTrigger":"Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger","com.azure.resourcemanager.servicefabricmanagedclusters.models.AzureActiveDirectory":"Microsoft.ServiceFabric.AzureActiveDirectory","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClientCertificate":"Microsoft.ServiceFabric.ClientCertificate","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterHealthPolicy":"Microsoft.ServiceFabric.ClusterHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterMonitoringPolicy":"Microsoft.ServiceFabric.ClusterMonitoringPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterState":"Microsoft.ServiceFabric.ClusterState","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeCadence":"Microsoft.ServiceFabric.ClusterUpgradeCadence","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeDeltaHealthPolicy":"Microsoft.ServiceFabric.ClusterUpgradeDeltaHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeMode":"Microsoft.ServiceFabric.ClusterUpgradeMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradePolicy":"Microsoft.ServiceFabric.ClusterUpgradePolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.Direction":"Microsoft.ServiceFabric.Direction","com.azure.resourcemanager.servicefabricmanagedclusters.models.DiskType":"Microsoft.ServiceFabric.DiskType","com.azure.resourcemanager.servicefabricmanagedclusters.models.EndpointRangeDescription":"Microsoft.ServiceFabric.EndpointRangeDescription","com.azure.resourcemanager.servicefabricmanagedclusters.models.EvictionPolicyType":"Microsoft.ServiceFabric.EvictionPolicyType","com.azure.resourcemanager.servicefabricmanagedclusters.models.FailureAction":"Microsoft.ServiceFabric.FailureAction","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultKind":"Microsoft.ServiceFabric.FaultKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationConstraints":"Microsoft.ServiceFabric.FaultSimulationConstraints","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContent":"Microsoft.ServiceFabric.FaultSimulationContent","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContentWrapper":"Microsoft.ServiceFabric.FaultSimulationContentWrapper","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationDetails":"Microsoft.ServiceFabric.FaultSimulationDetails","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationIdContent":"Microsoft.ServiceFabric.FaultSimulationIdContent","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationStatus":"Microsoft.ServiceFabric.FaultSimulationStatus","com.azure.resourcemanager.servicefabricmanagedclusters.models.FrontendConfiguration":"Microsoft.ServiceFabric.FrontendConfiguration","com.azure.resourcemanager.servicefabricmanagedclusters.models.HealthFilter":"Microsoft.ServiceFabric.HealthFilter","com.azure.resourcemanager.servicefabricmanagedclusters.models.IpAddressType":"Microsoft.ServiceFabric.IPAddressType","com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfiguration":"Microsoft.ServiceFabric.IpConfiguration","com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfigurationPublicIpAddressConfiguration":"Microsoft.ServiceFabric.PublicIPAddressConfiguration","com.azure.resourcemanager.servicefabricmanagedclusters.models.IpTag":"Microsoft.ServiceFabric.IpTag","com.azure.resourcemanager.servicefabricmanagedclusters.models.LoadBalancingRule":"Microsoft.ServiceFabric.LoadBalancingRule","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterAddOnFeature":"Microsoft.ServiceFabric.ManagedClusterAddOnFeature","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterUpdateParameters":"Microsoft.ServiceFabric.ManagedClusterUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterVersionEnvironment":"Microsoft.ServiceFabric.ManagedClusterVersionEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedIdentity":"Microsoft.ServiceFabric.ManagedIdentity","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedIdentityType":"Microsoft.ServiceFabric.ManagedIdentityType","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedResourceProvisioningState":"Microsoft.ServiceFabric.ManagedResourceProvisioningState","com.azure.resourcemanager.servicefabricmanagedclusters.models.MoveCost":"Microsoft.ServiceFabric.MoveCost","com.azure.resourcemanager.servicefabricmanagedclusters.models.NamedPartitionScheme":"Microsoft.ServiceFabric.NamedPartitionScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.NetworkSecurityRule":"Microsoft.ServiceFabric.NetworkSecurityRule","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters":"Microsoft.ServiceFabric.NodeTypeActionParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeFaultSimulation":"Microsoft.ServiceFabric.NodeTypeFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeNatConfig":"Microsoft.ServiceFabric.NodeTypeNatConfig","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSku":"Microsoft.ServiceFabric.NodeTypeSku","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSkuCapacity":"Microsoft.ServiceFabric.NodeTypeSkuCapacity","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSkuScaleType":"Microsoft.ServiceFabric.NodeTypeSkuScaleType","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSupportedSku":"Microsoft.ServiceFabric.NodeTypeSupportedSku","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeUpdateParameters":"Microsoft.ServiceFabric.NodeTypeUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.NsgProtocol":"Microsoft.ServiceFabric.NsgProtocol","com.azure.resourcemanager.servicefabricmanagedclusters.models.OsType":"Microsoft.ServiceFabric.OsType","com.azure.resourcemanager.servicefabricmanagedclusters.models.Partition":"Microsoft.ServiceFabric.Partition","com.azure.resourcemanager.servicefabricmanagedclusters.models.PartitionInstanceCountScaleMechanism":"Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism","com.azure.resourcemanager.servicefabricmanagedclusters.models.PartitionScheme":"Microsoft.ServiceFabric.PartitionScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateEndpointNetworkPolicies":"Microsoft.ServiceFabric.PrivateEndpointNetworkPolicies","com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateIpAddressVersion":"Microsoft.ServiceFabric.PrivateIPAddressVersion","com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateLinkServiceNetworkPolicies":"Microsoft.ServiceFabric.PrivateLinkServiceNetworkPolicies","com.azure.resourcemanager.servicefabricmanagedclusters.models.ProbeProtocol":"Microsoft.ServiceFabric.ProbeProtocol","com.azure.resourcemanager.servicefabricmanagedclusters.models.Protocol":"Microsoft.ServiceFabric.Protocol","com.azure.resourcemanager.servicefabricmanagedclusters.models.PublicIpAddressVersion":"Microsoft.ServiceFabric.PublicIPAddressVersion","com.azure.resourcemanager.servicefabricmanagedclusters.models.ResourceAzStatus":"Microsoft.ServiceFabric.ResourceAzStatus","com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartDeployedCodePackageRequest":"Microsoft.ServiceFabric.RestartDeployedCodePackageRequest","com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartKind":"Microsoft.ServiceFabric.RestartKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest":"Microsoft.ServiceFabric.RestartReplicaRequest","com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMode":"Microsoft.ServiceFabric.RollingUpgradeMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMonitoringPolicy":"Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeApplicationHealthPolicy":"Microsoft.ServiceFabric.RuntimeApplicationHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeFailureAction":"Microsoft.ServiceFabric.RuntimeFailureAction","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters":"Microsoft.ServiceFabric.RuntimeResumeApplicationUpgradeParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeMode":"Microsoft.ServiceFabric.RuntimeRollingUpgradeMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeUpdateMonitoringPolicy":"Microsoft.ServiceFabric.RuntimeRollingUpgradeUpdateMonitoringPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeServiceTypeHealthPolicy":"Microsoft.ServiceFabric.RuntimeServiceTypeHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters":"Microsoft.ServiceFabric.RuntimeUpdateApplicationUpgradeParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpgradeKind":"Microsoft.ServiceFabric.RuntimeUpgradeKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingMechanism":"Microsoft.ServiceFabric.ScalingMechanism","com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingPolicy":"Microsoft.ServiceFabric.ScalingPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingTrigger":"Microsoft.ServiceFabric.ScalingTrigger","com.azure.resourcemanager.servicefabricmanagedclusters.models.SecurityEncryptionType":"Microsoft.ServiceFabric.SecurityEncryptionType","com.azure.resourcemanager.servicefabricmanagedclusters.models.SecurityType":"Microsoft.ServiceFabric.SecurityType","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceCorrelation":"Microsoft.ServiceFabric.ServiceCorrelation","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceCorrelationScheme":"Microsoft.ServiceFabric.ServiceCorrelationScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceEndpoint":"Microsoft.ServiceFabric.ServiceEndpoint","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceKind":"Microsoft.ServiceFabric.ServiceKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceLoadMetric":"Microsoft.ServiceFabric.ServiceLoadMetric","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceLoadMetricWeight":"Microsoft.ServiceFabric.ServiceLoadMetricWeight","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePackageActivationMode":"Microsoft.ServiceFabric.ServicePackageActivationMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementInvalidDomainPolicy":"Microsoft.ServiceFabric.ServicePlacementInvalidDomainPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementNonPartiallyPlaceServicePolicy":"Microsoft.ServiceFabric.ServicePlacementNonPartiallyPlaceServicePolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementPolicy":"Microsoft.ServiceFabric.ServicePlacementPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementPolicyType":"Microsoft.ServiceFabric.ServicePlacementPolicyType","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementPreferPrimaryDomainPolicy":"Microsoft.ServiceFabric.ServicePlacementPreferPrimaryDomainPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementRequireDomainDistributionPolicy":"Microsoft.ServiceFabric.ServicePlacementRequireDomainDistributionPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementRequiredDomainPolicy":"Microsoft.ServiceFabric.ServicePlacementRequiredDomainPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResourceProperties":"Microsoft.ServiceFabric.ServiceResourceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResourcePropertiesBase":"Microsoft.ServiceFabric.ServiceResourcePropertiesBase","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceScalingMechanismKind":"Microsoft.ServiceFabric.ServiceScalingMechanismKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceScalingTriggerKind":"Microsoft.ServiceFabric.ServiceScalingTriggerKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceTypeHealthPolicy":"Microsoft.ServiceFabric.ServiceTypeHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceUpdateParameters":"Microsoft.ServiceFabric.ServiceUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.SettingsParameterDescription":"Microsoft.ServiceFabric.SettingsParameterDescription","com.azure.resourcemanager.servicefabricmanagedclusters.models.SettingsSectionDescription":"Microsoft.ServiceFabric.SettingsSectionDescription","com.azure.resourcemanager.servicefabricmanagedclusters.models.SfmcOperationStatus":"Microsoft.ServiceFabric.SfmcOperationStatus","com.azure.resourcemanager.servicefabricmanagedclusters.models.SingletonPartitionScheme":"Microsoft.ServiceFabric.SingletonPartitionScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.Sku":"Microsoft.ServiceFabric.Sku","com.azure.resourcemanager.servicefabricmanagedclusters.models.SkuName":"Microsoft.ServiceFabric.SkuName","com.azure.resourcemanager.servicefabricmanagedclusters.models.StatefulServiceProperties":"Microsoft.ServiceFabric.StatefulServiceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.models.StatelessServiceProperties":"Microsoft.ServiceFabric.StatelessServiceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.models.Subnet":"Microsoft.ServiceFabric.Subnet","com.azure.resourcemanager.servicefabricmanagedclusters.models.UniformInt64RangePartitionScheme":"Microsoft.ServiceFabric.UniformInt64RangePartitionScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.UpdateType":"Microsoft.ServiceFabric.UpdateType","com.azure.resourcemanager.servicefabricmanagedclusters.models.UserAssignedIdentity":"Microsoft.ServiceFabric.UserAssignedIdentity","com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSize":"Microsoft.ServiceFabric.VMSize","com.azure.resourcemanager.servicefabricmanagedclusters.models.VaultCertificate":"Microsoft.ServiceFabric.VaultCertificate","com.azure.resourcemanager.servicefabricmanagedclusters.models.VaultSecretGroup":"Microsoft.ServiceFabric.VaultSecretGroup","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmApplication":"Microsoft.ServiceFabric.VmApplication","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmImagePlan":"Microsoft.ServiceFabric.VmImagePlan","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmManagedIdentity":"Microsoft.ServiceFabric.VmManagedIdentity","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmSetupAction":"Microsoft.ServiceFabric.VmSetupAction","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssDataDisk":"Microsoft.ServiceFabric.VmssDataDisk","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtension":"Microsoft.ServiceFabric.VMSSExtension","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtensionSetupOrder":"Microsoft.ServiceFabric.VmssExtensionSetupOrder","com.azure.resourcemanager.servicefabricmanagedclusters.models.ZonalUpdateMode":"Microsoft.ServiceFabric.ZonalUpdateMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.ZoneFaultSimulationContent":"Microsoft.ServiceFabric.ZoneFaultSimulationContent"},"generatedFiles":["src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/ServiceFabricManagedClustersManager.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationTypeVersionsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationTypesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedApplyMaintenanceWindowsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedAzResiliencyStatusesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClusterVersionsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedMaintenanceWindowStatusesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedUnsupportedVMSizesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypeSkusClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServiceFabricManagedClustersMgmtClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServicesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationResourceInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationResourceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeResourceInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeResourceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeVersionResourceInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeVersionResourceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/FaultSimulationInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedAzResiliencyStatusInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterCodeVersionResultInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterVersionDetails.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedMaintenanceWindowStatusInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedVMSizeInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/NodeTypeAvailableSkuInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/NodeTypeInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/NodeTypeProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/OperationResultInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ServiceResourceInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/VMSSExtensionProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/package-info.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationResourceImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeResourceImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionResourceImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/FaultSimulationImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedApplyMaintenanceWindowsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedApplyMaintenanceWindowsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterCodeVersionResultImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterVersionsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedUnsupportedVMSizesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedUnsupportedVMSizesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedVMSizeImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeAvailableSkuImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeSkusClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeSkusImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationResultImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientBuilder.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceResourceImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationResourceList.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationTypeResourceList.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationTypeVersionResourceList.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/FaultSimulationListResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ManagedClusterListResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ManagedVMSizesResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/NodeTypeListResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/NodeTypeListSkuResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ServiceResourceList.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/package-info.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Access.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AddRemoveIncrementalNamedPartitionScalingMechanism.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AdditionalNetworkInterfaceConfiguration.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationFetchHealthRequest.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResource.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeResource.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionResource.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersions.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionsCleanupPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypes.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParametersProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpgradePolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Applications.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AutoGeneratedDomainNameLabelScope.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AvailableOperationDisplay.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AveragePartitionLoadScalingTrigger.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AverageServiceLoadScalingTrigger.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AzureActiveDirectory.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClientCertificate.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterMonitoringPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterState.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeCadence.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeDeltaHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradePolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Direction.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/DiskType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/EndpointRangeDescription.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/EvictionPolicyType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FailureAction.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulation.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationConstraints.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationContent.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationContentWrapper.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationDetails.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationIdContent.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FrontendConfiguration.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/HealthFilter.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpAddressType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpConfiguration.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpConfigurationPublicIpAddressConfiguration.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpTag.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/LoadBalancingRule.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedApplyMaintenanceWindows.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedAzResiliencyStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedAzResiliencyStatuses.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedCluster.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterAddOnFeature.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterCodeVersionResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterVersionEnvironment.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterVersions.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedIdentity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedIdentityType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedMaintenanceWindowStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedMaintenanceWindowStatuses.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedUnsupportedVMSizes.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedVMSize.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/MoveCost.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NamedPartitionScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NetworkSecurityRule.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeActionParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeAvailableSku.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeFaultSimulation.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeNatConfig.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSku.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkuCapacity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkuScaleType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSupportedSku.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypes.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NsgProtocol.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Operations.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OsType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Partition.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PartitionInstanceCountScaleMechanism.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PartitionScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateEndpointNetworkPolicies.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateIpAddressVersion.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateLinkServiceNetworkPolicies.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ProbeProtocol.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Protocol.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PublicIpAddressVersion.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ResourceAzStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartDeployedCodePackageRequest.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartReplicaRequest.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMonitoringPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeApplicationHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeFailureAction.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeResumeApplicationUpgradeParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeUpdateMonitoringPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeServiceTypeHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpdateApplicationUpgradeParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpgradeKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingMechanism.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingTrigger.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SecurityEncryptionType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SecurityType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceCorrelation.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceCorrelationScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceEndpoint.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceLoadMetric.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceLoadMetricWeight.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePackageActivationMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementInvalidDomainPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementNonPartiallyPlaceServicePolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPolicyType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPreferPrimaryDomainPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementRequireDomainDistributionPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementRequiredDomainPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResource.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourcePropertiesBase.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceScalingMechanismKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceScalingTriggerKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceTypeHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Services.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SettingsParameterDescription.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SettingsSectionDescription.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SfmcOperationStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SingletonPartitionScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Sku.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SkuName.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/StatefulServiceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/StatelessServiceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Subnet.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UniformInt64RangePartitionScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UpdateType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VMSize.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VaultCertificate.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VaultSecretGroup.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmApplication.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmImagePlan.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmManagedIdentity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmSetupAction.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssDataDisk.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssExtension.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssExtensionSetupOrder.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ZonalUpdateMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ZoneFaultSimulationContent.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/package-info.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateSamples.java index ecca1394e4ae..8ff0129b1815 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationTypeVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPutOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionPutOperation_example.json */ /** * Sample code: Put an application type version. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsDeleteSamples.java index 39abad1f1999..28a122530222 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationTypeVersionsDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionDeleteOperation_example.json */ /** * Sample code: Delete an application type version. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetSamples.java index 139033fb9922..21465e4a54c0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationTypeVersionsGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionGetOperation_example.json */ /** * Sample code: Get an application type version. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypeSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypeSamples.java index 8426f472339e..60c38de2b357 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypeSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypeSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationTypeVersionsListByApplicationTypeSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionListOperation_example.json */ /** * Sample code: Get a list of application type version resources. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsUpdateSamples.java index 545feab5ebb1..9bc50989ecb2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ApplicationTypeVersionsUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionPatchOperation_example.json */ /** * Sample code: Patch an application type version. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateSamples.java index 0c0488cd8362..3555f8663472 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationTypesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePutOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNamePutOperation_example.json */ /** * Sample code: Put an application type. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesDeleteSamples.java index 20902a9a25c0..cf61fc68451b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationTypesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNameDeleteOperation_example.json */ /** * Sample code: Delete an application type. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetSamples.java index 104580efd708..00e4c128726a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationTypesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNameGetOperation_example.json */ /** * Sample code: Get an application type. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListSamples.java index 0ffe80d593fd..dcb19f52d971 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationTypesListSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNameListOperation_example.json */ /** * Sample code: Get a list of application type name resources. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesUpdateSamples.java index 98293488c5a6..8a3a2f4b2048 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ApplicationTypesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNamePatchOperation_example.json */ /** * Sample code: Patch an application type. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateSamples.java index 8eb42814021b..94510f82fbd2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateSamples.java @@ -18,7 +18,7 @@ */ public final class ApplicationsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationPutOperation_example_max.json + * x-ms-original-file: 2025-10-01-preview/ApplicationPutOperation_example_max.json */ /** * Sample code: Put an application with maximum parameters. @@ -61,7 +61,7 @@ public static void putAnApplicationWithMaximumParameters( } /* - * x-ms-original-file: 2025-06-01-preview/ApplicationPutOperation_example_min.json + * x-ms-original-file: 2025-10-01-preview/ApplicationPutOperation_example_min.json */ /** * Sample code: Put an application with minimum parameters. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsDeleteSamples.java index 83607770c9b4..83ee31d2cd2a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationDeleteOperation_example.json */ /** * Sample code: Delete an application. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsFetchHealthSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsFetchHealthSamples.java new file mode 100644 index 000000000000..33bf2d00cff7 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsFetchHealthSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.HealthFilter; + +/** + * Samples for Applications FetchHealth. + */ +public final class ApplicationsFetchHealthSamples { + /* + * x-ms-original-file: 2025-10-01-preview/ApplicationActionFetchHealth_example.json + */ + /** + * Sample code: Fetch application health. + * + * @param manager Entry point to ServiceFabricManagedClustersManager. + */ + public static void fetchApplicationHealth( + com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + manager.applications() + .fetchHealth("resRg", "myCluster", "myApp", + new ApplicationFetchHealthRequest().withEventsHealthStateFilter(HealthFilter.ERROR) + .withDeployedApplicationsHealthStateFilter(HealthFilter.ERROR) + .withServicesHealthStateFilter(HealthFilter.ERROR) + .withExcludeHealthStatistics(true) + .withTimeout(30L), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetSamples.java index 071a16d6c5b3..6396f3ea0ec6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationGetOperation_example.json */ /** * Sample code: Get an application. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListSamples.java index fc592bae0827..9d3a38fe6440 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationsListSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationListOperation_example.json */ /** * Sample code: Get a list of application resources. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsReadUpgradeSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsReadUpgradeSamples.java index 3aff5325dbc5..4320a0914241 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsReadUpgradeSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsReadUpgradeSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationsReadUpgradeSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationActionGetUpgrade_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationActionGetUpgrade_example.json */ /** * Sample code: Get an application upgrade. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsRestartDeployedCodePackageSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsRestartDeployedCodePackageSamples.java new file mode 100644 index 000000000000..1abda62a915b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsRestartDeployedCodePackageSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartDeployedCodePackageRequest; + +/** + * Samples for Applications RestartDeployedCodePackage. + */ +public final class ApplicationsRestartDeployedCodePackageSamples { + /* + * x-ms-original-file: 2025-10-01-preview/ApplicationActionRestartDeployedCodePackage_example.json + */ + /** + * Sample code: Restart deployed code package. + * + * @param manager Entry point to ServiceFabricManagedClustersManager. + */ + public static void restartDeployedCodePackage( + com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + manager.applications() + .restartDeployedCodePackage("resRg", "myCluster", "myApp", + new RestartDeployedCodePackageRequest().withNodeName("nt1_0") + .withServiceManifestName("TestPkg") + .withCodePackageName("fakeTokenPlaceholder") + .withCodePackageInstanceId("fakeTokenPlaceholder") + .withServicePackageActivationId("sharedProcess"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsResumeUpgradeSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsResumeUpgradeSamples.java index 4ad470d8868d..a7cae81d0282 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsResumeUpgradeSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsResumeUpgradeSamples.java @@ -11,7 +11,7 @@ */ public final class ApplicationsResumeUpgradeSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationActionResumeUpgrade_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationActionResumeUpgrade_example.json */ /** * Sample code: Resume upgrade. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsStartRollbackSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsStartRollbackSamples.java index d04994897e06..44d6ad34fa4d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsStartRollbackSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsStartRollbackSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationsStartRollbackSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationActionStartRollback_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationActionStartRollback_example.json */ /** * Sample code: Start an application upgrade rollback. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateSamples.java index 38936195655c..08471d5af3d6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.servicefabricmanagedclusters.generated; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationResource; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParametersProperties; import java.util.HashMap; import java.util.Map; @@ -13,7 +14,7 @@ */ public final class ApplicationsUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationPatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationPatchOperation_example.json */ /** * Sample code: Patch an application. @@ -25,7 +26,11 @@ public static void patchAnApplication( ApplicationResource resource = manager.applications() .getWithResponse("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("a", "b")).apply(); + resource.update() + .withTags(mapOf("a", "b")) + .withProperties(new ApplicationUpdateParametersProperties() + .withParameters(mapOf("param1", "value1", "param2", "value2"))) + .apply(); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateUpgradeSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateUpgradeSamples.java new file mode 100644 index 000000000000..5859cd0d88f9 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateUpgradeSamples.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeApplicationHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeFailureAction; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeMode; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeUpdateMonitoringPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeServiceTypeHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpgradeKind; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Applications UpdateUpgrade. + */ +public final class ApplicationsUpdateUpgradeSamples { + /* + * x-ms-original-file: 2025-10-01-preview/ApplicationActionUpdateUpgrade_example.json + */ + /** + * Sample code: Update an application upgrade. + * + * @param manager Entry point to ServiceFabricManagedClustersManager. + */ + public static void updateAnApplicationUpgrade( + com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + manager.applications() + .updateUpgrade("resRg", "myCluster", "myApp", + new RuntimeUpdateApplicationUpgradeParameters().withName("fabric:/Voting") + .withUpgradeKind(RuntimeUpgradeKind.ROLLING) + .withApplicationHealthPolicy(new RuntimeApplicationHealthPolicy().withConsiderWarningAsError(true) + .withMaxPercentUnhealthyDeployedApplications(10) + .withDefaultServiceTypeHealthPolicy( + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(12) + .withMaxPercentUnhealthyPartitionsPerService(10) + .withMaxPercentUnhealthyReplicasPerPartition(11)) + .withServiceTypeHealthPolicyMap(mapOf("VotingWeb", + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(15) + .withMaxPercentUnhealthyPartitionsPerService(13) + .withMaxPercentUnhealthyReplicasPerPartition(14)))) + .withUpdateDescription(new RuntimeRollingUpgradeUpdateMonitoringPolicy() + .withRollingUpgradeMode(RuntimeRollingUpgradeMode.MONITORED) + .withForceRestart(true) + .withFailureAction(RuntimeFailureAction.MANUAL) + .withHealthCheckWaitDurationInMilliseconds("PT0H0M10S") + .withHealthCheckStableDurationInMilliseconds("PT1H0M0S") + .withHealthCheckRetryTimeoutInMilliseconds("PT0H15M0S") + .withUpgradeTimeoutInMilliseconds("PT2H0M0S") + .withUpgradeDomainTimeoutInMilliseconds("PT2H0M0S")), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowPostSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowPostSamples.java index c38a9bf247db..1b0d59964f25 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowPostSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowPostSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedApplyMaintenanceWindowPostSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedApplyMaintenanceWindowPost_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedApplyMaintenanceWindowPost_example.json */ /** * Sample code: Apply Maintenance Window Status. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetSamples.java index 7b2103850533..58cd85137723 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedAzResiliencyStatusesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/managedAzResiliencyStatusGet_example.json + * x-ms-original-file: 2025-10-01-preview/managedAzResiliencyStatusGet_example.json */ /** * Sample code: Az Resiliency status of Base Resources. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetByEnvironmentSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetByEnvironmentSamples.java index 56678e3fa7db..a784aaade51d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetByEnvironmentSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetByEnvironmentSamples.java @@ -11,7 +11,7 @@ */ public final class ManagedClusterVersionGetByEnvironmentSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGetByEnvironment_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterVersionGetByEnvironment_example.json */ /** * Sample code: Get cluster version by environment. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetSamples.java index 16c60261ac4e..de5b4711a22e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClusterVersionGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGet_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterVersionGet_example.json */ /** * Sample code: Get cluster version. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListByEnvironmentSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListByEnvironmentSamples.java index e5c4ccd3a608..b7296523c8ab 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListByEnvironmentSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListByEnvironmentSamples.java @@ -11,7 +11,7 @@ */ public final class ManagedClusterVersionListByEnvironmentSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionListByEnvironment.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterVersionListByEnvironment.json */ /** * Sample code: List cluster versions by environment. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListSamples.java index 353377aa1e5c..28506e081ecf 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClusterVersionListSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionList_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterVersionList_example.json */ /** * Sample code: List cluster versions. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersCreateOrUpdateSamples.java index 7dea934aa2ad..6cc3b85b1d3f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersCreateOrUpdateSamples.java @@ -39,7 +39,7 @@ */ public final class ManagedClustersCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterPutOperation_example_max.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterPutOperation_example_max.json */ /** * Sample code: Put a cluster with maximum parameters. @@ -148,7 +148,7 @@ public static void putAClusterWithMaximumParameters( } /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterPutOperation_example_min.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterPutOperation_example_min.json */ /** * Sample code: Put a cluster with minimum parameters. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersDeleteSamples.java index 9b38f36dd012..ec905caaad4d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterDeleteOperation_example.json */ /** * Sample code: Delete a cluster. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetByResourceGroupSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetByResourceGroupSamples.java index f379ca4fd7fa..9b648bc305c2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetByResourceGroupSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterGetOperation_example.json */ /** * Sample code: Get a cluster. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetFaultSimulationSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetFaultSimulationSamples.java index b4074866e621..b027a820f093 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetFaultSimulationSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetFaultSimulationSamples.java @@ -11,7 +11,7 @@ */ public final class ManagedClustersGetFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterGetFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/ManagedClusterGetFaultSimulation_example.json */ /** * Sample code: Get Managed Cluster Fault Simulation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListByResourceGroupSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListByResourceGroupSamples.java index 7d2d18a8502a..a79f996487ff 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListByResourceGroupSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterListByResourceGroupOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterListByResourceGroupOperation_example.json */ /** * Sample code: List cluster by resource group. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListFaultSimulationSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListFaultSimulationSamples.java index 460a99d19c12..ae0c318b6b73 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListFaultSimulationSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListFaultSimulationSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterListFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/ManagedClusterListFaultSimulation_example.json */ /** * Sample code: List Managed Cluster Fault Simulation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListSamples.java index 87012983694b..02de89fb0aab 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterListBySubscriptionOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterListBySubscriptionOperation_example.json */ /** * Sample code: List managed clusters. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersStartFaultSimulationSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersStartFaultSimulationSamples.java index b9b5c1873149..5c45c926e71a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersStartFaultSimulationSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersStartFaultSimulationSamples.java @@ -13,7 +13,7 @@ */ public final class ManagedClustersStartFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStartFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/ManagedClusterStartFaultSimulation_example.json */ /** * Sample code: Start Managed Cluster Fault Simulation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersStopFaultSimulationSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersStopFaultSimulationSamples.java index 033f84ffb3d1..ddeb03980014 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersStopFaultSimulationSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersStopFaultSimulationSamples.java @@ -11,7 +11,7 @@ */ public final class ManagedClustersStopFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStopFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/ManagedClusterStopFaultSimulation_example.json */ /** * Sample code: Stop Managed Cluster Fault Simulation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersUpdateSamples.java index 2146ff7b3bbc..3e4419301675 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ManagedClustersUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterPatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterPatchOperation_example.json */ /** * Sample code: Patch a managed cluster. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetSamples.java index 56c838a18491..eb1ff3f7ac35 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedMaintenanceWindowStatusesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedMaintenanceWindowStatusGet_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedMaintenanceWindowStatusGet_example.json */ /** * Sample code: Get Maintenance Window Status. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetSamples.java index 92d897540521..586382b1c0bf 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedUnsupportedVMSizesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesGet_example.json + * x-ms-original-file: 2025-10-01-preview/managedUnsupportedVMSizesGet_example.json */ /** * Sample code: Get unsupported vm sizes. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListSamples.java index dcfe7faf8731..eb66d04bcd4a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedUnsupportedVMSizesListSamples { /* - * x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesList_example.json + * x-ms-original-file: 2025-10-01-preview/managedUnsupportedVMSizesList_example.json */ /** * Sample code: List unsupported vm sizes. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListSamples.java index f2bced300184..003b56a79d03 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListSamples.java @@ -9,7 +9,7 @@ */ public final class NodeTypeSkusListSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypeSkusListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypeSkusListOperation_example.json */ /** * Sample code: List a node type SKUs. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesCreateOrUpdateSamples.java index f1678e863a57..ae5f2ef39334 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesCreateOrUpdateSamples.java @@ -37,7 +37,7 @@ */ public final class NodeTypesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationStateless_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationStateless_example.json */ /** * Sample code: Put an stateless node type with temporary disk for service fabric. @@ -72,7 +72,7 @@ public static void putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric( } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperation_example_max.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperation_example_max.json */ /** * Sample code: Put a node type with maximum parameters. @@ -188,7 +188,7 @@ public static void putANodeTypeWithMaximumParameters( } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationAutoScale_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationAutoScale_example.json */ /** * Sample code: Put a node type with auto-scale parameters. @@ -234,7 +234,7 @@ public static void putANodeTypeWithAutoScaleParameters( } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperation_example_min.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperation_example_min.json */ /** * Sample code: Put a node type with minimum parameters. @@ -258,7 +258,7 @@ public static void putANodeTypeWithMinimumParameters( } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationDedicatedHost_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationDedicatedHost_example.json */ /** * Sample code: Put node type with dedicated hosts. @@ -288,7 +288,7 @@ public static void putNodeTypeWithDedicatedHosts( } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationVmImagePlan_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationVmImagePlan_example.json */ /** * Sample code: Put node type with vm image plan. @@ -315,7 +315,7 @@ public static void putNodeTypeWithVmImagePlan( } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json */ /** * Sample code: Put node type with shared galleries custom vm image. @@ -337,7 +337,7 @@ public static void putNodeTypeWithSharedGalleriesCustomVmImage( } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationCustomImage_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationCustomImage_example.json */ /** * Sample code: Put node type with custom vm image. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeallocateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeallocateSamples.java index c9aff6ba4d09..32f89d683e6e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeallocateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeallocateSamples.java @@ -12,7 +12,7 @@ */ public final class NodeTypesDeallocateSamples { /* - * x-ms-original-file: 2025-06-01-preview/DeallocateNodes_example.json + * x-ms-original-file: 2025-10-01-preview/DeallocateNodes_example.json */ /** * Sample code: Deallocate nodes. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteNodeSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteNodeSamples.java index e50a2ab0b252..49c6023d748d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteNodeSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteNodeSamples.java @@ -12,7 +12,7 @@ */ public final class NodeTypesDeleteNodeSamples { /* - * x-ms-original-file: 2025-06-01-preview/DeleteNodes_example.json + * x-ms-original-file: 2025-10-01-preview/DeleteNodes_example.json */ /** * Sample code: Delete nodes. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteSamples.java index 16a1b1d425da..c9847021dbbc 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class NodeTypesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypeDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypeDeleteOperation_example.json */ /** * Sample code: Delete a node type. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetFaultSimulationSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetFaultSimulationSamples.java index 7585b0f95a46..6abd9ea525bd 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetFaultSimulationSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetFaultSimulationSamples.java @@ -11,7 +11,7 @@ */ public final class NodeTypesGetFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeGetFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/NodeTypeGetFaultSimulation_example.json */ /** * Sample code: Get Node Type Fault Simulation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetSamples.java index e126f636c946..6169ac9be55d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetSamples.java @@ -9,7 +9,7 @@ */ public final class NodeTypesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypeGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypeGetOperation_example.json */ /** * Sample code: Get a node type. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListByManagedClustersSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListByManagedClustersSamples.java index 92f3f69218be..76e432b80f06 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListByManagedClustersSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListByManagedClustersSamples.java @@ -9,7 +9,7 @@ */ public final class NodeTypesListByManagedClustersSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypeListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypeListOperation_example.json */ /** * Sample code: List node type of the specified managed cluster. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListFaultSimulationSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListFaultSimulationSamples.java index a5023f57e6ea..b406fe14fcbe 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListFaultSimulationSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListFaultSimulationSamples.java @@ -9,7 +9,7 @@ */ public final class NodeTypesListFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeListFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/NodeTypeListFaultSimulation_example.json */ /** * Sample code: List Node Type Fault Simulation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRedeploySamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRedeploySamples.java index 5bef17ee33f4..4bc82438e556 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRedeploySamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRedeploySamples.java @@ -13,7 +13,7 @@ */ public final class NodeTypesRedeploySamples { /* - * x-ms-original-file: 2025-06-01-preview/RedeployNodes_UD_example.json + * x-ms-original-file: 2025-10-01-preview/RedeployNodes_UD_example.json */ /** * Sample code: Redeploy all nodes by upgrade domain. @@ -29,7 +29,7 @@ public static void redeployAllNodesByUpgradeDomain( } /* - * x-ms-original-file: 2025-06-01-preview/RedeployNodes_example.json + * x-ms-original-file: 2025-10-01-preview/RedeployNodes_example.json */ /** * Sample code: Redeploy nodes. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesReimageSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesReimageSamples.java index a6354c5c7c6b..d8ef8bac081d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesReimageSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesReimageSamples.java @@ -13,7 +13,7 @@ */ public final class NodeTypesReimageSamples { /* - * x-ms-original-file: 2025-06-01-preview/ReimageNodes_example.json + * x-ms-original-file: 2025-10-01-preview/ReimageNodes_example.json */ /** * Sample code: Reimage nodes. @@ -29,7 +29,7 @@ public static void reimageNodes( } /* - * x-ms-original-file: 2025-06-01-preview/ReimageNodes_UD_example.json + * x-ms-original-file: 2025-10-01-preview/ReimageNodes_UD_example.json */ /** * Sample code: Reimage all nodes by upgrade domain. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRestartSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRestartSamples.java index 0c753307bb28..a97db8b1340b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRestartSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRestartSamples.java @@ -12,7 +12,7 @@ */ public final class NodeTypesRestartSamples { /* - * x-ms-original-file: 2025-06-01-preview/RestartNodes_example.json + * x-ms-original-file: 2025-10-01-preview/RestartNodes_example.json */ /** * Sample code: Restart nodes. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartFaultSimulationSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartFaultSimulationSamples.java index 9e7fbacb338f..b7cef1050444 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartFaultSimulationSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartFaultSimulationSamples.java @@ -13,7 +13,7 @@ */ public final class NodeTypesStartFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStartFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/NodeTypeStartFaultSimulation_example.json */ /** * Sample code: Start Node Type Fault Simulation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartSamples.java index 0e79f6094d0f..6d25e9092cf0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartSamples.java @@ -12,7 +12,7 @@ */ public final class NodeTypesStartSamples { /* - * x-ms-original-file: 2025-06-01-preview/StartNodes_example.json + * x-ms-original-file: 2025-10-01-preview/StartNodes_example.json */ /** * Sample code: Start nodes. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStopFaultSimulationSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStopFaultSimulationSamples.java index b4939cf02fb9..5f820cab29a6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStopFaultSimulationSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStopFaultSimulationSamples.java @@ -11,7 +11,7 @@ */ public final class NodeTypesStopFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStopFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/NodeTypeStopFaultSimulation_example.json */ /** * Sample code: Stop Node Type Fault Simulation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesUpdateSamples.java index d4465dbba326..eefa42b13e08 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class NodeTypesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePatchOperation_example.json */ /** * Sample code: Patch a node type. @@ -30,7 +30,7 @@ public static void patchANodeType( } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePatchOperationAutoScale_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePatchOperationAutoScale_example.json */ /** * Sample code: Patch a node type while auto-scaling. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListSamples.java index d257cbb42b69..009382b77c72 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2025-06-01-preview/OperationsList_example.json + * x-ms-original-file: 2025-10-01-preview/OperationsList_example.json */ /** * Sample code: List the operations for the provider. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateSamples.java index 5c6f83746fbd..075dca19fd70 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateSamples.java @@ -25,7 +25,7 @@ */ public final class ServicesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServicePutOperation_example_min.json + * x-ms-original-file: 2025-10-01-preview/ServicePutOperation_example_min.json */ /** * Sample code: Put a service with minimum parameters. @@ -45,7 +45,7 @@ public static void putAServiceWithMinimumParameters( } /* - * x-ms-original-file: 2025-06-01-preview/ServicePutOperation_example_max.json + * x-ms-original-file: 2025-10-01-preview/ServicePutOperation_example_max.json */ /** * Sample code: Put a service with maximum parameters. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesDeleteSamples.java index 803849fe030d..a40fcc0b6240 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ServicesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServiceDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ServiceDeleteOperation_example.json */ /** * Sample code: Delete a service. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetSamples.java index 32f57dcbba94..524f24f4f0de 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ServicesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServiceGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ServiceGetOperation_example.json */ /** * Sample code: Get a service. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsSamples.java index 761136357a5b..dbb15499d187 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsSamples.java @@ -9,7 +9,7 @@ */ public final class ServicesListByApplicationsSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServiceListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ServiceListOperation_example.json */ /** * Sample code: Get a list of service resources. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesRestartReplicaSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesRestartReplicaSamples.java new file mode 100644 index 000000000000..82fd5d29c5b9 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesRestartReplicaSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartKind; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest; +import java.util.Arrays; + +/** + * Samples for Services RestartReplica. + */ +public final class ServicesRestartReplicaSamples { + /* + * x-ms-original-file: 2025-10-01-preview/ServiceActionRestartReplica_example.json + */ + /** + * Sample code: Restart replicas. + * + * @param manager Entry point to ServiceFabricManagedClustersManager. + */ + public static void restartReplicas( + com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + manager.services() + .restartReplica("resRg", "myCluster", "myApp", "myService", + new RestartReplicaRequest().withPartitionId("00000000-0000-0000-0000-000000000000") + .withReplicaIds(Arrays.asList(123456789012345680L)) + .withRestartKind(RestartKind.SIMULTANEOUS) + .withForceRestart(false) + .withTimeout(60L), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesUpdateSamples.java index 83c3e44d9ed8..d1c733fade67 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ServicesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServicePatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ServicePatchOperation_example.json */ /** * Sample code: Patch a service. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AddRemoveIncrementalNamedPartitionScalingMechanisTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AddRemoveIncrementalNamedPartitionScalingMechanisTests.java index fce63a7b4a8d..af73ea805dd1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AddRemoveIncrementalNamedPartitionScalingMechanisTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AddRemoveIncrementalNamedPartitionScalingMechanisTests.java @@ -12,22 +12,22 @@ public final class AddRemoveIncrementalNamedPartitionScalingMechanisTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddRemoveIncrementalNamedPartitionScalingMechanism model = BinaryData.fromString( - "{\"kind\":\"AddRemoveIncrementalNamedPartition\",\"minPartitionCount\":990417532,\"maxPartitionCount\":1056372950,\"scaleIncrement\":683546621}") + "{\"kind\":\"AddRemoveIncrementalNamedPartition\",\"minPartitionCount\":983156788,\"maxPartitionCount\":1386333367,\"scaleIncrement\":452971481}") .toObject(AddRemoveIncrementalNamedPartitionScalingMechanism.class); - Assertions.assertEquals(990417532, model.minPartitionCount()); - Assertions.assertEquals(1056372950, model.maxPartitionCount()); - Assertions.assertEquals(683546621, model.scaleIncrement()); + Assertions.assertEquals(983156788, model.minPartitionCount()); + Assertions.assertEquals(1386333367, model.maxPartitionCount()); + Assertions.assertEquals(452971481, model.scaleIncrement()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AddRemoveIncrementalNamedPartitionScalingMechanism model - = new AddRemoveIncrementalNamedPartitionScalingMechanism().withMinPartitionCount(990417532) - .withMaxPartitionCount(1056372950) - .withScaleIncrement(683546621); + = new AddRemoveIncrementalNamedPartitionScalingMechanism().withMinPartitionCount(983156788) + .withMaxPartitionCount(1386333367) + .withScaleIncrement(452971481); model = BinaryData.fromObject(model).toObject(AddRemoveIncrementalNamedPartitionScalingMechanism.class); - Assertions.assertEquals(990417532, model.minPartitionCount()); - Assertions.assertEquals(1056372950, model.maxPartitionCount()); - Assertions.assertEquals(683546621, model.scaleIncrement()); + Assertions.assertEquals(983156788, model.minPartitionCount()); + Assertions.assertEquals(1386333367, model.maxPartitionCount()); + Assertions.assertEquals(452971481, model.scaleIncrement()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AdditionalNetworkInterfaceConfigurationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AdditionalNetworkInterfaceConfigurationTests.java index a8535c8e27e8..46f038e1d410 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AdditionalNetworkInterfaceConfigurationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AdditionalNetworkInterfaceConfigurationTests.java @@ -19,24 +19,25 @@ public final class AdditionalNetworkInterfaceConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AdditionalNetworkInterfaceConfiguration model = BinaryData.fromString( - "{\"name\":\"egxuvwzf\",\"enableAcceleratedNetworking\":true,\"dscpConfiguration\":{\"id\":\"ctlpdngitvgb\"},\"ipConfigurations\":[{\"name\":\"rixkwmyijejve\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"pna\"},{\"id\":\"exccbdreaxhcexd\"},{\"id\":\"vqahqkghtpwi\"},{\"id\":\"hyjsvfycx\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"oowvrv\"},{\"id\":\"gjqppy\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"on\"},{\"id\":\"yhgfipnsx\"},{\"id\":\"cwaekrrjre\"}],\"subnet\":{\"id\":\"tsgumhj\"},\"privateIPAddressVersion\":\"IPv4\",\"publicIPAddressConfiguration\":{\"name\":\"kxw\",\"ipTags\":[{\"ipTagType\":\"lbqpvuzlmvfelf\",\"tag\":\"tgp\"}],\"publicIPAddressVersion\":\"IPv4\"}},{\"name\":\"pwjxezn\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"rnjwmw\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"saz\"},{\"id\":\"joqkagfhsxt\"},{\"id\":\"ugzxnf\"},{\"id\":\"zpxdt\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"kqjjlwuenvrkp\"}],\"subnet\":{\"id\":\"aibrebqaaysjkixq\"},\"privateIPAddressVersion\":\"IPv6\",\"publicIPAddressConfiguration\":{\"name\":\"tezlwff\",\"ipTags\":[{\"ipTagType\":\"kpj\",\"tag\":\"qqmtedltmmji\"},{\"ipTagType\":\"yeozphvwauyqncy\",\"tag\":\"upkvipmdsc\"},{\"ipTagType\":\"xqupevzhf\",\"tag\":\"totxhojujb\"},{\"ipTagType\":\"pelmcuvhixbjxyf\",\"tag\":\"n\"}],\"publicIPAddressVersion\":\"IPv4\"}}]}") + "{\"name\":\"jl\",\"enableAcceleratedNetworking\":true,\"dscpConfiguration\":{\"id\":\"lwg\"},\"ipConfigurations\":[{\"name\":\"tsbwtovvtgse\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"iufxqknpir\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"ttwqmsni\"},{\"id\":\"cdm\"},{\"id\":\"r\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"ijnkrxfrdd\"},{\"id\":\"ratiz\"},{\"id\":\"onasxifto\"}],\"subnet\":{\"id\":\"zh\"},\"privateIPAddressVersion\":\"IPv6\",\"publicIPAddressConfiguration\":{\"name\":\"sgogczhonnxk\",\"ipTags\":[{\"ipTagType\":\"nyhmossxkkgthr\",\"tag\":\"gh\"},{\"ipTagType\":\"jbdhqxvc\",\"tag\":\"gf\"},{\"ipTagType\":\"pdso\",\"tag\":\"bshrnsvbuswd\"}],\"publicIPAddressVersion\":\"IPv4\"}},{\"name\":\"ybycnunvj\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"f\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"pqgik\"},{\"id\":\"irtx\"},{\"id\":\"uxzejntpsew\"},{\"id\":\"oi\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"rydxtqm\"}],\"subnet\":{\"id\":\"xorgg\"},\"privateIPAddressVersion\":\"IPv6\",\"publicIPAddressConfiguration\":{\"name\":\"aomtbghhavgrvkff\",\"ipTags\":[{\"ipTagType\":\"zh\",\"tag\":\"jbibg\"},{\"ipTagType\":\"mfxumvfcluyovw\",\"tag\":\"nbkfezzxscy\"},{\"ipTagType\":\"wzdgirujbzbo\",\"tag\":\"vzzbtdcq\"},{\"ipTagType\":\"pniyujviyl\",\"tag\":\"dshf\"}],\"publicIPAddressVersion\":\"IPv4\"}},{\"name\":\"rbgyefry\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"ojfmwnco\"},{\"id\":\"rfh\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"ymoxoftpipiwyczu\"},{\"id\":\"a\"},{\"id\":\"qjlihhyuspska\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"mfwdgzxu\"},{\"id\":\"cvpa\"},{\"id\":\"sreuzvxurisjnh\"},{\"id\":\"txifqj\"}],\"subnet\":{\"id\":\"mrhublwpc\"},\"privateIPAddressVersion\":\"IPv4\",\"publicIPAddressConfiguration\":{\"name\":\"rgjupauut\",\"ipTags\":[{\"ipTagType\":\"qhih\",\"tag\":\"jqgwzp\"}],\"publicIPAddressVersion\":\"IPv6\"}}]}") .toObject(AdditionalNetworkInterfaceConfiguration.class); - Assertions.assertEquals("egxuvwzf", model.name()); + Assertions.assertEquals("jl", model.name()); Assertions.assertTrue(model.enableAcceleratedNetworking()); - Assertions.assertEquals("ctlpdngitvgb", model.dscpConfiguration().id()); - Assertions.assertEquals("rixkwmyijejve", model.ipConfigurations().get(0).name()); - Assertions.assertEquals("pna", + Assertions.assertEquals("lwg", model.dscpConfiguration().id()); + Assertions.assertEquals("tsbwtovvtgse", model.ipConfigurations().get(0).name()); + Assertions.assertEquals("iufxqknpir", model.ipConfigurations().get(0).applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("oowvrv", + Assertions.assertEquals("ttwqmsni", model.ipConfigurations().get(0).loadBalancerBackendAddressPools().get(0).id()); - Assertions.assertEquals("on", model.ipConfigurations().get(0).loadBalancerInboundNatPools().get(0).id()); - Assertions.assertEquals("tsgumhj", model.ipConfigurations().get(0).subnet().id()); - Assertions.assertEquals(PrivateIpAddressVersion.IPV4, + Assertions.assertEquals("ijnkrxfrdd", + model.ipConfigurations().get(0).loadBalancerInboundNatPools().get(0).id()); + Assertions.assertEquals("zh", model.ipConfigurations().get(0).subnet().id()); + Assertions.assertEquals(PrivateIpAddressVersion.IPV6, model.ipConfigurations().get(0).privateIpAddressVersion()); - Assertions.assertEquals("kxw", model.ipConfigurations().get(0).publicIpAddressConfiguration().name()); - Assertions.assertEquals("lbqpvuzlmvfelf", + Assertions.assertEquals("sgogczhonnxk", model.ipConfigurations().get(0).publicIpAddressConfiguration().name()); + Assertions.assertEquals("nyhmossxkkgthr", model.ipConfigurations().get(0).publicIpAddressConfiguration().ipTags().get(0).ipTagType()); - Assertions.assertEquals("tgp", + Assertions.assertEquals("gh", model.ipConfigurations().get(0).publicIpAddressConfiguration().ipTags().get(0).tag()); Assertions.assertEquals(PublicIpAddressVersion.IPV4, model.ipConfigurations().get(0).publicIpAddressConfiguration().publicIpAddressVersion()); @@ -44,63 +45,71 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AdditionalNetworkInterfaceConfiguration model - = new AdditionalNetworkInterfaceConfiguration().withName("egxuvwzf") - .withEnableAcceleratedNetworking(true) - .withDscpConfiguration(new SubResource().withId("ctlpdngitvgb")) - .withIpConfigurations( - Arrays - .asList( - new IpConfiguration().withName("rixkwmyijejve") - .withApplicationGatewayBackendAddressPools(Arrays.asList( - new SubResource().withId("pna"), new SubResource().withId("exccbdreaxhcexd"), - new SubResource().withId("vqahqkghtpwi"), new SubResource().withId("hyjsvfycx"))) - .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource().withId("oowvrv"), - new SubResource().withId("gjqppy"))) - .withLoadBalancerInboundNatPools(Arrays.asList( - new SubResource().withId("on"), new SubResource().withId("yhgfipnsx"), - new SubResource().withId("cwaekrrjre"))) - .withSubnet(new SubResource().withId("tsgumhj")) - .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV4) - .withPublicIpAddressConfiguration(new IpConfigurationPublicIpAddressConfiguration() - .withName("kxw") - .withIpTags( - Arrays.asList(new IpTag().withIpTagType("lbqpvuzlmvfelf").withTag("tgp"))) - .withPublicIpAddressVersion(PublicIpAddressVersion.IPV4)), - new IpConfiguration().withName("pwjxezn") - .withApplicationGatewayBackendAddressPools( - Arrays.asList(new SubResource().withId("rnjwmw"))) - .withLoadBalancerBackendAddressPools(Arrays.asList( - new SubResource().withId("saz"), new SubResource().withId("joqkagfhsxt"), - new SubResource().withId("ugzxnf"), new SubResource().withId("zpxdt"))) - .withLoadBalancerInboundNatPools( - Arrays.asList(new SubResource().withId("kqjjlwuenvrkp"))) - .withSubnet(new SubResource().withId("aibrebqaaysjkixq")) - .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV6) - .withPublicIpAddressConfiguration(new IpConfigurationPublicIpAddressConfiguration() - .withName("tezlwff") - .withIpTags(Arrays.asList(new IpTag().withIpTagType("kpj").withTag("qqmtedltmmji"), - new IpTag().withIpTagType("yeozphvwauyqncy").withTag("upkvipmdsc"), - new IpTag().withIpTagType("xqupevzhf").withTag("totxhojujb"), - new IpTag().withIpTagType("pelmcuvhixbjxyf").withTag("n"))) - .withPublicIpAddressVersion(PublicIpAddressVersion.IPV4)))); + AdditionalNetworkInterfaceConfiguration model = new AdditionalNetworkInterfaceConfiguration().withName("jl") + .withEnableAcceleratedNetworking(true) + .withDscpConfiguration(new SubResource().withId("lwg")) + .withIpConfigurations(Arrays.asList( + new IpConfiguration().withName("tsbwtovvtgse") + .withApplicationGatewayBackendAddressPools(Arrays.asList(new SubResource().withId("iufxqknpir"))) + .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource().withId("ttwqmsni"), + new SubResource().withId("cdm"), new SubResource().withId("r"))) + .withLoadBalancerInboundNatPools(Arrays.asList(new SubResource().withId("ijnkrxfrdd"), + new SubResource().withId("ratiz"), new SubResource().withId("onasxifto"))) + .withSubnet(new SubResource().withId("zh")) + .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV6) + .withPublicIpAddressConfiguration( + new IpConfigurationPublicIpAddressConfiguration().withName("sgogczhonnxk") + .withIpTags(Arrays.asList(new IpTag().withIpTagType("nyhmossxkkgthr").withTag("gh"), + new IpTag().withIpTagType("jbdhqxvc").withTag("gf"), + new IpTag().withIpTagType("pdso").withTag("bshrnsvbuswd"))) + .withPublicIpAddressVersion(PublicIpAddressVersion.IPV4)), + new IpConfiguration().withName("ybycnunvj") + .withApplicationGatewayBackendAddressPools(Arrays.asList(new SubResource().withId("f"))) + .withLoadBalancerBackendAddressPools( + Arrays.asList(new SubResource().withId("pqgik"), new SubResource().withId("irtx"), + new SubResource().withId("uxzejntpsew"), new SubResource().withId("oi"))) + .withLoadBalancerInboundNatPools(Arrays.asList(new SubResource().withId("rydxtqm"))) + .withSubnet(new SubResource().withId("xorgg")) + .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV6) + .withPublicIpAddressConfiguration( + new IpConfigurationPublicIpAddressConfiguration().withName("aomtbghhavgrvkff") + .withIpTags(Arrays.asList(new IpTag().withIpTagType("zh").withTag("jbibg"), + new IpTag().withIpTagType("mfxumvfcluyovw").withTag("nbkfezzxscy"), + new IpTag().withIpTagType("wzdgirujbzbo").withTag("vzzbtdcq"), + new IpTag().withIpTagType("pniyujviyl").withTag("dshf"))) + .withPublicIpAddressVersion(PublicIpAddressVersion.IPV4)), + new IpConfiguration().withName("rbgyefry") + .withApplicationGatewayBackendAddressPools( + Arrays.asList(new SubResource().withId("ojfmwnco"), new SubResource().withId("rfh"))) + .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource().withId("ymoxoftpipiwyczu"), + new SubResource().withId("a"), new SubResource().withId("qjlihhyuspska"))) + .withLoadBalancerInboundNatPools( + Arrays.asList(new SubResource().withId("mfwdgzxu"), new SubResource().withId("cvpa"), + new SubResource().withId("sreuzvxurisjnh"), new SubResource().withId("txifqj"))) + .withSubnet(new SubResource().withId("mrhublwpc")) + .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV4) + .withPublicIpAddressConfiguration( + new IpConfigurationPublicIpAddressConfiguration().withName("rgjupauut") + .withIpTags(Arrays.asList(new IpTag().withIpTagType("qhih").withTag("jqgwzp"))) + .withPublicIpAddressVersion(PublicIpAddressVersion.IPV6)))); model = BinaryData.fromObject(model).toObject(AdditionalNetworkInterfaceConfiguration.class); - Assertions.assertEquals("egxuvwzf", model.name()); + Assertions.assertEquals("jl", model.name()); Assertions.assertTrue(model.enableAcceleratedNetworking()); - Assertions.assertEquals("ctlpdngitvgb", model.dscpConfiguration().id()); - Assertions.assertEquals("rixkwmyijejve", model.ipConfigurations().get(0).name()); - Assertions.assertEquals("pna", + Assertions.assertEquals("lwg", model.dscpConfiguration().id()); + Assertions.assertEquals("tsbwtovvtgse", model.ipConfigurations().get(0).name()); + Assertions.assertEquals("iufxqknpir", model.ipConfigurations().get(0).applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("oowvrv", + Assertions.assertEquals("ttwqmsni", model.ipConfigurations().get(0).loadBalancerBackendAddressPools().get(0).id()); - Assertions.assertEquals("on", model.ipConfigurations().get(0).loadBalancerInboundNatPools().get(0).id()); - Assertions.assertEquals("tsgumhj", model.ipConfigurations().get(0).subnet().id()); - Assertions.assertEquals(PrivateIpAddressVersion.IPV4, + Assertions.assertEquals("ijnkrxfrdd", + model.ipConfigurations().get(0).loadBalancerInboundNatPools().get(0).id()); + Assertions.assertEquals("zh", model.ipConfigurations().get(0).subnet().id()); + Assertions.assertEquals(PrivateIpAddressVersion.IPV6, model.ipConfigurations().get(0).privateIpAddressVersion()); - Assertions.assertEquals("kxw", model.ipConfigurations().get(0).publicIpAddressConfiguration().name()); - Assertions.assertEquals("lbqpvuzlmvfelf", + Assertions.assertEquals("sgogczhonnxk", model.ipConfigurations().get(0).publicIpAddressConfiguration().name()); + Assertions.assertEquals("nyhmossxkkgthr", model.ipConfigurations().get(0).publicIpAddressConfiguration().ipTags().get(0).ipTagType()); - Assertions.assertEquals("tgp", + Assertions.assertEquals("gh", model.ipConfigurations().get(0).publicIpAddressConfiguration().ipTags().get(0).tag()); Assertions.assertEquals(PublicIpAddressVersion.IPV4, model.ipConfigurations().get(0).publicIpAddressConfiguration().publicIpAddressVersion()); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationFetchHealthRequestTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationFetchHealthRequestTests.java new file mode 100644 index 000000000000..018e81ac582f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationFetchHealthRequestTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.HealthFilter; +import org.junit.jupiter.api.Assertions; + +public final class ApplicationFetchHealthRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ApplicationFetchHealthRequest model = BinaryData.fromString( + "{\"eventsHealthStateFilter\":\"All\",\"deployedApplicationsHealthStateFilter\":\"Error\",\"servicesHealthStateFilter\":\"Warning\",\"excludeHealthStatistics\":false,\"timeout\":6902616970691402171}") + .toObject(ApplicationFetchHealthRequest.class); + Assertions.assertEquals(HealthFilter.ALL, model.eventsHealthStateFilter()); + Assertions.assertEquals(HealthFilter.ERROR, model.deployedApplicationsHealthStateFilter()); + Assertions.assertEquals(HealthFilter.WARNING, model.servicesHealthStateFilter()); + Assertions.assertFalse(model.excludeHealthStatistics()); + Assertions.assertEquals(6902616970691402171L, model.timeout()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ApplicationFetchHealthRequest model + = new ApplicationFetchHealthRequest().withEventsHealthStateFilter(HealthFilter.ALL) + .withDeployedApplicationsHealthStateFilter(HealthFilter.ERROR) + .withServicesHealthStateFilter(HealthFilter.WARNING) + .withExcludeHealthStatistics(false) + .withTimeout(6902616970691402171L); + model = BinaryData.fromObject(model).toObject(ApplicationFetchHealthRequest.class); + Assertions.assertEquals(HealthFilter.ALL, model.eventsHealthStateFilter()); + Assertions.assertEquals(HealthFilter.ERROR, model.deployedApplicationsHealthStateFilter()); + Assertions.assertEquals(HealthFilter.WARNING, model.servicesHealthStateFilter()); + Assertions.assertFalse(model.excludeHealthStatistics()); + Assertions.assertEquals(6902616970691402171L, model.timeout()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourceListTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourceListTests.java index e3902e8a33ac..25ec0ec408ef 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourceListTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourceListTests.java @@ -15,82 +15,82 @@ public final class ApplicationResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"managedIdentities\":[{\"name\":\"mocpc\",\"principalId\":\"shurzafbljjgpbto\"}],\"provisioningState\":\"jmkljavbqidtqajz\",\"version\":\"l\",\"parameters\":{\"rlkhbzhfepgzgq\":\"dj\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":1678385538,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1054800376,\"maxPercentUnhealthyPartitionsPerService\":1323879070,\"maxPercentUnhealthyReplicasPerPartition\":149734817},\"serviceTypeHealthPolicyMap\":{\"hhbcsglummajtjao\":{\"maxPercentUnhealthyServices\":1853852705,\"maxPercentUnhealthyPartitionsPerService\":812550328,\"maxPercentUnhealthyReplicasPerPartition\":1450066184},\"nbdxk\":{\"maxPercentUnhealthyServices\":1291201271,\"maxPercentUnhealthyPartitionsPerService\":1555681942,\"maxPercentUnhealthyReplicasPerPartition\":2016183317}}},\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"ajionpimexgstxg\",\"healthCheckStableDuration\":\"po\",\"healthCheckRetryTimeout\":\"gmaajrm\",\"upgradeTimeout\":\"djwzrlov\",\"upgradeDomainTimeout\":\"clwhijcoejctbz\"},\"instanceCloseDelayDuration\":93842203637959361,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":4015230803094049478,\"recreateApplication\":true}},\"tags\":{\"c\":\"ukdkexxppofmxa\",\"toc\":\"jpgd\",\"hvpmoue\":\"j\"},\"identity\":{\"principalId\":\"zxibqeoj\",\"tenantId\":\"qbzvddntwnd\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"qkwpyeicxmqc\":{\"principalId\":\"npzaoq\",\"clientId\":\"hrhcffcyddglmjth\"},\"joghmewuama\":{\"principalId\":\"q\",\"clientId\":\"khixuigdtopbo\"},\"iotkftutqxl\":{\"principalId\":\"rzayv\",\"clientId\":\"pgvdf\"},\"tthzrvqd\":{\"principalId\":\"xlefgugnxkrx\",\"clientId\":\"mi\"}}},\"location\":\"bhj\",\"id\":\"igeho\",\"name\":\"fbowskanyk\",\"type\":\"zlcuiywgqywgndrv\"},{\"properties\":{\"managedIdentities\":[{\"name\":\"gpphrcgyn\",\"principalId\":\"ocpecfvmmco\"},{\"name\":\"fsxlzevgbmqjqa\",\"principalId\":\"c\"},{\"name\":\"pmivkwlzu\",\"principalId\":\"ccfwnfnbacfion\"},{\"name\":\"ebxetqgtzxdp\",\"principalId\":\"qbqqwxr\"}],\"provisioningState\":\"eallnwsubisnj\",\"version\":\"pmng\",\"parameters\":{\"aqw\":\"c\",\"xnj\":\"ochcbonqvpkvl\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":1797788548,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1902616098,\"maxPercentUnhealthyPartitionsPerService\":495940499,\"maxPercentUnhealthyReplicasPerPartition\":1864604101},\"serviceTypeHealthPolicyMap\":{\"yyien\":{\"maxPercentUnhealthyServices\":248230839,\"maxPercentUnhealthyPartitionsPerService\":1111118193,\"maxPercentUnhealthyReplicasPerPartition\":762343473},\"wtgrhpdjpj\":{\"maxPercentUnhealthyServices\":1285754335,\"maxPercentUnhealthyPartitionsPerService\":290307035,\"maxPercentUnhealthyReplicasPerPartition\":147839675}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"azjpqyegualhbxxh\",\"healthCheckStableDuration\":\"jj\",\"healthCheckRetryTimeout\":\"zvdudgwdslfhotwm\",\"upgradeTimeout\":\"ynpwlbj\",\"upgradeDomainTimeout\":\"pgacftadehxnlty\"},\"instanceCloseDelayDuration\":3166263548175677909,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":5708772881134087692,\"recreateApplication\":false}},\"tags\":{\"xzdmohctb\":\"dejbavo\"},\"identity\":{\"principalId\":\"dwxdndnv\",\"tenantId\":\"gujjugwdkcglh\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"kh\":{\"principalId\":\"yggdtjixh\",\"clientId\":\"uofqwe\"},\"cibvyvdcsitynn\":{\"principalId\":\"n\",\"clientId\":\"fyexfwhy\"},\"c\":{\"principalId\":\"mdectehfiqscjey\",\"clientId\":\"hezrkgq\"}}},\"location\":\"efovgmk\",\"id\":\"leyyvx\",\"name\":\"qjpkcattpngjcrc\",\"type\":\"zsqpjhvmdajvny\"}],\"nextLink\":\"unqecanoae\"}") + "{\"value\":[{\"properties\":{\"managedIdentities\":[{\"name\":\"yulpkudjkr\",\"principalId\":\"khbzhfepgzg\"},{\"name\":\"e\",\"principalId\":\"zloc\"}],\"provisioningState\":\"c\",\"version\":\"ierhhbcsglummaj\",\"parameters\":{\"jionpimexgstxgc\":\"odxobnbdxkqpxok\",\"lovmclwhijcoe\":\"odgmaajrmvdjwz\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":1252918399,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1083194269,\"maxPercentUnhealthyPartitionsPerService\":21849341,\"maxPercentUnhealthyReplicasPerPartition\":751291073},\"serviceTypeHealthPolicyMap\":{\"bfkgukdkex\":{\"maxPercentUnhealthyServices\":1712979680,\"maxPercentUnhealthyPartitionsPerService\":934868772,\"maxPercentUnhealthyReplicasPerPartition\":1302368966}}},\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"mxaxc\",\"healthCheckStableDuration\":\"jpgd\",\"healthCheckRetryTimeout\":\"toc\",\"upgradeTimeout\":\"j\",\"upgradeDomainTimeout\":\"hvpmoue\"},\"instanceCloseDelayDuration\":8357781437020373583,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":7433658867107362465,\"recreateApplication\":true}},\"tags\":{\"icbtwnpzao\":\"qbzvddntwnd\",\"jthjqkwpyei\":\"vuhrhcffcyddgl\",\"q\":\"xmqci\"},\"identity\":{\"principalId\":\"hix\",\"tenantId\":\"gdtopbobjogh\",\"type\":\"None\",\"userAssignedIdentities\":{\"t\":{\"principalId\":\"a\",\"clientId\":\"rzayv\"}}},\"location\":\"vdfgiotk\",\"id\":\"utqxlngx\",\"name\":\"efgugnxk\",\"type\":\"xdqmidtthzrvqdra\"},{\"properties\":{\"managedIdentities\":[{\"name\":\"big\",\"principalId\":\"h\"}],\"provisioningState\":\"fbowskanyk\",\"version\":\"lcuiywgqywgndr\",\"parameters\":{\"fvm\":\"hzgpphrcgyncocpe\",\"bmqj\":\"coofsxlzev\",\"lzu\":\"abcypmivk\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":1916526415,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1023174750,\"maxPercentUnhealthyPartitionsPerService\":1351999022,\"maxPercentUnhealthyReplicasPerPartition\":1347818370},\"serviceTypeHealthPolicyMap\":{\"nlebxetqgtzxd\":{\"maxPercentUnhealthyServices\":1187016173,\"maxPercentUnhealthyPartitionsPerService\":1241894222,\"maxPercentUnhealthyReplicasPerPartition\":2055969856},\"qqwx\":{\"maxPercentUnhealthyServices\":1901976575,\"maxPercentUnhealthyPartitionsPerService\":1698686419,\"maxPercentUnhealthyReplicasPerPartition\":1802954017}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"llnwsubi\",\"healthCheckStableDuration\":\"njampm\",\"healthCheckRetryTimeout\":\"gnzscxaqwo\",\"upgradeTimeout\":\"chcbonqvpkvlrxnj\",\"upgradeDomainTimeout\":\"ase\"},\"instanceCloseDelayDuration\":8171673918249071507,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":1066143336474759537,\"recreateApplication\":false}},\"tags\":{\"jp\":\"enjbdlwtgrhp\",\"e\":\"umasxazjpq\",\"zvdudgwdslfhotwm\":\"ualhbxxhejj\"},\"identity\":{\"principalId\":\"pwlbjnpg\",\"tenantId\":\"ftadehxnltyfs\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"xzdmohctb\":{\"principalId\":\"esnzwde\",\"clientId\":\"avo\"},\"zj\":{\"principalId\":\"udwxdndnvowguj\",\"clientId\":\"gwdkcglhsl\"}}},\"location\":\"ggd\",\"id\":\"ixhbkuofqweykhm\",\"name\":\"n\",\"type\":\"vfyexfw\"},{\"properties\":{\"managedIdentities\":[{\"name\":\"i\",\"principalId\":\"vyvdcs\"},{\"name\":\"tynnaamdectehfi\",\"principalId\":\"scjeypv\"},{\"name\":\"ezrkgqhcjrefo\",\"principalId\":\"gm\"},{\"name\":\"qsl\",\"principalId\":\"yyvxyqjpkcattpn\"}],\"provisioningState\":\"cr\",\"version\":\"zsqpjhvmdajvny\",\"parameters\":{\"hy\":\"nqecanoaeup\",\"cma\":\"ltrpmopj\",\"kthfui\":\"u\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":1411125802,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":2105680522,\"maxPercentUnhealthyPartitionsPerService\":397485144,\"maxPercentUnhealthyReplicasPerPartition\":1099680690},\"serviceTypeHealthPolicyMap\":{\"uozmyzydagfua\":{\"maxPercentUnhealthyServices\":1076562523,\"maxPercentUnhealthyPartitionsPerService\":2084111616,\"maxPercentUnhealthyReplicasPerPartition\":720859603},\"yiuokktwh\":{\"maxPercentUnhealthyServices\":906864290,\"maxPercentUnhealthyPartitionsPerService\":1613770943,\"maxPercentUnhealthyReplicasPerPartition\":1852056449},\"zywqsmbsu\":{\"maxPercentUnhealthyServices\":2073255975,\"maxPercentUnhealthyPartitionsPerService\":291798162,\"maxPercentUnhealthyReplicasPerPartition\":334875262},\"moryocfsfksym\":{\"maxPercentUnhealthyServices\":854764023,\"maxPercentUnhealthyPartitionsPerService\":760240945,\"maxPercentUnhealthyReplicasPerPartition\":1524544291}}},\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"kiiuxhqyudxor\",\"healthCheckStableDuration\":\"qn\",\"healthCheckRetryTimeout\":\"poczvyifqrvkdvjs\",\"upgradeTimeout\":\"lrmv\",\"upgradeDomainTimeout\":\"d\"},\"instanceCloseDelayDuration\":5974315112474207956,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":2149411154837156311,\"recreateApplication\":true}},\"tags\":{\"ruwiqzbqjvsov\":\"bczw\",\"hzdobpxjmflbvvnc\":\"yokacspkw\",\"rsa\":\"rkcciwwzjuqk\"},\"identity\":{\"principalId\":\"ku\",\"tenantId\":\"oskg\",\"type\":\"None\",\"userAssignedIdentities\":{\"v\":{\"principalId\":\"mjmvxieduugidyjr\",\"clientId\":\"byao\"},\"gz\":{\"principalId\":\"csonpclhoco\",\"clientId\":\"lkevle\"}}},\"location\":\"u\",\"id\":\"mvfaxkffeiith\",\"name\":\"vmezy\",\"type\":\"shxmzsbbzoggigrx\"},{\"properties\":{\"managedIdentities\":[{\"name\":\"vjxxjnsp\",\"principalId\":\"dptkoenkouk\"}],\"provisioningState\":\"udwtiukbl\",\"version\":\"gkpocipazyxoe\",\"parameters\":{\"npiucgygevqznty\":\"g\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":51531430,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":2033477361,\"maxPercentUnhealthyPartitionsPerService\":173387394,\"maxPercentUnhealthyReplicasPerPartition\":2078386445},\"serviceTypeHealthPolicyMap\":{\"pyd\":{\"maxPercentUnhealthyServices\":53365345,\"maxPercentUnhealthyPartitionsPerService\":1971484471,\"maxPercentUnhealthyReplicasPerPartition\":1233826604},\"xdeoejzic\":{\"maxPercentUnhealthyServices\":1342514759,\"maxPercentUnhealthyPartitionsPerService\":1305817330,\"maxPercentUnhealthyReplicasPerPartition\":1880549577},\"jttgzf\":{\"maxPercentUnhealthyServices\":1718564660,\"maxPercentUnhealthyPartitionsPerService\":746400217,\"maxPercentUnhealthyReplicasPerPartition\":764179455},\"cbkhajdeyeamdph\":{\"maxPercentUnhealthyServices\":1027327550,\"maxPercentUnhealthyPartitionsPerService\":2101457273,\"maxPercentUnhealthyReplicasPerPartition\":22083476}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"buxwgip\",\"healthCheckStableDuration\":\"honowkgshwank\",\"healthCheckRetryTimeout\":\"xzbinjeputt\",\"upgradeTimeout\":\"rywn\",\"upgradeDomainTimeout\":\"zoqftiyqzrnkcqvy\"},\"instanceCloseDelayDuration\":3429279847863801881,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":2826375712205950913,\"recreateApplication\":true}},\"tags\":{\"w\":\"qnwvlrya\"},\"identity\":{\"principalId\":\"unmmq\",\"tenantId\":\"yxzk\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ewrmjmwvvjektc\":{\"principalId\":\"oklyaxuconuq\",\"clientId\":\"fkbey\"}}},\"location\":\"enhwlrs\",\"id\":\"rzpwvlqdqgbiq\",\"name\":\"lihkaetcktvfc\",\"type\":\"vf\"}],\"nextLink\":\"kymuctqhjfbebr\"}") .toObject(ApplicationResourceList.class); - Assertions.assertEquals("ukdkexxppofmxa", model.value().get(0).tags().get("c")); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, - model.value().get(0).identity().type()); - Assertions.assertEquals("bhj", model.value().get(0).location()); - Assertions.assertEquals("mocpc", model.value().get(0).managedIdentities().get(0).name()); - Assertions.assertEquals("shurzafbljjgpbto", model.value().get(0).managedIdentities().get(0).principalId()); - Assertions.assertEquals("l", model.value().get(0).version()); - Assertions.assertEquals("dj", model.value().get(0).parameters().get("rlkhbzhfepgzgq")); - Assertions.assertFalse(model.value().get(0).upgradePolicy().applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(1678385538, + Assertions.assertEquals("qbzvddntwnd", model.value().get(0).tags().get("icbtwnpzao")); + Assertions.assertEquals(ManagedIdentityType.NONE, model.value().get(0).identity().type()); + Assertions.assertEquals("vdfgiotk", model.value().get(0).location()); + Assertions.assertEquals("yulpkudjkr", model.value().get(0).managedIdentities().get(0).name()); + Assertions.assertEquals("khbzhfepgzg", model.value().get(0).managedIdentities().get(0).principalId()); + Assertions.assertEquals("ierhhbcsglummaj", model.value().get(0).version()); + Assertions.assertEquals("odxobnbdxkqpxok", model.value().get(0).parameters().get("jionpimexgstxgc")); + Assertions.assertTrue(model.value().get(0).upgradePolicy().applicationHealthPolicy().considerWarningAsError()); + Assertions.assertEquals(1252918399, model.value().get(0).upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(1054800376, + Assertions.assertEquals(1083194269, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyServices()); - Assertions.assertEquals(1323879070, + Assertions.assertEquals(21849341, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(149734817, + Assertions.assertEquals(751291073, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(1853852705, + Assertions.assertEquals(1712979680, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("hhbcsglummajtjao") + .get("bfkgukdkex") .maxPercentUnhealthyServices()); - Assertions.assertEquals(812550328, + Assertions.assertEquals(934868772, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("hhbcsglummajtjao") + .get("bfkgukdkex") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(1450066184, + Assertions.assertEquals(1302368966, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("hhbcsglummajtjao") + .get("bfkgukdkex") .maxPercentUnhealthyReplicasPerPartition()); Assertions.assertFalse(model.value().get(0).upgradePolicy().forceRestart()); - Assertions.assertEquals(FailureAction.MANUAL, + Assertions.assertEquals(FailureAction.ROLLBACK, model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("ajionpimexgstxg", + Assertions.assertEquals("mxaxc", model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("po", + Assertions.assertEquals("jpgd", model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("gmaajrm", + Assertions.assertEquals("toc", model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("djwzrlov", + Assertions.assertEquals("j", model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("clwhijcoejctbz", + Assertions.assertEquals("hvpmoue", model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(93842203637959361L, model.value().get(0).upgradePolicy().instanceCloseDelayDuration()); + Assertions.assertEquals(8357781437020373583L, + model.value().get(0).upgradePolicy().instanceCloseDelayDuration()); Assertions.assertEquals(RollingUpgradeMode.MONITORED, model.value().get(0).upgradePolicy().upgradeMode()); - Assertions.assertEquals(4015230803094049478L, + Assertions.assertEquals(7433658867107362465L, model.value().get(0).upgradePolicy().upgradeReplicaSetCheckTimeout()); Assertions.assertTrue(model.value().get(0).upgradePolicy().recreateApplication()); - Assertions.assertEquals("unqecanoae", model.nextLink()); + Assertions.assertEquals("kymuctqhjfbebr", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceInnerTests.java index 3856cbb84dcc..54453ae5347d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceInnerTests.java @@ -14,21 +14,19 @@ public final class ApplicationTypeResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeResourceInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"kthfui\"},\"tags\":{\"yzydagfuaxbezyi\":\"dsfcpkvxodpuoz\",\"ywqsmbsurexim\":\"okktwhrdxw\",\"stkiiuxhqyud\":\"ryocfsfksymdd\",\"rq\":\"o\"},\"location\":\"poczvyifqrvkdvjs\",\"id\":\"rm\",\"name\":\"vdfwatkpn\",\"type\":\"ulexxbczwtr\"}") + "{\"properties\":{\"provisioningState\":\"xdbabphlwr\"},\"tags\":{\"azt\":\"ktsthsucocmny\"},\"location\":\"twwrqp\",\"id\":\"dckzywbiexz\",\"name\":\"eyueaxibxujwb\",\"type\":\"qwalmuzyoxaepd\"}") .toObject(ApplicationTypeResourceInner.class); - Assertions.assertEquals("dsfcpkvxodpuoz", model.tags().get("yzydagfuaxbezyi")); - Assertions.assertEquals("poczvyifqrvkdvjs", model.location()); + Assertions.assertEquals("ktsthsucocmny", model.tags().get("azt")); + Assertions.assertEquals("twwrqp", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApplicationTypeResourceInner model = new ApplicationTypeResourceInner() - .withTags(mapOf("yzydagfuaxbezyi", "dsfcpkvxodpuoz", "ywqsmbsurexim", "okktwhrdxw", "stkiiuxhqyud", - "ryocfsfksymdd", "rq", "o")) - .withLocation("poczvyifqrvkdvjs"); + ApplicationTypeResourceInner model + = new ApplicationTypeResourceInner().withTags(mapOf("azt", "ktsthsucocmny")).withLocation("twwrqp"); model = BinaryData.fromObject(model).toObject(ApplicationTypeResourceInner.class); - Assertions.assertEquals("dsfcpkvxodpuoz", model.tags().get("yzydagfuaxbezyi")); - Assertions.assertEquals("poczvyifqrvkdvjs", model.location()); + Assertions.assertEquals("ktsthsucocmny", model.tags().get("azt")); + Assertions.assertEquals("twwrqp", model.location()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceListTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceListTests.java index 455b7c1a88b4..3c2b1b047df8 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceListTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceListTests.java @@ -12,10 +12,10 @@ public final class ApplicationTypeResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"eduugi\"},\"tags\":{\"clhocohsl\":\"rrfbyaosvexcson\",\"eggzfb\":\"ev\",\"ithlvmezyvshxm\":\"hfmvfaxkffe\"},\"location\":\"bbzoggig\",\"id\":\"wburvjxxjnspydpt\",\"name\":\"oenkouknvudwti\",\"type\":\"kbldngkpocipa\"},{\"properties\":{\"provisioningState\":\"o\"},\"tags\":{\"iucgygevqzn\":\"kgjn\",\"rbpizc\":\"yp\",\"j\":\"r\",\"yhxdeoejzicwi\":\"dpydn\"},\"location\":\"jttgzf\",\"id\":\"shcbkhajdeyeamdp\",\"name\":\"agalpbuxwgipwhon\",\"type\":\"wkgshwa\"},{\"properties\":{\"provisioningState\":\"xzbinjeputt\"},\"tags\":{\"vyxlwhzlsicohoqq\":\"wnuzoqftiyqzrnkc\",\"yav\":\"wvl\"},\"location\":\"heun\",\"id\":\"qhgyxzkonocukok\",\"name\":\"yaxuconuqszfkb\",\"type\":\"ypewrmjmwvvjekt\"}],\"nextLink\":\"senhwlrs\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"kfssxqukkf\"},\"tags\":{\"xnkjzkdesl\":\"mg\",\"kdwzbaiuebbaumny\":\"vlopwiyighx\",\"txp\":\"upedeojnabckhs\"},\"location\":\"ebtfhvpesap\",\"id\":\"rdqmhjjdhtldwkyz\",\"name\":\"uutkncw\",\"type\":\"cwsvlxotog\"},{\"properties\":{\"provisioningState\":\"upqsx\"},\"tags\":{\"ykvceoveil\":\"i\",\"k\":\"vnotyfjfcnj\",\"kphywpnvjto\":\"nxdhbt\",\"plpho\":\"nermcl\"},\"location\":\"scrpabgyepsbjt\",\"id\":\"qugxywpmueefjzwf\",\"name\":\"kqujidsuyono\",\"type\":\"glaocq\"},{\"properties\":{\"provisioningState\":\"cmgyud\"},\"tags\":{\"wfudwpzntxhdzhl\":\"lmoyrx\",\"hckfrlhrx\":\"qj\"},\"location\":\"kyv\",\"id\":\"ca\",\"name\":\"uzbpzkafku\",\"type\":\"b\"}],\"nextLink\":\"nwbmeh\"}") .toObject(ApplicationTypeResourceList.class); - Assertions.assertEquals("rrfbyaosvexcson", model.value().get(0).tags().get("clhocohsl")); - Assertions.assertEquals("bbzoggig", model.value().get(0).location()); - Assertions.assertEquals("senhwlrs", model.nextLink()); + Assertions.assertEquals("mg", model.value().get(0).tags().get("xnkjzkdesl")); + Assertions.assertEquals("ebtfhvpesap", model.value().get(0).location()); + Assertions.assertEquals("nwbmeh", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourcePropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourcePropertiesTests.java index f98c403eb72b..444fea1d3db6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourcePropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourcePropertiesTests.java @@ -10,7 +10,7 @@ public final class ApplicationTypeResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ApplicationTypeResourceProperties model = BinaryData.fromString("{\"provisioningState\":\"iqzbq\"}") + ApplicationTypeResourceProperties model = BinaryData.fromString("{\"provisioningState\":\"jancu\"}") .toObject(ApplicationTypeResourceProperties.class); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeUpdateParametersTests.java index 1edd933d6bbc..2312ad1d24b4 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeUpdateParametersTests.java @@ -14,17 +14,17 @@ public final class ApplicationTypeUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"okacspk\":\"ovm\",\"jmflbvvnch\":\"lhzdobp\",\"ajiwkuo\":\"kcciwwzjuqkhr\",\"sauuimj\":\"oskg\"}}") + "{\"tags\":{\"bavxbniwdjswzt\":\"d\",\"xbzpfzab\":\"dbpgnxytxhp\",\"ovplw\":\"lcuhxwtctyqiklb\",\"gu\":\"bhvgy\"}}") .toObject(ApplicationTypeUpdateParameters.class); - Assertions.assertEquals("ovm", model.tags().get("okacspk")); + Assertions.assertEquals("d", model.tags().get("bavxbniwdjswzt")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApplicationTypeUpdateParameters model = new ApplicationTypeUpdateParameters() - .withTags(mapOf("okacspk", "ovm", "jmflbvvnch", "lhzdobp", "ajiwkuo", "kcciwwzjuqkhr", "sauuimj", "oskg")); + ApplicationTypeUpdateParameters model = new ApplicationTypeUpdateParameters().withTags( + mapOf("bavxbniwdjswzt", "d", "xbzpfzab", "dbpgnxytxhp", "ovplw", "lcuhxwtctyqiklb", "gu", "bhvgy")); model = BinaryData.fromObject(model).toObject(ApplicationTypeUpdateParameters.class); - Assertions.assertEquals("ovm", model.tags().get("okacspk")); + Assertions.assertEquals("d", model.tags().get("bavxbniwdjswzt")); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceInnerTests.java index 366e90070289..a80932e56aa7 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceInnerTests.java @@ -14,24 +14,23 @@ public final class ApplicationTypeVersionResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeVersionResourceInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"zpwv\",\"appPackageUrl\":\"qdqgbi\"},\"tags\":{\"vf\":\"ihkaetcktvfc\",\"xerf\":\"nkymuctqhjfbebrj\",\"phxepcyvahf\":\"wutttxfvjrbi\",\"gidokgjljyoxgvcl\":\"ljkyqxjvuuj\"},\"location\":\"gsncghkjeszz\",\"id\":\"ijhtxf\",\"name\":\"gx\",\"type\":\"fsm\"}") + "{\"properties\":{\"provisioningState\":\"yvjusrtslhsp\",\"appPackageUrl\":\"deemao\"},\"tags\":{\"vt\":\"ag\",\"hahvljuahaq\":\"elmqk\",\"exq\":\"hcdhmdual\",\"crgvxpvgom\":\"vfadmws\"},\"location\":\"fmisg\",\"id\":\"nbbelda\",\"name\":\"k\",\"type\":\"baliourqhakauha\"}") .toObject(ApplicationTypeVersionResourceInner.class); - Assertions.assertEquals("ihkaetcktvfc", model.tags().get("vf")); - Assertions.assertEquals("gsncghkjeszz", model.location()); - Assertions.assertEquals("qdqgbi", model.appPackageUrl()); + Assertions.assertEquals("ag", model.tags().get("vt")); + Assertions.assertEquals("fmisg", model.location()); + Assertions.assertEquals("deemao", model.appPackageUrl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationTypeVersionResourceInner model = new ApplicationTypeVersionResourceInner() - .withTags(mapOf("vf", "ihkaetcktvfc", "xerf", "nkymuctqhjfbebrj", "phxepcyvahf", "wutttxfvjrbi", - "gidokgjljyoxgvcl", "ljkyqxjvuuj")) - .withLocation("gsncghkjeszz") - .withAppPackageUrl("qdqgbi"); + .withTags(mapOf("vt", "ag", "hahvljuahaq", "elmqk", "exq", "hcdhmdual", "crgvxpvgom", "vfadmws")) + .withLocation("fmisg") + .withAppPackageUrl("deemao"); model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionResourceInner.class); - Assertions.assertEquals("ihkaetcktvfc", model.tags().get("vf")); - Assertions.assertEquals("gsncghkjeszz", model.location()); - Assertions.assertEquals("qdqgbi", model.appPackageUrl()); + Assertions.assertEquals("ag", model.tags().get("vt")); + Assertions.assertEquals("fmisg", model.location()); + Assertions.assertEquals("deemao", model.appPackageUrl()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceListTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceListTests.java index 1ae4d230577a..bd01cd535fe9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceListTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceListTests.java @@ -12,11 +12,11 @@ public final class ApplicationTypeVersionResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeVersionResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"lfbxzpuzycisp\",\"appPackageUrl\":\"qzahmgkbrp\"},\"tags\":{\"rgvtqag\":\"hibnuqqkpika\",\"bfs\":\"buynhijggm\"},\"location\":\"rbu\",\"id\":\"cvpnazzmhjrunmpx\",\"name\":\"tdbhrbnla\",\"type\":\"kx\"}],\"nextLink\":\"skpbhenbtkcxywn\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"ojgjrwjueiotwmc\",\"appPackageUrl\":\"ytdxwit\"},\"tags\":{\"hniskxfbkpyc\":\"jawgqwg\"},\"location\":\"lwn\",\"id\":\"hjdauwhvylwz\",\"name\":\"tdhxujznbmpowuwp\",\"type\":\"zqlveualupjmkhf\"}],\"nextLink\":\"bbcswsrtjri\"}") .toObject(ApplicationTypeVersionResourceList.class); - Assertions.assertEquals("hibnuqqkpika", model.value().get(0).tags().get("rgvtqag")); - Assertions.assertEquals("rbu", model.value().get(0).location()); - Assertions.assertEquals("qzahmgkbrp", model.value().get(0).appPackageUrl()); - Assertions.assertEquals("skpbhenbtkcxywn", model.nextLink()); + Assertions.assertEquals("jawgqwg", model.value().get(0).tags().get("hniskxfbkpyc")); + Assertions.assertEquals("lwn", model.value().get(0).location()); + Assertions.assertEquals("ytdxwit", model.value().get(0).appPackageUrl()); + Assertions.assertEquals("bbcswsrtjri", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourcePropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourcePropertiesTests.java index d84469b2840a..60ab7457f70c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourcePropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourcePropertiesTests.java @@ -12,16 +12,16 @@ public final class ApplicationTypeVersionResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeVersionResourceProperties model - = BinaryData.fromString("{\"provisioningState\":\"eh\",\"appPackageUrl\":\"pvecxgodeb\"}") + = BinaryData.fromString("{\"provisioningState\":\"sfwxosowzxc\",\"appPackageUrl\":\"gicjooxdjeb\"}") .toObject(ApplicationTypeVersionResourceProperties.class); - Assertions.assertEquals("pvecxgodeb", model.appPackageUrl()); + Assertions.assertEquals("gicjooxdjeb", model.appPackageUrl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationTypeVersionResourceProperties model - = new ApplicationTypeVersionResourceProperties().withAppPackageUrl("pvecxgodeb"); + = new ApplicationTypeVersionResourceProperties().withAppPackageUrl("gicjooxdjeb"); model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionResourceProperties.class); - Assertions.assertEquals("pvecxgodeb", model.appPackageUrl()); + Assertions.assertEquals("gicjooxdjeb", model.appPackageUrl()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionUpdateParametersTests.java index e1b1d6fe84b3..d49eb7ab24b4 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionUpdateParametersTests.java @@ -13,17 +13,17 @@ public final class ApplicationTypeVersionUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ApplicationTypeVersionUpdateParameters model = BinaryData.fromString("{\"tags\":{\"ukgri\":\"krbm\"}}") + ApplicationTypeVersionUpdateParameters model = BinaryData.fromString("{\"tags\":{\"ecivyh\":\"cwwfvovbvme\"}}") .toObject(ApplicationTypeVersionUpdateParameters.class); - Assertions.assertEquals("krbm", model.tags().get("ukgri")); + Assertions.assertEquals("cwwfvovbvme", model.tags().get("ecivyh")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationTypeVersionUpdateParameters model - = new ApplicationTypeVersionUpdateParameters().withTags(mapOf("ukgri", "krbm")); + = new ApplicationTypeVersionUpdateParameters().withTags(mapOf("ecivyh", "cwwfvovbvme")); model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionUpdateParameters.class); - Assertions.assertEquals("krbm", model.tags().get("ukgri")); + Assertions.assertEquals("cwwfvovbvme", model.tags().get("ecivyh")); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCleanupPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCleanupPolicyTests.java index 0ae27e0815c4..9a27cb617196 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCleanupPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCleanupPolicyTests.java @@ -11,16 +11,16 @@ public final class ApplicationTypeVersionsCleanupPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ApplicationTypeVersionsCleanupPolicy model = BinaryData.fromString("{\"maxUnusedVersionsToKeep\":1783583685}") + ApplicationTypeVersionsCleanupPolicy model = BinaryData.fromString("{\"maxUnusedVersionsToKeep\":1538408928}") .toObject(ApplicationTypeVersionsCleanupPolicy.class); - Assertions.assertEquals(1783583685, model.maxUnusedVersionsToKeep()); + Assertions.assertEquals(1538408928, model.maxUnusedVersionsToKeep()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationTypeVersionsCleanupPolicy model - = new ApplicationTypeVersionsCleanupPolicy().withMaxUnusedVersionsToKeep(1783583685); + = new ApplicationTypeVersionsCleanupPolicy().withMaxUnusedVersionsToKeep(1538408928); model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionsCleanupPolicy.class); - Assertions.assertEquals(1783583685, model.maxUnusedVersionsToKeep()); + Assertions.assertEquals(1538408928, model.maxUnusedVersionsToKeep()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateMockTests.java index 2325f03edeba..2955bf16bc4e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateMockTests.java @@ -23,7 +23,7 @@ public final class ApplicationTypeVersionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"appPackageUrl\":\"kdlpa\"},\"tags\":{\"gsftufqobrjlnacg\":\"cxfailcfxwmdboxd\",\"nrzvuljraaer\":\"ckknhxkizvy\",\"gukkjqnvbroy\":\"nok\",\"xulcdisdos\":\"a\"},\"location\":\"b\",\"id\":\"vgjrwhr\",\"name\":\"vyc\",\"type\":\"t\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"appPackageUrl\":\"wxdzaumweoohgu\"},\"tags\":{\"olbaemwmdx\":\"zboyjathwt\",\"f\":\"ebwjscjpahlxvea\",\"qcttadijaeukmrsi\":\"xnmwmqtibxyijddt\"},\"location\":\"kpn\",\"id\":\"aapm\",\"name\":\"dqmeqwigpibudq\",\"type\":\"yxeb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,16 +33,16 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationTypeVersionResource response = manager.applicationTypeVersions() - .define("g") - .withExistingApplicationType("klnsrmffey", "xcktpiymerteeamm", "qiekkkzddrt") - .withRegion("m") - .withTags(mapOf("s", "cuijpxt", "wsawddjibabxvi", "wprtu", "tfgle", "itvtzeexavo")) - .withAppPackageUrl("refdee") + .define("smkss") + .withExistingApplicationType("ppipifhpfeoa", "vgcxtx", "csheafidltugsr") + .withRegion("nkjpdnjzha") + .withTags(mapOf("hm", "biqtgdq", "lllibph", "wsldrizetpwbr", "a", "qzmiza")) + .withAppPackageUrl("egprhptil") .create(); - Assertions.assertEquals("cxfailcfxwmdboxd", response.tags().get("gsftufqobrjlnacg")); - Assertions.assertEquals("b", response.location()); - Assertions.assertEquals("kdlpa", response.appPackageUrl()); + Assertions.assertEquals("zboyjathwt", response.tags().get("olbaemwmdx")); + Assertions.assertEquals("kpn", response.location()); + Assertions.assertEquals("wxdzaumweoohgu", response.appPackageUrl()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetWithResponseMockTests.java index f8aecdb502bd..ad530c5b48d1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class ApplicationTypeVersionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"nxpmyyefrpmpdnq\",\"appPackageUrl\":\"skawaoqvmmb\"},\"tags\":{\"qlkzme\":\"fr\"},\"location\":\"itgvkx\",\"id\":\"yqdrf\",\"name\":\"gcealzxwh\",\"type\":\"ansym\"}"; + = "{\"properties\":{\"provisioningState\":\"d\",\"appPackageUrl\":\"tnsi\"},\"tags\":{\"ckdlpag\":\"hzmme\",\"xdfgsftufqobr\":\"rcxfailcfxwmdb\",\"knh\":\"lnacgcc\"},\"location\":\"izvy\",\"id\":\"rzvul\",\"name\":\"r\",\"type\":\"aeranokqgukkjqnv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationTypeVersionResource response = manager.applicationTypeVersions() - .getWithResponse("ouwivkxoyzunbixx", "ti", "vcpwpgclrc", "vtsoxf", com.azure.core.util.Context.NONE) + .getWithResponse("dmdqb", "pypqtgsfj", "cbslhhx", "db", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("fr", response.tags().get("qlkzme")); - Assertions.assertEquals("itgvkx", response.location()); - Assertions.assertEquals("skawaoqvmmb", response.appPackageUrl()); + Assertions.assertEquals("hzmme", response.tags().get("ckdlpag")); + Assertions.assertEquals("izvy", response.location()); + Assertions.assertEquals("tnsi", response.appPackageUrl()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypesMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypesMockTests.java index 24d2502207ec..e120d45ee37c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypesMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypesMockTests.java @@ -22,7 +22,7 @@ public final class ApplicationTypeVersionsListByApplicationTypesMockTests { @Test public void testListByApplicationTypes() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"kjsqzhzbezkgi\",\"appPackageUrl\":\"sidxasicdd\"},\"tags\":{\"gat\":\"jskgfmocwahp\",\"kzyb\":\"eaahhvjhhn\",\"yxkyxvx\":\"jjidjk\"},\"location\":\"blbjedn\",\"id\":\"lageuaulxun\",\"name\":\"mjbnk\",\"type\":\"pxynenlsvxeizzg\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"hryvy\",\"appPackageUrl\":\"ytdc\"},\"tags\":{\"vjdhttzaefedxih\":\"ccknfnwmbtmvp\"},\"location\":\"rphkmcrjdqnsdfz\",\"id\":\"gtgkylkdghr\",\"name\":\"euutlwxezwzh\",\"type\":\"kvbwnhhtqlgeh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testListByApplicationTypes() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ApplicationTypeVersionResource> response = manager.applicationTypeVersions() - .listByApplicationTypes("yqhlwigdivbkbx", "omfaj", "wasqvdaeyyg", com.azure.core.util.Context.NONE); + .listByApplicationTypes("roylaxxu", "cdisd", "sfjbjsvg", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jskgfmocwahp", response.iterator().next().tags().get("gat")); - Assertions.assertEquals("blbjedn", response.iterator().next().location()); - Assertions.assertEquals("sidxasicdd", response.iterator().next().appPackageUrl()); + Assertions.assertEquals("ccknfnwmbtmvp", response.iterator().next().tags().get("vjdhttzaefedxih")); + Assertions.assertEquals("rphkmcrjdqnsdfz", response.iterator().next().location()); + Assertions.assertEquals("ytdc", response.iterator().next().appPackageUrl()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateWithResponseMockTests.java index c2c323739d80..f28bded7c7ff 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class ApplicationTypesCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"dyp\"},\"tags\":{\"sqy\":\"uemsly\"},\"location\":\"foobrlttyms\",\"id\":\"ygqdnfwqzdz\",\"name\":\"tilaxh\",\"type\":\"fhqlyvi\"}"; + = "{\"properties\":{\"provisioningState\":\"nsrmffeycx\"},\"tags\":{\"mx\":\"piymerteea\",\"xv\":\"iekkkzddrtkgdojb\",\"cuijpxt\":\"vrefdeesv\"},\"location\":\"uwprtujwsawd\",\"id\":\"ibabxvititvtzeex\",\"name\":\"vo\",\"type\":\"tfgle\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,14 +33,14 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationTypeResource response = manager.applicationTypes() - .define("sdtutnwlduyc") - .withExistingManagedCluster("zflbqvg", "qvlgafcqusrdvetn") - .withRegion("uvgp") - .withTags(mapOf("xgketwz", "qgsjjxun", "mhv", "hzjhf")) + .define("kgfmocwahpq") + .withExistingManagedCluster("uxakjsqzhzbezk", "imsidxasicddyvvj") + .withRegion("kyxvxevblbjedn") + .withTags(mapOf("idjks", "zybbj")) .create(); - Assertions.assertEquals("uemsly", response.tags().get("sqy")); - Assertions.assertEquals("foobrlttyms", response.location()); + Assertions.assertEquals("piymerteea", response.tags().get("mx")); + Assertions.assertEquals("uwprtujwsawd", response.location()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetWithResponseMockTests.java index 041fac79991b..60e16e33d4b6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class ApplicationTypesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"imlnwiaaomylw\"},\"tags\":{\"l\":\"ulcsethwwnpj\"},\"location\":\"swpchwahfbousn\",\"id\":\"pgfewetwlyx\",\"name\":\"ncxykxhdjhlimm\",\"type\":\"cxfhbcporxv\"}"; + = "{\"properties\":{\"provisioningState\":\"eqsx\"},\"tags\":{\"sbhud\":\"fbuzjyihs\",\"foobrlttyms\":\"pohyuemslynsqyr\",\"nfwqzdzgtilaxhn\":\"nygq\",\"wivkxo\":\"hqlyvijo\"},\"location\":\"un\",\"id\":\"xxrtikvc\",\"name\":\"wpgclrcivt\",\"type\":\"oxfrkenxpmyyefr\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationTypeResource response = manager.applicationTypes() - .getWithResponse("wpfaj", "jwltlwtjjgu", "talhsnvkcdmxzr", com.azure.core.util.Context.NONE) + .getWithResponse("xundxgk", "twzhhzjhfjmhv", "muvgp", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ulcsethwwnpj", response.tags().get("l")); - Assertions.assertEquals("swpchwahfbousn", response.location()); + Assertions.assertEquals("fbuzjyihs", response.tags().get("sbhud")); + Assertions.assertEquals("un", response.location()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListMockTests.java index 77298087d003..b0e4fd20683c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListMockTests.java @@ -22,7 +22,7 @@ public final class ApplicationTypesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"juhdqazkmtgguwpi\"},\"tags\":{\"f\":\"jcivmmg\"},\"location\":\"iwrxgkn\",\"id\":\"vyi\",\"name\":\"zqodfvpgshox\",\"type\":\"sgbpfgzdjtx\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"rtql\"},\"tags\":{\"kxlzyqdrfeg\":\"egnitg\",\"lwigdivbkbx\":\"ealzxwhcansymoyq\"},\"location\":\"mf\",\"id\":\"uwasqvd\",\"name\":\"e\",\"type\":\"y\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ApplicationTypeResource> response - = manager.applicationTypes().list("cjzhqi", "xfpxtgqscja", com.azure.core.util.Context.NONE); + = manager.applicationTypes().list("mpdnqqskawa", "qvmmbn", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jcivmmg", response.iterator().next().tags().get("f")); - Assertions.assertEquals("iwrxgkn", response.iterator().next().location()); + Assertions.assertEquals("egnitg", response.iterator().next().tags().get("kxlzyqdrfeg")); + Assertions.assertEquals("mf", response.iterator().next().location()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersPropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersPropertiesTests.java new file mode 100644 index 000000000000..40afdd13a6da --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersPropertiesTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParametersProperties; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ApplicationUpdateParametersPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ApplicationUpdateParametersProperties model = BinaryData.fromString("{\"parameters\":{\"ljavbqid\":\"qcjm\"}}") + .toObject(ApplicationUpdateParametersProperties.class); + Assertions.assertEquals("qcjm", model.parameters().get("ljavbqid")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ApplicationUpdateParametersProperties model + = new ApplicationUpdateParametersProperties().withParameters(mapOf("ljavbqid", "qcjm")); + model = BinaryData.fromObject(model).toObject(ApplicationUpdateParametersProperties.class); + Assertions.assertEquals("qcjm", model.parameters().get("ljavbqid")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersTests.java index 2dbbc2c62a52..6fa511b670ef 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersTests.java @@ -6,6 +6,7 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParametersProperties; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -14,17 +15,22 @@ public final class ApplicationUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"eeh\":\"lnrosfqp\",\"swjdkirso\":\"zvypyqrimzinp\",\"soifiyipjxsqw\":\"dqxhcrmnohjtckwh\",\"bznorcjxvsnby\":\"gr\"}}") + "{\"tags\":{\"eeh\":\"lnrosfqp\",\"swjdkirso\":\"zvypyqrimzinp\",\"soifiyipjxsqw\":\"dqxhcrmnohjtckwh\",\"bznorcjxvsnby\":\"gr\"},\"properties\":{\"parameters\":{\"cyshurzafbljjgp\":\"nmoc\"}}}") .toObject(ApplicationUpdateParameters.class); Assertions.assertEquals("lnrosfqp", model.tags().get("eeh")); + Assertions.assertEquals("nmoc", model.properties().parameters().get("cyshurzafbljjgp")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApplicationUpdateParameters model = new ApplicationUpdateParameters().withTags(mapOf("eeh", "lnrosfqp", - "swjdkirso", "zvypyqrimzinp", "soifiyipjxsqw", "dqxhcrmnohjtckwh", "bznorcjxvsnby", "gr")); + ApplicationUpdateParameters model = new ApplicationUpdateParameters() + .withTags(mapOf("eeh", "lnrosfqp", "swjdkirso", "zvypyqrimzinp", "soifiyipjxsqw", "dqxhcrmnohjtckwh", + "bznorcjxvsnby", "gr")) + .withProperties( + new ApplicationUpdateParametersProperties().withParameters(mapOf("cyshurzafbljjgp", "nmoc"))); model = BinaryData.fromObject(model).toObject(ApplicationUpdateParameters.class); Assertions.assertEquals("lnrosfqp", model.tags().get("eeh")); + Assertions.assertEquals("nmoc", model.properties().parameters().get("cyshurzafbljjgp")); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateMockTests.java index 4cb6fa7e9a5e..b688c94d841e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateMockTests.java @@ -34,7 +34,7 @@ public final class ApplicationsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"managedIdentities\":[{\"name\":\"hocxvdfffwafqrou\",\"principalId\":\"aspavehhr\"},{\"name\":\"kbunzoz\",\"principalId\":\"dhcxgkmoy\"},{\"name\":\"cdyuibhmfdnbzyd\",\"principalId\":\"f\"},{\"name\":\"fcjnaeoisrvhmgor\",\"principalId\":\"fukiscvwmzhw\"}],\"provisioningState\":\"Succeeded\",\"version\":\"gnhnzeyq\",\"parameters\":{\"dbeesmie\":\"jfzqlqhycavodgg\",\"wqfbylyrfgiagt\":\"nlrariaawiuagy\",\"zjvusfzldmo\":\"ojocqwogf\",\"own\":\"uxylfsbtkadpy\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":1188867128,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":792325056,\"maxPercentUnhealthyPartitionsPerService\":403303744,\"maxPercentUnhealthyReplicasPerPartition\":1343904651},\"serviceTypeHealthPolicyMap\":{\"cmisofie\":{\"maxPercentUnhealthyServices\":508604725,\"maxPercentUnhealthyPartitionsPerService\":1010221539,\"maxPercentUnhealthyReplicasPerPartition\":490054164}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"jy\",\"healthCheckStableDuration\":\"dh\",\"healthCheckRetryTimeout\":\"u\",\"upgradeTimeout\":\"lcplc\",\"upgradeDomainTimeout\":\"khihihlhzds\"},\"instanceCloseDelayDuration\":2248945719770323903,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":4511642520735539935,\"recreateApplication\":true}},\"tags\":{\"e\":\"fgmvecactxmwo\",\"ekqvgqouwif\":\"owcluqo\",\"ivqikfxcvhr\":\"mpjw\"},\"identity\":{\"principalId\":\"huagrttikteusqc\",\"tenantId\":\"vyklxuby\",\"type\":\"None\",\"userAssignedIdentities\":{\"brta\":{\"principalId\":\"fblcq\",\"clientId\":\"ubgq\"},\"qseypxiutcxa\":{\"principalId\":\"etttwgdslqxihhr\",\"clientId\":\"oi\"},\"abrqnkkzj\":{\"principalId\":\"hyrpetogebjoxs\",\"clientId\":\"vnh\"},\"qbeitpkxztmoob\":{\"principalId\":\"b\",\"clientId\":\"gaehvvibrxjjst\"}}},\"location\":\"ft\",\"id\":\"gfcwqmpimaqxzhem\",\"name\":\"yhohujswtwkozzwc\",\"type\":\"lkb\"}"; + = "{\"properties\":{\"managedIdentities\":[{\"name\":\"rttikteusqc\",\"principalId\":\"kvyklxubyjaffmm\"},{\"name\":\"bl\",\"principalId\":\"qcuubgqibrta\"},{\"name\":\"metttwgd\",\"principalId\":\"lqxihhrmooiz\"},{\"name\":\"seypxiutcxapz\",\"principalId\":\"y\"}],\"provisioningState\":\"Succeeded\",\"version\":\"oxslh\",\"parameters\":{\"aehvvibrxjjstoq\":\"labrqnkkzjcjbtr\",\"bklftidgfcwqmpim\":\"eitpkxztmo\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":1167127831,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1502903933,\"maxPercentUnhealthyPartitionsPerService\":1484369172,\"maxPercentUnhealthyReplicasPerPartition\":2126797239},\"serviceTypeHealthPolicyMap\":{\"swtwkozzwc\":{\"maxPercentUnhealthyServices\":1611708700,\"maxPercentUnhealthyPartitionsPerService\":453799283,\"maxPercentUnhealthyReplicasPerPartition\":633481749}}},\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"wpfaj\",\"healthCheckStableDuration\":\"jwltlwtjjgu\",\"healthCheckRetryTimeout\":\"talhsnvkcdmxzr\",\"upgradeTimeout\":\"oaimlnw\",\"upgradeDomainTimeout\":\"aaomylweazu\"},\"instanceCloseDelayDuration\":7974020410660782836,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":7245561295211561576,\"recreateApplication\":true}},\"tags\":{\"wpchwahf\":\"fz\"},\"identity\":{\"principalId\":\"snfepgfewetwlyx\",\"tenantId\":\"cxy\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"qizxfpxtgqscjavf\":{\"principalId\":\"limmbcxf\",\"clientId\":\"cporxvxcjz\"},\"wpijrajci\":{\"principalId\":\"uhdqazk\",\"clientId\":\"gg\"},\"oxgsgbpfgzdjtx\":{\"principalId\":\"mghfcfiwrxgkne\",\"clientId\":\"yinzqodfvpgs\"},\"rdve\":{\"principalId\":\"flbqvgaq\",\"clientId\":\"gafcqu\"}}},\"location\":\"wsdtutnwl\",\"id\":\"ycvuzhyrmewipmv\",\"name\":\"k\",\"type\":\"xukuqgsj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -44,108 +44,107 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationResource response = manager.applications() - .define("ktwkuziyc") - .withExistingManagedCluster("ril", "zapeewchpx") - .withRegion("rbbcevq") - .withTags(mapOf("hqyikvy", "qyuvvfonkp", "vluwmncsttij", "auy")) - .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.NONE) + .define("hqyikvy") + .withExistingManagedCluster("jazysdzhezwwvaiq", "uvvfonkp") + .withRegion("uqovekqvgqouwif") + .withTags(mapOf("vwmzhwplefaxvxil", "vhmgorffukis", "nzeyqxtjj", "btgn")) + .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities( - mapOf("gkynscliqh", new UserAssignedIdentity(), "dxzxhi", new UserAssignedIdentity()))) - .withManagedIdentities(Arrays - .asList(new ApplicationUserAssignedIdentity().withName("ufuztcktyhjtq").withPrincipalId("dcgzul"))) - .withVersion("zgkrvqe") - .withParameters(mapOf("t", "oepry", "fvaawzqa", "wytpzdmovz")) + mapOf("iagtc", new UserAssignedIdentity(), "ozuxylfsbtkadpys", new UserAssignedIdentity(), + "cuplcplcwkhih", new UserAssignedIdentity(), "txmwoteyow", new UserAssignedIdentity()))) + .withManagedIdentities( + Arrays.asList(new ApplicationUserAssignedIdentity().withName("avluwmncs").withPrincipalId("tijfybvp"), + new ApplicationUserAssignedIdentity().withName("ekrsgs").withPrincipalId("b"), + new ApplicationUserAssignedIdentity().withName("huzqgn").withPrincipalId("dgkynscliqhzvhxn"))) + .withVersion("otppnv") + .withParameters(mapOf("dhlfkqojpykvgt", "xhihfrbbcevqagtl")) .withUpgradePolicy(new ApplicationUpgradePolicy() .withApplicationHealthPolicy(new ApplicationHealthPolicy().withConsiderWarningAsError(true) - .withMaxPercentUnhealthyDeployedApplications(97417905) + .withMaxPercentUnhealthyDeployedApplications(1625047918) .withDefaultServiceTypeHealthPolicy( - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1828408441) - .withMaxPercentUnhealthyPartitionsPerService(1869010035) - .withMaxPercentUnhealthyReplicasPerPartition(1067396685)) - .withServiceTypeHealthPolicyMap(mapOf("ndtic", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1058037553) - .withMaxPercentUnhealthyPartitionsPerService(335381913) - .withMaxPercentUnhealthyReplicasPerPartition(1970549549), - "zmlqtmldgxo", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1691117977) - .withMaxPercentUnhealthyPartitionsPerService(687349800) - .withMaxPercentUnhealthyReplicasPerPartition(675680646), - "clnpkci", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1135591058) - .withMaxPercentUnhealthyPartitionsPerService(1794047018) - .withMaxPercentUnhealthyReplicasPerPartition(1646739085)))) + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(840860863) + .withMaxPercentUnhealthyPartitionsPerService(1598759472) + .withMaxPercentUnhealthyReplicasPerPartition(2043504503)) + .withServiceTypeHealthPolicyMap(mapOf("rnysux", + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1409785918) + .withMaxPercentUnhealthyPartitionsPerService(212235085) + .withMaxPercentUnhealthyReplicasPerPartition(599707965), + "fwgckhocxvdfffw", + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(718092493) + .withMaxPercentUnhealthyPartitionsPerService(1439980159) + .withMaxPercentUnhealthyReplicasPerPartition(214541271)))) .withForceRestart(false) .withRollingUpgradeMonitoringPolicy( - new RollingUpgradeMonitoringPolicy().withFailureAction(FailureAction.ROLLBACK) - .withHealthCheckWaitDuration("ykhyawfvjlboxqvk") - .withHealthCheckStableDuration("lmxhomdyn") - .withHealthCheckRetryTimeout("dwdigumb") - .withUpgradeTimeout("raauzzpt") - .withUpgradeDomainTimeout("a")) - .withInstanceCloseDelayDuration(8740215687103788004L) - .withUpgradeMode(RollingUpgradeMode.UNMONITORED_AUTO) - .withUpgradeReplicaSetCheckTimeout(5386759909033236623L) - .withRecreateApplication(true)) + new RollingUpgradeMonitoringPolicy().withFailureAction(FailureAction.MANUAL) + .withHealthCheckWaitDuration("udaspavehh") + .withHealthCheckStableDuration("vkbunzozudh") + .withHealthCheckRetryTimeout("xg") + .withUpgradeTimeout("moy") + .withUpgradeDomainTimeout("cdyuibhmfdnbzyd")) + .withInstanceCloseDelayDuration(8043600707281481210L) + .withUpgradeMode(RollingUpgradeMode.MONITORED) + .withUpgradeReplicaSetCheckTimeout(8257017600772006197L) + .withRecreateApplication(false)) .create(); - Assertions.assertEquals("fgmvecactxmwo", response.tags().get("e")); - Assertions.assertEquals(ManagedIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("ft", response.location()); - Assertions.assertEquals("hocxvdfffwafqrou", response.managedIdentities().get(0).name()); - Assertions.assertEquals("aspavehhr", response.managedIdentities().get(0).principalId()); - Assertions.assertEquals("gnhnzeyq", response.version()); - Assertions.assertEquals("jfzqlqhycavodgg", response.parameters().get("dbeesmie")); + Assertions.assertEquals("fz", response.tags().get("wpchwahf")); + Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("wsdtutnwl", response.location()); + Assertions.assertEquals("rttikteusqc", response.managedIdentities().get(0).name()); + Assertions.assertEquals("kvyklxubyjaffmm", response.managedIdentities().get(0).principalId()); + Assertions.assertEquals("oxslh", response.version()); + Assertions.assertEquals("labrqnkkzjcjbtr", response.parameters().get("aehvvibrxjjstoq")); Assertions.assertFalse(response.upgradePolicy().applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(1188867128, + Assertions.assertEquals(1167127831, response.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(792325056, + Assertions.assertEquals(1502903933, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyServices()); - Assertions.assertEquals(403303744, + Assertions.assertEquals(1484369172, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(1343904651, + Assertions.assertEquals(2126797239, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(508604725, + Assertions.assertEquals(1611708700, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("cmisofie") + .get("swtwkozzwc") .maxPercentUnhealthyServices()); - Assertions.assertEquals(1010221539, + Assertions.assertEquals(453799283, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("cmisofie") + .get("swtwkozzwc") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(490054164, + Assertions.assertEquals(633481749, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("cmisofie") + .get("swtwkozzwc") .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertTrue(response.upgradePolicy().forceRestart()); + Assertions.assertFalse(response.upgradePolicy().forceRestart()); Assertions.assertEquals(FailureAction.MANUAL, response.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("jy", + Assertions.assertEquals("wpfaj", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("dh", + Assertions.assertEquals("jwltlwtjjgu", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("u", + Assertions.assertEquals("talhsnvkcdmxzr", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("lcplc", response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("khihihlhzds", + Assertions.assertEquals("oaimlnw", response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); + Assertions.assertEquals("aaomylweazu", response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(2248945719770323903L, response.upgradePolicy().instanceCloseDelayDuration()); - Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_AUTO, response.upgradePolicy().upgradeMode()); - Assertions.assertEquals(4511642520735539935L, response.upgradePolicy().upgradeReplicaSetCheckTimeout()); + Assertions.assertEquals(7974020410660782836L, response.upgradePolicy().instanceCloseDelayDuration()); + Assertions.assertEquals(RollingUpgradeMode.MONITORED, response.upgradePolicy().upgradeMode()); + Assertions.assertEquals(7245561295211561576L, response.upgradePolicy().upgradeReplicaSetCheckTimeout()); Assertions.assertTrue(response.upgradePolicy().recreateApplication()); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetWithResponseMockTests.java index 3c183885fdd3..247480fb86ee 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class ApplicationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"managedIdentities\":[{\"name\":\"iuxxpshneekulfg\",\"principalId\":\"lqubkwdlen\"},{\"name\":\"d\",\"principalId\":\"utujba\"},{\"name\":\"pjuohminyfl\",\"principalId\":\"orwmduvwpklv\"}],\"provisioningState\":\"mygdxpgpqch\",\"version\":\"zepn\",\"parameters\":{\"axconfozauo\":\"crxgibb\",\"nuuepzlrp\":\"sukokwbqplhl\",\"nnrwrbiork\":\"wzsoldweyuqdunv\",\"xmsivfomiloxggdu\":\"alywjhhgdn\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":133601107,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1357028156,\"maxPercentUnhealthyPartitionsPerService\":1264679400,\"maxPercentUnhealthyReplicasPerPartition\":569162481},\"serviceTypeHealthPolicyMap\":{\"hvcyyysfg\":{\"maxPercentUnhealthyServices\":1581273229,\"maxPercentUnhealthyPartitionsPerService\":1778919230,\"maxPercentUnhealthyReplicasPerPartition\":886290907},\"ubiipuipwoqonma\":{\"maxPercentUnhealthyServices\":1377717439,\"maxPercentUnhealthyPartitionsPerService\":2137619748,\"maxPercentUnhealthyReplicasPerPartition\":355548039},\"nizshqvcim\":{\"maxPercentUnhealthyServices\":219234320,\"maxPercentUnhealthyPartitionsPerService\":914015459,\"maxPercentUnhealthyReplicasPerPartition\":167629289}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"mblrrilbywd\",\"healthCheckStableDuration\":\"smiccwrwfscj\",\"healthCheckRetryTimeout\":\"n\",\"upgradeTimeout\":\"nszqujiz\",\"upgradeDomainTimeout\":\"voqyt\"},\"instanceCloseDelayDuration\":1821183361408913568,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":2398197739518116547,\"recreateApplication\":false}},\"tags\":{\"hjoxo\":\"tp\"},\"identity\":{\"principalId\":\"sks\",\"tenantId\":\"iml\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"fgfb\":{\"principalId\":\"cgxxlxs\",\"clientId\":\"gcvizqzdwlvwlyou\"},\"g\":{\"principalId\":\"ubdyhgk\",\"clientId\":\"in\"},\"mmqtgqqqxhr\":{\"principalId\":\"zfttsttktlahb\",\"clientId\":\"ctxtgzukxi\"},\"azivjlfrqttbajl\":{\"principalId\":\"rxcpjuisavo\",\"clientId\":\"dzf\"}}},\"location\":\"tnwxy\",\"id\":\"pidkqqfkuvscxkdm\",\"name\":\"igovi\",\"type\":\"rxkpmloazuruoc\"}"; + = "{\"properties\":{\"managedIdentities\":[{\"name\":\"ljxkcgxxlx\",\"principalId\":\"ffgcvizqz\"},{\"name\":\"wlvwlyoupf\",\"principalId\":\"fbkjubdyhgkfmi\"}],\"provisioningState\":\"g\",\"version\":\"zfttsttktlahb\",\"parameters\":{\"gzukxitmm\":\"tx\",\"qqxhrnxrxcpj\":\"tg\",\"dzf\":\"isavok\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":2015132564,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":225909755,\"maxPercentUnhealthyPartitionsPerService\":1398349003,\"maxPercentUnhealthyReplicasPerPartition\":1209052818},\"serviceTypeHealthPolicyMap\":{\"jlkatnwxy\":{\"maxPercentUnhealthyServices\":234618918,\"maxPercentUnhealthyPartitionsPerService\":1411328763,\"maxPercentUnhealthyReplicasPerPartition\":2022353115},\"dkqqfkuvscxkd\":{\"maxPercentUnhealthyServices\":713204380,\"maxPercentUnhealthyPartitionsPerService\":2086170636,\"maxPercentUnhealthyReplicasPerPartition\":372897699}}},\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"vibrxkpmloazuruo\",\"healthCheckStableDuration\":\"bgo\",\"healthCheckRetryTimeout\":\"rb\",\"upgradeTimeout\":\"eoybfhjxakvvjgs\",\"upgradeDomainTimeout\":\"ordilmywwtkgkxny\"},\"instanceCloseDelayDuration\":9040461916743042317,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":475774977196617352,\"recreateApplication\":true}},\"tags\":{\"j\":\"wbcihxuuwh\",\"akkud\":\"xccybvpa\",\"wjplma\":\"px\"},\"identity\":{\"principalId\":\"cyohpfkyrkdbd\",\"tenantId\":\"ogsjkmnwqjno\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"mvmemfnczd\":{\"principalId\":\"d\",\"clientId\":\"acegfnmntf\"}}},\"location\":\"vbalxlllc\",\"id\":\"odbzevwrdnhf\",\"name\":\"kuvsjcswsm\",\"type\":\"stul\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,67 +34,68 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationResource response = manager.applications() - .getWithResponse("jvewzcjznmwcp", "guaadraufactkahz", "v", com.azure.core.util.Context.NONE) + .getWithResponse("vutpthjoxo", "smsks", "pi", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("tp", response.tags().get("hjoxo")); - Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("tnwxy", response.location()); - Assertions.assertEquals("iuxxpshneekulfg", response.managedIdentities().get(0).name()); - Assertions.assertEquals("lqubkwdlen", response.managedIdentities().get(0).principalId()); - Assertions.assertEquals("zepn", response.version()); - Assertions.assertEquals("crxgibb", response.parameters().get("axconfozauo")); + Assertions.assertEquals("wbcihxuuwh", response.tags().get("j")); + Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, response.identity().type()); + Assertions.assertEquals("vbalxlllc", response.location()); + Assertions.assertEquals("ljxkcgxxlx", response.managedIdentities().get(0).name()); + Assertions.assertEquals("ffgcvizqz", response.managedIdentities().get(0).principalId()); + Assertions.assertEquals("zfttsttktlahb", response.version()); + Assertions.assertEquals("tx", response.parameters().get("gzukxitmm")); Assertions.assertTrue(response.upgradePolicy().applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(133601107, + Assertions.assertEquals(2015132564, response.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(1357028156, + Assertions.assertEquals(225909755, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyServices()); - Assertions.assertEquals(1264679400, + Assertions.assertEquals(1398349003, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(569162481, + Assertions.assertEquals(1209052818, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(1581273229, + Assertions.assertEquals(234618918, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("hvcyyysfg") + .get("jlkatnwxy") .maxPercentUnhealthyServices()); - Assertions.assertEquals(1778919230, + Assertions.assertEquals(1411328763, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("hvcyyysfg") + .get("jlkatnwxy") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(886290907, + Assertions.assertEquals(2022353115, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("hvcyyysfg") + .get("jlkatnwxy") .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertTrue(response.upgradePolicy().forceRestart()); + Assertions.assertFalse(response.upgradePolicy().forceRestart()); Assertions.assertEquals(FailureAction.ROLLBACK, response.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("mblrrilbywd", + Assertions.assertEquals("vibrxkpmloazuruo", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("smiccwrwfscj", + Assertions.assertEquals("bgo", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("n", + Assertions.assertEquals("rb", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("nszqujiz", response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("voqyt", + Assertions.assertEquals("eoybfhjxakvvjgs", + response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); + Assertions.assertEquals("ordilmywwtkgkxny", response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(1821183361408913568L, response.upgradePolicy().instanceCloseDelayDuration()); + Assertions.assertEquals(9040461916743042317L, response.upgradePolicy().instanceCloseDelayDuration()); Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_AUTO, response.upgradePolicy().upgradeMode()); - Assertions.assertEquals(2398197739518116547L, response.upgradePolicy().upgradeReplicaSetCheckTimeout()); - Assertions.assertFalse(response.upgradePolicy().recreateApplication()); + Assertions.assertEquals(475774977196617352L, response.upgradePolicy().upgradeReplicaSetCheckTimeout()); + Assertions.assertTrue(response.upgradePolicy().recreateApplication()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListMockTests.java index 75f3690382a1..ccb390911e20 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListMockTests.java @@ -25,7 +25,7 @@ public final class ApplicationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"managedIdentities\":[{\"name\":\"lmywwtkgkxnyed\",\"principalId\":\"b\"}],\"provisioningState\":\"vudtjuewbcihx\",\"version\":\"whcjyxcc\",\"parameters\":{\"px\":\"payakkud\",\"stcyohpfkyrkdbd\":\"wjplma\",\"nobaiyhddviacegf\":\"iogsjkmnwq\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":864919134,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":394707099,\"maxPercentUnhealthyPartitionsPerService\":328676113,\"maxPercentUnhealthyReplicasPerPartition\":2049535402},\"serviceTypeHealthPolicyMap\":{\"zdwvvbalxl\":{\"maxPercentUnhealthyServices\":999073348,\"maxPercentUnhealthyPartitionsPerService\":1649759602,\"maxPercentUnhealthyReplicasPerPartition\":1382156415},\"podbzevwrdnh\":{\"maxPercentUnhealthyServices\":1368120415,\"maxPercentUnhealthyPartitionsPerService\":677641870,\"maxPercentUnhealthyReplicasPerPartition\":2062090684}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"sjcswsmystuluqyp\",\"healthCheckStableDuration\":\"cvlerchpqbmfpjba\",\"healthCheckRetryTimeout\":\"widf\",\"upgradeTimeout\":\"xsspuunnoxyhk\",\"upgradeDomainTimeout\":\"g\"},\"instanceCloseDelayDuration\":9129720972817619539,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":5806792787635363155,\"recreateApplication\":true}},\"tags\":{\"wdaomdjvlpjxxkzb\":\"a\",\"ncj\":\"msgeivsiykzk\",\"y\":\"xonbzoggculapz\"},\"identity\":{\"principalId\":\"ogtqxepnylbf\",\"tenantId\":\"jlyjtlvofq\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"wiivwzjbhyzsx\":{\"principalId\":\"byfmowuxr\",\"clientId\":\"pvdwxf\"}}},\"location\":\"kambtrnegvmnvuqe\",\"id\":\"lds\",\"name\":\"astjbkkdmflvestm\",\"type\":\"lx\"}]}"; + = "{\"value\":[{\"properties\":{\"managedIdentities\":[{\"name\":\"bm\",\"principalId\":\"pjbabwidfc\"},{\"name\":\"sspuunnoxyhkx\",\"principalId\":\"qddrihpfhoqcaae\"},{\"name\":\"dao\",\"principalId\":\"djvlpj\"},{\"name\":\"xkzb\",\"principalId\":\"msgeivsiykzk\"}],\"provisioningState\":\"cjdx\",\"version\":\"bzo\",\"parameters\":{\"ogtqxepnylbf\":\"ulapzwyrp\",\"cib\":\"ajlyjtlvofqzhv\",\"uxrkjp\":\"fmo\",\"wiivwzjbhyzsx\":\"dwxf\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":857914437,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":2010544463,\"maxPercentUnhealthyPartitionsPerService\":1753999923,\"maxPercentUnhealthyReplicasPerPartition\":426068094},\"serviceTypeHealthPolicyMap\":{\"vuqeqvldspast\":{\"maxPercentUnhealthyServices\":1243501701,\"maxPercentUnhealthyPartitionsPerService\":1525920075,\"maxPercentUnhealthyReplicasPerPartition\":983606156},\"dmflv\":{\"maxPercentUnhealthyServices\":900352978,\"maxPercentUnhealthyPartitionsPerService\":1481750195,\"maxPercentUnhealthyReplicasPerPartition\":1155931033},\"jlxr\":{\"maxPercentUnhealthyServices\":922777,\"maxPercentUnhealthyPartitionsPerService\":1294255388,\"maxPercentUnhealthyReplicasPerPartition\":1941406807}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"apeewchpxlkt\",\"healthCheckStableDuration\":\"kuziycsle\",\"healthCheckRetryTimeout\":\"ufuztcktyhjtq\",\"upgradeTimeout\":\"dcgzul\",\"upgradeDomainTimeout\":\"mmrqz\"},\"instanceCloseDelayDuration\":9007359622737683059,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":6630814331855742678,\"recreateApplication\":false}},\"tags\":{\"ytp\":\"rvqeevtoepryutn\"},\"identity\":{\"principalId\":\"o\",\"tenantId\":\"vf\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"xndticokpvzmlqtm\":{\"principalId\":\"adflgzu\",\"clientId\":\"glae\"},\"iykhy\":{\"principalId\":\"gxobfirclnp\",\"clientId\":\"iayz\"}}},\"location\":\"fvjlboxqvkjlmx\",\"id\":\"mdy\",\"name\":\"hdwdi\",\"type\":\"umbnraauzzp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,86 +35,86 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ApplicationResource> response - = manager.applications().list("goorbteo", "bfhjxakvvjgsl", com.azure.core.util.Context.NONE); + = manager.applications().list("qypfcv", "er", com.azure.core.util.Context.NONE); - Assertions.assertEquals("a", response.iterator().next().tags().get("wdaomdjvlpjxxkzb")); - Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("kambtrnegvmnvuqe", response.iterator().next().location()); - Assertions.assertEquals("lmywwtkgkxnyed", response.iterator().next().managedIdentities().get(0).name()); - Assertions.assertEquals("b", response.iterator().next().managedIdentities().get(0).principalId()); - Assertions.assertEquals("whcjyxcc", response.iterator().next().version()); - Assertions.assertEquals("payakkud", response.iterator().next().parameters().get("px")); + Assertions.assertEquals("rvqeevtoepryutn", response.iterator().next().tags().get("ytp")); + Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); + Assertions.assertEquals("fvjlboxqvkjlmx", response.iterator().next().location()); + Assertions.assertEquals("bm", response.iterator().next().managedIdentities().get(0).name()); + Assertions.assertEquals("pjbabwidfc", response.iterator().next().managedIdentities().get(0).principalId()); + Assertions.assertEquals("bzo", response.iterator().next().version()); + Assertions.assertEquals("ulapzwyrp", response.iterator().next().parameters().get("ogtqxepnylbf")); Assertions .assertTrue(response.iterator().next().upgradePolicy().applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(864919134, + Assertions.assertEquals(857914437, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(394707099, + Assertions.assertEquals(2010544463, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyServices()); - Assertions.assertEquals(328676113, + Assertions.assertEquals(1753999923, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(2049535402, + Assertions.assertEquals(426068094, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(999073348, + Assertions.assertEquals(1243501701, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("zdwvvbalxl") + .get("vuqeqvldspast") .maxPercentUnhealthyServices()); - Assertions.assertEquals(1649759602, + Assertions.assertEquals(1525920075, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("zdwvvbalxl") + .get("vuqeqvldspast") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(1382156415, + Assertions.assertEquals(983606156, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("zdwvvbalxl") + .get("vuqeqvldspast") .maxPercentUnhealthyReplicasPerPartition()); Assertions.assertTrue(response.iterator().next().upgradePolicy().forceRestart()); Assertions.assertEquals(FailureAction.MANUAL, response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("sjcswsmystuluqyp", + Assertions.assertEquals("apeewchpxlkt", response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("cvlerchpqbmfpjba", + Assertions.assertEquals("kuziycsle", response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("widf", + Assertions.assertEquals("ufuztcktyhjtq", response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("xsspuunnoxyhk", + Assertions.assertEquals("dcgzul", response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("g", + Assertions.assertEquals("mmrqz", response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(9129720972817619539L, + Assertions.assertEquals(9007359622737683059L, response.iterator().next().upgradePolicy().instanceCloseDelayDuration()); Assertions.assertEquals(RollingUpgradeMode.MONITORED, response.iterator().next().upgradePolicy().upgradeMode()); - Assertions.assertEquals(5806792787635363155L, + Assertions.assertEquals(6630814331855742678L, response.iterator().next().upgradePolicy().upgradeReplicaSetCheckTimeout()); - Assertions.assertTrue(response.iterator().next().upgradePolicy().recreateApplication()); + Assertions.assertFalse(response.iterator().next().upgradePolicy().recreateApplication()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AveragePartitionLoadScalingTriggerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AveragePartitionLoadScalingTriggerTests.java index f3df8302c566..1876ed8b94b9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AveragePartitionLoadScalingTriggerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AveragePartitionLoadScalingTriggerTests.java @@ -12,25 +12,25 @@ public final class AveragePartitionLoadScalingTriggerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AveragePartitionLoadScalingTrigger model = BinaryData.fromString( - "{\"kind\":\"AveragePartitionLoadTrigger\",\"metricName\":\"hfxobbcswsrtj\",\"lowerLoadThreshold\":92.76548731368051,\"upperLoadThreshold\":84.5100937659018,\"scaleInterval\":\"bpbewtghfgb\"}") + "{\"kind\":\"AveragePartitionLoadTrigger\",\"metricName\":\"sldnkwwtppjflcxo\",\"lowerLoadThreshold\":66.58158433453451,\"upperLoadThreshold\":52.26322581783733,\"scaleInterval\":\"nzmnsikvm\"}") .toObject(AveragePartitionLoadScalingTrigger.class); - Assertions.assertEquals("hfxobbcswsrtj", model.metricName()); - Assertions.assertEquals(92.76548731368051, model.lowerLoadThreshold()); - Assertions.assertEquals(84.5100937659018, model.upperLoadThreshold()); - Assertions.assertEquals("bpbewtghfgb", model.scaleInterval()); + Assertions.assertEquals("sldnkwwtppjflcxo", model.metricName()); + Assertions.assertEquals(66.58158433453451, model.lowerLoadThreshold()); + Assertions.assertEquals(52.26322581783733, model.upperLoadThreshold()); + Assertions.assertEquals("nzmnsikvm", model.scaleInterval()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AveragePartitionLoadScalingTrigger model - = new AveragePartitionLoadScalingTrigger().withMetricName("hfxobbcswsrtj") - .withLowerLoadThreshold(92.76548731368051) - .withUpperLoadThreshold(84.5100937659018) - .withScaleInterval("bpbewtghfgb"); + = new AveragePartitionLoadScalingTrigger().withMetricName("sldnkwwtppjflcxo") + .withLowerLoadThreshold(66.58158433453451) + .withUpperLoadThreshold(52.26322581783733) + .withScaleInterval("nzmnsikvm"); model = BinaryData.fromObject(model).toObject(AveragePartitionLoadScalingTrigger.class); - Assertions.assertEquals("hfxobbcswsrtj", model.metricName()); - Assertions.assertEquals(92.76548731368051, model.lowerLoadThreshold()); - Assertions.assertEquals(84.5100937659018, model.upperLoadThreshold()); - Assertions.assertEquals("bpbewtghfgb", model.scaleInterval()); + Assertions.assertEquals("sldnkwwtppjflcxo", model.metricName()); + Assertions.assertEquals(66.58158433453451, model.lowerLoadThreshold()); + Assertions.assertEquals(52.26322581783733, model.upperLoadThreshold()); + Assertions.assertEquals("nzmnsikvm", model.scaleInterval()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AverageServiceLoadScalingTriggerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AverageServiceLoadScalingTriggerTests.java index 7793aa5345f2..b67f610d09f5 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AverageServiceLoadScalingTriggerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AverageServiceLoadScalingTriggerTests.java @@ -12,27 +12,27 @@ public final class AverageServiceLoadScalingTriggerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AverageServiceLoadScalingTrigger model = BinaryData.fromString( - "{\"kind\":\"AverageServiceLoadTrigger\",\"metricName\":\"c\",\"lowerLoadThreshold\":65.33544191967107,\"upperLoadThreshold\":79.37105398505092,\"scaleInterval\":\"lvqhjkbegibtnmx\",\"useOnlyPrimaryLoad\":true}") + "{\"kind\":\"AverageServiceLoadTrigger\",\"metricName\":\"qzeqqkdltfzxm\",\"lowerLoadThreshold\":54.37658882164613,\"upperLoadThreshold\":25.287367109549173,\"scaleInterval\":\"ur\",\"useOnlyPrimaryLoad\":false}") .toObject(AverageServiceLoadScalingTrigger.class); - Assertions.assertEquals("c", model.metricName()); - Assertions.assertEquals(65.33544191967107, model.lowerLoadThreshold()); - Assertions.assertEquals(79.37105398505092, model.upperLoadThreshold()); - Assertions.assertEquals("lvqhjkbegibtnmx", model.scaleInterval()); - Assertions.assertTrue(model.useOnlyPrimaryLoad()); + Assertions.assertEquals("qzeqqkdltfzxm", model.metricName()); + Assertions.assertEquals(54.37658882164613, model.lowerLoadThreshold()); + Assertions.assertEquals(25.287367109549173, model.upperLoadThreshold()); + Assertions.assertEquals("ur", model.scaleInterval()); + Assertions.assertFalse(model.useOnlyPrimaryLoad()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AverageServiceLoadScalingTrigger model = new AverageServiceLoadScalingTrigger().withMetricName("c") - .withLowerLoadThreshold(65.33544191967107) - .withUpperLoadThreshold(79.37105398505092) - .withScaleInterval("lvqhjkbegibtnmx") - .withUseOnlyPrimaryLoad(true); + AverageServiceLoadScalingTrigger model = new AverageServiceLoadScalingTrigger().withMetricName("qzeqqkdltfzxm") + .withLowerLoadThreshold(54.37658882164613) + .withUpperLoadThreshold(25.287367109549173) + .withScaleInterval("ur") + .withUseOnlyPrimaryLoad(false); model = BinaryData.fromObject(model).toObject(AverageServiceLoadScalingTrigger.class); - Assertions.assertEquals("c", model.metricName()); - Assertions.assertEquals(65.33544191967107, model.lowerLoadThreshold()); - Assertions.assertEquals(79.37105398505092, model.upperLoadThreshold()); - Assertions.assertEquals("lvqhjkbegibtnmx", model.scaleInterval()); - Assertions.assertTrue(model.useOnlyPrimaryLoad()); + Assertions.assertEquals("qzeqqkdltfzxm", model.metricName()); + Assertions.assertEquals(54.37658882164613, model.lowerLoadThreshold()); + Assertions.assertEquals(25.287367109549173, model.upperLoadThreshold()); + Assertions.assertEquals("ur", model.scaleInterval()); + Assertions.assertFalse(model.useOnlyPrimaryLoad()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AzureActiveDirectoryTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AzureActiveDirectoryTests.java index 919990524542..ab878dc41035 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AzureActiveDirectoryTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AzureActiveDirectoryTests.java @@ -11,23 +11,22 @@ public final class AzureActiveDirectoryTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AzureActiveDirectory model = BinaryData - .fromString( - "{\"tenantId\":\"nmabik\",\"clusterApplication\":\"orgjhxbldt\",\"clientApplication\":\"wrlkdmtn\"}") + AzureActiveDirectory model = BinaryData.fromString( + "{\"tenantId\":\"qidbqfatpxllrxcy\",\"clusterApplication\":\"oadsuvar\",\"clientApplication\":\"wdmjsjqbjhhyx\"}") .toObject(AzureActiveDirectory.class); - Assertions.assertEquals("nmabik", model.tenantId()); - Assertions.assertEquals("orgjhxbldt", model.clusterApplication()); - Assertions.assertEquals("wrlkdmtn", model.clientApplication()); + Assertions.assertEquals("qidbqfatpxllrxcy", model.tenantId()); + Assertions.assertEquals("oadsuvar", model.clusterApplication()); + Assertions.assertEquals("wdmjsjqbjhhyx", model.clientApplication()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureActiveDirectory model = new AzureActiveDirectory().withTenantId("nmabik") - .withClusterApplication("orgjhxbldt") - .withClientApplication("wrlkdmtn"); + AzureActiveDirectory model = new AzureActiveDirectory().withTenantId("qidbqfatpxllrxcy") + .withClusterApplication("oadsuvar") + .withClientApplication("wdmjsjqbjhhyx"); model = BinaryData.fromObject(model).toObject(AzureActiveDirectory.class); - Assertions.assertEquals("nmabik", model.tenantId()); - Assertions.assertEquals("orgjhxbldt", model.clusterApplication()); - Assertions.assertEquals("wrlkdmtn", model.clientApplication()); + Assertions.assertEquals("qidbqfatpxllrxcy", model.tenantId()); + Assertions.assertEquals("oadsuvar", model.clusterApplication()); + Assertions.assertEquals("wdmjsjqbjhhyx", model.clientApplication()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClientCertificateTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClientCertificateTests.java index 5e2459137a37..40f6024e0abd 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClientCertificateTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClientCertificateTests.java @@ -11,25 +11,26 @@ public final class ClientCertificateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ClientCertificate model = BinaryData.fromString( - "{\"isAdmin\":true,\"thumbprint\":\"iizynkedyatrwyh\",\"commonName\":\"ibzyhwitsmyp\",\"issuerThumbprint\":\"npcdpumnzgm\"}") + ClientCertificate model = BinaryData + .fromString( + "{\"isAdmin\":true,\"thumbprint\":\"yf\",\"commonName\":\"dgqggebdu\",\"issuerThumbprint\":\"g\"}") .toObject(ClientCertificate.class); Assertions.assertTrue(model.isAdmin()); - Assertions.assertEquals("iizynkedyatrwyh", model.thumbprint()); - Assertions.assertEquals("ibzyhwitsmyp", model.commonName()); - Assertions.assertEquals("npcdpumnzgm", model.issuerThumbprint()); + Assertions.assertEquals("yf", model.thumbprint()); + Assertions.assertEquals("dgqggebdu", model.commonName()); + Assertions.assertEquals("g", model.issuerThumbprint()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ClientCertificate model = new ClientCertificate().withIsAdmin(true) - .withThumbprint("iizynkedyatrwyh") - .withCommonName("ibzyhwitsmyp") - .withIssuerThumbprint("npcdpumnzgm"); + .withThumbprint("yf") + .withCommonName("dgqggebdu") + .withIssuerThumbprint("g"); model = BinaryData.fromObject(model).toObject(ClientCertificate.class); Assertions.assertTrue(model.isAdmin()); - Assertions.assertEquals("iizynkedyatrwyh", model.thumbprint()); - Assertions.assertEquals("ibzyhwitsmyp", model.commonName()); - Assertions.assertEquals("npcdpumnzgm", model.issuerThumbprint()); + Assertions.assertEquals("yf", model.thumbprint()); + Assertions.assertEquals("dgqggebdu", model.commonName()); + Assertions.assertEquals("g", model.issuerThumbprint()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterHealthPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterHealthPolicyTests.java index 7656b46f2f58..150feffd6aa5 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterHealthPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterHealthPolicyTests.java @@ -12,18 +12,18 @@ public final class ClusterHealthPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterHealthPolicy model = BinaryData - .fromString("{\"maxPercentUnhealthyNodes\":1789990861,\"maxPercentUnhealthyApplications\":155471033}") + .fromString("{\"maxPercentUnhealthyNodes\":726747953,\"maxPercentUnhealthyApplications\":576385447}") .toObject(ClusterHealthPolicy.class); - Assertions.assertEquals(1789990861, model.maxPercentUnhealthyNodes()); - Assertions.assertEquals(155471033, model.maxPercentUnhealthyApplications()); + Assertions.assertEquals(726747953, model.maxPercentUnhealthyNodes()); + Assertions.assertEquals(576385447, model.maxPercentUnhealthyApplications()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterHealthPolicy model = new ClusterHealthPolicy().withMaxPercentUnhealthyNodes(1789990861) - .withMaxPercentUnhealthyApplications(155471033); + ClusterHealthPolicy model = new ClusterHealthPolicy().withMaxPercentUnhealthyNodes(726747953) + .withMaxPercentUnhealthyApplications(576385447); model = BinaryData.fromObject(model).toObject(ClusterHealthPolicy.class); - Assertions.assertEquals(1789990861, model.maxPercentUnhealthyNodes()); - Assertions.assertEquals(155471033, model.maxPercentUnhealthyApplications()); + Assertions.assertEquals(726747953, model.maxPercentUnhealthyNodes()); + Assertions.assertEquals(576385447, model.maxPercentUnhealthyApplications()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterMonitoringPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterMonitoringPolicyTests.java index e1e9dad3d79b..59565d9b0303 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterMonitoringPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterMonitoringPolicyTests.java @@ -12,27 +12,27 @@ public final class ClusterMonitoringPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterMonitoringPolicy model = BinaryData.fromString( - "{\"healthCheckWaitDuration\":\"atklddxbjhwuaa\",\"healthCheckStableDuration\":\"oz\",\"healthCheckRetryTimeout\":\"osphyoul\",\"upgradeTimeout\":\"jrvxaglrv\",\"upgradeDomainTimeout\":\"mjwosytx\"}") + "{\"healthCheckWaitDuration\":\"uqlcvydy\",\"healthCheckStableDuration\":\"atdooaojkniod\",\"healthCheckRetryTimeout\":\"oo\",\"upgradeTimeout\":\"bw\",\"upgradeDomainTimeout\":\"ujhemmsbvdkcrodt\"}") .toObject(ClusterMonitoringPolicy.class); - Assertions.assertEquals("atklddxbjhwuaa", model.healthCheckWaitDuration()); - Assertions.assertEquals("oz", model.healthCheckStableDuration()); - Assertions.assertEquals("osphyoul", model.healthCheckRetryTimeout()); - Assertions.assertEquals("jrvxaglrv", model.upgradeTimeout()); - Assertions.assertEquals("mjwosytx", model.upgradeDomainTimeout()); + Assertions.assertEquals("uqlcvydy", model.healthCheckWaitDuration()); + Assertions.assertEquals("atdooaojkniod", model.healthCheckStableDuration()); + Assertions.assertEquals("oo", model.healthCheckRetryTimeout()); + Assertions.assertEquals("bw", model.upgradeTimeout()); + Assertions.assertEquals("ujhemmsbvdkcrodt", model.upgradeDomainTimeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterMonitoringPolicy model = new ClusterMonitoringPolicy().withHealthCheckWaitDuration("atklddxbjhwuaa") - .withHealthCheckStableDuration("oz") - .withHealthCheckRetryTimeout("osphyoul") - .withUpgradeTimeout("jrvxaglrv") - .withUpgradeDomainTimeout("mjwosytx"); + ClusterMonitoringPolicy model = new ClusterMonitoringPolicy().withHealthCheckWaitDuration("uqlcvydy") + .withHealthCheckStableDuration("atdooaojkniod") + .withHealthCheckRetryTimeout("oo") + .withUpgradeTimeout("bw") + .withUpgradeDomainTimeout("ujhemmsbvdkcrodt"); model = BinaryData.fromObject(model).toObject(ClusterMonitoringPolicy.class); - Assertions.assertEquals("atklddxbjhwuaa", model.healthCheckWaitDuration()); - Assertions.assertEquals("oz", model.healthCheckStableDuration()); - Assertions.assertEquals("osphyoul", model.healthCheckRetryTimeout()); - Assertions.assertEquals("jrvxaglrv", model.upgradeTimeout()); - Assertions.assertEquals("mjwosytx", model.upgradeDomainTimeout()); + Assertions.assertEquals("uqlcvydy", model.healthCheckWaitDuration()); + Assertions.assertEquals("atdooaojkniod", model.healthCheckStableDuration()); + Assertions.assertEquals("oo", model.healthCheckRetryTimeout()); + Assertions.assertEquals("bw", model.upgradeTimeout()); + Assertions.assertEquals("ujhemmsbvdkcrodt", model.upgradeDomainTimeout()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradeDeltaHealthPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradeDeltaHealthPolicyTests.java index 33a1b74c045a..208f438ca3ce 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradeDeltaHealthPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradeDeltaHealthPolicyTests.java @@ -12,22 +12,22 @@ public final class ClusterUpgradeDeltaHealthPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterUpgradeDeltaHealthPolicy model = BinaryData.fromString( - "{\"maxPercentDeltaUnhealthyNodes\":730394428,\"maxPercentUpgradeDomainDeltaUnhealthyNodes\":1632471353,\"maxPercentDeltaUnhealthyApplications\":1449386799}") + "{\"maxPercentDeltaUnhealthyNodes\":1464984840,\"maxPercentUpgradeDomainDeltaUnhealthyNodes\":866904084,\"maxPercentDeltaUnhealthyApplications\":966805028}") .toObject(ClusterUpgradeDeltaHealthPolicy.class); - Assertions.assertEquals(730394428, model.maxPercentDeltaUnhealthyNodes()); - Assertions.assertEquals(1632471353, model.maxPercentUpgradeDomainDeltaUnhealthyNodes()); - Assertions.assertEquals(1449386799, model.maxPercentDeltaUnhealthyApplications()); + Assertions.assertEquals(1464984840, model.maxPercentDeltaUnhealthyNodes()); + Assertions.assertEquals(866904084, model.maxPercentUpgradeDomainDeltaUnhealthyNodes()); + Assertions.assertEquals(966805028, model.maxPercentDeltaUnhealthyApplications()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ClusterUpgradeDeltaHealthPolicy model - = new ClusterUpgradeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyNodes(730394428) - .withMaxPercentUpgradeDomainDeltaUnhealthyNodes(1632471353) - .withMaxPercentDeltaUnhealthyApplications(1449386799); + = new ClusterUpgradeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyNodes(1464984840) + .withMaxPercentUpgradeDomainDeltaUnhealthyNodes(866904084) + .withMaxPercentDeltaUnhealthyApplications(966805028); model = BinaryData.fromObject(model).toObject(ClusterUpgradeDeltaHealthPolicy.class); - Assertions.assertEquals(730394428, model.maxPercentDeltaUnhealthyNodes()); - Assertions.assertEquals(1632471353, model.maxPercentUpgradeDomainDeltaUnhealthyNodes()); - Assertions.assertEquals(1449386799, model.maxPercentDeltaUnhealthyApplications()); + Assertions.assertEquals(1464984840, model.maxPercentDeltaUnhealthyNodes()); + Assertions.assertEquals(866904084, model.maxPercentUpgradeDomainDeltaUnhealthyNodes()); + Assertions.assertEquals(966805028, model.maxPercentDeltaUnhealthyApplications()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradePolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradePolicyTests.java index 52c59ba97869..86c925ce09d3 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradePolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradePolicyTests.java @@ -15,48 +15,48 @@ public final class ClusterUpgradePolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterUpgradePolicy model = BinaryData.fromString( - "{\"forceRestart\":false,\"healthPolicy\":{\"maxPercentUnhealthyNodes\":1947559864,\"maxPercentUnhealthyApplications\":2088277848},\"deltaHealthPolicy\":{\"maxPercentDeltaUnhealthyNodes\":101100234,\"maxPercentUpgradeDomainDeltaUnhealthyNodes\":972343553,\"maxPercentDeltaUnhealthyApplications\":636112442},\"monitoringPolicy\":{\"healthCheckWaitDuration\":\"gwimfn\",\"healthCheckStableDuration\":\"hfjx\",\"healthCheckRetryTimeout\":\"mszkkfo\",\"upgradeTimeout\":\"rey\",\"upgradeDomainTimeout\":\"kzikfjawneaivxwc\"},\"upgradeReplicaSetCheckTimeout\":\"lpcirelsf\"}") + "{\"forceRestart\":true,\"healthPolicy\":{\"maxPercentUnhealthyNodes\":1682881109,\"maxPercentUnhealthyApplications\":207967373},\"deltaHealthPolicy\":{\"maxPercentDeltaUnhealthyNodes\":2025880638,\"maxPercentUpgradeDomainDeltaUnhealthyNodes\":2135802257,\"maxPercentDeltaUnhealthyApplications\":1817909710},\"monitoringPolicy\":{\"healthCheckWaitDuration\":\"xtrthz\",\"healthCheckStableDuration\":\"aytdwkqbrq\",\"healthCheckRetryTimeout\":\"bpaxhexiilivpdt\",\"upgradeTimeout\":\"irqtdqoa\",\"upgradeDomainTimeout\":\"oruzfgsquyfxrxx\"},\"upgradeReplicaSetCheckTimeout\":\"ptramxj\"}") .toObject(ClusterUpgradePolicy.class); - Assertions.assertFalse(model.forceRestart()); - Assertions.assertEquals(1947559864, model.healthPolicy().maxPercentUnhealthyNodes()); - Assertions.assertEquals(2088277848, model.healthPolicy().maxPercentUnhealthyApplications()); - Assertions.assertEquals(101100234, model.deltaHealthPolicy().maxPercentDeltaUnhealthyNodes()); - Assertions.assertEquals(972343553, model.deltaHealthPolicy().maxPercentUpgradeDomainDeltaUnhealthyNodes()); - Assertions.assertEquals(636112442, model.deltaHealthPolicy().maxPercentDeltaUnhealthyApplications()); - Assertions.assertEquals("gwimfn", model.monitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("hfjx", model.monitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("mszkkfo", model.monitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("rey", model.monitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("kzikfjawneaivxwc", model.monitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals("lpcirelsf", model.upgradeReplicaSetCheckTimeout()); + Assertions.assertTrue(model.forceRestart()); + Assertions.assertEquals(1682881109, model.healthPolicy().maxPercentUnhealthyNodes()); + Assertions.assertEquals(207967373, model.healthPolicy().maxPercentUnhealthyApplications()); + Assertions.assertEquals(2025880638, model.deltaHealthPolicy().maxPercentDeltaUnhealthyNodes()); + Assertions.assertEquals(2135802257, model.deltaHealthPolicy().maxPercentUpgradeDomainDeltaUnhealthyNodes()); + Assertions.assertEquals(1817909710, model.deltaHealthPolicy().maxPercentDeltaUnhealthyApplications()); + Assertions.assertEquals("xtrthz", model.monitoringPolicy().healthCheckWaitDuration()); + Assertions.assertEquals("aytdwkqbrq", model.monitoringPolicy().healthCheckStableDuration()); + Assertions.assertEquals("bpaxhexiilivpdt", model.monitoringPolicy().healthCheckRetryTimeout()); + Assertions.assertEquals("irqtdqoa", model.monitoringPolicy().upgradeTimeout()); + Assertions.assertEquals("oruzfgsquyfxrxx", model.monitoringPolicy().upgradeDomainTimeout()); + Assertions.assertEquals("ptramxj", model.upgradeReplicaSetCheckTimeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterUpgradePolicy model = new ClusterUpgradePolicy().withForceRestart(false) - .withHealthPolicy(new ClusterHealthPolicy().withMaxPercentUnhealthyNodes(1947559864) - .withMaxPercentUnhealthyApplications(2088277848)) - .withDeltaHealthPolicy(new ClusterUpgradeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyNodes(101100234) - .withMaxPercentUpgradeDomainDeltaUnhealthyNodes(972343553) - .withMaxPercentDeltaUnhealthyApplications(636112442)) - .withMonitoringPolicy(new ClusterMonitoringPolicy().withHealthCheckWaitDuration("gwimfn") - .withHealthCheckStableDuration("hfjx") - .withHealthCheckRetryTimeout("mszkkfo") - .withUpgradeTimeout("rey") - .withUpgradeDomainTimeout("kzikfjawneaivxwc")) - .withUpgradeReplicaSetCheckTimeout("lpcirelsf"); + ClusterUpgradePolicy model = new ClusterUpgradePolicy().withForceRestart(true) + .withHealthPolicy(new ClusterHealthPolicy().withMaxPercentUnhealthyNodes(1682881109) + .withMaxPercentUnhealthyApplications(207967373)) + .withDeltaHealthPolicy(new ClusterUpgradeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyNodes(2025880638) + .withMaxPercentUpgradeDomainDeltaUnhealthyNodes(2135802257) + .withMaxPercentDeltaUnhealthyApplications(1817909710)) + .withMonitoringPolicy(new ClusterMonitoringPolicy().withHealthCheckWaitDuration("xtrthz") + .withHealthCheckStableDuration("aytdwkqbrq") + .withHealthCheckRetryTimeout("bpaxhexiilivpdt") + .withUpgradeTimeout("irqtdqoa") + .withUpgradeDomainTimeout("oruzfgsquyfxrxx")) + .withUpgradeReplicaSetCheckTimeout("ptramxj"); model = BinaryData.fromObject(model).toObject(ClusterUpgradePolicy.class); - Assertions.assertFalse(model.forceRestart()); - Assertions.assertEquals(1947559864, model.healthPolicy().maxPercentUnhealthyNodes()); - Assertions.assertEquals(2088277848, model.healthPolicy().maxPercentUnhealthyApplications()); - Assertions.assertEquals(101100234, model.deltaHealthPolicy().maxPercentDeltaUnhealthyNodes()); - Assertions.assertEquals(972343553, model.deltaHealthPolicy().maxPercentUpgradeDomainDeltaUnhealthyNodes()); - Assertions.assertEquals(636112442, model.deltaHealthPolicy().maxPercentDeltaUnhealthyApplications()); - Assertions.assertEquals("gwimfn", model.monitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("hfjx", model.monitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("mszkkfo", model.monitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("rey", model.monitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("kzikfjawneaivxwc", model.monitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals("lpcirelsf", model.upgradeReplicaSetCheckTimeout()); + Assertions.assertTrue(model.forceRestart()); + Assertions.assertEquals(1682881109, model.healthPolicy().maxPercentUnhealthyNodes()); + Assertions.assertEquals(207967373, model.healthPolicy().maxPercentUnhealthyApplications()); + Assertions.assertEquals(2025880638, model.deltaHealthPolicy().maxPercentDeltaUnhealthyNodes()); + Assertions.assertEquals(2135802257, model.deltaHealthPolicy().maxPercentUpgradeDomainDeltaUnhealthyNodes()); + Assertions.assertEquals(1817909710, model.deltaHealthPolicy().maxPercentDeltaUnhealthyApplications()); + Assertions.assertEquals("xtrthz", model.monitoringPolicy().healthCheckWaitDuration()); + Assertions.assertEquals("aytdwkqbrq", model.monitoringPolicy().healthCheckStableDuration()); + Assertions.assertEquals("bpaxhexiilivpdt", model.monitoringPolicy().healthCheckRetryTimeout()); + Assertions.assertEquals("irqtdqoa", model.monitoringPolicy().upgradeTimeout()); + Assertions.assertEquals("oruzfgsquyfxrxx", model.monitoringPolicy().upgradeDomainTimeout()); + Assertions.assertEquals("ptramxj", model.upgradeReplicaSetCheckTimeout()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/EndpointRangeDescriptionTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/EndpointRangeDescriptionTests.java index 1d65e5c647c6..c1ab1019a891 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/EndpointRangeDescriptionTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/EndpointRangeDescriptionTests.java @@ -11,17 +11,18 @@ public final class EndpointRangeDescriptionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EndpointRangeDescription model = BinaryData.fromString("{\"startPort\":988966310,\"endPort\":485732763}") + EndpointRangeDescription model = BinaryData.fromString("{\"startPort\":1437302517,\"endPort\":2035857816}") .toObject(EndpointRangeDescription.class); - Assertions.assertEquals(988966310, model.startPort()); - Assertions.assertEquals(485732763, model.endPort()); + Assertions.assertEquals(1437302517, model.startPort()); + Assertions.assertEquals(2035857816, model.endPort()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EndpointRangeDescription model = new EndpointRangeDescription().withStartPort(988966310).withEndPort(485732763); + EndpointRangeDescription model + = new EndpointRangeDescription().withStartPort(1437302517).withEndPort(2035857816); model = BinaryData.fromObject(model).toObject(EndpointRangeDescription.class); - Assertions.assertEquals(988966310, model.startPort()); - Assertions.assertEquals(485732763, model.endPort()); + Assertions.assertEquals(1437302517, model.startPort()); + Assertions.assertEquals(2035857816, model.endPort()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationConstraintsTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationConstraintsTests.java index 8b7dcbcdf198..211cf70bb66b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationConstraintsTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationConstraintsTests.java @@ -12,16 +12,16 @@ public final class FaultSimulationConstraintsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FaultSimulationConstraints model = BinaryData.fromString("{\"expirationTime\":\"2021-11-21T09:22:46Z\"}") + FaultSimulationConstraints model = BinaryData.fromString("{\"expirationTime\":\"2021-08-26T13:15:20Z\"}") .toObject(FaultSimulationConstraints.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-21T09:22:46Z"), model.expirationTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-26T13:15:20Z"), model.expirationTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FaultSimulationConstraints model - = new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-11-21T09:22:46Z")); + = new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-08-26T13:15:20Z")); model = BinaryData.fromObject(model).toObject(FaultSimulationConstraints.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-21T09:22:46Z"), model.expirationTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-26T13:15:20Z"), model.expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentTests.java index f8e363e8d98e..58305196fedd 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentTests.java @@ -14,19 +14,19 @@ public final class FaultSimulationContentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FaultSimulationContent model = BinaryData.fromString( - "{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-06-09T08:03:32Z\"}}") + "{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-12-03T02:45:56Z\"}}") .toObject(FaultSimulationContent.class); Assertions.assertTrue(model.force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T08:03:32Z"), model.constraints().expirationTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T02:45:56Z"), model.constraints().expirationTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FaultSimulationContent model = new FaultSimulationContent().withForce(true) .withConstraints( - new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-06-09T08:03:32Z"))); + new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-12-03T02:45:56Z"))); model = BinaryData.fromObject(model).toObject(FaultSimulationContent.class); Assertions.assertTrue(model.force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T08:03:32Z"), model.constraints().expirationTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T02:45:56Z"), model.constraints().expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentWrapperTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentWrapperTests.java index 6cade38cf395..695b02bba346 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentWrapperTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentWrapperTests.java @@ -15,22 +15,22 @@ public final class FaultSimulationContentWrapperTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FaultSimulationContentWrapper model = BinaryData.fromString( - "{\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-03-04T19:19:07Z\"}}}") + "{\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-08-04T06:20:25Z\"}}}") .toObject(FaultSimulationContentWrapper.class); - Assertions.assertFalse(model.parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T19:19:07Z"), + Assertions.assertTrue(model.parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-04T06:20:25Z"), model.parameters().constraints().expirationTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FaultSimulationContentWrapper model - = new FaultSimulationContentWrapper().withParameters(new FaultSimulationContent().withForce(false) + = new FaultSimulationContentWrapper().withParameters(new FaultSimulationContent().withForce(true) .withConstraints( - new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-03-04T19:19:07Z")))); + new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-08-04T06:20:25Z")))); model = BinaryData.fromObject(model).toObject(FaultSimulationContentWrapper.class); - Assertions.assertFalse(model.parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T19:19:07Z"), + Assertions.assertTrue(model.parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-04T06:20:25Z"), model.parameters().constraints().expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationDetailsTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationDetailsTests.java index ae81bd80ee76..f830d45a4785 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationDetailsTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationDetailsTests.java @@ -15,16 +15,16 @@ public final class FaultSimulationDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FaultSimulationDetails model = BinaryData.fromString( - "{\"clusterId\":\"thzvaytdwkqbrqu\",\"operationId\":\"axhexiilivp\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"r\",\"status\":\"Done\",\"operationId\":\"oaxoruzfgsqu\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"xxle\",\"status\":\"Done\",\"operationId\":\"mxjezwlw\",\"operationStatus\":\"Succeeded\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-10-02T16:07:13Z\"}}}") + "{\"clusterId\":\"wabm\",\"operationId\":\"efkifr\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"qujmqlgkf\",\"status\":\"StopFailed\",\"operationId\":\"oaongbjc\",\"operationStatus\":\"Failed\"},{\"nodeTypeName\":\"i\",\"status\":\"Stopping\",\"operationId\":\"df\",\"operationStatus\":\"Created\"},{\"nodeTypeName\":\"ezkojvdcp\",\"status\":\"Active\",\"operationId\":\"ouicybxarzgszu\",\"operationStatus\":\"Created\"},{\"nodeTypeName\":\"iqopidoamciod\",\"status\":\"Starting\",\"operationId\":\"zxkhnzbonlwnto\",\"operationStatus\":\"Aborted\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-09-24T01:53:24Z\"}}}") .toObject(FaultSimulationDetails.class); - Assertions.assertEquals("thzvaytdwkqbrqu", model.clusterId()); - Assertions.assertEquals("axhexiilivp", model.operationId()); - Assertions.assertEquals("r", model.nodeTypeFaultSimulation().get(0).nodeTypeName()); - Assertions.assertEquals(FaultSimulationStatus.DONE, model.nodeTypeFaultSimulation().get(0).status()); - Assertions.assertEquals("oaxoruzfgsqu", model.nodeTypeFaultSimulation().get(0).operationId()); - Assertions.assertEquals(SfmcOperationStatus.STARTED, model.nodeTypeFaultSimulation().get(0).operationStatus()); + Assertions.assertEquals("wabm", model.clusterId()); + Assertions.assertEquals("efkifr", model.operationId()); + Assertions.assertEquals("qujmqlgkf", model.nodeTypeFaultSimulation().get(0).nodeTypeName()); + Assertions.assertEquals(FaultSimulationStatus.STOP_FAILED, model.nodeTypeFaultSimulation().get(0).status()); + Assertions.assertEquals("oaongbjc", model.nodeTypeFaultSimulation().get(0).operationId()); + Assertions.assertEquals(SfmcOperationStatus.FAILED, model.nodeTypeFaultSimulation().get(0).operationStatus()); Assertions.assertFalse(model.parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-02T16:07:13Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-24T01:53:24Z"), model.parameters().constraints().expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationIdContentTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationIdContentTests.java index 043d065d31f7..03657107ddfa 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationIdContentTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationIdContentTests.java @@ -12,14 +12,14 @@ public final class FaultSimulationIdContentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FaultSimulationIdContent model - = BinaryData.fromString("{\"simulationId\":\"dgssofwqmzqal\"}").toObject(FaultSimulationIdContent.class); - Assertions.assertEquals("dgssofwqmzqal", model.simulationId()); + = BinaryData.fromString("{\"simulationId\":\"yhmlwpaztzp\"}").toObject(FaultSimulationIdContent.class); + Assertions.assertEquals("yhmlwpaztzp", model.simulationId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FaultSimulationIdContent model = new FaultSimulationIdContent().withSimulationId("dgssofwqmzqal"); + FaultSimulationIdContent model = new FaultSimulationIdContent().withSimulationId("yhmlwpaztzp"); model = BinaryData.fromObject(model).toObject(FaultSimulationIdContent.class); - Assertions.assertEquals("dgssofwqmzqal", model.simulationId()); + Assertions.assertEquals("yhmlwpaztzp", model.simulationId()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationInnerTests.java index fe208875607b..96c61a7b632a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationInnerTests.java @@ -15,22 +15,21 @@ public final class FaultSimulationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FaultSimulationInner model = BinaryData.fromString( - "{\"simulationId\":\"mnjijpxacqqudf\",\"status\":\"Active\",\"startTime\":\"2021-06-13T18:20:41Z\",\"endTime\":\"2021-01-28T01:39:16Z\",\"details\":{\"clusterId\":\"jyvayffimrzrtuz\",\"operationId\":\"gsexne\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"wnwmewzs\",\"status\":\"Starting\",\"operationId\":\"uzsoi\",\"operationStatus\":\"Failed\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-08-16T07:42:29Z\"}}}}") + "{\"simulationId\":\"ncckw\",\"status\":\"Active\",\"startTime\":\"2021-06-29T06:08:24Z\",\"endTime\":\"2021-07-28T19:48:05Z\",\"details\":{\"clusterId\":\"uyqaxzfeqztppr\",\"operationId\":\"lxorjaltolmncws\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"csdbnwdcfhuc\",\"status\":\"Done\",\"operationId\":\"uvglsbjjcanvx\",\"operationStatus\":\"Canceled\"},{\"nodeTypeName\":\"udutnco\",\"status\":\"Stopping\",\"operationId\":\"xqtvcofu\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"kgjubgdknnqvsazn\",\"status\":\"Active\",\"operationId\":\"rudsg\",\"operationStatus\":\"Aborted\"},{\"nodeTypeName\":\"kycgrauwj\",\"status\":\"Starting\",\"operationId\":\"eburu\",\"operationStatus\":\"Canceled\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-06-02T15:45:41Z\"}}}}") .toObject(FaultSimulationInner.class); - Assertions.assertEquals("mnjijpxacqqudf", model.simulationId()); + Assertions.assertEquals("ncckw", model.simulationId()); Assertions.assertEquals(FaultSimulationStatus.ACTIVE, model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-13T18:20:41Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-28T01:39:16Z"), model.endTime()); - Assertions.assertEquals("jyvayffimrzrtuz", model.details().clusterId()); - Assertions.assertEquals("gsexne", model.details().operationId()); - Assertions.assertEquals("wnwmewzs", model.details().nodeTypeFaultSimulation().get(0).nodeTypeName()); - Assertions.assertEquals(FaultSimulationStatus.STARTING, - model.details().nodeTypeFaultSimulation().get(0).status()); - Assertions.assertEquals("uzsoi", model.details().nodeTypeFaultSimulation().get(0).operationId()); - Assertions.assertEquals(SfmcOperationStatus.FAILED, + Assertions.assertEquals(OffsetDateTime.parse("2021-06-29T06:08:24Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-28T19:48:05Z"), model.endTime()); + Assertions.assertEquals("uyqaxzfeqztppr", model.details().clusterId()); + Assertions.assertEquals("lxorjaltolmncws", model.details().operationId()); + Assertions.assertEquals("csdbnwdcfhuc", model.details().nodeTypeFaultSimulation().get(0).nodeTypeName()); + Assertions.assertEquals(FaultSimulationStatus.DONE, model.details().nodeTypeFaultSimulation().get(0).status()); + Assertions.assertEquals("uvglsbjjcanvx", model.details().nodeTypeFaultSimulation().get(0).operationId()); + Assertions.assertEquals(SfmcOperationStatus.CANCELED, model.details().nodeTypeFaultSimulation().get(0).operationStatus()); - Assertions.assertTrue(model.details().parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-16T07:42:29Z"), + Assertions.assertFalse(model.details().parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-02T15:45:41Z"), model.details().parameters().constraints().expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationListResultTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationListResultTests.java index b45334bbd7e2..71f177d1915d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationListResultTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationListResultTests.java @@ -15,23 +15,25 @@ public final class FaultSimulationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FaultSimulationListResult model = BinaryData.fromString( - "{\"value\":[{\"simulationId\":\"pulpqblylsyxk\",\"status\":\"StopFailed\",\"startTime\":\"2021-09-15T07:03:18Z\",\"endTime\":\"2021-04-06T04:34:54Z\",\"details\":{\"clusterId\":\"iagxsdszuempsbz\",\"operationId\":\"z\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"pnqi\",\"status\":\"Active\",\"operationId\":\"v\",\"operationStatus\":\"Failed\"},{\"nodeTypeName\":\"dxrbuukzcle\",\"status\":\"StartFailed\",\"operationId\":\"lw\",\"operationStatus\":\"Succeeded\"},{\"nodeTypeName\":\"zpof\",\"status\":\"Stopping\",\"operationId\":\"wyfzqwhxxbuyqa\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"qztpp\",\"status\":\"Stopping\",\"operationId\":\"xorjaltolmncwsob\",\"operationStatus\":\"Created\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-09-05T19:42:48Z\"}}}},{\"simulationId\":\"fhucqdpfuv\",\"status\":\"Done\",\"startTime\":\"2021-09-06T08:21:41Z\",\"endTime\":\"2021-05-13T14:00:03Z\",\"details\":{\"clusterId\":\"vxb\",\"operationId\":\"vudutncor\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"qtvcofudflvkgj\",\"status\":\"Done\",\"operationId\":\"knnqvsaznq\",\"operationStatus\":\"Failed\"},{\"nodeTypeName\":\"udsgs\",\"status\":\"Done\",\"operationId\":\"yc\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"wjue\",\"status\":\"StartFailed\",\"operationId\":\"uruv\",\"operationStatus\":\"Aborted\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2020-12-25T04:12:31Z\"}}}}],\"nextLink\":\"ab\"}") + "{\"value\":[{\"simulationId\":\"wyznkbyku\",\"status\":\"StartFailed\",\"startTime\":\"2021-12-03T17:47:47Z\",\"endTime\":\"2021-10-22T08:31:17Z\",\"details\":{\"clusterId\":\"hrskdsnfd\",\"operationId\":\"oakgtdlmkkzev\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"wpusdsttwvogv\",\"status\":\"Done\",\"operationId\":\"dcngqqmoakufgmj\",\"operationStatus\":\"Canceled\"},{\"nodeTypeName\":\"dgrtwaenuuzkopbm\",\"status\":\"Active\",\"operationId\":\"dwoyuhhziuiefoz\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"smlmzqhoftrm\",\"status\":\"Starting\",\"operationId\":\"iahxicsl\",\"operationStatus\":\"Succeeded\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-04-23T06:55:46Z\"}}}},{\"simulationId\":\"halns\",\"status\":\"Done\",\"startTime\":\"2021-07-18T12:17:06Z\",\"endTime\":\"2021-10-17T19:05:13Z\",\"details\":{\"clusterId\":\"ivwitqscywugg\",\"operationId\":\"luhczbw\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"i\",\"status\":\"Starting\",\"operationId\":\"gzd\",\"operationStatus\":\"Succeeded\"},{\"nodeTypeName\":\"eypqwdxggicccn\",\"status\":\"Starting\",\"operationId\":\"exmk\",\"operationStatus\":\"Failed\"},{\"nodeTypeName\":\"tvlz\",\"status\":\"Starting\",\"operationId\":\"hz\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"dtclusiypb\",\"status\":\"Done\",\"operationId\":\"tg\",\"operationStatus\":\"Created\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-06-12T00:27:16Z\"}}}}],\"nextLink\":\"qukyhejhzi\"}") .toObject(FaultSimulationListResult.class); - Assertions.assertEquals("pulpqblylsyxk", model.value().get(0).simulationId()); - Assertions.assertEquals(FaultSimulationStatus.STOP_FAILED, model.value().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-15T07:03:18Z"), model.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T04:34:54Z"), model.value().get(0).endTime()); - Assertions.assertEquals("iagxsdszuempsbz", model.value().get(0).details().clusterId()); - Assertions.assertEquals("z", model.value().get(0).details().operationId()); - Assertions.assertEquals("pnqi", model.value().get(0).details().nodeTypeFaultSimulation().get(0).nodeTypeName()); - Assertions.assertEquals(FaultSimulationStatus.ACTIVE, + Assertions.assertEquals("wyznkbyku", model.value().get(0).simulationId()); + Assertions.assertEquals(FaultSimulationStatus.START_FAILED, model.value().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T17:47:47Z"), model.value().get(0).startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-22T08:31:17Z"), model.value().get(0).endTime()); + Assertions.assertEquals("hrskdsnfd", model.value().get(0).details().clusterId()); + Assertions.assertEquals("oakgtdlmkkzev", model.value().get(0).details().operationId()); + Assertions.assertEquals("wpusdsttwvogv", + model.value().get(0).details().nodeTypeFaultSimulation().get(0).nodeTypeName()); + Assertions.assertEquals(FaultSimulationStatus.DONE, model.value().get(0).details().nodeTypeFaultSimulation().get(0).status()); - Assertions.assertEquals("v", model.value().get(0).details().nodeTypeFaultSimulation().get(0).operationId()); - Assertions.assertEquals(SfmcOperationStatus.FAILED, + Assertions.assertEquals("dcngqqmoakufgmj", + model.value().get(0).details().nodeTypeFaultSimulation().get(0).operationId()); + Assertions.assertEquals(SfmcOperationStatus.CANCELED, model.value().get(0).details().nodeTypeFaultSimulation().get(0).operationStatus()); - Assertions.assertFalse(model.value().get(0).details().parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T19:42:48Z"), + Assertions.assertTrue(model.value().get(0).details().parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-23T06:55:46Z"), model.value().get(0).details().parameters().constraints().expirationTime()); - Assertions.assertEquals("ab", model.nextLink()); + Assertions.assertEquals("qukyhejhzi", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FrontendConfigurationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FrontendConfigurationTests.java index b9172dbbdfc3..68f15dd01dd1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FrontendConfigurationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FrontendConfigurationTests.java @@ -13,24 +13,24 @@ public final class FrontendConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FrontendConfiguration model = BinaryData.fromString( - "{\"ipAddressType\":\"IPv4\",\"loadBalancerBackendAddressPoolId\":\"irryuzhlh\",\"loadBalancerInboundNatPoolId\":\"oqrvqqaatjin\",\"applicationGatewayBackendAddressPoolId\":\"goupmfiibfg\"}") + "{\"ipAddressType\":\"IPv6\",\"loadBalancerBackendAddressPoolId\":\"coolsttpkiwkkb\",\"loadBalancerInboundNatPoolId\":\"jrywvtylbfpnc\",\"applicationGatewayBackendAddressPoolId\":\"doiwi\"}") .toObject(FrontendConfiguration.class); - Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); - Assertions.assertEquals("irryuzhlh", model.loadBalancerBackendAddressPoolId()); - Assertions.assertEquals("oqrvqqaatjin", model.loadBalancerInboundNatPoolId()); - Assertions.assertEquals("goupmfiibfg", model.applicationGatewayBackendAddressPoolId()); + Assertions.assertEquals(IpAddressType.IPV6, model.ipAddressType()); + Assertions.assertEquals("coolsttpkiwkkb", model.loadBalancerBackendAddressPoolId()); + Assertions.assertEquals("jrywvtylbfpnc", model.loadBalancerInboundNatPoolId()); + Assertions.assertEquals("doiwi", model.applicationGatewayBackendAddressPoolId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FrontendConfiguration model = new FrontendConfiguration().withIpAddressType(IpAddressType.IPV4) - .withLoadBalancerBackendAddressPoolId("irryuzhlh") - .withLoadBalancerInboundNatPoolId("oqrvqqaatjin") - .withApplicationGatewayBackendAddressPoolId("goupmfiibfg"); + FrontendConfiguration model = new FrontendConfiguration().withIpAddressType(IpAddressType.IPV6) + .withLoadBalancerBackendAddressPoolId("coolsttpkiwkkb") + .withLoadBalancerInboundNatPoolId("jrywvtylbfpnc") + .withApplicationGatewayBackendAddressPoolId("doiwi"); model = BinaryData.fromObject(model).toObject(FrontendConfiguration.class); - Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); - Assertions.assertEquals("irryuzhlh", model.loadBalancerBackendAddressPoolId()); - Assertions.assertEquals("oqrvqqaatjin", model.loadBalancerInboundNatPoolId()); - Assertions.assertEquals("goupmfiibfg", model.applicationGatewayBackendAddressPoolId()); + Assertions.assertEquals(IpAddressType.IPV6, model.ipAddressType()); + Assertions.assertEquals("coolsttpkiwkkb", model.loadBalancerBackendAddressPoolId()); + Assertions.assertEquals("jrywvtylbfpnc", model.loadBalancerInboundNatPoolId()); + Assertions.assertEquals("doiwi", model.applicationGatewayBackendAddressPoolId()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationPublicIpAddressConfigurationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationPublicIpAddressConfigurationTests.java index 93089db9bf1f..5876b41420df 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationPublicIpAddressConfigurationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationPublicIpAddressConfigurationTests.java @@ -15,27 +15,24 @@ public final class IpConfigurationPublicIpAddressConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpConfigurationPublicIpAddressConfiguration model = BinaryData.fromString( - "{\"name\":\"hxjbdhqxvc\",\"ipTags\":[{\"ipTagType\":\"rpdsof\",\"tag\":\"shrnsvbuswdvz\"},{\"ipTagType\":\"ybycnunvj\",\"tag\":\"rtkfawnopq\"},{\"ipTagType\":\"ikyzirtxdy\",\"tag\":\"x\"},{\"ipTagType\":\"ejnt\",\"tag\":\"sewgioilqukr\"}],\"publicIPAddressVersion\":\"IPv6\"}") + "{\"name\":\"lvtno\",\"ipTags\":[{\"ipTagType\":\"zgemjdftuljlt\",\"tag\":\"ucea\"}],\"publicIPAddressVersion\":\"IPv4\"}") .toObject(IpConfigurationPublicIpAddressConfiguration.class); - Assertions.assertEquals("hxjbdhqxvc", model.name()); - Assertions.assertEquals("rpdsof", model.ipTags().get(0).ipTagType()); - Assertions.assertEquals("shrnsvbuswdvz", model.ipTags().get(0).tag()); - Assertions.assertEquals(PublicIpAddressVersion.IPV6, model.publicIpAddressVersion()); + Assertions.assertEquals("lvtno", model.name()); + Assertions.assertEquals("zgemjdftuljlt", model.ipTags().get(0).ipTagType()); + Assertions.assertEquals("ucea", model.ipTags().get(0).tag()); + Assertions.assertEquals(PublicIpAddressVersion.IPV4, model.publicIpAddressVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { IpConfigurationPublicIpAddressConfiguration model - = new IpConfigurationPublicIpAddressConfiguration().withName("hxjbdhqxvc") - .withIpTags(Arrays.asList(new IpTag().withIpTagType("rpdsof").withTag("shrnsvbuswdvz"), - new IpTag().withIpTagType("ybycnunvj").withTag("rtkfawnopq"), - new IpTag().withIpTagType("ikyzirtxdy").withTag("x"), - new IpTag().withIpTagType("ejnt").withTag("sewgioilqukr"))) - .withPublicIpAddressVersion(PublicIpAddressVersion.IPV6); + = new IpConfigurationPublicIpAddressConfiguration().withName("lvtno") + .withIpTags(Arrays.asList(new IpTag().withIpTagType("zgemjdftuljlt").withTag("ucea"))) + .withPublicIpAddressVersion(PublicIpAddressVersion.IPV4); model = BinaryData.fromObject(model).toObject(IpConfigurationPublicIpAddressConfiguration.class); - Assertions.assertEquals("hxjbdhqxvc", model.name()); - Assertions.assertEquals("rpdsof", model.ipTags().get(0).ipTagType()); - Assertions.assertEquals("shrnsvbuswdvz", model.ipTags().get(0).tag()); - Assertions.assertEquals(PublicIpAddressVersion.IPV6, model.publicIpAddressVersion()); + Assertions.assertEquals("lvtno", model.name()); + Assertions.assertEquals("zgemjdftuljlt", model.ipTags().get(0).ipTagType()); + Assertions.assertEquals("ucea", model.ipTags().get(0).tag()); + Assertions.assertEquals(PublicIpAddressVersion.IPV4, model.publicIpAddressVersion()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationTests.java index 4c1ae2e16290..17207f13648d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationTests.java @@ -18,51 +18,46 @@ public final class IpConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpConfiguration model = BinaryData.fromString( - "{\"name\":\"coolsttpkiwkkb\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"ywvtylbfpnc\"},{\"id\":\"doiwi\"},{\"id\":\"htywubxcbihwq\"},{\"id\":\"fdntwjchrdgoih\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"ctondz\"},{\"id\":\"uu\"},{\"id\":\"dlwggytsbwtovv\"},{\"id\":\"seinqfiuf\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"pirgnepttwq\"},{\"id\":\"niffcdmqnroj\"},{\"id\":\"ijnkrxfrdd\"},{\"id\":\"ratiz\"}],\"subnet\":{\"id\":\"nasx\"},\"privateIPAddressVersion\":\"IPv6\",\"publicIPAddressConfiguration\":{\"name\":\"zq\",\"ipTags\":[{\"ipTagType\":\"f\",\"tag\":\"wesgogczh\"},{\"ipTagType\":\"nnxk\",\"tag\":\"lgnyhmo\"},{\"ipTagType\":\"sxkkg\",\"tag\":\"h\"}],\"publicIPAddressVersion\":\"IPv4\"}}") + "{\"name\":\"n\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"sx\"},{\"id\":\"foimwkslircizjxv\"},{\"id\":\"fceacvlhvygd\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"mrtwna\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"biwkojgcyzt\"}],\"subnet\":{\"id\":\"z\"},\"privateIPAddressVersion\":\"IPv6\",\"publicIPAddressConfiguration\":{\"name\":\"qphchqnrnrpxehuw\",\"ipTags\":[{\"ipTagType\":\"qgaifmviklbydv\",\"tag\":\"hbejdznxcvdsrhnj\"}],\"publicIPAddressVersion\":\"IPv6\"}}") .toObject(IpConfiguration.class); - Assertions.assertEquals("coolsttpkiwkkb", model.name()); - Assertions.assertEquals("ywvtylbfpnc", model.applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("ctondz", model.loadBalancerBackendAddressPools().get(0).id()); - Assertions.assertEquals("pirgnepttwq", model.loadBalancerInboundNatPools().get(0).id()); - Assertions.assertEquals("nasx", model.subnet().id()); + Assertions.assertEquals("n", model.name()); + Assertions.assertEquals("sx", model.applicationGatewayBackendAddressPools().get(0).id()); + Assertions.assertEquals("mrtwna", model.loadBalancerBackendAddressPools().get(0).id()); + Assertions.assertEquals("biwkojgcyzt", model.loadBalancerInboundNatPools().get(0).id()); + Assertions.assertEquals("z", model.subnet().id()); Assertions.assertEquals(PrivateIpAddressVersion.IPV6, model.privateIpAddressVersion()); - Assertions.assertEquals("zq", model.publicIpAddressConfiguration().name()); - Assertions.assertEquals("f", model.publicIpAddressConfiguration().ipTags().get(0).ipTagType()); - Assertions.assertEquals("wesgogczh", model.publicIpAddressConfiguration().ipTags().get(0).tag()); - Assertions.assertEquals(PublicIpAddressVersion.IPV4, + Assertions.assertEquals("qphchqnrnrpxehuw", model.publicIpAddressConfiguration().name()); + Assertions.assertEquals("qgaifmviklbydv", model.publicIpAddressConfiguration().ipTags().get(0).ipTagType()); + Assertions.assertEquals("hbejdznxcvdsrhnj", model.publicIpAddressConfiguration().ipTags().get(0).tag()); + Assertions.assertEquals(PublicIpAddressVersion.IPV6, model.publicIpAddressConfiguration().publicIpAddressVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpConfiguration model = new IpConfiguration().withName("coolsttpkiwkkb") - .withApplicationGatewayBackendAddressPools( - Arrays.asList(new SubResource().withId("ywvtylbfpnc"), new SubResource().withId("doiwi"), - new SubResource().withId("htywubxcbihwq"), new SubResource().withId("fdntwjchrdgoih"))) - .withLoadBalancerBackendAddressPools( - Arrays.asList(new SubResource().withId("ctondz"), new SubResource().withId("uu"), - new SubResource().withId("dlwggytsbwtovv"), new SubResource().withId("seinqfiuf"))) - .withLoadBalancerInboundNatPools( - Arrays.asList(new SubResource().withId("pirgnepttwq"), new SubResource().withId("niffcdmqnroj"), - new SubResource().withId("ijnkrxfrdd"), new SubResource().withId("ratiz"))) - .withSubnet(new SubResource().withId("nasx")) - .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV6) - .withPublicIpAddressConfiguration(new IpConfigurationPublicIpAddressConfiguration().withName("zq") - .withIpTags(Arrays.asList(new IpTag().withIpTagType("f").withTag("wesgogczh"), - new IpTag().withIpTagType("nnxk").withTag("lgnyhmo"), - new IpTag().withIpTagType("sxkkg").withTag("h"))) - .withPublicIpAddressVersion(PublicIpAddressVersion.IPV4)); + IpConfiguration model + = new IpConfiguration().withName("n") + .withApplicationGatewayBackendAddressPools(Arrays.asList(new SubResource().withId("sx"), + new SubResource().withId("foimwkslircizjxv"), new SubResource().withId("fceacvlhvygd"))) + .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource().withId("mrtwna"))) + .withLoadBalancerInboundNatPools(Arrays.asList(new SubResource().withId("biwkojgcyzt"))) + .withSubnet(new SubResource().withId("z")) + .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV6) + .withPublicIpAddressConfiguration(new IpConfigurationPublicIpAddressConfiguration() + .withName("qphchqnrnrpxehuw") + .withIpTags(Arrays.asList(new IpTag().withIpTagType("qgaifmviklbydv").withTag("hbejdznxcvdsrhnj"))) + .withPublicIpAddressVersion(PublicIpAddressVersion.IPV6)); model = BinaryData.fromObject(model).toObject(IpConfiguration.class); - Assertions.assertEquals("coolsttpkiwkkb", model.name()); - Assertions.assertEquals("ywvtylbfpnc", model.applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("ctondz", model.loadBalancerBackendAddressPools().get(0).id()); - Assertions.assertEquals("pirgnepttwq", model.loadBalancerInboundNatPools().get(0).id()); - Assertions.assertEquals("nasx", model.subnet().id()); + Assertions.assertEquals("n", model.name()); + Assertions.assertEquals("sx", model.applicationGatewayBackendAddressPools().get(0).id()); + Assertions.assertEquals("mrtwna", model.loadBalancerBackendAddressPools().get(0).id()); + Assertions.assertEquals("biwkojgcyzt", model.loadBalancerInboundNatPools().get(0).id()); + Assertions.assertEquals("z", model.subnet().id()); Assertions.assertEquals(PrivateIpAddressVersion.IPV6, model.privateIpAddressVersion()); - Assertions.assertEquals("zq", model.publicIpAddressConfiguration().name()); - Assertions.assertEquals("f", model.publicIpAddressConfiguration().ipTags().get(0).ipTagType()); - Assertions.assertEquals("wesgogczh", model.publicIpAddressConfiguration().ipTags().get(0).tag()); - Assertions.assertEquals(PublicIpAddressVersion.IPV4, + Assertions.assertEquals("qphchqnrnrpxehuw", model.publicIpAddressConfiguration().name()); + Assertions.assertEquals("qgaifmviklbydv", model.publicIpAddressConfiguration().ipTags().get(0).ipTagType()); + Assertions.assertEquals("hbejdznxcvdsrhnj", model.publicIpAddressConfiguration().ipTags().get(0).tag()); + Assertions.assertEquals(PublicIpAddressVersion.IPV6, model.publicIpAddressConfiguration().publicIpAddressVersion()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpTagTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpTagTests.java index aa45f125be32..f1459b10b099 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpTagTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpTagTests.java @@ -11,16 +11,16 @@ public final class IpTagTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IpTag model = BinaryData.fromString("{\"ipTagType\":\"vc\",\"tag\":\"ayrhyrnx\"}").toObject(IpTag.class); - Assertions.assertEquals("vc", model.ipTagType()); - Assertions.assertEquals("ayrhyrnx", model.tag()); + IpTag model = BinaryData.fromString("{\"ipTagType\":\"beddgssofw\",\"tag\":\"mzqa\"}").toObject(IpTag.class); + Assertions.assertEquals("beddgssofw", model.ipTagType()); + Assertions.assertEquals("mzqa", model.tag()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpTag model = new IpTag().withIpTagType("vc").withTag("ayrhyrnx"); + IpTag model = new IpTag().withIpTagType("beddgssofw").withTag("mzqa"); model = BinaryData.fromObject(model).toObject(IpTag.class); - Assertions.assertEquals("vc", model.ipTagType()); - Assertions.assertEquals("ayrhyrnx", model.tag()); + Assertions.assertEquals("beddgssofw", model.ipTagType()); + Assertions.assertEquals("mzqa", model.tag()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/LoadBalancingRuleTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/LoadBalancingRuleTests.java index 4688c4a77e2b..e2987115a359 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/LoadBalancingRuleTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/LoadBalancingRuleTests.java @@ -14,33 +14,33 @@ public final class LoadBalancingRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LoadBalancingRule model = BinaryData.fromString( - "{\"frontendPort\":929911976,\"backendPort\":1475911208,\"protocol\":\"tcp\",\"probePort\":161159064,\"probeProtocol\":\"https\",\"probeRequestPath\":\"utauv\",\"loadDistribution\":\"tkuwhhmhykojo\"}") + "{\"frontendPort\":772691250,\"backendPort\":1695810733,\"protocol\":\"udp\",\"probePort\":976430532,\"probeProtocol\":\"http\",\"probeRequestPath\":\"tfudxepx\",\"loadDistribution\":\"qagvrvm\"}") .toObject(LoadBalancingRule.class); - Assertions.assertEquals(929911976, model.frontendPort()); - Assertions.assertEquals(1475911208, model.backendPort()); - Assertions.assertEquals(Protocol.TCP, model.protocol()); - Assertions.assertEquals(161159064, model.probePort()); - Assertions.assertEquals(ProbeProtocol.HTTPS, model.probeProtocol()); - Assertions.assertEquals("utauv", model.probeRequestPath()); - Assertions.assertEquals("tkuwhhmhykojo", model.loadDistribution()); + Assertions.assertEquals(772691250, model.frontendPort()); + Assertions.assertEquals(1695810733, model.backendPort()); + Assertions.assertEquals(Protocol.UDP, model.protocol()); + Assertions.assertEquals(976430532, model.probePort()); + Assertions.assertEquals(ProbeProtocol.HTTP, model.probeProtocol()); + Assertions.assertEquals("tfudxepx", model.probeRequestPath()); + Assertions.assertEquals("qagvrvm", model.loadDistribution()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LoadBalancingRule model = new LoadBalancingRule().withFrontendPort(929911976) - .withBackendPort(1475911208) - .withProtocol(Protocol.TCP) - .withProbePort(161159064) - .withProbeProtocol(ProbeProtocol.HTTPS) - .withProbeRequestPath("utauv") - .withLoadDistribution("tkuwhhmhykojo"); + LoadBalancingRule model = new LoadBalancingRule().withFrontendPort(772691250) + .withBackendPort(1695810733) + .withProtocol(Protocol.UDP) + .withProbePort(976430532) + .withProbeProtocol(ProbeProtocol.HTTP) + .withProbeRequestPath("tfudxepx") + .withLoadDistribution("qagvrvm"); model = BinaryData.fromObject(model).toObject(LoadBalancingRule.class); - Assertions.assertEquals(929911976, model.frontendPort()); - Assertions.assertEquals(1475911208, model.backendPort()); - Assertions.assertEquals(Protocol.TCP, model.protocol()); - Assertions.assertEquals(161159064, model.probePort()); - Assertions.assertEquals(ProbeProtocol.HTTPS, model.probeProtocol()); - Assertions.assertEquals("utauv", model.probeRequestPath()); - Assertions.assertEquals("tkuwhhmhykojo", model.loadDistribution()); + Assertions.assertEquals(772691250, model.frontendPort()); + Assertions.assertEquals(1695810733, model.backendPort()); + Assertions.assertEquals(Protocol.UDP, model.protocol()); + Assertions.assertEquals(976430532, model.probePort()); + Assertions.assertEquals(ProbeProtocol.HTTP, model.probeProtocol()); + Assertions.assertEquals("tfudxepx", model.probeRequestPath()); + Assertions.assertEquals("qagvrvm", model.loadDistribution()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowsPostWithResponsMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowsPostWithResponsMockTests.java index eaa25f3dd384..1f3784bf2444 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowsPostWithResponsMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowsPostWithResponsMockTests.java @@ -27,7 +27,8 @@ public void testPostWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.managedApplyMaintenanceWindows().postWithResponse("tnpsihclaf", "va", com.azure.core.util.Context.NONE); + manager.managedApplyMaintenanceWindows() + .postWithResponse("d", "cpfnznthjtwkja", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusInnerTests.java index 1d55cb239b26..0ea7c08ff23b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusInnerTests.java @@ -11,7 +11,7 @@ public final class ManagedAzResiliencyStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedAzResiliencyStatusInner model = BinaryData.fromString( - "{\"baseResourceStatus\":[{\"resourceName\":\"vtpuqujmqlgk\",\"resourceType\":\"tndoaongbjc\",\"isZoneResilient\":true,\"details\":\"i\"},{\"resourceName\":\"jed\",\"resourceType\":\"wwa\",\"isZoneResilient\":false,\"details\":\"jvdcpzfoqouic\"}],\"isClusterZoneResilient\":true}") + "{\"baseResourceStatus\":[{\"resourceName\":\"p\",\"resourceType\":\"ksrpqv\",\"isZoneResilient\":false,\"details\":\"aehtwd\"},{\"resourceName\":\"ftswibyrcdlbhsh\",\"resourceType\":\"p\",\"isZoneResilient\":false,\"details\":\"twitykhev\"},{\"resourceName\":\"cedcpnmdy\",\"resourceType\":\"nwzxltjcv\",\"isZoneResilient\":true,\"details\":\"iugcxnavvwxq\"},{\"resourceName\":\"y\",\"resourceType\":\"nyowxwlmdjrkvfg\",\"isZoneResilient\":false,\"details\":\"p\"}],\"isClusterZoneResilient\":false}") .toObject(ManagedAzResiliencyStatusInner.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetWithResponseMockTests.java index 22310e5acdf8..174a8da7e2b1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class ManagedAzResiliencyStatusesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"baseResourceStatus\":[{\"resourceName\":\"ophzfylsgcrp\",\"resourceType\":\"cunezzcezelfw\",\"isZoneResilient\":false,\"details\":\"wx\"}],\"isClusterZoneResilient\":true}"; + = "{\"baseResourceStatus\":[{\"resourceName\":\"zpnpbswv\",\"resourceType\":\"loccsrmozihm\",\"isZoneResilient\":false,\"details\":\"wtxxpkyjcx\"},{\"resourceName\":\"xgrytfmp\",\"resourceType\":\"cil\",\"isZoneResilient\":true,\"details\":\"ykggnoxuztrksx\"}],\"isClusterZoneResilient\":false}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ManagedAzResiliencyStatus response = manager.managedAzResiliencyStatuses() - .getWithResponse("v", "dibmikostbzbkiwb", com.azure.core.util.Context.NONE) + .getWithResponse("kxcoxpelnje", "agltsxoa", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterUpdateParametersTests.java index a6645605ffac..ded7d1062234 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterUpdateParametersTests.java @@ -13,17 +13,16 @@ public final class ManagedClusterUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ManagedClusterUpdateParameters model = BinaryData.fromString("{\"tags\":{\"ekkezzikhlyfjh\":\"kfcktqum\"}}") - .toObject(ManagedClusterUpdateParameters.class); - Assertions.assertEquals("kfcktqum", model.tags().get("ekkezzikhlyfjh")); + ManagedClusterUpdateParameters model + = BinaryData.fromString("{\"tags\":{\"fltkacjv\":\"wj\"}}").toObject(ManagedClusterUpdateParameters.class); + Assertions.assertEquals("wj", model.tags().get("fltkacjv")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedClusterUpdateParameters model - = new ManagedClusterUpdateParameters().withTags(mapOf("ekkezzikhlyfjh", "kfcktqum")); + ManagedClusterUpdateParameters model = new ManagedClusterUpdateParameters().withTags(mapOf("fltkacjv", "wj")); model = BinaryData.fromObject(model).toObject(ManagedClusterUpdateParameters.class); - Assertions.assertEquals("kfcktqum", model.tags().get("ekkezzikhlyfjh")); + Assertions.assertEquals("wj", model.tags().get("fltkacjv")); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetFaultSimulationWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetFaultSimulationWithResponseMockTests.java index 9e39665821f4..31300d8032d2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetFaultSimulationWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetFaultSimulationWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class ManagedClustersGetFaultSimulationWithResponseMockTests { @Test public void testGetFaultSimulationWithResponse() throws Exception { String responseStr - = "{\"simulationId\":\"rqjb\",\"status\":\"Active\",\"startTime\":\"2021-01-25T09:16:29Z\",\"endTime\":\"2021-01-05T10:30:14Z\",\"details\":{\"clusterId\":\"afhonqj\",\"operationId\":\"eickpz\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"pmxelnwcltyje\",\"status\":\"Stopping\",\"operationId\":\"mlfmkqs\",\"operationStatus\":\"Created\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-07-30T21:11:41Z\"}}}}"; + = "{\"simulationId\":\"qvhpsylkkshkbff\",\"status\":\"StopFailed\",\"startTime\":\"2021-04-10T03:24:01Z\",\"endTime\":\"2021-06-13T14:19:09Z\",\"details\":{\"clusterId\":\"wwp\",\"operationId\":\"xs\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"ujgicgaaoe\",\"status\":\"StopFailed\",\"operationId\":\"qutdewemxs\",\"operationStatus\":\"Failed\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-06-28T16:34:33Z\"}}}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,24 +34,24 @@ public void testGetFaultSimulationWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FaultSimulation response = manager.managedClusters() - .getFaultSimulationWithResponse("xecwcro", "phslhcawjutifdw", - new FaultSimulationIdContent().withSimulationId("mvi"), com.azure.core.util.Context.NONE) + .getFaultSimulationWithResponse("mwqkchcxwaxf", "w", + new FaultSimulationIdContent().withSimulationId("jkjexf"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("rqjb", response.simulationId()); - Assertions.assertEquals(FaultSimulationStatus.ACTIVE, response.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-25T09:16:29Z"), response.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T10:30:14Z"), response.endTime()); - Assertions.assertEquals("afhonqj", response.details().clusterId()); - Assertions.assertEquals("eickpz", response.details().operationId()); - Assertions.assertEquals("pmxelnwcltyje", response.details().nodeTypeFaultSimulation().get(0).nodeTypeName()); - Assertions.assertEquals(FaultSimulationStatus.STOPPING, + Assertions.assertEquals("qvhpsylkkshkbff", response.simulationId()); + Assertions.assertEquals(FaultSimulationStatus.STOP_FAILED, response.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-10T03:24:01Z"), response.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-13T14:19:09Z"), response.endTime()); + Assertions.assertEquals("wwp", response.details().clusterId()); + Assertions.assertEquals("xs", response.details().operationId()); + Assertions.assertEquals("ujgicgaaoe", response.details().nodeTypeFaultSimulation().get(0).nodeTypeName()); + Assertions.assertEquals(FaultSimulationStatus.STOP_FAILED, response.details().nodeTypeFaultSimulation().get(0).status()); - Assertions.assertEquals("mlfmkqs", response.details().nodeTypeFaultSimulation().get(0).operationId()); - Assertions.assertEquals(SfmcOperationStatus.CREATED, + Assertions.assertEquals("qutdewemxs", response.details().nodeTypeFaultSimulation().get(0).operationId()); + Assertions.assertEquals(SfmcOperationStatus.FAILED, response.details().nodeTypeFaultSimulation().get(0).operationStatus()); - Assertions.assertTrue(response.details().parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-30T21:11:41Z"), + Assertions.assertFalse(response.details().parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-28T16:34:33Z"), response.details().parameters().constraints().expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListFaultSimulationMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListFaultSimulationMockTests.java index ff45ee2b1050..6e5da9ff9dd9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListFaultSimulationMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListFaultSimulationMockTests.java @@ -24,7 +24,7 @@ public final class ManagedClustersListFaultSimulationMockTests { @Test public void testListFaultSimulation() throws Exception { String responseStr - = "{\"value\":[{\"simulationId\":\"hsphaivmxyas\",\"status\":\"StopFailed\",\"startTime\":\"2021-09-18T11:57:58Z\",\"endTime\":\"2021-01-20T23:20:50Z\",\"details\":{\"clusterId\":\"wakoihkn\",\"operationId\":\"jblmljhlnymz\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"ryuzcbmqqv\",\"status\":\"StartFailed\",\"operationId\":\"fgtayxonsup\",\"operationStatus\":\"Succeeded\"},{\"nodeTypeName\":\"zqn\",\"status\":\"StartFailed\",\"operationId\":\"ql\",\"operationStatus\":\"Failed\"},{\"nodeTypeName\":\"ibg\",\"status\":\"Done\",\"operationId\":\"xfyqonmpqoxwdo\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"iqxeiiqbimht\",\"status\":\"Stopping\",\"operationId\":\"nhe\",\"operationStatus\":\"Started\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-02-24T17:49:08Z\"}}}}]}"; + = "{\"value\":[{\"simulationId\":\"whixmonstsh\",\"status\":\"StartFailed\",\"startTime\":\"2021-11-30T03:41Z\",\"endTime\":\"2021-08-28T04:08:34Z\",\"details\":{\"clusterId\":\"lduccbi\",\"operationId\":\"svu\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"iegstm\",\"status\":\"StartFailed\",\"operationId\":\"jizcilnghgs\",\"operationStatus\":\"Created\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-09-06T18:31Z\"}}}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,25 +33,25 @@ public void testListFaultSimulation() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<FaultSimulation> response - = manager.managedClusters().listFaultSimulation("x", "uamwabzxrvxc", com.azure.core.util.Context.NONE); + PagedIterable<FaultSimulation> response = manager.managedClusters() + .listFaultSimulation("gehkfkimrtixokff", "yinljqe", com.azure.core.util.Context.NONE); - Assertions.assertEquals("hsphaivmxyas", response.iterator().next().simulationId()); - Assertions.assertEquals(FaultSimulationStatus.STOP_FAILED, response.iterator().next().status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T11:57:58Z"), response.iterator().next().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T23:20:50Z"), response.iterator().next().endTime()); - Assertions.assertEquals("wakoihkn", response.iterator().next().details().clusterId()); - Assertions.assertEquals("jblmljhlnymz", response.iterator().next().details().operationId()); - Assertions.assertEquals("ryuzcbmqqv", + Assertions.assertEquals("whixmonstsh", response.iterator().next().simulationId()); + Assertions.assertEquals(FaultSimulationStatus.START_FAILED, response.iterator().next().status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-30T03:41Z"), response.iterator().next().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-28T04:08:34Z"), response.iterator().next().endTime()); + Assertions.assertEquals("lduccbi", response.iterator().next().details().clusterId()); + Assertions.assertEquals("svu", response.iterator().next().details().operationId()); + Assertions.assertEquals("iegstm", response.iterator().next().details().nodeTypeFaultSimulation().get(0).nodeTypeName()); Assertions.assertEquals(FaultSimulationStatus.START_FAILED, response.iterator().next().details().nodeTypeFaultSimulation().get(0).status()); - Assertions.assertEquals("fgtayxonsup", + Assertions.assertEquals("jizcilnghgs", response.iterator().next().details().nodeTypeFaultSimulation().get(0).operationId()); - Assertions.assertEquals(SfmcOperationStatus.SUCCEEDED, + Assertions.assertEquals(SfmcOperationStatus.CREATED, response.iterator().next().details().nodeTypeFaultSimulation().get(0).operationStatus()); Assertions.assertFalse(response.iterator().next().details().parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-24T17:49:08Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T18:31Z"), response.iterator().next().details().parameters().constraints().expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusInnerTests.java index cda80be9ff64..c0d6d8f2de7a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusInnerTests.java @@ -11,7 +11,7 @@ public final class ManagedMaintenanceWindowStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedMaintenanceWindowStatusInner model = BinaryData.fromString( - "{\"isWindowEnabled\":true,\"isRegionReady\":false,\"isWindowActive\":false,\"canApplyUpdates\":true,\"lastWindowStatusUpdateAtUTC\":\"2021-10-15T06:55:02Z\",\"lastWindowStartTimeUTC\":\"2021-03-04T17:22:18Z\",\"lastWindowEndTimeUTC\":\"2021-10-02T18:29:47Z\"}") + "{\"isWindowEnabled\":true,\"isRegionReady\":false,\"isWindowActive\":false,\"canApplyUpdates\":true,\"lastWindowStatusUpdateAtUTC\":\"2021-03-14T01:14:47Z\",\"lastWindowStartTimeUTC\":\"2021-01-18T23:13:43Z\",\"lastWindowEndTimeUTC\":\"2021-02-18T14:41:58Z\"}") .toObject(ManagedMaintenanceWindowStatusInner.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetWithResponMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetWithResponMockTests.java index e9c800e05bed..c05b52ae745a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetWithResponMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetWithResponMockTests.java @@ -20,7 +20,7 @@ public final class ManagedMaintenanceWindowStatusesGetWithResponMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"isWindowEnabled\":true,\"isRegionReady\":false,\"isWindowActive\":false,\"canApplyUpdates\":true,\"lastWindowStatusUpdateAtUTC\":\"2021-11-26T04:41:12Z\",\"lastWindowStartTimeUTC\":\"2021-10-30T13:50:04Z\",\"lastWindowEndTimeUTC\":\"2021-03-27T13:01:29Z\"}"; + = "{\"isWindowEnabled\":false,\"isRegionReady\":false,\"isWindowActive\":false,\"canApplyUpdates\":true,\"lastWindowStatusUpdateAtUTC\":\"2021-10-01T04:20:56Z\",\"lastWindowStartTimeUTC\":\"2021-07-27T11:11:31Z\",\"lastWindowEndTimeUTC\":\"2021-08-19T07:20:59Z\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ManagedMaintenanceWindowStatus response = manager.managedMaintenanceWindowStatuses() - .getWithResponse("lpt", "sqqw", com.azure.core.util.Context.NONE) + .getWithResponse("srxuzvoam", "tcqiosmg", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetWithResponseMockTests.java index 63df7cd8876d..e019b14e2eac 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetWithResponseMockTests.java @@ -19,7 +19,8 @@ public final class ManagedUnsupportedVMSizesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - String responseStr = "{\"properties\":{\"size\":\"wvz\"},\"id\":\"zvd\",\"name\":\"zdix\",\"type\":\"q\"}"; + String responseStr + = "{\"properties\":{\"size\":\"kpzvcpopmxelnwc\"},\"id\":\"yjede\",\"name\":\"mlfmkqs\",\"type\":\"zuawxtzxpuamwa\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -29,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ManagedVMSize response = manager.managedUnsupportedVMSizes() - .getWithResponse("czurtlei", "q", com.azure.core.util.Context.NONE) + .getWithResponse("aglkafhon", "juj", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListMockTests.java index e8d91952ff4c..1e3f61f52af0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListMockTests.java @@ -21,7 +21,7 @@ public final class ManagedUnsupportedVMSizesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"size\":\"qhewj\"},\"id\":\"mcgsbostzelnd\",\"name\":\"tutmzl\",\"type\":\"ojlvfhrbbpneqvc\"}]}"; + = "{\"value\":[{\"properties\":{\"size\":\"haivm\"},\"id\":\"asflvg\",\"name\":\"zwywako\",\"type\":\"knsmjblmljhlnymz\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ManagedVMSize> response - = manager.managedUnsupportedVMSizes().list("noda", com.azure.core.util.Context.NONE); + = manager.managedUnsupportedVMSizes().list("zxrvxcus", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizeInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizeInnerTests.java index 1cd05dc50f42..2400031c0d6f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizeInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizeInnerTests.java @@ -12,7 +12,7 @@ public final class ManagedVMSizeInnerTests { public void testDeserialize() throws Exception { ManagedVMSizeInner model = BinaryData .fromString( - "{\"properties\":{\"size\":\"lvpnpp\"},\"id\":\"flrwd\",\"name\":\"dlxyjrxs\",\"type\":\"afcnih\"}") + "{\"properties\":{\"size\":\"k\"},\"id\":\"oxafn\",\"name\":\"lpichk\",\"type\":\"mkcdyhbpkkpwdre\"}") .toObject(ManagedVMSizeInner.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizesResultTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizesResultTests.java index 110c4fd85c04..7ef4c8ac5c3a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizesResultTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizesResultTests.java @@ -12,8 +12,8 @@ public final class ManagedVMSizesResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedVMSizesResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"size\":\"vpk\"},\"id\":\"dcvd\",\"name\":\"vo\",\"type\":\"sotbob\"},{\"properties\":{\"size\":\"pcjwv\"},\"id\":\"dldwmgxc\",\"name\":\"slpmutwuo\",\"type\":\"rpkhjwn\"},{\"properties\":{\"size\":\"sluicpdggkzz\"},\"id\":\"mbmpaxmodfvuefy\",\"name\":\"bpfvm\",\"type\":\"hrfou\"}],\"nextLink\":\"taakc\"}") + "{\"value\":[{\"properties\":{\"size\":\"s\"},\"id\":\"sytgadgvraea\",\"name\":\"e\",\"type\":\"zar\"},{\"properties\":{\"size\":\"q\"},\"id\":\"ijfqkacewiipfp\",\"name\":\"ji\",\"type\":\"wifto\"},{\"properties\":{\"size\":\"vpuvks\"},\"id\":\"lsa\",\"name\":\"ynfs\",\"type\":\"ljphuopxodl\"},{\"properties\":{\"size\":\"ntorzihleosjswsr\"},\"id\":\"lyzrpzbchckqqzqi\",\"name\":\"iysui\",\"type\":\"ynkedyatrwyhqmib\"}],\"nextLink\":\"hwit\"}") .toObject(ManagedVMSizesResult.class); - Assertions.assertEquals("taakc", model.nextLink()); + Assertions.assertEquals("hwit", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NamedPartitionSchemeTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NamedPartitionSchemeTests.java index f13784ba8d2f..6a7a345c1748 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NamedPartitionSchemeTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NamedPartitionSchemeTests.java @@ -12,17 +12,18 @@ public final class NamedPartitionSchemeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NamedPartitionScheme model = BinaryData.fromString( - "{\"partitionScheme\":\"Named\",\"names\":[\"loayqcgw\",\"tzjuzgwyzmhtxo\",\"gmtsavjcbpwxqpsr\",\"nftguvriuhpr\"]}") + NamedPartitionScheme model = BinaryData + .fromString( + "{\"partitionScheme\":\"Named\",\"names\":[\"bdagxt\",\"bqdxbx\",\"akbogqxndlkzgxh\",\"ripl\"]}") .toObject(NamedPartitionScheme.class); - Assertions.assertEquals("loayqcgw", model.names().get(0)); + Assertions.assertEquals("bdagxt", model.names().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamedPartitionScheme model = new NamedPartitionScheme() - .withNames(Arrays.asList("loayqcgw", "tzjuzgwyzmhtxo", "gmtsavjcbpwxqpsr", "nftguvriuhpr")); + NamedPartitionScheme model + = new NamedPartitionScheme().withNames(Arrays.asList("bdagxt", "bqdxbx", "akbogqxndlkzgxh", "ripl")); model = BinaryData.fromObject(model).toObject(NamedPartitionScheme.class); - Assertions.assertEquals("loayqcgw", model.names().get(0)); + Assertions.assertEquals("bdagxt", model.names().get(0)); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NetworkSecurityRuleTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NetworkSecurityRuleTests.java index b84cdd5beb71..e4d604da10cf 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NetworkSecurityRuleTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NetworkSecurityRuleTests.java @@ -16,54 +16,54 @@ public final class NetworkSecurityRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityRule model = BinaryData.fromString( - "{\"name\":\"afnn\",\"description\":\"pichkoymkcdy\",\"protocol\":\"http\",\"sourceAddressPrefixes\":[\"kpw\",\"reqnovvqfov\",\"jxywsuws\",\"rsndsytgadgvra\"],\"destinationAddressPrefixes\":[\"neqn\"],\"sourcePortRanges\":[\"rwlqu\",\"ijfqkacewiipfp\",\"bjibwwiftohq\",\"vpuvks\"],\"destinationPortRanges\":[\"saknynfsyn\"],\"sourceAddressPrefix\":\"ph\",\"destinationAddressPrefix\":\"pxodlqiyntorzih\",\"sourcePortRange\":\"osjswsr\",\"destinationPortRange\":\"lyzrpzbchckqqzqi\",\"access\":\"allow\",\"priority\":1257157038,\"direction\":\"outbound\"}") + "{\"name\":\"pkukghi\",\"description\":\"blxgwimf\",\"protocol\":\"esp\",\"sourceAddressPrefixes\":[\"j\",\"wmszkk\"],\"destinationAddressPrefixes\":[\"rey\",\"kzikfjawneaivxwc\"],\"sourcePortRanges\":[\"pcirelsfeaen\",\"abfatkl\",\"dxbjhwuaanozj\"],\"destinationPortRanges\":[\"hyoulpjr\"],\"sourceAddressPrefix\":\"ag\",\"destinationAddressPrefix\":\"vimjwos\",\"sourcePortRange\":\"xitc\",\"destinationPortRange\":\"fcktqumiekke\",\"access\":\"allow\",\"priority\":697538658,\"direction\":\"inbound\"}") .toObject(NetworkSecurityRule.class); - Assertions.assertEquals("afnn", model.name()); - Assertions.assertEquals("pichkoymkcdy", model.description()); - Assertions.assertEquals(NsgProtocol.HTTP, model.protocol()); - Assertions.assertEquals("kpw", model.sourceAddressPrefixes().get(0)); - Assertions.assertEquals("neqn", model.destinationAddressPrefixes().get(0)); - Assertions.assertEquals("rwlqu", model.sourcePortRanges().get(0)); - Assertions.assertEquals("saknynfsyn", model.destinationPortRanges().get(0)); - Assertions.assertEquals("ph", model.sourceAddressPrefix()); - Assertions.assertEquals("pxodlqiyntorzih", model.destinationAddressPrefix()); - Assertions.assertEquals("osjswsr", model.sourcePortRange()); - Assertions.assertEquals("lyzrpzbchckqqzqi", model.destinationPortRange()); + Assertions.assertEquals("pkukghi", model.name()); + Assertions.assertEquals("blxgwimf", model.description()); + Assertions.assertEquals(NsgProtocol.ESP, model.protocol()); + Assertions.assertEquals("j", model.sourceAddressPrefixes().get(0)); + Assertions.assertEquals("rey", model.destinationAddressPrefixes().get(0)); + Assertions.assertEquals("pcirelsfeaen", model.sourcePortRanges().get(0)); + Assertions.assertEquals("hyoulpjr", model.destinationPortRanges().get(0)); + Assertions.assertEquals("ag", model.sourceAddressPrefix()); + Assertions.assertEquals("vimjwos", model.destinationAddressPrefix()); + Assertions.assertEquals("xitc", model.sourcePortRange()); + Assertions.assertEquals("fcktqumiekke", model.destinationPortRange()); Assertions.assertEquals(Access.ALLOW, model.access()); - Assertions.assertEquals(1257157038, model.priority()); - Assertions.assertEquals(Direction.OUTBOUND, model.direction()); + Assertions.assertEquals(697538658, model.priority()); + Assertions.assertEquals(Direction.INBOUND, model.direction()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkSecurityRule model = new NetworkSecurityRule().withName("afnn") - .withDescription("pichkoymkcdy") - .withProtocol(NsgProtocol.HTTP) - .withSourceAddressPrefixes(Arrays.asList("kpw", "reqnovvqfov", "jxywsuws", "rsndsytgadgvra")) - .withDestinationAddressPrefixes(Arrays.asList("neqn")) - .withSourcePortRanges(Arrays.asList("rwlqu", "ijfqkacewiipfp", "bjibwwiftohq", "vpuvks")) - .withDestinationPortRanges(Arrays.asList("saknynfsyn")) - .withSourceAddressPrefix("ph") - .withDestinationAddressPrefix("pxodlqiyntorzih") - .withSourcePortRange("osjswsr") - .withDestinationPortRange("lyzrpzbchckqqzqi") + NetworkSecurityRule model = new NetworkSecurityRule().withName("pkukghi") + .withDescription("blxgwimf") + .withProtocol(NsgProtocol.ESP) + .withSourceAddressPrefixes(Arrays.asList("j", "wmszkk")) + .withDestinationAddressPrefixes(Arrays.asList("rey", "kzikfjawneaivxwc")) + .withSourcePortRanges(Arrays.asList("pcirelsfeaen", "abfatkl", "dxbjhwuaanozj")) + .withDestinationPortRanges(Arrays.asList("hyoulpjr")) + .withSourceAddressPrefix("ag") + .withDestinationAddressPrefix("vimjwos") + .withSourcePortRange("xitc") + .withDestinationPortRange("fcktqumiekke") .withAccess(Access.ALLOW) - .withPriority(1257157038) - .withDirection(Direction.OUTBOUND); + .withPriority(697538658) + .withDirection(Direction.INBOUND); model = BinaryData.fromObject(model).toObject(NetworkSecurityRule.class); - Assertions.assertEquals("afnn", model.name()); - Assertions.assertEquals("pichkoymkcdy", model.description()); - Assertions.assertEquals(NsgProtocol.HTTP, model.protocol()); - Assertions.assertEquals("kpw", model.sourceAddressPrefixes().get(0)); - Assertions.assertEquals("neqn", model.destinationAddressPrefixes().get(0)); - Assertions.assertEquals("rwlqu", model.sourcePortRanges().get(0)); - Assertions.assertEquals("saknynfsyn", model.destinationPortRanges().get(0)); - Assertions.assertEquals("ph", model.sourceAddressPrefix()); - Assertions.assertEquals("pxodlqiyntorzih", model.destinationAddressPrefix()); - Assertions.assertEquals("osjswsr", model.sourcePortRange()); - Assertions.assertEquals("lyzrpzbchckqqzqi", model.destinationPortRange()); + Assertions.assertEquals("pkukghi", model.name()); + Assertions.assertEquals("blxgwimf", model.description()); + Assertions.assertEquals(NsgProtocol.ESP, model.protocol()); + Assertions.assertEquals("j", model.sourceAddressPrefixes().get(0)); + Assertions.assertEquals("rey", model.destinationAddressPrefixes().get(0)); + Assertions.assertEquals("pcirelsfeaen", model.sourcePortRanges().get(0)); + Assertions.assertEquals("hyoulpjr", model.destinationPortRanges().get(0)); + Assertions.assertEquals("ag", model.sourceAddressPrefix()); + Assertions.assertEquals("vimjwos", model.destinationAddressPrefix()); + Assertions.assertEquals("xitc", model.sourcePortRange()); + Assertions.assertEquals("fcktqumiekke", model.destinationPortRange()); Assertions.assertEquals(Access.ALLOW, model.access()); - Assertions.assertEquals(1257157038, model.priority()); - Assertions.assertEquals(Direction.OUTBOUND, model.direction()); + Assertions.assertEquals(697538658, model.priority()); + Assertions.assertEquals(Direction.INBOUND, model.direction()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeActionParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeActionParametersTests.java index cb0f3df01439..dd52480bae1a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeActionParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeActionParametersTests.java @@ -13,22 +13,23 @@ public final class NodeTypeActionParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NodeTypeActionParameters model - = BinaryData.fromString("{\"nodes\":[\"ckpyklyhplu\"],\"force\":false,\"updateType\":\"Default\"}") - .toObject(NodeTypeActionParameters.class); - Assertions.assertEquals("ckpyklyhplu", model.nodes().get(0)); - Assertions.assertFalse(model.force()); + NodeTypeActionParameters model = BinaryData + .fromString("{\"nodes\":[\"ewzcjznmwcp\",\"guaadraufactkahz\"],\"force\":true,\"updateType\":\"Default\"}") + .toObject(NodeTypeActionParameters.class); + Assertions.assertEquals("ewzcjznmwcp", model.nodes().get(0)); + Assertions.assertTrue(model.force()); Assertions.assertEquals(UpdateType.DEFAULT, model.updateType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NodeTypeActionParameters model = new NodeTypeActionParameters().withNodes(Arrays.asList("ckpyklyhplu")) - .withForce(false) - .withUpdateType(UpdateType.DEFAULT); + NodeTypeActionParameters model + = new NodeTypeActionParameters().withNodes(Arrays.asList("ewzcjznmwcp", "guaadraufactkahz")) + .withForce(true) + .withUpdateType(UpdateType.DEFAULT); model = BinaryData.fromObject(model).toObject(NodeTypeActionParameters.class); - Assertions.assertEquals("ckpyklyhplu", model.nodes().get(0)); - Assertions.assertFalse(model.force()); + Assertions.assertEquals("ewzcjznmwcp", model.nodes().get(0)); + Assertions.assertTrue(model.force()); Assertions.assertEquals(UpdateType.DEFAULT, model.updateType()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeAvailableSkuInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeAvailableSkuInnerTests.java index 4423e1ba4442..db2d9f819456 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeAvailableSkuInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeAvailableSkuInnerTests.java @@ -11,7 +11,7 @@ public final class NodeTypeAvailableSkuInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NodeTypeAvailableSkuInner model = BinaryData.fromString( - "{\"resourceType\":\"qjfsmlmbtxhw\",\"sku\":{\"name\":\"srtawcoezbr\",\"tier\":\"bskhudygoookkqfq\"},\"capacity\":{\"minimum\":1168640634,\"maximum\":173772181,\"default\":1730138654,\"scaleType\":\"Automatic\"}}") + "{\"resourceType\":\"dweyuqdunv\",\"sku\":{\"name\":\"rwrbi\",\"tier\":\"ktalywjhhgdnhxms\"},\"capacity\":{\"minimum\":759547890,\"maximum\":601340793,\"default\":486711131,\"scaleType\":\"Manual\"}}") .toObject(NodeTypeAvailableSkuInner.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeFaultSimulationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeFaultSimulationTests.java index 3465dd29a917..cd673ed92028 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeFaultSimulationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeFaultSimulationTests.java @@ -14,11 +14,11 @@ public final class NodeTypeFaultSimulationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NodeTypeFaultSimulation model = BinaryData.fromString( - "{\"nodeTypeName\":\"ypatdooaojkniod\",\"status\":\"Stopping\",\"operationId\":\"bw\",\"operationStatus\":\"Aborted\"}") + "{\"nodeTypeName\":\"szzcmrvexztv\",\"status\":\"StopFailed\",\"operationId\":\"sfraoyzko\",\"operationStatus\":\"Aborted\"}") .toObject(NodeTypeFaultSimulation.class); - Assertions.assertEquals("ypatdooaojkniod", model.nodeTypeName()); - Assertions.assertEquals(FaultSimulationStatus.STOPPING, model.status()); - Assertions.assertEquals("bw", model.operationId()); + Assertions.assertEquals("szzcmrvexztv", model.nodeTypeName()); + Assertions.assertEquals(FaultSimulationStatus.STOP_FAILED, model.status()); + Assertions.assertEquals("sfraoyzko", model.operationId()); Assertions.assertEquals(SfmcOperationStatus.ABORTED, model.operationStatus()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeListSkuResultTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeListSkuResultTests.java index 9024109a1982..c5b72219c219 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeListSkuResultTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeListSkuResultTests.java @@ -12,8 +12,8 @@ public final class NodeTypeListSkuResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NodeTypeListSkuResult model = BinaryData.fromString( - "{\"value\":[{\"resourceType\":\"dlgzibthostgkt\",\"sku\":{\"name\":\"dxeclzedqbcvh\",\"tier\":\"h\"},\"capacity\":{\"minimum\":751350709,\"maximum\":695028965,\"default\":1774431759,\"scaleType\":\"Automatic\"}}],\"nextLink\":\"fbumlkx\"}") + "{\"value\":[{\"resourceType\":\"uxxpshne\",\"sku\":{\"name\":\"lfg\",\"tier\":\"qubkw\"},\"capacity\":{\"minimum\":2030075200,\"maximum\":83851075,\"default\":1559984904,\"scaleType\":\"None\"}},{\"resourceType\":\"bazpjuohmi\",\"sku\":{\"name\":\"lnorwmdu\",\"tier\":\"pklvxw\"},\"capacity\":{\"minimum\":1917702529,\"maximum\":1521698279,\"default\":181907688,\"scaleType\":\"Automatic\"}},{\"resourceType\":\"isze\",\"sku\":{\"name\":\"bjcrxgibbdaxco\",\"tier\":\"ozauorsukokwb\"},\"capacity\":{\"minimum\":650795079,\"maximum\":2075854063,\"default\":1945545527,\"scaleType\":\"Automatic\"}}],\"nextLink\":\"zlrphwzs\"}") .toObject(NodeTypeListSkuResult.class); - Assertions.assertEquals("fbumlkx", model.nextLink()); + Assertions.assertEquals("zlrphwzs", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeNatConfigTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeNatConfigTests.java index b773378c28f3..3531d86d9546 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeNatConfigTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeNatConfigTests.java @@ -13,21 +13,21 @@ public final class NodeTypeNatConfigTests { public void testDeserialize() throws Exception { NodeTypeNatConfig model = BinaryData .fromString( - "{\"backendPort\":148831092,\"frontendPortRangeStart\":1083346406,\"frontendPortRangeEnd\":1621053169}") + "{\"backendPort\":709721668,\"frontendPortRangeStart\":40609312,\"frontendPortRangeEnd\":1077701136}") .toObject(NodeTypeNatConfig.class); - Assertions.assertEquals(148831092, model.backendPort()); - Assertions.assertEquals(1083346406, model.frontendPortRangeStart()); - Assertions.assertEquals(1621053169, model.frontendPortRangeEnd()); + Assertions.assertEquals(709721668, model.backendPort()); + Assertions.assertEquals(40609312, model.frontendPortRangeStart()); + Assertions.assertEquals(1077701136, model.frontendPortRangeEnd()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NodeTypeNatConfig model = new NodeTypeNatConfig().withBackendPort(148831092) - .withFrontendPortRangeStart(1083346406) - .withFrontendPortRangeEnd(1621053169); + NodeTypeNatConfig model = new NodeTypeNatConfig().withBackendPort(709721668) + .withFrontendPortRangeStart(40609312) + .withFrontendPortRangeEnd(1077701136); model = BinaryData.fromObject(model).toObject(NodeTypeNatConfig.class); - Assertions.assertEquals(148831092, model.backendPort()); - Assertions.assertEquals(1083346406, model.frontendPortRangeStart()); - Assertions.assertEquals(1621053169, model.frontendPortRangeEnd()); + Assertions.assertEquals(709721668, model.backendPort()); + Assertions.assertEquals(40609312, model.frontendPortRangeStart()); + Assertions.assertEquals(1077701136, model.frontendPortRangeEnd()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuCapacityTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuCapacityTests.java index 67b3b1639bc4..a4843a542369 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuCapacityTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuCapacityTests.java @@ -12,7 +12,7 @@ public final class NodeTypeSkuCapacityTests { public void testDeserialize() throws Exception { NodeTypeSkuCapacity model = BinaryData .fromString( - "{\"minimum\":1877295480,\"maximum\":1922609600,\"default\":462603095,\"scaleType\":\"Automatic\"}") + "{\"minimum\":1812829551,\"maximum\":1377717439,\"default\":355548039,\"scaleType\":\"Manual\"}") .toObject(NodeTypeSkuCapacity.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuTests.java index b5ccdc8b0e3f..2dcb8e960a01 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuTests.java @@ -11,21 +11,19 @@ public final class NodeTypeSkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NodeTypeSku model - = BinaryData.fromString("{\"name\":\"jzhpjbibgjmfx\",\"tier\":\"vfcluyovwxnbkfe\",\"capacity\":1794198042}") - .toObject(NodeTypeSku.class); - Assertions.assertEquals("jzhpjbibgjmfx", model.name()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.tier()); - Assertions.assertEquals(1794198042, model.capacity()); + NodeTypeSku model = BinaryData.fromString("{\"name\":\"kjprvk\",\"tier\":\"fz\",\"capacity\":497380476}") + .toObject(NodeTypeSku.class); + Assertions.assertEquals("kjprvk", model.name()); + Assertions.assertEquals("fz", model.tier()); + Assertions.assertEquals(497380476, model.capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NodeTypeSku model - = new NodeTypeSku().withName("jzhpjbibgjmfx").withTier("vfcluyovwxnbkfe").withCapacity(1794198042); + NodeTypeSku model = new NodeTypeSku().withName("kjprvk").withTier("fz").withCapacity(497380476); model = BinaryData.fromObject(model).toObject(NodeTypeSku.class); - Assertions.assertEquals("jzhpjbibgjmfx", model.name()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.tier()); - Assertions.assertEquals(1794198042, model.capacity()); + Assertions.assertEquals("kjprvk", model.name()); + Assertions.assertEquals("fz", model.tier()); + Assertions.assertEquals(497380476, model.capacity()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListMockTests.java index 8a7fa355c0bb..3f2f1c9c3ac9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListMockTests.java @@ -21,7 +21,7 @@ public final class NodeTypeSkusListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"resourceType\":\"xjawrt\",\"sku\":{\"name\":\"jmyccxlzhcoxov\",\"tier\":\"khenlus\"},\"capacity\":{\"minimum\":742162315,\"maximum\":1821687022,\"default\":325685122,\"scaleType\":\"Manual\"}}]}"; + = "{\"value\":[{\"resourceType\":\"g\",\"sku\":{\"name\":\"gdlfgt\",\"tier\":\"snaquf\"},\"capacity\":{\"minimum\":821039939,\"maximum\":230335495,\"default\":553103423,\"scaleType\":\"None\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<NodeTypeAvailableSku> response - = manager.nodeTypeSkus().list("bauiropi", "nszonwpngaj", "n", com.azure.core.util.Context.NONE); + = manager.nodeTypeSkus().list("hzjqatucoige", "xncnwfe", "bnwgfmxj", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSupportedSkuTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSupportedSkuTests.java index 959f672e21b4..a72f416b5316 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSupportedSkuTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSupportedSkuTests.java @@ -10,7 +10,7 @@ public final class NodeTypeSupportedSkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NodeTypeSupportedSku model = BinaryData.fromString("{\"name\":\"iqtqzfavyvnq\",\"tier\":\"bar\"}") + NodeTypeSupportedSku model = BinaryData.fromString("{\"name\":\"dufiq\",\"tier\":\"ieuzaofjchvcyyy\"}") .toObject(NodeTypeSupportedSku.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeUpdateParametersTests.java index bd9e2960788a..54ab5a575f4b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeUpdateParametersTests.java @@ -15,24 +15,24 @@ public final class NodeTypeUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NodeTypeUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"wzdgirujbzbo\":\"cy\",\"pniyujviyl\":\"vzzbtdcq\"},\"sku\":{\"name\":\"hfssnrb\",\"tier\":\"efr\",\"capacity\":1375463592}}") + "{\"tags\":{\"tczheydbsdshmkx\":\"x\",\"ltfnhtbaxkgx\":\"aehvbbxuri\"},\"sku\":{\"name\":\"ckpyklyhplu\",\"tier\":\"pvruudlg\",\"capacity\":1558509810}}") .toObject(NodeTypeUpdateParameters.class); - Assertions.assertEquals("cy", model.tags().get("wzdgirujbzbo")); - Assertions.assertEquals("hfssnrb", model.sku().name()); - Assertions.assertEquals("efr", model.sku().tier()); - Assertions.assertEquals(1375463592, model.sku().capacity()); + Assertions.assertEquals("x", model.tags().get("tczheydbsdshmkx")); + Assertions.assertEquals("ckpyklyhplu", model.sku().name()); + Assertions.assertEquals("pvruudlg", model.sku().tier()); + Assertions.assertEquals(1558509810, model.sku().capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NodeTypeUpdateParameters model - = new NodeTypeUpdateParameters().withTags(mapOf("wzdgirujbzbo", "cy", "pniyujviyl", "vzzbtdcq")) - .withSku(new NodeTypeSku().withName("hfssnrb").withTier("efr").withCapacity(1375463592)); + = new NodeTypeUpdateParameters().withTags(mapOf("tczheydbsdshmkx", "x", "ltfnhtbaxkgx", "aehvbbxuri")) + .withSku(new NodeTypeSku().withName("ckpyklyhplu").withTier("pvruudlg").withCapacity(1558509810)); model = BinaryData.fromObject(model).toObject(NodeTypeUpdateParameters.class); - Assertions.assertEquals("cy", model.tags().get("wzdgirujbzbo")); - Assertions.assertEquals("hfssnrb", model.sku().name()); - Assertions.assertEquals("efr", model.sku().tier()); - Assertions.assertEquals(1375463592, model.sku().capacity()); + Assertions.assertEquals("x", model.tags().get("tczheydbsdshmkx")); + Assertions.assertEquals("ckpyklyhplu", model.sku().name()); + Assertions.assertEquals("pvruudlg", model.sku().tier()); + Assertions.assertEquals(1558509810, model.sku().capacity()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetFaultSimulationWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetFaultSimulationWithResponseMockTests.java index 8c1854878b28..b330844d594b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetFaultSimulationWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetFaultSimulationWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class NodeTypesGetFaultSimulationWithResponseMockTests { @Test public void testGetFaultSimulationWithResponse() throws Exception { String responseStr - = "{\"simulationId\":\"qpswokmvkhlggdhb\",\"status\":\"StartFailed\",\"startTime\":\"2021-11-19T21:48:38Z\",\"endTime\":\"2021-10-24T18:45:15Z\",\"details\":{\"clusterId\":\"wiwtglxxhl\",\"operationId\":\"pg\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"mnzhrgmqg\",\"status\":\"Starting\",\"operationId\":\"pqcbfrmbodthsq\",\"operationStatus\":\"Succeeded\"},{\"nodeTypeName\":\"iibakcl\",\"status\":\"StartFailed\",\"operationId\":\"rnxousxauzlwvsg\",\"operationStatus\":\"Aborted\"},{\"nodeTypeName\":\"qf\",\"status\":\"Starting\",\"operationId\":\"uxmmkjsvthnwp\",\"operationStatus\":\"Canceled\"},{\"nodeTypeName\":\"ovmribiattg\",\"status\":\"Active\",\"operationId\":\"fotang\",\"operationStatus\":\"Canceled\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-04-07T10:16:52Z\"}}}}"; + = "{\"simulationId\":\"wvsgmwohqfzizvu\",\"status\":\"Stopping\",\"startTime\":\"2021-05-31T23:38:12Z\",\"endTime\":\"2021-11-29T19:19:58Z\",\"details\":{\"clusterId\":\"nwpztekovmrib\",\"operationId\":\"ttgplucfotangcf\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"zcugswvxwlmzqw\",\"status\":\"Done\",\"operationId\":\"njmxmcuqudtcvcl\",\"operationStatus\":\"Created\"},{\"nodeTypeName\":\"dkvgfabuiyjibuzp\",\"status\":\"Done\",\"operationId\":\"neiknpg\",\"operationStatus\":\"Canceled\"},{\"nodeTypeName\":\"iuqhibtozipqwj\",\"status\":\"Active\",\"operationId\":\"rrxxgewpktvq\",\"operationStatus\":\"Canceled\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-10-19T13:03Z\"}}}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,24 +34,24 @@ public void testGetFaultSimulationWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FaultSimulation response = manager.nodeTypes() - .getFaultSimulationWithResponse("hgovfgp", "kqmhhaowjr", "zvuporqzdfuydz", - new FaultSimulationIdContent().withSimulationId("kfvxcnq"), com.azure.core.util.Context.NONE) + .getFaultSimulationWithResponse("mqgjsxvpq", "bfrmbodthsqqgvri", "bakclacjfrnxous", + new FaultSimulationIdContent().withSimulationId("au"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qpswokmvkhlggdhb", response.simulationId()); - Assertions.assertEquals(FaultSimulationStatus.START_FAILED, response.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-19T21:48:38Z"), response.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-24T18:45:15Z"), response.endTime()); - Assertions.assertEquals("wiwtglxxhl", response.details().clusterId()); - Assertions.assertEquals("pg", response.details().operationId()); - Assertions.assertEquals("mnzhrgmqg", response.details().nodeTypeFaultSimulation().get(0).nodeTypeName()); - Assertions.assertEquals(FaultSimulationStatus.STARTING, + Assertions.assertEquals("wvsgmwohqfzizvu", response.simulationId()); + Assertions.assertEquals(FaultSimulationStatus.STOPPING, response.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-31T23:38:12Z"), response.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-29T19:19:58Z"), response.endTime()); + Assertions.assertEquals("nwpztekovmrib", response.details().clusterId()); + Assertions.assertEquals("ttgplucfotangcf", response.details().operationId()); + Assertions.assertEquals("zcugswvxwlmzqw", response.details().nodeTypeFaultSimulation().get(0).nodeTypeName()); + Assertions.assertEquals(FaultSimulationStatus.DONE, response.details().nodeTypeFaultSimulation().get(0).status()); - Assertions.assertEquals("pqcbfrmbodthsq", response.details().nodeTypeFaultSimulation().get(0).operationId()); - Assertions.assertEquals(SfmcOperationStatus.SUCCEEDED, + Assertions.assertEquals("njmxmcuqudtcvcl", response.details().nodeTypeFaultSimulation().get(0).operationId()); + Assertions.assertEquals(SfmcOperationStatus.CREATED, response.details().nodeTypeFaultSimulation().get(0).operationStatus()); - Assertions.assertFalse(response.details().parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-07T10:16:52Z"), + Assertions.assertTrue(response.details().parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-19T13:03Z"), response.details().parameters().constraints().expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListFaultSimulationMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListFaultSimulationMockTests.java index 600bd2543ab8..2f1c13c05bba 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListFaultSimulationMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListFaultSimulationMockTests.java @@ -24,7 +24,7 @@ public final class NodeTypesListFaultSimulationMockTests { @Test public void testListFaultSimulation() throws Exception { String responseStr - = "{\"value\":[{\"simulationId\":\"vclx\",\"status\":\"Done\",\"startTime\":\"2021-04-22T20:04:17Z\",\"endTime\":\"2021-07-17T14:44:19Z\",\"details\":{\"clusterId\":\"buiyji\",\"operationId\":\"zphdugneiknp\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"jiuqhibtozi\",\"status\":\"Stopping\",\"operationId\":\"edmurrxxge\",\"operationStatus\":\"Canceled\"},{\"nodeTypeName\":\"vqylkmqpzoyhl\",\"status\":\"Done\",\"operationId\":\"wgcloxoebqinji\",\"operationStatus\":\"Failed\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-10-27T23:36:18Z\"}}}}]}"; + = "{\"value\":[{\"simulationId\":\"jqlafcbahhpzp\",\"status\":\"StopFailed\",\"startTime\":\"2021-01-21T09:59:18Z\",\"endTime\":\"2021-05-13T07:58:47Z\",\"details\":{\"clusterId\":\"ilkmk\",\"operationId\":\"olvdnd\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"ogphuartvtiu\",\"status\":\"StartFailed\",\"operationId\":\"chnmna\",\"operationStatus\":\"Succeeded\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-08-02T04:27:45Z\"}}}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,24 +34,24 @@ public void testListFaultSimulation() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<FaultSimulation> response = manager.nodeTypes() - .listFaultSimulation("gswvxwlmzqwm", "tx", "jmxmcuqud", com.azure.core.util.Context.NONE); + .listFaultSimulation("hlfbcgwgc", "oxoebqi", "jipnwj", com.azure.core.util.Context.NONE); - Assertions.assertEquals("vclx", response.iterator().next().simulationId()); - Assertions.assertEquals(FaultSimulationStatus.DONE, response.iterator().next().status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-22T20:04:17Z"), response.iterator().next().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-17T14:44:19Z"), response.iterator().next().endTime()); - Assertions.assertEquals("buiyji", response.iterator().next().details().clusterId()); - Assertions.assertEquals("zphdugneiknp", response.iterator().next().details().operationId()); - Assertions.assertEquals("jiuqhibtozi", + Assertions.assertEquals("jqlafcbahhpzp", response.iterator().next().simulationId()); + Assertions.assertEquals(FaultSimulationStatus.STOP_FAILED, response.iterator().next().status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-21T09:59:18Z"), response.iterator().next().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-13T07:58:47Z"), response.iterator().next().endTime()); + Assertions.assertEquals("ilkmk", response.iterator().next().details().clusterId()); + Assertions.assertEquals("olvdnd", response.iterator().next().details().operationId()); + Assertions.assertEquals("ogphuartvtiu", response.iterator().next().details().nodeTypeFaultSimulation().get(0).nodeTypeName()); - Assertions.assertEquals(FaultSimulationStatus.STOPPING, + Assertions.assertEquals(FaultSimulationStatus.START_FAILED, response.iterator().next().details().nodeTypeFaultSimulation().get(0).status()); - Assertions.assertEquals("edmurrxxge", + Assertions.assertEquals("chnmna", response.iterator().next().details().nodeTypeFaultSimulation().get(0).operationId()); - Assertions.assertEquals(SfmcOperationStatus.CANCELED, + Assertions.assertEquals(SfmcOperationStatus.SUCCEEDED, response.iterator().next().details().nodeTypeFaultSimulation().get(0).operationStatus()); - Assertions.assertTrue(response.iterator().next().details().parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T23:36:18Z"), + Assertions.assertFalse(response.iterator().next().details().parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-02T04:27:45Z"), response.iterator().next().details().parameters().constraints().expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListMockTests.java index 31f82ae23451..b38c32a46ef6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListMockTests.java @@ -22,7 +22,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"qgzsles\",\"isDataAction\":true,\"display\":{\"provider\":\"rnntiewdjcv\",\"resource\":\"uwrbehwagoh\",\"operation\":\"f\",\"description\":\"mrqemvvhmx\"},\"origin\":\"rjfut\",\"nextLink\":\"oe\"}]}"; + = "{\"value\":[{\"name\":\"ip\",\"isDataAction\":false,\"display\":{\"provider\":\"qonmacj\",\"resource\":\"nizshqvcim\",\"operation\":\"vfgmblrrilby\",\"description\":\"xsmiccwrwfscjf\"},\"origin\":\"nszqujiz\",\"nextLink\":\"oqytibyowbblgy\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,13 @@ public void testList() throws Exception { PagedIterable<OperationResult> response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("qgzsles", response.iterator().next().name()); - Assertions.assertTrue(response.iterator().next().isDataAction()); - Assertions.assertEquals("rnntiewdjcv", response.iterator().next().display().provider()); - Assertions.assertEquals("uwrbehwagoh", response.iterator().next().display().resource()); - Assertions.assertEquals("f", response.iterator().next().display().operation()); - Assertions.assertEquals("mrqemvvhmx", response.iterator().next().display().description()); - Assertions.assertEquals("rjfut", response.iterator().next().origin()); - Assertions.assertEquals("oe", response.iterator().next().nextLink()); + Assertions.assertEquals("ip", response.iterator().next().name()); + Assertions.assertFalse(response.iterator().next().isDataAction()); + Assertions.assertEquals("qonmacj", response.iterator().next().display().provider()); + Assertions.assertEquals("nizshqvcim", response.iterator().next().display().resource()); + Assertions.assertEquals("vfgmblrrilby", response.iterator().next().display().operation()); + Assertions.assertEquals("xsmiccwrwfscjf", response.iterator().next().display().description()); + Assertions.assertEquals("nszqujiz", response.iterator().next().origin()); + Assertions.assertEquals("oqytibyowbblgy", response.iterator().next().nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/PartitionInstanceCountScaleMechanismTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/PartitionInstanceCountScaleMechanismTests.java index 1941f2b40ac6..da898de92fa1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/PartitionInstanceCountScaleMechanismTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/PartitionInstanceCountScaleMechanismTests.java @@ -12,22 +12,22 @@ public final class PartitionInstanceCountScaleMechanismTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartitionInstanceCountScaleMechanism model = BinaryData.fromString( - "{\"kind\":\"ScalePartitionInstanceCount\",\"minInstanceCount\":194224762,\"maxInstanceCount\":803457218,\"scaleIncrement\":1162707208}") + "{\"kind\":\"ScalePartitionInstanceCount\",\"minInstanceCount\":1072723853,\"maxInstanceCount\":2063268376,\"scaleIncrement\":720725723}") .toObject(PartitionInstanceCountScaleMechanism.class); - Assertions.assertEquals(194224762, model.minInstanceCount()); - Assertions.assertEquals(803457218, model.maxInstanceCount()); - Assertions.assertEquals(1162707208, model.scaleIncrement()); + Assertions.assertEquals(1072723853, model.minInstanceCount()); + Assertions.assertEquals(2063268376, model.maxInstanceCount()); + Assertions.assertEquals(720725723, model.scaleIncrement()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PartitionInstanceCountScaleMechanism model - = new PartitionInstanceCountScaleMechanism().withMinInstanceCount(194224762) - .withMaxInstanceCount(803457218) - .withScaleIncrement(1162707208); + = new PartitionInstanceCountScaleMechanism().withMinInstanceCount(1072723853) + .withMaxInstanceCount(2063268376) + .withScaleIncrement(720725723); model = BinaryData.fromObject(model).toObject(PartitionInstanceCountScaleMechanism.class); - Assertions.assertEquals(194224762, model.minInstanceCount()); - Assertions.assertEquals(803457218, model.maxInstanceCount()); - Assertions.assertEquals(1162707208, model.scaleIncrement()); + Assertions.assertEquals(1072723853, model.minInstanceCount()); + Assertions.assertEquals(2063268376, model.maxInstanceCount()); + Assertions.assertEquals(720725723, model.scaleIncrement()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ResourceAzStatusTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ResourceAzStatusTests.java index 5daf7f0fbb73..c9cdaf424f7a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ResourceAzStatusTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ResourceAzStatusTests.java @@ -11,7 +11,7 @@ public final class ResourceAzStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceAzStatus model = BinaryData.fromString( - "{\"resourceName\":\"rzgszufoxci\",\"resourceType\":\"p\",\"isZoneResilient\":false,\"details\":\"mciodhkhazxkhn\"}") + "{\"resourceName\":\"acizsjqlhkrr\",\"resourceType\":\"deibqip\",\"isZoneResilient\":true,\"details\":\"vxndz\"}") .toObject(ResourceAzStatus.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RestartReplicaRequestTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RestartReplicaRequestTests.java new file mode 100644 index 000000000000..ea86313fe0e9 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RestartReplicaRequestTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartKind; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RestartReplicaRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RestartReplicaRequest model = BinaryData.fromString( + "{\"partitionId\":\"iwbwoenwashrtdtk\",\"replicaIds\":[3530483379804377024,8545363856594134553],\"restartKind\":\"Simultaneous\",\"forceRestart\":true,\"timeout\":8644340540999896271}") + .toObject(RestartReplicaRequest.class); + Assertions.assertEquals("iwbwoenwashrtdtk", model.partitionId()); + Assertions.assertEquals(3530483379804377024L, model.replicaIds().get(0)); + Assertions.assertEquals(RestartKind.SIMULTANEOUS, model.restartKind()); + Assertions.assertTrue(model.forceRestart()); + Assertions.assertEquals(8644340540999896271L, model.timeout()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RestartReplicaRequest model = new RestartReplicaRequest().withPartitionId("iwbwoenwashrtdtk") + .withReplicaIds(Arrays.asList(3530483379804377024L, 8545363856594134553L)) + .withRestartKind(RestartKind.SIMULTANEOUS) + .withForceRestart(true) + .withTimeout(8644340540999896271L); + model = BinaryData.fromObject(model).toObject(RestartReplicaRequest.class); + Assertions.assertEquals("iwbwoenwashrtdtk", model.partitionId()); + Assertions.assertEquals(3530483379804377024L, model.replicaIds().get(0)); + Assertions.assertEquals(RestartKind.SIMULTANEOUS, model.restartKind()); + Assertions.assertTrue(model.forceRestart()); + Assertions.assertEquals(8644340540999896271L, model.timeout()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeApplicationHealthPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeApplicationHealthPolicyTests.java new file mode 100644 index 000000000000..2dd77d26af59 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeApplicationHealthPolicyTests.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeApplicationHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeServiceTypeHealthPolicy; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class RuntimeApplicationHealthPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RuntimeApplicationHealthPolicy model = BinaryData.fromString( + "{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":905507147,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":294567134,\"maxPercentUnhealthyPartitionsPerService\":266686286,\"maxPercentUnhealthyReplicasPerPartition\":599393599},\"serviceTypeHealthPolicyMap\":{\"spnqzahmgkb\":{\"maxPercentUnhealthyServices\":1381039739,\"maxPercentUnhealthyPartitionsPerService\":1526069036,\"maxPercentUnhealthyReplicasPerPartition\":1610498845},\"dhibnuq\":{\"maxPercentUnhealthyServices\":1556572818,\"maxPercentUnhealthyPartitionsPerService\":567432535,\"maxPercentUnhealthyReplicasPerPartition\":188498280}}}") + .toObject(RuntimeApplicationHealthPolicy.class); + Assertions.assertTrue(model.considerWarningAsError()); + Assertions.assertEquals(905507147, model.maxPercentUnhealthyDeployedApplications()); + Assertions.assertEquals(294567134, model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices()); + Assertions.assertEquals(266686286, + model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(599393599, + model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition()); + Assertions.assertEquals(1381039739, + model.serviceTypeHealthPolicyMap().get("spnqzahmgkb").maxPercentUnhealthyServices()); + Assertions.assertEquals(1526069036, + model.serviceTypeHealthPolicyMap().get("spnqzahmgkb").maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(1610498845, + model.serviceTypeHealthPolicyMap().get("spnqzahmgkb").maxPercentUnhealthyReplicasPerPartition()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RuntimeApplicationHealthPolicy model = new RuntimeApplicationHealthPolicy().withConsiderWarningAsError(true) + .withMaxPercentUnhealthyDeployedApplications(905507147) + .withDefaultServiceTypeHealthPolicy( + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(294567134) + .withMaxPercentUnhealthyPartitionsPerService(266686286) + .withMaxPercentUnhealthyReplicasPerPartition(599393599)) + .withServiceTypeHealthPolicyMap(mapOf("spnqzahmgkb", + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1381039739) + .withMaxPercentUnhealthyPartitionsPerService(1526069036) + .withMaxPercentUnhealthyReplicasPerPartition(1610498845), + "dhibnuq", + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1556572818) + .withMaxPercentUnhealthyPartitionsPerService(567432535) + .withMaxPercentUnhealthyReplicasPerPartition(188498280))); + model = BinaryData.fromObject(model).toObject(RuntimeApplicationHealthPolicy.class); + Assertions.assertTrue(model.considerWarningAsError()); + Assertions.assertEquals(905507147, model.maxPercentUnhealthyDeployedApplications()); + Assertions.assertEquals(294567134, model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices()); + Assertions.assertEquals(266686286, + model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(599393599, + model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition()); + Assertions.assertEquals(1381039739, + model.serviceTypeHealthPolicyMap().get("spnqzahmgkb").maxPercentUnhealthyServices()); + Assertions.assertEquals(1526069036, + model.serviceTypeHealthPolicyMap().get("spnqzahmgkb").maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(1610498845, + model.serviceTypeHealthPolicyMap().get("spnqzahmgkb").maxPercentUnhealthyReplicasPerPartition()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeResumeApplicationUpgradeParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeResumeApplicationUpgradeParametersTests.java index d442fc9bcea0..a72390ca5a01 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeResumeApplicationUpgradeParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeResumeApplicationUpgradeParametersTests.java @@ -11,17 +11,16 @@ public final class RuntimeResumeApplicationUpgradeParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RuntimeResumeApplicationUpgradeParameters model - = BinaryData.fromString("{\"upgradeDomainName\":\"fhyhltrpmopjmcma\"}") - .toObject(RuntimeResumeApplicationUpgradeParameters.class); - Assertions.assertEquals("fhyhltrpmopjmcma", model.upgradeDomainName()); + RuntimeResumeApplicationUpgradeParameters model = BinaryData.fromString("{\"upgradeDomainName\":\"xerf\"}") + .toObject(RuntimeResumeApplicationUpgradeParameters.class); + Assertions.assertEquals("xerf", model.upgradeDomainName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RuntimeResumeApplicationUpgradeParameters model - = new RuntimeResumeApplicationUpgradeParameters().withUpgradeDomainName("fhyhltrpmopjmcma"); + = new RuntimeResumeApplicationUpgradeParameters().withUpgradeDomainName("xerf"); model = BinaryData.fromObject(model).toObject(RuntimeResumeApplicationUpgradeParameters.class); - Assertions.assertEquals("fhyhltrpmopjmcma", model.upgradeDomainName()); + Assertions.assertEquals("xerf", model.upgradeDomainName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeRollingUpgradeUpdateMonitoringPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeRollingUpgradeUpdateMonitoringPolicyTests.java new file mode 100644 index 000000000000..161d1ad67622 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeRollingUpgradeUpdateMonitoringPolicyTests.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeFailureAction; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeMode; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeUpdateMonitoringPolicy; +import org.junit.jupiter.api.Assertions; + +public final class RuntimeRollingUpgradeUpdateMonitoringPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RuntimeRollingUpgradeUpdateMonitoringPolicy model = BinaryData.fromString( + "{\"rollingUpgradeMode\":\"UnmonitoredAuto\",\"forceRestart\":true,\"replicaSetCheckTimeoutInMilliseconds\":4325126672944286944,\"failureAction\":\"Rollback\",\"healthCheckWaitDurationInMilliseconds\":\"gnbuy\",\"healthCheckStableDurationInMilliseconds\":\"ijggmebfsiar\",\"healthCheckRetryTimeoutInMilliseconds\":\"trcvpnazzmh\",\"upgradeTimeoutInMilliseconds\":\"unmpxttd\",\"upgradeDomainTimeoutInMilliseconds\":\"rbnlankxmyskp\",\"instanceCloseDelayDurationInSeconds\":3194027088014349388}") + .toObject(RuntimeRollingUpgradeUpdateMonitoringPolicy.class); + Assertions.assertEquals(RuntimeRollingUpgradeMode.UNMONITORED_AUTO, model.rollingUpgradeMode()); + Assertions.assertTrue(model.forceRestart()); + Assertions.assertEquals(4325126672944286944L, model.replicaSetCheckTimeoutInMilliseconds()); + Assertions.assertEquals(RuntimeFailureAction.ROLLBACK, model.failureAction()); + Assertions.assertEquals("gnbuy", model.healthCheckWaitDurationInMilliseconds()); + Assertions.assertEquals("ijggmebfsiar", model.healthCheckStableDurationInMilliseconds()); + Assertions.assertEquals("trcvpnazzmh", model.healthCheckRetryTimeoutInMilliseconds()); + Assertions.assertEquals("unmpxttd", model.upgradeTimeoutInMilliseconds()); + Assertions.assertEquals("rbnlankxmyskp", model.upgradeDomainTimeoutInMilliseconds()); + Assertions.assertEquals(3194027088014349388L, model.instanceCloseDelayDurationInSeconds()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RuntimeRollingUpgradeUpdateMonitoringPolicy model = new RuntimeRollingUpgradeUpdateMonitoringPolicy() + .withRollingUpgradeMode(RuntimeRollingUpgradeMode.UNMONITORED_AUTO) + .withForceRestart(true) + .withReplicaSetCheckTimeoutInMilliseconds(4325126672944286944L) + .withFailureAction(RuntimeFailureAction.ROLLBACK) + .withHealthCheckWaitDurationInMilliseconds("gnbuy") + .withHealthCheckStableDurationInMilliseconds("ijggmebfsiar") + .withHealthCheckRetryTimeoutInMilliseconds("trcvpnazzmh") + .withUpgradeTimeoutInMilliseconds("unmpxttd") + .withUpgradeDomainTimeoutInMilliseconds("rbnlankxmyskp") + .withInstanceCloseDelayDurationInSeconds(3194027088014349388L); + model = BinaryData.fromObject(model).toObject(RuntimeRollingUpgradeUpdateMonitoringPolicy.class); + Assertions.assertEquals(RuntimeRollingUpgradeMode.UNMONITORED_AUTO, model.rollingUpgradeMode()); + Assertions.assertTrue(model.forceRestart()); + Assertions.assertEquals(4325126672944286944L, model.replicaSetCheckTimeoutInMilliseconds()); + Assertions.assertEquals(RuntimeFailureAction.ROLLBACK, model.failureAction()); + Assertions.assertEquals("gnbuy", model.healthCheckWaitDurationInMilliseconds()); + Assertions.assertEquals("ijggmebfsiar", model.healthCheckStableDurationInMilliseconds()); + Assertions.assertEquals("trcvpnazzmh", model.healthCheckRetryTimeoutInMilliseconds()); + Assertions.assertEquals("unmpxttd", model.upgradeTimeoutInMilliseconds()); + Assertions.assertEquals("rbnlankxmyskp", model.upgradeDomainTimeoutInMilliseconds()); + Assertions.assertEquals(3194027088014349388L, model.instanceCloseDelayDurationInSeconds()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeServiceTypeHealthPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeServiceTypeHealthPolicyTests.java new file mode 100644 index 000000000000..20633a03ded7 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeServiceTypeHealthPolicyTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeServiceTypeHealthPolicy; +import org.junit.jupiter.api.Assertions; + +public final class RuntimeServiceTypeHealthPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RuntimeServiceTypeHealthPolicy model = BinaryData.fromString( + "{\"maxPercentUnhealthyServices\":486608625,\"maxPercentUnhealthyPartitionsPerService\":1122159032,\"maxPercentUnhealthyReplicasPerPartition\":500953055}") + .toObject(RuntimeServiceTypeHealthPolicy.class); + Assertions.assertEquals(486608625, model.maxPercentUnhealthyServices()); + Assertions.assertEquals(1122159032, model.maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(500953055, model.maxPercentUnhealthyReplicasPerPartition()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RuntimeServiceTypeHealthPolicy model + = new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(486608625) + .withMaxPercentUnhealthyPartitionsPerService(1122159032) + .withMaxPercentUnhealthyReplicasPerPartition(500953055); + model = BinaryData.fromObject(model).toObject(RuntimeServiceTypeHealthPolicy.class); + Assertions.assertEquals(486608625, model.maxPercentUnhealthyServices()); + Assertions.assertEquals(1122159032, model.maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(500953055, model.maxPercentUnhealthyReplicasPerPartition()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeUpdateApplicationUpgradeParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeUpdateApplicationUpgradeParametersTests.java new file mode 100644 index 000000000000..17f02adc3aa3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeUpdateApplicationUpgradeParametersTests.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeApplicationHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeFailureAction; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeMode; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeUpdateMonitoringPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeServiceTypeHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpgradeKind; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class RuntimeUpdateApplicationUpgradeParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RuntimeUpdateApplicationUpgradeParameters model = BinaryData.fromString( + "{\"name\":\"wutttxfvjrbi\",\"upgradeKind\":\"Rolling\",\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":684290279,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":99482426,\"maxPercentUnhealthyPartitionsPerService\":536989913,\"maxPercentUnhealthyReplicasPerPartition\":1103023268},\"serviceTypeHealthPolicyMap\":{\"jky\":{\"maxPercentUnhealthyServices\":1504948811,\"maxPercentUnhealthyPartitionsPerService\":1195568358,\"maxPercentUnhealthyReplicasPerPartition\":772905747},\"uujqgidokgjljyo\":{\"maxPercentUnhealthyServices\":1084643517,\"maxPercentUnhealthyPartitionsPerService\":197436298,\"maxPercentUnhealthyReplicasPerPartition\":1238878906}}},\"updateDescription\":{\"rollingUpgradeMode\":\"UnmonitoredAuto\",\"forceRestart\":true,\"replicaSetCheckTimeoutInMilliseconds\":7617371072440792626,\"failureAction\":\"Rollback\",\"healthCheckWaitDurationInMilliseconds\":\"ghkjeszzhbi\",\"healthCheckStableDurationInMilliseconds\":\"txfvgx\",\"healthCheckRetryTimeoutInMilliseconds\":\"smx\",\"upgradeTimeoutInMilliseconds\":\"hmpvecx\",\"upgradeDomainTimeoutInMilliseconds\":\"debfqkkrbmpukgri\",\"instanceCloseDelayDurationInSeconds\":1675759018761850231}}") + .toObject(RuntimeUpdateApplicationUpgradeParameters.class); + Assertions.assertEquals("wutttxfvjrbi", model.name()); + Assertions.assertEquals(RuntimeUpgradeKind.ROLLING, model.upgradeKind()); + Assertions.assertTrue(model.applicationHealthPolicy().considerWarningAsError()); + Assertions.assertEquals(684290279, model.applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); + Assertions.assertEquals(99482426, + model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices()); + Assertions.assertEquals(536989913, + model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(1103023268, + model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition()); + Assertions.assertEquals(1504948811, + model.applicationHealthPolicy().serviceTypeHealthPolicyMap().get("jky").maxPercentUnhealthyServices()); + Assertions.assertEquals(1195568358, + model.applicationHealthPolicy() + .serviceTypeHealthPolicyMap() + .get("jky") + .maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(772905747, + model.applicationHealthPolicy() + .serviceTypeHealthPolicyMap() + .get("jky") + .maxPercentUnhealthyReplicasPerPartition()); + Assertions.assertEquals(RuntimeRollingUpgradeMode.UNMONITORED_AUTO, + model.updateDescription().rollingUpgradeMode()); + Assertions.assertTrue(model.updateDescription().forceRestart()); + Assertions.assertEquals(7617371072440792626L, model.updateDescription().replicaSetCheckTimeoutInMilliseconds()); + Assertions.assertEquals(RuntimeFailureAction.ROLLBACK, model.updateDescription().failureAction()); + Assertions.assertEquals("ghkjeszzhbi", model.updateDescription().healthCheckWaitDurationInMilliseconds()); + Assertions.assertEquals("txfvgx", model.updateDescription().healthCheckStableDurationInMilliseconds()); + Assertions.assertEquals("smx", model.updateDescription().healthCheckRetryTimeoutInMilliseconds()); + Assertions.assertEquals("hmpvecx", model.updateDescription().upgradeTimeoutInMilliseconds()); + Assertions.assertEquals("debfqkkrbmpukgri", model.updateDescription().upgradeDomainTimeoutInMilliseconds()); + Assertions.assertEquals(1675759018761850231L, model.updateDescription().instanceCloseDelayDurationInSeconds()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RuntimeUpdateApplicationUpgradeParameters model + = new RuntimeUpdateApplicationUpgradeParameters().withName("wutttxfvjrbi") + .withUpgradeKind(RuntimeUpgradeKind.ROLLING) + .withApplicationHealthPolicy(new RuntimeApplicationHealthPolicy().withConsiderWarningAsError(true) + .withMaxPercentUnhealthyDeployedApplications(684290279) + .withDefaultServiceTypeHealthPolicy( + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(99482426) + .withMaxPercentUnhealthyPartitionsPerService(536989913) + .withMaxPercentUnhealthyReplicasPerPartition(1103023268)) + .withServiceTypeHealthPolicyMap(mapOf("jky", + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1504948811) + .withMaxPercentUnhealthyPartitionsPerService(1195568358) + .withMaxPercentUnhealthyReplicasPerPartition(772905747), + "uujqgidokgjljyo", + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1084643517) + .withMaxPercentUnhealthyPartitionsPerService(197436298) + .withMaxPercentUnhealthyReplicasPerPartition(1238878906)))) + .withUpdateDescription(new RuntimeRollingUpgradeUpdateMonitoringPolicy() + .withRollingUpgradeMode(RuntimeRollingUpgradeMode.UNMONITORED_AUTO) + .withForceRestart(true) + .withReplicaSetCheckTimeoutInMilliseconds(7617371072440792626L) + .withFailureAction(RuntimeFailureAction.ROLLBACK) + .withHealthCheckWaitDurationInMilliseconds("ghkjeszzhbi") + .withHealthCheckStableDurationInMilliseconds("txfvgx") + .withHealthCheckRetryTimeoutInMilliseconds("smx") + .withUpgradeTimeoutInMilliseconds("hmpvecx") + .withUpgradeDomainTimeoutInMilliseconds("debfqkkrbmpukgri") + .withInstanceCloseDelayDurationInSeconds(1675759018761850231L)); + model = BinaryData.fromObject(model).toObject(RuntimeUpdateApplicationUpgradeParameters.class); + Assertions.assertEquals("wutttxfvjrbi", model.name()); + Assertions.assertEquals(RuntimeUpgradeKind.ROLLING, model.upgradeKind()); + Assertions.assertTrue(model.applicationHealthPolicy().considerWarningAsError()); + Assertions.assertEquals(684290279, model.applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); + Assertions.assertEquals(99482426, + model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices()); + Assertions.assertEquals(536989913, + model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(1103023268, + model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition()); + Assertions.assertEquals(1504948811, + model.applicationHealthPolicy().serviceTypeHealthPolicyMap().get("jky").maxPercentUnhealthyServices()); + Assertions.assertEquals(1195568358, + model.applicationHealthPolicy() + .serviceTypeHealthPolicyMap() + .get("jky") + .maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(772905747, + model.applicationHealthPolicy() + .serviceTypeHealthPolicyMap() + .get("jky") + .maxPercentUnhealthyReplicasPerPartition()); + Assertions.assertEquals(RuntimeRollingUpgradeMode.UNMONITORED_AUTO, + model.updateDescription().rollingUpgradeMode()); + Assertions.assertTrue(model.updateDescription().forceRestart()); + Assertions.assertEquals(7617371072440792626L, model.updateDescription().replicaSetCheckTimeoutInMilliseconds()); + Assertions.assertEquals(RuntimeFailureAction.ROLLBACK, model.updateDescription().failureAction()); + Assertions.assertEquals("ghkjeszzhbi", model.updateDescription().healthCheckWaitDurationInMilliseconds()); + Assertions.assertEquals("txfvgx", model.updateDescription().healthCheckStableDurationInMilliseconds()); + Assertions.assertEquals("smx", model.updateDescription().healthCheckRetryTimeoutInMilliseconds()); + Assertions.assertEquals("hmpvecx", model.updateDescription().upgradeTimeoutInMilliseconds()); + Assertions.assertEquals("debfqkkrbmpukgri", model.updateDescription().upgradeDomainTimeoutInMilliseconds()); + Assertions.assertEquals(1675759018761850231L, model.updateDescription().instanceCloseDelayDurationInSeconds()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceCorrelationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceCorrelationTests.java index 7c1223dc9501..403a02f6d890 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceCorrelationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceCorrelationTests.java @@ -12,18 +12,19 @@ public final class ServiceCorrelationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ServiceCorrelation model = BinaryData.fromString("{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ni\"}") - .toObject(ServiceCorrelation.class); - Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.scheme()); - Assertions.assertEquals("ni", model.serviceName()); + ServiceCorrelation model + = BinaryData.fromString("{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"bncblylpstdbhhx\"}") + .toObject(ServiceCorrelation.class); + Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.scheme()); + Assertions.assertEquals("bncblylpstdbhhx", model.serviceName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceCorrelation model - = new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY).withServiceName("ni"); + ServiceCorrelation model = new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) + .withServiceName("bncblylpstdbhhx"); model = BinaryData.fromObject(model).toObject(ServiceCorrelation.class); - Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.scheme()); - Assertions.assertEquals("ni", model.serviceName()); + Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.scheme()); + Assertions.assertEquals("bncblylpstdbhhx", model.serviceName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceEndpointTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceEndpointTests.java index fc4a1a3d5713..f678542f8d89 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceEndpointTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceEndpointTests.java @@ -13,21 +13,22 @@ public final class ServiceEndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceEndpoint model = BinaryData - .fromString("{\"service\":\"dvwvgpio\",\"locations\":[\"xrtfudxep\"],\"networkIdentifier\":\"yqagvrvm\"}") + .fromString( + "{\"service\":\"ayffim\",\"locations\":[\"tuzqogsexne\",\"fdnw\"],\"networkIdentifier\":\"mewzsyyc\"}") .toObject(ServiceEndpoint.class); - Assertions.assertEquals("dvwvgpio", model.service()); - Assertions.assertEquals("xrtfudxep", model.locations().get(0)); - Assertions.assertEquals("yqagvrvm", model.networkIdentifier()); + Assertions.assertEquals("ayffim", model.service()); + Assertions.assertEquals("tuzqogsexne", model.locations().get(0)); + Assertions.assertEquals("mewzsyyc", model.networkIdentifier()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceEndpoint model = new ServiceEndpoint().withService("dvwvgpio") - .withLocations(Arrays.asList("xrtfudxep")) - .withNetworkIdentifier("yqagvrvm"); + ServiceEndpoint model = new ServiceEndpoint().withService("ayffim") + .withLocations(Arrays.asList("tuzqogsexne", "fdnw")) + .withNetworkIdentifier("mewzsyyc"); model = BinaryData.fromObject(model).toObject(ServiceEndpoint.class); - Assertions.assertEquals("dvwvgpio", model.service()); - Assertions.assertEquals("xrtfudxep", model.locations().get(0)); - Assertions.assertEquals("yqagvrvm", model.networkIdentifier()); + Assertions.assertEquals("ayffim", model.service()); + Assertions.assertEquals("tuzqogsexne", model.locations().get(0)); + Assertions.assertEquals("mewzsyyc", model.networkIdentifier()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceLoadMetricTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceLoadMetricTests.java index d9ef27547bca..13b919e9b210 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceLoadMetricTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceLoadMetricTests.java @@ -13,27 +13,27 @@ public final class ServiceLoadMetricTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceLoadMetric model = BinaryData.fromString( - "{\"name\":\"kxfbkpycgklwndn\",\"weight\":\"High\",\"primaryDefaultLoad\":1922459268,\"secondaryDefaultLoad\":2043748556,\"defaultLoad\":1020918643}") + "{\"name\":\"rzdzucerscdnt\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1072156994,\"secondaryDefaultLoad\":2060062752,\"defaultLoad\":511652180}") .toObject(ServiceLoadMetric.class); - Assertions.assertEquals("kxfbkpycgklwndn", model.name()); - Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.weight()); - Assertions.assertEquals(1922459268, model.primaryDefaultLoad()); - Assertions.assertEquals(2043748556, model.secondaryDefaultLoad()); - Assertions.assertEquals(1020918643, model.defaultLoad()); + Assertions.assertEquals("rzdzucerscdnt", model.name()); + Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, model.weight()); + Assertions.assertEquals(1072156994, model.primaryDefaultLoad()); + Assertions.assertEquals(2060062752, model.secondaryDefaultLoad()); + Assertions.assertEquals(511652180, model.defaultLoad()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceLoadMetric model = new ServiceLoadMetric().withName("kxfbkpycgklwndn") - .withWeight(ServiceLoadMetricWeight.HIGH) - .withPrimaryDefaultLoad(1922459268) - .withSecondaryDefaultLoad(2043748556) - .withDefaultLoad(1020918643); + ServiceLoadMetric model = new ServiceLoadMetric().withName("rzdzucerscdnt") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(1072156994) + .withSecondaryDefaultLoad(2060062752) + .withDefaultLoad(511652180); model = BinaryData.fromObject(model).toObject(ServiceLoadMetric.class); - Assertions.assertEquals("kxfbkpycgklwndn", model.name()); - Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.weight()); - Assertions.assertEquals(1922459268, model.primaryDefaultLoad()); - Assertions.assertEquals(2043748556, model.secondaryDefaultLoad()); - Assertions.assertEquals(1020918643, model.defaultLoad()); + Assertions.assertEquals("rzdzucerscdnt", model.name()); + Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, model.weight()); + Assertions.assertEquals(1072156994, model.primaryDefaultLoad()); + Assertions.assertEquals(2060062752, model.secondaryDefaultLoad()); + Assertions.assertEquals(511652180, model.defaultLoad()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementInvalidDomainPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementInvalidDomainPolicyTests.java index 0dec5d5ab047..0e7445ca71f1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementInvalidDomainPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementInvalidDomainPolicyTests.java @@ -12,15 +12,16 @@ public final class ServicePlacementInvalidDomainPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServicePlacementInvalidDomainPolicy model - = BinaryData.fromString("{\"type\":\"InvalidDomain\",\"domainName\":\"l\"}") + = BinaryData.fromString("{\"type\":\"InvalidDomain\",\"domainName\":\"gtdsslswt\"}") .toObject(ServicePlacementInvalidDomainPolicy.class); - Assertions.assertEquals("l", model.domainName()); + Assertions.assertEquals("gtdsslswt", model.domainName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServicePlacementInvalidDomainPolicy model = new ServicePlacementInvalidDomainPolicy().withDomainName("l"); + ServicePlacementInvalidDomainPolicy model + = new ServicePlacementInvalidDomainPolicy().withDomainName("gtdsslswt"); model = BinaryData.fromObject(model).toObject(ServicePlacementInvalidDomainPolicy.class); - Assertions.assertEquals("l", model.domainName()); + Assertions.assertEquals("gtdsslswt", model.domainName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementPreferPrimaryDomainPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementPreferPrimaryDomainPolicyTests.java index 6bbd49ca12f3..637d7effc1e1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementPreferPrimaryDomainPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementPreferPrimaryDomainPolicyTests.java @@ -12,16 +12,16 @@ public final class ServicePlacementPreferPrimaryDomainPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServicePlacementPreferPrimaryDomainPolicy model - = BinaryData.fromString("{\"type\":\"PreferredPrimaryDomain\",\"domainName\":\"xujznbmpowu\"}") + = BinaryData.fromString("{\"type\":\"PreferredPrimaryDomain\",\"domainName\":\"abnetshh\"}") .toObject(ServicePlacementPreferPrimaryDomainPolicy.class); - Assertions.assertEquals("xujznbmpowu", model.domainName()); + Assertions.assertEquals("abnetshh", model.domainName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServicePlacementPreferPrimaryDomainPolicy model - = new ServicePlacementPreferPrimaryDomainPolicy().withDomainName("xujznbmpowu"); + = new ServicePlacementPreferPrimaryDomainPolicy().withDomainName("abnetshh"); model = BinaryData.fromObject(model).toObject(ServicePlacementPreferPrimaryDomainPolicy.class); - Assertions.assertEquals("xujznbmpowu", model.domainName()); + Assertions.assertEquals("abnetshh", model.domainName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequireDomainDistributionPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequireDomainDistributionPolicyTests.java index 96453347b5c5..dd12afd99f7b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequireDomainDistributionPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequireDomainDistributionPolicyTests.java @@ -12,16 +12,16 @@ public final class ServicePlacementRequireDomainDistributionPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServicePlacementRequireDomainDistributionPolicy model - = BinaryData.fromString("{\"type\":\"RequiredDomainDistribution\",\"domainName\":\"przqlveu\"}") + = BinaryData.fromString("{\"type\":\"RequiredDomainDistribution\",\"domainName\":\"zhedplvwiw\"}") .toObject(ServicePlacementRequireDomainDistributionPolicy.class); - Assertions.assertEquals("przqlveu", model.domainName()); + Assertions.assertEquals("zhedplvwiw", model.domainName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServicePlacementRequireDomainDistributionPolicy model - = new ServicePlacementRequireDomainDistributionPolicy().withDomainName("przqlveu"); + = new ServicePlacementRequireDomainDistributionPolicy().withDomainName("zhedplvwiw"); model = BinaryData.fromObject(model).toObject(ServicePlacementRequireDomainDistributionPolicy.class); - Assertions.assertEquals("przqlveu", model.domainName()); + Assertions.assertEquals("zhedplvwiw", model.domainName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequiredDomainPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequiredDomainPolicyTests.java index 14bb44f7f7b7..ed7f813fd6c6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequiredDomainPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequiredDomainPolicyTests.java @@ -12,15 +12,16 @@ public final class ServicePlacementRequiredDomainPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServicePlacementRequiredDomainPolicy model - = BinaryData.fromString("{\"type\":\"RequiredDomain\",\"domainName\":\"zbtd\"}") + = BinaryData.fromString("{\"type\":\"RequiredDomain\",\"domainName\":\"weriofzpyqsem\"}") .toObject(ServicePlacementRequiredDomainPolicy.class); - Assertions.assertEquals("zbtd", model.domainName()); + Assertions.assertEquals("weriofzpyqsem", model.domainName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServicePlacementRequiredDomainPolicy model = new ServicePlacementRequiredDomainPolicy().withDomainName("zbtd"); + ServicePlacementRequiredDomainPolicy model + = new ServicePlacementRequiredDomainPolicy().withDomainName("weriofzpyqsem"); model = BinaryData.fromObject(model).toObject(ServicePlacementRequiredDomainPolicy.class); - Assertions.assertEquals("zbtd", model.domainName()); + Assertions.assertEquals("weriofzpyqsem", model.domainName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceInnerTests.java index d942cab4f2a5..dc96b50cabd4 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceInnerTests.java @@ -27,71 +27,75 @@ public final class ServiceResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceResourceInner model = BinaryData.fromString( - "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"rsyn\",\"serviceTypeName\":\"qidybyx\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"lhaaxdbabp\",\"placementConstraints\":\"wrqlfktsthsuco\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"yazttbtwwrqpue\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"kzywbiex\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"eyueaxibxujwb\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"walm\"}],\"serviceLoadMetrics\":[{\"name\":\"oxaepd\",\"weight\":\"Low\",\"primaryDefaultLoad\":104874824,\"secondaryDefaultLoad\":350095412,\"defaultLoad\":901682674}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"High\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"tsdbpgn\":\"niwdjsw\",\"xbzpfzab\":\"ytxhp\"},\"location\":\"cuh\",\"id\":\"tcty\",\"name\":\"iklbbovpl\",\"type\":\"zbhvgyuguosv\"}") + "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"bpbewtghfgb\",\"serviceTypeName\":\"c\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"vlvqhjkbegi\",\"placementConstraints\":\"nmxiebwwaloayqc\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"zjuzgwyz\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"txon\"}],\"serviceLoadMetrics\":[{\"name\":\"savjcbpwxqps\",\"weight\":\"Medium\",\"primaryDefaultLoad\":168456950,\"secondaryDefaultLoad\":487735132,\"defaultLoad\":1935483255}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"bexrmcq\":\"yvxqtayriwwroy\",\"e\":\"bycnojvkn\",\"zhpvgqzcjrvxd\":\"qsgzvahapj\"},\"location\":\"lmwlxkvugfhzo\",\"id\":\"wjvzunluthnn\",\"name\":\"rnxipei\",\"type\":\"pjzu\"}") .toObject(ServiceResourceInner.class); - Assertions.assertEquals("wrqlfktsthsuco", model.properties().placementConstraints()); - Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, + Assertions.assertEquals("nmxiebwwaloayqc", model.properties().placementConstraints()); + Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("yazttbtwwrqpue", model.properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("oxaepd", model.properties().serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(104874824, model.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(350095412, model.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(901682674, model.properties().serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.HIGH, model.properties().defaultMoveCost()); - Assertions.assertEquals("qidybyx", model.properties().serviceTypeName()); + Assertions.assertEquals("zjuzgwyz", model.properties().correlationScheme().get(0).serviceName()); + Assertions.assertEquals("savjcbpwxqps", model.properties().serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, + model.properties().serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(168456950, model.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(487735132, model.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(1935483255, model.properties().serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.MEDIUM, model.properties().defaultMoveCost()); + Assertions.assertEquals("c", model.properties().serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.properties().servicePackageActivationMode()); - Assertions.assertEquals("lhaaxdbabp", model.properties().serviceDnsName()); - Assertions.assertEquals("niwdjsw", model.tags().get("tsdbpgn")); - Assertions.assertEquals("cuh", model.location()); + Assertions.assertEquals("vlvqhjkbegi", model.properties().serviceDnsName()); + Assertions.assertEquals("yvxqtayriwwroy", model.tags().get("bexrmcq")); + Assertions.assertEquals("lmwlxkvugfhzo", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServiceResourceInner model = new ServiceResourceInner() - .withProperties(new ServiceResourceProperties().withPlacementConstraints("wrqlfktsthsuco") + .withProperties(new ServiceResourceProperties().withPlacementConstraints("nmxiebwwaloayqc") .withCorrelationScheme(Arrays.asList( - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) - .withServiceName("yazttbtwwrqpue"), new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("kzywbiex"), - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) - .withServiceName("eyueaxibxujwb"), + .withServiceName("zjuzgwyz"), new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("walm"))) - .withServiceLoadMetrics(Arrays.asList(new ServiceLoadMetric().withName("oxaepd") - .withWeight(ServiceLoadMetricWeight.LOW) - .withPrimaryDefaultLoad(104874824) - .withSecondaryDefaultLoad(350095412) - .withDefaultLoad(901682674))) - .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.HIGH) - .withScalingPolicies(Arrays.asList(new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()))) - .withServiceTypeName("qidybyx") + .withServiceName("txon"))) + .withServiceLoadMetrics(Arrays.asList(new ServiceLoadMetric().withName("savjcbpwxqps") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(168456950) + .withSecondaryDefaultLoad(487735132) + .withDefaultLoad(1935483255))) + .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), + new ServicePlacementPolicy())) + .withDefaultMoveCost(MoveCost.MEDIUM) + .withScalingPolicies(Arrays.asList( + new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) + .withScalingTrigger(new ScalingTrigger()), + new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) + .withScalingTrigger(new ScalingTrigger()), + new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) + .withScalingTrigger(new ScalingTrigger()))) + .withServiceTypeName("c") .withPartitionDescription(new Partition()) .withServicePackageActivationMode(ServicePackageActivationMode.EXCLUSIVE_PROCESS) - .withServiceDnsName("lhaaxdbabp")) - .withTags(mapOf("tsdbpgn", "niwdjsw", "xbzpfzab", "ytxhp")) - .withLocation("cuh"); + .withServiceDnsName("vlvqhjkbegi")) + .withTags(mapOf("bexrmcq", "yvxqtayriwwroy", "e", "bycnojvkn", "zhpvgqzcjrvxd", "qsgzvahapj")) + .withLocation("lmwlxkvugfhzo"); model = BinaryData.fromObject(model).toObject(ServiceResourceInner.class); - Assertions.assertEquals("wrqlfktsthsuco", model.properties().placementConstraints()); - Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, + Assertions.assertEquals("nmxiebwwaloayqc", model.properties().placementConstraints()); + Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("yazttbtwwrqpue", model.properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("oxaepd", model.properties().serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(104874824, model.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(350095412, model.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(901682674, model.properties().serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.HIGH, model.properties().defaultMoveCost()); - Assertions.assertEquals("qidybyx", model.properties().serviceTypeName()); + Assertions.assertEquals("zjuzgwyz", model.properties().correlationScheme().get(0).serviceName()); + Assertions.assertEquals("savjcbpwxqps", model.properties().serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, + model.properties().serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(168456950, model.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(487735132, model.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(1935483255, model.properties().serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.MEDIUM, model.properties().defaultMoveCost()); + Assertions.assertEquals("c", model.properties().serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.properties().servicePackageActivationMode()); - Assertions.assertEquals("lhaaxdbabp", model.properties().serviceDnsName()); - Assertions.assertEquals("niwdjsw", model.tags().get("tsdbpgn")); - Assertions.assertEquals("cuh", model.location()); + Assertions.assertEquals("vlvqhjkbegi", model.properties().serviceDnsName()); + Assertions.assertEquals("yvxqtayriwwroy", model.tags().get("bexrmcq")); + Assertions.assertEquals("lmwlxkvugfhzo", model.location()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceListTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceListTests.java index 14fd96e5c9c0..a416f328ace7 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceListTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceListTests.java @@ -16,28 +16,28 @@ public final class ServiceResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"wlxkvugfhzovaw\",\"serviceTypeName\":\"vzunluthnnprnxi\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"pjzu\",\"placementConstraints\":\"jxdultskzbbtdzu\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"kgpwoz\"}],\"serviceLoadMetrics\":[{\"name\":\"fpbsjyofdxl\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1856979158,\"secondaryDefaultLoad\":1422945070,\"defaultLoad\":1252528512},{\"name\":\"aboekqv\",\"weight\":\"Zero\",\"primaryDefaultLoad\":643648278,\"secondaryDefaultLoad\":566883460,\"defaultLoad\":314739755}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"oyaqcslyjpkiid\":\"caalnjixisxyaw\",\"eli\":\"yexz\",\"bnxknalaulppg\":\"hnrztfol\"},\"location\":\"tpnapnyiropuhpig\",\"id\":\"gylgqgitxmedjvcs\",\"name\":\"ynqwwncwzzhxgk\",\"type\":\"rmgucnap\"},{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"oellwp\",\"serviceTypeName\":\"fdygpfqbuaceopz\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"huaoppp\",\"placementConstraints\":\"eqx\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ahzxctobgbk\"}],\"serviceLoadMetrics\":[{\"name\":\"izpost\",\"weight\":\"Low\",\"primaryDefaultLoad\":1065588244,\"secondaryDefaultLoad\":1002036598,\"defaultLoad\":1194461063},{\"name\":\"mfqjhhkxbp\",\"weight\":\"High\",\"primaryDefaultLoad\":1776506496,\"secondaryDefaultLoad\":1775545087,\"defaultLoad\":256415791},{\"name\":\"yngudivk\",\"weight\":\"Low\",\"primaryDefaultLoad\":1042702068,\"secondaryDefaultLoad\":1688847935,\"defaultLoad\":1519965226},{\"name\":\"szjfauvjfdxxivet\",\"weight\":\"Medium\",\"primaryDefaultLoad\":393815457,\"secondaryDefaultLoad\":730619532,\"defaultLoad\":1493412527}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"fxoblytkb\":\"xyslqbh\",\"wfbkrvrns\":\"mpew\"},\"location\":\"hqjohxcrsbfova\",\"id\":\"ruvw\",\"name\":\"hsqfsubcgjbirxbp\",\"type\":\"bsrfbj\"},{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"w\",\"serviceTypeName\":\"sotftpvj\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"ilzznfqqnvwp\",\"placementConstraints\":\"taruoujmkcj\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"tjrybnwjewgdr\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"rvnaenqpeh\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"doy\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ifthnz\"}],\"serviceLoadMetrics\":[{\"name\":\"sl\",\"weight\":\"Medium\",\"primaryDefaultLoad\":782103033,\"secondaryDefaultLoad\":1611377785,\"defaultLoad\":1427716289},{\"name\":\"duhavhqlkt\",\"weight\":\"High\",\"primaryDefaultLoad\":1712324120,\"secondaryDefaultLoad\":709486053,\"defaultLoad\":1315398087},{\"name\":\"ycduier\",\"weight\":\"High\",\"primaryDefaultLoad\":178925296,\"secondaryDefaultLoad\":595633272,\"defaultLoad\":50940581},{\"name\":\"l\",\"weight\":\"Medium\",\"primaryDefaultLoad\":245335843,\"secondaryDefaultLoad\":1979529158,\"defaultLoad\":1277939729}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"sadbz\":\"swiydmcwyhzdx\",\"dvxzbncblylpst\":\"nvdfznuda\",\"rsc\":\"bhhxsrzdzuc\"},\"location\":\"t\",\"id\":\"vfiwjmygtdss\",\"name\":\"s\",\"type\":\"tmweriofzpyq\"},{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"wab\",\"serviceTypeName\":\"ets\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"h\",\"placementConstraints\":\"plvwiwubmwmbes\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"wwtppj\"}],\"serviceLoadMetrics\":[{\"name\":\"xogaokonzmnsikv\",\"weight\":\"High\",\"primaryDefaultLoad\":611254930,\"secondaryDefaultLoad\":1625673068,\"defaultLoad\":1175665004},{\"name\":\"l\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1014332587,\"secondaryDefaultLoad\":187973075,\"defaultLoad\":1086084158},{\"name\":\"gureodkwobdag\",\"weight\":\"High\",\"primaryDefaultLoad\":1795454962,\"secondaryDefaultLoad\":1120938995,\"defaultLoad\":1020209011}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"High\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"bpodxunkbebxm\":\"ndlkzgxhurip\",\"oievseotgqrlltm\":\"byyntwlrbqt\",\"jefuzmuvpbttdumo\":\"wlauwzizxbmpg\"},\"location\":\"pxebmnzbt\",\"id\":\"jpglkfgohdne\",\"name\":\"el\",\"type\":\"phsdyhto\"}],\"nextLink\":\"ikdowwquuvx\"}") + "{\"value\":[{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"ttdumorppxebmnzb\",\"serviceTypeName\":\"bhjpglkfgohdne\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"phsdyhto\",\"placementConstraints\":\"ikdowwquuvx\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"vithh\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"o\"}],\"serviceLoadMetrics\":[{\"name\":\"ggbhcohfwds\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1077119628,\"secondaryDefaultLoad\":215049895,\"defaultLoad\":1496719551}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"High\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"pnppfuf\":\"dkzzewkfvhqcrail\"},\"location\":\"wdmhdlxyjrxs\",\"id\":\"afcnih\",\"name\":\"wqapnedgfbcvk\",\"type\":\"vq\"},{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"eqdcv\",\"serviceTypeName\":\"rhvoods\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"bzdopcj\",\"placementConstraints\":\"nhdldwmgxcx\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"mutwuoe\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"pkhjwni\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"sluicpdggkzz\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"mbmpaxmodfvuefy\"}],\"serviceLoadMetrics\":[{\"name\":\"pfvmwyhrfou\",\"weight\":\"Low\",\"primaryDefaultLoad\":938616277,\"secondaryDefaultLoad\":988727085,\"defaultLoad\":1662588727},{\"name\":\"iyzvqtmnub\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1989438546,\"secondaryDefaultLoad\":1254452597,\"defaultLoad\":1550438212}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"v\":\"ypomgkopkwho\",\"mocmbqfqvmk\":\"ajqgxy\",\"helxprglya\":\"xozap\",\"kcbcue\":\"dd\"},\"location\":\"jxgciqibrh\",\"id\":\"xsdqrhzoymibmrqy\",\"name\":\"bahwfl\",\"type\":\"szdtmhrkwof\"}],\"nextLink\":\"voqacpiexpbt\"}") .toObject(ServiceResourceList.class); - Assertions.assertEquals("jxdultskzbbtdzu", model.value().get(0).properties().placementConstraints()); - Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, + Assertions.assertEquals("ikdowwquuvx", model.value().get(0).properties().placementConstraints()); + Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.value().get(0).properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("kgpwoz", model.value().get(0).properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("fpbsjyofdxl", model.value().get(0).properties().serviceLoadMetrics().get(0).name()); + Assertions.assertEquals("vithh", model.value().get(0).properties().correlationScheme().get(0).serviceName()); + Assertions.assertEquals("ggbhcohfwds", model.value().get(0).properties().serviceLoadMetrics().get(0).name()); Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, model.value().get(0).properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(1856979158, + Assertions.assertEquals(1077119628, model.value().get(0).properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(1422945070, + Assertions.assertEquals(215049895, model.value().get(0).properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1252528512, + Assertions.assertEquals(1496719551, model.value().get(0).properties().serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.LOW, model.value().get(0).properties().defaultMoveCost()); - Assertions.assertEquals("vzunluthnnprnxi", model.value().get(0).properties().serviceTypeName()); + Assertions.assertEquals(MoveCost.HIGH, model.value().get(0).properties().defaultMoveCost()); + Assertions.assertEquals("bhjpglkfgohdne", model.value().get(0).properties().serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.value().get(0).properties().servicePackageActivationMode()); - Assertions.assertEquals("pjzu", model.value().get(0).properties().serviceDnsName()); - Assertions.assertEquals("caalnjixisxyaw", model.value().get(0).tags().get("oyaqcslyjpkiid")); - Assertions.assertEquals("tpnapnyiropuhpig", model.value().get(0).location()); - Assertions.assertEquals("ikdowwquuvx", model.nextLink()); + Assertions.assertEquals("phsdyhto", model.value().get(0).properties().serviceDnsName()); + Assertions.assertEquals("dkzzewkfvhqcrail", model.value().get(0).tags().get("pnppfuf")); + Assertions.assertEquals("wdmhdlxyjrxs", model.value().get(0).location()); + Assertions.assertEquals("voqacpiexpbt", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesBaseTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesBaseTests.java index 87206561434d..307a6d482e4a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesBaseTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesBaseTests.java @@ -22,63 +22,53 @@ public final class ServiceResourcePropertiesBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceResourcePropertiesBase model = BinaryData.fromString( - "{\"placementConstraints\":\"uhashsfwx\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"z\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ugicjooxdjebw\"}],\"serviceLoadMetrics\":[{\"name\":\"wwfvov\",\"weight\":\"Zero\",\"primaryDefaultLoad\":2004605521,\"secondaryDefaultLoad\":321338352,\"defaultLoad\":1542315989},{\"name\":\"yhz\",\"weight\":\"Low\",\"primaryDefaultLoad\":1339093969,\"secondaryDefaultLoad\":745513484,\"defaultLoad\":1026391011},{\"name\":\"jueiotwmcdytd\",\"weight\":\"Zero\",\"primaryDefaultLoad\":838785311,\"secondaryDefaultLoad\":1070997174,\"defaultLoad\":381866779}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") + "{\"placementConstraints\":\"ndslgnayqigynduh\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"lkthu\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"qolbgyc\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"iertgccymvaolp\"}],\"serviceLoadMetrics\":[{\"name\":\"qlfmmdnbb\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1340500207,\"secondaryDefaultLoad\":870818177,\"defaultLoad\":220182660},{\"name\":\"mcwyhzdxssadb\",\"weight\":\"Medium\",\"primaryDefaultLoad\":487755858,\"secondaryDefaultLoad\":1045217690,\"defaultLoad\":307071571}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"High\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") .toObject(ServiceResourcePropertiesBase.class); - Assertions.assertEquals("uhashsfwx", model.placementConstraints()); + Assertions.assertEquals("ndslgnayqigynduh", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("z", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("wwfvov", model.serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(2004605521, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(321338352, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1542315989, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.LOW, model.defaultMoveCost()); + Assertions.assertEquals("lkthu", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("qlfmmdnbb", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, model.serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(1340500207, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(870818177, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(220182660, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceResourcePropertiesBase model = new ServiceResourcePropertiesBase().withPlacementConstraints("uhashsfwx") + ServiceResourcePropertiesBase model = new ServiceResourcePropertiesBase() + .withPlacementConstraints("ndslgnayqigynduh") .withCorrelationScheme(Arrays.asList( - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY).withServiceName("z"), + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY).withServiceName("lkthu"), new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("ugicjooxdjebw"))) + .withServiceName("qolbgyc"), + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) + .withServiceName("iertgccymvaolp"))) .withServiceLoadMetrics(Arrays.asList( - new ServiceLoadMetric().withName("wwfvov") - .withWeight(ServiceLoadMetricWeight.ZERO) - .withPrimaryDefaultLoad(2004605521) - .withSecondaryDefaultLoad(321338352) - .withDefaultLoad(1542315989), - new ServiceLoadMetric().withName("yhz") - .withWeight(ServiceLoadMetricWeight.LOW) - .withPrimaryDefaultLoad(1339093969) - .withSecondaryDefaultLoad(745513484) - .withDefaultLoad(1026391011), - new ServiceLoadMetric().withName("jueiotwmcdytd") - .withWeight(ServiceLoadMetricWeight.ZERO) - .withPrimaryDefaultLoad(838785311) - .withSecondaryDefaultLoad(1070997174) - .withDefaultLoad(381866779))) - .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), - new ServicePlacementPolicy(), new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.LOW) - .withScalingPolicies(Arrays.asList( - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()))); + new ServiceLoadMetric().withName("qlfmmdnbb") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(1340500207) + .withSecondaryDefaultLoad(870818177) + .withDefaultLoad(220182660), + new ServiceLoadMetric().withName("mcwyhzdxssadb") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(487755858) + .withSecondaryDefaultLoad(1045217690) + .withDefaultLoad(307071571))) + .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy())) + .withDefaultMoveCost(MoveCost.HIGH) + .withScalingPolicies(Arrays.asList(new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) + .withScalingTrigger(new ScalingTrigger()))); model = BinaryData.fromObject(model).toObject(ServiceResourcePropertiesBase.class); - Assertions.assertEquals("uhashsfwx", model.placementConstraints()); + Assertions.assertEquals("ndslgnayqigynduh", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("z", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("wwfvov", model.serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(2004605521, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(321338352, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1542315989, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.LOW, model.defaultMoveCost()); + Assertions.assertEquals("lkthu", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("qlfmmdnbb", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, model.serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(1340500207, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(870818177, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(220182660, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesTests.java index 5458c1836637..00619525fac7 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesTests.java @@ -24,54 +24,50 @@ public final class ServiceResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceResourceProperties model = BinaryData.fromString( - "{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"fssxqukkfplg\",\"serviceTypeName\":\"gsxnkjzkdeslpv\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"i\",\"placementConstraints\":\"ghxpkdw\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"uebbaumnyqup\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"eojnabc\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"smtxpsieb\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"hvpesapskrdqm\"}],\"serviceLoadMetrics\":[{\"name\":\"dhtldwkyz\",\"weight\":\"Low\",\"primaryDefaultLoad\":379697539,\"secondaryDefaultLoad\":38172527,\"defaultLoad\":1341187268},{\"name\":\"cwsvlxotog\",\"weight\":\"Medium\",\"primaryDefaultLoad\":354304408,\"secondaryDefaultLoad\":320708733,\"defaultLoad\":767248190},{\"name\":\"nmic\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1237447101,\"secondaryDefaultLoad\":722438368,\"defaultLoad\":1739821364}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"High\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") + "{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"jxdultskzbbtdzu\",\"serviceTypeName\":\"veekgpwozuhkfp\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"ofd\",\"placementConstraints\":\"uusdttouwa\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"qvkelnsm\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"xwyjsflhhc\"}],\"serviceLoadMetrics\":[{\"name\":\"n\",\"weight\":\"High\",\"primaryDefaultLoad\":923639125,\"secondaryDefaultLoad\":589324262,\"defaultLoad\":663464413},{\"name\":\"joya\",\"weight\":\"Medium\",\"primaryDefaultLoad\":840312667,\"secondaryDefaultLoad\":1050162327,\"defaultLoad\":383766185},{\"name\":\"idzyexznelixhnr\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1975568377,\"secondaryDefaultLoad\":1201064167,\"defaultLoad\":681203122}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") .toObject(ServiceResourceProperties.class); - Assertions.assertEquals("ghxpkdw", model.placementConstraints()); + Assertions.assertEquals("uusdttouwa", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("uebbaumnyqup", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("dhtldwkyz", model.serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(379697539, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(38172527, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1341187268, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost()); - Assertions.assertEquals("gsxnkjzkdeslpv", model.serviceTypeName()); - Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("i", model.serviceDnsName()); + Assertions.assertEquals("qvkelnsm", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("n", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(923639125, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(589324262, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(663464413, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.LOW, model.defaultMoveCost()); + Assertions.assertEquals("veekgpwozuhkfp", model.serviceTypeName()); + Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.servicePackageActivationMode()); + Assertions.assertEquals("ofd", model.serviceDnsName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceResourceProperties model = new ServiceResourceProperties().withPlacementConstraints("ghxpkdw") + ServiceResourceProperties model = new ServiceResourceProperties().withPlacementConstraints("uusdttouwa") .withCorrelationScheme(Arrays.asList( new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("uebbaumnyqup"), - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) - .withServiceName("eojnabc"), + .withServiceName("qvkelnsm"), new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("smtxpsieb"), - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("hvpesapskrdqm"))) + .withServiceName("xwyjsflhhc"))) .withServiceLoadMetrics(Arrays.asList( - new ServiceLoadMetric().withName("dhtldwkyz") - .withWeight(ServiceLoadMetricWeight.LOW) - .withPrimaryDefaultLoad(379697539) - .withSecondaryDefaultLoad(38172527) - .withDefaultLoad(1341187268), - new ServiceLoadMetric().withName("cwsvlxotog") + new ServiceLoadMetric().withName("n") + .withWeight(ServiceLoadMetricWeight.HIGH) + .withPrimaryDefaultLoad(923639125) + .withSecondaryDefaultLoad(589324262) + .withDefaultLoad(663464413), + new ServiceLoadMetric().withName("joya") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(840312667) + .withSecondaryDefaultLoad(1050162327) + .withDefaultLoad(383766185), + new ServiceLoadMetric().withName("idzyexznelixhnr") .withWeight(ServiceLoadMetricWeight.MEDIUM) - .withPrimaryDefaultLoad(354304408) - .withSecondaryDefaultLoad(320708733) - .withDefaultLoad(767248190), - new ServiceLoadMetric().withName("nmic") - .withWeight(ServiceLoadMetricWeight.ZERO) - .withPrimaryDefaultLoad(1237447101) - .withSecondaryDefaultLoad(722438368) - .withDefaultLoad(1739821364))) - .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), - new ServicePlacementPolicy(), new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.HIGH) + .withPrimaryDefaultLoad(1975568377) + .withSecondaryDefaultLoad(1201064167) + .withDefaultLoad(681203122))) + .withServicePlacementPolicies( + Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), new ServicePlacementPolicy())) + .withDefaultMoveCost(MoveCost.LOW) .withScalingPolicies(Arrays.asList( new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()), @@ -81,23 +77,23 @@ public void testSerialize() throws Exception { .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()))) - .withServiceTypeName("gsxnkjzkdeslpv") + .withServiceTypeName("veekgpwozuhkfp") .withPartitionDescription(new Partition()) - .withServicePackageActivationMode(ServicePackageActivationMode.SHARED_PROCESS) - .withServiceDnsName("i"); + .withServicePackageActivationMode(ServicePackageActivationMode.EXCLUSIVE_PROCESS) + .withServiceDnsName("ofd"); model = BinaryData.fromObject(model).toObject(ServiceResourceProperties.class); - Assertions.assertEquals("ghxpkdw", model.placementConstraints()); + Assertions.assertEquals("uusdttouwa", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("uebbaumnyqup", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("dhtldwkyz", model.serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(379697539, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(38172527, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1341187268, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost()); - Assertions.assertEquals("gsxnkjzkdeslpv", model.serviceTypeName()); - Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("i", model.serviceDnsName()); + Assertions.assertEquals("qvkelnsm", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("n", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(923639125, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(589324262, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(663464413, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.LOW, model.defaultMoveCost()); + Assertions.assertEquals("veekgpwozuhkfp", model.serviceTypeName()); + Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.servicePackageActivationMode()); + Assertions.assertEquals("ofd", model.serviceDnsName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceUpdateParametersTests.java index 4ec6bbe8846b..e45b80a6b139 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceUpdateParametersTests.java @@ -14,18 +14,17 @@ public final class ServiceUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceUpdateParameters model = BinaryData - .fromString( - "{\"tags\":{\"bexrmcq\":\"yvxqtayriwwroy\",\"e\":\"bycnojvkn\",\"zhpvgqzcjrvxd\":\"qsgzvahapj\"}}") + .fromString("{\"tags\":{\"wlrbqtkoievseo\":\"dxunkbebxmubyyn\",\"wzizxbmpgcjefuzm\":\"gqrlltmuwla\"}}") .toObject(ServiceUpdateParameters.class); - Assertions.assertEquals("yvxqtayriwwroy", model.tags().get("bexrmcq")); + Assertions.assertEquals("dxunkbebxmubyyn", model.tags().get("wlrbqtkoievseo")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServiceUpdateParameters model = new ServiceUpdateParameters() - .withTags(mapOf("bexrmcq", "yvxqtayriwwroy", "e", "bycnojvkn", "zhpvgqzcjrvxd", "qsgzvahapj")); + .withTags(mapOf("wlrbqtkoievseo", "dxunkbebxmubyyn", "wzizxbmpgcjefuzm", "gqrlltmuwla")); model = BinaryData.fromObject(model).toObject(ServiceUpdateParameters.class); - Assertions.assertEquals("yvxqtayriwwroy", model.tags().get("bexrmcq")); + Assertions.assertEquals("dxunkbebxmubyyn", model.tags().get("wlrbqtkoievseo")); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateMockTests.java index 1bf7136d940a..62dea36e6647 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateMockTests.java @@ -36,7 +36,7 @@ public final class ServicesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"Succeeded\",\"serviceTypeName\":\"rjtloq\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"jrngif\",\"placementConstraints\":\"z\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"cb\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"imzdlyj\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"qwmkyoquf\"}],\"serviceLoadMetrics\":[{\"name\":\"uzslzojhpctfnmdx\",\"weight\":\"High\",\"primaryDefaultLoad\":120965041,\"secondaryDefaultLoad\":1293168350,\"defaultLoad\":1282016388},{\"name\":\"eyzihgrky\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1979493256,\"secondaryDefaultLoad\":1192399452,\"defaultLoad\":1579370856}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"omfgbeglqgleohib\":\"yhyhsgzfczb\",\"xeeebtijvacvbmqz\":\"tnluankrr\",\"wxacevehj\":\"qqxlajr\"},\"location\":\"yxoaf\",\"id\":\"oqltfae\",\"name\":\"linmfgv\",\"type\":\"irpghriypoqeyh\"}"; + = "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"Succeeded\",\"serviceTypeName\":\"mcmuapc\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"evwqqxeyskonq\",\"placementConstraints\":\"nkfkbgbzb\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"qocl\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ygvkzqkjj\"}],\"serviceLoadMetrics\":[{\"name\":\"bzefezr\",\"weight\":\"Low\",\"primaryDefaultLoad\":307502339,\"secondaryDefaultLoad\":488183187,\"defaultLoad\":22024155},{\"name\":\"ipqxbkwvzgnzv\",\"weight\":\"Low\",\"primaryDefaultLoad\":202407711,\"secondaryDefaultLoad\":899715277,\"defaultLoad\":1814010794},{\"name\":\"q\",\"weight\":\"High\",\"primaryDefaultLoad\":1574532239,\"secondaryDefaultLoad\":539540216,\"defaultLoad\":1313632662},{\"name\":\"hewjptmcgsbost\",\"weight\":\"Zero\",\"primaryDefaultLoad\":811304130,\"secondaryDefaultLoad\":1951649855,\"defaultLoad\":2000528831}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"eqvcwwyyurmoch\":\"lvfhrbbp\",\"ejnhlbkpb\":\"prprsnmokay\",\"hahzvechndbnwi\":\"pcpil\",\"wjwiuub\":\"hol\"},\"location\":\"fqsfa\",\"id\":\"qtferrqwexjkmf\",\"name\":\"apjwogqqnobpudcd\",\"type\":\"btqwpwyawbzas\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -46,62 +46,71 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ServiceResource response = manager.services() - .define("boldforobwj") - .withExistingApplication("lyhb", "cu", "chxgs") - .withRegion("jrcg") - .withTags(mapOf("ntvlwijpsttexo", "wq", "uncuw", "qpwcyyufmh", "unqndyfpchrqb", "qspkcdqzhlctd")) - .withProperties(new ServiceResourceProperties().withPlacementConstraints("kwrrwo") + .define("qqxlajr") + .withExistingApplication("qgleohibetnluank", "rfxeeebtij", "acvbmqz") + .withRegion("dbzqgqqihed") + .withTags(mapOf("yj", "fvnz", "opv", "otp")) + .withProperties(new ServiceResourceProperties().withPlacementConstraints("r") .withCorrelationScheme(Arrays.asList( new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("cwyhahno"), + .withServiceName("iypoqeyhlqhykprl"), + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) + .withServiceName("znuciqdsm"), new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("rkywuhpsvfuu"), + .withServiceName("iitdfuxt"), new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("tlwexxwlalniexz"))) + .withServiceName("siibmiybnnustgn"))) .withServiceLoadMetrics(Arrays.asList( - new ServiceLoadMetric().withName("pgepqtybbwwpgda") - .withWeight(ServiceLoadMetricWeight.HIGH) - .withPrimaryDefaultLoad(48761414) - .withSecondaryDefaultLoad(1437214498) - .withDefaultLoad(1984466292), - new ServiceLoadMetric().withName("q") + new ServiceLoadMetric().withName("nmgixh") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(27658455) + .withSecondaryDefaultLoad(1356013965) + .withDefaultLoad(1277274936), + new ServiceLoadMetric().withName("dorhcgyyp") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(812539177) + .withSecondaryDefaultLoad(1374628714) + .withDefaultLoad(147246399), + new ServiceLoadMetric().withName("mbxhugcmjkav") .withWeight(ServiceLoadMetricWeight.ZERO) - .withPrimaryDefaultLoad(264711388) - .withSecondaryDefaultLoad(197643000) - .withDefaultLoad(330254773))) + .withPrimaryDefaultLoad(2097431423) + .withSecondaryDefaultLoad(1220118900) + .withDefaultLoad(1135735210))) .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), new ServicePlacementPolicy(), new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.ZERO) + .withDefaultMoveCost(MoveCost.HIGH) .withScalingPolicies(Arrays.asList( new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()), + new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) + .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()))) - .withServiceTypeName("pbt") + .withServiceTypeName("afgaoqlt") .withPartitionDescription(new Partition()) .withServicePackageActivationMode(ServicePackageActivationMode.SHARED_PROCESS) - .withServiceDnsName("eszabbelawumuas")) + .withServiceDnsName("linmfgv")) .create(); - Assertions.assertEquals("z", response.properties().placementConstraints()); + Assertions.assertEquals("nkfkbgbzb", response.properties().placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, response.properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("cb", response.properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("uzslzojhpctfnmdx", response.properties().serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, + Assertions.assertEquals("qocl", response.properties().correlationScheme().get(0).serviceName()); + Assertions.assertEquals("bzefezr", response.properties().serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.LOW, response.properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(120965041, response.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(1293168350, response.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1282016388, response.properties().serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.LOW, response.properties().defaultMoveCost()); - Assertions.assertEquals("rjtloq", response.properties().serviceTypeName()); + Assertions.assertEquals(307502339, response.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(488183187, response.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(22024155, response.properties().serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.MEDIUM, response.properties().defaultMoveCost()); + Assertions.assertEquals("mcmuapc", response.properties().serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, response.properties().servicePackageActivationMode()); - Assertions.assertEquals("jrngif", response.properties().serviceDnsName()); - Assertions.assertEquals("yhyhsgzfczb", response.tags().get("omfgbeglqgleohib")); - Assertions.assertEquals("yxoaf", response.location()); + Assertions.assertEquals("evwqqxeyskonq", response.properties().serviceDnsName()); + Assertions.assertEquals("lvfhrbbp", response.tags().get("eqvcwwyyurmoch")); + Assertions.assertEquals("fqsfa", response.location()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetWithResponseMockTests.java index 625602ea7fcf..1eabaae4bb93 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetWithResponseMockTests.java @@ -25,7 +25,7 @@ public final class ServicesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"dqns\",\"serviceTypeName\":\"fzpbgtgkyl\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"rjeuut\",\"placementConstraints\":\"xezw\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"vbwnhhtq\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"ehgpp\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ifhpf\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ajvgcxtxjcsheafi\"}],\"serviceLoadMetrics\":[{\"name\":\"ugsresmkssjhoi\",\"weight\":\"High\",\"primaryDefaultLoad\":1451676187,\"secondaryDefaultLoad\":1606818470,\"defaultLoad\":753800849},{\"name\":\"prhptillu\",\"weight\":\"Low\",\"primaryDefaultLoad\":1656639409,\"secondaryDefaultLoad\":1467633348,\"defaultLoad\":2010820897},{\"name\":\"hm\",\"weight\":\"High\",\"primaryDefaultLoad\":484782271,\"secondaryDefaultLoad\":1561127811,\"defaultLoad\":379885454},{\"name\":\"tpwb\",\"weight\":\"Low\",\"primaryDefaultLoad\":1155046174,\"secondaryDefaultLoad\":1996411708,\"defaultLoad\":1970354054}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"ankjpdnjzh\":\"a\",\"lmuoyxprimrsopte\":\"joylh\",\"wxdzaumweoohgu\":\"cjmeislstvasy\",\"emwmdxmebwjs\":\"fuzboyjathwtzolb\"},\"location\":\"p\",\"id\":\"lxveabfqx\",\"name\":\"mwmqtibx\",\"type\":\"ijddtvqc\"}"; + = "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"amqu\",\"serviceTypeName\":\"iosrsjuivfcdis\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"xzhczexrxz\",\"placementConstraints\":\"jrtrhqvwrevk\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"nzonzl\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"i\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"wncvjtszcofiz\"}],\"serviceLoadMetrics\":[{\"name\":\"dhgbjkvre\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1414987705,\"secondaryDefaultLoad\":615677000,\"defaultLoad\":601956231},{\"name\":\"mlovuanashcxl\",\"weight\":\"High\",\"primaryDefaultLoad\":613917704,\"secondaryDefaultLoad\":513286022,\"defaultLoad\":1754763241},{\"name\":\"lvidizozs\",\"weight\":\"Low\",\"primaryDefaultLoad\":1441551440,\"secondaryDefaultLoad\":1920486563,\"defaultLoad\":1331407717}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"ltv\":\"puuw\",\"zhmkdasvflyh\":\"qjctzenkeif\",\"oldforobw\":\"xcudchxgsr\",\"hfovvacqpbtu\":\"lvizb\"},\"location\":\"xesz\",\"id\":\"belawumuaslzkwr\",\"name\":\"woycqucwyha\",\"type\":\"nomdrkywuhpsv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,25 +35,26 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ServiceResource response = manager.services() - .getWithResponse("c", "xgccknfnw", "btmvpdvjdhttza", "fedxihchrphkm", com.azure.core.util.Context.NONE) + .getWithResponse("ybpmzznrtffyaq", "tmhheioqa", "hvseufuqyrx", "dlcgqlsismjqfr", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xezw", response.properties().placementConstraints()); + Assertions.assertEquals("jrtrhqvwrevk", response.properties().placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, response.properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("vbwnhhtq", response.properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("ugsresmkssjhoi", response.properties().serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, + Assertions.assertEquals("nzonzl", response.properties().correlationScheme().get(0).serviceName()); + Assertions.assertEquals("dhgbjkvre", response.properties().serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, response.properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(1451676187, response.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(1606818470, response.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(753800849, response.properties().serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.LOW, response.properties().defaultMoveCost()); - Assertions.assertEquals("fzpbgtgkyl", response.properties().serviceTypeName()); - Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, + Assertions.assertEquals(1414987705, response.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(615677000, response.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(601956231, response.properties().serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.MEDIUM, response.properties().defaultMoveCost()); + Assertions.assertEquals("iosrsjuivfcdis", response.properties().serviceTypeName()); + Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, response.properties().servicePackageActivationMode()); - Assertions.assertEquals("rjeuut", response.properties().serviceDnsName()); - Assertions.assertEquals("a", response.tags().get("ankjpdnjzh")); - Assertions.assertEquals("p", response.location()); + Assertions.assertEquals("xzhczexrxz", response.properties().serviceDnsName()); + Assertions.assertEquals("puuw", response.tags().get("ltv")); + Assertions.assertEquals("xesz", response.location()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsMockTests.java index 6d625d072b69..bd66fe737030 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsMockTests.java @@ -26,7 +26,7 @@ public final class ServicesListByApplicationsMockTests { @Test public void testListByApplications() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"bu\",\"serviceTypeName\":\"qwyxebeybpm\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"tffyaqit\",\"placementConstraints\":\"heioqa\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"eufuqyrxpdlcgql\"}],\"serviceLoadMetrics\":[{\"name\":\"mjqfrddgamquhio\",\"weight\":\"High\",\"primaryDefaultLoad\":2131162818,\"secondaryDefaultLoad\":364566844,\"defaultLoad\":1776992890},{\"name\":\"disyirnxz\",\"weight\":\"Medium\",\"primaryDefaultLoad\":394290556,\"secondaryDefaultLoad\":1167405678,\"defaultLoad\":994025187},{\"name\":\"ujrtrhqvwr\",\"weight\":\"Zero\",\"primaryDefaultLoad\":589242227,\"secondaryDefaultLoad\":1550567255,\"defaultLoad\":1309315594}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"cvjtszcofiz\":\"yw\",\"gbjkvreljeamur\":\"htd\",\"xlpm\":\"zmlovuanash\"},\"location\":\"rbdkelvidiz\",\"id\":\"sdbccxjmonfdgnwn\",\"name\":\"ypuuwwltvuqjctze\",\"type\":\"keifzzhmkdasv\"}]}"; + = "{\"value\":[{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"bwwpgdakchzy\",\"serviceTypeName\":\"lixqnrkcxkjibn\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"uxswqrntvl\",\"placementConstraints\":\"jpsttexoq\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"yyufmhruncuw\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"spkcdqzh\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"tddunqnd\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"pchrqbn\"}],\"serviceLoadMetrics\":[{\"name\":\"cgegydcwbo\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1792979212,\"secondaryDefaultLoad\":1073196572,\"defaultLoad\":1101777200},{\"name\":\"ihrraiouaub\",\"weight\":\"Medium\",\"primaryDefaultLoad\":434775558,\"secondaryDefaultLoad\":1702747573,\"defaultLoad\":465765494},{\"name\":\"oj\",\"weight\":\"High\",\"primaryDefaultLoad\":1614609688,\"secondaryDefaultLoad\":2143335427,\"defaultLoad\":1851238843},{\"name\":\"asccbiui\",\"weight\":\"Low\",\"primaryDefaultLoad\":26585986,\"secondaryDefaultLoad\":162687194,\"defaultLoad\":7799986}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"mdxotngfdgu\":\"dvruzslzojhpctf\",\"i\":\"eyzihgrky\"},\"location\":\"bsnmfpph\",\"id\":\"eevy\",\"name\":\"yhsgz\",\"type\":\"czbgomfgbeg\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,29 +36,29 @@ public void testListByApplications() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ServiceResource> response = manager.services() - .listByApplications("tad", "jaeukmrsieekpn", "zaapmudqmeqwi", com.azure.core.util.Context.NONE); + .listByApplications("uurutlwexxwlalni", "xzsrzpge", "q", com.azure.core.util.Context.NONE); - Assertions.assertEquals("heioqa", response.iterator().next().properties().placementConstraints()); + Assertions.assertEquals("jpsttexoq", response.iterator().next().properties().placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, response.iterator().next().properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("eufuqyrxpdlcgql", + Assertions.assertEquals("yyufmhruncuw", response.iterator().next().properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("mjqfrddgamquhio", + Assertions.assertEquals("cgegydcwbo", response.iterator().next().properties().serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, + Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, response.iterator().next().properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(2131162818, + Assertions.assertEquals(1792979212, response.iterator().next().properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(364566844, + Assertions.assertEquals(1073196572, response.iterator().next().properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1776992890, + Assertions.assertEquals(1101777200, response.iterator().next().properties().serviceLoadMetrics().get(0).defaultLoad()); Assertions.assertEquals(MoveCost.MEDIUM, response.iterator().next().properties().defaultMoveCost()); - Assertions.assertEquals("qwyxebeybpm", response.iterator().next().properties().serviceTypeName()); - Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, + Assertions.assertEquals("lixqnrkcxkjibn", response.iterator().next().properties().serviceTypeName()); + Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, response.iterator().next().properties().servicePackageActivationMode()); - Assertions.assertEquals("tffyaqit", response.iterator().next().properties().serviceDnsName()); - Assertions.assertEquals("yw", response.iterator().next().tags().get("cvjtszcofiz")); - Assertions.assertEquals("rbdkelvidiz", response.iterator().next().location()); + Assertions.assertEquals("uxswqrntvl", response.iterator().next().properties().serviceDnsName()); + Assertions.assertEquals("dvruzslzojhpctf", response.iterator().next().tags().get("mdxotngfdgu")); + Assertions.assertEquals("bsnmfpph", response.iterator().next().location()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsParameterDescriptionTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsParameterDescriptionTests.java index 5499f2bdfd9d..72e729b0fae1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsParameterDescriptionTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsParameterDescriptionTests.java @@ -11,17 +11,17 @@ public final class SettingsParameterDescriptionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SettingsParameterDescription model - = BinaryData.fromString("{\"name\":\"z\",\"value\":\"v\"}").toObject(SettingsParameterDescription.class); - Assertions.assertEquals("z", model.name()); - Assertions.assertEquals("v", model.value()); + SettingsParameterDescription model = BinaryData.fromString("{\"name\":\"qnajxqugj\",\"value\":\"ky\"}") + .toObject(SettingsParameterDescription.class); + Assertions.assertEquals("qnajxqugj", model.name()); + Assertions.assertEquals("ky", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SettingsParameterDescription model = new SettingsParameterDescription().withName("z").withValue("v"); + SettingsParameterDescription model = new SettingsParameterDescription().withName("qnajxqugj").withValue("ky"); model = BinaryData.fromObject(model).toObject(SettingsParameterDescription.class); - Assertions.assertEquals("z", model.name()); - Assertions.assertEquals("v", model.value()); + Assertions.assertEquals("qnajxqugj", model.name()); + Assertions.assertEquals("ky", model.value()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsSectionDescriptionTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsSectionDescriptionTests.java index bf0c470d684a..d953fabbbe01 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsSectionDescriptionTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsSectionDescriptionTests.java @@ -13,24 +13,21 @@ public final class SettingsSectionDescriptionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SettingsSectionDescription model = BinaryData.fromString( - "{\"name\":\"vokotllxdyh\",\"parameters\":[{\"name\":\"y\",\"value\":\"cogjltdtbn\"},{\"name\":\"hadoocrk\",\"value\":\"cikhnv\"},{\"name\":\"amqgxqquezikyw\",\"value\":\"gxk\"},{\"name\":\"lla\",\"value\":\"melwuipiccjz\"}]}") - .toObject(SettingsSectionDescription.class); - Assertions.assertEquals("vokotllxdyh", model.name()); - Assertions.assertEquals("y", model.parameters().get(0).name()); - Assertions.assertEquals("cogjltdtbn", model.parameters().get(0).value()); + SettingsSectionDescription model + = BinaryData.fromString("{\"name\":\"rw\",\"parameters\":[{\"name\":\"co\",\"value\":\"uhpkxkgymar\"}]}") + .toObject(SettingsSectionDescription.class); + Assertions.assertEquals("rw", model.name()); + Assertions.assertEquals("co", model.parameters().get(0).name()); + Assertions.assertEquals("uhpkxkgymar", model.parameters().get(0).value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SettingsSectionDescription model = new SettingsSectionDescription().withName("vokotllxdyh") - .withParameters(Arrays.asList(new SettingsParameterDescription().withName("y").withValue("cogjltdtbn"), - new SettingsParameterDescription().withName("hadoocrk").withValue("cikhnv"), - new SettingsParameterDescription().withName("amqgxqquezikyw").withValue("gxk"), - new SettingsParameterDescription().withName("lla").withValue("melwuipiccjz"))); + SettingsSectionDescription model = new SettingsSectionDescription().withName("rw") + .withParameters(Arrays.asList(new SettingsParameterDescription().withName("co").withValue("uhpkxkgymar"))); model = BinaryData.fromObject(model).toObject(SettingsSectionDescription.class); - Assertions.assertEquals("vokotllxdyh", model.name()); - Assertions.assertEquals("y", model.parameters().get(0).name()); - Assertions.assertEquals("cogjltdtbn", model.parameters().get(0).value()); + Assertions.assertEquals("rw", model.name()); + Assertions.assertEquals("co", model.parameters().get(0).name()); + Assertions.assertEquals("uhpkxkgymar", model.parameters().get(0).value()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SkuTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SkuTests.java index c3b69599fc05..a433c1b3c13f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SkuTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SkuTests.java @@ -12,14 +12,14 @@ public final class SkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Sku model = BinaryData.fromString("{\"name\":\"Basic\"}").toObject(Sku.class); - Assertions.assertEquals(SkuName.BASIC, model.name()); + Sku model = BinaryData.fromString("{\"name\":\"Standard\"}").toObject(Sku.class); + Assertions.assertEquals(SkuName.STANDARD, model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Sku model = new Sku().withName(SkuName.BASIC); + Sku model = new Sku().withName(SkuName.STANDARD); model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals(SkuName.BASIC, model.name()); + Assertions.assertEquals(SkuName.STANDARD, model.name()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatefulServicePropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatefulServicePropertiesTests.java index 7bb3a63e417b..a75564df9c28 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatefulServicePropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatefulServicePropertiesTests.java @@ -24,88 +24,92 @@ public final class StatefulServicePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StatefulServiceProperties model = BinaryData.fromString( - "{\"serviceKind\":\"Stateful\",\"hasPersistedState\":false,\"targetReplicaSetSize\":914615331,\"minReplicaSetSize\":1745104172,\"replicaRestartWaitDuration\":\"bkc\",\"quorumLossWaitDuration\":\"dhbt\",\"standByReplicaKeepDuration\":\"phywpnvj\",\"servicePlacementTimeLimit\":\"qnermclfplphoxu\",\"provisioningState\":\"rpabg\",\"serviceTypeName\":\"epsbjtazqu\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"pmueefjzwfqk\",\"placementConstraints\":\"jidsuyonobglaoc\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"cmgyud\"}],\"serviceLoadMetrics\":[{\"name\":\"lmoyrx\",\"weight\":\"Low\",\"primaryDefaultLoad\":403204349,\"secondaryDefaultLoad\":397011465,\"defaultLoad\":1705865903},{\"name\":\"txhdzh\",\"weight\":\"Zero\",\"primaryDefaultLoad\":315057202,\"secondaryDefaultLoad\":278675710,\"defaultLoad\":1058131952}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") + "{\"serviceKind\":\"Stateful\",\"hasPersistedState\":false,\"targetReplicaSetSize\":1181953038,\"minReplicaSetSize\":1784168921,\"replicaRestartWaitDuration\":\"pnapnyiropuh\",\"quorumLossWaitDuration\":\"gvpgy\",\"standByReplicaKeepDuration\":\"qgitxmed\",\"servicePlacementTimeLimit\":\"c\",\"provisioningState\":\"ynqwwncwzzhxgk\",\"serviceTypeName\":\"rmgucnap\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"ellwptfdy\",\"placementConstraints\":\"fqbuaceopzf\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"uaopppcqeq\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"lzdahzxctobgbkdm\"}],\"serviceLoadMetrics\":[{\"name\":\"postmgrcfbunrm\",\"weight\":\"Low\",\"primaryDefaultLoad\":1514196335,\"secondaryDefaultLoad\":529783276,\"defaultLoad\":1199001730},{\"name\":\"vjymjhxxjyngud\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1003023874,\"secondaryDefaultLoad\":855265021,\"defaultLoad\":173760475},{\"name\":\"qzvszjf\",\"weight\":\"Low\",\"primaryDefaultLoad\":2022160914,\"secondaryDefaultLoad\":1631327314,\"defaultLoad\":1924532267}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") .toObject(StatefulServiceProperties.class); - Assertions.assertEquals("jidsuyonobglaoc", model.placementConstraints()); + Assertions.assertEquals("fqbuaceopzf", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("cmgyud", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("lmoyrx", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals("uaopppcqeq", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("postmgrcfbunrm", model.serviceLoadMetrics().get(0).name()); Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(403204349, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(397011465, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1705865903, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.LOW, model.defaultMoveCost()); - Assertions.assertEquals("epsbjtazqu", model.serviceTypeName()); + Assertions.assertEquals(1514196335, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(529783276, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(1199001730, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost()); + Assertions.assertEquals("rmgucnap", model.serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("pmueefjzwfqk", model.serviceDnsName()); + Assertions.assertEquals("ellwptfdy", model.serviceDnsName()); Assertions.assertFalse(model.hasPersistedState()); - Assertions.assertEquals(914615331, model.targetReplicaSetSize()); - Assertions.assertEquals(1745104172, model.minReplicaSetSize()); - Assertions.assertEquals("bkc", model.replicaRestartWaitDuration()); - Assertions.assertEquals("dhbt", model.quorumLossWaitDuration()); - Assertions.assertEquals("phywpnvj", model.standByReplicaKeepDuration()); - Assertions.assertEquals("qnermclfplphoxu", model.servicePlacementTimeLimit()); + Assertions.assertEquals(1181953038, model.targetReplicaSetSize()); + Assertions.assertEquals(1784168921, model.minReplicaSetSize()); + Assertions.assertEquals("pnapnyiropuh", model.replicaRestartWaitDuration()); + Assertions.assertEquals("gvpgy", model.quorumLossWaitDuration()); + Assertions.assertEquals("qgitxmed", model.standByReplicaKeepDuration()); + Assertions.assertEquals("c", model.servicePlacementTimeLimit()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StatefulServiceProperties model = new StatefulServiceProperties().withPlacementConstraints("jidsuyonobglaoc") - .withCorrelationScheme( - Arrays.asList(new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) - .withServiceName("cmgyud"))) + StatefulServiceProperties model = new StatefulServiceProperties().withPlacementConstraints("fqbuaceopzf") + .withCorrelationScheme(Arrays.asList( + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) + .withServiceName("uaopppcqeq"), + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) + .withServiceName("lzdahzxctobgbkdm"))) .withServiceLoadMetrics(Arrays.asList( - new ServiceLoadMetric().withName("lmoyrx") + new ServiceLoadMetric().withName("postmgrcfbunrm") .withWeight(ServiceLoadMetricWeight.LOW) - .withPrimaryDefaultLoad(403204349) - .withSecondaryDefaultLoad(397011465) - .withDefaultLoad(1705865903), - new ServiceLoadMetric().withName("txhdzh") - .withWeight(ServiceLoadMetricWeight.ZERO) - .withPrimaryDefaultLoad(315057202) - .withSecondaryDefaultLoad(278675710) - .withDefaultLoad(1058131952))) - .withServicePlacementPolicies( - Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.LOW) + .withPrimaryDefaultLoad(1514196335) + .withSecondaryDefaultLoad(529783276) + .withDefaultLoad(1199001730), + new ServiceLoadMetric().withName("vjymjhxxjyngud") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(1003023874) + .withSecondaryDefaultLoad(855265021) + .withDefaultLoad(173760475), + new ServiceLoadMetric().withName("qzvszjf") + .withWeight(ServiceLoadMetricWeight.LOW) + .withPrimaryDefaultLoad(2022160914) + .withSecondaryDefaultLoad(1631327314) + .withDefaultLoad(1924532267))) + .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy())) + .withDefaultMoveCost(MoveCost.MEDIUM) .withScalingPolicies(Arrays.asList( new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()), - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()))) - .withServiceTypeName("epsbjtazqu") + .withServiceTypeName("rmgucnap") .withPartitionDescription(new Partition()) .withServicePackageActivationMode(ServicePackageActivationMode.EXCLUSIVE_PROCESS) - .withServiceDnsName("pmueefjzwfqk") + .withServiceDnsName("ellwptfdy") .withHasPersistedState(false) - .withTargetReplicaSetSize(914615331) - .withMinReplicaSetSize(1745104172) - .withReplicaRestartWaitDuration("bkc") - .withQuorumLossWaitDuration("dhbt") - .withStandByReplicaKeepDuration("phywpnvj") - .withServicePlacementTimeLimit("qnermclfplphoxu"); + .withTargetReplicaSetSize(1181953038) + .withMinReplicaSetSize(1784168921) + .withReplicaRestartWaitDuration("pnapnyiropuh") + .withQuorumLossWaitDuration("gvpgy") + .withStandByReplicaKeepDuration("qgitxmed") + .withServicePlacementTimeLimit("c"); model = BinaryData.fromObject(model).toObject(StatefulServiceProperties.class); - Assertions.assertEquals("jidsuyonobglaoc", model.placementConstraints()); + Assertions.assertEquals("fqbuaceopzf", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("cmgyud", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("lmoyrx", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals("uaopppcqeq", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("postmgrcfbunrm", model.serviceLoadMetrics().get(0).name()); Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(403204349, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(397011465, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1705865903, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.LOW, model.defaultMoveCost()); - Assertions.assertEquals("epsbjtazqu", model.serviceTypeName()); + Assertions.assertEquals(1514196335, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(529783276, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(1199001730, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost()); + Assertions.assertEquals("rmgucnap", model.serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("pmueefjzwfqk", model.serviceDnsName()); + Assertions.assertEquals("ellwptfdy", model.serviceDnsName()); Assertions.assertFalse(model.hasPersistedState()); - Assertions.assertEquals(914615331, model.targetReplicaSetSize()); - Assertions.assertEquals(1745104172, model.minReplicaSetSize()); - Assertions.assertEquals("bkc", model.replicaRestartWaitDuration()); - Assertions.assertEquals("dhbt", model.quorumLossWaitDuration()); - Assertions.assertEquals("phywpnvj", model.standByReplicaKeepDuration()); - Assertions.assertEquals("qnermclfplphoxu", model.servicePlacementTimeLimit()); + Assertions.assertEquals(1181953038, model.targetReplicaSetSize()); + Assertions.assertEquals(1784168921, model.minReplicaSetSize()); + Assertions.assertEquals("pnapnyiropuh", model.replicaRestartWaitDuration()); + Assertions.assertEquals("gvpgy", model.quorumLossWaitDuration()); + Assertions.assertEquals("qgitxmed", model.standByReplicaKeepDuration()); + Assertions.assertEquals("c", model.servicePlacementTimeLimit()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatelessServicePropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatelessServicePropertiesTests.java index e6402b6083fa..56fb4abf3990 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatelessServicePropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatelessServicePropertiesTests.java @@ -24,85 +24,85 @@ public final class StatelessServicePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StatelessServiceProperties model = BinaryData.fromString( - "{\"serviceKind\":\"Stateless\",\"instanceCount\":1228255689,\"minInstanceCount\":1085647312,\"minInstancePercentage\":475839278,\"provisioningState\":\"ca\",\"serviceTypeName\":\"uzbpzkafku\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"nwbmeh\",\"placementConstraints\":\"eyvjusrtslhspkde\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"fm\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"gkvtmelmqkrhah\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"juahaquhcdhmdual\"}],\"serviceLoadMetrics\":[{\"name\":\"qpv\",\"weight\":\"High\",\"primaryDefaultLoad\":294636913,\"secondaryDefaultLoad\":1606090132,\"defaultLoad\":205808204},{\"name\":\"gvxp\",\"weight\":\"Low\",\"primaryDefaultLoad\":1677729561,\"secondaryDefaultLoad\":1121960551,\"defaultLoad\":1625950300},{\"name\":\"sgwbnbbeld\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1782633502,\"secondaryDefaultLoad\":70118233,\"defaultLoad\":113893877}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") + "{\"serviceKind\":\"Stateless\",\"instanceCount\":1920566576,\"minInstanceCount\":928990245,\"minInstancePercentage\":1261594790,\"provisioningState\":\"qmcbxvwvxyslqbhs\",\"serviceTypeName\":\"xoblytkbl\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"wwfbkrvrnsvshq\",\"placementConstraints\":\"hxcr\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"vasrruvwb\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"qfsubcgjbirx\"}],\"serviceLoadMetrics\":[{\"name\":\"bsrfbj\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1972509388,\"secondaryDefaultLoad\":1365200524,\"defaultLoad\":772106102},{\"name\":\"tpvjzbexilzznfqq\",\"weight\":\"Low\",\"primaryDefaultLoad\":1473271495,\"secondaryDefaultLoad\":600094153,\"defaultLoad\":1628769376},{\"name\":\"uoujmkcjhwqy\",\"weight\":\"Zero\",\"primaryDefaultLoad\":778428037,\"secondaryDefaultLoad\":385457826,\"defaultLoad\":524895743},{\"name\":\"wgdrjervnaenqp\",\"weight\":\"High\",\"primaryDefaultLoad\":681452902,\"secondaryDefaultLoad\":895776000,\"defaultLoad\":412409909}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"High\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") .toObject(StatelessServiceProperties.class); - Assertions.assertEquals("eyvjusrtslhspkde", model.placementConstraints()); + Assertions.assertEquals("hxcr", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("fm", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("qpv", model.serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(294636913, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(1606090132, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(205808204, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost()); - Assertions.assertEquals("uzbpzkafku", model.serviceTypeName()); - Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("nwbmeh", model.serviceDnsName()); - Assertions.assertEquals(1228255689, model.instanceCount()); - Assertions.assertEquals(1085647312, model.minInstanceCount()); - Assertions.assertEquals(475839278, model.minInstancePercentage()); + Assertions.assertEquals("vasrruvwb", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("bsrfbj", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, model.serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(1972509388, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(1365200524, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(772106102, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost()); + Assertions.assertEquals("xoblytkbl", model.serviceTypeName()); + Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.servicePackageActivationMode()); + Assertions.assertEquals("wwfbkrvrnsvshq", model.serviceDnsName()); + Assertions.assertEquals(1920566576, model.instanceCount()); + Assertions.assertEquals(928990245, model.minInstanceCount()); + Assertions.assertEquals(1261594790, model.minInstancePercentage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StatelessServiceProperties model = new StatelessServiceProperties().withPlacementConstraints("eyvjusrtslhspkde") + StatelessServiceProperties model = new StatelessServiceProperties().withPlacementConstraints("hxcr") .withCorrelationScheme(Arrays.asList( new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("fm"), - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) - .withServiceName("gkvtmelmqkrhah"), + .withServiceName("vasrruvwb"), new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("juahaquhcdhmdual"))) + .withServiceName("qfsubcgjbirx"))) .withServiceLoadMetrics(Arrays.asList( - new ServiceLoadMetric().withName("qpv") - .withWeight(ServiceLoadMetricWeight.HIGH) - .withPrimaryDefaultLoad(294636913) - .withSecondaryDefaultLoad(1606090132) - .withDefaultLoad(205808204), - new ServiceLoadMetric().withName("gvxp") + new ServiceLoadMetric().withName("bsrfbj") + .withWeight(ServiceLoadMetricWeight.ZERO) + .withPrimaryDefaultLoad(1972509388) + .withSecondaryDefaultLoad(1365200524) + .withDefaultLoad(772106102), + new ServiceLoadMetric().withName("tpvjzbexilzznfqq") .withWeight(ServiceLoadMetricWeight.LOW) - .withPrimaryDefaultLoad(1677729561) - .withSecondaryDefaultLoad(1121960551) - .withDefaultLoad(1625950300), - new ServiceLoadMetric().withName("sgwbnbbeld") + .withPrimaryDefaultLoad(1473271495) + .withSecondaryDefaultLoad(600094153) + .withDefaultLoad(1628769376), + new ServiceLoadMetric().withName("uoujmkcjhwqy") .withWeight(ServiceLoadMetricWeight.ZERO) - .withPrimaryDefaultLoad(1782633502) - .withSecondaryDefaultLoad(70118233) - .withDefaultLoad(113893877))) - .withServicePlacementPolicies( - Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.MEDIUM) + .withPrimaryDefaultLoad(778428037) + .withSecondaryDefaultLoad(385457826) + .withDefaultLoad(524895743), + new ServiceLoadMetric().withName("wgdrjervnaenqp") + .withWeight(ServiceLoadMetricWeight.HIGH) + .withPrimaryDefaultLoad(681452902) + .withSecondaryDefaultLoad(895776000) + .withDefaultLoad(412409909))) + .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy())) + .withDefaultMoveCost(MoveCost.HIGH) .withScalingPolicies(Arrays.asList( - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()))) - .withServiceTypeName("uzbpzkafku") + .withServiceTypeName("xoblytkbl") .withPartitionDescription(new Partition()) - .withServicePackageActivationMode(ServicePackageActivationMode.SHARED_PROCESS) - .withServiceDnsName("nwbmeh") - .withInstanceCount(1228255689) - .withMinInstanceCount(1085647312) - .withMinInstancePercentage(475839278); + .withServicePackageActivationMode(ServicePackageActivationMode.EXCLUSIVE_PROCESS) + .withServiceDnsName("wwfbkrvrnsvshq") + .withInstanceCount(1920566576) + .withMinInstanceCount(928990245) + .withMinInstancePercentage(1261594790); model = BinaryData.fromObject(model).toObject(StatelessServiceProperties.class); - Assertions.assertEquals("eyvjusrtslhspkde", model.placementConstraints()); + Assertions.assertEquals("hxcr", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("fm", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("qpv", model.serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(294636913, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(1606090132, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(205808204, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost()); - Assertions.assertEquals("uzbpzkafku", model.serviceTypeName()); - Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("nwbmeh", model.serviceDnsName()); - Assertions.assertEquals(1228255689, model.instanceCount()); - Assertions.assertEquals(1085647312, model.minInstanceCount()); - Assertions.assertEquals(475839278, model.minInstancePercentage()); + Assertions.assertEquals("vasrruvwb", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("bsrfbj", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, model.serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(1972509388, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(1365200524, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(772106102, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost()); + Assertions.assertEquals("xoblytkbl", model.serviceTypeName()); + Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.servicePackageActivationMode()); + Assertions.assertEquals("wwfbkrvrnsvshq", model.serviceDnsName()); + Assertions.assertEquals(1920566576, model.instanceCount()); + Assertions.assertEquals(928990245, model.minInstanceCount()); + Assertions.assertEquals(1261594790, model.minInstancePercentage()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SubnetTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SubnetTests.java index 20ca75d9ebba..e6e6e777da76 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SubnetTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SubnetTests.java @@ -14,27 +14,27 @@ public final class SubnetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Subnet model = BinaryData.fromString( - "{\"name\":\"mueedndrdvstk\",\"enableIpv6\":false,\"privateEndpointNetworkPolicies\":\"enabled\",\"privateLinkServiceNetworkPolicies\":\"disabled\",\"networkSecurityGroupId\":\"lmfmtdaay\"}") + "{\"name\":\"krmnjijpxacqqud\",\"enableIpv6\":true,\"privateEndpointNetworkPolicies\":\"disabled\",\"privateLinkServiceNetworkPolicies\":\"disabled\",\"networkSecurityGroupId\":\"abjy\"}") .toObject(Subnet.class); - Assertions.assertEquals("mueedndrdvstk", model.name()); - Assertions.assertFalse(model.enableIpv6()); - Assertions.assertEquals(PrivateEndpointNetworkPolicies.ENABLED, model.privateEndpointNetworkPolicies()); + Assertions.assertEquals("krmnjijpxacqqud", model.name()); + Assertions.assertTrue(model.enableIpv6()); + Assertions.assertEquals(PrivateEndpointNetworkPolicies.DISABLED, model.privateEndpointNetworkPolicies()); Assertions.assertEquals(PrivateLinkServiceNetworkPolicies.DISABLED, model.privateLinkServiceNetworkPolicies()); - Assertions.assertEquals("lmfmtdaay", model.networkSecurityGroupId()); + Assertions.assertEquals("abjy", model.networkSecurityGroupId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Subnet model = new Subnet().withName("mueedndrdvstk") - .withEnableIpv6(false) - .withPrivateEndpointNetworkPolicies(PrivateEndpointNetworkPolicies.ENABLED) + Subnet model = new Subnet().withName("krmnjijpxacqqud") + .withEnableIpv6(true) + .withPrivateEndpointNetworkPolicies(PrivateEndpointNetworkPolicies.DISABLED) .withPrivateLinkServiceNetworkPolicies(PrivateLinkServiceNetworkPolicies.DISABLED) - .withNetworkSecurityGroupId("lmfmtdaay"); + .withNetworkSecurityGroupId("abjy"); model = BinaryData.fromObject(model).toObject(Subnet.class); - Assertions.assertEquals("mueedndrdvstk", model.name()); - Assertions.assertFalse(model.enableIpv6()); - Assertions.assertEquals(PrivateEndpointNetworkPolicies.ENABLED, model.privateEndpointNetworkPolicies()); + Assertions.assertEquals("krmnjijpxacqqud", model.name()); + Assertions.assertTrue(model.enableIpv6()); + Assertions.assertEquals(PrivateEndpointNetworkPolicies.DISABLED, model.privateEndpointNetworkPolicies()); Assertions.assertEquals(PrivateLinkServiceNetworkPolicies.DISABLED, model.privateLinkServiceNetworkPolicies()); - Assertions.assertEquals("lmfmtdaay", model.networkSecurityGroupId()); + Assertions.assertEquals("abjy", model.networkSecurityGroupId()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionPropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionPropertiesTests.java index 726b341214fb..f0e52529f32d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionPropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionPropertiesTests.java @@ -14,38 +14,38 @@ public final class VMSSExtensionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VMSSExtensionProperties model = BinaryData.fromString( - "{\"publisher\":\"vdnkfxusem\",\"type\":\"wzrmuh\",\"typeHandlerVersion\":\"pfcqdp\",\"autoUpgradeMinorVersion\":false,\"settings\":\"datavpsvuoymgcce\",\"protectedSettings\":\"dataezrypql\",\"forceUpdateTag\":\"eokerqwkyhkobopg\",\"provisionAfterExtensions\":[\"k\"],\"provisioningState\":\"epbqpcrfkbw\",\"enableAutomaticUpgrade\":true,\"setupOrder\":[\"BeforeSFRuntime\",\"BeforeSFRuntime\",\"BeforeSFRuntime\"]}") + "{\"publisher\":\"ebqaaysjkixqtnq\",\"type\":\"tezlwff\",\"typeHandlerVersion\":\"iakp\",\"autoUpgradeMinorVersion\":true,\"settings\":\"datam\",\"protectedSettings\":\"datad\",\"forceUpdateTag\":\"mmji\",\"provisionAfterExtensions\":[\"ozphvwauyqncygu\",\"kvi\"],\"provisioningState\":\"dscwxqupevzhf\",\"enableAutomaticUpgrade\":true,\"setupOrder\":[\"BeforeSFRuntime\",\"BeforeSFRuntime\"]}") .toObject(VMSSExtensionProperties.class); - Assertions.assertEquals("vdnkfxusem", model.publisher()); - Assertions.assertEquals("wzrmuh", model.type()); - Assertions.assertEquals("pfcqdp", model.typeHandlerVersion()); - Assertions.assertFalse(model.autoUpgradeMinorVersion()); - Assertions.assertEquals("eokerqwkyhkobopg", model.forceUpdateTag()); - Assertions.assertEquals("k", model.provisionAfterExtensions().get(0)); + Assertions.assertEquals("ebqaaysjkixqtnq", model.publisher()); + Assertions.assertEquals("tezlwff", model.type()); + Assertions.assertEquals("iakp", model.typeHandlerVersion()); + Assertions.assertTrue(model.autoUpgradeMinorVersion()); + Assertions.assertEquals("mmji", model.forceUpdateTag()); + Assertions.assertEquals("ozphvwauyqncygu", model.provisionAfterExtensions().get(0)); Assertions.assertTrue(model.enableAutomaticUpgrade()); Assertions.assertEquals(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, model.setupOrder().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VMSSExtensionProperties model = new VMSSExtensionProperties().withPublisher("vdnkfxusem") - .withType("wzrmuh") - .withTypeHandlerVersion("pfcqdp") - .withAutoUpgradeMinorVersion(false) - .withSettings("datavpsvuoymgcce") - .withProtectedSettings("dataezrypql") - .withForceUpdateTag("eokerqwkyhkobopg") - .withProvisionAfterExtensions(Arrays.asList("k")) + VMSSExtensionProperties model = new VMSSExtensionProperties().withPublisher("ebqaaysjkixqtnq") + .withType("tezlwff") + .withTypeHandlerVersion("iakp") + .withAutoUpgradeMinorVersion(true) + .withSettings("datam") + .withProtectedSettings("datad") + .withForceUpdateTag("mmji") + .withProvisionAfterExtensions(Arrays.asList("ozphvwauyqncygu", "kvi")) .withEnableAutomaticUpgrade(true) - .withSetupOrder(Arrays.asList(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, - VmssExtensionSetupOrder.BEFORE_SFRUNTIME, VmssExtensionSetupOrder.BEFORE_SFRUNTIME)); + .withSetupOrder( + Arrays.asList(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, VmssExtensionSetupOrder.BEFORE_SFRUNTIME)); model = BinaryData.fromObject(model).toObject(VMSSExtensionProperties.class); - Assertions.assertEquals("vdnkfxusem", model.publisher()); - Assertions.assertEquals("wzrmuh", model.type()); - Assertions.assertEquals("pfcqdp", model.typeHandlerVersion()); - Assertions.assertFalse(model.autoUpgradeMinorVersion()); - Assertions.assertEquals("eokerqwkyhkobopg", model.forceUpdateTag()); - Assertions.assertEquals("k", model.provisionAfterExtensions().get(0)); + Assertions.assertEquals("ebqaaysjkixqtnq", model.publisher()); + Assertions.assertEquals("tezlwff", model.type()); + Assertions.assertEquals("iakp", model.typeHandlerVersion()); + Assertions.assertTrue(model.autoUpgradeMinorVersion()); + Assertions.assertEquals("mmji", model.forceUpdateTag()); + Assertions.assertEquals("ozphvwauyqncygu", model.provisionAfterExtensions().get(0)); Assertions.assertTrue(model.enableAutomaticUpgrade()); Assertions.assertEquals(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, model.setupOrder().get(0)); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSizeTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSizeTests.java index 77db834f295d..75c7ce38cd10 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSizeTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSizeTests.java @@ -10,6 +10,6 @@ public final class VMSizeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VMSize model = BinaryData.fromString("{\"size\":\"qapnedgfbcv\"}").toObject(VMSize.class); + VMSize model = BinaryData.fromString("{\"size\":\"ovvqfovljxywsu\"}").toObject(VMSize.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultCertificateTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultCertificateTests.java index d173b9d51d5d..aaf4c0505c25 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultCertificateTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultCertificateTests.java @@ -11,19 +11,18 @@ public final class VaultCertificateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VaultCertificate model = BinaryData - .fromString("{\"certificateUrl\":\"hfkvtvsexsowuel\",\"certificateStore\":\"qhhahhxvrhmzkwpj\"}") - .toObject(VaultCertificate.class); - Assertions.assertEquals("hfkvtvsexsowuel", model.certificateUrl()); - Assertions.assertEquals("qhhahhxvrhmzkwpj", model.certificateStore()); + VaultCertificate model + = BinaryData.fromString("{\"certificateUrl\":\"on\",\"certificateStore\":\"myhgfipnsxkmc\"}") + .toObject(VaultCertificate.class); + Assertions.assertEquals("on", model.certificateUrl()); + Assertions.assertEquals("myhgfipnsxkmc", model.certificateStore()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VaultCertificate model - = new VaultCertificate().withCertificateUrl("hfkvtvsexsowuel").withCertificateStore("qhhahhxvrhmzkwpj"); + VaultCertificate model = new VaultCertificate().withCertificateUrl("on").withCertificateStore("myhgfipnsxkmc"); model = BinaryData.fromObject(model).toObject(VaultCertificate.class); - Assertions.assertEquals("hfkvtvsexsowuel", model.certificateUrl()); - Assertions.assertEquals("qhhahhxvrhmzkwpj", model.certificateStore()); + Assertions.assertEquals("on", model.certificateUrl()); + Assertions.assertEquals("myhgfipnsxkmc", model.certificateStore()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultSecretGroupTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultSecretGroupTests.java index 3f5c6b4e5670..a23ab8ce05a5 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultSecretGroupTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultSecretGroupTests.java @@ -15,24 +15,23 @@ public final class VaultSecretGroupTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VaultSecretGroup model = BinaryData.fromString( - "{\"sourceVault\":{\"id\":\"cirgzp\"},\"vaultCertificates\":[{\"certificateUrl\":\"lazszrn\",\"certificateStore\":\"oiindfpwpjy\"},{\"certificateUrl\":\"wbtlhflsjcdh\",\"certificateStore\":\"zfjvfbgofe\"},{\"certificateUrl\":\"jagrqmqhldvr\",\"certificateStore\":\"iiojnal\"}]}") + "{\"sourceVault\":{\"id\":\"xccbdreaxhcex\"},\"vaultCertificates\":[{\"certificateUrl\":\"rvqahqkghtpwi\",\"certificateStore\":\"nhyjsv\"},{\"certificateUrl\":\"ycxzbfvoo\",\"certificateStore\":\"vrvmtgjqppyost\"}]}") .toObject(VaultSecretGroup.class); - Assertions.assertEquals("cirgzp", model.sourceVault().id()); - Assertions.assertEquals("lazszrn", model.vaultCertificates().get(0).certificateUrl()); - Assertions.assertEquals("oiindfpwpjy", model.vaultCertificates().get(0).certificateStore()); + Assertions.assertEquals("xccbdreaxhcex", model.sourceVault().id()); + Assertions.assertEquals("rvqahqkghtpwi", model.vaultCertificates().get(0).certificateUrl()); + Assertions.assertEquals("nhyjsv", model.vaultCertificates().get(0).certificateStore()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VaultSecretGroup model - = new VaultSecretGroup().withSourceVault(new SubResource().withId("cirgzp")) + = new VaultSecretGroup().withSourceVault(new SubResource().withId("xccbdreaxhcex")) .withVaultCertificates(Arrays.asList( - new VaultCertificate().withCertificateUrl("lazszrn").withCertificateStore("oiindfpwpjy"), - new VaultCertificate().withCertificateUrl("wbtlhflsjcdh").withCertificateStore("zfjvfbgofe"), - new VaultCertificate().withCertificateUrl("jagrqmqhldvr").withCertificateStore("iiojnal"))); + new VaultCertificate().withCertificateUrl("rvqahqkghtpwi").withCertificateStore("nhyjsv"), + new VaultCertificate().withCertificateUrl("ycxzbfvoo").withCertificateStore("vrvmtgjqppyost"))); model = BinaryData.fromObject(model).toObject(VaultSecretGroup.class); - Assertions.assertEquals("cirgzp", model.sourceVault().id()); - Assertions.assertEquals("lazszrn", model.vaultCertificates().get(0).certificateUrl()); - Assertions.assertEquals("oiindfpwpjy", model.vaultCertificates().get(0).certificateStore()); + Assertions.assertEquals("xccbdreaxhcex", model.sourceVault().id()); + Assertions.assertEquals("rvqahqkghtpwi", model.vaultCertificates().get(0).certificateUrl()); + Assertions.assertEquals("nhyjsv", model.vaultCertificates().get(0).certificateStore()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmApplicationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmApplicationTests.java index 8cfa5beb4bf7..583931d6201e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmApplicationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmApplicationTests.java @@ -12,30 +12,30 @@ public final class VmApplicationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VmApplication model = BinaryData.fromString( - "{\"configurationReference\":\"qmi\",\"enableAutomaticUpgrade\":false,\"order\":1222923392,\"packageReferenceId\":\"ggufhyaomtb\",\"vmGalleryTags\":\"havgrvk\",\"treatFailureAsDeploymentFailure\":true}") + "{\"configurationReference\":\"zuo\",\"enableAutomaticUpgrade\":false,\"order\":1975248748,\"packageReferenceId\":\"w\",\"vmGalleryTags\":\"ioknssxmoj\",\"treatFailureAsDeploymentFailure\":false}") .toObject(VmApplication.class); - Assertions.assertEquals("qmi", model.configurationReference()); + Assertions.assertEquals("zuo", model.configurationReference()); Assertions.assertFalse(model.enableAutomaticUpgrade()); - Assertions.assertEquals(1222923392, model.order()); - Assertions.assertEquals("ggufhyaomtb", model.packageReferenceId()); - Assertions.assertEquals("havgrvk", model.vmGalleryTags()); - Assertions.assertTrue(model.treatFailureAsDeploymentFailure()); + Assertions.assertEquals(1975248748, model.order()); + Assertions.assertEquals("w", model.packageReferenceId()); + Assertions.assertEquals("ioknssxmoj", model.vmGalleryTags()); + Assertions.assertFalse(model.treatFailureAsDeploymentFailure()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VmApplication model = new VmApplication().withConfigurationReference("qmi") + VmApplication model = new VmApplication().withConfigurationReference("zuo") .withEnableAutomaticUpgrade(false) - .withOrder(1222923392) - .withPackageReferenceId("ggufhyaomtb") - .withVmGalleryTags("havgrvk") - .withTreatFailureAsDeploymentFailure(true); + .withOrder(1975248748) + .withPackageReferenceId("w") + .withVmGalleryTags("ioknssxmoj") + .withTreatFailureAsDeploymentFailure(false); model = BinaryData.fromObject(model).toObject(VmApplication.class); - Assertions.assertEquals("qmi", model.configurationReference()); + Assertions.assertEquals("zuo", model.configurationReference()); Assertions.assertFalse(model.enableAutomaticUpgrade()); - Assertions.assertEquals(1222923392, model.order()); - Assertions.assertEquals("ggufhyaomtb", model.packageReferenceId()); - Assertions.assertEquals("havgrvk", model.vmGalleryTags()); - Assertions.assertTrue(model.treatFailureAsDeploymentFailure()); + Assertions.assertEquals(1975248748, model.order()); + Assertions.assertEquals("w", model.packageReferenceId()); + Assertions.assertEquals("ioknssxmoj", model.vmGalleryTags()); + Assertions.assertFalse(model.treatFailureAsDeploymentFailure()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmManagedIdentityTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmManagedIdentityTests.java index 9aa28efef096..46031d57aa54 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmManagedIdentityTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmManagedIdentityTests.java @@ -12,17 +12,17 @@ public final class VmManagedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VmManagedIdentity model = BinaryData - .fromString("{\"userAssignedIdentities\":[\"lpqekf\",\"nkhtjsyingw\",\"qatmtdhtmdvy\",\"gikdgsz\"]}") - .toObject(VmManagedIdentity.class); - Assertions.assertEquals("lpqekf", model.userAssignedIdentities().get(0)); + VmManagedIdentity model + = BinaryData.fromString("{\"userAssignedIdentities\":[\"jbypel\",\"c\",\"vhixbjxy\",\"w\"]}") + .toObject(VmManagedIdentity.class); + Assertions.assertEquals("jbypel", model.userAssignedIdentities().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VmManagedIdentity model = new VmManagedIdentity() - .withUserAssignedIdentities(Arrays.asList("lpqekf", "nkhtjsyingw", "qatmtdhtmdvy", "gikdgsz")); + VmManagedIdentity model + = new VmManagedIdentity().withUserAssignedIdentities(Arrays.asList("jbypel", "c", "vhixbjxy", "w")); model = BinaryData.fromObject(model).toObject(VmManagedIdentity.class); - Assertions.assertEquals("lpqekf", model.userAssignedIdentities().get(0)); + Assertions.assertEquals("jbypel", model.userAssignedIdentities().get(0)); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssDataDiskTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssDataDiskTests.java index beae5690cb52..ca0beda69e7b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssDataDiskTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssDataDiskTests.java @@ -14,24 +14,24 @@ public final class VmssDataDiskTests { public void testDeserialize() throws Exception { VmssDataDisk model = BinaryData .fromString( - "{\"lun\":366208637,\"diskSizeGB\":2107533163,\"diskType\":\"Standard_LRS\",\"diskLetter\":\"olvrw\"}") + "{\"lun\":1845240712,\"diskSizeGB\":1128027174,\"diskType\":\"PremiumV2_LRS\",\"diskLetter\":\"ywub\"}") .toObject(VmssDataDisk.class); - Assertions.assertEquals(366208637, model.lun()); - Assertions.assertEquals(2107533163, model.diskSizeGB()); - Assertions.assertEquals(DiskType.STANDARD_LRS, model.diskType()); - Assertions.assertEquals("olvrw", model.diskLetter()); + Assertions.assertEquals(1845240712, model.lun()); + Assertions.assertEquals(1128027174, model.diskSizeGB()); + Assertions.assertEquals(DiskType.PREMIUM_V2_LRS, model.diskType()); + Assertions.assertEquals("ywub", model.diskLetter()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VmssDataDisk model = new VmssDataDisk().withLun(366208637) - .withDiskSizeGB(2107533163) - .withDiskType(DiskType.STANDARD_LRS) - .withDiskLetter("olvrw"); + VmssDataDisk model = new VmssDataDisk().withLun(1845240712) + .withDiskSizeGB(1128027174) + .withDiskType(DiskType.PREMIUM_V2_LRS) + .withDiskLetter("ywub"); model = BinaryData.fromObject(model).toObject(VmssDataDisk.class); - Assertions.assertEquals(366208637, model.lun()); - Assertions.assertEquals(2107533163, model.diskSizeGB()); - Assertions.assertEquals(DiskType.STANDARD_LRS, model.diskType()); - Assertions.assertEquals("olvrw", model.diskLetter()); + Assertions.assertEquals(1845240712, model.lun()); + Assertions.assertEquals(1128027174, model.diskSizeGB()); + Assertions.assertEquals(DiskType.PREMIUM_V2_LRS, model.diskType()); + Assertions.assertEquals("ywub", model.diskLetter()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssExtensionTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssExtensionTests.java index 836616a665fb..c822877e05ac 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssExtensionTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssExtensionTests.java @@ -14,42 +14,41 @@ public final class VmssExtensionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VmssExtension model = BinaryData.fromString( - "{\"name\":\"wws\",\"properties\":{\"publisher\":\"ughftqsx\",\"type\":\"qxujxukndxd\",\"typeHandlerVersion\":\"grjguufzd\",\"autoUpgradeMinorVersion\":false,\"settings\":\"datatfih\",\"protectedSettings\":\"databotzingamvppho\",\"forceUpdateTag\":\"qzudphq\",\"provisionAfterExtensions\":[\"dkfw\",\"nwcvtbvkayhmtnv\",\"qiatkzwpcnp\",\"zcjaesgvvsccy\"],\"provisioningState\":\"g\",\"enableAutomaticUpgrade\":true,\"setupOrder\":[\"BeforeSFRuntime\",\"BeforeSFRuntime\",\"BeforeSFRuntime\",\"BeforeSFRuntime\"]}}") + "{\"name\":\"a\",\"properties\":{\"publisher\":\"krrjrea\",\"type\":\"xt\",\"typeHandlerVersion\":\"gumhjglikkxws\",\"autoUpgradeMinorVersion\":true,\"settings\":\"dataqpvuzlmvfelf\",\"protectedSettings\":\"datagplcrpwjxeznoigb\",\"forceUpdateTag\":\"jwmwkpnbs\",\"provisionAfterExtensions\":[\"jjoqkagf\",\"sxtta\",\"gzxnfaazpxdtnk\",\"mkqjj\"],\"provisioningState\":\"uenvrkp\",\"enableAutomaticUpgrade\":true,\"setupOrder\":[\"BeforeSFRuntime\",\"BeforeSFRuntime\"]}}") .toObject(VmssExtension.class); - Assertions.assertEquals("wws", model.name()); - Assertions.assertEquals("ughftqsx", model.publisher()); - Assertions.assertEquals("qxujxukndxd", model.type()); - Assertions.assertEquals("grjguufzd", model.typeHandlerVersion()); - Assertions.assertFalse(model.autoUpgradeMinorVersion()); - Assertions.assertEquals("qzudphq", model.forceUpdateTag()); - Assertions.assertEquals("dkfw", model.provisionAfterExtensions().get(0)); + Assertions.assertEquals("a", model.name()); + Assertions.assertEquals("krrjrea", model.publisher()); + Assertions.assertEquals("xt", model.type()); + Assertions.assertEquals("gumhjglikkxws", model.typeHandlerVersion()); + Assertions.assertTrue(model.autoUpgradeMinorVersion()); + Assertions.assertEquals("jwmwkpnbs", model.forceUpdateTag()); + Assertions.assertEquals("jjoqkagf", model.provisionAfterExtensions().get(0)); Assertions.assertTrue(model.enableAutomaticUpgrade()); Assertions.assertEquals(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, model.setupOrder().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VmssExtension model = new VmssExtension().withName("wws") - .withPublisher("ughftqsx") - .withType("qxujxukndxd") - .withTypeHandlerVersion("grjguufzd") - .withAutoUpgradeMinorVersion(false) - .withSettings("datatfih") - .withProtectedSettings("databotzingamvppho") - .withForceUpdateTag("qzudphq") - .withProvisionAfterExtensions(Arrays.asList("dkfw", "nwcvtbvkayhmtnv", "qiatkzwpcnp", "zcjaesgvvsccy")) + VmssExtension model = new VmssExtension().withName("a") + .withPublisher("krrjrea") + .withType("xt") + .withTypeHandlerVersion("gumhjglikkxws") + .withAutoUpgradeMinorVersion(true) + .withSettings("dataqpvuzlmvfelf") + .withProtectedSettings("datagplcrpwjxeznoigb") + .withForceUpdateTag("jwmwkpnbs") + .withProvisionAfterExtensions(Arrays.asList("jjoqkagf", "sxtta", "gzxnfaazpxdtnk", "mkqjj")) .withEnableAutomaticUpgrade(true) .withSetupOrder( - Arrays.asList(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, VmssExtensionSetupOrder.BEFORE_SFRUNTIME, - VmssExtensionSetupOrder.BEFORE_SFRUNTIME, VmssExtensionSetupOrder.BEFORE_SFRUNTIME)); + Arrays.asList(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, VmssExtensionSetupOrder.BEFORE_SFRUNTIME)); model = BinaryData.fromObject(model).toObject(VmssExtension.class); - Assertions.assertEquals("wws", model.name()); - Assertions.assertEquals("ughftqsx", model.publisher()); - Assertions.assertEquals("qxujxukndxd", model.type()); - Assertions.assertEquals("grjguufzd", model.typeHandlerVersion()); - Assertions.assertFalse(model.autoUpgradeMinorVersion()); - Assertions.assertEquals("qzudphq", model.forceUpdateTag()); - Assertions.assertEquals("dkfw", model.provisionAfterExtensions().get(0)); + Assertions.assertEquals("a", model.name()); + Assertions.assertEquals("krrjrea", model.publisher()); + Assertions.assertEquals("xt", model.type()); + Assertions.assertEquals("gumhjglikkxws", model.typeHandlerVersion()); + Assertions.assertTrue(model.autoUpgradeMinorVersion()); + Assertions.assertEquals("jwmwkpnbs", model.forceUpdateTag()); + Assertions.assertEquals("jjoqkagf", model.provisionAfterExtensions().get(0)); Assertions.assertTrue(model.enableAutomaticUpgrade()); Assertions.assertEquals(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, model.setupOrder().get(0)); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ZoneFaultSimulationContentTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ZoneFaultSimulationContentTests.java index f5dab42a57f5..7e915b205b04 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ZoneFaultSimulationContentTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ZoneFaultSimulationContentTests.java @@ -15,22 +15,22 @@ public final class ZoneFaultSimulationContentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ZoneFaultSimulationContent model = BinaryData.fromString( - "{\"faultKind\":\"Zone\",\"zones\":[\"dkcrodt\",\"infwjlfltkacjve\",\"kdlfoa\"],\"force\":false,\"constraints\":{\"expirationTime\":\"2021-01-22T11:21:37Z\"}}") + "{\"faultKind\":\"Zone\",\"zones\":[\"wqaldsyu\"],\"force\":true,\"constraints\":{\"expirationTime\":\"2021-06-17T14:42:30Z\"}}") .toObject(ZoneFaultSimulationContent.class); - Assertions.assertFalse(model.force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-22T11:21:37Z"), model.constraints().expirationTime()); - Assertions.assertEquals("dkcrodt", model.zones().get(0)); + Assertions.assertTrue(model.force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-17T14:42:30Z"), model.constraints().expirationTime()); + Assertions.assertEquals("wqaldsyu", model.zones().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ZoneFaultSimulationContent model = new ZoneFaultSimulationContent().withForce(false) + ZoneFaultSimulationContent model = new ZoneFaultSimulationContent().withForce(true) .withConstraints( - new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-01-22T11:21:37Z"))) - .withZones(Arrays.asList("dkcrodt", "infwjlfltkacjve", "kdlfoa")); + new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-06-17T14:42:30Z"))) + .withZones(Arrays.asList("wqaldsyu")); model = BinaryData.fromObject(model).toObject(ZoneFaultSimulationContent.class); - Assertions.assertFalse(model.force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-22T11:21:37Z"), model.constraints().expirationTime()); - Assertions.assertEquals("dkcrodt", model.zones().get(0)); + Assertions.assertTrue(model.force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-17T14:42:30Z"), model.constraints().expirationTime()); + Assertions.assertEquals("wqaldsyu", model.zones().get(0)); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/tsp-location.yaml b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/tsp-location.yaml index 960526af63f8..a26d7c515cce 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/tsp-location.yaml +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/tsp-location.yaml @@ -1,4 +1,4 @@ -directory: specification/servicefabricmanagedclusters/ServiceFabricManagedClusters.Management -commit: 05584a1019e75159b0dc70a6751afaa2c77868e6 +directory: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/ServiceFabricManagedClusters +commit: 833aeb9992144f6e04d99de1316a7f37a001ee94 repo: Azure/azure-rest-api-specs additionalDirectories: From eb81443b8e828c6f79acede6304d6a7fb10f2be2 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 24 Nov 2025 17:17:41 -0800 Subject: [PATCH 042/186] Sync eng/common directory with azure-sdk-tools for PR 13040 (#47369) * Include groupId in the pkg name when create api view request * Used the package info in the function signature --------- Co-authored-by: ray chen <raychen@microsoft.com> --- .../templates/steps/create-apireview.yml | 1 + .../templates/steps/validate-all-packages.yml | 1 + eng/common/scripts/Detect-Api-Changes.ps1 | 16 ++++++++++++---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/eng/common/pipelines/templates/steps/create-apireview.yml b/eng/common/pipelines/templates/steps/create-apireview.yml index 288c775aac76..e5deb551a382 100644 --- a/eng/common/pipelines/templates/steps/create-apireview.yml +++ b/eng/common/pipelines/templates/steps/create-apireview.yml @@ -40,6 +40,7 @@ steps: - task: Powershell@2 inputs: filePath: ${{ parameters.SourceRootPath }}/eng/common/scripts/Create-APIReview.ps1 + # PackageInfoFiles example: @('a/file1.json','a/file2.json') arguments: > -PackageInfoFiles @('${{ join(''',''', parameters.PackageInfoFiles) }}') -ArtifactList ('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Select-Object Name) diff --git a/eng/common/pipelines/templates/steps/validate-all-packages.yml b/eng/common/pipelines/templates/steps/validate-all-packages.yml index ae09d268a940..4bcb1286738c 100644 --- a/eng/common/pipelines/templates/steps/validate-all-packages.yml +++ b/eng/common/pipelines/templates/steps/validate-all-packages.yml @@ -24,6 +24,7 @@ steps: azureSubscription: opensource-api-connection scriptType: pscore scriptLocation: inlineScript + # PackageInfoFiles example: @('a/file1.json','a/file2.json') inlineScript: | $(Build.SourcesDirectory)/eng/common/scripts/Validate-All-Packages.ps1 ` -ArtifactList ('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Select-Object Name) ` diff --git a/eng/common/scripts/Detect-Api-Changes.ps1 b/eng/common/scripts/Detect-Api-Changes.ps1 index 5c261de37171..c8e00935cbe0 100644 --- a/eng/common/scripts/Detect-Api-Changes.ps1 +++ b/eng/common/scripts/Detect-Api-Changes.ps1 @@ -22,8 +22,16 @@ Param ( $configFileDir = Join-Path -Path $ArtifactPath "PackageInfo" # Submit API review request and return status whether current revision is approved or pending or failed to create review -function Submit-Request($filePath, $packageName, $packageType) +function Submit-Request($filePath, $packageInfo) { + $packageName = $packageInfo.ArtifactName ?? $packageInfo.Name + $packageType = $packageInfo.SdkType + + # Construct full package name with groupId if available + $fullPackageName = $packageName + if ($packageInfo.PSObject.Members.Name -contains "Group" -and $packageInfo.Group) { + $fullPackageName = "$($packageInfo.Group):$packageName" + } $repoName = $RepoFullName if (!$repoName) { $repoName = "azure/azure-sdk-for-$LanguageShort" @@ -36,7 +44,7 @@ function Submit-Request($filePath, $packageName, $packageType) $query.Add('commitSha', $CommitSha) $query.Add('repoName', $repoName) $query.Add('pullRequestNumber', $PullRequestNumber) - $query.Add('packageName', $packageName) + $query.Add('packageName', $fullPackageName) $query.Add('language', $LanguageShort) $query.Add('project', $DevopsProject) $query.Add('packageType', $packageType) @@ -75,7 +83,7 @@ function Submit-Request($filePath, $packageName, $packageType) catch { Write-Host "ERROR: API request failed" -ForegroundColor Red - Write-Host "Status Code: $($_.Exception.Response.StatusCode.Value__)" -ForegroundColor Yellow + Write-Host "Status Code: $($_.Exception.Response.StatusCode.Value__)" -ForegroundColor Yellow Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Yellow if ($_.ErrorDetails.Message) { Write-Host "Details: $($_.ErrorDetails.Message)" -ForegroundColor Yellow @@ -165,7 +173,7 @@ foreach ($packageInfoFile in $packageInfoFiles) if ($isRequired -eq $True) { $filePath = $pkgPath.Replace($ArtifactPath , "").Replace("\", "/") - $respCode = Submit-Request -filePath $filePath -packageName $pkgArtifactName -packageType $packageType + $respCode = Submit-Request -filePath $filePath -packageInfo $packageInfo if ($respCode -ne '200') { $responses[$pkgArtifactName] = $respCode From a18023d1192a47f7a2282846dae2b158c9a59370 Mon Sep 17 00:00:00 2001 From: Xiaofei Cao <92354331+XiaofeiCao@users.noreply.github.com> Date: Tue, 25 Nov 2025 10:21:32 +0800 Subject: [PATCH 043/186] Increment package versions for patch releases (#47361) Co-authored-by: azure-sdk <azuresdk@microsoft.com> --- eng/versioning/version_client.txt | 38 +++++++++---------- .../azure-resourcemanager-appplatform/pom.xml | 6 +-- .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-appservice/pom.xml | 8 ++-- .../CHANGELOG.md | 8 ++++ sdk/batch/azure-resourcemanager-batch/pom.xml | 2 +- .../azure-resourcemanager-cdn/CHANGELOG.md | 8 ++++ sdk/cdn/azure-resourcemanager-cdn/pom.xml | 4 +- sdk/chaos/azure-resourcemanager-chaos/pom.xml | 2 +- .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-compute/pom.xml | 8 ++-- .../CHANGELOG.md | 8 ++++ .../pom.xml | 6 +-- .../CHANGELOG.md | 8 ++++ .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-cosmos/pom.xml | 2 +- .../azure-resourcemanager-datafactory/pom.xml | 2 +- .../azure-resourcemanager-dns/CHANGELOG.md | 8 ++++ .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-eventhubs/pom.xml | 2 +- .../azure-resourcemanager-frontdoor/pom.xml | 2 +- .../azure-resourcemanager-hdinsight/pom.xml | 2 +- .../pom.xml | 2 +- .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-keyvault/pom.xml | 2 +- .../pom.xml | 4 +- .../pom.xml | 2 +- .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-monitor/pom.xml | 10 ++--- .../azure-resourcemanager-msi/CHANGELOG.md | 8 ++++ sdk/msi/azure-resourcemanager-msi/pom.xml | 2 +- .../azure-resourcemanager-network/pom.xml | 4 +- .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-redis/CHANGELOG.md | 8 ++++ sdk/redis/azure-resourcemanager-redis/pom.xml | 2 +- .../pom.xml | 2 +- .../azure-resourcemanager/pom.xml | 38 +++++++++---------- .../azure-resourcemanager-compute/pom.xml | 2 +- .../azure-resourcemanager-network/pom.xml | 2 +- .../azure-resourcemanager-search/CHANGELOG.md | 8 ++++ .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-sql/CHANGELOG.md | 8 ++++ sdk/sql/azure-resourcemanager-sql/pom.xml | 2 +- .../azure-resourcemanager-standbypool/pom.xml | 2 +- .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-storage/pom.xml | 4 +- .../CHANGELOG.md | 8 ++++ 47 files changed, 234 insertions(+), 82 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 0ea94f0a1f2a..e8f279b856f9 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -272,30 +272,30 @@ com.azure.spring:spring-cloud-azure-testcontainers;6.0.0;6.1.0-beta.1 com.azure:azure-spring-data-cosmos;6.0.0;6.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager;2.56.0;2.57.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-appplatform;2.51.0;2.52.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-appservice;2.54.0;2.55.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-authorization;2.53.5;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-cdn;2.53.4;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-compute;2.55.0;2.56.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.53.5;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.54.0;2.55.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-containerservice;2.56.0;2.57.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-appservice;2.54.1;2.55.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-authorization;2.53.6;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-cdn;2.53.5;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-compute;2.55.1;2.56.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.53.6;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.54.1;2.55.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-containerservice;2.56.1;2.57.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-cosmos;2.54.0;2.55.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-dns;2.53.4;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.53.4;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-keyvault;2.54.0;2.55.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-monitor;2.53.4;2.54.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-msi;2.53.4;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-dns;2.53.5;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.53.5;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-keyvault;2.54.1;2.55.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-monitor;2.53.5;2.54.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-msi;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-network;2.57.0;2.58.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-perf;1.0.0-beta.1;1.0.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-privatedns;2.53.4;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-privatedns;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-resources;2.53.5;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-redis;2.53.4;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-redis;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-samples;2.0.0-beta.1;2.0.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-search;2.54.3;2.55.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-servicebus;2.53.4;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-sql;2.53.4;2.54.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-storage;2.55.1;2.56.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-trafficmanager;2.53.4;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-search;2.54.4;2.55.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-servicebus;2.53.5;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-sql;2.53.5;2.54.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-storage;2.55.2;2.56.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-trafficmanager;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-test;2.0.0-beta.2;2.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-mediaservices;2.4.0;2.5.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-mysql;1.0.2;1.1.0-beta.1 diff --git a/sdk/appplatform/azure-resourcemanager-appplatform/pom.xml b/sdk/appplatform/azure-resourcemanager-appplatform/pom.xml index 45b58c6d0fdb..09c017f38a57 100644 --- a/sdk/appplatform/azure-resourcemanager-appplatform/pom.xml +++ b/sdk/appplatform/azure-resourcemanager-appplatform/pom.xml @@ -115,19 +115,19 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-keyvault</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-dns</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-appservice</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md b/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md index 229bf71bada3..8c54c9ff760a 100644 --- a/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md +++ b/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.54.1 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.54.0 (2025-11-13) ### Other Changes diff --git a/sdk/appservice/azure-resourcemanager-appservice/pom.xml b/sdk/appservice/azure-resourcemanager-appservice/pom.xml index 1f07a3e2ce54..0be7ed5bb346 100644 --- a/sdk/appservice/azure-resourcemanager-appservice/pom.xml +++ b/sdk/appservice/azure-resourcemanager-appservice/pom.xml @@ -69,22 +69,22 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-keyvault</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-dns</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> diff --git a/sdk/authorization/azure-resourcemanager-authorization/CHANGELOG.md b/sdk/authorization/azure-resourcemanager-authorization/CHANGELOG.md index 9f1cbcb033d1..17c6aa4a4f07 100644 --- a/sdk/authorization/azure-resourcemanager-authorization/CHANGELOG.md +++ b/sdk/authorization/azure-resourcemanager-authorization/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.6 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.5 (2025-11-14) ### Other Changes diff --git a/sdk/batch/azure-resourcemanager-batch/pom.xml b/sdk/batch/azure-resourcemanager-batch/pom.xml index 09c93d161f9a..fb5f52d9c485 100644 --- a/sdk/batch/azure-resourcemanager-batch/pom.xml +++ b/sdk/batch/azure-resourcemanager-batch/pom.xml @@ -77,7 +77,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/cdn/azure-resourcemanager-cdn/CHANGELOG.md b/sdk/cdn/azure-resourcemanager-cdn/CHANGELOG.md index ae6f0ae4ef40..62f72956a8d9 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/CHANGELOG.md +++ b/sdk/cdn/azure-resourcemanager-cdn/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes diff --git a/sdk/cdn/azure-resourcemanager-cdn/pom.xml b/sdk/cdn/azure-resourcemanager-cdn/pom.xml index 6ce5fc88d8e8..0666cc3c49a5 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/pom.xml +++ b/sdk/cdn/azure-resourcemanager-cdn/pom.xml @@ -70,13 +70,13 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-appservice</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-dns</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/chaos/azure-resourcemanager-chaos/pom.xml b/sdk/chaos/azure-resourcemanager-chaos/pom.xml index 6bcb76489023..c4df66a8d3a8 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/pom.xml +++ b/sdk/chaos/azure-resourcemanager-chaos/pom.xml @@ -97,7 +97,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-keyvault</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md b/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md index fea9335cb16b..842551add4dd 100644 --- a/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md +++ b/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.55.1 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.55.0 (2025-11-17) ### Other Changes diff --git a/sdk/compute/azure-resourcemanager-compute/pom.xml b/sdk/compute/azure-resourcemanager-compute/pom.xml index 5ad94dbbeb09..5b7045da2805 100644 --- a/sdk/compute/azure-resourcemanager-compute/pom.xml +++ b/sdk/compute/azure-resourcemanager-compute/pom.xml @@ -76,7 +76,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> @@ -86,12 +86,12 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-authorization</artifactId> - <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> + <version>2.53.6</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> </dependency> <dependency> <groupId>org.slf4j</groupId> @@ -120,7 +120,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-keyvault</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md b/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md index 0e9b1d756362..aaae3a70b8fb 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.6 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.5 (2025-10-27) ### Other Changes diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml b/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml index 60d58341ef26..4afb220d5cc0 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml @@ -65,17 +65,17 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-authorization</artifactId> - <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> + <version>2.53.6</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md index 5fc3c0e4a8f7..8cffc1811c50 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.54.1 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.54.0 (2025-11-05) ### Other Changes diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md index b793fbbd6344..749aeddb0309 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.56.1 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.56.0 (2025-11-10) ### Other Changes diff --git a/sdk/cosmos/azure-resourcemanager-cosmos/pom.xml b/sdk/cosmos/azure-resourcemanager-cosmos/pom.xml index 3121fdd8d200..4bfe79dab908 100644 --- a/sdk/cosmos/azure-resourcemanager-cosmos/pom.xml +++ b/sdk/cosmos/azure-resourcemanager-cosmos/pom.xml @@ -73,7 +73,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml b/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml index 5a65749c539c..98955ffca0fc 100644 --- a/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml +++ b/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml @@ -77,7 +77,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/dns/azure-resourcemanager-dns/CHANGELOG.md b/sdk/dns/azure-resourcemanager-dns/CHANGELOG.md index 4246217fad55..6799cf2d589b 100644 --- a/sdk/dns/azure-resourcemanager-dns/CHANGELOG.md +++ b/sdk/dns/azure-resourcemanager-dns/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/CHANGELOG.md b/sdk/eventhubs/azure-resourcemanager-eventhubs/CHANGELOG.md index cda98337fba0..358ce82f5169 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/CHANGELOG.md +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml b/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml index 2772fc46ca63..451da1df5498 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml @@ -64,7 +64,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml b/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml index 6784e9496827..da6ef91e386b 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml @@ -79,7 +79,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml b/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml index 1d0e62b9e295..41f136fa7187 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml @@ -78,7 +78,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/pom.xml b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/pom.xml index 8df22cce5d74..954fa6fa1ddf 100644 --- a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/pom.xml +++ b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/pom.xml @@ -84,7 +84,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/CHANGELOG.md b/sdk/keyvault/azure-resourcemanager-keyvault/CHANGELOG.md index 533419e99e3b..5276862ebf9a 100644 --- a/sdk/keyvault/azure-resourcemanager-keyvault/CHANGELOG.md +++ b/sdk/keyvault/azure-resourcemanager-keyvault/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.54.1 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.54.0 (2025-11-10) ### Other Changes diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/pom.xml b/sdk/keyvault/azure-resourcemanager-keyvault/pom.xml index 46242d576d9c..51bb75ddc174 100644 --- a/sdk/keyvault/azure-resourcemanager-keyvault/pom.xml +++ b/sdk/keyvault/azure-resourcemanager-keyvault/pom.xml @@ -64,7 +64,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-authorization</artifactId> - <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> + <version>2.53.6</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml b/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml index fb389f74ba9d..76e8f1d8750e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml @@ -78,13 +78,13 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-keyvault</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml index 17f53245c268..3a4c39151d34 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml @@ -92,7 +92,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/monitor/azure-resourcemanager-monitor/CHANGELOG.md b/sdk/monitor/azure-resourcemanager-monitor/CHANGELOG.md index 5b162c5df743..7897ab59d475 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/CHANGELOG.md +++ b/sdk/monitor/azure-resourcemanager-monitor/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.54.0-beta.1 (2025-11-06) ### Other Changes diff --git a/sdk/monitor/azure-resourcemanager-monitor/pom.xml b/sdk/monitor/azure-resourcemanager-monitor/pom.xml index 743b8cbb9711..9fa3872ea845 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/pom.xml +++ b/sdk/monitor/azure-resourcemanager-monitor/pom.xml @@ -84,31 +84,31 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-compute</artifactId> - <version>2.55.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-compute;dependency} --> + <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-compute;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-appservice</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-eventhubs</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-eventhubs;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-eventhubs;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-sql</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-sql;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-sql;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/msi/azure-resourcemanager-msi/CHANGELOG.md b/sdk/msi/azure-resourcemanager-msi/CHANGELOG.md index 1a6a7bf4354a..87e2077b7ba6 100644 --- a/sdk/msi/azure-resourcemanager-msi/CHANGELOG.md +++ b/sdk/msi/azure-resourcemanager-msi/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes diff --git a/sdk/msi/azure-resourcemanager-msi/pom.xml b/sdk/msi/azure-resourcemanager-msi/pom.xml index d49c9b83a261..54d328a8fda0 100644 --- a/sdk/msi/azure-resourcemanager-msi/pom.xml +++ b/sdk/msi/azure-resourcemanager-msi/pom.xml @@ -66,7 +66,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-authorization</artifactId> - <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> + <version>2.53.6</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> diff --git a/sdk/network/azure-resourcemanager-network/pom.xml b/sdk/network/azure-resourcemanager-network/pom.xml index 3af6d25c2da4..87b1d32d0674 100644 --- a/sdk/network/azure-resourcemanager-network/pom.xml +++ b/sdk/network/azure-resourcemanager-network/pom.xml @@ -93,13 +93,13 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-keyvault</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/privatedns/azure-resourcemanager-privatedns/CHANGELOG.md b/sdk/privatedns/azure-resourcemanager-privatedns/CHANGELOG.md index 2e743822784b..7c0b9b4fe866 100644 --- a/sdk/privatedns/azure-resourcemanager-privatedns/CHANGELOG.md +++ b/sdk/privatedns/azure-resourcemanager-privatedns/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes diff --git a/sdk/redis/azure-resourcemanager-redis/CHANGELOG.md b/sdk/redis/azure-resourcemanager-redis/CHANGELOG.md index 856b81de17f3..f536203cffd7 100644 --- a/sdk/redis/azure-resourcemanager-redis/CHANGELOG.md +++ b/sdk/redis/azure-resourcemanager-redis/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes diff --git a/sdk/redis/azure-resourcemanager-redis/pom.xml b/sdk/redis/azure-resourcemanager-redis/pom.xml index caa624a01433..f9f1617136fd 100644 --- a/sdk/redis/azure-resourcemanager-redis/pom.xml +++ b/sdk/redis/azure-resourcemanager-redis/pom.xml @@ -84,7 +84,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml index f29f371479d7..b46c5d7e59c3 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml @@ -92,7 +92,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-compute</artifactId> - <version>2.55.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-compute;dependency} --> + <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-compute;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index 71ec0b11ccef..158429d8b1f0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -97,12 +97,12 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-compute</artifactId> - <version>2.55.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-compute;dependency} --> + <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-compute;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> @@ -112,27 +112,27 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-keyvault</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-sql</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-sql;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-sql;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-authorization</artifactId> - <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> + <version>2.53.6</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-appservice</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> @@ -142,22 +142,22 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerservice</artifactId> - <version>2.56.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerservice;dependency} --> + <version>2.56.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerservice;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-monitor</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-monitor;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-monitor;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerregistry</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerregistry;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerregistry;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-dns</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> @@ -167,42 +167,42 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerinstance</artifactId> - <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerinstance;dependency} --> + <version>2.53.6</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerinstance;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-privatedns</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-privatedns;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-privatedns;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-redis</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-redis;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-redis;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-eventhubs</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-eventhubs;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-eventhubs;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-trafficmanager</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-trafficmanager;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-trafficmanager;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-servicebus</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-servicebus;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-servicebus;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-cdn</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-cdn;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-cdn;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-search</artifactId> - <version>2.54.3</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-search;dependency} --> + <version>2.54.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-search;dependency} --> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> diff --git a/sdk/resourcemanagerhybrid/azure-resourcemanager-compute/pom.xml b/sdk/resourcemanagerhybrid/azure-resourcemanager-compute/pom.xml index 072308e731d3..7d8e5a76ec6d 100644 --- a/sdk/resourcemanagerhybrid/azure-resourcemanager-compute/pom.xml +++ b/sdk/resourcemanagerhybrid/azure-resourcemanager-compute/pom.xml @@ -83,7 +83,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> diff --git a/sdk/resourcemanagerhybrid/azure-resourcemanager-network/pom.xml b/sdk/resourcemanagerhybrid/azure-resourcemanager-network/pom.xml index f303268c68e6..4d3347a3d01c 100644 --- a/sdk/resourcemanagerhybrid/azure-resourcemanager-network/pom.xml +++ b/sdk/resourcemanagerhybrid/azure-resourcemanager-network/pom.xml @@ -99,7 +99,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/search/azure-resourcemanager-search/CHANGELOG.md b/sdk/search/azure-resourcemanager-search/CHANGELOG.md index 4c7468e3f210..15b1878fe004 100644 --- a/sdk/search/azure-resourcemanager-search/CHANGELOG.md +++ b/sdk/search/azure-resourcemanager-search/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.54.4 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.54.3 (2025-10-27) ### Other Changes diff --git a/sdk/servicebus/azure-resourcemanager-servicebus/CHANGELOG.md b/sdk/servicebus/azure-resourcemanager-servicebus/CHANGELOG.md index bbc15f84480f..fec0a343a329 100644 --- a/sdk/servicebus/azure-resourcemanager-servicebus/CHANGELOG.md +++ b/sdk/servicebus/azure-resourcemanager-servicebus/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes diff --git a/sdk/sql/azure-resourcemanager-sql/CHANGELOG.md b/sdk/sql/azure-resourcemanager-sql/CHANGELOG.md index b4aca42ddfa0..7ca79b27dae3 100644 --- a/sdk/sql/azure-resourcemanager-sql/CHANGELOG.md +++ b/sdk/sql/azure-resourcemanager-sql/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes diff --git a/sdk/sql/azure-resourcemanager-sql/pom.xml b/sdk/sql/azure-resourcemanager-sql/pom.xml index 0e7855e66a70..2cf41c4182b1 100644 --- a/sdk/sql/azure-resourcemanager-sql/pom.xml +++ b/sdk/sql/azure-resourcemanager-sql/pom.xml @@ -68,7 +68,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/pom.xml b/sdk/standbypool/azure-resourcemanager-standbypool/pom.xml index 3409bd09e4d4..fb86be2fb7af 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/pom.xml +++ b/sdk/standbypool/azure-resourcemanager-standbypool/pom.xml @@ -78,7 +78,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-compute</artifactId> - <version>2.55.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-compute;dependency} --> + <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-compute;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/storage/azure-resourcemanager-storage/CHANGELOG.md b/sdk/storage/azure-resourcemanager-storage/CHANGELOG.md index 58211dd2e70c..1023d448b8d0 100644 --- a/sdk/storage/azure-resourcemanager-storage/CHANGELOG.md +++ b/sdk/storage/azure-resourcemanager-storage/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.55.2 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.55.1 (2025-10-27) ### Other Changes diff --git a/sdk/storage/azure-resourcemanager-storage/pom.xml b/sdk/storage/azure-resourcemanager-storage/pom.xml index e3f7d52a4c08..c23bc4a485cb 100644 --- a/sdk/storage/azure-resourcemanager-storage/pom.xml +++ b/sdk/storage/azure-resourcemanager-storage/pom.xml @@ -67,12 +67,12 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-authorization</artifactId> - <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> + <version>2.53.6</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> </dependency> <dependency> <groupId>org.slf4j</groupId> diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/CHANGELOG.md b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/CHANGELOG.md index 067b1e9398ca..9d765eca6479 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/CHANGELOG.md +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes From 9326612dc96c1c7ac46f5da0da6d03733df71930 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 24 Nov 2025 19:52:57 -0800 Subject: [PATCH 044/186] Increment package versions for newrelicobservability releases (#47371) --- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 10 ++++++++++ .../pom.xml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index e8f279b856f9..e25fc154fec9 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -437,7 +437,7 @@ com.azure.resourcemanager:azure-resourcemanager-storagemover;1.4.0;1.5.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-graphservices;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-voiceservices;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-paloaltonetworks-ngfw;1.3.0;1.4.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-newrelicobservability;1.2.0;1.3.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-newrelicobservability;1.2.0;1.3.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-qumulo;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-selfhelp;1.0.0;1.1.0-beta.6 com.azure.resourcemanager:azure-resourcemanager-networkcloud;2.0.0;2.1.0-beta.2 diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md index e42f57197c73..6bb0d9f9e2ec 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.3.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.3.0-beta.1 (2025-11-24) - Azure Resource Manager NewRelicObservability client library for Java. This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. Package tag package-2025-05-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/pom.xml b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml index 8d4aebe84ea3..a2c45ae899da 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml @@ -14,7 +14,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-newrelicobservability</artifactId> - <version>1.3.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-newrelicobservability;current} --> + <version>1.3.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-newrelicobservability;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for NewRelicObservability Management</name> From 9972630646638a675f3d77105cb3bdfea75d5d75 Mon Sep 17 00:00:00 2001 From: Xiaofei Cao <92354331+XiaofeiCao@users.noreply.github.com> Date: Tue, 25 Nov 2025 15:04:31 +0800 Subject: [PATCH 045/186] mgmt, prepare release 2.57.0 (#47370) * prepare 2.57.0 * pom.xml * skip record for some CI failure tests * more recording skips * more recording skips * more recording skips --- eng/versioning/version_client.txt | 2 +- .../azure-resourcemanager-perf/pom.xml | 2 +- .../azure-resourcemanager-samples/pom.xml | 2 +- .../samples/ResourceSampleTests.java | 2 ++ .../samples/StorageSampleTests.java | 1 + .../azure-resourcemanager/CHANGELOG.md | 14 +++++++++++++- .../azure-resourcemanager/README.md | 2 +- sdk/resourcemanager/azure-resourcemanager/pom.xml | 2 +- .../resourcemanager/AzureResourceManagerTests.java | 4 ++++ .../azure/resourcemanager/GenericResourceTest.java | 2 ++ .../VirtualNetworkGatewayTests.java | 4 ++++ 11 files changed, 31 insertions(+), 6 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index e25fc154fec9..7bb7b386ada5 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -270,7 +270,7 @@ com.azure.spring:spring-cloud-azure-stream-binder-servicebus-core;6.0.0;6.1.0-be com.azure.spring:spring-cloud-azure-stream-binder-servicebus;6.0.0;6.1.0-beta.1 com.azure.spring:spring-cloud-azure-testcontainers;6.0.0;6.1.0-beta.1 com.azure:azure-spring-data-cosmos;6.0.0;6.1.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager;2.56.0;2.57.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager;2.56.0;2.57.0 com.azure.resourcemanager:azure-resourcemanager-appplatform;2.51.0;2.52.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-appservice;2.54.1;2.55.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-authorization;2.53.6;2.54.0-beta.1 diff --git a/sdk/resourcemanager/azure-resourcemanager-perf/pom.xml b/sdk/resourcemanager/azure-resourcemanager-perf/pom.xml index 109ee9e2e85a..24e8ca2049d7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-perf/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-perf/pom.xml @@ -25,7 +25,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.57.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml index 733e4488ca95..6d831a3dec6c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml @@ -54,7 +54,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.57.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ResourceSampleTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ResourceSampleTests.java index 28ba7af4d010..3f94fca0e899 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ResourceSampleTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ResourceSampleTests.java @@ -3,6 +3,7 @@ package com.azure.resourcemanager.samples; +import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.resources.samples.DeployUsingARMTemplate; import com.azure.resourcemanager.resources.samples.DeployUsingARMTemplateAsync; import com.azure.resourcemanager.resources.samples.DeployUsingARMTemplateWithDeploymentOperations; @@ -66,6 +67,7 @@ public void testDeployVirtualMachineUsingARMTemplate() throws IOException, Illeg } @Test + @DoNotRecord(skipInPlayback = true) public void testManageLocks() { Assertions.assertTrue(ManageLocks.runSample(azureResourceManager)); } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/StorageSampleTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/StorageSampleTests.java index 757499fb4a86..411e032726a9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/StorageSampleTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/StorageSampleTests.java @@ -18,6 +18,7 @@ public void testManageStorageAccount() { } @Test + @DoNotRecord(skipInPlayback = true) public void testManageStorageAccountAsync() { Assertions.assertTrue(ManageStorageAccountAsync.runSample(azureResourceManager)); } diff --git a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md index 9697c6016574..82b5bb8de86c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.57.0-beta.1 (Unreleased) +## 2.57.0 (2025-11-25) ### azure-resourcemanager-containerregistry @@ -42,6 +42,18 @@ - Updated `api-version` to `2025-10-15` +### azure-resourcemanager-resources + +#### Other Changes + +- Optimized `AzureServiceClient` to load library versions during class initialization. + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.56.0 (2025-10-31) ### azure-resourcemanager-containerservice diff --git a/sdk/resourcemanager/azure-resourcemanager/README.md b/sdk/resourcemanager/azure-resourcemanager/README.md index 8d17aefba62a..ee877ed2878c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/README.md +++ b/sdk/resourcemanager/azure-resourcemanager/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.55.0</version> + <version>2.57.0</version> </dependency> ``` [//]: # ({x-version-update-end}) diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index 158429d8b1f0..84790fe1e79c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -15,7 +15,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.57.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for Management</name> diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureResourceManagerTests.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureResourceManagerTests.java index 84c39165837e..3032cc9f69bc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureResourceManagerTests.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureResourceManagerTests.java @@ -539,6 +539,7 @@ public void testVMImages() throws ManagementException { * */ @Test + @DoNotRecord(skipInPlayback = true) public void testNetworkSecurityGroups() throws Exception { new TestNSG().runTest(azureResourceManager.networkSecurityGroups(), azureResourceManager.resourceGroups()); } @@ -680,6 +681,7 @@ public void testNetworks() throws Exception { * */ @Test + @DoNotRecord(skipInPlayback = true) public void testNetworkWithAccessFromServiceToSubnet() throws Exception { new TestNetwork().new WithAccessFromServiceToSubnet().runTest(azureResourceManager.networks(), azureResourceManager.resourceGroups()); @@ -690,6 +692,7 @@ public void testNetworkWithAccessFromServiceToSubnet() throws Exception { * */ @Test + @DoNotRecord(skipInPlayback = true) public void testNetworkPeerings() throws Exception { new TestNetwork().new WithPeering().runTest(azureResourceManager.networks(), azureResourceManager.resourceGroups()); @@ -973,6 +976,7 @@ public void testVirtualMachineSSh() throws Exception { * */ @Test + @DoNotRecord(skipInPlayback = true) public void testVirtualMachineSizes() throws Exception { new TestVirtualMachineSizes().runTest(azureResourceManager.virtualMachines(), azureResourceManager.resourceGroups()); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/GenericResourceTest.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/GenericResourceTest.java index 7b4504d6eabe..303c2e50b050 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/GenericResourceTest.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/GenericResourceTest.java @@ -11,6 +11,7 @@ import com.azure.core.http.policy.RetryPolicy; import com.azure.core.management.Region; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.appservice.fluent.models.SiteConfigResourceInner; import com.azure.resourcemanager.appservice.models.NetFrameworkVersion; import com.azure.resourcemanager.appservice.models.PricingTier; @@ -124,6 +125,7 @@ public void testResourceWithSpaceInName() { } @Test + @DoNotRecord(skipInPlayback = true) public void canGetDefaultApiVersionForChildResources() { // test privateDnsZones/virtualNetworkLinks which has the same child resource name as dnsForwardingRulesets/virtualNetworkLinks String vnetName = generateRandomResourceName("vnet", 15); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/VirtualNetworkGatewayTests.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/VirtualNetworkGatewayTests.java index 01d71c216a84..137768a94047 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/VirtualNetworkGatewayTests.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/VirtualNetworkGatewayTests.java @@ -9,6 +9,7 @@ import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.network.models.NetworkWatcher; import com.azure.resourcemanager.network.models.Troubleshooting; import com.azure.resourcemanager.network.models.VirtualNetworkGateway; @@ -127,6 +128,7 @@ public void testNetworkWatcherTroubleshooting() throws Exception { * @throws Exception */ @Test + @DoNotRecord(skipInPlayback = true) public void testVirtualNetworkGateways() throws Exception { new TestVirtualNetworkGateway().new Basic(azureResourceManager.virtualNetworkGateways().manager()) .runTest(azureResourceManager.virtualNetworkGateways(), azureResourceManager.resourceGroups()); @@ -139,6 +141,7 @@ public void testVirtualNetworkGateways() throws Exception { * @throws Exception */ @Test + @DoNotRecord(skipInPlayback = true) public void testVirtualNetworkGatewaySiteToSite() throws Exception { new TestVirtualNetworkGateway().new SiteToSite(azureResourceManager.virtualNetworkGateways().manager()) .runTest(azureResourceManager.virtualNetworkGateways(), azureResourceManager.resourceGroups()); @@ -151,6 +154,7 @@ public void testVirtualNetworkGatewaySiteToSite() throws Exception { * @throws Exception */ @Test + @DoNotRecord(skipInPlayback = true) public void testVirtualNetworkGatewayVNetToVNet() throws Exception { new TestVirtualNetworkGateway().new VNetToVNet(azureResourceManager.virtualNetworkGateways().manager()) .runTest(azureResourceManager.virtualNetworkGateways(), azureResourceManager.resourceGroups()); From e61f7b679cf53f569b18c49625c48c13755b1ff0 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Tue, 25 Nov 2025 10:21:50 +0800 Subject: [PATCH 046/186] update aad/aadb2c --- .../AadOAuth2ClientConfiguration.java | 47 +++++---------- ...dJwtBearerGrantRequestEntityConverter.java | 26 --------- ...BearerGrantRequestParametersConverter.java | 42 ++++++++++++++ ...ationCodeGrantRequestHeadersConverter.java | 28 +++++++++ ...nCodeGrantRequestParametersConverter.java} | 36 ++++-------- ...dWebApplicationHttpSecurityConfigurer.java | 19 +++--- ...zationCodeGrantRequestEntityConverter.java | 58 ------------------- .../aad/serde/jackson/SerializerUtils.java | 1 + .../AadB2cOAuth2ClientConfiguration.java | 15 +++-- ...zationCodeGrantRequestEntityConverter.java | 19 ------ ...ationCodeGrantRequestHeadersConverter.java | 29 ++++++++++ .../security/AadB2cOidcLoginConfigurer.java | 10 ++-- .../aad/RestTemplateTestUtil.java | 6 +- .../AadOAuth2ClientConfigurationTests.java | 16 ++--- ...earerGrantRequestEntityConverterTests.java | 14 ++--- ...nCodeGrantRequestEntityConverterTests.java | 35 +++++------ 16 files changed, 175 insertions(+), 226 deletions(-) delete mode 100644 sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestEntityConverter.java create mode 100644 sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestParametersConverter.java create mode 100644 sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestHeadersConverter.java rename sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/{AadOAuth2AuthorizationCodeGrantRequestEntityConverter.java => AadOAuth2AuthorizationCodeGrantRequestParametersConverter.java} (65%) delete mode 100644 sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AbstractOAuth2AuthorizationCodeGrantRequestEntityConverter.java delete mode 100644 sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOAuth2AuthorizationCodeGrantRequestEntityConverter.java create mode 100644 sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOAuth2AuthorizationCodeGrantRequestHeadersConverter.java diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfiguration.java index 6f99b6491cfa..269bd3102c1d 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfiguration.java @@ -3,16 +3,9 @@ package com.azure.spring.cloud.autoconfigure.implementation.aad.configuration; -import com.azure.spring.cloud.autoconfigure.implementation.aad.security.AadClientRegistrationRepository; +import com.azure.spring.cloud.autoconfigure.implementation.aad.security.*; import com.azure.spring.cloud.autoconfigure.implementation.aad.configuration.conditions.ClientCertificatePropertiesCondition; import com.azure.spring.cloud.autoconfigure.implementation.aad.configuration.conditions.ClientRegistrationCondition; -import com.azure.spring.cloud.autoconfigure.implementation.aad.security.AadJwtClientAuthenticationParametersConverter; -import com.azure.spring.cloud.autoconfigure.implementation.aad.security.AadOAuth2ClientAuthenticationJwkResolver; -import com.azure.spring.cloud.autoconfigure.implementation.aad.security.JacksonHttpSessionOAuth2AuthorizedClientRepository; -import com.azure.spring.cloud.autoconfigure.implementation.aad.security.OAuth2ClientAuthenticationJwkResolver; -import com.azure.spring.cloud.autoconfigure.implementation.aad.security.AadJwtBearerGrantRequestEntityConverter; -import com.azure.spring.cloud.autoconfigure.implementation.aad.security.AadAzureDelegatedOAuth2AuthorizedClientProvider; -import com.azure.spring.cloud.autoconfigure.implementation.aad.security.AadOidcIdTokenDecoderFactory; import com.azure.spring.cloud.autoconfigure.implementation.aad.configuration.properties.AadAuthenticationProperties; import com.azure.spring.cloud.autoconfigure.implementation.aad.security.properties.AadAuthorizationServerEndpoints; import com.azure.spring.cloud.autoconfigure.implementation.aad.configuration.properties.AadProfileProperties; @@ -27,16 +20,15 @@ import org.springframework.security.oauth2.client.OAuth2AuthorizedClientProvider; import org.springframework.security.oauth2.client.OAuth2AuthorizedClientProviderBuilder; import org.springframework.security.oauth2.client.RefreshTokenOAuth2AuthorizedClientProvider; -import org.springframework.security.oauth2.client.endpoint.DefaultClientCredentialsTokenResponseClient; -import org.springframework.security.oauth2.client.endpoint.DefaultJwtBearerTokenResponseClient; -import org.springframework.security.oauth2.client.endpoint.DefaultRefreshTokenTokenResponseClient; -import org.springframework.security.oauth2.client.endpoint.OAuth2ClientCredentialsGrantRequestEntityConverter; -import org.springframework.security.oauth2.client.endpoint.OAuth2RefreshTokenGrantRequestEntityConverter; +import org.springframework.security.oauth2.client.endpoint.RestClientClientCredentialsTokenResponseClient; +import org.springframework.security.oauth2.client.endpoint.RestClientJwtBearerTokenResponseClient; +import org.springframework.security.oauth2.client.endpoint.RestClientRefreshTokenTokenResponseClient; import org.springframework.security.oauth2.client.registration.ClientRegistration; import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository; import org.springframework.security.oauth2.client.web.DefaultOAuth2AuthorizedClientManager; import org.springframework.security.oauth2.client.web.OAuth2AuthorizedClientRepository; import org.springframework.security.oauth2.jwt.JwtDecoderFactory; +import org.springframework.web.client.RestClient; import static com.azure.spring.cloud.autoconfigure.implementation.aad.utils.AadRestTemplateCreator.createOAuth2AccessTokenResponseClientRestTemplate; import static com.azure.spring.cloud.autoconfigure.implementation.aad.utils.AadRestTemplateCreator.createRestTemplate; @@ -102,35 +94,30 @@ OAuth2AuthorizedClientManager authorizedClientManager( @Bean @ConditionalOnMissingBean - @SuppressWarnings({"deprecation", "removal"}) JwtBearerOAuth2AuthorizedClientProvider azureAdJwtBearerProvider( ObjectProvider<OAuth2ClientAuthenticationJwkResolver> resolvers) { JwtBearerOAuth2AuthorizedClientProvider provider = new JwtBearerOAuth2AuthorizedClientProvider(); OAuth2ClientAuthenticationJwkResolver resolver = resolvers.getIfUnique(); - DefaultJwtBearerTokenResponseClient client = new DefaultJwtBearerTokenResponseClient(); - client.setRestOperations(createOAuth2AccessTokenResponseClientRestTemplate(restTemplateBuilder)); - AadJwtBearerGrantRequestEntityConverter converter = new AadJwtBearerGrantRequestEntityConverter(); + RestClientJwtBearerTokenResponseClient client = new RestClientJwtBearerTokenResponseClient(); + client.setRestClient(RestClient.create(createOAuth2AccessTokenResponseClientRestTemplate(restTemplateBuilder))); + client.addParametersConverter(new AadJwtBearerGrantRequestParametersConverter()); if (resolver != null) { - converter.addParametersConverter(new AadJwtClientAuthenticationParametersConverter<>(resolver::resolve)); + client.addParametersConverter(new AadJwtClientAuthenticationParametersConverter<>(resolver::resolve)); } - client.setRequestEntityConverter(converter); provider.setAccessTokenResponseClient(client); return provider; } @Bean @ConditionalOnMissingBean - @SuppressWarnings({"deprecation", "removal"}) RefreshTokenOAuth2AuthorizedClientProvider azureRefreshTokenProvider( ObjectProvider<OAuth2ClientAuthenticationJwkResolver> resolvers) { RefreshTokenOAuth2AuthorizedClientProvider provider = new RefreshTokenOAuth2AuthorizedClientProvider(); OAuth2ClientAuthenticationJwkResolver resolver = resolvers.getIfUnique(); - DefaultRefreshTokenTokenResponseClient client = new DefaultRefreshTokenTokenResponseClient(); - client.setRestOperations(createOAuth2AccessTokenResponseClientRestTemplate(restTemplateBuilder)); + RestClientRefreshTokenTokenResponseClient client = new RestClientRefreshTokenTokenResponseClient(); + client.setRestClient(RestClient.create(createOAuth2AccessTokenResponseClientRestTemplate(restTemplateBuilder))); if (resolver != null) { - OAuth2RefreshTokenGrantRequestEntityConverter converter = new OAuth2RefreshTokenGrantRequestEntityConverter(); - converter.addParametersConverter(new AadJwtClientAuthenticationParametersConverter<>(resolver::resolve)); - client.setRequestEntityConverter(converter); + client.addParametersConverter(new AadJwtClientAuthenticationParametersConverter<>(resolver::resolve)); } provider.setAccessTokenResponseClient(client); return provider; @@ -145,17 +132,13 @@ JwtDecoderFactory<ClientRegistration> azureAdJwtDecoderFactory(AadAuthentication return new AadOidcIdTokenDecoderFactory(endpoints.getJwkSetEndpoint(), createRestTemplate(restTemplateBuilder)); } - @SuppressWarnings({"deprecation", "removal"}) private void clientCredentialsGrantBuilderAccessTokenResponseClientCustomizer( OAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder builder, OAuth2ClientAuthenticationJwkResolver resolver) { - DefaultClientCredentialsTokenResponseClient client = new DefaultClientCredentialsTokenResponseClient(); - client.setRestOperations(createOAuth2AccessTokenResponseClientRestTemplate(restTemplateBuilder)); + RestClientClientCredentialsTokenResponseClient client = new RestClientClientCredentialsTokenResponseClient(); + client.setRestClient(RestClient.create(createOAuth2AccessTokenResponseClientRestTemplate(restTemplateBuilder))); if (resolver != null) { - OAuth2ClientCredentialsGrantRequestEntityConverter converter = - new OAuth2ClientCredentialsGrantRequestEntityConverter(); - converter.addParametersConverter(new AadJwtClientAuthenticationParametersConverter<>(resolver::resolve)); - client.setRequestEntityConverter(converter); + client.addParametersConverter(new AadJwtClientAuthenticationParametersConverter<>(resolver::resolve)); } builder.accessTokenResponseClient(client); } diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestEntityConverter.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestEntityConverter.java deleted file mode 100644 index 378b13cfc165..000000000000 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestEntityConverter.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.spring.cloud.autoconfigure.implementation.aad.security; - -import org.springframework.security.oauth2.client.endpoint.JwtBearerGrantRequest; -import org.springframework.security.oauth2.client.endpoint.JwtBearerGrantRequestEntityConverter; -import org.springframework.util.MultiValueMap; - -/** - * This is a special JWT Bearer flow implementation for Microsoft identify platform. - * - * @since 4.3.0 - * @see <a href="https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow">OAuth 2.0 On-Behalf-Of</a> - */ -@SuppressWarnings({"deprecation", "removal"}) -public class AadJwtBearerGrantRequestEntityConverter extends JwtBearerGrantRequestEntityConverter { - - @Override - protected MultiValueMap<String, String> createParameters(JwtBearerGrantRequest jwtBearerGrantRequest) { - MultiValueMap<String, String> parameters = super.createParameters(jwtBearerGrantRequest); - parameters.add("requested_token_use", "on_behalf_of"); - return parameters; - } -} - diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestParametersConverter.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestParametersConverter.java new file mode 100644 index 000000000000..2efa9b2441fe --- /dev/null +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestParametersConverter.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.spring.cloud.autoconfigure.implementation.aad.security; + +import org.springframework.core.convert.converter.Converter; +import org.springframework.security.oauth2.client.endpoint.JwtBearerGrantRequest; +import org.springframework.security.oauth2.client.registration.ClientRegistration; +import org.springframework.security.oauth2.core.ClientAuthenticationMethod; +import org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames; +import org.springframework.util.CollectionUtils; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.util.StringUtils; + +/** + * This is a special JWT Bearer flow implementation for Microsoft identify platform. + * + * @since 4.3.0 + * @see <a href="https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow">OAuth 2.0 On-Behalf-Of</a> + */ +public class AadJwtBearerGrantRequestParametersConverter + implements Converter<JwtBearerGrantRequest, MultiValueMap<String,String>> { + + @Override + public MultiValueMap<String, String> convert(JwtBearerGrantRequest jwtBearerGrantRequest) { + ClientRegistration clientRegistration = jwtBearerGrantRequest.getClientRegistration(); + MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>(); + parameters.add(OAuth2ParameterNames.GRANT_TYPE, jwtBearerGrantRequest.getGrantType().getValue()); + parameters.add(OAuth2ParameterNames.ASSERTION, jwtBearerGrantRequest.getJwt().getTokenValue()); + if (!CollectionUtils.isEmpty(clientRegistration.getScopes())) { + parameters.add(OAuth2ParameterNames.SCOPE, + StringUtils.collectionToDelimitedString(clientRegistration.getScopes(), " ")); + } + if (ClientAuthenticationMethod.CLIENT_SECRET_POST.equals(clientRegistration.getClientAuthenticationMethod())) { + parameters.add(OAuth2ParameterNames.CLIENT_ID, clientRegistration.getClientId()); + parameters.add(OAuth2ParameterNames.CLIENT_SECRET, clientRegistration.getClientSecret()); + } + parameters.add("requested_token_use", "on_behalf_of"); + return parameters; + } +} diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestHeadersConverter.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestHeadersConverter.java new file mode 100644 index 000000000000..73a65f200226 --- /dev/null +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestHeadersConverter.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.spring.cloud.autoconfigure.implementation.aad.security; + +import com.azure.spring.cloud.core.implementation.util.AzureSpringIdentifier; +import org.springframework.core.convert.converter.Converter; +import org.springframework.http.HttpHeaders; +import org.springframework.security.oauth2.client.endpoint.OAuth2AuthorizationCodeGrantRequest; + +import java.util.Collections; +import java.util.UUID; + +/** + * When using "auth-code" in AAD, it's used to expand head parameters of the request. + */ +public class AadOAuth2AuthorizationCodeGrantRequestHeadersConverter + implements Converter<OAuth2AuthorizationCodeGrantRequest, HttpHeaders> { + + @Override + public HttpHeaders convert(OAuth2AuthorizationCodeGrantRequest request) { + HttpHeaders httpHeaders = new HttpHeaders(); + httpHeaders.put("x-client-SKU", Collections.singletonList(AzureSpringIdentifier.AZURE_SPRING_AAD)); + httpHeaders.put("x-client-VER", Collections.singletonList(AzureSpringIdentifier.VERSION)); + httpHeaders.put("client-request-id", Collections.singletonList(UUID.randomUUID().toString())); + return httpHeaders; + } +} diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestEntityConverter.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestParametersConverter.java similarity index 65% rename from sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestEntityConverter.java rename to sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestParametersConverter.java index 40e2469875e6..a723305e7feb 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestEntityConverter.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestParametersConverter.java @@ -3,7 +3,7 @@ package com.azure.spring.cloud.autoconfigure.implementation.aad.security; -import com.azure.spring.cloud.core.implementation.util.AzureSpringIdentifier; +import org.springframework.core.convert.converter.Converter; import org.springframework.security.oauth2.client.endpoint.AbstractOAuth2AuthorizationGrantRequest; import org.springframework.security.oauth2.client.endpoint.OAuth2AuthorizationCodeGrantRequest; import org.springframework.security.oauth2.client.registration.ClientRegistration; @@ -17,46 +17,32 @@ /** * Used to set "scope" parameter when use "auth-code" to get "access_token". - * - * @see AbstractOAuth2AuthorizationCodeGrantRequestEntityConverter */ -public class AadOAuth2AuthorizationCodeGrantRequestEntityConverter - extends AbstractOAuth2AuthorizationCodeGrantRequestEntityConverter { +public class AadOAuth2AuthorizationCodeGrantRequestParametersConverter + implements Converter<OAuth2AuthorizationCodeGrantRequest, MultiValueMap<String, String>> { private final Set<String> azureClientAccessTokenScopes; /** - * Creates a new instance of {@link AadOAuth2AuthorizationCodeGrantRequestEntityConverter}. + * Creates a new instance of {@link AadOAuth2AuthorizationCodeGrantRequestParametersConverter}. * * @param azureClientAccessTokenScopes the Azure client access token scopes */ - public AadOAuth2AuthorizationCodeGrantRequestEntityConverter(Set<String> azureClientAccessTokenScopes) { + public AadOAuth2AuthorizationCodeGrantRequestParametersConverter(Set<String> azureClientAccessTokenScopes) { this.azureClientAccessTokenScopes = azureClientAccessTokenScopes; } - /** - * Get application id. - * - * @return application id - */ @Override - protected String getApplicationId() { - return AzureSpringIdentifier.AZURE_SPRING_AAD; - } + public MultiValueMap<String, String> convert(OAuth2AuthorizationCodeGrantRequest request) { + MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>(); - /** - * Get http body. - * - * @return http body - */ - @Override - public MultiValueMap<String, String> getHttpBody(OAuth2AuthorizationCodeGrantRequest request) { - MultiValueMap<String, String> body = new LinkedMultiValueMap<>(); + // Add custom scope for Azure client String scopes = String.join(" ", isRequestForAzureClient(request) ? azureClientAccessTokenScopes : request.getClientRegistration().getScopes()); - body.add("scope", scopes); - return body; + parameters.add("scope", scopes); + + return parameters; } private boolean isRequestForAzureClient(OAuth2AuthorizationCodeGrantRequest request) { diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadWebApplicationHttpSecurityConfigurer.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadWebApplicationHttpSecurityConfigurer.java index 2451344fd53d..b52f0a359590 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadWebApplicationHttpSecurityConfigurer.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadWebApplicationHttpSecurityConfigurer.java @@ -12,9 +12,9 @@ import org.springframework.security.config.annotation.SecurityConfigurer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; -import org.springframework.security.oauth2.client.endpoint.DefaultAuthorizationCodeTokenResponseClient; import org.springframework.security.oauth2.client.endpoint.OAuth2AccessTokenResponseClient; import org.springframework.security.oauth2.client.endpoint.OAuth2AuthorizationCodeGrantRequest; +import org.springframework.security.oauth2.client.endpoint.RestClientAuthorizationCodeTokenResponseClient; import org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest; import org.springframework.security.oauth2.client.oidc.web.logout.OidcClientInitiatedLogoutSuccessHandler; import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository; @@ -24,6 +24,7 @@ import org.springframework.security.oauth2.core.oidc.user.OidcUser; import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; import org.springframework.util.StringUtils; +import org.springframework.web.client.RestClient; import static com.azure.spring.cloud.autoconfigure.implementation.aad.utils.AadRestTemplateCreator.createOAuth2AccessTokenResponseClientRestTemplate; @@ -91,7 +92,7 @@ public void init(HttpSecurity builder) { } @Override - public void configure(HttpSecurity builder) throws Exception { + public void configure(HttpSecurity builder) { if (conditionalAccessFilter != null) { builder.addFilterAfter(conditionalAccessFilter, OAuth2AuthorizationRequestRedirectFilter.class); } @@ -137,19 +138,17 @@ protected LogoutSuccessHandler oidcLogoutSuccessHandler() { * * @return the access token response client */ - @SuppressWarnings("removal") protected OAuth2AccessTokenResponseClient<OAuth2AuthorizationCodeGrantRequest> accessTokenResponseClient() { - DefaultAuthorizationCodeTokenResponseClient result = new DefaultAuthorizationCodeTokenResponseClient(); - result.setRestOperations(createOAuth2AccessTokenResponseClientRestTemplate(restTemplateBuilder)); + RestClientAuthorizationCodeTokenResponseClient result = new RestClientAuthorizationCodeTokenResponseClient(); + result.setRestClient(RestClient.create(createOAuth2AccessTokenResponseClientRestTemplate(restTemplateBuilder))); if (repo instanceof AadClientRegistrationRepository) { - AadOAuth2AuthorizationCodeGrantRequestEntityConverter converter = - new AadOAuth2AuthorizationCodeGrantRequestEntityConverter( - ((AadClientRegistrationRepository) repo).getAzureClientAccessTokenScopes()); + result.addHeadersConverter(new AadOAuth2AuthorizationCodeGrantRequestHeadersConverter()); + result.addParametersConverter(new AadOAuth2AuthorizationCodeGrantRequestParametersConverter( + ((AadClientRegistrationRepository) repo).getAzureClientAccessTokenScopes())); OAuth2ClientAuthenticationJwkResolver jwkResolver = jwkResolvers.getIfUnique(); if (jwkResolver != null) { - converter.addParametersConverter(new AadJwtClientAuthenticationParametersConverter<>(jwkResolver::resolve)); + result.addParametersConverter(new AadJwtClientAuthenticationParametersConverter<>(jwkResolver::resolve)); } - result.setRequestEntityConverter(converter); } return result; } diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AbstractOAuth2AuthorizationCodeGrantRequestEntityConverter.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AbstractOAuth2AuthorizationCodeGrantRequestEntityConverter.java deleted file mode 100644 index a75da05ec468..000000000000 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AbstractOAuth2AuthorizationCodeGrantRequestEntityConverter.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.spring.cloud.autoconfigure.implementation.aad.security; - -import com.azure.spring.cloud.core.implementation.util.AzureSpringIdentifier; -import org.springframework.http.HttpHeaders; -import org.springframework.security.oauth2.client.endpoint.OAuth2AuthorizationCodeGrantRequest; -import org.springframework.security.oauth2.client.endpoint.OAuth2AuthorizationCodeGrantRequestEntityConverter; -import org.springframework.util.MultiValueMap; -import org.springframework.util.MultiValueMapAdapter; - -import java.util.Collections; -import java.util.UUID; - -/** - * When using "auth-code" in AAD and AAD B2C, it's used to expand head and body parameters of the request. - */ -@SuppressWarnings({"deprecation", "removal"}) -public abstract class AbstractOAuth2AuthorizationCodeGrantRequestEntityConverter - extends OAuth2AuthorizationCodeGrantRequestEntityConverter { - - private static final MultiValueMap<String, String> EMPTY_MULTI_VALUE_MAP = - new MultiValueMapAdapter<>(Collections.emptyMap()); - - protected AbstractOAuth2AuthorizationCodeGrantRequestEntityConverter() { - addHeadersConverter(this::getHttpHeaders); - addParametersConverter(this::getHttpBody); - } - - /** - * Gets the application ID. - * - * @return the application ID - */ - protected abstract String getApplicationId(); - - /** - * Additional default headers information. - * @return HttpHeaders - */ - protected HttpHeaders getHttpHeaders(OAuth2AuthorizationCodeGrantRequest request) { - HttpHeaders httpHeaders = new HttpHeaders(); - httpHeaders.put("x-client-SKU", Collections.singletonList(getApplicationId())); - httpHeaders.put("x-client-VER", Collections.singletonList(AzureSpringIdentifier.VERSION)); - httpHeaders.put("client-request-id", Collections.singletonList(UUID.randomUUID().toString())); - return httpHeaders; - } - - /** - * Default body of OAuth2AuthorizationCodeGrantRequest. - * @param request OAuth2AuthorizationCodeGrantRequest - * @return MultiValueMap - */ - protected MultiValueMap<String, String> getHttpBody(OAuth2AuthorizationCodeGrantRequest request) { - return EMPTY_MULTI_VALUE_MAP; - } -} diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/serde/jackson/SerializerUtils.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/serde/jackson/SerializerUtils.java index cb6fb358a3b6..20f17730ac89 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/serde/jackson/SerializerUtils.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/serde/jackson/SerializerUtils.java @@ -13,6 +13,7 @@ import java.util.Collections; import java.util.Map; +@SuppressWarnings("removal") public final class SerializerUtils { private static final ObjectMapper OBJECT_MAPPER; private static final TypeReference<Map<String, OAuth2AuthorizedClient>> TYPE_REFERENCE = new TypeReference<>() { }; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cOAuth2ClientConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cOAuth2ClientConfiguration.java index cd54f3b9ddcd..7a1f933034f7 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cOAuth2ClientConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cOAuth2ClientConfiguration.java @@ -25,8 +25,8 @@ import org.springframework.security.oauth2.client.OAuth2AuthorizedClientProviderBuilder; import org.springframework.security.oauth2.client.OAuth2AuthorizedClientService; import org.springframework.security.oauth2.client.RefreshTokenOAuth2AuthorizedClientProvider; -import org.springframework.security.oauth2.client.endpoint.DefaultClientCredentialsTokenResponseClient; -import org.springframework.security.oauth2.client.endpoint.DefaultRefreshTokenTokenResponseClient; +import org.springframework.security.oauth2.client.endpoint.RestClientClientCredentialsTokenResponseClient; +import org.springframework.security.oauth2.client.endpoint.RestClientRefreshTokenTokenResponseClient; import org.springframework.security.oauth2.client.registration.ClientRegistration; import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository; import org.springframework.security.oauth2.client.web.AuthenticatedPrincipalOAuth2AuthorizedClientRepository; @@ -35,6 +35,7 @@ import org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter; import org.springframework.security.oauth2.core.AuthorizationGrantType; import org.springframework.security.oauth2.core.ClientAuthenticationMethod; +import org.springframework.web.client.RestClient; import java.util.List; import java.util.Map; @@ -152,20 +153,18 @@ OAuth2AuthorizedClientManager authorizedClientManager(ClientRegistrationReposito return manager; } - @SuppressWarnings({"deprecation", "removal"}) private RefreshTokenOAuth2AuthorizedClientProvider azureRefreshTokenProvider() { RefreshTokenOAuth2AuthorizedClientProvider provider = new RefreshTokenOAuth2AuthorizedClientProvider(); - DefaultRefreshTokenTokenResponseClient responseClient = new DefaultRefreshTokenTokenResponseClient(); - responseClient.setRestOperations(createOAuth2AccessTokenResponseClientRestTemplate(restTemplateBuilder)); + RestClientRefreshTokenTokenResponseClient responseClient = new RestClientRefreshTokenTokenResponseClient(); + responseClient.setRestClient(RestClient.create(createOAuth2AccessTokenResponseClientRestTemplate(restTemplateBuilder))); provider.setAccessTokenResponseClient(responseClient); return provider; } - @SuppressWarnings({"deprecation", "removal"}) private ClientCredentialsOAuth2AuthorizedClientProvider azureClientCredentialProvider() { ClientCredentialsOAuth2AuthorizedClientProvider provider = new ClientCredentialsOAuth2AuthorizedClientProvider(); - DefaultClientCredentialsTokenResponseClient responseClient = new DefaultClientCredentialsTokenResponseClient(); - responseClient.setRestOperations(createOAuth2AccessTokenResponseClientRestTemplate(restTemplateBuilder)); + RestClientClientCredentialsTokenResponseClient responseClient = new RestClientClientCredentialsTokenResponseClient(); + responseClient.setRestClient(RestClient.create(createOAuth2AccessTokenResponseClientRestTemplate(restTemplateBuilder))); provider.setAccessTokenResponseClient(responseClient); return provider; } diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOAuth2AuthorizationCodeGrantRequestEntityConverter.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOAuth2AuthorizationCodeGrantRequestEntityConverter.java deleted file mode 100644 index 5588f24a5af4..000000000000 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOAuth2AuthorizationCodeGrantRequestEntityConverter.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.spring.cloud.autoconfigure.implementation.aadb2c.security; - -import com.azure.spring.cloud.autoconfigure.implementation.aad.security.AbstractOAuth2AuthorizationCodeGrantRequestEntityConverter; -import com.azure.spring.cloud.core.implementation.util.AzureSpringIdentifier; - -/** - * Used to set azure service header tag when use "auth-code" to get "access_token". - */ -public class AadB2cOAuth2AuthorizationCodeGrantRequestEntityConverter - extends AbstractOAuth2AuthorizationCodeGrantRequestEntityConverter { - - @Override - protected String getApplicationId() { - return AzureSpringIdentifier.AZURE_SPRING_B2C; - } -} diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOAuth2AuthorizationCodeGrantRequestHeadersConverter.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOAuth2AuthorizationCodeGrantRequestHeadersConverter.java new file mode 100644 index 000000000000..bc508366804f --- /dev/null +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOAuth2AuthorizationCodeGrantRequestHeadersConverter.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.spring.cloud.autoconfigure.implementation.aadb2c.security; + +import com.azure.spring.cloud.core.implementation.util.AzureSpringIdentifier; +import org.springframework.core.convert.converter.Converter; +import org.springframework.http.HttpHeaders; +import org.springframework.security.oauth2.client.endpoint.OAuth2AuthorizationCodeGrantRequest; + +import java.util.Collections; +import java.util.UUID; + +/** + * Converter that adds Azure AD B2C specific HTTP headers to authorization code grant requests. + * These headers are used for telemetry and tracking purposes by Azure AD B2C. + */ +public class AadB2cOAuth2AuthorizationCodeGrantRequestHeadersConverter + implements Converter<OAuth2AuthorizationCodeGrantRequest, HttpHeaders> { + + @Override + public HttpHeaders convert(OAuth2AuthorizationCodeGrantRequest request) { + HttpHeaders headers = new HttpHeaders(); + headers.put("x-client-SKU", Collections.singletonList(AzureSpringIdentifier.AZURE_SPRING_B2C)); + headers.put("x-client-VER", Collections.singletonList(AzureSpringIdentifier.VERSION)); + headers.put("client-request-id", Collections.singletonList(UUID.randomUUID().toString())); + return headers; + } +} diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOidcLoginConfigurer.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOidcLoginConfigurer.java index 398e415ccc4b..4af30a83ec74 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOidcLoginConfigurer.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/security/AadB2cOidcLoginConfigurer.java @@ -5,11 +5,12 @@ import org.springframework.boot.restclient.RestTemplateBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; -import org.springframework.security.oauth2.client.endpoint.DefaultAuthorizationCodeTokenResponseClient; import org.springframework.security.oauth2.client.endpoint.OAuth2AccessTokenResponseClient; import org.springframework.security.oauth2.client.endpoint.OAuth2AuthorizationCodeGrantRequest; +import org.springframework.security.oauth2.client.endpoint.RestClientAuthorizationCodeTokenResponseClient; import org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestResolver; import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; +import org.springframework.web.client.RestClient; import static com.azure.spring.cloud.autoconfigure.implementation.aad.utils.AadRestTemplateCreator.createOAuth2AccessTokenResponseClientRestTemplate; @@ -91,14 +92,13 @@ public void init(HttpSecurity http) { * * @return the access token response client */ - @SuppressWarnings({"deprecation", "removal"}) protected OAuth2AccessTokenResponseClient<OAuth2AuthorizationCodeGrantRequest> accessTokenResponseClient() { if (accessTokenResponseClient != null) { return accessTokenResponseClient; } - DefaultAuthorizationCodeTokenResponseClient client = new DefaultAuthorizationCodeTokenResponseClient(); - client.setRequestEntityConverter(new AadB2cOAuth2AuthorizationCodeGrantRequestEntityConverter()); - client.setRestOperations(createOAuth2AccessTokenResponseClientRestTemplate(restTemplateBuilder)); + RestClientAuthorizationCodeTokenResponseClient client = new RestClientAuthorizationCodeTokenResponseClient(); + client.addHeadersConverter(new AadB2cOAuth2AuthorizationCodeGrantRequestHeadersConverter()); + client.setRestClient(RestClient.create(createOAuth2AccessTokenResponseClientRestTemplate(restTemplateBuilder))); return client; } } diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/RestTemplateTestUtil.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/RestTemplateTestUtil.java index 8793efcf690a..cf7aa3ea207c 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/RestTemplateTestUtil.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/RestTemplateTestUtil.java @@ -26,6 +26,7 @@ import org.springframework.security.oauth2.jwt.JwtDecoderFactory; import org.springframework.security.oauth2.jwt.NimbusJwtDecoder; import org.springframework.security.web.FilterChainProxy; +import org.springframework.web.client.RestClient; import org.springframework.web.client.RestTemplate; import java.util.List; @@ -98,8 +99,9 @@ private static List<OAuth2AuthorizedClientProvider> getAllOAuth2AuthorizedClient } private static void assertRestTemplateWellConfiguredInOAuth2AccessTokenResponseClient(OAuth2AccessTokenResponseClient<?> client) { - RestTemplate restTemplate = (RestTemplate) getField(client.getClass(), "restOperations", client); - assertEquals(FACTORY, restTemplate.getRequestFactory()); + RestClient restClient = (RestClient) getField(client.getClass(), "restClient", client); + Object clientRequestFactory = getField(restClient.getClass(), "clientRequestFactory", restClient); + assertEquals(FACTORY, clientRequestFactory); } @SuppressWarnings({"unchecked", "deprecation"}) diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfigurationTests.java index cc2f752f4d40..a8daec063143 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfigurationTests.java @@ -6,7 +6,6 @@ import com.azure.spring.cloud.autoconfigure.implementation.aad.jwk.TestJwks; import com.azure.spring.cloud.autoconfigure.implementation.aad.configuration.properties.AadAuthenticationProperties; import com.azure.spring.cloud.autoconfigure.implementation.aad.security.AadClientRegistrationRepository; -import com.azure.spring.cloud.autoconfigure.implementation.aad.security.AadJwtBearerGrantRequestEntityConverter; import com.azure.spring.cloud.autoconfigure.implementation.aad.security.OAuth2ClientAuthenticationJwkResolver; import com.nimbusds.jose.jwk.JWK; import com.nimbusds.jose.jwk.RSAKey; @@ -18,10 +17,9 @@ import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.core.convert.converter.Converter; import org.springframework.security.oauth2.client.JwtBearerOAuth2AuthorizedClientProvider; -import org.springframework.security.oauth2.client.endpoint.DefaultJwtBearerTokenResponseClient; import org.springframework.security.oauth2.client.endpoint.JwtBearerGrantRequest; -import org.springframework.security.oauth2.client.endpoint.JwtBearerGrantRequestEntityConverter; import org.springframework.security.oauth2.client.endpoint.OAuth2AccessTokenResponseClient; +import org.springframework.security.oauth2.client.endpoint.RestClientJwtBearerTokenResponseClient; import org.springframework.security.oauth2.client.registration.ClientRegistration; import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository; import org.springframework.security.oauth2.client.web.OAuth2AuthorizedClientRepository; @@ -253,19 +251,15 @@ void restTemplateWellConfiguredWhenUsingPrivateKeyJwtMethod() { }); } - @SuppressWarnings({"deprecation", "removal", "unchecked"}) + @SuppressWarnings({"unchecked"}) private MultiValueMap<String, String> convertParameters(JwtBearerOAuth2AuthorizedClientProvider jwtBearerProvider, ClientRegistrationRepository clientRepository) { OAuth2AccessTokenResponseClient<JwtBearerGrantRequest> client = - (OAuth2AccessTokenResponseClient<JwtBearerGrantRequest>) ReflectionTestUtils.getField(jwtBearerProvider, "accessTokenResponseClient"); - assertThat(client.getClass().getSimpleName()).isEqualTo(DefaultJwtBearerTokenResponseClient.class.getSimpleName()); - - JwtBearerGrantRequestEntityConverter requestEntityConverter = - (JwtBearerGrantRequestEntityConverter) ReflectionTestUtils.getField(client, "requestEntityConverter"); - assertThat(requestEntityConverter.getClass().getSimpleName()).isEqualTo(AadJwtBearerGrantRequestEntityConverter.class.getSimpleName()); + (OAuth2AccessTokenResponseClient<JwtBearerGrantRequest>) ReflectionTestUtils.getField(jwtBearerProvider, "accessTokenResponseClient"); + assertThat(client.getClass().getSimpleName()).isEqualTo(RestClientJwtBearerTokenResponseClient.class.getSimpleName()); Converter<JwtBearerGrantRequest, MultiValueMap<String, String>> parametersConverter = - (Converter<JwtBearerGrantRequest, MultiValueMap<String, String>>) ReflectionTestUtils.getField(requestEntityConverter, "parametersConverter"); + (Converter<JwtBearerGrantRequest, MultiValueMap<String, String>>) ReflectionTestUtils.getField(client, "parametersConverter"); JwtBearerGrantRequest request = new JwtBearerGrantRequest(clientRepository.findByRegistrationId("graph"), mock(Jwt.class)); return parametersConverter.convert(request); } diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestEntityConverterTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestEntityConverterTests.java index ce771c846038..bdeb4fe16707 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestEntityConverterTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestEntityConverterTests.java @@ -3,8 +3,8 @@ package com.azure.spring.cloud.autoconfigure.implementation.aad.security; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.springframework.http.RequestEntity; import org.springframework.security.oauth2.client.endpoint.JwtBearerGrantRequest; import org.springframework.security.oauth2.client.registration.ClientRegistration; import org.springframework.security.oauth2.core.AuthorizationGrantType; @@ -17,9 +17,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -class AadJwtBearerGrantRequestEntityConverterTests { +class AadJwtBearerGrantRequestParametersConverterTests { - @SuppressWarnings("unchecked") @Test void requestedTokenUseParameter() { ClientRegistration clientRegistration = ClientRegistration.withRegistrationId("test") @@ -35,11 +34,10 @@ void requestedTokenUseParameter() { .expiresAt(Instant.ofEpochMilli(Instant.now().plusSeconds(60).toEpochMilli())) .build(); JwtBearerGrantRequest request = new JwtBearerGrantRequest(clientRegistration, jwt); - AadJwtBearerGrantRequestEntityConverter converter = - new AadJwtBearerGrantRequestEntityConverter(); - RequestEntity<MultiValueMap<String, String>> entity = - (RequestEntity<MultiValueMap<String, String>>) converter.convert(request); - MultiValueMap<String, String> parameters = entity.getBody(); + AadJwtBearerGrantRequestParametersConverter converter = + new AadJwtBearerGrantRequestParametersConverter(); + MultiValueMap<String, String> parameters = converter.convert(request); + Assertions.assertNotNull(parameters); assertTrue(parameters.containsKey("requested_token_use")); assertEquals("on_behalf_of", parameters.getFirst("requested_token_use")); } diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestEntityConverterTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestEntityConverterTests.java index c9d0610e031f..4b5573ed99a1 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestEntityConverterTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadOAuth2AuthorizationCodeGrantRequestEntityConverterTests.java @@ -7,9 +7,7 @@ import com.azure.spring.cloud.core.implementation.util.AzureSpringIdentifier; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; -import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; -import org.springframework.http.RequestEntity; import org.springframework.security.oauth2.client.endpoint.OAuth2AuthorizationCodeGrantRequest; import org.springframework.security.oauth2.client.registration.ClientRegistration; import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository; @@ -19,13 +17,12 @@ import org.springframework.util.MultiValueMap; import java.util.Collections; -import java.util.Optional; import static com.azure.spring.cloud.autoconfigure.implementation.aad.security.AadClientRegistrationRepository.AZURE_CLIENT_REGISTRATION_ID; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -class AadOAuth2AuthorizationCodeGrantRequestEntityConverterTests { +class AadOAuth2AuthorizationCodeGrantRequestConvertersTests { private WebApplicationContextRunner getContextRunner() { return WebApplicationContextRunnerUtils @@ -65,14 +62,13 @@ void onlyAddScopeOnceEvenConvertMethodExecutedMultipleTimes() { getContextRunner().run(context -> { AadClientRegistrationRepository repository = (AadClientRegistrationRepository) context.getBean(ClientRegistrationRepository.class); - AadOAuth2AuthorizationCodeGrantRequestEntityConverter converter = - new AadOAuth2AuthorizationCodeGrantRequestEntityConverter(repository.getAzureClientAccessTokenScopes()); + AadOAuth2AuthorizationCodeGrantRequestParametersConverter converter = + new AadOAuth2AuthorizationCodeGrantRequestParametersConverter(repository.getAzureClientAccessTokenScopes()); ClientRegistration azure = repository.findByRegistrationId(AZURE_CLIENT_REGISTRATION_ID); OAuth2AuthorizationCodeGrantRequest request = createCodeGrantRequest(azure); // Convert method execute 2 times converter.convert(request); - RequestEntity<?> entity = converter.convert(request); - MultiValueMap<String, String> map = WebApplicationContextRunnerUtils.toMultiValueMap(entity); + MultiValueMap<String, String> map = converter.convert(request); assertEquals(1, map.get("scope").size()); }); } @@ -83,7 +79,7 @@ void addHeadersForAzureClient() { AadClientRegistrationRepository repository = (AadClientRegistrationRepository) context.getBean(ClientRegistrationRepository.class); ClientRegistration azure = repository.findByRegistrationId(AZURE_CLIENT_REGISTRATION_ID); - HttpHeaders httpHeaders = convertedHeaderOf(repository, createCodeGrantRequest(azure)); + HttpHeaders httpHeaders = convertedHeaderOf(createCodeGrantRequest(azure)); testHttpHeaders(httpHeaders); }); } @@ -94,19 +90,15 @@ void addHeadersForAuthorizationCodeClient() { AadClientRegistrationRepository repository = (AadClientRegistrationRepository) context.getBean(ClientRegistrationRepository.class); ClientRegistration arm = repository.findByRegistrationId("arm"); - HttpHeaders httpHeaders = convertedHeaderOf(repository, createCodeGrantRequest(arm)); + HttpHeaders httpHeaders = convertedHeaderOf(createCodeGrantRequest(arm)); testHttpHeaders(httpHeaders); }); } - private HttpHeaders convertedHeaderOf(AadClientRegistrationRepository repository, - OAuth2AuthorizationCodeGrantRequest request) { - AadOAuth2AuthorizationCodeGrantRequestEntityConverter converter = - new AadOAuth2AuthorizationCodeGrantRequestEntityConverter(repository.getAzureClientAccessTokenScopes()); - RequestEntity<?> entity = converter.convert(request); - return Optional.ofNullable(entity) - .map(HttpEntity::getHeaders) - .orElse(null); + private HttpHeaders convertedHeaderOf(OAuth2AuthorizationCodeGrantRequest request) { + AadOAuth2AuthorizationCodeGrantRequestHeadersConverter converter = + new AadOAuth2AuthorizationCodeGrantRequestHeadersConverter(); + return converter.convert(request); } private void testHttpHeaders(HttpHeaders headers) { @@ -119,10 +111,9 @@ private void testHttpHeaders(HttpHeaders headers) { private MultiValueMap<String, String> convertedBodyOf(AadClientRegistrationRepository repository, OAuth2AuthorizationCodeGrantRequest request) { - AadOAuth2AuthorizationCodeGrantRequestEntityConverter converter = - new AadOAuth2AuthorizationCodeGrantRequestEntityConverter(repository.getAzureClientAccessTokenScopes()); - RequestEntity<?> entity = converter.convert(request); - return WebApplicationContextRunnerUtils.toMultiValueMap(entity); + AadOAuth2AuthorizationCodeGrantRequestParametersConverter converter = + new AadOAuth2AuthorizationCodeGrantRequestParametersConverter(repository.getAzureClientAccessTokenScopes()); + return converter.convert(request); } private OAuth2AuthorizationCodeGrantRequest createCodeGrantRequest(ClientRegistration client) { From 793d43a2f98be817da68e3096ab5bfd49a0bac81 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 25 Nov 2025 04:55:25 -0800 Subject: [PATCH 047/186] Increment package versions for resourcemanager releases (#47377) --- eng/versioning/version_client.txt | 2 +- sdk/batch/azure-compute-batch/pom.xml | 2 +- sdk/boms/spring-cloud-azure-dependencies/pom.xml | 2 +- sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml | 2 +- sdk/resourcemanager/azure-resourcemanager-perf/pom.xml | 2 +- .../azure-resourcemanager-samples/pom.xml | 2 +- sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md | 10 ++++++++++ sdk/resourcemanager/azure-resourcemanager/pom.xml | 2 +- .../azure-resourcemanager-servicelinker/pom.xml | 2 +- sdk/spring/spring-cloud-azure-resourcemanager/pom.xml | 2 +- 10 files changed, 19 insertions(+), 9 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 7bb7b386ada5..6ef300c042e5 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -270,7 +270,7 @@ com.azure.spring:spring-cloud-azure-stream-binder-servicebus-core;6.0.0;6.1.0-be com.azure.spring:spring-cloud-azure-stream-binder-servicebus;6.0.0;6.1.0-beta.1 com.azure.spring:spring-cloud-azure-testcontainers;6.0.0;6.1.0-beta.1 com.azure:azure-spring-data-cosmos;6.0.0;6.1.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager;2.56.0;2.57.0 +com.azure.resourcemanager:azure-resourcemanager;2.57.0;2.58.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-appplatform;2.51.0;2.52.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-appservice;2.54.1;2.55.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-authorization;2.53.6;2.54.0-beta.1 diff --git a/sdk/batch/azure-compute-batch/pom.xml b/sdk/batch/azure-compute-batch/pom.xml index 05c9ef370b6f..12d70cd6181a 100644 --- a/sdk/batch/azure-compute-batch/pom.xml +++ b/sdk/batch/azure-compute-batch/pom.xml @@ -85,7 +85,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.56.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/boms/spring-cloud-azure-dependencies/pom.xml b/sdk/boms/spring-cloud-azure-dependencies/pom.xml index ac25fa3c306a..431e67e86049 100644 --- a/sdk/boms/spring-cloud-azure-dependencies/pom.xml +++ b/sdk/boms/spring-cloud-azure-dependencies/pom.xml @@ -60,7 +60,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.56.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> </dependency> <!-- Spring Cloud Azure --> diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml b/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml index 3587ee0c7903..349e0fb60fb8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml @@ -73,7 +73,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.56.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/resourcemanager/azure-resourcemanager-perf/pom.xml b/sdk/resourcemanager/azure-resourcemanager-perf/pom.xml index 24e8ca2049d7..550b785fe022 100644 --- a/sdk/resourcemanager/azure-resourcemanager-perf/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-perf/pom.xml @@ -25,7 +25,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> + <version>2.58.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml index 6d831a3dec6c..60dd74c01d58 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml @@ -54,7 +54,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> + <version>2.58.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> diff --git a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md index 82b5bb8de86c..b1e987a8ac56 100644 --- a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 2.58.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 2.57.0 (2025-11-25) ### azure-resourcemanager-containerregistry diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index 84790fe1e79c..8bb051c44566 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -15,7 +15,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> + <version>2.58.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for Management</name> diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/pom.xml b/sdk/servicelinker/azure-resourcemanager-servicelinker/pom.xml index 8139f2eae215..5c911bac3db3 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/pom.xml +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/pom.xml @@ -73,7 +73,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.56.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> <scope>test</scope> </dependency> </dependencies> diff --git a/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml b/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml index dd69cfd3ad9d..273abe77f6ea 100644 --- a/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml +++ b/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml @@ -47,7 +47,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.56.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> </dependency> <dependency> From 5d1c49b93a3d948247edd943166c76be0c47b666 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty <abhmohanty@microsoft.com> Date: Tue, 25 Nov 2025 13:15:37 -0500 Subject: [PATCH 048/186] Bail out from barriers when barriers hit 410 `Lease Not Found`. (#47232) * Enable 410-1022 on Head requests to bail out. * Bail fast on barrier on reads. * Enhance tests to ensure primary is contacted and barrier request count doesn't exceed a certain threshold. * Enhance tests to ensure barrier post the QuorumSelected phase is invoked. * Code comments * Adding a way to run tests against a multi-region Strong account. * Adding a way to run tests against a multi-region Strong account. * Validate sub-status code too. * Code cleanup. * Add CHANGELOG.md entry. * Modify barrier hit criteria. * Modify barrier hit criteria. * Add tests for barrier bail out in Bounded Staleness consistency. * Add tests for barrier bail out in Bounded Staleness consistency. * Refactoring * Addressing code comments. * Verify write barrier criteria. * Verify barrier bail out criteria. * Verify barrier bail out criteria. * Managing merge. * Fix compilation errors. * Fix tests. * Fix tests. * Addressing comments. * Addressing comments. * Addressing review comments. * Refactoring. * Addressing review comments. * Addressing review comments. * Addressing review comments. --- sdk/cosmos/azure-cosmos-tests/pom.xml | 15 +- .../cosmos/BailOutFromBarrierE2ETests.java | 543 ++++++++++++++++++ ...InjectionServerErrorRuleOnDirectTests.java | 6 +- .../directconnectivity/ReflectionUtils.java | 4 + .../StoreResponseInterceptorUtils.java | 149 +++++ .../com/azure/cosmos/rx/TestSuiteBase.java | 4 +- ...ier-testng.xml => multi-region-strong.xml} | 6 +- sdk/cosmos/azure-cosmos/CHANGELOG.md | 1 + .../directconnectivity/ConsistencyWriter.java | 139 ++++- .../directconnectivity/QuorumReader.java | 194 ++++++- .../directconnectivity/StoreReader.java | 52 +- .../directconnectivity/StoreResponse.java | 2 +- sdk/cosmos/live-platform-matrix.json | 10 +- 13 files changed, 1067 insertions(+), 58 deletions(-) create mode 100644 sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/BailOutFromBarrierE2ETests.java create mode 100644 sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/StoreResponseInterceptorUtils.java rename sdk/cosmos/azure-cosmos-tests/src/test/resources/{fault-injection-barrier-testng.xml => multi-region-strong.xml} (90%) diff --git a/sdk/cosmos/azure-cosmos-tests/pom.xml b/sdk/cosmos/azure-cosmos-tests/pom.xml index fc7765209c4d..3131458840f7 100644 --- a/sdk/cosmos/azure-cosmos-tests/pom.xml +++ b/sdk/cosmos/azure-cosmos-tests/pom.xml @@ -906,10 +906,10 @@ Licensed under the MIT License. </build> </profile> <profile> - <!-- integration tests, requires Cosmos DB endpoint --> - <id>fault-injection-barrier</id> + <!-- tests which target a multi-region strong Cosmos DB account --> + <id>multi-region-strong</id> <properties> - <test.groups>fault-injection-barrier</test.groups> + <test.groups>multi-region-strong</test.groups> </properties> <build> <plugins> @@ -919,9 +919,14 @@ Licensed under the MIT License. <version>3.5.3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} --> <configuration> <suiteXmlFiles> - <suiteXmlFile>src/test/resources/fault-injection-barrier-testng.xml</suiteXmlFile> + <suiteXmlFile>src/test/resources/multi-region-strong.xml</suiteXmlFile> </suiteXmlFiles> - + <systemPropertyVariables> + <COSMOS.CLIENT_LEAK_DETECTION_ENABLED>true</COSMOS.CLIENT_LEAK_DETECTION_ENABLED> + <io.netty.leakDetection.samplingInterval>1</io.netty.leakDetection.samplingInterval> + <io.netty.leakDetection.targetRecords>256</io.netty.leakDetection.targetRecords> + <io.netty.leakDetection.level>paranoid</io.netty.leakDetection.level> + </systemPropertyVariables> </configuration> </plugin> </plugins> diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/BailOutFromBarrierE2ETests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/BailOutFromBarrierE2ETests.java new file mode 100644 index 000000000000..92ced6c37405 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/BailOutFromBarrierE2ETests.java @@ -0,0 +1,543 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos; + +import com.azure.cosmos.implementation.AsyncDocumentClient; +import com.azure.cosmos.implementation.ClientSideRequestStatistics; +import com.azure.cosmos.implementation.DatabaseAccount; +import com.azure.cosmos.implementation.DatabaseAccountLocation; +import com.azure.cosmos.implementation.GlobalEndpointManager; +import com.azure.cosmos.implementation.HttpConstants; +import com.azure.cosmos.implementation.ImplementationBridgeHelpers; +import com.azure.cosmos.implementation.OperationType; +import com.azure.cosmos.implementation.Strings; +import com.azure.cosmos.implementation.directconnectivity.ConsistencyReader; +import com.azure.cosmos.implementation.directconnectivity.ConsistencyWriter; +import com.azure.cosmos.implementation.directconnectivity.StoreResponseDiagnostics; +import com.azure.cosmos.implementation.directconnectivity.StoreResponseInterceptorUtils; +import com.azure.cosmos.implementation.directconnectivity.StoreResultDiagnostics; +import com.azure.cosmos.models.CosmosItemResponse; +import com.azure.cosmos.models.PartitionKey; +import com.azure.cosmos.rx.TestSuiteBase; +import com.azure.cosmos.test.implementation.interceptor.CosmosInterceptorHelper; +import org.testng.SkipException; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Factory; +import org.testng.annotations.Test; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.fail; + +public class BailOutFromBarrierE2ETests extends TestSuiteBase { + + private static final ImplementationBridgeHelpers.CosmosAsyncClientHelper.CosmosAsyncClientAccessor cosmosAsyncClientAccessor + = ImplementationBridgeHelpers.CosmosAsyncClientHelper.getCosmosAsyncClientAccessor(); + + private volatile CosmosAsyncDatabase database; + private volatile CosmosAsyncContainer container; + private List<String> preferredRegions; + private Map<String, String> regionNameToEndpoint; + + @BeforeClass(groups = {"multi-region-strong"}) + public void beforeClass() { + + try (CosmosAsyncClient dummy = getClientBuilder().buildAsyncClient()) { + AsyncDocumentClient asyncDocumentClient = BridgeInternal.getContextClient(dummy); + GlobalEndpointManager globalEndpointManager = asyncDocumentClient.getGlobalEndpointManager(); + + DatabaseAccount databaseAccount = globalEndpointManager.getLatestDatabaseAccount(); + + AccountLevelLocationContext accountLevelContext = getAccountLevelLocationContext(databaseAccount, false); + + // Set preferred regions starting with secondary region + this.preferredRegions = new ArrayList<>(accountLevelContext.serviceOrderedReadableRegions); + if (this.preferredRegions.size() > 1) { + // Swap first and second to make secondary region preferred + String temp = this.preferredRegions.get(0); + this.preferredRegions.set(0, this.preferredRegions.get(1)); + this.preferredRegions.set(1, temp); + } + + this.regionNameToEndpoint = accountLevelContext.regionNameToEndpoint; + this.database = getSharedCosmosDatabase(dummy); + this.container = getSharedSinglePartitionCosmosContainer(dummy); + } + } + + @Factory(dataProvider = "clientBuildersWithDirectTcp") + public BailOutFromBarrierE2ETests(CosmosClientBuilder clientBuilder) { + super(clientBuilder); + } + + + /** + * Provides test scenarios for head request lease not found (410/1022) error handling. + * + * <p>Each scenario is defined by the following parameters:</p> + * <ul> + * <li><b>headFailureCount</b>: Number of Head requests that should fail with 410/1022 status codes</li> + * <li><b>operationTypeForWhichBarrierFlowIsTriggered</b>: The operation type (Create or Read) that triggers the barrier flow</li> + * <li><b>enterPostQuorumSelectionOnlyBarrierLoop</b>: Whether to enter the post quorum selection only barrier loop</li> + * <li><b>successfulHeadRequestCountWhichDontMeetBarrier</b>: Number of successful Head requests (204 status code) + * that don't meet barrier requirements before failures start</li> + * <li><b>isCrossRegionRetryExpected</b>: Whether a cross-region retry is expected for the scenario</li> + * <li><b>desiredClientLevelConsistency</b>: The desired client-level consistency (STRONG or BOUNDED_STALENESS)</li> + * </ul> + * + * <p><b>Important Notes:</b></p> + * <ul> + * <li>Scenarios are scoped to cases where document requests succeeded but barrier flows were triggered + * (excludes QuorumNotMet scenarios which scope all barriers to primary)</li> + * <li>Create operations tolerate up to 2 Head failures before failing with timeout</li> + * <li>Read operations tolerate 3-5 Head failures before requiring cross-region retry</li> + * <li>In the QuorumSelected phase, successful Head requests that don't meet barrier requirements are tolerated: + * <ul> + * <li>Up to 18 successful Head requests for BOUNDED_STALENESS consistency</li> + * <li>Up to 111 successful Head requests for STRONG consistency</li> + * </ul> + * (See QuorumReader - maxNumberOfReadBarrierReadRetries and maxBarrierRetriesForMultiRegion)</li> + * </ul> + * + * @return array of test scenario parameters for head request lease not found error handling + */ + @DataProvider(name = "headRequestLeaseNotFoundScenarios") + public static Object[][] headRequestLeaseNotFoundScenarios() { + + return new Object[][]{ + { 1, OperationType.Create, false, 0, false, null }, + { 2, OperationType.Create, false, 0, false, null }, + { 3, OperationType.Create, false, 0, false, null }, + { 4, OperationType.Create, false, 0, false, null }, + { 400, OperationType.Create, false, 0, false, null }, + { 1, OperationType.Read, false, 0, false, null }, + { 2, OperationType.Read, false, 0, false, null }, + { 3, OperationType.Read, false, 0, false, null }, + { 4, OperationType.Read, false, 0, true, null }, + { 400, OperationType.Read, false, 0, true, null }, + { 1, OperationType.Read, true, 18, false, ConsistencyLevel.BOUNDED_STALENESS }, + { 2, OperationType.Read, true, 18, false, ConsistencyLevel.BOUNDED_STALENESS }, + { 3, OperationType.Read, true, 18, false, ConsistencyLevel.BOUNDED_STALENESS }, + { 4, OperationType.Read, true, 18, false, ConsistencyLevel.BOUNDED_STALENESS }, + { 5, OperationType.Read, true, 18, true, ConsistencyLevel.BOUNDED_STALENESS }, + { 1, OperationType.Read, true, 18, false, ConsistencyLevel.STRONG }, + { 2, OperationType.Read, true, 18, false, ConsistencyLevel.STRONG }, + { 3, OperationType.Read, true, 18, false, ConsistencyLevel.STRONG }, + { 4, OperationType.Read, true, 18, true, ConsistencyLevel.STRONG }, + { 1, OperationType.Read, true, 108, false, ConsistencyLevel.STRONG }, + { 2, OperationType.Read, true, 108, false, ConsistencyLevel.STRONG }, + { 3, OperationType.Read, true, 108, false, ConsistencyLevel.STRONG }, + { 4, OperationType.Read, true, 108, false, ConsistencyLevel.STRONG }, + { 5, OperationType.Read, true, 108, true, ConsistencyLevel.STRONG } + }; + } + + /** + * Validates that the consistency layer properly handles lease not found (410/1022) errors during + * barrier head requests and implements appropriate bailout/retry strategies based on the failure count, + * operation type, and consistency level. + * + * <p>This test verifies the resilience and fault tolerance of the barrier flow mechanism in the + * consistency layer when head requests fail with lease not found errors. The barrier flow is triggered + * when documents requests succeed but additional head requests are needed to ensure consistency guarantees + * are met across replicas.</p> + * + * <p><b>Test Scenarios:</b></p> + * <ul> + * <li><b>Create Operations:</b> Can tolerate up to 2 head failures before timing out. Beyond this threshold, + * the operation fails with a 408 timeout status code with 1022 substatus.</li> + * <li><b>Read Operations:</b> Can tolerate 3-4 head failures within the same region. After 4 failures, + * the operation triggers a cross-region retry to ensure eventual consistency.</li> + * <li><b>Post-Quorum Selection Barrier Loop:</b> Tests scenarios where initial barriers pass but subsequent + * barriers in the quorum-selected phase encounter failures. The system tolerates different numbers of + * successful head requests that don't meet barrier requirements: + * <ul> + * <li>Up to 18 for BOUNDED_STALENESS consistency</li> + * <li>Up to 111 for STRONG consistency</li> + * </ul> + * </li> + * </ul> + * + * <p><b>Validation Steps:</b></p> + * <ol> + * <li>Creates a CosmosAsyncClient with the specified consistency level and preferred regions</li> + * <li>Intercepts store responses to inject controlled head request failures (410/1022)</li> + * <li>Executes the specified operation (Create or Read) that triggers the barrier flow</li> + * <li>Validates the operation completes successfully or fails appropriately based on failure count</li> + * <li>Examines diagnostics to verify: + * <ul> + * <li>Correct number of head requests were attempted</li> + * <li>Expected number of regions were contacted</li> + * <li>Primary replica was contacted when failures occurred</li> + * <li>No 410 errors reached the Create/Read operations themselves</li> + * </ul> + * </li> + * </ol> + * + * <p><b>Important Notes:</b></p> + * <ul> + * <li>Test scenarios are scoped to cases where document requests succeeded but barrier flows were triggered, + * excluding QuorumNotMet scenarios which scope all barriers to the primary region</li> + * <li>The test uses an interceptor client to inject failures at precise points in the barrier flow</li> + * <li>Cross-region retry is only expected for Read operations exceeding the failure threshold</li> + * <li>The test validates that the system never exposes 410/1022 errors to the application layer for + * the primary Create/Read operations - only head requests should encounter these errors</li> + * </ul> + * + * @param headFailureCount the number of head requests that should fail with 410/1022 status codes + * before the system either succeeds, times out, or retries in another region + * @param operationTypeForWhichBarrierFlowIsTriggered the type of operation (Create or Read) that triggers + * the barrier flow and determines retry behavior + * @param enterPostQuorumSelectionOnlyBarrierLoop if true, allows initial barriers to pass and only injects + * failures during the post-quorum selection barrier loop phase + * @param successfulHeadRequestCountWhichDontMeetBarrier the number of successful head requests (204 status) + * that don't meet barrier requirements before failures + * start being injected (only relevant when in post-quorum + * selection barrier loop) + * @param isCrossRegionRetryExpected whether the test expects a cross-region retry to occur based on the + * failure count and operation type + * @param consistencyLevelApplicableForTest the consistency level to configure on the test client (STRONG or + * BOUNDED_STALENESS), which affects barrier retry thresholds + * + * @throws Exception if the test setup fails or unexpected errors occur during test execution + * + * @see ConsistencyReader for barrier flow implementation in read path + * @see ConsistencyWriter for barrier flow implementation in write path + * @see StoreResponseInterceptorUtils for failure injection mechanisms + */ + @Test(groups = {"multi-region-strong"}, dataProvider = "headRequestLeaseNotFoundScenarios", timeOut = 2 * TIMEOUT, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void validateHeadRequestLeaseNotFoundBailout( + int headFailureCount, + OperationType operationTypeForWhichBarrierFlowIsTriggered, + boolean enterPostQuorumSelectionOnlyBarrierLoop, + int successfulHeadRequestCountWhichDontMeetBarrier, + boolean isCrossRegionRetryExpected, + ConsistencyLevel consistencyLevelApplicableForTest) throws Exception { + + CosmosAsyncClient targetClient = getClientBuilder() + .preferredRegions(this.preferredRegions) + .buildAsyncClient(); + + ConsistencyLevel effectiveConsistencyLevel + = cosmosAsyncClientAccessor.getEffectiveConsistencyLevel(targetClient, operationTypeForWhichBarrierFlowIsTriggered, null); + + ConnectionMode connectionModeOfClientUnderTest + = ConnectionMode.valueOf( + cosmosAsyncClientAccessor.getConnectionMode( + targetClient).toUpperCase()); + + if (!shouldTestExecutionHappen( + effectiveConsistencyLevel, + OperationType.Create.equals(operationTypeForWhichBarrierFlowIsTriggered) ? ConsistencyLevel.STRONG : ConsistencyLevel.BOUNDED_STALENESS, + consistencyLevelApplicableForTest, + connectionModeOfClientUnderTest)) { + + safeClose(targetClient); + + throw new SkipException("Skipping test for arguments: " + + " OperationType: " + operationTypeForWhichBarrierFlowIsTriggered + + " ConsistencyLevel: " + effectiveConsistencyLevel + + " ConnectionMode: " + connectionModeOfClientUnderTest + + " DesiredConsistencyLevel: " + consistencyLevelApplicableForTest); + } + + AtomicInteger successfulHeadCountTracker = new AtomicInteger(); + AtomicInteger failedHeadCountTracker = new AtomicInteger(); + + try { + + TestObject testObject = TestObject.create(); + + if (enterPostQuorumSelectionOnlyBarrierLoop) { + if (OperationType.Read.equals(operationTypeForWhichBarrierFlowIsTriggered)) { + CosmosInterceptorHelper.registerTransportClientInterceptor(targetClient, StoreResponseInterceptorUtils.forceSuccessfulBarriersOnReadUntilQuorumSelectionThenForceBarrierFailures( + effectiveConsistencyLevel, + this.regionNameToEndpoint.get(this.preferredRegions.get(0)), + successfulHeadRequestCountWhichDontMeetBarrier, + successfulHeadCountTracker, + headFailureCount, + failedHeadCountTracker, + HttpConstants.StatusCodes.GONE, + HttpConstants.SubStatusCodes.LEASE_NOT_FOUND + )); + } + } else { + if (OperationType.Create.equals(operationTypeForWhichBarrierFlowIsTriggered)) { + CosmosInterceptorHelper.registerTransportClientInterceptor(targetClient, StoreResponseInterceptorUtils.forceBarrierFollowedByBarrierFailure( + effectiveConsistencyLevel, + this.regionNameToEndpoint.get(this.preferredRegions.get(1)), + headFailureCount, + failedHeadCountTracker, + HttpConstants.StatusCodes.GONE, + HttpConstants.SubStatusCodes.LEASE_NOT_FOUND + )); + } else if (OperationType.Read.equals(operationTypeForWhichBarrierFlowIsTriggered)) { + CosmosInterceptorHelper.registerTransportClientInterceptor(targetClient, StoreResponseInterceptorUtils.forceBarrierFollowedByBarrierFailure( + effectiveConsistencyLevel, + this.regionNameToEndpoint.get(this.preferredRegions.get(0)), + headFailureCount, + failedHeadCountTracker, + HttpConstants.StatusCodes.GONE, + HttpConstants.SubStatusCodes.LEASE_NOT_FOUND + )); + } + } + + try { + CosmosAsyncDatabase targetAsyncDatabase = targetClient.getDatabase(this.database.getId()); + CosmosAsyncContainer targetContainer = targetAsyncDatabase.getContainer(this.container.getId()); + + Thread.sleep(5000); // Wait for collection to be available to be read + + // Assert based on operation type and failure count + if (operationTypeForWhichBarrierFlowIsTriggered == OperationType.Create) { + + // Perform the operation + CosmosItemResponse<?> response = targetContainer.createItem(testObject).block(); + + // For Create, Head can only fail up to 2 times before Create fails with a timeout + if (headFailureCount <= 1) { + // Should eventually succeed + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(HttpConstants.StatusCodes.CREATED); + + // Check diagnostics - should have contacted only one region for create + CosmosDiagnostics diagnostics = response.getDiagnostics(); + assertThat(diagnostics).isNotNull(); + + validateHeadRequestsInCosmosDiagnostics(diagnostics, 2, (2 + successfulHeadRequestCountWhichDontMeetBarrier)); + validateContactedRegions(diagnostics, 1); + } else { + // Should timeout with 408 + fail("Should have thrown timeout exception"); + } + } else { + + targetContainer.createItem(testObject).block(); + + CosmosItemResponse<TestObject> response + = targetContainer.readItem(testObject.getId(), new PartitionKey(testObject.getMypk()), TestObject.class).block(); + + // for Read, Head can fail up to 3 times and still succeed from the same region after which read has to go to another region + if (!isCrossRegionRetryExpected) { + // Should eventually succeed + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(HttpConstants.StatusCodes.OK); + + // Check diagnostics - should have contacted only one region for create + CosmosDiagnostics diagnostics = response.getDiagnostics(); + assertThat(diagnostics).isNotNull(); + + validateHeadRequestsInCosmosDiagnostics(diagnostics, 5, (5 + successfulHeadRequestCountWhichDontMeetBarrier)); + validateContactedRegions(diagnostics, 1); + } else { + // Should eventually succeed + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(HttpConstants.StatusCodes.OK); + + CosmosDiagnostics diagnostics = response.getDiagnostics(); + assertThat(diagnostics).isNotNull(); + + validateHeadRequestsInCosmosDiagnostics(diagnostics, 5, (5 + successfulHeadRequestCountWhichDontMeetBarrier)); + validateContactedRegions(diagnostics, 2); + } + } + + } catch (CosmosException e) { + // Expected for some scenarios + if (operationTypeForWhichBarrierFlowIsTriggered == OperationType.Create) { + + if (headFailureCount <= 1) { + fail("Should have succeeded for create with head failures less than or equal to 2"); + } else { + // Should get 408-1022 timeout + assertThat(e.getStatusCode()).isEqualTo(HttpConstants.StatusCodes.REQUEST_TIMEOUT); + assertThat(e.getSubStatusCode()).isEqualTo(HttpConstants.SubStatusCodes.LEASE_NOT_FOUND); + + CosmosDiagnostics diagnostics = e.getDiagnostics(); + + validateHeadRequestsInCosmosDiagnostics(diagnostics, 2, (2 + successfulHeadRequestCountWhichDontMeetBarrier)); + validateContactedRegions(diagnostics, 1); + } + } + + if (operationTypeForWhichBarrierFlowIsTriggered == OperationType.Read) { + fail("Read operation should have succeeded even with head failures through cross region retry."); + } + } + + } finally { + safeClose(targetClient); + } + } + + private void validateContactedRegions(CosmosDiagnostics diagnostics, int expectedRegionsContactedCount) { + + CosmosDiagnosticsContext cosmosDiagnosticsContext = diagnostics.getDiagnosticsContext(); + Collection<ClientSideRequestStatistics> clientSideRequestStatisticsCollection + = diagnostics.getClientSideRequestStatistics(); + + for (ClientSideRequestStatistics clientSideRequestStatistics : clientSideRequestStatisticsCollection) { + + Collection<ClientSideRequestStatistics.StoreResponseStatistics> storeResponseDiagnosticsList + = clientSideRequestStatistics.getResponseStatisticsList(); + + for (ClientSideRequestStatistics.StoreResponseStatistics storeResponseStatistics : storeResponseDiagnosticsList) { + if (storeResponseStatistics.getRequestOperationType() == OperationType.Create || storeResponseStatistics.getRequestOperationType() == OperationType.Read) { + + if (storeResponseStatistics.getStoreResult().getStoreResponseDiagnostics().getStatusCode() == 410) { + fail("Should not have encountered 410 for Create/Read operation"); + } + } + } + } + + assertThat(cosmosDiagnosticsContext).isNotNull(); + assertThat(cosmosDiagnosticsContext.getContactedRegionNames()).isNotNull(); + assertThat(cosmosDiagnosticsContext.getContactedRegionNames()).isNotEmpty(); + assertThat(cosmosDiagnosticsContext.getContactedRegionNames().size()).as("Mismatch in regions contacted.").isEqualTo(expectedRegionsContactedCount); + } + + private void validateHeadRequestsInCosmosDiagnostics( + CosmosDiagnostics diagnostics, + int maxExpectedHeadRequestCountWithLeaseNotFoundErrors, + int maxExpectedHeadRequestCount) { + + int actualHeadRequestCountWithLeaseNotFoundErrors = 0; + int actualHeadRequestCount = 0; + boolean primaryReplicaContacted = false; + + Collection<ClientSideRequestStatistics> clientSideRequestStatisticsCollection + = diagnostics.getClientSideRequestStatistics(); + + for (ClientSideRequestStatistics clientSideRequestStatistics : clientSideRequestStatisticsCollection) { + + Collection<ClientSideRequestStatistics.StoreResponseStatistics> storeResponseDiagnosticsList + = clientSideRequestStatistics.getResponseStatisticsList(); + + for (ClientSideRequestStatistics.StoreResponseStatistics storeResponseStatistics : storeResponseDiagnosticsList) { + if (storeResponseStatistics.getRequestOperationType() == OperationType.Create || storeResponseStatistics.getRequestOperationType() == OperationType.Read) { + + if (storeResponseStatistics.getStoreResult().getStoreResponseDiagnostics().getStatusCode() == 410) { + fail("Should not have encountered 410 for Create/Read operation"); + } + } + } + + Collection<ClientSideRequestStatistics.StoreResponseStatistics> supplementalResponseStatisticsList + = clientSideRequestStatistics.getSupplementalResponseStatisticsList(); + + for (ClientSideRequestStatistics.StoreResponseStatistics storeResponseStatistics : supplementalResponseStatisticsList) { + if (storeResponseStatistics.getRequestOperationType() == OperationType.Head) { + + StoreResultDiagnostics storeResultDiagnostics = storeResponseStatistics.getStoreResult(); + + assertThat(storeResultDiagnostics).isNotNull(); + + String storePhysicalAddressContacted + = storeResultDiagnostics.getStorePhysicalAddressAsString(); + + StoreResponseDiagnostics storeResponseDiagnostics + = storeResultDiagnostics.getStoreResponseDiagnostics(); + + assertThat(storeResponseDiagnostics).isNotNull(); + + actualHeadRequestCount++; + + if (storeResponseDiagnostics.getStatusCode() == HttpConstants.StatusCodes.GONE && storeResponseDiagnostics.getSubStatusCode() == HttpConstants.SubStatusCodes.LEASE_NOT_FOUND) { + actualHeadRequestCountWithLeaseNotFoundErrors++; + } + + if (isStorePhysicalAddressThatOfPrimaryReplica(storePhysicalAddressContacted)) { + primaryReplicaContacted = true; + } + } + } + } + + assertThat(actualHeadRequestCountWithLeaseNotFoundErrors).as("Head request failed count with 410/1022 should be greater than 1.").isGreaterThan(0); + assertThat(actualHeadRequestCountWithLeaseNotFoundErrors).as("Too many head request failed.").isLessThanOrEqualTo(maxExpectedHeadRequestCountWithLeaseNotFoundErrors); + assertThat(actualHeadRequestCount).as("Too many Head requests made perhaps due to real replication lag.").isLessThanOrEqualTo(maxExpectedHeadRequestCount + 10); + assertThat(primaryReplicaContacted).as("Primary replica should be contacted even when a single Head request sees a 410/1022").isTrue(); + } + + private AccountLevelLocationContext getAccountLevelLocationContext(DatabaseAccount databaseAccount, boolean writeOnly) { + Iterator<DatabaseAccountLocation> locationIterator = + writeOnly ? databaseAccount.getWritableLocations().iterator() : databaseAccount.getReadableLocations().iterator(); + + List<String> serviceOrderedReadableRegions = new ArrayList<>(); + List<String> serviceOrderedWriteableRegions = new ArrayList<>(); + Map<String, String> regionMap = new ConcurrentHashMap<>(); + + while (locationIterator.hasNext()) { + DatabaseAccountLocation accountLocation = locationIterator.next(); + regionMap.put(accountLocation.getName(), accountLocation.getEndpoint()); + + if (writeOnly) { + serviceOrderedWriteableRegions.add(accountLocation.getName()); + } else { + serviceOrderedReadableRegions.add(accountLocation.getName()); + } + } + + return new AccountLevelLocationContext( + serviceOrderedReadableRegions, + serviceOrderedWriteableRegions, + regionMap); + } + + private boolean shouldTestExecutionHappen( + ConsistencyLevel effectiveConsistencyLevel, + ConsistencyLevel minimumConsistencyLevel, + ConsistencyLevel consistencyLevelApplicableForTestScenario, + ConnectionMode connectionModeOfClientUnderTest) { + + if (!connectionModeOfClientUnderTest.name().equalsIgnoreCase(ConnectionMode.DIRECT.name())) { + return false; + } + + if (consistencyLevelApplicableForTestScenario != null) { + return consistencyLevelApplicableForTestScenario.equals(effectiveConsistencyLevel); + } + + return effectiveConsistencyLevel.compareTo(minimumConsistencyLevel) <= 0; + } + + private static boolean isStorePhysicalAddressThatOfPrimaryReplica(String storePhysicalAddress) { + + if (Strings.isNullOrEmpty(storePhysicalAddress)) { + return false; + } + + return storePhysicalAddress.endsWith("p/"); + } + + private static class AccountLevelLocationContext { + private final List<String> serviceOrderedReadableRegions; + private final List<String> serviceOrderedWriteableRegions; + private final Map<String, String> regionNameToEndpoint; + + public AccountLevelLocationContext( + List<String> serviceOrderedReadableRegions, + List<String> serviceOrderedWriteableRegions, + Map<String, String> regionNameToEndpoint) { + + this.serviceOrderedReadableRegions = serviceOrderedReadableRegions; + this.serviceOrderedWriteableRegions = serviceOrderedWriteableRegions; + this.regionNameToEndpoint = regionNameToEndpoint; + } + } + + @AfterClass(groups = {"multi-region-strong"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) + public void afterClass() {} +} diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/FaultInjectionServerErrorRuleOnDirectTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/FaultInjectionServerErrorRuleOnDirectTests.java index 58998a9ab6e4..08e1d7332eab 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/FaultInjectionServerErrorRuleOnDirectTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/FaultInjectionServerErrorRuleOnDirectTests.java @@ -84,7 +84,7 @@ public FaultInjectionServerErrorRuleOnDirectTests(CosmosClientBuilder clientBuil this.subscriberValidationTimeout = TIMEOUT; } - @BeforeClass(groups = {"multi-region", "long", "fast", "fi-multi-master", "fault-injection-barrier"}, timeOut = TIMEOUT) + @BeforeClass(groups = {"multi-region", "long", "fast", "fi-multi-master", "multi-region-strong"}, timeOut = TIMEOUT) public void beforeClass() { clientWithoutPreferredRegions = getClientBuilder() .preferredRegions(new ArrayList<>()) @@ -1057,7 +1057,7 @@ public void faultInjectionServerErrorRuleTests_HitLimit() throws JsonProcessingE } } - @AfterClass(groups = {"multi-region", "long", "fast", "fi-multi-master", "fault-injection-barrier"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) + @AfterClass(groups = {"multi-region", "long", "fast", "fi-multi-master", "multi-region-strong"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) public void afterClass() { safeClose(clientWithoutPreferredRegions); } @@ -1475,7 +1475,7 @@ public void faultInjectionInjectTcpResponseDelay() throws JsonProcessingExceptio } } - @Test(groups = {"fault-injection-barrier"}, dataProvider = "barrierRequestServerErrorResponseProvider", timeOut = 2 * TIMEOUT) + @Test(groups = {"multi-region-strong"}, dataProvider = "barrierRequestServerErrorResponseProvider", timeOut = 2 * TIMEOUT) public void faultInjection_serverError_barrierRequest( OperationType operationType, FaultInjectionServerErrorType serverErrorType, diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/ReflectionUtils.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/ReflectionUtils.java index cf1110aec87f..fe01de341bc6 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/ReflectionUtils.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/ReflectionUtils.java @@ -309,6 +309,10 @@ public static StoreReader getStoreReader(ConsistencyReader consistencyReader) { return get(StoreReader.class, consistencyReader, "storeReader"); } + public static StoreReader getStoreReader(ConsistencyWriter consistencyWriter) { + return get(StoreReader.class, consistencyWriter, "storeReader"); + } + public static void setStoreReader(ConsistencyReader consistencyReader, StoreReader storeReader) { set(consistencyReader, storeReader, "storeReader"); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/StoreResponseInterceptorUtils.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/StoreResponseInterceptorUtils.java new file mode 100644 index 000000000000..bdf0fee5cf86 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/StoreResponseInterceptorUtils.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.directconnectivity; + +import com.azure.cosmos.ConsistencyLevel; +import com.azure.cosmos.implementation.OperationType; +import com.azure.cosmos.implementation.RxDocumentServiceRequest; +import com.azure.cosmos.implementation.Utils; + +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.BiFunction; + +public class StoreResponseInterceptorUtils { + + public static BiFunction<RxDocumentServiceRequest, StoreResponse, StoreResponse> forceBarrierFollowedByBarrierFailure( + ConsistencyLevel operationConsistencyLevel, + String regionName, + int maxAllowedFailureCount, + AtomicInteger failureCount, + int statusCode, + int subStatusCode) { + + return (request, storeResponse) -> { + + if (OperationType.Create.equals(request.getOperationType()) && regionName.equals(request.requestContext.regionalRoutingContextToRoute.getGatewayRegionalEndpoint().toString())) { + + long localLsn = Long.parseLong(storeResponse.getHeaderValue(WFConstants.BackendHeaders.LOCAL_LSN)); + long manipulatedGCLSN = localLsn - 1; + + storeResponse.setHeaderValue(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, String.valueOf(manipulatedGCLSN)); + + return storeResponse; + } + + if (OperationType.Read.equals(request.getOperationType()) && regionName.equals(request.requestContext.regionalRoutingContextToRoute.getGatewayRegionalEndpoint().toString())) { + + if (ConsistencyLevel.STRONG.equals(operationConsistencyLevel)) { + + long globalLsn = Long.parseLong(storeResponse.getHeaderValue(WFConstants.BackendHeaders.LSN)); + long itemLsn = Long.parseLong(storeResponse.getHeaderValue(WFConstants.BackendHeaders.ITEM_LSN)); + long manipulatedGlobalCommittedLSN = Math.min(globalLsn, itemLsn) - 1; + + storeResponse.setHeaderValue(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, String.valueOf(manipulatedGlobalCommittedLSN)); + + return storeResponse; + } else if (ConsistencyLevel.BOUNDED_STALENESS.equals(operationConsistencyLevel)) { + + long manipulatedItemLSN = -1; + long manipulatedGlobalLSN = 0; + + storeResponse.setHeaderValue(WFConstants.BackendHeaders.LSN, String.valueOf(manipulatedGlobalLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.LOCAL_LSN, String.valueOf(manipulatedGlobalLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.ITEM_LSN, String.valueOf(manipulatedItemLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.ITEM_LOCAL_LSN, String.valueOf(manipulatedItemLSN)); + + return storeResponse; + } + + return storeResponse; + } + + if (OperationType.Head.equals(request.getOperationType()) && regionName.equals(request.requestContext.regionalRoutingContextToRoute.getGatewayRegionalEndpoint().toString())) { + if (failureCount.incrementAndGet() <= maxAllowedFailureCount) { + throw Utils.createCosmosException(statusCode, subStatusCode, new Exception("An intercepted exception occurred. Check status and substatus code for details."), null); + } + } + + return storeResponse; + }; + } + + public static BiFunction<RxDocumentServiceRequest, StoreResponse, StoreResponse> forceSuccessfulBarriersOnReadUntilQuorumSelectionThenForceBarrierFailures( + ConsistencyLevel operationConsistencyLevel, + String regionName, + int allowedSuccessfulHeadRequestsWithoutBarrierBeingMet, + AtomicInteger successfulHeadRequestCount, + int maxAllowedFailureCount, + AtomicInteger failureCount, + int statusCode, + int subStatusCode) { + + return (request, storeResponse) -> { + + if (OperationType.Read.equals(request.getOperationType()) && regionName.equals(request.requestContext.regionalRoutingContextToRoute.getGatewayRegionalEndpoint().toString())) { + + if (ConsistencyLevel.STRONG.equals(operationConsistencyLevel)) { + + long globalLsn = Long.parseLong(storeResponse.getHeaderValue(WFConstants.BackendHeaders.LSN)); + long itemLsn = Long.parseLong(storeResponse.getHeaderValue(WFConstants.BackendHeaders.ITEM_LSN)); + long manipulatedGlobalCommittedLSN = Math.min(globalLsn, itemLsn) - 1; + + storeResponse.setHeaderValue(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, String.valueOf(manipulatedGlobalCommittedLSN)); + + return storeResponse; + } else if (ConsistencyLevel.BOUNDED_STALENESS.equals(operationConsistencyLevel)) { + + long manipulatedItemLSN = -1; + long manipulatedGlobalLSN = 0; + + storeResponse.setHeaderValue(WFConstants.BackendHeaders.LSN, String.valueOf(manipulatedGlobalLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.LOCAL_LSN, String.valueOf(manipulatedGlobalLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.ITEM_LSN, String.valueOf(manipulatedItemLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.ITEM_LOCAL_LSN, String.valueOf(manipulatedItemLSN)); + + return storeResponse; + } + + return storeResponse; + } + + if (OperationType.Head.equals(request.getOperationType()) && regionName.equals(request.requestContext.regionalRoutingContextToRoute.getGatewayRegionalEndpoint().toString())) { + + if (successfulHeadRequestCount.incrementAndGet() <= allowedSuccessfulHeadRequestsWithoutBarrierBeingMet) { + + if (ConsistencyLevel.STRONG.equals(operationConsistencyLevel)) { + + long localLsn = Long.parseLong(storeResponse.getHeaderValue(WFConstants.BackendHeaders.LOCAL_LSN)); + long itemLsn = Long.parseLong(storeResponse.getHeaderValue(WFConstants.BackendHeaders.ITEM_LSN)); + long manipulatedGCLSN = Math.min(localLsn, itemLsn) - 1; + + storeResponse.setHeaderValue(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, String.valueOf(manipulatedGCLSN)); + + return storeResponse; + } else if (ConsistencyLevel.BOUNDED_STALENESS.equals(operationConsistencyLevel)) { + + long manipulatedItemLSN = -1; + long manipulatedGlobalLSN = -1; + + storeResponse.setHeaderValue(WFConstants.BackendHeaders.LSN, String.valueOf(manipulatedGlobalLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.LOCAL_LSN, String.valueOf(manipulatedGlobalLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.ITEM_LSN, String.valueOf(manipulatedItemLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.ITEM_LOCAL_LSN, String.valueOf(manipulatedItemLSN)); + + return storeResponse; + } + + return storeResponse; + } + + if (failureCount.incrementAndGet() <= maxAllowedFailureCount) { + throw Utils.createCosmosException(statusCode, subStatusCode, new Exception("An intercepted exception occurred. Check status and substatus code for details."), null); + } + } + + return storeResponse; + }; + } +} diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/TestSuiteBase.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/TestSuiteBase.java index e4118eedc747..d4e06ca7407b 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/TestSuiteBase.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/TestSuiteBase.java @@ -205,7 +205,7 @@ public CosmosAsyncDatabase getDatabase(String id) { @BeforeSuite(groups = {"thinclient", "fast", "long", "direct", "multi-region", "multi-master", "flaky-multi-master", "emulator", "emulator-vnext", "split", "query", "cfp-split", "circuit-breaker-misc-gateway", "circuit-breaker-misc-direct", - "circuit-breaker-read-all-read-many", "fi-multi-master", "long-emulator", "fi-thinclient-multi-region", "fi-thinclient-multi-master", "fault-injection-barrier"}, timeOut = SUITE_SETUP_TIMEOUT) + "circuit-breaker-read-all-read-many", "fi-multi-master", "long-emulator", "fi-thinclient-multi-region", "fi-thinclient-multi-master", "multi-region-strong"}, timeOut = SUITE_SETUP_TIMEOUT) public void beforeSuite() { logger.info("beforeSuite Started"); @@ -223,7 +223,7 @@ public void beforeSuite() { @AfterSuite(groups = {"thinclient", "fast", "long", "direct", "multi-region", "multi-master", "flaky-multi-master", "emulator", "split", "query", "cfp-split", "circuit-breaker-misc-gateway", "circuit-breaker-misc-direct", - "circuit-breaker-read-all-read-many", "fi-multi-master", "long-emulator", "fi-thinclient-multi-region", "fi-thinclient-multi-master", "fault-injection-barrier"}, timeOut = SUITE_SHUTDOWN_TIMEOUT) + "circuit-breaker-read-all-read-many", "fi-multi-master", "long-emulator", "fi-thinclient-multi-region", "fi-thinclient-multi-master", "multi-region-strong"}, timeOut = SUITE_SHUTDOWN_TIMEOUT) public void afterSuite() { logger.info("afterSuite Started"); diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/resources/fault-injection-barrier-testng.xml b/sdk/cosmos/azure-cosmos-tests/src/test/resources/multi-region-strong.xml similarity index 90% rename from sdk/cosmos/azure-cosmos-tests/src/test/resources/fault-injection-barrier-testng.xml rename to sdk/cosmos/azure-cosmos-tests/src/test/resources/multi-region-strong.xml index 6444f7176010..9b8607cbf971 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/resources/fault-injection-barrier-testng.xml +++ b/sdk/cosmos/azure-cosmos-tests/src/test/resources/multi-region-strong.xml @@ -21,14 +21,14 @@ ~ SOFTWARE. --> <!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd"> -<suite name="fault-injection-barrier"> +<suite name="multi-region-strong"> <listeners> <listener class-name="com.azure.cosmos.CosmosNettyLeakDetectorFactory"/> </listeners> - <test name="fault-injection-barrier" group-by-instances="true"> + <test name="multi-region-strong" group-by-instances="true"> <groups> <run> - <include name="fault-injection-barrier"/> + <include name="multi-region-strong"/> </run> </groups> <packages> diff --git a/sdk/cosmos/azure-cosmos/CHANGELOG.md b/sdk/cosmos/azure-cosmos/CHANGELOG.md index b9a62661e695..47ca8bbf4b36 100644 --- a/sdk/cosmos/azure-cosmos/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos/CHANGELOG.md @@ -12,6 +12,7 @@ #### Other Changes * Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) * Changed to use incremental change feed to get partition key ranges. - [46810](https://github.com/Azure/azure-sdk-for-java/pull/46810) +* Optimized 410 `Lease Not Found` handling for Strong Consistency account by avoiding unnecessary retries in the barrier attainment flow. - [PR 47232](https://github.com/Azure/azure-sdk-for-java/pull/47232) ### 4.75.0 (2025-10-21) > [!IMPORTANT] diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/ConsistencyWriter.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/ConsistencyWriter.java index 92a781cf071c..86b3e6cd0346 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/ConsistencyWriter.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/ConsistencyWriter.java @@ -27,7 +27,6 @@ import com.azure.cosmos.implementation.Strings; import com.azure.cosmos.implementation.Utils; import com.azure.cosmos.implementation.apachecommons.collections.ComparatorUtils; -import com.azure.cosmos.implementation.directconnectivity.rntbd.ClosedClientTransportException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import reactor.core.Exceptions; @@ -46,11 +45,14 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; +import static com.azure.cosmos.implementation.Exceptions.isAvoidQuorumSelectionException; + /* * ConsistencyWriter has two modes for writing - local quorum-acked write and globally strong write. * @@ -149,6 +151,8 @@ Mono<StoreResponse> writePrivateAsync( TimeoutHelper timeout, boolean forceRefresh) { + final AtomicReference<CosmosException> cosmosExceptionValueHolder = new AtomicReference<>(null); + if (timeout.isElapsed() && // skip throwing RequestTimeout on first retry because the first retry with // force address refresh header can be critical to recover for example from @@ -280,7 +284,7 @@ Mono<StoreResponse> writePrivateAsync( false, primaryURI.get(), replicaStatusList); - return barrierForGlobalStrong(request, response); + return barrierForGlobalStrong(request, response, cosmosExceptionValueHolder); }) .doFinally(signalType -> { if (signalType != SignalType.CANCEL) { @@ -296,11 +300,16 @@ Mono<StoreResponse> writePrivateAsync( } else { Mono<RxDocumentServiceRequest> barrierRequestObs = BarrierRequestHelper.createAsync(this.diagnosticsClientContext, request, this.authorizationTokenProvider, null, request.requestContext.globalCommittedSelectedLSN); - return barrierRequestObs.flatMap(barrierRequest -> waitForWriteBarrierAsync(barrierRequest, request.requestContext.globalCommittedSelectedLSN) + return barrierRequestObs.flatMap(barrierRequest -> waitForWriteBarrierAsync(barrierRequest, request.requestContext.globalCommittedSelectedLSN, cosmosExceptionValueHolder) .flatMap(v -> { if (!v) { logger.info("ConsistencyWriter: Write barrier has not been met for global strong request. SelectedGlobalCommittedLsn: {}", request.requestContext.globalCommittedSelectedLSN); + + if (cosmosExceptionValueHolder.get() != null) { + return Mono.error(cosmosExceptionValueHolder.get()); + } + return Mono.error(new GoneException(RMResources.GlobalStrongWriteBarrierNotMet, HttpConstants.SubStatusCodes.GLOBAL_STRONG_WRITE_BARRIER_NOT_MET)); } @@ -324,7 +333,11 @@ boolean isGlobalStrongRequest(RxDocumentServiceRequest request, StoreResponse re return false; } - Mono<StoreResponse> barrierForGlobalStrong(RxDocumentServiceRequest request, StoreResponse response) { + Mono<StoreResponse> barrierForGlobalStrong( + RxDocumentServiceRequest request, + StoreResponse response, + AtomicReference<CosmosException> cosmosExceptionValueHolder) { + try { if (ReplicatedResourceClient.isGlobalStrongEnabled() && this.isGlobalStrongRequest(request, response)) { Utils.ValueHolder<Long> lsn = Utils.ValueHolder.initialize(-1L); @@ -355,12 +368,17 @@ Mono<StoreResponse> barrierForGlobalStrong(RxDocumentServiceRequest request, Sto request.requestContext.globalCommittedSelectedLSN); return barrierRequestObs.flatMap(barrierRequest -> { - Mono<Boolean> barrierWait = this.waitForWriteBarrierAsync(barrierRequest, request.requestContext.globalCommittedSelectedLSN); + Mono<Boolean> barrierWait = this.waitForWriteBarrierAsync(barrierRequest, request.requestContext.globalCommittedSelectedLSN, cosmosExceptionValueHolder); return barrierWait.flatMap(res -> { if (!res) { logger.error("ConsistencyWriter: Write barrier has not been met for global strong request. SelectedGlobalCommittedLsn: {}", request.requestContext.globalCommittedSelectedLSN); + + if (cosmosExceptionValueHolder.get() != null) { + return Mono.error(cosmosExceptionValueHolder.get()); + } + // RxJava1 doesn't allow throwing checked exception return Mono.error(new GoneException(RMResources.GlobalStrongWriteBarrierNotMet, HttpConstants.SubStatusCodes.GLOBAL_STRONG_WRITE_BARRIER_NOT_MET)); @@ -384,7 +402,11 @@ Mono<StoreResponse> barrierForGlobalStrong(RxDocumentServiceRequest request, Sto } } - private Mono<Boolean> waitForWriteBarrierAsync(RxDocumentServiceRequest barrierRequest, long selectedGlobalCommittedLsn) { + private Mono<Boolean> waitForWriteBarrierAsync( + RxDocumentServiceRequest barrierRequest, + long selectedGlobalCommittedLsn, + AtomicReference<CosmosException> cosmosExceptionValueHolder) { + AtomicInteger writeBarrierRetryCount = new AtomicInteger(ConsistencyWriter.MAX_NUMBER_OF_WRITE_BARRIER_READ_RETRIES); AtomicLong maxGlobalCommittedLsnReceived = new AtomicLong(0); return Flux.defer(() -> { @@ -392,6 +414,10 @@ private Mono<Boolean> waitForWriteBarrierAsync(RxDocumentServiceRequest barrierR return Flux.error(new RequestTimeoutException()); } + if (writeBarrierRetryCount.get() == 0) { + return Mono.just(false); + } + Mono<List<StoreResult>> storeResultListObs = this.storeReader.readMultipleReplicaAsync( barrierRequest, true /*allowPrimary*/, @@ -403,6 +429,27 @@ private Mono<Boolean> waitForWriteBarrierAsync(RxDocumentServiceRequest barrierR false /*forceReadAll*/); return storeResultListObs.flatMap( responses -> { + + boolean isAvoidQuorumSelectionStoreResult = false; + CosmosException cosmosExceptionFromStoreResult = null; + + for (StoreResult storeResult : responses) { + if (storeResult.isAvoidQuorumSelectionException) { + isAvoidQuorumSelectionStoreResult = true; + cosmosExceptionFromStoreResult = storeResult.getException(); + break; + } + } + + if (isAvoidQuorumSelectionStoreResult) { + writeBarrierRetryCount.decrementAndGet(); + return this.isBarrierMeetPossibleInPresenceOfAvoidQuorumSelectionException( + barrierRequest, + selectedGlobalCommittedLsn, + cosmosExceptionValueHolder, + cosmosExceptionFromStoreResult); + } + if (responses != null && responses.stream().anyMatch(response -> response.globalCommittedLSN >= selectedGlobalCommittedLsn)) { return Mono.just(Boolean.TRUE); } @@ -459,6 +506,86 @@ static void getLsnAndGlobalCommittedLsn(StoreResponse response, Utils.ValueHolde } } + private Mono<Boolean> isBarrierMeetPossibleInPresenceOfAvoidQuorumSelectionException( + RxDocumentServiceRequest barrierRequest, + long selectedGlobalCommittedLsn, + AtomicReference<CosmosException> cosmosExceptionValueHolder, + CosmosException cosmosExceptionInStoreResult) { + + AtomicBoolean bailFromWriteBarrierLoop = new AtomicBoolean(false); + + return performOptimisticBarrierOnPrimaryAndDetermineIfBarrierCanBeSatisfied( + barrierRequest, + selectedGlobalCommittedLsn, + cosmosExceptionValueHolder, + bailFromWriteBarrierLoop).flatMap(isBarrierFromPrimarySuccessful -> { + + if (isBarrierFromPrimarySuccessful) { + bailFromWriteBarrierLoop.set(true); + cosmosExceptionValueHolder.set(null); + + return Mono.just(true); + } + + if (bailFromWriteBarrierLoop.get()) { + bailFromWriteBarrierLoop.set(true); + cosmosExceptionValueHolder.set(Utils.createCosmosException( + HttpConstants.StatusCodes.REQUEST_TIMEOUT, + cosmosExceptionInStoreResult.getSubStatusCode(), + cosmosExceptionInStoreResult, + null)); + return Mono.just(false); + } else { + bailFromWriteBarrierLoop.set(false); + cosmosExceptionValueHolder.set(null); + return Mono.empty(); + } + }); + } + + private Mono<Boolean> performOptimisticBarrierOnPrimaryAndDetermineIfBarrierCanBeSatisfied( + RxDocumentServiceRequest barrierRequest, + long selectedGlobalCommittedLSN, + AtomicReference<CosmosException> cosmosExceptionValueHolder, + AtomicBoolean bailFromWriteBarrierLoop) { + + barrierRequest.requestContext.forceRefreshAddressCache = true; + Mono<StoreResult> storeResultObs = this.storeReader.readPrimaryAsync( + barrierRequest, true, false /*useSessionToken*/); + + return storeResultObs.flatMap(storeResult -> { + if (!storeResult.isValid) { + return Mono.just(false); + } + + boolean hasRequiredGlobalCommittedLsn = storeResult.globalCommittedLSN >= selectedGlobalCommittedLSN; + + barrierRequest.requestContext.forceRefreshAddressCache = false; + return Mono.just(hasRequiredGlobalCommittedLsn); + }) + .onErrorResume(throwable -> { + + barrierRequest.requestContext.forceRefreshAddressCache = false; + + if (throwable instanceof CosmosException) { + CosmosException cosmosException = Utils.as(throwable, CosmosException.class); + + if (isAvoidQuorumSelectionException(cosmosException)) { + + bailFromWriteBarrierLoop.set(true); + cosmosExceptionValueHolder.set(cosmosException); + return Mono.just(false); + } + + bailFromWriteBarrierLoop.set(false); + return Mono.just(false); + } + + bailFromWriteBarrierLoop.set(false); + return Mono.just(false); + }); + } + void startBackgroundAddressRefresh(RxDocumentServiceRequest request) { this.addressSelector.resolvePrimaryUriAsync(request, true) .publishOn(Schedulers.boundedElastic()) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/QuorumReader.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/QuorumReader.java index 1f01e66076d6..487d2184db39 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/QuorumReader.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/QuorumReader.java @@ -12,7 +12,6 @@ import com.azure.cosmos.implementation.Exceptions; import com.azure.cosmos.implementation.GoneException; import com.azure.cosmos.implementation.HttpConstants; -import com.azure.cosmos.implementation.ImplementationBridgeHelpers; import com.azure.cosmos.implementation.InternalServerErrorException; import com.azure.cosmos.implementation.Configs; import com.azure.cosmos.implementation.IAuthorizationTokenProvider; @@ -22,6 +21,7 @@ import com.azure.cosmos.implementation.RMResources; import com.azure.cosmos.implementation.RequestChargeTracker; import com.azure.cosmos.implementation.RxDocumentServiceRequest; +import com.azure.cosmos.implementation.Utils; import com.azure.cosmos.implementation.apachecommons.lang.tuple.Pair; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -32,10 +32,13 @@ import java.util.Comparator; import java.util.List; import java.util.Optional; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; +import static com.azure.cosmos.implementation.Exceptions.isAvoidQuorumSelectionException; import static com.azure.cosmos.implementation.Utils.ValueHolder; // @@ -135,6 +138,8 @@ public Mono<StoreResponse> readStrongAsync( final MutableVolatile<Boolean> shouldRetryOnSecondary = new MutableVolatile<>(false); final MutableVolatile<Boolean> hasPerformedReadFromPrimary = new MutableVolatile<>(false); final MutableVolatile<Boolean> includePrimary = new MutableVolatile<>(false); + final AtomicReference<CosmosException> cosmosExceptionValueHolder = new AtomicReference<>(null); + final AtomicBoolean bailOnBarrierValueHolder = new AtomicBoolean(false); return Flux.defer( // the following will be repeated till the repeat().takeUntil(.) condition is satisfied. @@ -149,7 +154,9 @@ public Mono<StoreResponse> readStrongAsync( entity, readQuorumValue, includePrimary.v, - readMode); + readMode, + cosmosExceptionValueHolder, + bailOnBarrierValueHolder); return secondaryQuorumReadResultObs.flux().flatMap( secondaryQuorumReadResult -> { @@ -185,7 +192,9 @@ public Mono<StoreResponse> readStrongAsync( readQuorumValue, secondaryQuorumReadResult.selectedLsn, secondaryQuorumReadResult.globalCommittedSelectedLsn, - readMode); + readMode, + cosmosExceptionValueHolder, + bailOnBarrierValueHolder); return readBarrierObs.flux().flatMap( readBarrier -> { @@ -291,11 +300,15 @@ public Mono<StoreResponse> readStrongAsync( .switchIfEmpty(Flux.defer(() -> { logger.info("Could not complete read quorum with read quorum value of {}", readQuorumValue); - return Flux.error(new GoneException( + if (cosmosExceptionValueHolder.get() != null) { + return Flux.error(cosmosExceptionValueHolder.get()); + } + + return Flux.error(new GoneException( String.format( RMResources.ReadQuorumNotMet, readQuorumValue), - HttpConstants.SubStatusCodes.READ_QUORUM_NOT_MET)); + HttpConstants.SubStatusCodes.READ_QUORUM_NOT_MET)); })) .take(1) .single(); @@ -305,7 +318,10 @@ private Mono<ReadQuorumResult> readQuorumAsync( RxDocumentServiceRequest entity, int readQuorum, boolean includePrimary, - ReadMode readMode) { + ReadMode readMode, + AtomicReference<CosmosException> cosmosExceptionValueHolder, + AtomicBoolean bailOnBarrierValueHolder) { + if (entity.requestContext.timeoutHelper.isElapsed()) { return Mono.error(new GoneException()); } @@ -327,9 +343,21 @@ private Mono<ReadQuorumResult> readQuorumAsync( Mono<RxDocumentServiceRequest> barrierRequestObs = BarrierRequestHelper.createAsync(this.diagnosticsClientContext, entity, this.authorizationTokenProvider, readLsn, globalCommittedLSN); return barrierRequestObs.flatMap( barrierRequest -> { - Mono<Boolean> waitForObs = this.waitForReadBarrierAsync(barrierRequest, false, readQuorum, readLsn, globalCommittedLSN, readMode); + Mono<Boolean> waitForObs = this.waitForReadBarrierAsync(barrierRequest, false, readQuorum, readLsn, globalCommittedLSN, readMode, cosmosExceptionValueHolder, bailOnBarrierValueHolder); return waitForObs.flatMap( waitFor -> { + + if (bailOnBarrierValueHolder.get() && cosmosExceptionValueHolder.get() != null) { + return Mono.just(new ReadQuorumResult( + entity.requestContext.requestChargeTracker, + ReadQuorumResultKind.QuorumNotPossibleInCurrentRegion, + readLsn, + globalCommittedLSN, + storeResult, + storeResponses, + cosmosExceptionValueHolder.get())); + } + if (!waitFor) { return Mono.just(new ReadQuorumResult( entity.requestContext.requestChargeTracker, @@ -616,7 +644,9 @@ private Mono<Boolean> waitForReadBarrierAsync( final int readQuorum, final long readBarrierLsn, final long targetGlobalCommittedLSN, - ReadMode readMode) { + ReadMode readMode, + AtomicReference<CosmosException> cosmosExceptionValueHolder, + AtomicBoolean bailFromReadBarrierLoopValueHolder) { AtomicInteger readBarrierRetryCount = new AtomicInteger(maxNumberOfReadBarrierReadRetries); AtomicInteger readBarrierRetryCountMultiRegion = new AtomicInteger(maxBarrierRetriesForMultiRegion); @@ -635,6 +665,32 @@ private Mono<Boolean> waitForReadBarrierAsync( return responsesObs.flux().flatMap( responses -> { + boolean isAvoidQuorumSelectionStoreResult = false; + CosmosException cosmosExceptionFromStoreResult = null; + + if (readBarrierRetryCount.get() == 0) { + return Mono.just(false); + } + + for (StoreResult storeResult : responses) { + if (storeResult.isAvoidQuorumSelectionException) { + isAvoidQuorumSelectionStoreResult = true; + cosmosExceptionFromStoreResult = storeResult.getException(); + break; + } + } + + if (isAvoidQuorumSelectionStoreResult) { + readBarrierRetryCount.decrementAndGet(); + return this.isBarrierMeetPossibleInPresenceOfAvoidQuorumSelectionException( + barrierRequest, + readBarrierLsn, + targetGlobalCommittedLSN, + cosmosExceptionValueHolder, + bailFromReadBarrierLoopValueHolder, + cosmosExceptionFromStoreResult); + } + long maxGlobalCommittedLsnInResponses = responses.size() > 0 ? responses.stream() .mapToLong(response -> response.globalCommittedLSN).max().getAsLong() : 0; @@ -677,6 +733,10 @@ private Mono<Boolean> waitForReadBarrierAsync( return Flux.just(true); } + if (bailFromReadBarrierLoopValueHolder.get()) { + return Flux.just(false); + } + // we will go into global strong read barrier mode for global strong requests after regular barrier calls have been exhausted. if (targetGlobalCommittedLSN > 0) { return Flux.defer(() -> { @@ -685,12 +745,39 @@ private Mono<Boolean> waitForReadBarrierAsync( return Flux.error(new GoneException()); } - Mono<List<StoreResult>> responsesObs = this.storeReader.readMultipleReplicaAsync( - barrierRequest, allowPrimary, readQuorum, - true /*required valid LSN*/, false /*useSessionToken*/, readMode, false /*checkMinLSN*/, true /*forceReadAll*/); + if (readBarrierRetryCountMultiRegion.get() == 0) { + return Flux.just(false); + } + + Mono<List<StoreResult>> responsesObs = this.storeReader.readMultipleReplicaAsync( + barrierRequest, allowPrimary, readQuorum, + true /*required valid LSN*/, false /*useSessionToken*/, readMode, false /*checkMinLSN*/, true /*forceReadAll*/); return responsesObs.flux().flatMap( responses -> { + + boolean isAvoidQuorumSelectionStoreResult = false; + CosmosException cosmosExceptionFromStoreResult = null; + + for (StoreResult storeResult : responses) { + if (storeResult.isAvoidQuorumSelectionException) { + isAvoidQuorumSelectionStoreResult = true; + cosmosExceptionFromStoreResult = storeResult.getException(); + break; + } + } + + if (isAvoidQuorumSelectionStoreResult) { + readBarrierRetryCountMultiRegion.getAndDecrement(); + return this.isBarrierMeetPossibleInPresenceOfAvoidQuorumSelectionException( + barrierRequest, + readBarrierLsn, + targetGlobalCommittedLSN, + cosmosExceptionValueHolder, + bailFromReadBarrierLoopValueHolder, + cosmosExceptionFromStoreResult); + } + long maxGlobalCommittedLsnInResponses = responses.size() > 0 ? responses.stream() .mapToLong(response -> response.globalCommittedLSN).max().getAsLong() : 0; @@ -823,6 +910,91 @@ private boolean isQuorumMet( return isQuorumMet; } + private Mono<Boolean> isBarrierMeetPossibleInPresenceOfAvoidQuorumSelectionException( + RxDocumentServiceRequest barrierRequest, + long readBarrierLsn, + long targetGlobalCommittedLSN, + AtomicReference<CosmosException> cosmosExceptionValueHolder, + AtomicBoolean bailFromReadBarrierLoop, + CosmosException cosmosExceptionInStoreResult) { + + return performBarrierOnPrimaryAndDetermineIfBarrierCanBeSatisfied( + barrierRequest, + true, + readBarrierLsn, + targetGlobalCommittedLSN, + cosmosExceptionValueHolder, + bailFromReadBarrierLoop).flatMap(isBarrierFromPrimarySuccessful -> { + + if (isBarrierFromPrimarySuccessful) { + bailFromReadBarrierLoop.set(true); + cosmosExceptionValueHolder.set(null); + + return Mono.just(true); + } + + if (bailFromReadBarrierLoop.get()) { + bailFromReadBarrierLoop.set(true); + cosmosExceptionValueHolder.set(Utils.createCosmosException( + HttpConstants.StatusCodes.SERVICE_UNAVAILABLE, + cosmosExceptionInStoreResult.getSubStatusCode(), + cosmosExceptionInStoreResult, + null)); + return Mono.just(false); + } else { + bailFromReadBarrierLoop.set(false); + cosmosExceptionValueHolder.set(null); + return Mono.empty(); + } + }); + } + + private Mono<Boolean> performBarrierOnPrimaryAndDetermineIfBarrierCanBeSatisfied( + RxDocumentServiceRequest barrierRequest, + boolean requiresValidLsn, + long readBarrierLsn, + long targetGlobalCommittedLSN, + AtomicReference<CosmosException> cosmosExceptionValueHolder, + AtomicBoolean bailFromReadBarrierLoop) { + + barrierRequest.requestContext.forceRefreshAddressCache = true; + Mono<StoreResult> storeResultObs = this.storeReader.readPrimaryAsync( + barrierRequest, requiresValidLsn, false /*useSessionToken*/); + + return storeResultObs.flatMap(storeResult -> { + if (!storeResult.isValid) { + return Mono.just(false); + } + + boolean hasRequiredLsn = storeResult.lsn >= readBarrierLsn; + boolean hasRequiredGlobalCommittedLsn = + targetGlobalCommittedLSN <= 0 || storeResult.globalCommittedLSN >= targetGlobalCommittedLSN; + + return Mono.just(hasRequiredLsn && hasRequiredGlobalCommittedLsn); + }) + .onErrorResume(throwable -> { + + barrierRequest.requestContext.forceRefreshAddressCache = false; + + if (throwable instanceof CosmosException) { + CosmosException cosmosException = Utils.as(throwable, CosmosException.class); + + if (isAvoidQuorumSelectionException(cosmosException)) { + + bailFromReadBarrierLoop.set(true); + cosmosExceptionValueHolder.set(cosmosException); + return Mono.just(false); + } + + bailFromReadBarrierLoop.set(false); + return Mono.just(false); + } + + bailFromReadBarrierLoop.set(false); + return Mono.just(false); + }); + } + private enum ReadQuorumResultKind { QuorumMet, QuorumSelected, diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreReader.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreReader.java index 5169dfb121a7..a6046151b23f 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreReader.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreReader.java @@ -281,36 +281,31 @@ private Flux<List<StoreResult>> readFromReplicas(List<StoreResult> resultCollect if (srr.isAvoidQuorumSelectionException) { - // todo: fail fast when barrier requests also hit isAvoidQuorumSelectionException? - // todo: https://github.com/Azure/azure-sdk-for-java/issues/46135 - if (!entity.isBarrierRequest) { + // isAvoidQuorumSelectionException is a special case where we want to enable the enclosing data plane operation + // to fail fast in the region where a quorum selection is being attempted + // no attempts to reselect quorum will be made + if (logger.isDebugEnabled()) { - // isAvoidQuorumSelectionException is a special case where we want to enable the enclosing data plane operation - // to fail fast in the region where a quorum selection is being attempted - // no attempts to reselect quorum will be made - if (logger.isDebugEnabled()) { + int statusCode = srr.getException() != null ? srr.getException().getStatusCode() : 0; + int subStatusCode = srr.getException() != null ? srr.getException().getSubStatusCode() : 0; - int statusCode = srr.getException() != null ? srr.getException().getStatusCode() : 0; - int subStatusCode = srr.getException() != null ? srr.getException().getSubStatusCode() : 0; - - logger.debug("An exception with error code [{}-{}] was observed which means quorum cannot be attained in the current region!", statusCode, subStatusCode); - } + logger.debug("An exception with error code [{}-{}] was observed which means quorum cannot be attained in the current region!", statusCode, subStatusCode); + } - if (!entity.requestContext.performedBackgroundAddressRefresh) { - this.startBackgroundAddressRefresh(entity); - entity.requestContext.performedBackgroundAddressRefresh = true; - } + if (!entity.requestContext.performedBackgroundAddressRefresh) { + this.startBackgroundAddressRefresh(entity); + entity.requestContext.performedBackgroundAddressRefresh = true; + } - // (collect quorum store results if possible) - // for QuorumReader (upstream) to make the final decision on quorum selection - resultCollector.add(srr); + // (collect quorum store results if possible) + // for QuorumReader (upstream) to make the final decision on quorum selection + resultCollector.add(srr); - // Remaining replicas - replicasToRead.set(replicaCountToRead - resultCollector.size()); + // Remaining replicas + replicasToRead.set(replicaCountToRead - resultCollector.size()); - // continue to the next store result - continue; - } + // continue to the next store result + continue; } if (srr.isValid) { @@ -687,6 +682,15 @@ private Mono<ReadReplicaResult> readPrimaryInternalAsync( true, primaryUriReference.get(), replicaStatusList); + + if (storeTaskException instanceof CosmosException) { + CosmosException cosmosException = (CosmosException) storeTaskException; + + if (com.azure.cosmos.implementation.Exceptions.isAvoidQuorumSelectionException(cosmosException)) { + return Mono.error(cosmosException); + } + } + return Mono.just(storeResult); } catch (CosmosException e) { // RxJava1 doesn't allow throwing checked exception from Observable operators diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreResponse.java index a4bab8f3edbe..a3da4b9c487e 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreResponse.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreResponse.java @@ -205,7 +205,7 @@ public String getHeaderValue(String attribute) { } //NOTE: only used for testing purpose to change the response header value - private void setHeaderValue(String headerName, String value) { + void setHeaderValue(String headerName, String value) { if (this.responseHeaderValues == null || this.responseHeaderNames.length != this.responseHeaderValues.length) { return; } diff --git a/sdk/cosmos/live-platform-matrix.json b/sdk/cosmos/live-platform-matrix.json index 96581316474d..e5771c249c1c 100644 --- a/sdk/cosmos/live-platform-matrix.json +++ b/sdk/cosmos/live-platform-matrix.json @@ -13,8 +13,8 @@ "-Pcircuit-breaker-misc-gateway": "CircuitBreakerMiscGateway", "-Pcircuit-breaker-read-all-read-many": "CircuitBreakerReadAllAndReadMany", "-Pmulti-region": "MultiRegion", + "-Pmulti-region-strong": "MultiRegionStrong", "-Plong": "Long", - "-Pfault-injection-barrier": "Fault-injection-barrier", "-DargLine=\"-Dazure.cosmos.directModeProtocol=Tcp\"": "TCP", "Session": "", "ubuntu": "", @@ -182,9 +182,13 @@ { "DESIRED_CONSISTENCIES": "[\"Strong\"]", "ACCOUNT_CONSISTENCY": "Strong", + "ArmConfig": { + "MultiRegion_Strong": { + "ArmTemplateParameters": "@{ enableMultipleWriteLocations = $false; defaultConsistencyLevel = 'Strong'; enableMultipleRegions = $true }" + } + }, "PROTOCOLS": "[\"Tcp\"]", - "ProfileFlag": [ "-Pfault-injection-barrier" ], - "ArmTemplateParameters": "@{ enableMultipleWriteLocations = $false; defaultConsistencyLevel = 'Strong'; enableMultipleRegions = $true }", + "ProfileFlag": [ "-Pmulti-region-strong" ], "Agent": { "ubuntu": { "OSVmImage": "env:LINUXVMIMAGE", "Pool": "env:LINUXPOOL" } } From 1406557fa6115c36647fa6d8a91abf0ff25a5f04 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 25 Nov 2025 21:08:56 -0800 Subject: [PATCH 049/186] Increment package versions for postgresqlflexibleserver releases (#47387) --- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 10 ++++++++++ .../pom.xml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 6ef300c042e5..2e7f0daccd2e 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -378,7 +378,7 @@ com.azure.resourcemanager:azure-resourcemanager-imagebuilder;1.2.0;1.3.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-maps;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-botservice;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-recoveryservicesbackup;1.6.0;1.7.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-postgresqlflexibleserver;1.1.0;2.0.0 +com.azure.resourcemanager:azure-resourcemanager-postgresqlflexibleserver;2.0.0;2.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-deviceprovisioningservices;1.1.0;1.2.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-elastic;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-webpubsub;1.1.0;1.2.0-beta.1 diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md index 00f8c44e8888..c8374fa740d0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 2.1.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 2.0.0 (2025-11-21) - Azure Resource Manager PostgreSql client library for Java. This package contains Microsoft Azure SDK for PostgreSql Management SDK. The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2025-08-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml index e63275b2155a..e7c4950d41da 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml @@ -14,7 +14,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-postgresqlflexibleserver</artifactId> - <version>2.0.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-postgresqlflexibleserver;current} --> + <version>2.1.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-postgresqlflexibleserver;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for PostgreSql Management</name> From 217352495683337aad0b075854a132a409bcd994 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Wed, 26 Nov 2025 15:53:29 +0800 Subject: [PATCH 050/186] update aad/aadb2c --- .../aad/configuration/AadOAuth2ClientConfiguration.java | 9 ++++++++- .../AadJwtBearerGrantRequestParametersConverter.java | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfiguration.java index 269bd3102c1d..90ad31c7ab0d 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadOAuth2ClientConfiguration.java @@ -3,10 +3,17 @@ package com.azure.spring.cloud.autoconfigure.implementation.aad.configuration; -import com.azure.spring.cloud.autoconfigure.implementation.aad.security.*; import com.azure.spring.cloud.autoconfigure.implementation.aad.configuration.conditions.ClientCertificatePropertiesCondition; import com.azure.spring.cloud.autoconfigure.implementation.aad.configuration.conditions.ClientRegistrationCondition; import com.azure.spring.cloud.autoconfigure.implementation.aad.configuration.properties.AadAuthenticationProperties; +import com.azure.spring.cloud.autoconfigure.implementation.aad.security.AadAzureDelegatedOAuth2AuthorizedClientProvider; +import com.azure.spring.cloud.autoconfigure.implementation.aad.security.AadClientRegistrationRepository; +import com.azure.spring.cloud.autoconfigure.implementation.aad.security.AadJwtBearerGrantRequestParametersConverter; +import com.azure.spring.cloud.autoconfigure.implementation.aad.security.AadJwtClientAuthenticationParametersConverter; +import com.azure.spring.cloud.autoconfigure.implementation.aad.security.AadOAuth2ClientAuthenticationJwkResolver; +import com.azure.spring.cloud.autoconfigure.implementation.aad.security.AadOidcIdTokenDecoderFactory; +import com.azure.spring.cloud.autoconfigure.implementation.aad.security.JacksonHttpSessionOAuth2AuthorizedClientRepository; +import com.azure.spring.cloud.autoconfigure.implementation.aad.security.OAuth2ClientAuthenticationJwkResolver; import com.azure.spring.cloud.autoconfigure.implementation.aad.security.properties.AadAuthorizationServerEndpoints; import com.azure.spring.cloud.autoconfigure.implementation.aad.configuration.properties.AadProfileProperties; import org.springframework.beans.factory.ObjectProvider; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestParametersConverter.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestParametersConverter.java index 2efa9b2441fe..3b366b550c18 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestParametersConverter.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestParametersConverter.java @@ -20,7 +20,7 @@ * @see <a href="https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow">OAuth 2.0 On-Behalf-Of</a> */ public class AadJwtBearerGrantRequestParametersConverter - implements Converter<JwtBearerGrantRequest, MultiValueMap<String,String>> { + implements Converter<JwtBearerGrantRequest, MultiValueMap<String, String>> { @Override public MultiValueMap<String, String> convert(JwtBearerGrantRequest jwtBearerGrantRequest) { From 48df3f3e5e8914036b07cc4411b2a755b3f481e7 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Wed, 26 Nov 2025 15:57:49 +0800 Subject: [PATCH 051/186] fix replace ListenableFutureCallback --- eng/lintingconfigs/revapi/track2/revapi.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eng/lintingconfigs/revapi/track2/revapi.json b/eng/lintingconfigs/revapi/track2/revapi.json index 00a4f85ab9a5..ef3c51ce850f 100644 --- a/eng/lintingconfigs/revapi/track2/revapi.json +++ b/eng/lintingconfigs/revapi/track2/revapi.json @@ -340,6 +340,12 @@ "old" : "interface com.azure.spring.cloud.autoconfigure.jms.ServiceBusJmsConnectionFactoryCustomizer", "justification" : "Remove deprecated method" }, + { + "code" : "java.method.parameterTypeChanged", + "old" : "parameter void com.azure.spring.integration.core.handler.DefaultMessageHandler::setSendCallback(===org.springframework.util.concurrent.ListenableFutureCallback<java.lang.Void>===)", + "new" : "parameter void com.azure.spring.integration.core.handler.DefaultMessageHandler::setSendCallback(===java.util.function.BiConsumer<java.lang.Void, java.lang.Throwable>===)", + "name" : "Replace deprecated parameterType" + }, { "code": "java.method.numberOfParametersChanged", "old": { From 06ae83f6e749f345265dec7a8f9ce5ecc9ac06bd Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 26 Nov 2025 11:41:19 -0800 Subject: [PATCH 052/186] Sync eng/common directory with azure-sdk-tools repository (#47392) --- eng/common/pipelines/ai-evals-tests.yml | 97 +++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 eng/common/pipelines/ai-evals-tests.yml diff --git a/eng/common/pipelines/ai-evals-tests.yml b/eng/common/pipelines/ai-evals-tests.yml new file mode 100644 index 000000000000..170d47e86deb --- /dev/null +++ b/eng/common/pipelines/ai-evals-tests.yml @@ -0,0 +1,97 @@ +trigger: none + +pr: + branches: + include: + - main + paths: + include: + - .github/copilot-instructions.md + - eng/common/instructions/azsdk-tools/** + +parameters: + - name: EvalProject + type: string + default: 'tools/azsdk-cli/Azure.Sdk.Tools.Cli.Evaluations' + - name: OpenAIEndPoint + type: string + default: 'https://ai-prmarottai3149546654251245.openai.azure.com/' + - name: Model + type: string + default: 'gpt-5' + - name: ToolsRepoName + type: string + default: 'azure-sdk-tools' + - name: ToolsRepoOwner + type: string + default: 'Azure' + +jobs: + - job: Run_Eval + variables: + - template: /eng/pipelines/templates/variables/globals.yml + - template: /eng/pipelines/templates/variables/image.yml + displayName: 'Run AI Eval' + pool: + name: $(LINUXPOOL) + image: $(LINUXVMIMAGE) + os: linux + + steps: + - task: UseDotNet@2 + displayName: "Use .NET SDK 9.0.x" + retryCountOnTaskFailure: 3 + inputs: + packageType: sdk + version: 9.0.x + performMultiLevelLookup: true + + - task: UseDotNet@2 + displayName: "Use .NET SDK 8.0.x" + retryCountOnTaskFailure: 3 + inputs: + packageType: sdk + version: 8.0.x + performMultiLevelLookup: true + + - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml + parameters: + SkipCheckoutNone: true + Repositories: + - Name: $(Build.Repository.Name) + Commitish: $(Build.SourceVersion) + WorkingDirectory: $(System.DefaultWorkingDirectory)/$(Build.Repository.Name) + - Name: ${{ parameters.ToolsRepoOwner }}/${{ parameters.ToolsRepoName }} + WorkingDirectory: $(System.DefaultWorkingDirectory)/${{ parameters.ToolsRepoName }} + Paths: + - 'tools/**' + - eng/common/** + - .github/copilot-instructions.md + + - task: AzureCLI@2 + displayName: 'Run eval' + inputs: + azureSubscription: opensource-api-connection + scriptType: 'bash' + scriptLocation: 'inlineScript' + workingDirectory: '${{ parameters.ToolsRepoName }}/${{ parameters.EvalProject }}' + inlineScript: | + echo "Logged in to Azure" + echo "Running eval in project ${{ parameters.ToolsRepoName }}/${{ parameters.EvalProject }}" + dotnet test /p:ArtifactsPackagesDir=$(Build.ArtifactStagingDirectory) --logger trx + env: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_MULTILEVEL_LOOKUP: 0 + AZURE_OPENAI_MODEL_DEPLOYMENT_NAME: ${{ parameters.Model }} + AZURE_OPENAI_ENDPOINT: ${{ parameters.OpenAIEndPoint }} + REPOSITORY_NAME: $(Build.Repository.Name) + COPILOT_INSTRUCTIONS_PATH_MCP_EVALS: $(System.DefaultWorkingDirectory)/$(Build.Repository.Name)/.github/copilot-instructions.md + + - task: PublishTestResults@2 + condition: succeededOrFailed() + inputs: + testResultsFiles: '**/*.trx' + testRunTitle: $(System.JobDisplayName) + testResultsFormat: 'VSTest' + mergeTestResults: true \ No newline at end of file From 8690e5bb4fd6dcf580fcc01420a2e7904a57d266 Mon Sep 17 00:00:00 2001 From: Jair Myree <jairmyree@microsoft.com> Date: Wed, 26 Nov 2025 17:34:37 -0500 Subject: [PATCH 053/186] Prepare BOM 1.3.3 Release (#47396) --- sdk/boms/azure-sdk-bom/CHANGELOG.md | 6 ++++ sdk/boms/azure-sdk-bom/README.md | 2 +- sdk/boms/azure-sdk-bom/pom.xml | 48 ++++++++++++++--------------- 3 files changed, 31 insertions(+), 25 deletions(-) diff --git a/sdk/boms/azure-sdk-bom/CHANGELOG.md b/sdk/boms/azure-sdk-bom/CHANGELOG.md index 682d8b63c5aa..f4eec6077814 100644 --- a/sdk/boms/azure-sdk-bom/CHANGELOG.md +++ b/sdk/boms/azure-sdk-bom/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.3.3 (2025-11-26) + +### Dependency Updates + +- Updated Azure SDK dependency versions to the latest releases. + ## 1.3.2 (2025-11-04) ### Dependency Updates diff --git a/sdk/boms/azure-sdk-bom/README.md b/sdk/boms/azure-sdk-bom/README.md index 3b95713355e6..65a60da78f76 100644 --- a/sdk/boms/azure-sdk-bom/README.md +++ b/sdk/boms/azure-sdk-bom/README.md @@ -21,7 +21,7 @@ result in all dependencies being included in your project. <dependency> <groupId>com.azure</groupId> <artifactId>azure-sdk-bom</artifactId> - <version>1.3.2</version> + <version>1.3.3</version> <type>pom</type> <scope>import</scope> </dependency> diff --git a/sdk/boms/azure-sdk-bom/pom.xml b/sdk/boms/azure-sdk-bom/pom.xml index 7a686acb503f..7c0f9a8cda08 100644 --- a/sdk/boms/azure-sdk-bom/pom.xml +++ b/sdk/boms/azure-sdk-bom/pom.xml @@ -408,7 +408,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.56.0</version> + <version>2.57.0</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> @@ -418,112 +418,112 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-appservice</artifactId> - <version>2.53.5</version> + <version>2.54.1</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-authorization</artifactId> - <version>2.53.4</version> + <version>2.53.6</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-cdn</artifactId> - <version>2.53.4</version> + <version>2.53.5</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-compute</artifactId> - <version>2.54.1</version> + <version>2.55.1</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerinstance</artifactId> - <version>2.53.5</version> + <version>2.53.6</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerregistry</artifactId> - <version>2.53.4</version> + <version>2.54.1</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerservice</artifactId> - <version>2.55.1</version> + <version>2.56.1</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-cosmos</artifactId> - <version>2.53.4</version> + <version>2.54.0</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-dns</artifactId> - <version>2.53.4</version> + <version>2.53.5</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-eventhubs</artifactId> - <version>2.53.4</version> + <version>2.53.5</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-keyvault</artifactId> - <version>2.53.4</version> + <version>2.54.1</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-monitor</artifactId> - <version>2.53.4</version> + <version>2.53.5</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> + <version>2.53.5</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-network</artifactId> - <version>2.54.1</version> + <version>2.57.0</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-privatedns</artifactId> - <version>2.53.4</version> + <version>2.53.5</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-redis</artifactId> - <version>2.53.4</version> + <version>2.53.5</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-resources</artifactId> - <version>2.53.4</version> + <version>2.53.5</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-search</artifactId> - <version>2.54.3</version> + <version>2.54.4</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-servicebus</artifactId> - <version>2.53.4</version> + <version>2.53.5</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-sql</artifactId> - <version>2.53.4</version> + <version>2.53.5</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> + <version>2.55.2</version> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-trafficmanager</artifactId> - <version>2.53.4</version> + <version>2.53.5</version> </dependency> </dependencies> </dependencyManagement> @@ -587,4 +587,4 @@ </plugin> </plugins> </build> -</project> +</project> \ No newline at end of file From c0b85fd79385b2ad915cc77741fbae7017977bad Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Thu, 27 Nov 2025 13:54:33 +0800 Subject: [PATCH 054/186] fix spring integration ut --- .../core/handler/DefaultMessageHandlerTests.java | 8 +++++++- .../eventhubs/outbound/EventHubsMessageHandlerTests.java | 1 + .../outbound/ServiceBusMessageHandlerTests.java | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sdk/spring/spring-integration-azure-core/src/test/java/com/azure/spring/integration/core/handler/DefaultMessageHandlerTests.java b/sdk/spring/spring-integration-azure-core/src/test/java/com/azure/spring/integration/core/handler/DefaultMessageHandlerTests.java index b869c60578cc..015cf82c775b 100644 --- a/sdk/spring/spring-integration-azure-core/src/test/java/com/azure/spring/integration/core/handler/DefaultMessageHandlerTests.java +++ b/sdk/spring/spring-integration-azure-core/src/test/java/com/azure/spring/integration/core/handler/DefaultMessageHandlerTests.java @@ -11,7 +11,9 @@ import org.springframework.expression.Expression; import org.springframework.expression.ExpressionParser; import org.springframework.expression.spel.standard.SpelExpressionParser; +import org.springframework.expression.spel.support.StandardEvaluationContext; import org.springframework.integration.MessageTimeoutException; +import org.springframework.integration.context.IntegrationContextUtils; import org.springframework.integration.expression.FunctionExpression; import org.springframework.messaging.Message; import org.springframework.messaging.support.GenericMessage; @@ -60,7 +62,11 @@ public DefaultMessageHandlerTests() { valueMap.put("key2", "value2"); message = new GenericMessage<>("testPayload", valueMap); } - public abstract void setUp(); + public void setUp() { + StandardEvaluationContext sec = new StandardEvaluationContext(); + when(beanFactory.containsBean(IntegrationContextUtils.INTEGRATION_EVALUATION_CONTEXT_BEAN_NAME)).thenReturn(true); + when(beanFactory.getBean(IntegrationContextUtils.INTEGRATION_EVALUATION_CONTEXT_BEAN_NAME, StandardEvaluationContext.class)).thenReturn(sec); + } @Test @SuppressWarnings("unchecked") diff --git a/sdk/spring/spring-integration-azure-eventhubs/src/test/java/com/azure/spring/integration/eventhubs/outbound/EventHubsMessageHandlerTests.java b/sdk/spring/spring-integration-azure-eventhubs/src/test/java/com/azure/spring/integration/eventhubs/outbound/EventHubsMessageHandlerTests.java index 30602b66a56d..594b081d3c59 100644 --- a/sdk/spring/spring-integration-azure-eventhubs/src/test/java/com/azure/spring/integration/eventhubs/outbound/EventHubsMessageHandlerTests.java +++ b/sdk/spring/spring-integration-azure-eventhubs/src/test/java/com/azure/spring/integration/eventhubs/outbound/EventHubsMessageHandlerTests.java @@ -25,6 +25,7 @@ class EventHubsMessageHandlerTests extends DefaultMessageHandlerTests<EventHubsT @SuppressWarnings("unchecked") public void setUp() { this.closeable = MockitoAnnotations.openMocks(this); + super.setUp(); this.sendOperation = mock(EventHubsTemplate.class); when(this.sendOperation.sendAsync(eq(this.destination), isA(Message.class))).thenReturn(mono); when( diff --git a/sdk/spring/spring-integration-azure-servicebus/src/test/java/com/azure/spring/integration/servicebus/outbound/ServiceBusMessageHandlerTests.java b/sdk/spring/spring-integration-azure-servicebus/src/test/java/com/azure/spring/integration/servicebus/outbound/ServiceBusMessageHandlerTests.java index 817f8e200f3a..393a34d5a9cd 100644 --- a/sdk/spring/spring-integration-azure-servicebus/src/test/java/com/azure/spring/integration/servicebus/outbound/ServiceBusMessageHandlerTests.java +++ b/sdk/spring/spring-integration-azure-servicebus/src/test/java/com/azure/spring/integration/servicebus/outbound/ServiceBusMessageHandlerTests.java @@ -25,6 +25,7 @@ class ServiceBusMessageHandlerTests extends DefaultMessageHandlerTests<ServiceBu @SuppressWarnings("unchecked") public void setUp() { this.closeable = MockitoAnnotations.openMocks(this); + super.setUp(); this.sendOperation = mock(ServiceBusTemplate.class); when(this.sendOperation.sendAsync(eq(this.destination), isA(Message.class))).thenReturn(mono); when( From 4eb46456fa5ce774929e0d1fb57f53b1df3ee98f Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 26 Nov 2025 22:37:37 -0800 Subject: [PATCH 055/186] Increment package versions for servicefabricmanagedclusters releases (#47393) --- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 10 ++++++++++ .../pom.xml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 2e7f0daccd2e..47c9286e2a18 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -468,7 +468,7 @@ com.azure.resourcemanager:azure-resourcemanager-oracledatabase;1.2.0;1.3.0-beta. com.azure.resourcemanager:azure-resourcemanager-informaticadatamanagement;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-mongocluster;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-computefleet;1.0.0;1.1.0-beta.3 -com.azure.resourcemanager:azure-resourcemanager-servicefabricmanagedclusters;1.0.0;1.1.0-beta.3 +com.azure.resourcemanager:azure-resourcemanager-servicefabricmanagedclusters;1.0.0;1.1.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-healthdataaiservices;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-redhatopenshift;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-fabric;1.0.0;1.1.0-beta.1 diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/CHANGELOG.md b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/CHANGELOG.md index 6c778eafc2f5..ddc72c559541 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/CHANGELOG.md +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.1.0-beta.4 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.1.0-beta.3 (2025-11-10) - Azure Resource Manager Service Fabric Managed Clusters client library for Java. This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. Service Fabric Managed Clusters Management Client. Package api-version 2025-10-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/pom.xml b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/pom.xml index 90cf7b6b46cb..e5424c255fd5 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/pom.xml +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/pom.xml @@ -14,7 +14,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-servicefabricmanagedclusters</artifactId> - <version>1.1.0-beta.3</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-servicefabricmanagedclusters;current} --> + <version>1.1.0-beta.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-servicefabricmanagedclusters;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for Service Fabric Managed Clusters Management</name> From a4e92b4708cc442b2e58c09a5b72322e2430b45f Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Thu, 27 Nov 2025 16:34:50 +0800 Subject: [PATCH 056/186] fix spring integration ut --- .../EventHubsInboundChannelAdapterTests.java | 14 ++++++++++++++ .../ServiceBusInboundChannelAdapterTests.java | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/sdk/spring/spring-integration-azure-eventhubs/src/test/java/com/azure/spring/integration/eventhubs/inbound/EventHubsInboundChannelAdapterTests.java b/sdk/spring/spring-integration-azure-eventhubs/src/test/java/com/azure/spring/integration/eventhubs/inbound/EventHubsInboundChannelAdapterTests.java index ef6dcc33b0ea..6f991a5d5115 100644 --- a/sdk/spring/spring-integration-azure-eventhubs/src/test/java/com/azure/spring/integration/eventhubs/inbound/EventHubsInboundChannelAdapterTests.java +++ b/sdk/spring/spring-integration-azure-eventhubs/src/test/java/com/azure/spring/integration/eventhubs/inbound/EventHubsInboundChannelAdapterTests.java @@ -26,9 +26,13 @@ import com.azure.spring.messaging.eventhubs.implementation.core.listener.adapter.BatchMessagingMessageListenerAdapter; import com.azure.spring.messaging.eventhubs.implementation.support.converter.EventHubsBatchMessageConverter; import com.azure.spring.messaging.eventhubs.implementation.support.converter.EventHubsMessageConverter; +import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.springframework.beans.factory.BeanFactory; import org.springframework.integration.channel.DirectChannel; import reactor.core.publisher.Mono; @@ -55,12 +59,16 @@ class EventHubsInboundChannelAdapterTests { private EventHubsInboundChannelAdapter adapter; private EventHubsProcessorFactory processorFactory; private EventHubsContainerProperties containerProperties; + @Mock + private BeanFactory beanFactory; + private AutoCloseable closeable; private static final String CONSUMER_GROUP = "group"; private static final String EVENT_HUB = "dest"; @BeforeEach void setUp() { + this.closeable = MockitoAnnotations.openMocks(this); this.processorFactory = mock(EventHubsProcessorFactory.class); when(processorFactory.createProcessor(eq(EVENT_HUB), eq(CONSUMER_GROUP), isA(EventHubsContainerProperties.class))).thenReturn(mock(EventProcessorClient.class)); @@ -72,6 +80,11 @@ void setUp() { new EventHubsMessageListenerContainer(processorFactory, containerProperties)); } + @AfterEach + void close() throws Exception { + closeable.close(); + } + @Test void defaultRecordListenerMode() { EventHubsInboundChannelAdapter channelAdapter = new EventHubsInboundChannelAdapter( @@ -132,6 +145,7 @@ void setBatchMessageConverter() { @Test void setPayloadType() { + this.adapter.setBeanFactory(this.beanFactory); this.adapter.afterPropertiesSet(); assertThat(this.adapter).extracting("recordListener").extracting("payloadType").isEqualTo(byte[].class); this.adapter.setPayloadType(Long.class); diff --git a/sdk/spring/spring-integration-azure-servicebus/src/test/java/com/azure/spring/integration/servicebus/inbound/ServiceBusInboundChannelAdapterTests.java b/sdk/spring/spring-integration-azure-servicebus/src/test/java/com/azure/spring/integration/servicebus/inbound/ServiceBusInboundChannelAdapterTests.java index 2c2f9a31f3bf..bb72a17d3a18 100644 --- a/sdk/spring/spring-integration-azure-servicebus/src/test/java/com/azure/spring/integration/servicebus/inbound/ServiceBusInboundChannelAdapterTests.java +++ b/sdk/spring/spring-integration-azure-servicebus/src/test/java/com/azure/spring/integration/servicebus/inbound/ServiceBusInboundChannelAdapterTests.java @@ -21,9 +21,13 @@ import com.azure.spring.messaging.servicebus.core.listener.ServiceBusMessageListenerContainer; import com.azure.spring.messaging.servicebus.core.properties.ServiceBusContainerProperties; import com.azure.spring.messaging.servicebus.implementation.support.converter.ServiceBusMessageConverter; +import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.springframework.beans.factory.BeanFactory; import org.springframework.integration.channel.DirectChannel; import org.springframework.integration.support.MessageBuilder; import org.springframework.messaging.Message; @@ -57,9 +61,13 @@ class ServiceBusInboundChannelAdapterTests { private List<Message<?>> messages = Arrays.stream(payloads) .map(p -> MessageBuilder.withPayload(p).build()) .collect(Collectors.toList()); + @Mock + private BeanFactory beanFactory; + private AutoCloseable closeable; @BeforeEach public void setUp() { + this.closeable = MockitoAnnotations.openMocks(this); this.processorFactory = mock(ServiceBusProcessorFactory.class); when(processorFactory.createProcessor(eq(destination), eq(subscription), isA(ServiceBusContainerProperties.class))).thenReturn(mock(ServiceBusProcessorClient.class)); @@ -71,6 +79,11 @@ public void setUp() { new ServiceBusMessageListenerContainer(processorFactory, containerProperties)); } + @AfterEach + void close() throws Exception { + closeable.close(); + } + @Test void defaultRecordListenerMode() { ServiceBusInboundChannelAdapter channelAdapter = new ServiceBusInboundChannelAdapter( @@ -110,6 +123,7 @@ void setMessageConverter() { @Test void setPayloadType() { + this.adapter.setBeanFactory(this.beanFactory); this.adapter.afterPropertiesSet(); assertThat(this.adapter).extracting("recordListener").extracting("payloadType").isEqualTo(byte[].class); this.adapter.setPayloadType(Long.class); From 339c49ff76d399524abac18067cba721449a965a Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Thu, 27 Nov 2025 16:35:50 +0800 Subject: [PATCH 057/186] fix --- sdk/spring/azure-spring-data-cosmos/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/spring/azure-spring-data-cosmos/README.md b/sdk/spring/azure-spring-data-cosmos/README.md index 8bc3fb3856db..f18adc76a707 100644 --- a/sdk/spring/azure-spring-data-cosmos/README.md +++ b/sdk/spring/azure-spring-data-cosmos/README.md @@ -131,6 +131,7 @@ Set `pointOperationLatencyThresholdInMS`, `nonPointOperationLatencyThresholdInMS ```java readme-sample-AppConfiguration @Configuration @EnableCosmosRepositories +@SuppressWarnings("deprecation") public class AppConfiguration extends AbstractCosmosConfiguration { private static final Logger LOGGER = LoggerFactory.getLogger(AppConfiguration.class); From 8b622d663f97bfc49fc4b8cef239a99324976e99 Mon Sep 17 00:00:00 2001 From: Jair Myree <jairmyree@microsoft.com> Date: Thu, 27 Nov 2025 19:51:40 -0500 Subject: [PATCH 058/186] Prepare BOM 1.3.3 Release (#47397) --- sdk/boms/azure-sdk-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/boms/azure-sdk-bom/pom.xml b/sdk/boms/azure-sdk-bom/pom.xml index 7c0f9a8cda08..e611803cdaa9 100644 --- a/sdk/boms/azure-sdk-bom/pom.xml +++ b/sdk/boms/azure-sdk-bom/pom.xml @@ -2,7 +2,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>com.azure</groupId> <artifactId>azure-sdk-bom</artifactId> - <version>1.3.2</version> + <version>1.3.3</version> <packaging>pom</packaging> <name>Azure Java SDK BOM (Bill of Materials)</name> <description>Azure Java SDK BOM (Bill of Materials)</description> From 3daf3e4323aadb1d30377a25e233d9384ef8bb91 Mon Sep 17 00:00:00 2001 From: Haoling Dong <87355844+haolingdong-msft@users.noreply.github.com> Date: Fri, 28 Nov 2025 13:57:50 +0800 Subject: [PATCH 059/186] inner loop, update changelog script, add unit test (#47373) * update changelog, Add Unit test * rename file * rename the module file * add a pipeline * remove module, use helper functions instead * delete the ci file * Add realistic test cases for changelog automation - Test changelog updates when source code changes - Test idempotent behavior (multiple runs produce identical output) - Validate unreleased section is preserved after updates - Remove mocks to test actual file update behavior Resolves: https://github.com/Azure/azure-sdk-for-java/pull/47373#discussion_r2567707902 --- .../Automation-Sdk-UpdateChangelog.ps1 | 492 +-------------- eng/scripts/helpers/Changelog-Helpers.ps1 | 531 ++++++++++++++++ .../Automation-Sdk-UpdateChangelog.tests.ps1 | 579 ++++++++++++++++++ 3 files changed, 1117 insertions(+), 485 deletions(-) create mode 100644 eng/scripts/helpers/Changelog-Helpers.ps1 create mode 100644 eng/scripts/tests/Automation-Sdk-UpdateChangelog.tests.ps1 diff --git a/eng/scripts/Automation-Sdk-UpdateChangelog.ps1 b/eng/scripts/Automation-Sdk-UpdateChangelog.ps1 index b44d11383779..9cd1dea4fa6a 100644 --- a/eng/scripts/Automation-Sdk-UpdateChangelog.ps1 +++ b/eng/scripts/Automation-Sdk-UpdateChangelog.ps1 @@ -35,493 +35,14 @@ param( $ErrorActionPreference = "Stop" -# Import common scripts -. (Join-Path $PSScriptRoot .. common scripts common.ps1) +# Import common scripts for logging functions +$commonScriptPath = Join-Path $PSScriptRoot ".." "common" "scripts" "common.ps1" +. $commonScriptPath -# Function to parse Maven POM XML file and extract groupId and artifactId -function Get-MavenArtifactInfo { - <# - .SYNOPSIS - Extracts groupId and artifactId from a Maven POM file. - - .DESCRIPTION - Parses a Maven pom.xml file and extracts the groupId and artifactId. - If groupId is not present in the current project, it checks the parent POM. - - .PARAMETER PomPath - The absolute path to the pom.xml file. - - .OUTPUTS - Hashtable with GroupId and ArtifactId properties. - - .EXAMPLE - $artifactInfo = Get-MavenArtifactInfo -PomPath "C:\repos\project\pom.xml" - Write-Host "Group: $($artifactInfo.GroupId), Artifact: $($artifactInfo.ArtifactId)" - #> - param( - [Parameter(Mandatory = $true)] - [ValidateScript({Test-Path $_})] - [string]$PomPath - ) - - [xml]$pomXml = Get-Content $PomPath - $artifactId = $pomXml.project.artifactId - $groupId = $pomXml.project.groupId - - # If groupId is not in the current project, check parent - if ([string]::IsNullOrEmpty($groupId)) { - $groupId = $pomXml.project.parent.groupId - } - - if ([string]::IsNullOrEmpty($artifactId) -or [string]::IsNullOrEmpty($groupId)) { - throw "Could not extract groupId or artifactId from POM file" - } - - return @{ - GroupId = $groupId - ArtifactId = $artifactId - } -} - -# Function to get the latest released stable version from Maven Central -function Get-LatestReleasedStableVersion { - <# - .SYNOPSIS - Gets the latest released version from Maven Central. - - .DESCRIPTION - Retrieves version metadata from Maven Central and returns the latest stable version. - Prefers stable (non-beta) versions, but falls back to latest beta if no stable version exists. - - .PARAMETER GroupId - The Maven groupId (e.g., "com.azure.resourcemanager"). - - .PARAMETER ArtifactId - The Maven artifactId (e.g., "azure-resourcemanager-storage"). - - .OUTPUTS - String representing the latest version, or $null if no version is found. - - .EXAMPLE - $version = Get-LatestReleasedStableVersion -GroupId "com.azure" -ArtifactId "azure-core" - #> - param( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string]$GroupId, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string]$ArtifactId - ) - - $groupPath = $GroupId -replace '\.', '/' - $metadataUrl = "https://repo1.maven.org/maven2/$groupPath/$ArtifactId/maven-metadata.xml" - - try { - $response = Invoke-WebRequest -Uri $metadataUrl -MaximumRetryCount 3 -UseBasicParsing -ErrorAction Stop - [xml]$metadata = $response.Content - - # Get all versions and reverse to get latest first - $versions = $metadata.metadata.versioning.versions.version - if ($versions -is [string]) { - $versions = @($versions) - } - [array]::Reverse($versions) - - # Try to find the latest stable version (non-beta) - $latestStableVersion = $versions | Where-Object { $_ -notmatch "-beta" } | Select-Object -First 1 - - if ($latestStableVersion) { - LogDebug "Found latest stable version: $latestStableVersion" - return $latestStableVersion - } else { - # Fall back to the latest version (which might be beta) - $latestVersion = $metadata.metadata.versioning.latest - LogDebug "No stable version found, using latest version: $latestVersion" - return $latestVersion - } - } - catch { - LogWarning "Could not retrieve metadata from Maven Central. Package may not be released yet." - return $null - } -} - -# Function to download JAR file from Maven Central -function Get-MavenJar { - <# - .SYNOPSIS - Downloads a JAR file from Maven Central. - - .DESCRIPTION - Downloads a specific version of a Maven artifact JAR file from Maven Central repository. - - .PARAMETER GroupId - The Maven groupId. - - .PARAMETER ArtifactId - The Maven artifactId. - - .PARAMETER Version - The version to download. - - .PARAMETER OutputPath - The directory where the JAR file will be saved. - - .OUTPUTS - String representing the full path to the downloaded JAR file. - - .EXAMPLE - $jarPath = Get-MavenJar -GroupId "com.azure" -ArtifactId "azure-core" -Version "1.0.0" -OutputPath "C:\temp" - #> - param( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string]$GroupId, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string]$ArtifactId, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string]$Version, - - [Parameter(Mandatory = $true)] - [ValidateScript({Test-Path $_})] - [string]$OutputPath - ) - - $groupPath = $GroupId -replace '\.', '/' - $jarFileName = "$ArtifactId-$Version.jar" - $jarUrl = "https://repo1.maven.org/maven2/$groupPath/$ArtifactId/$Version/$jarFileName" - $jarPath = Join-Path $OutputPath $jarFileName - - LogInfo "Downloading JAR from: $jarUrl" - Invoke-WebRequest -Uri $jarUrl -OutFile $jarPath -UseBasicParsing - - return $jarPath -} - -# Function to find the built JAR file in the target directory -function Get-BuiltJarPath { - <# - .SYNOPSIS - Locates the built JAR file in the Maven target directory. - - .DESCRIPTION - Searches the Maven target directory for the main artifact JAR file, - excluding sources and javadoc JARs. - - .PARAMETER PackagePath - The root path of the Maven project. - - .PARAMETER ArtifactId - The Maven artifactId to search for. - - .OUTPUTS - String representing the full path to the built JAR file. - - .EXAMPLE - $jarPath = Get-BuiltJarPath -PackagePath "C:\repos\project" -ArtifactId "my-artifact" - #> - param( - [Parameter(Mandatory = $true)] - [ValidateScript({Test-Path $_})] - [string]$PackagePath, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string]$ArtifactId - ) - - $targetPath = Join-Path $PackagePath "target" - if (-not (Test-Path $targetPath)) { - throw "Target directory not found. Please build the package first." - } - - # Look for JAR files matching the artifact name (excluding sources and javadoc) - $jarFiles = Get-ChildItem -Path $targetPath -Filter "$ArtifactId-*.jar" | - Where-Object { $_.Name -notmatch "-sources\.jar$" -and $_.Name -notmatch "-javadoc\.jar$" } - - if ($jarFiles.Count -eq 0) { - throw "No JAR file found in target directory" - } - - # Return the first matching JAR (should be the main artifact) - return $jarFiles[0].FullName -} - -# Function to run the changelog generation tool -function Invoke-ChangelogGeneration { - <# - .SYNOPSIS - Runs the changelog generation tool to compare two JAR files. - - .DESCRIPTION - Executes the Maven-based changelog automation tool to compare an old JAR - with a new JAR and generate changelog content and breaking change information. - - .PARAMETER SdkRepoPath - The root path of the Azure SDK for Java repository. - - .PARAMETER OldJarPath - The path to the old (released) JAR file. - - .PARAMETER NewJarPath - The path to the new (current) JAR file. - - .OUTPUTS - PSCustomObject containing changelog and breakingChanges properties. - - .EXAMPLE - $result = Invoke-ChangelogGeneration -SdkRepoPath "C:\repos\azure-sdk-for-java" ` - -OldJarPath "C:\temp\old.jar" ` - -NewJarPath "C:\repos\project\target\new.jar" - #> - param( - [Parameter(Mandatory = $true)] - [ValidateScript({Test-Path $_})] - [string]$SdkRepoPath, - - [Parameter(Mandatory = $true)] - [ValidateScript({Test-Path $_})] - [string]$OldJarPath, - - [Parameter(Mandatory = $true)] - [ValidateScript({Test-Path $_})] - [string]$NewJarPath - ) - - $changelogPomPath = Join-Path $SdkRepoPath "eng" "automation" "changelog" "pom.xml" - - if (-not (Test-Path $changelogPomPath)) { - throw "Changelog tool POM not found at: $changelogPomPath" - } - - # Additional validation for JAR files - if ((Get-Item $OldJarPath).PSIsContainer) { - throw "Old JAR path is a directory, not a file: $OldJarPath" - } - if ((Get-Item $NewJarPath).PSIsContainer) { - throw "New JAR path is a directory, not a file: $NewJarPath" - } - - LogInfo "Running changelog generation tool..." - - # Try to find Maven in PATH - $mvnPath = Get-Command "mvn" -ErrorAction SilentlyContinue - if (-not $mvnPath) { - throw "Maven executable 'mvn' not found in PATH. Please ensure Maven is installed and available in your PATH." - } - - # Build Maven arguments - $mvnArgs = @( - "--no-transfer-progress" - "clean" - "package" - "exec:java" - "-q" - "-f" - $changelogPomPath - "-DOLD_JAR=$OldJarPath" - "-DNEW_JAR=$NewJarPath" - ) - - LogDebug "Executing Maven command: $($mvnPath.Source) $($mvnArgs -join ' ')" - - # Execute the Maven command and capture output - $pinfo = New-Object System.Diagnostics.ProcessStartInfo - $pinfo.FileName = $mvnPath.Source - $pinfo.RedirectStandardError = $true - $pinfo.RedirectStandardOutput = $true - $pinfo.UseShellExecute = $false - $pinfo.Arguments = $mvnArgs -join " " - - $process = New-Object System.Diagnostics.Process - $process.StartInfo = $pinfo - $process.Start() | Out-Null - - $stdout = $process.StandardOutput.ReadToEnd() - $stderr = $process.StandardError.ReadToEnd() - $process.WaitForExit() - $exitCode = $process.ExitCode - - if ($exitCode -ne 0) { - LogError "Changelog generation failed with exit code $exitCode" - LogError "Standard Output:" - LogError $stdout - LogError "Error Output:" - LogError $stderr - throw "Changelog generation failed" - } - - # Parse the JSON output - try { - $changelogJson = $stdout | ConvertFrom-Json - return $changelogJson - } - catch { - LogError "Failed to parse changelog JSON output" - LogError "Output: $stdout" - throw - } -} - -# Function to generate structured changelog content from raw changelog text -function New-ChangelogContent { - <# - .SYNOPSIS - Parses raw changelog text into structured content with sections. - - .DESCRIPTION - Takes raw changelog text and parses it into structured arrays containing - ReleaseContent (all lines) and Sections (organized by section headers). - This function only generates content structure without modifying any files. - - .PARAMETER NewChangelogText - The new changelog text containing sections (e.g., "### Breaking Changes", "### Features Added"). - - .PARAMETER InitialAtxHeader - The markdown header level used in the changelog (e.g., "#" for H1, "##" for H2). - - .OUTPUTS - PSCustomObject with ReleaseContent and Sections properties. - - .EXAMPLE - $content = New-ChangelogContent -NewChangelogText $changelogText -InitialAtxHeader "#" - #> - param( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string]$NewChangelogText, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string]$InitialAtxHeader - ) - - Write-Verbose "Parsing changelog text into structured content..." - - # Parse the new changelog content into lines - $newChangelogLines = $NewChangelogText -split "`r?`n" - - # Initialize content structure - $releaseContent = @() - $sections = @{} - - # Add an empty line after the version header - $releaseContent += "" - - # Parse the new changelog content - # InitialAtxHeader represents the markdown header level (e.g., "#" for H1, "##" for H2) - # Section headers are one level deeper (e.g., "##" if InitialAtxHeader is "#") - $currentSection = $null - $sectionHeaderRegex = "^$($InitialAtxHeader)##\s+(?<sectionName>.*)" - - foreach ($line in $newChangelogLines) { - if ($line -match $sectionHeaderRegex) { - $currentSection = $matches["sectionName"].Trim() - $sections[$currentSection] = @() - $releaseContent += $line - LogDebug " Found section: $currentSection" - } - elseif ($currentSection) { - $sections[$currentSection] += $line - $releaseContent += $line - } - else { - $releaseContent += $line - } - } - - LogDebug " Parsed $($sections.Count) section(s)" - - # Return structured content - return [PSCustomObject]@{ - ReleaseContent = $releaseContent - Sections = $sections - } -} - -# Function to update the CHANGELOG.md file using engsys common scripts -function Update-ChangelogFile { - <# - .SYNOPSIS - Updates the CHANGELOG.md file with new changelog content. - - .DESCRIPTION - Reads the CHANGELOG.md file, finds the first unreleased version entry, - updates it with the new changelog content, and writes the changes back. - - .PARAMETER ChangelogPath - The path to the CHANGELOG.md file. - - .PARAMETER NewChangelogText - The new changelog text to add to the unreleased version. - - .EXAMPLE - Update-ChangelogFile -ChangelogPath "C:\repos\project\CHANGELOG.md" -NewChangelogText $changelogText - #> - param( - [Parameter(Mandatory = $true)] - [ValidateScript({Test-Path $_})] - [string]$ChangelogPath, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string]$NewChangelogText - ) - - Write-Verbose "New Changelog Text:" - Write-Verbose $NewChangelogText - - # Get all changelog entries using the common script - $changeLogEntries = Get-ChangeLogEntries -ChangeLogLocation $ChangelogPath - - if (-not $changeLogEntries -or $changeLogEntries.Count -eq 0) { - throw "Failed to parse CHANGELOG.md at: $ChangelogPath" - } - - # Find the first unreleased version entry - $firstEntry = $null - foreach ($key in $changeLogEntries.Keys) { - $entry = $changeLogEntries[$key] - if ($entry.ReleaseStatus -eq $CHANGELOG_UNRELEASED_STATUS) { - $firstEntry = $entry - break - } - } - - if (-not $firstEntry) { - LogWarning "No unreleased version found in CHANGELOG.md. Looking for the first version entry..." - # If no unreleased version, use the first entry - $sortedEntries = Sort-ChangeLogEntries -changeLogEntries $changeLogEntries - $firstEntry = $sortedEntries[0] - } - - if (-not $firstEntry) { - throw "Could not find any version entry in CHANGELOG.md to update" - } - - LogInfo "Updating changelog entry for version: $($firstEntry.ReleaseVersion) $($firstEntry.ReleaseStatus)" - - # Generate structured changelog content - $changelogContent = New-ChangelogContent -NewChangelogText $NewChangelogText ` - -InitialAtxHeader $changeLogEntries.InitialAtxHeader - - # Update the entry with generated content - $firstEntry.ReleaseContent = $changelogContent.ReleaseContent - $firstEntry.Sections = $changelogContent.Sections - - # Write the updated changelog back using the common script - LogInfo "Writing updated CHANGELOG.md to: $ChangelogPath" - Set-ChangeLogContent -ChangeLogLocation $ChangelogPath -ChangeLogEntries $changeLogEntries - LogInfo "CHANGELOG.md successfully updated" -} +# Import changelog helper functions +$helperPath = Join-Path $PSScriptRoot "helpers" "Changelog-Helpers.ps1" +. $helperPath -# Main script execution try { LogInfo "========================================" LogInfo "Azure SDK Changelog Update Tool" @@ -589,6 +110,7 @@ try { LogInfo "Step 6: Updating CHANGELOG.md..." $changelogPath = Join-Path $PackagePath "CHANGELOG.md" Update-ChangelogFile -ChangelogPath $changelogPath -NewChangelogText $changelogResult.changelog + LogInfo $changelogResult.changelog LogInfo " CHANGELOG.md updated" LogInfo "" diff --git a/eng/scripts/helpers/Changelog-Helpers.ps1 b/eng/scripts/helpers/Changelog-Helpers.ps1 new file mode 100644 index 000000000000..37d591927642 --- /dev/null +++ b/eng/scripts/helpers/Changelog-Helpers.ps1 @@ -0,0 +1,531 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +<# +.SYNOPSIS + Helper functions for changelog automation. + +.DESCRIPTION + This file provides helper functions for automating changelog updates by comparing + JAR files and updating CHANGELOG.md files. +#> + +function Get-MavenArtifactInfo { + <# + .SYNOPSIS + Extracts groupId and artifactId from a Maven POM file. + + .DESCRIPTION + Parses a Maven pom.xml file and extracts the groupId and artifactId. + If groupId is not present in the current project, it checks the parent POM. + + .PARAMETER PomPath + The absolute path to the pom.xml file. + + .OUTPUTS + Hashtable with GroupId and ArtifactId properties. + + .EXAMPLE + $artifactInfo = Get-MavenArtifactInfo -PomPath "C:\repos\project\pom.xml" + Write-Host "Group: $($artifactInfo.GroupId), Artifact: $($artifactInfo.ArtifactId)" + #> + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [ValidateScript({Test-Path $_})] + [string]$PomPath + ) + + [xml]$pomXml = Get-Content $PomPath + $artifactId = $pomXml.project.artifactId + $groupId = $pomXml.project.groupId + + # If groupId is not in the current project, check parent + if ([string]::IsNullOrEmpty($groupId)) { + $groupId = $pomXml.project.parent.groupId + } + + if ([string]::IsNullOrEmpty($artifactId) -or [string]::IsNullOrEmpty($groupId)) { + throw "Could not extract groupId or artifactId from POM file" + } + + return @{ + GroupId = $groupId + ArtifactId = $artifactId + } +} + +function Get-LatestReleasedStableVersion { + <# + .SYNOPSIS + Gets the latest released version from Maven Central. + + .DESCRIPTION + Retrieves version metadata from Maven Central and returns the latest stable version. + Prefers stable (non-beta) versions, but falls back to latest beta if no stable version exists. + + .PARAMETER GroupId + The Maven groupId (e.g., "com.azure.resourcemanager"). + + .PARAMETER ArtifactId + The Maven artifactId (e.g., "azure-resourcemanager-storage"). + + .OUTPUTS + String representing the latest version, or $null if no version is found. + + .EXAMPLE + $version = Get-LatestReleasedStableVersion -GroupId "com.azure" -ArtifactId "azure-core" + #> + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string]$GroupId, + + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string]$ArtifactId + ) + + $groupPath = $GroupId -replace '\.', '/' + $metadataUrl = "https://repo1.maven.org/maven2/$groupPath/$ArtifactId/maven-metadata.xml" + + try { + $response = Invoke-WebRequest -Uri $metadataUrl -MaximumRetryCount 3 -UseBasicParsing -ErrorAction Stop + [xml]$metadata = $response.Content + + # Get all versions and reverse to get latest first + $versions = $metadata.metadata.versioning.versions.version + if ($versions -is [string]) { + $versions = @($versions) + } + [array]::Reverse($versions) + + # Try to find the latest stable version (non-beta) + $latestStableVersion = $versions | Where-Object { $_ -notmatch "-beta" } | Select-Object -First 1 + + if ($latestStableVersion) { + if (Get-Command LogDebug -ErrorAction SilentlyContinue) { + LogDebug "Found latest stable version: $latestStableVersion" + } + return $latestStableVersion + } else { + # Fall back to the latest version (which might be beta) + $latestVersion = $metadata.metadata.versioning.latest + if (Get-Command LogDebug -ErrorAction SilentlyContinue) { + LogDebug "No stable version found, using latest version: $latestVersion" + } + return $latestVersion + } + } + catch { + if (Get-Command LogWarning -ErrorAction SilentlyContinue) { + LogWarning "Could not retrieve metadata from Maven Central. Package may not be released yet." + } + return $null + } +} + +function Get-MavenJar { + <# + .SYNOPSIS + Downloads a JAR file from Maven Central. + + .DESCRIPTION + Downloads a specific version of a Maven artifact JAR file from Maven Central repository. + + .PARAMETER GroupId + The Maven groupId. + + .PARAMETER ArtifactId + The Maven artifactId. + + .PARAMETER Version + The version to download. + + .PARAMETER OutputPath + The directory where the JAR file will be saved. + + .OUTPUTS + String representing the full path to the downloaded JAR file. + + .EXAMPLE + $jarPath = Get-MavenJar -GroupId "com.azure" -ArtifactId "azure-core" -Version "1.0.0" -OutputPath "C:\temp" + #> + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string]$GroupId, + + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string]$ArtifactId, + + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string]$Version, + + [Parameter(Mandatory = $true)] + [ValidateScript({Test-Path $_})] + [string]$OutputPath + ) + + $groupPath = $GroupId -replace '\.', '/' + $jarFileName = "$ArtifactId-$Version.jar" + $jarUrl = "https://repo1.maven.org/maven2/$groupPath/$ArtifactId/$Version/$jarFileName" + $jarPath = Join-Path $OutputPath $jarFileName + + if (Get-Command LogInfo -ErrorAction SilentlyContinue) { + LogInfo "Downloading JAR from: $jarUrl" + } + Invoke-WebRequest -Uri $jarUrl -OutFile $jarPath -UseBasicParsing + + return $jarPath +} + +function Get-BuiltJarPath { + <# + .SYNOPSIS + Locates the built JAR file in the Maven target directory. + + .DESCRIPTION + Searches the Maven target directory for the main artifact JAR file, + excluding sources and javadoc JARs. + + .PARAMETER PackagePath + The root path of the Maven project. + + .PARAMETER ArtifactId + The Maven artifactId to search for. + + .OUTPUTS + String representing the full path to the built JAR file. + + .EXAMPLE + $jarPath = Get-BuiltJarPath -PackagePath "C:\repos\project" -ArtifactId "my-artifact" + #> + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [ValidateScript({Test-Path $_})] + [string]$PackagePath, + + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string]$ArtifactId + ) + + $targetPath = Join-Path $PackagePath "target" + if (-not (Test-Path $targetPath)) { + throw "Target directory not found. Please build the package first." + } + + # Look for JAR files matching the artifact name (excluding sources and javadoc) + $jarFiles = Get-ChildItem -Path $targetPath -Filter "$ArtifactId-*.jar" | + Where-Object { $_.Name -notmatch "-sources\.jar$" -and $_.Name -notmatch "-javadoc\.jar$" } + + if ($jarFiles.Count -eq 0) { + throw "No JAR file found in target directory" + } + + # Return the first matching JAR (should be the main artifact) + $selectedJar = $jarFiles[0].FullName + + # Validate the JAR file is not empty + $jarFileInfo = Get-Item $selectedJar + if ($jarFileInfo.Length -eq 0) { + throw "JAR file is empty: $selectedJar" + } + + return $selectedJar +} + +function Invoke-ChangelogGeneration { + <# + .SYNOPSIS + Runs the changelog generation tool to compare two JAR files. + + .DESCRIPTION + Executes the Maven-based changelog automation tool to compare an old JAR + with a new JAR and generate changelog content and breaking change information. + + .PARAMETER SdkRepoPath + The root path of the Azure SDK for Java repository. + + .PARAMETER OldJarPath + The path to the old (released) JAR file. + + .PARAMETER NewJarPath + The path to the new (current) JAR file. + + .OUTPUTS + PSCustomObject containing changelog and breakingChanges properties. + + .EXAMPLE + $result = Invoke-ChangelogGeneration -SdkRepoPath "C:\repos\azure-sdk-for-java" ` + -OldJarPath "C:\temp\old.jar" ` + -NewJarPath "C:\repos\project\target\new.jar" + #> + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [ValidateScript({Test-Path $_})] + [string]$SdkRepoPath, + + [Parameter(Mandatory = $true)] + [ValidateScript({Test-Path $_})] + [string]$OldJarPath, + + [Parameter(Mandatory = $true)] + [ValidateScript({Test-Path $_})] + [string]$NewJarPath + ) + + $changelogPomPath = Join-Path $SdkRepoPath "eng" "automation" "changelog" "pom.xml" + + if (-not (Test-Path $changelogPomPath)) { + throw "Changelog tool POM not found at: $changelogPomPath" + } + + # Additional validation for JAR files + if ((Get-Item $OldJarPath).PSIsContainer) { + throw "Old JAR path is a directory, not a file: $OldJarPath" + } + if ((Get-Item $NewJarPath).PSIsContainer) { + throw "New JAR path is a directory, not a file: $NewJarPath" + } + + if (Get-Command LogInfo -ErrorAction SilentlyContinue) { + LogInfo "Running changelog generation tool..." + } + + # Try to find Maven in PATH + $mvnPath = Get-Command "mvn" -ErrorAction SilentlyContinue + if (-not $mvnPath) { + throw "Maven executable 'mvn' not found in PATH. Please ensure Maven is installed and available in your PATH." + } + + # Build Maven arguments + $mvnArgs = @( + "--no-transfer-progress" + "clean" + "package" + "exec:java" + "-q" + "-f" + $changelogPomPath + "-DOLD_JAR=$OldJarPath" + "-DNEW_JAR=$NewJarPath" + ) + + if (Get-Command LogDebug -ErrorAction SilentlyContinue) { + LogDebug "Executing Maven command: $($mvnPath.Source) $($mvnArgs -join ' ')" + } + + # Execute the Maven command and capture output + $pinfo = New-Object System.Diagnostics.ProcessStartInfo + $pinfo.FileName = $mvnPath.Source + $pinfo.RedirectStandardError = $true + $pinfo.RedirectStandardOutput = $true + $pinfo.UseShellExecute = $false + $pinfo.Arguments = $mvnArgs -join " " + + $process = New-Object System.Diagnostics.Process + $process.StartInfo = $pinfo + $process.Start() | Out-Null + + $stdout = $process.StandardOutput.ReadToEnd() + $stderr = $process.StandardError.ReadToEnd() + $process.WaitForExit() + $exitCode = $process.ExitCode + + if ($exitCode -ne 0) { + if (Get-Command LogError -ErrorAction SilentlyContinue) { + LogError "Changelog generation failed with exit code $exitCode" + LogError "Standard Output:" + LogError $stdout + LogError "Error Output:" + LogError $stderr + } + throw "Changelog generation failed" + } + + # Parse the JSON output + try { + $changelogJson = $stdout | ConvertFrom-Json + return $changelogJson + } + catch { + if (Get-Command LogError -ErrorAction SilentlyContinue) { + LogError "Failed to parse changelog JSON output" + LogError "Output: $stdout" + } + throw + } +} + +function New-ChangelogContent { + <# + .SYNOPSIS + Parses raw changelog text into structured content with sections. + + .DESCRIPTION + Takes raw changelog text and parses it into structured arrays containing + ReleaseContent (all lines) and Sections (organized by section headers). + This function only generates content structure without modifying any files. + + .PARAMETER NewChangelogText + The new changelog text containing sections (e.g., "### Breaking Changes", "### Features Added"). + + .PARAMETER InitialAtxHeader + The markdown header level used in the changelog (e.g., "#" for H1, "##" for H2). + + .OUTPUTS + PSCustomObject with ReleaseContent and Sections properties. + + .EXAMPLE + $content = New-ChangelogContent -NewChangelogText $changelogText -InitialAtxHeader "#" + #> + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string]$NewChangelogText, + + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string]$InitialAtxHeader + ) + + Write-Verbose "Parsing changelog text into structured content..." + + # Parse the new changelog content into lines + $newChangelogLines = $NewChangelogText -split "`r?`n" + + # Initialize content structure + $releaseContent = @() + $sections = @{} + + # Add an empty line after the version header + $releaseContent += "" + + # Parse the new changelog content + # InitialAtxHeader represents the markdown header level (e.g., "#" for H1, "##" for H2) + # Section headers are one level deeper (e.g., "##" if InitialAtxHeader is "#") + $currentSection = $null + $sectionHeaderRegex = "^$($InitialAtxHeader)##\s+(?<sectionName>.*)" + + foreach ($line in $newChangelogLines) { + if ($line -match $sectionHeaderRegex) { + $currentSection = $matches["sectionName"].Trim() + $sections[$currentSection] = @() + $releaseContent += $line + if (Get-Command LogDebug -ErrorAction SilentlyContinue) { + LogDebug " Found section: $currentSection" + } + } + elseif ($currentSection) { + $sections[$currentSection] += $line + $releaseContent += $line + } + else { + $releaseContent += $line + } + } + + if (Get-Command LogDebug -ErrorAction SilentlyContinue) { + LogDebug " Parsed $($sections.Count) section(s)" + } + + # Return structured content + return [PSCustomObject]@{ + ReleaseContent = $releaseContent + Sections = $sections + } +} + +function Update-ChangelogFile { + <# + .SYNOPSIS + Updates the CHANGELOG.md file with new changelog content. + + .DESCRIPTION + Reads the CHANGELOG.md file, finds the first unreleased version entry, + updates it with the new changelog content, and writes the changes back. + + .PARAMETER ChangelogPath + The path to the CHANGELOG.md file. + + .PARAMETER NewChangelogText + The new changelog text to add to the unreleased version. + + .EXAMPLE + Update-ChangelogFile -ChangelogPath "C:\repos\project\CHANGELOG.md" -NewChangelogText $changelogText + #> + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [ValidateScript({Test-Path $_})] + [string]$ChangelogPath, + + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string]$NewChangelogText + ) + + Write-Verbose "New Changelog Text:" + Write-Verbose $NewChangelogText + + # Get all changelog entries using the common script + $changeLogEntries = Get-ChangeLogEntries -ChangeLogLocation $ChangelogPath + + if (-not $changeLogEntries -or $changeLogEntries.Count -eq 0) { + throw "Failed to parse CHANGELOG.md at: $ChangelogPath" + } + + # Find the first unreleased version entry + # Note: $CHANGELOG_UNRELEASED_STATUS is defined in common.ps1 (typically "Unreleased") + $firstEntry = $null + foreach ($key in $changeLogEntries.Keys) { + $entry = $changeLogEntries[$key] + if ($entry.ReleaseStatus -eq $CHANGELOG_UNRELEASED_STATUS) { + $firstEntry = $entry + break + } + } + + if (-not $firstEntry) { + if (Get-Command LogWarning -ErrorAction SilentlyContinue) { + LogWarning "No unreleased version found in CHANGELOG.md. Looking for the first version entry..." + } + # If no unreleased version, use the first entry + $sortedEntries = Sort-ChangeLogEntries -changeLogEntries $changeLogEntries + $firstEntry = $sortedEntries[0] + } + + if (-not $firstEntry) { + throw "Could not find any version entry in CHANGELOG.md to update" + } + + if (Get-Command LogInfo -ErrorAction SilentlyContinue) { + LogInfo "Updating changelog entry for version: $($firstEntry.ReleaseVersion) $($firstEntry.ReleaseStatus)" + } + + # Generate structured changelog content + $changelogContent = New-ChangelogContent -NewChangelogText $NewChangelogText ` + -InitialAtxHeader $changeLogEntries.InitialAtxHeader + + # Update the entry with generated content + $firstEntry.ReleaseContent = $changelogContent.ReleaseContent + $firstEntry.Sections = $changelogContent.Sections + + # Write the updated changelog back using the common script + if (Get-Command LogInfo -ErrorAction SilentlyContinue) { + LogInfo "Writing updated CHANGELOG.md to: $ChangelogPath" + } + Set-ChangeLogContent -ChangeLogLocation $ChangelogPath -ChangeLogEntries $changeLogEntries + if (Get-Command LogInfo -ErrorAction SilentlyContinue) { + LogInfo "CHANGELOG.md successfully updated" + } +} diff --git a/eng/scripts/tests/Automation-Sdk-UpdateChangelog.tests.ps1 b/eng/scripts/tests/Automation-Sdk-UpdateChangelog.tests.ps1 new file mode 100644 index 000000000000..bf19c8ead498 --- /dev/null +++ b/eng/scripts/tests/Automation-Sdk-UpdateChangelog.tests.ps1 @@ -0,0 +1,579 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +<# +.SYNOPSIS + Pester tests for Automation-Sdk-UpdateChangelog.ps1 + +.DESCRIPTION + This file contains unit tests for the changelog automation functions + using the Pester testing framework. + +.NOTES + How to run: + 1. Install Pester if not already installed: + Install-Module Pester -Force -MinimumVersion 5.3.3 + + 2. Run the tests: + Invoke-Pester ./Automation-Sdk-UpdateChangelog.tests.ps1 +#> + +BeforeAll { + # Import common scripts first to get the changelog functions + $commonScriptPath = Join-Path $PSScriptRoot ".." ".." "common" "scripts" "common.ps1" + if (Test-Path $commonScriptPath) { + . $commonScriptPath + } + + # Import changelog helper functions + $helperPath = Join-Path $PSScriptRoot ".." "helpers" "Changelog-Helpers.ps1" + . $helperPath + + # Create a test directory structure + $script:TestRoot = Join-Path ([System.IO.Path]::GetTempPath()) "ChangelogAutomationTests_$(New-Guid)" + New-Item -ItemType Directory -Path $script:TestRoot -Force | Out-Null + + # Mock data based on the actual CHANGELOG.md + $script:SampleChangelogText = @" +### Breaking Changes + +#### ``models.PrivateEndpointConnection`` was modified + +* ``validate()`` was removed + +#### ``models.DeidUpdate`` was modified + +* ``validate()`` was removed + +#### ``HealthDataAIServicesManager`` was modified + +* ``fluent.HealthDataAIServicesClient serviceClient()`` -> ``fluent.HealthDataAIServicesManagementClient serviceClient()`` +"@ + + $script:SamplePomXml = @" +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>com.azure.resourcemanager</groupId> + <artifactId>azure-resourcemanager-healthdataaiservices</artifactId> + <version>1.1.0-beta.1</version> +</project> +"@ + + $script:SampleMavenMetadata = @" +<?xml version="1.0" encoding="UTF-8"?> +<metadata> + <groupId>com.azure.resourcemanager</groupId> + <artifactId>azure-resourcemanager-healthdataaiservices</artifactId> + <versioning> + <latest>1.1.0-beta.1</latest> + <release>1.0.0</release> + <versions> + <version>1.0.0-beta.1</version> + <version>1.0.0</version> + <version>1.1.0-beta.1</version> + </versions> + </versioning> +</metadata> +"@ + + $script:SampleMavenMetadataOnlyBeta = @" +<?xml version="1.0" encoding="UTF-8"?> +<metadata> + <groupId>com.azure.resourcemanager</groupId> + <artifactId>azure-resourcemanager-newservice</artifactId> + <versioning> + <latest>1.0.0-beta.2</latest> + <versions> + <version>1.0.0-beta.1</version> + <version>1.0.0-beta.2</version> + </versions> + </versioning> +</metadata> +"@ + + $script:SampleChangelog = @" +# Release History + +## 1.1.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0 (2024-11-21) + +- Azure Resource Manager Health Data AI Services client library for Java. + +### Features Added + +- The first stable release for the azure-resourcemanager-healthdataaiservices Java SDK. +"@ +} + +AfterAll { + # Clean up test directory + if (Test-Path $script:TestRoot) { + Remove-Item -Path $script:TestRoot -Recurse -Force -ErrorAction SilentlyContinue + } + + # Clean up global functions + Remove-Item Function:\LogInfo -ErrorAction SilentlyContinue + Remove-Item Function:\LogWarning -ErrorAction SilentlyContinue + Remove-Item Function:\LogError -ErrorAction SilentlyContinue + Remove-Item Function:\LogDebug -ErrorAction SilentlyContinue + Remove-Variable -Name CHANGELOG_UNRELEASED_STATUS -Scope Global -ErrorAction SilentlyContinue +} + +Describe "Get-MavenArtifactInfo" { + BeforeEach { + $script:TestPomPath = Join-Path $script:TestRoot "pom.xml" + } + + AfterEach { + if (Test-Path $script:TestPomPath) { + Remove-Item $script:TestPomPath -Force + } + } + + It "Should extract groupId and artifactId from a simple POM" { + Set-Content -Path $script:TestPomPath -Value $script:SamplePomXml + + $result = Get-MavenArtifactInfo -PomPath $script:TestPomPath + + $result.GroupId | Should -Be "com.azure.resourcemanager" + $result.ArtifactId | Should -Be "azure-resourcemanager-healthdataaiservices" + } + + It "Should throw when POM file does not exist" { + $nonExistentPath = Join-Path $script:TestRoot "nonexistent.xml" + + { Get-MavenArtifactInfo -PomPath $nonExistentPath } | Should -Throw + } + + It "Should throw when groupId and artifactId are missing" { + $invalidPom = @" +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0"> + <modelVersion>4.0.0</modelVersion> +</project> +"@ + Set-Content -Path $script:TestPomPath -Value $invalidPom + + { Get-MavenArtifactInfo -PomPath $script:TestPomPath } | Should -Throw "*Could not extract groupId or artifactId*" + } + + It "Should extract groupId from parent POM when not in current project" { + $pomWithParent = @" +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>com.azure.parent</groupId> + <artifactId>azure-parent</artifactId> + <version>1.0.0</version> + </parent> + <artifactId>azure-child</artifactId> +</project> +"@ + Set-Content -Path $script:TestPomPath -Value $pomWithParent + + $result = Get-MavenArtifactInfo -PomPath $script:TestPomPath + + $result.GroupId | Should -Be "com.azure.parent" + $result.ArtifactId | Should -Be "azure-child" + } +} + +Describe "Get-LatestReleasedStableVersion" { + # Note: These tests make actual HTTP calls to Maven Central as mocking Invoke-WebRequest + # doesn't work reliably with dot-sourced functions + + It "Should return null when package does not exist on Maven Central" { + $result = Get-LatestReleasedStableVersion -GroupId "com.azure.nonexistent" -ArtifactId "azure-nonexistent-package" + + $result | Should -Be $null + } +} + +Describe "Get-BuiltJarPath" { + BeforeEach { + $script:TestPackagePath = Join-Path $script:TestRoot "package" + $script:TestTargetPath = Join-Path $script:TestPackagePath "target" + New-Item -ItemType Directory -Path $script:TestTargetPath -Force | Out-Null + } + + AfterEach { + if (Test-Path $script:TestPackagePath) { + Remove-Item -Path $script:TestPackagePath -Recurse -Force + } + } + + It "Should throw when target directory does not exist" { + Remove-Item -Path $script:TestTargetPath -Recurse -Force + + { Get-BuiltJarPath -PackagePath $script:TestPackagePath -ArtifactId "azure-core" } | Should -Throw "*Target directory not found*" + } + + It "Should throw when no JAR file is found" { + { Get-BuiltJarPath -PackagePath $script:TestPackagePath -ArtifactId "azure-core" } | Should -Throw "*No JAR file found*" + } + + It "Should throw when JAR file is empty" { + $emptyJar = Join-Path $script:TestTargetPath "azure-core-1.0.0.jar" + New-Item -ItemType File -Path $emptyJar -Force | Out-Null + + { Get-BuiltJarPath -PackagePath $script:TestPackagePath -ArtifactId "azure-core" } | Should -Throw "*JAR file is empty*" + } +} + +Describe "New-ChangelogContent" { + It "Should parse changelog text into structured content" { + $result = New-ChangelogContent -NewChangelogText $script:SampleChangelogText -InitialAtxHeader "#" + + $result.ReleaseContent | Should -Not -BeNullOrEmpty + $result.Sections | Should -Not -BeNullOrEmpty + $result.Sections.Count | Should -BeGreaterThan 0 + } + + It "Should identify Breaking Changes section" { + $result = New-ChangelogContent -NewChangelogText $script:SampleChangelogText -InitialAtxHeader "#" + + $result.Sections.Keys | Should -Contain "Breaking Changes" + $result.Sections["Breaking Changes"] | Should -Not -BeNullOrEmpty + } + + It "Should handle multiple sections" { + $multiSectionText = @" +### Breaking Changes + +* validate() was removed + +### Features Added + +* New feature X added +* New feature Y added + +### Bugs Fixed + +* Fixed bug Z +"@ + + $result = New-ChangelogContent -NewChangelogText $multiSectionText -InitialAtxHeader "#" + + $result.Sections.Keys | Should -Contain "Breaking Changes" + $result.Sections.Keys | Should -Contain "Features Added" + $result.Sections.Keys | Should -Contain "Bugs Fixed" + $result.Sections.Count | Should -Be 3 + } + + It "Should include empty line after version header" { + $result = New-ChangelogContent -NewChangelogText $script:SampleChangelogText -InitialAtxHeader "#" + + $result.ReleaseContent[0] | Should -Be "" + } + + It "Should preserve line content within sections" { + $result = New-ChangelogContent -NewChangelogText $script:SampleChangelogText -InitialAtxHeader "#" + + $breakingChangesContent = $result.Sections["Breaking Changes"] -join "`n" + $breakingChangesContent | Should -Match "validate" + } +} + +Describe "Update-ChangelogFile" { + BeforeEach { + $script:TestChangelogPath = Join-Path $script:TestRoot "CHANGELOG.md" + Set-Content -Path $script:TestChangelogPath -Value $script:SampleChangelog + } + + AfterEach { + if (Test-Path $script:TestChangelogPath) { + Remove-Item -Path $script:TestChangelogPath -Force + } + } + + It "Should update the unreleased version entry" { + Update-ChangelogFile -ChangelogPath $script:TestChangelogPath -NewChangelogText $script:SampleChangelogText + + # Verify the CHANGELOG was updated by checking it contains the new content + $updatedContent = Get-Content $script:TestChangelogPath -Raw + $updatedContent | Should -Match "Breaking Changes" + } + + It "Should call New-ChangelogContent to parse the text" { + # Note: Mocking doesn't work reliably with dot-sourced functions, + # so we verify the behavior by checking the output + Update-ChangelogFile -ChangelogPath $script:TestChangelogPath -NewChangelogText $script:SampleChangelogText + + # Verify the function was called by checking that the file was updated + $updatedContent = Get-Content $script:TestChangelogPath -Raw + $updatedContent | Should -Not -BeNullOrEmpty + $updatedContent | Should -Match "Breaking Changes" + } + + It "Should handle parsing errors gracefully" { + # Create an empty changelog that can't be parsed properly + Set-Content -Path $script:TestChangelogPath -Value "Invalid changelog content" + + # The function should handle this case (either throw or handle gracefully) + # Just verify it doesn't crash with an unhandled exception + try { + Update-ChangelogFile -ChangelogPath $script:TestChangelogPath -NewChangelogText $script:SampleChangelogText + # If it doesn't throw, that's also acceptable behavior + $true | Should -Be $true + } + catch { + # If it throws, verify it's a meaningful error message + $_.Exception.Message | Should -Not -BeNullOrEmpty + } + } + + It "Should handle missing unreleased version" { + # Create a changelog with only released versions (no Unreleased entry) + $releasedOnlyChangelog = @" +# Release History + +## 1.0.0 (2024-11-21) + +### Features Added + +* Initial release +"@ + Set-Content -Path $script:TestChangelogPath -Value $releasedOnlyChangelog + + # Should still work - will update the first entry + Update-ChangelogFile -ChangelogPath $script:TestChangelogPath -NewChangelogText $script:SampleChangelogText + + # Verify the file was updated + $updatedContent = Get-Content $script:TestChangelogPath -Raw + $updatedContent | Should -Not -BeNullOrEmpty + } + + It "Should preserve the structure when updating" { + # Note: Mocking doesn't work reliably with dot-sourced functions, + # so we test the actual behavior without mocking + Update-ChangelogFile -ChangelogPath $script:TestChangelogPath -NewChangelogText $script:SampleChangelogText + + # Verify the updated changelog still has proper structure + $updatedContent = Get-Content $script:TestChangelogPath -Raw + $updatedContent | Should -Match "# Release History" + $updatedContent | Should -Match "## 1\.1\.0-beta\.1" + } + + It "Should update the changelog content when source code updated" { + # Simulate first run of the tool - changelog already has content from a prior run + $firstRunChangelog = @" +# Release History + +## 1.1.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +#### ``models.PrivateEndpointConnection`` was modified + +* ``validate()`` was removed + +#### ``models.DeidUpdate`` was modified + +* ``validate()`` was removed + +### Bugs Fixed + +### Other Changes + +## 1.0.0 (2024-11-21) + +- Azure Resource Manager Health Data AI Services client library for Java. This package contains Microsoft Azure SDK for Health Data AI Services Management SDK. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Features Added + +- The first stable release for the azure-resourcemanager-healthdataaiservices Java SDK. + +"@ + Set-Content -Path $script:TestChangelogPath -Value $firstRunChangelog + + # Now run the tool again with new changes (simulating code changes and re-running the tool) + # This is the actual content generated by the changelog tool + $secondRunChangelogText = @" +### Breaking Changes + +#### ``models.PrivateEndpointConnection`` was modified + +* ``validate()`` was removed + +#### ``models.DeidUpdate`` was modified + +* ``validate()`` was removed + +#### ``HealthDataAIServicesManager`` was modified + +* ``fluent.HealthDataAIServicesClient serviceClient()`` -> ``fluent.HealthDataAIServicesManagementClient serviceClient()`` +"@ + + Update-ChangelogFile -ChangelogPath $script:TestChangelogPath -NewChangelogText $secondRunChangelogText + + # Verify the changelog was replaced with new content + $updatedContent = Get-Content $script:TestChangelogPath -Raw + + # Verify changes are in the unreleased section (1.1.0-beta.1) + # Split the content by version headers to isolate the unreleased section + $unreleasedSectionPattern = '(?s)## 1\.1\.0-beta\.1 \(Unreleased\).*?(?=## 1\.0\.0)' + $updatedContent | Should -MatchExactly $unreleasedSectionPattern + + $unreleasedSection = [regex]::Match($updatedContent, $unreleasedSectionPattern).Value + + # Verify all the breaking changes are in the unreleased section + $unreleasedSection | Should -Match "PrivateEndpointConnection`` was modified" + $unreleasedSection | Should -Match "DeidUpdate`` was modified" + $unreleasedSection | Should -Match "HealthDataAIServicesManager`` was modified" + $unreleasedSection | Should -Match "HealthDataAIServicesClient serviceClient" + + # Verify the unreleased section has the Breaking Changes header + $unreleasedSection | Should -Match "### Breaking Changes" + + # Verify the changes are NOT in the released versions + $releasedSectionPattern = '(?s)## 1\.0\.0 \(2024-11-21\).*' + $releasedSection = [regex]::Match($updatedContent, $releasedSectionPattern).Value + $releasedSection | Should -Not -Match "HealthDataAIServicesManager`` was modified" + + # Verify the unreleased version section still exists after updating + $updatedContent | Should -Match "## 1\.1\.0-beta\.1 \(Unreleased\)" + + # Verify the structure remains correct with the unreleased section header + $versionHeaders = [regex]::Matches($updatedContent, '## \d+\.\d+\.\d+(?:-beta\.\d+)?\s+\(') + $versionHeaders.Count | Should -BeGreaterOrEqual 2 + + # Should still preserve all released version history + $updatedContent | Should -Match "## 1\.0\.0 \(2024-11-21\)" + } + + It "Should produce identical changelog when tool is run multiple times with same input (idempotent)" { + # Setup initial changelog + $initialChangelog = @" +# Release History + +## 1.1.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0 (2024-11-21) + +- Azure Resource Manager Health Data AI Services client library for Java. This package contains Microsoft Azure SDK for Health Data AI Services Management SDK. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Features Added + +- The first stable release for the azure-resourcemanager-healthdataaiservices Java SDK. + +## 1.0.0-beta.1 (2024-08-14) + +- Azure Resource Manager Health Data AI Services client library for Java. This package contains Microsoft Azure SDK for Health Data AI Services Management SDK. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Features Added + +- Initial release for the azure-resourcemanager-healthdataaiservices Java SDK. +"@ + Set-Content -Path $script:TestChangelogPath -Value $initialChangelog + + # The changelog content to apply (same as real tool output) + $changelogText = @" +### Breaking Changes + +#### ``models.PrivateEndpointConnection`` was modified + +* ``validate()`` was removed + +#### ``models.DeidUpdate`` was modified + +* ``validate()`` was removed + +#### ``models.DeidServiceProperties`` was modified + +* ``validate()`` was removed + +#### ``models.PrivateEndpoint`` was modified + +* ``validate()`` was removed + +#### ``HealthDataAIServicesManager`` was modified + +* ``fluent.HealthDataAIServicesClient serviceClient()`` -> ``fluent.HealthDataAIServicesManagementClient serviceClient()`` +"@ + + # First run + Update-ChangelogFile -ChangelogPath $script:TestChangelogPath -NewChangelogText $changelogText + $firstRunContent = Get-Content $script:TestChangelogPath -Raw + + # Second run with the exact same input + Update-ChangelogFile -ChangelogPath $script:TestChangelogPath -NewChangelogText $changelogText + $secondRunContent = Get-Content $script:TestChangelogPath -Raw + + # Verify both runs produce identical output + $secondRunContent | Should -Be $firstRunContent + + # Verify there are still exactly three version sections (not duplicated) + $versionHeaders = [regex]::Matches($firstRunContent, '## \d+\.\d+\.\d+(?:-beta\.\d+)?\s+\(') + $versionHeaders.Count | Should -Be 3 + + # Verify the three specific versions exist + $firstRunContent | Should -Match "## 1\.1\.0-beta\.1 \(Unreleased\)" + $firstRunContent | Should -Match "## 1\.0\.0 \(2024-11-21\)" + $firstRunContent | Should -Match "## 1\.0\.0-beta\.1 \(2024-08-14\)" + + # Verify the unreleased section has the updated breaking changes + $firstRunContent | Should -Match "### Breaking Changes" + $firstRunContent | Should -Match "PrivateEndpointConnection" + $firstRunContent | Should -Match "DeidServiceProperties" + $firstRunContent | Should -Match "HealthDataAIServicesManager" + + } +} + +Describe "Script Integration" { + It "Should verify the script imports and uses the helper correctly" { + $scriptPath = Join-Path $PSScriptRoot ".." "Automation-Sdk-UpdateChangelog.ps1" + $scriptContent = Get-Content $scriptPath -Raw + + # Verify the script dot-sources the helper file + $scriptContent | Should -Match '\. \$helperPath' + $scriptContent | Should -Match 'Changelog-Helpers\.ps1' + + # Verify the script doesn't have duplicate function definitions + $scriptContent | Should -Not -Match 'function Get-MavenArtifactInfo' + $scriptContent | Should -Not -Match 'function Get-LatestReleasedStableVersion' + $scriptContent | Should -Not -Match 'function Get-MavenJar' + $scriptContent | Should -Not -Match 'function Get-BuiltJarPath' + $scriptContent | Should -Not -Match 'function New-ChangelogContent' + $scriptContent | Should -Not -Match 'function Update-ChangelogFile' + } + + It "Should verify the helper file exports all required functions" { + $helperPath = Join-Path $PSScriptRoot ".." "helpers" "Changelog-Helpers.ps1" + + # Dot-source the helper file to verify it loads without errors + { . $helperPath } | Should -Not -Throw + + # Verify all functions are available after dot-sourcing + Get-Command Get-MavenArtifactInfo -ErrorAction SilentlyContinue | Should -Not -BeNullOrEmpty + Get-Command Get-LatestReleasedStableVersion -ErrorAction SilentlyContinue | Should -Not -BeNullOrEmpty + Get-Command Get-MavenJar -ErrorAction SilentlyContinue | Should -Not -BeNullOrEmpty + Get-Command Get-BuiltJarPath -ErrorAction SilentlyContinue | Should -Not -BeNullOrEmpty + Get-Command New-ChangelogContent -ErrorAction SilentlyContinue | Should -Not -BeNullOrEmpty + Get-Command Update-ChangelogFile -ErrorAction SilentlyContinue | Should -Not -BeNullOrEmpty + Get-Command Invoke-ChangelogGeneration -ErrorAction SilentlyContinue | Should -Not -BeNullOrEmpty + } +} From 5bc36b468b1646ad59422307bcf641783eeeea00 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Fri, 28 Nov 2025 12:59:44 +0800 Subject: [PATCH 060/186] version update --- eng/versioning/external_dependencies.txt | 218 +- sdk/spring/CHANGELOG.md | 2 +- sdk/spring/azure-spring-data-cosmos/pom.xml | 92 +- sdk/spring/scripts/_constants.py | 17 +- ....0.0-RC2_managed_external_dependencies.txt | 1753 ------------- ...ot_4.0.0_managed_external_dependencies.txt | 2176 +++++++++++++++++ .../scripts/sync_external_dependencies.py | 6 +- sdk/spring/scripts/version_util.py | 16 +- .../pom.xml | 30 +- .../spring-cloud-azure-actuator/pom.xml | 24 +- .../pom.xml | 30 +- .../pom.xml | 40 +- .../spring-cloud-azure-autoconfigure/pom.xml | 126 +- sdk/spring/spring-cloud-azure-core/pom.xml | 22 +- .../spring-cloud-azure-docker-compose/pom.xml | 22 +- .../pom.xml | 24 +- .../pom.xml | 40 +- .../pom.xml | 6 +- .../pom.xml | 6 +- .../pom.xml | 18 +- sdk/spring/spring-cloud-azure-service/pom.xml | 24 +- .../pom.xml | 18 +- .../pom.xml | 16 +- .../pom.xml | 12 +- .../pom.xml | 10 +- .../pom.xml | 10 +- .../spring-cloud-azure-starter-cosmos/pom.xml | 10 +- .../pom.xml | 10 +- .../pom.xml | 14 +- .../pom.xml | 10 +- .../pom.xml | 10 +- .../pom.xml | 12 +- .../pom.xml | 12 +- .../pom.xml | 12 +- .../pom.xml | 12 +- .../pom.xml | 12 +- .../pom.xml | 10 +- .../pom.xml | 10 +- .../pom.xml | 10 +- .../pom.xml | 10 +- .../pom.xml | 10 +- .../pom.xml | 10 +- .../pom.xml | 28 +- .../pom.xml | 10 +- .../pom.xml | 10 +- .../pom.xml | 10 +- .../pom.xml | 10 +- .../pom.xml | 10 +- .../pom.xml | 10 +- .../pom.xml | 10 +- sdk/spring/spring-cloud-azure-starter/pom.xml | 12 +- .../pom.xml | 30 +- .../pom.xml | 22 +- .../pom.xml | 30 +- .../pom.xml | 22 +- .../spring-cloud-azure-testcontainers/pom.xml | 26 +- .../spring-integration-azure-core/pom.xml | 24 +- .../pom.xml | 18 +- .../pom.xml | 18 +- .../pom.xml | 14 +- .../spring-messaging-azure-eventhubs/pom.xml | 36 +- .../spring-messaging-azure-servicebus/pom.xml | 32 +- .../pom.xml | 16 +- sdk/spring/spring-messaging-azure/pom.xml | 36 +- 64 files changed, 2895 insertions(+), 2471 deletions(-) delete mode 100644 sdk/spring/scripts/spring_boot_4.0.0-RC2_managed_external_dependencies.txt create mode 100644 sdk/spring/scripts/spring_boot_4.0.0_managed_external_dependencies.txt diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index fc764521c324..9731a410f72c 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -312,113 +312,119 @@ resourcemanager_com.jcraft:jsch;0.1.55 storage_com.microsoft.azure:azure-storage;8.6.6 # sdk\spring\pom.xml modules -springboot3_com.diffplug.spotless:spotless-maven-plugin;2.30.0 -springboot3_com.fasterxml.jackson.core:jackson-annotations;2.20 -springboot3_com.fasterxml.jackson.core:jackson-databind;2.20.1 -springboot3_com.fasterxml.jackson.datatype:jackson-datatype-jdk8;2.20.1 -springboot3_com.fasterxml.jackson.datatype:jackson-datatype-jsr310;2.20.1 -springboot3_com.fasterxml.jackson.module:jackson-module-parameter-names;2.20.1 -springboot3_com.github.spotbugs:spotbugs-maven-plugin;4.8.2.0 -springboot3_com.google.code.findbugs:jsr305;3.0.2 -springboot3_com.mysql:mysql-connector-j;9.4.0 -springboot3_com.nimbusds:nimbus-jose-jwt;9.37.3 -springboot3_io.lettuce:lettuce-core;6.8.1.RELEASE -springboot3_io.micrometer:micrometer-core;1.15.3 -springboot3_io.netty:netty-buffer;4.2.7.Final -springboot3_io.netty:netty-codec-http;4.2.7.Final -springboot3_io.netty:netty-common;4.2.7.Final -springboot3_io.netty:netty-handler;4.2.7.Final -springboot3_io.netty:netty-transport-native-epoll;4.2.7.Final -springboot3_io.netty:netty-transport-native-kqueue;4.2.7.Final -springboot3_io.netty:netty-transport;4.2.7.Final -springboot3_io.projectreactor.netty:reactor-netty;1.3.0-RC1 -springboot3_io.projectreactor:reactor-test;3.8.0-RC1 -springboot3_jakarta.servlet:jakarta.servlet-api;6.1.0 -springboot3_jakarta.validation:jakarta.validation-api;3.1.1 -springboot3_javax.annotation:javax.annotation-api;1.3.2 -springboot3_junit:junit;4.13.2 -springboot3_net.bytebuddy:byte-buddy-agent;1.17.8 -springboot3_net.bytebuddy:byte-buddy;1.17.8 -springboot3_org.apache.commons:commons-lang3;3.19.0 -springboot3_org.apache.kafka:kafka-clients;4.1.0 -springboot3_org.apache.maven.plugins:maven-antrun-plugin;3.2.0 -springboot3_org.apache.maven.plugins:maven-compiler-plugin;3.14.1 -springboot3_org.apache.maven.plugins:maven-enforcer-plugin;3.6.2 -springboot3_org.apache.maven.plugins:maven-failsafe-plugin;3.5.4 -springboot3_org.apache.maven.plugins:maven-jar-plugin;3.4.2 -springboot3_org.apache.maven.plugins:maven-javadoc-plugin;3.12.0 -springboot3_org.apache.maven.plugins:maven-surefire-plugin;3.5.4 -springboot3_org.assertj:assertj-core;3.27.6 -springboot3_org.hibernate.validator:hibernate-validator;9.0.1.Final -springboot3_org.javatuples:javatuples;1.2 -springboot3_org.junit.jupiter:junit-jupiter;6.0.1 -springboot3_org.junit.vintage:junit-vintage-engine;6.0.1 -springboot3_org.messaginghub:pooled-jms;3.1.7 -springboot3_org.mockito:mockito-core;5.20.0 -springboot3_org.postgresql:postgresql;42.7.8 -springboot3_org.revapi:revapi-maven-plugin;0.14.6 -springboot3_org.slf4j:slf4j-api;2.0.17 -springboot3_org.slf4j:slf4j-simple;2.0.17 -springboot3_org.springframework.boot:spring-boot-actuator-autoconfigure;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-actuator;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-autoconfigure;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-configuration-metadata;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-configuration-processor;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-docker-compose;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-persistence;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-starter-actuator;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-starter-data-jdbc;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-starter-integration;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-starter-parent;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-starter-test;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-starter-webmvc;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-starter;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-test;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-testcontainers;4.0.0-RC2 -springboot3_org.springframework.cloud:spring-cloud-bus;4.3.0 -springboot3_org.springframework.cloud:spring-cloud-context;4.3.0 -springboot3_org.springframework.cloud:spring-cloud-starter-stream-kafka;5.0.0-RC1 -springboot3_org.springframework.cloud:spring-cloud-stream-test-binder;4.3.0 -springboot3_org.springframework.cloud:spring-cloud-stream;4.3.0 -springboot3_org.springframework.data:spring-data-commons;3.5.3 -springboot3_org.springframework.data:spring-data-redis;3.5.3 -springboot3_org.springframework.boot:spring-boot-data-redis;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-resttestclient;4.0.0-RC2 -springboot3_org.springframework.integration:spring-integration-core;7.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-http-converter;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-kafka;4.0.0-RC2 -springboot3_org.springframework.retry:spring-retry;2.0.12 -springboot3_org.springframework.security:spring-security-config;7.0.0-RC3 -springboot3_org.springframework.security:spring-security-oauth2-client;7.0.0-RC3 -springboot3_org.springframework.security:spring-security-oauth2-jose;7.0.0-RC3 -springboot3_org.springframework.security:spring-security-oauth2-resource-server;7.0.0-RC3 -springboot3_org.springframework.security:spring-security-web;7.0.0-RC3 -springboot3_org.springframework:spring-beans;7.0.0-RC3 -springboot3_org.springframework:spring-context-support;7.0.0-RC3 -springboot3_org.springframework:spring-context;7.0.0-RC3 -springboot3_org.springframework:spring-core-test;7.0.0-RC3 -springboot3_org.springframework:spring-core;7.0.0-RC3 -springboot3_org.springframework:spring-expression;7.0.0-RC3 -springboot3_org.springframework.boot:spring-boot-health;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-jackson;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-jdbc;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-jms;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-restclient;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-security;4.0.0-RC2 -springboot3_org.springframework.boot:spring-boot-security-oauth2-client;4.0.0-RC2 -springboot3_org.springframework:spring-jms;7.0.0-RC3 -springboot3_org.springframework:spring-messaging;7.0.0-RC3 -springboot3_org.springframework:spring-test;7.0.0-RC3 -springboot3_org.springframework:spring-tx;7.0.0-RC3 -springboot3_org.springframework:spring-web;7.0.0-RC3 -springboot3_org.springframework:spring-webmvc;7.0.0-RC3 -springboot3_org.testcontainers:junit-jupiter;1.21.3 -springboot3_org.testcontainers:azure;1.21.3 -springboot3_jakarta.annotation:jakarta.annotation-api;3.0.0 -springboot3_ch.qos.logback:logback-classic;1.5.20 +springboot4_com.diffplug.spotless:spotless-maven-plugin;2.30.0 +springboot4_com.fasterxml.jackson.core:jackson-annotations;2.20 +springboot4_com.fasterxml.jackson.core:jackson-core;2.20.1 +springboot4_com.fasterxml.jackson.core:jackson-databind;2.20.1 +springboot4_com.fasterxml.jackson.dataformat:jackson-dataformat-xml;2.20.1 +springboot4_com.fasterxml.jackson.datatype:jackson-datatype-jdk8;2.20.1 +springboot4_com.fasterxml.jackson.datatype:jackson-datatype-jsr310;2.20.1 +springboot4_com.fasterxml.jackson.module:jackson-module-afterburner;2.20.1 +springboot4_com.fasterxml.jackson.module:jackson-module-parameter-names;2.20.1 +springboot4_com.github.spotbugs:spotbugs-maven-plugin;4.8.2.0 +springboot4_com.google.code.findbugs:jsr305;3.0.2 +springboot4_com.mysql:mysql-connector-j;9.5.0 +springboot4_com.nimbusds:nimbus-jose-jwt;9.37.3 +springboot4_io.lettuce:lettuce-core;6.8.1.RELEASE +springboot4_io.micrometer:micrometer-core;1.16.0 +springboot4_io.netty:netty-buffer;4.2.7.Final +springboot4_io.netty:netty-codec-http;4.2.7.Final +springboot4_io.netty:netty-common;4.2.7.Final +springboot4_io.netty:netty-handler;4.2.7.Final +springboot4_io.netty:netty-transport-native-epoll;4.2.7.Final +springboot4_io.netty:netty-transport-native-kqueue;4.2.7.Final +springboot4_io.netty:netty-transport;4.2.7.Final +springboot4_io.projectreactor.netty:reactor-netty;1.3.0 +springboot4_io.projectreactor:reactor-test;3.8.0 +springboot4_jakarta.servlet:jakarta.servlet-api;6.1.0 +springboot4_jakarta.validation:jakarta.validation-api;3.1.1 +springboot4_javax.annotation:javax.annotation-api;1.3.2 +springboot4_junit:junit;4.13.2 +springboot4_net.bytebuddy:byte-buddy-agent;1.17.8 +springboot4_net.bytebuddy:byte-buddy;1.17.8 +springboot4_org.apache.commons:commons-lang3;3.19.0 +springboot4_org.apache.kafka:kafka-clients;4.1.1 +springboot4_org.apache.maven.plugins:maven-antrun-plugin;3.2.0 +springboot4_org.apache.maven.plugins:maven-compiler-plugin;3.14.1 +springboot4_org.apache.maven.plugins:maven-enforcer-plugin;3.6.2 +springboot4_org.apache.maven.plugins:maven-failsafe-plugin;3.5.4 +springboot4_org.apache.maven.plugins:maven-jar-plugin;3.4.2 +springboot4_org.apache.maven.plugins:maven-javadoc-plugin;3.12.0 +springboot4_org.apache.maven.plugins:maven-surefire-plugin;3.5.4 +springboot4_org.assertj:assertj-core;3.27.6 +springboot4_org.hibernate.validator:hibernate-validator;9.0.1.Final +springboot4_org.javatuples:javatuples;1.2 +springboot4_org.junit.jupiter:junit-jupiter;6.0.1 +springboot4_org.junit.vintage:junit-vintage-engine;6.0.1 +springboot4_org.messaginghub:pooled-jms;3.1.7 +springboot4_org.mockito:mockito-core;5.20.0 +springboot4_org.postgresql:postgresql;42.7.8 +springboot4_org.revapi:revapi-maven-plugin;0.14.6 +springboot4_org.slf4j:slf4j-api;2.0.17 +springboot4_org.slf4j:slf4j-simple;2.0.17 +springboot4_org.springframework.boot:spring-boot-actuator-autoconfigure;4.0.0 +springboot4_org.springframework.boot:spring-boot-actuator;4.0.0 +springboot4_org.springframework.boot:spring-boot-autoconfigure;4.0.0 +springboot4_org.springframework.boot:spring-boot-configuration-metadata;4.0.0 +springboot4_org.springframework.boot:spring-boot-configuration-processor;4.0.0 +springboot4_org.springframework.boot:spring-boot-data-redis;4.0.0 +springboot4_org.springframework.boot:spring-boot-docker-compose;4.0.0 +springboot4_org.springframework.boot:spring-boot-health;4.0.0 +springboot4_org.springframework.boot:spring-boot-http-converter;4.0.0 +springboot4_org.springframework.boot:spring-boot-jackson;4.0.0 +springboot4_org.springframework.boot:spring-boot-jdbc;4.0.0 +springboot4_org.springframework.boot:spring-boot-jms;4.0.0 +springboot4_org.springframework.boot:spring-boot-kafka;4.0.0 +springboot4_org.springframework.boot:spring-boot-persistence;4.0.0 +springboot4_org.springframework.boot:spring-boot-restclient;4.0.0 +springboot4_org.springframework.boot:spring-boot-resttestclient;4.0.0 +springboot4_org.springframework.boot:spring-boot-security;4.0.0 +springboot4_org.springframework.boot:spring-boot-security-oauth2-client;4.0.0 +springboot4_org.springframework.boot:spring-boot-starter-actuator;4.0.0 +springboot4_org.springframework.boot:spring-boot-starter-data-jdbc;4.0.0 +springboot4_org.springframework.boot:spring-boot-starter-integration;4.0.0 +springboot4_org.springframework.boot:spring-boot-starter-parent;4.0.0 +springboot4_org.springframework.boot:spring-boot-starter-test;4.0.0 +springboot4_org.springframework.boot:spring-boot-starter-webmvc;4.0.0 +springboot4_org.springframework.boot:spring-boot-starter-web;4.0.0 +springboot4_org.springframework.boot:spring-boot-starter;4.0.0 +springboot4_org.springframework.boot:spring-boot-test;4.0.0 +springboot4_org.springframework.boot:spring-boot-testcontainers;4.0.0 +springboot4_org.springframework.cloud:spring-cloud-bus;5.0.0 +springboot4_org.springframework.cloud:spring-cloud-context;5.0.0 +springboot4_org.springframework.cloud:spring-cloud-starter-stream-kafka;5.0.0 +springboot4_org.springframework.cloud:spring-cloud-stream-test-binder;5.0.0 +springboot4_org.springframework.cloud:spring-cloud-stream;5.0.0 +springboot4_org.springframework.data:spring-data-commons;4.0.0 +springboot4_org.springframework.data:spring-data-redis;4.0.0 +springboot4_org.springframework.integration:spring-integration-core;7.0.0 +springboot4_org.springframework.kafka:spring-kafka;4.0.0 +springboot4_org.springframework.retry:spring-retry;2.0.12 +springboot4_org.springframework.security:spring-security-config;7.0.0 +springboot4_org.springframework.security:spring-security-oauth2-client;7.0.0 +springboot4_org.springframework.security:spring-security-oauth2-jose;7.0.0 +springboot4_org.springframework.security:spring-security-oauth2-resource-server;7.0.0 +springboot4_org.springframework.security:spring-security-web;7.0.0 +springboot4_org.springframework:spring-beans;7.0.1 +springboot4_org.springframework:spring-context-support;7.0.1 +springboot4_org.springframework:spring-context;7.0.1 +springboot4_org.springframework:spring-core-test;7.0.1 +springboot4_org.springframework:spring-core;7.0.1 +springboot4_org.springframework:spring-expression;7.0.1 +springboot4_org.springframework:spring-jdbc;7.0.1 +springboot4_org.springframework:spring-jms;7.0.1 +springboot4_org.springframework:spring-messaging;7.0.1 +springboot4_org.springframework:spring-test;7.0.1 +springboot4_org.springframework:spring-tx;7.0.1 +springboot4_org.springframework:spring-web;7.0.1 +springboot4_org.springframework:spring-webmvc;7.0.1 +springboot4_org.testcontainers:junit-jupiter;1.21.3 +springboot4_org.testcontainers:azure;1.21.3 +springboot4_jakarta.annotation:jakarta.annotation-api;3.0.0 +springboot4_ch.qos.logback:logback-classic;1.5.21 # Used for Spring version updates -springboot3_org.springframework.boot:spring-boot-dependencies;4.0.0-RC2 -springboot3_org.springframework.cloud:spring-cloud-dependencies;2025.1.0-M4 +springboot4_org.springframework.boot:spring-boot-dependencies;4.0.0 +springboot4_org.springframework.cloud:spring-cloud-dependencies;2025.1.0 # Java 7 support diff --git a/sdk/spring/CHANGELOG.md b/sdk/spring/CHANGELOG.md index cfc275f58b5f..f66a49ccc61f 100644 --- a/sdk/spring/CHANGELOG.md +++ b/sdk/spring/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History # (Unreleased) -Upgrade Spring Boot dependencies version to 4.0.0-RC2 and Spring Cloud dependencies version to 2025.1.0-M4 +Upgrade Spring Boot dependencies version to 4.0.0 and Spring Cloud dependencies version to 2025.1.0 ## 6.0.0 (2025-09-22) - This release is compatible with Spring Boot 3.5.0-3.5.5. (Note: 3.5.x (x>5) should be supported, but they aren't tested with this release.) diff --git a/sdk/spring/azure-spring-data-cosmos/pom.xml b/sdk/spring/azure-spring-data-cosmos/pom.xml index 7c03f09da11c..04a751e7852c 100644 --- a/sdk/spring/azure-spring-data-cosmos/pom.xml +++ b/sdk/spring/azure-spring-data-cosmos/pom.xml @@ -53,7 +53,7 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-core;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-core;external_dependency} --> <exclusions> <exclusion> <groupId>commons-logging</groupId> @@ -64,27 +64,27 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-web;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-web;external_dependency} --> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-beans;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-beans;external_dependency} --> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-context;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-context;external_dependency} --> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-tx;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-tx;external_dependency} --> </dependency> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-commons</artifactId> - <version>3.5.3</version> <!-- {x-version-update;springboot3_org.springframework.data:spring-data-commons;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.data:spring-data-commons;external_dependency} --> <exclusions> <exclusion> <groupId>org.slf4j</groupId> @@ -95,12 +95,12 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-expression</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-expression;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-expression;external_dependency} --> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-persistence</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-persistence;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-persistence;external_dependency} --> </dependency> <dependency> <groupId>com.azure</groupId> @@ -110,39 +110,39 @@ <dependency> <groupId>com.fasterxml.jackson.module</groupId> <artifactId>jackson-module-parameter-names</artifactId> - <version>2.20.1</version> <!-- {x-version-update;springboot3_com.fasterxml.jackson.module:jackson-module-parameter-names;external_dependency} --> + <version>2.20.1</version> <!-- {x-version-update;springboot4_com.fasterxml.jackson.module:jackson-module-parameter-names;external_dependency} --> </dependency> <dependency> <groupId>com.fasterxml.jackson.datatype</groupId> <artifactId>jackson-datatype-jdk8</artifactId> - <version>2.20.1</version> <!-- {x-version-update;springboot3_com.fasterxml.jackson.datatype:jackson-datatype-jdk8;external_dependency} --> + <version>2.20.1</version> <!-- {x-version-update;springboot4_com.fasterxml.jackson.datatype:jackson-datatype-jdk8;external_dependency} --> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> - <version>2.20</version> <!-- {x-version-update;springboot3_com.fasterxml.jackson.core:jackson-annotations;external_dependency} --> + <version>2.20</version> <!-- {x-version-update;springboot4_com.fasterxml.jackson.core:jackson-annotations;external_dependency} --> </dependency> <dependency> <groupId>org.javatuples</groupId> <artifactId>javatuples</artifactId> - <version>1.2</version> <!-- {x-version-update;springboot3_org.javatuples:javatuples;external_dependency} --> + <version>1.2</version> <!-- {x-version-update;springboot4_org.javatuples:javatuples;external_dependency} --> </dependency> <dependency> <groupId>javax.annotation</groupId> <artifactId>javax.annotation-api</artifactId> - <version>1.3.2</version> <!-- {x-version-update;springboot3_javax.annotation:javax.annotation-api;external_dependency} --> + <version>1.3.2</version> <!-- {x-version-update;springboot4_javax.annotation:javax.annotation-api;external_dependency} --> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> - <version>3.19.0</version> <!-- {x-version-update;springboot3_org.apache.commons:commons-lang3;external_dependency} --> + <version>3.19.0</version> <!-- {x-version-update;springboot4_org.apache.commons:commons-lang3;external_dependency} --> </dependency> <!-- Test --> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version> <!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version> <!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -150,25 +150,25 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>4.13.2</version> <!-- {x-version-update;springboot3_junit:junit;external_dependency} --> + <version>4.13.2</version> <!-- {x-version-update;springboot4_junit:junit;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-test;external_dependency} --> <scope>test</scope> <exclusions> <exclusion> @@ -180,13 +180,13 @@ <dependency> <groupId>io.projectreactor</groupId> <artifactId>reactor-test</artifactId> - <version>3.8.0-RC1</version> <!-- {x-version-update;springboot3_io.projectreactor:reactor-test;external_dependency} --> + <version>3.8.0</version> <!-- {x-version-update;springboot4_io.projectreactor:reactor-test;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> - <version>2.0.17</version> <!-- {x-version-update;springboot3_org.slf4j:slf4j-simple;external_dependency} --> + <version>2.0.17</version> <!-- {x-version-update;springboot4_org.slf4j:slf4j-simple;external_dependency} --> <scope>test</scope> </dependency> <!-- Added this provided dependency to include necessary annotations used by "reactor-core". @@ -198,19 +198,19 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> - <version>2.0.17</version> <!-- {x-version-update;springboot3_org.slf4j:slf4j-api;external_dependency} --> + <version>2.0.17</version> <!-- {x-version-update;springboot4_org.slf4j:slf4j-api;external_dependency} --> </dependency> <dependency> <groupId>org.junit.vintage</groupId> <artifactId>junit-vintage-engine</artifactId> - <version>6.0.1</version> <!-- {x-version-update;springboot3_org.junit.vintage:junit-vintage-engine;external_dependency} --> + <version>6.0.1</version> <!-- {x-version-update;springboot4_org.junit.vintage:junit-vintage-engine;external_dependency} --> <scope>test</scope> <exclusions> <exclusion> @@ -226,7 +226,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -273,26 +273,26 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>org.springframework:spring-beans:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework:spring-beans;external_dependency} --> - <include>org.springframework:spring-web:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework:spring-web;external_dependency} --> - <include>org.springframework:spring-tx:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework:spring-tx;external_dependency} --> - <include>org.springframework:spring-expression:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework:spring-expression;external_dependency} --> - <include>org.springframework:spring-core:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework:spring-core;external_dependency} --> - <include>org.springframework:spring-context:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework:spring-context;external_dependency} --> - <include>org.springframework.boot:spring-boot-persistence:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-persistence;external_dependency} --> - <include>org.springframework.data:spring-data-commons:[3.5.3]</include> <!-- {x-include-update;springboot3_org.springframework.data:spring-data-commons;external_dependency} --> - <include>org.javatuples:javatuples:[1.2]</include> <!-- {x-include-update;springboot3_org.javatuples:javatuples;external_dependency} --> - <include>com.fasterxml.jackson.core:jackson-annotations:[2.20]</include> <!-- {x-include-update;springboot3_com.fasterxml.jackson.core:jackson-annotations;external_dependency} --> - <include>com.fasterxml.jackson.datatype:jackson-datatype-jdk8:[2.20.1]</include> <!-- {x-include-update;springboot3_com.fasterxml.jackson.datatype:jackson-datatype-jdk8;external_dependency} --> - <include>com.fasterxml.jackson.module:jackson-module-parameter-names:[2.20.1]</include> <!-- {x-include-update;springboot3_com.fasterxml.jackson.module:jackson-module-parameter-names;external_dependency} --> - <include>javax.annotation:javax.annotation-api:[1.3.2]</include> <!-- {x-include-update;springboot3_javax.annotation:javax.annotation-api;external_dependency} --> - <include>org.apache.commons:commons-lang3:[3.19.0]</include> <!-- {x-include-update;springboot3_org.apache.commons:commons-lang3;external_dependency} --> - <include>org.slf4j:slf4j-api:[2.0.17]</include> <!-- {x-include-update;springboot3_org.slf4j:slf4j-api;external_dependency} --> + <include>org.springframework:spring-beans:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-beans;external_dependency} --> + <include>org.springframework:spring-web:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-web;external_dependency} --> + <include>org.springframework:spring-tx:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-tx;external_dependency} --> + <include>org.springframework:spring-expression:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-expression;external_dependency} --> + <include>org.springframework:spring-core:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-core;external_dependency} --> + <include>org.springframework:spring-context:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-context;external_dependency} --> + <include>org.springframework.boot:spring-boot-persistence:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-persistence;external_dependency} --> + <include>org.springframework.data:spring-data-commons:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.data:spring-data-commons;external_dependency} --> + <include>org.javatuples:javatuples:[1.2]</include> <!-- {x-include-update;springboot4_org.javatuples:javatuples;external_dependency} --> + <include>com.fasterxml.jackson.core:jackson-annotations:[2.20]</include> <!-- {x-include-update;springboot4_com.fasterxml.jackson.core:jackson-annotations;external_dependency} --> + <include>com.fasterxml.jackson.datatype:jackson-datatype-jdk8:[2.20.1]</include> <!-- {x-include-update;springboot4_com.fasterxml.jackson.datatype:jackson-datatype-jdk8;external_dependency} --> + <include>com.fasterxml.jackson.module:jackson-module-parameter-names:[2.20.1]</include> <!-- {x-include-update;springboot4_com.fasterxml.jackson.module:jackson-module-parameter-names;external_dependency} --> + <include>javax.annotation:javax.annotation-api:[1.3.2]</include> <!-- {x-include-update;springboot4_javax.annotation:javax.annotation-api;external_dependency} --> + <include>org.apache.commons:commons-lang3:[3.19.0]</include> <!-- {x-include-update;springboot4_org.apache.commons:commons-lang3;external_dependency} --> + <include>org.slf4j:slf4j-api:[2.0.17]</include> <!-- {x-include-update;springboot4_org.slf4j:slf4j-api;external_dependency} --> </includes> </bannedDependencies> </rules> @@ -302,7 +302,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> - <version>3.12.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-javadoc-plugin;external_dependency} --> + <version>3.12.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-javadoc-plugin;external_dependency} --> <configuration> <sourceFileExcludes> <sourceFileExclude>com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentProperty.java</sourceFileExclude> @@ -320,7 +320,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> - <version>3.5.4</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} --> + <version>3.5.4</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} --> <configuration> <systemPropertiesFile>src/test/resources/application.properties</systemPropertiesFile> <skipITs>${skip.integration.tests}</skipITs> @@ -354,7 +354,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>3.5.4</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-surefire-plugin;external_dependency} --> + <version>3.5.4</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-surefire-plugin;external_dependency} --> <configuration> </configuration> </plugin> @@ -375,7 +375,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>3.5.4</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-surefire-plugin;external_dependency} --> + <version>3.5.4</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-surefire-plugin;external_dependency} --> <configuration> </configuration> </plugin> @@ -395,7 +395,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> - <version>3.5.4</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} --> + <version>3.5.4</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} --> <configuration> <excludes> <!--Excluding PageablePersonRepositoryIT test class, as it creates large documents which are not suitable for emulator--> diff --git a/sdk/spring/scripts/_constants.py b/sdk/spring/scripts/_constants.py index c54f0ec5f9bf..43ab25b12867 100644 --- a/sdk/spring/scripts/_constants.py +++ b/sdk/spring/scripts/_constants.py @@ -3,14 +3,19 @@ SPRING_BOOT_MAJOR_2_VERSION_TAG_PREFIX = '' SPRING_BOOT_MAJOR_3_VERSION_NAME = '3' SPRING_BOOT_MAJOR_3_VERSION_TAG_PREFIX = 'springboot3_' +SPRING_BOOT_MAJOR_4_VERSION_NAME = '4' +SPRING_BOOT_MAJOR_4_VERSION_TAG_PREFIX = 'springboot4_' SPRING_BOOT_MAJOR_VERSION_PREFIX_DICT = { SPRING_BOOT_MAJOR_2_VERSION_NAME: SPRING_BOOT_MAJOR_2_VERSION_TAG_PREFIX, - SPRING_BOOT_MAJOR_3_VERSION_NAME: SPRING_BOOT_MAJOR_3_VERSION_TAG_PREFIX + SPRING_BOOT_MAJOR_3_VERSION_NAME: SPRING_BOOT_MAJOR_3_VERSION_TAG_PREFIX, + SPRING_BOOT_MAJOR_4_VERSION_NAME: SPRING_BOOT_MAJOR_4_VERSION_TAG_PREFIX } def get_spring_boot_version_tag_prefix(spring_boot_version): - if spring_boot_version.startswith('3.') or spring_boot_version == SPRING_BOOT_MAJOR_3_VERSION_NAME: + if spring_boot_version.startswith('4.') or spring_boot_version == SPRING_BOOT_MAJOR_4_VERSION_NAME: + return SPRING_BOOT_MAJOR_VERSION_PREFIX_DICT[SPRING_BOOT_MAJOR_4_VERSION_NAME] + elif spring_boot_version.startswith('3.') or spring_boot_version == SPRING_BOOT_MAJOR_3_VERSION_NAME: return SPRING_BOOT_MAJOR_VERSION_PREFIX_DICT[SPRING_BOOT_MAJOR_3_VERSION_NAME] elif spring_boot_version.startswith('2.') or spring_boot_version == SPRING_BOOT_MAJOR_2_VERSION_NAME: return SPRING_BOOT_MAJOR_VERSION_PREFIX_DICT[SPRING_BOOT_MAJOR_2_VERSION_NAME] @@ -20,10 +25,10 @@ def get_spring_boot_version_tag_prefix(spring_boot_version): # Since Spring Cloud Azure uses multiple versions of external dependencies managed by Spring Boot, # the modules that still use Spring Boot 2 to manage dependencies will be skipped. -SKIP_ADDING_DEPENDENCY_MANAGEMENT_ARTIFACTS = [ - 'spring-cloud-azure-starter-monitor-test', - 'spring-cloud-azure-starter-monitor' -] +# SKIP_ADDING_DEPENDENCY_MANAGEMENT_ARTIFACTS = [ +# 'spring-cloud-azure-starter-monitor-test', +# 'spring-cloud-azure-starter-monitor' +# ] # Since some features are based on a higher Spring Boot version, it is sufficient to let the modules # corresponding to these special Spring Boot versions use the latest Spring Boot version. SKIP_ADDING_DEPENDENCY_MANAGEMENT_ARTIFACTS_WITH_SPRING_BOOT_VERSION = { diff --git a/sdk/spring/scripts/spring_boot_4.0.0-RC2_managed_external_dependencies.txt b/sdk/spring/scripts/spring_boot_4.0.0-RC2_managed_external_dependencies.txt deleted file mode 100644 index 0de38df43cfb..000000000000 --- a/sdk/spring/scripts/spring_boot_4.0.0-RC2_managed_external_dependencies.txt +++ /dev/null @@ -1,1753 +0,0 @@ -ch.qos.logback:logback-classic;1.5.20 -ch.qos.logback:logback-core;1.5.20 -co.elastic.clients:elasticsearch-java;9.2.0 -co.elastic.clients:elasticsearch-rest5-client;9.2.0 -com.couchbase.client:java-client;3.9.2 -com.datastax.oss:native-protocol;1.5.1 -com.fasterxml.jackson.core:jackson-annotations;2.20 -com.fasterxml.jackson.core:jackson-core;2.20.1 -com.fasterxml.jackson.core:jackson-databind;2.20.1 -com.fasterxml.jackson.dataformat:jackson-dataformat-avro;2.20.1 -com.fasterxml.jackson.dataformat:jackson-dataformat-cbor;2.20.1 -com.fasterxml.jackson.dataformat:jackson-dataformat-csv;2.20.1 -com.fasterxml.jackson.dataformat:jackson-dataformat-ion;2.20.1 -com.fasterxml.jackson.dataformat:jackson-dataformat-properties;2.20.1 -com.fasterxml.jackson.dataformat:jackson-dataformat-protobuf;2.20.1 -com.fasterxml.jackson.dataformat:jackson-dataformat-smile;2.20.1 -com.fasterxml.jackson.dataformat:jackson-dataformat-toml;2.20.1 -com.fasterxml.jackson.dataformat:jackson-dataformat-xml;2.20.1 -com.fasterxml.jackson.dataformat:jackson-dataformat-yaml;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-eclipse-collections;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-guava;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-hibernate4;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-hibernate5;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-hibernate5-jakarta;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-hibernate6;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-hibernate7;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-hppc;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-jakarta-jsonp;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-javax-money;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-jaxrs;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-jdk8;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-joda;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-joda-money;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-json-org;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-jsr310;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-jsr353;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-moneta;2.20.1 -com.fasterxml.jackson.datatype:jackson-datatype-pcollections;2.20.1 -com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-base;2.20.1 -com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-cbor-provider;2.20.1 -com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider;2.20.1 -com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-smile-provider;2.20.1 -com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-xml-provider;2.20.1 -com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-yaml-provider;2.20.1 -com.fasterxml.jackson.jaxrs:jackson-jaxrs-base;2.20.1 -com.fasterxml.jackson.jaxrs:jackson-jaxrs-cbor-provider;2.20.1 -com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider;2.20.1 -com.fasterxml.jackson.jaxrs:jackson-jaxrs-smile-provider;2.20.1 -com.fasterxml.jackson.jaxrs:jackson-jaxrs-xml-provider;2.20.1 -com.fasterxml.jackson.jaxrs:jackson-jaxrs-yaml-provider;2.20.1 -com.fasterxml.jackson.jr:jackson-jr-all;2.20.1 -com.fasterxml.jackson.jr:jackson-jr-annotation-support;2.20.1 -com.fasterxml.jackson.jr:jackson-jr-extension-javatime;2.20.1 -com.fasterxml.jackson.jr:jackson-jr-objects;2.20.1 -com.fasterxml.jackson.jr:jackson-jr-retrofit2;2.20.1 -com.fasterxml.jackson.jr:jackson-jr-stree;2.20.1 -com.fasterxml.jackson.module:jackson-module-afterburner;2.20.1 -com.fasterxml.jackson.module:jackson-module-android-record;2.20.1 -com.fasterxml.jackson.module:jackson-module-blackbird;2.20.1 -com.fasterxml.jackson.module:jackson-module-guice;2.20.1 -com.fasterxml.jackson.module:jackson-module-guice7;2.20.1 -com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations;2.20.1 -com.fasterxml.jackson.module:jackson-module-jaxb-annotations;2.20.1 -com.fasterxml.jackson.module:jackson-module-jsonSchema;2.20.1 -com.fasterxml.jackson.module:jackson-module-jsonSchema-jakarta;2.20.1 -com.fasterxml.jackson.module:jackson-module-kotlin;2.20.1 -com.fasterxml.jackson.module:jackson-module-mrbean;2.20.1 -com.fasterxml.jackson.module:jackson-module-no-ctor-deser;2.20.1 -com.fasterxml.jackson.module:jackson-module-osgi;2.20.1 -com.fasterxml.jackson.module:jackson-module-parameter-names;2.20.1 -com.fasterxml.jackson.module:jackson-module-paranamer;2.20.1 -com.fasterxml.jackson.module:jackson-module-scala_2.11;2.20.1 -com.fasterxml.jackson.module:jackson-module-scala_2.12;2.20.1 -com.fasterxml.jackson.module:jackson-module-scala_2.13;2.20.1 -com.fasterxml.jackson.module:jackson-module-scala_3;2.20.1 -com.fasterxml.jackson:jackson-bom;2.20.1 -com.fasterxml:classmate;1.7.1 -com.github.ben-manes.caffeine:caffeine;3.2.3 -com.github.ben-manes.caffeine:guava;3.2.3 -com.github.ben-manes.caffeine:jcache;3.2.3 -com.github.ben-manes.caffeine:simulator;3.2.3 -com.github.mxab.thymeleaf.extras:thymeleaf-extras-data-attribute;2.0.1 -com.google.code.gson:gson;2.13.2 -com.graphql-java:graphql-java;25.0.beta-9 -com.h2database:h2;2.4.240 -com.hazelcast:hazelcast;5.5.0 -com.hazelcast:hazelcast-spring;5.5.0 -com.ibm.db2:jcc;12.1.2.0 -com.jayway.jsonpath:json-path;2.9.0 -com.jayway.jsonpath:json-path-assert;2.9.0 -com.microsoft.sqlserver:mssql-jdbc;13.2.1.jre11 -com.mysql:mysql-connector-j;9.4.0 -com.oracle.database.ha:ons;23.9.0.25.07 -com.oracle.database.ha:simplefan;23.9.0.25.07 -com.oracle.database.jdbc:ojdbc11;23.9.0.25.07 -com.oracle.database.jdbc:ojdbc11-production;23.9.0.25.07 -com.oracle.database.jdbc:ojdbc17;23.9.0.25.07 -com.oracle.database.jdbc:ojdbc17-production;23.9.0.25.07 -com.oracle.database.jdbc:ojdbc8;23.9.0.25.07 -com.oracle.database.jdbc:ojdbc8-production;23.9.0.25.07 -com.oracle.database.jdbc:rsi;23.9.0.25.07 -com.oracle.database.jdbc:ucp;23.9.0.25.07 -com.oracle.database.jdbc:ucp11;23.9.0.25.07 -com.oracle.database.jdbc:ucp17;23.9.0.25.07 -com.oracle.database.nls:orai18n;23.9.0.25.07 -com.oracle.database.r2dbc:oracle-r2dbc;1.3.0 -com.oracle.database.security:oraclepki;23.9.0.25.07 -com.oracle.database.xml:xdb;23.9.0.25.07 -com.oracle.database.xml:xmlparserv2;23.9.0.25.07 -com.querydsl:codegen-utils;5.1.0 -com.querydsl:querydsl-apt;5.1.0 -com.querydsl:querydsl-bom;5.1.0 -com.querydsl:querydsl-codegen;5.1.0 -com.querydsl:querydsl-collections;5.1.0 -com.querydsl:querydsl-core;5.1.0 -com.querydsl:querydsl-guava;5.1.0 -com.querydsl:querydsl-hibernate-search;5.1.0 -com.querydsl:querydsl-jdo;5.1.0 -com.querydsl:querydsl-jpa;5.1.0 -com.querydsl:querydsl-jpa-codegen;5.1.0 -com.querydsl:querydsl-kotlin;5.1.0 -com.querydsl:querydsl-kotlin-codegen;5.1.0 -com.querydsl:querydsl-lucene3;5.1.0 -com.querydsl:querydsl-lucene4;5.1.0 -com.querydsl:querydsl-lucene5;5.1.0 -com.querydsl:querydsl-mongodb;5.1.0 -com.querydsl:querydsl-scala;5.1.0 -com.querydsl:querydsl-spatial;5.1.0 -com.querydsl:querydsl-sql;5.1.0 -com.querydsl:querydsl-sql-codegen;5.1.0 -com.querydsl:querydsl-sql-spatial;5.1.0 -com.querydsl:querydsl-sql-spring;5.1.0 -com.rabbitmq:amqp-client;5.27.1 -com.rabbitmq:stream-client;0.23.0 -com.redis:testcontainers-redis;2.2.4 -com.samskivert:jmustache;1.16 -com.sendgrid:sendgrid-java;4.10.3 -com.sun.xml.bind:jaxb-core;4.0.6 -com.sun.xml.bind:jaxb-impl;4.0.6 -com.sun.xml.bind:jaxb-jxc;4.0.6 -com.sun.xml.bind:jaxb-osgi;4.0.6 -com.sun.xml.bind:jaxb-xjc;4.0.6 -com.sun.xml.messaging.saaj:saaj-impl;3.0.4 -com.unboundid:unboundid-ldapsdk;7.0.3 -com.zaxxer:HikariCP;7.0.2 -commons-codec:commons-codec;1.19.0 -commons-logging:commons-logging;1.3.5 -commons-pool:commons-pool;1.6 -io.asyncer:r2dbc-mysql;1.4.1 -io.github.git-commit-id:git-commit-id-maven-plugin;9.0.2 -io.lettuce:lettuce-core;6.8.1.RELEASE -io.micrometer:micrometer-bom;1.16.0-RC1 -io.micrometer:micrometer-registry-stackdriver;1.16.0-RC1 -io.micrometer:micrometer-tracing-bom;1.6.0-RC1 -io.netty:netty-all;4.2.7.Final -io.netty:netty-bom;4.2.7.Final -io.netty:netty-buffer;4.2.7.Final -io.netty:netty-codec;4.2.7.Final -io.netty:netty-codec-base;4.2.7.Final -io.netty:netty-codec-classes-quic;4.2.7.Final -io.netty:netty-codec-compression;4.2.7.Final -io.netty:netty-codec-dns;4.2.7.Final -io.netty:netty-codec-haproxy;4.2.7.Final -io.netty:netty-codec-http;4.2.7.Final -io.netty:netty-codec-http2;4.2.7.Final -io.netty:netty-codec-http3;4.2.7.Final -io.netty:netty-codec-marshalling;4.2.7.Final -io.netty:netty-codec-memcache;4.2.7.Final -io.netty:netty-codec-mqtt;4.2.7.Final -io.netty:netty-codec-native-quic;4.2.7.Final -io.netty:netty-codec-protobuf;4.2.7.Final -io.netty:netty-codec-redis;4.2.7.Final -io.netty:netty-codec-smtp;4.2.7.Final -io.netty:netty-codec-socks;4.2.7.Final -io.netty:netty-codec-stomp;4.2.7.Final -io.netty:netty-codec-xml;4.2.7.Final -io.netty:netty-common;4.2.7.Final -io.netty:netty-dev-tools;4.2.7.Final -io.netty:netty-handler;4.2.7.Final -io.netty:netty-handler-proxy;4.2.7.Final -io.netty:netty-handler-ssl-ocsp;4.2.7.Final -io.netty:netty-pkitesting;4.2.7.Final -io.netty:netty-resolver;4.2.7.Final -io.netty:netty-resolver-dns;4.2.7.Final -io.netty:netty-resolver-dns-classes-macos;4.2.7.Final -io.netty:netty-resolver-dns-native-macos;4.2.7.Final -io.netty:netty-tcnative;2.0.74.Final -io.netty:netty-tcnative-boringssl-static;2.0.74.Final -io.netty:netty-tcnative-classes;2.0.74.Final -io.netty:netty-transport;4.2.7.Final -io.netty:netty-transport-classes-epoll;4.2.7.Final -io.netty:netty-transport-classes-io_uring;4.2.7.Final -io.netty:netty-transport-classes-kqueue;4.2.7.Final -io.netty:netty-transport-native-epoll;4.2.7.Final -io.netty:netty-transport-native-io_uring;4.2.7.Final -io.netty:netty-transport-native-kqueue;4.2.7.Final -io.netty:netty-transport-native-unix-common;4.2.7.Final -io.netty:netty-transport-rxtx;4.2.7.Final -io.netty:netty-transport-sctp;4.2.7.Final -io.netty:netty-transport-udt;4.2.7.Final -io.opentelemetry:opentelemetry-api;1.55.0 -io.opentelemetry:opentelemetry-bom;1.55.0 -io.opentelemetry:opentelemetry-common;1.55.0 -io.opentelemetry:opentelemetry-context;1.55.0 -io.opentelemetry:opentelemetry-exporter-common;1.55.0 -io.opentelemetry:opentelemetry-exporter-logging;1.55.0 -io.opentelemetry:opentelemetry-exporter-logging-otlp;1.55.0 -io.opentelemetry:opentelemetry-exporter-otlp;1.55.0 -io.opentelemetry:opentelemetry-exporter-otlp-common;1.55.0 -io.opentelemetry:opentelemetry-exporter-sender-grpc-managed-channel;1.55.0 -io.opentelemetry:opentelemetry-exporter-sender-jdk;1.55.0 -io.opentelemetry:opentelemetry-exporter-sender-okhttp;1.55.0 -io.opentelemetry:opentelemetry-exporter-zipkin;1.55.0 -io.opentelemetry:opentelemetry-extension-kotlin;1.55.0 -io.opentelemetry:opentelemetry-extension-trace-propagators;1.55.0 -io.opentelemetry:opentelemetry-opentracing-shim;1.55.0 -io.opentelemetry:opentelemetry-sdk;1.55.0 -io.opentelemetry:opentelemetry-sdk-common;1.55.0 -io.opentelemetry:opentelemetry-sdk-extension-autoconfigure;1.55.0 -io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi;1.55.0 -io.opentelemetry:opentelemetry-sdk-extension-jaeger-remote-sampler;1.55.0 -io.opentelemetry:opentelemetry-sdk-logs;1.55.0 -io.opentelemetry:opentelemetry-sdk-metrics;1.55.0 -io.opentelemetry:opentelemetry-sdk-testing;1.55.0 -io.opentelemetry:opentelemetry-sdk-trace;1.55.0 -io.projectreactor.addons:reactor-adapter;3.6.0-RC6 -io.projectreactor.addons:reactor-extra;3.6.0-RC6 -io.projectreactor.addons:reactor-pool;1.2.0-RC1 -io.projectreactor.addons:reactor-pool-micrometer;0.3.0-RC1 -io.projectreactor.kotlin:reactor-kotlin-extensions;1.3.0-RC5 -io.projectreactor.netty:reactor-netty;1.3.0-RC1 -io.projectreactor.netty:reactor-netty-core;1.3.0-RC1 -io.projectreactor.netty:reactor-netty-http;1.3.0-RC1 -io.projectreactor.netty:reactor-netty-http-brave;1.3.0-RC1 -io.projectreactor.netty:reactor-netty-quic;1.0.0-RC1 -io.projectreactor:reactor-bom;2025.0.0-RC1 -io.projectreactor:reactor-core;3.8.0-RC1 -io.projectreactor:reactor-core-micrometer;1.3.0-RC1 -io.projectreactor:reactor-test;3.8.0-RC1 -io.projectreactor:reactor-tools;3.8.0-RC1 -io.prometheus:prometheus-metrics-bom;1.4.2 -io.prometheus:prometheus-metrics-config;1.4.2 -io.prometheus:prometheus-metrics-core;1.4.2 -io.prometheus:prometheus-metrics-exporter-common;1.4.2 -io.prometheus:prometheus-metrics-exporter-httpserver;1.4.2 -io.prometheus:prometheus-metrics-exporter-opentelemetry;1.4.2 -io.prometheus:prometheus-metrics-exporter-opentelemetry-no-otel;1.4.2 -io.prometheus:prometheus-metrics-exporter-opentelemetry-otel-agent-resources;1.4.2 -io.prometheus:prometheus-metrics-exporter-pushgateway;1.4.2 -io.prometheus:prometheus-metrics-exporter-servlet-jakarta;1.4.2 -io.prometheus:prometheus-metrics-exporter-servlet-javax;1.4.2 -io.prometheus:prometheus-metrics-exposition-formats;1.4.2 -io.prometheus:prometheus-metrics-exposition-formats-no-protobuf;1.4.2 -io.prometheus:prometheus-metrics-exposition-textformats;1.4.2 -io.prometheus:prometheus-metrics-instrumentation-caffeine;1.4.2 -io.prometheus:prometheus-metrics-instrumentation-dropwizard;1.4.2 -io.prometheus:prometheus-metrics-instrumentation-dropwizard5;1.4.2 -io.prometheus:prometheus-metrics-instrumentation-guava;1.4.2 -io.prometheus:prometheus-metrics-instrumentation-jvm;1.4.2 -io.prometheus:prometheus-metrics-model;1.4.2 -io.prometheus:prometheus-metrics-simpleclient-bridge;1.4.2 -io.prometheus:prometheus-metrics-tracer;1.4.2 -io.prometheus:prometheus-metrics-tracer-common;1.4.2 -io.prometheus:prometheus-metrics-tracer-initializer;1.4.2 -io.prometheus:prometheus-metrics-tracer-otel;1.4.2 -io.prometheus:prometheus-metrics-tracer-otel-agent;1.4.2 -io.prometheus:simpleclient;0.16.0 -io.prometheus:simpleclient_bom;0.16.0 -io.prometheus:simpleclient_caffeine;0.16.0 -io.prometheus:simpleclient_common;0.16.0 -io.prometheus:simpleclient_dropwizard;0.16.0 -io.prometheus:simpleclient_graphite_bridge;0.16.0 -io.prometheus:simpleclient_guava;0.16.0 -io.prometheus:simpleclient_hibernate;0.16.0 -io.prometheus:simpleclient_hotspot;0.16.0 -io.prometheus:simpleclient_httpserver;0.16.0 -io.prometheus:simpleclient_jetty;0.16.0 -io.prometheus:simpleclient_jetty_jdk8;0.16.0 -io.prometheus:simpleclient_log4j;0.16.0 -io.prometheus:simpleclient_log4j2;0.16.0 -io.prometheus:simpleclient_logback;0.16.0 -io.prometheus:simpleclient_pushgateway;0.16.0 -io.prometheus:simpleclient_servlet;0.16.0 -io.prometheus:simpleclient_servlet_jakarta;0.16.0 -io.prometheus:simpleclient_spring_boot;0.16.0 -io.prometheus:simpleclient_spring_web;0.16.0 -io.prometheus:simpleclient_tracer_common;0.16.0 -io.prometheus:simpleclient_tracer_otel;0.16.0 -io.prometheus:simpleclient_tracer_otel_agent;0.16.0 -io.prometheus:simpleclient_vertx;0.16.0 -io.r2dbc:r2dbc-h2;1.1.0.RELEASE -io.r2dbc:r2dbc-mssql;1.0.3.RELEASE -io.r2dbc:r2dbc-pool;1.0.2.RELEASE -io.r2dbc:r2dbc-proxy;1.1.6.RELEASE -io.r2dbc:r2dbc-spi;1.0.0.RELEASE -io.reactivex.rxjava3:rxjava;3.1.12 -io.rsocket:rsocket-bom;1.1.5 -io.rsocket:rsocket-core;1.1.5 -io.rsocket:rsocket-load-balancer;1.1.5 -io.rsocket:rsocket-micrometer;1.1.5 -io.rsocket:rsocket-test;1.1.5 -io.rsocket:rsocket-transport-local;1.1.5 -io.rsocket:rsocket-transport-netty;1.1.5 -io.spring.gradle:dependency-management-plugin;1.1.7 -io.zipkin.brave:brave;6.3.0 -io.zipkin.brave:brave-bom;6.3.0 -io.zipkin.brave:brave-context-jfr;6.3.0 -io.zipkin.brave:brave-context-log4j12;6.3.0 -io.zipkin.brave:brave-context-log4j2;6.3.0 -io.zipkin.brave:brave-context-slf4j;6.3.0 -io.zipkin.brave:brave-instrumentation-dubbo;6.3.0 -io.zipkin.brave:brave-instrumentation-grpc;6.3.0 -io.zipkin.brave:brave-instrumentation-http;6.3.0 -io.zipkin.brave:brave-instrumentation-http-tests;6.3.0 -io.zipkin.brave:brave-instrumentation-http-tests-jakarta;6.3.0 -io.zipkin.brave:brave-instrumentation-httpasyncclient;6.3.0 -io.zipkin.brave:brave-instrumentation-httpclient;6.3.0 -io.zipkin.brave:brave-instrumentation-httpclient5;6.3.0 -io.zipkin.brave:brave-instrumentation-jakarta-jms;6.3.0 -io.zipkin.brave:brave-instrumentation-jaxrs2;6.3.0 -io.zipkin.brave:brave-instrumentation-jdbi3;6.3.0 -io.zipkin.brave:brave-instrumentation-jersey-server;6.3.0 -io.zipkin.brave:brave-instrumentation-jersey-server-jakarta;6.3.0 -io.zipkin.brave:brave-instrumentation-jms;6.3.0 -io.zipkin.brave:brave-instrumentation-jms-jakarta;6.3.0 -io.zipkin.brave:brave-instrumentation-kafka-clients;6.3.0 -io.zipkin.brave:brave-instrumentation-kafka-streams;6.3.0 -io.zipkin.brave:brave-instrumentation-messaging;6.3.0 -io.zipkin.brave:brave-instrumentation-mongodb;6.3.0 -io.zipkin.brave:brave-instrumentation-mysql;6.3.0 -io.zipkin.brave:brave-instrumentation-mysql6;6.3.0 -io.zipkin.brave:brave-instrumentation-mysql8;6.3.0 -io.zipkin.brave:brave-instrumentation-netty-codec-http;6.3.0 -io.zipkin.brave:brave-instrumentation-okhttp3;6.3.0 -io.zipkin.brave:brave-instrumentation-rocketmq-client;6.3.0 -io.zipkin.brave:brave-instrumentation-rpc;6.3.0 -io.zipkin.brave:brave-instrumentation-servlet;6.3.0 -io.zipkin.brave:brave-instrumentation-servlet-jakarta;6.3.0 -io.zipkin.brave:brave-instrumentation-spring-rabbit;6.3.0 -io.zipkin.brave:brave-instrumentation-spring-web;6.3.0 -io.zipkin.brave:brave-instrumentation-spring-webmvc;6.3.0 -io.zipkin.brave:brave-instrumentation-vertx-web;6.3.0 -io.zipkin.brave:brave-spring-beans;6.3.0 -io.zipkin.brave:brave-tests;6.3.0 -io.zipkin.reporter2:zipkin-reporter;3.5.1 -io.zipkin.reporter2:zipkin-reporter-bom;3.5.1 -io.zipkin.reporter2:zipkin-reporter-brave;3.5.1 -io.zipkin.reporter2:zipkin-reporter-metrics-micrometer;3.5.1 -io.zipkin.reporter2:zipkin-reporter-spring-beans;3.5.1 -io.zipkin.reporter2:zipkin-sender-activemq-client;3.5.1 -io.zipkin.reporter2:zipkin-sender-amqp-client;3.5.1 -io.zipkin.reporter2:zipkin-sender-kafka;3.5.1 -io.zipkin.reporter2:zipkin-sender-libthrift;3.5.1 -io.zipkin.reporter2:zipkin-sender-okhttp3;3.5.1 -io.zipkin.reporter2:zipkin-sender-pulsar-client;3.5.1 -io.zipkin.reporter2:zipkin-sender-urlconnection;3.5.1 -jakarta.activation:jakarta.activation-api;2.1.4 -jakarta.annotation:jakarta.annotation-api;3.0.0 -jakarta.inject:jakarta.inject-api;2.0.1 -jakarta.jms:jakarta.jms-api;3.1.0 -jakarta.json.bind:jakarta.json.bind-api;3.0.1 -jakarta.json:jakarta.json-api;2.1.3 -jakarta.mail:jakarta.mail-api;2.1.5 -jakarta.management.j2ee:jakarta.management.j2ee-api;1.1.4 -jakarta.persistence:jakarta.persistence-api;3.2.0 -jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api;3.0.2 -jakarta.servlet:jakarta.servlet-api;6.1.0 -jakarta.transaction:jakarta.transaction-api;2.0.1 -jakarta.validation:jakarta.validation-api;3.1.1 -jakarta.websocket:jakarta.websocket-api;2.2.0 -jakarta.websocket:jakarta.websocket-client-api;2.2.0 -jakarta.ws.rs:jakarta.ws.rs-api;4.0.0 -jakarta.xml.bind:jakarta.xml.bind-api;4.0.4 -jakarta.xml.soap:jakarta.xml.soap-api;3.0.2 -jakarta.xml.ws:jakarta.xml.ws-api;4.0.2 -javax.cache:cache-api;1.1.1 -javax.money:money-api;1.1 -jaxen:jaxen;2.0.0 -junit:junit;4.13.2 -net.bytebuddy:byte-buddy;1.17.8 -net.bytebuddy:byte-buddy-agent;1.17.8 -net.minidev:json-smart;2.6.0 -net.sourceforge.jtds:jtds;1.3.1 -net.sourceforge.nekohtml:nekohtml;1.9.22 -nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect;3.4.0 -org.apache.activemq:activemq-all;6.1.8 -org.apache.activemq:activemq-amqp;6.1.8 -org.apache.activemq:activemq-blueprint;6.1.8 -org.apache.activemq:activemq-bom;6.1.8 -org.apache.activemq:activemq-broker;6.1.8 -org.apache.activemq:activemq-client;6.1.8 -org.apache.activemq:activemq-console;6.1.8 -org.apache.activemq:activemq-http;6.1.8 -org.apache.activemq:activemq-jaas;6.1.8 -org.apache.activemq:activemq-jdbc-store;6.1.8 -org.apache.activemq:activemq-jms-pool;6.1.8 -org.apache.activemq:activemq-kahadb-store;6.1.8 -org.apache.activemq:activemq-karaf;6.1.8 -org.apache.activemq:activemq-log4j-appender;6.1.8 -org.apache.activemq:activemq-mqtt;6.1.8 -org.apache.activemq:activemq-openwire-generator;6.1.8 -org.apache.activemq:activemq-openwire-legacy;6.1.8 -org.apache.activemq:activemq-osgi;6.1.8 -org.apache.activemq:activemq-pool;6.1.8 -org.apache.activemq:activemq-ra;6.1.8 -org.apache.activemq:activemq-rar;6.1.8 -org.apache.activemq:activemq-run;6.1.8 -org.apache.activemq:activemq-runtime-config;6.1.8 -org.apache.activemq:activemq-shiro;6.1.8 -org.apache.activemq:activemq-spring;6.1.8 -org.apache.activemq:activemq-stomp;6.1.8 -org.apache.activemq:activemq-web;6.1.8 -org.apache.activemq:activemq-web-console;6.1.8 -org.apache.activemq:activemq-web-demo;6.1.8 -org.apache.activemq:artemis-amqp-protocol;2.43.0 -org.apache.activemq:artemis-bom;2.43.0 -org.apache.activemq:artemis-boot;2.43.0 -org.apache.activemq:artemis-cdi-client;2.43.0 -org.apache.activemq:artemis-cli;2.43.0 -org.apache.activemq:artemis-commons;2.43.0 -org.apache.activemq:artemis-console;2.43.0 -org.apache.activemq:artemis-core-client;2.43.0 -org.apache.activemq:artemis-core-client-all;2.43.0 -org.apache.activemq:artemis-core-client-osgi;2.43.0 -org.apache.activemq:artemis-dto;2.43.0 -org.apache.activemq:artemis-features;2.43.0 -org.apache.activemq:artemis-hornetq-protocol;2.43.0 -org.apache.activemq:artemis-hqclient-protocol;2.43.0 -org.apache.activemq:artemis-jakarta-cdi-client;2.43.0 -org.apache.activemq:artemis-jakarta-client;2.43.0 -org.apache.activemq:artemis-jakarta-client-all;2.43.0 -org.apache.activemq:artemis-jakarta-openwire-protocol;2.43.0 -org.apache.activemq:artemis-jakarta-ra;2.43.0 -org.apache.activemq:artemis-jakarta-server;2.43.0 -org.apache.activemq:artemis-jakarta-service-extensions;2.43.0 -org.apache.activemq:artemis-jdbc-store;2.43.0 -org.apache.activemq:artemis-jms-client;2.43.0 -org.apache.activemq:artemis-jms-client-all;2.43.0 -org.apache.activemq:artemis-jms-client-osgi;2.43.0 -org.apache.activemq:artemis-jms-server;2.43.0 -org.apache.activemq:artemis-journal;2.43.0 -org.apache.activemq:artemis-lockmanager-api;2.43.0 -org.apache.activemq:artemis-lockmanager-ri;2.43.0 -org.apache.activemq:artemis-mqtt-protocol;2.43.0 -org.apache.activemq:artemis-openwire-protocol;2.43.0 -org.apache.activemq:artemis-ra;2.43.0 -org.apache.activemq:artemis-selector;2.43.0 -org.apache.activemq:artemis-server;2.43.0 -org.apache.activemq:artemis-server-osgi;2.43.0 -org.apache.activemq:artemis-service-extensions;2.43.0 -org.apache.activemq:artemis-stomp-protocol;2.43.0 -org.apache.activemq:artemis-web;2.43.0 -org.apache.activemq:artemis-website;2.43.0 -org.apache.cassandra:java-driver-bom;4.19.0 -org.apache.cassandra:java-driver-core;4.19.0 -org.apache.cassandra:java-driver-core-shaded;4.19.0 -org.apache.cassandra:java-driver-guava-shaded;4.19.0 -org.apache.cassandra:java-driver-mapper-processor;4.19.0 -org.apache.cassandra:java-driver-mapper-runtime;4.19.0 -org.apache.cassandra:java-driver-metrics-micrometer;4.19.0 -org.apache.cassandra:java-driver-metrics-microprofile;4.19.0 -org.apache.cassandra:java-driver-query-builder;4.19.0 -org.apache.cassandra:java-driver-test-infra;4.19.0 -org.apache.commons:commons-dbcp2;2.13.0 -org.apache.commons:commons-lang3;3.19.0 -org.apache.commons:commons-pool2;2.12.1 -org.apache.derby:derby;10.16.1.1 -org.apache.derby:derbyclient;10.16.1.1 -org.apache.derby:derbynet;10.16.1.1 -org.apache.derby:derbyoptionaltools;10.16.1.1 -org.apache.derby:derbyshared;10.16.1.1 -org.apache.derby:derbytools;10.16.1.1 -org.apache.groovy:groovy;5.0.2 -org.apache.groovy:groovy-ant;5.0.2 -org.apache.groovy:groovy-astbuilder;5.0.2 -org.apache.groovy:groovy-bom;5.0.2 -org.apache.groovy:groovy-cli-commons;5.0.2 -org.apache.groovy:groovy-cli-picocli;5.0.2 -org.apache.groovy:groovy-console;5.0.2 -org.apache.groovy:groovy-contracts;5.0.2 -org.apache.groovy:groovy-datetime;5.0.2 -org.apache.groovy:groovy-dateutil;5.0.2 -org.apache.groovy:groovy-docgenerator;5.0.2 -org.apache.groovy:groovy-ginq;5.0.2 -org.apache.groovy:groovy-groovydoc;5.0.2 -org.apache.groovy:groovy-groovysh;5.0.2 -org.apache.groovy:groovy-jmx;5.0.2 -org.apache.groovy:groovy-json;5.0.2 -org.apache.groovy:groovy-jsr223;5.0.2 -org.apache.groovy:groovy-macro;5.0.2 -org.apache.groovy:groovy-macro-library;5.0.2 -org.apache.groovy:groovy-nio;5.0.2 -org.apache.groovy:groovy-servlet;5.0.2 -org.apache.groovy:groovy-sql;5.0.2 -org.apache.groovy:groovy-swing;5.0.2 -org.apache.groovy:groovy-templates;5.0.2 -org.apache.groovy:groovy-test;5.0.2 -org.apache.groovy:groovy-test-junit5;5.0.2 -org.apache.groovy:groovy-testng;5.0.2 -org.apache.groovy:groovy-toml;5.0.2 -org.apache.groovy:groovy-typecheckers;5.0.2 -org.apache.groovy:groovy-xml;5.0.2 -org.apache.groovy:groovy-yaml;5.0.2 -org.apache.httpcomponents.client5:httpclient5;5.5.1 -org.apache.httpcomponents.client5:httpclient5-cache;5.5.1 -org.apache.httpcomponents.client5:httpclient5-fluent;5.5.1 -org.apache.httpcomponents.core5:httpcore5;5.3.6 -org.apache.httpcomponents.core5:httpcore5-h2;5.3.6 -org.apache.httpcomponents.core5:httpcore5-reactive;5.3.6 -org.apache.httpcomponents:httpasyncclient;4.1.5 -org.apache.httpcomponents:httpcore;4.4.16 -org.apache.httpcomponents:httpcore-nio;4.4.16 -org.apache.kafka:connect;4.1.0 -org.apache.kafka:connect-api;4.1.0 -org.apache.kafka:connect-basic-auth-extension;4.1.0 -org.apache.kafka:connect-file;4.1.0 -org.apache.kafka:connect-json;4.1.0 -org.apache.kafka:connect-mirror;4.1.0 -org.apache.kafka:connect-mirror-client;4.1.0 -org.apache.kafka:connect-runtime;4.1.0 -org.apache.kafka:connect-transforms;4.1.0 -org.apache.kafka:generator;4.1.0 -org.apache.kafka:kafka-clients;4.1.0 -org.apache.kafka:kafka-log4j-appender;4.1.0 -org.apache.kafka:kafka-metadata;4.1.0 -org.apache.kafka:kafka-raft;4.1.0 -org.apache.kafka:kafka-server;4.1.0 -org.apache.kafka:kafka-server-common;4.1.0 -org.apache.kafka:kafka-shell;4.1.0 -org.apache.kafka:kafka-storage;4.1.0 -org.apache.kafka:kafka-storage-api;4.1.0 -org.apache.kafka:kafka-streams;4.1.0 -org.apache.kafka:kafka-streams-scala_2.12;4.1.0 -org.apache.kafka:kafka-streams-scala_2.13;4.1.0 -org.apache.kafka:kafka-streams-test-utils;4.1.0 -org.apache.kafka:kafka-tools;4.1.0 -org.apache.kafka:kafka_2.12;4.1.0 -org.apache.kafka:kafka_2.13;4.1.0 -org.apache.kafka:trogdor;4.1.0 -org.apache.logging.log4j:log4j-1.2-api;2.25.2 -org.apache.logging.log4j:log4j-api;2.25.2 -org.apache.logging.log4j:log4j-api-test;2.25.2 -org.apache.logging.log4j:log4j-appserver;2.25.2 -org.apache.logging.log4j:log4j-bom;2.25.2 -org.apache.logging.log4j:log4j-cassandra;2.25.2 -org.apache.logging.log4j:log4j-core;2.25.2 -org.apache.logging.log4j:log4j-core-test;2.25.2 -org.apache.logging.log4j:log4j-couchdb;2.25.2 -org.apache.logging.log4j:log4j-docker;2.25.2 -org.apache.logging.log4j:log4j-flume-ng;2.23.1 -org.apache.logging.log4j:log4j-iostreams;2.25.2 -org.apache.logging.log4j:log4j-jakarta-jms;2.25.2 -org.apache.logging.log4j:log4j-jakarta-smtp;2.25.2 -org.apache.logging.log4j:log4j-jakarta-web;2.25.2 -org.apache.logging.log4j:log4j-jcl;2.25.2 -org.apache.logging.log4j:log4j-jpa;2.25.2 -org.apache.logging.log4j:log4j-jpl;2.25.2 -org.apache.logging.log4j:log4j-jul;2.25.2 -org.apache.logging.log4j:log4j-layout-template-json;2.25.2 -org.apache.logging.log4j:log4j-mongodb;2.25.2 -org.apache.logging.log4j:log4j-mongodb4;2.25.2 -org.apache.logging.log4j:log4j-slf4j-impl;2.25.2 -org.apache.logging.log4j:log4j-slf4j2-impl;2.25.2 -org.apache.logging.log4j:log4j-spring-boot;2.25.2 -org.apache.logging.log4j:log4j-spring-cloud-config-client;2.25.2 -org.apache.logging.log4j:log4j-taglib;2.25.2 -org.apache.logging.log4j:log4j-to-jul;2.25.2 -org.apache.logging.log4j:log4j-to-slf4j;2.25.2 -org.apache.logging.log4j:log4j-web;2.25.2 -org.apache.maven.plugins:maven-antrun-plugin;3.2.0 -org.apache.maven.plugins:maven-assembly-plugin;3.7.1 -org.apache.maven.plugins:maven-clean-plugin;3.5.0 -org.apache.maven.plugins:maven-compiler-plugin;3.14.1 -org.apache.maven.plugins:maven-dependency-plugin;3.9.0 -org.apache.maven.plugins:maven-deploy-plugin;3.1.4 -org.apache.maven.plugins:maven-enforcer-plugin;3.6.2 -org.apache.maven.plugins:maven-failsafe-plugin;3.5.4 -org.apache.maven.plugins:maven-help-plugin;3.5.1 -org.apache.maven.plugins:maven-install-plugin;3.1.4 -org.apache.maven.plugins:maven-invoker-plugin;3.9.1 -org.apache.maven.plugins:maven-jar-plugin;3.4.2 -org.apache.maven.plugins:maven-javadoc-plugin;3.12.0 -org.apache.maven.plugins:maven-resources-plugin;3.3.1 -org.apache.maven.plugins:maven-shade-plugin;3.6.1 -org.apache.maven.plugins:maven-source-plugin;3.3.1 -org.apache.maven.plugins:maven-surefire-plugin;3.5.4 -org.apache.maven.plugins:maven-war-plugin;3.4.0 -org.apache.pulsar:bouncy-castle-bc;4.1.1 -org.apache.pulsar:bouncy-castle-bcfips;4.1.1 -org.apache.pulsar:bouncy-castle-parent;4.1.1 -org.apache.pulsar:buildtools;4.1.1 -org.apache.pulsar:distribution;4.1.1 -org.apache.pulsar:docker-images;4.1.1 -org.apache.pulsar:jclouds-shaded;4.1.1 -org.apache.pulsar:managed-ledger;4.1.1 -org.apache.pulsar:pulsar;4.1.1 -org.apache.pulsar:pulsar-all-docker-image;4.1.1 -org.apache.pulsar:pulsar-bom;4.1.1 -org.apache.pulsar:pulsar-broker;4.1.1 -org.apache.pulsar:pulsar-broker-auth-athenz;4.1.1 -org.apache.pulsar:pulsar-broker-auth-oidc;4.1.1 -org.apache.pulsar:pulsar-broker-auth-sasl;4.1.1 -org.apache.pulsar:pulsar-broker-common;4.1.1 -org.apache.pulsar:pulsar-cli-utils;4.1.1 -org.apache.pulsar:pulsar-client;4.1.1 -org.apache.pulsar:pulsar-client-admin;4.1.1 -org.apache.pulsar:pulsar-client-admin-api;4.1.1 -org.apache.pulsar:pulsar-client-admin-original;4.1.1 -org.apache.pulsar:pulsar-client-all;4.1.1 -org.apache.pulsar:pulsar-client-api;4.1.1 -org.apache.pulsar:pulsar-client-auth-athenz;4.1.1 -org.apache.pulsar:pulsar-client-auth-sasl;4.1.1 -org.apache.pulsar:pulsar-client-messagecrypto-bc;4.1.1 -org.apache.pulsar:pulsar-client-original;4.1.1 -org.apache.pulsar:pulsar-client-tools;4.1.1 -org.apache.pulsar:pulsar-client-tools-api;4.1.1 -org.apache.pulsar:pulsar-common;4.1.1 -org.apache.pulsar:pulsar-config-validation;4.1.1 -org.apache.pulsar:pulsar-docker-image;4.1.1 -org.apache.pulsar:pulsar-docs-tools;4.1.1 -org.apache.pulsar:pulsar-functions;4.1.1 -org.apache.pulsar:pulsar-functions-api;4.1.1 -org.apache.pulsar:pulsar-functions-api-examples;4.1.1 -org.apache.pulsar:pulsar-functions-api-examples-builtin;4.1.1 -org.apache.pulsar:pulsar-functions-instance;4.1.1 -org.apache.pulsar:pulsar-functions-local-runner;4.1.1 -org.apache.pulsar:pulsar-functions-local-runner-original;4.1.1 -org.apache.pulsar:pulsar-functions-proto;4.1.1 -org.apache.pulsar:pulsar-functions-runtime;4.1.1 -org.apache.pulsar:pulsar-functions-runtime-all;4.1.1 -org.apache.pulsar:pulsar-functions-secrets;4.1.1 -org.apache.pulsar:pulsar-functions-utils;4.1.1 -org.apache.pulsar:pulsar-functions-worker;4.1.1 -org.apache.pulsar:pulsar-io;4.1.1 -org.apache.pulsar:pulsar-io-aerospike;4.1.1 -org.apache.pulsar:pulsar-io-alluxio;4.1.1 -org.apache.pulsar:pulsar-io-aws;4.1.1 -org.apache.pulsar:pulsar-io-batch-data-generator;4.1.1 -org.apache.pulsar:pulsar-io-batch-discovery-triggerers;4.1.1 -org.apache.pulsar:pulsar-io-canal;4.1.1 -org.apache.pulsar:pulsar-io-cassandra;4.1.1 -org.apache.pulsar:pulsar-io-common;4.1.1 -org.apache.pulsar:pulsar-io-core;4.1.1 -org.apache.pulsar:pulsar-io-data-generator;4.1.1 -org.apache.pulsar:pulsar-io-debezium;4.1.1 -org.apache.pulsar:pulsar-io-debezium-core;4.1.1 -org.apache.pulsar:pulsar-io-debezium-mongodb;4.1.1 -org.apache.pulsar:pulsar-io-debezium-mssql;4.1.1 -org.apache.pulsar:pulsar-io-debezium-mysql;4.1.1 -org.apache.pulsar:pulsar-io-debezium-oracle;4.1.1 -org.apache.pulsar:pulsar-io-debezium-postgres;4.1.1 -org.apache.pulsar:pulsar-io-distribution;4.1.1 -org.apache.pulsar:pulsar-io-docs;4.1.1 -org.apache.pulsar:pulsar-io-dynamodb;4.1.1 -org.apache.pulsar:pulsar-io-elastic-search;4.1.1 -org.apache.pulsar:pulsar-io-file;4.1.1 -org.apache.pulsar:pulsar-io-flume;4.1.1 -org.apache.pulsar:pulsar-io-hbase;4.1.1 -org.apache.pulsar:pulsar-io-hdfs3;4.1.1 -org.apache.pulsar:pulsar-io-http;4.1.1 -org.apache.pulsar:pulsar-io-influxdb;4.1.1 -org.apache.pulsar:pulsar-io-jdbc;4.1.1 -org.apache.pulsar:pulsar-io-jdbc-clickhouse;4.1.1 -org.apache.pulsar:pulsar-io-jdbc-core;4.1.1 -org.apache.pulsar:pulsar-io-jdbc-mariadb;4.1.1 -org.apache.pulsar:pulsar-io-jdbc-openmldb;4.1.1 -org.apache.pulsar:pulsar-io-jdbc-postgres;4.1.1 -org.apache.pulsar:pulsar-io-jdbc-sqlite;4.1.1 -org.apache.pulsar:pulsar-io-kafka;4.1.1 -org.apache.pulsar:pulsar-io-kafka-connect-adaptor;4.1.1 -org.apache.pulsar:pulsar-io-kafka-connect-adaptor-nar;4.1.1 -org.apache.pulsar:pulsar-io-kinesis;4.1.1 -org.apache.pulsar:pulsar-io-mongo;4.1.1 -org.apache.pulsar:pulsar-io-netty;4.1.1 -org.apache.pulsar:pulsar-io-nsq;4.1.1 -org.apache.pulsar:pulsar-io-rabbitmq;4.1.1 -org.apache.pulsar:pulsar-io-redis;4.1.1 -org.apache.pulsar:pulsar-io-solr;4.1.1 -org.apache.pulsar:pulsar-io-twitter;4.1.1 -org.apache.pulsar:pulsar-metadata;4.1.1 -org.apache.pulsar:pulsar-offloader-distribution;4.1.1 -org.apache.pulsar:pulsar-package-bookkeeper-storage;4.1.1 -org.apache.pulsar:pulsar-package-core;4.1.1 -org.apache.pulsar:pulsar-package-filesystem-storage;4.1.1 -org.apache.pulsar:pulsar-package-management;4.1.1 -org.apache.pulsar:pulsar-proxy;4.1.1 -org.apache.pulsar:pulsar-server-distribution;4.1.1 -org.apache.pulsar:pulsar-shell-distribution;4.1.1 -org.apache.pulsar:pulsar-testclient;4.1.1 -org.apache.pulsar:pulsar-transaction-common;4.1.1 -org.apache.pulsar:pulsar-transaction-coordinator;4.1.1 -org.apache.pulsar:pulsar-transaction-parent;4.1.1 -org.apache.pulsar:pulsar-websocket;4.1.1 -org.apache.pulsar:structured-event-log;4.1.1 -org.apache.pulsar:testmocks;4.1.1 -org.apache.pulsar:tiered-storage-file-system;4.1.1 -org.apache.pulsar:tiered-storage-jcloud;4.1.1 -org.apache.pulsar:tiered-storage-parent;4.1.1 -org.apache.tomcat.embed:tomcat-embed-core;11.0.13 -org.apache.tomcat.embed:tomcat-embed-el;11.0.13 -org.apache.tomcat.embed:tomcat-embed-jasper;11.0.13 -org.apache.tomcat.embed:tomcat-embed-websocket;11.0.13 -org.apache.tomcat:tomcat-annotations-api;11.0.13 -org.apache.tomcat:tomcat-jdbc;11.0.13 -org.apache.tomcat:tomcat-jsp-api;11.0.13 -org.aspectj:aspectjrt;1.9.25 -org.aspectj:aspectjtools;1.9.25 -org.aspectj:aspectjweaver;1.9.25 -org.assertj:assertj-bom;3.27.6 -org.assertj:assertj-core;3.27.6 -org.assertj:assertj-guava;3.27.6 -org.awaitility:awaitility;4.3.0 -org.awaitility:awaitility-groovy;4.3.0 -org.awaitility:awaitility-kotlin;4.3.0 -org.awaitility:awaitility-scala;4.3.0 -org.cache2k:cache2k-api;2.6.1.Final -org.cache2k:cache2k-config;2.6.1.Final -org.cache2k:cache2k-core;2.6.1.Final -org.cache2k:cache2k-jcache;2.6.1.Final -org.cache2k:cache2k-micrometer;2.6.1.Final -org.cache2k:cache2k-spring;2.6.1.Final -org.codehaus.janino:commons-compiler;3.1.12 -org.codehaus.janino:commons-compiler-jdk;3.1.12 -org.codehaus.janino:janino;3.1.12 -org.codehaus.mojo:build-helper-maven-plugin;3.6.1 -org.codehaus.mojo:versions-maven-plugin;2.19.1 -org.codehaus.mojo:xml-maven-plugin;1.2.0 -org.crac:crac;1.5.0 -org.cyclonedx:cyclonedx-maven-plugin;2.9.1 -org.eclipse.angus:angus-core;2.0.5 -org.eclipse.angus:angus-mail;2.0.5 -org.eclipse.angus:dsn;2.0.5 -org.eclipse.angus:gimap;2.0.5 -org.eclipse.angus:imap;2.0.5 -org.eclipse.angus:jakarta.mail;2.0.5 -org.eclipse.angus:logging-mailhandler;2.0.5 -org.eclipse.angus:pop3;2.0.5 -org.eclipse.angus:smtp;2.0.5 -org.eclipse.jetty.compression:jetty-compression-brotli;12.1.3 -org.eclipse.jetty.compression:jetty-compression-common;12.1.3 -org.eclipse.jetty.compression:jetty-compression-gzip;12.1.3 -org.eclipse.jetty.compression:jetty-compression-server;12.1.3 -org.eclipse.jetty.compression:jetty-compression-zstandard;12.1.3 -org.eclipse.jetty.demos:jetty-core-demo-handler;12.1.3 -org.eclipse.jetty.ee11.osgi:jetty-ee11-osgi-alpn;12.1.3 -org.eclipse.jetty.ee11.osgi:jetty-ee11-osgi-boot;12.1.3 -org.eclipse.jetty.ee11.osgi:jetty-ee11-osgi-boot-jsp;12.1.3 -org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jakarta-client;12.1.3 -org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jakarta-client-webapp;12.1.3 -org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jakarta-common;12.1.3 -org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jakarta-server;12.1.3 -org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jetty-client-webapp;12.1.3 -org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jetty-server;12.1.3 -org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-servlet;12.1.3 -org.eclipse.jetty.ee11:jetty-ee11-annotations;12.1.3 -org.eclipse.jetty.ee11:jetty-ee11-apache-jsp;12.1.3 -org.eclipse.jetty.ee11:jetty-ee11-bom;12.1.3 -org.eclipse.jetty.ee11:jetty-ee11-cdi;12.1.3 -org.eclipse.jetty.ee11:jetty-ee11-fcgi-proxy;12.1.3 -org.eclipse.jetty.ee11:jetty-ee11-glassfish-jstl;12.1.3 -org.eclipse.jetty.ee11:jetty-ee11-jaspi;12.1.3 -org.eclipse.jetty.ee11:jetty-ee11-jndi;12.1.3 -org.eclipse.jetty.ee11:jetty-ee11-jspc-maven-plugin;12.1.3 -org.eclipse.jetty.ee11:jetty-ee11-maven-plugin;12.1.3 -org.eclipse.jetty.ee11:jetty-ee11-plus;12.1.3 -org.eclipse.jetty.ee11:jetty-ee11-proxy;12.1.3 -org.eclipse.jetty.ee11:jetty-ee11-quickstart;12.1.3 -org.eclipse.jetty.ee11:jetty-ee11-servlet;12.1.3 -org.eclipse.jetty.ee11:jetty-ee11-servlets;12.1.3 -org.eclipse.jetty.ee11:jetty-ee11-webapp;12.1.3 -org.eclipse.jetty.ee:jetty-ee-webapp;12.1.3 -org.eclipse.jetty.fcgi:jetty-fcgi-client;12.1.3 -org.eclipse.jetty.fcgi:jetty-fcgi-proxy;12.1.3 -org.eclipse.jetty.fcgi:jetty-fcgi-server;12.1.3 -org.eclipse.jetty.http2:jetty-http2-client;12.1.3 -org.eclipse.jetty.http2:jetty-http2-client-transport;12.1.3 -org.eclipse.jetty.http2:jetty-http2-common;12.1.3 -org.eclipse.jetty.http2:jetty-http2-hpack;12.1.3 -org.eclipse.jetty.http2:jetty-http2-server;12.1.3 -org.eclipse.jetty.http3:jetty-http3-client;12.1.3 -org.eclipse.jetty.http3:jetty-http3-client-transport;12.1.3 -org.eclipse.jetty.http3:jetty-http3-common;12.1.3 -org.eclipse.jetty.http3:jetty-http3-qpack;12.1.3 -org.eclipse.jetty.http3:jetty-http3-server;12.1.3 -org.eclipse.jetty.quic:jetty-quic-common;12.1.3 -org.eclipse.jetty.quic:jetty-quic-quiche-client;12.1.3 -org.eclipse.jetty.quic:jetty-quic-quiche-common;12.1.3 -org.eclipse.jetty.quic:jetty-quic-quiche-foreign;12.1.3 -org.eclipse.jetty.quic:jetty-quic-quiche-jna;12.1.3 -org.eclipse.jetty.quic:jetty-quic-server;12.1.3 -org.eclipse.jetty.websocket:jetty-websocket-core-client;12.1.3 -org.eclipse.jetty.websocket:jetty-websocket-core-common;12.1.3 -org.eclipse.jetty.websocket:jetty-websocket-core-server;12.1.3 -org.eclipse.jetty.websocket:jetty-websocket-jetty-api;12.1.3 -org.eclipse.jetty.websocket:jetty-websocket-jetty-client;12.1.3 -org.eclipse.jetty.websocket:jetty-websocket-jetty-common;12.1.3 -org.eclipse.jetty.websocket:jetty-websocket-jetty-server;12.1.3 -org.eclipse.jetty:jetty-alpn-client;12.1.3 -org.eclipse.jetty:jetty-alpn-conscrypt-client;12.1.3 -org.eclipse.jetty:jetty-alpn-conscrypt-server;12.1.3 -org.eclipse.jetty:jetty-alpn-java-client;12.1.3 -org.eclipse.jetty:jetty-alpn-java-server;12.1.3 -org.eclipse.jetty:jetty-alpn-server;12.1.3 -org.eclipse.jetty:jetty-bom;12.1.3 -org.eclipse.jetty:jetty-client;12.1.3 -org.eclipse.jetty:jetty-coreapp;12.1.3 -org.eclipse.jetty:jetty-deploy;12.1.3 -org.eclipse.jetty:jetty-ethereum;12.1.3 -org.eclipse.jetty:jetty-http;12.1.3 -org.eclipse.jetty:jetty-http-spi;12.1.3 -org.eclipse.jetty:jetty-http-tools;12.1.3 -org.eclipse.jetty:jetty-io;12.1.3 -org.eclipse.jetty:jetty-jmx;12.1.3 -org.eclipse.jetty:jetty-jndi;12.1.3 -org.eclipse.jetty:jetty-keystore;12.1.3 -org.eclipse.jetty:jetty-openid;12.1.3 -org.eclipse.jetty:jetty-osgi;12.1.3 -org.eclipse.jetty:jetty-plus;12.1.3 -org.eclipse.jetty:jetty-proxy;12.1.3 -org.eclipse.jetty:jetty-reactive-httpclient;4.1.0 -org.eclipse.jetty:jetty-rewrite;12.1.3 -org.eclipse.jetty:jetty-security;12.1.3 -org.eclipse.jetty:jetty-server;12.1.3 -org.eclipse.jetty:jetty-session;12.1.3 -org.eclipse.jetty:jetty-slf4j-impl;12.1.3 -org.eclipse.jetty:jetty-start;12.1.3 -org.eclipse.jetty:jetty-staticapp;12.1.3 -org.eclipse.jetty:jetty-unixdomain-server;12.1.3 -org.eclipse.jetty:jetty-util;12.1.3 -org.eclipse.jetty:jetty-util-ajax;12.1.3 -org.eclipse.jetty:jetty-xml;12.1.3 -org.eclipse:yasson;3.0.4 -org.ehcache:ehcache;3.11.1 -org.ehcache:ehcache-clustered;3.11.1 -org.ehcache:ehcache-transactions;3.11.1 -org.firebirdsql.jdbc:jaybird;6.0.3 -org.flywaydb:flyway-commandline;11.14.1 -org.flywaydb:flyway-core;11.14.1 -org.flywaydb:flyway-database-cassandra;11.14.1 -org.flywaydb:flyway-database-db2;11.14.1 -org.flywaydb:flyway-database-derby;11.14.1 -org.flywaydb:flyway-database-hsqldb;11.14.1 -org.flywaydb:flyway-database-informix;11.14.1 -org.flywaydb:flyway-database-mongodb;11.14.1 -org.flywaydb:flyway-database-oracle;11.14.1 -org.flywaydb:flyway-database-postgresql;11.14.1 -org.flywaydb:flyway-database-redshift;11.14.1 -org.flywaydb:flyway-database-saphana;11.14.1 -org.flywaydb:flyway-database-snowflake;11.14.1 -org.flywaydb:flyway-database-sybasease;11.14.1 -org.flywaydb:flyway-firebird;11.14.1 -org.flywaydb:flyway-gcp-bigquery;11.14.1 -org.flywaydb:flyway-gcp-spanner;11.14.1 -org.flywaydb:flyway-maven-plugin;11.14.1 -org.flywaydb:flyway-mysql;11.14.1 -org.flywaydb:flyway-singlestore;11.14.1 -org.flywaydb:flyway-sqlserver;11.14.1 -org.freemarker:freemarker;2.3.34 -org.glassfish.jaxb:codemodel;4.0.6 -org.glassfish.jaxb:jaxb-core;4.0.6 -org.glassfish.jaxb:jaxb-jxc;4.0.6 -org.glassfish.jaxb:jaxb-runtime;4.0.6 -org.glassfish.jaxb:jaxb-xjc;4.0.6 -org.glassfish.jaxb:txw2;4.0.6 -org.glassfish.jaxb:xsom;4.0.6 -org.glassfish.jersey.connectors:jersey-apache5-connector;4.0.0 -org.glassfish.jersey.connectors:jersey-grizzly-connector;4.0.0 -org.glassfish.jersey.connectors:jersey-helidon-connector;4.0.0 -org.glassfish.jersey.connectors:jersey-jdk-connector;4.0.0 -org.glassfish.jersey.connectors:jersey-jetty-connector;4.0.0 -org.glassfish.jersey.connectors:jersey-jetty-http2-connector;4.0.0 -org.glassfish.jersey.connectors:jersey-jnh-connector;4.0.0 -org.glassfish.jersey.connectors:jersey-netty-connector;4.0.0 -org.glassfish.jersey.containers.glassfish:jersey-gf-ejb;4.0.0 -org.glassfish.jersey.containers:jersey-container-grizzly2-http;4.0.0 -org.glassfish.jersey.containers:jersey-container-grizzly2-servlet;4.0.0 -org.glassfish.jersey.containers:jersey-container-helidon-http;4.0.0 -org.glassfish.jersey.containers:jersey-container-jdk-http;4.0.0 -org.glassfish.jersey.containers:jersey-container-jetty-http;4.0.0 -org.glassfish.jersey.containers:jersey-container-jetty-http2;4.0.0 -org.glassfish.jersey.containers:jersey-container-jetty-servlet;4.0.0 -org.glassfish.jersey.containers:jersey-container-netty-http;4.0.0 -org.glassfish.jersey.containers:jersey-container-servlet;4.0.0 -org.glassfish.jersey.core:jersey-client;4.0.0 -org.glassfish.jersey.core:jersey-common;4.0.0 -org.glassfish.jersey.core:jersey-server;4.0.0 -org.glassfish.jersey.ext.cdi:jersey-cdi-rs-inject;4.0.0 -org.glassfish.jersey.ext.cdi:jersey-cdi1x;4.0.0 -org.glassfish.jersey.ext.cdi:jersey-cdi1x-ban-custom-hk2-binding;4.0.0 -org.glassfish.jersey.ext.cdi:jersey-cdi1x-servlet;4.0.0 -org.glassfish.jersey.ext.cdi:jersey-cdi1x-transaction;4.0.0 -org.glassfish.jersey.ext.cdi:jersey-cdi1x-validation;4.0.0 -org.glassfish.jersey.ext.cdi:jersey-weld2-se;4.0.0 -org.glassfish.jersey.ext.microprofile:jersey-mp-config;4.0.0 -org.glassfish.jersey.ext.microprofile:jersey-mp-rest-client;4.0.0 -org.glassfish.jersey.ext.rx:jersey-rx-client-guava;4.0.0 -org.glassfish.jersey.ext.rx:jersey-rx-client-rxjava;4.0.0 -org.glassfish.jersey.ext.rx:jersey-rx-client-rxjava2;4.0.0 -org.glassfish.jersey.ext:jersey-bean-validation;4.0.0 -org.glassfish.jersey.ext:jersey-constants;4.0.0 -org.glassfish.jersey.ext:jersey-declarative-linking;4.0.0 -org.glassfish.jersey.ext:jersey-entity-filtering;4.0.0 -org.glassfish.jersey.ext:jersey-metainf-services;4.0.0 -org.glassfish.jersey.ext:jersey-micrometer;4.0.0 -org.glassfish.jersey.ext:jersey-mvc;4.0.0 -org.glassfish.jersey.ext:jersey-mvc-bean-validation;4.0.0 -org.glassfish.jersey.ext:jersey-mvc-freemarker;4.0.0 -org.glassfish.jersey.ext:jersey-mvc-jsp;4.0.0 -org.glassfish.jersey.ext:jersey-mvc-mustache;4.0.0 -org.glassfish.jersey.ext:jersey-proxy-client;4.0.0 -org.glassfish.jersey.ext:jersey-spring6;4.0.0 -org.glassfish.jersey.ext:jersey-wadl-doclet;4.0.0 -org.glassfish.jersey.inject:jersey-cdi2-se;4.0.0 -org.glassfish.jersey.inject:jersey-hk2;4.0.0 -org.glassfish.jersey.media:jersey-media-jaxb;4.0.0 -org.glassfish.jersey.media:jersey-media-json-binding;4.0.0 -org.glassfish.jersey.media:jersey-media-json-gson;4.0.0 -org.glassfish.jersey.media:jersey-media-json-jackson;4.0.0 -org.glassfish.jersey.media:jersey-media-json-jettison;4.0.0 -org.glassfish.jersey.media:jersey-media-json-processing;4.0.0 -org.glassfish.jersey.media:jersey-media-kryo;4.0.0 -org.glassfish.jersey.media:jersey-media-moxy;4.0.0 -org.glassfish.jersey.media:jersey-media-multipart;4.0.0 -org.glassfish.jersey.media:jersey-media-sse;4.0.0 -org.glassfish.jersey.security:oauth1-client;4.0.0 -org.glassfish.jersey.security:oauth1-server;4.0.0 -org.glassfish.jersey.security:oauth1-signature;4.0.0 -org.glassfish.jersey.security:oauth2-client;4.0.0 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-bundle;4.0.0 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-external;4.0.0 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2;4.0.0 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-helidon;4.0.0 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-inmemory;4.0.0 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jdk-http;4.0.0 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty;4.0.0 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty-http2;4.0.0 -org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-netty;4.0.0 -org.glassfish.jersey.test-framework:jersey-test-framework-core;4.0.0 -org.glassfish.jersey.test-framework:jersey-test-framework-util;4.0.0 -org.glassfish.jersey:jersey-bom;4.0.0 -org.glassfish.web:jakarta.servlet.jsp.jstl;3.0.1 -org.graalvm.buildtools:native-maven-plugin;0.11.2 -org.hamcrest:hamcrest;3.0 -org.hamcrest:hamcrest-core;3.0 -org.hamcrest:hamcrest-library;3.0 -org.hibernate.orm:hibernate-agroal;7.1.6.Final -org.hibernate.orm:hibernate-ant;7.1.6.Final -org.hibernate.orm:hibernate-c3p0;7.1.6.Final -org.hibernate.orm:hibernate-community-dialects;7.1.6.Final -org.hibernate.orm:hibernate-core;7.1.6.Final -org.hibernate.orm:hibernate-envers;7.1.6.Final -org.hibernate.orm:hibernate-graalvm;7.1.6.Final -org.hibernate.orm:hibernate-hikaricp;7.1.6.Final -org.hibernate.orm:hibernate-jcache;7.1.6.Final -org.hibernate.orm:hibernate-micrometer;7.1.6.Final -org.hibernate.orm:hibernate-processor;7.1.6.Final -org.hibernate.orm:hibernate-scan-jandex;7.1.6.Final -org.hibernate.orm:hibernate-spatial;7.1.6.Final -org.hibernate.orm:hibernate-testing;7.1.6.Final -org.hibernate.orm:hibernate-vector;7.1.6.Final -org.hibernate.validator:hibernate-validator;9.0.1.Final -org.hibernate.validator:hibernate-validator-annotation-processor;9.0.1.Final -org.hsqldb:hsqldb;2.7.3 -org.htmlunit:htmlunit;4.17.0 -org.infinispan.protostream:protostream;5.0.13.Final -org.infinispan.protostream:protostream-processor;5.0.13.Final -org.infinispan.protostream:protostream-types;5.0.13.Final -org.infinispan:infinispan-anchored-keys;15.2.6.Final -org.infinispan:infinispan-api;15.2.6.Final -org.infinispan:infinispan-bom;15.2.6.Final -org.infinispan:infinispan-cachestore-jdbc;15.2.6.Final -org.infinispan:infinispan-cachestore-jdbc-common;15.2.6.Final -org.infinispan:infinispan-cachestore-remote;15.2.6.Final -org.infinispan:infinispan-cachestore-rocksdb;15.2.6.Final -org.infinispan:infinispan-cachestore-sql;15.2.6.Final -org.infinispan:infinispan-cdi-common;15.2.6.Final -org.infinispan:infinispan-cdi-embedded;15.2.6.Final -org.infinispan:infinispan-cdi-remote;15.2.6.Final -org.infinispan:infinispan-checkstyle;15.2.6.Final -org.infinispan:infinispan-cli-client;15.2.6.Final -org.infinispan:infinispan-client-hotrod;15.2.6.Final -org.infinispan:infinispan-client-hotrod-legacy;15.2.6.Final -org.infinispan:infinispan-client-rest;15.2.6.Final -org.infinispan:infinispan-clustered-counter;15.2.6.Final -org.infinispan:infinispan-clustered-lock;15.2.6.Final -org.infinispan:infinispan-commons;15.2.6.Final -org.infinispan:infinispan-commons-graalvm;15.2.6.Final -org.infinispan:infinispan-commons-spi;15.2.6.Final -org.infinispan:infinispan-commons-test;15.2.6.Final -org.infinispan:infinispan-component-annotations;15.2.6.Final -org.infinispan:infinispan-component-processor;15.2.6.Final -org.infinispan:infinispan-console;15.2.1.Final -org.infinispan:infinispan-core;15.2.6.Final -org.infinispan:infinispan-core-graalvm;15.2.6.Final -org.infinispan:infinispan-counter-api;15.2.6.Final -org.infinispan:infinispan-hibernate-cache-commons;15.2.6.Final -org.infinispan:infinispan-hibernate-cache-spi;15.2.6.Final -org.infinispan:infinispan-hibernate-cache-v62;15.2.6.Final -org.infinispan:infinispan-jboss-marshalling;15.2.6.Final -org.infinispan:infinispan-jcache;15.2.6.Final -org.infinispan:infinispan-jcache-commons;15.2.6.Final -org.infinispan:infinispan-jcache-remote;15.2.6.Final -org.infinispan:infinispan-key-value-store-client;15.2.6.Final -org.infinispan:infinispan-logging-annotations;15.2.6.Final -org.infinispan:infinispan-logging-processor;15.2.6.Final -org.infinispan:infinispan-multimap;15.2.6.Final -org.infinispan:infinispan-objectfilter;15.2.6.Final -org.infinispan:infinispan-query;15.2.6.Final -org.infinispan:infinispan-query-core;15.2.6.Final -org.infinispan:infinispan-query-dsl;15.2.6.Final -org.infinispan:infinispan-remote-query-client;15.2.6.Final -org.infinispan:infinispan-remote-query-server;15.2.6.Final -org.infinispan:infinispan-scripting;15.2.6.Final -org.infinispan:infinispan-server-core;15.2.6.Final -org.infinispan:infinispan-server-hotrod;15.2.6.Final -org.infinispan:infinispan-server-memcached;15.2.6.Final -org.infinispan:infinispan-server-resp;15.2.6.Final -org.infinispan:infinispan-server-rest;15.2.6.Final -org.infinispan:infinispan-server-router;15.2.6.Final -org.infinispan:infinispan-server-runtime;15.2.6.Final -org.infinispan:infinispan-server-testdriver-core;15.2.6.Final -org.infinispan:infinispan-server-testdriver-junit4;15.2.6.Final -org.infinispan:infinispan-server-testdriver-junit5;15.2.6.Final -org.infinispan:infinispan-spring-boot3-starter-embedded;15.2.6.Final -org.infinispan:infinispan-spring-boot3-starter-remote;15.2.6.Final -org.infinispan:infinispan-spring6-common;15.2.6.Final -org.infinispan:infinispan-spring6-embedded;15.2.6.Final -org.infinispan:infinispan-spring6-remote;15.2.6.Final -org.infinispan:infinispan-tasks;15.2.6.Final -org.infinispan:infinispan-tasks-api;15.2.6.Final -org.infinispan:infinispan-tools;15.2.6.Final -org.influxdb:influxdb-java;2.25 -org.jboss.logging:jboss-logging;3.6.1.Final -org.jdom:jdom2;2.0.6.1 -org.jetbrains.kotlin:kotlin-bom;2.2.21 -org.jetbrains.kotlin:kotlin-compiler;2.2.21 -org.jetbrains.kotlin:kotlin-compiler-embeddable;2.2.21 -org.jetbrains.kotlin:kotlin-daemon-client;2.2.21 -org.jetbrains.kotlin:kotlin-main-kts;2.2.21 -org.jetbrains.kotlin:kotlin-maven-plugin;2.2.21 -org.jetbrains.kotlin:kotlin-osgi-bundle;2.2.21 -org.jetbrains.kotlin:kotlin-reflect;2.2.21 -org.jetbrains.kotlin:kotlin-script-runtime;2.2.21 -org.jetbrains.kotlin:kotlin-scripting-common;2.2.21 -org.jetbrains.kotlin:kotlin-scripting-ide-services;2.2.21 -org.jetbrains.kotlin:kotlin-scripting-jvm;2.2.21 -org.jetbrains.kotlin:kotlin-scripting-jvm-host;2.2.21 -org.jetbrains.kotlin:kotlin-stdlib;2.2.21 -org.jetbrains.kotlin:kotlin-stdlib-common;2.2.21 -org.jetbrains.kotlin:kotlin-stdlib-jdk7;2.2.21 -org.jetbrains.kotlin:kotlin-stdlib-jdk8;2.2.21 -org.jetbrains.kotlin:kotlin-stdlib-js;2.2.21 -org.jetbrains.kotlin:kotlin-test;2.2.21 -org.jetbrains.kotlin:kotlin-test-annotations-common;2.2.21 -org.jetbrains.kotlin:kotlin-test-common;2.2.21 -org.jetbrains.kotlin:kotlin-test-js;2.2.21 -org.jetbrains.kotlin:kotlin-test-junit;2.2.21 -org.jetbrains.kotlin:kotlin-test-junit5;2.2.21 -org.jetbrains.kotlin:kotlin-test-testng;2.2.21 -org.jetbrains.kotlinx:kotlinx-coroutines-android;1.10.2 -org.jetbrains.kotlinx:kotlinx-coroutines-bom;1.10.2 -org.jetbrains.kotlinx:kotlinx-coroutines-core;1.10.2 -org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm;1.10.2 -org.jetbrains.kotlinx:kotlinx-coroutines-debug;1.10.2 -org.jetbrains.kotlinx:kotlinx-coroutines-guava;1.10.2 -org.jetbrains.kotlinx:kotlinx-coroutines-javafx;1.10.2 -org.jetbrains.kotlinx:kotlinx-coroutines-jdk8;1.10.2 -org.jetbrains.kotlinx:kotlinx-coroutines-jdk9;1.10.2 -org.jetbrains.kotlinx:kotlinx-coroutines-play-services;1.10.2 -org.jetbrains.kotlinx:kotlinx-coroutines-reactive;1.10.2 -org.jetbrains.kotlinx:kotlinx-coroutines-reactor;1.10.2 -org.jetbrains.kotlinx:kotlinx-coroutines-rx2;1.10.2 -org.jetbrains.kotlinx:kotlinx-coroutines-rx3;1.10.2 -org.jetbrains.kotlinx:kotlinx-coroutines-slf4j;1.10.2 -org.jetbrains.kotlinx:kotlinx-coroutines-swing;1.10.2 -org.jetbrains.kotlinx:kotlinx-coroutines-test;1.10.2 -org.jetbrains.kotlinx:kotlinx-coroutines-test-jvm;1.10.2 -org.jetbrains.kotlinx:kotlinx-serialization-bom;1.9.0 -org.jetbrains.kotlinx:kotlinx-serialization-cbor;1.9.0 -org.jetbrains.kotlinx:kotlinx-serialization-cbor-jvm;1.9.0 -org.jetbrains.kotlinx:kotlinx-serialization-core;1.9.0 -org.jetbrains.kotlinx:kotlinx-serialization-core-jvm;1.9.0 -org.jetbrains.kotlinx:kotlinx-serialization-hocon;1.9.0 -org.jetbrains.kotlinx:kotlinx-serialization-json;1.9.0 -org.jetbrains.kotlinx:kotlinx-serialization-json-io;1.9.0 -org.jetbrains.kotlinx:kotlinx-serialization-json-io-jvm;1.9.0 -org.jetbrains.kotlinx:kotlinx-serialization-json-jvm;1.9.0 -org.jetbrains.kotlinx:kotlinx-serialization-json-okio;1.9.0 -org.jetbrains.kotlinx:kotlinx-serialization-json-okio-jvm;1.9.0 -org.jetbrains.kotlinx:kotlinx-serialization-properties;1.9.0 -org.jetbrains.kotlinx:kotlinx-serialization-properties-jvm;1.9.0 -org.jetbrains.kotlinx:kotlinx-serialization-protobuf;1.9.0 -org.jetbrains.kotlinx:kotlinx-serialization-protobuf-jvm;1.9.0 -org.jooq:jooq;3.19.27 -org.jooq:jooq-bom;3.19.27 -org.jooq:jooq-checker;3.19.27 -org.jooq:jooq-codegen;3.19.27 -org.jooq:jooq-codegen-gradle;3.19.27 -org.jooq:jooq-codegen-maven;3.19.27 -org.jooq:jooq-jackson-extensions;3.19.27 -org.jooq:jooq-kotlin;3.19.27 -org.jooq:jooq-kotlin-coroutines;3.19.27 -org.jooq:jooq-meta;3.19.27 -org.jooq:jooq-meta-extensions;3.19.27 -org.jooq:jooq-meta-extensions-hibernate;3.19.27 -org.jooq:jooq-meta-extensions-liquibase;3.19.27 -org.jooq:jooq-meta-kotlin;3.19.27 -org.jooq:jooq-migrations;3.19.27 -org.jooq:jooq-migrations-maven;3.19.27 -org.jooq:jooq-postgres-extensions;3.19.27 -org.jooq:jooq-scala_2.13;3.19.27 -org.jooq:jooq-xtend;3.19.27 -org.jspecify:jspecify;1.0.0 -org.junit.jupiter:junit-jupiter;6.0.1 -org.junit.jupiter:junit-jupiter-api;6.0.1 -org.junit.jupiter:junit-jupiter-engine;6.0.1 -org.junit.jupiter:junit-jupiter-migrationsupport;6.0.1 -org.junit.jupiter:junit-jupiter-params;6.0.1 -org.junit.platform:junit-platform-commons;6.0.1 -org.junit.platform:junit-platform-console;6.0.1 -org.junit.platform:junit-platform-engine;6.0.1 -org.junit.platform:junit-platform-launcher;6.0.1 -org.junit.platform:junit-platform-reporting;6.0.1 -org.junit.platform:junit-platform-suite;6.0.1 -org.junit.platform:junit-platform-suite-api;6.0.1 -org.junit.platform:junit-platform-suite-engine;6.0.1 -org.junit.platform:junit-platform-testkit;6.0.1 -org.junit.vintage:junit-vintage-engine;6.0.1 -org.junit:junit-bom;6.0.1 -org.liquibase:liquibase-cdi;5.0.1 -org.liquibase:liquibase-core;5.0.1 -org.liquibase:liquibase-maven-plugin;5.0.1 -org.mariadb.jdbc:mariadb-java-client;3.5.6 -org.mariadb:r2dbc-mariadb;1.3.0 -org.messaginghub:pooled-jms;3.1.7 -org.mockito:mockito-android;5.20.0 -org.mockito:mockito-bom;5.20.0 -org.mockito:mockito-core;5.20.0 -org.mockito:mockito-errorprone;5.20.0 -org.mockito:mockito-junit-jupiter;5.20.0 -org.mockito:mockito-proxy;5.20.0 -org.mockito:mockito-subclass;5.20.0 -org.mongodb.scala:mongo-scala-bson_2.11;5.6.1 -org.mongodb.scala:mongo-scala-bson_2.12;5.6.1 -org.mongodb.scala:mongo-scala-bson_2.13;5.6.1 -org.mongodb.scala:mongo-scala-driver_2.11;5.6.1 -org.mongodb.scala:mongo-scala-driver_2.12;5.6.1 -org.mongodb.scala:mongo-scala-driver_2.13;5.6.1 -org.mongodb:bson;5.6.1 -org.mongodb:bson-kotlin;5.6.1 -org.mongodb:bson-kotlinx;5.6.1 -org.mongodb:bson-record-codec;5.6.1 -org.mongodb:mongodb-crypt;5.6.1 -org.mongodb:mongodb-driver-bom;5.6.1 -org.mongodb:mongodb-driver-core;5.6.1 -org.mongodb:mongodb-driver-kotlin-coroutine;5.6.1 -org.mongodb:mongodb-driver-kotlin-extensions;5.6.1 -org.mongodb:mongodb-driver-kotlin-sync;5.6.1 -org.mongodb:mongodb-driver-reactivestreams;5.6.1 -org.mongodb:mongodb-driver-sync;5.6.1 -org.neo4j.bolt:neo4j-bolt-connection;10.0.1 -org.neo4j.bolt:neo4j-bolt-connection-bom;10.0.1 -org.neo4j.bolt:neo4j-bolt-connection-netty;10.0.1 -org.neo4j.bolt:neo4j-bolt-connection-pooled;10.0.1 -org.neo4j.bolt:neo4j-bolt-connection-query-api;10.0.1 -org.neo4j.bolt:neo4j-bolt-connection-routed;10.0.1 -org.neo4j.driver:neo4j-java-driver;6.0.1 -org.neo4j.driver:neo4j-java-driver-all;6.0.1 -org.neo4j.driver:neo4j-java-driver-bom;6.0.1 -org.neo4j.driver:neo4j-java-driver-observation-metrics;6.0.1 -org.neo4j.driver:neo4j-java-driver-observation-micrometer;6.0.1 -org.postgresql:postgresql;42.7.8 -org.postgresql:r2dbc-postgresql;1.1.1.RELEASE -org.projectlombok:lombok;1.18.42 -org.quartz-scheduler:quartz;2.5.1 -org.quartz-scheduler:quartz-jobs;2.5.1 -org.reactivestreams:reactive-streams;1.0.4 -org.seleniumhq.selenium:htmlunit3-driver;4.36.1 -org.seleniumhq.selenium:selenium-api;4.37.0 -org.seleniumhq.selenium:selenium-bom;4.37.0 -org.seleniumhq.selenium:selenium-chrome-driver;4.37.0 -org.seleniumhq.selenium:selenium-chromium-driver;4.37.0 -org.seleniumhq.selenium:selenium-devtools-v139;4.37.0 -org.seleniumhq.selenium:selenium-devtools-v140;4.37.0 -org.seleniumhq.selenium:selenium-devtools-v141;4.37.0 -org.seleniumhq.selenium:selenium-edge-driver;4.37.0 -org.seleniumhq.selenium:selenium-firefox-driver;4.37.0 -org.seleniumhq.selenium:selenium-grid;4.37.0 -org.seleniumhq.selenium:selenium-http;4.37.0 -org.seleniumhq.selenium:selenium-ie-driver;4.37.0 -org.seleniumhq.selenium:selenium-java;4.37.0 -org.seleniumhq.selenium:selenium-json;4.37.0 -org.seleniumhq.selenium:selenium-manager;4.37.0 -org.seleniumhq.selenium:selenium-remote-driver;4.37.0 -org.seleniumhq.selenium:selenium-safari-driver;4.37.0 -org.seleniumhq.selenium:selenium-session-map-jdbc;4.37.0 -org.seleniumhq.selenium:selenium-session-map-redis;4.37.0 -org.seleniumhq.selenium:selenium-support;4.37.0 -org.skyscreamer:jsonassert;1.5.3 -org.slf4j:jcl-over-slf4j;2.0.17 -org.slf4j:jul-to-slf4j;2.0.17 -org.slf4j:log4j-over-slf4j;2.0.17 -org.slf4j:slf4j-api;2.0.17 -org.slf4j:slf4j-ext;2.0.17 -org.slf4j:slf4j-jdk-platform-logging;2.0.17 -org.slf4j:slf4j-jdk14;2.0.17 -org.slf4j:slf4j-log4j12;2.0.17 -org.slf4j:slf4j-nop;2.0.17 -org.slf4j:slf4j-reload4j;2.0.17 -org.slf4j:slf4j-simple;2.0.17 -org.springframework.amqp:spring-amqp;4.0.0-RC1 -org.springframework.amqp:spring-amqp-bom;4.0.0-RC1 -org.springframework.amqp:spring-rabbit;4.0.0-RC1 -org.springframework.amqp:spring-rabbit-junit;4.0.0-RC1 -org.springframework.amqp:spring-rabbit-stream;4.0.0-RC1 -org.springframework.amqp:spring-rabbit-test;4.0.0-RC1 -org.springframework.amqp:spring-rabbitmq-client;4.0.0-RC1 -org.springframework.batch:spring-batch-bom;6.0.0-RC2 -org.springframework.boot:spring-boot;4.0.0-RC2 -org.springframework.boot:spring-boot-activemq;4.0.0-RC2 -org.springframework.boot:spring-boot-actuator;4.0.0-RC2 -org.springframework.boot:spring-boot-actuator-autoconfigure;4.0.0-RC2 -org.springframework.boot:spring-boot-amqp;4.0.0-RC2 -org.springframework.boot:spring-boot-artemis;4.0.0-RC2 -org.springframework.boot:spring-boot-autoconfigure;4.0.0-RC2 -org.springframework.boot:spring-boot-autoconfigure-classic;4.0.0-RC2 -org.springframework.boot:spring-boot-autoconfigure-classic-modules;4.0.0-RC2 -org.springframework.boot:spring-boot-autoconfigure-processor;4.0.0-RC2 -org.springframework.boot:spring-boot-batch;4.0.0-RC2 -org.springframework.boot:spring-boot-batch-jdbc;4.0.0-RC2 -org.springframework.boot:spring-boot-buildpack-platform;4.0.0-RC2 -org.springframework.boot:spring-boot-cache;4.0.0-RC2 -org.springframework.boot:spring-boot-cache-test;4.0.0-RC2 -org.springframework.boot:spring-boot-cassandra;4.0.0-RC2 -org.springframework.boot:spring-boot-cloudfoundry;4.0.0-RC2 -org.springframework.boot:spring-boot-configuration-metadata;4.0.0-RC2 -org.springframework.boot:spring-boot-configuration-processor;4.0.0-RC2 -org.springframework.boot:spring-boot-couchbase;4.0.0-RC2 -org.springframework.boot:spring-boot-data-cassandra;4.0.0-RC2 -org.springframework.boot:spring-boot-data-cassandra-test;4.0.0-RC2 -org.springframework.boot:spring-boot-data-commons;4.0.0-RC2 -org.springframework.boot:spring-boot-data-couchbase;4.0.0-RC2 -org.springframework.boot:spring-boot-data-couchbase-test;4.0.0-RC2 -org.springframework.boot:spring-boot-data-elasticsearch;4.0.0-RC2 -org.springframework.boot:spring-boot-data-elasticsearch-test;4.0.0-RC2 -org.springframework.boot:spring-boot-data-jdbc;4.0.0-RC2 -org.springframework.boot:spring-boot-data-jdbc-test;4.0.0-RC2 -org.springframework.boot:spring-boot-data-jpa;4.0.0-RC2 -org.springframework.boot:spring-boot-data-jpa-test;4.0.0-RC2 -org.springframework.boot:spring-boot-data-ldap;4.0.0-RC2 -org.springframework.boot:spring-boot-data-ldap-test;4.0.0-RC2 -org.springframework.boot:spring-boot-data-mongodb;4.0.0-RC2 -org.springframework.boot:spring-boot-data-mongodb-test;4.0.0-RC2 -org.springframework.boot:spring-boot-data-neo4j;4.0.0-RC2 -org.springframework.boot:spring-boot-data-neo4j-test;4.0.0-RC2 -org.springframework.boot:spring-boot-data-r2dbc;4.0.0-RC2 -org.springframework.boot:spring-boot-data-r2dbc-test;4.0.0-RC2 -org.springframework.boot:spring-boot-data-redis;4.0.0-RC2 -org.springframework.boot:spring-boot-data-redis-test;4.0.0-RC2 -org.springframework.boot:spring-boot-data-rest;4.0.0-RC2 -org.springframework.boot:spring-boot-dependencies;4.0.0-RC2 -org.springframework.boot:spring-boot-devtools;4.0.0-RC2 -org.springframework.boot:spring-boot-docker-compose;4.0.0-RC2 -org.springframework.boot:spring-boot-elasticsearch;4.0.0-RC2 -org.springframework.boot:spring-boot-flyway;4.0.0-RC2 -org.springframework.boot:spring-boot-freemarker;4.0.0-RC2 -org.springframework.boot:spring-boot-graphql;4.0.0-RC2 -org.springframework.boot:spring-boot-graphql-test;4.0.0-RC2 -org.springframework.boot:spring-boot-groovy-templates;4.0.0-RC2 -org.springframework.boot:spring-boot-gson;4.0.0-RC2 -org.springframework.boot:spring-boot-h2console;4.0.0-RC2 -org.springframework.boot:spring-boot-hateoas;4.0.0-RC2 -org.springframework.boot:spring-boot-hazelcast;4.0.0-RC2 -org.springframework.boot:spring-boot-health;4.0.0-RC2 -org.springframework.boot:spring-boot-hibernate;4.0.0-RC2 -org.springframework.boot:spring-boot-http-client;4.0.0-RC2 -org.springframework.boot:spring-boot-http-codec;4.0.0-RC2 -org.springframework.boot:spring-boot-http-converter;4.0.0-RC2 -org.springframework.boot:spring-boot-integration;4.0.0-RC2 -org.springframework.boot:spring-boot-jackson;4.0.0-RC2 -org.springframework.boot:spring-boot-jackson2;4.0.0-RC2 -org.springframework.boot:spring-boot-jarmode-tools;4.0.0-RC2 -org.springframework.boot:spring-boot-jdbc;4.0.0-RC2 -org.springframework.boot:spring-boot-jdbc-test;4.0.0-RC2 -org.springframework.boot:spring-boot-jersey;4.0.0-RC2 -org.springframework.boot:spring-boot-jetty;4.0.0-RC2 -org.springframework.boot:spring-boot-jetty-runtime;4.0.0-RC2 -org.springframework.boot:spring-boot-jms;4.0.0-RC2 -org.springframework.boot:spring-boot-jooq;4.0.0-RC2 -org.springframework.boot:spring-boot-jooq-test;4.0.0-RC2 -org.springframework.boot:spring-boot-jpa;4.0.0-RC2 -org.springframework.boot:spring-boot-jpa-test;4.0.0-RC2 -org.springframework.boot:spring-boot-jsonb;4.0.0-RC2 -org.springframework.boot:spring-boot-kafka;4.0.0-RC2 -org.springframework.boot:spring-boot-kotlin-serialization;4.0.0-RC2 -org.springframework.boot:spring-boot-ldap;4.0.0-RC2 -org.springframework.boot:spring-boot-liquibase;4.0.0-RC2 -org.springframework.boot:spring-boot-loader;4.0.0-RC2 -org.springframework.boot:spring-boot-mail;4.0.0-RC2 -org.springframework.boot:spring-boot-maven-plugin;4.0.0-RC2 -org.springframework.boot:spring-boot-micrometer-metrics;4.0.0-RC2 -org.springframework.boot:spring-boot-micrometer-metrics-test;4.0.0-RC2 -org.springframework.boot:spring-boot-micrometer-observation;4.0.0-RC2 -org.springframework.boot:spring-boot-micrometer-tracing;4.0.0-RC2 -org.springframework.boot:spring-boot-micrometer-tracing-brave;4.0.0-RC2 -org.springframework.boot:spring-boot-micrometer-tracing-opentelemetry;4.0.0-RC2 -org.springframework.boot:spring-boot-micrometer-tracing-test;4.0.0-RC2 -org.springframework.boot:spring-boot-mongodb;4.0.0-RC2 -org.springframework.boot:spring-boot-mustache;4.0.0-RC2 -org.springframework.boot:spring-boot-neo4j;4.0.0-RC2 -org.springframework.boot:spring-boot-netty;4.0.0-RC2 -org.springframework.boot:spring-boot-opentelemetry;4.0.0-RC2 -org.springframework.boot:spring-boot-persistence;4.0.0-RC2 -org.springframework.boot:spring-boot-properties-migrator;4.0.0-RC2 -org.springframework.boot:spring-boot-pulsar;4.0.0-RC2 -org.springframework.boot:spring-boot-quartz;4.0.0-RC2 -org.springframework.boot:spring-boot-r2dbc;4.0.0-RC2 -org.springframework.boot:spring-boot-reactor;4.0.0-RC2 -org.springframework.boot:spring-boot-reactor-netty;4.0.0-RC2 -org.springframework.boot:spring-boot-restclient;4.0.0-RC2 -org.springframework.boot:spring-boot-restclient-test;4.0.0-RC2 -org.springframework.boot:spring-boot-restdocs;4.0.0-RC2 -org.springframework.boot:spring-boot-resttestclient;4.0.0-RC2 -org.springframework.boot:spring-boot-rsocket;4.0.0-RC2 -org.springframework.boot:spring-boot-rsocket-test;4.0.0-RC2 -org.springframework.boot:spring-boot-security;4.0.0-RC2 -org.springframework.boot:spring-boot-security-oauth2-authorization-server;4.0.0-RC2 -org.springframework.boot:spring-boot-security-oauth2-client;4.0.0-RC2 -org.springframework.boot:spring-boot-security-oauth2-resource-server;4.0.0-RC2 -org.springframework.boot:spring-boot-security-saml2;4.0.0-RC2 -org.springframework.boot:spring-boot-security-test;4.0.0-RC2 -org.springframework.boot:spring-boot-sendgrid;4.0.0-RC2 -org.springframework.boot:spring-boot-servlet;4.0.0-RC2 -org.springframework.boot:spring-boot-session;4.0.0-RC2 -org.springframework.boot:spring-boot-session-data-redis;4.0.0-RC2 -org.springframework.boot:spring-boot-session-jdbc;4.0.0-RC2 -org.springframework.boot:spring-boot-sql;4.0.0-RC2 -org.springframework.boot:spring-boot-starter;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-activemq;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-activemq-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-actuator;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-actuator-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-amqp;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-amqp-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-artemis;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-artemis-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-aspectj;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-aspectj-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-batch;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-batch-jdbc;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-batch-jdbc-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-batch-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-cache;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-cache-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-cassandra;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-cassandra-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-classic;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-cloudfoundry;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-cloudfoundry-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-couchbase;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-couchbase-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-cassandra;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-cassandra-reactive;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-cassandra-reactive-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-cassandra-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-couchbase;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-couchbase-reactive;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-couchbase-reactive-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-couchbase-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-elasticsearch;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-elasticsearch-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-jdbc;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-jdbc-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-jpa;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-jpa-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-ldap;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-ldap-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-mongodb;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-mongodb-reactive;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-mongodb-reactive-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-mongodb-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-neo4j;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-neo4j-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-r2dbc;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-r2dbc-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-redis;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-redis-reactive;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-redis-reactive-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-redis-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-rest;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-data-rest-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-elasticsearch;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-elasticsearch-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-flyway;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-flyway-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-freemarker;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-freemarker-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-graphql;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-graphql-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-groovy-templates;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-groovy-templates-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-gson;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-gson-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-hateoas;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-hateoas-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-hazelcast;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-hazelcast-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-integration;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-integration-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-jackson;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-jackson-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-jdbc;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-jdbc-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-jersey;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-jersey-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-jetty;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-jms;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-jms-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-jooq;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-jooq-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-json;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-jsonb;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-jsonb-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-kafka;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-kafka-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-kotlin-serialization;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-kotlin-serialization-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-ldap;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-ldap-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-liquibase;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-liquibase-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-log4j2;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-logback;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-logging;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-mail;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-mail-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-mongodb;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-mongodb-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-mustache;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-mustache-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-neo4j;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-neo4j-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-oauth2-authorization-server;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-oauth2-client;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-oauth2-resource-server;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-opentelemetry;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-opentelemetry-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-parent;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-pulsar;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-pulsar-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-quartz;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-quartz-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-r2dbc;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-r2dbc-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-reactor-netty;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-restclient;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-restclient-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-rsocket;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-rsocket-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-security;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-security-oauth2-authorization-server;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-security-oauth2-authorization-server-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-security-oauth2-client;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-security-oauth2-client-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-security-oauth2-resource-server;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-security-oauth2-resource-server-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-security-saml2;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-security-saml2-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-security-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-sendgrid;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-sendgrid-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-session-data-redis;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-session-data-redis-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-session-jdbc;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-session-jdbc-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-test-classic;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-thymeleaf;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-thymeleaf-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-tomcat;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-validation;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-validation-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-web;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-web-services;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-webclient;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-webclient-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-webflux;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-webflux-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-webmvc;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-webmvc-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-webservices;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-webservices-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-websocket;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-websocket-test;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-zipkin;4.0.0-RC2 -org.springframework.boot:spring-boot-starter-zipkin-test;4.0.0-RC2 -org.springframework.boot:spring-boot-test;4.0.0-RC2 -org.springframework.boot:spring-boot-test-autoconfigure;4.0.0-RC2 -org.springframework.boot:spring-boot-test-classic-modules;4.0.0-RC2 -org.springframework.boot:spring-boot-testcontainers;4.0.0-RC2 -org.springframework.boot:spring-boot-thymeleaf;4.0.0-RC2 -org.springframework.boot:spring-boot-tomcat;4.0.0-RC2 -org.springframework.boot:spring-boot-tomcat-runtime;4.0.0-RC2 -org.springframework.boot:spring-boot-transaction;4.0.0-RC2 -org.springframework.boot:spring-boot-validation;4.0.0-RC2 -org.springframework.boot:spring-boot-web-server;4.0.0-RC2 -org.springframework.boot:spring-boot-webclient;4.0.0-RC2 -org.springframework.boot:spring-boot-webclient-test;4.0.0-RC2 -org.springframework.boot:spring-boot-webflux;4.0.0-RC2 -org.springframework.boot:spring-boot-webflux-test;4.0.0-RC2 -org.springframework.boot:spring-boot-webmvc;4.0.0-RC2 -org.springframework.boot:spring-boot-webmvc-test;4.0.0-RC2 -org.springframework.boot:spring-boot-webservices;4.0.0-RC2 -org.springframework.boot:spring-boot-webservices-test;4.0.0-RC2 -org.springframework.boot:spring-boot-websocket;4.0.0-RC2 -org.springframework.boot:spring-boot-webtestclient;4.0.0-RC2 -org.springframework.boot:spring-boot-zipkin;4.0.0-RC2 -org.springframework.cloud:spring-cloud-dependencies;2025.1.0-M4 -org.springframework.data:spring-data-bom;2025.1.0-RC2 -org.springframework.graphql:spring-graphql;2.0.0-RC2 -org.springframework.graphql:spring-graphql-test;2.0.0-RC2 -org.springframework.hateoas:spring-hateoas;3.0.0-RC2 -org.springframework.integration:spring-integration-amqp;7.0.0-RC2 -org.springframework.integration:spring-integration-bom;7.0.0-RC2 -org.springframework.integration:spring-integration-camel;7.0.0-RC2 -org.springframework.integration:spring-integration-cassandra;7.0.0-RC2 -org.springframework.integration:spring-integration-core;7.0.0-RC2 -org.springframework.integration:spring-integration-debezium;7.0.0-RC2 -org.springframework.integration:spring-integration-event;7.0.0-RC2 -org.springframework.integration:spring-integration-feed;7.0.0-RC2 -org.springframework.integration:spring-integration-file;7.0.0-RC2 -org.springframework.integration:spring-integration-ftp;7.0.0-RC2 -org.springframework.integration:spring-integration-graphql;7.0.0-RC2 -org.springframework.integration:spring-integration-groovy;7.0.0-RC2 -org.springframework.integration:spring-integration-hazelcast;7.0.0-RC2 -org.springframework.integration:spring-integration-http;7.0.0-RC2 -org.springframework.integration:spring-integration-ip;7.0.0-RC2 -org.springframework.integration:spring-integration-jdbc;7.0.0-RC2 -org.springframework.integration:spring-integration-jms;7.0.0-RC2 -org.springframework.integration:spring-integration-jmx;7.0.0-RC2 -org.springframework.integration:spring-integration-jpa;7.0.0-RC2 -org.springframework.integration:spring-integration-kafka;7.0.0-RC2 -org.springframework.integration:spring-integration-mail;7.0.0-RC2 -org.springframework.integration:spring-integration-mongodb;7.0.0-RC2 -org.springframework.integration:spring-integration-mqtt;7.0.0-RC2 -org.springframework.integration:spring-integration-r2dbc;7.0.0-RC2 -org.springframework.integration:spring-integration-redis;7.0.0-RC2 -org.springframework.integration:spring-integration-rsocket;7.0.0-RC2 -org.springframework.integration:spring-integration-scripting;7.0.0-RC2 -org.springframework.integration:spring-integration-sftp;7.0.0-RC2 -org.springframework.integration:spring-integration-smb;7.0.0-RC2 -org.springframework.integration:spring-integration-stomp;7.0.0-RC2 -org.springframework.integration:spring-integration-stream;7.0.0-RC2 -org.springframework.integration:spring-integration-syslog;7.0.0-RC2 -org.springframework.integration:spring-integration-test;7.0.0-RC2 -org.springframework.integration:spring-integration-test-support;7.0.0-RC2 -org.springframework.integration:spring-integration-webflux;7.0.0-RC2 -org.springframework.integration:spring-integration-websocket;7.0.0-RC2 -org.springframework.integration:spring-integration-ws;7.0.0-RC2 -org.springframework.integration:spring-integration-xml;7.0.0-RC2 -org.springframework.integration:spring-integration-xmpp;7.0.0-RC2 -org.springframework.integration:spring-integration-zeromq;7.0.0-RC2 -org.springframework.integration:spring-integration-zip;7.0.0-RC2 -org.springframework.integration:spring-integration-zookeeper;7.0.0-RC2 -org.springframework.kafka:spring-kafka;4.0.0-RC1 -org.springframework.kafka:spring-kafka-test;4.0.0-RC1 -org.springframework.ldap:spring-ldap-core;4.0.0-RC1 -org.springframework.ldap:spring-ldap-ldif-core;4.0.0-RC1 -org.springframework.ldap:spring-ldap-odm;4.0.0-RC1 -org.springframework.ldap:spring-ldap-test;4.0.0-RC1 -org.springframework.pulsar:spring-pulsar-bom;2.0.0-RC1 -org.springframework.restdocs:spring-restdocs-asciidoctor;4.0.0-RC1 -org.springframework.restdocs:spring-restdocs-bom;4.0.0-RC1 -org.springframework.restdocs:spring-restdocs-core;4.0.0-RC1 -org.springframework.restdocs:spring-restdocs-mockmvc;4.0.0-RC1 -org.springframework.restdocs:spring-restdocs-webtestclient;4.0.0-RC1 -org.springframework.security:spring-security-bom;7.0.0-RC3 -org.springframework.session:spring-session-bom;4.0.0-RC1 -org.springframework.ws:spring-ws-bom;5.0.0-RC1 -org.springframework.ws:spring-ws-core;5.0.0-RC1 -org.springframework.ws:spring-ws-security;5.0.0-RC1 -org.springframework.ws:spring-ws-support;5.0.0-RC1 -org.springframework.ws:spring-ws-test;5.0.0-RC1 -org.springframework.ws:spring-xml;5.0.0-RC1 -org.springframework:spring-aop;7.0.0-RC3 -org.springframework:spring-aspects;7.0.0-RC3 -org.springframework:spring-beans;7.0.0-RC3 -org.springframework:spring-context;7.0.0-RC3 -org.springframework:spring-context-indexer;7.0.0-RC3 -org.springframework:spring-context-support;7.0.0-RC3 -org.springframework:spring-core;7.0.0-RC3 -org.springframework:spring-core-test;7.0.0-RC3 -org.springframework:spring-expression;7.0.0-RC3 -org.springframework:spring-framework-bom;7.0.0-RC3 -org.springframework:spring-instrument;7.0.0-RC3 -org.springframework:spring-jdbc;7.0.0-RC3 -org.springframework:spring-jms;7.0.0-RC3 -org.springframework:spring-messaging;7.0.0-RC3 -org.springframework:spring-orm;7.0.0-RC3 -org.springframework:spring-oxm;7.0.0-RC3 -org.springframework:spring-r2dbc;7.0.0-RC3 -org.springframework:spring-test;7.0.0-RC3 -org.springframework:spring-tx;7.0.0-RC3 -org.springframework:spring-web;7.0.0-RC3 -org.springframework:spring-webflux;7.0.0-RC3 -org.springframework:spring-webmvc;7.0.0-RC3 -org.springframework:spring-websocket;7.0.0-RC3 -org.testcontainers:testcontainers;2.0.1 -org.testcontainers:testcontainers-activemq;2.0.1 -org.testcontainers:testcontainers-azure;2.0.1 -org.testcontainers:testcontainers-bom;2.0.1 -org.testcontainers:testcontainers-cassandra;2.0.1 -org.testcontainers:testcontainers-chromadb;2.0.1 -org.testcontainers:testcontainers-clickhouse;2.0.1 -org.testcontainers:testcontainers-cockroachdb;2.0.1 -org.testcontainers:testcontainers-consul;2.0.1 -org.testcontainers:testcontainers-couchbase;2.0.1 -org.testcontainers:testcontainers-cratedb;2.0.1 -org.testcontainers:testcontainers-database-commons;2.0.1 -org.testcontainers:testcontainers-databend;2.0.1 -org.testcontainers:testcontainers-db2;2.0.1 -org.testcontainers:testcontainers-elasticsearch;2.0.1 -org.testcontainers:testcontainers-gcloud;2.0.1 -org.testcontainers:testcontainers-grafana;2.0.1 -org.testcontainers:testcontainers-hivemq;2.0.1 -org.testcontainers:testcontainers-influxdb;2.0.1 -org.testcontainers:testcontainers-jdbc;2.0.1 -org.testcontainers:testcontainers-junit-jupiter;2.0.1 -org.testcontainers:testcontainers-k3s;2.0.1 -org.testcontainers:testcontainers-k6;2.0.1 -org.testcontainers:testcontainers-kafka;2.0.1 -org.testcontainers:testcontainers-ldap;2.0.1 -org.testcontainers:testcontainers-localstack;2.0.1 -org.testcontainers:testcontainers-mariadb;2.0.1 -org.testcontainers:testcontainers-milvus;2.0.1 -org.testcontainers:testcontainers-minio;2.0.1 -org.testcontainers:testcontainers-mockserver;2.0.1 -org.testcontainers:testcontainers-mongodb;2.0.1 -org.testcontainers:testcontainers-mssqlserver;2.0.1 -org.testcontainers:testcontainers-mysql;2.0.1 -org.testcontainers:testcontainers-neo4j;2.0.1 -org.testcontainers:testcontainers-nginx;2.0.1 -org.testcontainers:testcontainers-oceanbase;2.0.1 -org.testcontainers:testcontainers-ollama;2.0.1 -org.testcontainers:testcontainers-openfga;2.0.1 -org.testcontainers:testcontainers-oracle-free;2.0.1 -org.testcontainers:testcontainers-oracle-xe;2.0.1 -org.testcontainers:testcontainers-orientdb;2.0.1 -org.testcontainers:testcontainers-pinecone;2.0.1 -org.testcontainers:testcontainers-postgresql;2.0.1 -org.testcontainers:testcontainers-presto;2.0.1 -org.testcontainers:testcontainers-pulsar;2.0.1 -org.testcontainers:testcontainers-qdrant;2.0.1 -org.testcontainers:testcontainers-questdb;2.0.1 -org.testcontainers:testcontainers-r2dbc;2.0.1 -org.testcontainers:testcontainers-rabbitmq;2.0.1 -org.testcontainers:testcontainers-redpanda;2.0.1 -org.testcontainers:testcontainers-scylladb;2.0.1 -org.testcontainers:testcontainers-selenium;2.0.1 -org.testcontainers:testcontainers-solace;2.0.1 -org.testcontainers:testcontainers-solr;2.0.1 -org.testcontainers:testcontainers-spock;2.0.1 -org.testcontainers:testcontainers-tidb;2.0.1 -org.testcontainers:testcontainers-timeplus;2.0.1 -org.testcontainers:testcontainers-toxiproxy;2.0.1 -org.testcontainers:testcontainers-trino;2.0.1 -org.testcontainers:testcontainers-typesense;2.0.1 -org.testcontainers:testcontainers-vault;2.0.1 -org.testcontainers:testcontainers-weaviate;2.0.1 -org.testcontainers:testcontainers-yugabytedb;2.0.1 -org.thymeleaf.extras:thymeleaf-extras-springsecurity6;3.1.3.RELEASE -org.thymeleaf:thymeleaf;3.1.3.RELEASE -org.thymeleaf:thymeleaf-spring6;3.1.3.RELEASE -org.vibur:vibur-dbcp;26.0 -org.vibur:vibur-object-pool;26.0 -org.webjars:webjars-locator-core;0.59 -org.webjars:webjars-locator-lite;1.1.2 -org.xerial:sqlite-jdbc;3.50.3.0 -org.xmlunit:xmlunit-assertj;2.10.4 -org.xmlunit:xmlunit-assertj3;2.10.4 -org.xmlunit:xmlunit-core;2.10.4 -org.xmlunit:xmlunit-jakarta-jaxb-impl;2.10.4 -org.xmlunit:xmlunit-legacy;2.10.4 -org.xmlunit:xmlunit-matchers;2.10.4 -org.xmlunit:xmlunit-placeholders;2.10.4 -org.yaml:snakeyaml;2.5 -redis.clients:jedis;7.0.0 -tools.jackson.core:jackson-core;3.0.1 -tools.jackson.core:jackson-databind;3.0.1 -tools.jackson.dataformat:jackson-dataformat-avro;3.0.1 -tools.jackson.dataformat:jackson-dataformat-cbor;3.0.1 -tools.jackson.dataformat:jackson-dataformat-csv;3.0.1 -tools.jackson.dataformat:jackson-dataformat-ion;3.0.1 -tools.jackson.dataformat:jackson-dataformat-properties;3.0.1 -tools.jackson.dataformat:jackson-dataformat-protobuf;3.0.1 -tools.jackson.dataformat:jackson-dataformat-smile;3.0.1 -tools.jackson.dataformat:jackson-dataformat-toml;3.0.1 -tools.jackson.dataformat:jackson-dataformat-xml;3.0.1 -tools.jackson.dataformat:jackson-dataformat-yaml;3.0.1 -tools.jackson.datatype:jackson-datatype-eclipse-collections;3.0.1 -tools.jackson.datatype:jackson-datatype-guava;3.0.1 -tools.jackson.datatype:jackson-datatype-hppc;3.0.1 -tools.jackson.datatype:jackson-datatype-jakarta-jsonp;3.0.1 -tools.jackson.datatype:jackson-datatype-javax-money;3.0.1 -tools.jackson.datatype:jackson-datatype-jaxrs;3.0.1 -tools.jackson.datatype:jackson-datatype-joda;3.0.1 -tools.jackson.datatype:jackson-datatype-joda-money;3.0.1 -tools.jackson.datatype:jackson-datatype-json-org;3.0.1 -tools.jackson.datatype:jackson-datatype-jsr353;3.0.1 -tools.jackson.datatype:jackson-datatype-moneta;3.0.1 -tools.jackson.datatype:jackson-datatype-pcollections;3.0.1 -tools.jackson.jakarta.rs:jackson-jakarta-rs-base;3.0.1 -tools.jackson.jakarta.rs:jackson-jakarta-rs-cbor-provider;3.0.1 -tools.jackson.jakarta.rs:jackson-jakarta-rs-json-provider;3.0.1 -tools.jackson.jakarta.rs:jackson-jakarta-rs-smile-provider;3.0.1 -tools.jackson.jakarta.rs:jackson-jakarta-rs-xml-provider;3.0.1 -tools.jackson.jakarta.rs:jackson-jakarta-rs-yaml-provider;3.0.1 -tools.jackson.jaxrs:jackson-jaxrs-base;3.0.1 -tools.jackson.jaxrs:jackson-jaxrs-cbor-provider;3.0.1 -tools.jackson.jaxrs:jackson-jaxrs-json-provider;3.0.1 -tools.jackson.jaxrs:jackson-jaxrs-smile-provider;3.0.1 -tools.jackson.jaxrs:jackson-jaxrs-xml-provider;3.0.1 -tools.jackson.jaxrs:jackson-jaxrs-yaml-provider;3.0.1 -tools.jackson.jr:jackson-jr-all;3.0.1 -tools.jackson.jr:jackson-jr-annotation-support;3.0.1 -tools.jackson.jr:jackson-jr-extension-javatime;3.0.1 -tools.jackson.jr:jackson-jr-objects;3.0.1 -tools.jackson.jr:jackson-jr-retrofit2;3.0.1 -tools.jackson.jr:jackson-jr-stree;3.0.1 -tools.jackson.module:jackson-module-afterburner;3.0.1 -tools.jackson.module:jackson-module-android-record;3.0.1 -tools.jackson.module:jackson-module-blackbird;3.0.1 -tools.jackson.module:jackson-module-guice;3.0.1 -tools.jackson.module:jackson-module-guice7;3.0.1 -tools.jackson.module:jackson-module-jakarta-xmlbind-annotations;3.0.1 -tools.jackson.module:jackson-module-jaxb-annotations;3.0.1 -tools.jackson.module:jackson-module-kotlin;3.0.1 -tools.jackson.module:jackson-module-mrbean;3.0.1 -tools.jackson.module:jackson-module-no-ctor-deser;3.0.1 -tools.jackson.module:jackson-module-osgi;3.0.1 -tools.jackson.module:jackson-module-scala_2.12;3.0.1 -tools.jackson.module:jackson-module-scala_2.13;3.0.1 -tools.jackson.module:jackson-module-scala_3;3.0.1 -tools.jackson:jackson-bom;3.0.1 -wsdl4j:wsdl4j;1.6.3 -org.springframework.security:spring-security-config;7.0.0-RC3 -org.springframework.security:spring-security-core;7.0.0-RC3 -org.springframework.security:spring-security-oauth2-client;7.0.0-RC3 -org.springframework.security:spring-security-oauth2-core;7.0.0-RC3 -org.springframework.security:spring-security-oauth2-jose;7.0.0-RC3 -org.springframework.security:spring-security-oauth2-resource-server;7.0.0-RC3 -org.springframework.security:spring-security-web;7.0.0-RC3 -org.springframework.security:spring-security-test;7.0.0-RC3 diff --git a/sdk/spring/scripts/spring_boot_4.0.0_managed_external_dependencies.txt b/sdk/spring/scripts/spring_boot_4.0.0_managed_external_dependencies.txt new file mode 100644 index 000000000000..a1cfbf3baaa3 --- /dev/null +++ b/sdk/spring/scripts/spring_boot_4.0.0_managed_external_dependencies.txt @@ -0,0 +1,2176 @@ +ch.qos.logback:logback-classic;1.5.21 +ch.qos.logback:logback-core;1.5.21 +co.elastic.clients:elasticsearch-java;9.2.1 +co.elastic.clients:elasticsearch-rest5-client;9.2.1 +com.couchbase.client:java-client;3.9.2 +com.datastax.oss:native-protocol;1.5.2 +com.ecwid.consul:consul-api;1.4.5 +com.fasterxml.jackson.core:jackson-annotations;2.20 +com.fasterxml.jackson.core:jackson-core;2.20.1 +com.fasterxml.jackson.core:jackson-databind;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-avro;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-cbor;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-csv;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-ion;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-properties;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-protobuf;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-smile;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-toml;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-xml;2.20.1 +com.fasterxml.jackson.dataformat:jackson-dataformat-yaml;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-eclipse-collections;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-guava;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-hibernate4;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-hibernate5;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-hibernate5-jakarta;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-hibernate6;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-hibernate7;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-hppc;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-jakarta-jsonp;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-javax-money;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-jaxrs;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-jdk8;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-joda;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-joda-money;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-json-org;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-jsr310;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-jsr353;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-moneta;2.20.1 +com.fasterxml.jackson.datatype:jackson-datatype-pcollections;2.20.1 +com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-base;2.20.1 +com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-cbor-provider;2.20.1 +com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider;2.20.1 +com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-smile-provider;2.20.1 +com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-xml-provider;2.20.1 +com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-yaml-provider;2.20.1 +com.fasterxml.jackson.jaxrs:jackson-jaxrs-base;2.20.1 +com.fasterxml.jackson.jaxrs:jackson-jaxrs-cbor-provider;2.20.1 +com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider;2.20.1 +com.fasterxml.jackson.jaxrs:jackson-jaxrs-smile-provider;2.20.1 +com.fasterxml.jackson.jaxrs:jackson-jaxrs-xml-provider;2.20.1 +com.fasterxml.jackson.jaxrs:jackson-jaxrs-yaml-provider;2.20.1 +com.fasterxml.jackson.jr:jackson-jr-all;2.20.1 +com.fasterxml.jackson.jr:jackson-jr-annotation-support;2.20.1 +com.fasterxml.jackson.jr:jackson-jr-extension-javatime;2.20.1 +com.fasterxml.jackson.jr:jackson-jr-objects;2.20.1 +com.fasterxml.jackson.jr:jackson-jr-retrofit2;2.20.1 +com.fasterxml.jackson.jr:jackson-jr-stree;2.20.1 +com.fasterxml.jackson.module:jackson-module-afterburner;2.20.1 +com.fasterxml.jackson.module:jackson-module-android-record;2.20.1 +com.fasterxml.jackson.module:jackson-module-blackbird;2.20.1 +com.fasterxml.jackson.module:jackson-module-guice;2.20.1 +com.fasterxml.jackson.module:jackson-module-guice7;2.20.1 +com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations;2.20.1 +com.fasterxml.jackson.module:jackson-module-jaxb-annotations;2.20.1 +com.fasterxml.jackson.module:jackson-module-jsonSchema;2.20.1 +com.fasterxml.jackson.module:jackson-module-jsonSchema-jakarta;2.20.1 +com.fasterxml.jackson.module:jackson-module-kotlin;2.20.1 +com.fasterxml.jackson.module:jackson-module-mrbean;2.20.1 +com.fasterxml.jackson.module:jackson-module-no-ctor-deser;2.20.1 +com.fasterxml.jackson.module:jackson-module-osgi;2.20.1 +com.fasterxml.jackson.module:jackson-module-parameter-names;2.20.1 +com.fasterxml.jackson.module:jackson-module-paranamer;2.20.1 +com.fasterxml.jackson.module:jackson-module-scala_2.11;2.20.1 +com.fasterxml.jackson.module:jackson-module-scala_2.12;2.20.1 +com.fasterxml.jackson.module:jackson-module-scala_2.13;2.20.1 +com.fasterxml.jackson.module:jackson-module-scala_3;2.20.1 +com.fasterxml.jackson:jackson-bom;2.20.1 +com.fasterxml:classmate;1.7.1 +com.github.ben-manes.caffeine:caffeine;3.2.3 +com.github.ben-manes.caffeine:guava;3.2.3 +com.github.ben-manes.caffeine:jcache;3.2.3 +com.github.ben-manes.caffeine:simulator;3.2.3 +com.github.mxab.thymeleaf.extras:thymeleaf-extras-data-attribute;2.0.1 +com.google.code.gson:gson;2.13.2 +com.graphql-java:graphql-java;25.0 +com.h2database:h2;2.4.240 +com.hazelcast:hazelcast;5.5.0 +com.hazelcast:hazelcast-spring;5.5.0 +com.ibm.db2:jcc;12.1.3.0 +com.jayway.jsonpath:json-path;2.9.0 +com.jayway.jsonpath:json-path-assert;2.9.0 +com.microsoft.sqlserver:mssql-jdbc;13.2.1.jre11 +com.mysql:mysql-connector-j;9.5.0 +com.netflix.eureka:eureka-client;2.0.5 +com.netflix.eureka:eureka-client-jersey3;2.0.5 +com.netflix.eureka:eureka-core;2.0.5 +com.netflix.eureka:eureka-core-jersey3;2.0.5 +com.oracle.database.ha:ons;23.9.0.25.07 +com.oracle.database.ha:simplefan;23.9.0.25.07 +com.oracle.database.jdbc:ojdbc11;23.9.0.25.07 +com.oracle.database.jdbc:ojdbc11-production;23.9.0.25.07 +com.oracle.database.jdbc:ojdbc17;23.9.0.25.07 +com.oracle.database.jdbc:ojdbc17-production;23.9.0.25.07 +com.oracle.database.jdbc:ojdbc8;23.9.0.25.07 +com.oracle.database.jdbc:ojdbc8-production;23.9.0.25.07 +com.oracle.database.jdbc:rsi;23.9.0.25.07 +com.oracle.database.jdbc:ucp;23.9.0.25.07 +com.oracle.database.jdbc:ucp11;23.9.0.25.07 +com.oracle.database.jdbc:ucp17;23.9.0.25.07 +com.oracle.database.nls:orai18n;23.9.0.25.07 +com.oracle.database.r2dbc:oracle-r2dbc;1.3.0 +com.oracle.database.security:oraclepki;23.9.0.25.07 +com.oracle.database.xml:xdb;23.9.0.25.07 +com.oracle.database.xml:xmlparserv2;23.9.0.25.07 +com.querydsl:codegen-utils;5.1.0 +com.querydsl:querydsl-apt;5.1.0 +com.querydsl:querydsl-bom;5.1.0 +com.querydsl:querydsl-codegen;5.1.0 +com.querydsl:querydsl-collections;5.1.0 +com.querydsl:querydsl-core;5.1.0 +com.querydsl:querydsl-guava;5.1.0 +com.querydsl:querydsl-hibernate-search;5.1.0 +com.querydsl:querydsl-jdo;5.1.0 +com.querydsl:querydsl-jpa;5.1.0 +com.querydsl:querydsl-jpa-codegen;5.1.0 +com.querydsl:querydsl-kotlin;5.1.0 +com.querydsl:querydsl-kotlin-codegen;5.1.0 +com.querydsl:querydsl-lucene3;5.1.0 +com.querydsl:querydsl-lucene4;5.1.0 +com.querydsl:querydsl-lucene5;5.1.0 +com.querydsl:querydsl-mongodb;5.1.0 +com.querydsl:querydsl-scala;5.1.0 +com.querydsl:querydsl-spatial;5.1.0 +com.querydsl:querydsl-sql;5.1.0 +com.querydsl:querydsl-sql-codegen;5.1.0 +com.querydsl:querydsl-sql-spatial;5.1.0 +com.querydsl:querydsl-sql-spring;5.1.0 +com.rabbitmq:amqp-client;5.27.1 +com.rabbitmq:stream-client;0.23.0 +com.redis:testcontainers-redis;2.2.4 +com.samskivert:jmustache;1.16 +com.sendgrid:sendgrid-java;4.10.3 +com.squareup.okhttp3:logging-interceptor;4.12.0 +com.squareup.okhttp3:mockwebserver;4.12.0 +com.squareup.okhttp3:okcurl;4.12.0 +com.squareup.okhttp3:okhttp;4.12.0 +com.squareup.okhttp3:okhttp-bom;4.12.0 +com.squareup.okhttp3:okhttp-brotli;4.12.0 +com.squareup.okhttp3:okhttp-dnsoverhttps;4.12.0 +com.squareup.okhttp3:okhttp-sse;4.12.0 +com.squareup.okhttp3:okhttp-tls;4.12.0 +com.squareup.okhttp3:okhttp-urlconnection;4.12.0 +com.sun.xml.bind:jaxb-core;4.0.6 +com.sun.xml.bind:jaxb-impl;4.0.6 +com.sun.xml.bind:jaxb-jxc;4.0.6 +com.sun.xml.bind:jaxb-osgi;4.0.6 +com.sun.xml.bind:jaxb-xjc;4.0.6 +com.sun.xml.messaging.saaj:saaj-impl;3.0.4 +com.toomuchcoding.jsonassert:jsonassert;0.8.0 +com.toomuchcoding.jsonassert:jsonassert-shade;0.8.0 +com.unboundid:unboundid-ldapsdk;7.0.3 +com.zaxxer:HikariCP;7.0.2 +commons-codec:commons-codec;1.19.0 +commons-logging:commons-logging;1.3.5 +commons-pool:commons-pool;1.6 +io.asyncer:r2dbc-mysql;1.4.1 +io.fabric8.java-generator:io.fabric8.java-generator.gradle.plugin;7.4.0 +io.fabric8.kubernetes:kubernetes-karaf;7.4.0 +io.fabric8:certmanager-client;7.4.0 +io.fabric8:certmanager-model;7.4.0 +io.fabric8:chaosmesh-client;7.4.0 +io.fabric8:chaosmesh-model;7.4.0 +io.fabric8:crd-generator-api;7.4.0 +io.fabric8:crd-generator-api-v2;7.4.0 +io.fabric8:crd-generator-apt;7.4.0 +io.fabric8:crd-generator-cli;7.4.0 +io.fabric8:crd-generator-collector;7.4.0 +io.fabric8:crd-generator-maven-plugin;7.4.0 +io.fabric8:generator-annotations;7.4.0 +io.fabric8:istio-client;7.4.0 +io.fabric8:istio-model;7.4.0 +io.fabric8:java-generator-benchmark;7.4.0 +io.fabric8:java-generator-cli;7.4.0 +io.fabric8:java-generator-core;7.4.0 +io.fabric8:java-generator-maven-plugin;7.4.0 +io.fabric8:knative-client;7.4.0 +io.fabric8:knative-model;7.4.0 +io.fabric8:kube-api-test;7.4.0 +io.fabric8:kube-api-test-client-inject;7.4.0 +io.fabric8:kubernetes-client;7.4.0 +io.fabric8:kubernetes-client-api;7.4.0 +io.fabric8:kubernetes-client-bom;7.4.0 +io.fabric8:kubernetes-client-init-bc-fips;7.4.0 +io.fabric8:kubernetes-httpclient-jdk;7.4.0 +io.fabric8:kubernetes-httpclient-jetty;7.4.0 +io.fabric8:kubernetes-httpclient-okhttp;7.4.0 +io.fabric8:kubernetes-httpclient-vertx;7.4.0 +io.fabric8:kubernetes-junit-jupiter;7.4.0 +io.fabric8:kubernetes-junit-jupiter-autodetected;7.4.0 +io.fabric8:kubernetes-log4j;7.4.0 +io.fabric8:kubernetes-model-admissionregistration;7.4.0 +io.fabric8:kubernetes-model-apiextensions;7.4.0 +io.fabric8:kubernetes-model-apps;7.4.0 +io.fabric8:kubernetes-model-autoscaling;7.4.0 +io.fabric8:kubernetes-model-batch;7.4.0 +io.fabric8:kubernetes-model-certificates;7.4.0 +io.fabric8:kubernetes-model-common;7.4.0 +io.fabric8:kubernetes-model-coordination;7.4.0 +io.fabric8:kubernetes-model-core;7.4.0 +io.fabric8:kubernetes-model-discovery;7.4.0 +io.fabric8:kubernetes-model-events;7.4.0 +io.fabric8:kubernetes-model-extensions;7.4.0 +io.fabric8:kubernetes-model-flowcontrol;7.4.0 +io.fabric8:kubernetes-model-gatewayapi;7.4.0 +io.fabric8:kubernetes-model-kustomize;7.4.0 +io.fabric8:kubernetes-model-metrics;7.4.0 +io.fabric8:kubernetes-model-networking;7.4.0 +io.fabric8:kubernetes-model-node;7.4.0 +io.fabric8:kubernetes-model-policy;7.4.0 +io.fabric8:kubernetes-model-rbac;7.4.0 +io.fabric8:kubernetes-model-resource;7.4.0 +io.fabric8:kubernetes-model-scheduling;7.4.0 +io.fabric8:kubernetes-model-storageclass;7.4.0 +io.fabric8:kubernetes-model-validator;7.4.0 +io.fabric8:kubernetes-openshift-uberjar;7.4.0 +io.fabric8:kubernetes-server-mock;7.4.0 +io.fabric8:mockwebserver;7.4.0 +io.fabric8:open-cluster-management-client;7.4.0 +io.fabric8:open-cluster-management-model;7.4.0 +io.fabric8:openapi-model-generator-maven-plugin;7.4.0 +io.fabric8:openshift-client;7.4.0 +io.fabric8:openshift-client-api;7.4.0 +io.fabric8:openshift-model;7.4.0 +io.fabric8:openshift-model-autoscaling;7.4.0 +io.fabric8:openshift-model-config;7.4.0 +io.fabric8:openshift-model-console;7.4.0 +io.fabric8:openshift-model-hive;7.4.0 +io.fabric8:openshift-model-installer;7.4.0 +io.fabric8:openshift-model-machine;7.4.0 +io.fabric8:openshift-model-machineconfiguration;7.4.0 +io.fabric8:openshift-model-miscellaneous;7.4.0 +io.fabric8:openshift-model-monitoring;7.4.0 +io.fabric8:openshift-model-operator;7.4.0 +io.fabric8:openshift-model-operatorhub;7.4.0 +io.fabric8:openshift-model-storageversionmigrator;7.4.0 +io.fabric8:openshift-model-tuned;7.4.0 +io.fabric8:openshift-model-whereabouts;7.4.0 +io.fabric8:ovn-client;7.4.0 +io.fabric8:ovn-model;7.4.0 +io.fabric8:tekton-client;7.4.0 +io.fabric8:tekton-model;7.4.0 +io.fabric8:verticalpodautoscaler-client;7.4.0 +io.fabric8:verticalpodautoscaler-model;7.4.0 +io.fabric8:volcano-client;7.4.0 +io.fabric8:volcano-model;7.4.0 +io.fabric8:volumesnapshot-client;7.4.0 +io.fabric8:volumesnapshot-model;7.4.0 +io.fabric8:zjsonpatch;7.4.0 +io.github.git-commit-id:git-commit-id-maven-plugin;9.0.2 +io.github.openfeign:feign-annotation-error-decoder;13.6 +io.github.openfeign:feign-bom;13.6 +io.github.openfeign:feign-core;13.6 +io.github.openfeign:feign-dropwizard-metrics4;13.6 +io.github.openfeign:feign-dropwizard-metrics5;13.6 +io.github.openfeign:feign-fastjson2;13.6 +io.github.openfeign:feign-form;13.6 +io.github.openfeign:feign-form-spring;13.6 +io.github.openfeign:feign-googlehttpclient;13.6 +io.github.openfeign:feign-gson;13.6 +io.github.openfeign:feign-hc5;13.6 +io.github.openfeign:feign-httpclient;13.6 +io.github.openfeign:feign-hystrix;13.6 +io.github.openfeign:feign-jackson;13.6 +io.github.openfeign:feign-jackson-jaxb;13.6 +io.github.openfeign:feign-jackson-jr;13.6 +io.github.openfeign:feign-jakarta;13.6 +io.github.openfeign:feign-java11;13.6 +io.github.openfeign:feign-jaxb;13.6 +io.github.openfeign:feign-jaxb-jakarta;13.6 +io.github.openfeign:feign-jaxrs;13.6 +io.github.openfeign:feign-jaxrs2;13.6 +io.github.openfeign:feign-jaxrs3;13.6 +io.github.openfeign:feign-jaxrs4;13.6 +io.github.openfeign:feign-json;13.6 +io.github.openfeign:feign-kotlin;13.6 +io.github.openfeign:feign-micrometer;13.6 +io.github.openfeign:feign-mock;13.6 +io.github.openfeign:feign-moshi;13.6 +io.github.openfeign:feign-okhttp;13.6 +io.github.openfeign:feign-reactive-wrappers;13.6 +io.github.openfeign:feign-ribbon;13.6 +io.github.openfeign:feign-sax;13.6 +io.github.openfeign:feign-slf4j;13.6 +io.github.openfeign:feign-soap;13.6 +io.github.openfeign:feign-soap-jakarta;13.6 +io.github.openfeign:feign-spring;13.6 +io.github.openfeign:feign-vertx;13.6 +io.github.openfeign:feign-vertx4-test;13.6 +io.github.openfeign:feign-vertx5-test;13.6 +io.github.resilience4j:resilience4j-all;2.3.0 +io.github.resilience4j:resilience4j-annotations;2.3.0 +io.github.resilience4j:resilience4j-bom;2.3.0 +io.github.resilience4j:resilience4j-bulkhead;2.3.0 +io.github.resilience4j:resilience4j-cache;2.3.0 +io.github.resilience4j:resilience4j-circuitbreaker;2.3.0 +io.github.resilience4j:resilience4j-circularbuffer;2.3.0 +io.github.resilience4j:resilience4j-consumer;2.3.0 +io.github.resilience4j:resilience4j-core;2.3.0 +io.github.resilience4j:resilience4j-feign;2.3.0 +io.github.resilience4j:resilience4j-kotlin;2.3.0 +io.github.resilience4j:resilience4j-metrics;2.3.0 +io.github.resilience4j:resilience4j-micrometer;2.3.0 +io.github.resilience4j:resilience4j-ratelimiter;2.3.0 +io.github.resilience4j:resilience4j-reactor;2.3.0 +io.github.resilience4j:resilience4j-retry;2.3.0 +io.github.resilience4j:resilience4j-rxjava2;2.3.0 +io.github.resilience4j:resilience4j-rxjava3;2.3.0 +io.github.resilience4j:resilience4j-spring;2.3.0 +io.github.resilience4j:resilience4j-spring-boot2;2.3.0 +io.github.resilience4j:resilience4j-spring-boot3;2.3.0 +io.github.resilience4j:resilience4j-spring-cloud2;2.3.0 +io.github.resilience4j:resilience4j-spring6;2.3.0 +io.github.resilience4j:resilience4j-timelimiter;2.3.0 +io.github.resilience4j:resilience4j-vavr;2.3.0 +io.kubernetes:client-java;24.0.0 +io.kubernetes:client-java-extended;24.0.0 +io.kubernetes:client-java-spring-integration;24.0.0 +io.lettuce:lettuce-core;6.8.1.RELEASE +io.micrometer:context-propagation;1.2.0 +io.micrometer:docs;1.6.0 +io.micrometer:micrometer-bom;1.16.0 +io.micrometer:micrometer-commons;1.16.0 +io.micrometer:micrometer-core;1.16.0 +io.micrometer:micrometer-jakarta9;1.16.0 +io.micrometer:micrometer-java11;1.16.0 +io.micrometer:micrometer-java21;1.16.0 +io.micrometer:micrometer-jetty11;1.16.0 +io.micrometer:micrometer-jetty12;1.16.0 +io.micrometer:micrometer-observation;1.16.0 +io.micrometer:micrometer-observation-test;1.16.0 +io.micrometer:micrometer-registry-appoptics;1.16.0 +io.micrometer:micrometer-registry-atlas;1.16.0 +io.micrometer:micrometer-registry-azure-monitor;1.16.0 +io.micrometer:micrometer-registry-cloudwatch2;1.16.0 +io.micrometer:micrometer-registry-datadog;1.16.0 +io.micrometer:micrometer-registry-dynatrace;1.16.0 +io.micrometer:micrometer-registry-elastic;1.16.0 +io.micrometer:micrometer-registry-ganglia;1.16.0 +io.micrometer:micrometer-registry-graphite;1.16.0 +io.micrometer:micrometer-registry-health;1.16.0 +io.micrometer:micrometer-registry-humio;1.16.0 +io.micrometer:micrometer-registry-influx;1.16.0 +io.micrometer:micrometer-registry-jmx;1.16.0 +io.micrometer:micrometer-registry-kairos;1.16.0 +io.micrometer:micrometer-registry-new-relic;1.16.0 +io.micrometer:micrometer-registry-opentsdb;1.16.0 +io.micrometer:micrometer-registry-otlp;1.16.0 +io.micrometer:micrometer-registry-prometheus;1.16.0 +io.micrometer:micrometer-registry-prometheus-simpleclient;1.16.0 +io.micrometer:micrometer-registry-signalfx;1.16.0 +io.micrometer:micrometer-registry-stackdriver;1.16.0 +io.micrometer:micrometer-registry-statsd;1.16.0 +io.micrometer:micrometer-registry-wavefront;1.16.0 +io.micrometer:micrometer-test;1.16.0 +io.micrometer:micrometer-tracing;1.6.0 +io.micrometer:micrometer-tracing-bom;1.6.0 +io.micrometer:micrometer-tracing-bridge-brave;1.6.0 +io.micrometer:micrometer-tracing-bridge-otel;1.6.0 +io.micrometer:micrometer-tracing-integration-test;1.6.0 +io.micrometer:micrometer-tracing-reporter-wavefront;1.6.0 +io.micrometer:micrometer-tracing-test;1.6.0 +io.netty:netty-all;4.2.7.Final +io.netty:netty-bom;4.2.7.Final +io.netty:netty-buffer;4.2.7.Final +io.netty:netty-codec;4.2.7.Final +io.netty:netty-codec-base;4.2.7.Final +io.netty:netty-codec-classes-quic;4.2.7.Final +io.netty:netty-codec-compression;4.2.7.Final +io.netty:netty-codec-dns;4.2.7.Final +io.netty:netty-codec-haproxy;4.2.7.Final +io.netty:netty-codec-http;4.2.7.Final +io.netty:netty-codec-http2;4.2.7.Final +io.netty:netty-codec-http3;4.2.7.Final +io.netty:netty-codec-marshalling;4.2.7.Final +io.netty:netty-codec-memcache;4.2.7.Final +io.netty:netty-codec-mqtt;4.2.7.Final +io.netty:netty-codec-native-quic;4.2.7.Final +io.netty:netty-codec-protobuf;4.2.7.Final +io.netty:netty-codec-redis;4.2.7.Final +io.netty:netty-codec-smtp;4.2.7.Final +io.netty:netty-codec-socks;4.2.7.Final +io.netty:netty-codec-stomp;4.2.7.Final +io.netty:netty-codec-xml;4.2.7.Final +io.netty:netty-common;4.2.7.Final +io.netty:netty-dev-tools;4.2.7.Final +io.netty:netty-handler;4.2.7.Final +io.netty:netty-handler-proxy;4.2.7.Final +io.netty:netty-handler-ssl-ocsp;4.2.7.Final +io.netty:netty-pkitesting;4.2.7.Final +io.netty:netty-resolver;4.2.7.Final +io.netty:netty-resolver-dns;4.2.7.Final +io.netty:netty-resolver-dns-classes-macos;4.2.7.Final +io.netty:netty-resolver-dns-native-macos;4.2.7.Final +io.netty:netty-tcnative;2.0.74.Final +io.netty:netty-tcnative-boringssl-static;2.0.74.Final +io.netty:netty-tcnative-classes;2.0.74.Final +io.netty:netty-transport;4.2.7.Final +io.netty:netty-transport-classes-epoll;4.2.7.Final +io.netty:netty-transport-classes-io_uring;4.2.7.Final +io.netty:netty-transport-classes-kqueue;4.2.7.Final +io.netty:netty-transport-native-epoll;4.2.7.Final +io.netty:netty-transport-native-io_uring;4.2.7.Final +io.netty:netty-transport-native-kqueue;4.2.7.Final +io.netty:netty-transport-native-unix-common;4.2.7.Final +io.netty:netty-transport-rxtx;4.2.7.Final +io.netty:netty-transport-sctp;4.2.7.Final +io.netty:netty-transport-udt;4.2.7.Final +io.opentelemetry:opentelemetry-api;1.55.0 +io.opentelemetry:opentelemetry-bom;1.55.0 +io.opentelemetry:opentelemetry-common;1.55.0 +io.opentelemetry:opentelemetry-context;1.55.0 +io.opentelemetry:opentelemetry-exporter-common;1.55.0 +io.opentelemetry:opentelemetry-exporter-logging;1.55.0 +io.opentelemetry:opentelemetry-exporter-logging-otlp;1.55.0 +io.opentelemetry:opentelemetry-exporter-otlp;1.55.0 +io.opentelemetry:opentelemetry-exporter-otlp-common;1.55.0 +io.opentelemetry:opentelemetry-exporter-sender-grpc-managed-channel;1.55.0 +io.opentelemetry:opentelemetry-exporter-sender-jdk;1.55.0 +io.opentelemetry:opentelemetry-exporter-sender-okhttp;1.55.0 +io.opentelemetry:opentelemetry-exporter-zipkin;1.55.0 +io.opentelemetry:opentelemetry-extension-kotlin;1.55.0 +io.opentelemetry:opentelemetry-extension-trace-propagators;1.55.0 +io.opentelemetry:opentelemetry-opentracing-shim;1.55.0 +io.opentelemetry:opentelemetry-sdk;1.55.0 +io.opentelemetry:opentelemetry-sdk-common;1.55.0 +io.opentelemetry:opentelemetry-sdk-extension-autoconfigure;1.55.0 +io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi;1.55.0 +io.opentelemetry:opentelemetry-sdk-extension-jaeger-remote-sampler;1.55.0 +io.opentelemetry:opentelemetry-sdk-logs;1.55.0 +io.opentelemetry:opentelemetry-sdk-metrics;1.55.0 +io.opentelemetry:opentelemetry-sdk-testing;1.55.0 +io.opentelemetry:opentelemetry-sdk-trace;1.55.0 +io.projectreactor.addons:reactor-adapter;3.6.0 +io.projectreactor.addons:reactor-extra;3.6.0 +io.projectreactor.addons:reactor-pool;1.2.0 +io.projectreactor.addons:reactor-pool-micrometer;1.2.0 +io.projectreactor.kotlin:reactor-kotlin-extensions;1.3.0 +io.projectreactor.netty:reactor-netty;1.3.0 +io.projectreactor.netty:reactor-netty-core;1.3.0 +io.projectreactor.netty:reactor-netty-http;1.3.0 +io.projectreactor.netty:reactor-netty-http-brave;1.3.0 +io.projectreactor.netty:reactor-netty-quic;1.3.0 +io.projectreactor:reactor-bom;2025.0.0 +io.projectreactor:reactor-core;3.8.0 +io.projectreactor:reactor-core-micrometer;3.8.0 +io.projectreactor:reactor-test;3.8.0 +io.projectreactor:reactor-tools;3.8.0 +io.prometheus:prometheus-metrics-bom;1.4.3 +io.prometheus:prometheus-metrics-config;1.4.3 +io.prometheus:prometheus-metrics-core;1.4.3 +io.prometheus:prometheus-metrics-exporter-common;1.4.3 +io.prometheus:prometheus-metrics-exporter-httpserver;1.4.3 +io.prometheus:prometheus-metrics-exporter-opentelemetry;1.4.3 +io.prometheus:prometheus-metrics-exporter-opentelemetry-no-otel;1.4.3 +io.prometheus:prometheus-metrics-exporter-opentelemetry-otel-agent-resources;1.4.3 +io.prometheus:prometheus-metrics-exporter-pushgateway;1.4.3 +io.prometheus:prometheus-metrics-exporter-servlet-jakarta;1.4.3 +io.prometheus:prometheus-metrics-exporter-servlet-javax;1.4.3 +io.prometheus:prometheus-metrics-exposition-formats;1.4.3 +io.prometheus:prometheus-metrics-exposition-formats-no-protobuf;1.4.3 +io.prometheus:prometheus-metrics-exposition-textformats;1.4.3 +io.prometheus:prometheus-metrics-instrumentation-caffeine;1.4.3 +io.prometheus:prometheus-metrics-instrumentation-dropwizard;1.4.3 +io.prometheus:prometheus-metrics-instrumentation-dropwizard5;1.4.3 +io.prometheus:prometheus-metrics-instrumentation-guava;1.4.3 +io.prometheus:prometheus-metrics-instrumentation-jvm;1.4.3 +io.prometheus:prometheus-metrics-model;1.4.3 +io.prometheus:prometheus-metrics-simpleclient-bridge;1.4.3 +io.prometheus:prometheus-metrics-tracer;1.4.3 +io.prometheus:prometheus-metrics-tracer-common;1.4.3 +io.prometheus:prometheus-metrics-tracer-initializer;1.4.3 +io.prometheus:prometheus-metrics-tracer-otel;1.4.3 +io.prometheus:prometheus-metrics-tracer-otel-agent;1.4.3 +io.prometheus:simpleclient;0.16.0 +io.prometheus:simpleclient_bom;0.16.0 +io.prometheus:simpleclient_caffeine;0.16.0 +io.prometheus:simpleclient_common;0.16.0 +io.prometheus:simpleclient_dropwizard;0.16.0 +io.prometheus:simpleclient_graphite_bridge;0.16.0 +io.prometheus:simpleclient_guava;0.16.0 +io.prometheus:simpleclient_hibernate;0.16.0 +io.prometheus:simpleclient_hotspot;0.16.0 +io.prometheus:simpleclient_httpserver;0.16.0 +io.prometheus:simpleclient_jetty;0.16.0 +io.prometheus:simpleclient_jetty_jdk8;0.16.0 +io.prometheus:simpleclient_log4j;0.16.0 +io.prometheus:simpleclient_log4j2;0.16.0 +io.prometheus:simpleclient_logback;0.16.0 +io.prometheus:simpleclient_pushgateway;0.16.0 +io.prometheus:simpleclient_servlet;0.16.0 +io.prometheus:simpleclient_servlet_jakarta;0.16.0 +io.prometheus:simpleclient_spring_boot;0.16.0 +io.prometheus:simpleclient_spring_web;0.16.0 +io.prometheus:simpleclient_tracer_common;0.16.0 +io.prometheus:simpleclient_tracer_otel;0.16.0 +io.prometheus:simpleclient_tracer_otel_agent;0.16.0 +io.prometheus:simpleclient_vertx;0.16.0 +io.r2dbc:r2dbc-h2;1.1.0.RELEASE +io.r2dbc:r2dbc-mssql;1.0.3.RELEASE +io.r2dbc:r2dbc-pool;1.0.2.RELEASE +io.r2dbc:r2dbc-proxy;1.1.6.RELEASE +io.r2dbc:r2dbc-spi;1.0.0.RELEASE +io.reactivex.rxjava3:rxjava;3.1.12 +io.rsocket:rsocket-bom;1.1.5 +io.rsocket:rsocket-core;1.1.5 +io.rsocket:rsocket-load-balancer;1.1.5 +io.rsocket:rsocket-micrometer;1.1.5 +io.rsocket:rsocket-test;1.1.5 +io.rsocket:rsocket-transport-local;1.1.5 +io.rsocket:rsocket-transport-netty;1.1.5 +io.spring.gradle:dependency-management-plugin;1.1.7 +io.zipkin.brave:brave;6.3.0 +io.zipkin.brave:brave-bom;6.3.0 +io.zipkin.brave:brave-context-jfr;6.3.0 +io.zipkin.brave:brave-context-log4j12;6.3.0 +io.zipkin.brave:brave-context-log4j2;6.3.0 +io.zipkin.brave:brave-context-slf4j;6.3.0 +io.zipkin.brave:brave-instrumentation-dubbo;6.3.0 +io.zipkin.brave:brave-instrumentation-grpc;6.3.0 +io.zipkin.brave:brave-instrumentation-http;6.3.0 +io.zipkin.brave:brave-instrumentation-http-tests;6.3.0 +io.zipkin.brave:brave-instrumentation-http-tests-jakarta;6.3.0 +io.zipkin.brave:brave-instrumentation-httpasyncclient;6.3.0 +io.zipkin.brave:brave-instrumentation-httpclient;6.3.0 +io.zipkin.brave:brave-instrumentation-httpclient5;6.3.0 +io.zipkin.brave:brave-instrumentation-jakarta-jms;6.3.0 +io.zipkin.brave:brave-instrumentation-jaxrs2;6.3.0 +io.zipkin.brave:brave-instrumentation-jdbi3;6.3.0 +io.zipkin.brave:brave-instrumentation-jersey-server;6.3.0 +io.zipkin.brave:brave-instrumentation-jersey-server-jakarta;6.3.0 +io.zipkin.brave:brave-instrumentation-jms;6.3.0 +io.zipkin.brave:brave-instrumentation-jms-jakarta;6.3.0 +io.zipkin.brave:brave-instrumentation-kafka-clients;6.3.0 +io.zipkin.brave:brave-instrumentation-kafka-streams;6.3.0 +io.zipkin.brave:brave-instrumentation-messaging;6.3.0 +io.zipkin.brave:brave-instrumentation-mongodb;6.3.0 +io.zipkin.brave:brave-instrumentation-mysql;6.3.0 +io.zipkin.brave:brave-instrumentation-mysql6;6.3.0 +io.zipkin.brave:brave-instrumentation-mysql8;6.3.0 +io.zipkin.brave:brave-instrumentation-netty-codec-http;6.3.0 +io.zipkin.brave:brave-instrumentation-okhttp3;6.3.0 +io.zipkin.brave:brave-instrumentation-rocketmq-client;6.3.0 +io.zipkin.brave:brave-instrumentation-rpc;6.3.0 +io.zipkin.brave:brave-instrumentation-servlet;6.3.0 +io.zipkin.brave:brave-instrumentation-servlet-jakarta;6.3.0 +io.zipkin.brave:brave-instrumentation-spring-rabbit;6.3.0 +io.zipkin.brave:brave-instrumentation-spring-web;6.3.0 +io.zipkin.brave:brave-instrumentation-spring-webmvc;6.3.0 +io.zipkin.brave:brave-instrumentation-vertx-web;6.3.0 +io.zipkin.brave:brave-spring-beans;6.3.0 +io.zipkin.brave:brave-tests;6.3.0 +io.zipkin.reporter2:zipkin-reporter;3.5.1 +io.zipkin.reporter2:zipkin-reporter-bom;3.5.1 +io.zipkin.reporter2:zipkin-reporter-brave;3.5.1 +io.zipkin.reporter2:zipkin-reporter-metrics-micrometer;3.5.1 +io.zipkin.reporter2:zipkin-reporter-spring-beans;3.5.1 +io.zipkin.reporter2:zipkin-sender-activemq-client;3.5.1 +io.zipkin.reporter2:zipkin-sender-amqp-client;3.5.1 +io.zipkin.reporter2:zipkin-sender-kafka;3.5.1 +io.zipkin.reporter2:zipkin-sender-libthrift;3.5.1 +io.zipkin.reporter2:zipkin-sender-okhttp3;3.5.1 +io.zipkin.reporter2:zipkin-sender-pulsar-client;3.5.1 +io.zipkin.reporter2:zipkin-sender-urlconnection;3.5.1 +jakarta.activation:jakarta.activation-api;2.1.4 +jakarta.annotation:jakarta.annotation-api;3.0.0 +jakarta.inject:jakarta.inject-api;2.0.1 +jakarta.jms:jakarta.jms-api;3.1.0 +jakarta.json.bind:jakarta.json.bind-api;3.0.1 +jakarta.json:jakarta.json-api;2.1.3 +jakarta.mail:jakarta.mail-api;2.1.5 +jakarta.management.j2ee:jakarta.management.j2ee-api;1.1.4 +jakarta.persistence:jakarta.persistence-api;3.2.0 +jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api;3.0.2 +jakarta.servlet:jakarta.servlet-api;6.1.0 +jakarta.transaction:jakarta.transaction-api;2.0.1 +jakarta.validation:jakarta.validation-api;3.1.1 +jakarta.websocket:jakarta.websocket-api;2.2.0 +jakarta.websocket:jakarta.websocket-client-api;2.2.0 +jakarta.ws.rs:jakarta.ws.rs-api;4.0.0 +jakarta.xml.bind:jakarta.xml.bind-api;4.0.4 +jakarta.xml.soap:jakarta.xml.soap-api;3.0.2 +jakarta.xml.ws:jakarta.xml.ws-api;4.0.2 +javax.cache:cache-api;1.1.1 +javax.money:money-api;1.1 +jaxen:jaxen;2.0.0 +junit:junit;4.13.2 +net.bytebuddy:byte-buddy;1.17.8 +net.bytebuddy:byte-buddy-agent;1.17.8 +net.minidev:json-smart;2.6.0 +net.sourceforge.jtds:jtds;1.3.1 +net.sourceforge.nekohtml:nekohtml;1.9.22 +nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect;3.4.0 +org.apache.activemq:activemq-all;6.1.8 +org.apache.activemq:activemq-amqp;6.1.8 +org.apache.activemq:activemq-blueprint;6.1.8 +org.apache.activemq:activemq-bom;6.1.8 +org.apache.activemq:activemq-broker;6.1.8 +org.apache.activemq:activemq-client;6.1.8 +org.apache.activemq:activemq-console;6.1.8 +org.apache.activemq:activemq-http;6.1.8 +org.apache.activemq:activemq-jaas;6.1.8 +org.apache.activemq:activemq-jdbc-store;6.1.8 +org.apache.activemq:activemq-jms-pool;6.1.8 +org.apache.activemq:activemq-kahadb-store;6.1.8 +org.apache.activemq:activemq-karaf;6.1.8 +org.apache.activemq:activemq-log4j-appender;6.1.8 +org.apache.activemq:activemq-mqtt;6.1.8 +org.apache.activemq:activemq-openwire-generator;6.1.8 +org.apache.activemq:activemq-openwire-legacy;6.1.8 +org.apache.activemq:activemq-osgi;6.1.8 +org.apache.activemq:activemq-pool;6.1.8 +org.apache.activemq:activemq-ra;6.1.8 +org.apache.activemq:activemq-rar;6.1.8 +org.apache.activemq:activemq-run;6.1.8 +org.apache.activemq:activemq-runtime-config;6.1.8 +org.apache.activemq:activemq-shiro;6.1.8 +org.apache.activemq:activemq-spring;6.1.8 +org.apache.activemq:activemq-stomp;6.1.8 +org.apache.activemq:activemq-web;6.1.8 +org.apache.activemq:activemq-web-console;6.1.8 +org.apache.activemq:activemq-web-demo;6.1.8 +org.apache.activemq:artemis-amqp-protocol;2.43.0 +org.apache.activemq:artemis-bom;2.43.0 +org.apache.activemq:artemis-boot;2.43.0 +org.apache.activemq:artemis-cdi-client;2.43.0 +org.apache.activemq:artemis-cli;2.43.0 +org.apache.activemq:artemis-commons;2.43.0 +org.apache.activemq:artemis-console;2.43.0 +org.apache.activemq:artemis-core-client;2.43.0 +org.apache.activemq:artemis-core-client-all;2.43.0 +org.apache.activemq:artemis-core-client-osgi;2.43.0 +org.apache.activemq:artemis-dto;2.43.0 +org.apache.activemq:artemis-features;2.43.0 +org.apache.activemq:artemis-hornetq-protocol;2.43.0 +org.apache.activemq:artemis-hqclient-protocol;2.43.0 +org.apache.activemq:artemis-jakarta-cdi-client;2.43.0 +org.apache.activemq:artemis-jakarta-client;2.43.0 +org.apache.activemq:artemis-jakarta-client-all;2.43.0 +org.apache.activemq:artemis-jakarta-openwire-protocol;2.43.0 +org.apache.activemq:artemis-jakarta-ra;2.43.0 +org.apache.activemq:artemis-jakarta-server;2.43.0 +org.apache.activemq:artemis-jakarta-service-extensions;2.43.0 +org.apache.activemq:artemis-jdbc-store;2.43.0 +org.apache.activemq:artemis-jms-client;2.43.0 +org.apache.activemq:artemis-jms-client-all;2.43.0 +org.apache.activemq:artemis-jms-client-osgi;2.43.0 +org.apache.activemq:artemis-jms-server;2.43.0 +org.apache.activemq:artemis-journal;2.43.0 +org.apache.activemq:artemis-lockmanager-api;2.43.0 +org.apache.activemq:artemis-lockmanager-ri;2.43.0 +org.apache.activemq:artemis-mqtt-protocol;2.43.0 +org.apache.activemq:artemis-openwire-protocol;2.43.0 +org.apache.activemq:artemis-ra;2.43.0 +org.apache.activemq:artemis-selector;2.43.0 +org.apache.activemq:artemis-server;2.43.0 +org.apache.activemq:artemis-server-osgi;2.43.0 +org.apache.activemq:artemis-service-extensions;2.43.0 +org.apache.activemq:artemis-stomp-protocol;2.43.0 +org.apache.activemq:artemis-web;2.43.0 +org.apache.activemq:artemis-website;2.43.0 +org.apache.cassandra:java-driver-bom;4.19.2 +org.apache.cassandra:java-driver-core;4.19.2 +org.apache.cassandra:java-driver-core-shaded;4.19.2 +org.apache.cassandra:java-driver-guava-shaded;4.19.2 +org.apache.cassandra:java-driver-mapper-processor;4.19.2 +org.apache.cassandra:java-driver-mapper-runtime;4.19.2 +org.apache.cassandra:java-driver-metrics-micrometer;4.19.2 +org.apache.cassandra:java-driver-metrics-microprofile;4.19.2 +org.apache.cassandra:java-driver-query-builder;4.19.2 +org.apache.cassandra:java-driver-test-infra;4.19.2 +org.apache.commons:commons-dbcp2;2.13.0 +org.apache.commons:commons-lang3;3.19.0 +org.apache.commons:commons-pool2;2.12.1 +org.apache.curator:curator-framework;5.9.0 +org.apache.curator:curator-recipes;5.9.0 +org.apache.curator:curator-test;5.9.0 +org.apache.curator:curator-x-discovery;5.9.0 +org.apache.derby:derby;10.16.1.1 +org.apache.derby:derbyclient;10.16.1.1 +org.apache.derby:derbynet;10.16.1.1 +org.apache.derby:derbyoptionaltools;10.16.1.1 +org.apache.derby:derbyshared;10.16.1.1 +org.apache.derby:derbytools;10.16.1.1 +org.apache.groovy:groovy;5.0.2 +org.apache.groovy:groovy-ant;5.0.2 +org.apache.groovy:groovy-astbuilder;5.0.2 +org.apache.groovy:groovy-bom;5.0.2 +org.apache.groovy:groovy-cli-commons;5.0.2 +org.apache.groovy:groovy-cli-picocli;5.0.2 +org.apache.groovy:groovy-console;5.0.2 +org.apache.groovy:groovy-contracts;5.0.2 +org.apache.groovy:groovy-datetime;5.0.2 +org.apache.groovy:groovy-dateutil;5.0.2 +org.apache.groovy:groovy-docgenerator;5.0.2 +org.apache.groovy:groovy-ginq;5.0.2 +org.apache.groovy:groovy-groovydoc;5.0.2 +org.apache.groovy:groovy-groovysh;5.0.2 +org.apache.groovy:groovy-jmx;5.0.2 +org.apache.groovy:groovy-json;5.0.2 +org.apache.groovy:groovy-jsr223;5.0.2 +org.apache.groovy:groovy-macro;5.0.2 +org.apache.groovy:groovy-macro-library;5.0.2 +org.apache.groovy:groovy-nio;5.0.2 +org.apache.groovy:groovy-servlet;5.0.2 +org.apache.groovy:groovy-sql;5.0.2 +org.apache.groovy:groovy-swing;5.0.2 +org.apache.groovy:groovy-templates;5.0.2 +org.apache.groovy:groovy-test;5.0.2 +org.apache.groovy:groovy-test-junit5;5.0.2 +org.apache.groovy:groovy-testng;5.0.2 +org.apache.groovy:groovy-toml;5.0.2 +org.apache.groovy:groovy-typecheckers;5.0.2 +org.apache.groovy:groovy-xml;5.0.2 +org.apache.groovy:groovy-yaml;5.0.2 +org.apache.httpcomponents.client5:httpclient5;5.5.1 +org.apache.httpcomponents.client5:httpclient5-cache;5.5.1 +org.apache.httpcomponents.client5:httpclient5-fluent;5.5.1 +org.apache.httpcomponents.core5:httpcore5;5.3.6 +org.apache.httpcomponents.core5:httpcore5-h2;5.3.6 +org.apache.httpcomponents.core5:httpcore5-reactive;5.3.6 +org.apache.httpcomponents:httpasyncclient;4.1.5 +org.apache.httpcomponents:httpcore;4.4.16 +org.apache.httpcomponents:httpcore-nio;4.4.16 +org.apache.kafka:connect;4.1.1 +org.apache.kafka:connect-api;4.1.1 +org.apache.kafka:connect-basic-auth-extension;4.1.1 +org.apache.kafka:connect-file;4.1.1 +org.apache.kafka:connect-json;4.1.1 +org.apache.kafka:connect-mirror;4.1.1 +org.apache.kafka:connect-mirror-client;4.1.1 +org.apache.kafka:connect-runtime;4.1.1 +org.apache.kafka:connect-transforms;4.1.1 +org.apache.kafka:generator;4.1.1 +org.apache.kafka:kafka-clients;4.1.1 +org.apache.kafka:kafka-metadata;4.1.1 +org.apache.kafka:kafka-raft;4.1.1 +org.apache.kafka:kafka-server;4.1.1 +org.apache.kafka:kafka-server-common;4.1.1 +org.apache.kafka:kafka-shell;4.1.1 +org.apache.kafka:kafka-storage;4.1.1 +org.apache.kafka:kafka-storage-api;4.1.1 +org.apache.kafka:kafka-streams;4.1.1 +org.apache.kafka:kafka-streams-scala_2.13;4.1.1 +org.apache.kafka:kafka-streams-test-utils;4.1.1 +org.apache.kafka:kafka-tools;4.1.1 +org.apache.kafka:kafka_2.13;4.1.1 +org.apache.kafka:trogdor;4.1.1 +org.apache.logging.log4j:log4j-1.2-api;2.25.2 +org.apache.logging.log4j:log4j-api;2.25.2 +org.apache.logging.log4j:log4j-api-test;2.25.2 +org.apache.logging.log4j:log4j-appserver;2.25.2 +org.apache.logging.log4j:log4j-bom;2.25.2 +org.apache.logging.log4j:log4j-cassandra;2.25.2 +org.apache.logging.log4j:log4j-core;2.25.2 +org.apache.logging.log4j:log4j-core-test;2.25.2 +org.apache.logging.log4j:log4j-couchdb;2.25.2 +org.apache.logging.log4j:log4j-docker;2.25.2 +org.apache.logging.log4j:log4j-flume-ng;2.23.1 +org.apache.logging.log4j:log4j-iostreams;2.25.2 +org.apache.logging.log4j:log4j-jakarta-jms;2.25.2 +org.apache.logging.log4j:log4j-jakarta-smtp;2.25.2 +org.apache.logging.log4j:log4j-jakarta-web;2.25.2 +org.apache.logging.log4j:log4j-jcl;2.25.2 +org.apache.logging.log4j:log4j-jpa;2.25.2 +org.apache.logging.log4j:log4j-jpl;2.25.2 +org.apache.logging.log4j:log4j-jul;2.25.2 +org.apache.logging.log4j:log4j-layout-template-json;2.25.2 +org.apache.logging.log4j:log4j-mongodb;2.25.2 +org.apache.logging.log4j:log4j-mongodb4;2.25.2 +org.apache.logging.log4j:log4j-slf4j-impl;2.25.2 +org.apache.logging.log4j:log4j-slf4j2-impl;2.25.2 +org.apache.logging.log4j:log4j-spring-boot;2.25.2 +org.apache.logging.log4j:log4j-spring-cloud-config-client;2.25.2 +org.apache.logging.log4j:log4j-taglib;2.25.2 +org.apache.logging.log4j:log4j-to-jul;2.25.2 +org.apache.logging.log4j:log4j-to-slf4j;2.25.2 +org.apache.logging.log4j:log4j-web;2.25.2 +org.apache.maven.plugins:maven-antrun-plugin;3.2.0 +org.apache.maven.plugins:maven-assembly-plugin;3.7.1 +org.apache.maven.plugins:maven-clean-plugin;3.5.0 +org.apache.maven.plugins:maven-compiler-plugin;3.14.1 +org.apache.maven.plugins:maven-dependency-plugin;3.9.0 +org.apache.maven.plugins:maven-deploy-plugin;3.1.4 +org.apache.maven.plugins:maven-enforcer-plugin;3.6.2 +org.apache.maven.plugins:maven-failsafe-plugin;3.5.4 +org.apache.maven.plugins:maven-help-plugin;3.5.1 +org.apache.maven.plugins:maven-install-plugin;3.1.4 +org.apache.maven.plugins:maven-invoker-plugin;3.9.1 +org.apache.maven.plugins:maven-jar-plugin;3.4.2 +org.apache.maven.plugins:maven-javadoc-plugin;3.12.0 +org.apache.maven.plugins:maven-release-plugin;3.2.0 +org.apache.maven.plugins:maven-resources-plugin;3.3.1 +org.apache.maven.plugins:maven-shade-plugin;3.6.1 +org.apache.maven.plugins:maven-source-plugin;3.3.1 +org.apache.maven.plugins:maven-surefire-plugin;3.5.4 +org.apache.maven.plugins:maven-war-plugin;3.4.0 +org.apache.pulsar:bouncy-castle-bc;4.1.1 +org.apache.pulsar:bouncy-castle-bcfips;4.1.1 +org.apache.pulsar:bouncy-castle-parent;4.1.1 +org.apache.pulsar:buildtools;4.1.1 +org.apache.pulsar:distribution;4.1.1 +org.apache.pulsar:docker-images;4.1.1 +org.apache.pulsar:jclouds-shaded;4.1.1 +org.apache.pulsar:managed-ledger;4.1.1 +org.apache.pulsar:pulsar;4.1.1 +org.apache.pulsar:pulsar-all-docker-image;4.1.1 +org.apache.pulsar:pulsar-bom;4.1.1 +org.apache.pulsar:pulsar-broker;4.1.1 +org.apache.pulsar:pulsar-broker-auth-athenz;4.1.1 +org.apache.pulsar:pulsar-broker-auth-oidc;4.1.1 +org.apache.pulsar:pulsar-broker-auth-sasl;4.1.1 +org.apache.pulsar:pulsar-broker-common;4.1.1 +org.apache.pulsar:pulsar-cli-utils;4.1.1 +org.apache.pulsar:pulsar-client;4.1.1 +org.apache.pulsar:pulsar-client-admin;4.1.1 +org.apache.pulsar:pulsar-client-admin-api;4.1.1 +org.apache.pulsar:pulsar-client-admin-original;4.1.1 +org.apache.pulsar:pulsar-client-all;4.1.1 +org.apache.pulsar:pulsar-client-api;4.1.1 +org.apache.pulsar:pulsar-client-auth-athenz;4.1.1 +org.apache.pulsar:pulsar-client-auth-sasl;4.1.1 +org.apache.pulsar:pulsar-client-messagecrypto-bc;4.1.1 +org.apache.pulsar:pulsar-client-original;4.1.1 +org.apache.pulsar:pulsar-client-tools;4.1.1 +org.apache.pulsar:pulsar-client-tools-api;4.1.1 +org.apache.pulsar:pulsar-common;4.1.1 +org.apache.pulsar:pulsar-config-validation;4.1.1 +org.apache.pulsar:pulsar-docker-image;4.1.1 +org.apache.pulsar:pulsar-docs-tools;4.1.1 +org.apache.pulsar:pulsar-functions;4.1.1 +org.apache.pulsar:pulsar-functions-api;4.1.1 +org.apache.pulsar:pulsar-functions-api-examples;4.1.1 +org.apache.pulsar:pulsar-functions-api-examples-builtin;4.1.1 +org.apache.pulsar:pulsar-functions-instance;4.1.1 +org.apache.pulsar:pulsar-functions-local-runner;4.1.1 +org.apache.pulsar:pulsar-functions-local-runner-original;4.1.1 +org.apache.pulsar:pulsar-functions-proto;4.1.1 +org.apache.pulsar:pulsar-functions-runtime;4.1.1 +org.apache.pulsar:pulsar-functions-runtime-all;4.1.1 +org.apache.pulsar:pulsar-functions-secrets;4.1.1 +org.apache.pulsar:pulsar-functions-utils;4.1.1 +org.apache.pulsar:pulsar-functions-worker;4.1.1 +org.apache.pulsar:pulsar-io;4.1.1 +org.apache.pulsar:pulsar-io-aerospike;4.1.1 +org.apache.pulsar:pulsar-io-alluxio;4.1.1 +org.apache.pulsar:pulsar-io-aws;4.1.1 +org.apache.pulsar:pulsar-io-batch-data-generator;4.1.1 +org.apache.pulsar:pulsar-io-batch-discovery-triggerers;4.1.1 +org.apache.pulsar:pulsar-io-canal;4.1.1 +org.apache.pulsar:pulsar-io-cassandra;4.1.1 +org.apache.pulsar:pulsar-io-common;4.1.1 +org.apache.pulsar:pulsar-io-core;4.1.1 +org.apache.pulsar:pulsar-io-data-generator;4.1.1 +org.apache.pulsar:pulsar-io-debezium;4.1.1 +org.apache.pulsar:pulsar-io-debezium-core;4.1.1 +org.apache.pulsar:pulsar-io-debezium-mongodb;4.1.1 +org.apache.pulsar:pulsar-io-debezium-mssql;4.1.1 +org.apache.pulsar:pulsar-io-debezium-mysql;4.1.1 +org.apache.pulsar:pulsar-io-debezium-oracle;4.1.1 +org.apache.pulsar:pulsar-io-debezium-postgres;4.1.1 +org.apache.pulsar:pulsar-io-distribution;4.1.1 +org.apache.pulsar:pulsar-io-docs;4.1.1 +org.apache.pulsar:pulsar-io-dynamodb;4.1.1 +org.apache.pulsar:pulsar-io-elastic-search;4.1.1 +org.apache.pulsar:pulsar-io-file;4.1.1 +org.apache.pulsar:pulsar-io-flume;4.1.1 +org.apache.pulsar:pulsar-io-hbase;4.1.1 +org.apache.pulsar:pulsar-io-hdfs3;4.1.1 +org.apache.pulsar:pulsar-io-http;4.1.1 +org.apache.pulsar:pulsar-io-influxdb;4.1.1 +org.apache.pulsar:pulsar-io-jdbc;4.1.1 +org.apache.pulsar:pulsar-io-jdbc-clickhouse;4.1.1 +org.apache.pulsar:pulsar-io-jdbc-core;4.1.1 +org.apache.pulsar:pulsar-io-jdbc-mariadb;4.1.1 +org.apache.pulsar:pulsar-io-jdbc-openmldb;4.1.1 +org.apache.pulsar:pulsar-io-jdbc-postgres;4.1.1 +org.apache.pulsar:pulsar-io-jdbc-sqlite;4.1.1 +org.apache.pulsar:pulsar-io-kafka;4.1.1 +org.apache.pulsar:pulsar-io-kafka-connect-adaptor;4.1.1 +org.apache.pulsar:pulsar-io-kafka-connect-adaptor-nar;4.1.1 +org.apache.pulsar:pulsar-io-kinesis;4.1.1 +org.apache.pulsar:pulsar-io-mongo;4.1.1 +org.apache.pulsar:pulsar-io-netty;4.1.1 +org.apache.pulsar:pulsar-io-nsq;4.1.1 +org.apache.pulsar:pulsar-io-rabbitmq;4.1.1 +org.apache.pulsar:pulsar-io-redis;4.1.1 +org.apache.pulsar:pulsar-io-solr;4.1.1 +org.apache.pulsar:pulsar-io-twitter;4.1.1 +org.apache.pulsar:pulsar-metadata;4.1.1 +org.apache.pulsar:pulsar-offloader-distribution;4.1.1 +org.apache.pulsar:pulsar-package-bookkeeper-storage;4.1.1 +org.apache.pulsar:pulsar-package-core;4.1.1 +org.apache.pulsar:pulsar-package-filesystem-storage;4.1.1 +org.apache.pulsar:pulsar-package-management;4.1.1 +org.apache.pulsar:pulsar-proxy;4.1.1 +org.apache.pulsar:pulsar-server-distribution;4.1.1 +org.apache.pulsar:pulsar-shell-distribution;4.1.1 +org.apache.pulsar:pulsar-testclient;4.1.1 +org.apache.pulsar:pulsar-transaction-common;4.1.1 +org.apache.pulsar:pulsar-transaction-coordinator;4.1.1 +org.apache.pulsar:pulsar-transaction-parent;4.1.1 +org.apache.pulsar:pulsar-websocket;4.1.1 +org.apache.pulsar:structured-event-log;4.1.1 +org.apache.pulsar:testmocks;4.1.1 +org.apache.pulsar:tiered-storage-file-system;4.1.1 +org.apache.pulsar:tiered-storage-jcloud;4.1.1 +org.apache.pulsar:tiered-storage-parent;4.1.1 +org.apache.tomcat.embed:tomcat-embed-core;11.0.14 +org.apache.tomcat.embed:tomcat-embed-el;11.0.14 +org.apache.tomcat.embed:tomcat-embed-jasper;11.0.14 +org.apache.tomcat.embed:tomcat-embed-websocket;11.0.14 +org.apache.tomcat:tomcat-annotations-api;11.0.14 +org.apache.tomcat:tomcat-jdbc;11.0.14 +org.apache.tomcat:tomcat-jsp-api;11.0.14 +org.aspectj:aspectjrt;1.9.25 +org.aspectj:aspectjtools;1.9.25 +org.aspectj:aspectjweaver;1.9.25 +org.assertj:assertj-bom;3.27.6 +org.assertj:assertj-core;3.27.6 +org.assertj:assertj-guava;3.27.6 +org.awaitility:awaitility;4.3.0 +org.awaitility:awaitility-groovy;4.3.0 +org.awaitility:awaitility-kotlin;4.3.0 +org.awaitility:awaitility-scala;4.3.0 +org.cache2k:cache2k-api;2.6.1.Final +org.cache2k:cache2k-config;2.6.1.Final +org.cache2k:cache2k-core;2.6.1.Final +org.cache2k:cache2k-jcache;2.6.1.Final +org.cache2k:cache2k-micrometer;2.6.1.Final +org.cache2k:cache2k-spring;2.6.1.Final +org.codehaus.janino:commons-compiler;3.1.12 +org.codehaus.janino:commons-compiler-jdk;3.1.12 +org.codehaus.janino:janino;3.1.12 +org.codehaus.mojo:build-helper-maven-plugin;3.6.1 +org.codehaus.mojo:versions-maven-plugin;2.19.1 +org.codehaus.mojo:xml-maven-plugin;1.2.0 +org.crac:crac;1.5.0 +org.cyclonedx:cyclonedx-maven-plugin;2.9.1 +org.eclipse.angus:angus-core;2.0.5 +org.eclipse.angus:angus-mail;2.0.5 +org.eclipse.angus:dsn;2.0.5 +org.eclipse.angus:gimap;2.0.5 +org.eclipse.angus:imap;2.0.5 +org.eclipse.angus:jakarta.mail;2.0.5 +org.eclipse.angus:logging-mailhandler;2.0.5 +org.eclipse.angus:pop3;2.0.5 +org.eclipse.angus:smtp;2.0.5 +org.eclipse.jetty.compression:jetty-compression-brotli;12.1.4 +org.eclipse.jetty.compression:jetty-compression-common;12.1.4 +org.eclipse.jetty.compression:jetty-compression-gzip;12.1.4 +org.eclipse.jetty.compression:jetty-compression-server;12.1.4 +org.eclipse.jetty.compression:jetty-compression-zstandard;12.1.4 +org.eclipse.jetty.demos:jetty-core-demo-handler;12.1.4 +org.eclipse.jetty.ee11.osgi:jetty-ee11-osgi-alpn;12.1.4 +org.eclipse.jetty.ee11.osgi:jetty-ee11-osgi-boot;12.1.4 +org.eclipse.jetty.ee11.osgi:jetty-ee11-osgi-boot-jsp;12.1.4 +org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jakarta-client;12.1.4 +org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jakarta-client-webapp;12.1.4 +org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jakarta-common;12.1.4 +org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jakarta-server;12.1.4 +org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jetty-client-webapp;12.1.4 +org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-jetty-server;12.1.4 +org.eclipse.jetty.ee11.websocket:jetty-ee11-websocket-servlet;12.1.4 +org.eclipse.jetty.ee11:jetty-ee11-annotations;12.1.4 +org.eclipse.jetty.ee11:jetty-ee11-apache-jsp;12.1.4 +org.eclipse.jetty.ee11:jetty-ee11-bom;12.1.4 +org.eclipse.jetty.ee11:jetty-ee11-cdi;12.1.4 +org.eclipse.jetty.ee11:jetty-ee11-fcgi-proxy;12.1.4 +org.eclipse.jetty.ee11:jetty-ee11-glassfish-jstl;12.1.4 +org.eclipse.jetty.ee11:jetty-ee11-jaspi;12.1.4 +org.eclipse.jetty.ee11:jetty-ee11-jndi;12.1.4 +org.eclipse.jetty.ee11:jetty-ee11-jspc-maven-plugin;12.1.4 +org.eclipse.jetty.ee11:jetty-ee11-maven-plugin;12.1.4 +org.eclipse.jetty.ee11:jetty-ee11-plus;12.1.4 +org.eclipse.jetty.ee11:jetty-ee11-proxy;12.1.4 +org.eclipse.jetty.ee11:jetty-ee11-quickstart;12.1.4 +org.eclipse.jetty.ee11:jetty-ee11-servlet;12.1.4 +org.eclipse.jetty.ee11:jetty-ee11-servlets;12.1.4 +org.eclipse.jetty.ee11:jetty-ee11-webapp;12.1.4 +org.eclipse.jetty.ee:jetty-ee-webapp;12.1.4 +org.eclipse.jetty.fcgi:jetty-fcgi-client;12.1.4 +org.eclipse.jetty.fcgi:jetty-fcgi-proxy;12.1.4 +org.eclipse.jetty.fcgi:jetty-fcgi-server;12.1.4 +org.eclipse.jetty.http2:jetty-http2-client;12.1.4 +org.eclipse.jetty.http2:jetty-http2-client-transport;12.1.4 +org.eclipse.jetty.http2:jetty-http2-common;12.1.4 +org.eclipse.jetty.http2:jetty-http2-hpack;12.1.4 +org.eclipse.jetty.http2:jetty-http2-server;12.1.4 +org.eclipse.jetty.http3:jetty-http3-client;12.1.4 +org.eclipse.jetty.http3:jetty-http3-client-transport;12.1.4 +org.eclipse.jetty.http3:jetty-http3-common;12.1.4 +org.eclipse.jetty.http3:jetty-http3-qpack;12.1.4 +org.eclipse.jetty.http3:jetty-http3-server;12.1.4 +org.eclipse.jetty.quic:jetty-quic-common;12.1.4 +org.eclipse.jetty.quic:jetty-quic-quiche-client;12.1.4 +org.eclipse.jetty.quic:jetty-quic-quiche-common;12.1.4 +org.eclipse.jetty.quic:jetty-quic-quiche-foreign;12.1.4 +org.eclipse.jetty.quic:jetty-quic-quiche-jna;12.1.4 +org.eclipse.jetty.quic:jetty-quic-server;12.1.4 +org.eclipse.jetty.websocket:jetty-websocket-core-client;12.1.4 +org.eclipse.jetty.websocket:jetty-websocket-core-common;12.1.4 +org.eclipse.jetty.websocket:jetty-websocket-core-server;12.1.4 +org.eclipse.jetty.websocket:jetty-websocket-jetty-api;12.1.4 +org.eclipse.jetty.websocket:jetty-websocket-jetty-client;12.1.4 +org.eclipse.jetty.websocket:jetty-websocket-jetty-common;12.1.4 +org.eclipse.jetty.websocket:jetty-websocket-jetty-server;12.1.4 +org.eclipse.jetty:jetty-alpn-client;12.1.4 +org.eclipse.jetty:jetty-alpn-conscrypt-client;12.1.4 +org.eclipse.jetty:jetty-alpn-conscrypt-server;12.1.4 +org.eclipse.jetty:jetty-alpn-java-client;12.1.4 +org.eclipse.jetty:jetty-alpn-java-server;12.1.4 +org.eclipse.jetty:jetty-alpn-server;12.1.4 +org.eclipse.jetty:jetty-bom;12.1.4 +org.eclipse.jetty:jetty-client;12.1.4 +org.eclipse.jetty:jetty-coreapp;12.1.4 +org.eclipse.jetty:jetty-deploy;12.1.4 +org.eclipse.jetty:jetty-ethereum;12.1.4 +org.eclipse.jetty:jetty-http;12.1.4 +org.eclipse.jetty:jetty-http-spi;12.1.4 +org.eclipse.jetty:jetty-http-tools;12.1.4 +org.eclipse.jetty:jetty-io;12.1.4 +org.eclipse.jetty:jetty-jmx;12.1.4 +org.eclipse.jetty:jetty-jndi;12.1.4 +org.eclipse.jetty:jetty-keystore;12.1.4 +org.eclipse.jetty:jetty-openid;12.1.4 +org.eclipse.jetty:jetty-osgi;12.1.4 +org.eclipse.jetty:jetty-plus;12.1.4 +org.eclipse.jetty:jetty-proxy;12.1.4 +org.eclipse.jetty:jetty-reactive-httpclient;4.1.4 +org.eclipse.jetty:jetty-rewrite;12.1.4 +org.eclipse.jetty:jetty-security;12.1.4 +org.eclipse.jetty:jetty-server;12.1.4 +org.eclipse.jetty:jetty-session;12.1.4 +org.eclipse.jetty:jetty-slf4j-impl;12.1.4 +org.eclipse.jetty:jetty-start;12.1.4 +org.eclipse.jetty:jetty-staticapp;12.1.4 +org.eclipse.jetty:jetty-unixdomain-server;12.1.4 +org.eclipse.jetty:jetty-util;12.1.4 +org.eclipse.jetty:jetty-util-ajax;12.1.4 +org.eclipse.jetty:jetty-xml;12.1.4 +org.eclipse.jgit:org.eclipse.jgit;7.4.0.202509020913-r +org.eclipse.jgit:org.eclipse.jgit.http.apache;7.4.0.202509020913-r +org.eclipse.jgit:org.eclipse.jgit.junit.http;7.4.0.202509020913-r +org.eclipse.jgit:org.eclipse.jgit.ssh.apache;7.4.0.202509020913-r +org.eclipse:yasson;3.0.4 +org.ehcache:ehcache;3.11.1 +org.ehcache:ehcache-clustered;3.11.1 +org.ehcache:ehcache-transactions;3.11.1 +org.firebirdsql.jdbc:jaybird;6.0.3 +org.flywaydb:flyway-commandline;11.14.1 +org.flywaydb:flyway-core;11.14.1 +org.flywaydb:flyway-database-cassandra;11.14.1 +org.flywaydb:flyway-database-db2;11.14.1 +org.flywaydb:flyway-database-derby;11.14.1 +org.flywaydb:flyway-database-hsqldb;11.14.1 +org.flywaydb:flyway-database-informix;11.14.1 +org.flywaydb:flyway-database-mongodb;11.14.1 +org.flywaydb:flyway-database-oracle;11.14.1 +org.flywaydb:flyway-database-postgresql;11.14.1 +org.flywaydb:flyway-database-redshift;11.14.1 +org.flywaydb:flyway-database-saphana;11.14.1 +org.flywaydb:flyway-database-snowflake;11.14.1 +org.flywaydb:flyway-database-sybasease;11.14.1 +org.flywaydb:flyway-firebird;11.14.1 +org.flywaydb:flyway-gcp-bigquery;11.14.1 +org.flywaydb:flyway-gcp-spanner;11.14.1 +org.flywaydb:flyway-maven-plugin;11.14.1 +org.flywaydb:flyway-mysql;11.14.1 +org.flywaydb:flyway-singlestore;11.14.1 +org.flywaydb:flyway-sqlserver;11.14.1 +org.freemarker:freemarker;2.3.34 +org.glassfish.jaxb:codemodel;4.0.6 +org.glassfish.jaxb:jaxb-core;4.0.6 +org.glassfish.jaxb:jaxb-jxc;4.0.6 +org.glassfish.jaxb:jaxb-runtime;4.0.6 +org.glassfish.jaxb:jaxb-xjc;4.0.6 +org.glassfish.jaxb:txw2;4.0.6 +org.glassfish.jaxb:xsom;4.0.6 +org.glassfish.jersey.connectors:jersey-apache5-connector;4.0.0 +org.glassfish.jersey.connectors:jersey-grizzly-connector;4.0.0 +org.glassfish.jersey.connectors:jersey-helidon-connector;4.0.0 +org.glassfish.jersey.connectors:jersey-jdk-connector;4.0.0 +org.glassfish.jersey.connectors:jersey-jetty-connector;4.0.0 +org.glassfish.jersey.connectors:jersey-jetty-http2-connector;4.0.0 +org.glassfish.jersey.connectors:jersey-jnh-connector;4.0.0 +org.glassfish.jersey.connectors:jersey-netty-connector;4.0.0 +org.glassfish.jersey.containers.glassfish:jersey-gf-ejb;4.0.0 +org.glassfish.jersey.containers:jersey-container-grizzly2-http;4.0.0 +org.glassfish.jersey.containers:jersey-container-grizzly2-servlet;4.0.0 +org.glassfish.jersey.containers:jersey-container-helidon-http;4.0.0 +org.glassfish.jersey.containers:jersey-container-jdk-http;4.0.0 +org.glassfish.jersey.containers:jersey-container-jetty-http;4.0.0 +org.glassfish.jersey.containers:jersey-container-jetty-http2;4.0.0 +org.glassfish.jersey.containers:jersey-container-jetty-servlet;4.0.0 +org.glassfish.jersey.containers:jersey-container-netty-http;4.0.0 +org.glassfish.jersey.containers:jersey-container-servlet;4.0.0 +org.glassfish.jersey.core:jersey-client;4.0.0 +org.glassfish.jersey.core:jersey-common;4.0.0 +org.glassfish.jersey.core:jersey-server;4.0.0 +org.glassfish.jersey.ext.cdi:jersey-cdi-rs-inject;4.0.0 +org.glassfish.jersey.ext.cdi:jersey-cdi1x;4.0.0 +org.glassfish.jersey.ext.cdi:jersey-cdi1x-ban-custom-hk2-binding;4.0.0 +org.glassfish.jersey.ext.cdi:jersey-cdi1x-servlet;4.0.0 +org.glassfish.jersey.ext.cdi:jersey-cdi1x-transaction;4.0.0 +org.glassfish.jersey.ext.cdi:jersey-cdi1x-validation;4.0.0 +org.glassfish.jersey.ext.cdi:jersey-weld2-se;4.0.0 +org.glassfish.jersey.ext.microprofile:jersey-mp-config;4.0.0 +org.glassfish.jersey.ext.microprofile:jersey-mp-rest-client;4.0.0 +org.glassfish.jersey.ext.rx:jersey-rx-client-guava;4.0.0 +org.glassfish.jersey.ext.rx:jersey-rx-client-rxjava;4.0.0 +org.glassfish.jersey.ext.rx:jersey-rx-client-rxjava2;4.0.0 +org.glassfish.jersey.ext:jersey-bean-validation;4.0.0 +org.glassfish.jersey.ext:jersey-constants;4.0.0 +org.glassfish.jersey.ext:jersey-declarative-linking;4.0.0 +org.glassfish.jersey.ext:jersey-entity-filtering;4.0.0 +org.glassfish.jersey.ext:jersey-metainf-services;4.0.0 +org.glassfish.jersey.ext:jersey-micrometer;4.0.0 +org.glassfish.jersey.ext:jersey-mvc;4.0.0 +org.glassfish.jersey.ext:jersey-mvc-bean-validation;4.0.0 +org.glassfish.jersey.ext:jersey-mvc-freemarker;4.0.0 +org.glassfish.jersey.ext:jersey-mvc-jsp;4.0.0 +org.glassfish.jersey.ext:jersey-mvc-mustache;4.0.0 +org.glassfish.jersey.ext:jersey-proxy-client;4.0.0 +org.glassfish.jersey.ext:jersey-spring6;4.0.0 +org.glassfish.jersey.ext:jersey-wadl-doclet;4.0.0 +org.glassfish.jersey.inject:jersey-cdi2-se;4.0.0 +org.glassfish.jersey.inject:jersey-hk2;4.0.0 +org.glassfish.jersey.media:jersey-media-jaxb;4.0.0 +org.glassfish.jersey.media:jersey-media-json-binding;4.0.0 +org.glassfish.jersey.media:jersey-media-json-gson;4.0.0 +org.glassfish.jersey.media:jersey-media-json-jackson;4.0.0 +org.glassfish.jersey.media:jersey-media-json-jettison;4.0.0 +org.glassfish.jersey.media:jersey-media-json-processing;4.0.0 +org.glassfish.jersey.media:jersey-media-kryo;4.0.0 +org.glassfish.jersey.media:jersey-media-moxy;4.0.0 +org.glassfish.jersey.media:jersey-media-multipart;4.0.0 +org.glassfish.jersey.media:jersey-media-sse;4.0.0 +org.glassfish.jersey.security:oauth1-client;4.0.0 +org.glassfish.jersey.security:oauth1-server;4.0.0 +org.glassfish.jersey.security:oauth1-signature;4.0.0 +org.glassfish.jersey.security:oauth2-client;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-bundle;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-external;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-helidon;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-inmemory;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jdk-http;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty-http2;4.0.0 +org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-netty;4.0.0 +org.glassfish.jersey.test-framework:jersey-test-framework-core;4.0.0 +org.glassfish.jersey.test-framework:jersey-test-framework-util;4.0.0 +org.glassfish.jersey:jersey-bom;4.0.0 +org.glassfish.web:jakarta.servlet.jsp.jstl;3.0.1 +org.graalvm.buildtools:native-maven-plugin;0.11.3 +org.hamcrest:hamcrest;3.0 +org.hamcrest:hamcrest-core;3.0 +org.hamcrest:hamcrest-library;3.0 +org.hibernate.orm:hibernate-agroal;7.1.8.Final +org.hibernate.orm:hibernate-ant;7.1.8.Final +org.hibernate.orm:hibernate-c3p0;7.1.8.Final +org.hibernate.orm:hibernate-community-dialects;7.1.8.Final +org.hibernate.orm:hibernate-core;7.1.8.Final +org.hibernate.orm:hibernate-envers;7.1.8.Final +org.hibernate.orm:hibernate-graalvm;7.1.8.Final +org.hibernate.orm:hibernate-hikaricp;7.1.8.Final +org.hibernate.orm:hibernate-jcache;7.1.8.Final +org.hibernate.orm:hibernate-micrometer;7.1.8.Final +org.hibernate.orm:hibernate-processor;7.1.8.Final +org.hibernate.orm:hibernate-scan-jandex;7.1.8.Final +org.hibernate.orm:hibernate-spatial;7.1.8.Final +org.hibernate.orm:hibernate-testing;7.1.8.Final +org.hibernate.orm:hibernate-vector;7.1.8.Final +org.hibernate.validator:hibernate-validator;9.0.1.Final +org.hibernate.validator:hibernate-validator-annotation-processor;9.0.1.Final +org.hsqldb:hsqldb;2.7.3 +org.htmlunit:htmlunit;4.17.0 +org.infinispan.protostream:protostream;5.0.13.Final +org.infinispan.protostream:protostream-processor;5.0.13.Final +org.infinispan.protostream:protostream-types;5.0.13.Final +org.infinispan:infinispan-anchored-keys;15.2.6.Final +org.infinispan:infinispan-api;15.2.6.Final +org.infinispan:infinispan-bom;15.2.6.Final +org.infinispan:infinispan-cachestore-jdbc;15.2.6.Final +org.infinispan:infinispan-cachestore-jdbc-common;15.2.6.Final +org.infinispan:infinispan-cachestore-remote;15.2.6.Final +org.infinispan:infinispan-cachestore-rocksdb;15.2.6.Final +org.infinispan:infinispan-cachestore-sql;15.2.6.Final +org.infinispan:infinispan-cdi-common;15.2.6.Final +org.infinispan:infinispan-cdi-embedded;15.2.6.Final +org.infinispan:infinispan-cdi-remote;15.2.6.Final +org.infinispan:infinispan-checkstyle;15.2.6.Final +org.infinispan:infinispan-cli-client;15.2.6.Final +org.infinispan:infinispan-client-hotrod;15.2.6.Final +org.infinispan:infinispan-client-hotrod-legacy;15.2.6.Final +org.infinispan:infinispan-client-rest;15.2.6.Final +org.infinispan:infinispan-clustered-counter;15.2.6.Final +org.infinispan:infinispan-clustered-lock;15.2.6.Final +org.infinispan:infinispan-commons;15.2.6.Final +org.infinispan:infinispan-commons-graalvm;15.2.6.Final +org.infinispan:infinispan-commons-spi;15.2.6.Final +org.infinispan:infinispan-commons-test;15.2.6.Final +org.infinispan:infinispan-component-annotations;15.2.6.Final +org.infinispan:infinispan-component-processor;15.2.6.Final +org.infinispan:infinispan-console;15.2.1.Final +org.infinispan:infinispan-core;15.2.6.Final +org.infinispan:infinispan-core-graalvm;15.2.6.Final +org.infinispan:infinispan-counter-api;15.2.6.Final +org.infinispan:infinispan-hibernate-cache-commons;15.2.6.Final +org.infinispan:infinispan-hibernate-cache-spi;15.2.6.Final +org.infinispan:infinispan-hibernate-cache-v62;15.2.6.Final +org.infinispan:infinispan-jboss-marshalling;15.2.6.Final +org.infinispan:infinispan-jcache;15.2.6.Final +org.infinispan:infinispan-jcache-commons;15.2.6.Final +org.infinispan:infinispan-jcache-remote;15.2.6.Final +org.infinispan:infinispan-key-value-store-client;15.2.6.Final +org.infinispan:infinispan-logging-annotations;15.2.6.Final +org.infinispan:infinispan-logging-processor;15.2.6.Final +org.infinispan:infinispan-multimap;15.2.6.Final +org.infinispan:infinispan-objectfilter;15.2.6.Final +org.infinispan:infinispan-query;15.2.6.Final +org.infinispan:infinispan-query-core;15.2.6.Final +org.infinispan:infinispan-query-dsl;15.2.6.Final +org.infinispan:infinispan-remote-query-client;15.2.6.Final +org.infinispan:infinispan-remote-query-server;15.2.6.Final +org.infinispan:infinispan-scripting;15.2.6.Final +org.infinispan:infinispan-server-core;15.2.6.Final +org.infinispan:infinispan-server-hotrod;15.2.6.Final +org.infinispan:infinispan-server-memcached;15.2.6.Final +org.infinispan:infinispan-server-resp;15.2.6.Final +org.infinispan:infinispan-server-rest;15.2.6.Final +org.infinispan:infinispan-server-router;15.2.6.Final +org.infinispan:infinispan-server-runtime;15.2.6.Final +org.infinispan:infinispan-server-testdriver-core;15.2.6.Final +org.infinispan:infinispan-server-testdriver-junit4;15.2.6.Final +org.infinispan:infinispan-server-testdriver-junit5;15.2.6.Final +org.infinispan:infinispan-spring-boot3-starter-embedded;15.2.6.Final +org.infinispan:infinispan-spring-boot3-starter-remote;15.2.6.Final +org.infinispan:infinispan-spring6-common;15.2.6.Final +org.infinispan:infinispan-spring6-embedded;15.2.6.Final +org.infinispan:infinispan-spring6-remote;15.2.6.Final +org.infinispan:infinispan-tasks;15.2.6.Final +org.infinispan:infinispan-tasks-api;15.2.6.Final +org.infinispan:infinispan-tools;15.2.6.Final +org.influxdb:influxdb-java;2.25 +org.jboss.logging:jboss-logging;3.6.1.Final +org.jdom:jdom2;2.0.6.1 +org.jetbrains.kotlin:kotlin-bom;2.2.21 +org.jetbrains.kotlin:kotlin-compiler;2.2.21 +org.jetbrains.kotlin:kotlin-compiler-embeddable;2.2.21 +org.jetbrains.kotlin:kotlin-daemon-client;2.2.21 +org.jetbrains.kotlin:kotlin-main-kts;2.2.21 +org.jetbrains.kotlin:kotlin-maven-plugin;2.2.21 +org.jetbrains.kotlin:kotlin-osgi-bundle;2.2.21 +org.jetbrains.kotlin:kotlin-reflect;2.2.21 +org.jetbrains.kotlin:kotlin-script-runtime;2.2.21 +org.jetbrains.kotlin:kotlin-scripting-common;2.2.21 +org.jetbrains.kotlin:kotlin-scripting-ide-services;2.2.21 +org.jetbrains.kotlin:kotlin-scripting-jvm;2.2.21 +org.jetbrains.kotlin:kotlin-scripting-jvm-host;2.2.21 +org.jetbrains.kotlin:kotlin-stdlib;2.2.21 +org.jetbrains.kotlin:kotlin-stdlib-common;2.2.21 +org.jetbrains.kotlin:kotlin-stdlib-jdk7;2.2.21 +org.jetbrains.kotlin:kotlin-stdlib-jdk8;2.2.21 +org.jetbrains.kotlin:kotlin-stdlib-js;2.2.21 +org.jetbrains.kotlin:kotlin-test;2.2.21 +org.jetbrains.kotlin:kotlin-test-annotations-common;2.2.21 +org.jetbrains.kotlin:kotlin-test-common;2.2.21 +org.jetbrains.kotlin:kotlin-test-js;2.2.21 +org.jetbrains.kotlin:kotlin-test-junit;2.2.21 +org.jetbrains.kotlin:kotlin-test-junit5;2.2.21 +org.jetbrains.kotlin:kotlin-test-testng;2.2.21 +org.jetbrains.kotlinx:kotlinx-coroutines-android;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-bom;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-core;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-debug;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-guava;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-javafx;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-jdk8;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-jdk9;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-play-services;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-reactive;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-reactor;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-rx2;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-rx3;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-slf4j;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-swing;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-test;1.10.2 +org.jetbrains.kotlinx:kotlinx-coroutines-test-jvm;1.10.2 +org.jetbrains.kotlinx:kotlinx-serialization-bom;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-cbor;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-cbor-jvm;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-core;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-core-jvm;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-hocon;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-json;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-json-io;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-json-io-jvm;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-json-jvm;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-json-okio;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-json-okio-jvm;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-properties;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-properties-jvm;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-protobuf;1.9.0 +org.jetbrains.kotlinx:kotlinx-serialization-protobuf-jvm;1.9.0 +org.jooq:jooq;3.19.28 +org.jooq:jooq-bom;3.19.28 +org.jooq:jooq-checker;3.19.28 +org.jooq:jooq-codegen;3.19.28 +org.jooq:jooq-codegen-gradle;3.19.28 +org.jooq:jooq-codegen-maven;3.19.28 +org.jooq:jooq-jackson-extensions;3.19.28 +org.jooq:jooq-kotlin;3.19.28 +org.jooq:jooq-kotlin-coroutines;3.19.28 +org.jooq:jooq-meta;3.19.28 +org.jooq:jooq-meta-extensions;3.19.28 +org.jooq:jooq-meta-extensions-hibernate;3.19.28 +org.jooq:jooq-meta-extensions-liquibase;3.19.28 +org.jooq:jooq-meta-kotlin;3.19.28 +org.jooq:jooq-migrations;3.19.28 +org.jooq:jooq-migrations-maven;3.19.28 +org.jooq:jooq-postgres-extensions;3.19.28 +org.jooq:jooq-scala_2.13;3.19.28 +org.jooq:jooq-xtend;3.19.28 +org.jspecify:jspecify;1.0.0 +org.junit.jupiter:junit-jupiter;6.0.1 +org.junit.jupiter:junit-jupiter-api;6.0.1 +org.junit.jupiter:junit-jupiter-engine;6.0.1 +org.junit.jupiter:junit-jupiter-migrationsupport;6.0.1 +org.junit.jupiter:junit-jupiter-params;6.0.1 +org.junit.platform:junit-platform-commons;6.0.1 +org.junit.platform:junit-platform-console;6.0.1 +org.junit.platform:junit-platform-engine;6.0.1 +org.junit.platform:junit-platform-launcher;6.0.1 +org.junit.platform:junit-platform-reporting;6.0.1 +org.junit.platform:junit-platform-suite;6.0.1 +org.junit.platform:junit-platform-suite-api;6.0.1 +org.junit.platform:junit-platform-suite-engine;6.0.1 +org.junit.platform:junit-platform-testkit;6.0.1 +org.junit.vintage:junit-vintage-engine;6.0.1 +org.junit:junit-bom;6.0.1 +org.liquibase:liquibase-cdi;5.0.1 +org.liquibase:liquibase-core;5.0.1 +org.liquibase:liquibase-maven-plugin;5.0.1 +org.mariadb.jdbc:mariadb-java-client;3.5.6 +org.mariadb:r2dbc-mariadb;1.3.0 +org.messaginghub:pooled-jms;3.1.7 +org.mockito:mockito-android;5.20.0 +org.mockito:mockito-bom;5.20.0 +org.mockito:mockito-core;5.20.0 +org.mockito:mockito-errorprone;5.20.0 +org.mockito:mockito-junit-jupiter;5.20.0 +org.mockito:mockito-proxy;5.20.0 +org.mockito:mockito-subclass;5.20.0 +org.mongodb.scala:mongo-scala-bson_2.11;5.6.1 +org.mongodb.scala:mongo-scala-bson_2.12;5.6.1 +org.mongodb.scala:mongo-scala-bson_2.13;5.6.1 +org.mongodb.scala:mongo-scala-driver_2.11;5.6.1 +org.mongodb.scala:mongo-scala-driver_2.12;5.6.1 +org.mongodb.scala:mongo-scala-driver_2.13;5.6.1 +org.mongodb:bson;5.6.1 +org.mongodb:bson-kotlin;5.6.1 +org.mongodb:bson-kotlinx;5.6.1 +org.mongodb:bson-record-codec;5.6.1 +org.mongodb:mongodb-crypt;5.6.1 +org.mongodb:mongodb-driver-bom;5.6.1 +org.mongodb:mongodb-driver-core;5.6.1 +org.mongodb:mongodb-driver-kotlin-coroutine;5.6.1 +org.mongodb:mongodb-driver-kotlin-extensions;5.6.1 +org.mongodb:mongodb-driver-kotlin-sync;5.6.1 +org.mongodb:mongodb-driver-reactivestreams;5.6.1 +org.mongodb:mongodb-driver-sync;5.6.1 +org.neo4j.bolt:neo4j-bolt-connection;10.1.0 +org.neo4j.bolt:neo4j-bolt-connection-bom;10.1.0 +org.neo4j.bolt:neo4j-bolt-connection-netty;10.1.0 +org.neo4j.bolt:neo4j-bolt-connection-pooled;10.1.0 +org.neo4j.bolt:neo4j-bolt-connection-query-api;10.1.0 +org.neo4j.bolt:neo4j-bolt-connection-routed;10.1.0 +org.neo4j.driver:neo4j-java-driver;6.0.2 +org.neo4j.driver:neo4j-java-driver-all;6.0.2 +org.neo4j.driver:neo4j-java-driver-bom;6.0.2 +org.neo4j.driver:neo4j-java-driver-observation-metrics;6.0.2 +org.neo4j.driver:neo4j-java-driver-observation-micrometer;6.0.2 +org.postgresql:postgresql;42.7.8 +org.postgresql:r2dbc-postgresql;1.1.1.RELEASE +org.projectlombok:lombok;1.18.42 +org.quartz-scheduler:quartz;2.5.1 +org.quartz-scheduler:quartz-jobs;2.5.1 +org.reactivestreams:reactive-streams;1.0.4 +org.seleniumhq.selenium:htmlunit3-driver;4.36.1 +org.seleniumhq.selenium:selenium-api;4.37.0 +org.seleniumhq.selenium:selenium-bom;4.37.0 +org.seleniumhq.selenium:selenium-chrome-driver;4.37.0 +org.seleniumhq.selenium:selenium-chromium-driver;4.37.0 +org.seleniumhq.selenium:selenium-devtools-v139;4.37.0 +org.seleniumhq.selenium:selenium-devtools-v140;4.37.0 +org.seleniumhq.selenium:selenium-devtools-v141;4.37.0 +org.seleniumhq.selenium:selenium-edge-driver;4.37.0 +org.seleniumhq.selenium:selenium-firefox-driver;4.37.0 +org.seleniumhq.selenium:selenium-grid;4.37.0 +org.seleniumhq.selenium:selenium-http;4.37.0 +org.seleniumhq.selenium:selenium-ie-driver;4.37.0 +org.seleniumhq.selenium:selenium-java;4.37.0 +org.seleniumhq.selenium:selenium-json;4.37.0 +org.seleniumhq.selenium:selenium-manager;4.37.0 +org.seleniumhq.selenium:selenium-remote-driver;4.37.0 +org.seleniumhq.selenium:selenium-safari-driver;4.37.0 +org.seleniumhq.selenium:selenium-session-map-jdbc;4.37.0 +org.seleniumhq.selenium:selenium-session-map-redis;4.37.0 +org.seleniumhq.selenium:selenium-support;4.37.0 +org.skyscreamer:jsonassert;1.5.3 +org.slf4j:jcl-over-slf4j;2.0.17 +org.slf4j:jul-to-slf4j;2.0.17 +org.slf4j:log4j-over-slf4j;2.0.17 +org.slf4j:slf4j-api;2.0.17 +org.slf4j:slf4j-ext;2.0.17 +org.slf4j:slf4j-jdk-platform-logging;2.0.17 +org.slf4j:slf4j-jdk14;2.0.17 +org.slf4j:slf4j-log4j12;2.0.17 +org.slf4j:slf4j-nop;2.0.17 +org.slf4j:slf4j-reload4j;2.0.17 +org.slf4j:slf4j-simple;2.0.17 +org.springframework.amqp:spring-amqp;4.0.0 +org.springframework.amqp:spring-amqp-bom;4.0.0 +org.springframework.amqp:spring-rabbit;4.0.0 +org.springframework.amqp:spring-rabbit-junit;4.0.0 +org.springframework.amqp:spring-rabbit-stream;4.0.0 +org.springframework.amqp:spring-rabbit-test;4.0.0 +org.springframework.amqp:spring-rabbitmq-client;4.0.0 +org.springframework.batch:spring-batch-bom;6.0.0 +org.springframework.batch:spring-batch-core;6.0.0 +org.springframework.batch:spring-batch-infrastructure;6.0.0 +org.springframework.batch:spring-batch-integration;6.0.0 +org.springframework.batch:spring-batch-test;6.0.0 +org.springframework.boot:spring-boot;4.0.0 +org.springframework.boot:spring-boot-activemq;4.0.0 +org.springframework.boot:spring-boot-actuator;4.0.0 +org.springframework.boot:spring-boot-actuator-autoconfigure;4.0.0 +org.springframework.boot:spring-boot-amqp;4.0.0 +org.springframework.boot:spring-boot-artemis;4.0.0 +org.springframework.boot:spring-boot-autoconfigure;4.0.0 +org.springframework.boot:spring-boot-autoconfigure-classic;4.0.0 +org.springframework.boot:spring-boot-autoconfigure-classic-modules;4.0.0 +org.springframework.boot:spring-boot-autoconfigure-processor;4.0.0 +org.springframework.boot:spring-boot-batch;4.0.0 +org.springframework.boot:spring-boot-batch-jdbc;4.0.0 +org.springframework.boot:spring-boot-buildpack-platform;4.0.0 +org.springframework.boot:spring-boot-cache;4.0.0 +org.springframework.boot:spring-boot-cache-test;4.0.0 +org.springframework.boot:spring-boot-cassandra;4.0.0 +org.springframework.boot:spring-boot-cloudfoundry;4.0.0 +org.springframework.boot:spring-boot-configuration-metadata;4.0.0 +org.springframework.boot:spring-boot-configuration-processor;4.0.0 +org.springframework.boot:spring-boot-couchbase;4.0.0 +org.springframework.boot:spring-boot-data-cassandra;4.0.0 +org.springframework.boot:spring-boot-data-cassandra-test;4.0.0 +org.springframework.boot:spring-boot-data-commons;4.0.0 +org.springframework.boot:spring-boot-data-couchbase;4.0.0 +org.springframework.boot:spring-boot-data-couchbase-test;4.0.0 +org.springframework.boot:spring-boot-data-elasticsearch;4.0.0 +org.springframework.boot:spring-boot-data-elasticsearch-test;4.0.0 +org.springframework.boot:spring-boot-data-jdbc;4.0.0 +org.springframework.boot:spring-boot-data-jdbc-test;4.0.0 +org.springframework.boot:spring-boot-data-jpa;4.0.0 +org.springframework.boot:spring-boot-data-jpa-test;4.0.0 +org.springframework.boot:spring-boot-data-ldap;4.0.0 +org.springframework.boot:spring-boot-data-ldap-test;4.0.0 +org.springframework.boot:spring-boot-data-mongodb;4.0.0 +org.springframework.boot:spring-boot-data-mongodb-test;4.0.0 +org.springframework.boot:spring-boot-data-neo4j;4.0.0 +org.springframework.boot:spring-boot-data-neo4j-test;4.0.0 +org.springframework.boot:spring-boot-data-r2dbc;4.0.0 +org.springframework.boot:spring-boot-data-r2dbc-test;4.0.0 +org.springframework.boot:spring-boot-data-redis;4.0.0 +org.springframework.boot:spring-boot-data-redis-test;4.0.0 +org.springframework.boot:spring-boot-data-rest;4.0.0 +org.springframework.boot:spring-boot-dependencies;4.0.0 +org.springframework.boot:spring-boot-devtools;4.0.0 +org.springframework.boot:spring-boot-docker-compose;4.0.0 +org.springframework.boot:spring-boot-elasticsearch;4.0.0 +org.springframework.boot:spring-boot-flyway;4.0.0 +org.springframework.boot:spring-boot-freemarker;4.0.0 +org.springframework.boot:spring-boot-graphql;4.0.0 +org.springframework.boot:spring-boot-graphql-test;4.0.0 +org.springframework.boot:spring-boot-groovy-templates;4.0.0 +org.springframework.boot:spring-boot-gson;4.0.0 +org.springframework.boot:spring-boot-h2console;4.0.0 +org.springframework.boot:spring-boot-hateoas;4.0.0 +org.springframework.boot:spring-boot-hazelcast;4.0.0 +org.springframework.boot:spring-boot-health;4.0.0 +org.springframework.boot:spring-boot-hibernate;4.0.0 +org.springframework.boot:spring-boot-http-client;4.0.0 +org.springframework.boot:spring-boot-http-codec;4.0.0 +org.springframework.boot:spring-boot-http-converter;4.0.0 +org.springframework.boot:spring-boot-integration;4.0.0 +org.springframework.boot:spring-boot-jackson;4.0.0 +org.springframework.boot:spring-boot-jackson2;4.0.0 +org.springframework.boot:spring-boot-jarmode-tools;4.0.0 +org.springframework.boot:spring-boot-jdbc;4.0.0 +org.springframework.boot:spring-boot-jdbc-test;4.0.0 +org.springframework.boot:spring-boot-jersey;4.0.0 +org.springframework.boot:spring-boot-jetty;4.0.0 +org.springframework.boot:spring-boot-jms;4.0.0 +org.springframework.boot:spring-boot-jooq;4.0.0 +org.springframework.boot:spring-boot-jooq-test;4.0.0 +org.springframework.boot:spring-boot-jpa;4.0.0 +org.springframework.boot:spring-boot-jpa-test;4.0.0 +org.springframework.boot:spring-boot-jsonb;4.0.0 +org.springframework.boot:spring-boot-kafka;4.0.0 +org.springframework.boot:spring-boot-kotlinx-serialization-json;4.0.0 +org.springframework.boot:spring-boot-ldap;4.0.0 +org.springframework.boot:spring-boot-liquibase;4.0.0 +org.springframework.boot:spring-boot-loader;4.0.0 +org.springframework.boot:spring-boot-mail;4.0.0 +org.springframework.boot:spring-boot-maven-plugin;4.0.0 +org.springframework.boot:spring-boot-micrometer-metrics;4.0.0 +org.springframework.boot:spring-boot-micrometer-metrics-test;4.0.0 +org.springframework.boot:spring-boot-micrometer-observation;4.0.0 +org.springframework.boot:spring-boot-micrometer-tracing;4.0.0 +org.springframework.boot:spring-boot-micrometer-tracing-brave;4.0.0 +org.springframework.boot:spring-boot-micrometer-tracing-opentelemetry;4.0.0 +org.springframework.boot:spring-boot-micrometer-tracing-test;4.0.0 +org.springframework.boot:spring-boot-mongodb;4.0.0 +org.springframework.boot:spring-boot-mustache;4.0.0 +org.springframework.boot:spring-boot-neo4j;4.0.0 +org.springframework.boot:spring-boot-netty;4.0.0 +org.springframework.boot:spring-boot-opentelemetry;4.0.0 +org.springframework.boot:spring-boot-persistence;4.0.0 +org.springframework.boot:spring-boot-properties-migrator;4.0.0 +org.springframework.boot:spring-boot-pulsar;4.0.0 +org.springframework.boot:spring-boot-quartz;4.0.0 +org.springframework.boot:spring-boot-r2dbc;4.0.0 +org.springframework.boot:spring-boot-reactor;4.0.0 +org.springframework.boot:spring-boot-reactor-netty;4.0.0 +org.springframework.boot:spring-boot-restclient;4.0.0 +org.springframework.boot:spring-boot-restclient-test;4.0.0 +org.springframework.boot:spring-boot-restdocs;4.0.0 +org.springframework.boot:spring-boot-resttestclient;4.0.0 +org.springframework.boot:spring-boot-rsocket;4.0.0 +org.springframework.boot:spring-boot-rsocket-test;4.0.0 +org.springframework.boot:spring-boot-security;4.0.0 +org.springframework.boot:spring-boot-security-oauth2-authorization-server;4.0.0 +org.springframework.boot:spring-boot-security-oauth2-client;4.0.0 +org.springframework.boot:spring-boot-security-oauth2-resource-server;4.0.0 +org.springframework.boot:spring-boot-security-saml2;4.0.0 +org.springframework.boot:spring-boot-security-test;4.0.0 +org.springframework.boot:spring-boot-sendgrid;4.0.0 +org.springframework.boot:spring-boot-servlet;4.0.0 +org.springframework.boot:spring-boot-session;4.0.0 +org.springframework.boot:spring-boot-session-data-redis;4.0.0 +org.springframework.boot:spring-boot-session-jdbc;4.0.0 +org.springframework.boot:spring-boot-sql;4.0.0 +org.springframework.boot:spring-boot-starter;4.0.0 +org.springframework.boot:spring-boot-starter-activemq;4.0.0 +org.springframework.boot:spring-boot-starter-activemq-test;4.0.0 +org.springframework.boot:spring-boot-starter-actuator;4.0.0 +org.springframework.boot:spring-boot-starter-actuator-test;4.0.0 +org.springframework.boot:spring-boot-starter-amqp;4.0.0 +org.springframework.boot:spring-boot-starter-amqp-test;4.0.0 +org.springframework.boot:spring-boot-starter-artemis;4.0.0 +org.springframework.boot:spring-boot-starter-artemis-test;4.0.0 +org.springframework.boot:spring-boot-starter-aspectj;4.0.0 +org.springframework.boot:spring-boot-starter-aspectj-test;4.0.0 +org.springframework.boot:spring-boot-starter-batch;4.0.0 +org.springframework.boot:spring-boot-starter-batch-jdbc;4.0.0 +org.springframework.boot:spring-boot-starter-batch-jdbc-test;4.0.0 +org.springframework.boot:spring-boot-starter-batch-test;4.0.0 +org.springframework.boot:spring-boot-starter-cache;4.0.0 +org.springframework.boot:spring-boot-starter-cache-test;4.0.0 +org.springframework.boot:spring-boot-starter-cassandra;4.0.0 +org.springframework.boot:spring-boot-starter-cassandra-test;4.0.0 +org.springframework.boot:spring-boot-starter-classic;4.0.0 +org.springframework.boot:spring-boot-starter-cloudfoundry;4.0.0 +org.springframework.boot:spring-boot-starter-cloudfoundry-test;4.0.0 +org.springframework.boot:spring-boot-starter-couchbase;4.0.0 +org.springframework.boot:spring-boot-starter-couchbase-test;4.0.0 +org.springframework.boot:spring-boot-starter-data-cassandra;4.0.0 +org.springframework.boot:spring-boot-starter-data-cassandra-reactive;4.0.0 +org.springframework.boot:spring-boot-starter-data-cassandra-reactive-test;4.0.0 +org.springframework.boot:spring-boot-starter-data-cassandra-test;4.0.0 +org.springframework.boot:spring-boot-starter-data-couchbase;4.0.0 +org.springframework.boot:spring-boot-starter-data-couchbase-reactive;4.0.0 +org.springframework.boot:spring-boot-starter-data-couchbase-reactive-test;4.0.0 +org.springframework.boot:spring-boot-starter-data-couchbase-test;4.0.0 +org.springframework.boot:spring-boot-starter-data-elasticsearch;4.0.0 +org.springframework.boot:spring-boot-starter-data-elasticsearch-test;4.0.0 +org.springframework.boot:spring-boot-starter-data-jdbc;4.0.0 +org.springframework.boot:spring-boot-starter-data-jdbc-test;4.0.0 +org.springframework.boot:spring-boot-starter-data-jpa;4.0.0 +org.springframework.boot:spring-boot-starter-data-jpa-test;4.0.0 +org.springframework.boot:spring-boot-starter-data-ldap;4.0.0 +org.springframework.boot:spring-boot-starter-data-ldap-test;4.0.0 +org.springframework.boot:spring-boot-starter-data-mongodb;4.0.0 +org.springframework.boot:spring-boot-starter-data-mongodb-reactive;4.0.0 +org.springframework.boot:spring-boot-starter-data-mongodb-reactive-test;4.0.0 +org.springframework.boot:spring-boot-starter-data-mongodb-test;4.0.0 +org.springframework.boot:spring-boot-starter-data-neo4j;4.0.0 +org.springframework.boot:spring-boot-starter-data-neo4j-test;4.0.0 +org.springframework.boot:spring-boot-starter-data-r2dbc;4.0.0 +org.springframework.boot:spring-boot-starter-data-r2dbc-test;4.0.0 +org.springframework.boot:spring-boot-starter-data-redis;4.0.0 +org.springframework.boot:spring-boot-starter-data-redis-reactive;4.0.0 +org.springframework.boot:spring-boot-starter-data-redis-reactive-test;4.0.0 +org.springframework.boot:spring-boot-starter-data-redis-test;4.0.0 +org.springframework.boot:spring-boot-starter-data-rest;4.0.0 +org.springframework.boot:spring-boot-starter-data-rest-test;4.0.0 +org.springframework.boot:spring-boot-starter-elasticsearch;4.0.0 +org.springframework.boot:spring-boot-starter-elasticsearch-test;4.0.0 +org.springframework.boot:spring-boot-starter-flyway;4.0.0 +org.springframework.boot:spring-boot-starter-flyway-test;4.0.0 +org.springframework.boot:spring-boot-starter-freemarker;4.0.0 +org.springframework.boot:spring-boot-starter-freemarker-test;4.0.0 +org.springframework.boot:spring-boot-starter-graphql;4.0.0 +org.springframework.boot:spring-boot-starter-graphql-test;4.0.0 +org.springframework.boot:spring-boot-starter-groovy-templates;4.0.0 +org.springframework.boot:spring-boot-starter-groovy-templates-test;4.0.0 +org.springframework.boot:spring-boot-starter-gson;4.0.0 +org.springframework.boot:spring-boot-starter-gson-test;4.0.0 +org.springframework.boot:spring-boot-starter-hateoas;4.0.0 +org.springframework.boot:spring-boot-starter-hateoas-test;4.0.0 +org.springframework.boot:spring-boot-starter-hazelcast;4.0.0 +org.springframework.boot:spring-boot-starter-hazelcast-test;4.0.0 +org.springframework.boot:spring-boot-starter-integration;4.0.0 +org.springframework.boot:spring-boot-starter-integration-test;4.0.0 +org.springframework.boot:spring-boot-starter-jackson;4.0.0 +org.springframework.boot:spring-boot-starter-jackson-test;4.0.0 +org.springframework.boot:spring-boot-starter-jdbc;4.0.0 +org.springframework.boot:spring-boot-starter-jdbc-test;4.0.0 +org.springframework.boot:spring-boot-starter-jersey;4.0.0 +org.springframework.boot:spring-boot-starter-jersey-test;4.0.0 +org.springframework.boot:spring-boot-starter-jetty;4.0.0 +org.springframework.boot:spring-boot-starter-jetty-runtime;4.0.0 +org.springframework.boot:spring-boot-starter-jms;4.0.0 +org.springframework.boot:spring-boot-starter-jms-test;4.0.0 +org.springframework.boot:spring-boot-starter-jooq;4.0.0 +org.springframework.boot:spring-boot-starter-jooq-test;4.0.0 +org.springframework.boot:spring-boot-starter-json;4.0.0 +org.springframework.boot:spring-boot-starter-jsonb;4.0.0 +org.springframework.boot:spring-boot-starter-jsonb-test;4.0.0 +org.springframework.boot:spring-boot-starter-kafka;4.0.0 +org.springframework.boot:spring-boot-starter-kafka-test;4.0.0 +org.springframework.boot:spring-boot-starter-kotlin-serialization;4.0.0 +org.springframework.boot:spring-boot-starter-kotlin-serialization-test;4.0.0 +org.springframework.boot:spring-boot-starter-ldap;4.0.0 +org.springframework.boot:spring-boot-starter-ldap-test;4.0.0 +org.springframework.boot:spring-boot-starter-liquibase;4.0.0 +org.springframework.boot:spring-boot-starter-liquibase-test;4.0.0 +org.springframework.boot:spring-boot-starter-log4j2;4.0.0 +org.springframework.boot:spring-boot-starter-logback;4.0.0 +org.springframework.boot:spring-boot-starter-logging;4.0.0 +org.springframework.boot:spring-boot-starter-mail;4.0.0 +org.springframework.boot:spring-boot-starter-mail-test;4.0.0 +org.springframework.boot:spring-boot-starter-micrometer-metrics;4.0.0 +org.springframework.boot:spring-boot-starter-micrometer-metrics-test;4.0.0 +org.springframework.boot:spring-boot-starter-mongodb;4.0.0 +org.springframework.boot:spring-boot-starter-mongodb-test;4.0.0 +org.springframework.boot:spring-boot-starter-mustache;4.0.0 +org.springframework.boot:spring-boot-starter-mustache-test;4.0.0 +org.springframework.boot:spring-boot-starter-neo4j;4.0.0 +org.springframework.boot:spring-boot-starter-neo4j-test;4.0.0 +org.springframework.boot:spring-boot-starter-oauth2-authorization-server;4.0.0 +org.springframework.boot:spring-boot-starter-oauth2-client;4.0.0 +org.springframework.boot:spring-boot-starter-oauth2-resource-server;4.0.0 +org.springframework.boot:spring-boot-starter-opentelemetry;4.0.0 +org.springframework.boot:spring-boot-starter-opentelemetry-test;4.0.0 +org.springframework.boot:spring-boot-starter-parent;4.0.0 +org.springframework.boot:spring-boot-starter-pulsar;4.0.0 +org.springframework.boot:spring-boot-starter-pulsar-test;4.0.0 +org.springframework.boot:spring-boot-starter-quartz;4.0.0 +org.springframework.boot:spring-boot-starter-quartz-test;4.0.0 +org.springframework.boot:spring-boot-starter-r2dbc;4.0.0 +org.springframework.boot:spring-boot-starter-r2dbc-test;4.0.0 +org.springframework.boot:spring-boot-starter-reactor-netty;4.0.0 +org.springframework.boot:spring-boot-starter-restclient;4.0.0 +org.springframework.boot:spring-boot-starter-restclient-test;4.0.0 +org.springframework.boot:spring-boot-starter-rsocket;4.0.0 +org.springframework.boot:spring-boot-starter-rsocket-test;4.0.0 +org.springframework.boot:spring-boot-starter-security;4.0.0 +org.springframework.boot:spring-boot-starter-security-oauth2-authorization-server;4.0.0 +org.springframework.boot:spring-boot-starter-security-oauth2-authorization-server-test;4.0.0 +org.springframework.boot:spring-boot-starter-security-oauth2-client;4.0.0 +org.springframework.boot:spring-boot-starter-security-oauth2-client-test;4.0.0 +org.springframework.boot:spring-boot-starter-security-oauth2-resource-server;4.0.0 +org.springframework.boot:spring-boot-starter-security-oauth2-resource-server-test;4.0.0 +org.springframework.boot:spring-boot-starter-security-saml2;4.0.0 +org.springframework.boot:spring-boot-starter-security-saml2-test;4.0.0 +org.springframework.boot:spring-boot-starter-security-test;4.0.0 +org.springframework.boot:spring-boot-starter-sendgrid;4.0.0 +org.springframework.boot:spring-boot-starter-sendgrid-test;4.0.0 +org.springframework.boot:spring-boot-starter-session-data-redis;4.0.0 +org.springframework.boot:spring-boot-starter-session-data-redis-test;4.0.0 +org.springframework.boot:spring-boot-starter-session-jdbc;4.0.0 +org.springframework.boot:spring-boot-starter-session-jdbc-test;4.0.0 +org.springframework.boot:spring-boot-starter-test;4.0.0 +org.springframework.boot:spring-boot-starter-test-classic;4.0.0 +org.springframework.boot:spring-boot-starter-thymeleaf;4.0.0 +org.springframework.boot:spring-boot-starter-thymeleaf-test;4.0.0 +org.springframework.boot:spring-boot-starter-tomcat;4.0.0 +org.springframework.boot:spring-boot-starter-tomcat-runtime;4.0.0 +org.springframework.boot:spring-boot-starter-validation;4.0.0 +org.springframework.boot:spring-boot-starter-validation-test;4.0.0 +org.springframework.boot:spring-boot-starter-web;4.0.0 +org.springframework.boot:spring-boot-starter-web-services;4.0.0 +org.springframework.boot:spring-boot-starter-webclient;4.0.0 +org.springframework.boot:spring-boot-starter-webclient-test;4.0.0 +org.springframework.boot:spring-boot-starter-webflux;4.0.0 +org.springframework.boot:spring-boot-starter-webflux-test;4.0.0 +org.springframework.boot:spring-boot-starter-webmvc;4.0.0 +org.springframework.boot:spring-boot-starter-webmvc-test;4.0.0 +org.springframework.boot:spring-boot-starter-webservices;4.0.0 +org.springframework.boot:spring-boot-starter-webservices-test;4.0.0 +org.springframework.boot:spring-boot-starter-websocket;4.0.0 +org.springframework.boot:spring-boot-starter-websocket-test;4.0.0 +org.springframework.boot:spring-boot-starter-zipkin;4.0.0 +org.springframework.boot:spring-boot-starter-zipkin-test;4.0.0 +org.springframework.boot:spring-boot-test;4.0.0 +org.springframework.boot:spring-boot-test-autoconfigure;4.0.0 +org.springframework.boot:spring-boot-test-classic-modules;4.0.0 +org.springframework.boot:spring-boot-testcontainers;4.0.0 +org.springframework.boot:spring-boot-thymeleaf;4.0.0 +org.springframework.boot:spring-boot-tomcat;4.0.0 +org.springframework.boot:spring-boot-transaction;4.0.0 +org.springframework.boot:spring-boot-validation;4.0.0 +org.springframework.boot:spring-boot-web-server;4.0.0 +org.springframework.boot:spring-boot-webclient;4.0.0 +org.springframework.boot:spring-boot-webclient-test;4.0.0 +org.springframework.boot:spring-boot-webflux;4.0.0 +org.springframework.boot:spring-boot-webflux-test;4.0.0 +org.springframework.boot:spring-boot-webmvc;4.0.0 +org.springframework.boot:spring-boot-webmvc-test;4.0.0 +org.springframework.boot:spring-boot-webservices;4.0.0 +org.springframework.boot:spring-boot-webservices-test;4.0.0 +org.springframework.boot:spring-boot-websocket;4.0.0 +org.springframework.boot:spring-boot-webtestclient;4.0.0 +org.springframework.boot:spring-boot-zipkin;4.0.0 +org.springframework.cloud:spring-cloud-bus;5.0.0 +org.springframework.cloud:spring-cloud-bus-dependencies;5.0.0 +org.springframework.cloud:spring-cloud-circuitbreaker-dependencies;5.0.0 +org.springframework.cloud:spring-cloud-circuitbreaker-framework-retry;5.0.0 +org.springframework.cloud:spring-cloud-circuitbreaker-resilience4j;5.0.0 +org.springframework.cloud:spring-cloud-circuitbreaker-spring-retry;5.0.0 +org.springframework.cloud:spring-cloud-commons;5.0.0 +org.springframework.cloud:spring-cloud-commons-dependencies;5.0.0 +org.springframework.cloud:spring-cloud-config-client;5.0.0 +org.springframework.cloud:spring-cloud-config-dependencies;5.0.0 +org.springframework.cloud:spring-cloud-config-monitor;5.0.0 +org.springframework.cloud:spring-cloud-config-server;5.0.0 +org.springframework.cloud:spring-cloud-consul-binder;5.0.0 +org.springframework.cloud:spring-cloud-consul-config;5.0.0 +org.springframework.cloud:spring-cloud-consul-core;5.0.0 +org.springframework.cloud:spring-cloud-consul-dependencies;5.0.0 +org.springframework.cloud:spring-cloud-consul-discovery;5.0.0 +org.springframework.cloud:spring-cloud-context;5.0.0 +org.springframework.cloud:spring-cloud-contract-converters;5.0.0 +org.springframework.cloud:spring-cloud-contract-dependencies;5.0.0 +org.springframework.cloud:spring-cloud-contract-gradle-plugin;5.0.0 +org.springframework.cloud:spring-cloud-contract-maven-plugin;5.0.0 +org.springframework.cloud:spring-cloud-contract-spec;5.0.0 +org.springframework.cloud:spring-cloud-contract-spec-groovy;5.0.0 +org.springframework.cloud:spring-cloud-contract-spec-java;5.0.0 +org.springframework.cloud:spring-cloud-contract-spec-kotlin;5.0.0 +org.springframework.cloud:spring-cloud-contract-stub-runner;5.0.0 +org.springframework.cloud:spring-cloud-contract-stub-runner-boot;5.0.0 +org.springframework.cloud:spring-cloud-contract-verifier;5.0.0 +org.springframework.cloud:spring-cloud-contract-wiremock;5.0.0 +org.springframework.cloud:spring-cloud-dependencies;2025.1.0 +org.springframework.cloud:spring-cloud-function-adapter-aws;5.0.0 +org.springframework.cloud:spring-cloud-function-adapter-azure;5.0.0 +org.springframework.cloud:spring-cloud-function-adapter-azure-web;5.0.0 +org.springframework.cloud:spring-cloud-function-adapter-gcp;5.0.0 +org.springframework.cloud:spring-cloud-function-context;5.0.0 +org.springframework.cloud:spring-cloud-function-core;5.0.0 +org.springframework.cloud:spring-cloud-function-dependencies;5.0.0 +org.springframework.cloud:spring-cloud-function-deployer;5.0.0 +org.springframework.cloud:spring-cloud-function-grpc;5.0.0 +org.springframework.cloud:spring-cloud-function-grpc-cloudevent-ext;5.0.0 +org.springframework.cloud:spring-cloud-function-integration;5.0.0 +org.springframework.cloud:spring-cloud-function-kotlin;5.0.0 +org.springframework.cloud:spring-cloud-function-rsocket;5.0.0 +org.springframework.cloud:spring-cloud-function-serverless-web;5.0.0 +org.springframework.cloud:spring-cloud-function-web;5.0.0 +org.springframework.cloud:spring-cloud-gateway-dependencies;5.0.0 +org.springframework.cloud:spring-cloud-gateway-proxyexchange-webflux;5.0.0 +org.springframework.cloud:spring-cloud-gateway-proxyexchange-webmvc;5.0.0 +org.springframework.cloud:spring-cloud-gateway-server-webflux;5.0.0 +org.springframework.cloud:spring-cloud-gateway-server-webmvc;5.0.0 +org.springframework.cloud:spring-cloud-kubernetes-client-autoconfig;5.0.0 +org.springframework.cloud:spring-cloud-kubernetes-client-config;5.0.0 +org.springframework.cloud:spring-cloud-kubernetes-client-discovery;5.0.0 +org.springframework.cloud:spring-cloud-kubernetes-client-loadbalancer;5.0.0 +org.springframework.cloud:spring-cloud-kubernetes-commons;5.0.0 +org.springframework.cloud:spring-cloud-kubernetes-dependencies;5.0.0 +org.springframework.cloud:spring-cloud-kubernetes-discovery;5.0.0 +org.springframework.cloud:spring-cloud-kubernetes-fabric8-autoconfig;5.0.0 +org.springframework.cloud:spring-cloud-kubernetes-fabric8-config;5.0.0 +org.springframework.cloud:spring-cloud-kubernetes-fabric8-discovery;5.0.0 +org.springframework.cloud:spring-cloud-kubernetes-fabric8-istio;5.0.0 +org.springframework.cloud:spring-cloud-kubernetes-fabric8-leader;5.0.0 +org.springframework.cloud:spring-cloud-kubernetes-fabric8-loadbalancer;5.0.0 +org.springframework.cloud:spring-cloud-kubernetes-test-support;5.0.0 +org.springframework.cloud:spring-cloud-loadbalancer;5.0.0 +org.springframework.cloud:spring-cloud-netflix-dependencies;5.0.0 +org.springframework.cloud:spring-cloud-netflix-eureka-client;5.0.0 +org.springframework.cloud:spring-cloud-netflix-eureka-server;5.0.0 +org.springframework.cloud:spring-cloud-openfeign-core;5.0.0 +org.springframework.cloud:spring-cloud-openfeign-dependencies;5.0.0 +org.springframework.cloud:spring-cloud-starter;5.0.0 +org.springframework.cloud:spring-cloud-starter-bootstrap;5.0.0 +org.springframework.cloud:spring-cloud-starter-bus-amqp;5.0.0 +org.springframework.cloud:spring-cloud-starter-bus-kafka;5.0.0 +org.springframework.cloud:spring-cloud-starter-bus-stream;5.0.0 +org.springframework.cloud:spring-cloud-starter-circuitbreaker-framework-retry;5.0.0 +org.springframework.cloud:spring-cloud-starter-circuitbreaker-reactor-resilience4j;5.0.0 +org.springframework.cloud:spring-cloud-starter-circuitbreaker-resilience4j;5.0.0 +org.springframework.cloud:spring-cloud-starter-circuitbreaker-spring-retry;5.0.0 +org.springframework.cloud:spring-cloud-starter-config;5.0.0 +org.springframework.cloud:spring-cloud-starter-consul;5.0.0 +org.springframework.cloud:spring-cloud-starter-consul-all;5.0.0 +org.springframework.cloud:spring-cloud-starter-consul-bus;5.0.0 +org.springframework.cloud:spring-cloud-starter-consul-config;5.0.0 +org.springframework.cloud:spring-cloud-starter-consul-discovery;5.0.0 +org.springframework.cloud:spring-cloud-starter-contract-stub-runner;5.0.0 +org.springframework.cloud:spring-cloud-starter-contract-stub-runner-jetty;5.0.0 +org.springframework.cloud:spring-cloud-starter-contract-verifier;5.0.0 +org.springframework.cloud:spring-cloud-starter-function-web;5.0.0 +org.springframework.cloud:spring-cloud-starter-function-webflux;5.0.0 +org.springframework.cloud:spring-cloud-starter-gateway-server-webflux;5.0.0 +org.springframework.cloud:spring-cloud-starter-gateway-server-webmvc;5.0.0 +org.springframework.cloud:spring-cloud-starter-kubernetes-client;5.0.0 +org.springframework.cloud:spring-cloud-starter-kubernetes-client-all;5.0.0 +org.springframework.cloud:spring-cloud-starter-kubernetes-client-config;5.0.0 +org.springframework.cloud:spring-cloud-starter-kubernetes-client-loadbalancer;5.0.0 +org.springframework.cloud:spring-cloud-starter-kubernetes-discoveryclient;5.0.0 +org.springframework.cloud:spring-cloud-starter-kubernetes-fabric8;5.0.0 +org.springframework.cloud:spring-cloud-starter-kubernetes-fabric8-all;5.0.0 +org.springframework.cloud:spring-cloud-starter-kubernetes-fabric8-config;5.0.0 +org.springframework.cloud:spring-cloud-starter-kubernetes-fabric8-loadbalancer;5.0.0 +org.springframework.cloud:spring-cloud-starter-loadbalancer;5.0.0 +org.springframework.cloud:spring-cloud-starter-netflix-eureka-client;5.0.0 +org.springframework.cloud:spring-cloud-starter-netflix-eureka-server;5.0.0 +org.springframework.cloud:spring-cloud-starter-openfeign;5.0.0 +org.springframework.cloud:spring-cloud-starter-stream-kafka;5.0.0 +org.springframework.cloud:spring-cloud-starter-stream-rabbit;5.0.0 +org.springframework.cloud:spring-cloud-starter-task;5.0.0 +org.springframework.cloud:spring-cloud-starter-vault-config;5.0.0 +org.springframework.cloud:spring-cloud-starter-zookeeper;5.0.0 +org.springframework.cloud:spring-cloud-starter-zookeeper-all;5.0.0 +org.springframework.cloud:spring-cloud-starter-zookeeper-config;5.0.0 +org.springframework.cloud:spring-cloud-starter-zookeeper-discovery;5.0.0 +org.springframework.cloud:spring-cloud-stream;5.0.0 +org.springframework.cloud:spring-cloud-stream-binder-kafka;5.0.0 +org.springframework.cloud:spring-cloud-stream-binder-kafka-core;5.0.0 +org.springframework.cloud:spring-cloud-stream-binder-kafka-reactive;5.0.0 +org.springframework.cloud:spring-cloud-stream-binder-kafka-streams;5.0.0 +org.springframework.cloud:spring-cloud-stream-binder-pulsar;5.0.0 +org.springframework.cloud:spring-cloud-stream-binder-rabbit;5.0.0 +org.springframework.cloud:spring-cloud-stream-binder-rabbit-core;5.0.0 +org.springframework.cloud:spring-cloud-stream-binder-rabbit-test-support;5.0.0 +org.springframework.cloud:spring-cloud-stream-dependencies;5.0.0 +org.springframework.cloud:spring-cloud-stream-schema-registry-client;5.0.0 +org.springframework.cloud:spring-cloud-stream-schema-registry-core;5.0.0 +org.springframework.cloud:spring-cloud-stream-schema-registry-server;5.0.0 +org.springframework.cloud:spring-cloud-stream-test-binder;5.0.0 +org.springframework.cloud:spring-cloud-stream-test-support;5.0.0 +org.springframework.cloud:spring-cloud-task-batch;5.0.0 +org.springframework.cloud:spring-cloud-task-core;5.0.0 +org.springframework.cloud:spring-cloud-task-dependencies;5.0.0 +org.springframework.cloud:spring-cloud-task-stream;5.0.0 +org.springframework.cloud:spring-cloud-test-support;5.0.0 +org.springframework.cloud:spring-cloud-vault-config;5.0.0 +org.springframework.cloud:spring-cloud-vault-config-aws;5.0.0 +org.springframework.cloud:spring-cloud-vault-config-consul;5.0.0 +org.springframework.cloud:spring-cloud-vault-config-databases;5.0.0 +org.springframework.cloud:spring-cloud-vault-config-rabbitmq;5.0.0 +org.springframework.cloud:spring-cloud-vault-dependencies;5.0.0 +org.springframework.cloud:spring-cloud-zookeeper-config;5.0.0 +org.springframework.cloud:spring-cloud-zookeeper-core;5.0.0 +org.springframework.cloud:spring-cloud-zookeeper-dependencies;5.0.0 +org.springframework.cloud:spring-cloud-zookeeper-discovery;5.0.0 +org.springframework.credhub:spring-credhub-core;3.5.0 +org.springframework.data:spring-data-bom;2025.1.0 +org.springframework.data:spring-data-cassandra;5.0.0 +org.springframework.data:spring-data-commons;4.0.0 +org.springframework.data:spring-data-couchbase;6.0.0 +org.springframework.data:spring-data-elasticsearch;6.0.0 +org.springframework.data:spring-data-envers;4.0.0 +org.springframework.data:spring-data-jdbc;4.0.0 +org.springframework.data:spring-data-jpa;4.0.0 +org.springframework.data:spring-data-keyvalue;4.0.0 +org.springframework.data:spring-data-ldap;4.0.0 +org.springframework.data:spring-data-mongodb;5.0.0 +org.springframework.data:spring-data-neo4j;8.0.0 +org.springframework.data:spring-data-r2dbc;4.0.0 +org.springframework.data:spring-data-redis;4.0.0 +org.springframework.data:spring-data-relational;4.0.0 +org.springframework.data:spring-data-rest-core;5.0.0 +org.springframework.data:spring-data-rest-hal-explorer;5.0.0 +org.springframework.data:spring-data-rest-webmvc;5.0.0 +org.springframework.graphql:spring-graphql;2.0.0 +org.springframework.graphql:spring-graphql-test;2.0.0 +org.springframework.hateoas:spring-hateoas;3.0.0 +org.springframework.integration:spring-integration-amqp;7.0.0 +org.springframework.integration:spring-integration-bom;7.0.0 +org.springframework.integration:spring-integration-camel;7.0.0 +org.springframework.integration:spring-integration-cassandra;7.0.0 +org.springframework.integration:spring-integration-core;7.0.0 +org.springframework.integration:spring-integration-debezium;7.0.0 +org.springframework.integration:spring-integration-event;7.0.0 +org.springframework.integration:spring-integration-feed;7.0.0 +org.springframework.integration:spring-integration-file;7.0.0 +org.springframework.integration:spring-integration-ftp;7.0.0 +org.springframework.integration:spring-integration-graphql;7.0.0 +org.springframework.integration:spring-integration-groovy;7.0.0 +org.springframework.integration:spring-integration-hazelcast;7.0.0 +org.springframework.integration:spring-integration-http;7.0.0 +org.springframework.integration:spring-integration-ip;7.0.0 +org.springframework.integration:spring-integration-jdbc;7.0.0 +org.springframework.integration:spring-integration-jms;7.0.0 +org.springframework.integration:spring-integration-jmx;7.0.0 +org.springframework.integration:spring-integration-jpa;7.0.0 +org.springframework.integration:spring-integration-kafka;7.0.0 +org.springframework.integration:spring-integration-mail;7.0.0 +org.springframework.integration:spring-integration-mongodb;7.0.0 +org.springframework.integration:spring-integration-mqtt;7.0.0 +org.springframework.integration:spring-integration-r2dbc;7.0.0 +org.springframework.integration:spring-integration-redis;7.0.0 +org.springframework.integration:spring-integration-rsocket;7.0.0 +org.springframework.integration:spring-integration-scripting;7.0.0 +org.springframework.integration:spring-integration-sftp;7.0.0 +org.springframework.integration:spring-integration-smb;7.0.0 +org.springframework.integration:spring-integration-stomp;7.0.0 +org.springframework.integration:spring-integration-stream;7.0.0 +org.springframework.integration:spring-integration-syslog;7.0.0 +org.springframework.integration:spring-integration-test;7.0.0 +org.springframework.integration:spring-integration-test-support;7.0.0 +org.springframework.integration:spring-integration-webflux;7.0.0 +org.springframework.integration:spring-integration-websocket;7.0.0 +org.springframework.integration:spring-integration-ws;7.0.0 +org.springframework.integration:spring-integration-xml;7.0.0 +org.springframework.integration:spring-integration-xmpp;7.0.0 +org.springframework.integration:spring-integration-zeromq;7.0.0 +org.springframework.integration:spring-integration-zip;7.0.0 +org.springframework.integration:spring-integration-zookeeper;7.0.0 +org.springframework.kafka:spring-kafka;4.0.0 +org.springframework.kafka:spring-kafka-test;4.0.0 +org.springframework.ldap:spring-ldap-core;4.0.0 +org.springframework.ldap:spring-ldap-ldif-core;4.0.0 +org.springframework.ldap:spring-ldap-odm;4.0.0 +org.springframework.ldap:spring-ldap-test;4.0.0 +org.springframework.pulsar:spring-pulsar;2.0.0 +org.springframework.pulsar:spring-pulsar-bom;2.0.0 +org.springframework.pulsar:spring-pulsar-cache-provider;2.0.0 +org.springframework.pulsar:spring-pulsar-cache-provider-caffeine;2.0.0 +org.springframework.pulsar:spring-pulsar-test;2.0.0 +org.springframework.restdocs:spring-restdocs-asciidoctor;4.0.0 +org.springframework.restdocs:spring-restdocs-bom;4.0.0 +org.springframework.restdocs:spring-restdocs-core;4.0.0 +org.springframework.restdocs:spring-restdocs-mockmvc;4.0.0 +org.springframework.restdocs:spring-restdocs-webtestclient;4.0.0 +org.springframework.retry:spring-retry;2.0.12 +org.springframework.security:spring-security-access;7.0.0 +org.springframework.security:spring-security-acl;7.0.0 +org.springframework.security:spring-security-aspects;7.0.0 +org.springframework.security:spring-security-bom;7.0.0 +org.springframework.security:spring-security-cas;7.0.0 +org.springframework.security:spring-security-config;7.0.0 +org.springframework.security:spring-security-core;7.0.0 +org.springframework.security:spring-security-crypto;7.0.0 +org.springframework.security:spring-security-data;7.0.0 +org.springframework.security:spring-security-kerberos-client;7.0.0 +org.springframework.security:spring-security-kerberos-core;7.0.0 +org.springframework.security:spring-security-kerberos-test;7.0.0 +org.springframework.security:spring-security-kerberos-web;7.0.0 +org.springframework.security:spring-security-ldap;7.0.0 +org.springframework.security:spring-security-messaging;7.0.0 +org.springframework.security:spring-security-oauth2-authorization-server;7.0.0 +org.springframework.security:spring-security-oauth2-client;7.0.0 +org.springframework.security:spring-security-oauth2-core;7.0.0 +org.springframework.security:spring-security-oauth2-jose;7.0.0 +org.springframework.security:spring-security-oauth2-resource-server;7.0.0 +org.springframework.security:spring-security-rsocket;7.0.0 +org.springframework.security:spring-security-saml2-service-provider;7.0.0 +org.springframework.security:spring-security-taglibs;7.0.0 +org.springframework.security:spring-security-test;7.0.0 +org.springframework.security:spring-security-web;7.0.0 +org.springframework.security:spring-security-webauthn;7.0.0 +org.springframework.session:spring-session-bom;4.0.0 +org.springframework.session:spring-session-core;4.0.0 +org.springframework.session:spring-session-data-redis;4.0.0 +org.springframework.session:spring-session-jdbc;4.0.0 +org.springframework.vault:spring-vault-core;4.0.0 +org.springframework.ws:spring-ws-bom;5.0.0 +org.springframework.ws:spring-ws-core;5.0.0 +org.springframework.ws:spring-ws-security;5.0.0 +org.springframework.ws:spring-ws-support;5.0.0 +org.springframework.ws:spring-ws-test;5.0.0 +org.springframework.ws:spring-xml;5.0.0 +org.springframework:spring-aop;7.0.1 +org.springframework:spring-aspects;7.0.1 +org.springframework:spring-beans;7.0.1 +org.springframework:spring-context;7.0.1 +org.springframework:spring-context-indexer;7.0.1 +org.springframework:spring-context-support;7.0.1 +org.springframework:spring-core;7.0.1 +org.springframework:spring-core-test;7.0.1 +org.springframework:spring-expression;7.0.1 +org.springframework:spring-framework-bom;7.0.1 +org.springframework:spring-instrument;7.0.1 +org.springframework:spring-jdbc;7.0.1 +org.springframework:spring-jms;7.0.1 +org.springframework:spring-messaging;7.0.1 +org.springframework:spring-orm;7.0.1 +org.springframework:spring-oxm;7.0.1 +org.springframework:spring-r2dbc;7.0.1 +org.springframework:spring-test;7.0.1 +org.springframework:spring-tx;7.0.1 +org.springframework:spring-web;7.0.1 +org.springframework:spring-webflux;7.0.1 +org.springframework:spring-webmvc;7.0.1 +org.springframework:spring-websocket;7.0.1 +org.testcontainers:testcontainers;2.0.2 +org.testcontainers:testcontainers-activemq;2.0.2 +org.testcontainers:testcontainers-azure;2.0.2 +org.testcontainers:testcontainers-bom;2.0.2 +org.testcontainers:testcontainers-cassandra;2.0.2 +org.testcontainers:testcontainers-chromadb;2.0.2 +org.testcontainers:testcontainers-clickhouse;2.0.2 +org.testcontainers:testcontainers-cockroachdb;2.0.2 +org.testcontainers:testcontainers-consul;2.0.2 +org.testcontainers:testcontainers-couchbase;2.0.2 +org.testcontainers:testcontainers-cratedb;2.0.2 +org.testcontainers:testcontainers-database-commons;2.0.2 +org.testcontainers:testcontainers-databend;2.0.2 +org.testcontainers:testcontainers-db2;2.0.2 +org.testcontainers:testcontainers-elasticsearch;2.0.2 +org.testcontainers:testcontainers-gcloud;2.0.2 +org.testcontainers:testcontainers-grafana;2.0.2 +org.testcontainers:testcontainers-hivemq;2.0.2 +org.testcontainers:testcontainers-influxdb;2.0.2 +org.testcontainers:testcontainers-jdbc;2.0.2 +org.testcontainers:testcontainers-junit-jupiter;2.0.2 +org.testcontainers:testcontainers-k3s;2.0.2 +org.testcontainers:testcontainers-k6;2.0.2 +org.testcontainers:testcontainers-kafka;2.0.2 +org.testcontainers:testcontainers-ldap;2.0.2 +org.testcontainers:testcontainers-localstack;2.0.2 +org.testcontainers:testcontainers-mariadb;2.0.2 +org.testcontainers:testcontainers-milvus;2.0.2 +org.testcontainers:testcontainers-minio;2.0.2 +org.testcontainers:testcontainers-mockserver;2.0.2 +org.testcontainers:testcontainers-mongodb;2.0.2 +org.testcontainers:testcontainers-mssqlserver;2.0.2 +org.testcontainers:testcontainers-mysql;2.0.2 +org.testcontainers:testcontainers-neo4j;2.0.2 +org.testcontainers:testcontainers-nginx;2.0.2 +org.testcontainers:testcontainers-oceanbase;2.0.2 +org.testcontainers:testcontainers-ollama;2.0.2 +org.testcontainers:testcontainers-openfga;2.0.2 +org.testcontainers:testcontainers-oracle-free;2.0.2 +org.testcontainers:testcontainers-oracle-xe;2.0.2 +org.testcontainers:testcontainers-orientdb;2.0.2 +org.testcontainers:testcontainers-pinecone;2.0.2 +org.testcontainers:testcontainers-postgresql;2.0.2 +org.testcontainers:testcontainers-presto;2.0.2 +org.testcontainers:testcontainers-pulsar;2.0.2 +org.testcontainers:testcontainers-qdrant;2.0.2 +org.testcontainers:testcontainers-questdb;2.0.2 +org.testcontainers:testcontainers-r2dbc;2.0.2 +org.testcontainers:testcontainers-rabbitmq;2.0.2 +org.testcontainers:testcontainers-redpanda;2.0.2 +org.testcontainers:testcontainers-scylladb;2.0.2 +org.testcontainers:testcontainers-selenium;2.0.2 +org.testcontainers:testcontainers-solace;2.0.2 +org.testcontainers:testcontainers-solr;2.0.2 +org.testcontainers:testcontainers-spock;2.0.2 +org.testcontainers:testcontainers-tidb;2.0.2 +org.testcontainers:testcontainers-timeplus;2.0.2 +org.testcontainers:testcontainers-toxiproxy;2.0.2 +org.testcontainers:testcontainers-trino;2.0.2 +org.testcontainers:testcontainers-typesense;2.0.2 +org.testcontainers:testcontainers-vault;2.0.2 +org.testcontainers:testcontainers-weaviate;2.0.2 +org.testcontainers:testcontainers-yugabytedb;2.0.2 +org.thymeleaf.extras:thymeleaf-extras-springsecurity6;3.1.3.RELEASE +org.thymeleaf:thymeleaf;3.1.3.RELEASE +org.thymeleaf:thymeleaf-spring6;3.1.3.RELEASE +org.tmatesoft.svnkit:svnkit;1.10.11 +org.vibur:vibur-dbcp;26.0 +org.vibur:vibur-object-pool;26.0 +org.webjars:webjars-locator-core;0.59 +org.webjars:webjars-locator-lite;1.1.2 +org.wiremock:wiremock-standalone;3.13.2 +org.xerial:sqlite-jdbc;3.50.3.0 +org.xmlunit:xmlunit-assertj;2.10.4 +org.xmlunit:xmlunit-assertj3;2.10.4 +org.xmlunit:xmlunit-core;2.10.4 +org.xmlunit:xmlunit-jakarta-jaxb-impl;2.10.4 +org.xmlunit:xmlunit-legacy;2.10.4 +org.xmlunit:xmlunit-matchers;2.10.4 +org.xmlunit:xmlunit-placeholders;2.10.4 +org.yaml:snakeyaml;2.5 +redis.clients:jedis;7.0.0 +tools.jackson.core:jackson-core;3.0.2 +tools.jackson.core:jackson-databind;3.0.2 +tools.jackson.dataformat:jackson-dataformat-avro;3.0.2 +tools.jackson.dataformat:jackson-dataformat-cbor;3.0.2 +tools.jackson.dataformat:jackson-dataformat-csv;3.0.2 +tools.jackson.dataformat:jackson-dataformat-ion;3.0.2 +tools.jackson.dataformat:jackson-dataformat-properties;3.0.2 +tools.jackson.dataformat:jackson-dataformat-protobuf;3.0.2 +tools.jackson.dataformat:jackson-dataformat-smile;3.0.2 +tools.jackson.dataformat:jackson-dataformat-toml;3.0.2 +tools.jackson.dataformat:jackson-dataformat-xml;3.0.2 +tools.jackson.dataformat:jackson-dataformat-yaml;3.0.2 +tools.jackson.datatype:jackson-datatype-eclipse-collections;3.0.2 +tools.jackson.datatype:jackson-datatype-guava;3.0.2 +tools.jackson.datatype:jackson-datatype-hibernate4;3.0.2 +tools.jackson.datatype:jackson-datatype-hibernate5;3.0.2 +tools.jackson.datatype:jackson-datatype-hibernate5-jakarta;3.0.2 +tools.jackson.datatype:jackson-datatype-hibernate6;3.0.2 +tools.jackson.datatype:jackson-datatype-hibernate7;3.0.2 +tools.jackson.datatype:jackson-datatype-hppc;3.0.2 +tools.jackson.datatype:jackson-datatype-jakarta-jsonp;3.0.2 +tools.jackson.datatype:jackson-datatype-javax-money;3.0.2 +tools.jackson.datatype:jackson-datatype-jaxrs;3.0.2 +tools.jackson.datatype:jackson-datatype-joda;3.0.2 +tools.jackson.datatype:jackson-datatype-joda-money;3.0.2 +tools.jackson.datatype:jackson-datatype-json-org;3.0.2 +tools.jackson.datatype:jackson-datatype-jsr353;3.0.2 +tools.jackson.datatype:jackson-datatype-moneta;3.0.2 +tools.jackson.datatype:jackson-datatype-pcollections;3.0.2 +tools.jackson.jakarta.rs:jackson-jakarta-rs-base;3.0.2 +tools.jackson.jakarta.rs:jackson-jakarta-rs-cbor-provider;3.0.2 +tools.jackson.jakarta.rs:jackson-jakarta-rs-json-provider;3.0.2 +tools.jackson.jakarta.rs:jackson-jakarta-rs-smile-provider;3.0.2 +tools.jackson.jakarta.rs:jackson-jakarta-rs-xml-provider;3.0.2 +tools.jackson.jakarta.rs:jackson-jakarta-rs-yaml-provider;3.0.2 +tools.jackson.jaxrs:jackson-jaxrs-base;3.0.2 +tools.jackson.jaxrs:jackson-jaxrs-cbor-provider;3.0.2 +tools.jackson.jaxrs:jackson-jaxrs-json-provider;3.0.2 +tools.jackson.jaxrs:jackson-jaxrs-smile-provider;3.0.2 +tools.jackson.jaxrs:jackson-jaxrs-xml-provider;3.0.2 +tools.jackson.jaxrs:jackson-jaxrs-yaml-provider;3.0.2 +tools.jackson.jr:jackson-jr-all;3.0.2 +tools.jackson.jr:jackson-jr-annotation-support;3.0.2 +tools.jackson.jr:jackson-jr-extension-javatime;3.0.2 +tools.jackson.jr:jackson-jr-objects;3.0.2 +tools.jackson.jr:jackson-jr-retrofit2;3.0.2 +tools.jackson.jr:jackson-jr-stree;3.0.2 +tools.jackson.module:jackson-module-afterburner;3.0.2 +tools.jackson.module:jackson-module-android-record;3.0.2 +tools.jackson.module:jackson-module-blackbird;3.0.2 +tools.jackson.module:jackson-module-guice;3.0.2 +tools.jackson.module:jackson-module-guice7;3.0.2 +tools.jackson.module:jackson-module-jakarta-xmlbind-annotations;3.0.2 +tools.jackson.module:jackson-module-jaxb-annotations;3.0.2 +tools.jackson.module:jackson-module-kotlin;3.0.2 +tools.jackson.module:jackson-module-mrbean;3.0.2 +tools.jackson.module:jackson-module-no-ctor-deser;3.0.2 +tools.jackson.module:jackson-module-osgi;3.0.2 +tools.jackson.module:jackson-module-scala_2.12;3.0.2 +tools.jackson.module:jackson-module-scala_2.13;3.0.2 +tools.jackson.module:jackson-module-scala_3;3.0.2 +tools.jackson:jackson-bom;3.0.2 +wsdl4j:wsdl4j;1.6.3 diff --git a/sdk/spring/scripts/sync_external_dependencies.py b/sdk/spring/scripts/sync_external_dependencies.py index 34e6594899b2..8b67bafaf9ab 100644 --- a/sdk/spring/scripts/sync_external_dependencies.py +++ b/sdk/spring/scripts/sync_external_dependencies.py @@ -11,6 +11,8 @@ # Or `python .\sdk\spring\scripts\sync_external_dependencies.py --spring-boot-dependencies-version 2.7.18`. # 3.2 Sync Spring Boot 3.x, run command: `python .\sdk\spring\scripts\sync_external_dependencies.py -b 3.3.1 -sbmvn 3`. # Or `python .\sdk\spring\scripts\sync_external_dependencies.py --spring-boot-dependencies-version 3.3.1 --spring-boot-major-version-number 3`. +# 3.3 Sync Spring Boot 4.x, run command: `python .\sdk\spring\scripts\sync_external_dependencies.py -b 4.0.0 -sbmvn 4`. +# Or `python .\sdk\spring\scripts\sync_external_dependencies.py --spring-boot-dependencies-version 4.0.0 --spring-boot-major-version-number 4`. # 4. Then `eng/versioning/external_dependencies.txt` will be updated. # # Please refer to ./README.md to get more information about this script. @@ -23,7 +25,7 @@ from version_util import version_greater_than from log import log -from _constants import SPRING_BOOT_MAJOR_2_VERSION_NAME, SPRING_BOOT_MAJOR_3_VERSION_NAME, get_spring_boot_version_tag_prefix +from _constants import SPRING_BOOT_MAJOR_2_VERSION_NAME, SPRING_BOOT_MAJOR_3_VERSION_NAME, SPRING_BOOT_MAJOR_4_VERSION_NAME, get_spring_boot_version_tag_prefix EXTERNAL_DEPENDENCIES_FILE = 'eng/versioning/external_dependencies.txt' SKIP_IDS = [ @@ -50,7 +52,7 @@ def get_args(): '-sbmvn', '--spring-boot-major-version-number', type=str, - choices=[SPRING_BOOT_MAJOR_2_VERSION_NAME, SPRING_BOOT_MAJOR_3_VERSION_NAME], + choices=[SPRING_BOOT_MAJOR_2_VERSION_NAME, SPRING_BOOT_MAJOR_3_VERSION_NAME, SPRING_BOOT_MAJOR_4_VERSION_NAME], required=False, default=SPRING_BOOT_MAJOR_2_VERSION_NAME, help='Update the dependencies of Spring Boot major version. The default is ' + SPRING_BOOT_MAJOR_2_VERSION_NAME + '.' diff --git a/sdk/spring/scripts/version_util.py b/sdk/spring/scripts/version_util.py index 63583986b32a..a9886a817edb 100644 --- a/sdk/spring/scripts/version_util.py +++ b/sdk/spring/scripts/version_util.py @@ -11,20 +11,8 @@ def version_greater_than(source_version, target_version): source_version = format_version(source_version, SPECIAL_VERSION_LIST) target_version = format_version(target_version, SPECIAL_VERSION_LIST) - try: - sv = parse(source_version) - except: - # Handle invalid version formats (e.g., year-based versions with milestones like 2025.1.0-M4) - sv = None - try: - tv = parse(target_version) - except: - # Handle invalid version formats - tv = None - - # If both versions can't be parsed, use special comparison - if sv is None or tv is None: - return special_version_greater_than(source_version, target_version) + sv = parse(source_version) + tv = parse(target_version) if sv == tv: return True diff --git a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml index 1f54bcb9040a..6a2b1c67e965 100644 --- a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml @@ -41,19 +41,19 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-actuator-autoconfigure</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-actuator-autoconfigure;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-actuator-autoconfigure;external_dependency} --> <scope>compile</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-health</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-health;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-health;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> - <version>2.20.1</version> <!-- {x-version-update;springboot3_com.fasterxml.jackson.core:jackson-databind;external_dependency} --> + <version>2.20.1</version> <!-- {x-version-update;springboot4_com.fasterxml.jackson.core:jackson-databind;external_dependency} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> @@ -134,7 +134,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-test;external_dependency} --> <scope>test</scope> </dependency> @@ -142,7 +142,7 @@ <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version> <!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version> <!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -150,13 +150,13 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> </dependencies> @@ -166,7 +166,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -200,15 +200,15 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>com.fasterxml.jackson.core:jackson-databind:[2.20.1]</include> <!-- {x-include-update;springboot3_com.fasterxml.jackson.core:jackson-databind;external_dependency} --> - <include>org.springframework.boot:spring-boot-actuator:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-actuator;external_dependency} --> - <include>org.springframework.boot:spring-boot-actuator-autoconfigure:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-actuator-autoconfigure;external_dependency} --> - <include>org.springframework.boot:spring-boot-health:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-health;external_dependency} --> + <include>com.fasterxml.jackson.core:jackson-databind:[2.20.1]</include> <!-- {x-include-update;springboot4_com.fasterxml.jackson.core:jackson-databind;external_dependency} --> + <include>org.springframework.boot:spring-boot-actuator:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-actuator;external_dependency} --> + <include>org.springframework.boot:spring-boot-actuator-autoconfigure:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-actuator-autoconfigure;external_dependency} --> + <include>org.springframework.boot:spring-boot-health:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-health;external_dependency} --> </includes> </bannedDependencies> </rules> @@ -217,7 +217,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -262,7 +262,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-actuator/pom.xml b/sdk/spring/spring-cloud-azure-actuator/pom.xml index bc6d1e55d8a0..8552dbd5e1ef 100644 --- a/sdk/spring/spring-cloud-azure-actuator/pom.xml +++ b/sdk/spring/spring-cloud-azure-actuator/pom.xml @@ -45,13 +45,13 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-actuator</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-actuator;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-actuator;external_dependency} --> <scope>compile</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-health</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-health;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-health;external_dependency} --> <optional>true</optional> </dependency> @@ -122,7 +122,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-test;external_dependency} --> <scope>test</scope> </dependency> @@ -130,7 +130,7 @@ <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version> <!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version> <!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -138,13 +138,13 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> </dependencies> @@ -154,7 +154,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -185,13 +185,13 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>org.springframework.boot:spring-boot-actuator:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-actuator;external_dependency} --> - <include>org.springframework.boot:spring-boot-health:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-health;external_dependency} --> + <include>org.springframework.boot:spring-boot-actuator:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-actuator;external_dependency} --> + <include>org.springframework.boot:spring-boot-health:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-health;external_dependency} --> </includes> </bannedDependencies> </rules> @@ -200,7 +200,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -245,7 +245,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/pom.xml b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/pom.xml index 0bd524eb10f0..1b4c6a4e951d 100644 --- a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/pom.xml +++ b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/pom.xml @@ -26,24 +26,24 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-webmvc</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-webmvc;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-webmvc;external_dependency} --> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-actuator;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-actuator;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-bus</artifactId> - <version>4.3.0</version> <!-- {x-version-update;springboot3_org.springframework.cloud:spring-cloud-bus;external_dependency} --> + <version>5.0.0</version> <!-- {x-version-update;springboot4_org.springframework.cloud:spring-cloud-bus;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-test;external_dependency} --> <scope>test</scope> </dependency> @@ -51,7 +51,7 @@ <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version> <!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version> <!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -59,13 +59,13 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> </dependencies> @@ -74,7 +74,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <configuration> <compilerArgs> <arg>-Xlint:deprecation</arg> @@ -113,14 +113,14 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>org.springframework.boot:spring-boot-starter-actuator:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-starter-actuator;external_dependency} --> - <include>org.springframework.boot:spring-boot-starter-webmvc:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-starter-webmvc;external_dependency} --> - <include>org.springframework.cloud:spring-cloud-bus:[4.3.0]</include> <!-- {x-include-update;springboot3_org.springframework.cloud:spring-cloud-bus;external_dependency} --> + <include>org.springframework.boot:spring-boot-starter-actuator:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-starter-actuator;external_dependency} --> + <include>org.springframework.boot:spring-boot-starter-webmvc:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-starter-webmvc;external_dependency} --> + <include>org.springframework.cloud:spring-cloud-bus:[5.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.cloud:spring-cloud-bus;external_dependency} --> </includes> </bannedDependencies> </rules> @@ -129,7 +129,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -177,7 +177,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> - <version>3.12.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-javadoc-plugin;external_dependency} --> + <version>3.12.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-javadoc-plugin;external_dependency} --> <executions> <execution> <id>attach-javadocs</id> @@ -193,7 +193,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-appconfiguration-config/pom.xml b/sdk/spring/spring-cloud-azure-appconfiguration-config/pom.xml index d3e6aa095ae0..59e3f2d435a7 100644 --- a/sdk/spring/spring-cloud-azure-appconfiguration-config/pom.xml +++ b/sdk/spring/spring-cloud-azure-appconfiguration-config/pom.xml @@ -21,29 +21,29 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-autoconfigure</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-autoconfigure;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-autoconfigure;external_dependency} --> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-context</artifactId> - <version>4.3.0</version> <!-- {x-version-update;springboot3_org.springframework.cloud:spring-cloud-context;external_dependency} --> + <version>5.0.0</version> <!-- {x-version-update;springboot4_org.springframework.cloud:spring-cloud-context;external_dependency} --> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-actuator</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-actuator;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-actuator;external_dependency} --> <scope>compile</scope> </dependency> <dependency> <groupId>jakarta.annotation</groupId> <artifactId>jakarta.annotation-api</artifactId> - <version>3.0.0</version> <!-- {x-version-update;springboot3_jakarta.annotation:jakarta.annotation-api;external_dependency} --> + <version>3.0.0</version> <!-- {x-version-update;springboot4_jakarta.annotation:jakarta.annotation-api;external_dependency} --> </dependency> <!--Azure Java SDK --> <dependency> @@ -80,7 +80,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-test;external_dependency} --> <scope>test</scope> </dependency> @@ -88,7 +88,7 @@ <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version> <!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version> <!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -96,13 +96,13 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> <!-- Added this dependency to include necessary annotations used @@ -112,7 +112,7 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> </dependencies> @@ -121,7 +121,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <configuration> <compilerArgs> <arg>-Xlint:deprecation</arg> @@ -172,18 +172,18 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>com.fasterxml.jackson.core:jackson-annotations:[2.20]</include> <!-- {x-include-update;springboot3_com.fasterxml.jackson.core:jackson-annotations;external_dependency} --> - <include>com.fasterxml.jackson.core:jackson-databind:[2.20.1]</include> <!-- {x-include-update;springboot3_com.fasterxml.jackson.core:jackson-databind;external_dependency} --> - <include>org.springframework.boot:spring-boot-actuator:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-actuator;external_dependency} --> - <include>org.springframework.boot:spring-boot-autoconfigure:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-autoconfigure;external_dependency} --> - <include>org.springframework.cloud:spring-cloud-context:[4.3.0]</include> <!-- {x-include-update;springboot3_org.springframework.cloud:spring-cloud-context;external_dependency} --> - <include>jakarta.annotation:jakarta.annotation-api:[3.0.0]</include> <!-- {x-include-update;springboot3_jakarta.annotation:jakarta.annotation-api;external_dependency} --> - <include>org.springframework.boot:spring-boot-configuration-processor:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> + <include>com.fasterxml.jackson.core:jackson-annotations:[2.20]</include> <!-- {x-include-update;springboot4_com.fasterxml.jackson.core:jackson-annotations;external_dependency} --> + <include>com.fasterxml.jackson.core:jackson-databind:[2.20.1]</include> <!-- {x-include-update;springboot4_com.fasterxml.jackson.core:jackson-databind;external_dependency} --> + <include>org.springframework.boot:spring-boot-actuator:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-actuator;external_dependency} --> + <include>org.springframework.boot:spring-boot-autoconfigure:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-autoconfigure;external_dependency} --> + <include>org.springframework.cloud:spring-cloud-context:[5.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.cloud:spring-cloud-context;external_dependency} --> + <include>jakarta.annotation:jakarta.annotation-api:[3.0.0]</include> <!-- {x-include-update;springboot4_jakarta.annotation:jakarta.annotation-api;external_dependency} --> + <include>org.springframework.boot:spring-boot-configuration-processor:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> </includes> </bannedDependencies> </rules> @@ -192,7 +192,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index c34a3d802bc4..10cfd099581a 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -86,13 +86,13 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-kafka</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-kafka;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-kafka;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-stream-kafka</artifactId> - <version>5.0.0-RC1</version> <!-- {x-version-update;springboot3_org.springframework.cloud:spring-cloud-starter-stream-kafka;external_dependency} --> + <version>5.0.0</version> <!-- {x-version-update;springboot4_org.springframework.cloud:spring-cloud-starter-stream-kafka;external_dependency} --> <optional>true</optional> </dependency> <!-- Spring Data --> @@ -100,19 +100,19 @@ <dependency> <groupId>io.lettuce</groupId> <artifactId>lettuce-core</artifactId> - <version>6.8.1.RELEASE</version> <!-- {x-version-update;springboot3_io.lettuce:lettuce-core;external_dependency} --> + <version>6.8.1.RELEASE</version> <!-- {x-version-update;springboot4_io.lettuce:lettuce-core;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-data-redis</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-data-redis;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-data-redis;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-tx;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-tx;external_dependency} --> <optional>true</optional> </dependency> @@ -128,13 +128,13 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-jms</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-jms;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-jms;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.messaginghub</groupId> <artifactId>pooled-jms</artifactId> - <version>3.1.7</version> <!-- {x-version-update;springboot3_org.messaginghub:pooled-jms;external_dependency} --> + <version>3.1.7</version> <!-- {x-version-update;springboot4_org.messaginghub:pooled-jms;external_dependency} --> <optional>true</optional> </dependency> <dependency> @@ -158,7 +158,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-jdbc</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-jdbc;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-jdbc;external_dependency} --> <optional>true</optional> </dependency> @@ -166,7 +166,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-restclient</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-restclient;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-restclient;external_dependency} --> <optional>true</optional> </dependency> @@ -174,7 +174,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-security</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-security;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-security;external_dependency} --> <optional>true</optional> </dependency> @@ -182,13 +182,13 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-jackson</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-jackson;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-jackson;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>com.fasterxml.jackson.datatype</groupId> <artifactId>jackson-datatype-jsr310</artifactId> - <version>2.20.1</version> <!-- {x-version-update;springboot3_com.fasterxml.jackson.datatype:jackson-datatype-jsr310;external_dependency} --> + <version>2.20.1</version> <!-- {x-version-update;springboot4_com.fasterxml.jackson.datatype:jackson-datatype-jsr310;external_dependency} --> <optional>true</optional> </dependency> @@ -338,25 +338,25 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-autoconfigure</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-autoconfigure;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-autoconfigure;external_dependency} --> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-context-support;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-context-support;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-actuator-autoconfigure</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-actuator-autoconfigure;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-actuator-autoconfigure;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> <optional>true</optional> </dependency> @@ -364,25 +364,25 @@ <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-oauth2-client</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework.security:spring-security-oauth2-client;external_dependency} --> + <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-oauth2-client;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-oauth2-resource-server</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework.security:spring-security-oauth2-resource-server;external_dependency} --> + <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-oauth2-resource-server;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-oauth2-jose</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework.security:spring-security-oauth2-jose;external_dependency} --> + <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-oauth2-jose;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-config</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework.security:spring-security-config;external_dependency} --> + <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-config;external_dependency} --> <optional>true</optional> </dependency> @@ -392,26 +392,26 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> <dependency> <groupId>jakarta.servlet</groupId> <artifactId>jakarta.servlet-api</artifactId> - <version>6.1.0</version> <!-- {x-version-update;springboot3_jakarta.servlet:jakarta.servlet-api;external_dependency} --> + <version>6.1.0</version> <!-- {x-version-update;springboot4_jakarta.servlet:jakarta.servlet-api;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.hibernate.validator</groupId> <artifactId>hibernate-validator</artifactId> - <version>9.0.1.Final</version> <!-- {x-version-update;springboot3_org.hibernate.validator:hibernate-validator;external_dependency} --> + <version>9.0.1.Final</version> <!-- {x-version-update;springboot4_org.hibernate.validator:hibernate-validator;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>jakarta.validation</groupId> <artifactId>jakarta.validation-api</artifactId> - <version>3.1.1</version> <!-- {x-version-update;springboot3_jakarta.validation:jakarta.validation-api;external_dependency} --> + <version>3.1.1</version> <!-- {x-version-update;springboot4_jakarta.validation:jakarta.validation-api;external_dependency} --> </dependency> <dependency> @@ -425,31 +425,31 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-security-oauth2-client</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-security-oauth2-client;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-security-oauth2-client;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-http-converter</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-http-converter;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-http-converter;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-test;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core-test</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-core-test;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-core-test;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-metadata</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-configuration-metadata;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-configuration-metadata;external_dependency} --> <scope>test</scope> </dependency> @@ -457,7 +457,7 @@ <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version> <!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version> <!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -465,27 +465,27 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> <!-- used to test AzureJdbcAutoConfiguration --> <dependency> <groupId>com.mysql</groupId> <artifactId>mysql-connector-j</artifactId> - <version>9.4.0</version> <!-- {x-version-update;springboot3_com.mysql:mysql-connector-j;external_dependency} --> + <version>9.5.0</version> <!-- {x-version-update;springboot4_com.mysql:mysql-connector-j;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> - <version>42.7.8</version> <!-- {x-version-update;springboot3_org.postgresql:postgresql;external_dependency} --> + <version>42.7.8</version> <!-- {x-version-update;springboot4_org.postgresql:postgresql;external_dependency} --> <scope>test</scope> </dependency> @@ -496,7 +496,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -542,38 +542,38 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> <include>com.azure:azure-servicebus-jms:[2.0.0]</include> <!-- {x-include-update;com.azure:azure-servicebus-jms;external_dependency} --> - <include>com.mysql:mysql-connector-j:[9.4.0]</include> <!-- {x-include-update;springboot3_com.mysql:mysql-connector-j;external_dependency} --> - <include>com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.20.1]</include> <!-- {x-include-update;springboot3_com.fasterxml.jackson.datatype:jackson-datatype-jsr310;external_dependency} --> - <include>io.lettuce:lettuce-core:[6.8.1.RELEASE]</include> <!-- {x-include-update;springboot3_io.lettuce:lettuce-core;external_dependency} --> - <include>jakarta.servlet:jakarta.servlet-api:[6.1.0]</include> <!-- {x-include-update;springboot3_jakarta.servlet:jakarta.servlet-api;external_dependency} --> - <include>jakarta.validation:jakarta.validation-api:[3.1.1]</include> <!-- {x-include-update;springboot3_jakarta.validation:jakarta.validation-api;external_dependency} --> - <include>org.hibernate.validator:hibernate-validator:[9.0.1.Final]</include> <!-- {x-include-update;springboot3_org.hibernate.validator:hibernate-validator;external_dependency} --> - <include>org.messaginghub:pooled-jms:[3.1.7]</include> <!-- {x-include-update;springboot3_org.messaginghub:pooled-jms;external_dependency} --> - <include>org.postgresql:postgresql:[42.7.8]</include> <!-- {x-include-update;springboot3_org.postgresql:postgresql;external_dependency} --> - <include>org.springframework.boot:spring-boot-actuator-autoconfigure:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-actuator-autoconfigure;external_dependency} --> - <include>org.springframework.boot:spring-boot-autoconfigure:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-autoconfigure;external_dependency} --> - <include>org.springframework.boot:spring-boot-configuration-processor:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> - <include>org.springframework.boot:spring-boot-data-redis:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-data-redis;external_dependency} --> - <include>org.springframework.boot:spring-boot-http-converter:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-http-converter;external_dependency} --> - <include>org.springframework.boot:spring-boot-kafka:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-kafka;external_dependency} --> - <include>org.springframework.boot:spring-boot-jackson:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-jackson;external_dependency} --> - <include>org.springframework.boot:spring-boot-jdbc:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-jdbc;external_dependency} --> - <include>org.springframework.boot:spring-boot-jms:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-jms;external_dependency} --> - <include>org.springframework.boot:spring-boot-restclient:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-restclient;external_dependency} --> - <include>org.springframework.boot:spring-boot-security:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-security;external_dependency} --> - <include>org.springframework.cloud:spring-cloud-starter-stream-kafka:[5.0.0-RC1]</include> <!-- {x-include-update;springboot3_org.springframework.cloud:spring-cloud-starter-stream-kafka;external_dependency} --> - <include>org.springframework.security:spring-security-config:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework.security:spring-security-config;external_dependency} --> - <include>org.springframework.security:spring-security-oauth2-client:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework.security:spring-security-oauth2-client;external_dependency} --> - <include>org.springframework.security:spring-security-oauth2-jose:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework.security:spring-security-oauth2-jose;external_dependency} --> - <include>org.springframework.security:spring-security-oauth2-resource-server:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework.security:spring-security-oauth2-resource-server;external_dependency} --> - <include>org.springframework:spring-context-support:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework:spring-context-support;external_dependency} --> - <include>org.springframework:spring-tx:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework:spring-tx;external_dependency} --> + <include>com.mysql:mysql-connector-j:[9.5.0]</include> <!-- {x-include-update;springboot4_com.mysql:mysql-connector-j;external_dependency} --> + <include>com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.20.1]</include> <!-- {x-include-update;springboot4_com.fasterxml.jackson.datatype:jackson-datatype-jsr310;external_dependency} --> + <include>io.lettuce:lettuce-core:[6.8.1.RELEASE]</include> <!-- {x-include-update;springboot4_io.lettuce:lettuce-core;external_dependency} --> + <include>jakarta.servlet:jakarta.servlet-api:[6.1.0]</include> <!-- {x-include-update;springboot4_jakarta.servlet:jakarta.servlet-api;external_dependency} --> + <include>jakarta.validation:jakarta.validation-api:[3.1.1]</include> <!-- {x-include-update;springboot4_jakarta.validation:jakarta.validation-api;external_dependency} --> + <include>org.hibernate.validator:hibernate-validator:[9.0.1.Final]</include> <!-- {x-include-update;springboot4_org.hibernate.validator:hibernate-validator;external_dependency} --> + <include>org.messaginghub:pooled-jms:[3.1.7]</include> <!-- {x-include-update;springboot4_org.messaginghub:pooled-jms;external_dependency} --> + <include>org.postgresql:postgresql:[42.7.8]</include> <!-- {x-include-update;springboot4_org.postgresql:postgresql;external_dependency} --> + <include>org.springframework.boot:spring-boot-actuator-autoconfigure:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-actuator-autoconfigure;external_dependency} --> + <include>org.springframework.boot:spring-boot-autoconfigure:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-autoconfigure;external_dependency} --> + <include>org.springframework.boot:spring-boot-configuration-processor:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> + <include>org.springframework.boot:spring-boot-data-redis:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-data-redis;external_dependency} --> + <include>org.springframework.boot:spring-boot-http-converter:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-http-converter;external_dependency} --> + <include>org.springframework.boot:spring-boot-kafka:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-kafka;external_dependency} --> + <include>org.springframework.boot:spring-boot-jackson:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-jackson;external_dependency} --> + <include>org.springframework.boot:spring-boot-jdbc:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-jdbc;external_dependency} --> + <include>org.springframework.boot:spring-boot-jms:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-jms;external_dependency} --> + <include>org.springframework.boot:spring-boot-restclient:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-restclient;external_dependency} --> + <include>org.springframework.boot:spring-boot-security:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-security;external_dependency} --> + <include>org.springframework.cloud:spring-cloud-starter-stream-kafka:[5.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.cloud:spring-cloud-starter-stream-kafka;external_dependency} --> + <include>org.springframework.security:spring-security-config:[7.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.security:spring-security-config;external_dependency} --> + <include>org.springframework.security:spring-security-oauth2-client:[7.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.security:spring-security-oauth2-client;external_dependency} --> + <include>org.springframework.security:spring-security-oauth2-jose:[7.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.security:spring-security-oauth2-jose;external_dependency} --> + <include>org.springframework.security:spring-security-oauth2-resource-server:[7.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.security:spring-security-oauth2-resource-server;external_dependency} --> + <include>org.springframework:spring-context-support:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-context-support;external_dependency} --> + <include>org.springframework:spring-tx:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-tx;external_dependency} --> </includes> </bannedDependencies> </rules> @@ -582,7 +582,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> diff --git a/sdk/spring/spring-cloud-azure-core/pom.xml b/sdk/spring/spring-cloud-azure-core/pom.xml index 7ef2433b0771..b3236db5a4c9 100644 --- a/sdk/spring/spring-cloud-azure-core/pom.xml +++ b/sdk/spring/spring-cloud-azure-core/pom.xml @@ -40,7 +40,7 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-context;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-context;external_dependency} --> </dependency> <dependency> <groupId>com.azure</groupId> @@ -98,7 +98,7 @@ <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version><!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version><!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -106,25 +106,25 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> - <version>6.0.1</version> <!-- {x-version-update;springboot3_org.junit.jupiter:junit-jupiter;external_dependency} --> + <version>6.0.1</version> <!-- {x-version-update;springboot4_org.junit.jupiter:junit-jupiter;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-test;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-test;external_dependency} --> <scope>test</scope> </dependency> @@ -135,7 +135,7 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> </dependencies> @@ -145,7 +145,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -176,12 +176,12 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>org.springframework:spring-context:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework:spring-context;external_dependency} --> + <include>org.springframework:spring-context:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-context;external_dependency} --> </includes> </bannedDependencies> </rules> @@ -190,7 +190,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> diff --git a/sdk/spring/spring-cloud-azure-docker-compose/pom.xml b/sdk/spring/spring-cloud-azure-docker-compose/pom.xml index eae1aee6c469..b514c2dfa6e6 100644 --- a/sdk/spring/spring-cloud-azure-docker-compose/pom.xml +++ b/sdk/spring/spring-cloud-azure-docker-compose/pom.xml @@ -81,7 +81,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-docker-compose</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-docker-compose;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-docker-compose;external_dependency} --> </dependency> <!-- Added this dependency to include necessary annotations used by reactor core. Without this dependency, javadoc throws a warning as it cannot find enum When.MAYBE @@ -89,32 +89,32 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-test;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-test;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-test;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> - <version>6.0.1</version> <!-- {x-version-update;springboot3_org.junit.jupiter:junit-jupiter;external_dependency} --> + <version>6.0.1</version> <!-- {x-version-update;springboot4_org.junit.jupiter:junit-jupiter;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> - <version>3.27.6</version> <!-- {x-version-update;springboot3_org.assertj:assertj-core;external_dependency} --> + <version>3.27.6</version> <!-- {x-version-update;springboot4_org.assertj:assertj-core;external_dependency} --> <scope>test</scope> </dependency> </dependencies> @@ -124,7 +124,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -155,12 +155,12 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>org.springframework.boot:spring-boot-docker-compose:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-docker-compose;external_dependency} --> + <include>org.springframework.boot:spring-boot-docker-compose:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-docker-compose;external_dependency} --> </includes> </bannedDependencies> </rules> @@ -169,7 +169,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -214,7 +214,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-feature-management-web/pom.xml b/sdk/spring/spring-cloud-azure-feature-management-web/pom.xml index 2647f98dd721..bd874ef095c7 100644 --- a/sdk/spring/spring-cloud-azure-feature-management-web/pom.xml +++ b/sdk/spring/spring-cloud-azure-feature-management-web/pom.xml @@ -29,12 +29,12 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-web;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-web;external_dependency} --> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-webmvc;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-webmvc;external_dependency} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> @@ -44,26 +44,26 @@ <dependency> <groupId>jakarta.servlet</groupId> <artifactId>jakarta.servlet-api</artifactId> - <version>6.1.0</version> <!-- {x-version-update;springboot3_jakarta.servlet:jakarta.servlet-api;external_dependency} --> + <version>6.1.0</version> <!-- {x-version-update;springboot4_jakarta.servlet:jakarta.servlet-api;external_dependency} --> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-test;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito to work with Java 21.--> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> </dependencies> @@ -72,7 +72,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -88,7 +88,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -122,15 +122,15 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> <include>com.azure.spring:spring-cloud-azure-feature-management:[6.1.0-beta.1]</include> <!-- {x-include-update;com.azure.spring:spring-cloud-azure-feature-management;current} --> - <include>jakarta.servlet:jakarta.servlet-api:[6.1.0]</include> <!-- {x-include-update;springboot3_jakarta.servlet:jakarta.servlet-api;external_dependency} --> - <include>org.springframework:spring-web:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework:spring-web;external_dependency} --> - <include>org.springframework:spring-webmvc:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework:spring-webmvc;external_dependency} --> + <include>jakarta.servlet:jakarta.servlet-api:[6.1.0]</include> <!-- {x-include-update;springboot4_jakarta.servlet:jakarta.servlet-api;external_dependency} --> + <include>org.springframework:spring-web:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-web;external_dependency} --> + <include>org.springframework:spring-webmvc:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-webmvc;external_dependency} --> </includes> </bannedDependencies> </rules> diff --git a/sdk/spring/spring-cloud-azure-feature-management/pom.xml b/sdk/spring/spring-cloud-azure-feature-management/pom.xml index c3e670a71976..f962ad02c398 100644 --- a/sdk/spring/spring-cloud-azure-feature-management/pom.xml +++ b/sdk/spring/spring-cloud-azure-feature-management/pom.xml @@ -29,12 +29,12 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-context;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-context;external_dependency} --> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter;external_dependency} --> <exclusions> <exclusion> <groupId>ch.qos.logback</groupId> @@ -45,35 +45,35 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> - <version>2.20</version> <!-- {x-version-update;springboot3_com.fasterxml.jackson.core:jackson-annotations;external_dependency} --> + <version>2.20</version> <!-- {x-version-update;springboot4_com.fasterxml.jackson.core:jackson-annotations;external_dependency} --> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> - <version>2.20.1</version> <!-- {x-version-update;springboot3_com.fasterxml.jackson.core:jackson-databind;external_dependency} --> + <version>2.20.1</version> <!-- {x-version-update;springboot4_com.fasterxml.jackson.core:jackson-databind;external_dependency} --> </dependency> <dependency> <groupId>io.projectreactor.netty</groupId> <artifactId>reactor-netty</artifactId> - <version>1.3.0-RC1</version> <!-- {x-version-update;springboot3_io.projectreactor.netty:reactor-netty;external_dependency} --> + <version>1.3.0</version> <!-- {x-version-update;springboot4_io.projectreactor.netty:reactor-netty;external_dependency} --> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-test;external_dependency} --> <scope>test</scope> </dependency> <!-- Add mockito-core 4.11.0 to work with Java 21 --> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version> <!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version> <!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -81,19 +81,19 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> - <version>1.5.20</version> <!-- {x-version-update;springboot3_ch.qos.logback:logback-classic;external_dependency} --> + <version>1.5.21</version> <!-- {x-version-update;springboot4_ch.qos.logback:logback-classic;external_dependency} --> <scope>test</scope> </dependency> </dependencies> @@ -102,7 +102,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -118,7 +118,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -161,17 +161,17 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>com.fasterxml.jackson.core:jackson-annotations:[2.20]</include> <!-- {x-include-update;springboot3_com.fasterxml.jackson.core:jackson-annotations;external_dependency} --> - <include>com.fasterxml.jackson.core:jackson-databind:[2.20.1]</include> <!-- {x-include-update;springboot3_com.fasterxml.jackson.core:jackson-databind;external_dependency} --> - <include>io.projectreactor.netty:reactor-netty:[1.3.0-RC1]</include> <!-- {x-include-update;springboot3_io.projectreactor.netty:reactor-netty;external_dependency} --> - <include>org.springframework.boot:spring-boot-configuration-processor:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> - <include>org.springframework.boot:spring-boot-starter:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-starter;external_dependency} --> - <include>org.springframework:spring-context:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework:spring-context;external_dependency} --> + <include>com.fasterxml.jackson.core:jackson-annotations:[2.20]</include> <!-- {x-include-update;springboot4_com.fasterxml.jackson.core:jackson-annotations;external_dependency} --> + <include>com.fasterxml.jackson.core:jackson-databind:[2.20.1]</include> <!-- {x-include-update;springboot4_com.fasterxml.jackson.core:jackson-databind;external_dependency} --> + <include>io.projectreactor.netty:reactor-netty:[1.3.0]</include> <!-- {x-include-update;springboot4_io.projectreactor.netty:reactor-netty;external_dependency} --> + <include>org.springframework.boot:spring-boot-configuration-processor:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> + <include>org.springframework.boot:spring-boot-starter:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-starter;external_dependency} --> + <include>org.springframework:spring-context:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-context;external_dependency} --> </includes> </bannedDependencies> </rules> diff --git a/sdk/spring/spring-cloud-azure-integration-test-appconfiguration-config/pom.xml b/sdk/spring/spring-cloud-azure-integration-test-appconfiguration-config/pom.xml index aec66b0f6c01..2c4095570cbe 100644 --- a/sdk/spring/spring-cloud-azure-integration-test-appconfiguration-config/pom.xml +++ b/sdk/spring/spring-cloud-azure-integration-test-appconfiguration-config/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-parent;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-parent;external_dependency} --> <relativePath /> <!-- lookup parent from repository --> </parent> <groupId>com.azure.spring</groupId> @@ -30,7 +30,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-test;external_dependency} --> <scope>test</scope> </dependency> </dependencies> @@ -39,7 +39,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> - <version>3.5.4</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} --> + <version>3.5.4</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} --> <executions> <execution> <id>default</id> diff --git a/sdk/spring/spring-cloud-azure-integration-tests/pom.xml b/sdk/spring/spring-cloud-azure-integration-tests/pom.xml index c0ab0483a786..ed5a3dc9c7e2 100644 --- a/sdk/spring/spring-cloud-azure-integration-tests/pom.xml +++ b/sdk/spring/spring-cloud-azure-integration-tests/pom.xml @@ -7,7 +7,7 @@ <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-parent;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-parent;external_dependency} --> <relativePath/> <!-- lookup parent from repository --> </parent> @@ -107,7 +107,7 @@ <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-stream-kafka</artifactId> - <version>5.0.0-RC1</version> <!-- {x-version-update;springboot3_org.springframework.cloud:spring-cloud-starter-stream-kafka;external_dependency} --> + <version>5.0.0</version> <!-- {x-version-update;springboot4_org.springframework.cloud:spring-cloud-starter-stream-kafka;external_dependency} --> </dependency> <dependency> <groupId>org.springframework.boot</groupId> @@ -142,7 +142,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> - <version>3.5.4</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} --> + <version>3.5.4</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} --> <executions> <execution> <id>default</id> diff --git a/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml b/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml index 9a791d3c427c..5e0e646c913a 100644 --- a/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml +++ b/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml @@ -53,7 +53,7 @@ <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version><!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version><!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -61,25 +61,25 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> - <version>6.0.1</version> <!-- {x-version-update;springboot3_org.junit.jupiter:junit-jupiter;external_dependency} --> + <version>6.0.1</version> <!-- {x-version-update;springboot4_org.junit.jupiter:junit-jupiter;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-test;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-test;external_dependency} --> <scope>test</scope> </dependency> @@ -90,7 +90,7 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> </dependencies> @@ -100,7 +100,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -131,7 +131,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -176,7 +176,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-service/pom.xml b/sdk/spring/spring-cloud-azure-service/pom.xml index 7ca858176b3b..486dedff8cc5 100644 --- a/sdk/spring/spring-cloud-azure-service/pom.xml +++ b/sdk/spring/spring-cloud-azure-service/pom.xml @@ -116,7 +116,7 @@ <dependency> <groupId>org.apache.kafka</groupId> <artifactId>kafka-clients</artifactId> - <version>4.1.0</version> <!-- {x-version-update;springboot3_org.apache.kafka:kafka-clients;external_dependency} --> + <version>4.1.1</version> <!-- {x-version-update;springboot4_org.apache.kafka:kafka-clients;external_dependency} --> <optional>true</optional> </dependency> @@ -131,7 +131,7 @@ <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version><!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version><!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -139,25 +139,25 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> - <version>6.0.1</version> <!-- {x-version-update;springboot3_org.junit.jupiter:junit-jupiter;external_dependency} --> + <version>6.0.1</version> <!-- {x-version-update;springboot4_org.junit.jupiter:junit-jupiter;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-test;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-test;external_dependency} --> <scope>test</scope> </dependency> @@ -168,7 +168,7 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> </dependencies> @@ -178,7 +178,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -209,13 +209,13 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>org.apache.kafka:kafka-clients:[4.1.0]</include> <!-- {x-include-update;springboot3_org.apache.kafka:kafka-clients;external_dependency} --> - <include>org.postgresql:postgresql:[42.7.8]</include> <!-- {x-include-update;springboot3_org.postgresql:postgresql;external_dependency} --> + <include>org.apache.kafka:kafka-clients:[4.1.1]</include> <!-- {x-include-update;springboot4_org.apache.kafka:kafka-clients;external_dependency} --> + <include>org.postgresql:postgresql:[42.7.8]</include> <!-- {x-include-update;springboot4_org.postgresql:postgresql;external_dependency} --> <include>com.nimbusds:nimbus-jose-jwt:[9.37.3]</include> <!-- {x-include-update;com.nimbusds:nimbus-jose-jwt;external_dependency} --> </includes> </bannedDependencies> @@ -225,7 +225,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> diff --git a/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml b/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml index 176e7e0c84ab..963233cade39 100644 --- a/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml @@ -95,22 +95,22 @@ <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-config</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework.security:spring-security-config;external_dependency} --> + <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-config;external_dependency} --> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-oauth2-client</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework.security:spring-security-oauth2-client;external_dependency} --> + <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-oauth2-client;external_dependency} --> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-oauth2-jose</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework.security:spring-security-oauth2-jose;external_dependency} --> + <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-oauth2-jose;external_dependency} --> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-oauth2-resource-server</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework.security:spring-security-oauth2-resource-server;external_dependency} --> + <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-oauth2-resource-server;external_dependency} --> </dependency> </dependencies> @@ -119,7 +119,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -127,7 +127,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -135,7 +135,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -151,7 +151,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -199,7 +199,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml b/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml index 31fc942e4e0c..7a9ebb483ba0 100644 --- a/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml @@ -94,17 +94,17 @@ <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework.security:spring-security-web;external_dependency} --> + <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-web;external_dependency} --> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-config</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework.security:spring-security-config;external_dependency} --> + <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-config;external_dependency} --> </dependency> <dependency> <groupId>com.nimbusds</groupId> <artifactId>nimbus-jose-jwt</artifactId> - <version>9.37.3</version> <!-- {x-version-update;springboot3_com.nimbusds:nimbus-jose-jwt;external_dependency} --> + <version>9.37.3</version> <!-- {x-version-update;springboot4_com.nimbusds:nimbus-jose-jwt;external_dependency} --> </dependency> </dependencies> @@ -113,7 +113,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -121,7 +121,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -129,7 +129,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -145,7 +145,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -193,7 +193,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-actuator/pom.xml b/sdk/spring/spring-cloud-azure-starter-actuator/pom.xml index 828c133517a8..769c7b02b944 100644 --- a/sdk/spring/spring-cloud-azure-starter-actuator/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-actuator/pom.xml @@ -99,7 +99,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-actuator;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-actuator;external_dependency} --> </dependency> </dependencies> @@ -108,7 +108,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -116,7 +116,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -124,7 +124,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -140,7 +140,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -188,7 +188,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/pom.xml b/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/pom.xml index a2f2eca6dc8a..975c6017f6b1 100644 --- a/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/pom.xml @@ -102,7 +102,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -110,7 +110,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -118,7 +118,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -134,7 +134,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -185,7 +185,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-appconfiguration/pom.xml b/sdk/spring/spring-cloud-azure-starter-appconfiguration/pom.xml index 5b7e91306713..771ad5683c21 100644 --- a/sdk/spring/spring-cloud-azure-starter-appconfiguration/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-appconfiguration/pom.xml @@ -103,7 +103,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -111,7 +111,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -119,7 +119,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -135,7 +135,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -183,7 +183,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-cosmos/pom.xml b/sdk/spring/spring-cloud-azure-starter-cosmos/pom.xml index c0000d2c500c..5ab6fbbb88f2 100644 --- a/sdk/spring/spring-cloud-azure-starter-cosmos/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-cosmos/pom.xml @@ -103,7 +103,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -111,7 +111,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -119,7 +119,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -135,7 +135,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -183,7 +183,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-data-cosmos/pom.xml b/sdk/spring/spring-cloud-azure-starter-data-cosmos/pom.xml index 4fc0ec3633cb..d151888501e5 100644 --- a/sdk/spring/spring-cloud-azure-starter-data-cosmos/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-data-cosmos/pom.xml @@ -103,7 +103,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -111,7 +111,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -119,7 +119,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -135,7 +135,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -183,7 +183,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml b/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml index 9f4b6dd42bdb..c5e31d62f20c 100644 --- a/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml @@ -95,13 +95,13 @@ <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-redis</artifactId> - <version>3.5.3</version> <!-- {x-version-update;springboot3_org.springframework.data:spring-data-redis;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.data:spring-data-redis;external_dependency} --> </dependency> <dependency> <groupId>io.lettuce</groupId> <artifactId>lettuce-core</artifactId> - <version>6.8.1.RELEASE</version> <!-- {x-version-update;springboot3_io.lettuce:lettuce-core;external_dependency} --> + <version>6.8.1.RELEASE</version> <!-- {x-version-update;springboot4_io.lettuce:lettuce-core;external_dependency} --> <optional>true</optional> </dependency> @@ -118,7 +118,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -126,7 +126,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -134,7 +134,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -150,7 +150,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -198,7 +198,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-eventgrid/pom.xml b/sdk/spring/spring-cloud-azure-starter-eventgrid/pom.xml index 88606ed94052..1b3d1af35c1e 100644 --- a/sdk/spring/spring-cloud-azure-starter-eventgrid/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-eventgrid/pom.xml @@ -105,7 +105,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -113,7 +113,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -121,7 +121,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -137,7 +137,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -185,7 +185,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-eventhubs/pom.xml b/sdk/spring/spring-cloud-azure-starter-eventhubs/pom.xml index ba8d2d0e7229..b14f0101e3b4 100644 --- a/sdk/spring/spring-cloud-azure-starter-eventhubs/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-eventhubs/pom.xml @@ -111,7 +111,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -119,7 +119,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -127,7 +127,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -143,7 +143,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -191,7 +191,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-integration-eventhubs/pom.xml b/sdk/spring/spring-cloud-azure-starter-integration-eventhubs/pom.xml index de34805f7a1e..a4b1bad5035d 100644 --- a/sdk/spring/spring-cloud-azure-starter-integration-eventhubs/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-integration-eventhubs/pom.xml @@ -95,7 +95,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-integration</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-integration;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-integration;external_dependency} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> @@ -109,7 +109,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -117,7 +117,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -125,7 +125,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -141,7 +141,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -189,7 +189,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-integration-servicebus/pom.xml b/sdk/spring/spring-cloud-azure-starter-integration-servicebus/pom.xml index ea4eba599fd9..e49c9f6c7994 100644 --- a/sdk/spring/spring-cloud-azure-starter-integration-servicebus/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-integration-servicebus/pom.xml @@ -95,7 +95,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-integration</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-integration;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-integration;external_dependency} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> @@ -109,7 +109,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -117,7 +117,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -125,7 +125,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -141,7 +141,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -189,7 +189,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-integration-storage-queue/pom.xml b/sdk/spring/spring-cloud-azure-starter-integration-storage-queue/pom.xml index 7e8c9e42328a..b6e11599c5df 100644 --- a/sdk/spring/spring-cloud-azure-starter-integration-storage-queue/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-integration-storage-queue/pom.xml @@ -98,7 +98,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-integration</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-integration;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-integration;external_dependency} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> @@ -112,7 +112,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -120,7 +120,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -128,7 +128,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -144,7 +144,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -192,7 +192,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-jdbc-mysql/pom.xml b/sdk/spring/spring-cloud-azure-starter-jdbc-mysql/pom.xml index 3547883db3e2..368ea925b3f0 100644 --- a/sdk/spring/spring-cloud-azure-starter-jdbc-mysql/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-jdbc-mysql/pom.xml @@ -101,7 +101,7 @@ <dependency> <groupId>com.mysql</groupId> <artifactId>mysql-connector-j</artifactId> - <version>9.4.0</version> <!-- {x-version-update;springboot3_com.mysql:mysql-connector-j;external_dependency} --> + <version>9.5.0</version> <!-- {x-version-update;springboot4_com.mysql:mysql-connector-j;external_dependency} --> </dependency> </dependencies> @@ -110,7 +110,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -118,7 +118,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -126,7 +126,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -142,7 +142,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -190,7 +190,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql/pom.xml b/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql/pom.xml index fd7e24f31097..d567ba95bb13 100644 --- a/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql/pom.xml @@ -101,7 +101,7 @@ <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> - <version>42.7.8</version> <!-- {x-version-update;springboot3_org.postgresql:postgresql;external_dependency} --> + <version>42.7.8</version> <!-- {x-version-update;springboot4_org.postgresql:postgresql;external_dependency} --> </dependency> </dependencies> @@ -110,7 +110,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -118,7 +118,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -126,7 +126,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -142,7 +142,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -190,7 +190,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-keyvault-certificates/pom.xml b/sdk/spring/spring-cloud-azure-starter-keyvault-certificates/pom.xml index 4f0fe5b21b93..d64fcf6b0694 100644 --- a/sdk/spring/spring-cloud-azure-starter-keyvault-certificates/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-keyvault-certificates/pom.xml @@ -103,7 +103,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -111,7 +111,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -119,7 +119,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -135,7 +135,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -183,7 +183,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-keyvault-jca/pom.xml b/sdk/spring/spring-cloud-azure-starter-keyvault-jca/pom.xml index 80773b472706..463d4a2edfc2 100644 --- a/sdk/spring/spring-cloud-azure-starter-keyvault-jca/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-keyvault-jca/pom.xml @@ -103,7 +103,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -111,7 +111,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -119,7 +119,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -135,7 +135,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -183,7 +183,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-keyvault-secrets/pom.xml b/sdk/spring/spring-cloud-azure-starter-keyvault-secrets/pom.xml index cf7fd6ad6fb9..a44bbda6e4bf 100644 --- a/sdk/spring/spring-cloud-azure-starter-keyvault-secrets/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-keyvault-secrets/pom.xml @@ -103,7 +103,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -111,7 +111,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -119,7 +119,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -135,7 +135,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -183,7 +183,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-keyvault/pom.xml b/sdk/spring/spring-cloud-azure-starter-keyvault/pom.xml index 68f2915232ec..ade9361a79b0 100644 --- a/sdk/spring/spring-cloud-azure-starter-keyvault/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-keyvault/pom.xml @@ -108,7 +108,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -116,7 +116,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -124,7 +124,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -140,7 +140,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -188,7 +188,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml b/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml index 0ea0ee440840..f40b9a1004c5 100644 --- a/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml @@ -7,7 +7,7 @@ <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-parent;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-parent;external_dependency} --> <relativePath/> <!--By default Maven assumes the parent pom is in the parent folder. This line avoids a Maven warning. In Maven, a profile can only be shared with inheritance and a pom can only have one parent. spring-boot-starter-parent contains a native-test profile gathering the configuration allowing to execute a Spring native test.--> @@ -48,23 +48,23 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-webmvc</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-webmvc;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-webmvc;external_dependency} --> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jdbc</artifactId> - <version>4.0.0-RC2</version><!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-data-jdbc;external_dependency} --> + <version>4.0.0</version><!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-data-jdbc;external_dependency} --> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-test;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-resttestclient</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-resttestclient;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-resttestclient;external_dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-starter-monitor/pom.xml b/sdk/spring/spring-cloud-azure-starter-monitor/pom.xml index 0a385980184f..3c70f7b99a25 100644 --- a/sdk/spring/spring-cloud-azure-starter-monitor/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-monitor/pom.xml @@ -87,7 +87,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter;external_dependency} --> <scope>provided</scope> </dependency> @@ -160,13 +160,13 @@ <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> - <version>2.0.17</version> <!-- {x-version-update;springboot3_org.slf4j:slf4j-simple;external_dependency} --> + <version>2.0.17</version> <!-- {x-version-update;springboot4_org.slf4j:slf4j-simple;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-test;external_dependency} --> <scope>test</scope> </dependency> <!-- End of test dependencies --> @@ -178,7 +178,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -222,7 +222,7 @@ <include>io.opentelemetry:opentelemetry-sdk-metrics:[1.49.0]</include> <!-- {x-include-update;io.opentelemetry:opentelemetry-sdk-metrics;external_dependency} --> <include>io.opentelemetry:opentelemetry-sdk-logs:[1.49.0]</include> <!-- {x-include-update;io.opentelemetry:opentelemetry-sdk-logs;external_dependency} --> <include>io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:[1.49.0]</include> <!-- {x-include-update;io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi;external_dependency} --> - <include>org.springframework.boot:spring-boot-starter:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-starter;external_dependency} --> + <include>org.springframework.boot:spring-boot-starter:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-starter;external_dependency} --> </includes> </bannedDependencies> </rules> diff --git a/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml b/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml index 4301713ba787..5a0aa7f8d90f 100644 --- a/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml @@ -96,12 +96,12 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jms</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-jms;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-jms;external_dependency} --> </dependency> <dependency> <groupId>org.messaginghub</groupId> <artifactId>pooled-jms</artifactId> - <version>3.1.7</version> <!-- {x-version-update;springboot3_org.messaginghub:pooled-jms;external_dependency} --> + <version>3.1.7</version> <!-- {x-version-update;springboot4_org.messaginghub:pooled-jms;external_dependency} --> </dependency> <dependency> <groupId>com.azure</groupId> @@ -136,37 +136,37 @@ currently released version and a lower version is resolved. --> <dependency> <groupId>io.netty</groupId> <artifactId>netty-buffer</artifactId> - <version>4.2.7.Final</version> <!-- {x-version-update;springboot3_io.netty:netty-buffer;external_dependency} --> + <version>4.2.7.Final</version> <!-- {x-version-update;springboot4_io.netty:netty-buffer;external_dependency} --> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-common</artifactId> - <version>4.2.7.Final</version> <!-- {x-version-update;springboot3_io.netty:netty-common;external_dependency} --> + <version>4.2.7.Final</version> <!-- {x-version-update;springboot4_io.netty:netty-common;external_dependency} --> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-handler</artifactId> - <version>4.2.7.Final</version> <!-- {x-version-update;springboot3_io.netty:netty-handler;external_dependency} --> + <version>4.2.7.Final</version> <!-- {x-version-update;springboot4_io.netty:netty-handler;external_dependency} --> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-transport</artifactId> - <version>4.2.7.Final</version> <!-- {x-version-update;springboot3_io.netty:netty-transport;external_dependency} --> + <version>4.2.7.Final</version> <!-- {x-version-update;springboot4_io.netty:netty-transport;external_dependency} --> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-transport-native-epoll</artifactId> - <version>4.2.7.Final</version> <!-- {x-version-update;springboot3_io.netty:netty-transport-native-epoll;external_dependency} --> + <version>4.2.7.Final</version> <!-- {x-version-update;springboot4_io.netty:netty-transport-native-epoll;external_dependency} --> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-transport-native-kqueue</artifactId> - <version>4.2.7.Final</version> <!-- {x-version-update;springboot3_io.netty:netty-transport-native-kqueue;external_dependency} --> + <version>4.2.7.Final</version> <!-- {x-version-update;springboot4_io.netty:netty-transport-native-kqueue;external_dependency} --> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-codec-http</artifactId> - <version>4.2.7.Final</version> <!-- {x-version-update;springboot3_io.netty:netty-codec-http;external_dependency} --> + <version>4.2.7.Final</version> <!-- {x-version-update;springboot4_io.netty:netty-codec-http;external_dependency} --> </dependency> <dependency> <groupId>com.azure</groupId> @@ -180,7 +180,7 @@ currently released version and a lower version is resolved. --> <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -188,7 +188,7 @@ currently released version and a lower version is resolved. --> <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -196,7 +196,7 @@ currently released version and a lower version is resolved. --> <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -212,7 +212,7 @@ currently released version and a lower version is resolved. --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -260,7 +260,7 @@ currently released version and a lower version is resolved. --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-servicebus/pom.xml b/sdk/spring/spring-cloud-azure-starter-servicebus/pom.xml index d28744b094b5..23cad108c58d 100644 --- a/sdk/spring/spring-cloud-azure-starter-servicebus/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-servicebus/pom.xml @@ -104,7 +104,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -112,7 +112,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -120,7 +120,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -136,7 +136,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -184,7 +184,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-storage-blob/pom.xml b/sdk/spring/spring-cloud-azure-starter-storage-blob/pom.xml index 2e1f2a760cea..d976c14ff75e 100644 --- a/sdk/spring/spring-cloud-azure-starter-storage-blob/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-storage-blob/pom.xml @@ -104,7 +104,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -112,7 +112,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -120,7 +120,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -136,7 +136,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -184,7 +184,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-storage-file-share/pom.xml b/sdk/spring/spring-cloud-azure-starter-storage-file-share/pom.xml index 1520ec1065ee..9188f2c589e4 100644 --- a/sdk/spring/spring-cloud-azure-starter-storage-file-share/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-storage-file-share/pom.xml @@ -104,7 +104,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -112,7 +112,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -120,7 +120,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -136,7 +136,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -184,7 +184,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-storage-queue/pom.xml b/sdk/spring/spring-cloud-azure-starter-storage-queue/pom.xml index 6662f8aa3c85..9a3263708280 100644 --- a/sdk/spring/spring-cloud-azure-starter-storage-queue/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-storage-queue/pom.xml @@ -107,7 +107,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -115,7 +115,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -123,7 +123,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -139,7 +139,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -187,7 +187,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-storage/pom.xml b/sdk/spring/spring-cloud-azure-starter-storage/pom.xml index e691d6405a21..809feecc49c5 100644 --- a/sdk/spring/spring-cloud-azure-starter-storage/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-storage/pom.xml @@ -110,7 +110,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -118,7 +118,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -126,7 +126,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -142,7 +142,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -190,7 +190,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-stream-eventhubs/pom.xml b/sdk/spring/spring-cloud-azure-starter-stream-eventhubs/pom.xml index 2efee45c7ff5..cb107d5d1705 100644 --- a/sdk/spring/spring-cloud-azure-starter-stream-eventhubs/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-stream-eventhubs/pom.xml @@ -99,7 +99,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -107,7 +107,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -115,7 +115,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -131,7 +131,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -179,7 +179,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter-stream-servicebus/pom.xml b/sdk/spring/spring-cloud-azure-starter-stream-servicebus/pom.xml index 20e56584f39a..04fdf7bfa21c 100644 --- a/sdk/spring/spring-cloud-azure-starter-stream-servicebus/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-stream-servicebus/pom.xml @@ -99,7 +99,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -107,7 +107,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -115,7 +115,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -131,7 +131,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -179,7 +179,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-starter/pom.xml b/sdk/spring/spring-cloud-azure-starter/pom.xml index 6eb7d159daae..398b4c1dcf05 100644 --- a/sdk/spring/spring-cloud-azure-starter/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter/pom.xml @@ -89,7 +89,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter;external_dependency} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> @@ -103,7 +103,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> + <version>4.8.2.0</version> <!-- {x-version-update;springboot4_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -111,7 +111,7 @@ <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> - <version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> + <version>2.30.0</version> <!-- {x-version-update;springboot4_com.diffplug.spotless:spotless-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -119,7 +119,7 @@ <plugin> <groupId>org.revapi</groupId> <artifactId>revapi-maven-plugin</artifactId> - <version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} --> + <version>0.14.6</version> <!-- {x-version-update;springboot4_org.revapi:revapi-maven-plugin;external_dependency} --> <configuration> <skip>true</skip> </configuration> @@ -135,7 +135,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -192,7 +192,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/pom.xml b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/pom.xml index 4ab14ba21534..2e09532d69d7 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/pom.xml +++ b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/pom.xml @@ -47,7 +47,7 @@ <artifactId>spring-integration-core</artifactId> </exclusion> </exclusions> - <version>4.3.0</version> <!-- {x-version-update;springboot3_org.springframework.cloud:spring-cloud-stream;external_dependency} --> + <version>5.0.0</version> <!-- {x-version-update;springboot4_org.springframework.cloud:spring-cloud-stream;external_dependency} --> </dependency> <dependency> @@ -59,14 +59,14 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version><!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version><!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -74,25 +74,25 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> - <version>6.0.1</version> <!-- {x-version-update;springboot3_org.junit.jupiter:junit-jupiter;external_dependency} --> + <version>6.0.1</version> <!-- {x-version-update;springboot4_org.junit.jupiter:junit-jupiter;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-test;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-test;external_dependency} --> <scope>test</scope> </dependency> @@ -102,19 +102,19 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-test;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> - <version>3.27.6</version> <!-- {x-version-update;springboot3_org.assertj:assertj-core;external_dependency} --> + <version>3.27.6</version> <!-- {x-version-update;springboot4_org.assertj:assertj-core;external_dependency} --> <scope>test</scope> </dependency> </dependencies> @@ -123,7 +123,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -166,13 +166,13 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>org.springframework.boot:spring-boot-configuration-processor:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> - <include>org.springframework.cloud:spring-cloud-stream:[4.3.0]</include> <!-- {x-include-update;springboot3_org.springframework.cloud:spring-cloud-stream;external_dependency} --> + <include>org.springframework.boot:spring-boot-configuration-processor:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> + <include>org.springframework.cloud:spring-cloud-stream:[5.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.cloud:spring-cloud-stream;external_dependency} --> </includes> </bannedDependencies> </rules> @@ -181,7 +181,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> diff --git a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/pom.xml b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/pom.xml index 6f1086970efe..41842d93e71c 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/pom.xml +++ b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/pom.xml @@ -57,7 +57,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-actuator;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-actuator;external_dependency} --> <optional>true</optional> </dependency> @@ -70,7 +70,7 @@ <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-stream-test-binder</artifactId> - <version>4.3.0</version> <!-- {x-version-update;springboot3_org.springframework.cloud:spring-cloud-stream-test-binder;external_dependency} --> + <version>5.0.0</version> <!-- {x-version-update;springboot4_org.springframework.cloud:spring-cloud-stream-test-binder;external_dependency} --> <scope>test</scope> <exclusions> <exclusion> @@ -82,7 +82,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-test;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -90,13 +90,13 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> <!-- Added this dependency to include necessary annotations used by reactor core. @@ -105,7 +105,7 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> @@ -113,7 +113,7 @@ <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version> <!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version> <!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> @@ -123,7 +123,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -157,12 +157,12 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>org.springframework.boot:spring-boot-starter-actuator:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-starter-actuator;external_dependency} --> + <include>org.springframework.boot:spring-boot-starter-actuator:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-starter-actuator;external_dependency} --> </includes> </bannedDependencies> </rules> @@ -171,7 +171,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> diff --git a/sdk/spring/spring-cloud-azure-stream-binder-servicebus-core/pom.xml b/sdk/spring/spring-cloud-azure-stream-binder-servicebus-core/pom.xml index 59d45b84a014..d9f657d34acf 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-servicebus-core/pom.xml +++ b/sdk/spring/spring-cloud-azure-stream-binder-servicebus-core/pom.xml @@ -41,7 +41,7 @@ <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-stream</artifactId> - <version>4.3.0</version> <!-- {x-version-update;springboot3_org.springframework.cloud:spring-cloud-stream;external_dependency} --> + <version>5.0.0</version> <!-- {x-version-update;springboot4_org.springframework.cloud:spring-cloud-stream;external_dependency} --> </dependency> <dependency> @@ -57,14 +57,14 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version><!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version><!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -72,25 +72,25 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> - <version>6.0.1</version> <!-- {x-version-update;springboot3_org.junit.jupiter:junit-jupiter;external_dependency} --> + <version>6.0.1</version> <!-- {x-version-update;springboot4_org.junit.jupiter:junit-jupiter;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-test;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-test;external_dependency} --> <scope>test</scope> </dependency> @@ -100,19 +100,19 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-test;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> - <version>3.27.6</version> <!-- {x-version-update;springboot3_org.assertj:assertj-core;external_dependency} --> + <version>3.27.6</version> <!-- {x-version-update;springboot4_org.assertj:assertj-core;external_dependency} --> <scope>test</scope> </dependency> </dependencies> @@ -122,7 +122,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -165,13 +165,13 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>org.springframework.boot:spring-boot-configuration-processor:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> - <include>org.springframework.cloud:spring-cloud-stream:[4.3.0]</include> <!-- {x-include-update;springboot3_org.springframework.cloud:spring-cloud-stream;external_dependency} --> + <include>org.springframework.boot:spring-boot-configuration-processor:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> + <include>org.springframework.cloud:spring-cloud-stream:[5.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.cloud:spring-cloud-stream;external_dependency} --> </includes> </bannedDependencies> </rules> @@ -180,7 +180,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> diff --git a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/pom.xml b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/pom.xml index 62719981c469..0c5cb0905ba7 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/pom.xml +++ b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/pom.xml @@ -56,7 +56,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-actuator;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-actuator;external_dependency} --> <optional>true</optional> </dependency> <!-- Added this dependency to include necessary annotations used by reactor core. @@ -65,14 +65,14 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-stream-test-binder</artifactId> - <version>4.3.0</version> <!-- {x-version-update;springboot3_org.springframework.cloud:spring-cloud-stream-test-binder;external_dependency} --> + <version>5.0.0</version> <!-- {x-version-update;springboot4_org.springframework.cloud:spring-cloud-stream-test-binder;external_dependency} --> <scope>test</scope> <exclusions> <exclusion> @@ -84,7 +84,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-test;external_dependency} --> <scope>test</scope> </dependency> @@ -92,7 +92,7 @@ <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version> <!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version> <!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -100,13 +100,13 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> </dependencies> @@ -116,7 +116,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -150,12 +150,12 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>org.springframework.boot:spring-boot-starter-actuator:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-starter-actuator;external_dependency} --> + <include>org.springframework.boot:spring-boot-starter-actuator:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-starter-actuator;external_dependency} --> </includes> </bannedDependencies> </rules> @@ -164,7 +164,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> diff --git a/sdk/spring/spring-cloud-azure-testcontainers/pom.xml b/sdk/spring/spring-cloud-azure-testcontainers/pom.xml index 7b320ee3eab3..3bd93fa39c83 100644 --- a/sdk/spring/spring-cloud-azure-testcontainers/pom.xml +++ b/sdk/spring/spring-cloud-azure-testcontainers/pom.xml @@ -82,12 +82,12 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-testcontainers</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-testcontainers;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-testcontainers;external_dependency} --> </dependency> <dependency> <groupId>org.testcontainers</groupId> <artifactId>azure</artifactId> - <version>1.21.3</version> <!-- {x-version-update;springboot3_org.testcontainers:azure;external_dependency} --> + <version>1.21.3</version> <!-- {x-version-update;springboot4_org.testcontainers:azure;external_dependency} --> <optional>true</optional> </dependency> <!-- Added this dependency to include necessary annotations used by reactor core. @@ -96,32 +96,32 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-test;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-test;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> - <version>6.0.1</version> <!-- {x-version-update;springboot3_org.junit.jupiter:junit-jupiter;external_dependency} --> + <version>6.0.1</version> <!-- {x-version-update;springboot4_org.junit.jupiter:junit-jupiter;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> - <version>3.27.6</version> <!-- {x-version-update;springboot3_org.assertj:assertj-core;external_dependency} --> + <version>3.27.6</version> <!-- {x-version-update;springboot4_org.assertj:assertj-core;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.testcontainers</groupId> <artifactId>junit-jupiter</artifactId> - <version>1.21.3</version> <!-- {x-version-update;springboot3_org.testcontainers:junit-jupiter;external_dependency} --> + <version>1.21.3</version> <!-- {x-version-update;springboot4_org.testcontainers:junit-jupiter;external_dependency} --> <scope>test</scope> </dependency> </dependencies> @@ -131,7 +131,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -162,13 +162,13 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>org.springframework.boot:spring-boot-testcontainers:[4.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-testcontainers;external_dependency} --> - <include>org.testcontainers:azure:[1.21.3]</include> <!-- {x-include-update;springboot3_org.testcontainers:azure;external_dependency} --> + <include>org.springframework.boot:spring-boot-testcontainers:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-testcontainers;external_dependency} --> + <include>org.testcontainers:azure:[1.21.3]</include> <!-- {x-include-update;springboot4_org.testcontainers:azure;external_dependency} --> </includes> </bannedDependencies> </rules> @@ -177,7 +177,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> @@ -222,7 +222,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.2.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> + <version>3.2.0</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-antrun-plugin;external_dependency} --> <executions> <execution> <id>copy-readme-to-javadocTemp-and-sourceTemp</id> diff --git a/sdk/spring/spring-integration-azure-core/pom.xml b/sdk/spring/spring-integration-azure-core/pom.xml index 4deec95bd658..d7b953e34cc8 100644 --- a/sdk/spring/spring-integration-azure-core/pom.xml +++ b/sdk/spring/spring-integration-azure-core/pom.xml @@ -48,7 +48,7 @@ <dependency> <groupId>org.springframework.integration</groupId> <artifactId>spring-integration-core</artifactId> - <version>7.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.integration:spring-integration-core;external_dependency} --> + <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.integration:spring-integration-core;external_dependency} --> </dependency> <!-- Added this dependency to include necessary annotations used by reactor core. Without this dependency, javadoc throws a warning as it cannot find enum When.MAYBE @@ -56,14 +56,14 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version> <!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version> <!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -71,31 +71,31 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-test;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-test;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> - <version>6.0.1</version> <!-- {x-version-update;springboot3_org.junit.jupiter:junit-jupiter;external_dependency} --> + <version>6.0.1</version> <!-- {x-version-update;springboot4_org.junit.jupiter:junit-jupiter;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> - <version>3.27.6</version> <!-- {x-version-update;springboot3_org.assertj:assertj-core;external_dependency} --> + <version>3.27.6</version> <!-- {x-version-update;springboot4_org.assertj:assertj-core;external_dependency} --> <scope>test</scope> </dependency> </dependencies> @@ -105,7 +105,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -136,12 +136,12 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>org.springframework.integration:spring-integration-core:[7.0.0-RC2]</include> <!-- {x-include-update;springboot3_org.springframework.integration:spring-integration-core;external_dependency} --> + <include>org.springframework.integration:spring-integration-core:[7.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.integration:spring-integration-core;external_dependency} --> </includes> </bannedDependencies> </rules> @@ -150,7 +150,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <executions> <execution> <goals> diff --git a/sdk/spring/spring-integration-azure-eventhubs/pom.xml b/sdk/spring/spring-integration-azure-eventhubs/pom.xml index e3723b641388..ea72e6442e8a 100644 --- a/sdk/spring/spring-integration-azure-eventhubs/pom.xml +++ b/sdk/spring/spring-integration-azure-eventhubs/pom.xml @@ -61,13 +61,13 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version> <!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version> <!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -75,31 +75,31 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-test;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-test;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> - <version>3.27.6</version> <!-- {x-version-update;springboot3_org.assertj:assertj-core;external_dependency} --> + <version>3.27.6</version> <!-- {x-version-update;springboot4_org.assertj:assertj-core;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> - <version>6.0.1</version> <!-- {x-version-update;springboot3_org.junit.jupiter:junit-jupiter;external_dependency} --> + <version>6.0.1</version> <!-- {x-version-update;springboot4_org.junit.jupiter:junit-jupiter;external_dependency} --> <scope>test</scope> </dependency> </dependencies> @@ -109,7 +109,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -140,7 +140,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> diff --git a/sdk/spring/spring-integration-azure-servicebus/pom.xml b/sdk/spring/spring-integration-azure-servicebus/pom.xml index 36e822f69987..c292f38dd432 100644 --- a/sdk/spring/spring-integration-azure-servicebus/pom.xml +++ b/sdk/spring/spring-integration-azure-servicebus/pom.xml @@ -54,7 +54,7 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> <dependency> @@ -66,7 +66,7 @@ <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version> <!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version> <!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -74,31 +74,31 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> - <version>6.0.1</version> <!-- {x-version-update;springboot3_org.junit.jupiter:junit-jupiter;external_dependency} --> + <version>6.0.1</version> <!-- {x-version-update;springboot4_org.junit.jupiter:junit-jupiter;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-test;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-test;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> - <version>3.27.6</version> <!-- {x-version-update;springboot3_org.assertj:assertj-core;external_dependency} --> + <version>3.27.6</version> <!-- {x-version-update;springboot4_org.assertj:assertj-core;external_dependency} --> <scope>test</scope> </dependency> </dependencies> @@ -108,7 +108,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -139,7 +139,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> diff --git a/sdk/spring/spring-integration-azure-storage-queue/pom.xml b/sdk/spring/spring-integration-azure-storage-queue/pom.xml index ce7a67c5b4cb..a567ce9692bf 100644 --- a/sdk/spring/spring-integration-azure-storage-queue/pom.xml +++ b/sdk/spring/spring-integration-azure-storage-queue/pom.xml @@ -56,14 +56,14 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version> <!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version> <!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -71,19 +71,19 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> - <version>6.0.1</version> <!-- {x-version-update;springboot3_org.junit.jupiter:junit-jupiter;external_dependency} --> + <version>6.0.1</version> <!-- {x-version-update;springboot4_org.junit.jupiter:junit-jupiter;external_dependency} --> <scope>test</scope> </dependency> </dependencies> @@ -93,7 +93,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -124,7 +124,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> diff --git a/sdk/spring/spring-messaging-azure-eventhubs/pom.xml b/sdk/spring/spring-messaging-azure-eventhubs/pom.xml index 276ec4a2a744..dea3b8f2aa06 100644 --- a/sdk/spring/spring-messaging-azure-eventhubs/pom.xml +++ b/sdk/spring/spring-messaging-azure-eventhubs/pom.xml @@ -59,19 +59,19 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-tx;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-tx;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.retry</groupId> <artifactId>spring-retry</artifactId> - <version>2.0.12</version> <!-- {x-version-update;springboot3_org.springframework.retry:spring-retry;external_dependency} --> + <version>2.0.12</version> <!-- {x-version-update;springboot4_org.springframework.retry:spring-retry;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-commons</artifactId> - <version>3.5.3</version> <!-- {x-version-update;springboot3_org.springframework.data:spring-data-commons;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.data:spring-data-commons;external_dependency} --> <exclusions> <exclusion> <groupId>org.slf4j</groupId> @@ -83,27 +83,27 @@ <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-core</artifactId> - <version>1.15.3</version> <!-- {x-version-update;springboot3_io.micrometer:micrometer-core;external_dependency} --> + <version>1.16.0</version> <!-- {x-version-update;springboot4_io.micrometer:micrometer-core;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-test;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-test;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version> <!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version> <!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -111,25 +111,25 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> - <version>6.0.1</version> <!-- {x-version-update;springboot3_org.junit.jupiter:junit-jupiter;external_dependency} --> + <version>6.0.1</version> <!-- {x-version-update;springboot4_org.junit.jupiter:junit-jupiter;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>io.projectreactor</groupId> <artifactId>reactor-test</artifactId> - <version>3.8.0-RC1</version> <!-- {x-version-update;springboot3_io.projectreactor:reactor-test;external_dependency} --> + <version>3.8.0</version> <!-- {x-version-update;springboot4_io.projectreactor:reactor-test;external_dependency} --> <scope>test</scope> </dependency> </dependencies> @@ -138,7 +138,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -169,15 +169,15 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>io.micrometer:micrometer-core:[1.15.3]</include> <!-- {x-include-update;springboot3_io.micrometer:micrometer-core;external_dependency} --> - <include>org.springframework:spring-tx:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework:spring-tx;external_dependency} --> - <include>org.springframework.retry:spring-retry:[2.0.12]</include> <!-- {x-include-update;springboot3_org.springframework.retry:spring-retry;external_dependency} --> - <include>org.springframework.data:spring-data-commons:[3.5.3]</include> <!-- {x-include-update;springboot3_org.springframework.data:spring-data-commons;external_dependency} --> + <include>io.micrometer:micrometer-core:[1.16.0]</include> <!-- {x-include-update;springboot4_io.micrometer:micrometer-core;external_dependency} --> + <include>org.springframework:spring-tx:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-tx;external_dependency} --> + <include>org.springframework.retry:spring-retry:[2.0.12]</include> <!-- {x-include-update;springboot4_org.springframework.retry:spring-retry;external_dependency} --> + <include>org.springframework.data:spring-data-commons:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.data:spring-data-commons;external_dependency} --> </includes> </bannedDependencies> </rules> @@ -186,7 +186,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> diff --git a/sdk/spring/spring-messaging-azure-servicebus/pom.xml b/sdk/spring/spring-messaging-azure-servicebus/pom.xml index bad93272f541..5a8f53418b9a 100644 --- a/sdk/spring/spring-messaging-azure-servicebus/pom.xml +++ b/sdk/spring/spring-messaging-azure-servicebus/pom.xml @@ -52,19 +52,19 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-tx;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-tx;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.retry</groupId> <artifactId>spring-retry</artifactId> - <version>2.0.12</version> <!-- {x-version-update;springboot3_org.springframework.retry:spring-retry;external_dependency} --> + <version>2.0.12</version> <!-- {x-version-update;springboot4_org.springframework.retry:spring-retry;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-commons</artifactId> - <version>3.5.3</version> <!-- {x-version-update;springboot3_org.springframework.data:spring-data-commons;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.data:spring-data-commons;external_dependency} --> <exclusions> <exclusion> <groupId>org.slf4j</groupId> @@ -76,13 +76,13 @@ <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-core</artifactId> - <version>1.15.3</version> <!-- {x-version-update;springboot3_io.micrometer:micrometer-core;external_dependency} --> + <version>1.16.0</version> <!-- {x-version-update;springboot4_io.micrometer:micrometer-core;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version> <!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version> <!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -90,25 +90,25 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> - <version>6.0.1</version> <!-- {x-version-update;springboot3_org.junit.jupiter:junit-jupiter;external_dependency} --> + <version>6.0.1</version> <!-- {x-version-update;springboot4_org.junit.jupiter:junit-jupiter;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> <dependency> @@ -123,7 +123,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -154,15 +154,15 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>io.micrometer:micrometer-core:[1.15.3]</include> <!-- {x-include-update;springboot3_io.micrometer:micrometer-core;external_dependency} --> - <include>org.springframework:spring-tx:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework:spring-tx;external_dependency} --> - <include>org.springframework.retry:spring-retry:[2.0.12]</include> <!-- {x-include-update;springboot3_org.springframework.retry:spring-retry;external_dependency} --> - <include>org.springframework.data:spring-data-commons:[3.5.3]</include> <!-- {x-include-update;springboot3_org.springframework.data:spring-data-commons;external_dependency} --> + <include>io.micrometer:micrometer-core:[1.16.0]</include> <!-- {x-include-update;springboot4_io.micrometer:micrometer-core;external_dependency} --> + <include>org.springframework:spring-tx:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-tx;external_dependency} --> + <include>org.springframework.retry:spring-retry:[2.0.12]</include> <!-- {x-include-update;springboot4_org.springframework.retry:spring-retry;external_dependency} --> + <include>org.springframework.data:spring-data-commons:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.data:spring-data-commons;external_dependency} --> </includes> </bannedDependencies> </rules> @@ -171,7 +171,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <executions> <execution> <goals> diff --git a/sdk/spring/spring-messaging-azure-storage-queue/pom.xml b/sdk/spring/spring-messaging-azure-storage-queue/pom.xml index e19d826595f9..5feaaf02fd9a 100644 --- a/sdk/spring/spring-messaging-azure-storage-queue/pom.xml +++ b/sdk/spring/spring-messaging-azure-storage-queue/pom.xml @@ -52,7 +52,7 @@ <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version> <!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version> <!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -60,31 +60,31 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> - <version>6.0.1</version> <!-- {x-version-update;springboot3_org.junit.jupiter:junit-jupiter;external_dependency} --> + <version>6.0.1</version> <!-- {x-version-update;springboot4_org.junit.jupiter:junit-jupiter;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-test;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> <dependency> @@ -100,7 +100,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -131,7 +131,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <configuration> <archive> <manifestEntries> diff --git a/sdk/spring/spring-messaging-azure/pom.xml b/sdk/spring/spring-messaging-azure/pom.xml index 1f55d805bd41..6c74d444589b 100644 --- a/sdk/spring/spring-messaging-azure/pom.xml +++ b/sdk/spring/spring-messaging-azure/pom.xml @@ -46,24 +46,24 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-messaging</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-messaging;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-messaging;external_dependency} --> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> - <version>7.0.0-RC3</version> <!-- {x-version-update;springboot3_org.springframework:spring-tx;external_dependency} --> + <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-tx;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.retry</groupId> <artifactId>spring-retry</artifactId> - <version>2.0.12</version> <!-- {x-version-update;springboot3_org.springframework.retry:spring-retry;external_dependency} --> + <version>2.0.12</version> <!-- {x-version-update;springboot4_org.springframework.retry:spring-retry;external_dependency} --> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-commons</artifactId> - <version>3.5.3</version> <!-- {x-version-update;springboot3_org.springframework.data:spring-data-commons;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.data:spring-data-commons;external_dependency} --> <exclusions> <exclusion> <groupId>org.slf4j</groupId> @@ -75,7 +75,7 @@ <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-core</artifactId> - <version>1.15.3</version> <!-- {x-version-update;springboot3_io.micrometer:micrometer-core;external_dependency} --> + <version>1.16.0</version> <!-- {x-version-update;springboot4_io.micrometer:micrometer-core;external_dependency} --> <optional>true</optional> </dependency> <!-- Added this dependency to include necessary annotations used by reactor core. @@ -84,7 +84,7 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> - <version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} --> + <version>3.0.2</version> <!-- {x-version-update;springboot4_com.google.code.findbugs:jsr305;external_dependency} --> <scope>provided</scope> </dependency> @@ -92,14 +92,14 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> - <version>4.0.0-RC2</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-starter-test;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-starter-test;external_dependency} --> <scope>test</scope> </dependency> <!-- Add mockito-core 4.11.0 to work with Java 21 --> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>5.20.0</version> <!-- {x-version-update;springboot3_org.mockito:mockito-core;external_dependency} --> + <version>5.20.0</version> <!-- {x-version-update;springboot4_org.mockito:mockito-core;external_dependency} --> <scope>test</scope> </dependency> <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release --> @@ -107,13 +107,13 @@ <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy;external_dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy-agent</artifactId> - <version>1.17.8</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> + <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> </dependencies> @@ -123,7 +123,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> + <version>3.14.1</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} --> <executions> <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) --> <execution> @@ -154,16 +154,16 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.6.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> + <version>3.6.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} --> <configuration> <rules> <bannedDependencies> <includes> - <include>io.micrometer:micrometer-core:[1.15.3]</include> <!-- {x-include-update;springboot3_io.micrometer:micrometer-core;external_dependency} --> - <include>org.springframework.data:spring-data-commons:[3.5.3]</include> <!-- {x-include-update;springboot3_org.springframework.data:spring-data-commons;external_dependency} --> - <include>org.springframework:spring-messaging:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework:spring-messaging;external_dependency} --> - <include>org.springframework:spring-tx:[7.0.0-RC3]</include> <!-- {x-include-update;springboot3_org.springframework:spring-tx;external_dependency} --> - <include>org.springframework.retry:spring-retry:[2.0.12]</include> <!-- {x-include-update;springboot3_org.springframework.retry:spring-retry;external_dependency} --> + <include>io.micrometer:micrometer-core:[1.16.0]</include> <!-- {x-include-update;springboot4_io.micrometer:micrometer-core;external_dependency} --> + <include>org.springframework.data:spring-data-commons:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.data:spring-data-commons;external_dependency} --> + <include>org.springframework:spring-messaging:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-messaging;external_dependency} --> + <include>org.springframework:spring-tx:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-tx;external_dependency} --> + <include>org.springframework.retry:spring-retry:[2.0.12]</include> <!-- {x-include-update;springboot4_org.springframework.retry:spring-retry;external_dependency} --> </includes> </bannedDependencies> </rules> @@ -172,7 +172,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> + <version>3.4.2</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-jar-plugin;external_dependency} --> <executions> <execution> <goals> From f7756757ce06b7cfddaf327c7d3ceaf7db12ae4f Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Fri, 28 Nov 2025 15:01:51 +0800 Subject: [PATCH 061/186] replace org.springframework.data.util.TypeInformation with org.springframework.data.core.TypeInformation --- .../data/cosmos/core/mapping/BasicCosmosPersistentEntity.java | 2 +- .../spring/data/cosmos/core/mapping/CosmosMappingContext.java | 2 +- .../spring/data/cosmos/repository/query/CosmosParameter.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntity.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntity.java index 7655f85d1b96..1ba5ad75d8ec 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntity.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntity.java @@ -9,7 +9,7 @@ import org.springframework.context.expression.BeanFactoryAccessor; import org.springframework.context.expression.BeanFactoryResolver; import org.springframework.data.mapping.model.BasicPersistentEntity; -import org.springframework.data.util.TypeInformation; +import org.springframework.data.core.TypeInformation; import org.springframework.expression.spel.support.StandardEvaluationContext; /** diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/CosmosMappingContext.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/CosmosMappingContext.java index 37ff147eaff1..4370def19cf5 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/CosmosMappingContext.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/CosmosMappingContext.java @@ -7,7 +7,7 @@ import org.springframework.data.mapping.context.AbstractMappingContext; import org.springframework.data.mapping.model.Property; import org.springframework.data.mapping.model.SimpleTypeHolder; -import org.springframework.data.util.TypeInformation; +import org.springframework.data.core.TypeInformation; /** * Class to build mapping metadata and thus create instances of {@link BasicCosmosPersistentEntity} and diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosParameter.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosParameter.java index 5bbc3ca93ed5..52fbc0f05794 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosParameter.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosParameter.java @@ -4,7 +4,7 @@ import org.springframework.core.MethodParameter; import org.springframework.data.repository.query.Parameter; -import org.springframework.data.util.TypeInformation; +import org.springframework.data.core.TypeInformation; /** * A single cosmos parameter of a query method. From ec36cf04609f664ca6ede2fcfcffc09e78c72169 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Fri, 28 Nov 2025 15:02:44 +0800 Subject: [PATCH 062/186] replace with ParametersSource.of() --- .../spring/data/cosmos/repository/query/CosmosParameters.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosParameters.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosParameters.java index a489c30d77b2..015ebe6dc2f0 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosParameters.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/query/CosmosParameters.java @@ -3,6 +3,7 @@ package com.azure.spring.data.cosmos.repository.query; import org.springframework.data.repository.query.Parameters; +import org.springframework.data.repository.query.ParametersSource; import java.lang.reflect.Method; import java.util.List; @@ -17,9 +18,8 @@ public class CosmosParameters extends Parameters<CosmosParameters, CosmosParamet * * @param method must not be {@literal null}. */ - @SuppressWarnings("removal") public CosmosParameters(Method method) { - super(method, CosmosParameter::new); + super(ParametersSource.of(method), CosmosParameter::new); } private CosmosParameters(List<CosmosParameter> parameters) { From 31fc7b134b03eb7e0ef9c593d9113649704064c2 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Fri, 28 Nov 2025 15:18:21 +0800 Subject: [PATCH 063/186] replace QueryMethodEvaluationContextProvider with ValueExpressionDelegate --- .../repository/support/CosmosRepositoryFactory.java | 10 ++++------ .../support/ReactiveCosmosRepositoryFactory.java | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactory.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactory.java index 214fe3bff377..547a3bb232e4 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactory.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactory.java @@ -14,6 +14,7 @@ import org.springframework.data.repository.core.support.RepositoryFactorySupport; import org.springframework.data.repository.query.QueryLookupStrategy; import org.springframework.data.repository.query.RepositoryQuery; +import org.springframework.data.repository.query.ValueExpressionDelegate; import org.springframework.util.Assert; import java.io.Serializable; @@ -53,18 +54,15 @@ public <T, ID> EntityInformation<T, ID> getEntityInformation(Class<T> domainType } @Override - @SuppressWarnings({"deprecation", "removal"}) protected Optional<QueryLookupStrategy> getQueryLookupStrategy(QueryLookupStrategy.Key key, - org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider) { - return Optional.of(new CosmosDbQueryLookupStrategy(cosmosOperations, evaluationContextProvider)); + ValueExpressionDelegate valueExpressionDelegate) { + return Optional.of(new CosmosDbQueryLookupStrategy(cosmosOperations, valueExpressionDelegate)); } - @SuppressWarnings({"deprecation", "removal"}) private static class CosmosDbQueryLookupStrategy implements QueryLookupStrategy { private final CosmosOperations dbOperations; - CosmosDbQueryLookupStrategy(CosmosOperations operations, - org.springframework.data.repository.query.QueryMethodEvaluationContextProvider provider) { + CosmosDbQueryLookupStrategy(CosmosOperations operations, ValueExpressionDelegate delegate) { this.dbOperations = operations; } diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactory.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactory.java index fea259c60194..0a0626209e55 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactory.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactory.java @@ -13,6 +13,7 @@ import org.springframework.data.repository.core.support.ReactiveRepositoryFactorySupport; import org.springframework.data.repository.query.QueryLookupStrategy; import org.springframework.data.repository.query.RepositoryQuery; +import org.springframework.data.repository.query.ValueExpressionDelegate; import org.springframework.util.Assert; import java.io.Serializable; @@ -53,19 +54,16 @@ protected Class<?> getRepositoryBaseClass(RepositoryMetadata metadata) { } @Override - @SuppressWarnings({"deprecation", "removal"}) protected Optional<QueryLookupStrategy> getQueryLookupStrategy(QueryLookupStrategy.Key key, - org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider) { + ValueExpressionDelegate valueExpressionDelegate) { return Optional.of(new ReactiveCosmosQueryLookupStrategy(cosmosOperations, - evaluationContextProvider)); + valueExpressionDelegate)); } - @SuppressWarnings({"deprecation", "removal"}) private static class ReactiveCosmosQueryLookupStrategy implements QueryLookupStrategy { private final ReactiveCosmosOperations cosmosOperations; - ReactiveCosmosQueryLookupStrategy(ReactiveCosmosOperations operations, - org.springframework.data.repository.query.QueryMethodEvaluationContextProvider provider) { + ReactiveCosmosQueryLookupStrategy(ReactiveCosmosOperations operations, ValueExpressionDelegate delegate) { this.cosmosOperations = operations; } From 20376f189411a1318dbed277227b963a8372ac1d Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Fri, 28 Nov 2025 15:48:44 +0800 Subject: [PATCH 064/186] replace ClassTypeInformation.from with TypeInformation.of --- .../core/mapping/BasicCosmosPersistentEntityUnitTest.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntityUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntityUnitTest.java index 59d3e5c6a7f6..7ae7ed2c90f9 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntityUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntityUnitTest.java @@ -5,25 +5,23 @@ import com.azure.spring.data.cosmos.domain.Person; import org.junit.Test; -import org.springframework.data.util.ClassTypeInformation; +import org.springframework.data.core.TypeInformation; import static org.assertj.core.api.Assertions.assertThat; public class BasicCosmosPersistentEntityUnitTest { - @SuppressWarnings({"deprecation", "removal"}) @Test public void testGetCollection() { final BasicCosmosPersistentEntity<Person> entity = new BasicCosmosPersistentEntity<Person>( - ClassTypeInformation.from(Person.class)); + TypeInformation.of(Person.class)); assertThat(entity.getContainer()).isEqualTo(""); } - @SuppressWarnings({"deprecation", "removal"}) @Test public void testGetLanguage() { final BasicCosmosPersistentEntity<Person> entity = new BasicCosmosPersistentEntity<Person>( - ClassTypeInformation.from(Person.class)); + TypeInformation.of(Person.class)); assertThat(entity.getLanguage()).isEqualTo(""); } From 0366061537dd7163a10b7d282b5a8d7571edc4c1 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Fri, 28 Nov 2025 15:49:24 +0800 Subject: [PATCH 065/186] suppress warning --- .../data/cosmos/repository/support/CosmosRepositoryFactory.java | 1 + .../repository/support/ReactiveCosmosRepositoryFactory.java | 1 + 2 files changed, 2 insertions(+) diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactory.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactory.java index 547a3bb232e4..66b4193fecab 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactory.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactory.java @@ -49,6 +49,7 @@ protected Object getTargetRepository(RepositoryInformation information) { } @Override + @SuppressWarnings("deprecation") public <T, ID> EntityInformation<T, ID> getEntityInformation(Class<T> domainType) { return new CosmosEntityInformation<>(domainType); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactory.java b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactory.java index 0a0626209e55..7cacb7d39c4a 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactory.java +++ b/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/ReactiveCosmosRepositoryFactory.java @@ -37,6 +37,7 @@ public ReactiveCosmosRepositoryFactory(ReactiveCosmosOperations cosmosOperations } @Override + @SuppressWarnings("deprecation") public <T, ID> EntityInformation<T, ID> getEntityInformation(Class<T> domainType) { return new CosmosEntityInformation<>(domainType); } From a39db5a96387dd946e4ba07702c442fe87ca1126 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Fri, 28 Nov 2025 16:11:19 +0800 Subject: [PATCH 066/186] update comments --- sdk/spring/azure-spring-data-cosmos/pom.xml | 1 + sdk/spring/pom.xml | 23 ----------- ...BearerGrantRequestParametersConverter.java | 19 +++------ .../core/handler/DefaultMessageHandler.java | 40 +++++++++---------- 4 files changed, 25 insertions(+), 58 deletions(-) diff --git a/sdk/spring/azure-spring-data-cosmos/pom.xml b/sdk/spring/azure-spring-data-cosmos/pom.xml index 04a751e7852c..f85d1775f3ef 100644 --- a/sdk/spring/azure-spring-data-cosmos/pom.xml +++ b/sdk/spring/azure-spring-data-cosmos/pom.xml @@ -101,6 +101,7 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-persistence</artifactId> <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-persistence;external_dependency} --> + <scope>test</scope> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/spring/pom.xml b/sdk/spring/pom.xml index 59df68d9ae92..005b5bc5c160 100644 --- a/sdk/spring/pom.xml +++ b/sdk/spring/pom.xml @@ -8,29 +8,6 @@ <packaging>pom</packaging> <version>1.0.0</version><!-- Need not change for every release--> - <!-- Repositories for milestone and snapshot releases --> - <repositories> - <repository> - <id>spring-milestones</id> - <name>Spring Milestones</name> - <url>https://repo.spring.io/milestone</url> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> - - <pluginRepositories> - <pluginRepository> - <id>spring-milestones</id> - <name>Spring Milestones</name> - <url>https://repo.spring.io/milestone</url> - <snapshots> - <enabled>false</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - <profiles> <profile> <id>default</id> diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestParametersConverter.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestParametersConverter.java index 3b366b550c18..4550d3ef017a 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestParametersConverter.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestParametersConverter.java @@ -4,6 +4,7 @@ package com.azure.spring.cloud.autoconfigure.implementation.aad.security; import org.springframework.core.convert.converter.Converter; +import org.springframework.security.oauth2.client.endpoint.DefaultOAuth2TokenRequestParametersConverter; import org.springframework.security.oauth2.client.endpoint.JwtBearerGrantRequest; import org.springframework.security.oauth2.client.registration.ClientRegistration; import org.springframework.security.oauth2.core.ClientAuthenticationMethod; @@ -16,26 +17,18 @@ /** * This is a special JWT Bearer flow implementation for Microsoft identify platform. * - * @since 4.3.0 + * @since 7.0.0 * @see <a href="https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow">OAuth 2.0 On-Behalf-Of</a> */ public class AadJwtBearerGrantRequestParametersConverter implements Converter<JwtBearerGrantRequest, MultiValueMap<String, String>> { + private final DefaultOAuth2TokenRequestParametersConverter<JwtBearerGrantRequest> delegate = + new DefaultOAuth2TokenRequestParametersConverter<>(); + @Override public MultiValueMap<String, String> convert(JwtBearerGrantRequest jwtBearerGrantRequest) { - ClientRegistration clientRegistration = jwtBearerGrantRequest.getClientRegistration(); - MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>(); - parameters.add(OAuth2ParameterNames.GRANT_TYPE, jwtBearerGrantRequest.getGrantType().getValue()); - parameters.add(OAuth2ParameterNames.ASSERTION, jwtBearerGrantRequest.getJwt().getTokenValue()); - if (!CollectionUtils.isEmpty(clientRegistration.getScopes())) { - parameters.add(OAuth2ParameterNames.SCOPE, - StringUtils.collectionToDelimitedString(clientRegistration.getScopes(), " ")); - } - if (ClientAuthenticationMethod.CLIENT_SECRET_POST.equals(clientRegistration.getClientAuthenticationMethod())) { - parameters.add(OAuth2ParameterNames.CLIENT_ID, clientRegistration.getClientId()); - parameters.add(OAuth2ParameterNames.CLIENT_SECRET, clientRegistration.getClientSecret()); - } + MultiValueMap<String, String> parameters = delegate.convert(jwtBearerGrantRequest); parameters.add("requested_token_use", "on_behalf_of"); return parameters; } diff --git a/sdk/spring/spring-integration-azure-core/src/main/java/com/azure/spring/integration/core/handler/DefaultMessageHandler.java b/sdk/spring/spring-integration-azure-core/src/main/java/com/azure/spring/integration/core/handler/DefaultMessageHandler.java index cd772b49a577..bbe3dad3a05e 100644 --- a/sdk/spring/spring-integration-azure-core/src/main/java/com/azure/spring/integration/core/handler/DefaultMessageHandler.java +++ b/sdk/spring/spring-integration-azure-core/src/main/java/com/azure/spring/integration/core/handler/DefaultMessageHandler.java @@ -31,7 +31,6 @@ import java.util.HashMap; import java.util.Map; import java.util.Optional; -import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeoutException; import java.util.function.BiConsumer; @@ -110,29 +109,26 @@ protected void handleMessageInternal(Message<?> message) { } private <T> void handleSendResponseAsync(Mono<T> mono, Message<?> message) { - CompletableFuture<T> future = mono.toFuture(); - future.whenComplete((t, ex) -> { - if (ex != null) { - if (LOGGER.isWarnEnabled()) { - LOGGER.warn("{} sent failed in async mode due to {}", message, ex.getMessage()); - } - if (this.sendCallback != null) { - this.sendCallback.accept(null, ex); - } + mono.doOnError(ex -> { + if (LOGGER.isWarnEnabled()) { + LOGGER.warn("{} sent failed in async mode due to {}", message, ex.getMessage()); + } + if (this.sendCallback != null) { + this.sendCallback.accept(null, ex); + } - if (getSendFailureChannel() != null) { - this.messagingTemplate.send(getSendFailureChannel(), getErrorMessageStrategy() - .buildErrorMessage(new AzureSendFailureException(message, ex), null)); - } - } else { - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("{} sent successfully in async mode", message); - } - if (this.sendCallback != null) { - this.sendCallback.accept(null, null); - } + if (getSendFailureChannel() != null) { + this.messagingTemplate.send(getSendFailureChannel(), getErrorMessageStrategy() + .buildErrorMessage(new AzureSendFailureException(message, ex), null)); + } + }).doOnSuccess(t -> { + if (LOGGER.isDebugEnabled()) { + LOGGER.debug("{} sent successfully in async mode", message); + } + if (this.sendCallback != null) { + this.sendCallback.accept(null, null); } - }); + }).subscribe(); } private <T> void waitingSendResponse(Mono<T> mono, Message<?> message) { From dff3b00932f094507cac281021fba616b6df4e56 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 28 Nov 2025 05:46:19 -0800 Subject: [PATCH 067/186] [AutoPR azure-resourcemanager-netapp]-generated-from-SDK Generation - Java-5613015 (#47390) * Configurations: 'specification/netapp/resource-manager/Microsoft.NetApp/NetApp/tspconfig.yaml', API Version: 2025-09-01-preview, SDK Release Type: beta, and CommitSHA: 'c3c93e9102521197fffb02498222aa1c2375d69a' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5613015 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. * Configurations: 'specification/netapp/resource-manager/Microsoft.NetApp/NetApp/tspconfig.yaml', API Version: 2025-09-01-preview, SDK Release Type: beta, and CommitSHA: '97241c594f16e0915407b7dc85377e4e3b26b0b9' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5618140 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../azure-resourcemanager-netapp/CHANGELOG.md | 449 ++- .../azure-resourcemanager-netapp/README.md | 4 +- .../azure-resourcemanager-netapp/SAMPLE.md | 2518 +++++++++++++++-- .../azure-resourcemanager-netapp/pom.xml | 3 +- .../netapp/NetAppFilesManager.java | 194 ++ .../fluent/ActiveDirectoryConfigsClient.java | 272 ++ .../netapp/fluent/BucketsClient.java | 360 +++ .../netapp/fluent/CachesClient.java | 390 +++ .../netapp/fluent/ElasticAccountsClient.java | 269 ++ .../fluent/ElasticBackupPoliciesClient.java | 269 ++ .../fluent/ElasticBackupVaultsClient.java | 269 ++ .../netapp/fluent/ElasticBackupsClient.java | 284 ++ .../fluent/ElasticCapacityPoolsClient.java | 370 +++ .../fluent/ElasticSnapshotPoliciesClient.java | 301 ++ .../netapp/fluent/ElasticSnapshotsClient.java | 229 ++ .../netapp/fluent/ElasticVolumesClient.java | 355 +++ .../netapp/fluent/NetAppManagementClient.java | 84 + .../fluent/RansomwareReportsClient.java | 197 ++ .../netapp/fluent/VolumesClient.java | 67 + .../fluent/models/AccountProperties.java | 32 + .../models/ActiveDirectoryConfigInner.java | 245 ++ .../BucketGenerateCredentialsInner.java | 117 + .../netapp/fluent/models/BucketInner.java | 281 ++ .../fluent/models/BucketPatchProperties.java | 211 ++ .../fluent/models/BucketProperties.java | 240 ++ .../netapp/fluent/models/CacheInner.java | 248 ++ ...sticResourceAvailabilityResponseInner.java | 129 + .../fluent/models/ElasticAccountInner.java | 246 ++ .../fluent/models/ElasticBackupInner.java | 166 ++ .../models/ElasticBackupPolicyInner.java | 214 ++ .../models/ElasticBackupVaultInner.java | 214 ++ .../models/ElasticCapacityPoolInner.java | 244 ++ .../fluent/models/ElasticSnapshotInner.java | 166 ++ .../models/ElasticSnapshotPolicyInner.java | 215 ++ .../fluent/models/ElasticVolumeInner.java | 244 ++ .../models/ListQuotaReportResponseInner.java | 88 + .../fluent/models/NetAppAccountInner.java | 24 + .../models/PeeringPassphrasesInner.java | 135 + .../fluent/models/RansomwareReportInner.java | 160 ++ .../netapp/fluent/models/VolumeInner.java | 120 +- .../fluent/models/VolumePatchProperties.java | 22 +- .../fluent/models/VolumeProperties.java | 153 +- .../ActiveDirectoryConfigImpl.java | 204 ++ .../ActiveDirectoryConfigsClientImpl.java | 1468 ++++++++++ .../ActiveDirectoryConfigsImpl.java | 149 + .../BucketGenerateCredentialsImpl.java | 41 + .../netapp/implementation/BucketImpl.java | 223 ++ .../implementation/BucketsClientImpl.java | 1725 +++++++++++ .../netapp/implementation/BucketsImpl.java | 231 ++ .../netapp/implementation/CacheImpl.java | 229 ++ .../implementation/CachesClientImpl.java | 1857 ++++++++++++ .../netapp/implementation/CachesImpl.java | 226 ++ ...asticResourceAvailabilityResponseImpl.java | 42 + .../implementation/ElasticAccountImpl.java | 202 ++ .../ElasticAccountsClientImpl.java | 1427 ++++++++++ .../implementation/ElasticAccountsImpl.java | 146 + .../implementation/ElasticBackupImpl.java | 135 + .../ElasticBackupPoliciesClientImpl.java | 1323 +++++++++ .../ElasticBackupPoliciesImpl.java | 159 ++ .../ElasticBackupPolicyImpl.java | 192 ++ .../ElasticBackupVaultImpl.java | 186 ++ .../ElasticBackupVaultsClientImpl.java | 1322 +++++++++ .../ElasticBackupVaultsImpl.java | 159 ++ .../ElasticBackupsClientImpl.java | 1420 ++++++++++ .../implementation/ElasticBackupsImpl.java | 183 ++ .../ElasticCapacityPoolImpl.java | 232 ++ .../ElasticCapacityPoolsClientImpl.java | 1760 ++++++++++++ .../ElasticCapacityPoolsImpl.java | 209 ++ .../implementation/ElasticSnapshotImpl.java | 142 + .../ElasticSnapshotPoliciesClientImpl.java | 1635 +++++++++++ .../ElasticSnapshotPoliciesImpl.java | 175 ++ .../ElasticSnapshotPolicyImpl.java | 193 ++ .../ElasticSnapshotsClientImpl.java | 1188 ++++++++ .../implementation/ElasticSnapshotsImpl.java | 205 ++ .../implementation/ElasticVolumeImpl.java | 221 ++ .../ElasticVolumesClientImpl.java | 1710 +++++++++++ .../implementation/ElasticVolumesImpl.java | 204 ++ .../ListQuotaReportResponseImpl.java | 40 + .../implementation/NetAppAccountImpl.java | 15 + .../NetAppManagementClientImpl.java | 194 +- .../PeeringPassphrasesImpl.java | 40 + .../implementation/RansomwareReportImpl.java | 50 + .../RansomwareReportsClientImpl.java | 975 +++++++ .../implementation/RansomwareReportsImpl.java | 87 + .../netapp/implementation/VolumeImpl.java | 49 + .../implementation/VolumesClientImpl.java | 279 ++ .../netapp/implementation/VolumesImpl.java | 24 + .../ActiveDirectoryConfigListResult.java | 115 + .../implementation/models/BucketList.java | 112 + .../implementation/models/CacheList.java | 112 + .../models/ElasticAccountListResult.java | 113 + .../models/ElasticBackupListResult.java | 112 + .../models/ElasticBackupPolicyListResult.java | 115 + .../models/ElasticBackupVaultListResult.java | 114 + .../models/ElasticCapacityPoolListResult.java | 115 + .../models/ElasticSnapshotListResult.java | 114 + .../ElasticSnapshotPolicyListResult.java | 115 + .../ElasticSnapshotPolicyVolumeList.java | 114 + .../models/ElasticVolumeListResult.java | 112 + .../models/RansomwareReportsList.java | 113 + .../netapp/models/ActiveDirectoryConfig.java | 309 ++ .../ActiveDirectoryConfigProperties.java | 416 +++ .../models/ActiveDirectoryConfigUpdate.java | 158 ++ ...ActiveDirectoryConfigUpdateProperties.java | 370 +++ .../netapp/models/ActiveDirectoryConfigs.java | 158 ++ .../ActualRansomwareProtectionState.java | 61 + .../netapp/models/BreakthroughMode.java | 57 + .../resourcemanager/netapp/models/Bucket.java | 353 +++ .../models/BucketCredentialsExpiry.java | 95 + .../models/BucketGenerateCredentials.java | 41 + .../netapp/models/BucketPatch.java | 260 ++ .../netapp/models/BucketPatchPermissions.java | 51 + .../netapp/models/BucketPermissions.java | 52 + .../models/BucketServerPatchProperties.java | 128 + .../netapp/models/BucketServerProperties.java | 180 ++ .../netapp/models/Buckets.java | 201 ++ .../resourcemanager/netapp/models/Cache.java | 343 +++ .../netapp/models/CacheLifeCycleState.java | 66 + .../models/CacheMountTargetProperties.java | 113 + .../netapp/models/CacheProperties.java | 729 +++++ .../netapp/models/CacheProvisioningState.java | 71 + .../netapp/models/CacheUpdate.java | 126 + .../netapp/models/CacheUpdateProperties.java | 314 ++ .../resourcemanager/netapp/models/Caches.java | 216 ++ .../netapp/models/ChangeZoneRequest.java | 101 + ...heckElasticResourceAvailabilityReason.java | 52 + ...ckElasticResourceAvailabilityResponse.java | 45 + ...heckElasticResourceAvailabilityStatus.java | 52 + ...sticVolumeFilePathAvailabilityRequest.java | 108 + .../netapp/models/CifsChangeNotifyState.java | 51 + .../netapp/models/CifsUser.java | 93 + .../netapp/models/CredentialsStatus.java | 60 + .../netapp/models/DayOfWeek.java | 76 + .../DesiredRansomwareProtectionState.java | 51 + .../netapp/models/ElasticAccount.java | 309 ++ .../models/ElasticAccountProperties.java | 113 + .../netapp/models/ElasticAccountUpdate.java | 157 + .../ElasticAccountUpdateProperties.java | 97 + .../netapp/models/ElasticAccounts.java | 158 ++ .../netapp/models/ElasticBackup.java | 191 ++ .../netapp/models/ElasticBackupPolicies.java | 145 + .../netapp/models/ElasticBackupPolicy.java | 276 ++ .../models/ElasticBackupPolicyProperties.java | 216 ++ .../models/ElasticBackupPolicyState.java | 51 + .../models/ElasticBackupPolicyUpdate.java | 127 + .../ElasticBackupPolicyUpdateProperties.java | 183 ++ .../models/ElasticBackupProperties.java | 342 +++ .../netapp/models/ElasticBackupType.java | 51 + .../netapp/models/ElasticBackupVault.java | 263 ++ .../models/ElasticBackupVaultProperties.java | 82 + .../models/ElasticBackupVaultUpdate.java | 95 + .../netapp/models/ElasticBackupVaults.java | 145 + .../netapp/models/ElasticBackups.java | 152 + .../netapp/models/ElasticCapacityPool.java | 347 +++ .../models/ElasticCapacityPoolProperties.java | 305 ++ .../models/ElasticCapacityPoolUpdate.java | 127 + .../ElasticCapacityPoolUpdateProperties.java | 165 ++ .../netapp/models/ElasticCapacityPools.java | 208 ++ .../netapp/models/ElasticEncryption.java | 161 ++ .../ElasticEncryptionConfiguration.java | 143 + .../models/ElasticEncryptionIdentity.java | 115 + .../netapp/models/ElasticExportPolicy.java | 99 + .../models/ElasticExportPolicyRule.java | 250 ++ .../models/ElasticKeyVaultProperties.java | 165 ++ .../netapp/models/ElasticKeyVaultStatus.java | 66 + .../models/ElasticMountTargetProperties.java | 97 + .../netapp/models/ElasticNfsv3Access.java | 51 + .../netapp/models/ElasticNfsv4Access.java | 51 + .../ElasticPoolEncryptionKeySource.java | 51 + .../netapp/models/ElasticProtocolType.java | 56 + .../ElasticResourceAvailabilityStatus.java | 51 + .../netapp/models/ElasticRootAccess.java | 51 + .../netapp/models/ElasticServiceLevel.java | 46 + .../netapp/models/ElasticSmbEncryption.java | 51 + .../models/ElasticSmbPatchProperties.java | 97 + .../netapp/models/ElasticSmbProperties.java | 97 + .../netapp/models/ElasticSnapshot.java | 192 ++ .../models/ElasticSnapshotPolicies.java | 174 ++ .../netapp/models/ElasticSnapshotPolicy.java | 276 ++ .../ElasticSnapshotPolicyDailySchedule.java | 151 + .../ElasticSnapshotPolicyHourlySchedule.java | 124 + .../ElasticSnapshotPolicyMonthlySchedule.java | 184 ++ .../ElasticSnapshotPolicyProperties.java | 242 ++ .../models/ElasticSnapshotPolicyUpdate.java | 127 + ...ElasticSnapshotPolicyUpdateProperties.java | 229 ++ .../ElasticSnapshotPolicyWeeklySchedule.java | 185 ++ .../models/ElasticSnapshotProperties.java | 82 + .../netapp/models/ElasticSnapshots.java | 160 ++ .../netapp/models/ElasticUnixAccessRule.java | 56 + .../netapp/models/ElasticVolume.java | 322 +++ .../models/ElasticVolumeBackupProperties.java | 152 + ...icVolumeDataProtectionPatchProperties.java | 131 + ...ElasticVolumeDataProtectionProperties.java | 131 + .../ElasticVolumePolicyEnforcement.java | 51 + .../models/ElasticVolumeProperties.java | 431 +++ .../models/ElasticVolumeRestorationState.java | 56 + .../netapp/models/ElasticVolumeRevert.java | 93 + .../ElasticVolumeSnapshotProperties.java | 94 + .../netapp/models/ElasticVolumeUpdate.java | 126 + .../models/ElasticVolumeUpdateProperties.java | 228 ++ .../netapp/models/ElasticVolumes.java | 184 ++ .../netapp/models/EnableWriteBackState.java | 51 + .../netapp/models/EncryptionState.java | 51 + .../ExternalReplicationSetupStatus.java | 70 + .../netapp/models/FileSystemUser.java | 129 + .../netapp/models/GlobalFileLockingState.java | 51 + .../netapp/models/KerberosState.java | 51 + .../netapp/models/LargeVolumeType.java | 56 + .../netapp/models/LdapConfiguration.java | 213 ++ .../netapp/models/LdapServerType.java | 51 + .../netapp/models/LdapState.java | 51 + .../models/ListQuotaReportResponse.java | 27 + .../netapp/models/NetAppAccount.java | 41 +- .../netapp/models/NetAppAccountPatch.java | 23 + .../netapp/models/NfsUser.java | 121 + .../netapp/models/NicInfo.java | 6 +- .../models/OriginClusterInformation.java | 204 ++ .../netapp/models/PeeringPassphrases.java | 40 + .../netapp/models/PolicyStatus.java | 51 + .../netapp/models/ProtocolTypes.java | 56 + .../netapp/models/QuotaReport.java | 170 ++ .../RansomwareProtectionPatchSettings.java | 99 + .../models/RansomwareProtectionSettings.java | 116 + .../netapp/models/RansomwareReport.java | 55 + .../models/RansomwareReportProperties.java | 193 ++ .../models/RansomwareReportSeverity.java | 61 + .../netapp/models/RansomwareReportState.java | 52 + .../netapp/models/RansomwareReports.java | 142 + .../models/RansomwareSuspectResolution.java | 51 + .../netapp/models/RansomwareSuspects.java | 137 + .../RansomwareSuspectsClearRequest.java | 139 + .../netapp/models/ReplicationObject.java | 73 + .../netapp/models/SecretPassword.java | 129 + .../netapp/models/SecretPasswordIdentity.java | 115 + .../SecretPasswordKeyVaultProperties.java | 136 + .../netapp/models/SmbEncryptionState.java | 51 + .../netapp/models/SmbSettings.java | 158 ++ .../models/SnapshotDirectoryVisibility.java | 52 + .../netapp/models/SnapshotUsage.java | 51 + .../netapp/models/SuspectFile.java | 100 + .../resourcemanager/netapp/models/Volume.java | 161 +- .../models/VolumeGroupVolumeProperties.java | 116 +- .../netapp/models/VolumeLanguage.java | 386 +++ .../netapp/models/VolumePatch.java | 16 +- .../VolumePatchPropertiesDataProtection.java | 33 + .../VolumePropertiesDataProtection.java | 32 + .../netapp/models/VolumeSize.java | 51 + .../netapp/models/Volumes.java | 31 + ...urcemanager-netapp_apiview_properties.json | 272 ++ ...azure-resourcemanager-netapp_metadata.json | 2 +- .../proxy-config.json | 2 +- .../AccountsChangeKeyVaultSamples.java | 2 +- .../AccountsCreateOrUpdateSamples.java | 4 +- .../generated/AccountsDeleteSamples.java | 2 +- .../AccountsGetByResourceGroupSamples.java | 2 +- ...tsGetChangeKeyVaultInformationSamples.java | 2 +- .../AccountsListByResourceGroupSamples.java | 2 +- .../netapp/generated/AccountsListSamples.java | 2 +- .../AccountsRenewCredentialsSamples.java | 2 +- .../AccountsTransitionToCmkSamples.java | 2 +- .../generated/AccountsUpdateSamples.java | 2 +- ...DirectoryConfigsCreateOrUpdateSamples.java | 70 + .../ActiveDirectoryConfigsDeleteSamples.java | 22 + ...ctoryConfigsGetByResourceGroupSamples.java | 23 + ...toryConfigsListByResourceGroupSamples.java | 23 + .../ActiveDirectoryConfigsListSamples.java | 23 + .../ActiveDirectoryConfigsUpdateSamples.java | 30 + .../BackupPoliciesCreateSamples.java | 2 +- .../BackupPoliciesDeleteSamples.java | 2 +- .../generated/BackupPoliciesGetSamples.java | 2 +- .../generated/BackupPoliciesListSamples.java | 2 +- .../BackupPoliciesUpdateSamples.java | 2 +- .../BackupVaultsCreateOrUpdateSamples.java | 2 +- .../generated/BackupVaultsDeleteSamples.java | 2 +- .../generated/BackupVaultsGetSamples.java | 2 +- ...ackupVaultsListByNetAppAccountSamples.java | 2 +- .../generated/BackupVaultsUpdateSamples.java | 2 +- .../generated/BackupsCreateSamples.java | 2 +- .../generated/BackupsDeleteSamples.java | 2 +- .../BackupsGetLatestStatusSamples.java | 2 +- .../netapp/generated/BackupsGetSamples.java | 2 +- ...psGetVolumeLatestRestoreStatusSamples.java | 2 +- .../generated/BackupsListByVaultSamples.java | 6 +- ...kupsUnderAccountMigrateBackupsSamples.java | 2 +- ...psUnderBackupVaultRestoreFilesSamples.java | 2 +- ...ckupsUnderVolumeMigrateBackupsSamples.java | 2 +- .../generated/BackupsUpdateSamples.java | 2 +- .../BucketsCreateOrUpdateSamples.java | 35 + .../generated/BucketsDeleteSamples.java | 22 + .../BucketsGenerateCredentialsSamples.java | 26 + .../netapp/generated/BucketsGetSamples.java | 23 + .../netapp/generated/BucketsListSamples.java | 22 + .../generated/BucketsUpdateSamples.java | 33 + .../CachesCreateOrUpdateSamples.java | 46 + .../netapp/generated/CachesDeleteSamples.java | 22 + .../netapp/generated/CachesGetSamples.java | 22 + .../CachesListByCapacityPoolsSamples.java | 22 + .../CachesListPeeringPassphrasesSamples.java | 24 + .../generated/CachesPoolChangeSamples.java | 27 + .../netapp/generated/CachesUpdateSamples.java | 28 + .../ElasticAccountsCreateOrUpdateSamples.java | 44 + .../ElasticAccountsDeleteSamples.java | 22 + ...sticAccountsGetByResourceGroupSamples.java | 22 + ...ticAccountsListByResourceGroupSamples.java | 22 + .../generated/ElasticAccountsListSamples.java | 22 + .../ElasticAccountsUpdateSamples.java | 41 + ...icBackupPoliciesCreateOrUpdateSamples.java | 34 + .../ElasticBackupPoliciesDeleteSamples.java | 23 + .../ElasticBackupPoliciesGetSamples.java | 23 + ...upPoliciesListByElasticAccountSamples.java | 23 + .../ElasticBackupPoliciesUpdateSamples.java | 34 + ...sticBackupVaultsCreateOrUpdateSamples.java | 26 + .../ElasticBackupVaultsDeleteSamples.java | 23 + .../ElasticBackupVaultsGetSamples.java | 23 + ...ckupVaultsListByElasticAccountSamples.java | 23 + .../ElasticBackupVaultsUpdateSamples.java | 41 + .../ElasticBackupsCreateOrUpdateSamples.java | 34 + .../ElasticBackupsDeleteSamples.java | 23 + .../generated/ElasticBackupsGetSamples.java | 23 + .../ElasticBackupsListByVaultSamples.java | 22 + .../ElasticBackupsUpdateSamples.java | 27 + ...ElasticCapacityPoolsChangeZoneSamples.java | 26 + ...heckVolumeFilePathAvailabilitySamples.java | 28 + ...ticCapacityPoolsCreateOrUpdateSamples.java | 66 + .../ElasticCapacityPoolsDeleteSamples.java | 22 + .../ElasticCapacityPoolsGetSamples.java | 22 + ...acityPoolsListByElasticAccountSamples.java | 23 + .../ElasticCapacityPoolsUpdateSamples.java | 32 + ...SnapshotPoliciesCreateOrUpdateSamples.java | 49 + .../ElasticSnapshotPoliciesDeleteSamples.java | 23 + .../ElasticSnapshotPoliciesGetSamples.java | 23 + ...otPoliciesListByElasticAccountSamples.java | 23 + ...shotPoliciesListElasticVolumesSamples.java | 24 + .../ElasticSnapshotPoliciesUpdateSamples.java | 49 + ...ElasticSnapshotsCreateOrUpdateSamples.java | 25 + .../ElasticSnapshotsDeleteSamples.java | 23 + .../generated/ElasticSnapshotsGetSamples.java | 23 + ...icSnapshotsListByElasticVolumeSamples.java | 24 + .../ElasticVolumesCreateOrUpdateSamples.java | 58 + .../ElasticVolumesDeleteSamples.java | 22 + .../generated/ElasticVolumesGetSamples.java | 23 + ...lasticVolumesListByElasticPoolSamples.java | 22 + .../ElasticVolumesRevertSamples.java | 27 + .../ElasticVolumesUpdateSamples.java | 49 + ...ourceCheckFilePathAvailabilitySamples.java | 4 +- ...pResourceCheckNameAvailabilitySamples.java | 2 +- ...ResourceCheckQuotaAvailabilitySamples.java | 2 +- ...ResourceQueryNetworkSiblingSetSamples.java | 4 +- .../NetAppResourceQueryRegionInfoSamples.java | 2 +- ...pResourceQuotaLimitsAccountGetSamples.java | 2 +- ...ResourceQuotaLimitsAccountListSamples.java | 2 +- .../NetAppResourceQuotaLimitsGetSamples.java | 2 +- .../NetAppResourceQuotaLimitsListSamples.java | 2 +- .../NetAppResourceRegionInfosGetSamples.java | 2 +- .../NetAppResourceRegionInfosListSamples.java | 2 +- ...esourceUpdateNetworkSiblingSetSamples.java | 4 +- .../NetAppResourceUsagesGetSamples.java | 2 +- .../NetAppResourceUsagesListSamples.java | 2 +- .../generated/OperationsListSamples.java | 2 +- .../generated/PoolsCreateOrUpdateSamples.java | 4 +- .../netapp/generated/PoolsDeleteSamples.java | 2 +- .../netapp/generated/PoolsGetSamples.java | 4 +- .../netapp/generated/PoolsListSamples.java | 2 +- .../netapp/generated/PoolsUpdateSamples.java | 4 +- ...RansomwareReportsClearSuspectsSamples.java | 30 + .../RansomwareReportsGetSamples.java | 24 + .../RansomwareReportsListSamples.java | 22 + .../SnapshotPoliciesCreateSamples.java | 2 +- .../SnapshotPoliciesDeleteSamples.java | 2 +- .../generated/SnapshotPoliciesGetSamples.java | 2 +- .../SnapshotPoliciesListSamples.java | 2 +- .../SnapshotPoliciesListVolumesSamples.java | 2 +- .../SnapshotPoliciesUpdateSamples.java | 2 +- .../generated/SnapshotsCreateSamples.java | 2 +- .../generated/SnapshotsDeleteSamples.java | 2 +- .../netapp/generated/SnapshotsGetSamples.java | 2 +- .../generated/SnapshotsListSamples.java | 2 +- .../SnapshotsRestoreFilesSamples.java | 2 +- .../generated/SubvolumesCreateSamples.java | 2 +- .../generated/SubvolumesDeleteSamples.java | 2 +- .../SubvolumesGetMetadataSamples.java | 2 +- .../generated/SubvolumesGetSamples.java | 2 +- .../SubvolumesListByVolumeSamples.java | 2 +- .../generated/SubvolumesUpdateSamples.java | 2 +- .../generated/VolumeGroupsCreateSamples.java | 4 +- .../generated/VolumeGroupsDeleteSamples.java | 2 +- .../generated/VolumeGroupsGetSamples.java | 4 +- ...olumeGroupsListByNetAppAccountSamples.java | 4 +- .../VolumeQuotaRulesCreateSamples.java | 2 +- .../VolumeQuotaRulesDeleteSamples.java | 2 +- .../generated/VolumeQuotaRulesGetSamples.java | 2 +- .../VolumeQuotaRulesListByVolumeSamples.java | 2 +- .../VolumeQuotaRulesUpdateSamples.java | 2 +- ...esAuthorizeExternalReplicationSamples.java | 2 +- .../VolumesAuthorizeReplicationSamples.java | 2 +- .../VolumesBreakFileLocksSamples.java | 2 +- .../VolumesBreakReplicationSamples.java | 2 +- .../VolumesCreateOrUpdateSamples.java | 4 +- .../VolumesDeleteReplicationSamples.java | 2 +- .../generated/VolumesDeleteSamples.java | 2 +- ...mesFinalizeExternalReplicationSamples.java | 2 +- .../VolumesFinalizeRelocationSamples.java | 2 +- .../netapp/generated/VolumesGetSamples.java | 14 +- ...sListGetGroupIdListForLdapUserSamples.java | 2 +- .../VolumesListQuotaReportSamples.java | 22 + .../VolumesListReplicationsSamples.java | 2 +- .../netapp/generated/VolumesListSamples.java | 14 +- .../VolumesPeerExternalClusterSamples.java | 2 +- ...umesPerformReplicationTransferSamples.java | 2 +- .../generated/VolumesPoolChangeSamples.java | 2 +- ...olumesPopulateAvailabilityZoneSamples.java | 2 +- ...VolumesReInitializeReplicationSamples.java | 2 +- .../VolumesReestablishReplicationSamples.java | 2 +- .../generated/VolumesRelocateSamples.java | 2 +- .../VolumesReplicationStatusSamples.java | 2 +- .../VolumesResetCifsPasswordSamples.java | 2 +- .../VolumesResyncReplicationSamples.java | 2 +- .../VolumesRevertRelocationSamples.java | 2 +- .../generated/VolumesRevertSamples.java | 2 +- .../VolumesSplitCloneFromParentSamples.java | 2 +- .../generated/VolumesUpdateSamples.java | 2 +- .../AccountsRenewCredentialsMockTests.java | 2 +- .../generated/AuthorizeRequestTests.java | 10 +- .../BackupPoliciesCreateMockTests.java | 28 +- .../BackupPoliciesDeleteMockTests.java | 2 +- ...ackupPoliciesGetWithResponseMockTests.java | 16 +- .../BackupPoliciesListMockTests.java | 14 +- .../generated/BackupPoliciesListTests.java | 14 +- .../generated/BackupPolicyInnerTests.java | 38 +- .../generated/BackupPolicyPatchTests.java | 38 +- .../BackupPolicyPropertiesTests.java | 26 +- .../generated/BackupRestoreFilesTests.java | 21 +- .../generated/BackupVaultInnerTests.java | 14 +- .../generated/BackupVaultPatchTests.java | 13 +- .../generated/BackupVaultPropertiesTests.java | 4 +- .../BackupVaultsCreateOrUpdateMockTests.java | 14 +- .../BackupVaultsGetWithResponseMockTests.java | 8 +- ...kupVaultsListByNetAppAccountMockTests.java | 8 +- .../generated/BackupVaultsListTests.java | 8 +- .../generated/BackupsCreateMockTests.java | 20 +- ...sGetLatestStatusWithResponseMockTests.java | 5 +- ...estRestoreStatusWithResponseMockTests.java | 4 +- .../BackupsGetWithResponseMockTests.java | 12 +- .../BackupsListByVaultMockTests.java | 10 +- .../BackupsMigrationRequestTests.java | 8 +- .../generated/BreakFileLocksRequestTests.java | 12 +- .../BreakReplicationRequestTests.java | 8 +- .../netapp/generated/BucketInnerTests.java | 48 + .../netapp/generated/BucketListTests.java | 27 + .../generated/BucketPatchPropertiesTests.java | 48 + .../netapp/generated/BucketPatchTests.java | 48 + .../generated/BucketPropertiesTests.java | 48 + .../BucketServerPatchPropertiesTests.java | 29 + .../BucketServerPropertiesTests.java | 29 + .../BucketsCreateOrUpdateMockTests.java | 57 + .../BucketsGetWithResponseMockTests.java | 47 + .../generated/BucketsListMockTests.java | 46 + .../CacheMountTargetPropertiesTests.java | 17 + ...eringPassphrasesWithResponseMockTests.java | 42 + .../generated/CapacityPoolInnerTests.java | 40 +- .../generated/CapacityPoolListTests.java | 20 +- .../generated/CapacityPoolPatchTests.java | 32 +- .../generated/ChangeZoneRequestTests.java | 24 + .../CheckAvailabilityResponseInnerTests.java | 10 +- ...esourceAvailabilityResponseInnerTests.java | 23 + ...olumeFilePathAvailabilityRequestTests.java | 26 + .../netapp/generated/CifsUserTests.java | 24 + .../ClusterPeerCommandResponseInnerTests.java | 4 +- .../netapp/generated/DailyScheduleTests.java | 26 +- .../DestinationReplicationTests.java | 10 +- .../generated/ElasticBackupInnerTests.java | 38 + .../ElasticBackupListResultTests.java | 24 + ...BackupPoliciesCreateOrUpdateMockTests.java | 67 + ...ackupPoliciesGetWithResponseMockTests.java | 45 + ...PoliciesListByElasticAccountMockTests.java | 46 + .../ElasticBackupPolicyInnerTests.java | 57 + .../ElasticBackupPolicyListResultTests.java | 26 + .../ElasticBackupPolicyPropertiesTests.java | 36 + ...sticBackupPolicyUpdatePropertiesTests.java | 37 + .../ElasticBackupPolicyUpdateTests.java | 55 + .../ElasticBackupPropertiesTests.java | 36 + .../ElasticBackupVaultInnerTests.java | 45 + .../ElasticBackupVaultListResultTests.java | 21 + .../ElasticBackupVaultPropertiesTests.java | 22 + .../ElasticBackupVaultUpdateTests.java | 41 + ...icBackupVaultsCreateOrUpdateMockTests.java | 59 + ...cBackupVaultsGetWithResponseMockTests.java | 40 + ...upVaultsListByElasticAccountMockTests.java | 40 + ...ElasticBackupsCreateOrUpdateMockTests.java | 49 + ...lasticBackupsGetWithResponseMockTests.java | 43 + .../ElasticBackupsListByVaultMockTests.java | 44 + ...PathAvailabilityWithResponseMockTests.java | 45 + .../ElasticEncryptionIdentityTests.java | 26 + .../ElasticExportPolicyRuleTests.java | 46 + .../generated/ElasticExportPolicyTests.java | 66 + .../ElasticMountTargetPropertiesTests.java | 16 + .../ElasticSmbPatchPropertiesTests.java | 27 + .../generated/ElasticSmbPropertiesTests.java | 26 + .../generated/ElasticSnapshotInnerTests.java | 24 + .../ElasticSnapshotListResultTests.java | 19 + ...apshotPoliciesCreateOrUpdateMockTests.java | 94 + ...pshotPoliciesGetWithResponseMockTests.java | 56 + ...PoliciesListByElasticAccountMockTests.java | 59 + ...otPoliciesListElasticVolumesMockTests.java | 79 + ...asticSnapshotPolicyDailyScheduleTests.java | 33 + ...sticSnapshotPolicyHourlyScheduleTests.java | 29 + .../ElasticSnapshotPolicyInnerTests.java | 94 + .../ElasticSnapshotPolicyListResultTests.java | 37 + ...ticSnapshotPolicyMonthlyScheduleTests.java | 37 + .../ElasticSnapshotPolicyPropertiesTests.java | 73 + ...icSnapshotPolicyUpdatePropertiesTests.java | 73 + .../ElasticSnapshotPolicyUpdateTests.java | 91 + .../ElasticSnapshotPolicyVolumeListTests.java | 43 + ...sticSnapshotPolicyWeeklyScheduleTests.java | 38 + .../ElasticSnapshotPropertiesTests.java | 22 + ...asticSnapshotsCreateOrUpdateMockTests.java | 40 + ...sticSnapshotsGetWithResponseMockTests.java | 38 + ...SnapshotsListByElasticVolumeMockTests.java | 38 + .../ElasticVolumeBackupPropertiesTests.java | 34 + ...umeDataProtectionPatchPropertiesTests.java | 39 + ...icVolumeDataProtectionPropertiesTests.java | 39 + .../generated/ElasticVolumeInnerTests.java | 149 + .../ElasticVolumeListResultTests.java | 43 + .../ElasticVolumePropertiesTests.java | 105 + .../generated/ElasticVolumeRevertTests.java | 25 + .../ElasticVolumeSnapshotPropertiesTests.java | 26 + .../ElasticVolumeUpdatePropertiesTests.java | 92 + .../generated/ElasticVolumeUpdateTests.java | 114 + ...ElasticVolumesCreateOrUpdateMockTests.java | 141 + ...lasticVolumesGetWithResponseMockTests.java | 76 + ...sticVolumesListByElasticPoolMockTests.java | 79 + .../ElasticVolumesRevertMockTests.java | 76 + .../generated/EncryptionIdentityTests.java | 15 +- .../EncryptionTransitionRequestTests.java | 18 +- .../FilePathAvailabilityRequestTests.java | 23 +- .../netapp/generated/FileSystemUserTests.java | 34 + ...GetGroupIdListForLdapUserRequestTests.java | 8 +- ...upIdListForLdapUserResponseInnerTests.java | 4 +- .../netapp/generated/HourlyScheduleTests.java | 20 +- .../KeyVaultPrivateEndpointTests.java | 12 +- .../generated/LdapConfigurationTests.java | 39 + .../generated/LdapSearchScopeOptTests.java | 23 +- .../ListQuotaReportResponseInnerTests.java | 25 + .../ListReplicationsRequestTests.java | 8 +- .../generated/ListReplicationsTests.java | 12 +- .../ManagedServiceIdentityTests.java | 6 +- .../generated/MonthlyScheduleTests.java | 32 +- ...imitsAccountsGetWithResponseMockTests.java | 4 +- ...ourceQuotaLimitsAccountsListMockTests.java | 4 +- ...ceQuotaLimitsGetWithResponseMockTests.java | 4 +- ...etAppResourceQuotaLimitsListMockTests.java | 4 +- ...ceRegionInfosGetWithResponseMockTests.java | 11 +- ...etAppResourceRegionInfosListMockTests.java | 8 +- ...esourceUsagesGetWithResponseMockTests.java | 4 +- .../NetAppResourceUsagesListMockTests.java | 4 +- ...PathAvailabilityWithResponseMockTests.java | 14 +- ...NameAvailabilityWithResponseMockTests.java | 12 +- ...uotaAvailabilityWithResponseMockTests.java | 10 +- ...etworkSiblingSetWithResponseMockTests.java | 24 +- ...sQueryRegionInfoWithResponseMockTests.java | 10 +- ...urcesUpdateNetworkSiblingSetMockTests.java | 22 +- .../NetworkSiblingSetInnerTests.java | 12 +- .../netapp/generated/NfsUserTests.java | 27 + .../netapp/generated/NicInfoTests.java | 6 +- .../generated/OperationsListMockTests.java | 44 +- .../OriginClusterInformationTests.java | 36 + ...ClusterForVolumeMigrationRequestTests.java | 13 +- .../PeeringPassphrasesInnerTests.java | 21 + .../generated/PoolChangeRequestTests.java | 8 +- .../generated/PoolPatchPropertiesTests.java | 26 +- .../netapp/generated/PoolPropertiesTests.java | 38 +- .../PoolsCreateOrUpdateMockTests.java | 32 +- .../PoolsGetWithResponseMockTests.java | 21 +- .../netapp/generated/PoolsListMockTests.java | 16 +- .../QueryNetworkSiblingSetRequestTests.java | 12 +- .../QuotaAvailabilityRequestTests.java | 14 +- .../netapp/generated/QuotaReportTests.java | 25 + ...ansomwareProtectionPatchSettingsTests.java | 28 + .../RansomwareProtectionSettingsTests.java | 29 + .../generated/RansomwareReportInnerTests.java | 17 + .../RansomwareReportPropertiesTests.java | 17 + ...omwareReportsGetWithResponseMockTests.java | 38 + .../RansomwareReportsListMockTests.java | 37 + .../generated/RansomwareReportsListTests.java | 19 + .../RansomwareSuspectsClearRequestTests.java | 32 + .../generated/RansomwareSuspectsTests.java | 17 + .../ReestablishReplicationRequestTests.java | 10 +- ...InfoAvailabilityZoneMappingsItemTests.java | 6 +- .../generated/RegionInfoInnerTests.java | 9 +- .../RegionInfoResourceInnerTests.java | 6 +- .../generated/RegionInfosListTests.java | 6 +- .../netapp/generated/RemotePathTests.java | 23 +- .../generated/ReplicationInnerTests.java | 10 +- .../generated/ReplicationObjectTests.java | 32 +- .../ReplicationStatusInnerTests.java | 8 +- .../ResourceNameAvailabilityRequestTests.java | 20 +- .../SecretPasswordIdentityTests.java | 26 + .../netapp/generated/SmbSettingsTests.java | 35 + .../netapp/generated/SnapshotInnerTests.java | 8 +- ...otPoliciesCreateWithResponseMockTests.java | 84 +- .../SnapshotPoliciesDeleteMockTests.java | 2 +- ...pshotPoliciesGetWithResponseMockTests.java | 44 +- .../SnapshotPoliciesListMockTests.java | 44 +- .../generated/SnapshotPoliciesListTests.java | 42 +- .../generated/SnapshotPolicyInnerTests.java | 122 +- .../generated/SnapshotPolicyPatchTests.java | 122 +- .../SnapshotPolicyPropertiesTests.java | 110 +- .../generated/SnapshotPropertiesTests.java | 3 +- .../generated/SnapshotRestoreFilesTests.java | 14 +- .../generated/SnapshotsDeleteMockTests.java | 4 +- .../SnapshotsGetWithResponseMockTests.java | 6 +- .../generated/SnapshotsListMockTests.java | 6 +- .../netapp/generated/SnapshotsListTests.java | 6 +- .../SnapshotsRestoreFilesMockTests.java | 6 +- .../generated/SubvolumeInfoInnerTests.java | 16 +- .../generated/SubvolumeModelInnerTests.java | 22 +- .../SubvolumeModelPropertiesTests.java | 22 +- .../generated/SubvolumePatchParamsTests.java | 12 +- .../generated/SubvolumePatchRequestTests.java | 12 +- .../generated/SubvolumePropertiesTests.java | 20 +- .../generated/SubvolumesCreateMockTests.java | 18 +- .../generated/SubvolumesDeleteMockTests.java | 3 +- .../SubvolumesGetMetadataMockTests.java | 23 +- .../SubvolumesGetWithResponseMockTests.java | 11 +- .../SubvolumesListByVolumeMockTests.java | 10 +- .../netapp/generated/SubvolumesListTests.java | 10 +- .../netapp/generated/SuspectFileTests.java | 17 + .../SvmPeerCommandResponseInnerTests.java | 4 +- .../UpdateNetworkSiblingSetRequestTests.java | 23 +- .../netapp/generated/UsageNameTests.java | 6 +- .../generated/UsagePropertiesTests.java | 5 +- .../generated/UsageResultInnerTests.java | 2 +- .../generated/UsagesListResultTests.java | 4 +- .../generated/UserAssignedIdentityTests.java | 2 +- .../VolumeBackupPropertiesTests.java | 14 +- .../netapp/generated/VolumeBackupsTests.java | 10 +- .../VolumeGroupsDeleteMockTests.java | 2 +- ...umePatchPropertiesDataProtectionTests.java | 34 +- ...olumePatchPropertiesExportPolicyTests.java | 97 +- .../generated/VolumePatchPropertiesTests.java | 168 +- .../netapp/generated/VolumePatchTests.java | 60 +- .../VolumePropertiesDataProtectionTests.java | 22 +- .../generated/VolumeQuotaRuleInnerTests.java | 33 +- .../generated/VolumeQuotaRulePatchTests.java | 28 +- .../VolumeQuotaRulesCreateMockTests.java | 24 +- .../VolumeQuotaRulesDeleteMockTests.java | 3 +- ...umeQuotaRulesGetWithResponseMockTests.java | 12 +- ...VolumeQuotaRulesListByVolumeMockTests.java | 14 +- .../generated/VolumeQuotaRulesListTests.java | 14 +- .../VolumeQuotaRulesPropertiesTests.java | 20 +- .../VolumeRelocationPropertiesTests.java | 2 +- .../netapp/generated/VolumeRevertTests.java | 8 +- .../VolumeSnapshotPropertiesTests.java | 8 +- ...AuthorizeExternalReplicationMockTests.java | 7 +- .../VolumesAuthorizeReplicationMockTests.java | 5 +- .../VolumesBreakFileLocksMockTests.java | 4 +- .../VolumesBreakReplicationMockTests.java | 2 +- .../VolumesDeleteReplicationMockTests.java | 3 +- .../VolumesFinalizeRelocationMockTests.java | 2 +- ...istGetGroupIdListForLdapUserMockTests.java | 8 +- .../VolumesListQuotaReportMockTests.java | 44 + .../VolumesListReplicationsMockTests.java | 10 +- .../VolumesPeerExternalClusterMockTests.java | 14 +- .../generated/VolumesPoolChangeMockTests.java | 4 +- ...lumesReInitializeReplicationMockTests.java | 3 +- ...eplicationStatusWithResponseMockTests.java | 11 +- .../VolumesResyncReplicationMockTests.java | 2 +- .../generated/VolumesRevertMockTests.java | 4 +- .../VolumesRevertRelocationMockTests.java | 2 +- .../netapp/generated/WeeklyScheduleTests.java | 32 +- .../tsp-location.yaml | 2 +- 671 files changed, 62864 insertions(+), 1777 deletions(-) create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ActiveDirectoryConfigsClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BucketsClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticAccountsClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupPoliciesClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupVaultsClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupsClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticCapacityPoolsClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotPoliciesClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotsClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticVolumesClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/RansomwareReportsClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ActiveDirectoryConfigInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketGenerateCredentialsInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketPatchProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CacheInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckElasticResourceAvailabilityResponseInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticAccountInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupPolicyInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupVaultInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticCapacityPoolInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotPolicyInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticVolumeInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ListQuotaReportResponseInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PeeringPassphrasesInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RansomwareReportInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketGenerateCredentialsImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CheckElasticResourceAvailabilityResponseImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPolicyImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPolicyImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumeImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ListQuotaReportResponseImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PeeringPassphrasesImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ActiveDirectoryConfigListResult.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/BucketList.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/CacheList.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticAccountListResult.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupListResult.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupPolicyListResult.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupVaultListResult.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticCapacityPoolListResult.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotListResult.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyListResult.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyVolumeList.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticVolumeListResult.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/RansomwareReportsList.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfig.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdate.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdateProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigs.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActualRansomwareProtectionState.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakthroughMode.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Bucket.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketCredentialsExpiry.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketGenerateCredentials.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPatch.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPatchPermissions.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPermissions.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketServerPatchProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketServerProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Buckets.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Cache.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheLifeCycleState.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheMountTargetProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProvisioningState.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdate.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdateProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Caches.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChangeZoneRequest.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityReason.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityResponse.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityStatus.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticVolumeFilePathAvailabilityRequest.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CifsChangeNotifyState.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CifsUser.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CredentialsStatus.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DayOfWeek.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DesiredRansomwareProtectionState.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccount.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdate.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdateProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccounts.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackup.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicies.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicy.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyState.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdate.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdateProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupType.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVault.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultUpdate.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaults.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackups.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPool.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdate.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdateProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPools.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryption.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionConfiguration.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionIdentity.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicy.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicyRule.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultStatus.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticMountTargetProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv3Access.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv4Access.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticPoolEncryptionKeySource.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticProtocolType.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticResourceAvailabilityStatus.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticRootAccess.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticServiceLevel.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbEncryption.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbPatchProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshot.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicies.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicy.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyDailySchedule.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyHourlySchedule.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyMonthlySchedule.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdate.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdateProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyWeeklySchedule.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshots.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticUnixAccessRule.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolume.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeBackupProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionPatchProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumePolicyEnforcement.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRestorationState.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRevert.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeSnapshotProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdate.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdateProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumes.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EnableWriteBackState.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionState.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalReplicationSetupStatus.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FileSystemUser.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/GlobalFileLockingState.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KerberosState.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LargeVolumeType.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapConfiguration.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapServerType.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapState.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ListQuotaReportResponse.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NfsUser.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OriginClusterInformation.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PeeringPassphrases.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PolicyStatus.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProtocolTypes.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaReport.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionPatchSettings.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionSettings.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReport.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportSeverity.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportState.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReports.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectResolution.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspects.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectsClearRequest.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPassword.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordIdentity.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordKeyVaultProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbEncryptionState.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbSettings.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotDirectoryVisibility.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotUsage.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SuspectFile.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeLanguage.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSize.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsCreateOrUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsDeleteSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsGetByResourceGroupSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListByResourceGroupSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsDeleteSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGenerateCredentialsSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGetSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsListSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesCreateOrUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesDeleteSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesGetSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListByCapacityPoolsSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesPoolChangeSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsCreateOrUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsDeleteSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsGetByResourceGroupSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListByResourceGroupSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesDeleteSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsDeleteSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsDeleteSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsChangeZoneSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilitySamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCreateOrUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsDeleteSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsGetSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsListByElasticAccountSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesDeleteSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsDeleteSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesDeleteSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsClearSuspectsSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketInnerTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketListTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPatchPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPatchTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPatchPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsGetWithResponseMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsListMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CacheMountTargetPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ChangeZoneRequestTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticResourceAvailabilityResponseInnerTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticVolumeFilePathAvailabilityRequestTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CifsUserTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupInnerTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupListResultTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetWithResponseMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyInnerTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyListResultTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdatePropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdateTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultInnerTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultListResultTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultUpdateTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetWithResponseMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetWithResponseMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilityWithResponseMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticEncryptionIdentityTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyRuleTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticMountTargetPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPatchPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotInnerTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotListResultTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetWithResponseMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyDailyScheduleTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyHourlyScheduleTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyInnerTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyListResultTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyMonthlyScheduleTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdatePropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdateTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyVolumeListTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyWeeklyScheduleTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetWithResponseMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeBackupPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPatchPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeInnerTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeListResultTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumePropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeRevertTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeSnapshotPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdatePropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdateTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetWithResponseMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FileSystemUserTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapConfigurationTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListQuotaReportResponseInnerTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NfsUserTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OriginClusterInformationTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeeringPassphrasesInnerTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaReportTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareProtectionPatchSettingsTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareProtectionSettingsTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportInnerTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetWithResponseMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListMockTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsClearRequestTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SecretPasswordIdentityTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SmbSettingsTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SuspectFileTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportMockTests.java diff --git a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md index ce9400e2a77b..ce11e041cb86 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md +++ b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md @@ -1,14 +1,455 @@ # Release History -## 2.1.0-beta.1 (Unreleased) +## 2.1.0-beta.1 (2025-11-28) + +- Azure Resource Manager NetAppFiles client library for Java. This package contains Microsoft Azure SDK for NetAppFiles Management SDK. Microsoft NetApp Files Azure Resource Provider specification. Package api-version 2025-09-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +* `models.RansomwareSuspects` was added -### Bugs Fixed +* `models.BucketPatch` was added -### Other Changes +* `models.ElasticBackupProperties` was added + +* `models.EncryptionState` was added + +* `models.ElasticBackupPolicyProperties` was added + +* `models.ElasticBackupPolicyUpdateProperties` was added + +* `models.ElasticSnapshot` was added + +* `models.ElasticCapacityPools` was added + +* `models.ElasticKeyVaultProperties` was added + +* `models.LdapConfiguration` was added + +* `models.RansomwareReport` was added + +* `models.ElasticVolumeUpdateProperties` was added + +* `models.ActualRansomwareProtectionState` was added + +* `models.ElasticBackup$Definition` was added + +* `models.ElasticSnapshotPolicyHourlySchedule` was added + +* `models.ElasticMountTargetProperties` was added + +* `models.Bucket$DefinitionStages` was added + +* `models.ElasticVolumeUpdate` was added + +* `models.ElasticVolume$UpdateStages` was added + +* `models.KerberosState` was added + +* `models.ElasticVolumeDataProtectionProperties` was added + +* `models.ElasticSnapshotPolicyProperties` was added + +* `models.ElasticVolumeSnapshotProperties` was added + +* `models.ElasticPoolEncryptionKeySource` was added + +* `models.ListQuotaReportResponse` was added + +* `models.ElasticServiceLevel` was added + +* `models.CacheLifeCycleState` was added + +* `models.ElasticBackupPolicy` was added + +* `models.SmbSettings` was added + +* `models.BucketServerProperties` was added + +* `models.ElasticResourceAvailabilityStatus` was added + +* `models.Cache$UpdateStages` was added + +* `models.LdapServerType` was added + +* `models.ElasticCapacityPoolUpdateProperties` was added + +* `models.ElasticNfsv3Access` was added + +* `models.RansomwareSuspectResolution` was added + +* `models.CheckElasticVolumeFilePathAvailabilityRequest` was added + +* `models.SuspectFile` was added + +* `models.VolumeLanguage` was added + +* `models.ElasticSmbEncryption` was added + +* `models.ElasticVolumeProperties` was added + +* `models.BreakthroughMode` was added + +* `models.ElasticAccount$DefinitionStages` was added + +* `models.ElasticEncryption` was added + +* `models.ElasticBackupPolicy$Definition` was added + +* `models.RansomwareReportSeverity` was added + +* `models.ElasticVolumeRevert` was added + +* `models.RansomwareReports` was added + +* `models.ElasticBackupVaultUpdate` was added + +* `models.ActiveDirectoryConfig$Definition` was added + +* `models.SnapshotUsage` was added + +* `models.ElasticSnapshotPolicyUpdateProperties` was added + +* `models.ActiveDirectoryConfig` was added + +* `models.VolumeSize` was added + +* `models.ElasticBackupPolicies` was added + +* `models.CacheMountTargetProperties` was added + +* `models.ElasticExportPolicyRule` was added + +* `models.BucketPermissions` was added + +* `models.ActiveDirectoryConfig$DefinitionStages` was added + +* `models.ElasticAccountUpdate` was added + +* `models.ElasticCapacityPoolUpdate` was added + +* `models.ElasticSnapshot$UpdateStages` was added + +* `models.CifsChangeNotifyState` was added + +* `models.ActiveDirectoryConfigUpdateProperties` was added + +* `models.ElasticAccountProperties` was added + +* `models.ElasticSnapshotPolicyUpdate` was added + +* `models.ElasticSnapshots` was added + +* `models.ElasticKeyVaultStatus` was added + +* `models.BucketPatchPermissions` was added + +* `models.Bucket$Definition` was added + +* `models.ElasticEncryptionIdentity` was added + +* `models.Bucket` was added + +* `models.ElasticSnapshotProperties` was added + +* `models.ActiveDirectoryConfigs` was added + +* `models.ElasticBackup$UpdateStages` was added + +* `models.CacheProperties` was added + +* `models.NfsUser` was added + +* `models.BucketGenerateCredentials` was added + +* `models.ActiveDirectoryConfig$Update` was added + +* `models.SecretPasswordIdentity` was added + +* `models.Caches` was added + +* `models.Cache$Definition` was added + +* `models.ElasticAccount$UpdateStages` was added + +* `models.ElasticBackupPolicy$Update` was added + +* `models.ElasticBackupVaults` was added + +* `models.RansomwareReportState` was added + +* `models.ElasticCapacityPool` was added + +* `models.CacheProvisioningState` was added + +* `models.ElasticExportPolicy` was added + +* `models.ElasticSnapshotPolicyWeeklySchedule` was added + +* `models.OriginClusterInformation` was added + +* `models.ElasticVolume$Definition` was added + +* `models.BucketCredentialsExpiry` was added + +* `models.CacheUpdate` was added + +* `models.ElasticRootAccess` was added + +* `models.ElasticBackupVault$Update` was added + +* `models.RansomwareSuspectsClearRequest` was added + +* `models.ElasticBackups` was added + +* `models.ElasticSnapshotPolicy` was added + +* `models.CheckElasticResourceAvailabilityStatus` was added + +* `models.SecretPassword` was added + +* `models.ElasticBackup$Update` was added + +* `models.ElasticCapacityPool$Update` was added + +* `models.ElasticSnapshotPolicyDailySchedule` was added + +* `models.ElasticCapacityPool$UpdateStages` was added + +* `models.PeeringPassphrases` was added + +* `models.Bucket$Update` was added + +* `models.ElasticAccount$Update` was added + +* `models.LdapState` was added + +* `models.Cache$Update` was added + +* `models.RansomwareProtectionPatchSettings` was added + +* `models.Cache` was added + +* `models.ElasticSnapshotPolicy$Definition` was added + +* `models.RansomwareProtectionSettings` was added + +* `models.ElasticSnapshot$Definition` was added + +* `models.ElasticBackupVaultProperties` was added + +* `models.ElasticBackupPolicy$DefinitionStages` was added + +* `models.ElasticNfsv4Access` was added + +* `models.ActiveDirectoryConfigProperties` was added + +* `models.ElasticVolumeRestorationState` was added + +* `models.ElasticVolumePolicyEnforcement` was added + +* `models.SecretPasswordKeyVaultProperties` was added + +* `models.ElasticAccount$Definition` was added + +* `models.ElasticVolumes` was added + +* `models.ElasticBackupVault$Definition` was added + +* `models.ElasticSnapshotPolicy$Update` was added + +* `models.ProtocolTypes` was added + +* `models.ElasticBackup$DefinitionStages` was added + +* `models.CifsUser` was added + +* `models.DesiredRansomwareProtectionState` was added + +* `models.ElasticSnapshotPolicies` was added + +* `models.ElasticAccount` was added + +* `models.QuotaReport` was added + +* `models.CheckElasticResourceAvailabilityReason` was added + +* `models.ElasticCapacityPoolProperties` was added + +* `models.ActiveDirectoryConfigUpdate` was added + +* `models.BucketServerPatchProperties` was added + +* `models.ElasticVolume$DefinitionStages` was added + +* `models.CacheUpdateProperties` was added + +* `models.ElasticAccountUpdateProperties` was added + +* `models.ElasticCapacityPool$DefinitionStages` was added + +* `models.CredentialsStatus` was added + +* `models.ElasticSmbProperties` was added + +* `models.LargeVolumeType` was added + +* `models.PolicyStatus` was added + +* `models.ElasticVolumeBackupProperties` was added + +* `models.ElasticBackup` was added + +* `models.ChangeZoneRequest` was added + +* `models.ElasticBackupVault$DefinitionStages` was added + +* `models.ElasticSnapshot$Update` was added + +* `models.CheckElasticResourceAvailabilityResponse` was added + +* `models.SmbEncryptionState` was added + +* `models.ElasticBackupVault` was added + +* `models.ElasticUnixAccessRule` was added + +* `models.ActiveDirectoryConfig$UpdateStages` was added + +* `models.ElasticVolume` was added + +* `models.ElasticVolume$Update` was added + +* `models.RansomwareReportProperties` was added + +* `models.ElasticBackupPolicyState` was added + +* `models.ElasticSnapshotPolicyMonthlySchedule` was added + +* `models.ExternalReplicationSetupStatus` was added + +* `models.GlobalFileLockingState` was added + +* `models.Cache$DefinitionStages` was added + +* `models.ElasticVolumeDataProtectionPatchProperties` was added + +* `models.ElasticAccounts` was added + +* `models.ElasticSmbPatchProperties` was added + +* `models.Bucket$UpdateStages` was added + +* `models.Buckets` was added + +* `models.ElasticSnapshot$DefinitionStages` was added + +* `models.FileSystemUser` was added + +* `models.ElasticBackupVault$UpdateStages` was added + +* `models.ElasticBackupPolicyUpdate` was added + +* `models.SnapshotDirectoryVisibility` was added + +* `models.ElasticBackupPolicy$UpdateStages` was added + +* `models.ElasticEncryptionConfiguration` was added + +* `models.EnableWriteBackState` was added + +* `models.DayOfWeek` was added + +* `models.ElasticCapacityPool$Definition` was added + +* `models.ElasticSnapshotPolicy$DefinitionStages` was added + +* `models.ElasticBackupType` was added + +* `models.ElasticProtocolType` was added + +* `models.ElasticSnapshotPolicy$UpdateStages` was added + +#### `models.NetAppAccount$Definition` was modified + +* `withLdapConfiguration(models.LdapConfiguration)` was added + +#### `models.Volume$Definition` was modified + +* `withLdapServerType(models.LdapServerType)` was added +* `withBreakthroughMode(models.BreakthroughMode)` was added +* `withLargeVolumeType(models.LargeVolumeType)` was added +* `withLanguage(models.VolumeLanguage)` was added + +#### `models.ReplicationObject` was modified + +* `mirrorState()` was added +* `externalReplicationSetupInfo()` was added +* `externalReplicationSetupStatus()` was added +* `relationshipStatus()` was added + +#### `models.NetAppAccountPatch` was modified + +* `ldapConfiguration()` was added +* `withLdapConfiguration(models.LdapConfiguration)` was added + +#### `models.NetAppAccount$Update` was modified + +* `withLdapConfiguration(models.LdapConfiguration)` was added + +#### `models.VolumeGroupVolumeProperties` was modified + +* `language()` was added +* `withLargeVolumeType(models.LargeVolumeType)` was added +* `withBreakthroughMode(models.BreakthroughMode)` was added +* `withLanguage(models.VolumeLanguage)` was added +* `breakthroughMode()` was added +* `ldapServerType()` was added +* `withLdapServerType(models.LdapServerType)` was added +* `largeVolumeType()` was added + +#### `models.Volume` was modified + +* `largeVolumeType()` was added +* `language()` was added +* `listQuotaReport()` was added +* `ldapServerType()` was added +* `breakthroughMode()` was added +* `listQuotaReport(com.azure.core.util.Context)` was added + +#### `models.VolumePropertiesDataProtection` was modified + +* `ransomwareProtection()` was added +* `withRansomwareProtection(models.RansomwareProtectionSettings)` was added + +#### `NetAppFilesManager` was modified + +* `elasticAccounts()` was added +* `ransomwareReports()` was added +* `buckets()` was added +* `elasticSnapshotPolicies()` was added +* `activeDirectoryConfigs()` was added +* `caches()` was added +* `elasticBackupVaults()` was added +* `elasticBackupPolicies()` was added +* `elasticCapacityPools()` was added +* `elasticVolumes()` was added +* `elasticSnapshots()` was added +* `elasticBackups()` was added + +#### `models.VolumePatchPropertiesDataProtection` was modified + +* `ransomwareProtection()` was added +* `withRansomwareProtection(models.RansomwareProtectionPatchSettings)` was added + +#### `models.Volumes` was modified + +* `listQuotaReport(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `listQuotaReport(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was added + +#### `models.NetAppAccount` was modified + +* `ldapConfiguration()` was added ## 2.0.0 (2025-11-14) diff --git a/sdk/netapp/azure-resourcemanager-netapp/README.md b/sdk/netapp/azure-resourcemanager-netapp/README.md index 0b8c251666c9..c3de9f22d1a4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/README.md +++ b/sdk/netapp/azure-resourcemanager-netapp/README.md @@ -2,7 +2,7 @@ Azure Resource Manager NetAppFiles client library for Java. -This package contains Microsoft Azure SDK for NetAppFiles Management SDK. Microsoft NetApp Files Azure Resource Provider specification. Package api-version 2025-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for NetAppFiles Management SDK. Microsoft NetApp Files Azure Resource Provider specification. Package api-version 2025-09-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-netapp</artifactId> - <version>2.0.0</version> + <version>2.1.0-beta.1</version> </dependency> ``` [//]: # ({x-version-update-end}) diff --git a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md index 9efb1f0e562a..98d746b14c13 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md +++ b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md @@ -14,6 +14,15 @@ - [TransitionToCmk](#accounts_transitiontocmk) - [Update](#accounts_update) +## ActiveDirectoryConfigs + +- [CreateOrUpdate](#activedirectoryconfigs_createorupdate) +- [Delete](#activedirectoryconfigs_delete) +- [GetByResourceGroup](#activedirectoryconfigs_getbyresourcegroup) +- [List](#activedirectoryconfigs_list) +- [ListByResourceGroup](#activedirectoryconfigs_listbyresourcegroup) +- [Update](#activedirectoryconfigs_update) + ## BackupPolicies - [Create](#backuppolicies_create) @@ -52,6 +61,93 @@ - [MigrateBackups](#backupsundervolume_migratebackups) +## Buckets + +- [CreateOrUpdate](#buckets_createorupdate) +- [Delete](#buckets_delete) +- [GenerateCredentials](#buckets_generatecredentials) +- [Get](#buckets_get) +- [List](#buckets_list) +- [Update](#buckets_update) + +## Caches + +- [CreateOrUpdate](#caches_createorupdate) +- [Delete](#caches_delete) +- [Get](#caches_get) +- [ListByCapacityPools](#caches_listbycapacitypools) +- [ListPeeringPassphrases](#caches_listpeeringpassphrases) +- [PoolChange](#caches_poolchange) +- [Update](#caches_update) + +## ElasticAccounts + +- [CreateOrUpdate](#elasticaccounts_createorupdate) +- [Delete](#elasticaccounts_delete) +- [GetByResourceGroup](#elasticaccounts_getbyresourcegroup) +- [List](#elasticaccounts_list) +- [ListByResourceGroup](#elasticaccounts_listbyresourcegroup) +- [Update](#elasticaccounts_update) + +## ElasticBackupPolicies + +- [CreateOrUpdate](#elasticbackuppolicies_createorupdate) +- [Delete](#elasticbackuppolicies_delete) +- [Get](#elasticbackuppolicies_get) +- [ListByElasticAccount](#elasticbackuppolicies_listbyelasticaccount) +- [Update](#elasticbackuppolicies_update) + +## ElasticBackupVaults + +- [CreateOrUpdate](#elasticbackupvaults_createorupdate) +- [Delete](#elasticbackupvaults_delete) +- [Get](#elasticbackupvaults_get) +- [ListByElasticAccount](#elasticbackupvaults_listbyelasticaccount) +- [Update](#elasticbackupvaults_update) + +## ElasticBackups + +- [CreateOrUpdate](#elasticbackups_createorupdate) +- [Delete](#elasticbackups_delete) +- [Get](#elasticbackups_get) +- [ListByVault](#elasticbackups_listbyvault) +- [Update](#elasticbackups_update) + +## ElasticCapacityPools + +- [ChangeZone](#elasticcapacitypools_changezone) +- [CheckVolumeFilePathAvailability](#elasticcapacitypools_checkvolumefilepathavailability) +- [CreateOrUpdate](#elasticcapacitypools_createorupdate) +- [Delete](#elasticcapacitypools_delete) +- [Get](#elasticcapacitypools_get) +- [ListByElasticAccount](#elasticcapacitypools_listbyelasticaccount) +- [Update](#elasticcapacitypools_update) + +## ElasticSnapshotPolicies + +- [CreateOrUpdate](#elasticsnapshotpolicies_createorupdate) +- [Delete](#elasticsnapshotpolicies_delete) +- [Get](#elasticsnapshotpolicies_get) +- [ListByElasticAccount](#elasticsnapshotpolicies_listbyelasticaccount) +- [ListElasticVolumes](#elasticsnapshotpolicies_listelasticvolumes) +- [Update](#elasticsnapshotpolicies_update) + +## ElasticSnapshots + +- [CreateOrUpdate](#elasticsnapshots_createorupdate) +- [Delete](#elasticsnapshots_delete) +- [Get](#elasticsnapshots_get) +- [ListByElasticVolume](#elasticsnapshots_listbyelasticvolume) + +## ElasticVolumes + +- [CreateOrUpdate](#elasticvolumes_createorupdate) +- [Delete](#elasticvolumes_delete) +- [Get](#elasticvolumes_get) +- [ListByElasticPool](#elasticvolumes_listbyelasticpool) +- [Revert](#elasticvolumes_revert) +- [Update](#elasticvolumes_update) + ## NetAppResource - [CheckFilePathAvailability](#netappresource_checkfilepathavailability) @@ -93,6 +189,12 @@ - [List](#pools_list) - [Update](#pools_update) +## RansomwareReports + +- [ClearSuspects](#ransomwarereports_clearsuspects) +- [Get](#ransomwarereports_get) +- [List](#ransomwarereports_list) + ## SnapshotPolicies - [Create](#snapshotpolicies_create) @@ -148,6 +250,7 @@ - [Get](#volumes_get) - [List](#volumes_list) - [ListGetGroupIdListForLdapUser](#volumes_listgetgroupidlistforldapuser) +- [ListQuotaReport](#volumes_listquotareport) - [ListReplications](#volumes_listreplications) - [PeerExternalCluster](#volumes_peerexternalcluster) - [PerformReplicationTransfer](#volumes_performreplicationtransfer) @@ -175,7 +278,7 @@ import java.util.Arrays; */ public final class AccountsChangeKeyVaultSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_ChangeKeyVault.json + * x-ms-original-file: 2025-09-01-preview/Accounts_ChangeKeyVault.json */ /** * Sample code: Accounts_ChangeKeyVault. @@ -207,7 +310,7 @@ import java.util.Arrays; */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01-preview/Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. @@ -219,7 +322,7 @@ public final class AccountsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-09-01/Accounts_CreateOrUpdateAD.json + * x-ms-original-file: 2025-09-01-preview/Accounts_CreateOrUpdateAD.json */ /** * Sample code: Accounts_CreateOrUpdateWithActiveDirectory. @@ -255,7 +358,7 @@ public final class AccountsCreateOrUpdateSamples { */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_Delete.json + * x-ms-original-file: 2025-09-01-preview/Accounts_Delete.json */ /** * Sample code: Accounts_Delete. @@ -276,7 +379,7 @@ public final class AccountsDeleteSamples { */ public final class AccountsGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_Get.json + * x-ms-original-file: 2025-09-01-preview/Accounts_Get.json */ /** * Sample code: Accounts_Get. @@ -297,7 +400,7 @@ public final class AccountsGetByResourceGroupSamples { */ public final class AccountsGetChangeKeyVaultInformationSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_GetChangeKeyVaultInformation.json + * x-ms-original-file: 2025-09-01-preview/Accounts_GetChangeKeyVaultInformation.json */ /** * Sample code: Accounts_GetChangeKeyVaultInformation. @@ -319,7 +422,7 @@ public final class AccountsGetChangeKeyVaultInformationSamples { */ public final class AccountsListSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_ListBySubscription.json + * x-ms-original-file: 2025-09-01-preview/Accounts_ListBySubscription.json */ /** * Sample code: Accounts_ListBySubscription. @@ -340,7 +443,7 @@ public final class AccountsListSamples { */ public final class AccountsListByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_List.json + * x-ms-original-file: 2025-09-01-preview/Accounts_List.json */ /** * Sample code: Accounts_List. @@ -361,7 +464,7 @@ public final class AccountsListByResourceGroupSamples { */ public final class AccountsRenewCredentialsSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_RenewCredentials.json + * x-ms-original-file: 2025-09-01-preview/Accounts_RenewCredentials.json */ /** * Sample code: Accounts_RenewCredentials. @@ -384,7 +487,7 @@ import com.azure.resourcemanager.netapp.models.EncryptionTransitionRequest; */ public final class AccountsTransitionToCmkSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_TransitionEncryptionKey.json + * x-ms-original-file: 2025-09-01-preview/Accounts_TransitionEncryptionKey.json */ /** * Sample code: Accounts_MigrateEncryptionKey. @@ -414,7 +517,7 @@ import java.util.Map; */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_Update.json + * x-ms-original-file: 2025-09-01-preview/Accounts_Update.json */ /** * Sample code: Accounts_Update. @@ -442,6 +545,191 @@ public final class AccountsUpdateSamples { } ``` +### ActiveDirectoryConfigs_CreateOrUpdate + +```java +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.netapp.models.SecretPassword; +import com.azure.resourcemanager.netapp.models.SecretPasswordIdentity; +import com.azure.resourcemanager.netapp.models.SecretPasswordKeyVaultProperties; +import com.azure.resourcemanager.netapp.models.UserAssignedIdentity; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ActiveDirectoryConfigs CreateOrUpdate. + */ +public final class ActiveDirectoryConfigsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_CreateOrUpdate.json + */ + /** + * Sample code: ActiveDirectoryConfigs_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + activeDirectoryConfigsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs() + .define("adconfig1") + .withRegion("eastus") + .withExistingResourceGroup("myRG") + .withTags(mapOf("ac-tag1", "activeDirectoryConfig1")) + .withProperties(new ActiveDirectoryConfigProperties().withUserName("admin1") + .withDns(Arrays.asList("10.10.10.4", "10.10.10.5")) + .withSmbServerName("smbServer") + .withOrganizationalUnit("OU=Computers,DC=corp,DC=contoso,DC=com") + .withSite("Default-First-Site-Name") + .withBackupOperators(Arrays.asList("backupOp1")) + .withAdministrators(Arrays.asList("admin1")) + .withSecurityOperators(Arrays.asList("secOp1")) + .withDomain("example.net") + .withSecretPassword(new SecretPassword() + .withKeyVaultProperties( + new SecretPasswordKeyVaultProperties().withKeyVaultUri("fakeTokenPlaceholder") + .withSecretName("fakeTokenPlaceholder")) + .withIdentity(new SecretPasswordIdentity().withUserAssignedIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentity1")))) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentity1", + new UserAssignedIdentity()))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### ActiveDirectoryConfigs_Delete + +```java +/** + * Samples for ActiveDirectoryConfigs Delete. + */ +public final class ActiveDirectoryConfigsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_Delete.json + */ + /** + * Sample code: ActiveDirectoryConfigs_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void activeDirectoryConfigsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs().delete("myRG", "adconfig1", com.azure.core.util.Context.NONE); + } +} +``` + +### ActiveDirectoryConfigs_GetByResourceGroup + +```java +/** + * Samples for ActiveDirectoryConfigs GetByResourceGroup. + */ +public final class ActiveDirectoryConfigsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_Get.json + */ + /** + * Sample code: ActiveDirectoryConfigs_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void activeDirectoryConfigsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs() + .getByResourceGroupWithResponse("myRG", "adconfig1", com.azure.core.util.Context.NONE); + } +} +``` + +### ActiveDirectoryConfigs_List + +```java +/** + * Samples for ActiveDirectoryConfigs List. + */ +public final class ActiveDirectoryConfigsListSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_ListBySubscription.json + */ + /** + * Sample code: ActiveDirectoryConfigs_ListBySubscription. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + activeDirectoryConfigsListBySubscription(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs().list(com.azure.core.util.Context.NONE); + } +} +``` + +### ActiveDirectoryConfigs_ListByResourceGroup + +```java +/** + * Samples for ActiveDirectoryConfigs ListByResourceGroup. + */ +public final class ActiveDirectoryConfigsListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_ListByResourceGroup.json + */ + /** + * Sample code: ActiveDirectoryConfigs_ListByResourceGroup. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + activeDirectoryConfigsListByResourceGroup(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs().listByResourceGroup("myRG", com.azure.core.util.Context.NONE); + } +} +``` + +### ActiveDirectoryConfigs_Update + +```java +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfig; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdateProperties; + +/** + * Samples for ActiveDirectoryConfigs Update. + */ +public final class ActiveDirectoryConfigsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_Update.json + */ + /** + * Sample code: ActiveDirectoryConfigs_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void activeDirectoryConfigsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ActiveDirectoryConfig resource = manager.activeDirectoryConfigs() + .getByResourceGroupWithResponse("myRG", "adconfig1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ActiveDirectoryConfigUpdateProperties().withSmbServerName("smbServer2")) + .apply(); + } +} +``` + ### BackupPolicies_Create ```java @@ -450,7 +738,7 @@ public final class AccountsUpdateSamples { */ public final class BackupPoliciesCreateSamples { /* - * x-ms-original-file: 2025-09-01/BackupPolicies_Create.json + * x-ms-original-file: 2025-09-01-preview/BackupPolicies_Create.json */ /** * Sample code: BackupPolicies_Create. @@ -479,7 +767,7 @@ public final class BackupPoliciesCreateSamples { */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/BackupPolicies_Delete.json + * x-ms-original-file: 2025-09-01-preview/BackupPolicies_Delete.json */ /** * Sample code: BackupPolicies_Delete. @@ -501,7 +789,7 @@ public final class BackupPoliciesDeleteSamples { */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: 2025-09-01/BackupPolicies_Get.json + * x-ms-original-file: 2025-09-01-preview/BackupPolicies_Get.json */ /** * Sample code: Backups_Get. @@ -523,7 +811,7 @@ public final class BackupPoliciesGetSamples { */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: 2025-09-01/BackupPolicies_List.json + * x-ms-original-file: 2025-09-01-preview/BackupPolicies_List.json */ /** * Sample code: BackupPolicies_List. @@ -542,399 +830,1975 @@ public final class BackupPoliciesListSamples { import com.azure.resourcemanager.netapp.models.BackupPolicy; /** - * Samples for BackupPolicies Update. + * Samples for BackupPolicies Update. + */ +public final class BackupPoliciesUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupPolicies_Update.json + */ + /** + * Sample code: BackupPolicies_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + BackupPolicy resource = manager.backupPolicies() + .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withDailyBackupsToKeep(5) + .withWeeklyBackupsToKeep(10) + .withMonthlyBackupsToKeep(10) + .withEnabled(false) + .apply(); + } +} +``` + +### BackupVaults_CreateOrUpdate + +```java +/** + * Samples for BackupVaults CreateOrUpdate. + */ +public final class BackupVaultsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupVaults_Create.json + */ + /** + * Sample code: BackupVault_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupVaults() + .define("backupVault1") + .withRegion("eastus") + .withExistingNetAppAccount("myRG", "account1") + .create(); + } +} +``` + +### BackupVaults_Delete + +```java +/** + * Samples for BackupVaults Delete. + */ +public final class BackupVaultsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupVaults_Delete.json + */ + /** + * Sample code: BackupVaults_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupVaults().delete("resourceGroup", "account1", "backupVault1", com.azure.core.util.Context.NONE); + } +} +``` + +### BackupVaults_Get + +```java +/** + * Samples for BackupVaults Get. + */ +public final class BackupVaultsGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupVaults_Get.json + */ + /** + * Sample code: BackupVaults_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupVaults().getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE); + } +} +``` + +### BackupVaults_ListByNetAppAccount + +```java +/** + * Samples for BackupVaults ListByNetAppAccount. + */ +public final class BackupVaultsListByNetAppAccountSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupVaults_List.json + */ + /** + * Sample code: BackupVaults_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupVaults().listByNetAppAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} +``` + +### BackupVaults_Update + +```java +import com.azure.resourcemanager.netapp.models.BackupVault; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for BackupVaults Update. + */ +public final class BackupVaultsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupVaults_Update.json + */ + /** + * Sample code: BackupVaults_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + BackupVault resource = manager.backupVaults() + .getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("Tag1", "Value1")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### Backups_Create + +```java +/** + * Samples for Backups Create. + */ +public final class BackupsCreateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_Create.json + */ + /** + * Sample code: BackupsUnderBackupVault_Create. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderBackupVaultCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .define("backup1") + .withExistingBackupVault("myRG", "account1", "backupVault1") + .withVolumeResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPool/pool1/volumes/volume1") + .withLabel("myLabel") + .create(); + } +} +``` + +### Backups_Delete + +```java +/** + * Samples for Backups Delete. + */ +public final class BackupsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_Delete.json + */ + /** + * Sample code: BackupsUnderBackupVault_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderBackupVaultDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .delete("resourceGroup", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + } +} +``` + +### Backups_Get + +```java +/** + * Samples for Backups Get. + */ +public final class BackupsGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_Get.json + */ + /** + * Sample code: BackupsUnderBackupVault_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderBackupVaultGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + } +} +``` + +### Backups_GetLatestStatus + +```java +/** + * Samples for Backups GetLatestStatus. + */ +public final class BackupsGetLatestStatusSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Volumes_LatestBackupStatus.json + */ + /** + * Sample code: Volumes_BackupStatus. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesBackupStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .getLatestStatusWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} +``` + +### Backups_GetVolumeLatestRestoreStatus + +```java +/** + * Samples for Backups GetVolumeLatestRestoreStatus. + */ +public final class BackupsGetVolumeLatestRestoreStatusSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Volumes_LatestRestoreStatus.json + */ + /** + * Sample code: Volumes_RestoreStatus. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesRestoreStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .getVolumeLatestRestoreStatusWithResponse("myRG", "account1", "pool1", "volume1", + com.azure.core.util.Context.NONE); + } +} +``` + +### Backups_ListByVault + +```java +/** + * Samples for Backups ListByVault. + */ +public final class BackupsListByVaultSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Backups_ListByVault.json + */ + /** + * Sample code: Backups_ListByVault. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsListByVault(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups().listByVault("myRG", "account1", "backupVault1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### Backups_Update + +```java +import com.azure.resourcemanager.netapp.models.Backup; + +/** + * Samples for Backups Update. + */ +public final class BackupsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_Update.json + */ + /** + * Sample code: BackupsUnderBackupVault_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderBackupVaultUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + Backup resource = manager.backups() + .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + +### BackupsUnderAccount_MigrateBackups + +```java +import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; + +/** + * Samples for BackupsUnderAccount MigrateBackups. + */ +public final class BackupsUnderAccountMigrateBackupsSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupsUnderAccount_Migrate.json + */ + /** + * Sample code: BackupsUnderAccount_Migrate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderAccountMigrate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupsUnderAccounts() + .migrateBackups("myRG", "account1", new BackupsMigrationRequest().withBackupVaultId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), + com.azure.core.util.Context.NONE); + } +} +``` + +### BackupsUnderBackupVault_RestoreFiles + +```java +import com.azure.resourcemanager.netapp.models.BackupRestoreFiles; +import java.util.Arrays; + +/** + * Samples for BackupsUnderBackupVault RestoreFiles. + */ +public final class BackupsUnderBackupVaultRestoreFilesSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_SingleFileRestore.json + */ + /** + * Sample code: Backups_SingleFileRestore. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsSingleFileRestore(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupsUnderBackupVaults() + .restoreFiles("myRG", "account1", "backupVault1", "backup1", new BackupRestoreFiles() + .withFileList(Arrays.asList("/dir1/customer1.db", "/dir1/customer2.db")) + .withDestinationVolumeId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"), + com.azure.core.util.Context.NONE); + } +} +``` + +### BackupsUnderVolume_MigrateBackups + +```java +import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; + +/** + * Samples for BackupsUnderVolume MigrateBackups. + */ +public final class BackupsUnderVolumeMigrateBackupsSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupsUnderVolume_Migrate.json + */ + /** + * Sample code: BackupsUnderVolume_Migrate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderVolumeMigrate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupsUnderVolumes() + .migrateBackups("myRG", "account1", "pool1", "volume1", new BackupsMigrationRequest().withBackupVaultId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), + com.azure.core.util.Context.NONE); + } +} +``` + +### Buckets_CreateOrUpdate + +```java +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerProperties; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.NfsUser; + +/** + * Samples for Buckets CreateOrUpdate. + */ +public final class BucketsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Buckets_CreateOrUpdate.json + */ + /** + * Sample code: Buckets_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets() + .define("bucket1") + .withExistingVolume("myRG", "account1", "pool1", "volume1") + .withPath("/path") + .withFileSystemUser(new FileSystemUser().withNfsUser(new NfsUser().withUserId(1001L).withGroupId(1000L))) + .withServer(new BucketServerProperties().withFqdn("fullyqualified.domainname.com") + .withCertificateObject("<REDACTED>")) + .withPermissions(BucketPermissions.READ_ONLY) + .create(); + } +} +``` + +### Buckets_Delete + +```java +/** + * Samples for Buckets Delete. + */ +public final class BucketsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Buckets_Delete.json + */ + /** + * Sample code: Buckets_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets().delete("myRG", "account1", "pool1", "volume1", "bucket1", com.azure.core.util.Context.NONE); + } +} +``` + +### Buckets_GenerateCredentials + +```java +import com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry; + +/** + * Samples for Buckets GenerateCredentials. + */ +public final class BucketsGenerateCredentialsSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Buckets_GenerateCredentials.json + */ + /** + * Sample code: Buckets_GenerateCredentials. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsGenerateCredentials(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets() + .generateCredentialsWithResponse("myRG", "account1", "pool1", "volume1", "bucket1", + new BucketCredentialsExpiry().withKeyPairExpiryDays(3), com.azure.core.util.Context.NONE); + } +} +``` + +### Buckets_Get + +```java +/** + * Samples for Buckets Get. + */ +public final class BucketsGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Buckets_Get.json + */ + /** + * Sample code: Buckets_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets() + .getWithResponse("myRG", "account1", "pool1", "volume1", "bucket1", com.azure.core.util.Context.NONE); + } +} +``` + +### Buckets_List + +```java +/** + * Samples for Buckets List. + */ +public final class BucketsListSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Buckets_List.json + */ + /** + * Sample code: Buckets_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets().list("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} +``` + +### Buckets_Update + +```java +import com.azure.resourcemanager.netapp.models.Bucket; +import com.azure.resourcemanager.netapp.models.BucketPatchPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerPatchProperties; + +/** + * Samples for Buckets Update. + */ +public final class BucketsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Buckets_Update.json + */ + /** + * Sample code: Buckets_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + Bucket resource = manager.buckets() + .getWithResponse("myRG", "account1", "pool1", "volume1", "bucket1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withServer(new BucketServerPatchProperties().withFqdn("fullyqualified.domainname.com") + .withCertificateObject("<REDACTED>")) + .withPermissions(BucketPatchPermissions.READ_WRITE) + .apply(); + } +} +``` + +### Caches_CreateOrUpdate + +```java +import com.azure.resourcemanager.netapp.models.CacheProperties; +import com.azure.resourcemanager.netapp.models.EncryptionKeySource; +import com.azure.resourcemanager.netapp.models.LdapServerType; +import com.azure.resourcemanager.netapp.models.LdapState; +import com.azure.resourcemanager.netapp.models.OriginClusterInformation; +import java.util.Arrays; + +/** + * Samples for Caches CreateOrUpdate. + */ +public final class CachesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Caches_CreateOrUpdate.json + */ + /** + * Sample code: Caches_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches() + .define("cache1") + .withRegion("eastus") + .withExistingCapacityPool("myRG", "account1", "pool1") + .withProperties(new CacheProperties().withFilepath("cache-west-us2-01") + .withSize(107374182400L) + .withCacheSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/cacheVnet/subnets/cacheSubnet1") + .withPeeringSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/icLifVnet/subnets/peeringSubnet1") + .withEncryptionKeySource(EncryptionKeySource.MICROSOFT_NET_APP) + .withLdap(LdapState.ENABLED) + .withLdapServerType(LdapServerType.OPEN_LDAP) + .withOriginClusterInformation(new OriginClusterInformation().withPeerClusterName("cluster1") + .withPeerAddresses(Arrays.asList("192.0.2.10", "192.0.2.11")) + .withPeerVserverName("vserver1") + .withPeerVolumeName("originvol1"))) + .create(); + } +} +``` + +### Caches_Delete + +```java +/** + * Samples for Caches Delete. + */ +public final class CachesDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Caches_Delete.json + */ + /** + * Sample code: Caches_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches().delete("myRG", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE); + } +} +``` + +### Caches_Get + +```java +/** + * Samples for Caches Get. + */ +public final class CachesGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Caches_Get.json + */ + /** + * Sample code: Caches_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches().getWithResponse("myRG", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE); + } +} +``` + +### Caches_ListByCapacityPools + +```java +/** + * Samples for Caches ListByCapacityPools. + */ +public final class CachesListByCapacityPoolsSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Caches_ListByCapacityPools.json + */ + /** + * Sample code: Caches_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches().listByCapacityPools("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } +} +``` + +### Caches_ListPeeringPassphrases + +```java +/** + * Samples for Caches ListPeeringPassphrases. + */ +public final class CachesListPeeringPassphrasesSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Caches_ListPeeringPassphrases.json + */ + /** + * Sample code: Caches_ListPeeringPassphrases. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesListPeeringPassphrases(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches() + .listPeeringPassphrasesWithResponse("myRG", "account1", "pool1", "cache-1", + com.azure.core.util.Context.NONE); + } +} +``` + +### Caches_PoolChange + +```java +import com.azure.resourcemanager.netapp.models.PoolChangeRequest; + +/** + * Samples for Caches PoolChange. + */ +public final class CachesPoolChangeSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Caches_PoolChange.json + */ + /** + * Sample code: Caches_PoolChange. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesPoolChange(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches() + .poolChange("myRG", "account1", "pool1", "cache1", new PoolChangeRequest().withNewPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool2"), + com.azure.core.util.Context.NONE); + } +} +``` + +### Caches_Update + +```java +import com.azure.resourcemanager.netapp.models.Cache; +import com.azure.resourcemanager.netapp.models.CacheUpdateProperties; + +/** + * Samples for Caches Update. + */ +public final class CachesUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Caches_Update.json + */ + /** + * Sample code: Caches_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + Cache resource = manager.caches() + .getWithResponse("myRG", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withProperties(new CacheUpdateProperties().withSize(214748364800L)).apply(); + } +} +``` + +### ElasticAccounts_CreateOrUpdate + +```java +import com.azure.resourcemanager.netapp.models.ElasticAccountProperties; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ElasticAccounts CreateOrUpdate. + */ +public final class ElasticAccountsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticAccounts_CreateOrUpdate.json + */ + /** + * Sample code: ElasticAccounts_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts() + .define("account1") + .withRegion("eastus") + .withExistingResourceGroup("myRG") + .withTags(mapOf("ac-tag1", "account1")) + .withProperties(new ElasticAccountProperties()) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### ElasticAccounts_Delete + +```java +/** + * Samples for ElasticAccounts Delete. + */ +public final class ElasticAccountsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticAccounts_Delete.json + */ + /** + * Sample code: ElasticAccounts_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().delete("myRG", "account1", com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticAccounts_GetByResourceGroup + +```java +/** + * Samples for ElasticAccounts GetByResourceGroup. + */ +public final class ElasticAccountsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticAccounts_Get.json + */ + /** + * Sample code: ElasticAccounts_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().getByResourceGroupWithResponse("myRG", "account1", com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticAccounts_List + +```java +/** + * Samples for ElasticAccounts List. + */ +public final class ElasticAccountsListSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticAccounts_ListBySubscription.json + */ + /** + * Sample code: ElasticAccounts_ListBySubscription. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsListBySubscription(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().list(com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticAccounts_ListByResourceGroup + +```java +/** + * Samples for ElasticAccounts ListByResourceGroup. + */ +public final class ElasticAccountsListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticAccounts_ListByResourceGroup.json + */ + /** + * Sample code: ElasticAccounts_ListByResourceGroup. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsListByResourceGroup(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().listByResourceGroup("myRG", com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticAccounts_Update + +```java +import com.azure.resourcemanager.netapp.models.ElasticAccount; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ElasticAccounts Update. + */ +public final class ElasticAccountsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticAccounts_Update.json + */ + /** + * Sample code: ElasticAccounts_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticAccount resource = manager.elasticAccounts() + .getByResourceGroupWithResponse("myRG", "account1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("Tag1", "Value1")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### ElasticBackupPolicies_CreateOrUpdate + +```java +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; + +/** + * Samples for ElasticBackupPolicies CreateOrUpdate. + */ +public final class ElasticBackupPoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupPolicies_CreateOrUpdate.json + */ + /** + * Sample code: ElasticBackupPolicies_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticBackupPoliciesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies() + .define("backupPolicyName") + .withRegion("westus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticBackupPolicyProperties().withDailyBackupsToKeep(10) + .withWeeklyBackupsToKeep(10) + .withMonthlyBackupsToKeep(10) + .withPolicyState(ElasticBackupPolicyState.ENABLED)) + .create(); + } +} +``` + +### ElasticBackupPolicies_Delete + +```java +/** + * Samples for ElasticBackupPolicies Delete. + */ +public final class ElasticBackupPoliciesDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupPolicies_Delete.json + */ + /** + * Sample code: ElasticBackupPolicies_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies() + .delete("resourceGroup", "accountName", "backupPolicyName", com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticBackupPolicies_Get + +```java +/** + * Samples for ElasticBackupPolicies Get. + */ +public final class ElasticBackupPoliciesGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupPolicies_Get.json + */ + /** + * Sample code: ElasticBackupPolicies_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupPoliciesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies() + .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticBackupPolicies_ListByElasticAccount + +```java +/** + * Samples for ElasticBackupPolicies ListByElasticAccount. + */ +public final class ElasticBackupPoliciesListByElasticAccountSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupPolicies_List.json + */ + /** + * Sample code: ElasticBackupPolicies_ListByElasticAccount. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticBackupPoliciesListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticBackupPolicies_Update + +```java +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicy; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdateProperties; + +/** + * Samples for ElasticBackupPolicies Update. + */ +public final class ElasticBackupPoliciesUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupPolicies_Update.json + */ + /** + * Sample code: ElasticBackupPolicies_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticBackupPolicy resource = manager.elasticBackupPolicies() + .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ElasticBackupPolicyUpdateProperties().withDailyBackupsToKeep(5) + .withWeeklyBackupsToKeep(10) + .withMonthlyBackupsToKeep(10) + .withPolicyState(ElasticBackupPolicyState.ENABLED)) + .apply(); + } +} +``` + +### ElasticBackupVaults_CreateOrUpdate + +```java +/** + * Samples for ElasticBackupVaults CreateOrUpdate. + */ +public final class ElasticBackupVaultsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupVaults_Create.json + */ + /** + * Sample code: ElasticBackupVaults_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupVaultsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults() + .define("backupVault1") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .create(); + } +} +``` + +### ElasticBackupVaults_Delete + +```java +/** + * Samples for ElasticBackupVaults Delete. + */ +public final class ElasticBackupVaultsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupVaults_Delete.json + */ + /** + * Sample code: ElasticBackupVaults_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupVaultsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults() + .delete("resourceGroup", "account1", "backupVault1", com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticBackupVaults_Get + +```java +/** + * Samples for ElasticBackupVaults Get. + */ +public final class ElasticBackupVaultsGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupVaults_Get.json + */ + /** + * Sample code: ElasticBackupVaults_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupVaultsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults() + .getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticBackupVaults_ListByElasticAccount + +```java +/** + * Samples for ElasticBackupVaults ListByElasticAccount. + */ +public final class ElasticBackupVaultsListByElasticAccountSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupVaults_ListByElasticAccount.json + */ + /** + * Sample code: ElasticBackupVaults_ListByElasticAccount. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticBackupVaultsListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticBackupVaults_Update + +```java +import com.azure.resourcemanager.netapp.models.ElasticBackupVault; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ElasticBackupVaults Update. + */ +public final class ElasticBackupVaultsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupVaults_Update.json + */ + /** + * Sample code: ElasticBackupVaults_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupVaultsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticBackupVault resource = manager.elasticBackupVaults() + .getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("Tag1", "Value1")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### ElasticBackups_CreateOrUpdate + +```java +import com.azure.resourcemanager.netapp.models.ElasticBackupProperties; +import com.azure.resourcemanager.netapp.models.SnapshotUsage; + +/** + * Samples for ElasticBackups CreateOrUpdate. + */ +public final class ElasticBackupsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackups_CreateOrUpdate.json + */ + /** + * Sample code: ElasticBackups_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups() + .define("backup1") + .withExistingElasticBackupVault("myRG", "account1", "backupVault1") + .withProperties(new ElasticBackupProperties().withLabel("myLabel") + .withElasticVolumeResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1") + .withSnapshotUsage(SnapshotUsage.USE_EXISTING_SNAPSHOT) + .withElasticSnapshotResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1/elasticSnapshots/snap1")) + .create(); + } +} +``` + +### ElasticBackups_Delete + +```java +/** + * Samples for ElasticBackups Delete. + */ +public final class ElasticBackupsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackups_Delete.json + */ + /** + * Sample code: ElasticBackups_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups() + .delete("resourceGroup", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticBackups_Get + +```java +/** + * Samples for ElasticBackups Get. + */ +public final class ElasticBackupsGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackups_Get.json + */ + /** + * Sample code: ElasticBackups_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups() + .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticBackups_ListByVault + +```java +/** + * Samples for ElasticBackups ListByVault. + */ +public final class ElasticBackupsListByVaultSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackups_ListByVault.json + */ + /** + * Sample code: ElasticBackups_ListByVault. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsListByVault(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups().listByVault("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticBackups_Update + +```java +import com.azure.resourcemanager.netapp.models.ElasticBackup; + +/** + * Samples for ElasticBackups Update. + */ +public final class ElasticBackupsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackups_Update.json + */ + /** + * Sample code: ElasticBackups_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticBackup resource = manager.elasticBackups() + .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + +### ElasticCapacityPools_ChangeZone + +```java +import com.azure.resourcemanager.netapp.models.ChangeZoneRequest; + +/** + * Samples for ElasticCapacityPools ChangeZone. + */ +public final class ElasticCapacityPoolsChangeZoneSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_ChangeZone.json + */ + /** + * Sample code: ElasticCapacityPools_ChangeZone. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsChangeZone(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .changeZone("myRG", "account1", "pool1", new ChangeZoneRequest().withNewZone("3"), + com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticCapacityPools_CheckVolumeFilePathAvailability + +```java +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; + +/** + * Samples for ElasticCapacityPools CheckVolumeFilePathAvailability. + */ +public final class ElasticCapacityPoolsCheckVolumeFilePathAvailabilitySamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_CheckVolumeFilePathAvailability.json + */ + /** + * Sample code: ElasticCapacityPools_CheckVolumeFilePathAvailability. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsCheckVolumeFilePathAvailability( + com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .checkVolumeFilePathAvailabilityWithResponse("myRG", "account1", "pool1", + new CheckElasticVolumeFilePathAvailabilityRequest().withFilePath("my-exact-filepth"), + com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticCapacityPools_CreateOrUpdate + +```java +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolProperties; +import com.azure.resourcemanager.netapp.models.ElasticEncryptionConfiguration; +import com.azure.resourcemanager.netapp.models.ElasticPoolEncryptionKeySource; +import com.azure.resourcemanager.netapp.models.ElasticServiceLevel; +import java.util.Arrays; + +/** + * Samples for ElasticCapacityPools CreateOrUpdate. + */ +public final class ElasticCapacityPoolsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_CreateOrUpdateCMK.json + */ + /** + * Sample code: ElasticCapacityPools_CreateOrUpdateCMK. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticCapacityPoolsCreateOrUpdateCMK(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .define("pool1") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticCapacityPoolProperties().withSize(4398046511104L) + .withServiceLevel(ElasticServiceLevel.ZONE_REDUNDANT) + .withEncryption(new ElasticEncryptionConfiguration() + .withElasticPoolEncryptionKeySource(ElasticPoolEncryptionKeySource.NET_APP) + .withKeyVaultPrivateEndpointResourceId("fakeTokenPlaceholder")) + .withSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withActiveDirectoryConfigResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1")) + .withZones(Arrays.asList("1", "2", "3")) + .create(); + } + + /* + * x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_CreateOrUpdate.json + */ + /** + * Sample code: ElasticCapacityPools_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .define("pool1") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticCapacityPoolProperties().withSize(4398046511104L) + .withServiceLevel(ElasticServiceLevel.ZONE_REDUNDANT) + .withSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withActiveDirectoryConfigResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1")) + .withZones(Arrays.asList("1", "2", "3")) + .create(); + } +} +``` + +### ElasticCapacityPools_Delete + +```java +/** + * Samples for ElasticCapacityPools Delete. + */ +public final class ElasticCapacityPoolsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_Delete.json + */ + /** + * Sample code: ElasticCapacityPools_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools().delete("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticCapacityPools_Get + +```java +/** + * Samples for ElasticCapacityPools Get. + */ +public final class ElasticCapacityPoolsGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_Get.json + */ + /** + * Sample code: ElasticCapacityPools_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools().getWithResponse("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticCapacityPools_ListByElasticAccount + +```java +/** + * Samples for ElasticCapacityPools ListByElasticAccount. + */ +public final class ElasticCapacityPoolsListByElasticAccountSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_ListByElasticAccount.json + */ + /** + * Sample code: ElasticCapacityPools_ListByElasticAccount. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticCapacityPoolsListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticCapacityPools_Update + +```java +import com.azure.resourcemanager.netapp.models.ElasticCapacityPool; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdateProperties; + +/** + * Samples for ElasticCapacityPools Update. + */ +public final class ElasticCapacityPoolsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_Update.json + */ + /** + * Sample code: ElasticCapacityPools_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticCapacityPool resource = manager.elasticCapacityPools() + .getWithResponse("myRG", "account1", "pool1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ElasticCapacityPoolUpdateProperties().withSize(4398046511104L) + .withActiveDirectoryConfigResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1")) + .apply(); + } +} +``` + +### ElasticSnapshotPolicies_CreateOrUpdate + +```java +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.util.Arrays; + +/** + * Samples for ElasticSnapshotPolicies CreateOrUpdate. */ -public final class BackupPoliciesUpdateSamples { +public final class ElasticSnapshotPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/BackupPolicies_Update.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_CreateOrUpdate.json */ /** - * Sample code: BackupPolicies_Update. + * Sample code: ElasticSnapshotPolicies_CreateOrUpdate. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - BackupPolicy resource = manager.backupPolicies() - .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withDailyBackupsToKeep(5) - .withWeeklyBackupsToKeep(10) - .withMonthlyBackupsToKeep(10) - .withEnabled(false) - .apply(); + public static void + elasticSnapshotPoliciesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .define("snapshotPolicyName") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticSnapshotPolicyProperties() + .withHourlySchedule(new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(2).withMinute(50)) + .withDailySchedule( + new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(4).withHour(14).withMinute(30)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(3) + .withDays(Arrays.asList(DayOfWeek.WEDNESDAY)) + .withHour(14) + .withMinute(45)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(5) + .withDaysOfMonth(Arrays.asList(10, 11, 12)) + .withHour(14) + .withMinute(15)) + .withPolicyStatus(PolicyStatus.ENABLED)) + .create(); } } ``` -### BackupVaults_CreateOrUpdate +### ElasticSnapshotPolicies_Delete ```java /** - * Samples for BackupVaults CreateOrUpdate. + * Samples for ElasticSnapshotPolicies Delete. */ -public final class BackupVaultsCreateOrUpdateSamples { +public final class ElasticSnapshotPoliciesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/BackupVaults_Create.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_Delete.json */ /** - * Sample code: BackupVault_CreateOrUpdate. + * Sample code: ElasticSnapshotPolicies_Delete. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupVaultCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupVaults() - .define("backupVault1") - .withRegion("eastus") - .withExistingNetAppAccount("myRG", "account1") - .create(); + public static void elasticSnapshotPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .delete("resourceGroup", "accountName", "snapshotPolicyName", com.azure.core.util.Context.NONE); } } ``` -### BackupVaults_Delete +### ElasticSnapshotPolicies_Get ```java /** - * Samples for BackupVaults Delete. + * Samples for ElasticSnapshotPolicies Get. */ -public final class BackupVaultsDeleteSamples { +public final class ElasticSnapshotPoliciesGetSamples { /* - * x-ms-original-file: 2025-09-01/BackupVaults_Delete.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_Get.json */ /** - * Sample code: BackupVaults_Delete. + * Sample code: ElasticSnapshotPolicies_Get. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupVaultsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupVaults().delete("resourceGroup", "account1", "backupVault1", com.azure.core.util.Context.NONE); + public static void elasticSnapshotPoliciesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); } } ``` -### BackupVaults_Get +### ElasticSnapshotPolicies_ListByElasticAccount ```java /** - * Samples for BackupVaults Get. + * Samples for ElasticSnapshotPolicies ListByElasticAccount. */ -public final class BackupVaultsGetSamples { +public final class ElasticSnapshotPoliciesListByElasticAccountSamples { /* - * x-ms-original-file: 2025-09-01/BackupVaults_Get.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_ListByElasticAccount.json */ /** - * Sample code: BackupVaults_Get. + * Sample code: ElasticSnapshotPolicies_ListByElasticAccount. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupVaultsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupVaults().getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE); + public static void + elasticSnapshotPoliciesListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); } } ``` -### BackupVaults_ListByNetAppAccount +### ElasticSnapshotPolicies_ListElasticVolumes ```java /** - * Samples for BackupVaults ListByNetAppAccount. + * Samples for ElasticSnapshotPolicies ListElasticVolumes. */ -public final class BackupVaultsListByNetAppAccountSamples { +public final class ElasticSnapshotPoliciesListElasticVolumesSamples { /* - * x-ms-original-file: 2025-09-01/BackupVaults_List.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_ListElasticVolumes.json */ /** - * Sample code: BackupVaults_List. + * Sample code: ElasticSnapshotPolicies_ListElasticVolumes. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupVaultsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupVaults().listByNetAppAccount("myRG", "account1", com.azure.core.util.Context.NONE); + public static void + elasticSnapshotPoliciesListElasticVolumes(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .listElasticVolumes("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); } } ``` -### BackupVaults_Update +### ElasticSnapshotPolicies_Update ```java -import com.azure.resourcemanager.netapp.models.BackupVault; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicy; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdateProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.util.Arrays; /** - * Samples for BackupVaults Update. + * Samples for ElasticSnapshotPolicies Update. */ -public final class BackupVaultsUpdateSamples { +public final class ElasticSnapshotPoliciesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/BackupVaults_Update.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_Update.json */ /** - * Sample code: BackupVaults_Update. + * Sample code: ElasticSnapshotPolicies_Update. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupVaultsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - BackupVault resource = manager.backupVaults() - .getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE) + public static void elasticSnapshotPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticSnapshotPolicy resource = manager.elasticSnapshotPolicies() + .getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("Tag1", "Value1")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static <T> Map<String, T> mapOf(Object... inputs) { - Map<String, T> 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; + resource.update() + .withProperties(new ElasticSnapshotPolicyUpdateProperties() + .withHourlySchedule(new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(2).withMinute(50)) + .withDailySchedule( + new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(4).withHour(14).withMinute(30)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(3) + .withDays(Arrays.asList(DayOfWeek.WEDNESDAY)) + .withHour(14) + .withMinute(45)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(5) + .withDaysOfMonth(Arrays.asList(10, 11, 12)) + .withHour(14) + .withMinute(15)) + .withPolicyStatus(PolicyStatus.ENABLED)) + .apply(); } } ``` -### Backups_Create +### ElasticSnapshots_CreateOrUpdate ```java /** - * Samples for Backups Create. + * Samples for ElasticSnapshots CreateOrUpdate. */ -public final class BackupsCreateSamples { +public final class ElasticSnapshotsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_Create.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshots_CreateOrUpdate.json */ /** - * Sample code: BackupsUnderBackupVault_Create. + * Sample code: ElasticSnapshots_CreateOrUpdate. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsUnderBackupVaultCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups() - .define("backup1") - .withExistingBackupVault("myRG", "account1", "backupVault1") - .withVolumeResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPool/pool1/volumes/volume1") - .withLabel("myLabel") + public static void elasticSnapshotsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .define("snapshot1") + .withExistingElasticVolume("myRG", "account1", "pool1", "volume1") .create(); } } ``` -### Backups_Delete +### ElasticSnapshots_Delete ```java /** - * Samples for Backups Delete. + * Samples for ElasticSnapshots Delete. */ -public final class BackupsDeleteSamples { +public final class ElasticSnapshotsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_Delete.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshots_Delete.json */ /** - * Sample code: BackupsUnderBackupVault_Delete. + * Sample code: ElasticSnapshots_Delete. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsUnderBackupVaultDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups() - .delete("resourceGroup", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + public static void elasticSnapshotsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .delete("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); } } ``` -### Backups_Get +### ElasticSnapshots_Get ```java /** - * Samples for Backups Get. + * Samples for ElasticSnapshots Get. */ -public final class BackupsGetSamples { +public final class ElasticSnapshotsGetSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_Get.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshots_Get.json */ /** - * Sample code: BackupsUnderBackupVault_Get. + * Sample code: ElasticSnapshots_Get. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsUnderBackupVaultGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups() - .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + public static void elasticSnapshotsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .getWithResponse("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); } } ``` -### Backups_GetLatestStatus +### ElasticSnapshots_ListByElasticVolume ```java /** - * Samples for Backups GetLatestStatus. + * Samples for ElasticSnapshots ListByElasticVolume. */ -public final class BackupsGetLatestStatusSamples { +public final class ElasticSnapshotsListByElasticVolumeSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_LatestBackupStatus.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshots_ListByElasticVolume.json */ /** - * Sample code: Volumes_BackupStatus. + * Sample code: ElasticSnapshots_ListByElasticVolume. * * @param manager Entry point to NetAppFilesManager. */ - public static void volumesBackupStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups() - .getLatestStatusWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + public static void + elasticSnapshotsListByElasticVolume(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .listByElasticVolume("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); } } ``` -### Backups_GetVolumeLatestRestoreStatus +### ElasticVolumes_CreateOrUpdate ```java +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import java.util.Arrays; + /** - * Samples for Backups GetVolumeLatestRestoreStatus. + * Samples for ElasticVolumes CreateOrUpdate. */ -public final class BackupsGetVolumeLatestRestoreStatusSamples { +public final class ElasticVolumesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_LatestRestoreStatus.json + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_CreateOrUpdate.json */ /** - * Sample code: Volumes_RestoreStatus. + * Sample code: ElasticVolumes_CreateOrUpdate. * * @param manager Entry point to NetAppFilesManager. */ - public static void volumesRestoreStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups() - .getVolumeLatestRestoreStatusWithResponse("myRG", "account1", "pool1", "volume1", - com.azure.core.util.Context.NONE); + public static void elasticVolumesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes() + .define("volume1") + .withRegion("eastus") + .withExistingElasticCapacityPool("myRG", "account1", "pool1") + .withProperties(new ElasticVolumeProperties().withFilePath("my-unique-file-path") + .withSize(107374182400L) + .withExportPolicy( + new ElasticExportPolicy().withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(1) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("0.0.0.0/0")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV3)) + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupPolicies/elasticBackupPolicy1") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupVaults/elasticBackupVault1")))) + .create(); } } ``` -### Backups_ListByVault +### ElasticVolumes_Delete ```java /** - * Samples for Backups ListByVault. + * Samples for ElasticVolumes Delete. */ -public final class BackupsListByVaultSamples { +public final class ElasticVolumesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_List.json + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_Delete.json */ /** - * Sample code: Backups_List. + * Sample code: ElasticVolumes_Delete. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().listByVault("myRG", "account1", "backupVault1", null, com.azure.core.util.Context.NONE); + public static void elasticVolumesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes().delete("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); } } ``` -### Backups_Update +### ElasticVolumes_Get ```java -import com.azure.resourcemanager.netapp.models.Backup; - /** - * Samples for Backups Update. + * Samples for ElasticVolumes Get. */ -public final class BackupsUpdateSamples { +public final class ElasticVolumesGetSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_Update.json + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_Get.json */ /** - * Sample code: BackupsUnderBackupVault_Update. + * Sample code: ElasticVolumes_Get. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsUnderBackupVaultUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - Backup resource = manager.backups() - .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); + public static void elasticVolumesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes() + .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); } } ``` -### BackupsUnderAccount_MigrateBackups +### ElasticVolumes_ListByElasticPool ```java -import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; - /** - * Samples for BackupsUnderAccount MigrateBackups. + * Samples for ElasticVolumes ListByElasticPool. */ -public final class BackupsUnderAccountMigrateBackupsSamples { +public final class ElasticVolumesListByElasticPoolSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderAccount_Migrate.json + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_ListByElasticPool.json */ /** - * Sample code: BackupsUnderAccount_Migrate. + * Sample code: ElasticVolumes_ListByElasticPool. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsUnderAccountMigrate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupsUnderAccounts() - .migrateBackups("myRG", "account1", new BackupsMigrationRequest().withBackupVaultId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), - com.azure.core.util.Context.NONE); + public static void elasticVolumesListByElasticPool(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes().listByElasticPool("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); } } ``` -### BackupsUnderBackupVault_RestoreFiles +### ElasticVolumes_Revert ```java -import com.azure.resourcemanager.netapp.models.BackupRestoreFiles; -import java.util.Arrays; +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; /** - * Samples for BackupsUnderBackupVault RestoreFiles. + * Samples for ElasticVolumes Revert. */ -public final class BackupsUnderBackupVaultRestoreFilesSamples { +public final class ElasticVolumesRevertSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_SingleFileRestore.json + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_Revert.json */ /** - * Sample code: Backups_SingleFileRestore. + * Sample code: ElasticVolumes_Revert. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsSingleFileRestore(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupsUnderBackupVaults() - .restoreFiles("myRG", "account1", "backupVault1", "backup1", new BackupRestoreFiles() - .withFileList(Arrays.asList("/dir1/customer1.db", "/dir1/customer2.db")) - .withDestinationVolumeId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"), + public static void elasticVolumesRevert(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes() + .revert("myRG", "account1", "pool1", "volume1", new ElasticVolumeRevert().withSnapshotResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1/elasticSnapshots/snapshot1"), com.azure.core.util.Context.NONE); } } ``` -### BackupsUnderVolume_MigrateBackups +### ElasticVolumes_Update ```java -import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionPatchProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties; +import java.util.Arrays; /** - * Samples for BackupsUnderVolume MigrateBackups. + * Samples for ElasticVolumes Update. */ -public final class BackupsUnderVolumeMigrateBackupsSamples { +public final class ElasticVolumesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderVolume_Migrate.json + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_Update.json */ /** - * Sample code: BackupsUnderVolume_Migrate. + * Sample code: ElasticVolumes_Update. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsUnderVolumeMigrate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupsUnderVolumes() - .migrateBackups("myRG", "account1", "pool1", "volume1", new BackupsMigrationRequest().withBackupVaultId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), - com.azure.core.util.Context.NONE); + public static void elasticVolumesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticVolume resource = manager.elasticVolumes() + .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ElasticVolumeUpdateProperties() + .withExportPolicy( + new ElasticExportPolicy().withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(1) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("0.0.0.0/0")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withDataProtection(new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1")))) + .apply(); } } ``` @@ -949,7 +2813,7 @@ import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; */ public final class NetAppResourceCheckFilePathAvailabilitySamples { /* - * x-ms-original-file: 2025-09-01/CheckFilePathAvailability.json + * x-ms-original-file: 2025-09-01-preview/CheckFilePathAvailability.json */ /** * Sample code: CheckFilePathAvailability. @@ -961,7 +2825,7 @@ public final class NetAppResourceCheckFilePathAvailabilitySamples { .checkFilePathAvailabilityWithResponse("eastus", new FilePathAvailabilityRequest() .withName("my-exact-filepth") .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), com.azure.core.util.Context.NONE); } } @@ -978,7 +2842,7 @@ import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; */ public final class NetAppResourceCheckNameAvailabilitySamples { /* - * x-ms-original-file: 2025-09-01/CheckNameAvailability.json + * x-ms-original-file: 2025-09-01-preview/CheckNameAvailability.json */ /** * Sample code: CheckNameAvailability. @@ -1007,7 +2871,7 @@ import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; */ public final class NetAppResourceCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: 2025-09-01/CheckQuotaAvailability.json + * x-ms-original-file: 2025-09-01-preview/CheckQuotaAvailability.json */ /** * Sample code: CheckQuotaAvailability. @@ -1035,7 +2899,7 @@ import com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest; */ public final class NetAppResourceQueryNetworkSiblingSetSamples { /* - * x-ms-original-file: 2025-09-01/NetworkSiblingSet_Query.json + * x-ms-original-file: 2025-09-01-preview/NetworkSiblingSet_Query.json */ /** * Sample code: NetworkSiblingSet_Query. @@ -1047,7 +2911,7 @@ public final class NetAppResourceQueryNetworkSiblingSetSamples { .queryNetworkSiblingSetWithResponse("eastus", new QueryNetworkSiblingSetRequest() .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333") .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), com.azure.core.util.Context.NONE); } } @@ -1061,7 +2925,7 @@ public final class NetAppResourceQueryNetworkSiblingSetSamples { */ public final class NetAppResourceQueryRegionInfoSamples { /* - * x-ms-original-file: 2025-09-01/RegionInfo.json + * x-ms-original-file: 2025-09-01-preview/RegionInfo.json */ /** * Sample code: RegionInfo_Query. @@ -1085,7 +2949,7 @@ import com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest; */ public final class NetAppResourceUpdateNetworkSiblingSetSamples { /* - * x-ms-original-file: 2025-09-01/NetworkSiblingSet_Update.json + * x-ms-original-file: 2025-09-01-preview/NetworkSiblingSet_Update.json */ /** * Sample code: NetworkFeatures_Update. @@ -1097,7 +2961,7 @@ public final class NetAppResourceUpdateNetworkSiblingSetSamples { .updateNetworkSiblingSet("eastus", new UpdateNetworkSiblingSetRequest() .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333") .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet") + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet") .withNetworkSiblingSetStateId("12345_44420.8001578125") .withNetworkFeatures(NetworkFeatures.STANDARD), com.azure.core.util.Context.NONE); } @@ -1112,7 +2976,7 @@ public final class NetAppResourceUpdateNetworkSiblingSetSamples { */ public final class NetAppResourceQuotaLimitsGetSamples { /* - * x-ms-original-file: 2025-09-01/NetAppResourceQuotaLimits_Get.json + * x-ms-original-file: 2025-09-01-preview/NetAppResourceQuotaLimits_Get.json */ /** * Sample code: QuotaLimits. @@ -1134,7 +2998,7 @@ public final class NetAppResourceQuotaLimitsGetSamples { */ public final class NetAppResourceQuotaLimitsListSamples { /* - * x-ms-original-file: 2025-09-01/NetAppResourceQuotaLimits_List.json + * x-ms-original-file: 2025-09-01-preview/NetAppResourceQuotaLimits_List.json */ /** * Sample code: QuotaLimits. @@ -1155,7 +3019,7 @@ public final class NetAppResourceQuotaLimitsListSamples { */ public final class NetAppResourceQuotaLimitsAccountGetSamples { /* - * x-ms-original-file: 2025-09-01/NetAppResourceQuotaLimitsAccount_Get.json + * x-ms-original-file: 2025-09-01-preview/NetAppResourceQuotaLimitsAccount_Get.json */ /** * Sample code: QuotaLimits. @@ -1177,7 +3041,7 @@ public final class NetAppResourceQuotaLimitsAccountGetSamples { */ public final class NetAppResourceQuotaLimitsAccountListSamples { /* - * x-ms-original-file: 2025-09-01/NetAppResourceQuotaLimitsAccount_List.json + * x-ms-original-file: 2025-09-01-preview/NetAppResourceQuotaLimitsAccount_List.json */ /** * Sample code: QuotaLimits. @@ -1198,7 +3062,7 @@ public final class NetAppResourceQuotaLimitsAccountListSamples { */ public final class NetAppResourceRegionInfosGetSamples { /* - * x-ms-original-file: 2025-09-01/RegionInfos_Get.json + * x-ms-original-file: 2025-09-01-preview/RegionInfos_Get.json */ /** * Sample code: RegionInfos_Get. @@ -1219,7 +3083,7 @@ public final class NetAppResourceRegionInfosGetSamples { */ public final class NetAppResourceRegionInfosListSamples { /* - * x-ms-original-file: 2025-09-01/RegionInfos_List.json + * x-ms-original-file: 2025-09-01-preview/RegionInfos_List.json */ /** * Sample code: RegionInfos_List. @@ -1240,7 +3104,7 @@ public final class NetAppResourceRegionInfosListSamples { */ public final class NetAppResourceUsagesGetSamples { /* - * x-ms-original-file: 2025-09-01/Usages_Get.json + * x-ms-original-file: 2025-09-01-preview/Usages_Get.json */ /** * Sample code: Usages_Get. @@ -1262,7 +3126,7 @@ public final class NetAppResourceUsagesGetSamples { */ public final class NetAppResourceUsagesListSamples { /* - * x-ms-original-file: 2025-09-01/Usages_List.json + * x-ms-original-file: 2025-09-01-preview/Usages_List.json */ /** * Sample code: Usages_List. @@ -1283,7 +3147,7 @@ public final class NetAppResourceUsagesListSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: 2025-09-01/OperationList.json + * x-ms-original-file: 2025-09-01-preview/OperationList.json */ /** * Sample code: OperationList. @@ -1307,7 +3171,7 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; */ public final class PoolsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Pools_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01-preview/Pools_CreateOrUpdate.json */ /** * Sample code: Pools_CreateOrUpdate. @@ -1326,7 +3190,7 @@ public final class PoolsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-09-01/Pools_CreateOrUpdate_CustomThroughput.json + * x-ms-original-file: 2025-09-01-preview/Pools_CreateOrUpdate_CustomThroughput.json */ /** * Sample code: Pools_CreateOrUpdate_CustomThroughput. @@ -1356,7 +3220,7 @@ public final class PoolsCreateOrUpdateSamples { */ public final class PoolsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/Pools_Delete.json + * x-ms-original-file: 2025-09-01-preview/Pools_Delete.json */ /** * Sample code: Pools_Delete. @@ -1377,7 +3241,7 @@ public final class PoolsDeleteSamples { */ public final class PoolsGetSamples { /* - * x-ms-original-file: 2025-09-01/Pools_Get_CustomThroughput.json + * x-ms-original-file: 2025-09-01-preview/Pools_Get_CustomThroughput.json */ /** * Sample code: Pools_Get_CustomThroughput. @@ -1389,7 +3253,7 @@ public final class PoolsGetSamples { } /* - * x-ms-original-file: 2025-09-01/Pools_Get.json + * x-ms-original-file: 2025-09-01-preview/Pools_Get.json */ /** * Sample code: Pools_Get. @@ -1410,7 +3274,7 @@ public final class PoolsGetSamples { */ public final class PoolsListSamples { /* - * x-ms-original-file: 2025-09-01/Pools_List.json + * x-ms-original-file: 2025-09-01-preview/Pools_List.json */ /** * Sample code: Pools_List. @@ -1433,7 +3297,7 @@ import com.azure.resourcemanager.netapp.models.CapacityPool; */ public final class PoolsUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Pools_Update.json + * x-ms-original-file: 2025-09-01-preview/Pools_Update.json */ /** * Sample code: Pools_Update. @@ -1447,7 +3311,7 @@ public final class PoolsUpdateSamples { } /* - * x-ms-original-file: 2025-09-01/Pools_Update_CustomThroughput.json + * x-ms-original-file: 2025-09-01-preview/Pools_Update_CustomThroughput.json */ /** * Sample code: Pools_Update_CustomThroughput. @@ -1463,6 +3327,79 @@ public final class PoolsUpdateSamples { } ``` +### RansomwareReports_ClearSuspects + +```java +import com.azure.resourcemanager.netapp.models.RansomwareSuspectResolution; +import com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest; +import java.util.Arrays; + +/** + * Samples for RansomwareReports ClearSuspects. + */ +public final class RansomwareReportsClearSuspectsSamples { + /* + * x-ms-original-file: 2025-09-01-preview/RansomwareReports_ClearSuspects.json + */ + /** + * Sample code: RansomwareReports_ClearSuspects. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void ransomwareReportsClearSuspects(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.ransomwareReports() + .clearSuspects("myRG", "account1", "pool1", "volume1", "ransomwareReport1", + new RansomwareSuspectsClearRequest().withResolution(RansomwareSuspectResolution.POTENTIAL_THREAT) + .withExtensions(Arrays.asList(".threat")), + com.azure.core.util.Context.NONE); + } +} +``` + +### RansomwareReports_Get + +```java +/** + * Samples for RansomwareReports Get. + */ +public final class RansomwareReportsGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/RansomwareReports_Get.json + */ + /** + * Sample code: RansomwareReports_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void ransomwareReportsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.ransomwareReports() + .getWithResponse("myRG", "account1", "pool1", "volume1", "ransomwareReport1", + com.azure.core.util.Context.NONE); + } +} +``` + +### RansomwareReports_List + +```java +/** + * Samples for RansomwareReports List. + */ +public final class RansomwareReportsListSamples { + /* + * x-ms-original-file: 2025-09-01-preview/RansomwareReports_List.json + */ + /** + * Sample code: RansomwareReports_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void ransomwareReportsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.ransomwareReports().list("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} +``` + ### SnapshotPolicies_Create ```java @@ -1476,7 +3413,7 @@ import com.azure.resourcemanager.netapp.models.WeeklySchedule; */ public final class SnapshotPoliciesCreateSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_Create.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_Create.json */ /** * Sample code: SnapshotPolicies_Create. @@ -1508,7 +3445,7 @@ public final class SnapshotPoliciesCreateSamples { */ public final class SnapshotPoliciesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_Delete.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_Delete.json */ /** * Sample code: SnapshotPolicies_Delete. @@ -1530,7 +3467,7 @@ public final class SnapshotPoliciesDeleteSamples { */ public final class SnapshotPoliciesGetSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_Get.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_Get.json */ /** * Sample code: SnapshotPolicies_Get. @@ -1552,7 +3489,7 @@ public final class SnapshotPoliciesGetSamples { */ public final class SnapshotPoliciesListSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_List.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_List.json */ /** * Sample code: SnapshotPolicies_List. @@ -1573,7 +3510,7 @@ public final class SnapshotPoliciesListSamples { */ public final class SnapshotPoliciesListVolumesSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_ListVolumes.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_ListVolumes.json */ /** * Sample code: SnapshotPolicies_ListVolumes. @@ -1601,7 +3538,7 @@ import com.azure.resourcemanager.netapp.models.WeeklySchedule; */ public final class SnapshotPoliciesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_Update.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_Update.json */ /** * Sample code: SnapshotPolicies_Update. @@ -1633,7 +3570,7 @@ public final class SnapshotPoliciesUpdateSamples { */ public final class SnapshotsCreateSamples { /* - * x-ms-original-file: 2025-09-01/Snapshots_Create.json + * x-ms-original-file: 2025-09-01-preview/Snapshots_Create.json */ /** * Sample code: Snapshots_Create. @@ -1658,7 +3595,7 @@ public final class SnapshotsCreateSamples { */ public final class SnapshotsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/Snapshots_Delete.json + * x-ms-original-file: 2025-09-01-preview/Snapshots_Delete.json */ /** * Sample code: Snapshots_Delete. @@ -1680,7 +3617,7 @@ public final class SnapshotsDeleteSamples { */ public final class SnapshotsGetSamples { /* - * x-ms-original-file: 2025-09-01/Snapshots_Get.json + * x-ms-original-file: 2025-09-01-preview/Snapshots_Get.json */ /** * Sample code: Snapshots_Get. @@ -1702,7 +3639,7 @@ public final class SnapshotsGetSamples { */ public final class SnapshotsListSamples { /* - * x-ms-original-file: 2025-09-01/Snapshots_List.json + * x-ms-original-file: 2025-09-01-preview/Snapshots_List.json */ /** * Sample code: Snapshots_List. @@ -1726,7 +3663,7 @@ import java.util.Arrays; */ public final class SnapshotsRestoreFilesSamples { /* - * x-ms-original-file: 2025-09-01/Snapshots_SingleFileRestore.json + * x-ms-original-file: 2025-09-01-preview/Snapshots_SingleFileRestore.json */ /** * Sample code: Snapshots_SingleFileRestore. @@ -1750,7 +3687,7 @@ public final class SnapshotsRestoreFilesSamples { */ public final class SubvolumesCreateSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_Create.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_Create.json */ /** * Sample code: Subvolumes_Create. @@ -1775,7 +3712,7 @@ public final class SubvolumesCreateSamples { */ public final class SubvolumesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_Delete.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_Delete.json */ /** * Sample code: Subvolumes_Delete. @@ -1797,7 +3734,7 @@ public final class SubvolumesDeleteSamples { */ public final class SubvolumesGetSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_Get.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_Get.json */ /** * Sample code: Subvolumes_Get. @@ -1819,7 +3756,7 @@ public final class SubvolumesGetSamples { */ public final class SubvolumesGetMetadataSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_Metadata.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_Metadata.json */ /** * Sample code: Subvolumes_Metadata. @@ -1841,7 +3778,7 @@ public final class SubvolumesGetMetadataSamples { */ public final class SubvolumesListByVolumeSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_List.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_List.json */ /** * Sample code: Subvolumes_List. @@ -1864,7 +3801,7 @@ import com.azure.resourcemanager.netapp.models.SubvolumeInfo; */ public final class SubvolumesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_Update.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_Update.json */ /** * Sample code: Subvolumes_Update. @@ -1896,7 +3833,7 @@ import java.util.Arrays; */ public final class VolumeGroupsCreateSamples { /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Create_SapHana.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Create_SapHana.json */ /** * Sample code: VolumeGroups_Create_SapHana. @@ -2056,7 +3993,7 @@ public final class VolumeGroupsCreateSamples { } /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Create_Oracle.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Create_Oracle.json */ /** * Sample code: VolumeGroups_Create_Oracle. @@ -2409,7 +4346,7 @@ public final class VolumeGroupsCreateSamples { */ public final class VolumeGroupsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Delete.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Delete.json */ /** * Sample code: VolumeGroups_Delete. @@ -2430,7 +4367,7 @@ public final class VolumeGroupsDeleteSamples { */ public final class VolumeGroupsGetSamples { /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Get_SapHana.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Get_SapHana.json */ /** * Sample code: VolumeGroups_Get_SapHana. @@ -2442,7 +4379,7 @@ public final class VolumeGroupsGetSamples { } /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Get_Oracle.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Get_Oracle.json */ /** * Sample code: VolumeGroups_Get_Oracle. @@ -2463,7 +4400,7 @@ public final class VolumeGroupsGetSamples { */ public final class VolumeGroupsListByNetAppAccountSamples { /* - * x-ms-original-file: 2025-09-01/VolumeGroups_List_Oracle.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_List_Oracle.json */ /** * Sample code: VolumeGroups_List_Oracle. @@ -2475,7 +4412,7 @@ public final class VolumeGroupsListByNetAppAccountSamples { } /* - * x-ms-original-file: 2025-09-01/VolumeGroups_List_SapHana.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_List_SapHana.json */ /** * Sample code: VolumeGroups_List_SapHana. @@ -2498,7 +4435,7 @@ import com.azure.resourcemanager.netapp.models.Type; */ public final class VolumeQuotaRulesCreateSamples { /* - * x-ms-original-file: 2025-09-01/VolumeQuotaRules_Create.json + * x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_Create.json */ /** * Sample code: VolumeQuotaRules_Create. @@ -2526,7 +4463,7 @@ public final class VolumeQuotaRulesCreateSamples { */ public final class VolumeQuotaRulesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/VolumeQuotaRules_Delete.json + * x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_Delete.json */ /** * Sample code: VolumeQuotaRules_Delete. @@ -2548,7 +4485,7 @@ public final class VolumeQuotaRulesDeleteSamples { */ public final class VolumeQuotaRulesGetSamples { /* - * x-ms-original-file: 2025-09-01/VolumeQuotaRules_Get.json + * x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_Get.json */ /** * Sample code: VolumeQuotaRules_Get. @@ -2571,7 +4508,7 @@ public final class VolumeQuotaRulesGetSamples { */ public final class VolumeQuotaRulesListByVolumeSamples { /* - * x-ms-original-file: 2025-09-01/VolumeQuotaRules_List.json + * x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_List.json */ /** * Sample code: VolumeQuotaRules_List. @@ -2595,7 +4532,7 @@ import com.azure.resourcemanager.netapp.models.VolumeQuotaRule; */ public final class VolumeQuotaRulesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/VolumeQuotaRules_Update.json + * x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_Update.json */ /** * Sample code: VolumeQuotaRules_Update. @@ -2620,7 +4557,7 @@ public final class VolumeQuotaRulesUpdateSamples { */ public final class VolumesAuthorizeExternalReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_AuthorizeExternalReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_AuthorizeExternalReplication.json */ /** * Sample code: Volumes_AuthorizeExternalReplication. @@ -2645,7 +4582,7 @@ import com.azure.resourcemanager.netapp.models.AuthorizeRequest; */ public final class VolumesAuthorizeReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_AuthorizeReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_AuthorizeReplication.json */ /** * Sample code: Volumes_AuthorizeReplication. @@ -2672,7 +4609,7 @@ import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; */ public final class VolumesBreakFileLocksSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_BreakFileLocks.json + * x-ms-original-file: 2025-09-01-preview/Volumes_BreakFileLocks.json */ /** * Sample code: Volumes_BreakFileLocks. @@ -2698,7 +4635,7 @@ import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; */ public final class VolumesBreakReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_BreakReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_BreakReplication.json */ /** * Sample code: Volumes_BreakReplication. @@ -2723,7 +4660,7 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; */ public final class VolumesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01-preview/Volumes_CreateOrUpdate.json */ /** * Sample code: Volumes_CreateOrUpdate. @@ -2738,7 +4675,7 @@ public final class VolumesCreateOrUpdateSamples { .withCreationToken("my-unique-file-path") .withUsageThreshold(107374182400L) .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") .withServiceLevel(ServiceLevel.PREMIUM) .create(); } @@ -2753,7 +4690,7 @@ public final class VolumesCreateOrUpdateSamples { */ public final class VolumesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_Delete.json + * x-ms-original-file: 2025-09-01-preview/Volumes_Delete.json */ /** * Sample code: Volumes_Delete. @@ -2774,7 +4711,7 @@ public final class VolumesDeleteSamples { */ public final class VolumesDeleteReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_DeleteReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_DeleteReplication.json */ /** * Sample code: Volumes_DeleteReplication. @@ -2795,7 +4732,7 @@ public final class VolumesDeleteReplicationSamples { */ public final class VolumesFinalizeExternalReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_FinalizeExternalReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_FinalizeExternalReplication.json */ /** * Sample code: Volumes_FinalizeExternalReplication. @@ -2817,7 +4754,7 @@ public final class VolumesFinalizeExternalReplicationSamples { */ public final class VolumesFinalizeRelocationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_FinalizeRelocation.json + * x-ms-original-file: 2025-09-01-preview/Volumes_FinalizeRelocation.json */ /** * Sample code: Volumes_FinalizeRelocation. @@ -2838,7 +4775,19 @@ public final class VolumesFinalizeRelocationSamples { */ public final class VolumesGetSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_Get.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ExtraLargeVolumes_Get.json + */ + /** + * Sample code: Volumes_ExtralargeVolumeGet. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesExtralargeVolumeGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01-preview/Volumes_Get.json */ /** * Sample code: Volumes_Get. @@ -2859,7 +4808,19 @@ public final class VolumesGetSamples { */ public final class VolumesListSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_List.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ExtraLargeVolumes_List.json + */ + /** + * Sample code: Volumes_ExtralargeVolumeList. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesExtralargeVolumeList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().list("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01-preview/Volumes_List.json */ /** * Sample code: Volumes_List. @@ -2882,7 +4843,7 @@ import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; */ public final class VolumesListGetGroupIdListForLdapUserSamples { /* - * x-ms-original-file: 2025-09-01/GroupIdListForLDAPUser.json + * x-ms-original-file: 2025-09-01-preview/GroupIdListForLDAPUser.json */ /** * Sample code: GetGroupIdListForUser. @@ -2897,6 +4858,27 @@ public final class VolumesListGetGroupIdListForLdapUserSamples { } ``` +### Volumes_ListQuotaReport + +```java +/** + * Samples for Volumes ListQuotaReport. + */ +public final class VolumesListQuotaReportSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Volumes_ListQuotaReport.json + */ + /** + * Sample code: ListQuotaReport. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void listQuotaReport(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().listQuotaReport("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} +``` + ### Volumes_ListReplications ```java @@ -2908,7 +4890,7 @@ import com.azure.resourcemanager.netapp.models.ListReplicationsRequest; */ public final class VolumesListReplicationsSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ListReplications.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ListReplications.json */ /** * Sample code: Volumes_ListReplications. @@ -2934,7 +4916,7 @@ import java.util.Arrays; */ public final class VolumesPeerExternalClusterSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_PeerExternalCluster.json + * x-ms-original-file: 2025-09-01-preview/Volumes_PeerExternalCluster.json */ /** * Sample code: Volumes_PeerExternalCluster. @@ -2959,7 +4941,7 @@ public final class VolumesPeerExternalClusterSamples { */ public final class VolumesPerformReplicationTransferSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_PerformReplicationTransfer.json + * x-ms-original-file: 2025-09-01-preview/Volumes_PerformReplicationTransfer.json */ /** * Sample code: Volumes_PerformReplicationTransfer. @@ -2983,7 +4965,7 @@ import com.azure.resourcemanager.netapp.models.PoolChangeRequest; */ public final class VolumesPoolChangeSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_PoolChange.json + * x-ms-original-file: 2025-09-01-preview/Volumes_PoolChange.json */ /** * Sample code: Volumes_AuthorizeReplication. @@ -3007,7 +4989,7 @@ public final class VolumesPoolChangeSamples { */ public final class VolumesPopulateAvailabilityZoneSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_PopulateAvailabilityZones.json + * x-ms-original-file: 2025-09-01-preview/Volumes_PopulateAvailabilityZones.json */ /** * Sample code: Volumes_PopulateAvailabilityZones. @@ -3029,7 +5011,7 @@ public final class VolumesPopulateAvailabilityZoneSamples { */ public final class VolumesReInitializeReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ReInitializeReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ReInitializeReplication.json */ /** * Sample code: Volumes_ReInitializeReplication. @@ -3053,7 +5035,7 @@ import com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest; */ public final class VolumesReestablishReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ReestablishReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ReestablishReplication.json */ /** * Sample code: Volumes_ReestablishReplication. @@ -3080,7 +5062,7 @@ import com.azure.resourcemanager.netapp.models.RelocateVolumeRequest; */ public final class VolumesRelocateSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_Relocate.json + * x-ms-original-file: 2025-09-01-preview/Volumes_Relocate.json */ /** * Sample code: Volumes_Relocate. @@ -3103,7 +5085,7 @@ public final class VolumesRelocateSamples { */ public final class VolumesReplicationStatusSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ReplicationStatus.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ReplicationStatus.json */ /** * Sample code: Volumes_ReplicationStatus. @@ -3125,7 +5107,7 @@ public final class VolumesReplicationStatusSamples { */ public final class VolumesResetCifsPasswordSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ResetCifsPassword.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ResetCifsPassword.json */ /** * Sample code: Volumes_ResetCifsPassword. @@ -3146,7 +5128,7 @@ public final class VolumesResetCifsPasswordSamples { */ public final class VolumesResyncReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ResyncReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ResyncReplication.json */ /** * Sample code: Volumes_ResyncReplication. @@ -3169,7 +5151,7 @@ import com.azure.resourcemanager.netapp.models.VolumeRevert; */ public final class VolumesRevertSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_Revert.json + * x-ms-original-file: 2025-09-01-preview/Volumes_Revert.json */ /** * Sample code: Volumes_Revert. @@ -3193,7 +5175,7 @@ public final class VolumesRevertSamples { */ public final class VolumesRevertRelocationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_RevertRelocation.json + * x-ms-original-file: 2025-09-01-preview/Volumes_RevertRelocation.json */ /** * Sample code: Volumes_RevertRelocation. @@ -3214,7 +5196,7 @@ public final class VolumesRevertRelocationSamples { */ public final class VolumesSplitCloneFromParentSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_SplitClone.json + * x-ms-original-file: 2025-09-01-preview/Volumes_SplitClone.json */ /** * Sample code: Volumes_SplitClone. @@ -3238,7 +5220,7 @@ import com.azure.resourcemanager.netapp.models.Volume; */ public final class VolumesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_Update.json + * x-ms-original-file: 2025-09-01-preview/Volumes_Update.json */ /** * Sample code: Volumes_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/pom.xml b/sdk/netapp/azure-resourcemanager-netapp/pom.xml index 004fd9aa4790..fbc8f73dfe8e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/pom.xml +++ b/sdk/netapp/azure-resourcemanager-netapp/pom.xml @@ -18,7 +18,7 @@ <packaging>jar</packaging> <name>Microsoft Azure SDK for NetAppFiles Management</name> - <description>This package contains Microsoft Azure SDK for NetAppFiles Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft NetApp Files Azure Resource Provider specification. Package api-version 2025-09-01.</description> + <description>This package contains Microsoft Azure SDK for NetAppFiles Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft NetApp Files Azure Resource Provider specification. Package api-version 2025-09-01-preview.</description> <url>https://github.com/Azure/azure-sdk-for-java</url> <licenses> @@ -45,6 +45,7 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <jacoco.min.linecoverage>0</jacoco.min.linecoverage> <jacoco.min.branchcoverage>0</jacoco.min.branchcoverage> + <revapi.skip>true</revapi.skip> </properties> <dependencies> <dependency> diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java index 75a5d99763eb..c9dd2c1cdbd6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java @@ -26,12 +26,23 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.NetAppManagementClient; import com.azure.resourcemanager.netapp.implementation.AccountsImpl; +import com.azure.resourcemanager.netapp.implementation.ActiveDirectoryConfigsImpl; import com.azure.resourcemanager.netapp.implementation.BackupPoliciesImpl; import com.azure.resourcemanager.netapp.implementation.BackupVaultsImpl; import com.azure.resourcemanager.netapp.implementation.BackupsImpl; import com.azure.resourcemanager.netapp.implementation.BackupsUnderAccountsImpl; import com.azure.resourcemanager.netapp.implementation.BackupsUnderBackupVaultsImpl; import com.azure.resourcemanager.netapp.implementation.BackupsUnderVolumesImpl; +import com.azure.resourcemanager.netapp.implementation.BucketsImpl; +import com.azure.resourcemanager.netapp.implementation.CachesImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticAccountsImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticBackupPoliciesImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticBackupVaultsImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticBackupsImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticCapacityPoolsImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticSnapshotPoliciesImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticSnapshotsImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticVolumesImpl; import com.azure.resourcemanager.netapp.implementation.NetAppManagementClientBuilder; import com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsAccountsImpl; import com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsImpl; @@ -40,6 +51,7 @@ import com.azure.resourcemanager.netapp.implementation.NetAppResourcesImpl; import com.azure.resourcemanager.netapp.implementation.OperationsImpl; import com.azure.resourcemanager.netapp.implementation.PoolsImpl; +import com.azure.resourcemanager.netapp.implementation.RansomwareReportsImpl; import com.azure.resourcemanager.netapp.implementation.SnapshotPoliciesImpl; import com.azure.resourcemanager.netapp.implementation.SnapshotsImpl; import com.azure.resourcemanager.netapp.implementation.SubvolumesImpl; @@ -47,12 +59,23 @@ import com.azure.resourcemanager.netapp.implementation.VolumeQuotaRulesImpl; import com.azure.resourcemanager.netapp.implementation.VolumesImpl; import com.azure.resourcemanager.netapp.models.Accounts; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigs; import com.azure.resourcemanager.netapp.models.BackupPolicies; import com.azure.resourcemanager.netapp.models.BackupVaults; import com.azure.resourcemanager.netapp.models.Backups; import com.azure.resourcemanager.netapp.models.BackupsUnderAccounts; import com.azure.resourcemanager.netapp.models.BackupsUnderBackupVaults; import com.azure.resourcemanager.netapp.models.BackupsUnderVolumes; +import com.azure.resourcemanager.netapp.models.Buckets; +import com.azure.resourcemanager.netapp.models.Caches; +import com.azure.resourcemanager.netapp.models.ElasticAccounts; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicies; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaults; +import com.azure.resourcemanager.netapp.models.ElasticBackups; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPools; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicies; +import com.azure.resourcemanager.netapp.models.ElasticSnapshots; +import com.azure.resourcemanager.netapp.models.ElasticVolumes; import com.azure.resourcemanager.netapp.models.NetAppResourceQuotaLimits; import com.azure.resourcemanager.netapp.models.NetAppResourceQuotaLimitsAccounts; import com.azure.resourcemanager.netapp.models.NetAppResourceRegionInfos; @@ -60,6 +83,7 @@ import com.azure.resourcemanager.netapp.models.NetAppResources; import com.azure.resourcemanager.netapp.models.Operations; import com.azure.resourcemanager.netapp.models.Pools; +import com.azure.resourcemanager.netapp.models.RansomwareReports; import com.azure.resourcemanager.netapp.models.SnapshotPolicies; import com.azure.resourcemanager.netapp.models.Snapshots; import com.azure.resourcemanager.netapp.models.Subvolumes; @@ -97,8 +121,32 @@ public final class NetAppFilesManager { private VolumeQuotaRules volumeQuotaRules; + private RansomwareReports ransomwareReports; + private BackupVaults backupVaults; + private Buckets buckets; + + private Caches caches; + + private ElasticAccounts elasticAccounts; + + private ElasticCapacityPools elasticCapacityPools; + + private ElasticVolumes elasticVolumes; + + private ElasticSnapshots elasticSnapshots; + + private ElasticSnapshotPolicies elasticSnapshotPolicies; + + private ElasticBackupVaults elasticBackupVaults; + + private ElasticBackupPolicies elasticBackupPolicies; + + private ElasticBackups elasticBackups; + + private ActiveDirectoryConfigs activeDirectoryConfigs; + private NetAppResourceQuotaLimits netAppResourceQuotaLimits; private NetAppResourceRegionInfos netAppResourceRegionInfos; @@ -443,6 +491,18 @@ public VolumeQuotaRules volumeQuotaRules() { return volumeQuotaRules; } + /** + * Gets the resource collection API of RansomwareReports. + * + * @return Resource collection API of RansomwareReports. + */ + public RansomwareReports ransomwareReports() { + if (this.ransomwareReports == null) { + this.ransomwareReports = new RansomwareReportsImpl(clientObject.getRansomwareReports(), this); + } + return ransomwareReports; + } + /** * Gets the resource collection API of BackupVaults. It manages BackupVault. * @@ -455,6 +515,140 @@ public BackupVaults backupVaults() { return backupVaults; } + /** + * Gets the resource collection API of Buckets. It manages Bucket. + * + * @return Resource collection API of Buckets. + */ + public Buckets buckets() { + if (this.buckets == null) { + this.buckets = new BucketsImpl(clientObject.getBuckets(), this); + } + return buckets; + } + + /** + * Gets the resource collection API of Caches. It manages Cache. + * + * @return Resource collection API of Caches. + */ + public Caches caches() { + if (this.caches == null) { + this.caches = new CachesImpl(clientObject.getCaches(), this); + } + return caches; + } + + /** + * Gets the resource collection API of ElasticAccounts. It manages ElasticAccount. + * + * @return Resource collection API of ElasticAccounts. + */ + public ElasticAccounts elasticAccounts() { + if (this.elasticAccounts == null) { + this.elasticAccounts = new ElasticAccountsImpl(clientObject.getElasticAccounts(), this); + } + return elasticAccounts; + } + + /** + * Gets the resource collection API of ElasticCapacityPools. It manages ElasticCapacityPool. + * + * @return Resource collection API of ElasticCapacityPools. + */ + public ElasticCapacityPools elasticCapacityPools() { + if (this.elasticCapacityPools == null) { + this.elasticCapacityPools = new ElasticCapacityPoolsImpl(clientObject.getElasticCapacityPools(), this); + } + return elasticCapacityPools; + } + + /** + * Gets the resource collection API of ElasticVolumes. It manages ElasticVolume. + * + * @return Resource collection API of ElasticVolumes. + */ + public ElasticVolumes elasticVolumes() { + if (this.elasticVolumes == null) { + this.elasticVolumes = new ElasticVolumesImpl(clientObject.getElasticVolumes(), this); + } + return elasticVolumes; + } + + /** + * Gets the resource collection API of ElasticSnapshots. It manages ElasticSnapshot. + * + * @return Resource collection API of ElasticSnapshots. + */ + public ElasticSnapshots elasticSnapshots() { + if (this.elasticSnapshots == null) { + this.elasticSnapshots = new ElasticSnapshotsImpl(clientObject.getElasticSnapshots(), this); + } + return elasticSnapshots; + } + + /** + * Gets the resource collection API of ElasticSnapshotPolicies. It manages ElasticSnapshotPolicy. + * + * @return Resource collection API of ElasticSnapshotPolicies. + */ + public ElasticSnapshotPolicies elasticSnapshotPolicies() { + if (this.elasticSnapshotPolicies == null) { + this.elasticSnapshotPolicies + = new ElasticSnapshotPoliciesImpl(clientObject.getElasticSnapshotPolicies(), this); + } + return elasticSnapshotPolicies; + } + + /** + * Gets the resource collection API of ElasticBackupVaults. It manages ElasticBackupVault. + * + * @return Resource collection API of ElasticBackupVaults. + */ + public ElasticBackupVaults elasticBackupVaults() { + if (this.elasticBackupVaults == null) { + this.elasticBackupVaults = new ElasticBackupVaultsImpl(clientObject.getElasticBackupVaults(), this); + } + return elasticBackupVaults; + } + + /** + * Gets the resource collection API of ElasticBackupPolicies. It manages ElasticBackupPolicy. + * + * @return Resource collection API of ElasticBackupPolicies. + */ + public ElasticBackupPolicies elasticBackupPolicies() { + if (this.elasticBackupPolicies == null) { + this.elasticBackupPolicies = new ElasticBackupPoliciesImpl(clientObject.getElasticBackupPolicies(), this); + } + return elasticBackupPolicies; + } + + /** + * Gets the resource collection API of ElasticBackups. It manages ElasticBackup. + * + * @return Resource collection API of ElasticBackups. + */ + public ElasticBackups elasticBackups() { + if (this.elasticBackups == null) { + this.elasticBackups = new ElasticBackupsImpl(clientObject.getElasticBackups(), this); + } + return elasticBackups; + } + + /** + * Gets the resource collection API of ActiveDirectoryConfigs. It manages ActiveDirectoryConfig. + * + * @return Resource collection API of ActiveDirectoryConfigs. + */ + public ActiveDirectoryConfigs activeDirectoryConfigs() { + if (this.activeDirectoryConfigs == null) { + this.activeDirectoryConfigs + = new ActiveDirectoryConfigsImpl(clientObject.getActiveDirectoryConfigs(), this); + } + return activeDirectoryConfigs; + } + /** * Gets the resource collection API of NetAppResourceQuotaLimits. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ActiveDirectoryConfigsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ActiveDirectoryConfigsClient.java new file mode 100644 index 000000000000..ab9def2b0953 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ActiveDirectoryConfigsClient.java @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.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.netapp.fluent.models.ActiveDirectoryConfigInner; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdate; + +/** + * An instance of this class provides access to all the operations defined in ActiveDirectoryConfigsClient. + */ +public interface ActiveDirectoryConfigsClient { + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<ActiveDirectoryConfigInner> getByResourceGroupWithResponse(String resourceGroupName, + String activeDirectoryConfigName, Context context); + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActiveDirectoryConfigInner getByResourceGroup(String resourceGroupName, String activeDirectoryConfigName); + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ActiveDirectoryConfigInner>, ActiveDirectoryConfigInner> beginCreateOrUpdate( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigInner body); + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ActiveDirectoryConfigInner>, ActiveDirectoryConfigInner> beginCreateOrUpdate( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigInner body, Context context); + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActiveDirectoryConfigInner createOrUpdate(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body); + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActiveDirectoryConfigInner createOrUpdate(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body, Context context); + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ActiveDirectoryConfigInner>, ActiveDirectoryConfigInner> beginUpdate(String resourceGroupName, + String activeDirectoryConfigName, ActiveDirectoryConfigUpdate body); + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ActiveDirectoryConfigInner>, ActiveDirectoryConfigInner> beginUpdate(String resourceGroupName, + String activeDirectoryConfigName, ActiveDirectoryConfigUpdate body, Context context); + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActiveDirectoryConfigInner update(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body); + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActiveDirectoryConfigInner update(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body, Context context); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String activeDirectoryConfigName); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String activeDirectoryConfigName, + Context context); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 activeDirectoryConfigName); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 activeDirectoryConfigName, Context context); + + /** + * List all active directory configurations within the 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 ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ActiveDirectoryConfigInner> listByResourceGroup(String resourceGroupName); + + /** + * List all active directory configurations within the 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 ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ActiveDirectoryConfigInner> listByResourceGroup(String resourceGroupName, Context context); + + /** + * List all active directory configurations within the subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ActiveDirectoryConfigInner> list(); + + /** + * List all active directory configurations within the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ActiveDirectoryConfigInner> list(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BucketsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BucketsClient.java new file mode 100644 index 000000000000..a604c10979b3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BucketsClient.java @@ -0,0 +1,360 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.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.netapp.fluent.models.BucketGenerateCredentialsInner; +import com.azure.resourcemanager.netapp.fluent.models.BucketInner; +import com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry; +import com.azure.resourcemanager.netapp.models.BucketPatch; + +/** + * An instance of this class provides access to all the operations defined in BucketsClient. + */ +public interface BucketsClient { + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume's bucket along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<BucketInner> getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, Context context); + + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume's bucket. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BucketInner get(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName); + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<BucketInner>, BucketInner> beginCreateOrUpdate(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketInner body); + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<BucketInner>, BucketInner> beginCreateOrUpdate(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketInner body, Context context); + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BucketInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, BucketInner body); + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BucketInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, BucketInner body, Context context); + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<BucketInner>, BucketInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketPatch body); + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<BucketInner>, BucketInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketPatch body, Context context); + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BucketInner update(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, BucketPatch body); + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BucketInner update(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, BucketPatch body, Context context); + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName); + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, Context context); + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String poolName, String volumeName, String bucketName); + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String poolName, String volumeName, String bucketName, + Context context); + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 volume bucket resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<BucketInner> list(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 volume bucket resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<BucketInner> list(String resourceGroupName, String accountName, String poolName, String volumeName, + Context context); + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<BucketGenerateCredentialsInner> generateCredentialsWithResponse(String resourceGroupName, + String accountName, String poolName, String volumeName, String bucketName, BucketCredentialsExpiry body, + Context context); + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BucketGenerateCredentialsInner generateCredentials(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, BucketCredentialsExpiry body); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java new file mode 100644 index 000000000000..3b9f98aa04e7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java @@ -0,0 +1,390 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.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.netapp.fluent.models.CacheInner; +import com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner; +import com.azure.resourcemanager.netapp.models.CacheUpdate; +import com.azure.resourcemanager.netapp.models.PoolChangeRequest; + +/** + * An instance of this class provides access to all the operations defined in CachesClient. + */ +public interface CachesClient { + /** + * Get the details of the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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 details of the specified Cache along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<CacheInner> getWithResponse(String resourceGroupName, String accountName, String poolName, + String cacheName, Context context); + + /** + * Get the details of the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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 details of the specified Cache. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheInner get(String resourceGroupName, String accountName, String poolName, String cacheName); + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<CacheInner>, CacheInner> beginCreateOrUpdate(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheInner body); + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<CacheInner>, CacheInner> beginCreateOrUpdate(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheInner body, Context context); + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheInner body); + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheInner body, Context context); + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheUpdate body); + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheUpdate body, Context context); + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheUpdate body); + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body, + Context context); + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String cacheName); + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String cacheName, Context context); + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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 accountName, String poolName, String cacheName); + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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 accountName, String poolName, String cacheName, Context context); + + /** + * List all Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Cache resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<CacheInner> listByCapacityPools(String resourceGroupName, String accountName, String poolName); + + /** + * List all Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Cache resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<CacheInner> listByCapacityPools(String resourceGroupName, String accountName, String poolName, + Context context); + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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 containing peering passphrases and commands for cluster and vserver peering along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<PeeringPassphrasesInner> listPeeringPassphrasesWithResponse(String resourceGroupName, String accountName, + String poolName, String cacheName, Context context); + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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 containing peering passphrases and commands for cluster and vserver peering. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PeeringPassphrasesInner listPeeringPassphrases(String resourceGroupName, String accountName, String poolName, + String cacheName); + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<CacheInner>, CacheInner> beginPoolChange(String resourceGroupName, String accountName, + String poolName, String cacheName, PoolChangeRequest body); + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<CacheInner>, CacheInner> beginPoolChange(String resourceGroupName, String accountName, + String poolName, String cacheName, PoolChangeRequest body, Context context); + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + CacheInner poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + PoolChangeRequest body); + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheInner poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + PoolChangeRequest body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticAccountsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticAccountsClient.java new file mode 100644 index 000000000000..1b42177183db --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticAccountsClient.java @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.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.netapp.fluent.models.ElasticAccountInner; +import com.azure.resourcemanager.netapp.models.ElasticAccountUpdate; + +/** + * An instance of this class provides access to all the operations defined in ElasticAccountsClient. + */ +public interface ElasticAccountsClient { + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<ElasticAccountInner> getByResourceGroupWithResponse(String resourceGroupName, String accountName, + Context context); + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticAccountInner getByResourceGroup(String resourceGroupName, String accountName); + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticAccountInner>, ElasticAccountInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, ElasticAccountInner body); + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticAccountInner>, ElasticAccountInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, ElasticAccountInner body, Context context); + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticAccountInner createOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body); + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticAccountInner createOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body, + Context context); + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticAccountInner>, ElasticAccountInner> beginUpdate(String resourceGroupName, + String accountName, ElasticAccountUpdate body); + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticAccountInner>, ElasticAccountInner> beginUpdate(String resourceGroupName, + String accountName, ElasticAccountUpdate body, Context context); + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticAccountInner update(String resourceGroupName, String accountName, ElasticAccountUpdate body); + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticAccountInner update(String resourceGroupName, String accountName, ElasticAccountUpdate body, + Context context); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, Context context); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, Context context); + + /** + * List and describe all NetApp elastic accounts in the 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 ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticAccountInner> listByResourceGroup(String resourceGroupName); + + /** + * List and describe all NetApp elastic accounts in the 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 ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticAccountInner> listByResourceGroup(String resourceGroupName, Context context); + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticAccountInner> list(); + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticAccountInner> list(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupPoliciesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupPoliciesClient.java new file mode 100644 index 000000000000..12f8ec5cce35 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupPoliciesClient.java @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.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.netapp.fluent.models.ElasticBackupPolicyInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdate; + +/** + * An instance of this class provides access to all the operations defined in ElasticBackupPoliciesClient. + */ +public interface ElasticBackupPoliciesClient { + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Policy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<ElasticBackupPolicyInner> getWithResponse(String resourceGroupName, String accountName, + String backupPolicyName, Context context); + + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupPolicyInner get(String resourceGroupName, String accountName, String backupPolicyName); + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticBackupPolicyInner>, ElasticBackupPolicyInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String backupPolicyName, ElasticBackupPolicyInner body); + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticBackupPolicyInner>, ElasticBackupPolicyInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String backupPolicyName, ElasticBackupPolicyInner body, + Context context); + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupPolicyInner createOrUpdate(String resourceGroupName, String accountName, String backupPolicyName, + ElasticBackupPolicyInner body); + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupPolicyInner createOrUpdate(String resourceGroupName, String accountName, String backupPolicyName, + ElasticBackupPolicyInner body, Context context); + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticBackupPolicyInner>, ElasticBackupPolicyInner> beginUpdate(String resourceGroupName, + String accountName, String backupPolicyName, ElasticBackupPolicyUpdate body); + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticBackupPolicyInner>, ElasticBackupPolicyInner> beginUpdate(String resourceGroupName, + String accountName, String backupPolicyName, ElasticBackupPolicyUpdate body, Context context); + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupPolicyInner update(String resourceGroupName, String accountName, String backupPolicyName, + ElasticBackupPolicyUpdate body); + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupPolicyInner update(String resourceGroupName, String accountName, String backupPolicyName, + ElasticBackupPolicyUpdate body, Context context); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, + String backupPolicyName); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, + String backupPolicyName, Context context); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String backupPolicyName); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String backupPolicyName, Context context); + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticBackupPolicyInner> listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticBackupPolicyInner> listByElasticAccount(String resourceGroupName, String accountName, + Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupVaultsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupVaultsClient.java new file mode 100644 index 000000000000..7f9dfbb74b56 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupVaultsClient.java @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.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.netapp.fluent.models.ElasticBackupVaultInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultUpdate; + +/** + * An instance of this class provides access to all the operations defined in ElasticBackupVaultsClient. + */ +public interface ElasticBackupVaultsClient { + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<ElasticBackupVaultInner> getWithResponse(String resourceGroupName, String accountName, + String backupVaultName, Context context); + + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupVaultInner get(String resourceGroupName, String accountName, String backupVaultName); + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticBackupVaultInner>, ElasticBackupVaultInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String backupVaultName, ElasticBackupVaultInner body); + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticBackupVaultInner>, ElasticBackupVaultInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String backupVaultName, ElasticBackupVaultInner body, + Context context); + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupVaultInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + ElasticBackupVaultInner body); + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupVaultInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + ElasticBackupVaultInner body, Context context); + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticBackupVaultInner>, ElasticBackupVaultInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, ElasticBackupVaultUpdate body); + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticBackupVaultInner>, ElasticBackupVaultInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, ElasticBackupVaultUpdate body, Context context); + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupVaultInner update(String resourceGroupName, String accountName, String backupVaultName, + ElasticBackupVaultUpdate body); + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupVaultInner update(String resourceGroupName, String accountName, String backupVaultName, + ElasticBackupVaultUpdate body, Context context); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, + String backupVaultName); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String backupVaultName, + Context context); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String backupVaultName); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String backupVaultName, Context context); + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticBackupVaultInner> listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticBackupVaultInner> listByElasticAccount(String resourceGroupName, String accountName, + Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupsClient.java new file mode 100644 index 000000000000..ea1cbfc596b4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupsClient.java @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.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.netapp.fluent.models.ElasticBackupInner; + +/** + * An instance of this class provides access to all the operations defined in ElasticBackupsClient. + */ +public interface ElasticBackupsClient { + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<ElasticBackupInner> getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + String backupName, Context context); + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupInner get(String resourceGroupName, String accountName, String backupVaultName, String backupName); + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticBackupInner>, ElasticBackupInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body); + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticBackupInner>, ElasticBackupInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body, Context context); + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body); + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body, Context context); + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticBackupInner>, ElasticBackupInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body); + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticBackupInner>, ElasticBackupInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body, Context context); + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupInner update(String resourceGroupName, String accountName, String backupVaultName, String backupName, + ElasticBackupInner body); + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupInner update(String resourceGroupName, String accountName, String backupVaultName, String backupName, + ElasticBackupInner body, Context context); + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String backupVaultName, + String backupName); + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String backupVaultName, + String backupName, Context context); + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName); + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName, + Context context); + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticBackupInner> listByVault(String resourceGroupName, String accountName, String backupVaultName); + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticBackupInner> listByVault(String resourceGroupName, String accountName, String backupVaultName, + Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticCapacityPoolsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticCapacityPoolsClient.java new file mode 100644 index 000000000000..c3188ddaecef --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticCapacityPoolsClient.java @@ -0,0 +1,370 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.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.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner; +import com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner; +import com.azure.resourcemanager.netapp.models.ChangeZoneRequest; +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdate; + +/** + * An instance of this class provides access to all the operations defined in ElasticCapacityPoolsClient. + */ +public interface ElasticCapacityPoolsClient { + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Capacity Pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<ElasticCapacityPoolInner> getWithResponse(String resourceGroupName, String accountName, String poolName, + Context context); + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Capacity Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticCapacityPoolInner get(String resourceGroupName, String accountName, String poolName); + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticCapacityPoolInner>, ElasticCapacityPoolInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String poolName, ElasticCapacityPoolInner body); + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticCapacityPoolInner>, ElasticCapacityPoolInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String poolName, ElasticCapacityPoolInner body, Context context); + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticCapacityPoolInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolInner body); + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticCapacityPoolInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolInner body, Context context); + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticCapacityPoolInner>, ElasticCapacityPoolInner> beginUpdate(String resourceGroupName, + String accountName, String poolName, ElasticCapacityPoolUpdate body); + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticCapacityPoolInner>, ElasticCapacityPoolInner> beginUpdate(String resourceGroupName, + String accountName, String poolName, ElasticCapacityPoolUpdate body, Context context); + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticCapacityPoolInner update(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolUpdate body); + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticCapacityPoolInner update(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolUpdate body, Context context); + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName); + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + Context context); + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String poolName); + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String poolName, Context context); + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticCapacityPoolInner> listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticCapacityPoolInner> listByElasticAccount(String resourceGroupName, String accountName, + Context context); + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticCapacityPoolInner>, ElasticCapacityPoolInner> beginChangeZone(String resourceGroupName, + String accountName, String poolName, ChangeZoneRequest body); + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticCapacityPoolInner>, ElasticCapacityPoolInner> beginChangeZone(String resourceGroupName, + String accountName, String poolName, ChangeZoneRequest body, Context context); + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticCapacityPoolInner changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body); + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticCapacityPoolInner changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<CheckElasticResourceAvailabilityResponseInner> checkVolumeFilePathAvailabilityWithResponse( + String resourceGroupName, String accountName, String poolName, + CheckElasticVolumeFilePathAvailabilityRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CheckElasticResourceAvailabilityResponseInner checkVolumeFilePathAvailability(String resourceGroupName, + String accountName, String poolName, CheckElasticVolumeFilePathAvailabilityRequest body); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotPoliciesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotPoliciesClient.java new file mode 100644 index 000000000000..062bc0b19bb4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotPoliciesClient.java @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.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.netapp.fluent.models.ElasticSnapshotPolicyInner; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdate; + +/** + * An instance of this class provides access to all the operations defined in ElasticSnapshotPoliciesClient. + */ +public interface ElasticSnapshotPoliciesClient { + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshotPolicy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<ElasticSnapshotPolicyInner> getWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context); + + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshotPolicy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotPolicyInner get(String resourceGroupName, String accountName, String snapshotPolicyName); + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticSnapshotPolicyInner>, ElasticSnapshotPolicyInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String snapshotPolicyName, ElasticSnapshotPolicyInner body); + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticSnapshotPolicyInner>, ElasticSnapshotPolicyInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String snapshotPolicyName, ElasticSnapshotPolicyInner body, + Context context); + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotPolicyInner createOrUpdate(String resourceGroupName, String accountName, String snapshotPolicyName, + ElasticSnapshotPolicyInner body); + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotPolicyInner createOrUpdate(String resourceGroupName, String accountName, String snapshotPolicyName, + ElasticSnapshotPolicyInner body, Context context); + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticSnapshotPolicyInner>, ElasticSnapshotPolicyInner> beginUpdate(String resourceGroupName, + String accountName, String snapshotPolicyName, ElasticSnapshotPolicyUpdate body); + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticSnapshotPolicyInner>, ElasticSnapshotPolicyInner> beginUpdate(String resourceGroupName, + String accountName, String snapshotPolicyName, ElasticSnapshotPolicyUpdate body, Context context); + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotPolicyInner update(String resourceGroupName, String accountName, String snapshotPolicyName, + ElasticSnapshotPolicyUpdate body); + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotPolicyInner update(String resourceGroupName, String accountName, String snapshotPolicyName, + ElasticSnapshotPolicyUpdate body, Context context); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, + String snapshotPolicyName); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String snapshotPolicyName); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String snapshotPolicyName, Context context); + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticSnapshotPolicyInner> listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticSnapshotPolicyInner> listByElasticAccount(String resourceGroupName, String accountName, + Context context); + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticVolumeInner> listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName); + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticVolumeInner> listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotsClient.java new file mode 100644 index 000000000000..b2021a544dba --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotsClient.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.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.netapp.fluent.models.ElasticSnapshotInner; + +/** + * An instance of this class provides access to all the operations defined in ElasticSnapshotsClient. + */ +public interface ElasticSnapshotsClient { + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<ElasticSnapshotInner> getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context); + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotInner get(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName); + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body 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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticSnapshotInner>, ElasticSnapshotInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, String snapshotName, ElasticSnapshotInner body); + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body 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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticSnapshotInner>, ElasticSnapshotInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, String snapshotName, ElasticSnapshotInner body, + Context context); + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body 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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, ElasticSnapshotInner body); + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body 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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, ElasticSnapshotInner body, Context context); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, + Context context); + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticSnapshotInner> listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName); + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticSnapshotInner> listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticVolumesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticVolumesClient.java new file mode 100644 index 000000000000..6c2a45df398f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticVolumesClient.java @@ -0,0 +1,355 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.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.netapp.fluent.models.ElasticVolumeInner; +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdate; + +/** + * An instance of this class provides access to all the operations defined in ElasticVolumesClient. + */ +public interface ElasticVolumesClient { + /** + * Get the details of the specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<ElasticVolumeInner> getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context); + + /** + * Get the details of the specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticVolumeInner get(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticVolumeInner>, ElasticVolumeInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeInner body); + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticVolumeInner>, ElasticVolumeInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeInner body, Context context); + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticVolumeInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeInner body); + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticVolumeInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeInner body, Context context); + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticVolumeInner>, ElasticVolumeInner> beginUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeUpdate body); + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticVolumeInner>, ElasticVolumeInner> beginUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeUpdate body, Context context); + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticVolumeInner update(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeUpdate body); + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticVolumeInner update(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeUpdate body, Context context); + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String volumeName); + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context); + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticVolumeInner> listByElasticPool(String resourceGroupName, String accountName, String poolName); + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ElasticVolumeInner> listByElasticPool(String resourceGroupName, String accountName, String poolName, + Context context); + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticVolumeInner>, ElasticVolumeInner> beginRevert(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeRevert body); + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ElasticVolumeInner>, ElasticVolumeInner> beginRevert(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeRevert body, Context context); + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticVolumeInner revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert body); + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticVolumeInner revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java index 9dc942a052a9..57bd68b86eac 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java @@ -109,6 +109,13 @@ public interface NetAppManagementClient { */ VolumeQuotaRulesClient getVolumeQuotaRules(); + /** + * Gets the RansomwareReportsClient object to access its operations. + * + * @return the RansomwareReportsClient object. + */ + RansomwareReportsClient getRansomwareReports(); + /** * Gets the BackupVaultsClient object to access its operations. * @@ -116,6 +123,83 @@ public interface NetAppManagementClient { */ BackupVaultsClient getBackupVaults(); + /** + * Gets the BucketsClient object to access its operations. + * + * @return the BucketsClient object. + */ + BucketsClient getBuckets(); + + /** + * Gets the CachesClient object to access its operations. + * + * @return the CachesClient object. + */ + CachesClient getCaches(); + + /** + * Gets the ElasticAccountsClient object to access its operations. + * + * @return the ElasticAccountsClient object. + */ + ElasticAccountsClient getElasticAccounts(); + + /** + * Gets the ElasticCapacityPoolsClient object to access its operations. + * + * @return the ElasticCapacityPoolsClient object. + */ + ElasticCapacityPoolsClient getElasticCapacityPools(); + + /** + * Gets the ElasticVolumesClient object to access its operations. + * + * @return the ElasticVolumesClient object. + */ + ElasticVolumesClient getElasticVolumes(); + + /** + * Gets the ElasticSnapshotsClient object to access its operations. + * + * @return the ElasticSnapshotsClient object. + */ + ElasticSnapshotsClient getElasticSnapshots(); + + /** + * Gets the ElasticSnapshotPoliciesClient object to access its operations. + * + * @return the ElasticSnapshotPoliciesClient object. + */ + ElasticSnapshotPoliciesClient getElasticSnapshotPolicies(); + + /** + * Gets the ElasticBackupVaultsClient object to access its operations. + * + * @return the ElasticBackupVaultsClient object. + */ + ElasticBackupVaultsClient getElasticBackupVaults(); + + /** + * Gets the ElasticBackupPoliciesClient object to access its operations. + * + * @return the ElasticBackupPoliciesClient object. + */ + ElasticBackupPoliciesClient getElasticBackupPolicies(); + + /** + * Gets the ElasticBackupsClient object to access its operations. + * + * @return the ElasticBackupsClient object. + */ + ElasticBackupsClient getElasticBackups(); + + /** + * Gets the ActiveDirectoryConfigsClient object to access its operations. + * + * @return the ActiveDirectoryConfigsClient object. + */ + ActiveDirectoryConfigsClient getActiveDirectoryConfigs(); + /** * Gets the NetAppResourceQuotaLimitsClient object to access its operations. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/RansomwareReportsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/RansomwareReportsClient.java new file mode 100644 index 000000000000..8c3d4a0f5852 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/RansomwareReportsClient.java @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.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.netapp.fluent.models.RansomwareReportInner; +import com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest; + +/** + * An instance of this class provides access to all the operations defined in RansomwareReportsClient. + */ +public interface RansomwareReportsClient { + /** + * Get details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<RansomwareReportInner> getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String ransomwareReportName, Context context); + + /** + * Get details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RansomwareReportInner get(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName); + + /** + * List all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Advanced Ransomware Protection (ARP) reports as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<RansomwareReportInner> list(String resourceGroupName, String accountName, String poolName, + String volumeName); + + /** + * List all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Advanced Ransomware Protection (ARP) reports as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<RansomwareReportInner> list(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context); + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginClearSuspects(String resourceGroupName, String accountName, String poolName, + String volumeName, String ransomwareReportName, RansomwareSuspectsClearRequest body); + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginClearSuspects(String resourceGroupName, String accountName, String poolName, + String volumeName, String ransomwareReportName, RansomwareSuspectsClearRequest body, Context context); + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clearSuspects(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName, RansomwareSuspectsClearRequest body); + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void clearSuspects(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName, RansomwareSuspectsClearRequest body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java index 4d0e89ff44f0..b0fb9bac0327 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java @@ -13,6 +13,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner; import com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner; +import com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; import com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner; @@ -1694,4 +1695,70 @@ SyncPoller<PollResult<Void>, Void> beginRevertRelocation(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) void revertRelocation(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<ListQuotaReportResponseInner>, ListQuotaReportResponseInner> + beginListQuotaReport(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<ListQuotaReportResponseInner>, ListQuotaReportResponseInner> beginListQuotaReport( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + ListQuotaReportResponseInner listQuotaReport(String resourceGroupName, String accountName, String poolName, + String volumeName); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + ListQuotaReportResponseInner listQuotaReport(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java index 667ce9fe0bd8..3f77b6afdc9e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java @@ -11,6 +11,7 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.AccountEncryption; import com.azure.resourcemanager.netapp.models.ActiveDirectory; +import com.azure.resourcemanager.netapp.models.LdapConfiguration; import com.azure.resourcemanager.netapp.models.MultiAdStatus; import java.io.IOException; import java.util.List; @@ -51,6 +52,11 @@ public final class AccountProperties implements JsonSerializable<AccountProperti */ private MultiAdStatus multiAdStatus; + /* + * LDAP Configuration for the account. + */ + private LdapConfiguration ldapConfiguration; + /** * Creates an instance of AccountProperties class. */ @@ -147,6 +153,26 @@ public MultiAdStatus multiAdStatus() { return this.multiAdStatus; } + /** + * Get the ldapConfiguration property: LDAP Configuration for the account. + * + * @return the ldapConfiguration value. + */ + public LdapConfiguration ldapConfiguration() { + return this.ldapConfiguration; + } + + /** + * Set the ldapConfiguration property: LDAP Configuration for the account. + * + * @param ldapConfiguration the ldapConfiguration value to set. + * @return the AccountProperties object itself. + */ + public AccountProperties withLdapConfiguration(LdapConfiguration ldapConfiguration) { + this.ldapConfiguration = ldapConfiguration; + return this; + } + /** * Validates the instance. * @@ -159,6 +185,9 @@ public void validate() { if (encryption() != null) { encryption().validate(); } + if (ldapConfiguration() != null) { + ldapConfiguration().validate(); + } } /** @@ -171,6 +200,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("encryption", this.encryption); jsonWriter.writeStringField("nfsV4IDDomain", this.nfsV4IdDomain); + jsonWriter.writeJsonField("ldapConfiguration", this.ldapConfiguration); return jsonWriter.writeEndObject(); } @@ -203,6 +233,8 @@ public static AccountProperties fromJson(JsonReader jsonReader) throws IOExcepti deserializedAccountProperties.nfsV4IdDomain = reader.getString(); } else if ("multiAdStatus".equals(fieldName)) { deserializedAccountProperties.multiAdStatus = MultiAdStatus.fromString(reader.getString()); + } else if ("ldapConfiguration".equals(fieldName)) { + deserializedAccountProperties.ldapConfiguration = LdapConfiguration.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ActiveDirectoryConfigInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ActiveDirectoryConfigInner.java new file mode 100644 index 000000000000..fdbfdf2c2060 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ActiveDirectoryConfigInner.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import java.io.IOException; +import java.util.Map; + +/** + * Active Directory Configuration resource. + */ +@Fluent +public final class ActiveDirectoryConfigInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ActiveDirectoryConfigProperties properties; + + /* + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) + */ + private String etag; + + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ActiveDirectoryConfigInner class. + */ + public ActiveDirectoryConfigInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ActiveDirectoryConfigProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ActiveDirectoryConfigInner object itself. + */ + public ActiveDirectoryConfigInner withProperties(ActiveDirectoryConfigProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Get the 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 ActiveDirectoryConfigInner object itself. + */ + public ActiveDirectoryConfigInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ActiveDirectoryConfigInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ActiveDirectoryConfigInner withTags(Map<String, String> tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActiveDirectoryConfigInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActiveDirectoryConfigInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ActiveDirectoryConfigInner. + */ + public static ActiveDirectoryConfigInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActiveDirectoryConfigInner deserializedActiveDirectoryConfigInner = new ActiveDirectoryConfigInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.properties + = ActiveDirectoryConfigProperties.fromJson(reader); + } else if ("etag".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.etag = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedActiveDirectoryConfigInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketGenerateCredentialsInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketGenerateCredentialsInner.java new file mode 100644 index 000000000000..c0b2d5a0e60c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketGenerateCredentialsInner.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Bucket Access Key, Secret Key, and Expiry date and time of the key pair. + */ +@Immutable +public final class BucketGenerateCredentialsInner implements JsonSerializable<BucketGenerateCredentialsInner> { + /* + * The Access Key that is required along with the Secret Key to access the bucket. + */ + private String accessKey; + + /* + * The Secret Key that is required along with the Access Key to access the bucket. + */ + private String secretKey; + + /* + * The bucket's Access and Secret key pair expiry date and time (in UTC). + */ + private OffsetDateTime keyPairExpiry; + + /** + * Creates an instance of BucketGenerateCredentialsInner class. + */ + private BucketGenerateCredentialsInner() { + } + + /** + * Get the accessKey property: The Access Key that is required along with the Secret Key to access the bucket. + * + * @return the accessKey value. + */ + public String accessKey() { + return this.accessKey; + } + + /** + * Get the secretKey property: The Secret Key that is required along with the Access Key to access the bucket. + * + * @return the secretKey value. + */ + public String secretKey() { + return this.secretKey; + } + + /** + * Get the keyPairExpiry property: The bucket's Access and Secret key pair expiry date and time (in UTC). + * + * @return the keyPairExpiry value. + */ + public OffsetDateTime keyPairExpiry() { + return this.keyPairExpiry; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BucketGenerateCredentialsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketGenerateCredentialsInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BucketGenerateCredentialsInner. + */ + public static BucketGenerateCredentialsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketGenerateCredentialsInner deserializedBucketGenerateCredentialsInner + = new BucketGenerateCredentialsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("accessKey".equals(fieldName)) { + deserializedBucketGenerateCredentialsInner.accessKey = reader.getString(); + } else if ("secretKey".equals(fieldName)) { + deserializedBucketGenerateCredentialsInner.secretKey = reader.getString(); + } else if ("keyPairExpiry".equals(fieldName)) { + deserializedBucketGenerateCredentialsInner.keyPairExpiry = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketGenerateCredentialsInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketInner.java new file mode 100644 index 000000000000..a6675476ea2f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketInner.java @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerProperties; +import com.azure.resourcemanager.netapp.models.CredentialsStatus; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.ProvisioningState; +import java.io.IOException; + +/** + * Bucket resource. + */ +@Fluent +public final class BucketInner extends ProxyResource { + /* + * Bucket properties + */ + private BucketProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of BucketInner class. + */ + public BucketInner() { + } + + /** + * Get the innerProperties property: Bucket properties. + * + * @return the innerProperties value. + */ + private BucketProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the path property: The volume path mounted inside the bucket. The default is the root path '/' if no value is + * provided when the bucket is created. + * + * @return the path value. + */ + public String path() { + return this.innerProperties() == null ? null : this.innerProperties().path(); + } + + /** + * Set the path property: The volume path mounted inside the bucket. The default is the root path '/' if no value is + * provided when the bucket is created. + * + * @param path the path value to set. + * @return the BucketInner object itself. + */ + public BucketInner withPath(String path) { + if (this.innerProperties() == null) { + this.innerProperties = new BucketProperties(); + } + this.innerProperties().withPath(path); + return this; + } + + /** + * Get the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @return the fileSystemUser value. + */ + public FileSystemUser fileSystemUser() { + return this.innerProperties() == null ? null : this.innerProperties().fileSystemUser(); + } + + /** + * Set the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @param fileSystemUser the fileSystemUser value to set. + * @return the BucketInner object itself. + */ + public BucketInner withFileSystemUser(FileSystemUser fileSystemUser) { + if (this.innerProperties() == null) { + this.innerProperties = new BucketProperties(); + } + this.innerProperties().withFileSystemUser(fileSystemUser); + 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 status property: The bucket credentials status. There states: + * + * "NoCredentialsSet": Access and Secret key pair have not been generated. + * "CredentialsExpired": Access and Secret key pair have expired. + * "Active": The certificate has been installed and credentials are unexpired. + * + * @return the status value. + */ + public CredentialsStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @return the server value. + */ + public BucketServerProperties server() { + return this.innerProperties() == null ? null : this.innerProperties().server(); + } + + /** + * Set the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @param server the server value to set. + * @return the BucketInner object itself. + */ + public BucketInner withServer(BucketServerProperties server) { + if (this.innerProperties() == null) { + this.innerProperties = new BucketProperties(); + } + this.innerProperties().withServer(server); + return this; + } + + /** + * Get the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is + * ReadOnly if no value is provided during bucket creation. + * + * @return the permissions value. + */ + public BucketPermissions permissions() { + return this.innerProperties() == null ? null : this.innerProperties().permissions(); + } + + /** + * Set the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is + * ReadOnly if no value is provided during bucket creation. + * + * @param permissions the permissions value to set. + * @return the BucketInner object itself. + */ + public BucketInner withPermissions(BucketPermissions permissions) { + if (this.innerProperties() == null) { + this.innerProperties = new BucketProperties(); + } + this.innerProperties().withPermissions(permissions); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BucketInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BucketInner. + */ + public static BucketInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketInner deserializedBucketInner = new BucketInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedBucketInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedBucketInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedBucketInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedBucketInner.innerProperties = BucketProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedBucketInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketPatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketPatchProperties.java new file mode 100644 index 000000000000..54a536995baa --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketPatchProperties.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.BucketPatchPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerPatchProperties; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.ProvisioningState; +import java.io.IOException; + +/** + * Bucket resource properties for a Patch operation. + */ +@Fluent +public final class BucketPatchProperties implements JsonSerializable<BucketPatchProperties> { + /* + * The volume path mounted inside the bucket. + */ + private String path; + + /* + * File System user having access to volume data. For Unix, this is the user's uid and gid. For Windows, this is the + * user's username. Note that the Unix and Windows user details are mutually exclusive, meaning one or other must be + * supplied, but not both. + */ + private FileSystemUser fileSystemUser; + + /* + * Provisioning state of the resource + */ + private ProvisioningState provisioningState; + + /* + * Properties of the server managing the lifecycle of volume buckets + */ + private BucketServerPatchProperties server; + + /* + * Access permissions for the bucket. Either ReadOnly or ReadWrite. + */ + private BucketPatchPermissions permissions; + + /** + * Creates an instance of BucketPatchProperties class. + */ + public BucketPatchProperties() { + } + + /** + * Get the path property: The volume path mounted inside the bucket. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: The volume path mounted inside the bucket. + * + * @param path the path value to set. + * @return the BucketPatchProperties object itself. + */ + public BucketPatchProperties withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @return the fileSystemUser value. + */ + public FileSystemUser fileSystemUser() { + return this.fileSystemUser; + } + + /** + * Set the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @param fileSystemUser the fileSystemUser value to set. + * @return the BucketPatchProperties object itself. + */ + public BucketPatchProperties withFileSystemUser(FileSystemUser fileSystemUser) { + this.fileSystemUser = fileSystemUser; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @return the server value. + */ + public BucketServerPatchProperties server() { + return this.server; + } + + /** + * Set the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @param server the server value to set. + * @return the BucketPatchProperties object itself. + */ + public BucketPatchProperties withServer(BucketServerPatchProperties server) { + this.server = server; + return this; + } + + /** + * Get the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. + * + * @return the permissions value. + */ + public BucketPatchPermissions permissions() { + return this.permissions; + } + + /** + * Set the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. + * + * @param permissions the permissions value to set. + * @return the BucketPatchProperties object itself. + */ + public BucketPatchProperties withPermissions(BucketPatchPermissions permissions) { + this.permissions = permissions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (fileSystemUser() != null) { + fileSystemUser().validate(); + } + if (server() != null) { + server().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("path", this.path); + jsonWriter.writeJsonField("fileSystemUser", this.fileSystemUser); + jsonWriter.writeJsonField("server", this.server); + jsonWriter.writeStringField("permissions", this.permissions == null ? null : this.permissions.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BucketPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketPatchProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the BucketPatchProperties. + */ + public static BucketPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketPatchProperties deserializedBucketPatchProperties = new BucketPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("path".equals(fieldName)) { + deserializedBucketPatchProperties.path = reader.getString(); + } else if ("fileSystemUser".equals(fieldName)) { + deserializedBucketPatchProperties.fileSystemUser = FileSystemUser.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedBucketPatchProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("server".equals(fieldName)) { + deserializedBucketPatchProperties.server = BucketServerPatchProperties.fromJson(reader); + } else if ("permissions".equals(fieldName)) { + deserializedBucketPatchProperties.permissions + = BucketPatchPermissions.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketPatchProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketProperties.java new file mode 100644 index 000000000000..8b629e58abc6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketProperties.java @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerProperties; +import com.azure.resourcemanager.netapp.models.CredentialsStatus; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.ProvisioningState; +import java.io.IOException; + +/** + * Bucket resource properties. + */ +@Fluent +public final class BucketProperties implements JsonSerializable<BucketProperties> { + /* + * The volume path mounted inside the bucket. The default is the root path '/' if no value is provided when the + * bucket is created. + */ + private String path; + + /* + * File System user having access to volume data. For Unix, this is the user's uid and gid. For Windows, this is the + * user's username. Note that the Unix and Windows user details are mutually exclusive, meaning one or other must be + * supplied, but not both. + */ + private FileSystemUser fileSystemUser; + + /* + * Provisioning state of the resource + */ + private ProvisioningState provisioningState; + + /* + * The bucket credentials status. There states: + * + * "NoCredentialsSet": Access and Secret key pair have not been generated. + * "CredentialsExpired": Access and Secret key pair have expired. + * "Active": The certificate has been installed and credentials are unexpired. + */ + private CredentialsStatus status; + + /* + * Properties of the server managing the lifecycle of volume buckets + */ + private BucketServerProperties server; + + /* + * Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is ReadOnly if no value is provided + * during bucket creation. + */ + private BucketPermissions permissions; + + /** + * Creates an instance of BucketProperties class. + */ + public BucketProperties() { + } + + /** + * Get the path property: The volume path mounted inside the bucket. The default is the root path '/' if no value is + * provided when the bucket is created. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: The volume path mounted inside the bucket. The default is the root path '/' if no value is + * provided when the bucket is created. + * + * @param path the path value to set. + * @return the BucketProperties object itself. + */ + public BucketProperties withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @return the fileSystemUser value. + */ + public FileSystemUser fileSystemUser() { + return this.fileSystemUser; + } + + /** + * Set the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @param fileSystemUser the fileSystemUser value to set. + * @return the BucketProperties object itself. + */ + public BucketProperties withFileSystemUser(FileSystemUser fileSystemUser) { + this.fileSystemUser = fileSystemUser; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: The bucket credentials status. There states: + * + * "NoCredentialsSet": Access and Secret key pair have not been generated. + * "CredentialsExpired": Access and Secret key pair have expired. + * "Active": The certificate has been installed and credentials are unexpired. + * + * @return the status value. + */ + public CredentialsStatus status() { + return this.status; + } + + /** + * Get the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @return the server value. + */ + public BucketServerProperties server() { + return this.server; + } + + /** + * Set the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @param server the server value to set. + * @return the BucketProperties object itself. + */ + public BucketProperties withServer(BucketServerProperties server) { + this.server = server; + return this; + } + + /** + * Get the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is + * ReadOnly if no value is provided during bucket creation. + * + * @return the permissions value. + */ + public BucketPermissions permissions() { + return this.permissions; + } + + /** + * Set the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is + * ReadOnly if no value is provided during bucket creation. + * + * @param permissions the permissions value to set. + * @return the BucketProperties object itself. + */ + public BucketProperties withPermissions(BucketPermissions permissions) { + this.permissions = permissions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (fileSystemUser() != null) { + fileSystemUser().validate(); + } + if (server() != null) { + server().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("path", this.path); + jsonWriter.writeJsonField("fileSystemUser", this.fileSystemUser); + jsonWriter.writeJsonField("server", this.server); + jsonWriter.writeStringField("permissions", this.permissions == null ? null : this.permissions.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BucketProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the BucketProperties. + */ + public static BucketProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketProperties deserializedBucketProperties = new BucketProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("path".equals(fieldName)) { + deserializedBucketProperties.path = reader.getString(); + } else if ("fileSystemUser".equals(fieldName)) { + deserializedBucketProperties.fileSystemUser = FileSystemUser.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedBucketProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedBucketProperties.status = CredentialsStatus.fromString(reader.getString()); + } else if ("server".equals(fieldName)) { + deserializedBucketProperties.server = BucketServerProperties.fromJson(reader); + } else if ("permissions".equals(fieldName)) { + deserializedBucketProperties.permissions = BucketPermissions.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CacheInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CacheInner.java new file mode 100644 index 000000000000..626d88faf123 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CacheInner.java @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.CacheProperties; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Cache resource. + */ +@Fluent +public final class CacheInner extends Resource { + /* + * Cache properties + */ + private CacheProperties properties; + + /* + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) + */ + private String etag; + + /* + * The availability zones. + */ + private List<String> zones; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of CacheInner class. + */ + public CacheInner() { + } + + /** + * Get the properties property: Cache properties. + * + * @return the properties value. + */ + public CacheProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Cache properties. + * + * @param properties the properties value to set. + * @return the CacheInner object itself. + */ + public CacheInner withProperties(CacheProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Get the zones property: The availability zones. + * + * @return the zones value. + */ + public List<String> zones() { + return this.zones; + } + + /** + * Set the zones property: The availability zones. + * + * @param zones the zones value to set. + * @return the CacheInner object itself. + */ + public CacheInner withZones(List<String> zones) { + this.zones = zones; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public CacheInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CacheInner withTags(Map<String, String> tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property properties in model CacheInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CacheInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CacheInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CacheInner if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CacheInner. + */ + public static CacheInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CacheInner deserializedCacheInner = new CacheInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedCacheInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCacheInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedCacheInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedCacheInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedCacheInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedCacheInner.properties = CacheProperties.fromJson(reader); + } else if ("etag".equals(fieldName)) { + deserializedCacheInner.etag = reader.getString(); + } else if ("zones".equals(fieldName)) { + List<String> zones = reader.readArray(reader1 -> reader1.getString()); + deserializedCacheInner.zones = zones; + } else if ("systemData".equals(fieldName)) { + deserializedCacheInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCacheInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckElasticResourceAvailabilityResponseInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckElasticResourceAvailabilityResponseInner.java new file mode 100644 index 000000000000..e510e0cead5c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckElasticResourceAvailabilityResponseInner.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityReason; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityStatus; +import java.io.IOException; + +/** + * Information regarding availability of a resource. + */ +@Immutable +public final class CheckElasticResourceAvailabilityResponseInner + implements JsonSerializable<CheckElasticResourceAvailabilityResponseInner> { + /* + * True indicates name is valid and available. False indicates the name is invalid, unavailable, or both. + */ + private CheckElasticResourceAvailabilityStatus isAvailable; + + /* + * Invalid indicates the name provided does not match Azure NetApp Files naming requirements. AlreadyExists + * indicates that the name is already in use and is therefore unavailable. + */ + private CheckElasticResourceAvailabilityReason reason; + + /* + * If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource + * naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource + * name is already in use, and direct them to select a different name. + */ + private String message; + + /** + * Creates an instance of CheckElasticResourceAvailabilityResponseInner class. + */ + private CheckElasticResourceAvailabilityResponseInner() { + } + + /** + * Get the isAvailable property: True indicates name is valid and available. False indicates the name is invalid, + * unavailable, or both. + * + * @return the isAvailable value. + */ + public CheckElasticResourceAvailabilityStatus isAvailable() { + return this.isAvailable; + } + + /** + * Get the reason property: Invalid indicates the name provided does not match Azure NetApp Files naming + * requirements. AlreadyExists indicates that the name is already in use and is therefore unavailable. + * + * @return the reason value. + */ + public CheckElasticResourceAvailabilityReason reason() { + return this.reason; + } + + /** + * Get the message property: If reason == invalid, provide the user with the reason why the given name is invalid, + * and provide the resource naming requirements so that the user can select a valid name. If reason == + * AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("isAvailable", this.isAvailable == null ? null : this.isAvailable.toString()); + jsonWriter.writeStringField("reason", this.reason == null ? null : this.reason.toString()); + jsonWriter.writeStringField("message", this.message); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CheckElasticResourceAvailabilityResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CheckElasticResourceAvailabilityResponseInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CheckElasticResourceAvailabilityResponseInner. + */ + public static CheckElasticResourceAvailabilityResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CheckElasticResourceAvailabilityResponseInner deserializedCheckElasticResourceAvailabilityResponseInner + = new CheckElasticResourceAvailabilityResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isAvailable".equals(fieldName)) { + deserializedCheckElasticResourceAvailabilityResponseInner.isAvailable + = CheckElasticResourceAvailabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedCheckElasticResourceAvailabilityResponseInner.reason + = CheckElasticResourceAvailabilityReason.fromString(reader.getString()); + } else if ("message".equals(fieldName)) { + deserializedCheckElasticResourceAvailabilityResponseInner.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCheckElasticResourceAvailabilityResponseInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticAccountInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticAccountInner.java new file mode 100644 index 000000000000..fec53001fe1a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticAccountInner.java @@ -0,0 +1,246 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticAccountProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import java.io.IOException; +import java.util.Map; + +/** + * NetApp elastic account resource. + */ +@Fluent +public final class ElasticAccountInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticAccountProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticAccountInner class. + */ + public ElasticAccountInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticAccountProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticAccountInner object itself. + */ + public ElasticAccountInner withProperties(ElasticAccountProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the 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 ElasticAccountInner object itself. + */ + public ElasticAccountInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticAccountInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticAccountInner withTags(Map<String, String> tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticAccountInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticAccountInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticAccountInner. + */ + public static ElasticAccountInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticAccountInner deserializedElasticAccountInner = new ElasticAccountInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticAccountInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticAccountInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticAccountInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticAccountInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticAccountInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticAccountInner.properties = ElasticAccountProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticAccountInner.eTag = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedElasticAccountInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedElasticAccountInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticAccountInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupInner.java new file mode 100644 index 000000000000..355c759d9ec7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupInner.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticBackupProperties; +import java.io.IOException; + +/** + * NetApp Elastic Backup under an elastic Backup Vault. + */ +@Fluent +public final class ElasticBackupInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private ElasticBackupProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticBackupInner class. + */ + public ElasticBackupInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticBackupProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticBackupInner object itself. + */ + public ElasticBackupInner withProperties(ElasticBackupProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupInner. + */ + public static ElasticBackupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupInner deserializedElasticBackupInner = new ElasticBackupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticBackupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticBackupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticBackupInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedElasticBackupInner.properties = ElasticBackupProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedElasticBackupInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupPolicyInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupPolicyInner.java new file mode 100644 index 000000000000..46c2fe6bfa0d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupPolicyInner.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties; +import java.io.IOException; +import java.util.Map; + +/** + * NetApp Elastic Backup Policy resource. + */ +@Fluent +public final class ElasticBackupPolicyInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticBackupPolicyProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticBackupPolicyInner class. + */ + public ElasticBackupPolicyInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticBackupPolicyProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticBackupPolicyInner object itself. + */ + public ElasticBackupPolicyInner withProperties(ElasticBackupPolicyProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticBackupPolicyInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticBackupPolicyInner withTags(Map<String, String> tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupPolicyInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupPolicyInner. + */ + public static ElasticBackupPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupPolicyInner deserializedElasticBackupPolicyInner = new ElasticBackupPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticBackupPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticBackupPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticBackupPolicyInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticBackupPolicyInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticBackupPolicyInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticBackupPolicyInner.properties = ElasticBackupPolicyProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticBackupPolicyInner.eTag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedElasticBackupPolicyInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupPolicyInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupVaultInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupVaultInner.java new file mode 100644 index 000000000000..578bd49e28cd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupVaultInner.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties; +import java.io.IOException; +import java.util.Map; + +/** + * NetApp elastic backup vault resource. + */ +@Fluent +public final class ElasticBackupVaultInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticBackupVaultProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticBackupVaultInner class. + */ + public ElasticBackupVaultInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticBackupVaultProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticBackupVaultInner object itself. + */ + public ElasticBackupVaultInner withProperties(ElasticBackupVaultProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticBackupVaultInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticBackupVaultInner withTags(Map<String, String> tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupVaultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupVaultInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupVaultInner. + */ + public static ElasticBackupVaultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupVaultInner deserializedElasticBackupVaultInner = new ElasticBackupVaultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticBackupVaultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticBackupVaultInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticBackupVaultInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticBackupVaultInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticBackupVaultInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticBackupVaultInner.properties = ElasticBackupVaultProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticBackupVaultInner.eTag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedElasticBackupVaultInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupVaultInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticCapacityPoolInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticCapacityPoolInner.java new file mode 100644 index 000000000000..9440f6af3ca5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticCapacityPoolInner.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolProperties; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * NetApp Elastic Capacity Pool resource. + */ +@Fluent +public final class ElasticCapacityPoolInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticCapacityPoolProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * The availability zones. + */ + private List<String> zones; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticCapacityPoolInner class. + */ + public ElasticCapacityPoolInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticCapacityPoolProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticCapacityPoolInner object itself. + */ + public ElasticCapacityPoolInner withProperties(ElasticCapacityPoolProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the zones property: The availability zones. + * + * @return the zones value. + */ + public List<String> zones() { + return this.zones; + } + + /** + * Set the zones property: The availability zones. + * + * @param zones the zones value to set. + * @return the ElasticCapacityPoolInner object itself. + */ + public ElasticCapacityPoolInner withZones(List<String> zones) { + this.zones = zones; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticCapacityPoolInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticCapacityPoolInner withTags(Map<String, String> tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticCapacityPoolInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticCapacityPoolInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticCapacityPoolInner. + */ + public static ElasticCapacityPoolInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticCapacityPoolInner deserializedElasticCapacityPoolInner = new ElasticCapacityPoolInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticCapacityPoolInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticCapacityPoolInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticCapacityPoolInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticCapacityPoolInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticCapacityPoolInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticCapacityPoolInner.properties = ElasticCapacityPoolProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticCapacityPoolInner.eTag = reader.getString(); + } else if ("zones".equals(fieldName)) { + List<String> zones = reader.readArray(reader1 -> reader1.getString()); + deserializedElasticCapacityPoolInner.zones = zones; + } else if ("systemData".equals(fieldName)) { + deserializedElasticCapacityPoolInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticCapacityPoolInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotInner.java new file mode 100644 index 000000000000..0e81120fbefd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotInner.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties; +import java.io.IOException; + +/** + * NetApp Elastic Snapshot under an Elastic Volume. + */ +@Fluent +public final class ElasticSnapshotInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private ElasticSnapshotProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticSnapshotInner class. + */ + public ElasticSnapshotInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticSnapshotProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticSnapshotInner object itself. + */ + public ElasticSnapshotInner withProperties(ElasticSnapshotProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticSnapshotInner. + */ + public static ElasticSnapshotInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotInner deserializedElasticSnapshotInner = new ElasticSnapshotInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticSnapshotInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticSnapshotInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticSnapshotInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedElasticSnapshotInner.properties = ElasticSnapshotProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedElasticSnapshotInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotPolicyInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotPolicyInner.java new file mode 100644 index 000000000000..2aa9cb9185f2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotPolicyInner.java @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties; +import java.io.IOException; +import java.util.Map; + +/** + * NetApp Elastic Snapshot Policy under an Elastic Account. + */ +@Fluent +public final class ElasticSnapshotPolicyInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticSnapshotPolicyProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticSnapshotPolicyInner class. + */ + public ElasticSnapshotPolicyInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticSnapshotPolicyProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticSnapshotPolicyInner object itself. + */ + public ElasticSnapshotPolicyInner withProperties(ElasticSnapshotPolicyProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticSnapshotPolicyInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticSnapshotPolicyInner withTags(Map<String, String> tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyInner. + */ + public static ElasticSnapshotPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyInner deserializedElasticSnapshotPolicyInner = new ElasticSnapshotPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticSnapshotPolicyInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.properties + = ElasticSnapshotPolicyProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.eTag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticVolumeInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticVolumeInner.java new file mode 100644 index 000000000000..53b43ec7950f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticVolumeInner.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticVolumeProperties; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * NetApp Elastic Volume resource. + */ +@Fluent +public final class ElasticVolumeInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticVolumeProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * The availability zones. + */ + private List<String> zones; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticVolumeInner class. + */ + public ElasticVolumeInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticVolumeProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticVolumeInner object itself. + */ + public ElasticVolumeInner withProperties(ElasticVolumeProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the zones property: The availability zones. + * + * @return the zones value. + */ + public List<String> zones() { + return this.zones; + } + + /** + * Set the zones property: The availability zones. + * + * @param zones the zones value to set. + * @return the ElasticVolumeInner object itself. + */ + public ElasticVolumeInner withZones(List<String> zones) { + this.zones = zones; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticVolumeInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticVolumeInner withTags(Map<String, String> tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticVolumeInner. + */ + public static ElasticVolumeInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeInner deserializedElasticVolumeInner = new ElasticVolumeInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticVolumeInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticVolumeInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticVolumeInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticVolumeInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticVolumeInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticVolumeInner.properties = ElasticVolumeProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticVolumeInner.eTag = reader.getString(); + } else if ("zones".equals(fieldName)) { + List<String> zones = reader.readArray(reader1 -> reader1.getString()); + deserializedElasticVolumeInner.zones = zones; + } else if ("systemData".equals(fieldName)) { + deserializedElasticVolumeInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ListQuotaReportResponseInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ListQuotaReportResponseInner.java new file mode 100644 index 000000000000..e88504dd61f7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ListQuotaReportResponseInner.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.QuotaReport; +import java.io.IOException; +import java.util.List; + +/** + * Quota Report for volume. + */ +@Immutable +public final class ListQuotaReportResponseInner implements JsonSerializable<ListQuotaReportResponseInner> { + /* + * List of quota reports + */ + private List<QuotaReport> value; + + /** + * Creates an instance of ListQuotaReportResponseInner class. + */ + private ListQuotaReportResponseInner() { + } + + /** + * Get the value property: List of quota reports. + * + * @return the value value. + */ + public List<QuotaReport> value() { + return this.value; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ListQuotaReportResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ListQuotaReportResponseInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ListQuotaReportResponseInner. + */ + public static ListQuotaReportResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ListQuotaReportResponseInner deserializedListQuotaReportResponseInner = new ListQuotaReportResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<QuotaReport> value = reader.readArray(reader1 -> QuotaReport.fromJson(reader1)); + deserializedListQuotaReportResponseInner.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedListQuotaReportResponseInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java index ec793e09817a..fa4ebd7949dc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java @@ -12,6 +12,7 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.AccountEncryption; import com.azure.resourcemanager.netapp.models.ActiveDirectory; +import com.azure.resourcemanager.netapp.models.LdapConfiguration; import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; import com.azure.resourcemanager.netapp.models.MultiAdStatus; import java.io.IOException; @@ -262,6 +263,29 @@ public MultiAdStatus multiAdStatus() { return this.innerProperties() == null ? null : this.innerProperties().multiAdStatus(); } + /** + * Get the ldapConfiguration property: LDAP Configuration for the account. + * + * @return the ldapConfiguration value. + */ + public LdapConfiguration ldapConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().ldapConfiguration(); + } + + /** + * Set the ldapConfiguration property: LDAP Configuration for the account. + * + * @param ldapConfiguration the ldapConfiguration value to set. + * @return the NetAppAccountInner object itself. + */ + public NetAppAccountInner withLdapConfiguration(LdapConfiguration ldapConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new AccountProperties(); + } + this.innerProperties().withLdapConfiguration(ldapConfiguration); + return this; + } + /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PeeringPassphrasesInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PeeringPassphrasesInner.java new file mode 100644 index 000000000000..0f4de639e040 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PeeringPassphrasesInner.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The response containing peering passphrases and commands for cluster and vserver peering. + */ +@Immutable +public final class PeeringPassphrasesInner implements JsonSerializable<PeeringPassphrasesInner> { + /* + * The cluster peering command. + */ + private String clusterPeeringCommand; + + /* + * The cluster peering passphrase. + */ + private String clusterPeeringPassphrase; + + /* + * The vserver peering command. + */ + private String vserverPeeringCommand; + + /** + * Creates an instance of PeeringPassphrasesInner class. + */ + private PeeringPassphrasesInner() { + } + + /** + * Get the clusterPeeringCommand property: The cluster peering command. + * + * @return the clusterPeeringCommand value. + */ + public String clusterPeeringCommand() { + return this.clusterPeeringCommand; + } + + /** + * Get the clusterPeeringPassphrase property: The cluster peering passphrase. + * + * @return the clusterPeeringPassphrase value. + */ + public String clusterPeeringPassphrase() { + return this.clusterPeeringPassphrase; + } + + /** + * Get the vserverPeeringCommand property: The vserver peering command. + * + * @return the vserverPeeringCommand value. + */ + public String vserverPeeringCommand() { + return this.vserverPeeringCommand; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (clusterPeeringCommand() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property clusterPeeringCommand in model PeeringPassphrasesInner")); + } + if (clusterPeeringPassphrase() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property clusterPeeringPassphrase in model PeeringPassphrasesInner")); + } + if (vserverPeeringCommand() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property vserverPeeringCommand in model PeeringPassphrasesInner")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PeeringPassphrasesInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("clusterPeeringCommand", this.clusterPeeringCommand); + jsonWriter.writeStringField("clusterPeeringPassphrase", this.clusterPeeringPassphrase); + jsonWriter.writeStringField("vserverPeeringCommand", this.vserverPeeringCommand); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PeeringPassphrasesInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PeeringPassphrasesInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PeeringPassphrasesInner. + */ + public static PeeringPassphrasesInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PeeringPassphrasesInner deserializedPeeringPassphrasesInner = new PeeringPassphrasesInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("clusterPeeringCommand".equals(fieldName)) { + deserializedPeeringPassphrasesInner.clusterPeeringCommand = reader.getString(); + } else if ("clusterPeeringPassphrase".equals(fieldName)) { + deserializedPeeringPassphrasesInner.clusterPeeringPassphrase = reader.getString(); + } else if ("vserverPeeringCommand".equals(fieldName)) { + deserializedPeeringPassphrasesInner.vserverPeeringCommand = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPeeringPassphrasesInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RansomwareReportInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RansomwareReportInner.java new file mode 100644 index 000000000000..e09288e574cb --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RansomwareReportInner.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.RansomwareReportProperties; +import java.io.IOException; + +/** + * Advanced Ransomware Protection (ARP) report + * Get details of the specified Advanced Ransomware Protection report (ARP). + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, abnormal + * volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one of + * these ARP snapshots or another snapshot of your volume to restore data. + */ +@Immutable +public final class RansomwareReportInner extends ProxyResource { + /* + * Advanced Ransomware Protection reports Properties + */ + private RansomwareReportProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of RansomwareReportInner class. + */ + private RansomwareReportInner() { + } + + /** + * Get the properties property: Advanced Ransomware Protection reports Properties. + * + * @return the properties value. + */ + public RansomwareReportProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RansomwareReportInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RansomwareReportInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RansomwareReportInner. + */ + public static RansomwareReportInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RansomwareReportInner deserializedRansomwareReportInner = new RansomwareReportInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRansomwareReportInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRansomwareReportInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRansomwareReportInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRansomwareReportInner.properties = RansomwareReportProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedRansomwareReportInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRansomwareReportInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java index 5a4ea7f2feb7..23790850280f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java @@ -13,11 +13,14 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit; import com.azure.resourcemanager.netapp.models.AvsDataStore; +import com.azure.resourcemanager.netapp.models.BreakthroughMode; import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; import com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy; import com.azure.resourcemanager.netapp.models.EnableSubvolumes; import com.azure.resourcemanager.netapp.models.EncryptionKeySource; import com.azure.resourcemanager.netapp.models.FileAccessLogs; +import com.azure.resourcemanager.netapp.models.LargeVolumeType; +import com.azure.resourcemanager.netapp.models.LdapServerType; import com.azure.resourcemanager.netapp.models.MountTargetProperties; import com.azure.resourcemanager.netapp.models.NetworkFeatures; import com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs; @@ -25,6 +28,7 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; +import com.azure.resourcemanager.netapp.models.VolumeLanguage; import com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; import com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity; @@ -234,9 +238,11 @@ public VolumeInner withServiceLevel(ServiceLevel serviceLevel) { /** * Get the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @return the usageThreshold value. */ @@ -246,9 +252,11 @@ public long usageThreshold() { /** * Set the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @param usageThreshold the usageThreshold value to set. * @return the VolumeInner object itself. @@ -862,6 +870,29 @@ public VolumeInner withLdapEnabled(Boolean ldapEnabled) { return this; } + /** + * Get the ldapServerType property: Specifies the type of LDAP server for a given NFS volume. + * + * @return the ldapServerType value. + */ + public LdapServerType ldapServerType() { + return this.innerProperties() == null ? null : this.innerProperties().ldapServerType(); + } + + /** + * Set the ldapServerType property: Specifies the type of LDAP server for a given NFS volume. + * + * @param ldapServerType the ldapServerType value to set. + * @return the VolumeInner object itself. + */ + public VolumeInner withLdapServerType(LdapServerType ldapServerType) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withLdapServerType(ldapServerType); + return this; + } + /** * Get the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume. * @@ -1321,6 +1352,37 @@ public VolumeInner withIsLargeVolume(Boolean isLargeVolume) { return this; } + /** + * Get the largeVolumeType property: Specifies the type of the Large Volume. When set to 'LargeVolume', the large + * volume is created with standard configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit 7.2PiB + * with cool access enabled, + * delivering higher capacity limit with lower costs. + * + * @return the largeVolumeType value. + */ + public LargeVolumeType largeVolumeType() { + return this.innerProperties() == null ? null : this.innerProperties().largeVolumeType(); + } + + /** + * Set the largeVolumeType property: Specifies the type of the Large Volume. When set to 'LargeVolume', the large + * volume is created with standard configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit 7.2PiB + * with cool access enabled, + * delivering higher capacity limit with lower costs. + * + * @param largeVolumeType the largeVolumeType value to set. + * @return the VolumeInner object itself. + */ + public VolumeInner withLargeVolumeType(LargeVolumeType largeVolumeType) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withLargeVolumeType(largeVolumeType); + return this; + } + /** * Get the originatingResourceId property: Id of the snapshot or backup that the volume is restored from. * @@ -1339,6 +1401,52 @@ public Long inheritedSizeInBytes() { return this.innerProperties() == null ? null : this.innerProperties().inheritedSizeInBytes(); } + /** + * Get the language property: Language supported for volume. + * + * @return the language value. + */ + public VolumeLanguage language() { + return this.innerProperties() == null ? null : this.innerProperties().language(); + } + + /** + * Set the language property: Language supported for volume. + * + * @param language the language value to set. + * @return the VolumeInner object itself. + */ + public VolumeInner withLanguage(VolumeLanguage language) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withLanguage(language); + return this; + } + + /** + * Get the breakthroughMode property: Specifies whether the volume operates in Breakthrough Mode. + * + * @return the breakthroughMode value. + */ + public BreakthroughMode breakthroughMode() { + return this.innerProperties() == null ? null : this.innerProperties().breakthroughMode(); + } + + /** + * Set the breakthroughMode property: Specifies whether the volume operates in Breakthrough Mode. + * + * @param breakthroughMode the breakthroughMode value to set. + * @return the VolumeInner object itself. + */ + public VolumeInner withBreakthroughMode(BreakthroughMode breakthroughMode) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withBreakthroughMode(breakthroughMode); + return this; + } + /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java index b03bf0e90072..a719bc951111 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java @@ -31,8 +31,10 @@ public final class VolumePatchProperties implements JsonSerializable<VolumePatch /* * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For - * regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range - * 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples + * regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples * of 1 GiB. */ private Long usageThreshold; @@ -154,9 +156,11 @@ public VolumePatchProperties withServiceLevel(ServiceLevel serviceLevel) { /** * Get the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @return the usageThreshold value. */ @@ -166,9 +170,11 @@ public Long usageThreshold() { /** * Set the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @param usageThreshold the usageThreshold value to set. * @return the VolumePatchProperties object itself. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java index f91accd40531..4ea61c6a08c1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java @@ -12,11 +12,14 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit; import com.azure.resourcemanager.netapp.models.AvsDataStore; +import com.azure.resourcemanager.netapp.models.BreakthroughMode; import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; import com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy; import com.azure.resourcemanager.netapp.models.EnableSubvolumes; import com.azure.resourcemanager.netapp.models.EncryptionKeySource; import com.azure.resourcemanager.netapp.models.FileAccessLogs; +import com.azure.resourcemanager.netapp.models.LargeVolumeType; +import com.azure.resourcemanager.netapp.models.LdapServerType; import com.azure.resourcemanager.netapp.models.MountTargetProperties; import com.azure.resourcemanager.netapp.models.NetworkFeatures; import com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs; @@ -24,6 +27,7 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; +import com.azure.resourcemanager.netapp.models.VolumeLanguage; import com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; import com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity; @@ -52,8 +56,10 @@ public final class VolumeProperties implements JsonSerializable<VolumeProperties /* * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For - * regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range - * 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples + * regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples * of 1 GiB. */ private long usageThreshold; @@ -212,6 +218,11 @@ public final class VolumeProperties implements JsonSerializable<VolumeProperties */ private Boolean ldapEnabled; + /* + * Specifies the type of LDAP server for a given NFS volume. + */ + private LdapServerType ldapServerType; + /* * Specifies whether Cool Access(tiering) is enabled for the volume. */ @@ -345,6 +356,15 @@ public final class VolumeProperties implements JsonSerializable<VolumeProperties */ private Boolean isLargeVolume; + /* + * Specifies the type of the Large Volume. When set to 'LargeVolume', the large volume is created with standard + * configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit 7.2PiB + * with cool access enabled, + * delivering higher capacity limit with lower costs. + */ + private LargeVolumeType largeVolumeType; + /* * Id of the snapshot or backup that the volume is restored from. */ @@ -355,6 +375,16 @@ public final class VolumeProperties implements JsonSerializable<VolumeProperties */ private Long inheritedSizeInBytes; + /* + * Language supported for volume. + */ + private VolumeLanguage language; + + /* + * Specifies whether the volume operates in Breakthrough Mode. + */ + private BreakthroughMode breakthroughMode; + /** * Creates an instance of VolumeProperties class. */ @@ -412,9 +442,11 @@ public VolumeProperties withServiceLevel(ServiceLevel serviceLevel) { /** * Get the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @return the usageThreshold value. */ @@ -424,9 +456,11 @@ public long usageThreshold() { /** * Set the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @param usageThreshold the usageThreshold value to set. * @return the VolumeProperties object itself. @@ -971,6 +1005,26 @@ public VolumeProperties withLdapEnabled(Boolean ldapEnabled) { return this; } + /** + * Get the ldapServerType property: Specifies the type of LDAP server for a given NFS volume. + * + * @return the ldapServerType value. + */ + public LdapServerType ldapServerType() { + return this.ldapServerType; + } + + /** + * Set the ldapServerType property: Specifies the type of LDAP server for a given NFS volume. + * + * @param ldapServerType the ldapServerType value to set. + * @return the VolumeProperties object itself. + */ + public VolumeProperties withLdapServerType(LdapServerType ldapServerType) { + this.ldapServerType = ldapServerType; + return this; + } + /** * Get the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume. * @@ -1385,6 +1439,34 @@ public VolumeProperties withIsLargeVolume(Boolean isLargeVolume) { return this; } + /** + * Get the largeVolumeType property: Specifies the type of the Large Volume. When set to 'LargeVolume', the large + * volume is created with standard configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit 7.2PiB + * with cool access enabled, + * delivering higher capacity limit with lower costs. + * + * @return the largeVolumeType value. + */ + public LargeVolumeType largeVolumeType() { + return this.largeVolumeType; + } + + /** + * Set the largeVolumeType property: Specifies the type of the Large Volume. When set to 'LargeVolume', the large + * volume is created with standard configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit 7.2PiB + * with cool access enabled, + * delivering higher capacity limit with lower costs. + * + * @param largeVolumeType the largeVolumeType value to set. + * @return the VolumeProperties object itself. + */ + public VolumeProperties withLargeVolumeType(LargeVolumeType largeVolumeType) { + this.largeVolumeType = largeVolumeType; + return this; + } + /** * Get the originatingResourceId property: Id of the snapshot or backup that the volume is restored from. * @@ -1403,6 +1485,46 @@ public Long inheritedSizeInBytes() { return this.inheritedSizeInBytes; } + /** + * Get the language property: Language supported for volume. + * + * @return the language value. + */ + public VolumeLanguage language() { + return this.language; + } + + /** + * Set the language property: Language supported for volume. + * + * @param language the language value to set. + * @return the VolumeProperties object itself. + */ + public VolumeProperties withLanguage(VolumeLanguage language) { + this.language = language; + return this; + } + + /** + * Get the breakthroughMode property: Specifies whether the volume operates in Breakthrough Mode. + * + * @return the breakthroughMode value. + */ + public BreakthroughMode breakthroughMode() { + return this.breakthroughMode; + } + + /** + * Set the breakthroughMode property: Specifies whether the volume operates in Breakthrough Mode. + * + * @param breakthroughMode the breakthroughMode value to set. + * @return the VolumeProperties object itself. + */ + public VolumeProperties withBreakthroughMode(BreakthroughMode breakthroughMode) { + this.breakthroughMode = breakthroughMode; + return this; + } + /** * Validates the instance. * @@ -1471,6 +1593,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { this.encryptionKeySource == null ? null : this.encryptionKeySource.toString()); jsonWriter.writeStringField("keyVaultPrivateEndpointResourceId", this.keyVaultPrivateEndpointResourceId); jsonWriter.writeBooleanField("ldapEnabled", this.ldapEnabled); + jsonWriter.writeStringField("ldapServerType", + this.ldapServerType == null ? null : this.ldapServerType.toString()); jsonWriter.writeBooleanField("coolAccess", this.coolAccess); jsonWriter.writeNumberField("coolnessPeriod", this.coolnessPeriod); jsonWriter.writeStringField("coolAccessRetrievalPolicy", @@ -1490,6 +1614,11 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("enableSubvolumes", this.enableSubvolumes == null ? null : this.enableSubvolumes.toString()); jsonWriter.writeBooleanField("isLargeVolume", this.isLargeVolume); + jsonWriter.writeStringField("largeVolumeType", + this.largeVolumeType == null ? null : this.largeVolumeType.toString()); + jsonWriter.writeStringField("language", this.language == null ? null : this.language.toString()); + jsonWriter.writeStringField("breakthroughMode", + this.breakthroughMode == null ? null : this.breakthroughMode.toString()); return jsonWriter.writeEndObject(); } @@ -1583,6 +1712,8 @@ public static VolumeProperties fromJson(JsonReader jsonReader) throws IOExceptio deserializedVolumeProperties.keyVaultPrivateEndpointResourceId = reader.getString(); } else if ("ldapEnabled".equals(fieldName)) { deserializedVolumeProperties.ldapEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("ldapServerType".equals(fieldName)) { + deserializedVolumeProperties.ldapServerType = LdapServerType.fromString(reader.getString()); } else if ("coolAccess".equals(fieldName)) { deserializedVolumeProperties.coolAccess = reader.getNullable(JsonReader::getBoolean); } else if ("coolnessPeriod".equals(fieldName)) { @@ -1634,10 +1765,16 @@ public static VolumeProperties fromJson(JsonReader jsonReader) throws IOExceptio deserializedVolumeProperties.provisionedAvailabilityZone = reader.getString(); } else if ("isLargeVolume".equals(fieldName)) { deserializedVolumeProperties.isLargeVolume = reader.getNullable(JsonReader::getBoolean); + } else if ("largeVolumeType".equals(fieldName)) { + deserializedVolumeProperties.largeVolumeType = LargeVolumeType.fromString(reader.getString()); } else if ("originatingResourceId".equals(fieldName)) { deserializedVolumeProperties.originatingResourceId = reader.getString(); } else if ("inheritedSizeInBytes".equals(fieldName)) { deserializedVolumeProperties.inheritedSizeInBytes = reader.getNullable(JsonReader::getLong); + } else if ("language".equals(fieldName)) { + deserializedVolumeProperties.language = VolumeLanguage.fromString(reader.getString()); + } else if ("breakthroughMode".equals(fieldName)) { + deserializedVolumeProperties.breakthroughMode = BreakthroughMode.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigImpl.java new file mode 100644 index 000000000000..9608e5b64d4d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigImpl.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfig; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigProperties; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdate; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdateProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import java.util.Collections; +import java.util.Map; + +public final class ActiveDirectoryConfigImpl + implements ActiveDirectoryConfig, ActiveDirectoryConfig.Definition, ActiveDirectoryConfig.Update { + private ActiveDirectoryConfigInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map<String, String> tags() { + Map<String, String> inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ActiveDirectoryConfigProperties properties() { + return this.innerModel().properties(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ActiveDirectoryConfigInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String activeDirectoryConfigName; + + private ActiveDirectoryConfigUpdate updateBody; + + public ActiveDirectoryConfigImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ActiveDirectoryConfig create() { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .createOrUpdate(resourceGroupName, activeDirectoryConfigName, this.innerModel(), Context.NONE); + return this; + } + + public ActiveDirectoryConfig create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .createOrUpdate(resourceGroupName, activeDirectoryConfigName, this.innerModel(), context); + return this; + } + + ActiveDirectoryConfigImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ActiveDirectoryConfigInner(); + this.serviceManager = serviceManager; + this.activeDirectoryConfigName = name; + } + + public ActiveDirectoryConfigImpl update() { + this.updateBody = new ActiveDirectoryConfigUpdate(); + return this; + } + + public ActiveDirectoryConfig apply() { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .update(resourceGroupName, activeDirectoryConfigName, updateBody, Context.NONE); + return this; + } + + public ActiveDirectoryConfig apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .update(resourceGroupName, activeDirectoryConfigName, updateBody, context); + return this; + } + + ActiveDirectoryConfigImpl(ActiveDirectoryConfigInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.activeDirectoryConfigName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "activeDirectoryConfigs"); + } + + public ActiveDirectoryConfig refresh() { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .getByResourceGroupWithResponse(resourceGroupName, activeDirectoryConfigName, Context.NONE) + .getValue(); + return this; + } + + public ActiveDirectoryConfig refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .getByResourceGroupWithResponse(resourceGroupName, activeDirectoryConfigName, context) + .getValue(); + return this; + } + + public ActiveDirectoryConfigImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ActiveDirectoryConfigImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ActiveDirectoryConfigImpl withTags(Map<String, String> tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ActiveDirectoryConfigImpl withProperties(ActiveDirectoryConfigProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ActiveDirectoryConfigImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateBody.withIdentity(identity); + return this; + } + } + + public ActiveDirectoryConfigImpl withProperties(ActiveDirectoryConfigUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsClientImpl.java new file mode 100644 index 000000000000..0b1642b1e178 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsClientImpl.java @@ -0,0 +1,1468 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient; +import com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner; +import com.azure.resourcemanager.netapp.implementation.models.ActiveDirectoryConfigListResult; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdate; +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 ActiveDirectoryConfigsClient. + */ +public final class ActiveDirectoryConfigsClientImpl implements ActiveDirectoryConfigsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ActiveDirectoryConfigsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ActiveDirectoryConfigsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ActiveDirectoryConfigsClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(ActiveDirectoryConfigsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientActiveDirectoryConfigs to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientActiveDirectoryConfigs") + public interface ActiveDirectoryConfigsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ActiveDirectoryConfigInner>> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ActiveDirectoryConfigInner> getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActiveDirectoryConfigInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActiveDirectoryConfigInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActiveDirectoryConfigUpdate body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActiveDirectoryConfigUpdate body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ActiveDirectoryConfigListResult>> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ActiveDirectoryConfigListResult> listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/activeDirectoryConfigs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ActiveDirectoryConfigListResult>> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/activeDirectoryConfigs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ActiveDirectoryConfigListResult> listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ActiveDirectoryConfigListResult>> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ActiveDirectoryConfigListResult> listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ActiveDirectoryConfigListResult>> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ActiveDirectoryConfigListResult> listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<ActiveDirectoryConfigInner>> getByResourceGroupWithResponseAsync(String resourceGroupName, + String activeDirectoryConfigName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + return Mono.error( + new IllegalArgumentException("Parameter activeDirectoryConfigName 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, activeDirectoryConfigName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ActiveDirectoryConfigInner> getByResourceGroupAsync(String resourceGroupName, + String activeDirectoryConfigName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, activeDirectoryConfigName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<ActiveDirectoryConfigInner> getByResourceGroupWithResponse(String resourceGroupName, + String activeDirectoryConfigName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, accept, context); + } + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActiveDirectoryConfigInner getByResourceGroup(String resourceGroupName, String activeDirectoryConfigName) { + return getByResourceGroupWithResponse(resourceGroupName, activeDirectoryConfigName, Context.NONE).getValue(); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String activeDirectoryConfigName, ActiveDirectoryConfigInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + return Mono.error( + new IllegalArgumentException("Parameter activeDirectoryConfigName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, body, + Context.NONE); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, body, + context); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ActiveDirectoryConfigInner>, ActiveDirectoryConfigInner> beginCreateOrUpdateAsync( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigInner body) { + Mono<Response<Flux<ByteBuffer>>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, activeDirectoryConfigName, body); + return this.client.<ActiveDirectoryConfigInner, ActiveDirectoryConfigInner>getLroResult(mono, + this.client.getHttpPipeline(), ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, + this.client.getContext()); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ActiveDirectoryConfigInner>, ActiveDirectoryConfigInner> beginCreateOrUpdate( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigInner body) { + Response<BinaryData> response = createOrUpdateWithResponse(resourceGroupName, activeDirectoryConfigName, body); + return this.client.<ActiveDirectoryConfigInner, ActiveDirectoryConfigInner>getLroResult(response, + ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, Context.NONE); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ActiveDirectoryConfigInner>, ActiveDirectoryConfigInner> beginCreateOrUpdate( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigInner body, Context context) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, activeDirectoryConfigName, body, context); + return this.client.<ActiveDirectoryConfigInner, ActiveDirectoryConfigInner>getLroResult(response, + ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, context); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ActiveDirectoryConfigInner> createOrUpdateAsync(String resourceGroupName, + String activeDirectoryConfigName, ActiveDirectoryConfigInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, activeDirectoryConfigName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActiveDirectoryConfigInner createOrUpdate(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body) { + return beginCreateOrUpdate(resourceGroupName, activeDirectoryConfigName, body).getFinalResult(); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActiveDirectoryConfigInner createOrUpdate(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, activeDirectoryConfigName, body, context).getFinalResult(); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, + String activeDirectoryConfigName, ActiveDirectoryConfigUpdate body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + return Mono.error( + new IllegalArgumentException("Parameter activeDirectoryConfigName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, body, + Context.NONE); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, body, + context); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ActiveDirectoryConfigInner>, ActiveDirectoryConfigInner> + beginUpdateAsync(String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigUpdate body) { + Mono<Response<Flux<ByteBuffer>>> mono + = updateWithResponseAsync(resourceGroupName, activeDirectoryConfigName, body); + return this.client.<ActiveDirectoryConfigInner, ActiveDirectoryConfigInner>getLroResult(mono, + this.client.getHttpPipeline(), ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, + this.client.getContext()); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ActiveDirectoryConfigInner>, ActiveDirectoryConfigInner> + beginUpdate(String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigUpdate body) { + Response<BinaryData> response = updateWithResponse(resourceGroupName, activeDirectoryConfigName, body); + return this.client.<ActiveDirectoryConfigInner, ActiveDirectoryConfigInner>getLroResult(response, + ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, Context.NONE); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ActiveDirectoryConfigInner>, ActiveDirectoryConfigInner> beginUpdate( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigUpdate body, Context context) { + Response<BinaryData> response = updateWithResponse(resourceGroupName, activeDirectoryConfigName, body, context); + return this.client.<ActiveDirectoryConfigInner, ActiveDirectoryConfigInner>getLroResult(response, + ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, context); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ActiveDirectoryConfigInner> updateAsync(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body) { + return beginUpdateAsync(resourceGroupName, activeDirectoryConfigName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActiveDirectoryConfigInner update(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body) { + return beginUpdate(resourceGroupName, activeDirectoryConfigName, body).getFinalResult(); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body 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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActiveDirectoryConfigInner update(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body, Context context) { + return beginUpdate(resourceGroupName, activeDirectoryConfigName, body, context).getFinalResult(); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, + String activeDirectoryConfigName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + return Mono.error( + new IllegalArgumentException("Parameter activeDirectoryConfigName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String activeDirectoryConfigName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, Context.NONE); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String activeDirectoryConfigName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, context); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, + String activeDirectoryConfigName) { + Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, activeDirectoryConfigName); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String activeDirectoryConfigName) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, activeDirectoryConfigName); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String activeDirectoryConfigName, + Context context) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, activeDirectoryConfigName, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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<Void> deleteAsync(String resourceGroupName, String activeDirectoryConfigName) { + return beginDeleteAsync(resourceGroupName, activeDirectoryConfigName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 activeDirectoryConfigName) { + beginDelete(resourceGroupName, activeDirectoryConfigName).getFinalResult(); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 activeDirectoryConfigName, Context context) { + beginDelete(resourceGroupName, activeDirectoryConfigName, context).getFinalResult(); + } + + /** + * List all active directory configurations within the 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 ActiveDirectoryConfig list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ActiveDirectoryConfigInner>> + 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)) + .<PagedResponse<ActiveDirectoryConfigInner>>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 active directory configurations within the 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 ActiveDirectoryConfig list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<ActiveDirectoryConfigInner> listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List all active directory configurations within the 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 ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ActiveDirectoryConfigInner> listByResourceGroupSinglePage(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ActiveDirectoryConfigListResult> res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all active directory configurations within the 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 ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ActiveDirectoryConfigInner> listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ActiveDirectoryConfigListResult> res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all active directory configurations within the 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 ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ActiveDirectoryConfigInner> listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * List all active directory configurations within the 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 ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ActiveDirectoryConfigInner> listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * List all active directory configurations within the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ActiveDirectoryConfigInner>> 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)) + .<PagedResponse<ActiveDirectoryConfigInner>>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 active directory configurations within the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<ActiveDirectoryConfigInner> listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List all active directory configurations within the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ActiveDirectoryConfigInner> listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ActiveDirectoryConfigListResult> res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all active directory configurations within the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ActiveDirectoryConfigInner> listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ActiveDirectoryConfigListResult> res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all active directory configurations within the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ActiveDirectoryConfigInner> list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * List all active directory configurations within the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ActiveDirectoryConfigInner> list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ActiveDirectoryConfigInner>> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<ActiveDirectoryConfigInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ActiveDirectoryConfigInner> listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ActiveDirectoryConfigListResult> res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ActiveDirectoryConfigInner> listByResourceGroupNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ActiveDirectoryConfigListResult> res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ActiveDirectoryConfigInner>> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<ActiveDirectoryConfigInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ActiveDirectoryConfigInner> listBySubscriptionNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ActiveDirectoryConfigListResult> res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ActiveDirectoryConfigInner> listBySubscriptionNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ActiveDirectoryConfigListResult> res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryConfigsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsImpl.java new file mode 100644 index 000000000000..65b2bf78f479 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsImpl.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient; +import com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfig; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigs; + +public final class ActiveDirectoryConfigsImpl implements ActiveDirectoryConfigs { + private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryConfigsImpl.class); + + private final ActiveDirectoryConfigsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ActiveDirectoryConfigsImpl(ActiveDirectoryConfigsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response<ActiveDirectoryConfig> getByResourceGroupWithResponse(String resourceGroupName, + String activeDirectoryConfigName, Context context) { + Response<ActiveDirectoryConfigInner> inner = this.serviceClient() + .getByResourceGroupWithResponse(resourceGroupName, activeDirectoryConfigName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ActiveDirectoryConfigImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ActiveDirectoryConfig getByResourceGroup(String resourceGroupName, String activeDirectoryConfigName) { + ActiveDirectoryConfigInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, activeDirectoryConfigName); + if (inner != null) { + return new ActiveDirectoryConfigImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String activeDirectoryConfigName) { + this.serviceClient().delete(resourceGroupName, activeDirectoryConfigName); + } + + public void delete(String resourceGroupName, String activeDirectoryConfigName, Context context) { + this.serviceClient().delete(resourceGroupName, activeDirectoryConfigName, context); + } + + public PagedIterable<ActiveDirectoryConfig> listByResourceGroup(String resourceGroupName) { + PagedIterable<ActiveDirectoryConfigInner> inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ActiveDirectoryConfigImpl(inner1, this.manager())); + } + + public PagedIterable<ActiveDirectoryConfig> listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable<ActiveDirectoryConfigInner> inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ActiveDirectoryConfigImpl(inner1, this.manager())); + } + + public PagedIterable<ActiveDirectoryConfig> list() { + PagedIterable<ActiveDirectoryConfigInner> inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ActiveDirectoryConfigImpl(inner1, this.manager())); + } + + public PagedIterable<ActiveDirectoryConfig> list(Context context) { + PagedIterable<ActiveDirectoryConfigInner> inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ActiveDirectoryConfigImpl(inner1, this.manager())); + } + + public ActiveDirectoryConfig getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String activeDirectoryConfigName = ResourceManagerUtils.getValueFromIdByName(id, "activeDirectoryConfigs"); + if (activeDirectoryConfigName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'activeDirectoryConfigs'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, activeDirectoryConfigName, Context.NONE) + .getValue(); + } + + public Response<ActiveDirectoryConfig> getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String activeDirectoryConfigName = ResourceManagerUtils.getValueFromIdByName(id, "activeDirectoryConfigs"); + if (activeDirectoryConfigName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'activeDirectoryConfigs'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, activeDirectoryConfigName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String activeDirectoryConfigName = ResourceManagerUtils.getValueFromIdByName(id, "activeDirectoryConfigs"); + if (activeDirectoryConfigName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'activeDirectoryConfigs'.", id))); + } + this.delete(resourceGroupName, activeDirectoryConfigName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String activeDirectoryConfigName = ResourceManagerUtils.getValueFromIdByName(id, "activeDirectoryConfigs"); + if (activeDirectoryConfigName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'activeDirectoryConfigs'.", id))); + } + this.delete(resourceGroupName, activeDirectoryConfigName, context); + } + + private ActiveDirectoryConfigsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ActiveDirectoryConfigImpl define(String name) { + return new ActiveDirectoryConfigImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketGenerateCredentialsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketGenerateCredentialsImpl.java new file mode 100644 index 000000000000..25e06d43df16 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketGenerateCredentialsImpl.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner; +import com.azure.resourcemanager.netapp.models.BucketGenerateCredentials; +import java.time.OffsetDateTime; + +public final class BucketGenerateCredentialsImpl implements BucketGenerateCredentials { + private BucketGenerateCredentialsInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + BucketGenerateCredentialsImpl(BucketGenerateCredentialsInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String accessKey() { + return this.innerModel().accessKey(); + } + + public String secretKey() { + return this.innerModel().secretKey(); + } + + public OffsetDateTime keyPairExpiry() { + return this.innerModel().keyPairExpiry(); + } + + public BucketGenerateCredentialsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketImpl.java new file mode 100644 index 000000000000..3abddea8d745 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketImpl.java @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.BucketInner; +import com.azure.resourcemanager.netapp.models.Bucket; +import com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry; +import com.azure.resourcemanager.netapp.models.BucketGenerateCredentials; +import com.azure.resourcemanager.netapp.models.BucketPatch; +import com.azure.resourcemanager.netapp.models.BucketPatchPermissions; +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerPatchProperties; +import com.azure.resourcemanager.netapp.models.BucketServerProperties; +import com.azure.resourcemanager.netapp.models.CredentialsStatus; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.ProvisioningState; + +public final class BucketImpl implements Bucket, Bucket.Definition, Bucket.Update { + private BucketInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager 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 path() { + return this.innerModel().path(); + } + + public FileSystemUser fileSystemUser() { + return this.innerModel().fileSystemUser(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public CredentialsStatus status() { + return this.innerModel().status(); + } + + public BucketServerProperties server() { + return this.innerModel().server(); + } + + public BucketPermissions permissions() { + return this.innerModel().permissions(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public BucketInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String poolName; + + private String volumeName; + + private String bucketName; + + private BucketPatch updateBody; + + public BucketImpl withExistingVolume(String resourceGroupName, String accountName, String poolName, + String volumeName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + this.poolName = poolName; + this.volumeName = volumeName; + return this; + } + + public Bucket create() { + this.innerObject = serviceManager.serviceClient() + .getBuckets() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, bucketName, this.innerModel(), + Context.NONE); + return this; + } + + public Bucket create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getBuckets() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, bucketName, this.innerModel(), + context); + return this; + } + + BucketImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new BucketInner(); + this.serviceManager = serviceManager; + this.bucketName = name; + } + + public BucketImpl update() { + this.updateBody = new BucketPatch(); + return this; + } + + public Bucket apply() { + this.innerObject = serviceManager.serviceClient() + .getBuckets() + .update(resourceGroupName, accountName, poolName, volumeName, bucketName, updateBody, Context.NONE); + return this; + } + + public Bucket apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getBuckets() + .update(resourceGroupName, accountName, poolName, volumeName, bucketName, updateBody, context); + return this; + } + + BucketImpl(BucketInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "capacityPools"); + this.volumeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "volumes"); + this.bucketName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "buckets"); + } + + public Bucket refresh() { + this.innerObject = serviceManager.serviceClient() + .getBuckets() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, Context.NONE) + .getValue(); + return this; + } + + public Bucket refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getBuckets() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, context) + .getValue(); + return this; + } + + public Response<BucketGenerateCredentials> generateCredentialsWithResponse(BucketCredentialsExpiry body, + Context context) { + return serviceManager.buckets() + .generateCredentialsWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, body, + context); + } + + public BucketGenerateCredentials generateCredentials(BucketCredentialsExpiry body) { + return serviceManager.buckets() + .generateCredentials(resourceGroupName, accountName, poolName, volumeName, bucketName, body); + } + + public BucketImpl withPath(String path) { + if (isInCreateMode()) { + this.innerModel().withPath(path); + return this; + } else { + this.updateBody.withPath(path); + return this; + } + } + + public BucketImpl withFileSystemUser(FileSystemUser fileSystemUser) { + if (isInCreateMode()) { + this.innerModel().withFileSystemUser(fileSystemUser); + return this; + } else { + this.updateBody.withFileSystemUser(fileSystemUser); + return this; + } + } + + public BucketImpl withServer(BucketServerProperties server) { + this.innerModel().withServer(server); + return this; + } + + public BucketImpl withPermissions(BucketPermissions permissions) { + this.innerModel().withPermissions(permissions); + return this; + } + + public BucketImpl withServer(BucketServerPatchProperties server) { + this.updateBody.withServer(server); + return this; + } + + public BucketImpl withPermissions(BucketPatchPermissions permissions) { + this.updateBody.withPermissions(permissions); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsClientImpl.java new file mode 100644 index 000000000000..3c5beaf35d8e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsClientImpl.java @@ -0,0 +1,1725 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.BucketsClient; +import com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner; +import com.azure.resourcemanager.netapp.fluent.models.BucketInner; +import com.azure.resourcemanager.netapp.implementation.models.BucketList; +import com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry; +import com.azure.resourcemanager.netapp.models.BucketPatch; +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 BucketsClient. + */ +public final class BucketsClientImpl implements BucketsClient { + /** + * The proxy service used to perform REST calls. + */ + private final BucketsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of BucketsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BucketsClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(BucketsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientBuckets to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientBuckets") + public interface BucketsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<BucketInner>> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("bucketName") String bucketName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BucketInner> getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("bucketName") String bucketName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("bucketName") String bucketName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BucketInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("bucketName") String bucketName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BucketInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("bucketName") String bucketName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BucketPatch body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("bucketName") String bucketName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BucketPatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("bucketName") String bucketName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("bucketName") String bucketName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<BucketList>> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BucketList> listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}/generateCredentials") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<BucketGenerateCredentialsInner>> generateCredentials(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("bucketName") String bucketName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BucketCredentialsExpiry body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}/generateCredentials") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BucketGenerateCredentialsInner> generateCredentialsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("bucketName") String bucketName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BucketCredentialsExpiry body, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<BucketList>> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BucketList> listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume's bucket along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<BucketInner>> getWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (bucketName == null) { + return Mono.error(new IllegalArgumentException("Parameter bucketName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, bucketName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume's bucket on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<BucketInner> getAsync(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName) { + return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, bucketName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume's bucket along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<BucketInner> getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (bucketName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter bucketName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, bucketName, accept, context); + } + + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume's bucket. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BucketInner get(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName) { + return getWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, Context.NONE) + .getValue(); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, String bucketName, BucketInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (bucketName == null) { + return Mono.error(new IllegalArgumentException("Parameter bucketName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, bucketName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (bucketName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter bucketName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, bucketName, + contentType, accept, body, Context.NONE); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (bucketName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter bucketName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, bucketName, + contentType, accept, body, context); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<BucketInner>, BucketInner> beginCreateOrUpdateAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, String bucketName, BucketInner body) { + Mono<Response<Flux<ByteBuffer>>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, bucketName, body); + return this.client.<BucketInner, BucketInner>getLroResult(mono, this.client.getHttpPipeline(), + BucketInner.class, BucketInner.class, this.client.getContext()); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<BucketInner>, BucketInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, String bucketName, BucketInner body) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, body); + return this.client.<BucketInner, BucketInner>getLroResult(response, BucketInner.class, BucketInner.class, + Context.NONE); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<BucketInner>, BucketInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, String bucketName, BucketInner body, Context context) { + Response<BinaryData> response = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, volumeName, + bucketName, body, context); + return this.client.<BucketInner, BucketInner>getLroResult(response, BucketInner.class, BucketInner.class, + context); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<BucketInner> createOrUpdateAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, BucketInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, volumeName, bucketName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BucketInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, BucketInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, volumeName, bucketName, body) + .getFinalResult(); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BucketInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, BucketInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, volumeName, bucketName, body, context) + .getFinalResult(); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketPatch body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (bucketName == null) { + return Mono.error(new IllegalArgumentException("Parameter bucketName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, bucketName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, BucketPatch body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (bucketName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter bucketName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, bucketName, + contentType, accept, body, Context.NONE); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, BucketPatch body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (bucketName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter bucketName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, bucketName, + contentType, accept, body, context); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<BucketInner>, BucketInner> beginUpdateAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, String bucketName, BucketPatch body) { + Mono<Response<Flux<ByteBuffer>>> mono + = updateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, bucketName, body); + return this.client.<BucketInner, BucketInner>getLroResult(mono, this.client.getHttpPipeline(), + BucketInner.class, BucketInner.class, this.client.getContext()); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<BucketInner>, BucketInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketPatch body) { + Response<BinaryData> response + = updateWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, body); + return this.client.<BucketInner, BucketInner>getLroResult(response, BucketInner.class, BucketInner.class, + Context.NONE); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<BucketInner>, BucketInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketPatch body, Context context) { + Response<BinaryData> response + = updateWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, body, context); + return this.client.<BucketInner, BucketInner>getLroResult(response, BucketInner.class, BucketInner.class, + context); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<BucketInner> updateAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, BucketPatch body) { + return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, bucketName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BucketInner update(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, BucketPatch body) { + return beginUpdate(resourceGroupName, accountName, poolName, volumeName, bucketName, body).getFinalResult(); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BucketInner update(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, BucketPatch body, Context context) { + return beginUpdate(resourceGroupName, accountName, poolName, volumeName, bucketName, body, context) + .getFinalResult(); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (bucketName == null) { + return Mono.error(new IllegalArgumentException("Parameter bucketName is required and cannot be null.")); + } + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, bucketName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (bucketName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter bucketName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, bucketName, + Context.NONE); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (bucketName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter bucketName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, bucketName, context); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName) { + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, bucketName); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName) { + Response<BinaryData> response + = deleteWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, Context context) { + Response<BinaryData> response + = deleteWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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<Void> deleteAsync(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName) { + return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, bucketName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName) { + beginDelete(resourceGroupName, accountName, poolName, volumeName, bucketName).getFinalResult(); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, Context context) { + beginDelete(resourceGroupName, accountName, poolName, volumeName, bucketName, context).getFinalResult(); + } + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volume bucket resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<BucketInner>> listSinglePageAsync(String resourceGroupName, String accountName, + String poolName, String volumeName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, accept, context)) + .<PagedResponse<BucketInner>>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())); + } + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volume bucket resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<BucketInner> listAsync(String resourceGroupName, String accountName, String poolName, + String volumeName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, poolName, volumeName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volume bucket resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<BucketInner> listSinglePage(String resourceGroupName, String accountName, String poolName, + String volumeName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<BucketList> res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volume bucket resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<BucketInner> listSinglePage(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<BucketList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volume bucket resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<BucketInner> list(String resourceGroupName, String accountName, String poolName, + String volumeName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, poolName, volumeName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volume bucket resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<BucketInner> list(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, poolName, volumeName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<BucketGenerateCredentialsInner>> generateCredentialsWithResponseAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, String bucketName, + BucketCredentialsExpiry body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (bucketName == null) { + return Mono.error(new IllegalArgumentException("Parameter bucketName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.generateCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, bucketName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<BucketGenerateCredentialsInner> generateCredentialsAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketCredentialsExpiry body) { + return generateCredentialsWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, bucketName, + body).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<BucketGenerateCredentialsInner> generateCredentialsWithResponse(String resourceGroupName, + String accountName, String poolName, String volumeName, String bucketName, BucketCredentialsExpiry body, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (bucketName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter bucketName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.generateCredentialsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, bucketName, + contentType, accept, body, context); + } + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BucketGenerateCredentialsInner generateCredentials(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketCredentialsExpiry body) { + return generateCredentialsWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, body, + Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of volume bucket resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<BucketInner>> 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)) + .<PagedResponse<BucketInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of volume bucket resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<BucketInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<BucketList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of volume bucket resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<BucketInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<BucketList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(BucketsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsImpl.java new file mode 100644 index 000000000000..3dee45a2b9ac --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsImpl.java @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.BucketsClient; +import com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner; +import com.azure.resourcemanager.netapp.fluent.models.BucketInner; +import com.azure.resourcemanager.netapp.models.Bucket; +import com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry; +import com.azure.resourcemanager.netapp.models.BucketGenerateCredentials; +import com.azure.resourcemanager.netapp.models.Buckets; + +public final class BucketsImpl implements Buckets { + private static final ClientLogger LOGGER = new ClientLogger(BucketsImpl.class); + + private final BucketsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public BucketsImpl(BucketsClient innerClient, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response<Bucket> getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, Context context) { + Response<BucketInner> inner = this.serviceClient() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BucketImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Bucket get(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName) { + BucketInner inner = this.serviceClient().get(resourceGroupName, accountName, poolName, volumeName, bucketName); + if (inner != null) { + return new BucketImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, bucketName); + } + + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, bucketName, context); + } + + public PagedIterable<Bucket> list(String resourceGroupName, String accountName, String poolName, + String volumeName) { + PagedIterable<BucketInner> inner + = this.serviceClient().list(resourceGroupName, accountName, poolName, volumeName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BucketImpl(inner1, this.manager())); + } + + public PagedIterable<Bucket> list(String resourceGroupName, String accountName, String poolName, String volumeName, + Context context) { + PagedIterable<BucketInner> inner + = this.serviceClient().list(resourceGroupName, accountName, poolName, volumeName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BucketImpl(inner1, this.manager())); + } + + public Response<BucketGenerateCredentials> generateCredentialsWithResponse(String resourceGroupName, + String accountName, String poolName, String volumeName, String bucketName, BucketCredentialsExpiry body, + Context context) { + Response<BucketGenerateCredentialsInner> inner = this.serviceClient() + .generateCredentialsWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, body, + context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BucketGenerateCredentialsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BucketGenerateCredentials generateCredentials(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, BucketCredentialsExpiry body) { + BucketGenerateCredentialsInner inner = this.serviceClient() + .generateCredentials(resourceGroupName, accountName, poolName, volumeName, bucketName, body); + if (inner != null) { + return new BucketGenerateCredentialsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Bucket getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); + } + String bucketName = ResourceManagerUtils.getValueFromIdByName(id, "buckets"); + if (bucketName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'buckets'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, Context.NONE) + .getValue(); + } + + public Response<Bucket> getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); + } + String bucketName = ResourceManagerUtils.getValueFromIdByName(id, "buckets"); + if (bucketName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'buckets'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); + } + String bucketName = ResourceManagerUtils.getValueFromIdByName(id, "buckets"); + if (bucketName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'buckets'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, volumeName, bucketName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); + } + String bucketName = ResourceManagerUtils.getValueFromIdByName(id, "buckets"); + if (bucketName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'buckets'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, volumeName, bucketName, context); + } + + private BucketsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public BucketImpl define(String name) { + return new BucketImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java new file mode 100644 index 000000000000..6166ad27377d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.CacheInner; +import com.azure.resourcemanager.netapp.models.Cache; +import com.azure.resourcemanager.netapp.models.CacheProperties; +import com.azure.resourcemanager.netapp.models.CacheUpdate; +import com.azure.resourcemanager.netapp.models.CacheUpdateProperties; +import com.azure.resourcemanager.netapp.models.PeeringPassphrases; +import com.azure.resourcemanager.netapp.models.PoolChangeRequest; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class CacheImpl implements Cache, Cache.Definition, Cache.Update { + private CacheInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map<String, String> tags() { + Map<String, String> inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public CacheProperties properties() { + return this.innerModel().properties(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public List<String> zones() { + List<String> inner = this.innerModel().zones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public CacheInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String poolName; + + private String cacheName; + + private CacheUpdate updateBody; + + public CacheImpl withExistingCapacityPool(String resourceGroupName, String accountName, String poolName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + this.poolName = poolName; + return this; + } + + public Cache create() { + this.innerObject = serviceManager.serviceClient() + .getCaches() + .createOrUpdate(resourceGroupName, accountName, poolName, cacheName, this.innerModel(), Context.NONE); + return this; + } + + public Cache create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCaches() + .createOrUpdate(resourceGroupName, accountName, poolName, cacheName, this.innerModel(), context); + return this; + } + + CacheImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new CacheInner(); + this.serviceManager = serviceManager; + this.cacheName = name; + } + + public CacheImpl update() { + this.updateBody = new CacheUpdate(); + return this; + } + + public Cache apply() { + this.innerObject = serviceManager.serviceClient() + .getCaches() + .update(resourceGroupName, accountName, poolName, cacheName, updateBody, Context.NONE); + return this; + } + + public Cache apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCaches() + .update(resourceGroupName, accountName, poolName, cacheName, updateBody, context); + return this; + } + + CacheImpl(CacheInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "capacityPools"); + this.cacheName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "caches"); + } + + public Cache refresh() { + this.innerObject = serviceManager.serviceClient() + .getCaches() + .getWithResponse(resourceGroupName, accountName, poolName, cacheName, Context.NONE) + .getValue(); + return this; + } + + public Cache refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCaches() + .getWithResponse(resourceGroupName, accountName, poolName, cacheName, context) + .getValue(); + return this; + } + + public Response<PeeringPassphrases> listPeeringPassphrasesWithResponse(Context context) { + return serviceManager.caches() + .listPeeringPassphrasesWithResponse(resourceGroupName, accountName, poolName, cacheName, context); + } + + public PeeringPassphrases listPeeringPassphrases() { + return serviceManager.caches().listPeeringPassphrases(resourceGroupName, accountName, poolName, cacheName); + } + + public Cache poolChange(PoolChangeRequest body) { + return serviceManager.caches().poolChange(resourceGroupName, accountName, poolName, cacheName, body); + } + + public Cache poolChange(PoolChangeRequest body, Context context) { + return serviceManager.caches().poolChange(resourceGroupName, accountName, poolName, cacheName, body, context); + } + + public CacheImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public CacheImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public CacheImpl withProperties(CacheProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public CacheImpl withTags(Map<String, String> tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public CacheImpl withZones(List<String> zones) { + this.innerModel().withZones(zones); + return this; + } + + public CacheImpl withProperties(CacheUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java new file mode 100644 index 000000000000..2a78888e1a17 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java @@ -0,0 +1,1857 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.CachesClient; +import com.azure.resourcemanager.netapp.fluent.models.CacheInner; +import com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner; +import com.azure.resourcemanager.netapp.implementation.models.CacheList; +import com.azure.resourcemanager.netapp.models.CacheUpdate; +import com.azure.resourcemanager.netapp.models.PoolChangeRequest; +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 CachesClient. + */ +public final class CachesClientImpl implements CachesClient { + /** + * The proxy service used to perform REST calls. + */ + private final CachesService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of CachesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CachesClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(CachesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientCaches to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientCaches") + public interface CachesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<CacheInner>> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("cacheName") String cacheName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<CacheInner> getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("cacheName") String cacheName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("cacheName") String cacheName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CacheInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("cacheName") String cacheName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CacheInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("cacheName") String cacheName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CacheUpdate body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("cacheName") String cacheName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CacheUpdate body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("cacheName") String cacheName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("cacheName") String cacheName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<CacheList>> listByCapacityPools(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<CacheList> listByCapacityPoolsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}/listPeeringPassphrases") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<PeeringPassphrasesInner>> listPeeringPassphrases(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("cacheName") String cacheName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}/listPeeringPassphrases") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<PeeringPassphrasesInner> listPeeringPassphrasesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("cacheName") String cacheName, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}/poolChange") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> poolChange(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("cacheName") String cacheName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PoolChangeRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}/poolChange") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> poolChangeSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("cacheName") String cacheName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PoolChangeRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<CacheList>> listByCapacityPoolsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<CacheList> listByCapacityPoolsNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the details of the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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 details of the specified Cache along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<CacheInner>> getWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String cacheName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (cacheName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the details of the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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 details of the specified Cache on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<CacheInner> getAsync(String resourceGroupName, String accountName, String poolName, String cacheName) { + return getWithResponseAsync(resourceGroupName, accountName, poolName, cacheName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the details of the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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 details of the specified Cache along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<CacheInner> getWithResponse(String resourceGroupName, String accountName, String poolName, + String cacheName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, cacheName, accept, context); + } + + /** + * Get the details of the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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 details of the specified Cache. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheInner get(String resourceGroupName, String accountName, String poolName, String cacheName) { + return getWithResponse(resourceGroupName, accountName, poolName, cacheName, Context.NONE).getValue(); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String cacheName, CacheInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (cacheName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, contentType, accept, + body, Context.NONE); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, contentType, accept, + body, context); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<CacheInner>, CacheInner> beginCreateOrUpdateAsync(String resourceGroupName, + String accountName, String poolName, String cacheName, CacheInner body) { + Mono<Response<Flux<ByteBuffer>>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, poolName, cacheName, body); + return this.client.<CacheInner, CacheInner>getLroResult(mono, this.client.getHttpPipeline(), CacheInner.class, + CacheInner.class, this.client.getContext()); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<CacheInner>, CacheInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String cacheName, CacheInner body) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, cacheName, body); + return this.client.<CacheInner, CacheInner>getLroResult(response, CacheInner.class, CacheInner.class, + Context.NONE); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<CacheInner>, CacheInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String cacheName, CacheInner body, Context context) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, cacheName, body, context); + return this.client.<CacheInner, CacheInner>getLroResult(response, CacheInner.class, CacheInner.class, context); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<CacheInner> createOrUpdateAsync(String resourceGroupName, String accountName, String poolName, + String cacheName, CacheInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, cacheName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, cacheName, body).getFinalResult(); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, cacheName, body, context).getFinalResult(); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheUpdate body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (cacheName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, String poolName, + String cacheName, CacheUpdate body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, contentType, accept, + body, Context.NONE); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, String poolName, + String cacheName, CacheUpdate body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, contentType, accept, + body, context); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<CacheInner>, CacheInner> beginUpdateAsync(String resourceGroupName, + String accountName, String poolName, String cacheName, CacheUpdate body) { + Mono<Response<Flux<ByteBuffer>>> mono + = updateWithResponseAsync(resourceGroupName, accountName, poolName, cacheName, body); + return this.client.<CacheInner, CacheInner>getLroResult(mono, this.client.getHttpPipeline(), CacheInner.class, + CacheInner.class, this.client.getContext()); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheUpdate body) { + Response<BinaryData> response = updateWithResponse(resourceGroupName, accountName, poolName, cacheName, body); + return this.client.<CacheInner, CacheInner>getLroResult(response, CacheInner.class, CacheInner.class, + Context.NONE); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheUpdate body, Context context) { + Response<BinaryData> response + = updateWithResponse(resourceGroupName, accountName, poolName, cacheName, body, context); + return this.client.<CacheInner, CacheInner>getLroResult(response, CacheInner.class, CacheInner.class, context); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<CacheInner> updateAsync(String resourceGroupName, String accountName, String poolName, + String cacheName, CacheUpdate body) { + return beginUpdateAsync(resourceGroupName, accountName, poolName, cacheName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheUpdate body) { + return beginUpdate(resourceGroupName, accountName, poolName, cacheName, body).getFinalResult(); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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 cache resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheUpdate body, Context context) { + return beginUpdate(resourceGroupName, accountName, poolName, cacheName, body, context).getFinalResult(); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String cacheName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (cacheName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, String poolName, + String cacheName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, Context.NONE); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, String poolName, + String cacheName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, context); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String accountName, + String poolName, String cacheName) { + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, poolName, cacheName); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String cacheName) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, accountName, poolName, cacheName); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String cacheName, Context context) { + Response<BinaryData> response + = deleteWithResponse(resourceGroupName, accountName, poolName, cacheName, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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<Void> deleteAsync(String resourceGroupName, String accountName, String poolName, String cacheName) { + return beginDeleteAsync(resourceGroupName, accountName, poolName, cacheName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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 accountName, String poolName, String cacheName) { + beginDelete(resourceGroupName, accountName, poolName, cacheName).getFinalResult(); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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 accountName, String poolName, String cacheName, + Context context) { + beginDelete(resourceGroupName, accountName, poolName, cacheName, context).getFinalResult(); + } + + /** + * List all Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Cache resources along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<CacheInner>> listByCapacityPoolsSinglePageAsync(String resourceGroupName, + String accountName, String poolName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByCapacityPools(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, accept, context)) + .<PagedResponse<CacheInner>>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 Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Cache resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<CacheInner> listByCapacityPoolsAsync(String resourceGroupName, String accountName, + String poolName) { + return new PagedFlux<>(() -> listByCapacityPoolsSinglePageAsync(resourceGroupName, accountName, poolName), + nextLink -> listByCapacityPoolsNextSinglePageAsync(nextLink)); + } + + /** + * List all Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Cache resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<CacheInner> listByCapacityPoolsSinglePage(String resourceGroupName, String accountName, + String poolName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<CacheList> res + = service.listByCapacityPoolsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Cache resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<CacheInner> listByCapacityPoolsSinglePage(String resourceGroupName, String accountName, + String poolName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<CacheList> res + = service.listByCapacityPoolsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Cache resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<CacheInner> listByCapacityPools(String resourceGroupName, String accountName, + String poolName) { + return new PagedIterable<>(() -> listByCapacityPoolsSinglePage(resourceGroupName, accountName, poolName), + nextLink -> listByCapacityPoolsNextSinglePage(nextLink)); + } + + /** + * List all Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Cache resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<CacheInner> listByCapacityPools(String resourceGroupName, String accountName, String poolName, + Context context) { + return new PagedIterable<>( + () -> listByCapacityPoolsSinglePage(resourceGroupName, accountName, poolName, context), + nextLink -> listByCapacityPoolsNextSinglePage(nextLink, context)); + } + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response containing peering passphrases and commands for cluster and vserver peering along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<PeeringPassphrasesInner>> listPeeringPassphrasesWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String cacheName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (cacheName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listPeeringPassphrases(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, + cacheName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response containing peering passphrases and commands for cluster and vserver peering on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PeeringPassphrasesInner> listPeeringPassphrasesAsync(String resourceGroupName, String accountName, + String poolName, String cacheName) { + return listPeeringPassphrasesWithResponseAsync(resourceGroupName, accountName, poolName, cacheName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response containing peering passphrases and commands for cluster and vserver peering along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<PeeringPassphrasesInner> listPeeringPassphrasesWithResponse(String resourceGroupName, + String accountName, String poolName, String cacheName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.listPeeringPassphrasesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, accept, context); + } + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response containing peering passphrases and commands for cluster and vserver peering. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PeeringPassphrasesInner listPeeringPassphrases(String resourceGroupName, String accountName, String poolName, + String cacheName) { + return listPeeringPassphrasesWithResponse(resourceGroupName, accountName, poolName, cacheName, Context.NONE) + .getValue(); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> poolChangeWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String cacheName, PoolChangeRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (cacheName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.poolChange(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> poolChangeWithResponse(String resourceGroupName, String accountName, String poolName, + String cacheName, PoolChangeRequest body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.poolChangeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, contentType, accept, + body, Context.NONE); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> poolChangeWithResponse(String resourceGroupName, String accountName, String poolName, + String cacheName, PoolChangeRequest body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.poolChangeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, contentType, accept, + body, context); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<PollResult<CacheInner>, CacheInner> beginPoolChangeAsync(String resourceGroupName, + String accountName, String poolName, String cacheName, PoolChangeRequest body) { + Mono<Response<Flux<ByteBuffer>>> mono + = poolChangeWithResponseAsync(resourceGroupName, accountName, poolName, cacheName, body); + return this.client.<CacheInner, CacheInner>getLroResult(mono, this.client.getHttpPipeline(), CacheInner.class, + CacheInner.class, this.client.getContext()); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<CacheInner>, CacheInner> beginPoolChange(String resourceGroupName, String accountName, + String poolName, String cacheName, PoolChangeRequest body) { + Response<BinaryData> response + = poolChangeWithResponse(resourceGroupName, accountName, poolName, cacheName, body); + return this.client.<CacheInner, CacheInner>getLroResult(response, CacheInner.class, CacheInner.class, + Context.NONE); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<CacheInner>, CacheInner> beginPoolChange(String resourceGroupName, String accountName, + String poolName, String cacheName, PoolChangeRequest body, Context context) { + Response<BinaryData> response + = poolChangeWithResponse(resourceGroupName, accountName, poolName, cacheName, body, context); + return this.client.<CacheInner, CacheInner>getLroResult(response, CacheInner.class, CacheInner.class, context); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<CacheInner> poolChangeAsync(String resourceGroupName, String accountName, String poolName, + String cacheName, PoolChangeRequest body) { + return beginPoolChangeAsync(resourceGroupName, accountName, poolName, cacheName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 CacheInner poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + PoolChangeRequest body) { + return beginPoolChange(resourceGroupName, accountName, poolName, cacheName, body).getFinalResult(); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheInner poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + PoolChangeRequest body, Context context) { + return beginPoolChange(resourceGroupName, accountName, poolName, cacheName, body, context).getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Cache resources along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<CacheInner>> listByCapacityPoolsNextSinglePageAsync(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.listByCapacityPoolsNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<CacheInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Cache resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<CacheInner> listByCapacityPoolsNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<CacheList> res + = service.listByCapacityPoolsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Cache resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<CacheInner> listByCapacityPoolsNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<CacheList> res + = service.listByCapacityPoolsNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(CachesClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java new file mode 100644 index 000000000000..65993f8b2a55 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.CachesClient; +import com.azure.resourcemanager.netapp.fluent.models.CacheInner; +import com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner; +import com.azure.resourcemanager.netapp.models.Cache; +import com.azure.resourcemanager.netapp.models.Caches; +import com.azure.resourcemanager.netapp.models.PeeringPassphrases; +import com.azure.resourcemanager.netapp.models.PoolChangeRequest; + +public final class CachesImpl implements Caches { + private static final ClientLogger LOGGER = new ClientLogger(CachesImpl.class); + + private final CachesClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public CachesImpl(CachesClient innerClient, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response<Cache> getWithResponse(String resourceGroupName, String accountName, String poolName, + String cacheName, Context context) { + Response<CacheInner> inner + = this.serviceClient().getWithResponse(resourceGroupName, accountName, poolName, cacheName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CacheImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Cache get(String resourceGroupName, String accountName, String poolName, String cacheName) { + CacheInner inner = this.serviceClient().get(resourceGroupName, accountName, poolName, cacheName); + if (inner != null) { + return new CacheImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String poolName, String cacheName) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, cacheName); + } + + public void delete(String resourceGroupName, String accountName, String poolName, String cacheName, + Context context) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, cacheName, context); + } + + public PagedIterable<Cache> listByCapacityPools(String resourceGroupName, String accountName, String poolName) { + PagedIterable<CacheInner> inner + = this.serviceClient().listByCapacityPools(resourceGroupName, accountName, poolName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CacheImpl(inner1, this.manager())); + } + + public PagedIterable<Cache> listByCapacityPools(String resourceGroupName, String accountName, String poolName, + Context context) { + PagedIterable<CacheInner> inner + = this.serviceClient().listByCapacityPools(resourceGroupName, accountName, poolName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CacheImpl(inner1, this.manager())); + } + + public Response<PeeringPassphrases> listPeeringPassphrasesWithResponse(String resourceGroupName, String accountName, + String poolName, String cacheName, Context context) { + Response<PeeringPassphrasesInner> inner = this.serviceClient() + .listPeeringPassphrasesWithResponse(resourceGroupName, accountName, poolName, cacheName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PeeringPassphrasesImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PeeringPassphrases listPeeringPassphrases(String resourceGroupName, String accountName, String poolName, + String cacheName) { + PeeringPassphrasesInner inner + = this.serviceClient().listPeeringPassphrases(resourceGroupName, accountName, poolName, cacheName); + if (inner != null) { + return new PeeringPassphrasesImpl(inner, this.manager()); + } else { + return null; + } + } + + public Cache poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + PoolChangeRequest body) { + CacheInner inner = this.serviceClient().poolChange(resourceGroupName, accountName, poolName, cacheName, body); + if (inner != null) { + return new CacheImpl(inner, this.manager()); + } else { + return null; + } + } + + public Cache poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + PoolChangeRequest body, Context context) { + CacheInner inner + = this.serviceClient().poolChange(resourceGroupName, accountName, poolName, cacheName, body, context); + if (inner != null) { + return new CacheImpl(inner, this.manager()); + } else { + return null; + } + } + + public Cache getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String cacheName = ResourceManagerUtils.getValueFromIdByName(id, "caches"); + if (cacheName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'caches'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, cacheName, Context.NONE).getValue(); + } + + public Response<Cache> getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String cacheName = ResourceManagerUtils.getValueFromIdByName(id, "caches"); + if (cacheName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'caches'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, cacheName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String cacheName = ResourceManagerUtils.getValueFromIdByName(id, "caches"); + if (cacheName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'caches'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, cacheName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String cacheName = ResourceManagerUtils.getValueFromIdByName(id, "caches"); + if (cacheName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'caches'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, cacheName, context); + } + + private CachesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public CacheImpl define(String name) { + return new CacheImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CheckElasticResourceAvailabilityResponseImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CheckElasticResourceAvailabilityResponseImpl.java new file mode 100644 index 000000000000..2b7bfcf99083 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CheckElasticResourceAvailabilityResponseImpl.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityReason; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityResponse; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityStatus; + +public final class CheckElasticResourceAvailabilityResponseImpl implements CheckElasticResourceAvailabilityResponse { + private CheckElasticResourceAvailabilityResponseInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + CheckElasticResourceAvailabilityResponseImpl(CheckElasticResourceAvailabilityResponseInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public CheckElasticResourceAvailabilityStatus isAvailable() { + return this.innerModel().isAvailable(); + } + + public CheckElasticResourceAvailabilityReason reason() { + return this.innerModel().reason(); + } + + public String message() { + return this.innerModel().message(); + } + + public CheckElasticResourceAvailabilityResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountImpl.java new file mode 100644 index 000000000000..11bd2660a1ff --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountImpl.java @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner; +import com.azure.resourcemanager.netapp.models.ElasticAccount; +import com.azure.resourcemanager.netapp.models.ElasticAccountProperties; +import com.azure.resourcemanager.netapp.models.ElasticAccountUpdate; +import com.azure.resourcemanager.netapp.models.ElasticAccountUpdateProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import java.util.Collections; +import java.util.Map; + +public final class ElasticAccountImpl implements ElasticAccount, ElasticAccount.Definition, ElasticAccount.Update { + private ElasticAccountInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map<String, String> tags() { + Map<String, String> inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ElasticAccountProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticAccountInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private ElasticAccountUpdate updateBody; + + public ElasticAccountImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ElasticAccount create() { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .createOrUpdate(resourceGroupName, accountName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticAccount create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .createOrUpdate(resourceGroupName, accountName, this.innerModel(), context); + return this; + } + + ElasticAccountImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticAccountInner(); + this.serviceManager = serviceManager; + this.accountName = name; + } + + public ElasticAccountImpl update() { + this.updateBody = new ElasticAccountUpdate(); + return this; + } + + public ElasticAccount apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .update(resourceGroupName, accountName, updateBody, Context.NONE); + return this; + } + + public ElasticAccount apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .update(resourceGroupName, accountName, updateBody, context); + return this; + } + + ElasticAccountImpl(ElasticAccountInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + } + + public ElasticAccount refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE) + .getValue(); + return this; + } + + public ElasticAccount refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .getByResourceGroupWithResponse(resourceGroupName, accountName, context) + .getValue(); + return this; + } + + public ElasticAccountImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ElasticAccountImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ElasticAccountImpl withTags(Map<String, String> tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ElasticAccountImpl withProperties(ElasticAccountProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ElasticAccountImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateBody.withIdentity(identity); + return this; + } + } + + public ElasticAccountImpl withProperties(ElasticAccountUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsClientImpl.java new file mode 100644 index 000000000000..1f3905cf94b3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsClientImpl.java @@ -0,0 +1,1427 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticAccountListResult; +import com.azure.resourcemanager.netapp.models.ElasticAccountUpdate; +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 ElasticAccountsClient. + */ +public final class ElasticAccountsClientImpl implements ElasticAccountsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticAccountsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticAccountsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticAccountsClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(ElasticAccountsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticAccounts to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticAccounts") + public interface ElasticAccountsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticAccountInner>> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticAccountInner> getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticAccountInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticAccountInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticAccountUpdate body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticAccountUpdate body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticAccountListResult>> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticAccountListResult> listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/elasticAccounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticAccountListResult>> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/elasticAccounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticAccountListResult> listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticAccountListResult>> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticAccountListResult> listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticAccountListResult>> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticAccountListResult> listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<ElasticAccountInner>> getByResourceGroupWithResponseAsync(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticAccountInner> getByResourceGroupAsync(String resourceGroupName, String accountName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, accountName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<ElasticAccountInner> getByResourceGroupWithResponse(String resourceGroupName, String accountName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + } + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticAccountInner getByResourceGroup(String resourceGroupName, String accountName) { + return getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, ElasticAccountInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + ElasticAccountInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, Context.NONE); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + ElasticAccountInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, context); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ElasticAccountInner>, ElasticAccountInner> + beginCreateOrUpdateAsync(String resourceGroupName, String accountName, ElasticAccountInner body) { + Mono<Response<Flux<ByteBuffer>>> mono = createOrUpdateWithResponseAsync(resourceGroupName, accountName, body); + return this.client.<ElasticAccountInner, ElasticAccountInner>getLroResult(mono, this.client.getHttpPipeline(), + ElasticAccountInner.class, ElasticAccountInner.class, this.client.getContext()); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticAccountInner>, ElasticAccountInner> + beginCreateOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body) { + Response<BinaryData> response = createOrUpdateWithResponse(resourceGroupName, accountName, body); + return this.client.<ElasticAccountInner, ElasticAccountInner>getLroResult(response, ElasticAccountInner.class, + ElasticAccountInner.class, Context.NONE); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticAccountInner>, ElasticAccountInner> + beginCreateOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body, Context context) { + Response<BinaryData> response = createOrUpdateWithResponse(resourceGroupName, accountName, body, context); + return this.client.<ElasticAccountInner, ElasticAccountInner>getLroResult(response, ElasticAccountInner.class, + ElasticAccountInner.class, context); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticAccountInner> createOrUpdateAsync(String resourceGroupName, String accountName, + ElasticAccountInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticAccountInner createOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, body).getFinalResult(); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticAccountInner createOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body, + Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, body, context).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, String accountName, + ElasticAccountUpdate body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, + ElasticAccountUpdate body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, + ElasticAccountUpdate body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, context); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ElasticAccountInner>, ElasticAccountInner> beginUpdateAsync(String resourceGroupName, + String accountName, ElasticAccountUpdate body) { + Mono<Response<Flux<ByteBuffer>>> mono = updateWithResponseAsync(resourceGroupName, accountName, body); + return this.client.<ElasticAccountInner, ElasticAccountInner>getLroResult(mono, this.client.getHttpPipeline(), + ElasticAccountInner.class, ElasticAccountInner.class, this.client.getContext()); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticAccountInner>, ElasticAccountInner> beginUpdate(String resourceGroupName, + String accountName, ElasticAccountUpdate body) { + Response<BinaryData> response = updateWithResponse(resourceGroupName, accountName, body); + return this.client.<ElasticAccountInner, ElasticAccountInner>getLroResult(response, ElasticAccountInner.class, + ElasticAccountInner.class, Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticAccountInner>, ElasticAccountInner> beginUpdate(String resourceGroupName, + String accountName, ElasticAccountUpdate body, Context context) { + Response<BinaryData> response = updateWithResponse(resourceGroupName, accountName, body, context); + return this.client.<ElasticAccountInner, ElasticAccountInner>getLroResult(response, ElasticAccountInner.class, + ElasticAccountInner.class, context); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticAccountInner> updateAsync(String resourceGroupName, String accountName, + ElasticAccountUpdate body) { + return beginUpdateAsync(resourceGroupName, accountName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticAccountInner update(String resourceGroupName, String accountName, ElasticAccountUpdate body) { + return beginUpdate(resourceGroupName, accountName, body).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body 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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticAccountInner update(String resourceGroupName, String accountName, ElasticAccountUpdate body, + Context context) { + return beginUpdate(resourceGroupName, accountName, body, context).getFinalResult(); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String accountName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, Context.NONE); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, context); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String accountName) { + Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, accountName); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, accountName); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, + Context context) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, accountName, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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<Void> deleteAsync(String resourceGroupName, String accountName) { + return beginDeleteAsync(resourceGroupName, accountName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName) { + beginDelete(resourceGroupName, accountName).getFinalResult(); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, Context context) { + beginDelete(resourceGroupName, accountName, context).getFinalResult(); + } + + /** + * List and describe all NetApp elastic accounts in the 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 ElasticAccount list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticAccountInner>> 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)) + .<PagedResponse<ElasticAccountInner>>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 and describe all NetApp elastic accounts in the 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 ElasticAccount list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<ElasticAccountInner> listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List and describe all NetApp elastic accounts in the 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 ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticAccountInner> listByResourceGroupSinglePage(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticAccountListResult> res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all NetApp elastic accounts in the 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 ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticAccountInner> listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticAccountListResult> res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all NetApp elastic accounts in the 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 ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticAccountInner> listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * List and describe all NetApp elastic accounts in the 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 ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticAccountInner> listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticAccountInner>> 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)) + .<PagedResponse<ElasticAccountInner>>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 and describe all NetApp elastic accounts in the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<ElasticAccountInner> listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticAccountInner> listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticAccountListResult> res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticAccountInner> listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticAccountListResult> res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticAccountInner> list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticAccountInner> list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticAccountInner>> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<ElasticAccountInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticAccountInner> listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticAccountListResult> res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticAccountInner> listByResourceGroupNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticAccountListResult> res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticAccountInner>> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<ElasticAccountInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticAccountInner> listBySubscriptionNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticAccountListResult> res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticAccountInner> listBySubscriptionNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticAccountListResult> res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticAccountsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsImpl.java new file mode 100644 index 000000000000..be0f2e138cf8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsImpl.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner; +import com.azure.resourcemanager.netapp.models.ElasticAccount; +import com.azure.resourcemanager.netapp.models.ElasticAccounts; + +public final class ElasticAccountsImpl implements ElasticAccounts { + private static final ClientLogger LOGGER = new ClientLogger(ElasticAccountsImpl.class); + + private final ElasticAccountsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ElasticAccountsImpl(ElasticAccountsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response<ElasticAccount> getByResourceGroupWithResponse(String resourceGroupName, String accountName, + Context context) { + Response<ElasticAccountInner> inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, accountName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticAccountImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ElasticAccount getByResourceGroup(String resourceGroupName, String accountName) { + ElasticAccountInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, accountName); + if (inner != null) { + return new ElasticAccountImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String accountName) { + this.serviceClient().delete(resourceGroupName, accountName); + } + + public void delete(String resourceGroupName, String accountName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, context); + } + + public PagedIterable<ElasticAccount> listByResourceGroup(String resourceGroupName) { + PagedIterable<ElasticAccountInner> inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticAccountImpl(inner1, this.manager())); + } + + public PagedIterable<ElasticAccount> listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable<ElasticAccountInner> inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticAccountImpl(inner1, this.manager())); + } + + public PagedIterable<ElasticAccount> list() { + PagedIterable<ElasticAccountInner> inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticAccountImpl(inner1, this.manager())); + } + + public PagedIterable<ElasticAccount> list(Context context) { + PagedIterable<ElasticAccountInner> inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticAccountImpl(inner1, this.manager())); + } + + public ElasticAccount getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); + } + + public Response<ElasticAccount> getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, accountName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + this.delete(resourceGroupName, accountName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + this.delete(resourceGroupName, accountName, context); + } + + private ElasticAccountsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticAccountImpl define(String name) { + return new ElasticAccountImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupImpl.java new file mode 100644 index 000000000000..d5c1bbf4ab11 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupImpl.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner; +import com.azure.resourcemanager.netapp.models.ElasticBackup; +import com.azure.resourcemanager.netapp.models.ElasticBackupProperties; + +public final class ElasticBackupImpl implements ElasticBackup, ElasticBackup.Definition, ElasticBackup.Update { + private ElasticBackupInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ElasticBackupProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticBackupInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String backupVaultName; + + private String backupName; + + public ElasticBackupImpl withExistingElasticBackupVault(String resourceGroupName, String accountName, + String backupVaultName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + this.backupVaultName = backupVaultName; + return this; + } + + public ElasticBackup create() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .createOrUpdate(resourceGroupName, accountName, backupVaultName, backupName, this.innerModel(), + Context.NONE); + return this; + } + + public ElasticBackup create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .createOrUpdate(resourceGroupName, accountName, backupVaultName, backupName, this.innerModel(), context); + return this; + } + + ElasticBackupImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticBackupInner(); + this.serviceManager = serviceManager; + this.backupName = name; + } + + public ElasticBackupImpl update() { + return this; + } + + public ElasticBackup apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .update(resourceGroupName, accountName, backupVaultName, backupName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticBackup apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .update(resourceGroupName, accountName, backupVaultName, backupName, this.innerModel(), context); + return this; + } + + ElasticBackupImpl(ElasticBackupInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.backupVaultName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticBackupVaults"); + this.backupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticBackups"); + } + + public ElasticBackup refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE) + .getValue(); + return this; + } + + public ElasticBackup refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, context) + .getValue(); + return this; + } + + public ElasticBackupImpl withProperties(ElasticBackupProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesClientImpl.java new file mode 100644 index 000000000000..9570804a8999 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesClientImpl.java @@ -0,0 +1,1323 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticBackupPolicyListResult; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdate; +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 ElasticBackupPoliciesClient. + */ +public final class ElasticBackupPoliciesClientImpl implements ElasticBackupPoliciesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticBackupPoliciesService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticBackupPoliciesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticBackupPoliciesClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(ElasticBackupPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticBackupPolicies to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticBackupPolicies") + public interface ElasticBackupPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticBackupPolicyInner>> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupPolicyName") String backupPolicyName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticBackupPolicyInner> getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupPolicyName") String backupPolicyName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupPolicyName") String backupPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticBackupPolicyInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupPolicyName") String backupPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticBackupPolicyInner body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupPolicyName") String backupPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticBackupPolicyUpdate body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupPolicyName") String backupPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticBackupPolicyUpdate body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupPolicyName") String backupPolicyName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupPolicyName") String backupPolicyName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticBackupPolicyListResult>> listByElasticAccount(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticBackupPolicyListResult> listByElasticAccountSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticBackupPolicyListResult>> listByElasticAccountNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticBackupPolicyListResult> listByElasticAccountNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Policy along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<ElasticBackupPolicyInner>> getWithResponseAsync(String resourceGroupName, String accountName, + String backupPolicyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Policy on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticBackupPolicyInner> getAsync(String resourceGroupName, String accountName, + String backupPolicyName) { + return getWithResponseAsync(resourceGroupName, accountName, backupPolicyName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Policy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<ElasticBackupPolicyInner> getWithResponse(String resourceGroupName, String accountName, + String backupPolicyName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, backupPolicyName, accept, context); + } + + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupPolicyInner get(String resourceGroupName, String accountName, String backupPolicyName) { + return getWithResponse(resourceGroupName, accountName, backupPolicyName, Context.NONE).getValue(); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String backupPolicyName, ElasticBackupPolicyInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, contentType, accept, + body, Context.NONE); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, contentType, accept, + body, context); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ElasticBackupPolicyInner>, ElasticBackupPolicyInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String backupPolicyName, ElasticBackupPolicyInner body) { + Mono<Response<Flux<ByteBuffer>>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, backupPolicyName, body); + return this.client.<ElasticBackupPolicyInner, ElasticBackupPolicyInner>getLroResult(mono, + this.client.getHttpPipeline(), ElasticBackupPolicyInner.class, ElasticBackupPolicyInner.class, + this.client.getContext()); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticBackupPolicyInner>, ElasticBackupPolicyInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String backupPolicyName, ElasticBackupPolicyInner body) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, accountName, backupPolicyName, body); + return this.client.<ElasticBackupPolicyInner, ElasticBackupPolicyInner>getLroResult(response, + ElasticBackupPolicyInner.class, ElasticBackupPolicyInner.class, Context.NONE); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticBackupPolicyInner>, ElasticBackupPolicyInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String backupPolicyName, ElasticBackupPolicyInner body, + Context context) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, accountName, backupPolicyName, body, context); + return this.client.<ElasticBackupPolicyInner, ElasticBackupPolicyInner>getLroResult(response, + ElasticBackupPolicyInner.class, ElasticBackupPolicyInner.class, context); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticBackupPolicyInner> createOrUpdateAsync(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, backupPolicyName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupPolicyInner createOrUpdate(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, backupPolicyName, body).getFinalResult(); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupPolicyInner createOrUpdate(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, backupPolicyName, body, context).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyUpdate body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyUpdate body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, contentType, accept, + body, Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyUpdate body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, contentType, accept, + body, context); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ElasticBackupPolicyInner>, ElasticBackupPolicyInner> beginUpdateAsync( + String resourceGroupName, String accountName, String backupPolicyName, ElasticBackupPolicyUpdate body) { + Mono<Response<Flux<ByteBuffer>>> mono + = updateWithResponseAsync(resourceGroupName, accountName, backupPolicyName, body); + return this.client.<ElasticBackupPolicyInner, ElasticBackupPolicyInner>getLroResult(mono, + this.client.getHttpPipeline(), ElasticBackupPolicyInner.class, ElasticBackupPolicyInner.class, + this.client.getContext()); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticBackupPolicyInner>, ElasticBackupPolicyInner> beginUpdate( + String resourceGroupName, String accountName, String backupPolicyName, ElasticBackupPolicyUpdate body) { + Response<BinaryData> response = updateWithResponse(resourceGroupName, accountName, backupPolicyName, body); + return this.client.<ElasticBackupPolicyInner, ElasticBackupPolicyInner>getLroResult(response, + ElasticBackupPolicyInner.class, ElasticBackupPolicyInner.class, Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticBackupPolicyInner>, ElasticBackupPolicyInner> beginUpdate( + String resourceGroupName, String accountName, String backupPolicyName, ElasticBackupPolicyUpdate body, + Context context) { + Response<BinaryData> response + = updateWithResponse(resourceGroupName, accountName, backupPolicyName, body, context); + return this.client.<ElasticBackupPolicyInner, ElasticBackupPolicyInner>getLroResult(response, + ElasticBackupPolicyInner.class, ElasticBackupPolicyInner.class, context); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticBackupPolicyInner> updateAsync(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyUpdate body) { + return beginUpdateAsync(resourceGroupName, accountName, backupPolicyName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupPolicyInner update(String resourceGroupName, String accountName, String backupPolicyName, + ElasticBackupPolicyUpdate body) { + return beginUpdate(resourceGroupName, accountName, backupPolicyName, body).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body 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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupPolicyInner update(String resourceGroupName, String accountName, String backupPolicyName, + ElasticBackupPolicyUpdate body, Context context) { + return beginUpdate(resourceGroupName, accountName, backupPolicyName, body, context).getFinalResult(); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String accountName, + String backupPolicyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, + String backupPolicyName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, Context.NONE); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, + String backupPolicyName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, context); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String accountName, + String backupPolicyName) { + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, backupPolicyName); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, + String backupPolicyName) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, accountName, backupPolicyName); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, + String backupPolicyName, Context context) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, accountName, backupPolicyName, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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<Void> deleteAsync(String resourceGroupName, String accountName, String backupPolicyName) { + return beginDeleteAsync(resourceGroupName, accountName, backupPolicyName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String backupPolicyName) { + beginDelete(resourceGroupName, accountName, backupPolicyName).getFinalResult(); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String backupPolicyName, Context context) { + beginDelete(resourceGroupName, accountName, backupPolicyName, context).getFinalResult(); + } + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticBackupPolicyInner>> listByElasticAccountSinglePageAsync(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByElasticAccount(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) + .<PagedResponse<ElasticBackupPolicyInner>>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 and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<ElasticBackupPolicyInner> listByElasticAccountAsync(String resourceGroupName, + String accountName) { + return new PagedFlux<>(() -> listByElasticAccountSinglePageAsync(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePageAsync(nextLink)); + } + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticBackupPolicyInner> listByElasticAccountSinglePage(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticBackupPolicyListResult> res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticBackupPolicyInner> listByElasticAccountSinglePage(String resourceGroupName, + String accountName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticBackupPolicyListResult> res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticBackupPolicyInner> listByElasticAccount(String resourceGroupName, String accountName) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePage(nextLink)); + } + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticBackupPolicyInner> listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName, context), + nextLink -> listByElasticAccountNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticBackupPolicyInner>> listByElasticAccountNextSinglePageAsync(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.listByElasticAccountNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<ElasticBackupPolicyInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticBackupPolicyInner> listByElasticAccountNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticBackupPolicyListResult> res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticBackupPolicyInner> listByElasticAccountNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticBackupPolicyListResult> res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupPoliciesClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesImpl.java new file mode 100644 index 000000000000..6fdfac7d936b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesImpl.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicies; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicy; + +public final class ElasticBackupPoliciesImpl implements ElasticBackupPolicies { + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupPoliciesImpl.class); + + private final ElasticBackupPoliciesClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ElasticBackupPoliciesImpl(ElasticBackupPoliciesClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response<ElasticBackupPolicy> getWithResponse(String resourceGroupName, String accountName, + String backupPolicyName, Context context) { + Response<ElasticBackupPolicyInner> inner + = this.serviceClient().getWithResponse(resourceGroupName, accountName, backupPolicyName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticBackupPolicyImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ElasticBackupPolicy get(String resourceGroupName, String accountName, String backupPolicyName) { + ElasticBackupPolicyInner inner = this.serviceClient().get(resourceGroupName, accountName, backupPolicyName); + if (inner != null) { + return new ElasticBackupPolicyImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String backupPolicyName) { + this.serviceClient().delete(resourceGroupName, accountName, backupPolicyName); + } + + public void delete(String resourceGroupName, String accountName, String backupPolicyName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, backupPolicyName, context); + } + + public PagedIterable<ElasticBackupPolicy> listByElasticAccount(String resourceGroupName, String accountName) { + PagedIterable<ElasticBackupPolicyInner> inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupPolicyImpl(inner1, this.manager())); + } + + public PagedIterable<ElasticBackupPolicy> listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + PagedIterable<ElasticBackupPolicyInner> inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupPolicyImpl(inner1, this.manager())); + } + + public ElasticBackupPolicy getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupPolicies"); + if (backupPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupPolicyName, Context.NONE).getValue(); + } + + public Response<ElasticBackupPolicy> getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupPolicies"); + if (backupPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupPolicyName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupPolicies"); + if (backupPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupPolicies'.", id))); + } + this.delete(resourceGroupName, accountName, backupPolicyName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupPolicies"); + if (backupPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupPolicies'.", id))); + } + this.delete(resourceGroupName, accountName, backupPolicyName, context); + } + + private ElasticBackupPoliciesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticBackupPolicyImpl define(String name) { + return new ElasticBackupPolicyImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPolicyImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPolicyImpl.java new file mode 100644 index 000000000000..b5f1b87e2ade --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPolicyImpl.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicy; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdate; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdateProperties; +import java.util.Collections; +import java.util.Map; + +public final class ElasticBackupPolicyImpl + implements ElasticBackupPolicy, ElasticBackupPolicy.Definition, ElasticBackupPolicy.Update { + private ElasticBackupPolicyInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map<String, String> tags() { + Map<String, String> inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ElasticBackupPolicyProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticBackupPolicyInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String backupPolicyName; + + private ElasticBackupPolicyUpdate updateBody; + + public ElasticBackupPolicyImpl withExistingElasticAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + public ElasticBackupPolicy create() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupPolicies() + .createOrUpdate(resourceGroupName, accountName, backupPolicyName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticBackupPolicy create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupPolicies() + .createOrUpdate(resourceGroupName, accountName, backupPolicyName, this.innerModel(), context); + return this; + } + + ElasticBackupPolicyImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticBackupPolicyInner(); + this.serviceManager = serviceManager; + this.backupPolicyName = name; + } + + public ElasticBackupPolicyImpl update() { + this.updateBody = new ElasticBackupPolicyUpdate(); + return this; + } + + public ElasticBackupPolicy apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupPolicies() + .update(resourceGroupName, accountName, backupPolicyName, updateBody, Context.NONE); + return this; + } + + public ElasticBackupPolicy apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupPolicies() + .update(resourceGroupName, accountName, backupPolicyName, updateBody, context); + return this; + } + + ElasticBackupPolicyImpl(ElasticBackupPolicyInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.backupPolicyName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticBackupPolicies"); + } + + public ElasticBackupPolicy refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupPolicies() + .getWithResponse(resourceGroupName, accountName, backupPolicyName, Context.NONE) + .getValue(); + return this; + } + + public ElasticBackupPolicy refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupPolicies() + .getWithResponse(resourceGroupName, accountName, backupPolicyName, context) + .getValue(); + return this; + } + + public ElasticBackupPolicyImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ElasticBackupPolicyImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ElasticBackupPolicyImpl withTags(Map<String, String> tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ElasticBackupPolicyImpl withProperties(ElasticBackupPolicyProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ElasticBackupPolicyImpl withProperties(ElasticBackupPolicyUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultImpl.java new file mode 100644 index 000000000000..13bcd05c95f6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultImpl.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupVault; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultUpdate; +import java.util.Collections; +import java.util.Map; + +public final class ElasticBackupVaultImpl + implements ElasticBackupVault, ElasticBackupVault.Definition, ElasticBackupVault.Update { + private ElasticBackupVaultInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map<String, String> tags() { + Map<String, String> inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ElasticBackupVaultProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticBackupVaultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String backupVaultName; + + private ElasticBackupVaultUpdate updateBody; + + public ElasticBackupVaultImpl withExistingElasticAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + public ElasticBackupVault create() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupVaults() + .createOrUpdate(resourceGroupName, accountName, backupVaultName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticBackupVault create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupVaults() + .createOrUpdate(resourceGroupName, accountName, backupVaultName, this.innerModel(), context); + return this; + } + + ElasticBackupVaultImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticBackupVaultInner(); + this.serviceManager = serviceManager; + this.backupVaultName = name; + } + + public ElasticBackupVaultImpl update() { + this.updateBody = new ElasticBackupVaultUpdate(); + return this; + } + + public ElasticBackupVault apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupVaults() + .update(resourceGroupName, accountName, backupVaultName, updateBody, Context.NONE); + return this; + } + + public ElasticBackupVault apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupVaults() + .update(resourceGroupName, accountName, backupVaultName, updateBody, context); + return this; + } + + ElasticBackupVaultImpl(ElasticBackupVaultInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.backupVaultName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticBackupVaults"); + } + + public ElasticBackupVault refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupVaults() + .getWithResponse(resourceGroupName, accountName, backupVaultName, Context.NONE) + .getValue(); + return this; + } + + public ElasticBackupVault refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupVaults() + .getWithResponse(resourceGroupName, accountName, backupVaultName, context) + .getValue(); + return this; + } + + public ElasticBackupVaultImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ElasticBackupVaultImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ElasticBackupVaultImpl withTags(Map<String, String> tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ElasticBackupVaultImpl withProperties(ElasticBackupVaultProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsClientImpl.java new file mode 100644 index 000000000000..40825ed76062 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsClientImpl.java @@ -0,0 +1,1322 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticBackupVaultListResult; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultUpdate; +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 ElasticBackupVaultsClient. + */ +public final class ElasticBackupVaultsClientImpl implements ElasticBackupVaultsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticBackupVaultsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticBackupVaultsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticBackupVaultsClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(ElasticBackupVaultsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticBackupVaults to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticBackupVaults") + public interface ElasticBackupVaultsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticBackupVaultInner>> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticBackupVaultInner> getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticBackupVaultInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticBackupVaultInner body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticBackupVaultUpdate body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticBackupVaultUpdate body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticBackupVaultListResult>> listByElasticAccount(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticBackupVaultListResult> listByElasticAccountSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticBackupVaultListResult>> listByElasticAccountNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticBackupVaultListResult> listByElasticAccountNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Vault along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<ElasticBackupVaultInner>> getWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Vault on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticBackupVaultInner> getAsync(String resourceGroupName, String accountName, + String backupVaultName) { + return getWithResponseAsync(resourceGroupName, accountName, backupVaultName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<ElasticBackupVaultInner> getWithResponse(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, backupVaultName, accept, context); + } + + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupVaultInner get(String resourceGroupName, String accountName, String backupVaultName) { + return getWithResponse(resourceGroupName, accountName, backupVaultName, Context.NONE).getValue(); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String backupVaultName, ElasticBackupVaultInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, ElasticBackupVaultInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, contentType, accept, body, + Context.NONE); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, ElasticBackupVaultInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, contentType, accept, body, + context); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ElasticBackupVaultInner>, ElasticBackupVaultInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String backupVaultName, ElasticBackupVaultInner body) { + Mono<Response<Flux<ByteBuffer>>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, backupVaultName, body); + return this.client.<ElasticBackupVaultInner, ElasticBackupVaultInner>getLroResult(mono, + this.client.getHttpPipeline(), ElasticBackupVaultInner.class, ElasticBackupVaultInner.class, + this.client.getContext()); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticBackupVaultInner>, ElasticBackupVaultInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String backupVaultName, ElasticBackupVaultInner body) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, accountName, backupVaultName, body); + return this.client.<ElasticBackupVaultInner, ElasticBackupVaultInner>getLroResult(response, + ElasticBackupVaultInner.class, ElasticBackupVaultInner.class, Context.NONE); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticBackupVaultInner>, ElasticBackupVaultInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String backupVaultName, ElasticBackupVaultInner body, + Context context) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, accountName, backupVaultName, body, context); + return this.client.<ElasticBackupVaultInner, ElasticBackupVaultInner>getLroResult(response, + ElasticBackupVaultInner.class, ElasticBackupVaultInner.class, context); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticBackupVaultInner> createOrUpdateAsync(String resourceGroupName, String accountName, + String backupVaultName, ElasticBackupVaultInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, backupVaultName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupVaultInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + ElasticBackupVaultInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, backupVaultName, body).getFinalResult(); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupVaultInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + ElasticBackupVaultInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, backupVaultName, body, context).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, ElasticBackupVaultUpdate body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, ElasticBackupVaultUpdate body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, contentType, accept, body, + Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, ElasticBackupVaultUpdate body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, contentType, accept, body, + context); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ElasticBackupVaultInner>, ElasticBackupVaultInner> beginUpdateAsync( + String resourceGroupName, String accountName, String backupVaultName, ElasticBackupVaultUpdate body) { + Mono<Response<Flux<ByteBuffer>>> mono + = updateWithResponseAsync(resourceGroupName, accountName, backupVaultName, body); + return this.client.<ElasticBackupVaultInner, ElasticBackupVaultInner>getLroResult(mono, + this.client.getHttpPipeline(), ElasticBackupVaultInner.class, ElasticBackupVaultInner.class, + this.client.getContext()); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticBackupVaultInner>, ElasticBackupVaultInner> beginUpdate( + String resourceGroupName, String accountName, String backupVaultName, ElasticBackupVaultUpdate body) { + Response<BinaryData> response = updateWithResponse(resourceGroupName, accountName, backupVaultName, body); + return this.client.<ElasticBackupVaultInner, ElasticBackupVaultInner>getLroResult(response, + ElasticBackupVaultInner.class, ElasticBackupVaultInner.class, Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticBackupVaultInner>, ElasticBackupVaultInner> beginUpdate( + String resourceGroupName, String accountName, String backupVaultName, ElasticBackupVaultUpdate body, + Context context) { + Response<BinaryData> response + = updateWithResponse(resourceGroupName, accountName, backupVaultName, body, context); + return this.client.<ElasticBackupVaultInner, ElasticBackupVaultInner>getLroResult(response, + ElasticBackupVaultInner.class, ElasticBackupVaultInner.class, context); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticBackupVaultInner> updateAsync(String resourceGroupName, String accountName, + String backupVaultName, ElasticBackupVaultUpdate body) { + return beginUpdateAsync(resourceGroupName, accountName, backupVaultName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupVaultInner update(String resourceGroupName, String accountName, String backupVaultName, + ElasticBackupVaultUpdate body) { + return beginUpdate(resourceGroupName, accountName, backupVaultName, body).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body 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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupVaultInner update(String resourceGroupName, String accountName, String backupVaultName, + ElasticBackupVaultUpdate body, Context context) { + return beginUpdate(resourceGroupName, accountName, backupVaultName, body, context).getFinalResult(); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, + String backupVaultName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, Context.NONE); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, context); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String accountName, + String backupVaultName) { + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, backupVaultName); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, + String backupVaultName) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, accountName, backupVaultName); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, accountName, backupVaultName, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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<Void> deleteAsync(String resourceGroupName, String accountName, String backupVaultName) { + return beginDeleteAsync(resourceGroupName, accountName, backupVaultName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String backupVaultName) { + beginDelete(resourceGroupName, accountName, backupVaultName).getFinalResult(); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String backupVaultName, Context context) { + beginDelete(resourceGroupName, accountName, backupVaultName, context).getFinalResult(); + } + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticBackupVaultInner>> listByElasticAccountSinglePageAsync(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByElasticAccount(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) + .<PagedResponse<ElasticBackupVaultInner>>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 and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<ElasticBackupVaultInner> listByElasticAccountAsync(String resourceGroupName, String accountName) { + return new PagedFlux<>(() -> listByElasticAccountSinglePageAsync(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePageAsync(nextLink)); + } + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticBackupVaultInner> listByElasticAccountSinglePage(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticBackupVaultListResult> res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticBackupVaultInner> listByElasticAccountSinglePage(String resourceGroupName, + String accountName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticBackupVaultListResult> res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticBackupVaultInner> listByElasticAccount(String resourceGroupName, String accountName) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePage(nextLink)); + } + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticBackupVaultInner> listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName, context), + nextLink -> listByElasticAccountNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticBackupVaultInner>> listByElasticAccountNextSinglePageAsync(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.listByElasticAccountNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<ElasticBackupVaultInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticBackupVaultInner> listByElasticAccountNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticBackupVaultListResult> res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticBackupVaultInner> listByElasticAccountNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticBackupVaultListResult> res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupVaultsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsImpl.java new file mode 100644 index 000000000000..ab48ada2b093 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsImpl.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupVault; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaults; + +public final class ElasticBackupVaultsImpl implements ElasticBackupVaults { + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupVaultsImpl.class); + + private final ElasticBackupVaultsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ElasticBackupVaultsImpl(ElasticBackupVaultsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response<ElasticBackupVault> getWithResponse(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + Response<ElasticBackupVaultInner> inner + = this.serviceClient().getWithResponse(resourceGroupName, accountName, backupVaultName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticBackupVaultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ElasticBackupVault get(String resourceGroupName, String accountName, String backupVaultName) { + ElasticBackupVaultInner inner = this.serviceClient().get(resourceGroupName, accountName, backupVaultName); + if (inner != null) { + return new ElasticBackupVaultImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String backupVaultName) { + this.serviceClient().delete(resourceGroupName, accountName, backupVaultName); + } + + public void delete(String resourceGroupName, String accountName, String backupVaultName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, backupVaultName, context); + } + + public PagedIterable<ElasticBackupVault> listByElasticAccount(String resourceGroupName, String accountName) { + PagedIterable<ElasticBackupVaultInner> inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupVaultImpl(inner1, this.manager())); + } + + public PagedIterable<ElasticBackupVault> listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + PagedIterable<ElasticBackupVaultInner> inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupVaultImpl(inner1, this.manager())); + } + + public ElasticBackupVault getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupVaultName, Context.NONE).getValue(); + } + + public Response<ElasticBackupVault> getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupVaultName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + this.delete(resourceGroupName, accountName, backupVaultName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + this.delete(resourceGroupName, accountName, backupVaultName, context); + } + + private ElasticBackupVaultsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticBackupVaultImpl define(String name) { + return new ElasticBackupVaultImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsClientImpl.java new file mode 100644 index 000000000000..d048173279a6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsClientImpl.java @@ -0,0 +1,1420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticBackupListResult; +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 ElasticBackupsClient. + */ +public final class ElasticBackupsClientImpl implements ElasticBackupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticBackupsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticBackupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticBackupsClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(ElasticBackupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticBackups to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticBackups") + public interface ElasticBackupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticBackupInner>> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticBackupInner> getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticBackupInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticBackupInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticBackupInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticBackupInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticBackupListResult>> listByVault(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticBackupListResult> listByVaultSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticBackupListResult>> listByVaultNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticBackupListResult> listByVaultNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<ElasticBackupInner>> getWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticBackupInner> getAsync(String resourceGroupName, String accountName, String backupVaultName, + String backupName) { + return getWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<ElasticBackupInner> getWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, backupVaultName, backupName, accept, context); + } + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupInner get(String resourceGroupName, String accountName, String backupVaultName, + String backupName) { + return getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE).getValue(); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, ElasticBackupInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, contentType, + accept, body, Context.NONE); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, ElasticBackupInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, contentType, + accept, body, context); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ElasticBackupInner>, ElasticBackupInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String backupVaultName, String backupName, + ElasticBackupInner body) { + Mono<Response<Flux<ByteBuffer>>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body); + return this.client.<ElasticBackupInner, ElasticBackupInner>getLroResult(mono, this.client.getHttpPipeline(), + ElasticBackupInner.class, ElasticBackupInner.class, this.client.getContext()); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticBackupInner>, ElasticBackupInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, accountName, backupVaultName, backupName, body); + return this.client.<ElasticBackupInner, ElasticBackupInner>getLroResult(response, ElasticBackupInner.class, + ElasticBackupInner.class, Context.NONE); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticBackupInner>, ElasticBackupInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body, Context context) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, accountName, backupVaultName, backupName, body, context); + return this.client.<ElasticBackupInner, ElasticBackupInner>getLroResult(response, ElasticBackupInner.class, + ElasticBackupInner.class, context); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticBackupInner> createOrUpdateAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName, ElasticBackupInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, backupVaultName, backupName, body).getFinalResult(); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, backupVaultName, backupName, body, context) + .getFinalResult(); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName, ElasticBackupInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, ElasticBackupInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, contentType, + accept, body, Context.NONE); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, ElasticBackupInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, contentType, + accept, body, context); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ElasticBackupInner>, ElasticBackupInner> beginUpdateAsync(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body) { + Mono<Response<Flux<ByteBuffer>>> mono + = updateWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body); + return this.client.<ElasticBackupInner, ElasticBackupInner>getLroResult(mono, this.client.getHttpPipeline(), + ElasticBackupInner.class, ElasticBackupInner.class, this.client.getContext()); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticBackupInner>, ElasticBackupInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body) { + Response<BinaryData> response + = updateWithResponse(resourceGroupName, accountName, backupVaultName, backupName, body); + return this.client.<ElasticBackupInner, ElasticBackupInner>getLroResult(response, ElasticBackupInner.class, + ElasticBackupInner.class, Context.NONE); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticBackupInner>, ElasticBackupInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body, Context context) { + Response<BinaryData> response + = updateWithResponse(resourceGroupName, accountName, backupVaultName, backupName, body, context); + return this.client.<ElasticBackupInner, ElasticBackupInner>getLroResult(response, ElasticBackupInner.class, + ElasticBackupInner.class, context); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticBackupInner> updateAsync(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body) { + return beginUpdateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupInner update(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body) { + return beginUpdate(resourceGroupName, accountName, backupVaultName, backupName, body).getFinalResult(); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body 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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupInner update(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body, Context context) { + return beginUpdate(resourceGroupName, accountName, backupVaultName, backupName, body, context).getFinalResult(); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, Context.NONE); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, context); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName) { + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, + String backupVaultName, String backupName) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, accountName, backupVaultName, backupName); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, + String backupVaultName, String backupName, Context context) { + Response<BinaryData> response + = deleteWithResponse(resourceGroupName, accountName, backupVaultName, backupName, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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<Void> deleteAsync(String resourceGroupName, String accountName, String backupVaultName, + String backupName) { + return beginDeleteAsync(resourceGroupName, accountName, backupVaultName, backupName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName) { + beginDelete(resourceGroupName, accountName, backupVaultName, backupName).getFinalResult(); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName, + Context context) { + beginDelete(resourceGroupName, accountName, backupVaultName, backupName, context).getFinalResult(); + } + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticBackupInner>> listByVaultSinglePageAsync(String resourceGroupName, + String accountName, String backupVaultName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByVault(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, accept, context)) + .<PagedResponse<ElasticBackupInner>>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 elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<ElasticBackupInner> listByVaultAsync(String resourceGroupName, String accountName, + String backupVaultName) { + return new PagedFlux<>(() -> listByVaultSinglePageAsync(resourceGroupName, accountName, backupVaultName), + nextLink -> listByVaultNextSinglePageAsync(nextLink)); + } + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticBackupInner> listByVaultSinglePage(String resourceGroupName, String accountName, + String backupVaultName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticBackupListResult> res + = service.listByVaultSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticBackupInner> listByVaultSinglePage(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticBackupListResult> res + = service.listByVaultSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticBackupInner> listByVault(String resourceGroupName, String accountName, + String backupVaultName) { + return new PagedIterable<>(() -> listByVaultSinglePage(resourceGroupName, accountName, backupVaultName), + nextLink -> listByVaultNextSinglePage(nextLink)); + } + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticBackupInner> listByVault(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + return new PagedIterable<>( + () -> listByVaultSinglePage(resourceGroupName, accountName, backupVaultName, context), + nextLink -> listByVaultNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticBackupInner>> listByVaultNextSinglePageAsync(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.listByVaultNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<ElasticBackupInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticBackupInner> listByVaultNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticBackupListResult> res + = service.listByVaultNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticBackupInner> listByVaultNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticBackupListResult> res + = service.listByVaultNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsImpl.java new file mode 100644 index 000000000000..6be2247f3e0a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsImpl.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner; +import com.azure.resourcemanager.netapp.models.ElasticBackup; +import com.azure.resourcemanager.netapp.models.ElasticBackups; + +public final class ElasticBackupsImpl implements ElasticBackups { + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupsImpl.class); + + private final ElasticBackupsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ElasticBackupsImpl(ElasticBackupsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response<ElasticBackup> getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + String backupName, Context context) { + Response<ElasticBackupInner> inner = this.serviceClient() + .getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticBackupImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ElasticBackup get(String resourceGroupName, String accountName, String backupVaultName, String backupName) { + ElasticBackupInner inner + = this.serviceClient().get(resourceGroupName, accountName, backupVaultName, backupName); + if (inner != null) { + return new ElasticBackupImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName) { + this.serviceClient().delete(resourceGroupName, accountName, backupVaultName, backupName); + } + + public void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName, + Context context) { + this.serviceClient().delete(resourceGroupName, accountName, backupVaultName, backupName, context); + } + + public PagedIterable<ElasticBackup> listByVault(String resourceGroupName, String accountName, + String backupVaultName) { + PagedIterable<ElasticBackupInner> inner + = this.serviceClient().listByVault(resourceGroupName, accountName, backupVaultName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupImpl(inner1, this.manager())); + } + + public PagedIterable<ElasticBackup> listByVault(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + PagedIterable<ElasticBackupInner> inner + = this.serviceClient().listByVault(resourceGroupName, accountName, backupVaultName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupImpl(inner1, this.manager())); + } + + public ElasticBackup getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + String backupName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackups"); + if (backupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackups'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE) + .getValue(); + } + + public Response<ElasticBackup> getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + String backupName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackups"); + if (backupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackups'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + String backupName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackups"); + if (backupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackups'.", id))); + } + this.delete(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + String backupName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackups"); + if (backupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackups'.", id))); + } + this.delete(resourceGroupName, accountName, backupVaultName, backupName, context); + } + + private ElasticBackupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticBackupImpl define(String name) { + return new ElasticBackupImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolImpl.java new file mode 100644 index 000000000000..af68ba51b1c6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolImpl.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner; +import com.azure.resourcemanager.netapp.models.ChangeZoneRequest; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityResponse; +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPool; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolProperties; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdate; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdateProperties; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class ElasticCapacityPoolImpl + implements ElasticCapacityPool, ElasticCapacityPool.Definition, ElasticCapacityPool.Update { + private ElasticCapacityPoolInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map<String, String> tags() { + Map<String, String> inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ElasticCapacityPoolProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public List<String> zones() { + List<String> inner = this.innerModel().zones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticCapacityPoolInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String poolName; + + private ElasticCapacityPoolUpdate updateBody; + + public ElasticCapacityPoolImpl withExistingElasticAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + public ElasticCapacityPool create() { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .createOrUpdate(resourceGroupName, accountName, poolName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticCapacityPool create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .createOrUpdate(resourceGroupName, accountName, poolName, this.innerModel(), context); + return this; + } + + ElasticCapacityPoolImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticCapacityPoolInner(); + this.serviceManager = serviceManager; + this.poolName = name; + } + + public ElasticCapacityPoolImpl update() { + this.updateBody = new ElasticCapacityPoolUpdate(); + return this; + } + + public ElasticCapacityPool apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .update(resourceGroupName, accountName, poolName, updateBody, Context.NONE); + return this; + } + + public ElasticCapacityPool apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .update(resourceGroupName, accountName, poolName, updateBody, context); + return this; + } + + ElasticCapacityPoolImpl(ElasticCapacityPoolInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticCapacityPools"); + } + + public ElasticCapacityPool refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .getWithResponse(resourceGroupName, accountName, poolName, Context.NONE) + .getValue(); + return this; + } + + public ElasticCapacityPool refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .getWithResponse(resourceGroupName, accountName, poolName, context) + .getValue(); + return this; + } + + public ElasticCapacityPool changeZone(ChangeZoneRequest body) { + return serviceManager.elasticCapacityPools().changeZone(resourceGroupName, accountName, poolName, body); + } + + public ElasticCapacityPool changeZone(ChangeZoneRequest body, Context context) { + return serviceManager.elasticCapacityPools() + .changeZone(resourceGroupName, accountName, poolName, body, context); + } + + public Response<CheckElasticResourceAvailabilityResponse> checkVolumeFilePathAvailabilityWithResponse( + CheckElasticVolumeFilePathAvailabilityRequest body, Context context) { + return serviceManager.elasticCapacityPools() + .checkVolumeFilePathAvailabilityWithResponse(resourceGroupName, accountName, poolName, body, context); + } + + public CheckElasticResourceAvailabilityResponse + checkVolumeFilePathAvailability(CheckElasticVolumeFilePathAvailabilityRequest body) { + return serviceManager.elasticCapacityPools() + .checkVolumeFilePathAvailability(resourceGroupName, accountName, poolName, body); + } + + public ElasticCapacityPoolImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ElasticCapacityPoolImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ElasticCapacityPoolImpl withTags(Map<String, String> tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ElasticCapacityPoolImpl withProperties(ElasticCapacityPoolProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ElasticCapacityPoolImpl withZones(List<String> zones) { + this.innerModel().withZones(zones); + return this; + } + + public ElasticCapacityPoolImpl withProperties(ElasticCapacityPoolUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsClientImpl.java new file mode 100644 index 000000000000..187d4ee3ea11 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsClientImpl.java @@ -0,0 +1,1760 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient; +import com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner; +import com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticCapacityPoolListResult; +import com.azure.resourcemanager.netapp.models.ChangeZoneRequest; +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdate; +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 ElasticCapacityPoolsClient. + */ +public final class ElasticCapacityPoolsClientImpl implements ElasticCapacityPoolsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticCapacityPoolsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticCapacityPoolsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticCapacityPoolsClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(ElasticCapacityPoolsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticCapacityPools to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticCapacityPools") + public interface ElasticCapacityPoolsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticCapacityPoolInner>> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticCapacityPoolInner> getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticCapacityPoolInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticCapacityPoolInner body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticCapacityPoolUpdate body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticCapacityPoolUpdate body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticCapacityPoolListResult>> listByElasticAccount(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticCapacityPoolListResult> listByElasticAccountSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/changeZone") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> changeZone(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ChangeZoneRequest body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/changeZone") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> changeZoneSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ChangeZoneRequest body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/checkVolumeFilePathAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<CheckElasticResourceAvailabilityResponseInner>> checkVolumeFilePathAvailability( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckElasticVolumeFilePathAvailabilityRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/checkVolumeFilePathAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<CheckElasticResourceAvailabilityResponseInner> checkVolumeFilePathAvailabilitySync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckElasticVolumeFilePathAvailabilityRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticCapacityPoolListResult>> listByElasticAccountNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticCapacityPoolListResult> listByElasticAccountNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Capacity Pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<ElasticCapacityPoolInner>> getWithResponseAsync(String resourceGroupName, String accountName, + String poolName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Capacity Pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticCapacityPoolInner> getAsync(String resourceGroupName, String accountName, String poolName) { + return getWithResponseAsync(resourceGroupName, accountName, poolName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Capacity Pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<ElasticCapacityPoolInner> getWithResponse(String resourceGroupName, String accountName, + String poolName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, accept, context); + } + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Capacity Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticCapacityPoolInner get(String resourceGroupName, String accountName, String poolName) { + return getWithResponse(resourceGroupName, accountName, poolName, Context.NONE).getValue(); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String poolName, ElasticCapacityPoolInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, ElasticCapacityPoolInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + Context.NONE); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, ElasticCapacityPoolInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + context); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ElasticCapacityPoolInner>, ElasticCapacityPoolInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String poolName, ElasticCapacityPoolInner body) { + Mono<Response<Flux<ByteBuffer>>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, poolName, body); + return this.client.<ElasticCapacityPoolInner, ElasticCapacityPoolInner>getLroResult(mono, + this.client.getHttpPipeline(), ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, + this.client.getContext()); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticCapacityPoolInner>, ElasticCapacityPoolInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String poolName, ElasticCapacityPoolInner body) { + Response<BinaryData> response = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, body); + return this.client.<ElasticCapacityPoolInner, ElasticCapacityPoolInner>getLroResult(response, + ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, Context.NONE); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticCapacityPoolInner>, ElasticCapacityPoolInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String poolName, ElasticCapacityPoolInner body, Context context) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, body, context); + return this.client.<ElasticCapacityPoolInner, ElasticCapacityPoolInner>getLroResult(response, + ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, context); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticCapacityPoolInner> createOrUpdateAsync(String resourceGroupName, String accountName, + String poolName, ElasticCapacityPoolInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticCapacityPoolInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, body).getFinalResult(); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticCapacityPoolInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, body, context).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, String accountName, + String poolName, ElasticCapacityPoolUpdate body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolUpdate body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolUpdate body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + context); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ElasticCapacityPoolInner>, ElasticCapacityPoolInner> beginUpdateAsync( + String resourceGroupName, String accountName, String poolName, ElasticCapacityPoolUpdate body) { + Mono<Response<Flux<ByteBuffer>>> mono = updateWithResponseAsync(resourceGroupName, accountName, poolName, body); + return this.client.<ElasticCapacityPoolInner, ElasticCapacityPoolInner>getLroResult(mono, + this.client.getHttpPipeline(), ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, + this.client.getContext()); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticCapacityPoolInner>, ElasticCapacityPoolInner> + beginUpdate(String resourceGroupName, String accountName, String poolName, ElasticCapacityPoolUpdate body) { + Response<BinaryData> response = updateWithResponse(resourceGroupName, accountName, poolName, body); + return this.client.<ElasticCapacityPoolInner, ElasticCapacityPoolInner>getLroResult(response, + ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticCapacityPoolInner>, ElasticCapacityPoolInner> beginUpdate( + String resourceGroupName, String accountName, String poolName, ElasticCapacityPoolUpdate body, + Context context) { + Response<BinaryData> response = updateWithResponse(resourceGroupName, accountName, poolName, body, context); + return this.client.<ElasticCapacityPoolInner, ElasticCapacityPoolInner>getLroResult(response, + ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, context); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticCapacityPoolInner> updateAsync(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolUpdate body) { + return beginUpdateAsync(resourceGroupName, accountName, poolName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticCapacityPoolInner update(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolUpdate body) { + return beginUpdate(resourceGroupName, accountName, poolName, body).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body 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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticCapacityPoolInner update(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolUpdate body, Context context) { + return beginUpdate(resourceGroupName, accountName, poolName, body, context).getFinalResult(); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String accountName, + String poolName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, String poolName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, Context.NONE); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, String poolName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, context); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String accountName, + String poolName) { + Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, accountName, poolName); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, + String poolName) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, accountName, poolName); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + Context context) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, accountName, poolName, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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<Void> deleteAsync(String resourceGroupName, String accountName, String poolName) { + return beginDeleteAsync(resourceGroupName, accountName, poolName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String poolName) { + beginDelete(resourceGroupName, accountName, poolName).getFinalResult(); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String poolName, Context context) { + beginDelete(resourceGroupName, accountName, poolName, context).getFinalResult(); + } + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticCapacityPoolInner>> listByElasticAccountSinglePageAsync(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByElasticAccount(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) + .<PagedResponse<ElasticCapacityPoolInner>>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 and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<ElasticCapacityPoolInner> listByElasticAccountAsync(String resourceGroupName, + String accountName) { + return new PagedFlux<>(() -> listByElasticAccountSinglePageAsync(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePageAsync(nextLink)); + } + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticCapacityPoolInner> listByElasticAccountSinglePage(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticCapacityPoolListResult> res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticCapacityPoolInner> listByElasticAccountSinglePage(String resourceGroupName, + String accountName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticCapacityPoolListResult> res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticCapacityPoolInner> listByElasticAccount(String resourceGroupName, String accountName) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePage(nextLink)); + } + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticCapacityPoolInner> listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName, context), + nextLink -> listByElasticAccountNextSinglePage(nextLink, context)); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> changeZoneWithResponseAsync(String resourceGroupName, String accountName, + String poolName, ChangeZoneRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.changeZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> changeZoneWithResponse(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.changeZoneSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + Context.NONE); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> changeZoneWithResponse(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.changeZoneSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + context); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ElasticCapacityPoolInner>, ElasticCapacityPoolInner> + beginChangeZoneAsync(String resourceGroupName, String accountName, String poolName, ChangeZoneRequest body) { + Mono<Response<Flux<ByteBuffer>>> mono + = changeZoneWithResponseAsync(resourceGroupName, accountName, poolName, body); + return this.client.<ElasticCapacityPoolInner, ElasticCapacityPoolInner>getLroResult(mono, + this.client.getHttpPipeline(), ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, + this.client.getContext()); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticCapacityPoolInner>, ElasticCapacityPoolInner> + beginChangeZone(String resourceGroupName, String accountName, String poolName, ChangeZoneRequest body) { + Response<BinaryData> response = changeZoneWithResponse(resourceGroupName, accountName, poolName, body); + return this.client.<ElasticCapacityPoolInner, ElasticCapacityPoolInner>getLroResult(response, + ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, Context.NONE); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticCapacityPoolInner>, ElasticCapacityPoolInner> beginChangeZone( + String resourceGroupName, String accountName, String poolName, ChangeZoneRequest body, Context context) { + Response<BinaryData> response = changeZoneWithResponse(resourceGroupName, accountName, poolName, body, context); + return this.client.<ElasticCapacityPoolInner, ElasticCapacityPoolInner>getLroResult(response, + ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, context); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticCapacityPoolInner> changeZoneAsync(String resourceGroupName, String accountName, + String poolName, ChangeZoneRequest body) { + return beginChangeZoneAsync(resourceGroupName, accountName, poolName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticCapacityPoolInner changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body) { + return beginChangeZone(resourceGroupName, accountName, poolName, body).getFinalResult(); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticCapacityPoolInner changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body, Context context) { + return beginChangeZone(resourceGroupName, accountName, poolName, body, context).getFinalResult(); + } + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<CheckElasticResourceAvailabilityResponseInner>> + checkVolumeFilePathAvailabilityWithResponseAsync(String resourceGroupName, String accountName, String poolName, + CheckElasticVolumeFilePathAvailabilityRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.checkVolumeFilePathAvailability(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<CheckElasticResourceAvailabilityResponseInner> checkVolumeFilePathAvailabilityAsync( + String resourceGroupName, String accountName, String poolName, + CheckElasticVolumeFilePathAvailabilityRequest body) { + return checkVolumeFilePathAvailabilityWithResponseAsync(resourceGroupName, accountName, poolName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<CheckElasticResourceAvailabilityResponseInner> checkVolumeFilePathAvailabilityWithResponse( + String resourceGroupName, String accountName, String poolName, + CheckElasticVolumeFilePathAvailabilityRequest body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.checkVolumeFilePathAvailabilitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + context); + } + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckElasticResourceAvailabilityResponseInner checkVolumeFilePathAvailability(String resourceGroupName, + String accountName, String poolName, CheckElasticVolumeFilePathAvailabilityRequest body) { + return checkVolumeFilePathAvailabilityWithResponse(resourceGroupName, accountName, poolName, body, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticCapacityPoolInner>> listByElasticAccountNextSinglePageAsync(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.listByElasticAccountNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<ElasticCapacityPoolInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticCapacityPoolInner> listByElasticAccountNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticCapacityPoolListResult> res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticCapacityPoolInner> listByElasticAccountNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticCapacityPoolListResult> res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticCapacityPoolsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsImpl.java new file mode 100644 index 000000000000..91fab30fc31e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsImpl.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient; +import com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner; +import com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner; +import com.azure.resourcemanager.netapp.models.ChangeZoneRequest; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityResponse; +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPool; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPools; + +public final class ElasticCapacityPoolsImpl implements ElasticCapacityPools { + private static final ClientLogger LOGGER = new ClientLogger(ElasticCapacityPoolsImpl.class); + + private final ElasticCapacityPoolsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ElasticCapacityPoolsImpl(ElasticCapacityPoolsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response<ElasticCapacityPool> getWithResponse(String resourceGroupName, String accountName, String poolName, + Context context) { + Response<ElasticCapacityPoolInner> inner + = this.serviceClient().getWithResponse(resourceGroupName, accountName, poolName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticCapacityPoolImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ElasticCapacityPool get(String resourceGroupName, String accountName, String poolName) { + ElasticCapacityPoolInner inner = this.serviceClient().get(resourceGroupName, accountName, poolName); + if (inner != null) { + return new ElasticCapacityPoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String poolName) { + this.serviceClient().delete(resourceGroupName, accountName, poolName); + } + + public void delete(String resourceGroupName, String accountName, String poolName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, context); + } + + public PagedIterable<ElasticCapacityPool> listByElasticAccount(String resourceGroupName, String accountName) { + PagedIterable<ElasticCapacityPoolInner> inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticCapacityPoolImpl(inner1, this.manager())); + } + + public PagedIterable<ElasticCapacityPool> listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + PagedIterable<ElasticCapacityPoolInner> inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticCapacityPoolImpl(inner1, this.manager())); + } + + public ElasticCapacityPool changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body) { + ElasticCapacityPoolInner inner + = this.serviceClient().changeZone(resourceGroupName, accountName, poolName, body); + if (inner != null) { + return new ElasticCapacityPoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public ElasticCapacityPool changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body, Context context) { + ElasticCapacityPoolInner inner + = this.serviceClient().changeZone(resourceGroupName, accountName, poolName, body, context); + if (inner != null) { + return new ElasticCapacityPoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response<CheckElasticResourceAvailabilityResponse> checkVolumeFilePathAvailabilityWithResponse( + String resourceGroupName, String accountName, String poolName, + CheckElasticVolumeFilePathAvailabilityRequest body, Context context) { + Response<CheckElasticResourceAvailabilityResponseInner> inner = this.serviceClient() + .checkVolumeFilePathAvailabilityWithResponse(resourceGroupName, accountName, poolName, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CheckElasticResourceAvailabilityResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CheckElasticResourceAvailabilityResponse checkVolumeFilePathAvailability(String resourceGroupName, + String accountName, String poolName, CheckElasticVolumeFilePathAvailabilityRequest body) { + CheckElasticResourceAvailabilityResponseInner inner + = this.serviceClient().checkVolumeFilePathAvailability(resourceGroupName, accountName, poolName, body); + if (inner != null) { + return new CheckElasticResourceAvailabilityResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ElasticCapacityPool getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, Context.NONE).getValue(); + } + + public Response<ElasticCapacityPool> getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, context); + } + + private ElasticCapacityPoolsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticCapacityPoolImpl define(String name) { + return new ElasticCapacityPoolImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotImpl.java new file mode 100644 index 000000000000..7196cc3e5579 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotImpl.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner; +import com.azure.resourcemanager.netapp.models.ElasticSnapshot; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties; + +public final class ElasticSnapshotImpl implements ElasticSnapshot, ElasticSnapshot.Definition, ElasticSnapshot.Update { + private ElasticSnapshotInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ElasticSnapshotProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticSnapshotInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String poolName; + + private String volumeName; + + private String snapshotName; + + public ElasticSnapshotImpl withExistingElasticVolume(String resourceGroupName, String accountName, String poolName, + String volumeName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + this.poolName = poolName; + this.volumeName = volumeName; + return this; + } + + public ElasticSnapshot create() { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, this.innerModel(), + Context.NONE); + return this; + } + + public ElasticSnapshot create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, this.innerModel(), + context); + return this; + } + + ElasticSnapshotImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticSnapshotInner(); + this.serviceManager = serviceManager; + this.snapshotName = name; + } + + public ElasticSnapshotImpl update() { + return this; + } + + public ElasticSnapshot apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, this.innerModel(), + Context.NONE); + return this; + } + + public ElasticSnapshot apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, this.innerModel(), + context); + return this; + } + + ElasticSnapshotImpl(ElasticSnapshotInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticCapacityPools"); + this.volumeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticVolumes"); + this.snapshotName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticSnapshots"); + } + + public ElasticSnapshot refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, Context.NONE) + .getValue(); + return this; + } + + public ElasticSnapshot refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, context) + .getValue(); + return this; + } + + public ElasticSnapshotImpl withProperties(ElasticSnapshotProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesClientImpl.java new file mode 100644 index 000000000000..e98b44912b66 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesClientImpl.java @@ -0,0 +1,1635 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyListResult; +import com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyVolumeList; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdate; +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 ElasticSnapshotPoliciesClient. + */ +public final class ElasticSnapshotPoliciesClientImpl implements ElasticSnapshotPoliciesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticSnapshotPoliciesService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticSnapshotPoliciesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticSnapshotPoliciesClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(ElasticSnapshotPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticSnapshotPolicies to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticSnapshotPolicies") + public interface ElasticSnapshotPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticSnapshotPolicyInner>> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticSnapshotPolicyInner> getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticSnapshotPolicyInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticSnapshotPolicyInner body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticSnapshotPolicyUpdate body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticSnapshotPolicyUpdate body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticSnapshotPolicyListResult>> listByElasticAccount(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticSnapshotPolicyListResult> listByElasticAccountSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}/elasticvolumes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticSnapshotPolicyVolumeList>> listElasticVolumes(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}/elasticvolumes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticSnapshotPolicyVolumeList> listElasticVolumesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticSnapshotPolicyListResult>> listByElasticAccountNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticSnapshotPolicyListResult> listByElasticAccountNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticSnapshotPolicyVolumeList>> listElasticVolumesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticSnapshotPolicyVolumeList> listElasticVolumesNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshotPolicy along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<ElasticSnapshotPolicyInner>> getWithResponseAsync(String resourceGroupName, + String accountName, String snapshotPolicyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshotPolicy on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticSnapshotPolicyInner> getAsync(String resourceGroupName, String accountName, + String snapshotPolicyName) { + return getWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshotPolicy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<ElasticSnapshotPolicyInner> getWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, snapshotPolicyName, accept, context); + } + + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshotPolicy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotPolicyInner get(String resourceGroupName, String accountName, String snapshotPolicyName) { + return getWithResponse(resourceGroupName, accountName, snapshotPolicyName, Context.NONE).getValue(); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String snapshotPolicyName, ElasticSnapshotPolicyInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, contentType, accept, + body, Context.NONE); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, contentType, accept, + body, context); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ElasticSnapshotPolicyInner>, ElasticSnapshotPolicyInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String snapshotPolicyName, ElasticSnapshotPolicyInner body) { + Mono<Response<Flux<ByteBuffer>>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName, body); + return this.client.<ElasticSnapshotPolicyInner, ElasticSnapshotPolicyInner>getLroResult(mono, + this.client.getHttpPipeline(), ElasticSnapshotPolicyInner.class, ElasticSnapshotPolicyInner.class, + this.client.getContext()); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticSnapshotPolicyInner>, ElasticSnapshotPolicyInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String snapshotPolicyName, ElasticSnapshotPolicyInner body) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, accountName, snapshotPolicyName, body); + return this.client.<ElasticSnapshotPolicyInner, ElasticSnapshotPolicyInner>getLroResult(response, + ElasticSnapshotPolicyInner.class, ElasticSnapshotPolicyInner.class, Context.NONE); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticSnapshotPolicyInner>, ElasticSnapshotPolicyInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String snapshotPolicyName, ElasticSnapshotPolicyInner body, + Context context) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, accountName, snapshotPolicyName, body, context); + return this.client.<ElasticSnapshotPolicyInner, ElasticSnapshotPolicyInner>getLroResult(response, + ElasticSnapshotPolicyInner.class, ElasticSnapshotPolicyInner.class, context); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticSnapshotPolicyInner> createOrUpdateAsync(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, snapshotPolicyName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotPolicyInner createOrUpdate(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, snapshotPolicyName, body).getFinalResult(); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotPolicyInner createOrUpdate(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, snapshotPolicyName, body, context).getFinalResult(); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyUpdate body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyUpdate body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, contentType, accept, + body, Context.NONE); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyUpdate body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, contentType, accept, + body, context); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ElasticSnapshotPolicyInner>, ElasticSnapshotPolicyInner> beginUpdateAsync( + String resourceGroupName, String accountName, String snapshotPolicyName, ElasticSnapshotPolicyUpdate body) { + Mono<Response<Flux<ByteBuffer>>> mono + = updateWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName, body); + return this.client.<ElasticSnapshotPolicyInner, ElasticSnapshotPolicyInner>getLroResult(mono, + this.client.getHttpPipeline(), ElasticSnapshotPolicyInner.class, ElasticSnapshotPolicyInner.class, + this.client.getContext()); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticSnapshotPolicyInner>, ElasticSnapshotPolicyInner> beginUpdate( + String resourceGroupName, String accountName, String snapshotPolicyName, ElasticSnapshotPolicyUpdate body) { + Response<BinaryData> response = updateWithResponse(resourceGroupName, accountName, snapshotPolicyName, body); + return this.client.<ElasticSnapshotPolicyInner, ElasticSnapshotPolicyInner>getLroResult(response, + ElasticSnapshotPolicyInner.class, ElasticSnapshotPolicyInner.class, Context.NONE); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticSnapshotPolicyInner>, ElasticSnapshotPolicyInner> beginUpdate( + String resourceGroupName, String accountName, String snapshotPolicyName, ElasticSnapshotPolicyUpdate body, + Context context) { + Response<BinaryData> response + = updateWithResponse(resourceGroupName, accountName, snapshotPolicyName, body, context); + return this.client.<ElasticSnapshotPolicyInner, ElasticSnapshotPolicyInner>getLroResult(response, + ElasticSnapshotPolicyInner.class, ElasticSnapshotPolicyInner.class, context); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticSnapshotPolicyInner> updateAsync(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyUpdate body) { + return beginUpdateAsync(resourceGroupName, accountName, snapshotPolicyName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotPolicyInner update(String resourceGroupName, String accountName, String snapshotPolicyName, + ElasticSnapshotPolicyUpdate body) { + return beginUpdate(resourceGroupName, accountName, snapshotPolicyName, body).getFinalResult(); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body 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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotPolicyInner update(String resourceGroupName, String accountName, String snapshotPolicyName, + ElasticSnapshotPolicyUpdate body, Context context) { + return beginUpdate(resourceGroupName, accountName, snapshotPolicyName, body, context).getFinalResult(); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String accountName, + String snapshotPolicyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, Context.NONE); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, context); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String accountName, + String snapshotPolicyName) { + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, + String snapshotPolicyName) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, accountName, snapshotPolicyName); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, accountName, snapshotPolicyName, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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<Void> deleteAsync(String resourceGroupName, String accountName, String snapshotPolicyName) { + return beginDeleteAsync(resourceGroupName, accountName, snapshotPolicyName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String snapshotPolicyName) { + beginDelete(resourceGroupName, accountName, snapshotPolicyName).getFinalResult(); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String snapshotPolicyName, Context context) { + beginDelete(resourceGroupName, accountName, snapshotPolicyName, context).getFinalResult(); + } + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticSnapshotPolicyInner>> + listByElasticAccountSinglePageAsync(String resourceGroupName, String accountName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByElasticAccount(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) + .<PagedResponse<ElasticSnapshotPolicyInner>>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 ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<ElasticSnapshotPolicyInner> listByElasticAccountAsync(String resourceGroupName, + String accountName) { + return new PagedFlux<>(() -> listByElasticAccountSinglePageAsync(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePageAsync(nextLink)); + } + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticSnapshotPolicyInner> listByElasticAccountSinglePage(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticSnapshotPolicyListResult> res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticSnapshotPolicyInner> listByElasticAccountSinglePage(String resourceGroupName, + String accountName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticSnapshotPolicyListResult> res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticSnapshotPolicyInner> listByElasticAccount(String resourceGroupName, + String accountName) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePage(nextLink)); + } + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticSnapshotPolicyInner> listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName, context), + nextLink -> listByElasticAccountNextSinglePage(nextLink, context)); + } + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticVolumeInner>> listElasticVolumesSinglePageAsync(String resourceGroupName, + String accountName, String snapshotPolicyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listElasticVolumes(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, accept, context)) + .<PagedResponse<ElasticVolumeInner>>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 elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<ElasticVolumeInner> listElasticVolumesAsync(String resourceGroupName, String accountName, + String snapshotPolicyName) { + return new PagedFlux<>( + () -> listElasticVolumesSinglePageAsync(resourceGroupName, accountName, snapshotPolicyName), + nextLink -> listElasticVolumesNextSinglePageAsync(nextLink)); + } + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticVolumeInner> listElasticVolumesSinglePage(String resourceGroupName, String accountName, + String snapshotPolicyName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticSnapshotPolicyVolumeList> res = service.listElasticVolumesSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, + snapshotPolicyName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticVolumeInner> listElasticVolumesSinglePage(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticSnapshotPolicyVolumeList> res + = service.listElasticVolumesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticVolumeInner> listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName) { + return new PagedIterable<>( + () -> listElasticVolumesSinglePage(resourceGroupName, accountName, snapshotPolicyName), + nextLink -> listElasticVolumesNextSinglePage(nextLink)); + } + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticVolumeInner> listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + return new PagedIterable<>( + () -> listElasticVolumesSinglePage(resourceGroupName, accountName, snapshotPolicyName, context), + nextLink -> listElasticVolumesNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticSnapshotPolicyInner>> listByElasticAccountNextSinglePageAsync(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.listByElasticAccountNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<ElasticSnapshotPolicyInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticSnapshotPolicyInner> listByElasticAccountNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticSnapshotPolicyListResult> res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticSnapshotPolicyInner> listByElasticAccountNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticSnapshotPolicyListResult> res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticVolumeInner>> listElasticVolumesNextSinglePageAsync(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.listElasticVolumesNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<ElasticVolumeInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticVolumeInner> listElasticVolumesNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticSnapshotPolicyVolumeList> res + = service.listElasticVolumesNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticVolumeInner> listElasticVolumesNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticSnapshotPolicyVolumeList> res + = service.listElasticVolumesNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotPoliciesClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesImpl.java new file mode 100644 index 000000000000..8aebc4de4f59 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesImpl.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicies; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicy; +import com.azure.resourcemanager.netapp.models.ElasticVolume; + +public final class ElasticSnapshotPoliciesImpl implements ElasticSnapshotPolicies { + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotPoliciesImpl.class); + + private final ElasticSnapshotPoliciesClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ElasticSnapshotPoliciesImpl(ElasticSnapshotPoliciesClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response<ElasticSnapshotPolicy> getWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + Response<ElasticSnapshotPolicyInner> inner + = this.serviceClient().getWithResponse(resourceGroupName, accountName, snapshotPolicyName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticSnapshotPolicyImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ElasticSnapshotPolicy get(String resourceGroupName, String accountName, String snapshotPolicyName) { + ElasticSnapshotPolicyInner inner = this.serviceClient().get(resourceGroupName, accountName, snapshotPolicyName); + if (inner != null) { + return new ElasticSnapshotPolicyImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String snapshotPolicyName) { + this.serviceClient().delete(resourceGroupName, accountName, snapshotPolicyName); + } + + public void delete(String resourceGroupName, String accountName, String snapshotPolicyName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, snapshotPolicyName, context); + } + + public PagedIterable<ElasticSnapshotPolicy> listByElasticAccount(String resourceGroupName, String accountName) { + PagedIterable<ElasticSnapshotPolicyInner> inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticSnapshotPolicyImpl(inner1, this.manager())); + } + + public PagedIterable<ElasticSnapshotPolicy> listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + PagedIterable<ElasticSnapshotPolicyInner> inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticSnapshotPolicyImpl(inner1, this.manager())); + } + + public PagedIterable<ElasticVolume> listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName) { + PagedIterable<ElasticVolumeInner> inner + = this.serviceClient().listElasticVolumes(resourceGroupName, accountName, snapshotPolicyName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticVolumeImpl(inner1, this.manager())); + } + + public PagedIterable<ElasticVolume> listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + PagedIterable<ElasticVolumeInner> inner + = this.serviceClient().listElasticVolumes(resourceGroupName, accountName, snapshotPolicyName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticVolumeImpl(inner1, this.manager())); + } + + public ElasticSnapshotPolicy getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String snapshotPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshotPolicies"); + if (snapshotPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshotPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, snapshotPolicyName, Context.NONE).getValue(); + } + + public Response<ElasticSnapshotPolicy> getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String snapshotPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshotPolicies"); + if (snapshotPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshotPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, snapshotPolicyName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String snapshotPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshotPolicies"); + if (snapshotPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshotPolicies'.", id))); + } + this.delete(resourceGroupName, accountName, snapshotPolicyName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String snapshotPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshotPolicies"); + if (snapshotPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshotPolicies'.", id))); + } + this.delete(resourceGroupName, accountName, snapshotPolicyName, context); + } + + private ElasticSnapshotPoliciesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticSnapshotPolicyImpl define(String name) { + return new ElasticSnapshotPolicyImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPolicyImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPolicyImpl.java new file mode 100644 index 000000000000..c0f1db8361fd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPolicyImpl.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicy; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdate; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdateProperties; +import java.util.Collections; +import java.util.Map; + +public final class ElasticSnapshotPolicyImpl + implements ElasticSnapshotPolicy, ElasticSnapshotPolicy.Definition, ElasticSnapshotPolicy.Update { + private ElasticSnapshotPolicyInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map<String, String> tags() { + Map<String, String> inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ElasticSnapshotPolicyProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticSnapshotPolicyInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String snapshotPolicyName; + + private ElasticSnapshotPolicyUpdate updateBody; + + public ElasticSnapshotPolicyImpl withExistingElasticAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + public ElasticSnapshotPolicy create() { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshotPolicies() + .createOrUpdate(resourceGroupName, accountName, snapshotPolicyName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticSnapshotPolicy create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshotPolicies() + .createOrUpdate(resourceGroupName, accountName, snapshotPolicyName, this.innerModel(), context); + return this; + } + + ElasticSnapshotPolicyImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticSnapshotPolicyInner(); + this.serviceManager = serviceManager; + this.snapshotPolicyName = name; + } + + public ElasticSnapshotPolicyImpl update() { + this.updateBody = new ElasticSnapshotPolicyUpdate(); + return this; + } + + public ElasticSnapshotPolicy apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshotPolicies() + .update(resourceGroupName, accountName, snapshotPolicyName, updateBody, Context.NONE); + return this; + } + + public ElasticSnapshotPolicy apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshotPolicies() + .update(resourceGroupName, accountName, snapshotPolicyName, updateBody, context); + return this; + } + + ElasticSnapshotPolicyImpl(ElasticSnapshotPolicyInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.snapshotPolicyName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticSnapshotPolicies"); + } + + public ElasticSnapshotPolicy refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshotPolicies() + .getWithResponse(resourceGroupName, accountName, snapshotPolicyName, Context.NONE) + .getValue(); + return this; + } + + public ElasticSnapshotPolicy refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshotPolicies() + .getWithResponse(resourceGroupName, accountName, snapshotPolicyName, context) + .getValue(); + return this; + } + + public ElasticSnapshotPolicyImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ElasticSnapshotPolicyImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ElasticSnapshotPolicyImpl withTags(Map<String, String> tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ElasticSnapshotPolicyImpl withProperties(ElasticSnapshotPolicyProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ElasticSnapshotPolicyImpl withProperties(ElasticSnapshotPolicyUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsClientImpl.java new file mode 100644 index 000000000000..95ea6dc5374f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsClientImpl.java @@ -0,0 +1,1188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotListResult; +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 ElasticSnapshotsClient. + */ +public final class ElasticSnapshotsClientImpl implements ElasticSnapshotsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticSnapshotsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticSnapshotsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticSnapshotsClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(ElasticSnapshotsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticSnapshots to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticSnapshots") + public interface ElasticSnapshotsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticSnapshotInner>> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticSnapshotInner> getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticSnapshotInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticSnapshotInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticSnapshotListResult>> listByElasticVolume(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticSnapshotListResult> listByElasticVolumeSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticSnapshotListResult>> listByElasticVolumeNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticSnapshotListResult> listByElasticVolumeNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<ElasticSnapshotInner>> getWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String snapshotName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticSnapshotInner> getAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName) { + return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<ElasticSnapshotInner> getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, snapshotName, accept, context); + } + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotInner get(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName) { + return getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, Context.NONE) + .getValue(); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body 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 netApp Elastic Snapshot under an Elastic Volume along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, String snapshotName, ElasticSnapshotInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body 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 netApp Elastic Snapshot under an Elastic Volume along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String snapshotName, ElasticSnapshotInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + contentType, accept, body, Context.NONE); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body 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 netApp Elastic Snapshot under an Elastic Volume along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String snapshotName, ElasticSnapshotInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + contentType, accept, body, context); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body 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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ElasticSnapshotInner>, ElasticSnapshotInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, + ElasticSnapshotInner body) { + Mono<Response<Flux<ByteBuffer>>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body); + return this.client.<ElasticSnapshotInner, ElasticSnapshotInner>getLroResult(mono, this.client.getHttpPipeline(), + ElasticSnapshotInner.class, ElasticSnapshotInner.class, this.client.getContext()); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body 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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticSnapshotInner>, ElasticSnapshotInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, + ElasticSnapshotInner body) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, body); + return this.client.<ElasticSnapshotInner, ElasticSnapshotInner>getLroResult(response, + ElasticSnapshotInner.class, ElasticSnapshotInner.class, Context.NONE); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body 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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticSnapshotInner>, ElasticSnapshotInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, + ElasticSnapshotInner body, Context context) { + Response<BinaryData> response = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, volumeName, + snapshotName, body, context); + return this.client.<ElasticSnapshotInner, ElasticSnapshotInner>getLroResult(response, + ElasticSnapshotInner.class, ElasticSnapshotInner.class, context); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body 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 netApp Elastic Snapshot under an Elastic Volume on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticSnapshotInner> createOrUpdateAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String snapshotName, ElasticSnapshotInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body 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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, ElasticSnapshotInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, body) + .getFinalResult(); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body 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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, ElasticSnapshotInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, body, context) + .getFinalResult(); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String snapshotName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + Context.NONE); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + context); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String snapshotName) { + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName) { + Response<BinaryData> response + = deleteWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context) { + Response<BinaryData> response + = deleteWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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<Void> deleteAsync(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName) { + return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName) { + beginDelete(resourceGroupName, accountName, poolName, volumeName, snapshotName).getFinalResult(); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName, Context context) { + beginDelete(resourceGroupName, accountName, poolName, volumeName, snapshotName, context).getFinalResult(); + } + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticSnapshotInner>> listByElasticVolumeSinglePageAsync(String resourceGroupName, + String accountName, String poolName, String volumeName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByElasticVolume(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, accept, context)) + .<PagedResponse<ElasticSnapshotInner>>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 ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<ElasticSnapshotInner> listByElasticVolumeAsync(String resourceGroupName, String accountName, + String poolName, String volumeName) { + return new PagedFlux<>( + () -> listByElasticVolumeSinglePageAsync(resourceGroupName, accountName, poolName, volumeName), + nextLink -> listByElasticVolumeNextSinglePageAsync(nextLink)); + } + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticSnapshotInner> listByElasticVolumeSinglePage(String resourceGroupName, + String accountName, String poolName, String volumeName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticSnapshotListResult> res = service.listByElasticVolumeSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, + volumeName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticSnapshotInner> listByElasticVolumeSinglePage(String resourceGroupName, + String accountName, String poolName, String volumeName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticSnapshotListResult> res + = service.listByElasticVolumeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticSnapshotInner> listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName) { + return new PagedIterable<>( + () -> listByElasticVolumeSinglePage(resourceGroupName, accountName, poolName, volumeName), + nextLink -> listByElasticVolumeNextSinglePage(nextLink)); + } + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticSnapshotInner> listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context) { + return new PagedIterable<>( + () -> listByElasticVolumeSinglePage(resourceGroupName, accountName, poolName, volumeName, context), + nextLink -> listByElasticVolumeNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticSnapshotInner>> listByElasticVolumeNextSinglePageAsync(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.listByElasticVolumeNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<ElasticSnapshotInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticSnapshotInner> listByElasticVolumeNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticSnapshotListResult> res + = service.listByElasticVolumeNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticSnapshotInner> listByElasticVolumeNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticSnapshotListResult> res + = service.listByElasticVolumeNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsImpl.java new file mode 100644 index 000000000000..929600185eee --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsImpl.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner; +import com.azure.resourcemanager.netapp.models.ElasticSnapshot; +import com.azure.resourcemanager.netapp.models.ElasticSnapshots; + +public final class ElasticSnapshotsImpl implements ElasticSnapshots { + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotsImpl.class); + + private final ElasticSnapshotsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ElasticSnapshotsImpl(ElasticSnapshotsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response<ElasticSnapshot> getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context) { + Response<ElasticSnapshotInner> inner = this.serviceClient() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticSnapshotImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ElasticSnapshot get(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName) { + ElasticSnapshotInner inner + = this.serviceClient().get(resourceGroupName, accountName, poolName, volumeName, snapshotName); + if (inner != null) { + return new ElasticSnapshotImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, snapshotName); + } + + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); + } + + public PagedIterable<ElasticSnapshot> listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName) { + PagedIterable<ElasticSnapshotInner> inner + = this.serviceClient().listByElasticVolume(resourceGroupName, accountName, poolName, volumeName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticSnapshotImpl(inner1, this.manager())); + } + + public PagedIterable<ElasticSnapshot> listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context) { + PagedIterable<ElasticSnapshotInner> inner + = this.serviceClient().listByElasticVolume(resourceGroupName, accountName, poolName, volumeName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticSnapshotImpl(inner1, this.manager())); + } + + public ElasticSnapshot getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshots'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, Context.NONE) + .getValue(); + } + + public Response<ElasticSnapshot> getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshots'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshots'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, volumeName, snapshotName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshots'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); + } + + private ElasticSnapshotsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticSnapshotImpl define(String name) { + return new ElasticSnapshotImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumeImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumeImpl.java new file mode 100644 index 000000000000..adb207a1a222 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumeImpl.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumeProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdate; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class ElasticVolumeImpl implements ElasticVolume, ElasticVolume.Definition, ElasticVolume.Update { + private ElasticVolumeInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map<String, String> tags() { + Map<String, String> inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ElasticVolumeProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public List<String> zones() { + List<String> inner = this.innerModel().zones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticVolumeInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String poolName; + + private String volumeName; + + private ElasticVolumeUpdate updateBody; + + public ElasticVolumeImpl withExistingElasticCapacityPool(String resourceGroupName, String accountName, + String poolName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + this.poolName = poolName; + return this; + } + + public ElasticVolume create() { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticVolume create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, this.innerModel(), context); + return this; + } + + ElasticVolumeImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticVolumeInner(); + this.serviceManager = serviceManager; + this.volumeName = name; + } + + public ElasticVolumeImpl update() { + this.updateBody = new ElasticVolumeUpdate(); + return this; + } + + public ElasticVolume apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .update(resourceGroupName, accountName, poolName, volumeName, updateBody, Context.NONE); + return this; + } + + public ElasticVolume apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .update(resourceGroupName, accountName, poolName, volumeName, updateBody, context); + return this; + } + + ElasticVolumeImpl(ElasticVolumeInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticCapacityPools"); + this.volumeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticVolumes"); + } + + public ElasticVolume refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, Context.NONE) + .getValue(); + return this; + } + + public ElasticVolume refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, context) + .getValue(); + return this; + } + + public ElasticVolume revert(ElasticVolumeRevert body) { + return serviceManager.elasticVolumes().revert(resourceGroupName, accountName, poolName, volumeName, body); + } + + public ElasticVolume revert(ElasticVolumeRevert body, Context context) { + return serviceManager.elasticVolumes() + .revert(resourceGroupName, accountName, poolName, volumeName, body, context); + } + + public ElasticVolumeImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ElasticVolumeImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ElasticVolumeImpl withTags(Map<String, String> tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ElasticVolumeImpl withProperties(ElasticVolumeProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ElasticVolumeImpl withZones(List<String> zones) { + this.innerModel().withZones(zones); + return this; + } + + public ElasticVolumeImpl withProperties(ElasticVolumeUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesClientImpl.java new file mode 100644 index 000000000000..8048fb06e895 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesClientImpl.java @@ -0,0 +1,1710 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticVolumeListResult; +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdate; +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 ElasticVolumesClient. + */ +public final class ElasticVolumesClientImpl implements ElasticVolumesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticVolumesService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticVolumesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticVolumesClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(ElasticVolumesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticVolumes to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticVolumes") + public interface ElasticVolumesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticVolumeInner>> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticVolumeInner> getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticVolumeInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticVolumeInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticVolumeUpdate body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticVolumeUpdate body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticVolumeListResult>> listByElasticPool(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticVolumeListResult> listByElasticPoolSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/revert") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> revert(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticVolumeRevert body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/revert") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> revertSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticVolumeRevert body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ElasticVolumeListResult>> listByElasticPoolNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<ElasticVolumeListResult> listByElasticPoolNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the details of the specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<ElasticVolumeInner>> getWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String volumeName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the details of the specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticVolumeInner> getAsync(String resourceGroupName, String accountName, String poolName, + String volumeName) { + return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the details of the specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<ElasticVolumeInner> getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, accept, context); + } + + /** + * Get the details of the specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticVolumeInner get(String resourceGroupName, String accountName, String poolName, String volumeName) { + return getWithResponse(resourceGroupName, accountName, poolName, volumeName, Context.NONE).getValue(); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, ElasticVolumeInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, accept, + body, Context.NONE); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, ElasticVolumeInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, accept, + body, context); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ElasticVolumeInner>, ElasticVolumeInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, ElasticVolumeInner body) { + Mono<Response<Flux<ByteBuffer>>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + return this.client.<ElasticVolumeInner, ElasticVolumeInner>getLroResult(mono, this.client.getHttpPipeline(), + ElasticVolumeInner.class, ElasticVolumeInner.class, this.client.getContext()); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticVolumeInner>, ElasticVolumeInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeInner body) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, volumeName, body); + return this.client.<ElasticVolumeInner, ElasticVolumeInner>getLroResult(response, ElasticVolumeInner.class, + ElasticVolumeInner.class, Context.NONE); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticVolumeInner>, ElasticVolumeInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeInner body, Context context) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, volumeName, body, context); + return this.client.<ElasticVolumeInner, ElasticVolumeInner>getLroResult(response, ElasticVolumeInner.class, + ElasticVolumeInner.class, context); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticVolumeInner> createOrUpdateAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, volumeName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticVolumeInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, volumeName, body).getFinalResult(); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticVolumeInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, volumeName, body, context) + .getFinalResult(); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, ElasticVolumeUpdate body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeUpdate body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, accept, + body, Context.NONE); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeUpdate body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, accept, + body, context); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ElasticVolumeInner>, ElasticVolumeInner> beginUpdateAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeUpdate body) { + Mono<Response<Flux<ByteBuffer>>> mono + = updateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + return this.client.<ElasticVolumeInner, ElasticVolumeInner>getLroResult(mono, this.client.getHttpPipeline(), + ElasticVolumeInner.class, ElasticVolumeInner.class, this.client.getContext()); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticVolumeInner>, ElasticVolumeInner> beginUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeUpdate body) { + Response<BinaryData> response = updateWithResponse(resourceGroupName, accountName, poolName, volumeName, body); + return this.client.<ElasticVolumeInner, ElasticVolumeInner>getLroResult(response, ElasticVolumeInner.class, + ElasticVolumeInner.class, Context.NONE); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticVolumeInner>, ElasticVolumeInner> beginUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeUpdate body, Context context) { + Response<BinaryData> response + = updateWithResponse(resourceGroupName, accountName, poolName, volumeName, body, context); + return this.client.<ElasticVolumeInner, ElasticVolumeInner>getLroResult(response, ElasticVolumeInner.class, + ElasticVolumeInner.class, context); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticVolumeInner> updateAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeUpdate body) { + return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticVolumeInner update(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeUpdate body) { + return beginUpdate(resourceGroupName, accountName, poolName, volumeName, body).getFinalResult(); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body 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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticVolumeInner update(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeUpdate body, Context context) { + return beginUpdate(resourceGroupName, accountName, poolName, volumeName, body, context).getFinalResult(); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String volumeName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, Context.NONE); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, context); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String accountName, + String poolName, String volumeName) { + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String volumeName) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, accountName, poolName, volumeName); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + Response<BinaryData> response + = deleteWithResponse(resourceGroupName, accountName, poolName, volumeName, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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<Void> deleteAsync(String resourceGroupName, String accountName, String poolName, String volumeName) { + return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName) { + beginDelete(resourceGroupName, accountName, poolName, volumeName).getFinalResult(); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + Context context) { + beginDelete(resourceGroupName, accountName, poolName, volumeName, context).getFinalResult(); + } + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticVolumeInner>> listByElasticPoolSinglePageAsync(String resourceGroupName, + String accountName, String poolName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByElasticPool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, accept, context)) + .<PagedResponse<ElasticVolumeInner>>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 Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<ElasticVolumeInner> listByElasticPoolAsync(String resourceGroupName, String accountName, + String poolName) { + return new PagedFlux<>(() -> listByElasticPoolSinglePageAsync(resourceGroupName, accountName, poolName), + nextLink -> listByElasticPoolNextSinglePageAsync(nextLink)); + } + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticVolumeInner> listByElasticPoolSinglePage(String resourceGroupName, String accountName, + String poolName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticVolumeListResult> res + = service.listByElasticPoolSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticVolumeInner> listByElasticPoolSinglePage(String resourceGroupName, String accountName, + String poolName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticVolumeListResult> res + = service.listByElasticPoolSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticVolumeInner> listByElasticPool(String resourceGroupName, String accountName, + String poolName) { + return new PagedIterable<>(() -> listByElasticPoolSinglePage(resourceGroupName, accountName, poolName), + nextLink -> listByElasticPoolNextSinglePage(nextLink)); + } + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ElasticVolumeInner> listByElasticPool(String resourceGroupName, String accountName, + String poolName, Context context) { + return new PagedIterable<>(() -> listByElasticPoolSinglePage(resourceGroupName, accountName, poolName, context), + nextLink -> listByElasticPoolNextSinglePage(nextLink, context)); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> revertWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, ElasticVolumeRevert body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.revert(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> revertWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeRevert body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.revertSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, accept, + body, Context.NONE); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> revertWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeRevert body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.revertSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, accept, + body, context); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ElasticVolumeInner>, ElasticVolumeInner> beginRevertAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeRevert body) { + Mono<Response<Flux<ByteBuffer>>> mono + = revertWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + return this.client.<ElasticVolumeInner, ElasticVolumeInner>getLroResult(mono, this.client.getHttpPipeline(), + ElasticVolumeInner.class, ElasticVolumeInner.class, this.client.getContext()); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticVolumeInner>, ElasticVolumeInner> beginRevert(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeRevert body) { + Response<BinaryData> response = revertWithResponse(resourceGroupName, accountName, poolName, volumeName, body); + return this.client.<ElasticVolumeInner, ElasticVolumeInner>getLroResult(response, ElasticVolumeInner.class, + ElasticVolumeInner.class, Context.NONE); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ElasticVolumeInner>, ElasticVolumeInner> beginRevert(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeRevert body, Context context) { + Response<BinaryData> response + = revertWithResponse(resourceGroupName, accountName, poolName, volumeName, body, context); + return this.client.<ElasticVolumeInner, ElasticVolumeInner>getLroResult(response, ElasticVolumeInner.class, + ElasticVolumeInner.class, context); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ElasticVolumeInner> revertAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeRevert body) { + return beginRevertAsync(resourceGroupName, accountName, poolName, volumeName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticVolumeInner revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert body) { + return beginRevert(resourceGroupName, accountName, poolName, volumeName, body).getFinalResult(); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticVolumeInner revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert body, Context context) { + return beginRevert(resourceGroupName, accountName, poolName, volumeName, body, context).getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ElasticVolumeInner>> listByElasticPoolNextSinglePageAsync(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.listByElasticPoolNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<ElasticVolumeInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticVolumeInner> listByElasticPoolNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticVolumeListResult> res + = service.listByElasticPoolNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<ElasticVolumeInner> listByElasticPoolNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<ElasticVolumeListResult> res + = service.listByElasticPoolNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticVolumesClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesImpl.java new file mode 100644 index 000000000000..a5855c089a92 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesImpl.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; +import com.azure.resourcemanager.netapp.models.ElasticVolumes; + +public final class ElasticVolumesImpl implements ElasticVolumes { + private static final ClientLogger LOGGER = new ClientLogger(ElasticVolumesImpl.class); + + private final ElasticVolumesClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ElasticVolumesImpl(ElasticVolumesClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response<ElasticVolume> getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + Response<ElasticVolumeInner> inner + = this.serviceClient().getWithResponse(resourceGroupName, accountName, poolName, volumeName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticVolumeImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ElasticVolume get(String resourceGroupName, String accountName, String poolName, String volumeName) { + ElasticVolumeInner inner = this.serviceClient().get(resourceGroupName, accountName, poolName, volumeName); + if (inner != null) { + return new ElasticVolumeImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName); + } + + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + Context context) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, context); + } + + public PagedIterable<ElasticVolume> listByElasticPool(String resourceGroupName, String accountName, + String poolName) { + PagedIterable<ElasticVolumeInner> inner + = this.serviceClient().listByElasticPool(resourceGroupName, accountName, poolName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticVolumeImpl(inner1, this.manager())); + } + + public PagedIterable<ElasticVolume> listByElasticPool(String resourceGroupName, String accountName, String poolName, + Context context) { + PagedIterable<ElasticVolumeInner> inner + = this.serviceClient().listByElasticPool(resourceGroupName, accountName, poolName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticVolumeImpl(inner1, this.manager())); + } + + public ElasticVolume revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert body) { + ElasticVolumeInner inner + = this.serviceClient().revert(resourceGroupName, accountName, poolName, volumeName, body); + if (inner != null) { + return new ElasticVolumeImpl(inner, this.manager()); + } else { + return null; + } + } + + public ElasticVolume revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert body, Context context) { + ElasticVolumeInner inner + = this.serviceClient().revert(resourceGroupName, accountName, poolName, volumeName, body, context); + if (inner != null) { + return new ElasticVolumeImpl(inner, this.manager()); + } else { + return null; + } + } + + public ElasticVolume getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, Context.NONE).getValue(); + } + + public Response<ElasticVolume> getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, volumeName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, volumeName, context); + } + + private ElasticVolumesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticVolumeImpl define(String name) { + return new ElasticVolumeImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ListQuotaReportResponseImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ListQuotaReportResponseImpl.java new file mode 100644 index 000000000000..dfec70b37650 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ListQuotaReportResponseImpl.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner; +import com.azure.resourcemanager.netapp.models.ListQuotaReportResponse; +import com.azure.resourcemanager.netapp.models.QuotaReport; +import java.util.Collections; +import java.util.List; + +public final class ListQuotaReportResponseImpl implements ListQuotaReportResponse { + private ListQuotaReportResponseInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + ListQuotaReportResponseImpl(ListQuotaReportResponseInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List<QuotaReport> value() { + List<QuotaReport> inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ListQuotaReportResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java index f7fdcc5c73b5..5ca6c7b905aa 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java @@ -13,6 +13,7 @@ import com.azure.resourcemanager.netapp.models.ChangeKeyVault; import com.azure.resourcemanager.netapp.models.EncryptionTransitionRequest; import com.azure.resourcemanager.netapp.models.GetKeyVaultStatusResponse; +import com.azure.resourcemanager.netapp.models.LdapConfiguration; import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; import com.azure.resourcemanager.netapp.models.MultiAdStatus; import com.azure.resourcemanager.netapp.models.NetAppAccount; @@ -92,6 +93,10 @@ public MultiAdStatus multiAdStatus() { return this.innerModel().multiAdStatus(); } + public LdapConfiguration ldapConfiguration() { + return this.innerModel().ldapConfiguration(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -277,6 +282,16 @@ public NetAppAccountImpl withNfsV4IdDomain(String nfsV4IdDomain) { } } + public NetAppAccountImpl withLdapConfiguration(LdapConfiguration ldapConfiguration) { + if (isInCreateMode()) { + this.innerModel().withLdapConfiguration(ldapConfiguration); + return this; + } else { + this.updateBody.withLdapConfiguration(ldapConfiguration); + return this; + } + } + private boolean isInCreateMode() { return this.innerModel() == null || this.innerModel().id() == null; } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java index 6909c6e312f0..c5ddd2d691c0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java @@ -27,12 +27,23 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.netapp.fluent.AccountsClient; +import com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient; import com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient; import com.azure.resourcemanager.netapp.fluent.BackupVaultsClient; import com.azure.resourcemanager.netapp.fluent.BackupsClient; import com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient; import com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient; import com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient; +import com.azure.resourcemanager.netapp.fluent.BucketsClient; +import com.azure.resourcemanager.netapp.fluent.CachesClient; +import com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient; +import com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient; +import com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient; +import com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient; +import com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient; import com.azure.resourcemanager.netapp.fluent.NetAppManagementClient; import com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient; import com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient; @@ -41,6 +52,7 @@ import com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient; import com.azure.resourcemanager.netapp.fluent.OperationsClient; import com.azure.resourcemanager.netapp.fluent.PoolsClient; +import com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient; import com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient; import com.azure.resourcemanager.netapp.fluent.SnapshotsClient; import com.azure.resourcemanager.netapp.fluent.SubvolumesClient; @@ -271,6 +283,20 @@ public VolumeQuotaRulesClient getVolumeQuotaRules() { return this.volumeQuotaRules; } + /** + * The RansomwareReportsClient object to access its operations. + */ + private final RansomwareReportsClient ransomwareReports; + + /** + * Gets the RansomwareReportsClient object to access its operations. + * + * @return the RansomwareReportsClient object. + */ + public RansomwareReportsClient getRansomwareReports() { + return this.ransomwareReports; + } + /** * The BackupVaultsClient object to access its operations. */ @@ -285,6 +311,160 @@ public BackupVaultsClient getBackupVaults() { return this.backupVaults; } + /** + * The BucketsClient object to access its operations. + */ + private final BucketsClient buckets; + + /** + * Gets the BucketsClient object to access its operations. + * + * @return the BucketsClient object. + */ + public BucketsClient getBuckets() { + return this.buckets; + } + + /** + * The CachesClient object to access its operations. + */ + private final CachesClient caches; + + /** + * Gets the CachesClient object to access its operations. + * + * @return the CachesClient object. + */ + public CachesClient getCaches() { + return this.caches; + } + + /** + * The ElasticAccountsClient object to access its operations. + */ + private final ElasticAccountsClient elasticAccounts; + + /** + * Gets the ElasticAccountsClient object to access its operations. + * + * @return the ElasticAccountsClient object. + */ + public ElasticAccountsClient getElasticAccounts() { + return this.elasticAccounts; + } + + /** + * The ElasticCapacityPoolsClient object to access its operations. + */ + private final ElasticCapacityPoolsClient elasticCapacityPools; + + /** + * Gets the ElasticCapacityPoolsClient object to access its operations. + * + * @return the ElasticCapacityPoolsClient object. + */ + public ElasticCapacityPoolsClient getElasticCapacityPools() { + return this.elasticCapacityPools; + } + + /** + * The ElasticVolumesClient object to access its operations. + */ + private final ElasticVolumesClient elasticVolumes; + + /** + * Gets the ElasticVolumesClient object to access its operations. + * + * @return the ElasticVolumesClient object. + */ + public ElasticVolumesClient getElasticVolumes() { + return this.elasticVolumes; + } + + /** + * The ElasticSnapshotsClient object to access its operations. + */ + private final ElasticSnapshotsClient elasticSnapshots; + + /** + * Gets the ElasticSnapshotsClient object to access its operations. + * + * @return the ElasticSnapshotsClient object. + */ + public ElasticSnapshotsClient getElasticSnapshots() { + return this.elasticSnapshots; + } + + /** + * The ElasticSnapshotPoliciesClient object to access its operations. + */ + private final ElasticSnapshotPoliciesClient elasticSnapshotPolicies; + + /** + * Gets the ElasticSnapshotPoliciesClient object to access its operations. + * + * @return the ElasticSnapshotPoliciesClient object. + */ + public ElasticSnapshotPoliciesClient getElasticSnapshotPolicies() { + return this.elasticSnapshotPolicies; + } + + /** + * The ElasticBackupVaultsClient object to access its operations. + */ + private final ElasticBackupVaultsClient elasticBackupVaults; + + /** + * Gets the ElasticBackupVaultsClient object to access its operations. + * + * @return the ElasticBackupVaultsClient object. + */ + public ElasticBackupVaultsClient getElasticBackupVaults() { + return this.elasticBackupVaults; + } + + /** + * The ElasticBackupPoliciesClient object to access its operations. + */ + private final ElasticBackupPoliciesClient elasticBackupPolicies; + + /** + * Gets the ElasticBackupPoliciesClient object to access its operations. + * + * @return the ElasticBackupPoliciesClient object. + */ + public ElasticBackupPoliciesClient getElasticBackupPolicies() { + return this.elasticBackupPolicies; + } + + /** + * The ElasticBackupsClient object to access its operations. + */ + private final ElasticBackupsClient elasticBackups; + + /** + * Gets the ElasticBackupsClient object to access its operations. + * + * @return the ElasticBackupsClient object. + */ + public ElasticBackupsClient getElasticBackups() { + return this.elasticBackups; + } + + /** + * The ActiveDirectoryConfigsClient object to access its operations. + */ + private final ActiveDirectoryConfigsClient activeDirectoryConfigs; + + /** + * Gets the ActiveDirectoryConfigsClient object to access its operations. + * + * @return the ActiveDirectoryConfigsClient object. + */ + public ActiveDirectoryConfigsClient getActiveDirectoryConfigs() { + return this.activeDirectoryConfigs; + } + /** * The NetAppResourceQuotaLimitsClient object to access its operations. */ @@ -442,7 +622,7 @@ public NetAppResourceUsagesClient getNetAppResourceUsages() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2025-09-01"; + this.apiVersion = "2025-09-01-preview"; this.operations = new OperationsClientImpl(this); this.netAppResourceQuotaLimitsAccounts = new NetAppResourceQuotaLimitsAccountsClientImpl(this); this.volumeGroups = new VolumeGroupsClientImpl(this); @@ -452,7 +632,19 @@ public NetAppResourceUsagesClient getNetAppResourceUsages() { this.snapshotPolicies = new SnapshotPoliciesClientImpl(this); this.backupPolicies = new BackupPoliciesClientImpl(this); this.volumeQuotaRules = new VolumeQuotaRulesClientImpl(this); + this.ransomwareReports = new RansomwareReportsClientImpl(this); this.backupVaults = new BackupVaultsClientImpl(this); + this.buckets = new BucketsClientImpl(this); + this.caches = new CachesClientImpl(this); + this.elasticAccounts = new ElasticAccountsClientImpl(this); + this.elasticCapacityPools = new ElasticCapacityPoolsClientImpl(this); + this.elasticVolumes = new ElasticVolumesClientImpl(this); + this.elasticSnapshots = new ElasticSnapshotsClientImpl(this); + this.elasticSnapshotPolicies = new ElasticSnapshotPoliciesClientImpl(this); + this.elasticBackupVaults = new ElasticBackupVaultsClientImpl(this); + this.elasticBackupPolicies = new ElasticBackupPoliciesClientImpl(this); + this.elasticBackups = new ElasticBackupsClientImpl(this); + this.activeDirectoryConfigs = new ActiveDirectoryConfigsClientImpl(this); this.netAppResourceQuotaLimits = new NetAppResourceQuotaLimitsClientImpl(this); this.netAppResourceRegionInfos = new NetAppResourceRegionInfosClientImpl(this); this.accounts = new AccountsClientImpl(this); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PeeringPassphrasesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PeeringPassphrasesImpl.java new file mode 100644 index 000000000000..6f0d08beadc3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PeeringPassphrasesImpl.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner; +import com.azure.resourcemanager.netapp.models.PeeringPassphrases; + +public final class PeeringPassphrasesImpl implements PeeringPassphrases { + private PeeringPassphrasesInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + PeeringPassphrasesImpl(PeeringPassphrasesInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String clusterPeeringCommand() { + return this.innerModel().clusterPeeringCommand(); + } + + public String clusterPeeringPassphrase() { + return this.innerModel().clusterPeeringPassphrase(); + } + + public String vserverPeeringCommand() { + return this.innerModel().vserverPeeringCommand(); + } + + public PeeringPassphrasesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportImpl.java new file mode 100644 index 000000000000..5e5c83e0c07d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.netapp.fluent.models.RansomwareReportInner; +import com.azure.resourcemanager.netapp.models.RansomwareReport; +import com.azure.resourcemanager.netapp.models.RansomwareReportProperties; + +public final class RansomwareReportImpl implements RansomwareReport { + private RansomwareReportInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + RansomwareReportImpl(RansomwareReportInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager 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 RansomwareReportProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public RansomwareReportInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsClientImpl.java new file mode 100644 index 000000000000..9c5b670bb2d5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsClientImpl.java @@ -0,0 +1,975 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient; +import com.azure.resourcemanager.netapp.fluent.models.RansomwareReportInner; +import com.azure.resourcemanager.netapp.implementation.models.RansomwareReportsList; +import com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest; +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 RansomwareReportsClient. + */ +public final class RansomwareReportsClientImpl implements RansomwareReportsClient { + /** + * The proxy service used to perform REST calls. + */ + private final RansomwareReportsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of RansomwareReportsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RansomwareReportsClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(RansomwareReportsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientRansomwareReports to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientRansomwareReports") + public interface RansomwareReportsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<RansomwareReportInner>> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("ransomwareReportName") String ransomwareReportName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<RansomwareReportInner> getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("ransomwareReportName") String ransomwareReportName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<RansomwareReportsList>> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<RansomwareReportsList> listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName}/clearSuspects") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> clearSuspects(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("ransomwareReportName") String ransomwareReportName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RansomwareSuspectsClearRequest body, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName}/clearSuspects") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> clearSuspectsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("ransomwareReportName") String ransomwareReportName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RansomwareSuspectsClearRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<RansomwareReportsList>> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<RansomwareReportsList> listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<RansomwareReportInner>> getWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String ransomwareReportName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (ransomwareReportName == null) { + return Mono + .error(new IllegalArgumentException("Parameter ransomwareReportName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, + ransomwareReportName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<RansomwareReportInner> getAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, String ransomwareReportName) { + return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<RansomwareReportInner> getWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String ransomwareReportName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (ransomwareReportName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ransomwareReportName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, accept, context); + } + + /** + * Get details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RansomwareReportInner get(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName) { + return getWithResponse(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, Context.NONE) + .getValue(); + } + + /** + * List all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Advanced Ransomware Protection (ARP) reports along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<RansomwareReportInner>> listSinglePageAsync(String resourceGroupName, String accountName, + String poolName, String volumeName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, accept, context)) + .<PagedResponse<RansomwareReportInner>>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 ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Advanced Ransomware Protection (ARP) reports as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<RansomwareReportInner> listAsync(String resourceGroupName, String accountName, String poolName, + String volumeName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, poolName, volumeName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Advanced Ransomware Protection (ARP) reports along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<RansomwareReportInner> listSinglePage(String resourceGroupName, String accountName, + String poolName, String volumeName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<RansomwareReportsList> res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Advanced Ransomware Protection (ARP) reports along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<RansomwareReportInner> listSinglePage(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<RansomwareReportsList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Advanced Ransomware Protection (ARP) reports as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<RansomwareReportInner> list(String resourceGroupName, String accountName, String poolName, + String volumeName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, poolName, volumeName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Advanced Ransomware Protection (ARP) reports as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<RansomwareReportInner> list(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, poolName, volumeName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<Response<Flux<ByteBuffer>>> clearSuspectsWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, String ransomwareReportName, + RansomwareSuspectsClearRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (ransomwareReportName == null) { + return Mono + .error(new IllegalArgumentException("Parameter ransomwareReportName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.clearSuspects(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, + ransomwareReportName, contentType, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> clearSuspectsWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String ransomwareReportName, RansomwareSuspectsClearRequest body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (ransomwareReportName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ransomwareReportName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + return service.clearSuspectsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, + contentType, body, Context.NONE); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> clearSuspectsWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String ransomwareReportName, RansomwareSuspectsClearRequest body, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (ransomwareReportName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ransomwareReportName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + return service.clearSuspectsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, + contentType, body, context); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<PollResult<Void>, Void> beginClearSuspectsAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String ransomwareReportName, RansomwareSuspectsClearRequest body) { + Mono<Response<Flux<ByteBuffer>>> mono = clearSuspectsWithResponseAsync(resourceGroupName, accountName, poolName, + volumeName, ransomwareReportName, body); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginClearSuspects(String resourceGroupName, String accountName, + String poolName, String volumeName, String ransomwareReportName, RansomwareSuspectsClearRequest body) { + Response<BinaryData> response = clearSuspectsWithResponse(resourceGroupName, accountName, poolName, volumeName, + ransomwareReportName, body); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginClearSuspects(String resourceGroupName, String accountName, + String poolName, String volumeName, String ransomwareReportName, RansomwareSuspectsClearRequest body, + Context context) { + Response<BinaryData> response = clearSuspectsWithResponse(resourceGroupName, accountName, poolName, volumeName, + ransomwareReportName, body, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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<Void> clearSuspectsAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, String ransomwareReportName, RansomwareSuspectsClearRequest body) { + return beginClearSuspectsAsync(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 clearSuspects(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName, RansomwareSuspectsClearRequest body) { + beginClearSuspects(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, body) + .getFinalResult(); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void clearSuspects(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName, RansomwareSuspectsClearRequest body, Context context) { + beginClearSuspects(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, body, context) + .getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Advanced Ransomware Protection (ARP) reports along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<RansomwareReportInner>> 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)) + .<PagedResponse<RansomwareReportInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Advanced Ransomware Protection (ARP) reports along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<RansomwareReportInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<RansomwareReportsList> res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Advanced Ransomware Protection (ARP) reports along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<RansomwareReportInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<RansomwareReportsList> res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(RansomwareReportsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsImpl.java new file mode 100644 index 000000000000..92ebe0dd5eaa --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsImpl.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient; +import com.azure.resourcemanager.netapp.fluent.models.RansomwareReportInner; +import com.azure.resourcemanager.netapp.models.RansomwareReport; +import com.azure.resourcemanager.netapp.models.RansomwareReports; +import com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest; + +public final class RansomwareReportsImpl implements RansomwareReports { + private static final ClientLogger LOGGER = new ClientLogger(RansomwareReportsImpl.class); + + private final RansomwareReportsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public RansomwareReportsImpl(RansomwareReportsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response<RansomwareReport> getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String ransomwareReportName, Context context) { + Response<RansomwareReportInner> inner = this.serviceClient() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RansomwareReportImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RansomwareReport get(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName) { + RansomwareReportInner inner + = this.serviceClient().get(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName); + if (inner != null) { + return new RansomwareReportImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable<RansomwareReport> list(String resourceGroupName, String accountName, String poolName, + String volumeName) { + PagedIterable<RansomwareReportInner> inner + = this.serviceClient().list(resourceGroupName, accountName, poolName, volumeName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RansomwareReportImpl(inner1, this.manager())); + } + + public PagedIterable<RansomwareReport> list(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + PagedIterable<RansomwareReportInner> inner + = this.serviceClient().list(resourceGroupName, accountName, poolName, volumeName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RansomwareReportImpl(inner1, this.manager())); + } + + public void clearSuspects(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName, RansomwareSuspectsClearRequest body) { + this.serviceClient() + .clearSuspects(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, body); + } + + public void clearSuspects(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName, RansomwareSuspectsClearRequest body, Context context) { + this.serviceClient() + .clearSuspects(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, body, context); + } + + private RansomwareReportsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java index cd87b76e397e..83544d99b6b9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java @@ -14,6 +14,7 @@ import com.azure.resourcemanager.netapp.models.AvsDataStore; import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; +import com.azure.resourcemanager.netapp.models.BreakthroughMode; import com.azure.resourcemanager.netapp.models.ClusterPeerCommandResponse; import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; import com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy; @@ -22,6 +23,9 @@ import com.azure.resourcemanager.netapp.models.FileAccessLogs; import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserResponse; +import com.azure.resourcemanager.netapp.models.LargeVolumeType; +import com.azure.resourcemanager.netapp.models.LdapServerType; +import com.azure.resourcemanager.netapp.models.ListQuotaReportResponse; import com.azure.resourcemanager.netapp.models.ListReplicationsRequest; import com.azure.resourcemanager.netapp.models.MountTargetProperties; import com.azure.resourcemanager.netapp.models.NetworkFeatures; @@ -37,6 +41,7 @@ import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; import com.azure.resourcemanager.netapp.models.SvmPeerCommandResponse; import com.azure.resourcemanager.netapp.models.Volume; +import com.azure.resourcemanager.netapp.models.VolumeLanguage; import com.azure.resourcemanager.netapp.models.VolumePatch; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; @@ -237,6 +242,10 @@ public Boolean ldapEnabled() { return this.innerModel().ldapEnabled(); } + public LdapServerType ldapServerType() { + return this.innerModel().ldapServerType(); + } + public Boolean coolAccess() { return this.innerModel().coolAccess(); } @@ -339,6 +348,10 @@ public Boolean isLargeVolume() { return this.innerModel().isLargeVolume(); } + public LargeVolumeType largeVolumeType() { + return this.innerModel().largeVolumeType(); + } + public String originatingResourceId() { return this.innerModel().originatingResourceId(); } @@ -347,6 +360,14 @@ public Long inheritedSizeInBytes() { return this.innerModel().inheritedSizeInBytes(); } + public VolumeLanguage language() { + return this.innerModel().language(); + } + + public BreakthroughMode breakthroughMode() { + return this.innerModel().breakthroughMode(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -629,6 +650,14 @@ public void revertRelocation(Context context) { serviceManager.volumes().revertRelocation(resourceGroupName, accountName, poolName, volumeName, context); } + public ListQuotaReportResponse listQuotaReport() { + return serviceManager.volumes().listQuotaReport(resourceGroupName, accountName, poolName, volumeName); + } + + public ListQuotaReportResponse listQuotaReport(Context context) { + return serviceManager.volumes().listQuotaReport(resourceGroupName, accountName, poolName, volumeName, context); + } + public VolumeImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -806,6 +835,11 @@ public VolumeImpl withLdapEnabled(Boolean ldapEnabled) { return this; } + public VolumeImpl withLdapServerType(LdapServerType ldapServerType) { + this.innerModel().withLdapServerType(ldapServerType); + return this; + } + public VolumeImpl withCoolAccess(Boolean coolAccess) { if (isInCreateMode()) { this.innerModel().withCoolAccess(coolAccess); @@ -921,6 +955,21 @@ public VolumeImpl withIsLargeVolume(Boolean isLargeVolume) { return this; } + public VolumeImpl withLargeVolumeType(LargeVolumeType largeVolumeType) { + this.innerModel().withLargeVolumeType(largeVolumeType); + return this; + } + + public VolumeImpl withLanguage(VolumeLanguage language) { + this.innerModel().withLanguage(language); + return this; + } + + public VolumeImpl withBreakthroughMode(BreakthroughMode breakthroughMode) { + this.innerModel().withBreakthroughMode(breakthroughMode); + return this; + } + public VolumeImpl withUsageThreshold(Long usageThreshold) { this.updateBody.withUsageThreshold(usageThreshold); return this; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java index 9f074cc577b9..45c4d5e3b3be 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java @@ -38,6 +38,7 @@ import com.azure.resourcemanager.netapp.fluent.VolumesClient; import com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner; import com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner; +import com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; import com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner; @@ -622,6 +623,26 @@ Response<BinaryData> revertRelocationSync(@HostParam("endpoint") String endpoint @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/listQuotaReport") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> listQuotaReport(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/listQuotaReport") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> listQuotaReportSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -7727,6 +7748,264 @@ public void revertRelocation(String resourceGroupName, String accountName, Strin beginRevertRelocation(resourceGroupName, accountName, poolName, volumeName, context).getFinalResult(); } + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> listQuotaReportWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listQuotaReport(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> listQuotaReportWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.listQuotaReportSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, accept, + Context.NONE); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> listQuotaReportWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.listQuotaReportSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, accept, context); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<PollResult<ListQuotaReportResponseInner>, ListQuotaReportResponseInner> + beginListQuotaReportAsync(String resourceGroupName, String accountName, String poolName, String volumeName) { + Mono<Response<Flux<ByteBuffer>>> mono + = listQuotaReportWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); + return this.client.<ListQuotaReportResponseInner, ListQuotaReportResponseInner>getLroResult(mono, + this.client.getHttpPipeline(), ListQuotaReportResponseInner.class, ListQuotaReportResponseInner.class, + this.client.getContext()); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<ListQuotaReportResponseInner>, ListQuotaReportResponseInner> + beginListQuotaReport(String resourceGroupName, String accountName, String poolName, String volumeName) { + Response<BinaryData> response + = listQuotaReportWithResponse(resourceGroupName, accountName, poolName, volumeName); + return this.client.<ListQuotaReportResponseInner, ListQuotaReportResponseInner>getLroResult(response, + ListQuotaReportResponseInner.class, ListQuotaReportResponseInner.class, Context.NONE); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<ListQuotaReportResponseInner>, ListQuotaReportResponseInner> beginListQuotaReport( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + Response<BinaryData> response + = listQuotaReportWithResponse(resourceGroupName, accountName, poolName, volumeName, context); + return this.client.<ListQuotaReportResponseInner, ListQuotaReportResponseInner>getLroResult(response, + ListQuotaReportResponseInner.class, ListQuotaReportResponseInner.class, context); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ListQuotaReportResponseInner> listQuotaReportAsync(String resourceGroupName, String accountName, + String poolName, String volumeName) { + return beginListQuotaReportAsync(resourceGroupName, accountName, poolName, volumeName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 ListQuotaReportResponseInner listQuotaReport(String resourceGroupName, String accountName, String poolName, + String volumeName) { + return beginListQuotaReport(resourceGroupName, accountName, poolName, volumeName).getFinalResult(); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 ListQuotaReportResponseInner listQuotaReport(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + return beginListQuotaReport(resourceGroupName, accountName, poolName, volumeName, context).getFinalResult(); + } + /** * Get the next page of items. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java index 809bc2ce91da..d734bbab8754 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.netapp.fluent.VolumesClient; import com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner; import com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner; +import com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; import com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner; @@ -22,6 +23,7 @@ import com.azure.resourcemanager.netapp.models.ClusterPeerCommandResponse; import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserResponse; +import com.azure.resourcemanager.netapp.models.ListQuotaReportResponse; import com.azure.resourcemanager.netapp.models.ListReplicationsRequest; import com.azure.resourcemanager.netapp.models.PeerClusterForVolumeMigrationRequest; import com.azure.resourcemanager.netapp.models.PoolChangeRequest; @@ -376,6 +378,28 @@ public void revertRelocation(String resourceGroupName, String accountName, Strin this.serviceClient().revertRelocation(resourceGroupName, accountName, poolName, volumeName, context); } + public ListQuotaReportResponse listQuotaReport(String resourceGroupName, String accountName, String poolName, + String volumeName) { + ListQuotaReportResponseInner inner + = this.serviceClient().listQuotaReport(resourceGroupName, accountName, poolName, volumeName); + if (inner != null) { + return new ListQuotaReportResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ListQuotaReportResponse listQuotaReport(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + ListQuotaReportResponseInner inner + = this.serviceClient().listQuotaReport(resourceGroupName, accountName, poolName, volumeName, context); + if (inner != null) { + return new ListQuotaReportResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public Volume getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ActiveDirectoryConfigListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ActiveDirectoryConfigListResult.java new file mode 100644 index 000000000000..c4156bf746f6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ActiveDirectoryConfigListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ActiveDirectoryConfig list operation. + */ +@Immutable +public final class ActiveDirectoryConfigListResult implements JsonSerializable<ActiveDirectoryConfigListResult> { + /* + * The ActiveDirectoryConfig items on this page + */ + private List<ActiveDirectoryConfigInner> value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ActiveDirectoryConfigListResult class. + */ + private ActiveDirectoryConfigListResult() { + } + + /** + * Get the value property: The ActiveDirectoryConfig items on this page. + * + * @return the value value. + */ + public List<ActiveDirectoryConfigInner> value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ActiveDirectoryConfigListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryConfigListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActiveDirectoryConfigListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActiveDirectoryConfigListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ActiveDirectoryConfigListResult. + */ + public static ActiveDirectoryConfigListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActiveDirectoryConfigListResult deserializedActiveDirectoryConfigListResult + = new ActiveDirectoryConfigListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<ActiveDirectoryConfigInner> value + = reader.readArray(reader1 -> ActiveDirectoryConfigInner.fromJson(reader1)); + deserializedActiveDirectoryConfigListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedActiveDirectoryConfigListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedActiveDirectoryConfigListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/BucketList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/BucketList.java new file mode 100644 index 000000000000..0271ea3a03ef --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/BucketList.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.BucketInner; +import java.io.IOException; +import java.util.List; + +/** + * List of volume bucket resources. + */ +@Immutable +public final class BucketList implements JsonSerializable<BucketList> { + /* + * The Bucket items on this page + */ + private List<BucketInner> value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of BucketList class. + */ + private BucketList() { + } + + /** + * Get the value property: The Bucket items on this page. + * + * @return the value value. + */ + public List<BucketInner> value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model BucketList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BucketList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BucketList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketList if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BucketList. + */ + public static BucketList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketList deserializedBucketList = new BucketList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<BucketInner> value = reader.readArray(reader1 -> BucketInner.fromJson(reader1)); + deserializedBucketList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedBucketList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketList; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/CacheList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/CacheList.java new file mode 100644 index 000000000000..1486f5308c9b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/CacheList.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.CacheInner; +import java.io.IOException; +import java.util.List; + +/** + * List of Cache resources. + */ +@Immutable +public final class CacheList implements JsonSerializable<CacheList> { + /* + * The Cache items on this page + */ + private List<CacheInner> value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of CacheList class. + */ + private CacheList() { + } + + /** + * Get the value property: The Cache items on this page. + * + * @return the value value. + */ + public List<CacheInner> value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model CacheList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CacheList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CacheList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CacheList if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CacheList. + */ + public static CacheList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CacheList deserializedCacheList = new CacheList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<CacheInner> value = reader.readArray(reader1 -> CacheInner.fromJson(reader1)); + deserializedCacheList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedCacheList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCacheList; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticAccountListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticAccountListResult.java new file mode 100644 index 000000000000..39dc1ba7e341 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticAccountListResult.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticAccount list operation. + */ +@Immutable +public final class ElasticAccountListResult implements JsonSerializable<ElasticAccountListResult> { + /* + * The ElasticAccount items on this page + */ + private List<ElasticAccountInner> value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticAccountListResult class. + */ + private ElasticAccountListResult() { + } + + /** + * Get the value property: The ElasticAccount items on this page. + * + * @return the value value. + */ + public List<ElasticAccountInner> value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ElasticAccountListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticAccountListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticAccountListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticAccountListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticAccountListResult. + */ + public static ElasticAccountListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticAccountListResult deserializedElasticAccountListResult = new ElasticAccountListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<ElasticAccountInner> value + = reader.readArray(reader1 -> ElasticAccountInner.fromJson(reader1)); + deserializedElasticAccountListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticAccountListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticAccountListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupListResult.java new file mode 100644 index 000000000000..0667488f7b95 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupListResult.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticBackup list operation. + */ +@Immutable +public final class ElasticBackupListResult implements JsonSerializable<ElasticBackupListResult> { + /* + * The ElasticBackup items on this page + */ + private List<ElasticBackupInner> value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticBackupListResult class. + */ + private ElasticBackupListResult() { + } + + /** + * Get the value property: The ElasticBackup items on this page. + * + * @return the value value. + */ + public List<ElasticBackupInner> value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ElasticBackupListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupListResult. + */ + public static ElasticBackupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupListResult deserializedElasticBackupListResult = new ElasticBackupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<ElasticBackupInner> value = reader.readArray(reader1 -> ElasticBackupInner.fromJson(reader1)); + deserializedElasticBackupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticBackupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupPolicyListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupPolicyListResult.java new file mode 100644 index 000000000000..aaaed85dae68 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupPolicyListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticBackupPolicy list operation. + */ +@Immutable +public final class ElasticBackupPolicyListResult implements JsonSerializable<ElasticBackupPolicyListResult> { + /* + * The ElasticBackupPolicy items on this page + */ + private List<ElasticBackupPolicyInner> value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticBackupPolicyListResult class. + */ + private ElasticBackupPolicyListResult() { + } + + /** + * Get the value property: The ElasticBackupPolicy items on this page. + * + * @return the value value. + */ + public List<ElasticBackupPolicyInner> value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ElasticBackupPolicyListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupPolicyListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupPolicyListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupPolicyListResult. + */ + public static ElasticBackupPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupPolicyListResult deserializedElasticBackupPolicyListResult + = new ElasticBackupPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<ElasticBackupPolicyInner> value + = reader.readArray(reader1 -> ElasticBackupPolicyInner.fromJson(reader1)); + deserializedElasticBackupPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticBackupPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupPolicyListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupVaultListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupVaultListResult.java new file mode 100644 index 000000000000..a81d1b7f1925 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupVaultListResult.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticBackupVault list operation. + */ +@Immutable +public final class ElasticBackupVaultListResult implements JsonSerializable<ElasticBackupVaultListResult> { + /* + * The ElasticBackupVault items on this page + */ + private List<ElasticBackupVaultInner> value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticBackupVaultListResult class. + */ + private ElasticBackupVaultListResult() { + } + + /** + * Get the value property: The ElasticBackupVault items on this page. + * + * @return the value value. + */ + public List<ElasticBackupVaultInner> value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ElasticBackupVaultListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupVaultListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupVaultListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupVaultListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupVaultListResult. + */ + public static ElasticBackupVaultListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupVaultListResult deserializedElasticBackupVaultListResult = new ElasticBackupVaultListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<ElasticBackupVaultInner> value + = reader.readArray(reader1 -> ElasticBackupVaultInner.fromJson(reader1)); + deserializedElasticBackupVaultListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticBackupVaultListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupVaultListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticCapacityPoolListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticCapacityPoolListResult.java new file mode 100644 index 000000000000..9eccce4ead03 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticCapacityPoolListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticCapacityPool list operation. + */ +@Immutable +public final class ElasticCapacityPoolListResult implements JsonSerializable<ElasticCapacityPoolListResult> { + /* + * The ElasticCapacityPool items on this page + */ + private List<ElasticCapacityPoolInner> value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticCapacityPoolListResult class. + */ + private ElasticCapacityPoolListResult() { + } + + /** + * Get the value property: The ElasticCapacityPool items on this page. + * + * @return the value value. + */ + public List<ElasticCapacityPoolInner> value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ElasticCapacityPoolListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticCapacityPoolListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticCapacityPoolListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticCapacityPoolListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticCapacityPoolListResult. + */ + public static ElasticCapacityPoolListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticCapacityPoolListResult deserializedElasticCapacityPoolListResult + = new ElasticCapacityPoolListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<ElasticCapacityPoolInner> value + = reader.readArray(reader1 -> ElasticCapacityPoolInner.fromJson(reader1)); + deserializedElasticCapacityPoolListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticCapacityPoolListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticCapacityPoolListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotListResult.java new file mode 100644 index 000000000000..c8fbd65c6204 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotListResult.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticSnapshot list operation. + */ +@Immutable +public final class ElasticSnapshotListResult implements JsonSerializable<ElasticSnapshotListResult> { + /* + * The ElasticSnapshot items on this page + */ + private List<ElasticSnapshotInner> value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticSnapshotListResult class. + */ + private ElasticSnapshotListResult() { + } + + /** + * Get the value property: The ElasticSnapshot items on this page. + * + * @return the value value. + */ + public List<ElasticSnapshotInner> value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model ElasticSnapshotListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticSnapshotListResult. + */ + public static ElasticSnapshotListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotListResult deserializedElasticSnapshotListResult = new ElasticSnapshotListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<ElasticSnapshotInner> value + = reader.readArray(reader1 -> ElasticSnapshotInner.fromJson(reader1)); + deserializedElasticSnapshotListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticSnapshotListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyListResult.java new file mode 100644 index 000000000000..b67a4f4bcf8c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticSnapshotPolicy list operation. + */ +@Immutable +public final class ElasticSnapshotPolicyListResult implements JsonSerializable<ElasticSnapshotPolicyListResult> { + /* + * The ElasticSnapshotPolicy items on this page + */ + private List<ElasticSnapshotPolicyInner> value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticSnapshotPolicyListResult class. + */ + private ElasticSnapshotPolicyListResult() { + } + + /** + * Get the value property: The ElasticSnapshotPolicy items on this page. + * + * @return the value value. + */ + public List<ElasticSnapshotPolicyInner> value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ElasticSnapshotPolicyListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotPolicyListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyListResult. + */ + public static ElasticSnapshotPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyListResult deserializedElasticSnapshotPolicyListResult + = new ElasticSnapshotPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<ElasticSnapshotPolicyInner> value + = reader.readArray(reader1 -> ElasticSnapshotPolicyInner.fromJson(reader1)); + deserializedElasticSnapshotPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticSnapshotPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyVolumeList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyVolumeList.java new file mode 100644 index 000000000000..e14266cfa95e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyVolumeList.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import java.io.IOException; +import java.util.List; + +/** + * Elastic Volumes associated with Elastic Snapshot Policy. + */ +@Immutable +public final class ElasticSnapshotPolicyVolumeList implements JsonSerializable<ElasticSnapshotPolicyVolumeList> { + /* + * The ElasticVolume items on this page + */ + private List<ElasticVolumeInner> value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticSnapshotPolicyVolumeList class. + */ + private ElasticSnapshotPolicyVolumeList() { + } + + /** + * Get the value property: The ElasticVolume items on this page. + * + * @return the value value. + */ + public List<ElasticVolumeInner> value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ElasticSnapshotPolicyVolumeList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotPolicyVolumeList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyVolumeList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyVolumeList if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyVolumeList. + */ + public static ElasticSnapshotPolicyVolumeList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyVolumeList deserializedElasticSnapshotPolicyVolumeList + = new ElasticSnapshotPolicyVolumeList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<ElasticVolumeInner> value = reader.readArray(reader1 -> ElasticVolumeInner.fromJson(reader1)); + deserializedElasticSnapshotPolicyVolumeList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticSnapshotPolicyVolumeList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyVolumeList; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticVolumeListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticVolumeListResult.java new file mode 100644 index 000000000000..9ef3accbd8b3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticVolumeListResult.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticVolume list operation. + */ +@Immutable +public final class ElasticVolumeListResult implements JsonSerializable<ElasticVolumeListResult> { + /* + * The ElasticVolume items on this page + */ + private List<ElasticVolumeInner> value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticVolumeListResult class. + */ + private ElasticVolumeListResult() { + } + + /** + * Get the value property: The ElasticVolume items on this page. + * + * @return the value value. + */ + public List<ElasticVolumeInner> value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ElasticVolumeListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticVolumeListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticVolumeListResult. + */ + public static ElasticVolumeListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeListResult deserializedElasticVolumeListResult = new ElasticVolumeListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<ElasticVolumeInner> value = reader.readArray(reader1 -> ElasticVolumeInner.fromJson(reader1)); + deserializedElasticVolumeListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticVolumeListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/RansomwareReportsList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/RansomwareReportsList.java new file mode 100644 index 000000000000..6f2ab778375b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/RansomwareReportsList.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.RansomwareReportInner; +import java.io.IOException; +import java.util.List; + +/** + * List of Advanced Ransomware Protection (ARP) reports. + */ +@Immutable +public final class RansomwareReportsList implements JsonSerializable<RansomwareReportsList> { + /* + * The RansomwareReport items on this page + */ + private List<RansomwareReportInner> value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of RansomwareReportsList class. + */ + private RansomwareReportsList() { + } + + /** + * Get the value property: The RansomwareReport items on this page. + * + * @return the value value. + */ + public List<RansomwareReportInner> value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model RansomwareReportsList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RansomwareReportsList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RansomwareReportsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RansomwareReportsList if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RansomwareReportsList. + */ + public static RansomwareReportsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RansomwareReportsList deserializedRansomwareReportsList = new RansomwareReportsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<RansomwareReportInner> value + = reader.readArray(reader1 -> RansomwareReportInner.fromJson(reader1)); + deserializedRansomwareReportsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRansomwareReportsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRansomwareReportsList; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfig.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfig.java new file mode 100644 index 000000000000..f791224f4e96 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfig.java @@ -0,0 +1,309 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner; +import java.util.Map; + +/** + * An immutable client-side representation of ActiveDirectoryConfig. + */ +public interface ActiveDirectoryConfig { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map<String, String> tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ActiveDirectoryConfigProperties properties(); + + /** + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner object. + * + * @return the inner object. + */ + ActiveDirectoryConfigInner innerModel(); + + /** + * The entirety of the ActiveDirectoryConfig definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The ActiveDirectoryConfig definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ActiveDirectoryConfig definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ActiveDirectoryConfig definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the ActiveDirectoryConfig definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the ActiveDirectoryConfig definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithIdentity { + /** + * Executes the create request. + * + * @return the created resource. + */ + ActiveDirectoryConfig create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ActiveDirectoryConfig create(Context context); + } + + /** + * The stage of the ActiveDirectoryConfig definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map<String, String> tags); + } + + /** + * The stage of the ActiveDirectoryConfig definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ActiveDirectoryConfigProperties properties); + } + + /** + * The stage of the ActiveDirectoryConfig definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + } + + /** + * Begins update for the ActiveDirectoryConfig resource. + * + * @return the stage of resource update. + */ + ActiveDirectoryConfig.Update update(); + + /** + * The template for ActiveDirectoryConfig update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ActiveDirectoryConfig apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ActiveDirectoryConfig apply(Context context); + } + + /** + * The ActiveDirectoryConfig update stages. + */ + interface UpdateStages { + /** + * The stage of the ActiveDirectoryConfig update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map<String, String> tags); + } + + /** + * The stage of the ActiveDirectoryConfig update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the ActiveDirectoryConfig update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ActiveDirectoryConfigUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ActiveDirectoryConfig refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ActiveDirectoryConfig refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigProperties.java new file mode 100644 index 000000000000..49fecd3169b6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigProperties.java @@ -0,0 +1,416 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Active Directory Configuration properties. + */ +@Fluent +public final class ActiveDirectoryConfigProperties implements JsonSerializable<ActiveDirectoryConfigProperties> { + /* + * A domain user account with permission to create machine accounts + */ + private String userName; + + /* + * An array of DNS server IP addresses(IPv4 only) for the Active Directory + */ + private List<String> dns; + + /* + * NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount + * volumes + */ + private String smbServerName; + + /* + * The Organizational Unit (OU) within the Windows Active Directory + */ + private String organizationalUnit; + + /* + * The Active Directory site the service will limit Domain Controller discovery to + */ + private String site; + + /* + * Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without + * domain specifier + */ + private List<String> backupOperators; + + /* + * Users to be added to the Built-in Administrators active directory group. A list of unique usernames without + * domain specifier + */ + private List<String> administrators; + + /* + * Domain Users in the Active directory to be given SecurityPrivilege privilege (Needed for SMB Continuously + * available shares for SQL). A list of unique usernames without domain specifier + */ + private List<String> securityOperators; + + /* + * Status of the Active Directory + */ + private ActiveDirectoryStatus activeDirectoryStatus; + + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /* + * Name of the Active Directory domain + */ + private String domain; + + /* + * Access password from Azure KeyVault Secrets to connect Active Directory + */ + private SecretPassword secretPassword; + + /** + * Creates an instance of ActiveDirectoryConfigProperties class. + */ + public ActiveDirectoryConfigProperties() { + } + + /** + * Get the userName property: A domain user account with permission to create machine accounts. + * + * @return the userName value. + */ + public String userName() { + return this.userName; + } + + /** + * Set the userName property: A domain user account with permission to create machine accounts. + * + * @param userName the userName value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withUserName(String userName) { + this.userName = userName; + return this; + } + + /** + * Get the dns property: An array of DNS server IP addresses(IPv4 only) for the Active Directory. + * + * @return the dns value. + */ + public List<String> dns() { + return this.dns; + } + + /** + * Set the dns property: An array of DNS server IP addresses(IPv4 only) for the Active Directory. + * + * @param dns the dns value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withDns(List<String> dns) { + this.dns = dns; + return this; + } + + /** + * Get the smbServerName property: NetBIOS name of the SMB server. This name will be registered as a computer + * account in the AD and used to mount volumes. + * + * @return the smbServerName value. + */ + public String smbServerName() { + return this.smbServerName; + } + + /** + * Set the smbServerName property: NetBIOS name of the SMB server. This name will be registered as a computer + * account in the AD and used to mount volumes. + * + * @param smbServerName the smbServerName value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withSmbServerName(String smbServerName) { + this.smbServerName = smbServerName; + return this; + } + + /** + * Get the organizationalUnit property: The Organizational Unit (OU) within the Windows Active Directory. + * + * @return the organizationalUnit value. + */ + public String organizationalUnit() { + return this.organizationalUnit; + } + + /** + * Set the organizationalUnit property: The Organizational Unit (OU) within the Windows Active Directory. + * + * @param organizationalUnit the organizationalUnit value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withOrganizationalUnit(String organizationalUnit) { + this.organizationalUnit = organizationalUnit; + return this; + } + + /** + * Get the site property: The Active Directory site the service will limit Domain Controller discovery to. + * + * @return the site value. + */ + public String site() { + return this.site; + } + + /** + * Set the site property: The Active Directory site the service will limit Domain Controller discovery to. + * + * @param site the site value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withSite(String site) { + this.site = site; + return this; + } + + /** + * Get the backupOperators property: Users to be added to the Built-in Backup Operator active directory group. A + * list of unique usernames without domain specifier. + * + * @return the backupOperators value. + */ + public List<String> backupOperators() { + return this.backupOperators; + } + + /** + * Set the backupOperators property: Users to be added to the Built-in Backup Operator active directory group. A + * list of unique usernames without domain specifier. + * + * @param backupOperators the backupOperators value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withBackupOperators(List<String> backupOperators) { + this.backupOperators = backupOperators; + return this; + } + + /** + * Get the administrators property: Users to be added to the Built-in Administrators active directory group. A list + * of unique usernames without domain specifier. + * + * @return the administrators value. + */ + public List<String> administrators() { + return this.administrators; + } + + /** + * Set the administrators property: Users to be added to the Built-in Administrators active directory group. A list + * of unique usernames without domain specifier. + * + * @param administrators the administrators value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withAdministrators(List<String> administrators) { + this.administrators = administrators; + return this; + } + + /** + * Get the securityOperators property: Domain Users in the Active directory to be given SecurityPrivilege privilege + * (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier. + * + * @return the securityOperators value. + */ + public List<String> securityOperators() { + return this.securityOperators; + } + + /** + * Set the securityOperators property: Domain Users in the Active directory to be given SecurityPrivilege privilege + * (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier. + * + * @param securityOperators the securityOperators value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withSecurityOperators(List<String> securityOperators) { + this.securityOperators = securityOperators; + return this; + } + + /** + * Get the activeDirectoryStatus property: Status of the Active Directory. + * + * @return the activeDirectoryStatus value. + */ + public ActiveDirectoryStatus activeDirectoryStatus() { + return this.activeDirectoryStatus; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the domain property: Name of the Active Directory domain. + * + * @return the domain value. + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain property: Name of the Active Directory domain. + * + * @param domain the domain value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the secretPassword property: Access password from Azure KeyVault Secrets to connect Active Directory. + * + * @return the secretPassword value. + */ + public SecretPassword secretPassword() { + return this.secretPassword; + } + + /** + * Set the secretPassword property: Access password from Azure KeyVault Secrets to connect Active Directory. + * + * @param secretPassword the secretPassword value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withSecretPassword(SecretPassword secretPassword) { + this.secretPassword = secretPassword; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (domain() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property domain in model ActiveDirectoryConfigProperties")); + } + if (secretPassword() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property secretPassword in model ActiveDirectoryConfigProperties")); + } else { + secretPassword().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryConfigProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("domain", this.domain); + jsonWriter.writeJsonField("secretPassword", this.secretPassword); + jsonWriter.writeStringField("userName", this.userName); + jsonWriter.writeArrayField("dns", this.dns, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("smbServerName", this.smbServerName); + jsonWriter.writeStringField("organizationalUnit", this.organizationalUnit); + jsonWriter.writeStringField("site", this.site); + jsonWriter.writeArrayField("backupOperators", this.backupOperators, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("administrators", this.administrators, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("securityOperators", this.securityOperators, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActiveDirectoryConfigProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActiveDirectoryConfigProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ActiveDirectoryConfigProperties. + */ + public static ActiveDirectoryConfigProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActiveDirectoryConfigProperties deserializedActiveDirectoryConfigProperties + = new ActiveDirectoryConfigProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("domain".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.domain = reader.getString(); + } else if ("secretPassword".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.secretPassword = SecretPassword.fromJson(reader); + } else if ("userName".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.userName = reader.getString(); + } else if ("dns".equals(fieldName)) { + List<String> dns = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigProperties.dns = dns; + } else if ("smbServerName".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.smbServerName = reader.getString(); + } else if ("organizationalUnit".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.organizationalUnit = reader.getString(); + } else if ("site".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.site = reader.getString(); + } else if ("backupOperators".equals(fieldName)) { + List<String> backupOperators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigProperties.backupOperators = backupOperators; + } else if ("administrators".equals(fieldName)) { + List<String> administrators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigProperties.administrators = administrators; + } else if ("securityOperators".equals(fieldName)) { + List<String> securityOperators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigProperties.securityOperators = securityOperators; + } else if ("activeDirectoryStatus".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.activeDirectoryStatus + = ActiveDirectoryStatus.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedActiveDirectoryConfigProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdate.java new file mode 100644 index 000000000000..bbd3b5956700 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdate.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ActiveDirectoryConfig. + */ +@Fluent +public final class ActiveDirectoryConfigUpdate implements JsonSerializable<ActiveDirectoryConfigUpdate> { + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + + /* + * Resource tags. + */ + private Map<String, String> tags; + + /* + * The resource-specific properties for this resource. + */ + private ActiveDirectoryConfigUpdateProperties properties; + + /** + * Creates an instance of ActiveDirectoryConfigUpdate class. + */ + public ActiveDirectoryConfigUpdate() { + } + + /** + * 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 ActiveDirectoryConfigUpdate object itself. + */ + public ActiveDirectoryConfigUpdate withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map<String, String> tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ActiveDirectoryConfigUpdate object itself. + */ + public ActiveDirectoryConfigUpdate withTags(Map<String, String> tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ActiveDirectoryConfigUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ActiveDirectoryConfigUpdate object itself. + */ + public ActiveDirectoryConfigUpdate withProperties(ActiveDirectoryConfigUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActiveDirectoryConfigUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActiveDirectoryConfigUpdate if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ActiveDirectoryConfigUpdate. + */ + public static ActiveDirectoryConfigUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActiveDirectoryConfigUpdate deserializedActiveDirectoryConfigUpdate = new ActiveDirectoryConfigUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identity".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdate.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdate.properties + = ActiveDirectoryConfigUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedActiveDirectoryConfigUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdateProperties.java new file mode 100644 index 000000000000..bcf5c74329a3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdateProperties.java @@ -0,0 +1,370 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The updatable properties of the ActiveDirectoryConfig. + */ +@Fluent +public final class ActiveDirectoryConfigUpdateProperties + implements JsonSerializable<ActiveDirectoryConfigUpdateProperties> { + /* + * A domain user account with permission to create machine accounts + */ + private String userName; + + /* + * An array of DNS server IP addresses(IPv4 only) for the Active Directory + */ + private List<String> dns; + + /* + * NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount + * volumes + */ + private String smbServerName; + + /* + * The Organizational Unit (OU) within the Windows Active Directory + */ + private String organizationalUnit; + + /* + * The Active Directory site the service will limit Domain Controller discovery to + */ + private String site; + + /* + * Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without + * domain specifier + */ + private List<String> backupOperators; + + /* + * Users to be added to the Built-in Administrators active directory group. A list of unique usernames without + * domain specifier + */ + private List<String> administrators; + + /* + * Domain Users in the Active directory to be given SecurityPrivilege privilege (Needed for SMB Continuously + * available shares for SQL). A list of unique usernames without domain specifier + */ + private List<String> securityOperators; + + /* + * Name of the Active Directory domain + */ + private String domain; + + /* + * Access password from Azure KeyVault Secrets to connect Active Directory + */ + private SecretPassword secretPassword; + + /** + * Creates an instance of ActiveDirectoryConfigUpdateProperties class. + */ + public ActiveDirectoryConfigUpdateProperties() { + } + + /** + * Get the userName property: A domain user account with permission to create machine accounts. + * + * @return the userName value. + */ + public String userName() { + return this.userName; + } + + /** + * Set the userName property: A domain user account with permission to create machine accounts. + * + * @param userName the userName value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withUserName(String userName) { + this.userName = userName; + return this; + } + + /** + * Get the dns property: An array of DNS server IP addresses(IPv4 only) for the Active Directory. + * + * @return the dns value. + */ + public List<String> dns() { + return this.dns; + } + + /** + * Set the dns property: An array of DNS server IP addresses(IPv4 only) for the Active Directory. + * + * @param dns the dns value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withDns(List<String> dns) { + this.dns = dns; + return this; + } + + /** + * Get the smbServerName property: NetBIOS name of the SMB server. This name will be registered as a computer + * account in the AD and used to mount volumes. + * + * @return the smbServerName value. + */ + public String smbServerName() { + return this.smbServerName; + } + + /** + * Set the smbServerName property: NetBIOS name of the SMB server. This name will be registered as a computer + * account in the AD and used to mount volumes. + * + * @param smbServerName the smbServerName value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withSmbServerName(String smbServerName) { + this.smbServerName = smbServerName; + return this; + } + + /** + * Get the organizationalUnit property: The Organizational Unit (OU) within the Windows Active Directory. + * + * @return the organizationalUnit value. + */ + public String organizationalUnit() { + return this.organizationalUnit; + } + + /** + * Set the organizationalUnit property: The Organizational Unit (OU) within the Windows Active Directory. + * + * @param organizationalUnit the organizationalUnit value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withOrganizationalUnit(String organizationalUnit) { + this.organizationalUnit = organizationalUnit; + return this; + } + + /** + * Get the site property: The Active Directory site the service will limit Domain Controller discovery to. + * + * @return the site value. + */ + public String site() { + return this.site; + } + + /** + * Set the site property: The Active Directory site the service will limit Domain Controller discovery to. + * + * @param site the site value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withSite(String site) { + this.site = site; + return this; + } + + /** + * Get the backupOperators property: Users to be added to the Built-in Backup Operator active directory group. A + * list of unique usernames without domain specifier. + * + * @return the backupOperators value. + */ + public List<String> backupOperators() { + return this.backupOperators; + } + + /** + * Set the backupOperators property: Users to be added to the Built-in Backup Operator active directory group. A + * list of unique usernames without domain specifier. + * + * @param backupOperators the backupOperators value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withBackupOperators(List<String> backupOperators) { + this.backupOperators = backupOperators; + return this; + } + + /** + * Get the administrators property: Users to be added to the Built-in Administrators active directory group. A list + * of unique usernames without domain specifier. + * + * @return the administrators value. + */ + public List<String> administrators() { + return this.administrators; + } + + /** + * Set the administrators property: Users to be added to the Built-in Administrators active directory group. A list + * of unique usernames without domain specifier. + * + * @param administrators the administrators value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withAdministrators(List<String> administrators) { + this.administrators = administrators; + return this; + } + + /** + * Get the securityOperators property: Domain Users in the Active directory to be given SecurityPrivilege privilege + * (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier. + * + * @return the securityOperators value. + */ + public List<String> securityOperators() { + return this.securityOperators; + } + + /** + * Set the securityOperators property: Domain Users in the Active directory to be given SecurityPrivilege privilege + * (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier. + * + * @param securityOperators the securityOperators value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withSecurityOperators(List<String> securityOperators) { + this.securityOperators = securityOperators; + return this; + } + + /** + * Get the domain property: Name of the Active Directory domain. + * + * @return the domain value. + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain property: Name of the Active Directory domain. + * + * @param domain the domain value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the secretPassword property: Access password from Azure KeyVault Secrets to connect Active Directory. + * + * @return the secretPassword value. + */ + public SecretPassword secretPassword() { + return this.secretPassword; + } + + /** + * Set the secretPassword property: Access password from Azure KeyVault Secrets to connect Active Directory. + * + * @param secretPassword the secretPassword value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withSecretPassword(SecretPassword secretPassword) { + this.secretPassword = secretPassword; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (secretPassword() != null) { + secretPassword().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("userName", this.userName); + jsonWriter.writeArrayField("dns", this.dns, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("smbServerName", this.smbServerName); + jsonWriter.writeStringField("organizationalUnit", this.organizationalUnit); + jsonWriter.writeStringField("site", this.site); + jsonWriter.writeArrayField("backupOperators", this.backupOperators, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("administrators", this.administrators, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("securityOperators", this.securityOperators, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("domain", this.domain); + jsonWriter.writeJsonField("secretPassword", this.secretPassword); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActiveDirectoryConfigUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActiveDirectoryConfigUpdateProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ActiveDirectoryConfigUpdateProperties. + */ + public static ActiveDirectoryConfigUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActiveDirectoryConfigUpdateProperties deserializedActiveDirectoryConfigUpdateProperties + = new ActiveDirectoryConfigUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("userName".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.userName = reader.getString(); + } else if ("dns".equals(fieldName)) { + List<String> dns = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigUpdateProperties.dns = dns; + } else if ("smbServerName".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.smbServerName = reader.getString(); + } else if ("organizationalUnit".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.organizationalUnit = reader.getString(); + } else if ("site".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.site = reader.getString(); + } else if ("backupOperators".equals(fieldName)) { + List<String> backupOperators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigUpdateProperties.backupOperators = backupOperators; + } else if ("administrators".equals(fieldName)) { + List<String> administrators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigUpdateProperties.administrators = administrators; + } else if ("securityOperators".equals(fieldName)) { + List<String> securityOperators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigUpdateProperties.securityOperators = securityOperators; + } else if ("domain".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.domain = reader.getString(); + } else if ("secretPassword".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.secretPassword = SecretPassword.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedActiveDirectoryConfigUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigs.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigs.java new file mode 100644 index 000000000000..512c71a48c3a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigs.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ActiveDirectoryConfigs. + */ +public interface ActiveDirectoryConfigs { + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration along with {@link Response}. + */ + Response<ActiveDirectoryConfig> getByResourceGroupWithResponse(String resourceGroupName, + String activeDirectoryConfigName, Context context); + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration. + */ + ActiveDirectoryConfig getByResourceGroup(String resourceGroupName, String activeDirectoryConfigName); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String activeDirectoryConfigName); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String activeDirectoryConfigName, Context context); + + /** + * List all active directory configurations within the 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 ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ActiveDirectoryConfig> listByResourceGroup(String resourceGroupName); + + /** + * List all active directory configurations within the 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 ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ActiveDirectoryConfig> listByResourceGroup(String resourceGroupName, Context context); + + /** + * List all active directory configurations within the subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ActiveDirectoryConfig> list(); + + /** + * List all active directory configurations within the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ActiveDirectoryConfig> list(Context context); + + /** + * Get the details of the specified active directory configuration. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration along with {@link Response}. + */ + ActiveDirectoryConfig getById(String id); + + /** + * Get the details of the specified active directory configuration. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration along with {@link Response}. + */ + Response<ActiveDirectoryConfig> getByIdWithResponse(String id, Context context); + + /** + * Delete the specified Active Directory configuration. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete the specified Active Directory configuration. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ActiveDirectoryConfig resource. + * + * @param name resource name. + * @return the first stage of the new ActiveDirectoryConfig definition. + */ + ActiveDirectoryConfig.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActualRansomwareProtectionState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActualRansomwareProtectionState.java new file mode 100644 index 000000000000..df9c87f1e1e6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActualRansomwareProtectionState.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The actual state of the Advanced Ransomware Protection feature. + */ +public final class ActualRansomwareProtectionState extends ExpandableStringEnum<ActualRansomwareProtectionState> { + /** + * Advanced Ransomware Protection is disabled. + */ + public static final ActualRansomwareProtectionState DISABLED = fromString("Disabled"); + + /** + * Advanced Ransomware Protection is enabled. + */ + public static final ActualRansomwareProtectionState ENABLED = fromString("Enabled"); + + /** + * Advanced Ransomware Protection is in learning mode. + */ + public static final ActualRansomwareProtectionState LEARNING = fromString("Learning"); + + /** + * Advanced Ransomware Protection is in paused state. + */ + public static final ActualRansomwareProtectionState PAUSED = fromString("Paused"); + + /** + * Creates a new instance of ActualRansomwareProtectionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActualRansomwareProtectionState() { + } + + /** + * Creates or finds a ActualRansomwareProtectionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActualRansomwareProtectionState. + */ + public static ActualRansomwareProtectionState fromString(String name) { + return fromString(name, ActualRansomwareProtectionState.class); + } + + /** + * Gets known ActualRansomwareProtectionState values. + * + * @return known ActualRansomwareProtectionState values. + */ + public static Collection<ActualRansomwareProtectionState> values() { + return values(ActualRansomwareProtectionState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakthroughMode.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakthroughMode.java new file mode 100644 index 000000000000..da586612fc56 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakthroughMode.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies whether the volume operates in Breakthrough Mode. When set to 'Enabled', the volume runs on the resources + * configured for this mode, + * delivering improved performance and higher throughput. If set to 'Disabled' or omitted, the volume uses the basic + * configuration. This feature + * is available only in regions where it’s been configured and first-time users must finish onboarding prior to using + * Breakthrough Mode. + */ +public final class BreakthroughMode extends ExpandableStringEnum<BreakthroughMode> { + /** + * The volume runs on the resources configured for Breakthrough mode which ensures consistent high performance and a + * higher throughput. + */ + public static final BreakthroughMode ENABLED = fromString("Enabled"); + + /** + * The volume uses configuration that provides basic performance and throughput. + */ + public static final BreakthroughMode DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of BreakthroughMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BreakthroughMode() { + } + + /** + * Creates or finds a BreakthroughMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding BreakthroughMode. + */ + public static BreakthroughMode fromString(String name) { + return fromString(name, BreakthroughMode.class); + } + + /** + * Gets known BreakthroughMode values. + * + * @return known BreakthroughMode values. + */ + public static Collection<BreakthroughMode> values() { + return values(BreakthroughMode.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Bucket.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Bucket.java new file mode 100644 index 000000000000..f392b694999e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Bucket.java @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.BucketInner; + +/** + * An immutable client-side representation of Bucket. + */ +public interface Bucket { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the path property: The volume path mounted inside the bucket. The default is the root path '/' if no value + * is provided when the bucket is created. + * + * @return the path value. + */ + String path(); + + /** + * Gets the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @return the fileSystemUser value. + */ + FileSystemUser fileSystemUser(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the status property: The bucket credentials status. There states: + * + * "NoCredentialsSet": Access and Secret key pair have not been generated. + * "CredentialsExpired": Access and Secret key pair have expired. + * "Active": The certificate has been installed and credentials are unexpired. + * + * @return the status value. + */ + CredentialsStatus status(); + + /** + * Gets the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @return the server value. + */ + BucketServerProperties server(); + + /** + * Gets the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is + * ReadOnly if no value is provided during bucket creation. + * + * @return the permissions value. + */ + BucketPermissions permissions(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.BucketInner object. + * + * @return the inner object. + */ + BucketInner innerModel(); + + /** + * The entirety of the Bucket definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The Bucket definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Bucket definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the Bucket definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName, poolName, volumeName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @return the next definition stage. + */ + WithCreate withExistingVolume(String resourceGroupName, String accountName, String poolName, + String volumeName); + } + + /** + * The stage of the Bucket definition which contains all the minimum required properties for the resource to be + * created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithPath, DefinitionStages.WithFileSystemUser, + DefinitionStages.WithServer, DefinitionStages.WithPermissions { + /** + * Executes the create request. + * + * @return the created resource. + */ + Bucket create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Bucket create(Context context); + } + + /** + * The stage of the Bucket definition allowing to specify path. + */ + interface WithPath { + /** + * Specifies the path property: The volume path mounted inside the bucket. The default is the root path '/' + * if no value is provided when the bucket is created.. + * + * @param path The volume path mounted inside the bucket. The default is the root path '/' if no value is + * provided when the bucket is created. + * @return the next definition stage. + */ + WithCreate withPath(String path); + } + + /** + * The stage of the Bucket definition allowing to specify fileSystemUser. + */ + interface WithFileSystemUser { + /** + * Specifies the fileSystemUser property: File System user having access to volume data. For Unix, this is + * the user's uid and gid. For Windows, this is the user's username. Note that the Unix and Windows user + * details are mutually exclusive, meaning one or other must be supplied, but not both.. + * + * @param fileSystemUser File System user having access to volume data. For Unix, this is the user's uid and + * gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * @return the next definition stage. + */ + WithCreate withFileSystemUser(FileSystemUser fileSystemUser); + } + + /** + * The stage of the Bucket definition allowing to specify server. + */ + interface WithServer { + /** + * Specifies the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @param server Properties of the server managing the lifecycle of volume buckets. + * @return the next definition stage. + */ + WithCreate withServer(BucketServerProperties server); + } + + /** + * The stage of the Bucket definition allowing to specify permissions. + */ + interface WithPermissions { + /** + * Specifies the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. The + * default is ReadOnly if no value is provided during bucket creation.. + * + * @param permissions Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is + * ReadOnly if no value is provided during bucket creation. + * @return the next definition stage. + */ + WithCreate withPermissions(BucketPermissions permissions); + } + } + + /** + * Begins update for the Bucket resource. + * + * @return the stage of resource update. + */ + Bucket.Update update(); + + /** + * The template for Bucket update. + */ + interface Update extends UpdateStages.WithPath, UpdateStages.WithFileSystemUser, UpdateStages.WithServer, + UpdateStages.WithPermissions { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Bucket apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Bucket apply(Context context); + } + + /** + * The Bucket update stages. + */ + interface UpdateStages { + /** + * The stage of the Bucket update allowing to specify path. + */ + interface WithPath { + /** + * Specifies the path property: The volume path mounted inside the bucket.. + * + * @param path The volume path mounted inside the bucket. + * @return the next definition stage. + */ + Update withPath(String path); + } + + /** + * The stage of the Bucket update allowing to specify fileSystemUser. + */ + interface WithFileSystemUser { + /** + * Specifies the fileSystemUser property: File System user having access to volume data. For Unix, this is + * the user's uid and gid. For Windows, this is the user's username. Note that the Unix and Windows user + * details are mutually exclusive, meaning one or other must be supplied, but not both.. + * + * @param fileSystemUser File System user having access to volume data. For Unix, this is the user's uid and + * gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * @return the next definition stage. + */ + Update withFileSystemUser(FileSystemUser fileSystemUser); + } + + /** + * The stage of the Bucket update allowing to specify server. + */ + interface WithServer { + /** + * Specifies the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @param server Properties of the server managing the lifecycle of volume buckets. + * @return the next definition stage. + */ + Update withServer(BucketServerPatchProperties server); + } + + /** + * The stage of the Bucket update allowing to specify permissions. + */ + interface WithPermissions { + /** + * Specifies the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite.. + * + * @param permissions Access permissions for the bucket. Either ReadOnly or ReadWrite. + * @return the next definition stage. + */ + Update withPermissions(BucketPatchPermissions permissions); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Bucket refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Bucket refresh(Context context); + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair along with {@link Response}. + */ + Response<BucketGenerateCredentials> generateCredentialsWithResponse(BucketCredentialsExpiry body, Context context); + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair. + */ + BucketGenerateCredentials generateCredentials(BucketCredentialsExpiry body); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketCredentialsExpiry.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketCredentialsExpiry.java new file mode 100644 index 000000000000..4083449bd067 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketCredentialsExpiry.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The bucket's Access and Secret key pair Expiry Time expressed as the number of days from now. + */ +@Fluent +public final class BucketCredentialsExpiry implements JsonSerializable<BucketCredentialsExpiry> { + /* + * The number of days from now until the newly generated Access and Secret key pair will expire. + */ + private Integer keyPairExpiryDays; + + /** + * Creates an instance of BucketCredentialsExpiry class. + */ + public BucketCredentialsExpiry() { + } + + /** + * Get the keyPairExpiryDays property: The number of days from now until the newly generated Access and Secret key + * pair will expire. + * + * @return the keyPairExpiryDays value. + */ + public Integer keyPairExpiryDays() { + return this.keyPairExpiryDays; + } + + /** + * Set the keyPairExpiryDays property: The number of days from now until the newly generated Access and Secret key + * pair will expire. + * + * @param keyPairExpiryDays the keyPairExpiryDays value to set. + * @return the BucketCredentialsExpiry object itself. + */ + public BucketCredentialsExpiry withKeyPairExpiryDays(Integer keyPairExpiryDays) { + this.keyPairExpiryDays = keyPairExpiryDays; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("keyPairExpiryDays", this.keyPairExpiryDays); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BucketCredentialsExpiry from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketCredentialsExpiry if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the BucketCredentialsExpiry. + */ + public static BucketCredentialsExpiry fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketCredentialsExpiry deserializedBucketCredentialsExpiry = new BucketCredentialsExpiry(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyPairExpiryDays".equals(fieldName)) { + deserializedBucketCredentialsExpiry.keyPairExpiryDays = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketCredentialsExpiry; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketGenerateCredentials.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketGenerateCredentials.java new file mode 100644 index 000000000000..040b956cb2d8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketGenerateCredentials.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner; +import java.time.OffsetDateTime; + +/** + * An immutable client-side representation of BucketGenerateCredentials. + */ +public interface BucketGenerateCredentials { + /** + * Gets the accessKey property: The Access Key that is required along with the Secret Key to access the bucket. + * + * @return the accessKey value. + */ + String accessKey(); + + /** + * Gets the secretKey property: The Secret Key that is required along with the Access Key to access the bucket. + * + * @return the secretKey value. + */ + String secretKey(); + + /** + * Gets the keyPairExpiry property: The bucket's Access and Secret key pair expiry date and time (in UTC). + * + * @return the keyPairExpiry value. + */ + OffsetDateTime keyPairExpiry(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner object. + * + * @return the inner object. + */ + BucketGenerateCredentialsInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPatch.java new file mode 100644 index 000000000000..04be84fa6aa0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPatch.java @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.BucketPatchProperties; +import java.io.IOException; + +/** + * Bucket resource. + */ +@Fluent +public final class BucketPatch extends ProxyResource { + /* + * Bucket properties + */ + private BucketPatchProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of BucketPatch class. + */ + public BucketPatch() { + } + + /** + * Get the innerProperties property: Bucket properties. + * + * @return the innerProperties value. + */ + private BucketPatchProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the path property: The volume path mounted inside the bucket. + * + * @return the path value. + */ + public String path() { + return this.innerProperties() == null ? null : this.innerProperties().path(); + } + + /** + * Set the path property: The volume path mounted inside the bucket. + * + * @param path the path value to set. + * @return the BucketPatch object itself. + */ + public BucketPatch withPath(String path) { + if (this.innerProperties() == null) { + this.innerProperties = new BucketPatchProperties(); + } + this.innerProperties().withPath(path); + return this; + } + + /** + * Get the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @return the fileSystemUser value. + */ + public FileSystemUser fileSystemUser() { + return this.innerProperties() == null ? null : this.innerProperties().fileSystemUser(); + } + + /** + * Set the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @param fileSystemUser the fileSystemUser value to set. + * @return the BucketPatch object itself. + */ + public BucketPatch withFileSystemUser(FileSystemUser fileSystemUser) { + if (this.innerProperties() == null) { + this.innerProperties = new BucketPatchProperties(); + } + this.innerProperties().withFileSystemUser(fileSystemUser); + 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 server property: Properties of the server managing the lifecycle of volume buckets. + * + * @return the server value. + */ + public BucketServerPatchProperties server() { + return this.innerProperties() == null ? null : this.innerProperties().server(); + } + + /** + * Set the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @param server the server value to set. + * @return the BucketPatch object itself. + */ + public BucketPatch withServer(BucketServerPatchProperties server) { + if (this.innerProperties() == null) { + this.innerProperties = new BucketPatchProperties(); + } + this.innerProperties().withServer(server); + return this; + } + + /** + * Get the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. + * + * @return the permissions value. + */ + public BucketPatchPermissions permissions() { + return this.innerProperties() == null ? null : this.innerProperties().permissions(); + } + + /** + * Set the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. + * + * @param permissions the permissions value to set. + * @return the BucketPatch object itself. + */ + public BucketPatch withPermissions(BucketPatchPermissions permissions) { + if (this.innerProperties() == null) { + this.innerProperties = new BucketPatchProperties(); + } + this.innerProperties().withPermissions(permissions); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BucketPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BucketPatch. + */ + public static BucketPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketPatch deserializedBucketPatch = new BucketPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedBucketPatch.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedBucketPatch.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedBucketPatch.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedBucketPatch.innerProperties = BucketPatchProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedBucketPatch.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketPatch; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPatchPermissions.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPatchPermissions.java new file mode 100644 index 000000000000..f75534272fec --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPatchPermissions.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Access permissions for the bucket. Either ReadOnly or ReadWrite. + */ +public final class BucketPatchPermissions extends ExpandableStringEnum<BucketPatchPermissions> { + /** + * Read-only access to bucket. + */ + public static final BucketPatchPermissions READ_ONLY = fromString("ReadOnly"); + + /** + * Read-write access to bucket. + */ + public static final BucketPatchPermissions READ_WRITE = fromString("ReadWrite"); + + /** + * Creates a new instance of BucketPatchPermissions value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BucketPatchPermissions() { + } + + /** + * Creates or finds a BucketPatchPermissions from its string representation. + * + * @param name a name to look for. + * @return the corresponding BucketPatchPermissions. + */ + public static BucketPatchPermissions fromString(String name) { + return fromString(name, BucketPatchPermissions.class); + } + + /** + * Gets known BucketPatchPermissions values. + * + * @return known BucketPatchPermissions values. + */ + public static Collection<BucketPatchPermissions> values() { + return values(BucketPatchPermissions.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPermissions.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPermissions.java new file mode 100644 index 000000000000..2b5f6b4a760d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPermissions.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is ReadOnly if no value is provided + * during bucket creation. + */ +public final class BucketPermissions extends ExpandableStringEnum<BucketPermissions> { + /** + * Read-only access to bucket. + */ + public static final BucketPermissions READ_ONLY = fromString("ReadOnly"); + + /** + * Read-write access to bucket. + */ + public static final BucketPermissions READ_WRITE = fromString("ReadWrite"); + + /** + * Creates a new instance of BucketPermissions value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BucketPermissions() { + } + + /** + * Creates or finds a BucketPermissions from its string representation. + * + * @param name a name to look for. + * @return the corresponding BucketPermissions. + */ + public static BucketPermissions fromString(String name) { + return fromString(name, BucketPermissions.class); + } + + /** + * Gets known BucketPermissions values. + * + * @return known BucketPermissions values. + */ + public static Collection<BucketPermissions> values() { + return values(BucketPermissions.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketServerPatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketServerPatchProperties.java new file mode 100644 index 000000000000..045340a9c455 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketServerPatchProperties.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Properties of the server managing the lifecycle of volume buckets. + */ +@Fluent +public final class BucketServerPatchProperties implements JsonSerializable<BucketServerPatchProperties> { + /* + * The host part of the bucket URL, resolving to the bucket IP address and allowed by the server certificate. + */ + private String fqdn; + + /* + * A base64-encoded PEM file, which includes both the bucket server's certificate and private key. It is used to + * authenticate the user and allows access to volume data in a read-only manner. + */ + private String certificateObject; + + /** + * Creates an instance of BucketServerPatchProperties class. + */ + public BucketServerPatchProperties() { + } + + /** + * Get the fqdn property: The host part of the bucket URL, resolving to the bucket IP address and allowed by the + * server certificate. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Set the fqdn property: The host part of the bucket URL, resolving to the bucket IP address and allowed by the + * server certificate. + * + * @param fqdn the fqdn value to set. + * @return the BucketServerPatchProperties object itself. + */ + public BucketServerPatchProperties withFqdn(String fqdn) { + this.fqdn = fqdn; + return this; + } + + /** + * Get the certificateObject property: A base64-encoded PEM file, which includes both the bucket server's + * certificate and private key. It is used to authenticate the user and allows access to volume data in a read-only + * manner. + * + * @return the certificateObject value. + */ + public String certificateObject() { + return this.certificateObject; + } + + /** + * Set the certificateObject property: A base64-encoded PEM file, which includes both the bucket server's + * certificate and private key. It is used to authenticate the user and allows access to volume data in a read-only + * manner. + * + * @param certificateObject the certificateObject value to set. + * @return the BucketServerPatchProperties object itself. + */ + public BucketServerPatchProperties withCertificateObject(String certificateObject) { + this.certificateObject = certificateObject; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("fqdn", this.fqdn); + jsonWriter.writeStringField("certificateObject", this.certificateObject); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BucketServerPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketServerPatchProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BucketServerPatchProperties. + */ + public static BucketServerPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketServerPatchProperties deserializedBucketServerPatchProperties = new BucketServerPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("fqdn".equals(fieldName)) { + deserializedBucketServerPatchProperties.fqdn = reader.getString(); + } else if ("certificateObject".equals(fieldName)) { + deserializedBucketServerPatchProperties.certificateObject = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketServerPatchProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketServerProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketServerProperties.java new file mode 100644 index 000000000000..c4381ffbc351 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketServerProperties.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Properties of the server managing the lifecycle of volume buckets. + */ +@Fluent +public final class BucketServerProperties implements JsonSerializable<BucketServerProperties> { + /* + * The host part of the bucket URL, resolving to the bucket IP address and allowed by the server certificate. + */ + private String fqdn; + + /* + * Certificate Common Name taken from the certificate installed on the bucket server + */ + private String certificateCommonName; + + /* + * The bucket server's certificate expiry date. + */ + private OffsetDateTime certificateExpiryDate; + + /* + * The bucket server's IPv4 address + */ + private String ipAddress; + + /* + * A base64-encoded PEM file, which includes both the bucket server's certificate and private key. It is used to + * authenticate the user and allows access to volume data in a read-only manner. + */ + private String certificateObject; + + /** + * Creates an instance of BucketServerProperties class. + */ + public BucketServerProperties() { + } + + /** + * Get the fqdn property: The host part of the bucket URL, resolving to the bucket IP address and allowed by the + * server certificate. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Set the fqdn property: The host part of the bucket URL, resolving to the bucket IP address and allowed by the + * server certificate. + * + * @param fqdn the fqdn value to set. + * @return the BucketServerProperties object itself. + */ + public BucketServerProperties withFqdn(String fqdn) { + this.fqdn = fqdn; + return this; + } + + /** + * Get the certificateCommonName property: Certificate Common Name taken from the certificate installed on the + * bucket server. + * + * @return the certificateCommonName value. + */ + public String certificateCommonName() { + return this.certificateCommonName; + } + + /** + * Get the certificateExpiryDate property: The bucket server's certificate expiry date. + * + * @return the certificateExpiryDate value. + */ + public OffsetDateTime certificateExpiryDate() { + return this.certificateExpiryDate; + } + + /** + * Get the ipAddress property: The bucket server's IPv4 address. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Get the certificateObject property: A base64-encoded PEM file, which includes both the bucket server's + * certificate and private key. It is used to authenticate the user and allows access to volume data in a read-only + * manner. + * + * @return the certificateObject value. + */ + public String certificateObject() { + return this.certificateObject; + } + + /** + * Set the certificateObject property: A base64-encoded PEM file, which includes both the bucket server's + * certificate and private key. It is used to authenticate the user and allows access to volume data in a read-only + * manner. + * + * @param certificateObject the certificateObject value to set. + * @return the BucketServerProperties object itself. + */ + public BucketServerProperties withCertificateObject(String certificateObject) { + this.certificateObject = certificateObject; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("fqdn", this.fqdn); + jsonWriter.writeStringField("certificateObject", this.certificateObject); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BucketServerProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketServerProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the BucketServerProperties. + */ + public static BucketServerProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketServerProperties deserializedBucketServerProperties = new BucketServerProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("fqdn".equals(fieldName)) { + deserializedBucketServerProperties.fqdn = reader.getString(); + } else if ("certificateCommonName".equals(fieldName)) { + deserializedBucketServerProperties.certificateCommonName = reader.getString(); + } else if ("certificateExpiryDate".equals(fieldName)) { + deserializedBucketServerProperties.certificateExpiryDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("ipAddress".equals(fieldName)) { + deserializedBucketServerProperties.ipAddress = reader.getString(); + } else if ("certificateObject".equals(fieldName)) { + deserializedBucketServerProperties.certificateObject = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketServerProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Buckets.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Buckets.java new file mode 100644 index 000000000000..f1d23cba8127 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Buckets.java @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Buckets. + */ +public interface Buckets { + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume's bucket along with {@link Response}. + */ + Response<Bucket> getWithResponse(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, Context context); + + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume's bucket. + */ + Bucket get(String resourceGroupName, String accountName, String poolName, String volumeName, String bucketName); + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String poolName, String volumeName, String bucketName); + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String poolName, String volumeName, String bucketName, + Context context); + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 volume bucket resources as paginated response with {@link PagedIterable}. + */ + PagedIterable<Bucket> list(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 volume bucket resources as paginated response with {@link PagedIterable}. + */ + PagedIterable<Bucket> list(String resourceGroupName, String accountName, String poolName, String volumeName, + Context context); + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair along with {@link Response}. + */ + Response<BucketGenerateCredentials> generateCredentialsWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketCredentialsExpiry body, Context context); + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair. + */ + BucketGenerateCredentials generateCredentials(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, BucketCredentialsExpiry body); + + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume's bucket along with {@link Response}. + */ + Bucket getById(String id); + + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume's bucket along with {@link Response}. + */ + Response<Bucket> getByIdWithResponse(String id, Context context); + + /** + * Delete a volume's bucket. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a volume's bucket. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Bucket resource. + * + * @param name resource name. + * @return the first stage of the new Bucket definition. + */ + Bucket.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Cache.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Cache.java new file mode 100644 index 000000000000..bf3925343e18 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Cache.java @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.CacheInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of Cache. + */ +public interface Cache { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map<String, String> tags(); + + /** + * Gets the properties property: Cache properties. + * + * @return the properties value. + */ + CacheProperties properties(); + + /** + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the zones property: The availability zones. + * + * @return the zones value. + */ + List<String> zones(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.CacheInner object. + * + * @return the inner object. + */ + CacheInner innerModel(); + + /** + * The entirety of the Cache definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The Cache definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Cache definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the Cache definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the Cache definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName, poolName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @return the next definition stage. + */ + WithProperties withExistingCapacityPool(String resourceGroupName, String accountName, String poolName); + } + + /** + * The stage of the Cache definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Cache properties. + * + * @param properties Cache properties. + * @return the next definition stage. + */ + WithCreate withProperties(CacheProperties properties); + } + + /** + * The stage of the Cache definition which contains all the minimum required properties for the resource to be + * created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithZones { + /** + * Executes the create request. + * + * @return the created resource. + */ + Cache create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Cache create(Context context); + } + + /** + * The stage of the Cache definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map<String, String> tags); + } + + /** + * The stage of the Cache definition allowing to specify zones. + */ + interface WithZones { + /** + * Specifies the zones property: The availability zones.. + * + * @param zones The availability zones. + * @return the next definition stage. + */ + WithCreate withZones(List<String> zones); + } + } + + /** + * Begins update for the Cache resource. + * + * @return the stage of resource update. + */ + Cache.Update update(); + + /** + * The template for Cache update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Cache apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Cache apply(Context context); + } + + /** + * The Cache update stages. + */ + interface UpdateStages { + /** + * The stage of the Cache update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map<String, String> tags); + } + + /** + * The stage of the Cache update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(CacheUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Cache refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Cache refresh(Context context); + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response containing peering passphrases and commands for cluster and vserver peering along with + * {@link Response}. + */ + Response<PeeringPassphrases> listPeeringPassphrasesWithResponse(Context context); + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response containing peering passphrases and commands for cluster and vserver peering. + */ + PeeringPassphrases listPeeringPassphrases(); + + /** + * Moves Cache to another Capacity Pool. + * + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Cache poolChange(PoolChangeRequest body); + + /** + * Moves Cache to another Capacity Pool. + * + * @param body Move cache to the pool supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Cache poolChange(PoolChangeRequest body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheLifeCycleState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheLifeCycleState.java new file mode 100644 index 000000000000..b249e7561248 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheLifeCycleState.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Azure NetApp Files Cache lifecycle management. + */ +public final class CacheLifeCycleState extends ExpandableStringEnum<CacheLifeCycleState> { + /** + * Cluster peering offer has been sent. + */ + public static final CacheLifeCycleState CLUSTER_PEERING_OFFER_SENT = fromString("ClusterPeeringOfferSent"); + + /** + * VServer peering offer has been sent. + */ + public static final CacheLifeCycleState VSERVER_PEERING_OFFER_SENT = fromString("VserverPeeringOfferSent"); + + /** + * Cache creation in progress. + */ + public static final CacheLifeCycleState CREATING = fromString("Creating"); + + /** + * Cache creation succeeded and is available for use. + */ + public static final CacheLifeCycleState SUCCEEDED = fromString("Succeeded"); + + /** + * Cache is in a failed state. + */ + public static final CacheLifeCycleState FAILED = fromString("Failed"); + + /** + * Creates a new instance of CacheLifeCycleState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CacheLifeCycleState() { + } + + /** + * Creates or finds a CacheLifeCycleState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CacheLifeCycleState. + */ + public static CacheLifeCycleState fromString(String name) { + return fromString(name, CacheLifeCycleState.class); + } + + /** + * Gets known CacheLifeCycleState values. + * + * @return known CacheLifeCycleState values. + */ + public static Collection<CacheLifeCycleState> values() { + return values(CacheLifeCycleState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheMountTargetProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheMountTargetProperties.java new file mode 100644 index 000000000000..4cee408ac92f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheMountTargetProperties.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Contains all the information needed to mount a cache. + */ +@Immutable +public final class CacheMountTargetProperties implements JsonSerializable<CacheMountTargetProperties> { + /* + * UUID v4 used to identify the MountTarget + */ + private String mountTargetId; + + /* + * The mount target's IPv4 address, used to mount the cache. + */ + private String ipAddress; + + /* + * The SMB server's Fully Qualified Domain Name, FQDN + */ + private String smbServerFqdn; + + /** + * Creates an instance of CacheMountTargetProperties class. + */ + private CacheMountTargetProperties() { + } + + /** + * Get the mountTargetId property: UUID v4 used to identify the MountTarget. + * + * @return the mountTargetId value. + */ + public String mountTargetId() { + return this.mountTargetId; + } + + /** + * Get the ipAddress property: The mount target's IPv4 address, used to mount the cache. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Get the smbServerFqdn property: The SMB server's Fully Qualified Domain Name, FQDN. + * + * @return the smbServerFqdn value. + */ + public String smbServerFqdn() { + return this.smbServerFqdn; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CacheMountTargetProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CacheMountTargetProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CacheMountTargetProperties. + */ + public static CacheMountTargetProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CacheMountTargetProperties deserializedCacheMountTargetProperties = new CacheMountTargetProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mountTargetId".equals(fieldName)) { + deserializedCacheMountTargetProperties.mountTargetId = reader.getString(); + } else if ("ipAddress".equals(fieldName)) { + deserializedCacheMountTargetProperties.ipAddress = reader.getString(); + } else if ("smbServerFqdn".equals(fieldName)) { + deserializedCacheMountTargetProperties.smbServerFqdn = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCacheMountTargetProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProperties.java new file mode 100644 index 000000000000..896c921d63e8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProperties.java @@ -0,0 +1,729 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Cache resource properties. + */ +@Fluent +public final class CacheProperties implements JsonSerializable<CacheProperties> { + /* + * The file path of the Cache. + */ + private String filepath; + + /* + * Maximum storage quota allowed for a file system in bytes. Valid values are in the range 50GiB to 1PiB. Values + * expressed in bytes as multiples of 1GiB. + */ + private long size; + + /* + * Set of export policy rules + */ + private List<ExportPolicyRule> exportPolicy; + + /* + * Set of protocol types, default NFSv3, CIFS for SMB protocol + */ + private List<ProtocolTypes> protocolTypes; + + /* + * Azure lifecycle management + */ + private CacheProvisioningState provisioningState; + + /* + * Azure NetApp Files Cache lifecycle management + */ + private CacheLifeCycleState cacheState; + + /* + * The Azure Resource URI for a delegated cache subnet that will be used to allocate data IPs. + */ + private String cacheSubnetResourceId; + + /* + * The Azure Resource URI for a delegated subnet that will be used for ANF Intercluster Interface IP addresses. + */ + private String peeringSubnetResourceId; + + /* + * List of mount targets that can be used to mount this cache + */ + private List<CacheMountTargetProperties> mountTargets; + + /* + * Describe if a cache is Kerberos enabled. + */ + private KerberosState kerberos; + + /* + * SMB information for the cache + */ + private SmbSettings smbSettings; + + /* + * Maximum throughput in MiB/s that can be achieved by this cache volume and this will be accepted as input only for + * manual qosType cache + */ + private Float throughputMibps; + + /* + * Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel + */ + private Float actualThroughputMibps; + + /* + * Source of key used to encrypt data in the cache. Applicable if NetApp account has encryption.keySource = + * 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault' + */ + private EncryptionKeySource encryptionKeySource; + + /* + * The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable + * if encryptionKeySource = 'Microsoft.KeyVault'. + */ + private String keyVaultPrivateEndpointResourceId; + + /* + * Maximum number of files allowed. + */ + private Long maximumNumberOfFiles; + + /* + * Specifies if the cache is encryption or not. + */ + private EncryptionState encryption; + + /* + * Language supported for volume. + */ + private VolumeLanguage language; + + /* + * Specifies whether LDAP is enabled or not for flexcache volume. + */ + private LdapState ldap; + + /* + * Specifies the type of LDAP server for flexcache volume. + */ + private LdapServerType ldapServerType; + + /* + * Origin cluster information + */ + private OriginClusterInformation originClusterInformation; + + /* + * Flag indicating whether a CIFS change notification is enabled for the cache. + */ + private CifsChangeNotifyState cifsChangeNotifications; + + /* + * Flag indicating whether the global file lock is enabled for the cache. + */ + private GlobalFileLockingState globalFileLocking; + + /* + * Flag indicating whether writeback is enabled for the cache. + */ + private EnableWriteBackState writeBack; + + /** + * Creates an instance of CacheProperties class. + */ + public CacheProperties() { + } + + /** + * Get the filepath property: The file path of the Cache. + * + * @return the filepath value. + */ + public String filepath() { + return this.filepath; + } + + /** + * Set the filepath property: The file path of the Cache. + * + * @param filepath the filepath value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withFilepath(String filepath) { + this.filepath = filepath; + return this; + } + + /** + * Get the size property: Maximum storage quota allowed for a file system in bytes. Valid values are in the range + * 50GiB to 1PiB. Values expressed in bytes as multiples of 1GiB. + * + * @return the size value. + */ + public long size() { + return this.size; + } + + /** + * Set the size property: Maximum storage quota allowed for a file system in bytes. Valid values are in the range + * 50GiB to 1PiB. Values expressed in bytes as multiples of 1GiB. + * + * @param size the size value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withSize(long size) { + this.size = size; + return this; + } + + /** + * Get the exportPolicy property: Set of export policy rules. + * + * @return the exportPolicy value. + */ + public List<ExportPolicyRule> exportPolicy() { + return this.exportPolicy; + } + + /** + * Set the exportPolicy property: Set of export policy rules. + * + * @param exportPolicy the exportPolicy value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withExportPolicy(List<ExportPolicyRule> exportPolicy) { + this.exportPolicy = exportPolicy; + return this; + } + + /** + * Get the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. + * + * @return the protocolTypes value. + */ + public List<ProtocolTypes> protocolTypes() { + return this.protocolTypes; + } + + /** + * Set the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. + * + * @param protocolTypes the protocolTypes value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withProtocolTypes(List<ProtocolTypes> protocolTypes) { + this.protocolTypes = protocolTypes; + return this; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public CacheProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the cacheState property: Azure NetApp Files Cache lifecycle management. + * + * @return the cacheState value. + */ + public CacheLifeCycleState cacheState() { + return this.cacheState; + } + + /** + * Get the cacheSubnetResourceId property: The Azure Resource URI for a delegated cache subnet that will be used to + * allocate data IPs. + * + * @return the cacheSubnetResourceId value. + */ + public String cacheSubnetResourceId() { + return this.cacheSubnetResourceId; + } + + /** + * Set the cacheSubnetResourceId property: The Azure Resource URI for a delegated cache subnet that will be used to + * allocate data IPs. + * + * @param cacheSubnetResourceId the cacheSubnetResourceId value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withCacheSubnetResourceId(String cacheSubnetResourceId) { + this.cacheSubnetResourceId = cacheSubnetResourceId; + return this; + } + + /** + * Get the peeringSubnetResourceId property: The Azure Resource URI for a delegated subnet that will be used for ANF + * Intercluster Interface IP addresses. + * + * @return the peeringSubnetResourceId value. + */ + public String peeringSubnetResourceId() { + return this.peeringSubnetResourceId; + } + + /** + * Set the peeringSubnetResourceId property: The Azure Resource URI for a delegated subnet that will be used for ANF + * Intercluster Interface IP addresses. + * + * @param peeringSubnetResourceId the peeringSubnetResourceId value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withPeeringSubnetResourceId(String peeringSubnetResourceId) { + this.peeringSubnetResourceId = peeringSubnetResourceId; + return this; + } + + /** + * Get the mountTargets property: List of mount targets that can be used to mount this cache. + * + * @return the mountTargets value. + */ + public List<CacheMountTargetProperties> mountTargets() { + return this.mountTargets; + } + + /** + * Get the kerberos property: Describe if a cache is Kerberos enabled. + * + * @return the kerberos value. + */ + public KerberosState kerberos() { + return this.kerberos; + } + + /** + * Set the kerberos property: Describe if a cache is Kerberos enabled. + * + * @param kerberos the kerberos value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withKerberos(KerberosState kerberos) { + this.kerberos = kerberos; + return this; + } + + /** + * Get the smbSettings property: SMB information for the cache. + * + * @return the smbSettings value. + */ + public SmbSettings smbSettings() { + return this.smbSettings; + } + + /** + * Set the smbSettings property: SMB information for the cache. + * + * @param smbSettings the smbSettings value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withSmbSettings(SmbSettings smbSettings) { + this.smbSettings = smbSettings; + return this; + } + + /** + * Get the throughputMibps property: Maximum throughput in MiB/s that can be achieved by this cache volume and this + * will be accepted as input only for manual qosType cache. + * + * @return the throughputMibps value. + */ + public Float throughputMibps() { + return this.throughputMibps; + } + + /** + * Set the throughputMibps property: Maximum throughput in MiB/s that can be achieved by this cache volume and this + * will be accepted as input only for manual qosType cache. + * + * @param throughputMibps the throughputMibps value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withThroughputMibps(Float throughputMibps) { + this.throughputMibps = throughputMibps; + return this; + } + + /** + * Get the actualThroughputMibps property: Actual throughput in MiB/s for auto qosType volumes calculated based on + * size and serviceLevel. + * + * @return the actualThroughputMibps value. + */ + public Float actualThroughputMibps() { + return this.actualThroughputMibps; + } + + /** + * Get the encryptionKeySource property: Source of key used to encrypt data in the cache. Applicable if NetApp + * account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: + * 'Microsoft.NetApp, Microsoft.KeyVault'. + * + * @return the encryptionKeySource value. + */ + public EncryptionKeySource encryptionKeySource() { + return this.encryptionKeySource; + } + + /** + * Set the encryptionKeySource property: Source of key used to encrypt data in the cache. Applicable if NetApp + * account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: + * 'Microsoft.NetApp, Microsoft.KeyVault'. + * + * @param encryptionKeySource the encryptionKeySource value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withEncryptionKeySource(EncryptionKeySource encryptionKeySource) { + this.encryptionKeySource = encryptionKeySource; + return this; + } + + /** + * Get the keyVaultPrivateEndpointResourceId property: The resource ID of private endpoint for KeyVault. It must + * reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + * + * @return the keyVaultPrivateEndpointResourceId value. + */ + public String keyVaultPrivateEndpointResourceId() { + return this.keyVaultPrivateEndpointResourceId; + } + + /** + * Set the keyVaultPrivateEndpointResourceId property: The resource ID of private endpoint for KeyVault. It must + * reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + * + * @param keyVaultPrivateEndpointResourceId the keyVaultPrivateEndpointResourceId value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withKeyVaultPrivateEndpointResourceId(String keyVaultPrivateEndpointResourceId) { + this.keyVaultPrivateEndpointResourceId = keyVaultPrivateEndpointResourceId; + return this; + } + + /** + * Get the maximumNumberOfFiles property: Maximum number of files allowed. + * + * @return the maximumNumberOfFiles value. + */ + public Long maximumNumberOfFiles() { + return this.maximumNumberOfFiles; + } + + /** + * Get the encryption property: Specifies if the cache is encryption or not. + * + * @return the encryption value. + */ + public EncryptionState encryption() { + return this.encryption; + } + + /** + * Get the language property: Language supported for volume. + * + * @return the language value. + */ + public VolumeLanguage language() { + return this.language; + } + + /** + * Get the ldap property: Specifies whether LDAP is enabled or not for flexcache volume. + * + * @return the ldap value. + */ + public LdapState ldap() { + return this.ldap; + } + + /** + * Set the ldap property: Specifies whether LDAP is enabled or not for flexcache volume. + * + * @param ldap the ldap value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withLdap(LdapState ldap) { + this.ldap = ldap; + return this; + } + + /** + * Get the ldapServerType property: Specifies the type of LDAP server for flexcache volume. + * + * @return the ldapServerType value. + */ + public LdapServerType ldapServerType() { + return this.ldapServerType; + } + + /** + * Set the ldapServerType property: Specifies the type of LDAP server for flexcache volume. + * + * @param ldapServerType the ldapServerType value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withLdapServerType(LdapServerType ldapServerType) { + this.ldapServerType = ldapServerType; + return this; + } + + /** + * Get the originClusterInformation property: Origin cluster information. + * + * @return the originClusterInformation value. + */ + public OriginClusterInformation originClusterInformation() { + return this.originClusterInformation; + } + + /** + * Set the originClusterInformation property: Origin cluster information. + * + * @param originClusterInformation the originClusterInformation value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withOriginClusterInformation(OriginClusterInformation originClusterInformation) { + this.originClusterInformation = originClusterInformation; + return this; + } + + /** + * Get the cifsChangeNotifications property: Flag indicating whether a CIFS change notification is enabled for the + * cache. + * + * @return the cifsChangeNotifications value. + */ + public CifsChangeNotifyState cifsChangeNotifications() { + return this.cifsChangeNotifications; + } + + /** + * Set the cifsChangeNotifications property: Flag indicating whether a CIFS change notification is enabled for the + * cache. + * + * @param cifsChangeNotifications the cifsChangeNotifications value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withCifsChangeNotifications(CifsChangeNotifyState cifsChangeNotifications) { + this.cifsChangeNotifications = cifsChangeNotifications; + return this; + } + + /** + * Get the globalFileLocking property: Flag indicating whether the global file lock is enabled for the cache. + * + * @return the globalFileLocking value. + */ + public GlobalFileLockingState globalFileLocking() { + return this.globalFileLocking; + } + + /** + * Set the globalFileLocking property: Flag indicating whether the global file lock is enabled for the cache. + * + * @param globalFileLocking the globalFileLocking value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withGlobalFileLocking(GlobalFileLockingState globalFileLocking) { + this.globalFileLocking = globalFileLocking; + return this; + } + + /** + * Get the writeBack property: Flag indicating whether writeback is enabled for the cache. + * + * @return the writeBack value. + */ + public EnableWriteBackState writeBack() { + return this.writeBack; + } + + /** + * Set the writeBack property: Flag indicating whether writeback is enabled for the cache. + * + * @param writeBack the writeBack value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withWriteBack(EnableWriteBackState writeBack) { + this.writeBack = writeBack; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (filepath() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property filepath in model CacheProperties")); + } + if (exportPolicy() != null) { + exportPolicy().forEach(e -> e.validate()); + } + if (cacheSubnetResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property cacheSubnetResourceId in model CacheProperties")); + } + if (peeringSubnetResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property peeringSubnetResourceId in model CacheProperties")); + } + if (mountTargets() != null) { + mountTargets().forEach(e -> e.validate()); + } + if (smbSettings() != null) { + smbSettings().validate(); + } + if (encryptionKeySource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property encryptionKeySource in model CacheProperties")); + } + if (originClusterInformation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property originClusterInformation in model CacheProperties")); + } else { + originClusterInformation().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CacheProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("filepath", this.filepath); + jsonWriter.writeLongField("size", this.size); + jsonWriter.writeStringField("cacheSubnetResourceId", this.cacheSubnetResourceId); + jsonWriter.writeStringField("peeringSubnetResourceId", this.peeringSubnetResourceId); + jsonWriter.writeStringField("encryptionKeySource", + this.encryptionKeySource == null ? null : this.encryptionKeySource.toString()); + jsonWriter.writeJsonField("originClusterInformation", this.originClusterInformation); + jsonWriter.writeArrayField("exportPolicy", this.exportPolicy, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("protocolTypes", this.protocolTypes, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeStringField("kerberos", this.kerberos == null ? null : this.kerberos.toString()); + jsonWriter.writeJsonField("smbSettings", this.smbSettings); + jsonWriter.writeNumberField("throughputMibps", this.throughputMibps); + jsonWriter.writeStringField("keyVaultPrivateEndpointResourceId", this.keyVaultPrivateEndpointResourceId); + jsonWriter.writeStringField("ldap", this.ldap == null ? null : this.ldap.toString()); + jsonWriter.writeStringField("ldapServerType", + this.ldapServerType == null ? null : this.ldapServerType.toString()); + jsonWriter.writeStringField("cifsChangeNotifications", + this.cifsChangeNotifications == null ? null : this.cifsChangeNotifications.toString()); + jsonWriter.writeStringField("globalFileLocking", + this.globalFileLocking == null ? null : this.globalFileLocking.toString()); + jsonWriter.writeStringField("writeBack", this.writeBack == null ? null : this.writeBack.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CacheProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CacheProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CacheProperties. + */ + public static CacheProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CacheProperties deserializedCacheProperties = new CacheProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("filepath".equals(fieldName)) { + deserializedCacheProperties.filepath = reader.getString(); + } else if ("size".equals(fieldName)) { + deserializedCacheProperties.size = reader.getLong(); + } else if ("cacheSubnetResourceId".equals(fieldName)) { + deserializedCacheProperties.cacheSubnetResourceId = reader.getString(); + } else if ("peeringSubnetResourceId".equals(fieldName)) { + deserializedCacheProperties.peeringSubnetResourceId = reader.getString(); + } else if ("encryptionKeySource".equals(fieldName)) { + deserializedCacheProperties.encryptionKeySource + = EncryptionKeySource.fromString(reader.getString()); + } else if ("originClusterInformation".equals(fieldName)) { + deserializedCacheProperties.originClusterInformation = OriginClusterInformation.fromJson(reader); + } else if ("exportPolicy".equals(fieldName)) { + List<ExportPolicyRule> exportPolicy + = reader.readArray(reader1 -> ExportPolicyRule.fromJson(reader1)); + deserializedCacheProperties.exportPolicy = exportPolicy; + } else if ("protocolTypes".equals(fieldName)) { + List<ProtocolTypes> protocolTypes + = reader.readArray(reader1 -> ProtocolTypes.fromString(reader1.getString())); + deserializedCacheProperties.protocolTypes = protocolTypes; + } else if ("provisioningState".equals(fieldName)) { + deserializedCacheProperties.provisioningState + = CacheProvisioningState.fromString(reader.getString()); + } else if ("cacheState".equals(fieldName)) { + deserializedCacheProperties.cacheState = CacheLifeCycleState.fromString(reader.getString()); + } else if ("mountTargets".equals(fieldName)) { + List<CacheMountTargetProperties> mountTargets + = reader.readArray(reader1 -> CacheMountTargetProperties.fromJson(reader1)); + deserializedCacheProperties.mountTargets = mountTargets; + } else if ("kerberos".equals(fieldName)) { + deserializedCacheProperties.kerberos = KerberosState.fromString(reader.getString()); + } else if ("smbSettings".equals(fieldName)) { + deserializedCacheProperties.smbSettings = SmbSettings.fromJson(reader); + } else if ("throughputMibps".equals(fieldName)) { + deserializedCacheProperties.throughputMibps = reader.getNullable(JsonReader::getFloat); + } else if ("actualThroughputMibps".equals(fieldName)) { + deserializedCacheProperties.actualThroughputMibps = reader.getNullable(JsonReader::getFloat); + } else if ("keyVaultPrivateEndpointResourceId".equals(fieldName)) { + deserializedCacheProperties.keyVaultPrivateEndpointResourceId = reader.getString(); + } else if ("maximumNumberOfFiles".equals(fieldName)) { + deserializedCacheProperties.maximumNumberOfFiles = reader.getNullable(JsonReader::getLong); + } else if ("encryption".equals(fieldName)) { + deserializedCacheProperties.encryption = EncryptionState.fromString(reader.getString()); + } else if ("language".equals(fieldName)) { + deserializedCacheProperties.language = VolumeLanguage.fromString(reader.getString()); + } else if ("ldap".equals(fieldName)) { + deserializedCacheProperties.ldap = LdapState.fromString(reader.getString()); + } else if ("ldapServerType".equals(fieldName)) { + deserializedCacheProperties.ldapServerType = LdapServerType.fromString(reader.getString()); + } else if ("cifsChangeNotifications".equals(fieldName)) { + deserializedCacheProperties.cifsChangeNotifications + = CifsChangeNotifyState.fromString(reader.getString()); + } else if ("globalFileLocking".equals(fieldName)) { + deserializedCacheProperties.globalFileLocking + = GlobalFileLockingState.fromString(reader.getString()); + } else if ("writeBack".equals(fieldName)) { + deserializedCacheProperties.writeBack = EnableWriteBackState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedCacheProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProvisioningState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProvisioningState.java new file mode 100644 index 000000000000..a766df0c91ae --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Azure lifecycle management. + */ +public final class CacheProvisioningState extends ExpandableStringEnum<CacheProvisioningState> { + /** + * The resource is being created. + */ + public static final CacheProvisioningState CREATING = fromString("Creating"); + + /** + * The resource is being updated. + */ + public static final CacheProvisioningState UPDATING = fromString("Updating"); + + /** + * The resource is being deleted. + */ + public static final CacheProvisioningState DELETING = fromString("Deleting"); + + /** + * The resource is in a failed state. + */ + public static final CacheProvisioningState FAILED = fromString("Failed"); + + /** + * The resource is succeeded. + */ + public static final CacheProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Resource creation was canceled. + */ + public static final CacheProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of CacheProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CacheProvisioningState() { + } + + /** + * Creates or finds a CacheProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CacheProvisioningState. + */ + public static CacheProvisioningState fromString(String name) { + return fromString(name, CacheProvisioningState.class); + } + + /** + * Gets known CacheProvisioningState values. + * + * @return known CacheProvisioningState values. + */ + public static Collection<CacheProvisioningState> values() { + return values(CacheProvisioningState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdate.java new file mode 100644 index 000000000000..e40aeb752f63 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdate.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the Cache. + */ +@Fluent +public final class CacheUpdate implements JsonSerializable<CacheUpdate> { + /* + * Resource tags. + */ + private Map<String, String> tags; + + /* + * The resource-specific properties for this resource. + */ + private CacheUpdateProperties properties; + + /** + * Creates an instance of CacheUpdate class. + */ + public CacheUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map<String, String> tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the CacheUpdate object itself. + */ + public CacheUpdate withTags(Map<String, String> tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public CacheUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the CacheUpdate object itself. + */ + public CacheUpdate withProperties(CacheUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CacheUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CacheUpdate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the CacheUpdate. + */ + public static CacheUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CacheUpdate deserializedCacheUpdate = new CacheUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedCacheUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedCacheUpdate.properties = CacheUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCacheUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdateProperties.java new file mode 100644 index 000000000000..79353a2528ca --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdateProperties.java @@ -0,0 +1,314 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The updatable properties of the Cache. + */ +@Fluent +public final class CacheUpdateProperties implements JsonSerializable<CacheUpdateProperties> { + /* + * Maximum storage quota allowed for a file system in bytes. Valid values are in the range 50GiB to 1PiB. Values + * expressed in bytes as multiples of 1GiB. + */ + private Long size; + + /* + * Set of export policy rules + */ + private List<ExportPolicyRule> exportPolicy; + + /* + * Set of protocol types, default NFSv3, CIFS for SMB protocol + */ + private List<ProtocolTypes> protocolTypes; + + /* + * SMB information for the cache + */ + private SmbSettings smbSettings; + + /* + * Maximum throughput in MiB/s that can be achieved by this cache volume and this will be accepted as input only for + * manual qosType cache + */ + private Float throughputMibps; + + /* + * The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable + * if encryptionKeySource = 'Microsoft.KeyVault'. + */ + private String keyVaultPrivateEndpointResourceId; + + /* + * Flag indicating whether a CIFS change notification is enabled for the cache. + */ + private CifsChangeNotifyState cifsChangeNotifications; + + /* + * Flag indicating whether writeback is enabled for the cache. + */ + private EnableWriteBackState writeBack; + + /** + * Creates an instance of CacheUpdateProperties class. + */ + public CacheUpdateProperties() { + } + + /** + * Get the size property: Maximum storage quota allowed for a file system in bytes. Valid values are in the range + * 50GiB to 1PiB. Values expressed in bytes as multiples of 1GiB. + * + * @return the size value. + */ + public Long size() { + return this.size; + } + + /** + * Set the size property: Maximum storage quota allowed for a file system in bytes. Valid values are in the range + * 50GiB to 1PiB. Values expressed in bytes as multiples of 1GiB. + * + * @param size the size value to set. + * @return the CacheUpdateProperties object itself. + */ + public CacheUpdateProperties withSize(Long size) { + this.size = size; + return this; + } + + /** + * Get the exportPolicy property: Set of export policy rules. + * + * @return the exportPolicy value. + */ + public List<ExportPolicyRule> exportPolicy() { + return this.exportPolicy; + } + + /** + * Set the exportPolicy property: Set of export policy rules. + * + * @param exportPolicy the exportPolicy value to set. + * @return the CacheUpdateProperties object itself. + */ + public CacheUpdateProperties withExportPolicy(List<ExportPolicyRule> exportPolicy) { + this.exportPolicy = exportPolicy; + return this; + } + + /** + * Get the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. + * + * @return the protocolTypes value. + */ + public List<ProtocolTypes> protocolTypes() { + return this.protocolTypes; + } + + /** + * Set the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. + * + * @param protocolTypes the protocolTypes value to set. + * @return the CacheUpdateProperties object itself. + */ + public CacheUpdateProperties withProtocolTypes(List<ProtocolTypes> protocolTypes) { + this.protocolTypes = protocolTypes; + return this; + } + + /** + * Get the smbSettings property: SMB information for the cache. + * + * @return the smbSettings value. + */ + public SmbSettings smbSettings() { + return this.smbSettings; + } + + /** + * Set the smbSettings property: SMB information for the cache. + * + * @param smbSettings the smbSettings value to set. + * @return the CacheUpdateProperties object itself. + */ + public CacheUpdateProperties withSmbSettings(SmbSettings smbSettings) { + this.smbSettings = smbSettings; + return this; + } + + /** + * Get the throughputMibps property: Maximum throughput in MiB/s that can be achieved by this cache volume and this + * will be accepted as input only for manual qosType cache. + * + * @return the throughputMibps value. + */ + public Float throughputMibps() { + return this.throughputMibps; + } + + /** + * Set the throughputMibps property: Maximum throughput in MiB/s that can be achieved by this cache volume and this + * will be accepted as input only for manual qosType cache. + * + * @param throughputMibps the throughputMibps value to set. + * @return the CacheUpdateProperties object itself. + */ + public CacheUpdateProperties withThroughputMibps(Float throughputMibps) { + this.throughputMibps = throughputMibps; + return this; + } + + /** + * Get the keyVaultPrivateEndpointResourceId property: The resource ID of private endpoint for KeyVault. It must + * reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + * + * @return the keyVaultPrivateEndpointResourceId value. + */ + public String keyVaultPrivateEndpointResourceId() { + return this.keyVaultPrivateEndpointResourceId; + } + + /** + * Set the keyVaultPrivateEndpointResourceId property: The resource ID of private endpoint for KeyVault. It must + * reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + * + * @param keyVaultPrivateEndpointResourceId the keyVaultPrivateEndpointResourceId value to set. + * @return the CacheUpdateProperties object itself. + */ + public CacheUpdateProperties withKeyVaultPrivateEndpointResourceId(String keyVaultPrivateEndpointResourceId) { + this.keyVaultPrivateEndpointResourceId = keyVaultPrivateEndpointResourceId; + return this; + } + + /** + * Get the cifsChangeNotifications property: Flag indicating whether a CIFS change notification is enabled for the + * cache. + * + * @return the cifsChangeNotifications value. + */ + public CifsChangeNotifyState cifsChangeNotifications() { + return this.cifsChangeNotifications; + } + + /** + * Set the cifsChangeNotifications property: Flag indicating whether a CIFS change notification is enabled for the + * cache. + * + * @param cifsChangeNotifications the cifsChangeNotifications value to set. + * @return the CacheUpdateProperties object itself. + */ + public CacheUpdateProperties withCifsChangeNotifications(CifsChangeNotifyState cifsChangeNotifications) { + this.cifsChangeNotifications = cifsChangeNotifications; + return this; + } + + /** + * Get the writeBack property: Flag indicating whether writeback is enabled for the cache. + * + * @return the writeBack value. + */ + public EnableWriteBackState writeBack() { + return this.writeBack; + } + + /** + * Set the writeBack property: Flag indicating whether writeback is enabled for the cache. + * + * @param writeBack the writeBack value to set. + * @return the CacheUpdateProperties object itself. + */ + public CacheUpdateProperties withWriteBack(EnableWriteBackState writeBack) { + this.writeBack = writeBack; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (exportPolicy() != null) { + exportPolicy().forEach(e -> e.validate()); + } + if (smbSettings() != null) { + smbSettings().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("size", this.size); + jsonWriter.writeArrayField("exportPolicy", this.exportPolicy, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("protocolTypes", this.protocolTypes, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeJsonField("smbSettings", this.smbSettings); + jsonWriter.writeNumberField("throughputMibps", this.throughputMibps); + jsonWriter.writeStringField("keyVaultPrivateEndpointResourceId", this.keyVaultPrivateEndpointResourceId); + jsonWriter.writeStringField("cifsChangeNotifications", + this.cifsChangeNotifications == null ? null : this.cifsChangeNotifications.toString()); + jsonWriter.writeStringField("writeBack", this.writeBack == null ? null : this.writeBack.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CacheUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CacheUpdateProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the CacheUpdateProperties. + */ + public static CacheUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CacheUpdateProperties deserializedCacheUpdateProperties = new CacheUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedCacheUpdateProperties.size = reader.getNullable(JsonReader::getLong); + } else if ("exportPolicy".equals(fieldName)) { + List<ExportPolicyRule> exportPolicy + = reader.readArray(reader1 -> ExportPolicyRule.fromJson(reader1)); + deserializedCacheUpdateProperties.exportPolicy = exportPolicy; + } else if ("protocolTypes".equals(fieldName)) { + List<ProtocolTypes> protocolTypes + = reader.readArray(reader1 -> ProtocolTypes.fromString(reader1.getString())); + deserializedCacheUpdateProperties.protocolTypes = protocolTypes; + } else if ("smbSettings".equals(fieldName)) { + deserializedCacheUpdateProperties.smbSettings = SmbSettings.fromJson(reader); + } else if ("throughputMibps".equals(fieldName)) { + deserializedCacheUpdateProperties.throughputMibps = reader.getNullable(JsonReader::getFloat); + } else if ("keyVaultPrivateEndpointResourceId".equals(fieldName)) { + deserializedCacheUpdateProperties.keyVaultPrivateEndpointResourceId = reader.getString(); + } else if ("cifsChangeNotifications".equals(fieldName)) { + deserializedCacheUpdateProperties.cifsChangeNotifications + = CifsChangeNotifyState.fromString(reader.getString()); + } else if ("writeBack".equals(fieldName)) { + deserializedCacheUpdateProperties.writeBack = EnableWriteBackState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedCacheUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Caches.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Caches.java new file mode 100644 index 000000000000..7a67b8b70775 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Caches.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Caches. + */ +public interface Caches { + /** + * Get the details of the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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 details of the specified Cache along with {@link Response}. + */ + Response<Cache> getWithResponse(String resourceGroupName, String accountName, String poolName, String cacheName, + Context context); + + /** + * Get the details of the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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 details of the specified Cache. + */ + Cache get(String resourceGroupName, String accountName, String poolName, String cacheName); + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String poolName, String cacheName); + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String poolName, String cacheName, Context context); + + /** + * List all Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Cache resources as paginated response with {@link PagedIterable}. + */ + PagedIterable<Cache> listByCapacityPools(String resourceGroupName, String accountName, String poolName); + + /** + * List all Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Cache resources as paginated response with {@link PagedIterable}. + */ + PagedIterable<Cache> listByCapacityPools(String resourceGroupName, String accountName, String poolName, + Context context); + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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 containing peering passphrases and commands for cluster and vserver peering along with + * {@link Response}. + */ + Response<PeeringPassphrases> listPeeringPassphrasesWithResponse(String resourceGroupName, String accountName, + String poolName, String cacheName, Context context); + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache 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 containing peering passphrases and commands for cluster and vserver peering. + */ + PeeringPassphrases listPeeringPassphrases(String resourceGroupName, String accountName, String poolName, + String cacheName); + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Cache poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + PoolChangeRequest body); + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Cache poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + PoolChangeRequest body, Context context); + + /** + * Get the details of the specified Cache. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified Cache along with {@link Response}. + */ + Cache getById(String id); + + /** + * Get the details of the specified Cache. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified Cache along with {@link Response}. + */ + Response<Cache> getByIdWithResponse(String id, Context context); + + /** + * Delete the specified cache. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete the specified cache. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Cache resource. + * + * @param name resource name. + * @return the first stage of the new Cache definition. + */ + Cache.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChangeZoneRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChangeZoneRequest.java new file mode 100644 index 000000000000..752861d01369 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChangeZoneRequest.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Changes the zone for the Zone Redundant elastic capacity pool. + */ +@Fluent +public final class ChangeZoneRequest implements JsonSerializable<ChangeZoneRequest> { + /* + * Availability zone to move Zone Redundant elastic capacity pool to + */ + private String newZone; + + /** + * Creates an instance of ChangeZoneRequest class. + */ + public ChangeZoneRequest() { + } + + /** + * Get the newZone property: Availability zone to move Zone Redundant elastic capacity pool to. + * + * @return the newZone value. + */ + public String newZone() { + return this.newZone; + } + + /** + * Set the newZone property: Availability zone to move Zone Redundant elastic capacity pool to. + * + * @param newZone the newZone value to set. + * @return the ChangeZoneRequest object itself. + */ + public ChangeZoneRequest withNewZone(String newZone) { + this.newZone = newZone; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (newZone() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property newZone in model ChangeZoneRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ChangeZoneRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("newZone", this.newZone); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeZoneRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeZoneRequest if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ChangeZoneRequest. + */ + public static ChangeZoneRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeZoneRequest deserializedChangeZoneRequest = new ChangeZoneRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("newZone".equals(fieldName)) { + deserializedChangeZoneRequest.newZone = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeZoneRequest; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityReason.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityReason.java new file mode 100644 index 000000000000..3b1409dad2b9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityReason.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Availability reason. + */ +public final class CheckElasticResourceAvailabilityReason + extends ExpandableStringEnum<CheckElasticResourceAvailabilityReason> { + /** + * Value indicating the name provided does not match Azure NetApp Files naming requirements. + */ + public static final CheckElasticResourceAvailabilityReason INVALID = fromString("Invalid"); + + /** + * Value indicating the name is already in use and is therefore unavailable. + */ + public static final CheckElasticResourceAvailabilityReason ALREADY_EXISTS = fromString("AlreadyExists"); + + /** + * Creates a new instance of CheckElasticResourceAvailabilityReason value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CheckElasticResourceAvailabilityReason() { + } + + /** + * Creates or finds a CheckElasticResourceAvailabilityReason from its string representation. + * + * @param name a name to look for. + * @return the corresponding CheckElasticResourceAvailabilityReason. + */ + public static CheckElasticResourceAvailabilityReason fromString(String name) { + return fromString(name, CheckElasticResourceAvailabilityReason.class); + } + + /** + * Gets known CheckElasticResourceAvailabilityReason values. + * + * @return known CheckElasticResourceAvailabilityReason values. + */ + public static Collection<CheckElasticResourceAvailabilityReason> values() { + return values(CheckElasticResourceAvailabilityReason.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityResponse.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityResponse.java new file mode 100644 index 000000000000..5af7e272e2e4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityResponse.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner; + +/** + * An immutable client-side representation of CheckElasticResourceAvailabilityResponse. + */ +public interface CheckElasticResourceAvailabilityResponse { + /** + * Gets the isAvailable property: True indicates name is valid and available. False indicates the name is invalid, + * unavailable, or both. + * + * @return the isAvailable value. + */ + CheckElasticResourceAvailabilityStatus isAvailable(); + + /** + * Gets the reason property: Invalid indicates the name provided does not match Azure NetApp Files naming + * requirements. AlreadyExists indicates that the name is already in use and is therefore unavailable. + * + * @return the reason value. + */ + CheckElasticResourceAvailabilityReason reason(); + + /** + * Gets the message property: If reason == invalid, provide the user with the reason why the given name is invalid, + * and provide the resource naming requirements so that the user can select a valid name. If reason == + * AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + * + * @return the message value. + */ + String message(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner + * object. + * + * @return the inner object. + */ + CheckElasticResourceAvailabilityResponseInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityStatus.java new file mode 100644 index 000000000000..166f957b4018 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityStatus.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Availability status. + */ +public final class CheckElasticResourceAvailabilityStatus + extends ExpandableStringEnum<CheckElasticResourceAvailabilityStatus> { + /** + * Value indicating the name is valid and available. + */ + public static final CheckElasticResourceAvailabilityStatus TRUE = fromString("True"); + + /** + * Value indicating the the name is invalid, unavailable, or both. + */ + public static final CheckElasticResourceAvailabilityStatus FALSE = fromString("False"); + + /** + * Creates a new instance of CheckElasticResourceAvailabilityStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CheckElasticResourceAvailabilityStatus() { + } + + /** + * Creates or finds a CheckElasticResourceAvailabilityStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding CheckElasticResourceAvailabilityStatus. + */ + public static CheckElasticResourceAvailabilityStatus fromString(String name) { + return fromString(name, CheckElasticResourceAvailabilityStatus.class); + } + + /** + * Gets known CheckElasticResourceAvailabilityStatus values. + * + * @return known CheckElasticResourceAvailabilityStatus values. + */ + public static Collection<CheckElasticResourceAvailabilityStatus> values() { + return values(CheckElasticResourceAvailabilityStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticVolumeFilePathAvailabilityRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticVolumeFilePathAvailabilityRequest.java new file mode 100644 index 000000000000..b12b14137a72 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticVolumeFilePathAvailabilityRequest.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * File path availability request content - availability is based on the elastic volume filePath within the given + * elastic capacityPool. + */ +@Fluent +public final class CheckElasticVolumeFilePathAvailabilityRequest + implements JsonSerializable<CheckElasticVolumeFilePathAvailabilityRequest> { + /* + * A unique file path for the volume. Used when creating mount targets. This needs to be unique within the elastic + * capacity pool. + */ + private String filePath; + + /** + * Creates an instance of CheckElasticVolumeFilePathAvailabilityRequest class. + */ + public CheckElasticVolumeFilePathAvailabilityRequest() { + } + + /** + * Get the filePath property: A unique file path for the volume. Used when creating mount targets. This needs to be + * unique within the elastic capacity pool. + * + * @return the filePath value. + */ + public String filePath() { + return this.filePath; + } + + /** + * Set the filePath property: A unique file path for the volume. Used when creating mount targets. This needs to be + * unique within the elastic capacity pool. + * + * @param filePath the filePath value to set. + * @return the CheckElasticVolumeFilePathAvailabilityRequest object itself. + */ + public CheckElasticVolumeFilePathAvailabilityRequest withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (filePath() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property filePath in model CheckElasticVolumeFilePathAvailabilityRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CheckElasticVolumeFilePathAvailabilityRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("filePath", this.filePath); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CheckElasticVolumeFilePathAvailabilityRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CheckElasticVolumeFilePathAvailabilityRequest if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CheckElasticVolumeFilePathAvailabilityRequest. + */ + public static CheckElasticVolumeFilePathAvailabilityRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CheckElasticVolumeFilePathAvailabilityRequest deserializedCheckElasticVolumeFilePathAvailabilityRequest + = new CheckElasticVolumeFilePathAvailabilityRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("filePath".equals(fieldName)) { + deserializedCheckElasticVolumeFilePathAvailabilityRequest.filePath = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCheckElasticVolumeFilePathAvailabilityRequest; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CifsChangeNotifyState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CifsChangeNotifyState.java new file mode 100644 index 000000000000..b2a3862200f2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CifsChangeNotifyState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Flag indicating whether a CIFS change notification is enabled for the cache. + */ +public final class CifsChangeNotifyState extends ExpandableStringEnum<CifsChangeNotifyState> { + /** + * CIFS change notification is disabled. + */ + public static final CifsChangeNotifyState DISABLED = fromString("Disabled"); + + /** + * CIFS change notification is enabled. + */ + public static final CifsChangeNotifyState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of CifsChangeNotifyState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CifsChangeNotifyState() { + } + + /** + * Creates or finds a CifsChangeNotifyState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CifsChangeNotifyState. + */ + public static CifsChangeNotifyState fromString(String name) { + return fromString(name, CifsChangeNotifyState.class); + } + + /** + * Gets known CifsChangeNotifyState values. + * + * @return known CifsChangeNotifyState values. + */ + public static Collection<CifsChangeNotifyState> values() { + return values(CifsChangeNotifyState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CifsUser.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CifsUser.java new file mode 100644 index 000000000000..e7e9d63eb7d6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CifsUser.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The effective CIFS username when accessing the volume data. + */ +@Fluent +public final class CifsUser implements JsonSerializable<CifsUser> { + /* + * The CIFS user's username + */ + private String username; + + /** + * Creates an instance of CifsUser class. + */ + public CifsUser() { + } + + /** + * Get the username property: The CIFS user's username. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: The CIFS user's username. + * + * @param username the username value to set. + * @return the CifsUser object itself. + */ + public CifsUser withUsername(String username) { + this.username = username; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("username", this.username); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CifsUser from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CifsUser if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the CifsUser. + */ + public static CifsUser fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CifsUser deserializedCifsUser = new CifsUser(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("username".equals(fieldName)) { + deserializedCifsUser.username = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCifsUser; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CredentialsStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CredentialsStatus.java new file mode 100644 index 000000000000..8505b62e8d69 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CredentialsStatus.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The bucket credentials status. There states: + * + * "NoCredentialsSet": Access and Secret key pair have not been generated. + * "CredentialsExpired": Access and Secret key pair have expired. + * "Active": The certificate has been installed and credentials are unexpired. + */ +public final class CredentialsStatus extends ExpandableStringEnum<CredentialsStatus> { + /** + * Access and Secret key pair have not been generated. + */ + public static final CredentialsStatus NO_CREDENTIALS_SET = fromString("NoCredentialsSet"); + + /** + * Access and Secret key pair have expired. + */ + public static final CredentialsStatus CREDENTIALS_EXPIRED = fromString("CredentialsExpired"); + + /** + * The certificate has been installed on the bucket server and the bucket credentials are unexpired. + */ + public static final CredentialsStatus ACTIVE = fromString("Active"); + + /** + * Creates a new instance of CredentialsStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CredentialsStatus() { + } + + /** + * Creates or finds a CredentialsStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding CredentialsStatus. + */ + public static CredentialsStatus fromString(String name) { + return fromString(name, CredentialsStatus.class); + } + + /** + * Gets known CredentialsStatus values. + * + * @return known CredentialsStatus values. + */ + public static Collection<CredentialsStatus> values() { + return values(CredentialsStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DayOfWeek.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DayOfWeek.java new file mode 100644 index 000000000000..d53a7d76ef8d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DayOfWeek.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Day of the week. + */ +public final class DayOfWeek extends ExpandableStringEnum<DayOfWeek> { + /** + * Take a snapshot each Sunday. + */ + public static final DayOfWeek SUNDAY = fromString("Sunday"); + + /** + * Take a snapshot each Monday. + */ + public static final DayOfWeek MONDAY = fromString("Monday"); + + /** + * Take a snapshot each Tuesday. + */ + public static final DayOfWeek TUESDAY = fromString("Tuesday"); + + /** + * Take a snapshot each Wednesday. + */ + public static final DayOfWeek WEDNESDAY = fromString("Wednesday"); + + /** + * Take a snapshot each Thursday. + */ + public static final DayOfWeek THURSDAY = fromString("Thursday"); + + /** + * Take a snapshot each Friday. + */ + public static final DayOfWeek FRIDAY = fromString("Friday"); + + /** + * Take a snapshot each Saturday. + */ + public static final DayOfWeek SATURDAY = fromString("Saturday"); + + /** + * Creates a new instance of DayOfWeek value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DayOfWeek() { + } + + /** + * Creates or finds a DayOfWeek from its string representation. + * + * @param name a name to look for. + * @return the corresponding DayOfWeek. + */ + public static DayOfWeek fromString(String name) { + return fromString(name, DayOfWeek.class); + } + + /** + * Gets known DayOfWeek values. + * + * @return known DayOfWeek values. + */ + public static Collection<DayOfWeek> values() { + return values(DayOfWeek.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DesiredRansomwareProtectionState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DesiredRansomwareProtectionState.java new file mode 100644 index 000000000000..33027f8f5185 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DesiredRansomwareProtectionState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The desired state of the Advanced Ransomware Protection feature. + */ +public final class DesiredRansomwareProtectionState extends ExpandableStringEnum<DesiredRansomwareProtectionState> { + /** + * Advanced Ransomware Protection is disabled. + */ + public static final DesiredRansomwareProtectionState DISABLED = fromString("Disabled"); + + /** + * Advanced Ransomware Protection is enabled. + */ + public static final DesiredRansomwareProtectionState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of DesiredRansomwareProtectionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DesiredRansomwareProtectionState() { + } + + /** + * Creates or finds a DesiredRansomwareProtectionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DesiredRansomwareProtectionState. + */ + public static DesiredRansomwareProtectionState fromString(String name) { + return fromString(name, DesiredRansomwareProtectionState.class); + } + + /** + * Gets known DesiredRansomwareProtectionState values. + * + * @return known DesiredRansomwareProtectionState values. + */ + public static Collection<DesiredRansomwareProtectionState> values() { + return values(DesiredRansomwareProtectionState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccount.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccount.java new file mode 100644 index 000000000000..74a275dbed06 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccount.java @@ -0,0 +1,309 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner; +import java.util.Map; + +/** + * An immutable client-side representation of ElasticAccount. + */ +public interface ElasticAccount { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map<String, String> tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticAccountProperties properties(); + + /** + * Gets the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + String eTag(); + + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner object. + * + * @return the inner object. + */ + ElasticAccountInner innerModel(); + + /** + * The entirety of the ElasticAccount definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The ElasticAccount definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticAccount definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ElasticAccount definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the ElasticAccount definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the ElasticAccount definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithIdentity { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticAccount create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticAccount create(Context context); + } + + /** + * The stage of the ElasticAccount definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map<String, String> tags); + } + + /** + * The stage of the ElasticAccount definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticAccountProperties properties); + } + + /** + * The stage of the ElasticAccount definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + } + + /** + * Begins update for the ElasticAccount resource. + * + * @return the stage of resource update. + */ + ElasticAccount.Update update(); + + /** + * The template for ElasticAccount update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticAccount apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticAccount apply(Context context); + } + + /** + * The ElasticAccount update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticAccount update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map<String, String> tags); + } + + /** + * The stage of the ElasticAccount update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the ElasticAccount update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ElasticAccountUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticAccount refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticAccount refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountProperties.java new file mode 100644 index 000000000000..ba88af2cec9b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountProperties.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * NetApp elastic account properties. + */ +@Fluent +public final class ElasticAccountProperties implements JsonSerializable<ElasticAccountProperties> { + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /* + * Encryption settings + */ + private ElasticEncryption encryption; + + /** + * Creates an instance of ElasticAccountProperties class. + */ + public ElasticAccountProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the encryption property: Encryption settings. + * + * @return the encryption value. + */ + public ElasticEncryption encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Encryption settings. + * + * @param encryption the encryption value to set. + * @return the ElasticAccountProperties object itself. + */ + public ElasticAccountProperties withEncryption(ElasticEncryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryption() != null) { + encryption().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("encryption", this.encryption); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticAccountProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticAccountProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticAccountProperties. + */ + public static ElasticAccountProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticAccountProperties deserializedElasticAccountProperties = new ElasticAccountProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedElasticAccountProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("encryption".equals(fieldName)) { + deserializedElasticAccountProperties.encryption = ElasticEncryption.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticAccountProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdate.java new file mode 100644 index 000000000000..73c6fe0da659 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdate.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ElasticAccount. + */ +@Fluent +public final class ElasticAccountUpdate implements JsonSerializable<ElasticAccountUpdate> { + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + + /* + * Resource tags. + */ + private Map<String, String> tags; + + /* + * The resource-specific properties for this resource. + */ + private ElasticAccountUpdateProperties properties; + + /** + * Creates an instance of ElasticAccountUpdate class. + */ + public ElasticAccountUpdate() { + } + + /** + * 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 ElasticAccountUpdate object itself. + */ + public ElasticAccountUpdate withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map<String, String> tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ElasticAccountUpdate object itself. + */ + public ElasticAccountUpdate withTags(Map<String, String> tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticAccountUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticAccountUpdate object itself. + */ + public ElasticAccountUpdate withProperties(ElasticAccountUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticAccountUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticAccountUpdate if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticAccountUpdate. + */ + public static ElasticAccountUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticAccountUpdate deserializedElasticAccountUpdate = new ElasticAccountUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identity".equals(fieldName)) { + deserializedElasticAccountUpdate.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticAccountUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedElasticAccountUpdate.properties = ElasticAccountUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticAccountUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdateProperties.java new file mode 100644 index 000000000000..10032af75144 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdateProperties.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The updatable properties of the ElasticAccount. + */ +@Fluent +public final class ElasticAccountUpdateProperties implements JsonSerializable<ElasticAccountUpdateProperties> { + /* + * Encryption settings + */ + private ElasticEncryption encryption; + + /** + * Creates an instance of ElasticAccountUpdateProperties class. + */ + public ElasticAccountUpdateProperties() { + } + + /** + * Get the encryption property: Encryption settings. + * + * @return the encryption value. + */ + public ElasticEncryption encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Encryption settings. + * + * @param encryption the encryption value to set. + * @return the ElasticAccountUpdateProperties object itself. + */ + public ElasticAccountUpdateProperties withEncryption(ElasticEncryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryption() != null) { + encryption().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("encryption", this.encryption); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticAccountUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticAccountUpdateProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticAccountUpdateProperties. + */ + public static ElasticAccountUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticAccountUpdateProperties deserializedElasticAccountUpdateProperties + = new ElasticAccountUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("encryption".equals(fieldName)) { + deserializedElasticAccountUpdateProperties.encryption = ElasticEncryption.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticAccountUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccounts.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccounts.java new file mode 100644 index 000000000000..d0a352417a67 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccounts.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ElasticAccounts. + */ +public interface ElasticAccounts { + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account along with {@link Response}. + */ + Response<ElasticAccount> getByResourceGroupWithResponse(String resourceGroupName, String accountName, + Context context); + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account. + */ + ElasticAccount getByResourceGroup(String resourceGroupName, String accountName); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String accountName); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, Context context); + + /** + * List and describe all NetApp elastic accounts in the 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 ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticAccount> listByResourceGroup(String resourceGroupName); + + /** + * List and describe all NetApp elastic accounts in the 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 ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticAccount> listByResourceGroup(String resourceGroupName, Context context); + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticAccount> list(); + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticAccount> list(Context context); + + /** + * Get the NetApp Elastic Account. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account along with {@link Response}. + */ + ElasticAccount getById(String id); + + /** + * Get the NetApp Elastic Account. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account along with {@link Response}. + */ + Response<ElasticAccount> getByIdWithResponse(String id, Context context); + + /** + * Delete the specified NetApp elastic account. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete the specified NetApp elastic account. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ElasticAccount resource. + * + * @param name resource name. + * @return the first stage of the new ElasticAccount definition. + */ + ElasticAccount.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackup.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackup.java new file mode 100644 index 000000000000..5d92beb9983b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackup.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner; + +/** + * An immutable client-side representation of ElasticBackup. + */ +public interface ElasticBackup { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticBackupProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner object. + * + * @return the inner object. + */ + ElasticBackupInner innerModel(); + + /** + * The entirety of the ElasticBackup definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ElasticBackup definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticBackup definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the ElasticBackup definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName, backupVaultName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @return the next definition stage. + */ + WithCreate withExistingElasticBackupVault(String resourceGroupName, String accountName, + String backupVaultName); + } + + /** + * The stage of the ElasticBackup definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticBackup create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticBackup create(Context context); + } + + /** + * The stage of the ElasticBackup definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticBackupProperties properties); + } + } + + /** + * Begins update for the ElasticBackup resource. + * + * @return the stage of resource update. + */ + ElasticBackup.Update update(); + + /** + * The template for ElasticBackup update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticBackup apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticBackup apply(Context context); + } + + /** + * The ElasticBackup update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticBackup update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ElasticBackupProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticBackup refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticBackup refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicies.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicies.java new file mode 100644 index 000000000000..75cece14fea6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicies.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ElasticBackupPolicies. + */ +public interface ElasticBackupPolicies { + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Policy along with {@link Response}. + */ + Response<ElasticBackupPolicy> getWithResponse(String resourceGroupName, String accountName, String backupPolicyName, + Context context); + + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Policy. + */ + ElasticBackupPolicy get(String resourceGroupName, String accountName, String backupPolicyName); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String backupPolicyName); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String backupPolicyName, Context context); + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticBackupPolicy> listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticBackupPolicy> listByElasticAccount(String resourceGroupName, String accountName, + Context context); + + /** + * Get the Elastic Backup Policy. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Policy along with {@link Response}. + */ + ElasticBackupPolicy getById(String id); + + /** + * Get the Elastic Backup Policy. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Policy along with {@link Response}. + */ + Response<ElasticBackupPolicy> getByIdWithResponse(String id, Context context); + + /** + * Delete the specified Elastic Policy. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete the specified Elastic Policy. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ElasticBackupPolicy resource. + * + * @param name resource name. + * @return the first stage of the new ElasticBackupPolicy definition. + */ + ElasticBackupPolicy.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicy.java new file mode 100644 index 000000000000..c05d1474cc2a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicy.java @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner; +import java.util.Map; + +/** + * An immutable client-side representation of ElasticBackupPolicy. + */ +public interface ElasticBackupPolicy { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map<String, String> tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticBackupPolicyProperties properties(); + + /** + * Gets the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + String eTag(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner object. + * + * @return the inner object. + */ + ElasticBackupPolicyInner innerModel(); + + /** + * The entirety of the ElasticBackupPolicy definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ElasticBackupPolicy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticBackupPolicy definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ElasticBackupPolicy definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the ElasticBackupPolicy definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @return the next definition stage. + */ + WithCreate withExistingElasticAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the ElasticBackupPolicy definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticBackupPolicy create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticBackupPolicy create(Context context); + } + + /** + * The stage of the ElasticBackupPolicy definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map<String, String> tags); + } + + /** + * The stage of the ElasticBackupPolicy definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticBackupPolicyProperties properties); + } + } + + /** + * Begins update for the ElasticBackupPolicy resource. + * + * @return the stage of resource update. + */ + ElasticBackupPolicy.Update update(); + + /** + * The template for ElasticBackupPolicy update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticBackupPolicy apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticBackupPolicy apply(Context context); + } + + /** + * The ElasticBackupPolicy update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticBackupPolicy update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map<String, String> tags); + } + + /** + * The stage of the ElasticBackupPolicy update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ElasticBackupPolicyUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticBackupPolicy refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticBackupPolicy refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyProperties.java new file mode 100644 index 000000000000..a829e3c74291 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyProperties.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Backup Policy properties. + */ +@Fluent +public final class ElasticBackupPolicyProperties implements JsonSerializable<ElasticBackupPolicyProperties> { + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /* + * Daily backups count to keep + */ + private Integer dailyBackupsToKeep; + + /* + * Weekly backups count to keep + */ + private Integer weeklyBackupsToKeep; + + /* + * Monthly backups count to keep + */ + private Integer monthlyBackupsToKeep; + + /* + * The number of volumes currently using this Backup Policy. + */ + private Integer assignedVolumesCount; + + /* + * The property to identify whether Backup Policy is enabled or not + */ + private ElasticBackupPolicyState policyState; + + /** + * Creates an instance of ElasticBackupPolicyProperties class. + */ + public ElasticBackupPolicyProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the dailyBackupsToKeep property: Daily backups count to keep. + * + * @return the dailyBackupsToKeep value. + */ + public Integer dailyBackupsToKeep() { + return this.dailyBackupsToKeep; + } + + /** + * Set the dailyBackupsToKeep property: Daily backups count to keep. + * + * @param dailyBackupsToKeep the dailyBackupsToKeep value to set. + * @return the ElasticBackupPolicyProperties object itself. + */ + public ElasticBackupPolicyProperties withDailyBackupsToKeep(Integer dailyBackupsToKeep) { + this.dailyBackupsToKeep = dailyBackupsToKeep; + return this; + } + + /** + * Get the weeklyBackupsToKeep property: Weekly backups count to keep. + * + * @return the weeklyBackupsToKeep value. + */ + public Integer weeklyBackupsToKeep() { + return this.weeklyBackupsToKeep; + } + + /** + * Set the weeklyBackupsToKeep property: Weekly backups count to keep. + * + * @param weeklyBackupsToKeep the weeklyBackupsToKeep value to set. + * @return the ElasticBackupPolicyProperties object itself. + */ + public ElasticBackupPolicyProperties withWeeklyBackupsToKeep(Integer weeklyBackupsToKeep) { + this.weeklyBackupsToKeep = weeklyBackupsToKeep; + return this; + } + + /** + * Get the monthlyBackupsToKeep property: Monthly backups count to keep. + * + * @return the monthlyBackupsToKeep value. + */ + public Integer monthlyBackupsToKeep() { + return this.monthlyBackupsToKeep; + } + + /** + * Set the monthlyBackupsToKeep property: Monthly backups count to keep. + * + * @param monthlyBackupsToKeep the monthlyBackupsToKeep value to set. + * @return the ElasticBackupPolicyProperties object itself. + */ + public ElasticBackupPolicyProperties withMonthlyBackupsToKeep(Integer monthlyBackupsToKeep) { + this.monthlyBackupsToKeep = monthlyBackupsToKeep; + return this; + } + + /** + * Get the assignedVolumesCount property: The number of volumes currently using this Backup Policy. + * + * @return the assignedVolumesCount value. + */ + public Integer assignedVolumesCount() { + return this.assignedVolumesCount; + } + + /** + * Get the policyState property: The property to identify whether Backup Policy is enabled or not. + * + * @return the policyState value. + */ + public ElasticBackupPolicyState policyState() { + return this.policyState; + } + + /** + * Set the policyState property: The property to identify whether Backup Policy is enabled or not. + * + * @param policyState the policyState value to set. + * @return the ElasticBackupPolicyProperties object itself. + */ + public ElasticBackupPolicyProperties withPolicyState(ElasticBackupPolicyState policyState) { + this.policyState = policyState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("dailyBackupsToKeep", this.dailyBackupsToKeep); + jsonWriter.writeNumberField("weeklyBackupsToKeep", this.weeklyBackupsToKeep); + jsonWriter.writeNumberField("monthlyBackupsToKeep", this.monthlyBackupsToKeep); + jsonWriter.writeStringField("policyState", this.policyState == null ? null : this.policyState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupPolicyProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticBackupPolicyProperties. + */ + public static ElasticBackupPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupPolicyProperties deserializedElasticBackupPolicyProperties + = new ElasticBackupPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("dailyBackupsToKeep".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.dailyBackupsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("weeklyBackupsToKeep".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.weeklyBackupsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("monthlyBackupsToKeep".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.monthlyBackupsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("assignedVolumesCount".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.assignedVolumesCount + = reader.getNullable(JsonReader::getInt); + } else if ("policyState".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.policyState + = ElasticBackupPolicyState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupPolicyProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyState.java new file mode 100644 index 000000000000..6b507c88adf5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Elastic Backup Policy state. + */ +public final class ElasticBackupPolicyState extends ExpandableStringEnum<ElasticBackupPolicyState> { + /** + * Value indicating the policy is enabled. + */ + public static final ElasticBackupPolicyState ENABLED = fromString("Enabled"); + + /** + * Value indicating the policy is disabled. + */ + public static final ElasticBackupPolicyState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ElasticBackupPolicyState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticBackupPolicyState() { + } + + /** + * Creates or finds a ElasticBackupPolicyState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticBackupPolicyState. + */ + public static ElasticBackupPolicyState fromString(String name) { + return fromString(name, ElasticBackupPolicyState.class); + } + + /** + * Gets known ElasticBackupPolicyState values. + * + * @return known ElasticBackupPolicyState values. + */ + public static Collection<ElasticBackupPolicyState> values() { + return values(ElasticBackupPolicyState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdate.java new file mode 100644 index 000000000000..97c446acbc60 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdate.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ElasticBackupPolicy. + */ +@Fluent +public final class ElasticBackupPolicyUpdate implements JsonSerializable<ElasticBackupPolicyUpdate> { + /* + * Resource tags. + */ + private Map<String, String> tags; + + /* + * The resource-specific properties for this resource. + */ + private ElasticBackupPolicyUpdateProperties properties; + + /** + * Creates an instance of ElasticBackupPolicyUpdate class. + */ + public ElasticBackupPolicyUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map<String, String> tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ElasticBackupPolicyUpdate object itself. + */ + public ElasticBackupPolicyUpdate withTags(Map<String, String> tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticBackupPolicyUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticBackupPolicyUpdate object itself. + */ + public ElasticBackupPolicyUpdate withProperties(ElasticBackupPolicyUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupPolicyUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupPolicyUpdate if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticBackupPolicyUpdate. + */ + public static ElasticBackupPolicyUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupPolicyUpdate deserializedElasticBackupPolicyUpdate = new ElasticBackupPolicyUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticBackupPolicyUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedElasticBackupPolicyUpdate.properties + = ElasticBackupPolicyUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupPolicyUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdateProperties.java new file mode 100644 index 000000000000..feb77d0173c4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdateProperties.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The updatable properties of the ElasticBackupPolicy. + */ +@Fluent +public final class ElasticBackupPolicyUpdateProperties + implements JsonSerializable<ElasticBackupPolicyUpdateProperties> { + /* + * Daily backups count to keep + */ + private Integer dailyBackupsToKeep; + + /* + * Weekly backups count to keep + */ + private Integer weeklyBackupsToKeep; + + /* + * Monthly backups count to keep + */ + private Integer monthlyBackupsToKeep; + + /* + * The property to identify whether Backup Policy is enabled or not + */ + private ElasticBackupPolicyState policyState; + + /** + * Creates an instance of ElasticBackupPolicyUpdateProperties class. + */ + public ElasticBackupPolicyUpdateProperties() { + } + + /** + * Get the dailyBackupsToKeep property: Daily backups count to keep. + * + * @return the dailyBackupsToKeep value. + */ + public Integer dailyBackupsToKeep() { + return this.dailyBackupsToKeep; + } + + /** + * Set the dailyBackupsToKeep property: Daily backups count to keep. + * + * @param dailyBackupsToKeep the dailyBackupsToKeep value to set. + * @return the ElasticBackupPolicyUpdateProperties object itself. + */ + public ElasticBackupPolicyUpdateProperties withDailyBackupsToKeep(Integer dailyBackupsToKeep) { + this.dailyBackupsToKeep = dailyBackupsToKeep; + return this; + } + + /** + * Get the weeklyBackupsToKeep property: Weekly backups count to keep. + * + * @return the weeklyBackupsToKeep value. + */ + public Integer weeklyBackupsToKeep() { + return this.weeklyBackupsToKeep; + } + + /** + * Set the weeklyBackupsToKeep property: Weekly backups count to keep. + * + * @param weeklyBackupsToKeep the weeklyBackupsToKeep value to set. + * @return the ElasticBackupPolicyUpdateProperties object itself. + */ + public ElasticBackupPolicyUpdateProperties withWeeklyBackupsToKeep(Integer weeklyBackupsToKeep) { + this.weeklyBackupsToKeep = weeklyBackupsToKeep; + return this; + } + + /** + * Get the monthlyBackupsToKeep property: Monthly backups count to keep. + * + * @return the monthlyBackupsToKeep value. + */ + public Integer monthlyBackupsToKeep() { + return this.monthlyBackupsToKeep; + } + + /** + * Set the monthlyBackupsToKeep property: Monthly backups count to keep. + * + * @param monthlyBackupsToKeep the monthlyBackupsToKeep value to set. + * @return the ElasticBackupPolicyUpdateProperties object itself. + */ + public ElasticBackupPolicyUpdateProperties withMonthlyBackupsToKeep(Integer monthlyBackupsToKeep) { + this.monthlyBackupsToKeep = monthlyBackupsToKeep; + return this; + } + + /** + * Get the policyState property: The property to identify whether Backup Policy is enabled or not. + * + * @return the policyState value. + */ + public ElasticBackupPolicyState policyState() { + return this.policyState; + } + + /** + * Set the policyState property: The property to identify whether Backup Policy is enabled or not. + * + * @param policyState the policyState value to set. + * @return the ElasticBackupPolicyUpdateProperties object itself. + */ + public ElasticBackupPolicyUpdateProperties withPolicyState(ElasticBackupPolicyState policyState) { + this.policyState = policyState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("dailyBackupsToKeep", this.dailyBackupsToKeep); + jsonWriter.writeNumberField("weeklyBackupsToKeep", this.weeklyBackupsToKeep); + jsonWriter.writeNumberField("monthlyBackupsToKeep", this.monthlyBackupsToKeep); + jsonWriter.writeStringField("policyState", this.policyState == null ? null : this.policyState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupPolicyUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupPolicyUpdateProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticBackupPolicyUpdateProperties. + */ + public static ElasticBackupPolicyUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupPolicyUpdateProperties deserializedElasticBackupPolicyUpdateProperties + = new ElasticBackupPolicyUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dailyBackupsToKeep".equals(fieldName)) { + deserializedElasticBackupPolicyUpdateProperties.dailyBackupsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("weeklyBackupsToKeep".equals(fieldName)) { + deserializedElasticBackupPolicyUpdateProperties.weeklyBackupsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("monthlyBackupsToKeep".equals(fieldName)) { + deserializedElasticBackupPolicyUpdateProperties.monthlyBackupsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("policyState".equals(fieldName)) { + deserializedElasticBackupPolicyUpdateProperties.policyState + = ElasticBackupPolicyState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupPolicyUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupProperties.java new file mode 100644 index 000000000000..f494ee77a458 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupProperties.java @@ -0,0 +1,342 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Elastic Backup properties. + */ +@Fluent +public final class ElasticBackupProperties implements JsonSerializable<ElasticBackupProperties> { + /* + * The creation date of the backup + */ + private OffsetDateTime creationDate; + + /* + * The snapshot creation date of the backup + */ + private OffsetDateTime snapshotCreationDate; + + /* + * The completion date of the backup + */ + private OffsetDateTime completionDate; + + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /* + * Size of backup in bytes + */ + private Long size; + + /* + * Label for backup + */ + private String label; + + /* + * Type of backup Manual or Scheduled + */ + private ElasticBackupType backupType; + + /* + * Failure reason + */ + private String failureReason; + + /* + * ResourceId used to identify the Elastic Volume + */ + private String elasticVolumeResourceId; + + /* + * Manual backup using an already existing snapshot. This will always be CreateNewSnapshot for scheduled backups and + * UseExistingSnapshot/CreateNewSnapshot for manual backups + */ + private SnapshotUsage snapshotUsage; + + /* + * ResourceId used to identify the elastic snapshot resource. This is required when an existing snapshot needs to be + * used for creating a manual backup + */ + private String elasticSnapshotResourceId; + + /* + * ResourceId used to identify the elastic backup policy + */ + private String elasticBackupPolicyResourceId; + + /* + * Specifies if the backup is for a large volume. + */ + private VolumeSize volumeSize; + + /** + * Creates an instance of ElasticBackupProperties class. + */ + public ElasticBackupProperties() { + } + + /** + * Get the creationDate property: The creation date of the backup. + * + * @return the creationDate value. + */ + public OffsetDateTime creationDate() { + return this.creationDate; + } + + /** + * Get the snapshotCreationDate property: The snapshot creation date of the backup. + * + * @return the snapshotCreationDate value. + */ + public OffsetDateTime snapshotCreationDate() { + return this.snapshotCreationDate; + } + + /** + * Get the completionDate property: The completion date of the backup. + * + * @return the completionDate value. + */ + public OffsetDateTime completionDate() { + return this.completionDate; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the size property: Size of backup in bytes. + * + * @return the size value. + */ + public Long size() { + return this.size; + } + + /** + * Get the label property: Label for backup. + * + * @return the label value. + */ + public String label() { + return this.label; + } + + /** + * Set the label property: Label for backup. + * + * @param label the label value to set. + * @return the ElasticBackupProperties object itself. + */ + public ElasticBackupProperties withLabel(String label) { + this.label = label; + return this; + } + + /** + * Get the backupType property: Type of backup Manual or Scheduled. + * + * @return the backupType value. + */ + public ElasticBackupType backupType() { + return this.backupType; + } + + /** + * Get the failureReason property: Failure reason. + * + * @return the failureReason value. + */ + public String failureReason() { + return this.failureReason; + } + + /** + * Get the elasticVolumeResourceId property: ResourceId used to identify the Elastic Volume. + * + * @return the elasticVolumeResourceId value. + */ + public String elasticVolumeResourceId() { + return this.elasticVolumeResourceId; + } + + /** + * Set the elasticVolumeResourceId property: ResourceId used to identify the Elastic Volume. + * + * @param elasticVolumeResourceId the elasticVolumeResourceId value to set. + * @return the ElasticBackupProperties object itself. + */ + public ElasticBackupProperties withElasticVolumeResourceId(String elasticVolumeResourceId) { + this.elasticVolumeResourceId = elasticVolumeResourceId; + return this; + } + + /** + * Get the snapshotUsage property: Manual backup using an already existing snapshot. This will always be + * CreateNewSnapshot for scheduled backups and UseExistingSnapshot/CreateNewSnapshot for manual backups. + * + * @return the snapshotUsage value. + */ + public SnapshotUsage snapshotUsage() { + return this.snapshotUsage; + } + + /** + * Set the snapshotUsage property: Manual backup using an already existing snapshot. This will always be + * CreateNewSnapshot for scheduled backups and UseExistingSnapshot/CreateNewSnapshot for manual backups. + * + * @param snapshotUsage the snapshotUsage value to set. + * @return the ElasticBackupProperties object itself. + */ + public ElasticBackupProperties withSnapshotUsage(SnapshotUsage snapshotUsage) { + this.snapshotUsage = snapshotUsage; + return this; + } + + /** + * Get the elasticSnapshotResourceId property: ResourceId used to identify the elastic snapshot resource. This is + * required when an existing snapshot needs to be used for creating a manual backup. + * + * @return the elasticSnapshotResourceId value. + */ + public String elasticSnapshotResourceId() { + return this.elasticSnapshotResourceId; + } + + /** + * Set the elasticSnapshotResourceId property: ResourceId used to identify the elastic snapshot resource. This is + * required when an existing snapshot needs to be used for creating a manual backup. + * + * @param elasticSnapshotResourceId the elasticSnapshotResourceId value to set. + * @return the ElasticBackupProperties object itself. + */ + public ElasticBackupProperties withElasticSnapshotResourceId(String elasticSnapshotResourceId) { + this.elasticSnapshotResourceId = elasticSnapshotResourceId; + return this; + } + + /** + * Get the elasticBackupPolicyResourceId property: ResourceId used to identify the elastic backup policy. + * + * @return the elasticBackupPolicyResourceId value. + */ + public String elasticBackupPolicyResourceId() { + return this.elasticBackupPolicyResourceId; + } + + /** + * Get the volumeSize property: Specifies if the backup is for a large volume. + * + * @return the volumeSize value. + */ + public VolumeSize volumeSize() { + return this.volumeSize; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (elasticVolumeResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property elasticVolumeResourceId in model ElasticBackupProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("elasticVolumeResourceId", this.elasticVolumeResourceId); + jsonWriter.writeStringField("label", this.label); + jsonWriter.writeStringField("snapshotUsage", this.snapshotUsage == null ? null : this.snapshotUsage.toString()); + jsonWriter.writeStringField("elasticSnapshotResourceId", this.elasticSnapshotResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupProperties. + */ + public static ElasticBackupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupProperties deserializedElasticBackupProperties = new ElasticBackupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("elasticVolumeResourceId".equals(fieldName)) { + deserializedElasticBackupProperties.elasticVolumeResourceId = reader.getString(); + } else if ("creationDate".equals(fieldName)) { + deserializedElasticBackupProperties.creationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("snapshotCreationDate".equals(fieldName)) { + deserializedElasticBackupProperties.snapshotCreationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("completionDate".equals(fieldName)) { + deserializedElasticBackupProperties.completionDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedElasticBackupProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("size".equals(fieldName)) { + deserializedElasticBackupProperties.size = reader.getNullable(JsonReader::getLong); + } else if ("label".equals(fieldName)) { + deserializedElasticBackupProperties.label = reader.getString(); + } else if ("backupType".equals(fieldName)) { + deserializedElasticBackupProperties.backupType = ElasticBackupType.fromString(reader.getString()); + } else if ("failureReason".equals(fieldName)) { + deserializedElasticBackupProperties.failureReason = reader.getString(); + } else if ("snapshotUsage".equals(fieldName)) { + deserializedElasticBackupProperties.snapshotUsage = SnapshotUsage.fromString(reader.getString()); + } else if ("elasticSnapshotResourceId".equals(fieldName)) { + deserializedElasticBackupProperties.elasticSnapshotResourceId = reader.getString(); + } else if ("elasticBackupPolicyResourceId".equals(fieldName)) { + deserializedElasticBackupProperties.elasticBackupPolicyResourceId = reader.getString(); + } else if ("volumeSize".equals(fieldName)) { + deserializedElasticBackupProperties.volumeSize = VolumeSize.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupType.java new file mode 100644 index 000000000000..76dece2d90fe --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of backup. + */ +public final class ElasticBackupType extends ExpandableStringEnum<ElasticBackupType> { + /** + * Manual backup type. + */ + public static final ElasticBackupType MANUAL = fromString("Manual"); + + /** + * Scheduled backup type. + */ + public static final ElasticBackupType SCHEDULED = fromString("Scheduled"); + + /** + * Creates a new instance of ElasticBackupType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticBackupType() { + } + + /** + * Creates or finds a ElasticBackupType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticBackupType. + */ + public static ElasticBackupType fromString(String name) { + return fromString(name, ElasticBackupType.class); + } + + /** + * Gets known ElasticBackupType values. + * + * @return known ElasticBackupType values. + */ + public static Collection<ElasticBackupType> values() { + return values(ElasticBackupType.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVault.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVault.java new file mode 100644 index 000000000000..7eb3253c88b5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVault.java @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner; +import java.util.Map; + +/** + * An immutable client-side representation of ElasticBackupVault. + */ +public interface ElasticBackupVault { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map<String, String> tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticBackupVaultProperties properties(); + + /** + * Gets the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + String eTag(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner object. + * + * @return the inner object. + */ + ElasticBackupVaultInner innerModel(); + + /** + * The entirety of the ElasticBackupVault definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ElasticBackupVault definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticBackupVault definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ElasticBackupVault definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the ElasticBackupVault definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @return the next definition stage. + */ + WithCreate withExistingElasticAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the ElasticBackupVault definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticBackupVault create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticBackupVault create(Context context); + } + + /** + * The stage of the ElasticBackupVault definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map<String, String> tags); + } + + /** + * The stage of the ElasticBackupVault definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticBackupVaultProperties properties); + } + } + + /** + * Begins update for the ElasticBackupVault resource. + * + * @return the stage of resource update. + */ + ElasticBackupVault.Update update(); + + /** + * The template for ElasticBackupVault update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticBackupVault apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticBackupVault apply(Context context); + } + + /** + * The ElasticBackupVault update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticBackupVault update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map<String, String> tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticBackupVault refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticBackupVault refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultProperties.java new file mode 100644 index 000000000000..8e5406661ee9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultProperties.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Backup Vault properties. + */ +@Immutable +public final class ElasticBackupVaultProperties implements JsonSerializable<ElasticBackupVaultProperties> { + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of ElasticBackupVaultProperties class. + */ + public ElasticBackupVaultProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupVaultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupVaultProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticBackupVaultProperties. + */ + public static ElasticBackupVaultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupVaultProperties deserializedElasticBackupVaultProperties = new ElasticBackupVaultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedElasticBackupVaultProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupVaultProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultUpdate.java new file mode 100644 index 000000000000..2b73e7208cf0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultUpdate.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ElasticBackupVault. + */ +@Fluent +public final class ElasticBackupVaultUpdate implements JsonSerializable<ElasticBackupVaultUpdate> { + /* + * Resource tags. + */ + private Map<String, String> tags; + + /** + * Creates an instance of ElasticBackupVaultUpdate class. + */ + public ElasticBackupVaultUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map<String, String> tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ElasticBackupVaultUpdate object itself. + */ + public ElasticBackupVaultUpdate withTags(Map<String, String> tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupVaultUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupVaultUpdate if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticBackupVaultUpdate. + */ + public static ElasticBackupVaultUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupVaultUpdate deserializedElasticBackupVaultUpdate = new ElasticBackupVaultUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticBackupVaultUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupVaultUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaults.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaults.java new file mode 100644 index 000000000000..9f6b3c422549 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaults.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ElasticBackupVaults. + */ +public interface ElasticBackupVaults { + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Vault along with {@link Response}. + */ + Response<ElasticBackupVault> getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + Context context); + + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Vault. + */ + ElasticBackupVault get(String resourceGroupName, String accountName, String backupVaultName); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String backupVaultName); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String backupVaultName, Context context); + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticBackupVault> listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticBackupVault> listByElasticAccount(String resourceGroupName, String accountName, + Context context); + + /** + * Get the Elastic Backup Vault. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Vault along with {@link Response}. + */ + ElasticBackupVault getById(String id); + + /** + * Get the Elastic Backup Vault. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Vault along with {@link Response}. + */ + Response<ElasticBackupVault> getByIdWithResponse(String id, Context context); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ElasticBackupVault resource. + * + * @param name resource name. + * @return the first stage of the new ElasticBackupVault definition. + */ + ElasticBackupVault.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackups.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackups.java new file mode 100644 index 000000000000..e158b9e65f00 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackups.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ElasticBackups. + */ +public interface ElasticBackups { + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault along with {@link Response}. + */ + Response<ElasticBackup> getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + String backupName, Context context); + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault. + */ + ElasticBackup get(String resourceGroupName, String accountName, String backupVaultName, String backupName); + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName); + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName, + Context context); + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticBackup> listByVault(String resourceGroupName, String accountName, String backupVaultName); + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticBackup> listByVault(String resourceGroupName, String accountName, String backupVaultName, + Context context); + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault along with {@link Response}. + */ + ElasticBackup getById(String id); + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault along with {@link Response}. + */ + Response<ElasticBackup> getByIdWithResponse(String id, Context context); + + /** + * Delete a ElasticBackup. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a ElasticBackup. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ElasticBackup resource. + * + * @param name resource name. + * @return the first stage of the new ElasticBackup definition. + */ + ElasticBackup.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPool.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPool.java new file mode 100644 index 000000000000..98c16ebbd407 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPool.java @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of ElasticCapacityPool. + */ +public interface ElasticCapacityPool { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map<String, String> tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticCapacityPoolProperties properties(); + + /** + * Gets the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + String eTag(); + + /** + * Gets the zones property: The availability zones. + * + * @return the zones value. + */ + List<String> zones(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner object. + * + * @return the inner object. + */ + ElasticCapacityPoolInner innerModel(); + + /** + * The entirety of the ElasticCapacityPool definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ElasticCapacityPool definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticCapacityPool definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ElasticCapacityPool definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the ElasticCapacityPool definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @return the next definition stage. + */ + WithCreate withExistingElasticAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the ElasticCapacityPool definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithZones { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticCapacityPool create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticCapacityPool create(Context context); + } + + /** + * The stage of the ElasticCapacityPool definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map<String, String> tags); + } + + /** + * The stage of the ElasticCapacityPool definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticCapacityPoolProperties properties); + } + + /** + * The stage of the ElasticCapacityPool definition allowing to specify zones. + */ + interface WithZones { + /** + * Specifies the zones property: The availability zones.. + * + * @param zones The availability zones. + * @return the next definition stage. + */ + WithCreate withZones(List<String> zones); + } + } + + /** + * Begins update for the ElasticCapacityPool resource. + * + * @return the stage of resource update. + */ + ElasticCapacityPool.Update update(); + + /** + * The template for ElasticCapacityPool update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticCapacityPool apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticCapacityPool apply(Context context); + } + + /** + * The ElasticCapacityPool update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticCapacityPool update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map<String, String> tags); + } + + /** + * The stage of the ElasticCapacityPool update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ElasticCapacityPoolUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticCapacityPool refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticCapacityPool refresh(Context context); + + /** + * Moves pool to another zone. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ElasticCapacityPool changeZone(ChangeZoneRequest body); + + /** + * Moves pool to another zone. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ElasticCapacityPool changeZone(ChangeZoneRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource along with {@link Response}. + */ + Response<CheckElasticResourceAvailabilityResponse> checkVolumeFilePathAvailabilityWithResponse( + CheckElasticVolumeFilePathAvailabilityRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource. + */ + CheckElasticResourceAvailabilityResponse + checkVolumeFilePathAvailability(CheckElasticVolumeFilePathAvailabilityRequest body); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolProperties.java new file mode 100644 index 000000000000..4f03b65a3831 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolProperties.java @@ -0,0 +1,305 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic capacity pool properties. + */ +@Fluent +public final class ElasticCapacityPoolProperties implements JsonSerializable<ElasticCapacityPoolProperties> { + /* + * Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must be in the range 1TiB to + * 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of 1TiB till 16TiB and in + * multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + */ + private long size; + + /* + * The service level of the elastic capacity pool + */ + private ElasticServiceLevel serviceLevel; + + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /* + * Encryption settings + */ + private ElasticEncryptionConfiguration encryption; + + /* + * Total throughput of the pool in MiB/s + */ + private Double totalThroughputMibps; + + /* + * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/elasticVolumes, this is + * used by all the volumes within the pool + */ + private String subnetResourceId; + + /* + * Indicates the current zone of the pool. This can be changed for zoneRedundant service level pool with the + * changeZone action + */ + private String currentZone; + + /* + * Current availability status of the resource. + */ + private ElasticResourceAvailabilityStatus availabilityStatus; + + /* + * The Azure Resource URI for an Active Directory configuration. This is used by all the SMB volumes within the pool + */ + private String activeDirectoryConfigResourceId; + + /** + * Creates an instance of ElasticCapacityPoolProperties class. + */ + public ElasticCapacityPoolProperties() { + } + + /** + * Get the size property: Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must + * be in the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of + * 1TiB till 16TiB and in multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + * + * @return the size value. + */ + public long size() { + return this.size; + } + + /** + * Set the size property: Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must + * be in the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of + * 1TiB till 16TiB and in multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + * + * @param size the size value to set. + * @return the ElasticCapacityPoolProperties object itself. + */ + public ElasticCapacityPoolProperties withSize(long size) { + this.size = size; + return this; + } + + /** + * Get the serviceLevel property: The service level of the elastic capacity pool. + * + * @return the serviceLevel value. + */ + public ElasticServiceLevel serviceLevel() { + return this.serviceLevel; + } + + /** + * Set the serviceLevel property: The service level of the elastic capacity pool. + * + * @param serviceLevel the serviceLevel value to set. + * @return the ElasticCapacityPoolProperties object itself. + */ + public ElasticCapacityPoolProperties withServiceLevel(ElasticServiceLevel serviceLevel) { + this.serviceLevel = serviceLevel; + return this; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the encryption property: Encryption settings. + * + * @return the encryption value. + */ + public ElasticEncryptionConfiguration encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Encryption settings. + * + * @param encryption the encryption value to set. + * @return the ElasticCapacityPoolProperties object itself. + */ + public ElasticCapacityPoolProperties withEncryption(ElasticEncryptionConfiguration encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the totalThroughputMibps property: Total throughput of the pool in MiB/s. + * + * @return the totalThroughputMibps value. + */ + public Double totalThroughputMibps() { + return this.totalThroughputMibps; + } + + /** + * Get the subnetResourceId property: The Azure Resource URI for a delegated subnet. Must have the delegation + * Microsoft.NetApp/elasticVolumes, this is used by all the volumes within the pool. + * + * @return the subnetResourceId value. + */ + public String subnetResourceId() { + return this.subnetResourceId; + } + + /** + * Set the subnetResourceId property: The Azure Resource URI for a delegated subnet. Must have the delegation + * Microsoft.NetApp/elasticVolumes, this is used by all the volumes within the pool. + * + * @param subnetResourceId the subnetResourceId value to set. + * @return the ElasticCapacityPoolProperties object itself. + */ + public ElasticCapacityPoolProperties withSubnetResourceId(String subnetResourceId) { + this.subnetResourceId = subnetResourceId; + return this; + } + + /** + * Get the currentZone property: Indicates the current zone of the pool. This can be changed for zoneRedundant + * service level pool with the changeZone action. + * + * @return the currentZone value. + */ + public String currentZone() { + return this.currentZone; + } + + /** + * Get the availabilityStatus property: Current availability status of the resource. + * + * @return the availabilityStatus value. + */ + public ElasticResourceAvailabilityStatus availabilityStatus() { + return this.availabilityStatus; + } + + /** + * Get the activeDirectoryConfigResourceId property: The Azure Resource URI for an Active Directory configuration. + * This is used by all the SMB volumes within the pool. + * + * @return the activeDirectoryConfigResourceId value. + */ + public String activeDirectoryConfigResourceId() { + return this.activeDirectoryConfigResourceId; + } + + /** + * Set the activeDirectoryConfigResourceId property: The Azure Resource URI for an Active Directory configuration. + * This is used by all the SMB volumes within the pool. + * + * @param activeDirectoryConfigResourceId the activeDirectoryConfigResourceId value to set. + * @return the ElasticCapacityPoolProperties object itself. + */ + public ElasticCapacityPoolProperties withActiveDirectoryConfigResourceId(String activeDirectoryConfigResourceId) { + this.activeDirectoryConfigResourceId = activeDirectoryConfigResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (serviceLevel() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property serviceLevel in model ElasticCapacityPoolProperties")); + } + if (encryption() != null) { + encryption().validate(); + } + if (subnetResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property subnetResourceId in model ElasticCapacityPoolProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticCapacityPoolProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeLongField("size", this.size); + jsonWriter.writeStringField("serviceLevel", this.serviceLevel == null ? null : this.serviceLevel.toString()); + jsonWriter.writeStringField("subnetResourceId", this.subnetResourceId); + jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeStringField("activeDirectoryConfigResourceId", this.activeDirectoryConfigResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticCapacityPoolProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticCapacityPoolProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticCapacityPoolProperties. + */ + public static ElasticCapacityPoolProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticCapacityPoolProperties deserializedElasticCapacityPoolProperties + = new ElasticCapacityPoolProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.size = reader.getLong(); + } else if ("serviceLevel".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.serviceLevel + = ElasticServiceLevel.fromString(reader.getString()); + } else if ("subnetResourceId".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.subnetResourceId = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("encryption".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.encryption + = ElasticEncryptionConfiguration.fromJson(reader); + } else if ("totalThroughputMibps".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.totalThroughputMibps + = reader.getNullable(JsonReader::getDouble); + } else if ("currentZone".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.currentZone = reader.getString(); + } else if ("availabilityStatus".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.availabilityStatus + = ElasticResourceAvailabilityStatus.fromString(reader.getString()); + } else if ("activeDirectoryConfigResourceId".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.activeDirectoryConfigResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticCapacityPoolProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdate.java new file mode 100644 index 000000000000..c0edc78dae90 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdate.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ElasticCapacityPool. + */ +@Fluent +public final class ElasticCapacityPoolUpdate implements JsonSerializable<ElasticCapacityPoolUpdate> { + /* + * Resource tags. + */ + private Map<String, String> tags; + + /* + * The resource-specific properties for this resource. + */ + private ElasticCapacityPoolUpdateProperties properties; + + /** + * Creates an instance of ElasticCapacityPoolUpdate class. + */ + public ElasticCapacityPoolUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map<String, String> tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ElasticCapacityPoolUpdate object itself. + */ + public ElasticCapacityPoolUpdate withTags(Map<String, String> tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticCapacityPoolUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticCapacityPoolUpdate object itself. + */ + public ElasticCapacityPoolUpdate withProperties(ElasticCapacityPoolUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticCapacityPoolUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticCapacityPoolUpdate if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticCapacityPoolUpdate. + */ + public static ElasticCapacityPoolUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticCapacityPoolUpdate deserializedElasticCapacityPoolUpdate = new ElasticCapacityPoolUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticCapacityPoolUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedElasticCapacityPoolUpdate.properties + = ElasticCapacityPoolUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticCapacityPoolUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdateProperties.java new file mode 100644 index 000000000000..b88a394b7baf --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdateProperties.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The updatable properties of the ElasticCapacityPool. + */ +@Fluent +public final class ElasticCapacityPoolUpdateProperties + implements JsonSerializable<ElasticCapacityPoolUpdateProperties> { + /* + * Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must be in the range 1TiB to + * 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of 1TiB till 16TiB and in + * multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + */ + private Long size; + + /* + * Encryption settings + */ + private ElasticEncryptionConfiguration encryption; + + /* + * The Azure Resource URI for an Active Directory configuration. This is used by all the SMB volumes within the pool + */ + private String activeDirectoryConfigResourceId; + + /** + * Creates an instance of ElasticCapacityPoolUpdateProperties class. + */ + public ElasticCapacityPoolUpdateProperties() { + } + + /** + * Get the size property: Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must + * be in the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of + * 1TiB till 16TiB and in multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + * + * @return the size value. + */ + public Long size() { + return this.size; + } + + /** + * Set the size property: Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must + * be in the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of + * 1TiB till 16TiB and in multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + * + * @param size the size value to set. + * @return the ElasticCapacityPoolUpdateProperties object itself. + */ + public ElasticCapacityPoolUpdateProperties withSize(Long size) { + this.size = size; + return this; + } + + /** + * Get the encryption property: Encryption settings. + * + * @return the encryption value. + */ + public ElasticEncryptionConfiguration encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Encryption settings. + * + * @param encryption the encryption value to set. + * @return the ElasticCapacityPoolUpdateProperties object itself. + */ + public ElasticCapacityPoolUpdateProperties withEncryption(ElasticEncryptionConfiguration encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the activeDirectoryConfigResourceId property: The Azure Resource URI for an Active Directory configuration. + * This is used by all the SMB volumes within the pool. + * + * @return the activeDirectoryConfigResourceId value. + */ + public String activeDirectoryConfigResourceId() { + return this.activeDirectoryConfigResourceId; + } + + /** + * Set the activeDirectoryConfigResourceId property: The Azure Resource URI for an Active Directory configuration. + * This is used by all the SMB volumes within the pool. + * + * @param activeDirectoryConfigResourceId the activeDirectoryConfigResourceId value to set. + * @return the ElasticCapacityPoolUpdateProperties object itself. + */ + public ElasticCapacityPoolUpdateProperties + withActiveDirectoryConfigResourceId(String activeDirectoryConfigResourceId) { + this.activeDirectoryConfigResourceId = activeDirectoryConfigResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryption() != null) { + encryption().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("size", this.size); + jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeStringField("activeDirectoryConfigResourceId", this.activeDirectoryConfigResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticCapacityPoolUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticCapacityPoolUpdateProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticCapacityPoolUpdateProperties. + */ + public static ElasticCapacityPoolUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticCapacityPoolUpdateProperties deserializedElasticCapacityPoolUpdateProperties + = new ElasticCapacityPoolUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedElasticCapacityPoolUpdateProperties.size = reader.getNullable(JsonReader::getLong); + } else if ("encryption".equals(fieldName)) { + deserializedElasticCapacityPoolUpdateProperties.encryption + = ElasticEncryptionConfiguration.fromJson(reader); + } else if ("activeDirectoryConfigResourceId".equals(fieldName)) { + deserializedElasticCapacityPoolUpdateProperties.activeDirectoryConfigResourceId + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticCapacityPoolUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPools.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPools.java new file mode 100644 index 000000000000..f878ee07d04e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPools.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ElasticCapacityPools. + */ +public interface ElasticCapacityPools { + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Capacity Pool along with {@link Response}. + */ + Response<ElasticCapacityPool> getWithResponse(String resourceGroupName, String accountName, String poolName, + Context context); + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Capacity Pool. + */ + ElasticCapacityPool get(String resourceGroupName, String accountName, String poolName); + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String poolName); + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String poolName, Context context); + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticCapacityPool> listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticCapacityPool> listByElasticAccount(String resourceGroupName, String accountName, + Context context); + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ElasticCapacityPool changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body); + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ElasticCapacityPool changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource along with {@link Response}. + */ + Response<CheckElasticResourceAvailabilityResponse> checkVolumeFilePathAvailabilityWithResponse( + String resourceGroupName, String accountName, String poolName, + CheckElasticVolumeFilePathAvailabilityRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource. + */ + CheckElasticResourceAvailabilityResponse checkVolumeFilePathAvailability(String resourceGroupName, + String accountName, String poolName, CheckElasticVolumeFilePathAvailabilityRequest body); + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Capacity Pool along with {@link Response}. + */ + ElasticCapacityPool getById(String id); + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Capacity Pool along with {@link Response}. + */ + Response<ElasticCapacityPool> getByIdWithResponse(String id, Context context); + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ElasticCapacityPool resource. + * + * @param name resource name. + * @return the first stage of the new ElasticCapacityPool definition. + */ + ElasticCapacityPool.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryption.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryption.java new file mode 100644 index 000000000000..e4340a9c9b29 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryption.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Encryption settings. + */ +@Fluent +public final class ElasticEncryption implements JsonSerializable<ElasticEncryption> { + /* + * The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault + */ + private KeySource keySource; + + /* + * Properties provided by KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + */ + private ElasticKeyVaultProperties keyVaultProperties; + + /* + * Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + */ + private ElasticEncryptionIdentity identity; + + /** + * Creates an instance of ElasticEncryption class. + */ + public ElasticEncryption() { + } + + /** + * Get the keySource property: The encryption keySource (provider). Possible values (case-insensitive): + * Microsoft.NetApp, Microsoft.KeyVault. + * + * @return the keySource value. + */ + public KeySource keySource() { + return this.keySource; + } + + /** + * Set the keySource property: The encryption keySource (provider). Possible values (case-insensitive): + * Microsoft.NetApp, Microsoft.KeyVault. + * + * @param keySource the keySource value to set. + * @return the ElasticEncryption object itself. + */ + public ElasticEncryption withKeySource(KeySource keySource) { + this.keySource = keySource; + return this; + } + + /** + * Get the keyVaultProperties property: Properties provided by KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @return the keyVaultProperties value. + */ + public ElasticKeyVaultProperties keyVaultProperties() { + return this.keyVaultProperties; + } + + /** + * Set the keyVaultProperties property: Properties provided by KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @param keyVaultProperties the keyVaultProperties value to set. + * @return the ElasticEncryption object itself. + */ + public ElasticEncryption withKeyVaultProperties(ElasticKeyVaultProperties keyVaultProperties) { + this.keyVaultProperties = keyVaultProperties; + return this; + } + + /** + * Get the identity property: Identity used to authenticate to KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @return the identity value. + */ + public ElasticEncryptionIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Identity used to authenticate to KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @param identity the identity value to set. + * @return the ElasticEncryption object itself. + */ + public ElasticEncryption withIdentity(ElasticEncryptionIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyVaultProperties() != null) { + keyVaultProperties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keySource", this.keySource == null ? null : this.keySource.toString()); + jsonWriter.writeJsonField("keyVaultProperties", this.keyVaultProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticEncryption from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticEncryption if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticEncryption. + */ + public static ElasticEncryption fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticEncryption deserializedElasticEncryption = new ElasticEncryption(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keySource".equals(fieldName)) { + deserializedElasticEncryption.keySource = KeySource.fromString(reader.getString()); + } else if ("keyVaultProperties".equals(fieldName)) { + deserializedElasticEncryption.keyVaultProperties = ElasticKeyVaultProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedElasticEncryption.identity = ElasticEncryptionIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticEncryption; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionConfiguration.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionConfiguration.java new file mode 100644 index 000000000000..75a5ab4ad93f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionConfiguration.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * CMK Encryption Configuration. + */ +@Fluent +public final class ElasticEncryptionConfiguration implements JsonSerializable<ElasticEncryptionConfiguration> { + /* + * Pool Encryption Key Source. + */ + private ElasticPoolEncryptionKeySource elasticPoolEncryptionKeySource; + + /* + * The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable + * if encryptionKeySource = 'Microsoft.KeyVault'. + */ + private String keyVaultPrivateEndpointResourceId; + + /** + * Creates an instance of ElasticEncryptionConfiguration class. + */ + public ElasticEncryptionConfiguration() { + } + + /** + * Get the elasticPoolEncryptionKeySource property: Pool Encryption Key Source. + * + * @return the elasticPoolEncryptionKeySource value. + */ + public ElasticPoolEncryptionKeySource elasticPoolEncryptionKeySource() { + return this.elasticPoolEncryptionKeySource; + } + + /** + * Set the elasticPoolEncryptionKeySource property: Pool Encryption Key Source. + * + * @param elasticPoolEncryptionKeySource the elasticPoolEncryptionKeySource value to set. + * @return the ElasticEncryptionConfiguration object itself. + */ + public ElasticEncryptionConfiguration + withElasticPoolEncryptionKeySource(ElasticPoolEncryptionKeySource elasticPoolEncryptionKeySource) { + this.elasticPoolEncryptionKeySource = elasticPoolEncryptionKeySource; + return this; + } + + /** + * Get the keyVaultPrivateEndpointResourceId property: The resource ID of private endpoint for KeyVault. It must + * reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + * + * @return the keyVaultPrivateEndpointResourceId value. + */ + public String keyVaultPrivateEndpointResourceId() { + return this.keyVaultPrivateEndpointResourceId; + } + + /** + * Set the keyVaultPrivateEndpointResourceId property: The resource ID of private endpoint for KeyVault. It must + * reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + * + * @param keyVaultPrivateEndpointResourceId the keyVaultPrivateEndpointResourceId value to set. + * @return the ElasticEncryptionConfiguration object itself. + */ + public ElasticEncryptionConfiguration + withKeyVaultPrivateEndpointResourceId(String keyVaultPrivateEndpointResourceId) { + this.keyVaultPrivateEndpointResourceId = keyVaultPrivateEndpointResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (elasticPoolEncryptionKeySource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property elasticPoolEncryptionKeySource in model ElasticEncryptionConfiguration")); + } + if (keyVaultPrivateEndpointResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property keyVaultPrivateEndpointResourceId in model ElasticEncryptionConfiguration")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticEncryptionConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("elasticPoolEncryptionKeySource", + this.elasticPoolEncryptionKeySource == null ? null : this.elasticPoolEncryptionKeySource.toString()); + jsonWriter.writeStringField("keyVaultPrivateEndpointResourceId", this.keyVaultPrivateEndpointResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticEncryptionConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticEncryptionConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticEncryptionConfiguration. + */ + public static ElasticEncryptionConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticEncryptionConfiguration deserializedElasticEncryptionConfiguration + = new ElasticEncryptionConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("elasticPoolEncryptionKeySource".equals(fieldName)) { + deserializedElasticEncryptionConfiguration.elasticPoolEncryptionKeySource + = ElasticPoolEncryptionKeySource.fromString(reader.getString()); + } else if ("keyVaultPrivateEndpointResourceId".equals(fieldName)) { + deserializedElasticEncryptionConfiguration.keyVaultPrivateEndpointResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticEncryptionConfiguration; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionIdentity.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionIdentity.java new file mode 100644 index 000000000000..f170391179bc --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionIdentity.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Identity used to authenticate with key vault. + */ +@Fluent +public final class ElasticEncryptionIdentity implements JsonSerializable<ElasticEncryptionIdentity> { + /* + * The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. + */ + private String principalId; + + /* + * The ARM resource identifier of the user assigned identity used to authenticate with key vault. Applicable if + * identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. + */ + private String userAssignedIdentity; + + /** + * Creates an instance of ElasticEncryptionIdentity class. + */ + public ElasticEncryptionIdentity() { + } + + /** + * Get the principalId property: The principal ID (object ID) of the identity used to authenticate with key vault. + * Read-only. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the userAssignedIdentity property: The ARM resource identifier of the user assigned identity used to + * authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of + * identity.userAssignedIdentities. + * + * @return the userAssignedIdentity value. + */ + public String userAssignedIdentity() { + return this.userAssignedIdentity; + } + + /** + * Set the userAssignedIdentity property: The ARM resource identifier of the user assigned identity used to + * authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of + * identity.userAssignedIdentities. + * + * @param userAssignedIdentity the userAssignedIdentity value to set. + * @return the ElasticEncryptionIdentity object itself. + */ + public ElasticEncryptionIdentity withUserAssignedIdentity(String userAssignedIdentity) { + this.userAssignedIdentity = userAssignedIdentity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("userAssignedIdentity", this.userAssignedIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticEncryptionIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticEncryptionIdentity if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticEncryptionIdentity. + */ + public static ElasticEncryptionIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticEncryptionIdentity deserializedElasticEncryptionIdentity = new ElasticEncryptionIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedElasticEncryptionIdentity.principalId = reader.getString(); + } else if ("userAssignedIdentity".equals(fieldName)) { + deserializedElasticEncryptionIdentity.userAssignedIdentity = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticEncryptionIdentity; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicy.java new file mode 100644 index 000000000000..86e47d808720 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicy.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Set of export policy rules. + */ +@Fluent +public final class ElasticExportPolicy implements JsonSerializable<ElasticExportPolicy> { + /* + * Export policy rule + */ + private List<ElasticExportPolicyRule> rules; + + /** + * Creates an instance of ElasticExportPolicy class. + */ + public ElasticExportPolicy() { + } + + /** + * Get the rules property: Export policy rule. + * + * @return the rules value. + */ + public List<ElasticExportPolicyRule> rules() { + return this.rules; + } + + /** + * Set the rules property: Export policy rule. + * + * @param rules the rules value to set. + * @return the ElasticExportPolicy object itself. + */ + public ElasticExportPolicy withRules(List<ElasticExportPolicyRule> rules) { + this.rules = rules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (rules() != null) { + rules().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticExportPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticExportPolicy if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticExportPolicy. + */ + public static ElasticExportPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticExportPolicy deserializedElasticExportPolicy = new ElasticExportPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("rules".equals(fieldName)) { + List<ElasticExportPolicyRule> rules + = reader.readArray(reader1 -> ElasticExportPolicyRule.fromJson(reader1)); + deserializedElasticExportPolicy.rules = rules; + } else { + reader.skipChildren(); + } + } + + return deserializedElasticExportPolicy; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicyRule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicyRule.java new file mode 100644 index 000000000000..32b4063961f9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicyRule.java @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Elastic Volume Export Policy Rule. + */ +@Fluent +public final class ElasticExportPolicyRule implements JsonSerializable<ElasticExportPolicyRule> { + /* + * Controls the priority of the export policy rule. When connecting to the volume the rule with the lowest index + * that applies to the connecting client is used + */ + private Integer ruleIndex; + + /* + * Specifies the Unix file access level for the volume. It encompasses both read-only and read-write permissions. + * Additionally, NoAccess can be set to block all access to the volume + */ + private ElasticUnixAccessRule unixAccessRule; + + /* + * Allows clients to access the volume with the NFSv3 protocol. Enable only for NFSv3 type volumes + */ + private ElasticNfsv3Access nfsv3; + + /* + * Allows clients to access the volume with at least NFSv4.1 protocol. + */ + private ElasticNfsv4Access nfsv4; + + /* + * Client ingress specification for the export policy as list of IPv4 CIDRs, IPv4 host addresses and host names. + */ + private List<String> allowedClients; + + /* + * Indicates whether root access to the volume is granted to clients affected by this rule + */ + private ElasticRootAccess rootAccess; + + /** + * Creates an instance of ElasticExportPolicyRule class. + */ + public ElasticExportPolicyRule() { + } + + /** + * Get the ruleIndex property: Controls the priority of the export policy rule. When connecting to the volume the + * rule with the lowest index that applies to the connecting client is used. + * + * @return the ruleIndex value. + */ + public Integer ruleIndex() { + return this.ruleIndex; + } + + /** + * Set the ruleIndex property: Controls the priority of the export policy rule. When connecting to the volume the + * rule with the lowest index that applies to the connecting client is used. + * + * @param ruleIndex the ruleIndex value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withRuleIndex(Integer ruleIndex) { + this.ruleIndex = ruleIndex; + return this; + } + + /** + * Get the unixAccessRule property: Specifies the Unix file access level for the volume. It encompasses both + * read-only and read-write permissions. Additionally, NoAccess can be set to block all access to the volume. + * + * @return the unixAccessRule value. + */ + public ElasticUnixAccessRule unixAccessRule() { + return this.unixAccessRule; + } + + /** + * Set the unixAccessRule property: Specifies the Unix file access level for the volume. It encompasses both + * read-only and read-write permissions. Additionally, NoAccess can be set to block all access to the volume. + * + * @param unixAccessRule the unixAccessRule value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withUnixAccessRule(ElasticUnixAccessRule unixAccessRule) { + this.unixAccessRule = unixAccessRule; + return this; + } + + /** + * Get the nfsv3 property: Allows clients to access the volume with the NFSv3 protocol. Enable only for NFSv3 type + * volumes. + * + * @return the nfsv3 value. + */ + public ElasticNfsv3Access nfsv3() { + return this.nfsv3; + } + + /** + * Set the nfsv3 property: Allows clients to access the volume with the NFSv3 protocol. Enable only for NFSv3 type + * volumes. + * + * @param nfsv3 the nfsv3 value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withNfsv3(ElasticNfsv3Access nfsv3) { + this.nfsv3 = nfsv3; + return this; + } + + /** + * Get the nfsv4 property: Allows clients to access the volume with at least NFSv4.1 protocol. + * + * @return the nfsv4 value. + */ + public ElasticNfsv4Access nfsv4() { + return this.nfsv4; + } + + /** + * Set the nfsv4 property: Allows clients to access the volume with at least NFSv4.1 protocol. + * + * @param nfsv4 the nfsv4 value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withNfsv4(ElasticNfsv4Access nfsv4) { + this.nfsv4 = nfsv4; + return this; + } + + /** + * Get the allowedClients property: Client ingress specification for the export policy as list of IPv4 CIDRs, IPv4 + * host addresses and host names. + * + * @return the allowedClients value. + */ + public List<String> allowedClients() { + return this.allowedClients; + } + + /** + * Set the allowedClients property: Client ingress specification for the export policy as list of IPv4 CIDRs, IPv4 + * host addresses and host names. + * + * @param allowedClients the allowedClients value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withAllowedClients(List<String> allowedClients) { + this.allowedClients = allowedClients; + return this; + } + + /** + * Get the rootAccess property: Indicates whether root access to the volume is granted to clients affected by this + * rule. + * + * @return the rootAccess value. + */ + public ElasticRootAccess rootAccess() { + return this.rootAccess; + } + + /** + * Set the rootAccess property: Indicates whether root access to the volume is granted to clients affected by this + * rule. + * + * @param rootAccess the rootAccess value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withRootAccess(ElasticRootAccess rootAccess) { + this.rootAccess = rootAccess; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("ruleIndex", this.ruleIndex); + jsonWriter.writeStringField("unixAccessRule", + this.unixAccessRule == null ? null : this.unixAccessRule.toString()); + jsonWriter.writeStringField("nfsv3", this.nfsv3 == null ? null : this.nfsv3.toString()); + jsonWriter.writeStringField("nfsv4", this.nfsv4 == null ? null : this.nfsv4.toString()); + jsonWriter.writeArrayField("allowedClients", this.allowedClients, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("rootAccess", this.rootAccess == null ? null : this.rootAccess.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticExportPolicyRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticExportPolicyRule if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticExportPolicyRule. + */ + public static ElasticExportPolicyRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticExportPolicyRule deserializedElasticExportPolicyRule = new ElasticExportPolicyRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ruleIndex".equals(fieldName)) { + deserializedElasticExportPolicyRule.ruleIndex = reader.getNullable(JsonReader::getInt); + } else if ("unixAccessRule".equals(fieldName)) { + deserializedElasticExportPolicyRule.unixAccessRule + = ElasticUnixAccessRule.fromString(reader.getString()); + } else if ("nfsv3".equals(fieldName)) { + deserializedElasticExportPolicyRule.nfsv3 = ElasticNfsv3Access.fromString(reader.getString()); + } else if ("nfsv4".equals(fieldName)) { + deserializedElasticExportPolicyRule.nfsv4 = ElasticNfsv4Access.fromString(reader.getString()); + } else if ("allowedClients".equals(fieldName)) { + List<String> allowedClients = reader.readArray(reader1 -> reader1.getString()); + deserializedElasticExportPolicyRule.allowedClients = allowedClients; + } else if ("rootAccess".equals(fieldName)) { + deserializedElasticExportPolicyRule.rootAccess = ElasticRootAccess.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticExportPolicyRule; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultProperties.java new file mode 100644 index 000000000000..e0b7f1ab7fcf --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultProperties.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Properties of key vault. + */ +@Fluent +public final class ElasticKeyVaultProperties implements JsonSerializable<ElasticKeyVaultProperties> { + /* + * The Uri of KeyVault. + */ + private String keyVaultUri; + + /* + * The name of KeyVault key. + */ + private String keyName; + + /* + * The resource ID of KeyVault. + */ + private String keyVaultResourceId; + + /* + * Status of the KeyVault connection. + */ + private ElasticKeyVaultStatus status; + + /** + * Creates an instance of ElasticKeyVaultProperties class. + */ + public ElasticKeyVaultProperties() { + } + + /** + * Get the keyVaultUri property: The Uri of KeyVault. + * + * @return the keyVaultUri value. + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Set the keyVaultUri property: The Uri of KeyVault. + * + * @param keyVaultUri the keyVaultUri value to set. + * @return the ElasticKeyVaultProperties object itself. + */ + public ElasticKeyVaultProperties withKeyVaultUri(String keyVaultUri) { + this.keyVaultUri = keyVaultUri; + return this; + } + + /** + * Get the keyName property: The name of KeyVault key. + * + * @return the keyName value. + */ + public String keyName() { + return this.keyName; + } + + /** + * Set the keyName property: The name of KeyVault key. + * + * @param keyName the keyName value to set. + * @return the ElasticKeyVaultProperties object itself. + */ + public ElasticKeyVaultProperties withKeyName(String keyName) { + this.keyName = keyName; + return this; + } + + /** + * Get the keyVaultResourceId property: The resource ID of KeyVault. + * + * @return the keyVaultResourceId value. + */ + public String keyVaultResourceId() { + return this.keyVaultResourceId; + } + + /** + * Set the keyVaultResourceId property: The resource ID of KeyVault. + * + * @param keyVaultResourceId the keyVaultResourceId value to set. + * @return the ElasticKeyVaultProperties object itself. + */ + public ElasticKeyVaultProperties withKeyVaultResourceId(String keyVaultResourceId) { + this.keyVaultResourceId = keyVaultResourceId; + return this; + } + + /** + * Get the status property: Status of the KeyVault connection. + * + * @return the status value. + */ + public ElasticKeyVaultStatus status() { + return this.status; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyVaultUri", this.keyVaultUri); + jsonWriter.writeStringField("keyName", this.keyName); + jsonWriter.writeStringField("keyVaultResourceId", this.keyVaultResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticKeyVaultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticKeyVaultProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticKeyVaultProperties. + */ + public static ElasticKeyVaultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticKeyVaultProperties deserializedElasticKeyVaultProperties = new ElasticKeyVaultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyVaultUri".equals(fieldName)) { + deserializedElasticKeyVaultProperties.keyVaultUri = reader.getString(); + } else if ("keyName".equals(fieldName)) { + deserializedElasticKeyVaultProperties.keyName = reader.getString(); + } else if ("keyVaultResourceId".equals(fieldName)) { + deserializedElasticKeyVaultProperties.keyVaultResourceId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedElasticKeyVaultProperties.status = ElasticKeyVaultStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticKeyVaultProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultStatus.java new file mode 100644 index 000000000000..b03bf923133d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultStatus.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * KeyVault status. + */ +public final class ElasticKeyVaultStatus extends ExpandableStringEnum<ElasticKeyVaultStatus> { + /** + * KeyVault connection created but not in use. + */ + public static final ElasticKeyVaultStatus CREATED = fromString("Created"); + + /** + * KeyVault connection in use by SMB Volume. + */ + public static final ElasticKeyVaultStatus IN_USE = fromString("InUse"); + + /** + * KeyVault connection Deleted. + */ + public static final ElasticKeyVaultStatus DELETED = fromString("Deleted"); + + /** + * Error with the KeyVault connection. + */ + public static final ElasticKeyVaultStatus ERROR = fromString("Error"); + + /** + * KeyVault connection Updating. + */ + public static final ElasticKeyVaultStatus UPDATING = fromString("Updating"); + + /** + * Creates a new instance of ElasticKeyVaultStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticKeyVaultStatus() { + } + + /** + * Creates or finds a ElasticKeyVaultStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticKeyVaultStatus. + */ + public static ElasticKeyVaultStatus fromString(String name) { + return fromString(name, ElasticKeyVaultStatus.class); + } + + /** + * Gets known ElasticKeyVaultStatus values. + * + * @return known ElasticKeyVaultStatus values. + */ + public static Collection<ElasticKeyVaultStatus> values() { + return values(ElasticKeyVaultStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticMountTargetProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticMountTargetProperties.java new file mode 100644 index 000000000000..8cd6c9a184f1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticMountTargetProperties.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Contains all the information needed to mount an elastic volume. + */ +@Immutable +public final class ElasticMountTargetProperties implements JsonSerializable<ElasticMountTargetProperties> { + /* + * The mount target's IPv4 address, used to mount the volume + */ + private String ipAddress; + + /* + * The SMB server's Fully Qualified Domain Name, FQDN + */ + private String smbServerFqdn; + + /** + * Creates an instance of ElasticMountTargetProperties class. + */ + private ElasticMountTargetProperties() { + } + + /** + * Get the ipAddress property: The mount target's IPv4 address, used to mount the volume. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Get the smbServerFqdn property: The SMB server's Fully Qualified Domain Name, FQDN. + * + * @return the smbServerFqdn value. + */ + public String smbServerFqdn() { + return this.smbServerFqdn; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticMountTargetProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticMountTargetProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticMountTargetProperties. + */ + public static ElasticMountTargetProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticMountTargetProperties deserializedElasticMountTargetProperties = new ElasticMountTargetProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipAddress".equals(fieldName)) { + deserializedElasticMountTargetProperties.ipAddress = reader.getString(); + } else if ("smbServerFqdn".equals(fieldName)) { + deserializedElasticMountTargetProperties.smbServerFqdn = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticMountTargetProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv3Access.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv3Access.java new file mode 100644 index 000000000000..5869cd66b457 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv3Access.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * NFSv3 access. + */ +public final class ElasticNfsv3Access extends ExpandableStringEnum<ElasticNfsv3Access> { + /** + * Clients can connect to the volume using the NFSv3 protocol. + */ + public static final ElasticNfsv3Access ENABLED = fromString("Enabled"); + + /** + * Clients can't connect to the volume using the NFSv3 protocol. + */ + public static final ElasticNfsv3Access DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ElasticNfsv3Access value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticNfsv3Access() { + } + + /** + * Creates or finds a ElasticNfsv3Access from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticNfsv3Access. + */ + public static ElasticNfsv3Access fromString(String name) { + return fromString(name, ElasticNfsv3Access.class); + } + + /** + * Gets known ElasticNfsv3Access values. + * + * @return known ElasticNfsv3Access values. + */ + public static Collection<ElasticNfsv3Access> values() { + return values(ElasticNfsv3Access.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv4Access.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv4Access.java new file mode 100644 index 000000000000..189fde0509d6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv4Access.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * NFSv4 access. + */ +public final class ElasticNfsv4Access extends ExpandableStringEnum<ElasticNfsv4Access> { + /** + * Clients can connect to the volume using the NFSv4 protocol. + */ + public static final ElasticNfsv4Access ENABLED = fromString("Enabled"); + + /** + * Clients can't connect to the volume using the NFSv4 protocol. + */ + public static final ElasticNfsv4Access DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ElasticNfsv4Access value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticNfsv4Access() { + } + + /** + * Creates or finds a ElasticNfsv4Access from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticNfsv4Access. + */ + public static ElasticNfsv4Access fromString(String name) { + return fromString(name, ElasticNfsv4Access.class); + } + + /** + * Gets known ElasticNfsv4Access values. + * + * @return known ElasticNfsv4Access values. + */ + public static Collection<ElasticNfsv4Access> values() { + return values(ElasticNfsv4Access.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticPoolEncryptionKeySource.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticPoolEncryptionKeySource.java new file mode 100644 index 000000000000..aa4cc4f721a7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticPoolEncryptionKeySource.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Pool Encryption Key Source. + */ +public final class ElasticPoolEncryptionKeySource extends ExpandableStringEnum<ElasticPoolEncryptionKeySource> { + /** + * Represents the encryption key source of Elastic pool is Microsoft.NetApp. + */ + public static final ElasticPoolEncryptionKeySource NET_APP = fromString("NetApp"); + + /** + * Represents the encryption key source of Elastic pool is Microsoft.KeyVault. + */ + public static final ElasticPoolEncryptionKeySource KEY_VAULT = fromString("KeyVault"); + + /** + * Creates a new instance of ElasticPoolEncryptionKeySource value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticPoolEncryptionKeySource() { + } + + /** + * Creates or finds a ElasticPoolEncryptionKeySource from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticPoolEncryptionKeySource. + */ + public static ElasticPoolEncryptionKeySource fromString(String name) { + return fromString(name, ElasticPoolEncryptionKeySource.class); + } + + /** + * Gets known ElasticPoolEncryptionKeySource values. + * + * @return known ElasticPoolEncryptionKeySource values. + */ + public static Collection<ElasticPoolEncryptionKeySource> values() { + return values(ElasticPoolEncryptionKeySource.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticProtocolType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticProtocolType.java new file mode 100644 index 000000000000..d6a30768d5f2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticProtocolType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Protocol types for elastic volume. + */ +public final class ElasticProtocolType extends ExpandableStringEnum<ElasticProtocolType> { + /** + * NFSv3 protocol type. + */ + public static final ElasticProtocolType NFSV3 = fromString("NFSv3"); + + /** + * NFSv4 protocol type. + */ + public static final ElasticProtocolType NFSV4 = fromString("NFSv4"); + + /** + * SMB/CIFS protocol type. + */ + public static final ElasticProtocolType SMB = fromString("SMB"); + + /** + * Creates a new instance of ElasticProtocolType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticProtocolType() { + } + + /** + * Creates or finds a ElasticProtocolType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticProtocolType. + */ + public static ElasticProtocolType fromString(String name) { + return fromString(name, ElasticProtocolType.class); + } + + /** + * Gets known ElasticProtocolType values. + * + * @return known ElasticProtocolType values. + */ + public static Collection<ElasticProtocolType> values() { + return values(ElasticProtocolType.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticResourceAvailabilityStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticResourceAvailabilityStatus.java new file mode 100644 index 000000000000..438fe0bd73b9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticResourceAvailabilityStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Current availability status of the resource. + */ +public final class ElasticResourceAvailabilityStatus extends ExpandableStringEnum<ElasticResourceAvailabilityStatus> { + /** + * The resource is currently Online and accessible. + */ + public static final ElasticResourceAvailabilityStatus ONLINE = fromString("Online"); + + /** + * The resource is currently Offline and not accessible. + */ + public static final ElasticResourceAvailabilityStatus OFFLINE = fromString("Offline"); + + /** + * Creates a new instance of ElasticResourceAvailabilityStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticResourceAvailabilityStatus() { + } + + /** + * Creates or finds a ElasticResourceAvailabilityStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticResourceAvailabilityStatus. + */ + public static ElasticResourceAvailabilityStatus fromString(String name) { + return fromString(name, ElasticResourceAvailabilityStatus.class); + } + + /** + * Gets known ElasticResourceAvailabilityStatus values. + * + * @return known ElasticResourceAvailabilityStatus values. + */ + public static Collection<ElasticResourceAvailabilityStatus> values() { + return values(ElasticResourceAvailabilityStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticRootAccess.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticRootAccess.java new file mode 100644 index 000000000000..72aeb2eb784d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticRootAccess.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Root access. + */ +public final class ElasticRootAccess extends ExpandableStringEnum<ElasticRootAccess> { + /** + * Root user access is enabled for clients affected by this rule. + */ + public static final ElasticRootAccess ENABLED = fromString("Enabled"); + + /** + * Root user access is disabled for clients affected by this rule. + */ + public static final ElasticRootAccess DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ElasticRootAccess value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticRootAccess() { + } + + /** + * Creates or finds a ElasticRootAccess from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticRootAccess. + */ + public static ElasticRootAccess fromString(String name) { + return fromString(name, ElasticRootAccess.class); + } + + /** + * Gets known ElasticRootAccess values. + * + * @return known ElasticRootAccess values. + */ + public static Collection<ElasticRootAccess> values() { + return values(ElasticRootAccess.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticServiceLevel.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticServiceLevel.java new file mode 100644 index 000000000000..d7eba1c8da06 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticServiceLevel.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Service level for elastic capacity pool. + */ +public final class ElasticServiceLevel extends ExpandableStringEnum<ElasticServiceLevel> { + /** + * Zone redundant storage service level. + */ + public static final ElasticServiceLevel ZONE_REDUNDANT = fromString("ZoneRedundant"); + + /** + * Creates a new instance of ElasticServiceLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticServiceLevel() { + } + + /** + * Creates or finds a ElasticServiceLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticServiceLevel. + */ + public static ElasticServiceLevel fromString(String name) { + return fromString(name, ElasticServiceLevel.class); + } + + /** + * Gets known ElasticServiceLevel values. + * + * @return known ElasticServiceLevel values. + */ + public static Collection<ElasticServiceLevel> values() { + return values(ElasticServiceLevel.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbEncryption.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbEncryption.java new file mode 100644 index 000000000000..8595a9bd4819 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbEncryption.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * SMB encryption. + */ +public final class ElasticSmbEncryption extends ExpandableStringEnum<ElasticSmbEncryption> { + /** + * Value indicating the SMB encryption is enabled. + */ + public static final ElasticSmbEncryption ENABLED = fromString("Enabled"); + + /** + * Value indicating the SMB encryption is disabled. + */ + public static final ElasticSmbEncryption DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ElasticSmbEncryption value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticSmbEncryption() { + } + + /** + * Creates or finds a ElasticSmbEncryption from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticSmbEncryption. + */ + public static ElasticSmbEncryption fromString(String name) { + return fromString(name, ElasticSmbEncryption.class); + } + + /** + * Gets known ElasticSmbEncryption values. + * + * @return known ElasticSmbEncryption values. + */ + public static Collection<ElasticSmbEncryption> values() { + return values(ElasticSmbEncryption.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbPatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbPatchProperties.java new file mode 100644 index 000000000000..7766dfc4442c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbPatchProperties.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * SMB Patch Properties. + */ +@Fluent +public final class ElasticSmbPatchProperties implements JsonSerializable<ElasticSmbPatchProperties> { + /* + * Used to enable or disable encryption for in-flight SMB data volume. This flag can be modified during Elastic + * volume update operation as well. Only applicable for SMB protocol Elastic volumes. + */ + private ElasticSmbEncryption smbEncryption; + + /** + * Creates an instance of ElasticSmbPatchProperties class. + */ + public ElasticSmbPatchProperties() { + } + + /** + * Get the smbEncryption property: Used to enable or disable encryption for in-flight SMB data volume. This flag can + * be modified during Elastic volume update operation as well. Only applicable for SMB protocol Elastic volumes. + * + * @return the smbEncryption value. + */ + public ElasticSmbEncryption smbEncryption() { + return this.smbEncryption; + } + + /** + * Set the smbEncryption property: Used to enable or disable encryption for in-flight SMB data volume. This flag can + * be modified during Elastic volume update operation as well. Only applicable for SMB protocol Elastic volumes. + * + * @param smbEncryption the smbEncryption value to set. + * @return the ElasticSmbPatchProperties object itself. + */ + public ElasticSmbPatchProperties withSmbEncryption(ElasticSmbEncryption smbEncryption) { + this.smbEncryption = smbEncryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("smbEncryption", this.smbEncryption == null ? null : this.smbEncryption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSmbPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSmbPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSmbPatchProperties. + */ + public static ElasticSmbPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSmbPatchProperties deserializedElasticSmbPatchProperties = new ElasticSmbPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("smbEncryption".equals(fieldName)) { + deserializedElasticSmbPatchProperties.smbEncryption + = ElasticSmbEncryption.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSmbPatchProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbProperties.java new file mode 100644 index 000000000000..ce54c98ff0ed --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbProperties.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * SMB Properties. + */ +@Fluent +public final class ElasticSmbProperties implements JsonSerializable<ElasticSmbProperties> { + /* + * Used to enable or disable encryption for in-flight SMB data volume. This flag can be modified during Elastic + * volume update operation as well. Only applicable for SMB protocol Elastic volumes. + */ + private ElasticSmbEncryption smbEncryption; + + /** + * Creates an instance of ElasticSmbProperties class. + */ + public ElasticSmbProperties() { + } + + /** + * Get the smbEncryption property: Used to enable or disable encryption for in-flight SMB data volume. This flag can + * be modified during Elastic volume update operation as well. Only applicable for SMB protocol Elastic volumes. + * + * @return the smbEncryption value. + */ + public ElasticSmbEncryption smbEncryption() { + return this.smbEncryption; + } + + /** + * Set the smbEncryption property: Used to enable or disable encryption for in-flight SMB data volume. This flag can + * be modified during Elastic volume update operation as well. Only applicable for SMB protocol Elastic volumes. + * + * @param smbEncryption the smbEncryption value to set. + * @return the ElasticSmbProperties object itself. + */ + public ElasticSmbProperties withSmbEncryption(ElasticSmbEncryption smbEncryption) { + this.smbEncryption = smbEncryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("smbEncryption", this.smbEncryption == null ? null : this.smbEncryption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSmbProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSmbProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSmbProperties. + */ + public static ElasticSmbProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSmbProperties deserializedElasticSmbProperties = new ElasticSmbProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("smbEncryption".equals(fieldName)) { + deserializedElasticSmbProperties.smbEncryption + = ElasticSmbEncryption.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSmbProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshot.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshot.java new file mode 100644 index 000000000000..9e1816bc2354 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshot.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner; + +/** + * An immutable client-side representation of ElasticSnapshot. + */ +public interface ElasticSnapshot { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticSnapshotProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner object. + * + * @return the inner object. + */ + ElasticSnapshotInner innerModel(); + + /** + * The entirety of the ElasticSnapshot definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ElasticSnapshot definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticSnapshot definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the ElasticSnapshot definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName, poolName, volumeName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @return the next definition stage. + */ + WithCreate withExistingElasticVolume(String resourceGroupName, String accountName, String poolName, + String volumeName); + } + + /** + * The stage of the ElasticSnapshot definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticSnapshot create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticSnapshot create(Context context); + } + + /** + * The stage of the ElasticSnapshot definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticSnapshotProperties properties); + } + } + + /** + * Begins update for the ElasticSnapshot resource. + * + * @return the stage of resource update. + */ + ElasticSnapshot.Update update(); + + /** + * The template for ElasticSnapshot update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticSnapshot apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticSnapshot apply(Context context); + } + + /** + * The ElasticSnapshot update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticSnapshot update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ElasticSnapshotProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticSnapshot refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticSnapshot refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicies.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicies.java new file mode 100644 index 000000000000..75aed519de08 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicies.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ElasticSnapshotPolicies. + */ +public interface ElasticSnapshotPolicies { + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshotPolicy along with {@link Response}. + */ + Response<ElasticSnapshotPolicy> getWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context); + + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshotPolicy. + */ + ElasticSnapshotPolicy get(String resourceGroupName, String accountName, String snapshotPolicyName); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String snapshotPolicyName); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String snapshotPolicyName, Context context); + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticSnapshotPolicy> listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticSnapshotPolicy> listByElasticAccount(String resourceGroupName, String accountName, + Context context); + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticVolume> listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName); + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticVolume> listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context); + + /** + * Get a ElasticSnapshotPolicy. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshotPolicy along with {@link Response}. + */ + ElasticSnapshotPolicy getById(String id); + + /** + * Get a ElasticSnapshotPolicy. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshotPolicy along with {@link Response}. + */ + Response<ElasticSnapshotPolicy> getByIdWithResponse(String id, Context context); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ElasticSnapshotPolicy resource. + * + * @param name resource name. + * @return the first stage of the new ElasticSnapshotPolicy definition. + */ + ElasticSnapshotPolicy.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicy.java new file mode 100644 index 000000000000..a0a76305002d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicy.java @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner; +import java.util.Map; + +/** + * An immutable client-side representation of ElasticSnapshotPolicy. + */ +public interface ElasticSnapshotPolicy { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map<String, String> tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticSnapshotPolicyProperties properties(); + + /** + * Gets the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + String eTag(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner object. + * + * @return the inner object. + */ + ElasticSnapshotPolicyInner innerModel(); + + /** + * The entirety of the ElasticSnapshotPolicy definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ElasticSnapshotPolicy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticSnapshotPolicy definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ElasticSnapshotPolicy definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the ElasticSnapshotPolicy definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @return the next definition stage. + */ + WithCreate withExistingElasticAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the ElasticSnapshotPolicy definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticSnapshotPolicy create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticSnapshotPolicy create(Context context); + } + + /** + * The stage of the ElasticSnapshotPolicy definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map<String, String> tags); + } + + /** + * The stage of the ElasticSnapshotPolicy definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticSnapshotPolicyProperties properties); + } + } + + /** + * Begins update for the ElasticSnapshotPolicy resource. + * + * @return the stage of resource update. + */ + ElasticSnapshotPolicy.Update update(); + + /** + * The template for ElasticSnapshotPolicy update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticSnapshotPolicy apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticSnapshotPolicy apply(Context context); + } + + /** + * The ElasticSnapshotPolicy update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticSnapshotPolicy update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map<String, String> tags); + } + + /** + * The stage of the ElasticSnapshotPolicy update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ElasticSnapshotPolicyUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticSnapshotPolicy refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticSnapshotPolicy refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyDailySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyDailySchedule.java new file mode 100644 index 000000000000..d21f63d3ca15 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyDailySchedule.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Daily Schedule properties used to create NetApp snapshot policy. + */ +@Fluent +public final class ElasticSnapshotPolicyDailySchedule implements JsonSerializable<ElasticSnapshotPolicyDailySchedule> { + /* + * Daily snapshot count to keep + */ + private Integer snapshotsToKeep; + + /* + * Indicates which hour in UTC timezone a snapshot should be taken + */ + private Integer hour; + + /* + * Indicates which minute snapshot should be taken + */ + private Integer minute; + + /** + * Creates an instance of ElasticSnapshotPolicyDailySchedule class. + */ + public ElasticSnapshotPolicyDailySchedule() { + } + + /** + * Get the snapshotsToKeep property: Daily snapshot count to keep. + * + * @return the snapshotsToKeep value. + */ + public Integer snapshotsToKeep() { + return this.snapshotsToKeep; + } + + /** + * Set the snapshotsToKeep property: Daily snapshot count to keep. + * + * @param snapshotsToKeep the snapshotsToKeep value to set. + * @return the ElasticSnapshotPolicyDailySchedule object itself. + */ + public ElasticSnapshotPolicyDailySchedule withSnapshotsToKeep(Integer snapshotsToKeep) { + this.snapshotsToKeep = snapshotsToKeep; + return this; + } + + /** + * Get the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @return the hour value. + */ + public Integer hour() { + return this.hour; + } + + /** + * Set the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @param hour the hour value to set. + * @return the ElasticSnapshotPolicyDailySchedule object itself. + */ + public ElasticSnapshotPolicyDailySchedule withHour(Integer hour) { + this.hour = hour; + return this; + } + + /** + * Get the minute property: Indicates which minute snapshot should be taken. + * + * @return the minute value. + */ + public Integer minute() { + return this.minute; + } + + /** + * Set the minute property: Indicates which minute snapshot should be taken. + * + * @param minute the minute value to set. + * @return the ElasticSnapshotPolicyDailySchedule object itself. + */ + public ElasticSnapshotPolicyDailySchedule withMinute(Integer minute) { + this.minute = minute; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("snapshotsToKeep", this.snapshotsToKeep); + jsonWriter.writeNumberField("hour", this.hour); + jsonWriter.writeNumberField("minute", this.minute); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyDailySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyDailySchedule if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyDailySchedule. + */ + public static ElasticSnapshotPolicyDailySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyDailySchedule deserializedElasticSnapshotPolicyDailySchedule + = new ElasticSnapshotPolicyDailySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotsToKeep".equals(fieldName)) { + deserializedElasticSnapshotPolicyDailySchedule.snapshotsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("hour".equals(fieldName)) { + deserializedElasticSnapshotPolicyDailySchedule.hour = reader.getNullable(JsonReader::getInt); + } else if ("minute".equals(fieldName)) { + deserializedElasticSnapshotPolicyDailySchedule.minute = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyDailySchedule; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyHourlySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyHourlySchedule.java new file mode 100644 index 000000000000..bdec028a79b5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyHourlySchedule.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Hourly Schedule properties used to create NetApp snapshot policy. + */ +@Fluent +public final class ElasticSnapshotPolicyHourlySchedule + implements JsonSerializable<ElasticSnapshotPolicyHourlySchedule> { + /* + * Hourly snapshot count to keep + */ + private Integer snapshotsToKeep; + + /* + * Indicates which minute snapshot should be taken + */ + private Integer minute; + + /** + * Creates an instance of ElasticSnapshotPolicyHourlySchedule class. + */ + public ElasticSnapshotPolicyHourlySchedule() { + } + + /** + * Get the snapshotsToKeep property: Hourly snapshot count to keep. + * + * @return the snapshotsToKeep value. + */ + public Integer snapshotsToKeep() { + return this.snapshotsToKeep; + } + + /** + * Set the snapshotsToKeep property: Hourly snapshot count to keep. + * + * @param snapshotsToKeep the snapshotsToKeep value to set. + * @return the ElasticSnapshotPolicyHourlySchedule object itself. + */ + public ElasticSnapshotPolicyHourlySchedule withSnapshotsToKeep(Integer snapshotsToKeep) { + this.snapshotsToKeep = snapshotsToKeep; + return this; + } + + /** + * Get the minute property: Indicates which minute snapshot should be taken. + * + * @return the minute value. + */ + public Integer minute() { + return this.minute; + } + + /** + * Set the minute property: Indicates which minute snapshot should be taken. + * + * @param minute the minute value to set. + * @return the ElasticSnapshotPolicyHourlySchedule object itself. + */ + public ElasticSnapshotPolicyHourlySchedule withMinute(Integer minute) { + this.minute = minute; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("snapshotsToKeep", this.snapshotsToKeep); + jsonWriter.writeNumberField("minute", this.minute); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyHourlySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyHourlySchedule if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyHourlySchedule. + */ + public static ElasticSnapshotPolicyHourlySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyHourlySchedule deserializedElasticSnapshotPolicyHourlySchedule + = new ElasticSnapshotPolicyHourlySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotsToKeep".equals(fieldName)) { + deserializedElasticSnapshotPolicyHourlySchedule.snapshotsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("minute".equals(fieldName)) { + deserializedElasticSnapshotPolicyHourlySchedule.minute = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyHourlySchedule; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyMonthlySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyMonthlySchedule.java new file mode 100644 index 000000000000..1cbac2277d20 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyMonthlySchedule.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Monthly Schedule properties used to create NetApp snapshot policy. + */ +@Fluent +public final class ElasticSnapshotPolicyMonthlySchedule + implements JsonSerializable<ElasticSnapshotPolicyMonthlySchedule> { + /* + * Monthly snapshot count to keep + */ + private Integer snapshotsToKeep; + + /* + * Indicates which days of the month snapshot (1-31) should be taken, accepts a list of integers + */ + private List<Integer> daysOfMonth; + + /* + * Indicates which hour in UTC timezone a snapshot should be taken + */ + private Integer hour; + + /* + * Indicates which minute snapshot should be taken + */ + private Integer minute; + + /** + * Creates an instance of ElasticSnapshotPolicyMonthlySchedule class. + */ + public ElasticSnapshotPolicyMonthlySchedule() { + } + + /** + * Get the snapshotsToKeep property: Monthly snapshot count to keep. + * + * @return the snapshotsToKeep value. + */ + public Integer snapshotsToKeep() { + return this.snapshotsToKeep; + } + + /** + * Set the snapshotsToKeep property: Monthly snapshot count to keep. + * + * @param snapshotsToKeep the snapshotsToKeep value to set. + * @return the ElasticSnapshotPolicyMonthlySchedule object itself. + */ + public ElasticSnapshotPolicyMonthlySchedule withSnapshotsToKeep(Integer snapshotsToKeep) { + this.snapshotsToKeep = snapshotsToKeep; + return this; + } + + /** + * Get the daysOfMonth property: Indicates which days of the month snapshot (1-31) should be taken, accepts a list + * of integers. + * + * @return the daysOfMonth value. + */ + public List<Integer> daysOfMonth() { + return this.daysOfMonth; + } + + /** + * Set the daysOfMonth property: Indicates which days of the month snapshot (1-31) should be taken, accepts a list + * of integers. + * + * @param daysOfMonth the daysOfMonth value to set. + * @return the ElasticSnapshotPolicyMonthlySchedule object itself. + */ + public ElasticSnapshotPolicyMonthlySchedule withDaysOfMonth(List<Integer> daysOfMonth) { + this.daysOfMonth = daysOfMonth; + return this; + } + + /** + * Get the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @return the hour value. + */ + public Integer hour() { + return this.hour; + } + + /** + * Set the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @param hour the hour value to set. + * @return the ElasticSnapshotPolicyMonthlySchedule object itself. + */ + public ElasticSnapshotPolicyMonthlySchedule withHour(Integer hour) { + this.hour = hour; + return this; + } + + /** + * Get the minute property: Indicates which minute snapshot should be taken. + * + * @return the minute value. + */ + public Integer minute() { + return this.minute; + } + + /** + * Set the minute property: Indicates which minute snapshot should be taken. + * + * @param minute the minute value to set. + * @return the ElasticSnapshotPolicyMonthlySchedule object itself. + */ + public ElasticSnapshotPolicyMonthlySchedule withMinute(Integer minute) { + this.minute = minute; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("snapshotsToKeep", this.snapshotsToKeep); + jsonWriter.writeArrayField("daysOfMonth", this.daysOfMonth, (writer, element) -> writer.writeInt(element)); + jsonWriter.writeNumberField("hour", this.hour); + jsonWriter.writeNumberField("minute", this.minute); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyMonthlySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyMonthlySchedule if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyMonthlySchedule. + */ + public static ElasticSnapshotPolicyMonthlySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyMonthlySchedule deserializedElasticSnapshotPolicyMonthlySchedule + = new ElasticSnapshotPolicyMonthlySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotsToKeep".equals(fieldName)) { + deserializedElasticSnapshotPolicyMonthlySchedule.snapshotsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("daysOfMonth".equals(fieldName)) { + List<Integer> daysOfMonth = reader.readArray(reader1 -> reader1.getInt()); + deserializedElasticSnapshotPolicyMonthlySchedule.daysOfMonth = daysOfMonth; + } else if ("hour".equals(fieldName)) { + deserializedElasticSnapshotPolicyMonthlySchedule.hour = reader.getNullable(JsonReader::getInt); + } else if ("minute".equals(fieldName)) { + deserializedElasticSnapshotPolicyMonthlySchedule.minute = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyMonthlySchedule; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyProperties.java new file mode 100644 index 000000000000..e606a93f9402 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyProperties.java @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Snapshot policy properties. + */ +@Fluent +public final class ElasticSnapshotPolicyProperties implements JsonSerializable<ElasticSnapshotPolicyProperties> { + /* + * Schedule for hourly snapshots + */ + private ElasticSnapshotPolicyHourlySchedule hourlySchedule; + + /* + * Schedule for daily snapshots + */ + private ElasticSnapshotPolicyDailySchedule dailySchedule; + + /* + * Schedule for weekly snapshots + */ + private ElasticSnapshotPolicyWeeklySchedule weeklySchedule; + + /* + * Schedule for monthly snapshots + */ + private ElasticSnapshotPolicyMonthlySchedule monthlySchedule; + + /* + * Configures if the snapshot policy is enabled on the volumes connected to the policy. + */ + private PolicyStatus policyStatus; + + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of ElasticSnapshotPolicyProperties class. + */ + public ElasticSnapshotPolicyProperties() { + } + + /** + * Get the hourlySchedule property: Schedule for hourly snapshots. + * + * @return the hourlySchedule value. + */ + public ElasticSnapshotPolicyHourlySchedule hourlySchedule() { + return this.hourlySchedule; + } + + /** + * Set the hourlySchedule property: Schedule for hourly snapshots. + * + * @param hourlySchedule the hourlySchedule value to set. + * @return the ElasticSnapshotPolicyProperties object itself. + */ + public ElasticSnapshotPolicyProperties withHourlySchedule(ElasticSnapshotPolicyHourlySchedule hourlySchedule) { + this.hourlySchedule = hourlySchedule; + return this; + } + + /** + * Get the dailySchedule property: Schedule for daily snapshots. + * + * @return the dailySchedule value. + */ + public ElasticSnapshotPolicyDailySchedule dailySchedule() { + return this.dailySchedule; + } + + /** + * Set the dailySchedule property: Schedule for daily snapshots. + * + * @param dailySchedule the dailySchedule value to set. + * @return the ElasticSnapshotPolicyProperties object itself. + */ + public ElasticSnapshotPolicyProperties withDailySchedule(ElasticSnapshotPolicyDailySchedule dailySchedule) { + this.dailySchedule = dailySchedule; + return this; + } + + /** + * Get the weeklySchedule property: Schedule for weekly snapshots. + * + * @return the weeklySchedule value. + */ + public ElasticSnapshotPolicyWeeklySchedule weeklySchedule() { + return this.weeklySchedule; + } + + /** + * Set the weeklySchedule property: Schedule for weekly snapshots. + * + * @param weeklySchedule the weeklySchedule value to set. + * @return the ElasticSnapshotPolicyProperties object itself. + */ + public ElasticSnapshotPolicyProperties withWeeklySchedule(ElasticSnapshotPolicyWeeklySchedule weeklySchedule) { + this.weeklySchedule = weeklySchedule; + return this; + } + + /** + * Get the monthlySchedule property: Schedule for monthly snapshots. + * + * @return the monthlySchedule value. + */ + public ElasticSnapshotPolicyMonthlySchedule monthlySchedule() { + return this.monthlySchedule; + } + + /** + * Set the monthlySchedule property: Schedule for monthly snapshots. + * + * @param monthlySchedule the monthlySchedule value to set. + * @return the ElasticSnapshotPolicyProperties object itself. + */ + public ElasticSnapshotPolicyProperties withMonthlySchedule(ElasticSnapshotPolicyMonthlySchedule monthlySchedule) { + this.monthlySchedule = monthlySchedule; + return this; + } + + /** + * Get the policyStatus property: Configures if the snapshot policy is enabled on the volumes connected to the + * policy. + * + * @return the policyStatus value. + */ + public PolicyStatus policyStatus() { + return this.policyStatus; + } + + /** + * Set the policyStatus property: Configures if the snapshot policy is enabled on the volumes connected to the + * policy. + * + * @param policyStatus the policyStatus value to set. + * @return the ElasticSnapshotPolicyProperties object itself. + */ + public ElasticSnapshotPolicyProperties withPolicyStatus(PolicyStatus policyStatus) { + this.policyStatus = policyStatus; + return this; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (hourlySchedule() != null) { + hourlySchedule().validate(); + } + if (dailySchedule() != null) { + dailySchedule().validate(); + } + if (weeklySchedule() != null) { + weeklySchedule().validate(); + } + if (monthlySchedule() != null) { + monthlySchedule().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("hourlySchedule", this.hourlySchedule); + jsonWriter.writeJsonField("dailySchedule", this.dailySchedule); + jsonWriter.writeJsonField("weeklySchedule", this.weeklySchedule); + jsonWriter.writeJsonField("monthlySchedule", this.monthlySchedule); + jsonWriter.writeStringField("policyStatus", this.policyStatus == null ? null : this.policyStatus.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyProperties. + */ + public static ElasticSnapshotPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyProperties deserializedElasticSnapshotPolicyProperties + = new ElasticSnapshotPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("hourlySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.hourlySchedule + = ElasticSnapshotPolicyHourlySchedule.fromJson(reader); + } else if ("dailySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.dailySchedule + = ElasticSnapshotPolicyDailySchedule.fromJson(reader); + } else if ("weeklySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.weeklySchedule + = ElasticSnapshotPolicyWeeklySchedule.fromJson(reader); + } else if ("monthlySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.monthlySchedule + = ElasticSnapshotPolicyMonthlySchedule.fromJson(reader); + } else if ("policyStatus".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.policyStatus + = PolicyStatus.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdate.java new file mode 100644 index 000000000000..c9224f647b39 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdate.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ElasticSnapshotPolicy. + */ +@Fluent +public final class ElasticSnapshotPolicyUpdate implements JsonSerializable<ElasticSnapshotPolicyUpdate> { + /* + * Resource tags. + */ + private Map<String, String> tags; + + /* + * The resource-specific properties for this resource. + */ + private ElasticSnapshotPolicyUpdateProperties properties; + + /** + * Creates an instance of ElasticSnapshotPolicyUpdate class. + */ + public ElasticSnapshotPolicyUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map<String, String> tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ElasticSnapshotPolicyUpdate object itself. + */ + public ElasticSnapshotPolicyUpdate withTags(Map<String, String> tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticSnapshotPolicyUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticSnapshotPolicyUpdate object itself. + */ + public ElasticSnapshotPolicyUpdate withProperties(ElasticSnapshotPolicyUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyUpdate if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyUpdate. + */ + public static ElasticSnapshotPolicyUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyUpdate deserializedElasticSnapshotPolicyUpdate = new ElasticSnapshotPolicyUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticSnapshotPolicyUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedElasticSnapshotPolicyUpdate.properties + = ElasticSnapshotPolicyUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdateProperties.java new file mode 100644 index 000000000000..aeb1d8a2d1a3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdateProperties.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The updatable properties of the ElasticSnapshotPolicy. + */ +@Fluent +public final class ElasticSnapshotPolicyUpdateProperties + implements JsonSerializable<ElasticSnapshotPolicyUpdateProperties> { + /* + * Schedule for hourly snapshots + */ + private ElasticSnapshotPolicyHourlySchedule hourlySchedule; + + /* + * Schedule for daily snapshots + */ + private ElasticSnapshotPolicyDailySchedule dailySchedule; + + /* + * Schedule for weekly snapshots + */ + private ElasticSnapshotPolicyWeeklySchedule weeklySchedule; + + /* + * Schedule for monthly snapshots + */ + private ElasticSnapshotPolicyMonthlySchedule monthlySchedule; + + /* + * Configures if the snapshot policy is enabled on the volumes connected to the policy. + */ + private PolicyStatus policyStatus; + + /** + * Creates an instance of ElasticSnapshotPolicyUpdateProperties class. + */ + public ElasticSnapshotPolicyUpdateProperties() { + } + + /** + * Get the hourlySchedule property: Schedule for hourly snapshots. + * + * @return the hourlySchedule value. + */ + public ElasticSnapshotPolicyHourlySchedule hourlySchedule() { + return this.hourlySchedule; + } + + /** + * Set the hourlySchedule property: Schedule for hourly snapshots. + * + * @param hourlySchedule the hourlySchedule value to set. + * @return the ElasticSnapshotPolicyUpdateProperties object itself. + */ + public ElasticSnapshotPolicyUpdateProperties + withHourlySchedule(ElasticSnapshotPolicyHourlySchedule hourlySchedule) { + this.hourlySchedule = hourlySchedule; + return this; + } + + /** + * Get the dailySchedule property: Schedule for daily snapshots. + * + * @return the dailySchedule value. + */ + public ElasticSnapshotPolicyDailySchedule dailySchedule() { + return this.dailySchedule; + } + + /** + * Set the dailySchedule property: Schedule for daily snapshots. + * + * @param dailySchedule the dailySchedule value to set. + * @return the ElasticSnapshotPolicyUpdateProperties object itself. + */ + public ElasticSnapshotPolicyUpdateProperties withDailySchedule(ElasticSnapshotPolicyDailySchedule dailySchedule) { + this.dailySchedule = dailySchedule; + return this; + } + + /** + * Get the weeklySchedule property: Schedule for weekly snapshots. + * + * @return the weeklySchedule value. + */ + public ElasticSnapshotPolicyWeeklySchedule weeklySchedule() { + return this.weeklySchedule; + } + + /** + * Set the weeklySchedule property: Schedule for weekly snapshots. + * + * @param weeklySchedule the weeklySchedule value to set. + * @return the ElasticSnapshotPolicyUpdateProperties object itself. + */ + public ElasticSnapshotPolicyUpdateProperties + withWeeklySchedule(ElasticSnapshotPolicyWeeklySchedule weeklySchedule) { + this.weeklySchedule = weeklySchedule; + return this; + } + + /** + * Get the monthlySchedule property: Schedule for monthly snapshots. + * + * @return the monthlySchedule value. + */ + public ElasticSnapshotPolicyMonthlySchedule monthlySchedule() { + return this.monthlySchedule; + } + + /** + * Set the monthlySchedule property: Schedule for monthly snapshots. + * + * @param monthlySchedule the monthlySchedule value to set. + * @return the ElasticSnapshotPolicyUpdateProperties object itself. + */ + public ElasticSnapshotPolicyUpdateProperties + withMonthlySchedule(ElasticSnapshotPolicyMonthlySchedule monthlySchedule) { + this.monthlySchedule = monthlySchedule; + return this; + } + + /** + * Get the policyStatus property: Configures if the snapshot policy is enabled on the volumes connected to the + * policy. + * + * @return the policyStatus value. + */ + public PolicyStatus policyStatus() { + return this.policyStatus; + } + + /** + * Set the policyStatus property: Configures if the snapshot policy is enabled on the volumes connected to the + * policy. + * + * @param policyStatus the policyStatus value to set. + * @return the ElasticSnapshotPolicyUpdateProperties object itself. + */ + public ElasticSnapshotPolicyUpdateProperties withPolicyStatus(PolicyStatus policyStatus) { + this.policyStatus = policyStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (hourlySchedule() != null) { + hourlySchedule().validate(); + } + if (dailySchedule() != null) { + dailySchedule().validate(); + } + if (weeklySchedule() != null) { + weeklySchedule().validate(); + } + if (monthlySchedule() != null) { + monthlySchedule().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("hourlySchedule", this.hourlySchedule); + jsonWriter.writeJsonField("dailySchedule", this.dailySchedule); + jsonWriter.writeJsonField("weeklySchedule", this.weeklySchedule); + jsonWriter.writeJsonField("monthlySchedule", this.monthlySchedule); + jsonWriter.writeStringField("policyStatus", this.policyStatus == null ? null : this.policyStatus.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyUpdateProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyUpdateProperties. + */ + public static ElasticSnapshotPolicyUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyUpdateProperties deserializedElasticSnapshotPolicyUpdateProperties + = new ElasticSnapshotPolicyUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("hourlySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyUpdateProperties.hourlySchedule + = ElasticSnapshotPolicyHourlySchedule.fromJson(reader); + } else if ("dailySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyUpdateProperties.dailySchedule + = ElasticSnapshotPolicyDailySchedule.fromJson(reader); + } else if ("weeklySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyUpdateProperties.weeklySchedule + = ElasticSnapshotPolicyWeeklySchedule.fromJson(reader); + } else if ("monthlySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyUpdateProperties.monthlySchedule + = ElasticSnapshotPolicyMonthlySchedule.fromJson(reader); + } else if ("policyStatus".equals(fieldName)) { + deserializedElasticSnapshotPolicyUpdateProperties.policyStatus + = PolicyStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyWeeklySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyWeeklySchedule.java new file mode 100644 index 000000000000..62a9b5ad9ac8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyWeeklySchedule.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Weekly Schedule properties used to create NetApp snapshot policy. + */ +@Fluent +public final class ElasticSnapshotPolicyWeeklySchedule + implements JsonSerializable<ElasticSnapshotPolicyWeeklySchedule> { + /* + * Weekly snapshot count to keep + */ + private Integer snapshotsToKeep; + + /* + * Indicates which weekday(s) snapshot(s) should be taken, accepts a list of week day names in english + */ + private List<DayOfWeek> days; + + /* + * Indicates which hour in UTC timezone a snapshot should be taken + */ + private Integer hour; + + /* + * Indicates which minute snapshot should be taken + */ + private Integer minute; + + /** + * Creates an instance of ElasticSnapshotPolicyWeeklySchedule class. + */ + public ElasticSnapshotPolicyWeeklySchedule() { + } + + /** + * Get the snapshotsToKeep property: Weekly snapshot count to keep. + * + * @return the snapshotsToKeep value. + */ + public Integer snapshotsToKeep() { + return this.snapshotsToKeep; + } + + /** + * Set the snapshotsToKeep property: Weekly snapshot count to keep. + * + * @param snapshotsToKeep the snapshotsToKeep value to set. + * @return the ElasticSnapshotPolicyWeeklySchedule object itself. + */ + public ElasticSnapshotPolicyWeeklySchedule withSnapshotsToKeep(Integer snapshotsToKeep) { + this.snapshotsToKeep = snapshotsToKeep; + return this; + } + + /** + * Get the days property: Indicates which weekday(s) snapshot(s) should be taken, accepts a list of week day names + * in english. + * + * @return the days value. + */ + public List<DayOfWeek> days() { + return this.days; + } + + /** + * Set the days property: Indicates which weekday(s) snapshot(s) should be taken, accepts a list of week day names + * in english. + * + * @param days the days value to set. + * @return the ElasticSnapshotPolicyWeeklySchedule object itself. + */ + public ElasticSnapshotPolicyWeeklySchedule withDays(List<DayOfWeek> days) { + this.days = days; + return this; + } + + /** + * Get the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @return the hour value. + */ + public Integer hour() { + return this.hour; + } + + /** + * Set the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @param hour the hour value to set. + * @return the ElasticSnapshotPolicyWeeklySchedule object itself. + */ + public ElasticSnapshotPolicyWeeklySchedule withHour(Integer hour) { + this.hour = hour; + return this; + } + + /** + * Get the minute property: Indicates which minute snapshot should be taken. + * + * @return the minute value. + */ + public Integer minute() { + return this.minute; + } + + /** + * Set the minute property: Indicates which minute snapshot should be taken. + * + * @param minute the minute value to set. + * @return the ElasticSnapshotPolicyWeeklySchedule object itself. + */ + public ElasticSnapshotPolicyWeeklySchedule withMinute(Integer minute) { + this.minute = minute; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("snapshotsToKeep", this.snapshotsToKeep); + jsonWriter.writeArrayField("days", this.days, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeNumberField("hour", this.hour); + jsonWriter.writeNumberField("minute", this.minute); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyWeeklySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyWeeklySchedule if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyWeeklySchedule. + */ + public static ElasticSnapshotPolicyWeeklySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyWeeklySchedule deserializedElasticSnapshotPolicyWeeklySchedule + = new ElasticSnapshotPolicyWeeklySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotsToKeep".equals(fieldName)) { + deserializedElasticSnapshotPolicyWeeklySchedule.snapshotsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("days".equals(fieldName)) { + List<DayOfWeek> days = reader.readArray(reader1 -> DayOfWeek.fromString(reader1.getString())); + deserializedElasticSnapshotPolicyWeeklySchedule.days = days; + } else if ("hour".equals(fieldName)) { + deserializedElasticSnapshotPolicyWeeklySchedule.hour = reader.getNullable(JsonReader::getInt); + } else if ("minute".equals(fieldName)) { + deserializedElasticSnapshotPolicyWeeklySchedule.minute = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyWeeklySchedule; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotProperties.java new file mode 100644 index 000000000000..92a3c2587f96 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotProperties.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Snapshot properties. + */ +@Immutable +public final class ElasticSnapshotProperties implements JsonSerializable<ElasticSnapshotProperties> { + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of ElasticSnapshotProperties class. + */ + public ElasticSnapshotProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotProperties. + */ + public static ElasticSnapshotProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotProperties deserializedElasticSnapshotProperties = new ElasticSnapshotProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedElasticSnapshotProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshots.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshots.java new file mode 100644 index 000000000000..aa698ce37da1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshots.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ElasticSnapshots. + */ +public interface ElasticSnapshots { + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot along with {@link Response}. + */ + Response<ElasticSnapshot> getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context); + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot. + */ + ElasticSnapshot get(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, + Context context); + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticSnapshot> listByElasticVolume(String resourceGroupName, String accountName, String poolName, + String volumeName); + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticSnapshot> listByElasticVolume(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context); + + /** + * Get a ElasticSnapshot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot along with {@link Response}. + */ + ElasticSnapshot getById(String id); + + /** + * Get a ElasticSnapshot. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot along with {@link Response}. + */ + Response<ElasticSnapshot> getByIdWithResponse(String id, Context context); + + /** + * Delete a ElasticSnapshot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a ElasticSnapshot. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ElasticSnapshot resource. + * + * @param name resource name. + * @return the first stage of the new ElasticSnapshot definition. + */ + ElasticSnapshot.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticUnixAccessRule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticUnixAccessRule.java new file mode 100644 index 000000000000..659566146864 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticUnixAccessRule.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Unix access rule. + */ +public final class ElasticUnixAccessRule extends ExpandableStringEnum<ElasticUnixAccessRule> { + /** + * Clients connecting with this rule will only have read access to the volume. + */ + public static final ElasticUnixAccessRule READ_ONLY = fromString("ReadOnly"); + + /** + * Clients connecting with this rule will have full read and write access to the volume. + */ + public static final ElasticUnixAccessRule READ_WRITE = fromString("ReadWrite"); + + /** + * Clients connecting with this rule will have no access to the volume. + */ + public static final ElasticUnixAccessRule NO_ACCESS = fromString("NoAccess"); + + /** + * Creates a new instance of ElasticUnixAccessRule value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticUnixAccessRule() { + } + + /** + * Creates or finds a ElasticUnixAccessRule from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticUnixAccessRule. + */ + public static ElasticUnixAccessRule fromString(String name) { + return fromString(name, ElasticUnixAccessRule.class); + } + + /** + * Gets known ElasticUnixAccessRule values. + * + * @return known ElasticUnixAccessRule values. + */ + public static Collection<ElasticUnixAccessRule> values() { + return values(ElasticUnixAccessRule.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolume.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolume.java new file mode 100644 index 000000000000..356a025e8029 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolume.java @@ -0,0 +1,322 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of ElasticVolume. + */ +public interface ElasticVolume { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map<String, String> tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticVolumeProperties properties(); + + /** + * Gets the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + String eTag(); + + /** + * Gets the zones property: The availability zones. + * + * @return the zones value. + */ + List<String> zones(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner object. + * + * @return the inner object. + */ + ElasticVolumeInner innerModel(); + + /** + * The entirety of the ElasticVolume definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ElasticVolume definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticVolume definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ElasticVolume definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the ElasticVolume definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName, poolName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @return the next definition stage. + */ + WithCreate withExistingElasticCapacityPool(String resourceGroupName, String accountName, String poolName); + } + + /** + * The stage of the ElasticVolume definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithZones { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticVolume create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticVolume create(Context context); + } + + /** + * The stage of the ElasticVolume definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map<String, String> tags); + } + + /** + * The stage of the ElasticVolume definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticVolumeProperties properties); + } + + /** + * The stage of the ElasticVolume definition allowing to specify zones. + */ + interface WithZones { + /** + * Specifies the zones property: The availability zones.. + * + * @param zones The availability zones. + * @return the next definition stage. + */ + WithCreate withZones(List<String> zones); + } + } + + /** + * Begins update for the ElasticVolume resource. + * + * @return the stage of resource update. + */ + ElasticVolume.Update update(); + + /** + * The template for ElasticVolume update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticVolume apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticVolume apply(Context context); + } + + /** + * The ElasticVolume update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticVolume update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map<String, String> tags); + } + + /** + * The stage of the ElasticVolume update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ElasticVolumeUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticVolume refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticVolume refresh(Context context); + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ElasticVolume revert(ElasticVolumeRevert body); + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ElasticVolume revert(ElasticVolumeRevert body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeBackupProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeBackupProperties.java new file mode 100644 index 000000000000..0ad6d3a993de --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeBackupProperties.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Volume Backup Properties. + */ +@Fluent +public final class ElasticVolumeBackupProperties implements JsonSerializable<ElasticVolumeBackupProperties> { + /* + * ResourceId used to identify Elastic Backup Policy + */ + private String elasticBackupPolicyResourceId; + + /* + * The property to decide policy is enforced or not on the volume + */ + private ElasticVolumePolicyEnforcement policyEnforcement; + + /* + * ResourceId used to identify Elastic Backup Vault + */ + private String elasticBackupVaultResourceId; + + /** + * Creates an instance of ElasticVolumeBackupProperties class. + */ + public ElasticVolumeBackupProperties() { + } + + /** + * Get the elasticBackupPolicyResourceId property: ResourceId used to identify Elastic Backup Policy. + * + * @return the elasticBackupPolicyResourceId value. + */ + public String elasticBackupPolicyResourceId() { + return this.elasticBackupPolicyResourceId; + } + + /** + * Set the elasticBackupPolicyResourceId property: ResourceId used to identify Elastic Backup Policy. + * + * @param elasticBackupPolicyResourceId the elasticBackupPolicyResourceId value to set. + * @return the ElasticVolumeBackupProperties object itself. + */ + public ElasticVolumeBackupProperties withElasticBackupPolicyResourceId(String elasticBackupPolicyResourceId) { + this.elasticBackupPolicyResourceId = elasticBackupPolicyResourceId; + return this; + } + + /** + * Get the policyEnforcement property: The property to decide policy is enforced or not on the volume. + * + * @return the policyEnforcement value. + */ + public ElasticVolumePolicyEnforcement policyEnforcement() { + return this.policyEnforcement; + } + + /** + * Set the policyEnforcement property: The property to decide policy is enforced or not on the volume. + * + * @param policyEnforcement the policyEnforcement value to set. + * @return the ElasticVolumeBackupProperties object itself. + */ + public ElasticVolumeBackupProperties withPolicyEnforcement(ElasticVolumePolicyEnforcement policyEnforcement) { + this.policyEnforcement = policyEnforcement; + return this; + } + + /** + * Get the elasticBackupVaultResourceId property: ResourceId used to identify Elastic Backup Vault. + * + * @return the elasticBackupVaultResourceId value. + */ + public String elasticBackupVaultResourceId() { + return this.elasticBackupVaultResourceId; + } + + /** + * Set the elasticBackupVaultResourceId property: ResourceId used to identify Elastic Backup Vault. + * + * @param elasticBackupVaultResourceId the elasticBackupVaultResourceId value to set. + * @return the ElasticVolumeBackupProperties object itself. + */ + public ElasticVolumeBackupProperties withElasticBackupVaultResourceId(String elasticBackupVaultResourceId) { + this.elasticBackupVaultResourceId = elasticBackupVaultResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("elasticBackupPolicyResourceId", this.elasticBackupPolicyResourceId); + jsonWriter.writeStringField("policyEnforcement", + this.policyEnforcement == null ? null : this.policyEnforcement.toString()); + jsonWriter.writeStringField("elasticBackupVaultResourceId", this.elasticBackupVaultResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeBackupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeBackupProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeBackupProperties. + */ + public static ElasticVolumeBackupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeBackupProperties deserializedElasticVolumeBackupProperties + = new ElasticVolumeBackupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("elasticBackupPolicyResourceId".equals(fieldName)) { + deserializedElasticVolumeBackupProperties.elasticBackupPolicyResourceId = reader.getString(); + } else if ("policyEnforcement".equals(fieldName)) { + deserializedElasticVolumeBackupProperties.policyEnforcement + = ElasticVolumePolicyEnforcement.fromString(reader.getString()); + } else if ("elasticBackupVaultResourceId".equals(fieldName)) { + deserializedElasticVolumeBackupProperties.elasticBackupVaultResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeBackupProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionPatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionPatchProperties.java new file mode 100644 index 000000000000..5bef7dd86892 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionPatchProperties.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Data protection configuration option for updating the volume, including snapshot policies and backup. + */ +@Fluent +public final class ElasticVolumeDataProtectionPatchProperties + implements JsonSerializable<ElasticVolumeDataProtectionPatchProperties> { + /* + * Used to apply a snapshot policy to a volume. + */ + private ElasticVolumeSnapshotProperties snapshot; + + /* + * Used to configure backups on an elastic volume. + */ + private ElasticVolumeBackupProperties backup; + + /** + * Creates an instance of ElasticVolumeDataProtectionPatchProperties class. + */ + public ElasticVolumeDataProtectionPatchProperties() { + } + + /** + * Get the snapshot property: Used to apply a snapshot policy to a volume. + * + * @return the snapshot value. + */ + public ElasticVolumeSnapshotProperties snapshot() { + return this.snapshot; + } + + /** + * Set the snapshot property: Used to apply a snapshot policy to a volume. + * + * @param snapshot the snapshot value to set. + * @return the ElasticVolumeDataProtectionPatchProperties object itself. + */ + public ElasticVolumeDataProtectionPatchProperties withSnapshot(ElasticVolumeSnapshotProperties snapshot) { + this.snapshot = snapshot; + return this; + } + + /** + * Get the backup property: Used to configure backups on an elastic volume. + * + * @return the backup value. + */ + public ElasticVolumeBackupProperties backup() { + return this.backup; + } + + /** + * Set the backup property: Used to configure backups on an elastic volume. + * + * @param backup the backup value to set. + * @return the ElasticVolumeDataProtectionPatchProperties object itself. + */ + public ElasticVolumeDataProtectionPatchProperties withBackup(ElasticVolumeBackupProperties backup) { + this.backup = backup; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (snapshot() != null) { + snapshot().validate(); + } + if (backup() != null) { + backup().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("snapshot", this.snapshot); + jsonWriter.writeJsonField("backup", this.backup); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeDataProtectionPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeDataProtectionPatchProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeDataProtectionPatchProperties. + */ + public static ElasticVolumeDataProtectionPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeDataProtectionPatchProperties deserializedElasticVolumeDataProtectionPatchProperties + = new ElasticVolumeDataProtectionPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshot".equals(fieldName)) { + deserializedElasticVolumeDataProtectionPatchProperties.snapshot + = ElasticVolumeSnapshotProperties.fromJson(reader); + } else if ("backup".equals(fieldName)) { + deserializedElasticVolumeDataProtectionPatchProperties.backup + = ElasticVolumeBackupProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeDataProtectionPatchProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionProperties.java new file mode 100644 index 000000000000..1275a92577bc --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionProperties.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Data protection configuration option for the volume, including snapshot policies and backup. + */ +@Fluent +public final class ElasticVolumeDataProtectionProperties + implements JsonSerializable<ElasticVolumeDataProtectionProperties> { + /* + * Used to apply a snapshot policy to a volume. + */ + private ElasticVolumeSnapshotProperties snapshot; + + /* + * Used to configure backups on an elastic volume. + */ + private ElasticVolumeBackupProperties backup; + + /** + * Creates an instance of ElasticVolumeDataProtectionProperties class. + */ + public ElasticVolumeDataProtectionProperties() { + } + + /** + * Get the snapshot property: Used to apply a snapshot policy to a volume. + * + * @return the snapshot value. + */ + public ElasticVolumeSnapshotProperties snapshot() { + return this.snapshot; + } + + /** + * Set the snapshot property: Used to apply a snapshot policy to a volume. + * + * @param snapshot the snapshot value to set. + * @return the ElasticVolumeDataProtectionProperties object itself. + */ + public ElasticVolumeDataProtectionProperties withSnapshot(ElasticVolumeSnapshotProperties snapshot) { + this.snapshot = snapshot; + return this; + } + + /** + * Get the backup property: Used to configure backups on an elastic volume. + * + * @return the backup value. + */ + public ElasticVolumeBackupProperties backup() { + return this.backup; + } + + /** + * Set the backup property: Used to configure backups on an elastic volume. + * + * @param backup the backup value to set. + * @return the ElasticVolumeDataProtectionProperties object itself. + */ + public ElasticVolumeDataProtectionProperties withBackup(ElasticVolumeBackupProperties backup) { + this.backup = backup; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (snapshot() != null) { + snapshot().validate(); + } + if (backup() != null) { + backup().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("snapshot", this.snapshot); + jsonWriter.writeJsonField("backup", this.backup); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeDataProtectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeDataProtectionProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeDataProtectionProperties. + */ + public static ElasticVolumeDataProtectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeDataProtectionProperties deserializedElasticVolumeDataProtectionProperties + = new ElasticVolumeDataProtectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshot".equals(fieldName)) { + deserializedElasticVolumeDataProtectionProperties.snapshot + = ElasticVolumeSnapshotProperties.fromJson(reader); + } else if ("backup".equals(fieldName)) { + deserializedElasticVolumeDataProtectionProperties.backup + = ElasticVolumeBackupProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeDataProtectionProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumePolicyEnforcement.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumePolicyEnforcement.java new file mode 100644 index 000000000000..6a1bb984ee91 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumePolicyEnforcement.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Policy enforcement. + */ +public final class ElasticVolumePolicyEnforcement extends ExpandableStringEnum<ElasticVolumePolicyEnforcement> { + /** + * Value indicating the policy is enforced on the volume. + */ + public static final ElasticVolumePolicyEnforcement ENFORCED = fromString("Enforced"); + + /** + * Value indicating the policy is not enforced on the volume. + */ + public static final ElasticVolumePolicyEnforcement NOT_ENFORCED = fromString("NotEnforced"); + + /** + * Creates a new instance of ElasticVolumePolicyEnforcement value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticVolumePolicyEnforcement() { + } + + /** + * Creates or finds a ElasticVolumePolicyEnforcement from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticVolumePolicyEnforcement. + */ + public static ElasticVolumePolicyEnforcement fromString(String name) { + return fromString(name, ElasticVolumePolicyEnforcement.class); + } + + /** + * Gets known ElasticVolumePolicyEnforcement values. + * + * @return known ElasticVolumePolicyEnforcement values. + */ + public static Collection<ElasticVolumePolicyEnforcement> values() { + return values(ElasticVolumePolicyEnforcement.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeProperties.java new file mode 100644 index 000000000000..d4c03bb13886 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeProperties.java @@ -0,0 +1,431 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Elastic Volume properties. + */ +@Fluent +public final class ElasticVolumeProperties implements JsonSerializable<ElasticVolumeProperties> { + /* + * A unique file path for the volume. Used when creating mount targets. This needs to be unique within the elastic + * capacity pool. + */ + private String filePath; + + /* + * Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. Values expressed in + * bytes as multiples of 1 GiB. + */ + private long size; + + /* + * Set of export policy rules + */ + private ElasticExportPolicy exportPolicy; + + /* + * Set of support protocol types for the elastic volume + */ + private List<ElasticProtocolType> protocolTypes; + + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /* + * Current availability status of the resource. + */ + private ElasticResourceAvailabilityStatus availabilityStatus; + + /* + * Resource identifier used to identify the Elastic Snapshot. + */ + private String snapshotResourceId; + + /* + * List of mount targets that can be used to mount this volume + */ + private List<ElasticMountTargetProperties> mountTargets; + + /* + * Data protection configuration option for the volume, including snapshot policies and backup. + */ + private ElasticVolumeDataProtectionProperties dataProtection; + + /* + * Controls the visibility of the volume's read-only snapshot directory, which provides access to each of the + * volume's snapshots. + */ + private SnapshotDirectoryVisibility snapshotDirectoryVisibility; + + /* + * SMB Properties + */ + private ElasticSmbProperties smbProperties; + + /* + * Resource identifier used to identify the Elastic Backup. + */ + private String backupResourceId; + + /* + * The current state of the restoration process. + */ + private ElasticVolumeRestorationState restorationState; + + /** + * Creates an instance of ElasticVolumeProperties class. + */ + public ElasticVolumeProperties() { + } + + /** + * Get the filePath property: A unique file path for the volume. Used when creating mount targets. This needs to be + * unique within the elastic capacity pool. + * + * @return the filePath value. + */ + public String filePath() { + return this.filePath; + } + + /** + * Set the filePath property: A unique file path for the volume. Used when creating mount targets. This needs to be + * unique within the elastic capacity pool. + * + * @param filePath the filePath value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * Get the size property: Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. + * Values expressed in bytes as multiples of 1 GiB. + * + * @return the size value. + */ + public long size() { + return this.size; + } + + /** + * Set the size property: Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. + * Values expressed in bytes as multiples of 1 GiB. + * + * @param size the size value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withSize(long size) { + this.size = size; + return this; + } + + /** + * Get the exportPolicy property: Set of export policy rules. + * + * @return the exportPolicy value. + */ + public ElasticExportPolicy exportPolicy() { + return this.exportPolicy; + } + + /** + * Set the exportPolicy property: Set of export policy rules. + * + * @param exportPolicy the exportPolicy value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withExportPolicy(ElasticExportPolicy exportPolicy) { + this.exportPolicy = exportPolicy; + return this; + } + + /** + * Get the protocolTypes property: Set of support protocol types for the elastic volume. + * + * @return the protocolTypes value. + */ + public List<ElasticProtocolType> protocolTypes() { + return this.protocolTypes; + } + + /** + * Set the protocolTypes property: Set of support protocol types for the elastic volume. + * + * @param protocolTypes the protocolTypes value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withProtocolTypes(List<ElasticProtocolType> protocolTypes) { + this.protocolTypes = protocolTypes; + return this; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the availabilityStatus property: Current availability status of the resource. + * + * @return the availabilityStatus value. + */ + public ElasticResourceAvailabilityStatus availabilityStatus() { + return this.availabilityStatus; + } + + /** + * Get the snapshotResourceId property: Resource identifier used to identify the Elastic Snapshot. + * + * @return the snapshotResourceId value. + */ + public String snapshotResourceId() { + return this.snapshotResourceId; + } + + /** + * Set the snapshotResourceId property: Resource identifier used to identify the Elastic Snapshot. + * + * @param snapshotResourceId the snapshotResourceId value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withSnapshotResourceId(String snapshotResourceId) { + this.snapshotResourceId = snapshotResourceId; + return this; + } + + /** + * Get the mountTargets property: List of mount targets that can be used to mount this volume. + * + * @return the mountTargets value. + */ + public List<ElasticMountTargetProperties> mountTargets() { + return this.mountTargets; + } + + /** + * Get the dataProtection property: Data protection configuration option for the volume, including snapshot policies + * and backup. + * + * @return the dataProtection value. + */ + public ElasticVolumeDataProtectionProperties dataProtection() { + return this.dataProtection; + } + + /** + * Set the dataProtection property: Data protection configuration option for the volume, including snapshot policies + * and backup. + * + * @param dataProtection the dataProtection value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withDataProtection(ElasticVolumeDataProtectionProperties dataProtection) { + this.dataProtection = dataProtection; + return this; + } + + /** + * Get the snapshotDirectoryVisibility property: Controls the visibility of the volume's read-only snapshot + * directory, which provides access to each of the volume's snapshots. + * + * @return the snapshotDirectoryVisibility value. + */ + public SnapshotDirectoryVisibility snapshotDirectoryVisibility() { + return this.snapshotDirectoryVisibility; + } + + /** + * Set the snapshotDirectoryVisibility property: Controls the visibility of the volume's read-only snapshot + * directory, which provides access to each of the volume's snapshots. + * + * @param snapshotDirectoryVisibility the snapshotDirectoryVisibility value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties + withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility snapshotDirectoryVisibility) { + this.snapshotDirectoryVisibility = snapshotDirectoryVisibility; + return this; + } + + /** + * Get the smbProperties property: SMB Properties. + * + * @return the smbProperties value. + */ + public ElasticSmbProperties smbProperties() { + return this.smbProperties; + } + + /** + * Set the smbProperties property: SMB Properties. + * + * @param smbProperties the smbProperties value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withSmbProperties(ElasticSmbProperties smbProperties) { + this.smbProperties = smbProperties; + return this; + } + + /** + * Get the backupResourceId property: Resource identifier used to identify the Elastic Backup. + * + * @return the backupResourceId value. + */ + public String backupResourceId() { + return this.backupResourceId; + } + + /** + * Set the backupResourceId property: Resource identifier used to identify the Elastic Backup. + * + * @param backupResourceId the backupResourceId value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withBackupResourceId(String backupResourceId) { + this.backupResourceId = backupResourceId; + return this; + } + + /** + * Get the restorationState property: The current state of the restoration process. + * + * @return the restorationState value. + */ + public ElasticVolumeRestorationState restorationState() { + return this.restorationState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (filePath() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property filePath in model ElasticVolumeProperties")); + } + if (exportPolicy() != null) { + exportPolicy().validate(); + } + if (protocolTypes() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property protocolTypes in model ElasticVolumeProperties")); + } + if (mountTargets() != null) { + mountTargets().forEach(e -> e.validate()); + } + if (dataProtection() != null) { + dataProtection().validate(); + } + if (smbProperties() != null) { + smbProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticVolumeProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("filePath", this.filePath); + jsonWriter.writeLongField("size", this.size); + jsonWriter.writeArrayField("protocolTypes", this.protocolTypes, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeJsonField("exportPolicy", this.exportPolicy); + jsonWriter.writeStringField("snapshotResourceId", this.snapshotResourceId); + jsonWriter.writeJsonField("dataProtection", this.dataProtection); + jsonWriter.writeStringField("snapshotDirectoryVisibility", + this.snapshotDirectoryVisibility == null ? null : this.snapshotDirectoryVisibility.toString()); + jsonWriter.writeJsonField("smbProperties", this.smbProperties); + jsonWriter.writeStringField("backupResourceId", this.backupResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticVolumeProperties. + */ + public static ElasticVolumeProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeProperties deserializedElasticVolumeProperties = new ElasticVolumeProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("filePath".equals(fieldName)) { + deserializedElasticVolumeProperties.filePath = reader.getString(); + } else if ("size".equals(fieldName)) { + deserializedElasticVolumeProperties.size = reader.getLong(); + } else if ("protocolTypes".equals(fieldName)) { + List<ElasticProtocolType> protocolTypes + = reader.readArray(reader1 -> ElasticProtocolType.fromString(reader1.getString())); + deserializedElasticVolumeProperties.protocolTypes = protocolTypes; + } else if ("exportPolicy".equals(fieldName)) { + deserializedElasticVolumeProperties.exportPolicy = ElasticExportPolicy.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedElasticVolumeProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("availabilityStatus".equals(fieldName)) { + deserializedElasticVolumeProperties.availabilityStatus + = ElasticResourceAvailabilityStatus.fromString(reader.getString()); + } else if ("snapshotResourceId".equals(fieldName)) { + deserializedElasticVolumeProperties.snapshotResourceId = reader.getString(); + } else if ("mountTargets".equals(fieldName)) { + List<ElasticMountTargetProperties> mountTargets + = reader.readArray(reader1 -> ElasticMountTargetProperties.fromJson(reader1)); + deserializedElasticVolumeProperties.mountTargets = mountTargets; + } else if ("dataProtection".equals(fieldName)) { + deserializedElasticVolumeProperties.dataProtection + = ElasticVolumeDataProtectionProperties.fromJson(reader); + } else if ("snapshotDirectoryVisibility".equals(fieldName)) { + deserializedElasticVolumeProperties.snapshotDirectoryVisibility + = SnapshotDirectoryVisibility.fromString(reader.getString()); + } else if ("smbProperties".equals(fieldName)) { + deserializedElasticVolumeProperties.smbProperties = ElasticSmbProperties.fromJson(reader); + } else if ("backupResourceId".equals(fieldName)) { + deserializedElasticVolumeProperties.backupResourceId = reader.getString(); + } else if ("restorationState".equals(fieldName)) { + deserializedElasticVolumeProperties.restorationState + = ElasticVolumeRestorationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRestorationState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRestorationState.java new file mode 100644 index 000000000000..b6ff08208f5c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRestorationState.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The current state of the restoration process. + */ +public final class ElasticVolumeRestorationState extends ExpandableStringEnum<ElasticVolumeRestorationState> { + /** + * Value indicating that the volume is currently restoring. + */ + public static final ElasticVolumeRestorationState RESTORING = fromString("Restoring"); + + /** + * Value indicating that the volume is restored. + */ + public static final ElasticVolumeRestorationState RESTORED = fromString("Restored"); + + /** + * Value indicating that the volume restore has failed. + */ + public static final ElasticVolumeRestorationState FAILED = fromString("Failed"); + + /** + * Creates a new instance of ElasticVolumeRestorationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticVolumeRestorationState() { + } + + /** + * Creates or finds a ElasticVolumeRestorationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticVolumeRestorationState. + */ + public static ElasticVolumeRestorationState fromString(String name) { + return fromString(name, ElasticVolumeRestorationState.class); + } + + /** + * Gets known ElasticVolumeRestorationState values. + * + * @return known ElasticVolumeRestorationState values. + */ + public static Collection<ElasticVolumeRestorationState> values() { + return values(ElasticVolumeRestorationState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRevert.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRevert.java new file mode 100644 index 000000000000..1f1ec4a9d78e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRevert.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reverts the elastic volume to the specified snapshot. + */ +@Fluent +public final class ElasticVolumeRevert implements JsonSerializable<ElasticVolumeRevert> { + /* + * Resource identifier used to identify the Elastic Snapshot. + */ + private String snapshotResourceId; + + /** + * Creates an instance of ElasticVolumeRevert class. + */ + public ElasticVolumeRevert() { + } + + /** + * Get the snapshotResourceId property: Resource identifier used to identify the Elastic Snapshot. + * + * @return the snapshotResourceId value. + */ + public String snapshotResourceId() { + return this.snapshotResourceId; + } + + /** + * Set the snapshotResourceId property: Resource identifier used to identify the Elastic Snapshot. + * + * @param snapshotResourceId the snapshotResourceId value to set. + * @return the ElasticVolumeRevert object itself. + */ + public ElasticVolumeRevert withSnapshotResourceId(String snapshotResourceId) { + this.snapshotResourceId = snapshotResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("snapshotResourceId", this.snapshotResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeRevert from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeRevert if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeRevert. + */ + public static ElasticVolumeRevert fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeRevert deserializedElasticVolumeRevert = new ElasticVolumeRevert(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotResourceId".equals(fieldName)) { + deserializedElasticVolumeRevert.snapshotResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeRevert; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeSnapshotProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeSnapshotProperties.java new file mode 100644 index 000000000000..204f7885a30c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeSnapshotProperties.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Volume Snapshot Properties. + */ +@Fluent +public final class ElasticVolumeSnapshotProperties implements JsonSerializable<ElasticVolumeSnapshotProperties> { + /* + * Snapshot Policy ResourceId + */ + private String snapshotPolicyResourceId; + + /** + * Creates an instance of ElasticVolumeSnapshotProperties class. + */ + public ElasticVolumeSnapshotProperties() { + } + + /** + * Get the snapshotPolicyResourceId property: Snapshot Policy ResourceId. + * + * @return the snapshotPolicyResourceId value. + */ + public String snapshotPolicyResourceId() { + return this.snapshotPolicyResourceId; + } + + /** + * Set the snapshotPolicyResourceId property: Snapshot Policy ResourceId. + * + * @param snapshotPolicyResourceId the snapshotPolicyResourceId value to set. + * @return the ElasticVolumeSnapshotProperties object itself. + */ + public ElasticVolumeSnapshotProperties withSnapshotPolicyResourceId(String snapshotPolicyResourceId) { + this.snapshotPolicyResourceId = snapshotPolicyResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("snapshotPolicyResourceId", this.snapshotPolicyResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeSnapshotProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeSnapshotProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeSnapshotProperties. + */ + public static ElasticVolumeSnapshotProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeSnapshotProperties deserializedElasticVolumeSnapshotProperties + = new ElasticVolumeSnapshotProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotPolicyResourceId".equals(fieldName)) { + deserializedElasticVolumeSnapshotProperties.snapshotPolicyResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeSnapshotProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdate.java new file mode 100644 index 000000000000..047910d44201 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdate.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ElasticVolume. + */ +@Fluent +public final class ElasticVolumeUpdate implements JsonSerializable<ElasticVolumeUpdate> { + /* + * Resource tags. + */ + private Map<String, String> tags; + + /* + * The resource-specific properties for this resource. + */ + private ElasticVolumeUpdateProperties properties; + + /** + * Creates an instance of ElasticVolumeUpdate class. + */ + public ElasticVolumeUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map<String, String> tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ElasticVolumeUpdate object itself. + */ + public ElasticVolumeUpdate withTags(Map<String, String> tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticVolumeUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticVolumeUpdate object itself. + */ + public ElasticVolumeUpdate withProperties(ElasticVolumeUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeUpdate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeUpdate. + */ + public static ElasticVolumeUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeUpdate deserializedElasticVolumeUpdate = new ElasticVolumeUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticVolumeUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedElasticVolumeUpdate.properties = ElasticVolumeUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdateProperties.java new file mode 100644 index 000000000000..49adf76f4df0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdateProperties.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The updatable properties of the ElasticVolume. + */ +@Fluent +public final class ElasticVolumeUpdateProperties implements JsonSerializable<ElasticVolumeUpdateProperties> { + /* + * Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. Values expressed in + * bytes as multiples of 1 GiB. + */ + private Long size; + + /* + * Set of export policy rules + */ + private ElasticExportPolicy exportPolicy; + + /* + * Data protection configuration option for the volume, including snapshot policies and backup. + */ + private ElasticVolumeDataProtectionPatchProperties dataProtection; + + /* + * Controls the visibility of the volume's read-only snapshot directory, which provides access to each of the + * volume's snapshots. + */ + private SnapshotDirectoryVisibility snapshotDirectoryVisibility; + + /* + * SMB Properties + */ + private ElasticSmbPatchProperties smbProperties; + + /** + * Creates an instance of ElasticVolumeUpdateProperties class. + */ + public ElasticVolumeUpdateProperties() { + } + + /** + * Get the size property: Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. + * Values expressed in bytes as multiples of 1 GiB. + * + * @return the size value. + */ + public Long size() { + return this.size; + } + + /** + * Set the size property: Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. + * Values expressed in bytes as multiples of 1 GiB. + * + * @param size the size value to set. + * @return the ElasticVolumeUpdateProperties object itself. + */ + public ElasticVolumeUpdateProperties withSize(Long size) { + this.size = size; + return this; + } + + /** + * Get the exportPolicy property: Set of export policy rules. + * + * @return the exportPolicy value. + */ + public ElasticExportPolicy exportPolicy() { + return this.exportPolicy; + } + + /** + * Set the exportPolicy property: Set of export policy rules. + * + * @param exportPolicy the exportPolicy value to set. + * @return the ElasticVolumeUpdateProperties object itself. + */ + public ElasticVolumeUpdateProperties withExportPolicy(ElasticExportPolicy exportPolicy) { + this.exportPolicy = exportPolicy; + return this; + } + + /** + * Get the dataProtection property: Data protection configuration option for the volume, including snapshot policies + * and backup. + * + * @return the dataProtection value. + */ + public ElasticVolumeDataProtectionPatchProperties dataProtection() { + return this.dataProtection; + } + + /** + * Set the dataProtection property: Data protection configuration option for the volume, including snapshot policies + * and backup. + * + * @param dataProtection the dataProtection value to set. + * @return the ElasticVolumeUpdateProperties object itself. + */ + public ElasticVolumeUpdateProperties withDataProtection(ElasticVolumeDataProtectionPatchProperties dataProtection) { + this.dataProtection = dataProtection; + return this; + } + + /** + * Get the snapshotDirectoryVisibility property: Controls the visibility of the volume's read-only snapshot + * directory, which provides access to each of the volume's snapshots. + * + * @return the snapshotDirectoryVisibility value. + */ + public SnapshotDirectoryVisibility snapshotDirectoryVisibility() { + return this.snapshotDirectoryVisibility; + } + + /** + * Set the snapshotDirectoryVisibility property: Controls the visibility of the volume's read-only snapshot + * directory, which provides access to each of the volume's snapshots. + * + * @param snapshotDirectoryVisibility the snapshotDirectoryVisibility value to set. + * @return the ElasticVolumeUpdateProperties object itself. + */ + public ElasticVolumeUpdateProperties + withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility snapshotDirectoryVisibility) { + this.snapshotDirectoryVisibility = snapshotDirectoryVisibility; + return this; + } + + /** + * Get the smbProperties property: SMB Properties. + * + * @return the smbProperties value. + */ + public ElasticSmbPatchProperties smbProperties() { + return this.smbProperties; + } + + /** + * Set the smbProperties property: SMB Properties. + * + * @param smbProperties the smbProperties value to set. + * @return the ElasticVolumeUpdateProperties object itself. + */ + public ElasticVolumeUpdateProperties withSmbProperties(ElasticSmbPatchProperties smbProperties) { + this.smbProperties = smbProperties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (exportPolicy() != null) { + exportPolicy().validate(); + } + if (dataProtection() != null) { + dataProtection().validate(); + } + if (smbProperties() != null) { + smbProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("size", this.size); + jsonWriter.writeJsonField("exportPolicy", this.exportPolicy); + jsonWriter.writeJsonField("dataProtection", this.dataProtection); + jsonWriter.writeStringField("snapshotDirectoryVisibility", + this.snapshotDirectoryVisibility == null ? null : this.snapshotDirectoryVisibility.toString()); + jsonWriter.writeJsonField("smbProperties", this.smbProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeUpdateProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeUpdateProperties. + */ + public static ElasticVolumeUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeUpdateProperties deserializedElasticVolumeUpdateProperties + = new ElasticVolumeUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedElasticVolumeUpdateProperties.size = reader.getNullable(JsonReader::getLong); + } else if ("exportPolicy".equals(fieldName)) { + deserializedElasticVolumeUpdateProperties.exportPolicy = ElasticExportPolicy.fromJson(reader); + } else if ("dataProtection".equals(fieldName)) { + deserializedElasticVolumeUpdateProperties.dataProtection + = ElasticVolumeDataProtectionPatchProperties.fromJson(reader); + } else if ("snapshotDirectoryVisibility".equals(fieldName)) { + deserializedElasticVolumeUpdateProperties.snapshotDirectoryVisibility + = SnapshotDirectoryVisibility.fromString(reader.getString()); + } else if ("smbProperties".equals(fieldName)) { + deserializedElasticVolumeUpdateProperties.smbProperties + = ElasticSmbPatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumes.java new file mode 100644 index 000000000000..73ee0d0607a5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumes.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ElasticVolumes. + */ +public interface ElasticVolumes { + /** + * Get the details of the specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume along with {@link Response}. + */ + Response<ElasticVolume> getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context); + + /** + * Get the details of the specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume. + */ + ElasticVolume get(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticVolume> listByElasticPool(String resourceGroupName, String accountName, String poolName); + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<ElasticVolume> listByElasticPool(String resourceGroupName, String accountName, String poolName, + Context context); + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ElasticVolume revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert body); + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ElasticVolume revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert body, Context context); + + /** + * Get the details of the specified volume. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume along with {@link Response}. + */ + ElasticVolume getById(String id); + + /** + * Get the details of the specified volume. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified volume along with {@link Response}. + */ + Response<ElasticVolume> getByIdWithResponse(String id, Context context); + + /** + * Delete the specified Elastic Volume. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete the specified Elastic Volume. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ElasticVolume resource. + * + * @param name resource name. + * @return the first stage of the new ElasticVolume definition. + */ + ElasticVolume.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EnableWriteBackState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EnableWriteBackState.java new file mode 100644 index 000000000000..76f971251a36 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EnableWriteBackState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Flag indicating whether writeback is enabled for the cache. + */ +public final class EnableWriteBackState extends ExpandableStringEnum<EnableWriteBackState> { + /** + * Writeback cache is disabled. + */ + public static final EnableWriteBackState DISABLED = fromString("Disabled"); + + /** + * Writeback cache is enabled. + */ + public static final EnableWriteBackState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of EnableWriteBackState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EnableWriteBackState() { + } + + /** + * Creates or finds a EnableWriteBackState from its string representation. + * + * @param name a name to look for. + * @return the corresponding EnableWriteBackState. + */ + public static EnableWriteBackState fromString(String name) { + return fromString(name, EnableWriteBackState.class); + } + + /** + * Gets known EnableWriteBackState values. + * + * @return known EnableWriteBackState values. + */ + public static Collection<EnableWriteBackState> values() { + return values(EnableWriteBackState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionState.java new file mode 100644 index 000000000000..340a5d57aa5b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies if the cache is encryption or not. + */ +public final class EncryptionState extends ExpandableStringEnum<EncryptionState> { + /** + * Encryption is disabled. + */ + public static final EncryptionState DISABLED = fromString("Disabled"); + + /** + * Encryption is enabled. + */ + public static final EncryptionState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of EncryptionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EncryptionState() { + } + + /** + * Creates or finds a EncryptionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding EncryptionState. + */ + public static EncryptionState fromString(String name) { + return fromString(name, EncryptionState.class); + } + + /** + * Gets known EncryptionState values. + * + * @return known EncryptionState values. + */ + public static Collection<EncryptionState> values() { + return values(EncryptionState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalReplicationSetupStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalReplicationSetupStatus.java new file mode 100644 index 000000000000..29ef8b9ca3b9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalReplicationSetupStatus.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Property that only applies to external replications. Provides a machine-readable value for the status of the external + * replication setup. + */ +public final class ExternalReplicationSetupStatus extends ExpandableStringEnum<ExternalReplicationSetupStatus> { + /** + * Your cluster needs to be peered by using the 'peerExternalCluster' action. + */ + public static final ExternalReplicationSetupStatus CLUSTER_PEER_REQUIRED = fromString("ClusterPeerRequired"); + + /** + * The peering needs to be accepted on your cluster before the setup can proceed. + */ + public static final ExternalReplicationSetupStatus CLUSTER_PEER_PENDING = fromString("ClusterPeerPending"); + + /** + * Need to call 'authorizeExternalReplication' and accept the returned 'vserver peer accept' command on your cluster + * to finish setting up the external replication. + */ + public static final ExternalReplicationSetupStatus VSERVER_PEER_REQUIRED = fromString("VServerPeerRequired"); + + /** + * Need to call 'authorizeExternalReplication' to finish setting up the external replication. + */ + public static final ExternalReplicationSetupStatus REPLICATION_CREATE_REQUIRED + = fromString("ReplicationCreateRequired"); + + /** + * External Replication setup is complete, you can now monitor the 'mirrorState' in the replication status for the + * health of the replication. + */ + public static final ExternalReplicationSetupStatus NO_ACTION_REQUIRED = fromString("NoActionRequired"); + + /** + * Creates a new instance of ExternalReplicationSetupStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExternalReplicationSetupStatus() { + } + + /** + * Creates or finds a ExternalReplicationSetupStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExternalReplicationSetupStatus. + */ + public static ExternalReplicationSetupStatus fromString(String name) { + return fromString(name, ExternalReplicationSetupStatus.class); + } + + /** + * Gets known ExternalReplicationSetupStatus values. + * + * @return known ExternalReplicationSetupStatus values. + */ + public static Collection<ExternalReplicationSetupStatus> values() { + return values(ExternalReplicationSetupStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FileSystemUser.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FileSystemUser.java new file mode 100644 index 000000000000..f6c25980284c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FileSystemUser.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * File System user having access to volume data. For Unix, this is the user's uid and gid. For Windows, this is the + * user's username. Note that the Unix and Windows user details are mutually exclusive, meaning one or other must be + * supplied, but not both. + */ +@Fluent +public final class FileSystemUser implements JsonSerializable<FileSystemUser> { + /* + * The effective NFS User ID and Group ID when accessing the volume data. + */ + private NfsUser nfsUser; + + /* + * The effective CIFS username when accessing the volume data. + */ + private CifsUser cifsUser; + + /** + * Creates an instance of FileSystemUser class. + */ + public FileSystemUser() { + } + + /** + * Get the nfsUser property: The effective NFS User ID and Group ID when accessing the volume data. + * + * @return the nfsUser value. + */ + public NfsUser nfsUser() { + return this.nfsUser; + } + + /** + * Set the nfsUser property: The effective NFS User ID and Group ID when accessing the volume data. + * + * @param nfsUser the nfsUser value to set. + * @return the FileSystemUser object itself. + */ + public FileSystemUser withNfsUser(NfsUser nfsUser) { + this.nfsUser = nfsUser; + return this; + } + + /** + * Get the cifsUser property: The effective CIFS username when accessing the volume data. + * + * @return the cifsUser value. + */ + public CifsUser cifsUser() { + return this.cifsUser; + } + + /** + * Set the cifsUser property: The effective CIFS username when accessing the volume data. + * + * @param cifsUser the cifsUser value to set. + * @return the FileSystemUser object itself. + */ + public FileSystemUser withCifsUser(CifsUser cifsUser) { + this.cifsUser = cifsUser; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (nfsUser() != null) { + nfsUser().validate(); + } + if (cifsUser() != null) { + cifsUser().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("nfsUser", this.nfsUser); + jsonWriter.writeJsonField("cifsUser", this.cifsUser); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FileSystemUser from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FileSystemUser if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the FileSystemUser. + */ + public static FileSystemUser fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FileSystemUser deserializedFileSystemUser = new FileSystemUser(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nfsUser".equals(fieldName)) { + deserializedFileSystemUser.nfsUser = NfsUser.fromJson(reader); + } else if ("cifsUser".equals(fieldName)) { + deserializedFileSystemUser.cifsUser = CifsUser.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFileSystemUser; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/GlobalFileLockingState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/GlobalFileLockingState.java new file mode 100644 index 000000000000..313dd8691347 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/GlobalFileLockingState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Flag indicating whether the global file lock is enabled for the cache. + */ +public final class GlobalFileLockingState extends ExpandableStringEnum<GlobalFileLockingState> { + /** + * Global file locking is disabled. + */ + public static final GlobalFileLockingState DISABLED = fromString("Disabled"); + + /** + * Global file locking is enabled. + */ + public static final GlobalFileLockingState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of GlobalFileLockingState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GlobalFileLockingState() { + } + + /** + * Creates or finds a GlobalFileLockingState from its string representation. + * + * @param name a name to look for. + * @return the corresponding GlobalFileLockingState. + */ + public static GlobalFileLockingState fromString(String name) { + return fromString(name, GlobalFileLockingState.class); + } + + /** + * Gets known GlobalFileLockingState values. + * + * @return known GlobalFileLockingState values. + */ + public static Collection<GlobalFileLockingState> values() { + return values(GlobalFileLockingState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KerberosState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KerberosState.java new file mode 100644 index 000000000000..831dc4da96be --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KerberosState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Describe if a cache is Kerberos enabled. + */ +public final class KerberosState extends ExpandableStringEnum<KerberosState> { + /** + * Kerberos is disabled. + */ + public static final KerberosState DISABLED = fromString("Disabled"); + + /** + * Kerberos is enabled. + */ + public static final KerberosState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of KerberosState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KerberosState() { + } + + /** + * Creates or finds a KerberosState from its string representation. + * + * @param name a name to look for. + * @return the corresponding KerberosState. + */ + public static KerberosState fromString(String name) { + return fromString(name, KerberosState.class); + } + + /** + * Gets known KerberosState values. + * + * @return known KerberosState values. + */ + public static Collection<KerberosState> values() { + return values(KerberosState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LargeVolumeType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LargeVolumeType.java new file mode 100644 index 000000000000..7f151ae470b7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LargeVolumeType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the type of the Large Volume. When set to 'LargeVolume', the large volume is created with standard + * configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit 7.2PiB with + * cool access enabled, + * delivering higher capacity limit with lower costs. + */ +public final class LargeVolumeType extends ExpandableStringEnum<LargeVolumeType> { + /** + * The large volume is created with standard configuration that provides standard performance and throughput. + */ + public static final LargeVolumeType LARGE_VOLUME = fromString("LargeVolume"); + + /** + * The extra large volume is created with higher volume capacity limit 7.2PiB with cool access enabled, delivering + * higher capacity limit with lower costs. + */ + public static final LargeVolumeType EXTRA_LARGE_VOLUME7DOT2PIB = fromString("PremExtraLargeVolume7Dot2PiB"); + + /** + * Creates a new instance of LargeVolumeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LargeVolumeType() { + } + + /** + * Creates or finds a LargeVolumeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding LargeVolumeType. + */ + public static LargeVolumeType fromString(String name) { + return fromString(name, LargeVolumeType.class); + } + + /** + * Gets known LargeVolumeType values. + * + * @return known LargeVolumeType values. + */ + public static Collection<LargeVolumeType> values() { + return values(LargeVolumeType.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapConfiguration.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapConfiguration.java new file mode 100644 index 000000000000..2c645570142c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapConfiguration.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * LDAP configuration. + */ +@Fluent +public final class LdapConfiguration implements JsonSerializable<LdapConfiguration> { + /* + * Name of the LDAP configuration domain + */ + private String domain; + + /* + * List of LDAP server IP addresses (IPv4 only) for the LDAP domain. + */ + private List<String> ldapServers; + + /* + * Specifies whether or not the LDAP traffic needs to be secured via TLS. + */ + private Boolean ldapOverTLS; + + /* + * When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded ldap servers CA + * certificate. + */ + private String serverCACertificate; + + /* + * The CN host name used while generating the certificate, LDAP Over TLS requires the CN host name to create DNS + * host entry. + */ + private String certificateCNHost; + + /** + * Creates an instance of LdapConfiguration class. + */ + public LdapConfiguration() { + } + + /** + * Get the domain property: Name of the LDAP configuration domain. + * + * @return the domain value. + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain property: Name of the LDAP configuration domain. + * + * @param domain the domain value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the ldapServers property: List of LDAP server IP addresses (IPv4 only) for the LDAP domain. + * + * @return the ldapServers value. + */ + public List<String> ldapServers() { + return this.ldapServers; + } + + /** + * Set the ldapServers property: List of LDAP server IP addresses (IPv4 only) for the LDAP domain. + * + * @param ldapServers the ldapServers value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withLdapServers(List<String> ldapServers) { + this.ldapServers = ldapServers; + return this; + } + + /** + * Get the ldapOverTLS property: Specifies whether or not the LDAP traffic needs to be secured via TLS. + * + * @return the ldapOverTLS value. + */ + public Boolean ldapOverTLS() { + return this.ldapOverTLS; + } + + /** + * Set the ldapOverTLS property: Specifies whether or not the LDAP traffic needs to be secured via TLS. + * + * @param ldapOverTLS the ldapOverTLS value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withLdapOverTLS(Boolean ldapOverTLS) { + this.ldapOverTLS = ldapOverTLS; + return this; + } + + /** + * Get the serverCACertificate property: When LDAP over SSL/TLS is enabled, the LDAP client is required to have + * base64 encoded ldap servers CA certificate. + * + * @return the serverCACertificate value. + */ + public String serverCACertificate() { + return this.serverCACertificate; + } + + /** + * Set the serverCACertificate property: When LDAP over SSL/TLS is enabled, the LDAP client is required to have + * base64 encoded ldap servers CA certificate. + * + * @param serverCACertificate the serverCACertificate value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withServerCACertificate(String serverCACertificate) { + this.serverCACertificate = serverCACertificate; + return this; + } + + /** + * Get the certificateCNHost property: The CN host name used while generating the certificate, LDAP Over TLS + * requires the CN host name to create DNS host entry. + * + * @return the certificateCNHost value. + */ + public String certificateCNHost() { + return this.certificateCNHost; + } + + /** + * Set the certificateCNHost property: The CN host name used while generating the certificate, LDAP Over TLS + * requires the CN host name to create DNS host entry. + * + * @param certificateCNHost the certificateCNHost value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withCertificateCNHost(String certificateCNHost) { + this.certificateCNHost = certificateCNHost; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("domain", this.domain); + jsonWriter.writeArrayField("ldapServers", this.ldapServers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("ldapOverTLS", this.ldapOverTLS); + jsonWriter.writeStringField("serverCACertificate", this.serverCACertificate); + jsonWriter.writeStringField("certificateCNHost", this.certificateCNHost); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LdapConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LdapConfiguration if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the LdapConfiguration. + */ + public static LdapConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LdapConfiguration deserializedLdapConfiguration = new LdapConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("domain".equals(fieldName)) { + deserializedLdapConfiguration.domain = reader.getString(); + } else if ("ldapServers".equals(fieldName)) { + List<String> ldapServers = reader.readArray(reader1 -> reader1.getString()); + deserializedLdapConfiguration.ldapServers = ldapServers; + } else if ("ldapOverTLS".equals(fieldName)) { + deserializedLdapConfiguration.ldapOverTLS = reader.getNullable(JsonReader::getBoolean); + } else if ("serverCACertificate".equals(fieldName)) { + deserializedLdapConfiguration.serverCACertificate = reader.getString(); + } else if ("certificateCNHost".equals(fieldName)) { + deserializedLdapConfiguration.certificateCNHost = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLdapConfiguration; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapServerType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapServerType.java new file mode 100644 index 000000000000..02965c0ede7f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapServerType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of the LDAP server. + */ +public final class LdapServerType extends ExpandableStringEnum<LdapServerType> { + /** + * The volume should use Active Directory for LDAP connections. + */ + public static final LdapServerType ACTIVE_DIRECTORY = fromString("ActiveDirectory"); + + /** + * The volume should use OpenLDAP for LDAP connections. + */ + public static final LdapServerType OPEN_LDAP = fromString("OpenLDAP"); + + /** + * Creates a new instance of LdapServerType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LdapServerType() { + } + + /** + * Creates or finds a LdapServerType from its string representation. + * + * @param name a name to look for. + * @return the corresponding LdapServerType. + */ + public static LdapServerType fromString(String name) { + return fromString(name, LdapServerType.class); + } + + /** + * Gets known LdapServerType values. + * + * @return known LdapServerType values. + */ + public static Collection<LdapServerType> values() { + return values(LdapServerType.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapState.java new file mode 100644 index 000000000000..18ccb73b6c80 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies whether LDAP is enabled or not. + */ +public final class LdapState extends ExpandableStringEnum<LdapState> { + /** + * ldap is disabled. + */ + public static final LdapState DISABLED = fromString("Disabled"); + + /** + * ldap is enabled. + */ + public static final LdapState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of LdapState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LdapState() { + } + + /** + * Creates or finds a LdapState from its string representation. + * + * @param name a name to look for. + * @return the corresponding LdapState. + */ + public static LdapState fromString(String name) { + return fromString(name, LdapState.class); + } + + /** + * Gets known LdapState values. + * + * @return known LdapState values. + */ + public static Collection<LdapState> values() { + return values(LdapState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ListQuotaReportResponse.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ListQuotaReportResponse.java new file mode 100644 index 000000000000..66bb91c2943b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ListQuotaReportResponse.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner; +import java.util.List; + +/** + * An immutable client-side representation of ListQuotaReportResponse. + */ +public interface ListQuotaReportResponse { + /** + * Gets the value property: List of quota reports. + * + * @return the value value. + */ + List<QuotaReport> value(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner object. + * + * @return the inner object. + */ + ListQuotaReportResponseInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java index 9f44d1a824dc..82ed36c27afd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java @@ -118,6 +118,13 @@ public interface NetAppAccount { */ MultiAdStatus multiAdStatus(); + /** + * Gets the ldapConfiguration property: LDAP Configuration for the account. + * + * @return the ldapConfiguration value. + */ + LdapConfiguration ldapConfiguration(); + /** * Gets the region of the resource. * @@ -201,9 +208,9 @@ interface WithResourceGroup { * The stage of the NetAppAccount definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithActiveDirectories, - DefinitionStages.WithEncryption, DefinitionStages.WithNfsV4IdDomain { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithActiveDirectories, DefinitionStages.WithEncryption, DefinitionStages.WithNfsV4IdDomain, + DefinitionStages.WithLdapConfiguration { /** * Executes the create request. * @@ -286,6 +293,19 @@ interface WithNfsV4IdDomain { */ WithCreate withNfsV4IdDomain(String nfsV4IdDomain); } + + /** + * The stage of the NetAppAccount definition allowing to specify ldapConfiguration. + */ + interface WithLdapConfiguration { + /** + * Specifies the ldapConfiguration property: LDAP Configuration for the account.. + * + * @param ldapConfiguration LDAP Configuration for the account. + * @return the next definition stage. + */ + WithCreate withLdapConfiguration(LdapConfiguration ldapConfiguration); + } } /** @@ -299,7 +319,7 @@ interface WithNfsV4IdDomain { * The template for NetAppAccount update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithActiveDirectories, - UpdateStages.WithEncryption, UpdateStages.WithNfsV4IdDomain { + UpdateStages.WithEncryption, UpdateStages.WithNfsV4IdDomain, UpdateStages.WithLdapConfiguration { /** * Executes the update request. * @@ -386,6 +406,19 @@ interface WithNfsV4IdDomain { */ Update withNfsV4IdDomain(String nfsV4IdDomain); } + + /** + * The stage of the NetAppAccount update allowing to specify ldapConfiguration. + */ + interface WithLdapConfiguration { + /** + * Specifies the ldapConfiguration property: LDAP Configuration for the account.. + * + * @param ldapConfiguration LDAP Configuration for the account. + * @return the next definition stage. + */ + Update withLdapConfiguration(LdapConfiguration ldapConfiguration); + } } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java index 4759d24a74b2..10e520743762 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java @@ -255,6 +255,29 @@ public MultiAdStatus multiAdStatus() { return this.innerProperties() == null ? null : this.innerProperties().multiAdStatus(); } + /** + * Get the ldapConfiguration property: LDAP Configuration for the account. + * + * @return the ldapConfiguration value. + */ + public LdapConfiguration ldapConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().ldapConfiguration(); + } + + /** + * Set the ldapConfiguration property: LDAP Configuration for the account. + * + * @param ldapConfiguration the ldapConfiguration value to set. + * @return the NetAppAccountPatch object itself. + */ + public NetAppAccountPatch withLdapConfiguration(LdapConfiguration ldapConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new AccountProperties(); + } + this.innerProperties().withLdapConfiguration(ldapConfiguration); + return this; + } + /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NfsUser.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NfsUser.java new file mode 100644 index 000000000000..4d88f83bcf03 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NfsUser.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The effective NFS User ID and Group ID when accessing the volume data. + */ +@Fluent +public final class NfsUser implements JsonSerializable<NfsUser> { + /* + * The NFS user's UID + */ + private Long userId; + + /* + * The NFS user's GID + */ + private Long groupId; + + /** + * Creates an instance of NfsUser class. + */ + public NfsUser() { + } + + /** + * Get the userId property: The NFS user's UID. + * + * @return the userId value. + */ + public Long userId() { + return this.userId; + } + + /** + * Set the userId property: The NFS user's UID. + * + * @param userId the userId value to set. + * @return the NfsUser object itself. + */ + public NfsUser withUserId(Long userId) { + this.userId = userId; + return this; + } + + /** + * Get the groupId property: The NFS user's GID. + * + * @return the groupId value. + */ + public Long groupId() { + return this.groupId; + } + + /** + * Set the groupId property: The NFS user's GID. + * + * @param groupId the groupId value to set. + * @return the NfsUser object itself. + */ + public NfsUser withGroupId(Long groupId) { + this.groupId = groupId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("userId", this.userId); + jsonWriter.writeNumberField("groupId", this.groupId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NfsUser from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NfsUser if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the NfsUser. + */ + public static NfsUser fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NfsUser deserializedNfsUser = new NfsUser(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("userId".equals(fieldName)) { + deserializedNfsUser.userId = reader.getNullable(JsonReader::getLong); + } else if ("groupId".equals(fieldName)) { + deserializedNfsUser.groupId = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedNfsUser; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NicInfo.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NicInfo.java index 71ec82d0f435..9a9014bb9027 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NicInfo.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NicInfo.java @@ -13,12 +13,12 @@ import java.util.List; /** - * NIC information and list of volumes for which the NIC has the primary mount ip address. + * NIC information and list of volumes for which the NIC has the primary mount IP Address. */ @Immutable public final class NicInfo implements JsonSerializable<NicInfo> { /* - * ipAddress + * IP Address */ private String ipAddress; @@ -34,7 +34,7 @@ private NicInfo() { } /** - * Get the ipAddress property: ipAddress. + * Get the ipAddress property: IP Address. * * @return the ipAddress value. */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OriginClusterInformation.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OriginClusterInformation.java new file mode 100644 index 000000000000..9ccd09d0cc5b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OriginClusterInformation.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Stores the origin cluster information associated to a cache. + */ +@Fluent +public final class OriginClusterInformation implements JsonSerializable<OriginClusterInformation> { + /* + * ONTAP cluster name of external cluster hosting the origin volume + */ + private String peerClusterName; + + /* + * ONTAP Intercluster LIF IP addresses. One IP address per cluster node is required + */ + private List<String> peerAddresses; + + /* + * External Vserver (SVM) name name of the SVM hosting the origin volume + */ + private String peerVserverName; + + /* + * External origin volume name associated to this cache + */ + private String peerVolumeName; + + /** + * Creates an instance of OriginClusterInformation class. + */ + public OriginClusterInformation() { + } + + /** + * Get the peerClusterName property: ONTAP cluster name of external cluster hosting the origin volume. + * + * @return the peerClusterName value. + */ + public String peerClusterName() { + return this.peerClusterName; + } + + /** + * Set the peerClusterName property: ONTAP cluster name of external cluster hosting the origin volume. + * + * @param peerClusterName the peerClusterName value to set. + * @return the OriginClusterInformation object itself. + */ + public OriginClusterInformation withPeerClusterName(String peerClusterName) { + this.peerClusterName = peerClusterName; + return this; + } + + /** + * Get the peerAddresses property: ONTAP Intercluster LIF IP addresses. One IP address per cluster node is required. + * + * @return the peerAddresses value. + */ + public List<String> peerAddresses() { + return this.peerAddresses; + } + + /** + * Set the peerAddresses property: ONTAP Intercluster LIF IP addresses. One IP address per cluster node is required. + * + * @param peerAddresses the peerAddresses value to set. + * @return the OriginClusterInformation object itself. + */ + public OriginClusterInformation withPeerAddresses(List<String> peerAddresses) { + this.peerAddresses = peerAddresses; + return this; + } + + /** + * Get the peerVserverName property: External Vserver (SVM) name name of the SVM hosting the origin volume. + * + * @return the peerVserverName value. + */ + public String peerVserverName() { + return this.peerVserverName; + } + + /** + * Set the peerVserverName property: External Vserver (SVM) name name of the SVM hosting the origin volume. + * + * @param peerVserverName the peerVserverName value to set. + * @return the OriginClusterInformation object itself. + */ + public OriginClusterInformation withPeerVserverName(String peerVserverName) { + this.peerVserverName = peerVserverName; + return this; + } + + /** + * Get the peerVolumeName property: External origin volume name associated to this cache. + * + * @return the peerVolumeName value. + */ + public String peerVolumeName() { + return this.peerVolumeName; + } + + /** + * Set the peerVolumeName property: External origin volume name associated to this cache. + * + * @param peerVolumeName the peerVolumeName value to set. + * @return the OriginClusterInformation object itself. + */ + public OriginClusterInformation withPeerVolumeName(String peerVolumeName) { + this.peerVolumeName = peerVolumeName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (peerClusterName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property peerClusterName in model OriginClusterInformation")); + } + if (peerAddresses() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property peerAddresses in model OriginClusterInformation")); + } + if (peerVserverName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property peerVserverName in model OriginClusterInformation")); + } + if (peerVolumeName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property peerVolumeName in model OriginClusterInformation")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OriginClusterInformation.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("peerClusterName", this.peerClusterName); + jsonWriter.writeArrayField("peerAddresses", this.peerAddresses, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peerVserverName", this.peerVserverName); + jsonWriter.writeStringField("peerVolumeName", this.peerVolumeName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OriginClusterInformation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OriginClusterInformation if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OriginClusterInformation. + */ + public static OriginClusterInformation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OriginClusterInformation deserializedOriginClusterInformation = new OriginClusterInformation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("peerClusterName".equals(fieldName)) { + deserializedOriginClusterInformation.peerClusterName = reader.getString(); + } else if ("peerAddresses".equals(fieldName)) { + List<String> peerAddresses = reader.readArray(reader1 -> reader1.getString()); + deserializedOriginClusterInformation.peerAddresses = peerAddresses; + } else if ("peerVserverName".equals(fieldName)) { + deserializedOriginClusterInformation.peerVserverName = reader.getString(); + } else if ("peerVolumeName".equals(fieldName)) { + deserializedOriginClusterInformation.peerVolumeName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOriginClusterInformation; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PeeringPassphrases.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PeeringPassphrases.java new file mode 100644 index 000000000000..e3efa93b268b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PeeringPassphrases.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner; + +/** + * An immutable client-side representation of PeeringPassphrases. + */ +public interface PeeringPassphrases { + /** + * Gets the clusterPeeringCommand property: The cluster peering command. + * + * @return the clusterPeeringCommand value. + */ + String clusterPeeringCommand(); + + /** + * Gets the clusterPeeringPassphrase property: The cluster peering passphrase. + * + * @return the clusterPeeringPassphrase value. + */ + String clusterPeeringPassphrase(); + + /** + * Gets the vserverPeeringCommand property: The vserver peering command. + * + * @return the vserverPeeringCommand value. + */ + String vserverPeeringCommand(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner object. + * + * @return the inner object. + */ + PeeringPassphrasesInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PolicyStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PolicyStatus.java new file mode 100644 index 000000000000..f787817200bd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PolicyStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Policy status. + */ +public final class PolicyStatus extends ExpandableStringEnum<PolicyStatus> { + /** + * Value indicating the policy is enabled. + */ + public static final PolicyStatus ENABLED = fromString("Enabled"); + + /** + * Value indicating the policy is disabled. + */ + public static final PolicyStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of PolicyStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PolicyStatus() { + } + + /** + * Creates or finds a PolicyStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PolicyStatus. + */ + public static PolicyStatus fromString(String name) { + return fromString(name, PolicyStatus.class); + } + + /** + * Gets known PolicyStatus values. + * + * @return known PolicyStatus values. + */ + public static Collection<PolicyStatus> values() { + return values(PolicyStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProtocolTypes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProtocolTypes.java new file mode 100644 index 000000000000..f849640c12ac --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProtocolTypes.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Export policy rule. + */ +public final class ProtocolTypes extends ExpandableStringEnum<ProtocolTypes> { + /** + * NFSv3 protocol type. + */ + public static final ProtocolTypes NFSV3 = fromString("NFSv3"); + + /** + * NFSv4 protocol type. + */ + public static final ProtocolTypes NFSV4 = fromString("NFSv4"); + + /** + * SMB protocol type. + */ + public static final ProtocolTypes SMB = fromString("SMB"); + + /** + * Creates a new instance of ProtocolTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProtocolTypes() { + } + + /** + * Creates or finds a ProtocolTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProtocolTypes. + */ + public static ProtocolTypes fromString(String name) { + return fromString(name, ProtocolTypes.class); + } + + /** + * Gets known ProtocolTypes values. + * + * @return known ProtocolTypes values. + */ + public static Collection<ProtocolTypes> values() { + return values(ProtocolTypes.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaReport.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaReport.java new file mode 100644 index 000000000000..6cd06f5e1153 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaReport.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Quota report record properties. + */ +@Immutable +public final class QuotaReport implements JsonSerializable<QuotaReport> { + /* + * Type of quota + */ + private Type quotaType; + + /* + * UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ + * command for the user or group and SID can be found by running <wmic useraccount where name='user-name' get sid> + */ + private String quotaTarget; + + /* + * Specifies the current usage in kibibytes for the user/group quota. + */ + private Long quotaLimitUsedInKiBs; + + /* + * Specifies the total size limit in kibibytes for the user/group quota. + */ + private Long quotaLimitTotalInKiBs; + + /* + * Percentage of used size compared to total size. + */ + private Float percentageUsed; + + /* + * Flag to indicate whether the quota is derived from default quota. + */ + private Boolean isDerivedQuota; + + /** + * Creates an instance of QuotaReport class. + */ + private QuotaReport() { + } + + /** + * Get the quotaType property: Type of quota. + * + * @return the quotaType value. + */ + public Type quotaType() { + return this.quotaType; + } + + /** + * Get the quotaTarget property: UserID/GroupID/SID based on the quota target type. UserID and groupID can be found + * by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount + * where name='user-name' get sid>. + * + * @return the quotaTarget value. + */ + public String quotaTarget() { + return this.quotaTarget; + } + + /** + * Get the quotaLimitUsedInKiBs property: Specifies the current usage in kibibytes for the user/group quota. + * + * @return the quotaLimitUsedInKiBs value. + */ + public Long quotaLimitUsedInKiBs() { + return this.quotaLimitUsedInKiBs; + } + + /** + * Get the quotaLimitTotalInKiBs property: Specifies the total size limit in kibibytes for the user/group quota. + * + * @return the quotaLimitTotalInKiBs value. + */ + public Long quotaLimitTotalInKiBs() { + return this.quotaLimitTotalInKiBs; + } + + /** + * Get the percentageUsed property: Percentage of used size compared to total size. + * + * @return the percentageUsed value. + */ + public Float percentageUsed() { + return this.percentageUsed; + } + + /** + * Get the isDerivedQuota property: Flag to indicate whether the quota is derived from default quota. + * + * @return the isDerivedQuota value. + */ + public Boolean isDerivedQuota() { + return this.isDerivedQuota; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("quotaType", this.quotaType == null ? null : this.quotaType.toString()); + jsonWriter.writeStringField("quotaTarget", this.quotaTarget); + jsonWriter.writeNumberField("quotaLimitUsedInKiBs", this.quotaLimitUsedInKiBs); + jsonWriter.writeNumberField("quotaLimitTotalInKiBs", this.quotaLimitTotalInKiBs); + jsonWriter.writeNumberField("percentageUsed", this.percentageUsed); + jsonWriter.writeBooleanField("isDerivedQuota", this.isDerivedQuota); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QuotaReport from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QuotaReport if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the QuotaReport. + */ + public static QuotaReport fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QuotaReport deserializedQuotaReport = new QuotaReport(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("quotaType".equals(fieldName)) { + deserializedQuotaReport.quotaType = Type.fromString(reader.getString()); + } else if ("quotaTarget".equals(fieldName)) { + deserializedQuotaReport.quotaTarget = reader.getString(); + } else if ("quotaLimitUsedInKiBs".equals(fieldName)) { + deserializedQuotaReport.quotaLimitUsedInKiBs = reader.getNullable(JsonReader::getLong); + } else if ("quotaLimitTotalInKiBs".equals(fieldName)) { + deserializedQuotaReport.quotaLimitTotalInKiBs = reader.getNullable(JsonReader::getLong); + } else if ("percentageUsed".equals(fieldName)) { + deserializedQuotaReport.percentageUsed = reader.getNullable(JsonReader::getFloat); + } else if ("isDerivedQuota".equals(fieldName)) { + deserializedQuotaReport.isDerivedQuota = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedQuotaReport; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionPatchSettings.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionPatchSettings.java new file mode 100644 index 000000000000..2955b4701108 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionPatchSettings.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Advanced Ransomware Protection reports (ARP) updatable settings. + */ +@Fluent +public final class RansomwareProtectionPatchSettings implements JsonSerializable<RansomwareProtectionPatchSettings> { + /* + * The desired value of the ARP feature state available to the volume + */ + private DesiredRansomwareProtectionState desiredRansomwareProtectionState; + + /** + * Creates an instance of RansomwareProtectionPatchSettings class. + */ + public RansomwareProtectionPatchSettings() { + } + + /** + * Get the desiredRansomwareProtectionState property: The desired value of the ARP feature state available to the + * volume. + * + * @return the desiredRansomwareProtectionState value. + */ + public DesiredRansomwareProtectionState desiredRansomwareProtectionState() { + return this.desiredRansomwareProtectionState; + } + + /** + * Set the desiredRansomwareProtectionState property: The desired value of the ARP feature state available to the + * volume. + * + * @param desiredRansomwareProtectionState the desiredRansomwareProtectionState value to set. + * @return the RansomwareProtectionPatchSettings object itself. + */ + public RansomwareProtectionPatchSettings + withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState desiredRansomwareProtectionState) { + this.desiredRansomwareProtectionState = desiredRansomwareProtectionState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("desiredRansomwareProtectionState", + this.desiredRansomwareProtectionState == null ? null : this.desiredRansomwareProtectionState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RansomwareProtectionPatchSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RansomwareProtectionPatchSettings if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RansomwareProtectionPatchSettings. + */ + public static RansomwareProtectionPatchSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RansomwareProtectionPatchSettings deserializedRansomwareProtectionPatchSettings + = new RansomwareProtectionPatchSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("desiredRansomwareProtectionState".equals(fieldName)) { + deserializedRansomwareProtectionPatchSettings.desiredRansomwareProtectionState + = DesiredRansomwareProtectionState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRansomwareProtectionPatchSettings; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionSettings.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionSettings.java new file mode 100644 index 000000000000..3c02e9845031 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionSettings.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Advanced Ransomware Protection reports (ARP) settings. + */ +@Fluent +public final class RansomwareProtectionSettings implements JsonSerializable<RansomwareProtectionSettings> { + /* + * The desired value of the Advanced Ransomware Protection feature state available to the volume + */ + private DesiredRansomwareProtectionState desiredRansomwareProtectionState; + + /* + * The actual state of the Advanced Ransomware Protection feature currently active on the volume + */ + private ActualRansomwareProtectionState actualRansomwareProtectionState; + + /** + * Creates an instance of RansomwareProtectionSettings class. + */ + public RansomwareProtectionSettings() { + } + + /** + * Get the desiredRansomwareProtectionState property: The desired value of the Advanced Ransomware Protection + * feature state available to the volume. + * + * @return the desiredRansomwareProtectionState value. + */ + public DesiredRansomwareProtectionState desiredRansomwareProtectionState() { + return this.desiredRansomwareProtectionState; + } + + /** + * Set the desiredRansomwareProtectionState property: The desired value of the Advanced Ransomware Protection + * feature state available to the volume. + * + * @param desiredRansomwareProtectionState the desiredRansomwareProtectionState value to set. + * @return the RansomwareProtectionSettings object itself. + */ + public RansomwareProtectionSettings + withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState desiredRansomwareProtectionState) { + this.desiredRansomwareProtectionState = desiredRansomwareProtectionState; + return this; + } + + /** + * Get the actualRansomwareProtectionState property: The actual state of the Advanced Ransomware Protection feature + * currently active on the volume. + * + * @return the actualRansomwareProtectionState value. + */ + public ActualRansomwareProtectionState actualRansomwareProtectionState() { + return this.actualRansomwareProtectionState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("desiredRansomwareProtectionState", + this.desiredRansomwareProtectionState == null ? null : this.desiredRansomwareProtectionState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RansomwareProtectionSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RansomwareProtectionSettings if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RansomwareProtectionSettings. + */ + public static RansomwareProtectionSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RansomwareProtectionSettings deserializedRansomwareProtectionSettings = new RansomwareProtectionSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("desiredRansomwareProtectionState".equals(fieldName)) { + deserializedRansomwareProtectionSettings.desiredRansomwareProtectionState + = DesiredRansomwareProtectionState.fromString(reader.getString()); + } else if ("actualRansomwareProtectionState".equals(fieldName)) { + deserializedRansomwareProtectionSettings.actualRansomwareProtectionState + = ActualRansomwareProtectionState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRansomwareProtectionSettings; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReport.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReport.java new file mode 100644 index 000000000000..152c077c7585 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReport.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.netapp.fluent.models.RansomwareReportInner; + +/** + * An immutable client-side representation of RansomwareReport. + */ +public interface RansomwareReport { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Advanced Ransomware Protection reports Properties. + * + * @return the properties value. + */ + RansomwareReportProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.RansomwareReportInner object. + * + * @return the inner object. + */ + RansomwareReportInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportProperties.java new file mode 100644 index 000000000000..4212ddd9545a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportProperties.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Advanced Ransomware Protection (ARP) report properties. + * + * Evaluate the report to determine whether the activity is acceptable (false positive) or whether an attack seems + * malicious using the ClearSuspects operation. + * + * Advanced Ransomware Protection (ARP) creates snapshots named Anti_ransomware_backup when it detects a potential + * ransomware threat. You can use one of the ARP snapshots or another snapshot of your volume to restore data. + */ +@Immutable +public final class RansomwareReportProperties implements JsonSerializable<RansomwareReportProperties> { + /* + * The creation date and time of the report + */ + private OffsetDateTime eventTime; + + /* + * State of the Advanced Ransomware Protection (ARP) report + */ + private RansomwareReportState state; + + /* + * Severity of the Advanced Ransomware Protection (ARP) report + */ + private RansomwareReportSeverity severity; + + /* + * The number of cleared suspects identified by the ARP report + */ + private Integer clearedCount; + + /* + * The number of suspects identified by the ARP report + */ + private Integer reportedCount; + + /* + * Suspects identified in an ARP report + */ + private List<RansomwareSuspects> suspects; + + /* + * Azure lifecycle management + */ + private String provisioningState; + + /** + * Creates an instance of RansomwareReportProperties class. + */ + private RansomwareReportProperties() { + } + + /** + * Get the eventTime property: The creation date and time of the report. + * + * @return the eventTime value. + */ + public OffsetDateTime eventTime() { + return this.eventTime; + } + + /** + * Get the state property: State of the Advanced Ransomware Protection (ARP) report. + * + * @return the state value. + */ + public RansomwareReportState state() { + return this.state; + } + + /** + * Get the severity property: Severity of the Advanced Ransomware Protection (ARP) report. + * + * @return the severity value. + */ + public RansomwareReportSeverity severity() { + return this.severity; + } + + /** + * Get the clearedCount property: The number of cleared suspects identified by the ARP report. + * + * @return the clearedCount value. + */ + public Integer clearedCount() { + return this.clearedCount; + } + + /** + * Get the reportedCount property: The number of suspects identified by the ARP report. + * + * @return the reportedCount value. + */ + public Integer reportedCount() { + return this.reportedCount; + } + + /** + * Get the suspects property: Suspects identified in an ARP report. + * + * @return the suspects value. + */ + public List<RansomwareSuspects> suspects() { + return this.suspects; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (suspects() != null) { + suspects().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RansomwareReportProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RansomwareReportProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RansomwareReportProperties. + */ + public static RansomwareReportProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RansomwareReportProperties deserializedRansomwareReportProperties = new RansomwareReportProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("eventTime".equals(fieldName)) { + deserializedRansomwareReportProperties.eventTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("state".equals(fieldName)) { + deserializedRansomwareReportProperties.state = RansomwareReportState.fromString(reader.getString()); + } else if ("severity".equals(fieldName)) { + deserializedRansomwareReportProperties.severity + = RansomwareReportSeverity.fromString(reader.getString()); + } else if ("clearedCount".equals(fieldName)) { + deserializedRansomwareReportProperties.clearedCount = reader.getNullable(JsonReader::getInt); + } else if ("reportedCount".equals(fieldName)) { + deserializedRansomwareReportProperties.reportedCount = reader.getNullable(JsonReader::getInt); + } else if ("suspects".equals(fieldName)) { + List<RansomwareSuspects> suspects + = reader.readArray(reader1 -> RansomwareSuspects.fromJson(reader1)); + deserializedRansomwareReportProperties.suspects = suspects; + } else if ("provisioningState".equals(fieldName)) { + deserializedRansomwareReportProperties.provisioningState = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRansomwareReportProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportSeverity.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportSeverity.java new file mode 100644 index 000000000000..3f84306c27af --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportSeverity.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Severity of the Advanced Ransomware Protection (ARP) report. + */ +public final class RansomwareReportSeverity extends ExpandableStringEnum<RansomwareReportSeverity> { + /** + * No data is suspected for ransomware activity. + */ + public static final RansomwareReportSeverity NONE = fromString("None"); + + /** + * Low attack probability. + */ + public static final RansomwareReportSeverity LOW = fromString("Low"); + + /** + * Moderate attack probability. + */ + public static final RansomwareReportSeverity MODERATE = fromString("Moderate"); + + /** + * High amount of data is suspected for ransomware activity. + */ + public static final RansomwareReportSeverity HIGH = fromString("High"); + + /** + * Creates a new instance of RansomwareReportSeverity value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RansomwareReportSeverity() { + } + + /** + * Creates or finds a RansomwareReportSeverity from its string representation. + * + * @param name a name to look for. + * @return the corresponding RansomwareReportSeverity. + */ + public static RansomwareReportSeverity fromString(String name) { + return fromString(name, RansomwareReportSeverity.class); + } + + /** + * Gets known RansomwareReportSeverity values. + * + * @return known RansomwareReportSeverity values. + */ + public static Collection<RansomwareReportSeverity> values() { + return values(RansomwareReportSeverity.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportState.java new file mode 100644 index 000000000000..76247fec8d62 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportState.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * State of the Advanced Ransomware Protection (ARP) report. + */ +public final class RansomwareReportState extends ExpandableStringEnum<RansomwareReportState> { + /** + * The ARP report has been created. Take action by running clearsuspects marking suspects as FalsePositive or + * PotentialThreats. + */ + public static final RansomwareReportState ACTIVE = fromString("Active"); + + /** + * The ARP Report has been resolved. + */ + public static final RansomwareReportState RESOLVED = fromString("Resolved"); + + /** + * Creates a new instance of RansomwareReportState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RansomwareReportState() { + } + + /** + * Creates or finds a RansomwareReportState from its string representation. + * + * @param name a name to look for. + * @return the corresponding RansomwareReportState. + */ + public static RansomwareReportState fromString(String name) { + return fromString(name, RansomwareReportState.class); + } + + /** + * Gets known RansomwareReportState values. + * + * @return known RansomwareReportState values. + */ + public static Collection<RansomwareReportState> values() { + return values(RansomwareReportState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReports.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReports.java new file mode 100644 index 000000000000..45543922d8e4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReports.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of RansomwareReports. + */ +public interface RansomwareReports { + /** + * Get details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat along with + * {@link Response}. + */ + Response<RansomwareReport> getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String ransomwareReportName, Context context); + + /** + * Get details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. + */ + RansomwareReport get(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName); + + /** + * List all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Advanced Ransomware Protection (ARP) reports as paginated response with {@link PagedIterable}. + */ + PagedIterable<RansomwareReport> list(String resourceGroupName, String accountName, String poolName, + String volumeName); + + /** + * List all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Advanced Ransomware Protection (ARP) reports as paginated response with {@link PagedIterable}. + */ + PagedIterable<RansomwareReport> list(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context); + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void clearSuspects(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName, RansomwareSuspectsClearRequest body); + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void clearSuspects(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName, RansomwareSuspectsClearRequest body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectResolution.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectResolution.java new file mode 100644 index 000000000000..a54dd948f7f7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectResolution.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * ARP report suspect resolution. + */ +public final class RansomwareSuspectResolution extends ExpandableStringEnum<RansomwareSuspectResolution> { + /** + * The identified file type is unexpected in your workload and should be treated as a potential attack. + */ + public static final RansomwareSuspectResolution POTENTIAL_THREAT = fromString("PotentialThreat"); + + /** + * The identified file type is expected in your workload and can be ignored. + */ + public static final RansomwareSuspectResolution FALSE_POSITIVE = fromString("FalsePositive"); + + /** + * Creates a new instance of RansomwareSuspectResolution value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RansomwareSuspectResolution() { + } + + /** + * Creates or finds a RansomwareSuspectResolution from its string representation. + * + * @param name a name to look for. + * @return the corresponding RansomwareSuspectResolution. + */ + public static RansomwareSuspectResolution fromString(String name) { + return fromString(name, RansomwareSuspectResolution.class); + } + + /** + * Gets known RansomwareSuspectResolution values. + * + * @return known RansomwareSuspectResolution values. + */ + public static Collection<RansomwareSuspectResolution> values() { + return values(RansomwareSuspectResolution.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspects.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspects.java new file mode 100644 index 000000000000..c073db1a8571 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspects.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * List of suspects identified in an Advanced Ransomware Protection (ARP) report. + */ +@Immutable +public final class RansomwareSuspects implements JsonSerializable<RansomwareSuspects> { + /* + * Suspect File extension + */ + private String extension; + + /* + * ARP report suspect resolution + */ + private RansomwareSuspectResolution resolution; + + /* + * The number of suspect files at the time of ARP report, this number can change as files get created and report + * status progresses + */ + private Integer fileCount; + + /* + * Suspect files + */ + private List<SuspectFile> suspectFiles; + + /** + * Creates an instance of RansomwareSuspects class. + */ + private RansomwareSuspects() { + } + + /** + * Get the extension property: Suspect File extension. + * + * @return the extension value. + */ + public String extension() { + return this.extension; + } + + /** + * Get the resolution property: ARP report suspect resolution. + * + * @return the resolution value. + */ + public RansomwareSuspectResolution resolution() { + return this.resolution; + } + + /** + * Get the fileCount property: The number of suspect files at the time of ARP report, this number can change as + * files get created and report status progresses. + * + * @return the fileCount value. + */ + public Integer fileCount() { + return this.fileCount; + } + + /** + * Get the suspectFiles property: Suspect files. + * + * @return the suspectFiles value. + */ + public List<SuspectFile> suspectFiles() { + return this.suspectFiles; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (suspectFiles() != null) { + suspectFiles().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RansomwareSuspects from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RansomwareSuspects if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the RansomwareSuspects. + */ + public static RansomwareSuspects fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RansomwareSuspects deserializedRansomwareSuspects = new RansomwareSuspects(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("extension".equals(fieldName)) { + deserializedRansomwareSuspects.extension = reader.getString(); + } else if ("resolution".equals(fieldName)) { + deserializedRansomwareSuspects.resolution + = RansomwareSuspectResolution.fromString(reader.getString()); + } else if ("fileCount".equals(fieldName)) { + deserializedRansomwareSuspects.fileCount = reader.getNullable(JsonReader::getInt); + } else if ("suspectFiles".equals(fieldName)) { + List<SuspectFile> suspectFiles = reader.readArray(reader1 -> SuspectFile.fromJson(reader1)); + deserializedRansomwareSuspects.suspectFiles = suspectFiles; + } else { + reader.skipChildren(); + } + } + + return deserializedRansomwareSuspects; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectsClearRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectsClearRequest.java new file mode 100644 index 000000000000..42b448433cde --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectsClearRequest.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Clear suspects for Advanced Ransomware Protection (ARP) report. + */ +@Fluent +public final class RansomwareSuspectsClearRequest implements JsonSerializable<RansomwareSuspectsClearRequest> { + /* + * ARP report suspect resolution + */ + private RansomwareSuspectResolution resolution; + + /* + * List of file extensions resolved (PotentialThreat or FalsePositive) + */ + private List<String> extensions; + + /** + * Creates an instance of RansomwareSuspectsClearRequest class. + */ + public RansomwareSuspectsClearRequest() { + } + + /** + * Get the resolution property: ARP report suspect resolution. + * + * @return the resolution value. + */ + public RansomwareSuspectResolution resolution() { + return this.resolution; + } + + /** + * Set the resolution property: ARP report suspect resolution. + * + * @param resolution the resolution value to set. + * @return the RansomwareSuspectsClearRequest object itself. + */ + public RansomwareSuspectsClearRequest withResolution(RansomwareSuspectResolution resolution) { + this.resolution = resolution; + return this; + } + + /** + * Get the extensions property: List of file extensions resolved (PotentialThreat or FalsePositive). + * + * @return the extensions value. + */ + public List<String> extensions() { + return this.extensions; + } + + /** + * Set the extensions property: List of file extensions resolved (PotentialThreat or FalsePositive). + * + * @param extensions the extensions value to set. + * @return the RansomwareSuspectsClearRequest object itself. + */ + public RansomwareSuspectsClearRequest withExtensions(List<String> extensions) { + this.extensions = extensions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resolution() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resolution in model RansomwareSuspectsClearRequest")); + } + if (extensions() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property extensions in model RansomwareSuspectsClearRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RansomwareSuspectsClearRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resolution", this.resolution == null ? null : this.resolution.toString()); + jsonWriter.writeArrayField("extensions", this.extensions, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RansomwareSuspectsClearRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RansomwareSuspectsClearRequest if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RansomwareSuspectsClearRequest. + */ + public static RansomwareSuspectsClearRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RansomwareSuspectsClearRequest deserializedRansomwareSuspectsClearRequest + = new RansomwareSuspectsClearRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resolution".equals(fieldName)) { + deserializedRansomwareSuspectsClearRequest.resolution + = RansomwareSuspectResolution.fromString(reader.getString()); + } else if ("extensions".equals(fieldName)) { + List<String> extensions = reader.readArray(reader1 -> reader1.getString()); + deserializedRansomwareSuspectsClearRequest.extensions = extensions; + } else { + reader.skipChildren(); + } + } + + return deserializedRansomwareSuspectsClearRequest; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java index 8cc6a9f678da..98886ac62753 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java @@ -52,6 +52,29 @@ public final class ReplicationObject implements JsonSerializable<ReplicationObje */ private List<DestinationReplication> destinationReplications; + /* + * Property that only applies to external replications. Provides a machine-readable value for the status of the + * external replication setup. + */ + private ExternalReplicationSetupStatus externalReplicationSetupStatus; + + /* + * Contains human-readable instructions on what the next step is to finish the external replication setup. + */ + private String externalReplicationSetupInfo; + + /* + * The mirror state property describes the current status of data replication for a replication. It provides insight + * into whether the data is actively being mirrored, if the replication process has been paused, or if it has yet to + * be initialized. + */ + private MirrorState mirrorState; + + /* + * The status of the Volume Replication + */ + private VolumeReplicationRelationshipStatus relationshipStatus; + /** * Creates an instance of ReplicationObject class. */ @@ -170,6 +193,46 @@ public List<DestinationReplication> destinationReplications() { return this.destinationReplications; } + /** + * Get the externalReplicationSetupStatus property: Property that only applies to external replications. Provides a + * machine-readable value for the status of the external replication setup. + * + * @return the externalReplicationSetupStatus value. + */ + public ExternalReplicationSetupStatus externalReplicationSetupStatus() { + return this.externalReplicationSetupStatus; + } + + /** + * Get the externalReplicationSetupInfo property: Contains human-readable instructions on what the next step is to + * finish the external replication setup. + * + * @return the externalReplicationSetupInfo value. + */ + public String externalReplicationSetupInfo() { + return this.externalReplicationSetupInfo; + } + + /** + * Get the mirrorState property: The mirror state property describes the current status of data replication for a + * replication. It provides insight into whether the data is actively being mirrored, if the replication process has + * been paused, or if it has yet to be initialized. + * + * @return the mirrorState value. + */ + public MirrorState mirrorState() { + return this.mirrorState; + } + + /** + * Get the relationshipStatus property: The status of the Volume Replication. + * + * @return the relationshipStatus value. + */ + public VolumeReplicationRelationshipStatus relationshipStatus() { + return this.relationshipStatus; + } + /** * Validates the instance. * @@ -230,6 +293,16 @@ public static ReplicationObject fromJson(JsonReader jsonReader) throws IOExcepti List<DestinationReplication> destinationReplications = reader.readArray(reader1 -> DestinationReplication.fromJson(reader1)); deserializedReplicationObject.destinationReplications = destinationReplications; + } else if ("externalReplicationSetupStatus".equals(fieldName)) { + deserializedReplicationObject.externalReplicationSetupStatus + = ExternalReplicationSetupStatus.fromString(reader.getString()); + } else if ("externalReplicationSetupInfo".equals(fieldName)) { + deserializedReplicationObject.externalReplicationSetupInfo = reader.getString(); + } else if ("mirrorState".equals(fieldName)) { + deserializedReplicationObject.mirrorState = MirrorState.fromString(reader.getString()); + } else if ("relationshipStatus".equals(fieldName)) { + deserializedReplicationObject.relationshipStatus + = VolumeReplicationRelationshipStatus.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPassword.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPassword.java new file mode 100644 index 000000000000..c8074d6214cd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPassword.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Access password from Azure KeyVault Secrets to connect Active Directory. + */ +@Fluent +public final class SecretPassword implements JsonSerializable<SecretPassword> { + /* + * Properties provided by KeyVault. + */ + private SecretPasswordKeyVaultProperties keyVaultProperties; + + /* + * Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + */ + private SecretPasswordIdentity identity; + + /** + * Creates an instance of SecretPassword class. + */ + public SecretPassword() { + } + + /** + * Get the keyVaultProperties property: Properties provided by KeyVault. + * + * @return the keyVaultProperties value. + */ + public SecretPasswordKeyVaultProperties keyVaultProperties() { + return this.keyVaultProperties; + } + + /** + * Set the keyVaultProperties property: Properties provided by KeyVault. + * + * @param keyVaultProperties the keyVaultProperties value to set. + * @return the SecretPassword object itself. + */ + public SecretPassword withKeyVaultProperties(SecretPasswordKeyVaultProperties keyVaultProperties) { + this.keyVaultProperties = keyVaultProperties; + return this; + } + + /** + * Get the identity property: Identity used to authenticate to KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @return the identity value. + */ + public SecretPasswordIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Identity used to authenticate to KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @param identity the identity value to set. + * @return the SecretPassword object itself. + */ + public SecretPassword withIdentity(SecretPasswordIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyVaultProperties() != null) { + keyVaultProperties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("keyVaultProperties", this.keyVaultProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecretPassword from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecretPassword if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SecretPassword. + */ + public static SecretPassword fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecretPassword deserializedSecretPassword = new SecretPassword(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyVaultProperties".equals(fieldName)) { + deserializedSecretPassword.keyVaultProperties = SecretPasswordKeyVaultProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedSecretPassword.identity = SecretPasswordIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSecretPassword; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordIdentity.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordIdentity.java new file mode 100644 index 000000000000..142d0abf11dd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordIdentity.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Identity used to authenticate with key vault. + */ +@Fluent +public final class SecretPasswordIdentity implements JsonSerializable<SecretPasswordIdentity> { + /* + * The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. + */ + private String principalId; + + /* + * The Azure resource identifier of the user assigned identity used to authenticate with key vault. Applicable if + * identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. + */ + private String userAssignedIdentity; + + /** + * Creates an instance of SecretPasswordIdentity class. + */ + public SecretPasswordIdentity() { + } + + /** + * Get the principalId property: The principal ID (object ID) of the identity used to authenticate with key vault. + * Read-only. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the userAssignedIdentity property: The Azure resource identifier of the user assigned identity used to + * authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of + * identity.userAssignedIdentities. + * + * @return the userAssignedIdentity value. + */ + public String userAssignedIdentity() { + return this.userAssignedIdentity; + } + + /** + * Set the userAssignedIdentity property: The Azure resource identifier of the user assigned identity used to + * authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of + * identity.userAssignedIdentities. + * + * @param userAssignedIdentity the userAssignedIdentity value to set. + * @return the SecretPasswordIdentity object itself. + */ + public SecretPasswordIdentity withUserAssignedIdentity(String userAssignedIdentity) { + this.userAssignedIdentity = userAssignedIdentity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("userAssignedIdentity", this.userAssignedIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecretPasswordIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecretPasswordIdentity if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SecretPasswordIdentity. + */ + public static SecretPasswordIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecretPasswordIdentity deserializedSecretPasswordIdentity = new SecretPasswordIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedSecretPasswordIdentity.principalId = reader.getString(); + } else if ("userAssignedIdentity".equals(fieldName)) { + deserializedSecretPasswordIdentity.userAssignedIdentity = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSecretPasswordIdentity; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordKeyVaultProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordKeyVaultProperties.java new file mode 100644 index 000000000000..d61ec62ff020 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordKeyVaultProperties.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Properties of key vault to get the secrets for password. + */ +@Fluent +public final class SecretPasswordKeyVaultProperties implements JsonSerializable<SecretPasswordKeyVaultProperties> { + /* + * The Uri of KeyVault. + */ + private String keyVaultUri; + + /* + * The name of KeyVault password secret. + */ + private String secretName; + + /** + * Creates an instance of SecretPasswordKeyVaultProperties class. + */ + public SecretPasswordKeyVaultProperties() { + } + + /** + * Get the keyVaultUri property: The Uri of KeyVault. + * + * @return the keyVaultUri value. + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Set the keyVaultUri property: The Uri of KeyVault. + * + * @param keyVaultUri the keyVaultUri value to set. + * @return the SecretPasswordKeyVaultProperties object itself. + */ + public SecretPasswordKeyVaultProperties withKeyVaultUri(String keyVaultUri) { + this.keyVaultUri = keyVaultUri; + return this; + } + + /** + * Get the secretName property: The name of KeyVault password secret. + * + * @return the secretName value. + */ + public String secretName() { + return this.secretName; + } + + /** + * Set the secretName property: The name of KeyVault password secret. + * + * @param secretName the secretName value to set. + * @return the SecretPasswordKeyVaultProperties object itself. + */ + public SecretPasswordKeyVaultProperties withSecretName(String secretName) { + this.secretName = secretName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyVaultUri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property keyVaultUri in model SecretPasswordKeyVaultProperties")); + } + if (secretName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property secretName in model SecretPasswordKeyVaultProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SecretPasswordKeyVaultProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyVaultUri", this.keyVaultUri); + jsonWriter.writeStringField("secretName", this.secretName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecretPasswordKeyVaultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecretPasswordKeyVaultProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SecretPasswordKeyVaultProperties. + */ + public static SecretPasswordKeyVaultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecretPasswordKeyVaultProperties deserializedSecretPasswordKeyVaultProperties + = new SecretPasswordKeyVaultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyVaultUri".equals(fieldName)) { + deserializedSecretPasswordKeyVaultProperties.keyVaultUri = reader.getString(); + } else if ("secretName".equals(fieldName)) { + deserializedSecretPasswordKeyVaultProperties.secretName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSecretPasswordKeyVaultProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbEncryptionState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbEncryptionState.java new file mode 100644 index 000000000000..006f1976e953 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbEncryptionState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol cache. + */ +public final class SmbEncryptionState extends ExpandableStringEnum<SmbEncryptionState> { + /** + * SMB encryption is disabled. + */ + public static final SmbEncryptionState DISABLED = fromString("Disabled"); + + /** + * SMB encryption is enabled. + */ + public static final SmbEncryptionState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of SmbEncryptionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SmbEncryptionState() { + } + + /** + * Creates or finds a SmbEncryptionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding SmbEncryptionState. + */ + public static SmbEncryptionState fromString(String name) { + return fromString(name, SmbEncryptionState.class); + } + + /** + * Gets known SmbEncryptionState values. + * + * @return known SmbEncryptionState values. + */ + public static Collection<SmbEncryptionState> values() { + return values(SmbEncryptionState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbSettings.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbSettings.java new file mode 100644 index 000000000000..092893d18e53 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbSettings.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * SMB settings for the cache. + */ +@Fluent +public final class SmbSettings implements JsonSerializable<SmbSettings> { + /* + * Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol cache. + */ + private SmbEncryptionState smbEncryption; + + /* + * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume + */ + private SmbAccessBasedEnumeration smbAccessBasedEnumerations; + + /* + * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume + */ + private SmbNonBrowsable smbNonBrowsable; + + /** + * Creates an instance of SmbSettings class. + */ + public SmbSettings() { + } + + /** + * Get the smbEncryption property: Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol + * cache. + * + * @return the smbEncryption value. + */ + public SmbEncryptionState smbEncryption() { + return this.smbEncryption; + } + + /** + * Set the smbEncryption property: Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol + * cache. + * + * @param smbEncryption the smbEncryption value to set. + * @return the SmbSettings object itself. + */ + public SmbSettings withSmbEncryption(SmbEncryptionState smbEncryption) { + this.smbEncryption = smbEncryption; + return this; + } + + /** + * Get the smbAccessBasedEnumerations property: Enables access-based enumeration share property for SMB Shares. Only + * applicable for SMB/DualProtocol volume. + * + * @return the smbAccessBasedEnumerations value. + */ + public SmbAccessBasedEnumeration smbAccessBasedEnumerations() { + return this.smbAccessBasedEnumerations; + } + + /** + * Set the smbAccessBasedEnumerations property: Enables access-based enumeration share property for SMB Shares. Only + * applicable for SMB/DualProtocol volume. + * + * @param smbAccessBasedEnumerations the smbAccessBasedEnumerations value to set. + * @return the SmbSettings object itself. + */ + public SmbSettings withSmbAccessBasedEnumerations(SmbAccessBasedEnumeration smbAccessBasedEnumerations) { + this.smbAccessBasedEnumerations = smbAccessBasedEnumerations; + return this; + } + + /** + * Get the smbNonBrowsable property: Enables non-browsable property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. + * + * @return the smbNonBrowsable value. + */ + public SmbNonBrowsable smbNonBrowsable() { + return this.smbNonBrowsable; + } + + /** + * Set the smbNonBrowsable property: Enables non-browsable property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. + * + * @param smbNonBrowsable the smbNonBrowsable value to set. + * @return the SmbSettings object itself. + */ + public SmbSettings withSmbNonBrowsable(SmbNonBrowsable smbNonBrowsable) { + this.smbNonBrowsable = smbNonBrowsable; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("smbEncryption", this.smbEncryption == null ? null : this.smbEncryption.toString()); + jsonWriter.writeStringField("smbAccessBasedEnumerations", + this.smbAccessBasedEnumerations == null ? null : this.smbAccessBasedEnumerations.toString()); + jsonWriter.writeStringField("smbNonBrowsable", + this.smbNonBrowsable == null ? null : this.smbNonBrowsable.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SmbSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SmbSettings if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SmbSettings. + */ + public static SmbSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SmbSettings deserializedSmbSettings = new SmbSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("smbEncryption".equals(fieldName)) { + deserializedSmbSettings.smbEncryption = SmbEncryptionState.fromString(reader.getString()); + } else if ("smbAccessBasedEnumerations".equals(fieldName)) { + deserializedSmbSettings.smbAccessBasedEnumerations + = SmbAccessBasedEnumeration.fromString(reader.getString()); + } else if ("smbNonBrowsable".equals(fieldName)) { + deserializedSmbSettings.smbNonBrowsable = SmbNonBrowsable.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSmbSettings; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotDirectoryVisibility.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotDirectoryVisibility.java new file mode 100644 index 000000000000..ea3a485321db --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotDirectoryVisibility.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Controls the visibility of the Elastic Volume's read-only snapshot directory, which provides access to each of the + * volume's snapshots. + */ +public final class SnapshotDirectoryVisibility extends ExpandableStringEnum<SnapshotDirectoryVisibility> { + /** + * Value indicating the read-only snapshot directory is not visible. + */ + public static final SnapshotDirectoryVisibility HIDDEN = fromString("Hidden"); + + /** + * Value indicating the read-only snapshot directory is visible. + */ + public static final SnapshotDirectoryVisibility VISIBLE = fromString("Visible"); + + /** + * Creates a new instance of SnapshotDirectoryVisibility value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SnapshotDirectoryVisibility() { + } + + /** + * Creates or finds a SnapshotDirectoryVisibility from its string representation. + * + * @param name a name to look for. + * @return the corresponding SnapshotDirectoryVisibility. + */ + public static SnapshotDirectoryVisibility fromString(String name) { + return fromString(name, SnapshotDirectoryVisibility.class); + } + + /** + * Gets known SnapshotDirectoryVisibility values. + * + * @return known SnapshotDirectoryVisibility values. + */ + public static Collection<SnapshotDirectoryVisibility> values() { + return values(SnapshotDirectoryVisibility.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotUsage.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotUsage.java new file mode 100644 index 000000000000..54786c233ec7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotUsage.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Snapshot usage for backup. + */ +public final class SnapshotUsage extends ExpandableStringEnum<SnapshotUsage> { + /** + * Value indicating an existing snapshot is used. + */ + public static final SnapshotUsage USE_EXISTING_SNAPSHOT = fromString("UseExistingSnapshot"); + + /** + * Value indicating a new snapshot is created. + */ + public static final SnapshotUsage CREATE_NEW_SNAPSHOT = fromString("CreateNewSnapshot"); + + /** + * Creates a new instance of SnapshotUsage value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SnapshotUsage() { + } + + /** + * Creates or finds a SnapshotUsage from its string representation. + * + * @param name a name to look for. + * @return the corresponding SnapshotUsage. + */ + public static SnapshotUsage fromString(String name) { + return fromString(name, SnapshotUsage.class); + } + + /** + * Gets known SnapshotUsage values. + * + * @return known SnapshotUsage values. + */ + public static Collection<SnapshotUsage> values() { + return values(SnapshotUsage.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SuspectFile.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SuspectFile.java new file mode 100644 index 000000000000..6006913e8594 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SuspectFile.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Suspect file information. + */ +@Immutable +public final class SuspectFile implements JsonSerializable<SuspectFile> { + /* + * Suspect filename + */ + private String suspectFileName; + + /* + * The creation date and time of the file + */ + private OffsetDateTime fileTimestamp; + + /** + * Creates an instance of SuspectFile class. + */ + private SuspectFile() { + } + + /** + * Get the suspectFileName property: Suspect filename. + * + * @return the suspectFileName value. + */ + public String suspectFileName() { + return this.suspectFileName; + } + + /** + * Get the fileTimestamp property: The creation date and time of the file. + * + * @return the fileTimestamp value. + */ + public OffsetDateTime fileTimestamp() { + return this.fileTimestamp; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SuspectFile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SuspectFile if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SuspectFile. + */ + public static SuspectFile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SuspectFile deserializedSuspectFile = new SuspectFile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("suspectFileName".equals(fieldName)) { + deserializedSuspectFile.suspectFileName = reader.getString(); + } else if ("fileTimestamp".equals(fieldName)) { + deserializedSuspectFile.fileTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedSuspectFile; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java index 4355e8df7dd9..4679f96e9a94 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java @@ -98,9 +98,11 @@ public interface Volume { /** * Gets the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @return the usageThreshold value. */ @@ -331,6 +333,13 @@ public interface Volume { */ Boolean ldapEnabled(); + /** + * Gets the ldapServerType property: Specifies the type of LDAP server for a given NFS volume. + * + * @return the ldapServerType value. + */ + LdapServerType ldapServerType(); + /** * Gets the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume. * @@ -517,6 +526,17 @@ public interface Volume { */ Boolean isLargeVolume(); + /** + * Gets the largeVolumeType property: Specifies the type of the Large Volume. When set to 'LargeVolume', the large + * volume is created with standard configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit 7.2PiB + * with cool access enabled, + * delivering higher capacity limit with lower costs. + * + * @return the largeVolumeType value. + */ + LargeVolumeType largeVolumeType(); + /** * Gets the originatingResourceId property: Id of the snapshot or backup that the volume is restored from. * @@ -531,6 +551,20 @@ public interface Volume { */ Long inheritedSizeInBytes(); + /** + * Gets the language property: Language supported for volume. + * + * @return the language value. + */ + VolumeLanguage language(); + + /** + * Gets the breakthroughMode property: Specifies whether the volume operates in Breakthrough Mode. + * + * @return the breakthroughMode value. + */ + BreakthroughMode breakthroughMode(); + /** * Gets the region of the resource. * @@ -635,12 +669,16 @@ interface WithUsageThreshold { * Specifies the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is * a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to - * 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB.. + * 2400GiB to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as + * multiples of 1 GiB.. * * @param usageThreshold Maximum storage quota allowed for a file system in bytes. This is a soft quota used - * for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. - * Values expressed in bytes as multiples of 1 GiB. + * for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to + * 2400GiB to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as + * multiples of 1 GiB. * @return the next definition stage. */ WithSubnetId withUsageThreshold(long usageThreshold); @@ -675,14 +713,15 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithZon DefinitionStages.WithSmbAccessBasedEnumeration, DefinitionStages.WithSmbNonBrowsable, DefinitionStages.WithSmbContinuouslyAvailable, DefinitionStages.WithThroughputMibps, DefinitionStages.WithEncryptionKeySource, DefinitionStages.WithKeyVaultPrivateEndpointResourceId, - DefinitionStages.WithLdapEnabled, DefinitionStages.WithCoolAccess, DefinitionStages.WithCoolnessPeriod, - DefinitionStages.WithCoolAccessRetrievalPolicy, DefinitionStages.WithCoolAccessTieringPolicy, - DefinitionStages.WithUnixPermissions, DefinitionStages.WithAvsDataStore, - DefinitionStages.WithIsDefaultQuotaEnabled, DefinitionStages.WithDefaultUserQuotaInKiBs, - DefinitionStages.WithDefaultGroupQuotaInKiBs, DefinitionStages.WithCapacityPoolResourceId, - DefinitionStages.WithProximityPlacementGroup, DefinitionStages.WithVolumeSpecName, - DefinitionStages.WithPlacementRules, DefinitionStages.WithEnableSubvolumes, - DefinitionStages.WithIsLargeVolume { + DefinitionStages.WithLdapEnabled, DefinitionStages.WithLdapServerType, DefinitionStages.WithCoolAccess, + DefinitionStages.WithCoolnessPeriod, DefinitionStages.WithCoolAccessRetrievalPolicy, + DefinitionStages.WithCoolAccessTieringPolicy, DefinitionStages.WithUnixPermissions, + DefinitionStages.WithAvsDataStore, DefinitionStages.WithIsDefaultQuotaEnabled, + DefinitionStages.WithDefaultUserQuotaInKiBs, DefinitionStages.WithDefaultGroupQuotaInKiBs, + DefinitionStages.WithCapacityPoolResourceId, DefinitionStages.WithProximityPlacementGroup, + DefinitionStages.WithVolumeSpecName, DefinitionStages.WithPlacementRules, + DefinitionStages.WithEnableSubvolumes, DefinitionStages.WithIsLargeVolume, + DefinitionStages.WithLargeVolumeType, DefinitionStages.WithLanguage, DefinitionStages.WithBreakthroughMode { /** * Executes the create request. * @@ -1036,6 +1075,19 @@ interface WithLdapEnabled { WithCreate withLdapEnabled(Boolean ldapEnabled); } + /** + * The stage of the Volume definition allowing to specify ldapServerType. + */ + interface WithLdapServerType { + /** + * Specifies the ldapServerType property: Specifies the type of LDAP server for a given NFS volume.. + * + * @param ldapServerType Specifies the type of LDAP server for a given NFS volume. + * @return the next definition stage. + */ + WithCreate withLdapServerType(LdapServerType ldapServerType); + } + /** * The stage of the Volume definition allowing to specify coolAccess. */ @@ -1272,6 +1324,53 @@ interface WithIsLargeVolume { */ WithCreate withIsLargeVolume(Boolean isLargeVolume); } + + /** + * The stage of the Volume definition allowing to specify largeVolumeType. + */ + interface WithLargeVolumeType { + /** + * Specifies the largeVolumeType property: Specifies the type of the Large Volume. When set to + * 'LargeVolume', the large volume is created with standard configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit + * 7.2PiB with cool access enabled, + * delivering higher capacity limit with lower costs.. + * + * @param largeVolumeType Specifies the type of the Large Volume. When set to 'LargeVolume', the large + * volume is created with standard configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit + * 7.2PiB with cool access enabled, + * delivering higher capacity limit with lower costs. + * @return the next definition stage. + */ + WithCreate withLargeVolumeType(LargeVolumeType largeVolumeType); + } + + /** + * The stage of the Volume definition allowing to specify language. + */ + interface WithLanguage { + /** + * Specifies the language property: Language supported for volume.. + * + * @param language Language supported for volume. + * @return the next definition stage. + */ + WithCreate withLanguage(VolumeLanguage language); + } + + /** + * The stage of the Volume definition allowing to specify breakthroughMode. + */ + interface WithBreakthroughMode { + /** + * Specifies the breakthroughMode property: Specifies whether the volume operates in Breakthrough Mode.. + * + * @param breakthroughMode Specifies whether the volume operates in Breakthrough Mode. + * @return the next definition stage. + */ + WithCreate withBreakthroughMode(BreakthroughMode breakthroughMode); + } } /** @@ -1346,12 +1445,16 @@ interface WithUsageThreshold { * Specifies the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is * a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to - * 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB.. + * 2400GiB to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as + * multiples of 1 GiB.. * * @param usageThreshold Maximum storage quota allowed for a file system in bytes. This is a soft quota used - * for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. - * Values expressed in bytes as multiples of 1 GiB. + * for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to + * 2400GiB to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as + * multiples of 1 GiB. * @return the next definition stage. */ Update withUsageThreshold(Long usageThreshold); @@ -2034,4 +2137,24 @@ GetGroupIdListForLdapUserResponse listGetGroupIdListForLdapUser(GetGroupIdListFo * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void revertRelocation(Context context); + + /** + * A long-running resource action. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ListQuotaReportResponse listQuotaReport(); + + /** + * A long-running resource action. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ListQuotaReportResponse listQuotaReport(Context context); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java index f78f779f1c15..d8076515c82c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java @@ -200,9 +200,11 @@ public VolumeGroupVolumeProperties withServiceLevel(ServiceLevel serviceLevel) { /** * Get the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @return the usageThreshold value. */ @@ -212,9 +214,11 @@ public long usageThreshold() { /** * Set the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @param usageThreshold the usageThreshold value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -829,6 +833,29 @@ public VolumeGroupVolumeProperties withLdapEnabled(Boolean ldapEnabled) { return this; } + /** + * Get the ldapServerType property: Specifies the type of LDAP server for a given NFS volume. + * + * @return the ldapServerType value. + */ + public LdapServerType ldapServerType() { + return this.innerProperties() == null ? null : this.innerProperties().ldapServerType(); + } + + /** + * Set the ldapServerType property: Specifies the type of LDAP server for a given NFS volume. + * + * @param ldapServerType the ldapServerType value to set. + * @return the VolumeGroupVolumeProperties object itself. + */ + public VolumeGroupVolumeProperties withLdapServerType(LdapServerType ldapServerType) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withLdapServerType(ldapServerType); + return this; + } + /** * Get the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume. * @@ -1289,6 +1316,37 @@ public VolumeGroupVolumeProperties withIsLargeVolume(Boolean isLargeVolume) { return this; } + /** + * Get the largeVolumeType property: Specifies the type of the Large Volume. When set to 'LargeVolume', the large + * volume is created with standard configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit 7.2PiB + * with cool access enabled, + * delivering higher capacity limit with lower costs. + * + * @return the largeVolumeType value. + */ + public LargeVolumeType largeVolumeType() { + return this.innerProperties() == null ? null : this.innerProperties().largeVolumeType(); + } + + /** + * Set the largeVolumeType property: Specifies the type of the Large Volume. When set to 'LargeVolume', the large + * volume is created with standard configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit 7.2PiB + * with cool access enabled, + * delivering higher capacity limit with lower costs. + * + * @param largeVolumeType the largeVolumeType value to set. + * @return the VolumeGroupVolumeProperties object itself. + */ + public VolumeGroupVolumeProperties withLargeVolumeType(LargeVolumeType largeVolumeType) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withLargeVolumeType(largeVolumeType); + return this; + } + /** * Get the originatingResourceId property: Id of the snapshot or backup that the volume is restored from. * @@ -1307,6 +1365,52 @@ public Long inheritedSizeInBytes() { return this.innerProperties() == null ? null : this.innerProperties().inheritedSizeInBytes(); } + /** + * Get the language property: Language supported for volume. + * + * @return the language value. + */ + public VolumeLanguage language() { + return this.innerProperties() == null ? null : this.innerProperties().language(); + } + + /** + * Set the language property: Language supported for volume. + * + * @param language the language value to set. + * @return the VolumeGroupVolumeProperties object itself. + */ + public VolumeGroupVolumeProperties withLanguage(VolumeLanguage language) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withLanguage(language); + return this; + } + + /** + * Get the breakthroughMode property: Specifies whether the volume operates in Breakthrough Mode. + * + * @return the breakthroughMode value. + */ + public BreakthroughMode breakthroughMode() { + return this.innerProperties() == null ? null : this.innerProperties().breakthroughMode(); + } + + /** + * Set the breakthroughMode property: Specifies whether the volume operates in Breakthrough Mode. + * + * @param breakthroughMode the breakthroughMode value to set. + * @return the VolumeGroupVolumeProperties object itself. + */ + public VolumeGroupVolumeProperties withBreakthroughMode(BreakthroughMode breakthroughMode) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withBreakthroughMode(breakthroughMode); + return this; + } + /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeLanguage.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeLanguage.java new file mode 100644 index 000000000000..77295242a6f1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeLanguage.java @@ -0,0 +1,386 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Language supported for volume. + */ +public final class VolumeLanguage extends ExpandableStringEnum<VolumeLanguage> { + /** + * Posix with UTF-8. + */ + public static final VolumeLanguage C_UTF_8 = fromString("c.utf-8"); + + /** + * UTF-8 with 4 byte character support. + */ + public static final VolumeLanguage UTF8MB4 = fromString("utf8mb4"); + + /** + * Arabic - Deprecated. + */ + public static final VolumeLanguage AR = fromString("ar"); + + /** + * Arabic with UTF-8. + */ + public static final VolumeLanguage AR_UTF_8 = fromString("ar.utf-8"); + + /** + * Croatian - Deprecated. + */ + public static final VolumeLanguage HR = fromString("hr"); + + /** + * Croatian with UTF-8. + */ + public static final VolumeLanguage HR_UTF_8 = fromString("hr.utf-8"); + + /** + * Czech - Deprecated. + */ + public static final VolumeLanguage CS = fromString("cs"); + + /** + * Czech with UTF-8. + */ + public static final VolumeLanguage CS_UTF_8 = fromString("cs.utf-8"); + + /** + * Danish - Deprecated. + */ + public static final VolumeLanguage DA = fromString("da"); + + /** + * Danish with UTF-8. + */ + public static final VolumeLanguage DA_UTF_8 = fromString("da.utf-8"); + + /** + * Dutch - Deprecated. + */ + public static final VolumeLanguage NL = fromString("nl"); + + /** + * Dutch with UTF-8. + */ + public static final VolumeLanguage NL_UTF_8 = fromString("nl.utf-8"); + + /** + * English - Deprecated. + */ + public static final VolumeLanguage EN = fromString("en"); + + /** + * English with UTF-8. + */ + public static final VolumeLanguage EN_UTF_8 = fromString("en.utf-8"); + + /** + * Finnish - Deprecated. + */ + public static final VolumeLanguage FI = fromString("fi"); + + /** + * Finnish with UTF-8. + */ + public static final VolumeLanguage FI_UTF_8 = fromString("fi.utf-8"); + + /** + * French - Deprecated. + */ + public static final VolumeLanguage FR = fromString("fr"); + + /** + * French with UTF-8. + */ + public static final VolumeLanguage FR_UTF_8 = fromString("fr.utf-8"); + + /** + * German - Deprecated. + */ + public static final VolumeLanguage DE = fromString("de"); + + /** + * German with UTF-8. + */ + public static final VolumeLanguage DE_UTF_8 = fromString("de.utf-8"); + + /** + * Hebrew - Deprecated. + */ + public static final VolumeLanguage HE = fromString("he"); + + /** + * Hebrew with UTF-8. + */ + public static final VolumeLanguage HE_UTF_8 = fromString("he.utf-8"); + + /** + * Hungarian - Deprecated. + */ + public static final VolumeLanguage HU = fromString("hu"); + + /** + * Hungarian with UTF-8. + */ + public static final VolumeLanguage HU_UTF_8 = fromString("hu.utf-8"); + + /** + * Italian - Deprecated. + */ + public static final VolumeLanguage IT = fromString("it"); + + /** + * Italian with UTF-8. + */ + public static final VolumeLanguage IT_UTF_8 = fromString("it.utf-8"); + + /** + * Japanese euc-j - Deprecated. + */ + public static final VolumeLanguage JA = fromString("ja"); + + /** + * Japanese euc-j with UTF-8. + */ + public static final VolumeLanguage JA_UTF_8 = fromString("ja.utf-8"); + + /** + * Japanese euc-j - Deprecated. + */ + public static final VolumeLanguage JA_V1 = fromString("ja-v1"); + + /** + * Japanese euc-j with UTF-8. + */ + public static final VolumeLanguage JA_V1_UTF_8 = fromString("ja-v1.utf-8"); + + /** + * Japanese pck. + */ + public static final VolumeLanguage JA_JP_PCK = fromString("ja-jp.pck"); + + /** + * Japanese pck with UTF-8 - Deprecated. + */ + public static final VolumeLanguage JA_JP_PCK_UTF_8 = fromString("ja-jp.pck.utf-8"); + + /** + * Japanese cp932. + */ + public static final VolumeLanguage JA_JP_932 = fromString("ja-jp.932"); + + /** + * Japanese cp932 with UTF-8 - Deprecated. + */ + public static final VolumeLanguage JA_JP_932_UTF_8 = fromString("ja-jp.932.utf-8"); + + /** + * Japanese pck - sjis. + */ + public static final VolumeLanguage JA_JP_PCK_V2 = fromString("ja-jp.pck-v2"); + + /** + * Japanese pck - sjis with UTF-8 - Deprecated. + */ + public static final VolumeLanguage JA_JP_PCK_V2_UTF_8 = fromString("ja-jp.pck-v2.utf-8"); + + /** + * Korean - Deprecated. + */ + public static final VolumeLanguage KO = fromString("ko"); + + /** + * Korean with UTF-8. + */ + public static final VolumeLanguage KO_UTF_8 = fromString("ko.utf-8"); + + /** + * Norwegian - Deprecated. + */ + public static final VolumeLanguage NO = fromString("no"); + + /** + * Norwegian with UTF-8. + */ + public static final VolumeLanguage NO_UTF_8 = fromString("no.utf-8"); + + /** + * Polish - Deprecated. + */ + public static final VolumeLanguage PL = fromString("pl"); + + /** + * Polish with UTF-8. + */ + public static final VolumeLanguage PL_UTF_8 = fromString("pl.utf-8"); + + /** + * Portuguese - Deprecated. + */ + public static final VolumeLanguage PT = fromString("pt"); + + /** + * Portuguese with UTF-8. + */ + public static final VolumeLanguage PT_UTF_8 = fromString("pt.utf-8"); + + /** + * Posix - Deprecated. + */ + public static final VolumeLanguage C = fromString("c"); + + /** + * Romanian - Deprecated. + */ + public static final VolumeLanguage RO = fromString("ro"); + + /** + * Romanian with UTF-8. + */ + public static final VolumeLanguage RO_UTF_8 = fromString("ro.utf-8"); + + /** + * Russian - Deprecated. + */ + public static final VolumeLanguage RU = fromString("ru"); + + /** + * Russian with UTF-8. + */ + public static final VolumeLanguage RU_UTF_8 = fromString("ru.utf-8"); + + /** + * Simplified Chinese - Deprecated. + */ + public static final VolumeLanguage ZH = fromString("zh"); + + /** + * Simplified Chinese with UTF-8. + */ + public static final VolumeLanguage ZH_UTF_8 = fromString("zh.utf-8"); + + /** + * Simplified gbk Chinese. + */ + public static final VolumeLanguage ZH_GBK = fromString("zh.gbk"); + + /** + * Simplified gbk Chinese with UTF-8 - Deprecated. + */ + public static final VolumeLanguage ZH_GBK_UTF_8 = fromString("zh.gbk.utf-8"); + + /** + * Traditional Chinese BIG 5. + */ + public static final VolumeLanguage ZH_TW_BIG5 = fromString("zh-tw.big5"); + + /** + * Traditional Chinese BIG 5 with UTF-8 - Deprecated. + */ + public static final VolumeLanguage ZH_TW_BIG5_UTF_8 = fromString("zh-tw.big5.utf-8"); + + /** + * Traditional Chinese EUC-TW. + */ + public static final VolumeLanguage ZH_TW = fromString("zh-tw"); + + /** + * Traditional Chinese EUC-TW with UTF-8 - Deprecated. + */ + public static final VolumeLanguage ZH_TW_UTF_8 = fromString("zh-tw.utf-8"); + + /** + * Slovak - Deprecated. + */ + public static final VolumeLanguage SK = fromString("sk"); + + /** + * Slovak with UTF-8. + */ + public static final VolumeLanguage SK_UTF_8 = fromString("sk.utf-8"); + + /** + * Slovenian - Deprecated. + */ + public static final VolumeLanguage SL = fromString("sl"); + + /** + * Slovenian with UTF-8. + */ + public static final VolumeLanguage SL_UTF_8 = fromString("sl.utf-8"); + + /** + * Spanish - Deprecated. + */ + public static final VolumeLanguage ES = fromString("es"); + + /** + * Spanish with UTF-8. + */ + public static final VolumeLanguage ES_UTF_8 = fromString("es.utf-8"); + + /** + * Swedish - Deprecated. + */ + public static final VolumeLanguage SV = fromString("sv"); + + /** + * Swedish with UTF-8. + */ + public static final VolumeLanguage SV_UTF_8 = fromString("sv.utf-8"); + + /** + * Turkish - Deprecated. + */ + public static final VolumeLanguage TR = fromString("tr"); + + /** + * Turkish with UTF-8. + */ + public static final VolumeLanguage TR_UTF_8 = fromString("tr.utf-8"); + + /** + * US English - Deprecated. + */ + public static final VolumeLanguage EN_US = fromString("en-us"); + + /** + * US English with UTF-8. + */ + public static final VolumeLanguage EN_US_UTF_8 = fromString("en-us.utf-8"); + + /** + * Creates a new instance of VolumeLanguage value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VolumeLanguage() { + } + + /** + * Creates or finds a VolumeLanguage from its string representation. + * + * @param name a name to look for. + * @return the corresponding VolumeLanguage. + */ + public static VolumeLanguage fromString(String name) { + return fromString(name, VolumeLanguage.class); + } + + /** + * Gets known VolumeLanguage values. + * + * @return known VolumeLanguage values. + */ + public static Collection<VolumeLanguage> values() { + return values(VolumeLanguage.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java index d9b8f7747497..1550c3dc8ec5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java @@ -156,9 +156,11 @@ public VolumePatch withServiceLevel(ServiceLevel serviceLevel) { /** * Get the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @return the usageThreshold value. */ @@ -168,9 +170,11 @@ public Long usageThreshold() { /** * Set the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @param usageThreshold the usageThreshold value to set. * @return the VolumePatch object itself. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java index b2900cb2db3c..41f394d9bb25 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java @@ -27,6 +27,11 @@ public final class VolumePatchPropertiesDataProtection */ private VolumeSnapshotProperties snapshot; + /* + * Advanced Ransomware Protection updatable settings + */ + private RansomwareProtectionPatchSettings ransomwareProtection; + /** * Creates an instance of VolumePatchPropertiesDataProtection class. */ @@ -73,6 +78,27 @@ public VolumePatchPropertiesDataProtection withSnapshot(VolumeSnapshotProperties return this; } + /** + * Get the ransomwareProtection property: Advanced Ransomware Protection updatable settings. + * + * @return the ransomwareProtection value. + */ + public RansomwareProtectionPatchSettings ransomwareProtection() { + return this.ransomwareProtection; + } + + /** + * Set the ransomwareProtection property: Advanced Ransomware Protection updatable settings. + * + * @param ransomwareProtection the ransomwareProtection value to set. + * @return the VolumePatchPropertiesDataProtection object itself. + */ + public VolumePatchPropertiesDataProtection + withRansomwareProtection(RansomwareProtectionPatchSettings ransomwareProtection) { + this.ransomwareProtection = ransomwareProtection; + return this; + } + /** * Validates the instance. * @@ -85,6 +111,9 @@ public void validate() { if (snapshot() != null) { snapshot().validate(); } + if (ransomwareProtection() != null) { + ransomwareProtection().validate(); + } } /** @@ -95,6 +124,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("backup", this.backup); jsonWriter.writeJsonField("snapshot", this.snapshot); + jsonWriter.writeJsonField("ransomwareProtection", this.ransomwareProtection); return jsonWriter.writeEndObject(); } @@ -119,6 +149,9 @@ public static VolumePatchPropertiesDataProtection fromJson(JsonReader jsonReader } else if ("snapshot".equals(fieldName)) { deserializedVolumePatchPropertiesDataProtection.snapshot = VolumeSnapshotProperties.fromJson(reader); + } else if ("ransomwareProtection".equals(fieldName)) { + deserializedVolumePatchPropertiesDataProtection.ransomwareProtection + = RansomwareProtectionPatchSettings.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java index 6371c236005b..8567cbf98f32 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java @@ -36,6 +36,11 @@ public final class VolumePropertiesDataProtection implements JsonSerializable<Vo */ private VolumeRelocationProperties volumeRelocation; + /* + * Advanced Ransomware Protection settings + */ + private RansomwareProtectionSettings ransomwareProtection; + /** * Creates an instance of VolumePropertiesDataProtection class. */ @@ -122,6 +127,26 @@ public VolumePropertiesDataProtection withVolumeRelocation(VolumeRelocationPrope return this; } + /** + * Get the ransomwareProtection property: Advanced Ransomware Protection settings. + * + * @return the ransomwareProtection value. + */ + public RansomwareProtectionSettings ransomwareProtection() { + return this.ransomwareProtection; + } + + /** + * Set the ransomwareProtection property: Advanced Ransomware Protection settings. + * + * @param ransomwareProtection the ransomwareProtection value to set. + * @return the VolumePropertiesDataProtection object itself. + */ + public VolumePropertiesDataProtection withRansomwareProtection(RansomwareProtectionSettings ransomwareProtection) { + this.ransomwareProtection = ransomwareProtection; + return this; + } + /** * Validates the instance. * @@ -140,6 +165,9 @@ public void validate() { if (volumeRelocation() != null) { volumeRelocation().validate(); } + if (ransomwareProtection() != null) { + ransomwareProtection().validate(); + } } /** @@ -152,6 +180,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("replication", this.replication); jsonWriter.writeJsonField("snapshot", this.snapshot); jsonWriter.writeJsonField("volumeRelocation", this.volumeRelocation); + jsonWriter.writeJsonField("ransomwareProtection", this.ransomwareProtection); return jsonWriter.writeEndObject(); } @@ -180,6 +209,9 @@ public static VolumePropertiesDataProtection fromJson(JsonReader jsonReader) thr } else if ("volumeRelocation".equals(fieldName)) { deserializedVolumePropertiesDataProtection.volumeRelocation = VolumeRelocationProperties.fromJson(reader); + } else if ("ransomwareProtection".equals(fieldName)) { + deserializedVolumePropertiesDataProtection.ransomwareProtection + = RansomwareProtectionSettings.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSize.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSize.java new file mode 100644 index 000000000000..be50c34ba00d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSize.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Volume size for backup. + */ +public final class VolumeSize extends ExpandableStringEnum<VolumeSize> { + /** + * Value indicating backup is for a large volume. + */ + public static final VolumeSize LARGE = fromString("Large"); + + /** + * Value indicating backup is not for a large volume. + */ + public static final VolumeSize REGULAR = fromString("Regular"); + + /** + * Creates a new instance of VolumeSize value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VolumeSize() { + } + + /** + * Creates or finds a VolumeSize from its string representation. + * + * @param name a name to look for. + * @return the corresponding VolumeSize. + */ + public static VolumeSize fromString(String name) { + return fromString(name, VolumeSize.class); + } + + /** + * Gets known VolumeSize values. + * + * @return known VolumeSize values. + */ + public static Collection<VolumeSize> values() { + return values(VolumeSize.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java index 23ebc1c5ae84..ac96789039a7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java @@ -761,6 +761,37 @@ void finalizeRelocation(String resourceGroupName, String accountName, String poo void revertRelocation(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ListQuotaReportResponse listQuotaReport(String resourceGroupName, String accountName, String poolName, + String volumeName); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ListQuotaReportResponse listQuotaReport(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context); + /** * Get the details of the specified volume. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_apiview_properties.json b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_apiview_properties.json index 27343d5ef010..0eef4a5f275f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_apiview_properties.json +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_apiview_properties.json @@ -20,6 +20,17 @@ "com.azure.resourcemanager.netapp.fluent.AccountsClient.renewCredentials": "Microsoft.NetApp.NetAppAccounts.renewCredentials", "com.azure.resourcemanager.netapp.fluent.AccountsClient.transitionToCmk": "Microsoft.NetApp.NetAppAccounts.transitionToCmk", "com.azure.resourcemanager.netapp.fluent.AccountsClient.update": "Microsoft.NetApp.NetAppAccounts.update", + "com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient": "Microsoft.NetApp.ActiveDirectoryConfigs", + "com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.beginCreateOrUpdate": "Microsoft.NetApp.ActiveDirectoryConfigs.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.beginDelete": "Microsoft.NetApp.ActiveDirectoryConfigs.delete", + "com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.beginUpdate": "Microsoft.NetApp.ActiveDirectoryConfigs.update", + "com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.createOrUpdate": "Microsoft.NetApp.ActiveDirectoryConfigs.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.delete": "Microsoft.NetApp.ActiveDirectoryConfigs.delete", + "com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.getByResourceGroup": "Microsoft.NetApp.ActiveDirectoryConfigs.get", + "com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.getByResourceGroupWithResponse": "Microsoft.NetApp.ActiveDirectoryConfigs.get", + "com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.list": "Microsoft.NetApp.ActiveDirectoryConfigs.listBySubscription", + "com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.listByResourceGroup": "Microsoft.NetApp.ActiveDirectoryConfigs.listByResourceGroup", + "com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.update": "Microsoft.NetApp.ActiveDirectoryConfigs.update", "com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient": "Microsoft.NetApp.BackupPolicies", "com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginCreate": "Microsoft.NetApp.BackupPolicies.create", "com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginDelete": "Microsoft.NetApp.BackupPolicies.delete", @@ -63,6 +74,118 @@ "com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient": "Microsoft.NetApp", "com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient.beginMigrateBackups": "Microsoft.NetApp.Volumes.migrateBackups", "com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient.migrateBackups": "Microsoft.NetApp.Volumes.migrateBackups", + "com.azure.resourcemanager.netapp.fluent.BucketsClient": "Microsoft.NetApp.Buckets", + "com.azure.resourcemanager.netapp.fluent.BucketsClient.beginCreateOrUpdate": "Microsoft.NetApp.Buckets.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.BucketsClient.beginDelete": "Microsoft.NetApp.Buckets.delete", + "com.azure.resourcemanager.netapp.fluent.BucketsClient.beginUpdate": "Microsoft.NetApp.Buckets.update", + "com.azure.resourcemanager.netapp.fluent.BucketsClient.createOrUpdate": "Microsoft.NetApp.Buckets.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.BucketsClient.delete": "Microsoft.NetApp.Buckets.delete", + "com.azure.resourcemanager.netapp.fluent.BucketsClient.generateCredentials": "Microsoft.NetApp.Buckets.generateCredentials", + "com.azure.resourcemanager.netapp.fluent.BucketsClient.generateCredentialsWithResponse": "Microsoft.NetApp.Buckets.generateCredentials", + "com.azure.resourcemanager.netapp.fluent.BucketsClient.get": "Microsoft.NetApp.Buckets.get", + "com.azure.resourcemanager.netapp.fluent.BucketsClient.getWithResponse": "Microsoft.NetApp.Buckets.get", + "com.azure.resourcemanager.netapp.fluent.BucketsClient.list": "Microsoft.NetApp.Buckets.list", + "com.azure.resourcemanager.netapp.fluent.BucketsClient.update": "Microsoft.NetApp.Buckets.update", + "com.azure.resourcemanager.netapp.fluent.CachesClient": "Microsoft.NetApp.Caches", + "com.azure.resourcemanager.netapp.fluent.CachesClient.beginCreateOrUpdate": "Microsoft.NetApp.Caches.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.CachesClient.beginDelete": "Microsoft.NetApp.Caches.delete", + "com.azure.resourcemanager.netapp.fluent.CachesClient.beginPoolChange": "Microsoft.NetApp.Caches.poolChange", + "com.azure.resourcemanager.netapp.fluent.CachesClient.beginUpdate": "Microsoft.NetApp.Caches.update", + "com.azure.resourcemanager.netapp.fluent.CachesClient.createOrUpdate": "Microsoft.NetApp.Caches.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.CachesClient.delete": "Microsoft.NetApp.Caches.delete", + "com.azure.resourcemanager.netapp.fluent.CachesClient.get": "Microsoft.NetApp.Caches.get", + "com.azure.resourcemanager.netapp.fluent.CachesClient.getWithResponse": "Microsoft.NetApp.Caches.get", + "com.azure.resourcemanager.netapp.fluent.CachesClient.listByCapacityPools": "Microsoft.NetApp.Caches.listByCapacityPools", + "com.azure.resourcemanager.netapp.fluent.CachesClient.listPeeringPassphrases": "Microsoft.NetApp.Caches.listPeeringPassphrases", + "com.azure.resourcemanager.netapp.fluent.CachesClient.listPeeringPassphrasesWithResponse": "Microsoft.NetApp.Caches.listPeeringPassphrases", + "com.azure.resourcemanager.netapp.fluent.CachesClient.poolChange": "Microsoft.NetApp.Caches.poolChange", + "com.azure.resourcemanager.netapp.fluent.CachesClient.update": "Microsoft.NetApp.Caches.update", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient": "Microsoft.NetApp.ElasticAccounts", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginCreateOrUpdate": "Microsoft.NetApp.ElasticAccounts.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginDelete": "Microsoft.NetApp.ElasticAccounts.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginUpdate": "Microsoft.NetApp.ElasticAccounts.update", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.createOrUpdate": "Microsoft.NetApp.ElasticAccounts.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.delete": "Microsoft.NetApp.ElasticAccounts.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.getByResourceGroup": "Microsoft.NetApp.ElasticAccounts.get", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.getByResourceGroupWithResponse": "Microsoft.NetApp.ElasticAccounts.get", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.list": "Microsoft.NetApp.ElasticAccounts.listBySubscription", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.listByResourceGroup": "Microsoft.NetApp.ElasticAccounts.listByResourceGroup", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.update": "Microsoft.NetApp.ElasticAccounts.update", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient": "Microsoft.NetApp.ElasticBackupPolicies", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginCreateOrUpdate": "Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginDelete": "Microsoft.NetApp.ElasticBackupPolicies.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginUpdate": "Microsoft.NetApp.ElasticBackupPolicies.update", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.createOrUpdate": "Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.delete": "Microsoft.NetApp.ElasticBackupPolicies.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.get": "Microsoft.NetApp.ElasticBackupPolicies.get", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.getWithResponse": "Microsoft.NetApp.ElasticBackupPolicies.get", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.listByElasticAccount": "Microsoft.NetApp.ElasticBackupPolicies.listByElasticAccount", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.update": "Microsoft.NetApp.ElasticBackupPolicies.update", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient": "Microsoft.NetApp.ElasticBackupVaults", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginCreateOrUpdate": "Microsoft.NetApp.ElasticBackupVaults.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginDelete": "Microsoft.NetApp.ElasticBackupVaults.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginUpdate": "Microsoft.NetApp.ElasticBackupVaults.update", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.createOrUpdate": "Microsoft.NetApp.ElasticBackupVaults.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.delete": "Microsoft.NetApp.ElasticBackupVaults.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.get": "Microsoft.NetApp.ElasticBackupVaults.get", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.getWithResponse": "Microsoft.NetApp.ElasticBackupVaults.get", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.listByElasticAccount": "Microsoft.NetApp.ElasticBackupVaults.listByElasticAccount", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.update": "Microsoft.NetApp.ElasticBackupVaults.update", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient": "Microsoft.NetApp.ElasticBackups", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginCreateOrUpdate": "Microsoft.NetApp.ElasticBackups.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginDelete": "Microsoft.NetApp.ElasticBackups.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginUpdate": "Microsoft.NetApp.ElasticBackups.update", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.createOrUpdate": "Microsoft.NetApp.ElasticBackups.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.delete": "Microsoft.NetApp.ElasticBackups.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.get": "Microsoft.NetApp.ElasticBackups.get", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.getWithResponse": "Microsoft.NetApp.ElasticBackups.get", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.listByVault": "Microsoft.NetApp.ElasticBackups.listByVault", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.update": "Microsoft.NetApp.ElasticBackups.update", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient": "Microsoft.NetApp.ElasticCapacityPools", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginChangeZone": "Microsoft.NetApp.ElasticCapacityPools.changeZone", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginCreateOrUpdate": "Microsoft.NetApp.ElasticCapacityPools.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginDelete": "Microsoft.NetApp.ElasticCapacityPools.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginUpdate": "Microsoft.NetApp.ElasticCapacityPools.update", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.changeZone": "Microsoft.NetApp.ElasticCapacityPools.changeZone", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.checkVolumeFilePathAvailability": "Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.checkVolumeFilePathAvailabilityWithResponse": "Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.createOrUpdate": "Microsoft.NetApp.ElasticCapacityPools.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.delete": "Microsoft.NetApp.ElasticCapacityPools.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.get": "Microsoft.NetApp.ElasticCapacityPools.get", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.getWithResponse": "Microsoft.NetApp.ElasticCapacityPools.get", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.listByElasticAccount": "Microsoft.NetApp.ElasticCapacityPools.listByElasticAccount", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.update": "Microsoft.NetApp.ElasticCapacityPools.update", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient": "Microsoft.NetApp.ElasticSnapshotPolicies", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginCreateOrUpdate": "Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginDelete": "Microsoft.NetApp.ElasticSnapshotPolicies.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginUpdate": "Microsoft.NetApp.ElasticSnapshotPolicies.update", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.createOrUpdate": "Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.delete": "Microsoft.NetApp.ElasticSnapshotPolicies.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.get": "Microsoft.NetApp.ElasticSnapshotPolicies.get", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.getWithResponse": "Microsoft.NetApp.ElasticSnapshotPolicies.get", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.listByElasticAccount": "Microsoft.NetApp.ElasticSnapshotPolicies.listByElasticAccount", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.listElasticVolumes": "Microsoft.NetApp.ElasticSnapshotPolicies.listElasticVolumes", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.update": "Microsoft.NetApp.ElasticSnapshotPolicies.update", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient": "Microsoft.NetApp.ElasticSnapshots", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.beginCreateOrUpdate": "Microsoft.NetApp.ElasticSnapshots.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.beginDelete": "Microsoft.NetApp.ElasticSnapshots.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.createOrUpdate": "Microsoft.NetApp.ElasticSnapshots.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.delete": "Microsoft.NetApp.ElasticSnapshots.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.get": "Microsoft.NetApp.ElasticSnapshots.get", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.getWithResponse": "Microsoft.NetApp.ElasticSnapshots.get", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.listByElasticVolume": "Microsoft.NetApp.ElasticSnapshots.listByElasticVolume", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient": "Microsoft.NetApp.ElasticVolumes", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginCreateOrUpdate": "Microsoft.NetApp.ElasticVolumes.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginDelete": "Microsoft.NetApp.ElasticVolumes.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginRevert": "Microsoft.NetApp.ElasticVolumes.revert", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginUpdate": "Microsoft.NetApp.ElasticVolumes.update", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.createOrUpdate": "Microsoft.NetApp.ElasticVolumes.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.delete": "Microsoft.NetApp.ElasticVolumes.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.get": "Microsoft.NetApp.ElasticVolumes.get", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.getWithResponse": "Microsoft.NetApp.ElasticVolumes.get", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.listByElasticPool": "Microsoft.NetApp.ElasticVolumes.listByElasticPool", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.revert": "Microsoft.NetApp.ElasticVolumes.revert", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.update": "Microsoft.NetApp.ElasticVolumes.update", "com.azure.resourcemanager.netapp.fluent.NetAppManagementClient": "Microsoft.NetApp", "com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient": "Microsoft.NetApp.NetAppResourceQuotaLimitsAccount", "com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.get": "Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.get", @@ -105,6 +228,12 @@ "com.azure.resourcemanager.netapp.fluent.PoolsClient.getWithResponse": "Microsoft.NetApp.CapacityPools.get", "com.azure.resourcemanager.netapp.fluent.PoolsClient.list": "Microsoft.NetApp.CapacityPools.list", "com.azure.resourcemanager.netapp.fluent.PoolsClient.update": "Microsoft.NetApp.CapacityPools.update", + "com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient": "Microsoft.NetApp.RansomwareReports", + "com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.beginClearSuspects": "Microsoft.NetApp.RansomwareReports.clearSuspects", + "com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.clearSuspects": "Microsoft.NetApp.RansomwareReports.clearSuspects", + "com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.get": "Microsoft.NetApp.RansomwareReports.get", + "com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.getWithResponse": "Microsoft.NetApp.RansomwareReports.get", + "com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.list": "Microsoft.NetApp.RansomwareReports.list", "com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient": "Microsoft.NetApp.SnapshotPolicies", "com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.beginDelete": "Microsoft.NetApp.SnapshotPolicies.delete", "com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.beginUpdate": "Microsoft.NetApp.SnapshotPolicies.update", @@ -170,6 +299,7 @@ "com.azure.resourcemanager.netapp.fluent.VolumesClient.beginFinalizeExternalReplication": "Microsoft.NetApp.Volumes.finalizeExternalReplication", "com.azure.resourcemanager.netapp.fluent.VolumesClient.beginFinalizeRelocation": "Microsoft.NetApp.Volumes.finalizeRelocation", "com.azure.resourcemanager.netapp.fluent.VolumesClient.beginListGetGroupIdListForLdapUser": "Microsoft.NetApp.Volumes.listGetGroupIdListForLdapUser", + "com.azure.resourcemanager.netapp.fluent.VolumesClient.beginListQuotaReport": "Microsoft.NetApp.Volumes.listQuotaReport", "com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPeerExternalCluster": "Microsoft.NetApp.Volumes.peerExternalCluster", "com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPerformReplicationTransfer": "Microsoft.NetApp.Volumes.performReplicationTransfer", "com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPoolChange": "Microsoft.NetApp.Volumes.poolChange", @@ -194,6 +324,7 @@ "com.azure.resourcemanager.netapp.fluent.VolumesClient.getWithResponse": "Microsoft.NetApp.Volumes.get", "com.azure.resourcemanager.netapp.fluent.VolumesClient.list": "Microsoft.NetApp.Volumes.list", "com.azure.resourcemanager.netapp.fluent.VolumesClient.listGetGroupIdListForLdapUser": "Microsoft.NetApp.Volumes.listGetGroupIdListForLdapUser", + "com.azure.resourcemanager.netapp.fluent.VolumesClient.listQuotaReport": "Microsoft.NetApp.Volumes.listQuotaReport", "com.azure.resourcemanager.netapp.fluent.VolumesClient.listReplications": "Microsoft.NetApp.Volumes.listReplications", "com.azure.resourcemanager.netapp.fluent.VolumesClient.peerExternalCluster": "Microsoft.NetApp.Volumes.peerExternalCluster", "com.azure.resourcemanager.netapp.fluent.VolumesClient.performReplicationTransfer": "Microsoft.NetApp.Volumes.performReplicationTransfer", @@ -211,6 +342,7 @@ "com.azure.resourcemanager.netapp.fluent.VolumesClient.splitCloneFromParent": "Microsoft.NetApp.Volumes.splitCloneFromParent", "com.azure.resourcemanager.netapp.fluent.VolumesClient.update": "Microsoft.NetApp.Volumes.update", "com.azure.resourcemanager.netapp.fluent.models.AccountProperties": "Microsoft.NetApp.AccountProperties", + "com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner": "Microsoft.NetApp.ActiveDirectoryConfig", "com.azure.resourcemanager.netapp.fluent.models.BackupInner": "Microsoft.NetApp.Backup", "com.azure.resourcemanager.netapp.fluent.models.BackupPatchProperties": "Microsoft.NetApp.BackupPatchProperties", "com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner": "Microsoft.NetApp.BackupPolicy", @@ -219,19 +351,36 @@ "com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner": "Microsoft.NetApp.BackupStatus", "com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner": "Microsoft.NetApp.BackupVault", "com.azure.resourcemanager.netapp.fluent.models.BackupVaultProperties": "Microsoft.NetApp.BackupVaultProperties", + "com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner": "Microsoft.NetApp.BucketGenerateCredentials", + "com.azure.resourcemanager.netapp.fluent.models.BucketInner": "Microsoft.NetApp.Bucket", + "com.azure.resourcemanager.netapp.fluent.models.BucketPatchProperties": "Microsoft.NetApp.BucketPatchProperties", + "com.azure.resourcemanager.netapp.fluent.models.BucketProperties": "Microsoft.NetApp.BucketProperties", + "com.azure.resourcemanager.netapp.fluent.models.CacheInner": "Microsoft.NetApp.Cache", "com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner": "Microsoft.NetApp.CapacityPool", "com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner": "Microsoft.NetApp.CheckAvailabilityResponse", + "com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner": "Microsoft.NetApp.CheckElasticResourceAvailabilityResponse", "com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner": "Microsoft.NetApp.ClusterPeerCommandResponse", + "com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner": "Microsoft.NetApp.ElasticAccount", + "com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner": "Microsoft.NetApp.ElasticBackup", + "com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner": "Microsoft.NetApp.ElasticBackupPolicy", + "com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner": "Microsoft.NetApp.ElasticBackupVault", + "com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner": "Microsoft.NetApp.ElasticCapacityPool", + "com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner": "Microsoft.NetApp.ElasticSnapshot", + "com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner": "Microsoft.NetApp.ElasticSnapshotPolicy", + "com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner": "Microsoft.NetApp.ElasticVolume", "com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner": "Microsoft.NetApp.GetGroupIdListForLdapUserResponse", "com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseInner": "Microsoft.NetApp.GetKeyVaultStatusResponse", "com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseProperties": "Microsoft.NetApp.GetKeyVaultStatusResponseProperties", + "com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner": "Microsoft.NetApp.ListQuotaReportResponse", "com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner": "Microsoft.NetApp.NetAppAccount", "com.azure.resourcemanager.netapp.fluent.models.NetworkSiblingSetInner": "Microsoft.NetApp.NetworkSiblingSet", "com.azure.resourcemanager.netapp.fluent.models.OperationInner": "Microsoft.NetApp.Operation", "com.azure.resourcemanager.netapp.fluent.models.OperationProperties": "Microsoft.NetApp.OperationProperties", + "com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner": "Microsoft.NetApp.PeeringPassphrases", "com.azure.resourcemanager.netapp.fluent.models.PoolPatchProperties": "Microsoft.NetApp.PoolPatchProperties", "com.azure.resourcemanager.netapp.fluent.models.PoolProperties": "Microsoft.NetApp.PoolProperties", "com.azure.resourcemanager.netapp.fluent.models.QuotaItemProperties": "Microsoft.NetApp.QuotaItemProperties", + "com.azure.resourcemanager.netapp.fluent.models.RansomwareReportInner": "Microsoft.NetApp.RansomwareReport", "com.azure.resourcemanager.netapp.fluent.models.RegionInfoInner": "Microsoft.NetApp.RegionInfo", "com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner": "Microsoft.NetApp.RegionInfoResource", "com.azure.resourcemanager.netapp.fluent.models.ReplicationInner": "Microsoft.NetApp.Replication", @@ -261,14 +410,27 @@ "com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner": "Microsoft.NetApp.VolumeQuotaRule", "com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRulesProperties": "Microsoft.NetApp.VolumeQuotaRulesProperties", "com.azure.resourcemanager.netapp.implementation.NetAppManagementClientBuilder": "Microsoft.NetApp", + "com.azure.resourcemanager.netapp.implementation.models.ActiveDirectoryConfigListResult": "Azure.ResourceManager.ResourceListResult", "com.azure.resourcemanager.netapp.implementation.models.BackupPoliciesList": "Microsoft.NetApp.BackupPoliciesList", "com.azure.resourcemanager.netapp.implementation.models.BackupVaultsList": "Microsoft.NetApp.BackupVaultsList", "com.azure.resourcemanager.netapp.implementation.models.BackupsList": "Microsoft.NetApp.BackupsList", + "com.azure.resourcemanager.netapp.implementation.models.BucketList": "Microsoft.NetApp.BucketList", + "com.azure.resourcemanager.netapp.implementation.models.CacheList": "Microsoft.NetApp.CacheList", "com.azure.resourcemanager.netapp.implementation.models.CapacityPoolList": "Microsoft.NetApp.CapacityPoolList", + "com.azure.resourcemanager.netapp.implementation.models.ElasticAccountListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.netapp.implementation.models.ElasticBackupListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.netapp.implementation.models.ElasticBackupPolicyListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.netapp.implementation.models.ElasticBackupVaultListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.netapp.implementation.models.ElasticCapacityPoolListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyVolumeList": "Microsoft.NetApp.ElasticSnapshotPolicyVolumeList", + "com.azure.resourcemanager.netapp.implementation.models.ElasticVolumeListResult": "Azure.ResourceManager.ResourceListResult", "com.azure.resourcemanager.netapp.implementation.models.ListReplications": "Microsoft.NetApp.ListReplications", "com.azure.resourcemanager.netapp.implementation.models.NetAppAccountList": "Microsoft.NetApp.NetAppAccountList", "com.azure.resourcemanager.netapp.implementation.models.OperationListResult": "Microsoft.NetApp.OperationListResult", "com.azure.resourcemanager.netapp.implementation.models.QuotaItemList": "Microsoft.NetApp.QuotaItemList", + "com.azure.resourcemanager.netapp.implementation.models.RansomwareReportsList": "Microsoft.NetApp.RansomwareReportsList", "com.azure.resourcemanager.netapp.implementation.models.RegionInfosList": "Microsoft.NetApp.RegionInfosList", "com.azure.resourcemanager.netapp.implementation.models.SnapshotPoliciesList": "Microsoft.NetApp.SnapshotPoliciesList", "com.azure.resourcemanager.netapp.implementation.models.SnapshotsList": "Microsoft.NetApp.SnapshotsList", @@ -280,7 +442,11 @@ "com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit": "Microsoft.NetApp.AcceptGrowCapacityPoolForShortTermCloneSplit", "com.azure.resourcemanager.netapp.models.AccountEncryption": "Microsoft.NetApp.AccountEncryption", "com.azure.resourcemanager.netapp.models.ActiveDirectory": "Microsoft.NetApp.ActiveDirectory", + "com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigProperties": "Microsoft.NetApp.ActiveDirectoryConfigProperties", + "com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", "com.azure.resourcemanager.netapp.models.ActiveDirectoryStatus": "Microsoft.NetApp.ActiveDirectoryStatus", + "com.azure.resourcemanager.netapp.models.ActualRansomwareProtectionState": "Microsoft.NetApp.ActualRansomwareProtectionState", "com.azure.resourcemanager.netapp.models.ApplicationType": "Microsoft.NetApp.ApplicationType", "com.azure.resourcemanager.netapp.models.AuthorizeRequest": "Microsoft.NetApp.AuthorizeRequest", "com.azure.resourcemanager.netapp.models.AvsDataStore": "Microsoft.NetApp.AvsDataStore", @@ -292,34 +458,117 @@ "com.azure.resourcemanager.netapp.models.BackupsMigrationRequest": "Microsoft.NetApp.BackupsMigrationRequest", "com.azure.resourcemanager.netapp.models.BreakFileLocksRequest": "Microsoft.NetApp.BreakFileLocksRequest", "com.azure.resourcemanager.netapp.models.BreakReplicationRequest": "Microsoft.NetApp.BreakReplicationRequest", + "com.azure.resourcemanager.netapp.models.BreakthroughMode": "Microsoft.NetApp.BreakthroughMode", + "com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry": "Microsoft.NetApp.BucketCredentialsExpiry", + "com.azure.resourcemanager.netapp.models.BucketPatch": "Microsoft.NetApp.BucketPatch", + "com.azure.resourcemanager.netapp.models.BucketPatchPermissions": "Microsoft.NetApp.BucketPatchPermissions", + "com.azure.resourcemanager.netapp.models.BucketPermissions": "Microsoft.NetApp.BucketPermissions", + "com.azure.resourcemanager.netapp.models.BucketServerPatchProperties": "Microsoft.NetApp.BucketServerPatchProperties", + "com.azure.resourcemanager.netapp.models.BucketServerProperties": "Microsoft.NetApp.BucketServerProperties", + "com.azure.resourcemanager.netapp.models.CacheLifeCycleState": "Microsoft.NetApp.CacheLifeCycleState", + "com.azure.resourcemanager.netapp.models.CacheMountTargetProperties": "Microsoft.NetApp.CacheMountTargetProperties", + "com.azure.resourcemanager.netapp.models.CacheProperties": "Microsoft.NetApp.CacheProperties", + "com.azure.resourcemanager.netapp.models.CacheProvisioningState": "Microsoft.NetApp.CacheProvisioningState", + "com.azure.resourcemanager.netapp.models.CacheUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "com.azure.resourcemanager.netapp.models.CacheUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", "com.azure.resourcemanager.netapp.models.CapacityPoolPatch": "Microsoft.NetApp.CapacityPoolPatch", "com.azure.resourcemanager.netapp.models.ChangeKeyVault": "Microsoft.NetApp.ChangeKeyVault", + "com.azure.resourcemanager.netapp.models.ChangeZoneRequest": "Microsoft.NetApp.ChangeZoneRequest", + "com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityReason": "Microsoft.NetApp.CheckElasticResourceAvailabilityReason", + "com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityStatus": "Microsoft.NetApp.CheckElasticResourceAvailabilityStatus", + "com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest": "Microsoft.NetApp.CheckElasticVolumeFilePathAvailabilityRequest", "com.azure.resourcemanager.netapp.models.CheckNameResourceTypes": "Microsoft.NetApp.CheckNameResourceTypes", "com.azure.resourcemanager.netapp.models.CheckQuotaNameResourceTypes": "Microsoft.NetApp.CheckQuotaNameResourceTypes", "com.azure.resourcemanager.netapp.models.ChownMode": "Microsoft.NetApp.ChownMode", + "com.azure.resourcemanager.netapp.models.CifsChangeNotifyState": "Microsoft.NetApp.CifsChangeNotifyState", + "com.azure.resourcemanager.netapp.models.CifsUser": "Microsoft.NetApp.CifsUser", "com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy": "Microsoft.NetApp.CoolAccessRetrievalPolicy", "com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy": "Microsoft.NetApp.CoolAccessTieringPolicy", + "com.azure.resourcemanager.netapp.models.CredentialsStatus": "Microsoft.NetApp.CredentialsStatus", "com.azure.resourcemanager.netapp.models.DailySchedule": "Microsoft.NetApp.DailySchedule", + "com.azure.resourcemanager.netapp.models.DayOfWeek": "Microsoft.NetApp.DayOfWeek", + "com.azure.resourcemanager.netapp.models.DesiredRansomwareProtectionState": "Microsoft.NetApp.DesiredRansomwareProtectionState", "com.azure.resourcemanager.netapp.models.DestinationReplication": "Microsoft.NetApp.DestinationReplication", "com.azure.resourcemanager.netapp.models.Dimension": "Microsoft.NetApp.Dimension", + "com.azure.resourcemanager.netapp.models.ElasticAccountProperties": "Microsoft.NetApp.ElasticAccountProperties", + "com.azure.resourcemanager.netapp.models.ElasticAccountUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "com.azure.resourcemanager.netapp.models.ElasticAccountUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties": "Microsoft.NetApp.ElasticBackupPolicyProperties", + "com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState": "Microsoft.NetApp.ElasticBackupPolicyState", + "com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "com.azure.resourcemanager.netapp.models.ElasticBackupProperties": "Microsoft.NetApp.ElasticBackupProperties", + "com.azure.resourcemanager.netapp.models.ElasticBackupType": "Microsoft.NetApp.ElasticBackupType", + "com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties": "Microsoft.NetApp.ElasticBackupVaultProperties", + "com.azure.resourcemanager.netapp.models.ElasticBackupVaultUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "com.azure.resourcemanager.netapp.models.ElasticCapacityPoolProperties": "Microsoft.NetApp.ElasticCapacityPoolProperties", + "com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "com.azure.resourcemanager.netapp.models.ElasticEncryption": "Microsoft.NetApp.ElasticEncryption", + "com.azure.resourcemanager.netapp.models.ElasticEncryptionConfiguration": "Microsoft.NetApp.ElasticEncryptionConfiguration", + "com.azure.resourcemanager.netapp.models.ElasticEncryptionIdentity": "Microsoft.NetApp.ElasticEncryptionIdentity", + "com.azure.resourcemanager.netapp.models.ElasticExportPolicy": "Microsoft.NetApp.ElasticExportPolicy", + "com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule": "Microsoft.NetApp.ElasticExportPolicyRule", + "com.azure.resourcemanager.netapp.models.ElasticKeyVaultProperties": "Microsoft.NetApp.ElasticKeyVaultProperties", + "com.azure.resourcemanager.netapp.models.ElasticKeyVaultStatus": "Microsoft.NetApp.ElasticKeyVaultStatus", + "com.azure.resourcemanager.netapp.models.ElasticMountTargetProperties": "Microsoft.NetApp.ElasticMountTargetProperties", + "com.azure.resourcemanager.netapp.models.ElasticNfsv3Access": "Microsoft.NetApp.ElasticNfsv3Access", + "com.azure.resourcemanager.netapp.models.ElasticNfsv4Access": "Microsoft.NetApp.ElasticNfsv4Access", + "com.azure.resourcemanager.netapp.models.ElasticPoolEncryptionKeySource": "Microsoft.NetApp.ElasticPoolEncryptionKeySource", + "com.azure.resourcemanager.netapp.models.ElasticProtocolType": "Microsoft.NetApp.ElasticProtocolType", + "com.azure.resourcemanager.netapp.models.ElasticResourceAvailabilityStatus": "Microsoft.NetApp.ElasticResourceAvailabilityStatus", + "com.azure.resourcemanager.netapp.models.ElasticRootAccess": "Microsoft.NetApp.ElasticRootAccess", + "com.azure.resourcemanager.netapp.models.ElasticServiceLevel": "Microsoft.NetApp.ElasticServiceLevel", + "com.azure.resourcemanager.netapp.models.ElasticSmbEncryption": "Microsoft.NetApp.ElasticSmbEncryption", + "com.azure.resourcemanager.netapp.models.ElasticSmbPatchProperties": "Microsoft.NetApp.ElasticSmbPatchProperties", + "com.azure.resourcemanager.netapp.models.ElasticSmbProperties": "Microsoft.NetApp.ElasticSmbProperties", + "com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule": "Microsoft.NetApp.ElasticSnapshotPolicyDailySchedule", + "com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule": "Microsoft.NetApp.ElasticSnapshotPolicyHourlySchedule", + "com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule": "Microsoft.NetApp.ElasticSnapshotPolicyMonthlySchedule", + "com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties": "Microsoft.NetApp.ElasticSnapshotPolicyProperties", + "com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule": "Microsoft.NetApp.ElasticSnapshotPolicyWeeklySchedule", + "com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties": "Microsoft.NetApp.ElasticSnapshotProperties", + "com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule": "Microsoft.NetApp.ElasticUnixAccessRule", + "com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties": "Microsoft.NetApp.ElasticVolumeBackupProperties", + "com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionPatchProperties": "Microsoft.NetApp.ElasticVolumeDataProtectionPatchProperties", + "com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties": "Microsoft.NetApp.ElasticVolumeDataProtectionProperties", + "com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement": "Microsoft.NetApp.ElasticVolumePolicyEnforcement", + "com.azure.resourcemanager.netapp.models.ElasticVolumeProperties": "Microsoft.NetApp.ElasticVolumeProperties", + "com.azure.resourcemanager.netapp.models.ElasticVolumeRestorationState": "Microsoft.NetApp.ElasticVolumeRestorationState", + "com.azure.resourcemanager.netapp.models.ElasticVolumeRevert": "Microsoft.NetApp.ElasticVolumeRevert", + "com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties": "Microsoft.NetApp.ElasticVolumeSnapshotProperties", + "com.azure.resourcemanager.netapp.models.ElasticVolumeUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", "com.azure.resourcemanager.netapp.models.EnableSubvolumes": "Microsoft.NetApp.EnableSubvolumes", + "com.azure.resourcemanager.netapp.models.EnableWriteBackState": "Microsoft.NetApp.EnableWriteBackState", "com.azure.resourcemanager.netapp.models.EncryptionIdentity": "Microsoft.NetApp.EncryptionIdentity", "com.azure.resourcemanager.netapp.models.EncryptionKeySource": "Microsoft.NetApp.EncryptionKeySource", + "com.azure.resourcemanager.netapp.models.EncryptionState": "Microsoft.NetApp.EncryptionState", "com.azure.resourcemanager.netapp.models.EncryptionTransitionRequest": "Microsoft.NetApp.EncryptionTransitionRequest", "com.azure.resourcemanager.netapp.models.EncryptionType": "Microsoft.NetApp.EncryptionType", "com.azure.resourcemanager.netapp.models.EndpointType": "Microsoft.NetApp.EndpointType", "com.azure.resourcemanager.netapp.models.Exclude": "Microsoft.NetApp.Exclude", "com.azure.resourcemanager.netapp.models.ExportPolicyRule": "Microsoft.NetApp.ExportPolicyRule", + "com.azure.resourcemanager.netapp.models.ExternalReplicationSetupStatus": "Microsoft.NetApp.ExternalReplicationSetupStatus", "com.azure.resourcemanager.netapp.models.FileAccessLogs": "Microsoft.NetApp.FileAccessLogs", "com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest": "Microsoft.NetApp.FilePathAvailabilityRequest", + "com.azure.resourcemanager.netapp.models.FileSystemUser": "Microsoft.NetApp.FileSystemUser", "com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest": "Microsoft.NetApp.GetGroupIdListForLdapUserRequest", + "com.azure.resourcemanager.netapp.models.GlobalFileLockingState": "Microsoft.NetApp.GlobalFileLockingState", "com.azure.resourcemanager.netapp.models.HourlySchedule": "Microsoft.NetApp.HourlySchedule", "com.azure.resourcemanager.netapp.models.InAvailabilityReasonType": "Microsoft.NetApp.InAvailabilityReasonType", + "com.azure.resourcemanager.netapp.models.KerberosState": "Microsoft.NetApp.KerberosState", "com.azure.resourcemanager.netapp.models.KeySource": "Microsoft.NetApp.KeySource", "com.azure.resourcemanager.netapp.models.KeyVaultPrivateEndpoint": "Microsoft.NetApp.KeyVaultPrivateEndpoint", "com.azure.resourcemanager.netapp.models.KeyVaultProperties": "Microsoft.NetApp.KeyVaultProperties", "com.azure.resourcemanager.netapp.models.KeyVaultStatus": "Microsoft.NetApp.KeyVaultStatus", + "com.azure.resourcemanager.netapp.models.LargeVolumeType": "Microsoft.NetApp.LargeVolumeType", + "com.azure.resourcemanager.netapp.models.LdapConfiguration": "Microsoft.NetApp.LdapConfiguration", "com.azure.resourcemanager.netapp.models.LdapSearchScopeOpt": "Microsoft.NetApp.LdapSearchScopeOpt", + "com.azure.resourcemanager.netapp.models.LdapServerType": "Microsoft.NetApp.LdapServerType", + "com.azure.resourcemanager.netapp.models.LdapState": "Microsoft.NetApp.LdapState", "com.azure.resourcemanager.netapp.models.ListReplicationsRequest": "Microsoft.NetApp.ListReplicationsRequest", "com.azure.resourcemanager.netapp.models.LogSpecification": "Microsoft.NetApp.LogSpecification", "com.azure.resourcemanager.netapp.models.ManagedServiceIdentity": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", @@ -333,15 +582,28 @@ "com.azure.resourcemanager.netapp.models.NetAppAccountPatch": "Microsoft.NetApp.NetAppAccountPatch", "com.azure.resourcemanager.netapp.models.NetworkFeatures": "Microsoft.NetApp.NetworkFeatures", "com.azure.resourcemanager.netapp.models.NetworkSiblingSetProvisioningState": "Microsoft.NetApp.NetworkSiblingSetProvisioningState", + "com.azure.resourcemanager.netapp.models.NfsUser": "Microsoft.NetApp.NfsUser", "com.azure.resourcemanager.netapp.models.NicInfo": "Microsoft.NetApp.NicInfo", "com.azure.resourcemanager.netapp.models.OperationDisplay": "Microsoft.NetApp.OperationDisplay", + "com.azure.resourcemanager.netapp.models.OriginClusterInformation": "Microsoft.NetApp.OriginClusterInformation", "com.azure.resourcemanager.netapp.models.PeerClusterForVolumeMigrationRequest": "Microsoft.NetApp.PeerClusterForVolumeMigrationRequest", "com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs": "Microsoft.NetApp.PlacementKeyValuePairs", + "com.azure.resourcemanager.netapp.models.PolicyStatus": "Microsoft.NetApp.PolicyStatus", "com.azure.resourcemanager.netapp.models.PoolChangeRequest": "Microsoft.NetApp.PoolChangeRequest", + "com.azure.resourcemanager.netapp.models.ProtocolTypes": "Microsoft.NetApp.ProtocolTypes", "com.azure.resourcemanager.netapp.models.ProvisioningState": "Microsoft.NetApp.NetAppProvisioningState", "com.azure.resourcemanager.netapp.models.QosType": "Microsoft.NetApp.QosType", "com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest": "Microsoft.NetApp.QueryNetworkSiblingSetRequest", "com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest": "Microsoft.NetApp.QuotaAvailabilityRequest", + "com.azure.resourcemanager.netapp.models.QuotaReport": "Microsoft.NetApp.QuotaReport", + "com.azure.resourcemanager.netapp.models.RansomwareProtectionPatchSettings": "Microsoft.NetApp.RansomwareProtectionPatchSettings", + "com.azure.resourcemanager.netapp.models.RansomwareProtectionSettings": "Microsoft.NetApp.RansomwareProtectionSettings", + "com.azure.resourcemanager.netapp.models.RansomwareReportProperties": "Microsoft.NetApp.RansomwareReportProperties", + "com.azure.resourcemanager.netapp.models.RansomwareReportSeverity": "Microsoft.NetApp.RansomwareReportSeverity", + "com.azure.resourcemanager.netapp.models.RansomwareReportState": "Microsoft.NetApp.RansomwareReportState", + "com.azure.resourcemanager.netapp.models.RansomwareSuspectResolution": "Microsoft.NetApp.RansomwareSuspectResolution", + "com.azure.resourcemanager.netapp.models.RansomwareSuspects": "Microsoft.NetApp.RansomwareSuspects", + "com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest": "Microsoft.NetApp.RansomwareSuspectsClearRequest", "com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest": "Microsoft.NetApp.ReestablishReplicationRequest", "com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem": "Microsoft.NetApp.RegionInfoAvailabilityZoneMappingsItem", "com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity": "Microsoft.NetApp.RegionStorageToNetworkProximity", @@ -352,14 +614,22 @@ "com.azure.resourcemanager.netapp.models.ReplicationSchedule": "Microsoft.NetApp.ReplicationSchedule", "com.azure.resourcemanager.netapp.models.ReplicationType": "Microsoft.NetApp.ReplicationType", "com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest": "Microsoft.NetApp.ResourceNameAvailabilityRequest", + "com.azure.resourcemanager.netapp.models.SecretPassword": "Microsoft.NetApp.SecretPassword", + "com.azure.resourcemanager.netapp.models.SecretPasswordIdentity": "Microsoft.NetApp.SecretPasswordIdentity", + "com.azure.resourcemanager.netapp.models.SecretPasswordKeyVaultProperties": "Microsoft.NetApp.SecretPasswordKeyVaultProperties", "com.azure.resourcemanager.netapp.models.SecurityStyle": "Microsoft.NetApp.SecurityStyle", "com.azure.resourcemanager.netapp.models.ServiceLevel": "Microsoft.NetApp.ServiceLevel", "com.azure.resourcemanager.netapp.models.ServiceSpecification": "Microsoft.NetApp.ServiceSpecification", "com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration": "Microsoft.NetApp.SmbAccessBasedEnumeration", + "com.azure.resourcemanager.netapp.models.SmbEncryptionState": "Microsoft.NetApp.SmbEncryptionState", "com.azure.resourcemanager.netapp.models.SmbNonBrowsable": "Microsoft.NetApp.SmbNonBrowsable", + "com.azure.resourcemanager.netapp.models.SmbSettings": "Microsoft.NetApp.SmbSettings", + "com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility": "Microsoft.NetApp.SnapshotDirectoryVisibility", "com.azure.resourcemanager.netapp.models.SnapshotPolicyPatch": "Microsoft.NetApp.SnapshotPolicyPatch", "com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles": "Microsoft.NetApp.SnapshotRestoreFiles", + "com.azure.resourcemanager.netapp.models.SnapshotUsage": "Microsoft.NetApp.SnapshotUsage", "com.azure.resourcemanager.netapp.models.SubvolumePatchRequest": "Microsoft.NetApp.SubvolumePatchRequest", + "com.azure.resourcemanager.netapp.models.SuspectFile": "Microsoft.NetApp.SuspectFile", "com.azure.resourcemanager.netapp.models.Type": "Microsoft.NetApp.Type", "com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest": "Microsoft.NetApp.UpdateNetworkSiblingSetRequest", "com.azure.resourcemanager.netapp.models.UsageName": "Microsoft.NetApp.UsageName", @@ -369,6 +639,7 @@ "com.azure.resourcemanager.netapp.models.VolumeBackups": "Microsoft.NetApp.VolumeBackups", "com.azure.resourcemanager.netapp.models.VolumeGroupMetadata": "Microsoft.NetApp.VolumeGroupMetaData", "com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties": "Microsoft.NetApp.VolumeGroupVolumeProperties", + "com.azure.resourcemanager.netapp.models.VolumeLanguage": "Microsoft.NetApp.VolumeLanguage", "com.azure.resourcemanager.netapp.models.VolumePatch": "Microsoft.NetApp.VolumePatch", "com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection": "Microsoft.NetApp.VolumePatchPropertiesDataProtection", "com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy": "Microsoft.NetApp.VolumePatchPropertiesExportPolicy", @@ -379,6 +650,7 @@ "com.azure.resourcemanager.netapp.models.VolumeReplicationRelationshipStatus": "Microsoft.NetApp.VolumeReplicationRelationshipStatus", "com.azure.resourcemanager.netapp.models.VolumeRestoreRelationshipStatus": "Microsoft.NetApp.VolumeRestoreRelationshipStatus", "com.azure.resourcemanager.netapp.models.VolumeRevert": "Microsoft.NetApp.VolumeRevert", + "com.azure.resourcemanager.netapp.models.VolumeSize": "Microsoft.NetApp.VolumeSize", "com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties": "Microsoft.NetApp.VolumeSnapshotProperties", "com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity": "Microsoft.NetApp.VolumeStorageToNetworkProximity", "com.azure.resourcemanager.netapp.models.WeeklySchedule": "Microsoft.NetApp.WeeklySchedule" diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_metadata.json b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_metadata.json index de5761365dfb..7b1e4f6b1db2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_metadata.json +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersion":"2025-09-01","crossLanguageDefinitions":{"com.azure.resourcemanager.netapp.fluent.AccountsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginChangeKeyVault":"Microsoft.NetApp.NetAppAccounts.changeKeyVault","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginCreateOrUpdate":"Microsoft.NetApp.NetAppAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginDelete":"Microsoft.NetApp.NetAppAccounts.delete","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginGetChangeKeyVaultInformation":"Microsoft.NetApp.NetAppAccounts.getChangeKeyVaultInformation","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginRenewCredentials":"Microsoft.NetApp.NetAppAccounts.renewCredentials","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginTransitionToCmk":"Microsoft.NetApp.NetAppAccounts.transitionToCmk","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginUpdate":"Microsoft.NetApp.NetAppAccounts.update","com.azure.resourcemanager.netapp.fluent.AccountsClient.changeKeyVault":"Microsoft.NetApp.NetAppAccounts.changeKeyVault","com.azure.resourcemanager.netapp.fluent.AccountsClient.createOrUpdate":"Microsoft.NetApp.NetAppAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.AccountsClient.delete":"Microsoft.NetApp.NetAppAccounts.delete","com.azure.resourcemanager.netapp.fluent.AccountsClient.getByResourceGroup":"Microsoft.NetApp.NetAppAccounts.get","com.azure.resourcemanager.netapp.fluent.AccountsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.NetAppAccounts.get","com.azure.resourcemanager.netapp.fluent.AccountsClient.getChangeKeyVaultInformation":"Microsoft.NetApp.NetAppAccounts.getChangeKeyVaultInformation","com.azure.resourcemanager.netapp.fluent.AccountsClient.list":"Microsoft.NetApp.NetAppAccounts.listBySubscription","com.azure.resourcemanager.netapp.fluent.AccountsClient.listByResourceGroup":"Microsoft.NetApp.NetAppAccounts.list","com.azure.resourcemanager.netapp.fluent.AccountsClient.renewCredentials":"Microsoft.NetApp.NetAppAccounts.renewCredentials","com.azure.resourcemanager.netapp.fluent.AccountsClient.transitionToCmk":"Microsoft.NetApp.NetAppAccounts.transitionToCmk","com.azure.resourcemanager.netapp.fluent.AccountsClient.update":"Microsoft.NetApp.NetAppAccounts.update","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient":"Microsoft.NetApp.BackupPolicies","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginCreate":"Microsoft.NetApp.BackupPolicies.create","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginDelete":"Microsoft.NetApp.BackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginUpdate":"Microsoft.NetApp.BackupPolicies.update","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.create":"Microsoft.NetApp.BackupPolicies.create","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.delete":"Microsoft.NetApp.BackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.get":"Microsoft.NetApp.BackupPolicies.get","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.getWithResponse":"Microsoft.NetApp.BackupPolicies.get","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.list":"Microsoft.NetApp.BackupPolicies.list","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.update":"Microsoft.NetApp.BackupPolicies.update","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient":"Microsoft.NetApp.BackupVaults","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginCreateOrUpdate":"Microsoft.NetApp.BackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginDelete":"Microsoft.NetApp.BackupVaults.delete","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginUpdate":"Microsoft.NetApp.BackupVaults.update","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.createOrUpdate":"Microsoft.NetApp.BackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.delete":"Microsoft.NetApp.BackupVaults.delete","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.get":"Microsoft.NetApp.BackupVaults.get","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.getWithResponse":"Microsoft.NetApp.BackupVaults.get","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.listByNetAppAccount":"Microsoft.NetApp.BackupVaults.listByNetAppAccount","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.update":"Microsoft.NetApp.BackupVaults.update","com.azure.resourcemanager.netapp.fluent.BackupsClient":"Microsoft.NetApp.Backups","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginCreate":"Microsoft.NetApp.Backups.create","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginDelete":"Microsoft.NetApp.Backups.delete","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginUpdate":"Microsoft.NetApp.Backups.update","com.azure.resourcemanager.netapp.fluent.BackupsClient.create":"Microsoft.NetApp.Backups.create","com.azure.resourcemanager.netapp.fluent.BackupsClient.delete":"Microsoft.NetApp.Backups.delete","com.azure.resourcemanager.netapp.fluent.BackupsClient.get":"Microsoft.NetApp.Backups.get","com.azure.resourcemanager.netapp.fluent.BackupsClient.getLatestStatus":"Microsoft.NetApp.Volumes.getLatestStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getLatestStatusWithResponse":"Microsoft.NetApp.Volumes.getLatestStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getVolumeLatestRestoreStatus":"Microsoft.NetApp.Volumes.getVolumeLatestRestoreStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getVolumeLatestRestoreStatusWithResponse":"Microsoft.NetApp.Volumes.getVolumeLatestRestoreStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getWithResponse":"Microsoft.NetApp.Backups.get","com.azure.resourcemanager.netapp.fluent.BackupsClient.listByVault":"Microsoft.NetApp.Backups.listByVault","com.azure.resourcemanager.netapp.fluent.BackupsClient.update":"Microsoft.NetApp.Backups.update","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient.beginMigrateBackups":"Microsoft.NetApp.NetAppAccounts.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient.migrateBackups":"Microsoft.NetApp.NetAppAccounts.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient.beginRestoreFiles":"Microsoft.NetApp.Backups.restoreFiles","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient.restoreFiles":"Microsoft.NetApp.Backups.restoreFiles","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient.beginMigrateBackups":"Microsoft.NetApp.Volumes.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient.migrateBackups":"Microsoft.NetApp.Volumes.migrateBackups","com.azure.resourcemanager.netapp.fluent.NetAppManagementClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.get":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.getWithResponse":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.list":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.get":"Microsoft.NetApp.SubscriptionQuotaItems.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.getWithResponse":"Microsoft.NetApp.SubscriptionQuotaItems.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.list":"Microsoft.NetApp.SubscriptionQuotaItems.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.get":"Microsoft.NetApp.RegionInfoResources.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.getWithResponse":"Microsoft.NetApp.RegionInfoResources.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.list":"Microsoft.NetApp.RegionInfoResources.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.get":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.getWithResponse":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.list":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.list","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.beginUpdateNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.updateNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkFilePathAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkFilePathAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkFilePathAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkFilePathAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkNameAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkNameAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkNameAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkNameAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkQuotaAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkQuotaAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkQuotaAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkQuotaAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.queryNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryNetworkSiblingSetWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.queryNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryRegionInfo":"Microsoft.NetApp.NetAppResourceOperationGroup.queryRegionInfo","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryRegionInfoWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.queryRegionInfo","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.updateNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.updateNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.OperationsClient":"Microsoft.NetApp.Operations","com.azure.resourcemanager.netapp.fluent.OperationsClient.list":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.netapp.fluent.PoolsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginCreateOrUpdate":"Microsoft.NetApp.CapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginDelete":"Microsoft.NetApp.CapacityPools.delete","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginUpdate":"Microsoft.NetApp.CapacityPools.update","com.azure.resourcemanager.netapp.fluent.PoolsClient.createOrUpdate":"Microsoft.NetApp.CapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.PoolsClient.delete":"Microsoft.NetApp.CapacityPools.delete","com.azure.resourcemanager.netapp.fluent.PoolsClient.get":"Microsoft.NetApp.CapacityPools.get","com.azure.resourcemanager.netapp.fluent.PoolsClient.getWithResponse":"Microsoft.NetApp.CapacityPools.get","com.azure.resourcemanager.netapp.fluent.PoolsClient.list":"Microsoft.NetApp.CapacityPools.list","com.azure.resourcemanager.netapp.fluent.PoolsClient.update":"Microsoft.NetApp.CapacityPools.update","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient":"Microsoft.NetApp.SnapshotPolicies","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.beginDelete":"Microsoft.NetApp.SnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.beginUpdate":"Microsoft.NetApp.SnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.create":"Microsoft.NetApp.SnapshotPolicies.create","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.createWithResponse":"Microsoft.NetApp.SnapshotPolicies.create","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.delete":"Microsoft.NetApp.SnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.get":"Microsoft.NetApp.SnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.getWithResponse":"Microsoft.NetApp.SnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.list":"Microsoft.NetApp.SnapshotPolicies.list","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.listVolumes":"Microsoft.NetApp.SnapshotPolicies.listVolumes","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.listVolumesWithResponse":"Microsoft.NetApp.SnapshotPolicies.listVolumes","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.update":"Microsoft.NetApp.SnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.SnapshotsClient":"Microsoft.NetApp.Snapshots","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginCreate":"Microsoft.NetApp.Snapshots.create","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginDelete":"Microsoft.NetApp.Snapshots.delete","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginRestoreFiles":"Microsoft.NetApp.Snapshots.restoreFiles","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.create":"Microsoft.NetApp.Snapshots.create","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.delete":"Microsoft.NetApp.Snapshots.delete","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.get":"Microsoft.NetApp.Snapshots.get","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.getWithResponse":"Microsoft.NetApp.Snapshots.get","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.list":"Microsoft.NetApp.Snapshots.list","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.restoreFiles":"Microsoft.NetApp.Snapshots.restoreFiles","com.azure.resourcemanager.netapp.fluent.SubvolumesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginCreate":"Microsoft.NetApp.SubvolumeInfos.create","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginDelete":"Microsoft.NetApp.SubvolumeInfos.delete","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginGetMetadata":"Microsoft.NetApp.SubvolumeInfos.getMetadata","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginUpdate":"Microsoft.NetApp.SubvolumeInfos.update","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.create":"Microsoft.NetApp.SubvolumeInfos.create","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.delete":"Microsoft.NetApp.SubvolumeInfos.delete","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.get":"Microsoft.NetApp.SubvolumeInfos.get","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.getMetadata":"Microsoft.NetApp.SubvolumeInfos.getMetadata","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.getWithResponse":"Microsoft.NetApp.SubvolumeInfos.get","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.listByVolume":"Microsoft.NetApp.SubvolumeInfos.listByVolume","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.update":"Microsoft.NetApp.SubvolumeInfos.update","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient":"Microsoft.NetApp.VolumeGroups","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.beginCreate":"Microsoft.NetApp.VolumeGroups.create","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.beginDelete":"Microsoft.NetApp.VolumeGroups.delete","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.create":"Microsoft.NetApp.VolumeGroups.create","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.delete":"Microsoft.NetApp.VolumeGroups.delete","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.get":"Microsoft.NetApp.VolumeGroups.get","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.getWithResponse":"Microsoft.NetApp.VolumeGroups.get","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.listByNetAppAccount":"Microsoft.NetApp.NetAppAccounts.listByNetAppAccount","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient":"Microsoft.NetApp.VolumeQuotaRules","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginCreate":"Microsoft.NetApp.VolumeQuotaRules.create","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginDelete":"Microsoft.NetApp.VolumeQuotaRules.delete","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginUpdate":"Microsoft.NetApp.VolumeQuotaRules.update","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.create":"Microsoft.NetApp.VolumeQuotaRules.create","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.delete":"Microsoft.NetApp.VolumeQuotaRules.delete","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.get":"Microsoft.NetApp.VolumeQuotaRules.get","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.getWithResponse":"Microsoft.NetApp.VolumeQuotaRules.get","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.listByVolume":"Microsoft.NetApp.VolumeQuotaRules.listByVolume","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.update":"Microsoft.NetApp.VolumeQuotaRules.update","com.azure.resourcemanager.netapp.fluent.VolumesClient":"Microsoft.NetApp.Volumes","com.azure.resourcemanager.netapp.fluent.VolumesClient.authorizeExternalReplication":"Microsoft.NetApp.Volumes.authorizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.authorizeReplication":"Microsoft.NetApp.Volumes.authorizeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginAuthorizeExternalReplication":"Microsoft.NetApp.Volumes.authorizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginAuthorizeReplication":"Microsoft.NetApp.Volumes.authorizeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginBreakFileLocks":"Microsoft.NetApp.Volumes.breakFileLocks","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginBreakReplication":"Microsoft.NetApp.Volumes.breakReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginCreateOrUpdate":"Microsoft.NetApp.Volumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginDelete":"Microsoft.NetApp.Volumes.delete","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginDeleteReplication":"Microsoft.NetApp.Volumes.deleteReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginFinalizeExternalReplication":"Microsoft.NetApp.Volumes.finalizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginFinalizeRelocation":"Microsoft.NetApp.Volumes.finalizeRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginListGetGroupIdListForLdapUser":"Microsoft.NetApp.Volumes.listGetGroupIdListForLdapUser","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPeerExternalCluster":"Microsoft.NetApp.Volumes.peerExternalCluster","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPerformReplicationTransfer":"Microsoft.NetApp.Volumes.performReplicationTransfer","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPoolChange":"Microsoft.NetApp.Volumes.poolChange","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPopulateAvailabilityZone":"Microsoft.NetApp.Volumes.populateAvailabilityZone","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginReInitializeReplication":"Microsoft.NetApp.Volumes.reInitializeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginReestablishReplication":"Microsoft.NetApp.Volumes.reestablishReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRelocate":"Microsoft.NetApp.Volumes.relocate","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginResetCifsPassword":"Microsoft.NetApp.Volumes.resetCifsPassword","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginResyncReplication":"Microsoft.NetApp.Volumes.resyncReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRevert":"Microsoft.NetApp.Volumes.revert","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRevertRelocation":"Microsoft.NetApp.Volumes.revertRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginSplitCloneFromParent":"Microsoft.NetApp.Volumes.splitCloneFromParent","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginUpdate":"Microsoft.NetApp.Volumes.update","com.azure.resourcemanager.netapp.fluent.VolumesClient.breakFileLocks":"Microsoft.NetApp.Volumes.breakFileLocks","com.azure.resourcemanager.netapp.fluent.VolumesClient.breakReplication":"Microsoft.NetApp.Volumes.breakReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.createOrUpdate":"Microsoft.NetApp.Volumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.VolumesClient.delete":"Microsoft.NetApp.Volumes.delete","com.azure.resourcemanager.netapp.fluent.VolumesClient.deleteReplication":"Microsoft.NetApp.Volumes.deleteReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.finalizeExternalReplication":"Microsoft.NetApp.Volumes.finalizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.finalizeRelocation":"Microsoft.NetApp.Volumes.finalizeRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.get":"Microsoft.NetApp.Volumes.get","com.azure.resourcemanager.netapp.fluent.VolumesClient.getWithResponse":"Microsoft.NetApp.Volumes.get","com.azure.resourcemanager.netapp.fluent.VolumesClient.list":"Microsoft.NetApp.Volumes.list","com.azure.resourcemanager.netapp.fluent.VolumesClient.listGetGroupIdListForLdapUser":"Microsoft.NetApp.Volumes.listGetGroupIdListForLdapUser","com.azure.resourcemanager.netapp.fluent.VolumesClient.listReplications":"Microsoft.NetApp.Volumes.listReplications","com.azure.resourcemanager.netapp.fluent.VolumesClient.peerExternalCluster":"Microsoft.NetApp.Volumes.peerExternalCluster","com.azure.resourcemanager.netapp.fluent.VolumesClient.performReplicationTransfer":"Microsoft.NetApp.Volumes.performReplicationTransfer","com.azure.resourcemanager.netapp.fluent.VolumesClient.poolChange":"Microsoft.NetApp.Volumes.poolChange","com.azure.resourcemanager.netapp.fluent.VolumesClient.populateAvailabilityZone":"Microsoft.NetApp.Volumes.populateAvailabilityZone","com.azure.resourcemanager.netapp.fluent.VolumesClient.reInitializeReplication":"Microsoft.NetApp.Volumes.reInitializeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.reestablishReplication":"Microsoft.NetApp.Volumes.reestablishReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.relocate":"Microsoft.NetApp.Volumes.relocate","com.azure.resourcemanager.netapp.fluent.VolumesClient.replicationStatus":"Microsoft.NetApp.Volumes.replicationStatus","com.azure.resourcemanager.netapp.fluent.VolumesClient.replicationStatusWithResponse":"Microsoft.NetApp.Volumes.replicationStatus","com.azure.resourcemanager.netapp.fluent.VolumesClient.resetCifsPassword":"Microsoft.NetApp.Volumes.resetCifsPassword","com.azure.resourcemanager.netapp.fluent.VolumesClient.resyncReplication":"Microsoft.NetApp.Volumes.resyncReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.revert":"Microsoft.NetApp.Volumes.revert","com.azure.resourcemanager.netapp.fluent.VolumesClient.revertRelocation":"Microsoft.NetApp.Volumes.revertRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.splitCloneFromParent":"Microsoft.NetApp.Volumes.splitCloneFromParent","com.azure.resourcemanager.netapp.fluent.VolumesClient.update":"Microsoft.NetApp.Volumes.update","com.azure.resourcemanager.netapp.fluent.models.AccountProperties":"Microsoft.NetApp.AccountProperties","com.azure.resourcemanager.netapp.fluent.models.BackupInner":"Microsoft.NetApp.Backup","com.azure.resourcemanager.netapp.fluent.models.BackupPatchProperties":"Microsoft.NetApp.BackupPatchProperties","com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner":"Microsoft.NetApp.BackupPolicy","com.azure.resourcemanager.netapp.fluent.models.BackupPolicyProperties":"Microsoft.NetApp.BackupPolicyProperties","com.azure.resourcemanager.netapp.fluent.models.BackupProperties":"Microsoft.NetApp.BackupProperties","com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner":"Microsoft.NetApp.BackupStatus","com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner":"Microsoft.NetApp.BackupVault","com.azure.resourcemanager.netapp.fluent.models.BackupVaultProperties":"Microsoft.NetApp.BackupVaultProperties","com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner":"Microsoft.NetApp.CapacityPool","com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner":"Microsoft.NetApp.CheckAvailabilityResponse","com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner":"Microsoft.NetApp.ClusterPeerCommandResponse","com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner":"Microsoft.NetApp.GetGroupIdListForLdapUserResponse","com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseInner":"Microsoft.NetApp.GetKeyVaultStatusResponse","com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseProperties":"Microsoft.NetApp.GetKeyVaultStatusResponseProperties","com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner":"Microsoft.NetApp.NetAppAccount","com.azure.resourcemanager.netapp.fluent.models.NetworkSiblingSetInner":"Microsoft.NetApp.NetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.models.OperationInner":"Microsoft.NetApp.Operation","com.azure.resourcemanager.netapp.fluent.models.OperationProperties":"Microsoft.NetApp.OperationProperties","com.azure.resourcemanager.netapp.fluent.models.PoolPatchProperties":"Microsoft.NetApp.PoolPatchProperties","com.azure.resourcemanager.netapp.fluent.models.PoolProperties":"Microsoft.NetApp.PoolProperties","com.azure.resourcemanager.netapp.fluent.models.QuotaItemProperties":"Microsoft.NetApp.QuotaItemProperties","com.azure.resourcemanager.netapp.fluent.models.RegionInfoInner":"Microsoft.NetApp.RegionInfo","com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner":"Microsoft.NetApp.RegionInfoResource","com.azure.resourcemanager.netapp.fluent.models.ReplicationInner":"Microsoft.NetApp.Replication","com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner":"Microsoft.NetApp.ReplicationStatus","com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner":"Microsoft.NetApp.RestoreStatus","com.azure.resourcemanager.netapp.fluent.models.SnapshotInner":"Microsoft.NetApp.Snapshot","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner":"Microsoft.NetApp.SnapshotPolicy","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyProperties":"Microsoft.NetApp.SnapshotPolicyProperties","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyVolumeListInner":"Microsoft.NetApp.SnapshotPolicyVolumeList","com.azure.resourcemanager.netapp.fluent.models.SnapshotProperties":"Microsoft.NetApp.SnapshotProperties","com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner":"Microsoft.NetApp.QuotaItem","com.azure.resourcemanager.netapp.fluent.models.SubvolumeInfoInner":"Microsoft.NetApp.SubvolumeInfo","com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelInner":"Microsoft.NetApp.SubvolumeModel","com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelProperties":"Microsoft.NetApp.SubvolumeModelProperties","com.azure.resourcemanager.netapp.fluent.models.SubvolumePatchParams":"Microsoft.NetApp.SubvolumePatchParams","com.azure.resourcemanager.netapp.fluent.models.SubvolumeProperties":"Microsoft.NetApp.SubvolumeProperties","com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner":"Microsoft.NetApp.SvmPeerCommandResponse","com.azure.resourcemanager.netapp.fluent.models.UsageProperties":"Microsoft.NetApp.UsageProperties","com.azure.resourcemanager.netapp.fluent.models.UsageResultInner":"Microsoft.NetApp.UsageResult","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupDetailsInner":"Microsoft.NetApp.VolumeGroupDetails","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner":"Microsoft.NetApp.VolumeGroup","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupListProperties":"Microsoft.NetApp.VolumeGroupListProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupProperties":"Microsoft.NetApp.VolumeGroupProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeInner":"Microsoft.NetApp.Volume","com.azure.resourcemanager.netapp.fluent.models.VolumePatchProperties":"Microsoft.NetApp.VolumePatchProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeProperties":"Microsoft.NetApp.VolumeProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner":"Microsoft.NetApp.VolumeQuotaRule","com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRulesProperties":"Microsoft.NetApp.VolumeQuotaRulesProperties","com.azure.resourcemanager.netapp.implementation.NetAppManagementClientBuilder":"Microsoft.NetApp","com.azure.resourcemanager.netapp.implementation.models.BackupPoliciesList":"Microsoft.NetApp.BackupPoliciesList","com.azure.resourcemanager.netapp.implementation.models.BackupVaultsList":"Microsoft.NetApp.BackupVaultsList","com.azure.resourcemanager.netapp.implementation.models.BackupsList":"Microsoft.NetApp.BackupsList","com.azure.resourcemanager.netapp.implementation.models.CapacityPoolList":"Microsoft.NetApp.CapacityPoolList","com.azure.resourcemanager.netapp.implementation.models.ListReplications":"Microsoft.NetApp.ListReplications","com.azure.resourcemanager.netapp.implementation.models.NetAppAccountList":"Microsoft.NetApp.NetAppAccountList","com.azure.resourcemanager.netapp.implementation.models.OperationListResult":"Microsoft.NetApp.OperationListResult","com.azure.resourcemanager.netapp.implementation.models.QuotaItemList":"Microsoft.NetApp.QuotaItemList","com.azure.resourcemanager.netapp.implementation.models.RegionInfosList":"Microsoft.NetApp.RegionInfosList","com.azure.resourcemanager.netapp.implementation.models.SnapshotPoliciesList":"Microsoft.NetApp.SnapshotPoliciesList","com.azure.resourcemanager.netapp.implementation.models.SnapshotsList":"Microsoft.NetApp.SnapshotsList","com.azure.resourcemanager.netapp.implementation.models.SubvolumesList":"Microsoft.NetApp.SubvolumesList","com.azure.resourcemanager.netapp.implementation.models.UsagesListResult":"Microsoft.NetApp.UsagesListResult","com.azure.resourcemanager.netapp.implementation.models.VolumeGroupList":"Microsoft.NetApp.VolumeGroupList","com.azure.resourcemanager.netapp.implementation.models.VolumeList":"Microsoft.NetApp.VolumeList","com.azure.resourcemanager.netapp.implementation.models.VolumeQuotaRulesList":"Microsoft.NetApp.VolumeQuotaRulesList","com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit":"Microsoft.NetApp.AcceptGrowCapacityPoolForShortTermCloneSplit","com.azure.resourcemanager.netapp.models.AccountEncryption":"Microsoft.NetApp.AccountEncryption","com.azure.resourcemanager.netapp.models.ActiveDirectory":"Microsoft.NetApp.ActiveDirectory","com.azure.resourcemanager.netapp.models.ActiveDirectoryStatus":"Microsoft.NetApp.ActiveDirectoryStatus","com.azure.resourcemanager.netapp.models.ApplicationType":"Microsoft.NetApp.ApplicationType","com.azure.resourcemanager.netapp.models.AuthorizeRequest":"Microsoft.NetApp.AuthorizeRequest","com.azure.resourcemanager.netapp.models.AvsDataStore":"Microsoft.NetApp.AvsDataStore","com.azure.resourcemanager.netapp.models.BackupPatch":"Microsoft.NetApp.BackupPatch","com.azure.resourcemanager.netapp.models.BackupPolicyPatch":"Microsoft.NetApp.BackupPolicyPatch","com.azure.resourcemanager.netapp.models.BackupRestoreFiles":"Microsoft.NetApp.BackupRestoreFiles","com.azure.resourcemanager.netapp.models.BackupType":"Microsoft.NetApp.BackupType","com.azure.resourcemanager.netapp.models.BackupVaultPatch":"Microsoft.NetApp.BackupVaultPatch","com.azure.resourcemanager.netapp.models.BackupsMigrationRequest":"Microsoft.NetApp.BackupsMigrationRequest","com.azure.resourcemanager.netapp.models.BreakFileLocksRequest":"Microsoft.NetApp.BreakFileLocksRequest","com.azure.resourcemanager.netapp.models.BreakReplicationRequest":"Microsoft.NetApp.BreakReplicationRequest","com.azure.resourcemanager.netapp.models.CapacityPoolPatch":"Microsoft.NetApp.CapacityPoolPatch","com.azure.resourcemanager.netapp.models.ChangeKeyVault":"Microsoft.NetApp.ChangeKeyVault","com.azure.resourcemanager.netapp.models.CheckNameResourceTypes":"Microsoft.NetApp.CheckNameResourceTypes","com.azure.resourcemanager.netapp.models.CheckQuotaNameResourceTypes":"Microsoft.NetApp.CheckQuotaNameResourceTypes","com.azure.resourcemanager.netapp.models.ChownMode":"Microsoft.NetApp.ChownMode","com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy":"Microsoft.NetApp.CoolAccessRetrievalPolicy","com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy":"Microsoft.NetApp.CoolAccessTieringPolicy","com.azure.resourcemanager.netapp.models.DailySchedule":"Microsoft.NetApp.DailySchedule","com.azure.resourcemanager.netapp.models.DestinationReplication":"Microsoft.NetApp.DestinationReplication","com.azure.resourcemanager.netapp.models.Dimension":"Microsoft.NetApp.Dimension","com.azure.resourcemanager.netapp.models.EnableSubvolumes":"Microsoft.NetApp.EnableSubvolumes","com.azure.resourcemanager.netapp.models.EncryptionIdentity":"Microsoft.NetApp.EncryptionIdentity","com.azure.resourcemanager.netapp.models.EncryptionKeySource":"Microsoft.NetApp.EncryptionKeySource","com.azure.resourcemanager.netapp.models.EncryptionTransitionRequest":"Microsoft.NetApp.EncryptionTransitionRequest","com.azure.resourcemanager.netapp.models.EncryptionType":"Microsoft.NetApp.EncryptionType","com.azure.resourcemanager.netapp.models.EndpointType":"Microsoft.NetApp.EndpointType","com.azure.resourcemanager.netapp.models.Exclude":"Microsoft.NetApp.Exclude","com.azure.resourcemanager.netapp.models.ExportPolicyRule":"Microsoft.NetApp.ExportPolicyRule","com.azure.resourcemanager.netapp.models.FileAccessLogs":"Microsoft.NetApp.FileAccessLogs","com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest":"Microsoft.NetApp.FilePathAvailabilityRequest","com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest":"Microsoft.NetApp.GetGroupIdListForLdapUserRequest","com.azure.resourcemanager.netapp.models.HourlySchedule":"Microsoft.NetApp.HourlySchedule","com.azure.resourcemanager.netapp.models.InAvailabilityReasonType":"Microsoft.NetApp.InAvailabilityReasonType","com.azure.resourcemanager.netapp.models.KeySource":"Microsoft.NetApp.KeySource","com.azure.resourcemanager.netapp.models.KeyVaultPrivateEndpoint":"Microsoft.NetApp.KeyVaultPrivateEndpoint","com.azure.resourcemanager.netapp.models.KeyVaultProperties":"Microsoft.NetApp.KeyVaultProperties","com.azure.resourcemanager.netapp.models.KeyVaultStatus":"Microsoft.NetApp.KeyVaultStatus","com.azure.resourcemanager.netapp.models.LdapSearchScopeOpt":"Microsoft.NetApp.LdapSearchScopeOpt","com.azure.resourcemanager.netapp.models.ListReplicationsRequest":"Microsoft.NetApp.ListReplicationsRequest","com.azure.resourcemanager.netapp.models.LogSpecification":"Microsoft.NetApp.LogSpecification","com.azure.resourcemanager.netapp.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.netapp.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.netapp.models.MetricAggregationType":"Microsoft.NetApp.MetricAggregationType","com.azure.resourcemanager.netapp.models.MetricSpecification":"Microsoft.NetApp.MetricSpecification","com.azure.resourcemanager.netapp.models.MirrorState":"Microsoft.NetApp.MirrorState","com.azure.resourcemanager.netapp.models.MonthlySchedule":"Microsoft.NetApp.MonthlySchedule","com.azure.resourcemanager.netapp.models.MountTargetProperties":"Microsoft.NetApp.MountTargetProperties","com.azure.resourcemanager.netapp.models.MultiAdStatus":"Microsoft.NetApp.MultiAdStatus","com.azure.resourcemanager.netapp.models.NetAppAccountPatch":"Microsoft.NetApp.NetAppAccountPatch","com.azure.resourcemanager.netapp.models.NetworkFeatures":"Microsoft.NetApp.NetworkFeatures","com.azure.resourcemanager.netapp.models.NetworkSiblingSetProvisioningState":"Microsoft.NetApp.NetworkSiblingSetProvisioningState","com.azure.resourcemanager.netapp.models.NicInfo":"Microsoft.NetApp.NicInfo","com.azure.resourcemanager.netapp.models.OperationDisplay":"Microsoft.NetApp.OperationDisplay","com.azure.resourcemanager.netapp.models.PeerClusterForVolumeMigrationRequest":"Microsoft.NetApp.PeerClusterForVolumeMigrationRequest","com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs":"Microsoft.NetApp.PlacementKeyValuePairs","com.azure.resourcemanager.netapp.models.PoolChangeRequest":"Microsoft.NetApp.PoolChangeRequest","com.azure.resourcemanager.netapp.models.ProvisioningState":"Microsoft.NetApp.NetAppProvisioningState","com.azure.resourcemanager.netapp.models.QosType":"Microsoft.NetApp.QosType","com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest":"Microsoft.NetApp.QueryNetworkSiblingSetRequest","com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest":"Microsoft.NetApp.QuotaAvailabilityRequest","com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest":"Microsoft.NetApp.ReestablishReplicationRequest","com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem":"Microsoft.NetApp.RegionInfoAvailabilityZoneMappingsItem","com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity":"Microsoft.NetApp.RegionStorageToNetworkProximity","com.azure.resourcemanager.netapp.models.RelocateVolumeRequest":"Microsoft.NetApp.RelocateVolumeRequest","com.azure.resourcemanager.netapp.models.RemotePath":"Microsoft.NetApp.RemotePath","com.azure.resourcemanager.netapp.models.ReplicationMirrorState":"Microsoft.NetApp.ReplicationMirrorState","com.azure.resourcemanager.netapp.models.ReplicationObject":"Microsoft.NetApp.ReplicationObject","com.azure.resourcemanager.netapp.models.ReplicationSchedule":"Microsoft.NetApp.ReplicationSchedule","com.azure.resourcemanager.netapp.models.ReplicationType":"Microsoft.NetApp.ReplicationType","com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest":"Microsoft.NetApp.ResourceNameAvailabilityRequest","com.azure.resourcemanager.netapp.models.SecurityStyle":"Microsoft.NetApp.SecurityStyle","com.azure.resourcemanager.netapp.models.ServiceLevel":"Microsoft.NetApp.ServiceLevel","com.azure.resourcemanager.netapp.models.ServiceSpecification":"Microsoft.NetApp.ServiceSpecification","com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration":"Microsoft.NetApp.SmbAccessBasedEnumeration","com.azure.resourcemanager.netapp.models.SmbNonBrowsable":"Microsoft.NetApp.SmbNonBrowsable","com.azure.resourcemanager.netapp.models.SnapshotPolicyPatch":"Microsoft.NetApp.SnapshotPolicyPatch","com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles":"Microsoft.NetApp.SnapshotRestoreFiles","com.azure.resourcemanager.netapp.models.SubvolumePatchRequest":"Microsoft.NetApp.SubvolumePatchRequest","com.azure.resourcemanager.netapp.models.Type":"Microsoft.NetApp.Type","com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest":"Microsoft.NetApp.UpdateNetworkSiblingSetRequest","com.azure.resourcemanager.netapp.models.UsageName":"Microsoft.NetApp.UsageName","com.azure.resourcemanager.netapp.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.netapp.models.VolumeBackupProperties":"Microsoft.NetApp.VolumeBackupProperties","com.azure.resourcemanager.netapp.models.VolumeBackupRelationshipStatus":"Microsoft.NetApp.VolumeBackupRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeBackups":"Microsoft.NetApp.VolumeBackups","com.azure.resourcemanager.netapp.models.VolumeGroupMetadata":"Microsoft.NetApp.VolumeGroupMetaData","com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties":"Microsoft.NetApp.VolumeGroupVolumeProperties","com.azure.resourcemanager.netapp.models.VolumePatch":"Microsoft.NetApp.VolumePatch","com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection":"Microsoft.NetApp.VolumePatchPropertiesDataProtection","com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy":"Microsoft.NetApp.VolumePatchPropertiesExportPolicy","com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection":"Microsoft.NetApp.VolumePropertiesDataProtection","com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy":"Microsoft.NetApp.VolumePropertiesExportPolicy","com.azure.resourcemanager.netapp.models.VolumeQuotaRulePatch":"Microsoft.NetApp.VolumeQuotaRulePatch","com.azure.resourcemanager.netapp.models.VolumeRelocationProperties":"Microsoft.NetApp.VolumeRelocationProperties","com.azure.resourcemanager.netapp.models.VolumeReplicationRelationshipStatus":"Microsoft.NetApp.VolumeReplicationRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeRestoreRelationshipStatus":"Microsoft.NetApp.VolumeRestoreRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeRevert":"Microsoft.NetApp.VolumeRevert","com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties":"Microsoft.NetApp.VolumeSnapshotProperties","com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity":"Microsoft.NetApp.VolumeStorageToNetworkProximity","com.azure.resourcemanager.netapp.models.WeeklySchedule":"Microsoft.NetApp.WeeklySchedule"},"generatedFiles":["src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java","src/main/java/com/azure/resourcemanager/netapp/fluent/AccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderBackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderVolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceRegionInfosClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceUsagesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourcesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/PoolsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SubvolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeGroupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeQuotaRulesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckAvailabilityResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ClusterPeerCommandResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetGroupIdListForLdapUserResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetKeyVaultStatusResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetKeyVaultStatusResponseProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetworkSiblingSetInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/QuotaItemProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeInfoInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumePatchParams.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SvmPeerCommandResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/UsageProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/UsageResultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRuleInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRulesProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/netapp/fluent/package-info.java","src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CheckAvailabilityResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeerCommandResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/GetGroupIdListForLdapUserResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/GetKeyVaultStatusResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceUsagesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceUsagesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetworkSiblingSetImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoResourceImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RestoreStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyVolumeListImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubscriptionQuotaItemImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeInfoImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeModelImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeerCommandResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/UsageResultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupDetailsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRuleImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupPoliciesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupVaultsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/CapacityPoolList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ListReplications.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/NetAppAccountList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/QuotaItemList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/RegionInfosList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SnapshotPoliciesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SnapshotsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SubvolumesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/UsagesListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeGroupList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeQuotaRulesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/package-info.java","src/main/java/com/azure/resourcemanager/netapp/models/AcceptGrowCapacityPoolForShortTermCloneSplit.java","src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.java","src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java","src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java","src/main/java/com/azure/resourcemanager/netapp/models/Backup.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVault.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/Backups.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderBackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderVolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakFileLocksRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java","src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/ChangeKeyVault.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckAvailabilityResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java","src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerCommandResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessRetrievalPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessTieringPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/DestinationReplication.java","src/main/java/com/azure/resourcemanager/netapp/models/Dimension.java","src/main/java/com/azure/resourcemanager/netapp/models/EnableSubvolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionKeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionTransitionRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java","src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java","src/main/java/com/azure/resourcemanager/netapp/models/Exclude.java","src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java","src/main/java/com/azure/resourcemanager/netapp/models/FileAccessLogs.java","src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/GetKeyVaultStatusResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java","src/main/java/com/azure/resourcemanager/netapp/models/KeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultPrivateEndpoint.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapSearchScopeOpt.java","src/main/java/com/azure/resourcemanager/netapp/models/ListReplicationsRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/netapp/models/MetricAggregationType.java","src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java","src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/MountTargetProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/MultiAdStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceQuotaLimits.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceQuotaLimitsAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceRegionInfos.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceUsages.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResources.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSet.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSetProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/NicInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/Operation.java","src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/netapp/models/Operations.java","src/main/java/com/azure/resourcemanager/netapp/models/PeerClusterForVolumeMigrationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/PlacementKeyValuePairs.java","src/main/java/com/azure/resourcemanager/netapp/models/PoolChangeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/Pools.java","src/main/java/com/azure/resourcemanager/netapp/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/QosType.java","src/main/java/com/azure/resourcemanager/netapp/models/QueryNetworkSiblingSetRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/ReestablishReplicationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoAvailabilityZoneMappingsItem.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionStorageToNetworkProximity.java","src/main/java/com/azure/resourcemanager/netapp/models/RelocateVolumeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RemotePath.java","src/main/java/com/azure/resourcemanager/netapp/models/Replication.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationMirrorState.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationType.java","src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RestoreStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java","src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java","src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbAccessBasedEnumeration.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbNonBrowsable.java","src/main/java/com/azure/resourcemanager/netapp/models/Snapshot.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyVolumeList.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotRestoreFiles.java","src/main/java/com/azure/resourcemanager/netapp/models/Snapshots.java","src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItem.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeModel.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumePatchRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/Subvolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerCommandResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/Type.java","src/main/java/com/azure/resourcemanager/netapp/models/UpdateNetworkSiblingSetRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/UsageName.java","src/main/java/com/azure/resourcemanager/netapp/models/UsageResult.java","src/main/java/com/azure/resourcemanager/netapp/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/Volume.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroup.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupDetails.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroups.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRule.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulePatch.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRules.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRelocationProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeReplicationRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRestoreRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java","src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java","src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/package-info.java","src/main/java/com/azure/resourcemanager/netapp/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersion":"2025-09-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.netapp.fluent.AccountsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginChangeKeyVault":"Microsoft.NetApp.NetAppAccounts.changeKeyVault","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginCreateOrUpdate":"Microsoft.NetApp.NetAppAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginDelete":"Microsoft.NetApp.NetAppAccounts.delete","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginGetChangeKeyVaultInformation":"Microsoft.NetApp.NetAppAccounts.getChangeKeyVaultInformation","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginRenewCredentials":"Microsoft.NetApp.NetAppAccounts.renewCredentials","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginTransitionToCmk":"Microsoft.NetApp.NetAppAccounts.transitionToCmk","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginUpdate":"Microsoft.NetApp.NetAppAccounts.update","com.azure.resourcemanager.netapp.fluent.AccountsClient.changeKeyVault":"Microsoft.NetApp.NetAppAccounts.changeKeyVault","com.azure.resourcemanager.netapp.fluent.AccountsClient.createOrUpdate":"Microsoft.NetApp.NetAppAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.AccountsClient.delete":"Microsoft.NetApp.NetAppAccounts.delete","com.azure.resourcemanager.netapp.fluent.AccountsClient.getByResourceGroup":"Microsoft.NetApp.NetAppAccounts.get","com.azure.resourcemanager.netapp.fluent.AccountsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.NetAppAccounts.get","com.azure.resourcemanager.netapp.fluent.AccountsClient.getChangeKeyVaultInformation":"Microsoft.NetApp.NetAppAccounts.getChangeKeyVaultInformation","com.azure.resourcemanager.netapp.fluent.AccountsClient.list":"Microsoft.NetApp.NetAppAccounts.listBySubscription","com.azure.resourcemanager.netapp.fluent.AccountsClient.listByResourceGroup":"Microsoft.NetApp.NetAppAccounts.list","com.azure.resourcemanager.netapp.fluent.AccountsClient.renewCredentials":"Microsoft.NetApp.NetAppAccounts.renewCredentials","com.azure.resourcemanager.netapp.fluent.AccountsClient.transitionToCmk":"Microsoft.NetApp.NetAppAccounts.transitionToCmk","com.azure.resourcemanager.netapp.fluent.AccountsClient.update":"Microsoft.NetApp.NetAppAccounts.update","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient":"Microsoft.NetApp.ActiveDirectoryConfigs","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.beginCreateOrUpdate":"Microsoft.NetApp.ActiveDirectoryConfigs.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.beginDelete":"Microsoft.NetApp.ActiveDirectoryConfigs.delete","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.beginUpdate":"Microsoft.NetApp.ActiveDirectoryConfigs.update","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.createOrUpdate":"Microsoft.NetApp.ActiveDirectoryConfigs.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.delete":"Microsoft.NetApp.ActiveDirectoryConfigs.delete","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.getByResourceGroup":"Microsoft.NetApp.ActiveDirectoryConfigs.get","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.ActiveDirectoryConfigs.get","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.list":"Microsoft.NetApp.ActiveDirectoryConfigs.listBySubscription","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.listByResourceGroup":"Microsoft.NetApp.ActiveDirectoryConfigs.listByResourceGroup","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.update":"Microsoft.NetApp.ActiveDirectoryConfigs.update","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient":"Microsoft.NetApp.BackupPolicies","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginCreate":"Microsoft.NetApp.BackupPolicies.create","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginDelete":"Microsoft.NetApp.BackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginUpdate":"Microsoft.NetApp.BackupPolicies.update","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.create":"Microsoft.NetApp.BackupPolicies.create","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.delete":"Microsoft.NetApp.BackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.get":"Microsoft.NetApp.BackupPolicies.get","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.getWithResponse":"Microsoft.NetApp.BackupPolicies.get","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.list":"Microsoft.NetApp.BackupPolicies.list","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.update":"Microsoft.NetApp.BackupPolicies.update","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient":"Microsoft.NetApp.BackupVaults","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginCreateOrUpdate":"Microsoft.NetApp.BackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginDelete":"Microsoft.NetApp.BackupVaults.delete","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginUpdate":"Microsoft.NetApp.BackupVaults.update","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.createOrUpdate":"Microsoft.NetApp.BackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.delete":"Microsoft.NetApp.BackupVaults.delete","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.get":"Microsoft.NetApp.BackupVaults.get","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.getWithResponse":"Microsoft.NetApp.BackupVaults.get","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.listByNetAppAccount":"Microsoft.NetApp.BackupVaults.listByNetAppAccount","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.update":"Microsoft.NetApp.BackupVaults.update","com.azure.resourcemanager.netapp.fluent.BackupsClient":"Microsoft.NetApp.Backups","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginCreate":"Microsoft.NetApp.Backups.create","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginDelete":"Microsoft.NetApp.Backups.delete","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginUpdate":"Microsoft.NetApp.Backups.update","com.azure.resourcemanager.netapp.fluent.BackupsClient.create":"Microsoft.NetApp.Backups.create","com.azure.resourcemanager.netapp.fluent.BackupsClient.delete":"Microsoft.NetApp.Backups.delete","com.azure.resourcemanager.netapp.fluent.BackupsClient.get":"Microsoft.NetApp.Backups.get","com.azure.resourcemanager.netapp.fluent.BackupsClient.getLatestStatus":"Microsoft.NetApp.Volumes.getLatestStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getLatestStatusWithResponse":"Microsoft.NetApp.Volumes.getLatestStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getVolumeLatestRestoreStatus":"Microsoft.NetApp.Volumes.getVolumeLatestRestoreStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getVolumeLatestRestoreStatusWithResponse":"Microsoft.NetApp.Volumes.getVolumeLatestRestoreStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getWithResponse":"Microsoft.NetApp.Backups.get","com.azure.resourcemanager.netapp.fluent.BackupsClient.listByVault":"Microsoft.NetApp.Backups.listByVault","com.azure.resourcemanager.netapp.fluent.BackupsClient.update":"Microsoft.NetApp.Backups.update","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient.beginMigrateBackups":"Microsoft.NetApp.NetAppAccounts.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient.migrateBackups":"Microsoft.NetApp.NetAppAccounts.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient.beginRestoreFiles":"Microsoft.NetApp.Backups.restoreFiles","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient.restoreFiles":"Microsoft.NetApp.Backups.restoreFiles","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient.beginMigrateBackups":"Microsoft.NetApp.Volumes.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient.migrateBackups":"Microsoft.NetApp.Volumes.migrateBackups","com.azure.resourcemanager.netapp.fluent.BucketsClient":"Microsoft.NetApp.Buckets","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginCreateOrUpdate":"Microsoft.NetApp.Buckets.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginDelete":"Microsoft.NetApp.Buckets.delete","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginUpdate":"Microsoft.NetApp.Buckets.update","com.azure.resourcemanager.netapp.fluent.BucketsClient.createOrUpdate":"Microsoft.NetApp.Buckets.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BucketsClient.delete":"Microsoft.NetApp.Buckets.delete","com.azure.resourcemanager.netapp.fluent.BucketsClient.generateCredentials":"Microsoft.NetApp.Buckets.generateCredentials","com.azure.resourcemanager.netapp.fluent.BucketsClient.generateCredentialsWithResponse":"Microsoft.NetApp.Buckets.generateCredentials","com.azure.resourcemanager.netapp.fluent.BucketsClient.get":"Microsoft.NetApp.Buckets.get","com.azure.resourcemanager.netapp.fluent.BucketsClient.getWithResponse":"Microsoft.NetApp.Buckets.get","com.azure.resourcemanager.netapp.fluent.BucketsClient.list":"Microsoft.NetApp.Buckets.list","com.azure.resourcemanager.netapp.fluent.BucketsClient.update":"Microsoft.NetApp.Buckets.update","com.azure.resourcemanager.netapp.fluent.CachesClient":"Microsoft.NetApp.Caches","com.azure.resourcemanager.netapp.fluent.CachesClient.beginCreateOrUpdate":"Microsoft.NetApp.Caches.createOrUpdate","com.azure.resourcemanager.netapp.fluent.CachesClient.beginDelete":"Microsoft.NetApp.Caches.delete","com.azure.resourcemanager.netapp.fluent.CachesClient.beginPoolChange":"Microsoft.NetApp.Caches.poolChange","com.azure.resourcemanager.netapp.fluent.CachesClient.beginUpdate":"Microsoft.NetApp.Caches.update","com.azure.resourcemanager.netapp.fluent.CachesClient.createOrUpdate":"Microsoft.NetApp.Caches.createOrUpdate","com.azure.resourcemanager.netapp.fluent.CachesClient.delete":"Microsoft.NetApp.Caches.delete","com.azure.resourcemanager.netapp.fluent.CachesClient.get":"Microsoft.NetApp.Caches.get","com.azure.resourcemanager.netapp.fluent.CachesClient.getWithResponse":"Microsoft.NetApp.Caches.get","com.azure.resourcemanager.netapp.fluent.CachesClient.listByCapacityPools":"Microsoft.NetApp.Caches.listByCapacityPools","com.azure.resourcemanager.netapp.fluent.CachesClient.listPeeringPassphrases":"Microsoft.NetApp.Caches.listPeeringPassphrases","com.azure.resourcemanager.netapp.fluent.CachesClient.listPeeringPassphrasesWithResponse":"Microsoft.NetApp.Caches.listPeeringPassphrases","com.azure.resourcemanager.netapp.fluent.CachesClient.poolChange":"Microsoft.NetApp.Caches.poolChange","com.azure.resourcemanager.netapp.fluent.CachesClient.update":"Microsoft.NetApp.Caches.update","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient":"Microsoft.NetApp.ElasticAccounts","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginDelete":"Microsoft.NetApp.ElasticAccounts.delete","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginUpdate":"Microsoft.NetApp.ElasticAccounts.update","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.createOrUpdate":"Microsoft.NetApp.ElasticAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.delete":"Microsoft.NetApp.ElasticAccounts.delete","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.getByResourceGroup":"Microsoft.NetApp.ElasticAccounts.get","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.ElasticAccounts.get","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.list":"Microsoft.NetApp.ElasticAccounts.listBySubscription","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.listByResourceGroup":"Microsoft.NetApp.ElasticAccounts.listByResourceGroup","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.update":"Microsoft.NetApp.ElasticAccounts.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient":"Microsoft.NetApp.ElasticBackupPolicies","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginDelete":"Microsoft.NetApp.ElasticBackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginUpdate":"Microsoft.NetApp.ElasticBackupPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.createOrUpdate":"Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.delete":"Microsoft.NetApp.ElasticBackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.get":"Microsoft.NetApp.ElasticBackupPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.getWithResponse":"Microsoft.NetApp.ElasticBackupPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.listByElasticAccount":"Microsoft.NetApp.ElasticBackupPolicies.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.update":"Microsoft.NetApp.ElasticBackupPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient":"Microsoft.NetApp.ElasticBackupVaults","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticBackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginDelete":"Microsoft.NetApp.ElasticBackupVaults.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginUpdate":"Microsoft.NetApp.ElasticBackupVaults.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.createOrUpdate":"Microsoft.NetApp.ElasticBackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.delete":"Microsoft.NetApp.ElasticBackupVaults.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.get":"Microsoft.NetApp.ElasticBackupVaults.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.getWithResponse":"Microsoft.NetApp.ElasticBackupVaults.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.listByElasticAccount":"Microsoft.NetApp.ElasticBackupVaults.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.update":"Microsoft.NetApp.ElasticBackupVaults.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient":"Microsoft.NetApp.ElasticBackups","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticBackups.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginDelete":"Microsoft.NetApp.ElasticBackups.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginUpdate":"Microsoft.NetApp.ElasticBackups.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.createOrUpdate":"Microsoft.NetApp.ElasticBackups.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.delete":"Microsoft.NetApp.ElasticBackups.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.get":"Microsoft.NetApp.ElasticBackups.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.getWithResponse":"Microsoft.NetApp.ElasticBackups.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.listByVault":"Microsoft.NetApp.ElasticBackups.listByVault","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.update":"Microsoft.NetApp.ElasticBackups.update","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient":"Microsoft.NetApp.ElasticCapacityPools","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginChangeZone":"Microsoft.NetApp.ElasticCapacityPools.changeZone","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticCapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginDelete":"Microsoft.NetApp.ElasticCapacityPools.delete","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginUpdate":"Microsoft.NetApp.ElasticCapacityPools.update","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.changeZone":"Microsoft.NetApp.ElasticCapacityPools.changeZone","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.checkVolumeFilePathAvailability":"Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.checkVolumeFilePathAvailabilityWithResponse":"Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.createOrUpdate":"Microsoft.NetApp.ElasticCapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.delete":"Microsoft.NetApp.ElasticCapacityPools.delete","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.get":"Microsoft.NetApp.ElasticCapacityPools.get","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.getWithResponse":"Microsoft.NetApp.ElasticCapacityPools.get","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.listByElasticAccount":"Microsoft.NetApp.ElasticCapacityPools.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.update":"Microsoft.NetApp.ElasticCapacityPools.update","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient":"Microsoft.NetApp.ElasticSnapshotPolicies","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginDelete":"Microsoft.NetApp.ElasticSnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginUpdate":"Microsoft.NetApp.ElasticSnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.createOrUpdate":"Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.delete":"Microsoft.NetApp.ElasticSnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.get":"Microsoft.NetApp.ElasticSnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.getWithResponse":"Microsoft.NetApp.ElasticSnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.listByElasticAccount":"Microsoft.NetApp.ElasticSnapshotPolicies.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.listElasticVolumes":"Microsoft.NetApp.ElasticSnapshotPolicies.listElasticVolumes","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.update":"Microsoft.NetApp.ElasticSnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient":"Microsoft.NetApp.ElasticSnapshots","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticSnapshots.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.beginDelete":"Microsoft.NetApp.ElasticSnapshots.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.createOrUpdate":"Microsoft.NetApp.ElasticSnapshots.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.delete":"Microsoft.NetApp.ElasticSnapshots.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.get":"Microsoft.NetApp.ElasticSnapshots.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.getWithResponse":"Microsoft.NetApp.ElasticSnapshots.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.listByElasticVolume":"Microsoft.NetApp.ElasticSnapshots.listByElasticVolume","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient":"Microsoft.NetApp.ElasticVolumes","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticVolumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginDelete":"Microsoft.NetApp.ElasticVolumes.delete","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginRevert":"Microsoft.NetApp.ElasticVolumes.revert","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginUpdate":"Microsoft.NetApp.ElasticVolumes.update","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.createOrUpdate":"Microsoft.NetApp.ElasticVolumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.delete":"Microsoft.NetApp.ElasticVolumes.delete","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.get":"Microsoft.NetApp.ElasticVolumes.get","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.getWithResponse":"Microsoft.NetApp.ElasticVolumes.get","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.listByElasticPool":"Microsoft.NetApp.ElasticVolumes.listByElasticPool","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.revert":"Microsoft.NetApp.ElasticVolumes.revert","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.update":"Microsoft.NetApp.ElasticVolumes.update","com.azure.resourcemanager.netapp.fluent.NetAppManagementClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.get":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.getWithResponse":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.list":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.get":"Microsoft.NetApp.SubscriptionQuotaItems.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.getWithResponse":"Microsoft.NetApp.SubscriptionQuotaItems.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.list":"Microsoft.NetApp.SubscriptionQuotaItems.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.get":"Microsoft.NetApp.RegionInfoResources.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.getWithResponse":"Microsoft.NetApp.RegionInfoResources.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.list":"Microsoft.NetApp.RegionInfoResources.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.get":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.getWithResponse":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.list":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.list","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.beginUpdateNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.updateNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkFilePathAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkFilePathAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkFilePathAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkFilePathAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkNameAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkNameAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkNameAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkNameAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkQuotaAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkQuotaAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkQuotaAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkQuotaAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.queryNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryNetworkSiblingSetWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.queryNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryRegionInfo":"Microsoft.NetApp.NetAppResourceOperationGroup.queryRegionInfo","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryRegionInfoWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.queryRegionInfo","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.updateNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.updateNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.OperationsClient":"Microsoft.NetApp.Operations","com.azure.resourcemanager.netapp.fluent.OperationsClient.list":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.netapp.fluent.PoolsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginCreateOrUpdate":"Microsoft.NetApp.CapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginDelete":"Microsoft.NetApp.CapacityPools.delete","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginUpdate":"Microsoft.NetApp.CapacityPools.update","com.azure.resourcemanager.netapp.fluent.PoolsClient.createOrUpdate":"Microsoft.NetApp.CapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.PoolsClient.delete":"Microsoft.NetApp.CapacityPools.delete","com.azure.resourcemanager.netapp.fluent.PoolsClient.get":"Microsoft.NetApp.CapacityPools.get","com.azure.resourcemanager.netapp.fluent.PoolsClient.getWithResponse":"Microsoft.NetApp.CapacityPools.get","com.azure.resourcemanager.netapp.fluent.PoolsClient.list":"Microsoft.NetApp.CapacityPools.list","com.azure.resourcemanager.netapp.fluent.PoolsClient.update":"Microsoft.NetApp.CapacityPools.update","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient":"Microsoft.NetApp.RansomwareReports","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.beginClearSuspects":"Microsoft.NetApp.RansomwareReports.clearSuspects","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.clearSuspects":"Microsoft.NetApp.RansomwareReports.clearSuspects","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.get":"Microsoft.NetApp.RansomwareReports.get","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.getWithResponse":"Microsoft.NetApp.RansomwareReports.get","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.list":"Microsoft.NetApp.RansomwareReports.list","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient":"Microsoft.NetApp.SnapshotPolicies","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.beginDelete":"Microsoft.NetApp.SnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.beginUpdate":"Microsoft.NetApp.SnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.create":"Microsoft.NetApp.SnapshotPolicies.create","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.createWithResponse":"Microsoft.NetApp.SnapshotPolicies.create","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.delete":"Microsoft.NetApp.SnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.get":"Microsoft.NetApp.SnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.getWithResponse":"Microsoft.NetApp.SnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.list":"Microsoft.NetApp.SnapshotPolicies.list","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.listVolumes":"Microsoft.NetApp.SnapshotPolicies.listVolumes","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.listVolumesWithResponse":"Microsoft.NetApp.SnapshotPolicies.listVolumes","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.update":"Microsoft.NetApp.SnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.SnapshotsClient":"Microsoft.NetApp.Snapshots","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginCreate":"Microsoft.NetApp.Snapshots.create","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginDelete":"Microsoft.NetApp.Snapshots.delete","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginRestoreFiles":"Microsoft.NetApp.Snapshots.restoreFiles","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.create":"Microsoft.NetApp.Snapshots.create","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.delete":"Microsoft.NetApp.Snapshots.delete","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.get":"Microsoft.NetApp.Snapshots.get","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.getWithResponse":"Microsoft.NetApp.Snapshots.get","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.list":"Microsoft.NetApp.Snapshots.list","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.restoreFiles":"Microsoft.NetApp.Snapshots.restoreFiles","com.azure.resourcemanager.netapp.fluent.SubvolumesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginCreate":"Microsoft.NetApp.SubvolumeInfos.create","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginDelete":"Microsoft.NetApp.SubvolumeInfos.delete","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginGetMetadata":"Microsoft.NetApp.SubvolumeInfos.getMetadata","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginUpdate":"Microsoft.NetApp.SubvolumeInfos.update","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.create":"Microsoft.NetApp.SubvolumeInfos.create","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.delete":"Microsoft.NetApp.SubvolumeInfos.delete","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.get":"Microsoft.NetApp.SubvolumeInfos.get","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.getMetadata":"Microsoft.NetApp.SubvolumeInfos.getMetadata","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.getWithResponse":"Microsoft.NetApp.SubvolumeInfos.get","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.listByVolume":"Microsoft.NetApp.SubvolumeInfos.listByVolume","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.update":"Microsoft.NetApp.SubvolumeInfos.update","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient":"Microsoft.NetApp.VolumeGroups","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.beginCreate":"Microsoft.NetApp.VolumeGroups.create","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.beginDelete":"Microsoft.NetApp.VolumeGroups.delete","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.create":"Microsoft.NetApp.VolumeGroups.create","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.delete":"Microsoft.NetApp.VolumeGroups.delete","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.get":"Microsoft.NetApp.VolumeGroups.get","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.getWithResponse":"Microsoft.NetApp.VolumeGroups.get","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.listByNetAppAccount":"Microsoft.NetApp.NetAppAccounts.listByNetAppAccount","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient":"Microsoft.NetApp.VolumeQuotaRules","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginCreate":"Microsoft.NetApp.VolumeQuotaRules.create","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginDelete":"Microsoft.NetApp.VolumeQuotaRules.delete","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginUpdate":"Microsoft.NetApp.VolumeQuotaRules.update","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.create":"Microsoft.NetApp.VolumeQuotaRules.create","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.delete":"Microsoft.NetApp.VolumeQuotaRules.delete","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.get":"Microsoft.NetApp.VolumeQuotaRules.get","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.getWithResponse":"Microsoft.NetApp.VolumeQuotaRules.get","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.listByVolume":"Microsoft.NetApp.VolumeQuotaRules.listByVolume","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.update":"Microsoft.NetApp.VolumeQuotaRules.update","com.azure.resourcemanager.netapp.fluent.VolumesClient":"Microsoft.NetApp.Volumes","com.azure.resourcemanager.netapp.fluent.VolumesClient.authorizeExternalReplication":"Microsoft.NetApp.Volumes.authorizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.authorizeReplication":"Microsoft.NetApp.Volumes.authorizeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginAuthorizeExternalReplication":"Microsoft.NetApp.Volumes.authorizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginAuthorizeReplication":"Microsoft.NetApp.Volumes.authorizeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginBreakFileLocks":"Microsoft.NetApp.Volumes.breakFileLocks","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginBreakReplication":"Microsoft.NetApp.Volumes.breakReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginCreateOrUpdate":"Microsoft.NetApp.Volumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginDelete":"Microsoft.NetApp.Volumes.delete","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginDeleteReplication":"Microsoft.NetApp.Volumes.deleteReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginFinalizeExternalReplication":"Microsoft.NetApp.Volumes.finalizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginFinalizeRelocation":"Microsoft.NetApp.Volumes.finalizeRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginListGetGroupIdListForLdapUser":"Microsoft.NetApp.Volumes.listGetGroupIdListForLdapUser","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginListQuotaReport":"Microsoft.NetApp.Volumes.listQuotaReport","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPeerExternalCluster":"Microsoft.NetApp.Volumes.peerExternalCluster","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPerformReplicationTransfer":"Microsoft.NetApp.Volumes.performReplicationTransfer","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPoolChange":"Microsoft.NetApp.Volumes.poolChange","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPopulateAvailabilityZone":"Microsoft.NetApp.Volumes.populateAvailabilityZone","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginReInitializeReplication":"Microsoft.NetApp.Volumes.reInitializeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginReestablishReplication":"Microsoft.NetApp.Volumes.reestablishReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRelocate":"Microsoft.NetApp.Volumes.relocate","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginResetCifsPassword":"Microsoft.NetApp.Volumes.resetCifsPassword","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginResyncReplication":"Microsoft.NetApp.Volumes.resyncReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRevert":"Microsoft.NetApp.Volumes.revert","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRevertRelocation":"Microsoft.NetApp.Volumes.revertRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginSplitCloneFromParent":"Microsoft.NetApp.Volumes.splitCloneFromParent","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginUpdate":"Microsoft.NetApp.Volumes.update","com.azure.resourcemanager.netapp.fluent.VolumesClient.breakFileLocks":"Microsoft.NetApp.Volumes.breakFileLocks","com.azure.resourcemanager.netapp.fluent.VolumesClient.breakReplication":"Microsoft.NetApp.Volumes.breakReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.createOrUpdate":"Microsoft.NetApp.Volumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.VolumesClient.delete":"Microsoft.NetApp.Volumes.delete","com.azure.resourcemanager.netapp.fluent.VolumesClient.deleteReplication":"Microsoft.NetApp.Volumes.deleteReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.finalizeExternalReplication":"Microsoft.NetApp.Volumes.finalizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.finalizeRelocation":"Microsoft.NetApp.Volumes.finalizeRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.get":"Microsoft.NetApp.Volumes.get","com.azure.resourcemanager.netapp.fluent.VolumesClient.getWithResponse":"Microsoft.NetApp.Volumes.get","com.azure.resourcemanager.netapp.fluent.VolumesClient.list":"Microsoft.NetApp.Volumes.list","com.azure.resourcemanager.netapp.fluent.VolumesClient.listGetGroupIdListForLdapUser":"Microsoft.NetApp.Volumes.listGetGroupIdListForLdapUser","com.azure.resourcemanager.netapp.fluent.VolumesClient.listQuotaReport":"Microsoft.NetApp.Volumes.listQuotaReport","com.azure.resourcemanager.netapp.fluent.VolumesClient.listReplications":"Microsoft.NetApp.Volumes.listReplications","com.azure.resourcemanager.netapp.fluent.VolumesClient.peerExternalCluster":"Microsoft.NetApp.Volumes.peerExternalCluster","com.azure.resourcemanager.netapp.fluent.VolumesClient.performReplicationTransfer":"Microsoft.NetApp.Volumes.performReplicationTransfer","com.azure.resourcemanager.netapp.fluent.VolumesClient.poolChange":"Microsoft.NetApp.Volumes.poolChange","com.azure.resourcemanager.netapp.fluent.VolumesClient.populateAvailabilityZone":"Microsoft.NetApp.Volumes.populateAvailabilityZone","com.azure.resourcemanager.netapp.fluent.VolumesClient.reInitializeReplication":"Microsoft.NetApp.Volumes.reInitializeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.reestablishReplication":"Microsoft.NetApp.Volumes.reestablishReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.relocate":"Microsoft.NetApp.Volumes.relocate","com.azure.resourcemanager.netapp.fluent.VolumesClient.replicationStatus":"Microsoft.NetApp.Volumes.replicationStatus","com.azure.resourcemanager.netapp.fluent.VolumesClient.replicationStatusWithResponse":"Microsoft.NetApp.Volumes.replicationStatus","com.azure.resourcemanager.netapp.fluent.VolumesClient.resetCifsPassword":"Microsoft.NetApp.Volumes.resetCifsPassword","com.azure.resourcemanager.netapp.fluent.VolumesClient.resyncReplication":"Microsoft.NetApp.Volumes.resyncReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.revert":"Microsoft.NetApp.Volumes.revert","com.azure.resourcemanager.netapp.fluent.VolumesClient.revertRelocation":"Microsoft.NetApp.Volumes.revertRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.splitCloneFromParent":"Microsoft.NetApp.Volumes.splitCloneFromParent","com.azure.resourcemanager.netapp.fluent.VolumesClient.update":"Microsoft.NetApp.Volumes.update","com.azure.resourcemanager.netapp.fluent.models.AccountProperties":"Microsoft.NetApp.AccountProperties","com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner":"Microsoft.NetApp.ActiveDirectoryConfig","com.azure.resourcemanager.netapp.fluent.models.BackupInner":"Microsoft.NetApp.Backup","com.azure.resourcemanager.netapp.fluent.models.BackupPatchProperties":"Microsoft.NetApp.BackupPatchProperties","com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner":"Microsoft.NetApp.BackupPolicy","com.azure.resourcemanager.netapp.fluent.models.BackupPolicyProperties":"Microsoft.NetApp.BackupPolicyProperties","com.azure.resourcemanager.netapp.fluent.models.BackupProperties":"Microsoft.NetApp.BackupProperties","com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner":"Microsoft.NetApp.BackupStatus","com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner":"Microsoft.NetApp.BackupVault","com.azure.resourcemanager.netapp.fluent.models.BackupVaultProperties":"Microsoft.NetApp.BackupVaultProperties","com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner":"Microsoft.NetApp.BucketGenerateCredentials","com.azure.resourcemanager.netapp.fluent.models.BucketInner":"Microsoft.NetApp.Bucket","com.azure.resourcemanager.netapp.fluent.models.BucketPatchProperties":"Microsoft.NetApp.BucketPatchProperties","com.azure.resourcemanager.netapp.fluent.models.BucketProperties":"Microsoft.NetApp.BucketProperties","com.azure.resourcemanager.netapp.fluent.models.CacheInner":"Microsoft.NetApp.Cache","com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner":"Microsoft.NetApp.CapacityPool","com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner":"Microsoft.NetApp.CheckAvailabilityResponse","com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner":"Microsoft.NetApp.CheckElasticResourceAvailabilityResponse","com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner":"Microsoft.NetApp.ClusterPeerCommandResponse","com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner":"Microsoft.NetApp.ElasticAccount","com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner":"Microsoft.NetApp.ElasticBackup","com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner":"Microsoft.NetApp.ElasticBackupPolicy","com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner":"Microsoft.NetApp.ElasticBackupVault","com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner":"Microsoft.NetApp.ElasticCapacityPool","com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner":"Microsoft.NetApp.ElasticSnapshot","com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner":"Microsoft.NetApp.ElasticSnapshotPolicy","com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner":"Microsoft.NetApp.ElasticVolume","com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner":"Microsoft.NetApp.GetGroupIdListForLdapUserResponse","com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseInner":"Microsoft.NetApp.GetKeyVaultStatusResponse","com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseProperties":"Microsoft.NetApp.GetKeyVaultStatusResponseProperties","com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner":"Microsoft.NetApp.ListQuotaReportResponse","com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner":"Microsoft.NetApp.NetAppAccount","com.azure.resourcemanager.netapp.fluent.models.NetworkSiblingSetInner":"Microsoft.NetApp.NetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.models.OperationInner":"Microsoft.NetApp.Operation","com.azure.resourcemanager.netapp.fluent.models.OperationProperties":"Microsoft.NetApp.OperationProperties","com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner":"Microsoft.NetApp.PeeringPassphrases","com.azure.resourcemanager.netapp.fluent.models.PoolPatchProperties":"Microsoft.NetApp.PoolPatchProperties","com.azure.resourcemanager.netapp.fluent.models.PoolProperties":"Microsoft.NetApp.PoolProperties","com.azure.resourcemanager.netapp.fluent.models.QuotaItemProperties":"Microsoft.NetApp.QuotaItemProperties","com.azure.resourcemanager.netapp.fluent.models.RansomwareReportInner":"Microsoft.NetApp.RansomwareReport","com.azure.resourcemanager.netapp.fluent.models.RegionInfoInner":"Microsoft.NetApp.RegionInfo","com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner":"Microsoft.NetApp.RegionInfoResource","com.azure.resourcemanager.netapp.fluent.models.ReplicationInner":"Microsoft.NetApp.Replication","com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner":"Microsoft.NetApp.ReplicationStatus","com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner":"Microsoft.NetApp.RestoreStatus","com.azure.resourcemanager.netapp.fluent.models.SnapshotInner":"Microsoft.NetApp.Snapshot","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner":"Microsoft.NetApp.SnapshotPolicy","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyProperties":"Microsoft.NetApp.SnapshotPolicyProperties","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyVolumeListInner":"Microsoft.NetApp.SnapshotPolicyVolumeList","com.azure.resourcemanager.netapp.fluent.models.SnapshotProperties":"Microsoft.NetApp.SnapshotProperties","com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner":"Microsoft.NetApp.QuotaItem","com.azure.resourcemanager.netapp.fluent.models.SubvolumeInfoInner":"Microsoft.NetApp.SubvolumeInfo","com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelInner":"Microsoft.NetApp.SubvolumeModel","com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelProperties":"Microsoft.NetApp.SubvolumeModelProperties","com.azure.resourcemanager.netapp.fluent.models.SubvolumePatchParams":"Microsoft.NetApp.SubvolumePatchParams","com.azure.resourcemanager.netapp.fluent.models.SubvolumeProperties":"Microsoft.NetApp.SubvolumeProperties","com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner":"Microsoft.NetApp.SvmPeerCommandResponse","com.azure.resourcemanager.netapp.fluent.models.UsageProperties":"Microsoft.NetApp.UsageProperties","com.azure.resourcemanager.netapp.fluent.models.UsageResultInner":"Microsoft.NetApp.UsageResult","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupDetailsInner":"Microsoft.NetApp.VolumeGroupDetails","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner":"Microsoft.NetApp.VolumeGroup","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupListProperties":"Microsoft.NetApp.VolumeGroupListProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupProperties":"Microsoft.NetApp.VolumeGroupProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeInner":"Microsoft.NetApp.Volume","com.azure.resourcemanager.netapp.fluent.models.VolumePatchProperties":"Microsoft.NetApp.VolumePatchProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeProperties":"Microsoft.NetApp.VolumeProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner":"Microsoft.NetApp.VolumeQuotaRule","com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRulesProperties":"Microsoft.NetApp.VolumeQuotaRulesProperties","com.azure.resourcemanager.netapp.implementation.NetAppManagementClientBuilder":"Microsoft.NetApp","com.azure.resourcemanager.netapp.implementation.models.ActiveDirectoryConfigListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.BackupPoliciesList":"Microsoft.NetApp.BackupPoliciesList","com.azure.resourcemanager.netapp.implementation.models.BackupVaultsList":"Microsoft.NetApp.BackupVaultsList","com.azure.resourcemanager.netapp.implementation.models.BackupsList":"Microsoft.NetApp.BackupsList","com.azure.resourcemanager.netapp.implementation.models.BucketList":"Microsoft.NetApp.BucketList","com.azure.resourcemanager.netapp.implementation.models.CacheList":"Microsoft.NetApp.CacheList","com.azure.resourcemanager.netapp.implementation.models.CapacityPoolList":"Microsoft.NetApp.CapacityPoolList","com.azure.resourcemanager.netapp.implementation.models.ElasticAccountListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticBackupListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticBackupPolicyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticBackupVaultListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticCapacityPoolListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyVolumeList":"Microsoft.NetApp.ElasticSnapshotPolicyVolumeList","com.azure.resourcemanager.netapp.implementation.models.ElasticVolumeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ListReplications":"Microsoft.NetApp.ListReplications","com.azure.resourcemanager.netapp.implementation.models.NetAppAccountList":"Microsoft.NetApp.NetAppAccountList","com.azure.resourcemanager.netapp.implementation.models.OperationListResult":"Microsoft.NetApp.OperationListResult","com.azure.resourcemanager.netapp.implementation.models.QuotaItemList":"Microsoft.NetApp.QuotaItemList","com.azure.resourcemanager.netapp.implementation.models.RansomwareReportsList":"Microsoft.NetApp.RansomwareReportsList","com.azure.resourcemanager.netapp.implementation.models.RegionInfosList":"Microsoft.NetApp.RegionInfosList","com.azure.resourcemanager.netapp.implementation.models.SnapshotPoliciesList":"Microsoft.NetApp.SnapshotPoliciesList","com.azure.resourcemanager.netapp.implementation.models.SnapshotsList":"Microsoft.NetApp.SnapshotsList","com.azure.resourcemanager.netapp.implementation.models.SubvolumesList":"Microsoft.NetApp.SubvolumesList","com.azure.resourcemanager.netapp.implementation.models.UsagesListResult":"Microsoft.NetApp.UsagesListResult","com.azure.resourcemanager.netapp.implementation.models.VolumeGroupList":"Microsoft.NetApp.VolumeGroupList","com.azure.resourcemanager.netapp.implementation.models.VolumeList":"Microsoft.NetApp.VolumeList","com.azure.resourcemanager.netapp.implementation.models.VolumeQuotaRulesList":"Microsoft.NetApp.VolumeQuotaRulesList","com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit":"Microsoft.NetApp.AcceptGrowCapacityPoolForShortTermCloneSplit","com.azure.resourcemanager.netapp.models.AccountEncryption":"Microsoft.NetApp.AccountEncryption","com.azure.resourcemanager.netapp.models.ActiveDirectory":"Microsoft.NetApp.ActiveDirectory","com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigProperties":"Microsoft.NetApp.ActiveDirectoryConfigProperties","com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ActiveDirectoryStatus":"Microsoft.NetApp.ActiveDirectoryStatus","com.azure.resourcemanager.netapp.models.ActualRansomwareProtectionState":"Microsoft.NetApp.ActualRansomwareProtectionState","com.azure.resourcemanager.netapp.models.ApplicationType":"Microsoft.NetApp.ApplicationType","com.azure.resourcemanager.netapp.models.AuthorizeRequest":"Microsoft.NetApp.AuthorizeRequest","com.azure.resourcemanager.netapp.models.AvsDataStore":"Microsoft.NetApp.AvsDataStore","com.azure.resourcemanager.netapp.models.BackupPatch":"Microsoft.NetApp.BackupPatch","com.azure.resourcemanager.netapp.models.BackupPolicyPatch":"Microsoft.NetApp.BackupPolicyPatch","com.azure.resourcemanager.netapp.models.BackupRestoreFiles":"Microsoft.NetApp.BackupRestoreFiles","com.azure.resourcemanager.netapp.models.BackupType":"Microsoft.NetApp.BackupType","com.azure.resourcemanager.netapp.models.BackupVaultPatch":"Microsoft.NetApp.BackupVaultPatch","com.azure.resourcemanager.netapp.models.BackupsMigrationRequest":"Microsoft.NetApp.BackupsMigrationRequest","com.azure.resourcemanager.netapp.models.BreakFileLocksRequest":"Microsoft.NetApp.BreakFileLocksRequest","com.azure.resourcemanager.netapp.models.BreakReplicationRequest":"Microsoft.NetApp.BreakReplicationRequest","com.azure.resourcemanager.netapp.models.BreakthroughMode":"Microsoft.NetApp.BreakthroughMode","com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry":"Microsoft.NetApp.BucketCredentialsExpiry","com.azure.resourcemanager.netapp.models.BucketPatch":"Microsoft.NetApp.BucketPatch","com.azure.resourcemanager.netapp.models.BucketPatchPermissions":"Microsoft.NetApp.BucketPatchPermissions","com.azure.resourcemanager.netapp.models.BucketPermissions":"Microsoft.NetApp.BucketPermissions","com.azure.resourcemanager.netapp.models.BucketServerPatchProperties":"Microsoft.NetApp.BucketServerPatchProperties","com.azure.resourcemanager.netapp.models.BucketServerProperties":"Microsoft.NetApp.BucketServerProperties","com.azure.resourcemanager.netapp.models.CacheLifeCycleState":"Microsoft.NetApp.CacheLifeCycleState","com.azure.resourcemanager.netapp.models.CacheMountTargetProperties":"Microsoft.NetApp.CacheMountTargetProperties","com.azure.resourcemanager.netapp.models.CacheProperties":"Microsoft.NetApp.CacheProperties","com.azure.resourcemanager.netapp.models.CacheProvisioningState":"Microsoft.NetApp.CacheProvisioningState","com.azure.resourcemanager.netapp.models.CacheUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.CacheUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.CapacityPoolPatch":"Microsoft.NetApp.CapacityPoolPatch","com.azure.resourcemanager.netapp.models.ChangeKeyVault":"Microsoft.NetApp.ChangeKeyVault","com.azure.resourcemanager.netapp.models.ChangeZoneRequest":"Microsoft.NetApp.ChangeZoneRequest","com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityReason":"Microsoft.NetApp.CheckElasticResourceAvailabilityReason","com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityStatus":"Microsoft.NetApp.CheckElasticResourceAvailabilityStatus","com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest":"Microsoft.NetApp.CheckElasticVolumeFilePathAvailabilityRequest","com.azure.resourcemanager.netapp.models.CheckNameResourceTypes":"Microsoft.NetApp.CheckNameResourceTypes","com.azure.resourcemanager.netapp.models.CheckQuotaNameResourceTypes":"Microsoft.NetApp.CheckQuotaNameResourceTypes","com.azure.resourcemanager.netapp.models.ChownMode":"Microsoft.NetApp.ChownMode","com.azure.resourcemanager.netapp.models.CifsChangeNotifyState":"Microsoft.NetApp.CifsChangeNotifyState","com.azure.resourcemanager.netapp.models.CifsUser":"Microsoft.NetApp.CifsUser","com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy":"Microsoft.NetApp.CoolAccessRetrievalPolicy","com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy":"Microsoft.NetApp.CoolAccessTieringPolicy","com.azure.resourcemanager.netapp.models.CredentialsStatus":"Microsoft.NetApp.CredentialsStatus","com.azure.resourcemanager.netapp.models.DailySchedule":"Microsoft.NetApp.DailySchedule","com.azure.resourcemanager.netapp.models.DayOfWeek":"Microsoft.NetApp.DayOfWeek","com.azure.resourcemanager.netapp.models.DesiredRansomwareProtectionState":"Microsoft.NetApp.DesiredRansomwareProtectionState","com.azure.resourcemanager.netapp.models.DestinationReplication":"Microsoft.NetApp.DestinationReplication","com.azure.resourcemanager.netapp.models.Dimension":"Microsoft.NetApp.Dimension","com.azure.resourcemanager.netapp.models.ElasticAccountProperties":"Microsoft.NetApp.ElasticAccountProperties","com.azure.resourcemanager.netapp.models.ElasticAccountUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticAccountUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties":"Microsoft.NetApp.ElasticBackupPolicyProperties","com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState":"Microsoft.NetApp.ElasticBackupPolicyState","com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ElasticBackupProperties":"Microsoft.NetApp.ElasticBackupProperties","com.azure.resourcemanager.netapp.models.ElasticBackupType":"Microsoft.NetApp.ElasticBackupType","com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties":"Microsoft.NetApp.ElasticBackupVaultProperties","com.azure.resourcemanager.netapp.models.ElasticBackupVaultUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticCapacityPoolProperties":"Microsoft.NetApp.ElasticCapacityPoolProperties","com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ElasticEncryption":"Microsoft.NetApp.ElasticEncryption","com.azure.resourcemanager.netapp.models.ElasticEncryptionConfiguration":"Microsoft.NetApp.ElasticEncryptionConfiguration","com.azure.resourcemanager.netapp.models.ElasticEncryptionIdentity":"Microsoft.NetApp.ElasticEncryptionIdentity","com.azure.resourcemanager.netapp.models.ElasticExportPolicy":"Microsoft.NetApp.ElasticExportPolicy","com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule":"Microsoft.NetApp.ElasticExportPolicyRule","com.azure.resourcemanager.netapp.models.ElasticKeyVaultProperties":"Microsoft.NetApp.ElasticKeyVaultProperties","com.azure.resourcemanager.netapp.models.ElasticKeyVaultStatus":"Microsoft.NetApp.ElasticKeyVaultStatus","com.azure.resourcemanager.netapp.models.ElasticMountTargetProperties":"Microsoft.NetApp.ElasticMountTargetProperties","com.azure.resourcemanager.netapp.models.ElasticNfsv3Access":"Microsoft.NetApp.ElasticNfsv3Access","com.azure.resourcemanager.netapp.models.ElasticNfsv4Access":"Microsoft.NetApp.ElasticNfsv4Access","com.azure.resourcemanager.netapp.models.ElasticPoolEncryptionKeySource":"Microsoft.NetApp.ElasticPoolEncryptionKeySource","com.azure.resourcemanager.netapp.models.ElasticProtocolType":"Microsoft.NetApp.ElasticProtocolType","com.azure.resourcemanager.netapp.models.ElasticResourceAvailabilityStatus":"Microsoft.NetApp.ElasticResourceAvailabilityStatus","com.azure.resourcemanager.netapp.models.ElasticRootAccess":"Microsoft.NetApp.ElasticRootAccess","com.azure.resourcemanager.netapp.models.ElasticServiceLevel":"Microsoft.NetApp.ElasticServiceLevel","com.azure.resourcemanager.netapp.models.ElasticSmbEncryption":"Microsoft.NetApp.ElasticSmbEncryption","com.azure.resourcemanager.netapp.models.ElasticSmbPatchProperties":"Microsoft.NetApp.ElasticSmbPatchProperties","com.azure.resourcemanager.netapp.models.ElasticSmbProperties":"Microsoft.NetApp.ElasticSmbProperties","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule":"Microsoft.NetApp.ElasticSnapshotPolicyDailySchedule","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule":"Microsoft.NetApp.ElasticSnapshotPolicyHourlySchedule","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule":"Microsoft.NetApp.ElasticSnapshotPolicyMonthlySchedule","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties":"Microsoft.NetApp.ElasticSnapshotPolicyProperties","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule":"Microsoft.NetApp.ElasticSnapshotPolicyWeeklySchedule","com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties":"Microsoft.NetApp.ElasticSnapshotProperties","com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule":"Microsoft.NetApp.ElasticUnixAccessRule","com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties":"Microsoft.NetApp.ElasticVolumeBackupProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionPatchProperties":"Microsoft.NetApp.ElasticVolumeDataProtectionPatchProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties":"Microsoft.NetApp.ElasticVolumeDataProtectionProperties","com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement":"Microsoft.NetApp.ElasticVolumePolicyEnforcement","com.azure.resourcemanager.netapp.models.ElasticVolumeProperties":"Microsoft.NetApp.ElasticVolumeProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeRestorationState":"Microsoft.NetApp.ElasticVolumeRestorationState","com.azure.resourcemanager.netapp.models.ElasticVolumeRevert":"Microsoft.NetApp.ElasticVolumeRevert","com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties":"Microsoft.NetApp.ElasticVolumeSnapshotProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.EnableSubvolumes":"Microsoft.NetApp.EnableSubvolumes","com.azure.resourcemanager.netapp.models.EnableWriteBackState":"Microsoft.NetApp.EnableWriteBackState","com.azure.resourcemanager.netapp.models.EncryptionIdentity":"Microsoft.NetApp.EncryptionIdentity","com.azure.resourcemanager.netapp.models.EncryptionKeySource":"Microsoft.NetApp.EncryptionKeySource","com.azure.resourcemanager.netapp.models.EncryptionState":"Microsoft.NetApp.EncryptionState","com.azure.resourcemanager.netapp.models.EncryptionTransitionRequest":"Microsoft.NetApp.EncryptionTransitionRequest","com.azure.resourcemanager.netapp.models.EncryptionType":"Microsoft.NetApp.EncryptionType","com.azure.resourcemanager.netapp.models.EndpointType":"Microsoft.NetApp.EndpointType","com.azure.resourcemanager.netapp.models.Exclude":"Microsoft.NetApp.Exclude","com.azure.resourcemanager.netapp.models.ExportPolicyRule":"Microsoft.NetApp.ExportPolicyRule","com.azure.resourcemanager.netapp.models.ExternalReplicationSetupStatus":"Microsoft.NetApp.ExternalReplicationSetupStatus","com.azure.resourcemanager.netapp.models.FileAccessLogs":"Microsoft.NetApp.FileAccessLogs","com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest":"Microsoft.NetApp.FilePathAvailabilityRequest","com.azure.resourcemanager.netapp.models.FileSystemUser":"Microsoft.NetApp.FileSystemUser","com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest":"Microsoft.NetApp.GetGroupIdListForLdapUserRequest","com.azure.resourcemanager.netapp.models.GlobalFileLockingState":"Microsoft.NetApp.GlobalFileLockingState","com.azure.resourcemanager.netapp.models.HourlySchedule":"Microsoft.NetApp.HourlySchedule","com.azure.resourcemanager.netapp.models.InAvailabilityReasonType":"Microsoft.NetApp.InAvailabilityReasonType","com.azure.resourcemanager.netapp.models.KerberosState":"Microsoft.NetApp.KerberosState","com.azure.resourcemanager.netapp.models.KeySource":"Microsoft.NetApp.KeySource","com.azure.resourcemanager.netapp.models.KeyVaultPrivateEndpoint":"Microsoft.NetApp.KeyVaultPrivateEndpoint","com.azure.resourcemanager.netapp.models.KeyVaultProperties":"Microsoft.NetApp.KeyVaultProperties","com.azure.resourcemanager.netapp.models.KeyVaultStatus":"Microsoft.NetApp.KeyVaultStatus","com.azure.resourcemanager.netapp.models.LargeVolumeType":"Microsoft.NetApp.LargeVolumeType","com.azure.resourcemanager.netapp.models.LdapConfiguration":"Microsoft.NetApp.LdapConfiguration","com.azure.resourcemanager.netapp.models.LdapSearchScopeOpt":"Microsoft.NetApp.LdapSearchScopeOpt","com.azure.resourcemanager.netapp.models.LdapServerType":"Microsoft.NetApp.LdapServerType","com.azure.resourcemanager.netapp.models.LdapState":"Microsoft.NetApp.LdapState","com.azure.resourcemanager.netapp.models.ListReplicationsRequest":"Microsoft.NetApp.ListReplicationsRequest","com.azure.resourcemanager.netapp.models.LogSpecification":"Microsoft.NetApp.LogSpecification","com.azure.resourcemanager.netapp.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.netapp.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.netapp.models.MetricAggregationType":"Microsoft.NetApp.MetricAggregationType","com.azure.resourcemanager.netapp.models.MetricSpecification":"Microsoft.NetApp.MetricSpecification","com.azure.resourcemanager.netapp.models.MirrorState":"Microsoft.NetApp.MirrorState","com.azure.resourcemanager.netapp.models.MonthlySchedule":"Microsoft.NetApp.MonthlySchedule","com.azure.resourcemanager.netapp.models.MountTargetProperties":"Microsoft.NetApp.MountTargetProperties","com.azure.resourcemanager.netapp.models.MultiAdStatus":"Microsoft.NetApp.MultiAdStatus","com.azure.resourcemanager.netapp.models.NetAppAccountPatch":"Microsoft.NetApp.NetAppAccountPatch","com.azure.resourcemanager.netapp.models.NetworkFeatures":"Microsoft.NetApp.NetworkFeatures","com.azure.resourcemanager.netapp.models.NetworkSiblingSetProvisioningState":"Microsoft.NetApp.NetworkSiblingSetProvisioningState","com.azure.resourcemanager.netapp.models.NfsUser":"Microsoft.NetApp.NfsUser","com.azure.resourcemanager.netapp.models.NicInfo":"Microsoft.NetApp.NicInfo","com.azure.resourcemanager.netapp.models.OperationDisplay":"Microsoft.NetApp.OperationDisplay","com.azure.resourcemanager.netapp.models.OriginClusterInformation":"Microsoft.NetApp.OriginClusterInformation","com.azure.resourcemanager.netapp.models.PeerClusterForVolumeMigrationRequest":"Microsoft.NetApp.PeerClusterForVolumeMigrationRequest","com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs":"Microsoft.NetApp.PlacementKeyValuePairs","com.azure.resourcemanager.netapp.models.PolicyStatus":"Microsoft.NetApp.PolicyStatus","com.azure.resourcemanager.netapp.models.PoolChangeRequest":"Microsoft.NetApp.PoolChangeRequest","com.azure.resourcemanager.netapp.models.ProtocolTypes":"Microsoft.NetApp.ProtocolTypes","com.azure.resourcemanager.netapp.models.ProvisioningState":"Microsoft.NetApp.NetAppProvisioningState","com.azure.resourcemanager.netapp.models.QosType":"Microsoft.NetApp.QosType","com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest":"Microsoft.NetApp.QueryNetworkSiblingSetRequest","com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest":"Microsoft.NetApp.QuotaAvailabilityRequest","com.azure.resourcemanager.netapp.models.QuotaReport":"Microsoft.NetApp.QuotaReport","com.azure.resourcemanager.netapp.models.RansomwareProtectionPatchSettings":"Microsoft.NetApp.RansomwareProtectionPatchSettings","com.azure.resourcemanager.netapp.models.RansomwareProtectionSettings":"Microsoft.NetApp.RansomwareProtectionSettings","com.azure.resourcemanager.netapp.models.RansomwareReportProperties":"Microsoft.NetApp.RansomwareReportProperties","com.azure.resourcemanager.netapp.models.RansomwareReportSeverity":"Microsoft.NetApp.RansomwareReportSeverity","com.azure.resourcemanager.netapp.models.RansomwareReportState":"Microsoft.NetApp.RansomwareReportState","com.azure.resourcemanager.netapp.models.RansomwareSuspectResolution":"Microsoft.NetApp.RansomwareSuspectResolution","com.azure.resourcemanager.netapp.models.RansomwareSuspects":"Microsoft.NetApp.RansomwareSuspects","com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest":"Microsoft.NetApp.RansomwareSuspectsClearRequest","com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest":"Microsoft.NetApp.ReestablishReplicationRequest","com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem":"Microsoft.NetApp.RegionInfoAvailabilityZoneMappingsItem","com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity":"Microsoft.NetApp.RegionStorageToNetworkProximity","com.azure.resourcemanager.netapp.models.RelocateVolumeRequest":"Microsoft.NetApp.RelocateVolumeRequest","com.azure.resourcemanager.netapp.models.RemotePath":"Microsoft.NetApp.RemotePath","com.azure.resourcemanager.netapp.models.ReplicationMirrorState":"Microsoft.NetApp.ReplicationMirrorState","com.azure.resourcemanager.netapp.models.ReplicationObject":"Microsoft.NetApp.ReplicationObject","com.azure.resourcemanager.netapp.models.ReplicationSchedule":"Microsoft.NetApp.ReplicationSchedule","com.azure.resourcemanager.netapp.models.ReplicationType":"Microsoft.NetApp.ReplicationType","com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest":"Microsoft.NetApp.ResourceNameAvailabilityRequest","com.azure.resourcemanager.netapp.models.SecretPassword":"Microsoft.NetApp.SecretPassword","com.azure.resourcemanager.netapp.models.SecretPasswordIdentity":"Microsoft.NetApp.SecretPasswordIdentity","com.azure.resourcemanager.netapp.models.SecretPasswordKeyVaultProperties":"Microsoft.NetApp.SecretPasswordKeyVaultProperties","com.azure.resourcemanager.netapp.models.SecurityStyle":"Microsoft.NetApp.SecurityStyle","com.azure.resourcemanager.netapp.models.ServiceLevel":"Microsoft.NetApp.ServiceLevel","com.azure.resourcemanager.netapp.models.ServiceSpecification":"Microsoft.NetApp.ServiceSpecification","com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration":"Microsoft.NetApp.SmbAccessBasedEnumeration","com.azure.resourcemanager.netapp.models.SmbEncryptionState":"Microsoft.NetApp.SmbEncryptionState","com.azure.resourcemanager.netapp.models.SmbNonBrowsable":"Microsoft.NetApp.SmbNonBrowsable","com.azure.resourcemanager.netapp.models.SmbSettings":"Microsoft.NetApp.SmbSettings","com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility":"Microsoft.NetApp.SnapshotDirectoryVisibility","com.azure.resourcemanager.netapp.models.SnapshotPolicyPatch":"Microsoft.NetApp.SnapshotPolicyPatch","com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles":"Microsoft.NetApp.SnapshotRestoreFiles","com.azure.resourcemanager.netapp.models.SnapshotUsage":"Microsoft.NetApp.SnapshotUsage","com.azure.resourcemanager.netapp.models.SubvolumePatchRequest":"Microsoft.NetApp.SubvolumePatchRequest","com.azure.resourcemanager.netapp.models.SuspectFile":"Microsoft.NetApp.SuspectFile","com.azure.resourcemanager.netapp.models.Type":"Microsoft.NetApp.Type","com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest":"Microsoft.NetApp.UpdateNetworkSiblingSetRequest","com.azure.resourcemanager.netapp.models.UsageName":"Microsoft.NetApp.UsageName","com.azure.resourcemanager.netapp.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.netapp.models.VolumeBackupProperties":"Microsoft.NetApp.VolumeBackupProperties","com.azure.resourcemanager.netapp.models.VolumeBackupRelationshipStatus":"Microsoft.NetApp.VolumeBackupRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeBackups":"Microsoft.NetApp.VolumeBackups","com.azure.resourcemanager.netapp.models.VolumeGroupMetadata":"Microsoft.NetApp.VolumeGroupMetaData","com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties":"Microsoft.NetApp.VolumeGroupVolumeProperties","com.azure.resourcemanager.netapp.models.VolumeLanguage":"Microsoft.NetApp.VolumeLanguage","com.azure.resourcemanager.netapp.models.VolumePatch":"Microsoft.NetApp.VolumePatch","com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection":"Microsoft.NetApp.VolumePatchPropertiesDataProtection","com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy":"Microsoft.NetApp.VolumePatchPropertiesExportPolicy","com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection":"Microsoft.NetApp.VolumePropertiesDataProtection","com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy":"Microsoft.NetApp.VolumePropertiesExportPolicy","com.azure.resourcemanager.netapp.models.VolumeQuotaRulePatch":"Microsoft.NetApp.VolumeQuotaRulePatch","com.azure.resourcemanager.netapp.models.VolumeRelocationProperties":"Microsoft.NetApp.VolumeRelocationProperties","com.azure.resourcemanager.netapp.models.VolumeReplicationRelationshipStatus":"Microsoft.NetApp.VolumeReplicationRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeRestoreRelationshipStatus":"Microsoft.NetApp.VolumeRestoreRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeRevert":"Microsoft.NetApp.VolumeRevert","com.azure.resourcemanager.netapp.models.VolumeSize":"Microsoft.NetApp.VolumeSize","com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties":"Microsoft.NetApp.VolumeSnapshotProperties","com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity":"Microsoft.NetApp.VolumeStorageToNetworkProximity","com.azure.resourcemanager.netapp.models.WeeklySchedule":"Microsoft.NetApp.WeeklySchedule"},"generatedFiles":["src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java","src/main/java/com/azure/resourcemanager/netapp/fluent/AccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ActiveDirectoryConfigsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderBackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderVolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BucketsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticCapacityPoolsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticVolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceRegionInfosClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceUsagesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourcesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/PoolsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/RansomwareReportsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SubvolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeGroupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeQuotaRulesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ActiveDirectoryConfigInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketGenerateCredentialsInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CacheInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckAvailabilityResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckElasticResourceAvailabilityResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ClusterPeerCommandResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticAccountInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupVaultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticCapacityPoolInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticVolumeInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetGroupIdListForLdapUserResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetKeyVaultStatusResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetKeyVaultStatusResponseProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ListQuotaReportResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetworkSiblingSetInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PeeringPassphrasesInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/QuotaItemProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RansomwareReportInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeInfoInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumePatchParams.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SvmPeerCommandResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/UsageProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/UsageResultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRuleInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRulesProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/netapp/fluent/package-info.java","src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketGenerateCredentialsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CheckAvailabilityResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CheckElasticResourceAvailabilityResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeerCommandResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumeImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/GetGroupIdListForLdapUserResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/GetKeyVaultStatusResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ListQuotaReportResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceUsagesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceUsagesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetworkSiblingSetImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PeeringPassphrasesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoResourceImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RestoreStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyVolumeListImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubscriptionQuotaItemImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeInfoImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeModelImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeerCommandResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/UsageResultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupDetailsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRuleImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ActiveDirectoryConfigListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupPoliciesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupVaultsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BucketList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/CacheList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/CapacityPoolList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticAccountListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupPolicyListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupVaultListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticCapacityPoolListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyVolumeList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticVolumeListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ListReplications.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/NetAppAccountList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/QuotaItemList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/RansomwareReportsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/RegionInfosList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SnapshotPoliciesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SnapshotsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SubvolumesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/UsagesListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeGroupList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeQuotaRulesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/package-info.java","src/main/java/com/azure/resourcemanager/netapp/models/AcceptGrowCapacityPoolForShortTermCloneSplit.java","src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.java","src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfig.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigs.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ActualRansomwareProtectionState.java","src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java","src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java","src/main/java/com/azure/resourcemanager/netapp/models/Backup.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVault.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/Backups.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderBackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderVolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakFileLocksRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakthroughMode.java","src/main/java/com/azure/resourcemanager/netapp/models/Bucket.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketCredentialsExpiry.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketGenerateCredentials.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPatchPermissions.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPermissions.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketServerPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketServerProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/Buckets.java","src/main/java/com/azure/resourcemanager/netapp/models/Cache.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheLifeCycleState.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheMountTargetProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/Caches.java","src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java","src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/ChangeKeyVault.java","src/main/java/com/azure/resourcemanager/netapp/models/ChangeZoneRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckAvailabilityResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityReason.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticVolumeFilePathAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java","src/main/java/com/azure/resourcemanager/netapp/models/CifsChangeNotifyState.java","src/main/java/com/azure/resourcemanager/netapp/models/CifsUser.java","src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerCommandResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessRetrievalPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessTieringPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/CredentialsStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/DayOfWeek.java","src/main/java/com/azure/resourcemanager/netapp/models/DesiredRansomwareProtectionState.java","src/main/java/com/azure/resourcemanager/netapp/models/DestinationReplication.java","src/main/java/com/azure/resourcemanager/netapp/models/Dimension.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccount.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackup.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyState.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupType.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVault.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackups.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPool.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPools.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryption.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionConfiguration.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicyRule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticMountTargetProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv3Access.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv4Access.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticPoolEncryptionKeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticProtocolType.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticResourceAvailabilityStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticRootAccess.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticServiceLevel.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbEncryption.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshot.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyDailySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyHourlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyMonthlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyWeeklySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshots.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticUnixAccessRule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolume.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeBackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumePolicyEnforcement.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRestorationState.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRevert.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeSnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/EnableSubvolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/EnableWriteBackState.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionKeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionState.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionTransitionRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java","src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java","src/main/java/com/azure/resourcemanager/netapp/models/Exclude.java","src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalReplicationSetupStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/FileAccessLogs.java","src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/FileSystemUser.java","src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/GetKeyVaultStatusResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/GlobalFileLockingState.java","src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java","src/main/java/com/azure/resourcemanager/netapp/models/KerberosState.java","src/main/java/com/azure/resourcemanager/netapp/models/KeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultPrivateEndpoint.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/LargeVolumeType.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapConfiguration.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapSearchScopeOpt.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapServerType.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapState.java","src/main/java/com/azure/resourcemanager/netapp/models/ListQuotaReportResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/ListReplicationsRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/netapp/models/MetricAggregationType.java","src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java","src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/MountTargetProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/MultiAdStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceQuotaLimits.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceQuotaLimitsAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceRegionInfos.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceUsages.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResources.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSet.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSetProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/NfsUser.java","src/main/java/com/azure/resourcemanager/netapp/models/NicInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/Operation.java","src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/netapp/models/Operations.java","src/main/java/com/azure/resourcemanager/netapp/models/OriginClusterInformation.java","src/main/java/com/azure/resourcemanager/netapp/models/PeerClusterForVolumeMigrationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/PeeringPassphrases.java","src/main/java/com/azure/resourcemanager/netapp/models/PlacementKeyValuePairs.java","src/main/java/com/azure/resourcemanager/netapp/models/PolicyStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/PoolChangeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/Pools.java","src/main/java/com/azure/resourcemanager/netapp/models/ProtocolTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/QosType.java","src/main/java/com/azure/resourcemanager/netapp/models/QueryNetworkSiblingSetRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/QuotaReport.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionPatchSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReport.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportSeverity.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportState.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReports.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectResolution.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspects.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectsClearRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/ReestablishReplicationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoAvailabilityZoneMappingsItem.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionStorageToNetworkProximity.java","src/main/java/com/azure/resourcemanager/netapp/models/RelocateVolumeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RemotePath.java","src/main/java/com/azure/resourcemanager/netapp/models/Replication.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationMirrorState.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationType.java","src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RestoreStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/SecretPassword.java","src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordKeyVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java","src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java","src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbAccessBasedEnumeration.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbEncryptionState.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbNonBrowsable.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/Snapshot.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotDirectoryVisibility.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyVolumeList.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotRestoreFiles.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotUsage.java","src/main/java/com/azure/resourcemanager/netapp/models/Snapshots.java","src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItem.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeModel.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumePatchRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/Subvolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/SuspectFile.java","src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerCommandResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/Type.java","src/main/java/com/azure/resourcemanager/netapp/models/UpdateNetworkSiblingSetRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/UsageName.java","src/main/java/com/azure/resourcemanager/netapp/models/UsageResult.java","src/main/java/com/azure/resourcemanager/netapp/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/Volume.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroup.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupDetails.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroups.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeLanguage.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRule.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulePatch.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRules.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRelocationProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeReplicationRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRestoreRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeSize.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java","src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java","src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/package-info.java","src/main/java/com/azure/resourcemanager/netapp/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json index b1464c1aa1c3..fdbabe6bdace 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.netapp.implementation.AccountsClientImpl$AccountsService"],["com.azure.resourcemanager.netapp.implementation.BackupPoliciesClientImpl$BackupPoliciesService"],["com.azure.resourcemanager.netapp.implementation.BackupVaultsClientImpl$BackupVaultsService"],["com.azure.resourcemanager.netapp.implementation.BackupsClientImpl$BackupsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderAccountsClientImpl$BackupsUnderAccountsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderBackupVaultsClientImpl$BackupsUnderBackupVaultsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderVolumesClientImpl$BackupsUnderVolumesService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsAccountsClientImpl$NetAppResourceQuotaLimitsAccountsService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsClientImpl$NetAppResourceQuotaLimitsService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceRegionInfosClientImpl$NetAppResourceRegionInfosService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceUsagesClientImpl$NetAppResourceUsagesService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourcesClientImpl$NetAppResourcesService"],["com.azure.resourcemanager.netapp.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.netapp.implementation.PoolsClientImpl$PoolsService"],["com.azure.resourcemanager.netapp.implementation.SnapshotPoliciesClientImpl$SnapshotPoliciesService"],["com.azure.resourcemanager.netapp.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.netapp.implementation.SubvolumesClientImpl$SubvolumesService"],["com.azure.resourcemanager.netapp.implementation.VolumeGroupsClientImpl$VolumeGroupsService"],["com.azure.resourcemanager.netapp.implementation.VolumeQuotaRulesClientImpl$VolumeQuotaRulesService"],["com.azure.resourcemanager.netapp.implementation.VolumesClientImpl$VolumesService"]] \ No newline at end of file +[["com.azure.resourcemanager.netapp.implementation.AccountsClientImpl$AccountsService"],["com.azure.resourcemanager.netapp.implementation.ActiveDirectoryConfigsClientImpl$ActiveDirectoryConfigsService"],["com.azure.resourcemanager.netapp.implementation.BackupPoliciesClientImpl$BackupPoliciesService"],["com.azure.resourcemanager.netapp.implementation.BackupVaultsClientImpl$BackupVaultsService"],["com.azure.resourcemanager.netapp.implementation.BackupsClientImpl$BackupsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderAccountsClientImpl$BackupsUnderAccountsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderBackupVaultsClientImpl$BackupsUnderBackupVaultsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderVolumesClientImpl$BackupsUnderVolumesService"],["com.azure.resourcemanager.netapp.implementation.BucketsClientImpl$BucketsService"],["com.azure.resourcemanager.netapp.implementation.CachesClientImpl$CachesService"],["com.azure.resourcemanager.netapp.implementation.ElasticAccountsClientImpl$ElasticAccountsService"],["com.azure.resourcemanager.netapp.implementation.ElasticBackupPoliciesClientImpl$ElasticBackupPoliciesService"],["com.azure.resourcemanager.netapp.implementation.ElasticBackupVaultsClientImpl$ElasticBackupVaultsService"],["com.azure.resourcemanager.netapp.implementation.ElasticBackupsClientImpl$ElasticBackupsService"],["com.azure.resourcemanager.netapp.implementation.ElasticCapacityPoolsClientImpl$ElasticCapacityPoolsService"],["com.azure.resourcemanager.netapp.implementation.ElasticSnapshotPoliciesClientImpl$ElasticSnapshotPoliciesService"],["com.azure.resourcemanager.netapp.implementation.ElasticSnapshotsClientImpl$ElasticSnapshotsService"],["com.azure.resourcemanager.netapp.implementation.ElasticVolumesClientImpl$ElasticVolumesService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsAccountsClientImpl$NetAppResourceQuotaLimitsAccountsService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsClientImpl$NetAppResourceQuotaLimitsService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceRegionInfosClientImpl$NetAppResourceRegionInfosService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceUsagesClientImpl$NetAppResourceUsagesService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourcesClientImpl$NetAppResourcesService"],["com.azure.resourcemanager.netapp.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.netapp.implementation.PoolsClientImpl$PoolsService"],["com.azure.resourcemanager.netapp.implementation.RansomwareReportsClientImpl$RansomwareReportsService"],["com.azure.resourcemanager.netapp.implementation.SnapshotPoliciesClientImpl$SnapshotPoliciesService"],["com.azure.resourcemanager.netapp.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.netapp.implementation.SubvolumesClientImpl$SubvolumesService"],["com.azure.resourcemanager.netapp.implementation.VolumeGroupsClientImpl$VolumeGroupsService"],["com.azure.resourcemanager.netapp.implementation.VolumeQuotaRulesClientImpl$VolumeQuotaRulesService"],["com.azure.resourcemanager.netapp.implementation.VolumesClientImpl$VolumesService"]] \ No newline at end of file diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsChangeKeyVaultSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsChangeKeyVaultSamples.java index c5709805f96d..2c29b56fb306 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsChangeKeyVaultSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsChangeKeyVaultSamples.java @@ -13,7 +13,7 @@ */ public final class AccountsChangeKeyVaultSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_ChangeKeyVault.json + * x-ms-original-file: 2025-09-01-preview/Accounts_ChangeKeyVault.json */ /** * Sample code: Accounts_ChangeKeyVault. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java index 7ca3ef06ba80..2dd1f163aa47 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01-preview/Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. @@ -24,7 +24,7 @@ public static void accountsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: 2025-09-01/Accounts_CreateOrUpdateAD.json + * x-ms-original-file: 2025-09-01-preview/Accounts_CreateOrUpdateAD.json */ /** * Sample code: Accounts_CreateOrUpdateWithActiveDirectory. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java index 1250ff85ab2e..fd09276f602d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_Delete.json + * x-ms-original-file: 2025-09-01-preview/Accounts_Delete.json */ /** * Sample code: Accounts_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.java index 65a8baee210a..00820cd7cdd0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class AccountsGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_Get.json + * x-ms-original-file: 2025-09-01-preview/Accounts_Get.json */ /** * Sample code: Accounts_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetChangeKeyVaultInformationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetChangeKeyVaultInformationSamples.java index 9a1625598ff9..31ba51b56688 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetChangeKeyVaultInformationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetChangeKeyVaultInformationSamples.java @@ -9,7 +9,7 @@ */ public final class AccountsGetChangeKeyVaultInformationSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_GetChangeKeyVaultInformation.json + * x-ms-original-file: 2025-09-01-preview/Accounts_GetChangeKeyVaultInformation.json */ /** * Sample code: Accounts_GetChangeKeyVaultInformation. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.java index 393d02fd7a26..896f744c994c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class AccountsListByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_List.json + * x-ms-original-file: 2025-09-01-preview/Accounts_List.json */ /** * Sample code: Accounts_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.java index f17fcecd0cbb..ab08e5991c4a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.java @@ -9,7 +9,7 @@ */ public final class AccountsListSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_ListBySubscription.json + * x-ms-original-file: 2025-09-01-preview/Accounts_ListBySubscription.json */ /** * Sample code: Accounts_ListBySubscription. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsSamples.java index 45ab43ecc529..6ef437eed546 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsSamples.java @@ -9,7 +9,7 @@ */ public final class AccountsRenewCredentialsSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_RenewCredentials.json + * x-ms-original-file: 2025-09-01-preview/Accounts_RenewCredentials.json */ /** * Sample code: Accounts_RenewCredentials. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsTransitionToCmkSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsTransitionToCmkSamples.java index 0050845090f7..0d6d7e011dab 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsTransitionToCmkSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsTransitionToCmkSamples.java @@ -11,7 +11,7 @@ */ public final class AccountsTransitionToCmkSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_TransitionEncryptionKey.json + * x-ms-original-file: 2025-09-01-preview/Accounts_TransitionEncryptionKey.json */ /** * Sample code: Accounts_MigrateEncryptionKey. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.java index 9aef1cdece02..a5da83b19c2e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_Update.json + * x-ms-original-file: 2025-09-01-preview/Accounts_Update.json */ /** * Sample code: Accounts_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..18cdb5588920 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsCreateOrUpdateSamples.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.netapp.models.SecretPassword; +import com.azure.resourcemanager.netapp.models.SecretPasswordIdentity; +import com.azure.resourcemanager.netapp.models.SecretPasswordKeyVaultProperties; +import com.azure.resourcemanager.netapp.models.UserAssignedIdentity; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ActiveDirectoryConfigs CreateOrUpdate. + */ +public final class ActiveDirectoryConfigsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_CreateOrUpdate.json + */ + /** + * Sample code: ActiveDirectoryConfigs_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + activeDirectoryConfigsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs() + .define("adconfig1") + .withRegion("eastus") + .withExistingResourceGroup("myRG") + .withTags(mapOf("ac-tag1", "activeDirectoryConfig1")) + .withProperties(new ActiveDirectoryConfigProperties().withUserName("admin1") + .withDns(Arrays.asList("10.10.10.4", "10.10.10.5")) + .withSmbServerName("smbServer") + .withOrganizationalUnit("OU=Computers,DC=corp,DC=contoso,DC=com") + .withSite("Default-First-Site-Name") + .withBackupOperators(Arrays.asList("backupOp1")) + .withAdministrators(Arrays.asList("admin1")) + .withSecurityOperators(Arrays.asList("secOp1")) + .withDomain("example.net") + .withSecretPassword(new SecretPassword() + .withKeyVaultProperties( + new SecretPasswordKeyVaultProperties().withKeyVaultUri("fakeTokenPlaceholder") + .withSecretName("fakeTokenPlaceholder")) + .withIdentity(new SecretPasswordIdentity().withUserAssignedIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentity1")))) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentity1", + new UserAssignedIdentity()))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsDeleteSamples.java new file mode 100644 index 000000000000..20c50a91aa55 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ActiveDirectoryConfigs Delete. + */ +public final class ActiveDirectoryConfigsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_Delete.json + */ + /** + * Sample code: ActiveDirectoryConfigs_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void activeDirectoryConfigsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs().delete("myRG", "adconfig1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsGetByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..79ea4acca526 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ActiveDirectoryConfigs GetByResourceGroup. + */ +public final class ActiveDirectoryConfigsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_Get.json + */ + /** + * Sample code: ActiveDirectoryConfigs_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void activeDirectoryConfigsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs() + .getByResourceGroupWithResponse("myRG", "adconfig1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListByResourceGroupSamples.java new file mode 100644 index 000000000000..39634eafa017 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ActiveDirectoryConfigs ListByResourceGroup. + */ +public final class ActiveDirectoryConfigsListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_ListByResourceGroup.json + */ + /** + * Sample code: ActiveDirectoryConfigs_ListByResourceGroup. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + activeDirectoryConfigsListByResourceGroup(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs().listByResourceGroup("myRG", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListSamples.java new file mode 100644 index 000000000000..fbc57db5c68a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ActiveDirectoryConfigs List. + */ +public final class ActiveDirectoryConfigsListSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_ListBySubscription.json + */ + /** + * Sample code: ActiveDirectoryConfigs_ListBySubscription. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + activeDirectoryConfigsListBySubscription(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsUpdateSamples.java new file mode 100644 index 000000000000..f642225a2bf6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsUpdateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfig; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdateProperties; + +/** + * Samples for ActiveDirectoryConfigs Update. + */ +public final class ActiveDirectoryConfigsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_Update.json + */ + /** + * Sample code: ActiveDirectoryConfigs_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void activeDirectoryConfigsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ActiveDirectoryConfig resource = manager.activeDirectoryConfigs() + .getByResourceGroupWithResponse("myRG", "adconfig1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ActiveDirectoryConfigUpdateProperties().withSmbServerName("smbServer2")) + .apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java index 90969c9654f0..824e15091f23 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java @@ -9,7 +9,7 @@ */ public final class BackupPoliciesCreateSamples { /* - * x-ms-original-file: 2025-09-01/BackupPolicies_Create.json + * x-ms-original-file: 2025-09-01-preview/BackupPolicies_Create.json */ /** * Sample code: BackupPolicies_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.java index e8b206d0eb7c..d62fa3558463 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/BackupPolicies_Delete.json + * x-ms-original-file: 2025-09-01-preview/BackupPolicies_Delete.json */ /** * Sample code: BackupPolicies_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.java index 9f5a975e8e52..5ba8bb69e8c9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.java @@ -9,7 +9,7 @@ */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: 2025-09-01/BackupPolicies_Get.json + * x-ms-original-file: 2025-09-01-preview/BackupPolicies_Get.json */ /** * Sample code: Backups_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java index f44671d24222..9a2b2377e491 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java @@ -9,7 +9,7 @@ */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: 2025-09-01/BackupPolicies_List.json + * x-ms-original-file: 2025-09-01-preview/BackupPolicies_List.json */ /** * Sample code: BackupPolicies_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.java index 740692709757..c7456268b5c5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class BackupPoliciesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/BackupPolicies_Update.json + * x-ms-original-file: 2025-09-01-preview/BackupPolicies_Update.json */ /** * Sample code: BackupPolicies_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateSamples.java index 2b3ab145f4e8..4a1b970043c6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ */ public final class BackupVaultsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/BackupVaults_Create.json + * x-ms-original-file: 2025-09-01-preview/BackupVaults_Create.json */ /** * Sample code: BackupVault_CreateOrUpdate. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsDeleteSamples.java index a49ed100c629..bbd2ae94578f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class BackupVaultsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/BackupVaults_Delete.json + * x-ms-original-file: 2025-09-01-preview/BackupVaults_Delete.json */ /** * Sample code: BackupVaults_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetSamples.java index 9d33d7b31e74..63ceae55a5b6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetSamples.java @@ -9,7 +9,7 @@ */ public final class BackupVaultsGetSamples { /* - * x-ms-original-file: 2025-09-01/BackupVaults_Get.json + * x-ms-original-file: 2025-09-01-preview/BackupVaults_Get.json */ /** * Sample code: BackupVaults_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountSamples.java index 2115deca3e9f..027c913dfe29 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountSamples.java @@ -9,7 +9,7 @@ */ public final class BackupVaultsListByNetAppAccountSamples { /* - * x-ms-original-file: 2025-09-01/BackupVaults_List.json + * x-ms-original-file: 2025-09-01-preview/BackupVaults_List.json */ /** * Sample code: BackupVaults_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsUpdateSamples.java index 33e1cb52fb88..b70f7fb5a990 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class BackupVaultsUpdateSamples { /* - * x-ms-original-file: 2025-09-01/BackupVaults_Update.json + * x-ms-original-file: 2025-09-01-preview/BackupVaults_Update.json */ /** * Sample code: BackupVaults_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java index bca3b1b328d3..951b1ebb589d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java @@ -9,7 +9,7 @@ */ public final class BackupsCreateSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_Create.json + * x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_Create.json */ /** * Sample code: BackupsUnderBackupVault_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java index 707e20747ec1..d1c3c6d5ee3b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class BackupsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_Delete.json + * x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_Delete.json */ /** * Sample code: BackupsUnderBackupVault_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusSamples.java index b70e1b841ff7..7d098240392e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusSamples.java @@ -9,7 +9,7 @@ */ public final class BackupsGetLatestStatusSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_LatestBackupStatus.json + * x-ms-original-file: 2025-09-01-preview/Volumes_LatestBackupStatus.json */ /** * Sample code: Volumes_BackupStatus. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java index a40ecc0079b0..26ed25e10036 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java @@ -9,7 +9,7 @@ */ public final class BackupsGetSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_Get.json + * x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_Get.json */ /** * Sample code: BackupsUnderBackupVault_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusSamples.java index 1a99783a1c87..a306c4a56675 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusSamples.java @@ -9,7 +9,7 @@ */ public final class BackupsGetVolumeLatestRestoreStatusSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_LatestRestoreStatus.json + * x-ms-original-file: 2025-09-01-preview/Volumes_LatestRestoreStatus.json */ /** * Sample code: Volumes_RestoreStatus. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultSamples.java index 4667354817cb..2986dd12ac21 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultSamples.java @@ -9,14 +9,14 @@ */ public final class BackupsListByVaultSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_List.json + * x-ms-original-file: 2025-09-01-preview/Backups_ListByVault.json */ /** - * Sample code: Backups_List. + * Sample code: Backups_ListByVault. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + public static void backupsListByVault(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { manager.backups().listByVault("myRG", "account1", "backupVault1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderAccountMigrateBackupsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderAccountMigrateBackupsSamples.java index c84d8a2e5ad5..8a5c83e3494b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderAccountMigrateBackupsSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderAccountMigrateBackupsSamples.java @@ -11,7 +11,7 @@ */ public final class BackupsUnderAccountMigrateBackupsSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderAccount_Migrate.json + * x-ms-original-file: 2025-09-01-preview/BackupsUnderAccount_Migrate.json */ /** * Sample code: BackupsUnderAccount_Migrate. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderBackupVaultRestoreFilesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderBackupVaultRestoreFilesSamples.java index e92ae36bbc8b..58c390718302 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderBackupVaultRestoreFilesSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderBackupVaultRestoreFilesSamples.java @@ -12,7 +12,7 @@ */ public final class BackupsUnderBackupVaultRestoreFilesSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_SingleFileRestore.json + * x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_SingleFileRestore.json */ /** * Sample code: Backups_SingleFileRestore. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderVolumeMigrateBackupsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderVolumeMigrateBackupsSamples.java index 15ce7ce18e65..31103ad94fa7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderVolumeMigrateBackupsSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderVolumeMigrateBackupsSamples.java @@ -11,7 +11,7 @@ */ public final class BackupsUnderVolumeMigrateBackupsSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderVolume_Migrate.json + * x-ms-original-file: 2025-09-01-preview/BackupsUnderVolume_Migrate.json */ /** * Sample code: BackupsUnderVolume_Migrate. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java index 6de7243d0392..b6c33c55e1e6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class BackupsUpdateSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_Update.json + * x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_Update.json */ /** * Sample code: BackupsUnderBackupVault_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..e7c9a142e652 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerProperties; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.NfsUser; + +/** + * Samples for Buckets CreateOrUpdate. + */ +public final class BucketsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Buckets_CreateOrUpdate.json + */ + /** + * Sample code: Buckets_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets() + .define("bucket1") + .withExistingVolume("myRG", "account1", "pool1", "volume1") + .withPath("/path") + .withFileSystemUser(new FileSystemUser().withNfsUser(new NfsUser().withUserId(1001L).withGroupId(1000L))) + .withServer(new BucketServerProperties().withFqdn("fullyqualified.domainname.com") + .withCertificateObject("<REDACTED>")) + .withPermissions(BucketPermissions.READ_ONLY) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsDeleteSamples.java new file mode 100644 index 000000000000..29ca799fa620 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for Buckets Delete. + */ +public final class BucketsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Buckets_Delete.json + */ + /** + * Sample code: Buckets_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets().delete("myRG", "account1", "pool1", "volume1", "bucket1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGenerateCredentialsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGenerateCredentialsSamples.java new file mode 100644 index 000000000000..c69ef3467c02 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGenerateCredentialsSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry; + +/** + * Samples for Buckets GenerateCredentials. + */ +public final class BucketsGenerateCredentialsSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Buckets_GenerateCredentials.json + */ + /** + * Sample code: Buckets_GenerateCredentials. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsGenerateCredentials(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets() + .generateCredentialsWithResponse("myRG", "account1", "pool1", "volume1", "bucket1", + new BucketCredentialsExpiry().withKeyPairExpiryDays(3), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGetSamples.java new file mode 100644 index 000000000000..9594daa6aea4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for Buckets Get. + */ +public final class BucketsGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Buckets_Get.json + */ + /** + * Sample code: Buckets_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets() + .getWithResponse("myRG", "account1", "pool1", "volume1", "bucket1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsListSamples.java new file mode 100644 index 000000000000..dc100eaace89 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for Buckets List. + */ +public final class BucketsListSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Buckets_List.json + */ + /** + * Sample code: Buckets_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets().list("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsUpdateSamples.java new file mode 100644 index 000000000000..83fd298c5afe --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsUpdateSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.Bucket; +import com.azure.resourcemanager.netapp.models.BucketPatchPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerPatchProperties; + +/** + * Samples for Buckets Update. + */ +public final class BucketsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Buckets_Update.json + */ + /** + * Sample code: Buckets_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + Bucket resource = manager.buckets() + .getWithResponse("myRG", "account1", "pool1", "volume1", "bucket1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withServer(new BucketServerPatchProperties().withFqdn("fullyqualified.domainname.com") + .withCertificateObject("<REDACTED>")) + .withPermissions(BucketPatchPermissions.READ_WRITE) + .apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..90dff2f65ae5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesCreateOrUpdateSamples.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.CacheProperties; +import com.azure.resourcemanager.netapp.models.EncryptionKeySource; +import com.azure.resourcemanager.netapp.models.LdapServerType; +import com.azure.resourcemanager.netapp.models.LdapState; +import com.azure.resourcemanager.netapp.models.OriginClusterInformation; +import java.util.Arrays; + +/** + * Samples for Caches CreateOrUpdate. + */ +public final class CachesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Caches_CreateOrUpdate.json + */ + /** + * Sample code: Caches_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches() + .define("cache1") + .withRegion("eastus") + .withExistingCapacityPool("myRG", "account1", "pool1") + .withProperties(new CacheProperties().withFilepath("cache-west-us2-01") + .withSize(107374182400L) + .withCacheSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/cacheVnet/subnets/cacheSubnet1") + .withPeeringSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/icLifVnet/subnets/peeringSubnet1") + .withEncryptionKeySource(EncryptionKeySource.MICROSOFT_NET_APP) + .withLdap(LdapState.ENABLED) + .withLdapServerType(LdapServerType.OPEN_LDAP) + .withOriginClusterInformation(new OriginClusterInformation().withPeerClusterName("cluster1") + .withPeerAddresses(Arrays.asList("192.0.2.10", "192.0.2.11")) + .withPeerVserverName("vserver1") + .withPeerVolumeName("originvol1"))) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesDeleteSamples.java new file mode 100644 index 000000000000..bb18ee428ba3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for Caches Delete. + */ +public final class CachesDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Caches_Delete.json + */ + /** + * Sample code: Caches_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches().delete("myRG", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesGetSamples.java new file mode 100644 index 000000000000..8f51e494d71f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for Caches Get. + */ +public final class CachesGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Caches_Get.json + */ + /** + * Sample code: Caches_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches().getWithResponse("myRG", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListByCapacityPoolsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListByCapacityPoolsSamples.java new file mode 100644 index 000000000000..49ab776afa96 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListByCapacityPoolsSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for Caches ListByCapacityPools. + */ +public final class CachesListByCapacityPoolsSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Caches_ListByCapacityPools.json + */ + /** + * Sample code: Caches_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches().listByCapacityPools("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesSamples.java new file mode 100644 index 000000000000..cae6716e81b9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for Caches ListPeeringPassphrases. + */ +public final class CachesListPeeringPassphrasesSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Caches_ListPeeringPassphrases.json + */ + /** + * Sample code: Caches_ListPeeringPassphrases. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesListPeeringPassphrases(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches() + .listPeeringPassphrasesWithResponse("myRG", "account1", "pool1", "cache-1", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesPoolChangeSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesPoolChangeSamples.java new file mode 100644 index 000000000000..e8fe147e84da --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesPoolChangeSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.PoolChangeRequest; + +/** + * Samples for Caches PoolChange. + */ +public final class CachesPoolChangeSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Caches_PoolChange.json + */ + /** + * Sample code: Caches_PoolChange. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesPoolChange(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches() + .poolChange("myRG", "account1", "pool1", "cache1", new PoolChangeRequest().withNewPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool2"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesUpdateSamples.java new file mode 100644 index 000000000000..b50607616f4f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.Cache; +import com.azure.resourcemanager.netapp.models.CacheUpdateProperties; + +/** + * Samples for Caches Update. + */ +public final class CachesUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Caches_Update.json + */ + /** + * Sample code: Caches_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + Cache resource = manager.caches() + .getWithResponse("myRG", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withProperties(new CacheUpdateProperties().withSize(214748364800L)).apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..e91a354f7457 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsCreateOrUpdateSamples.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticAccountProperties; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ElasticAccounts CreateOrUpdate. + */ +public final class ElasticAccountsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticAccounts_CreateOrUpdate.json + */ + /** + * Sample code: ElasticAccounts_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts() + .define("account1") + .withRegion("eastus") + .withExistingResourceGroup("myRG") + .withTags(mapOf("ac-tag1", "account1")) + .withProperties(new ElasticAccountProperties()) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsDeleteSamples.java new file mode 100644 index 000000000000..c3c64054dfcb --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticAccounts Delete. + */ +public final class ElasticAccountsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticAccounts_Delete.json + */ + /** + * Sample code: ElasticAccounts_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().delete("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsGetByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..5db8d339831c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsGetByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticAccounts GetByResourceGroup. + */ +public final class ElasticAccountsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticAccounts_Get.json + */ + /** + * Sample code: ElasticAccounts_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().getByResourceGroupWithResponse("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListByResourceGroupSamples.java new file mode 100644 index 000000000000..8c45aa7ee736 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticAccounts ListByResourceGroup. + */ +public final class ElasticAccountsListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticAccounts_ListByResourceGroup.json + */ + /** + * Sample code: ElasticAccounts_ListByResourceGroup. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsListByResourceGroup(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().listByResourceGroup("myRG", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListSamples.java new file mode 100644 index 000000000000..413978dfe8ad --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticAccounts List. + */ +public final class ElasticAccountsListSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticAccounts_ListBySubscription.json + */ + /** + * Sample code: ElasticAccounts_ListBySubscription. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsListBySubscription(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsUpdateSamples.java new file mode 100644 index 000000000000..1135ec77c3db --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticAccount; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ElasticAccounts Update. + */ +public final class ElasticAccountsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticAccounts_Update.json + */ + /** + * Sample code: ElasticAccounts_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticAccount resource = manager.elasticAccounts() + .getByResourceGroupWithResponse("myRG", "account1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("Tag1", "Value1")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..dd133d88ca8e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; + +/** + * Samples for ElasticBackupPolicies CreateOrUpdate. + */ +public final class ElasticBackupPoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupPolicies_CreateOrUpdate.json + */ + /** + * Sample code: ElasticBackupPolicies_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticBackupPoliciesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies() + .define("backupPolicyName") + .withRegion("westus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticBackupPolicyProperties().withDailyBackupsToKeep(10) + .withWeeklyBackupsToKeep(10) + .withMonthlyBackupsToKeep(10) + .withPolicyState(ElasticBackupPolicyState.ENABLED)) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesDeleteSamples.java new file mode 100644 index 000000000000..553af5de13a2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackupPolicies Delete. + */ +public final class ElasticBackupPoliciesDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupPolicies_Delete.json + */ + /** + * Sample code: ElasticBackupPolicies_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies() + .delete("resourceGroup", "accountName", "backupPolicyName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetSamples.java new file mode 100644 index 000000000000..7d586e1ec566 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackupPolicies Get. + */ +public final class ElasticBackupPoliciesGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupPolicies_Get.json + */ + /** + * Sample code: ElasticBackupPolicies_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupPoliciesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies() + .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountSamples.java new file mode 100644 index 000000000000..15000614e401 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackupPolicies ListByElasticAccount. + */ +public final class ElasticBackupPoliciesListByElasticAccountSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupPolicies_List.json + */ + /** + * Sample code: ElasticBackupPolicies_ListByElasticAccount. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticBackupPoliciesListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesUpdateSamples.java new file mode 100644 index 000000000000..0e5c519fe944 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesUpdateSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicy; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdateProperties; + +/** + * Samples for ElasticBackupPolicies Update. + */ +public final class ElasticBackupPoliciesUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupPolicies_Update.json + */ + /** + * Sample code: ElasticBackupPolicies_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticBackupPolicy resource = manager.elasticBackupPolicies() + .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ElasticBackupPolicyUpdateProperties().withDailyBackupsToKeep(5) + .withWeeklyBackupsToKeep(10) + .withMonthlyBackupsToKeep(10) + .withPolicyState(ElasticBackupPolicyState.ENABLED)) + .apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..1d5235c78c9b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackupVaults CreateOrUpdate. + */ +public final class ElasticBackupVaultsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupVaults_Create.json + */ + /** + * Sample code: ElasticBackupVaults_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupVaultsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults() + .define("backupVault1") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsDeleteSamples.java new file mode 100644 index 000000000000..c3554ba9739b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackupVaults Delete. + */ +public final class ElasticBackupVaultsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupVaults_Delete.json + */ + /** + * Sample code: ElasticBackupVaults_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupVaultsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults() + .delete("resourceGroup", "account1", "backupVault1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetSamples.java new file mode 100644 index 000000000000..ca1062821110 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackupVaults Get. + */ +public final class ElasticBackupVaultsGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupVaults_Get.json + */ + /** + * Sample code: ElasticBackupVaults_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupVaultsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults() + .getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountSamples.java new file mode 100644 index 000000000000..c8eb8b8a6c43 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackupVaults ListByElasticAccount. + */ +public final class ElasticBackupVaultsListByElasticAccountSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupVaults_ListByElasticAccount.json + */ + /** + * Sample code: ElasticBackupVaults_ListByElasticAccount. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticBackupVaultsListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsUpdateSamples.java new file mode 100644 index 000000000000..404573023311 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticBackupVault; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ElasticBackupVaults Update. + */ +public final class ElasticBackupVaultsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackupVaults_Update.json + */ + /** + * Sample code: ElasticBackupVaults_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupVaultsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticBackupVault resource = manager.elasticBackupVaults() + .getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("Tag1", "Value1")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..cf606b211bb7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticBackupProperties; +import com.azure.resourcemanager.netapp.models.SnapshotUsage; + +/** + * Samples for ElasticBackups CreateOrUpdate. + */ +public final class ElasticBackupsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackups_CreateOrUpdate.json + */ + /** + * Sample code: ElasticBackups_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups() + .define("backup1") + .withExistingElasticBackupVault("myRG", "account1", "backupVault1") + .withProperties(new ElasticBackupProperties().withLabel("myLabel") + .withElasticVolumeResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1") + .withSnapshotUsage(SnapshotUsage.USE_EXISTING_SNAPSHOT) + .withElasticSnapshotResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1/elasticSnapshots/snap1")) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsDeleteSamples.java new file mode 100644 index 000000000000..3496374b9dc1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackups Delete. + */ +public final class ElasticBackupsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackups_Delete.json + */ + /** + * Sample code: ElasticBackups_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups() + .delete("resourceGroup", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetSamples.java new file mode 100644 index 000000000000..6b482d91f5f2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackups Get. + */ +public final class ElasticBackupsGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackups_Get.json + */ + /** + * Sample code: ElasticBackups_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups() + .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultSamples.java new file mode 100644 index 000000000000..8d7407823515 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackups ListByVault. + */ +public final class ElasticBackupsListByVaultSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackups_ListByVault.json + */ + /** + * Sample code: ElasticBackups_ListByVault. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsListByVault(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups().listByVault("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsUpdateSamples.java new file mode 100644 index 000000000000..2e1a7a05fdc4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsUpdateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticBackup; + +/** + * Samples for ElasticBackups Update. + */ +public final class ElasticBackupsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticBackups_Update.json + */ + /** + * Sample code: ElasticBackups_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticBackup resource = manager.elasticBackups() + .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsChangeZoneSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsChangeZoneSamples.java new file mode 100644 index 000000000000..c62b89a957a0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsChangeZoneSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ChangeZoneRequest; + +/** + * Samples for ElasticCapacityPools ChangeZone. + */ +public final class ElasticCapacityPoolsChangeZoneSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_ChangeZone.json + */ + /** + * Sample code: ElasticCapacityPools_ChangeZone. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsChangeZone(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .changeZone("myRG", "account1", "pool1", new ChangeZoneRequest().withNewZone("3"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilitySamples.java new file mode 100644 index 000000000000..9378bb2677a6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilitySamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; + +/** + * Samples for ElasticCapacityPools CheckVolumeFilePathAvailability. + */ +public final class ElasticCapacityPoolsCheckVolumeFilePathAvailabilitySamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_CheckVolumeFilePathAvailability.json + */ + /** + * Sample code: ElasticCapacityPools_CheckVolumeFilePathAvailability. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsCheckVolumeFilePathAvailability( + com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .checkVolumeFilePathAvailabilityWithResponse("myRG", "account1", "pool1", + new CheckElasticVolumeFilePathAvailabilityRequest().withFilePath("my-exact-filepth"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..437a3ad74a54 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCreateOrUpdateSamples.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolProperties; +import com.azure.resourcemanager.netapp.models.ElasticEncryptionConfiguration; +import com.azure.resourcemanager.netapp.models.ElasticPoolEncryptionKeySource; +import com.azure.resourcemanager.netapp.models.ElasticServiceLevel; +import java.util.Arrays; + +/** + * Samples for ElasticCapacityPools CreateOrUpdate. + */ +public final class ElasticCapacityPoolsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_CreateOrUpdateCMK.json + */ + /** + * Sample code: ElasticCapacityPools_CreateOrUpdateCMK. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticCapacityPoolsCreateOrUpdateCMK(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .define("pool1") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticCapacityPoolProperties().withSize(4398046511104L) + .withServiceLevel(ElasticServiceLevel.ZONE_REDUNDANT) + .withEncryption(new ElasticEncryptionConfiguration() + .withElasticPoolEncryptionKeySource(ElasticPoolEncryptionKeySource.NET_APP) + .withKeyVaultPrivateEndpointResourceId("fakeTokenPlaceholder")) + .withSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withActiveDirectoryConfigResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1")) + .withZones(Arrays.asList("1", "2", "3")) + .create(); + } + + /* + * x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_CreateOrUpdate.json + */ + /** + * Sample code: ElasticCapacityPools_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .define("pool1") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticCapacityPoolProperties().withSize(4398046511104L) + .withServiceLevel(ElasticServiceLevel.ZONE_REDUNDANT) + .withSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withActiveDirectoryConfigResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1")) + .withZones(Arrays.asList("1", "2", "3")) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsDeleteSamples.java new file mode 100644 index 000000000000..8d7a080ad6d7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticCapacityPools Delete. + */ +public final class ElasticCapacityPoolsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_Delete.json + */ + /** + * Sample code: ElasticCapacityPools_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools().delete("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsGetSamples.java new file mode 100644 index 000000000000..be26ad1fd515 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticCapacityPools Get. + */ +public final class ElasticCapacityPoolsGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_Get.json + */ + /** + * Sample code: ElasticCapacityPools_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools().getWithResponse("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsListByElasticAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsListByElasticAccountSamples.java new file mode 100644 index 000000000000..9bf949ab6ee7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsListByElasticAccountSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticCapacityPools ListByElasticAccount. + */ +public final class ElasticCapacityPoolsListByElasticAccountSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_ListByElasticAccount.json + */ + /** + * Sample code: ElasticCapacityPools_ListByElasticAccount. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticCapacityPoolsListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsUpdateSamples.java new file mode 100644 index 000000000000..f88099d052ef --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsUpdateSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticCapacityPool; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdateProperties; + +/** + * Samples for ElasticCapacityPools Update. + */ +public final class ElasticCapacityPoolsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_Update.json + */ + /** + * Sample code: ElasticCapacityPools_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticCapacityPool resource = manager.elasticCapacityPools() + .getWithResponse("myRG", "account1", "pool1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ElasticCapacityPoolUpdateProperties().withSize(4398046511104L) + .withActiveDirectoryConfigResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1")) + .apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..2444e5348114 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.util.Arrays; + +/** + * Samples for ElasticSnapshotPolicies CreateOrUpdate. + */ +public final class ElasticSnapshotPoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_CreateOrUpdate.json + */ + /** + * Sample code: ElasticSnapshotPolicies_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticSnapshotPoliciesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .define("snapshotPolicyName") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticSnapshotPolicyProperties() + .withHourlySchedule(new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(2).withMinute(50)) + .withDailySchedule( + new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(4).withHour(14).withMinute(30)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(3) + .withDays(Arrays.asList(DayOfWeek.WEDNESDAY)) + .withHour(14) + .withMinute(45)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(5) + .withDaysOfMonth(Arrays.asList(10, 11, 12)) + .withHour(14) + .withMinute(15)) + .withPolicyStatus(PolicyStatus.ENABLED)) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesDeleteSamples.java new file mode 100644 index 000000000000..4a4a12b16d08 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticSnapshotPolicies Delete. + */ +public final class ElasticSnapshotPoliciesDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_Delete.json + */ + /** + * Sample code: ElasticSnapshotPolicies_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticSnapshotPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .delete("resourceGroup", "accountName", "snapshotPolicyName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetSamples.java new file mode 100644 index 000000000000..7edee6c0fa1d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticSnapshotPolicies Get. + */ +public final class ElasticSnapshotPoliciesGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_Get.json + */ + /** + * Sample code: ElasticSnapshotPolicies_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticSnapshotPoliciesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountSamples.java new file mode 100644 index 000000000000..2c91e3908478 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticSnapshotPolicies ListByElasticAccount. + */ +public final class ElasticSnapshotPoliciesListByElasticAccountSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_ListByElasticAccount.json + */ + /** + * Sample code: ElasticSnapshotPolicies_ListByElasticAccount. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticSnapshotPoliciesListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesSamples.java new file mode 100644 index 000000000000..63204d8f7408 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticSnapshotPolicies ListElasticVolumes. + */ +public final class ElasticSnapshotPoliciesListElasticVolumesSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_ListElasticVolumes.json + */ + /** + * Sample code: ElasticSnapshotPolicies_ListElasticVolumes. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticSnapshotPoliciesListElasticVolumes(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .listElasticVolumes("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesUpdateSamples.java new file mode 100644 index 000000000000..e62754e04d21 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesUpdateSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicy; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdateProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.util.Arrays; + +/** + * Samples for ElasticSnapshotPolicies Update. + */ +public final class ElasticSnapshotPoliciesUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_Update.json + */ + /** + * Sample code: ElasticSnapshotPolicies_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticSnapshotPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticSnapshotPolicy resource = manager.elasticSnapshotPolicies() + .getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ElasticSnapshotPolicyUpdateProperties() + .withHourlySchedule(new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(2).withMinute(50)) + .withDailySchedule( + new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(4).withHour(14).withMinute(30)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(3) + .withDays(Arrays.asList(DayOfWeek.WEDNESDAY)) + .withHour(14) + .withMinute(45)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(5) + .withDaysOfMonth(Arrays.asList(10, 11, 12)) + .withHour(14) + .withMinute(15)) + .withPolicyStatus(PolicyStatus.ENABLED)) + .apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..421a5317f383 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticSnapshots CreateOrUpdate. + */ +public final class ElasticSnapshotsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshots_CreateOrUpdate.json + */ + /** + * Sample code: ElasticSnapshots_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticSnapshotsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .define("snapshot1") + .withExistingElasticVolume("myRG", "account1", "pool1", "volume1") + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsDeleteSamples.java new file mode 100644 index 000000000000..a1387deedc80 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticSnapshots Delete. + */ +public final class ElasticSnapshotsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshots_Delete.json + */ + /** + * Sample code: ElasticSnapshots_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticSnapshotsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .delete("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetSamples.java new file mode 100644 index 000000000000..9b379303e41b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticSnapshots Get. + */ +public final class ElasticSnapshotsGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshots_Get.json + */ + /** + * Sample code: ElasticSnapshots_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticSnapshotsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .getWithResponse("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeSamples.java new file mode 100644 index 000000000000..77686a30e4fd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticSnapshots ListByElasticVolume. + */ +public final class ElasticSnapshotsListByElasticVolumeSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshots_ListByElasticVolume.json + */ + /** + * Sample code: ElasticSnapshots_ListByElasticVolume. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticSnapshotsListByElasticVolume(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .listByElasticVolume("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..4ffb36451f16 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateSamples.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import java.util.Arrays; + +/** + * Samples for ElasticVolumes CreateOrUpdate. + */ +public final class ElasticVolumesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_CreateOrUpdate.json + */ + /** + * Sample code: ElasticVolumes_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes() + .define("volume1") + .withRegion("eastus") + .withExistingElasticCapacityPool("myRG", "account1", "pool1") + .withProperties(new ElasticVolumeProperties().withFilePath("my-unique-file-path") + .withSize(107374182400L) + .withExportPolicy( + new ElasticExportPolicy().withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(1) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("0.0.0.0/0")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV3)) + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupPolicies/elasticBackupPolicy1") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupVaults/elasticBackupVault1")))) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesDeleteSamples.java new file mode 100644 index 000000000000..211f18ce433b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticVolumes Delete. + */ +public final class ElasticVolumesDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_Delete.json + */ + /** + * Sample code: ElasticVolumes_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes().delete("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetSamples.java new file mode 100644 index 000000000000..6cc9b91f20bf --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticVolumes Get. + */ +public final class ElasticVolumesGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_Get.json + */ + /** + * Sample code: ElasticVolumes_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes() + .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolSamples.java new file mode 100644 index 000000000000..7298e30d9baa --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticVolumes ListByElasticPool. + */ +public final class ElasticVolumesListByElasticPoolSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_ListByElasticPool.json + */ + /** + * Sample code: ElasticVolumes_ListByElasticPool. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesListByElasticPool(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes().listByElasticPool("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertSamples.java new file mode 100644 index 000000000000..84225b8c6ecb --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; + +/** + * Samples for ElasticVolumes Revert. + */ +public final class ElasticVolumesRevertSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_Revert.json + */ + /** + * Sample code: ElasticVolumes_Revert. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesRevert(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes() + .revert("myRG", "account1", "pool1", "volume1", new ElasticVolumeRevert().withSnapshotResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1/elasticSnapshots/snapshot1"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesUpdateSamples.java new file mode 100644 index 000000000000..51c5b259ae4a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesUpdateSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionPatchProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties; +import java.util.Arrays; + +/** + * Samples for ElasticVolumes Update. + */ +public final class ElasticVolumesUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_Update.json + */ + /** + * Sample code: ElasticVolumes_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticVolume resource = manager.elasticVolumes() + .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ElasticVolumeUpdateProperties() + .withExportPolicy( + new ElasticExportPolicy().withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(1) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("0.0.0.0/0")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withDataProtection(new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1")))) + .apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java index dbe826696c66..f99690c29947 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java @@ -11,7 +11,7 @@ */ public final class NetAppResourceCheckFilePathAvailabilitySamples { /* - * x-ms-original-file: 2025-09-01/CheckFilePathAvailability.json + * x-ms-original-file: 2025-09-01-preview/CheckFilePathAvailability.json */ /** * Sample code: CheckFilePathAvailability. @@ -23,7 +23,7 @@ public static void checkFilePathAvailability(com.azure.resourcemanager.netapp.Ne .checkFilePathAvailabilityWithResponse("eastus", new FilePathAvailabilityRequest() .withName("my-exact-filepth") .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java index 990e9cb3933e..29c291f1e2b6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java @@ -12,7 +12,7 @@ */ public final class NetAppResourceCheckNameAvailabilitySamples { /* - * x-ms-original-file: 2025-09-01/CheckNameAvailability.json + * x-ms-original-file: 2025-09-01-preview/CheckNameAvailability.json */ /** * Sample code: CheckNameAvailability. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.java index 657ce1bef424..4e2714bedbc8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.java @@ -12,7 +12,7 @@ */ public final class NetAppResourceCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: 2025-09-01/CheckQuotaAvailability.json + * x-ms-original-file: 2025-09-01-preview/CheckQuotaAvailability.json */ /** * Sample code: CheckQuotaAvailability. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryNetworkSiblingSetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryNetworkSiblingSetSamples.java index 61d343d73781..f1ff26ef7177 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryNetworkSiblingSetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryNetworkSiblingSetSamples.java @@ -11,7 +11,7 @@ */ public final class NetAppResourceQueryNetworkSiblingSetSamples { /* - * x-ms-original-file: 2025-09-01/NetworkSiblingSet_Query.json + * x-ms-original-file: 2025-09-01-preview/NetworkSiblingSet_Query.json */ /** * Sample code: NetworkSiblingSet_Query. @@ -23,7 +23,7 @@ public static void networkSiblingSetQuery(com.azure.resourcemanager.netapp.NetAp .queryNetworkSiblingSetWithResponse("eastus", new QueryNetworkSiblingSetRequest() .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333") .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java index 5ee2046d21d7..c0466089e408 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java @@ -9,7 +9,7 @@ */ public final class NetAppResourceQueryRegionInfoSamples { /* - * x-ms-original-file: 2025-09-01/RegionInfo.json + * x-ms-original-file: 2025-09-01-preview/RegionInfo.json */ /** * Sample code: RegionInfo_Query. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountGetSamples.java index 2b0bafad61a8..05b1b19c58b3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountGetSamples.java @@ -9,7 +9,7 @@ */ public final class NetAppResourceQuotaLimitsAccountGetSamples { /* - * x-ms-original-file: 2025-09-01/NetAppResourceQuotaLimitsAccount_Get.json + * x-ms-original-file: 2025-09-01-preview/NetAppResourceQuotaLimitsAccount_Get.json */ /** * Sample code: QuotaLimits. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountListSamples.java index 2aebfb3c1a9e..789867f8b58a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountListSamples.java @@ -9,7 +9,7 @@ */ public final class NetAppResourceQuotaLimitsAccountListSamples { /* - * x-ms-original-file: 2025-09-01/NetAppResourceQuotaLimitsAccount_List.json + * x-ms-original-file: 2025-09-01-preview/NetAppResourceQuotaLimitsAccount_List.json */ /** * Sample code: QuotaLimits. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.java index fc7466129fdb..14c5afc44b15 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.java @@ -9,7 +9,7 @@ */ public final class NetAppResourceQuotaLimitsGetSamples { /* - * x-ms-original-file: 2025-09-01/NetAppResourceQuotaLimits_Get.json + * x-ms-original-file: 2025-09-01-preview/NetAppResourceQuotaLimits_Get.json */ /** * Sample code: QuotaLimits. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.java index 71809c22a202..fcac490a6fd1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.java @@ -9,7 +9,7 @@ */ public final class NetAppResourceQuotaLimitsListSamples { /* - * x-ms-original-file: 2025-09-01/NetAppResourceQuotaLimits_List.json + * x-ms-original-file: 2025-09-01-preview/NetAppResourceQuotaLimits_List.json */ /** * Sample code: QuotaLimits. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetSamples.java index 18a6e201950c..ca4fa570c198 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetSamples.java @@ -9,7 +9,7 @@ */ public final class NetAppResourceRegionInfosGetSamples { /* - * x-ms-original-file: 2025-09-01/RegionInfos_Get.json + * x-ms-original-file: 2025-09-01-preview/RegionInfos_Get.json */ /** * Sample code: RegionInfos_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListSamples.java index 79bc01ca9623..6c1a8646feb8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListSamples.java @@ -9,7 +9,7 @@ */ public final class NetAppResourceRegionInfosListSamples { /* - * x-ms-original-file: 2025-09-01/RegionInfos_List.json + * x-ms-original-file: 2025-09-01-preview/RegionInfos_List.json */ /** * Sample code: RegionInfos_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUpdateNetworkSiblingSetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUpdateNetworkSiblingSetSamples.java index 34723b82f37b..788f8be5515a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUpdateNetworkSiblingSetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUpdateNetworkSiblingSetSamples.java @@ -12,7 +12,7 @@ */ public final class NetAppResourceUpdateNetworkSiblingSetSamples { /* - * x-ms-original-file: 2025-09-01/NetworkSiblingSet_Update.json + * x-ms-original-file: 2025-09-01-preview/NetworkSiblingSet_Update.json */ /** * Sample code: NetworkFeatures_Update. @@ -24,7 +24,7 @@ public static void networkFeaturesUpdate(com.azure.resourcemanager.netapp.NetApp .updateNetworkSiblingSet("eastus", new UpdateNetworkSiblingSetRequest() .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333") .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet") + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet") .withNetworkSiblingSetStateId("12345_44420.8001578125") .withNetworkFeatures(NetworkFeatures.STANDARD), com.azure.core.util.Context.NONE); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetSamples.java index 8ec4bda01748..cf6d4fe3c6e9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetSamples.java @@ -9,7 +9,7 @@ */ public final class NetAppResourceUsagesGetSamples { /* - * x-ms-original-file: 2025-09-01/Usages_Get.json + * x-ms-original-file: 2025-09-01-preview/Usages_Get.json */ /** * Sample code: Usages_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListSamples.java index 86f85a30f7a4..48436d7a70e3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListSamples.java @@ -9,7 +9,7 @@ */ public final class NetAppResourceUsagesListSamples { /* - * x-ms-original-file: 2025-09-01/Usages_List.json + * x-ms-original-file: 2025-09-01-preview/Usages_List.json */ /** * Sample code: Usages_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/OperationsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/OperationsListSamples.java index d77be33108f0..a69b090ec1d6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/OperationsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2025-09-01/OperationList.json + * x-ms-original-file: 2025-09-01-preview/OperationList.json */ /** * Sample code: OperationList. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.java index 0f46a092b1a1..5de52f738f53 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class PoolsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Pools_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01-preview/Pools_CreateOrUpdate.json */ /** * Sample code: Pools_CreateOrUpdate. @@ -31,7 +31,7 @@ public static void poolsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFi } /* - * x-ms-original-file: 2025-09-01/Pools_CreateOrUpdate_CustomThroughput.json + * x-ms-original-file: 2025-09-01-preview/Pools_CreateOrUpdate_CustomThroughput.json */ /** * Sample code: Pools_CreateOrUpdate_CustomThroughput. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.java index b6d2cd88d4d9..9dd0c7851307 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class PoolsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/Pools_Delete.json + * x-ms-original-file: 2025-09-01-preview/Pools_Delete.json */ /** * Sample code: Pools_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.java index 8d286360b5e5..cc3e90c26fed 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.java @@ -9,7 +9,7 @@ */ public final class PoolsGetSamples { /* - * x-ms-original-file: 2025-09-01/Pools_Get_CustomThroughput.json + * x-ms-original-file: 2025-09-01-preview/Pools_Get_CustomThroughput.json */ /** * Sample code: Pools_Get_CustomThroughput. @@ -21,7 +21,7 @@ public static void poolsGetCustomThroughput(com.azure.resourcemanager.netapp.Net } /* - * x-ms-original-file: 2025-09-01/Pools_Get.json + * x-ms-original-file: 2025-09-01-preview/Pools_Get.json */ /** * Sample code: Pools_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.java index 80bbe0258e74..f1f3d1094fdd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.java @@ -9,7 +9,7 @@ */ public final class PoolsListSamples { /* - * x-ms-original-file: 2025-09-01/Pools_List.json + * x-ms-original-file: 2025-09-01-preview/Pools_List.json */ /** * Sample code: Pools_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.java index 84937440d79c..7005b95a8d83 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class PoolsUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Pools_Update.json + * x-ms-original-file: 2025-09-01-preview/Pools_Update.json */ /** * Sample code: Pools_Update. @@ -25,7 +25,7 @@ public static void poolsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManag } /* - * x-ms-original-file: 2025-09-01/Pools_Update_CustomThroughput.json + * x-ms-original-file: 2025-09-01-preview/Pools_Update_CustomThroughput.json */ /** * Sample code: Pools_Update_CustomThroughput. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsClearSuspectsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsClearSuspectsSamples.java new file mode 100644 index 000000000000..b4a5ffa234ad --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsClearSuspectsSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.RansomwareSuspectResolution; +import com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest; +import java.util.Arrays; + +/** + * Samples for RansomwareReports ClearSuspects. + */ +public final class RansomwareReportsClearSuspectsSamples { + /* + * x-ms-original-file: 2025-09-01-preview/RansomwareReports_ClearSuspects.json + */ + /** + * Sample code: RansomwareReports_ClearSuspects. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void ransomwareReportsClearSuspects(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.ransomwareReports() + .clearSuspects("myRG", "account1", "pool1", "volume1", "ransomwareReport1", + new RansomwareSuspectsClearRequest().withResolution(RansomwareSuspectResolution.POTENTIAL_THREAT) + .withExtensions(Arrays.asList(".threat")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetSamples.java new file mode 100644 index 000000000000..3bac3e1b039e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for RansomwareReports Get. + */ +public final class RansomwareReportsGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/RansomwareReports_Get.json + */ + /** + * Sample code: RansomwareReports_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void ransomwareReportsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.ransomwareReports() + .getWithResponse("myRG", "account1", "pool1", "volume1", "ransomwareReport1", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListSamples.java new file mode 100644 index 000000000000..b94e29f7e2b5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for RansomwareReports List. + */ +public final class RansomwareReportsListSamples { + /* + * x-ms-original-file: 2025-09-01-preview/RansomwareReports_List.json + */ + /** + * Sample code: RansomwareReports_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void ransomwareReportsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.ransomwareReports().list("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.java index 1035b429db02..03dc57e10f00 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.java @@ -14,7 +14,7 @@ */ public final class SnapshotPoliciesCreateSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_Create.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_Create.json */ /** * Sample code: SnapshotPolicies_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.java index 01d86343621f..be5b7397af58 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class SnapshotPoliciesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_Delete.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_Delete.json */ /** * Sample code: SnapshotPolicies_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.java index be7679c499c3..62bcd7af3f77 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.java @@ -9,7 +9,7 @@ */ public final class SnapshotPoliciesGetSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_Get.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_Get.json */ /** * Sample code: SnapshotPolicies_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.java index a1588054e776..2f4c513ee292 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.java @@ -9,7 +9,7 @@ */ public final class SnapshotPoliciesListSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_List.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_List.json */ /** * Sample code: SnapshotPolicies_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.java index 92762757ac3d..b1ef5743a857 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.java @@ -9,7 +9,7 @@ */ public final class SnapshotPoliciesListVolumesSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_ListVolumes.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_ListVolumes.json */ /** * Sample code: SnapshotPolicies_ListVolumes. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.java index 047e65846f18..6589a5eab793 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class SnapshotPoliciesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_Update.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_Update.json */ /** * Sample code: SnapshotPolicies_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.java index 9908d5b439df..779cb32664c5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.java @@ -9,7 +9,7 @@ */ public final class SnapshotsCreateSamples { /* - * x-ms-original-file: 2025-09-01/Snapshots_Create.json + * x-ms-original-file: 2025-09-01-preview/Snapshots_Create.json */ /** * Sample code: Snapshots_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.java index 5249d736df74..3e845776d5fa 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class SnapshotsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/Snapshots_Delete.json + * x-ms-original-file: 2025-09-01-preview/Snapshots_Delete.json */ /** * Sample code: Snapshots_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.java index 0ea853436222..6b3e139368a2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.java @@ -9,7 +9,7 @@ */ public final class SnapshotsGetSamples { /* - * x-ms-original-file: 2025-09-01/Snapshots_Get.json + * x-ms-original-file: 2025-09-01-preview/Snapshots_Get.json */ /** * Sample code: Snapshots_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.java index 3eba98bc6b84..31db494cfc59 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.java @@ -9,7 +9,7 @@ */ public final class SnapshotsListSamples { /* - * x-ms-original-file: 2025-09-01/Snapshots_List.json + * x-ms-original-file: 2025-09-01-preview/Snapshots_List.json */ /** * Sample code: Snapshots_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesSamples.java index bb4a193a63e7..c8102f8ef339 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesSamples.java @@ -12,7 +12,7 @@ */ public final class SnapshotsRestoreFilesSamples { /* - * x-ms-original-file: 2025-09-01/Snapshots_SingleFileRestore.json + * x-ms-original-file: 2025-09-01-preview/Snapshots_SingleFileRestore.json */ /** * Sample code: Snapshots_SingleFileRestore. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateSamples.java index 9499267178d5..36fbbdba0fd0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateSamples.java @@ -9,7 +9,7 @@ */ public final class SubvolumesCreateSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_Create.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_Create.json */ /** * Sample code: Subvolumes_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteSamples.java index 72c8e94c7115..615e5825fcc1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class SubvolumesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_Delete.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_Delete.json */ /** * Sample code: Subvolumes_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataSamples.java index d7cf35c6f8a9..1e075011589e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataSamples.java @@ -9,7 +9,7 @@ */ public final class SubvolumesGetMetadataSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_Metadata.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_Metadata.json */ /** * Sample code: Subvolumes_Metadata. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetSamples.java index 0ceaa5906c2a..ab346ad9cbcc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetSamples.java @@ -9,7 +9,7 @@ */ public final class SubvolumesGetSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_Get.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_Get.json */ /** * Sample code: Subvolumes_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeSamples.java index 675edb0babf6..527d0acdce94 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeSamples.java @@ -9,7 +9,7 @@ */ public final class SubvolumesListByVolumeSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_List.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_List.json */ /** * Sample code: Subvolumes_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesUpdateSamples.java index 2dc97a0440c5..4ee06fdb33e1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class SubvolumesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_Update.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_Update.json */ /** * Sample code: Subvolumes_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java index 62e16c4c7e89..00355be0fe37 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java @@ -17,7 +17,7 @@ */ public final class VolumeGroupsCreateSamples { /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Create_SapHana.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Create_SapHana.json */ /** * Sample code: VolumeGroups_Create_SapHana. @@ -177,7 +177,7 @@ public static void volumeGroupsCreateSapHana(com.azure.resourcemanager.netapp.Ne } /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Create_Oracle.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Create_Oracle.json */ /** * Sample code: VolumeGroups_Create_Oracle. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java index c3e64ce5774a..0e9717581890 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class VolumeGroupsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Delete.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Delete.json */ /** * Sample code: VolumeGroups_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.java index 656144c05fa8..60e09407379d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.java @@ -9,7 +9,7 @@ */ public final class VolumeGroupsGetSamples { /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Get_SapHana.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Get_SapHana.json */ /** * Sample code: VolumeGroups_Get_SapHana. @@ -21,7 +21,7 @@ public static void volumeGroupsGetSapHana(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Get_Oracle.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Get_Oracle.json */ /** * Sample code: VolumeGroups_Get_Oracle. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.java index 5b48a2008dae..55d301b6e183 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.java @@ -9,7 +9,7 @@ */ public final class VolumeGroupsListByNetAppAccountSamples { /* - * x-ms-original-file: 2025-09-01/VolumeGroups_List_Oracle.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_List_Oracle.json */ /** * Sample code: VolumeGroups_List_Oracle. @@ -21,7 +21,7 @@ public static void volumeGroupsListOracle(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: 2025-09-01/VolumeGroups_List_SapHana.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_List_SapHana.json */ /** * Sample code: VolumeGroups_List_SapHana. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateSamples.java index 3d097e73a102..c25f1e2285c2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateSamples.java @@ -11,7 +11,7 @@ */ public final class VolumeQuotaRulesCreateSamples { /* - * x-ms-original-file: 2025-09-01/VolumeQuotaRules_Create.json + * x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_Create.json */ /** * Sample code: VolumeQuotaRules_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteSamples.java index 2df4f1d19825..8d7f2ab1cbb4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class VolumeQuotaRulesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/VolumeQuotaRules_Delete.json + * x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_Delete.json */ /** * Sample code: VolumeQuotaRules_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetSamples.java index 08c8b6a75e29..838088aa5e8e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetSamples.java @@ -9,7 +9,7 @@ */ public final class VolumeQuotaRulesGetSamples { /* - * x-ms-original-file: 2025-09-01/VolumeQuotaRules_Get.json + * x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_Get.json */ /** * Sample code: VolumeQuotaRules_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeSamples.java index 9f7599edf407..63c337e8451c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeSamples.java @@ -9,7 +9,7 @@ */ public final class VolumeQuotaRulesListByVolumeSamples { /* - * x-ms-original-file: 2025-09-01/VolumeQuotaRules_List.json + * x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_List.json */ /** * Sample code: VolumeQuotaRules_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesUpdateSamples.java index 5a94bcecc23d..b080727d4c60 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class VolumeQuotaRulesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/VolumeQuotaRules_Update.json + * x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_Update.json */ /** * Sample code: VolumeQuotaRules_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationSamples.java index b205d0bc0054..5283c4434921 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesAuthorizeExternalReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_AuthorizeExternalReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_AuthorizeExternalReplication.json */ /** * Sample code: Volumes_AuthorizeExternalReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.java index 34b9b6342778..1fefdd4f5485 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.java @@ -11,7 +11,7 @@ */ public final class VolumesAuthorizeReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_AuthorizeReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_AuthorizeReplication.json */ /** * Sample code: Volumes_AuthorizeReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksSamples.java index 006789c38340..16c7dd559117 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksSamples.java @@ -11,7 +11,7 @@ */ public final class VolumesBreakFileLocksSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_BreakFileLocks.json + * x-ms-original-file: 2025-09-01-preview/Volumes_BreakFileLocks.json */ /** * Sample code: Volumes_BreakFileLocks. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.java index eaece8caf6c1..31c46f23e89d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.java @@ -11,7 +11,7 @@ */ public final class VolumesBreakReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_BreakReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_BreakReplication.json */ /** * Sample code: Volumes_BreakReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java index ffda98db1e22..05fff37bf485 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class VolumesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01-preview/Volumes_CreateOrUpdate.json */ /** * Sample code: Volumes_CreateOrUpdate. @@ -26,7 +26,7 @@ public static void volumesCreateOrUpdate(com.azure.resourcemanager.netapp.NetApp .withCreationToken("my-unique-file-path") .withUsageThreshold(107374182400L) .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") .withServiceLevel(ServiceLevel.PREMIUM) .create(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java index 7f130eeee4b8..33293acbd34f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesDeleteReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_DeleteReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_DeleteReplication.json */ /** * Sample code: Volumes_DeleteReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.java index 47fcdbe2c2f4..71b720876795 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_Delete.json + * x-ms-original-file: 2025-09-01-preview/Volumes_Delete.json */ /** * Sample code: Volumes_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeExternalReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeExternalReplicationSamples.java index baf9935b60ec..aec7efd5038f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeExternalReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeExternalReplicationSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesFinalizeExternalReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_FinalizeExternalReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_FinalizeExternalReplication.json */ /** * Sample code: Volumes_FinalizeExternalReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationSamples.java index 8114f4870e13..19ec62835de0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesFinalizeRelocationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_FinalizeRelocation.json + * x-ms-original-file: 2025-09-01-preview/Volumes_FinalizeRelocation.json */ /** * Sample code: Volumes_FinalizeRelocation. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java index 65c3dbc905e6..d76819fc2f0b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java @@ -9,7 +9,19 @@ */ public final class VolumesGetSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_Get.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ExtraLargeVolumes_Get.json + */ + /** + * Sample code: Volumes_ExtralargeVolumeGet. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesExtralargeVolumeGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01-preview/Volumes_Get.json */ /** * Sample code: Volumes_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserSamples.java index 472bd2a60c4a..b48c08145504 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserSamples.java @@ -11,7 +11,7 @@ */ public final class VolumesListGetGroupIdListForLdapUserSamples { /* - * x-ms-original-file: 2025-09-01/GroupIdListForLDAPUser.json + * x-ms-original-file: 2025-09-01-preview/GroupIdListForLDAPUser.json */ /** * Sample code: GetGroupIdListForUser. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportSamples.java new file mode 100644 index 000000000000..3c017b0de9c1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for Volumes ListQuotaReport. + */ +public final class VolumesListQuotaReportSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Volumes_ListQuotaReport.json + */ + /** + * Sample code: ListQuotaReport. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void listQuotaReport(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().listQuotaReport("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsSamples.java index 513e30c171db..5232af7839ad 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsSamples.java @@ -12,7 +12,7 @@ */ public final class VolumesListReplicationsSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ListReplications.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ListReplications.json */ /** * Sample code: Volumes_ListReplications. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java index 6d2efcf9afd0..11efdceac1cf 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java @@ -9,7 +9,19 @@ */ public final class VolumesListSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_List.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ExtraLargeVolumes_List.json + */ + /** + * Sample code: Volumes_ExtralargeVolumeList. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesExtralargeVolumeList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().list("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01-preview/Volumes_List.json */ /** * Sample code: Volumes_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterSamples.java index 7e603cf9f754..da484f6ae192 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterSamples.java @@ -12,7 +12,7 @@ */ public final class VolumesPeerExternalClusterSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_PeerExternalCluster.json + * x-ms-original-file: 2025-09-01-preview/Volumes_PeerExternalCluster.json */ /** * Sample code: Volumes_PeerExternalCluster. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPerformReplicationTransferSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPerformReplicationTransferSamples.java index 6e7bc9ebd77d..02d604dea7fc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPerformReplicationTransferSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPerformReplicationTransferSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesPerformReplicationTransferSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_PerformReplicationTransfer.json + * x-ms-original-file: 2025-09-01-preview/Volumes_PerformReplicationTransfer.json */ /** * Sample code: Volumes_PerformReplicationTransfer. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.java index 3d880fc4ba34..9f97993189a5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.java @@ -11,7 +11,7 @@ */ public final class VolumesPoolChangeSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_PoolChange.json + * x-ms-original-file: 2025-09-01-preview/Volumes_PoolChange.json */ /** * Sample code: Volumes_AuthorizeReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java index a60fc57ce04c..ce2e51682330 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesPopulateAvailabilityZoneSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_PopulateAvailabilityZones.json + * x-ms-original-file: 2025-09-01-preview/Volumes_PopulateAvailabilityZones.json */ /** * Sample code: Volumes_PopulateAvailabilityZones. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.java index eafb4ce9cd0d..b4808d37eb27 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesReInitializeReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ReInitializeReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ReInitializeReplication.json */ /** * Sample code: Volumes_ReInitializeReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReestablishReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReestablishReplicationSamples.java index 2a97a8ecc57f..574e741169eb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReestablishReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReestablishReplicationSamples.java @@ -11,7 +11,7 @@ */ public final class VolumesReestablishReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ReestablishReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ReestablishReplication.json */ /** * Sample code: Volumes_ReestablishReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRelocateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRelocateSamples.java index 9167cd674f44..c9102acf2943 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRelocateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRelocateSamples.java @@ -11,7 +11,7 @@ */ public final class VolumesRelocateSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_Relocate.json + * x-ms-original-file: 2025-09-01-preview/Volumes_Relocate.json */ /** * Sample code: Volumes_Relocate. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java index 28bf41629cea..d299c82071ba 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesReplicationStatusSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ReplicationStatus.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ReplicationStatus.json */ /** * Sample code: Volumes_ReplicationStatus. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResetCifsPasswordSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResetCifsPasswordSamples.java index 3e4100c241be..f5ce5ca9662c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResetCifsPasswordSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResetCifsPasswordSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesResetCifsPasswordSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ResetCifsPassword.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ResetCifsPassword.json */ /** * Sample code: Volumes_ResetCifsPassword. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java index 270db0c5c89d..4c72f32863eb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesResyncReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ResyncReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ResyncReplication.json */ /** * Sample code: Volumes_ResyncReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationSamples.java index 531c6f75c9af..40e14754311a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesRevertRelocationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_RevertRelocation.json + * x-ms-original-file: 2025-09-01-preview/Volumes_RevertRelocation.json */ /** * Sample code: Volumes_RevertRelocation. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java index 870d9f4ca88e..da42db4be0d0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java @@ -11,7 +11,7 @@ */ public final class VolumesRevertSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_Revert.json + * x-ms-original-file: 2025-09-01-preview/Volumes_Revert.json */ /** * Sample code: Volumes_Revert. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesSplitCloneFromParentSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesSplitCloneFromParentSamples.java index adbae20d2d41..0d9bd0209bfc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesSplitCloneFromParentSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesSplitCloneFromParentSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesSplitCloneFromParentSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_SplitClone.json + * x-ms-original-file: 2025-09-01-preview/Volumes_SplitClone.json */ /** * Sample code: Volumes_SplitClone. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java index f65e179270fd..b8cb70c6d9b9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class VolumesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_Update.json + * x-ms-original-file: 2025-09-01-preview/Volumes_Update.json */ /** * Sample code: Volumes_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java index 2c651ea33afc..f2eb88d5a40f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java @@ -27,7 +27,7 @@ public void testRenewCredentials() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.accounts().renewCredentials("jmvl", "yzgib", com.azure.core.util.Context.NONE); + manager.accounts().renewCredentials("dcvxodkrvfsxxby", "e", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java index b3e633972c42..0c1130e8ae75 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java @@ -11,15 +11,15 @@ public final class AuthorizeRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AuthorizeRequest model = BinaryData.fromString("{\"remoteVolumeResourceId\":\"ylpstdbhhxsrzdz\"}") - .toObject(AuthorizeRequest.class); - Assertions.assertEquals("ylpstdbhhxsrzdz", model.remoteVolumeResourceId()); + AuthorizeRequest model + = BinaryData.fromString("{\"remoteVolumeResourceId\":\"konzmnsik\"}").toObject(AuthorizeRequest.class); + Assertions.assertEquals("konzmnsik", model.remoteVolumeResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AuthorizeRequest model = new AuthorizeRequest().withRemoteVolumeResourceId("ylpstdbhhxsrzdz"); + AuthorizeRequest model = new AuthorizeRequest().withRemoteVolumeResourceId("konzmnsik"); model = BinaryData.fromObject(model).toObject(AuthorizeRequest.class); - Assertions.assertEquals("ylpstdbhhxsrzdz", model.remoteVolumeResourceId()); + Assertions.assertEquals("konzmnsik", model.remoteVolumeResourceId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java index eeb21d1bc725..f6bf726f53d7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java @@ -23,7 +23,7 @@ public final class BackupPoliciesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"backupPolicyId\":\"qirwrweoox\",\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":1625380187,\"weeklyBackupsToKeep\":2004143928,\"monthlyBackupsToKeep\":109793124,\"volumesAssigned\":225627049,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"bubqmamhsycxh\",\"volumeResourceId\":\"gaztt\",\"backupsCount\":184475150,\"policyEnabled\":true},{\"volumeName\":\"mfqhppubowse\",\"volumeResourceId\":\"fgkmtdhern\",\"backupsCount\":784188527,\"policyEnabled\":true},{\"volumeName\":\"ahokqtobkauxofsh\",\"volumeResourceId\":\"hwpnulaiywzejywh\",\"backupsCount\":898369730,\"policyEnabled\":true}]},\"etag\":\"pllndnp\",\"location\":\"rpqaf\",\"tags\":{\"yetefyp\":\"gsnnf\"},\"id\":\"coc\",\"name\":\"fjgtixrjvzuy\",\"type\":\"urmlmuo\"}"; + = "{\"properties\":{\"backupPolicyId\":\"fqiu\",\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":1863022211,\"weeklyBackupsToKeep\":1535738796,\"monthlyBackupsToKeep\":94242644,\"volumesAssigned\":1681361815,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"jboq\",\"volumeResourceId\":\"mtqjkqevadrmm\",\"backupsCount\":7044640,\"policyEnabled\":false},{\"volumeName\":\"c\",\"volumeResourceId\":\"z\",\"backupsCount\":2142539902,\"policyEnabled\":true}]},\"etag\":\"scz\",\"location\":\"oswoqiqazugamx\",\"tags\":{\"amnppcce\":\"rcoiis\",\"tdsbezax\":\"u\"},\"id\":\"f\",\"name\":\"kzxuiz\",\"type\":\"y\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,21 +33,21 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupPolicy response = manager.backupPolicies() - .define("jfrnxousxauzlwv") - .withRegion("fbcgwgcloxoebqin") - .withExistingNetAppAccount("qcbfrmbodths", "qgvriibakcla") - .withTags(mapOf("qlafcbahhpzpofoi", "nwjfu", "kholvd", "jwpfilkm")) - .withDailyBackupsToKeep(1962597445) - .withWeeklyBackupsToKeep(849660577) - .withMonthlyBackupsToKeep(1710129608) - .withEnabled(true) + .define("qladywrxwhydtlu") + .withRegion("h") + .withExistingNetAppAccount("eumoqod", "adppyibn") + .withTags(mapOf("lwyojbfqzdkfnj", "kvhd", "fratqxmbjroumzz", "ixh")) + .withDailyBackupsToKeep(658051997) + .withWeeklyBackupsToKeep(1037982388) + .withMonthlyBackupsToKeep(547930832) + .withEnabled(false) .create(); - Assertions.assertEquals("rpqaf", response.location()); - Assertions.assertEquals("gsnnf", response.tags().get("yetefyp")); - Assertions.assertEquals(1625380187, response.dailyBackupsToKeep()); - Assertions.assertEquals(2004143928, response.weeklyBackupsToKeep()); - Assertions.assertEquals(109793124, response.monthlyBackupsToKeep()); + Assertions.assertEquals("oswoqiqazugamx", response.location()); + Assertions.assertEquals("rcoiis", response.tags().get("amnppcce")); + Assertions.assertEquals(1863022211, response.dailyBackupsToKeep()); + Assertions.assertEquals(1535738796, response.weeklyBackupsToKeep()); + Assertions.assertEquals(94242644, response.monthlyBackupsToKeep()); Assertions.assertTrue(response.enabled()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java index a790860e9718..f72227c2ba7e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.backupPolicies().delete("auunfprnjletlx", "mr", "ddoui", com.azure.core.util.Context.NONE); + manager.backupPolicies().delete("saeuzanhsfnhsenw", "hpzfngqj", "lidftujwjj", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java index b12f3354e387..8253a7676606 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class BackupPoliciesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"backupPolicyId\":\"ojqtobaxk\",\"provisioningState\":\"ytunlbfjkwr\",\"dailyBackupsToKeep\":33332792,\"weeklyBackupsToKeep\":1630715289,\"monthlyBackupsToKeep\":2127509542,\"volumesAssigned\":90955577,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"qhd\",\"volumeResourceId\":\"xaulkpakdkifmjnn\",\"backupsCount\":827393653,\"policyEnabled\":false},{\"volumeName\":\"pxuckpggq\",\"volumeResourceId\":\"eyirdhlisngw\",\"backupsCount\":1258635298,\"policyEnabled\":false},{\"volumeName\":\"izruwnpqxpxiwfc\",\"volumeResourceId\":\"jsa\",\"backupsCount\":2137009925,\"policyEnabled\":true}]},\"etag\":\"mkzjvkviir\",\"location\":\"fgrwsdpgratzvz\",\"tags\":{\"tctbrxkjzwrgxffm\":\"byvi\",\"bydpizqaclnapxb\":\"hkwfbkgozxwop\",\"ugjknf\":\"yg\",\"uyilflqoiquvrehm\":\"mfcttux\"},\"id\":\"njhvsujztc\",\"name\":\"ytqj\",\"type\":\"w\"}"; + = "{\"properties\":{\"backupPolicyId\":\"ixldzyyfy\",\"provisioningState\":\"qsix\",\"dailyBackupsToKeep\":104830049,\"weeklyBackupsToKeep\":1092655779,\"monthlyBackupsToKeep\":1776640366,\"volumesAssigned\":1424381442,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"vsmb\",\"volumeResourceId\":\"lzoy\",\"backupsCount\":1157061379,\"policyEnabled\":true},{\"volumeName\":\"pqvyb\",\"volumeResourceId\":\"gvmxnok\",\"backupsCount\":199139815,\"policyEnabled\":true},{\"volumeName\":\"seskvcuar\",\"volumeResourceId\":\"hunlpirykycnd\",\"backupsCount\":355546006,\"policyEnabled\":true},{\"volumeName\":\"reuykbbmnwagl\",\"volumeResourceId\":\"xoe\",\"backupsCount\":1187567269,\"policyEnabled\":false}]},\"etag\":\"fwmyymv\",\"location\":\"bpbhfckdvezcrcss\",\"tags\":{\"hpavawu\":\"ddubbnqfblhkal\",\"ctteajohi\":\"iqjtiogqgdmin\",\"tp\":\"gspnbonhpczykm\"},\"id\":\"wxqcsehchkhufmpq\",\"name\":\"mqyjgy\",\"type\":\"zulo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupPolicy response = manager.backupPolicies() - .getWithResponse("nbmhyree", "dzqavbpdqmjxlyyz", "lgouwtlmjj", com.azure.core.util.Context.NONE) + .getWithResponse("xxqcwgaxf", "vaknokzwjj", "r", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("fgrwsdpgratzvz", response.location()); - Assertions.assertEquals("byvi", response.tags().get("tctbrxkjzwrgxffm")); - Assertions.assertEquals(33332792, response.dailyBackupsToKeep()); - Assertions.assertEquals(1630715289, response.weeklyBackupsToKeep()); - Assertions.assertEquals(2127509542, response.monthlyBackupsToKeep()); - Assertions.assertFalse(response.enabled()); + Assertions.assertEquals("bpbhfckdvezcrcss", response.location()); + Assertions.assertEquals("ddubbnqfblhkal", response.tags().get("hpavawu")); + Assertions.assertEquals(104830049, response.dailyBackupsToKeep()); + Assertions.assertEquals(1092655779, response.weeklyBackupsToKeep()); + Assertions.assertEquals(1776640366, response.monthlyBackupsToKeep()); + Assertions.assertTrue(response.enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java index e7f869a5eddb..de641a9a266d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java @@ -22,7 +22,7 @@ public final class BackupPoliciesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"backupPolicyId\":\"tmaaj\",\"provisioningState\":\"huxy\",\"dailyBackupsToKeep\":356571550,\"weeklyBackupsToKeep\":150383679,\"monthlyBackupsToKeep\":1469986611,\"volumesAssigned\":932521293,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"spsp\",\"volumeResourceId\":\"c\",\"backupsCount\":311832546,\"policyEnabled\":true},{\"volumeName\":\"mspbpssdfpp\",\"volumeResourceId\":\"gt\",\"backupsCount\":857144221,\"policyEnabled\":true},{\"volumeName\":\"vczkcnyxrxmunjd\",\"volumeResourceId\":\"glnkvxlxpagl\",\"backupsCount\":685816396,\"policyEnabled\":true}]},\"etag\":\"cvkhpzvuqdfl\",\"location\":\"niypfpubcpzg\",\"tags\":{\"gqjxgpnrhgovfgp\":\"ivhjknidi\",\"zvuporqzdfuydz\":\"kqmhhaowjr\",\"xqpswok\":\"kfvxcnq\",\"kzsz\":\"vkhlggdhbemz\"},\"id\":\"wiwtglxxhl\",\"name\":\"fpgpicrmnzhrgm\",\"type\":\"gjsxv\"}]}"; + = "{\"value\":[{\"properties\":{\"backupPolicyId\":\"iqswbqer\",\"provisioningState\":\"xiytxtdgukvl\",\"dailyBackupsToKeep\":795825658,\"weeklyBackupsToKeep\":201041686,\"monthlyBackupsToKeep\":1426032563,\"volumesAssigned\":8081594,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"ewres\",\"volumeResourceId\":\"owegmmutey\",\"backupsCount\":1286022280,\"policyEnabled\":false},{\"volumeName\":\"igijiitnspxlz\",\"volumeResourceId\":\"sygrijwa\",\"backupsCount\":76122921,\"policyEnabled\":false},{\"volumeName\":\"aybfu\",\"volumeResourceId\":\"frojsydgr\",\"backupsCount\":641548413,\"policyEnabled\":false}]},\"etag\":\"ywezskiecafyg\",\"location\":\"xieqv\",\"tags\":{\"lixqcah\":\"a\",\"jpodtbl\":\"hxalybxawo\"},\"id\":\"pkkwj\",\"name\":\"jodqhykincn\",\"type\":\"emehllizh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<BackupPolicy> response - = manager.backupPolicies().list("amowaziynknlqwzd", "piwhxqs", com.azure.core.util.Context.NONE); + = manager.backupPolicies().list("fwbeqrkuorh", "ssruqnmdvhazcvj", com.azure.core.util.Context.NONE); - Assertions.assertEquals("niypfpubcpzg", response.iterator().next().location()); - Assertions.assertEquals("ivhjknidi", response.iterator().next().tags().get("gqjxgpnrhgovfgp")); - Assertions.assertEquals(356571550, response.iterator().next().dailyBackupsToKeep()); - Assertions.assertEquals(150383679, response.iterator().next().weeklyBackupsToKeep()); - Assertions.assertEquals(1469986611, response.iterator().next().monthlyBackupsToKeep()); + Assertions.assertEquals("xieqv", response.iterator().next().location()); + Assertions.assertEquals("a", response.iterator().next().tags().get("lixqcah")); + Assertions.assertEquals(795825658, response.iterator().next().dailyBackupsToKeep()); + Assertions.assertEquals(201041686, response.iterator().next().weeklyBackupsToKeep()); + Assertions.assertEquals(1426032563, response.iterator().next().monthlyBackupsToKeep()); Assertions.assertTrue(response.iterator().next().enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java index 432f098609d4..d52793c81253 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java @@ -12,14 +12,14 @@ public final class BackupPoliciesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupPoliciesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"backupPolicyId\":\"fltkacjv\",\"provisioningState\":\"kdlfoa\",\"dailyBackupsToKeep\":1662630957,\"weeklyBackupsToKeep\":631067005,\"monthlyBackupsToKeep\":2102238742,\"volumesAssigned\":488745932,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"pqblylsyxkqjnsj\",\"volumeResourceId\":\"vti\",\"backupsCount\":574368120,\"policyEnabled\":false},{\"volumeName\":\"zuempsbzkf\",\"volumeResourceId\":\"eyvpnqicvinvkj\",\"backupsCount\":611015935,\"policyEnabled\":true},{\"volumeName\":\"uukzclewyhmlw\",\"volumeResourceId\":\"ztzp\",\"backupsCount\":1158924531,\"policyEnabled\":false},{\"volumeName\":\"wyfzqwhxxbuyqa\",\"volumeResourceId\":\"feqztppriol\",\"backupsCount\":621148688,\"policyEnabled\":false}]},\"etag\":\"tolmncwsobqw\",\"location\":\"dbnw\",\"tags\":{\"sbjjc\":\"hucqdpfuvg\",\"udutnco\":\"nvxbvt\",\"xqtvcofu\":\"mr\"},\"id\":\"f\",\"name\":\"vkg\",\"type\":\"u\"},{\"properties\":{\"backupPolicyId\":\"dknnqvsazn\",\"provisioningState\":\"tor\",\"dailyBackupsToKeep\":761865502,\"weeklyBackupsToKeep\":1449495124,\"monthlyBackupsToKeep\":760670144,\"volumesAssigned\":220532000,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"uwjuetaeburuvdmo\",\"volumeResourceId\":\"mz\",\"backupsCount\":866846651,\"policyEnabled\":false},{\"volumeName\":\"q\",\"volumeResourceId\":\"fkifr\",\"backupsCount\":1599154818,\"policyEnabled\":true},{\"volumeName\":\"jmqlgkfb\",\"volumeResourceId\":\"doaon\",\"backupsCount\":1443237539,\"policyEnabled\":false}]},\"etag\":\"ujitcjedftww\",\"location\":\"zkoj\",\"tags\":{\"ybxarzgszu\":\"pzfoqoui\"},\"id\":\"oxciqopidoamcio\",\"name\":\"hkh\",\"type\":\"zxkhnzbonlwnto\"},{\"properties\":{\"backupPolicyId\":\"okdwb\",\"provisioningState\":\"kszzcmrvexztv\",\"dailyBackupsToKeep\":1159944878,\"weeklyBackupsToKeep\":125773376,\"monthlyBackupsToKeep\":505924755,\"volumesAssigned\":1333415720,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"wtl\",\"volumeResourceId\":\"guxawqaldsyuuxi\",\"backupsCount\":646205101,\"policyEnabled\":false},{\"volumeName\":\"bw\",\"volumeResourceId\":\"nkbykutwpfhp\",\"backupsCount\":145025413,\"policyEnabled\":false},{\"volumeName\":\"kdsnfdsdoakgtdl\",\"volumeResourceId\":\"kzevdlhewpusds\",\"backupsCount\":690711231,\"policyEnabled\":true}]},\"etag\":\"vbbejdcng\",\"location\":\"m\",\"tags\":{\"twaenuuzko\":\"ufgmjzrwrdg\",\"iefozbhdmsml\":\"bminrfdwoyuhhzi\"},\"id\":\"zqhof\",\"name\":\"rmaequ\",\"type\":\"ah\"},{\"properties\":{\"backupPolicyId\":\"cslfaoqzpiyylha\",\"provisioningState\":\"swhccsphk\",\"dailyBackupsToKeep\":185919180,\"weeklyBackupsToKeep\":2011273129,\"monthlyBackupsToKeep\":1466032347,\"volumesAssigned\":264431505,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"woluhczbwemhair\",\"volumeResourceId\":\"rgzdwmsweyp\",\"backupsCount\":2076786264,\"policyEnabled\":true},{\"volumeName\":\"icccn\",\"volumeResourceId\":\"huexmk\",\"backupsCount\":171161135,\"policyEnabled\":false},{\"volumeName\":\"lzywemhzrncsdtc\",\"volumeResourceId\":\"siypbs\",\"backupsCount\":1861224364,\"policyEnabled\":false}]},\"etag\":\"sl\",\"location\":\"adcy\",\"tags\":{\"elolppvksrpqvuj\":\"kyhejhzisxgf\",\"wib\":\"raehtwdwrft\",\"cstwity\":\"rcdlbhshfwpr\"},\"id\":\"hevxcced\",\"name\":\"pnmdyodnwzxltjcv\",\"type\":\"hlt\"}],\"nextLink\":\"gcxn\"}") + "{\"value\":[{\"properties\":{\"backupPolicyId\":\"iahxicsl\",\"provisioningState\":\"oqzpiyylha\",\"dailyBackupsToKeep\":105326418,\"weeklyBackupsToKeep\":324184633,\"monthlyBackupsToKeep\":2121485033,\"volumesAssigned\":391457389,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"witqscywuggwoluh\",\"volumeResourceId\":\"bwemhairs\",\"backupsCount\":558001686,\"policyEnabled\":true},{\"volumeName\":\"msweypqwdxggicc\",\"volumeResourceId\":\"xqhuexm\",\"backupsCount\":735026566,\"policyEnabled\":true},{\"volumeName\":\"vlz\",\"volumeResourceId\":\"emhzrncsdtc\",\"backupsCount\":1367209105,\"policyEnabled\":true},{\"volumeName\":\"bsfgytguslfea\",\"volumeResourceId\":\"ygqukyhejh\",\"backupsCount\":435176888,\"policyEnabled\":true}]},\"etag\":\"pelol\",\"location\":\"vk\",\"tags\":{\"swibyr\":\"qvujzraehtwdwrf\",\"h\":\"dl\",\"khevxccedc\":\"hfwpracstwit\",\"jc\":\"nmdyodnwzxl\"},\"id\":\"nhltiugcxn\",\"name\":\"vvwxqi\",\"type\":\"y\"}],\"nextLink\":\"nyowxwlmdjrkvfg\"}") .toObject(BackupPoliciesList.class); - Assertions.assertEquals("dbnw", model.value().get(0).location()); - Assertions.assertEquals("hucqdpfuvg", model.value().get(0).tags().get("sbjjc")); - Assertions.assertEquals(1662630957, model.value().get(0).dailyBackupsToKeep()); - Assertions.assertEquals(631067005, model.value().get(0).weeklyBackupsToKeep()); - Assertions.assertEquals(2102238742, model.value().get(0).monthlyBackupsToKeep()); + Assertions.assertEquals("vk", model.value().get(0).location()); + Assertions.assertEquals("qvujzraehtwdwrf", model.value().get(0).tags().get("swibyr")); + Assertions.assertEquals(105326418, model.value().get(0).dailyBackupsToKeep()); + Assertions.assertEquals(324184633, model.value().get(0).weeklyBackupsToKeep()); + Assertions.assertEquals(2121485033, model.value().get(0).monthlyBackupsToKeep()); Assertions.assertFalse(model.value().get(0).enabled()); - Assertions.assertEquals("gcxn", model.nextLink()); + Assertions.assertEquals("nyowxwlmdjrkvfg", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java index 1aa3eb657faf..031c986af3ad 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java @@ -14,31 +14,31 @@ public final class BackupPolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupPolicyInner model = BinaryData.fromString( - "{\"properties\":{\"backupPolicyId\":\"cjzkzivgvvcna\",\"provisioningState\":\"hyrnxxmu\",\"dailyBackupsToKeep\":2127430069,\"weeklyBackupsToKeep\":742564082,\"monthlyBackupsToKeep\":1429248323,\"volumesAssigned\":233559890,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"tchealmf\",\"volumeResourceId\":\"d\",\"backupsCount\":1434664141,\"policyEnabled\":false},{\"volumeName\":\"wvgpiohg\",\"volumeResourceId\":\"rtfudxepxg\",\"backupsCount\":682770513,\"policyEnabled\":true}]},\"etag\":\"vmnpkukghimdblx\",\"location\":\"imfnjhfjx\",\"tags\":{\"foqreyfkzik\":\"zk\",\"wczelpci\":\"jawneaiv\",\"abfatkl\":\"elsfeaen\"},\"id\":\"dxbjhwuaanozj\",\"name\":\"sphyoulpjrvxa\",\"type\":\"l\"}") + "{\"properties\":{\"backupPolicyId\":\"sz\",\"provisioningState\":\"mpsbzkfzbeyv\",\"dailyBackupsToKeep\":358858891,\"weeklyBackupsToKeep\":2090410653,\"monthlyBackupsToKeep\":1110186498,\"volumesAssigned\":242850063,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"xrbuukzclew\",\"volumeResourceId\":\"mlwpazt\",\"backupsCount\":1897978322,\"policyEnabled\":false}]},\"etag\":\"ckw\",\"location\":\"zqwhxxbuyqaxzfeq\",\"tags\":{\"rjaltolmncw\":\"priolx\",\"cqdpfuv\":\"obqwcsdbnwdcfh\"},\"id\":\"lsbjjcanvxbv\",\"name\":\"vudutncor\",\"type\":\"r\"}") .toObject(BackupPolicyInner.class); - Assertions.assertEquals("imfnjhfjx", model.location()); - Assertions.assertEquals("zk", model.tags().get("foqreyfkzik")); - Assertions.assertEquals(2127430069, model.dailyBackupsToKeep()); - Assertions.assertEquals(742564082, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1429248323, model.monthlyBackupsToKeep()); - Assertions.assertTrue(model.enabled()); + Assertions.assertEquals("zqwhxxbuyqaxzfeq", model.location()); + Assertions.assertEquals("priolx", model.tags().get("rjaltolmncw")); + Assertions.assertEquals(358858891, model.dailyBackupsToKeep()); + Assertions.assertEquals(2090410653, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1110186498, model.monthlyBackupsToKeep()); + Assertions.assertFalse(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupPolicyInner model = new BackupPolicyInner().withLocation("imfnjhfjx") - .withTags(mapOf("foqreyfkzik", "zk", "wczelpci", "jawneaiv", "abfatkl", "elsfeaen")) - .withDailyBackupsToKeep(2127430069) - .withWeeklyBackupsToKeep(742564082) - .withMonthlyBackupsToKeep(1429248323) - .withEnabled(true); + BackupPolicyInner model = new BackupPolicyInner().withLocation("zqwhxxbuyqaxzfeq") + .withTags(mapOf("rjaltolmncw", "priolx", "cqdpfuv", "obqwcsdbnwdcfh")) + .withDailyBackupsToKeep(358858891) + .withWeeklyBackupsToKeep(2090410653) + .withMonthlyBackupsToKeep(1110186498) + .withEnabled(false); model = BinaryData.fromObject(model).toObject(BackupPolicyInner.class); - Assertions.assertEquals("imfnjhfjx", model.location()); - Assertions.assertEquals("zk", model.tags().get("foqreyfkzik")); - Assertions.assertEquals(2127430069, model.dailyBackupsToKeep()); - Assertions.assertEquals(742564082, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1429248323, model.monthlyBackupsToKeep()); - Assertions.assertTrue(model.enabled()); + Assertions.assertEquals("zqwhxxbuyqaxzfeq", model.location()); + Assertions.assertEquals("priolx", model.tags().get("rjaltolmncw")); + Assertions.assertEquals(358858891, model.dailyBackupsToKeep()); + Assertions.assertEquals(2090410653, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1110186498, model.monthlyBackupsToKeep()); + Assertions.assertFalse(model.enabled()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java index 2747488c5413..f77a519c6663 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java @@ -14,31 +14,31 @@ public final class BackupPolicyPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupPolicyPatch model = BinaryData.fromString( - "{\"location\":\"xrwlyc\",\"id\":\"uhpkxkgymar\",\"name\":\"n\",\"type\":\"xqugjhkycubedd\",\"tags\":{\"zqalkrmnjijpx\":\"ofwq\",\"byxbaaabjy\":\"cqqudf\",\"zrtuzq\":\"ayffim\",\"fdnw\":\"gsexne\"},\"properties\":{\"backupPolicyId\":\"ewzsyyceuzsoib\",\"provisioningState\":\"dpfrxtrthzvaytdw\",\"dailyBackupsToKeep\":1467238377,\"weeklyBackupsToKeep\":323414034,\"monthlyBackupsToKeep\":1725477484,\"volumesAssigned\":749295202,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"i\",\"volumeResourceId\":\"vpdtiirqtdqoa\",\"backupsCount\":200859544,\"policyEnabled\":false},{\"volumeName\":\"gsquyfxrxxlept\",\"volumeResourceId\":\"mxjezwlw\",\"backupsCount\":966805028,\"policyEnabled\":false},{\"volumeName\":\"cvydypatdoo\",\"volumeResourceId\":\"jkniodko\",\"backupsCount\":354248500,\"policyEnabled\":false},{\"volumeName\":\"jhemms\",\"volumeResourceId\":\"dkcrodt\",\"backupsCount\":1997229408,\"policyEnabled\":false}]}}") + "{\"location\":\"oxciqopidoamcio\",\"id\":\"khazxkhnzbonlwn\",\"name\":\"egokdwbwhkszzcmr\",\"type\":\"xztvbtqgsfraoyzk\",\"tags\":{\"aw\":\"tlmngu\"},\"properties\":{\"backupPolicyId\":\"dsyuuximerqfob\",\"provisioningState\":\"znkbykutwpfhpagm\",\"dailyBackupsToKeep\":1165571898,\"weeklyBackupsToKeep\":1595958724,\"monthlyBackupsToKeep\":803916344,\"volumesAssigned\":1293750730,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"gtdlmk\",\"volumeResourceId\":\"evdlh\",\"backupsCount\":1686383029,\"policyEnabled\":true},{\"volumeName\":\"sttwvogvbbe\",\"volumeResourceId\":\"cngqqmoakufgmjz\",\"backupsCount\":1463483261,\"policyEnabled\":false},{\"volumeName\":\"twaenuuzko\",\"volumeResourceId\":\"minrfdw\",\"backupsCount\":1704063633,\"policyEnabled\":true},{\"volumeName\":\"iuiefozbhdmsm\",\"volumeResourceId\":\"zqhof\",\"backupsCount\":1813126235,\"policyEnabled\":false}]}}") .toObject(BackupPolicyPatch.class); - Assertions.assertEquals("xrwlyc", model.location()); - Assertions.assertEquals("ofwq", model.tags().get("zqalkrmnjijpx")); - Assertions.assertEquals(1467238377, model.dailyBackupsToKeep()); - Assertions.assertEquals(323414034, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1725477484, model.monthlyBackupsToKeep()); - Assertions.assertFalse(model.enabled()); + Assertions.assertEquals("oxciqopidoamcio", model.location()); + Assertions.assertEquals("tlmngu", model.tags().get("aw")); + Assertions.assertEquals(1165571898, model.dailyBackupsToKeep()); + Assertions.assertEquals(1595958724, model.weeklyBackupsToKeep()); + Assertions.assertEquals(803916344, model.monthlyBackupsToKeep()); + Assertions.assertTrue(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupPolicyPatch model = new BackupPolicyPatch().withLocation("xrwlyc") - .withTags(mapOf("zqalkrmnjijpx", "ofwq", "byxbaaabjy", "cqqudf", "zrtuzq", "ayffim", "fdnw", "gsexne")) - .withDailyBackupsToKeep(1467238377) - .withWeeklyBackupsToKeep(323414034) - .withMonthlyBackupsToKeep(1725477484) - .withEnabled(false); + BackupPolicyPatch model = new BackupPolicyPatch().withLocation("oxciqopidoamcio") + .withTags(mapOf("aw", "tlmngu")) + .withDailyBackupsToKeep(1165571898) + .withWeeklyBackupsToKeep(1595958724) + .withMonthlyBackupsToKeep(803916344) + .withEnabled(true); model = BinaryData.fromObject(model).toObject(BackupPolicyPatch.class); - Assertions.assertEquals("xrwlyc", model.location()); - Assertions.assertEquals("ofwq", model.tags().get("zqalkrmnjijpx")); - Assertions.assertEquals(1467238377, model.dailyBackupsToKeep()); - Assertions.assertEquals(323414034, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1725477484, model.monthlyBackupsToKeep()); - Assertions.assertFalse(model.enabled()); + Assertions.assertEquals("oxciqopidoamcio", model.location()); + Assertions.assertEquals("tlmngu", model.tags().get("aw")); + Assertions.assertEquals(1165571898, model.dailyBackupsToKeep()); + Assertions.assertEquals(1595958724, model.weeklyBackupsToKeep()); + Assertions.assertEquals(803916344, model.monthlyBackupsToKeep()); + Assertions.assertTrue(model.enabled()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java index 7e7b692e74b1..bc5a44cecd15 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java @@ -12,24 +12,24 @@ public final class BackupPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupPolicyProperties model = BinaryData.fromString( - "{\"backupPolicyId\":\"imjwosyt\",\"provisioningState\":\"tcs\",\"dailyBackupsToKeep\":1365275067,\"weeklyBackupsToKeep\":468391476,\"monthlyBackupsToKeep\":279496369,\"volumesAssigned\":1686364184,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"zikhl\",\"volumeResourceId\":\"jhdgqggebdunyga\",\"backupsCount\":624778524,\"policyEnabled\":true}]}") + "{\"backupPolicyId\":\"qtvcofudflvkgj\",\"provisioningState\":\"gdknnqv\",\"dailyBackupsToKeep\":1989846717,\"weeklyBackupsToKeep\":2039923498,\"monthlyBackupsToKeep\":764676926,\"volumesAssigned\":1165613569,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"a\",\"volumeResourceId\":\"kycgrauwj\",\"backupsCount\":515836708,\"policyEnabled\":false},{\"volumeName\":\"uruv\",\"volumeResourceId\":\"ovsm\",\"backupsCount\":1969431903,\"policyEnabled\":false},{\"volumeName\":\"mqoefkifrvtpuqu\",\"volumeResourceId\":\"qlgkfbtn\",\"backupsCount\":1601819937,\"policyEnabled\":false},{\"volumeName\":\"bjcntujitc\",\"volumeResourceId\":\"df\",\"backupsCount\":125087632,\"policyEnabled\":true}]}") .toObject(BackupPolicyProperties.class); - Assertions.assertEquals(1365275067, model.dailyBackupsToKeep()); - Assertions.assertEquals(468391476, model.weeklyBackupsToKeep()); - Assertions.assertEquals(279496369, model.monthlyBackupsToKeep()); - Assertions.assertTrue(model.enabled()); + Assertions.assertEquals(1989846717, model.dailyBackupsToKeep()); + Assertions.assertEquals(2039923498, model.weeklyBackupsToKeep()); + Assertions.assertEquals(764676926, model.monthlyBackupsToKeep()); + Assertions.assertFalse(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupPolicyProperties model = new BackupPolicyProperties().withDailyBackupsToKeep(1365275067) - .withWeeklyBackupsToKeep(468391476) - .withMonthlyBackupsToKeep(279496369) - .withEnabled(true); + BackupPolicyProperties model = new BackupPolicyProperties().withDailyBackupsToKeep(1989846717) + .withWeeklyBackupsToKeep(2039923498) + .withMonthlyBackupsToKeep(764676926) + .withEnabled(false); model = BinaryData.fromObject(model).toObject(BackupPolicyProperties.class); - Assertions.assertEquals(1365275067, model.dailyBackupsToKeep()); - Assertions.assertEquals(468391476, model.weeklyBackupsToKeep()); - Assertions.assertEquals(279496369, model.monthlyBackupsToKeep()); - Assertions.assertTrue(model.enabled()); + Assertions.assertEquals(1989846717, model.dailyBackupsToKeep()); + Assertions.assertEquals(2039923498, model.weeklyBackupsToKeep()); + Assertions.assertEquals(764676926, model.monthlyBackupsToKeep()); + Assertions.assertFalse(model.enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupRestoreFilesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupRestoreFilesTests.java index 0874d6d98669..7a89b77d124d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupRestoreFilesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupRestoreFilesTests.java @@ -13,21 +13,22 @@ public final class BackupRestoreFilesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupRestoreFiles model = BinaryData.fromString( - "{\"fileList\":[\"rxkpmloazuruoc\"],\"restoreFilePath\":\"oorb\",\"destinationVolumeId\":\"eoybfhjxakvvjgs\"}") + "{\"fileList\":[\"klelssxb\",\"ycsxzu\",\"ksrl\",\"mdesqp\"],\"restoreFilePath\":\"vmjcdoewb\",\"destinationVolumeId\":\"dyvt\"}") .toObject(BackupRestoreFiles.class); - Assertions.assertEquals("rxkpmloazuruoc", model.fileList().get(0)); - Assertions.assertEquals("oorb", model.restoreFilePath()); - Assertions.assertEquals("eoybfhjxakvvjgs", model.destinationVolumeId()); + Assertions.assertEquals("klelssxb", model.fileList().get(0)); + Assertions.assertEquals("vmjcdoewb", model.restoreFilePath()); + Assertions.assertEquals("dyvt", model.destinationVolumeId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupRestoreFiles model = new BackupRestoreFiles().withFileList(Arrays.asList("rxkpmloazuruoc")) - .withRestoreFilePath("oorb") - .withDestinationVolumeId("eoybfhjxakvvjgs"); + BackupRestoreFiles model + = new BackupRestoreFiles().withFileList(Arrays.asList("klelssxb", "ycsxzu", "ksrl", "mdesqp")) + .withRestoreFilePath("vmjcdoewb") + .withDestinationVolumeId("dyvt"); model = BinaryData.fromObject(model).toObject(BackupRestoreFiles.class); - Assertions.assertEquals("rxkpmloazuruoc", model.fileList().get(0)); - Assertions.assertEquals("oorb", model.restoreFilePath()); - Assertions.assertEquals("eoybfhjxakvvjgs", model.destinationVolumeId()); + Assertions.assertEquals("klelssxb", model.fileList().get(0)); + Assertions.assertEquals("vmjcdoewb", model.restoreFilePath()); + Assertions.assertEquals("dyvt", model.destinationVolumeId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultInnerTests.java index 9f61ca7f80d1..c91cac5c5b7a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultInnerTests.java @@ -14,19 +14,19 @@ public final class BackupVaultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupVaultInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"qatmtdhtmdvy\"},\"location\":\"ikdgszywkbir\",\"tags\":{\"hkjoqr\":\"zh\",\"mfiibfggj\":\"qqaatjinrvgou\",\"rwxkvtkkgl\":\"ool\"},\"id\":\"qwjygvja\",\"name\":\"vblm\",\"type\":\"vkzuhbxvvyhgso\"}") + "{\"properties\":{\"provisioningState\":\"o\"},\"location\":\"ttpkiwkkbnujrywv\",\"tags\":{\"wiithtywub\":\"bfpncurdo\",\"fdntwjchrdgoih\":\"cbihwqk\",\"luudfdlwggytsb\":\"umwctondz\"},\"id\":\"tov\",\"name\":\"tgseinqfiufxqkn\",\"type\":\"irgne\"}") .toObject(BackupVaultInner.class); - Assertions.assertEquals("ikdgszywkbir", model.location()); - Assertions.assertEquals("zh", model.tags().get("hkjoqr")); + Assertions.assertEquals("ttpkiwkkbnujrywv", model.location()); + Assertions.assertEquals("bfpncurdo", model.tags().get("wiithtywub")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupVaultInner model = new BackupVaultInner().withLocation("ikdgszywkbir") - .withTags(mapOf("hkjoqr", "zh", "mfiibfggj", "qqaatjinrvgou", "rwxkvtkkgl", "ool")); + BackupVaultInner model = new BackupVaultInner().withLocation("ttpkiwkkbnujrywv") + .withTags(mapOf("wiithtywub", "bfpncurdo", "fdntwjchrdgoih", "cbihwqk", "luudfdlwggytsb", "umwctondz")); model = BinaryData.fromObject(model).toObject(BackupVaultInner.class); - Assertions.assertEquals("ikdgszywkbir", model.location()); - Assertions.assertEquals("zh", model.tags().get("hkjoqr")); + Assertions.assertEquals("ttpkiwkkbnujrywv", model.location()); + Assertions.assertEquals("bfpncurdo", model.tags().get("wiithtywub")); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPatchTests.java index 603a5f1a2f41..0bf3ba840660 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPatchTests.java @@ -13,18 +13,17 @@ public final class BackupVaultPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - BackupVaultPatch model = BinaryData.fromString( - "{\"tags\":{\"hrixkwmy\":\"hlmctlpdngitvgb\",\"hbpnaixexccbd\":\"jejveg\",\"htpwij\":\"eaxhcexdrrvqahqk\"}}") - .toObject(BackupVaultPatch.class); - Assertions.assertEquals("hlmctlpdngitvgb", model.tags().get("hrixkwmy")); + BackupVaultPatch model + = BinaryData.fromString("{\"tags\":{\"k\":\"pij\",\"c\":\"xfrdd\",\"ronasxift\":\"atiz\"}}") + .toObject(BackupVaultPatch.class); + Assertions.assertEquals("pij", model.tags().get("k")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupVaultPatch model = new BackupVaultPatch() - .withTags(mapOf("hrixkwmy", "hlmctlpdngitvgb", "hbpnaixexccbd", "jejveg", "htpwij", "eaxhcexdrrvqahqk")); + BackupVaultPatch model = new BackupVaultPatch().withTags(mapOf("k", "pij", "c", "xfrdd", "ronasxift", "atiz")); model = BinaryData.fromObject(model).toObject(BackupVaultPatch.class); - Assertions.assertEquals("hlmctlpdngitvgb", model.tags().get("hrixkwmy")); + Assertions.assertEquals("pij", model.tags().get("k")); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPropertiesTests.java index 76b026caa2c2..d2b307b3a0b2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPropertiesTests.java @@ -10,8 +10,8 @@ public final class BackupVaultPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - BackupVaultProperties model - = BinaryData.fromString("{\"provisioningState\":\"yrqufegxuvwz\"}").toObject(BackupVaultProperties.class); + BackupVaultProperties model = BinaryData.fromString("{\"provisioningState\":\"twqmsniffcdmqnr\"}") + .toObject(BackupVaultProperties.class); } @org.junit.jupiter.api.Test diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateMockTests.java index 533b9205e123..4a0d0457b293 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateMockTests.java @@ -23,7 +23,7 @@ public final class BackupVaultsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"location\":\"pgahxkumas\",\"tags\":{\"qepvufhbzeh\":\"acfdmmcpugme\",\"clgsc\":\"whoqhnlbqnbldxe\"},\"id\":\"orim\",\"name\":\"rsrrmoucsofldp\",\"type\":\"viyfcaabeolhbhlv\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"location\":\"qi\",\"tags\":{\"qdcadwvps\":\"xlhdj\",\"ybmrzoepnxwd\":\"zjiihjr\",\"xaurs\":\"wnjkgvfn\",\"pnqn\":\"ftibtyibuyvpirfq\"},\"id\":\"owsbedenrexkxbh\",\"name\":\"vucnulgmnh\",\"type\":\"evdyz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,14 +33,14 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupVault response = manager.backupVaults() - .define("napqo") - .withRegion("ybww") - .withExistingNetAppAccount("tfgxqbawpcb", "nzqcy") - .withTags(mapOf("muvapc", "vibidmhmwffpl")) + .define("g") + .withRegion("czjnc") + .withExistingNetAppAccount("pezkis", "qjm") + .withTags(mapOf("daswvpp", "yqv", "rr", "sqqzlgcndhz", "uww", "cfsrhkhgsn")) .create(); - Assertions.assertEquals("pgahxkumas", response.location()); - Assertions.assertEquals("acfdmmcpugme", response.tags().get("qepvufhbzeh")); + Assertions.assertEquals("qi", response.location()); + Assertions.assertEquals("xlhdj", response.tags().get("qdcadwvps")); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetWithResponseMockTests.java index e6906d09aff6..e6138d789f1d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class BackupVaultsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"yoogw\"},\"location\":\"nsduugwbsre\",\"tags\":{\"fuarenlvhht\":\"q\",\"bo\":\"lnvnafvvkyfedev\",\"minqcym\":\"lcqxypokk\"},\"id\":\"zng\",\"name\":\"bdxxe\",\"type\":\"unin\"}"; + = "{\"properties\":{\"provisioningState\":\"qqbtny\"},\"location\":\"ylxd\",\"tags\":{\"kottlwuhvajmailf\":\"abmvmsxbaevwjc\"},\"id\":\"mjjz\",\"name\":\"kzwjiqullq\",\"type\":\"bdmvrscmqerndbr\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupVault response = manager.backupVaults() - .getWithResponse("hpfpazjzoywjxhp", "ulontacnpqwteht", "evrh", com.azure.core.util.Context.NONE) + .getWithResponse("ebgvo", "e", "tuoqujlyegqavni", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("nsduugwbsre", response.location()); - Assertions.assertEquals("q", response.tags().get("fuarenlvhht")); + Assertions.assertEquals("ylxd", response.location()); + Assertions.assertEquals("abmvmsxbaevwjc", response.tags().get("kottlwuhvajmailf")); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountMockTests.java index 3ad600a99c3d..c622972921e9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountMockTests.java @@ -22,7 +22,7 @@ public final class BackupVaultsListByNetAppAccountMockTests { @Test public void testListByNetAppAccount() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"tmxxdtddmflhuy\"},\"location\":\"zv\",\"tags\":{\"prwnwvroevytlyo\":\"apxbannovvoxczy\",\"bcrymodizrx\":\"rrrouuxvnsa\",\"pmkmlmvevfx\":\"lobdxna\"},\"id\":\"op\",\"name\":\"hbzxli\",\"type\":\"hrdd\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"iii\"},\"location\":\"pfoh\",\"tags\":{\"zbeewoiymrvzbju\":\"kxbbcbrwjiutgnj\"},\"id\":\"rsrziuctix\",\"name\":\"bdsuifr\",\"type\":\"vka\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListByNetAppAccount() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<BackupVault> response - = manager.backupVaults().listByNetAppAccount("udbchaqdtv", "ec", com.azure.core.util.Context.NONE); + = manager.backupVaults().listByNetAppAccount("yeofltfnnxrkad", "fynn", com.azure.core.util.Context.NONE); - Assertions.assertEquals("zv", response.iterator().next().location()); - Assertions.assertEquals("apxbannovvoxczy", response.iterator().next().tags().get("prwnwvroevytlyo")); + Assertions.assertEquals("pfoh", response.iterator().next().location()); + Assertions.assertEquals("kxbbcbrwjiutgnj", response.iterator().next().tags().get("zbeewoiymrvzbju")); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListTests.java index c326c3a821b0..52af06c18292 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListTests.java @@ -12,10 +12,10 @@ public final class BackupVaultsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupVaultsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"svfycxzbfv\"},\"location\":\"wvrvmtg\",\"tags\":{\"nsxkmcwaekrrjr\":\"pyostronzmyhgfi\",\"jglikkxwslolb\":\"afxtsgum\",\"elfk\":\"pvuzlmv\",\"njwmwkpnbsazejj\":\"gplcrpwjxeznoigb\"},\"id\":\"qkagfhsxt\",\"name\":\"augzxnfaazpxdtn\",\"type\":\"dm\"},{\"properties\":{\"provisioningState\":\"jlwuenvrkp\"},\"location\":\"uaibrebqaaysj\",\"tags\":{\"zlwfffiakp\":\"qtnqtt\",\"tmmjihyeozph\":\"pqqmted\"},\"id\":\"wau\",\"name\":\"qncygupkvi\",\"type\":\"mdscwxqupev\"},{\"properties\":{\"provisioningState\":\"stotxh\"},\"location\":\"ujbypelmcuvhixb\",\"tags\":{\"yl\":\"fw\",\"ujrywvtyl\":\"coolsttpkiwkkb\"},\"id\":\"fpncurdo\",\"name\":\"wiithtywub\",\"type\":\"cbihwqk\"}],\"nextLink\":\"dntwjchrdgo\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"zh\"},\"location\":\"wesgogczh\",\"tags\":{\"gnyhmossxkkg\":\"xkr\",\"rghxjb\":\"h\",\"rnsvbuswd\":\"hqxvcxgfrpdsofbs\",\"ybycnunvj\":\"z\"},\"id\":\"rtkfawnopq\",\"name\":\"ikyzirtxdy\",\"type\":\"x\"}],\"nextLink\":\"jntpsewgioilqu\"}") .toObject(BackupVaultsList.class); - Assertions.assertEquals("wvrvmtg", model.value().get(0).location()); - Assertions.assertEquals("pyostronzmyhgfi", model.value().get(0).tags().get("nsxkmcwaekrrjr")); - Assertions.assertEquals("dntwjchrdgo", model.nextLink()); + Assertions.assertEquals("wesgogczh", model.value().get(0).location()); + Assertions.assertEquals("xkr", model.value().get(0).tags().get("gnyhmossxkkg")); + Assertions.assertEquals("jntpsewgioilqu", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsCreateMockTests.java index 0bab8ea8b7d5..75aa775bfcaf 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsCreateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsCreateMockTests.java @@ -21,7 +21,7 @@ public final class BackupsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"backupId\":\"mwmdxmebwjscjpa\",\"creationDate\":\"2021-10-23T16:03:49Z\",\"snapshotCreationDate\":\"2021-07-30T12:17:23Z\",\"completionDate\":\"2021-09-27T23:30:18Z\",\"provisioningState\":\"Succeeded\",\"size\":3284652238021656307,\"label\":\"jddtvqct\",\"backupType\":\"Manual\",\"failureReason\":\"jaeukmrsieekpn\",\"volumeResourceId\":\"zaapmudqmeqwi\",\"useExistingSnapshot\":false,\"snapshotName\":\"udqwyxebeybpmzz\",\"backupPolicyResourceId\":\"tffyaqit\",\"isLargeVolume\":false},\"id\":\"ioqaqhvs\",\"name\":\"ufuqyrx\",\"type\":\"dlcgqlsismjqfr\"}"; + = "{\"properties\":{\"backupId\":\"d\",\"creationDate\":\"2021-05-07T12:56:20Z\",\"snapshotCreationDate\":\"2021-02-04T21:16:01Z\",\"completionDate\":\"2021-08-05T12:55:53Z\",\"provisioningState\":\"Succeeded\",\"size\":7367059070988318333,\"label\":\"nkyhf\",\"backupType\":\"Scheduled\",\"failureReason\":\"qxfx\",\"volumeResourceId\":\"elgcmpzqjhhhqx\",\"useExistingSnapshot\":false,\"snapshotName\":\"cacoyvivbsiz\",\"backupPolicyResourceId\":\"jszlb\",\"isLargeVolume\":true},\"id\":\"lzijiufehgmvflnw\",\"name\":\"v\",\"type\":\"kxrerlniylylyfwx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,17 +31,17 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Backup response = manager.backups() - .define("egprhptil") - .withExistingBackupVault("jcsheafid", "tugsresmkssjh", "iftxfkf") - .withVolumeResourceId("ylhjlm") - .withLabel("phbqz") - .withUseExistingSnapshot(false) - .withSnapshotName("primr") + .define("mqkra") + .withExistingBackupVault("ujvaannggi", "cwkdtaaw", "wfekaumrrqmb") + .withVolumeResourceId("jkutycyarnr") + .withLabel("wnf") + .withUseExistingSnapshot(true) + .withSnapshotName("uabzoghkt") .create(); - Assertions.assertEquals("jddtvqct", response.label()); - Assertions.assertEquals("zaapmudqmeqwi", response.volumeResourceId()); + Assertions.assertEquals("nkyhf", response.label()); + Assertions.assertEquals("elgcmpzqjhhhqx", response.volumeResourceId()); Assertions.assertFalse(response.useExistingSnapshot()); - Assertions.assertEquals("udqwyxebeybpmzz", response.snapshotName()); + Assertions.assertEquals("cacoyvivbsiz", response.snapshotName()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusWithResponseMockTests.java index 2596376bec7d..5f9ee67150bd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class BackupsGetLatestStatusWithResponseMockTests { @Test public void testGetLatestStatusWithResponse() throws Exception { String responseStr - = "{\"healthy\":true,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Broken\",\"unhealthyReason\":\"dosfjbjsvgjrw\",\"errorMessage\":\"yvycytdclxgcckn\",\"lastTransferSize\":6413704895289470933,\"lastTransferType\":\"tmvpdvjdhtt\",\"totalTransferBytes\":6530762857956828664,\"transferProgressBytes\":4806267712213844002}"; + = "{\"healthy\":false,\"relationshipStatus\":\"Failed\",\"mirrorState\":\"Broken\",\"unhealthyReason\":\"lxhrp\",\"errorMessage\":\"vmblcouqe\",\"lastTransferSize\":673107149709372039,\"lastTransferType\":\"dsz\",\"totalTransferBytes\":1740614878460579593,\"transferProgressBytes\":2829669234757088902}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,7 @@ public void testGetLatestStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupStatus response = manager.backups() - .getLatestStatusWithResponse("zvytnrzvuljraaer", "nok", "gukkjqnvbroy", "a", - com.azure.core.util.Context.NONE) + .getLatestStatusWithResponse("nrup", "a", "mrdixtreki", "swyskbruffg", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusWithResponseMockTests.java index 08ff6fdde0e1..0fd681839434 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class BackupsGetVolumeLatestRestoreStatusWithResponseMockTests { @Test public void testGetVolumeLatestRestoreStatusWithResponse() throws Exception { String responseStr - = "{\"healthy\":true,\"relationshipStatus\":\"Idle\",\"mirrorState\":\"Mirrored\",\"unhealthyReason\":\"lgehg\",\"errorMessage\":\"ipifhpfeoajvg\",\"totalTransferBytes\":5736463297269671882}"; + = "{\"healthy\":false,\"relationshipStatus\":\"Failed\",\"mirrorState\":\"Mirrored\",\"unhealthyReason\":\"gxyivpinbmh\",\"errorMessage\":\"jijkgqxnhmbke\",\"totalTransferBytes\":4322750869756620511}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetVolumeLatestRestoreStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RestoreStatus response = manager.backups() - .getVolumeLatestRestoreStatusWithResponse("ihchrphkmcrjdqn", "dfzpbgtgkylkdg", "rjeuut", "wxezwzhok", + .getVolumeLatestRestoreStatusWithResponse("oypmbltoorm", "fqlwxldykalsy", "aolnjpnnbmjk", "ibjgsjjxxahm", com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetWithResponseMockTests.java index e6ec4cf9f5b2..4240478bcd17 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class BackupsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"backupId\":\"bjjidjksyxky\",\"creationDate\":\"2021-06-14T02:15:17Z\",\"snapshotCreationDate\":\"2021-09-27T05:48:08Z\",\"completionDate\":\"2021-01-08T06:53:43Z\",\"provisioningState\":\"jednlj\",\"size\":7592252826756292876,\"label\":\"aulx\",\"backupType\":\"Scheduled\",\"failureReason\":\"jbnkpp\",\"volumeResourceId\":\"ynenlsvxeizz\",\"useExistingSnapshot\":true,\"snapshotName\":\"nsrmffeycx\",\"backupPolicyResourceId\":\"tpiymerteea\",\"isLargeVolume\":true},\"id\":\"iekkkzddrtkgdojb\",\"name\":\"xv\",\"type\":\"vrefdeesv\"}"; + = "{\"properties\":{\"backupId\":\"qllizstac\",\"creationDate\":\"2021-11-02T08:18:23Z\",\"snapshotCreationDate\":\"2021-06-17T05:46:19Z\",\"completionDate\":\"2021-10-11T09:49:30Z\",\"provisioningState\":\"tk\",\"size\":5869518151221469081,\"label\":\"mvss\",\"backupType\":\"Scheduled\",\"failureReason\":\"pwamcxtczhupeuk\",\"volumeResourceId\":\"ijdu\",\"useExistingSnapshot\":false,\"snapshotName\":\"pydjfboc\",\"backupPolicyResourceId\":\"hhulrtywikdm\",\"isLargeVolume\":true},\"id\":\"uflgbhgauacdixm\",\"name\":\"ufr\",\"type\":\"ryjqgdkf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,12 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Backup response = manager.backups() - .getWithResponse("wa", "pqg", "tjeaahhvjhh", "akz", com.azure.core.util.Context.NONE) + .getWithResponse("ukdqkkyihztg", "qm", "qzgwldoychil", "cecfehuwaoaguh", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("aulx", response.label()); - Assertions.assertEquals("ynenlsvxeizz", response.volumeResourceId()); - Assertions.assertTrue(response.useExistingSnapshot()); - Assertions.assertEquals("nsrmffeycx", response.snapshotName()); + Assertions.assertEquals("mvss", response.label()); + Assertions.assertEquals("ijdu", response.volumeResourceId()); + Assertions.assertFalse(response.useExistingSnapshot()); + Assertions.assertEquals("pydjfboc", response.snapshotName()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultMockTests.java index 6c32bed8c791..9ad82f142740 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultMockTests.java @@ -22,7 +22,7 @@ public final class BackupsListByVaultMockTests { @Test public void testListByVault() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"backupId\":\"tvtzeexavoxtfg\",\"creationDate\":\"2021-10-13T21:26:08Z\",\"snapshotCreationDate\":\"2021-07-20T08:15:13Z\",\"completionDate\":\"2021-07-23T09:21:39Z\",\"provisioningState\":\"wpypqtgsfj\",\"size\":1144456929835288203,\"label\":\"hhxud\",\"backupType\":\"Manual\",\"failureReason\":\"d\",\"volumeResourceId\":\"tnsi\",\"useExistingSnapshot\":true,\"snapshotName\":\"z\",\"backupPolicyResourceId\":\"es\",\"isLargeVolume\":true},\"id\":\"pagzrcxfailcfxwm\",\"name\":\"boxdfgsftufq\",\"type\":\"brjlnacgcckknhxk\"}]}"; + = "{\"value\":[{\"properties\":{\"backupId\":\"kyojwyvfk\",\"creationDate\":\"2021-05-05T00:51:27Z\",\"snapshotCreationDate\":\"2021-06-23T13:57:06Z\",\"completionDate\":\"2021-08-25T01:06:04Z\",\"provisioningState\":\"sgxjc\",\"size\":7154860054764368087,\"label\":\"scubiwsdrnpxqwod\",\"backupType\":\"Scheduled\",\"failureReason\":\"xcjr\",\"volumeResourceId\":\"muabwibvjogjonmc\",\"useExistingSnapshot\":true,\"snapshotName\":\"y\",\"backupPolicyResourceId\":\"amwineofvfkakp\",\"isLargeVolume\":false},\"id\":\"vevboclzh\",\"name\":\"jknyu\",\"type\":\"gvttx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,11 @@ public void testListByVault() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<Backup> response = manager.backups() - .listByVault("cuijpxt", "s", "wprtu", "wsawddjibabxvi", com.azure.core.util.Context.NONE); + .listByVault("ozo", "oqbvjhvefgwbmqj", "hntasfaymx", "ulpzealb", com.azure.core.util.Context.NONE); - Assertions.assertEquals("hhxud", response.iterator().next().label()); - Assertions.assertEquals("tnsi", response.iterator().next().volumeResourceId()); + Assertions.assertEquals("scubiwsdrnpxqwod", response.iterator().next().label()); + Assertions.assertEquals("muabwibvjogjonmc", response.iterator().next().volumeResourceId()); Assertions.assertTrue(response.iterator().next().useExistingSnapshot()); - Assertions.assertEquals("z", response.iterator().next().snapshotName()); + Assertions.assertEquals("y", response.iterator().next().snapshotName()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsMigrationRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsMigrationRequestTests.java index 51255718ef31..223ff00ef96f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsMigrationRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsMigrationRequestTests.java @@ -12,14 +12,14 @@ public final class BackupsMigrationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupsMigrationRequest model - = BinaryData.fromString("{\"backupVaultId\":\"srhnjivo\"}").toObject(BackupsMigrationRequest.class); - Assertions.assertEquals("srhnjivo", model.backupVaultId()); + = BinaryData.fromString("{\"backupVaultId\":\"mzlanru\"}").toObject(BackupsMigrationRequest.class); + Assertions.assertEquals("mzlanru", model.backupVaultId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupsMigrationRequest model = new BackupsMigrationRequest().withBackupVaultId("srhnjivo"); + BackupsMigrationRequest model = new BackupsMigrationRequest().withBackupVaultId("mzlanru"); model = BinaryData.fromObject(model).toObject(BackupsMigrationRequest.class); - Assertions.assertEquals("srhnjivo", model.backupVaultId()); + Assertions.assertEquals("mzlanru", model.backupVaultId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java index 1b276fbc805b..83099e33f130 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java @@ -12,18 +12,18 @@ public final class BreakFileLocksRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BreakFileLocksRequest model - = BinaryData.fromString("{\"clientIp\":\"xb\",\"confirmRunningDisruptiveOperation\":false}") + = BinaryData.fromString("{\"clientIp\":\"dnbbglzps\",\"confirmRunningDisruptiveOperation\":true}") .toObject(BreakFileLocksRequest.class); - Assertions.assertEquals("xb", model.clientIp()); - Assertions.assertFalse(model.confirmRunningDisruptiveOperation()); + Assertions.assertEquals("dnbbglzps", model.clientIp()); + Assertions.assertTrue(model.confirmRunningDisruptiveOperation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BreakFileLocksRequest model - = new BreakFileLocksRequest().withClientIp("xb").withConfirmRunningDisruptiveOperation(false); + = new BreakFileLocksRequest().withClientIp("dnbbglzps").withConfirmRunningDisruptiveOperation(true); model = BinaryData.fromObject(model).toObject(BreakFileLocksRequest.class); - Assertions.assertEquals("xb", model.clientIp()); - Assertions.assertFalse(model.confirmRunningDisruptiveOperation()); + Assertions.assertEquals("dnbbglzps", model.clientIp()); + Assertions.assertTrue(model.confirmRunningDisruptiveOperation()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakReplicationRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakReplicationRequestTests.java index 5dcf0a26cbbe..ed69d49d979f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakReplicationRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakReplicationRequestTests.java @@ -12,14 +12,14 @@ public final class BreakReplicationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BreakReplicationRequest model - = BinaryData.fromString("{\"forceBreakReplication\":true}").toObject(BreakReplicationRequest.class); - Assertions.assertTrue(model.forceBreakReplication()); + = BinaryData.fromString("{\"forceBreakReplication\":false}").toObject(BreakReplicationRequest.class); + Assertions.assertFalse(model.forceBreakReplication()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BreakReplicationRequest model = new BreakReplicationRequest().withForceBreakReplication(true); + BreakReplicationRequest model = new BreakReplicationRequest().withForceBreakReplication(false); model = BinaryData.fromObject(model).toObject(BreakReplicationRequest.class); - Assertions.assertTrue(model.forceBreakReplication()); + Assertions.assertFalse(model.forceBreakReplication()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketInnerTests.java new file mode 100644 index 000000000000..b661ec2a0b2e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketInnerTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.BucketInner; +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerProperties; +import com.azure.resourcemanager.netapp.models.CifsUser; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.NfsUser; +import org.junit.jupiter.api.Assertions; + +public final class BucketInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BucketInner model = BinaryData.fromString( + "{\"properties\":{\"path\":\"dxtqmieoxo\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":467906638726749311,\"groupId\":8304527452172450889},\"cifsUser\":{\"username\":\"bghhavgrvkf\"}},\"provisioningState\":\"Deleting\",\"status\":\"NoCredentialsSet\",\"server\":{\"fqdn\":\"jbibg\",\"certificateCommonName\":\"fxumv\",\"certificateExpiryDate\":\"2021-01-01T02:20:38Z\",\"ipAddress\":\"yo\",\"certificateObject\":\"xnbkfezzxscyhwzd\"},\"permissions\":\"ReadWrite\"},\"id\":\"jbzbomvzzbtdcq\",\"name\":\"pniyujviyl\",\"type\":\"dshf\"}") + .toObject(BucketInner.class); + Assertions.assertEquals("dxtqmieoxo", model.path()); + Assertions.assertEquals(467906638726749311L, model.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(8304527452172450889L, model.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("bghhavgrvkf", model.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("jbibg", model.server().fqdn()); + Assertions.assertEquals("xnbkfezzxscyhwzd", model.server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_WRITE, model.permissions()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BucketInner model = new BucketInner().withPath("dxtqmieoxo") + .withFileSystemUser(new FileSystemUser() + .withNfsUser(new NfsUser().withUserId(467906638726749311L).withGroupId(8304527452172450889L)) + .withCifsUser(new CifsUser().withUsername("bghhavgrvkf"))) + .withServer(new BucketServerProperties().withFqdn("jbibg").withCertificateObject("xnbkfezzxscyhwzd")) + .withPermissions(BucketPermissions.READ_WRITE); + model = BinaryData.fromObject(model).toObject(BucketInner.class); + Assertions.assertEquals("dxtqmieoxo", model.path()); + Assertions.assertEquals(467906638726749311L, model.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(8304527452172450889L, model.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("bghhavgrvkf", model.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("jbibg", model.server().fqdn()); + Assertions.assertEquals("xnbkfezzxscyhwzd", model.server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_WRITE, model.permissions()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketListTests.java new file mode 100644 index 000000000000..c1b9fb40a9db --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketListTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.implementation.models.BucketList; +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import org.junit.jupiter.api.Assertions; + +public final class BucketListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BucketList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"path\":\"tczheydbsdshmkx\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":1073794426491374095,\"groupId\":1583716455501843510},\"cifsUser\":{\"username\":\"pltfnhtba\"}},\"provisioningState\":\"Accepted\",\"status\":\"NoCredentialsSet\",\"server\":{\"fqdn\":\"ckpyklyhplu\",\"certificateCommonName\":\"pvruudlg\",\"certificateExpiryDate\":\"2021-06-03T13:51:34Z\",\"ipAddress\":\"hostgktstvdxecl\",\"certificateObject\":\"dqbcvhzlhplod\"},\"permissions\":\"ReadWrite\"},\"id\":\"wwqfbumlkxtrqj\",\"name\":\"smlmbtxhwgfwsrta\",\"type\":\"coezbrhubskh\"},{\"properties\":{\"path\":\"goo\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":9221028808795014470,\"groupId\":9063355381863639034},\"cifsUser\":{\"username\":\"orfmluiqt\"}},\"provisioningState\":\"Accepted\",\"status\":\"Active\",\"server\":{\"fqdn\":\"nqqyba\",\"certificateCommonName\":\"euayjkqabqgzsles\",\"certificateExpiryDate\":\"2021-04-30T14:41:30Z\",\"ipAddress\":\"ernntiewdjcvbquw\",\"certificateObject\":\"ehwagoh\"},\"permissions\":\"ReadOnly\"},\"id\":\"kmr\",\"name\":\"emvvhm\",\"type\":\"tdrjfutacoebj\"}],\"nextLink\":\"wzcjznmwcpmgua\"}") + .toObject(BucketList.class); + Assertions.assertEquals("tczheydbsdshmkx", model.value().get(0).path()); + Assertions.assertEquals(1073794426491374095L, model.value().get(0).fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(1583716455501843510L, model.value().get(0).fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("pltfnhtba", model.value().get(0).fileSystemUser().cifsUser().username()); + Assertions.assertEquals("ckpyklyhplu", model.value().get(0).server().fqdn()); + Assertions.assertEquals("dqbcvhzlhplod", model.value().get(0).server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_WRITE, model.value().get(0).permissions()); + Assertions.assertEquals("wzcjznmwcpmgua", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPatchPropertiesTests.java new file mode 100644 index 000000000000..b2b3ae73a401 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPatchPropertiesTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.BucketPatchProperties; +import com.azure.resourcemanager.netapp.models.BucketPatchPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerPatchProperties; +import com.azure.resourcemanager.netapp.models.CifsUser; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.NfsUser; +import org.junit.jupiter.api.Assertions; + +public final class BucketPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BucketPatchProperties model = BinaryData.fromString( + "{\"path\":\"cvdsrhnj\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":8488959780262323,\"groupId\":7983763858754092425},\"cifsUser\":{\"username\":\"zgemjdftuljlt\"}},\"provisioningState\":\"Patching\",\"server\":{\"fqdn\":\"mtmczuome\",\"certificateObject\":\"cwwqiokn\"},\"permissions\":\"ReadWrite\"}") + .toObject(BucketPatchProperties.class); + Assertions.assertEquals("cvdsrhnj", model.path()); + Assertions.assertEquals(8488959780262323L, model.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(7983763858754092425L, model.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("zgemjdftuljlt", model.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("mtmczuome", model.server().fqdn()); + Assertions.assertEquals("cwwqiokn", model.server().certificateObject()); + Assertions.assertEquals(BucketPatchPermissions.READ_WRITE, model.permissions()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BucketPatchProperties model = new BucketPatchProperties().withPath("cvdsrhnj") + .withFileSystemUser(new FileSystemUser() + .withNfsUser(new NfsUser().withUserId(8488959780262323L).withGroupId(7983763858754092425L)) + .withCifsUser(new CifsUser().withUsername("zgemjdftuljlt"))) + .withServer(new BucketServerPatchProperties().withFqdn("mtmczuome").withCertificateObject("cwwqiokn")) + .withPermissions(BucketPatchPermissions.READ_WRITE); + model = BinaryData.fromObject(model).toObject(BucketPatchProperties.class); + Assertions.assertEquals("cvdsrhnj", model.path()); + Assertions.assertEquals(8488959780262323L, model.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(7983763858754092425L, model.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("zgemjdftuljlt", model.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("mtmczuome", model.server().fqdn()); + Assertions.assertEquals("cwwqiokn", model.server().certificateObject()); + Assertions.assertEquals(BucketPatchPermissions.READ_WRITE, model.permissions()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPatchTests.java new file mode 100644 index 000000000000..7ebccb30e4fc --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPatchTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.BucketPatch; +import com.azure.resourcemanager.netapp.models.BucketPatchPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerPatchProperties; +import com.azure.resourcemanager.netapp.models.CifsUser; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.NfsUser; +import org.junit.jupiter.api.Assertions; + +public final class BucketPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BucketPatch model = BinaryData.fromString( + "{\"properties\":{\"path\":\"eacvl\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":3388042618474963234,\"groupId\":188251228216861002},\"cifsUser\":{\"username\":\"twnawjslbiwkojgc\"}},\"provisioningState\":\"Creating\",\"server\":{\"fqdn\":\"mznbaeqphch\",\"certificateObject\":\"rn\"},\"permissions\":\"ReadOnly\"},\"id\":\"huwrykqgaifm\",\"name\":\"iklbydvkhb\",\"type\":\"jdz\"}") + .toObject(BucketPatch.class); + Assertions.assertEquals("eacvl", model.path()); + Assertions.assertEquals(3388042618474963234L, model.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(188251228216861002L, model.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("twnawjslbiwkojgc", model.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("mznbaeqphch", model.server().fqdn()); + Assertions.assertEquals("rn", model.server().certificateObject()); + Assertions.assertEquals(BucketPatchPermissions.READ_ONLY, model.permissions()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BucketPatch model = new BucketPatch().withPath("eacvl") + .withFileSystemUser(new FileSystemUser() + .withNfsUser(new NfsUser().withUserId(3388042618474963234L).withGroupId(188251228216861002L)) + .withCifsUser(new CifsUser().withUsername("twnawjslbiwkojgc"))) + .withServer(new BucketServerPatchProperties().withFqdn("mznbaeqphch").withCertificateObject("rn")) + .withPermissions(BucketPatchPermissions.READ_ONLY); + model = BinaryData.fromObject(model).toObject(BucketPatch.class); + Assertions.assertEquals("eacvl", model.path()); + Assertions.assertEquals(3388042618474963234L, model.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(188251228216861002L, model.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("twnawjslbiwkojgc", model.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("mznbaeqphch", model.server().fqdn()); + Assertions.assertEquals("rn", model.server().certificateObject()); + Assertions.assertEquals(BucketPatchPermissions.READ_ONLY, model.permissions()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPropertiesTests.java new file mode 100644 index 000000000000..238ad98db011 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPropertiesTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.BucketProperties; +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerProperties; +import com.azure.resourcemanager.netapp.models.CifsUser; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.NfsUser; +import org.junit.jupiter.api.Assertions; + +public final class BucketPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BucketProperties model = BinaryData.fromString( + "{\"path\":\"n\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":2550755186475487656,\"groupId\":4011927311891556520},\"cifsUser\":{\"username\":\"aojfm\"}},\"provisioningState\":\"Patching\",\"status\":\"NoCredentialsSet\",\"server\":{\"fqdn\":\"fhir\",\"certificateCommonName\":\"ymoxoftpipiwyczu\",\"certificateExpiryDate\":\"2021-05-14T09:28:57Z\",\"ipAddress\":\"pqjlihhyusps\",\"certificateObject\":\"sdvlmfwdgzxulucv\"},\"permissions\":\"ReadWrite\"}") + .toObject(BucketProperties.class); + Assertions.assertEquals("n", model.path()); + Assertions.assertEquals(2550755186475487656L, model.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(4011927311891556520L, model.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("aojfm", model.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("fhir", model.server().fqdn()); + Assertions.assertEquals("sdvlmfwdgzxulucv", model.server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_WRITE, model.permissions()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BucketProperties model = new BucketProperties().withPath("n") + .withFileSystemUser(new FileSystemUser() + .withNfsUser(new NfsUser().withUserId(2550755186475487656L).withGroupId(4011927311891556520L)) + .withCifsUser(new CifsUser().withUsername("aojfm"))) + .withServer(new BucketServerProperties().withFqdn("fhir").withCertificateObject("sdvlmfwdgzxulucv")) + .withPermissions(BucketPermissions.READ_WRITE); + model = BinaryData.fromObject(model).toObject(BucketProperties.class); + Assertions.assertEquals("n", model.path()); + Assertions.assertEquals(2550755186475487656L, model.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(4011927311891556520L, model.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("aojfm", model.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("fhir", model.server().fqdn()); + Assertions.assertEquals("sdvlmfwdgzxulucv", model.server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_WRITE, model.permissions()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPatchPropertiesTests.java new file mode 100644 index 000000000000..163b551e7e1c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPatchPropertiesTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.BucketServerPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class BucketServerPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BucketServerPatchProperties model + = BinaryData.fromString("{\"fqdn\":\"ojmsvpkjprvkwc\",\"certificateObject\":\"ql\"}") + .toObject(BucketServerPatchProperties.class); + Assertions.assertEquals("ojmsvpkjprvkwc", model.fqdn()); + Assertions.assertEquals("ql", model.certificateObject()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BucketServerPatchProperties model + = new BucketServerPatchProperties().withFqdn("ojmsvpkjprvkwc").withCertificateObject("ql"); + model = BinaryData.fromObject(model).toObject(BucketServerPatchProperties.class); + Assertions.assertEquals("ojmsvpkjprvkwc", model.fqdn()); + Assertions.assertEquals("ql", model.certificateObject()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPropertiesTests.java new file mode 100644 index 000000000000..a0175d4494d2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPropertiesTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.BucketServerProperties; +import org.junit.jupiter.api.Assertions; + +public final class BucketServerPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BucketServerProperties model = BinaryData.fromString( + "{\"fqdn\":\"sutrgjup\",\"certificateCommonName\":\"utpwoqhihejqgw\",\"certificateExpiryDate\":\"2021-03-21T20:16:43Z\",\"ipAddress\":\"qntcypsxjvfoimwk\",\"certificateObject\":\"ircizjxvy\"}") + .toObject(BucketServerProperties.class); + Assertions.assertEquals("sutrgjup", model.fqdn()); + Assertions.assertEquals("ircizjxvy", model.certificateObject()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BucketServerProperties model + = new BucketServerProperties().withFqdn("sutrgjup").withCertificateObject("ircizjxvy"); + model = BinaryData.fromObject(model).toObject(BucketServerProperties.class); + Assertions.assertEquals("sutrgjup", model.fqdn()); + Assertions.assertEquals("ircizjxvy", model.certificateObject()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..510d1c5eda2d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateMockTests.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.Bucket; +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerProperties; +import com.azure.resourcemanager.netapp.models.CifsUser; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.NfsUser; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class BucketsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"path\":\"foxcx\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":1543708796177391402,\"groupId\":1623834803788196043},\"cifsUser\":{\"username\":\"krmukmyjmkxett\"}},\"provisioningState\":\"Succeeded\",\"status\":\"CredentialsExpired\",\"server\":{\"fqdn\":\"qid\",\"certificateCommonName\":\"toqxjh\",\"certificateExpiryDate\":\"2021-08-12T22:31:31Z\",\"ipAddress\":\"qhtkbt\",\"certificateObject\":\"l\"},\"permissions\":\"ReadWrite\"},\"id\":\"dmbi\",\"name\":\"psnaww\",\"type\":\"qkzn\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Bucket response = manager.buckets() + .define("yutrymd") + .withExistingVolume("pjptn", "wjhrsidqpxlbtpa", "f", "ngatwmy") + .withPath("jhp") + .withFileSystemUser(new FileSystemUser() + .withNfsUser(new NfsUser().withUserId(1031808729537103141L).withGroupId(6740048000390481231L)) + .withCifsUser(new CifsUser().withUsername("pldrlefgnaavuag"))) + .withServer(new BucketServerProperties().withFqdn("tnpdctuhspfefy").withCertificateObject("h")) + .withPermissions(BucketPermissions.READ_ONLY) + .create(); + + Assertions.assertEquals("foxcx", response.path()); + Assertions.assertEquals(1543708796177391402L, response.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(1623834803788196043L, response.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("krmukmyjmkxett", response.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("qid", response.server().fqdn()); + Assertions.assertEquals("l", response.server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_WRITE, response.permissions()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsGetWithResponseMockTests.java new file mode 100644 index 000000000000..735f48c12216 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsGetWithResponseMockTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.Bucket; +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class BucketsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"path\":\"vuqbozoo\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":8547000283721640460,\"groupId\":8793158195572566388},\"cifsUser\":{\"username\":\"bc\"}},\"provisioningState\":\"Succeeded\",\"status\":\"CredentialsExpired\",\"server\":{\"fqdn\":\"awqytllhdyzm\",\"certificateCommonName\":\"kzexnx\",\"certificateExpiryDate\":\"2021-06-14T23:11:42Z\",\"ipAddress\":\"ywymxgaabj\",\"certificateObject\":\"tfohf\"},\"permissions\":\"ReadWrite\"},\"id\":\"vkiwrsiwdyjqu\",\"name\":\"ykcrraue\",\"type\":\"kcsueho\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Bucket response = manager.buckets() + .getWithResponse("fajs", "kskmqozzkivyhjrl", "izjixlq", "hefkwabsolronqq", "mgnlqxsjxtel", + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("vuqbozoo", response.path()); + Assertions.assertEquals(8547000283721640460L, response.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(8793158195572566388L, response.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("bc", response.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("awqytllhdyzm", response.server().fqdn()); + Assertions.assertEquals("tfohf", response.server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_WRITE, response.permissions()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsListMockTests.java new file mode 100644 index 000000000000..fb0cae573ce9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsListMockTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.Bucket; +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class BucketsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"path\":\"bnfddep\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":8132115358222180607,\"groupId\":361997812372554358},\"cifsUser\":{\"username\":\"leexahvmywh\"}},\"provisioningState\":\"Deleting\",\"status\":\"CredentialsExpired\",\"server\":{\"fqdn\":\"csjjzyvoaqajuve\",\"certificateCommonName\":\"ptdmkrrbhmpful\",\"certificateExpiryDate\":\"2020-12-21T15:41:53Z\",\"ipAddress\":\"gybpmfb\",\"certificateObject\":\"nunmpzkrv\"},\"permissions\":\"ReadWrite\"},\"id\":\"kdschlzvfictnkjj\",\"name\":\"gcwn\",\"type\":\"hbkgfyrt\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable<Bucket> response = manager.buckets() + .list("ddacbcbgydlqidy", "mhmpty", "ilkfbnrqqxv", "tpbnfnqtxjtoma", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("bnfddep", response.iterator().next().path()); + Assertions.assertEquals(8132115358222180607L, response.iterator().next().fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(361997812372554358L, response.iterator().next().fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("leexahvmywh", response.iterator().next().fileSystemUser().cifsUser().username()); + Assertions.assertEquals("csjjzyvoaqajuve", response.iterator().next().server().fqdn()); + Assertions.assertEquals("nunmpzkrv", response.iterator().next().server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_WRITE, response.iterator().next().permissions()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CacheMountTargetPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CacheMountTargetPropertiesTests.java new file mode 100644 index 000000000000..d532b4fcf6a4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CacheMountTargetPropertiesTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.CacheMountTargetProperties; + +public final class CacheMountTargetPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CacheMountTargetProperties model = BinaryData + .fromString("{\"mountTargetId\":\"jlfrq\",\"ipAddress\":\"bajlka\",\"smbServerFqdn\":\"wxyiopidkqq\"}") + .toObject(CacheMountTargetProperties.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java new file mode 100644 index 000000000000..131c5bdf8936 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.PeeringPassphrases; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class CachesListPeeringPassphrasesWithResponseMockTests { + @Test + public void testListPeeringPassphrasesWithResponse() throws Exception { + String responseStr + = "{\"clusterPeeringCommand\":\"oka\",\"clusterPeeringPassphrase\":\"vfejvqnttmbqda\",\"vserverPeeringCommand\":\"zfivfokpysthhzag\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PeeringPassphrases response = manager.caches() + .listPeeringPassphrasesWithResponse("vzkwwwncknr", "dajlskzpt", "xulweucyrthxqle", "mcgcjeinue", + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("oka", response.clusterPeeringCommand()); + Assertions.assertEquals("vfejvqnttmbqda", response.clusterPeeringPassphrase()); + Assertions.assertEquals("zfivfokpysthhzag", response.vserverPeeringCommand()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java index e7580558ec13..a2f60451d0b9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java @@ -17,37 +17,37 @@ public final class CapacityPoolInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapacityPoolInner model = BinaryData.fromString( - "{\"properties\":{\"poolId\":\"tnovqfzgemjdftul\",\"size\":7390049782510101354,\"serviceLevel\":\"Flexible\",\"provisioningState\":\"ceamtm\",\"totalThroughputMibps\":2.9999912,\"utilizedThroughputMibps\":1.4412522,\"customThroughputMibps\":418634069,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"etag\":\"knssxmojm\",\"location\":\"p\",\"tags\":{\"zqljyxgtczh\":\"rvkwc\",\"hmkxmaehvbb\":\"ydbsd\",\"kgxywr\":\"uripltfnhtba\",\"uodpv\":\"kpyklyhp\"},\"id\":\"uudl\",\"name\":\"zibt\",\"type\":\"ostgkts\"}") + "{\"properties\":{\"poolId\":\"wvnph\",\"size\":5544744614322869903,\"serviceLevel\":\"Flexible\",\"provisioningState\":\"pjhmqrhvthl\",\"totalThroughputMibps\":63.386166,\"utilizedThroughputMibps\":5.9982357,\"customThroughputMibps\":1795425186,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"etag\":\"txetlgydl\",\"location\":\"vlnnpx\",\"tags\":{\"gjekglklby\":\"fiqgeaar\",\"hj\":\"lidwcwvmzegjon\",\"zhzmtksjci\":\"rwgdnqzbrfks\",\"plkeuachtomflryt\":\"digsxcdgl\"},\"id\":\"wfpfmdgycx\",\"name\":\"mskwhqjjysl\",\"type\":\"rlpshhkv\"}") .toObject(CapacityPoolInner.class); - Assertions.assertEquals("p", model.location()); - Assertions.assertEquals("rvkwc", model.tags().get("zqljyxgtczh")); - Assertions.assertEquals(7390049782510101354L, model.size()); + Assertions.assertEquals("vlnnpx", model.location()); + Assertions.assertEquals("fiqgeaar", model.tags().get("gjekglklby")); + Assertions.assertEquals(5544744614322869903L, model.size()); Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.serviceLevel()); - Assertions.assertEquals(418634069, model.customThroughputMibps()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertFalse(model.coolAccess()); + Assertions.assertEquals(1795425186, model.customThroughputMibps()); + Assertions.assertEquals(QosType.MANUAL, model.qosType()); + Assertions.assertTrue(model.coolAccess()); Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CapacityPoolInner model = new CapacityPoolInner().withLocation("p") - .withTags( - mapOf("zqljyxgtczh", "rvkwc", "hmkxmaehvbb", "ydbsd", "kgxywr", "uripltfnhtba", "uodpv", "kpyklyhp")) - .withSize(7390049782510101354L) + CapacityPoolInner model = new CapacityPoolInner().withLocation("vlnnpx") + .withTags(mapOf("gjekglklby", "fiqgeaar", "hj", "lidwcwvmzegjon", "zhzmtksjci", "rwgdnqzbrfks", + "plkeuachtomflryt", "digsxcdgl")) + .withSize(5544744614322869903L) .withServiceLevel(ServiceLevel.FLEXIBLE) - .withCustomThroughputMibps(418634069) - .withQosType(QosType.AUTO) - .withCoolAccess(false) + .withCustomThroughputMibps(1795425186) + .withQosType(QosType.MANUAL) + .withCoolAccess(true) .withEncryptionType(EncryptionType.DOUBLE); model = BinaryData.fromObject(model).toObject(CapacityPoolInner.class); - Assertions.assertEquals("p", model.location()); - Assertions.assertEquals("rvkwc", model.tags().get("zqljyxgtczh")); - Assertions.assertEquals(7390049782510101354L, model.size()); + Assertions.assertEquals("vlnnpx", model.location()); + Assertions.assertEquals("fiqgeaar", model.tags().get("gjekglklby")); + Assertions.assertEquals(5544744614322869903L, model.size()); Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.serviceLevel()); - Assertions.assertEquals(418634069, model.customThroughputMibps()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertFalse(model.coolAccess()); + Assertions.assertEquals(1795425186, model.customThroughputMibps()); + Assertions.assertEquals(QosType.MANUAL, model.qosType()); + Assertions.assertTrue(model.coolAccess()); Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java index f8e28f7cca70..95bc679477e5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java @@ -15,16 +15,16 @@ public final class CapacityPoolListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapacityPoolList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"poolId\":\"agohbuff\",\"size\":2232582311474631364,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"mvvhmxtdrjfuta\",\"totalThroughputMibps\":65.33831,\"utilizedThroughputMibps\":78.66932,\"customThroughputMibps\":650990462,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"wcpmguaadraufac\",\"location\":\"ahzovajjziuxxp\",\"tags\":{\"enr\":\"eekulfgslqubkwd\",\"pjuohminyfl\":\"sutujba\"},\"id\":\"orwmduvwpklv\",\"name\":\"w\",\"type\":\"ygdxpgpqchis\"},{\"properties\":{\"poolId\":\"pnnbjc\",\"size\":7786397610725733542,\"serviceLevel\":\"Flexible\",\"provisioningState\":\"bdaxconfozauorsu\",\"totalThroughputMibps\":71.50412,\"utilizedThroughputMibps\":30.461628,\"customThroughputMibps\":1406759128,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"etag\":\"epzl\",\"location\":\"hw\",\"tags\":{\"wey\":\"l\",\"talywjhhgdnhxms\":\"qdunvmnnrwrbior\",\"omi\":\"v\"},\"id\":\"ox\",\"name\":\"gdufiqnd\",\"type\":\"euzaof\"},{\"properties\":{\"poolId\":\"hvcyyysfg\",\"size\":5917251343624011044,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"biipuip\",\"totalThroughputMibps\":38.999645,\"utilizedThroughputMibps\":26.093245,\"customThroughputMibps\":1863787560,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"etag\":\"shqvcimpev\",\"location\":\"mblrrilbywd\",\"tags\":{\"rwfscjfnynszquj\":\"icc\",\"gyavu\":\"zdvoqytibyowbb\",\"smsks\":\"pthjoxo\",\"lqol\":\"pi\"},\"id\":\"xkcgxxlxsffgcvi\",\"name\":\"qzdwlvwlyoup\",\"type\":\"gfbkjubdyh\"},{\"properties\":{\"poolId\":\"fminsgowzf\",\"size\":3309941778234907018,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"ktlahbqa\",\"totalThroughputMibps\":96.70858,\"utilizedThroughputMibps\":52.75987,\"customThroughputMibps\":1217445631,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"tg\",\"location\":\"q\",\"tags\":{\"rxcpjuisavo\":\"n\",\"ajlkatnw\":\"qdzfvazivjlfrqtt\"},\"id\":\"yiopi\",\"name\":\"kqqfk\",\"type\":\"vscx\"}],\"nextLink\":\"mligov\"}") + "{\"value\":[{\"properties\":{\"poolId\":\"ui\",\"size\":7795929404530107867,\"serviceLevel\":\"Standard\",\"provisioningState\":\"aztb\",\"totalThroughputMibps\":15.64473,\"utilizedThroughputMibps\":45.797707,\"customThroughputMibps\":2137351817,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"etag\":\"kytwvcz\",\"location\":\"wka\",\"tags\":{\"b\":\"jyfdvlv\",\"th\":\"rnfxtgddp\",\"naoyank\":\"hn\",\"swankltytmh\":\"oe\"},\"id\":\"roznnhdrlktgj\",\"name\":\"sggux\",\"type\":\"eml\"}],\"nextLink\":\"waeeczgfb\"}") .toObject(CapacityPoolList.class); - Assertions.assertEquals("ahzovajjziuxxp", model.value().get(0).location()); - Assertions.assertEquals("eekulfgslqubkwd", model.value().get(0).tags().get("enr")); - Assertions.assertEquals(2232582311474631364L, model.value().get(0).size()); - Assertions.assertEquals(ServiceLevel.ULTRA, model.value().get(0).serviceLevel()); - Assertions.assertEquals(650990462, model.value().get(0).customThroughputMibps()); - Assertions.assertEquals(QosType.MANUAL, model.value().get(0).qosType()); - Assertions.assertTrue(model.value().get(0).coolAccess()); - Assertions.assertEquals(EncryptionType.SINGLE, model.value().get(0).encryptionType()); - Assertions.assertEquals("mligov", model.nextLink()); + Assertions.assertEquals("wka", model.value().get(0).location()); + Assertions.assertEquals("jyfdvlv", model.value().get(0).tags().get("b")); + Assertions.assertEquals(7795929404530107867L, model.value().get(0).size()); + Assertions.assertEquals(ServiceLevel.STANDARD, model.value().get(0).serviceLevel()); + Assertions.assertEquals(2137351817, model.value().get(0).customThroughputMibps()); + Assertions.assertEquals(QosType.AUTO, model.value().get(0).qosType()); + Assertions.assertFalse(model.value().get(0).coolAccess()); + Assertions.assertEquals(EncryptionType.DOUBLE, model.value().get(0).encryptionType()); + Assertions.assertEquals("waeeczgfb", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java index ebf8b3eea75e..3efbf3e27df7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java @@ -15,31 +15,31 @@ public final class CapacityPoolPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapacityPoolPatch model = BinaryData.fromString( - "{\"location\":\"btx\",\"id\":\"gfwsrtaw\",\"name\":\"ezbrhubskh\",\"type\":\"ygo\",\"tags\":{\"orfmluiqt\":\"kqfqjbvl\",\"vyvnqqyb\":\"zf\",\"yjkqabqgzslesjcb\":\"ryeu\"},\"properties\":{\"size\":908053922560982746,\"qosType\":\"Auto\",\"coolAccess\":false,\"customThroughputMibps\":1014646419}}") + "{\"location\":\"inuqtljq\",\"id\":\"bpihehcecybmrqbr\",\"name\":\"bmpxdlvykfrexc\",\"type\":\"eqwjksgh\",\"tags\":{\"jkxibda\":\"zhxogjggsvo\",\"y\":\"hrkmdyomkxfbvfbh\"},\"properties\":{\"size\":8832488206346498330,\"qosType\":\"Auto\",\"coolAccess\":true,\"customThroughputMibps\":395369320}}") .toObject(CapacityPoolPatch.class); - Assertions.assertEquals("btx", model.location()); - Assertions.assertEquals("kqfqjbvl", model.tags().get("orfmluiqt")); - Assertions.assertEquals(908053922560982746L, model.size()); + Assertions.assertEquals("inuqtljq", model.location()); + Assertions.assertEquals("zhxogjggsvo", model.tags().get("jkxibda")); + Assertions.assertEquals(8832488206346498330L, model.size()); Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(1014646419, model.customThroughputMibps()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(395369320, model.customThroughputMibps()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CapacityPoolPatch model = new CapacityPoolPatch().withLocation("btx") - .withTags(mapOf("orfmluiqt", "kqfqjbvl", "vyvnqqyb", "zf", "yjkqabqgzslesjcb", "ryeu")) - .withSize(908053922560982746L) + CapacityPoolPatch model = new CapacityPoolPatch().withLocation("inuqtljq") + .withTags(mapOf("jkxibda", "zhxogjggsvo", "y", "hrkmdyomkxfbvfbh")) + .withSize(8832488206346498330L) .withQosType(QosType.AUTO) - .withCoolAccess(false) - .withCustomThroughputMibps(1014646419); + .withCoolAccess(true) + .withCustomThroughputMibps(395369320); model = BinaryData.fromObject(model).toObject(CapacityPoolPatch.class); - Assertions.assertEquals("btx", model.location()); - Assertions.assertEquals("kqfqjbvl", model.tags().get("orfmluiqt")); - Assertions.assertEquals(908053922560982746L, model.size()); + Assertions.assertEquals("inuqtljq", model.location()); + Assertions.assertEquals("zhxogjggsvo", model.tags().get("jkxibda")); + Assertions.assertEquals(8832488206346498330L, model.size()); Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(1014646419, model.customThroughputMibps()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(395369320, model.customThroughputMibps()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ChangeZoneRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ChangeZoneRequestTests.java new file mode 100644 index 000000000000..a236323849df --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ChangeZoneRequestTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ChangeZoneRequest; +import org.junit.jupiter.api.Assertions; + +public final class ChangeZoneRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ChangeZoneRequest model = BinaryData.fromString("{\"newZone\":\"jnaeois\"}").toObject(ChangeZoneRequest.class); + Assertions.assertEquals("jnaeois", model.newZone()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ChangeZoneRequest model = new ChangeZoneRequest().withNewZone("jnaeois"); + model = BinaryData.fromObject(model).toObject(ChangeZoneRequest.class); + Assertions.assertEquals("jnaeois", model.newZone()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java index c25533f3e946..4eb1bfd5c6b8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java @@ -12,11 +12,11 @@ public final class CheckAvailabilityResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CheckAvailabilityResponseInner model - = BinaryData.fromString("{\"isAvailable\":false,\"reason\":\"Invalid\",\"message\":\"npkc\"}") - .toObject(CheckAvailabilityResponseInner.class); + CheckAvailabilityResponseInner model = BinaryData + .fromString("{\"isAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"xnqmhrpqpdfwm\"}") + .toObject(CheckAvailabilityResponseInner.class); Assertions.assertFalse(model.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.INVALID, model.reason()); - Assertions.assertEquals("npkc", model.message()); + Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, model.reason()); + Assertions.assertEquals("xnqmhrpqpdfwm", model.message()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticResourceAvailabilityResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticResourceAvailabilityResponseInnerTests.java new file mode 100644 index 000000000000..c514a8e334e8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticResourceAvailabilityResponseInnerTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityReason; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityStatus; +import org.junit.jupiter.api.Assertions; + +public final class CheckElasticResourceAvailabilityResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CheckElasticResourceAvailabilityResponseInner model = BinaryData + .fromString("{\"isAvailable\":\"True\",\"reason\":\"AlreadyExists\",\"message\":\"wplefaxvxil\"}") + .toObject(CheckElasticResourceAvailabilityResponseInner.class); + Assertions.assertEquals(CheckElasticResourceAvailabilityStatus.TRUE, model.isAvailable()); + Assertions.assertEquals(CheckElasticResourceAvailabilityReason.ALREADY_EXISTS, model.reason()); + Assertions.assertEquals("wplefaxvxil", model.message()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticVolumeFilePathAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticVolumeFilePathAvailabilityRequestTests.java new file mode 100644 index 000000000000..deb3a1aca95c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticVolumeFilePathAvailabilityRequestTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; +import org.junit.jupiter.api.Assertions; + +public final class CheckElasticVolumeFilePathAvailabilityRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CheckElasticVolumeFilePathAvailabilityRequest model = BinaryData.fromString("{\"filePath\":\"vhmgorffukis\"}") + .toObject(CheckElasticVolumeFilePathAvailabilityRequest.class); + Assertions.assertEquals("vhmgorffukis", model.filePath()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CheckElasticVolumeFilePathAvailabilityRequest model + = new CheckElasticVolumeFilePathAvailabilityRequest().withFilePath("vhmgorffukis"); + model = BinaryData.fromObject(model).toObject(CheckElasticVolumeFilePathAvailabilityRequest.class); + Assertions.assertEquals("vhmgorffukis", model.filePath()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CifsUserTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CifsUserTests.java new file mode 100644 index 000000000000..22a36117a266 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CifsUserTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.CifsUser; +import org.junit.jupiter.api.Assertions; + +public final class CifsUserTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CifsUser model = BinaryData.fromString("{\"username\":\"wp\"}").toObject(CifsUser.class); + Assertions.assertEquals("wp", model.username()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CifsUser model = new CifsUser().withUsername("wp"); + model = BinaryData.fromObject(model).toObject(CifsUser.class); + Assertions.assertEquals("wp", model.username()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerCommandResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerCommandResponseInnerTests.java index d55997c6c48a..560b04d0ee1e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerCommandResponseInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerCommandResponseInnerTests.java @@ -11,8 +11,8 @@ public final class ClusterPeerCommandResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ClusterPeerCommandResponseInner model = BinaryData.fromString("{\"peerAcceptCommand\":\"iwjmygtdssls\"}") + ClusterPeerCommandResponseInner model = BinaryData.fromString("{\"peerAcceptCommand\":\"ibqdxbxwakbogqx\"}") .toObject(ClusterPeerCommandResponseInner.class); - Assertions.assertEquals("iwjmygtdssls", model.peerAcceptCommand()); + Assertions.assertEquals("ibqdxbxwakbogqx", model.peerAcceptCommand()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java index d18f97ec2217..96a676fa804a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java @@ -12,24 +12,24 @@ public final class DailyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DailySchedule model = BinaryData.fromString( - "{\"snapshotsToKeep\":351540832,\"hour\":1043474675,\"minute\":1810528552,\"usedBytes\":2246531138644222618}") + "{\"snapshotsToKeep\":1035814224,\"hour\":675446410,\"minute\":549865384,\"usedBytes\":5255537493272573987}") .toObject(DailySchedule.class); - Assertions.assertEquals(351540832, model.snapshotsToKeep()); - Assertions.assertEquals(1043474675, model.hour()); - Assertions.assertEquals(1810528552, model.minute()); - Assertions.assertEquals(2246531138644222618L, model.usedBytes()); + Assertions.assertEquals(1035814224, model.snapshotsToKeep()); + Assertions.assertEquals(675446410, model.hour()); + Assertions.assertEquals(549865384, model.minute()); + Assertions.assertEquals(5255537493272573987L, model.usedBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DailySchedule model = new DailySchedule().withSnapshotsToKeep(351540832) - .withHour(1043474675) - .withMinute(1810528552) - .withUsedBytes(2246531138644222618L); + DailySchedule model = new DailySchedule().withSnapshotsToKeep(1035814224) + .withHour(675446410) + .withMinute(549865384) + .withUsedBytes(5255537493272573987L); model = BinaryData.fromObject(model).toObject(DailySchedule.class); - Assertions.assertEquals(351540832, model.snapshotsToKeep()); - Assertions.assertEquals(1043474675, model.hour()); - Assertions.assertEquals(1810528552, model.minute()); - Assertions.assertEquals(2246531138644222618L, model.usedBytes()); + Assertions.assertEquals(1035814224, model.snapshotsToKeep()); + Assertions.assertEquals(675446410, model.hour()); + Assertions.assertEquals(549865384, model.minute()); + Assertions.assertEquals(5255537493272573987L, model.usedBytes()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DestinationReplicationTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DestinationReplicationTests.java index 9f9824e96731..66f26193751f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DestinationReplicationTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DestinationReplicationTests.java @@ -13,11 +13,11 @@ public final class DestinationReplicationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DestinationReplication model = BinaryData.fromString( - "{\"resourceId\":\"rgvtqag\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"nhijggmebfsi\",\"zone\":\"butr\"}") + "{\"resourceId\":\"bxzpuzycisp\",\"replicationType\":\"CrossZoneReplication\",\"region\":\"hmgkbrpyy\",\"zone\":\"ibnuqqkpik\"}") .toObject(DestinationReplication.class); - Assertions.assertEquals("rgvtqag", model.resourceId()); - Assertions.assertEquals(ReplicationType.CROSS_REGION_REPLICATION, model.replicationType()); - Assertions.assertEquals("nhijggmebfsi", model.region()); - Assertions.assertEquals("butr", model.zone()); + Assertions.assertEquals("bxzpuzycisp", model.resourceId()); + Assertions.assertEquals(ReplicationType.CROSS_ZONE_REPLICATION, model.replicationType()); + Assertions.assertEquals("hmgkbrpyy", model.region()); + Assertions.assertEquals("ibnuqqkpik", model.zone()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupInnerTests.java new file mode 100644 index 000000000000..b0c76daa86d1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupInnerTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupProperties; +import com.azure.resourcemanager.netapp.models.SnapshotUsage; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupInner model = BinaryData.fromString( + "{\"properties\":{\"creationDate\":\"2021-05-15T07:09:59Z\",\"snapshotCreationDate\":\"2021-07-06T22:18:04Z\",\"completionDate\":\"2021-02-19T02:47:18Z\",\"provisioningState\":\"Accepted\",\"size\":5615391531066608905,\"label\":\"mzvupor\",\"backupType\":\"Manual\",\"failureReason\":\"uydzvk\",\"elasticVolumeResourceId\":\"vxcnqmxqps\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"vkhlggdhbemz\",\"elasticBackupPolicyResourceId\":\"zszuwiwtglxx\",\"volumeSize\":\"Regular\"},\"id\":\"pg\",\"name\":\"icrmnzh\",\"type\":\"gmqgjs\"}") + .toObject(ElasticBackupInner.class); + Assertions.assertEquals("mzvupor", model.properties().label()); + Assertions.assertEquals("vxcnqmxqps", model.properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, model.properties().snapshotUsage()); + Assertions.assertEquals("vkhlggdhbemz", model.properties().elasticSnapshotResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupInner model + = new ElasticBackupInner().withProperties(new ElasticBackupProperties().withLabel("mzvupor") + .withElasticVolumeResourceId("vxcnqmxqps") + .withSnapshotUsage(SnapshotUsage.USE_EXISTING_SNAPSHOT) + .withElasticSnapshotResourceId("vkhlggdhbemz")); + model = BinaryData.fromObject(model).toObject(ElasticBackupInner.class); + Assertions.assertEquals("mzvupor", model.properties().label()); + Assertions.assertEquals("vxcnqmxqps", model.properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, model.properties().snapshotUsage()); + Assertions.assertEquals("vkhlggdhbemz", model.properties().elasticSnapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupListResultTests.java new file mode 100644 index 000000000000..c11fadf2b93c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupListResultTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.implementation.models.ElasticBackupListResult; +import com.azure.resourcemanager.netapp.models.SnapshotUsage; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"creationDate\":\"2021-06-24T14:54:49Z\",\"snapshotCreationDate\":\"2021-10-04T06:14:32Z\",\"completionDate\":\"2021-10-24T12:56:34Z\",\"provisioningState\":\"Accepted\",\"size\":935725663715355560,\"label\":\"nykzcugswvxwlm\",\"backupType\":\"Manual\",\"failureReason\":\"vtxnjmxmcuqud\",\"elasticVolumeResourceId\":\"cvclxynpdk\",\"snapshotUsage\":\"CreateNewSnapshot\",\"elasticSnapshotResourceId\":\"buiyji\",\"elasticBackupPolicyResourceId\":\"zphdugneiknp\",\"volumeSize\":\"Large\"},\"id\":\"jiuqhibtozi\",\"name\":\"qw\",\"type\":\"edmurrxxge\"},{\"properties\":{\"creationDate\":\"2021-06-22T20:24:57Z\",\"snapshotCreationDate\":\"2021-05-29T11:10:18Z\",\"completionDate\":\"2021-03-16T06:40:41Z\",\"provisioningState\":\"Succeeded\",\"size\":3020055328504927259,\"label\":\"hlfbcgwgc\",\"backupType\":\"Manual\",\"failureReason\":\"ebqinjipnw\",\"elasticVolumeResourceId\":\"fujqlafcba\",\"snapshotUsage\":\"CreateNewSnapshot\",\"elasticSnapshotResourceId\":\"pofoi\",\"elasticBackupPolicyResourceId\":\"w\",\"volumeSize\":\"Large\"},\"id\":\"kmkkholvdnd\",\"name\":\"iauogphuartv\",\"type\":\"iukyefchnmna\"},{\"properties\":{\"creationDate\":\"2021-09-13T15:02:21Z\",\"snapshotCreationDate\":\"2020-12-28T05:33:43Z\",\"completionDate\":\"2021-01-28T01:51:57Z\",\"provisioningState\":\"Patching\",\"size\":6542563185953297376,\"label\":\"eooxffifh\",\"backupType\":\"Scheduled\",\"failureReason\":\"newmozqvb\",\"elasticVolumeResourceId\":\"bqmamhsycxhxzgaz\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"o\",\"elasticBackupPolicyResourceId\":\"vmfqhppubo\",\"volumeSize\":\"Regular\"},\"id\":\"dfgkmtdh\",\"name\":\"rngbtcjuahokqtob\",\"type\":\"auxofshfph\"},{\"properties\":{\"creationDate\":\"2021-04-27T16:43:49Z\",\"snapshotCreationDate\":\"2021-02-08T14:31:19Z\",\"completionDate\":\"2021-11-07T16:30:06Z\",\"provisioningState\":\"Deleting\",\"size\":1933668171444781550,\"label\":\"hs\",\"backupType\":\"Manual\",\"failureReason\":\"jpllndnpdwrpq\",\"elasticVolumeResourceId\":\"fgf\",\"snapshotUsage\":\"CreateNewSnapshot\",\"elasticSnapshotResourceId\":\"n\",\"elasticBackupPolicyResourceId\":\"yetefyp\",\"volumeSize\":\"Regular\"},\"id\":\"tfjgt\",\"name\":\"xrjvzuyturmlm\",\"type\":\"owolbaui\"}],\"nextLink\":\"p\"}") + .toObject(ElasticBackupListResult.class); + Assertions.assertEquals("nykzcugswvxwlm", model.value().get(0).properties().label()); + Assertions.assertEquals("cvclxynpdk", model.value().get(0).properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.CREATE_NEW_SNAPSHOT, model.value().get(0).properties().snapshotUsage()); + Assertions.assertEquals("buiyji", model.value().get(0).properties().elasticSnapshotResourceId()); + Assertions.assertEquals("p", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..b4b6b01617e7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateMockTests.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicy; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticBackupPoliciesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":1902620686,\"weeklyBackupsToKeep\":2022478169,\"monthlyBackupsToKeep\":182145934,\"assignedVolumesCount\":1776924821,\"policyState\":\"Disabled\"},\"eTag\":\"ejbsvsiaies\",\"location\":\"ddzydisnu\",\"tags\":{\"nldpxottd\":\"wyj\",\"ocqibz\":\"i\",\"ph\":\"ihweeb\"},\"id\":\"yv\",\"name\":\"jw\",\"type\":\"w\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticBackupPolicy response = manager.elasticBackupPolicies() + .define("okjxebjvb") + .withRegion("ehaqidoyzltgio") + .withExistingElasticAccount("xstcyilbvzm", "xcjzlquze") + .withTags(mapOf("aeapfsergd", "qpep")) + .withProperties(new ElasticBackupPolicyProperties().withDailyBackupsToKeep(716967552) + .withWeeklyBackupsToKeep(1595582968) + .withMonthlyBackupsToKeep(1539684502) + .withPolicyState(ElasticBackupPolicyState.ENABLED)) + .create(); + + Assertions.assertEquals("ddzydisnu", response.location()); + Assertions.assertEquals("wyj", response.tags().get("nldpxottd")); + Assertions.assertEquals(1902620686, response.properties().dailyBackupsToKeep()); + Assertions.assertEquals(2022478169, response.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(182145934, response.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, response.properties().policyState()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetWithResponseMockTests.java new file mode 100644 index 000000000000..0b1394f17252 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetWithResponseMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicy; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticBackupPoliciesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Updating\",\"dailyBackupsToKeep\":1772784576,\"weeklyBackupsToKeep\":395179970,\"monthlyBackupsToKeep\":1664350014,\"assignedVolumesCount\":253438393,\"policyState\":\"Disabled\"},\"eTag\":\"sx\",\"location\":\"d\",\"tags\":{\"gejkbvhh\":\"uyqaeohpj\",\"xb\":\"aurghooxa\"},\"id\":\"hxjxjoezlqxrkdkn\",\"name\":\"obektmbozo\",\"type\":\"tzamicbig\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticBackupPolicy response = manager.elasticBackupPolicies() + .getWithResponse("xmolpcqydeyk", "skiczd", "rjeizik", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("d", response.location()); + Assertions.assertEquals("uyqaeohpj", response.tags().get("gejkbvhh")); + Assertions.assertEquals(1772784576, response.properties().dailyBackupsToKeep()); + Assertions.assertEquals(395179970, response.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(1664350014, response.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, response.properties().policyState()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountMockTests.java new file mode 100644 index 000000000000..6100b905eef7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountMockTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicy; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticBackupPoliciesListByElasticAccountMockTests { + @Test + public void testListByElasticAccount() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"dailyBackupsToKeep\":1759829804,\"weeklyBackupsToKeep\":587215355,\"monthlyBackupsToKeep\":1644042909,\"assignedVolumesCount\":1570012392,\"policyState\":\"Disabled\"},\"eTag\":\"z\",\"location\":\"npx\",\"tags\":{\"yxelyicghflr\":\"dpr\",\"yghsf\":\"fss\",\"fgvqcpdw\":\"rkbhammgmqfm\",\"dcdjhunh\":\"gquxweysland\"},\"id\":\"hcgawn\",\"name\":\"rnquoxso\",\"type\":\"ireimseobf\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable<ElasticBackupPolicy> response = manager.elasticBackupPolicies() + .listByElasticAccount("cdgzseznux", "euairaabmdlqjb", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("npx", response.iterator().next().location()); + Assertions.assertEquals("dpr", response.iterator().next().tags().get("yxelyicghflr")); + Assertions.assertEquals(1759829804, response.iterator().next().properties().dailyBackupsToKeep()); + Assertions.assertEquals(587215355, response.iterator().next().properties().weeklyBackupsToKeep()); + Assertions.assertEquals(1644042909, response.iterator().next().properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, + response.iterator().next().properties().policyState()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyInnerTests.java new file mode 100644 index 000000000000..3ab9e5b440fd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyInnerTests.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupPolicyInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupPolicyInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Updating\",\"dailyBackupsToKeep\":728305495,\"weeklyBackupsToKeep\":649066801,\"monthlyBackupsToKeep\":619019093,\"assignedVolumesCount\":2058612555,\"policyState\":\"Disabled\"},\"eTag\":\"mxqhndvnoamldse\",\"location\":\"ohdjhhflzok\",\"tags\":{\"atftgzpnpbsw\":\"xpelnjetagltsx\"},\"id\":\"e\",\"name\":\"loccsrmozihm\",\"type\":\"pgawtxxpkyjcxcjx\"}") + .toObject(ElasticBackupPolicyInner.class); + Assertions.assertEquals("ohdjhhflzok", model.location()); + Assertions.assertEquals("xpelnjetagltsx", model.tags().get("atftgzpnpbsw")); + Assertions.assertEquals(728305495, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(649066801, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(619019093, model.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.properties().policyState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupPolicyInner model = new ElasticBackupPolicyInner().withLocation("ohdjhhflzok") + .withTags(mapOf("atftgzpnpbsw", "xpelnjetagltsx")) + .withProperties(new ElasticBackupPolicyProperties().withDailyBackupsToKeep(728305495) + .withWeeklyBackupsToKeep(649066801) + .withMonthlyBackupsToKeep(619019093) + .withPolicyState(ElasticBackupPolicyState.DISABLED)); + model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyInner.class); + Assertions.assertEquals("ohdjhhflzok", model.location()); + Assertions.assertEquals("xpelnjetagltsx", model.tags().get("atftgzpnpbsw")); + Assertions.assertEquals(728305495, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(649066801, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(619019093, model.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.properties().policyState()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyListResultTests.java new file mode 100644 index 000000000000..ce82b10d9f6a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyListResultTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.implementation.models.ElasticBackupPolicyListResult; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupPolicyListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupPolicyListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"dailyBackupsToKeep\":1330760213,\"weeklyBackupsToKeep\":542903246,\"monthlyBackupsToKeep\":1903197758,\"assignedVolumesCount\":185276287,\"policyState\":\"Disabled\"},\"eTag\":\"oqeq\",\"location\":\"arvlagunbt\",\"tags\":{\"mhyreeudz\":\"bwln\",\"pdqmjxlyyzglgouw\":\"av\",\"qtobaxkjeyt\":\"lmjjyuo\",\"jkwrusnkq\":\"nlb\"},\"id\":\"hsyrqunj\",\"name\":\"hdenxaulk\",\"type\":\"akdkifmjnnawtqab\"},{\"properties\":{\"provisioningState\":\"Failed\",\"dailyBackupsToKeep\":241203841,\"weeklyBackupsToKeep\":1455274641,\"monthlyBackupsToKeep\":644079964,\"assignedVolumesCount\":806366464,\"policyState\":\"Enabled\"},\"eTag\":\"dhlisngwflqqmpi\",\"location\":\"uwnpqxpxiwfcng\",\"tags\":{\"xtmkzjvkviir\":\"asi\"},\"id\":\"gfgrwsdp\",\"name\":\"ra\",\"type\":\"zvzbglbyv\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":2047549854,\"weeklyBackupsToKeep\":547924946,\"monthlyBackupsToKeep\":223173205,\"assignedVolumesCount\":2103940566,\"policyState\":\"Disabled\"},\"eTag\":\"ffm\",\"location\":\"kwfbkgo\",\"tags\":{\"napxbiygnug\":\"opdbydpizqac\",\"lq\":\"knfsmfcttuxuuyil\",\"njhvsujztc\":\"iquvrehm\"},\"id\":\"ytqj\",\"name\":\"w\",\"type\":\"auunfprnjletlx\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":436134303,\"weeklyBackupsToKeep\":2070557844,\"monthlyBackupsToKeep\":453207888,\"assignedVolumesCount\":2066157212,\"policyState\":\"Enabled\"},\"eTag\":\"z\",\"location\":\"nknlqwzdvpi\",\"tags\":{\"jvmtygjbmz\":\"qszdtmaajquhuxyl\",\"yjpmspbpssdfppyo\":\"ospspshckf\",\"rxmunjdxvgln\":\"tieyujtvczkcny\",\"aglqivbgkcvkh\":\"vxlx\"},\"id\":\"zvuqdflvon\",\"name\":\"yp\",\"type\":\"pubcpzgpxtivhjk\"}],\"nextLink\":\"dibgqjxgpnrhgov\"}") + .toObject(ElasticBackupPolicyListResult.class); + Assertions.assertEquals("arvlagunbt", model.value().get(0).location()); + Assertions.assertEquals("bwln", model.value().get(0).tags().get("mhyreeudz")); + Assertions.assertEquals(1330760213, model.value().get(0).properties().dailyBackupsToKeep()); + Assertions.assertEquals(542903246, model.value().get(0).properties().weeklyBackupsToKeep()); + Assertions.assertEquals(1903197758, model.value().get(0).properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.value().get(0).properties().policyState()); + Assertions.assertEquals("dibgqjxgpnrhgov", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyPropertiesTests.java new file mode 100644 index 000000000000..717410ced817 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyPropertiesTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupPolicyPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupPolicyProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Patching\",\"dailyBackupsToKeep\":938836666,\"weeklyBackupsToKeep\":1090450036,\"monthlyBackupsToKeep\":1667275200,\"assignedVolumesCount\":1141313452,\"policyState\":\"Enabled\"}") + .toObject(ElasticBackupPolicyProperties.class); + Assertions.assertEquals(938836666, model.dailyBackupsToKeep()); + Assertions.assertEquals(1090450036, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1667275200, model.monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.policyState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupPolicyProperties model = new ElasticBackupPolicyProperties().withDailyBackupsToKeep(938836666) + .withWeeklyBackupsToKeep(1090450036) + .withMonthlyBackupsToKeep(1667275200) + .withPolicyState(ElasticBackupPolicyState.ENABLED); + model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyProperties.class); + Assertions.assertEquals(938836666, model.dailyBackupsToKeep()); + Assertions.assertEquals(1090450036, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1667275200, model.monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.policyState()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdatePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdatePropertiesTests.java new file mode 100644 index 000000000000..2666bfd6b07a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdatePropertiesTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdateProperties; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupPolicyUpdatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupPolicyUpdateProperties model = BinaryData.fromString( + "{\"dailyBackupsToKeep\":587777042,\"weeklyBackupsToKeep\":1059642687,\"monthlyBackupsToKeep\":422722790,\"policyState\":\"Disabled\"}") + .toObject(ElasticBackupPolicyUpdateProperties.class); + Assertions.assertEquals(587777042, model.dailyBackupsToKeep()); + Assertions.assertEquals(1059642687, model.weeklyBackupsToKeep()); + Assertions.assertEquals(422722790, model.monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.policyState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupPolicyUpdateProperties model + = new ElasticBackupPolicyUpdateProperties().withDailyBackupsToKeep(587777042) + .withWeeklyBackupsToKeep(1059642687) + .withMonthlyBackupsToKeep(422722790) + .withPolicyState(ElasticBackupPolicyState.DISABLED); + model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyUpdateProperties.class); + Assertions.assertEquals(587777042, model.dailyBackupsToKeep()); + Assertions.assertEquals(1059642687, model.weeklyBackupsToKeep()); + Assertions.assertEquals(422722790, model.monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.policyState()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdateTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdateTests.java new file mode 100644 index 000000000000..c97efe52efe0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdateTests.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdate; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdateProperties; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupPolicyUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupPolicyUpdate model = BinaryData.fromString( + "{\"tags\":{\"t\":\"aykggnoxu\",\"cpfnznthjtwkja\":\"ksxwpnd\",\"tcqiosmg\":\"srxuzvoam\"},\"properties\":{\"dailyBackupsToKeep\":10270964,\"weeklyBackupsToKeep\":1221237045,\"monthlyBackupsToKeep\":348009513,\"policyState\":\"Disabled\"}}") + .toObject(ElasticBackupPolicyUpdate.class); + Assertions.assertEquals("aykggnoxu", model.tags().get("t")); + Assertions.assertEquals(10270964, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(1221237045, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(348009513, model.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.properties().policyState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupPolicyUpdate model = new ElasticBackupPolicyUpdate() + .withTags(mapOf("t", "aykggnoxu", "cpfnznthjtwkja", "ksxwpnd", "tcqiosmg", "srxuzvoam")) + .withProperties(new ElasticBackupPolicyUpdateProperties().withDailyBackupsToKeep(10270964) + .withWeeklyBackupsToKeep(1221237045) + .withMonthlyBackupsToKeep(348009513) + .withPolicyState(ElasticBackupPolicyState.DISABLED)); + model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyUpdate.class); + Assertions.assertEquals("aykggnoxu", model.tags().get("t")); + Assertions.assertEquals(10270964, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(1221237045, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(348009513, model.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.properties().policyState()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPropertiesTests.java new file mode 100644 index 000000000000..0f9744cc07a5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPropertiesTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticBackupProperties; +import com.azure.resourcemanager.netapp.models.SnapshotUsage; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupProperties model = BinaryData.fromString( + "{\"creationDate\":\"2021-08-31T09:53:45Z\",\"snapshotCreationDate\":\"2021-03-17T18:09:46Z\",\"completionDate\":\"2021-04-24T23:59:25Z\",\"provisioningState\":\"Failed\",\"size\":3982074763372331569,\"label\":\"hsqqgvriibakcl\",\"backupType\":\"Scheduled\",\"failureReason\":\"rnxousxauzlwvsg\",\"elasticVolumeResourceId\":\"wohqfzizvu\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"jsvthnwpzteko\",\"elasticBackupPolicyResourceId\":\"ribi\",\"volumeSize\":\"Regular\"}") + .toObject(ElasticBackupProperties.class); + Assertions.assertEquals("hsqqgvriibakcl", model.label()); + Assertions.assertEquals("wohqfzizvu", model.elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, model.snapshotUsage()); + Assertions.assertEquals("jsvthnwpzteko", model.elasticSnapshotResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupProperties model = new ElasticBackupProperties().withLabel("hsqqgvriibakcl") + .withElasticVolumeResourceId("wohqfzizvu") + .withSnapshotUsage(SnapshotUsage.USE_EXISTING_SNAPSHOT) + .withElasticSnapshotResourceId("jsvthnwpzteko"); + model = BinaryData.fromObject(model).toObject(ElasticBackupProperties.class); + Assertions.assertEquals("hsqqgvriibakcl", model.label()); + Assertions.assertEquals("wohqfzizvu", model.elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, model.snapshotUsage()); + Assertions.assertEquals("jsvthnwpzteko", model.elasticSnapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultInnerTests.java new file mode 100644 index 000000000000..640a372745e0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultInnerTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupVaultInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupVaultInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Failed\"},\"eTag\":\"fy\",\"location\":\"gcrpfbcun\",\"tags\":{\"lfwyfwlwxjwetn\":\"cez\",\"rsqqwztcm\":\"sihclafzvaylp\",\"cxwaxfewz\":\"qkc\"},\"id\":\"kjexfdeqvhp\",\"name\":\"ylkkshkbffmbm\",\"type\":\"zjrgyww\"}") + .toObject(ElasticBackupVaultInner.class); + Assertions.assertEquals("gcrpfbcun", model.location()); + Assertions.assertEquals("cez", model.tags().get("lfwyfwlwxjwetn")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupVaultInner model = new ElasticBackupVaultInner().withLocation("gcrpfbcun") + .withTags(mapOf("lfwyfwlwxjwetn", "cez", "rsqqwztcm", "sihclafzvaylp", "cxwaxfewz", "qkc")) + .withProperties(new ElasticBackupVaultProperties()); + model = BinaryData.fromObject(model).toObject(ElasticBackupVaultInner.class); + Assertions.assertEquals("gcrpfbcun", model.location()); + Assertions.assertEquals("cez", model.tags().get("lfwyfwlwxjwetn")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultListResultTests.java new file mode 100644 index 000000000000..2e7e65a0c34f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultListResultTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.implementation.models.ElasticBackupVaultListResult; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupVaultListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupVaultListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Patching\"},\"eTag\":\"elfclducc\",\"location\":\"rds\",\"tags\":{\"i\":\"cobiegstmninwjiz\",\"tbxqmuluxlxq\":\"nghgshej\"},\"id\":\"vnersbycucrw\",\"name\":\"amikzebrqbsm\",\"type\":\"wziqgfuhokzr\"}],\"nextLink\":\"whvhczznvfb\"}") + .toObject(ElasticBackupVaultListResult.class); + Assertions.assertEquals("rds", model.value().get(0).location()); + Assertions.assertEquals("cobiegstmninwjiz", model.value().get(0).tags().get("i")); + Assertions.assertEquals("whvhczznvfb", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultPropertiesTests.java new file mode 100644 index 000000000000..151d2f1fa6cf --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultPropertiesTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties; + +public final class ElasticBackupVaultPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupVaultProperties model = BinaryData.fromString("{\"provisioningState\":\"Accepted\"}") + .toObject(ElasticBackupVaultProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupVaultProperties model = new ElasticBackupVaultProperties(); + model = BinaryData.fromObject(model).toObject(ElasticBackupVaultProperties.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultUpdateTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultUpdateTests.java new file mode 100644 index 000000000000..99fb21f92b10 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultUpdateTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultUpdate; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupVaultUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupVaultUpdate model = BinaryData.fromString( + "{\"tags\":{\"gaao\":\"nptfujgi\",\"wemxswvruunzz\":\"pttaqutd\",\"yinljqe\":\"gehkfkimrtixokff\",\"onsts\":\"qwhix\"}}") + .toObject(ElasticBackupVaultUpdate.class); + Assertions.assertEquals("nptfujgi", model.tags().get("gaao")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupVaultUpdate model = new ElasticBackupVaultUpdate().withTags( + mapOf("gaao", "nptfujgi", "wemxswvruunzz", "pttaqutd", "yinljqe", "gehkfkimrtixokff", "onsts", "qwhix")); + model = BinaryData.fromObject(model).toObject(ElasticBackupVaultUpdate.class); + Assertions.assertEquals("nptfujgi", model.tags().get("gaao")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..5c0bb5d9e1d5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateMockTests.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackupVault; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticBackupVaultsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"eTag\":\"fgjblcd\",\"location\":\"yfcemftz\",\"tags\":{\"ugekdfqn\":\"kya\",\"owrczfjjnnuxxr\":\"ttw\",\"frhjulrsulwzp\":\"kmhmnulwempdc\"},\"id\":\"lusnawmhhgzotfr\",\"name\":\"yrgkoekv\",\"type\":\"wxxyxhighctx\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticBackupVault response = manager.elasticBackupVaults() + .define("mhsurlgwqkpmm") + .withRegion("awi") + .withExistingElasticAccount("pihtdmiwjekpt", "caydbjzcqymlcfnz") + .withTags(mapOf("vvjhvvlrlohewjj", "oms", "kzfzqxjosho", "ajnkdflqionswae")) + .withProperties(new ElasticBackupVaultProperties()) + .create(); + + Assertions.assertEquals("yfcemftz", response.location()); + Assertions.assertEquals("kya", response.tags().get("ugekdfqn")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetWithResponseMockTests.java new file mode 100644 index 000000000000..acb5a7cf6358 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetWithResponseMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackupVault; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticBackupVaultsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"eTag\":\"khnjcmrnkfm\",\"location\":\"cqtwmlmhjnqtq\",\"tags\":{\"dvragpokddxejhh\":\"j\"},\"id\":\"vgua\",\"name\":\"tpt\",\"type\":\"k\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticBackupVault response = manager.elasticBackupVaults() + .getWithResponse("htfpwpqb", "ejuwyqwdqigmghgi", "z", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("cqtwmlmhjnqtq", response.location()); + Assertions.assertEquals("j", response.tags().get("dvragpokddxejhh")); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountMockTests.java new file mode 100644 index 000000000000..a08da1a65b11 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackupVault; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticBackupVaultsListByElasticAccountMockTests { + @Test + public void testListByElasticAccount() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\"},\"eTag\":\"exqokmy\",\"location\":\"jialz\",\"tags\":{\"yudivbxnhsqeaeo\":\"brqlpbcjtrpz\",\"ogatmoljiy\":\"qelwgdhuruzytza\"},\"id\":\"mpinmzvfkneerzzt\",\"name\":\"knsjulugd\",\"type\":\"bnhrxlelfjhkeiz\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable<ElasticBackupVault> response = manager.elasticBackupVaults() + .listByElasticAccount("wkqyns", "gbvoffbkk", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("jialz", response.iterator().next().location()); + Assertions.assertEquals("brqlpbcjtrpz", response.iterator().next().tags().get("yudivbxnhsqeaeo")); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..8550450fbb06 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateMockTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackup; +import com.azure.resourcemanager.netapp.models.ElasticBackupProperties; +import com.azure.resourcemanager.netapp.models.SnapshotUsage; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticBackupsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"creationDate\":\"2021-01-04T21:22:26Z\",\"snapshotCreationDate\":\"2021-01-11T03:04:48Z\",\"completionDate\":\"2021-10-01T19:18:10Z\",\"provisioningState\":\"Succeeded\",\"size\":8249667917791476999,\"label\":\"gyb\",\"backupType\":\"Scheduled\",\"failureReason\":\"ok\",\"elasticVolumeResourceId\":\"cvgllixdg\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"wewqkj\",\"elasticBackupPolicyResourceId\":\"prwpxsoohu\",\"volumeSize\":\"Large\"},\"id\":\"skl\",\"name\":\"e\",\"type\":\"uugggzlfbgrd\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticBackup response = manager.elasticBackups() + .define("rf") + .withExistingElasticBackupVault("zbbgspftesubzpvp", "dylytcovq", "eu") + .withProperties(new ElasticBackupProperties().withLabel("oswkjmdihdcyyyzl") + .withElasticVolumeResourceId("dq") + .withSnapshotUsage(SnapshotUsage.USE_EXISTING_SNAPSHOT) + .withElasticSnapshotResourceId("zrtftedzuubjt")) + .create(); + + Assertions.assertEquals("gyb", response.properties().label()); + Assertions.assertEquals("cvgllixdg", response.properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, response.properties().snapshotUsage()); + Assertions.assertEquals("wewqkj", response.properties().elasticSnapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetWithResponseMockTests.java new file mode 100644 index 000000000000..793f353074e3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetWithResponseMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackup; +import com.azure.resourcemanager.netapp.models.SnapshotUsage; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticBackupsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"creationDate\":\"2021-07-26T03:35:57Z\",\"snapshotCreationDate\":\"2021-10-31T04:55:48Z\",\"completionDate\":\"2021-02-16T19:10:49Z\",\"provisioningState\":\"Failed\",\"size\":8652575046836549967,\"label\":\"iprlkdneyttlrcxi\",\"backupType\":\"Manual\",\"failureReason\":\"utpum\",\"elasticVolumeResourceId\":\"twjfluxynbp\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"ywauyqnjckhm\",\"elasticBackupPolicyResourceId\":\"gjs\",\"volumeSize\":\"Regular\"},\"id\":\"a\",\"name\":\"hwvixqqggljkybsj\",\"type\":\"clrvtzqnrbctbh\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticBackup response = manager.elasticBackups() + .getWithResponse("qsratjhd", "zybspijhfrzgdkk", "gv", "ukhsusmmorf", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("iprlkdneyttlrcxi", response.properties().label()); + Assertions.assertEquals("twjfluxynbp", response.properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, response.properties().snapshotUsage()); + Assertions.assertEquals("ywauyqnjckhm", response.properties().elasticSnapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultMockTests.java new file mode 100644 index 000000000000..d9f9f3e160e9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackup; +import com.azure.resourcemanager.netapp.models.SnapshotUsage; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticBackupsListByVaultMockTests { + @Test + public void testListByVault() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"creationDate\":\"2021-01-18T17:27Z\",\"snapshotCreationDate\":\"2021-06-09T13:57:22Z\",\"completionDate\":\"2021-08-06T05:27:22Z\",\"provisioningState\":\"Failed\",\"size\":6729774136192573822,\"label\":\"iuomzczfkiceevs\",\"backupType\":\"Scheduled\",\"failureReason\":\"spcaxi\",\"elasticVolumeResourceId\":\"hfjqebglcxkxgz\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"vygys\",\"elasticBackupPolicyResourceId\":\"tme\",\"volumeSize\":\"Large\"},\"id\":\"vpinkzpatqt\",\"name\":\"iswxspv\",\"type\":\"koj\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable<ElasticBackup> response + = manager.elasticBackups().listByVault("jhxpcvrd", "y", "it", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("iuomzczfkiceevs", response.iterator().next().properties().label()); + Assertions.assertEquals("hfjqebglcxkxgz", response.iterator().next().properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, + response.iterator().next().properties().snapshotUsage()); + Assertions.assertEquals("vygys", response.iterator().next().properties().elasticSnapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilityWithResponseMockTests.java new file mode 100644 index 000000000000..17c02d59d8e0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilityWithResponseMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityReason; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityResponse; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityStatus; +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticCapacityPoolsCheckVolumeFilePathAvailabilityWithResponseMockTests { + @Test + public void testCheckVolumeFilePathAvailabilityWithResponse() throws Exception { + String responseStr = "{\"isAvailable\":\"False\",\"reason\":\"Invalid\",\"message\":\"kdidjc\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + CheckElasticResourceAvailabilityResponse response = manager.elasticCapacityPools() + .checkVolumeFilePathAvailabilityWithResponse("rt", "zkg", "eboywhczzqrhm", + new CheckElasticVolumeFilePathAvailabilityRequest().withFilePath("gqbedygi"), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(CheckElasticResourceAvailabilityStatus.FALSE, response.isAvailable()); + Assertions.assertEquals(CheckElasticResourceAvailabilityReason.INVALID, response.reason()); + Assertions.assertEquals("kdidjc", response.message()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticEncryptionIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticEncryptionIdentityTests.java new file mode 100644 index 000000000000..c339e6cb3a45 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticEncryptionIdentityTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticEncryptionIdentity; +import org.junit.jupiter.api.Assertions; + +public final class ElasticEncryptionIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticEncryptionIdentity model + = BinaryData.fromString("{\"principalId\":\"p\",\"userAssignedIdentity\":\"qyikvy\"}") + .toObject(ElasticEncryptionIdentity.class); + Assertions.assertEquals("qyikvy", model.userAssignedIdentity()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticEncryptionIdentity model = new ElasticEncryptionIdentity().withUserAssignedIdentity("qyikvy"); + model = BinaryData.fromObject(model).toObject(ElasticEncryptionIdentity.class); + Assertions.assertEquals("qyikvy", model.userAssignedIdentity()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyRuleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyRuleTests.java new file mode 100644 index 000000000000..cc4c731727c0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyRuleTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ElasticExportPolicyRuleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticExportPolicyRule model = BinaryData.fromString( + "{\"ruleIndex\":2065118929,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"un\",\"ixxrtikvcpw\"],\"rootAccess\":\"Disabled\"}") + .toObject(ElasticExportPolicyRule.class); + Assertions.assertEquals(2065118929, model.ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, model.unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.nfsv4()); + Assertions.assertEquals("un", model.allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, model.rootAccess()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticExportPolicyRule model = new ElasticExportPolicyRule().withRuleIndex(2065118929) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("un", "ixxrtikvcpw")) + .withRootAccess(ElasticRootAccess.DISABLED); + model = BinaryData.fromObject(model).toObject(ElasticExportPolicyRule.class); + Assertions.assertEquals(2065118929, model.ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, model.unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.nfsv4()); + Assertions.assertEquals("un", model.allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, model.rootAccess()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyTests.java new file mode 100644 index 000000000000..31a85bd3b57c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyTests.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ElasticExportPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticExportPolicy model = BinaryData.fromString( + "{\"rules\":[{\"ruleIndex\":184744012,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"k\",\"xukuqgsj\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1638200879,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"hzjhf\",\"mhv\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":1913497059,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"vmhfbuz\",\"yihsasbhudypohyu\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":900133726,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"obrltt\",\"msjnygqdnfw\",\"zdzgtilaxhnfhqly\"],\"rootAccess\":\"Enabled\"}]}") + .toObject(ElasticExportPolicy.class); + Assertions.assertEquals(184744012, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, model.rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.rules().get(0).nfsv4()); + Assertions.assertEquals("k", model.rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, model.rules().get(0).rootAccess()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticExportPolicy model = new ElasticExportPolicy().withRules(Arrays.asList( + new ElasticExportPolicyRule().withRuleIndex(184744012) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("k", "xukuqgsj")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(1638200879) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("hzjhf", "mhv")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(1913497059) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("vmhfbuz", "yihsasbhudypohyu")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(900133726) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("obrltt", "msjnygqdnfw", "zdzgtilaxhnfhqly")) + .withRootAccess(ElasticRootAccess.ENABLED))); + model = BinaryData.fromObject(model).toObject(ElasticExportPolicy.class); + Assertions.assertEquals(184744012, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, model.rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.rules().get(0).nfsv4()); + Assertions.assertEquals("k", model.rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, model.rules().get(0).rootAccess()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticMountTargetPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticMountTargetPropertiesTests.java new file mode 100644 index 000000000000..91ad6b2c125d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticMountTargetPropertiesTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticMountTargetProperties; + +public final class ElasticMountTargetPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticMountTargetProperties model = BinaryData.fromString("{\"ipAddress\":\"rc\",\"smbServerFqdn\":\"tso\"}") + .toObject(ElasticMountTargetProperties.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPatchPropertiesTests.java new file mode 100644 index 000000000000..de0774d53372 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPatchPropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticSmbPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSmbPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSmbPatchProperties model + = BinaryData.fromString("{\"smbEncryption\":\"Enabled\"}").toObject(ElasticSmbPatchProperties.class); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbEncryption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSmbPatchProperties model + = new ElasticSmbPatchProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED); + model = BinaryData.fromObject(model).toObject(ElasticSmbPatchProperties.class); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbEncryption()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPropertiesTests.java new file mode 100644 index 000000000000..d5aad72609b4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticSmbProperties; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSmbPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSmbProperties model + = BinaryData.fromString("{\"smbEncryption\":\"Disabled\"}").toObject(ElasticSmbProperties.class); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.smbEncryption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSmbProperties model = new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED); + model = BinaryData.fromObject(model).toObject(ElasticSmbProperties.class); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.smbEncryption()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotInnerTests.java new file mode 100644 index 000000000000..24201c4efd6d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotInnerTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties; + +public final class ElasticSnapshotInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Deleting\"},\"id\":\"sjuivfcdisyir\",\"name\":\"xzhczexrxz\",\"type\":\"ujrtrhqvwr\"}") + .toObject(ElasticSnapshotInner.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotInner model = new ElasticSnapshotInner().withProperties(new ElasticSnapshotProperties()); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotInner.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotListResultTests.java new file mode 100644 index 000000000000..17a8af09f16e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotListResultTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotListResult; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\"},\"id\":\"zonzlrpiqywnc\",\"name\":\"jtszcof\",\"type\":\"zehtdhgb\"}],\"nextLink\":\"vreljea\"}") + .toObject(ElasticSnapshotListResult.class); + Assertions.assertEquals("vreljea", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..068db793f0b0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateMockTests.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicy; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticSnapshotPoliciesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":2011594703,\"minute\":1431475477},\"dailySchedule\":{\"snapshotsToKeep\":872769595,\"hour\":220731180,\"minute\":1646358527},\"weeklySchedule\":{\"snapshotsToKeep\":123451644,\"days\":[\"Wednesday\",\"Wednesday\",\"Friday\"],\"hour\":2017295107,\"minute\":24417526},\"monthlySchedule\":{\"snapshotsToKeep\":1828081112,\"daysOfMonth\":[618494992,1405140229,1291070676],\"hour\":1441331556,\"minute\":1322278146},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"zcjumvpsimioyoig\",\"location\":\"miqwnnrac\",\"tags\":{\"nhautwukexzgpmnm\":\"bfqpspkladyd\",\"dqilwgdfpf\":\"be\",\"xbsmtbljje\":\"fpcvstclgqrvwerf\"},\"id\":\"hci\",\"name\":\"kwdvbtb\",\"type\":\"ekqhs\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticSnapshotPolicy response = manager.elasticSnapshotPolicies() + .define("yhwqw") + .withRegion("exroqrndkt") + .withExistingElasticAccount("tagfyvrtpqp", "mhzcgkrepdqh") + .withTags(mapOf("rietbg", "onfeeqgp", "wwzkyf", "ixx", "e", "nwpiwxeiicrm")) + .withProperties(new ElasticSnapshotPolicyProperties() + .withHourlySchedule( + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(916773179).withMinute(1291774565)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(608262144) + .withHour(119882855) + .withMinute(579634773)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1218068854) + .withDays(Arrays.asList(DayOfWeek.TUESDAY)) + .withHour(249447669) + .withMinute(1337837190)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(727753958) + .withDaysOfMonth(Arrays.asList(442922870, 1490108927)) + .withHour(1011125497) + .withMinute(1186722301)) + .withPolicyStatus(PolicyStatus.DISABLED)) + .create(); + + Assertions.assertEquals("miqwnnrac", response.location()); + Assertions.assertEquals("bfqpspkladyd", response.tags().get("nhautwukexzgpmnm")); + Assertions.assertEquals(2011594703, response.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1431475477, response.properties().hourlySchedule().minute()); + Assertions.assertEquals(872769595, response.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(220731180, response.properties().dailySchedule().hour()); + Assertions.assertEquals(1646358527, response.properties().dailySchedule().minute()); + Assertions.assertEquals(123451644, response.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.WEDNESDAY, response.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(2017295107, response.properties().weeklySchedule().hour()); + Assertions.assertEquals(24417526, response.properties().weeklySchedule().minute()); + Assertions.assertEquals(1828081112, response.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(618494992, response.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1441331556, response.properties().monthlySchedule().hour()); + Assertions.assertEquals(1322278146, response.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, response.properties().policyStatus()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetWithResponseMockTests.java new file mode 100644 index 000000000000..bf3234fd70fc --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetWithResponseMockTests.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicy; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticSnapshotPoliciesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1796310561,\"minute\":1167474668},\"dailySchedule\":{\"snapshotsToKeep\":917160525,\"hour\":2008202977,\"minute\":534942759},\"weeklySchedule\":{\"snapshotsToKeep\":385248466,\"days\":[\"Friday\",\"Friday\",\"Thursday\"],\"hour\":1891390759,\"minute\":1073689854},\"monthlySchedule\":{\"snapshotsToKeep\":805396639,\"daysOfMonth\":[456970353],\"hour\":1625333661,\"minute\":2097746238},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Moving\"},\"eTag\":\"kl\",\"location\":\"etatlakf\",\"tags\":{\"bvtooxrpogwp\":\"xwgiks\",\"bfntumeezbxvq\":\"chgjtnhtukfacih\",\"sgomtmjz\":\"bnuvwcg\",\"mkkhtgfredml\":\"xuqgovsxpwwztj\"},\"id\":\"cgrllc\",\"name\":\"na\",\"type\":\"vjowazhpabac\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticSnapshotPolicy response = manager.elasticSnapshotPolicies() + .getWithResponse("qhnmhk", "ezsdsuxheq", "gcruxspinym", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("etatlakf", response.location()); + Assertions.assertEquals("xwgiks", response.tags().get("bvtooxrpogwp")); + Assertions.assertEquals(1796310561, response.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1167474668, response.properties().hourlySchedule().minute()); + Assertions.assertEquals(917160525, response.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(2008202977, response.properties().dailySchedule().hour()); + Assertions.assertEquals(534942759, response.properties().dailySchedule().minute()); + Assertions.assertEquals(385248466, response.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.FRIDAY, response.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1891390759, response.properties().weeklySchedule().hour()); + Assertions.assertEquals(1073689854, response.properties().weeklySchedule().minute()); + Assertions.assertEquals(805396639, response.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(456970353, response.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1625333661, response.properties().monthlySchedule().hour()); + Assertions.assertEquals(2097746238, response.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, response.properties().policyStatus()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountMockTests.java new file mode 100644 index 000000000000..9ce25b7ec16d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountMockTests.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicy; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticSnapshotPoliciesListByElasticAccountMockTests { + @Test + public void testListByElasticAccount() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":290457934,\"minute\":86259723},\"dailySchedule\":{\"snapshotsToKeep\":1218418711,\"hour\":362918541,\"minute\":327282787},\"weeklySchedule\":{\"snapshotsToKeep\":1520987150,\"days\":[\"Friday\"],\"hour\":1643092004,\"minute\":75882074},\"monthlySchedule\":{\"snapshotsToKeep\":1416822258,\"daysOfMonth\":[1096639551],\"hour\":1262066997,\"minute\":1678159895},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Updating\"},\"eTag\":\"vvxwjong\",\"location\":\"ehqqrsilcchs\",\"tags\":{\"jrulfucte\":\"kansbvriaqgvt\"},\"id\":\"rthcfjzh\",\"name\":\"lyubqjrostvrjeq\",\"type\":\"tzzbeq\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable<ElasticSnapshotPolicy> response = manager.elasticSnapshotPolicies() + .listByElasticAccount("mlyotg", "wsxnsrqor", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("ehqqrsilcchs", response.iterator().next().location()); + Assertions.assertEquals("kansbvriaqgvt", response.iterator().next().tags().get("jrulfucte")); + Assertions.assertEquals(290457934, response.iterator().next().properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(86259723, response.iterator().next().properties().hourlySchedule().minute()); + Assertions.assertEquals(1218418711, response.iterator().next().properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(362918541, response.iterator().next().properties().dailySchedule().hour()); + Assertions.assertEquals(327282787, response.iterator().next().properties().dailySchedule().minute()); + Assertions.assertEquals(1520987150, response.iterator().next().properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.FRIDAY, + response.iterator().next().properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1643092004, response.iterator().next().properties().weeklySchedule().hour()); + Assertions.assertEquals(75882074, response.iterator().next().properties().weeklySchedule().minute()); + Assertions.assertEquals(1416822258, + response.iterator().next().properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1096639551, + response.iterator().next().properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1262066997, response.iterator().next().properties().monthlySchedule().hour()); + Assertions.assertEquals(1678159895, response.iterator().next().properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, response.iterator().next().properties().policyStatus()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesMockTests.java new file mode 100644 index 000000000000..7b3ced605f4b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesMockTests.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticSnapshotPoliciesListElasticVolumesMockTests { + @Test + public void testListElasticVolumes() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"filePath\":\"bsrwrsnrhpqat\",\"size\":2117102872399772953,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":651849981,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"svuv\",\"jkqxetqmmli\",\"rj\",\"xnwxdch\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":502816571,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"quwzp\",\"iibelwcerw\",\"w\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1712959814,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"bxxn\",\"uisdzhgbdgz\",\"agsecnadbuw\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv4\",\"NFSv4\",\"NFSv4\"],\"provisioningState\":\"Patching\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"ezoell\",\"mountTargets\":[{\"ipAddress\":\"iwvmtumxpymdjfu\",\"smbServerFqdn\":\"roqvqpilrgu\"},{\"ipAddress\":\"anlduwzorxsb\",\"smbServerFqdn\":\"aqklxy\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"vfqepd\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"tuubwyvpjb\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"jqduqgixe\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"lj\",\"restorationState\":\"Failed\"},\"eTag\":\"erkjddv\",\"zones\":[\"iegftc\",\"biiftksdwgdnk\",\"fgmwd\"],\"location\":\"eb\",\"tags\":{\"ekaj\":\"zldbglzoutbaaqg\",\"jgmn\":\"lyzgsnor\",\"bvvjbhvhdiq\":\"jotvmrxkhl\",\"vhyibdrqrsw\":\"yfluiyuosnuudte\"},\"id\":\"buubpyrowt\",\"name\":\"oxztfwfqch\",\"type\":\"czevjnn\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable<ElasticVolume> response + = manager.elasticSnapshotPolicies().listElasticVolumes("ztr", "alx", "d", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("eb", response.iterator().next().location()); + Assertions.assertEquals("zldbglzoutbaaqg", response.iterator().next().tags().get("ekaj")); + Assertions.assertEquals("bsrwrsnrhpqat", response.iterator().next().properties().filePath()); + Assertions.assertEquals(2117102872399772953L, response.iterator().next().properties().size()); + Assertions.assertEquals(651849981, + response.iterator().next().properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, + response.iterator().next().properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, + response.iterator().next().properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, + response.iterator().next().properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("svuv", + response.iterator().next().properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, + response.iterator().next().properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, + response.iterator().next().properties().protocolTypes().get(0)); + Assertions.assertEquals("ezoell", response.iterator().next().properties().snapshotResourceId()); + Assertions.assertEquals("vfqepd", + response.iterator().next().properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("tuubwyvpjb", + response.iterator().next().properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + response.iterator().next().properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("jqduqgixe", + response.iterator().next().properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, + response.iterator().next().properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, + response.iterator().next().properties().smbProperties().smbEncryption()); + Assertions.assertEquals("lj", response.iterator().next().properties().backupResourceId()); + Assertions.assertEquals("iegftc", response.iterator().next().zones().get(0)); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyDailyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyDailyScheduleTests.java new file mode 100644 index 000000000000..58633cb44d37 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyDailyScheduleTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyDailyScheduleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyDailySchedule model + = BinaryData.fromString("{\"snapshotsToKeep\":1269982634,\"hour\":1477203796,\"minute\":116262403}") + .toObject(ElasticSnapshotPolicyDailySchedule.class); + Assertions.assertEquals(1269982634, model.snapshotsToKeep()); + Assertions.assertEquals(1477203796, model.hour()); + Assertions.assertEquals(116262403, model.minute()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyDailySchedule model + = new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(1269982634) + .withHour(1477203796) + .withMinute(116262403); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyDailySchedule.class); + Assertions.assertEquals(1269982634, model.snapshotsToKeep()); + Assertions.assertEquals(1477203796, model.hour()); + Assertions.assertEquals(116262403, model.minute()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyHourlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyHourlyScheduleTests.java new file mode 100644 index 000000000000..01667080e100 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyHourlyScheduleTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyHourlyScheduleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyHourlySchedule model + = BinaryData.fromString("{\"snapshotsToKeep\":1291593702,\"minute\":555944790}") + .toObject(ElasticSnapshotPolicyHourlySchedule.class); + Assertions.assertEquals(1291593702, model.snapshotsToKeep()); + Assertions.assertEquals(555944790, model.minute()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyHourlySchedule model + = new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(1291593702).withMinute(555944790); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyHourlySchedule.class); + Assertions.assertEquals(1291593702, model.snapshotsToKeep()); + Assertions.assertEquals(555944790, model.minute()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyInnerTests.java new file mode 100644 index 000000000000..748d5f8a81d9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyInnerTests.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyInner model = BinaryData.fromString( + "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":601956231,\"minute\":1863397561},\"dailySchedule\":{\"snapshotsToKeep\":378498503,\"hour\":2073795724,\"minute\":1291910908},\"weeklySchedule\":{\"snapshotsToKeep\":842063408,\"days\":[\"Sunday\",\"Saturday\",\"Sunday\",\"Friday\"],\"hour\":513286022,\"minute\":1754763241},\"monthlySchedule\":{\"snapshotsToKeep\":1646833466,\"daysOfMonth\":[2095946053,101589203],\"hour\":2083883646,\"minute\":1027236790},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Updating\"},\"eTag\":\"on\",\"location\":\"gnwncypuuwwlt\",\"tags\":{\"zzhmkd\":\"jctzenkei\",\"gsrboldforobw\":\"svflyhbxcudch\",\"hfovvacqpbtu\":\"lvizb\"},\"id\":\"dxe\",\"name\":\"zab\",\"type\":\"elawumu\"}") + .toObject(ElasticSnapshotPolicyInner.class); + Assertions.assertEquals("gnwncypuuwwlt", model.location()); + Assertions.assertEquals("jctzenkei", model.tags().get("zzhmkd")); + Assertions.assertEquals(601956231, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1863397561, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(378498503, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(2073795724, model.properties().dailySchedule().hour()); + Assertions.assertEquals(1291910908, model.properties().dailySchedule().minute()); + Assertions.assertEquals(842063408, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.SUNDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(513286022, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(1754763241, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(1646833466, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(2095946053, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(2083883646, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(1027236790, model.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.properties().policyStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyInner model = new ElasticSnapshotPolicyInner().withLocation("gnwncypuuwwlt") + .withTags(mapOf("zzhmkd", "jctzenkei", "gsrboldforobw", "svflyhbxcudch", "hfovvacqpbtu", "lvizb")) + .withProperties(new ElasticSnapshotPolicyProperties() + .withHourlySchedule( + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(601956231).withMinute(1863397561)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(378498503) + .withHour(2073795724) + .withMinute(1291910908)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(842063408) + .withDays(Arrays.asList(DayOfWeek.SUNDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY, DayOfWeek.FRIDAY)) + .withHour(513286022) + .withMinute(1754763241)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(1646833466) + .withDaysOfMonth(Arrays.asList(2095946053, 101589203)) + .withHour(2083883646) + .withMinute(1027236790)) + .withPolicyStatus(PolicyStatus.DISABLED)); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyInner.class); + Assertions.assertEquals("gnwncypuuwwlt", model.location()); + Assertions.assertEquals("jctzenkei", model.tags().get("zzhmkd")); + Assertions.assertEquals(601956231, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1863397561, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(378498503, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(2073795724, model.properties().dailySchedule().hour()); + Assertions.assertEquals(1291910908, model.properties().dailySchedule().minute()); + Assertions.assertEquals(842063408, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.SUNDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(513286022, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(1754763241, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(1646833466, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(2095946053, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(2083883646, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(1027236790, model.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.properties().policyStatus()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyListResultTests.java new file mode 100644 index 000000000000..6fc9a7a9f6df --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyListResultTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyListResult; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1832381587,\"minute\":2079611289},\"dailySchedule\":{\"snapshotsToKeep\":1073196572,\"hour\":1101777200,\"minute\":843913557},\"weeklySchedule\":{\"snapshotsToKeep\":396602814,\"days\":[\"Monday\"],\"hour\":1508462488,\"minute\":1365525358},\"monthlySchedule\":{\"snapshotsToKeep\":1218728383,\"daysOfMonth\":[1702747573,6794810,465765494],\"hour\":1541278105,\"minute\":1492295803},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Accepted\"},\"eTag\":\"z\",\"location\":\"sccbiuimzd\",\"tags\":{\"fdvruz\":\"dfqwmkyoq\",\"hpc\":\"lzo\",\"fdgugeyzi\":\"fnmdxotn\",\"jee\":\"grkyuizabsnmfpph\"},\"id\":\"yhyhsgzfczb\",\"name\":\"omfgbeglqgleohib\",\"type\":\"tnluankrr\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":2031410613,\"minute\":955300686},\"dailySchedule\":{\"snapshotsToKeep\":187590799,\"hour\":1847279460,\"minute\":1686206255},\"weeklySchedule\":{\"snapshotsToKeep\":192666481,\"days\":[\"Friday\",\"Thursday\"],\"hour\":498607950,\"minute\":2093325150},\"monthlySchedule\":{\"snapshotsToKeep\":1379865960,\"daysOfMonth\":[960314765,648300753,1206650787,197015788],\"hour\":2063483518,\"minute\":1137200728},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Patching\"},\"eTag\":\"aoqltfaey\",\"location\":\"nm\",\"tags\":{\"oqeyhlqhykprl\":\"xirpghriy\",\"mexiitdfuxt\":\"yznuciqd\",\"nlj\":\"asiibmiybnnust\"},\"id\":\"nmgixh\",\"name\":\"mavmq\",\"type\":\"oudorhcgyyp\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":812539177,\"minute\":1374628714},\"dailySchedule\":{\"snapshotsToKeep\":915134983,\"hour\":1400929714,\"minute\":1099905966},\"weeklySchedule\":{\"snapshotsToKeep\":1120408256,\"days\":[\"Tuesday\"],\"hour\":1134791831,\"minute\":493820197},\"monthlySchedule\":{\"snapshotsToKeep\":1939328666,\"daysOfMonth\":[1135735210],\"hour\":1138245525,\"minute\":1503356934},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Patching\"},\"eTag\":\"vnzcyjto\",\"location\":\"vopvp\",\"tags\":{\"qqihedsvqwthmk\":\"zq\",\"dhohsdtmcdzsuf\":\"ibcysihsgqc\"},\"id\":\"ohdxbzlmcmu\",\"name\":\"pcvhdbevwqqxeys\",\"type\":\"onqzinkfkbgbzbow\"}],\"nextLink\":\"qocl\"}") + .toObject(ElasticSnapshotPolicyListResult.class); + Assertions.assertEquals("sccbiuimzd", model.value().get(0).location()); + Assertions.assertEquals("dfqwmkyoq", model.value().get(0).tags().get("fdvruz")); + Assertions.assertEquals(1832381587, model.value().get(0).properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(2079611289, model.value().get(0).properties().hourlySchedule().minute()); + Assertions.assertEquals(1073196572, model.value().get(0).properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1101777200, model.value().get(0).properties().dailySchedule().hour()); + Assertions.assertEquals(843913557, model.value().get(0).properties().dailySchedule().minute()); + Assertions.assertEquals(396602814, model.value().get(0).properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.MONDAY, model.value().get(0).properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1508462488, model.value().get(0).properties().weeklySchedule().hour()); + Assertions.assertEquals(1365525358, model.value().get(0).properties().weeklySchedule().minute()); + Assertions.assertEquals(1218728383, model.value().get(0).properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1702747573, model.value().get(0).properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1541278105, model.value().get(0).properties().monthlySchedule().hour()); + Assertions.assertEquals(1492295803, model.value().get(0).properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.value().get(0).properties().policyStatus()); + Assertions.assertEquals("qocl", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyMonthlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyMonthlyScheduleTests.java new file mode 100644 index 000000000000..4394a84ad2d0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyMonthlyScheduleTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyMonthlyScheduleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyMonthlySchedule model = BinaryData.fromString( + "{\"snapshotsToKeep\":1567146664,\"daysOfMonth\":[255810244,1460319466],\"hour\":993307689,\"minute\":1202587998}") + .toObject(ElasticSnapshotPolicyMonthlySchedule.class); + Assertions.assertEquals(1567146664, model.snapshotsToKeep()); + Assertions.assertEquals(255810244, model.daysOfMonth().get(0)); + Assertions.assertEquals(993307689, model.hour()); + Assertions.assertEquals(1202587998, model.minute()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyMonthlySchedule model + = new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(1567146664) + .withDaysOfMonth(Arrays.asList(255810244, 1460319466)) + .withHour(993307689) + .withMinute(1202587998); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyMonthlySchedule.class); + Assertions.assertEquals(1567146664, model.snapshotsToKeep()); + Assertions.assertEquals(255810244, model.daysOfMonth().get(0)); + Assertions.assertEquals(993307689, model.hour()); + Assertions.assertEquals(1202587998, model.minute()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyPropertiesTests.java new file mode 100644 index 000000000000..bd696700fc4e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyPropertiesTests.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyProperties model = BinaryData.fromString( + "{\"hourlySchedule\":{\"snapshotsToKeep\":46527363,\"minute\":665685017},\"dailySchedule\":{\"snapshotsToKeep\":755872582,\"hour\":2024604117,\"minute\":562241712},\"weeklySchedule\":{\"snapshotsToKeep\":745271232,\"days\":[\"Thursday\",\"Sunday\",\"Saturday\",\"Sunday\"],\"hour\":161517252,\"minute\":673323258},\"monthlySchedule\":{\"snapshotsToKeep\":298891105,\"daysOfMonth\":[1735351807,1524678464,643812278,2025319282],\"hour\":2057925756,\"minute\":1610831264},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Patching\"}") + .toObject(ElasticSnapshotPolicyProperties.class); + Assertions.assertEquals(46527363, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(665685017, model.hourlySchedule().minute()); + Assertions.assertEquals(755872582, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(2024604117, model.dailySchedule().hour()); + Assertions.assertEquals(562241712, model.dailySchedule().minute()); + Assertions.assertEquals(745271232, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(161517252, model.weeklySchedule().hour()); + Assertions.assertEquals(673323258, model.weeklySchedule().minute()); + Assertions.assertEquals(298891105, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1735351807, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(2057925756, model.monthlySchedule().hour()); + Assertions.assertEquals(1610831264, model.monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.policyStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyProperties model = new ElasticSnapshotPolicyProperties() + .withHourlySchedule( + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(46527363).withMinute(665685017)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(755872582) + .withHour(2024604117) + .withMinute(562241712)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(745271232) + .withDays(Arrays.asList(DayOfWeek.THURSDAY, DayOfWeek.SUNDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY)) + .withHour(161517252) + .withMinute(673323258)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(298891105) + .withDaysOfMonth(Arrays.asList(1735351807, 1524678464, 643812278, 2025319282)) + .withHour(2057925756) + .withMinute(1610831264)) + .withPolicyStatus(PolicyStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyProperties.class); + Assertions.assertEquals(46527363, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(665685017, model.hourlySchedule().minute()); + Assertions.assertEquals(755872582, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(2024604117, model.dailySchedule().hour()); + Assertions.assertEquals(562241712, model.dailySchedule().minute()); + Assertions.assertEquals(745271232, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(161517252, model.weeklySchedule().hour()); + Assertions.assertEquals(673323258, model.weeklySchedule().minute()); + Assertions.assertEquals(298891105, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1735351807, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(2057925756, model.monthlySchedule().hour()); + Assertions.assertEquals(1610831264, model.monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.policyStatus()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdatePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdatePropertiesTests.java new file mode 100644 index 000000000000..3c27e37a3f9a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdatePropertiesTests.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdateProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyUpdatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyUpdateProperties model = BinaryData.fromString( + "{\"hourlySchedule\":{\"snapshotsToKeep\":109210510,\"minute\":892310228},\"dailySchedule\":{\"snapshotsToKeep\":344020638,\"hour\":1409257587,\"minute\":153753066},\"weeklySchedule\":{\"snapshotsToKeep\":1078377836,\"days\":[\"Saturday\"],\"hour\":981773620,\"minute\":1212474723},\"monthlySchedule\":{\"snapshotsToKeep\":821588698,\"daysOfMonth\":[494278046,1026325475,1719259510,479383954],\"hour\":797085028,\"minute\":628277509},\"policyStatus\":\"Enabled\"}") + .toObject(ElasticSnapshotPolicyUpdateProperties.class); + Assertions.assertEquals(109210510, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(892310228, model.hourlySchedule().minute()); + Assertions.assertEquals(344020638, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1409257587, model.dailySchedule().hour()); + Assertions.assertEquals(153753066, model.dailySchedule().minute()); + Assertions.assertEquals(1078377836, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.SATURDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(981773620, model.weeklySchedule().hour()); + Assertions.assertEquals(1212474723, model.weeklySchedule().minute()); + Assertions.assertEquals(821588698, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(494278046, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(797085028, model.monthlySchedule().hour()); + Assertions.assertEquals(628277509, model.monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.policyStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyUpdateProperties model = new ElasticSnapshotPolicyUpdateProperties() + .withHourlySchedule( + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(109210510).withMinute(892310228)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(344020638) + .withHour(1409257587) + .withMinute(153753066)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1078377836) + .withDays(Arrays.asList(DayOfWeek.SATURDAY)) + .withHour(981773620) + .withMinute(1212474723)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(821588698) + .withDaysOfMonth(Arrays.asList(494278046, 1026325475, 1719259510, 479383954)) + .withHour(797085028) + .withMinute(628277509)) + .withPolicyStatus(PolicyStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyUpdateProperties.class); + Assertions.assertEquals(109210510, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(892310228, model.hourlySchedule().minute()); + Assertions.assertEquals(344020638, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1409257587, model.dailySchedule().hour()); + Assertions.assertEquals(153753066, model.dailySchedule().minute()); + Assertions.assertEquals(1078377836, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.SATURDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(981773620, model.weeklySchedule().hour()); + Assertions.assertEquals(1212474723, model.weeklySchedule().minute()); + Assertions.assertEquals(821588698, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(494278046, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(797085028, model.monthlySchedule().hour()); + Assertions.assertEquals(628277509, model.monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.policyStatus()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdateTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdateTests.java new file mode 100644 index 000000000000..3556750a87c8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdateTests.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdate; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdateProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyUpdate model = BinaryData.fromString( + "{\"tags\":{\"mysu\":\"lixqnrkcxkjibn\"},\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":188509576,\"minute\":1550616862},\"dailySchedule\":{\"snapshotsToKeep\":1773751874,\"hour\":134024740,\"minute\":1177215499},\"weeklySchedule\":{\"snapshotsToKeep\":1185844831,\"days\":[\"Thursday\"],\"hour\":382801077,\"minute\":1761852553},\"monthlySchedule\":{\"snapshotsToKeep\":2114285001,\"daysOfMonth\":[130119392,1094217479,1093515731],\"hour\":1692036191,\"minute\":858280893},\"policyStatus\":\"Disabled\"}}") + .toObject(ElasticSnapshotPolicyUpdate.class); + Assertions.assertEquals("lixqnrkcxkjibn", model.tags().get("mysu")); + Assertions.assertEquals(188509576, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1550616862, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(1773751874, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(134024740, model.properties().dailySchedule().hour()); + Assertions.assertEquals(1177215499, model.properties().dailySchedule().minute()); + Assertions.assertEquals(1185844831, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(382801077, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(1761852553, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(2114285001, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(130119392, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1692036191, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(858280893, model.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.properties().policyStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyUpdate model = new ElasticSnapshotPolicyUpdate().withTags(mapOf("mysu", "lixqnrkcxkjibn")) + .withProperties(new ElasticSnapshotPolicyUpdateProperties() + .withHourlySchedule( + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(188509576).withMinute(1550616862)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(1773751874) + .withHour(134024740) + .withMinute(1177215499)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1185844831) + .withDays(Arrays.asList(DayOfWeek.THURSDAY)) + .withHour(382801077) + .withMinute(1761852553)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(2114285001) + .withDaysOfMonth(Arrays.asList(130119392, 1094217479, 1093515731)) + .withHour(1692036191) + .withMinute(858280893)) + .withPolicyStatus(PolicyStatus.DISABLED)); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyUpdate.class); + Assertions.assertEquals("lixqnrkcxkjibn", model.tags().get("mysu")); + Assertions.assertEquals(188509576, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1550616862, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(1773751874, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(134024740, model.properties().dailySchedule().hour()); + Assertions.assertEquals(1177215499, model.properties().dailySchedule().minute()); + Assertions.assertEquals(1185844831, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(382801077, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(1761852553, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(2114285001, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(130119392, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1692036191, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(858280893, model.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.properties().policyStatus()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyVolumeListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyVolumeListTests.java new file mode 100644 index 000000000000..50dbea33484d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyVolumeListTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyVolumeList; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyVolumeListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyVolumeList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"filePath\":\"gvkzqkjjeokbze\",\"size\":8683941760335562724,\"exportPolicy\":{\"rules\":[{},{},{}]},\"protocolTypes\":[\"NFSv3\",\"NFSv3\"],\"provisioningState\":\"Deleting\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"pqxbkwvzgnzvdf\",\"mountTargets\":[{\"ipAddress\":\"xzmqpnodawop\",\"smbServerFqdn\":\"ewjptmcg\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"t\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"ndlatutmzlbi\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"fhrbbpneqvcw\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"chpp\",\"restorationState\":\"Restored\"},\"eTag\":\"nmokayzejnhlbk\",\"zones\":[\"pcpil\"],\"location\":\"a\",\"tags\":{\"wiuub\":\"echndbnwieholew\",\"x\":\"efqsfapaqtferrqw\",\"pjwogqqno\":\"kmfx\",\"dabtqwp\":\"pud\"},\"id\":\"yawbzasqbu\",\"name\":\"ljgkyex\",\"type\":\"oguyaip\"},{\"properties\":{\"filePath\":\"sdaultxij\",\"size\":1316152777168081705,\"exportPolicy\":{\"rules\":[{}]},\"protocolTypes\":[\"NFSv4\",\"NFSv4\",\"SMB\",\"SMB\"],\"provisioningState\":\"Creating\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"gzqdqxtbjwgn\",\"mountTargets\":[{\"ipAddress\":\"fzsvtuikzh\",\"smbServerFqdn\":\"qglcfhmlrqryxynq\"},{\"ipAddress\":\"rd\",\"smbServerFqdn\":\"ovw\"},{\"ipAddress\":\"nptgoeiybba\",\"smbServerFqdn\":\"fhvfsl\"},{\"ipAddress\":\"ntjlr\",\"smbServerFqdn\":\"jkskyr\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"zid\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"aabzmif\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"nmmaxrizkzob\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"lnelxieixynl\",\"restorationState\":\"Restoring\"},\"eTag\":\"wcrojphslhcaw\",\"zones\":[\"i\",\"dwfmvigorqjb\",\"tzh\"],\"location\":\"glka\",\"tags\":{\"juj\":\"n\",\"cpopmxel\":\"ickpz\",\"xm\":\"wcltyjede\",\"kqscazuawxtzx\":\"f\"},\"id\":\"uamwabzxrvxc\",\"name\":\"s\",\"type\":\"sphaivmxyasflvg\"},{\"properties\":{\"filePath\":\"zwywako\",\"size\":8766984881915713078,\"exportPolicy\":{\"rules\":[{},{},{}]},\"protocolTypes\":[\"NFSv4\",\"NFSv4\",\"NFSv4\"],\"provisioningState\":\"Failed\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"ymzotqyryuzcbmq\",\"mountTargets\":[{\"ipAddress\":\"vwf\",\"smbServerFqdn\":\"ayxonsupeujl\"},{\"ipAddress\":\"nh\",\"smbServerFqdn\":\"sqltnzo\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"xgnxfyqonmpqoxwd\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"bxiqxeiiqbimht\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"nhe\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"wbcb\",\"restorationState\":\"Failed\"},\"eTag\":\"nkbwvqv\",\"zones\":[\"ivqiheb\",\"tswbzuwfmd\"],\"location\":\"agegiz\",\"tags\":{\"gbqi\":\"felisdjub\",\"m\":\"kxkbsazgakgacyr\",\"pv\":\"dmspof\",\"iofrzgbzjedmstk\":\"hryl\"},\"id\":\"nlvxbcuii\",\"name\":\"nktwfansnvpdibmi\",\"type\":\"ostbzbkiwb\"}],\"nextLink\":\"n\"}") + .toObject(ElasticSnapshotPolicyVolumeList.class); + Assertions.assertEquals("a", model.value().get(0).location()); + Assertions.assertEquals("echndbnwieholew", model.value().get(0).tags().get("wiuub")); + Assertions.assertEquals("gvkzqkjjeokbze", model.value().get(0).properties().filePath()); + Assertions.assertEquals(8683941760335562724L, model.value().get(0).properties().size()); + Assertions.assertEquals(ElasticProtocolType.NFSV3, model.value().get(0).properties().protocolTypes().get(0)); + Assertions.assertEquals("pqxbkwvzgnzvdf", model.value().get(0).properties().snapshotResourceId()); + Assertions.assertEquals("t", + model.value().get(0).properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("ndlatutmzlbi", + model.value().get(0).properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.value().get(0).properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("fhrbbpneqvcw", + model.value().get(0).properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, + model.value().get(0).properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, + model.value().get(0).properties().smbProperties().smbEncryption()); + Assertions.assertEquals("chpp", model.value().get(0).properties().backupResourceId()); + Assertions.assertEquals("pcpil", model.value().get(0).zones().get(0)); + Assertions.assertEquals("n", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyWeeklyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyWeeklyScheduleTests.java new file mode 100644 index 000000000000..aeba93e54762 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyWeeklyScheduleTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyWeeklyScheduleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyWeeklySchedule model = BinaryData.fromString( + "{\"snapshotsToKeep\":1599319524,\"days\":[\"Tuesday\",\"Sunday\",\"Sunday\",\"Monday\"],\"hour\":325946802,\"minute\":808258027}") + .toObject(ElasticSnapshotPolicyWeeklySchedule.class); + Assertions.assertEquals(1599319524, model.snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.TUESDAY, model.days().get(0)); + Assertions.assertEquals(325946802, model.hour()); + Assertions.assertEquals(808258027, model.minute()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyWeeklySchedule model + = new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1599319524) + .withDays(Arrays.asList(DayOfWeek.TUESDAY, DayOfWeek.SUNDAY, DayOfWeek.SUNDAY, DayOfWeek.MONDAY)) + .withHour(325946802) + .withMinute(808258027); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyWeeklySchedule.class); + Assertions.assertEquals(1599319524, model.snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.TUESDAY, model.days().get(0)); + Assertions.assertEquals(325946802, model.hour()); + Assertions.assertEquals(808258027, model.minute()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPropertiesTests.java new file mode 100644 index 000000000000..d502127a3fb2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPropertiesTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties; + +public final class ElasticSnapshotPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotProperties model + = BinaryData.fromString("{\"provisioningState\":\"Creating\"}").toObject(ElasticSnapshotProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotProperties model = new ElasticSnapshotProperties(); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotProperties.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..651088795093 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticSnapshot; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticSnapshotsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"obfelhldiuhz\",\"name\":\"gqlmfaewzgi\",\"type\":\"djpxpqht\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticSnapshot response = manager.elasticSnapshots() + .define("wffcvvye") + .withExistingElasticVolume("ghmp", "nwlslrcigtzjcvbx", "lapsnsso", "yxpavidnie") + .withProperties(new ElasticSnapshotProperties()) + .create(); + + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetWithResponseMockTests.java new file mode 100644 index 000000000000..aeb7201958dd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetWithResponseMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticSnapshot; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticSnapshotsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"pqtmojhvrztnvgys\",\"name\":\"qrdgrtw\",\"type\":\"ewjzl\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticSnapshot response = manager.elasticSnapshots() + .getWithResponse("anizerwgudasmxub", "fbngfcocef", "priylfmp", "trauds", "hlcdc", + com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeMockTests.java new file mode 100644 index 000000000000..d04f82ffd210 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticSnapshot; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticSnapshotsListByElasticVolumeMockTests { + @Test + public void testListByElasticVolume() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\"},\"id\":\"wtltngvmreuptrk\",\"name\":\"zmijajwo\",\"type\":\"xfsv\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable<ElasticSnapshot> response = manager.elasticSnapshots() + .listByElasticVolume("ykcfazz", "jcayerzrransyby", "polwzrghsrlei", "kfscjfncjwv", + com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeBackupPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeBackupPropertiesTests.java new file mode 100644 index 000000000000..f46ce8c18c51 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeBackupPropertiesTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeBackupPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeBackupProperties model = BinaryData.fromString( + "{\"elasticBackupPolicyResourceId\":\"gnitgvkxlzyq\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"gcealzxwh\"}") + .toObject(ElasticVolumeBackupProperties.class); + Assertions.assertEquals("gnitgvkxlzyq", model.elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.policyEnforcement()); + Assertions.assertEquals("gcealzxwh", model.elasticBackupVaultResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeBackupProperties model + = new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("gnitgvkxlzyq") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("gcealzxwh"); + model = BinaryData.fromObject(model).toObject(ElasticVolumeBackupProperties.class); + Assertions.assertEquals("gnitgvkxlzyq", model.elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.policyEnforcement()); + Assertions.assertEquals("gcealzxwh", model.elasticBackupVaultResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPatchPropertiesTests.java new file mode 100644 index 000000000000..7aac9f380be9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPatchPropertiesTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionPatchProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeDataProtectionPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeDataProtectionPatchProperties model = BinaryData.fromString( + "{\"snapshot\":{\"snapshotPolicyResourceId\":\"tgsfja\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"lhhxudbxvodhtnsi\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"z\"}}") + .toObject(ElasticVolumeDataProtectionPatchProperties.class); + Assertions.assertEquals("tgsfja", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("lhhxudbxvodhtnsi", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("z", model.backup().elasticBackupVaultResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeDataProtectionPatchProperties model = new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("tgsfja")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("lhhxudbxvodhtnsi") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) + .withElasticBackupVaultResourceId("z")); + model = BinaryData.fromObject(model).toObject(ElasticVolumeDataProtectionPatchProperties.class); + Assertions.assertEquals("tgsfja", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("lhhxudbxvodhtnsi", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("z", model.backup().elasticBackupVaultResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPropertiesTests.java new file mode 100644 index 000000000000..1d8c7975384c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPropertiesTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeDataProtectionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeDataProtectionProperties model = BinaryData.fromString( + "{\"snapshot\":{\"snapshotPolicyResourceId\":\"kenx\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"yefrpmpdnqqska\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"vmm\"}}") + .toObject(ElasticVolumeDataProtectionProperties.class); + Assertions.assertEquals("kenx", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("yefrpmpdnqqska", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("vmm", model.backup().elasticBackupVaultResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeDataProtectionProperties model = new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("kenx")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("yefrpmpdnqqska") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("vmm")); + model = BinaryData.fromObject(model).toObject(ElasticVolumeDataProtectionProperties.class); + Assertions.assertEquals("kenx", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("yefrpmpdnqqska", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("vmm", model.backup().elasticBackupVaultResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeInnerTests.java new file mode 100644 index 000000000000..248b85ab2f26 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeInnerTests.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticSmbProperties; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeInner model = BinaryData.fromString( + "{\"properties\":{\"filePath\":\"tg\",\"size\":3849034252951154606,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1521773196,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"hycav\",\"dggxdbeesmi\",\"knlrariaawiuagy\",\"wqfbylyrfgiagt\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1650535228,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"vusfzld\",\"ozuxylfsbtkadpys\",\"wn\",\"tgkbugrjqctojc\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":2091790952,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"yqdhcuplcplcw\"],\"rootAccess\":\"Enabled\"}]},\"protocolTypes\":[\"NFSv4\",\"NFSv3\",\"SMB\",\"NFSv4\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"zbsrgnowcj\",\"mountTargets\":[{\"ipAddress\":\"vecactx\",\"smbServerFqdn\":\"oteyowc\"},{\"ipAddress\":\"qovekqvgqou\",\"smbServerFqdn\":\"fzmpjwyivq\"},{\"ipAddress\":\"f\",\"smbServerFqdn\":\"vhrfsphuagrt\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"eusqczkvyklxu\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"affmmfblcqc\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"qibrtalme\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"lqxihhrmooiz\",\"restorationState\":\"Failed\"},\"eTag\":\"pxiutc\",\"zones\":[\"zhyrpeto\",\"e\"],\"location\":\"oxslh\",\"tags\":{\"aehvvibrxjjstoq\":\"labrqnkkzjcjbtr\",\"bklftidgfcwqmpim\":\"eitpkxztmo\"},\"id\":\"qxzhem\",\"name\":\"yhohujswtwkozzwc\",\"type\":\"lkb\"}") + .toObject(ElasticVolumeInner.class); + Assertions.assertEquals("oxslh", model.location()); + Assertions.assertEquals("labrqnkkzjcjbtr", model.tags().get("aehvvibrxjjstoq")); + Assertions.assertEquals("tg", model.properties().filePath()); + Assertions.assertEquals(3849034252951154606L, model.properties().size()); + Assertions.assertEquals(1521773196, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, + model.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("hycav", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, + model.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, model.properties().protocolTypes().get(0)); + Assertions.assertEquals("zbsrgnowcj", model.properties().snapshotResourceId()); + Assertions.assertEquals("eusqczkvyklxu", + model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("affmmfblcqc", + model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("qibrtalme", + model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("lqxihhrmooiz", model.properties().backupResourceId()); + Assertions.assertEquals("zhyrpeto", model.zones().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeInner model + = new ElasticVolumeInner().withLocation("oxslh") + .withTags(mapOf("aehvvibrxjjstoq", "labrqnkkzjcjbtr", "bklftidgfcwqmpim", "eitpkxztmo")) + .withProperties( + new ElasticVolumeProperties().withFilePath("tg") + .withSize(3849034252951154606L) + .withExportPolicy( + new ElasticExportPolicy() + .withRules( + Arrays.asList( + new ElasticExportPolicyRule().withRuleIndex(1521773196) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("hycav", "dggxdbeesmi", "knlrariaawiuagy", + "wqfbylyrfgiagt")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(1650535228) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients( + Arrays.asList("vusfzld", "ozuxylfsbtkadpys", "wn", "tgkbugrjqctojc")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(2091790952) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("yqdhcuplcplcw")) + .withRootAccess(ElasticRootAccess.ENABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV4, ElasticProtocolType.NFSV3, + ElasticProtocolType.SMB, ElasticProtocolType.NFSV4)) + .withSnapshotResourceId("zbsrgnowcj") + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot( + new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("eusqczkvyklxu")) + .withBackup( + new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("affmmfblcqc") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("qibrtalme"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) + .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED)) + .withBackupResourceId("lqxihhrmooiz")) + .withZones(Arrays.asList("zhyrpeto", "e")); + model = BinaryData.fromObject(model).toObject(ElasticVolumeInner.class); + Assertions.assertEquals("oxslh", model.location()); + Assertions.assertEquals("labrqnkkzjcjbtr", model.tags().get("aehvvibrxjjstoq")); + Assertions.assertEquals("tg", model.properties().filePath()); + Assertions.assertEquals(3849034252951154606L, model.properties().size()); + Assertions.assertEquals(1521773196, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, + model.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("hycav", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, + model.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, model.properties().protocolTypes().get(0)); + Assertions.assertEquals("zbsrgnowcj", model.properties().snapshotResourceId()); + Assertions.assertEquals("eusqczkvyklxu", + model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("affmmfblcqc", + model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("qibrtalme", + model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("lqxihhrmooiz", model.properties().backupResourceId()); + Assertions.assertEquals("zhyrpeto", model.zones().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeListResultTests.java new file mode 100644 index 000000000000..3048895df312 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeListResultTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.implementation.models.ElasticVolumeListResult; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"filePath\":\"kdlpa\",\"size\":8631416850120033003,\"exportPolicy\":{\"rules\":[{},{}]},\"protocolTypes\":[\"SMB\"],\"provisioningState\":\"Deleting\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"m\",\"mountTargets\":[{\"ipAddress\":\"dfgsftufqobrj\",\"smbServerFqdn\":\"acgcckknhx\"},{\"ipAddress\":\"zvytnrzvuljraaer\",\"smbServerFqdn\":\"okqgukkjq\"},{\"ipAddress\":\"broyla\",\"smbServerFqdn\":\"ulcdisdosf\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"vgjrwhr\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"cytdclxgccknfnwm\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"pdvjdhttzaefedx\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"k\",\"restorationState\":\"Restoring\"},\"eTag\":\"dqns\",\"zones\":[\"pbgtgkylkdghrj\",\"uutlwxezwzhok\",\"bwnhhtql\"],\"location\":\"hgppipifhpfeoa\",\"tags\":{\"heafidlt\":\"cxtxjc\",\"oiftxfkfwegprh\":\"gsresmkssj\"},\"id\":\"tillucbiqtg\",\"name\":\"q\",\"type\":\"hm\"},{\"properties\":{\"filePath\":\"sldrizetpwbral\",\"size\":4960885543522270739,\"exportPolicy\":{\"rules\":[{},{},{},{}]},\"protocolTypes\":[\"NFSv3\",\"NFSv4\",\"NFSv3\"],\"provisioningState\":\"Moving\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"kan\",\"mountTargets\":[{\"ipAddress\":\"n\",\"smbServerFqdn\":\"ha\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"hjlmu\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"primr\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"eecjmeis\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"lwxdzaum\",\"restorationState\":\"Failed\"},\"eTag\":\"hguuf\",\"zones\":[\"oyjathwtzol\",\"a\",\"mwmdxmebwjscjpa\"],\"location\":\"xveabf\",\"tags\":{\"ijddtvqc\":\"mwmqtibx\",\"jaeukmrsieekpn\":\"tad\",\"pibudqwyxebeybpm\":\"zaapmudqmeqwi\"},\"id\":\"znrtffyaqit\",\"name\":\"hheioqaqhvseuf\",\"type\":\"qyrxp\"}],\"nextLink\":\"cgq\"}") + .toObject(ElasticVolumeListResult.class); + Assertions.assertEquals("hgppipifhpfeoa", model.value().get(0).location()); + Assertions.assertEquals("cxtxjc", model.value().get(0).tags().get("heafidlt")); + Assertions.assertEquals("kdlpa", model.value().get(0).properties().filePath()); + Assertions.assertEquals(8631416850120033003L, model.value().get(0).properties().size()); + Assertions.assertEquals(ElasticProtocolType.SMB, model.value().get(0).properties().protocolTypes().get(0)); + Assertions.assertEquals("m", model.value().get(0).properties().snapshotResourceId()); + Assertions.assertEquals("vgjrwhr", + model.value().get(0).properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("cytdclxgccknfnwm", + model.value().get(0).properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + model.value().get(0).properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("pdvjdhttzaefedx", + model.value().get(0).properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, + model.value().get(0).properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, + model.value().get(0).properties().smbProperties().smbEncryption()); + Assertions.assertEquals("k", model.value().get(0).properties().backupResourceId()); + Assertions.assertEquals("pbgtgkylkdghrj", model.value().get(0).zones().get(0)); + Assertions.assertEquals("cgq", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumePropertiesTests.java new file mode 100644 index 000000000000..054dfb13efc2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumePropertiesTests.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticSmbProperties; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeProperties model = BinaryData.fromString( + "{\"filePath\":\"wpfaj\",\"size\":2813139304371547019,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1722549420,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"hsnvkcdmxzrp\",\"aimlnwiaaom\",\"l\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":835106090,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"npjhlfzswpchwahf\",\"ousnfepgfewe\",\"wlyxgncxyk\",\"hdjhlimmbcx\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":331049008,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"hqizxfpxtgqscj\",\"vftjuhd\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv4\"],\"provisioningState\":\"Accepted\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"pijrajcivmmghf\",\"mountTargets\":[{\"ipAddress\":\"rxgkne\",\"smbServerFqdn\":\"yinzqodfvpgs\"},{\"ipAddress\":\"xgsg\",\"smbServerFqdn\":\"fgzdjtxvz\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"v\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"vl\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"qusrdvetnws\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"duy\",\"restorationState\":\"Restoring\"}") + .toObject(ElasticVolumeProperties.class); + Assertions.assertEquals("wpfaj", model.filePath()); + Assertions.assertEquals(2813139304371547019L, model.size()); + Assertions.assertEquals(1722549420, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, model.exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("hsnvkcdmxzrp", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, model.protocolTypes().get(0)); + Assertions.assertEquals("pijrajcivmmghf", model.snapshotResourceId()); + Assertions.assertEquals("v", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("vl", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("qusrdvetnws", model.dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbProperties().smbEncryption()); + Assertions.assertEquals("duy", model.backupResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeProperties model = new ElasticVolumeProperties().withFilePath("wpfaj") + .withSize(2813139304371547019L) + .withExportPolicy(new ElasticExportPolicy().withRules(Arrays.asList( + new ElasticExportPolicyRule().withRuleIndex(1722549420) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("hsnvkcdmxzrp", "aimlnwiaaom", "l")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(835106090) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("npjhlfzswpchwahf", "ousnfepgfewe", "wlyxgncxyk", "hdjhlimmbcx")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(331049008) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("hqizxfpxtgqscj", "vftjuhd")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV4)) + .withSnapshotResourceId("pijrajcivmmghf") + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("v")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("vl") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("qusrdvetnws"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) + .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED)) + .withBackupResourceId("duy"); + model = BinaryData.fromObject(model).toObject(ElasticVolumeProperties.class); + Assertions.assertEquals("wpfaj", model.filePath()); + Assertions.assertEquals(2813139304371547019L, model.size()); + Assertions.assertEquals(1722549420, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, model.exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("hsnvkcdmxzrp", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, model.protocolTypes().get(0)); + Assertions.assertEquals("pijrajcivmmghf", model.snapshotResourceId()); + Assertions.assertEquals("v", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("vl", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("qusrdvetnws", model.dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbProperties().smbEncryption()); + Assertions.assertEquals("duy", model.backupResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeRevertTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeRevertTests.java new file mode 100644 index 000000000000..1b21fdb4f24b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeRevertTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeRevertTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeRevert model + = BinaryData.fromString("{\"snapshotResourceId\":\"ismjqfrddgamqu\"}").toObject(ElasticVolumeRevert.class); + Assertions.assertEquals("ismjqfrddgamqu", model.snapshotResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeRevert model = new ElasticVolumeRevert().withSnapshotResourceId("ismjqfrddgamqu"); + model = BinaryData.fromObject(model).toObject(ElasticVolumeRevert.class); + Assertions.assertEquals("ismjqfrddgamqu", model.snapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeSnapshotPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeSnapshotPropertiesTests.java new file mode 100644 index 000000000000..db68300f214e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeSnapshotPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeSnapshotPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeSnapshotProperties model = BinaryData.fromString("{\"snapshotPolicyResourceId\":\"pqfrtqlkz\"}") + .toObject(ElasticVolumeSnapshotProperties.class); + Assertions.assertEquals("pqfrtqlkz", model.snapshotPolicyResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeSnapshotProperties model + = new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("pqfrtqlkz"); + model = BinaryData.fromObject(model).toObject(ElasticVolumeSnapshotProperties.class); + Assertions.assertEquals("pqfrtqlkz", model.snapshotPolicyResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdatePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdatePropertiesTests.java new file mode 100644 index 000000000000..180342ed5f25 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdatePropertiesTests.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticSmbPatchProperties; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionPatchProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeUpdatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeUpdateProperties model = BinaryData.fromString( + "{\"size\":6340644129016563843,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1430018563,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"klnsrmffey\",\"xcktpiymerteeamm\",\"qiekkkzddrt\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":221974172,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"fdeesvecuijpxtx\",\"uwprtujwsawd\"],\"rootAccess\":\"Disabled\"}]},\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"xvititvtz\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"avoxtfg\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"m\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"}}") + .toObject(ElasticVolumeUpdateProperties.class); + Assertions.assertEquals(6340644129016563843L, model.size()); + Assertions.assertEquals(1430018563, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, model.exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("klnsrmffey", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals("xvititvtz", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("avoxtfg", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("m", model.dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, model.snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbProperties().smbEncryption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeUpdateProperties model + = new ElasticVolumeUpdateProperties().withSize(6340644129016563843L) + .withExportPolicy( + new ElasticExportPolicy() + .withRules( + Arrays + .asList( + new ElasticExportPolicyRule().withRuleIndex(1430018563) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients( + Arrays.asList("klnsrmffey", "xcktpiymerteeamm", "qiekkkzddrt")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(221974172) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("fdeesvecuijpxtx", "uwprtujwsawd")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withDataProtection(new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("xvititvtz")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("avoxtfg") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("m"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.VISIBLE) + .withSmbProperties(new ElasticSmbPatchProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED)); + model = BinaryData.fromObject(model).toObject(ElasticVolumeUpdateProperties.class); + Assertions.assertEquals(6340644129016563843L, model.size()); + Assertions.assertEquals(1430018563, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, model.exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("klnsrmffey", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals("xvititvtz", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("avoxtfg", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("m", model.dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, model.snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbProperties().smbEncryption()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdateTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdateTests.java new file mode 100644 index 000000000000..e6fa38ff186b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdateTests.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticSmbPatchProperties; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionPatchProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdate; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeUpdate model = BinaryData.fromString( + "{\"tags\":{\"hlwigdivbkbxg\":\"moy\"},\"properties\":{\"size\":6821670520079081021,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1690246024,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"xakjsqzhzb\",\"zkgimsid\",\"asi\",\"ddyvvjskgfmo\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":540587127,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"hhvjhh\",\"akz\",\"bbjjidjksyxk\"],\"rootAccess\":\"Enabled\"}]},\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"blbjedn\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"age\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"xuns\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"}}}") + .toObject(ElasticVolumeUpdate.class); + Assertions.assertEquals("moy", model.tags().get("hlwigdivbkbxg")); + Assertions.assertEquals(6821670520079081021L, model.properties().size()); + Assertions.assertEquals(1690246024, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, + model.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("xakjsqzhzb", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, + model.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals("blbjedn", model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("age", model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + model.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("xuns", model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.properties().smbProperties().smbEncryption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeUpdate model + = new ElasticVolumeUpdate().withTags(mapOf("hlwigdivbkbxg", "moy")) + .withProperties( + new ElasticVolumeUpdateProperties().withSize(6821670520079081021L) + .withExportPolicy( + new ElasticExportPolicy() + .withRules(Arrays.asList( + new ElasticExportPolicyRule().withRuleIndex(1690246024) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients( + Arrays.asList("xakjsqzhzb", "zkgimsid", "asi", "ddyvvjskgfmo")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(540587127) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("hhvjhh", "akz", "bbjjidjksyxk")) + .withRootAccess(ElasticRootAccess.ENABLED)))) + .withDataProtection(new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("blbjedn")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("age") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) + .withElasticBackupVaultResourceId("xuns"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) + .withSmbProperties( + new ElasticSmbPatchProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED))); + model = BinaryData.fromObject(model).toObject(ElasticVolumeUpdate.class); + Assertions.assertEquals("moy", model.tags().get("hlwigdivbkbxg")); + Assertions.assertEquals(6821670520079081021L, model.properties().size()); + Assertions.assertEquals(1690246024, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, + model.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("xakjsqzhzb", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, + model.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals("blbjedn", model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("age", model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + model.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("xuns", model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.properties().smbProperties().smbEncryption()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..a29ccf174df4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateMockTests.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticSmbProperties; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticVolumesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"filePath\":\"za\",\"size\":6760924228094510861,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1535281676,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"taznkcqwwxwjyof\",\"whnkbtl\",\"ljssm\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":638318099,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"s\",\"bxbteogfgfiijry\",\"wlefksxqceazfpxg\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":1146170186,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"ossscyva\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1599548007,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"psfx\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv4\",\"NFSv4\",\"NFSv4\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"yqfttehdpboujst\",\"mountTargets\":[{\"ipAddress\":\"dshx\",\"smbServerFqdn\":\"edsuenygnxcgj\"},{\"ipAddress\":\"rnquktrf\",\"smbServerFqdn\":\"lnlrxsmy\"},{\"ipAddress\":\"rwntfm\",\"smbServerFqdn\":\"g\"},{\"ipAddress\":\"dxwnazkurrd\",\"smbServerFqdn\":\"yzjwhsetwwjwzzq\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"uukykcyqh\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"zzdcykeys\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"opazdazgbs\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"fut\",\"restorationState\":\"Failed\"},\"eTag\":\"ozglq\",\"zones\":[\"nlzclctz\"],\"location\":\"owmnd\",\"tags\":{\"wkudrbcpf\":\"dwzqauxzanhmkvfr\"},\"id\":\"xudqyemebunaucmc\",\"name\":\"rtneemmja\",\"type\":\"wcgxefnohait\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticVolume response + = manager.elasticVolumes() + .define("admskx") + .withRegion("llojkpoyhgwwdj") + .withExistingElasticCapacityPool("bi", "dfsbwceivb", "zipbwxgoooxzp") + .withTags(mapOf("zgdyrcvuqbs", "bdl", "bsfp", "zlrqhbjnqogdx")) + .withProperties( + new ElasticVolumeProperties().withFilePath("pdgzigjsugswhg") + .withSize(4512170267931436352L) + .withExportPolicy( + new ElasticExportPolicy() + .withRules( + Arrays + .asList( + new ElasticExportPolicyRule().withRuleIndex(1892682448) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients( + Arrays.asList("zhaquvwsxb", "nvkervq", "hoadhrsxqvzv")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(1911808291) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("zrsubklrxhjnltce", "jdvqy")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(2064386356) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("vqzxoebwg")) + .withRootAccess(ElasticRootAccess.ENABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV4, ElasticProtocolType.SMB)) + .withSnapshotResourceId("wtzvpakloz") + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot( + new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("rswgkpjhboyikeb")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("ksl") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) + .withElasticBackupVaultResourceId("kh"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) + .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED)) + .withBackupResourceId("cqypz")) + .withZones(Arrays.asList("tpq", "yamkncfgybm", "snxoc")) + .create(); + + Assertions.assertEquals("owmnd", response.location()); + Assertions.assertEquals("dwzqauxzanhmkvfr", response.tags().get("wkudrbcpf")); + Assertions.assertEquals("za", response.properties().filePath()); + Assertions.assertEquals(6760924228094510861L, response.properties().size()); + Assertions.assertEquals(1535281676, response.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, + response.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, + response.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, + response.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("taznkcqwwxwjyof", + response.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, + response.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, response.properties().protocolTypes().get(0)); + Assertions.assertEquals("yqfttehdpboujst", response.properties().snapshotResourceId()); + Assertions.assertEquals("uukykcyqh", + response.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("zzdcykeys", + response.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + response.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("opazdazgbs", + response.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, + response.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, response.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("fut", response.properties().backupResourceId()); + Assertions.assertEquals("nlzclctz", response.zones().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetWithResponseMockTests.java new file mode 100644 index 000000000000..17a343d73c58 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetWithResponseMockTests.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticVolumesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"filePath\":\"hvmaxgnuyeamcmhu\",\"size\":7145608410541121603,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":147732303,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"oesqrggvrbnyruko\",\"laciduwjleipj\",\"h\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"SMB\"],\"provisioningState\":\"Failed\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"hqkkwhbgxvellvul\",\"mountTargets\":[{\"ipAddress\":\"nitmujdtvmclyymf\",\"smbServerFqdn\":\"mjpddnyxf\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"zmzqmzjqrb\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"nmdyfoebo\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"pglaoh\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"qjilaywkdcwmqsyr\",\"restorationState\":\"Failed\"},\"eTag\":\"xdqaolfylnkkb\",\"zones\":[\"vlywlt\",\"fwobb\"],\"location\":\"hlwyjfnqzocrd\",\"tags\":{\"xdncaqtt\":\"zeunt\",\"gyrihlgm\":\"ekoifuvnyttzgi\"},\"id\":\"behlqtxnr\",\"name\":\"lkndrndpgfjodh\",\"type\":\"aqotwfhipxwgsabv\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticVolume response = manager.elasticVolumes() + .getWithResponse("fj", "rwq", "xet", "gcwvrrmdqntycna", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("hlwyjfnqzocrd", response.location()); + Assertions.assertEquals("zeunt", response.tags().get("xdncaqtt")); + Assertions.assertEquals("hvmaxgnuyeamcmhu", response.properties().filePath()); + Assertions.assertEquals(7145608410541121603L, response.properties().size()); + Assertions.assertEquals(147732303, response.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, + response.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, + response.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, + response.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("oesqrggvrbnyruko", + response.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, + response.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.SMB, response.properties().protocolTypes().get(0)); + Assertions.assertEquals("hqkkwhbgxvellvul", response.properties().snapshotResourceId()); + Assertions.assertEquals("zmzqmzjqrb", + response.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("nmdyfoebo", + response.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + response.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("pglaoh", + response.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, + response.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, response.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("qjilaywkdcwmqsyr", response.properties().backupResourceId()); + Assertions.assertEquals("vlywlt", response.zones().get(0)); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolMockTests.java new file mode 100644 index 000000000000..2f22c1d599c4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolMockTests.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticVolumesListByElasticPoolMockTests { + @Test + public void testListByElasticPool() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"filePath\":\"ei\",\"size\":4552090543693283985,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":635282226,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"ju\",\"xxbxqvm\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv3\",\"SMB\",\"SMB\",\"NFSv3\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"bwpntghy\",\"mountTargets\":[{\"ipAddress\":\"cdrnxsl\",\"smbServerFqdn\":\"lzladltxkpbqh\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"qjwkrhwz\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"ojisg\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"okatu\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"pvbkaehxsmzyg\",\"restorationState\":\"Restored\"},\"eTag\":\"kwseivmakxhyso\",\"zones\":[\"ux\",\"kb\",\"ctvtf\",\"mskdch\"],\"location\":\"iubavlzwpvgm\",\"tags\":{\"gokedgjqafkm\":\"kzaz\",\"tvaoznqn\":\"rokzrthqetwpq\",\"ugedh\":\"xiezeagmceit\"},\"id\":\"pj\",\"name\":\"tlzm\",\"type\":\"lsyj\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable<ElasticVolume> response = manager.elasticVolumes() + .listByElasticPool("ipowza", "czuumljcir", "pefyc", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("iubavlzwpvgm", response.iterator().next().location()); + Assertions.assertEquals("kzaz", response.iterator().next().tags().get("gokedgjqafkm")); + Assertions.assertEquals("ei", response.iterator().next().properties().filePath()); + Assertions.assertEquals(4552090543693283985L, response.iterator().next().properties().size()); + Assertions.assertEquals(635282226, + response.iterator().next().properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, + response.iterator().next().properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, + response.iterator().next().properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, + response.iterator().next().properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("ju", + response.iterator().next().properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, + response.iterator().next().properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV3, + response.iterator().next().properties().protocolTypes().get(0)); + Assertions.assertEquals("bwpntghy", response.iterator().next().properties().snapshotResourceId()); + Assertions.assertEquals("qjwkrhwz", + response.iterator().next().properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("ojisg", + response.iterator().next().properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + response.iterator().next().properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("okatu", + response.iterator().next().properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, + response.iterator().next().properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, + response.iterator().next().properties().smbProperties().smbEncryption()); + Assertions.assertEquals("pvbkaehxsmzyg", response.iterator().next().properties().backupResourceId()); + Assertions.assertEquals("ux", response.iterator().next().zones().get(0)); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertMockTests.java new file mode 100644 index 000000000000..e98e2c81bf9e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertMockTests.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticVolumesRevertMockTests { + @Test + public void testRevert() throws Exception { + String responseStr + = "{\"properties\":{\"filePath\":\"yfjlpzeqto\",\"size\":3006316405676166806,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":418707975,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"vh\",\"mfowgwbtmkek\",\"pkzwa\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv4\",\"NFSv4\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"bplvfidu\",\"mountTargets\":[{\"ipAddress\":\"kxbyjg\",\"smbServerFqdn\":\"fepxyihpqadag\"},{\"ipAddress\":\"rdi\",\"smbServerFqdn\":\"dw\"},{\"ipAddress\":\"fowxwyovcxjsgbi\",\"smbServerFqdn\":\"ukdveksbuhoduc\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"crdpibfdyjduss\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"zekbhwlkaagg\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"bfrnuybffljfii\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"qtaadusrexxfavsq\",\"restorationState\":\"Restoring\"},\"eTag\":\"hzilfmn\",\"zones\":[\"psimsf\",\"ypofqpmbhyqgs\",\"rmmttjxop\",\"gerhsmvg\"],\"location\":\"twzmqilrixysfnim\",\"tags\":{\"mlqoinhzduew\":\"wwwmhkruwaedrym\"},\"id\":\"hapfjiik\",\"name\":\"jdiq\",\"type\":\"liejhpc\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticVolume response = manager.elasticVolumes() + .revert("eolctaebf", "yrle", "jcustbvtq", "gdxzvsgeafgfoseh", + new ElasticVolumeRevert().withSnapshotResourceId("zsxezppkkwaae"), com.azure.core.util.Context.NONE); + + Assertions.assertEquals("twzmqilrixysfnim", response.location()); + Assertions.assertEquals("wwwmhkruwaedrym", response.tags().get("mlqoinhzduew")); + Assertions.assertEquals("yfjlpzeqto", response.properties().filePath()); + Assertions.assertEquals(3006316405676166806L, response.properties().size()); + Assertions.assertEquals(418707975, response.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, + response.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, + response.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, + response.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("vh", response.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, + response.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, response.properties().protocolTypes().get(0)); + Assertions.assertEquals("bplvfidu", response.properties().snapshotResourceId()); + Assertions.assertEquals("crdpibfdyjduss", + response.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("zekbhwlkaagg", + response.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + response.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("bfrnuybffljfii", + response.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, + response.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, response.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("qtaadusrexxfavsq", response.properties().backupResourceId()); + Assertions.assertEquals("psimsf", response.zones().get(0)); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java index 735a2ac71afd..2a0022e075a7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java @@ -11,20 +11,19 @@ public final class EncryptionIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EncryptionIdentity model = BinaryData - .fromString( - "{\"principalId\":\"rfh\",\"userAssignedIdentity\":\"ctymoxoftp\",\"federatedClientId\":\"iwyczuh\"}") + EncryptionIdentity model = BinaryData.fromString( + "{\"principalId\":\"hcspo\",\"userAssignedIdentity\":\"qaxsipietgbebjf\",\"federatedClientId\":\"bmoichd\"}") .toObject(EncryptionIdentity.class); - Assertions.assertEquals("ctymoxoftp", model.userAssignedIdentity()); - Assertions.assertEquals("iwyczuh", model.federatedClientId()); + Assertions.assertEquals("qaxsipietgbebjf", model.userAssignedIdentity()); + Assertions.assertEquals("bmoichd", model.federatedClientId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EncryptionIdentity model - = new EncryptionIdentity().withUserAssignedIdentity("ctymoxoftp").withFederatedClientId("iwyczuh"); + = new EncryptionIdentity().withUserAssignedIdentity("qaxsipietgbebjf").withFederatedClientId("bmoichd"); model = BinaryData.fromObject(model).toObject(EncryptionIdentity.class); - Assertions.assertEquals("ctymoxoftp", model.userAssignedIdentity()); - Assertions.assertEquals("iwyczuh", model.federatedClientId()); + Assertions.assertEquals("qaxsipietgbebjf", model.userAssignedIdentity()); + Assertions.assertEquals("bmoichd", model.federatedClientId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionTransitionRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionTransitionRequestTests.java index 59d1df8b1017..83213dc3eb1b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionTransitionRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionTransitionRequestTests.java @@ -11,19 +11,19 @@ public final class EncryptionTransitionRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EncryptionTransitionRequest model - = BinaryData.fromString("{\"virtualNetworkId\":\"kojgcyzts\",\"privateEndpointId\":\"mznbaeqphch\"}") - .toObject(EncryptionTransitionRequest.class); - Assertions.assertEquals("kojgcyzts", model.virtualNetworkId()); - Assertions.assertEquals("mznbaeqphch", model.privateEndpointId()); + EncryptionTransitionRequest model = BinaryData + .fromString("{\"virtualNetworkId\":\"xfzzzwyjafitlhgu\",\"privateEndpointId\":\"nuchlgmltxdwhmo\"}") + .toObject(EncryptionTransitionRequest.class); + Assertions.assertEquals("xfzzzwyjafitlhgu", model.virtualNetworkId()); + Assertions.assertEquals("nuchlgmltxdwhmo", model.privateEndpointId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EncryptionTransitionRequest model - = new EncryptionTransitionRequest().withVirtualNetworkId("kojgcyzts").withPrivateEndpointId("mznbaeqphch"); + EncryptionTransitionRequest model = new EncryptionTransitionRequest().withVirtualNetworkId("xfzzzwyjafitlhgu") + .withPrivateEndpointId("nuchlgmltxdwhmo"); model = BinaryData.fromObject(model).toObject(EncryptionTransitionRequest.class); - Assertions.assertEquals("kojgcyzts", model.virtualNetworkId()); - Assertions.assertEquals("mznbaeqphch", model.privateEndpointId()); + Assertions.assertEquals("xfzzzwyjafitlhgu", model.virtualNetworkId()); + Assertions.assertEquals("nuchlgmltxdwhmo", model.privateEndpointId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java index 86d426c25051..c73c4765e79c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java @@ -11,22 +11,21 @@ public final class FilePathAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FilePathAvailabilityRequest model = BinaryData - .fromString("{\"name\":\"ayzri\",\"subnetId\":\"khyawfvjlboxqv\",\"availabilityZone\":\"lmxhomdyn\"}") - .toObject(FilePathAvailabilityRequest.class); - Assertions.assertEquals("ayzri", model.name()); - Assertions.assertEquals("khyawfvjlboxqv", model.subnetId()); - Assertions.assertEquals("lmxhomdyn", model.availabilityZone()); + FilePathAvailabilityRequest model + = BinaryData.fromString("{\"name\":\"oi\",\"subnetId\":\"qc\",\"availabilityZone\":\"f\"}") + .toObject(FilePathAvailabilityRequest.class); + Assertions.assertEquals("oi", model.name()); + Assertions.assertEquals("qc", model.subnetId()); + Assertions.assertEquals("f", model.availabilityZone()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FilePathAvailabilityRequest model = new FilePathAvailabilityRequest().withName("ayzri") - .withSubnetId("khyawfvjlboxqv") - .withAvailabilityZone("lmxhomdyn"); + FilePathAvailabilityRequest model + = new FilePathAvailabilityRequest().withName("oi").withSubnetId("qc").withAvailabilityZone("f"); model = BinaryData.fromObject(model).toObject(FilePathAvailabilityRequest.class); - Assertions.assertEquals("ayzri", model.name()); - Assertions.assertEquals("khyawfvjlboxqv", model.subnetId()); - Assertions.assertEquals("lmxhomdyn", model.availabilityZone()); + Assertions.assertEquals("oi", model.name()); + Assertions.assertEquals("qc", model.subnetId()); + Assertions.assertEquals("f", model.availabilityZone()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FileSystemUserTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FileSystemUserTests.java new file mode 100644 index 000000000000..06323bf706db --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FileSystemUserTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.CifsUser; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.NfsUser; +import org.junit.jupiter.api.Assertions; + +public final class FileSystemUserTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FileSystemUser model = BinaryData.fromString( + "{\"nfsUser\":{\"userId\":3604947321817577406,\"groupId\":3720735958022849834},\"cifsUser\":{\"username\":\"risjnhnytxifqjz\"}}") + .toObject(FileSystemUser.class); + Assertions.assertEquals(3604947321817577406L, model.nfsUser().userId()); + Assertions.assertEquals(3720735958022849834L, model.nfsUser().groupId()); + Assertions.assertEquals("risjnhnytxifqjz", model.cifsUser().username()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FileSystemUser model = new FileSystemUser() + .withNfsUser(new NfsUser().withUserId(3604947321817577406L).withGroupId(3720735958022849834L)) + .withCifsUser(new CifsUser().withUsername("risjnhnytxifqjz")); + model = BinaryData.fromObject(model).toObject(FileSystemUser.class); + Assertions.assertEquals(3604947321817577406L, model.nfsUser().userId()); + Assertions.assertEquals(3720735958022849834L, model.nfsUser().groupId()); + Assertions.assertEquals("risjnhnytxifqjz", model.cifsUser().username()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java index de185fbf8cc4..b040f674c24b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java @@ -12,14 +12,14 @@ public final class GetGroupIdListForLdapUserRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GetGroupIdListForLdapUserRequest model - = BinaryData.fromString("{\"username\":\"srfbjfdtwss\"}").toObject(GetGroupIdListForLdapUserRequest.class); - Assertions.assertEquals("srfbjfdtwss", model.username()); + = BinaryData.fromString("{\"username\":\"d\"}").toObject(GetGroupIdListForLdapUserRequest.class); + Assertions.assertEquals("d", model.username()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - GetGroupIdListForLdapUserRequest model = new GetGroupIdListForLdapUserRequest().withUsername("srfbjfdtwss"); + GetGroupIdListForLdapUserRequest model = new GetGroupIdListForLdapUserRequest().withUsername("d"); model = BinaryData.fromObject(model).toObject(GetGroupIdListForLdapUserRequest.class); - Assertions.assertEquals("srfbjfdtwss", model.username()); + Assertions.assertEquals("d", model.username()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java index ddc4d591b0fc..af0a7c990caf 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java @@ -12,8 +12,8 @@ public final class GetGroupIdListForLdapUserResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GetGroupIdListForLdapUserResponseInner model - = BinaryData.fromString("{\"groupIdsForLdapUser\":[\"tpvjzbexilzznfqq\",\"vwpm\",\"taruoujmkcj\"]}") + = BinaryData.fromString("{\"groupIdsForLdapUser\":[\"yhz\",\"xssadbzmnvdf\"]}") .toObject(GetGroupIdListForLdapUserResponseInner.class); - Assertions.assertEquals("tpvjzbexilzznfqq", model.groupIdsForLdapUser().get(0)); + Assertions.assertEquals("yhz", model.groupIdsForLdapUser().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java index 1bb184e3a0b0..55b619e5815d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java @@ -12,21 +12,21 @@ public final class HourlyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HourlySchedule model = BinaryData - .fromString("{\"snapshotsToKeep\":1699030440,\"minute\":1045229648,\"usedBytes\":5254392939268183781}") + .fromString("{\"snapshotsToKeep\":2036871201,\"minute\":1512461872,\"usedBytes\":1374467922340694380}") .toObject(HourlySchedule.class); - Assertions.assertEquals(1699030440, model.snapshotsToKeep()); - Assertions.assertEquals(1045229648, model.minute()); - Assertions.assertEquals(5254392939268183781L, model.usedBytes()); + Assertions.assertEquals(2036871201, model.snapshotsToKeep()); + Assertions.assertEquals(1512461872, model.minute()); + Assertions.assertEquals(1374467922340694380L, model.usedBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HourlySchedule model = new HourlySchedule().withSnapshotsToKeep(1699030440) - .withMinute(1045229648) - .withUsedBytes(5254392939268183781L); + HourlySchedule model = new HourlySchedule().withSnapshotsToKeep(2036871201) + .withMinute(1512461872) + .withUsedBytes(1374467922340694380L); model = BinaryData.fromObject(model).toObject(HourlySchedule.class); - Assertions.assertEquals(1699030440, model.snapshotsToKeep()); - Assertions.assertEquals(1045229648, model.minute()); - Assertions.assertEquals(5254392939268183781L, model.usedBytes()); + Assertions.assertEquals(2036871201, model.snapshotsToKeep()); + Assertions.assertEquals(1512461872, model.minute()); + Assertions.assertEquals(1374467922340694380L, model.usedBytes()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/KeyVaultPrivateEndpointTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/KeyVaultPrivateEndpointTests.java index f8b0fa827b99..c7a4b7fd6a58 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/KeyVaultPrivateEndpointTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/KeyVaultPrivateEndpointTests.java @@ -12,18 +12,18 @@ public final class KeyVaultPrivateEndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { KeyVaultPrivateEndpoint model - = BinaryData.fromString("{\"virtualNetworkId\":\"aifmvikl\",\"privateEndpointId\":\"dvk\"}") + = BinaryData.fromString("{\"virtualNetworkId\":\"agpgdph\",\"privateEndpointId\":\"dulajvlejchcs\"}") .toObject(KeyVaultPrivateEndpoint.class); - Assertions.assertEquals("aifmvikl", model.virtualNetworkId()); - Assertions.assertEquals("dvk", model.privateEndpointId()); + Assertions.assertEquals("agpgdph", model.virtualNetworkId()); + Assertions.assertEquals("dulajvlejchcs", model.privateEndpointId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { KeyVaultPrivateEndpoint model - = new KeyVaultPrivateEndpoint().withVirtualNetworkId("aifmvikl").withPrivateEndpointId("dvk"); + = new KeyVaultPrivateEndpoint().withVirtualNetworkId("agpgdph").withPrivateEndpointId("dulajvlejchcs"); model = BinaryData.fromObject(model).toObject(KeyVaultPrivateEndpoint.class); - Assertions.assertEquals("aifmvikl", model.virtualNetworkId()); - Assertions.assertEquals("dvk", model.privateEndpointId()); + Assertions.assertEquals("agpgdph", model.virtualNetworkId()); + Assertions.assertEquals("dulajvlejchcs", model.privateEndpointId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapConfigurationTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapConfigurationTests.java new file mode 100644 index 000000000000..c14a17de428d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapConfigurationTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.LdapConfiguration; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class LdapConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LdapConfiguration model = BinaryData.fromString( + "{\"domain\":\"nfpubntnbatz\",\"ldapServers\":[\"sowsaael\"],\"ldapOverTLS\":true,\"serverCACertificate\":\"cjuhplrvkm\",\"certificateCNHost\":\"wmj\"}") + .toObject(LdapConfiguration.class); + Assertions.assertEquals("nfpubntnbatz", model.domain()); + Assertions.assertEquals("sowsaael", model.ldapServers().get(0)); + Assertions.assertTrue(model.ldapOverTLS()); + Assertions.assertEquals("cjuhplrvkm", model.serverCACertificate()); + Assertions.assertEquals("wmj", model.certificateCNHost()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LdapConfiguration model = new LdapConfiguration().withDomain("nfpubntnbatz") + .withLdapServers(Arrays.asList("sowsaael")) + .withLdapOverTLS(true) + .withServerCACertificate("cjuhplrvkm") + .withCertificateCNHost("wmj"); + model = BinaryData.fromObject(model).toObject(LdapConfiguration.class); + Assertions.assertEquals("nfpubntnbatz", model.domain()); + Assertions.assertEquals("sowsaael", model.ldapServers().get(0)); + Assertions.assertTrue(model.ldapOverTLS()); + Assertions.assertEquals("cjuhplrvkm", model.serverCACertificate()); + Assertions.assertEquals("wmj", model.certificateCNHost()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java index 28cbdb5c44cb..656bc9fb4208 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java @@ -11,23 +11,22 @@ public final class LdapSearchScopeOptTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LdapSearchScopeOpt model = BinaryData - .fromString( - "{\"userDN\":\"bomvzzbtdcqv\",\"groupDN\":\"iyujviylwdshfs\",\"groupMembershipFilter\":\"rbgyefry\"}") + LdapSearchScopeOpt model = BinaryData.fromString( + "{\"userDN\":\"igrfihotjewl\",\"groupDN\":\"uzzjgnrefq\",\"groupMembershipFilter\":\"qotoihiqakydiwfb\"}") .toObject(LdapSearchScopeOpt.class); - Assertions.assertEquals("bomvzzbtdcqv", model.userDN()); - Assertions.assertEquals("iyujviylwdshfs", model.groupDN()); - Assertions.assertEquals("rbgyefry", model.groupMembershipFilter()); + Assertions.assertEquals("igrfihotjewl", model.userDN()); + Assertions.assertEquals("uzzjgnrefq", model.groupDN()); + Assertions.assertEquals("qotoihiqakydiwfb", model.groupMembershipFilter()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LdapSearchScopeOpt model = new LdapSearchScopeOpt().withUserDN("bomvzzbtdcqv") - .withGroupDN("iyujviylwdshfs") - .withGroupMembershipFilter("rbgyefry"); + LdapSearchScopeOpt model = new LdapSearchScopeOpt().withUserDN("igrfihotjewl") + .withGroupDN("uzzjgnrefq") + .withGroupMembershipFilter("qotoihiqakydiwfb"); model = BinaryData.fromObject(model).toObject(LdapSearchScopeOpt.class); - Assertions.assertEquals("bomvzzbtdcqv", model.userDN()); - Assertions.assertEquals("iyujviylwdshfs", model.groupDN()); - Assertions.assertEquals("rbgyefry", model.groupMembershipFilter()); + Assertions.assertEquals("igrfihotjewl", model.userDN()); + Assertions.assertEquals("uzzjgnrefq", model.groupDN()); + Assertions.assertEquals("qotoihiqakydiwfb", model.groupMembershipFilter()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListQuotaReportResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListQuotaReportResponseInnerTests.java new file mode 100644 index 000000000000..f03ad37f38ac --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListQuotaReportResponseInnerTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner; +import com.azure.resourcemanager.netapp.models.Type; +import org.junit.jupiter.api.Assertions; + +public final class ListQuotaReportResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ListQuotaReportResponseInner model = BinaryData.fromString( + "{\"value\":[{\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"vseotgqrl\",\"quotaLimitUsedInKiBs\":4929519207657456173,\"quotaLimitTotalInKiBs\":8105546637199671811,\"percentageUsed\":94.56387,\"isDerivedQuota\":true},{\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"mpgcjefuzmuvpbt\",\"quotaLimitUsedInKiBs\":2208029659863881636,\"quotaLimitTotalInKiBs\":1424992942576592611,\"percentageUsed\":8.391643,\"isDerivedQuota\":true}]}") + .toObject(ListQuotaReportResponseInner.class); + Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, model.value().get(0).quotaType()); + Assertions.assertEquals("vseotgqrl", model.value().get(0).quotaTarget()); + Assertions.assertEquals(4929519207657456173L, model.value().get(0).quotaLimitUsedInKiBs()); + Assertions.assertEquals(8105546637199671811L, model.value().get(0).quotaLimitTotalInKiBs()); + Assertions.assertEquals(94.56387F, model.value().get(0).percentageUsed()); + Assertions.assertTrue(model.value().get(0).isDerivedQuota()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsRequestTests.java index 2a49b3ed58ff..c7a0a2ed38b3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsRequestTests.java @@ -13,14 +13,14 @@ public final class ListReplicationsRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ListReplicationsRequest model - = BinaryData.fromString("{\"exclude\":\"None\"}").toObject(ListReplicationsRequest.class); - Assertions.assertEquals(Exclude.NONE, model.exclude()); + = BinaryData.fromString("{\"exclude\":\"Deleted\"}").toObject(ListReplicationsRequest.class); + Assertions.assertEquals(Exclude.DELETED, model.exclude()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ListReplicationsRequest model = new ListReplicationsRequest().withExclude(Exclude.NONE); + ListReplicationsRequest model = new ListReplicationsRequest().withExclude(Exclude.DELETED); model = BinaryData.fromObject(model).toObject(ListReplicationsRequest.class); - Assertions.assertEquals(Exclude.NONE, model.exclude()); + Assertions.assertEquals(Exclude.DELETED, model.exclude()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java index 5ea47c9f1374..474c32738c33 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java @@ -14,12 +14,12 @@ public final class ListReplicationsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ListReplications model = BinaryData.fromString( - "{\"value\":[{\"replicationId\":\"nayqi\",\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"havhqlkthumaqolb\",\"remoteVolumeRegion\":\"cdui\",\"mirrorState\":\"Uninitialized\",\"replicationCreationTime\":\"2021-07-05T23:49:12Z\",\"replicationDeletionTime\":\"2021-11-08T10:44:08Z\"}],\"nextLink\":\"vaolpsslqlf\"}") + "{\"value\":[{\"replicationId\":\"rsc\",\"endpointType\":\"src\",\"replicationSchedule\":\"hourly\",\"remoteVolumeResourceId\":\"vfiwjmygtdss\",\"remoteVolumeRegion\":\"wtmwerio\",\"mirrorState\":\"Uninitialized\",\"replicationCreationTime\":\"2021-06-08T10:58:30Z\",\"replicationDeletionTime\":\"2021-02-21T22:13:10Z\"}],\"nextLink\":\"wab\"}") .toObject(ListReplications.class); - Assertions.assertEquals(EndpointType.DST, model.value().get(0).endpointType()); - Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, model.value().get(0).replicationSchedule()); - Assertions.assertEquals("havhqlkthumaqolb", model.value().get(0).remoteVolumeResourceId()); - Assertions.assertEquals("cdui", model.value().get(0).remoteVolumeRegion()); - Assertions.assertEquals("vaolpsslqlf", model.nextLink()); + Assertions.assertEquals(EndpointType.SRC, model.value().get(0).endpointType()); + Assertions.assertEquals(ReplicationSchedule.HOURLY, model.value().get(0).replicationSchedule()); + Assertions.assertEquals("vfiwjmygtdss", model.value().get(0).remoteVolumeResourceId()); + Assertions.assertEquals("wtmwerio", model.value().get(0).remoteVolumeRegion()); + Assertions.assertEquals("wab", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java index aa57a816d949..a999c7847393 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java @@ -16,7 +16,7 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"4874fca2-98c7-489a-b222-1e81560c1cc3\",\"tenantId\":\"fb4813d8-c3b4-4303-8154-a8ad04c76c98\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"h\":{\"principalId\":\"650d7d51-5a6e-4400-b441-f8be2806f868\",\"clientId\":\"b189049f-a04e-455f-a235-fe97c63a1f2a\"},\"spskasdvlmfwdgz\":{\"principalId\":\"14e56ed6-7ee2-4877-a330-08080cd8c9a6\",\"clientId\":\"910ff85d-3155-4cd9-8fe6-2dbe334fe04b\"}}}") + "{\"principalId\":\"c29e39cb-6be6-42bc-808b-c5c9c768897d\",\"tenantId\":\"f6242acb-b959-43fa-96ee-2bb381ba93fc\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"wmn\":{\"principalId\":\"d67e0450-50b0-4741-94d3-f6fe2d5cb126\",\"clientId\":\"ef778493-9a1e-431b-8ddf-eeb9d7035aea\"},\"tijfybvp\":{\"principalId\":\"e836aa81-9d98-4fe0-a608-6cb31a6e5dcd\",\"clientId\":\"28e8a56b-7369-4c44-bae9-ea7318fd74a8\"},\"rsg\":{\"principalId\":\"dd1876bd-c143-4302-a5a2-3c3eeb8876da\",\"clientId\":\"f8958442-8819-4067-baaf-9248afa8b045\"}}}") .toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); } @@ -24,8 +24,8 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("h", new UserAssignedIdentity(), "spskasdvlmfwdgz", new UserAssignedIdentity())); + .withUserAssignedIdentities(mapOf("wmn", new UserAssignedIdentity(), "tijfybvp", new UserAssignedIdentity(), + "rsg", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java index 4e3d3971d9c7..46b955fb81bf 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java @@ -12,27 +12,27 @@ public final class MonthlyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonthlySchedule model = BinaryData.fromString( - "{\"snapshotsToKeep\":22897042,\"daysOfMonth\":\"yftaakcpw\",\"hour\":1040923285,\"minute\":842537299,\"usedBytes\":7212384813102944092}") + "{\"snapshotsToKeep\":1736041382,\"daysOfMonth\":\"kuwhh\",\"hour\":1745648414,\"minute\":537605324,\"usedBytes\":5084521144740681912}") .toObject(MonthlySchedule.class); - Assertions.assertEquals(22897042, model.snapshotsToKeep()); - Assertions.assertEquals("yftaakcpw", model.daysOfMonth()); - Assertions.assertEquals(1040923285, model.hour()); - Assertions.assertEquals(842537299, model.minute()); - Assertions.assertEquals(7212384813102944092L, model.usedBytes()); + Assertions.assertEquals(1736041382, model.snapshotsToKeep()); + Assertions.assertEquals("kuwhh", model.daysOfMonth()); + Assertions.assertEquals(1745648414, model.hour()); + Assertions.assertEquals(537605324, model.minute()); + Assertions.assertEquals(5084521144740681912L, model.usedBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MonthlySchedule model = new MonthlySchedule().withSnapshotsToKeep(22897042) - .withDaysOfMonth("yftaakcpw") - .withHour(1040923285) - .withMinute(842537299) - .withUsedBytes(7212384813102944092L); + MonthlySchedule model = new MonthlySchedule().withSnapshotsToKeep(1736041382) + .withDaysOfMonth("kuwhh") + .withHour(1745648414) + .withMinute(537605324) + .withUsedBytes(5084521144740681912L); model = BinaryData.fromObject(model).toObject(MonthlySchedule.class); - Assertions.assertEquals(22897042, model.snapshotsToKeep()); - Assertions.assertEquals("yftaakcpw", model.daysOfMonth()); - Assertions.assertEquals(1040923285, model.hour()); - Assertions.assertEquals(842537299, model.minute()); - Assertions.assertEquals(7212384813102944092L, model.usedBytes()); + Assertions.assertEquals(1736041382, model.snapshotsToKeep()); + Assertions.assertEquals("kuwhh", model.daysOfMonth()); + Assertions.assertEquals(1745648414, model.hour()); + Assertions.assertEquals(537605324, model.minute()); + Assertions.assertEquals(5084521144740681912L, model.usedBytes()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsGetWithResponseMockTests.java index 49536ebc5aae..37b0e4e08f27 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class NetAppResourceQuotaLimitsAccountsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"current\":1928900887,\"default\":956016489,\"usage\":1913497059},\"id\":\"mun\",\"name\":\"qsxvmhf\",\"type\":\"uzjyihsasbhudypo\"}"; + = "{\"properties\":{\"current\":757946426,\"default\":1006803160,\"usage\":505649327},\"id\":\"uuzivensrpmeyyvp\",\"name\":\"patlbijp\",\"type\":\"gsksrfhf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubscriptionQuotaItem response = manager.netAppResourceQuotaLimitsAccounts() - .getWithResponse("gsjj", "undxgketw", "hhzjhfj", com.azure.core.util.Context.NONE) + .getWithResponse("fkoxmlghktuidvr", "azlp", "wwexymzvlazipbh", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsListMockTests.java index 6480aea513aa..f55ca87bf44b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsListMockTests.java @@ -21,7 +21,7 @@ public final class NetAppResourceQuotaLimitsAccountsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"current\":2092951767,\"default\":97968246,\"usage\":2105592893},\"id\":\"nygq\",\"name\":\"nfwqzdzgtilaxhn\",\"type\":\"hqlyvijo\"}]}"; + = "{\"value\":[{\"properties\":{\"current\":406069948,\"default\":2037491254,\"usage\":421608055},\"id\":\"wzfgbrttuiaclkie\",\"name\":\"hajlfn\",\"type\":\"hiqfyuttdiy\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<SubscriptionQuotaItem> response - = manager.netAppResourceQuotaLimitsAccounts().list("yue", "slynsqyrpfoo", com.azure.core.util.Context.NONE); + = manager.netAppResourceQuotaLimitsAccounts().list("olmk", "bnxwc", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java index 506ae88ad4fe..1e68fb5f37ee 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class NetAppResourceQuotaLimitsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"current\":698476500,\"default\":1137080537,\"usage\":1889972002},\"id\":\"pvwgfstmhqykizmd\",\"name\":\"saoafcluqvox\",\"type\":\"ycjimryvwgcwwpbm\"}"; + = "{\"properties\":{\"current\":962255720,\"default\":576069827,\"usage\":1195801008},\"id\":\"kjguwrjmwvvbtuq\",\"name\":\"xximwgxq\",\"type\":\"dekotjgxieqfkyf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubscriptionQuotaItem response = manager.netAppResourceQuotaLimits() - .getWithResponse("mxuq", "bsxtkcudfbsfarfs", com.azure.core.util.Context.NONE) + .getWithResponse("imyc", "grvkcxzznnuif", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java index 4b6c33ac69d0..e43539885dfb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java @@ -21,7 +21,7 @@ public final class NetAppResourceQuotaLimitsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"current\":1162604826,\"default\":405632211,\"usage\":322305993},\"id\":\"hecbvopwndyq\",\"name\":\"eallklmtkhlo\",\"type\":\"kxxpvbrd\"}]}"; + = "{\"value\":[{\"properties\":{\"current\":1874096637,\"default\":1667611376,\"usage\":883857471},\"id\":\"eumexmjbxc\",\"name\":\"ccwkqmtx\",\"type\":\"p\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<SubscriptionQuotaItem> response - = manager.netAppResourceQuotaLimits().list("gwe", com.azure.core.util.Context.NONE); + = manager.netAppResourceQuotaLimits().list("iwvjaqupbyyn", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetWithResponseMockTests.java index c79dc9b422a3..9fdcd41f0343 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class NetAppResourceRegionInfosGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"storageToNetworkProximity\":\"Default\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"yych\",\"isAvailable\":true}]},\"id\":\"lpjrtwsz\",\"name\":\"vv\",\"type\":\"icphvtrrmhw\"}"; + = "{\"properties\":{\"storageToNetworkProximity\":\"T1\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"trqrejda\",\"isAvailable\":true},{\"availabilityZone\":\"imldahlfxlmu\",\"isAvailable\":true},{\"availabilityZone\":\"adj\",\"isAvailable\":false},{\"availabilityZone\":\"cskiioshjgc\",\"isAvailable\":true}]},\"id\":\"bnxgzt\",\"name\":\"cg\",\"type\":\"tjchfjvmy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,11 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - RegionInfoResource response = manager.netAppResourceRegionInfos() - .getWithResponse("jmzsyzfh", com.azure.core.util.Context.NONE) - .getValue(); + RegionInfoResource response + = manager.netAppResourceRegionInfos().getWithResponse("qis", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals(RegionStorageToNetworkProximity.DEFAULT, response.storageToNetworkProximity()); - Assertions.assertEquals("yych", response.availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertEquals(RegionStorageToNetworkProximity.T1, response.storageToNetworkProximity()); + Assertions.assertEquals("trqrejda", response.availabilityZoneMappings().get(0).availabilityZone()); Assertions.assertTrue(response.availabilityZoneMappings().get(0).isAvailable()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListMockTests.java index f8a138a5b3db..3ce2ff35bf17 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListMockTests.java @@ -23,7 +23,7 @@ public final class NetAppResourceRegionInfosListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"Default\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"yzlwh\",\"isAvailable\":true},{\"availabilityZone\":\"hoocl\",\"isAvailable\":false},{\"availabilityZone\":\"qmemc\",\"isAvailable\":true},{\"availabilityZone\":\"mykyujxsglhs\",\"isAvailable\":false}]},\"id\":\"ejylmbkzu\",\"name\":\"nigrfihotjewl\",\"type\":\"xuzzjgnrefq\"}]}"; + = "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"T1\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"lbefvwc\",\"isAvailable\":true},{\"availabilityZone\":\"pylrwoxzgwpsy\",\"isAvailable\":true},{\"availabilityZone\":\"eypdvrbk\",\"isAvailable\":true}]},\"id\":\"dkgaw\",\"name\":\"wjxildfkcefeyg\",\"type\":\"q\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,11 +33,11 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<RegionInfoResource> response - = manager.netAppResourceRegionInfos().list("bfdpyflubhv", com.azure.core.util.Context.NONE); + = manager.netAppResourceRegionInfos().list("j", com.azure.core.util.Context.NONE); - Assertions.assertEquals(RegionStorageToNetworkProximity.DEFAULT, + Assertions.assertEquals(RegionStorageToNetworkProximity.T1, response.iterator().next().storageToNetworkProximity()); - Assertions.assertEquals("yzlwh", + Assertions.assertEquals("lbefvwc", response.iterator().next().availabilityZoneMappings().get(0).availabilityZone()); Assertions.assertTrue(response.iterator().next().availabilityZoneMappings().get(0).isAvailable()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetWithResponseMockTests.java index 664a362b6bcd..a2339c5c47a9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class NetAppResourceUsagesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"id\":\"vvpa\",\"name\":{\"value\":\"sgb\",\"localizedValue\":\"antuygdhgaqipirp\"},\"properties\":{\"currentValue\":986571803,\"limit\":1818026917,\"unit\":\"lopmjnlexwhcbjpi\"}}"; + = "{\"id\":\"mdmuqoh\",\"name\":{\"value\":\"raxq\",\"localizedValue\":\"drwjcljbrhlh\"},\"properties\":{\"currentValue\":1266501182,\"limit\":495666062,\"unit\":\"enninafhxrzfrm\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); UsageResult response = manager.netAppResourceUsages() - .getWithResponse("vyuns", "xlghieegj", com.azure.core.util.Context.NONE) + .getWithResponse("i", "kkcxwnujvqynvav", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListMockTests.java index 23f7be045aab..77d8d78498df 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListMockTests.java @@ -21,7 +21,7 @@ public final class NetAppResourceUsagesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"id\":\"m\",\"name\":{\"value\":\"xne\",\"localizedValue\":\"sm\"},\"properties\":{\"currentValue\":1095840050,\"limit\":1064315343,\"unit\":\"apucygvo\"}}]}"; + = "{\"value\":[{\"id\":\"jlvzklk\",\"name\":{\"value\":\"ikyjtkakvlb\",\"localizedValue\":\"hjvpzaptu\"},\"properties\":{\"currentValue\":1787762673,\"limit\":425882032,\"unit\":\"jixwfgc\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<UsageResult> response - = manager.netAppResourceUsages().list("yvk", com.azure.core.util.Context.NONE); + = manager.netAppResourceUsages().list("wgofmhx", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java index 702a6241d2f1..1384d947cef1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests { @Test public void testCheckFilePathAvailabilityWithResponse() throws Exception { - String responseStr = "{\"isAvailable\":true,\"reason\":\"Invalid\",\"message\":\"qbnqbpizxqltgrdo\"}"; + String responseStr = "{\"isAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"tvdxxhe\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,13 @@ public void testCheckFilePathAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CheckAvailabilityResponse response = manager.netAppResources() - .checkFilePathAvailabilityWithResponse("dzsylollgtrczz", - new FilePathAvailabilityRequest().withName("dmxzjijpv") - .withSubnetId("aurkihcirlde") - .withAvailabilityZone("rdcoxnbkkj"), + .checkFilePathAvailabilityWithResponse("detjygowi", + new FilePathAvailabilityRequest().withName("cq").withSubnetId("olzkgys").withAvailabilityZone("zyybzo"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertTrue(response.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.INVALID, response.reason()); - Assertions.assertEquals("qbnqbpizxqltgrdo", response.message()); + Assertions.assertFalse(response.isAvailable()); + Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, response.reason()); + Assertions.assertEquals("tvdxxhe", response.message()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java index ec7892f19df0..a6605e485ef1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class NetAppResourcesCheckNameAvailabilityWithResponseMockTests { @Test public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"isAvailable\":true,\"reason\":\"Invalid\",\"message\":\"xuifmcsypobkdqz\"}"; + String responseStr = "{\"isAvailable\":true,\"reason\":\"Invalid\",\"message\":\"wzt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,15 @@ public void testCheckNameAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CheckAvailabilityResponse response = manager.netAppResources() - .checkNameAvailabilityWithResponse("hrpq", - new ResourceNameAvailabilityRequest().withName("df") - .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS) - .withResourceGroup("kois"), + .checkNameAvailabilityWithResponse("iflikyypzkgxfx", + new ResourceNameAvailabilityRequest().withName("myrqsdbpokszan") + .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES) + .withResourceGroup("wgpterdiuw"), com.azure.core.util.Context.NONE) .getValue(); Assertions.assertTrue(response.isAvailable()); Assertions.assertEquals(InAvailabilityReasonType.INVALID, response.reason()); - Assertions.assertEquals("xuifmcsypobkdqz", response.message()); + Assertions.assertEquals("wzt", response.message()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java index ea7e55be2192..47aa9c082934 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests { @Test public void testCheckQuotaAvailabilityWithResponse() throws Exception { - String responseStr = "{\"isAvailable\":false,\"reason\":\"Invalid\",\"message\":\"iowxi\"}"; + String responseStr = "{\"isAvailable\":false,\"reason\":\"Invalid\",\"message\":\"neychbjizq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,15 @@ public void testCheckQuotaAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CheckAvailabilityResponse response = manager.netAppResources() - .checkQuotaAvailabilityWithResponse("ypxrx", - new QuotaAvailabilityRequest().withName("bfihw") + .checkQuotaAvailabilityWithResponse("gmlilwzghjhjvmab", + new QuotaAvailabilityRequest().withName("zbwaybfmdafbgym") .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS) - .withResourceGroup("vctafsrb"), + .withResourceGroup("napreojxrjnbsco"), com.azure.core.util.Context.NONE) .getValue(); Assertions.assertFalse(response.isAvailable()); Assertions.assertEquals(InAvailabilityReasonType.INVALID, response.reason()); - Assertions.assertEquals("iowxi", response.message()); + Assertions.assertEquals("neychbjizq", response.message()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java index bc1c50245984..485138b3dac8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests { @Test public void testQueryNetworkSiblingSetWithResponse() throws Exception { String responseStr - = "{\"networkSiblingSetId\":\"byrrueqth\",\"subnetId\":\"gnmbscbbxigdhx\",\"networkSiblingSetStateId\":\"d\",\"networkFeatures\":\"Basic_Standard\",\"provisioningState\":\"Updating\",\"nicInfoList\":[{\"ipAddress\":\"pyqy\",\"volumeResourceIds\":[\"ubmdnafcbqwre\",\"jelaqacigele\",\"hdbvqvwzkjop\"]},{\"ipAddress\":\"eonrlkwzdqybxce\",\"volumeResourceIds\":[\"cptsoqfyiase\",\"chkrttzr\",\"zisgykiuemvanb\",\"zohmnrxxbs\"]}]}"; + = "{\"networkSiblingSetId\":\"qbtimpk\",\"subnetId\":\"lornsihqh\",\"networkSiblingSetStateId\":\"smusuaawj\",\"networkFeatures\":\"Standard\",\"provisioningState\":\"Canceled\",\"nicInfoList\":[{\"ipAddress\":\"z\",\"volumeResourceIds\":[\"iixyxvqbanosj\"]},{\"ipAddress\":\"irnb\",\"volumeResourceIds\":[\"m\"]}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +32,18 @@ public void testQueryNetworkSiblingSetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - NetworkSiblingSet response = manager.netAppResources() - .queryNetworkSiblingSetWithResponse("zezkhhltnjadh", - new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("oawjqoyueay").withSubnetId("bpcms"), - com.azure.core.util.Context.NONE) - .getValue(); + NetworkSiblingSet response + = manager.netAppResources() + .queryNetworkSiblingSetWithResponse("h", + new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("shthmgpczqu") + .withSubnetId("ptkbvcpxtzhi"), + com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals("byrrueqth", response.networkSiblingSetId()); - Assertions.assertEquals("gnmbscbbxigdhx", response.subnetId()); - Assertions.assertEquals("d", response.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, response.networkFeatures()); - Assertions.assertEquals("ubmdnafcbqwre", response.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("qbtimpk", response.networkSiblingSetId()); + Assertions.assertEquals("lornsihqh", response.subnetId()); + Assertions.assertEquals("smusuaawj", response.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.STANDARD, response.networkFeatures()); + Assertions.assertEquals("iixyxvqbanosj", response.nicInfoList().get(0).volumeResourceIds().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java index a6ab9b16a8de..52fb3b1744df 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class NetAppResourcesQueryRegionInfoWithResponseMockTests { @Test public void testQueryRegionInfoWithResponse() throws Exception { String responseStr - = "{\"storageToNetworkProximity\":\"T1\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"bqqqagwwrxa\",\"isAvailable\":true},{\"availabilityZone\":\"sgl\",\"isAvailable\":true}]}"; + = "{\"storageToNetworkProximity\":\"Default\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"xi\",\"isAvailable\":false},{\"availabilityZone\":\"fyzavfrbypicdb\",\"isAvailable\":false},{\"availabilityZone\":\"taq\",\"isAvailable\":true},{\"availabilityZone\":\"azpdg\",\"isAvailable\":false}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,11 @@ public void testQueryRegionInfoWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RegionInfo response = manager.netAppResources() - .queryRegionInfoWithResponse("spnxwqagnepzw", com.azure.core.util.Context.NONE) + .queryRegionInfoWithResponse("sgnwdxzedpq", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1, response.storageToNetworkProximity()); - Assertions.assertEquals("bqqqagwwrxa", response.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertTrue(response.availabilityZoneMappings().get(0).isAvailable()); + Assertions.assertEquals(RegionStorageToNetworkProximity.DEFAULT, response.storageToNetworkProximity()); + Assertions.assertEquals("xi", response.availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertFalse(response.availabilityZoneMappings().get(0).isAvailable()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java index 19f76c277c26..b6846c9f7130 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java @@ -23,7 +23,7 @@ public final class NetAppResourcesUpdateNetworkSiblingSetMockTests { @Test public void testUpdateNetworkSiblingSet() throws Exception { String responseStr - = "{\"networkSiblingSetId\":\"apcohhouc\",\"subnetId\":\"q\",\"networkSiblingSetStateId\":\"xcxzrzdcgdzben\",\"networkFeatures\":\"Standard\",\"provisioningState\":\"Failed\",\"nicInfoList\":[{\"ipAddress\":\"zqddtjwfljhzn\",\"volumeResourceIds\":[\"uatmzwcjjncqtj\",\"mizvgbgatzuuvbx\",\"grebwggahttzlsw\"]},{\"ipAddress\":\"jqfutlxj\",\"volumeResourceIds\":[\"asunwqrjzfrgq\",\"aohcmbuocn\",\"r\",\"hmbpyryxamebly\"]}]}"; + = "{\"networkSiblingSetId\":\"lkpzwbhnrecchd\",\"subnetId\":\"rmuhkahmjedbiucv\",\"networkSiblingSetStateId\":\"hwmjpjbweunxc\",\"networkFeatures\":\"Standard_Basic\",\"provisioningState\":\"Succeeded\",\"nicInfoList\":[{\"ipAddress\":\"ihppiyb\",\"volumeResourceIds\":[\"nzuz\",\"bgk\",\"cscpiuzvkunh\",\"i\"]},{\"ipAddress\":\"uktirzkaugpu\",\"volumeResourceIds\":[\"cfqp\"]}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,17 +33,17 @@ public void testUpdateNetworkSiblingSet() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkSiblingSet response = manager.netAppResources() - .updateNetworkSiblingSet("jklinh", - new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("dptysprqs") - .withSubnetId("nzxojpslsvjgpli") - .withNetworkSiblingSetStateId("fiqwoy") - .withNetworkFeatures(NetworkFeatures.BASIC_STANDARD), + .updateNetworkSiblingSet("dorgmynltw", + new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("p") + .withSubnetId("tmfoeajogsyxwet") + .withNetworkSiblingSetStateId("mfd") + .withNetworkFeatures(NetworkFeatures.STANDARD_BASIC), com.azure.core.util.Context.NONE); - Assertions.assertEquals("apcohhouc", response.networkSiblingSetId()); - Assertions.assertEquals("q", response.subnetId()); - Assertions.assertEquals("xcxzrzdcgdzben", response.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.STANDARD, response.networkFeatures()); - Assertions.assertEquals("uatmzwcjjncqtj", response.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("lkpzwbhnrecchd", response.networkSiblingSetId()); + Assertions.assertEquals("rmuhkahmjedbiucv", response.subnetId()); + Assertions.assertEquals("hwmjpjbweunxc", response.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, response.networkFeatures()); + Assertions.assertEquals("nzuz", response.nicInfoList().get(0).volumeResourceIds().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java index 8ee4e170a4df..f25b16bf8b0e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java @@ -13,12 +13,12 @@ public final class NetworkSiblingSetInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSiblingSetInner model = BinaryData.fromString( - "{\"networkSiblingSetId\":\"qyikvy\",\"subnetId\":\"uyav\",\"networkSiblingSetStateId\":\"wmn\",\"networkFeatures\":\"Standard_Basic\",\"provisioningState\":\"Succeeded\",\"nicInfoList\":[{\"ipAddress\":\"bvpoekrsgsgbdhu\",\"volumeResourceIds\":[\"njdgkynscliq\",\"zvhxnk\",\"mtk\",\"bo\"]},{\"ipAddress\":\"pnvdxz\",\"volumeResourceIds\":[\"hfrbbc\",\"vqagtltdhlf\",\"qojpy\"]}]}") + "{\"networkSiblingSetId\":\"ci\",\"subnetId\":\"defxrdc\",\"networkSiblingSetStateId\":\"nbkkjanurnnq\",\"networkFeatures\":\"Basic\",\"provisioningState\":\"Updating\",\"nicInfoList\":[{\"ipAddress\":\"qltgrd\",\"volumeResourceIds\":[\"pxrxvbfihwu\",\"vctafsrb\"]},{\"ipAddress\":\"blml\",\"volumeResourceIds\":[\"xihspnxwq\",\"gnepz\"]},{\"ipAddress\":\"klsbsbqqqagw\",\"volumeResourceIds\":[\"ao\",\"zisglrrczezkhh\",\"tnjadhq\"]},{\"ipAddress\":\"wjqo\",\"volumeResourceIds\":[\"ayfbpcm\",\"plby\",\"rueqthwm\"]}]}") .toObject(NetworkSiblingSetInner.class); - Assertions.assertEquals("qyikvy", model.networkSiblingSetId()); - Assertions.assertEquals("uyav", model.subnetId()); - Assertions.assertEquals("wmn", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, model.networkFeatures()); - Assertions.assertEquals("njdgkynscliq", model.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("ci", model.networkSiblingSetId()); + Assertions.assertEquals("defxrdc", model.subnetId()); + Assertions.assertEquals("nbkkjanurnnq", model.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.BASIC, model.networkFeatures()); + Assertions.assertEquals("pxrxvbfihwu", model.nicInfoList().get(0).volumeResourceIds().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NfsUserTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NfsUserTests.java new file mode 100644 index 000000000000..a3dcc803e185 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NfsUserTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.NfsUser; +import org.junit.jupiter.api.Assertions; + +public final class NfsUserTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NfsUser model = BinaryData.fromString("{\"userId\":605829579091214596,\"groupId\":4223928428315416005}") + .toObject(NfsUser.class); + Assertions.assertEquals(605829579091214596L, model.userId()); + Assertions.assertEquals(4223928428315416005L, model.groupId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NfsUser model = new NfsUser().withUserId(605829579091214596L).withGroupId(4223928428315416005L); + model = BinaryData.fromObject(model).toObject(NfsUser.class); + Assertions.assertEquals(605829579091214596L, model.userId()); + Assertions.assertEquals(4223928428315416005L, model.groupId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java index b0f0888fd36e..45e488c1c2de 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java @@ -11,8 +11,10 @@ public final class NicInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NicInfo model = BinaryData.fromString("{\"ipAddress\":\"gtrd\",\"volumeResourceIds\":[\"fmzzsdymbrny\",\"u\"]}") + NicInfo model = BinaryData + .fromString( + "{\"ipAddress\":\"mbscbbx\",\"volumeResourceIds\":[\"hxiidlopedb\",\"dpyqyybxubmd\",\"afcbqw\",\"e\"]}") .toObject(NicInfo.class); - Assertions.assertEquals("fmzzsdymbrny", model.volumeResourceIds().get(0)); + Assertions.assertEquals("hxiidlopedb", model.volumeResourceIds().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java index 0088075ae8c0..de94209bc098 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java @@ -23,7 +23,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"jhf\",\"display\":{\"provider\":\"ecactx\",\"resource\":\"oteyowc\",\"operation\":\"qovekqvgqou\",\"description\":\"fzmpjwyivq\"},\"origin\":\"f\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"sphuagrttikteus\",\"displayName\":\"zkvyklx\",\"displayDescription\":\"yja\",\"unit\":\"mmfblcqcuubgqib\",\"supportedAggregationTypes\":[\"Average\"],\"supportedTimeGrainTypes\":[\"tttwgdslqxih\",\"rmooizqse\",\"pxiutc\",\"apzhyrpetoge\"],\"internalMetricName\":\"oxslh\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"abrqnkkzj\",\"sourceMdmNamespace\":\"b\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"ehvvib\",\"fillGapWithZero\":false,\"category\":\"s\",\"resourceIdDimensionNameOverride\":\"qbeitpkxztmoob\",\"isInternal\":false},{\"name\":\"idgfc\",\"displayName\":\"mpimaqxzhemjyh\",\"displayDescription\":\"uj\",\"unit\":\"t\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"lkb\"],\"internalMetricName\":\"pfajnjwltlwtjj\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"alhsnvkc\",\"sourceMdmNamespace\":\"xzrpo\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"nwiaaomyl\",\"fillGapWithZero\":false,\"category\":\"ulcsethwwnpj\",\"resourceIdDimensionNameOverride\":\"fz\",\"isInternal\":false},{\"name\":\"hwahfbousn\",\"displayName\":\"pgfewetwlyx\",\"displayDescription\":\"cxy\",\"unit\":\"hdjhlimmbcx\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"xcjzhqizxfpxt\",\"qscjavftjuh\",\"qaz\",\"mtggu\"],\"internalMetricName\":\"ijr\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"vmmghfcfiwrxgk\",\"sourceMdmNamespace\":\"uvyinzqodfvpgs\",\"dimensions\":[{}],\"aggregationType\":\"sgbpfgzdjtx\",\"fillGapWithZero\":false,\"category\":\"bqvgaqv\",\"resourceIdDimensionNameOverride\":\"a\",\"isInternal\":true}],\"logSpecifications\":[{\"name\":\"dvetnws\",\"displayName\":\"utnw\"},{\"name\":\"uycvuzhyrmewip\",\"displayName\":\"ekdxuku\"}]}}}]}"; + = "{\"value\":[{\"name\":\"gbgatzuuvbxn\",\"display\":{\"provider\":\"bwggahtt\",\"resource\":\"swvajqfu\",\"operation\":\"x\",\"description\":\"qzasunwqrjzfrgqh\"},\"origin\":\"hcmbuocnjrohmbp\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"eblydyv\",\"displayName\":\"kmrocxne\",\"displayDescription\":\"sm\",\"unit\":\"dlfp\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"avyunssxlg\",\"ieegjl\"],\"internalMetricName\":\"vpaseksgbu\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"uygdhgaqipirp\",\"sourceMdmNamespace\":\"rqofulopmjnlexwh\",\"dimensions\":[{}],\"aggregationType\":\"ibkeph\",\"fillGapWithZero\":false,\"category\":\"rctat\",\"resourceIdDimensionNameOverride\":\"intqpbrlcyr\",\"isInternal\":true}],\"logSpecifications\":[{\"name\":\"ofxyfsrucvcrrpc\",\"displayName\":\"tbstvjeaqnrmv\"}]}}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,19 +34,19 @@ public void testList() throws Exception { PagedIterable<Operation> response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("jhf", response.iterator().next().name()); - Assertions.assertEquals("ecactx", response.iterator().next().display().provider()); - Assertions.assertEquals("oteyowc", response.iterator().next().display().resource()); - Assertions.assertEquals("qovekqvgqou", response.iterator().next().display().operation()); - Assertions.assertEquals("fzmpjwyivq", response.iterator().next().display().description()); - Assertions.assertEquals("f", response.iterator().next().origin()); - Assertions.assertEquals("sphuagrttikteus", + Assertions.assertEquals("gbgatzuuvbxn", response.iterator().next().name()); + Assertions.assertEquals("bwggahtt", response.iterator().next().display().provider()); + Assertions.assertEquals("swvajqfu", response.iterator().next().display().resource()); + Assertions.assertEquals("x", response.iterator().next().display().operation()); + Assertions.assertEquals("qzasunwqrjzfrgqh", response.iterator().next().display().description()); + Assertions.assertEquals("hcmbuocnjrohmbp", response.iterator().next().origin()); + Assertions.assertEquals("eblydyv", response.iterator().next().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("zkvyklx", + Assertions.assertEquals("kmrocxne", response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("yja", + Assertions.assertEquals("sm", response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("mmfblcqcuubgqib", + Assertions.assertEquals("dlfp", response.iterator().next().serviceSpecification().metricSpecifications().get(0).unit()); Assertions.assertEquals(MetricAggregationType.AVERAGE, response.iterator() @@ -56,7 +56,7 @@ public void testList() throws Exception { .get(0) .supportedAggregationTypes() .get(0)); - Assertions.assertEquals("tttwgdslqxih", + Assertions.assertEquals("avyunssxlg", response.iterator() .next() .serviceSpecification() @@ -64,21 +64,21 @@ public void testList() throws Exception { .get(0) .supportedTimeGrainTypes() .get(0)); - Assertions.assertEquals("oxslh", + Assertions.assertEquals("vpaseksgbu", response.iterator().next().serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertFalse( + Assertions.assertTrue( response.iterator().next().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("abrqnkkzj", + Assertions.assertEquals("uygdhgaqipirp", response.iterator().next().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("b", + Assertions.assertEquals("rqofulopmjnlexwh", response.iterator().next().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("ehvvib", + Assertions.assertEquals("ibkeph", response.iterator().next().serviceSpecification().metricSpecifications().get(0).aggregationType()); Assertions.assertFalse( response.iterator().next().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("s", + Assertions.assertEquals("rctat", response.iterator().next().serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("qbeitpkxztmoob", + Assertions.assertEquals("intqpbrlcyr", response.iterator() .next() .serviceSpecification() @@ -86,10 +86,10 @@ public void testList() throws Exception { .get(0) .resourceIdDimensionNameOverride()); Assertions - .assertFalse(response.iterator().next().serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("dvetnws", + .assertTrue(response.iterator().next().serviceSpecification().metricSpecifications().get(0).isInternal()); + Assertions.assertEquals("ofxyfsrucvcrrpc", response.iterator().next().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("utnw", + Assertions.assertEquals("tbstvjeaqnrmv", response.iterator().next().serviceSpecification().logSpecifications().get(0).displayName()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OriginClusterInformationTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OriginClusterInformationTests.java new file mode 100644 index 000000000000..34d42875e068 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OriginClusterInformationTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.OriginClusterInformation; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class OriginClusterInformationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OriginClusterInformation model = BinaryData.fromString( + "{\"peerClusterName\":\"kdmligovi\",\"peerAddresses\":[\"xk\",\"mloazuru\",\"cbgoor\",\"te\"],\"peerVserverName\":\"ybfhjxa\",\"peerVolumeName\":\"vvjgslor\"}") + .toObject(OriginClusterInformation.class); + Assertions.assertEquals("kdmligovi", model.peerClusterName()); + Assertions.assertEquals("xk", model.peerAddresses().get(0)); + Assertions.assertEquals("ybfhjxa", model.peerVserverName()); + Assertions.assertEquals("vvjgslor", model.peerVolumeName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OriginClusterInformation model = new OriginClusterInformation().withPeerClusterName("kdmligovi") + .withPeerAddresses(Arrays.asList("xk", "mloazuru", "cbgoor", "te")) + .withPeerVserverName("ybfhjxa") + .withPeerVolumeName("vvjgslor"); + model = BinaryData.fromObject(model).toObject(OriginClusterInformation.class); + Assertions.assertEquals("kdmligovi", model.peerClusterName()); + Assertions.assertEquals("xk", model.peerAddresses().get(0)); + Assertions.assertEquals("ybfhjxa", model.peerVserverName()); + Assertions.assertEquals("vvjgslor", model.peerVolumeName()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeerClusterForVolumeMigrationRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeerClusterForVolumeMigrationRequestTests.java index 11ad290a74ef..58fc122f72c4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeerClusterForVolumeMigrationRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeerClusterForVolumeMigrationRequestTests.java @@ -12,16 +12,17 @@ public final class PeerClusterForVolumeMigrationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PeerClusterForVolumeMigrationRequest model = BinaryData.fromString("{\"peerIpAddresses\":[\"erscdntne\"]}") - .toObject(PeerClusterForVolumeMigrationRequest.class); - Assertions.assertEquals("erscdntne", model.peerIpAddresses().get(0)); + PeerClusterForVolumeMigrationRequest model + = BinaryData.fromString("{\"peerIpAddresses\":[\"kqze\",\"qkdltfz\",\"mhhv\",\"gureodkwobdag\"]}") + .toObject(PeerClusterForVolumeMigrationRequest.class); + Assertions.assertEquals("kqze", model.peerIpAddresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PeerClusterForVolumeMigrationRequest model - = new PeerClusterForVolumeMigrationRequest().withPeerIpAddresses(Arrays.asList("erscdntne")); + PeerClusterForVolumeMigrationRequest model = new PeerClusterForVolumeMigrationRequest() + .withPeerIpAddresses(Arrays.asList("kqze", "qkdltfz", "mhhv", "gureodkwobdag")); model = BinaryData.fromObject(model).toObject(PeerClusterForVolumeMigrationRequest.class); - Assertions.assertEquals("erscdntne", model.peerIpAddresses().get(0)); + Assertions.assertEquals("kqze", model.peerIpAddresses().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeeringPassphrasesInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeeringPassphrasesInnerTests.java new file mode 100644 index 000000000000..057defd13094 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeeringPassphrasesInnerTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner; +import org.junit.jupiter.api.Assertions; + +public final class PeeringPassphrasesInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PeeringPassphrasesInner model = BinaryData.fromString( + "{\"clusterPeeringCommand\":\"kjlmx\",\"clusterPeeringPassphrase\":\"omdynhdwdigum\",\"vserverPeeringCommand\":\"nraauzz\"}") + .toObject(PeeringPassphrasesInner.class); + Assertions.assertEquals("kjlmx", model.clusterPeeringCommand()); + Assertions.assertEquals("omdynhdwdigum", model.clusterPeeringPassphrase()); + Assertions.assertEquals("nraauzz", model.vserverPeeringCommand()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java index 0aa4540b9d0d..16f835336ce3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java @@ -12,14 +12,14 @@ public final class PoolChangeRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PoolChangeRequest model - = BinaryData.fromString("{\"newPoolResourceId\":\"semwabnet\"}").toObject(PoolChangeRequest.class); - Assertions.assertEquals("semwabnet", model.newPoolResourceId()); + = BinaryData.fromString("{\"newPoolResourceId\":\"dxunkbebxmubyyn\"}").toObject(PoolChangeRequest.class); + Assertions.assertEquals("dxunkbebxmubyyn", model.newPoolResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PoolChangeRequest model = new PoolChangeRequest().withNewPoolResourceId("semwabnet"); + PoolChangeRequest model = new PoolChangeRequest().withNewPoolResourceId("dxunkbebxmubyyn"); model = BinaryData.fromObject(model).toObject(PoolChangeRequest.class); - Assertions.assertEquals("semwabnet", model.newPoolResourceId()); + Assertions.assertEquals("dxunkbebxmubyyn", model.newPoolResourceId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java index a9c58489e14c..d522f5176b13 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java @@ -13,24 +13,24 @@ public final class PoolPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PoolPatchProperties model = BinaryData.fromString( - "{\"size\":6158704597688718378,\"qosType\":\"Manual\",\"coolAccess\":false,\"customThroughputMibps\":1678889630}") + "{\"size\":9024669297571471912,\"qosType\":\"Auto\",\"coolAccess\":true,\"customThroughputMibps\":729860608}") .toObject(PoolPatchProperties.class); - Assertions.assertEquals(6158704597688718378L, model.size()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(1678889630, model.customThroughputMibps()); + Assertions.assertEquals(9024669297571471912L, model.size()); + Assertions.assertEquals(QosType.AUTO, model.qosType()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(729860608, model.customThroughputMibps()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PoolPatchProperties model = new PoolPatchProperties().withSize(6158704597688718378L) - .withQosType(QosType.MANUAL) - .withCoolAccess(false) - .withCustomThroughputMibps(1678889630); + PoolPatchProperties model = new PoolPatchProperties().withSize(9024669297571471912L) + .withQosType(QosType.AUTO) + .withCoolAccess(true) + .withCustomThroughputMibps(729860608); model = BinaryData.fromObject(model).toObject(PoolPatchProperties.class); - Assertions.assertEquals(6158704597688718378L, model.size()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(1678889630, model.customThroughputMibps()); + Assertions.assertEquals(9024669297571471912L, model.size()); + Assertions.assertEquals(QosType.AUTO, model.qosType()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(729860608, model.customThroughputMibps()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java index f62500298d73..6a85ff108086 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java @@ -15,30 +15,30 @@ public final class PoolPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PoolProperties model = BinaryData.fromString( - "{\"poolId\":\"dxeclzedqbcvh\",\"size\":3554459404592540938,\"serviceLevel\":\"Premium\",\"provisioningState\":\"odqkdlwwqfb\",\"totalThroughputMibps\":19.944017,\"utilizedThroughputMibps\":43.051697,\"customThroughputMibps\":1934168431,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Double\"}") + "{\"poolId\":\"dwqslsrhmpqvw\",\"size\":3475044640487676472,\"serviceLevel\":\"Flexible\",\"provisioningState\":\"dcbrwimuvq\",\"totalThroughputMibps\":82.95491,\"utilizedThroughputMibps\":75.11184,\"customThroughputMibps\":1299562334,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Single\"}") .toObject(PoolProperties.class); - Assertions.assertEquals(3554459404592540938L, model.size()); - Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); - Assertions.assertEquals(1934168431, model.customThroughputMibps()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertTrue(model.coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); + Assertions.assertEquals(3475044640487676472L, model.size()); + Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.serviceLevel()); + Assertions.assertEquals(1299562334, model.customThroughputMibps()); + Assertions.assertEquals(QosType.AUTO, model.qosType()); + Assertions.assertFalse(model.coolAccess()); + Assertions.assertEquals(EncryptionType.SINGLE, model.encryptionType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PoolProperties model = new PoolProperties().withSize(3554459404592540938L) - .withServiceLevel(ServiceLevel.PREMIUM) - .withCustomThroughputMibps(1934168431) - .withQosType(QosType.MANUAL) - .withCoolAccess(true) - .withEncryptionType(EncryptionType.DOUBLE); + PoolProperties model = new PoolProperties().withSize(3475044640487676472L) + .withServiceLevel(ServiceLevel.FLEXIBLE) + .withCustomThroughputMibps(1299562334) + .withQosType(QosType.AUTO) + .withCoolAccess(false) + .withEncryptionType(EncryptionType.SINGLE); model = BinaryData.fromObject(model).toObject(PoolProperties.class); - Assertions.assertEquals(3554459404592540938L, model.size()); - Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); - Assertions.assertEquals(1934168431, model.customThroughputMibps()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertTrue(model.coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); + Assertions.assertEquals(3475044640487676472L, model.size()); + Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.serviceLevel()); + Assertions.assertEquals(1299562334, model.customThroughputMibps()); + Assertions.assertEquals(QosType.AUTO, model.qosType()); + Assertions.assertFalse(model.coolAccess()); + Assertions.assertEquals(EncryptionType.SINGLE, model.encryptionType()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java index 5cb5cd661b04..8fad4640b017 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java @@ -26,7 +26,7 @@ public final class PoolsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"poolId\":\"nsq\",\"size\":9179856154635151160,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"Succeeded\",\"totalThroughputMibps\":70.34075,\"utilizedThroughputMibps\":40.122326,\"customThroughputMibps\":301976454,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"etag\":\"jyfdvlv\",\"location\":\"wrnfxtgdd\",\"tags\":{\"kcoeqswank\":\"hehnmnaoya\"},\"id\":\"t\",\"name\":\"tmhdroznnhdr\",\"type\":\"ktgj\"}"; + = "{\"properties\":{\"poolId\":\"hkkyowltjouw\",\"size\":6146334947352208507,\"serviceLevel\":\"Standard\",\"provisioningState\":\"Succeeded\",\"totalThroughputMibps\":24.41163,\"utilizedThroughputMibps\":95.237206,\"customThroughputMibps\":1416952757,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"itbfjtdy\",\"location\":\"nplfac\",\"tags\":{\"wetjtdrhutf\":\"cqrq\",\"gssz\":\"oadtxopgehpadkmd\",\"harls\":\"vctkbbx\"},\"id\":\"rncclabv\",\"name\":\"yngsuxxcz\",\"type\":\"myqjog\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,25 +36,25 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CapacityPool response = manager.pools() - .define("sinuqtljqobbpih") - .withRegion("kmdyomkxfbvfbh") - .withExistingNetAppAccount("josovyrrl", "a") - .withSize(8601531135339154686L) + .define("atuwqkokbc") + .withRegion("khgvoogxkfnao") + .withExistingNetAppAccount("tvsnvl", "qdnzyza") + .withSize(3190234716778410225L) .withServiceLevel(ServiceLevel.PREMIUM) - .withTags(mapOf("gddeimaw", "rhpw")) - .withCustomThroughputMibps(2083123836) - .withQosType(QosType.MANUAL) + .withTags(mapOf("nskby", "mhcctopuowy", "jpxecxqnwhsco", "quhczygxvh", "pknpwirfljfewxq", "awmvgxs")) + .withCustomThroughputMibps(1519260317) + .withQosType(QosType.AUTO) .withCoolAccess(false) - .withEncryptionType(EncryptionType.SINGLE) + .withEncryptionType(EncryptionType.DOUBLE) .create(); - Assertions.assertEquals("wrnfxtgdd", response.location()); - Assertions.assertEquals("hehnmnaoya", response.tags().get("kcoeqswank")); - Assertions.assertEquals(9179856154635151160L, response.size()); - Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, response.serviceLevel()); - Assertions.assertEquals(301976454, response.customThroughputMibps()); - Assertions.assertEquals(QosType.AUTO, response.qosType()); - Assertions.assertFalse(response.coolAccess()); + Assertions.assertEquals("nplfac", response.location()); + Assertions.assertEquals("cqrq", response.tags().get("wetjtdrhutf")); + Assertions.assertEquals(6146334947352208507L, response.size()); + Assertions.assertEquals(ServiceLevel.STANDARD, response.serviceLevel()); + Assertions.assertEquals(1416952757, response.customThroughputMibps()); + Assertions.assertEquals(QosType.MANUAL, response.qosType()); + Assertions.assertTrue(response.coolAccess()); Assertions.assertEquals(EncryptionType.SINGLE, response.encryptionType()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java index 8edf08a5c761..8df8b27e8210 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class PoolsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"poolId\":\"hmoz\",\"size\":4571783407707453265,\"serviceLevel\":\"Standard\",\"provisioningState\":\"ln\",\"totalThroughputMibps\":9.580618,\"utilizedThroughputMibps\":96.16699,\"customThroughputMibps\":1586632226,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"etag\":\"wamxqzrag\",\"location\":\"dphtv\",\"tags\":{\"vl\":\"a\"},\"id\":\"jchcsrlzknmzla\",\"name\":\"rupdwvnphcnzq\",\"type\":\"pjhmqrhvthl\"}"; + = "{\"properties\":{\"poolId\":\"yytfvpct\",\"size\":6192810519203521270,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"ff\",\"totalThroughputMibps\":79.60702,\"utilizedThroughputMibps\":72.03645,\"customThroughputMibps\":1341232178,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"etag\":\"kke\",\"location\":\"kj\",\"tags\":{\"zmxjqif\":\"wg\",\"cmlzaahz\":\"ujjs\",\"oolkolirhhm\":\"hu\"},\"id\":\"jusuzgfjzc\",\"name\":\"aaxoialahfxwcc\",\"type\":\"kdxkuk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,17 +33,16 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - CapacityPool response = manager.pools() - .getWithResponse("okcdxfzzzwyjaf", "tlhguynuchl", "mltx", com.azure.core.util.Context.NONE) - .getValue(); + CapacityPool response + = manager.pools().getWithResponse("ujktzb", "imyfpqdo", "kpp", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("dphtv", response.location()); - Assertions.assertEquals("a", response.tags().get("vl")); - Assertions.assertEquals(4571783407707453265L, response.size()); - Assertions.assertEquals(ServiceLevel.STANDARD, response.serviceLevel()); - Assertions.assertEquals(1586632226, response.customThroughputMibps()); - Assertions.assertEquals(QosType.MANUAL, response.qosType()); - Assertions.assertTrue(response.coolAccess()); + Assertions.assertEquals("kj", response.location()); + Assertions.assertEquals("wg", response.tags().get("zmxjqif")); + Assertions.assertEquals(6192810519203521270L, response.size()); + Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, response.serviceLevel()); + Assertions.assertEquals(1341232178, response.customThroughputMibps()); + Assertions.assertEquals(QosType.AUTO, response.qosType()); + Assertions.assertFalse(response.coolAccess()); Assertions.assertEquals(EncryptionType.DOUBLE, response.encryptionType()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java index 96c91793b73c..38b974eab454 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java @@ -25,7 +25,7 @@ public final class PoolsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"poolId\":\"npxybafiq\",\"size\":8630165926695508112,\"serviceLevel\":\"Flexible\",\"provisioningState\":\"bgj\",\"totalThroughputMibps\":26.121838,\"utilizedThroughputMibps\":66.93982,\"customThroughputMibps\":768847582,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"wvmzegjonfhjir\",\"location\":\"dnqzbrfkspzhzmt\",\"tags\":{\"igsxcdgljplk\":\"cit\",\"htomflrytswfp\":\"ua\",\"skw\":\"mdgycxn\",\"shhkvpedw\":\"qjjyslurl\"},\"id\":\"slsrhmpq\",\"name\":\"wwsko\",\"type\":\"dcbrwimuvq\"}]}"; + = "{\"value\":[{\"properties\":{\"poolId\":\"k\",\"size\":6606387189353667472,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"lnthbbnkgzukwdrn\",\"totalThroughputMibps\":60.380737,\"utilizedThroughputMibps\":59.94145,\"customThroughputMibps\":1591848139,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"etag\":\"lfuyfjbpfiddhlr\",\"location\":\"zcqy\",\"tags\":{\"k\":\"rfuiocusel\",\"sjmrkkhm\":\"sazrhxuddqmdtff\",\"jawh\":\"dmdlgyqixokw\"},\"id\":\"ag\",\"name\":\"qfqqdlcvmyolc\",\"type\":\"ymjc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,15 +35,15 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<CapacityPool> response - = manager.pools().list("iwdcxsmlzzhzd", "xetlgydlhqv", com.azure.core.util.Context.NONE); + = manager.pools().list("kczynuhhoqeqsh", "vl", com.azure.core.util.Context.NONE); - Assertions.assertEquals("dnqzbrfkspzhzmt", response.iterator().next().location()); - Assertions.assertEquals("cit", response.iterator().next().tags().get("igsxcdgljplk")); - Assertions.assertEquals(8630165926695508112L, response.iterator().next().size()); - Assertions.assertEquals(ServiceLevel.FLEXIBLE, response.iterator().next().serviceLevel()); - Assertions.assertEquals(768847582, response.iterator().next().customThroughputMibps()); + Assertions.assertEquals("zcqy", response.iterator().next().location()); + Assertions.assertEquals("rfuiocusel", response.iterator().next().tags().get("k")); + Assertions.assertEquals(6606387189353667472L, response.iterator().next().size()); + Assertions.assertEquals(ServiceLevel.ULTRA, response.iterator().next().serviceLevel()); + Assertions.assertEquals(1591848139, response.iterator().next().customThroughputMibps()); Assertions.assertEquals(QosType.AUTO, response.iterator().next().qosType()); Assertions.assertTrue(response.iterator().next().coolAccess()); - Assertions.assertEquals(EncryptionType.SINGLE, response.iterator().next().encryptionType()); + Assertions.assertEquals(EncryptionType.DOUBLE, response.iterator().next().encryptionType()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java index 8184750014a8..b9d8728fde63 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java @@ -12,18 +12,18 @@ public final class QueryNetworkSiblingSetRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QueryNetworkSiblingSetRequest model - = BinaryData.fromString("{\"networkSiblingSetId\":\"hezwwvaiq\",\"subnetId\":\"uvvfonkp\"}") + = BinaryData.fromString("{\"networkSiblingSetId\":\"czzydmxzjij\",\"subnetId\":\"vuaurk\"}") .toObject(QueryNetworkSiblingSetRequest.class); - Assertions.assertEquals("hezwwvaiq", model.networkSiblingSetId()); - Assertions.assertEquals("uvvfonkp", model.subnetId()); + Assertions.assertEquals("czzydmxzjij", model.networkSiblingSetId()); + Assertions.assertEquals("vuaurk", model.subnetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { QueryNetworkSiblingSetRequest model - = new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("hezwwvaiq").withSubnetId("uvvfonkp"); + = new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("czzydmxzjij").withSubnetId("vuaurk"); model = BinaryData.fromObject(model).toObject(QueryNetworkSiblingSetRequest.class); - Assertions.assertEquals("hezwwvaiq", model.networkSiblingSetId()); - Assertions.assertEquals("uvvfonkp", model.subnetId()); + Assertions.assertEquals("czzydmxzjij", model.networkSiblingSetId()); + Assertions.assertEquals("vuaurk", model.subnetId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java index c326e4034561..cfa0dbdb0a5a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java @@ -13,25 +13,25 @@ public final class QuotaAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QuotaAvailabilityRequest model = BinaryData.fromString( - "{\"name\":\"dwdigumb\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots\",\"resourceGroup\":\"aauzzptjazysd\"}") + "{\"name\":\"xuifmcsypobkdqz\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots\",\"resourceGroup\":\"zsylollgt\"}") .toObject(QuotaAvailabilityRequest.class); - Assertions.assertEquals("dwdigumb", model.name()); + Assertions.assertEquals("xuifmcsypobkdqz", model.name()); Assertions.assertEquals( CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS, model.type()); - Assertions.assertEquals("aauzzptjazysd", model.resourceGroup()); + Assertions.assertEquals("zsylollgt", model.resourceGroup()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - QuotaAvailabilityRequest model = new QuotaAvailabilityRequest().withName("dwdigumb") + QuotaAvailabilityRequest model = new QuotaAvailabilityRequest().withName("xuifmcsypobkdqz") .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS) - .withResourceGroup("aauzzptjazysd"); + .withResourceGroup("zsylollgt"); model = BinaryData.fromObject(model).toObject(QuotaAvailabilityRequest.class); - Assertions.assertEquals("dwdigumb", model.name()); + Assertions.assertEquals("xuifmcsypobkdqz", model.name()); Assertions.assertEquals( CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS, model.type()); - Assertions.assertEquals("aauzzptjazysd", model.resourceGroup()); + Assertions.assertEquals("zsylollgt", model.resourceGroup()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaReportTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaReportTests.java new file mode 100644 index 000000000000..66887356a347 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaReportTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.QuotaReport; +import com.azure.resourcemanager.netapp.models.Type; +import org.junit.jupiter.api.Assertions; + +public final class QuotaReportTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + QuotaReport model = BinaryData.fromString( + "{\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"btbhjpglkfgohd\",\"quotaLimitUsedInKiBs\":3210432700680479776,\"quotaLimitTotalInKiBs\":8814902038888583315,\"percentageUsed\":91.37615,\"isDerivedQuota\":true}") + .toObject(QuotaReport.class); + Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("btbhjpglkfgohd", model.quotaTarget()); + Assertions.assertEquals(3210432700680479776L, model.quotaLimitUsedInKiBs()); + Assertions.assertEquals(8814902038888583315L, model.quotaLimitTotalInKiBs()); + Assertions.assertEquals(91.37615F, model.percentageUsed()); + Assertions.assertTrue(model.isDerivedQuota()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareProtectionPatchSettingsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareProtectionPatchSettingsTests.java new file mode 100644 index 000000000000..3388ef283e78 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareProtectionPatchSettingsTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.DesiredRansomwareProtectionState; +import com.azure.resourcemanager.netapp.models.RansomwareProtectionPatchSettings; +import org.junit.jupiter.api.Assertions; + +public final class RansomwareProtectionPatchSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RansomwareProtectionPatchSettings model + = BinaryData.fromString("{\"desiredRansomwareProtectionState\":\"Enabled\"}") + .toObject(RansomwareProtectionPatchSettings.class); + Assertions.assertEquals(DesiredRansomwareProtectionState.ENABLED, model.desiredRansomwareProtectionState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RansomwareProtectionPatchSettings model = new RansomwareProtectionPatchSettings() + .withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState.ENABLED); + model = BinaryData.fromObject(model).toObject(RansomwareProtectionPatchSettings.class); + Assertions.assertEquals(DesiredRansomwareProtectionState.ENABLED, model.desiredRansomwareProtectionState()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareProtectionSettingsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareProtectionSettingsTests.java new file mode 100644 index 000000000000..1507a41835d1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareProtectionSettingsTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.DesiredRansomwareProtectionState; +import com.azure.resourcemanager.netapp.models.RansomwareProtectionSettings; +import org.junit.jupiter.api.Assertions; + +public final class RansomwareProtectionSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RansomwareProtectionSettings model = BinaryData + .fromString( + "{\"desiredRansomwareProtectionState\":\"Enabled\",\"actualRansomwareProtectionState\":\"Disabled\"}") + .toObject(RansomwareProtectionSettings.class); + Assertions.assertEquals(DesiredRansomwareProtectionState.ENABLED, model.desiredRansomwareProtectionState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RansomwareProtectionSettings model = new RansomwareProtectionSettings() + .withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState.ENABLED); + model = BinaryData.fromObject(model).toObject(RansomwareProtectionSettings.class); + Assertions.assertEquals(DesiredRansomwareProtectionState.ENABLED, model.desiredRansomwareProtectionState()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportInnerTests.java new file mode 100644 index 000000000000..39ed291bd5ab --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportInnerTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.RansomwareReportInner; + +public final class RansomwareReportInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RansomwareReportInner model = BinaryData.fromString( + "{\"properties\":{\"eventTime\":\"2020-12-25T23:20:44Z\",\"state\":\"Active\",\"severity\":\"None\",\"clearedCount\":562718876,\"reportedCount\":1709728841,\"suspects\":[{\"extension\":\"phoszqz\",\"resolution\":\"FalsePositive\",\"fileCount\":2041043826,\"suspectFiles\":[{\"suspectFileName\":\"dkfw\",\"fileTimestamp\":\"2021-08-12T04:12:29Z\"}]},{\"extension\":\"vtbvkayh\",\"resolution\":\"PotentialThreat\",\"fileCount\":84977587,\"suspectFiles\":[{\"suspectFileName\":\"tkzwpcnpwzc\",\"fileTimestamp\":\"2021-05-22T23:16:36Z\"},{\"suspectFileName\":\"gvvs\",\"fileTimestamp\":\"2021-10-01T18:08:28Z\"},{\"suspectFileName\":\"jguq\",\"fileTimestamp\":\"2021-04-26T06:49:27Z\"}]}],\"provisioningState\":\"gzlvdnkfxu\"},\"id\":\"mdwzrmuhapfcqdps\",\"name\":\"xqv\",\"type\":\"svuo\"}") + .toObject(RansomwareReportInner.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportPropertiesTests.java new file mode 100644 index 000000000000..133a800f7de0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportPropertiesTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.RansomwareReportProperties; + +public final class RansomwareReportPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RansomwareReportProperties model = BinaryData.fromString( + "{\"eventTime\":\"2021-01-10T12:18:54Z\",\"state\":\"Active\",\"severity\":\"None\",\"clearedCount\":1724622267,\"reportedCount\":62275538,\"suspects\":[{\"extension\":\"lmfeokerq\",\"resolution\":\"PotentialThreat\",\"fileCount\":137094818,\"suspectFiles\":[{\"suspectFileName\":\"pg\",\"fileTimestamp\":\"2021-07-31T15:17:12Z\"},{\"suspectFileName\":\"owepbqpcrfkb\",\"fileTimestamp\":\"2021-10-14T17:11:50Z\"},{\"suspectFileName\":\"jvcdwxlpqekf\",\"fileTimestamp\":\"2021-08-06T20:29:45Z\"},{\"suspectFileName\":\"tjsyin\",\"fileTimestamp\":\"2021-09-11T08:24:22Z\"}]},{\"extension\":\"atmtdhtmdvy\",\"resolution\":\"FalsePositive\",\"fileCount\":1851759881,\"suspectFiles\":[{\"suspectFileName\":\"ywkbirryuzhlhkjo\",\"fileTimestamp\":\"2021-06-25T16:08:27Z\"},{\"suspectFileName\":\"qaatjinrv\",\"fileTimestamp\":\"2021-07-06T00:36:52Z\"},{\"suspectFileName\":\"mfiibfggj\",\"fileTimestamp\":\"2021-04-08T04:20:38Z\"}]}],\"provisioningState\":\"vrwxkv\"}") + .toObject(RansomwareReportProperties.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetWithResponseMockTests.java new file mode 100644 index 000000000000..4b40bbb33ad1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetWithResponseMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.RansomwareReport; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class RansomwareReportsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"eventTime\":\"2021-09-27T22:08:27Z\",\"state\":\"Active\",\"severity\":\"Low\",\"clearedCount\":1684475673,\"reportedCount\":1140842141,\"suspects\":[{\"extension\":\"tlgflwfgz\",\"resolution\":\"PotentialThreat\",\"fileCount\":1455150949,\"suspectFiles\":[{},{},{},{}]},{\"extension\":\"eatlijjjrtvamcas\",\"resolution\":\"FalsePositive\",\"fileCount\":1639548790,\"suspectFiles\":[{},{},{}]}],\"provisioningState\":\"xetyvku\"},\"id\":\"ignohi\",\"name\":\"kgqogjw\",\"type\":\"indedvabbx\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + RansomwareReport response = manager.ransomwareReports() + .getWithResponse("wdfmmpzhzzwvywr", "yngydgrpxncaki", "aondjrkclamgg", "vlmfej", "oqeykglt", + com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListMockTests.java new file mode 100644 index 000000000000..4f5158773803 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.RansomwareReport; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class RansomwareReportsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"eventTime\":\"2021-08-20T16:05:59Z\",\"state\":\"Active\",\"severity\":\"High\",\"clearedCount\":842328747,\"reportedCount\":766137540,\"suspects\":[{\"extension\":\"a\",\"resolution\":\"FalsePositive\",\"fileCount\":1448262455,\"suspectFiles\":[{},{},{},{}]},{\"extension\":\"mfczl\",\"resolution\":\"PotentialThreat\",\"fileCount\":1837335612,\"suspectFiles\":[{}]},{\"extension\":\"zgowox\",\"resolution\":\"PotentialThreat\",\"fileCount\":642254793,\"suspectFiles\":[{}]},{\"extension\":\"nyq\",\"resolution\":\"FalsePositive\",\"fileCount\":1232055835,\"suspectFiles\":[{},{},{},{}]}],\"provisioningState\":\"xisimjceagbj\"},\"id\":\"lsumywzashx\",\"name\":\"onoyjf\",\"type\":\"ipubyznclkfk\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable<RansomwareReport> response = manager.ransomwareReports() + .list("hmedeilbjywfcfxz", "rzzihvwypus", "vjslczwcii", "jsllfryvd", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListTests.java new file mode 100644 index 000000000000..eee8a0b1cce4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.implementation.models.RansomwareReportsList; +import org.junit.jupiter.api.Assertions; + +public final class RansomwareReportsListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RansomwareReportsList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"eventTime\":\"2021-02-05T15:31:44Z\",\"state\":\"Active\",\"severity\":\"High\",\"clearedCount\":283160638,\"reportedCount\":384819468,\"suspects\":[{\"extension\":\"ejvegrhbpnaixex\",\"resolution\":\"PotentialThreat\",\"fileCount\":314697275,\"suspectFiles\":[{}]},{\"extension\":\"hcexdrrvqa\",\"resolution\":\"FalsePositive\",\"fileCount\":1584778168,\"suspectFiles\":[{},{}]},{\"extension\":\"ijnhyjsvfycxzbf\",\"resolution\":\"FalsePositive\",\"fileCount\":1432039149,\"suspectFiles\":[{},{},{}]}],\"provisioningState\":\"t\"},\"id\":\"qp\",\"name\":\"y\",\"type\":\"s\"},{\"properties\":{\"eventTime\":\"2021-10-14T19:48:58Z\",\"state\":\"Resolved\",\"severity\":\"Moderate\",\"clearedCount\":1320458581,\"reportedCount\":779429709,\"suspects\":[{\"extension\":\"kmcwaekrrjreafx\",\"resolution\":\"FalsePositive\",\"fileCount\":1712554601,\"suspectFiles\":[{},{},{},{}]}],\"provisioningState\":\"lik\"},\"id\":\"wslolbqp\",\"name\":\"uzlm\",\"type\":\"felfktg\"},{\"properties\":{\"eventTime\":\"2021-01-08T03:48:52Z\",\"state\":\"Resolved\",\"severity\":\"Low\",\"clearedCount\":2026276313,\"reportedCount\":282428927,\"suspects\":[{\"extension\":\"rnjwmw\",\"resolution\":\"FalsePositive\",\"fileCount\":650056423,\"suspectFiles\":[{},{}]}],\"provisioningState\":\"jjoqkagf\"},\"id\":\"xttaugzxnfaaz\",\"name\":\"xdtnkdmkqjjlw\",\"type\":\"envrkpyouaibrebq\"},{\"properties\":{\"eventTime\":\"2021-10-23T15:53:30Z\",\"state\":\"Resolved\",\"severity\":\"Low\",\"clearedCount\":1662544736,\"reportedCount\":2018222858,\"suspects\":[{\"extension\":\"zlwfffiakp\",\"resolution\":\"FalsePositive\",\"fileCount\":39078864,\"suspectFiles\":[{},{},{},{}]},{\"extension\":\"ltmm\",\"resolution\":\"FalsePositive\",\"fileCount\":1482322760,\"suspectFiles\":[{}]}],\"provisioningState\":\"hvwauyqncy\"},\"id\":\"p\",\"name\":\"vipmdscwxqupevzh\",\"type\":\"stotxh\"}],\"nextLink\":\"ujbypelmcuvhixb\"}") + .toObject(RansomwareReportsList.class); + Assertions.assertEquals("ujbypelmcuvhixb", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsClearRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsClearRequestTests.java new file mode 100644 index 000000000000..0fb40c7a717e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsClearRequestTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.RansomwareSuspectResolution; +import com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RansomwareSuspectsClearRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RansomwareSuspectsClearRequest model + = BinaryData.fromString("{\"resolution\":\"FalsePositive\",\"extensions\":[\"fw\",\"yl\"]}") + .toObject(RansomwareSuspectsClearRequest.class); + Assertions.assertEquals(RansomwareSuspectResolution.FALSE_POSITIVE, model.resolution()); + Assertions.assertEquals("fw", model.extensions().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RansomwareSuspectsClearRequest model + = new RansomwareSuspectsClearRequest().withResolution(RansomwareSuspectResolution.FALSE_POSITIVE) + .withExtensions(Arrays.asList("fw", "yl")); + model = BinaryData.fromObject(model).toObject(RansomwareSuspectsClearRequest.class); + Assertions.assertEquals(RansomwareSuspectResolution.FALSE_POSITIVE, model.resolution()); + Assertions.assertEquals("fw", model.extensions().get(0)); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsTests.java new file mode 100644 index 000000000000..c43fcf72cc7e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.RansomwareSuspects; + +public final class RansomwareSuspectsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RansomwareSuspects model = BinaryData.fromString( + "{\"extension\":\"k\",\"resolution\":\"FalsePositive\",\"fileCount\":1852467405,\"suspectFiles\":[{\"suspectFileName\":\"vjayvblmhvkzu\",\"fileTimestamp\":\"2021-11-23T11:34:55Z\"},{\"suspectFileName\":\"vyhgs\",\"fileTimestamp\":\"2021-06-13T17:46:53Z\"},{\"suspectFileName\":\"rqufegxuvwz\",\"fileTimestamp\":\"2021-04-02T15:27:05Z\"}]}") + .toObject(RansomwareSuspects.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java index 7bc67d15bcc8..7518852c2219 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java @@ -11,15 +11,15 @@ public final class ReestablishReplicationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ReestablishReplicationRequest model = BinaryData.fromString("{\"sourceVolumeId\":\"tjrybnwjewgdr\"}") - .toObject(ReestablishReplicationRequest.class); - Assertions.assertEquals("tjrybnwjewgdr", model.sourceVolumeId()); + ReestablishReplicationRequest model + = BinaryData.fromString("{\"sourceVolumeId\":\"ao\"}").toObject(ReestablishReplicationRequest.class); + Assertions.assertEquals("ao", model.sourceVolumeId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ReestablishReplicationRequest model = new ReestablishReplicationRequest().withSourceVolumeId("tjrybnwjewgdr"); + ReestablishReplicationRequest model = new ReestablishReplicationRequest().withSourceVolumeId("ao"); model = BinaryData.fromObject(model).toObject(ReestablishReplicationRequest.class); - Assertions.assertEquals("tjrybnwjewgdr", model.sourceVolumeId()); + Assertions.assertEquals("ao", model.sourceVolumeId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java index 370f26030636..7cbf4f9d6d98 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java @@ -12,9 +12,9 @@ public final class RegionInfoAvailabilityZoneMappingsItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegionInfoAvailabilityZoneMappingsItem model - = BinaryData.fromString("{\"availabilityZone\":\"ddhcratizzr\",\"isAvailable\":false}") + = BinaryData.fromString("{\"availabilityZone\":\"cpugm\",\"isAvailable\":true}") .toObject(RegionInfoAvailabilityZoneMappingsItem.class); - Assertions.assertEquals("ddhcratizzr", model.availabilityZone()); - Assertions.assertFalse(model.isAvailable()); + Assertions.assertEquals("cpugm", model.availabilityZone()); + Assertions.assertTrue(model.isAvailable()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java index aa85de3d3ce0..4ef490791180 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java @@ -13,10 +13,11 @@ public final class RegionInfoInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegionInfoInner model = BinaryData.fromString( - "{\"storageToNetworkProximity\":\"T1AndT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"qfi\",\"isAvailable\":false},{\"availabilityZone\":\"knpirgnepttwq\",\"isAvailable\":true},{\"availabilityZone\":\"ffcdmqnrojl\",\"isAvailable\":false},{\"availabilityZone\":\"k\",\"isAvailable\":true}]}") + "{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"wnupgahxku\",\"isAvailable\":true},{\"availabilityZone\":\"caac\",\"isAvailable\":false}]}") .toObject(RegionInfoInner.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2, model.storageToNetworkProximity()); - Assertions.assertEquals("qfi", model.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertFalse(model.availabilityZoneMappings().get(0).isAvailable()); + Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, + model.storageToNetworkProximity()); + Assertions.assertEquals("wnupgahxku", model.availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertTrue(model.availabilityZoneMappings().get(0).isAvailable()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoResourceInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoResourceInnerTests.java index 640c1037ce8e..2d1b36c93752 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoResourceInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoResourceInnerTests.java @@ -13,10 +13,10 @@ public final class RegionInfoResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegionInfoResourceInner model = BinaryData.fromString( - "{\"properties\":{\"storageToNetworkProximity\":\"T1AndT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"ton\",\"isAvailable\":false}]},\"id\":\"uu\",\"name\":\"fdlwg\",\"type\":\"ytsbwtovv\"}") + "{\"properties\":{\"storageToNetworkProximity\":\"T1\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"bdvibidmhmwffpl\",\"isAvailable\":false},{\"availabilityZone\":\"apckccrrvw\",\"isAvailable\":false},{\"availabilityZone\":\"oy\",\"isAvailable\":false},{\"availabilityZone\":\"haim\",\"isAvailable\":false}]},\"id\":\"oqboshbragapyyr\",\"name\":\"fsv\",\"type\":\"pavbo\"}") .toObject(RegionInfoResourceInner.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2, model.storageToNetworkProximity()); - Assertions.assertEquals("ton", model.availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertEquals(RegionStorageToNetworkProximity.T1, model.storageToNetworkProximity()); + Assertions.assertEquals("bdvibidmhmwffpl", model.availabilityZoneMappings().get(0).availabilityZone()); Assertions.assertFalse(model.availabilityZoneMappings().get(0).isAvailable()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfosListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfosListTests.java index d689292d7858..12c399150439 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfosListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfosListTests.java @@ -13,12 +13,12 @@ public final class RegionInfosListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegionInfosList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"Default\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"qyzhf\",\"isAvailable\":false},{\"availabilityZone\":\"gogczhonnxkrlgny\",\"isAvailable\":false}]},\"id\":\"sxkkg\",\"name\":\"h\",\"type\":\"rghxjb\"},{\"properties\":{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"gf\",\"isAvailable\":true}]},\"id\":\"ofbshr\",\"name\":\"svbuswdvzyy\",\"type\":\"ycnunvjsrtk\"}],\"nextLink\":\"wnopqgikyzirtx\"}") + "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"Default\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"zeh\",\"isAvailable\":false},{\"availabilityZone\":\"qhnlbqnbld\",\"isAvailable\":true},{\"availabilityZone\":\"lgsc\",\"isAvailable\":false}]},\"id\":\"mkrsrrmoucsofl\",\"name\":\"puviyfcaabe\",\"type\":\"lhbhl\"},{\"properties\":{\"storageToNetworkProximity\":\"T2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"bsxtkcudfbsfarfs\",\"isAvailable\":false}]},\"id\":\"kjxnqpvwgfstmhq\",\"name\":\"kizmdksaoafclu\",\"type\":\"v\"},{\"properties\":{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"mr\",\"isAvailable\":true},{\"availabilityZone\":\"cwwp\",\"isAvailable\":false},{\"availabilityZone\":\"w\",\"isAvailable\":false},{\"availabilityZone\":\"sxwef\",\"isAvailable\":false}]},\"id\":\"bvopwndyqle\",\"name\":\"llklmtk\",\"type\":\"lowkxxpvb\"}],\"nextLink\":\"fjmzsyzfho\"}") .toObject(RegionInfosList.class); Assertions.assertEquals(RegionStorageToNetworkProximity.DEFAULT, model.value().get(0).storageToNetworkProximity()); - Assertions.assertEquals("qyzhf", model.value().get(0).availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertEquals("zeh", model.value().get(0).availabilityZoneMappings().get(0).availabilityZone()); Assertions.assertFalse(model.value().get(0).availabilityZoneMappings().get(0).isAvailable()); - Assertions.assertEquals("wnopqgikyzirtx", model.nextLink()); + Assertions.assertEquals("fjmzsyzfho", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RemotePathTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RemotePathTests.java index 4842b06c1451..475d6e63e6dc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RemotePathTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RemotePathTests.java @@ -11,23 +11,20 @@ public final class RemotePathTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RemotePath model = BinaryData - .fromString( - "{\"externalHostName\":\"cispnqzahmgkbr\",\"serverName\":\"yydhibnuqqk\",\"volumeName\":\"ik\"}") - .toObject(RemotePath.class); - Assertions.assertEquals("cispnqzahmgkbr", model.externalHostname()); - Assertions.assertEquals("yydhibnuqqk", model.serverName()); - Assertions.assertEquals("ik", model.volumeName()); + RemotePath model + = BinaryData.fromString("{\"externalHostName\":\"krbm\",\"serverName\":\"ukgri\",\"volumeName\":\"flz\"}") + .toObject(RemotePath.class); + Assertions.assertEquals("krbm", model.externalHostname()); + Assertions.assertEquals("ukgri", model.serverName()); + Assertions.assertEquals("flz", model.volumeName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RemotePath model = new RemotePath().withExternalHostname("cispnqzahmgkbr") - .withServerName("yydhibnuqqk") - .withVolumeName("ik"); + RemotePath model = new RemotePath().withExternalHostname("krbm").withServerName("ukgri").withVolumeName("flz"); model = BinaryData.fromObject(model).toObject(RemotePath.class); - Assertions.assertEquals("cispnqzahmgkbr", model.externalHostname()); - Assertions.assertEquals("yydhibnuqqk", model.serverName()); - Assertions.assertEquals("ik", model.volumeName()); + Assertions.assertEquals("krbm", model.externalHostname()); + Assertions.assertEquals("ukgri", model.serverName()); + Assertions.assertEquals("flz", model.volumeName()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java index 3edc6bf7c4b1..63df1a9f8ee9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java @@ -14,11 +14,11 @@ public final class ReplicationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReplicationInner model = BinaryData.fromString( - "{\"replicationId\":\"dnbbglzps\",\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"cwyhzdxssa\",\"remoteVolumeRegion\":\"zmnvdfznudaod\",\"mirrorState\":\"Uninitialized\",\"replicationCreationTime\":\"2021-01-24T14:26:11Z\",\"replicationDeletionTime\":\"2021-10-12T01:30:58Z\"}") + "{\"replicationId\":\"tshhszhedp\",\"endpointType\":\"src\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"ubmwmbesld\",\"remoteVolumeRegion\":\"wwtppj\",\"mirrorState\":\"Uninitialized\",\"replicationCreationTime\":\"2021-04-04T02:55:07Z\",\"replicationDeletionTime\":\"2021-06-10T22:36:54Z\"}") .toObject(ReplicationInner.class); - Assertions.assertEquals(EndpointType.DST, model.endpointType()); - Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, model.replicationSchedule()); - Assertions.assertEquals("cwyhzdxssa", model.remoteVolumeResourceId()); - Assertions.assertEquals("zmnvdfznudaod", model.remoteVolumeRegion()); + Assertions.assertEquals(EndpointType.SRC, model.endpointType()); + Assertions.assertEquals(ReplicationSchedule.DAILY, model.replicationSchedule()); + Assertions.assertEquals("ubmwmbesld", model.remoteVolumeResourceId()); + Assertions.assertEquals("wwtppj", model.remoteVolumeRegion()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java index 7a40e31b5163..b8f48b6fc9b8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java @@ -14,30 +14,30 @@ public final class ReplicationObjectTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReplicationObject model = BinaryData.fromString( - "{\"replicationId\":\"jektcxsenh\",\"endpointType\":\"dst\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"rzpwvlqdqgbiq\",\"remotePath\":{\"externalHostName\":\"ihkaetcktvfc\",\"serverName\":\"vf\",\"volumeName\":\"nkymuctqhjfbebrj\"},\"remoteVolumeRegion\":\"erfuwuttt\",\"destinationReplications\":[{\"resourceId\":\"rbirphxe\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"ahfn\",\"zone\":\"kyqxjvuujqgidokg\"},{\"resourceId\":\"jyoxgvclt\",\"replicationType\":\"CrossZoneReplication\",\"region\":\"c\",\"zone\":\"kjeszz\"},{\"resourceId\":\"ijhtxf\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"fsm\",\"zone\":\"eh\"},{\"resourceId\":\"vecxgodebfqkk\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"ukgri\",\"zone\":\"lzlfbxzpuz\"}]}") + "{\"replicationId\":\"rzpwvlqdqgbiq\",\"endpointType\":\"dst\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"etcktvfcivfsnk\",\"remotePath\":{\"externalHostName\":\"uctqhjfbe\",\"serverName\":\"rjcxerfuwu\",\"volumeName\":\"ttxfvjr\"},\"remoteVolumeRegion\":\"rp\",\"destinationReplications\":[{\"resourceId\":\"c\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"fnljky\",\"zone\":\"j\"},{\"resourceId\":\"ujqgidok\",\"replicationType\":\"CrossZoneReplication\",\"region\":\"yoxgvcltbgsnc\",\"zone\":\"kjeszz\"},{\"resourceId\":\"ijhtxf\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"fsm\",\"zone\":\"eh\"}],\"externalReplicationSetupStatus\":\"ClusterPeerRequired\",\"externalReplicationSetupInfo\":\"cxgod\",\"mirrorState\":\"Uninitialized\",\"relationshipStatus\":\"Idle\"}") .toObject(ReplicationObject.class); Assertions.assertEquals(ReplicationSchedule.DAILY, model.replicationSchedule()); - Assertions.assertEquals("rzpwvlqdqgbiq", model.remoteVolumeResourceId()); - Assertions.assertEquals("ihkaetcktvfc", model.remotePath().externalHostname()); - Assertions.assertEquals("vf", model.remotePath().serverName()); - Assertions.assertEquals("nkymuctqhjfbebrj", model.remotePath().volumeName()); - Assertions.assertEquals("erfuwuttt", model.remoteVolumeRegion()); + Assertions.assertEquals("etcktvfcivfsnk", model.remoteVolumeResourceId()); + Assertions.assertEquals("uctqhjfbe", model.remotePath().externalHostname()); + Assertions.assertEquals("rjcxerfuwu", model.remotePath().serverName()); + Assertions.assertEquals("ttxfvjr", model.remotePath().volumeName()); + Assertions.assertEquals("rp", model.remoteVolumeRegion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ReplicationObject model = new ReplicationObject().withReplicationSchedule(ReplicationSchedule.DAILY) - .withRemoteVolumeResourceId("rzpwvlqdqgbiq") - .withRemotePath(new RemotePath().withExternalHostname("ihkaetcktvfc") - .withServerName("vf") - .withVolumeName("nkymuctqhjfbebrj")) - .withRemoteVolumeRegion("erfuwuttt"); + .withRemoteVolumeResourceId("etcktvfcivfsnk") + .withRemotePath(new RemotePath().withExternalHostname("uctqhjfbe") + .withServerName("rjcxerfuwu") + .withVolumeName("ttxfvjr")) + .withRemoteVolumeRegion("rp"); model = BinaryData.fromObject(model).toObject(ReplicationObject.class); Assertions.assertEquals(ReplicationSchedule.DAILY, model.replicationSchedule()); - Assertions.assertEquals("rzpwvlqdqgbiq", model.remoteVolumeResourceId()); - Assertions.assertEquals("ihkaetcktvfc", model.remotePath().externalHostname()); - Assertions.assertEquals("vf", model.remotePath().serverName()); - Assertions.assertEquals("nkymuctqhjfbebrj", model.remotePath().volumeName()); - Assertions.assertEquals("erfuwuttt", model.remoteVolumeRegion()); + Assertions.assertEquals("etcktvfcivfsnk", model.remoteVolumeResourceId()); + Assertions.assertEquals("uctqhjfbe", model.remotePath().externalHostname()); + Assertions.assertEquals("rjcxerfuwu", model.remotePath().serverName()); + Assertions.assertEquals("ttxfvjr", model.remotePath().volumeName()); + Assertions.assertEquals("rp", model.remoteVolumeRegion()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java index 573ef90db96a..4906f75799a8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java @@ -14,12 +14,12 @@ public final class ReplicationStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReplicationStatusInner model = BinaryData.fromString( - "{\"healthy\":true,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Uninitialized\",\"totalProgress\":\"qp\",\"errorMessage\":\"indoygmifthnzd\"}") + "{\"healthy\":false,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Uninitialized\",\"totalProgress\":\"lylpstdb\",\"errorMessage\":\"xsrz\"}") .toObject(ReplicationStatusInner.class); - Assertions.assertTrue(model.healthy()); + Assertions.assertFalse(model.healthy()); Assertions.assertEquals(VolumeReplicationRelationshipStatus.TRANSFERRING, model.relationshipStatus()); Assertions.assertEquals(MirrorState.UNINITIALIZED, model.mirrorState()); - Assertions.assertEquals("qp", model.totalProgress()); - Assertions.assertEquals("indoygmifthnzd", model.errorMessage()); + Assertions.assertEquals("lylpstdb", model.totalProgress()); + Assertions.assertEquals("xsrz", model.errorMessage()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java index 4e5cec8298cf..db18cc621f69 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java @@ -13,23 +13,23 @@ public final class ResourceNameAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceNameAvailabilityRequest model = BinaryData.fromString( - "{\"name\":\"laecxndticok\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots\",\"resourceGroup\":\"zmlqtmldgxo\"}") + "{\"name\":\"kgmnsghpxyc\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups\",\"resourceGroup\":\"drwjjkhvyom\"}") .toObject(ResourceNameAvailabilityRequest.class); - Assertions.assertEquals("laecxndticok", model.name()); + Assertions.assertEquals("kgmnsghpxyc", model.name()); Assertions.assertEquals( - CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS, model.type()); - Assertions.assertEquals("zmlqtmldgxo", model.resourceGroup()); + CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS, model.type()); + Assertions.assertEquals("drwjjkhvyom", model.resourceGroup()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceNameAvailabilityRequest model = new ResourceNameAvailabilityRequest().withName("laecxndticok") - .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS) - .withResourceGroup("zmlqtmldgxo"); + ResourceNameAvailabilityRequest model = new ResourceNameAvailabilityRequest().withName("kgmnsghpxyc") + .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS) + .withResourceGroup("drwjjkhvyom"); model = BinaryData.fromObject(model).toObject(ResourceNameAvailabilityRequest.class); - Assertions.assertEquals("laecxndticok", model.name()); + Assertions.assertEquals("kgmnsghpxyc", model.name()); Assertions.assertEquals( - CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS, model.type()); - Assertions.assertEquals("zmlqtmldgxo", model.resourceGroup()); + CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS, model.type()); + Assertions.assertEquals("drwjjkhvyom", model.resourceGroup()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SecretPasswordIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SecretPasswordIdentityTests.java new file mode 100644 index 000000000000..21e474f2472e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SecretPasswordIdentityTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.SecretPasswordIdentity; +import org.junit.jupiter.api.Assertions; + +public final class SecretPasswordIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SecretPasswordIdentity model + = BinaryData.fromString("{\"principalId\":\"uwkffdjktsysid\",\"userAssignedIdentity\":\"c\"}") + .toObject(SecretPasswordIdentity.class); + Assertions.assertEquals("c", model.userAssignedIdentity()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SecretPasswordIdentity model = new SecretPasswordIdentity().withUserAssignedIdentity("c"); + model = BinaryData.fromObject(model).toObject(SecretPasswordIdentity.class); + Assertions.assertEquals("c", model.userAssignedIdentity()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SmbSettingsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SmbSettingsTests.java new file mode 100644 index 000000000000..c37aeca37e64 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SmbSettingsTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; +import com.azure.resourcemanager.netapp.models.SmbEncryptionState; +import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; +import com.azure.resourcemanager.netapp.models.SmbSettings; +import org.junit.jupiter.api.Assertions; + +public final class SmbSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SmbSettings model = BinaryData.fromString( + "{\"smbEncryption\":\"Enabled\",\"smbAccessBasedEnumerations\":\"Disabled\",\"smbNonBrowsable\":\"Disabled\"}") + .toObject(SmbSettings.class); + Assertions.assertEquals(SmbEncryptionState.ENABLED, model.smbEncryption()); + Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumerations()); + Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SmbSettings model = new SmbSettings().withSmbEncryption(SmbEncryptionState.ENABLED) + .withSmbAccessBasedEnumerations(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED); + model = BinaryData.fromObject(model).toObject(SmbSettings.class); + Assertions.assertEquals(SmbEncryptionState.ENABLED, model.smbEncryption()); + Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumerations()); + Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java index 0a4ad36b182a..76a91d5d672d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java @@ -12,15 +12,15 @@ public final class SnapshotInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotInner model = BinaryData.fromString( - "{\"properties\":{\"snapshotId\":\"mbes\",\"created\":\"2021-02-14T02:40:27Z\",\"provisioningState\":\"wwtppj\"},\"location\":\"lcxog\",\"id\":\"konzmnsik\",\"name\":\"mkqzeqqkdltfzxmh\",\"type\":\"v\"}") + "{\"properties\":{\"snapshotId\":\"ozfikdowwq\",\"created\":\"2021-11-16T12:15:10Z\",\"provisioningState\":\"zx\"},\"location\":\"lvithhqzonosgg\",\"id\":\"c\",\"name\":\"hfwdsjnkaljutiis\",\"type\":\"acffgdkzzewkfvhq\"}") .toObject(SnapshotInner.class); - Assertions.assertEquals("lcxog", model.location()); + Assertions.assertEquals("lvithhqzonosgg", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotInner model = new SnapshotInner().withLocation("lcxog"); + SnapshotInner model = new SnapshotInner().withLocation("lvithhqzonosgg"); model = BinaryData.fromObject(model).toObject(SnapshotInner.class); - Assertions.assertEquals("lcxog", model.location()); + Assertions.assertEquals("lvithhqzonosgg", model.location()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java index 1acd07e1fc7f..d42ad893093f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java @@ -27,7 +27,7 @@ public final class SnapshotPoliciesCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":139843072,\"minute\":184999250,\"usedBytes\":671480520917844064},\"dailySchedule\":{\"snapshotsToKeep\":1286205076,\"hour\":1685347257,\"minute\":1978421071,\"usedBytes\":5949517522965784982},\"weeklySchedule\":{\"snapshotsToKeep\":521658697,\"day\":\"sehaohdjhhflzok\",\"hour\":434777672,\"minute\":94741475,\"usedBytes\":947940587713808603},\"monthlySchedule\":{\"snapshotsToKeep\":699384305,\"daysOfMonth\":\"gltsxoat\",\"hour\":184618447,\"minute\":1097989023,\"usedBytes\":6123043499529132871},\"enabled\":true,\"provisioningState\":\"e\"},\"etag\":\"occsr\",\"location\":\"zihmipgawtxxpky\",\"tags\":{\"pcycilrmcaykg\":\"cjxgrytf\",\"pndfcpfnznt\":\"noxuztrksx\",\"xuzvoamktcqi\":\"jtwkjaos\",\"rtltla\":\"smgbzahgxqdl\"},\"id\":\"rltzkatbhjmz\",\"name\":\"nbsoqeqalarv\",\"type\":\"agunbtgfebw\"}"; + = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":714277208,\"minute\":622272508,\"usedBytes\":2403994955777432154},\"dailySchedule\":{\"snapshotsToKeep\":564386734,\"hour\":1267237600,\"minute\":1625638430,\"usedBytes\":207550429091909014},\"weeklySchedule\":{\"snapshotsToKeep\":24741758,\"day\":\"elqkaadlkn\",\"hour\":1051135474,\"minute\":367362868,\"usedBytes\":3729881925907988469},\"monthlySchedule\":{\"snapshotsToKeep\":1473891126,\"daysOfMonth\":\"xivcnrlyxnu\",\"hour\":1798343745,\"minute\":1007156651,\"usedBytes\":4412368381761510262},\"enabled\":false,\"provisioningState\":\"atv\"},\"etag\":\"sdtcjbctvivuzqym\",\"location\":\"owog\",\"tags\":{\"zndscxmxeatkdbmw\":\"tsqhzvbrzcdban\"},\"id\":\"rdjyibqb\",\"name\":\"aomhjrmkuhmaxl\",\"type\":\"alfihcjmobcancd\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,50 +37,50 @@ public void testCreateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SnapshotPolicy response = manager.snapshotPolicies() - .define("yinljqe") - .withRegion("tbxqmuluxlxq") - .withExistingNetAppAccount("mxswvruunzz", "gehkfkimrtixokff") - .withTags(mapOf("ycucrwnamikzeb", "ers", "ziqgfuh", "qbsms")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(400692388) - .withMinute(117552544) - .withUsedBytes(4999588293339147648L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(927727255) - .withHour(171287650) - .withMinute(2112276373) - .withUsedBytes(8975179932311001443L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1153037194) - .withDay("du") - .withHour(1806892496) - .withMinute(667519337) - .withUsedBytes(3451295234524077317L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1949096000) - .withDaysOfMonth("b") - .withHour(1840305152) - .withMinute(1547135133) - .withUsedBytes(8260240583130824742L)) + .define("pxgzdyimsfayor") + .withRegion("maupxvpi") + .withExistingNetAppAccount("mevuafpwzy", "frkgwltxeq") + .withTags(mapOf("l", "aifyzyzeyuubeids")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(450350421) + .withMinute(2060156121) + .withUsedBytes(1995086181838707776L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1435976070) + .withHour(1686367778) + .withMinute(1716765996) + .withUsedBytes(290033450377892729L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(513653819) + .withDay("aekqsykvwj") + .withHour(2097396893) + .withMinute(1546006196) + .withUsedBytes(5248553620424406152L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1972305206) + .withDaysOfMonth("rspxklur") + .withHour(617853812) + .withMinute(1958943934) + .withUsedBytes(6367262895956775037L)) .withEnabled(true) .create(); - Assertions.assertEquals("zihmipgawtxxpky", response.location()); - Assertions.assertEquals("cjxgrytf", response.tags().get("pcycilrmcaykg")); - Assertions.assertEquals(139843072, response.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(184999250, response.hourlySchedule().minute()); - Assertions.assertEquals(671480520917844064L, response.hourlySchedule().usedBytes()); - Assertions.assertEquals(1286205076, response.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1685347257, response.dailySchedule().hour()); - Assertions.assertEquals(1978421071, response.dailySchedule().minute()); - Assertions.assertEquals(5949517522965784982L, response.dailySchedule().usedBytes()); - Assertions.assertEquals(521658697, response.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("sehaohdjhhflzok", response.weeklySchedule().day()); - Assertions.assertEquals(434777672, response.weeklySchedule().hour()); - Assertions.assertEquals(94741475, response.weeklySchedule().minute()); - Assertions.assertEquals(947940587713808603L, response.weeklySchedule().usedBytes()); - Assertions.assertEquals(699384305, response.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("gltsxoat", response.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(184618447, response.monthlySchedule().hour()); - Assertions.assertEquals(1097989023, response.monthlySchedule().minute()); - Assertions.assertEquals(6123043499529132871L, response.monthlySchedule().usedBytes()); - Assertions.assertTrue(response.enabled()); + Assertions.assertEquals("owog", response.location()); + Assertions.assertEquals("tsqhzvbrzcdban", response.tags().get("zndscxmxeatkdbmw")); + Assertions.assertEquals(714277208, response.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(622272508, response.hourlySchedule().minute()); + Assertions.assertEquals(2403994955777432154L, response.hourlySchedule().usedBytes()); + Assertions.assertEquals(564386734, response.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1267237600, response.dailySchedule().hour()); + Assertions.assertEquals(1625638430, response.dailySchedule().minute()); + Assertions.assertEquals(207550429091909014L, response.dailySchedule().usedBytes()); + Assertions.assertEquals(24741758, response.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("elqkaadlkn", response.weeklySchedule().day()); + Assertions.assertEquals(1051135474, response.weeklySchedule().hour()); + Assertions.assertEquals(367362868, response.weeklySchedule().minute()); + Assertions.assertEquals(3729881925907988469L, response.weeklySchedule().usedBytes()); + Assertions.assertEquals(1473891126, response.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("xivcnrlyxnu", response.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1798343745, response.monthlySchedule().hour()); + Assertions.assertEquals(1007156651, response.monthlySchedule().minute()); + Assertions.assertEquals(4412368381761510262L, response.monthlySchedule().usedBytes()); + Assertions.assertFalse(response.enabled()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java index c43c7b3bf24d..3123f44cfeb5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.snapshotPolicies().delete("m", "dmspof", "pv", com.azure.core.util.Context.NONE); + manager.snapshotPolicies().delete("jb", "xjeaoqaqbzgyh", "w", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java index f62e1920429d..5b6bbc82c4ce 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class SnapshotPoliciesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":122939434,\"minute\":107099927,\"usedBytes\":284285859613384184},\"dailySchedule\":{\"snapshotsToKeep\":1504701395,\"hour\":494637597,\"minute\":1759230509,\"usedBytes\":3362274562531904097},\"weeklySchedule\":{\"snapshotsToKeep\":669649169,\"day\":\"xmvwfg\",\"hour\":1895835136,\"minute\":414360047,\"usedBytes\":4367486194556700788},\"monthlySchedule\":{\"snapshotsToKeep\":1417437720,\"daysOfMonth\":\"lzqnhcvs\",\"hour\":1417564823,\"minute\":1936009218,\"usedBytes\":2855783179854311369},\"enabled\":false,\"provisioningState\":\"gnxf\"},\"etag\":\"onmpqoxwdof\",\"location\":\"xiqxeiiqbimh\",\"tags\":{\"vwbcblembnkbwv\":\"winhehfqpo\",\"uwfmduragegizvc\":\"vxkdivqihebwtswb\"},\"id\":\"felisdjub\",\"name\":\"gbqi\",\"type\":\"kxkbsazgakgacyr\"}"; + = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1672875845,\"minute\":1764547970,\"usedBytes\":4382532019057936776},\"dailySchedule\":{\"snapshotsToKeep\":1188527137,\"hour\":915705696,\"minute\":206743911,\"usedBytes\":8062040036037126303},\"weeklySchedule\":{\"snapshotsToKeep\":222537578,\"day\":\"syhzlwx\",\"hour\":1732227521,\"minute\":1277865813,\"usedBytes\":399098464049615690},\"monthlySchedule\":{\"snapshotsToKeep\":1504170570,\"daysOfMonth\":\"sbdweaderzmwnt\",\"hour\":1329621883,\"minute\":2094320372,\"usedBytes\":6613131527266315501},\"enabled\":true,\"provisioningState\":\"goaqylkjztj\"},\"etag\":\"azjcgmxitpfin\",\"location\":\"pdltkrlg\",\"tags\":{\"vcqguefzh\":\"bd\",\"lyujlfyoump\":\"mpheqdur\",\"brzmqxucycijoclx\":\"kyeclcdigpta\"},\"id\":\"utgjcyz\",\"name\":\"zjd\",\"type\":\"r\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,28 +31,28 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SnapshotPolicy response = manager.snapshotPolicies() - .getWithResponse("aivmxyasflvgs", "zwywako", "hknsmjbl", com.azure.core.util.Context.NONE) + .getWithResponse("urnpnuhzafccnuh", "i", "byl", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xiqxeiiqbimh", response.location()); - Assertions.assertEquals("winhehfqpo", response.tags().get("vwbcblembnkbwv")); - Assertions.assertEquals(122939434, response.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(107099927, response.hourlySchedule().minute()); - Assertions.assertEquals(284285859613384184L, response.hourlySchedule().usedBytes()); - Assertions.assertEquals(1504701395, response.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(494637597, response.dailySchedule().hour()); - Assertions.assertEquals(1759230509, response.dailySchedule().minute()); - Assertions.assertEquals(3362274562531904097L, response.dailySchedule().usedBytes()); - Assertions.assertEquals(669649169, response.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("xmvwfg", response.weeklySchedule().day()); - Assertions.assertEquals(1895835136, response.weeklySchedule().hour()); - Assertions.assertEquals(414360047, response.weeklySchedule().minute()); - Assertions.assertEquals(4367486194556700788L, response.weeklySchedule().usedBytes()); - Assertions.assertEquals(1417437720, response.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("lzqnhcvs", response.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1417564823, response.monthlySchedule().hour()); - Assertions.assertEquals(1936009218, response.monthlySchedule().minute()); - Assertions.assertEquals(2855783179854311369L, response.monthlySchedule().usedBytes()); - Assertions.assertFalse(response.enabled()); + Assertions.assertEquals("pdltkrlg", response.location()); + Assertions.assertEquals("bd", response.tags().get("vcqguefzh")); + Assertions.assertEquals(1672875845, response.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1764547970, response.hourlySchedule().minute()); + Assertions.assertEquals(4382532019057936776L, response.hourlySchedule().usedBytes()); + Assertions.assertEquals(1188527137, response.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(915705696, response.dailySchedule().hour()); + Assertions.assertEquals(206743911, response.dailySchedule().minute()); + Assertions.assertEquals(8062040036037126303L, response.dailySchedule().usedBytes()); + Assertions.assertEquals(222537578, response.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("syhzlwx", response.weeklySchedule().day()); + Assertions.assertEquals(1732227521, response.weeklySchedule().hour()); + Assertions.assertEquals(1277865813, response.weeklySchedule().minute()); + Assertions.assertEquals(399098464049615690L, response.weeklySchedule().usedBytes()); + Assertions.assertEquals(1504170570, response.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("sbdweaderzmwnt", response.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1329621883, response.monthlySchedule().hour()); + Assertions.assertEquals(2094320372, response.monthlySchedule().minute()); + Assertions.assertEquals(6613131527266315501L, response.monthlySchedule().usedBytes()); + Assertions.assertTrue(response.enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java index fcbf91f0d1e5..99011eb4802e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java @@ -22,7 +22,7 @@ public final class SnapshotPoliciesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":162758827,\"minute\":1553181859,\"usedBytes\":9014985599249156768},\"dailySchedule\":{\"snapshotsToKeep\":2051570067,\"hour\":1363158856,\"minute\":140033236,\"usedBytes\":6172562275136277207},\"weeklySchedule\":{\"snapshotsToKeep\":1720434943,\"day\":\"ibmikostbzb\",\"hour\":1151685721,\"minute\":775922838,\"usedBytes\":201396794516817899},\"monthlySchedule\":{\"snapshotsToKeep\":1310458507,\"daysOfMonth\":\"fy\",\"hour\":200835193,\"minute\":362710224,\"usedBytes\":8706735414371355551},\"enabled\":false,\"provisioningState\":\"ezzcez\"},\"etag\":\"fwyfwlwxjwet\",\"location\":\"sihclafzvaylp\",\"tags\":{\"mwqkchcxwaxf\":\"qqwzt\"},\"id\":\"w\",\"name\":\"jkjexf\",\"type\":\"eqvhpsylkk\"}]}"; + = "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":869743096,\"minute\":235713184,\"usedBytes\":5798834273726815282},\"dailySchedule\":{\"snapshotsToKeep\":501482624,\"hour\":23215841,\"minute\":1419691,\"usedBytes\":2849565274995751402},\"weeklySchedule\":{\"snapshotsToKeep\":601850943,\"day\":\"wbormcqmi\",\"hour\":1617268424,\"minute\":1772197279,\"usedBytes\":6303018001687291973},\"monthlySchedule\":{\"snapshotsToKeep\":1276736582,\"daysOfMonth\":\"xjmcsmyqwixvcpw\",\"hour\":517976128,\"minute\":1321154301,\"usedBytes\":6290615994078463009},\"enabled\":true,\"provisioningState\":\"ickduoiqta\"},\"etag\":\"yvsk\",\"location\":\"rwzawnvs\",\"tags\":{\"zregzgyufutrwpw\":\"hzagxnvhycvdimw\",\"meottawj\":\"ryekzkd\"},\"id\":\"osxw\",\"name\":\"hnhjtfvpndpmi\",\"type\":\"jpnwynudql\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,27 +32,27 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<SnapshotPolicy> response - = manager.snapshotPolicies().list("hryl", "iofrzgbzjedmstk", com.azure.core.util.Context.NONE); + = manager.snapshotPolicies().list("v", "atbwbqam", com.azure.core.util.Context.NONE); - Assertions.assertEquals("sihclafzvaylp", response.iterator().next().location()); - Assertions.assertEquals("qqwzt", response.iterator().next().tags().get("mwqkchcxwaxf")); - Assertions.assertEquals(162758827, response.iterator().next().hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1553181859, response.iterator().next().hourlySchedule().minute()); - Assertions.assertEquals(9014985599249156768L, response.iterator().next().hourlySchedule().usedBytes()); - Assertions.assertEquals(2051570067, response.iterator().next().dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1363158856, response.iterator().next().dailySchedule().hour()); - Assertions.assertEquals(140033236, response.iterator().next().dailySchedule().minute()); - Assertions.assertEquals(6172562275136277207L, response.iterator().next().dailySchedule().usedBytes()); - Assertions.assertEquals(1720434943, response.iterator().next().weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("ibmikostbzb", response.iterator().next().weeklySchedule().day()); - Assertions.assertEquals(1151685721, response.iterator().next().weeklySchedule().hour()); - Assertions.assertEquals(775922838, response.iterator().next().weeklySchedule().minute()); - Assertions.assertEquals(201396794516817899L, response.iterator().next().weeklySchedule().usedBytes()); - Assertions.assertEquals(1310458507, response.iterator().next().monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("fy", response.iterator().next().monthlySchedule().daysOfMonth()); - Assertions.assertEquals(200835193, response.iterator().next().monthlySchedule().hour()); - Assertions.assertEquals(362710224, response.iterator().next().monthlySchedule().minute()); - Assertions.assertEquals(8706735414371355551L, response.iterator().next().monthlySchedule().usedBytes()); - Assertions.assertFalse(response.iterator().next().enabled()); + Assertions.assertEquals("rwzawnvs", response.iterator().next().location()); + Assertions.assertEquals("hzagxnvhycvdimw", response.iterator().next().tags().get("zregzgyufutrwpw")); + Assertions.assertEquals(869743096, response.iterator().next().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(235713184, response.iterator().next().hourlySchedule().minute()); + Assertions.assertEquals(5798834273726815282L, response.iterator().next().hourlySchedule().usedBytes()); + Assertions.assertEquals(501482624, response.iterator().next().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(23215841, response.iterator().next().dailySchedule().hour()); + Assertions.assertEquals(1419691, response.iterator().next().dailySchedule().minute()); + Assertions.assertEquals(2849565274995751402L, response.iterator().next().dailySchedule().usedBytes()); + Assertions.assertEquals(601850943, response.iterator().next().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("wbormcqmi", response.iterator().next().weeklySchedule().day()); + Assertions.assertEquals(1617268424, response.iterator().next().weeklySchedule().hour()); + Assertions.assertEquals(1772197279, response.iterator().next().weeklySchedule().minute()); + Assertions.assertEquals(6303018001687291973L, response.iterator().next().weeklySchedule().usedBytes()); + Assertions.assertEquals(1276736582, response.iterator().next().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("xjmcsmyqwixvcpw", response.iterator().next().monthlySchedule().daysOfMonth()); + Assertions.assertEquals(517976128, response.iterator().next().monthlySchedule().hour()); + Assertions.assertEquals(1321154301, response.iterator().next().monthlySchedule().minute()); + Assertions.assertEquals(6290615994078463009L, response.iterator().next().monthlySchedule().usedBytes()); + Assertions.assertTrue(response.iterator().next().enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java index 377a26ca1754..b34c46f1de35 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java @@ -12,28 +12,28 @@ public final class SnapshotPoliciesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotPoliciesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1525827841,\"minute\":984158144,\"usedBytes\":8989578588874797078},\"dailySchedule\":{\"snapshotsToKeep\":1343129600,\"hour\":533630159,\"minute\":761467477,\"usedBytes\":6830630218833714201},\"weeklySchedule\":{\"snapshotsToKeep\":1512461872,\"day\":\"qiiobyuqer\",\"hour\":270206644,\"minute\":2131221175,\"usedBytes\":5523285325646920804},\"monthlySchedule\":{\"snapshotsToKeep\":1945025825,\"daysOfMonth\":\"bdbutauvf\",\"hour\":1152975758,\"minute\":468710648,\"usedBytes\":436852010695338274},\"enabled\":true,\"provisioningState\":\"ojoxafnndlp\"},\"etag\":\"hkoymkcdyhbp\",\"location\":\"pwdreqnovvqf\",\"tags\":{\"rsndsytgadgvra\":\"jxywsuws\",\"uu\":\"aeneqnzarrwl\"},\"id\":\"jfqka\",\"name\":\"e\",\"type\":\"iipfpubj\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1113434704,\"minute\":254804801,\"usedBytes\":6753222489346190909},\"dailySchedule\":{\"snapshotsToKeep\":1368625669,\"hour\":2128432962,\"minute\":1615767806,\"usedBytes\":2110068594447415749},\"weeklySchedule\":{\"snapshotsToKeep\":1931540064,\"day\":\"nynfsynljphuo\",\"hour\":415163187,\"minute\":951463794,\"usedBytes\":3252607462843621148},\"monthlySchedule\":{\"snapshotsToKeep\":1759738487,\"daysOfMonth\":\"zihleosjswsr\",\"hour\":2109654936,\"minute\":1326847440,\"usedBytes\":6943996810549393659},\"enabled\":false,\"provisioningState\":\"ckqqzqioxiysui\"},\"etag\":\"ynkedyatrwyhqmib\",\"location\":\"hwit\",\"tags\":{\"pcdpumnz\":\"pyy\",\"abikns\":\"mwzn\",\"dtlwwrlkd\":\"rgjhxb\",\"lxdy\":\"tncvokot\"},\"id\":\"gsyocogj\",\"name\":\"tdtbnnhadooc\",\"type\":\"kvci\"}],\"nextLink\":\"nvpamq\"}") + "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1326847440,\"minute\":1616775247,\"usedBytes\":2883275669882488195},\"dailySchedule\":{\"snapshotsToKeep\":922265533,\"hour\":1433491809,\"minute\":1237691415,\"usedBytes\":1485781333279221800},\"weeklySchedule\":{\"snapshotsToKeep\":1168629825,\"day\":\"iizynkedyatrwyh\",\"hour\":963712309,\"minute\":556092423,\"usedBytes\":3831030822063036154},\"monthlySchedule\":{\"snapshotsToKeep\":159300714,\"daysOfMonth\":\"ypyynpcdpumnzg\",\"hour\":83591449,\"minute\":1443914942,\"usedBytes\":6753075814486696287},\"enabled\":true,\"provisioningState\":\"orgjhxbldt\"},\"etag\":\"wrlkdmtn\",\"location\":\"ok\",\"tags\":{\"gsyocogj\":\"lxdy\",\"kvci\":\"tdtbnnhadooc\"},\"id\":\"hnvpamqgxq\",\"name\":\"u\",\"type\":\"zikywgg\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":798268380,\"minute\":1927044883,\"usedBytes\":3546472897541130769},\"dailySchedule\":{\"snapshotsToKeep\":142716776,\"hour\":908050565,\"minute\":555730544,\"usedBytes\":5147167923805665994},\"weeklySchedule\":{\"snapshotsToKeep\":1929078891,\"day\":\"gvvcnayrhyr\",\"hour\":1580005747,\"minute\":385897981,\"usedBytes\":4856871253065990581},\"monthlySchedule\":{\"snapshotsToKeep\":877361195,\"daysOfMonth\":\"v\",\"hour\":928139019,\"minute\":1199547484,\"usedBytes\":8818442989358220619},\"enabled\":true,\"provisioningState\":\"lmfmtdaay\"},\"etag\":\"v\",\"location\":\"gpiohgwxrtfudxe\",\"tags\":{\"pkukghi\":\"yqagvrvm\",\"wi\":\"dblx\",\"rey\":\"fnjhfjxwmszkkfo\",\"elpcirelsfeaenwa\":\"kzikfjawneaivxwc\"},\"id\":\"fatkld\",\"name\":\"xbjhwuaanozjosph\",\"type\":\"oulpjrv\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":114988444,\"minute\":1846305847,\"usedBytes\":9109732338673548989},\"dailySchedule\":{\"snapshotsToKeep\":1951928736,\"hour\":357706125,\"minute\":559166654,\"usedBytes\":6069894619608430777},\"weeklySchedule\":{\"snapshotsToKeep\":1365275067,\"day\":\"tq\",\"hour\":1686364184,\"minute\":2056764824,\"usedBytes\":1480057858076827624},\"monthlySchedule\":{\"snapshotsToKeep\":885439585,\"daysOfMonth\":\"ly\",\"hour\":1943663819,\"minute\":1081755723,\"usedBytes\":2422688696917876077},\"enabled\":true,\"provisioningState\":\"unygaeqid\"},\"etag\":\"fatpxllrxcyjmoa\",\"location\":\"uvarmywdmjsjq\",\"tags\":{\"kgymareqnajxqug\":\"hyxxrwlycoduhpk\",\"ubeddg\":\"hky\"},\"id\":\"sofwqmzqalkrmnji\",\"name\":\"pxacqqudfn\",\"type\":\"yxbaaabjyvayf\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":936751244,\"minute\":1942204263,\"usedBytes\":4327719867716518141},\"dailySchedule\":{\"snapshotsToKeep\":1575788840,\"hour\":605445397,\"minute\":1754113707,\"usedBytes\":9125066610031127083},\"weeklySchedule\":{\"snapshotsToKeep\":2105512839,\"day\":\"wmewzsyy\",\"hour\":1091496648,\"minute\":723426938,\"usedBytes\":893213064865433061},\"monthlySchedule\":{\"snapshotsToKeep\":2135802257,\"daysOfMonth\":\"frxtrthzvaytdwk\",\"hour\":1322383691,\"minute\":1729344688,\"usedBytes\":4145471517526414946},\"enabled\":false,\"provisioningState\":\"xiilivpdtiirqt\"},\"etag\":\"oaxoruzfgsqu\",\"location\":\"xrxxlep\",\"tags\":{\"wxuqlcvydypatdoo\":\"mxjezwlw\",\"kooebwnu\":\"ojknio\",\"vdkcrodtj\":\"hemms\"},\"id\":\"nfwjlfltkacjvefk\",\"name\":\"lfoakg\",\"type\":\"kfpagao\"}],\"nextLink\":\"ulpqblylsyxkqjn\"}") .toObject(SnapshotPoliciesList.class); - Assertions.assertEquals("pwdreqnovvqf", model.value().get(0).location()); - Assertions.assertEquals("jxywsuws", model.value().get(0).tags().get("rsndsytgadgvra")); - Assertions.assertEquals(1525827841, model.value().get(0).hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(984158144, model.value().get(0).hourlySchedule().minute()); - Assertions.assertEquals(8989578588874797078L, model.value().get(0).hourlySchedule().usedBytes()); - Assertions.assertEquals(1343129600, model.value().get(0).dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(533630159, model.value().get(0).dailySchedule().hour()); - Assertions.assertEquals(761467477, model.value().get(0).dailySchedule().minute()); - Assertions.assertEquals(6830630218833714201L, model.value().get(0).dailySchedule().usedBytes()); - Assertions.assertEquals(1512461872, model.value().get(0).weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("qiiobyuqer", model.value().get(0).weeklySchedule().day()); - Assertions.assertEquals(270206644, model.value().get(0).weeklySchedule().hour()); - Assertions.assertEquals(2131221175, model.value().get(0).weeklySchedule().minute()); - Assertions.assertEquals(5523285325646920804L, model.value().get(0).weeklySchedule().usedBytes()); - Assertions.assertEquals(1945025825, model.value().get(0).monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("bdbutauvf", model.value().get(0).monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1152975758, model.value().get(0).monthlySchedule().hour()); - Assertions.assertEquals(468710648, model.value().get(0).monthlySchedule().minute()); - Assertions.assertEquals(436852010695338274L, model.value().get(0).monthlySchedule().usedBytes()); + Assertions.assertEquals("ok", model.value().get(0).location()); + Assertions.assertEquals("lxdy", model.value().get(0).tags().get("gsyocogj")); + Assertions.assertEquals(1326847440, model.value().get(0).hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1616775247, model.value().get(0).hourlySchedule().minute()); + Assertions.assertEquals(2883275669882488195L, model.value().get(0).hourlySchedule().usedBytes()); + Assertions.assertEquals(922265533, model.value().get(0).dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1433491809, model.value().get(0).dailySchedule().hour()); + Assertions.assertEquals(1237691415, model.value().get(0).dailySchedule().minute()); + Assertions.assertEquals(1485781333279221800L, model.value().get(0).dailySchedule().usedBytes()); + Assertions.assertEquals(1168629825, model.value().get(0).weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("iizynkedyatrwyh", model.value().get(0).weeklySchedule().day()); + Assertions.assertEquals(963712309, model.value().get(0).weeklySchedule().hour()); + Assertions.assertEquals(556092423, model.value().get(0).weeklySchedule().minute()); + Assertions.assertEquals(3831030822063036154L, model.value().get(0).weeklySchedule().usedBytes()); + Assertions.assertEquals(159300714, model.value().get(0).monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("ypyynpcdpumnzg", model.value().get(0).monthlySchedule().daysOfMonth()); + Assertions.assertEquals(83591449, model.value().get(0).monthlySchedule().hour()); + Assertions.assertEquals(1443914942, model.value().get(0).monthlySchedule().minute()); + Assertions.assertEquals(6753075814486696287L, model.value().get(0).monthlySchedule().usedBytes()); Assertions.assertTrue(model.value().get(0).enabled()); - Assertions.assertEquals("nvpamq", model.nextLink()); + Assertions.assertEquals("ulpqblylsyxkqjn", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java index bca83d9d7fe3..b8ff67dbb495 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java @@ -18,73 +18,73 @@ public final class SnapshotPolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotPolicyInner model = BinaryData.fromString( - "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1036395530,\"minute\":834040298,\"usedBytes\":1971349718738257268},\"dailySchedule\":{\"snapshotsToKeep\":571890155,\"hour\":2019789161,\"minute\":314213768,\"usedBytes\":1796224915838134100},\"weeklySchedule\":{\"snapshotsToKeep\":369872117,\"day\":\"owwquuvxz\",\"hour\":1447033048,\"minute\":2116821034,\"usedBytes\":2045084080849688226},\"monthlySchedule\":{\"snapshotsToKeep\":176578322,\"daysOfMonth\":\"osggbhc\",\"hour\":1150860999,\"minute\":1492751876,\"usedBytes\":8361434893170853179},\"enabled\":true,\"provisioningState\":\"jutiiswacff\"},\"etag\":\"k\",\"location\":\"ewkfvhqcrai\",\"tags\":{\"pfuflrw\":\"n\",\"lxyjr\":\"mh\"},\"id\":\"sag\",\"name\":\"fcnihgwq\",\"type\":\"pnedgf\"}") + "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1288756278,\"minute\":1216827134,\"usedBytes\":7141166949546611504},\"dailySchedule\":{\"snapshotsToKeep\":22897042,\"hour\":192759077,\"minute\":1120299710,\"usedBytes\":4031326214587068225},\"weeklySchedule\":{\"snapshotsToKeep\":1662588727,\"day\":\"yzvqt\",\"hour\":876098210,\"minute\":1500004458,\"usedBytes\":3901581715856749689},\"monthlySchedule\":{\"snapshotsToKeep\":1254452597,\"daysOfMonth\":\"ondjmq\",\"hour\":1083170526,\"minute\":1371154692,\"usedBytes\":1404344423312280860},\"enabled\":false,\"provisioningState\":\"kwhojvpaj\"},\"etag\":\"xysmoc\",\"location\":\"qfqvmkc\",\"tags\":{\"tddckcb\":\"apvhelxprgly\",\"qibrhosxsdqrhzoy\":\"uejrjxgc\"},\"id\":\"i\",\"name\":\"m\",\"type\":\"qyib\"}") .toObject(SnapshotPolicyInner.class); - Assertions.assertEquals("ewkfvhqcrai", model.location()); - Assertions.assertEquals("n", model.tags().get("pfuflrw")); - Assertions.assertEquals(1036395530, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(834040298, model.hourlySchedule().minute()); - Assertions.assertEquals(1971349718738257268L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(571890155, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(2019789161, model.dailySchedule().hour()); - Assertions.assertEquals(314213768, model.dailySchedule().minute()); - Assertions.assertEquals(1796224915838134100L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(369872117, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("owwquuvxz", model.weeklySchedule().day()); - Assertions.assertEquals(1447033048, model.weeklySchedule().hour()); - Assertions.assertEquals(2116821034, model.weeklySchedule().minute()); - Assertions.assertEquals(2045084080849688226L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(176578322, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("osggbhc", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1150860999, model.monthlySchedule().hour()); - Assertions.assertEquals(1492751876, model.monthlySchedule().minute()); - Assertions.assertEquals(8361434893170853179L, model.monthlySchedule().usedBytes()); - Assertions.assertTrue(model.enabled()); + Assertions.assertEquals("qfqvmkc", model.location()); + Assertions.assertEquals("apvhelxprgly", model.tags().get("tddckcb")); + Assertions.assertEquals(1288756278, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1216827134, model.hourlySchedule().minute()); + Assertions.assertEquals(7141166949546611504L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(22897042, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(192759077, model.dailySchedule().hour()); + Assertions.assertEquals(1120299710, model.dailySchedule().minute()); + Assertions.assertEquals(4031326214587068225L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(1662588727, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("yzvqt", model.weeklySchedule().day()); + Assertions.assertEquals(876098210, model.weeklySchedule().hour()); + Assertions.assertEquals(1500004458, model.weeklySchedule().minute()); + Assertions.assertEquals(3901581715856749689L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(1254452597, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("ondjmq", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1083170526, model.monthlySchedule().hour()); + Assertions.assertEquals(1371154692, model.monthlySchedule().minute()); + Assertions.assertEquals(1404344423312280860L, model.monthlySchedule().usedBytes()); + Assertions.assertFalse(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotPolicyInner model = new SnapshotPolicyInner().withLocation("ewkfvhqcrai") - .withTags(mapOf("pfuflrw", "n", "lxyjr", "mh")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1036395530) - .withMinute(834040298) - .withUsedBytes(1971349718738257268L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(571890155) - .withHour(2019789161) - .withMinute(314213768) - .withUsedBytes(1796224915838134100L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(369872117) - .withDay("owwquuvxz") - .withHour(1447033048) - .withMinute(2116821034) - .withUsedBytes(2045084080849688226L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(176578322) - .withDaysOfMonth("osggbhc") - .withHour(1150860999) - .withMinute(1492751876) - .withUsedBytes(8361434893170853179L)) - .withEnabled(true); + SnapshotPolicyInner model = new SnapshotPolicyInner().withLocation("qfqvmkc") + .withTags(mapOf("tddckcb", "apvhelxprgly", "qibrhosxsdqrhzoy", "uejrjxgc")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1288756278) + .withMinute(1216827134) + .withUsedBytes(7141166949546611504L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(22897042) + .withHour(192759077) + .withMinute(1120299710) + .withUsedBytes(4031326214587068225L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1662588727) + .withDay("yzvqt") + .withHour(876098210) + .withMinute(1500004458) + .withUsedBytes(3901581715856749689L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1254452597) + .withDaysOfMonth("ondjmq") + .withHour(1083170526) + .withMinute(1371154692) + .withUsedBytes(1404344423312280860L)) + .withEnabled(false); model = BinaryData.fromObject(model).toObject(SnapshotPolicyInner.class); - Assertions.assertEquals("ewkfvhqcrai", model.location()); - Assertions.assertEquals("n", model.tags().get("pfuflrw")); - Assertions.assertEquals(1036395530, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(834040298, model.hourlySchedule().minute()); - Assertions.assertEquals(1971349718738257268L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(571890155, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(2019789161, model.dailySchedule().hour()); - Assertions.assertEquals(314213768, model.dailySchedule().minute()); - Assertions.assertEquals(1796224915838134100L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(369872117, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("owwquuvxz", model.weeklySchedule().day()); - Assertions.assertEquals(1447033048, model.weeklySchedule().hour()); - Assertions.assertEquals(2116821034, model.weeklySchedule().minute()); - Assertions.assertEquals(2045084080849688226L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(176578322, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("osggbhc", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1150860999, model.monthlySchedule().hour()); - Assertions.assertEquals(1492751876, model.monthlySchedule().minute()); - Assertions.assertEquals(8361434893170853179L, model.monthlySchedule().usedBytes()); - Assertions.assertTrue(model.enabled()); + Assertions.assertEquals("qfqvmkc", model.location()); + Assertions.assertEquals("apvhelxprgly", model.tags().get("tddckcb")); + Assertions.assertEquals(1288756278, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1216827134, model.hourlySchedule().minute()); + Assertions.assertEquals(7141166949546611504L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(22897042, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(192759077, model.dailySchedule().hour()); + Assertions.assertEquals(1120299710, model.dailySchedule().minute()); + Assertions.assertEquals(4031326214587068225L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(1662588727, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("yzvqt", model.weeklySchedule().day()); + Assertions.assertEquals(876098210, model.weeklySchedule().hour()); + Assertions.assertEquals(1500004458, model.weeklySchedule().minute()); + Assertions.assertEquals(3901581715856749689L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(1254452597, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("ondjmq", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1083170526, model.monthlySchedule().hour()); + Assertions.assertEquals(1371154692, model.monthlySchedule().minute()); + Assertions.assertEquals(1404344423312280860L, model.monthlySchedule().usedBytes()); + Assertions.assertFalse(model.enabled()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java index 641dd6a1acb1..a667c8791683 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java @@ -18,73 +18,73 @@ public final class SnapshotPolicyPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotPolicyPatch model = BinaryData.fromString( - "{\"location\":\"bexkpzksmondj\",\"id\":\"uxvypomgkopkwh\",\"name\":\"v\",\"type\":\"jqg\",\"tags\":{\"xozap\":\"mocmbqfqvmk\",\"dd\":\"helxprglya\"},\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":373907539,\"minute\":1344502344,\"usedBytes\":179498978109269734},\"dailySchedule\":{\"snapshotsToKeep\":374378513,\"hour\":2014016933,\"minute\":792920613,\"usedBytes\":2792970654371570691},\"weeklySchedule\":{\"snapshotsToKeep\":1487162894,\"day\":\"qrhzoymibmrqyib\",\"hour\":1988324847,\"minute\":1263635295,\"usedBytes\":2799974459561219489},\"monthlySchedule\":{\"snapshotsToKeep\":1796967394,\"daysOfMonth\":\"rkwofyyvoqa\",\"hour\":848769798,\"minute\":339045288,\"usedBytes\":5359591244102758807},\"enabled\":true,\"provisioningState\":\"bwoenwashrt\"}}") + "{\"location\":\"fnndl\",\"id\":\"chkoymkcdyh\",\"name\":\"kkpwdreqnovvq\",\"type\":\"vljxywsu\",\"tags\":{\"aeneqnzarrwl\":\"rsndsytgadgvra\"},\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1309534736,\"minute\":2001921074,\"usedBytes\":7831439414407354845},\"dailySchedule\":{\"snapshotsToKeep\":2115532997,\"hour\":288092317,\"minute\":1703781779,\"usedBytes\":4275294117153207447},\"weeklySchedule\":{\"snapshotsToKeep\":1307066310,\"day\":\"iftohqkvpu\",\"hour\":2123821408,\"minute\":2143222213,\"usedBytes\":2213751776230831712},\"monthlySchedule\":{\"snapshotsToKeep\":931393503,\"daysOfMonth\":\"fsynljphuop\",\"hour\":1015065537,\"minute\":596393327,\"usedBytes\":2347535510676514797},\"enabled\":false,\"provisioningState\":\"zihleosjswsr\"}}") .toObject(SnapshotPolicyPatch.class); - Assertions.assertEquals("bexkpzksmondj", model.location()); - Assertions.assertEquals("mocmbqfqvmk", model.tags().get("xozap")); - Assertions.assertEquals(373907539, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1344502344, model.hourlySchedule().minute()); - Assertions.assertEquals(179498978109269734L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(374378513, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(2014016933, model.dailySchedule().hour()); - Assertions.assertEquals(792920613, model.dailySchedule().minute()); - Assertions.assertEquals(2792970654371570691L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1487162894, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("qrhzoymibmrqyib", model.weeklySchedule().day()); - Assertions.assertEquals(1988324847, model.weeklySchedule().hour()); - Assertions.assertEquals(1263635295, model.weeklySchedule().minute()); - Assertions.assertEquals(2799974459561219489L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(1796967394, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("rkwofyyvoqa", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(848769798, model.monthlySchedule().hour()); - Assertions.assertEquals(339045288, model.monthlySchedule().minute()); - Assertions.assertEquals(5359591244102758807L, model.monthlySchedule().usedBytes()); - Assertions.assertTrue(model.enabled()); + Assertions.assertEquals("fnndl", model.location()); + Assertions.assertEquals("rsndsytgadgvra", model.tags().get("aeneqnzarrwl")); + Assertions.assertEquals(1309534736, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(2001921074, model.hourlySchedule().minute()); + Assertions.assertEquals(7831439414407354845L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(2115532997, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(288092317, model.dailySchedule().hour()); + Assertions.assertEquals(1703781779, model.dailySchedule().minute()); + Assertions.assertEquals(4275294117153207447L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(1307066310, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("iftohqkvpu", model.weeklySchedule().day()); + Assertions.assertEquals(2123821408, model.weeklySchedule().hour()); + Assertions.assertEquals(2143222213, model.weeklySchedule().minute()); + Assertions.assertEquals(2213751776230831712L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(931393503, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("fsynljphuop", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1015065537, model.monthlySchedule().hour()); + Assertions.assertEquals(596393327, model.monthlySchedule().minute()); + Assertions.assertEquals(2347535510676514797L, model.monthlySchedule().usedBytes()); + Assertions.assertFalse(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotPolicyPatch model = new SnapshotPolicyPatch().withLocation("bexkpzksmondj") - .withTags(mapOf("xozap", "mocmbqfqvmk", "dd", "helxprglya")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(373907539) - .withMinute(1344502344) - .withUsedBytes(179498978109269734L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(374378513) - .withHour(2014016933) - .withMinute(792920613) - .withUsedBytes(2792970654371570691L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1487162894) - .withDay("qrhzoymibmrqyib") - .withHour(1988324847) - .withMinute(1263635295) - .withUsedBytes(2799974459561219489L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1796967394) - .withDaysOfMonth("rkwofyyvoqa") - .withHour(848769798) - .withMinute(339045288) - .withUsedBytes(5359591244102758807L)) - .withEnabled(true); + SnapshotPolicyPatch model = new SnapshotPolicyPatch().withLocation("fnndl") + .withTags(mapOf("aeneqnzarrwl", "rsndsytgadgvra")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1309534736) + .withMinute(2001921074) + .withUsedBytes(7831439414407354845L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(2115532997) + .withHour(288092317) + .withMinute(1703781779) + .withUsedBytes(4275294117153207447L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1307066310) + .withDay("iftohqkvpu") + .withHour(2123821408) + .withMinute(2143222213) + .withUsedBytes(2213751776230831712L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(931393503) + .withDaysOfMonth("fsynljphuop") + .withHour(1015065537) + .withMinute(596393327) + .withUsedBytes(2347535510676514797L)) + .withEnabled(false); model = BinaryData.fromObject(model).toObject(SnapshotPolicyPatch.class); - Assertions.assertEquals("bexkpzksmondj", model.location()); - Assertions.assertEquals("mocmbqfqvmk", model.tags().get("xozap")); - Assertions.assertEquals(373907539, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1344502344, model.hourlySchedule().minute()); - Assertions.assertEquals(179498978109269734L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(374378513, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(2014016933, model.dailySchedule().hour()); - Assertions.assertEquals(792920613, model.dailySchedule().minute()); - Assertions.assertEquals(2792970654371570691L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1487162894, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("qrhzoymibmrqyib", model.weeklySchedule().day()); - Assertions.assertEquals(1988324847, model.weeklySchedule().hour()); - Assertions.assertEquals(1263635295, model.weeklySchedule().minute()); - Assertions.assertEquals(2799974459561219489L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(1796967394, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("rkwofyyvoqa", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(848769798, model.monthlySchedule().hour()); - Assertions.assertEquals(339045288, model.monthlySchedule().minute()); - Assertions.assertEquals(5359591244102758807L, model.monthlySchedule().usedBytes()); - Assertions.assertTrue(model.enabled()); + Assertions.assertEquals("fnndl", model.location()); + Assertions.assertEquals("rsndsytgadgvra", model.tags().get("aeneqnzarrwl")); + Assertions.assertEquals(1309534736, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(2001921074, model.hourlySchedule().minute()); + Assertions.assertEquals(7831439414407354845L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(2115532997, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(288092317, model.dailySchedule().hour()); + Assertions.assertEquals(1703781779, model.dailySchedule().minute()); + Assertions.assertEquals(4275294117153207447L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(1307066310, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("iftohqkvpu", model.weeklySchedule().day()); + Assertions.assertEquals(2123821408, model.weeklySchedule().hour()); + Assertions.assertEquals(2143222213, model.weeklySchedule().minute()); + Assertions.assertEquals(2213751776230831712L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(931393503, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("fsynljphuop", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1015065537, model.monthlySchedule().hour()); + Assertions.assertEquals(596393327, model.monthlySchedule().minute()); + Assertions.assertEquals(2347535510676514797L, model.monthlySchedule().usedBytes()); + Assertions.assertFalse(model.enabled()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java index 15158f56585e..7fcb04b40858 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java @@ -16,67 +16,67 @@ public final class SnapshotPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotPolicyProperties model = BinaryData.fromString( - "{\"hourlySchedule\":{\"snapshotsToKeep\":2005026599,\"minute\":532672509,\"usedBytes\":3312819565675205010},\"dailySchedule\":{\"snapshotsToKeep\":346770564,\"hour\":914097739,\"minute\":978047634,\"usedBytes\":5404644626428061791},\"weeklySchedule\":{\"snapshotsToKeep\":60814629,\"day\":\"otbobzdopcj\",\"hour\":546984067,\"minute\":2011097883,\"usedBytes\":453808776382149422},\"monthlySchedule\":{\"snapshotsToKeep\":1518598912,\"daysOfMonth\":\"xrslpm\",\"hour\":2107317095,\"minute\":306696017,\"usedBytes\":4150565343365520377},\"enabled\":false,\"provisioningState\":\"jw\"}") + "{\"hourlySchedule\":{\"snapshotsToKeep\":2064087160,\"minute\":898647722,\"usedBytes\":2472499976183839734},\"dailySchedule\":{\"snapshotsToKeep\":1319201753,\"hour\":24536782,\"minute\":608767660,\"usedBytes\":2987898428568388720},\"weeklySchedule\":{\"snapshotsToKeep\":1655642589,\"day\":\"cpi\",\"hour\":837458643,\"minute\":369750423,\"usedBytes\":8544252603637411760},\"monthlySchedule\":{\"snapshotsToKeep\":1911820344,\"daysOfMonth\":\"nwashrtd\",\"hour\":1226493160,\"minute\":822004718,\"usedBytes\":8545363856594134553},\"enabled\":true,\"provisioningState\":\"ulpiuj\"}") .toObject(SnapshotPolicyProperties.class); - Assertions.assertEquals(2005026599, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(532672509, model.hourlySchedule().minute()); - Assertions.assertEquals(3312819565675205010L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(346770564, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(914097739, model.dailySchedule().hour()); - Assertions.assertEquals(978047634, model.dailySchedule().minute()); - Assertions.assertEquals(5404644626428061791L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(60814629, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("otbobzdopcj", model.weeklySchedule().day()); - Assertions.assertEquals(546984067, model.weeklySchedule().hour()); - Assertions.assertEquals(2011097883, model.weeklySchedule().minute()); - Assertions.assertEquals(453808776382149422L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(1518598912, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("xrslpm", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(2107317095, model.monthlySchedule().hour()); - Assertions.assertEquals(306696017, model.monthlySchedule().minute()); - Assertions.assertEquals(4150565343365520377L, model.monthlySchedule().usedBytes()); - Assertions.assertFalse(model.enabled()); + Assertions.assertEquals(2064087160, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(898647722, model.hourlySchedule().minute()); + Assertions.assertEquals(2472499976183839734L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(1319201753, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(24536782, model.dailySchedule().hour()); + Assertions.assertEquals(608767660, model.dailySchedule().minute()); + Assertions.assertEquals(2987898428568388720L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(1655642589, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("cpi", model.weeklySchedule().day()); + Assertions.assertEquals(837458643, model.weeklySchedule().hour()); + Assertions.assertEquals(369750423, model.weeklySchedule().minute()); + Assertions.assertEquals(8544252603637411760L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(1911820344, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("nwashrtd", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1226493160, model.monthlySchedule().hour()); + Assertions.assertEquals(822004718, model.monthlySchedule().minute()); + Assertions.assertEquals(8545363856594134553L, model.monthlySchedule().usedBytes()); + Assertions.assertTrue(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SnapshotPolicyProperties model = new SnapshotPolicyProperties() - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(2005026599) - .withMinute(532672509) - .withUsedBytes(3312819565675205010L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(346770564) - .withHour(914097739) - .withMinute(978047634) - .withUsedBytes(5404644626428061791L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(60814629) - .withDay("otbobzdopcj") - .withHour(546984067) - .withMinute(2011097883) - .withUsedBytes(453808776382149422L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1518598912) - .withDaysOfMonth("xrslpm") - .withHour(2107317095) - .withMinute(306696017) - .withUsedBytes(4150565343365520377L)) - .withEnabled(false); + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(2064087160) + .withMinute(898647722) + .withUsedBytes(2472499976183839734L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1319201753) + .withHour(24536782) + .withMinute(608767660) + .withUsedBytes(2987898428568388720L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1655642589) + .withDay("cpi") + .withHour(837458643) + .withMinute(369750423) + .withUsedBytes(8544252603637411760L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1911820344) + .withDaysOfMonth("nwashrtd") + .withHour(1226493160) + .withMinute(822004718) + .withUsedBytes(8545363856594134553L)) + .withEnabled(true); model = BinaryData.fromObject(model).toObject(SnapshotPolicyProperties.class); - Assertions.assertEquals(2005026599, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(532672509, model.hourlySchedule().minute()); - Assertions.assertEquals(3312819565675205010L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(346770564, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(914097739, model.dailySchedule().hour()); - Assertions.assertEquals(978047634, model.dailySchedule().minute()); - Assertions.assertEquals(5404644626428061791L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(60814629, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("otbobzdopcj", model.weeklySchedule().day()); - Assertions.assertEquals(546984067, model.weeklySchedule().hour()); - Assertions.assertEquals(2011097883, model.weeklySchedule().minute()); - Assertions.assertEquals(453808776382149422L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(1518598912, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("xrslpm", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(2107317095, model.monthlySchedule().hour()); - Assertions.assertEquals(306696017, model.monthlySchedule().minute()); - Assertions.assertEquals(4150565343365520377L, model.monthlySchedule().usedBytes()); - Assertions.assertFalse(model.enabled()); + Assertions.assertEquals(2064087160, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(898647722, model.hourlySchedule().minute()); + Assertions.assertEquals(2472499976183839734L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(1319201753, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(24536782, model.dailySchedule().hour()); + Assertions.assertEquals(608767660, model.dailySchedule().minute()); + Assertions.assertEquals(2987898428568388720L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(1655642589, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("cpi", model.weeklySchedule().day()); + Assertions.assertEquals(837458643, model.weeklySchedule().hour()); + Assertions.assertEquals(369750423, model.weeklySchedule().minute()); + Assertions.assertEquals(8544252603637411760L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(1911820344, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("nwashrtd", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1226493160, model.monthlySchedule().hour()); + Assertions.assertEquals(822004718, model.monthlySchedule().minute()); + Assertions.assertEquals(8545363856594134553L, model.monthlySchedule().usedBytes()); + Assertions.assertTrue(model.enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java index 2e6f38763cc5..065bfa3912f9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java @@ -11,8 +11,7 @@ public final class SnapshotPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotProperties model = BinaryData - .fromString( - "{\"snapshotId\":\"ur\",\"created\":\"2020-12-25T12:19:04Z\",\"provisioningState\":\"wobdagxtibqdx\"}") + .fromString("{\"snapshotId\":\"a\",\"created\":\"2021-05-13T02:02:39Z\",\"provisioningState\":\"n\"}") .toObject(SnapshotProperties.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java index 4c58a08c6467..56f0856a770d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java @@ -13,18 +13,18 @@ public final class SnapshotRestoreFilesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotRestoreFiles model - = BinaryData.fromString("{\"filePaths\":[\"tdum\",\"rp\",\"xe\",\"mnzb\"],\"destinationPath\":\"hjpglkf\"}") + = BinaryData.fromString("{\"filePaths\":[\"kzzlvmbmpaxmodf\"],\"destinationPath\":\"efyw\"}") .toObject(SnapshotRestoreFiles.class); - Assertions.assertEquals("tdum", model.filePaths().get(0)); - Assertions.assertEquals("hjpglkf", model.destinationPath()); + Assertions.assertEquals("kzzlvmbmpaxmodf", model.filePaths().get(0)); + Assertions.assertEquals("efyw", model.destinationPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotRestoreFiles model = new SnapshotRestoreFiles().withFilePaths(Arrays.asList("tdum", "rp", "xe", "mnzb")) - .withDestinationPath("hjpglkf"); + SnapshotRestoreFiles model + = new SnapshotRestoreFiles().withFilePaths(Arrays.asList("kzzlvmbmpaxmodf")).withDestinationPath("efyw"); model = BinaryData.fromObject(model).toObject(SnapshotRestoreFiles.class); - Assertions.assertEquals("tdum", model.filePaths().get(0)); - Assertions.assertEquals("hjpglkf", model.destinationPath()); + Assertions.assertEquals("kzzlvmbmpaxmodf", model.filePaths().get(0)); + Assertions.assertEquals("efyw", model.destinationPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java index fc6bde307ac4..2b3f5532ed5a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java @@ -27,7 +27,9 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.snapshots().delete("qdqx", "bjwgnyfus", "zsvtuikzhajqgl", "fh", "l", com.azure.core.util.Context.NONE); + manager.snapshots() + .delete("ykgsangpszng", "fpgylkve", "jujcngoad", "edmzrgjfoknub", "oitpkpztrgdgx", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java index b44c3c107468..92de3bea4c1a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class SnapshotsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"snapshotId\":\"exaoguya\",\"created\":\"2021-11-04T08:52:55Z\",\"provisioningState\":\"sdaultxij\"},\"location\":\"um\",\"id\":\"waz\",\"name\":\"nqnm\",\"type\":\"jng\"}"; + = "{\"properties\":{\"snapshotId\":\"rftb\",\"created\":\"2021-09-19T09:08:43Z\",\"provisioningState\":\"reuquowtljvf\"},\"location\":\"hreagk\",\"id\":\"xv\",\"name\":\"qtvbczsu\",\"type\":\"mdgglmepjpfs\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Snapshot response = manager.snapshots() - .getWithResponse("aqtferr", "wexjkmfxapjwogq", "nobpudcdabtqwpw", "awbzasqb", "clj", + .getWithResponse("mgzvyfi", "dkz", "qnwsithuqolyah", "uqwqulsutrjbhxyk", "hyqezvqq", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("um", response.location()); + Assertions.assertEquals("hreagk", response.location()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java index eab7a07111d4..e455bd08c57d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java @@ -22,7 +22,7 @@ public final class SnapshotsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"snapshotId\":\"kvntjlrigjkskyri\",\"created\":\"2020-12-31T15:34:24Z\",\"provisioningState\":\"idsxwaabzmifry\"},\"location\":\"znmmaxrizkzobgo\",\"id\":\"lhslnelxieixyn\",\"name\":\"lxecwcrojphslh\",\"type\":\"awjutifd\"}]}"; + = "{\"value\":[{\"properties\":{\"snapshotId\":\"wvskbuhzacaqtylt\",\"created\":\"2021-11-08T08:38:48Z\",\"provisioningState\":\"ujpdsxzak\"},\"location\":\"ejkm\",\"id\":\"iztjof\",\"name\":\"cvovjufyc\",\"type\":\"jmlbemyejiriux\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<Snapshot> response - = manager.snapshots().list("qryxyn", "nzrdpsovwxz", "ptgoeiybbabp", "hv", com.azure.core.util.Context.NONE); + = manager.snapshots().list("coqra", "wugyx", "qi", "we", com.azure.core.util.Context.NONE); - Assertions.assertEquals("znmmaxrizkzobgo", response.iterator().next().location()); + Assertions.assertEquals("ejkm", response.iterator().next().location()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java index 56d697ba5405..768042a78678 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java @@ -12,9 +12,9 @@ public final class SnapshotsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"snapshotId\":\"kbogqxndlkzgx\",\"created\":\"2021-10-18T16:27:54Z\",\"provisioningState\":\"plbpodxun\"},\"location\":\"bebxmubyyntwl\",\"id\":\"qtkoievs\",\"name\":\"otgqrlltmu\",\"type\":\"lauwzizxbmpgcjef\"}],\"nextLink\":\"muvp\"}") + "{\"value\":[{\"properties\":{\"snapshotId\":\"flrwd\",\"created\":\"2021-03-11T09:23:13Z\",\"provisioningState\":\"xyjrxsagafcnih\"},\"location\":\"wqapnedgfbcvk\",\"id\":\"q\",\"name\":\"pkeqdcvdrhvoo\",\"type\":\"sotbob\"},{\"properties\":{\"snapshotId\":\"pcjwv\",\"created\":\"2021-08-23T07:09:01Z\",\"provisioningState\":\"d\"},\"location\":\"mgxcxrslpm\",\"id\":\"wuoegrpk\",\"name\":\"jw\",\"type\":\"iyq\"}],\"nextLink\":\"uicpd\"}") .toObject(SnapshotsList.class); - Assertions.assertEquals("bebxmubyyntwl", model.value().get(0).location()); - Assertions.assertEquals("muvp", model.nextLink()); + Assertions.assertEquals("wqapnedgfbcvk", model.value().get(0).location()); + Assertions.assertEquals("uicpd", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java index 1411bbfe8134..14c7c4ad3f8e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java @@ -30,9 +30,9 @@ public void testRestoreFiles() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.snapshots() - .restoreFiles("fmvigorqjbttzh", "aglkafhon", "juj", "ickpz", "cpopmxel", - new SnapshotRestoreFiles().withFilePaths(Arrays.asList("clt", "jedexxmlf", "kqscazuawxtzx")) - .withDestinationPath("amwabzxrvxcushsp"), + .restoreFiles("gthortudaw", "pjfe", "qerpptcbgqnzm", "h", "ilialwcjgc", + new SnapshotRestoreFiles().withFilePaths(Arrays.asList("bcccgzpra", "xnyuffatsgftipwc")) + .withDestinationPath("yubhiqdx"), com.azure.core.util.Context.NONE); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java index 3bcd62c9cbd1..7554e9fd6dfe 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java @@ -12,20 +12,20 @@ public final class SubvolumeInfoInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeInfoInner model = BinaryData.fromString( - "{\"properties\":{\"path\":\"dilmyww\",\"size\":2257431826333496773,\"parentPath\":\"nye\",\"provisioningState\":\"b\"},\"id\":\"vudtjuewbcihx\",\"name\":\"uwhcjyxccybv\",\"type\":\"ayakkudzpx\"}") + "{\"properties\":{\"path\":\"xvgpiude\",\"size\":7118323422467212243,\"parentPath\":\"zec\",\"provisioningState\":\"xw\"},\"id\":\"fykhvuhxepmru\",\"name\":\"znabaobns\",\"type\":\"ujdjltymkmvg\"}") .toObject(SubvolumeInfoInner.class); - Assertions.assertEquals("dilmyww", model.path()); - Assertions.assertEquals(2257431826333496773L, model.size()); - Assertions.assertEquals("nye", model.parentPath()); + Assertions.assertEquals("xvgpiude", model.path()); + Assertions.assertEquals(7118323422467212243L, model.size()); + Assertions.assertEquals("zec", model.parentPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SubvolumeInfoInner model - = new SubvolumeInfoInner().withPath("dilmyww").withSize(2257431826333496773L).withParentPath("nye"); + = new SubvolumeInfoInner().withPath("xvgpiude").withSize(7118323422467212243L).withParentPath("zec"); model = BinaryData.fromObject(model).toObject(SubvolumeInfoInner.class); - Assertions.assertEquals("dilmyww", model.path()); - Assertions.assertEquals(2257431826333496773L, model.size()); - Assertions.assertEquals("nye", model.parentPath()); + Assertions.assertEquals("xvgpiude", model.path()); + Assertions.assertEquals(7118323422467212243L, model.size()); + Assertions.assertEquals("zec", model.parentPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java index 20f9f9cece00..268fb898e91b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java @@ -13,17 +13,17 @@ public final class SubvolumeModelInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeModelInner model = BinaryData.fromString( - "{\"id\":\"eqvldspast\",\"name\":\"kkdmfl\",\"type\":\"stmjlxrri\",\"properties\":{\"path\":\"apeewchpxlkt\",\"parentPath\":\"uziycsl\",\"size\":5713719406274088628,\"bytesUsed\":7273800949722293579,\"permissions\":\"ktyhjt\",\"creationTimeStamp\":\"2021-04-16T04:24:08Z\",\"accessedTimeStamp\":\"2021-03-02T18:17:10Z\",\"modifiedTimeStamp\":\"2021-05-27T00:20:23Z\",\"changedTimeStamp\":\"2021-06-12T16:16:37Z\",\"provisioningState\":\"mrqzzrrjvpgl\"}}") + "{\"id\":\"qwcabvnui\",\"name\":\"ey\",\"type\":\"wlpaugmrmfjlrxwt\",\"properties\":{\"path\":\"khfkvcisi\",\"parentPath\":\"oaedsxjwuivedwcg\",\"size\":1315574857206700916,\"bytesUsed\":1846640547424370909,\"permissions\":\"bp\",\"creationTimeStamp\":\"2021-08-02T13:45:24Z\",\"accessedTimeStamp\":\"2021-11-26T04:59:44Z\",\"modifiedTimeStamp\":\"2021-02-13T11:33:46Z\",\"changedTimeStamp\":\"2021-11-14T16:38:14Z\",\"provisioningState\":\"jdlrgmsplzgaufc\"}}") .toObject(SubvolumeModelInner.class); - Assertions.assertEquals("apeewchpxlkt", model.path()); - Assertions.assertEquals("uziycsl", model.parentPath()); - Assertions.assertEquals(5713719406274088628L, model.size()); - Assertions.assertEquals(7273800949722293579L, model.bytesUsed()); - Assertions.assertEquals("ktyhjt", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-16T04:24:08Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-02T18:17:10Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-27T00:20:23Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-12T16:16:37Z"), model.changedTimestamp()); - Assertions.assertEquals("mrqzzrrjvpgl", model.provisioningState()); + Assertions.assertEquals("khfkvcisi", model.path()); + Assertions.assertEquals("oaedsxjwuivedwcg", model.parentPath()); + Assertions.assertEquals(1315574857206700916L, model.size()); + Assertions.assertEquals(1846640547424370909L, model.bytesUsed()); + Assertions.assertEquals("bp", model.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-02T13:45:24Z"), model.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-26T04:59:44Z"), model.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-13T11:33:46Z"), model.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-14T16:38:14Z"), model.changedTimestamp()); + Assertions.assertEquals("jdlrgmsplzgaufc", model.provisioningState()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java index 4ecdc8f95c23..e61536b5b4c7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java @@ -13,17 +13,17 @@ public final class SubvolumeModelPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeModelProperties model = BinaryData.fromString( - "{\"path\":\"zgkrvqe\",\"parentPath\":\"toepryu\",\"size\":2061235851967739080,\"bytesUsed\":4251085007035253174,\"permissions\":\"mov\",\"creationTimeStamp\":\"2021-08-21T09:22:41Z\",\"accessedTimeStamp\":\"2021-05-20T20:20:31Z\",\"modifiedTimeStamp\":\"2021-06-08T04:09:14Z\",\"changedTimeStamp\":\"2021-05-12T09:22:23Z\",\"provisioningState\":\"dflgzuri\"}") + "{\"path\":\"hvn\",\"parentPath\":\"gnxkympqan\",\"size\":2106740942363678235,\"bytesUsed\":6324383483233283447,\"permissions\":\"bta\",\"creationTimeStamp\":\"2021-01-08T15:47:12Z\",\"accessedTimeStamp\":\"2021-03-10T10:02:03Z\",\"modifiedTimeStamp\":\"2021-08-21T15:38:38Z\",\"changedTimeStamp\":\"2021-01-25T20:15:02Z\",\"provisioningState\":\"cyl\"}") .toObject(SubvolumeModelProperties.class); - Assertions.assertEquals("zgkrvqe", model.path()); - Assertions.assertEquals("toepryu", model.parentPath()); - Assertions.assertEquals(2061235851967739080L, model.size()); - Assertions.assertEquals(4251085007035253174L, model.bytesUsed()); - Assertions.assertEquals("mov", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-21T09:22:41Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-20T20:20:31Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-08T04:09:14Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-12T09:22:23Z"), model.changedTimestamp()); - Assertions.assertEquals("dflgzuri", model.provisioningState()); + Assertions.assertEquals("hvn", model.path()); + Assertions.assertEquals("gnxkympqan", model.parentPath()); + Assertions.assertEquals(2106740942363678235L, model.size()); + Assertions.assertEquals(6324383483233283447L, model.bytesUsed()); + Assertions.assertEquals("bta", model.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-08T15:47:12Z"), model.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-10T10:02:03Z"), model.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-21T15:38:38Z"), model.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-25T20:15:02Z"), model.changedTimestamp()); + Assertions.assertEquals("cyl", model.provisioningState()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java index 05228e7af580..b8cf4ca730dc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java @@ -11,17 +11,17 @@ public final class SubvolumePatchParamsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SubvolumePatchParams model = BinaryData.fromString("{\"size\":6255514138294758231,\"path\":\"vbalxlllc\"}") + SubvolumePatchParams model = BinaryData.fromString("{\"size\":7464315318202646424,\"path\":\"xuugqkc\"}") .toObject(SubvolumePatchParams.class); - Assertions.assertEquals(6255514138294758231L, model.size()); - Assertions.assertEquals("vbalxlllc", model.path()); + Assertions.assertEquals(7464315318202646424L, model.size()); + Assertions.assertEquals("xuugqkc", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumePatchParams model = new SubvolumePatchParams().withSize(6255514138294758231L).withPath("vbalxlllc"); + SubvolumePatchParams model = new SubvolumePatchParams().withSize(7464315318202646424L).withPath("xuugqkc"); model = BinaryData.fromObject(model).toObject(SubvolumePatchParams.class); - Assertions.assertEquals(6255514138294758231L, model.size()); - Assertions.assertEquals("vbalxlllc", model.path()); + Assertions.assertEquals(7464315318202646424L, model.size()); + Assertions.assertEquals("xuugqkc", model.path()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java index 1b7df02591f7..c6f43fd90188 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java @@ -12,18 +12,18 @@ public final class SubvolumePatchRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumePatchRequest model - = BinaryData.fromString("{\"properties\":{\"size\":472851699764261013,\"path\":\"egfnmntfpmvmemfn\"}}") + = BinaryData.fromString("{\"properties\":{\"size\":5842475212910239296,\"path\":\"riswslmiiio\"}}") .toObject(SubvolumePatchRequest.class); - Assertions.assertEquals(472851699764261013L, model.size()); - Assertions.assertEquals("egfnmntfpmvmemfn", model.path()); + Assertions.assertEquals(5842475212910239296L, model.size()); + Assertions.assertEquals("riswslmiiio", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SubvolumePatchRequest model - = new SubvolumePatchRequest().withSize(472851699764261013L).withPath("egfnmntfpmvmemfn"); + = new SubvolumePatchRequest().withSize(5842475212910239296L).withPath("riswslmiiio"); model = BinaryData.fromObject(model).toObject(SubvolumePatchRequest.class); - Assertions.assertEquals(472851699764261013L, model.size()); - Assertions.assertEquals("egfnmntfpmvmemfn", model.path()); + Assertions.assertEquals(5842475212910239296L, model.size()); + Assertions.assertEquals("riswslmiiio", model.path()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java index 2b974cf26bba..d728c8fd6ec5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java @@ -12,21 +12,21 @@ public final class SubvolumePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeProperties model = BinaryData.fromString( - "{\"path\":\"jplmagstcy\",\"size\":7553431900772779958,\"parentPath\":\"yrkdbdgiogsjkmn\",\"provisioningState\":\"jnobaiyh\"}") + "{\"path\":\"hywartspph\",\"size\":1820358533637729770,\"parentPath\":\"kxdssjpemmucfxh\",\"provisioningState\":\"kflrmymy\"}") .toObject(SubvolumeProperties.class); - Assertions.assertEquals("jplmagstcy", model.path()); - Assertions.assertEquals(7553431900772779958L, model.size()); - Assertions.assertEquals("yrkdbdgiogsjkmn", model.parentPath()); + Assertions.assertEquals("hywartspph", model.path()); + Assertions.assertEquals(1820358533637729770L, model.size()); + Assertions.assertEquals("kxdssjpemmucfxh", model.parentPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumeProperties model = new SubvolumeProperties().withPath("jplmagstcy") - .withSize(7553431900772779958L) - .withParentPath("yrkdbdgiogsjkmn"); + SubvolumeProperties model = new SubvolumeProperties().withPath("hywartspph") + .withSize(1820358533637729770L) + .withParentPath("kxdssjpemmucfxh"); model = BinaryData.fromObject(model).toObject(SubvolumeProperties.class); - Assertions.assertEquals("jplmagstcy", model.path()); - Assertions.assertEquals(7553431900772779958L, model.size()); - Assertions.assertEquals("yrkdbdgiogsjkmn", model.parentPath()); + Assertions.assertEquals("hywartspph", model.path()); + Assertions.assertEquals(1820358533637729770L, model.size()); + Assertions.assertEquals("kxdssjpemmucfxh", model.parentPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java index d1c3f469a2e1..a8c134f29fb7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java @@ -21,7 +21,7 @@ public final class SubvolumesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"path\":\"kympqanxrjkixtw\",\"size\":6067956593612748016,\"parentPath\":\"pnyghs\",\"provisioningState\":\"Succeeded\"},\"id\":\"gmnsghpxy\",\"name\":\"phdrw\",\"type\":\"jkhvyomacluzvxnq\"}"; + = "{\"properties\":{\"path\":\"azz\",\"size\":612372614461236984,\"parentPath\":\"ydjufbnklbl\",\"provisioningState\":\"Succeeded\"},\"id\":\"dabalfdxaglzfytl\",\"name\":\"tlqh\",\"type\":\"pxouvmr\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,15 +31,15 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubvolumeInfo response = manager.subvolumes() - .define("sx") - .withExistingVolume("ey", "swlpaugmrmfj", "rxwtoaukhfkvc", "sizmoae") - .withPath("ive") - .withSize(5184898420559023748L) - .withParentPath("eewxeiqbpsmg") + .define("sy") + .withExistingVolume("gcwx", "ec", "bwjtrdx", "izagbbgiar") + .withPath("dqxwabzrwiqrxhac") + .withSize(2095551908307218647L) + .withParentPath("qkp") .create(); - Assertions.assertEquals("kympqanxrjkixtw", response.path()); - Assertions.assertEquals(6067956593612748016L, response.size()); - Assertions.assertEquals("pnyghs", response.parentPath()); + Assertions.assertEquals("azz", response.path()); + Assertions.assertEquals(612372614461236984L, response.size()); + Assertions.assertEquals("ydjufbnklbl", response.parentPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java index 1ed8ccb9140e..ca86feab92df 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java @@ -27,8 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.subvolumes() - .delete("ujdjltymkmvg", "ihywartspph", "ixkykxd", "sj", "emmucfxh", com.azure.core.util.Context.NONE); + manager.subvolumes().delete("qwm", "q", "moxsa", "uxejgwecywnfyszz", "czs", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java index 0e884953c7f9..be25808a2afb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java @@ -21,7 +21,7 @@ public final class SubvolumesGetMetadataMockTests { @Test public void testGetMetadata() throws Exception { String responseStr - = "{\"id\":\"dfrdbi\",\"name\":\"rjgeih\",\"type\":\"lg\",\"properties\":{\"path\":\"iwzcxmjpbyeph\",\"parentPath\":\"t\",\"size\":971495123431334459,\"bytesUsed\":5030460959235510617,\"permissions\":\"fqip\",\"creationTimeStamp\":\"2020-12-22T02:20:11Z\",\"accessedTimeStamp\":\"2021-09-18T18:40:03Z\",\"modifiedTimeStamp\":\"2021-04-01T06:59Z\",\"changedTimeStamp\":\"2021-03-13T21:07:38Z\",\"provisioningState\":\"Succeeded\"}}"; + = "{\"id\":\"p\",\"name\":\"qggweeiwdh\",\"type\":\"n\",\"properties\":{\"path\":\"fzuscstun\",\"parentPath\":\"hxdfbkl\",\"size\":2959052302255831085,\"bytesUsed\":8359403093552012112,\"permissions\":\"ysmvxodgwxf\",\"creationTimeStamp\":\"2021-01-18T02:37:15Z\",\"accessedTimeStamp\":\"2021-05-31T12:02:06Z\",\"modifiedTimeStamp\":\"2021-07-21T22:05Z\",\"changedTimeStamp\":\"2021-01-26T12:06:53Z\",\"provisioningState\":\"Succeeded\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,18 +31,17 @@ public void testGetMetadata() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubvolumeModel response = manager.subvolumes() - .getMetadata("wzdufypivlsbb", "pmcubkmifoxxkub", "phavpmhbrb", "gvgovpbbttefjo", "nssqyzqed", - com.azure.core.util.Context.NONE); + .getMetadata("b", "iatwfaujegqdtadr", "kgd", "hjkrukizyhgs", "tnqsktx", com.azure.core.util.Context.NONE); - Assertions.assertEquals("iwzcxmjpbyeph", response.path()); - Assertions.assertEquals("t", response.parentPath()); - Assertions.assertEquals(971495123431334459L, response.size()); - Assertions.assertEquals(5030460959235510617L, response.bytesUsed()); - Assertions.assertEquals("fqip", response.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-22T02:20:11Z"), response.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T18:40:03Z"), response.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-01T06:59Z"), response.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-13T21:07:38Z"), response.changedTimestamp()); + Assertions.assertEquals("fzuscstun", response.path()); + Assertions.assertEquals("hxdfbkl", response.parentPath()); + Assertions.assertEquals(2959052302255831085L, response.size()); + Assertions.assertEquals(8359403093552012112L, response.bytesUsed()); + Assertions.assertEquals("ysmvxodgwxf", response.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T02:37:15Z"), response.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-31T12:02:06Z"), response.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T22:05Z"), response.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-26T12:06:53Z"), response.changedTimestamp()); Assertions.assertEquals("Succeeded", response.provisioningState()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java index e69d132426be..19ee3cf10a4e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class SubvolumesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"path\":\"desqplpvmjcdo\",\"size\":5553919179908601818,\"parentPath\":\"yvteowxvgpiudeu\",\"provisioningState\":\"sxze\"},\"id\":\"axwk\",\"name\":\"fykhvuhxepmru\",\"type\":\"znabaobns\"}"; + = "{\"properties\":{\"path\":\"jue\",\"size\":1238922014101083662,\"parentPath\":\"tsl\",\"provisioningState\":\"tv\"},\"id\":\"nxvgjb\",\"name\":\"iobpnjodf\",\"type\":\"bj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,12 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubvolumeInfo response = manager.subvolumes() - .getWithResponse("sggux", "eml", "ywaeeczgf", "ukklelss", "blycsxzujksr", com.azure.core.util.Context.NONE) + .getWithResponse("dsaidjanormovdxx", "rntu", "moil", "nwemhdeeljslkyo", "d", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("desqplpvmjcdo", response.path()); - Assertions.assertEquals(5553919179908601818L, response.size()); - Assertions.assertEquals("yvteowxvgpiudeu", response.parentPath()); + Assertions.assertEquals("jue", response.path()); + Assertions.assertEquals(1238922014101083662L, response.size()); + Assertions.assertEquals("tsl", response.parentPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java index f3a6cc0ded64..21d561f36a13 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java @@ -22,7 +22,7 @@ public final class SubvolumesListByVolumeMockTests { @Test public void testListByVolume() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"path\":\"otiowlxteqd\",\"size\":5387588961314601515,\"parentPath\":\"dtguk\",\"provisioningState\":\"nblwphqlkcc\"},\"id\":\"gygqwah\",\"name\":\"iul\",\"type\":\"gniiprglvaw\"}]}"; + = "{\"value\":[{\"properties\":{\"path\":\"pmnoejhqlf\",\"size\":2361912450250234564,\"parentPath\":\"oyrfgxk\",\"provisioningState\":\"pmypgfq\"},\"id\":\"tyw\",\"name\":\"lakxpejpewp\",\"type\":\"jlfxampqcrzgeuq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testListByVolume() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<SubvolumeInfo> response = manager.subvolumes() - .listByVolume("kkflrmymyincqlhr", "s", "sl", "iiiovgqcgxuugq", com.azure.core.util.Context.NONE); + .listByVolume("nqbdnddbboz", "yvrmkjm", "it", "chwudlxee", com.azure.core.util.Context.NONE); - Assertions.assertEquals("otiowlxteqd", response.iterator().next().path()); - Assertions.assertEquals(5387588961314601515L, response.iterator().next().size()); - Assertions.assertEquals("dtguk", response.iterator().next().parentPath()); + Assertions.assertEquals("pmnoejhqlf", response.iterator().next().path()); + Assertions.assertEquals(2361912450250234564L, response.iterator().next().size()); + Assertions.assertEquals("oyrfgxk", response.iterator().next().parentPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java index 206207858e81..49d4896a668c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java @@ -12,11 +12,11 @@ public final class SubvolumesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"path\":\"bzevwrd\",\"size\":9209137872063887003,\"parentPath\":\"uvsj\",\"provisioningState\":\"wsmystuluqypf\"},\"id\":\"lerchpq\",\"name\":\"mfpjbabw\",\"type\":\"dfc\"},{\"properties\":{\"path\":\"puunnoxyhkxgqd\",\"size\":944157000221842248,\"parentPath\":\"fhoqca\",\"provisioningState\":\"wdaomdjvlpjxxkzb\"},\"id\":\"sgeivsiy\",\"name\":\"zkdnc\",\"type\":\"dxonbzoggculap\"},{\"properties\":{\"path\":\"rpgogtqxep\",\"size\":4258812781218679511,\"parentPath\":\"uajlyj\",\"provisioningState\":\"vofqzhvfc\"},\"id\":\"yfm\",\"name\":\"wuxrkjpvdwxfzwi\",\"type\":\"vwzjbhyz\"}],\"nextLink\":\"jrkambtrnegvmnv\"}") + "{\"value\":[{\"properties\":{\"path\":\"owlxte\",\"size\":8012734549357722139,\"parentPath\":\"gwdtgukran\",\"provisioningState\":\"wphqlkccuzgygqw\"},\"id\":\"oiulwgniipr\",\"name\":\"lvawuwzdufypivls\",\"type\":\"bjpmcubk\"},{\"properties\":{\"path\":\"oxxkubvp\",\"size\":868428421844201391,\"parentPath\":\"h\",\"provisioningState\":\"bqgvgovpbbtte\"},\"id\":\"oknssqyzqedikdf\",\"name\":\"db\",\"type\":\"qmrjg\"},{\"properties\":{\"path\":\"fqlggw\",\"size\":7547159227117863936,\"parentPath\":\"xmjpbyep\",\"provisioningState\":\"gt\"},\"id\":\"j\",\"name\":\"rc\",\"type\":\"yfqi\"}],\"nextLink\":\"xhnpo\"}") .toObject(SubvolumesList.class); - Assertions.assertEquals("bzevwrd", model.value().get(0).path()); - Assertions.assertEquals(9209137872063887003L, model.value().get(0).size()); - Assertions.assertEquals("uvsj", model.value().get(0).parentPath()); - Assertions.assertEquals("jrkambtrnegvmnv", model.nextLink()); + Assertions.assertEquals("owlxte", model.value().get(0).path()); + Assertions.assertEquals(8012734549357722139L, model.value().get(0).size()); + Assertions.assertEquals("gwdtgukran", model.value().get(0).parentPath()); + Assertions.assertEquals("xhnpo", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SuspectFileTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SuspectFileTests.java new file mode 100644 index 000000000000..a3e331f5f54a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SuspectFileTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.SuspectFile; + +public final class SuspectFileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SuspectFile model + = BinaryData.fromString("{\"suspectFileName\":\"lmctlpd\",\"fileTimestamp\":\"2021-05-25T04:36:04Z\"}") + .toObject(SuspectFile.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerCommandResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerCommandResponseInnerTests.java index 9766fbf16b75..28d941483b35 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerCommandResponseInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerCommandResponseInnerTests.java @@ -11,8 +11,8 @@ public final class SvmPeerCommandResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SvmPeerCommandResponseInner model = BinaryData.fromString("{\"svmPeeringCommand\":\"mweriofzpy\"}") + SvmPeerCommandResponseInner model = BinaryData.fromString("{\"svmPeeringCommand\":\"lkzgxhuriplbp\"}") .toObject(SvmPeerCommandResponseInner.class); - Assertions.assertEquals("mweriofzpy", model.svmPeeringCommand()); + Assertions.assertEquals("lkzgxhuriplbp", model.svmPeeringCommand()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java index 82a42eb4f2bc..fb238ecda0d9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java @@ -13,24 +13,25 @@ public final class UpdateNetworkSiblingSetRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateNetworkSiblingSetRequest model = BinaryData.fromString( - "{\"networkSiblingSetId\":\"m\",\"subnetId\":\"rafwgckhocxvdf\",\"networkSiblingSetStateId\":\"fwafqrouda\",\"networkFeatures\":\"Standard\"}") + "{\"networkSiblingSetId\":\"jelaqacigele\",\"subnetId\":\"hdbvqvwzkjop\",\"networkSiblingSetStateId\":\"beonrlkwzdq\",\"networkFeatures\":\"Standard\"}") .toObject(UpdateNetworkSiblingSetRequest.class); - Assertions.assertEquals("m", model.networkSiblingSetId()); - Assertions.assertEquals("rafwgckhocxvdf", model.subnetId()); - Assertions.assertEquals("fwafqrouda", model.networkSiblingSetStateId()); + Assertions.assertEquals("jelaqacigele", model.networkSiblingSetId()); + Assertions.assertEquals("hdbvqvwzkjop", model.subnetId()); + Assertions.assertEquals("beonrlkwzdq", model.networkSiblingSetStateId()); Assertions.assertEquals(NetworkFeatures.STANDARD, model.networkFeatures()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateNetworkSiblingSetRequest model = new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("m") - .withSubnetId("rafwgckhocxvdf") - .withNetworkSiblingSetStateId("fwafqrouda") - .withNetworkFeatures(NetworkFeatures.STANDARD); + UpdateNetworkSiblingSetRequest model + = new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("jelaqacigele") + .withSubnetId("hdbvqvwzkjop") + .withNetworkSiblingSetStateId("beonrlkwzdq") + .withNetworkFeatures(NetworkFeatures.STANDARD); model = BinaryData.fromObject(model).toObject(UpdateNetworkSiblingSetRequest.class); - Assertions.assertEquals("m", model.networkSiblingSetId()); - Assertions.assertEquals("rafwgckhocxvdf", model.subnetId()); - Assertions.assertEquals("fwafqrouda", model.networkSiblingSetStateId()); + Assertions.assertEquals("jelaqacigele", model.networkSiblingSetId()); + Assertions.assertEquals("hdbvqvwzkjop", model.subnetId()); + Assertions.assertEquals("beonrlkwzdq", model.networkSiblingSetStateId()); Assertions.assertEquals(NetworkFeatures.STANDARD, model.networkFeatures()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageNameTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageNameTests.java index 2cc0b06a6022..9708a6f18a28 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageNameTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageNameTests.java @@ -11,9 +11,9 @@ public final class UsageNameTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UsageName model = BinaryData.fromString("{\"value\":\"cp\",\"localizedValue\":\"wkhihihlhzdsqt\"}") + UsageName model = BinaryData.fromString("{\"value\":\"cawetzqddt\",\"localizedValue\":\"fljhznamtua\"}") .toObject(UsageName.class); - Assertions.assertEquals("cp", model.value()); - Assertions.assertEquals("wkhihihlhzdsqt", model.localizedValue()); + Assertions.assertEquals("cawetzqddt", model.value()); + Assertions.assertEquals("fljhznamtua", model.localizedValue()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagePropertiesTests.java index e020d4ad97ac..b471fe40deb3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagePropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagePropertiesTests.java @@ -10,7 +10,8 @@ public final class UsagePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UsageProperties model = BinaryData.fromString("{\"currentValue\":19838939,\"limit\":1553526894,\"unit\":\"o\"}") - .toObject(UsageProperties.class); + UsageProperties model + = BinaryData.fromString("{\"currentValue\":510933333,\"limit\":1222277856,\"unit\":\"jncqtjzmi\"}") + .toObject(UsageProperties.class); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageResultInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageResultInnerTests.java index 145324dd1fad..2e185a89c038 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageResultInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageResultInnerTests.java @@ -11,7 +11,7 @@ public final class UsageResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UsageResultInner model = BinaryData.fromString( - "{\"id\":\"pysownbt\",\"name\":{\"value\":\"u\",\"localizedValue\":\"jqctojcmisofie\"},\"properties\":{\"currentValue\":697365196,\"limit\":419692653,\"unit\":\"qdhcu\"}}") + "{\"id\":\"nzxojpslsvjgpli\",\"name\":{\"value\":\"qwoyxqvapco\",\"localizedValue\":\"oucqpqojx\"},\"properties\":{\"currentValue\":2079376859,\"limit\":1211058395,\"unit\":\"gdzbenr\"}}") .toObject(UsageResultInner.class); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagesListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagesListResultTests.java index ab069030b2e2..fcfcc88e5740 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagesListResultTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagesListResultTests.java @@ -12,8 +12,8 @@ public final class UsagesListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UsagesListResult model = BinaryData.fromString( - "{\"value\":[{\"id\":\"ehhr\",\"name\":{\"value\":\"unzo\",\"localizedValue\":\"dhcxgkmoy\"},\"properties\":{\"currentValue\":1357025963,\"limit\":1627365000,\"unit\":\"hmfdnbzydvfvfcj\"}},{\"id\":\"eoisrvhmgor\",\"name\":{\"value\":\"kiscvwmzhwpl\",\"localizedValue\":\"a\"},\"properties\":{\"currentValue\":1880007503,\"limit\":1897852291,\"unit\":\"tg\"}},{\"id\":\"nzeyqxtjj\",\"name\":{\"value\":\"lqhy\",\"localizedValue\":\"vodggxdbee\"},\"properties\":{\"currentValue\":1362863960,\"limit\":1356434972,\"unit\":\"ra\"}},{\"id\":\"aawiuagydwqfb\",\"name\":{\"value\":\"rfgi\",\"localizedValue\":\"tcojocqwo\"},\"properties\":{\"currentValue\":681423135,\"limit\":1685240406,\"unit\":\"sfzldmoz\"}}],\"nextLink\":\"ylfsbtk\"}") + "{\"value\":[{\"id\":\"eakxcptsoqfyi\",\"name\":{\"value\":\"qc\",\"localizedValue\":\"rttzrazisgykiu\"},\"properties\":{\"currentValue\":1740485415,\"limit\":920951306,\"unit\":\"zohmnrxxbs\"}}],\"nextLink\":\"klinhmdptysprq\"}") .toObject(UsagesListResult.class); - Assertions.assertEquals("ylfsbtk", model.nextLink()); + Assertions.assertEquals("klinhmdptysprq", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java index cc4a3aaea029..4d956b2977a1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java @@ -11,7 +11,7 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"1f1bce88-51a7-49df-8c34-f102fc2a3b7b\",\"clientId\":\"ad68af57-215c-4c2c-ae08-21dfc156ffce\"}") + "{\"principalId\":\"8b7f5ca4-98f6-4926-9f97-a8528493724c\",\"clientId\":\"e9d13bc1-3e29-42d6-9b19-f1ba7ebb8cde\"}") .toObject(UserAssignedIdentity.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupPropertiesTests.java index 6654ab2c2e12..71188d4776fe 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupPropertiesTests.java @@ -12,21 +12,21 @@ public final class VolumeBackupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeBackupProperties model = BinaryData - .fromString("{\"backupPolicyId\":\"onuq\",\"policyEnforced\":false,\"backupVaultId\":\"beypewrmjmw\"}") + .fromString("{\"backupPolicyId\":\"ektcxsen\",\"policyEnforced\":false,\"backupVaultId\":\"s\"}") .toObject(VolumeBackupProperties.class); - Assertions.assertEquals("onuq", model.backupPolicyId()); + Assertions.assertEquals("ektcxsen", model.backupPolicyId()); Assertions.assertFalse(model.policyEnforced()); - Assertions.assertEquals("beypewrmjmw", model.backupVaultId()); + Assertions.assertEquals("s", model.backupVaultId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeBackupProperties model = new VolumeBackupProperties().withBackupPolicyId("onuq") + VolumeBackupProperties model = new VolumeBackupProperties().withBackupPolicyId("ektcxsen") .withPolicyEnforced(false) - .withBackupVaultId("beypewrmjmw"); + .withBackupVaultId("s"); model = BinaryData.fromObject(model).toObject(VolumeBackupProperties.class); - Assertions.assertEquals("onuq", model.backupPolicyId()); + Assertions.assertEquals("ektcxsen", model.backupPolicyId()); Assertions.assertFalse(model.policyEnforced()); - Assertions.assertEquals("beypewrmjmw", model.backupVaultId()); + Assertions.assertEquals("s", model.backupVaultId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java index 83903dcc5279..a7f5f8c06dca 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java @@ -12,11 +12,11 @@ public final class VolumeBackupsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeBackups model = BinaryData.fromString( - "{\"volumeName\":\"fatpxllrxcyjmoa\",\"volumeResourceId\":\"uvarmywdmjsjq\",\"backupsCount\":1756269391,\"policyEnabled\":true}") + "{\"volumeName\":\"kojvd\",\"volumeResourceId\":\"zfoqouicybxar\",\"backupsCount\":1685402148,\"policyEnabled\":false}") .toObject(VolumeBackups.class); - Assertions.assertEquals("fatpxllrxcyjmoa", model.volumeName()); - Assertions.assertEquals("uvarmywdmjsjq", model.volumeResourceId()); - Assertions.assertEquals(1756269391, model.backupsCount()); - Assertions.assertTrue(model.policyEnabled()); + Assertions.assertEquals("kojvd", model.volumeName()); + Assertions.assertEquals("zfoqouicybxar", model.volumeResourceId()); + Assertions.assertEquals(1685402148, model.backupsCount()); + Assertions.assertFalse(model.policyEnabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java index 4d9421247178..37c44d915f6f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.volumeGroups().delete("vmm", "npqfrtqlkzmeg", "itgvkx", com.azure.core.util.Context.NONE); + manager.volumeGroups().delete("ewdogiyetesy", "vidbztjhqtfb", "vnynkb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java index 4e2f4b3db7b9..e4954078d175 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java @@ -5,6 +5,8 @@ package com.azure.resourcemanager.netapp.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.DesiredRansomwareProtectionState; +import com.azure.resourcemanager.netapp.models.RansomwareProtectionPatchSettings; import com.azure.resourcemanager.netapp.models.VolumeBackupProperties; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties; @@ -14,25 +16,31 @@ public final class VolumePatchPropertiesDataProtectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePatchPropertiesDataProtection model = BinaryData.fromString( - "{\"backup\":{\"backupPolicyId\":\"vxysl\",\"policyEnforced\":true,\"backupVaultId\":\"fxoblytkb\"},\"snapshot\":{\"snapshotPolicyId\":\"ewwwfbkrvrnsv\"}}") + "{\"backup\":{\"backupPolicyId\":\"hin\",\"policyEnforced\":false,\"backupVaultId\":\"mifthnzdnd\"},\"snapshot\":{\"snapshotPolicyId\":\"nayqi\"},\"ransomwareProtection\":{\"desiredRansomwareProtectionState\":\"Enabled\"}}") .toObject(VolumePatchPropertiesDataProtection.class); - Assertions.assertEquals("vxysl", model.backup().backupPolicyId()); - Assertions.assertTrue(model.backup().policyEnforced()); - Assertions.assertEquals("fxoblytkb", model.backup().backupVaultId()); - Assertions.assertEquals("ewwwfbkrvrnsv", model.snapshot().snapshotPolicyId()); + Assertions.assertEquals("hin", model.backup().backupPolicyId()); + Assertions.assertFalse(model.backup().policyEnforced()); + Assertions.assertEquals("mifthnzdnd", model.backup().backupVaultId()); + Assertions.assertEquals("nayqi", model.snapshot().snapshotPolicyId()); + Assertions.assertEquals(DesiredRansomwareProtectionState.ENABLED, + model.ransomwareProtection().desiredRansomwareProtectionState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VolumePatchPropertiesDataProtection model = new VolumePatchPropertiesDataProtection() - .withBackup(new VolumeBackupProperties().withBackupPolicyId("vxysl") - .withPolicyEnforced(true) - .withBackupVaultId("fxoblytkb")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("ewwwfbkrvrnsv")); + .withBackup(new VolumeBackupProperties().withBackupPolicyId("hin") + .withPolicyEnforced(false) + .withBackupVaultId("mifthnzdnd")) + .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("nayqi")) + .withRansomwareProtection(new RansomwareProtectionPatchSettings() + .withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState.ENABLED)); model = BinaryData.fromObject(model).toObject(VolumePatchPropertiesDataProtection.class); - Assertions.assertEquals("vxysl", model.backup().backupPolicyId()); - Assertions.assertTrue(model.backup().policyEnforced()); - Assertions.assertEquals("fxoblytkb", model.backup().backupVaultId()); - Assertions.assertEquals("ewwwfbkrvrnsv", model.snapshot().snapshotPolicyId()); + Assertions.assertEquals("hin", model.backup().backupPolicyId()); + Assertions.assertFalse(model.backup().policyEnforced()); + Assertions.assertEquals("mifthnzdnd", model.backup().backupVaultId()); + Assertions.assertEquals("nayqi", model.snapshot().snapshotPolicyId()); + Assertions.assertEquals(DesiredRansomwareProtectionState.ENABLED, + model.ransomwareProtection().desiredRansomwareProtectionState()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java index 496d66640c74..ae03a5d6509c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java @@ -15,88 +15,103 @@ public final class VolumePatchPropertiesExportPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePatchPropertiesExportPolicy model = BinaryData.fromString( - "{\"rules\":[{\"ruleIndex\":1990032205,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":true,\"allowedClients\":\"grcfb\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":1710295425,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"r\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":1314959549,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"tdo\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"}]}") + "{\"rules\":[{\"ruleIndex\":928990245,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"lyt\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1854550992,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"ovasrruvwbhsqfsu\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1379318840,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"zbexilzznfqqnvw\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":930552751,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"rjerv\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"}]}") .toObject(VolumePatchPropertiesExportPolicy.class); - Assertions.assertEquals(1990032205, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(928990245, model.rules().get(0).ruleIndex()); Assertions.assertTrue(model.rules().get(0).unixReadOnly()); - Assertions.assertFalse(model.rules().get(0).unixReadWrite()); - Assertions.assertFalse(model.rules().get(0).kerberos5ReadOnly()); + Assertions.assertTrue(model.rules().get(0).unixReadWrite()); + Assertions.assertTrue(model.rules().get(0).kerberos5ReadOnly()); Assertions.assertFalse(model.rules().get(0).kerberos5ReadWrite()); - Assertions.assertTrue(model.rules().get(0).kerberos5IReadOnly()); + Assertions.assertFalse(model.rules().get(0).kerberos5IReadOnly()); Assertions.assertFalse(model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertTrue(model.rules().get(0).kerberos5PReadOnly()); + Assertions.assertFalse(model.rules().get(0).kerberos5PReadOnly()); Assertions.assertTrue(model.rules().get(0).kerberos5PReadWrite()); Assertions.assertTrue(model.rules().get(0).cifs()); - Assertions.assertFalse(model.rules().get(0).nfsv3()); - Assertions.assertTrue(model.rules().get(0).nfsv41()); - Assertions.assertEquals("grcfb", model.rules().get(0).allowedClients()); + Assertions.assertTrue(model.rules().get(0).nfsv3()); + Assertions.assertFalse(model.rules().get(0).nfsv41()); + Assertions.assertEquals("lyt", model.rules().get(0).allowedClients()); Assertions.assertTrue(model.rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.UNRESTRICTED, model.rules().get(0).chownMode()); + Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VolumePatchPropertiesExportPolicy model = new VolumePatchPropertiesExportPolicy().withRules(Arrays.asList( - new ExportPolicyRule().withRuleIndex(1990032205) + new ExportPolicyRule().withRuleIndex(928990245) .withUnixReadOnly(true) - .withUnixReadWrite(false) - .withKerberos5ReadOnly(false) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(true) .withKerberos5ReadWrite(false) - .withKerberos5IReadOnly(true) + .withKerberos5IReadOnly(false) .withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(true) + .withKerberos5PReadOnly(false) .withKerberos5PReadWrite(true) .withCifs(true) - .withNfsv3(false) - .withNfsv41(true) - .withAllowedClients("grcfb") + .withNfsv3(true) + .withNfsv41(false) + .withAllowedClients("lyt") .withHasRootAccess(true) - .withChownMode(ChownMode.UNRESTRICTED), - new ExportPolicyRule().withRuleIndex(1710295425) - .withUnixReadOnly(false) + .withChownMode(ChownMode.RESTRICTED), + new ExportPolicyRule().withRuleIndex(1854550992) + .withUnixReadOnly(true) .withUnixReadWrite(true) .withKerberos5ReadOnly(true) .withKerberos5ReadWrite(false) - .withKerberos5IReadOnly(false) + .withKerberos5IReadOnly(true) + .withKerberos5IReadWrite(true) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(true) + .withCifs(false) + .withNfsv3(true) + .withNfsv41(true) + .withAllowedClients("ovasrruvwbhsqfsu") + .withHasRootAccess(false) + .withChownMode(ChownMode.RESTRICTED), + new ExportPolicyRule().withRuleIndex(1379318840) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(true) + .withKerberos5ReadWrite(true) + .withKerberos5IReadOnly(true) .withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(true) + .withKerberos5PReadOnly(false) .withKerberos5PReadWrite(false) - .withCifs(true) - .withNfsv3(false) + .withCifs(false) + .withNfsv3(true) .withNfsv41(false) - .withAllowedClients("r") + .withAllowedClients("zbexilzznfqqnvw") .withHasRootAccess(true) .withChownMode(ChownMode.UNRESTRICTED), - new ExportPolicyRule().withRuleIndex(1314959549) + new ExportPolicyRule().withRuleIndex(930552751) .withUnixReadOnly(true) .withUnixReadWrite(true) - .withKerberos5ReadOnly(true) + .withKerberos5ReadOnly(false) .withKerberos5ReadWrite(false) .withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(false) + .withKerberos5IReadWrite(true) .withKerberos5PReadOnly(false) .withKerberos5PReadWrite(false) - .withCifs(true) + .withCifs(false) .withNfsv3(true) .withNfsv41(true) - .withAllowedClients("tdo") - .withHasRootAccess(true) + .withAllowedClients("rjerv") + .withHasRootAccess(false) .withChownMode(ChownMode.RESTRICTED))); model = BinaryData.fromObject(model).toObject(VolumePatchPropertiesExportPolicy.class); - Assertions.assertEquals(1990032205, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(928990245, model.rules().get(0).ruleIndex()); Assertions.assertTrue(model.rules().get(0).unixReadOnly()); - Assertions.assertFalse(model.rules().get(0).unixReadWrite()); - Assertions.assertFalse(model.rules().get(0).kerberos5ReadOnly()); + Assertions.assertTrue(model.rules().get(0).unixReadWrite()); + Assertions.assertTrue(model.rules().get(0).kerberos5ReadOnly()); Assertions.assertFalse(model.rules().get(0).kerberos5ReadWrite()); - Assertions.assertTrue(model.rules().get(0).kerberos5IReadOnly()); + Assertions.assertFalse(model.rules().get(0).kerberos5IReadOnly()); Assertions.assertFalse(model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertTrue(model.rules().get(0).kerberos5PReadOnly()); + Assertions.assertFalse(model.rules().get(0).kerberos5PReadOnly()); Assertions.assertTrue(model.rules().get(0).kerberos5PReadWrite()); Assertions.assertTrue(model.rules().get(0).cifs()); - Assertions.assertFalse(model.rules().get(0).nfsv3()); - Assertions.assertTrue(model.rules().get(0).nfsv41()); - Assertions.assertEquals("grcfb", model.rules().get(0).allowedClients()); + Assertions.assertTrue(model.rules().get(0).nfsv3()); + Assertions.assertFalse(model.rules().get(0).nfsv41()); + Assertions.assertEquals("lyt", model.rules().get(0).allowedClients()); Assertions.assertTrue(model.rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.UNRESTRICTED, model.rules().get(0).chownMode()); + Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java index 69616e9cef5b..35c4d2e7b9c1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.netapp.models.ChownMode; import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; import com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy; +import com.azure.resourcemanager.netapp.models.DesiredRansomwareProtectionState; import com.azure.resourcemanager.netapp.models.ExportPolicyRule; +import com.azure.resourcemanager.netapp.models.RansomwareProtectionPatchSettings; import com.azure.resourcemanager.netapp.models.ServiceLevel; import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; @@ -24,115 +26,151 @@ public final class VolumePatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePatchProperties model = BinaryData.fromString( - "{\"serviceLevel\":\"Standard\",\"usageThreshold\":8523587026698323408,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":2120108327,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"pnyiropuhp\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"}]},\"protocolTypes\":[\"gqgitxmedjvcsl\"],\"throughputMibps\":31.70938,\"dataProtection\":{\"backup\":{\"backupPolicyId\":\"cwzzhxgktr\",\"policyEnforced\":true,\"backupVaultId\":\"napkteoellw\"},\"snapshot\":{\"snapshotPolicyId\":\"d\"}},\"isDefaultQuotaEnabled\":true,\"defaultUserQuotaInKiBs\":4189677250965468268,\"defaultGroupQuotaInKiBs\":1621994351674627524,\"unixPermissions\":\"op\",\"coolAccess\":false,\"coolnessPeriod\":1219903446,\"coolAccessRetrievalPolicy\":\"OnRead\",\"coolAccessTieringPolicy\":\"Auto\",\"snapshotDirectoryVisible\":true,\"smbAccessBasedEnumeration\":\"Disabled\",\"smbNonBrowsable\":\"Disabled\"}") + "{\"serviceLevel\":\"StandardZRS\",\"usageThreshold\":1865985112447305959,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":2006567111,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"igvpgylg\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":613009021,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"gucnapkte\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"},{\"ruleIndex\":207287294,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"pppcqeqxo\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"}]},\"protocolTypes\":[\"ctobg\"],\"throughputMibps\":62.614918,\"dataProtection\":{\"backup\":{\"backupPolicyId\":\"zpostmgrcfbu\",\"policyEnforced\":true,\"backupVaultId\":\"qjhhkxbpv\"},\"snapshot\":{\"snapshotPolicyId\":\"jhxxjyn\"},\"ransomwareProtection\":{\"desiredRansomwareProtectionState\":\"Disabled\"}},\"isDefaultQuotaEnabled\":true,\"defaultUserQuotaInKiBs\":4307954737438243119,\"defaultGroupQuotaInKiBs\":4478371279557844955,\"unixPermissions\":\"zvszj\",\"coolAccess\":true,\"coolnessPeriod\":34322019,\"coolAccessRetrievalPolicy\":\"Default\",\"coolAccessTieringPolicy\":\"Auto\",\"snapshotDirectoryVisible\":false,\"smbAccessBasedEnumeration\":\"Disabled\",\"smbNonBrowsable\":\"Disabled\"}") .toObject(VolumePatchProperties.class); - Assertions.assertEquals(ServiceLevel.STANDARD, model.serviceLevel()); - Assertions.assertEquals(8523587026698323408L, model.usageThreshold()); - Assertions.assertEquals(2120108327, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, model.serviceLevel()); + Assertions.assertEquals(1865985112447305959L, model.usageThreshold()); + Assertions.assertEquals(2006567111, model.exportPolicy().rules().get(0).ruleIndex()); Assertions.assertFalse(model.exportPolicy().rules().get(0).unixReadOnly()); Assertions.assertFalse(model.exportPolicy().rules().get(0).unixReadWrite()); - Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5ReadOnly()); + Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5ReadOnly()); Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5ReadWrite()); Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5IReadOnly()); - Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5IReadWrite()); - Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5PReadOnly()); + Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5IReadWrite()); + Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5PReadOnly()); Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5PReadWrite()); Assertions.assertTrue(model.exportPolicy().rules().get(0).cifs()); - Assertions.assertTrue(model.exportPolicy().rules().get(0).nfsv3()); - Assertions.assertTrue(model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("pnyiropuhp", model.exportPolicy().rules().get(0).allowedClients()); + Assertions.assertFalse(model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertFalse(model.exportPolicy().rules().get(0).nfsv41()); + Assertions.assertEquals("igvpgylg", model.exportPolicy().rules().get(0).allowedClients()); Assertions.assertTrue(model.exportPolicy().rules().get(0).hasRootAccess()); Assertions.assertEquals(ChownMode.UNRESTRICTED, model.exportPolicy().rules().get(0).chownMode()); - Assertions.assertEquals("gqgitxmedjvcsl", model.protocolTypes().get(0)); - Assertions.assertEquals(31.70938F, model.throughputMibps()); - Assertions.assertEquals("cwzzhxgktr", model.dataProtection().backup().backupPolicyId()); + Assertions.assertEquals("ctobg", model.protocolTypes().get(0)); + Assertions.assertEquals(62.614918F, model.throughputMibps()); + Assertions.assertEquals("zpostmgrcfbu", model.dataProtection().backup().backupPolicyId()); Assertions.assertTrue(model.dataProtection().backup().policyEnforced()); - Assertions.assertEquals("napkteoellw", model.dataProtection().backup().backupVaultId()); - Assertions.assertEquals("d", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals("qjhhkxbpv", model.dataProtection().backup().backupVaultId()); + Assertions.assertEquals("jhxxjyn", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, + model.dataProtection().ransomwareProtection().desiredRansomwareProtectionState()); Assertions.assertTrue(model.isDefaultQuotaEnabled()); - Assertions.assertEquals(4189677250965468268L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(1621994351674627524L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("op", model.unixPermissions()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(1219903446, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.ON_READ, model.coolAccessRetrievalPolicy()); + Assertions.assertEquals(4307954737438243119L, model.defaultUserQuotaInKiBs()); + Assertions.assertEquals(4478371279557844955L, model.defaultGroupQuotaInKiBs()); + Assertions.assertEquals("zvszj", model.unixPermissions()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(34322019, model.coolnessPeriod()); + Assertions.assertEquals(CoolAccessRetrievalPolicy.DEFAULT, model.coolAccessRetrievalPolicy()); Assertions.assertEquals(CoolAccessTieringPolicy.AUTO, model.coolAccessTieringPolicy()); - Assertions.assertTrue(model.snapshotDirectoryVisible()); + Assertions.assertFalse(model.snapshotDirectoryVisible()); Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumePatchProperties model = new VolumePatchProperties().withServiceLevel(ServiceLevel.STANDARD) - .withUsageThreshold(8523587026698323408L) - .withExportPolicy(new VolumePatchPropertiesExportPolicy() - .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(2120108327) + VolumePatchProperties model = new VolumePatchProperties().withServiceLevel(ServiceLevel.STANDARD_ZRS) + .withUsageThreshold(1865985112447305959L) + .withExportPolicy(new VolumePatchPropertiesExportPolicy().withRules(Arrays.asList( + new ExportPolicyRule().withRuleIndex(2006567111) .withUnixReadOnly(false) .withUnixReadWrite(false) - .withKerberos5ReadOnly(true) + .withKerberos5ReadOnly(false) .withKerberos5ReadWrite(true) .withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false) + .withKerberos5IReadWrite(true) + .withKerberos5PReadOnly(true) .withKerberos5PReadWrite(false) .withCifs(true) + .withNfsv3(false) + .withNfsv41(false) + .withAllowedClients("igvpgylg") + .withHasRootAccess(true) + .withChownMode(ChownMode.UNRESTRICTED), + new ExportPolicyRule().withRuleIndex(613009021) + .withUnixReadOnly(false) + .withUnixReadWrite(false) + .withKerberos5ReadOnly(true) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(true) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(true) + .withCifs(false) .withNfsv3(true) - .withNfsv41(true) - .withAllowedClients("pnyiropuhp") + .withNfsv41(false) + .withAllowedClients("gucnapkte") + .withHasRootAccess(false) + .withChownMode(ChownMode.RESTRICTED), + new ExportPolicyRule().withRuleIndex(207287294) + .withUnixReadOnly(false) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(true) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(true) + .withKerberos5PReadOnly(true) + .withKerberos5PReadWrite(true) + .withCifs(true) + .withNfsv3(false) + .withNfsv41(false) + .withAllowedClients("pppcqeqxo") .withHasRootAccess(true) - .withChownMode(ChownMode.UNRESTRICTED)))) - .withProtocolTypes(Arrays.asList("gqgitxmedjvcsl")) - .withThroughputMibps(31.70938F) + .withChownMode(ChownMode.RESTRICTED)))) + .withProtocolTypes(Arrays.asList("ctobg")) + .withThroughputMibps(62.614918F) .withDataProtection(new VolumePatchPropertiesDataProtection() - .withBackup(new VolumeBackupProperties().withBackupPolicyId("cwzzhxgktr") + .withBackup(new VolumeBackupProperties().withBackupPolicyId("zpostmgrcfbu") .withPolicyEnforced(true) - .withBackupVaultId("napkteoellw")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("d"))) + .withBackupVaultId("qjhhkxbpv")) + .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("jhxxjyn")) + .withRansomwareProtection(new RansomwareProtectionPatchSettings() + .withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState.DISABLED))) .withIsDefaultQuotaEnabled(true) - .withDefaultUserQuotaInKiBs(4189677250965468268L) - .withDefaultGroupQuotaInKiBs(1621994351674627524L) - .withUnixPermissions("op") - .withCoolAccess(false) - .withCoolnessPeriod(1219903446) - .withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.ON_READ) + .withDefaultUserQuotaInKiBs(4307954737438243119L) + .withDefaultGroupQuotaInKiBs(4478371279557844955L) + .withUnixPermissions("zvszj") + .withCoolAccess(true) + .withCoolnessPeriod(34322019) + .withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.DEFAULT) .withCoolAccessTieringPolicy(CoolAccessTieringPolicy.AUTO) - .withSnapshotDirectoryVisible(true) + .withSnapshotDirectoryVisible(false) .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) .withSmbNonBrowsable(SmbNonBrowsable.DISABLED); model = BinaryData.fromObject(model).toObject(VolumePatchProperties.class); - Assertions.assertEquals(ServiceLevel.STANDARD, model.serviceLevel()); - Assertions.assertEquals(8523587026698323408L, model.usageThreshold()); - Assertions.assertEquals(2120108327, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, model.serviceLevel()); + Assertions.assertEquals(1865985112447305959L, model.usageThreshold()); + Assertions.assertEquals(2006567111, model.exportPolicy().rules().get(0).ruleIndex()); Assertions.assertFalse(model.exportPolicy().rules().get(0).unixReadOnly()); Assertions.assertFalse(model.exportPolicy().rules().get(0).unixReadWrite()); - Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5ReadOnly()); + Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5ReadOnly()); Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5ReadWrite()); Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5IReadOnly()); - Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5IReadWrite()); - Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5PReadOnly()); + Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5IReadWrite()); + Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5PReadOnly()); Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5PReadWrite()); Assertions.assertTrue(model.exportPolicy().rules().get(0).cifs()); - Assertions.assertTrue(model.exportPolicy().rules().get(0).nfsv3()); - Assertions.assertTrue(model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("pnyiropuhp", model.exportPolicy().rules().get(0).allowedClients()); + Assertions.assertFalse(model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertFalse(model.exportPolicy().rules().get(0).nfsv41()); + Assertions.assertEquals("igvpgylg", model.exportPolicy().rules().get(0).allowedClients()); Assertions.assertTrue(model.exportPolicy().rules().get(0).hasRootAccess()); Assertions.assertEquals(ChownMode.UNRESTRICTED, model.exportPolicy().rules().get(0).chownMode()); - Assertions.assertEquals("gqgitxmedjvcsl", model.protocolTypes().get(0)); - Assertions.assertEquals(31.70938F, model.throughputMibps()); - Assertions.assertEquals("cwzzhxgktr", model.dataProtection().backup().backupPolicyId()); + Assertions.assertEquals("ctobg", model.protocolTypes().get(0)); + Assertions.assertEquals(62.614918F, model.throughputMibps()); + Assertions.assertEquals("zpostmgrcfbu", model.dataProtection().backup().backupPolicyId()); Assertions.assertTrue(model.dataProtection().backup().policyEnforced()); - Assertions.assertEquals("napkteoellw", model.dataProtection().backup().backupVaultId()); - Assertions.assertEquals("d", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals("qjhhkxbpv", model.dataProtection().backup().backupVaultId()); + Assertions.assertEquals("jhxxjyn", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, + model.dataProtection().ransomwareProtection().desiredRansomwareProtectionState()); Assertions.assertTrue(model.isDefaultQuotaEnabled()); - Assertions.assertEquals(4189677250965468268L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(1621994351674627524L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("op", model.unixPermissions()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(1219903446, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.ON_READ, model.coolAccessRetrievalPolicy()); + Assertions.assertEquals(4307954737438243119L, model.defaultUserQuotaInKiBs()); + Assertions.assertEquals(4478371279557844955L, model.defaultGroupQuotaInKiBs()); + Assertions.assertEquals("zvszj", model.unixPermissions()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(34322019, model.coolnessPeriod()); + Assertions.assertEquals(CoolAccessRetrievalPolicy.DEFAULT, model.coolAccessRetrievalPolicy()); Assertions.assertEquals(CoolAccessTieringPolicy.AUTO, model.coolAccessTieringPolicy()); - Assertions.assertTrue(model.snapshotDirectoryVisible()); + Assertions.assertFalse(model.snapshotDirectoryVisible()); Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java index d0c4765b70e2..55db1f82bb00 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.netapp.models.ChownMode; import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; import com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy; +import com.azure.resourcemanager.netapp.models.DesiredRansomwareProtectionState; import com.azure.resourcemanager.netapp.models.ExportPolicyRule; +import com.azure.resourcemanager.netapp.models.RansomwareProtectionPatchSettings; import com.azure.resourcemanager.netapp.models.ServiceLevel; import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; @@ -26,7 +28,7 @@ public final class VolumePatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePatch model = BinaryData.fromString( - "{\"location\":\"ow\",\"id\":\"przqlveu\",\"name\":\"upjm\",\"type\":\"fxobbcsws\",\"tags\":{\"fgb\":\"riplrbpbewtg\",\"wxzvlvqhjkb\":\"c\",\"iebwwaloayqcgwrt\":\"gibtnm\",\"zg\":\"j\"},\"properties\":{\"serviceLevel\":\"Standard\",\"usageThreshold\":4114340895697399622,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":351214213,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"hprwmdyv\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":1285325454,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"mefqsgzvahapjyzh\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":141640204,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"vzunluthnnprnxi\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1819249918,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"gpw\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"}]},\"protocolTypes\":[\"bsjyofdx\"],\"throughputMibps\":7.019162,\"dataProtection\":{\"backup\":{\"backupPolicyId\":\"touwaboekqv\",\"policyEnforced\":false,\"backupVaultId\":\"smv\"},\"snapshot\":{\"snapshotPolicyId\":\"yjsflhhcaalnji\"}},\"isDefaultQuotaEnabled\":true,\"defaultUserQuotaInKiBs\":2531128431130049580,\"defaultGroupQuotaInKiBs\":4035973624859613630,\"unixPermissions\":\"aq\",\"coolAccess\":false,\"coolnessPeriod\":2113030944,\"coolAccessRetrievalPolicy\":\"Default\",\"coolAccessTieringPolicy\":\"SnapshotOnly\",\"snapshotDirectoryVisible\":false,\"smbAccessBasedEnumeration\":\"Enabled\",\"smbNonBrowsable\":\"Enabled\"}}") + "{\"location\":\"ow\",\"id\":\"przqlveu\",\"name\":\"upjm\",\"type\":\"fxobbcsws\",\"tags\":{\"fgb\":\"riplrbpbewtg\",\"wxzvlvqhjkb\":\"c\",\"iebwwaloayqcgwrt\":\"gibtnm\",\"zg\":\"j\"},\"properties\":{\"serviceLevel\":\"Standard\",\"usageThreshold\":4114340895697399622,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":351214213,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"hprwmdyv\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":1285325454,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"mefqsgzvahapjyzh\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":141640204,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"vzunluthnnprnxi\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1819249918,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"gpw\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"}]},\"protocolTypes\":[\"bsjyofdx\"],\"throughputMibps\":7.019162,\"dataProtection\":{\"backup\":{\"backupPolicyId\":\"touwaboekqv\",\"policyEnforced\":false,\"backupVaultId\":\"smv\"},\"snapshot\":{\"snapshotPolicyId\":\"yjsflhhcaalnji\"},\"ransomwareProtection\":{\"desiredRansomwareProtectionState\":\"Disabled\"}},\"isDefaultQuotaEnabled\":true,\"defaultUserQuotaInKiBs\":4035973624859613630,\"defaultGroupQuotaInKiBs\":1491917692598460988,\"unixPermissions\":\"slyjpkiid\",\"coolAccess\":true,\"coolnessPeriod\":1841035114,\"coolAccessRetrievalPolicy\":\"Default\",\"coolAccessTieringPolicy\":\"Auto\",\"snapshotDirectoryVisible\":false,\"smbAccessBasedEnumeration\":\"Disabled\",\"smbNonBrowsable\":\"Disabled\"}}") .toObject(VolumePatch.class); Assertions.assertEquals("ow", model.location()); Assertions.assertEquals("riplrbpbewtg", model.tags().get("fgb")); @@ -53,17 +55,19 @@ public void testDeserialize() throws Exception { Assertions.assertFalse(model.dataProtection().backup().policyEnforced()); Assertions.assertEquals("smv", model.dataProtection().backup().backupVaultId()); Assertions.assertEquals("yjsflhhcaalnji", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, + model.dataProtection().ransomwareProtection().desiredRansomwareProtectionState()); Assertions.assertTrue(model.isDefaultQuotaEnabled()); - Assertions.assertEquals(2531128431130049580L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(4035973624859613630L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("aq", model.unixPermissions()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(2113030944, model.coolnessPeriod()); + Assertions.assertEquals(4035973624859613630L, model.defaultUserQuotaInKiBs()); + Assertions.assertEquals(1491917692598460988L, model.defaultGroupQuotaInKiBs()); + Assertions.assertEquals("slyjpkiid", model.unixPermissions()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(1841035114, model.coolnessPeriod()); Assertions.assertEquals(CoolAccessRetrievalPolicy.DEFAULT, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(CoolAccessTieringPolicy.SNAPSHOT_ONLY, model.coolAccessTieringPolicy()); + Assertions.assertEquals(CoolAccessTieringPolicy.AUTO, model.coolAccessTieringPolicy()); Assertions.assertFalse(model.snapshotDirectoryVisible()); - Assertions.assertEquals(SmbAccessBasedEnumeration.ENABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); + Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); + Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); } @org.junit.jupiter.api.Test @@ -139,18 +143,20 @@ public void testSerialize() throws Exception { .withBackup(new VolumeBackupProperties().withBackupPolicyId("touwaboekqv") .withPolicyEnforced(false) .withBackupVaultId("smv")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("yjsflhhcaalnji"))) + .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("yjsflhhcaalnji")) + .withRansomwareProtection(new RansomwareProtectionPatchSettings() + .withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState.DISABLED))) .withIsDefaultQuotaEnabled(true) - .withDefaultUserQuotaInKiBs(2531128431130049580L) - .withDefaultGroupQuotaInKiBs(4035973624859613630L) - .withUnixPermissions("aq") - .withCoolAccess(false) - .withCoolnessPeriod(2113030944) + .withDefaultUserQuotaInKiBs(4035973624859613630L) + .withDefaultGroupQuotaInKiBs(1491917692598460988L) + .withUnixPermissions("slyjpkiid") + .withCoolAccess(true) + .withCoolnessPeriod(1841035114) .withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.DEFAULT) - .withCoolAccessTieringPolicy(CoolAccessTieringPolicy.SNAPSHOT_ONLY) + .withCoolAccessTieringPolicy(CoolAccessTieringPolicy.AUTO) .withSnapshotDirectoryVisible(false) - .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.ENABLED) - .withSmbNonBrowsable(SmbNonBrowsable.ENABLED); + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED); model = BinaryData.fromObject(model).toObject(VolumePatch.class); Assertions.assertEquals("ow", model.location()); Assertions.assertEquals("riplrbpbewtg", model.tags().get("fgb")); @@ -177,17 +183,19 @@ public void testSerialize() throws Exception { Assertions.assertFalse(model.dataProtection().backup().policyEnforced()); Assertions.assertEquals("smv", model.dataProtection().backup().backupVaultId()); Assertions.assertEquals("yjsflhhcaalnji", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, + model.dataProtection().ransomwareProtection().desiredRansomwareProtectionState()); Assertions.assertTrue(model.isDefaultQuotaEnabled()); - Assertions.assertEquals(2531128431130049580L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(4035973624859613630L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("aq", model.unixPermissions()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(2113030944, model.coolnessPeriod()); + Assertions.assertEquals(4035973624859613630L, model.defaultUserQuotaInKiBs()); + Assertions.assertEquals(1491917692598460988L, model.defaultGroupQuotaInKiBs()); + Assertions.assertEquals("slyjpkiid", model.unixPermissions()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(1841035114, model.coolnessPeriod()); Assertions.assertEquals(CoolAccessRetrievalPolicy.DEFAULT, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(CoolAccessTieringPolicy.SNAPSHOT_ONLY, model.coolAccessTieringPolicy()); + Assertions.assertEquals(CoolAccessTieringPolicy.AUTO, model.coolAccessTieringPolicy()); Assertions.assertFalse(model.snapshotDirectoryVisible()); - Assertions.assertEquals(SmbAccessBasedEnumeration.ENABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); + Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); + Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java index c5cb2e26de4e..ee47ea5212ad 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java @@ -5,6 +5,8 @@ package com.azure.resourcemanager.netapp.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.DesiredRansomwareProtectionState; +import com.azure.resourcemanager.netapp.models.RansomwareProtectionSettings; import com.azure.resourcemanager.netapp.models.RemotePath; import com.azure.resourcemanager.netapp.models.ReplicationObject; import com.azure.resourcemanager.netapp.models.ReplicationSchedule; @@ -18,7 +20,7 @@ public final class VolumePropertiesDataProtectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePropertiesDataProtection model = BinaryData.fromString( - "{\"backup\":{\"backupPolicyId\":\"rvjx\",\"policyEnforced\":true,\"backupVaultId\":\"pydptko\"},\"replication\":{\"replicationId\":\"ou\",\"endpointType\":\"dst\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"tiukbldngkpoci\",\"remotePath\":{\"externalHostName\":\"z\",\"serverName\":\"xoegukgjnpiucgy\",\"volumeName\":\"evqzntypmrbp\"},\"remoteVolumeRegion\":\"c\",\"destinationReplications\":[{\"resourceId\":\"sdpydnfyhxdeoejz\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"fsj\",\"zone\":\"gzfbishcbk\"},{\"resourceId\":\"jdeyeamdpha\",\"replicationType\":\"CrossZoneReplication\",\"region\":\"buxwgip\",\"zone\":\"onowk\"},{\"resourceId\":\"hwankixzbinjepu\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"ywnuzoq\",\"zone\":\"iyqzrnk\"},{\"resourceId\":\"vyxlwhzlsicohoqq\",\"replicationType\":\"CrossZoneReplication\",\"region\":\"ryavwhheunmmqh\",\"zone\":\"xzko\"}]},\"snapshot\":{\"snapshotPolicyId\":\"uko\"},\"volumeRelocation\":{\"relocationRequested\":false,\"readyToBeFinalized\":true}}") + "{\"backup\":{\"backupPolicyId\":\"rvjx\",\"policyEnforced\":true,\"backupVaultId\":\"pydptko\"},\"replication\":{\"replicationId\":\"ou\",\"endpointType\":\"dst\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"tiukbldngkpoci\",\"remotePath\":{\"externalHostName\":\"z\",\"serverName\":\"xoegukgjnpiucgy\",\"volumeName\":\"evqzntypmrbp\"},\"remoteVolumeRegion\":\"c\",\"destinationReplications\":[{\"resourceId\":\"sdpydnfyhxdeoejz\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"fsj\",\"zone\":\"gzfbishcbk\"},{\"resourceId\":\"jdeyeamdpha\",\"replicationType\":\"CrossZoneReplication\",\"region\":\"buxwgip\",\"zone\":\"onowk\"},{\"resourceId\":\"hwankixzbinjepu\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"ywnuzoq\",\"zone\":\"iyqzrnk\"},{\"resourceId\":\"vyxlwhzlsicohoqq\",\"replicationType\":\"CrossZoneReplication\",\"region\":\"ryavwhheunmmqh\",\"zone\":\"xzko\"}],\"externalReplicationSetupStatus\":\"VServerPeerRequired\",\"externalReplicationSetupInfo\":\"koklya\",\"mirrorState\":\"Broken\",\"relationshipStatus\":\"Transferring\"},\"snapshot\":{\"snapshotPolicyId\":\"szfkbe\"},\"volumeRelocation\":{\"relocationRequested\":true,\"readyToBeFinalized\":true},\"ransomwareProtection\":{\"desiredRansomwareProtectionState\":\"Disabled\",\"actualRansomwareProtectionState\":\"Learning\"}}") .toObject(VolumePropertiesDataProtection.class); Assertions.assertEquals("rvjx", model.backup().backupPolicyId()); Assertions.assertTrue(model.backup().policyEnforced()); @@ -29,8 +31,10 @@ public void testDeserialize() throws Exception { Assertions.assertEquals("xoegukgjnpiucgy", model.replication().remotePath().serverName()); Assertions.assertEquals("evqzntypmrbp", model.replication().remotePath().volumeName()); Assertions.assertEquals("c", model.replication().remoteVolumeRegion()); - Assertions.assertEquals("uko", model.snapshot().snapshotPolicyId()); - Assertions.assertFalse(model.volumeRelocation().relocationRequested()); + Assertions.assertEquals("szfkbe", model.snapshot().snapshotPolicyId()); + Assertions.assertTrue(model.volumeRelocation().relocationRequested()); + Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, + model.ransomwareProtection().desiredRansomwareProtectionState()); } @org.junit.jupiter.api.Test @@ -45,8 +49,10 @@ public void testSerialize() throws Exception { .withServerName("xoegukgjnpiucgy") .withVolumeName("evqzntypmrbp")) .withRemoteVolumeRegion("c")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("uko")) - .withVolumeRelocation(new VolumeRelocationProperties().withRelocationRequested(false)); + .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("szfkbe")) + .withVolumeRelocation(new VolumeRelocationProperties().withRelocationRequested(true)) + .withRansomwareProtection(new RansomwareProtectionSettings() + .withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState.DISABLED)); model = BinaryData.fromObject(model).toObject(VolumePropertiesDataProtection.class); Assertions.assertEquals("rvjx", model.backup().backupPolicyId()); Assertions.assertTrue(model.backup().policyEnforced()); @@ -57,7 +63,9 @@ public void testSerialize() throws Exception { Assertions.assertEquals("xoegukgjnpiucgy", model.replication().remotePath().serverName()); Assertions.assertEquals("evqzntypmrbp", model.replication().remotePath().volumeName()); Assertions.assertEquals("c", model.replication().remoteVolumeRegion()); - Assertions.assertEquals("uko", model.snapshot().snapshotPolicyId()); - Assertions.assertFalse(model.volumeRelocation().relocationRequested()); + Assertions.assertEquals("szfkbe", model.snapshot().snapshotPolicyId()); + Assertions.assertTrue(model.volumeRelocation().relocationRequested()); + Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, + model.ransomwareProtection().desiredRansomwareProtectionState()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java index 120bb373cecf..bd3744a4710e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java @@ -15,29 +15,28 @@ public final class VolumeQuotaRuleInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeQuotaRuleInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"quotaSizeInKiBs\":3593253472995446368,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"unyowxwl\"},\"location\":\"jrkvfgbvfvpdbo\",\"tags\":{\"bdeibqipqk\":\"izsjqlhkrr\",\"rwkq\":\"hvxndzwmkrefajpj\",\"sjabibs\":\"yhgbijtjivfx\",\"bjxbkzbzk\":\"stawfsdjpvkv\"},\"id\":\"vncjabudurgk\",\"name\":\"kmokz\",\"type\":\"jjklff\"}") + "{\"properties\":{\"provisioningState\":\"Deleting\",\"quotaSizeInKiBs\":8747326600288664838,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"cizsjqlhkrribdei\"},\"location\":\"ipqkghvxndzwm\",\"tags\":{\"nyhgbijtji\":\"fajpjorwk\",\"wfsdjpvkvpbj\":\"fxzsjabibsyst\"},\"id\":\"bkzbzkd\",\"name\":\"ncj\",\"type\":\"budurgkakmo\"}") .toObject(VolumeQuotaRuleInner.class); - Assertions.assertEquals("jrkvfgbvfvpdbo", model.location()); - Assertions.assertEquals("izsjqlhkrr", model.tags().get("bdeibqipqk")); - Assertions.assertEquals(3593253472995446368L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("unyowxwl", model.quotaTarget()); + Assertions.assertEquals("ipqkghvxndzwm", model.location()); + Assertions.assertEquals("fajpjorwk", model.tags().get("nyhgbijtji")); + Assertions.assertEquals(8747326600288664838L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("cizsjqlhkrribdei", model.quotaTarget()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeQuotaRuleInner model = new VolumeQuotaRuleInner().withLocation("jrkvfgbvfvpdbo") - .withTags(mapOf("bdeibqipqk", "izsjqlhkrr", "rwkq", "hvxndzwmkrefajpj", "sjabibs", "yhgbijtjivfx", - "bjxbkzbzk", "stawfsdjpvkv")) - .withQuotaSizeInKiBs(3593253472995446368L) - .withQuotaType(Type.DEFAULT_USER_QUOTA) - .withQuotaTarget("unyowxwl"); + VolumeQuotaRuleInner model = new VolumeQuotaRuleInner().withLocation("ipqkghvxndzwm") + .withTags(mapOf("nyhgbijtji", "fajpjorwk", "wfsdjpvkvpbj", "fxzsjabibsyst")) + .withQuotaSizeInKiBs(8747326600288664838L) + .withQuotaType(Type.DEFAULT_GROUP_QUOTA) + .withQuotaTarget("cizsjqlhkrribdei"); model = BinaryData.fromObject(model).toObject(VolumeQuotaRuleInner.class); - Assertions.assertEquals("jrkvfgbvfvpdbo", model.location()); - Assertions.assertEquals("izsjqlhkrr", model.tags().get("bdeibqipqk")); - Assertions.assertEquals(3593253472995446368L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("unyowxwl", model.quotaTarget()); + Assertions.assertEquals("ipqkghvxndzwm", model.location()); + Assertions.assertEquals("fajpjorwk", model.tags().get("nyhgbijtji")); + Assertions.assertEquals(8747326600288664838L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("cizsjqlhkrribdei", model.quotaTarget()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java index dc2e8a1d88ae..533f745628ae 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java @@ -15,26 +15,26 @@ public final class VolumeQuotaRulePatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeQuotaRulePatch model = BinaryData.fromString( - "{\"tags\":{\"ayuhqlbjbsy\":\"zi\",\"pgvmpipaslthaqfx\":\"bqwrvtldgm\",\"hneuyowqkd\":\"smwutwbdsrezpd\"},\"properties\":{\"provisioningState\":\"Accepted\",\"quotaSizeInKiBs\":1598919022248600128,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"gpikpzimejza\"}}") + "{\"tags\":{\"bjbsybb\":\"bizikayuhq\",\"ldgmfpgvmpip\":\"wrv\",\"x\":\"slthaq\"},\"properties\":{\"provisioningState\":\"Deleting\",\"quotaSizeInKiBs\":5146168087971383539,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"rezpdr\"}}") .toObject(VolumeQuotaRulePatch.class); - Assertions.assertEquals("zi", model.tags().get("ayuhqlbjbsy")); - Assertions.assertEquals(1598919022248600128L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("gpikpzimejza", model.quotaTarget()); + Assertions.assertEquals("bizikayuhq", model.tags().get("bjbsybb")); + Assertions.assertEquals(5146168087971383539L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("rezpdr", model.quotaTarget()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeQuotaRulePatch model = new VolumeQuotaRulePatch() - .withTags(mapOf("ayuhqlbjbsy", "zi", "pgvmpipaslthaqfx", "bqwrvtldgm", "hneuyowqkd", "smwutwbdsrezpd")) - .withQuotaSizeInKiBs(1598919022248600128L) - .withQuotaType(Type.DEFAULT_USER_QUOTA) - .withQuotaTarget("gpikpzimejza"); + VolumeQuotaRulePatch model + = new VolumeQuotaRulePatch().withTags(mapOf("bjbsybb", "bizikayuhq", "ldgmfpgvmpip", "wrv", "x", "slthaq")) + .withQuotaSizeInKiBs(5146168087971383539L) + .withQuotaType(Type.INDIVIDUAL_GROUP_QUOTA) + .withQuotaTarget("rezpdr"); model = BinaryData.fromObject(model).toObject(VolumeQuotaRulePatch.class); - Assertions.assertEquals("zi", model.tags().get("ayuhqlbjbsy")); - Assertions.assertEquals(1598919022248600128L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("gpikpzimejza", model.quotaTarget()); + Assertions.assertEquals("bizikayuhq", model.tags().get("bjbsybb")); + Assertions.assertEquals(5146168087971383539L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("rezpdr", model.quotaTarget()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java index 697e7fe2f50f..19c956035325 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java @@ -24,7 +24,7 @@ public final class VolumeQuotaRulesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":5182036247086876592,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"nb\"},\"location\":\"yggagflnlgmt\",\"tags\":{\"rohkpigqfusu\":\"hzjmucftbyrp\",\"alhhjnhgwydyynfs\":\"kzmkwklsnoxaxmqe\",\"qtanarfdlpuk\":\"khgb\"},\"id\":\"py\",\"name\":\"neizjcpe\",\"type\":\"gkhnmgbrouxddbh\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":8594198007990007248,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"nrzorpd\"},\"location\":\"bqc\",\"tags\":{\"xsaetg\":\"fg\",\"aqqilzdcduwjoed\":\"dgvpyig\",\"ilfjqqacdmk\":\"ngucaifpaurww\"},\"id\":\"wxdcvjwcyz\",\"name\":\"akeciqchx\",\"type\":\"tuicds\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,20 +34,20 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VolumeQuotaRule response = manager.volumeQuotaRules() - .define("qxfzyjqttvwk") - .withRegion("uaucmf") - .withExistingVolume("sysidfvclglxnf", "ijtk", "usqogsfikayia", "sharujtj") - .withTags(mapOf("vitac", "nlaxpunjqikcz", "oxhlw", "xmfcsserxhtv")) - .withQuotaSizeInKiBs(7019076429746863657L) + .define("chygtvxbyjane") + .withRegion("od") + .withExistingVolume("rhcekxgnly", "mxcpwzvmdoks", "dt", "wlwxlboncqbazqic") + .withTags(mapOf("aifmcwnosbzlehgc", "ohkxdxuw", "knjolgjyyxpve", "kb", "txwaljglzo", "szerqzevxoqei")) + .withQuotaSizeInKiBs(6162098462394021932L) .withQuotaType(Type.DEFAULT_USER_QUOTA) - .withQuotaTarget("bqeqqekewvnqvcd") + .withQuotaTarget("gx") .create(); - Assertions.assertEquals("yggagflnlgmt", response.location()); - Assertions.assertEquals("hzjmucftbyrp", response.tags().get("rohkpigqfusu")); - Assertions.assertEquals(5182036247086876592L, response.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, response.quotaType()); - Assertions.assertEquals("nb", response.quotaTarget()); + Assertions.assertEquals("bqc", response.location()); + Assertions.assertEquals("fg", response.tags().get("xsaetg")); + Assertions.assertEquals(8594198007990007248L, response.quotaSizeInKiBs()); + Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, response.quotaType()); + Assertions.assertEquals("nrzorpd", response.quotaTarget()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java index c8821d57e81f..c042dcdd9b02 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java @@ -28,8 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumeQuotaRules() - .delete("cnwfepbnwgfmxjg", "g", "jbgdlfgtdysnaquf", "qbctqha", "zjrwdkqze", - com.azure.core.util.Context.NONE); + .delete("z", "vxhmtfhocnxzcmj", "ngxno", "rxtd", "sn", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java index 2a2c980ae8a2..89ac506b15ee 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class VolumeQuotaRulesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Patching\",\"quotaSizeInKiBs\":897633684000834955,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"sfnrdtjxt\"},\"location\":\"dcqtjvidttge\",\"tags\":{\"zies\":\"lvyjtcvuwkas\",\"uhxu\":\"uughtuqfecjxeyg\",\"hwpusxj\":\"cbuewmrswnjlxuz\",\"dohzjq\":\"aqehg\"},\"id\":\"tu\",\"name\":\"o\",\"type\":\"gebx\"}"; + = "{\"properties\":{\"provisioningState\":\"Updating\",\"quotaSizeInKiBs\":5819505142190116276,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"fmhklbnld\"},\"location\":\"cbhhez\",\"tags\":{\"trpb\":\"wusqx\"},\"id\":\"r\",\"name\":\"yuuatvlmbjwcolbm\",\"type\":\"lbnwtpcpahp\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VolumeQuotaRule response = manager.volumeQuotaRules() - .getWithResponse("olbauirop", "ons", "onwpnga", "innixjawrtmjfj", "yccxlzhcox", + .getWithResponse("nepk", "etiarxqiubxdukec", "xdazv", "hctmmkosz", "dblnsntrp", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("dcqtjvidttge", response.location()); - Assertions.assertEquals("lvyjtcvuwkas", response.tags().get("zies")); - Assertions.assertEquals(897633684000834955L, response.quotaSizeInKiBs()); + Assertions.assertEquals("cbhhez", response.location()); + Assertions.assertEquals("wusqx", response.tags().get("trpb")); + Assertions.assertEquals(5819505142190116276L, response.quotaSizeInKiBs()); Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, response.quotaType()); - Assertions.assertEquals("sfnrdtjxt", response.quotaTarget()); + Assertions.assertEquals("fmhklbnld", response.quotaTarget()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java index ca74c4521753..3f5b75b10d5e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java @@ -23,7 +23,7 @@ public final class VolumeQuotaRulesListByVolumeMockTests { @Test public void testListByVolume() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"quotaSizeInKiBs\":1367487808956907415,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"cjjvpilguooqja\"},\"location\":\"d\",\"tags\":{\"kjbsah\":\"ueio\",\"oebn\":\"tdtpdelqacslmo\",\"dirazf\":\"xofvcjk\",\"bmdujtmvcopexc\":\"xejw\"},\"id\":\"jurbuhhlkyqltqsr\",\"name\":\"gtuwkff\",\"type\":\"jk\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"quotaSizeInKiBs\":7254215540772664714,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"njzrbhtmeplvu\"},\"location\":\"obrl\",\"tags\":{\"muowakywalhjy\":\"snbagnchjhg\",\"jomevtfycnlb\":\"xcgqtagdrclsso\",\"kk\":\"gjco\"},\"id\":\"ji\",\"name\":\"ytssikiz\",\"type\":\"cufqbvntnrgmqs\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,12 +33,12 @@ public void testListByVolume() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<VolumeQuotaRule> response = manager.volumeQuotaRules() - .listByVolume("yjleziunjx", "fza", "tkw", "eg", com.azure.core.util.Context.NONE); + .listByVolume("evhdlmydid", "hepfwwtjfdoes", "xhmw", "dbckyo", com.azure.core.util.Context.NONE); - Assertions.assertEquals("d", response.iterator().next().location()); - Assertions.assertEquals("ueio", response.iterator().next().tags().get("kjbsah")); - Assertions.assertEquals(1367487808956907415L, response.iterator().next().quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, response.iterator().next().quotaType()); - Assertions.assertEquals("cjjvpilguooqja", response.iterator().next().quotaTarget()); + Assertions.assertEquals("obrl", response.iterator().next().location()); + Assertions.assertEquals("snbagnchjhg", response.iterator().next().tags().get("muowakywalhjy")); + Assertions.assertEquals(7254215540772664714L, response.iterator().next().quotaSizeInKiBs()); + Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, response.iterator().next().quotaType()); + Assertions.assertEquals("njzrbhtmeplvu", response.iterator().next().quotaTarget()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java index e0b15f1781ef..745bff643f28 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java @@ -13,13 +13,13 @@ public final class VolumeQuotaRulesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeQuotaRulesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"quotaSizeInKiBs\":1661634789045622076,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"zonokixrjqci\"},\"location\":\"zpfrla\",\"tags\":{\"pj\":\"rnwoiindfp\"},\"id\":\"lwbtlhf\",\"name\":\"sj\",\"type\":\"dhszfjv\"},{\"properties\":{\"provisioningState\":\"Creating\",\"quotaSizeInKiBs\":4854317837359079981,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"rqmq\"},\"location\":\"dvriiiojnal\",\"tags\":{\"ueluqhhahhxvrhmz\":\"kvtvsexso\"},\"id\":\"wpjgwws\",\"name\":\"ughftqsx\",\"type\":\"qxujxukndxd\"},{\"properties\":{\"provisioningState\":\"Updating\",\"quotaSizeInKiBs\":6871622946068631848,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"msyqtfi\"},\"location\":\"hbotzingamvppho\",\"tags\":{\"nwcvtbvkayhmtnv\":\"zudphqamvdkfw\",\"zcjaesgvvsccy\":\"qiatkzwpcnp\"},\"id\":\"jguq\",\"name\":\"hwyg\",\"type\":\"lvdnkfx\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":6647177632922570765,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"hapfcqdpsqx\"},\"location\":\"psvuoymgc\",\"tags\":{\"erqwkyhkobopg\":\"vezrypqlmfeo\"},\"id\":\"edkowepbqpcrfk\",\"name\":\"wccsnjvcdwxlpqek\",\"type\":\"tn\"}],\"nextLink\":\"tjsyin\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":4207252489076853449,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"ytisibir\"},\"location\":\"pikpz\",\"tags\":{\"anlfzxiavrmbz\":\"j\",\"frl\":\"nokixrjqcirgz\"},\"id\":\"zszrnwoiindfpw\",\"name\":\"jylwbtlhflsj\",\"type\":\"dhszfjv\"},{\"properties\":{\"provisioningState\":\"Creating\",\"quotaSizeInKiBs\":4854317837359079981,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"rqmq\"},\"location\":\"dvriiiojnal\",\"tags\":{\"ueluqhhahhxvrhmz\":\"kvtvsexso\"},\"id\":\"wpjgwws\",\"name\":\"ughftqsx\",\"type\":\"qxujxukndxd\"}],\"nextLink\":\"rjguufzdmsyqtf\"}") .toObject(VolumeQuotaRulesList.class); - Assertions.assertEquals("zpfrla", model.value().get(0).location()); - Assertions.assertEquals("rnwoiindfp", model.value().get(0).tags().get("pj")); - Assertions.assertEquals(1661634789045622076L, model.value().get(0).quotaSizeInKiBs()); - Assertions.assertEquals(Type.INDIVIDUAL_USER_QUOTA, model.value().get(0).quotaType()); - Assertions.assertEquals("zonokixrjqci", model.value().get(0).quotaTarget()); - Assertions.assertEquals("tjsyin", model.nextLink()); + Assertions.assertEquals("pikpz", model.value().get(0).location()); + Assertions.assertEquals("j", model.value().get(0).tags().get("anlfzxiavrmbz")); + Assertions.assertEquals(4207252489076853449L, model.value().get(0).quotaSizeInKiBs()); + Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.value().get(0).quotaType()); + Assertions.assertEquals("ytisibir", model.value().get(0).quotaTarget()); + Assertions.assertEquals("rjguufzdmsyqtf", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java index 86085bb5dacf..624d00c142cb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java @@ -13,21 +13,21 @@ public final class VolumeQuotaRulesPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeQuotaRulesProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Creating\",\"quotaSizeInKiBs\":7272736071561293881,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"rfzeey\"}") + "{\"provisioningState\":\"Updating\",\"quotaSizeInKiBs\":2248907093975297235,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"hmouwqlgzrfze\"}") .toObject(VolumeQuotaRulesProperties.class); - Assertions.assertEquals(7272736071561293881L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("rfzeey", model.quotaTarget()); + Assertions.assertEquals(2248907093975297235L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.INDIVIDUAL_USER_QUOTA, model.quotaType()); + Assertions.assertEquals("hmouwqlgzrfze", model.quotaTarget()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeQuotaRulesProperties model = new VolumeQuotaRulesProperties().withQuotaSizeInKiBs(7272736071561293881L) - .withQuotaType(Type.DEFAULT_USER_QUOTA) - .withQuotaTarget("rfzeey"); + VolumeQuotaRulesProperties model = new VolumeQuotaRulesProperties().withQuotaSizeInKiBs(2248907093975297235L) + .withQuotaType(Type.INDIVIDUAL_USER_QUOTA) + .withQuotaTarget("hmouwqlgzrfze"); model = BinaryData.fromObject(model).toObject(VolumeQuotaRulesProperties.class); - Assertions.assertEquals(7272736071561293881L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("rfzeey", model.quotaTarget()); + Assertions.assertEquals(2248907093975297235L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.INDIVIDUAL_USER_QUOTA, model.quotaType()); + Assertions.assertEquals("hmouwqlgzrfze", model.quotaTarget()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java index 8cd656bb11a1..22c9c0e4cda5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java @@ -12,7 +12,7 @@ public final class VolumeRelocationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeRelocationProperties model - = BinaryData.fromString("{\"relocationRequested\":false,\"readyToBeFinalized\":false}") + = BinaryData.fromString("{\"relocationRequested\":false,\"readyToBeFinalized\":true}") .toObject(VolumeRelocationProperties.class); Assertions.assertFalse(model.relocationRequested()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java index 3d0e2c5070f3..6a005780b27d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java @@ -11,14 +11,14 @@ public final class VolumeRevertTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VolumeRevert model = BinaryData.fromString("{\"snapshotId\":\"gjb\"}").toObject(VolumeRevert.class); - Assertions.assertEquals("gjb", model.snapshotId()); + VolumeRevert model = BinaryData.fromString("{\"snapshotId\":\"olpsslqlf\"}").toObject(VolumeRevert.class); + Assertions.assertEquals("olpsslqlf", model.snapshotId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeRevert model = new VolumeRevert().withSnapshotId("gjb"); + VolumeRevert model = new VolumeRevert().withSnapshotId("olpsslqlf"); model = BinaryData.fromObject(model).toObject(VolumeRevert.class); - Assertions.assertEquals("gjb", model.snapshotId()); + Assertions.assertEquals("olpsslqlf", model.snapshotId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java index de2181e5527a..724589c986a3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java @@ -12,14 +12,14 @@ public final class VolumeSnapshotPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeSnapshotProperties model - = BinaryData.fromString("{\"snapshotPolicyId\":\"pnazzm\"}").toObject(VolumeSnapshotProperties.class); - Assertions.assertEquals("pnazzm", model.snapshotPolicyId()); + = BinaryData.fromString("{\"snapshotPolicyId\":\"rgvtqag\"}").toObject(VolumeSnapshotProperties.class); + Assertions.assertEquals("rgvtqag", model.snapshotPolicyId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeSnapshotProperties model = new VolumeSnapshotProperties().withSnapshotPolicyId("pnazzm"); + VolumeSnapshotProperties model = new VolumeSnapshotProperties().withSnapshotPolicyId("rgvtqag"); model = BinaryData.fromObject(model).toObject(VolumeSnapshotProperties.class); - Assertions.assertEquals("pnazzm", model.snapshotPolicyId()); + Assertions.assertEquals("rgvtqag", model.snapshotPolicyId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationMockTests.java index 6c4d58c0fdb8..e8840844c547 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationMockTests.java @@ -20,7 +20,7 @@ public final class VolumesAuthorizeExternalReplicationMockTests { @Test public void testAuthorizeExternalReplication() throws Exception { - String responseStr = "{\"svmPeeringCommand\":\"lm\"}"; + String responseStr = "{\"svmPeeringCommand\":\"vkjzwfbcyaykm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,9 @@ public void testAuthorizeExternalReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SvmPeerCommandResponse response = manager.volumes() - .authorizeExternalReplication("bcysih", "gqcwdhohsdtmc", "zsu", "cohdx", com.azure.core.util.Context.NONE); + .authorizeExternalReplication("nsxfwu", "hcdpkupnqrmgj", "bpkuwxeoio", "fiz", + com.azure.core.util.Context.NONE); - Assertions.assertEquals("lm", response.svmPeeringCommand()); + Assertions.assertEquals("vkjzwfbcyaykm", response.svmPeeringCommand()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java index c2d5fadc4cfb..398364aa4672 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java @@ -29,8 +29,9 @@ public void testAuthorizeReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .authorizeReplication("prlpy", "nuciqdsmexiit", "fuxtyasiibmiybnn", "stgnl", - new AuthorizeRequest().withRemoteVolumeResourceId("nmgixh"), com.azure.core.util.Context.NONE); + .authorizeReplication("syeipqd", "mjtgrqg", "gkkileplkcsmkn", "wtbbaedorvvmqf", + new AuthorizeRequest().withRemoteVolumeResourceId("ygbdgwumgxdgdhpa"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java index 70321b25ffff..b601d648b171 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java @@ -29,8 +29,8 @@ public void testBreakFileLocks() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .breakFileLocks("rzpgep", "tybbwwpgda", "chzyvlixqnrk", "xkjibnxmy", - new BreakFileLocksRequest().withClientIp("xs").withConfirmRunningDisruptiveOperation(true), + .breakFileLocks("ujyxkyxlzgsj", "kzzltafhbzf", "ovwmbjlzqsczpgvd", "napfdqwowftpt", + new BreakFileLocksRequest().withClientIp("wjtkschgcgqyhl").withConfirmRunningDisruptiveOperation(false), com.azure.core.util.Context.NONE); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java index 96f4b3e58b86..6193bfb57acb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java @@ -29,7 +29,7 @@ public void testBreakReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .breakReplication("qqoli", "r", "aiouaubrjt", "oq", + .breakReplication("zcbyfq", "kfaoytehq", "uvjmv", "mtdwcky", new BreakReplicationRequest().withForceBreakReplication(true), com.azure.core.util.Context.NONE); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java index 70f9181a2e6a..34bc3580f355 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java @@ -28,7 +28,8 @@ public void testDeleteReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .deleteReplication("uyxoaf", "aoqltfaey", "inmfgvxirp", "hriypoqeyhlqhy", com.azure.core.util.Context.NONE); + .deleteReplication("mxhzzysevus", "ivzrrryveimipsk", "yzatvfuzkaft", "vvruxwi", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java index 9a7c9977cf17..3b76e042a4a9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java @@ -28,7 +28,7 @@ public void testFinalizeRelocation() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .finalizeRelocation("xzmqpnodawop", "hewjptmcgsbost", "eln", "la", com.azure.core.util.Context.NONE); + .finalizeRelocation("no", "pziuwfbzkkdtnh", "sycljsel", "kpbafvafhl", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java index 216ac9be2d12..63d35b9531ca 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java @@ -21,7 +21,7 @@ public final class VolumesListGetGroupIdListForLdapUserMockTests { @Test public void testListGetGroupIdListForLdapUser() throws Exception { - String responseStr = "{\"groupIdsForLdapUser\":[\"rcgegydcwboxjum\"]}"; + String responseStr = "{\"groupIdsForLdapUser\":[\"fkndl\",\"vtwknvgmmbugt\",\"watmqa\",\"kueatgroeshoy\"]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testListGetGroupIdListForLdapUser() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); GetGroupIdListForLdapUserResponse response = manager.volumes() - .listGetGroupIdListForLdapUser("ntvlwijpsttexo", "qpwcyyufmh", "uncuw", "qspkcdqzhlctd", - new GetGroupIdListForLdapUserRequest().withUsername("unqndyfpchrqb"), com.azure.core.util.Context.NONE); + .listGetGroupIdListForLdapUser("yqrhvyeld", "tj", "dkwisw", "kukjtasb", + new GetGroupIdListForLdapUserRequest().withUsername("wispkxk"), com.azure.core.util.Context.NONE); - Assertions.assertEquals("rcgegydcwboxjum", response.groupIdsForLdapUser().get(0)); + Assertions.assertEquals("fkndl", response.groupIdsForLdapUser().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportMockTests.java new file mode 100644 index 000000000000..1aff1c358161 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ListQuotaReportResponse; +import com.azure.resourcemanager.netapp.models.Type; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class VolumesListQuotaReportMockTests { + @Test + public void testListQuotaReport() throws Exception { + String responseStr + = "{\"value\":[{\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"wdchozfn\",\"quotaLimitUsedInKiBs\":3168660078499570789,\"quotaLimitTotalInKiBs\":700271083328715030,\"percentageUsed\":53.10744,\"isDerivedQuota\":false},{\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"oaiknaqlnuwig\",\"quotaLimitUsedInKiBs\":2329438320518189311,\"quotaLimitTotalInKiBs\":4465981831282505024,\"percentageUsed\":61.86658,\"isDerivedQuota\":true},{\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"xhmpejtlkex\",\"quotaLimitUsedInKiBs\":3352897062376386518,\"quotaLimitTotalInKiBs\":6028048177476509003,\"percentageUsed\":16.300827,\"isDerivedQuota\":false}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ListQuotaReportResponse response = manager.volumes() + .listQuotaReport("pqigtuujwouhd", "wsigrbjbxsj", "bvitvqkjya", "nu", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, response.value().get(0).quotaType()); + Assertions.assertEquals("wdchozfn", response.value().get(0).quotaTarget()); + Assertions.assertEquals(3168660078499570789L, response.value().get(0).quotaLimitUsedInKiBs()); + Assertions.assertEquals(700271083328715030L, response.value().get(0).quotaLimitTotalInKiBs()); + Assertions.assertEquals(53.10744F, response.value().get(0).percentageUsed()); + Assertions.assertFalse(response.value().get(0).isDerivedQuota()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java index 7b88852fde2f..bf33fe665bc1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java @@ -26,7 +26,7 @@ public final class VolumesListReplicationsMockTests { @Test public void testListReplications() throws Exception { String responseStr - = "{\"value\":[{\"replicationId\":\"gbeglqgleo\",\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"nlu\",\"remoteVolumeRegion\":\"krrfx\",\"mirrorState\":\"Broken\",\"replicationCreationTime\":\"2021-06-26T08:39:03Z\",\"replicationDeletionTime\":\"2021-02-28T15:02:58Z\"}]}"; + = "{\"value\":[{\"replicationId\":\"kdnwqapfgsdpcve\",\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"h\",\"remoteVolumeRegion\":\"uipldqq\",\"mirrorState\":\"Mirrored\",\"replicationCreationTime\":\"2021-03-03T11:50:40Z\",\"replicationDeletionTime\":\"2021-11-28T20:48:06Z\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,12 +36,12 @@ public void testListReplications() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<Replication> response = manager.volumes() - .listReplications("fdgugeyzi", "grkyuizabsnmfpph", "jee", "yhyhsgzfczb", - new ListReplicationsRequest().withExclude(Exclude.NONE), com.azure.core.util.Context.NONE); + .listReplications("sybwptdaca", "vvlfntymtp", "iwenazero", "zrsq", + new ListReplicationsRequest().withExclude(Exclude.DELETED), com.azure.core.util.Context.NONE); Assertions.assertEquals(EndpointType.DST, response.iterator().next().endpointType()); Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, response.iterator().next().replicationSchedule()); - Assertions.assertEquals("nlu", response.iterator().next().remoteVolumeResourceId()); - Assertions.assertEquals("krrfx", response.iterator().next().remoteVolumeRegion()); + Assertions.assertEquals("h", response.iterator().next().remoteVolumeResourceId()); + Assertions.assertEquals("uipldqq", response.iterator().next().remoteVolumeRegion()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterMockTests.java index dc3ea7ea05a3..c34e0055ab3f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterMockTests.java @@ -22,7 +22,7 @@ public final class VolumesPeerExternalClusterMockTests { @Test public void testPeerExternalCluster() throws Exception { - String responseStr = "{\"peerAcceptCommand\":\"qwthmky\"}"; + String responseStr = "{\"peerAcceptCommand\":\"bztensvkzykjtj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,13 @@ public void testPeerExternalCluster() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ClusterPeerCommandResponse response = manager.volumes() - .peerExternalCluster("cmjkavlgorbmftpm", "tzfjltf", "nzcyjtotp", "opv", - new PeerClusterForVolumeMigrationRequest().withPeerIpAddresses(Arrays.asList("dbzqgqqihed")), - com.azure.core.util.Context.NONE); + ClusterPeerCommandResponse response + = manager.volumes() + .peerExternalCluster( + "ljnhvlqj", "ek", "eeksnbksdqhjvyk", "xeslkhhustcpoqm", new PeerClusterForVolumeMigrationRequest() + .withPeerIpAddresses(Arrays.asList("nwqjwgokn", "ejjjkxybwfdb")), + com.azure.core.util.Context.NONE); - Assertions.assertEquals("qwthmky", response.peerAcceptCommand()); + Assertions.assertEquals("bztensvkzykjtj", response.peerAcceptCommand()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java index b8bcdd28807f..9b8b87629c14 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java @@ -29,8 +29,8 @@ public void testPoolChange() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .poolChange("muapcvhdbevw", "qxeysko", "qzinkfkbg", "z", - new PoolChangeRequest().withNewPoolResourceId("owxeqocljmy"), com.azure.core.util.Context.NONE); + .poolChange("fz", "bfw", "rzx", "dew", new PoolChangeRequest().withNewPoolResourceId("rsxkr"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java index 636a9cdff04f..83a1561a30e3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java @@ -28,7 +28,8 @@ public void testReInitializeReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .reInitializeReplication("mavmq", "oudorhcgyyp", "otwypundmb", "hu", com.azure.core.util.Context.NONE); + .reInitializeReplication("gdexjd", "vjsaqwotm", "wllcolsr", "xaptefhexcgjok", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java index dcac9307b23a..b6866dc9b370 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class VolumesReplicationStatusWithResponseMockTests { @Test public void testReplicationStatusWithResponse() throws Exception { String responseStr - = "{\"healthy\":false,\"relationshipStatus\":\"Idle\",\"mirrorState\":\"Mirrored\",\"totalProgress\":\"ojhp\",\"errorMessage\":\"fnmdxotn\"}"; + = "{\"healthy\":true,\"relationshipStatus\":\"Idle\",\"mirrorState\":\"Mirrored\",\"totalProgress\":\"egplwr\",\"errorMessage\":\"hwddkvbxgkq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,14 +33,13 @@ public void testReplicationStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ReplicationStatus response = manager.volumes() - .replicationStatusWithResponse("oj", "ngiflrzpasccbi", "imzdlyj", "fqwmkyoquf", - com.azure.core.util.Context.NONE) + .replicationStatusWithResponse("ejnndljdju", "kb", "req", "n", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertFalse(response.healthy()); + Assertions.assertTrue(response.healthy()); Assertions.assertEquals(VolumeReplicationRelationshipStatus.IDLE, response.relationshipStatus()); Assertions.assertEquals(MirrorState.MIRRORED, response.mirrorState()); - Assertions.assertEquals("ojhp", response.totalProgress()); - Assertions.assertEquals("fnmdxotn", response.errorMessage()); + Assertions.assertEquals("egplwr", response.totalProgress()); + Assertions.assertEquals("hwddkvbxgkq", response.errorMessage()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java index f04184bbed22..7d6b9855dbf1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java @@ -27,7 +27,7 @@ public void testResyncReplication() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.volumes().resyncReplication("v", "cvbmqzb", "q", "lajrnwxacevehj", com.azure.core.util.Context.NONE); + manager.volumes().resyncReplication("blhtjq", "qyv", "eh", "a", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java index fde8c54695cf..7ef55ebd970a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java @@ -29,8 +29,8 @@ public void testRevert() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .revert("flyh", "xcudchxgsr", "oldforobw", "lvizb", new VolumeRevert().withSnapshotId("fovvacqpbtuodxes"), - com.azure.core.util.Context.NONE); + .revert("cz", "vodrrslblxydkxr", "vvbxiwkgfbqljnq", "hychocokuleh", + new VolumeRevert().withSnapshotId("qlrqffaweyurk"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java index f1a89a17ef5c..eba515b53b76 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java @@ -28,7 +28,7 @@ public void testRevertRelocation() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .revertRelocation("utmzlbiojlvfhrbb", "neqvcwwyyurmo", "hppr", "rsnm", com.azure.core.util.Context.NONE); + .revertRelocation("ylcc", "evxrhyz", "fwrsofpltdbmair", "hvhfnracw", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java index 8254b732f29f..acc0e21affb9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java @@ -12,27 +12,27 @@ public final class WeeklyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WeeklySchedule model = BinaryData.fromString( - "{\"snapshotsToKeep\":1634117386,\"day\":\"mpaxmodfvuefywsb\",\"hour\":938827927,\"minute\":1491614176,\"usedBytes\":5583429102583863786}") + "{\"snapshotsToKeep\":270206644,\"day\":\"qwcciuqg\",\"hour\":1924773766,\"minute\":164113652,\"usedBytes\":878238904771000945}") .toObject(WeeklySchedule.class); - Assertions.assertEquals(1634117386, model.snapshotsToKeep()); - Assertions.assertEquals("mpaxmodfvuefywsb", model.day()); - Assertions.assertEquals(938827927, model.hour()); - Assertions.assertEquals(1491614176, model.minute()); - Assertions.assertEquals(5583429102583863786L, model.usedBytes()); + Assertions.assertEquals(270206644, model.snapshotsToKeep()); + Assertions.assertEquals("qwcciuqg", model.day()); + Assertions.assertEquals(1924773766, model.hour()); + Assertions.assertEquals(164113652, model.minute()); + Assertions.assertEquals(878238904771000945L, model.usedBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WeeklySchedule model = new WeeklySchedule().withSnapshotsToKeep(1634117386) - .withDay("mpaxmodfvuefywsb") - .withHour(938827927) - .withMinute(1491614176) - .withUsedBytes(5583429102583863786L); + WeeklySchedule model = new WeeklySchedule().withSnapshotsToKeep(270206644) + .withDay("qwcciuqg") + .withHour(1924773766) + .withMinute(164113652) + .withUsedBytes(878238904771000945L); model = BinaryData.fromObject(model).toObject(WeeklySchedule.class); - Assertions.assertEquals(1634117386, model.snapshotsToKeep()); - Assertions.assertEquals("mpaxmodfvuefywsb", model.day()); - Assertions.assertEquals(938827927, model.hour()); - Assertions.assertEquals(1491614176, model.minute()); - Assertions.assertEquals(5583429102583863786L, model.usedBytes()); + Assertions.assertEquals(270206644, model.snapshotsToKeep()); + Assertions.assertEquals("qwcciuqg", model.day()); + Assertions.assertEquals(1924773766, model.hour()); + Assertions.assertEquals(164113652, model.minute()); + Assertions.assertEquals(878238904771000945L, model.usedBytes()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/tsp-location.yaml b/sdk/netapp/azure-resourcemanager-netapp/tsp-location.yaml index 449461ddb1a3..bc6824670f83 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/tsp-location.yaml +++ b/sdk/netapp/azure-resourcemanager-netapp/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/netapp/resource-manager/Microsoft.NetApp/NetApp -commit: 110584e2d5955b67491cf3b377df887fe24bacbd +commit: 97241c594f16e0915407b7dc85377e4e3b26b0b9 repo: Azure/azure-rest-api-specs additionalDirectories: From 4fc27863cc689c4bf52458cab64bd1aa248c1cf1 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Mon, 1 Dec 2025 09:09:20 +0800 Subject: [PATCH 068/186] fix --- eng/lintingconfigs/revapi/track2/revapi.json | 26 +++++++++++++++++++- eng/versioning/external_dependencies.txt | 6 ----- eng/versioning/find_unused_dependencies.py | 6 ++--- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/eng/lintingconfigs/revapi/track2/revapi.json b/eng/lintingconfigs/revapi/track2/revapi.json index ef3c51ce850f..b9001bbad8f4 100644 --- a/eng/lintingconfigs/revapi/track2/revapi.json +++ b/eng/lintingconfigs/revapi/track2/revapi.json @@ -340,11 +340,35 @@ "old" : "interface com.azure.spring.cloud.autoconfigure.jms.ServiceBusJmsConnectionFactoryCustomizer", "justification" : "Remove deprecated method" }, + { + "code" : "java.method.parameterTypeChanged", + "old" : "parameter void com.azure.spring.data.cosmos.core.mapping.BasicCosmosPersistentEntity<T>::<init>(===org.springframework.data.util.TypeInformation<T>===)", + "new" : "parameter void com.azure.spring.data.cosmos.core.mapping.BasicCosmosPersistentEntity<T>::<init>(===org.springframework.data.core.TypeInformation<T>===)", + "justification" : "Replace deprecated parameterType" + }, + { + "code" : "java.method.parameterTypeChanged", + "old" : "parameter <T> com.azure.spring.data.cosmos.core.mapping.BasicCosmosPersistentEntity<T> com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext::createPersistentEntity(===org.springframework.data.util.TypeInformation<T>===)", + "new" : "parameter <T> com.azure.spring.data.cosmos.core.mapping.BasicCosmosPersistentEntity<T> com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext::createPersistentEntity(===org.springframework.data.core.TypeInformation<T>===)", + "justification" : "Replace deprecated parameterType" + }, + { + "code" : "java.method.parameterTypeChanged", + "old" : "parameter java.util.Optional<org.springframework.data.repository.query.QueryLookupStrategy> com.azure.spring.data.cosmos.repository.support.CosmosRepositoryFactory::getQueryLookupStrategy(org.springframework.data.repository.query.QueryLookupStrategy.Key, ===org.springframework.data.repository.query.QueryMethodEvaluationContextProvider===)", + "new" : "parameter java.util.Optional<org.springframework.data.repository.query.QueryLookupStrategy> com.azure.spring.data.cosmos.repository.support.CosmosRepositoryFactory::getQueryLookupStrategy(org.springframework.data.repository.query.QueryLookupStrategy.Key, ===org.springframework.data.repository.query.ValueExpressionDelegate===)", + "justification" : "Replace deprecated parameterType" + }, + { + "code" : "java.method.parameterTypeChanged", + "old" : "parameter java.util.Optional<org.springframework.data.repository.query.QueryLookupStrategy> com.azure.spring.data.cosmos.repository.support.ReactiveCosmosRepositoryFactory::getQueryLookupStrategy(org.springframework.data.repository.query.QueryLookupStrategy.Key, ===org.springframework.data.repository.query.QueryMethodEvaluationContextProvider===)", + "new" : "parameter java.util.Optional<org.springframework.data.repository.query.QueryLookupStrategy> com.azure.spring.data.cosmos.repository.support.ReactiveCosmosRepositoryFactory::getQueryLookupStrategy(org.springframework.data.repository.query.QueryLookupStrategy.Key, ===org.springframework.data.repository.query.ValueExpressionDelegate===)", + "justification" : "Replace deprecated parameterType" + }, { "code" : "java.method.parameterTypeChanged", "old" : "parameter void com.azure.spring.integration.core.handler.DefaultMessageHandler::setSendCallback(===org.springframework.util.concurrent.ListenableFutureCallback<java.lang.Void>===)", "new" : "parameter void com.azure.spring.integration.core.handler.DefaultMessageHandler::setSendCallback(===java.util.function.BiConsumer<java.lang.Void, java.lang.Throwable>===)", - "name" : "Replace deprecated parameterType" + "justification" : "Replace deprecated parameterType" }, { "code": "java.method.numberOfParametersChanged", diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 9731a410f72c..26d812ad0f47 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -314,12 +314,9 @@ storage_com.microsoft.azure:azure-storage;8.6.6 # sdk\spring\pom.xml modules springboot4_com.diffplug.spotless:spotless-maven-plugin;2.30.0 springboot4_com.fasterxml.jackson.core:jackson-annotations;2.20 -springboot4_com.fasterxml.jackson.core:jackson-core;2.20.1 springboot4_com.fasterxml.jackson.core:jackson-databind;2.20.1 -springboot4_com.fasterxml.jackson.dataformat:jackson-dataformat-xml;2.20.1 springboot4_com.fasterxml.jackson.datatype:jackson-datatype-jdk8;2.20.1 springboot4_com.fasterxml.jackson.datatype:jackson-datatype-jsr310;2.20.1 -springboot4_com.fasterxml.jackson.module:jackson-module-afterburner;2.20.1 springboot4_com.fasterxml.jackson.module:jackson-module-parameter-names;2.20.1 springboot4_com.github.spotbugs:spotbugs-maven-plugin;4.8.2.0 springboot4_com.google.code.findbugs:jsr305;3.0.2 @@ -386,7 +383,6 @@ springboot4_org.springframework.boot:spring-boot-starter-integration;4.0.0 springboot4_org.springframework.boot:spring-boot-starter-parent;4.0.0 springboot4_org.springframework.boot:spring-boot-starter-test;4.0.0 springboot4_org.springframework.boot:spring-boot-starter-webmvc;4.0.0 -springboot4_org.springframework.boot:spring-boot-starter-web;4.0.0 springboot4_org.springframework.boot:spring-boot-starter;4.0.0 springboot4_org.springframework.boot:spring-boot-test;4.0.0 springboot4_org.springframework.boot:spring-boot-testcontainers;4.0.0 @@ -398,7 +394,6 @@ springboot4_org.springframework.cloud:spring-cloud-stream;5.0.0 springboot4_org.springframework.data:spring-data-commons;4.0.0 springboot4_org.springframework.data:spring-data-redis;4.0.0 springboot4_org.springframework.integration:spring-integration-core;7.0.0 -springboot4_org.springframework.kafka:spring-kafka;4.0.0 springboot4_org.springframework.retry:spring-retry;2.0.12 springboot4_org.springframework.security:spring-security-config;7.0.0 springboot4_org.springframework.security:spring-security-oauth2-client;7.0.0 @@ -411,7 +406,6 @@ springboot4_org.springframework:spring-context;7.0.1 springboot4_org.springframework:spring-core-test;7.0.1 springboot4_org.springframework:spring-core;7.0.1 springboot4_org.springframework:spring-expression;7.0.1 -springboot4_org.springframework:spring-jdbc;7.0.1 springboot4_org.springframework:spring-jms;7.0.1 springboot4_org.springframework:spring-messaging;7.0.1 springboot4_org.springframework:spring-test;7.0.1 diff --git a/eng/versioning/find_unused_dependencies.py b/eng/versioning/find_unused_dependencies.py index e5dae738b3c8..bf08c4d18610 100644 --- a/eng/versioning/find_unused_dependencies.py +++ b/eng/versioning/find_unused_dependencies.py @@ -9,8 +9,8 @@ from utils import load_version_map_from_file from utils import version_update_marker -IGNORED_DEPENDENCIES = {'springboot3_org.springframework.boot:spring-boot-dependencies', - 'springboot3_org.springframework.cloud:spring-cloud-dependencies'} +IGNORED_DEPENDENCIES = {'springboot4_org.springframework.boot:spring-boot-dependencies', + 'springboot4_org.springframework.cloud:spring-cloud-dependencies'} def fixup_version_map(version_file, version_map): # uses the util function to load the version map from the file, then adds a bool to each entry to track if it is visisted @@ -64,4 +64,4 @@ def main(): exit(1) if __name__ == "__main__": - main() \ No newline at end of file + main() From 659b6984b1dae2f70815cc46f5b9e928977782e3 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Mon, 1 Dec 2025 09:35:37 +0800 Subject: [PATCH 069/186] fix --- .vscode/cspell.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 0278b8f108e0..dabb512db6a6 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -1197,6 +1197,7 @@ "vibur", "wadl", "weaviate", + "webauthn", "webmvc", "xerial", "xmlparserv", From 08a1b3cabab09ceb4b0d53b3bd123f31f377aeee Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Mon, 1 Dec 2025 12:58:08 +0800 Subject: [PATCH 070/186] fix --- .../AadJwtBearerGrantRequestParametersConverter.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestParametersConverter.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestParametersConverter.java index 4550d3ef017a..234e2c8f2a02 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestParametersConverter.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/security/AadJwtBearerGrantRequestParametersConverter.java @@ -6,13 +6,7 @@ import org.springframework.core.convert.converter.Converter; import org.springframework.security.oauth2.client.endpoint.DefaultOAuth2TokenRequestParametersConverter; import org.springframework.security.oauth2.client.endpoint.JwtBearerGrantRequest; -import org.springframework.security.oauth2.client.registration.ClientRegistration; -import org.springframework.security.oauth2.core.ClientAuthenticationMethod; -import org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames; -import org.springframework.util.CollectionUtils; -import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; -import org.springframework.util.StringUtils; /** * This is a special JWT Bearer flow implementation for Microsoft identify platform. From 2d74b506d85a3aac7570a52acec6d0b668a9f38a Mon Sep 17 00:00:00 2001 From: v-huizhu2 <v-huizhu2@microsoft.com> Date: Mon, 1 Dec 2025 15:50:27 +0800 Subject: [PATCH 071/186] mgmt containerservice, update api-version to preview-2025-09-02 (#47336) * feat(containerservice): update API spec to use preview tag - Changed tag from package-2025-09 to package-preview-2025-09 - Maintained existing modelerfour and sync stack configurations - Preserved ContainerServiceVMSizeTypes model mapping - Kept OSSku model renaming configuration * gulp codegen * chore(containerservice): update api-version to 2025-09-01-preview - Updated `api-version` to `2025-09-01-preview` in changelog - Marked release as non-breaking with other changes category - Removed unreleased status for version 2.57.0-beta.1 * feat(containerservice): update Kubernetes version in test - Updated AKS cluster version from 1.30.3 to 1.31.8 in integration test * chore(assets): update tag reference for container service - Updated asset tag to latest version - Maintained consistency with azure-sdk-assets repository structure * feat(containerservice): add node image version and upgrade strategy support - Add nodeImageVersion field to agent pool configuration - Add upgradeStrategy field to agent pool configuration - Enable preview API version features for virtual machine nodes - Update agent pool inner model with new properties * chore(containerservice): update samples and dependencies to stable API version - Updated API version references from preview/2025-09-02-preview to stable/2025-09-01 - Removed unreleased version entry for azure-resourcemanager-containerservice - Changed dependency version from 2.57.0-beta.1 to 2.56.0 - Removed several generated sample files that were based on preview API - Reordered imports and updated file paths in remaining samples - Removed unused AutoScaleProfile import from AgentPoolsCreateOrUpdateSamples - Fixed resource group path casing in snapshot creation sample * fix(containerservice): simplify managed cluster deletion call - Remove unnecessary null parameter in delete method call - Remove explicit Context.NONE usage in favor of default behavior * chore(containerservice): update changelog release date - Updated release date in CHANGELOG.md from 2025-11-25 to 2025-12-01 - No functional code changes included in this update --------- Co-authored-by: Xiaofei Cao <92354331+XiaofeiCao@users.noreply.github.com> --- .../CHANGELOG.md | 10 +- .../assets.json | 2 +- .../fluent/AgentPoolsClient.java | 130 +- .../ContainerServiceManagementClient.java | 61 +- .../ContainerServiceOperationsClient.java | 66 + .../fluent/IdentityBindingsClient.java | 343 ++++ .../fluent/JwtAuthenticatorsClient.java | 352 ++++ .../fluent/LoadBalancersClient.java | 294 +++ .../fluent/MachinesClient.java | 187 +- .../fluent/ManagedClusterSnapshotsClient.java | 327 +++ .../fluent/ManagedClustersClient.java | 484 ++++- .../fluent/MeshMembershipsClient.java | 345 ++++ .../fluent/OperationStatusResultsClient.java | 186 ++ .../fluent/models/AgentPoolInner.java | 255 ++- .../models/AgentPoolUpgradeProfileInner.java | 34 + .../AgentPoolUpgradeProfileProperties.java | 57 + .../GuardrailsAvailableVersionInner.java | 175 ++ .../fluent/models/IdentityBindingInner.java | 186 ++ .../fluent/models/JwtAuthenticatorInner.java | 185 ++ .../fluent/models/LoadBalancerInner.java | 298 +++ .../fluent/models/LoadBalancerProperties.java | 259 +++ .../fluent/models/MachineInner.java | 28 +- ...agedClusterAgentPoolProfileProperties.java | 370 +++- .../fluent/models/ManagedClusterInner.java | 162 +- .../models/ManagedClusterProperties.java | 232 ++- .../models/ManagedClusterSnapshotInner.java | 240 +++ .../ManagedClusterSnapshotProperties.java | 150 ++ .../fluent/models/MeshMembershipInner.java | 220 +++ .../fluent/models/NodeImageVersionInner.java | 179 ++ .../models/OperationStatusResultInner.java | 329 ++++ .../SafeguardsAvailableVersionInner.java | 175 ++ .../fluent/models/SnapshotInner.java | 6 +- .../fluent/models/SnapshotProperties.java | 11 +- .../implementation/AgentPoolsClientImpl.java | 309 ++- .../ContainerServiceManagementClientImpl.java | 140 +- .../ContainerServiceOperationsClientImpl.java | 293 +++ .../IdentityBindingsClientImpl.java | 947 +++++++++ .../JwtAuthenticatorsClientImpl.java | 963 +++++++++ .../KubernetesClusterAgentPoolImpl.java | 4 + .../LoadBalancersClientImpl.java | 842 ++++++++ .../implementation/MachinesClientImpl.java | 393 +++- .../MaintenanceConfigurationsClientImpl.java | 16 +- .../ManagedClusterSnapshotsClientImpl.java | 1020 ++++++++++ .../ManagedClustersClientImpl.java | 1749 +++++++++++++---- .../ManagedNamespacesClientImpl.java | 24 +- .../MeshMembershipsClientImpl.java | 950 +++++++++ .../OperationStatusResultsClientImpl.java | 587 ++++++ .../implementation/OperationsClientImpl.java | 4 +- .../PrivateEndpointConnectionsClientImpl.java | 16 +- .../PrivateLinkResourcesClientImpl.java | 4 +- ...esolvePrivateLinkServiceIdsClientImpl.java | 4 +- .../implementation/SnapshotsClientImpl.java | 24 +- .../TrustedAccessRoleBindingsClientImpl.java | 16 +- .../TrustedAccessRolesClientImpl.java | 4 +- .../models/AccelerationMode.java | 54 + .../models/AddonAutoscaling.java | 51 + .../models/AdvancedNetworking.java | 39 +- .../models/AdvancedNetworkingPerformance.java | 105 + .../models/AdvancedNetworkingSecurity.java | 50 +- ...edNetworkingSecurityTransitEncryption.java | 100 + .../AgentPoolArtifactStreamingProfile.java | 99 + .../AgentPoolBlueGreenUpgradeSettings.java | 210 ++ .../models/AgentPoolMode.java | 10 + .../models/AgentPoolRecentlyUsedVersion.java | 154 ++ .../models/AgentPoolSecurityProfile.java | 58 +- .../models/AgentPoolSshAccess.java | 5 + ...lUpgradeProfilePropertiesUpgradesItem.java | 29 + .../models/AgentPoolUpgradeSettings.java | 88 +- .../models/AutoScaleProfile.java | 152 ++ ...terServiceLoadBalancerHealthProbeMode.java | 52 + .../containerservice/models/Component.java | 156 ++ .../models/ComponentsByRelease.java | 126 ++ .../ContainerServiceNetworkProfile.java | 150 +- ...rServiceNetworkProfileKubeProxyConfig.java | 166 ++ ...tworkProfileKubeProxyConfigIpvsConfig.java | 193 ++ .../containerservice/models/DriftAction.java | 52 + .../containerservice/models/DriverType.java | 53 + .../containerservice/models/GpuProfile.java | 38 +- .../GuardrailsAvailableVersionsList.java | 117 ++ ...GuardrailsAvailableVersionsProperties.java | 101 + .../models/GuardrailsSupport.java | 51 + .../models/IdentityBindingListResult.java | 136 ++ ...IdentityBindingManagedIdentityProfile.java | 152 ++ .../IdentityBindingOidcIssuerProfile.java | 82 + .../models/IdentityBindingProperties.java | 142 ++ .../IdentityBindingProvisioningState.java | 71 + .../models/InfrastructureEncryption.java | 52 + .../containerservice/models/IpFamily.java | 2 +- .../models/IpvsScheduler.java | 51 + .../models/IstioComponents.java | 30 + ...wtAuthenticatorClaimMappingExpression.java | 104 + .../models/JwtAuthenticatorClaimMappings.java | 213 ++ ...henticatorExtraClaimMappingExpression.java | 137 ++ .../models/JwtAuthenticatorIssuer.java | 142 ++ .../models/JwtAuthenticatorListResult.java | 124 ++ .../models/JwtAuthenticatorProperties.java | 238 +++ .../JwtAuthenticatorProvisioningState.java | 71 + .../JwtAuthenticatorValidationRule.java | 131 ++ .../models/KubeletConfig.java | 32 + ...rnetesResourceObjectEncryptionProfile.java | 104 + .../models/LabelSelector.java | 138 ++ .../models/LabelSelectorRequirement.java | 154 ++ .../models/LoadBalancerListResult.java | 115 ++ .../models/MachineHardwareProfile.java | 162 ++ .../models/MachineKubernetesProfile.java | 390 ++++ .../models/MachineListResult.java | 32 +- .../models/MachineNetworkProperties.java | 183 +- .../models/MachineOSProfile.java | 285 +++ .../models/MachineOSProfileLinuxProfile.java | 132 ++ .../models/MachineProperties.java | 305 ++- .../models/MachineStatus.java | 155 ++ .../ManagedClusterAgentPoolProfile.java | 151 +- .../ManagedClusterApiServerAccessProfile.java | 21 +- .../ManagedClusterAutoUpgradeProfile.java | 11 +- .../ManagedClusterAzureMonitorProfile.java | 89 +- ...usterAzureMonitorProfileAppMonitoring.java | 186 ++ ...ofileAppMonitoringAutoInstrumentation.java | 100 + ...ProfileAppMonitoringOpenTelemetryLogs.java | 131 ++ ...fileAppMonitoringOpenTelemetryMetrics.java | 131 ++ ...rAzureMonitorProfileContainerInsights.java | 229 +++ ...erAzureMonitorProfileKubeStateMetrics.java | 32 +- ...agedClusterAzureMonitorProfileMetrics.java | 27 +- .../ManagedClusterHostedSystemProfile.java | 94 + .../models/ManagedClusterHttpProxyConfig.java | 50 + ...gedClusterIngressDefaultDomainProfile.java | 114 ++ .../models/ManagedClusterIngressProfile.java | 78 +- ...IngressProfileApplicationLoadBalancer.java | 119 ++ ...terIngressProfileGatewayConfiguration.java | 99 + ...gedClusterIngressProfileWebAppRouting.java | 79 +- .../ManagedClusterLoadBalancerProfile.java | 35 + ...anagedClusterNodeResourceGroupProfile.java | 9 +- .../ManagedClusterPoolUpgradeProfile.java | 34 + ...ClusterPoolUpgradeProfileUpgradesItem.java | 29 + ...gedClusterPropertiesAutoScalerProfile.java | 15 +- .../ManagedClusterPropertiesForSnapshot.java | 175 ++ .../models/ManagedClusterSecurityProfile.java | 115 ++ ...ManagedClusterSecurityProfileDefender.java | 39 + ...SecurityProfileDefenderSecurityGating.java | 184 ++ ...eDefenderSecurityGatingIdentitiesItem.java | 135 ++ ...dClusterSecurityProfileImageIntegrity.java | 96 + ...ClusterSecurityProfileNodeRestriction.java | 96 + .../ManagedClusterSnapshotListResult.java | 117 ++ ...gedClusterStorageProfileDiskCsiDriver.java | 28 + ...nagedClusterWorkloadAutoScalerProfile.java | 8 +- ...utoScalerProfileVerticalPodAutoscaler.java | 39 +- .../models/ManagedGatewayType.java | 52 + .../models/MeshMembershipProperties.java | 125 ++ .../MeshMembershipProvisioningState.java | 71 + .../models/MeshMembershipsListResult.java | 116 ++ .../containerservice/models/Mode.java | 56 + .../models/NetworkProfileForSnapshot.java | 209 ++ .../models/NodeCustomizationProfile.java | 96 + .../models/NodeImageVersionsListResult.java | 116 ++ .../models/NodeOSUpgradeChannel.java | 11 +- .../containerservice/models/OSSku.java | 29 +- .../models/OperationStatusResultList.java | 104 + .../containerservice/models/Operator.java | 61 + .../models/PodLinkLocalAccess.java | 52 + .../models/ProxyRedirectionMechanism.java | 51 + .../models/PublicNetworkAccess.java | 5 + .../RebalanceLoadBalancersRequestBody.java | 97 + .../models/RelativeMonthlySchedule.java | 8 +- .../models/RestrictionLevel.java | 2 +- .../SafeguardsAvailableVersionsList.java | 117 ++ ...SafeguardsAvailableVersionsProperties.java | 101 + .../models/SafeguardsSupport.java | 51 + .../containerservice/models/ScaleProfile.java | 33 + .../models/SchedulerConfigMode.java | 51 + .../models/SchedulerInstanceProfile.java | 95 + .../models/SchedulerProfile.java | 98 + ...dulerProfileSchedulerInstanceProfiles.java | 99 + .../models/SeccompDefault.java | 52 + .../containerservice/models/SnapshotType.java | 5 + .../models/TransitEncryptionType.java | 52 + .../containerservice/models/Type.java | 2 +- .../models/UpgradeStrategy.java | 51 + .../containerservice/models/VmState.java | 51 + .../models/WorkloadRuntime.java | 5 + .../proxy-config.json | 2 +- .../KubernetesClustersTests.java | 2 +- sdk/resourcemanager/api-specs.json | 2 +- .../ManagedClustersDeleteSamples.java | 4 +- 182 files changed, 25108 insertions(+), 1092 deletions(-) create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceOperationsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/IdentityBindingsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/JwtAuthenticatorsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/LoadBalancersClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClusterSnapshotsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MeshMembershipsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationStatusResultsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/GuardrailsAvailableVersionInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/JwtAuthenticatorInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshMembershipInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/NodeImageVersionInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationStatusResultInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SafeguardsAvailableVersionInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceOperationsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/IdentityBindingsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/JwtAuthenticatorsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/LoadBalancersClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClusterSnapshotsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MeshMembershipsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationStatusResultsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AccelerationMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AddonAutoscaling.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingPerformance.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurityTransitEncryption.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolArtifactStreamingProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolBlueGreenUpgradeSettings.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolRecentlyUsedVersion.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AutoScaleProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterServiceLoadBalancerHealthProbeMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Component.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ComponentsByRelease.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfig.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriftAction.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriverType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsList.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsSupport.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingManagedIdentityProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingOidcIssuerProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProvisioningState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/InfrastructureEncryption.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpvsScheduler.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorClaimMappingExpression.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorClaimMappings.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorExtraClaimMappingExpression.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorIssuer.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorProvisioningState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorValidationRule.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesResourceObjectEncryptionProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelector.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelectorRequirement.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineHardwareProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineKubernetesProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfileLinuxProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineStatus.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoring.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileContainerInsights.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHostedSystemProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressDefaultDomainProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileApplicationLoadBalancer.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileGatewayConfiguration.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesForSnapshot.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGating.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageIntegrity.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileNodeRestriction.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSnapshotListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedGatewayType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProvisioningState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipsListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Mode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfileForSnapshot.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeCustomizationProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeImageVersionsListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationStatusResultList.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Operator.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodLinkLocalAccess.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ProxyRedirectionMechanism.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RebalanceLoadBalancersRequestBody.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsList.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsSupport.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerConfigMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerInstanceProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfileSchedulerInstanceProfiles.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SeccompDefault.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeStrategy.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VmState.java diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md index 749aeddb0309..50a400563f15 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md @@ -1,14 +1,12 @@ # Release History -## 2.57.0-beta.1 (Unreleased) +## 2.57.0-beta.1 (2025-12-01) -### Features Added - -### Breaking Changes +### Other Changes -### Bugs Fixed +#### Dependency Updates -### Other Changes +- Updated `api-version` to `2025-09-01-preview`. ## 2.56.1 (2025-11-24) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/assets.json b/sdk/containerservice/azure-resourcemanager-containerservice/assets.json index 6da23ec1e5f2..8457e7fc0469 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/assets.json +++ b/sdk/containerservice/azure-resourcemanager-containerservice/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/containerservice/azure-resourcemanager-containerservice", - "Tag": "java/containerservice/azure-resourcemanager-containerservice_8815152626" + "Tag": "java/containerservice/azure-resourcemanager-containerservice_c3a165c41a" } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java index f1ec76e42adb..d228cd8c62b4 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java @@ -30,7 +30,7 @@ public interface AgentPoolsClient { * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. + * take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -49,7 +49,7 @@ Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String re * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. + * take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -68,7 +68,7 @@ PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String resourc * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. + * take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -87,7 +87,7 @@ SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGrou * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. + * take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -107,7 +107,7 @@ SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGrou * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. + * take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -125,7 +125,7 @@ SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGrou * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. + * take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -142,7 +142,7 @@ SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGrou * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. + * take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -620,6 +620,122 @@ Response<AgentPoolUpgradeProfileInner> getUpgradeProfileWithResponse(String reso @ServiceMethod(returns = ReturnType.SINGLE) AgentPoolUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName, String agentPoolName); + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<Flux<ByteBuffer>>> completeUpgradeWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux<PollResult<Void>, Void> beginCompleteUpgradeAsync(String resourceGroupName, String resourceName, + String agentPoolName); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginCompleteUpgrade(String resourceGroupName, String resourceName, + String agentPoolName); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginCompleteUpgrade(String resourceGroupName, String resourceName, + String agentPoolName, Context context); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Void> completeUpgradeAsync(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void completeUpgrade(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void completeUpgrade(String resourceGroupName, String resourceName, String agentPoolName, Context context); + /** * Deletes specific machines in an agent pool. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java index 167e25fcae77..3fd176dbe278 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java @@ -68,6 +68,13 @@ public interface ContainerServiceManagementClient { */ ManagedClustersClient getManagedClusters(); + /** + * Gets the ContainerServiceOperationsClient object to access its operations. + * + * @return the ContainerServiceOperationsClient object. + */ + ContainerServiceOperationsClient getContainerServiceOperations(); + /** * Gets the MaintenanceConfigurationsClient object to access its operations. * @@ -89,6 +96,13 @@ public interface ContainerServiceManagementClient { */ AgentPoolsClient getAgentPools(); + /** + * Gets the MachinesClient object to access its operations. + * + * @return the MachinesClient object. + */ + MachinesClient getMachines(); + /** * Gets the PrivateEndpointConnectionsClient object to access its operations. * @@ -110,6 +124,13 @@ public interface ContainerServiceManagementClient { */ ResolvePrivateLinkServiceIdsClient getResolvePrivateLinkServiceIds(); + /** + * Gets the OperationStatusResultsClient object to access its operations. + * + * @return the OperationStatusResultsClient object. + */ + OperationStatusResultsClient getOperationStatusResults(); + /** * Gets the SnapshotsClient object to access its operations. * @@ -118,11 +139,11 @@ public interface ContainerServiceManagementClient { SnapshotsClient getSnapshots(); /** - * Gets the TrustedAccessRoleBindingsClient object to access its operations. + * Gets the ManagedClusterSnapshotsClient object to access its operations. * - * @return the TrustedAccessRoleBindingsClient object. + * @return the ManagedClusterSnapshotsClient object. */ - TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings(); + ManagedClusterSnapshotsClient getManagedClusterSnapshots(); /** * Gets the TrustedAccessRolesClient object to access its operations. @@ -132,9 +153,37 @@ public interface ContainerServiceManagementClient { TrustedAccessRolesClient getTrustedAccessRoles(); /** - * Gets the MachinesClient object to access its operations. + * Gets the TrustedAccessRoleBindingsClient object to access its operations. * - * @return the MachinesClient object. + * @return the TrustedAccessRoleBindingsClient object. */ - MachinesClient getMachines(); + TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings(); + + /** + * Gets the LoadBalancersClient object to access its operations. + * + * @return the LoadBalancersClient object. + */ + LoadBalancersClient getLoadBalancers(); + + /** + * Gets the IdentityBindingsClient object to access its operations. + * + * @return the IdentityBindingsClient object. + */ + IdentityBindingsClient getIdentityBindings(); + + /** + * Gets the JwtAuthenticatorsClient object to access its operations. + * + * @return the JwtAuthenticatorsClient object. + */ + JwtAuthenticatorsClient getJwtAuthenticators(); + + /** + * Gets the MeshMembershipsClient object to access its operations. + * + * @return the MeshMembershipsClient object. + */ + MeshMembershipsClient getMeshMemberships(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceOperationsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceOperationsClient.java new file mode 100644 index 000000000000..07ef553d11c3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceOperationsClient.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.fluent.models.NodeImageVersionInner; + +/** + * An instance of this class provides access to all the operations defined in ContainerServiceOperationsClient. + */ +public interface ContainerServiceOperationsClient { + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array NodeImageVersions as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux<NodeImageVersionInner> listNodeImageVersionsAsync(String location); + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array NodeImageVersions as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<NodeImageVersionInner> listNodeImageVersions(String location); + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array NodeImageVersions as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<NodeImageVersionInner> listNodeImageVersions(String location, Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/IdentityBindingsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/IdentityBindingsClient.java new file mode 100644 index 000000000000..4fb01bb3c58a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/IdentityBindingsClient.java @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.IdentityBindingInner; +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 IdentityBindingsClient. + */ +public interface IdentityBindingsClient { + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux<IdentityBindingInner> listByManagedClusterAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<IdentityBindingInner> listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<IdentityBindingInner> listByManagedCluster(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<IdentityBindingInner>> getWithResponseAsync(String resourceGroupName, String resourceName, + String identityBindingName); + + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<IdentityBindingInner> getAsync(String resourceGroupName, String resourceName, String identityBindingName); + + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<IdentityBindingInner> getWithResponse(String resourceGroupName, String resourceName, + String identityBindingName, Context context); + + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IdentityBindingInner get(String resourceGroupName, String resourceName, String identityBindingName); + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String identityBindingName, IdentityBindingInner parameters); + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux<PollResult<IdentityBindingInner>, IdentityBindingInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String identityBindingName, IdentityBindingInner parameters); + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<IdentityBindingInner>, IdentityBindingInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String identityBindingName, IdentityBindingInner parameters); + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<IdentityBindingInner>, IdentityBindingInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String identityBindingName, IdentityBindingInner parameters, Context context); + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<IdentityBindingInner> createOrUpdateAsync(String resourceGroupName, String resourceName, + String identityBindingName, IdentityBindingInner parameters); + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IdentityBindingInner createOrUpdate(String resourceGroupName, String resourceName, String identityBindingName, + IdentityBindingInner parameters); + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IdentityBindingInner createOrUpdate(String resourceGroupName, String resourceName, String identityBindingName, + IdentityBindingInner parameters, Context context); + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String identityBindingName); + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String identityBindingName); + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, + String identityBindingName); + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, + String identityBindingName, Context context); + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String identityBindingName); + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String identityBindingName); + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String identityBindingName, Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/JwtAuthenticatorsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/JwtAuthenticatorsClient.java new file mode 100644 index 000000000000..96e9f9eaad93 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/JwtAuthenticatorsClient.java @@ -0,0 +1,352 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.JwtAuthenticatorInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in JwtAuthenticatorsClient. + */ +public interface JwtAuthenticatorsClient { + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux<JwtAuthenticatorInner> listByManagedClusterAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<JwtAuthenticatorInner> listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<JwtAuthenticatorInner> listByManagedCluster(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<JwtAuthenticatorInner>> getWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName); + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<JwtAuthenticatorInner> getAsync(String resourceGroupName, String resourceName, String jwtAuthenticatorName); + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<JwtAuthenticatorInner> getWithResponse(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context); + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JwtAuthenticatorInner get(String resourceGroupName, String resourceName, String jwtAuthenticatorName); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JwtAuthenticatorInner parameters); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux<PollResult<JwtAuthenticatorInner>, JwtAuthenticatorInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<JwtAuthenticatorInner>, JwtAuthenticatorInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<JwtAuthenticatorInner>, JwtAuthenticatorInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters, Context context); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<JwtAuthenticatorInner> createOrUpdateAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JwtAuthenticatorInner parameters); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JwtAuthenticatorInner createOrUpdate(String resourceGroupName, String resourceName, String jwtAuthenticatorName, + JwtAuthenticatorInner parameters); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JwtAuthenticatorInner createOrUpdate(String resourceGroupName, String resourceName, String jwtAuthenticatorName, + JwtAuthenticatorInner parameters, Context context); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, + String jwtAuthenticatorName); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String jwtAuthenticatorName); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String jwtAuthenticatorName); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String jwtAuthenticatorName, Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/LoadBalancersClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/LoadBalancersClient.java new file mode 100644 index 000000000000..305de7605086 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/LoadBalancersClient.java @@ -0,0 +1,294 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.LoadBalancerInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in LoadBalancersClient. + */ +public interface LoadBalancersClient { + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux<LoadBalancerInner> listByManagedClusterAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<LoadBalancerInner> listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<LoadBalancerInner> listByManagedCluster(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<LoadBalancerInner>> getWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName); + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<LoadBalancerInner> getAsync(String resourceGroupName, String resourceName, String loadBalancerName); + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<LoadBalancerInner> getWithResponse(String resourceGroupName, String resourceName, String loadBalancerName, + Context context); + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LoadBalancerInner get(String resourceGroupName, String resourceName, String loadBalancerName); + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<LoadBalancerInner>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName, LoadBalancerInner parameters); + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<LoadBalancerInner> createOrUpdateAsync(String resourceGroupName, String resourceName, String loadBalancerName, + LoadBalancerInner parameters); + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<LoadBalancerInner> createOrUpdateWithResponse(String resourceGroupName, String resourceName, + String loadBalancerName, LoadBalancerInner parameters, Context context); + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LoadBalancerInner createOrUpdate(String resourceGroupName, String resourceName, String loadBalancerName, + LoadBalancerInner parameters); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String loadBalancerName); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, + String loadBalancerName); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, + String loadBalancerName, Context context); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String loadBalancerName); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String loadBalancerName); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String loadBalancerName, Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java index 57a92d2b1623..8f41b71734a9 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java @@ -9,8 +9,13 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservice.fluent.models.MachineInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -67,7 +72,7 @@ PagedIterable<MachineInner> list(String resourceGroupName, String resourceName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. + * @param machineName Host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -84,7 +89,7 @@ Mono<Response<MachineInner>> getWithResponseAsync(String resourceGroupName, Stri * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. + * @param machineName Host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -100,7 +105,7 @@ Mono<MachineInner> getAsync(String resourceGroupName, String resourceName, Strin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. + * @param machineName Host name of the machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -117,7 +122,7 @@ Response<MachineInner> getWithResponse(String resourceGroupName, String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. + * @param machineName Host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -125,4 +130,178 @@ Response<MachineInner> getWithResponse(String resourceGroupName, String resource */ @ServiceMethod(returns = ReturnType.SINGLE) MachineInner get(String resourceGroupName, String resourceName, String agentPoolName, String machineName); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine provides detailed information about its configuration and status along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a machine provides detailed information about its configuration and + * status. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux<PollResult<MachineInner>, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a machine provides detailed information about its configuration and + * status. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux<PollResult<MachineInner>, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a machine provides detailed information about its configuration and + * status. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<MachineInner>, MachineInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a machine provides detailed information about its configuration and + * status. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<MachineInner>, MachineInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch, Context context); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine provides detailed information about its configuration and status on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<MachineInner> createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine provides detailed information about its configuration and status on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<MachineInner> createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine provides detailed information about its configuration and status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MachineInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, String machineName, + MachineInner parameters); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine provides detailed information about its configuration and status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MachineInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, String machineName, + MachineInner parameters, String ifMatch, String ifNoneMatch, Context context); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClusterSnapshotsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClusterSnapshotsClient.java new file mode 100644 index 000000000000..f2f1123351ba --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClusterSnapshotsClient.java @@ -0,0 +1,327 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterSnapshotInner; +import com.azure.resourcemanager.containerservice.models.TagsObject; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ManagedClusterSnapshotsClient. + */ +public interface ManagedClusterSnapshotsClient extends InnerSupportsGet<ManagedClusterSnapshotInner>, + InnerSupportsListing<ManagedClusterSnapshotInner>, InnerSupportsDelete<Void> { + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux<ManagedClusterSnapshotInner> listAsync(); + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ManagedClusterSnapshotInner> list(); + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ManagedClusterSnapshotInner> list(Context context); + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Cluster Snapshots operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux<ManagedClusterSnapshotInner> listByResourceGroupAsync(String resourceGroupName); + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Cluster Snapshots operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ManagedClusterSnapshotInner> listByResourceGroup(String resourceGroupName); + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Cluster Snapshots operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<ManagedClusterSnapshotInner> listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<ManagedClusterSnapshotInner>> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName); + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<ManagedClusterSnapshotInner> getByResourceGroupAsync(String resourceGroupName, String resourceName); + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<ManagedClusterSnapshotInner> getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterSnapshotInner getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<ManagedClusterSnapshotInner>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterSnapshotInner parameters); + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<ManagedClusterSnapshotInner> createOrUpdateAsync(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters); + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<ManagedClusterSnapshotInner> createOrUpdateWithResponse(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters, Context context); + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterSnapshotInner createOrUpdate(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters); + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<ManagedClusterSnapshotInner>> updateTagsWithResponseAsync(String resourceGroupName, + String resourceName, TagsObject parameters); + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<ManagedClusterSnapshotInner> updateTagsAsync(String resourceGroupName, String resourceName, + TagsObject parameters); + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<ManagedClusterSnapshotInner> updateTagsWithResponse(String resourceGroupName, String resourceName, + TagsObject parameters, Context context); + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterSnapshotInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters); + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String resourceName); + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Void> deleteAsync(String resourceGroupName, String resourceName); + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<Void> deleteWithResponse(String resourceGroupName, String resourceName, Context context); + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java index 1e03332b8dff..e97cea4abd7d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java @@ -14,6 +14,7 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservice.fluent.models.GuardrailsAvailableVersionInner; import com.azure.resourcemanager.containerservice.fluent.models.KubernetesVersionListResultInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterAccessProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; @@ -22,10 +23,12 @@ import com.azure.resourcemanager.containerservice.fluent.models.MeshUpgradeProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; import com.azure.resourcemanager.containerservice.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservice.fluent.models.SafeguardsAvailableVersionInner; import com.azure.resourcemanager.containerservice.models.Format; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; import com.azure.resourcemanager.containerservice.models.ManagedClustersGetCommandResultResponse; +import com.azure.resourcemanager.containerservice.models.RebalanceLoadBalancersRequestBody; import com.azure.resourcemanager.containerservice.models.RunCommandRequest; import com.azure.resourcemanager.containerservice.models.TagsObject; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; @@ -838,6 +841,8 @@ ManagedClusterInner updateTags(String resourceGroupName, String resourceName, Ta * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -845,7 +850,7 @@ ManagedClusterInner updateTags(String resourceGroupName, String resourceName, Ta */ @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String ifMatch); + String ifMatch, Boolean ignorePodDisruptionBudget); /** * Deletes a managed cluster. @@ -853,13 +858,16 @@ Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, String ifMatch); + PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, String ifMatch, + Boolean ignorePodDisruptionBudget); /** * Deletes a managed cluster. @@ -893,6 +901,8 @@ Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -901,7 +911,7 @@ Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, String ifMatch, - Context context); + Boolean ignorePodDisruptionBudget, Context context); /** * Deletes a managed cluster. @@ -909,13 +919,16 @@ SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String ifMatch); + Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String ifMatch, + Boolean ignorePodDisruptionBudget); /** * Deletes a managed cluster. @@ -948,13 +961,16 @@ SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String ifMatch, Context context); + void delete(String resourceGroupName, String resourceName, String ifMatch, Boolean ignorePodDisruptionBudget, + Context context); /** * Reset the Service Principal Profile of a managed cluster. @@ -1200,10 +1216,11 @@ void resetAadProfile(String resourceGroupName, String resourceName, ManagedClust Context context); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1213,14 +1230,15 @@ void resetAadProfile(String resourceGroupName, String resourceName, ManagedClust * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, + Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String resourceGroupName, String resourceName); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1230,14 +1248,14 @@ Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsync(Stri * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, - String resourceName); + PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String resourceGroupName, String resourceName); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1247,13 +1265,14 @@ PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(String re * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName); + SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1264,14 +1283,15 @@ PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(String re * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName, + SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, Context context); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1281,13 +1301,14 @@ SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourc * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Void> rotateClusterCertificatesAsync(String resourceGroupName, String resourceName); + Mono<Void> abortLatestOperationAsync(String resourceGroupName, String resourceName); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1296,13 +1317,14 @@ SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourc * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void rotateClusterCertificates(String resourceGroupName, String resourceName); + void abortLatestOperation(String resourceGroupName, String resourceName); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1312,14 +1334,13 @@ SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourc * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context); + void abortLatestOperation(String resourceGroupName, String resourceName, Context context); /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1329,15 +1350,14 @@ SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourc * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String resourceGroupName, + Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, String resourceName); /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1347,14 +1367,14 @@ Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String re * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String resourceGroupName, String resourceName); + PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, + String resourceName); /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1364,14 +1384,13 @@ Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String re * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName); + SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName); /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1382,15 +1401,14 @@ Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String re * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, + SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName, Context context); /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1400,14 +1418,13 @@ SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGrou * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Void> abortLatestOperationAsync(String resourceGroupName, String resourceName); + Mono<Void> rotateClusterCertificatesAsync(String resourceGroupName, String resourceName); /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1416,14 +1433,13 @@ SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGrou * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void abortLatestOperation(String resourceGroupName, String resourceName); + void rotateClusterCertificates(String resourceGroupName, String resourceName); /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1433,7 +1449,7 @@ SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGrou * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void abortLatestOperation(String resourceGroupName, String resourceName, Context context); + void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context); /** * Rotates the service account signing keys of a managed cluster. @@ -2014,6 +2030,224 @@ PagedIterable<OutboundEnvironmentEndpointInner> listOutboundNetworkDependenciesE PagedIterable<OutboundEnvironmentEndpointInner> listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String resourceName, Context context); + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available Guardrails Version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<GuardrailsAvailableVersionInner>> getGuardrailsVersionsWithResponseAsync(String location, + String version); + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available Guardrails Version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<GuardrailsAvailableVersionInner> getGuardrailsVersionsAsync(String location, String version); + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available Guardrails Version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<GuardrailsAvailableVersionInner> getGuardrailsVersionsWithResponse(String location, String version, + Context context); + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available Guardrails Version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GuardrailsAvailableVersionInner getGuardrailsVersions(String location, String version); + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of GuardrailsVersions as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux<GuardrailsAvailableVersionInner> listGuardrailsVersionsAsync(String location); + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of GuardrailsVersions as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<GuardrailsAvailableVersionInner> listGuardrailsVersions(String location); + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of GuardrailsVersions as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<GuardrailsAvailableVersionInner> listGuardrailsVersions(String location, Context context); + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available Safeguards Version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<SafeguardsAvailableVersionInner>> getSafeguardsVersionsWithResponseAsync(String location, + String version); + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available Safeguards Version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<SafeguardsAvailableVersionInner> getSafeguardsVersionsAsync(String location, String version); + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available Safeguards Version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<SafeguardsAvailableVersionInner> getSafeguardsVersionsWithResponse(String location, String version, + Context context); + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available Safeguards Version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SafeguardsAvailableVersionInner getSafeguardsVersions(String location, String version); + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of SafeguardsVersions as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux<SafeguardsAvailableVersionInner> listSafeguardsVersionsAsync(String location); + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of SafeguardsVersions as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<SafeguardsAvailableVersionInner> listSafeguardsVersions(String location); + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of SafeguardsVersions as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<SafeguardsAvailableVersionInner> listSafeguardsVersions(String location, Context context); + /** * Lists mesh revision profiles for all meshes in the specified location. * @@ -2227,4 +2461,116 @@ Response<MeshUpgradeProfileInner> getMeshUpgradeProfileWithResponse(String resou */ @ServiceMethod(returns = ReturnType.SINGLE) MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<Flux<ByteBuffer>>> rebalanceLoadBalancersWithResponseAsync(String resourceGroupName, + String resourceName, RebalanceLoadBalancersRequestBody parameters); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux<PollResult<Void>, Void> beginRebalanceLoadBalancersAsync(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginRebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginRebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters, Context context); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Void> rebalanceLoadBalancersAsync(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void rebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void rebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters, Context context); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MeshMembershipsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MeshMembershipsClient.java new file mode 100644 index 000000000000..bf8ff69cb6ae --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MeshMembershipsClient.java @@ -0,0 +1,345 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.MeshMembershipInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MeshMembershipsClient. + */ +public interface MeshMembershipsClient { + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux<MeshMembershipInner> listByManagedClusterAsync(String resourceGroupName, String resourceName); + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<MeshMembershipInner> listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<MeshMembershipInner> listByManagedCluster(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<MeshMembershipInner>> getWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName); + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<MeshMembershipInner> getAsync(String resourceGroupName, String resourceName, String meshMembershipName); + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<MeshMembershipInner> getWithResponse(String resourceGroupName, String resourceName, + String meshMembershipName, Context context); + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MeshMembershipInner get(String resourceGroupName, String resourceName, String meshMembershipName); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName, MeshMembershipInner parameters); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux<PollResult<MeshMembershipInner>, MeshMembershipInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String meshMembershipName, MeshMembershipInner parameters); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<MeshMembershipInner>, MeshMembershipInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String meshMembershipName, MeshMembershipInner parameters); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<MeshMembershipInner>, MeshMembershipInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String meshMembershipName, MeshMembershipInner parameters, Context context); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<MeshMembershipInner> createOrUpdateAsync(String resourceGroupName, String resourceName, + String meshMembershipName, MeshMembershipInner parameters); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MeshMembershipInner createOrUpdate(String resourceGroupName, String resourceName, String meshMembershipName, + MeshMembershipInner parameters); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MeshMembershipInner createOrUpdate(String resourceGroupName, String resourceName, String meshMembershipName, + MeshMembershipInner parameters, Context context); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String meshMembershipName); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, + String meshMembershipName); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, + String meshMembershipName, Context context); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String meshMembershipName); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String meshMembershipName); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String meshMembershipName, Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationStatusResultsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationStatusResultsClient.java new file mode 100644 index 000000000000..b937300f2a7a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationStatusResultsClient.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.fluent.models.OperationStatusResultInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OperationStatusResultsClient. + */ +public interface OperationStatusResultsClient { + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux<OperationStatusResultInner> listAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<OperationStatusResultInner> list(String resourceGroupName, String resourceName); + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<OperationStatusResultInner> list(String resourceGroupName, String resourceName, Context context); + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<OperationStatusResultInner>> getWithResponseAsync(String resourceGroupName, String resourceName, + String operationId); + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<OperationStatusResultInner> getAsync(String resourceGroupName, String resourceName, String operationId); + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<OperationStatusResultInner> getWithResponse(String resourceGroupName, String resourceName, + String operationId, Context context); + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner get(String resourceGroupName, String resourceName, String operationId); + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<Response<OperationStatusResultInner>> getByAgentPoolWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, String operationId); + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<OperationStatusResultInner> getByAgentPoolAsync(String resourceGroupName, String resourceName, + String agentPoolName, String operationId); + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<OperationStatusResultInner> getByAgentPoolWithResponse(String resourceGroupName, String resourceName, + String agentPoolName, String operationId, Context context); + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner getByAgentPool(String resourceGroupName, String resourceName, String agentPoolName, + String operationId); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java index 5f3f79c9daf8..72c8f983ce8f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java @@ -9,6 +9,8 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.AgentPoolArtifactStreamingProfile; +import com.azure.resourcemanager.containerservice.models.AgentPoolBlueGreenUpgradeSettings; import com.azure.resourcemanager.containerservice.models.AgentPoolGatewayProfile; import com.azure.resourcemanager.containerservice.models.AgentPoolMode; import com.azure.resourcemanager.containerservice.models.AgentPoolNetworkProfile; @@ -24,6 +26,7 @@ import com.azure.resourcemanager.containerservice.models.KubeletDiskType; import com.azure.resourcemanager.containerservice.models.LinuxOSConfig; import com.azure.resourcemanager.containerservice.models.LocalDnsProfile; +import com.azure.resourcemanager.containerservice.models.NodeCustomizationProfile; import com.azure.resourcemanager.containerservice.models.OSDiskType; import com.azure.resourcemanager.containerservice.models.OSSku; import com.azure.resourcemanager.containerservice.models.OSType; @@ -32,6 +35,7 @@ import com.azure.resourcemanager.containerservice.models.ScaleDownMode; import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy; import com.azure.resourcemanager.containerservice.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservice.models.UpgradeStrategy; import com.azure.resourcemanager.containerservice.models.VirtualMachineNodes; import com.azure.resourcemanager.containerservice.models.VirtualMachinesProfile; import com.azure.resourcemanager.containerservice.models.WorkloadRuntime; @@ -426,9 +430,9 @@ public AgentPoolInner withOsType(OSType osType) { } /** - * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. - * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is - * Windows. + * Get the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after + * Windows2019 is deprecated. * * @return the osSku value. */ @@ -437,9 +441,9 @@ public OSSku osSku() { } /** - * Set the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. - * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is - * Windows. + * Set the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after + * Windows2019 is deprecated. * * @param osSku the osSku value to set. * @return the AgentPoolInner object itself. @@ -598,13 +602,13 @@ public AgentPoolInner withMode(AgentPoolMode mode) { /** * Get the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When - * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the - * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an - * upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an - * AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control - * plane. The node pool minor version must be within two minor versions of the control plane version. The node pool - * version cannot be greater than the control plane version. For more information see [upgrading a node + * <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the + * latest supported patch version is chosen automatically. Updating the agent pool with the same <major.minor> + * once it has been created will not trigger an upgrade, even if a newer patch version is available. As a best + * practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool + * version must have the same major version as the control plane. The node pool minor version must be within two + * minor versions of the control plane version. The node pool version cannot be greater than the control plane + * version. For more information see [upgrading a node * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). * * @return the orchestratorVersion value. @@ -615,13 +619,13 @@ public String orchestratorVersion() { /** * Set the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When - * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the - * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an - * upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an - * AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control - * plane. The node pool minor version must be within two minor versions of the control plane version. The node pool - * version cannot be greater than the control plane version. For more information see [upgrading a node + * <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the + * latest supported patch version is chosen automatically. Updating the agent pool with the same <major.minor> + * once it has been created will not trigger an upgrade, even if a newer patch version is available. As a best + * practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool + * version must have the same major version as the control plane. The node pool minor version must be within two + * minor versions of the control plane version. The node pool version cannot be greater than the control plane + * version. For more information see [upgrading a node * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). * * @param orchestratorVersion the orchestratorVersion value to set. @@ -636,9 +640,9 @@ public AgentPoolInner withOrchestratorVersion(String orchestratorVersion) { } /** - * Get the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. If - * orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to - * it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> + * Get the currentOrchestratorVersion property: The version of Kubernetes running on the Agent Pool. If + * orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> * version being used. * * @return the currentOrchestratorVersion value. @@ -657,7 +661,45 @@ public String nodeImageVersion() { } /** - * Get the upgradeSettings property: Settings for upgrading the agentpool. + * Set the nodeImageVersion property: The version of node image. + * + * @param nodeImageVersion the nodeImageVersion value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withNodeImageVersion(String nodeImageVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withNodeImageVersion(nodeImageVersion); + return this; + } + + /** + * Get the upgradeStrategy property: Defines the upgrade strategy for the agent pool. The default is Rolling. + * + * @return the upgradeStrategy value. + */ + public UpgradeStrategy upgradeStrategy() { + return this.innerProperties() == null ? null : this.innerProperties().upgradeStrategy(); + } + + /** + * Set the upgradeStrategy property: Defines the upgrade strategy for the agent pool. The default is Rolling. + * + * @param upgradeStrategy the upgradeStrategy value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withUpgradeStrategy(UpgradeStrategy upgradeStrategy) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withUpgradeStrategy(upgradeStrategy); + return this; + } + + /** + * Get the upgradeSettings property: Settings for upgrading the agentpool. Applies when upgrade strategy is set to + * Rolling. * * @return the upgradeSettings value. */ @@ -666,7 +708,8 @@ public AgentPoolUpgradeSettings upgradeSettings() { } /** - * Set the upgradeSettings property: Settings for upgrading the agentpool. + * Set the upgradeSettings property: Settings for upgrading the agentpool. Applies when upgrade strategy is set to + * Rolling. * * @param upgradeSettings the upgradeSettings value to set. * @return the AgentPoolInner object itself. @@ -679,6 +722,31 @@ public AgentPoolInner withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettin return this; } + /** + * Get the upgradeSettingsBlueGreen property: Settings for Blue-Green upgrade on the agentpool. Applies when upgrade + * strategy is set to BlueGreen. + * + * @return the upgradeSettingsBlueGreen value. + */ + public AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen() { + return this.innerProperties() == null ? null : this.innerProperties().upgradeSettingsBlueGreen(); + } + + /** + * Set the upgradeSettingsBlueGreen property: Settings for Blue-Green upgrade on the agentpool. Applies when upgrade + * strategy is set to BlueGreen. + * + * @param upgradeSettingsBlueGreen the upgradeSettingsBlueGreen value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withUpgradeSettingsBlueGreen(AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withUpgradeSettingsBlueGreen(upgradeSettingsBlueGreen); + return this; + } + /** * Get the provisioningState property: The current deployment or provisioning state. * @@ -954,6 +1022,39 @@ public AgentPoolInner withNodeTaints(List<String> nodeTaints) { return this; } + /** + * Get the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be + * modified after node pool is created, but nodes will not be recreated with new taints until another operation that + * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run + * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with + * `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @return the nodeInitializationTaints value. + */ + public List<String> nodeInitializationTaints() { + return this.innerProperties() == null ? null : this.innerProperties().nodeInitializationTaints(); + } + + /** + * Set the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be + * modified after node pool is created, but nodes will not be recreated with new taints until another operation that + * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run + * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with + * `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @param nodeInitializationTaints the nodeInitializationTaints value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withNodeInitializationTaints(List<String> nodeInitializationTaints) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withNodeInitializationTaints(nodeInitializationTaints); + return this; + } + /** * Get the proximityPlacementGroupId property: The ID for Proximity Placement Group. * @@ -1207,48 +1308,48 @@ public AgentPoolInner withHostGroupId(String hostGroupId) { } /** - * Get the networkProfile property: Network-related settings of an agent pool. + * Get the windowsProfile property: The Windows agent pool's specific profile. * - * @return the networkProfile value. + * @return the windowsProfile value. */ - public AgentPoolNetworkProfile networkProfile() { - return this.innerProperties() == null ? null : this.innerProperties().networkProfile(); + public AgentPoolWindowsProfile windowsProfile() { + return this.innerProperties() == null ? null : this.innerProperties().windowsProfile(); } /** - * Set the networkProfile property: Network-related settings of an agent pool. + * Set the windowsProfile property: The Windows agent pool's specific profile. * - * @param networkProfile the networkProfile value to set. + * @param windowsProfile the windowsProfile value to set. * @return the AgentPoolInner object itself. */ - public AgentPoolInner withNetworkProfile(AgentPoolNetworkProfile networkProfile) { + public AgentPoolInner withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { if (this.innerProperties() == null) { this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); } - this.innerProperties().withNetworkProfile(networkProfile); + this.innerProperties().withWindowsProfile(windowsProfile); return this; } /** - * Get the windowsProfile property: The Windows agent pool's specific profile. + * Get the networkProfile property: Network-related settings of an agent pool. * - * @return the windowsProfile value. + * @return the networkProfile value. */ - public AgentPoolWindowsProfile windowsProfile() { - return this.innerProperties() == null ? null : this.innerProperties().windowsProfile(); + public AgentPoolNetworkProfile networkProfile() { + return this.innerProperties() == null ? null : this.innerProperties().networkProfile(); } /** - * Set the windowsProfile property: The Windows agent pool's specific profile. + * Set the networkProfile property: Network-related settings of an agent pool. * - * @param windowsProfile the windowsProfile value to set. + * @param networkProfile the networkProfile value to set. * @return the AgentPoolInner object itself. */ - public AgentPoolInner withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { + public AgentPoolInner withNetworkProfile(AgentPoolNetworkProfile networkProfile) { if (this.innerProperties() == null) { this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); } - this.innerProperties().withWindowsProfile(windowsProfile); + this.innerProperties().withNetworkProfile(networkProfile); return this; } @@ -1276,7 +1377,7 @@ public AgentPoolInner withSecurityProfile(AgentPoolSecurityProfile securityProfi } /** - * Get the gpuProfile property: GPU settings for the Agent Pool. + * Get the gpuProfile property: The GPU settings of an agent pool. * * @return the gpuProfile value. */ @@ -1285,7 +1386,7 @@ public GpuProfile gpuProfile() { } /** - * Set the gpuProfile property: GPU settings for the Agent Pool. + * Set the gpuProfile property: The GPU settings of an agent pool. * * @param gpuProfile the gpuProfile value to set. * @return the AgentPoolInner object itself. @@ -1299,27 +1400,25 @@ public AgentPoolInner withGpuProfile(GpuProfile gpuProfile) { } /** - * Get the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be - * set if agent pool mode is not Gateway. + * Get the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. * - * @return the gatewayProfile value. + * @return the artifactStreamingProfile value. */ - public AgentPoolGatewayProfile gatewayProfile() { - return this.innerProperties() == null ? null : this.innerProperties().gatewayProfile(); + public AgentPoolArtifactStreamingProfile artifactStreamingProfile() { + return this.innerProperties() == null ? null : this.innerProperties().artifactStreamingProfile(); } /** - * Set the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be - * set if agent pool mode is not Gateway. + * Set the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. * - * @param gatewayProfile the gatewayProfile value to set. + * @param artifactStreamingProfile the artifactStreamingProfile value to set. * @return the AgentPoolInner object itself. */ - public AgentPoolInner withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { + public AgentPoolInner withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile) { if (this.innerProperties() == null) { this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); } - this.innerProperties().withGatewayProfile(gatewayProfile); + this.innerProperties().withArtifactStreamingProfile(artifactStreamingProfile); return this; } @@ -1369,6 +1468,31 @@ public AgentPoolInner withVirtualMachineNodesStatus(List<VirtualMachineNodes> vi return this; } + /** + * Get the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be + * set if agent pool mode is not Gateway. + * + * @return the gatewayProfile value. + */ + public AgentPoolGatewayProfile gatewayProfile() { + return this.innerProperties() == null ? null : this.innerProperties().gatewayProfile(); + } + + /** + * Set the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be + * set if agent pool mode is not Gateway. + * + * @param gatewayProfile the gatewayProfile value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withGatewayProfile(gatewayProfile); + return this; + } + /** * Get the status property: Contains read-only information about the Agent Pool. * @@ -1419,6 +1543,31 @@ public AgentPoolInner withLocalDnsProfile(LocalDnsProfile localDnsProfile) { return this; } + /** + * Get the nodeCustomizationProfile property: Settings to determine the node customization used to provision nodes + * in a pool. + * + * @return the nodeCustomizationProfile value. + */ + public NodeCustomizationProfile nodeCustomizationProfile() { + return this.innerProperties() == null ? null : this.innerProperties().nodeCustomizationProfile(); + } + + /** + * Set the nodeCustomizationProfile property: Settings to determine the node customization used to provision nodes + * in a pool. + * + * @param nodeCustomizationProfile the nodeCustomizationProfile value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withNodeCustomizationProfile(NodeCustomizationProfile nodeCustomizationProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withNodeCustomizationProfile(nodeCustomizationProfile); + return this; + } + /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java index 79cc3cd76425..c1c9ff4eea55 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java @@ -10,7 +10,9 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.AgentPoolRecentlyUsedVersion; import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; +import com.azure.resourcemanager.containerservice.models.ComponentsByRelease; import com.azure.resourcemanager.containerservice.models.OSType; import java.io.IOException; import java.util.List; @@ -151,6 +153,38 @@ public AgentPoolUpgradeProfileInner withUpgrades(List<AgentPoolUpgradeProfilePro return this; } + /** + * Get the componentsByReleases property: List of components grouped by kubernetes major.minor version. + * + * @return the componentsByReleases value. + */ + public List<ComponentsByRelease> componentsByReleases() { + return this.innerProperties() == null ? null : this.innerProperties().componentsByReleases(); + } + + /** + * Set the componentsByReleases property: List of components grouped by kubernetes major.minor version. + * + * @param componentsByReleases the componentsByReleases value to set. + * @return the AgentPoolUpgradeProfileInner object itself. + */ + public AgentPoolUpgradeProfileInner withComponentsByReleases(List<ComponentsByRelease> componentsByReleases) { + if (this.innerProperties() == null) { + this.innerProperties = new AgentPoolUpgradeProfileProperties(); + } + this.innerProperties().withComponentsByReleases(componentsByReleases); + return this; + } + + /** + * Get the recentlyUsedVersions property: List of historical good versions for rollback operations. + * + * @return the recentlyUsedVersions value. + */ + public List<AgentPoolRecentlyUsedVersion> recentlyUsedVersions() { + return this.innerProperties() == null ? null : this.innerProperties().recentlyUsedVersions(); + } + /** * Get the latestNodeImageVersion property: The latest AKS supported node image version. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java index 98880ef60067..231732f5543f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java @@ -10,7 +10,9 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.AgentPoolRecentlyUsedVersion; import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; +import com.azure.resourcemanager.containerservice.models.ComponentsByRelease; import com.azure.resourcemanager.containerservice.models.OSType; import java.io.IOException; import java.util.List; @@ -35,6 +37,16 @@ public final class AgentPoolUpgradeProfileProperties implements JsonSerializable */ private List<AgentPoolUpgradeProfilePropertiesUpgradesItem> upgrades; + /* + * List of components grouped by kubernetes major.minor version. + */ + private List<ComponentsByRelease> componentsByReleases; + + /* + * List of historical good versions for rollback operations. + */ + private List<AgentPoolRecentlyUsedVersion> recentlyUsedVersions; + /* * The latest AKS supported node image version. */ @@ -107,6 +119,35 @@ public List<AgentPoolUpgradeProfilePropertiesUpgradesItem> upgrades() { return this; } + /** + * Get the componentsByReleases property: List of components grouped by kubernetes major.minor version. + * + * @return the componentsByReleases value. + */ + public List<ComponentsByRelease> componentsByReleases() { + return this.componentsByReleases; + } + + /** + * Set the componentsByReleases property: List of components grouped by kubernetes major.minor version. + * + * @param componentsByReleases the componentsByReleases value to set. + * @return the AgentPoolUpgradeProfileProperties object itself. + */ + public AgentPoolUpgradeProfileProperties withComponentsByReleases(List<ComponentsByRelease> componentsByReleases) { + this.componentsByReleases = componentsByReleases; + return this; + } + + /** + * Get the recentlyUsedVersions property: List of historical good versions for rollback operations. + * + * @return the recentlyUsedVersions value. + */ + public List<AgentPoolRecentlyUsedVersion> recentlyUsedVersions() { + return this.recentlyUsedVersions; + } + /** * Get the latestNodeImageVersion property: The latest AKS supported node image version. * @@ -146,6 +187,12 @@ public void validate() { if (upgrades() != null) { upgrades().forEach(e -> e.validate()); } + if (componentsByReleases() != null) { + componentsByReleases().forEach(e -> e.validate()); + } + if (recentlyUsedVersions() != null) { + recentlyUsedVersions().forEach(e -> e.validate()); + } } private static final ClientLogger LOGGER = new ClientLogger(AgentPoolUpgradeProfileProperties.class); @@ -159,6 +206,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("componentsByReleases", this.componentsByReleases, + (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("latestNodeImageVersion", this.latestNodeImageVersion); return jsonWriter.writeEndObject(); } @@ -188,6 +237,14 @@ public static AgentPoolUpgradeProfileProperties fromJson(JsonReader jsonReader) List<AgentPoolUpgradeProfilePropertiesUpgradesItem> upgrades = reader.readArray(reader1 -> AgentPoolUpgradeProfilePropertiesUpgradesItem.fromJson(reader1)); deserializedAgentPoolUpgradeProfileProperties.upgrades = upgrades; + } else if ("componentsByReleases".equals(fieldName)) { + List<ComponentsByRelease> componentsByReleases + = reader.readArray(reader1 -> ComponentsByRelease.fromJson(reader1)); + deserializedAgentPoolUpgradeProfileProperties.componentsByReleases = componentsByReleases; + } else if ("recentlyUsedVersions".equals(fieldName)) { + List<AgentPoolRecentlyUsedVersion> recentlyUsedVersions + = reader.readArray(reader1 -> AgentPoolRecentlyUsedVersion.fromJson(reader1)); + deserializedAgentPoolUpgradeProfileProperties.recentlyUsedVersions = recentlyUsedVersions; } else if ("latestNodeImageVersion".equals(fieldName)) { deserializedAgentPoolUpgradeProfileProperties.latestNodeImageVersion = reader.getString(); } else { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/GuardrailsAvailableVersionInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/GuardrailsAvailableVersionInner.java new file mode 100644 index 000000000000..79aaab7e8e08 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/GuardrailsAvailableVersionInner.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.GuardrailsAvailableVersionsProperties; +import java.io.IOException; + +/** + * Available Guardrails Version. + */ +@Fluent +public final class GuardrailsAvailableVersionInner extends ProxyResource { + /* + * Whether the version is default or not and support info. + */ + private GuardrailsAvailableVersionsProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of GuardrailsAvailableVersionInner class. + */ + public GuardrailsAvailableVersionInner() { + } + + /** + * Get the properties property: Whether the version is default or not and support info. + * + * @return the properties value. + */ + public GuardrailsAvailableVersionsProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Whether the version is default or not and support info. + * + * @param properties the properties value to set. + * @return the GuardrailsAvailableVersionInner object itself. + */ + public GuardrailsAvailableVersionInner withProperties(GuardrailsAvailableVersionsProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property properties in model GuardrailsAvailableVersionInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GuardrailsAvailableVersionInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GuardrailsAvailableVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GuardrailsAvailableVersionInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GuardrailsAvailableVersionInner. + */ + public static GuardrailsAvailableVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GuardrailsAvailableVersionInner deserializedGuardrailsAvailableVersionInner + = new GuardrailsAvailableVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedGuardrailsAvailableVersionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedGuardrailsAvailableVersionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedGuardrailsAvailableVersionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedGuardrailsAvailableVersionInner.properties + = GuardrailsAvailableVersionsProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedGuardrailsAvailableVersionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGuardrailsAvailableVersionInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java new file mode 100644 index 000000000000..5b53f9fe6097 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.IdentityBindingProperties; +import java.io.IOException; + +/** + * The IdentityBinding resource. + */ +@Fluent +public final class IdentityBindingInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private IdentityBindingProperties properties; + + /* + * Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is + * updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable + * optimistic concurrency per the normal eTag convention. + */ + private String etag; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of IdentityBindingInner class. + */ + public IdentityBindingInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public IdentityBindingProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the IdentityBindingInner object itself. + */ + public IdentityBindingInner withProperties(IdentityBindingProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will + * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a + * subsequent request to enable optimistic concurrency per the normal eTag convention. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentityBindingInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityBindingInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IdentityBindingInner. + */ + public static IdentityBindingInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityBindingInner deserializedIdentityBindingInner = new IdentityBindingInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedIdentityBindingInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedIdentityBindingInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedIdentityBindingInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedIdentityBindingInner.properties = IdentityBindingProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedIdentityBindingInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedIdentityBindingInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityBindingInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/JwtAuthenticatorInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/JwtAuthenticatorInner.java new file mode 100644 index 000000000000..9b4df46d0e88 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/JwtAuthenticatorInner.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.JwtAuthenticatorProperties; +import java.io.IOException; + +/** + * Configuration for JWT authenticator in the managed cluster. + */ +@Fluent +public final class JwtAuthenticatorInner extends ProxyResource { + /* + * The properties of JWTAuthenticator. For details on how to configure the properties of a JWT authenticator, please + * refer to the Kubernetes documentation: + * https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. + * Please note that not all fields available in the Kubernetes documentation are supported by AKS. For + * troubleshooting, please see https://aka.ms/aks-external-issuers-docs. + */ + private JwtAuthenticatorProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of JwtAuthenticatorInner class. + */ + public JwtAuthenticatorInner() { + } + + /** + * Get the properties property: The properties of JWTAuthenticator. For details on how to configure the properties + * of a JWT authenticator, please refer to the Kubernetes documentation: + * https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. + * Please note that not all fields available in the Kubernetes documentation are supported by AKS. For + * troubleshooting, please see https://aka.ms/aks-external-issuers-docs. + * + * @return the properties value. + */ + public JwtAuthenticatorProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of JWTAuthenticator. For details on how to configure the properties + * of a JWT authenticator, please refer to the Kubernetes documentation: + * https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. + * Please note that not all fields available in the Kubernetes documentation are supported by AKS. For + * troubleshooting, please see https://aka.ms/aks-external-issuers-docs. + * + * @param properties the properties value to set. + * @return the JwtAuthenticatorInner object itself. + */ + public JwtAuthenticatorInner withProperties(JwtAuthenticatorProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property properties in model JwtAuthenticatorInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JwtAuthenticatorInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JwtAuthenticatorInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JwtAuthenticatorInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JwtAuthenticatorInner. + */ + public static JwtAuthenticatorInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JwtAuthenticatorInner deserializedJwtAuthenticatorInner = new JwtAuthenticatorInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedJwtAuthenticatorInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedJwtAuthenticatorInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedJwtAuthenticatorInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedJwtAuthenticatorInner.properties = JwtAuthenticatorProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedJwtAuthenticatorInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedJwtAuthenticatorInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerInner.java new file mode 100644 index 000000000000..090dfb7eef8c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerInner.java @@ -0,0 +1,298 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.LabelSelector; +import java.io.IOException; + +/** + * The configurations regarding multiple standard load balancers. If not supplied, single load balancer mode will be + * used. Multiple standard load balancers mode will be used if at lease one configuration is supplied. There has to be a + * configuration named `kubernetes`. The name field will be the name of the corresponding public load balancer. There + * will be an internal load balancer created if needed, and the name will be `<name>-internal`. The internal lb + * shares the same configurations as the external one. The internal lbs are not needed to be included in LoadBalancer + * list. + */ +@Fluent +public final class LoadBalancerInner extends ProxyResource { + /* + * The properties of the load balancer. + */ + private LoadBalancerProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of LoadBalancerInner class. + */ + public LoadBalancerInner() { + } + + /** + * Get the innerProperties property: The properties of the load balancer. + * + * @return the innerProperties value. + */ + private LoadBalancerProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the primaryAgentPoolName property: Required field. A string value that must specify the ID of an existing + * agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at + * least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a + * single load balancer. + * + * @return the primaryAgentPoolName value. + */ + public String primaryAgentPoolName() { + return this.innerProperties() == null ? null : this.innerProperties().primaryAgentPoolName(); + } + + /** + * Set the primaryAgentPoolName property: Required field. A string value that must specify the ID of an existing + * agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at + * least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a + * single load balancer. + * + * @param primaryAgentPoolName the primaryAgentPoolName value to set. + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withPrimaryAgentPoolName(String primaryAgentPoolName) { + if (this.innerProperties() == null) { + this.innerProperties = new LoadBalancerProperties(); + } + this.innerProperties().withPrimaryAgentPoolName(primaryAgentPoolName); + return this; + } + + /** + * Get the allowServicePlacement property: Whether to automatically place services on the load balancer. If not + * supplied, the default value is true. If set to false manually, both of the external and the internal load + * balancer will not be selected for services unless they explicitly target it. + * + * @return the allowServicePlacement value. + */ + public Boolean allowServicePlacement() { + return this.innerProperties() == null ? null : this.innerProperties().allowServicePlacement(); + } + + /** + * Set the allowServicePlacement property: Whether to automatically place services on the load balancer. If not + * supplied, the default value is true. If set to false manually, both of the external and the internal load + * balancer will not be selected for services unless they explicitly target it. + * + * @param allowServicePlacement the allowServicePlacement value to set. + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withAllowServicePlacement(Boolean allowServicePlacement) { + if (this.innerProperties() == null) { + this.innerProperties = new LoadBalancerProperties(); + } + this.innerProperties().withAllowServicePlacement(allowServicePlacement); + return this; + } + + /** + * Get the serviceLabelSelector property: Only services that must match this selector can be placed on this load + * balancer. + * + * @return the serviceLabelSelector value. + */ + public LabelSelector serviceLabelSelector() { + return this.innerProperties() == null ? null : this.innerProperties().serviceLabelSelector(); + } + + /** + * Set the serviceLabelSelector property: Only services that must match this selector can be placed on this load + * balancer. + * + * @param serviceLabelSelector the serviceLabelSelector value to set. + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withServiceLabelSelector(LabelSelector serviceLabelSelector) { + if (this.innerProperties() == null) { + this.innerProperties = new LoadBalancerProperties(); + } + this.innerProperties().withServiceLabelSelector(serviceLabelSelector); + return this; + } + + /** + * Get the serviceNamespaceSelector property: Services created in namespaces that match the selector can be placed + * on this load balancer. + * + * @return the serviceNamespaceSelector value. + */ + public LabelSelector serviceNamespaceSelector() { + return this.innerProperties() == null ? null : this.innerProperties().serviceNamespaceSelector(); + } + + /** + * Set the serviceNamespaceSelector property: Services created in namespaces that match the selector can be placed + * on this load balancer. + * + * @param serviceNamespaceSelector the serviceNamespaceSelector value to set. + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withServiceNamespaceSelector(LabelSelector serviceNamespaceSelector) { + if (this.innerProperties() == null) { + this.innerProperties = new LoadBalancerProperties(); + } + this.innerProperties().withServiceNamespaceSelector(serviceNamespaceSelector); + return this; + } + + /** + * Get the nodeSelector property: Nodes that match this selector will be possible members of this load balancer. + * + * @return the nodeSelector value. + */ + public LabelSelector nodeSelector() { + return this.innerProperties() == null ? null : this.innerProperties().nodeSelector(); + } + + /** + * Set the nodeSelector property: Nodes that match this selector will be possible members of this load balancer. + * + * @param nodeSelector the nodeSelector value to set. + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withNodeSelector(LabelSelector nodeSelector) { + if (this.innerProperties() == null) { + this.innerProperties = new LoadBalancerProperties(); + } + this.innerProperties().withNodeSelector(nodeSelector); + return this; + } + + /** + * Get the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LoadBalancerInner. + */ + public static LoadBalancerInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerInner deserializedLoadBalancerInner = new LoadBalancerInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedLoadBalancerInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedLoadBalancerInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedLoadBalancerInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedLoadBalancerInner.innerProperties = LoadBalancerProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedLoadBalancerInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerProperties.java new file mode 100644 index 000000000000..e6cd72bd6fc5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerProperties.java @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.LabelSelector; +import java.io.IOException; + +/** + * The LoadBalancerProperties model. + */ +@Fluent +public final class LoadBalancerProperties implements JsonSerializable<LoadBalancerProperties> { + /* + * Required field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool + * will always be added to this load balancer. This agent pool must have at least one node and minCount>=1 for + * autoscaling operations. An agent pool can only be the primary pool for a single load balancer. + */ + private String primaryAgentPoolName; + + /* + * Whether to automatically place services on the load balancer. If not supplied, the default value is true. If set + * to false manually, both of the external and the internal load balancer will not be selected for services unless + * they explicitly target it. + */ + private Boolean allowServicePlacement; + + /* + * Only services that must match this selector can be placed on this load balancer. + */ + private LabelSelector serviceLabelSelector; + + /* + * Services created in namespaces that match the selector can be placed on this load balancer. + */ + private LabelSelector serviceNamespaceSelector; + + /* + * Nodes that match this selector will be possible members of this load balancer. + */ + private LabelSelector nodeSelector; + + /* + * The current provisioning state. + */ + private String provisioningState; + + /** + * Creates an instance of LoadBalancerProperties class. + */ + public LoadBalancerProperties() { + } + + /** + * Get the primaryAgentPoolName property: Required field. A string value that must specify the ID of an existing + * agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at + * least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a + * single load balancer. + * + * @return the primaryAgentPoolName value. + */ + public String primaryAgentPoolName() { + return this.primaryAgentPoolName; + } + + /** + * Set the primaryAgentPoolName property: Required field. A string value that must specify the ID of an existing + * agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at + * least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a + * single load balancer. + * + * @param primaryAgentPoolName the primaryAgentPoolName value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withPrimaryAgentPoolName(String primaryAgentPoolName) { + this.primaryAgentPoolName = primaryAgentPoolName; + return this; + } + + /** + * Get the allowServicePlacement property: Whether to automatically place services on the load balancer. If not + * supplied, the default value is true. If set to false manually, both of the external and the internal load + * balancer will not be selected for services unless they explicitly target it. + * + * @return the allowServicePlacement value. + */ + public Boolean allowServicePlacement() { + return this.allowServicePlacement; + } + + /** + * Set the allowServicePlacement property: Whether to automatically place services on the load balancer. If not + * supplied, the default value is true. If set to false manually, both of the external and the internal load + * balancer will not be selected for services unless they explicitly target it. + * + * @param allowServicePlacement the allowServicePlacement value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withAllowServicePlacement(Boolean allowServicePlacement) { + this.allowServicePlacement = allowServicePlacement; + return this; + } + + /** + * Get the serviceLabelSelector property: Only services that must match this selector can be placed on this load + * balancer. + * + * @return the serviceLabelSelector value. + */ + public LabelSelector serviceLabelSelector() { + return this.serviceLabelSelector; + } + + /** + * Set the serviceLabelSelector property: Only services that must match this selector can be placed on this load + * balancer. + * + * @param serviceLabelSelector the serviceLabelSelector value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withServiceLabelSelector(LabelSelector serviceLabelSelector) { + this.serviceLabelSelector = serviceLabelSelector; + return this; + } + + /** + * Get the serviceNamespaceSelector property: Services created in namespaces that match the selector can be placed + * on this load balancer. + * + * @return the serviceNamespaceSelector value. + */ + public LabelSelector serviceNamespaceSelector() { + return this.serviceNamespaceSelector; + } + + /** + * Set the serviceNamespaceSelector property: Services created in namespaces that match the selector can be placed + * on this load balancer. + * + * @param serviceNamespaceSelector the serviceNamespaceSelector value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withServiceNamespaceSelector(LabelSelector serviceNamespaceSelector) { + this.serviceNamespaceSelector = serviceNamespaceSelector; + return this; + } + + /** + * Get the nodeSelector property: Nodes that match this selector will be possible members of this load balancer. + * + * @return the nodeSelector value. + */ + public LabelSelector nodeSelector() { + return this.nodeSelector; + } + + /** + * Set the nodeSelector property: Nodes that match this selector will be possible members of this load balancer. + * + * @param nodeSelector the nodeSelector value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withNodeSelector(LabelSelector nodeSelector) { + this.nodeSelector = nodeSelector; + return this; + } + + /** + * Get the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (primaryAgentPoolName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property primaryAgentPoolName in model LoadBalancerProperties")); + } + if (serviceLabelSelector() != null) { + serviceLabelSelector().validate(); + } + if (serviceNamespaceSelector() != null) { + serviceNamespaceSelector().validate(); + } + if (nodeSelector() != null) { + nodeSelector().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LoadBalancerProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("primaryAgentPoolName", this.primaryAgentPoolName); + jsonWriter.writeBooleanField("allowServicePlacement", this.allowServicePlacement); + jsonWriter.writeJsonField("serviceLabelSelector", this.serviceLabelSelector); + jsonWriter.writeJsonField("serviceNamespaceSelector", this.serviceNamespaceSelector); + jsonWriter.writeJsonField("nodeSelector", this.nodeSelector); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LoadBalancerProperties. + */ + public static LoadBalancerProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerProperties deserializedLoadBalancerProperties = new LoadBalancerProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("primaryAgentPoolName".equals(fieldName)) { + deserializedLoadBalancerProperties.primaryAgentPoolName = reader.getString(); + } else if ("allowServicePlacement".equals(fieldName)) { + deserializedLoadBalancerProperties.allowServicePlacement + = reader.getNullable(JsonReader::getBoolean); + } else if ("serviceLabelSelector".equals(fieldName)) { + deserializedLoadBalancerProperties.serviceLabelSelector = LabelSelector.fromJson(reader); + } else if ("serviceNamespaceSelector".equals(fieldName)) { + deserializedLoadBalancerProperties.serviceNamespaceSelector = LabelSelector.fromJson(reader); + } else if ("nodeSelector".equals(fieldName)) { + deserializedLoadBalancerProperties.nodeSelector = LabelSelector.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedLoadBalancerProperties.provisioningState = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java index 5bedf80fe172..747f7e188dbf 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java @@ -14,8 +14,8 @@ import java.util.List; /** - * A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl - * get nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet. + * A machine provides detailed information about its configuration and status. A machine may be visible here but not in + * kubectl get nodes; if so, it may be because the machine has not been registered with the Kubernetes API Server yet. */ @Fluent public final class MachineInner extends SubResource { @@ -54,6 +54,17 @@ public List<String> zones() { return this.zones; } + /** + * Set the zones property: The Availability zone in which machine is located. + * + * @param zones the zones value to set. + * @return the MachineInner object itself. + */ + public MachineInner withZones(List<String> zones) { + this.zones = zones; + return this; + } + /** * Get the properties property: The properties of the machine. * @@ -63,6 +74,17 @@ public MachineProperties properties() { return this.properties; } + /** + * Set the properties property: The properties of the machine. + * + * @param properties the properties value to set. + * @return the MachineInner object itself. + */ + public MachineInner withProperties(MachineProperties properties) { + this.properties = properties; + return this; + } + /** * Get the name property: The name of the resource that is unique within a resource group. This name can be used to * access the resource. @@ -109,6 +131,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("id", id()); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java index 93d5bfd7120f..0cf5ed623b74 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java @@ -9,6 +9,8 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.AgentPoolArtifactStreamingProfile; +import com.azure.resourcemanager.containerservice.models.AgentPoolBlueGreenUpgradeSettings; import com.azure.resourcemanager.containerservice.models.AgentPoolGatewayProfile; import com.azure.resourcemanager.containerservice.models.AgentPoolMode; import com.azure.resourcemanager.containerservice.models.AgentPoolNetworkProfile; @@ -24,6 +26,7 @@ import com.azure.resourcemanager.containerservice.models.KubeletDiskType; import com.azure.resourcemanager.containerservice.models.LinuxOSConfig; import com.azure.resourcemanager.containerservice.models.LocalDnsProfile; +import com.azure.resourcemanager.containerservice.models.NodeCustomizationProfile; import com.azure.resourcemanager.containerservice.models.OSDiskType; import com.azure.resourcemanager.containerservice.models.OSSku; import com.azure.resourcemanager.containerservice.models.OSType; @@ -32,6 +35,7 @@ import com.azure.resourcemanager.containerservice.models.ScaleDownMode; import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy; import com.azure.resourcemanager.containerservice.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservice.models.UpgradeStrategy; import com.azure.resourcemanager.containerservice.models.VirtualMachineNodes; import com.azure.resourcemanager.containerservice.models.VirtualMachinesProfile; import com.azure.resourcemanager.containerservice.models.WorkloadRuntime; @@ -130,8 +134,9 @@ public class ManagedClusterAgentPoolProfileProperties private OSType osType; /* - * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 - * when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + * Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or + * Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is + * deprecated. */ private OSSku osSku; @@ -169,20 +174,20 @@ public class ManagedClusterAgentPoolProfileProperties private AgentPoolMode mode; /* - * The version of Kubernetes specified by the user. Both patch version <major.minor.patch> (e.g. 1.20.13) and - * <major.minor> (e.g. 1.20) are supported. When <major.minor> is specified, the latest supported GA patch version - * is chosen automatically. Updating the cluster with the same <major.minor> once it has been created (e.g. 1.14.x - * -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should - * upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same - * major version as the control plane. The node pool minor version must be within two minor versions of the control - * plane version. The node pool version cannot be greater than the control plane version. For more information see - * [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + * The version of Kubernetes specified by the user. Both patch version <major.minor.patch> and <major.minor> are + * supported. When <major.minor> is specified, the latest supported patch version is chosen automatically. Updating + * the agent pool with the same <major.minor> once it has been created will not trigger an upgrade, even if a newer + * patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same + * Kubernetes version. The node pool version must have the same major version as the control plane. The node pool + * minor version must be within two minor versions of the control plane version. The node pool version cannot be + * greater than the control plane version. For more information see [upgrading a node + * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). */ private String orchestratorVersion; /* - * The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version - * <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion is <major.minor>, this field + * The version of Kubernetes running on the Agent Pool. If orchestratorVersion was a fully specified version + * <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion was <major.minor>, this field * will contain the full <major.minor.patch> version being used. */ private String currentOrchestratorVersion; @@ -193,10 +198,20 @@ public class ManagedClusterAgentPoolProfileProperties private String nodeImageVersion; /* - * Settings for upgrading the agentpool + * Defines the upgrade strategy for the agent pool. The default is Rolling. + */ + private UpgradeStrategy upgradeStrategy; + + /* + * Settings for upgrading the agentpool. Applies when upgrade strategy is set to Rolling. */ private AgentPoolUpgradeSettings upgradeSettings; + /* + * Settings for Blue-Green upgrade on the agentpool. Applies when upgrade strategy is set to BlueGreen. + */ + private AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen; + /* * The current deployment or provisioning state. */ @@ -266,6 +281,16 @@ public class ManagedClusterAgentPoolProfileProperties */ private List<String> nodeTaints; + /* + * Taints added on the nodes during creation that will not be reconciled by AKS. These taints will not be reconciled + * by AKS and can be removed with a kubectl call. This field can be modified after node pool is created, but nodes + * will not be recreated with new taints until another operation that requires recreation (e.g. node image upgrade) + * happens. These taints allow for required configuration to run before the node is ready to accept workloads, for + * example 'key1=value1:NoSchedule' that then can be removed with `kubectl taint nodes node1 + * key1=value1:NoSchedule-` + */ + private List<String> nodeInitializationTaints; + /* * The ID for Proximity Placement Group. */ @@ -325,14 +350,14 @@ public class ManagedClusterAgentPoolProfileProperties private String hostGroupId; /* - * Network-related settings of an agent pool. + * The Windows agent pool's specific profile. */ - private AgentPoolNetworkProfile networkProfile; + private AgentPoolWindowsProfile windowsProfile; /* - * The Windows agent pool's specific profile. + * Network-related settings of an agent pool. */ - private AgentPoolWindowsProfile windowsProfile; + private AgentPoolNetworkProfile networkProfile; /* * The security settings of an agent pool. @@ -340,15 +365,14 @@ public class ManagedClusterAgentPoolProfileProperties private AgentPoolSecurityProfile securityProfile; /* - * GPU settings for the Agent Pool. + * The GPU settings of an agent pool. */ private GpuProfile gpuProfile; /* - * Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not - * Gateway. + * Configuration for using artifact streaming on AKS. */ - private AgentPoolGatewayProfile gatewayProfile; + private AgentPoolArtifactStreamingProfile artifactStreamingProfile; /* * Specifications on VirtualMachines agent pool. @@ -360,6 +384,12 @@ public class ManagedClusterAgentPoolProfileProperties */ private List<VirtualMachineNodes> virtualMachineNodesStatus; + /* + * Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not + * Gateway. + */ + private AgentPoolGatewayProfile gatewayProfile; + /* * Contains read-only information about the Agent Pool. */ @@ -371,6 +401,11 @@ public class ManagedClusterAgentPoolProfileProperties */ private LocalDnsProfile localDnsProfile; + /* + * Settings to determine the node customization used to provision nodes in a pool. + */ + private NodeCustomizationProfile nodeCustomizationProfile; + /** * Creates an instance of ManagedClusterAgentPoolProfileProperties class. */ @@ -678,9 +713,9 @@ public ManagedClusterAgentPoolProfileProperties withOsType(OSType osType) { } /** - * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. - * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is - * Windows. + * Get the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after + * Windows2019 is deprecated. * * @return the osSku value. */ @@ -689,9 +724,9 @@ public OSSku osSku() { } /** - * Set the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. - * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is - * Windows. + * Set the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after + * Windows2019 is deprecated. * * @param osSku the osSku value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. @@ -829,13 +864,13 @@ public ManagedClusterAgentPoolProfileProperties withMode(AgentPoolMode mode) { /** * Get the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When - * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the - * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an - * upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an - * AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control - * plane. The node pool minor version must be within two minor versions of the control plane version. The node pool - * version cannot be greater than the control plane version. For more information see [upgrading a node + * <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the + * latest supported patch version is chosen automatically. Updating the agent pool with the same <major.minor> + * once it has been created will not trigger an upgrade, even if a newer patch version is available. As a best + * practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool + * version must have the same major version as the control plane. The node pool minor version must be within two + * minor versions of the control plane version. The node pool version cannot be greater than the control plane + * version. For more information see [upgrading a node * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). * * @return the orchestratorVersion value. @@ -846,13 +881,13 @@ public String orchestratorVersion() { /** * Set the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When - * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the - * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an - * upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an - * AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control - * plane. The node pool minor version must be within two minor versions of the control plane version. The node pool - * version cannot be greater than the control plane version. For more information see [upgrading a node + * <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the + * latest supported patch version is chosen automatically. Updating the agent pool with the same <major.minor> + * once it has been created will not trigger an upgrade, even if a newer patch version is available. As a best + * practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool + * version must have the same major version as the control plane. The node pool minor version must be within two + * minor versions of the control plane version. The node pool version cannot be greater than the control plane + * version. For more information see [upgrading a node * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). * * @param orchestratorVersion the orchestratorVersion value to set. @@ -864,9 +899,9 @@ public ManagedClusterAgentPoolProfileProperties withOrchestratorVersion(String o } /** - * Get the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. If - * orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to - * it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> + * Get the currentOrchestratorVersion property: The version of Kubernetes running on the Agent Pool. If + * orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> * version being used. * * @return the currentOrchestratorVersion value. @@ -876,9 +911,9 @@ public String currentOrchestratorVersion() { } /** - * Set the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. If - * orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to - * it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> + * Set the currentOrchestratorVersion property: The version of Kubernetes running on the Agent Pool. If + * orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> * version being used. * * @param currentOrchestratorVersion the currentOrchestratorVersion value to set. @@ -904,13 +939,34 @@ public String nodeImageVersion() { * @param nodeImageVersion the nodeImageVersion value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. */ - ManagedClusterAgentPoolProfileProperties withNodeImageVersion(String nodeImageVersion) { + public ManagedClusterAgentPoolProfileProperties withNodeImageVersion(String nodeImageVersion) { this.nodeImageVersion = nodeImageVersion; return this; } /** - * Get the upgradeSettings property: Settings for upgrading the agentpool. + * Get the upgradeStrategy property: Defines the upgrade strategy for the agent pool. The default is Rolling. + * + * @return the upgradeStrategy value. + */ + public UpgradeStrategy upgradeStrategy() { + return this.upgradeStrategy; + } + + /** + * Set the upgradeStrategy property: Defines the upgrade strategy for the agent pool. The default is Rolling. + * + * @param upgradeStrategy the upgradeStrategy value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withUpgradeStrategy(UpgradeStrategy upgradeStrategy) { + this.upgradeStrategy = upgradeStrategy; + return this; + } + + /** + * Get the upgradeSettings property: Settings for upgrading the agentpool. Applies when upgrade strategy is set to + * Rolling. * * @return the upgradeSettings value. */ @@ -919,7 +975,8 @@ public AgentPoolUpgradeSettings upgradeSettings() { } /** - * Set the upgradeSettings property: Settings for upgrading the agentpool. + * Set the upgradeSettings property: Settings for upgrading the agentpool. Applies when upgrade strategy is set to + * Rolling. * * @param upgradeSettings the upgradeSettings value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. @@ -929,6 +986,29 @@ public ManagedClusterAgentPoolProfileProperties withUpgradeSettings(AgentPoolUpg return this; } + /** + * Get the upgradeSettingsBlueGreen property: Settings for Blue-Green upgrade on the agentpool. Applies when upgrade + * strategy is set to BlueGreen. + * + * @return the upgradeSettingsBlueGreen value. + */ + public AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen() { + return this.upgradeSettingsBlueGreen; + } + + /** + * Set the upgradeSettingsBlueGreen property: Settings for Blue-Green upgrade on the agentpool. Applies when upgrade + * strategy is set to BlueGreen. + * + * @param upgradeSettingsBlueGreen the upgradeSettingsBlueGreen value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties + withUpgradeSettingsBlueGreen(AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen) { + this.upgradeSettingsBlueGreen = upgradeSettingsBlueGreen; + return this; + } + /** * Get the provisioningState property: The current deployment or provisioning state. * @@ -1186,6 +1266,37 @@ public ManagedClusterAgentPoolProfileProperties withNodeTaints(List<String> node return this; } + /** + * Get the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be + * modified after node pool is created, but nodes will not be recreated with new taints until another operation that + * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run + * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with + * `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @return the nodeInitializationTaints value. + */ + public List<String> nodeInitializationTaints() { + return this.nodeInitializationTaints; + } + + /** + * Set the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be + * modified after node pool is created, but nodes will not be recreated with new taints until another operation that + * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run + * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with + * `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @param nodeInitializationTaints the nodeInitializationTaints value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties + withNodeInitializationTaints(List<String> nodeInitializationTaints) { + this.nodeInitializationTaints = nodeInitializationTaints; + return this; + } + /** * Get the proximityPlacementGroupId property: The ID for Proximity Placement Group. * @@ -1409,42 +1520,42 @@ public ManagedClusterAgentPoolProfileProperties withHostGroupId(String hostGroup } /** - * Get the networkProfile property: Network-related settings of an agent pool. + * Get the windowsProfile property: The Windows agent pool's specific profile. * - * @return the networkProfile value. + * @return the windowsProfile value. */ - public AgentPoolNetworkProfile networkProfile() { - return this.networkProfile; + public AgentPoolWindowsProfile windowsProfile() { + return this.windowsProfile; } /** - * Set the networkProfile property: Network-related settings of an agent pool. + * Set the windowsProfile property: The Windows agent pool's specific profile. * - * @param networkProfile the networkProfile value to set. + * @param windowsProfile the windowsProfile value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. */ - public ManagedClusterAgentPoolProfileProperties withNetworkProfile(AgentPoolNetworkProfile networkProfile) { - this.networkProfile = networkProfile; + public ManagedClusterAgentPoolProfileProperties withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { + this.windowsProfile = windowsProfile; return this; } /** - * Get the windowsProfile property: The Windows agent pool's specific profile. + * Get the networkProfile property: Network-related settings of an agent pool. * - * @return the windowsProfile value. + * @return the networkProfile value. */ - public AgentPoolWindowsProfile windowsProfile() { - return this.windowsProfile; + public AgentPoolNetworkProfile networkProfile() { + return this.networkProfile; } /** - * Set the windowsProfile property: The Windows agent pool's specific profile. + * Set the networkProfile property: Network-related settings of an agent pool. * - * @param windowsProfile the windowsProfile value to set. + * @param networkProfile the networkProfile value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. */ - public ManagedClusterAgentPoolProfileProperties withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { - this.windowsProfile = windowsProfile; + public ManagedClusterAgentPoolProfileProperties withNetworkProfile(AgentPoolNetworkProfile networkProfile) { + this.networkProfile = networkProfile; return this; } @@ -1469,7 +1580,7 @@ public ManagedClusterAgentPoolProfileProperties withSecurityProfile(AgentPoolSec } /** - * Get the gpuProfile property: GPU settings for the Agent Pool. + * Get the gpuProfile property: The GPU settings of an agent pool. * * @return the gpuProfile value. */ @@ -1478,7 +1589,7 @@ public GpuProfile gpuProfile() { } /** - * Set the gpuProfile property: GPU settings for the Agent Pool. + * Set the gpuProfile property: The GPU settings of an agent pool. * * @param gpuProfile the gpuProfile value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. @@ -1489,24 +1600,23 @@ public ManagedClusterAgentPoolProfileProperties withGpuProfile(GpuProfile gpuPro } /** - * Get the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be - * set if agent pool mode is not Gateway. + * Get the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. * - * @return the gatewayProfile value. + * @return the artifactStreamingProfile value. */ - public AgentPoolGatewayProfile gatewayProfile() { - return this.gatewayProfile; + public AgentPoolArtifactStreamingProfile artifactStreamingProfile() { + return this.artifactStreamingProfile; } /** - * Set the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be - * set if agent pool mode is not Gateway. + * Set the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. * - * @param gatewayProfile the gatewayProfile value to set. + * @param artifactStreamingProfile the artifactStreamingProfile value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. */ - public ManagedClusterAgentPoolProfileProperties withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { - this.gatewayProfile = gatewayProfile; + public ManagedClusterAgentPoolProfileProperties + withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile) { + this.artifactStreamingProfile = artifactStreamingProfile; return this; } @@ -1552,6 +1662,28 @@ public List<VirtualMachineNodes> virtualMachineNodesStatus() { return this; } + /** + * Get the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be + * set if agent pool mode is not Gateway. + * + * @return the gatewayProfile value. + */ + public AgentPoolGatewayProfile gatewayProfile() { + return this.gatewayProfile; + } + + /** + * Set the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be + * set if agent pool mode is not Gateway. + * + * @param gatewayProfile the gatewayProfile value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { + this.gatewayProfile = gatewayProfile; + return this; + } + /** * Get the status property: Contains read-only information about the Agent Pool. * @@ -1596,6 +1728,29 @@ public ManagedClusterAgentPoolProfileProperties withLocalDnsProfile(LocalDnsProf return this; } + /** + * Get the nodeCustomizationProfile property: Settings to determine the node customization used to provision nodes + * in a pool. + * + * @return the nodeCustomizationProfile value. + */ + public NodeCustomizationProfile nodeCustomizationProfile() { + return this.nodeCustomizationProfile; + } + + /** + * Set the nodeCustomizationProfile property: Settings to determine the node customization used to provision nodes + * in a pool. + * + * @param nodeCustomizationProfile the nodeCustomizationProfile value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties + withNodeCustomizationProfile(NodeCustomizationProfile nodeCustomizationProfile) { + this.nodeCustomizationProfile = nodeCustomizationProfile; + return this; + } + /** * Validates the instance. * @@ -1605,6 +1760,9 @@ public void validate() { if (upgradeSettings() != null) { upgradeSettings().validate(); } + if (upgradeSettingsBlueGreen() != null) { + upgradeSettingsBlueGreen().validate(); + } if (powerState() != null) { powerState().validate(); } @@ -1617,20 +1775,20 @@ public void validate() { if (creationData() != null) { creationData().validate(); } - if (networkProfile() != null) { - networkProfile().validate(); - } if (windowsProfile() != null) { windowsProfile().validate(); } + if (networkProfile() != null) { + networkProfile().validate(); + } if (securityProfile() != null) { securityProfile().validate(); } if (gpuProfile() != null) { gpuProfile().validate(); } - if (gatewayProfile() != null) { - gatewayProfile().validate(); + if (artifactStreamingProfile() != null) { + artifactStreamingProfile().validate(); } if (virtualMachinesProfile() != null) { virtualMachinesProfile().validate(); @@ -1638,12 +1796,18 @@ public void validate() { if (virtualMachineNodesStatus() != null) { virtualMachineNodesStatus().forEach(e -> e.validate()); } + if (gatewayProfile() != null) { + gatewayProfile().validate(); + } if (status() != null) { status().validate(); } if (localDnsProfile() != null) { localDnsProfile().validate(); } + if (nodeCustomizationProfile() != null) { + nodeCustomizationProfile().validate(); + } } /** @@ -1675,7 +1839,11 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); jsonWriter.writeStringField("orchestratorVersion", this.orchestratorVersion); + jsonWriter.writeStringField("nodeImageVersion", this.nodeImageVersion); + jsonWriter.writeStringField("upgradeStrategy", + this.upgradeStrategy == null ? null : this.upgradeStrategy.toString()); jsonWriter.writeJsonField("upgradeSettings", this.upgradeSettings); + jsonWriter.writeJsonField("upgradeSettingsBlueGreen", this.upgradeSettingsBlueGreen); jsonWriter.writeJsonField("powerState", this.powerState); jsonWriter.writeArrayField("availabilityZones", this.availabilityZones, (writer, element) -> writer.writeString(element)); @@ -1689,6 +1857,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("nodeLabels", this.nodeLabels, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("nodeTaints", this.nodeTaints, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("nodeInitializationTaints", this.nodeInitializationTaints, + (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("proximityPlacementGroupID", this.proximityPlacementGroupId); jsonWriter.writeJsonField("kubeletConfig", this.kubeletConfig); jsonWriter.writeJsonField("linuxOSConfig", this.linuxOSConfig); @@ -1700,16 +1870,18 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("creationData", this.creationData); jsonWriter.writeStringField("capacityReservationGroupID", this.capacityReservationGroupId); jsonWriter.writeStringField("hostGroupID", this.hostGroupId); - jsonWriter.writeJsonField("networkProfile", this.networkProfile); jsonWriter.writeJsonField("windowsProfile", this.windowsProfile); + jsonWriter.writeJsonField("networkProfile", this.networkProfile); jsonWriter.writeJsonField("securityProfile", this.securityProfile); jsonWriter.writeJsonField("gpuProfile", this.gpuProfile); - jsonWriter.writeJsonField("gatewayProfile", this.gatewayProfile); + jsonWriter.writeJsonField("artifactStreamingProfile", this.artifactStreamingProfile); jsonWriter.writeJsonField("virtualMachinesProfile", this.virtualMachinesProfile); jsonWriter.writeArrayField("virtualMachineNodesStatus", this.virtualMachineNodesStatus, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("gatewayProfile", this.gatewayProfile); jsonWriter.writeJsonField("status", this.status); jsonWriter.writeJsonField("localDNSProfile", this.localDnsProfile); + jsonWriter.writeJsonField("nodeCustomizationProfile", this.nodeCustomizationProfile); return jsonWriter.writeEndObject(); } @@ -1788,9 +1960,15 @@ public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonR = reader.getString(); } else if ("nodeImageVersion".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.nodeImageVersion = reader.getString(); + } else if ("upgradeStrategy".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.upgradeStrategy + = UpgradeStrategy.fromString(reader.getString()); } else if ("upgradeSettings".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.upgradeSettings = AgentPoolUpgradeSettings.fromJson(reader); + } else if ("upgradeSettingsBlueGreen".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.upgradeSettingsBlueGreen + = AgentPoolBlueGreenUpgradeSettings.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.provisioningState = reader.getString(); } else if ("powerState".equals(fieldName)) { @@ -1821,6 +1999,10 @@ public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonR } else if ("nodeTaints".equals(fieldName)) { List<String> nodeTaints = reader.readArray(reader1 -> reader1.getString()); deserializedManagedClusterAgentPoolProfileProperties.nodeTaints = nodeTaints; + } else if ("nodeInitializationTaints".equals(fieldName)) { + List<String> nodeInitializationTaints = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterAgentPoolProfileProperties.nodeInitializationTaints + = nodeInitializationTaints; } else if ("proximityPlacementGroupID".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.proximityPlacementGroupId = reader.getString(); } else if ("kubeletConfig".equals(fieldName)) { @@ -1846,20 +2028,20 @@ public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonR = reader.getString(); } else if ("hostGroupID".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.hostGroupId = reader.getString(); - } else if ("networkProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.networkProfile - = AgentPoolNetworkProfile.fromJson(reader); } else if ("windowsProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.windowsProfile = AgentPoolWindowsProfile.fromJson(reader); + } else if ("networkProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.networkProfile + = AgentPoolNetworkProfile.fromJson(reader); } else if ("securityProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.securityProfile = AgentPoolSecurityProfile.fromJson(reader); } else if ("gpuProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.gpuProfile = GpuProfile.fromJson(reader); - } else if ("gatewayProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.gatewayProfile - = AgentPoolGatewayProfile.fromJson(reader); + } else if ("artifactStreamingProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.artifactStreamingProfile + = AgentPoolArtifactStreamingProfile.fromJson(reader); } else if ("virtualMachinesProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.virtualMachinesProfile = VirtualMachinesProfile.fromJson(reader); @@ -1868,11 +2050,17 @@ public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonR = reader.readArray(reader1 -> VirtualMachineNodes.fromJson(reader1)); deserializedManagedClusterAgentPoolProfileProperties.virtualMachineNodesStatus = virtualMachineNodesStatus; + } else if ("gatewayProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.gatewayProfile + = AgentPoolGatewayProfile.fromJson(reader); } else if ("status".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.status = AgentPoolStatus.fromJson(reader); } else if ("localDNSProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.localDnsProfile = LocalDnsProfile.fromJson(reader); + } else if ("nodeCustomizationProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.nodeCustomizationProfile + = NodeCustomizationProfile.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java index 8a1a490a1922..ab8f77b4ba2f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java @@ -13,6 +13,7 @@ import com.azure.resourcemanager.containerservice.models.ClusterUpgradeSettings; import com.azure.resourcemanager.containerservice.models.ContainerServiceLinuxProfile; import com.azure.resourcemanager.containerservice.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservice.models.CreationData; import com.azure.resourcemanager.containerservice.models.ExtendedLocation; import com.azure.resourcemanager.containerservice.models.KubernetesSupportPlan; import com.azure.resourcemanager.containerservice.models.ManagedClusterAIToolchainOperatorProfile; @@ -23,6 +24,7 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterAutoUpgradeProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAzureMonitorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterBootstrapProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterHostedSystemProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterHttpProxyConfig; import com.azure.resourcemanager.containerservice.models.ManagedClusterIdentity; import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfile; @@ -41,6 +43,7 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterWorkloadAutoScalerProfile; import com.azure.resourcemanager.containerservice.models.PowerState; import com.azure.resourcemanager.containerservice.models.PublicNetworkAccess; +import com.azure.resourcemanager.containerservice.models.SchedulerProfile; import com.azure.resourcemanager.containerservice.models.ServiceMeshProfile; import com.azure.resourcemanager.containerservice.models.UserAssignedIdentity; import java.io.IOException; @@ -287,6 +290,31 @@ public PowerState powerState() { return this.innerProperties() == null ? null : this.innerProperties().powerState(); } + /** + * Get the creationData property: CreationData to be used to specify the source Snapshot ID if the cluster will be + * created/upgraded using a snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.innerProperties() == null ? null : this.innerProperties().creationData(); + } + + /** + * Set the creationData property: CreationData to be used to specify the source Snapshot ID if the cluster will be + * created/upgraded using a snapshot. + * + * @param creationData the creationData value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withCreationData(CreationData creationData) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withCreationData(creationData); + return this; + } + /** * Get the maxAgentPools property: The max number of agent pools for the managed cluster. * @@ -297,14 +325,11 @@ public Integer maxAgentPools() { } /** - * Get the kubernetesVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When - * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the - * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an - * upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor - * versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, - * upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not - * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. + * Get the kubernetesVersion property: The version of Kubernetes the Managed Cluster is requested to run. When you + * upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed + * sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x + * are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS + * cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. * * @return the kubernetesVersion value. */ @@ -313,14 +338,11 @@ public String kubernetesVersion() { } /** - * Set the kubernetesVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When - * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the - * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an - * upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor - * versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, - * upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not - * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. + * Set the kubernetesVersion property: The version of Kubernetes the Managed Cluster is requested to run. When you + * upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed + * sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x + * are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS + * cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. * * @param kubernetesVersion the kubernetesVersion value to set. * @return the ManagedClusterInner object itself. @@ -334,10 +356,7 @@ public ManagedClusterInner withKubernetesVersion(String kubernetesVersion) { } /** - * Get the currentKubernetesVersion property: The version of Kubernetes the Managed Cluster is running. If - * kubernetesVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to - * it. If kubernetesVersion was <major.minor>, this field will contain the full <major.minor.patch> - * version being used. + * Get the currentKubernetesVersion property: The version of Kubernetes the Managed Cluster is running. * * @return the currentKubernetesVersion value. */ @@ -617,7 +636,7 @@ public ManagedClusterInner withNodeResourceGroup(String nodeResourceGroup) { } /** - * Get the nodeResourceGroupProfile property: Profile of the node resource group configuration. + * Get the nodeResourceGroupProfile property: The node resource group configuration profile. * * @return the nodeResourceGroupProfile value. */ @@ -626,7 +645,7 @@ public ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile() { } /** - * Set the nodeResourceGroupProfile property: Profile of the node resource group configuration. + * Set the nodeResourceGroupProfile property: The node resource group configuration profile. * * @param nodeResourceGroupProfile the nodeResourceGroupProfile value to set. * @return the ManagedClusterInner object itself. @@ -688,6 +707,35 @@ public ManagedClusterInner withSupportPlan(KubernetesSupportPlan supportPlan) { return this; } + /** + * Get the enableNamespaceResources property: Enable namespace as Azure resource. The default value is false. It can + * be enabled/disabled on creation and updating of the managed cluster. See + * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM + * Resource. + * + * @return the enableNamespaceResources value. + */ + public Boolean enableNamespaceResources() { + return this.innerProperties() == null ? null : this.innerProperties().enableNamespaceResources(); + } + + /** + * Set the enableNamespaceResources property: Enable namespace as Azure resource. The default value is false. It can + * be enabled/disabled on creation and updating of the managed cluster. See + * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM + * Resource. + * + * @param enableNamespaceResources the enableNamespaceResources value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withEnableNamespaceResources(Boolean enableNamespaceResources) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withEnableNamespaceResources(enableNamespaceResources); + return this; + } + /** * Get the networkProfile property: The network configuration profile. * @@ -1076,7 +1124,7 @@ public ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile() { } /** - * Get the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. + * Get the azureMonitorProfile property: Prometheus addon profile for the container service cluster. * * @return the azureMonitorProfile value. */ @@ -1085,7 +1133,7 @@ public ManagedClusterAzureMonitorProfile azureMonitorProfile() { } /** - * Set the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. + * Set the azureMonitorProfile property: Prometheus addon profile for the container service cluster. * * @param azureMonitorProfile the azureMonitorProfile value to set. * @return the ManagedClusterInner object itself. @@ -1154,6 +1202,30 @@ public ManagedClusterInner withMetricsProfile(ManagedClusterMetricsProfile metri return this; } + /** + * Get the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. + * + * @return the aiToolchainOperatorProfile value. + */ + public ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile() { + return this.innerProperties() == null ? null : this.innerProperties().aiToolchainOperatorProfile(); + } + + /** + * Set the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. + * + * @param aiToolchainOperatorProfile the aiToolchainOperatorProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner + withAiToolchainOperatorProfile(ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withAiToolchainOperatorProfile(aiToolchainOperatorProfile); + return this; + } + /** * Get the nodeProvisioningProfile property: Node provisioning settings that apply to the whole cluster. * @@ -1202,26 +1274,50 @@ public ManagedClusterInner withBootstrapProfile(ManagedClusterBootstrapProfile b } /** - * Get the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. + * Get the schedulerProfile property: Profile of the pod scheduler configuration. * - * @return the aiToolchainOperatorProfile value. + * @return the schedulerProfile value. */ - public ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile() { - return this.innerProperties() == null ? null : this.innerProperties().aiToolchainOperatorProfile(); + public SchedulerProfile schedulerProfile() { + return this.innerProperties() == null ? null : this.innerProperties().schedulerProfile(); } /** - * Set the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. + * Set the schedulerProfile property: Profile of the pod scheduler configuration. * - * @param aiToolchainOperatorProfile the aiToolchainOperatorProfile value to set. + * @param schedulerProfile the schedulerProfile value to set. * @return the ManagedClusterInner object itself. */ - public ManagedClusterInner - withAiToolchainOperatorProfile(ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile) { + public ManagedClusterInner withSchedulerProfile(SchedulerProfile schedulerProfile) { if (this.innerProperties() == null) { this.innerProperties = new ManagedClusterProperties(); } - this.innerProperties().withAiToolchainOperatorProfile(aiToolchainOperatorProfile); + this.innerProperties().withSchedulerProfile(schedulerProfile); + return this; + } + + /** + * Get the hostedSystemProfile property: Settings for hosted system addons. For more information, see + * https://aka.ms/aks/automatic/systemcomponents. + * + * @return the hostedSystemProfile value. + */ + public ManagedClusterHostedSystemProfile hostedSystemProfile() { + return this.innerProperties() == null ? null : this.innerProperties().hostedSystemProfile(); + } + + /** + * Set the hostedSystemProfile property: Settings for hosted system addons. For more information, see + * https://aka.ms/aks/automatic/systemcomponents. + * + * @param hostedSystemProfile the hostedSystemProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withHostedSystemProfile(ManagedClusterHostedSystemProfile hostedSystemProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withHostedSystemProfile(hostedSystemProfile); return this; } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java index 2d3a5904c461..cef395af214b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.containerservice.models.ClusterUpgradeSettings; import com.azure.resourcemanager.containerservice.models.ContainerServiceLinuxProfile; import com.azure.resourcemanager.containerservice.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservice.models.CreationData; import com.azure.resourcemanager.containerservice.models.KubernetesSupportPlan; import com.azure.resourcemanager.containerservice.models.ManagedClusterAIToolchainOperatorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; @@ -21,6 +22,7 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterAutoUpgradeProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAzureMonitorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterBootstrapProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterHostedSystemProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterHttpProxyConfig; import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterMetricsProfile; @@ -37,6 +39,7 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterWorkloadAutoScalerProfile; import com.azure.resourcemanager.containerservice.models.PowerState; import com.azure.resourcemanager.containerservice.models.PublicNetworkAccess; +import com.azure.resourcemanager.containerservice.models.SchedulerProfile; import com.azure.resourcemanager.containerservice.models.ServiceMeshProfile; import com.azure.resourcemanager.containerservice.models.UserAssignedIdentity; import java.io.IOException; @@ -58,27 +61,27 @@ public final class ManagedClusterProperties implements JsonSerializable<ManagedC */ private PowerState powerState; + /* + * CreationData to be used to specify the source Snapshot ID if the cluster will be created/upgraded using a + * snapshot. + */ + private CreationData creationData; + /* * The max number of agent pools for the managed cluster. */ private Integer maxAgentPools; /* - * The version of Kubernetes specified by the user. Both patch version <major.minor.patch> (e.g. 1.20.13) and - * <major.minor> (e.g. 1.20) are supported. When <major.minor> is specified, the latest supported GA patch version - * is chosen automatically. Updating the cluster with the same <major.minor> once it has been created (e.g. 1.14.x - * -> 1.14) will not trigger an upgrade, even if a newer patch version is available. When you upgrade a supported - * AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major - * version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> - * 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for - * more details. + * The version of Kubernetes the Managed Cluster is requested to run. When you upgrade a supported AKS cluster, + * Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. + * For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not + * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. */ private String kubernetesVersion; /* - * The version of Kubernetes the Managed Cluster is running. If kubernetesVersion was a fully specified version - * <major.minor.patch>, this field will be exactly equal to it. If kubernetesVersion was <major.minor>, this field - * will contain the full <major.minor.patch> version being used. + * The version of Kubernetes the Managed Cluster is running. */ private String currentKubernetesVersion; @@ -154,7 +157,7 @@ public final class ManagedClusterProperties implements JsonSerializable<ManagedC private String nodeResourceGroup; /* - * Profile of the node resource group configuration. + * The node resource group configuration profile. */ private ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile; @@ -168,6 +171,13 @@ public final class ManagedClusterProperties implements JsonSerializable<ManagedC */ private KubernetesSupportPlan supportPlan; + /* + * Enable namespace as Azure resource. The default value is false. It can be enabled/disabled on creation and + * updating of the managed cluster. See [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) + * for more details on Namespace as a ARM Resource. + */ + private Boolean enableNamespaceResources; + /* * The network configuration profile. */ @@ -255,7 +265,7 @@ public final class ManagedClusterProperties implements JsonSerializable<ManagedC private ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile; /* - * Azure Monitor addon profiles for monitoring the managed cluster. + * Prometheus addon profile for the container service cluster */ private ManagedClusterAzureMonitorProfile azureMonitorProfile; @@ -275,6 +285,11 @@ public final class ManagedClusterProperties implements JsonSerializable<ManagedC */ private ManagedClusterMetricsProfile metricsProfile; + /* + * AI toolchain operator settings that apply to the whole cluster. + */ + private ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile; + /* * Node provisioning settings that apply to the whole cluster. */ @@ -286,9 +301,14 @@ public final class ManagedClusterProperties implements JsonSerializable<ManagedC private ManagedClusterBootstrapProfile bootstrapProfile; /* - * AI toolchain operator settings that apply to the whole cluster. + * Profile of the pod scheduler configuration. */ - private ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile; + private SchedulerProfile schedulerProfile; + + /* + * Settings for hosted system addons. For more information, see https://aka.ms/aks/automatic/systemcomponents. + */ + private ManagedClusterHostedSystemProfile hostedSystemProfile; /* * Contains read-only information about the Managed Cluster. @@ -319,6 +339,28 @@ public PowerState powerState() { return this.powerState; } + /** + * Get the creationData property: CreationData to be used to specify the source Snapshot ID if the cluster will be + * created/upgraded using a snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.creationData; + } + + /** + * Set the creationData property: CreationData to be used to specify the source Snapshot ID if the cluster will be + * created/upgraded using a snapshot. + * + * @param creationData the creationData value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withCreationData(CreationData creationData) { + this.creationData = creationData; + return this; + } + /** * Get the maxAgentPools property: The max number of agent pools for the managed cluster. * @@ -329,14 +371,11 @@ public Integer maxAgentPools() { } /** - * Get the kubernetesVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When - * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the - * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an - * upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor - * versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, - * upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not - * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. + * Get the kubernetesVersion property: The version of Kubernetes the Managed Cluster is requested to run. When you + * upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed + * sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x + * are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS + * cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. * * @return the kubernetesVersion value. */ @@ -345,14 +384,11 @@ public String kubernetesVersion() { } /** - * Set the kubernetesVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When - * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the - * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an - * upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor - * versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, - * upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not - * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. + * Set the kubernetesVersion property: The version of Kubernetes the Managed Cluster is requested to run. When you + * upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed + * sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x + * are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS + * cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. * * @param kubernetesVersion the kubernetesVersion value to set. * @return the ManagedClusterProperties object itself. @@ -363,10 +399,7 @@ public ManagedClusterProperties withKubernetesVersion(String kubernetesVersion) } /** - * Get the currentKubernetesVersion property: The version of Kubernetes the Managed Cluster is running. If - * kubernetesVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to - * it. If kubernetesVersion was <major.minor>, this field will contain the full <major.minor.patch> - * version being used. + * Get the currentKubernetesVersion property: The version of Kubernetes the Managed Cluster is running. * * @return the currentKubernetesVersion value. */ @@ -616,7 +649,7 @@ public ManagedClusterProperties withNodeResourceGroup(String nodeResourceGroup) } /** - * Get the nodeResourceGroupProfile property: Profile of the node resource group configuration. + * Get the nodeResourceGroupProfile property: The node resource group configuration profile. * * @return the nodeResourceGroupProfile value. */ @@ -625,7 +658,7 @@ public ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile() { } /** - * Set the nodeResourceGroupProfile property: Profile of the node resource group configuration. + * Set the nodeResourceGroupProfile property: The node resource group configuration profile. * * @param nodeResourceGroupProfile the nodeResourceGroupProfile value to set. * @return the ManagedClusterProperties object itself. @@ -678,6 +711,32 @@ public ManagedClusterProperties withSupportPlan(KubernetesSupportPlan supportPla return this; } + /** + * Get the enableNamespaceResources property: Enable namespace as Azure resource. The default value is false. It can + * be enabled/disabled on creation and updating of the managed cluster. See + * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM + * Resource. + * + * @return the enableNamespaceResources value. + */ + public Boolean enableNamespaceResources() { + return this.enableNamespaceResources; + } + + /** + * Set the enableNamespaceResources property: Enable namespace as Azure resource. The default value is false. It can + * be enabled/disabled on creation and updating of the managed cluster. See + * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM + * Resource. + * + * @param enableNamespaceResources the enableNamespaceResources value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withEnableNamespaceResources(Boolean enableNamespaceResources) { + this.enableNamespaceResources = enableNamespaceResources; + return this; + } + /** * Get the networkProfile property: The network configuration profile. * @@ -1019,7 +1078,7 @@ public ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile() { } /** - * Get the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. + * Get the azureMonitorProfile property: Prometheus addon profile for the container service cluster. * * @return the azureMonitorProfile value. */ @@ -1028,7 +1087,7 @@ public ManagedClusterAzureMonitorProfile azureMonitorProfile() { } /** - * Set the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. + * Set the azureMonitorProfile property: Prometheus addon profile for the container service cluster. * * @param azureMonitorProfile the azureMonitorProfile value to set. * @return the ManagedClusterProperties object itself. @@ -1088,6 +1147,27 @@ public ManagedClusterProperties withMetricsProfile(ManagedClusterMetricsProfile return this; } + /** + * Get the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. + * + * @return the aiToolchainOperatorProfile value. + */ + public ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile() { + return this.aiToolchainOperatorProfile; + } + + /** + * Set the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. + * + * @param aiToolchainOperatorProfile the aiToolchainOperatorProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties + withAiToolchainOperatorProfile(ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile) { + this.aiToolchainOperatorProfile = aiToolchainOperatorProfile; + return this; + } + /** * Get the nodeProvisioningProfile property: Node provisioning settings that apply to the whole cluster. * @@ -1130,23 +1210,44 @@ public ManagedClusterProperties withBootstrapProfile(ManagedClusterBootstrapProf } /** - * Get the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. + * Get the schedulerProfile property: Profile of the pod scheduler configuration. * - * @return the aiToolchainOperatorProfile value. + * @return the schedulerProfile value. */ - public ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile() { - return this.aiToolchainOperatorProfile; + public SchedulerProfile schedulerProfile() { + return this.schedulerProfile; } /** - * Set the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. + * Set the schedulerProfile property: Profile of the pod scheduler configuration. * - * @param aiToolchainOperatorProfile the aiToolchainOperatorProfile value to set. + * @param schedulerProfile the schedulerProfile value to set. * @return the ManagedClusterProperties object itself. */ - public ManagedClusterProperties - withAiToolchainOperatorProfile(ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile) { - this.aiToolchainOperatorProfile = aiToolchainOperatorProfile; + public ManagedClusterProperties withSchedulerProfile(SchedulerProfile schedulerProfile) { + this.schedulerProfile = schedulerProfile; + return this; + } + + /** + * Get the hostedSystemProfile property: Settings for hosted system addons. For more information, see + * https://aka.ms/aks/automatic/systemcomponents. + * + * @return the hostedSystemProfile value. + */ + public ManagedClusterHostedSystemProfile hostedSystemProfile() { + return this.hostedSystemProfile; + } + + /** + * Set the hostedSystemProfile property: Settings for hosted system addons. For more information, see + * https://aka.ms/aks/automatic/systemcomponents. + * + * @param hostedSystemProfile the hostedSystemProfile value to set. + * @return the ManagedClusterProperties object itself. + */ + public ManagedClusterProperties withHostedSystemProfile(ManagedClusterHostedSystemProfile hostedSystemProfile) { + this.hostedSystemProfile = hostedSystemProfile; return this; } @@ -1179,6 +1280,9 @@ public void validate() { if (powerState() != null) { powerState().validate(); } + if (creationData() != null) { + creationData().validate(); + } if (agentPoolProfiles() != null) { agentPoolProfiles().forEach(e -> e.validate()); } @@ -1259,14 +1363,20 @@ public void validate() { if (metricsProfile() != null) { metricsProfile().validate(); } + if (aiToolchainOperatorProfile() != null) { + aiToolchainOperatorProfile().validate(); + } if (nodeProvisioningProfile() != null) { nodeProvisioningProfile().validate(); } if (bootstrapProfile() != null) { bootstrapProfile().validate(); } - if (aiToolchainOperatorProfile() != null) { - aiToolchainOperatorProfile().validate(); + if (schedulerProfile() != null) { + schedulerProfile().validate(); + } + if (hostedSystemProfile() != null) { + hostedSystemProfile().validate(); } if (status() != null) { status().validate(); @@ -1279,6 +1389,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("creationData", this.creationData); jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); jsonWriter.writeStringField("dnsPrefix", this.dnsPrefix); jsonWriter.writeStringField("fqdnSubdomain", this.fqdnSubdomain); @@ -1294,6 +1405,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("nodeResourceGroupProfile", this.nodeResourceGroupProfile); jsonWriter.writeBooleanField("enableRBAC", this.enableRbac); jsonWriter.writeStringField("supportPlan", this.supportPlan == null ? null : this.supportPlan.toString()); + jsonWriter.writeBooleanField("enableNamespaceResources", this.enableNamespaceResources); jsonWriter.writeJsonField("networkProfile", this.networkProfile); jsonWriter.writeJsonField("aadProfile", this.aadProfile); jsonWriter.writeJsonField("autoUpgradeProfile", this.autoUpgradeProfile); @@ -1316,9 +1428,11 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("azureMonitorProfile", this.azureMonitorProfile); jsonWriter.writeJsonField("serviceMeshProfile", this.serviceMeshProfile); jsonWriter.writeJsonField("metricsProfile", this.metricsProfile); + jsonWriter.writeJsonField("aiToolchainOperatorProfile", this.aiToolchainOperatorProfile); jsonWriter.writeJsonField("nodeProvisioningProfile", this.nodeProvisioningProfile); jsonWriter.writeJsonField("bootstrapProfile", this.bootstrapProfile); - jsonWriter.writeJsonField("aiToolchainOperatorProfile", this.aiToolchainOperatorProfile); + jsonWriter.writeJsonField("schedulerProfile", this.schedulerProfile); + jsonWriter.writeJsonField("hostedSystemProfile", this.hostedSystemProfile); jsonWriter.writeJsonField("status", this.status); return jsonWriter.writeEndObject(); } @@ -1342,6 +1456,8 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO deserializedManagedClusterProperties.provisioningState = reader.getString(); } else if ("powerState".equals(fieldName)) { deserializedManagedClusterProperties.powerState = PowerState.fromJson(reader); + } else if ("creationData".equals(fieldName)) { + deserializedManagedClusterProperties.creationData = CreationData.fromJson(reader); } else if ("maxAgentPools".equals(fieldName)) { deserializedManagedClusterProperties.maxAgentPools = reader.getNullable(JsonReader::getInt); } else if ("kubernetesVersion".equals(fieldName)) { @@ -1389,6 +1505,9 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO } else if ("supportPlan".equals(fieldName)) { deserializedManagedClusterProperties.supportPlan = KubernetesSupportPlan.fromString(reader.getString()); + } else if ("enableNamespaceResources".equals(fieldName)) { + deserializedManagedClusterProperties.enableNamespaceResources + = reader.getNullable(JsonReader::getBoolean); } else if ("networkProfile".equals(fieldName)) { deserializedManagedClusterProperties.networkProfile = ContainerServiceNetworkProfile.fromJson(reader); @@ -1443,15 +1562,20 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO deserializedManagedClusterProperties.resourceUid = reader.getString(); } else if ("metricsProfile".equals(fieldName)) { deserializedManagedClusterProperties.metricsProfile = ManagedClusterMetricsProfile.fromJson(reader); + } else if ("aiToolchainOperatorProfile".equals(fieldName)) { + deserializedManagedClusterProperties.aiToolchainOperatorProfile + = ManagedClusterAIToolchainOperatorProfile.fromJson(reader); } else if ("nodeProvisioningProfile".equals(fieldName)) { deserializedManagedClusterProperties.nodeProvisioningProfile = ManagedClusterNodeProvisioningProfile.fromJson(reader); } else if ("bootstrapProfile".equals(fieldName)) { deserializedManagedClusterProperties.bootstrapProfile = ManagedClusterBootstrapProfile.fromJson(reader); - } else if ("aiToolchainOperatorProfile".equals(fieldName)) { - deserializedManagedClusterProperties.aiToolchainOperatorProfile - = ManagedClusterAIToolchainOperatorProfile.fromJson(reader); + } else if ("schedulerProfile".equals(fieldName)) { + deserializedManagedClusterProperties.schedulerProfile = SchedulerProfile.fromJson(reader); + } else if ("hostedSystemProfile".equals(fieldName)) { + deserializedManagedClusterProperties.hostedSystemProfile + = ManagedClusterHostedSystemProfile.fromJson(reader); } else if ("status".equals(fieldName)) { deserializedManagedClusterProperties.status = ManagedClusterStatus.fromJson(reader); } else { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotInner.java new file mode 100644 index 000000000000..fd06a6dfebc5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotInner.java @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.CreationData; +import com.azure.resourcemanager.containerservice.models.ManagedClusterPropertiesForSnapshot; +import com.azure.resourcemanager.containerservice.models.SnapshotType; +import java.io.IOException; +import java.util.Map; + +/** + * A managed cluster snapshot resource. + */ +@Fluent +public final class ManagedClusterSnapshotInner extends Resource { + /* + * Properties of a managed cluster snapshot. + */ + private ManagedClusterSnapshotProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedClusterSnapshotInner class. + */ + public ManagedClusterSnapshotInner() { + } + + /** + * Get the innerProperties property: Properties of a managed cluster snapshot. + * + * @return the innerProperties value. + */ + private ManagedClusterSnapshotProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterSnapshotInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterSnapshotInner withTags(Map<String, String> tags) { + super.withTags(tags); + return this; + } + + /** + * Get the creationData property: CreationData to be used to specify the source resource ID to create this snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.innerProperties() == null ? null : this.innerProperties().creationData(); + } + + /** + * Set the creationData property: CreationData to be used to specify the source resource ID to create this snapshot. + * + * @param creationData the creationData value to set. + * @return the ManagedClusterSnapshotInner object itself. + */ + public ManagedClusterSnapshotInner withCreationData(CreationData creationData) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterSnapshotProperties(); + } + this.innerProperties().withCreationData(creationData); + return this; + } + + /** + * Get the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @return the snapshotType value. + */ + public SnapshotType snapshotType() { + return this.innerProperties() == null ? null : this.innerProperties().snapshotType(); + } + + /** + * Set the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @param snapshotType the snapshotType value to set. + * @return the ManagedClusterSnapshotInner object itself. + */ + public ManagedClusterSnapshotInner withSnapshotType(SnapshotType snapshotType) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterSnapshotProperties(); + } + this.innerProperties().withSnapshotType(snapshotType); + return this; + } + + /** + * Get the managedClusterPropertiesReadOnly property: What the properties will be showed when getting managed + * cluster snapshot. Those properties are read-only. + * + * @return the managedClusterPropertiesReadOnly value. + */ + public ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly() { + return this.innerProperties() == null ? null : this.innerProperties().managedClusterPropertiesReadOnly(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSnapshotInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSnapshotInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedClusterSnapshotInner. + */ + public static ManagedClusterSnapshotInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSnapshotInner deserializedManagedClusterSnapshotInner = new ManagedClusterSnapshotInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedClusterSnapshotInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.innerProperties + = ManagedClusterSnapshotProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSnapshotInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotProperties.java new file mode 100644 index 000000000000..d977923de150 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotProperties.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.CreationData; +import com.azure.resourcemanager.containerservice.models.ManagedClusterPropertiesForSnapshot; +import com.azure.resourcemanager.containerservice.models.SnapshotType; +import java.io.IOException; + +/** + * Properties for a managed cluster snapshot. + */ +@Fluent +public final class ManagedClusterSnapshotProperties implements JsonSerializable<ManagedClusterSnapshotProperties> { + /* + * CreationData to be used to specify the source resource ID to create this snapshot. + */ + private CreationData creationData; + + /* + * The type of a snapshot. The default is NodePool. + */ + private SnapshotType snapshotType; + + /* + * What the properties will be showed when getting managed cluster snapshot. Those properties are read-only. + */ + private ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly; + + /** + * Creates an instance of ManagedClusterSnapshotProperties class. + */ + public ManagedClusterSnapshotProperties() { + } + + /** + * Get the creationData property: CreationData to be used to specify the source resource ID to create this snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.creationData; + } + + /** + * Set the creationData property: CreationData to be used to specify the source resource ID to create this snapshot. + * + * @param creationData the creationData value to set. + * @return the ManagedClusterSnapshotProperties object itself. + */ + public ManagedClusterSnapshotProperties withCreationData(CreationData creationData) { + this.creationData = creationData; + return this; + } + + /** + * Get the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @return the snapshotType value. + */ + public SnapshotType snapshotType() { + return this.snapshotType; + } + + /** + * Set the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @param snapshotType the snapshotType value to set. + * @return the ManagedClusterSnapshotProperties object itself. + */ + public ManagedClusterSnapshotProperties withSnapshotType(SnapshotType snapshotType) { + this.snapshotType = snapshotType; + return this; + } + + /** + * Get the managedClusterPropertiesReadOnly property: What the properties will be showed when getting managed + * cluster snapshot. Those properties are read-only. + * + * @return the managedClusterPropertiesReadOnly value. + */ + public ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly() { + return this.managedClusterPropertiesReadOnly; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (creationData() != null) { + creationData().validate(); + } + if (managedClusterPropertiesReadOnly() != null) { + managedClusterPropertiesReadOnly().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("creationData", this.creationData); + jsonWriter.writeStringField("snapshotType", this.snapshotType == null ? null : this.snapshotType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSnapshotProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSnapshotProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterSnapshotProperties. + */ + public static ManagedClusterSnapshotProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSnapshotProperties deserializedManagedClusterSnapshotProperties + = new ManagedClusterSnapshotProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("creationData".equals(fieldName)) { + deserializedManagedClusterSnapshotProperties.creationData = CreationData.fromJson(reader); + } else if ("snapshotType".equals(fieldName)) { + deserializedManagedClusterSnapshotProperties.snapshotType + = SnapshotType.fromString(reader.getString()); + } else if ("managedClusterPropertiesReadOnly".equals(fieldName)) { + deserializedManagedClusterSnapshotProperties.managedClusterPropertiesReadOnly + = ManagedClusterPropertiesForSnapshot.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSnapshotProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshMembershipInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshMembershipInner.java new file mode 100644 index 000000000000..051c41567de4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshMembershipInner.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.MeshMembershipProperties; +import java.io.IOException; + +/** + * Mesh membership of a managed cluster. + */ +@Fluent +public final class MeshMembershipInner extends ProxyResource { + /* + * The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed + * by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is + * removed from the template since it is managed by another resource. + */ + private String managedBy; + + /* + * Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is + * updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable + * optimistic concurrency per the normal eTag convention. + */ + private String etag; + + /* + * Mesh membership properties of a managed cluster. + */ + private MeshMembershipProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of MeshMembershipInner class. + */ + public MeshMembershipInner() { + } + + /** + * Get the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates + * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not + * delete the resource if it is removed from the template since it is managed by another resource. + * + * @return the managedBy value. + */ + public String managedBy() { + return this.managedBy; + } + + /** + * Set the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates + * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not + * delete the resource if it is removed from the template since it is managed by another resource. + * + * @param managedBy the managedBy value to set. + * @return the MeshMembershipInner object itself. + */ + public MeshMembershipInner withManagedBy(String managedBy) { + this.managedBy = managedBy; + return this; + } + + /** + * Get the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will + * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a + * subsequent request to enable optimistic concurrency per the normal eTag convention. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Get the properties property: Mesh membership properties of a managed cluster. + * + * @return the properties value. + */ + public MeshMembershipProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Mesh membership properties of a managed cluster. + * + * @param properties the properties value to set. + * @return the MeshMembershipInner object itself. + */ + public MeshMembershipInner withProperties(MeshMembershipProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("managedBy", this.managedBy); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshMembershipInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshMembershipInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MeshMembershipInner. + */ + public static MeshMembershipInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshMembershipInner deserializedMeshMembershipInner = new MeshMembershipInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMeshMembershipInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMeshMembershipInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMeshMembershipInner.type = reader.getString(); + } else if ("managedBy".equals(fieldName)) { + deserializedMeshMembershipInner.managedBy = reader.getString(); + } else if ("eTag".equals(fieldName)) { + deserializedMeshMembershipInner.etag = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedMeshMembershipInner.properties = MeshMembershipProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedMeshMembershipInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMeshMembershipInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/NodeImageVersionInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/NodeImageVersionInner.java new file mode 100644 index 000000000000..2b958e625f33 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/NodeImageVersionInner.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * node image version profile for given major.minor.patch release. + */ +@Fluent +public final class NodeImageVersionInner implements JsonSerializable<NodeImageVersionInner> { + /* + * The operating system of the node image. Example: AKSUbuntu + */ + private String os; + + /* + * The SKU or flavor of the node image. Example: 2004gen2containerd + */ + private String sku; + + /* + * major.minor.patch version of the node image version release. Example: 2024.02.02 + */ + private String version; + + /* + * The OS + SKU + version of the node image. Example: AKSUbuntu-1804gen2containerd-2024.02.02 + */ + private String fullName; + + /** + * Creates an instance of NodeImageVersionInner class. + */ + public NodeImageVersionInner() { + } + + /** + * Get the os property: The operating system of the node image. Example: AKSUbuntu. + * + * @return the os value. + */ + public String os() { + return this.os; + } + + /** + * Set the os property: The operating system of the node image. Example: AKSUbuntu. + * + * @param os the os value to set. + * @return the NodeImageVersionInner object itself. + */ + public NodeImageVersionInner withOs(String os) { + this.os = os; + return this; + } + + /** + * Get the sku property: The SKU or flavor of the node image. Example: 2004gen2containerd. + * + * @return the sku value. + */ + public String sku() { + return this.sku; + } + + /** + * Set the sku property: The SKU or flavor of the node image. Example: 2004gen2containerd. + * + * @param sku the sku value to set. + * @return the NodeImageVersionInner object itself. + */ + public NodeImageVersionInner withSku(String sku) { + this.sku = sku; + return this; + } + + /** + * Get the version property: major.minor.patch version of the node image version release. Example: 2024.02.02. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: major.minor.patch version of the node image version release. Example: 2024.02.02. + * + * @param version the version value to set. + * @return the NodeImageVersionInner object itself. + */ + public NodeImageVersionInner withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the fullName property: The OS + SKU + version of the node image. Example: + * AKSUbuntu-1804gen2containerd-2024.02.02. + * + * @return the fullName value. + */ + public String fullName() { + return this.fullName; + } + + /** + * Set the fullName property: The OS + SKU + version of the node image. Example: + * AKSUbuntu-1804gen2containerd-2024.02.02. + * + * @param fullName the fullName value to set. + * @return the NodeImageVersionInner object itself. + */ + public NodeImageVersionInner withFullName(String fullName) { + this.fullName = fullName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("os", this.os); + jsonWriter.writeStringField("sku", this.sku); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeStringField("fullName", this.fullName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NodeImageVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NodeImageVersionInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the NodeImageVersionInner. + */ + public static NodeImageVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NodeImageVersionInner deserializedNodeImageVersionInner = new NodeImageVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("os".equals(fieldName)) { + deserializedNodeImageVersionInner.os = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedNodeImageVersionInner.sku = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedNodeImageVersionInner.version = reader.getString(); + } else if ("fullName".equals(fieldName)) { + deserializedNodeImageVersionInner.fullName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNodeImageVersionInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationStatusResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationStatusResultInner.java new file mode 100644 index 000000000000..60efc41645de --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationStatusResultInner.java @@ -0,0 +1,329 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The current status of an async operation. + */ +@Fluent +public final class OperationStatusResultInner implements JsonSerializable<OperationStatusResultInner> { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Float percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List<OperationStatusResultInner> operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /** + * Creates an instance of OperationStatusResultInner class. + */ + public OperationStatusResultInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Fully qualified ID for the async operation. + * + * @param id the id value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the async operation. + * + * @param name the name value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: Operation status. + * + * @param status the status value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Float percentComplete() { + return this.percentComplete; + } + + /** + * Set the percentComplete property: Percent of the operation that is complete. + * + * @param percentComplete the percentComplete value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withPercentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + return this; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time of the operation. + * + * @param startTime the startTime value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: The end time of the operation. + * + * @param endTime the endTime value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List<OperationStatusResultInner> operations() { + return this.operations; + } + + /** + * Set the operations property: The operations list. + * + * @param operations the operations value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withOperations(List<OperationStatusResultInner> operations) { + this.operations = operations; + return this; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Set the error property: If present, details of the operation error. + * + * @param error the error value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withError(ManagementError error) { + this.error = error; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (status() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property status in model OperationStatusResultInner")); + } + if (operations() != null) { + operations().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OperationStatusResultInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationStatusResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationStatusResultInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OperationStatusResultInner. + */ + public static OperationStatusResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationStatusResultInner deserializedOperationStatusResultInner = new OperationStatusResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedOperationStatusResultInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedOperationStatusResultInner.id = reader.getString(); + } else if ("resourceId".equals(fieldName)) { + deserializedOperationStatusResultInner.resourceId = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedOperationStatusResultInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedOperationStatusResultInner.percentComplete = reader.getNullable(JsonReader::getFloat); + } else if ("startTime".equals(fieldName)) { + deserializedOperationStatusResultInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedOperationStatusResultInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List<OperationStatusResultInner> operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedOperationStatusResultInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedOperationStatusResultInner.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationStatusResultInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SafeguardsAvailableVersionInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SafeguardsAvailableVersionInner.java new file mode 100644 index 000000000000..a2de612e5b19 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SafeguardsAvailableVersionInner.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.SafeguardsAvailableVersionsProperties; +import java.io.IOException; + +/** + * Available Safeguards Version. + */ +@Fluent +public final class SafeguardsAvailableVersionInner extends ProxyResource { + /* + * Whether the version is default or not and support info. + */ + private SafeguardsAvailableVersionsProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SafeguardsAvailableVersionInner class. + */ + public SafeguardsAvailableVersionInner() { + } + + /** + * Get the properties property: Whether the version is default or not and support info. + * + * @return the properties value. + */ + public SafeguardsAvailableVersionsProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Whether the version is default or not and support info. + * + * @param properties the properties value to set. + * @return the SafeguardsAvailableVersionInner object itself. + */ + public SafeguardsAvailableVersionInner withProperties(SafeguardsAvailableVersionsProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property properties in model SafeguardsAvailableVersionInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SafeguardsAvailableVersionInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SafeguardsAvailableVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SafeguardsAvailableVersionInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SafeguardsAvailableVersionInner. + */ + public static SafeguardsAvailableVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SafeguardsAvailableVersionInner deserializedSafeguardsAvailableVersionInner + = new SafeguardsAvailableVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSafeguardsAvailableVersionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSafeguardsAvailableVersionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSafeguardsAvailableVersionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSafeguardsAvailableVersionInner.properties + = SafeguardsAvailableVersionsProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSafeguardsAvailableVersionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSafeguardsAvailableVersionInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java index 70b300a40509..da39cf8be25d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java @@ -195,9 +195,9 @@ public OSType osType() { } /** - * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. - * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is - * Windows. + * Get the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after + * Windows2019 is deprecated. * * @return the osSku value. */ diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java index dc9593d1697f..ebeef6c8b15a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java @@ -46,8 +46,9 @@ public final class SnapshotProperties implements JsonSerializable<SnapshotProper private OSType osType; /* - * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 - * when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + * Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or + * Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is + * deprecated. */ private OSSku osSku; @@ -137,9 +138,9 @@ public OSType osType() { } /** - * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. - * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is - * Windows. + * Get the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after + * Windows2019 is deprecated. * * @return the osSku value. */ diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java index 986c479af4eb..f05fb442e38a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java @@ -132,6 +132,15 @@ Mono<Response<AgentPoolUpgradeProfileInner>> getUpgradeProfile(@HostParam("$host @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/completeUpgrade") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> completeUpgrade(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines") @ExpectedResponses({ 202 }) @@ -175,7 +184,7 @@ Mono<Response<AgentPoolListResult>> listNext(@PathParam(value = "nextLink", enco * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. + * take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -206,7 +215,7 @@ public Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(St if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.abortLatestOperation(this.client.getEndpoint(), apiVersion, @@ -219,7 +228,7 @@ public Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(St * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. + * take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -251,7 +260,7 @@ private Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(S if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.abortLatestOperation(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -263,7 +272,7 @@ private Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(S * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. + * take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -287,7 +296,7 @@ public PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. + * take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -313,7 +322,7 @@ private PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. + * take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -334,7 +343,7 @@ public SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resou * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. + * take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -357,7 +366,7 @@ public SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resou * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. + * take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -378,7 +387,7 @@ public Mono<Void> abortLatestOperationAsync(String resourceGroupName, String res * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. + * take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -401,7 +410,7 @@ private Mono<Void> abortLatestOperationAsync(String resourceGroupName, String re * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. + * take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -420,7 +429,7 @@ public void abortLatestOperation(String resourceGroupName, String resourceName, * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, a 409 error code is returned. + * take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -464,7 +473,7 @@ private Mono<PagedResponse<AgentPoolInner>> listSinglePageAsync(String resourceG if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -504,7 +513,7 @@ private Mono<PagedResponse<AgentPoolInner>> listSinglePageAsync(String resourceG if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -611,7 +620,7 @@ public Mono<Response<AgentPoolInner>> getWithResponseAsync(String resourceGroupN if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -653,7 +662,7 @@ private Mono<Response<AgentPoolInner>> getWithResponseAsync(String resourceGroup if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -751,7 +760,7 @@ public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -802,7 +811,7 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1070,7 +1079,7 @@ public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceG if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, @@ -1115,7 +1124,7 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -1371,7 +1380,7 @@ public Mono<Response<AgentPoolUpgradeProfileInner>> getUpgradeProfileWithRespons if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getUpgradeProfile(this.client.getEndpoint(), apiVersion, @@ -1413,7 +1422,7 @@ private Mono<Response<AgentPoolUpgradeProfileInner>> getUpgradeProfileWithRespon if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getUpgradeProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1473,6 +1482,250 @@ public AgentPoolUpgradeProfileInner getUpgradeProfile(String resourceGroupName, return getUpgradeProfileWithResponse(resourceGroupName, resourceName, agentPoolName, Context.NONE).getValue(); } + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<Flux<ByteBuffer>>> completeUpgradeWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.completeUpgrade(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> completeUpgradeWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.completeUpgrade(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, agentPoolName, accept, context); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux<PollResult<Void>, Void> beginCompleteUpgradeAsync(String resourceGroupName, String resourceName, + String agentPoolName) { + Mono<Response<Flux<ByteBuffer>>> mono + = completeUpgradeWithResponseAsync(resourceGroupName, resourceName, agentPoolName); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<Void>, Void> beginCompleteUpgradeAsync(String resourceGroupName, String resourceName, + String agentPoolName, Context context) { + context = this.client.mergeContext(context); + Mono<Response<Flux<ByteBuffer>>> mono + = completeUpgradeWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginCompleteUpgrade(String resourceGroupName, String resourceName, + String agentPoolName) { + return this.beginCompleteUpgradeAsync(resourceGroupName, resourceName, agentPoolName).getSyncPoller(); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginCompleteUpgrade(String resourceGroupName, String resourceName, + String agentPoolName, Context context) { + return this.beginCompleteUpgradeAsync(resourceGroupName, resourceName, agentPoolName, context).getSyncPoller(); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Void> completeUpgradeAsync(String resourceGroupName, String resourceName, String agentPoolName) { + return beginCompleteUpgradeAsync(resourceGroupName, resourceName, agentPoolName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Void> completeUpgradeAsync(String resourceGroupName, String resourceName, String agentPoolName, + Context context) { + return beginCompleteUpgradeAsync(resourceGroupName, resourceName, agentPoolName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void completeUpgrade(String resourceGroupName, String resourceName, String agentPoolName) { + completeUpgradeAsync(resourceGroupName, resourceName, agentPoolName).block(); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void completeUpgrade(String resourceGroupName, String resourceName, String agentPoolName, Context context) { + completeUpgradeAsync(resourceGroupName, resourceName, agentPoolName, context).block(); + } + /** * Deletes specific machines in an agent pool. * @@ -1511,7 +1764,7 @@ public Mono<Response<Flux<ByteBuffer>>> deleteMachinesWithResponseAsync(String r } else { machines.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.deleteMachines(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, machines, accept, context)) @@ -1557,7 +1810,7 @@ private Mono<Response<Flux<ByteBuffer>>> deleteMachinesWithResponseAsync(String } else { machines.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.deleteMachines(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1752,7 +2005,7 @@ public void deleteMachines(String resourceGroupName, String resourceName, String if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getAvailableAgentPoolVersions(this.client.getEndpoint(), apiVersion, @@ -1793,7 +2046,7 @@ public void deleteMachines(String resourceGroupName, String resourceName, String if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getAvailableAgentPoolVersions(this.client.getEndpoint(), apiVersion, @@ -1895,7 +2148,7 @@ public Mono<Response<Flux<ByteBuffer>>> upgradeNodeImageVersionWithResponseAsync if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.upgradeNodeImageVersion(this.client.getEndpoint(), apiVersion, @@ -1940,7 +2193,7 @@ private Mono<Response<Flux<ByteBuffer>>> upgradeNodeImageVersionWithResponseAsyn if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.upgradeNodeImageVersion(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java index 11eb021db617..98cc29cbc0e8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java @@ -10,12 +10,19 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.resourcemanager.containerservice.fluent.AgentPoolsClient; import com.azure.resourcemanager.containerservice.fluent.ContainerServiceManagementClient; +import com.azure.resourcemanager.containerservice.fluent.ContainerServiceOperationsClient; import com.azure.resourcemanager.containerservice.fluent.ContainerServicesClient; +import com.azure.resourcemanager.containerservice.fluent.IdentityBindingsClient; +import com.azure.resourcemanager.containerservice.fluent.JwtAuthenticatorsClient; +import com.azure.resourcemanager.containerservice.fluent.LoadBalancersClient; import com.azure.resourcemanager.containerservice.fluent.MachinesClient; import com.azure.resourcemanager.containerservice.fluent.MaintenanceConfigurationsClient; +import com.azure.resourcemanager.containerservice.fluent.ManagedClusterSnapshotsClient; import com.azure.resourcemanager.containerservice.fluent.ManagedClustersClient; import com.azure.resourcemanager.containerservice.fluent.ManagedNamespacesClient; +import com.azure.resourcemanager.containerservice.fluent.MeshMembershipsClient; import com.azure.resourcemanager.containerservice.fluent.OpenShiftManagedClustersClient; +import com.azure.resourcemanager.containerservice.fluent.OperationStatusResultsClient; import com.azure.resourcemanager.containerservice.fluent.OperationsClient; import com.azure.resourcemanager.containerservice.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.containerservice.fluent.PrivateLinkResourcesClient; @@ -160,6 +167,20 @@ public ManagedClustersClient getManagedClusters() { return this.managedClusters; } + /** + * The ContainerServiceOperationsClient object to access its operations. + */ + private final ContainerServiceOperationsClient containerServiceOperations; + + /** + * Gets the ContainerServiceOperationsClient object to access its operations. + * + * @return the ContainerServiceOperationsClient object. + */ + public ContainerServiceOperationsClient getContainerServiceOperations() { + return this.containerServiceOperations; + } + /** * The MaintenanceConfigurationsClient object to access its operations. */ @@ -202,6 +223,20 @@ public AgentPoolsClient getAgentPools() { return this.agentPools; } + /** + * The MachinesClient object to access its operations. + */ + private final MachinesClient machines; + + /** + * Gets the MachinesClient object to access its operations. + * + * @return the MachinesClient object. + */ + public MachinesClient getMachines() { + return this.machines; + } + /** * The PrivateEndpointConnectionsClient object to access its operations. */ @@ -244,6 +279,20 @@ public ResolvePrivateLinkServiceIdsClient getResolvePrivateLinkServiceIds() { return this.resolvePrivateLinkServiceIds; } + /** + * The OperationStatusResultsClient object to access its operations. + */ + private final OperationStatusResultsClient operationStatusResults; + + /** + * Gets the OperationStatusResultsClient object to access its operations. + * + * @return the OperationStatusResultsClient object. + */ + public OperationStatusResultsClient getOperationStatusResults() { + return this.operationStatusResults; + } + /** * The SnapshotsClient object to access its operations. */ @@ -259,17 +308,17 @@ public SnapshotsClient getSnapshots() { } /** - * The TrustedAccessRoleBindingsClient object to access its operations. + * The ManagedClusterSnapshotsClient object to access its operations. */ - private final TrustedAccessRoleBindingsClient trustedAccessRoleBindings; + private final ManagedClusterSnapshotsClient managedClusterSnapshots; /** - * Gets the TrustedAccessRoleBindingsClient object to access its operations. + * Gets the ManagedClusterSnapshotsClient object to access its operations. * - * @return the TrustedAccessRoleBindingsClient object. + * @return the ManagedClusterSnapshotsClient object. */ - public TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings() { - return this.trustedAccessRoleBindings; + public ManagedClusterSnapshotsClient getManagedClusterSnapshots() { + return this.managedClusterSnapshots; } /** @@ -287,17 +336,73 @@ public TrustedAccessRolesClient getTrustedAccessRoles() { } /** - * The MachinesClient object to access its operations. + * The TrustedAccessRoleBindingsClient object to access its operations. */ - private final MachinesClient machines; + private final TrustedAccessRoleBindingsClient trustedAccessRoleBindings; /** - * Gets the MachinesClient object to access its operations. + * Gets the TrustedAccessRoleBindingsClient object to access its operations. * - * @return the MachinesClient object. + * @return the TrustedAccessRoleBindingsClient object. */ - public MachinesClient getMachines() { - return this.machines; + public TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings() { + return this.trustedAccessRoleBindings; + } + + /** + * The LoadBalancersClient object to access its operations. + */ + private final LoadBalancersClient loadBalancers; + + /** + * Gets the LoadBalancersClient object to access its operations. + * + * @return the LoadBalancersClient object. + */ + public LoadBalancersClient getLoadBalancers() { + return this.loadBalancers; + } + + /** + * The IdentityBindingsClient object to access its operations. + */ + private final IdentityBindingsClient identityBindings; + + /** + * Gets the IdentityBindingsClient object to access its operations. + * + * @return the IdentityBindingsClient object. + */ + public IdentityBindingsClient getIdentityBindings() { + return this.identityBindings; + } + + /** + * The JwtAuthenticatorsClient object to access its operations. + */ + private final JwtAuthenticatorsClient jwtAuthenticators; + + /** + * Gets the JwtAuthenticatorsClient object to access its operations. + * + * @return the JwtAuthenticatorsClient object. + */ + public JwtAuthenticatorsClient getJwtAuthenticators() { + return this.jwtAuthenticators; + } + + /** + * The MeshMembershipsClient object to access its operations. + */ + private final MeshMembershipsClient meshMemberships; + + /** + * Gets the MeshMembershipsClient object to access its operations. + * + * @return the MeshMembershipsClient object. + */ + public MeshMembershipsClient getMeshMemberships() { + return this.meshMemberships; } /** @@ -323,15 +428,22 @@ public MachinesClient getMachines() { this.containerServices = new ContainerServicesClientImpl(this); this.operations = new OperationsClientImpl(this); this.managedClusters = new ManagedClustersClientImpl(this); + this.containerServiceOperations = new ContainerServiceOperationsClientImpl(this); this.maintenanceConfigurations = new MaintenanceConfigurationsClientImpl(this); this.managedNamespaces = new ManagedNamespacesClientImpl(this); this.agentPools = new AgentPoolsClientImpl(this); + this.machines = new MachinesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.resolvePrivateLinkServiceIds = new ResolvePrivateLinkServiceIdsClientImpl(this); + this.operationStatusResults = new OperationStatusResultsClientImpl(this); this.snapshots = new SnapshotsClientImpl(this); - this.trustedAccessRoleBindings = new TrustedAccessRoleBindingsClientImpl(this); + this.managedClusterSnapshots = new ManagedClusterSnapshotsClientImpl(this); this.trustedAccessRoles = new TrustedAccessRolesClientImpl(this); - this.machines = new MachinesClientImpl(this); + this.trustedAccessRoleBindings = new TrustedAccessRoleBindingsClientImpl(this); + this.loadBalancers = new LoadBalancersClientImpl(this); + this.identityBindings = new IdentityBindingsClientImpl(this); + this.jwtAuthenticators = new JwtAuthenticatorsClientImpl(this); + this.meshMemberships = new MeshMembershipsClientImpl(this); } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceOperationsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceOperationsClientImpl.java new file mode 100644 index 000000000000..5cac22ca505e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceOperationsClientImpl.java @@ -0,0 +1,293 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservice.fluent.ContainerServiceOperationsClient; +import com.azure.resourcemanager.containerservice.fluent.models.NodeImageVersionInner; +import com.azure.resourcemanager.containerservice.models.NodeImageVersionsListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ContainerServiceOperationsClient. + */ +public final class ContainerServiceOperationsClientImpl implements ContainerServiceOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ContainerServiceOperationsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of ContainerServiceOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContainerServiceOperationsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(ContainerServiceOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientContainerServiceOperations to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientContainerServiceOperations") + public interface ContainerServiceOperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/nodeImageVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<NodeImageVersionsListResult>> listNodeImageVersions(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<NodeImageVersionsListResult>> listNodeImageVersionsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array NodeImageVersions along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<NodeImageVersionInner>> listNodeImageVersionsSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNodeImageVersions(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), location, accept, context)) + .<PagedResponse<NodeImageVersionInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array NodeImageVersions along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<NodeImageVersionInner>> listNodeImageVersionsSinglePageAsync(String location, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNodeImageVersions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array NodeImageVersions as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux<NodeImageVersionInner> listNodeImageVersionsAsync(String location) { + return new PagedFlux<>(() -> listNodeImageVersionsSinglePageAsync(location), + nextLink -> listNodeImageVersionsNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array NodeImageVersions as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<NodeImageVersionInner> listNodeImageVersionsAsync(String location, Context context) { + return new PagedFlux<>(() -> listNodeImageVersionsSinglePageAsync(location, context), + nextLink -> listNodeImageVersionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array NodeImageVersions as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<NodeImageVersionInner> listNodeImageVersions(String location) { + return new PagedIterable<>(listNodeImageVersionsAsync(location)); + } + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array NodeImageVersions as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<NodeImageVersionInner> listNodeImageVersions(String location, Context context) { + return new PagedIterable<>(listNodeImageVersionsAsync(location, context)); + } + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array NodeImageVersions along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<NodeImageVersionInner>> listNodeImageVersionsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listNodeImageVersionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<NodeImageVersionInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array NodeImageVersions along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<NodeImageVersionInner>> listNodeImageVersionsNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNodeImageVersionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/IdentityBindingsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/IdentityBindingsClientImpl.java new file mode 100644 index 000000000000..e51259e5ab81 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/IdentityBindingsClientImpl.java @@ -0,0 +1,947 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.IdentityBindingsClient; +import com.azure.resourcemanager.containerservice.fluent.models.IdentityBindingInner; +import com.azure.resourcemanager.containerservice.models.IdentityBindingListResult; +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 IdentityBindingsClient. + */ +public final class IdentityBindingsClientImpl implements IdentityBindingsClient { + /** + * The proxy service used to perform REST calls. + */ + private final IdentityBindingsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of IdentityBindingsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + IdentityBindingsClientImpl(ContainerServiceManagementClientImpl client) { + this.service + = RestProxy.create(IdentityBindingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientIdentityBindings to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientIdentityBindings") + public interface IdentityBindingsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<IdentityBindingListResult>> listByManagedCluster(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<IdentityBindingInner>> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("identityBindingName") String identityBindingName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("identityBindingName") String identityBindingName, + @BodyParam("application/json") IdentityBindingInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("identityBindingName") String identityBindingName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<IdentityBindingListResult>> listByManagedClusterNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<IdentityBindingInner>> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .<PagedResponse<IdentityBindingInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<IdentityBindingInner>> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux<IdentityBindingInner> listByManagedClusterAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<IdentityBindingInner> listByManagedClusterAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<IdentityBindingInner> listByManagedCluster(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<IdentityBindingInner> listByManagedCluster(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<IdentityBindingInner>> getWithResponseAsync(String resourceGroupName, String resourceName, + String identityBindingName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (identityBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, identityBindingName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<IdentityBindingInner>> getWithResponseAsync(String resourceGroupName, String resourceName, + String identityBindingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (identityBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + resourceName, identityBindingName, accept, context); + } + + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<IdentityBindingInner> getAsync(String resourceGroupName, String resourceName, + String identityBindingName) { + return getWithResponseAsync(resourceGroupName, resourceName, identityBindingName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<IdentityBindingInner> getWithResponse(String resourceGroupName, String resourceName, + String identityBindingName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, identityBindingName, context).block(); + } + + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IdentityBindingInner get(String resourceGroupName, String resourceName, String identityBindingName) { + return getWithResponse(resourceGroupName, resourceName, identityBindingName, Context.NONE).getValue(); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String identityBindingName, IdentityBindingInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (identityBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, identityBindingName, parameters, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String identityBindingName, IdentityBindingInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (identityBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, identityBindingName, parameters, accept, context); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux<PollResult<IdentityBindingInner>, IdentityBindingInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String identityBindingName, IdentityBindingInner parameters) { + Mono<Response<Flux<ByteBuffer>>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, identityBindingName, parameters); + return this.client.<IdentityBindingInner, IdentityBindingInner>getLroResult(mono, this.client.getHttpPipeline(), + IdentityBindingInner.class, IdentityBindingInner.class, this.client.getContext()); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<IdentityBindingInner>, IdentityBindingInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String identityBindingName, IdentityBindingInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono<Response<Flux<ByteBuffer>>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + identityBindingName, parameters, context); + return this.client.<IdentityBindingInner, IdentityBindingInner>getLroResult(mono, this.client.getHttpPipeline(), + IdentityBindingInner.class, IdentityBindingInner.class, context); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<IdentityBindingInner>, IdentityBindingInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String identityBindingName, IdentityBindingInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<IdentityBindingInner>, IdentityBindingInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String identityBindingName, IdentityBindingInner parameters, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<IdentityBindingInner> createOrUpdateAsync(String resourceGroupName, String resourceName, + String identityBindingName, IdentityBindingInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<IdentityBindingInner> createOrUpdateAsync(String resourceGroupName, String resourceName, + String identityBindingName, IdentityBindingInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IdentityBindingInner createOrUpdate(String resourceGroupName, String resourceName, + String identityBindingName, IdentityBindingInner parameters) { + return createOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters).block(); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IdentityBindingInner createOrUpdate(String resourceGroupName, String resourceName, + String identityBindingName, IdentityBindingInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters, context).block(); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String identityBindingName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (identityBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, identityBindingName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String identityBindingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (identityBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + resourceName, identityBindingName, accept, context); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String identityBindingName) { + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, identityBindingName); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String identityBindingName, Context context) { + context = this.client.mergeContext(context); + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, identityBindingName, context); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, + String identityBindingName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, identityBindingName).getSyncPoller(); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, + String identityBindingName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, identityBindingName, context).getSyncPoller(); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String identityBindingName) { + return beginDeleteAsync(resourceGroupName, resourceName, identityBindingName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String identityBindingName, + Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, identityBindingName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String identityBindingName) { + deleteAsync(resourceGroupName, resourceName, identityBindingName).block(); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String identityBindingName, Context context) { + deleteAsync(resourceGroupName, resourceName, identityBindingName, context).block(); + } + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<IdentityBindingInner>> listByManagedClusterNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<IdentityBindingInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<IdentityBindingInner>> listByManagedClusterNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/JwtAuthenticatorsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/JwtAuthenticatorsClientImpl.java new file mode 100644 index 000000000000..1379b5a678f6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/JwtAuthenticatorsClientImpl.java @@ -0,0 +1,963 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.JwtAuthenticatorsClient; +import com.azure.resourcemanager.containerservice.fluent.models.JwtAuthenticatorInner; +import com.azure.resourcemanager.containerservice.models.JwtAuthenticatorListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in JwtAuthenticatorsClient. + */ +public final class JwtAuthenticatorsClientImpl implements JwtAuthenticatorsClient { + /** + * The proxy service used to perform REST calls. + */ + private final JwtAuthenticatorsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of JwtAuthenticatorsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + JwtAuthenticatorsClientImpl(ContainerServiceManagementClientImpl client) { + this.service + = RestProxy.create(JwtAuthenticatorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientJwtAuthenticators to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientJwtAuthenticators") + public interface JwtAuthenticatorsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<JwtAuthenticatorListResult>> listByManagedCluster(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<JwtAuthenticatorInner>> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("jwtAuthenticatorName") String jwtAuthenticatorName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("jwtAuthenticatorName") String jwtAuthenticatorName, + @BodyParam("application/json") JwtAuthenticatorInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("jwtAuthenticatorName") String jwtAuthenticatorName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<JwtAuthenticatorListResult>> listByManagedClusterNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<JwtAuthenticatorInner>> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .<PagedResponse<JwtAuthenticatorInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<JwtAuthenticatorInner>> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux<JwtAuthenticatorInner> listByManagedClusterAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<JwtAuthenticatorInner> listByManagedClusterAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<JwtAuthenticatorInner> listByManagedCluster(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<JwtAuthenticatorInner> listByManagedCluster(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<JwtAuthenticatorInner>> getWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, jwtAuthenticatorName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<JwtAuthenticatorInner>> getWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + resourceName, jwtAuthenticatorName, accept, context); + } + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<JwtAuthenticatorInner> getAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName) { + return getWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<JwtAuthenticatorInner> getWithResponse(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context).block(); + } + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JwtAuthenticatorInner get(String resourceGroupName, String resourceName, String jwtAuthenticatorName) { + return getWithResponse(resourceGroupName, resourceName, jwtAuthenticatorName, Context.NONE).getValue(); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, jwtAuthenticatorName, parameters, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, jwtAuthenticatorName, parameters, accept, context); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux<PollResult<JwtAuthenticatorInner>, JwtAuthenticatorInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters) { + Mono<Response<Flux<ByteBuffer>>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters); + return this.client.<JwtAuthenticatorInner, JwtAuthenticatorInner>getLroResult(mono, + this.client.getHttpPipeline(), JwtAuthenticatorInner.class, JwtAuthenticatorInner.class, + this.client.getContext()); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<JwtAuthenticatorInner>, JwtAuthenticatorInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono<Response<Flux<ByteBuffer>>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + jwtAuthenticatorName, parameters, context); + return this.client.<JwtAuthenticatorInner, JwtAuthenticatorInner>getLroResult(mono, + this.client.getHttpPipeline(), JwtAuthenticatorInner.class, JwtAuthenticatorInner.class, context); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<JwtAuthenticatorInner>, JwtAuthenticatorInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<JwtAuthenticatorInner>, JwtAuthenticatorInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<JwtAuthenticatorInner> createOrUpdateAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JwtAuthenticatorInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<JwtAuthenticatorInner> createOrUpdateAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JwtAuthenticatorInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JwtAuthenticatorInner createOrUpdate(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JwtAuthenticatorInner parameters) { + return createOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters).block(); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JwtAuthenticatorInner createOrUpdate(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JwtAuthenticatorInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters, context).block(); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, jwtAuthenticatorName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + resourceName, jwtAuthenticatorName, accept, context); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName) { + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context) { + context = this.client.mergeContext(context); + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, + String jwtAuthenticatorName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName).getSyncPoller(); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context).getSyncPoller(); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String jwtAuthenticatorName) { + return beginDeleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String jwtAuthenticatorName, + Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String jwtAuthenticatorName) { + deleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName).block(); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String jwtAuthenticatorName, Context context) { + deleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context).block(); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<JwtAuthenticatorInner>> listByManagedClusterNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<JwtAuthenticatorInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<JwtAuthenticatorInner>> listByManagedClusterNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterAgentPoolImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterAgentPoolImpl.java index 98f4dba163a5..454642777e59 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterAgentPoolImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterAgentPoolImpl.java @@ -325,6 +325,10 @@ AgentPoolInner getAgentPoolInner() { agentPoolInner.withVirtualMachineNodesStatus(innerModel().virtualMachineNodesStatus()); agentPoolInner.withStatus(innerModel().status()); + // available only in preview api-version + agentPoolInner.withNodeImageVersion(innerModel().nodeImageVersion()); + agentPoolInner.withUpgradeStrategy(innerModel().upgradeStrategy()); + return agentPoolInner; } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/LoadBalancersClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/LoadBalancersClientImpl.java new file mode 100644 index 000000000000..e6451577cbcb --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/LoadBalancersClientImpl.java @@ -0,0 +1,842 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.LoadBalancersClient; +import com.azure.resourcemanager.containerservice.fluent.models.LoadBalancerInner; +import com.azure.resourcemanager.containerservice.models.LoadBalancerListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in LoadBalancersClient. + */ +public final class LoadBalancersClientImpl implements LoadBalancersClient { + /** + * The proxy service used to perform REST calls. + */ + private final LoadBalancersService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of LoadBalancersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LoadBalancersClientImpl(ContainerServiceManagementClientImpl client) { + this.service + = RestProxy.create(LoadBalancersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientLoadBalancers to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientLoadBalancers") + public interface LoadBalancersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<LoadBalancerListResult>> listByManagedCluster(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<LoadBalancerInner>> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("loadBalancerName") String loadBalancerName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<LoadBalancerInner>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("loadBalancerName") String loadBalancerName, + @BodyParam("application/json") LoadBalancerInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("loadBalancerName") String loadBalancerName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<LoadBalancerListResult>> listByManagedClusterNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<LoadBalancerInner>> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .<PagedResponse<LoadBalancerInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<LoadBalancerInner>> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux<LoadBalancerInner> listByManagedClusterAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<LoadBalancerInner> listByManagedClusterAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<LoadBalancerInner> listByManagedCluster(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<LoadBalancerInner> listByManagedCluster(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<LoadBalancerInner>> getWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, loadBalancerName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<LoadBalancerInner>> getWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + resourceName, loadBalancerName, accept, context); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<LoadBalancerInner> getAsync(String resourceGroupName, String resourceName, String loadBalancerName) { + return getWithResponseAsync(resourceGroupName, resourceName, loadBalancerName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<LoadBalancerInner> getWithResponse(String resourceGroupName, String resourceName, + String loadBalancerName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, loadBalancerName, context).block(); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LoadBalancerInner get(String resourceGroupName, String resourceName, String loadBalancerName) { + return getWithResponse(resourceGroupName, resourceName, loadBalancerName, Context.NONE).getValue(); + } + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<LoadBalancerInner>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String loadBalancerName, LoadBalancerInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, loadBalancerName, parameters, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<LoadBalancerInner>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String loadBalancerName, LoadBalancerInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, loadBalancerName, parameters, accept, context); + } + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<LoadBalancerInner> createOrUpdateAsync(String resourceGroupName, String resourceName, + String loadBalancerName, LoadBalancerInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, loadBalancerName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<LoadBalancerInner> createOrUpdateWithResponse(String resourceGroupName, String resourceName, + String loadBalancerName, LoadBalancerInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, loadBalancerName, parameters, context) + .block(); + } + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LoadBalancerInner createOrUpdate(String resourceGroupName, String resourceName, String loadBalancerName, + LoadBalancerInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, resourceName, loadBalancerName, parameters, Context.NONE) + .getValue(); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, loadBalancerName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + resourceName, loadBalancerName, accept, context); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String loadBalancerName) { + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, loadBalancerName); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String loadBalancerName, Context context) { + context = this.client.mergeContext(context); + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, loadBalancerName, context); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, + String loadBalancerName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, loadBalancerName).getSyncPoller(); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, + String loadBalancerName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, loadBalancerName, context).getSyncPoller(); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String loadBalancerName) { + return beginDeleteAsync(resourceGroupName, resourceName, loadBalancerName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String loadBalancerName, + Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, loadBalancerName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String loadBalancerName) { + deleteAsync(resourceGroupName, resourceName, loadBalancerName).block(); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String loadBalancerName, Context context) { + deleteAsync(resourceGroupName, resourceName, loadBalancerName, context).block(); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<LoadBalancerInner>> listByManagedClusterNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<LoadBalancerInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<LoadBalancerInner>> listByManagedClusterNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java index 34ed485c08a4..49638472da4a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.containerservice.implementation; +import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; import com.azure.core.annotation.HeaderParam; @@ -11,6 +12,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -23,11 +25,16 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservice.fluent.MachinesClient; import com.azure.resourcemanager.containerservice.fluent.models.MachineInner; import com.azure.resourcemanager.containerservice.models.MachineListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -80,6 +87,18 @@ Mono<Response<MachineInner>> get(@HostParam("$host") String endpoint, @PathParam("agentPoolName") String agentPoolName, @PathParam("machineName") String machineName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, @PathParam("machineName") String machineName, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @BodyParam("application/json") MachineInner parameters, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -121,7 +140,7 @@ private Mono<PagedResponse<MachineInner>> listSinglePageAsync(String resourceGro if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -165,7 +184,7 @@ private Mono<PagedResponse<MachineInner>> listSinglePageAsync(String resourceGro if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -251,7 +270,7 @@ public PagedIterable<MachineInner> list(String resourceGroupName, String resourc * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. + * @param machineName Host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -282,7 +301,7 @@ public Mono<Response<MachineInner>> getWithResponseAsync(String resourceGroupNam if (machineName == null) { return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -296,7 +315,7 @@ public Mono<Response<MachineInner>> getWithResponseAsync(String resourceGroupNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. + * @param machineName Host name of the machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -328,7 +347,7 @@ private Mono<Response<MachineInner>> getWithResponseAsync(String resourceGroupNa if (machineName == null) { return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -341,7 +360,7 @@ private Mono<Response<MachineInner>> getWithResponseAsync(String resourceGroupNa * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. + * @param machineName Host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -360,7 +379,7 @@ public Mono<MachineInner> getAsync(String resourceGroupName, String resourceName * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. + * @param machineName Host name of the machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -379,7 +398,7 @@ public Response<MachineInner> getWithResponse(String resourceGroupName, String r * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName host name of the machine. + * @param machineName Host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -390,6 +409,362 @@ public MachineInner get(String resourceGroupName, String resourceName, String ag return getWithResponse(resourceGroupName, resourceName, agentPoolName, machineName, Context.NONE).getValue(); } + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine provides detailed information about its configuration and status along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, machineName, ifMatch, + ifNoneMatch, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine provides detailed information about its configuration and status along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, agentPoolName, machineName, ifMatch, ifNoneMatch, parameters, accept, + context); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a machine provides detailed information about its configuration and + * status. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux<PollResult<MachineInner>, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch) { + Mono<Response<Flux<ByteBuffer>>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + agentPoolName, machineName, parameters, ifMatch, ifNoneMatch); + return this.client.<MachineInner, MachineInner>getLroResult(mono, this.client.getHttpPipeline(), + MachineInner.class, MachineInner.class, this.client.getContext()); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a machine provides detailed information about its configuration and + * status. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux<PollResult<MachineInner>, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono<Response<Flux<ByteBuffer>>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + agentPoolName, machineName, parameters, ifMatch, ifNoneMatch); + return this.client.<MachineInner, MachineInner>getLroResult(mono, this.client.getHttpPipeline(), + MachineInner.class, MachineInner.class, this.client.getContext()); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a machine provides detailed information about its configuration and + * status. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<MachineInner>, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch, Context context) { + context = this.client.mergeContext(context); + Mono<Response<Flux<ByteBuffer>>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + agentPoolName, machineName, parameters, ifMatch, ifNoneMatch, context); + return this.client.<MachineInner, MachineInner>getLroResult(mono, this.client.getHttpPipeline(), + MachineInner.class, MachineInner.class, context); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a machine provides detailed information about its configuration and + * status. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<MachineInner>, MachineInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, ifMatch, + ifNoneMatch) + .getSyncPoller(); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a machine provides detailed information about its configuration and + * status. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<MachineInner>, MachineInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, ifMatch, + ifNoneMatch, context) + .getSyncPoller(); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine provides detailed information about its configuration and status on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<MachineInner> createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, + ifMatch, ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine provides detailed information about its configuration and status on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<MachineInner> createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, + ifMatch, ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine provides detailed information about its configuration and status on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<MachineInner> createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, + ifMatch, ifNoneMatch, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine provides detailed information about its configuration and status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MachineInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return createOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, ifMatch, + ifNoneMatch).block(); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine provides detailed information about its configuration and status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MachineInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, ifMatch, + ifNoneMatch, context).block(); + } + /** * Gets a list of machines in the specified agent pool. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java index f74a7ae1b665..bb4c262beb79 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java @@ -141,7 +141,7 @@ Mono<Response<MaintenanceConfigurationListResult>> listByManagedClusterNext( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), apiVersion, @@ -181,7 +181,7 @@ Mono<Response<MaintenanceConfigurationListResult>> listByManagedClusterNext( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -296,7 +296,7 @@ public Mono<Response<MaintenanceConfigurationInner>> getWithResponseAsync(String if (configName == null) { return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -338,7 +338,7 @@ private Mono<Response<MaintenanceConfigurationInner>> getWithResponseAsync(Strin if (configName == null) { return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -436,7 +436,7 @@ public Mono<Response<MaintenanceConfigurationInner>> createOrUpdateWithResponseA } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, configName, parameters, accept, context)) @@ -483,7 +483,7 @@ private Mono<Response<MaintenanceConfigurationInner>> createOrUpdateWithResponse } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -582,7 +582,7 @@ public Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, St if (configName == null) { return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, @@ -623,7 +623,7 @@ private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, S if (configName == null) { return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClusterSnapshotsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClusterSnapshotsClientImpl.java new file mode 100644 index 000000000000..7a11708c645d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClusterSnapshotsClientImpl.java @@ -0,0 +1,1020 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservice.fluent.ManagedClusterSnapshotsClient; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterSnapshotInner; +import com.azure.resourcemanager.containerservice.models.ManagedClusterSnapshotListResult; +import com.azure.resourcemanager.containerservice.models.TagsObject; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ManagedClusterSnapshotsClient. + */ +public final class ManagedClusterSnapshotsClientImpl implements InnerSupportsGet<ManagedClusterSnapshotInner>, + InnerSupportsListing<ManagedClusterSnapshotInner>, InnerSupportsDelete<Void>, ManagedClusterSnapshotsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ManagedClusterSnapshotsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of ManagedClusterSnapshotsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ManagedClusterSnapshotsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(ManagedClusterSnapshotsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientManagedClusterSnapshots to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientManagedClusterSnapshots") + public interface ManagedClusterSnapshotsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ManagedClusterSnapshotListResult>> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ManagedClusterSnapshotListResult>> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ManagedClusterSnapshotInner>> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ManagedClusterSnapshotInner>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @BodyParam("application/json") ManagedClusterSnapshotInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ManagedClusterSnapshotInner>> updateTags(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @BodyParam("application/json") TagsObject parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Void>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ManagedClusterSnapshotListResult>> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<ManagedClusterSnapshotListResult>> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ManagedClusterSnapshotInner>> 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 apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) + .<PagedResponse<ManagedClusterSnapshotInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ManagedClusterSnapshotInner>> 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 apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux<ManagedClusterSnapshotInner> listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<ManagedClusterSnapshotInner> listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ManagedClusterSnapshotInner> list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ManagedClusterSnapshotInner> list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Cluster Snapshots operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ManagedClusterSnapshotInner>> + 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 apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .<PagedResponse<ManagedClusterSnapshotInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Cluster Snapshots operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ManagedClusterSnapshotInner>> + 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 apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Cluster Snapshots operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux<ManagedClusterSnapshotInner> listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Cluster Snapshots operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<ManagedClusterSnapshotInner> listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Cluster Snapshots operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ManagedClusterSnapshotInner> listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Cluster Snapshots operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<ManagedClusterSnapshotInner> listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<ManagedClusterSnapshotInner>> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<ManagedClusterSnapshotInner>> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context); + } + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<ManagedClusterSnapshotInner> getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<ManagedClusterSnapshotInner> getByResourceGroupWithResponse(String resourceGroupName, + String resourceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterSnapshotInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<ManagedClusterSnapshotInner>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterSnapshotInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<ManagedClusterSnapshotInner>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterSnapshotInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, parameters, accept, context); + } + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<ManagedClusterSnapshotInner> createOrUpdateAsync(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<ManagedClusterSnapshotInner> createOrUpdateWithResponse(String resourceGroupName, + String resourceName, ManagedClusterSnapshotInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterSnapshotInner createOrUpdate(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + } + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<ManagedClusterSnapshotInner>> updateTagsWithResponseAsync(String resourceGroupName, + String resourceName, TagsObject parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<ManagedClusterSnapshotInner>> updateTagsWithResponseAsync(String resourceGroupName, + String resourceName, TagsObject parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateTags(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, parameters, accept, context); + } + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<ManagedClusterSnapshotInner> updateTagsAsync(String resourceGroupName, String resourceName, + TagsObject parameters) { + return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<ManagedClusterSnapshotInner> updateTagsWithResponse(String resourceGroupName, String resourceName, + TagsObject parameters, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterSnapshotInner updateTags(String resourceGroupName, String resourceName, + TagsObject parameters) { + return updateTagsWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + } + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + resourceName, accept, context); + } + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Void> deleteAsync(String resourceGroupName, String resourceName) { + return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<Void> deleteWithResponse(String resourceGroupName, String resourceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName) { + deleteWithResponse(resourceGroupName, resourceName, Context.NONE); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ManagedClusterSnapshotInner>> 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)) + .<PagedResponse<ManagedClusterSnapshotInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ManagedClusterSnapshotInner>> 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)); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Cluster Snapshots operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ManagedClusterSnapshotInner>> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<ManagedClusterSnapshotInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from the List Managed Cluster Snapshots operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<ManagedClusterSnapshotInner>> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java index a165ea487b2b..9ec10e410a57 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java @@ -35,6 +35,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservice.fluent.ManagedClustersClient; import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservice.fluent.models.GuardrailsAvailableVersionInner; import com.azure.resourcemanager.containerservice.fluent.models.KubernetesVersionListResultInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterAccessProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; @@ -43,7 +44,9 @@ import com.azure.resourcemanager.containerservice.fluent.models.MeshUpgradeProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; import com.azure.resourcemanager.containerservice.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservice.fluent.models.SafeguardsAvailableVersionInner; import com.azure.resourcemanager.containerservice.models.Format; +import com.azure.resourcemanager.containerservice.models.GuardrailsAvailableVersionsList; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterListResult; import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; @@ -51,7 +54,9 @@ import com.azure.resourcemanager.containerservice.models.MeshRevisionProfileList; import com.azure.resourcemanager.containerservice.models.MeshUpgradeProfileList; import com.azure.resourcemanager.containerservice.models.OutboundEnvironmentEndpointCollection; +import com.azure.resourcemanager.containerservice.models.RebalanceLoadBalancersRequestBody; import com.azure.resourcemanager.containerservice.models.RunCommandRequest; +import com.azure.resourcemanager.containerservice.models.SafeguardsAvailableVersionsList; import com.azure.resourcemanager.containerservice.models.TagsObject; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; @@ -201,7 +206,9 @@ Mono<Response<Flux<ByteBuffer>>> updateTags(@HostParam("$host") String endpoint, Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-Match") String ifMatch, + @QueryParam("ignore-pod-disruption-budget") Boolean ignorePodDisruptionBudget, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile") @@ -224,19 +231,19 @@ Mono<Response<Flux<ByteBuffer>>> resetAadProfile(@HostParam("$host") String endp Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificates(@HostParam("$host") String endpoint, + Mono<Response<Flux<ByteBuffer>>> abortLatestOperation(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<Flux<ByteBuffer>>> abortLatestOperation(@HostParam("$host") String endpoint, + Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificates(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); @@ -297,6 +304,40 @@ Mono<Response<OutboundEnvironmentEndpointCollection>> listOutboundNetworkDepende @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<GuardrailsAvailableVersionInner>> getGuardrailsVersions(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("version") String version, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<GuardrailsAvailableVersionsList>> listGuardrailsVersions(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<SafeguardsAvailableVersionInner>> getSafeguardsVersions(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("version") String version, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<SafeguardsAvailableVersionsList>> listSafeguardsVersions(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles") @ExpectedResponses({ 200 }) @@ -332,6 +373,16 @@ Mono<Response<MeshUpgradeProfileInner>> getMeshUpgradeProfile(@HostParam("$host" @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("mode") String mode, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rebalanceLoadBalancers") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> rebalanceLoadBalancers(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @BodyParam("application/json") RebalanceLoadBalancersRequestBody parameters, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -356,6 +407,22 @@ Mono<Response<OutboundEnvironmentEndpointCollection>> listOutboundNetworkDepende @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<Response<GuardrailsAvailableVersionsList>> listGuardrailsVersionsNext( + @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<Response<SafeguardsAvailableVersionsList>> listSafeguardsVersionsNext( + @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 }) @@ -399,7 +466,7 @@ public Mono<Response<KubernetesVersionListResultInner>> listKubernetesVersionsWi if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listKubernetesVersions(this.client.getEndpoint(), apiVersion, @@ -435,7 +502,7 @@ private Mono<Response<KubernetesVersionListResultInner>> listKubernetesVersionsW if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listKubernetesVersions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -513,7 +580,7 @@ private Mono<PagedResponse<ManagedClusterInner>> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -543,7 +610,7 @@ private Mono<PagedResponse<ManagedClusterInner>> listSinglePageAsync(Context con return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -630,7 +697,7 @@ private Mono<PagedResponse<ManagedClusterInner>> listByResourceGroupSinglePageAs return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, @@ -666,7 +733,7 @@ private Mono<PagedResponse<ManagedClusterInner>> listByResourceGroupSinglePageAs return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -765,7 +832,7 @@ public PagedIterable<ManagedClusterInner> listByResourceGroup(String resourceGro if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getUpgradeProfile(this.client.getEndpoint(), apiVersion, @@ -803,7 +870,7 @@ public PagedIterable<ManagedClusterInner> listByResourceGroup(String resourceGro if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getUpgradeProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -897,7 +964,7 @@ public Mono<Response<ManagedClusterAccessProfileInner>> getAccessProfileWithResp if (roleName == null) { return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getAccessProfile(this.client.getEndpoint(), apiVersion, @@ -944,7 +1011,7 @@ private Mono<Response<ManagedClusterAccessProfileInner>> getAccessProfileWithRes if (roleName == null) { return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getAccessProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1051,7 +1118,7 @@ public Mono<Response<CredentialResultsInner>> listClusterAdminCredentialsWithRes if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listClusterAdminCredentials(this.client.getEndpoint(), apiVersion, @@ -1089,7 +1156,7 @@ private Mono<Response<CredentialResultsInner>> listClusterAdminCredentialsWithRe if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listClusterAdminCredentials(this.client.getEndpoint(), apiVersion, @@ -1182,7 +1249,7 @@ public Mono<Response<CredentialResultsInner>> listClusterUserCredentialsWithResp if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listClusterUserCredentials(this.client.getEndpoint(), apiVersion, @@ -1223,7 +1290,7 @@ private Mono<Response<CredentialResultsInner>> listClusterUserCredentialsWithRes if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listClusterUserCredentials(this.client.getEndpoint(), apiVersion, @@ -1317,7 +1384,7 @@ public Mono<Response<CredentialResultsInner>> listClusterMonitoringUserCredentia if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listClusterMonitoringUserCredentials(this.client.getEndpoint(), apiVersion, @@ -1355,7 +1422,7 @@ private Mono<Response<CredentialResultsInner>> listClusterMonitoringUserCredenti if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listClusterMonitoringUserCredentials(this.client.getEndpoint(), apiVersion, @@ -1444,7 +1511,7 @@ public Mono<Response<ManagedClusterInner>> getByResourceGroupWithResponseAsync(S if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, @@ -1481,7 +1548,7 @@ private Mono<Response<ManagedClusterInner>> getByResourceGroupWithResponseAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1572,7 +1639,7 @@ public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -1618,7 +1685,7 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1873,7 +1940,7 @@ public Mono<Response<Flux<ByteBuffer>>> updateTagsWithResponseAsync(String resou } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), apiVersion, @@ -1917,7 +1984,7 @@ private Mono<Response<Flux<ByteBuffer>>> updateTagsWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -2126,6 +2193,8 @@ public ManagedClusterInner updateTags(String resourceGroupName, String resourceN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2133,7 +2202,7 @@ public ManagedClusterInner updateTags(String resourceGroupName, String resourceN */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String ifMatch) { + String ifMatch, Boolean ignorePodDisruptionBudget) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2149,11 +2218,12 @@ public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceG if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, accept, context)) + .withContext( + context -> service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -2163,6 +2233,8 @@ public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceG * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2171,7 +2243,7 @@ public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String ifMatch, Context context) { + String ifMatch, Boolean ignorePodDisruptionBudget, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2187,11 +2259,11 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, ifMatch, accept, context); + resourceName, ifMatch, ignorePodDisruptionBudget, accept, context); } /** @@ -2200,6 +2272,8 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2207,8 +2281,9 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String ifMatch) { - Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch); + String ifMatch, Boolean ignorePodDisruptionBudget) { + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget); return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -2226,7 +2301,9 @@ public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupN @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName) { final String ifMatch = null; - Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch); + final Boolean ignorePodDisruptionBudget = null; + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget); return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -2237,6 +2314,8 @@ public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2245,10 +2324,10 @@ public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupN */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String ifMatch, Context context) { + String ifMatch, Boolean ignorePodDisruptionBudget, Context context) { context = this.client.mergeContext(context); Mono<Response<Flux<ByteBuffer>>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, context); + = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context); return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } @@ -2266,7 +2345,9 @@ private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName) { final String ifMatch = null; - return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch).getSyncPoller(); + final Boolean ignorePodDisruptionBudget = null; + return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget) + .getSyncPoller(); } /** @@ -2275,6 +2356,8 @@ public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2283,8 +2366,9 @@ public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, String ifMatch, - Context context) { - return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch, context).getSyncPoller(); + Boolean ignorePodDisruptionBudget, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context) + .getSyncPoller(); } /** @@ -2293,14 +2377,17 @@ public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String ifMatch) { - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch).last() + public Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String ifMatch, + Boolean ignorePodDisruptionBudget) { + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2317,7 +2404,8 @@ public Mono<Void> deleteAsync(String resourceGroupName, String resourceName, Str @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Void> deleteAsync(String resourceGroupName, String resourceName) { final String ifMatch = null; - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch).last() + final Boolean ignorePodDisruptionBudget = null; + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2327,6 +2415,8 @@ public Mono<Void> deleteAsync(String resourceGroupName, String resourceName) { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2334,8 +2424,9 @@ public Mono<Void> deleteAsync(String resourceGroupName, String resourceName) { * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String ifMatch, Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, context).last() + private Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String ifMatch, + Boolean ignorePodDisruptionBudget, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2351,7 +2442,8 @@ private Mono<Void> deleteAsync(String resourceGroupName, String resourceName, St @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String resourceName) { final String ifMatch = null; - deleteAsync(resourceGroupName, resourceName, ifMatch).block(); + final Boolean ignorePodDisruptionBudget = null; + deleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget).block(); } /** @@ -2360,14 +2452,17 @@ public void delete(String resourceGroupName, String resourceName) { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String ifMatch, Context context) { - deleteAsync(resourceGroupName, resourceName, ifMatch, context).block(); + public void delete(String resourceGroupName, String resourceName, String ifMatch, Boolean ignorePodDisruptionBudget, + Context context) { + deleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context).block(); } /** @@ -2406,7 +2501,7 @@ public Mono<Response<Flux<ByteBuffer>>> resetServicePrincipalProfileWithResponse } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.resetServicePrincipalProfile(this.client.getEndpoint(), apiVersion, @@ -2451,7 +2546,7 @@ private Mono<Response<Flux<ByteBuffer>>> resetServicePrincipalProfileWithRespons } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.resetServicePrincipalProfile(this.client.getEndpoint(), apiVersion, @@ -2659,7 +2754,7 @@ public Mono<Response<Flux<ByteBuffer>>> resetAadProfileWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.resetAadProfile(this.client.getEndpoint(), apiVersion, @@ -2705,7 +2800,7 @@ private Mono<Response<Flux<ByteBuffer>>> resetAadProfileWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.resetAadProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -2883,10 +2978,11 @@ public void resetAadProfile(String resourceGroupName, String resourceName, Manag } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -2896,7 +2992,7 @@ public void resetAadProfile(String resourceGroupName, String resourceName, Manag * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, + public Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -2913,19 +3009,20 @@ public Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsy if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.rotateClusterCertificates(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.abortLatestOperation(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -2936,7 +3033,7 @@ public Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsy * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, + private Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String resourceGroupName, String resourceName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -2953,18 +3050,19 @@ private Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAs if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.rotateClusterCertificates(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + return service.abortLatestOperation(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -2974,19 +3072,19 @@ private Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAs * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, + public PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String resourceGroupName, String resourceName) { - Mono<Response<Flux<ByteBuffer>>> mono - = rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName); + Mono<Response<Flux<ByteBuffer>>> mono = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName); return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -2997,20 +3095,21 @@ public PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(St * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, + private PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String resourceGroupName, String resourceName, Context context) { context = this.client.mergeContext(context); Mono<Response<Flux<ByteBuffer>>> mono - = rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName, context); + = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName, context); return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3020,16 +3119,16 @@ private PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(S * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourceGroupName, - String resourceName) { - return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).getSyncPoller(); + public SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName) { + return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName).getSyncPoller(); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3040,16 +3139,17 @@ public SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourceGroupName, - String resourceName, Context context) { - return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).getSyncPoller(); + public SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, + Context context) { + return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName, context).getSyncPoller(); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3059,16 +3159,17 @@ public SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Void> rotateClusterCertificatesAsync(String resourceGroupName, String resourceName) { - return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).last() + public Mono<Void> abortLatestOperationAsync(String resourceGroupName, String resourceName) { + return beginAbortLatestOperationAsync(resourceGroupName, resourceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3079,16 +3180,17 @@ public Mono<Void> rotateClusterCertificatesAsync(String resourceGroupName, Strin * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Void> rotateClusterCertificatesAsync(String resourceGroupName, String resourceName, Context context) { - return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).last() + private Mono<Void> abortLatestOperationAsync(String resourceGroupName, String resourceName, Context context) { + return beginAbortLatestOperationAsync(resourceGroupName, resourceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3097,15 +3199,16 @@ private Mono<Void> rotateClusterCertificatesAsync(String resourceGroupName, Stri * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void rotateClusterCertificates(String resourceGroupName, String resourceName) { - rotateClusterCertificatesAsync(resourceGroupName, resourceName).block(); + public void abortLatestOperation(String resourceGroupName, String resourceName) { + abortLatestOperationAsync(resourceGroupName, resourceName).block(); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, an error is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3115,16 +3218,15 @@ public void rotateClusterCertificates(String resourceGroupName, String resourceN * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context) { - rotateClusterCertificatesAsync(resourceGroupName, resourceName, context).block(); + public void abortLatestOperation(String resourceGroupName, String resourceName, Context context) { + abortLatestOperationAsync(resourceGroupName, resourceName, context).block(); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3134,7 +3236,7 @@ public void rotateClusterCertificates(String resourceGroupName, String resourceN * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String resourceGroupName, + public Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -3151,20 +3253,19 @@ public Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(St if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.abortLatestOperation(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.rotateClusterCertificates(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3175,7 +3276,7 @@ public Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(St * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String resourceGroupName, + private Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, String resourceName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -3192,19 +3293,18 @@ private Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(S if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.abortLatestOperation(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + return service.rotateClusterCertificates(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3214,19 +3314,19 @@ private Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(S * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String resourceGroupName, + public PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, String resourceName) { - Mono<Response<Flux<ByteBuffer>>> mono = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName); + Mono<Response<Flux<ByteBuffer>>> mono + = rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName); return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3237,21 +3337,20 @@ public PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String resourceGroupName, + private PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, String resourceName, Context context) { context = this.client.mergeContext(context); Mono<Response<Flux<ByteBuffer>>> mono - = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName, context); + = rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName, context); return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3261,16 +3360,16 @@ private PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName) { - return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName).getSyncPoller(); + public SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourceGroupName, + String resourceName) { + return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).getSyncPoller(); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3281,17 +3380,16 @@ public SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resou * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, - Context context) { - return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName, context).getSyncPoller(); + public SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourceGroupName, + String resourceName, Context context) { + return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).getSyncPoller(); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3301,17 +3399,16 @@ public SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resou * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Void> abortLatestOperationAsync(String resourceGroupName, String resourceName) { - return beginAbortLatestOperationAsync(resourceGroupName, resourceName).last() + public Mono<Void> rotateClusterCertificatesAsync(String resourceGroupName, String resourceName) { + return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3322,17 +3419,16 @@ public Mono<Void> abortLatestOperationAsync(String resourceGroupName, String res * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Void> abortLatestOperationAsync(String resourceGroupName, String resourceName, Context context) { - return beginAbortLatestOperationAsync(resourceGroupName, resourceName, context).last() + private Mono<Void> rotateClusterCertificatesAsync(String resourceGroupName, String resourceName, Context context) { + return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3341,16 +3437,15 @@ private Mono<Void> abortLatestOperationAsync(String resourceGroupName, String re * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void abortLatestOperation(String resourceGroupName, String resourceName) { - abortLatestOperationAsync(resourceGroupName, resourceName).block(); + public void rotateClusterCertificates(String resourceGroupName, String resourceName) { + rotateClusterCertificatesAsync(resourceGroupName, resourceName).block(); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, a 409 error code is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3360,8 +3455,8 @@ public void abortLatestOperation(String resourceGroupName, String resourceName) * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void abortLatestOperation(String resourceGroupName, String resourceName, Context context) { - abortLatestOperationAsync(resourceGroupName, resourceName, context).block(); + public void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context) { + rotateClusterCertificatesAsync(resourceGroupName, resourceName, context).block(); } /** @@ -3392,7 +3487,7 @@ public Mono<Response<Flux<ByteBuffer>>> rotateServiceAccountSigningKeysWithRespo if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.rotateServiceAccountSigningKeys(this.client.getEndpoint(), apiVersion, @@ -3429,7 +3524,7 @@ private Mono<Response<Flux<ByteBuffer>>> rotateServiceAccountSigningKeysWithResp if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.rotateServiceAccountSigningKeys(this.client.getEndpoint(), apiVersion, @@ -3604,7 +3699,7 @@ public Mono<Response<Flux<ByteBuffer>>> stopWithResponseAsync(String resourceGro if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.stop(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -3646,7 +3741,7 @@ private Mono<Response<Flux<ByteBuffer>>> stopWithResponseAsync(String resourceGr if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.stop(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -3853,7 +3948,7 @@ public Mono<Response<Flux<ByteBuffer>>> startWithResponseAsync(String resourceGr if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.start(this.client.getEndpoint(), apiVersion, @@ -3893,7 +3988,7 @@ private Mono<Response<Flux<ByteBuffer>>> startWithResponseAsync(String resourceG if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.start(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -4091,7 +4186,7 @@ public Mono<Response<Flux<ByteBuffer>>> runCommandWithResponseAsync(String resou } else { requestPayload.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.runCommand(this.client.getEndpoint(), apiVersion, @@ -4137,7 +4232,7 @@ private Mono<Response<Flux<ByteBuffer>>> runCommandWithResponseAsync(String reso } else { requestPayload.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.runCommand(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -4351,7 +4446,7 @@ public Mono<ManagedClustersGetCommandResultResponse> getCommandResultWithRespons if (commandId == null) { return Mono.error(new IllegalArgumentException("Parameter commandId is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getCommandResult(this.client.getEndpoint(), apiVersion, @@ -4393,7 +4488,7 @@ private Mono<ManagedClustersGetCommandResultResponse> getCommandResultWithRespon if (commandId == null) { return Mono.error(new IllegalArgumentException("Parameter commandId is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getCommandResult(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -4486,7 +4581,7 @@ public RunCommandResultInner getCommandResult(String resourceGroupName, String r if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), @@ -4531,7 +4626,7 @@ public RunCommandResultInner getCommandResult(String resourceGroupName, String r if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -4633,20 +4728,20 @@ public RunCommandResultInner getCommandResult(String resourceGroupName, String r } /** - * Lists mesh revision profiles for all meshes in the specified location. + * Gets supported Guardrails version in the specified subscription and location. * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. + * Contains Guardrails version along with its support info and whether it is a default version. * * @param location The name of the Azure region. + * @param version Safeguards version. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return available Guardrails Version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<MeshRevisionProfileInner>> listMeshRevisionProfilesSinglePageAsync(String location) { + public Mono<Response<GuardrailsAvailableVersionInner>> getGuardrailsVersionsWithResponseAsync(String location, + String version) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4658,32 +4753,159 @@ private Mono<PagedResponse<MeshRevisionProfileInner>> listMeshRevisionProfilesSi if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listMeshRevisionProfiles(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.getGuardrailsVersions(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), location, version, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available Guardrails Version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<GuardrailsAvailableVersionInner>> getGuardrailsVersionsWithResponseAsync(String location, + String version, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getGuardrailsVersions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + location, version, accept, context); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available Guardrails Version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<GuardrailsAvailableVersionInner> getGuardrailsVersionsAsync(String location, String version) { + return getGuardrailsVersionsWithResponseAsync(location, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available Guardrails Version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<GuardrailsAvailableVersionInner> getGuardrailsVersionsWithResponse(String location, String version, + Context context) { + return getGuardrailsVersionsWithResponseAsync(location, version, context).block(); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available Guardrails Version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GuardrailsAvailableVersionInner getGuardrailsVersions(String location, String version) { + return getGuardrailsVersionsWithResponse(location, version, Context.NONE).getValue(); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of GuardrailsVersions along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<GuardrailsAvailableVersionInner>> + listGuardrailsVersionsSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listGuardrailsVersions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, accept, context)) - .<PagedResponse<MeshRevisionProfileInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + .<PagedResponse<GuardrailsAvailableVersionInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists mesh revision profiles for all meshes in the specified location. + * Gets a list of supported Guardrails versions in the specified subscription and location. * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. + * Contains list of Guardrails version along with its support info and whether it is a default version. * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return hold values properties, which is array of GuardrailsVersions along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<MeshRevisionProfileInner>> listMeshRevisionProfilesSinglePageAsync(String location, + private Mono<PagedResponse<GuardrailsAvailableVersionInner>> listGuardrailsVersionsSinglePageAsync(String location, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -4696,104 +4918,103 @@ private Mono<PagedResponse<MeshRevisionProfileInner>> listMeshRevisionProfilesSi if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listMeshRevisionProfiles(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, + .listGuardrailsVersions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Lists mesh revision profiles for all meshes in the specified location. + * Gets a list of supported Guardrails versions in the specified subscription and location. * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. + * Contains list of Guardrails version along with its support info and whether it is a default version. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. + * @return hold values properties, which is array of GuardrailsVersions as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux<MeshRevisionProfileInner> listMeshRevisionProfilesAsync(String location) { - return new PagedFlux<>(() -> listMeshRevisionProfilesSinglePageAsync(location), - nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink)); + public PagedFlux<GuardrailsAvailableVersionInner> listGuardrailsVersionsAsync(String location) { + return new PagedFlux<>(() -> listGuardrailsVersionsSinglePageAsync(location), + nextLink -> listGuardrailsVersionsNextSinglePageAsync(nextLink)); } /** - * Lists mesh revision profiles for all meshes in the specified location. + * Gets a list of supported Guardrails versions in the specified subscription and location. * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. + * Contains list of Guardrails version along with its support info and whether it is a default version. * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. + * @return hold values properties, which is array of GuardrailsVersions as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux<MeshRevisionProfileInner> listMeshRevisionProfilesAsync(String location, Context context) { - return new PagedFlux<>(() -> listMeshRevisionProfilesSinglePageAsync(location, context), - nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink, context)); + private PagedFlux<GuardrailsAvailableVersionInner> listGuardrailsVersionsAsync(String location, Context context) { + return new PagedFlux<>(() -> listGuardrailsVersionsSinglePageAsync(location, context), + nextLink -> listGuardrailsVersionsNextSinglePageAsync(nextLink, context)); } /** - * Lists mesh revision profiles for all meshes in the specified location. + * Gets a list of supported Guardrails versions in the specified subscription and location. * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. + * Contains list of Guardrails version along with its support info and whether it is a default version. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. + * @return hold values properties, which is array of GuardrailsVersions as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<MeshRevisionProfileInner> listMeshRevisionProfiles(String location) { - return new PagedIterable<>(listMeshRevisionProfilesAsync(location)); + public PagedIterable<GuardrailsAvailableVersionInner> listGuardrailsVersions(String location) { + return new PagedIterable<>(listGuardrailsVersionsAsync(location)); } /** - * Lists mesh revision profiles for all meshes in the specified location. + * Gets a list of supported Guardrails versions in the specified subscription and location. * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. + * Contains list of Guardrails version along with its support info and whether it is a default version. * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. + * @return hold values properties, which is array of GuardrailsVersions as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<MeshRevisionProfileInner> listMeshRevisionProfiles(String location, Context context) { - return new PagedIterable<>(listMeshRevisionProfilesAsync(location, context)); + public PagedIterable<GuardrailsAvailableVersionInner> listGuardrailsVersions(String location, Context context) { + return new PagedIterable<>(listGuardrailsVersionsAsync(location, context)); } /** - * Gets a mesh revision profile for a specified mesh in the specified location. + * Gets supported Safeguards version in the specified subscription and location. * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. + * Contains Safeguards version along with its support info and whether it is a default version. * * @param location The name of the Azure region. - * @param mode The mode of the mesh. + * @param version Safeguards version. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. + * @return available Safeguards Version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<MeshRevisionProfileInner>> getMeshRevisionProfileWithResponseAsync(String location, - String mode) { + public Mono<Response<SafeguardsAvailableVersionInner>> getSafeguardsVersionsWithResponseAsync(String location, + String version) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4805,34 +5026,33 @@ public Mono<Response<MeshRevisionProfileInner>> getMeshRevisionProfileWithRespon if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getMeshRevisionProfile(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), location, mode, accept, context)) + .withContext(context -> service.getSafeguardsVersions(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), location, version, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a mesh revision profile for a specified mesh in the specified location. + * Gets supported Safeguards version in the specified subscription and location. * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. + * Contains Safeguards version along with its support info and whether it is a default version. * * @param location The name of the Azure region. - * @param mode The mode of the mesh. + * @param version Safeguards version. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. + * @return available Safeguards Version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<MeshRevisionProfileInner>> getMeshRevisionProfileWithResponseAsync(String location, - String mode, Context context) { + private Mono<Response<SafeguardsAvailableVersionInner>> getSafeguardsVersionsWithResponseAsync(String location, + String version, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4844,86 +5064,85 @@ private Mono<Response<MeshRevisionProfileInner>> getMeshRevisionProfileWithRespo if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getMeshRevisionProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - location, mode, accept, context); + return service.getSafeguardsVersions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + location, version, accept, context); } /** - * Gets a mesh revision profile for a specified mesh in the specified location. + * Gets supported Safeguards version in the specified subscription and location. * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. + * Contains Safeguards version along with its support info and whether it is a default version. * * @param location The name of the Azure region. - * @param mode The mode of the mesh. + * @param version Safeguards version. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh revision profile for a mesh on successful completion of {@link Mono}. + * @return available Safeguards Version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<MeshRevisionProfileInner> getMeshRevisionProfileAsync(String location, String mode) { - return getMeshRevisionProfileWithResponseAsync(location, mode).flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono<SafeguardsAvailableVersionInner> getSafeguardsVersionsAsync(String location, String version) { + return getSafeguardsVersionsWithResponseAsync(location, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a mesh revision profile for a specified mesh in the specified location. + * Gets supported Safeguards version in the specified subscription and location. * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. + * Contains Safeguards version along with its support info and whether it is a default version. * * @param location The name of the Azure region. - * @param mode The mode of the mesh. + * @param version Safeguards version. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh revision profile for a mesh along with {@link Response}. + * @return available Safeguards Version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response<MeshRevisionProfileInner> getMeshRevisionProfileWithResponse(String location, String mode, + public Response<SafeguardsAvailableVersionInner> getSafeguardsVersionsWithResponse(String location, String version, Context context) { - return getMeshRevisionProfileWithResponseAsync(location, mode, context).block(); + return getSafeguardsVersionsWithResponseAsync(location, version, context).block(); } /** - * Gets a mesh revision profile for a specified mesh in the specified location. + * Gets supported Safeguards version in the specified subscription and location. * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. + * Contains Safeguards version along with its support info and whether it is a default version. * * @param location The name of the Azure region. - * @param mode The mode of the mesh. + * @param version Safeguards version. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh revision profile for a mesh. + * @return available Safeguards Version. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MeshRevisionProfileInner getMeshRevisionProfile(String location, String mode) { - return getMeshRevisionProfileWithResponse(location, mode, Context.NONE).getValue(); + public SafeguardsAvailableVersionInner getSafeguardsVersions(String location, String version) { + return getSafeguardsVersionsWithResponse(location, version, Context.NONE).getValue(); } /** - * Lists available upgrades for all service meshes in a specific cluster. + * Gets a list of supported Safeguards versions in the specified subscription and location. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return hold values properties, which is array of SafeguardsVersions along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<MeshUpgradeProfileInner>> - listMeshUpgradeProfilesSinglePageAsync(String resourceGroupName, String resourceName) { + private Mono<PagedResponse<SafeguardsAvailableVersionInner>> + listSafeguardsVersionsSinglePageAsync(String location) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4932,38 +5151,35 @@ public MeshRevisionProfileInner getMeshRevisionProfile(String location, String m return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listMeshUpgradeProfiles(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .<PagedResponse<MeshUpgradeProfileInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + .withContext(context -> service.listSafeguardsVersions(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), location, accept, context)) + .<PagedResponse<SafeguardsAvailableVersionInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists available upgrades for all service meshes in a specific cluster. + * Gets a list of supported Safeguards versions in the specified subscription and location. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return hold values properties, which is array of SafeguardsVersions along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<MeshUpgradeProfileInner>> - listMeshUpgradeProfilesSinglePageAsync(String resourceGroupName, String resourceName, Context context) { + private Mono<PagedResponse<SafeguardsAvailableVersionInner>> listSafeguardsVersionsSinglePageAsync(String location, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4972,89 +5188,632 @@ public MeshRevisionProfileInner getMeshRevisionProfile(String location, String m return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listMeshUpgradeProfiles(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context) + .listSafeguardsVersions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, + accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Lists available upgrades for all service meshes in a specific cluster. + * Gets a list of supported Safeguards versions in the specified subscription and location. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. + * @return hold values properties, which is array of SafeguardsVersions as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux<MeshUpgradeProfileInner> listMeshUpgradeProfilesAsync(String resourceGroupName, - String resourceName) { - return new PagedFlux<>(() -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink)); + public PagedFlux<SafeguardsAvailableVersionInner> listSafeguardsVersionsAsync(String location) { + return new PagedFlux<>(() -> listSafeguardsVersionsSinglePageAsync(location), + nextLink -> listSafeguardsVersionsNextSinglePageAsync(nextLink)); } /** - * Lists available upgrades for all service meshes in a specific cluster. + * Gets a list of supported Safeguards versions in the specified subscription and location. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. + * @return hold values properties, which is array of SafeguardsVersions as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux<MeshUpgradeProfileInner> listMeshUpgradeProfilesAsync(String resourceGroupName, - String resourceName, Context context) { - return new PagedFlux<>(() -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink, context)); + private PagedFlux<SafeguardsAvailableVersionInner> listSafeguardsVersionsAsync(String location, Context context) { + return new PagedFlux<>(() -> listSafeguardsVersionsSinglePageAsync(location, context), + nextLink -> listSafeguardsVersionsNextSinglePageAsync(nextLink, context)); } /** - * Lists available upgrades for all service meshes in a specific cluster. + * Gets a list of supported Safeguards versions in the specified subscription and location. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of SafeguardsVersions as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<SafeguardsAvailableVersionInner> listSafeguardsVersions(String location) { + return new PagedIterable<>(listSafeguardsVersionsAsync(location)); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of SafeguardsVersions as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<SafeguardsAvailableVersionInner> listSafeguardsVersions(String location, Context context) { + return new PagedIterable<>(listSafeguardsVersionsAsync(location, context)); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<MeshRevisionProfileInner>> listMeshRevisionProfilesSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listMeshRevisionProfiles(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), location, accept, context)) + .<PagedResponse<MeshRevisionProfileInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<MeshRevisionProfileInner>> listMeshRevisionProfilesSinglePageAsync(String location, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listMeshRevisionProfiles(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux<MeshRevisionProfileInner> listMeshRevisionProfilesAsync(String location) { + return new PagedFlux<>(() -> listMeshRevisionProfilesSinglePageAsync(location), + nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink)); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<MeshRevisionProfileInner> listMeshRevisionProfilesAsync(String location, Context context) { + return new PagedFlux<>(() -> listMeshRevisionProfilesSinglePageAsync(location, context), + nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<MeshRevisionProfileInner> listMeshRevisionProfiles(String location) { + return new PagedIterable<>(listMeshRevisionProfilesAsync(location)); + } + + /** + * Lists mesh revision profiles for all meshes in the specified location. + * + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<MeshRevisionProfileInner> listMeshRevisionProfiles(String location, Context context) { + return new PagedIterable<>(listMeshRevisionProfilesAsync(location, context)); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<MeshRevisionProfileInner>> getMeshRevisionProfileWithResponseAsync(String location, + String mode) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getMeshRevisionProfile(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), location, mode, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<MeshRevisionProfileInner>> getMeshRevisionProfileWithResponseAsync(String location, + String mode, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getMeshRevisionProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + location, mode, accept, context); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh revision profile for a mesh on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<MeshRevisionProfileInner> getMeshRevisionProfileAsync(String location, String mode) { + return getMeshRevisionProfileWithResponseAsync(location, mode).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh revision profile for a mesh along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<MeshRevisionProfileInner> getMeshRevisionProfileWithResponse(String location, String mode, + Context context) { + return getMeshRevisionProfileWithResponseAsync(location, mode, context).block(); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh revision profile for a mesh. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MeshRevisionProfileInner getMeshRevisionProfile(String location, String mode) { + return getMeshRevisionProfileWithResponse(location, mode, Context.NONE).getValue(); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<MeshUpgradeProfileInner>> + listMeshUpgradeProfilesSinglePageAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listMeshUpgradeProfiles(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .<PagedResponse<MeshUpgradeProfileInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<MeshUpgradeProfileInner>> + listMeshUpgradeProfilesSinglePageAsync(String resourceGroupName, String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listMeshUpgradeProfiles(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux<MeshUpgradeProfileInner> listMeshUpgradeProfilesAsync(String resourceGroupName, + String resourceName) { + return new PagedFlux<>(() -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink)); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<MeshUpgradeProfileInner> listMeshUpgradeProfilesAsync(String resourceGroupName, + String resourceName, Context context) { + return new PagedFlux<>(() -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<MeshUpgradeProfileInner> listMeshUpgradeProfiles(String resourceGroupName, + String resourceName) { + return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName)); + } + + /** + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<MeshUpgradeProfileInner> listMeshUpgradeProfiles(String resourceGroupName, - String resourceName) { - return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName)); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<MeshUpgradeProfileInner> listMeshUpgradeProfiles(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName, context)); + } + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available upgrades for a service mesh in a cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<MeshUpgradeProfileInner>> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName, String mode) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getMeshUpgradeProfile(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, mode, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available upgrades for a service mesh in a cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<MeshUpgradeProfileInner>> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName, String mode, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getMeshUpgradeProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, mode, accept, context); + } + + /** + * Gets available upgrades for a service mesh in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available upgrades for a service mesh in a cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<MeshUpgradeProfileInner> getMeshUpgradeProfileAsync(String resourceGroupName, String resourceName, + String mode) { + return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists available upgrades for all service meshes in a specific cluster. + * Gets available upgrades for a service mesh in a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param mode The mode of the mesh. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + * @return available upgrades for a service mesh in a cluster along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<MeshUpgradeProfileInner> listMeshUpgradeProfiles(String resourceGroupName, String resourceName, - Context context) { - return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<MeshUpgradeProfileInner> getMeshUpgradeProfileWithResponse(String resourceGroupName, + String resourceName, String mode, Context context) { + return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode, context).block(); } /** @@ -5066,12 +5825,28 @@ public PagedIterable<MeshUpgradeProfileInner> listMeshUpgradeProfiles(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available upgrades for a service mesh in a cluster along with {@link Response} on successful completion - * of {@link Mono}. + * @return available upgrades for a service mesh in a cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<MeshUpgradeProfileInner>> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName, String mode) { + public MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode) { + return getMeshUpgradeProfileWithResponse(resourceGroupName, resourceName, mode, Context.NONE).getValue(); + } + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<Flux<ByteBuffer>>> rebalanceLoadBalancersWithResponseAsync(String resourceGroupName, + String resourceName, RebalanceLoadBalancersRequestBody parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5087,33 +5862,35 @@ public Mono<Response<MeshUpgradeProfileInner>> getMeshUpgradeProfileWithResponse if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getMeshUpgradeProfile(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, mode, accept, context)) + .withContext(context -> service.rebalanceLoadBalancers(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets available upgrades for a service mesh in a cluster. + * Rebalance nodes across specific load balancers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available upgrades for a service mesh in a cluster along with {@link Response} on successful completion - * of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<MeshUpgradeProfileInner>> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName, String mode, Context context) { + private Mono<Response<Flux<ByteBuffer>>> rebalanceLoadBalancersWithResponseAsync(String resourceGroupName, + String resourceName, RebalanceLoadBalancersRequestBody parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5129,66 +5906,172 @@ private Mono<Response<MeshUpgradeProfileInner>> getMeshUpgradeProfileWithRespons if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getMeshUpgradeProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, mode, accept, context); + return service.rebalanceLoadBalancers(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, parameters, accept, context); } /** - * Gets available upgrades for a service mesh in a cluster. + * Rebalance nodes across specific load balancers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available upgrades for a service mesh in a cluster on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux<PollResult<Void>, Void> beginRebalanceLoadBalancersAsync(String resourceGroupName, + String resourceName, RebalanceLoadBalancersRequestBody parameters) { + Mono<Response<Flux<ByteBuffer>>> mono + = rebalanceLoadBalancersWithResponseAsync(resourceGroupName, resourceName, parameters); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<Void>, Void> beginRebalanceLoadBalancersAsync(String resourceGroupName, + String resourceName, RebalanceLoadBalancersRequestBody parameters, Context context) { + context = this.client.mergeContext(context); + Mono<Response<Flux<ByteBuffer>>> mono + = rebalanceLoadBalancersWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginRebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters) { + return this.beginRebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + } + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginRebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters, Context context) { + return this.beginRebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters, context) + .getSyncPoller(); + } + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<MeshUpgradeProfileInner> getMeshUpgradeProfileAsync(String resourceGroupName, String resourceName, - String mode) { - return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono<Void> rebalanceLoadBalancersAsync(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters) { + return beginRebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets available upgrades for a service mesh in a cluster. + * Rebalance nodes across specific load balancers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available upgrades for a service mesh in a cluster along with {@link Response}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response<MeshUpgradeProfileInner> getMeshUpgradeProfileWithResponse(String resourceGroupName, - String resourceName, String mode, Context context) { - return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode, context).block(); + private Mono<Void> rebalanceLoadBalancersAsync(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters, Context context) { + return beginRebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets available upgrades for a service mesh in a cluster. + * Rebalance nodes across specific load balancers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available upgrades for a service mesh in a cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode) { - return getMeshUpgradeProfileWithResponse(resourceGroupName, resourceName, mode, Context.NONE).getValue(); + public void rebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters) { + rebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters).block(); + } + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters, Context context) { + rebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters, context).block(); } /** @@ -5372,6 +6255,128 @@ private Mono<PagedResponse<ManagedClusterInner>> listByResourceGroupNextSinglePa res.getValue().value(), res.getValue().nextLink(), null)); } + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of GuardrailsVersions along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<GuardrailsAvailableVersionInner>> + listGuardrailsVersionsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listGuardrailsVersionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<GuardrailsAvailableVersionInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of GuardrailsVersions along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<GuardrailsAvailableVersionInner>> + listGuardrailsVersionsNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listGuardrailsVersionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of SafeguardsVersions along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<SafeguardsAvailableVersionInner>> + listSafeguardsVersionsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listSafeguardsVersionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<SafeguardsAvailableVersionInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hold values properties, which is array of SafeguardsVersions along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<SafeguardsAvailableVersionInner>> + listSafeguardsVersionsNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listSafeguardsVersionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + /** * Lists mesh revision profiles for all meshes in the specified location. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java index 28d09de421f8..8aef735958bd 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java @@ -173,7 +173,7 @@ private Mono<PagedResponse<ManagedNamespaceInner>> listByManagedClusterSinglePag if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), apiVersion, @@ -213,7 +213,7 @@ private Mono<PagedResponse<ManagedNamespaceInner>> listByManagedClusterSinglePag if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -327,7 +327,7 @@ public Mono<Response<ManagedNamespaceInner>> getWithResponseAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -370,7 +370,7 @@ private Mono<Response<ManagedNamespaceInner>> getWithResponseAsync(String resour return Mono .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -469,7 +469,7 @@ public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -519,7 +519,7 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -730,7 +730,7 @@ public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext( @@ -773,7 +773,7 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -963,7 +963,7 @@ public Mono<Response<ManagedNamespaceInner>> updateWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1012,7 +1012,7 @@ private Mono<Response<ManagedNamespaceInner>> updateWithResponseAsync(String res } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -1110,7 +1110,7 @@ public Mono<Response<CredentialResultsInner>> listCredentialWithResponseAsync(St return Mono .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.listCredential(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, accept, context)) @@ -1151,7 +1151,7 @@ private Mono<Response<CredentialResultsInner>> listCredentialWithResponseAsync(S return Mono .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listCredential(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MeshMembershipsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MeshMembershipsClientImpl.java new file mode 100644 index 000000000000..d858ab8734c6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MeshMembershipsClientImpl.java @@ -0,0 +1,950 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.MeshMembershipsClient; +import com.azure.resourcemanager.containerservice.fluent.models.MeshMembershipInner; +import com.azure.resourcemanager.containerservice.models.MeshMembershipsListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MeshMembershipsClient. + */ +public final class MeshMembershipsClientImpl implements MeshMembershipsClient { + /** + * The proxy service used to perform REST calls. + */ + private final MeshMembershipsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of MeshMembershipsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MeshMembershipsClientImpl(ContainerServiceManagementClientImpl client) { + this.service + = RestProxy.create(MeshMembershipsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientMeshMemberships to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientMeshMemberships") + public interface MeshMembershipsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<MeshMembershipsListResult>> listByManagedCluster(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<MeshMembershipInner>> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("meshMembershipName") String meshMembershipName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("meshMembershipName") String meshMembershipName, + @BodyParam("application/json") MeshMembershipInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("meshMembershipName") String meshMembershipName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<MeshMembershipsListResult>> listByManagedClusterNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<MeshMembershipInner>> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .<PagedResponse<MeshMembershipInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<MeshMembershipInner>> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux<MeshMembershipInner> listByManagedClusterAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<MeshMembershipInner> listByManagedClusterAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<MeshMembershipInner> listByManagedCluster(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<MeshMembershipInner> listByManagedCluster(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<MeshMembershipInner>> getWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, meshMembershipName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<MeshMembershipInner>> getWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + resourceName, meshMembershipName, accept, context); + } + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<MeshMembershipInner> getAsync(String resourceGroupName, String resourceName, + String meshMembershipName) { + return getWithResponseAsync(resourceGroupName, resourceName, meshMembershipName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<MeshMembershipInner> getWithResponse(String resourceGroupName, String resourceName, + String meshMembershipName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, meshMembershipName, context).block(); + } + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MeshMembershipInner get(String resourceGroupName, String resourceName, String meshMembershipName) { + return getWithResponse(resourceGroupName, resourceName, meshMembershipName, Context.NONE).getValue(); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String meshMembershipName, MeshMembershipInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, meshMembershipName, parameters, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String meshMembershipName, MeshMembershipInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, meshMembershipName, parameters, accept, context); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux<PollResult<MeshMembershipInner>, MeshMembershipInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String meshMembershipName, MeshMembershipInner parameters) { + Mono<Response<Flux<ByteBuffer>>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, meshMembershipName, parameters); + return this.client.<MeshMembershipInner, MeshMembershipInner>getLroResult(mono, this.client.getHttpPipeline(), + MeshMembershipInner.class, MeshMembershipInner.class, this.client.getContext()); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<MeshMembershipInner>, MeshMembershipInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String meshMembershipName, MeshMembershipInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono<Response<Flux<ByteBuffer>>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, meshMembershipName, parameters, context); + return this.client.<MeshMembershipInner, MeshMembershipInner>getLroResult(mono, this.client.getHttpPipeline(), + MeshMembershipInner.class, MeshMembershipInner.class, context); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<MeshMembershipInner>, MeshMembershipInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String meshMembershipName, MeshMembershipInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<MeshMembershipInner>, MeshMembershipInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String meshMembershipName, MeshMembershipInner parameters, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<MeshMembershipInner> createOrUpdateAsync(String resourceGroupName, String resourceName, + String meshMembershipName, MeshMembershipInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<MeshMembershipInner> createOrUpdateAsync(String resourceGroupName, String resourceName, + String meshMembershipName, MeshMembershipInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MeshMembershipInner createOrUpdate(String resourceGroupName, String resourceName, String meshMembershipName, + MeshMembershipInner parameters) { + return createOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters).block(); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MeshMembershipInner createOrUpdate(String resourceGroupName, String resourceName, String meshMembershipName, + MeshMembershipInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters, context).block(); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, meshMembershipName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + resourceName, meshMembershipName, accept, context); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String meshMembershipName) { + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, meshMembershipName); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String meshMembershipName, Context context) { + context = this.client.mergeContext(context); + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, meshMembershipName, context); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, + String meshMembershipName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, meshMembershipName).getSyncPoller(); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, + String meshMembershipName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, meshMembershipName, context).getSyncPoller(); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String meshMembershipName) { + return beginDeleteAsync(resourceGroupName, resourceName, meshMembershipName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String meshMembershipName, + Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, meshMembershipName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String meshMembershipName) { + deleteAsync(resourceGroupName, resourceName, meshMembershipName).block(); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String meshMembershipName, Context context) { + deleteAsync(resourceGroupName, resourceName, meshMembershipName, context).block(); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<MeshMembershipInner>> listByManagedClusterNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<MeshMembershipInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<MeshMembershipInner>> listByManagedClusterNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationStatusResultsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationStatusResultsClientImpl.java new file mode 100644 index 000000000000..6b8001f31a78 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationStatusResultsClientImpl.java @@ -0,0 +1,587 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservice.fluent.OperationStatusResultsClient; +import com.azure.resourcemanager.containerservice.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.containerservice.models.OperationStatusResultList; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OperationStatusResultsClient. + */ +public final class OperationStatusResultsClientImpl implements OperationStatusResultsClient { + /** + * The proxy service used to perform REST calls. + */ + private final OperationStatusResultsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of OperationStatusResultsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationStatusResultsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(OperationStatusResultsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientOperationStatusResults to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerServiceManagementClientOperationStatusResults") + public interface OperationStatusResultsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<OperationStatusResultList>> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<OperationStatusResultInner>> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/operations/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<OperationStatusResultInner>> getByAgentPool(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<OperationStatusResultList>> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<OperationStatusResultInner>> listSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context)) + .<PagedResponse<OperationStatusResultInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<OperationStatusResultInner>> listSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux<OperationStatusResultInner> listAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<OperationStatusResultInner> listAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<OperationStatusResultInner> list(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<OperationStatusResultInner> list(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); + } + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<OperationStatusResultInner>> getWithResponseAsync(String resourceGroupName, + String resourceName, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, operationId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<OperationStatusResultInner>> getWithResponseAsync(String resourceGroupName, + String resourceName, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + resourceName, operationId, accept, context); + } + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<OperationStatusResultInner> getAsync(String resourceGroupName, String resourceName, + String operationId) { + return getWithResponseAsync(resourceGroupName, resourceName, operationId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<OperationStatusResultInner> getWithResponse(String resourceGroupName, String resourceName, + String operationId, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, operationId, context).block(); + } + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner get(String resourceGroupName, String resourceName, String operationId) { + return getWithResponse(resourceGroupName, resourceName, operationId, Context.NONE).getValue(); + } + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<OperationStatusResultInner>> getByAgentPoolWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByAgentPool(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, operationId, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<OperationStatusResultInner>> getByAgentPoolWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String apiVersion = "2025-09-02-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByAgentPool(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, agentPoolName, operationId, accept, context); + } + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<OperationStatusResultInner> getByAgentPoolAsync(String resourceGroupName, String resourceName, + String agentPoolName, String operationId) { + return getByAgentPoolWithResponseAsync(resourceGroupName, resourceName, agentPoolName, operationId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<OperationStatusResultInner> getByAgentPoolWithResponse(String resourceGroupName, + String resourceName, String agentPoolName, String operationId, Context context) { + return getByAgentPoolWithResponseAsync(resourceGroupName, resourceName, agentPoolName, operationId, context) + .block(); + } + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner getByAgentPool(String resourceGroupName, String resourceName, + String agentPoolName, String operationId) { + return getByAgentPoolWithResponse(resourceGroupName, resourceName, agentPoolName, operationId, Context.NONE) + .getValue(); + } + + /** + * Gets a list of operations in the specified managedCluster + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<OperationStatusResultInner>> 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)) + .<PagedResponse<OperationStatusResultInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of operations in the specified managedCluster + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<OperationStatusResultInner>> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java index e5d3ba0adc78..10872033d4f9 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java @@ -82,7 +82,7 @@ private Mono<PagedResponse<OperationValueInner>> listSinglePageAsync() { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) .<PagedResponse<OperationValueInner>>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -105,7 +105,7 @@ private Mono<PagedResponse<OperationValueInner>> listSinglePageAsync(Context con return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, accept, context) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java index 4a72966fd081..04a0025f82e8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java @@ -138,7 +138,7 @@ public Mono<Response<PrivateEndpointConnectionListResultInner>> listWithResponse if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -178,7 +178,7 @@ private Mono<Response<PrivateEndpointConnectionListResultInner>> listWithRespons if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -273,7 +273,7 @@ public Mono<Response<PrivateEndpointConnectionInner>> getWithResponseAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -317,7 +317,7 @@ private Mono<Response<PrivateEndpointConnectionInner>> getWithResponseAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -422,7 +422,7 @@ public Mono<Response<PrivateEndpointConnectionInner>> updateWithResponseAsync(St } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext( @@ -472,7 +472,7 @@ private Mono<Response<PrivateEndpointConnectionInner>> updateWithResponseAsync(S } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -570,7 +570,7 @@ public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext( @@ -613,7 +613,7 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java index 5074401260ab..664be149f623 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java @@ -97,7 +97,7 @@ public Mono<Response<PrivateLinkResourcesListResultInner>> listWithResponseAsync if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -136,7 +136,7 @@ private Mono<Response<PrivateLinkResourcesListResultInner>> listWithResponseAsyn if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java index 1187b3988e63..d1cd22b9ade5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java @@ -104,7 +104,7 @@ public Mono<Response<PrivateLinkResourceInner>> postWithResponseAsync(String res } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.post(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -148,7 +148,7 @@ private Mono<Response<PrivateLinkResourceInner>> postWithResponseAsync(String re } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.post(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java index cec3165d221a..e25dfc633b7a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java @@ -160,7 +160,7 @@ private Mono<PagedResponse<SnapshotInner>> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -190,7 +190,7 @@ private Mono<PagedResponse<SnapshotInner>> listSinglePageAsync(Context context) return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -275,7 +275,7 @@ private Mono<PagedResponse<SnapshotInner>> listByResourceGroupSinglePageAsync(St return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, @@ -311,7 +311,7 @@ private Mono<PagedResponse<SnapshotInner>> listByResourceGroupSinglePageAsync(St return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -409,7 +409,7 @@ public Mono<Response<SnapshotInner>> getByResourceGroupWithResponseAsync(String if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, @@ -446,7 +446,7 @@ private Mono<Response<SnapshotInner>> getByResourceGroupWithResponseAsync(String if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -535,7 +535,7 @@ public Mono<Response<SnapshotInner>> createOrUpdateWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -578,7 +578,7 @@ private Mono<Response<SnapshotInner>> createOrUpdateWithResponseAsync(String res } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -671,7 +671,7 @@ public Mono<Response<SnapshotInner>> updateTagsWithResponseAsync(String resource } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), apiVersion, @@ -714,7 +714,7 @@ private Mono<Response<SnapshotInner>> updateTagsWithResponseAsync(String resourc } else { parameters.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -799,7 +799,7 @@ public Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, St if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, @@ -836,7 +836,7 @@ private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, S if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java index 4b9efdcf07cb..1d289676569c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java @@ -148,7 +148,7 @@ private Mono<PagedResponse<TrustedAccessRoleBindingInner>> listSinglePageAsync(S if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -188,7 +188,7 @@ private Mono<PagedResponse<TrustedAccessRoleBindingInner>> listSinglePageAsync(S if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -297,7 +297,7 @@ public Mono<Response<TrustedAccessRoleBindingInner>> getWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -339,7 +339,7 @@ private Mono<Response<TrustedAccessRoleBindingInner>> getWithResponseAsync(Strin return Mono.error( new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -441,7 +441,7 @@ public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String r } else { trustedAccessRoleBinding.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -493,7 +493,7 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String } else { trustedAccessRoleBinding.validate(); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -704,7 +704,7 @@ public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceG return Mono.error( new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext( @@ -747,7 +747,7 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java index 8f82aeeb304a..3c5a35122796 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java @@ -101,7 +101,7 @@ private Mono<PagedResponse<TrustedAccessRoleInner>> listSinglePageAsync(String l if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -134,7 +134,7 @@ private Mono<PagedResponse<TrustedAccessRoleInner>> listSinglePageAsync(String l if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-09-01"; + final String apiVersion = "2025-09-02-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AccelerationMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AccelerationMode.java new file mode 100644 index 000000000000..117724b51d09 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AccelerationMode.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enable advanced network acceleration options. This allows users to configure acceleration using BPF host routing. + * This can be enabled only with Cilium dataplane. If not specified, the default value is None (no acceleration). The + * acceleration mode can be changed on a pre-existing cluster. See https://aka.ms/acnsperformance for a detailed + * explanation. + */ +public final class AccelerationMode extends ExpandableStringEnum<AccelerationMode> { + /** + * Static value BpfVeth for AccelerationMode. + */ + public static final AccelerationMode BPF_VETH = fromString("BpfVeth"); + + /** + * Static value None for AccelerationMode. + */ + public static final AccelerationMode NONE = fromString("None"); + + /** + * Creates a new instance of AccelerationMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AccelerationMode() { + } + + /** + * Creates or finds a AccelerationMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding AccelerationMode. + */ + public static AccelerationMode fromString(String name) { + return fromString(name, AccelerationMode.class); + } + + /** + * Gets known AccelerationMode values. + * + * @return known AccelerationMode values. + */ + public static Collection<AccelerationMode> values() { + return values(AccelerationMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AddonAutoscaling.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AddonAutoscaling.java new file mode 100644 index 000000000000..003a808b9fe7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AddonAutoscaling.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. + */ +public final class AddonAutoscaling extends ExpandableStringEnum<AddonAutoscaling> { + /** + * Static value Enabled for AddonAutoscaling. + */ + public static final AddonAutoscaling ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for AddonAutoscaling. + */ + public static final AddonAutoscaling DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of AddonAutoscaling value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AddonAutoscaling() { + } + + /** + * Creates or finds a AddonAutoscaling from its string representation. + * + * @param name a name to look for. + * @return the corresponding AddonAutoscaling. + */ + public static AddonAutoscaling fromString(String name) { + return fromString(name, AddonAutoscaling.class); + } + + /** + * Gets known AddonAutoscaling values. + * + * @return known AddonAutoscaling values. + */ + public static Collection<AddonAutoscaling> values() { + return values(AddonAutoscaling.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java index 6132ead8e9b4..5ec409247047 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java @@ -30,10 +30,15 @@ public final class AdvancedNetworking implements JsonSerializable<AdvancedNetwor private AdvancedNetworkingObservability observability; /* - * Security profile to enable security features on cilium based cluster. + * Security profile to enable security features on cilium-based cluster. */ private AdvancedNetworkingSecurity security; + /* + * Profile to enable performance-enhancing features on clusters that use Azure CNI powered by Cilium. + */ + private AdvancedNetworkingPerformance performance; + /** * Creates an instance of AdvancedNetworking class. */ @@ -87,7 +92,7 @@ public AdvancedNetworking withObservability(AdvancedNetworkingObservability obse } /** - * Get the security property: Security profile to enable security features on cilium based cluster. + * Get the security property: Security profile to enable security features on cilium-based cluster. * * @return the security value. */ @@ -96,7 +101,7 @@ public AdvancedNetworkingSecurity security() { } /** - * Set the security property: Security profile to enable security features on cilium based cluster. + * Set the security property: Security profile to enable security features on cilium-based cluster. * * @param security the security value to set. * @return the AdvancedNetworking object itself. @@ -106,6 +111,28 @@ public AdvancedNetworking withSecurity(AdvancedNetworkingSecurity security) { return this; } + /** + * Get the performance property: Profile to enable performance-enhancing features on clusters that use Azure CNI + * powered by Cilium. + * + * @return the performance value. + */ + public AdvancedNetworkingPerformance performance() { + return this.performance; + } + + /** + * Set the performance property: Profile to enable performance-enhancing features on clusters that use Azure CNI + * powered by Cilium. + * + * @param performance the performance value to set. + * @return the AdvancedNetworking object itself. + */ + public AdvancedNetworking withPerformance(AdvancedNetworkingPerformance performance) { + this.performance = performance; + return this; + } + /** * Validates the instance. * @@ -118,6 +145,9 @@ public void validate() { if (security() != null) { security().validate(); } + if (performance() != null) { + performance().validate(); + } } /** @@ -129,6 +159,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("enabled", this.enabled); jsonWriter.writeJsonField("observability", this.observability); jsonWriter.writeJsonField("security", this.security); + jsonWriter.writeJsonField("performance", this.performance); return jsonWriter.writeEndObject(); } @@ -153,6 +184,8 @@ public static AdvancedNetworking fromJson(JsonReader jsonReader) throws IOExcept deserializedAdvancedNetworking.observability = AdvancedNetworkingObservability.fromJson(reader); } else if ("security".equals(fieldName)) { deserializedAdvancedNetworking.security = AdvancedNetworkingSecurity.fromJson(reader); + } else if ("performance".equals(fieldName)) { + deserializedAdvancedNetworking.performance = AdvancedNetworkingPerformance.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingPerformance.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingPerformance.java new file mode 100644 index 000000000000..f90a67176e6f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingPerformance.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Profile to enable performance-enhancing features on clusters that use Azure CNI powered by Cilium. + */ +@Fluent +public final class AdvancedNetworkingPerformance implements JsonSerializable<AdvancedNetworkingPerformance> { + /* + * Enable advanced network acceleration options. This allows users to configure acceleration using BPF host routing. + * This can be enabled only with Cilium dataplane. If not specified, the default value is None (no acceleration). + * The acceleration mode can be changed on a pre-existing cluster. See https://aka.ms/acnsperformance for a detailed + * explanation + */ + private AccelerationMode accelerationMode; + + /** + * Creates an instance of AdvancedNetworkingPerformance class. + */ + public AdvancedNetworkingPerformance() { + } + + /** + * Get the accelerationMode property: Enable advanced network acceleration options. This allows users to configure + * acceleration using BPF host routing. This can be enabled only with Cilium dataplane. If not specified, the + * default value is None (no acceleration). The acceleration mode can be changed on a pre-existing cluster. See + * https://aka.ms/acnsperformance for a detailed explanation. + * + * @return the accelerationMode value. + */ + public AccelerationMode accelerationMode() { + return this.accelerationMode; + } + + /** + * Set the accelerationMode property: Enable advanced network acceleration options. This allows users to configure + * acceleration using BPF host routing. This can be enabled only with Cilium dataplane. If not specified, the + * default value is None (no acceleration). The acceleration mode can be changed on a pre-existing cluster. See + * https://aka.ms/acnsperformance for a detailed explanation. + * + * @param accelerationMode the accelerationMode value to set. + * @return the AdvancedNetworkingPerformance object itself. + */ + public AdvancedNetworkingPerformance withAccelerationMode(AccelerationMode accelerationMode) { + this.accelerationMode = accelerationMode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("accelerationMode", + this.accelerationMode == null ? null : this.accelerationMode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdvancedNetworkingPerformance from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdvancedNetworkingPerformance if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AdvancedNetworkingPerformance. + */ + public static AdvancedNetworkingPerformance fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdvancedNetworkingPerformance deserializedAdvancedNetworkingPerformance + = new AdvancedNetworkingPerformance(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("accelerationMode".equals(fieldName)) { + deserializedAdvancedNetworkingPerformance.accelerationMode + = AccelerationMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAdvancedNetworkingPerformance; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java index 58d38fe29209..42fd5406cb01 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java @@ -12,13 +12,13 @@ import java.io.IOException; /** - * Security profile to enable security features on cilium based cluster. + * Security profile to enable security features on cilium-based cluster. */ @Fluent public final class AdvancedNetworkingSecurity implements JsonSerializable<AdvancedNetworkingSecurity> { /* - * This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium - * based clusters. If not specified, the default is false. + * Configure Advanced Networking Security features on Cilium clusters. See individual fields for their default + * values. */ private Boolean enabled; @@ -30,6 +30,12 @@ public final class AdvancedNetworkingSecurity implements JsonSerializable<Advanc */ private AdvancedNetworkPolicies advancedNetworkPolicies; + /* + * Encryption configuration for Cilium-based clusters. Once enabled all traffic between Cilium managed pods will be + * encrypted when it leaves the node boundary. + */ + private AdvancedNetworkingSecurityTransitEncryption transitEncryption; + /** * Creates an instance of AdvancedNetworkingSecurity class. */ @@ -37,8 +43,8 @@ public AdvancedNetworkingSecurity() { } /** - * Get the enabled property: This feature allows user to configure network policy based on DNS (FQDN) names. It can - * be enabled only on cilium based clusters. If not specified, the default is false. + * Get the enabled property: Configure Advanced Networking Security features on Cilium clusters. See individual + * fields for their default values. * * @return the enabled value. */ @@ -47,8 +53,8 @@ public Boolean enabled() { } /** - * Set the enabled property: This feature allows user to configure network policy based on DNS (FQDN) names. It can - * be enabled only on cilium based clusters. If not specified, the default is false. + * Set the enabled property: Configure Advanced Networking Security features on Cilium clusters. See individual + * fields for their default values. * * @param enabled the enabled value to set. * @return the AdvancedNetworkingSecurity object itself. @@ -84,12 +90,38 @@ public AdvancedNetworkingSecurity withAdvancedNetworkPolicies(AdvancedNetworkPol return this; } + /** + * Get the transitEncryption property: Encryption configuration for Cilium-based clusters. Once enabled all traffic + * between Cilium managed pods will be encrypted when it leaves the node boundary. + * + * @return the transitEncryption value. + */ + public AdvancedNetworkingSecurityTransitEncryption transitEncryption() { + return this.transitEncryption; + } + + /** + * Set the transitEncryption property: Encryption configuration for Cilium-based clusters. Once enabled all traffic + * between Cilium managed pods will be encrypted when it leaves the node boundary. + * + * @param transitEncryption the transitEncryption value to set. + * @return the AdvancedNetworkingSecurity object itself. + */ + public AdvancedNetworkingSecurity + withTransitEncryption(AdvancedNetworkingSecurityTransitEncryption transitEncryption) { + this.transitEncryption = transitEncryption; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (transitEncryption() != null) { + transitEncryption().validate(); + } } /** @@ -101,6 +133,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("enabled", this.enabled); jsonWriter.writeStringField("advancedNetworkPolicies", this.advancedNetworkPolicies == null ? null : this.advancedNetworkPolicies.toString()); + jsonWriter.writeJsonField("transitEncryption", this.transitEncryption); return jsonWriter.writeEndObject(); } @@ -124,6 +157,9 @@ public static AdvancedNetworkingSecurity fromJson(JsonReader jsonReader) throws } else if ("advancedNetworkPolicies".equals(fieldName)) { deserializedAdvancedNetworkingSecurity.advancedNetworkPolicies = AdvancedNetworkPolicies.fromString(reader.getString()); + } else if ("transitEncryption".equals(fieldName)) { + deserializedAdvancedNetworkingSecurity.transitEncryption + = AdvancedNetworkingSecurityTransitEncryption.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurityTransitEncryption.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurityTransitEncryption.java new file mode 100644 index 000000000000..4698fbbbee15 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurityTransitEncryption.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Encryption configuration for Cilium-based clusters. Once enabled all traffic between Cilium managed pods will be + * encrypted when it leaves the node boundary. + */ +@Fluent +public final class AdvancedNetworkingSecurityTransitEncryption + implements JsonSerializable<AdvancedNetworkingSecurityTransitEncryption> { + /* + * Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If not specified, the + * default value is None. + */ + private TransitEncryptionType type; + + /** + * Creates an instance of AdvancedNetworkingSecurityTransitEncryption class. + */ + public AdvancedNetworkingSecurityTransitEncryption() { + } + + /** + * Get the type property: Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If + * not specified, the default value is None. + * + * @return the type value. + */ + public TransitEncryptionType type() { + return this.type; + } + + /** + * Set the type property: Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If + * not specified, the default value is None. + * + * @param type the type value to set. + * @return the AdvancedNetworkingSecurityTransitEncryption object itself. + */ + public AdvancedNetworkingSecurityTransitEncryption withType(TransitEncryptionType type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdvancedNetworkingSecurityTransitEncryption from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdvancedNetworkingSecurityTransitEncryption if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AdvancedNetworkingSecurityTransitEncryption. + */ + public static AdvancedNetworkingSecurityTransitEncryption fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdvancedNetworkingSecurityTransitEncryption deserializedAdvancedNetworkingSecurityTransitEncryption + = new AdvancedNetworkingSecurityTransitEncryption(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedAdvancedNetworkingSecurityTransitEncryption.type + = TransitEncryptionType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAdvancedNetworkingSecurityTransitEncryption; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolArtifactStreamingProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolArtifactStreamingProfile.java new file mode 100644 index 000000000000..1032690e0cee --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolArtifactStreamingProfile.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.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The AgentPoolArtifactStreamingProfile model. + */ +@Fluent +public final class AgentPoolArtifactStreamingProfile implements JsonSerializable<AgentPoolArtifactStreamingProfile> { + /* + * Artifact streaming speeds up the cold-start of containers on a node through on-demand image loading. To use this + * feature, container images must also enable artifact streaming on ACR. If not specified, the default is false. + */ + private Boolean enabled; + + /** + * Creates an instance of AgentPoolArtifactStreamingProfile class. + */ + public AgentPoolArtifactStreamingProfile() { + } + + /** + * Get the enabled property: Artifact streaming speeds up the cold-start of containers on a node through on-demand + * image loading. To use this feature, container images must also enable artifact streaming on ACR. If not + * specified, the default is false. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Artifact streaming speeds up the cold-start of containers on a node through on-demand + * image loading. To use this feature, container images must also enable artifact streaming on ACR. If not + * specified, the default is false. + * + * @param enabled the enabled value to set. + * @return the AgentPoolArtifactStreamingProfile object itself. + */ + public AgentPoolArtifactStreamingProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolArtifactStreamingProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolArtifactStreamingProfile if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AgentPoolArtifactStreamingProfile. + */ + public static AgentPoolArtifactStreamingProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolArtifactStreamingProfile deserializedAgentPoolArtifactStreamingProfile + = new AgentPoolArtifactStreamingProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedAgentPoolArtifactStreamingProfile.enabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolArtifactStreamingProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolBlueGreenUpgradeSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolBlueGreenUpgradeSettings.java new file mode 100644 index 000000000000..51259791e0db --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolBlueGreenUpgradeSettings.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Settings for blue-green upgrade on an agentpool. + */ +@Fluent +public final class AgentPoolBlueGreenUpgradeSettings implements JsonSerializable<AgentPoolBlueGreenUpgradeSettings> { + /* + * The number or percentage of nodes to drain in batch during blue-green upgrade. Must be a non-zero number. This + * can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the + * percentage of the total number of blue nodes of the initial upgrade operation. For percentages, fractional nodes + * are rounded up. If not specified, the default is 10%. For more information, including best practices, see: + * https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + */ + private String drainBatchSize; + + /* + * The drain timeout for a node, i.e., the amount of time (in minutes) to wait on eviction of pods and graceful + * termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, + * the upgrade fails. If not specified, the default is 30 minutes. + */ + private Integer drainTimeoutInMinutes; + + /* + * The soak duration after draining a batch of nodes, i.e., the amount of time (in minutes) to wait after draining a + * batch of nodes before moving on the next batch. If not specified, the default is 15 minutes. + */ + private Integer batchSoakDurationInMinutes; + + /* + * The soak duration for a node pool, i.e., the amount of time (in minutes) to wait after all old nodes are drained + * before we remove the old nodes. If not specified, the default is 60 minutes. Only applicable for blue-green + * upgrade strategy. + */ + private Integer finalSoakDurationInMinutes; + + /** + * Creates an instance of AgentPoolBlueGreenUpgradeSettings class. + */ + public AgentPoolBlueGreenUpgradeSettings() { + } + + /** + * Get the drainBatchSize property: The number or percentage of nodes to drain in batch during blue-green upgrade. + * Must be a non-zero number. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a + * percentage is specified, it is the percentage of the total number of blue nodes of the initial upgrade operation. + * For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, + * including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. + * + * @return the drainBatchSize value. + */ + public String drainBatchSize() { + return this.drainBatchSize; + } + + /** + * Set the drainBatchSize property: The number or percentage of nodes to drain in batch during blue-green upgrade. + * Must be a non-zero number. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a + * percentage is specified, it is the percentage of the total number of blue nodes of the initial upgrade operation. + * For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, + * including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. + * + * @param drainBatchSize the drainBatchSize value to set. + * @return the AgentPoolBlueGreenUpgradeSettings object itself. + */ + public AgentPoolBlueGreenUpgradeSettings withDrainBatchSize(String drainBatchSize) { + this.drainBatchSize = drainBatchSize; + return this; + } + + /** + * Get the drainTimeoutInMinutes property: The drain timeout for a node, i.e., the amount of time (in minutes) to + * wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod + * disruption budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes. + * + * @return the drainTimeoutInMinutes value. + */ + public Integer drainTimeoutInMinutes() { + return this.drainTimeoutInMinutes; + } + + /** + * Set the drainTimeoutInMinutes property: The drain timeout for a node, i.e., the amount of time (in minutes) to + * wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod + * disruption budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes. + * + * @param drainTimeoutInMinutes the drainTimeoutInMinutes value to set. + * @return the AgentPoolBlueGreenUpgradeSettings object itself. + */ + public AgentPoolBlueGreenUpgradeSettings withDrainTimeoutInMinutes(Integer drainTimeoutInMinutes) { + this.drainTimeoutInMinutes = drainTimeoutInMinutes; + return this; + } + + /** + * Get the batchSoakDurationInMinutes property: The soak duration after draining a batch of nodes, i.e., the amount + * of time (in minutes) to wait after draining a batch of nodes before moving on the next batch. If not specified, + * the default is 15 minutes. + * + * @return the batchSoakDurationInMinutes value. + */ + public Integer batchSoakDurationInMinutes() { + return this.batchSoakDurationInMinutes; + } + + /** + * Set the batchSoakDurationInMinutes property: The soak duration after draining a batch of nodes, i.e., the amount + * of time (in minutes) to wait after draining a batch of nodes before moving on the next batch. If not specified, + * the default is 15 minutes. + * + * @param batchSoakDurationInMinutes the batchSoakDurationInMinutes value to set. + * @return the AgentPoolBlueGreenUpgradeSettings object itself. + */ + public AgentPoolBlueGreenUpgradeSettings withBatchSoakDurationInMinutes(Integer batchSoakDurationInMinutes) { + this.batchSoakDurationInMinutes = batchSoakDurationInMinutes; + return this; + } + + /** + * Get the finalSoakDurationInMinutes property: The soak duration for a node pool, i.e., the amount of time (in + * minutes) to wait after all old nodes are drained before we remove the old nodes. If not specified, the default is + * 60 minutes. Only applicable for blue-green upgrade strategy. + * + * @return the finalSoakDurationInMinutes value. + */ + public Integer finalSoakDurationInMinutes() { + return this.finalSoakDurationInMinutes; + } + + /** + * Set the finalSoakDurationInMinutes property: The soak duration for a node pool, i.e., the amount of time (in + * minutes) to wait after all old nodes are drained before we remove the old nodes. If not specified, the default is + * 60 minutes. Only applicable for blue-green upgrade strategy. + * + * @param finalSoakDurationInMinutes the finalSoakDurationInMinutes value to set. + * @return the AgentPoolBlueGreenUpgradeSettings object itself. + */ + public AgentPoolBlueGreenUpgradeSettings withFinalSoakDurationInMinutes(Integer finalSoakDurationInMinutes) { + this.finalSoakDurationInMinutes = finalSoakDurationInMinutes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("drainBatchSize", this.drainBatchSize); + jsonWriter.writeNumberField("drainTimeoutInMinutes", this.drainTimeoutInMinutes); + jsonWriter.writeNumberField("batchSoakDurationInMinutes", this.batchSoakDurationInMinutes); + jsonWriter.writeNumberField("finalSoakDurationInMinutes", this.finalSoakDurationInMinutes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolBlueGreenUpgradeSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolBlueGreenUpgradeSettings if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AgentPoolBlueGreenUpgradeSettings. + */ + public static AgentPoolBlueGreenUpgradeSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolBlueGreenUpgradeSettings deserializedAgentPoolBlueGreenUpgradeSettings + = new AgentPoolBlueGreenUpgradeSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("drainBatchSize".equals(fieldName)) { + deserializedAgentPoolBlueGreenUpgradeSettings.drainBatchSize = reader.getString(); + } else if ("drainTimeoutInMinutes".equals(fieldName)) { + deserializedAgentPoolBlueGreenUpgradeSettings.drainTimeoutInMinutes + = reader.getNullable(JsonReader::getInt); + } else if ("batchSoakDurationInMinutes".equals(fieldName)) { + deserializedAgentPoolBlueGreenUpgradeSettings.batchSoakDurationInMinutes + = reader.getNullable(JsonReader::getInt); + } else if ("finalSoakDurationInMinutes".equals(fieldName)) { + deserializedAgentPoolBlueGreenUpgradeSettings.finalSoakDurationInMinutes + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolBlueGreenUpgradeSettings; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java index a44247f5ca08..60058561ab80 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java @@ -28,6 +28,16 @@ public final class AgentPoolMode extends ExpandableStringEnum<AgentPoolMode> { */ public static final AgentPoolMode GATEWAY = fromString("Gateway"); + /** + * Static value ManagedSystem for AgentPoolMode. + */ + public static final AgentPoolMode MANAGED_SYSTEM = fromString("ManagedSystem"); + + /** + * Static value Machines for AgentPoolMode. + */ + public static final AgentPoolMode MACHINES = fromString("Machines"); + /** * Creates a new instance of AgentPoolMode value. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolRecentlyUsedVersion.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolRecentlyUsedVersion.java new file mode 100644 index 000000000000..7ee6aef647c1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolRecentlyUsedVersion.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * A historical version that can be used for rollback operations. + */ +@Fluent +public final class AgentPoolRecentlyUsedVersion implements JsonSerializable<AgentPoolRecentlyUsedVersion> { + /* + * The Kubernetes version (major.minor.patch) available for rollback. + */ + private String orchestratorVersion; + + /* + * The node image version available for rollback. + */ + private String nodeImageVersion; + + /* + * The timestamp when this version was last used. + */ + private OffsetDateTime timestamp; + + /** + * Creates an instance of AgentPoolRecentlyUsedVersion class. + */ + public AgentPoolRecentlyUsedVersion() { + } + + /** + * Get the orchestratorVersion property: The Kubernetes version (major.minor.patch) available for rollback. + * + * @return the orchestratorVersion value. + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Set the orchestratorVersion property: The Kubernetes version (major.minor.patch) available for rollback. + * + * @param orchestratorVersion the orchestratorVersion value to set. + * @return the AgentPoolRecentlyUsedVersion object itself. + */ + public AgentPoolRecentlyUsedVersion withOrchestratorVersion(String orchestratorVersion) { + this.orchestratorVersion = orchestratorVersion; + return this; + } + + /** + * Get the nodeImageVersion property: The node image version available for rollback. + * + * @return the nodeImageVersion value. + */ + public String nodeImageVersion() { + return this.nodeImageVersion; + } + + /** + * Set the nodeImageVersion property: The node image version available for rollback. + * + * @param nodeImageVersion the nodeImageVersion value to set. + * @return the AgentPoolRecentlyUsedVersion object itself. + */ + public AgentPoolRecentlyUsedVersion withNodeImageVersion(String nodeImageVersion) { + this.nodeImageVersion = nodeImageVersion; + return this; + } + + /** + * Get the timestamp property: The timestamp when this version was last used. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.timestamp; + } + + /** + * Set the timestamp property: The timestamp when this version was last used. + * + * @param timestamp the timestamp value to set. + * @return the AgentPoolRecentlyUsedVersion object itself. + */ + public AgentPoolRecentlyUsedVersion withTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("orchestratorVersion", this.orchestratorVersion); + jsonWriter.writeStringField("nodeImageVersion", this.nodeImageVersion); + jsonWriter.writeStringField("timestamp", + this.timestamp == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.timestamp)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolRecentlyUsedVersion from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolRecentlyUsedVersion if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AgentPoolRecentlyUsedVersion. + */ + public static AgentPoolRecentlyUsedVersion fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolRecentlyUsedVersion deserializedAgentPoolRecentlyUsedVersion = new AgentPoolRecentlyUsedVersion(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("orchestratorVersion".equals(fieldName)) { + deserializedAgentPoolRecentlyUsedVersion.orchestratorVersion = reader.getString(); + } else if ("nodeImageVersion".equals(fieldName)) { + deserializedAgentPoolRecentlyUsedVersion.nodeImageVersion = reader.getString(); + } else if ("timestamp".equals(fieldName)) { + deserializedAgentPoolRecentlyUsedVersion.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolRecentlyUsedVersion; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java index 1402defe71c1..c4d2b0cfeb13 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java @@ -16,6 +16,11 @@ */ @Fluent public final class AgentPoolSecurityProfile implements JsonSerializable<AgentPoolSecurityProfile> { + /* + * SSH access method of an agent pool. + */ + private AgentPoolSshAccess sshAccess; + /* * vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally * on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. @@ -28,17 +33,32 @@ public final class AgentPoolSecurityProfile implements JsonSerializable<AgentPoo */ private Boolean enableSecureBoot; - /* - * SSH access method of an agent pool. - */ - private AgentPoolSshAccess sshAccess; - /** * Creates an instance of AgentPoolSecurityProfile class. */ public AgentPoolSecurityProfile() { } + /** + * Get the sshAccess property: SSH access method of an agent pool. + * + * @return the sshAccess value. + */ + public AgentPoolSshAccess sshAccess() { + return this.sshAccess; + } + + /** + * Set the sshAccess property: SSH access method of an agent pool. + * + * @param sshAccess the sshAccess value to set. + * @return the AgentPoolSecurityProfile object itself. + */ + public AgentPoolSecurityProfile withSshAccess(AgentPoolSshAccess sshAccess) { + this.sshAccess = sshAccess; + return this; + } + /** * Get the enableVtpm property: vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys * and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the @@ -87,26 +107,6 @@ public AgentPoolSecurityProfile withEnableSecureBoot(Boolean enableSecureBoot) { return this; } - /** - * Get the sshAccess property: SSH access method of an agent pool. - * - * @return the sshAccess value. - */ - public AgentPoolSshAccess sshAccess() { - return this.sshAccess; - } - - /** - * Set the sshAccess property: SSH access method of an agent pool. - * - * @param sshAccess the sshAccess value to set. - * @return the AgentPoolSecurityProfile object itself. - */ - public AgentPoolSecurityProfile withSshAccess(AgentPoolSshAccess sshAccess) { - this.sshAccess = sshAccess; - return this; - } - /** * Validates the instance. * @@ -121,9 +121,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sshAccess", this.sshAccess == null ? null : this.sshAccess.toString()); jsonWriter.writeBooleanField("enableVTPM", this.enableVtpm); jsonWriter.writeBooleanField("enableSecureBoot", this.enableSecureBoot); - jsonWriter.writeStringField("sshAccess", this.sshAccess == null ? null : this.sshAccess.toString()); return jsonWriter.writeEndObject(); } @@ -142,12 +142,12 @@ public static AgentPoolSecurityProfile fromJson(JsonReader jsonReader) throws IO String fieldName = reader.getFieldName(); reader.nextToken(); - if ("enableVTPM".equals(fieldName)) { + if ("sshAccess".equals(fieldName)) { + deserializedAgentPoolSecurityProfile.sshAccess = AgentPoolSshAccess.fromString(reader.getString()); + } else if ("enableVTPM".equals(fieldName)) { deserializedAgentPoolSecurityProfile.enableVtpm = reader.getNullable(JsonReader::getBoolean); } else if ("enableSecureBoot".equals(fieldName)) { deserializedAgentPoolSecurityProfile.enableSecureBoot = reader.getNullable(JsonReader::getBoolean); - } else if ("sshAccess".equals(fieldName)) { - deserializedAgentPoolSecurityProfile.sshAccess = AgentPoolSshAccess.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java index 0a92ae4a7d03..185e09138b60 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java @@ -21,6 +21,11 @@ public final class AgentPoolSshAccess extends ExpandableStringEnum<AgentPoolSshA */ public static final AgentPoolSshAccess DISABLED = fromString("Disabled"); + /** + * Static value EntraId for AgentPoolSshAccess. + */ + public static final AgentPoolSshAccess ENTRA_ID = fromString("EntraId"); + /** * Creates a new instance of AgentPoolSshAccess value. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java index c3644b0dd650..21dbdb159988 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java @@ -27,6 +27,11 @@ public final class AgentPoolUpgradeProfilePropertiesUpgradesItem */ private Boolean isPreview; + /* + * Whether the Kubernetes version is out of support. + */ + private Boolean isOutOfSupport; + /** * Creates an instance of AgentPoolUpgradeProfilePropertiesUpgradesItem class. */ @@ -73,6 +78,26 @@ public AgentPoolUpgradeProfilePropertiesUpgradesItem withIsPreview(Boolean isPre return this; } + /** + * Get the isOutOfSupport property: Whether the Kubernetes version is out of support. + * + * @return the isOutOfSupport value. + */ + public Boolean isOutOfSupport() { + return this.isOutOfSupport; + } + + /** + * Set the isOutOfSupport property: Whether the Kubernetes version is out of support. + * + * @param isOutOfSupport the isOutOfSupport value to set. + * @return the AgentPoolUpgradeProfilePropertiesUpgradesItem object itself. + */ + public AgentPoolUpgradeProfilePropertiesUpgradesItem withIsOutOfSupport(Boolean isOutOfSupport) { + this.isOutOfSupport = isOutOfSupport; + return this; + } + /** * Validates the instance. * @@ -89,6 +114,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); jsonWriter.writeBooleanField("isPreview", this.isPreview); + jsonWriter.writeBooleanField("isOutOfSupport", this.isOutOfSupport); return jsonWriter.writeEndObject(); } @@ -113,6 +139,9 @@ public static AgentPoolUpgradeProfilePropertiesUpgradesItem fromJson(JsonReader } else if ("isPreview".equals(fieldName)) { deserializedAgentPoolUpgradeProfilePropertiesUpgradesItem.isPreview = reader.getNullable(JsonReader::getBoolean); + } else if ("isOutOfSupport".equals(fieldName)) { + deserializedAgentPoolUpgradeProfilePropertiesUpgradesItem.isOutOfSupport + = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java index 4fe15df7ade6..c9fc0c033246 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Settings for upgrading an agentpool. + * Settings for rolling upgrade on an agentpool. */ @Fluent public final class AgentPoolUpgradeSettings implements JsonSerializable<AgentPoolUpgradeSettings> { @@ -25,6 +25,16 @@ public final class AgentPoolUpgradeSettings implements JsonSerializable<AgentPoo */ private String maxSurge; + /* + * This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is + * the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are + * rounded up. If node capacity constraints prevent full surging, AKS would attempt a slower upgrade with fewer + * surge nodes. The upgrade will proceed only if the available surge capacity meets or exceeds minSurge. If minSurge + * not specified, the default is 50% of the maxSurge, for example, if maxSurge = 10%, the default is 5%, if maxSurge + * = 10, the default is 5. + */ + private String minSurge; + /* * The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either * be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage @@ -34,6 +44,16 @@ public final class AgentPoolUpgradeSettings implements JsonSerializable<AgentPoo */ private String maxUnavailable; + /* + * The maximum number or percentage of extra nodes that are allowed to be blocked in the agent pool during an + * upgrade when undrainable node behavior is Cordon. This can either be set to an integer (e.g. '5') or a percentage + * (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the + * upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is maxSurge. This must + * always be greater than or equal to maxSurge. For more information, including best practices, see: + * https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + */ + private String maxBlockedNodes; + /* * The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful * termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, @@ -88,6 +108,36 @@ public AgentPoolUpgradeSettings withMaxSurge(String maxSurge) { return this; } + /** + * Get the minSurge property: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a + * percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For + * percentages, fractional nodes are rounded up. If node capacity constraints prevent full surging, AKS would + * attempt a slower upgrade with fewer surge nodes. The upgrade will proceed only if the available surge capacity + * meets or exceeds minSurge. If minSurge not specified, the default is 50% of the maxSurge, for example, if + * maxSurge = 10%, the default is 5%, if maxSurge = 10, the default is 5. + * + * @return the minSurge value. + */ + public String minSurge() { + return this.minSurge; + } + + /** + * Set the minSurge property: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a + * percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For + * percentages, fractional nodes are rounded up. If node capacity constraints prevent full surging, AKS would + * attempt a slower upgrade with fewer surge nodes. The upgrade will proceed only if the available surge capacity + * meets or exceeds minSurge. If minSurge not specified, the default is 50% of the maxSurge, for example, if + * maxSurge = 10%, the default is 5%, if maxSurge = 10, the default is 5. + * + * @param minSurge the minSurge value to set. + * @return the AgentPoolUpgradeSettings object itself. + */ + public AgentPoolUpgradeSettings withMinSurge(String minSurge) { + this.minSurge = minSurge; + return this; + } + /** * Get the maxUnavailable property: The maximum number or percentage of nodes that can be simultaneously unavailable * during upgrade. This can either be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is @@ -116,6 +166,36 @@ public AgentPoolUpgradeSettings withMaxUnavailable(String maxUnavailable) { return this; } + /** + * Get the maxBlockedNodes property: The maximum number or percentage of extra nodes that are allowed to be blocked + * in the agent pool during an upgrade when undrainable node behavior is Cordon. This can either be set to an + * integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total + * agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, + * the default is maxSurge. This must always be greater than or equal to maxSurge. For more information, including + * best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. + * + * @return the maxBlockedNodes value. + */ + public String maxBlockedNodes() { + return this.maxBlockedNodes; + } + + /** + * Set the maxBlockedNodes property: The maximum number or percentage of extra nodes that are allowed to be blocked + * in the agent pool during an upgrade when undrainable node behavior is Cordon. This can either be set to an + * integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total + * agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, + * the default is maxSurge. This must always be greater than or equal to maxSurge. For more information, including + * best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. + * + * @param maxBlockedNodes the maxBlockedNodes value to set. + * @return the AgentPoolUpgradeSettings object itself. + */ + public AgentPoolUpgradeSettings withMaxBlockedNodes(String maxBlockedNodes) { + this.maxBlockedNodes = maxBlockedNodes; + return this; + } + /** * Get the drainTimeoutInMinutes property: The drain timeout for a node. The amount of time (in minutes) to wait on * eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption @@ -205,7 +285,9 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("maxSurge", this.maxSurge); + jsonWriter.writeStringField("minSurge", this.minSurge); jsonWriter.writeStringField("maxUnavailable", this.maxUnavailable); + jsonWriter.writeStringField("maxBlockedNodes", this.maxBlockedNodes); jsonWriter.writeNumberField("drainTimeoutInMinutes", this.drainTimeoutInMinutes); jsonWriter.writeNumberField("nodeSoakDurationInMinutes", this.nodeSoakDurationInMinutes); jsonWriter.writeStringField("undrainableNodeBehavior", @@ -230,8 +312,12 @@ public static AgentPoolUpgradeSettings fromJson(JsonReader jsonReader) throws IO if ("maxSurge".equals(fieldName)) { deserializedAgentPoolUpgradeSettings.maxSurge = reader.getString(); + } else if ("minSurge".equals(fieldName)) { + deserializedAgentPoolUpgradeSettings.minSurge = reader.getString(); } else if ("maxUnavailable".equals(fieldName)) { deserializedAgentPoolUpgradeSettings.maxUnavailable = reader.getString(); + } else if ("maxBlockedNodes".equals(fieldName)) { + deserializedAgentPoolUpgradeSettings.maxBlockedNodes = reader.getString(); } else if ("drainTimeoutInMinutes".equals(fieldName)) { deserializedAgentPoolUpgradeSettings.drainTimeoutInMinutes = reader.getNullable(JsonReader::getInt); } else if ("nodeSoakDurationInMinutes".equals(fieldName)) { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AutoScaleProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AutoScaleProfile.java new file mode 100644 index 000000000000..bb1452b65b68 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AutoScaleProfile.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifications on auto-scaling. + */ +@Fluent +public final class AutoScaleProfile implements JsonSerializable<AutoScaleProfile> { + /* + * VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' or + * 'Standard_D16s_v5'. + */ + private String size; + + /* + * The minimum number of nodes of the specified sizes. + */ + private Integer minCount; + + /* + * The maximum number of nodes of the specified sizes. + */ + private Integer maxCount; + + /** + * Creates an instance of AutoScaleProfile class. + */ + public AutoScaleProfile() { + } + + /** + * Get the size property: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', + * 'Standard_E16s_v3' or 'Standard_D16s_v5'. + * + * @return the size value. + */ + public String size() { + return this.size; + } + + /** + * Set the size property: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', + * 'Standard_E16s_v3' or 'Standard_D16s_v5'. + * + * @param size the size value to set. + * @return the AutoScaleProfile object itself. + */ + public AutoScaleProfile withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the minCount property: The minimum number of nodes of the specified sizes. + * + * @return the minCount value. + */ + public Integer minCount() { + return this.minCount; + } + + /** + * Set the minCount property: The minimum number of nodes of the specified sizes. + * + * @param minCount the minCount value to set. + * @return the AutoScaleProfile object itself. + */ + public AutoScaleProfile withMinCount(Integer minCount) { + this.minCount = minCount; + return this; + } + + /** + * Get the maxCount property: The maximum number of nodes of the specified sizes. + * + * @return the maxCount value. + */ + public Integer maxCount() { + return this.maxCount; + } + + /** + * Set the maxCount property: The maximum number of nodes of the specified sizes. + * + * @param maxCount the maxCount value to set. + * @return the AutoScaleProfile object itself. + */ + public AutoScaleProfile withMaxCount(Integer maxCount) { + this.maxCount = maxCount; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("size", this.size); + jsonWriter.writeNumberField("minCount", this.minCount); + jsonWriter.writeNumberField("maxCount", this.maxCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AutoScaleProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AutoScaleProfile if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AutoScaleProfile. + */ + public static AutoScaleProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AutoScaleProfile deserializedAutoScaleProfile = new AutoScaleProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedAutoScaleProfile.size = reader.getString(); + } else if ("minCount".equals(fieldName)) { + deserializedAutoScaleProfile.minCount = reader.getNullable(JsonReader::getInt); + } else if ("maxCount".equals(fieldName)) { + deserializedAutoScaleProfile.maxCount = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedAutoScaleProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterServiceLoadBalancerHealthProbeMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterServiceLoadBalancerHealthProbeMode.java new file mode 100644 index 000000000000..876040ab659a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterServiceLoadBalancerHealthProbeMode.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The health probing behavior for External Traffic Policy Cluster services. + */ +public final class ClusterServiceLoadBalancerHealthProbeMode + extends ExpandableStringEnum<ClusterServiceLoadBalancerHealthProbeMode> { + /** + * Static value ServiceNodePort for ClusterServiceLoadBalancerHealthProbeMode. + */ + public static final ClusterServiceLoadBalancerHealthProbeMode SERVICE_NODE_PORT = fromString("ServiceNodePort"); + + /** + * Static value Shared for ClusterServiceLoadBalancerHealthProbeMode. + */ + public static final ClusterServiceLoadBalancerHealthProbeMode SHARED = fromString("Shared"); + + /** + * Creates a new instance of ClusterServiceLoadBalancerHealthProbeMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClusterServiceLoadBalancerHealthProbeMode() { + } + + /** + * Creates or finds a ClusterServiceLoadBalancerHealthProbeMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterServiceLoadBalancerHealthProbeMode. + */ + public static ClusterServiceLoadBalancerHealthProbeMode fromString(String name) { + return fromString(name, ClusterServiceLoadBalancerHealthProbeMode.class); + } + + /** + * Gets known ClusterServiceLoadBalancerHealthProbeMode values. + * + * @return known ClusterServiceLoadBalancerHealthProbeMode values. + */ + public static Collection<ClusterServiceLoadBalancerHealthProbeMode> values() { + return values(ClusterServiceLoadBalancerHealthProbeMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Component.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Component.java new file mode 100644 index 000000000000..377392c379b5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Component.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Component model. + */ +@Fluent +public final class Component implements JsonSerializable<Component> { + /* + * Component name. + */ + private String name; + + /* + * Component version. + */ + private String version; + + /* + * If upgraded component version contains breaking changes from the current version. To see a detailed description + * of what the breaking changes are, visit + * https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking- + * changes-by-version. + */ + private Boolean hasBreakingChanges; + + /** + * Creates an instance of Component class. + */ + public Component() { + } + + /** + * Get the name property: Component name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Component name. + * + * @param name the name value to set. + * @return the Component object itself. + */ + public Component withName(String name) { + this.name = name; + return this; + } + + /** + * Get the version property: Component version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Component version. + * + * @param version the version value to set. + * @return the Component object itself. + */ + public Component withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the hasBreakingChanges property: If upgraded component version contains breaking changes from the current + * version. To see a detailed description of what the breaking changes are, visit + * https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking-changes-by-version. + * + * @return the hasBreakingChanges value. + */ + public Boolean hasBreakingChanges() { + return this.hasBreakingChanges; + } + + /** + * Set the hasBreakingChanges property: If upgraded component version contains breaking changes from the current + * version. To see a detailed description of what the breaking changes are, visit + * https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking-changes-by-version. + * + * @param hasBreakingChanges the hasBreakingChanges value to set. + * @return the Component object itself. + */ + public Component withHasBreakingChanges(Boolean hasBreakingChanges) { + this.hasBreakingChanges = hasBreakingChanges; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeBooleanField("hasBreakingChanges", this.hasBreakingChanges); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Component from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Component if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the Component. + */ + public static Component fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Component deserializedComponent = new Component(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedComponent.name = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedComponent.version = reader.getString(); + } else if ("hasBreakingChanges".equals(fieldName)) { + deserializedComponent.hasBreakingChanges = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedComponent; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ComponentsByRelease.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ComponentsByRelease.java new file mode 100644 index 000000000000..2c734e4fc3d2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ComponentsByRelease.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * components of given Kubernetes version. + */ +@Fluent +public final class ComponentsByRelease implements JsonSerializable<ComponentsByRelease> { + /* + * The Kubernetes version (major.minor). + */ + private String kubernetesVersion; + + /* + * components of current or upgraded Kubernetes version in the cluster. + */ + private List<Component> components; + + /** + * Creates an instance of ComponentsByRelease class. + */ + public ComponentsByRelease() { + } + + /** + * Get the kubernetesVersion property: The Kubernetes version (major.minor). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: The Kubernetes version (major.minor). + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the ComponentsByRelease object itself. + */ + public ComponentsByRelease withKubernetesVersion(String kubernetesVersion) { + this.kubernetesVersion = kubernetesVersion; + return this; + } + + /** + * Get the components property: components of current or upgraded Kubernetes version in the cluster. + * + * @return the components value. + */ + public List<Component> components() { + return this.components; + } + + /** + * Set the components property: components of current or upgraded Kubernetes version in the cluster. + * + * @param components the components value to set. + * @return the ComponentsByRelease object itself. + */ + public ComponentsByRelease withComponents(List<Component> components) { + this.components = components; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (components() != null) { + components().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); + jsonWriter.writeArrayField("components", this.components, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ComponentsByRelease from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ComponentsByRelease if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ComponentsByRelease. + */ + public static ComponentsByRelease fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ComponentsByRelease deserializedComponentsByRelease = new ComponentsByRelease(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kubernetesVersion".equals(fieldName)) { + deserializedComponentsByRelease.kubernetesVersion = reader.getString(); + } else if ("components".equals(fieldName)) { + List<Component> components = reader.readArray(reader1 -> Component.fromJson(reader1)); + deserializedComponentsByRelease.components = components; + } else { + reader.skipChildren(); + } + } + + return deserializedComponentsByRelease; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java index 333f0bcc9ba8..b9b13331df23 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java @@ -23,7 +23,7 @@ public final class ContainerServiceNetworkProfile implements JsonSerializable<Co private NetworkPlugin networkPlugin; /* - * The mode the network plugin should use. + * Network plugin mode used for building the Kubernetes network. */ private NetworkPluginMode networkPluginMode; @@ -43,12 +43,6 @@ public final class ContainerServiceNetworkProfile implements JsonSerializable<Co */ private NetworkDataplane networkDataplane; - /* - * Advanced Networking profile for enabling observability and security feature suite on a cluster. For more - * information see aka.ms/aksadvancednetworking. - */ - private AdvancedNetworking advancedNetworking; - /* * A CIDR notation IP range from which to assign pod IPs when kubenet is used. */ @@ -114,6 +108,25 @@ public final class ContainerServiceNetworkProfile implements JsonSerializable<Co */ private List<IpFamily> ipFamilies; + /* + * Defines access to special link local addresses (Azure Instance Metadata Service, aka IMDS) for pods with + * hostNetwork=false. if not specified, the default is 'IMDS'. + */ + private PodLinkLocalAccess podLinkLocalAccess; + + /* + * Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting + * behavior. See https://v<version>.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where + * <version> is represented by a <major version>-<minor version> string. Kubernetes version 1.23 would be '1-23'. + */ + private ContainerServiceNetworkProfileKubeProxyConfig kubeProxyConfig; + + /* + * Advanced Networking profile for enabling observability and security feature suite on a cluster. For more + * information see aka.ms/aksadvancednetworking. + */ + private AdvancedNetworking advancedNetworking; + /** * Creates an instance of ContainerServiceNetworkProfile class. */ @@ -141,7 +154,7 @@ public ContainerServiceNetworkProfile withNetworkPlugin(NetworkPlugin networkPlu } /** - * Get the networkPluginMode property: The mode the network plugin should use. + * Get the networkPluginMode property: Network plugin mode used for building the Kubernetes network. * * @return the networkPluginMode value. */ @@ -150,7 +163,7 @@ public NetworkPluginMode networkPluginMode() { } /** - * Set the networkPluginMode property: The mode the network plugin should use. + * Set the networkPluginMode property: Network plugin mode used for building the Kubernetes network. * * @param networkPluginMode the networkPluginMode value to set. * @return the ContainerServiceNetworkProfile object itself. @@ -222,28 +235,6 @@ public ContainerServiceNetworkProfile withNetworkDataplane(NetworkDataplane netw return this; } - /** - * Get the advancedNetworking property: Advanced Networking profile for enabling observability and security feature - * suite on a cluster. For more information see aka.ms/aksadvancednetworking. - * - * @return the advancedNetworking value. - */ - public AdvancedNetworking advancedNetworking() { - return this.advancedNetworking; - } - - /** - * Set the advancedNetworking property: Advanced Networking profile for enabling observability and security feature - * suite on a cluster. For more information see aka.ms/aksadvancednetworking. - * - * @param advancedNetworking the advancedNetworking value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withAdvancedNetworking(AdvancedNetworking advancedNetworking) { - this.advancedNetworking = advancedNetworking; - return this; - } - /** * Get the podCidr property: A CIDR notation IP range from which to assign pod IPs when kubenet is used. * @@ -492,15 +483,85 @@ public ContainerServiceNetworkProfile withIpFamilies(List<IpFamily> ipFamilies) return this; } + /** + * Get the podLinkLocalAccess property: Defines access to special link local addresses (Azure Instance Metadata + * Service, aka IMDS) for pods with hostNetwork=false. if not specified, the default is 'IMDS'. + * + * @return the podLinkLocalAccess value. + */ + public PodLinkLocalAccess podLinkLocalAccess() { + return this.podLinkLocalAccess; + } + + /** + * Set the podLinkLocalAccess property: Defines access to special link local addresses (Azure Instance Metadata + * Service, aka IMDS) for pods with hostNetwork=false. if not specified, the default is 'IMDS'. + * + * @param podLinkLocalAccess the podLinkLocalAccess value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withPodLinkLocalAccess(PodLinkLocalAccess podLinkLocalAccess) { + this.podLinkLocalAccess = podLinkLocalAccess; + return this; + } + + /** + * Get the kubeProxyConfig property: Holds configuration customizations for kube-proxy. Any values not defined will + * use the kube-proxy defaulting behavior. See + * https://v<version>.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where + * <version> is represented by a <major version>-<minor version> string. Kubernetes version 1.23 + * would be '1-23'. + * + * @return the kubeProxyConfig value. + */ + public ContainerServiceNetworkProfileKubeProxyConfig kubeProxyConfig() { + return this.kubeProxyConfig; + } + + /** + * Set the kubeProxyConfig property: Holds configuration customizations for kube-proxy. Any values not defined will + * use the kube-proxy defaulting behavior. See + * https://v<version>.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where + * <version> is represented by a <major version>-<minor version> string. Kubernetes version 1.23 + * would be '1-23'. + * + * @param kubeProxyConfig the kubeProxyConfig value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile + withKubeProxyConfig(ContainerServiceNetworkProfileKubeProxyConfig kubeProxyConfig) { + this.kubeProxyConfig = kubeProxyConfig; + return this; + } + + /** + * Get the advancedNetworking property: Advanced Networking profile for enabling observability and security feature + * suite on a cluster. For more information see aka.ms/aksadvancednetworking. + * + * @return the advancedNetworking value. + */ + public AdvancedNetworking advancedNetworking() { + return this.advancedNetworking; + } + + /** + * Set the advancedNetworking property: Advanced Networking profile for enabling observability and security feature + * suite on a cluster. For more information see aka.ms/aksadvancednetworking. + * + * @param advancedNetworking the advancedNetworking value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withAdvancedNetworking(AdvancedNetworking advancedNetworking) { + this.advancedNetworking = advancedNetworking; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (advancedNetworking() != null) { - advancedNetworking().validate(); - } if (loadBalancerProfile() != null) { loadBalancerProfile().validate(); } @@ -510,6 +571,12 @@ public void validate() { if (staticEgressGatewayProfile() != null) { staticEgressGatewayProfile().validate(); } + if (kubeProxyConfig() != null) { + kubeProxyConfig().validate(); + } + if (advancedNetworking() != null) { + advancedNetworking().validate(); + } } /** @@ -525,7 +592,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("networkMode", this.networkMode == null ? null : this.networkMode.toString()); jsonWriter.writeStringField("networkDataplane", this.networkDataplane == null ? null : this.networkDataplane.toString()); - jsonWriter.writeJsonField("advancedNetworking", this.advancedNetworking); jsonWriter.writeStringField("podCidr", this.podCidr); jsonWriter.writeStringField("serviceCidr", this.serviceCidr); jsonWriter.writeStringField("dnsServiceIP", this.dnsServiceIp); @@ -539,6 +605,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("serviceCidrs", this.serviceCidrs, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("ipFamilies", this.ipFamilies, (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeStringField("podLinkLocalAccess", + this.podLinkLocalAccess == null ? null : this.podLinkLocalAccess.toString()); + jsonWriter.writeJsonField("kubeProxyConfig", this.kubeProxyConfig); + jsonWriter.writeJsonField("advancedNetworking", this.advancedNetworking); return jsonWriter.writeEndObject(); } @@ -572,8 +642,6 @@ public static ContainerServiceNetworkProfile fromJson(JsonReader jsonReader) thr } else if ("networkDataplane".equals(fieldName)) { deserializedContainerServiceNetworkProfile.networkDataplane = NetworkDataplane.fromString(reader.getString()); - } else if ("advancedNetworking".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.advancedNetworking = AdvancedNetworking.fromJson(reader); } else if ("podCidr".equals(fieldName)) { deserializedContainerServiceNetworkProfile.podCidr = reader.getString(); } else if ("serviceCidr".equals(fieldName)) { @@ -604,6 +672,14 @@ public static ContainerServiceNetworkProfile fromJson(JsonReader jsonReader) thr } else if ("ipFamilies".equals(fieldName)) { List<IpFamily> ipFamilies = reader.readArray(reader1 -> IpFamily.fromString(reader1.getString())); deserializedContainerServiceNetworkProfile.ipFamilies = ipFamilies; + } else if ("podLinkLocalAccess".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.podLinkLocalAccess + = PodLinkLocalAccess.fromString(reader.getString()); + } else if ("kubeProxyConfig".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.kubeProxyConfig + = ContainerServiceNetworkProfileKubeProxyConfig.fromJson(reader); + } else if ("advancedNetworking".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.advancedNetworking = AdvancedNetworking.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfig.java new file mode 100644 index 000000000000..17febf1880ab --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfig.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting + * behavior. See https://v<version>.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + * where <version> is represented by a <major version>-<minor version> string. Kubernetes version 1.23 + * would be '1-23'. + */ +@Fluent +public final class ContainerServiceNetworkProfileKubeProxyConfig + implements JsonSerializable<ContainerServiceNetworkProfileKubeProxyConfig> { + /* + * Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by + * default without these customizations). + */ + private Boolean enabled; + + /* + * Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES') + */ + private Mode mode; + + /* + * Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. + */ + private ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig ipvsConfig; + + /** + * Creates an instance of ContainerServiceNetworkProfileKubeProxyConfig class. + */ + public ContainerServiceNetworkProfileKubeProxyConfig() { + } + + /** + * Get the enabled property: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, + * kube-proxy is enabled in AKS by default without these customizations). + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, + * kube-proxy is enabled in AKS by default without these customizations). + * + * @param enabled the enabled value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfig withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the mode property: Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). + * + * @return the mode value. + */ + public Mode mode() { + return this.mode; + } + + /** + * Set the mode property: Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). + * + * @param mode the mode value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfig withMode(Mode mode) { + this.mode = mode; + return this; + } + + /** + * Get the ipvsConfig property: Holds configuration customizations for IPVS. May only be specified if 'mode' is set + * to 'IPVS'. + * + * @return the ipvsConfig value. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig ipvsConfig() { + return this.ipvsConfig; + } + + /** + * Set the ipvsConfig property: Holds configuration customizations for IPVS. May only be specified if 'mode' is set + * to 'IPVS'. + * + * @param ipvsConfig the ipvsConfig value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfig + withIpvsConfig(ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig ipvsConfig) { + this.ipvsConfig = ipvsConfig; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ipvsConfig() != null) { + ipvsConfig().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeJsonField("ipvsConfig", this.ipvsConfig); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ContainerServiceNetworkProfileKubeProxyConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContainerServiceNetworkProfileKubeProxyConfig if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ContainerServiceNetworkProfileKubeProxyConfig. + */ + public static ContainerServiceNetworkProfileKubeProxyConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ContainerServiceNetworkProfileKubeProxyConfig deserializedContainerServiceNetworkProfileKubeProxyConfig + = new ContainerServiceNetworkProfileKubeProxyConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfig.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("mode".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfig.mode + = Mode.fromString(reader.getString()); + } else if ("ipvsConfig".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfig.ipvsConfig + = ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedContainerServiceNetworkProfileKubeProxyConfig; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java new file mode 100644 index 000000000000..6a626ffea889 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. + */ +@Fluent +public final class ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + implements JsonSerializable<ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig> { + /* + * IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. + */ + private IpvsScheduler scheduler; + + /* + * The timeout value used for idle IPVS TCP sessions in seconds. Must be a positive integer value. + */ + private Integer tcpTimeoutSeconds; + + /* + * The timeout value used for IPVS TCP sessions after receiving a FIN in seconds. Must be a positive integer value. + */ + private Integer tcpFinTimeoutSeconds; + + /* + * The timeout value used for IPVS UDP packets in seconds. Must be a positive integer value. + */ + private Integer udpTimeoutSeconds; + + /** + * Creates an instance of ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig class. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig() { + } + + /** + * Get the scheduler property: IPVS scheduler, for more information please see + * http://www.linuxvirtualserver.org/docs/scheduling.html. + * + * @return the scheduler value. + */ + public IpvsScheduler scheduler() { + return this.scheduler; + } + + /** + * Set the scheduler property: IPVS scheduler, for more information please see + * http://www.linuxvirtualserver.org/docs/scheduling.html. + * + * @param scheduler the scheduler value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig withScheduler(IpvsScheduler scheduler) { + this.scheduler = scheduler; + return this; + } + + /** + * Get the tcpTimeoutSeconds property: The timeout value used for idle IPVS TCP sessions in seconds. Must be a + * positive integer value. + * + * @return the tcpTimeoutSeconds value. + */ + public Integer tcpTimeoutSeconds() { + return this.tcpTimeoutSeconds; + } + + /** + * Set the tcpTimeoutSeconds property: The timeout value used for idle IPVS TCP sessions in seconds. Must be a + * positive integer value. + * + * @param tcpTimeoutSeconds the tcpTimeoutSeconds value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig withTcpTimeoutSeconds(Integer tcpTimeoutSeconds) { + this.tcpTimeoutSeconds = tcpTimeoutSeconds; + return this; + } + + /** + * Get the tcpFinTimeoutSeconds property: The timeout value used for IPVS TCP sessions after receiving a FIN in + * seconds. Must be a positive integer value. + * + * @return the tcpFinTimeoutSeconds value. + */ + public Integer tcpFinTimeoutSeconds() { + return this.tcpFinTimeoutSeconds; + } + + /** + * Set the tcpFinTimeoutSeconds property: The timeout value used for IPVS TCP sessions after receiving a FIN in + * seconds. Must be a positive integer value. + * + * @param tcpFinTimeoutSeconds the tcpFinTimeoutSeconds value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + withTcpFinTimeoutSeconds(Integer tcpFinTimeoutSeconds) { + this.tcpFinTimeoutSeconds = tcpFinTimeoutSeconds; + return this; + } + + /** + * Get the udpTimeoutSeconds property: The timeout value used for IPVS UDP packets in seconds. Must be a positive + * integer value. + * + * @return the udpTimeoutSeconds value. + */ + public Integer udpTimeoutSeconds() { + return this.udpTimeoutSeconds; + } + + /** + * Set the udpTimeoutSeconds property: The timeout value used for IPVS UDP packets in seconds. Must be a positive + * integer value. + * + * @param udpTimeoutSeconds the udpTimeoutSeconds value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig withUdpTimeoutSeconds(Integer udpTimeoutSeconds) { + this.udpTimeoutSeconds = udpTimeoutSeconds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("scheduler", this.scheduler == null ? null : this.scheduler.toString()); + jsonWriter.writeNumberField("tcpTimeoutSeconds", this.tcpTimeoutSeconds); + jsonWriter.writeNumberField("tcpFinTimeoutSeconds", this.tcpFinTimeoutSeconds); + jsonWriter.writeNumberField("udpTimeoutSeconds", this.udpTimeoutSeconds); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig if the JsonReader was pointing to + * an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig. + */ + public static ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + = new ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scheduler".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.scheduler + = IpvsScheduler.fromString(reader.getString()); + } else if ("tcpTimeoutSeconds".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.tcpTimeoutSeconds + = reader.getNullable(JsonReader::getInt); + } else if ("tcpFinTimeoutSeconds".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.tcpFinTimeoutSeconds + = reader.getNullable(JsonReader::getInt); + } else if ("udpTimeoutSeconds".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.udpTimeoutSeconds + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriftAction.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriftAction.java new file mode 100644 index 000000000000..19e1aa682e34 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriftAction.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The drift action of the machine. Indicates whether a machine has deviated from its expected state due to changes in + * managed cluster properties, requiring corrective action. + */ +public final class DriftAction extends ExpandableStringEnum<DriftAction> { + /** + * Static value Synced for DriftAction. + */ + public static final DriftAction SYNCED = fromString("Synced"); + + /** + * Static value Recreate for DriftAction. + */ + public static final DriftAction RECREATE = fromString("Recreate"); + + /** + * Creates a new instance of DriftAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DriftAction() { + } + + /** + * Creates or finds a DriftAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding DriftAction. + */ + public static DriftAction fromString(String name) { + return fromString(name, DriftAction.class); + } + + /** + * Gets known DriftAction values. + * + * @return known DriftAction values. + */ + public static Collection<DriftAction> values() { + return values(DriftAction.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriverType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriverType.java new file mode 100644 index 000000000000..0ab2856f2d4c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriverType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specify the type of GPU driver to install when creating Windows agent pools. If not provided, AKS selects the driver + * based on system compatibility. This cannot be changed once the AgentPool has been created. This cannot be set on + * Linux AgentPools. For Linux AgentPools, the driver is selected based on system compatibility. + */ +public final class DriverType extends ExpandableStringEnum<DriverType> { + /** + * Static value GRID for DriverType. + */ + public static final DriverType GRID = fromString("GRID"); + + /** + * Static value CUDA for DriverType. + */ + public static final DriverType CUDA = fromString("CUDA"); + + /** + * Creates a new instance of DriverType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DriverType() { + } + + /** + * Creates or finds a DriverType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DriverType. + */ + public static DriverType fromString(String name) { + return fromString(name, DriverType.class); + } + + /** + * Gets known DriverType values. + * + * @return known DriverType values. + */ + public static Collection<DriverType> values() { + return values(DriverType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java index 83dd030aabe6..0c2abaef4d28 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java @@ -12,7 +12,7 @@ import java.io.IOException; /** - * GPU settings for the Agent Pool. + * The GpuProfile model. */ @Fluent public final class GpuProfile implements JsonSerializable<GpuProfile> { @@ -21,6 +21,13 @@ public final class GpuProfile implements JsonSerializable<GpuProfile> { */ private GpuDriver driver; + /* + * Specify the type of GPU driver to install when creating Windows agent pools. If not provided, AKS selects the + * driver based on system compatibility. This cannot be changed once the AgentPool has been created. This cannot be + * set on Linux AgentPools. For Linux AgentPools, the driver is selected based on system compatibility. + */ + private DriverType driverType; + /** * Creates an instance of GpuProfile class. */ @@ -47,6 +54,32 @@ public GpuProfile withDriver(GpuDriver driver) { return this; } + /** + * Get the driverType property: Specify the type of GPU driver to install when creating Windows agent pools. If not + * provided, AKS selects the driver based on system compatibility. This cannot be changed once the AgentPool has + * been created. This cannot be set on Linux AgentPools. For Linux AgentPools, the driver is selected based on + * system compatibility. + * + * @return the driverType value. + */ + public DriverType driverType() { + return this.driverType; + } + + /** + * Set the driverType property: Specify the type of GPU driver to install when creating Windows agent pools. If not + * provided, AKS selects the driver based on system compatibility. This cannot be changed once the AgentPool has + * been created. This cannot be set on Linux AgentPools. For Linux AgentPools, the driver is selected based on + * system compatibility. + * + * @param driverType the driverType value to set. + * @return the GpuProfile object itself. + */ + public GpuProfile withDriverType(DriverType driverType) { + this.driverType = driverType; + return this; + } + /** * Validates the instance. * @@ -62,6 +95,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("driver", this.driver == null ? null : this.driver.toString()); + jsonWriter.writeStringField("driverType", this.driverType == null ? null : this.driverType.toString()); return jsonWriter.writeEndObject(); } @@ -82,6 +116,8 @@ public static GpuProfile fromJson(JsonReader jsonReader) throws IOException { if ("driver".equals(fieldName)) { deserializedGpuProfile.driver = GpuDriver.fromString(reader.getString()); + } else if ("driverType".equals(fieldName)) { + deserializedGpuProfile.driverType = DriverType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsList.java new file mode 100644 index 000000000000..d1aa02d9846b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsList.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.GuardrailsAvailableVersionInner; +import java.io.IOException; +import java.util.List; + +/** + * Hold values properties, which is array of GuardrailsVersions. + */ +@Fluent +public final class GuardrailsAvailableVersionsList implements JsonSerializable<GuardrailsAvailableVersionsList> { + /* + * Array of AKS supported Guardrails versions. + */ + private List<GuardrailsAvailableVersionInner> value; + + /* + * The URL to get the next Guardrails available version. + */ + private String nextLink; + + /** + * Creates an instance of GuardrailsAvailableVersionsList class. + */ + public GuardrailsAvailableVersionsList() { + } + + /** + * Get the value property: Array of AKS supported Guardrails versions. + * + * @return the value value. + */ + public List<GuardrailsAvailableVersionInner> value() { + return this.value; + } + + /** + * Set the value property: Array of AKS supported Guardrails versions. + * + * @param value the value value to set. + * @return the GuardrailsAvailableVersionsList object itself. + */ + public GuardrailsAvailableVersionsList withValue(List<GuardrailsAvailableVersionInner> value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next Guardrails available version. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GuardrailsAvailableVersionsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GuardrailsAvailableVersionsList if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GuardrailsAvailableVersionsList. + */ + public static GuardrailsAvailableVersionsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GuardrailsAvailableVersionsList deserializedGuardrailsAvailableVersionsList + = new GuardrailsAvailableVersionsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<GuardrailsAvailableVersionInner> value + = reader.readArray(reader1 -> GuardrailsAvailableVersionInner.fromJson(reader1)); + deserializedGuardrailsAvailableVersionsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedGuardrailsAvailableVersionsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGuardrailsAvailableVersionsList; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsProperties.java new file mode 100644 index 000000000000..11df96a784bb --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsProperties.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Whether the version is default or not and support info. + */ +@Immutable +public final class GuardrailsAvailableVersionsProperties + implements JsonSerializable<GuardrailsAvailableVersionsProperties> { + /* + * The isDefaultVersion property. + */ + private Boolean isDefaultVersion; + + /* + * Whether the version is preview or stable. + */ + private GuardrailsSupport support; + + /** + * Creates an instance of GuardrailsAvailableVersionsProperties class. + */ + public GuardrailsAvailableVersionsProperties() { + } + + /** + * Get the isDefaultVersion property: The isDefaultVersion property. + * + * @return the isDefaultVersion value. + */ + public Boolean isDefaultVersion() { + return this.isDefaultVersion; + } + + /** + * Get the support property: Whether the version is preview or stable. + * + * @return the support value. + */ + public GuardrailsSupport support() { + return this.support; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GuardrailsAvailableVersionsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GuardrailsAvailableVersionsProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GuardrailsAvailableVersionsProperties. + */ + public static GuardrailsAvailableVersionsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GuardrailsAvailableVersionsProperties deserializedGuardrailsAvailableVersionsProperties + = new GuardrailsAvailableVersionsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isDefaultVersion".equals(fieldName)) { + deserializedGuardrailsAvailableVersionsProperties.isDefaultVersion + = reader.getNullable(JsonReader::getBoolean); + } else if ("support".equals(fieldName)) { + deserializedGuardrailsAvailableVersionsProperties.support + = GuardrailsSupport.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedGuardrailsAvailableVersionsProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsSupport.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsSupport.java new file mode 100644 index 000000000000..bdd969c4bfc0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsSupport.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.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether the version is preview or stable. + */ +public final class GuardrailsSupport extends ExpandableStringEnum<GuardrailsSupport> { + /** + * Static value Preview for GuardrailsSupport. + */ + public static final GuardrailsSupport PREVIEW = fromString("Preview"); + + /** + * Static value Stable for GuardrailsSupport. + */ + public static final GuardrailsSupport STABLE = fromString("Stable"); + + /** + * Creates a new instance of GuardrailsSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GuardrailsSupport() { + } + + /** + * Creates or finds a GuardrailsSupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding GuardrailsSupport. + */ + public static GuardrailsSupport fromString(String name) { + return fromString(name, GuardrailsSupport.class); + } + + /** + * Gets known GuardrailsSupport values. + * + * @return known GuardrailsSupport values. + */ + public static Collection<GuardrailsSupport> values() { + return values(GuardrailsSupport.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingListResult.java new file mode 100644 index 000000000000..974a7b23f9ad --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingListResult.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.IdentityBindingInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a IdentityBinding list operation. + */ +@Fluent +public final class IdentityBindingListResult implements JsonSerializable<IdentityBindingListResult> { + /* + * The IdentityBinding items on this page + */ + private List<IdentityBindingInner> value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of IdentityBindingListResult class. + */ + public IdentityBindingListResult() { + } + + /** + * Get the value property: The IdentityBinding items on this page. + * + * @return the value value. + */ + public List<IdentityBindingInner> value() { + return this.value; + } + + /** + * Set the value property: The IdentityBinding items on this page. + * + * @param value the value value to set. + * @return the IdentityBindingListResult object itself. + */ + public IdentityBindingListResult withValue(List<IdentityBindingInner> value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the IdentityBindingListResult object itself. + */ + public IdentityBindingListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model IdentityBindingListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IdentityBindingListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentityBindingListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityBindingListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IdentityBindingListResult. + */ + public static IdentityBindingListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityBindingListResult deserializedIdentityBindingListResult = new IdentityBindingListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<IdentityBindingInner> value + = reader.readArray(reader1 -> IdentityBindingInner.fromJson(reader1)); + deserializedIdentityBindingListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedIdentityBindingListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityBindingListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingManagedIdentityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingManagedIdentityProfile.java new file mode 100644 index 000000000000..5171bc2b615f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingManagedIdentityProfile.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Managed identity profile for the identity binding. + */ +@Fluent +public final class IdentityBindingManagedIdentityProfile + implements JsonSerializable<IdentityBindingManagedIdentityProfile> { + /* + * The resource ID of the managed identity. + */ + private String resourceId; + + /* + * The object ID of the managed identity. + */ + private String objectId; + + /* + * The client ID of the managed identity. + */ + private String clientId; + + /* + * The tenant ID of the managed identity. + */ + private String tenantId; + + /** + * Creates an instance of IdentityBindingManagedIdentityProfile class. + */ + public IdentityBindingManagedIdentityProfile() { + } + + /** + * Get the resourceId property: The resource ID of the managed identity. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The resource ID of the managed identity. + * + * @param resourceId the resourceId value to set. + * @return the IdentityBindingManagedIdentityProfile object itself. + */ + public IdentityBindingManagedIdentityProfile withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the objectId property: The object ID of the managed identity. + * + * @return the objectId value. + */ + public String objectId() { + return this.objectId; + } + + /** + * Get the clientId property: The client ID of the managed identity. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Get the tenantId property: The tenant ID of the managed identity. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resourceId in model IdentityBindingManagedIdentityProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IdentityBindingManagedIdentityProfile.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentityBindingManagedIdentityProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityBindingManagedIdentityProfile if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IdentityBindingManagedIdentityProfile. + */ + public static IdentityBindingManagedIdentityProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityBindingManagedIdentityProfile deserializedIdentityBindingManagedIdentityProfile + = new IdentityBindingManagedIdentityProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedIdentityBindingManagedIdentityProfile.resourceId = reader.getString(); + } else if ("objectId".equals(fieldName)) { + deserializedIdentityBindingManagedIdentityProfile.objectId = reader.getString(); + } else if ("clientId".equals(fieldName)) { + deserializedIdentityBindingManagedIdentityProfile.clientId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedIdentityBindingManagedIdentityProfile.tenantId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityBindingManagedIdentityProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingOidcIssuerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingOidcIssuerProfile.java new file mode 100644 index 000000000000..12ad4215b8f6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingOidcIssuerProfile.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * IdentityBinding OIDC issuer profile. + */ +@Immutable +public final class IdentityBindingOidcIssuerProfile implements JsonSerializable<IdentityBindingOidcIssuerProfile> { + /* + * The OIDC issuer URL of the IdentityBinding. + */ + private String oidcIssuerUrl; + + /** + * Creates an instance of IdentityBindingOidcIssuerProfile class. + */ + public IdentityBindingOidcIssuerProfile() { + } + + /** + * Get the oidcIssuerUrl property: The OIDC issuer URL of the IdentityBinding. + * + * @return the oidcIssuerUrl value. + */ + public String oidcIssuerUrl() { + return this.oidcIssuerUrl; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentityBindingOidcIssuerProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityBindingOidcIssuerProfile if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the IdentityBindingOidcIssuerProfile. + */ + public static IdentityBindingOidcIssuerProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityBindingOidcIssuerProfile deserializedIdentityBindingOidcIssuerProfile + = new IdentityBindingOidcIssuerProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("oidcIssuerUrl".equals(fieldName)) { + deserializedIdentityBindingOidcIssuerProfile.oidcIssuerUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityBindingOidcIssuerProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java new file mode 100644 index 000000000000..e10fa1bce2cc --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * IdentityBinding properties. + */ +@Fluent +public final class IdentityBindingProperties implements JsonSerializable<IdentityBindingProperties> { + /* + * Managed identity profile for the identity binding. + */ + private IdentityBindingManagedIdentityProfile managedIdentity; + + /* + * The OIDC issuer URL of the IdentityBinding. + */ + private IdentityBindingOidcIssuerProfile oidcIssuer; + + /* + * The status of the last operation. + */ + private IdentityBindingProvisioningState provisioningState; + + /** + * Creates an instance of IdentityBindingProperties class. + */ + public IdentityBindingProperties() { + } + + /** + * Get the managedIdentity property: Managed identity profile for the identity binding. + * + * @return the managedIdentity value. + */ + public IdentityBindingManagedIdentityProfile managedIdentity() { + return this.managedIdentity; + } + + /** + * Set the managedIdentity property: Managed identity profile for the identity binding. + * + * @param managedIdentity the managedIdentity value to set. + * @return the IdentityBindingProperties object itself. + */ + public IdentityBindingProperties withManagedIdentity(IdentityBindingManagedIdentityProfile managedIdentity) { + this.managedIdentity = managedIdentity; + return this; + } + + /** + * Get the oidcIssuer property: The OIDC issuer URL of the IdentityBinding. + * + * @return the oidcIssuer value. + */ + public IdentityBindingOidcIssuerProfile oidcIssuer() { + return this.oidcIssuer; + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public IdentityBindingProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (managedIdentity() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property managedIdentity in model IdentityBindingProperties")); + } else { + managedIdentity().validate(); + } + if (oidcIssuer() != null) { + oidcIssuer().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IdentityBindingProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("managedIdentity", this.managedIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentityBindingProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityBindingProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IdentityBindingProperties. + */ + public static IdentityBindingProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityBindingProperties deserializedIdentityBindingProperties = new IdentityBindingProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("managedIdentity".equals(fieldName)) { + deserializedIdentityBindingProperties.managedIdentity + = IdentityBindingManagedIdentityProfile.fromJson(reader); + } else if ("oidcIssuer".equals(fieldName)) { + deserializedIdentityBindingProperties.oidcIssuer + = IdentityBindingOidcIssuerProfile.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedIdentityBindingProperties.provisioningState + = IdentityBindingProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityBindingProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProvisioningState.java new file mode 100644 index 000000000000..5f5494ac523c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The provisioning state of the last accepted operation. + */ +public final class IdentityBindingProvisioningState extends ExpandableStringEnum<IdentityBindingProvisioningState> { + /** + * Static value Succeeded for IdentityBindingProvisioningState. + */ + public static final IdentityBindingProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for IdentityBindingProvisioningState. + */ + public static final IdentityBindingProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for IdentityBindingProvisioningState. + */ + public static final IdentityBindingProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Creating for IdentityBindingProvisioningState. + */ + public static final IdentityBindingProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Updating for IdentityBindingProvisioningState. + */ + public static final IdentityBindingProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for IdentityBindingProvisioningState. + */ + public static final IdentityBindingProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of IdentityBindingProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IdentityBindingProvisioningState() { + } + + /** + * Creates or finds a IdentityBindingProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding IdentityBindingProvisioningState. + */ + public static IdentityBindingProvisioningState fromString(String name) { + return fromString(name, IdentityBindingProvisioningState.class); + } + + /** + * Gets known IdentityBindingProvisioningState values. + * + * @return known IdentityBindingProvisioningState values. + */ + public static Collection<IdentityBindingProvisioningState> values() { + return values(IdentityBindingProvisioningState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/InfrastructureEncryption.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/InfrastructureEncryption.java new file mode 100644 index 000000000000..c92e56b6341e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/InfrastructureEncryption.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether to enable encryption at rest of Kubernetes resource objects using service-managed keys. More information on + * this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. + */ +public final class InfrastructureEncryption extends ExpandableStringEnum<InfrastructureEncryption> { + /** + * Static value Enabled for InfrastructureEncryption. + */ + public static final InfrastructureEncryption ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for InfrastructureEncryption. + */ + public static final InfrastructureEncryption DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of InfrastructureEncryption value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InfrastructureEncryption() { + } + + /** + * Creates or finds a InfrastructureEncryption from its string representation. + * + * @param name a name to look for. + * @return the corresponding InfrastructureEncryption. + */ + public static InfrastructureEncryption fromString(String name) { + return fromString(name, InfrastructureEncryption.class); + } + + /** + * Gets known InfrastructureEncryption values. + * + * @return known InfrastructureEncryption values. + */ + public static Collection<InfrastructureEncryption> values() { + return values(InfrastructureEncryption.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java index 60e8215db582..e780c371e177 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The IP version to use for cluster networking and IP assignment. + * To determine if address belongs IPv4 or IPv6 family. */ public final class IpFamily extends ExpandableStringEnum<IpFamily> { /** diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpvsScheduler.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpvsScheduler.java new file mode 100644 index 000000000000..34ecb3f572ba --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpvsScheduler.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. + */ +public final class IpvsScheduler extends ExpandableStringEnum<IpvsScheduler> { + /** + * Static value RoundRobin for IpvsScheduler. + */ + public static final IpvsScheduler ROUND_ROBIN = fromString("RoundRobin"); + + /** + * Static value LeastConnection for IpvsScheduler. + */ + public static final IpvsScheduler LEAST_CONNECTION = fromString("LeastConnection"); + + /** + * Creates a new instance of IpvsScheduler value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IpvsScheduler() { + } + + /** + * Creates or finds a IpvsScheduler from its string representation. + * + * @param name a name to look for. + * @return the corresponding IpvsScheduler. + */ + public static IpvsScheduler fromString(String name) { + return fromString(name, IpvsScheduler.class); + } + + /** + * Gets known IpvsScheduler values. + * + * @return known IpvsScheduler values. + */ + public static Collection<IpvsScheduler> values() { + return values(IpvsScheduler.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java index 0dc7eb7ddb66..d43de4400145 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java @@ -27,6 +27,11 @@ public final class IstioComponents implements JsonSerializable<IstioComponents> */ private List<IstioEgressGateway> egressGateways; + /* + * Mode of traffic redirection. + */ + private ProxyRedirectionMechanism proxyRedirectionMechanism; + /** * Creates an instance of IstioComponents class. */ @@ -73,6 +78,26 @@ public IstioComponents withEgressGateways(List<IstioEgressGateway> egressGateway return this; } + /** + * Get the proxyRedirectionMechanism property: Mode of traffic redirection. + * + * @return the proxyRedirectionMechanism value. + */ + public ProxyRedirectionMechanism proxyRedirectionMechanism() { + return this.proxyRedirectionMechanism; + } + + /** + * Set the proxyRedirectionMechanism property: Mode of traffic redirection. + * + * @param proxyRedirectionMechanism the proxyRedirectionMechanism value to set. + * @return the IstioComponents object itself. + */ + public IstioComponents withProxyRedirectionMechanism(ProxyRedirectionMechanism proxyRedirectionMechanism) { + this.proxyRedirectionMechanism = proxyRedirectionMechanism; + return this; + } + /** * Validates the instance. * @@ -97,6 +122,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("egressGateways", this.egressGateways, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("proxyRedirectionMechanism", + this.proxyRedirectionMechanism == null ? null : this.proxyRedirectionMechanism.toString()); return jsonWriter.writeEndObject(); } @@ -123,6 +150,9 @@ public static IstioComponents fromJson(JsonReader jsonReader) throws IOException List<IstioEgressGateway> egressGateways = reader.readArray(reader1 -> IstioEgressGateway.fromJson(reader1)); deserializedIstioComponents.egressGateways = egressGateways; + } else if ("proxyRedirectionMechanism".equals(fieldName)) { + deserializedIstioComponents.proxyRedirectionMechanism + = ProxyRedirectionMechanism.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorClaimMappingExpression.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorClaimMappingExpression.java new file mode 100644 index 000000000000..e4d10995f864 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorClaimMappingExpression.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The claim mapping expression for JWTAuthenticator. + */ +@Fluent +public final class JwtAuthenticatorClaimMappingExpression + implements JsonSerializable<JwtAuthenticatorClaimMappingExpression> { + /* + * The CEL expression used to access token claims. + */ + private String expression; + + /** + * Creates an instance of JwtAuthenticatorClaimMappingExpression class. + */ + public JwtAuthenticatorClaimMappingExpression() { + } + + /** + * Get the expression property: The CEL expression used to access token claims. + * + * @return the expression value. + */ + public String expression() { + return this.expression; + } + + /** + * Set the expression property: The CEL expression used to access token claims. + * + * @param expression the expression value to set. + * @return the JwtAuthenticatorClaimMappingExpression object itself. + */ + public JwtAuthenticatorClaimMappingExpression withExpression(String expression) { + this.expression = expression; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (expression() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property expression in model JwtAuthenticatorClaimMappingExpression")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JwtAuthenticatorClaimMappingExpression.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("expression", this.expression); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JwtAuthenticatorClaimMappingExpression from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JwtAuthenticatorClaimMappingExpression if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JwtAuthenticatorClaimMappingExpression. + */ + public static JwtAuthenticatorClaimMappingExpression fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JwtAuthenticatorClaimMappingExpression deserializedJwtAuthenticatorClaimMappingExpression + = new JwtAuthenticatorClaimMappingExpression(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("expression".equals(fieldName)) { + deserializedJwtAuthenticatorClaimMappingExpression.expression = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJwtAuthenticatorClaimMappingExpression; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorClaimMappings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorClaimMappings.java new file mode 100644 index 000000000000..b1239568bd8c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorClaimMappings.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The claim mappings for JWTAuthenticator. + */ +@Fluent +public final class JwtAuthenticatorClaimMappings implements JsonSerializable<JwtAuthenticatorClaimMappings> { + /* + * The expression to extract username attribute from the token claims. + */ + private JwtAuthenticatorClaimMappingExpression username; + + /* + * The expression to extract groups attribute from the token claims. When not provided, no groups are extracted from + * the token claims. + */ + private JwtAuthenticatorClaimMappingExpression groups; + + /* + * The expression to extract uid attribute from the token claims. When not provided, no uid is extracted from the + * token claims. + */ + private JwtAuthenticatorClaimMappingExpression uid; + + /* + * The expression to extract extra attribute from the token claims. When not provided, no extra attributes are + * extracted from the token claims. + */ + private List<JwtAuthenticatorExtraClaimMappingExpression> extra; + + /** + * Creates an instance of JwtAuthenticatorClaimMappings class. + */ + public JwtAuthenticatorClaimMappings() { + } + + /** + * Get the username property: The expression to extract username attribute from the token claims. + * + * @return the username value. + */ + public JwtAuthenticatorClaimMappingExpression username() { + return this.username; + } + + /** + * Set the username property: The expression to extract username attribute from the token claims. + * + * @param username the username value to set. + * @return the JwtAuthenticatorClaimMappings object itself. + */ + public JwtAuthenticatorClaimMappings withUsername(JwtAuthenticatorClaimMappingExpression username) { + this.username = username; + return this; + } + + /** + * Get the groups property: The expression to extract groups attribute from the token claims. When not provided, no + * groups are extracted from the token claims. + * + * @return the groups value. + */ + public JwtAuthenticatorClaimMappingExpression groups() { + return this.groups; + } + + /** + * Set the groups property: The expression to extract groups attribute from the token claims. When not provided, no + * groups are extracted from the token claims. + * + * @param groups the groups value to set. + * @return the JwtAuthenticatorClaimMappings object itself. + */ + public JwtAuthenticatorClaimMappings withGroups(JwtAuthenticatorClaimMappingExpression groups) { + this.groups = groups; + return this; + } + + /** + * Get the uid property: The expression to extract uid attribute from the token claims. When not provided, no uid is + * extracted from the token claims. + * + * @return the uid value. + */ + public JwtAuthenticatorClaimMappingExpression uid() { + return this.uid; + } + + /** + * Set the uid property: The expression to extract uid attribute from the token claims. When not provided, no uid is + * extracted from the token claims. + * + * @param uid the uid value to set. + * @return the JwtAuthenticatorClaimMappings object itself. + */ + public JwtAuthenticatorClaimMappings withUid(JwtAuthenticatorClaimMappingExpression uid) { + this.uid = uid; + return this; + } + + /** + * Get the extra property: The expression to extract extra attribute from the token claims. When not provided, no + * extra attributes are extracted from the token claims. + * + * @return the extra value. + */ + public List<JwtAuthenticatorExtraClaimMappingExpression> extra() { + return this.extra; + } + + /** + * Set the extra property: The expression to extract extra attribute from the token claims. When not provided, no + * extra attributes are extracted from the token claims. + * + * @param extra the extra value to set. + * @return the JwtAuthenticatorClaimMappings object itself. + */ + public JwtAuthenticatorClaimMappings withExtra(List<JwtAuthenticatorExtraClaimMappingExpression> extra) { + this.extra = extra; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (username() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property username in model JwtAuthenticatorClaimMappings")); + } else { + username().validate(); + } + if (groups() != null) { + groups().validate(); + } + if (uid() != null) { + uid().validate(); + } + if (extra() != null) { + extra().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JwtAuthenticatorClaimMappings.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("username", this.username); + jsonWriter.writeJsonField("groups", this.groups); + jsonWriter.writeJsonField("uid", this.uid); + jsonWriter.writeArrayField("extra", this.extra, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JwtAuthenticatorClaimMappings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JwtAuthenticatorClaimMappings if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JwtAuthenticatorClaimMappings. + */ + public static JwtAuthenticatorClaimMappings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JwtAuthenticatorClaimMappings deserializedJwtAuthenticatorClaimMappings + = new JwtAuthenticatorClaimMappings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("username".equals(fieldName)) { + deserializedJwtAuthenticatorClaimMappings.username + = JwtAuthenticatorClaimMappingExpression.fromJson(reader); + } else if ("groups".equals(fieldName)) { + deserializedJwtAuthenticatorClaimMappings.groups + = JwtAuthenticatorClaimMappingExpression.fromJson(reader); + } else if ("uid".equals(fieldName)) { + deserializedJwtAuthenticatorClaimMappings.uid + = JwtAuthenticatorClaimMappingExpression.fromJson(reader); + } else if ("extra".equals(fieldName)) { + List<JwtAuthenticatorExtraClaimMappingExpression> extra + = reader.readArray(reader1 -> JwtAuthenticatorExtraClaimMappingExpression.fromJson(reader1)); + deserializedJwtAuthenticatorClaimMappings.extra = extra; + } else { + reader.skipChildren(); + } + } + + return deserializedJwtAuthenticatorClaimMappings; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorExtraClaimMappingExpression.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorExtraClaimMappingExpression.java new file mode 100644 index 000000000000..bdccfe69d44b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorExtraClaimMappingExpression.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The extra claim mapping expression for JWTAuthenticator. + */ +@Fluent +public final class JwtAuthenticatorExtraClaimMappingExpression + implements JsonSerializable<JwtAuthenticatorExtraClaimMappingExpression> { + /* + * The key of the extra attribute. + */ + private String key; + + /* + * The CEL expression used to extract the value of the extra attribute. + */ + private String valueExpression; + + /** + * Creates an instance of JwtAuthenticatorExtraClaimMappingExpression class. + */ + public JwtAuthenticatorExtraClaimMappingExpression() { + } + + /** + * Get the key property: The key of the extra attribute. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: The key of the extra attribute. + * + * @param key the key value to set. + * @return the JwtAuthenticatorExtraClaimMappingExpression object itself. + */ + public JwtAuthenticatorExtraClaimMappingExpression withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the valueExpression property: The CEL expression used to extract the value of the extra attribute. + * + * @return the valueExpression value. + */ + public String valueExpression() { + return this.valueExpression; + } + + /** + * Set the valueExpression property: The CEL expression used to extract the value of the extra attribute. + * + * @param valueExpression the valueExpression value to set. + * @return the JwtAuthenticatorExtraClaimMappingExpression object itself. + */ + public JwtAuthenticatorExtraClaimMappingExpression withValueExpression(String valueExpression) { + this.valueExpression = valueExpression; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (key() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property key in model JwtAuthenticatorExtraClaimMappingExpression")); + } + if (valueExpression() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property valueExpression in model JwtAuthenticatorExtraClaimMappingExpression")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JwtAuthenticatorExtraClaimMappingExpression.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", this.key); + jsonWriter.writeStringField("valueExpression", this.valueExpression); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JwtAuthenticatorExtraClaimMappingExpression from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JwtAuthenticatorExtraClaimMappingExpression if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JwtAuthenticatorExtraClaimMappingExpression. + */ + public static JwtAuthenticatorExtraClaimMappingExpression fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JwtAuthenticatorExtraClaimMappingExpression deserializedJwtAuthenticatorExtraClaimMappingExpression + = new JwtAuthenticatorExtraClaimMappingExpression(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedJwtAuthenticatorExtraClaimMappingExpression.key = reader.getString(); + } else if ("valueExpression".equals(fieldName)) { + deserializedJwtAuthenticatorExtraClaimMappingExpression.valueExpression = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJwtAuthenticatorExtraClaimMappingExpression; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorIssuer.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorIssuer.java new file mode 100644 index 000000000000..eb38b0dd43e9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorIssuer.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The OIDC issuer details for JWTAuthenticator. + */ +@Fluent +public final class JwtAuthenticatorIssuer implements JsonSerializable<JwtAuthenticatorIssuer> { + /* + * The issuer URL. The URL must begin with the scheme https and cannot contain a query string or fragment. This must + * match the "iss" claim in the presented JWT, and the issuer returned from discovery. + */ + private String url; + + /* + * The set of acceptable audiences the JWT must be issued to. At least one is required. When multiple is set, + * AudienceMatchPolicy is used in API Server configuration. + */ + private List<String> audiences; + + /** + * Creates an instance of JwtAuthenticatorIssuer class. + */ + public JwtAuthenticatorIssuer() { + } + + /** + * Get the url property: The issuer URL. The URL must begin with the scheme https and cannot contain a query string + * or fragment. This must match the "iss" claim in the presented JWT, and the issuer returned from discovery. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: The issuer URL. The URL must begin with the scheme https and cannot contain a query string + * or fragment. This must match the "iss" claim in the presented JWT, and the issuer returned from discovery. + * + * @param url the url value to set. + * @return the JwtAuthenticatorIssuer object itself. + */ + public JwtAuthenticatorIssuer withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the audiences property: The set of acceptable audiences the JWT must be issued to. At least one is required. + * When multiple is set, AudienceMatchPolicy is used in API Server configuration. + * + * @return the audiences value. + */ + public List<String> audiences() { + return this.audiences; + } + + /** + * Set the audiences property: The set of acceptable audiences the JWT must be issued to. At least one is required. + * When multiple is set, AudienceMatchPolicy is used in API Server configuration. + * + * @param audiences the audiences value to set. + * @return the JwtAuthenticatorIssuer object itself. + */ + public JwtAuthenticatorIssuer withAudiences(List<String> audiences) { + this.audiences = audiences; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (url() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property url in model JwtAuthenticatorIssuer")); + } + if (audiences() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property audiences in model JwtAuthenticatorIssuer")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JwtAuthenticatorIssuer.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("url", this.url); + jsonWriter.writeArrayField("audiences", this.audiences, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JwtAuthenticatorIssuer from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JwtAuthenticatorIssuer if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JwtAuthenticatorIssuer. + */ + public static JwtAuthenticatorIssuer fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JwtAuthenticatorIssuer deserializedJwtAuthenticatorIssuer = new JwtAuthenticatorIssuer(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("url".equals(fieldName)) { + deserializedJwtAuthenticatorIssuer.url = reader.getString(); + } else if ("audiences".equals(fieldName)) { + List<String> audiences = reader.readArray(reader1 -> reader1.getString()); + deserializedJwtAuthenticatorIssuer.audiences = audiences; + } else { + reader.skipChildren(); + } + } + + return deserializedJwtAuthenticatorIssuer; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorListResult.java new file mode 100644 index 000000000000..2a5077ab9566 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorListResult.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.JwtAuthenticatorInner; +import java.io.IOException; +import java.util.List; + +/** + * The response from the List JWT authenticator operation. + */ +@Fluent +public final class JwtAuthenticatorListResult implements JsonSerializable<JwtAuthenticatorListResult> { + /* + * The list of JWT authenticators. + */ + private List<JwtAuthenticatorInner> value; + + /* + * The URL to get the next set of JWT authenticator results. + */ + private String nextLink; + + /** + * Creates an instance of JwtAuthenticatorListResult class. + */ + public JwtAuthenticatorListResult() { + } + + /** + * Get the value property: The list of JWT authenticators. + * + * @return the value value. + */ + public List<JwtAuthenticatorInner> value() { + return this.value; + } + + /** + * Set the value property: The list of JWT authenticators. + * + * @param value the value value to set. + * @return the JwtAuthenticatorListResult object itself. + */ + public JwtAuthenticatorListResult withValue(List<JwtAuthenticatorInner> value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of JWT authenticator results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model JwtAuthenticatorListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JwtAuthenticatorListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JwtAuthenticatorListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JwtAuthenticatorListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JwtAuthenticatorListResult. + */ + public static JwtAuthenticatorListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JwtAuthenticatorListResult deserializedJwtAuthenticatorListResult = new JwtAuthenticatorListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<JwtAuthenticatorInner> value + = reader.readArray(reader1 -> JwtAuthenticatorInner.fromJson(reader1)); + deserializedJwtAuthenticatorListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedJwtAuthenticatorListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJwtAuthenticatorListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorProperties.java new file mode 100644 index 000000000000..7d36f2acf2c4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorProperties.java @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The properties of JWTAuthenticator. For details on how to configure the properties of a JWT authenticator, please + * refer to the Kubernetes documentation: + * https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. Please + * note that not all fields available in the Kubernetes documentation are supported by AKS. For troubleshooting, please + * see https://aka.ms/aks-external-issuers-docs. + */ +@Fluent +public final class JwtAuthenticatorProperties implements JsonSerializable<JwtAuthenticatorProperties> { + /* + * The current provisioning state of the JWT authenticator. + */ + private JwtAuthenticatorProvisioningState provisioningState; + + /* + * The JWT OIDC issuer details. + */ + private JwtAuthenticatorIssuer issuer; + + /* + * The rules that are applied to validate token claims to authenticate users. All the expressions must evaluate to + * true for validation to succeed. + */ + private List<JwtAuthenticatorValidationRule> claimValidationRules; + + /* + * The mappings that define how user attributes are extracted from the token claims. + */ + private JwtAuthenticatorClaimMappings claimMappings; + + /* + * The rules that are applied to the mapped user before completing authentication. All the expressions must evaluate + * to true for validation to succeed. + */ + private List<JwtAuthenticatorValidationRule> userValidationRules; + + /** + * Creates an instance of JwtAuthenticatorProperties class. + */ + public JwtAuthenticatorProperties() { + } + + /** + * Get the provisioningState property: The current provisioning state of the JWT authenticator. + * + * @return the provisioningState value. + */ + public JwtAuthenticatorProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the issuer property: The JWT OIDC issuer details. + * + * @return the issuer value. + */ + public JwtAuthenticatorIssuer issuer() { + return this.issuer; + } + + /** + * Set the issuer property: The JWT OIDC issuer details. + * + * @param issuer the issuer value to set. + * @return the JwtAuthenticatorProperties object itself. + */ + public JwtAuthenticatorProperties withIssuer(JwtAuthenticatorIssuer issuer) { + this.issuer = issuer; + return this; + } + + /** + * Get the claimValidationRules property: The rules that are applied to validate token claims to authenticate users. + * All the expressions must evaluate to true for validation to succeed. + * + * @return the claimValidationRules value. + */ + public List<JwtAuthenticatorValidationRule> claimValidationRules() { + return this.claimValidationRules; + } + + /** + * Set the claimValidationRules property: The rules that are applied to validate token claims to authenticate users. + * All the expressions must evaluate to true for validation to succeed. + * + * @param claimValidationRules the claimValidationRules value to set. + * @return the JwtAuthenticatorProperties object itself. + */ + public JwtAuthenticatorProperties + withClaimValidationRules(List<JwtAuthenticatorValidationRule> claimValidationRules) { + this.claimValidationRules = claimValidationRules; + return this; + } + + /** + * Get the claimMappings property: The mappings that define how user attributes are extracted from the token claims. + * + * @return the claimMappings value. + */ + public JwtAuthenticatorClaimMappings claimMappings() { + return this.claimMappings; + } + + /** + * Set the claimMappings property: The mappings that define how user attributes are extracted from the token claims. + * + * @param claimMappings the claimMappings value to set. + * @return the JwtAuthenticatorProperties object itself. + */ + public JwtAuthenticatorProperties withClaimMappings(JwtAuthenticatorClaimMappings claimMappings) { + this.claimMappings = claimMappings; + return this; + } + + /** + * Get the userValidationRules property: The rules that are applied to the mapped user before completing + * authentication. All the expressions must evaluate to true for validation to succeed. + * + * @return the userValidationRules value. + */ + public List<JwtAuthenticatorValidationRule> userValidationRules() { + return this.userValidationRules; + } + + /** + * Set the userValidationRules property: The rules that are applied to the mapped user before completing + * authentication. All the expressions must evaluate to true for validation to succeed. + * + * @param userValidationRules the userValidationRules value to set. + * @return the JwtAuthenticatorProperties object itself. + */ + public JwtAuthenticatorProperties + withUserValidationRules(List<JwtAuthenticatorValidationRule> userValidationRules) { + this.userValidationRules = userValidationRules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (issuer() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property issuer in model JwtAuthenticatorProperties")); + } else { + issuer().validate(); + } + if (claimValidationRules() != null) { + claimValidationRules().forEach(e -> e.validate()); + } + if (claimMappings() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property claimMappings in model JwtAuthenticatorProperties")); + } else { + claimMappings().validate(); + } + if (userValidationRules() != null) { + userValidationRules().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JwtAuthenticatorProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("issuer", this.issuer); + jsonWriter.writeJsonField("claimMappings", this.claimMappings); + jsonWriter.writeArrayField("claimValidationRules", this.claimValidationRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("userValidationRules", this.userValidationRules, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JwtAuthenticatorProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JwtAuthenticatorProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JwtAuthenticatorProperties. + */ + public static JwtAuthenticatorProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JwtAuthenticatorProperties deserializedJwtAuthenticatorProperties = new JwtAuthenticatorProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("issuer".equals(fieldName)) { + deserializedJwtAuthenticatorProperties.issuer = JwtAuthenticatorIssuer.fromJson(reader); + } else if ("claimMappings".equals(fieldName)) { + deserializedJwtAuthenticatorProperties.claimMappings + = JwtAuthenticatorClaimMappings.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedJwtAuthenticatorProperties.provisioningState + = JwtAuthenticatorProvisioningState.fromString(reader.getString()); + } else if ("claimValidationRules".equals(fieldName)) { + List<JwtAuthenticatorValidationRule> claimValidationRules + = reader.readArray(reader1 -> JwtAuthenticatorValidationRule.fromJson(reader1)); + deserializedJwtAuthenticatorProperties.claimValidationRules = claimValidationRules; + } else if ("userValidationRules".equals(fieldName)) { + List<JwtAuthenticatorValidationRule> userValidationRules + = reader.readArray(reader1 -> JwtAuthenticatorValidationRule.fromJson(reader1)); + deserializedJwtAuthenticatorProperties.userValidationRules = userValidationRules; + } else { + reader.skipChildren(); + } + } + + return deserializedJwtAuthenticatorProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorProvisioningState.java new file mode 100644 index 000000000000..fa06b1956c99 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The provisioning state of the last accepted operation. + */ +public final class JwtAuthenticatorProvisioningState extends ExpandableStringEnum<JwtAuthenticatorProvisioningState> { + /** + * Static value Succeeded for JwtAuthenticatorProvisioningState. + */ + public static final JwtAuthenticatorProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for JwtAuthenticatorProvisioningState. + */ + public static final JwtAuthenticatorProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for JwtAuthenticatorProvisioningState. + */ + public static final JwtAuthenticatorProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Creating for JwtAuthenticatorProvisioningState. + */ + public static final JwtAuthenticatorProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Updating for JwtAuthenticatorProvisioningState. + */ + public static final JwtAuthenticatorProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for JwtAuthenticatorProvisioningState. + */ + public static final JwtAuthenticatorProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of JwtAuthenticatorProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public JwtAuthenticatorProvisioningState() { + } + + /** + * Creates or finds a JwtAuthenticatorProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding JwtAuthenticatorProvisioningState. + */ + public static JwtAuthenticatorProvisioningState fromString(String name) { + return fromString(name, JwtAuthenticatorProvisioningState.class); + } + + /** + * Gets known JwtAuthenticatorProvisioningState values. + * + * @return known JwtAuthenticatorProvisioningState values. + */ + public static Collection<JwtAuthenticatorProvisioningState> values() { + return values(JwtAuthenticatorProvisioningState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorValidationRule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorValidationRule.java new file mode 100644 index 000000000000..c470baf052ee --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorValidationRule.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The validation rule for JWTAuthenticator. + */ +@Fluent +public final class JwtAuthenticatorValidationRule implements JsonSerializable<JwtAuthenticatorValidationRule> { + /* + * The CEL expression used to validate the claim or attribute. + */ + private String expression; + + /* + * The validation error message. + */ + private String message; + + /** + * Creates an instance of JwtAuthenticatorValidationRule class. + */ + public JwtAuthenticatorValidationRule() { + } + + /** + * Get the expression property: The CEL expression used to validate the claim or attribute. + * + * @return the expression value. + */ + public String expression() { + return this.expression; + } + + /** + * Set the expression property: The CEL expression used to validate the claim or attribute. + * + * @param expression the expression value to set. + * @return the JwtAuthenticatorValidationRule object itself. + */ + public JwtAuthenticatorValidationRule withExpression(String expression) { + this.expression = expression; + return this; + } + + /** + * Get the message property: The validation error message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: The validation error message. + * + * @param message the message value to set. + * @return the JwtAuthenticatorValidationRule object itself. + */ + public JwtAuthenticatorValidationRule withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (expression() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property expression in model JwtAuthenticatorValidationRule")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JwtAuthenticatorValidationRule.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("expression", this.expression); + jsonWriter.writeStringField("message", this.message); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JwtAuthenticatorValidationRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JwtAuthenticatorValidationRule if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JwtAuthenticatorValidationRule. + */ + public static JwtAuthenticatorValidationRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JwtAuthenticatorValidationRule deserializedJwtAuthenticatorValidationRule + = new JwtAuthenticatorValidationRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("expression".equals(fieldName)) { + deserializedJwtAuthenticatorValidationRule.expression = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedJwtAuthenticatorValidationRule.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJwtAuthenticatorValidationRule; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java index a14c1ea5937b..c06b22dd47ea 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java @@ -81,6 +81,12 @@ public final class KubeletConfig implements JsonSerializable<KubeletConfig> { */ private Integer podMaxPids; + /* + * Specifies the default seccomp profile applied to all workloads. If not specified, 'Unconfined' will be used by + * default. + */ + private SeccompDefault seccompDefault; + /** * Creates an instance of KubeletConfig class. */ @@ -331,6 +337,28 @@ public KubeletConfig withPodMaxPids(Integer podMaxPids) { return this; } + /** + * Get the seccompDefault property: Specifies the default seccomp profile applied to all workloads. If not + * specified, 'Unconfined' will be used by default. + * + * @return the seccompDefault value. + */ + public SeccompDefault seccompDefault() { + return this.seccompDefault; + } + + /** + * Set the seccompDefault property: Specifies the default seccomp profile applied to all workloads. If not + * specified, 'Unconfined' will be used by default. + * + * @param seccompDefault the seccompDefault value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withSeccompDefault(SeccompDefault seccompDefault) { + this.seccompDefault = seccompDefault; + return this; + } + /** * Validates the instance. * @@ -357,6 +385,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeNumberField("containerLogMaxSizeMB", this.containerLogMaxSizeMB); jsonWriter.writeNumberField("containerLogMaxFiles", this.containerLogMaxFiles); jsonWriter.writeNumberField("podMaxPids", this.podMaxPids); + jsonWriter.writeStringField("seccompDefault", + this.seccompDefault == null ? null : this.seccompDefault.toString()); return jsonWriter.writeEndObject(); } @@ -398,6 +428,8 @@ public static KubeletConfig fromJson(JsonReader jsonReader) throws IOException { deserializedKubeletConfig.containerLogMaxFiles = reader.getNullable(JsonReader::getInt); } else if ("podMaxPids".equals(fieldName)) { deserializedKubeletConfig.podMaxPids = reader.getNullable(JsonReader::getInt); + } else if ("seccompDefault".equals(fieldName)) { + deserializedKubeletConfig.seccompDefault = SeccompDefault.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesResourceObjectEncryptionProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesResourceObjectEncryptionProfile.java new file mode 100644 index 000000000000..32f5ad6a3c47 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesResourceObjectEncryptionProfile.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Encryption at rest of Kubernetes resource objects using service-managed keys. More information on this can be found + * under https://aka.ms/aks/kubernetesResourceObjectEncryption. + */ +@Fluent +public final class KubernetesResourceObjectEncryptionProfile + implements JsonSerializable<KubernetesResourceObjectEncryptionProfile> { + /* + * Whether to enable encryption at rest of Kubernetes resource objects using service-managed keys. More information + * on this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. + */ + private InfrastructureEncryption infrastructureEncryption; + + /** + * Creates an instance of KubernetesResourceObjectEncryptionProfile class. + */ + public KubernetesResourceObjectEncryptionProfile() { + } + + /** + * Get the infrastructureEncryption property: Whether to enable encryption at rest of Kubernetes resource objects + * using service-managed keys. More information on this can be found under + * https://aka.ms/aks/kubernetesResourceObjectEncryption. + * + * @return the infrastructureEncryption value. + */ + public InfrastructureEncryption infrastructureEncryption() { + return this.infrastructureEncryption; + } + + /** + * Set the infrastructureEncryption property: Whether to enable encryption at rest of Kubernetes resource objects + * using service-managed keys. More information on this can be found under + * https://aka.ms/aks/kubernetesResourceObjectEncryption. + * + * @param infrastructureEncryption the infrastructureEncryption value to set. + * @return the KubernetesResourceObjectEncryptionProfile object itself. + */ + public KubernetesResourceObjectEncryptionProfile + withInfrastructureEncryption(InfrastructureEncryption infrastructureEncryption) { + this.infrastructureEncryption = infrastructureEncryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("infrastructureEncryption", + this.infrastructureEncryption == null ? null : this.infrastructureEncryption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KubernetesResourceObjectEncryptionProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KubernetesResourceObjectEncryptionProfile if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the KubernetesResourceObjectEncryptionProfile. + */ + public static KubernetesResourceObjectEncryptionProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KubernetesResourceObjectEncryptionProfile deserializedKubernetesResourceObjectEncryptionProfile + = new KubernetesResourceObjectEncryptionProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("infrastructureEncryption".equals(fieldName)) { + deserializedKubernetesResourceObjectEncryptionProfile.infrastructureEncryption + = InfrastructureEncryption.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedKubernetesResourceObjectEncryptionProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelector.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelector.java new file mode 100644 index 000000000000..687fc5c092d1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelector.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. + * An empty label selector matches all objects. A null label selector matches no objects. + */ +@Fluent +public final class LabelSelector implements JsonSerializable<LabelSelector> { + /* + * matchLabels is an array of {key=value} pairs. A single {key=value} in the matchLabels map is equivalent to an + * element of matchExpressions, whose key field is `key`, the operator is `In`, and the values array contains only + * `value`. The requirements are ANDed. + */ + private List<String> matchLabels; + + /* + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + private List<LabelSelectorRequirement> matchExpressions; + + /** + * Creates an instance of LabelSelector class. + */ + public LabelSelector() { + } + + /** + * Get the matchLabels property: matchLabels is an array of {key=value} pairs. A single {key=value} in the + * matchLabels map is equivalent to an element of matchExpressions, whose key field is `key`, the operator is `In`, + * and the values array contains only `value`. The requirements are ANDed. + * + * @return the matchLabels value. + */ + public List<String> matchLabels() { + return this.matchLabels; + } + + /** + * Set the matchLabels property: matchLabels is an array of {key=value} pairs. A single {key=value} in the + * matchLabels map is equivalent to an element of matchExpressions, whose key field is `key`, the operator is `In`, + * and the values array contains only `value`. The requirements are ANDed. + * + * @param matchLabels the matchLabels value to set. + * @return the LabelSelector object itself. + */ + public LabelSelector withMatchLabels(List<String> matchLabels) { + this.matchLabels = matchLabels; + return this; + } + + /** + * Get the matchExpressions property: matchExpressions is a list of label selector requirements. The requirements + * are ANDed. + * + * @return the matchExpressions value. + */ + public List<LabelSelectorRequirement> matchExpressions() { + return this.matchExpressions; + } + + /** + * Set the matchExpressions property: matchExpressions is a list of label selector requirements. The requirements + * are ANDed. + * + * @param matchExpressions the matchExpressions value to set. + * @return the LabelSelector object itself. + */ + public LabelSelector withMatchExpressions(List<LabelSelectorRequirement> matchExpressions) { + this.matchExpressions = matchExpressions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (matchExpressions() != null) { + matchExpressions().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("matchLabels", this.matchLabels, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("matchExpressions", this.matchExpressions, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LabelSelector from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LabelSelector if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the LabelSelector. + */ + public static LabelSelector fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LabelSelector deserializedLabelSelector = new LabelSelector(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("matchLabels".equals(fieldName)) { + List<String> matchLabels = reader.readArray(reader1 -> reader1.getString()); + deserializedLabelSelector.matchLabels = matchLabels; + } else if ("matchExpressions".equals(fieldName)) { + List<LabelSelectorRequirement> matchExpressions + = reader.readArray(reader1 -> LabelSelectorRequirement.fromJson(reader1)); + deserializedLabelSelector.matchExpressions = matchExpressions; + } else { + reader.skipChildren(); + } + } + + return deserializedLabelSelector; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelectorRequirement.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelectorRequirement.java new file mode 100644 index 000000000000..02ccd0525bdb --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelectorRequirement.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A label selector requirement is a selector that contains values, a key, and an operator that relates the key and + * values. + */ +@Fluent +public final class LabelSelectorRequirement implements JsonSerializable<LabelSelectorRequirement> { + /* + * key is the label key that the selector applies to. + */ + private String key; + + /* + * operator represents a key's relationship to a set of values. Valid operators are In and NotIn + */ + private Operator operator; + + /* + * values is an array of string values, the values array must be non-empty. + */ + private List<String> values; + + /** + * Creates an instance of LabelSelectorRequirement class. + */ + public LabelSelectorRequirement() { + } + + /** + * Get the key property: key is the label key that the selector applies to. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: key is the label key that the selector applies to. + * + * @param key the key value to set. + * @return the LabelSelectorRequirement object itself. + */ + public LabelSelectorRequirement withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the operator property: operator represents a key's relationship to a set of values. Valid operators are In + * and NotIn. + * + * @return the operator value. + */ + public Operator operator() { + return this.operator; + } + + /** + * Set the operator property: operator represents a key's relationship to a set of values. Valid operators are In + * and NotIn. + * + * @param operator the operator value to set. + * @return the LabelSelectorRequirement object itself. + */ + public LabelSelectorRequirement withOperator(Operator operator) { + this.operator = operator; + return this; + } + + /** + * Get the values property: values is an array of string values, the values array must be non-empty. + * + * @return the values value. + */ + public List<String> values() { + return this.values; + } + + /** + * Set the values property: values is an array of string values, the values array must be non-empty. + * + * @param values the values value to set. + * @return the LabelSelectorRequirement object itself. + */ + public LabelSelectorRequirement withValues(List<String> values) { + this.values = values; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", this.key); + jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LabelSelectorRequirement from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LabelSelectorRequirement if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LabelSelectorRequirement. + */ + public static LabelSelectorRequirement fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LabelSelectorRequirement deserializedLabelSelectorRequirement = new LabelSelectorRequirement(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedLabelSelectorRequirement.key = reader.getString(); + } else if ("operator".equals(fieldName)) { + deserializedLabelSelectorRequirement.operator = Operator.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List<String> values = reader.readArray(reader1 -> reader1.getString()); + deserializedLabelSelectorRequirement.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedLabelSelectorRequirement; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerListResult.java new file mode 100644 index 000000000000..6314fdcd178a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.LoadBalancerInner; +import java.io.IOException; +import java.util.List; + +/** + * The response from the List Load Balancers operation. + */ +@Fluent +public final class LoadBalancerListResult implements JsonSerializable<LoadBalancerListResult> { + /* + * The list of Load Balancers. + */ + private List<LoadBalancerInner> value; + + /* + * The URL to get the next set of load balancer results. + */ + private String nextLink; + + /** + * Creates an instance of LoadBalancerListResult class. + */ + public LoadBalancerListResult() { + } + + /** + * Get the value property: The list of Load Balancers. + * + * @return the value value. + */ + public List<LoadBalancerInner> value() { + return this.value; + } + + /** + * Set the value property: The list of Load Balancers. + * + * @param value the value value to set. + * @return the LoadBalancerListResult object itself. + */ + public LoadBalancerListResult withValue(List<LoadBalancerInner> value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of load balancer results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the LoadBalancerListResult. + */ + public static LoadBalancerListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerListResult deserializedLoadBalancerListResult = new LoadBalancerListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<LoadBalancerInner> value = reader.readArray(reader1 -> LoadBalancerInner.fromJson(reader1)); + deserializedLoadBalancerListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedLoadBalancerListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineHardwareProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineHardwareProfile.java new file mode 100644 index 000000000000..5f2ac475ad1a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineHardwareProfile.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The hardware and GPU settings of the machine. + */ +@Fluent +public final class MachineHardwareProfile implements JsonSerializable<MachineHardwareProfile> { + /* + * The size of the VM. VM size availability varies by region. If a node contains insufficient compute resources + * (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: + * https://docs.microsoft.com/azure/aks/quotas-skus-regions + */ + private String vmSize; + + /* + * GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + */ + private GpuInstanceProfile gpuInstanceProfile; + + /* + * The GPU settings of the machine. + */ + private GpuProfile gpuProfile; + + /** + * Creates an instance of MachineHardwareProfile class. + */ + public MachineHardwareProfile() { + } + + /** + * Get the vmSize property: The size of the VM. VM size availability varies by region. If a node contains + * insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + * restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * + * @return the vmSize value. + */ + public String vmSize() { + return this.vmSize; + } + + /** + * Set the vmSize property: The size of the VM. VM size availability varies by region. If a node contains + * insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + * restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * + * @param vmSize the vmSize value to set. + * @return the MachineHardwareProfile object itself. + */ + public MachineHardwareProfile withVmSize(String vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. + * + * @return the gpuInstanceProfile value. + */ + public GpuInstanceProfile gpuInstanceProfile() { + return this.gpuInstanceProfile; + } + + /** + * Set the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. + * + * @param gpuInstanceProfile the gpuInstanceProfile value to set. + * @return the MachineHardwareProfile object itself. + */ + public MachineHardwareProfile withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { + this.gpuInstanceProfile = gpuInstanceProfile; + return this; + } + + /** + * Get the gpuProfile property: The GPU settings of the machine. + * + * @return the gpuProfile value. + */ + public GpuProfile gpuProfile() { + return this.gpuProfile; + } + + /** + * Set the gpuProfile property: The GPU settings of the machine. + * + * @param gpuProfile the gpuProfile value to set. + * @return the MachineHardwareProfile object itself. + */ + public MachineHardwareProfile withGpuProfile(GpuProfile gpuProfile) { + this.gpuProfile = gpuProfile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (gpuProfile() != null) { + gpuProfile().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("vmSize", this.vmSize); + jsonWriter.writeStringField("gpuInstanceProfile", + this.gpuInstanceProfile == null ? null : this.gpuInstanceProfile.toString()); + jsonWriter.writeJsonField("gpuProfile", this.gpuProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineHardwareProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineHardwareProfile if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineHardwareProfile. + */ + public static MachineHardwareProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineHardwareProfile deserializedMachineHardwareProfile = new MachineHardwareProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("vmSize".equals(fieldName)) { + deserializedMachineHardwareProfile.vmSize = reader.getString(); + } else if ("gpuInstanceProfile".equals(fieldName)) { + deserializedMachineHardwareProfile.gpuInstanceProfile + = GpuInstanceProfile.fromString(reader.getString()); + } else if ("gpuProfile".equals(fieldName)) { + deserializedMachineHardwareProfile.gpuProfile = GpuProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineHardwareProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineKubernetesProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineKubernetesProfile.java new file mode 100644 index 000000000000..77af2b6e776f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineKubernetesProfile.java @@ -0,0 +1,390 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The Kubernetes configurations used by the machine. + */ +@Fluent +public final class MachineKubernetesProfile implements JsonSerializable<MachineKubernetesProfile> { + /* + * The node labels on the machine. + */ + private Map<String, String> nodeLabels; + + /* + * The version of Kubernetes specified by the user. Both patch version <major.minor.patch> and <major.minor> are + * supported. When <major.minor> is specified, the latest supported patch version is chosen automatically. + */ + private String orchestratorVersion; + + /* + * The version of Kubernetes running on the machine. If orchestratorVersion was a fully specified version + * <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion was <major.minor>, this field + * will contain the full <major.minor.patch> version being used. + */ + private String currentOrchestratorVersion; + + /* + * Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. + */ + private KubeletDiskType kubeletDiskType; + + /* + * The Kubelet configuration on the machine. + */ + private KubeletConfig kubeletConfig; + + /* + * Taints added on the node during creation that will not be reconciled by AKS. These taints will not be reconciled + * by AKS and can be removed with a kubectl call. These taints allow for required configuration to run before the + * node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with `kubectl + * taint nodes node1 key1=value1:NoSchedule-` + */ + private List<String> nodeInitializationTaints; + + /* + * The taints added to new node during machine create. For example, key=value:NoSchedule. + */ + private List<String> nodeTaints; + + /* + * The maximum number of pods that can run on a node. + */ + private Integer maxPods; + + /* + * The node name in the Kubernetes cluster. + */ + private String nodeName; + + /* + * Determines the type of workload a node can run. + */ + private WorkloadRuntime workloadRuntime; + + /* + * Configuration for using artifact streaming on AKS. + */ + private AgentPoolArtifactStreamingProfile artifactStreamingProfile; + + /** + * Creates an instance of MachineKubernetesProfile class. + */ + public MachineKubernetesProfile() { + } + + /** + * Get the nodeLabels property: The node labels on the machine. + * + * @return the nodeLabels value. + */ + public Map<String, String> nodeLabels() { + return this.nodeLabels; + } + + /** + * Set the nodeLabels property: The node labels on the machine. + * + * @param nodeLabels the nodeLabels value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withNodeLabels(Map<String, String> nodeLabels) { + this.nodeLabels = nodeLabels; + return this; + } + + /** + * Get the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the + * latest supported patch version is chosen automatically. + * + * @return the orchestratorVersion value. + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Set the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the + * latest supported patch version is chosen automatically. + * + * @param orchestratorVersion the orchestratorVersion value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withOrchestratorVersion(String orchestratorVersion) { + this.orchestratorVersion = orchestratorVersion; + return this; + } + + /** + * Get the currentOrchestratorVersion property: The version of Kubernetes running on the machine. If + * orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> + * version being used. + * + * @return the currentOrchestratorVersion value. + */ + public String currentOrchestratorVersion() { + return this.currentOrchestratorVersion; + } + + /** + * Get the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * + * @return the kubeletDiskType value. + */ + public KubeletDiskType kubeletDiskType() { + return this.kubeletDiskType; + } + + /** + * Set the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * + * @param kubeletDiskType the kubeletDiskType value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withKubeletDiskType(KubeletDiskType kubeletDiskType) { + this.kubeletDiskType = kubeletDiskType; + return this; + } + + /** + * Get the kubeletConfig property: The Kubelet configuration on the machine. + * + * @return the kubeletConfig value. + */ + public KubeletConfig kubeletConfig() { + return this.kubeletConfig; + } + + /** + * Set the kubeletConfig property: The Kubelet configuration on the machine. + * + * @param kubeletConfig the kubeletConfig value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withKubeletConfig(KubeletConfig kubeletConfig) { + this.kubeletConfig = kubeletConfig; + return this; + } + + /** + * Get the nodeInitializationTaints property: Taints added on the node during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. These taints allow for + * required configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' + * that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @return the nodeInitializationTaints value. + */ + public List<String> nodeInitializationTaints() { + return this.nodeInitializationTaints; + } + + /** + * Set the nodeInitializationTaints property: Taints added on the node during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. These taints allow for + * required configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' + * that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @param nodeInitializationTaints the nodeInitializationTaints value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withNodeInitializationTaints(List<String> nodeInitializationTaints) { + this.nodeInitializationTaints = nodeInitializationTaints; + return this; + } + + /** + * Get the nodeTaints property: The taints added to new node during machine create. For example, + * key=value:NoSchedule. + * + * @return the nodeTaints value. + */ + public List<String> nodeTaints() { + return this.nodeTaints; + } + + /** + * Set the nodeTaints property: The taints added to new node during machine create. For example, + * key=value:NoSchedule. + * + * @param nodeTaints the nodeTaints value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withNodeTaints(List<String> nodeTaints) { + this.nodeTaints = nodeTaints; + return this; + } + + /** + * Get the maxPods property: The maximum number of pods that can run on a node. + * + * @return the maxPods value. + */ + public Integer maxPods() { + return this.maxPods; + } + + /** + * Set the maxPods property: The maximum number of pods that can run on a node. + * + * @param maxPods the maxPods value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withMaxPods(Integer maxPods) { + this.maxPods = maxPods; + return this; + } + + /** + * Get the nodeName property: The node name in the Kubernetes cluster. + * + * @return the nodeName value. + */ + public String nodeName() { + return this.nodeName; + } + + /** + * Get the workloadRuntime property: Determines the type of workload a node can run. + * + * @return the workloadRuntime value. + */ + public WorkloadRuntime workloadRuntime() { + return this.workloadRuntime; + } + + /** + * Set the workloadRuntime property: Determines the type of workload a node can run. + * + * @param workloadRuntime the workloadRuntime value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withWorkloadRuntime(WorkloadRuntime workloadRuntime) { + this.workloadRuntime = workloadRuntime; + return this; + } + + /** + * Get the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * + * @return the artifactStreamingProfile value. + */ + public AgentPoolArtifactStreamingProfile artifactStreamingProfile() { + return this.artifactStreamingProfile; + } + + /** + * Set the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * + * @param artifactStreamingProfile the artifactStreamingProfile value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile + withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile) { + this.artifactStreamingProfile = artifactStreamingProfile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (kubeletConfig() != null) { + kubeletConfig().validate(); + } + if (artifactStreamingProfile() != null) { + artifactStreamingProfile().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("nodeLabels", this.nodeLabels, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("orchestratorVersion", this.orchestratorVersion); + jsonWriter.writeStringField("kubeletDiskType", + this.kubeletDiskType == null ? null : this.kubeletDiskType.toString()); + jsonWriter.writeJsonField("kubeletConfig", this.kubeletConfig); + jsonWriter.writeArrayField("nodeInitializationTaints", this.nodeInitializationTaints, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("nodeTaints", this.nodeTaints, (writer, element) -> writer.writeString(element)); + jsonWriter.writeNumberField("maxPods", this.maxPods); + jsonWriter.writeStringField("workloadRuntime", + this.workloadRuntime == null ? null : this.workloadRuntime.toString()); + jsonWriter.writeJsonField("artifactStreamingProfile", this.artifactStreamingProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineKubernetesProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineKubernetesProfile if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineKubernetesProfile. + */ + public static MachineKubernetesProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineKubernetesProfile deserializedMachineKubernetesProfile = new MachineKubernetesProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nodeLabels".equals(fieldName)) { + Map<String, String> nodeLabels = reader.readMap(reader1 -> reader1.getString()); + deserializedMachineKubernetesProfile.nodeLabels = nodeLabels; + } else if ("orchestratorVersion".equals(fieldName)) { + deserializedMachineKubernetesProfile.orchestratorVersion = reader.getString(); + } else if ("currentOrchestratorVersion".equals(fieldName)) { + deserializedMachineKubernetesProfile.currentOrchestratorVersion = reader.getString(); + } else if ("kubeletDiskType".equals(fieldName)) { + deserializedMachineKubernetesProfile.kubeletDiskType + = KubeletDiskType.fromString(reader.getString()); + } else if ("kubeletConfig".equals(fieldName)) { + deserializedMachineKubernetesProfile.kubeletConfig = KubeletConfig.fromJson(reader); + } else if ("nodeInitializationTaints".equals(fieldName)) { + List<String> nodeInitializationTaints = reader.readArray(reader1 -> reader1.getString()); + deserializedMachineKubernetesProfile.nodeInitializationTaints = nodeInitializationTaints; + } else if ("nodeTaints".equals(fieldName)) { + List<String> nodeTaints = reader.readArray(reader1 -> reader1.getString()); + deserializedMachineKubernetesProfile.nodeTaints = nodeTaints; + } else if ("maxPods".equals(fieldName)) { + deserializedMachineKubernetesProfile.maxPods = reader.getNullable(JsonReader::getInt); + } else if ("nodeName".equals(fieldName)) { + deserializedMachineKubernetesProfile.nodeName = reader.getString(); + } else if ("workloadRuntime".equals(fieldName)) { + deserializedMachineKubernetesProfile.workloadRuntime + = WorkloadRuntime.fromString(reader.getString()); + } else if ("artifactStreamingProfile".equals(fieldName)) { + deserializedMachineKubernetesProfile.artifactStreamingProfile + = AgentPoolArtifactStreamingProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineKubernetesProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java index b81e97eb41a2..6425faad04a1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java @@ -19,14 +19,14 @@ @Fluent public final class MachineListResult implements JsonSerializable<MachineListResult> { /* - * The URL to get the next set of machine results. + * The list of Machines in cluster. */ - private String nextLink; + private List<MachineInner> value; /* - * The list of Machines in cluster. + * The URL to get the next set of machine results. */ - private List<MachineInner> value; + private String nextLink; /** * Creates an instance of MachineListResult class. @@ -34,15 +34,6 @@ public final class MachineListResult implements JsonSerializable<MachineListResu public MachineListResult() { } - /** - * Get the nextLink property: The URL to get the next set of machine results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - /** * Get the value property: The list of Machines in cluster. * @@ -63,6 +54,15 @@ public MachineListResult withValue(List<MachineInner> value) { return this; } + /** + * Get the nextLink property: The URL to get the next set of machine results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + /** * Validates the instance. * @@ -99,11 +99,11 @@ public static MachineListResult fromJson(JsonReader jsonReader) throws IOExcepti String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedMachineListResult.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List<MachineInner> value = reader.readArray(reader1 -> MachineInner.fromJson(reader1)); deserializedMachineListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMachineListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java index 5a3c9f305386..0997fe247d0a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -13,15 +13,51 @@ import java.util.List; /** - * network properties of the machine. + * The network properties of the machine. */ -@Immutable +@Fluent public final class MachineNetworkProperties implements JsonSerializable<MachineNetworkProperties> { /* * IPv4, IPv6 addresses of the machine */ private List<MachineIpAddress> ipAddresses; + /* + * The ID of the subnet which node and optionally pods will join on startup. If this is not specified, a VNET and + * subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it + * applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{ + * virtualNetworkName}/subnets/{subnetName} + */ + private String vnetSubnetId; + + /* + * The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically assigned on the node + * subnet (see vnetSubnetID for more details). This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{ + * virtualNetworkName}/subnets/{subnetName} + */ + private String podSubnetId; + + /* + * Whether the machine is allocated its own public IP. Some scenarios may require the machine to receive their own + * dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct + * connection to a cloud virtual machine to minimize hops. The default is false. + */ + private Boolean enableNodePublicIp; + + /* + * The public IP prefix ID which VM node should use IPs from. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{ + * publicIPPrefixName} + */ + private String nodePublicIpPrefixId; + + /* + * IPTags of instance-level public IPs. + */ + private List<IpTag> nodePublicIpTags; + /** * Creates an instance of MachineNetworkProperties class. */ @@ -37,6 +73,126 @@ public List<MachineIpAddress> ipAddresses() { return this.ipAddresses; } + /** + * Get the vnetSubnetId property: The ID of the subnet which node and optionally pods will join on startup. If this + * is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to + * nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @return the vnetSubnetId value. + */ + public String vnetSubnetId() { + return this.vnetSubnetId; + } + + /** + * Set the vnetSubnetId property: The ID of the subnet which node and optionally pods will join on startup. If this + * is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to + * nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param vnetSubnetId the vnetSubnetId value to set. + * @return the MachineNetworkProperties object itself. + */ + public MachineNetworkProperties withVnetSubnetId(String vnetSubnetId) { + this.vnetSubnetId = vnetSubnetId; + return this; + } + + /** + * Get the podSubnetId property: The ID of the subnet which pods will join when launched. If omitted, pod IPs are + * statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @return the podSubnetId value. + */ + public String podSubnetId() { + return this.podSubnetId; + } + + /** + * Set the podSubnetId property: The ID of the subnet which pods will join when launched. If omitted, pod IPs are + * statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param podSubnetId the podSubnetId value to set. + * @return the MachineNetworkProperties object itself. + */ + public MachineNetworkProperties withPodSubnetId(String podSubnetId) { + this.podSubnetId = podSubnetId; + return this; + } + + /** + * Get the enableNodePublicIp property: Whether the machine is allocated its own public IP. Some scenarios may + * require the machine to receive their own dedicated public IP addresses. A common scenario is for gaming + * workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. The + * default is false. + * + * @return the enableNodePublicIp value. + */ + public Boolean enableNodePublicIp() { + return this.enableNodePublicIp; + } + + /** + * Set the enableNodePublicIp property: Whether the machine is allocated its own public IP. Some scenarios may + * require the machine to receive their own dedicated public IP addresses. A common scenario is for gaming + * workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. The + * default is false. + * + * @param enableNodePublicIp the enableNodePublicIp value to set. + * @return the MachineNetworkProperties object itself. + */ + public MachineNetworkProperties withEnableNodePublicIp(Boolean enableNodePublicIp) { + this.enableNodePublicIp = enableNodePublicIp; + return this; + } + + /** + * Get the nodePublicIpPrefixId property: The public IP prefix ID which VM node should use IPs from. This is of the + * form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * + * @return the nodePublicIpPrefixId value. + */ + public String nodePublicIpPrefixId() { + return this.nodePublicIpPrefixId; + } + + /** + * Set the nodePublicIpPrefixId property: The public IP prefix ID which VM node should use IPs from. This is of the + * form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * + * @param nodePublicIpPrefixId the nodePublicIpPrefixId value to set. + * @return the MachineNetworkProperties object itself. + */ + public MachineNetworkProperties withNodePublicIpPrefixId(String nodePublicIpPrefixId) { + this.nodePublicIpPrefixId = nodePublicIpPrefixId; + return this; + } + + /** + * Get the nodePublicIpTags property: IPTags of instance-level public IPs. + * + * @return the nodePublicIpTags value. + */ + public List<IpTag> nodePublicIpTags() { + return this.nodePublicIpTags; + } + + /** + * Set the nodePublicIpTags property: IPTags of instance-level public IPs. + * + * @param nodePublicIpTags the nodePublicIpTags value to set. + * @return the MachineNetworkProperties object itself. + */ + public MachineNetworkProperties withNodePublicIpTags(List<IpTag> nodePublicIpTags) { + this.nodePublicIpTags = nodePublicIpTags; + return this; + } + /** * Validates the instance. * @@ -46,6 +202,9 @@ public void validate() { if (ipAddresses() != null) { ipAddresses().forEach(e -> e.validate()); } + if (nodePublicIpTags() != null) { + nodePublicIpTags().forEach(e -> e.validate()); + } } /** @@ -54,6 +213,12 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("vnetSubnetID", this.vnetSubnetId); + jsonWriter.writeStringField("podSubnetID", this.podSubnetId); + jsonWriter.writeBooleanField("enableNodePublicIP", this.enableNodePublicIp); + jsonWriter.writeStringField("nodePublicIPPrefixID", this.nodePublicIpPrefixId); + jsonWriter.writeArrayField("nodePublicIPTags", this.nodePublicIpTags, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -76,6 +241,18 @@ public static MachineNetworkProperties fromJson(JsonReader jsonReader) throws IO List<MachineIpAddress> ipAddresses = reader.readArray(reader1 -> MachineIpAddress.fromJson(reader1)); deserializedMachineNetworkProperties.ipAddresses = ipAddresses; + } else if ("vnetSubnetID".equals(fieldName)) { + deserializedMachineNetworkProperties.vnetSubnetId = reader.getString(); + } else if ("podSubnetID".equals(fieldName)) { + deserializedMachineNetworkProperties.podSubnetId = reader.getString(); + } else if ("enableNodePublicIP".equals(fieldName)) { + deserializedMachineNetworkProperties.enableNodePublicIp + = reader.getNullable(JsonReader::getBoolean); + } else if ("nodePublicIPPrefixID".equals(fieldName)) { + deserializedMachineNetworkProperties.nodePublicIpPrefixId = reader.getString(); + } else if ("nodePublicIPTags".equals(fieldName)) { + List<IpTag> nodePublicIpTags = reader.readArray(reader1 -> IpTag.fromJson(reader1)); + deserializedMachineNetworkProperties.nodePublicIpTags = nodePublicIpTags; } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfile.java new file mode 100644 index 000000000000..57d9a30b45a9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfile.java @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The operating system and disk used by the machine. + */ +@Fluent +public final class MachineOSProfile implements JsonSerializable<MachineOSProfile> { + /* + * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + */ + private OSType osType; + + /* + * Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or + * Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is + * deprecated. + */ + private OSSku osSku; + + /* + * OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify + * 0, it will apply the default osDisk size according to the vmSize specified. + */ + private Integer osDiskSizeGB; + + /* + * The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and + * has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + * after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + */ + private OSDiskType osDiskType; + + /* + * Whether to use a FIPS-enabled OS. + */ + private Boolean enableFips; + + /* + * The Linux machine's specific profile. + */ + private MachineOSProfileLinuxProfile linuxProfile; + + /* + * The Windows machine's specific profile. + */ + private AgentPoolWindowsProfile windowsProfile; + + /** + * Creates an instance of MachineOSProfile class. + */ + public MachineOSProfile() { + } + + /** + * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.osType; + } + + /** + * Set the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + * + * @param osType the osType value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Get the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after + * Windows2019 is deprecated. + * + * @return the osSku value. + */ + public OSSku osSku() { + return this.osSku; + } + + /** + * Set the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after + * Windows2019 is deprecated. + * + * @param osSku the osSku value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withOsSku(OSSku osSku) { + this.osSku = osSku; + return this; + } + + /** + * Get the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the + * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + * + * @return the osDiskSizeGB value. + */ + public Integer osDiskSizeGB() { + return this.osDiskSizeGB; + } + + /** + * Set the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the + * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + * + * @param osDiskSizeGB the osDiskSizeGB value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withOsDiskSizeGB(Integer osDiskSizeGB) { + this.osDiskSizeGB = osDiskSizeGB; + return this; + } + + /** + * Get the osDiskType property: The OS disk type to be used for machines in the agent pool. The default is + * 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, + * defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + * + * @return the osDiskType value. + */ + public OSDiskType osDiskType() { + return this.osDiskType; + } + + /** + * Set the osDiskType property: The OS disk type to be used for machines in the agent pool. The default is + * 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, + * defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + * + * @param osDiskType the osDiskType value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withOsDiskType(OSDiskType osDiskType) { + this.osDiskType = osDiskType; + return this; + } + + /** + * Get the enableFips property: Whether to use a FIPS-enabled OS. + * + * @return the enableFips value. + */ + public Boolean enableFips() { + return this.enableFips; + } + + /** + * Set the enableFips property: Whether to use a FIPS-enabled OS. + * + * @param enableFips the enableFips value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withEnableFips(Boolean enableFips) { + this.enableFips = enableFips; + return this; + } + + /** + * Get the linuxProfile property: The Linux machine's specific profile. + * + * @return the linuxProfile value. + */ + public MachineOSProfileLinuxProfile linuxProfile() { + return this.linuxProfile; + } + + /** + * Set the linuxProfile property: The Linux machine's specific profile. + * + * @param linuxProfile the linuxProfile value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withLinuxProfile(MachineOSProfileLinuxProfile linuxProfile) { + this.linuxProfile = linuxProfile; + return this; + } + + /** + * Get the windowsProfile property: The Windows machine's specific profile. + * + * @return the windowsProfile value. + */ + public AgentPoolWindowsProfile windowsProfile() { + return this.windowsProfile; + } + + /** + * Set the windowsProfile property: The Windows machine's specific profile. + * + * @param windowsProfile the windowsProfile value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { + this.windowsProfile = windowsProfile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (linuxProfile() != null) { + linuxProfile().validate(); + } + if (windowsProfile() != null) { + windowsProfile().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); + jsonWriter.writeStringField("osSKU", this.osSku == null ? null : this.osSku.toString()); + jsonWriter.writeNumberField("osDiskSizeGB", this.osDiskSizeGB); + jsonWriter.writeStringField("osDiskType", this.osDiskType == null ? null : this.osDiskType.toString()); + jsonWriter.writeBooleanField("enableFIPS", this.enableFips); + jsonWriter.writeJsonField("linuxProfile", this.linuxProfile); + jsonWriter.writeJsonField("windowsProfile", this.windowsProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineOSProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineOSProfile if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineOSProfile. + */ + public static MachineOSProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineOSProfile deserializedMachineOSProfile = new MachineOSProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("osType".equals(fieldName)) { + deserializedMachineOSProfile.osType = OSType.fromString(reader.getString()); + } else if ("osSKU".equals(fieldName)) { + deserializedMachineOSProfile.osSku = OSSku.fromString(reader.getString()); + } else if ("osDiskSizeGB".equals(fieldName)) { + deserializedMachineOSProfile.osDiskSizeGB = reader.getNullable(JsonReader::getInt); + } else if ("osDiskType".equals(fieldName)) { + deserializedMachineOSProfile.osDiskType = OSDiskType.fromString(reader.getString()); + } else if ("enableFIPS".equals(fieldName)) { + deserializedMachineOSProfile.enableFips = reader.getNullable(JsonReader::getBoolean); + } else if ("linuxProfile".equals(fieldName)) { + deserializedMachineOSProfile.linuxProfile = MachineOSProfileLinuxProfile.fromJson(reader); + } else if ("windowsProfile".equals(fieldName)) { + deserializedMachineOSProfile.windowsProfile = AgentPoolWindowsProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineOSProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfileLinuxProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfileLinuxProfile.java new file mode 100644 index 000000000000..ef7ad45400b8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfileLinuxProfile.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Linux machine's specific profile. + */ +@Fluent +public final class MachineOSProfileLinuxProfile implements JsonSerializable<MachineOSProfileLinuxProfile> { + /* + * The OS configuration of Linux machine. + */ + private LinuxOSConfig linuxOSConfig; + + /* + * Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd + * after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for + * Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script). + */ + private String messageOfTheDay; + + /** + * Creates an instance of MachineOSProfileLinuxProfile class. + */ + public MachineOSProfileLinuxProfile() { + } + + /** + * Get the linuxOSConfig property: The OS configuration of Linux machine. + * + * @return the linuxOSConfig value. + */ + public LinuxOSConfig linuxOSConfig() { + return this.linuxOSConfig; + } + + /** + * Set the linuxOSConfig property: The OS configuration of Linux machine. + * + * @param linuxOSConfig the linuxOSConfig value to set. + * @return the MachineOSProfileLinuxProfile object itself. + */ + public MachineOSProfileLinuxProfile withLinuxOSConfig(LinuxOSConfig linuxOSConfig) { + this.linuxOSConfig = linuxOSConfig; + return this; + } + + /** + * Get the messageOfTheDay property: Message of the day for Linux nodes, base64-encoded. A base64-encoded string + * which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux + * nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not + * be executed as a script). + * + * @return the messageOfTheDay value. + */ + public String messageOfTheDay() { + return this.messageOfTheDay; + } + + /** + * Set the messageOfTheDay property: Message of the day for Linux nodes, base64-encoded. A base64-encoded string + * which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux + * nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not + * be executed as a script). + * + * @param messageOfTheDay the messageOfTheDay value to set. + * @return the MachineOSProfileLinuxProfile object itself. + */ + public MachineOSProfileLinuxProfile withMessageOfTheDay(String messageOfTheDay) { + this.messageOfTheDay = messageOfTheDay; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (linuxOSConfig() != null) { + linuxOSConfig().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("linuxOSConfig", this.linuxOSConfig); + jsonWriter.writeStringField("messageOfTheDay", this.messageOfTheDay); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineOSProfileLinuxProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineOSProfileLinuxProfile if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineOSProfileLinuxProfile. + */ + public static MachineOSProfileLinuxProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineOSProfileLinuxProfile deserializedMachineOSProfileLinuxProfile = new MachineOSProfileLinuxProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("linuxOSConfig".equals(fieldName)) { + deserializedMachineOSProfileLinuxProfile.linuxOSConfig = LinuxOSConfig.fromJson(reader); + } else if ("messageOfTheDay".equals(fieldName)) { + deserializedMachineOSProfileLinuxProfile.messageOfTheDay = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineOSProfileLinuxProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java index 2f167587df26..2fa217d81c35 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java @@ -4,28 +4,86 @@ package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.Map; /** * The properties of the machine. */ -@Immutable +@Fluent public final class MachineProperties implements JsonSerializable<MachineProperties> { /* - * network properties of the machine + * The network properties of the machine */ private MachineNetworkProperties network; /* - * Azure resource id of the machine. It can be used to GET underlying VM Instance + * Arm resource id of the machine. It can be used to GET underlying VM Instance */ private String resourceId; + /* + * The hardware and GPU settings of the machine. + */ + private MachineHardwareProfile hardware; + + /* + * The operating system and disk used by the machine. + */ + private MachineOSProfile operatingSystem; + + /* + * The Kubernetes configurations used by the machine. + */ + private MachineKubernetesProfile kubernetes; + + /* + * Machine only allows 'System' and 'User' mode. + */ + private AgentPoolMode mode; + + /* + * The security settings of the machine. + */ + private AgentPoolSecurityProfile security; + + /* + * The priority for the machine. If not specified, the default is 'Regular'. + */ + private ScaleSetPriority priority; + + /* + * The version of node image. + */ + private String nodeImageVersion; + + /* + * The current deployment or provisioning state. + */ + private String provisioningState; + + /* + * The tags to be persisted on the machine. + */ + private Map<String, String> tags; + + /* + * Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is + * updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable + * optimistic concurrency per the normal eTag convention. + */ + private String etag; + + /* + * Contains read-only information about the machine. + */ + private MachineStatus status; + /** * Creates an instance of MachineProperties class. */ @@ -33,7 +91,7 @@ public MachineProperties() { } /** - * Get the network property: network properties of the machine. + * Get the network property: The network properties of the machine. * * @return the network value. */ @@ -42,7 +100,18 @@ public MachineNetworkProperties network() { } /** - * Get the resourceId property: Azure resource id of the machine. It can be used to GET underlying VM Instance. + * Set the network property: The network properties of the machine. + * + * @param network the network value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withNetwork(MachineNetworkProperties network) { + this.network = network; + return this; + } + + /** + * Get the resourceId property: Arm resource id of the machine. It can be used to GET underlying VM Instance. * * @return the resourceId value. */ @@ -50,6 +119,184 @@ public String resourceId() { return this.resourceId; } + /** + * Get the hardware property: The hardware and GPU settings of the machine. + * + * @return the hardware value. + */ + public MachineHardwareProfile hardware() { + return this.hardware; + } + + /** + * Set the hardware property: The hardware and GPU settings of the machine. + * + * @param hardware the hardware value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withHardware(MachineHardwareProfile hardware) { + this.hardware = hardware; + return this; + } + + /** + * Get the operatingSystem property: The operating system and disk used by the machine. + * + * @return the operatingSystem value. + */ + public MachineOSProfile operatingSystem() { + return this.operatingSystem; + } + + /** + * Set the operatingSystem property: The operating system and disk used by the machine. + * + * @param operatingSystem the operatingSystem value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withOperatingSystem(MachineOSProfile operatingSystem) { + this.operatingSystem = operatingSystem; + return this; + } + + /** + * Get the kubernetes property: The Kubernetes configurations used by the machine. + * + * @return the kubernetes value. + */ + public MachineKubernetesProfile kubernetes() { + return this.kubernetes; + } + + /** + * Set the kubernetes property: The Kubernetes configurations used by the machine. + * + * @param kubernetes the kubernetes value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withKubernetes(MachineKubernetesProfile kubernetes) { + this.kubernetes = kubernetes; + return this; + } + + /** + * Get the mode property: Machine only allows 'System' and 'User' mode. + * + * @return the mode value. + */ + public AgentPoolMode mode() { + return this.mode; + } + + /** + * Set the mode property: Machine only allows 'System' and 'User' mode. + * + * @param mode the mode value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withMode(AgentPoolMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the security property: The security settings of the machine. + * + * @return the security value. + */ + public AgentPoolSecurityProfile security() { + return this.security; + } + + /** + * Set the security property: The security settings of the machine. + * + * @param security the security value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withSecurity(AgentPoolSecurityProfile security) { + this.security = security; + return this; + } + + /** + * Get the priority property: The priority for the machine. If not specified, the default is 'Regular'. + * + * @return the priority value. + */ + public ScaleSetPriority priority() { + return this.priority; + } + + /** + * Set the priority property: The priority for the machine. If not specified, the default is 'Regular'. + * + * @param priority the priority value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withPriority(ScaleSetPriority priority) { + this.priority = priority; + return this; + } + + /** + * Get the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + public String nodeImageVersion() { + return this.nodeImageVersion; + } + + /** + * Get the provisioningState property: The current deployment or provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the tags property: The tags to be persisted on the machine. + * + * @return the tags value. + */ + public Map<String, String> tags() { + return this.tags; + } + + /** + * Set the tags property: The tags to be persisted on the machine. + * + * @param tags the tags value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withTags(Map<String, String> tags) { + this.tags = tags; + return this; + } + + /** + * Get the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will + * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a + * subsequent request to enable optimistic concurrency per the normal eTag convention. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Get the status property: Contains read-only information about the machine. + * + * @return the status value. + */ + public MachineStatus status() { + return this.status; + } + /** * Validates the instance. * @@ -59,6 +306,21 @@ public void validate() { if (network() != null) { network().validate(); } + if (hardware() != null) { + hardware().validate(); + } + if (operatingSystem() != null) { + operatingSystem().validate(); + } + if (kubernetes() != null) { + kubernetes().validate(); + } + if (security() != null) { + security().validate(); + } + if (status() != null) { + status().validate(); + } } /** @@ -67,6 +329,14 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("network", this.network); + jsonWriter.writeJsonField("hardware", this.hardware); + jsonWriter.writeJsonField("operatingSystem", this.operatingSystem); + jsonWriter.writeJsonField("kubernetes", this.kubernetes); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeJsonField("security", this.security); + jsonWriter.writeStringField("priority", this.priority == null ? null : this.priority.toString()); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -89,6 +359,29 @@ public static MachineProperties fromJson(JsonReader jsonReader) throws IOExcepti deserializedMachineProperties.network = MachineNetworkProperties.fromJson(reader); } else if ("resourceId".equals(fieldName)) { deserializedMachineProperties.resourceId = reader.getString(); + } else if ("hardware".equals(fieldName)) { + deserializedMachineProperties.hardware = MachineHardwareProfile.fromJson(reader); + } else if ("operatingSystem".equals(fieldName)) { + deserializedMachineProperties.operatingSystem = MachineOSProfile.fromJson(reader); + } else if ("kubernetes".equals(fieldName)) { + deserializedMachineProperties.kubernetes = MachineKubernetesProfile.fromJson(reader); + } else if ("mode".equals(fieldName)) { + deserializedMachineProperties.mode = AgentPoolMode.fromString(reader.getString()); + } else if ("security".equals(fieldName)) { + deserializedMachineProperties.security = AgentPoolSecurityProfile.fromJson(reader); + } else if ("priority".equals(fieldName)) { + deserializedMachineProperties.priority = ScaleSetPriority.fromString(reader.getString()); + } else if ("nodeImageVersion".equals(fieldName)) { + deserializedMachineProperties.nodeImageVersion = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedMachineProperties.provisioningState = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedMachineProperties.tags = tags; + } else if ("eTag".equals(fieldName)) { + deserializedMachineProperties.etag = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedMachineProperties.status = MachineStatus.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineStatus.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineStatus.java new file mode 100644 index 000000000000..5f0bfabe70fa --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineStatus.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Contains read-only information about the machine. + */ +@Immutable +public final class MachineStatus implements JsonSerializable<MachineStatus> { + /* + * The error details information of the machine. Preserves the detailed info of failure. If there was no error, this + * field is omitted. + */ + private ManagementError provisioningError; + + /* + * Specifies the time at which the machine was created. + */ + private OffsetDateTime creationTimestamp; + + /* + * The drift action of the machine. Indicates whether a machine has deviated from its expected state due to changes + * in managed cluster properties, requiring corrective action. + */ + private DriftAction driftAction; + + /* + * Reason for machine drift. Provides detailed information on why the machine has drifted. This field is omitted if + * the machine is up to date. + */ + private String driftReason; + + /* + * Virtual machine state. Indicates the current state of the underlying virtual machine. + */ + private VmState vmState; + + /** + * Creates an instance of MachineStatus class. + */ + public MachineStatus() { + } + + /** + * Get the provisioningError property: The error details information of the machine. Preserves the detailed info of + * failure. If there was no error, this field is omitted. + * + * @return the provisioningError value. + */ + public ManagementError provisioningError() { + return this.provisioningError; + } + + /** + * Get the creationTimestamp property: Specifies the time at which the machine was created. + * + * @return the creationTimestamp value. + */ + public OffsetDateTime creationTimestamp() { + return this.creationTimestamp; + } + + /** + * Get the driftAction property: The drift action of the machine. Indicates whether a machine has deviated from its + * expected state due to changes in managed cluster properties, requiring corrective action. + * + * @return the driftAction value. + */ + public DriftAction driftAction() { + return this.driftAction; + } + + /** + * Get the driftReason property: Reason for machine drift. Provides detailed information on why the machine has + * drifted. This field is omitted if the machine is up to date. + * + * @return the driftReason value. + */ + public String driftReason() { + return this.driftReason; + } + + /** + * Get the vmState property: Virtual machine state. Indicates the current state of the underlying virtual machine. + * + * @return the vmState value. + */ + public VmState vmState() { + return this.vmState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineStatus if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineStatus. + */ + public static MachineStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineStatus deserializedMachineStatus = new MachineStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningError".equals(fieldName)) { + deserializedMachineStatus.provisioningError = ManagementError.fromJson(reader); + } else if ("creationTimestamp".equals(fieldName)) { + deserializedMachineStatus.creationTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("driftAction".equals(fieldName)) { + deserializedMachineStatus.driftAction = DriftAction.fromString(reader.getString()); + } else if ("driftReason".equals(fieldName)) { + deserializedMachineStatus.driftReason = reader.getString(); + } else if ("vmState".equals(fieldName)) { + deserializedMachineStatus.vmState = VmState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineStatus; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java index b5b236a5b5cc..55c754ef20ea 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java @@ -31,13 +31,8 @@ public final class ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoo private String provisioningState; /* - * The version of node image - */ - private String nodeImageVersion; - - /* - * The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version - * <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion is <major.minor>, this field + * The version of Kubernetes running on the Agent Pool. If orchestratorVersion was a fully specified version + * <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion was <major.minor>, this field * will contain the full <major.minor.patch> version being used. */ private String currentOrchestratorVersion; @@ -88,19 +83,9 @@ public String provisioningState() { } /** - * Get the nodeImageVersion property: The version of node image. - * - * @return the nodeImageVersion value. - */ - @Override - public String nodeImageVersion() { - return this.nodeImageVersion; - } - - /** - * Get the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. If - * orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to - * it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> + * Get the currentOrchestratorVersion property: The version of Kubernetes running on the Agent Pool. If + * orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> * version being used. * * @return the currentOrchestratorVersion value. @@ -302,6 +287,24 @@ public ManagedClusterAgentPoolProfile withOrchestratorVersion(String orchestrato return this; } + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withNodeImageVersion(String nodeImageVersion) { + super.withNodeImageVersion(nodeImageVersion); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withUpgradeStrategy(UpgradeStrategy upgradeStrategy) { + super.withUpgradeStrategy(upgradeStrategy); + return this; + } + /** * {@inheritDoc} */ @@ -311,6 +314,16 @@ public ManagedClusterAgentPoolProfile withUpgradeSettings(AgentPoolUpgradeSettin return this; } + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile + withUpgradeSettingsBlueGreen(AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen) { + super.withUpgradeSettingsBlueGreen(upgradeSettingsBlueGreen); + return this; + } + /** * {@inheritDoc} */ @@ -401,6 +414,15 @@ public ManagedClusterAgentPoolProfile withNodeTaints(List<String> nodeTaints) { return this; } + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withNodeInitializationTaints(List<String> nodeInitializationTaints) { + super.withNodeInitializationTaints(nodeInitializationTaints); + return this; + } + /** * {@inheritDoc} */ @@ -495,8 +517,8 @@ public ManagedClusterAgentPoolProfile withHostGroupId(String hostGroupId) { * {@inheritDoc} */ @Override - public ManagedClusterAgentPoolProfile withNetworkProfile(AgentPoolNetworkProfile networkProfile) { - super.withNetworkProfile(networkProfile); + public ManagedClusterAgentPoolProfile withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { + super.withWindowsProfile(windowsProfile); return this; } @@ -504,8 +526,8 @@ public ManagedClusterAgentPoolProfile withNetworkProfile(AgentPoolNetworkProfile * {@inheritDoc} */ @Override - public ManagedClusterAgentPoolProfile withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { - super.withWindowsProfile(windowsProfile); + public ManagedClusterAgentPoolProfile withNetworkProfile(AgentPoolNetworkProfile networkProfile) { + super.withNetworkProfile(networkProfile); return this; } @@ -531,8 +553,9 @@ public ManagedClusterAgentPoolProfile withGpuProfile(GpuProfile gpuProfile) { * {@inheritDoc} */ @Override - public ManagedClusterAgentPoolProfile withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { - super.withGatewayProfile(gatewayProfile); + public ManagedClusterAgentPoolProfile + withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile) { + super.withArtifactStreamingProfile(artifactStreamingProfile); return this; } @@ -555,6 +578,15 @@ public ManagedClusterAgentPoolProfile withVirtualMachinesProfile(VirtualMachines return this; } + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { + super.withGatewayProfile(gatewayProfile); + return this; + } + /** * {@inheritDoc} */ @@ -573,6 +605,16 @@ public ManagedClusterAgentPoolProfile withLocalDnsProfile(LocalDnsProfile localD return this; } + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile + withNodeCustomizationProfile(NodeCustomizationProfile nodeCustomizationProfile) { + super.withNodeCustomizationProfile(nodeCustomizationProfile); + return this; + } + /** * Validates the instance. * @@ -588,6 +630,9 @@ public void validate() { if (upgradeSettings() != null) { upgradeSettings().validate(); } + if (upgradeSettingsBlueGreen() != null) { + upgradeSettingsBlueGreen().validate(); + } if (powerState() != null) { powerState().validate(); } @@ -600,20 +645,20 @@ public void validate() { if (creationData() != null) { creationData().validate(); } - if (networkProfile() != null) { - networkProfile().validate(); - } if (windowsProfile() != null) { windowsProfile().validate(); } + if (networkProfile() != null) { + networkProfile().validate(); + } if (securityProfile() != null) { securityProfile().validate(); } if (gpuProfile() != null) { gpuProfile().validate(); } - if (gatewayProfile() != null) { - gatewayProfile().validate(); + if (artifactStreamingProfile() != null) { + artifactStreamingProfile().validate(); } if (virtualMachinesProfile() != null) { virtualMachinesProfile().validate(); @@ -621,12 +666,18 @@ public void validate() { if (virtualMachineNodesStatus() != null) { virtualMachineNodesStatus().forEach(e -> e.validate()); } + if (gatewayProfile() != null) { + gatewayProfile().validate(); + } if (status() != null) { status().validate(); } if (localDnsProfile() != null) { localDnsProfile().validate(); } + if (nodeCustomizationProfile() != null) { + nodeCustomizationProfile().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterAgentPoolProfile.class); @@ -658,7 +709,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("type", type() == null ? null : type().toString()); jsonWriter.writeStringField("mode", mode() == null ? null : mode().toString()); jsonWriter.writeStringField("orchestratorVersion", orchestratorVersion()); + jsonWriter.writeStringField("nodeImageVersion", nodeImageVersion()); + jsonWriter.writeStringField("upgradeStrategy", upgradeStrategy() == null ? null : upgradeStrategy().toString()); jsonWriter.writeJsonField("upgradeSettings", upgradeSettings()); + jsonWriter.writeJsonField("upgradeSettingsBlueGreen", upgradeSettingsBlueGreen()); jsonWriter.writeJsonField("powerState", powerState()); jsonWriter.writeArrayField("availabilityZones", availabilityZones(), (writer, element) -> writer.writeString(element)); @@ -672,6 +726,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("nodeLabels", nodeLabels(), (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("nodeTaints", nodeTaints(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("nodeInitializationTaints", nodeInitializationTaints(), + (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("proximityPlacementGroupID", proximityPlacementGroupId()); jsonWriter.writeJsonField("kubeletConfig", kubeletConfig()); jsonWriter.writeJsonField("linuxOSConfig", linuxOSConfig()); @@ -683,16 +739,18 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("creationData", creationData()); jsonWriter.writeStringField("capacityReservationGroupID", capacityReservationGroupId()); jsonWriter.writeStringField("hostGroupID", hostGroupId()); - jsonWriter.writeJsonField("networkProfile", networkProfile()); jsonWriter.writeJsonField("windowsProfile", windowsProfile()); + jsonWriter.writeJsonField("networkProfile", networkProfile()); jsonWriter.writeJsonField("securityProfile", securityProfile()); jsonWriter.writeJsonField("gpuProfile", gpuProfile()); - jsonWriter.writeJsonField("gatewayProfile", gatewayProfile()); + jsonWriter.writeJsonField("artifactStreamingProfile", artifactStreamingProfile()); jsonWriter.writeJsonField("virtualMachinesProfile", virtualMachinesProfile()); jsonWriter.writeArrayField("virtualMachineNodesStatus", virtualMachineNodesStatus(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("gatewayProfile", gatewayProfile()); jsonWriter.writeJsonField("status", status()); jsonWriter.writeJsonField("localDNSProfile", localDnsProfile()); + jsonWriter.writeJsonField("nodeCustomizationProfile", nodeCustomizationProfile()); jsonWriter.writeStringField("name", this.name); return jsonWriter.writeEndObject(); } @@ -765,10 +823,16 @@ public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) thr } else if ("currentOrchestratorVersion".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.currentOrchestratorVersion = reader.getString(); } else if ("nodeImageVersion".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.nodeImageVersion = reader.getString(); + deserializedManagedClusterAgentPoolProfile.withNodeImageVersion(reader.getString()); + } else if ("upgradeStrategy".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withUpgradeStrategy(UpgradeStrategy.fromString(reader.getString())); } else if ("upgradeSettings".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile .withUpgradeSettings(AgentPoolUpgradeSettings.fromJson(reader)); + } else if ("upgradeSettingsBlueGreen".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withUpgradeSettingsBlueGreen(AgentPoolBlueGreenUpgradeSettings.fromJson(reader)); } else if ("provisioningState".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.provisioningState = reader.getString(); } else if ("powerState".equals(fieldName)) { @@ -799,6 +863,9 @@ public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) thr } else if ("nodeTaints".equals(fieldName)) { List<String> nodeTaints = reader.readArray(reader1 -> reader1.getString()); deserializedManagedClusterAgentPoolProfile.withNodeTaints(nodeTaints); + } else if ("nodeInitializationTaints".equals(fieldName)) { + List<String> nodeInitializationTaints = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterAgentPoolProfile.withNodeInitializationTaints(nodeInitializationTaints); } else if ("proximityPlacementGroupID".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.withProximityPlacementGroupId(reader.getString()); } else if ("kubeletConfig".equals(fieldName)) { @@ -823,20 +890,20 @@ public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) thr deserializedManagedClusterAgentPoolProfile.withCapacityReservationGroupId(reader.getString()); } else if ("hostGroupID".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.withHostGroupId(reader.getString()); - } else if ("networkProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withNetworkProfile(AgentPoolNetworkProfile.fromJson(reader)); } else if ("windowsProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile .withWindowsProfile(AgentPoolWindowsProfile.fromJson(reader)); + } else if ("networkProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withNetworkProfile(AgentPoolNetworkProfile.fromJson(reader)); } else if ("securityProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile .withSecurityProfile(AgentPoolSecurityProfile.fromJson(reader)); } else if ("gpuProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.withGpuProfile(GpuProfile.fromJson(reader)); - } else if ("gatewayProfile".equals(fieldName)) { + } else if ("artifactStreamingProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile - .withGatewayProfile(AgentPoolGatewayProfile.fromJson(reader)); + .withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile.fromJson(reader)); } else if ("virtualMachinesProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile .withVirtualMachinesProfile(VirtualMachinesProfile.fromJson(reader)); @@ -844,10 +911,16 @@ public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) thr List<VirtualMachineNodes> virtualMachineNodesStatus = reader.readArray(reader1 -> VirtualMachineNodes.fromJson(reader1)); deserializedManagedClusterAgentPoolProfile.withVirtualMachineNodesStatus(virtualMachineNodesStatus); + } else if ("gatewayProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withGatewayProfile(AgentPoolGatewayProfile.fromJson(reader)); } else if ("status".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.withStatus(AgentPoolStatus.fromJson(reader)); } else if ("localDNSProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.withLocalDnsProfile(LocalDnsProfile.fromJson(reader)); + } else if ("nodeCustomizationProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withNodeCustomizationProfile(NodeCustomizationProfile.fromJson(reader)); } else if ("name".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.name = reader.getString(); } else { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java index b1ba9d300a4e..d069c9903b07 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java @@ -50,14 +50,13 @@ public final class ManagedClusterApiServerAccessProfile private Boolean disableRunCommand; /* - * Whether to enable apiserver vnet integration for the cluster or not. See aka.ms/AksVnetIntegration for more - * details. + * Whether to enable apiserver vnet integration for the cluster or not. */ private Boolean enableVnetIntegration; /* - * The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new cluster with - * BYO Vnet, or when updating an existing cluster to enable apiserver vnet integration. + * The subnet to be used when apiserver vnet integration is enabled. It is required when: 1. creating a new cluster + * with BYO Vnet; 2. updating an existing cluster to enable apiserver vnet integration. */ private String subnetId; @@ -185,8 +184,7 @@ public ManagedClusterApiServerAccessProfile withDisableRunCommand(Boolean disabl } /** - * Get the enableVnetIntegration property: Whether to enable apiserver vnet integration for the cluster or not. See - * aka.ms/AksVnetIntegration for more details. + * Get the enableVnetIntegration property: Whether to enable apiserver vnet integration for the cluster or not. * * @return the enableVnetIntegration value. */ @@ -195,8 +193,7 @@ public Boolean enableVnetIntegration() { } /** - * Set the enableVnetIntegration property: Whether to enable apiserver vnet integration for the cluster or not. See - * aka.ms/AksVnetIntegration for more details. + * Set the enableVnetIntegration property: Whether to enable apiserver vnet integration for the cluster or not. * * @param enableVnetIntegration the enableVnetIntegration value to set. * @return the ManagedClusterApiServerAccessProfile object itself. @@ -207,8 +204,8 @@ public ManagedClusterApiServerAccessProfile withEnableVnetIntegration(Boolean en } /** - * Get the subnetId property: The subnet to be used when apiserver vnet integration is enabled. It is required when - * creating a new cluster with BYO Vnet, or when updating an existing cluster to enable apiserver vnet integration. + * Get the subnetId property: The subnet to be used when apiserver vnet integration is enabled. It is required when: + * 1. creating a new cluster with BYO Vnet; 2. updating an existing cluster to enable apiserver vnet integration. * * @return the subnetId value. */ @@ -217,8 +214,8 @@ public String subnetId() { } /** - * Set the subnetId property: The subnet to be used when apiserver vnet integration is enabled. It is required when - * creating a new cluster with BYO Vnet, or when updating an existing cluster to enable apiserver vnet integration. + * Set the subnetId property: The subnet to be used when apiserver vnet integration is enabled. It is required when: + * 1. creating a new cluster with BYO Vnet; 2. updating an existing cluster to enable apiserver vnet integration. * * @param subnetId the subnetId value to set. * @return the ManagedClusterApiServerAccessProfile object itself. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java index cf6a236cb42e..d7546883b228 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java @@ -23,7 +23,8 @@ public final class ManagedClusterAutoUpgradeProfile implements JsonSerializable< private UpgradeChannel upgradeChannel; /* - * Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. + * Manner in which the OS on your nodes is updated. The default is Unmanaged, but may change to either NodeImage or + * SecurityPatch at GA. */ private NodeOSUpgradeChannel nodeOSUpgradeChannel; @@ -58,8 +59,8 @@ public ManagedClusterAutoUpgradeProfile withUpgradeChannel(UpgradeChannel upgrad } /** - * Get the nodeOSUpgradeChannel property: Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. - * The default is NodeImage. + * Get the nodeOSUpgradeChannel property: Manner in which the OS on your nodes is updated. The default is Unmanaged, + * but may change to either NodeImage or SecurityPatch at GA. * * @return the nodeOSUpgradeChannel value. */ @@ -68,8 +69,8 @@ public NodeOSUpgradeChannel nodeOSUpgradeChannel() { } /** - * Set the nodeOSUpgradeChannel property: Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. - * The default is NodeImage. + * Set the nodeOSUpgradeChannel property: Manner in which the OS on your nodes is updated. The default is Unmanaged, + * but may change to either NodeImage or SecurityPatch at GA. * * @param nodeOSUpgradeChannel the nodeOSUpgradeChannel value to set. * @return the ManagedClusterAutoUpgradeProfile object itself. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java index 929046a73d98..43d1c487b0df 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java @@ -12,17 +12,28 @@ import java.io.IOException; /** - * Azure Monitor addon profiles for monitoring the managed cluster. + * Prometheus addon profile for the container service cluster. */ @Fluent public final class ManagedClusterAzureMonitorProfile implements JsonSerializable<ManagedClusterAzureMonitorProfile> { /* - * Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes - * infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom - * targets. See aka.ms/AzureManagedPrometheus for an overview. + * Metrics profile for the prometheus service addon */ private ManagedClusterAzureMonitorProfileMetrics metrics; + /* + * Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and Container stdout & stderr logs etc. + * See aka.ms/AzureMonitorContainerInsights for an overview. + */ + private ManagedClusterAzureMonitorProfileContainerInsights containerInsights; + + /* + * Application Monitoring Profile for Kubernetes Application Container. Collects application logs, metrics and + * traces through auto-instrumentation of the application using Azure Monitor OpenTelemetry based SDKs. See + * aka.ms/AzureMonitorApplicationMonitoring for an overview. + */ + private ManagedClusterAzureMonitorProfileAppMonitoring appMonitoring; + /** * Creates an instance of ManagedClusterAzureMonitorProfile class. */ @@ -30,9 +41,7 @@ public ManagedClusterAzureMonitorProfile() { } /** - * Get the metrics property: Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect - * out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional - * scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. + * Get the metrics property: Metrics profile for the prometheus service addon. * * @return the metrics value. */ @@ -41,9 +50,7 @@ public ManagedClusterAzureMonitorProfileMetrics metrics() { } /** - * Set the metrics property: Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect - * out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional - * scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. + * Set the metrics property: Metrics profile for the prometheus service addon. * * @param metrics the metrics value to set. * @return the ManagedClusterAzureMonitorProfile object itself. @@ -53,6 +60,54 @@ public ManagedClusterAzureMonitorProfile withMetrics(ManagedClusterAzureMonitorP return this; } + /** + * Get the containerInsights property: Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and + * Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. + * + * @return the containerInsights value. + */ + public ManagedClusterAzureMonitorProfileContainerInsights containerInsights() { + return this.containerInsights; + } + + /** + * Set the containerInsights property: Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and + * Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. + * + * @param containerInsights the containerInsights value to set. + * @return the ManagedClusterAzureMonitorProfile object itself. + */ + public ManagedClusterAzureMonitorProfile + withContainerInsights(ManagedClusterAzureMonitorProfileContainerInsights containerInsights) { + this.containerInsights = containerInsights; + return this; + } + + /** + * Get the appMonitoring property: Application Monitoring Profile for Kubernetes Application Container. Collects + * application logs, metrics and traces through auto-instrumentation of the application using Azure Monitor + * OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. + * + * @return the appMonitoring value. + */ + public ManagedClusterAzureMonitorProfileAppMonitoring appMonitoring() { + return this.appMonitoring; + } + + /** + * Set the appMonitoring property: Application Monitoring Profile for Kubernetes Application Container. Collects + * application logs, metrics and traces through auto-instrumentation of the application using Azure Monitor + * OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. + * + * @param appMonitoring the appMonitoring value to set. + * @return the ManagedClusterAzureMonitorProfile object itself. + */ + public ManagedClusterAzureMonitorProfile + withAppMonitoring(ManagedClusterAzureMonitorProfileAppMonitoring appMonitoring) { + this.appMonitoring = appMonitoring; + return this; + } + /** * Validates the instance. * @@ -62,6 +117,12 @@ public void validate() { if (metrics() != null) { metrics().validate(); } + if (containerInsights() != null) { + containerInsights().validate(); + } + if (appMonitoring() != null) { + appMonitoring().validate(); + } } /** @@ -71,6 +132,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("metrics", this.metrics); + jsonWriter.writeJsonField("containerInsights", this.containerInsights); + jsonWriter.writeJsonField("appMonitoring", this.appMonitoring); return jsonWriter.writeEndObject(); } @@ -93,6 +156,12 @@ public static ManagedClusterAzureMonitorProfile fromJson(JsonReader jsonReader) if ("metrics".equals(fieldName)) { deserializedManagedClusterAzureMonitorProfile.metrics = ManagedClusterAzureMonitorProfileMetrics.fromJson(reader); + } else if ("containerInsights".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfile.containerInsights + = ManagedClusterAzureMonitorProfileContainerInsights.fromJson(reader); + } else if ("appMonitoring".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfile.appMonitoring + = ManagedClusterAzureMonitorProfileAppMonitoring.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoring.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoring.java new file mode 100644 index 000000000000..2d0b6ad861c8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoring.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Application Monitoring Profile for Kubernetes Application Container. Collects application logs, metrics and traces + * through auto-instrumentation of the application using Azure Monitor OpenTelemetry based SDKs. See + * aka.ms/AzureMonitorApplicationMonitoring for an overview. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileAppMonitoring + implements JsonSerializable<ManagedClusterAzureMonitorProfileAppMonitoring> { + /* + * Application Monitoring Auto Instrumentation for Kubernetes Application Container. Deploys web hook to + * auto-instrument Azure Monitor OpenTelemetry based SDKs to collect OpenTelemetry metrics, logs and traces of the + * application. See aka.ms/AzureMonitorApplicationMonitoring for an overview. + */ + private ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation autoInstrumentation; + + /* + * Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Metrics. Collects + * OpenTelemetry metrics of the application using Azure Monitor OpenTelemetry based SDKs. See + * aka.ms/AzureMonitorApplicationMonitoring for an overview. + */ + private ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics openTelemetryMetrics; + + /* + * Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Logs and Traces. + * Collects OpenTelemetry logs and traces of the application using Azure Monitor OpenTelemetry based SDKs. See + * aka.ms/AzureMonitorApplicationMonitoring for an overview. + */ + private ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs openTelemetryLogs; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileAppMonitoring class. + */ + public ManagedClusterAzureMonitorProfileAppMonitoring() { + } + + /** + * Get the autoInstrumentation property: Application Monitoring Auto Instrumentation for Kubernetes Application + * Container. Deploys web hook to auto-instrument Azure Monitor OpenTelemetry based SDKs to collect OpenTelemetry + * metrics, logs and traces of the application. See aka.ms/AzureMonitorApplicationMonitoring for an overview. + * + * @return the autoInstrumentation value. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation autoInstrumentation() { + return this.autoInstrumentation; + } + + /** + * Set the autoInstrumentation property: Application Monitoring Auto Instrumentation for Kubernetes Application + * Container. Deploys web hook to auto-instrument Azure Monitor OpenTelemetry based SDKs to collect OpenTelemetry + * metrics, logs and traces of the application. See aka.ms/AzureMonitorApplicationMonitoring for an overview. + * + * @param autoInstrumentation the autoInstrumentation value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoring object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoring + withAutoInstrumentation(ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation autoInstrumentation) { + this.autoInstrumentation = autoInstrumentation; + return this; + } + + /** + * Get the openTelemetryMetrics property: Application Monitoring Open Telemetry Metrics Profile for Kubernetes + * Application Container Metrics. Collects OpenTelemetry metrics of the application using Azure Monitor + * OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. + * + * @return the openTelemetryMetrics value. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics openTelemetryMetrics() { + return this.openTelemetryMetrics; + } + + /** + * Set the openTelemetryMetrics property: Application Monitoring Open Telemetry Metrics Profile for Kubernetes + * Application Container Metrics. Collects OpenTelemetry metrics of the application using Azure Monitor + * OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. + * + * @param openTelemetryMetrics the openTelemetryMetrics value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoring object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoring withOpenTelemetryMetrics( + ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics openTelemetryMetrics) { + this.openTelemetryMetrics = openTelemetryMetrics; + return this; + } + + /** + * Get the openTelemetryLogs property: Application Monitoring Open Telemetry Metrics Profile for Kubernetes + * Application Container Logs and Traces. Collects OpenTelemetry logs and traces of the application using Azure + * Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. + * + * @return the openTelemetryLogs value. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs openTelemetryLogs() { + return this.openTelemetryLogs; + } + + /** + * Set the openTelemetryLogs property: Application Monitoring Open Telemetry Metrics Profile for Kubernetes + * Application Container Logs and Traces. Collects OpenTelemetry logs and traces of the application using Azure + * Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. + * + * @param openTelemetryLogs the openTelemetryLogs value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoring object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoring + withOpenTelemetryLogs(ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs openTelemetryLogs) { + this.openTelemetryLogs = openTelemetryLogs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (autoInstrumentation() != null) { + autoInstrumentation().validate(); + } + if (openTelemetryMetrics() != null) { + openTelemetryMetrics().validate(); + } + if (openTelemetryLogs() != null) { + openTelemetryLogs().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("autoInstrumentation", this.autoInstrumentation); + jsonWriter.writeJsonField("openTelemetryMetrics", this.openTelemetryMetrics); + jsonWriter.writeJsonField("openTelemetryLogs", this.openTelemetryLogs); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAzureMonitorProfileAppMonitoring from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAzureMonitorProfileAppMonitoring if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterAzureMonitorProfileAppMonitoring. + */ + public static ManagedClusterAzureMonitorProfileAppMonitoring fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAzureMonitorProfileAppMonitoring deserializedManagedClusterAzureMonitorProfileAppMonitoring + = new ManagedClusterAzureMonitorProfileAppMonitoring(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("autoInstrumentation".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileAppMonitoring.autoInstrumentation + = ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation.fromJson(reader); + } else if ("openTelemetryMetrics".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileAppMonitoring.openTelemetryMetrics + = ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.fromJson(reader); + } else if ("openTelemetryLogs".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileAppMonitoring.openTelemetryLogs + = ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAzureMonitorProfileAppMonitoring; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation.java new file mode 100644 index 000000000000..cc7353d304d3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Application Monitoring Auto Instrumentation for Kubernetes Application Container. Deploys web hook to auto-instrument + * Azure Monitor OpenTelemetry based SDKs to collect OpenTelemetry metrics, logs and traces of the application. See + * aka.ms/AzureMonitorApplicationMonitoring for an overview. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation + implements JsonSerializable<ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation> { + /* + * Indicates if Application Monitoring Auto Instrumentation is enabled or not. + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation class. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation() { + } + + /** + * Get the enabled property: Indicates if Application Monitoring Auto Instrumentation is enabled or not. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates if Application Monitoring Auto Instrumentation is enabled or not. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation if the JsonReader was + * pointing to an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the + * ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation. + */ + public static ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation deserializedManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation + = new ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation.enabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs.java new file mode 100644 index 000000000000..fedaf77910f4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs.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.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Logs and Traces. Collects + * OpenTelemetry logs and traces of the application using Azure Monitor OpenTelemetry based SDKs. See + * aka.ms/AzureMonitorApplicationMonitoring for an overview. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs + implements JsonSerializable<ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs> { + /* + * Indicates if Application Monitoring Open Telemetry Logs and traces is enabled or not. + */ + private Boolean enabled; + + /* + * The Open Telemetry host port for Open Telemetry logs and traces. If not specified, the default port is 28331. + */ + private Long port; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs class. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs() { + } + + /** + * Get the enabled property: Indicates if Application Monitoring Open Telemetry Logs and traces is enabled or not. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates if Application Monitoring Open Telemetry Logs and traces is enabled or not. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the port property: The Open Telemetry host port for Open Telemetry logs and traces. If not specified, the + * default port is 28331. + * + * @return the port value. + */ + public Long port() { + return this.port; + } + + /** + * Set the port property: The Open Telemetry host port for Open Telemetry logs and traces. If not specified, the + * default port is 28331. + * + * @param port the port value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs withPort(Long port) { + this.port = port; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeNumberField("port", this.port); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs if the JsonReader was + * pointing to an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the + * ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs. + */ + public static ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs + = new ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("port".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs.port + = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.java new file mode 100644 index 000000000000..8c942507ff7d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.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.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Metrics. Collects + * OpenTelemetry metrics of the application using Azure Monitor OpenTelemetry based SDKs. See + * aka.ms/AzureMonitorApplicationMonitoring for an overview. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics + implements JsonSerializable<ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics> { + /* + * Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. + */ + private Boolean enabled; + + /* + * The Open Telemetry host port for Open Telemetry metrics. If not specified, the default port is 28333. + */ + private Long port; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics class. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics() { + } + + /** + * Get the enabled property: Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the port property: The Open Telemetry host port for Open Telemetry metrics. If not specified, the default + * port is 28333. + * + * @return the port value. + */ + public Long port() { + return this.port; + } + + /** + * Set the port property: The Open Telemetry host port for Open Telemetry metrics. If not specified, the default + * port is 28333. + * + * @param port the port value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics withPort(Long port) { + this.port = port; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeNumberField("port", this.port); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics if the JsonReader was + * pointing to an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the + * ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics. + */ + public static ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics + = new ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("port".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.port + = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileContainerInsights.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileContainerInsights.java new file mode 100644 index 000000000000..66c81f746a55 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileContainerInsights.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and Container stdout & stderr logs etc. + * See aka.ms/AzureMonitorContainerInsights for an overview. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileContainerInsights + implements JsonSerializable<ManagedClusterAzureMonitorProfileContainerInsights> { + /* + * Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. + */ + private Boolean enabled; + + /* + * Fully Qualified ARM Resource Id of Azure Log Analytics Workspace for storing Azure Monitor Container Insights + * Logs. + */ + private String logAnalyticsWorkspaceResourceId; + + /* + * The syslog host port. If not specified, the default port is 28330. + */ + private Long syslogPort; + + /* + * Indicates whether custom metrics collection has to be disabled or not. If not specified the default is false. No + * custom metrics will be emitted if this field is false but the container insights enabled field is false + */ + private Boolean disableCustomMetrics; + + /* + * Indicates whether prometheus metrics scraping is disabled or not. If not specified the default is false. No + * prometheus metrics will be emitted if this field is false but the container insights enabled field is false + */ + private Boolean disablePrometheusMetricsScraping; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileContainerInsights class. + */ + public ManagedClusterAzureMonitorProfileContainerInsights() { + } + + /** + * Get the enabled property: Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. + */ + public ManagedClusterAzureMonitorProfileContainerInsights withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the logAnalyticsWorkspaceResourceId property: Fully Qualified ARM Resource Id of Azure Log Analytics + * Workspace for storing Azure Monitor Container Insights Logs. + * + * @return the logAnalyticsWorkspaceResourceId value. + */ + public String logAnalyticsWorkspaceResourceId() { + return this.logAnalyticsWorkspaceResourceId; + } + + /** + * Set the logAnalyticsWorkspaceResourceId property: Fully Qualified ARM Resource Id of Azure Log Analytics + * Workspace for storing Azure Monitor Container Insights Logs. + * + * @param logAnalyticsWorkspaceResourceId the logAnalyticsWorkspaceResourceId value to set. + * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. + */ + public ManagedClusterAzureMonitorProfileContainerInsights + withLogAnalyticsWorkspaceResourceId(String logAnalyticsWorkspaceResourceId) { + this.logAnalyticsWorkspaceResourceId = logAnalyticsWorkspaceResourceId; + return this; + } + + /** + * Get the syslogPort property: The syslog host port. If not specified, the default port is 28330. + * + * @return the syslogPort value. + */ + public Long syslogPort() { + return this.syslogPort; + } + + /** + * Set the syslogPort property: The syslog host port. If not specified, the default port is 28330. + * + * @param syslogPort the syslogPort value to set. + * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. + */ + public ManagedClusterAzureMonitorProfileContainerInsights withSyslogPort(Long syslogPort) { + this.syslogPort = syslogPort; + return this; + } + + /** + * Get the disableCustomMetrics property: Indicates whether custom metrics collection has to be disabled or not. If + * not specified the default is false. No custom metrics will be emitted if this field is false but the container + * insights enabled field is false. + * + * @return the disableCustomMetrics value. + */ + public Boolean disableCustomMetrics() { + return this.disableCustomMetrics; + } + + /** + * Set the disableCustomMetrics property: Indicates whether custom metrics collection has to be disabled or not. If + * not specified the default is false. No custom metrics will be emitted if this field is false but the container + * insights enabled field is false. + * + * @param disableCustomMetrics the disableCustomMetrics value to set. + * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. + */ + public ManagedClusterAzureMonitorProfileContainerInsights withDisableCustomMetrics(Boolean disableCustomMetrics) { + this.disableCustomMetrics = disableCustomMetrics; + return this; + } + + /** + * Get the disablePrometheusMetricsScraping property: Indicates whether prometheus metrics scraping is disabled or + * not. If not specified the default is false. No prometheus metrics will be emitted if this field is false but the + * container insights enabled field is false. + * + * @return the disablePrometheusMetricsScraping value. + */ + public Boolean disablePrometheusMetricsScraping() { + return this.disablePrometheusMetricsScraping; + } + + /** + * Set the disablePrometheusMetricsScraping property: Indicates whether prometheus metrics scraping is disabled or + * not. If not specified the default is false. No prometheus metrics will be emitted if this field is false but the + * container insights enabled field is false. + * + * @param disablePrometheusMetricsScraping the disablePrometheusMetricsScraping value to set. + * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. + */ + public ManagedClusterAzureMonitorProfileContainerInsights + withDisablePrometheusMetricsScraping(Boolean disablePrometheusMetricsScraping) { + this.disablePrometheusMetricsScraping = disablePrometheusMetricsScraping; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("logAnalyticsWorkspaceResourceId", this.logAnalyticsWorkspaceResourceId); + jsonWriter.writeNumberField("syslogPort", this.syslogPort); + jsonWriter.writeBooleanField("disableCustomMetrics", this.disableCustomMetrics); + jsonWriter.writeBooleanField("disablePrometheusMetricsScraping", this.disablePrometheusMetricsScraping); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAzureMonitorProfileContainerInsights from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAzureMonitorProfileContainerInsights if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterAzureMonitorProfileContainerInsights. + */ + public static ManagedClusterAzureMonitorProfileContainerInsights fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAzureMonitorProfileContainerInsights deserializedManagedClusterAzureMonitorProfileContainerInsights + = new ManagedClusterAzureMonitorProfileContainerInsights(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileContainerInsights.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("logAnalyticsWorkspaceResourceId".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileContainerInsights.logAnalyticsWorkspaceResourceId + = reader.getString(); + } else if ("syslogPort".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileContainerInsights.syslogPort + = reader.getNullable(JsonReader::getLong); + } else if ("disableCustomMetrics".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileContainerInsights.disableCustomMetrics + = reader.getNullable(JsonReader::getBoolean); + } else if ("disablePrometheusMetricsScraping".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileContainerInsights.disablePrometheusMetricsScraping + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAzureMonitorProfileContainerInsights; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java index c6fd51a2703f..4112892296bf 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java @@ -12,24 +12,18 @@ import java.io.IOException; /** - * Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the - * kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for - * details. + * Kube State Metrics for prometheus addon profile for the container service cluster. */ @Fluent public final class ManagedClusterAzureMonitorProfileKubeStateMetrics implements JsonSerializable<ManagedClusterAzureMonitorProfileKubeStateMetrics> { /* - * Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric - * (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only - * resource name and namespace labels. + * Comma-separated list of Kubernetes annotations keys that will be used in the resource's labels metric. */ private String metricLabelsAllowlist; /* - * Comma-separated list of Kubernetes annotation keys that will be used in the resource's labels metric (Example: - * 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). By default the metric contains only - * resource name and namespace labels. + * Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric. */ private String metricAnnotationsAllowList; @@ -40,9 +34,8 @@ public ManagedClusterAzureMonitorProfileKubeStateMetrics() { } /** - * Get the metricLabelsAllowlist property: Comma-separated list of additional Kubernetes label keys that will be - * used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By - * default the metric contains only resource name and namespace labels. + * Get the metricLabelsAllowlist property: Comma-separated list of Kubernetes annotations keys that will be used in + * the resource's labels metric. * * @return the metricLabelsAllowlist value. */ @@ -51,9 +44,8 @@ public String metricLabelsAllowlist() { } /** - * Set the metricLabelsAllowlist property: Comma-separated list of additional Kubernetes label keys that will be - * used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By - * default the metric contains only resource name and namespace labels. + * Set the metricLabelsAllowlist property: Comma-separated list of Kubernetes annotations keys that will be used in + * the resource's labels metric. * * @param metricLabelsAllowlist the metricLabelsAllowlist value to set. * @return the ManagedClusterAzureMonitorProfileKubeStateMetrics object itself. @@ -64,9 +56,8 @@ public ManagedClusterAzureMonitorProfileKubeStateMetrics withMetricLabelsAllowli } /** - * Get the metricAnnotationsAllowList property: Comma-separated list of Kubernetes annotation keys that will be used - * in the resource's labels metric (Example: 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). - * By default the metric contains only resource name and namespace labels. + * Get the metricAnnotationsAllowList property: Comma-separated list of additional Kubernetes label keys that will + * be used in the resource's labels metric. * * @return the metricAnnotationsAllowList value. */ @@ -75,9 +66,8 @@ public String metricAnnotationsAllowList() { } /** - * Set the metricAnnotationsAllowList property: Comma-separated list of Kubernetes annotation keys that will be used - * in the resource's labels metric (Example: 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). - * By default the metric contains only resource name and namespace labels. + * Set the metricAnnotationsAllowList property: Comma-separated list of additional Kubernetes label keys that will + * be used in the resource's labels metric. * * @param metricAnnotationsAllowList the metricAnnotationsAllowList value to set. * @return the ManagedClusterAzureMonitorProfileKubeStateMetrics object itself. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java index c429294b7ad5..1192651a08dc 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java @@ -12,23 +12,18 @@ import java.io.IOException; /** - * Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes - * infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. - * See aka.ms/AzureManagedPrometheus for an overview. + * Metrics profile for the prometheus service addon. */ @Fluent public final class ManagedClusterAzureMonitorProfileMetrics implements JsonSerializable<ManagedClusterAzureMonitorProfileMetrics> { /* - * Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See - * aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. + * Whether to enable the Prometheus collector */ private boolean enabled; /* - * Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the - * kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for - * details. + * Kube State Metrics for prometheus addon profile for the container service cluster */ private ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics; @@ -39,8 +34,7 @@ public ManagedClusterAzureMonitorProfileMetrics() { } /** - * Get the enabled property: Whether to enable or disable the Azure Managed Prometheus addon for Prometheus - * monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. + * Get the enabled property: Whether to enable the Prometheus collector. * * @return the enabled value. */ @@ -49,8 +43,7 @@ public boolean enabled() { } /** - * Set the enabled property: Whether to enable or disable the Azure Managed Prometheus addon for Prometheus - * monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. + * Set the enabled property: Whether to enable the Prometheus collector. * * @param enabled the enabled value to set. * @return the ManagedClusterAzureMonitorProfileMetrics object itself. @@ -61,9 +54,8 @@ public ManagedClusterAzureMonitorProfileMetrics withEnabled(boolean enabled) { } /** - * Get the kubeStateMetrics property: Kube State Metrics profile for the Azure Managed Prometheus addon. These - * optional settings are for the kube-state-metrics pod that is deployed with the addon. See - * aka.ms/AzureManagedPrometheus-optional-parameters for details. + * Get the kubeStateMetrics property: Kube State Metrics for prometheus addon profile for the container service + * cluster. * * @return the kubeStateMetrics value. */ @@ -72,9 +64,8 @@ public ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics() { } /** - * Set the kubeStateMetrics property: Kube State Metrics profile for the Azure Managed Prometheus addon. These - * optional settings are for the kube-state-metrics pod that is deployed with the addon. See - * aka.ms/AzureManagedPrometheus-optional-parameters for details. + * Set the kubeStateMetrics property: Kube State Metrics for prometheus addon profile for the container service + * cluster. * * @param kubeStateMetrics the kubeStateMetrics value to set. * @return the ManagedClusterAzureMonitorProfileMetrics object itself. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHostedSystemProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHostedSystemProfile.java new file mode 100644 index 000000000000..10238c97d81f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHostedSystemProfile.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Settings for hosted system addons. + */ +@Fluent +public final class ManagedClusterHostedSystemProfile implements JsonSerializable<ManagedClusterHostedSystemProfile> { + /* + * Whether to enable hosted system addons for the cluster. + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterHostedSystemProfile class. + */ + public ManagedClusterHostedSystemProfile() { + } + + /** + * Get the enabled property: Whether to enable hosted system addons for the cluster. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable hosted system addons for the cluster. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterHostedSystemProfile object itself. + */ + public ManagedClusterHostedSystemProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterHostedSystemProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterHostedSystemProfile if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterHostedSystemProfile. + */ + public static ManagedClusterHostedSystemProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterHostedSystemProfile deserializedManagedClusterHostedSystemProfile + = new ManagedClusterHostedSystemProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterHostedSystemProfile.enabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterHostedSystemProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java index 24bb81b69756..92ebe06e2255 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java @@ -32,11 +32,23 @@ public final class ManagedClusterHttpProxyConfig implements JsonSerializable<Man */ private List<String> noProxy; + /* + * A read-only list of all endpoints for which traffic should not be sent to the proxy. This list is a superset of + * noProxy and values injected by AKS. + */ + private List<String> effectiveNoProxy; + /* * Alternative CA cert to use for connecting to proxy servers. */ private String trustedCa; + /* + * Whether to enable HTTP proxy. When disabled, the specified proxy configuration will be not be set on pods and + * nodes. + */ + private Boolean enabled; + /** * Creates an instance of ManagedClusterHttpProxyConfig class. */ @@ -103,6 +115,16 @@ public ManagedClusterHttpProxyConfig withNoProxy(List<String> noProxy) { return this; } + /** + * Get the effectiveNoProxy property: A read-only list of all endpoints for which traffic should not be sent to the + * proxy. This list is a superset of noProxy and values injected by AKS. + * + * @return the effectiveNoProxy value. + */ + public List<String> effectiveNoProxy() { + return this.effectiveNoProxy; + } + /** * Get the trustedCa property: Alternative CA cert to use for connecting to proxy servers. * @@ -123,6 +145,28 @@ public ManagedClusterHttpProxyConfig withTrustedCa(String trustedCa) { return this; } + /** + * Get the enabled property: Whether to enable HTTP proxy. When disabled, the specified proxy configuration will be + * not be set on pods and nodes. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable HTTP proxy. When disabled, the specified proxy configuration will be + * not be set on pods and nodes. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterHttpProxyConfig object itself. + */ + public ManagedClusterHttpProxyConfig withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + /** * Validates the instance. * @@ -141,6 +185,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("httpsProxy", this.httpsProxy); jsonWriter.writeArrayField("noProxy", this.noProxy, (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("trustedCa", this.trustedCa); + jsonWriter.writeBooleanField("enabled", this.enabled); return jsonWriter.writeEndObject(); } @@ -167,8 +212,13 @@ public static ManagedClusterHttpProxyConfig fromJson(JsonReader jsonReader) thro } else if ("noProxy".equals(fieldName)) { List<String> noProxy = reader.readArray(reader1 -> reader1.getString()); deserializedManagedClusterHttpProxyConfig.noProxy = noProxy; + } else if ("effectiveNoProxy".equals(fieldName)) { + List<String> effectiveNoProxy = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterHttpProxyConfig.effectiveNoProxy = effectiveNoProxy; } else if ("trustedCa".equals(fieldName)) { deserializedManagedClusterHttpProxyConfig.trustedCa = reader.getString(); + } else if ("enabled".equals(fieldName)) { + deserializedManagedClusterHttpProxyConfig.enabled = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressDefaultDomainProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressDefaultDomainProfile.java new file mode 100644 index 000000000000..eba21319e109 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressDefaultDomainProfile.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ManagedClusterIngressDefaultDomainProfile model. + */ +@Fluent +public final class ManagedClusterIngressDefaultDomainProfile + implements JsonSerializable<ManagedClusterIngressDefaultDomainProfile> { + /* + * Whether to enable Default Domain. + */ + private Boolean enabled; + + /* + * The unique fully qualified domain name assigned to the cluster. This will not change even if disabled then + * reenabled. + */ + private String domainName; + + /** + * Creates an instance of ManagedClusterIngressDefaultDomainProfile class. + */ + public ManagedClusterIngressDefaultDomainProfile() { + } + + /** + * Get the enabled property: Whether to enable Default Domain. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Default Domain. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterIngressDefaultDomainProfile object itself. + */ + public ManagedClusterIngressDefaultDomainProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the domainName property: The unique fully qualified domain name assigned to the cluster. This will not change + * even if disabled then reenabled. + * + * @return the domainName value. + */ + public String domainName() { + return this.domainName; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterIngressDefaultDomainProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterIngressDefaultDomainProfile if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterIngressDefaultDomainProfile. + */ + public static ManagedClusterIngressDefaultDomainProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterIngressDefaultDomainProfile deserializedManagedClusterIngressDefaultDomainProfile + = new ManagedClusterIngressDefaultDomainProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterIngressDefaultDomainProfile.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("domainName".equals(fieldName)) { + deserializedManagedClusterIngressDefaultDomainProfile.domainName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterIngressDefaultDomainProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java index ce50126d08fe..520a17b83eab 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java @@ -17,11 +17,20 @@ @Fluent public final class ManagedClusterIngressProfile implements JsonSerializable<ManagedClusterIngressProfile> { /* - * App Routing settings for the ingress profile. You can find an overview and onboarding guide for this feature at - * https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. + * Settings for the managed Gateway API installation + */ + private ManagedClusterIngressProfileGatewayConfiguration gatewayApi; + + /* + * Web App Routing settings for the ingress profile. */ private ManagedClusterIngressProfileWebAppRouting webAppRouting; + /* + * Settings for the managed Application Load Balancer installation + */ + private ManagedClusterIngressProfileApplicationLoadBalancer applicationLoadBalancer; + /** * Creates an instance of ManagedClusterIngressProfile class. */ @@ -29,9 +38,27 @@ public ManagedClusterIngressProfile() { } /** - * Get the webAppRouting property: App Routing settings for the ingress profile. You can find an overview and - * onboarding guide for this feature at - * https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. + * Get the gatewayApi property: Settings for the managed Gateway API installation. + * + * @return the gatewayApi value. + */ + public ManagedClusterIngressProfileGatewayConfiguration gatewayApi() { + return this.gatewayApi; + } + + /** + * Set the gatewayApi property: Settings for the managed Gateway API installation. + * + * @param gatewayApi the gatewayApi value to set. + * @return the ManagedClusterIngressProfile object itself. + */ + public ManagedClusterIngressProfile withGatewayApi(ManagedClusterIngressProfileGatewayConfiguration gatewayApi) { + this.gatewayApi = gatewayApi; + return this; + } + + /** + * Get the webAppRouting property: Web App Routing settings for the ingress profile. * * @return the webAppRouting value. */ @@ -40,9 +67,7 @@ public ManagedClusterIngressProfileWebAppRouting webAppRouting() { } /** - * Set the webAppRouting property: App Routing settings for the ingress profile. You can find an overview and - * onboarding guide for this feature at - * https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. + * Set the webAppRouting property: Web App Routing settings for the ingress profile. * * @param webAppRouting the webAppRouting value to set. * @return the ManagedClusterIngressProfile object itself. @@ -52,15 +77,42 @@ public ManagedClusterIngressProfile withWebAppRouting(ManagedClusterIngressProfi return this; } + /** + * Get the applicationLoadBalancer property: Settings for the managed Application Load Balancer installation. + * + * @return the applicationLoadBalancer value. + */ + public ManagedClusterIngressProfileApplicationLoadBalancer applicationLoadBalancer() { + return this.applicationLoadBalancer; + } + + /** + * Set the applicationLoadBalancer property: Settings for the managed Application Load Balancer installation. + * + * @param applicationLoadBalancer the applicationLoadBalancer value to set. + * @return the ManagedClusterIngressProfile object itself. + */ + public ManagedClusterIngressProfile + withApplicationLoadBalancer(ManagedClusterIngressProfileApplicationLoadBalancer applicationLoadBalancer) { + this.applicationLoadBalancer = applicationLoadBalancer; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (gatewayApi() != null) { + gatewayApi().validate(); + } if (webAppRouting() != null) { webAppRouting().validate(); } + if (applicationLoadBalancer() != null) { + applicationLoadBalancer().validate(); + } } /** @@ -69,7 +121,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("gatewayAPI", this.gatewayApi); jsonWriter.writeJsonField("webAppRouting", this.webAppRouting); + jsonWriter.writeJsonField("applicationLoadBalancer", this.applicationLoadBalancer); return jsonWriter.writeEndObject(); } @@ -88,9 +142,15 @@ public static ManagedClusterIngressProfile fromJson(JsonReader jsonReader) throw String fieldName = reader.getFieldName(); reader.nextToken(); - if ("webAppRouting".equals(fieldName)) { + if ("gatewayAPI".equals(fieldName)) { + deserializedManagedClusterIngressProfile.gatewayApi + = ManagedClusterIngressProfileGatewayConfiguration.fromJson(reader); + } else if ("webAppRouting".equals(fieldName)) { deserializedManagedClusterIngressProfile.webAppRouting = ManagedClusterIngressProfileWebAppRouting.fromJson(reader); + } else if ("applicationLoadBalancer".equals(fieldName)) { + deserializedManagedClusterIngressProfile.applicationLoadBalancer + = ManagedClusterIngressProfileApplicationLoadBalancer.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileApplicationLoadBalancer.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileApplicationLoadBalancer.java new file mode 100644 index 000000000000..a39ec9318922 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileApplicationLoadBalancer.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Application Load Balancer settings for the ingress profile. + */ +@Fluent +public final class ManagedClusterIngressProfileApplicationLoadBalancer + implements JsonSerializable<ManagedClusterIngressProfileApplicationLoadBalancer> { + /* + * Whether to enable Application Load Balancer. + */ + private Boolean enabled; + + /* + * Managed identity of the Application Load Balancer add-on. This is the identity that should be granted permissions + * to manage the associated Application Gateway for Containers resource. + */ + private UserAssignedIdentity identity; + + /** + * Creates an instance of ManagedClusterIngressProfileApplicationLoadBalancer class. + */ + public ManagedClusterIngressProfileApplicationLoadBalancer() { + } + + /** + * Get the enabled property: Whether to enable Application Load Balancer. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Application Load Balancer. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterIngressProfileApplicationLoadBalancer object itself. + */ + public ManagedClusterIngressProfileApplicationLoadBalancer withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the identity property: Managed identity of the Application Load Balancer add-on. This is the identity that + * should be granted permissions to manage the associated Application Gateway for Containers resource. + * + * @return the identity value. + */ + public UserAssignedIdentity identity() { + return this.identity; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterIngressProfileApplicationLoadBalancer from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterIngressProfileApplicationLoadBalancer if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterIngressProfileApplicationLoadBalancer. + */ + public static ManagedClusterIngressProfileApplicationLoadBalancer fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterIngressProfileApplicationLoadBalancer deserializedManagedClusterIngressProfileApplicationLoadBalancer + = new ManagedClusterIngressProfileApplicationLoadBalancer(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterIngressProfileApplicationLoadBalancer.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("identity".equals(fieldName)) { + deserializedManagedClusterIngressProfileApplicationLoadBalancer.identity + = UserAssignedIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterIngressProfileApplicationLoadBalancer; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileGatewayConfiguration.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileGatewayConfiguration.java new file mode 100644 index 000000000000..d76887801802 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileGatewayConfiguration.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.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ManagedClusterIngressProfileGatewayConfiguration model. + */ +@Fluent +public final class ManagedClusterIngressProfileGatewayConfiguration + implements JsonSerializable<ManagedClusterIngressProfileGatewayConfiguration> { + /* + * Configuration for the managed Gateway API installation. If not specified, the default is 'Disabled'. See + * https://aka.ms/k8s-gateway-api for more details. + */ + private ManagedGatewayType installation; + + /** + * Creates an instance of ManagedClusterIngressProfileGatewayConfiguration class. + */ + public ManagedClusterIngressProfileGatewayConfiguration() { + } + + /** + * Get the installation property: Configuration for the managed Gateway API installation. If not specified, the + * default is 'Disabled'. See https://aka.ms/k8s-gateway-api for more details. + * + * @return the installation value. + */ + public ManagedGatewayType installation() { + return this.installation; + } + + /** + * Set the installation property: Configuration for the managed Gateway API installation. If not specified, the + * default is 'Disabled'. See https://aka.ms/k8s-gateway-api for more details. + * + * @param installation the installation value to set. + * @return the ManagedClusterIngressProfileGatewayConfiguration object itself. + */ + public ManagedClusterIngressProfileGatewayConfiguration withInstallation(ManagedGatewayType installation) { + this.installation = installation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("installation", this.installation == null ? null : this.installation.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterIngressProfileGatewayConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterIngressProfileGatewayConfiguration if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterIngressProfileGatewayConfiguration. + */ + public static ManagedClusterIngressProfileGatewayConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterIngressProfileGatewayConfiguration deserializedManagedClusterIngressProfileGatewayConfiguration + = new ManagedClusterIngressProfileGatewayConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("installation".equals(fieldName)) { + deserializedManagedClusterIngressProfileGatewayConfiguration.installation + = ManagedGatewayType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterIngressProfileGatewayConfiguration; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java index 7c7ac44b3702..26711124b9ab 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java @@ -13,20 +13,20 @@ import java.util.List; /** - * Application Routing add-on settings for the ingress profile. + * Web App Routing settings for the ingress profile. */ @Fluent public final class ManagedClusterIngressProfileWebAppRouting implements JsonSerializable<ManagedClusterIngressProfileWebAppRouting> { /* - * Whether to enable the Application Routing add-on. + * Whether to enable Web App Routing. */ private Boolean enabled; /* - * Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application - * Routing add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS - * zones must be in the same resource group and all private DNS zones must be in the same resource group. + * Resource IDs of the DNS zones to be associated with the Web App Routing add-on. Used only when Web App Routing is + * enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be in + * the same resource group and all private DNS zones must be in the same resource group. */ private List<String> dnsZoneResourceIds; @@ -37,8 +37,15 @@ public final class ManagedClusterIngressProfileWebAppRouting private ManagedClusterIngressProfileNginx nginx; /* - * Managed identity of the Application Routing add-on. This is the identity that should be granted permissions, for - * example, to manage the associated Azure DNS resource and get certificates from Azure Key Vault. See [this + * Configuration for the Default Domain. This is a unique, autogenerated domain that comes with a signed TLS + * Certificate allowing for secure HTTPS. See [the Default Domain documentation](https://aka.ms/aks/defaultdomain) + * for more instructions. + */ + private ManagedClusterIngressDefaultDomainProfile defaultDomain; + + /* + * Managed identity of the Web Application Routing add-on. This is the identity that should be granted permissions, + * for example, to manage the associated Azure DNS resource and get certificates from Azure Key Vault. See [this * overview of the add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) for more * instructions. */ @@ -51,7 +58,7 @@ public ManagedClusterIngressProfileWebAppRouting() { } /** - * Get the enabled property: Whether to enable the Application Routing add-on. + * Get the enabled property: Whether to enable Web App Routing. * * @return the enabled value. */ @@ -60,7 +67,7 @@ public Boolean enabled() { } /** - * Set the enabled property: Whether to enable the Application Routing add-on. + * Set the enabled property: Whether to enable Web App Routing. * * @param enabled the enabled value to set. * @return the ManagedClusterIngressProfileWebAppRouting object itself. @@ -71,10 +78,10 @@ public ManagedClusterIngressProfileWebAppRouting withEnabled(Boolean enabled) { } /** - * Get the dnsZoneResourceIds property: Resource IDs of the DNS zones to be associated with the Application Routing - * add-on. Used only when Application Routing add-on is enabled. Public and private DNS zones can be in different - * resource groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in - * the same resource group. + * Get the dnsZoneResourceIds property: Resource IDs of the DNS zones to be associated with the Web App Routing + * add-on. Used only when Web App Routing is enabled. Public and private DNS zones can be in different resource + * groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in the same + * resource group. * * @return the dnsZoneResourceIds value. */ @@ -83,10 +90,10 @@ public List<String> dnsZoneResourceIds() { } /** - * Set the dnsZoneResourceIds property: Resource IDs of the DNS zones to be associated with the Application Routing - * add-on. Used only when Application Routing add-on is enabled. Public and private DNS zones can be in different - * resource groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in - * the same resource group. + * Set the dnsZoneResourceIds property: Resource IDs of the DNS zones to be associated with the Web App Routing + * add-on. Used only when Web App Routing is enabled. Public and private DNS zones can be in different resource + * groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in the same + * resource group. * * @param dnsZoneResourceIds the dnsZoneResourceIds value to set. * @return the ManagedClusterIngressProfileWebAppRouting object itself. @@ -119,9 +126,34 @@ public ManagedClusterIngressProfileWebAppRouting withNginx(ManagedClusterIngress } /** - * Get the identity property: Managed identity of the Application Routing add-on. This is the identity that should - * be granted permissions, for example, to manage the associated Azure DNS resource and get certificates from Azure - * Key Vault. See [this overview of the + * Get the defaultDomain property: Configuration for the Default Domain. This is a unique, autogenerated domain that + * comes with a signed TLS Certificate allowing for secure HTTPS. See [the Default Domain + * documentation](https://aka.ms/aks/defaultdomain) for more instructions. + * + * @return the defaultDomain value. + */ + public ManagedClusterIngressDefaultDomainProfile defaultDomain() { + return this.defaultDomain; + } + + /** + * Set the defaultDomain property: Configuration for the Default Domain. This is a unique, autogenerated domain that + * comes with a signed TLS Certificate allowing for secure HTTPS. See [the Default Domain + * documentation](https://aka.ms/aks/defaultdomain) for more instructions. + * + * @param defaultDomain the defaultDomain value to set. + * @return the ManagedClusterIngressProfileWebAppRouting object itself. + */ + public ManagedClusterIngressProfileWebAppRouting + withDefaultDomain(ManagedClusterIngressDefaultDomainProfile defaultDomain) { + this.defaultDomain = defaultDomain; + return this; + } + + /** + * Get the identity property: Managed identity of the Web Application Routing add-on. This is the identity that + * should be granted permissions, for example, to manage the associated Azure DNS resource and get certificates from + * Azure Key Vault. See [this overview of the * add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) for more instructions. * * @return the identity value. @@ -139,6 +171,9 @@ public void validate() { if (nginx() != null) { nginx().validate(); } + if (defaultDomain() != null) { + defaultDomain().validate(); + } if (identity() != null) { identity().validate(); } @@ -154,6 +189,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("dnsZoneResourceIds", this.dnsZoneResourceIds, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("nginx", this.nginx); + jsonWriter.writeJsonField("defaultDomain", this.defaultDomain); return jsonWriter.writeEndObject(); } @@ -182,6 +218,9 @@ public static ManagedClusterIngressProfileWebAppRouting fromJson(JsonReader json } else if ("nginx".equals(fieldName)) { deserializedManagedClusterIngressProfileWebAppRouting.nginx = ManagedClusterIngressProfileNginx.fromJson(reader); + } else if ("defaultDomain".equals(fieldName)) { + deserializedManagedClusterIngressProfileWebAppRouting.defaultDomain + = ManagedClusterIngressDefaultDomainProfile.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedManagedClusterIngressProfileWebAppRouting.identity = UserAssignedIdentity.fromJson(reader); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java index b01a7427e97b..baf286e7877c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java @@ -59,6 +59,11 @@ public final class ManagedClusterLoadBalancerProfile implements JsonSerializable */ private BackendPoolType backendPoolType; + /* + * The health probing behavior for External Traffic Policy Cluster services. + */ + private ClusterServiceLoadBalancerHealthProbeMode clusterServiceLoadBalancerHealthProbeMode; + /** * Creates an instance of ManagedClusterLoadBalancerProfile class. */ @@ -223,6 +228,29 @@ public ManagedClusterLoadBalancerProfile withBackendPoolType(BackendPoolType bac return this; } + /** + * Get the clusterServiceLoadBalancerHealthProbeMode property: The health probing behavior for External Traffic + * Policy Cluster services. + * + * @return the clusterServiceLoadBalancerHealthProbeMode value. + */ + public ClusterServiceLoadBalancerHealthProbeMode clusterServiceLoadBalancerHealthProbeMode() { + return this.clusterServiceLoadBalancerHealthProbeMode; + } + + /** + * Set the clusterServiceLoadBalancerHealthProbeMode property: The health probing behavior for External Traffic + * Policy Cluster services. + * + * @param clusterServiceLoadBalancerHealthProbeMode the clusterServiceLoadBalancerHealthProbeMode value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile withClusterServiceLoadBalancerHealthProbeMode( + ClusterServiceLoadBalancerHealthProbeMode clusterServiceLoadBalancerHealthProbeMode) { + this.clusterServiceLoadBalancerHealthProbeMode = clusterServiceLoadBalancerHealthProbeMode; + return this; + } + /** * Validates the instance. * @@ -257,6 +285,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("enableMultipleStandardLoadBalancers", this.enableMultipleStandardLoadBalancers); jsonWriter.writeStringField("backendPoolType", this.backendPoolType == null ? null : this.backendPoolType.toString()); + jsonWriter.writeStringField("clusterServiceLoadBalancerHealthProbeMode", + this.clusterServiceLoadBalancerHealthProbeMode == null + ? null + : this.clusterServiceLoadBalancerHealthProbeMode.toString()); return jsonWriter.writeEndObject(); } @@ -301,6 +333,9 @@ public static ManagedClusterLoadBalancerProfile fromJson(JsonReader jsonReader) } else if ("backendPoolType".equals(fieldName)) { deserializedManagedClusterLoadBalancerProfile.backendPoolType = BackendPoolType.fromString(reader.getString()); + } else if ("clusterServiceLoadBalancerHealthProbeMode".equals(fieldName)) { + deserializedManagedClusterLoadBalancerProfile.clusterServiceLoadBalancerHealthProbeMode + = ClusterServiceLoadBalancerHealthProbeMode.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java index e3485eccdee3..f2f87355b2c3 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java @@ -18,8 +18,7 @@ public final class ManagedClusterNodeResourceGroupProfile implements JsonSerializable<ManagedClusterNodeResourceGroupProfile> { /* - * The restriction level applied to the cluster's node resource group. If not specified, the default is - * 'Unrestricted' + * The restriction level applied to the cluster's node resource group */ private RestrictionLevel restrictionLevel; @@ -30,8 +29,7 @@ public ManagedClusterNodeResourceGroupProfile() { } /** - * Get the restrictionLevel property: The restriction level applied to the cluster's node resource group. If not - * specified, the default is 'Unrestricted'. + * Get the restrictionLevel property: The restriction level applied to the cluster's node resource group. * * @return the restrictionLevel value. */ @@ -40,8 +38,7 @@ public RestrictionLevel restrictionLevel() { } /** - * Set the restrictionLevel property: The restriction level applied to the cluster's node resource group. If not - * specified, the default is 'Unrestricted'. + * Set the restrictionLevel property: The restriction level applied to the cluster's node resource group. * * @param restrictionLevel the restrictionLevel value to set. * @return the ManagedClusterNodeResourceGroupProfile object itself. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java index 433b50af7fe1..eae4c357b603 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java @@ -38,6 +38,11 @@ public final class ManagedClusterPoolUpgradeProfile implements JsonSerializable< */ private List<ManagedClusterPoolUpgradeProfileUpgradesItem> upgrades; + /* + * List of components grouped by kubernetes major.minor version. + */ + private List<ComponentsByRelease> componentsByReleases; + /** * Creates an instance of ManagedClusterPoolUpgradeProfile class. */ @@ -124,6 +129,26 @@ public ManagedClusterPoolUpgradeProfile withUpgrades(List<ManagedClusterPoolUpgr return this; } + /** + * Get the componentsByReleases property: List of components grouped by kubernetes major.minor version. + * + * @return the componentsByReleases value. + */ + public List<ComponentsByRelease> componentsByReleases() { + return this.componentsByReleases; + } + + /** + * Set the componentsByReleases property: List of components grouped by kubernetes major.minor version. + * + * @param componentsByReleases the componentsByReleases value to set. + * @return the ManagedClusterPoolUpgradeProfile object itself. + */ + public ManagedClusterPoolUpgradeProfile withComponentsByReleases(List<ComponentsByRelease> componentsByReleases) { + this.componentsByReleases = componentsByReleases; + return this; + } + /** * Validates the instance. * @@ -143,6 +168,9 @@ public void validate() { if (upgrades() != null) { upgrades().forEach(e -> e.validate()); } + if (componentsByReleases() != null) { + componentsByReleases().forEach(e -> e.validate()); + } } private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterPoolUpgradeProfile.class); @@ -157,6 +185,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); jsonWriter.writeStringField("name", this.name); jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("componentsByReleases", this.componentsByReleases, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -187,6 +217,10 @@ public static ManagedClusterPoolUpgradeProfile fromJson(JsonReader jsonReader) t List<ManagedClusterPoolUpgradeProfileUpgradesItem> upgrades = reader.readArray(reader1 -> ManagedClusterPoolUpgradeProfileUpgradesItem.fromJson(reader1)); deserializedManagedClusterPoolUpgradeProfile.upgrades = upgrades; + } else if ("componentsByReleases".equals(fieldName)) { + List<ComponentsByRelease> componentsByReleases + = reader.readArray(reader1 -> ComponentsByRelease.fromJson(reader1)); + deserializedManagedClusterPoolUpgradeProfile.componentsByReleases = componentsByReleases; } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java index 57acd9ecdb9e..4d37910b753d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java @@ -27,6 +27,11 @@ public final class ManagedClusterPoolUpgradeProfileUpgradesItem */ private Boolean isPreview; + /* + * Whether the Kubernetes version is out of support. + */ + private Boolean isOutOfSupport; + /** * Creates an instance of ManagedClusterPoolUpgradeProfileUpgradesItem class. */ @@ -73,6 +78,26 @@ public ManagedClusterPoolUpgradeProfileUpgradesItem withIsPreview(Boolean isPrev return this; } + /** + * Get the isOutOfSupport property: Whether the Kubernetes version is out of support. + * + * @return the isOutOfSupport value. + */ + public Boolean isOutOfSupport() { + return this.isOutOfSupport; + } + + /** + * Set the isOutOfSupport property: Whether the Kubernetes version is out of support. + * + * @param isOutOfSupport the isOutOfSupport value to set. + * @return the ManagedClusterPoolUpgradeProfileUpgradesItem object itself. + */ + public ManagedClusterPoolUpgradeProfileUpgradesItem withIsOutOfSupport(Boolean isOutOfSupport) { + this.isOutOfSupport = isOutOfSupport; + return this; + } + /** * Validates the instance. * @@ -89,6 +114,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); jsonWriter.writeBooleanField("isPreview", this.isPreview); + jsonWriter.writeBooleanField("isOutOfSupport", this.isOutOfSupport); return jsonWriter.writeEndObject(); } @@ -113,6 +139,9 @@ public static ManagedClusterPoolUpgradeProfileUpgradesItem fromJson(JsonReader j } else if ("isPreview".equals(fieldName)) { deserializedManagedClusterPoolUpgradeProfileUpgradesItem.isPreview = reader.getNullable(JsonReader::getBoolean); + } else if ("isOutOfSupport".equals(fieldName)) { + deserializedManagedClusterPoolUpgradeProfileUpgradesItem.isOutOfSupport + = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java index b4e194a1ef21..a5efa904d57b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java @@ -45,9 +45,8 @@ public final class ManagedClusterPropertiesAutoScalerProfile private Boolean ignoreDaemonsetsUtilization; /* - * The expander to use when scaling up. If not specified, the default is 'random'. See - * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) - * for more information. + * Type of node group expander to be used in scale up. Set to be deprecated, please use 'expanders' flag in the + * future. Available values are: 'least-waste', 'most-pods', 'priority', 'random'. */ private Expander expander; @@ -251,9 +250,8 @@ public Boolean ignoreDaemonsetsUtilization() { } /** - * Get the expander property: The expander to use when scaling up. If not specified, the default is 'random'. See - * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) - * for more information. + * Get the expander property: Type of node group expander to be used in scale up. Set to be deprecated, please use + * 'expanders' flag in the future. Available values are: 'least-waste', 'most-pods', 'priority', 'random'. * * @return the expander value. */ @@ -262,9 +260,8 @@ public Expander expander() { } /** - * Set the expander property: The expander to use when scaling up. If not specified, the default is 'random'. See - * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) - * for more information. + * Set the expander property: Type of node group expander to be used in scale up. Set to be deprecated, please use + * 'expanders' flag in the future. Available values are: 'least-waste', 'most-pods', 'priority', 'random'. * * @param expander the expander value to set. * @return the ManagedClusterPropertiesAutoScalerProfile object itself. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesForSnapshot.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesForSnapshot.java new file mode 100644 index 000000000000..f9398bd28eb3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesForSnapshot.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * managed cluster properties for snapshot, these properties are read only. + */ +@Fluent +public final class ManagedClusterPropertiesForSnapshot + implements JsonSerializable<ManagedClusterPropertiesForSnapshot> { + /* + * The current kubernetes version. + */ + private String kubernetesVersion; + + /* + * The current managed cluster sku. + */ + private ManagedClusterSku sku; + + /* + * Whether the cluster has enabled Kubernetes Role-Based Access Control or not. + */ + private Boolean enableRbac; + + /* + * The current network profile. + */ + private NetworkProfileForSnapshot networkProfile; + + /** + * Creates an instance of ManagedClusterPropertiesForSnapshot class. + */ + public ManagedClusterPropertiesForSnapshot() { + } + + /** + * Get the kubernetesVersion property: The current kubernetes version. + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Set the kubernetesVersion property: The current kubernetes version. + * + * @param kubernetesVersion the kubernetesVersion value to set. + * @return the ManagedClusterPropertiesForSnapshot object itself. + */ + public ManagedClusterPropertiesForSnapshot withKubernetesVersion(String kubernetesVersion) { + this.kubernetesVersion = kubernetesVersion; + return this; + } + + /** + * Get the sku property: The current managed cluster sku. + * + * @return the sku value. + */ + public ManagedClusterSku sku() { + return this.sku; + } + + /** + * Set the sku property: The current managed cluster sku. + * + * @param sku the sku value to set. + * @return the ManagedClusterPropertiesForSnapshot object itself. + */ + public ManagedClusterPropertiesForSnapshot withSku(ManagedClusterSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the enableRbac property: Whether the cluster has enabled Kubernetes Role-Based Access Control or not. + * + * @return the enableRbac value. + */ + public Boolean enableRbac() { + return this.enableRbac; + } + + /** + * Set the enableRbac property: Whether the cluster has enabled Kubernetes Role-Based Access Control or not. + * + * @param enableRbac the enableRbac value to set. + * @return the ManagedClusterPropertiesForSnapshot object itself. + */ + public ManagedClusterPropertiesForSnapshot withEnableRbac(Boolean enableRbac) { + this.enableRbac = enableRbac; + return this; + } + + /** + * Get the networkProfile property: The current network profile. + * + * @return the networkProfile value. + */ + public NetworkProfileForSnapshot networkProfile() { + return this.networkProfile; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + if (networkProfile() != null) { + networkProfile().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeBooleanField("enableRbac", this.enableRbac); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterPropertiesForSnapshot from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterPropertiesForSnapshot if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterPropertiesForSnapshot. + */ + public static ManagedClusterPropertiesForSnapshot fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterPropertiesForSnapshot deserializedManagedClusterPropertiesForSnapshot + = new ManagedClusterPropertiesForSnapshot(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kubernetesVersion".equals(fieldName)) { + deserializedManagedClusterPropertiesForSnapshot.kubernetesVersion = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedManagedClusterPropertiesForSnapshot.sku = ManagedClusterSku.fromJson(reader); + } else if ("enableRbac".equals(fieldName)) { + deserializedManagedClusterPropertiesForSnapshot.enableRbac + = reader.getNullable(JsonReader::getBoolean); + } else if ("networkProfile".equals(fieldName)) { + deserializedManagedClusterPropertiesForSnapshot.networkProfile + = NetworkProfileForSnapshot.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterPropertiesForSnapshot; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java index 014323f743dc..ab06dd7b7009 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java @@ -28,6 +28,12 @@ public final class ManagedClusterSecurityProfile implements JsonSerializable<Man */ private AzureKeyVaultKms azureKeyVaultKms; + /* + * Encryption at rest of Kubernetes resource objects. More information on this can be found under + * https://aka.ms/aks/kubernetesResourceObjectEncryption + */ + private KubernetesResourceObjectEncryptionProfile kubernetesResourceObjectEncryptionProfile; + /* * Workload identity settings for the security profile. Workload identity enables Kubernetes applications to access * Azure cloud resources securely with Azure AD. See https://aka.ms/aks/wi for more details. @@ -39,6 +45,20 @@ public final class ManagedClusterSecurityProfile implements JsonSerializable<Man */ private ManagedClusterSecurityProfileImageCleaner imageCleaner; + /* + * Image integrity is a feature that works with Azure Policy to verify image integrity by signature. This will not + * have any effect unless Azure Policy is applied to enforce image signatures. See + * https://aka.ms/aks/image-integrity for how to use this feature via policy. + */ + private ManagedClusterSecurityProfileImageIntegrity imageIntegrity; + + /* + * [Node + * Restriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) + * settings for the security profile. + */ + private ManagedClusterSecurityProfileNodeRestriction nodeRestriction; + /* * A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more * information see [Custom CA Trust @@ -94,6 +114,29 @@ public ManagedClusterSecurityProfile withAzureKeyVaultKms(AzureKeyVaultKms azure return this; } + /** + * Get the kubernetesResourceObjectEncryptionProfile property: Encryption at rest of Kubernetes resource objects. + * More information on this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. + * + * @return the kubernetesResourceObjectEncryptionProfile value. + */ + public KubernetesResourceObjectEncryptionProfile kubernetesResourceObjectEncryptionProfile() { + return this.kubernetesResourceObjectEncryptionProfile; + } + + /** + * Set the kubernetesResourceObjectEncryptionProfile property: Encryption at rest of Kubernetes resource objects. + * More information on this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. + * + * @param kubernetesResourceObjectEncryptionProfile the kubernetesResourceObjectEncryptionProfile value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile withKubernetesResourceObjectEncryptionProfile( + KubernetesResourceObjectEncryptionProfile kubernetesResourceObjectEncryptionProfile) { + this.kubernetesResourceObjectEncryptionProfile = kubernetesResourceObjectEncryptionProfile; + return this; + } + /** * Get the workloadIdentity property: Workload identity settings for the security profile. Workload identity enables * Kubernetes applications to access Azure cloud resources securely with Azure AD. See https://aka.ms/aks/wi for @@ -139,6 +182,56 @@ public ManagedClusterSecurityProfile withImageCleaner(ManagedClusterSecurityProf return this; } + /** + * Get the imageIntegrity property: Image integrity is a feature that works with Azure Policy to verify image + * integrity by signature. This will not have any effect unless Azure Policy is applied to enforce image signatures. + * See https://aka.ms/aks/image-integrity for how to use this feature via policy. + * + * @return the imageIntegrity value. + */ + public ManagedClusterSecurityProfileImageIntegrity imageIntegrity() { + return this.imageIntegrity; + } + + /** + * Set the imageIntegrity property: Image integrity is a feature that works with Azure Policy to verify image + * integrity by signature. This will not have any effect unless Azure Policy is applied to enforce image signatures. + * See https://aka.ms/aks/image-integrity for how to use this feature via policy. + * + * @param imageIntegrity the imageIntegrity value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile + withImageIntegrity(ManagedClusterSecurityProfileImageIntegrity imageIntegrity) { + this.imageIntegrity = imageIntegrity; + return this; + } + + /** + * Get the nodeRestriction property: [Node + * Restriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) + * settings for the security profile. + * + * @return the nodeRestriction value. + */ + public ManagedClusterSecurityProfileNodeRestriction nodeRestriction() { + return this.nodeRestriction; + } + + /** + * Set the nodeRestriction property: [Node + * Restriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) + * settings for the security profile. + * + * @param nodeRestriction the nodeRestriction value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile + withNodeRestriction(ManagedClusterSecurityProfileNodeRestriction nodeRestriction) { + this.nodeRestriction = nodeRestriction; + return this; + } + /** * Get the customCATrustCertificates property: A list of up to 10 base64 encoded CAs that will be added to the trust * store on all nodes in the cluster. For more information see [Custom CA Trust @@ -175,12 +268,21 @@ public void validate() { if (azureKeyVaultKms() != null) { azureKeyVaultKms().validate(); } + if (kubernetesResourceObjectEncryptionProfile() != null) { + kubernetesResourceObjectEncryptionProfile().validate(); + } if (workloadIdentity() != null) { workloadIdentity().validate(); } if (imageCleaner() != null) { imageCleaner().validate(); } + if (imageIntegrity() != null) { + imageIntegrity().validate(); + } + if (nodeRestriction() != null) { + nodeRestriction().validate(); + } } /** @@ -191,8 +293,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("defender", this.defender); jsonWriter.writeJsonField("azureKeyVaultKms", this.azureKeyVaultKms); + jsonWriter.writeJsonField("kubernetesResourceObjectEncryptionProfile", + this.kubernetesResourceObjectEncryptionProfile); jsonWriter.writeJsonField("workloadIdentity", this.workloadIdentity); jsonWriter.writeJsonField("imageCleaner", this.imageCleaner); + jsonWriter.writeJsonField("imageIntegrity", this.imageIntegrity); + jsonWriter.writeJsonField("nodeRestriction", this.nodeRestriction); jsonWriter.writeArrayField("customCATrustCertificates", this.customCATrustCertificates, (writer, element) -> writer.writeBinary(element)); return jsonWriter.writeEndObject(); @@ -219,12 +325,21 @@ public static ManagedClusterSecurityProfile fromJson(JsonReader jsonReader) thro = ManagedClusterSecurityProfileDefender.fromJson(reader); } else if ("azureKeyVaultKms".equals(fieldName)) { deserializedManagedClusterSecurityProfile.azureKeyVaultKms = AzureKeyVaultKms.fromJson(reader); + } else if ("kubernetesResourceObjectEncryptionProfile".equals(fieldName)) { + deserializedManagedClusterSecurityProfile.kubernetesResourceObjectEncryptionProfile + = KubernetesResourceObjectEncryptionProfile.fromJson(reader); } else if ("workloadIdentity".equals(fieldName)) { deserializedManagedClusterSecurityProfile.workloadIdentity = ManagedClusterSecurityProfileWorkloadIdentity.fromJson(reader); } else if ("imageCleaner".equals(fieldName)) { deserializedManagedClusterSecurityProfile.imageCleaner = ManagedClusterSecurityProfileImageCleaner.fromJson(reader); + } else if ("imageIntegrity".equals(fieldName)) { + deserializedManagedClusterSecurityProfile.imageIntegrity + = ManagedClusterSecurityProfileImageIntegrity.fromJson(reader); + } else if ("nodeRestriction".equals(fieldName)) { + deserializedManagedClusterSecurityProfile.nodeRestriction + = ManagedClusterSecurityProfileNodeRestriction.fromJson(reader); } else if ("customCATrustCertificates".equals(fieldName)) { List<byte[]> customCATrustCertificates = reader.readArray(reader1 -> reader1.getBinary()); deserializedManagedClusterSecurityProfile.customCATrustCertificates = customCATrustCertificates; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java index 78e8613b9bdb..ad3b2f80545c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java @@ -29,6 +29,13 @@ public final class ManagedClusterSecurityProfileDefender */ private ManagedClusterSecurityProfileDefenderSecurityMonitoring securityMonitoring; + /* + * Microsoft Defender settings for security gating, validates container images eligibility for deployment based on + * Defender for Containers security findings. Using Admission Controller, it either audits or prevents the + * deployment of images that do not meet security standards. + */ + private ManagedClusterSecurityProfileDefenderSecurityGating securityGating; + /** * Creates an instance of ManagedClusterSecurityProfileDefender class. */ @@ -83,6 +90,31 @@ public ManagedClusterSecurityProfileDefenderSecurityMonitoring securityMonitorin return this; } + /** + * Get the securityGating property: Microsoft Defender settings for security gating, validates container images + * eligibility for deployment based on Defender for Containers security findings. Using Admission Controller, it + * either audits or prevents the deployment of images that do not meet security standards. + * + * @return the securityGating value. + */ + public ManagedClusterSecurityProfileDefenderSecurityGating securityGating() { + return this.securityGating; + } + + /** + * Set the securityGating property: Microsoft Defender settings for security gating, validates container images + * eligibility for deployment based on Defender for Containers security findings. Using Admission Controller, it + * either audits or prevents the deployment of images that do not meet security standards. + * + * @param securityGating the securityGating value to set. + * @return the ManagedClusterSecurityProfileDefender object itself. + */ + public ManagedClusterSecurityProfileDefender + withSecurityGating(ManagedClusterSecurityProfileDefenderSecurityGating securityGating) { + this.securityGating = securityGating; + return this; + } + /** * Validates the instance. * @@ -92,6 +124,9 @@ public void validate() { if (securityMonitoring() != null) { securityMonitoring().validate(); } + if (securityGating() != null) { + securityGating().validate(); + } } /** @@ -102,6 +137,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("logAnalyticsWorkspaceResourceId", this.logAnalyticsWorkspaceResourceId); jsonWriter.writeJsonField("securityMonitoring", this.securityMonitoring); + jsonWriter.writeJsonField("securityGating", this.securityGating); return jsonWriter.writeEndObject(); } @@ -127,6 +163,9 @@ public static ManagedClusterSecurityProfileDefender fromJson(JsonReader jsonRead } else if ("securityMonitoring".equals(fieldName)) { deserializedManagedClusterSecurityProfileDefender.securityMonitoring = ManagedClusterSecurityProfileDefenderSecurityMonitoring.fromJson(reader); + } else if ("securityGating".equals(fieldName)) { + deserializedManagedClusterSecurityProfileDefender.securityGating + = ManagedClusterSecurityProfileDefenderSecurityGating.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGating.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGating.java new file mode 100644 index 000000000000..92847ad182fb --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGating.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Microsoft Defender settings for security gating, validates container images eligibility for deployment based on + * Defender for Containers security findings. Using Admission Controller, it either audits or prevents the deployment of + * images that do not meet security standards. + */ +@Fluent +public final class ManagedClusterSecurityProfileDefenderSecurityGating + implements JsonSerializable<ManagedClusterSecurityProfileDefenderSecurityGating> { + /* + * Whether to enable Defender security gating. When enabled, the gating feature will scan container images and audit + * or block the deployment of images that do not meet security standards according to the configured security rules. + */ + private Boolean enabled; + + /* + * List of identities that the admission controller will make use of in order to pull security artifacts from the + * registry. These are the same identities used by the cluster to pull container images. Each identity provided + * should have federated identity credential attached to it. + */ + private List<ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem> identities; + + /* + * In use only while registry access granted by secret rather than managed identity. Set whether to grant the + * Defender gating agent access to the cluster's secrets for pulling images from registries. If secret access is + * denied and the registry requires pull secrets, the add-on will not perform any image validation. Default value is + * false. + */ + private Boolean allowSecretAccess; + + /** + * Creates an instance of ManagedClusterSecurityProfileDefenderSecurityGating class. + */ + public ManagedClusterSecurityProfileDefenderSecurityGating() { + } + + /** + * Get the enabled property: Whether to enable Defender security gating. When enabled, the gating feature will scan + * container images and audit or block the deployment of images that do not meet security standards according to the + * configured security rules. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Defender security gating. When enabled, the gating feature will scan + * container images and audit or block the deployment of images that do not meet security standards according to the + * configured security rules. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterSecurityProfileDefenderSecurityGating object itself. + */ + public ManagedClusterSecurityProfileDefenderSecurityGating withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the identities property: List of identities that the admission controller will make use of in order to pull + * security artifacts from the registry. These are the same identities used by the cluster to pull container images. + * Each identity provided should have federated identity credential attached to it. + * + * @return the identities value. + */ + public List<ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem> identities() { + return this.identities; + } + + /** + * Set the identities property: List of identities that the admission controller will make use of in order to pull + * security artifacts from the registry. These are the same identities used by the cluster to pull container images. + * Each identity provided should have federated identity credential attached to it. + * + * @param identities the identities value to set. + * @return the ManagedClusterSecurityProfileDefenderSecurityGating object itself. + */ + public ManagedClusterSecurityProfileDefenderSecurityGating + withIdentities(List<ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem> identities) { + this.identities = identities; + return this; + } + + /** + * Get the allowSecretAccess property: In use only while registry access granted by secret rather than managed + * identity. Set whether to grant the Defender gating agent access to the cluster's secrets for pulling images from + * registries. If secret access is denied and the registry requires pull secrets, the add-on will not perform any + * image validation. Default value is false. + * + * @return the allowSecretAccess value. + */ + public Boolean allowSecretAccess() { + return this.allowSecretAccess; + } + + /** + * Set the allowSecretAccess property: In use only while registry access granted by secret rather than managed + * identity. Set whether to grant the Defender gating agent access to the cluster's secrets for pulling images from + * registries. If secret access is denied and the registry requires pull secrets, the add-on will not perform any + * image validation. Default value is false. + * + * @param allowSecretAccess the allowSecretAccess value to set. + * @return the ManagedClusterSecurityProfileDefenderSecurityGating object itself. + */ + public ManagedClusterSecurityProfileDefenderSecurityGating withAllowSecretAccess(Boolean allowSecretAccess) { + this.allowSecretAccess = allowSecretAccess; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identities() != null) { + identities().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeArrayField("identities", this.identities, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("allowSecretAccess", this.allowSecretAccess); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSecurityProfileDefenderSecurityGating from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSecurityProfileDefenderSecurityGating if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterSecurityProfileDefenderSecurityGating. + */ + public static ManagedClusterSecurityProfileDefenderSecurityGating fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSecurityProfileDefenderSecurityGating deserializedManagedClusterSecurityProfileDefenderSecurityGating + = new ManagedClusterSecurityProfileDefenderSecurityGating(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterSecurityProfileDefenderSecurityGating.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("identities".equals(fieldName)) { + List<ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem> identities + = reader.readArray(reader1 -> ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem + .fromJson(reader1)); + deserializedManagedClusterSecurityProfileDefenderSecurityGating.identities = identities; + } else if ("allowSecretAccess".equals(fieldName)) { + deserializedManagedClusterSecurityProfileDefenderSecurityGating.allowSecretAccess + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSecurityProfileDefenderSecurityGating; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.java new file mode 100644 index 000000000000..1029c3faa92c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem model. + */ +@Fluent +public final class ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem + implements JsonSerializable<ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem> { + /* + * The container registry for which the identity will be used; the identity specified here should have a federated + * identity credential attached to it. + */ + private String azureContainerRegistry; + + /* + * The identity object used to access the registry + */ + private UserAssignedIdentity identity; + + /** + * Creates an instance of ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem class. + */ + public ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem() { + } + + /** + * Get the azureContainerRegistry property: The container registry for which the identity will be used; the identity + * specified here should have a federated identity credential attached to it. + * + * @return the azureContainerRegistry value. + */ + public String azureContainerRegistry() { + return this.azureContainerRegistry; + } + + /** + * Set the azureContainerRegistry property: The container registry for which the identity will be used; the identity + * specified here should have a federated identity credential attached to it. + * + * @param azureContainerRegistry the azureContainerRegistry value to set. + * @return the ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem object itself. + */ + public ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem + withAzureContainerRegistry(String azureContainerRegistry) { + this.azureContainerRegistry = azureContainerRegistry; + return this; + } + + /** + * Get the identity property: The identity object used to access the registry. + * + * @return the identity value. + */ + public UserAssignedIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity object used to access the registry. + * + * @param identity the identity value to set. + * @return the ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem object itself. + */ + public ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem + withIdentity(UserAssignedIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("azureContainerRegistry", this.azureContainerRegistry); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem if the JsonReader was + * pointing to an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the + * ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem. + */ + public static ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem deserializedManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem + = new ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("azureContainerRegistry".equals(fieldName)) { + deserializedManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.azureContainerRegistry + = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.identity + = UserAssignedIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageIntegrity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageIntegrity.java new file mode 100644 index 000000000000..65ce8f74d785 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageIntegrity.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Image integrity related settings for the security profile. + */ +@Fluent +public final class ManagedClusterSecurityProfileImageIntegrity + implements JsonSerializable<ManagedClusterSecurityProfileImageIntegrity> { + /* + * Whether to enable image integrity. The default value is false. + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterSecurityProfileImageIntegrity class. + */ + public ManagedClusterSecurityProfileImageIntegrity() { + } + + /** + * Get the enabled property: Whether to enable image integrity. The default value is false. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable image integrity. The default value is false. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterSecurityProfileImageIntegrity object itself. + */ + public ManagedClusterSecurityProfileImageIntegrity withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSecurityProfileImageIntegrity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSecurityProfileImageIntegrity if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterSecurityProfileImageIntegrity. + */ + public static ManagedClusterSecurityProfileImageIntegrity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSecurityProfileImageIntegrity deserializedManagedClusterSecurityProfileImageIntegrity + = new ManagedClusterSecurityProfileImageIntegrity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterSecurityProfileImageIntegrity.enabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSecurityProfileImageIntegrity; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileNodeRestriction.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileNodeRestriction.java new file mode 100644 index 000000000000..ae296c00861b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileNodeRestriction.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Node Restriction settings for the security profile. + */ +@Fluent +public final class ManagedClusterSecurityProfileNodeRestriction + implements JsonSerializable<ManagedClusterSecurityProfileNodeRestriction> { + /* + * Whether to enable Node Restriction + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterSecurityProfileNodeRestriction class. + */ + public ManagedClusterSecurityProfileNodeRestriction() { + } + + /** + * Get the enabled property: Whether to enable Node Restriction. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Node Restriction. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterSecurityProfileNodeRestriction object itself. + */ + public ManagedClusterSecurityProfileNodeRestriction withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSecurityProfileNodeRestriction from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSecurityProfileNodeRestriction if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterSecurityProfileNodeRestriction. + */ + public static ManagedClusterSecurityProfileNodeRestriction fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSecurityProfileNodeRestriction deserializedManagedClusterSecurityProfileNodeRestriction + = new ManagedClusterSecurityProfileNodeRestriction(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterSecurityProfileNodeRestriction.enabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSecurityProfileNodeRestriction; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSnapshotListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSnapshotListResult.java new file mode 100644 index 000000000000..c424e9052a9e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSnapshotListResult.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterSnapshotInner; +import java.io.IOException; +import java.util.List; + +/** + * The response from the List Managed Cluster Snapshots operation. + */ +@Fluent +public final class ManagedClusterSnapshotListResult implements JsonSerializable<ManagedClusterSnapshotListResult> { + /* + * The list of managed cluster snapshots. + */ + private List<ManagedClusterSnapshotInner> value; + + /* + * The URL to get the next set of managed cluster snapshot results. + */ + private String nextLink; + + /** + * Creates an instance of ManagedClusterSnapshotListResult class. + */ + public ManagedClusterSnapshotListResult() { + } + + /** + * Get the value property: The list of managed cluster snapshots. + * + * @return the value value. + */ + public List<ManagedClusterSnapshotInner> value() { + return this.value; + } + + /** + * Set the value property: The list of managed cluster snapshots. + * + * @param value the value value to set. + * @return the ManagedClusterSnapshotListResult object itself. + */ + public ManagedClusterSnapshotListResult withValue(List<ManagedClusterSnapshotInner> value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of managed cluster snapshot results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSnapshotListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSnapshotListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterSnapshotListResult. + */ + public static ManagedClusterSnapshotListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSnapshotListResult deserializedManagedClusterSnapshotListResult + = new ManagedClusterSnapshotListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<ManagedClusterSnapshotInner> value + = reader.readArray(reader1 -> ManagedClusterSnapshotInner.fromJson(reader1)); + deserializedManagedClusterSnapshotListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedClusterSnapshotListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSnapshotListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java index 7a94fabab0c8..ccb43c95014c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java @@ -22,6 +22,11 @@ public final class ManagedClusterStorageProfileDiskCsiDriver */ private Boolean enabled; + /* + * The version of AzureDisk CSI Driver. The default value is v1. + */ + private String version; + /** * Creates an instance of ManagedClusterStorageProfileDiskCsiDriver class. */ @@ -48,6 +53,26 @@ public ManagedClusterStorageProfileDiskCsiDriver withEnabled(Boolean enabled) { return this; } + /** + * Get the version property: The version of AzureDisk CSI Driver. The default value is v1. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: The version of AzureDisk CSI Driver. The default value is v1. + * + * @param version the version value to set. + * @return the ManagedClusterStorageProfileDiskCsiDriver object itself. + */ + public ManagedClusterStorageProfileDiskCsiDriver withVersion(String version) { + this.version = version; + return this; + } + /** * Validates the instance. * @@ -63,6 +88,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("version", this.version); return jsonWriter.writeEndObject(); } @@ -85,6 +111,8 @@ public static ManagedClusterStorageProfileDiskCsiDriver fromJson(JsonReader json if ("enabled".equals(fieldName)) { deserializedManagedClusterStorageProfileDiskCsiDriver.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("version".equals(fieldName)) { + deserializedManagedClusterStorageProfileDiskCsiDriver.version = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java index c8824d320110..b1d3f03a048c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java @@ -23,7 +23,7 @@ public final class ManagedClusterWorkloadAutoScalerProfile private ManagedClusterWorkloadAutoScalerProfileKeda keda; /* - * VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. + * The verticalPodAutoscaler property. */ private ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler verticalPodAutoscaler; @@ -54,8 +54,7 @@ public ManagedClusterWorkloadAutoScalerProfile withKeda(ManagedClusterWorkloadAu } /** - * Get the verticalPodAutoscaler property: VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler - * profile. + * Get the verticalPodAutoscaler property: The verticalPodAutoscaler property. * * @return the verticalPodAutoscaler value. */ @@ -64,8 +63,7 @@ public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler verticalPodA } /** - * Set the verticalPodAutoscaler property: VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler - * profile. + * Set the verticalPodAutoscaler property: The verticalPodAutoscaler property. * * @param verticalPodAutoscaler the verticalPodAutoscaler value to set. * @return the ManagedClusterWorkloadAutoScalerProfile object itself. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java index 391810a872f1..01c22f2e3d84 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java @@ -12,16 +12,21 @@ import java.io.IOException; /** - * VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. + * The ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler model. */ @Fluent public final class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler implements JsonSerializable<ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler> { /* - * Whether to enable VPA. Default value is false. + * Whether to enable VPA add-on in cluster. Default value is false. */ private boolean enabled; + /* + * Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. + */ + private AddonAutoscaling addonAutoscaling; + /** * Creates an instance of ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler class. */ @@ -29,7 +34,7 @@ public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler() { } /** - * Get the enabled property: Whether to enable VPA. Default value is false. + * Get the enabled property: Whether to enable VPA add-on in cluster. Default value is false. * * @return the enabled value. */ @@ -38,7 +43,7 @@ public boolean enabled() { } /** - * Set the enabled property: Whether to enable VPA. Default value is false. + * Set the enabled property: Whether to enable VPA add-on in cluster. Default value is false. * * @param enabled the enabled value to set. * @return the ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler object itself. @@ -48,6 +53,27 @@ public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler withEnabled( return this; } + /** + * Get the addonAutoscaling property: Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. + * + * @return the addonAutoscaling value. + */ + public AddonAutoscaling addonAutoscaling() { + return this.addonAutoscaling; + } + + /** + * Set the addonAutoscaling property: Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. + * + * @param addonAutoscaling the addonAutoscaling value to set. + * @return the ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler object itself. + */ + public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler + withAddonAutoscaling(AddonAutoscaling addonAutoscaling) { + this.addonAutoscaling = addonAutoscaling; + return this; + } + /** * Validates the instance. * @@ -63,6 +89,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("addonAutoscaling", + this.addonAutoscaling == null ? null : this.addonAutoscaling.toString()); return jsonWriter.writeEndObject(); } @@ -88,6 +116,9 @@ public static ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler fromJ if ("enabled".equals(fieldName)) { deserializedManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.enabled = reader.getBoolean(); + } else if ("addonAutoscaling".equals(fieldName)) { + deserializedManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.addonAutoscaling + = AddonAutoscaling.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedGatewayType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedGatewayType.java new file mode 100644 index 000000000000..f12707fc5b6b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedGatewayType.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Configuration for the managed Gateway API installation. If not specified, the default is 'Disabled'. See + * https://aka.ms/k8s-gateway-api for more details. + */ +public final class ManagedGatewayType extends ExpandableStringEnum<ManagedGatewayType> { + /** + * Static value Disabled for ManagedGatewayType. + */ + public static final ManagedGatewayType DISABLED = fromString("Disabled"); + + /** + * Static value Standard for ManagedGatewayType. + */ + public static final ManagedGatewayType STANDARD = fromString("Standard"); + + /** + * Creates a new instance of ManagedGatewayType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedGatewayType() { + } + + /** + * Creates or finds a ManagedGatewayType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedGatewayType. + */ + public static ManagedGatewayType fromString(String name) { + return fromString(name, ManagedGatewayType.class); + } + + /** + * Gets known ManagedGatewayType values. + * + * @return known ManagedGatewayType values. + */ + public static Collection<ManagedGatewayType> values() { + return values(ManagedGatewayType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProperties.java new file mode 100644 index 000000000000..dc08ab89ace1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProperties.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Mesh membership properties of a managed cluster. + */ +@Fluent +public final class MeshMembershipProperties implements JsonSerializable<MeshMembershipProperties> { + /* + * The current provisioning state of the Mesh Membership. + */ + private MeshMembershipProvisioningState provisioningState; + + /* + * The ARM resource id for the managed mesh member. This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{ + * appLinkName}/appLinkMembers/{appLinkMemberName}'. Visit https://aka.ms/applink for more information. + */ + private String managedMeshId; + + /** + * Creates an instance of MeshMembershipProperties class. + */ + public MeshMembershipProperties() { + } + + /** + * Get the provisioningState property: The current provisioning state of the Mesh Membership. + * + * @return the provisioningState value. + */ + public MeshMembershipProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the managedMeshId property: The ARM resource id for the managed mesh member. This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{appLinkName}/appLinkMembers/{appLinkMemberName}'. + * Visit https://aka.ms/applink for more information. + * + * @return the managedMeshId value. + */ + public String managedMeshId() { + return this.managedMeshId; + } + + /** + * Set the managedMeshId property: The ARM resource id for the managed mesh member. This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{appLinkName}/appLinkMembers/{appLinkMemberName}'. + * Visit https://aka.ms/applink for more information. + * + * @param managedMeshId the managedMeshId value to set. + * @return the MeshMembershipProperties object itself. + */ + public MeshMembershipProperties withManagedMeshId(String managedMeshId) { + this.managedMeshId = managedMeshId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (managedMeshId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property managedMeshId in model MeshMembershipProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MeshMembershipProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("managedMeshID", this.managedMeshId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshMembershipProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshMembershipProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MeshMembershipProperties. + */ + public static MeshMembershipProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshMembershipProperties deserializedMeshMembershipProperties = new MeshMembershipProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("managedMeshID".equals(fieldName)) { + deserializedMeshMembershipProperties.managedMeshId = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedMeshMembershipProperties.provisioningState + = MeshMembershipProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedMeshMembershipProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProvisioningState.java new file mode 100644 index 000000000000..ab03b199aed9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The provisioning state of the last accepted operation. + */ +public final class MeshMembershipProvisioningState extends ExpandableStringEnum<MeshMembershipProvisioningState> { + /** + * Static value Canceled for MeshMembershipProvisioningState. + */ + public static final MeshMembershipProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Creating for MeshMembershipProvisioningState. + */ + public static final MeshMembershipProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Deleting for MeshMembershipProvisioningState. + */ + public static final MeshMembershipProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Failed for MeshMembershipProvisioningState. + */ + public static final MeshMembershipProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Succeeded for MeshMembershipProvisioningState. + */ + public static final MeshMembershipProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Updating for MeshMembershipProvisioningState. + */ + public static final MeshMembershipProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates a new instance of MeshMembershipProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MeshMembershipProvisioningState() { + } + + /** + * Creates or finds a MeshMembershipProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding MeshMembershipProvisioningState. + */ + public static MeshMembershipProvisioningState fromString(String name) { + return fromString(name, MeshMembershipProvisioningState.class); + } + + /** + * Gets known MeshMembershipProvisioningState values. + * + * @return known MeshMembershipProvisioningState values. + */ + public static Collection<MeshMembershipProvisioningState> values() { + return values(MeshMembershipProvisioningState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipsListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipsListResult.java new file mode 100644 index 000000000000..8702c4098ab1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipsListResult.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.MeshMembershipInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list mesh memberships in a managed cluster. + */ +@Fluent +public final class MeshMembershipsListResult implements JsonSerializable<MeshMembershipsListResult> { + /* + * The list of mesh memberships. + */ + private List<MeshMembershipInner> value; + + /* + * The URL to get the next set of mesh membership results. + */ + private String nextLink; + + /** + * Creates an instance of MeshMembershipsListResult class. + */ + public MeshMembershipsListResult() { + } + + /** + * Get the value property: The list of mesh memberships. + * + * @return the value value. + */ + public List<MeshMembershipInner> value() { + return this.value; + } + + /** + * Set the value property: The list of mesh memberships. + * + * @param value the value value to set. + * @return the MeshMembershipsListResult object itself. + */ + public MeshMembershipsListResult withValue(List<MeshMembershipInner> value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of mesh membership results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshMembershipsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshMembershipsListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MeshMembershipsListResult. + */ + public static MeshMembershipsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshMembershipsListResult deserializedMeshMembershipsListResult = new MeshMembershipsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<MeshMembershipInner> value + = reader.readArray(reader1 -> MeshMembershipInner.fromJson(reader1)); + deserializedMeshMembershipsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMeshMembershipsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMeshMembershipsListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Mode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Mode.java new file mode 100644 index 000000000000..89f007301d6e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Mode.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). + */ +public final class Mode extends ExpandableStringEnum<Mode> { + /** + * Static value IPTABLES for Mode. + */ + public static final Mode IPTABLES = fromString("IPTABLES"); + + /** + * Static value IPVS for Mode. + */ + public static final Mode IPVS = fromString("IPVS"); + + /** + * Static value NFTABLES for Mode. + */ + public static final Mode NFTABLES = fromString("NFTABLES"); + + /** + * Creates a new instance of Mode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Mode() { + } + + /** + * Creates or finds a Mode from its string representation. + * + * @param name a name to look for. + * @return the corresponding Mode. + */ + public static Mode fromString(String name) { + return fromString(name, Mode.class); + } + + /** + * Gets known Mode values. + * + * @return known Mode values. + */ + public static Collection<Mode> values() { + return values(Mode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfileForSnapshot.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfileForSnapshot.java new file mode 100644 index 000000000000..df9b9e8601f6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfileForSnapshot.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * network profile for managed cluster snapshot, these properties are read only. + */ +@Fluent +public final class NetworkProfileForSnapshot implements JsonSerializable<NetworkProfileForSnapshot> { + /* + * networkPlugin for managed cluster snapshot. + */ + private NetworkPlugin networkPlugin; + + /* + * NetworkPluginMode for managed cluster snapshot. + */ + private NetworkPluginMode networkPluginMode; + + /* + * networkPolicy for managed cluster snapshot. + */ + private NetworkPolicy networkPolicy; + + /* + * networkMode for managed cluster snapshot. + */ + private NetworkMode networkMode; + + /* + * loadBalancerSku for managed cluster snapshot. + */ + private LoadBalancerSku loadBalancerSku; + + /** + * Creates an instance of NetworkProfileForSnapshot class. + */ + public NetworkProfileForSnapshot() { + } + + /** + * Get the networkPlugin property: networkPlugin for managed cluster snapshot. + * + * @return the networkPlugin value. + */ + public NetworkPlugin networkPlugin() { + return this.networkPlugin; + } + + /** + * Set the networkPlugin property: networkPlugin for managed cluster snapshot. + * + * @param networkPlugin the networkPlugin value to set. + * @return the NetworkProfileForSnapshot object itself. + */ + public NetworkProfileForSnapshot withNetworkPlugin(NetworkPlugin networkPlugin) { + this.networkPlugin = networkPlugin; + return this; + } + + /** + * Get the networkPluginMode property: NetworkPluginMode for managed cluster snapshot. + * + * @return the networkPluginMode value. + */ + public NetworkPluginMode networkPluginMode() { + return this.networkPluginMode; + } + + /** + * Set the networkPluginMode property: NetworkPluginMode for managed cluster snapshot. + * + * @param networkPluginMode the networkPluginMode value to set. + * @return the NetworkProfileForSnapshot object itself. + */ + public NetworkProfileForSnapshot withNetworkPluginMode(NetworkPluginMode networkPluginMode) { + this.networkPluginMode = networkPluginMode; + return this; + } + + /** + * Get the networkPolicy property: networkPolicy for managed cluster snapshot. + * + * @return the networkPolicy value. + */ + public NetworkPolicy networkPolicy() { + return this.networkPolicy; + } + + /** + * Set the networkPolicy property: networkPolicy for managed cluster snapshot. + * + * @param networkPolicy the networkPolicy value to set. + * @return the NetworkProfileForSnapshot object itself. + */ + public NetworkProfileForSnapshot withNetworkPolicy(NetworkPolicy networkPolicy) { + this.networkPolicy = networkPolicy; + return this; + } + + /** + * Get the networkMode property: networkMode for managed cluster snapshot. + * + * @return the networkMode value. + */ + public NetworkMode networkMode() { + return this.networkMode; + } + + /** + * Set the networkMode property: networkMode for managed cluster snapshot. + * + * @param networkMode the networkMode value to set. + * @return the NetworkProfileForSnapshot object itself. + */ + public NetworkProfileForSnapshot withNetworkMode(NetworkMode networkMode) { + this.networkMode = networkMode; + return this; + } + + /** + * Get the loadBalancerSku property: loadBalancerSku for managed cluster snapshot. + * + * @return the loadBalancerSku value. + */ + public LoadBalancerSku loadBalancerSku() { + return this.loadBalancerSku; + } + + /** + * Set the loadBalancerSku property: loadBalancerSku for managed cluster snapshot. + * + * @param loadBalancerSku the loadBalancerSku value to set. + * @return the NetworkProfileForSnapshot object itself. + */ + public NetworkProfileForSnapshot withLoadBalancerSku(LoadBalancerSku loadBalancerSku) { + this.loadBalancerSku = loadBalancerSku; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("networkPlugin", this.networkPlugin == null ? null : this.networkPlugin.toString()); + jsonWriter.writeStringField("networkPluginMode", + this.networkPluginMode == null ? null : this.networkPluginMode.toString()); + jsonWriter.writeStringField("networkPolicy", this.networkPolicy == null ? null : this.networkPolicy.toString()); + jsonWriter.writeStringField("networkMode", this.networkMode == null ? null : this.networkMode.toString()); + jsonWriter.writeStringField("loadBalancerSku", + this.loadBalancerSku == null ? null : this.loadBalancerSku.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkProfileForSnapshot from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkProfileForSnapshot if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkProfileForSnapshot. + */ + public static NetworkProfileForSnapshot fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkProfileForSnapshot deserializedNetworkProfileForSnapshot = new NetworkProfileForSnapshot(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("networkPlugin".equals(fieldName)) { + deserializedNetworkProfileForSnapshot.networkPlugin = NetworkPlugin.fromString(reader.getString()); + } else if ("networkPluginMode".equals(fieldName)) { + deserializedNetworkProfileForSnapshot.networkPluginMode + = NetworkPluginMode.fromString(reader.getString()); + } else if ("networkPolicy".equals(fieldName)) { + deserializedNetworkProfileForSnapshot.networkPolicy = NetworkPolicy.fromString(reader.getString()); + } else if ("networkMode".equals(fieldName)) { + deserializedNetworkProfileForSnapshot.networkMode = NetworkMode.fromString(reader.getString()); + } else if ("loadBalancerSku".equals(fieldName)) { + deserializedNetworkProfileForSnapshot.loadBalancerSku + = LoadBalancerSku.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkProfileForSnapshot; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeCustomizationProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeCustomizationProfile.java new file mode 100644 index 000000000000..67592d6f63a9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeCustomizationProfile.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Settings to determine the node customization used to provision nodes in a pool. + */ +@Fluent +public final class NodeCustomizationProfile implements JsonSerializable<NodeCustomizationProfile> { + /* + * The resource ID of the node customization resource to use. This can be a version. Omitting the version will use + * the latest version of the node customization. + */ + private String nodeCustomizationId; + + /** + * Creates an instance of NodeCustomizationProfile class. + */ + public NodeCustomizationProfile() { + } + + /** + * Get the nodeCustomizationId property: The resource ID of the node customization resource to use. This can be a + * version. Omitting the version will use the latest version of the node customization. + * + * @return the nodeCustomizationId value. + */ + public String nodeCustomizationId() { + return this.nodeCustomizationId; + } + + /** + * Set the nodeCustomizationId property: The resource ID of the node customization resource to use. This can be a + * version. Omitting the version will use the latest version of the node customization. + * + * @param nodeCustomizationId the nodeCustomizationId value to set. + * @return the NodeCustomizationProfile object itself. + */ + public NodeCustomizationProfile withNodeCustomizationId(String nodeCustomizationId) { + this.nodeCustomizationId = nodeCustomizationId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nodeCustomizationId", this.nodeCustomizationId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NodeCustomizationProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NodeCustomizationProfile if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NodeCustomizationProfile. + */ + public static NodeCustomizationProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NodeCustomizationProfile deserializedNodeCustomizationProfile = new NodeCustomizationProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nodeCustomizationId".equals(fieldName)) { + deserializedNodeCustomizationProfile.nodeCustomizationId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNodeCustomizationProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeImageVersionsListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeImageVersionsListResult.java new file mode 100644 index 000000000000..bd57042c4fe0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeImageVersionsListResult.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.NodeImageVersionInner; +import java.io.IOException; +import java.util.List; + +/** + * Holds an array NodeImageVersions. + */ +@Fluent +public final class NodeImageVersionsListResult implements JsonSerializable<NodeImageVersionsListResult> { + /* + * Array of AKS Node Image versions. + */ + private List<NodeImageVersionInner> value; + + /* + * The URL to get the next set of machine results. + */ + private String nextLink; + + /** + * Creates an instance of NodeImageVersionsListResult class. + */ + public NodeImageVersionsListResult() { + } + + /** + * Get the value property: Array of AKS Node Image versions. + * + * @return the value value. + */ + public List<NodeImageVersionInner> value() { + return this.value; + } + + /** + * Set the value property: Array of AKS Node Image versions. + * + * @param value the value value to set. + * @return the NodeImageVersionsListResult object itself. + */ + public NodeImageVersionsListResult withValue(List<NodeImageVersionInner> value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of machine results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NodeImageVersionsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NodeImageVersionsListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NodeImageVersionsListResult. + */ + public static NodeImageVersionsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NodeImageVersionsListResult deserializedNodeImageVersionsListResult = new NodeImageVersionsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<NodeImageVersionInner> value + = reader.readArray(reader1 -> NodeImageVersionInner.fromJson(reader1)); + deserializedNodeImageVersionsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNodeImageVersionsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNodeImageVersionsListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java index 8f9de197ee22..8c741e7ae4c4 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java @@ -8,7 +8,8 @@ import java.util.Collection; /** - * Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. + * Manner in which the OS on your nodes is updated. The default is Unmanaged, but may change to either NodeImage or + * SecurityPatch at GA. */ public final class NodeOSUpgradeChannel extends ExpandableStringEnum<NodeOSUpgradeChannel> { /** @@ -22,14 +23,14 @@ public final class NodeOSUpgradeChannel extends ExpandableStringEnum<NodeOSUpgra public static final NodeOSUpgradeChannel UNMANAGED = fromString("Unmanaged"); /** - * Static value NodeImage for NodeOSUpgradeChannel. + * Static value SecurityPatch for NodeOSUpgradeChannel. */ - public static final NodeOSUpgradeChannel NODE_IMAGE = fromString("NodeImage"); + public static final NodeOSUpgradeChannel SECURITY_PATCH = fromString("SecurityPatch"); /** - * Static value SecurityPatch for NodeOSUpgradeChannel. + * Static value NodeImage for NodeOSUpgradeChannel. */ - public static final NodeOSUpgradeChannel SECURITY_PATCH = fromString("SecurityPatch"); + public static final NodeOSUpgradeChannel NODE_IMAGE = fromString("NodeImage"); /** * Creates a new instance of NodeOSUpgradeChannel value. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java index bdb0ac40d084..6d32b394ca4a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java @@ -8,8 +8,8 @@ import java.util.Collection; /** - * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 - * when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + * Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 + * if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. */ public final class OSSku extends ExpandableStringEnum<OSSku> { /** @@ -17,6 +17,11 @@ public final class OSSku extends ExpandableStringEnum<OSSku> { */ public static final OSSku UBUNTU = fromString("Ubuntu"); + /** + * Static value Mariner for OSSku. + */ + public static final OSSku MARINER = fromString("Mariner"); + /** * Static value AzureLinux for OSSku. */ @@ -27,6 +32,11 @@ public final class OSSku extends ExpandableStringEnum<OSSku> { */ public static final OSSku AZURE_LINUX3 = fromString("AzureLinux3"); + /** + * Static value Flatcar for OSSku. + */ + public static final OSSku FLATCAR = fromString("Flatcar"); + /** * Static value CBLMariner for OSSku. */ @@ -42,11 +52,26 @@ public final class OSSku extends ExpandableStringEnum<OSSku> { */ public static final OSSku WINDOWS2022 = fromString("Windows2022"); + /** + * Static value Windows2025 for OSSku. + */ + public static final OSSku WINDOWS2025 = fromString("Windows2025"); + + /** + * Static value WindowsAnnual for OSSku. + */ + public static final OSSku WINDOWS_ANNUAL = fromString("WindowsAnnual"); + /** * Static value Ubuntu2204 for OSSku. */ public static final OSSku UBUNTU2204 = fromString("Ubuntu2204"); + /** + * Static value Ubuntu2404 for OSSku. + */ + public static final OSSku UBUNTU2404 = fromString("Ubuntu2404"); + /** * Creates a new instance of OSSku value. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationStatusResultList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationStatusResultList.java new file mode 100644 index 000000000000..6ee5edce05c9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationStatusResultList.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.OperationStatusResultInner; +import java.io.IOException; +import java.util.List; + +/** + * The operations list. It contains an URL link to get the next set of results. + */ +@Immutable +public final class OperationStatusResultList implements JsonSerializable<OperationStatusResultList> { + /* + * List of operations + */ + private List<OperationStatusResultInner> value; + + /* + * URL to get the next set of operation list results (if there are any). + */ + private String nextLink; + + /** + * Creates an instance of OperationStatusResultList class. + */ + public OperationStatusResultList() { + } + + /** + * Get the value property: List of operations. + * + * @return the value value. + */ + public List<OperationStatusResultInner> value() { + return this.value; + } + + /** + * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationStatusResultList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationStatusResultList if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationStatusResultList. + */ + public static OperationStatusResultList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationStatusResultList deserializedOperationStatusResultList = new OperationStatusResultList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<OperationStatusResultInner> value + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedOperationStatusResultList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOperationStatusResultList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationStatusResultList; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Operator.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Operator.java new file mode 100644 index 000000000000..27748a54944a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Operator.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * operator represents a key's relationship to a set of values. Valid operators are In and NotIn. + */ +public final class Operator extends ExpandableStringEnum<Operator> { + /** + * Static value In for Operator. + */ + public static final Operator IN = fromString("In"); + + /** + * Static value NotIn for Operator. + */ + public static final Operator NOT_IN = fromString("NotIn"); + + /** + * Static value Exists for Operator. + */ + public static final Operator EXISTS = fromString("Exists"); + + /** + * Static value DoesNotExist for Operator. + */ + public static final Operator DOES_NOT_EXIST = fromString("DoesNotExist"); + + /** + * Creates a new instance of Operator value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Operator() { + } + + /** + * Creates or finds a Operator from its string representation. + * + * @param name a name to look for. + * @return the corresponding Operator. + */ + public static Operator fromString(String name) { + return fromString(name, Operator.class); + } + + /** + * Gets known Operator values. + * + * @return known Operator values. + */ + public static Collection<Operator> values() { + return values(Operator.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodLinkLocalAccess.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodLinkLocalAccess.java new file mode 100644 index 000000000000..cef2262fdc22 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodLinkLocalAccess.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines access to special link local addresses (Azure Instance Metadata Service, aka IMDS) for pods with + * hostNetwork=false. If not specified, the default is 'IMDS'. + */ +public final class PodLinkLocalAccess extends ExpandableStringEnum<PodLinkLocalAccess> { + /** + * Static value IMDS for PodLinkLocalAccess. + */ + public static final PodLinkLocalAccess IMDS = fromString("IMDS"); + + /** + * Static value None for PodLinkLocalAccess. + */ + public static final PodLinkLocalAccess NONE = fromString("None"); + + /** + * Creates a new instance of PodLinkLocalAccess value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PodLinkLocalAccess() { + } + + /** + * Creates or finds a PodLinkLocalAccess from its string representation. + * + * @param name a name to look for. + * @return the corresponding PodLinkLocalAccess. + */ + public static PodLinkLocalAccess fromString(String name) { + return fromString(name, PodLinkLocalAccess.class); + } + + /** + * Gets known PodLinkLocalAccess values. + * + * @return known PodLinkLocalAccess values. + */ + public static Collection<PodLinkLocalAccess> values() { + return values(PodLinkLocalAccess.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ProxyRedirectionMechanism.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ProxyRedirectionMechanism.java new file mode 100644 index 000000000000..24299d253630 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ProxyRedirectionMechanism.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.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Mode of traffic redirection. + */ +public final class ProxyRedirectionMechanism extends ExpandableStringEnum<ProxyRedirectionMechanism> { + /** + * Static value InitContainers for ProxyRedirectionMechanism. + */ + public static final ProxyRedirectionMechanism INIT_CONTAINERS = fromString("InitContainers"); + + /** + * Static value CNIChaining for ProxyRedirectionMechanism. + */ + public static final ProxyRedirectionMechanism CNICHAINING = fromString("CNIChaining"); + + /** + * Creates a new instance of ProxyRedirectionMechanism value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProxyRedirectionMechanism() { + } + + /** + * Creates or finds a ProxyRedirectionMechanism from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProxyRedirectionMechanism. + */ + public static ProxyRedirectionMechanism fromString(String name) { + return fromString(name, ProxyRedirectionMechanism.class); + } + + /** + * Gets known ProxyRedirectionMechanism values. + * + * @return known ProxyRedirectionMechanism values. + */ + public static Collection<ProxyRedirectionMechanism> values() { + return values(ProxyRedirectionMechanism.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java index fbe44e756c02..2402a0e06db8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java @@ -21,6 +21,11 @@ public final class PublicNetworkAccess extends ExpandableStringEnum<PublicNetwor */ public static final PublicNetworkAccess DISABLED = fromString("Disabled"); + /** + * Static value SecuredByPerimeter for PublicNetworkAccess. + */ + public static final PublicNetworkAccess SECURED_BY_PERIMETER = fromString("SecuredByPerimeter"); + /** * Creates a new instance of PublicNetworkAccess value. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RebalanceLoadBalancersRequestBody.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RebalanceLoadBalancersRequestBody.java new file mode 100644 index 000000000000..85d3aa6fe597 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RebalanceLoadBalancersRequestBody.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The names of the load balancers to rebalance. If set to empty, all load balancers will be rebalanced. + */ +@Fluent +public final class RebalanceLoadBalancersRequestBody implements JsonSerializable<RebalanceLoadBalancersRequestBody> { + /* + * The load balancer names list. + */ + private List<String> loadBalancerNames; + + /** + * Creates an instance of RebalanceLoadBalancersRequestBody class. + */ + public RebalanceLoadBalancersRequestBody() { + } + + /** + * Get the loadBalancerNames property: The load balancer names list. + * + * @return the loadBalancerNames value. + */ + public List<String> loadBalancerNames() { + return this.loadBalancerNames; + } + + /** + * Set the loadBalancerNames property: The load balancer names list. + * + * @param loadBalancerNames the loadBalancerNames value to set. + * @return the RebalanceLoadBalancersRequestBody object itself. + */ + public RebalanceLoadBalancersRequestBody withLoadBalancerNames(List<String> loadBalancerNames) { + this.loadBalancerNames = loadBalancerNames; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("loadBalancerNames", this.loadBalancerNames, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RebalanceLoadBalancersRequestBody from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RebalanceLoadBalancersRequestBody if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RebalanceLoadBalancersRequestBody. + */ + public static RebalanceLoadBalancersRequestBody fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RebalanceLoadBalancersRequestBody deserializedRebalanceLoadBalancersRequestBody + = new RebalanceLoadBalancersRequestBody(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("loadBalancerNames".equals(fieldName)) { + List<String> loadBalancerNames = reader.readArray(reader1 -> reader1.getString()); + deserializedRebalanceLoadBalancersRequestBody.loadBalancerNames = loadBalancerNames; + } else { + reader.skipChildren(); + } + } + + return deserializedRebalanceLoadBalancersRequestBody; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java index aa8addd1d0cf..c97ef4a7fdbd 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java @@ -23,7 +23,7 @@ public final class RelativeMonthlySchedule implements JsonSerializable<RelativeM private int intervalMonths; /* - * The week index. Specifies on which week of the month the dayOfWeek applies. + * The week index. Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs. */ private Type weekIndex; @@ -59,7 +59,8 @@ public RelativeMonthlySchedule withIntervalMonths(int intervalMonths) { } /** - * Get the weekIndex property: The week index. Specifies on which week of the month the dayOfWeek applies. + * Get the weekIndex property: The week index. Specifies on which instance of the allowed days specified in + * daysOfWeek the maintenance occurs. * * @return the weekIndex value. */ @@ -68,7 +69,8 @@ public Type weekIndex() { } /** - * Set the weekIndex property: The week index. Specifies on which week of the month the dayOfWeek applies. + * Set the weekIndex property: The week index. Specifies on which instance of the allowed days specified in + * daysOfWeek the maintenance occurs. * * @param weekIndex the weekIndex value to set. * @return the RelativeMonthlySchedule object itself. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java index 70664c2e4cac..34833ca6a3e0 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted'. + * The restriction level applied to the cluster's node resource group. */ public final class RestrictionLevel extends ExpandableStringEnum<RestrictionLevel> { /** diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsList.java new file mode 100644 index 000000000000..d806f3572976 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsList.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.SafeguardsAvailableVersionInner; +import java.io.IOException; +import java.util.List; + +/** + * Hold values properties, which is array of SafeguardsVersions. + */ +@Fluent +public final class SafeguardsAvailableVersionsList implements JsonSerializable<SafeguardsAvailableVersionsList> { + /* + * Array of AKS supported Safeguards versions. + */ + private List<SafeguardsAvailableVersionInner> value; + + /* + * The URL to get the next Safeguards available version. + */ + private String nextLink; + + /** + * Creates an instance of SafeguardsAvailableVersionsList class. + */ + public SafeguardsAvailableVersionsList() { + } + + /** + * Get the value property: Array of AKS supported Safeguards versions. + * + * @return the value value. + */ + public List<SafeguardsAvailableVersionInner> value() { + return this.value; + } + + /** + * Set the value property: Array of AKS supported Safeguards versions. + * + * @param value the value value to set. + * @return the SafeguardsAvailableVersionsList object itself. + */ + public SafeguardsAvailableVersionsList withValue(List<SafeguardsAvailableVersionInner> value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next Safeguards available version. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SafeguardsAvailableVersionsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SafeguardsAvailableVersionsList if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SafeguardsAvailableVersionsList. + */ + public static SafeguardsAvailableVersionsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SafeguardsAvailableVersionsList deserializedSafeguardsAvailableVersionsList + = new SafeguardsAvailableVersionsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<SafeguardsAvailableVersionInner> value + = reader.readArray(reader1 -> SafeguardsAvailableVersionInner.fromJson(reader1)); + deserializedSafeguardsAvailableVersionsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSafeguardsAvailableVersionsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSafeguardsAvailableVersionsList; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsProperties.java new file mode 100644 index 000000000000..8e3f29bd512f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsProperties.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Whether the version is default or not and support info. + */ +@Immutable +public final class SafeguardsAvailableVersionsProperties + implements JsonSerializable<SafeguardsAvailableVersionsProperties> { + /* + * The isDefaultVersion property. + */ + private Boolean isDefaultVersion; + + /* + * Whether the version is preview or stable. + */ + private SafeguardsSupport support; + + /** + * Creates an instance of SafeguardsAvailableVersionsProperties class. + */ + public SafeguardsAvailableVersionsProperties() { + } + + /** + * Get the isDefaultVersion property: The isDefaultVersion property. + * + * @return the isDefaultVersion value. + */ + public Boolean isDefaultVersion() { + return this.isDefaultVersion; + } + + /** + * Get the support property: Whether the version is preview or stable. + * + * @return the support value. + */ + public SafeguardsSupport support() { + return this.support; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SafeguardsAvailableVersionsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SafeguardsAvailableVersionsProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SafeguardsAvailableVersionsProperties. + */ + public static SafeguardsAvailableVersionsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SafeguardsAvailableVersionsProperties deserializedSafeguardsAvailableVersionsProperties + = new SafeguardsAvailableVersionsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isDefaultVersion".equals(fieldName)) { + deserializedSafeguardsAvailableVersionsProperties.isDefaultVersion + = reader.getNullable(JsonReader::getBoolean); + } else if ("support".equals(fieldName)) { + deserializedSafeguardsAvailableVersionsProperties.support + = SafeguardsSupport.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSafeguardsAvailableVersionsProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsSupport.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsSupport.java new file mode 100644 index 000000000000..797c2c7c429a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsSupport.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.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether the version is preview or stable. + */ +public final class SafeguardsSupport extends ExpandableStringEnum<SafeguardsSupport> { + /** + * Static value Preview for SafeguardsSupport. + */ + public static final SafeguardsSupport PREVIEW = fromString("Preview"); + + /** + * Static value Stable for SafeguardsSupport. + */ + public static final SafeguardsSupport STABLE = fromString("Stable"); + + /** + * Creates a new instance of SafeguardsSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SafeguardsSupport() { + } + + /** + * Creates or finds a SafeguardsSupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding SafeguardsSupport. + */ + public static SafeguardsSupport fromString(String name) { + return fromString(name, SafeguardsSupport.class); + } + + /** + * Gets known SafeguardsSupport values. + * + * @return known SafeguardsSupport values. + */ + public static Collection<SafeguardsSupport> values() { + return values(SafeguardsSupport.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java index 1796156c2698..ecb2a1b91692 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java @@ -22,6 +22,11 @@ public final class ScaleProfile implements JsonSerializable<ScaleProfile> { */ private List<ManualScaleProfile> manual; + /* + * Specifications on how to auto-scale the VirtualMachines agent pool within a predefined size range. + */ + private AutoScaleProfile autoscale; + /** * Creates an instance of ScaleProfile class. */ @@ -48,6 +53,28 @@ public ScaleProfile withManual(List<ManualScaleProfile> manual) { return this; } + /** + * Get the autoscale property: Specifications on how to auto-scale the VirtualMachines agent pool within a + * predefined size range. + * + * @return the autoscale value. + */ + public AutoScaleProfile autoscale() { + return this.autoscale; + } + + /** + * Set the autoscale property: Specifications on how to auto-scale the VirtualMachines agent pool within a + * predefined size range. + * + * @param autoscale the autoscale value to set. + * @return the ScaleProfile object itself. + */ + public ScaleProfile withAutoscale(AutoScaleProfile autoscale) { + this.autoscale = autoscale; + return this; + } + /** * Validates the instance. * @@ -57,6 +84,9 @@ public void validate() { if (manual() != null) { manual().forEach(e -> e.validate()); } + if (autoscale() != null) { + autoscale().validate(); + } } /** @@ -66,6 +96,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("manual", this.manual, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("autoscale", this.autoscale); return jsonWriter.writeEndObject(); } @@ -87,6 +118,8 @@ public static ScaleProfile fromJson(JsonReader jsonReader) throws IOException { if ("manual".equals(fieldName)) { List<ManualScaleProfile> manual = reader.readArray(reader1 -> ManualScaleProfile.fromJson(reader1)); deserializedScaleProfile.manual = manual; + } else if ("autoscale".equals(fieldName)) { + deserializedScaleProfile.autoscale = AutoScaleProfile.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerConfigMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerConfigMode.java new file mode 100644 index 000000000000..9a803d31eb10 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerConfigMode.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.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The config customization mode for this scheduler instance. + */ +public final class SchedulerConfigMode extends ExpandableStringEnum<SchedulerConfigMode> { + /** + * Static value Default for SchedulerConfigMode. + */ + public static final SchedulerConfigMode DEFAULT = fromString("Default"); + + /** + * Static value ManagedByCRD for SchedulerConfigMode. + */ + public static final SchedulerConfigMode MANAGED_BY_CRD = fromString("ManagedByCRD"); + + /** + * Creates a new instance of SchedulerConfigMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SchedulerConfigMode() { + } + + /** + * Creates or finds a SchedulerConfigMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding SchedulerConfigMode. + */ + public static SchedulerConfigMode fromString(String name) { + return fromString(name, SchedulerConfigMode.class); + } + + /** + * Gets known SchedulerConfigMode values. + * + * @return known SchedulerConfigMode values. + */ + public static Collection<SchedulerConfigMode> values() { + return values(SchedulerConfigMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerInstanceProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerInstanceProfile.java new file mode 100644 index 000000000000..e76e78219620 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerInstanceProfile.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The scheduler profile for a single scheduler instance. + */ +@Fluent +public final class SchedulerInstanceProfile implements JsonSerializable<SchedulerInstanceProfile> { + /* + * The config customization mode for this scheduler instance. + */ + private SchedulerConfigMode schedulerConfigMode; + + /** + * Creates an instance of SchedulerInstanceProfile class. + */ + public SchedulerInstanceProfile() { + } + + /** + * Get the schedulerConfigMode property: The config customization mode for this scheduler instance. + * + * @return the schedulerConfigMode value. + */ + public SchedulerConfigMode schedulerConfigMode() { + return this.schedulerConfigMode; + } + + /** + * Set the schedulerConfigMode property: The config customization mode for this scheduler instance. + * + * @param schedulerConfigMode the schedulerConfigMode value to set. + * @return the SchedulerInstanceProfile object itself. + */ + public SchedulerInstanceProfile withSchedulerConfigMode(SchedulerConfigMode schedulerConfigMode) { + this.schedulerConfigMode = schedulerConfigMode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("schedulerConfigMode", + this.schedulerConfigMode == null ? null : this.schedulerConfigMode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SchedulerInstanceProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SchedulerInstanceProfile if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SchedulerInstanceProfile. + */ + public static SchedulerInstanceProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SchedulerInstanceProfile deserializedSchedulerInstanceProfile = new SchedulerInstanceProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("schedulerConfigMode".equals(fieldName)) { + deserializedSchedulerInstanceProfile.schedulerConfigMode + = SchedulerConfigMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSchedulerInstanceProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfile.java new file mode 100644 index 000000000000..8ec16cb1c505 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfile.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The pod scheduler profile for the cluster. + */ +@Fluent +public final class SchedulerProfile implements JsonSerializable<SchedulerProfile> { + /* + * Mapping of each scheduler instance to its profile. + */ + private SchedulerProfileSchedulerInstanceProfiles schedulerInstanceProfiles; + + /** + * Creates an instance of SchedulerProfile class. + */ + public SchedulerProfile() { + } + + /** + * Get the schedulerInstanceProfiles property: Mapping of each scheduler instance to its profile. + * + * @return the schedulerInstanceProfiles value. + */ + public SchedulerProfileSchedulerInstanceProfiles schedulerInstanceProfiles() { + return this.schedulerInstanceProfiles; + } + + /** + * Set the schedulerInstanceProfiles property: Mapping of each scheduler instance to its profile. + * + * @param schedulerInstanceProfiles the schedulerInstanceProfiles value to set. + * @return the SchedulerProfile object itself. + */ + public SchedulerProfile + withSchedulerInstanceProfiles(SchedulerProfileSchedulerInstanceProfiles schedulerInstanceProfiles) { + this.schedulerInstanceProfiles = schedulerInstanceProfiles; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (schedulerInstanceProfiles() != null) { + schedulerInstanceProfiles().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("schedulerInstanceProfiles", this.schedulerInstanceProfiles); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SchedulerProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SchedulerProfile if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SchedulerProfile. + */ + public static SchedulerProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SchedulerProfile deserializedSchedulerProfile = new SchedulerProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("schedulerInstanceProfiles".equals(fieldName)) { + deserializedSchedulerProfile.schedulerInstanceProfiles + = SchedulerProfileSchedulerInstanceProfiles.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSchedulerProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfileSchedulerInstanceProfiles.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfileSchedulerInstanceProfiles.java new file mode 100644 index 000000000000..7ea490b5f166 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfileSchedulerInstanceProfiles.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.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Mapping of each scheduler instance to its profile. + */ +@Fluent +public final class SchedulerProfileSchedulerInstanceProfiles + implements JsonSerializable<SchedulerProfileSchedulerInstanceProfiles> { + /* + * The scheduler profile for the upstream scheduler instance. + */ + private SchedulerInstanceProfile upstream; + + /** + * Creates an instance of SchedulerProfileSchedulerInstanceProfiles class. + */ + public SchedulerProfileSchedulerInstanceProfiles() { + } + + /** + * Get the upstream property: The scheduler profile for the upstream scheduler instance. + * + * @return the upstream value. + */ + public SchedulerInstanceProfile upstream() { + return this.upstream; + } + + /** + * Set the upstream property: The scheduler profile for the upstream scheduler instance. + * + * @param upstream the upstream value to set. + * @return the SchedulerProfileSchedulerInstanceProfiles object itself. + */ + public SchedulerProfileSchedulerInstanceProfiles withUpstream(SchedulerInstanceProfile upstream) { + this.upstream = upstream; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (upstream() != null) { + upstream().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("upstream", this.upstream); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SchedulerProfileSchedulerInstanceProfiles from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SchedulerProfileSchedulerInstanceProfiles if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SchedulerProfileSchedulerInstanceProfiles. + */ + public static SchedulerProfileSchedulerInstanceProfiles fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SchedulerProfileSchedulerInstanceProfiles deserializedSchedulerProfileSchedulerInstanceProfiles + = new SchedulerProfileSchedulerInstanceProfiles(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("upstream".equals(fieldName)) { + deserializedSchedulerProfileSchedulerInstanceProfiles.upstream + = SchedulerInstanceProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSchedulerProfileSchedulerInstanceProfiles; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SeccompDefault.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SeccompDefault.java new file mode 100644 index 000000000000..2ff28552ffe6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SeccompDefault.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the default seccomp profile applied to all workloads. If not specified, 'Unconfined' will be used by + * default. + */ +public final class SeccompDefault extends ExpandableStringEnum<SeccompDefault> { + /** + * Static value Unconfined for SeccompDefault. + */ + public static final SeccompDefault UNCONFINED = fromString("Unconfined"); + + /** + * Static value RuntimeDefault for SeccompDefault. + */ + public static final SeccompDefault RUNTIME_DEFAULT = fromString("RuntimeDefault"); + + /** + * Creates a new instance of SeccompDefault value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SeccompDefault() { + } + + /** + * Creates or finds a SeccompDefault from its string representation. + * + * @param name a name to look for. + * @return the corresponding SeccompDefault. + */ + public static SeccompDefault fromString(String name) { + return fromString(name, SeccompDefault.class); + } + + /** + * Gets known SeccompDefault values. + * + * @return known SeccompDefault values. + */ + public static Collection<SeccompDefault> values() { + return values(SeccompDefault.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java index f538d165b648..959836b50d8f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java @@ -16,6 +16,11 @@ public final class SnapshotType extends ExpandableStringEnum<SnapshotType> { */ public static final SnapshotType NODE_POOL = fromString("NodePool"); + /** + * Static value ManagedCluster for SnapshotType. + */ + public static final SnapshotType MANAGED_CLUSTER = fromString("ManagedCluster"); + /** * Creates a new instance of SnapshotType value. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java new file mode 100644 index 000000000000..3b5668d9e0ec --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If not specified, the default + * value is None. + */ +public final class TransitEncryptionType extends ExpandableStringEnum<TransitEncryptionType> { + /** + * Static value WireGuard for TransitEncryptionType. + */ + public static final TransitEncryptionType WIRE_GUARD = fromString("WireGuard"); + + /** + * Static value None for TransitEncryptionType. + */ + public static final TransitEncryptionType NONE = fromString("None"); + + /** + * Creates a new instance of TransitEncryptionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TransitEncryptionType() { + } + + /** + * Creates or finds a TransitEncryptionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding TransitEncryptionType. + */ + public static TransitEncryptionType fromString(String name) { + return fromString(name, TransitEncryptionType.class); + } + + /** + * Gets known TransitEncryptionType values. + * + * @return known TransitEncryptionType values. + */ + public static Collection<TransitEncryptionType> values() { + return values(TransitEncryptionType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Type.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Type.java index 04ff14100e65..f3baff01d585 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Type.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Type.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The week index. Specifies on which week of the month the dayOfWeek applies. + * The week index. Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs. */ public final class Type extends ExpandableStringEnum<Type> { /** diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeStrategy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeStrategy.java new file mode 100644 index 000000000000..3f79d70807ce --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeStrategy.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines the upgrade strategy for the agent pool. The default is Rolling. + */ +public final class UpgradeStrategy extends ExpandableStringEnum<UpgradeStrategy> { + /** + * Static value Rolling for UpgradeStrategy. + */ + public static final UpgradeStrategy ROLLING = fromString("Rolling"); + + /** + * Static value BlueGreen for UpgradeStrategy. + */ + public static final UpgradeStrategy BLUE_GREEN = fromString("BlueGreen"); + + /** + * Creates a new instance of UpgradeStrategy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UpgradeStrategy() { + } + + /** + * Creates or finds a UpgradeStrategy from its string representation. + * + * @param name a name to look for. + * @return the corresponding UpgradeStrategy. + */ + public static UpgradeStrategy fromString(String name) { + return fromString(name, UpgradeStrategy.class); + } + + /** + * Gets known UpgradeStrategy values. + * + * @return known UpgradeStrategy values. + */ + public static Collection<UpgradeStrategy> values() { + return values(UpgradeStrategy.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VmState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VmState.java new file mode 100644 index 000000000000..ef08b1fdaaa1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VmState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Virtual machine state. Indicates the current state of the underlying virtual machine. + */ +public final class VmState extends ExpandableStringEnum<VmState> { + /** + * Static value Running for VmState. + */ + public static final VmState RUNNING = fromString("Running"); + + /** + * Static value Deleted for VmState. + */ + public static final VmState DELETED = fromString("Deleted"); + + /** + * Creates a new instance of VmState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VmState() { + } + + /** + * Creates or finds a VmState from its string representation. + * + * @param name a name to look for. + * @return the corresponding VmState. + */ + public static VmState fromString(String name) { + return fromString(name, VmState.class); + } + + /** + * Gets known VmState values. + * + * @return known VmState values. + */ + public static Collection<VmState> values() { + return values(VmState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java index c87728fe2b08..8fdfcc9db767 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java @@ -21,6 +21,11 @@ public final class WorkloadRuntime extends ExpandableStringEnum<WorkloadRuntime> */ public static final WorkloadRuntime WASM_WASI = fromString("WasmWasi"); + /** + * Static value KataMshvVmIsolation for WorkloadRuntime. + */ + public static final WorkloadRuntime KATA_MSHV_VM_ISOLATION = fromString("KataMshvVmIsolation"); + /** * Static value KataVmIsolation for WorkloadRuntime. */ diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json index 7d7de0a58bda..65e1768573ab 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.containerservice.implementation.AgentPoolsClientImpl$AgentPoolsService"],["com.azure.resourcemanager.containerservice.implementation.ContainerServicesClientImpl$ContainerServicesService"],["com.azure.resourcemanager.containerservice.implementation.MachinesClientImpl$MachinesService"],["com.azure.resourcemanager.containerservice.implementation.MaintenanceConfigurationsClientImpl$MaintenanceConfigurationsService"],["com.azure.resourcemanager.containerservice.implementation.ManagedClustersClientImpl$ManagedClustersService"],["com.azure.resourcemanager.containerservice.implementation.ManagedNamespacesClientImpl$ManagedNamespacesService"],["com.azure.resourcemanager.containerservice.implementation.OpenShiftManagedClustersClientImpl$OpenShiftManagedClustersService"],["com.azure.resourcemanager.containerservice.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.containerservice.implementation.ResolvePrivateLinkServiceIdsClientImpl$ResolvePrivateLinkServiceIdsService"],["com.azure.resourcemanager.containerservice.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRoleBindingsClientImpl$TrustedAccessRoleBindingsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRolesClientImpl$TrustedAccessRolesService"]] \ No newline at end of file +[["com.azure.resourcemanager.containerservice.implementation.AgentPoolsClientImpl$AgentPoolsService"],["com.azure.resourcemanager.containerservice.implementation.ContainerServiceOperationsClientImpl$ContainerServiceOperationsService"],["com.azure.resourcemanager.containerservice.implementation.ContainerServicesClientImpl$ContainerServicesService"],["com.azure.resourcemanager.containerservice.implementation.IdentityBindingsClientImpl$IdentityBindingsService"],["com.azure.resourcemanager.containerservice.implementation.JwtAuthenticatorsClientImpl$JwtAuthenticatorsService"],["com.azure.resourcemanager.containerservice.implementation.LoadBalancersClientImpl$LoadBalancersService"],["com.azure.resourcemanager.containerservice.implementation.MachinesClientImpl$MachinesService"],["com.azure.resourcemanager.containerservice.implementation.MaintenanceConfigurationsClientImpl$MaintenanceConfigurationsService"],["com.azure.resourcemanager.containerservice.implementation.ManagedClusterSnapshotsClientImpl$ManagedClusterSnapshotsService"],["com.azure.resourcemanager.containerservice.implementation.ManagedClustersClientImpl$ManagedClustersService"],["com.azure.resourcemanager.containerservice.implementation.ManagedNamespacesClientImpl$ManagedNamespacesService"],["com.azure.resourcemanager.containerservice.implementation.MeshMembershipsClientImpl$MeshMembershipsService"],["com.azure.resourcemanager.containerservice.implementation.OpenShiftManagedClustersClientImpl$OpenShiftManagedClustersService"],["com.azure.resourcemanager.containerservice.implementation.OperationStatusResultsClientImpl$OperationStatusResultsService"],["com.azure.resourcemanager.containerservice.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.containerservice.implementation.ResolvePrivateLinkServiceIdsClientImpl$ResolvePrivateLinkServiceIdsService"],["com.azure.resourcemanager.containerservice.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRoleBindingsClientImpl$TrustedAccessRoleBindingsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRolesClientImpl$TrustedAccessRolesService"]] \ No newline at end of file diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/KubernetesClustersTests.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/KubernetesClustersTests.java index 756e79919e14..55e053af91f5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/KubernetesClustersTests.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/KubernetesClustersTests.java @@ -593,7 +593,7 @@ public void testUpdateManagedClusterSkuAndKubernetesSupportPlan() { .define(aksName) .withRegion(Region.US_WEST3) .withExistingResourceGroup(rgName) - .withVersion("1.30.3") + .withVersion("1.31.8") .withRootUsername("testaks") .withSshKey(SSH_KEY) .withSystemAssignedManagedServiceIdentity() diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index 833033f96d01..6c52fec3b71a 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -70,7 +70,7 @@ "dir": "../containerservice/azure-resourcemanager-containerservice", "source": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md", "package": "com.azure.resourcemanager.containerservice", - "args": "--tag=package-2025-09 --modelerfour.lenient-model-deduplication --preserve-model=ContainerServiceVMSizeTypes --rename-model=Ossku:OSSku --enable-sync-stack=false" + "args": "--tag=package-preview-2025-09 --modelerfour.lenient-model-deduplication --preserve-model=ContainerServiceVMSizeTypes --rename-model=Ossku:OSSku --enable-sync-stack=false" }, "containerservice-hybrid": { "dir": "../resourcemanagerhybrid/azure-resourcemanager-containerservice", diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java index 01848cee5364..d190fcf7221f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java @@ -15,7 +15,7 @@ public final class ManagedClustersDeleteSamples { */ /** * Sample code: Delete Managed Cluster. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteManagedCluster(com.azure.resourcemanager.AzureResourceManager azure) { @@ -23,6 +23,6 @@ public static void deleteManagedCluster(com.azure.resourcemanager.AzureResourceM .manager() .serviceClient() .getManagedClusters() - .delete("rg1", "clustername1", null, com.azure.core.util.Context.NONE); + .delete("rg1", "clustername1"); } } From 6daf347877504ac4c1be536f14f5e8b15647a73d Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 1 Dec 2025 09:04:52 -0800 Subject: [PATCH 072/186] Increment package versions for containerservice releases (#47405) --- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 10 ++++++++++ .../azure-resourcemanager-containerservice/pom.xml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 47c9286e2a18..49ef32d64184 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -278,7 +278,7 @@ com.azure.resourcemanager:azure-resourcemanager-cdn;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-compute;2.55.1;2.56.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.53.6;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.54.1;2.55.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-containerservice;2.56.1;2.57.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-containerservice;2.56.1;2.57.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-cosmos;2.54.0;2.55.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-dns;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.53.5;2.54.0-beta.1 diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md index 50a400563f15..f6b1e4646e4f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 2.57.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 2.57.0-beta.1 (2025-12-01) ### Other Changes diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml b/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml index e82a47def4b0..9bc81c06b4ab 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml +++ b/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml @@ -10,7 +10,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerservice</artifactId> - <version>2.57.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerservice;current} --> + <version>2.57.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerservice;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for Container Service Management</name> From bf67022d1393de933421133d219d5ce1e541cad0 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 1 Dec 2025 15:50:44 -0800 Subject: [PATCH 073/186] Sync eng/common directory with azure-sdk-tools for PR 13097 (#47407) * Add New-ChangelogContent and Set-ChangeLogEntryContent functions with tests Co-authored-by: haolingdong-msft <87355844+haolingdong-msft@users.noreply.github.com> * Fix string interpolation pattern for consistency Co-authored-by: haolingdong-msft <87355844+haolingdong-msft@users.noreply.github.com> * Refactor regex into shared helper and add .Trim() for consistency Co-authored-by: weshaggard <9010698+weshaggard@users.noreply.github.com> * Rename New-ChangelogContent to Parse-ChangelogContent Co-authored-by: weshaggard <9010698+weshaggard@users.noreply.github.com> * Update Remove-EmptySections to use Get-SectionHeaderRegex helper Co-authored-by: weshaggard <9010698+weshaggard@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: haolingdong-msft <87355844+haolingdong-msft@users.noreply.github.com> Co-authored-by: weshaggard <9010698+weshaggard@users.noreply.github.com> --- eng/common/scripts/ChangeLog-Operations.ps1 | 145 +++++++++++++++++++- 1 file changed, 143 insertions(+), 2 deletions(-) diff --git a/eng/common/scripts/ChangeLog-Operations.ps1 b/eng/common/scripts/ChangeLog-Operations.ps1 index c5c4f5ed20ce..170157ff5112 100644 --- a/eng/common/scripts/ChangeLog-Operations.ps1 +++ b/eng/common/scripts/ChangeLog-Operations.ps1 @@ -8,6 +8,15 @@ $CHANGELOG_UNRELEASED_STATUS = "(Unreleased)" $CHANGELOG_DATE_FORMAT = "yyyy-MM-dd" $RecommendedSectionHeaders = @("Features Added", "Breaking Changes", "Bugs Fixed", "Other Changes") +# Helper function to build the section header regex pattern +function Get-SectionHeaderRegex { + param( + [Parameter(Mandatory = $true)] + [string]$InitialAtxHeader + ) + return "^${InitialAtxHeader}${SECTION_HEADER_REGEX_SUFFIX}" +} + # Returns a Collection of changeLogEntry object containing changelog info for all versions present in the gived CHANGELOG function Get-ChangeLogEntries { param ( @@ -49,7 +58,7 @@ function Get-ChangeLogEntriesFromContent { $initialAtxHeader = $matches["HeaderLevel"] } - $sectionHeaderRegex = "^${initialAtxHeader}${SECTION_HEADER_REGEX_SUFFIX}" + $sectionHeaderRegex = Get-SectionHeaderRegex -InitialAtxHeader $initialAtxHeader $changeLogEntries | Add-Member -NotePropertyName "InitialAtxHeader" -NotePropertyValue $initialAtxHeader $releaseTitleAtxHeader = $initialAtxHeader + "#" $headerLines = @() @@ -301,7 +310,7 @@ function Remove-EmptySections { $InitialAtxHeader = "#" ) - $sectionHeaderRegex = "^${InitialAtxHeader}${SECTION_HEADER_REGEX_SUFFIX}" + $sectionHeaderRegex = Get-SectionHeaderRegex -InitialAtxHeader $InitialAtxHeader $releaseContent = $ChangeLogEntry.ReleaseContent if ($releaseContent.Count -gt 0) @@ -460,3 +469,135 @@ function Confirm-ChangeLogForRelease { } return $ChangeLogStatus.IsValid } + +function Parse-ChangelogContent { + <# + .SYNOPSIS + Parses raw changelog text into structured content with sections. + + .DESCRIPTION + Takes raw changelog text and parses it into structured arrays containing + ReleaseContent (all lines) and Sections (organized by section headers). + This function only generates content structure without modifying any files. + + .PARAMETER ChangelogText + The new changelog text containing sections (e.g., "### Breaking Changes", "### Features Added"). + + .PARAMETER InitialAtxHeader + The markdown header level used in the changelog (e.g., "#" for H1, "##" for H2). + Defaults to "#". + + .OUTPUTS + PSCustomObject with ReleaseContent and Sections properties. + + .EXAMPLE + $content = Parse-ChangelogContent -ChangelogText $changelogText -InitialAtxHeader "#" + $content.ReleaseContent # Array of all lines + $content.Sections # Hashtable of section name to content lines + #> + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string]$ChangelogText, + + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [string]$InitialAtxHeader = "#" + ) + + Write-Verbose "Parsing changelog text into structured content..." + + # Parse the new changelog content into lines + $changelogLines = $ChangelogText -split "`r?`n" + + # Initialize content structure + $releaseContent = @() + $sections = @{} + + # Add an empty line after the version header + $releaseContent += "" + + # Parse the changelog content + # InitialAtxHeader represents the markdown header level (e.g., "#" for H1, "##" for H2) + # Section headers are two levels deeper than the changelog title + # (e.g., "### Breaking Changes" if InitialAtxHeader is "#") + $currentSection = $null + $sectionHeaderRegex = Get-SectionHeaderRegex -InitialAtxHeader $InitialAtxHeader + + foreach ($line in $changelogLines) { + if ($line.Trim() -match $sectionHeaderRegex) { + $currentSection = $matches["sectionName"].Trim() + $sections[$currentSection] = @() + $releaseContent += $line + Write-Verbose " Found section: $currentSection" + } + elseif ($currentSection) { + $sections[$currentSection] += $line + $releaseContent += $line + } + else { + $releaseContent += $line + } + } + + Write-Verbose " Parsed $($sections.Count) section(s)" + + # Return structured content + return [PSCustomObject]@{ + ReleaseContent = $releaseContent + Sections = $sections + } +} + +function Set-ChangeLogEntryContent { + <# + .SYNOPSIS + Updates a changelog entry with new content. + + .DESCRIPTION + Takes a changelog entry object and new changelog text, parses the text into + structured content, and updates the entry's ReleaseContent and Sections properties. + + .PARAMETER ChangeLogEntry + The changelog entry object to update (from Get-ChangeLogEntries). + + .PARAMETER NewContent + The new changelog text containing sections. + + .PARAMETER InitialAtxHeader + The markdown header level used in the changelog. Defaults to "#". + + .OUTPUTS + The updated changelog entry object. + + .EXAMPLE + $entries = Get-ChangeLogEntries -ChangeLogLocation $changelogPath + $entry = $entries["1.0.0"] + Set-ChangeLogEntryContent -ChangeLogEntry $entry -NewContent $newText -InitialAtxHeader $entries.InitialAtxHeader + Set-ChangeLogContent -ChangeLogLocation $changelogPath -ChangeLogEntries $entries + #> + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [ValidateNotNull()] + [PSCustomObject]$ChangeLogEntry, + + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string]$NewContent, + + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [string]$InitialAtxHeader = "#" + ) + + # Parse the new content into structured format + $parsedContent = Parse-ChangelogContent -ChangelogText $NewContent -InitialAtxHeader $InitialAtxHeader + + # Update the entry with the parsed content + $ChangeLogEntry.ReleaseContent = $parsedContent.ReleaseContent + $ChangeLogEntry.Sections = $parsedContent.Sections + + return $ChangeLogEntry +} From fe24c10ca024975d59fac487a63582e05e3637a4 Mon Sep 17 00:00:00 2001 From: Daniel Jurek <djurek@microsoft.com> Date: Mon, 1 Dec 2025 17:20:40 -0800 Subject: [PATCH 074/186] Docs: Wire up onboarding URL for daily docs (#47410) --- eng/pipelines/docindex.yml | 4 +++- eng/scripts/docs/Docs-Onboarding.ps1 | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/eng/pipelines/docindex.yml b/eng/pipelines/docindex.yml index f34f469514bb..54945cd0807e 100644 --- a/eng/pipelines/docindex.yml +++ b/eng/pipelines/docindex.yml @@ -163,7 +163,9 @@ jobs: inputs: pwsh: true filePath: eng/common/scripts/Update-DocsMsPackages.ps1 - arguments: -DocRepoLocation $(DocRepoLocation) + arguments: >- + -DocRepoLocation $(DocRepoLocation) + -PackageSourceOverride 'https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-java/maven/v1' displayName: Update Docs Onboarding for Daily docs - task: Powershell@2 diff --git a/eng/scripts/docs/Docs-Onboarding.ps1 b/eng/scripts/docs/Docs-Onboarding.ps1 index 3b3af23bdce9..5bbfd7bcae53 100644 --- a/eng/scripts/docs/Docs-Onboarding.ps1 +++ b/eng/scripts/docs/Docs-Onboarding.ps1 @@ -19,23 +19,25 @@ function Set-java-DocsPackageOnboarding($moniker, $metadata, $docRepoLocation, $ Write-Error "No appropriate index for moniker $moniker" } + $packageDownloadUrl = 'https://repo1.maven.org/maven2' + if ($PackageSourceOverride) { + $packageDownloadUrl = $PackageSourceOverride + } + $onboardedPackages = @() - foreach ($package in $metadata) { + foreach ($package in $metadata) { + $packageInfo = [ordered]@{ packageArtifactId = $package.Name packageGroupId = $package.Group packageVersion = $package.Version - - # packageDownloadUrl is required by docs build and other values are - # rejected. This is a temporary workaround until the docs build - # supports more package stores. - packageDownloadUrl = 'https://repo1.maven.org/maven2' + packageDownloadUrl = $packageDownloadUrl } # Add items from 'DocsCiConfigProperties' into onboarding info. If a # property already exists, it will be overwritten. - if ($package.ContainsKey('DocsCiConfigProperties')) { - foreach ($key in $package['DocsCiConfigProperties'].Keys) { + if ($package.ContainsKey('DocsCiConfigProperties')) { + foreach ($key in $package['DocsCiConfigProperties'].Keys) { $packageInfo[$key] = $package['DocsCiConfigProperties'][$key] } } From 7ced3305474aa16dd2e39c8a23fb821032b5e538 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Dec 2025 09:29:15 +0800 Subject: [PATCH 075/186] Migrate azure-spring-data-cosmos tests from JUnit 4 to JUnit 5 (#47346) - Removed JUnit 4 and junit-vintage-engine dependencies from pom.xml - Updated imports from org.junit to org.junit.jupiter.api - Replaced @Before/@After with @BeforeEach/@AfterEach - Replaced @BeforeClass/@AfterClass with @BeforeAll/@AfterAll - Replaced @RunWith with @ExtendWith for Mockito and Spring - Replaced Assert with Assertions - Removed TestRule interface from AbstractIntegrationTestCollectionManager - Fixed static imports for AssertJ and JUnit Jupiter - Migrate @Test(expected=...) to assertThrows --- eng/versioning/external_dependencies.txt | 2 - sdk/spring/azure-spring-data-cosmos/pom.xml | 18 -- ...tractIntegrationTestCollectionManager.java | 18 +- .../spring/data/cosmos/ContainerLockIT.java | 22 +- .../data/cosmos/CosmosFactoryTestIT.java | 8 +- .../common/ExpressionResolverUnitTest.java | 6 +- .../data/cosmos/common/MemoizerUnitTest.java | 8 +- .../data/cosmos/common/PageTestUtils.java | 2 +- .../cosmos/common/PropertyLoaderUnitTest.java | 10 +- .../config/AbstractCosmosConfigurationIT.java | 35 ++- .../cosmos/core/CosmosFactoryUnitTest.java | 8 +- .../data/cosmos/core/CosmosTemplateIT.java | 35 ++- .../core/CosmosTemplateIllegalTest.java | 12 +- .../core/CosmosTemplatePartitionIT.java | 19 +- .../cosmos/core/CosmosTemplateUnitTest.java | 22 +- .../MultiTenantContainerCosmosFactoryIT.java | 25 ++- .../core/MultiTenantDBCosmosFactoryIT.java | 25 ++- .../cosmos/core/ReactiveCosmosTemplateIT.java | 199 +++++++++--------- .../ReactiveCosmosTemplatePartitionIT.java | 71 +++---- ...veMultiTenantContainerCosmosFactoryIT.java | 25 ++- .../ReactiveMultiTenantDBCosmosFactoryIT.java | 21 +- .../ZonedDateTimeDeserializerTest.java | 2 +- .../MappingCosmosConverterUnitTest.java | 12 +- .../generator/AbstractQueryGeneratorTest.java | 25 +-- .../generator/NativeQueryGeneratorTest.java | 10 +- .../BasicCosmosPersistentEntityUnitTest.java | 2 +- .../mapping/CosmosMappingContextUnitTest.java | 2 +- .../event/ApplicationContextEventErrorIT.java | 22 +- ...pplicationContextEventErrorReactiveIT.java | 27 ++- .../event/ApplicationContextEventIT.java | 21 +- .../ApplicationContextEventReactiveIT.java | 21 +- .../event/CosmosEventListenerUnitTests.java | 2 +- .../core/query/CosmosQueryUnitTest.java | 12 +- .../cosmos/core/query/CriteriaUnitTest.java | 65 +++--- .../exception/CosmosExceptionUtilsTest.java | 4 +- .../repository/CosmosAnnotationUnitTest.java | 6 +- .../repository/EntityImplRepositoryIT.java | 15 +- .../repository/MultiCosmosTemplateIT.java | 21 +- .../ReactiveUUIDIdDomainRepositoryIT.java | 22 +- .../SimpleCosmosRepositoryIllegalTest.java | 46 ++-- .../SimpleCosmosRepositoryUnitTest.java | 32 ++- ...ositoryConfigurationExtensionUnitTest.java | 2 +- ...ositoryConfigurationExtensionUnitTest.java | 2 +- .../integration/AddressRepositoryIT.java | 37 ++-- .../AddressRepositoryNoMetricsIT.java | 15 +- .../integration/AnnotatedQueryIT.java | 15 +- .../repository/integration/AuditableIT.java | 19 +- .../integration/BasicItemRepositoryIT.java | 24 +-- .../integration/BigTypeRepositoryIT.java | 17 +- .../integration/CompositeIndexIT.java | 19 +- .../integration/ContactRepositoryIT.java | 69 +++--- .../integration/CosmosAnnotationIT.java | 19 +- .../repository/integration/CountIT.java | 41 ++-- .../integration/CustomerRepositoryIT.java | 28 +-- .../cosmos/repository/integration/EtagIT.java | 56 ++--- .../HierarchicalPartitionKeyRepositoryIT.java | 23 +- .../integration/IndexPolicyUpdateIT.java | 15 +- .../IntegerIdDomainRepositoryIT.java | 93 ++++---- .../integration/LongIdDomainRepositoryIT.java | 103 ++++----- .../integration/MemoRepositoryIT.java | 78 +++---- .../NestedPartitionKeyRepositoryIT.java | 19 +- .../PageableAddressRepositoryIT.java | 15 +- .../integration/PageableMemoRepositoryIT.java | 15 +- .../PageablePersonRepositoryIT.java | 15 +- .../repository/integration/PersistableIT.java | 33 ++- .../integration/PersonCrossPartitionIT.java | 19 +- .../integration/ProjectRepositoryIT.java | 78 +++---- .../integration/ProjectRepositorySortIT.java | 77 +++---- .../integration/QuestionRepositoryIT.java | 32 +-- .../integration/ReactiveAuditableIT.java | 15 +- .../ReactiveCourseRepositoryIT.java | 26 ++- .../ReactiveCourseRepositoryNoMetricsIT.java | 15 +- .../integration/ReactiveEtagIT.java | 58 ++--- ...eHierarchicalPartitionKeyRepositoryIT.java | 25 ++- .../ReactiveIndexPolicyUpdateIT.java | 15 +- ...dDomainPartitionPartitionRepositoryIT.java | 22 +- ...eactiveNestedPartitionKeyRepositoryIT.java | 19 +- .../integration/ReactiveRoleRepositoryIT.java | 15 +- .../ReactiveTeacherRepositoryIT.java | 15 +- .../integration/SpELCosmosAnnotationIT.java | 19 +- .../integration/SquareRepositoryIT.java | 15 +- .../integration/StudentRepositoryIT.java | 27 ++- .../integration/TeacherRepositoryIT.java | 27 ++- .../integration/UUIDIdDomainRepositoryIT.java | 76 ++++--- .../integration/UniqueKeyPolicyIT.java | 19 +- .../query/AbstractCosmosQueryUnitTest.java | 8 +- .../AbstractReactiveCosmosQueryUnitTest.java | 8 +- .../CosmosEntityInformationUnitTest.java | 2 +- .../CosmosRepositoryFactoryBeanUnitTest.java | 8 +- .../CosmosRepositoryFactoryUnitTest.java | 10 +- .../StringBasedCosmosQueryUnitTest.java | 8 +- ...tringBasedReactiveCosmosQueryUnitTest.java | 8 +- 92 files changed, 1169 insertions(+), 1229 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 20ffea53823b..5be8a8557264 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -325,7 +325,6 @@ springboot3_io.projectreactor:reactor-test;3.7.9 springboot3_jakarta.servlet:jakarta.servlet-api;6.0.0 springboot3_jakarta.validation:jakarta.validation-api;3.0.2 springboot3_javax.annotation:javax.annotation-api;1.3.2 -springboot3_junit:junit;4.13.2 springboot3_net.bytebuddy:byte-buddy-agent;1.17.7 springboot3_net.bytebuddy:byte-buddy;1.17.7 springboot3_org.apache.commons:commons-lang3;3.17.0 @@ -341,7 +340,6 @@ springboot3_org.assertj:assertj-core;3.27.4 springboot3_org.hibernate.validator:hibernate-validator;8.0.3.Final springboot3_org.javatuples:javatuples;1.2 springboot3_org.junit.jupiter:junit-jupiter;5.12.2 -springboot3_org.junit.vintage:junit-vintage-engine;5.12.2 springboot3_org.messaginghub:pooled-jms;3.1.7 springboot3_org.mockito:mockito-core;5.17.0 springboot3_org.postgresql:postgresql;42.7.7 diff --git a/sdk/spring/azure-spring-data-cosmos/pom.xml b/sdk/spring/azure-spring-data-cosmos/pom.xml index b5840b325b6a..67b68bf41a42 100644 --- a/sdk/spring/azure-spring-data-cosmos/pom.xml +++ b/sdk/spring/azure-spring-data-cosmos/pom.xml @@ -154,12 +154,6 @@ <version>1.17.7</version> <!-- {x-version-update;springboot3_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.13.2</version> <!-- {x-version-update;springboot3_junit:junit;external_dependency} --> - <scope>test</scope> - </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> @@ -202,18 +196,6 @@ <artifactId>slf4j-api</artifactId> <version>2.0.17</version> <!-- {x-version-update;springboot3_org.slf4j:slf4j-api;external_dependency} --> </dependency> - <dependency> - <groupId>org.junit.vintage</groupId> - <artifactId>junit-vintage-engine</artifactId> - <version>5.12.2</version> <!-- {x-version-update;springboot3_org.junit.vintage:junit-vintage-engine;external_dependency} --> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-core</artifactId> - </exclusion> - </exclusions> - </dependency> </dependencies> <build> diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/AbstractIntegrationTestCollectionManager.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/AbstractIntegrationTestCollectionManager.java index b856a0f85888..d5edd2a06f1a 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/AbstractIntegrationTestCollectionManager.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/AbstractIntegrationTestCollectionManager.java @@ -6,9 +6,6 @@ import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.core.ReactiveCosmosTemplate; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.rules.TestRule; -import org.junit.runner.Description; -import org.junit.runners.model.Statement; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -19,7 +16,7 @@ import java.util.concurrent.ConcurrentMap; @SuppressWarnings({"rawtypes", "unchecked"}) -public abstract class AbstractIntegrationTestCollectionManager<T> implements TestRule { +public abstract class AbstractIntegrationTestCollectionManager<T> { private static final Logger LOGGER = LoggerFactory.getLogger(AbstractIntegrationTestCollectionManager.class); private static final Duration LEASE_DURATION = Duration.ofSeconds(5 * 60); @@ -115,19 +112,6 @@ private void releaseLocks() { } } - @Override - public Statement apply(Statement base, Description description) { - return new Statement() { - public void evaluate() throws Throwable { - try { - base.evaluate(); - } finally { - releaseLocks(); - } - } - }; - } - private static class ContainerRefs { CosmosEntityInformation cosmosEntityInformation; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/ContainerLockIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/ContainerLockIT.java index 38e28ada4d18..0874f91e7cf6 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/ContainerLockIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/ContainerLockIT.java @@ -6,21 +6,21 @@ import com.azure.spring.data.cosmos.domain.Address; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.time.Duration; import java.time.OffsetDateTime; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) @SuppressWarnings({"rawtypes", "unchecked"}) public class ContainerLockIT { @@ -36,7 +36,7 @@ public class ContainerLockIT { private ContainerLock lock; private ContainerLock otherLock; - @Before + @BeforeEach public void setup() { staticTemplate = template; CosmosEntityInformation entityInfo = new CosmosEntityInformation(Address.class); @@ -46,7 +46,7 @@ public void setup() { otherLock = new ContainerLock(reactiveTemplate, entityInfo.getContainerName(), SHORT_LEASE_DURATION); } - @After + @AfterEach public void cleanup() { releaseLockIgnoreException(lock); releaseLockIgnoreException(otherLock); @@ -81,7 +81,7 @@ public void acquireShouldThrowExceptionIfWaitForIsLessThanLeaseDuration() { try { otherLock.acquire(SHORT_LEASE_DURATION.minusSeconds(1)); - Assert.fail(); + Assertions.fail(); } catch (ContainerLock.LockAcquisitionFailedException ex) { } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java index 12cb621cf85a..108d70296bd5 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java @@ -5,17 +5,17 @@ import com.azure.cosmos.CosmosAsyncClient; import com.azure.cosmos.CosmosClientBuilder; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Value; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.lang.reflect.Field; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CosmosFactoryTestIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/ExpressionResolverUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/ExpressionResolverUnitTest.java index 40bf96bfa513..4f4cec394d2d 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/ExpressionResolverUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/ExpressionResolverUnitTest.java @@ -2,15 +2,15 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.common; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; public class ExpressionResolverUnitTest { private static final String LITERAL_EXPRESSION = "literal expression"; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/MemoizerUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/MemoizerUnitTest.java index 88c79e428d33..178113c302b0 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/MemoizerUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/MemoizerUnitTest.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.common; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; @@ -11,7 +11,7 @@ import java.util.function.Function; import java.util.stream.IntStream; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; public class MemoizerUnitTest { @@ -20,7 +20,7 @@ public class MemoizerUnitTest { private static final Function<String, Integer> MEMOIZED_FUNCTION = Memoizer.memoize(MemoizerUnitTest::incrCount); - @Before + @BeforeEach public void setUp() { COUNT_MAP.put(KEY, new AtomicInteger(0)); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/PageTestUtils.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/PageTestUtils.java index 36ce7dc5bff2..e51797db2ba0 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/PageTestUtils.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/PageTestUtils.java @@ -11,7 +11,7 @@ import org.springframework.data.domain.Pageable; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; public class PageTestUtils { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/PropertyLoaderUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/PropertyLoaderUnitTest.java index ccbe5eddb73f..11e1a089307f 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/PropertyLoaderUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/PropertyLoaderUnitTest.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.common; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; public class PropertyLoaderUnitTest { @@ -11,8 +11,8 @@ public class PropertyLoaderUnitTest { public void testGetProjectVersion() { final String version = PropertyLoader.getProjectVersion(); - Assert.assertNotNull(version); - Assert.assertNotEquals(version, ""); - Assert.assertNotEquals(version, "@project.version@"); + Assertions.assertNotNull(version); + Assertions.assertNotEquals(version, ""); + Assertions.assertNotEquals(version, "@project.version@"); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/config/AbstractCosmosConfigurationIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/config/AbstractCosmosConfigurationIT.java index c3371d44f68f..24f29aeffbf7 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/config/AbstractCosmosConfigurationIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/config/AbstractCosmosConfigurationIT.java @@ -11,10 +11,7 @@ import com.azure.spring.data.cosmos.common.ExpressionResolver; import com.azure.spring.data.cosmos.common.TestConstants; import com.fasterxml.jackson.databind.ObjectMapper; -import org.assertj.core.api.Assertions; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.AnnotationConfigApplicationContext; @@ -26,13 +23,13 @@ import java.lang.reflect.Field; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; public class AbstractCosmosConfigurationIT { - @SuppressWarnings("deprecation") - @Rule - public ExpectedException exception = ExpectedException.none(); + @Test public void containsExpressionResolver() { @@ -47,15 +44,17 @@ public void containsCosmosFactory() { final AbstractApplicationContext context = new AnnotationConfigApplicationContext( TestCosmosConfiguration.class); - Assertions.assertThat(context.getBean(CosmosFactory.class)).isNotNull(); + assertThat(context.getBean(CosmosFactory.class)).isNotNull(); } - @Test(expected = NoSuchBeanDefinitionException.class) + @Test public void defaultObjectMapperBeanNotExists() { - final AbstractApplicationContext context = new AnnotationConfigApplicationContext( - TestCosmosConfiguration.class); + assertThrows(NoSuchBeanDefinitionException.class, () -> { + final AbstractApplicationContext context = new AnnotationConfigApplicationContext( + TestCosmosConfiguration.class); - context.getBean(ObjectMapper.class); + context.getBean(ObjectMapper.class); + }); } @Test @@ -63,8 +62,8 @@ public void objectMapperIsConfigurable() { final AbstractApplicationContext context = new AnnotationConfigApplicationContext( ObjectMapperConfiguration.class); - Assertions.assertThat(context.getBean(ObjectMapper.class)).isNotNull(); - Assertions.assertThat(context.getBean(Constants.OBJECT_MAPPER_BEAN_NAME)).isNotNull(); + assertThat(context.getBean(ObjectMapper.class)).isNotNull(); + assertThat(context.getBean(Constants.OBJECT_MAPPER_BEAN_NAME)).isNotNull(); } @Test @@ -73,16 +72,16 @@ public void testCosmosClientBuilderConfigurable() throws IllegalAccessException, RequestOptionsConfiguration.class); final CosmosFactory factory = context.getBean(CosmosFactory.class); - Assertions.assertThat(factory).isNotNull(); + assertThat(factory).isNotNull(); final CosmosAsyncClient cosmosAsyncClient = factory.getCosmosAsyncClient(); - Assertions.assertThat(cosmosAsyncClient).isNotNull(); + assertThat(cosmosAsyncClient).isNotNull(); Field desiredConsistencyLevel = cosmosAsyncClient.getClass().getDeclaredField("desiredConsistencyLevel"); desiredConsistencyLevel.setAccessible(true); ConsistencyLevel consistencyLevel = (ConsistencyLevel) desiredConsistencyLevel.get(cosmosAsyncClient); - Assertions.assertThat(consistencyLevel).isEqualTo(ConsistencyLevel.CONSISTENT_PREFIX); + assertThat(consistencyLevel).isEqualTo(ConsistencyLevel.CONSISTENT_PREFIX); } @Configuration diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosFactoryUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosFactoryUnitTest.java index cca2296ee87d..940c3caeec01 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosFactoryUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosFactoryUnitTest.java @@ -7,16 +7,16 @@ import com.azure.spring.data.cosmos.Constants; import com.azure.spring.data.cosmos.CosmosFactory; import com.azure.spring.data.cosmos.common.PropertyLoader; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class CosmosFactoryUnitTest { @Test diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java index f0939fae596a..9daa3a398ba4 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java @@ -46,11 +46,10 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import org.assertj.core.util.Lists; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; @@ -62,7 +61,6 @@ import org.springframework.data.domain.Sort; import org.springframework.data.repository.query.parser.Part; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.util.ReflectionTestUtils; import java.lang.reflect.InvocationTargetException; @@ -102,12 +100,9 @@ import static com.azure.spring.data.cosmos.common.TestConstants.TRANSIENT_PROPERTY; import static com.azure.spring.data.cosmos.common.TestConstants.UPDATED_FIRST_NAME; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CosmosTemplateIT { private static final Person TEST_PERSON = new Person(ID_1, FIRST_NAME, LAST_NAME, HOBBIES, @@ -160,7 +155,7 @@ public class CosmosTemplateIT { private static final CosmosPatchItemRequestOptions options = new CosmosPatchItemRequestOptions(); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); private static CosmosAsyncClient client; @@ -192,7 +187,7 @@ public class CosmosTemplateIT { public CosmosTemplateIT() throws JsonProcessingException { } - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { if (cosmosTemplate == null) { client = CosmosFactory.createCosmosAsyncClient(cosmosClientBuilder); @@ -243,7 +238,7 @@ public void testInsertDocShouldNotPersistTransientFields() { final Person personWithTransientField = TEST_PERSON_4; assertThat(personWithTransientField.getTransientProperty()).isNotNull(); final Person insertedPerson = cosmosTemplate.insert(Person.class.getSimpleName(), personWithTransientField, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_4))); - Assert.assertEquals(TRANSIENT_PROPERTY, insertedPerson.getTransientProperty()); + assertEquals(TRANSIENT_PROPERTY, insertedPerson.getTransientProperty()); final Person retrievedPerson = cosmosTemplate.findById(Person.class.getSimpleName(), insertedPerson.getId(), Person.class); assertThat(retrievedPerson.getTransientProperty()).isNull(); } @@ -258,7 +253,7 @@ public void testInsertAllAndFindAllWithTransientField() { Iterable<Person> insertAllResponse = cosmosTemplate.insertAll(personInfo, entitiesToSave); //check that the transient field is retained in the response for (Person person : insertAllResponse) { - Assert.assertEquals(TRANSIENT_PROPERTY, person.getTransientProperty()); + assertEquals(TRANSIENT_PROPERTY, person.getTransientProperty()); } Iterable<Person> findByIdsResponse = cosmosTemplate.findByIds(Arrays.asList(TEST_PERSON_4.getId()), Person.class, containerName); @@ -269,10 +264,12 @@ public void testInsertAllAndFindAllWithTransientField() { } - @Test(expected = CosmosBadRequestException.class) + @Test public void testInsertShouldFailIfColumnNotAnnotatedWithAutoGenerate() { - final Person person = new Person(null, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); - cosmosTemplate.insert(Person.class.getSimpleName(), person, new PartitionKey(person.getLastName())); + assertThrows(CosmosBadRequestException.class, () -> { + final Person person = new Person(null, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); + cosmosTemplate.insert(Person.class.getSimpleName(), person, new PartitionKey(person.getLastName())); + }); } @Test @@ -481,7 +478,7 @@ public void testUpsertNewDocumentIgnoresTransientFields() { final Person person = cosmosTemplate.upsertAndReturnEntity(Person.class.getSimpleName(), newPerson); - Assert.assertEquals(TRANSIENT_PROPERTY, person.getTransientProperty()); + assertEquals(TRANSIENT_PROPERTY, person.getTransientProperty()); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIllegalTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIllegalTest.java index e18960ae2da6..bae7b195bee9 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIllegalTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIllegalTest.java @@ -8,12 +8,12 @@ import com.azure.spring.data.cosmos.core.query.CriteriaType; import com.azure.spring.data.cosmos.domain.Person; import org.apache.commons.lang3.StringUtils; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Answers; +import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; import org.springframework.data.repository.query.parser.Part; import org.springframework.util.Assert; @@ -21,7 +21,7 @@ import java.lang.reflect.Method; import java.util.Arrays; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class CosmosTemplateIllegalTest { private static final String NULL_STR = null; private static final String DUMMY_COLL = "dummy"; @@ -35,7 +35,7 @@ public class CosmosTemplateIllegalTest { private CosmosTemplate cosmosTemplate; private Class<?> cosmosTemplateClass; - @Before + @BeforeEach public void setUp() { cosmosTemplateClass = cosmosTemplate.getClass(); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java index ad9cf498a005..62beed86c8d1 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java @@ -3,6 +3,9 @@ package com.azure.spring.data.cosmos.core; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; + import com.azure.cosmos.CosmosAsyncClient; import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.models.PartitionKey; @@ -22,10 +25,9 @@ import com.azure.spring.data.cosmos.domain.PartitionPerson; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; + +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; @@ -35,7 +37,6 @@ import org.springframework.data.domain.Sort; import org.springframework.data.repository.query.parser.Part; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Collections; import java.util.List; @@ -57,11 +58,11 @@ import static com.azure.spring.data.cosmos.common.TestConstants.UPDATED_FIRST_NAME; import static com.azure.spring.data.cosmos.common.TestConstants.ZIP_CODE; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.springframework.data.domain.Sort.Direction.ASC; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CosmosTemplatePartitionIT { private static final PartitionPerson TEST_PERSON = new PartitionPerson(ID_1, FIRST_NAME, ZIP_CODE, @@ -73,7 +74,7 @@ public class CosmosTemplatePartitionIT { private static final PartitionPerson TEST_PERSON_3 = new PartitionPerson(ID_3, FIRST_NAME, NEW_ZIP_CODE, HOBBIES, ADDRESSES); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); private static CosmosFactory cosmosFactory; @@ -90,7 +91,7 @@ public class CosmosTemplatePartitionIT { @Autowired private ResponseDiagnosticsTestUtils responseDiagnosticsTestUtils; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { if (cosmosTemplate == null) { // Query plan caching is enabled by default diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateUnitTest.java index 54f515a8a62c..c9aaaa74e4a9 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateUnitTest.java @@ -7,18 +7,22 @@ import com.azure.cosmos.CosmosClientBuilder; import com.azure.spring.data.cosmos.CosmosFactory; import com.azure.spring.data.cosmos.common.TestConstants; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; -@RunWith(MockitoJUnitRunner.class) +import static org.junit.jupiter.api.Assertions.assertThrows; + +@ExtendWith(MockitoExtension.class) public class CosmosTemplateUnitTest { - @Test(expected = IllegalArgumentException.class) + @Test public void rejectNullDbFactory() { - CosmosAsyncClient client = CosmosFactory.createCosmosAsyncClient(new CosmosClientBuilder() - .endpoint("") - .key("")); - new CosmosFactory(client, TestConstants.DB_NAME); + assertThrows(IllegalArgumentException.class, () -> { + CosmosAsyncClient client = CosmosFactory.createCosmosAsyncClient(new CosmosClientBuilder() + .endpoint("") + .key("")); + new CosmosFactory(client, TestConstants.DB_NAME); + }); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java index a301a7d65e97..f087dd4888d0 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java @@ -16,17 +16,16 @@ import com.azure.spring.data.cosmos.domain.Person; import com.azure.spring.data.cosmos.repository.MultiTenantTestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.List; @@ -40,9 +39,9 @@ import static com.azure.spring.data.cosmos.common.TestConstants.LAST_NAME; import static com.azure.spring.data.cosmos.common.TestConstants.PASSPORT_IDS_BY_COUNTRY; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MultiTenantTestRepositoryConfig.class) public class MultiTenantContainerCosmosFactoryIT { @@ -54,7 +53,7 @@ public class MultiTenantContainerCosmosFactoryIT { private final Person TEST_PERSON_1 = new Person(ID_1, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); private final Person TEST_PERSON_2 = new Person(ID_2, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -69,7 +68,7 @@ public class MultiTenantContainerCosmosFactoryIT { private CosmosAsyncClient client; private CosmosEntityInformation<Person, String> personInfo; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { /// Setup client = CosmosFactory.createCosmosAsyncClient(cosmosClientBuilder); @@ -79,7 +78,7 @@ public void setUp() throws ClassNotFoundException { try { mappingContext.setInitialEntitySet(new EntityScanner(this.applicationContext).scan(Persistent.class)); } catch (Exception e) { - Assert.fail(); + Assertions.fail(); } final MappingCosmosConverter cosmosConverter = new MappingCosmosConverter(mappingContext, null); @@ -109,7 +108,7 @@ public void testGetContainerFunctionality() { Iterable<Person> iterableDB2 = cosmosTemplate.findAll(personInfo.getContainerName(), Person.class); List<Person> resultDB2 = new ArrayList<>(); iterableDB2.forEach(resultDB2::add); - Assert.assertEquals(expectedResultsContainer2, resultDB2); + assertEquals(expectedResultsContainer2, resultDB2); // Check that testContainer1 has the correct contents cosmosFactory.manuallySetContainerName = testContainer1; @@ -118,7 +117,7 @@ public void testGetContainerFunctionality() { Iterable<Person> iterableDB1 = cosmosTemplate.findAll(personInfo.getContainerName(), Person.class); List<Person> resultDB1 = new ArrayList<>(); iterableDB1.forEach(resultDB1::add); - Assert.assertEquals(expectedResultsContainer1, resultDB1); + assertEquals(expectedResultsContainer1, resultDB1); //Cleanup deleteDatabaseIfExists(testDB1); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java index dc16252d651a..0de37438ecea 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java @@ -16,17 +16,16 @@ import com.azure.spring.data.cosmos.domain.Person; import com.azure.spring.data.cosmos.repository.MultiTenantTestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.List; @@ -40,9 +39,9 @@ import static com.azure.spring.data.cosmos.common.TestConstants.LAST_NAME; import static com.azure.spring.data.cosmos.common.TestConstants.PASSPORT_IDS_BY_COUNTRY; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MultiTenantTestRepositoryConfig.class) public class MultiTenantDBCosmosFactoryIT { @@ -52,7 +51,7 @@ public class MultiTenantDBCosmosFactoryIT { private final Person TEST_PERSON_1 = new Person(ID_1, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); private final Person TEST_PERSON_2 = new Person(ID_2, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -67,7 +66,7 @@ public class MultiTenantDBCosmosFactoryIT { private CosmosAsyncClient client; private CosmosEntityInformation<Person, String> personInfo; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { /// Setup client = CosmosFactory.createCosmosAsyncClient(cosmosClientBuilder); @@ -77,7 +76,7 @@ public void setUp() throws ClassNotFoundException { try { mappingContext.setInitialEntitySet(new EntityScanner(this.applicationContext).scan(Persistent.class)); } catch (Exception e) { - Assert.fail(); + Assertions.fail(); } final MappingCosmosConverter cosmosConverter = new MappingCosmosConverter(mappingContext, null); @@ -106,7 +105,7 @@ public void testGetDatabaseFunctionality() { Iterable<Person> iterableDB2 = cosmosTemplate.findAll(personInfo.getContainerName(), Person.class); List<Person> resultDB2 = new ArrayList<>(); iterableDB2.forEach(resultDB2::add); - Assert.assertEquals(expectedResultsDB2, resultDB2); + assertEquals(expectedResultsDB2, resultDB2); // Check that DB1 has the correct contents cosmosFactory.manuallySetDatabaseName = testDB1; @@ -115,7 +114,7 @@ public void testGetDatabaseFunctionality() { Iterable<Person> iterableDB1 = cosmosTemplate.findAll(personInfo.getContainerName(), Person.class); List<Person> resultDB1 = new ArrayList<>(); iterableDB1.forEach(resultDB1::add); - Assert.assertEquals(expectedResultsDB1, resultDB1); + assertEquals(expectedResultsDB1, resultDB1); //Cleanup deleteDatabaseIfExists(testDB1); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java index 98e4f466400c..407187e1c35e 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java @@ -45,14 +45,12 @@ import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import org.assertj.core.api.Assertions; import org.assertj.core.util.Lists; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.domain.EntityScanner; @@ -61,7 +59,6 @@ import org.springframework.data.auditing.IsNewAwareAuditingHandler; import org.springframework.data.repository.query.parser.Part; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.util.ReflectionTestUtils; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -95,11 +92,11 @@ import static com.azure.spring.data.cosmos.common.TestConstants.PATCH_HOBBY1; import static com.azure.spring.data.cosmos.common.TestConstants.TRANSIENT_PROPERTY; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.fail; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveCosmosTemplateIT { private static final Person TEST_PERSON = new Person(TestConstants.ID_1, TestConstants.FIRST_NAME, @@ -153,7 +150,7 @@ public class ReactiveCosmosTemplateIT { private static final CosmosPatchItemRequestOptions options = new CosmosPatchItemRequestOptions(); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Value("${cosmos.secondaryKey}") @@ -191,7 +188,7 @@ public class ReactiveCosmosTemplateIT { @Autowired private StubDateTimeProvider stubDateTimeProvider; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { if (cosmosTemplate == null) { azureKeyCredential = new AzureKeyCredential(cosmosDbKey); @@ -223,7 +220,7 @@ private ReactiveCosmosTemplate createReactiveCosmosTemplate(CosmosConfig config, return new ReactiveCosmosTemplate(cosmosFactory, config, cosmosConverter, inah); } - @After + @AfterEach public void cleanup() { // Reset master key azureKeyCredential.update(cosmosDbKey); @@ -246,7 +243,7 @@ public void testInsertDocShouldNotPersistTransientFields() { final Person personWithTransientField = TEST_PERSON_5; assertThat(personWithTransientField.getTransientProperty()).isNotNull(); final Mono<Person> insertedPerson = cosmosTemplate.insert(Person.class.getSimpleName(), personWithTransientField, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_5))); - Assert.assertEquals(TRANSIENT_PROPERTY, insertedPerson.block().getTransientProperty()); + assertEquals(TRANSIENT_PROPERTY, insertedPerson.block().getTransientProperty()); final Mono<Person> retrievedPerson = cosmosTemplate.findById(Person.class.getSimpleName(), personWithTransientField.getId(), Person.class); assertThat(retrievedPerson.block().getTransientProperty()).isNull(); } @@ -283,7 +280,7 @@ public void testFindByIdPointRead() { BASIC_ITEM.getId(), BasicItem.class); StepVerifier.create(findById) - .consumeNextWith(actual -> Assert.assertEquals(actual, BASIC_ITEM)) + .consumeNextWith(actual -> assertEquals(actual, BASIC_ITEM)) .verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); @@ -296,11 +293,11 @@ public void testFindByID() { TEST_PERSON.getId(), Person.class); StepVerifier.create(findById) - .consumeNextWith(actual -> Assert.assertEquals(actual, TEST_PERSON)) + .consumeNextWith(actual -> assertEquals(actual, TEST_PERSON)) .verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -310,13 +307,13 @@ public void testFindByIDBySecondaryKey() { TEST_PERSON.getId(), Person.class); StepVerifier.create(findById).consumeNextWith(actual -> { - Assert.assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); - Assert.assertEquals(actual.getLastName(), TEST_PERSON.getLastName()); + assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); + assertEquals(actual.getLastName(), TEST_PERSON.getLastName()); }).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -326,20 +323,20 @@ public void testFindAll() { StepVerifier.create(flux).expectNextCount(1).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test public void testFindByIdWithContainerName() { StepVerifier.create(cosmosTemplate.findById(Person.class.getSimpleName(), TEST_PERSON.getId(), Person.class)) - .consumeNextWith(actual -> Assert.assertEquals(actual, TEST_PERSON)) + .consumeNextWith(actual -> assertEquals(actual, TEST_PERSON)) .verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -349,29 +346,29 @@ public void testSaveSetsAuditData() { stubDateTimeProvider.setNow(now); StepVerifier.create(cosmosTemplate.insert(TEST_AUDITABLE_ENTITY_1)) .consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_1); + assertEquals(actual.getId(), UUID_1); }).verifyComplete(); StepVerifier.create(cosmosTemplate.insert(TEST_AUDITABLE_ENTITY_2)) .consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_2); + assertEquals(actual.getId(), UUID_2); }).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); final Flux<AuditableEntity> flux = cosmosTemplate.findAll(auditableEntityInfo.getContainerName(), AuditableEntity.class); StepVerifier.create(flux).consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_1); - Assert.assertEquals(actual.getCreatedBy(), "test-auditor"); - Assert.assertEquals(actual.getLastModifiedBy(), "test-auditor"); - Assert.assertEquals(actual.getCreatedDate(), now); - Assert.assertEquals(actual.getLastModifiedByDate(), now); + assertEquals(actual.getId(), UUID_1); + assertEquals(actual.getCreatedBy(), "test-auditor"); + assertEquals(actual.getLastModifiedBy(), "test-auditor"); + assertEquals(actual.getCreatedDate(), now); + assertEquals(actual.getLastModifiedByDate(), now); }).consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_2); - Assert.assertEquals(actual.getCreatedBy(), "test-auditor"); - Assert.assertEquals(actual.getLastModifiedBy(), "test-auditor"); - Assert.assertEquals(actual.getCreatedDate(), now); - Assert.assertEquals(actual.getLastModifiedByDate(), now); + assertEquals(actual.getId(), UUID_2); + assertEquals(actual.getCreatedBy(), "test-auditor"); + assertEquals(actual.getLastModifiedBy(), "test-auditor"); + assertEquals(actual.getCreatedDate(), now); + assertEquals(actual.getLastModifiedByDate(), now); }).verifyComplete(); } @@ -383,22 +380,22 @@ public void testSaveAllSetsAuditData() { StepVerifier.create(cosmosTemplate.insertAll(auditableEntityInfo, Lists.newArrayList(TEST_AUDITABLE_ENTITY_1, TEST_AUDITABLE_ENTITY_2))).expectNextCount(2).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); final Flux<AuditableEntity> flux = cosmosTemplate.findAll(auditableEntityInfo.getContainerName(), AuditableEntity.class); StepVerifier.create(flux).consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_1); - Assert.assertEquals(actual.getCreatedBy(), "test-auditor-2"); - Assert.assertEquals(actual.getLastModifiedBy(), "test-auditor-2"); - Assert.assertEquals(actual.getCreatedDate(), now); - Assert.assertEquals(actual.getLastModifiedByDate(), now); + assertEquals(actual.getId(), UUID_1); + assertEquals(actual.getCreatedBy(), "test-auditor-2"); + assertEquals(actual.getLastModifiedBy(), "test-auditor-2"); + assertEquals(actual.getCreatedDate(), now); + assertEquals(actual.getLastModifiedByDate(), now); }).consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_2); - Assert.assertEquals(actual.getCreatedBy(), "test-auditor-2"); - Assert.assertEquals(actual.getLastModifiedBy(), "test-auditor-2"); - Assert.assertEquals(actual.getCreatedDate(), now); - Assert.assertEquals(actual.getLastModifiedByDate(), now); + assertEquals(actual.getId(), UUID_2); + assertEquals(actual.getCreatedBy(), "test-auditor-2"); + assertEquals(actual.getLastModifiedBy(), "test-auditor-2"); + assertEquals(actual.getCreatedDate(), now); + assertEquals(actual.getLastModifiedByDate(), now); }).verifyComplete(); } @@ -410,7 +407,7 @@ public void testSaveAllFailureAuditData() { StepVerifier.create(cosmosTemplate.insertAll(auditableEntityInfo, Lists.newArrayList(TEST_AUDITABLE_ENTITY_1, TEST_AUDITABLE_ENTITY_2, TEST_AUDITABLE_ENTITY_3))).expectNextCount(3).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); final List<AuditableEntity> result = cosmosTemplate.findAll(auditableEntityInfo.getContainerName(), AuditableEntity.class).collectList().block(); @@ -421,28 +418,28 @@ public void testSaveAllFailureAuditData() { stubDateTimeProvider.setNow(now2); StepVerifier.create(cosmosTemplate.insertAll(auditableEntityInfo, result)) - .consumeNextWith(actual -> Assert.assertEquals(actual.getId(), UUID_1)) - .consumeNextWith(actual -> Assert.assertEquals(actual.getId(), UUID_3)).verifyComplete(); + .consumeNextWith(actual -> assertEquals(actual.getId(), UUID_1)) + .consumeNextWith(actual -> assertEquals(actual.getId(), UUID_3)).verifyComplete(); final Flux<AuditableEntity> flux = cosmosTemplate.findAll(auditableEntityInfo.getContainerName(), AuditableEntity.class); StepVerifier.create(flux).consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_1); - Assert.assertEquals(actual.getCreatedBy(), "test-auditor-2"); - Assert.assertEquals(actual.getLastModifiedBy(), "test-auditor-3"); - Assert.assertEquals(actual.getCreatedDate(), now); - Assert.assertEquals(actual.getLastModifiedByDate(), now2); + assertEquals(actual.getId(), UUID_1); + assertEquals(actual.getCreatedBy(), "test-auditor-2"); + assertEquals(actual.getLastModifiedBy(), "test-auditor-3"); + assertEquals(actual.getCreatedDate(), now); + assertEquals(actual.getLastModifiedByDate(), now2); }).consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_2); - Assert.assertEquals(actual.getCreatedBy(), "test-auditor-2"); - Assert.assertEquals(actual.getLastModifiedBy(), "test-auditor-2"); - Assert.assertEquals(actual.getCreatedDate(), now); - Assert.assertEquals(actual.getLastModifiedByDate(), now); + assertEquals(actual.getId(), UUID_2); + assertEquals(actual.getCreatedBy(), "test-auditor-2"); + assertEquals(actual.getLastModifiedBy(), "test-auditor-2"); + assertEquals(actual.getCreatedDate(), now); + assertEquals(actual.getLastModifiedByDate(), now); }).consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_3); - Assert.assertEquals(actual.getCreatedBy(), "test-auditor-2"); - Assert.assertEquals(actual.getLastModifiedBy(), "test-auditor-3"); - Assert.assertEquals(actual.getCreatedDate(), now); - Assert.assertEquals(actual.getLastModifiedByDate(), now2); + assertEquals(actual.getId(), UUID_3); + assertEquals(actual.getCreatedBy(), "test-auditor-2"); + assertEquals(actual.getLastModifiedBy(), "test-auditor-3"); + assertEquals(actual.getCreatedDate(), now); + assertEquals(actual.getLastModifiedByDate(), now2); }).verifyComplete(); } @@ -453,7 +450,7 @@ public void testInsert() { .expectNext(TEST_PERSON_3).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @@ -465,7 +462,7 @@ public void testInsertBySecondaryKey() { .expectNext(TEST_PERSON_3).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @@ -476,7 +473,7 @@ public void testInsertWithContainerName() { .expectNext(TEST_PERSON_2).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @@ -509,7 +506,7 @@ public void testUpsert() { p.setHobbies(hobbies); final Mono<Person> upsert = cosmosTemplate.upsert(p); StepVerifier.create(upsert).expectNextCount(1).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @@ -525,7 +522,7 @@ public void testUpsertNewDocumentIgnoresTransientFields() { final Mono<Person> person = cosmosTemplate.upsert(Person.class.getSimpleName(), newPerson); - Assert.assertEquals(TRANSIENT_PROPERTY, person.block().getTransientProperty()); + assertEquals(TRANSIENT_PROPERTY, person.block().getTransientProperty()); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); @@ -605,7 +602,7 @@ public void testUpsertBySecondaryKey() { StepVerifier.create(upsert).expectNextCount(1).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @@ -619,7 +616,7 @@ public void testUpsertWithContainerName() { StepVerifier.create(upsert).expectNextCount(1).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @@ -629,15 +626,15 @@ public void testDeleteById() { new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_4))).block(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); Flux<Person> flux = cosmosTemplate.findAll(Person.class.getSimpleName(), Person.class); StepVerifier.create(flux).expectNextCount(2).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); final Mono<Void> voidMono = cosmosTemplate.deleteById(Person.class.getSimpleName(), @@ -646,15 +643,15 @@ public void testDeleteById() { StepVerifier.create(voidMono).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); flux = cosmosTemplate.findAll(Person.class.getSimpleName(), Person.class); StepVerifier.create(flux).expectNextCount(1).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @@ -664,30 +661,30 @@ public void testDeleteByEntity() { new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_4))).block(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); Flux<Person> flux = cosmosTemplate.findAll(Person.class.getSimpleName(), Person.class); StepVerifier.create(flux).expectNextCount(2).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); final Mono<Void> voidMono = cosmosTemplate.deleteEntity(Person.class.getSimpleName(), insertedPerson); StepVerifier.create(voidMono).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); flux = cosmosTemplate.findAll(Person.class.getSimpleName(), Person.class); StepVerifier.create(flux).expectNextCount(1).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @@ -696,7 +693,7 @@ public void testDeleteByQuery() { cosmosTemplate.insert(TEST_PERSON_4, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_4))).block(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, "id", @@ -707,8 +704,8 @@ public void testDeleteByQuery() { StepVerifier.create(deleteFlux).expectNextCount(1).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); Mono<Person> itemMono = cosmosTemplate.findById(TEST_PERSON_4.getId(), Person.class); StepVerifier.create(itemMono).expectNextCount(0).verifyComplete(); @@ -747,8 +744,8 @@ public void testFind() { StepVerifier.create(personFluxIgnoreCase).expectNextCount(1).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -767,8 +764,8 @@ public void testExists() { StepVerifier.create(existsIgnoreCase).expectNext(true).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -787,8 +784,8 @@ public void testNotExists() { StepVerifier.create(existsIgnoreCase).expectNext(false).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -797,8 +794,8 @@ public void testCount() { StepVerifier.create(count).expectNext((long) 1).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java index dcc7bd8a1e46..ffbfe5068841 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java @@ -2,6 +2,9 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; + import com.azure.cosmos.CosmosAsyncClient; import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.models.PartitionKey; @@ -18,19 +21,15 @@ import com.azure.spring.data.cosmos.domain.PartitionPerson; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.assertj.core.api.Assertions; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; + +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.data.repository.query.parser.Part; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -42,7 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveCosmosTemplatePartitionIT { private static final PartitionPerson TEST_PERSON = new PartitionPerson(TestConstants.ID_1, @@ -53,7 +52,7 @@ public class ReactiveCosmosTemplatePartitionIT { TestConstants.NEW_FIRST_NAME, TestConstants.NEW_ZIP_CODE, TestConstants.HOBBIES, TestConstants.ADDRESSES); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); private static CosmosFactory cosmosFactory; @@ -70,7 +69,7 @@ public class ReactiveCosmosTemplatePartitionIT { @Autowired private ResponseDiagnosticsTestUtils responseDiagnosticsTestUtils; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { if (cosmosTemplate == null) { // Query plan caching is enabled by default @@ -101,13 +100,13 @@ public void testFindWithPartition() { PartitionPerson.class, PartitionPerson.class.getSimpleName()); StepVerifier.create(partitionPersonFlux).consumeNextWith(actual -> { - Assert.assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); - Assert.assertEquals(actual.getZipCode(), TEST_PERSON.getZipCode()); + assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); + assertEquals(actual.getZipCode(), TEST_PERSON.getZipCode()); }).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } // TODO: Find a way to test the query plan cache contents without using implementation package @@ -121,8 +120,8 @@ public void testFindWithPartitionWithQueryPlanCachingEnabled() { PartitionPerson.class, PartitionPerson.class.getSimpleName()); StepVerifier.create(partitionPersonFlux).consumeNextWith(actual -> { - Assert.assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); - Assert.assertEquals(actual.getZipCode(), TEST_PERSON.getZipCode()); + assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); + assertEquals(actual.getZipCode(), TEST_PERSON.getZipCode()); }).verifyComplete(); // CosmosAsyncClient cosmosAsyncClient = cosmosFactory.getCosmosAsyncClient(); @@ -142,8 +141,8 @@ public void testFindWithPartitionWithQueryPlanCachingEnabled() { PartitionPerson.class, PartitionPerson.class.getSimpleName()); StepVerifier.create(partitionPersonFlux).consumeNextWith(actual -> { - Assert.assertEquals(actual.getFirstName(), TEST_PERSON_2.getFirstName()); - Assert.assertEquals(actual.getZipCode(), TEST_PERSON_2.getZipCode()); + assertEquals(actual.getFirstName(), TEST_PERSON_2.getFirstName()); + assertEquals(actual.getZipCode(), TEST_PERSON_2.getZipCode()); }).verifyComplete(); // Map<String, PartitionedQueryExecutionInfo> postQueryCallCache = asyncDocumentClient.getQueryPlanCache(); @@ -160,13 +159,13 @@ public void testFindIgnoreCaseWithPartition() { PartitionPerson.class, PartitionPerson.class.getSimpleName()); StepVerifier.create(partitionPersonFlux).consumeNextWith(actual -> { - Assert.assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); - Assert.assertEquals(actual.getZipCode(), TEST_PERSON.getZipCode()); + assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); + assertEquals(actual.getZipCode(), TEST_PERSON.getZipCode()); }).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @@ -176,8 +175,8 @@ public void testFindByIdWithPartition() { PartitionPerson.class, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON))); StepVerifier.create(partitionPersonMono).consumeNextWith(actual -> { - Assert.assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); - Assert.assertEquals(actual.getZipCode(), TEST_PERSON.getZipCode()); + assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); + assertEquals(actual.getZipCode(), TEST_PERSON.getZipCode()); }).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); @@ -220,8 +219,8 @@ public void testUpdateWithPartition() { assertEquals(person, updated); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -236,8 +235,8 @@ public void testDeleteByIdPartition() { .verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -250,8 +249,8 @@ public void testDeleteAll() { .verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -263,8 +262,8 @@ public void testCountForPartitionedCollection() { .expectNext((long) 2).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -277,8 +276,8 @@ public void testCountForPartitionedCollectionByQuery() { .expectNext((long) 1).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -291,8 +290,8 @@ public void testCountIgnoreCaseForPartitionedCollectionByQuery() { .expectNext((long) 1).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java index 88b78a9e9ade..77eef43b221b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java @@ -16,17 +16,16 @@ import com.azure.spring.data.cosmos.domain.Person; import com.azure.spring.data.cosmos.repository.MultiTenantTestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.test.StepVerifier; @@ -42,9 +41,9 @@ import static com.azure.spring.data.cosmos.common.TestConstants.LAST_NAME; import static com.azure.spring.data.cosmos.common.TestConstants.PASSPORT_IDS_BY_COUNTRY; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MultiTenantTestRepositoryConfig.class) public class ReactiveMultiTenantContainerCosmosFactoryIT { @@ -56,7 +55,7 @@ public class ReactiveMultiTenantContainerCosmosFactoryIT { private final Person TEST_PERSON_1 = new Person(ID_1, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); private final Person TEST_PERSON_2 = new Person(ID_2, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -71,7 +70,7 @@ public class ReactiveMultiTenantContainerCosmosFactoryIT { private CosmosAsyncClient client; private CosmosEntityInformation<Person, String> personInfo; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { /// Setup client = CosmosFactory.createCosmosAsyncClient(cosmosClientBuilder); @@ -81,7 +80,7 @@ public void setUp() throws ClassNotFoundException { try { mappingContext.setInitialEntitySet(new EntityScanner(this.applicationContext).scan(Persistent.class)); } catch (Exception e) { - Assert.fail(); + Assertions.fail(); } final MappingCosmosConverter cosmosConverter = new MappingCosmosConverter(mappingContext, null); @@ -112,7 +111,7 @@ public void testGetContainerFunctionality() { StepVerifier.create(fluxDB2).expectNextCount(1).verifyComplete(); List<Person> resultDB2 = new ArrayList<>(); fluxDB2.toIterable().forEach(resultDB2::add); - Assert.assertEquals(expectedResultsContainer2, resultDB2); + assertEquals(expectedResultsContainer2, resultDB2); // Check that testContainer1 has the correct contents cosmosFactory.manuallySetContainerName = testContainer1; @@ -122,7 +121,7 @@ public void testGetContainerFunctionality() { StepVerifier.create(fluxDB1).expectNextCount(1).verifyComplete(); List<Person> resultDB1 = new ArrayList<>(); fluxDB1.toIterable().forEach(resultDB1::add); - Assert.assertEquals(expectedResultsContainer1, resultDB1); + assertEquals(expectedResultsContainer1, resultDB1); //Cleanup deleteDatabaseIfExists(testDB1); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java index a865e65a1a07..56bc2acd0499 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java @@ -16,17 +16,16 @@ import com.azure.spring.data.cosmos.domain.Person; import com.azure.spring.data.cosmos.repository.MultiTenantTestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.test.StepVerifier; @@ -42,9 +41,9 @@ import static com.azure.spring.data.cosmos.common.TestConstants.LAST_NAME; import static com.azure.spring.data.cosmos.common.TestConstants.PASSPORT_IDS_BY_COUNTRY; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MultiTenantTestRepositoryConfig.class) public class ReactiveMultiTenantDBCosmosFactoryIT { @@ -54,7 +53,7 @@ public class ReactiveMultiTenantDBCosmosFactoryIT { private final Person TEST_PERSON_1 = new Person(ID_1, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); private final Person TEST_PERSON_2 = new Person(ID_2, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -69,7 +68,7 @@ public class ReactiveMultiTenantDBCosmosFactoryIT { private CosmosAsyncClient client; private CosmosEntityInformation<Person, String> personInfo; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { /// Setup client = CosmosFactory.createCosmosAsyncClient(cosmosClientBuilder); @@ -79,7 +78,7 @@ public void setUp() throws ClassNotFoundException { try { mappingContext.setInitialEntitySet(new EntityScanner(this.applicationContext).scan(Persistent.class)); } catch (Exception e) { - Assert.fail(); + Assertions.fail(); } final MappingCosmosConverter cosmosConverter = new MappingCosmosConverter(mappingContext, null); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/convert/ZonedDateTimeDeserializerTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/convert/ZonedDateTimeDeserializerTest.java index 88b593f2fe95..57059cfc962f 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/convert/ZonedDateTimeDeserializerTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/convert/ZonedDateTimeDeserializerTest.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core.convert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.io.IOException; import java.time.ZoneId; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/converter/MappingCosmosConverterUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/converter/MappingCosmosConverterUnitTest.java index 0a11e4a78741..f86817f8f79a 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/converter/MappingCosmosConverterUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/converter/MappingCosmosConverterUnitTest.java @@ -15,11 +15,11 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.context.ApplicationContext; import java.text.ParseException; @@ -29,7 +29,7 @@ import static org.assertj.core.api.Assertions.assertThat; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class MappingCosmosConverterUnitTest { private static final SimpleDateFormat DATE = new SimpleDateFormat(TestConstants.DATE_FORMAT); private static final SimpleDateFormat TIMEZONE_DATE = new SimpleDateFormat(TestConstants.DATE_TIMEZONE_FORMAT); @@ -39,7 +39,7 @@ public class MappingCosmosConverterUnitTest { @Mock ApplicationContext applicationContext; - @Before + @BeforeEach public void setUp() { final CosmosMappingContext mappingContext = new CosmosMappingContext(); final ObjectMapper objectMapper = new ObjectMapper(); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGeneratorTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGeneratorTest.java index 55c21c65ce11..9c6d48004646 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGeneratorTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGeneratorTest.java @@ -10,9 +10,9 @@ import com.azure.spring.data.cosmos.core.query.CriteriaType; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.springframework.data.domain.Sort; import org.springframework.data.repository.query.parser.Part; @@ -22,13 +22,14 @@ import java.util.stream.Collectors; import static org.springframework.data.domain.Sort.Direction.ASC; +import static org.junit.jupiter.api.Assertions.*; public class AbstractQueryGeneratorTest { @Mock private EmptyQueryGenerator queryGenerator; - @Before + @BeforeEach public void setUp() { this.queryGenerator = new EmptyQueryGenerator(); } @@ -45,7 +46,7 @@ public void binaryOperatorPriorityPreserved() { final CosmosQuery query = new CosmosQuery(and); SqlQuerySpec querySpec = queryGenerator.generateCosmos(query); List<String> parameterNames = querySpec.getParameters().stream().map(SqlParameter::getName).collect(Collectors.toList()); - Assert.assertNotNull(querySpec.getQueryText()); + Assertions.assertNotNull(querySpec.getQueryText()); MatcherAssert.assertThat(querySpec.getQueryText(), Matchers.stringContainsInOrder( parameterNames.get(0), CriteriaType.AND.getSqlKeyword(), "(", parameterNames.get(1), CriteriaType.OR.getSqlKeyword(), parameterNames.get(2), ")")); @@ -60,7 +61,7 @@ public void generateBinaryQueryWithStartsWithDoesNotUseUpper() { SqlQuerySpec result = queryGenerator.generateCosmos(query); - Assert.assertEquals(result.getQueryText(), " WHERE STARTSWITH(r.firstName, @firstName0, true) "); + assertEquals(result.getQueryText(), " WHERE STARTSWITH(r.firstName, @firstName0, true) "); } @Test @@ -72,7 +73,7 @@ public void generateBinaryQueryWithSort() { SqlQuerySpec result = queryGenerator.generateCosmos(query); - Assert.assertEquals(result.getQueryText(), " WHERE ARRAY_CONTAINS(UPPER(r.lastName), UPPER(@lastName0)) ORDER BY r.id ASC"); + assertEquals(result.getQueryText(), " WHERE ARRAY_CONTAINS(UPPER(r.lastName), UPPER(@lastName0)) ORDER BY r.id ASC"); } @Test @@ -84,7 +85,7 @@ public void generateBinaryQueryWithArrayContainsUsesUpper() { SqlQuerySpec result = queryGenerator.generateCosmos(query); - Assert.assertEquals(result.getQueryText(), " WHERE ARRAY_CONTAINS(UPPER(r.lastName), UPPER(@lastName0)) "); + assertEquals(result.getQueryText(), " WHERE ARRAY_CONTAINS(UPPER(r.lastName), UPPER(@lastName0)) "); } @Test @@ -98,9 +99,9 @@ public void generateBinaryQueryWithStringEquals() { SqlQuerySpec result = queryGenerator.generateCosmos(query); if (ignoreCaseType == Part.IgnoreCaseType.NEVER) { - Assert.assertEquals(result.getQueryText(), " WHERE STRINGEQUALS(r.firstName, @firstName0) "); + assertEquals(result.getQueryText(), " WHERE STRINGEQUALS(r.firstName, @firstName0) "); } else { - Assert.assertEquals(result.getQueryText(), " WHERE STRINGEQUALS(r.firstName, @firstName0, true) "); + assertEquals(result.getQueryText(), " WHERE STRINGEQUALS(r.firstName, @firstName0, true) "); } } } @@ -114,7 +115,7 @@ public void generateBinaryQueryWithIsEqualIntUsesUpper() { SqlQuerySpec result = queryGenerator.generateCosmos(query); - Assert.assertEquals(result.getQueryText(), " WHERE UPPER(r.zipcode) = UPPER(@zipcode0) "); + assertEquals(result.getQueryText(), " WHERE UPPER(r.zipcode) = UPPER(@zipcode0) "); } @Test @@ -126,7 +127,7 @@ public void generateBinaryQueryWithIsEqualStringDoesNotUseUpper() { SqlQuerySpec result = queryGenerator.generateCosmos(query); - Assert.assertEquals(result.getQueryText(), " WHERE STRINGEQUALS(r.firstName, @firstName0, true) "); + assertEquals(result.getQueryText(), " WHERE STRINGEQUALS(r.firstName, @firstName0, true) "); } private static class EmptyQueryGenerator extends AbstractQueryGenerator implements QuerySpecGenerator { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/generator/NativeQueryGeneratorTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/generator/NativeQueryGeneratorTest.java index a21f4aeb60fc..e6c165623020 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/generator/NativeQueryGeneratorTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/generator/NativeQueryGeneratorTest.java @@ -6,9 +6,8 @@ import com.azure.cosmos.models.SqlParameter; import com.azure.cosmos.models.SqlQuerySpec; import com.azure.spring.data.cosmos.core.query.CosmosQuery; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.springframework.data.domain.Sort; @@ -16,13 +15,14 @@ import java.util.List; import static org.springframework.data.domain.Sort.Direction.ASC; +import static org.junit.jupiter.api.Assertions.*; public class NativeQueryGeneratorTest { @Mock private EmptyQueryGenerator queryGenerator; - @Before + @BeforeEach public void setUp() { this.queryGenerator = new EmptyQueryGenerator(); } @@ -35,7 +35,7 @@ public void generateSortedQueryTest() { SqlQuerySpec querySpec = new SqlQuerySpec("select * from a where a.firstName = @firstName", sqlParameters); final SqlQuerySpec sortedQuerySpec = NativeQueryGenerator.getInstance().generateSortedQuery(querySpec, Sort.by(ASC, "id")); - Assert.assertEquals(sortedQuerySpec.getQueryText(), "select * from a where a.firstName = @firstName ORDER BY a.id ASC"); + assertEquals(sortedQuerySpec.getQueryText(), "select * from a where a.firstName = @firstName ORDER BY a.id ASC"); } private static class EmptyQueryGenerator extends NativeQueryGenerator implements QuerySpecGenerator { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntityUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntityUnitTest.java index 59d3e5c6a7f6..345457579818 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntityUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntityUnitTest.java @@ -4,7 +4,7 @@ package com.azure.spring.data.cosmos.core.mapping; import com.azure.spring.data.cosmos.domain.Person; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.data.util.ClassTypeInformation; import static org.assertj.core.api.Assertions.assertThat; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/CosmosMappingContextUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/CosmosMappingContextUnitTest.java index 2ed4fbbdc906..506f5034267f 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/CosmosMappingContextUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/CosmosMappingContextUnitTest.java @@ -3,7 +3,7 @@ package com.azure.spring.data.cosmos.core.mapping; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.springframework.context.ApplicationContext; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorIT.java index ff4f63e10c08..200d92e55202 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorIT.java @@ -10,21 +10,21 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.AddressRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS1_PARTITION1; +import static org.junit.jupiter.api.Assertions.assertThrows; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = {TestRepositoryConfig.class, ErrorEventListenerConfig.class}) public class ApplicationContextEventErrorIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -32,14 +32,16 @@ public class ApplicationContextEventErrorIT { @Autowired private CosmosTemplate template; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); repository.saveAll(Lists.newArrayList(TEST_ADDRESS1_PARTITION1)); } - @Test(expected = CosmosAccessException.class) + @Test public void shouldThrowExceptionIfEventListenerThrowsException() { - repository.findById(TEST_ADDRESS1_PARTITION1.getPostalCode(), new PartitionKey(TEST_ADDRESS1_PARTITION1.getCity())); + assertThrows(CosmosAccessException.class, () -> + repository.findById(TEST_ADDRESS1_PARTITION1.getPostalCode(), + new PartitionKey(TEST_ADDRESS1_PARTITION1.getCity()))); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorReactiveIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorReactiveIT.java index 6f833a984b6f..5db9dea65ea7 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorReactiveIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorReactiveIT.java @@ -10,21 +10,20 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveAddressRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS1_PARTITION1; +import static org.junit.jupiter.api.Assertions.assertThrows; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = {TestRepositoryConfig.class, ErrorEventListenerConfig.class}) public class ApplicationContextEventErrorReactiveIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -32,14 +31,12 @@ public class ApplicationContextEventErrorReactiveIT { @Autowired private CosmosTemplate template; - @Before - public void setUp() { - collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); - repository.saveAll(Lists.newArrayList(TEST_ADDRESS1_PARTITION1)).collectList().block(); - } - - @Test(expected = CosmosAccessException.class) + @Test public void shouldThrowExceptionIfEventListenerThrowsException() { - repository.findById(TEST_ADDRESS1_PARTITION1.getPostalCode(), new PartitionKey(TEST_ADDRESS1_PARTITION1.getCity())).block(); + assertThrows(CosmosAccessException.class, () -> { + collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); + repository.saveAll(Lists.newArrayList(TEST_ADDRESS1_PARTITION1)).collectList().block(); + repository.findById(TEST_ADDRESS1_PARTITION1.getPostalCode(), new PartitionKey(TEST_ADDRESS1_PARTITION1.getCity())).block(); + }); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventIT.java index 91654aee2bb6..f63cd324cd57 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventIT.java @@ -11,15 +11,12 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.AddressRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.List; @@ -30,11 +27,11 @@ import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS4_PARTITION3; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ApplicationContextEventIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -44,11 +41,9 @@ public class ApplicationContextEventIT { @Autowired private SimpleCosmosMappingEventListener simpleCosmosMappingEventListener; - @SuppressWarnings("deprecation") - @Rule - public ExpectedException expectedException = ExpectedException.none(); - @Before + + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); repository.saveAll(Lists.newArrayList(TEST_ADDRESS1_PARTITION1, TEST_ADDRESS1_PARTITION2, diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventReactiveIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventReactiveIT.java index 9ce320cb6a46..4ce9f3e4a148 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventReactiveIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventReactiveIT.java @@ -10,15 +10,12 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveAddressRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.List; @@ -29,11 +26,11 @@ import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS4_PARTITION3; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ApplicationContextEventReactiveIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -43,11 +40,9 @@ public class ApplicationContextEventReactiveIT { @Autowired private SimpleCosmosMappingEventListener simpleCosmosMappingEventListener; - @SuppressWarnings("deprecation") - @Rule - public ExpectedException expectedException = ExpectedException.none(); - @Before + + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); repository.saveAll(Lists.newArrayList(TEST_ADDRESS1_PARTITION1, TEST_ADDRESS1_PARTITION2, diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/CosmosEventListenerUnitTests.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/CosmosEventListenerUnitTests.java index e604fdddd8a9..50339dc8194b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/CosmosEventListenerUnitTests.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/CosmosEventListenerUnitTests.java @@ -7,7 +7,7 @@ import com.azure.spring.data.cosmos.domain.Student; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.NullNode; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CosmosQueryUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CosmosQueryUnitTest.java index 39e0e584129a..6a163bc57a7d 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CosmosQueryUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CosmosQueryUnitTest.java @@ -2,8 +2,7 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core.query; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.data.repository.query.parser.Part; @@ -12,6 +11,7 @@ import static com.azure.spring.data.cosmos.common.TestConstants.CRITERIA_KEY; import static com.azure.spring.data.cosmos.common.TestConstants.CRITERIA_OBJECT; +import static org.junit.jupiter.api.Assertions.*; public class CosmosQueryUnitTest { @@ -22,9 +22,9 @@ public void testDocumentQueryCreate() { final CosmosQuery query = new CosmosQuery(criteria); - Assert.assertEquals(criteria, query.getCriteria()); - Assert.assertEquals(Sort.unsorted(), query.getSort()); - Assert.assertEquals(Pageable.unpaged(), query.getPageable()); - Assert.assertEquals(Part.IgnoreCaseType.NEVER, criteria.getIgnoreCase()); + assertEquals(criteria, query.getCriteria()); + assertEquals(Sort.unsorted(), query.getSort()); + assertEquals(Pageable.unpaged(), query.getPageable()); + assertEquals(Part.IgnoreCaseType.NEVER, criteria.getIgnoreCase()); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CriteriaUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CriteriaUnitTest.java index 3ac5bdd4e561..70eac9006d0b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CriteriaUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CriteriaUnitTest.java @@ -4,8 +4,8 @@ import com.azure.spring.data.cosmos.core.generator.FindQuerySpecGenerator; import com.azure.spring.data.cosmos.exception.IllegalQueryException; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; import org.springframework.data.repository.query.parser.Part; import java.util.Arrays; @@ -14,6 +14,7 @@ import static com.azure.spring.data.cosmos.common.TestConstants.CRITERIA_KEY; import static com.azure.spring.data.cosmos.common.TestConstants.CRITERIA_OBJECT; +import static org.junit.jupiter.api.Assertions.*; public class CriteriaUnitTest { @@ -23,12 +24,12 @@ public void testUnaryCriteria() { final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, CRITERIA_KEY, values, Part.IgnoreCaseType.NEVER); - Assert.assertTrue(criteria.getSubCriteria().isEmpty()); - Assert.assertEquals(values, criteria.getSubjectValues()); - Assert.assertEquals(CriteriaType.IS_EQUAL, criteria.getType()); - Assert.assertEquals(CRITERIA_KEY, criteria.getSubject()); - Assert.assertTrue(CriteriaType.isBinary(criteria.getType())); - Assert.assertEquals(Part.IgnoreCaseType.NEVER, criteria.getIgnoreCase()); + Assertions.assertTrue(criteria.getSubCriteria().isEmpty()); + assertEquals(values, criteria.getSubjectValues()); + assertEquals(CriteriaType.IS_EQUAL, criteria.getType()); + assertEquals(CRITERIA_KEY, criteria.getSubject()); + Assertions.assertTrue(CriteriaType.isBinary(criteria.getType())); + assertEquals(Part.IgnoreCaseType.NEVER, criteria.getIgnoreCase()); } @Test @@ -40,37 +41,41 @@ public void testBinaryCriteria() { CRITERIA_OBJECT, values, Part.IgnoreCaseType.NEVER); final Criteria criteria = Criteria.getInstance(CriteriaType.AND, leftCriteria, rightCriteria); - Assert.assertNotNull(criteria.getSubCriteria()); - Assert.assertNull(criteria.getSubjectValues()); - Assert.assertNull(criteria.getSubject()); - Assert.assertEquals(criteria.getType(), CriteriaType.AND); - Assert.assertTrue(CriteriaType.isClosed(criteria.getType())); + Assertions.assertNotNull(criteria.getSubCriteria()); + Assertions.assertNull(criteria.getSubjectValues()); + Assertions.assertNull(criteria.getSubject()); + assertEquals(criteria.getType(), CriteriaType.AND); + Assertions.assertTrue(CriteriaType.isClosed(criteria.getType())); - Assert.assertEquals(2, criteria.getSubCriteria().size()); - Assert.assertEquals(leftCriteria, criteria.getSubCriteria().get(0)); - Assert.assertEquals(rightCriteria, criteria.getSubCriteria().get(1)); + assertEquals(2, criteria.getSubCriteria().size()); + assertEquals(leftCriteria, criteria.getSubCriteria().get(0)); + assertEquals(rightCriteria, criteria.getSubCriteria().get(1)); - Assert.assertEquals(Part.IgnoreCaseType.NEVER, criteria.getSubCriteria().get(0).getIgnoreCase()); - Assert.assertEquals(Part.IgnoreCaseType.NEVER, criteria.getSubCriteria().get(1).getIgnoreCase()); + assertEquals(Part.IgnoreCaseType.NEVER, criteria.getSubCriteria().get(0).getIgnoreCase()); + assertEquals(Part.IgnoreCaseType.NEVER, criteria.getSubCriteria().get(1).getIgnoreCase()); } - @Test(expected = IllegalQueryException.class) + @Test public void testInvalidInKeywordParameter() { - final List<Object> values = Collections.singletonList(CRITERIA_OBJECT); - final Criteria criteria = Criteria.getInstance(CriteriaType.IN, - CRITERIA_KEY, values, Part.IgnoreCaseType.NEVER); - final CosmosQuery query = new CosmosQuery(criteria); + assertThrows(IllegalQueryException.class, () -> { + final List<Object> values = Collections.singletonList(CRITERIA_OBJECT); + final Criteria criteria = Criteria.getInstance(CriteriaType.IN, + CRITERIA_KEY, values, Part.IgnoreCaseType.NEVER); + final CosmosQuery query = new CosmosQuery(criteria); - new FindQuerySpecGenerator().generateCosmos(query); + new FindQuerySpecGenerator().generateCosmos(query); + }); } - @Test(expected = IllegalQueryException.class) + @Test public void testInvalidInKeywordType() { - final List<Object> values = Collections.singletonList(new IllegalQueryException("")); - final Criteria criteria = Criteria.getInstance(CriteriaType.IN, - CRITERIA_KEY, values, Part.IgnoreCaseType.NEVER); - final CosmosQuery query = new CosmosQuery(criteria); + assertThrows(IllegalQueryException.class, () -> { + final List<Object> values = Collections.singletonList(new IllegalQueryException("")); + final Criteria criteria = Criteria.getInstance(CriteriaType.IN, + CRITERIA_KEY, values, Part.IgnoreCaseType.NEVER); + final CosmosQuery query = new CosmosQuery(criteria); - new FindQuerySpecGenerator().generateCosmos(query); + new FindQuerySpecGenerator().generateCosmos(query); + }); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtilsTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtilsTest.java index 334e3a2a7b54..f1c892d00ef5 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtilsTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtilsTest.java @@ -5,11 +5,11 @@ import com.azure.cosmos.BridgeInternal; import com.azure.cosmos.CosmosException; import com.azure.spring.data.cosmos.core.ResponseDiagnosticsProcessor; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.springframework.http.HttpStatus; -import static org.junit.Assert.assertThrows; +import static org.junit.jupiter.api.Assertions.assertThrows; public class CosmosExceptionUtilsTest { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/CosmosAnnotationUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/CosmosAnnotationUnitTest.java index 73f2c734de4c..4a40d9a968a7 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/CosmosAnnotationUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/CosmosAnnotationUnitTest.java @@ -11,8 +11,8 @@ import com.azure.spring.data.cosmos.domain.Role; import com.azure.spring.data.cosmos.domain.TimeToLiveSample; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.util.Assert; @@ -20,7 +20,7 @@ public class CosmosAnnotationUnitTest { private CosmosEntityInformation<NoDBAnnotationPerson, String> personInfo; private CosmosEntityInformation<Role, String> roleInfo; - @Before + @BeforeEach public void setUp() { personInfo = new CosmosEntityInformation<>(NoDBAnnotationPerson.class); roleInfo = new CosmosEntityInformation<>(Role.class); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/EntityImplRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/EntityImplRepositoryIT.java index c97650b779cd..810c102903cf 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/EntityImplRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/EntityImplRepositoryIT.java @@ -12,23 +12,22 @@ import com.azure.spring.data.cosmos.repository.repository.EntityImplRepository; import com.azure.spring.data.cosmos.repository.repository.ParentEntityRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Iterator; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class EntityImplRepositoryIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -52,7 +51,7 @@ public class EntityImplRepositoryIT { private final ParentEntity PARENTENTITY_1 = new ParentEntity(); private final ParentEntity PARENTENTITY_2 = new ParentEntity(); - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); ENTITYIMPL_1.setId("entityImpl1"); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/MultiCosmosTemplateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/MultiCosmosTemplateIT.java index 87703fac276a..d32512bbe743 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/MultiCosmosTemplateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/MultiCosmosTemplateIT.java @@ -10,22 +10,21 @@ import com.azure.spring.data.cosmos.core.ReactiveCosmosTemplate; import com.azure.spring.data.cosmos.domain.Person; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.assertj.core.api.Assertions; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Mono; import java.lang.reflect.Field; import static com.azure.spring.data.cosmos.common.TestConstants.AGE; import static com.azure.spring.data.cosmos.common.TestConstants.PASSPORT_IDS_BY_COUNTRY; +import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = {TestRepositoryConfig.class, SecondaryTestRepositoryConfig.class}) public class MultiCosmosTemplateIT { private static final Person PRIMARY_TEST_PERSON = new Person(TestConstants.ID_1, TestConstants.FIRST_NAME, @@ -33,7 +32,7 @@ public class MultiCosmosTemplateIT { private static final Person SECONDARY_TEST_PERSON = new Person(TestConstants.ID_2, TestConstants.NEW_FIRST_NAME, TestConstants.NEW_LAST_NAME, TestConstants.HOBBIES, TestConstants.ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager primaryCollectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -53,7 +52,7 @@ public void testPrimaryTemplate() { primaryReactiveCosmosTemplate.insert(PRIMARY_TEST_PERSON, new PartitionKey(personInfo.getPartitionKeyFieldValue(PRIMARY_TEST_PERSON))).block(); final Mono<Person> findById = primaryReactiveCosmosTemplate.findById(PRIMARY_TEST_PERSON.getId(), Person.class); - Assertions.assertThat(findById.block().getFirstName()).isEqualTo(TestConstants.FIRST_NAME); + assertThat(findById.block().getFirstName()).isEqualTo(TestConstants.FIRST_NAME); } @Test @@ -62,7 +61,7 @@ public void testSecondaryTemplate() { secondaryReactiveCosmosTemplate.insert(SECONDARY_TEST_PERSON, new PartitionKey(personInfo.getPartitionKeyFieldValue(SECONDARY_TEST_PERSON))).block(); final Mono<Person> findById = secondaryReactiveCosmosTemplate.findById(SECONDARY_TEST_PERSON.getId(), Person.class); - Assertions.assertThat(findById.block().getFirstName()).isEqualTo(TestConstants.NEW_FIRST_NAME); + assertThat(findById.block().getFirstName()).isEqualTo(TestConstants.NEW_FIRST_NAME); secondaryReactiveCosmosTemplate.deleteAll(Person.class.getSimpleName(), Person.class).block(); secondaryReactiveCosmosTemplate.deleteContainer(personInfo.getContainerName()); } @@ -73,7 +72,7 @@ public void testSecondaryTemplateWithDiffDatabase() { secondaryDiffDatabaseReactiveCosmosTemplate.insert(SECONDARY_TEST_PERSON, new PartitionKey(personInfo.getPartitionKeyFieldValue(SECONDARY_TEST_PERSON))).block(); final Mono<Person> findById = secondaryDiffDatabaseReactiveCosmosTemplate.findById(SECONDARY_TEST_PERSON.getId(), Person.class); - Assertions.assertThat(findById.block().getFirstName()).isEqualTo(TestConstants.NEW_FIRST_NAME); + assertThat(findById.block().getFirstName()).isEqualTo(TestConstants.NEW_FIRST_NAME); secondaryDiffDatabaseReactiveCosmosTemplate.deleteAll(Person.class.getSimpleName(), Person.class).block(); secondaryDiffDatabaseReactiveCosmosTemplate.deleteContainer(personInfo.getContainerName()); } @@ -86,6 +85,6 @@ public void testSingleCosmosClientForMultipleCosmosTemplate() throws IllegalAcce CosmosAsyncClient client1 = cosmosFactory1.getCosmosAsyncClient(); CosmosFactory cosmosFactory2 = (CosmosFactory) cosmosFactory.get(secondaryDiffDatabaseReactiveCosmosTemplate); CosmosAsyncClient client2 = cosmosFactory2.getCosmosAsyncClient(); - Assertions.assertThat(client1).isEqualTo(client2); + assertThat(client1).isEqualTo(client2); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/ReactiveUUIDIdDomainRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/ReactiveUUIDIdDomainRepositoryIT.java index c6dbb5ca5fbb..ce726a3a3c93 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/ReactiveUUIDIdDomainRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/ReactiveUUIDIdDomainRepositoryIT.java @@ -9,13 +9,12 @@ import com.azure.spring.data.cosmos.exception.CosmosNotFoundException; import com.azure.spring.data.cosmos.repository.repository.ReactiveUUIDIdDomainRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -24,7 +23,9 @@ import java.util.Objects; import java.util.UUID; -@RunWith(SpringJUnit4ClassRunner.class) +import static org.junit.jupiter.api.Assertions.assertThrows; + +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveUUIDIdDomainRepositoryIT { @@ -37,7 +38,7 @@ public class ReactiveUUIDIdDomainRepositoryIT { private static final UUIDIdDomain DOMAIN_1 = new UUIDIdDomain(ID_1, NAME_1); private static final UUIDIdDomain DOMAIN_2 = new UUIDIdDomain(ID_2, NAME_2); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -48,7 +49,7 @@ public class ReactiveUUIDIdDomainRepositoryIT { private CosmosEntityInformation<UUIDIdDomain, ?> entityInformation; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, UUIDIdDomain.class); entityInformation = collectionManager.getEntityInformation(UUIDIdDomain.class); @@ -77,9 +78,10 @@ public void testUUIDIdDomain() { StepVerifier.create(afterDelIdMono).expectNextCount(0).verifyComplete(); } - @Test(expected = IllegalArgumentException.class) + @Test public void testInvalidDomain() { - new CosmosEntityInformation<InvalidDomain, Long>(InvalidDomain.class); + assertThrows(IllegalArgumentException.class, () -> + new CosmosEntityInformation<InvalidDomain, Long>(InvalidDomain.class)); } @Test diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryIllegalTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryIllegalTest.java index 053ebd265c0c..b3819234d44a 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryIllegalTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryIllegalTest.java @@ -8,13 +8,15 @@ import com.azure.spring.data.cosmos.domain.Person; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.repository.support.SimpleCosmosRepository; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; -@RunWith(MockitoJUnitRunner.class) +import static org.junit.jupiter.api.Assertions.assertThrows; + +@ExtendWith(MockitoExtension.class) public class SimpleCosmosRepositoryIllegalTest { private SimpleCosmosRepository<Person, String> repository; @@ -23,49 +25,49 @@ public class SimpleCosmosRepositoryIllegalTest { @Mock CosmosEntityInformation<Person, String> entityInformation; - @Before + @BeforeEach public void setUp() { CosmosContainerProperties containerProperties = new CosmosContainerProperties("", new PartitionKeyDefinition()); repository = new SimpleCosmosRepository<>(entityInformation, dbOperations); } - @Test(expected = IllegalArgumentException.class) + @Test public void deleteNullShouldFail() { - repository.delete(null); + assertThrows(IllegalArgumentException.class, () -> repository.delete(null)); } - @Test(expected = IllegalArgumentException.class) + @Test public void deleteIterableNullShouldFail() { - repository.deleteAll(null); + assertThrows(IllegalArgumentException.class, () -> repository.deleteAll(null)); } - @Test(expected = IllegalArgumentException.class) + @Test public void deleteNullIdShouldFail() { - repository.deleteById(null); + assertThrows(IllegalArgumentException.class, () -> repository.deleteById(null)); } - @Test(expected = IllegalArgumentException.class) + @Test public void existsNullIdShouldFail() { - repository.existsById(null); + assertThrows(IllegalArgumentException.class, () -> repository.existsById(null)); } - @Test(expected = IllegalArgumentException.class) + @Test public void findNullIterableIdsShouldFail() { - repository.findAllById(null); + assertThrows(IllegalArgumentException.class, () -> repository.findAllById(null)); } - @Test(expected = IllegalArgumentException.class) + @Test public void findByNullIdShouldFail() { - repository.findById(null); + assertThrows(IllegalArgumentException.class, () -> repository.findById(null)); } - @Test(expected = IllegalArgumentException.class) + @Test public void saveNullShouldFail() { - repository.save(null); + assertThrows(IllegalArgumentException.class, () -> repository.save(null)); } - @Test(expected = IllegalArgumentException.class) + @Test public void saveNullIterableShouldFail() { - repository.saveAll(null); + assertThrows(IllegalArgumentException.class, () -> repository.saveAll(null)); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryUnitTest.java index 74270cf1c380..7315ebc9955d 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryUnitTest.java @@ -10,23 +10,23 @@ import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.repository.support.SimpleCosmosRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.util.Arrays; import java.util.List; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.lenient; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class SimpleCosmosRepositoryUnitTest { private static final Person TEST_PERSON = new Person(TestConstants.ID_1, TestConstants.FIRST_NAME, TestConstants.LAST_NAME, @@ -41,15 +41,13 @@ public class SimpleCosmosRepositoryUnitTest { @Mock CosmosEntityInformation<Person, String> entityInformation; - @SuppressWarnings("deprecation") - @Rule - public ExpectedException expectedException = ExpectedException.none(); + - @Before + @BeforeEach public void setUp() { when(entityInformation.getJavaType()).thenReturn(Person.class); when(entityInformation.getContainerName()).thenReturn(Person.class.getSimpleName()); - when(cosmosOperations.findAll(anyString(), any())).thenReturn(Arrays.asList(TEST_PERSON)); + lenient().when(cosmosOperations.findAll(anyString(), any())).thenReturn(Arrays.asList(TEST_PERSON)); repository = new SimpleCosmosRepository<>(entityInformation, cosmosOperations); } @@ -75,15 +73,15 @@ public void testFindOne() { @Test public void testFindOneExceptionForPartitioned() { - expectedException.expect(UnsupportedOperationException.class); - expectedException.expectMessage(PARTITION_VALUE_REQUIRED_MSG); - repository.save(TEST_PERSON); when(cosmosOperations.findById(anyString(), anyString(), any())) .thenThrow(new UnsupportedOperationException(PARTITION_VALUE_REQUIRED_MSG)); - final Person result = repository.findById(TEST_PERSON.getId()).get(); + UnsupportedOperationException exception = assertThrows(UnsupportedOperationException.class, () -> { + repository.findById(TEST_PERSON.getId()).get(); + }); + assertEquals(PARTITION_VALUE_REQUIRED_MSG, exception.getMessage()); } @Test diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/CosmosRepositoryConfigurationExtensionUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/CosmosRepositoryConfigurationExtensionUnitTest.java index 73945c6eeee2..ee084a625675 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/CosmosRepositoryConfigurationExtensionUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/CosmosRepositoryConfigurationExtensionUnitTest.java @@ -4,7 +4,7 @@ package com.azure.spring.data.cosmos.repository.config; import com.azure.spring.data.cosmos.repository.CosmosRepository; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.core.env.Environment; import org.springframework.core.env.StandardEnvironment; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/ReactiveCosmosRepositoryConfigurationExtensionUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/ReactiveCosmosRepositoryConfigurationExtensionUnitTest.java index 57e518e03ef6..562bcb39a5c3 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/ReactiveCosmosRepositoryConfigurationExtensionUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/ReactiveCosmosRepositoryConfigurationExtensionUnitTest.java @@ -4,7 +4,7 @@ package com.azure.spring.data.cosmos.repository.config; import com.azure.spring.data.cosmos.repository.ReactiveCosmosRepository; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.core.env.Environment; import org.springframework.core.env.StandardEnvironment; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java index 7f6b0f0de5ec..e76518ac9384 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java @@ -2,6 +2,9 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.integration; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; + import com.azure.cosmos.models.CosmosPatchItemRequestOptions; import com.azure.cosmos.models.CosmosPatchOperations; import com.azure.cosmos.models.PartitionKey; @@ -16,16 +19,13 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.AddressRepository; import org.assertj.core.util.Lists; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; + + +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Arrays; import java.util.Comparator; @@ -40,12 +40,13 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class AddressRepositoryIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -60,9 +61,6 @@ public class AddressRepositoryIT { @Autowired private ResponseDiagnosticsTestUtils responseDiagnosticsTestUtils; - @SuppressWarnings("deprecation") - @Rule - public ExpectedException expectedException = ExpectedException.none(); CosmosPatchOperations patchSetOperation = CosmosPatchOperations .create() @@ -79,7 +77,7 @@ public class AddressRepositoryIT { private static final CosmosPatchItemRequestOptions options = new CosmosPatchItemRequestOptions(); - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); repository.saveAll(Lists.newArrayList(TEST_ADDRESS1_PARTITION1, TEST_ADDRESS1_PARTITION2, @@ -167,8 +165,8 @@ public void testFindByStreetOrCity() { result.sort(Comparator.comparing(Address::getPostalCode)); reference.sort(Comparator.comparing(Address::getPostalCode)); - Assert.assertEquals(reference.size(), result.size()); - Assert.assertEquals(reference, result); + assertEquals(reference.size(), result.size()); + assertEquals(reference, result); } @Test @@ -183,9 +181,8 @@ public void testCount() { @Test public void deleteWithoutPartitionedColumnShouldFail() { - expectedException.expect(Exception.class); - - repository.deleteById(TEST_ADDRESS1_PARTITION1.getPostalCode()); + assertThrows(Exception.class, () -> + repository.deleteById(TEST_ADDRESS1_PARTITION1.getPostalCode())); } @Test @@ -302,7 +299,7 @@ public void testPatchPreConditionFail() { options.setFilterPredicate("FROM address a WHERE a.city = 'dummy'"); Address patchedAddress = repository.save(TestConstants.POSTAL_CODE, new PartitionKey(CITY), Address.class, patchSetOperation, options); assertThat(patchedAddress.getStreet()).isEqualTo(TestConstants.NEW_STREET); - Assert.fail(); + Assertions.fail(); } catch (CosmosAccessException ex) { assertThat(ex.getCosmosException().getStatusCode()).isEqualTo(TestConstants.PRECONDITION_FAILED_STATUS_CODE); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryNoMetricsIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryNoMetricsIT.java index acc313a92d9c..a86dd3896023 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryNoMetricsIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryNoMetricsIT.java @@ -11,13 +11,12 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryNoMetricsConfig; import com.azure.spring.data.cosmos.repository.repository.AddressRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.List; @@ -27,11 +26,11 @@ import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS4_PARTITION3; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryNoMetricsConfig.class) public class AddressRepositoryNoMetricsIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -47,7 +46,7 @@ public class AddressRepositoryNoMetricsIT { private ResponseDiagnosticsTestUtils responseDiagnosticsTestUtils; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); repository.saveAll(Lists.newArrayList(TEST_ADDRESS1_PARTITION1, TEST_ADDRESS1_PARTITION2, diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AnnotatedQueryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AnnotatedQueryIT.java index 671058c9a776..9919bd9cb865 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AnnotatedQueryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AnnotatedQueryIT.java @@ -12,17 +12,16 @@ import com.azure.spring.data.cosmos.repository.repository.AddressRepository; import com.azure.spring.data.cosmos.repository.repository.AuditableRepository; import com.fasterxml.jackson.databind.JsonNode; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Slice; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.time.LocalDate; import java.util.ArrayList; @@ -38,11 +37,11 @@ import static com.azure.spring.data.cosmos.common.TestConstants.PAGE_SIZE_2; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class AnnotatedQueryIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -54,7 +53,7 @@ public class AnnotatedQueryIT { @Autowired private AddressRepository addressRepository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class, AuditableEntity.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AuditableIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AuditableIT.java index d09a15bb22e5..8a539413d389 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AuditableIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AuditableIT.java @@ -18,14 +18,13 @@ import com.azure.spring.data.cosmos.repository.repository.AuditableIdGeneratedRepository; import com.azure.spring.data.cosmos.repository.repository.AuditableRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.repository.query.parser.Part; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.time.OffsetDateTime; import java.time.ZoneId; @@ -35,14 +34,14 @@ import java.util.UUID; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class AuditableIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -56,7 +55,7 @@ public class AuditableIT { @Autowired private StubAuditorProvider stubAuditorProvider; - @Before + @BeforeEach public void setup() { collectionManager.ensureContainersCreatedAndEmpty(cosmosTemplate, AuditableEntity.class, AuditableIdGeneratedEntity.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BasicItemRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BasicItemRepositoryIT.java index 583f9f7b6a20..8cc0756773dc 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BasicItemRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BasicItemRepositoryIT.java @@ -12,14 +12,13 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.BasicItemRepository; import org.assertj.core.util.Lists; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.Arrays; @@ -27,12 +26,13 @@ import static com.azure.spring.data.cosmos.common.TestConstants.ID_1; import static com.azure.spring.data.cosmos.common.TestConstants.ID_2; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class BasicItemRepositoryIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -51,7 +51,7 @@ public class BasicItemRepositoryIT { private static final BasicItem BASIC_ITEM_2 = new BasicItem(ID_2); - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); repository.saveAll(Lists.newArrayList(BASIC_ITEM_1, BASIC_ITEM_2)); @@ -61,9 +61,9 @@ public void setUp() { public void testFindAllById() { final Iterable<BasicItem> allById = TestUtils.toList(this.repository.findAllById(Arrays.asList(BASIC_ITEM_1.getId(), BASIC_ITEM_2.getId()))); - Assert.assertTrue(((ArrayList) allById).size() == 2); + Assertions.assertTrue(((ArrayList) allById).size() == 2); Iterator<BasicItem> it = allById.iterator(); - Assert.assertEquals(BASIC_ITEM_1, it.next()); - Assert.assertEquals(BASIC_ITEM_2, it.next()); + assertEquals(BASIC_ITEM_1, it.next()); + assertEquals(BASIC_ITEM_2, it.next()); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BigTypeRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BigTypeRepositoryIT.java index d5f7a23b642a..f6fb2e6c309c 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BigTypeRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BigTypeRepositoryIT.java @@ -3,21 +3,18 @@ package com.azure.spring.data.cosmos.repository.integration; import com.azure.spring.data.cosmos.IntegrationTestCollectionManager; -import com.azure.spring.data.cosmos.common.ResponseDiagnosticsTestUtils; import com.azure.spring.data.cosmos.common.TestUtils; -import com.azure.spring.data.cosmos.config.CosmosConfig; import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.domain.BigType; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.BigTypeRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.math.BigDecimal; import java.math.BigInteger; @@ -25,11 +22,11 @@ import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class BigTypeRepositoryIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -48,7 +45,7 @@ public class BigTypeRepositoryIT { private BigType TEST_BIGTYPES_2 = new BigType("2", "BigType2", bigDecimal2, bigInteger2); - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, BigType.class); repository.saveAll(Lists.newArrayList(TEST_BIGTYPES_1, TEST_BIGTYPES_2)); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CompositeIndexIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CompositeIndexIT.java index e61587d96271..e56206b4bd6f 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CompositeIndexIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CompositeIndexIT.java @@ -15,26 +15,25 @@ import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.repository.support.SimpleCosmosRepository; import com.azure.spring.data.cosmos.repository.support.SimpleReactiveCosmosRepository; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.List; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CompositeIndexIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -45,12 +44,12 @@ public class CompositeIndexIT { CosmosEntityInformation<CompositeIndexEntity, String> information = new CosmosEntityInformation<>(CompositeIndexEntity.class); - @Before + @BeforeEach public void setup() { collectionManager.ensureContainersCreatedAndEmpty(template, CompositeIndexEntity.class); } - @AfterClass + @AfterAll public static void cleanUp() { collectionManager.deleteContainer(new CosmosEntityInformation<>(CompositeIndexEntity.class)); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java index c10af40ed10a..235fee153ec0 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java @@ -10,14 +10,13 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ContactRepository; import org.assertj.core.util.Lists; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.Arrays; @@ -27,8 +26,10 @@ import java.util.concurrent.atomic.AtomicInteger; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertThrows; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ContactRepositoryIT { @@ -41,7 +42,7 @@ public class ContactRepositoryIT { private static final Contact TEST_CONTACT4 = new Contact("testId4", "faketitle4", INT_VALUE_3, true); private static final Contact TEST_CONTACT5 = new Contact("testId5", "faketitle3", INT_VALUE_3, true); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -50,7 +51,7 @@ public class ContactRepositoryIT { @Autowired private CosmosTemplate template; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Contact.class); repository.save(TEST_CONTACT1); @@ -65,7 +66,7 @@ public void testFindAll() { final List<Contact> result = TestUtils.toList(repository.findAll()); assertThat(result.size()).isEqualTo(5); - Assert.assertEquals(Arrays.asList(TEST_CONTACT1, TEST_CONTACT2, TEST_CONTACT3, TEST_CONTACT4, + assertEquals(Arrays.asList(TEST_CONTACT1, TEST_CONTACT2, TEST_CONTACT3, TEST_CONTACT4, TEST_CONTACT5), result); final Contact contact = repository.findById(TEST_CONTACT1.getLogicId()).get(); @@ -108,7 +109,7 @@ public void testCountAndDeleteEntity() { final List<Contact> result = TestUtils.toList(repository.findAll()); assertThat(result.size()).isEqualTo(5); - Assert.assertEquals(Arrays.asList(TEST_CONTACT1, TEST_CONTACT2, TEST_CONTACT3, TEST_CONTACT4, + assertEquals(Arrays.asList(TEST_CONTACT1, TEST_CONTACT2, TEST_CONTACT3, TEST_CONTACT4, TEST_CONTACT5), result); assertThat(result.get(0).getLogicId()).isEqualTo(TEST_CONTACT1.getLogicId()); assertThat(result.get(0).getTitle()).isEqualTo(TEST_CONTACT1.getTitle()); @@ -175,66 +176,68 @@ public void testCustomQuery() { public void testFindById() { final Optional<Contact> optional = repository.findById(TEST_CONTACT1.getLogicId()); - Assert.assertTrue(optional.isPresent()); - Assert.assertEquals(TEST_CONTACT1, optional.get()); - Assert.assertFalse(repository.findById("").isPresent()); + Assertions.assertTrue(optional.isPresent()); + assertEquals(TEST_CONTACT1, optional.get()); + Assertions.assertFalse(repository.findById("").isPresent()); } @Test public void testFindByIdNotFound() { final Optional<Contact> optional = repository.findById("unknown-id"); - Assert.assertFalse(optional.isPresent()); + Assertions.assertFalse(optional.isPresent()); } @Test public void testShouldFindSingleEntity() { final Contact contact = repository.findOneByTitle(TEST_CONTACT1.getTitle()); - Assert.assertEquals(TEST_CONTACT1, contact); + assertEquals(TEST_CONTACT1, contact); } @Test public void testShouldFindSingleOptionalEntity() { final Optional<Contact> contact = repository.findOptionallyByTitle(TEST_CONTACT1.getTitle()); - Assert.assertTrue(contact.isPresent()); - Assert.assertEquals(TEST_CONTACT1, contact.get()); + Assertions.assertTrue(contact.isPresent()); + assertEquals(TEST_CONTACT1, contact.get()); - Assert.assertFalse(repository.findOptionallyByTitle("not here").isPresent()); + Assertions.assertFalse(repository.findOptionallyByTitle("not here").isPresent()); } - @Test(expected = CosmosAccessException.class) + @Test public void testShouldFailIfMultipleResultsReturned() { - repository.save(new Contact("testId2", TEST_CONTACT1.getTitle())); + assertThrows(CosmosAccessException.class, () -> { + repository.save(new Contact("testId2", TEST_CONTACT1.getTitle())); - repository.findOneByTitle(TEST_CONTACT1.getTitle()); + repository.findOneByTitle(TEST_CONTACT1.getTitle()); + }); } @Test public void testShouldAllowListAndIterableResponses() { final List<Contact> contactList = TestUtils.toList(repository.findByTitle(TEST_CONTACT1.getTitle())); - Assert.assertEquals(TEST_CONTACT1, contactList.get(0)); - Assert.assertEquals(1, contactList.size()); + assertEquals(TEST_CONTACT1, contactList.get(0)); + assertEquals(1, contactList.size()); final Iterator<Contact> contactIterator = repository.findByLogicId(TEST_CONTACT1.getLogicId()).iterator(); - Assert.assertTrue(contactIterator.hasNext()); - Assert.assertEquals(TEST_CONTACT1, contactIterator.next()); - Assert.assertFalse(contactIterator.hasNext()); + Assertions.assertTrue(contactIterator.hasNext()); + assertEquals(TEST_CONTACT1, contactIterator.next()); + Assertions.assertFalse(contactIterator.hasNext()); } // @Test // public void testAnnotatedQueries() { // List<Contact> valueContacts = repository.getContactsByTitleAndValue(43, TEST_CONTACT5.getTitle()); -// Assert.assertEquals(1, valueContacts.size()); -// Assert.assertEquals(TEST_CONTACT5, valueContacts.get(0)); +// assertEquals(1, valueContacts.size()); +// assertEquals(TEST_CONTACT5, valueContacts.get(0)); // // List<Contact> contactsWithOffset = repository.getContactsWithOffsetLimit(1, 2); -// Assert.assertEquals(2, contactsWithOffset.size()); -// Assert.assertEquals(TEST_CONTACT2, contactsWithOffset.get(0)); -// Assert.assertEquals(TEST_CONTACT3, contactsWithOffset.get(1)); +// assertEquals(2, contactsWithOffset.size()); +// assertEquals(TEST_CONTACT2, contactsWithOffset.get(0)); +// assertEquals(TEST_CONTACT3, contactsWithOffset.get(1)); // // List<ObjectNode> groupByContacts = repository.selectGroupBy(); -// Assert.assertEquals(3, groupByContacts.size()); +// assertEquals(3, groupByContacts.size()); // } @Test diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CosmosAnnotationIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CosmosAnnotationIT.java index a4311294d30b..360188db8650 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CosmosAnnotationIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CosmosAnnotationIT.java @@ -14,14 +14,12 @@ import com.azure.spring.data.cosmos.domain.TimeToLiveSample; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveRoleRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.util.Assert; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -30,8 +28,9 @@ import java.util.stream.Collectors; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertTrue; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CosmosAnnotationIT { @@ -42,7 +41,7 @@ public class CosmosAnnotationIT { private static final Role TEST_ROLE_3 = new Role(TestConstants.ID_3, true, TestConstants.LEVEL, TestConstants.ROLE_NAME); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -50,7 +49,7 @@ public class CosmosAnnotationIT { @Autowired private ReactiveRoleRepository repository; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { collectionManager.ensureContainersCreatedAndEmpty(cosmosTemplate, Role.class, TimeToLiveSample.class); repository.saveAll(Arrays.asList(TEST_ROLE_1, TEST_ROLE_2, TEST_ROLE_3)).collectList().block(); @@ -119,7 +118,7 @@ public void testTimeToLiveAnnotation() { public void testIndexingPolicyAnnotation() { final IndexingPolicy policy = collectionManager.getContainerProperties(Role.class).getIndexingPolicy(); - Assert.isTrue(policy.getIndexingMode() == TestConstants.INDEXING_POLICY_MODE, + assertTrue(policy.getIndexingMode() == TestConstants.INDEXING_POLICY_MODE, "unmatched collection policy indexing mode of class Role"); TestUtils.testIndexingPolicyPathsEquals(policy.getIncludedPaths() diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CountIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CountIT.java index 5f8211521f1e..bad9cc5bf56e 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CountIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CountIT.java @@ -9,22 +9,21 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ContactRepository; import com.azure.spring.data.cosmos.repository.repository.ReactiveCourseRepository; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Arrays; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CountIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -34,7 +33,7 @@ public class CountIT { @Autowired private CosmosTemplate template; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { collectionManager.ensureContainersCreatedAndEmpty(template, Contact.class, Course.class); } @@ -47,11 +46,11 @@ public void testCountByField() { Contact contact4 = new Contact("4", "other", 30, true); repository.saveAll(Arrays.asList(contact1, contact2, contact3, contact4)); - Assert.assertEquals(3, repository.countByTitle("title")); - Assert.assertEquals(1, repository.countByTitle("other")); + assertEquals(3, repository.countByTitle("title")); + assertEquals(1, repository.countByTitle("other")); - Assert.assertEquals(Long.valueOf(1), repository.countByTitleAndIntValue("title", 25)); - Assert.assertEquals(Long.valueOf(2), repository.countByTitleAndIntValue("title", 30)); + assertEquals(Long.valueOf(1), repository.countByTitleAndIntValue("title", 25)); + assertEquals(Long.valueOf(2), repository.countByTitleAndIntValue("title", 30)); } @Test @@ -61,11 +60,11 @@ public void testCountByQuery() { Contact contact3 = new Contact("3", "different"); repository.saveAll(Arrays.asList(contact1, contact2, contact3)); - Assert.assertEquals(2, repository.countByQueryWithPrimitive("same")); - Assert.assertEquals(1, repository.countByQueryWithPrimitive("different")); + assertEquals(2, repository.countByQueryWithPrimitive("same")); + assertEquals(1, repository.countByQueryWithPrimitive("different")); - Assert.assertEquals(Long.valueOf(2), repository.countByQueryWithNonPrimitive("same")); - Assert.assertEquals(Long.valueOf(1), repository.countByQueryWithNonPrimitive("different")); + assertEquals(Long.valueOf(2), repository.countByQueryWithNonPrimitive("same")); + assertEquals(Long.valueOf(1), repository.countByQueryWithNonPrimitive("different")); } @Test @@ -75,8 +74,8 @@ public void testReactiveCountByField() { Course course3 = new Course("3", "course2", "department"); reactiveRepository.saveAll(Arrays.asList(course1, course2, course3)).blockLast(); - Assert.assertEquals(Long.valueOf(2), reactiveRepository.countByName("course").block()); - Assert.assertEquals(Long.valueOf(1), reactiveRepository.countByName("course2").block()); + assertEquals(Long.valueOf(2), reactiveRepository.countByName("course").block()); + assertEquals(Long.valueOf(1), reactiveRepository.countByName("course2").block()); } @Test @@ -86,8 +85,8 @@ public void testReactiveCountByQuery() { Course course3 = new Course("3", "course2", "department"); reactiveRepository.saveAll(Arrays.asList(course1, course2, course3)).blockLast(); - Assert.assertEquals(Long.valueOf(2), reactiveRepository.countByQuery("course").block()); - Assert.assertEquals(Long.valueOf(1), reactiveRepository.countByQuery("course2").block()); + assertEquals(Long.valueOf(2), reactiveRepository.countByQuery("course").block()); + assertEquals(Long.valueOf(1), reactiveRepository.countByQuery("course2").block()); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CustomerRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CustomerRepositoryIT.java index eea90caa27bf..90a6ed88b5ce 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CustomerRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CustomerRepositoryIT.java @@ -8,23 +8,23 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.CustomerRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.lang.NonNull; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.List; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CustomerRepositoryIT { @@ -50,7 +50,7 @@ public class CustomerRepositoryIT { private static final Customer CUSTOMER_1 = new Customer(CUSTOMER_ID_1, CUSTOMER_LEVEL_1, USER_1); private static final Customer CUSTOMER_2 = new Customer(CUSTOMER_ID_2, CUSTOMER_LEVEL_1, USER_2); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -59,24 +59,24 @@ public class CustomerRepositoryIT { @Autowired private CosmosTemplate template; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Customer.class); this.repository.saveAll(Arrays.asList(CUSTOMER_0, CUSTOMER_1, CUSTOMER_2)); } - @AfterClass + @AfterAll public static void cleanUp() { collectionManager.deleteContainer(new CosmosEntityInformation<>(Customer.class)); } private void assertCustomerListEquals(@NonNull List<Customer> customers, @NonNull List<Customer> reference) { - Assert.assertEquals(reference.size(), customers.size()); + assertEquals(reference.size(), customers.size()); customers.sort(Comparator.comparing(Customer::getId)); reference.sort(Comparator.comparing(Customer::getId)); - Assert.assertEquals(reference, customers); + assertEquals(reference, customers); } @Test @@ -90,7 +90,7 @@ public void testFindByUserAndLevel() { customers = this.repository.findByUser_Name(FAKE_USER_NAME); - Assert.assertFalse(customers.iterator().hasNext()); + Assertions.assertFalse(customers.iterator().hasNext()); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/EtagIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/EtagIT.java index 174f1cb6e5be..defeb6e5f92e 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/EtagIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/EtagIT.java @@ -11,15 +11,14 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.PersonWithEtagRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.List; @@ -32,12 +31,13 @@ import static com.azure.spring.data.cosmos.common.TestConstants.FIRST_NAME; import static com.azure.spring.data.cosmos.common.TestConstants.HOBBIES; import static com.azure.spring.data.cosmos.common.TestConstants.LAST_NAME; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class EtagIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -45,7 +45,7 @@ public class EtagIT { @Autowired PersonWithEtagRepository personWithEtagRepository; - @Before + @BeforeEach public void setup() { collectionManager.ensureContainersCreatedAndEmpty(template, PersonWithEtag.class); } @@ -54,7 +54,7 @@ private static PersonWithEtag createPersonWithEtag() { return new PersonWithEtag(UUID.randomUUID().toString(), FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES); } - @AfterClass + @AfterAll public static void cleanUp() { collectionManager.deleteContainer(new CosmosEntityInformation<>(PersonWithEtag.class)); } @@ -62,17 +62,17 @@ public static void cleanUp() { @Test public void testCrudOperationsShouldApplyEtag() { final PersonWithEtag insertedPersonWithEtag = personWithEtagRepository.save(createPersonWithEtag()); - Assert.assertNotNull(insertedPersonWithEtag.getEtag()); + Assertions.assertNotNull(insertedPersonWithEtag.getEtag()); insertedPersonWithEtag.setFirstName(LAST_NAME); final PersonWithEtag updatedPersonWithEtag = personWithEtagRepository.save(insertedPersonWithEtag); - Assert.assertNotNull(updatedPersonWithEtag.getEtag()); - Assert.assertNotEquals(insertedPersonWithEtag.getEtag(), updatedPersonWithEtag.getEtag()); + Assertions.assertNotNull(updatedPersonWithEtag.getEtag()); + Assertions.assertNotEquals(insertedPersonWithEtag.getEtag(), updatedPersonWithEtag.getEtag()); final Optional<PersonWithEtag> foundPersonWithEtag = personWithEtagRepository.findById(insertedPersonWithEtag.getId()); - Assert.assertTrue(foundPersonWithEtag.isPresent()); - Assert.assertNotNull(foundPersonWithEtag.get().getEtag()); - Assert.assertEquals(updatedPersonWithEtag.getEtag(), foundPersonWithEtag.get().getEtag()); + Assertions.assertTrue(foundPersonWithEtag.isPresent()); + Assertions.assertNotNull(foundPersonWithEtag.get().getEtag()); + assertEquals(updatedPersonWithEtag.getEtag(), foundPersonWithEtag.get().getEtag()); } @Test @@ -82,16 +82,16 @@ public void testCrudListOperationsShouldApplyEtag() { people.add(createPersonWithEtag()); final List<PersonWithEtag> insertedPeople = toList(personWithEtagRepository.saveAll(people)); - insertedPeople.forEach(person -> Assert.assertNotNull(person.getEtag())); + insertedPeople.forEach(person -> Assertions.assertNotNull(person.getEtag())); insertedPeople.forEach(person -> person.setFirstName(LAST_NAME)); final List<PersonWithEtag> updatedPeople = toList(personWithEtagRepository.saveAll(insertedPeople)); for (int i = 0; i < updatedPeople.size(); i++) { PersonWithEtag insertedPersonWithEtag = insertedPeople.get(i); PersonWithEtag updatedPersonWithEtag = updatedPeople.get(i); - Assert.assertEquals(insertedPersonWithEtag.getId(), updatedPersonWithEtag.getId()); - Assert.assertNotNull(updatedPersonWithEtag.getEtag()); - Assert.assertNotEquals(insertedPersonWithEtag.getEtag(), updatedPersonWithEtag.getEtag()); + assertEquals(insertedPersonWithEtag.getId(), updatedPersonWithEtag.getId()); + Assertions.assertNotNull(updatedPersonWithEtag.getEtag()); + Assertions.assertNotEquals(insertedPersonWithEtag.getEtag(), updatedPersonWithEtag.getEtag()); } final List<String> peopleIds = updatedPeople.stream() @@ -101,8 +101,8 @@ public void testCrudListOperationsShouldApplyEtag() { for (int i = 0; i < foundPeople.size(); i++) { PersonWithEtag updatedPersonWithEtag = updatedPeople.get(i); PersonWithEtag foundPersonWithEtag = foundPeople.get(i); - Assert.assertNotNull(foundPersonWithEtag.getEtag()); - Assert.assertEquals(updatedPersonWithEtag.getEtag(), foundPersonWithEtag.getEtag()); + Assertions.assertNotNull(foundPersonWithEtag.getEtag()); + assertEquals(updatedPersonWithEtag.getEtag(), foundPersonWithEtag.getEtag()); } } @@ -121,13 +121,13 @@ public void testShouldFailIfEtagDoesNotMatch() { try { personWithEtagRepository.save(updatedPersonWithEtag); - Assert.fail(); + Assertions.fail(); } catch (CosmosPreconditionFailedException ex) { } try { personWithEtagRepository.delete(updatedPersonWithEtag); - Assert.fail(); + Assertions.fail(); } catch (CosmosPreconditionFailedException ex) { } } @@ -138,7 +138,7 @@ public void testBulkShouldFailIfEtagDoesNotMatch() { people.add(createPersonWithEtag()); final List<PersonWithEtag> insertedPeople = toList(personWithEtagRepository.saveAll(people)); - insertedPeople.forEach(person -> Assert.assertNotNull(person.getEtag())); + insertedPeople.forEach(person -> Assertions.assertNotNull(person.getEtag())); final List<PersonWithEtag> updatedPeople = toList(insertedPeople); updatedPeople.get(0).setFirstName(LAST_NAME); @@ -148,14 +148,14 @@ public void testBulkShouldFailIfEtagDoesNotMatch() { try { List<PersonWithEtag> result = toList(personWithEtagRepository.saveAll(updatedPeopleWithEtag)); - Assert.assertEquals(result.size(), 0); + assertEquals(result.size(), 0); } catch (CosmosAccessException ex) { } try { personWithEtagRepository.deleteAll(updatedPeopleWithEtag); List<PersonWithEtag> result2 = toList(personWithEtagRepository.findAll()); - Assert.assertEquals(result2.size(), 1); + assertEquals(result2.size(), 1); } catch (CosmosAccessException ex) { } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/HierarchicalPartitionKeyRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/HierarchicalPartitionKeyRepositoryIT.java index 8049dd4d5add..2f24e534e1cd 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/HierarchicalPartitionKeyRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/HierarchicalPartitionKeyRepositoryIT.java @@ -11,15 +11,14 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.HierarchicalPartitionKeyRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Arrays; import java.util.List; @@ -27,7 +26,7 @@ import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class HierarchicalPartitionKeyRepositoryIT { @@ -37,7 +36,7 @@ public class HierarchicalPartitionKeyRepositoryIT { private static final HierarchicalPartitionKeyEntity HIERARCHICAL_ENTITY_2 = new HierarchicalPartitionKeyEntity("id_2", "Michael", "Smith", "23456"); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); private static CosmosEntityInformation<HierarchicalPartitionKeyEntity, String> hierarchicalPartitionKeyEntityInformation @@ -49,15 +48,15 @@ public class HierarchicalPartitionKeyRepositoryIT { @Autowired HierarchicalPartitionKeyRepository repository; - @BeforeClass + @BeforeAll public static void init() { } - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, HierarchicalPartitionKeyEntity.class); } - @AfterClass + @AfterAll public static void cleanUp() { collectionManager.deleteContainer(hierarchicalPartitionKeyEntityInformation); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IndexPolicyUpdateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IndexPolicyUpdateIT.java index c1a4287b1b27..3c2c74fc6253 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IndexPolicyUpdateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IndexPolicyUpdateIT.java @@ -16,25 +16,24 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.repository.support.SimpleCosmosRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Collections; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class IndexPolicyUpdateIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -51,7 +50,7 @@ public class IndexPolicyUpdateIT { CosmosEntityInformation<Address, String> addressEntityInformation = new CosmosEntityInformation<>(Address.class); - @Before + @BeforeEach public void setup() { collectionManager.ensureContainersCreatedAndEmpty(template, IndexPolicyEntity.class, ComplexIndexPolicyEntity.class, IndexPolicyOverwriteEntity.class, Address.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IntegerIdDomainRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IntegerIdDomainRepositoryIT.java index b65aa5f73ef9..3240436dbc49 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IntegerIdDomainRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IntegerIdDomainRepositoryIT.java @@ -10,16 +10,15 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.IntegerIdDomainRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Collections; import java.util.Iterator; @@ -29,8 +28,9 @@ import java.util.Set; import java.util.stream.Collectors; import java.util.stream.StreamSupport; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class IntegerIdDomainRepositoryIT { @@ -38,7 +38,7 @@ public class IntegerIdDomainRepositoryIT { private static final String NAME = "panli"; private static final IntegerIdDomain DOMAIN = new IntegerIdDomain(ID, NAME); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -47,7 +47,7 @@ public class IntegerIdDomainRepositoryIT { @Autowired private IntegerIdDomainRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, IntegerIdDomain.class); this.repository.save(DOMAIN); @@ -56,43 +56,44 @@ public void setUp() { @Test public void testIntegerIdDomain() { this.repository.deleteAll(); - Assert.assertFalse(this.repository.findById(ID).isPresent()); + Assertions.assertFalse(this.repository.findById(ID).isPresent()); this.repository.save(DOMAIN); final Optional<IntegerIdDomain> foundOptional = this.repository.findById(ID); - Assert.assertTrue(foundOptional.isPresent()); - Assert.assertEquals(DOMAIN.getNumber(), foundOptional.get().getNumber()); - Assert.assertEquals(DOMAIN.getName(), foundOptional.get().getName()); + Assertions.assertTrue(foundOptional.isPresent()); + assertEquals(DOMAIN.getNumber(), foundOptional.get().getNumber()); + assertEquals(DOMAIN.getName(), foundOptional.get().getName()); this.repository.delete(DOMAIN); - Assert.assertFalse(this.repository.findById(ID).isPresent()); + Assertions.assertFalse(this.repository.findById(ID).isPresent()); } - @Test(expected = IllegalArgumentException.class) + @Test public void testInvalidDomain() { - new CosmosEntityInformation<InvalidDomain, Integer>(InvalidDomain.class); + assertThrows(IllegalArgumentException.class, () -> + new CosmosEntityInformation<InvalidDomain, Integer>(InvalidDomain.class)); } @Test public void testBasicQuery() { final IntegerIdDomain save = this.repository.save(DOMAIN); - Assert.assertNotNull(save); + Assertions.assertNotNull(save); } @Test public void testSaveAndFindById() { - Assert.assertNotNull(this.repository.save(DOMAIN)); + Assertions.assertNotNull(this.repository.save(DOMAIN)); final Optional<IntegerIdDomain> savedEntity = this.repository.findById(DOMAIN.getNumber()); - Assert.assertTrue(savedEntity.isPresent()); - Assert.assertEquals(DOMAIN, savedEntity.get()); + Assertions.assertTrue(savedEntity.isPresent()); + assertEquals(DOMAIN, savedEntity.get()); } @Test public void testSaveAllAndFindAll() { - Assert.assertTrue(this.repository.findAll().iterator().hasNext()); + Assertions.assertTrue(this.repository.findAll().iterator().hasNext()); final Set<IntegerIdDomain> entitiesToSave = Collections.singleton(DOMAIN); this.repository.saveAll(entitiesToSave); @@ -100,58 +101,62 @@ public void testSaveAllAndFindAll() { final Set<IntegerIdDomain> savedEntities = StreamSupport.stream(this.repository.findAll().spliterator(), false) .collect(Collectors.toSet()); - Assert.assertTrue(entitiesToSave.containsAll(savedEntities)); + Assertions.assertTrue(entitiesToSave.containsAll(savedEntities)); } @Test public void testFindAllById() { final Iterable<IntegerIdDomain> allById = this.repository.findAllById(Collections.singleton(DOMAIN.getNumber())); - Assert.assertTrue(allById.iterator().hasNext()); + Assertions.assertTrue(allById.iterator().hasNext()); } @Test public void testCount() { - Assert.assertEquals(1, repository.count()); + assertEquals(1, repository.count()); } @Test public void testDeleteById() { this.repository.save(DOMAIN); this.repository.deleteById(DOMAIN.getNumber()); - Assert.assertEquals(0, this.repository.count()); + assertEquals(0, this.repository.count()); } - @Test(expected = CosmosNotFoundException.class) + @Test public void testDeleteByIdShouldFailIfNothingToDelete() { - this.repository.deleteAll(); - this.repository.deleteById(DOMAIN.getNumber()); + assertThrows(CosmosNotFoundException.class, () -> { + this.repository.deleteAll(); + this.repository.deleteById(DOMAIN.getNumber()); + }); } @Test public void testDelete() { this.repository.save(DOMAIN); this.repository.delete(DOMAIN); - Assert.assertEquals(0, this.repository.count()); + assertEquals(0, this.repository.count()); } - @Test(expected = CosmosNotFoundException.class) + @Test public void testDeleteShouldFailIfNothingToDelete() { - this.repository.deleteAll(); - this.repository.delete(DOMAIN); + assertThrows(CosmosNotFoundException.class, () -> { + this.repository.deleteAll(); + this.repository.delete(DOMAIN); + }); } @Test public void testDeleteAll() { this.repository.save(DOMAIN); this.repository.deleteAll(Collections.singleton(DOMAIN)); - Assert.assertEquals(0, this.repository.count()); + assertEquals(0, this.repository.count()); } @Test public void testExistsById() { this.repository.save(DOMAIN); - Assert.assertTrue(this.repository.existsById(DOMAIN.getNumber())); + Assertions.assertTrue(this.repository.existsById(DOMAIN.getNumber())); } @Test @@ -164,17 +169,17 @@ public void testFindAllSort() { final List<IntegerIdDomain> ascending = StreamSupport .stream(this.repository.findAll(ascSort).spliterator(), false) .collect(Collectors.toList()); - Assert.assertEquals(2, ascending.size()); - Assert.assertEquals(DOMAIN, ascending.get(0)); - Assert.assertEquals(other, ascending.get(1)); + assertEquals(2, ascending.size()); + assertEquals(DOMAIN, ascending.get(0)); + assertEquals(other, ascending.get(1)); final Sort descSort = Sort.by(Sort.Direction.DESC, "number"); final List<IntegerIdDomain> descending = StreamSupport .stream(this.repository.findAll(descSort).spliterator(), false) .collect(Collectors.toList()); - Assert.assertEquals(2, descending.size()); - Assert.assertEquals(other, descending.get(0)); - Assert.assertEquals(DOMAIN, descending.get(1)); + assertEquals(2, descending.size()); + assertEquals(other, descending.get(0)); + assertEquals(DOMAIN, descending.get(1)); } @@ -186,13 +191,13 @@ public void testFindAllPageable() { final Page<IntegerIdDomain> page1 = this.repository.findAll(new CosmosPageRequest(0, 1, null)); final Iterator<IntegerIdDomain> page1Iterator = page1.iterator(); - Assert.assertTrue(page1Iterator.hasNext()); - Assert.assertEquals(DOMAIN, page1Iterator.next()); + Assertions.assertTrue(page1Iterator.hasNext()); + assertEquals(DOMAIN, page1Iterator.next()); final Page<IntegerIdDomain> page2 = this.repository.findAll(new CosmosPageRequest(1, 1, null)); final Iterator<IntegerIdDomain> page2Iterator = page2.iterator(); - Assert.assertTrue(page2Iterator.hasNext()); - Assert.assertEquals(other, page2Iterator.next()); + Assertions.assertTrue(page2Iterator.hasNext()); + assertEquals(other, page2Iterator.next()); } private static class InvalidDomain { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/LongIdDomainRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/LongIdDomainRepositoryIT.java index d3524bbe7d80..9c3c95679394 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/LongIdDomainRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/LongIdDomainRepositoryIT.java @@ -11,16 +11,15 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.LongIdDomainRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.Arrays; @@ -33,8 +32,9 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import java.util.stream.StreamSupport; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class LongIdDomainRepositoryIT { @@ -47,7 +47,7 @@ public class LongIdDomainRepositoryIT { private static final LongIdDomain DOMAIN_1 = new LongIdDomain(ID_1, NAME_1); private static final LongIdDomain DOMAIN_2 = new LongIdDomain(ID_2, NAME_2); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -56,7 +56,7 @@ public class LongIdDomainRepositoryIT { @Autowired private LongIdDomainRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, LongIdDomain.class); this.repository.save(DOMAIN_1); @@ -66,43 +66,44 @@ public void setUp() { @Test public void testLongIdDomain() { this.repository.deleteAll(); - Assert.assertFalse(this.repository.findById(ID_1).isPresent()); + Assertions.assertFalse(this.repository.findById(ID_1).isPresent()); this.repository.save(DOMAIN_1); final Optional<LongIdDomain> foundOptional = this.repository.findById(ID_1); - Assert.assertTrue(foundOptional.isPresent()); - Assert.assertEquals(DOMAIN_1.getNumber(), foundOptional.get().getNumber()); - Assert.assertEquals(DOMAIN_1.getName(), foundOptional.get().getName()); + Assertions.assertTrue(foundOptional.isPresent()); + assertEquals(DOMAIN_1.getNumber(), foundOptional.get().getNumber()); + assertEquals(DOMAIN_1.getName(), foundOptional.get().getName()); this.repository.delete(DOMAIN_1); - Assert.assertFalse(this.repository.findById(ID_1).isPresent()); + Assertions.assertFalse(this.repository.findById(ID_1).isPresent()); } - @Test(expected = IllegalArgumentException.class) + @Test public void testInvalidDomain() { - new CosmosEntityInformation<InvalidDomain, Long>(InvalidDomain.class); + assertThrows(IllegalArgumentException.class, () -> + new CosmosEntityInformation<InvalidDomain, Long>(InvalidDomain.class)); } @Test public void testBasicQuery() { final LongIdDomain save = this.repository.save(DOMAIN_1); - Assert.assertNotNull(save); + Assertions.assertNotNull(save); } @Test public void testSaveAndFindById() { - Assert.assertNotNull(this.repository.save(DOMAIN_1)); + Assertions.assertNotNull(this.repository.save(DOMAIN_1)); final Optional<LongIdDomain> savedEntity = this.repository.findById(DOMAIN_1.getNumber()); - Assert.assertTrue(savedEntity.isPresent()); - Assert.assertEquals(DOMAIN_1, savedEntity.get()); + Assertions.assertTrue(savedEntity.isPresent()); + assertEquals(DOMAIN_1, savedEntity.get()); } @Test public void testSaveAllAndFindAll() { - Assert.assertTrue(this.repository.findAll().iterator().hasNext()); + Assertions.assertTrue(this.repository.findAll().iterator().hasNext()); final Set<LongIdDomain> entitiesToSave = Stream.of(DOMAIN_1, DOMAIN_2).collect(Collectors.toSet()); this.repository.saveAll(entitiesToSave); @@ -110,14 +111,14 @@ public void testSaveAllAndFindAll() { final Set<LongIdDomain> savedEntities = StreamSupport.stream(this.repository.findAll().spliterator(), false) .collect(Collectors.toSet()); - Assert.assertTrue(entitiesToSave.containsAll(savedEntities)); + Assertions.assertTrue(entitiesToSave.containsAll(savedEntities)); } @Test public void testFindAllById() { final Iterable<LongIdDomain> allById = TestUtils.toList(this.repository.findAllById(Arrays.asList(DOMAIN_1.getNumber(), DOMAIN_2.getNumber()))); - Assert.assertTrue(((ArrayList) allById).size() == 2); + Assertions.assertTrue(((ArrayList) allById).size() == 2); Iterator<LongIdDomain> it = allById.iterator(); assertLongIdDomainEquals(Arrays.asList(it.next(), it.next()), Arrays.asList(DOMAIN_1, DOMAIN_2)); } @@ -125,12 +126,12 @@ public void testFindAllById() { private void assertLongIdDomainEquals(List<LongIdDomain> cur, List<LongIdDomain> reference) { cur.sort(Comparator.comparing(LongIdDomain::getNumber)); reference.sort(Comparator.comparing(LongIdDomain::getNumber)); - Assert.assertEquals(reference, cur); + assertEquals(reference, cur); } @Test public void testCount() { - Assert.assertEquals(2, repository.count()); + assertEquals(2, repository.count()); } @Test @@ -139,26 +140,30 @@ public void testDeleteById() { this.repository.save(DOMAIN_2); this.repository.deleteById(DOMAIN_1.getNumber()); this.repository.deleteById(DOMAIN_2.getNumber()); - Assert.assertEquals(0, this.repository.count()); + assertEquals(0, this.repository.count()); } - @Test(expected = CosmosNotFoundException.class) + @Test public void testDeleteByIdShouldFailIfNothingToDelete() { - this.repository.deleteAll(); - this.repository.deleteById(DOMAIN_1.getNumber()); + assertThrows(CosmosNotFoundException.class, () ->{ + this.repository.deleteAll(); + this.repository.deleteById(DOMAIN_1.getNumber()); + }); } @Test public void testDelete() { this.repository.save(DOMAIN_1); this.repository.delete(DOMAIN_1); - Assert.assertEquals(1, this.repository.count()); + assertEquals(1, this.repository.count()); } - @Test(expected = CosmosNotFoundException.class) + @Test public void testDeleteShouldFailIfNothingToDelete() { - this.repository.deleteAll(); - this.repository.delete(DOMAIN_1); + assertThrows(CosmosNotFoundException.class, () ->{ + this.repository.deleteAll(); + this.repository.delete(DOMAIN_1); + }); } @Test @@ -166,13 +171,13 @@ public void testDeleteAll() { this.repository.save(DOMAIN_1); this.repository.save(DOMAIN_2); this.repository.deleteAll(Arrays.asList(DOMAIN_1, DOMAIN_2)); - Assert.assertEquals(0, this.repository.count()); + assertEquals(0, this.repository.count()); } @Test public void testExistsById() { this.repository.save(DOMAIN_1); - Assert.assertTrue(this.repository.existsById(DOMAIN_1.getNumber())); + Assertions.assertTrue(this.repository.existsById(DOMAIN_1.getNumber())); } @Test @@ -185,19 +190,19 @@ public void testFindAllSort() { final List<LongIdDomain> ascending = StreamSupport .stream(this.repository.findAll(ascSort).spliterator(), false) .collect(Collectors.toList()); - Assert.assertEquals(3, ascending.size()); - Assert.assertEquals(DOMAIN_1, ascending.get(0)); - Assert.assertEquals(other, ascending.get(1)); - Assert.assertEquals(DOMAIN_2, ascending.get(2)); + assertEquals(3, ascending.size()); + assertEquals(DOMAIN_1, ascending.get(0)); + assertEquals(other, ascending.get(1)); + assertEquals(DOMAIN_2, ascending.get(2)); final Sort descSort = Sort.by(Sort.Direction.DESC, "number"); final List<LongIdDomain> descending = StreamSupport .stream(this.repository.findAll(descSort).spliterator(), false) .collect(Collectors.toList()); - Assert.assertEquals(3, descending.size()); - Assert.assertEquals(DOMAIN_2, descending.get(0)); - Assert.assertEquals(other, descending.get(1)); - Assert.assertEquals(DOMAIN_1, descending.get(2)); + assertEquals(3, descending.size()); + assertEquals(DOMAIN_2, descending.get(0)); + assertEquals(other, descending.get(1)); + assertEquals(DOMAIN_1, descending.get(2)); } @@ -208,18 +213,18 @@ public void testFindAllPageable() { final Page<LongIdDomain> page1 = this.repository.findAll(new CosmosPageRequest(0, 1, null)); final Iterator<LongIdDomain> page1Iterator = page1.iterator(); - Assert.assertTrue(page1Iterator.hasNext()); - Assert.assertEquals(DOMAIN_1, page1Iterator.next()); + Assertions.assertTrue(page1Iterator.hasNext()); + assertEquals(DOMAIN_1, page1Iterator.next()); final Page<LongIdDomain> page2 = this.repository.findAll(new CosmosPageRequest(1, 1, null)); final Iterator<LongIdDomain> page2Iterator = page2.iterator(); - Assert.assertTrue(page2Iterator.hasNext()); - Assert.assertEquals(DOMAIN_2, page2Iterator.next()); + Assertions.assertTrue(page2Iterator.hasNext()); + assertEquals(DOMAIN_2, page2Iterator.next()); final Page<LongIdDomain> page3 = this.repository.findAll(new CosmosPageRequest(2, 1, null)); final Iterator<LongIdDomain> page3Iterator = page3.iterator(); - Assert.assertTrue(page3Iterator.hasNext()); - Assert.assertEquals(other, page3Iterator.next()); + Assertions.assertTrue(page3Iterator.hasNext()); + assertEquals(other, page3Iterator.next()); } private static class InvalidDomain { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/MemoRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/MemoRepositoryIT.java index a032499c9979..1df8763fec82 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/MemoRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/MemoRepositoryIT.java @@ -11,16 +11,15 @@ import com.azure.spring.data.cosmos.exception.CosmosAccessException; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.MemoRepository; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -31,8 +30,9 @@ import java.util.List; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class MemoRepositoryIT { private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat(TestConstants.DATE_FORMAT); @@ -47,7 +47,7 @@ public class MemoRepositoryIT { private static Memo testMemo2; private static Memo testMemo3; - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -56,7 +56,7 @@ public class MemoRepositoryIT { @Autowired MemoRepository repository; - @BeforeClass + @BeforeAll public static void init() throws ParseException { memoDate = DATE_FORMAT.parse(TestConstants.DATE_STRING); memoDateBefore = DATE_FORMAT.parse(TestConstants.DATE_BEFORE_STRING); @@ -68,7 +68,7 @@ public static void init() throws ParseException { testMemo3 = new Memo(TestConstants.ID_3, TestConstants.NEW_MESSAGE, memoDateAfter, Importance.LOW); } - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Memo.class); repository.saveAll(Arrays.asList(testMemo1, testMemo2, testMemo3)); @@ -108,12 +108,12 @@ private void assertMemoEquals(Memo actual, Memo expected) { public void testFindByBefore() { List<Memo> memos = TestUtils.toList(this.repository.findByDateBefore(memoDateBefore)); - Assert.assertTrue(memos.isEmpty()); + Assertions.assertTrue(memos.isEmpty()); memos = TestUtils.toList(this.repository.findByDateBefore(memoDate)); - Assert.assertEquals(1, memos.size()); - Assert.assertEquals(testMemo1, memos.get(0)); + assertEquals(1, memos.size()); + assertEquals(testMemo1, memos.get(0)); memos = TestUtils.toList(this.repository.findByDateBefore(memoDateAfter)); final List<Memo> reference = Arrays.asList(testMemo1, testMemo2); @@ -121,8 +121,8 @@ public void testFindByBefore() { memos.sort(Comparator.comparing(Memo::getId)); reference.sort(Comparator.comparing(Memo::getId)); - Assert.assertEquals(reference.size(), memos.size()); - Assert.assertEquals(reference, memos); + assertEquals(reference.size(), memos.size()); + assertEquals(reference, memos); } @Test @@ -130,12 +130,12 @@ public void testFindByBeforeWithAndOr() { List<Memo> memos = TestUtils.toList(this.repository.findByDateBeforeAndMessage(memoDate, TestConstants.NEW_MESSAGE)); - Assert.assertTrue(memos.isEmpty()); + Assertions.assertTrue(memos.isEmpty()); memos = TestUtils.toList(this.repository.findByDateBeforeAndMessage(memoDate, TestConstants.MESSAGE)); - Assert.assertEquals(1, memos.size()); - Assert.assertEquals(testMemo1, memos.get(0)); + assertEquals(1, memos.size()); + assertEquals(testMemo1, memos.get(0)); memos = TestUtils.toList(this.repository.findByDateBeforeOrMessage(memoDateAfter, TestConstants.MESSAGE)); final List<Memo> reference = Arrays.asList(testMemo1, testMemo2); @@ -143,20 +143,20 @@ public void testFindByBeforeWithAndOr() { memos.sort(Comparator.comparing(Memo::getId)); reference.sort(Comparator.comparing(Memo::getId)); - Assert.assertEquals(reference.size(), memos.size()); - Assert.assertEquals(reference, memos); + assertEquals(reference.size(), memos.size()); + assertEquals(reference, memos); } @Test public void testFindByAfter() { List<Memo> memos = TestUtils.toList(this.repository.findByDateAfter(memoDateAfter)); - Assert.assertTrue(memos.isEmpty()); + Assertions.assertTrue(memos.isEmpty()); memos = TestUtils.toList(this.repository.findByDateAfter(memoDate)); - Assert.assertEquals(1, memos.size()); - Assert.assertEquals(testMemo3, memos.get(0)); + assertEquals(1, memos.size()); + assertEquals(testMemo3, memos.get(0)); memos = TestUtils.toList(this.repository.findByDateAfter(memoDateBefore)); final List<Memo> reference = Arrays.asList(testMemo2, testMemo3); @@ -164,20 +164,20 @@ public void testFindByAfter() { memos.sort(Comparator.comparing(Memo::getId)); reference.sort(Comparator.comparing(Memo::getId)); - Assert.assertEquals(reference.size(), memos.size()); - Assert.assertEquals(reference, memos); + assertEquals(reference.size(), memos.size()); + assertEquals(reference, memos); } @Test public void testFindByAfterWithAndOr() { List<Memo> memos = TestUtils.toList(this.repository.findByDateAfterAndMessage(memoDate, TestConstants.MESSAGE)); - Assert.assertTrue(memos.isEmpty()); + Assertions.assertTrue(memos.isEmpty()); memos = TestUtils.toList(this.repository.findByDateAfterAndMessage(memoDate, TestConstants.NEW_MESSAGE)); - Assert.assertEquals(1, memos.size()); - Assert.assertEquals(testMemo3, memos.get(0)); + assertEquals(1, memos.size()); + assertEquals(testMemo3, memos.get(0)); memos = TestUtils.toList(this.repository.findByDateAfterOrMessage(memoDateBefore, TestConstants.MESSAGE)); final List<Memo> reference = Arrays.asList(testMemo1, testMemo2, testMemo3); @@ -185,8 +185,8 @@ public void testFindByAfterWithAndOr() { memos.sort(Comparator.comparing(Memo::getId)); reference.sort(Comparator.comparing(Memo::getId)); - Assert.assertEquals(reference.size(), memos.size()); - Assert.assertEquals(reference, memos); + assertEquals(reference.size(), memos.size()); + assertEquals(reference, memos); } @Test @@ -226,22 +226,22 @@ private void assertMemoListEquals(List<Memo> memos, List<Memo> reference) { memos.sort(Comparator.comparing(Memo::getId)); reference.sort(Comparator.comparing(Memo::getId)); - Assert.assertEquals(reference.size(), memos.size()); - Assert.assertEquals(reference, memos); + assertEquals(reference.size(), memos.size()); + assertEquals(reference, memos); } - @Test(expected = CosmosAccessException.class) - @Ignore // TODO(pan): Ignore this test case for now, will update this from service update. + @Test + @Disabled // TODO(pan): Ignore this test case for now, will update this from service update. public void testFindByStartsWithWithException() { - repository.findByMessageStartsWith(testMemo1.getMessage()); + assertThrows(CosmosAccessException.class, () -> repository.findByMessageStartsWith(testMemo1.getMessage())); } @Test public void testFindByStartsWith() { final List<Memo> result = TestUtils.toList(repository.findByMessageStartsWith(testMemo1.getMessage().substring(0, 10))); - Assert.assertEquals(testMemo1, result.get(0)); - Assert.assertEquals(1, result.size()); + assertEquals(testMemo1, result.get(0)); + assertEquals(1, result.size()); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/NestedPartitionKeyRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/NestedPartitionKeyRepositoryIT.java index 331228967015..ee5fc4dad925 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/NestedPartitionKeyRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/NestedPartitionKeyRepositoryIT.java @@ -10,14 +10,13 @@ import com.azure.spring.data.cosmos.domain.NestedPartitionKeyEntityWithGeneratedValue; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.NestedPartitionKeyRepository; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Arrays; import java.util.List; @@ -25,7 +24,7 @@ import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class NestedPartitionKeyRepositoryIT { @@ -35,7 +34,7 @@ public class NestedPartitionKeyRepositoryIT { private static final NestedPartitionKeyEntityWithGeneratedValue NESTED_ENTITY_2 = new NestedPartitionKeyEntityWithGeneratedValue(null, new NestedEntity("partitionKey2")); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -44,10 +43,10 @@ public class NestedPartitionKeyRepositoryIT { @Autowired NestedPartitionKeyRepository repository; - @BeforeClass + @BeforeAll public static void init() { } - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, NestedPartitionKeyEntityWithGeneratedValue.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableAddressRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableAddressRepositoryIT.java index 18707edbe276..249f183af553 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableAddressRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableAddressRepositoryIT.java @@ -14,15 +14,14 @@ import com.azure.spring.data.cosmos.domain.Address; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.PageableAddressRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.data.domain.Page; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.test.StepVerifier; @@ -39,11 +38,11 @@ import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS4_PARTITION3; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class PageableAddressRepositoryIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -58,7 +57,7 @@ public class PageableAddressRepositoryIT { @Autowired private CosmosFactory cosmosFactory; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); repository.save(TEST_ADDRESS1_PARTITION1); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableMemoRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableMemoRepositoryIT.java index 7cf66204ec4e..4bb625fbd45b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableMemoRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableMemoRepositoryIT.java @@ -13,17 +13,16 @@ import com.azure.spring.data.cosmos.domain.PageableMemo; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.PageableMemoRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Slice; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.test.StepVerifier; @@ -38,13 +37,13 @@ import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class PageableMemoRepositoryIT { private static final int TOTAL_CONTENT_SIZE = 500; - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -64,7 +63,7 @@ public class PageableMemoRepositoryIT { private static boolean isSetupDone; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreated(template, PageableMemo.class); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageablePersonRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageablePersonRepositoryIT.java index e28702e04731..ec134cf81533 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageablePersonRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageablePersonRepositoryIT.java @@ -10,15 +10,14 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.PageablePersonRepository; import org.apache.commons.lang3.StringUtils; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.HashSet; @@ -28,14 +27,14 @@ import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class PageablePersonRepositoryIT { private static final int TOTAL_CONTENT_SIZE = 25; public static final int ONE_KB = 1024; - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -48,7 +47,7 @@ public class PageablePersonRepositoryIT { private static boolean isSetupDone; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreated(template, PageablePerson.class); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersistableIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersistableIT.java index d693ee84f421..d9fce23c12c1 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersistableIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersistableIT.java @@ -11,30 +11,27 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.PersistableEntityRepository; import com.azure.spring.data.cosmos.repository.repository.ReactivePersistableEntityRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class PersistableIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -46,11 +43,9 @@ public class PersistableIT { @Autowired private CosmosTemplate template; - @SuppressWarnings("deprecation") - @Rule - public ExpectedException expectedException = ExpectedException.none(); - @Before + + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, PersistableEntity.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersonCrossPartitionIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersonCrossPartitionIT.java index 472807cc2e02..326d62599a71 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersonCrossPartitionIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersonCrossPartitionIT.java @@ -15,16 +15,15 @@ import com.azure.spring.data.cosmos.repository.repository.AuditableRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import org.assertj.core.util.Lists; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.List; @@ -43,11 +42,11 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.data.domain.Sort.Direction.ASC; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class PersonCrossPartitionIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); private static final PersonCrossPartition TEST_PERSON_CP = new PersonCrossPartition(ID_1, FIRST_NAME, LAST_NAME, HOBBIES, @@ -75,7 +74,7 @@ public class PersonCrossPartitionIT { @Autowired private AddressRepository addressRepository; - @Before + @BeforeEach public void setUp() { personCrossPartitionInfo = new CosmosEntityInformation<>(PersonCrossPartition.class); containerName = personCrossPartitionInfo.getContainerName(); @@ -83,7 +82,7 @@ public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(cosmosTemplate, PersonCrossPartition.class); } - @AfterClass + @AfterAll public static void cleanUp() { collectionManager.deleteContainer(personCrossPartitionInfo); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositoryIT.java index 78a1bba4a862..a4acb6f0c4d8 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositoryIT.java @@ -9,15 +9,14 @@ import com.azure.spring.data.cosmos.domain.Project; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ProjectRepository; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.lang.NonNull; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.Arrays; @@ -27,9 +26,10 @@ import java.util.Optional; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ProjectRepositoryIT { @@ -73,7 +73,7 @@ public class ProjectRepositoryIT { private static final List<Project> PROJECTS = Arrays.asList(PROJECT_0, PROJECT_1, PROJECT_2, PROJECT_3, PROJECT_4); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -82,19 +82,19 @@ public class ProjectRepositoryIT { @Autowired private ProjectRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Project.class); this.repository.saveAll(PROJECTS); } private void assertProjectListEquals(@NonNull List<Project> projects, @NonNull List<Project> reference) { - Assert.assertEquals(reference.size(), projects.size()); + assertEquals(reference.size(), projects.size()); projects.sort(Comparator.comparing(Project::getId)); reference.sort(Comparator.comparing(Project::getId)); - Assert.assertEquals(reference, projects); + assertEquals(reference, projects); } @Test @@ -105,7 +105,7 @@ public void testFindByWithAnd() { projects = TestUtils.toList(this.repository.findByNameAndStarCount(NAME_0, STAR_COUNT_1)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(this.repository.findByNameAndStarCount(NAME_0, STAR_COUNT_0)); @@ -120,7 +120,7 @@ public void testFindByWithOr() { projects = TestUtils.toList(this.repository.findByNameOrForkCount(FAKE_NAME, FAKE_COUNT)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(this.repository.findByNameOrForkCount(NAME_0, FORK_COUNT_1)); @@ -135,7 +135,7 @@ public void testFindByWithAndPartition() { projects = TestUtils.toList(this.repository.findByNameAndCreator(NAME_0, CREATOR_1)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(this.repository.findByNameAndCreator(NAME_0, CREATOR_0)); @@ -157,7 +157,7 @@ public void testFindByWithOrPartition() { projects = TestUtils.toList(this.repository.findByNameOrCreator(FAKE_NAME, FAKE_CREATOR)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(this.repository.findByNameOrCreator(NAME_0, CREATOR_1)); @@ -173,7 +173,7 @@ public void testFindByWithAndOr() { projects = TestUtils.toList(repository.findByNameAndCreatorOrForkCount(NAME_1, CREATOR_2, FAKE_COUNT)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByNameAndCreatorOrForkCount(NAME_1, CREATOR_1, FORK_COUNT_2)); @@ -189,7 +189,7 @@ public void testFindByWithOrAnd() { projects = TestUtils.toList(repository.findByNameOrCreatorAndForkCount(FAKE_NAME, CREATOR_1, FORK_COUNT_2)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByNameOrCreatorAndForkCount(NAME_1, CREATOR_2, FORK_COUNT_2)); @@ -205,7 +205,7 @@ public void testFindByWithOrOr() { projects = TestUtils.toList(repository.findByNameOrCreatorOrForkCount(FAKE_NAME, FAKE_CREATOR, FAKE_COUNT)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); } @Test @@ -224,7 +224,7 @@ public void testFindByWithOrAndOr() { projects = TestUtils.toList(repository.findByNameOrCreatorAndForkCountOrStarCount(FAKE_NAME, CREATOR_1, FORK_COUNT_0, FAKE_COUNT)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); } @Test @@ -235,7 +235,7 @@ public void testFindByGreaterThan() { projects = TestUtils.toList(repository.findByForkCountGreaterThan(FAKE_COUNT)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); } @Test @@ -247,7 +247,7 @@ public void testFindByGreaterThanWithAndOr() { projects = TestUtils.toList(repository.findByCreatorAndForkCountGreaterThan(CREATOR_0, FORK_COUNT_1)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByCreatorOrForkCountGreaterThan(CREATOR_0, FORK_COUNT_2)); @@ -258,7 +258,7 @@ public void testFindByGreaterThanWithAndOr() { public void testFindByLessThan() { List<Project> projects = TestUtils.toList(repository.findByStarCountLessThan(STAR_COUNT_0)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByStarCountLessThan(STAR_COUNT_2)); @@ -269,7 +269,7 @@ public void testFindByLessThan() { public void testFindByLessThanEqual() { List<Project> projects = TestUtils.toList(repository.findByForkCountLessThanEqual(STAR_COUNT_MIN)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByForkCountLessThanEqual(STAR_COUNT_2)); @@ -281,7 +281,7 @@ public void testFindByLessThanAndGreaterThan() { List<Project> projects = TestUtils.toList(repository.findByStarCountLessThanAndForkCountGreaterThan(STAR_COUNT_0, FORK_COUNT_3)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByStarCountLessThanAndForkCountGreaterThan(STAR_COUNT_3, FORK_COUNT_0)); @@ -294,7 +294,7 @@ public void testFindByLessThanEqualsAndGreaterThanEquals() { List<Project> projects = TestUtils.toList(repository.findByForkCountLessThanEqualAndStarCountGreaterThan( STAR_COUNT_MIN, FORK_COUNT_0)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByForkCountLessThanEqualAndStarCountGreaterThan(STAR_COUNT_3, FORK_COUNT_0)); @@ -306,7 +306,7 @@ public void testFindByLessThanEqualsAndGreaterThanEquals() { public void testFindByGreaterThanEqual() { List<Project> projects = TestUtils.toList(repository.findByStarCountGreaterThanEqual(STAR_COUNT_MAX)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByStarCountGreaterThanEqual(STAR_COUNT_2)); @@ -318,7 +318,7 @@ public void testFindByGreaterThanEqualAnd() { List<Project> projects = TestUtils.toList(repository .findByForkCountGreaterThanEqualAndCreator(FORK_COUNT_MAX, CREATOR_2)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByForkCountGreaterThanEqualAndCreator(FORK_COUNT_0, CREATOR_0)); @@ -362,9 +362,9 @@ public void findByIdWithPartitionKey() { final Optional<Project> project = repository.findById(PROJECT_0.getId(), new PartitionKey(collectionManager.getEntityInformation(Project.class).getPartitionKeyFieldValue(PROJECT_0))); - Assert.assertTrue(project.isPresent()); + Assertions.assertTrue(project.isPresent()); - Assert.assertEquals(project.get(), PROJECT_0); + assertEquals(project.get(), PROJECT_0); } @Test @@ -372,7 +372,7 @@ public void findByIdWithPartitionKeyNotFound() { final Optional<Project> project = repository.findById("unknown-id", new PartitionKey("unknown-partition-key")); - Assert.assertFalse(project.isPresent()); + Assertions.assertFalse(project.isPresent()); } @@ -380,7 +380,7 @@ public void findByIdWithPartitionKeyNotFound() { public void testFindByIn() { List<Project> projects = TestUtils.toList(repository.findByCreatorIn(Collections.singleton(FAKE_CREATOR))); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByCreatorIn(Arrays.asList(CREATOR_1, CREATOR_2))); @@ -401,7 +401,7 @@ public void testFindByInWithAnd() { CREATOR_1), Arrays.asList(STAR_COUNT_2, STAR_COUNT_3))); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByCreatorInAndStarCountIn(Arrays.asList(CREATOR_0, CREATOR_1), Arrays.asList(STAR_COUNT_0, STAR_COUNT_2))); @@ -438,7 +438,7 @@ public void testFindByNotIn() { List<Project> projects = TestUtils.toList(repository.findByCreatorNotIn( Arrays.asList(CREATOR_0, CREATOR_1, CREATOR_2, CREATOR_3))); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByCreatorNotIn(Arrays.asList(CREATOR_1, CREATOR_2))); @@ -455,7 +455,7 @@ public void testFindByInWithNotIn() { TestUtils.toList(repository.findByCreatorInAndStarCountNotIn(Collections.singletonList(FAKE_CREATOR), Arrays.asList(STAR_COUNT_2, STAR_COUNT_3))); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByCreatorInAndStarCountNotIn(Arrays.asList(CREATOR_0, CREATOR_1), Arrays.asList(STAR_COUNT_0, STAR_COUNT_2))); @@ -473,7 +473,7 @@ public void testFindByInWithNotIn() { public void testFindByNameIsNull() { List<Project> projects = TestUtils.toList(repository.findByNameIsNull()); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); final Project nullNameProject = new Project("id-999", null, CREATOR_0, true, STAR_COUNT_0, FORK_COUNT_0); @@ -495,14 +495,14 @@ public void testFindByNameIsNotNull() { projects = TestUtils.toList(repository.findByNameIsNotNull()); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); } @Test public void testFindByNameIsNullWithAnd() { List<Project> projects = TestUtils.toList(repository.findByNameIsNullAndForkCount(FORK_COUNT_MAX)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); final Project nullNameProject = new Project("id-999", null, CREATOR_0, true, STAR_COUNT_0, FORK_COUNT_0); @@ -523,7 +523,7 @@ public void testFindByNameIsNotNullWithAnd() { this.repository.save(new Project("id-999", null, CREATOR_0, true, STAR_COUNT_0, FORK_COUNT_0)); projects = TestUtils.toList(repository.findByNameIsNotNullAndHasReleased(true)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); } @Test diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositorySortIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositorySortIT.java index 00c5a3a5e514..d4c5e14826af 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositorySortIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositorySortIT.java @@ -11,17 +11,15 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.SortedProjectRepository; import org.assertj.core.util.Lists; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Arrays; import java.util.Comparator; @@ -30,8 +28,9 @@ import java.util.stream.StreamSupport; import static com.azure.spring.data.cosmos.common.PageTestUtils.validateLastPage; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ProjectRepositorySortIT { @@ -79,7 +78,7 @@ public class ProjectRepositorySortIT { private static final List<SortedProject> PROJECTS = Arrays.asList(PROJECT_4, PROJECT_3, PROJECT_2, PROJECT_1, PROJECT_0); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -88,7 +87,7 @@ public class ProjectRepositorySortIT { @Autowired private SortedProjectRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, SortedProject.class); this.repository.saveAll(PROJECTS); @@ -101,8 +100,8 @@ public void testFindAllSortASC() { PROJECTS.sort(Comparator.comparing(SortedProject::getStarCount)); - Assert.assertEquals(PROJECTS.size(), projects.size()); - Assert.assertEquals(PROJECTS, projects); + assertEquals(PROJECTS.size(), projects.size()); + assertEquals(PROJECTS, projects); } @Test @@ -112,8 +111,8 @@ public void testFindAllSortDESC() { PROJECTS.sort(Comparator.comparing(SortedProject::getCreator).reversed()); - Assert.assertEquals(PROJECTS.size(), projects.size()); - Assert.assertEquals(PROJECTS, projects); + assertEquals(PROJECTS.size(), projects.size()); + assertEquals(PROJECTS, projects); } @Test @@ -124,30 +123,36 @@ public void testFindAllUnSorted() { PROJECTS.sort(Comparator.comparing(SortedProject::getId)); projects.sort(Comparator.comparing(SortedProject::getId)); - Assert.assertEquals(PROJECTS.size(), projects.size()); - Assert.assertEquals(PROJECTS, projects); + assertEquals(PROJECTS.size(), projects.size()); + assertEquals(PROJECTS, projects); } - @Test(expected = CosmosBadRequestException.class) + @Test public void testFindAllSortMoreThanOneOrderException() { - final Sort sort = Sort.by(Sort.Direction.ASC, "name", "creator"); + assertThrows(CosmosBadRequestException.class, () -> { + final Sort sort = Sort.by(Sort.Direction.ASC, "name", "creator"); - this.repository.findAll(sort).iterator().next(); + this.repository.findAll(sort).iterator().next(); + }); } - @Test(expected = IllegalArgumentException.class) + @Test public void testFindAllSortIgnoreCaseException() { - final Sort.Order order = Sort.Order.by("name").ignoreCase(); - final Sort sort = Sort.by(order); + assertThrows(IllegalArgumentException.class, () -> { + final Sort.Order order = Sort.Order.by("name").ignoreCase(); + final Sort sort = Sort.by(order); - this.repository.findAll(sort); + this.repository.findAll(sort); + }); } - @Test(expected = CosmosAccessException.class) + @Test public void testFindAllSortMissMatchException() { - final Sort sort = Sort.by(Sort.Direction.ASC, "fake-name"); + assertThrows(CosmosAccessException.class, () -> { + final Sort sort = Sort.by(Sort.Direction.ASC, "fake-name"); - this.repository.findAll(sort).iterator().next(); + this.repository.findAll(sort).iterator().next(); + }); } public void testFindAllSortWithIdName() { @@ -159,7 +164,7 @@ public void testFindAllSortWithIdName() { false) .collect(Collectors.toList()); - Assert.assertEquals(projectListSortedById, results); + assertEquals(projectListSortedById, results); } @Test @@ -171,8 +176,8 @@ public void testFindSortWithOr() { references.sort(Comparator.comparing(SortedProject::getStarCount)); - Assert.assertEquals(references.size(), projects.size()); - Assert.assertEquals(references, projects); + assertEquals(references.size(), projects.size()); + assertEquals(references, projects); } @Test @@ -184,8 +189,8 @@ public void testFindSortWithAnd() { references.sort(Comparator.comparing(SortedProject::getStarCount)); - Assert.assertEquals(references.size(), projects.size()); - Assert.assertEquals(references, projects); + assertEquals(references.size(), projects.size()); + assertEquals(references, projects); } @Test @@ -196,8 +201,8 @@ public void testFindSortWithEqual() { references.sort(Comparator.comparing(SortedProject::getName).reversed()); - Assert.assertEquals(references.size(), projects.size()); - Assert.assertEquals(references, projects); + assertEquals(references.size(), projects.size()); + assertEquals(references, projects); } @Test @@ -210,8 +215,8 @@ public void testFindAllWithPageableAndSort() { final List<SortedProject> references = Arrays.asList(PROJECT_0, PROJECT_1, PROJECT_2, PROJECT_3, PROJECT_4); references.sort(Comparator.comparing(SortedProject::getName).reversed()); - Assert.assertEquals(references.size(), result.getContent().size()); - Assert.assertEquals(references, result.getContent()); + assertEquals(references.size(), result.getContent().size()); + assertEquals(references, result.getContent()); validateLastPage(result, 5); } @@ -226,8 +231,8 @@ public void testFindWithPageableAndSort() { references.sort(Comparator.comparing(SortedProject::getName).reversed()); - Assert.assertEquals(references.size(), result.getContent().size()); - Assert.assertEquals(references, result.getContent()); + assertEquals(references.size(), result.getContent().size()); + assertEquals(references, result.getContent()); validateLastPage(result, 5); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/QuestionRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/QuestionRepositoryIT.java index 36c4e6005318..b3516600469f 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/QuestionRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/QuestionRepositoryIT.java @@ -9,22 +9,22 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.QuestionRepository; import org.assertj.core.util.Lists; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Collections; import java.util.List; import java.util.Optional; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class QuestionRepositoryIT { @@ -36,7 +36,7 @@ public class QuestionRepositoryIT { private static final Question QUESTION = new Question(QUESTION_ID, QUESTION_URL); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -48,7 +48,7 @@ public class QuestionRepositoryIT { @Autowired private ResponseDiagnosticsTestUtils responseDiagnosticsTestUtils; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Question.class); this.repository.save(QUESTION); @@ -58,34 +58,34 @@ public void setUp() { public void testFindById() { final Optional<Question> optional = this.repository.findById(QUESTION_ID); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); - Assert.assertTrue(optional.isPresent()); - Assert.assertEquals(QUESTION, optional.get()); + Assertions.assertTrue(optional.isPresent()); + assertEquals(QUESTION, optional.get()); } @Test public void testFindByIdNull() { final Optional<Question> byId = this.repository.findById(NULL_ID); - Assert.assertFalse(byId.isPresent()); + Assertions.assertFalse(byId.isPresent()); } @Test public void testFindAll() { final List<Question> questions = Lists.newArrayList(this.repository.findAll()); - Assert.assertEquals(Collections.singletonList(QUESTION), questions); + assertEquals(Collections.singletonList(QUESTION), questions); } @Test public void testDelete() { Optional<Question> optional = this.repository.findById(QUESTION_ID); - Assert.assertTrue(optional.isPresent()); - Assert.assertEquals(QUESTION, optional.get()); + Assertions.assertTrue(optional.isPresent()); + assertEquals(QUESTION, optional.get()); this.repository.delete(QUESTION); optional = this.repository.findById(QUESTION_ID); - Assert.assertFalse(optional.isPresent()); + Assertions.assertFalse(optional.isPresent()); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveAuditableIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveAuditableIT.java index 4f3890d341cc..18843d56a619 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveAuditableIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveAuditableIT.java @@ -12,13 +12,12 @@ import com.azure.spring.data.cosmos.repository.repository.ReactiveAuditableIdGeneratedRepository; import com.azure.spring.data.cosmos.repository.repository.ReactiveAuditableRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -30,11 +29,11 @@ import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveAuditableIT { - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -48,7 +47,7 @@ public class ReactiveAuditableIT { @Autowired private StubAuditorProvider stubAuditorProvider; - @Before + @BeforeEach public void setup() { collectionManager.ensureContainersCreatedAndEmpty(template, AuditableEntity.class, AuditableIdGeneratedEntity.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java index 276d5423a7a7..6a980e9de356 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java @@ -19,16 +19,13 @@ import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; -import org.assertj.core.api.Assertions; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -40,8 +37,9 @@ import java.util.concurrent.atomic.AtomicBoolean; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveCourseRepositoryIT { @@ -68,7 +66,7 @@ public class ReactiveCourseRepositoryIT { private static final Course COURSE_4 = new Course(COURSE_ID_4, COURSE_NAME_4, DEPARTMENT_NAME_1); private static final Course COURSE_5 = new Course(COURSE_ID_5, COURSE_NAME_5, DEPARTMENT_NAME_1); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -99,7 +97,7 @@ public class ReactiveCourseRepositoryIT { private static final CosmosPatchItemRequestOptions options = new CosmosPatchItemRequestOptions(); - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Course.class); entityInformation = collectionManager.getEntityInformation(Course.class); @@ -322,7 +320,7 @@ public void testFindByNameAndDepartmentOrNameAndDepartment() { courseResultSet.add(COURSE_1); courseResultSet.add(COURSE_2); StepVerifier.create(findResult).expectNextCount(2).thenConsumeWhile(value -> { - Assertions.assertThat(courseResultSet.contains(value)).isTrue(); + assertThat(courseResultSet.contains(value)).isTrue(); return true; }).verifyComplete(); } @@ -338,9 +336,9 @@ public void testFindByNameOrDepartmentAllIgnoreCase() { public void testFindByNameJsonNode() { final Flux<JsonNode> findResult = repository.annotatedFindByName(COURSE_NAME_1); StepVerifier.create(findResult).consumeNextWith(result -> { - Assert.assertEquals(result.findValue("courseId").asText(), COURSE_1.getCourseId()); - Assert.assertEquals(result.findValue("name").asText(), COURSE_1.getName()); - Assert.assertEquals(result.findValue("department").asText(), COURSE_1.getDepartment()); + assertEquals(result.findValue("courseId").asText(), COURSE_1.getCourseId()); + assertEquals(result.findValue("name").asText(), COURSE_1.getName()); + assertEquals(result.findValue("department").asText(), COURSE_1.getDepartment()); }).verifyComplete(); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryNoMetricsIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryNoMetricsIT.java index 50670aa0fc2b..3212abdcc440 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryNoMetricsIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryNoMetricsIT.java @@ -10,13 +10,12 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryNoMetricsConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveCourseRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.test.StepVerifier; @@ -24,7 +23,7 @@ import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryNoMetricsConfig.class) public class ReactiveCourseRepositoryNoMetricsIT { @@ -40,7 +39,7 @@ public class ReactiveCourseRepositoryNoMetricsIT { private static final Course COURSE_1 = new Course(COURSE_ID_1, COURSE_NAME_1, DEPARTMENT_NAME_1); private static final Course COURSE_2 = new Course(COURSE_ID_2, COURSE_NAME_2, DEPARTMENT_NAME_2); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -57,7 +56,7 @@ public class ReactiveCourseRepositoryNoMetricsIT { private CosmosEntityInformation<Course, ?> entityInformation; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Course.class); entityInformation = collectionManager.getEntityInformation(Course.class); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveEtagIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveEtagIT.java index 098071c630d7..a72042bce9e1 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveEtagIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveEtagIT.java @@ -8,14 +8,13 @@ import com.azure.spring.data.cosmos.exception.CosmosPreconditionFailedException; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveCourseWithEtagRepository; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -27,12 +26,13 @@ import static com.azure.spring.data.cosmos.common.TestConstants.COURSE_NAME; import static com.azure.spring.data.cosmos.common.TestConstants.DEPARTMENT; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveEtagIT { - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -40,7 +40,7 @@ public class ReactiveEtagIT { @Autowired ReactiveCourseWithEtagRepository reactiveCourseWithEtagRepository; - @Before + @BeforeEach public void setup() { collectionManager.ensureContainersCreatedAndEmpty(template, CourseWithEtag.class); } @@ -54,23 +54,23 @@ public void testCrudOperationsShouldApplyEtag() { final Mono<CourseWithEtag> insertedCourseWithEtagMono = reactiveCourseWithEtagRepository.save(createCourseWithEtag()); CourseWithEtag insertedCourseWithEtag = insertedCourseWithEtagMono.block(); - Assert.assertNotNull(insertedCourseWithEtag); - Assert.assertNotNull(insertedCourseWithEtag.getEtag()); + Assertions.assertNotNull(insertedCourseWithEtag); + Assertions.assertNotNull(insertedCourseWithEtag.getEtag()); insertedCourseWithEtag.setName("CHANGED"); final Mono<CourseWithEtag> updatedCourseWithEtagMono = reactiveCourseWithEtagRepository.save(insertedCourseWithEtag); CourseWithEtag updatedCourseWithEtag = updatedCourseWithEtagMono.block(); - Assert.assertNotNull(updatedCourseWithEtag); - Assert.assertNotNull(updatedCourseWithEtag.getEtag()); - Assert.assertNotEquals(updatedCourseWithEtag.getEtag(), insertedCourseWithEtag.getEtag()); + Assertions.assertNotNull(updatedCourseWithEtag); + Assertions.assertNotNull(updatedCourseWithEtag.getEtag()); + Assertions.assertNotEquals(updatedCourseWithEtag.getEtag(), insertedCourseWithEtag.getEtag()); final Mono<CourseWithEtag> foundCourseWithEtagMono = reactiveCourseWithEtagRepository.findById(insertedCourseWithEtag.getCourseId()); CourseWithEtag foundCourseWithEtag = foundCourseWithEtagMono.block(); - Assert.assertNotNull(foundCourseWithEtag); - Assert.assertNotNull(foundCourseWithEtag.getEtag()); - Assert.assertEquals(foundCourseWithEtag.getEtag(), updatedCourseWithEtag.getEtag()); + Assertions.assertNotNull(foundCourseWithEtag); + Assertions.assertNotNull(foundCourseWithEtag.getEtag()); + assertEquals(foundCourseWithEtag.getEtag(), updatedCourseWithEtag.getEtag()); } @Test @@ -82,15 +82,15 @@ public void testCrudListOperationsShouldApplyEtag() { final Flux<CourseWithEtag> insertedCourseWithEtagsFlux = reactiveCourseWithEtagRepository.saveAll(courses); List<CourseWithEtag> insertedCourseWithEtags = insertedCourseWithEtagsFlux.collectList().block(); - Assert.assertNotNull(insertedCourseWithEtags); - insertedCourseWithEtags.forEach(course -> Assert.assertNotNull(course.getEtag())); + Assertions.assertNotNull(insertedCourseWithEtags); + insertedCourseWithEtags.forEach(course -> Assertions.assertNotNull(course.getEtag())); insertedCourseWithEtags.forEach(course -> course.setName("CHANGED")); final Flux<CourseWithEtag> updatedCourseWithEtagsFlux = reactiveCourseWithEtagRepository.saveAll(insertedCourseWithEtags); List<CourseWithEtag> updatedCourseWithEtags = updatedCourseWithEtagsFlux.collectList().block(); - Assert.assertNotNull(updatedCourseWithEtags); + Assertions.assertNotNull(updatedCourseWithEtags); insertedCourseWithEtags.sort(Comparator.comparing(CourseWithEtag::getCourseId)); updatedCourseWithEtags.sort(Comparator.comparing(CourseWithEtag::getCourseId)); @@ -98,9 +98,9 @@ public void testCrudListOperationsShouldApplyEtag() { for (int i = 0; i < updatedCourseWithEtags.size(); i++) { CourseWithEtag insertedCourseWithEtag = insertedCourseWithEtags.get(i); CourseWithEtag updatedCourseWithEtag = updatedCourseWithEtags.get(i); - Assert.assertEquals(insertedCourseWithEtag.getCourseId(), updatedCourseWithEtag.getCourseId()); - Assert.assertNotNull(updatedCourseWithEtag.getEtag()); - Assert.assertNotEquals(insertedCourseWithEtag.getEtag(), updatedCourseWithEtag.getEtag()); + assertEquals(insertedCourseWithEtag.getCourseId(), updatedCourseWithEtag.getCourseId()); + Assertions.assertNotNull(updatedCourseWithEtag.getEtag()); + Assertions.assertNotEquals(insertedCourseWithEtag.getEtag(), updatedCourseWithEtag.getEtag()); } } @@ -108,12 +108,12 @@ public void testCrudListOperationsShouldApplyEtag() { public void testShouldFailIfEtagDoesNotMatch() { Mono<CourseWithEtag> insertedCourseWithEtagMono = reactiveCourseWithEtagRepository.save(createCourseWithEtag()); CourseWithEtag insertedCourseWithEtag = insertedCourseWithEtagMono.block(); - Assert.assertNotNull(insertedCourseWithEtag); + Assertions.assertNotNull(insertedCourseWithEtag); insertedCourseWithEtag.setName("CHANGED"); Mono<CourseWithEtag> updatedCourseWithEtagMono = reactiveCourseWithEtagRepository.save(insertedCourseWithEtag); CourseWithEtag updatedCourseWithEtag = updatedCourseWithEtagMono.block(); - Assert.assertNotNull(updatedCourseWithEtag); + Assertions.assertNotNull(updatedCourseWithEtag); updatedCourseWithEtag.setEtag(insertedCourseWithEtag.getEtag()); @@ -128,23 +128,23 @@ public void testShouldFailIfEtagDoesNotMatch() { public void testBulkShouldFailIfEtagDoesNotMatch() { Flux<CourseWithEtag> insertedCourseWithEtagFlux = reactiveCourseWithEtagRepository.saveAll(Flux.just(createCourseWithEtag())); List<CourseWithEtag> insertedCourseWithEtag = insertedCourseWithEtagFlux.collectList().block(); - Assert.assertEquals(insertedCourseWithEtag.size(), 1); + assertEquals(insertedCourseWithEtag.size(), 1); insertedCourseWithEtag.get(0).setName("CHANGED"); Flux<CourseWithEtag> updatedCourseWithEtagFlux = reactiveCourseWithEtagRepository.saveAll(insertedCourseWithEtag); List<CourseWithEtag> updatedCourseWithEtag = updatedCourseWithEtagFlux.collectList().block(); - Assert.assertEquals(updatedCourseWithEtag.size(), 1); + assertEquals(updatedCourseWithEtag.size(), 1); updatedCourseWithEtag.get(0).setEtag(insertedCourseWithEtag.get(0).getEtag()); Flux<CourseWithEtag> courseFlux = reactiveCourseWithEtagRepository.saveAll(updatedCourseWithEtag); StepVerifier.create(courseFlux); - Assert.assertEquals(courseFlux.collectList().block().size(), 0); + assertEquals(courseFlux.collectList().block().size(), 0); reactiveCourseWithEtagRepository.deleteAll(updatedCourseWithEtag); Flux<CourseWithEtag> courseFlux2 = reactiveCourseWithEtagRepository.findAll(); StepVerifier.create(courseFlux2); - Assert.assertEquals(courseFlux2.collectList().block().size(), 1); + assertEquals(courseFlux2.collectList().block().size(), 1); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveHierarchicalPartitionKeyRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveHierarchicalPartitionKeyRepositoryIT.java index 1a2ce6c59280..c2445f7a4e15 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveHierarchicalPartitionKeyRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveHierarchicalPartitionKeyRepositoryIT.java @@ -10,15 +10,14 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveHierarchicalPartitionKeyRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -26,9 +25,9 @@ import java.util.Arrays; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveHierarchicalPartitionKeyRepositoryIT { @@ -38,7 +37,7 @@ public class ReactiveHierarchicalPartitionKeyRepositoryIT { private static final HierarchicalPartitionKeyEntity HIERARCHICAL_ENTITY_2 = new HierarchicalPartitionKeyEntity("id_2", "Michael", "Smith", "23456"); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); private static CosmosEntityInformation<HierarchicalPartitionKeyEntity, String> hierarchicalPartitionKeyEntityInformation @@ -50,15 +49,15 @@ public class ReactiveHierarchicalPartitionKeyRepositoryIT { @Autowired ReactiveHierarchicalPartitionKeyRepository repository; - @BeforeClass + @BeforeAll public static void init() { } - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(reactiveTemplate, HierarchicalPartitionKeyEntity.class); } - @AfterClass + @AfterAll public static void cleanUp() { collectionManager.deleteContainer(hierarchicalPartitionKeyEntityInformation); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveIndexPolicyUpdateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveIndexPolicyUpdateIT.java index c40a9d9304d3..bcd15dfa3f0b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveIndexPolicyUpdateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveIndexPolicyUpdateIT.java @@ -16,25 +16,24 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.repository.support.SimpleReactiveCosmosRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Collections; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveIndexPolicyUpdateIT { - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -51,7 +50,7 @@ public class ReactiveIndexPolicyUpdateIT { CosmosEntityInformation<Address, String> addressEntityInformation = new CosmosEntityInformation<>(Address.class); - @Before + @BeforeEach public void setup() { collectionManager.ensureContainersCreatedAndEmpty(template, IndexPolicyEntity.class, ComplexIndexPolicyEntity.class, IndexPolicyOverwriteEntity.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveLongIdDomainPartitionPartitionRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveLongIdDomainPartitionPartitionRepositoryIT.java index c5bef428dbac..e6fe821d1ef0 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveLongIdDomainPartitionPartitionRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveLongIdDomainPartitionPartitionRepositoryIT.java @@ -10,14 +10,13 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveLongIdDomainPartitionRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -25,7 +24,9 @@ import java.util.Arrays; import java.util.Objects; -@RunWith(SpringJUnit4ClassRunner.class) +import static org.junit.jupiter.api.Assertions.assertThrows; + +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveLongIdDomainPartitionPartitionRepositoryIT { @@ -41,7 +42,7 @@ public class ReactiveLongIdDomainPartitionPartitionRepositoryIT { private static final LongIdDomainPartition DOMAIN_2 = new LongIdDomainPartition(ID_2, NAME_2); private static final LongIdDomainPartition DOMAIN_3 = new LongIdDomainPartition(ID_3, NAME_1); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -52,7 +53,7 @@ public class ReactiveLongIdDomainPartitionPartitionRepositoryIT { private CosmosEntityInformation<LongIdDomainPartition, ?> entityInformation; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, LongIdDomainPartition.class); entityInformation = collectionManager.getEntityInformation(LongIdDomainPartition.class); @@ -84,9 +85,10 @@ public void testLongIdDomainPartition() { StepVerifier.create(afterDelIdMono).expectNextCount(0).verifyComplete(); } - @Test(expected = IllegalArgumentException.class) + @Test public void testInvalidDomain() { - new CosmosEntityInformation<InvalidDomain, Long>(InvalidDomain.class); + assertThrows(IllegalArgumentException.class, () -> + new CosmosEntityInformation<InvalidDomain, Long>(InvalidDomain.class)); } @Test diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveNestedPartitionKeyRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveNestedPartitionKeyRepositoryIT.java index 09e676d1b0fa..1c34677beb82 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveNestedPartitionKeyRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveNestedPartitionKeyRepositoryIT.java @@ -9,14 +9,13 @@ import com.azure.spring.data.cosmos.domain.NestedPartitionKeyEntity; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveNestedPartitionKeyRepository; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -27,7 +26,7 @@ import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveNestedPartitionKeyRepositoryIT { @@ -37,7 +36,7 @@ public class ReactiveNestedPartitionKeyRepositoryIT { private static final NestedPartitionKeyEntity NESTED_ENTITY_2 = new NestedPartitionKeyEntity(null, new NestedEntity("partitionKey2")); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -46,10 +45,10 @@ public class ReactiveNestedPartitionKeyRepositoryIT { @Autowired ReactiveNestedPartitionKeyRepository repository; - @BeforeClass + @BeforeAll public static void init() { } - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, NestedPartitionKeyEntity.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveRoleRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveRoleRepositoryIT.java index add0b943acd4..af4364dfeefb 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveRoleRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveRoleRepositoryIT.java @@ -8,14 +8,13 @@ import com.azure.spring.data.cosmos.domain.Role; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveRoleRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -25,7 +24,7 @@ import java.util.List; import java.util.Optional; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveRoleRepositoryIT { @@ -41,7 +40,7 @@ public class ReactiveRoleRepositoryIT { private static final Role TEST_ROLE_5 = new Role(TestConstants.ID_5, true, TestConstants.ROLE_NAME_2, TestConstants.LEVEL_2); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -49,7 +48,7 @@ public class ReactiveRoleRepositoryIT { @Autowired private ReactiveRoleRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Role.class); final Flux<Role> savedFlux = repository.saveAll(Arrays.asList(TEST_ROLE_1, TEST_ROLE_2, TEST_ROLE_3, TEST_ROLE_4)); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveTeacherRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveTeacherRepositoryIT.java index f9cd828a8aff..b6b9e2bc3a18 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveTeacherRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveTeacherRepositoryIT.java @@ -8,14 +8,13 @@ import com.azure.spring.data.cosmos.domain.ReactiveTeacher; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveTeacherRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -24,7 +23,7 @@ import java.util.Arrays; import java.util.List; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveTeacherRepositoryIT { @@ -48,7 +47,7 @@ public class ReactiveTeacherRepositoryIT { private static final ReactiveTeacher TEACHER_3 = new ReactiveTeacher(TEACHER_ID_3, TEACHER_FIRST_NAME_2, DEPARTMENT_LAST_NAME_1); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -57,7 +56,7 @@ public class ReactiveTeacherRepositoryIT { @Autowired private ReactiveTeacherRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, ReactiveTeacher.class); final Flux<ReactiveTeacher> savedFlux = repository.saveAll(Arrays.asList(TEACHER_1)); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosAnnotationIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosAnnotationIT.java index 9505ca395342..0e02f5118d3b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosAnnotationIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosAnnotationIT.java @@ -9,22 +9,21 @@ import com.azure.spring.data.cosmos.domain.SpELPropertyStudent; import com.azure.spring.data.cosmos.repository.TestRepositorySpELConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositorySpELConfig.class) public class SpELCosmosAnnotationIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); private static final SpELPropertyStudent TEST_PROPERTY_STUDENT = new SpELPropertyStudent(TestConstants.ID_1, @@ -33,7 +32,7 @@ public class SpELCosmosAnnotationIT { @Autowired private CosmosTemplate cosmosTemplate; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(cosmosTemplate, SpELPropertyStudent.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SquareRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SquareRepositoryIT.java index f4cf427b14b9..fe43f90246df 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SquareRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SquareRepositoryIT.java @@ -8,26 +8,25 @@ import com.azure.spring.data.cosmos.domain.inheritance.Square; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.SquareRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.List; import java.util.Optional; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class SquareRepositoryIT { private Square square1 = new Square("id_1", 1, 1); private Square square2 = new Square("id_2", 2, 4); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -36,7 +35,7 @@ public class SquareRepositoryIT { @Autowired private SquareRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Square.class); repository.save(square1); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/StudentRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/StudentRepositoryIT.java index f0c714da7a29..4c2dfa21c0b1 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/StudentRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/StudentRepositoryIT.java @@ -9,24 +9,23 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.StudentRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Arrays; import java.util.Comparator; import java.util.List; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class StudentRepositoryIT { public static final String ID_0 = "id-0"; @@ -59,7 +58,7 @@ public class StudentRepositoryIT { private static final List<Student> PEOPLE = Arrays.asList(STUDENT_0, STUDENT_1, STUDENT_2, STUDENT_3, STUDENT_4, STUDENT_5); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -68,13 +67,13 @@ public class StudentRepositoryIT { @Autowired private StudentRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Student.class); this.repository.saveAll(PEOPLE); } - @AfterClass + @AfterAll public static void teardown() { collectionManager.deleteContainer(new CosmosEntityInformation<>(Student.class)); } @@ -156,7 +155,7 @@ private void assertPeopleEquals(List<Student> people, List<Student> reference) { people.sort(Comparator.comparing(Student::getId)); reference.sort(Comparator.comparing(Student::getId)); - Assert.assertEquals(reference, people); + assertEquals(reference, people); } @Test diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/TeacherRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/TeacherRepositoryIT.java index 7dfbdd764de8..ccff01a0f465 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/TeacherRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/TeacherRepositoryIT.java @@ -9,24 +9,23 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.TeacherRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.After; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Optional; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class TeacherRepositoryIT { public static final String ID_0 = "id-0"; @@ -37,7 +36,7 @@ public class TeacherRepositoryIT { private static final Teacher TEACHER_0 = new Teacher(ID_0, FIRST_NAME_0, LAST_NAME_0); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -46,13 +45,13 @@ public class TeacherRepositoryIT { @Autowired private TeacherRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Teacher.class); this.repository.save(TEACHER_0); } - @After + @AfterEach public void teardown() { collectionManager.deleteContainer(new CosmosEntityInformation<>(Teacher.class)); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UUIDIdDomainRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UUIDIdDomainRepositoryIT.java index 89cc50b85d40..e61ac65bf20b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UUIDIdDomainRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UUIDIdDomainRepositoryIT.java @@ -10,14 +10,13 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.UUIDIdDomainRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.Arrays; @@ -31,8 +30,9 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import java.util.stream.StreamSupport; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class UUIDIdDomainRepositoryIT { @@ -45,7 +45,7 @@ public class UUIDIdDomainRepositoryIT { private static final UUIDIdDomain DOMAIN_1 = new UUIDIdDomain(ID_1, NAME_1); private static final UUIDIdDomain DOMAIN_2 = new UUIDIdDomain(ID_2, NAME_2); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -54,7 +54,7 @@ public class UUIDIdDomainRepositoryIT { @Autowired private UUIDIdDomainRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, UUIDIdDomain.class); this.repository.save(DOMAIN_1); @@ -64,43 +64,45 @@ public void setUp() { @Test public void testUUIDIdDomain() { this.repository.deleteAll(); - Assert.assertFalse(this.repository.findById(ID_1).isPresent()); + Assertions.assertFalse(this.repository.findById(ID_1).isPresent()); this.repository.save(DOMAIN_1); final Optional<UUIDIdDomain> foundOptional = this.repository.findById(ID_1); - Assert.assertTrue(foundOptional.isPresent()); - Assert.assertEquals(DOMAIN_1.getNumber(), foundOptional.get().getNumber()); - Assert.assertEquals(DOMAIN_1.getName(), foundOptional.get().getName()); + Assertions.assertTrue(foundOptional.isPresent()); + assertEquals(DOMAIN_1.getNumber(), foundOptional.get().getNumber()); + assertEquals(DOMAIN_1.getName(), foundOptional.get().getName()); this.repository.delete(DOMAIN_1); - Assert.assertFalse(this.repository.findById(ID_1).isPresent()); + Assertions.assertFalse(this.repository.findById(ID_1).isPresent()); } - @Test(expected = IllegalArgumentException.class) + @Test public void testInvalidDomain() { - new CosmosEntityInformation<InvalidDomain, UUID>(InvalidDomain.class); + assertThrows(IllegalArgumentException.class, () -> + new CosmosEntityInformation<InvalidDomain, UUID>(InvalidDomain.class)); + } @Test public void testBasicQuery() { final UUIDIdDomain save = this.repository.save(DOMAIN_1); - Assert.assertNotNull(save); + Assertions.assertNotNull(save); } @Test public void testSaveAndFindById() { - Assert.assertNotNull(this.repository.save(DOMAIN_1)); + Assertions.assertNotNull(this.repository.save(DOMAIN_1)); final Optional<UUIDIdDomain> savedEntity = this.repository.findById(DOMAIN_1.getNumber()); - Assert.assertTrue(savedEntity.isPresent()); - Assert.assertEquals(DOMAIN_1, savedEntity.get()); + Assertions.assertTrue(savedEntity.isPresent()); + assertEquals(DOMAIN_1, savedEntity.get()); } @Test public void testSaveAllAndFindAll() { - Assert.assertTrue(this.repository.findAll().iterator().hasNext()); + Assertions.assertTrue(this.repository.findAll().iterator().hasNext()); final Set<UUIDIdDomain> entitiesToSave = Stream.of(DOMAIN_1, DOMAIN_2).collect(Collectors.toSet()); this.repository.saveAll(entitiesToSave); @@ -108,14 +110,14 @@ public void testSaveAllAndFindAll() { final Set<UUIDIdDomain> savedEntities = StreamSupport.stream(this.repository.findAll().spliterator(), false) .collect(Collectors.toSet()); - Assert.assertTrue(entitiesToSave.containsAll(savedEntities)); + Assertions.assertTrue(entitiesToSave.containsAll(savedEntities)); } @Test public void testFindAllById() { final Iterable<UUIDIdDomain> allById = TestUtils.toList(this.repository.findAllById(Arrays.asList(DOMAIN_1.getNumber(), DOMAIN_2.getNumber()))); - Assert.assertTrue(((ArrayList) allById).size() == 2); + Assertions.assertTrue(((ArrayList) allById).size() == 2); Iterator<UUIDIdDomain> it = allById.iterator(); assertUUIDIdDomainEquals(Arrays.asList(it.next(), it.next()), Arrays.asList(DOMAIN_1, DOMAIN_2)); } @@ -123,12 +125,12 @@ public void testFindAllById() { private void assertUUIDIdDomainEquals(List<UUIDIdDomain> cur, List<UUIDIdDomain> reference) { cur.sort(Comparator.comparing(UUIDIdDomain::getNumber)); reference.sort(Comparator.comparing(UUIDIdDomain::getNumber)); - Assert.assertEquals(reference, cur); + assertEquals(reference, cur); } @Test public void testCount() { - Assert.assertEquals(2, repository.count()); + assertEquals(2, repository.count()); } @Test @@ -137,26 +139,30 @@ public void testDeleteById() { this.repository.save(DOMAIN_2); this.repository.deleteById(DOMAIN_1.getNumber()); this.repository.deleteById(DOMAIN_2.getNumber()); - Assert.assertEquals(0, this.repository.count()); + assertEquals(0, this.repository.count()); } - @Test(expected = CosmosNotFoundException.class) + @Test public void testDeleteByIdShouldFailIfNothingToDelete() { - this.repository.deleteAll(); - this.repository.deleteById(DOMAIN_1.getNumber()); + assertThrows(CosmosNotFoundException.class, () -> { + this.repository.deleteAll(); + this.repository.deleteById(DOMAIN_1.getNumber()); + }); } @Test public void testDelete() { this.repository.save(DOMAIN_1); this.repository.delete(DOMAIN_1); - Assert.assertEquals(1, this.repository.count()); + assertEquals(1, this.repository.count()); } - @Test(expected = CosmosNotFoundException.class) + @Test public void testDeleteShouldFailIfNothingToDelete() { - this.repository.deleteAll(); - this.repository.delete(DOMAIN_1); + assertThrows(CosmosNotFoundException.class, () -> { + this.repository.deleteAll(); + this.repository.delete(DOMAIN_1); + }); } @Test @@ -164,13 +170,13 @@ public void testDeleteAll() { this.repository.save(DOMAIN_1); this.repository.save(DOMAIN_2); this.repository.deleteAll(Arrays.asList(DOMAIN_1, DOMAIN_2)); - Assert.assertEquals(0, this.repository.count()); + assertEquals(0, this.repository.count()); } @Test public void testExistsById() { this.repository.save(DOMAIN_1); - Assert.assertTrue(this.repository.existsById(DOMAIN_1.getNumber())); + Assertions.assertTrue(this.repository.existsById(DOMAIN_1.getNumber())); } private static class InvalidDomain { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UniqueKeyPolicyIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UniqueKeyPolicyIT.java index 728ee227e207..0d7e9314d18d 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UniqueKeyPolicyIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UniqueKeyPolicyIT.java @@ -19,14 +19,13 @@ import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.repository.support.SimpleCosmosRepository; import com.azure.spring.data.cosmos.repository.support.SimpleReactiveCosmosRepository; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Arrays; import java.util.List; @@ -34,11 +33,11 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class UniqueKeyPolicyIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); private static final UniqueKeyPolicyEntity ENTITY_1 = new UniqueKeyPolicyEntity("id-1", "firstName-1", "lastName" @@ -64,13 +63,13 @@ public class UniqueKeyPolicyIT { private static CosmosEntityInformation<UniqueKeyPolicyEntity, String> information = new CosmosEntityInformation<>(UniqueKeyPolicyEntity.class); - @Before + @BeforeEach public void setup() { collectionManager.ensureContainersCreatedAndEmpty(template, CompositeIndexEntity.class); repository.saveAll(Arrays.asList(ENTITY_1, ENTITY_2, ENTITY_3, ENTITY_4, ENTITY_5)); } - @AfterClass + @AfterAll public static void teardown() { collectionManager.deleteContainer(information); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQueryUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQueryUnitTest.java index 33002512f898..4ec575c3c086 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQueryUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQueryUnitTest.java @@ -5,15 +5,15 @@ import com.azure.spring.data.cosmos.core.CosmosOperations; import com.azure.spring.data.cosmos.core.query.CosmosPageRequest; import com.azure.spring.data.cosmos.core.query.CosmosQuery; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.util.Assert; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class AbstractCosmosQueryUnitTest { @Mock diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQueryUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQueryUnitTest.java index f64a20601134..b41dfcefd1c9 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQueryUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQueryUnitTest.java @@ -4,16 +4,16 @@ import com.azure.spring.data.cosmos.core.ReactiveCosmosOperations; import com.azure.spring.data.cosmos.core.query.CosmosQuery; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; import org.springframework.util.Assert; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class AbstractReactiveCosmosQueryUnitTest { @Mock diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformationUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformationUnitTest.java index 555a2383ab22..26600cd8e61d 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformationUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformationUnitTest.java @@ -10,7 +10,7 @@ import com.azure.spring.data.cosmos.domain.Person; import com.azure.spring.data.cosmos.domain.Student; import com.azure.spring.data.cosmos.domain.UUIDIdDomain; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Version; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryBeanUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryBeanUnitTest.java index 01d75b321d39..b64a27070728 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryBeanUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryBeanUnitTest.java @@ -4,15 +4,15 @@ import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.repository.repository.PersonRepository; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.data.repository.core.support.RepositoryFactorySupport; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class CosmosRepositoryFactoryBeanUnitTest { @Mock diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryUnitTest.java index 4b58b716e4df..68175a6338e9 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryUnitTest.java @@ -4,15 +4,15 @@ import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.domain.Person; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.data.repository.core.EntityInformation; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class CosmosRepositoryFactoryUnitTest { @Mock diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/StringBasedCosmosQueryUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/StringBasedCosmosQueryUnitTest.java index 84e09b749ccc..081296b18a7e 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/StringBasedCosmosQueryUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/StringBasedCosmosQueryUnitTest.java @@ -4,17 +4,17 @@ import com.azure.spring.data.cosmos.core.CosmosOperations; import com.azure.spring.data.cosmos.repository.query.CosmosQueryMethod; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class StringBasedCosmosQueryUnitTest { @Mock CosmosQueryMethod cosmosQueryMethod; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/StringBasedReactiveCosmosQueryUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/StringBasedReactiveCosmosQueryUnitTest.java index 1ef3ca08d498..4627fac171ef 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/StringBasedReactiveCosmosQueryUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/StringBasedReactiveCosmosQueryUnitTest.java @@ -4,17 +4,17 @@ import com.azure.spring.data.cosmos.core.ReactiveCosmosOperations; import com.azure.spring.data.cosmos.repository.query.ReactiveCosmosQueryMethod; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class StringBasedReactiveCosmosQueryUnitTest { @Mock ReactiveCosmosQueryMethod reactiveCosmosQueryMethod; From 50e12ae6f86b78b3a29f9cd97f859b4b6db27627 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+copilot@users.noreply.github.com> Date: Tue, 2 Dec 2025 09:29:15 +0800 Subject: [PATCH 076/186] Migrate azure-spring-data-cosmos tests from JUnit 4 to JUnit 5 (#47346) - Removed JUnit 4 and junit-vintage-engine dependencies from pom.xml - Updated imports from org.junit to org.junit.jupiter.api - Replaced @Before/@After with @BeforeEach/@AfterEach - Replaced @BeforeClass/@AfterClass with @BeforeAll/@AfterAll - Replaced @RunWith with @ExtendWith for Mockito and Spring - Replaced Assert with Assertions - Removed TestRule interface from AbstractIntegrationTestCollectionManager - Fixed static imports for AssertJ and JUnit Jupiter - Migrate @Test(expected=...) to assertThrows (cherry picked from commit 7ced3305474aa16dd2e39c8a23fb821032b5e538) --- sdk/spring/azure-spring-data-cosmos/pom.xml | 18 -- ...tractIntegrationTestCollectionManager.java | 18 +- .../spring/data/cosmos/ContainerLockIT.java | 22 +- .../data/cosmos/CosmosFactoryTestIT.java | 9 +- .../common/ExpressionResolverUnitTest.java | 6 +- .../data/cosmos/common/MemoizerUnitTest.java | 8 +- .../data/cosmos/common/PageTestUtils.java | 2 +- .../cosmos/common/PropertyLoaderUnitTest.java | 10 +- .../config/AbstractCosmosConfigurationIT.java | 35 ++- .../cosmos/core/CosmosFactoryUnitTest.java | 8 +- .../data/cosmos/core/CosmosTemplateIT.java | 38 ++-- .../core/CosmosTemplateIllegalTest.java | 12 +- .../core/CosmosTemplatePartitionIT.java | 22 +- .../cosmos/core/CosmosTemplateUnitTest.java | 22 +- .../MultiTenantContainerCosmosFactoryIT.java | 28 ++- .../core/MultiTenantDBCosmosFactoryIT.java | 28 ++- .../cosmos/core/ReactiveCosmosTemplateIT.java | 202 +++++++++--------- .../ReactiveCosmosTemplatePartitionIT.java | 74 ++++--- ...veMultiTenantContainerCosmosFactoryIT.java | 28 ++- .../ReactiveMultiTenantDBCosmosFactoryIT.java | 24 +-- .../ZonedDateTimeDeserializerTest.java | 2 +- .../MappingCosmosConverterUnitTest.java | 12 +- .../generator/AbstractQueryGeneratorTest.java | 25 +-- .../generator/NativeQueryGeneratorTest.java | 10 +- .../BasicCosmosPersistentEntityUnitTest.java | 10 +- .../mapping/CosmosMappingContextUnitTest.java | 2 +- .../event/ApplicationContextEventErrorIT.java | 23 +- ...pplicationContextEventErrorReactiveIT.java | 28 ++- .../event/ApplicationContextEventIT.java | 22 +- .../ApplicationContextEventReactiveIT.java | 22 +- .../event/CosmosEventListenerUnitTests.java | 2 +- .../core/query/CosmosQueryUnitTest.java | 12 +- .../cosmos/core/query/CriteriaUnitTest.java | 65 +++--- .../exception/CosmosExceptionUtilsTest.java | 4 +- .../repository/CosmosAnnotationUnitTest.java | 6 +- .../repository/EntityImplRepositoryIT.java | 16 +- .../repository/MultiCosmosTemplateIT.java | 22 +- .../ReactiveUUIDIdDomainRepositoryIT.java | 23 +- .../SimpleCosmosRepositoryIllegalTest.java | 46 ++-- .../SimpleCosmosRepositoryUnitTest.java | 32 ++- ...ositoryConfigurationExtensionUnitTest.java | 2 +- ...ositoryConfigurationExtensionUnitTest.java | 2 +- .../integration/AddressRepositoryIT.java | 38 ++-- .../AddressRepositoryNoMetricsIT.java | 16 +- .../integration/AnnotatedQueryIT.java | 16 +- .../repository/integration/AuditableIT.java | 20 +- .../integration/BasicItemRepositoryIT.java | 25 ++- .../integration/BigTypeRepositoryIT.java | 18 +- .../integration/CompositeIndexIT.java | 20 +- .../integration/ContactRepositoryIT.java | 70 +++--- .../integration/CosmosAnnotationIT.java | 20 +- .../repository/integration/CountIT.java | 42 ++-- .../integration/CustomerRepositoryIT.java | 28 +-- .../cosmos/repository/integration/EtagIT.java | 57 +++-- .../HierarchicalPartitionKeyRepositoryIT.java | 24 +-- .../integration/IndexPolicyUpdateIT.java | 16 +- .../IntegerIdDomainRepositoryIT.java | 94 ++++---- .../integration/LongIdDomainRepositoryIT.java | 104 ++++----- .../integration/MemoRepositoryIT.java | 79 ++++--- .../NestedPartitionKeyRepositoryIT.java | 20 +- .../PageableAddressRepositoryIT.java | 16 +- .../integration/PageableMemoRepositoryIT.java | 16 +- .../PageablePersonRepositoryIT.java | 16 +- .../repository/integration/PersistableIT.java | 34 ++- .../integration/PersonCrossPartitionIT.java | 20 +- .../integration/ProjectRepositoryIT.java | 78 +++---- .../integration/ProjectRepositorySortIT.java | 78 +++---- .../integration/QuestionRepositoryIT.java | 33 ++- .../integration/ReactiveAuditableIT.java | 16 +- .../ReactiveCourseRepositoryIT.java | 27 ++- .../ReactiveCourseRepositoryNoMetricsIT.java | 16 +- .../integration/ReactiveEtagIT.java | 59 +++-- ...eHierarchicalPartitionKeyRepositoryIT.java | 26 ++- .../ReactiveIndexPolicyUpdateIT.java | 16 +- ...dDomainPartitionPartitionRepositoryIT.java | 23 +- ...eactiveNestedPartitionKeyRepositoryIT.java | 20 +- .../integration/ReactiveRoleRepositoryIT.java | 16 +- .../ReactiveTeacherRepositoryIT.java | 16 +- .../integration/SpELCosmosAnnotationIT.java | 20 +- .../integration/SquareRepositoryIT.java | 16 +- .../integration/StudentRepositoryIT.java | 28 ++- .../integration/TeacherRepositoryIT.java | 28 ++- .../integration/UUIDIdDomainRepositoryIT.java | 77 +++---- .../integration/UniqueKeyPolicyIT.java | 20 +- .../query/AbstractCosmosQueryUnitTest.java | 8 +- .../AbstractReactiveCosmosQueryUnitTest.java | 8 +- .../CosmosEntityInformationUnitTest.java | 2 +- .../CosmosRepositoryFactoryBeanUnitTest.java | 8 +- .../CosmosRepositoryFactoryUnitTest.java | 10 +- .../StringBasedCosmosQueryUnitTest.java | 8 +- ...tringBasedReactiveCosmosQueryUnitTest.java | 8 +- 91 files changed, 1182 insertions(+), 1294 deletions(-) diff --git a/sdk/spring/azure-spring-data-cosmos/pom.xml b/sdk/spring/azure-spring-data-cosmos/pom.xml index f85d1775f3ef..156af3b37992 100644 --- a/sdk/spring/azure-spring-data-cosmos/pom.xml +++ b/sdk/spring/azure-spring-data-cosmos/pom.xml @@ -160,12 +160,6 @@ <version>1.17.8</version> <!-- {x-version-update;springboot4_net.bytebuddy:byte-buddy-agent;external_dependency} --> <scope>test</scope> </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.13.2</version> <!-- {x-version-update;springboot4_junit:junit;external_dependency} --> - <scope>test</scope> - </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> @@ -208,18 +202,6 @@ <artifactId>slf4j-api</artifactId> <version>2.0.17</version> <!-- {x-version-update;springboot4_org.slf4j:slf4j-api;external_dependency} --> </dependency> - <dependency> - <groupId>org.junit.vintage</groupId> - <artifactId>junit-vintage-engine</artifactId> - <version>6.0.1</version> <!-- {x-version-update;springboot4_org.junit.vintage:junit-vintage-engine;external_dependency} --> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-core</artifactId> - </exclusion> - </exclusions> - </dependency> </dependencies> <build> diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/AbstractIntegrationTestCollectionManager.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/AbstractIntegrationTestCollectionManager.java index b856a0f85888..d5edd2a06f1a 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/AbstractIntegrationTestCollectionManager.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/AbstractIntegrationTestCollectionManager.java @@ -6,9 +6,6 @@ import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.core.ReactiveCosmosTemplate; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.rules.TestRule; -import org.junit.runner.Description; -import org.junit.runners.model.Statement; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -19,7 +16,7 @@ import java.util.concurrent.ConcurrentMap; @SuppressWarnings({"rawtypes", "unchecked"}) -public abstract class AbstractIntegrationTestCollectionManager<T> implements TestRule { +public abstract class AbstractIntegrationTestCollectionManager<T> { private static final Logger LOGGER = LoggerFactory.getLogger(AbstractIntegrationTestCollectionManager.class); private static final Duration LEASE_DURATION = Duration.ofSeconds(5 * 60); @@ -115,19 +112,6 @@ private void releaseLocks() { } } - @Override - public Statement apply(Statement base, Description description) { - return new Statement() { - public void evaluate() throws Throwable { - try { - base.evaluate(); - } finally { - releaseLocks(); - } - } - }; - } - private static class ContainerRefs { CosmosEntityInformation cosmosEntityInformation; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/ContainerLockIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/ContainerLockIT.java index de89e28d7cc5..2b817a1aba7e 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/ContainerLockIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/ContainerLockIT.java @@ -6,21 +6,21 @@ import com.azure.spring.data.cosmos.domain.Address; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.time.Duration; import java.time.OffsetDateTime; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) @SuppressWarnings({"rawtypes", "unchecked", "deprecation"}) public class ContainerLockIT { @@ -36,7 +36,7 @@ public class ContainerLockIT { private ContainerLock lock; private ContainerLock otherLock; - @Before + @BeforeEach public void setup() { staticTemplate = template; CosmosEntityInformation entityInfo = new CosmosEntityInformation(Address.class); @@ -46,7 +46,7 @@ public void setup() { otherLock = new ContainerLock(reactiveTemplate, entityInfo.getContainerName(), SHORT_LEASE_DURATION); } - @After + @AfterEach public void cleanup() { releaseLockIgnoreException(lock); releaseLockIgnoreException(otherLock); @@ -81,7 +81,7 @@ public void acquireShouldThrowExceptionIfWaitForIsLessThanLeaseDuration() { try { otherLock.acquire(SHORT_LEASE_DURATION.minusSeconds(1)); - Assert.fail(); + Assertions.fail(); } catch (ContainerLock.LockAcquisitionFailedException ex) { } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java index 32700ec603a4..108d70296bd5 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/CosmosFactoryTestIT.java @@ -5,18 +5,17 @@ import com.azure.cosmos.CosmosAsyncClient; import com.azure.cosmos.CosmosClientBuilder; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Value; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.lang.reflect.Field; import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CosmosFactoryTestIT { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/ExpressionResolverUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/ExpressionResolverUnitTest.java index 40bf96bfa513..4f4cec394d2d 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/ExpressionResolverUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/ExpressionResolverUnitTest.java @@ -2,15 +2,15 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.common; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; public class ExpressionResolverUnitTest { private static final String LITERAL_EXPRESSION = "literal expression"; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/MemoizerUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/MemoizerUnitTest.java index 88c79e428d33..178113c302b0 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/MemoizerUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/MemoizerUnitTest.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.common; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; @@ -11,7 +11,7 @@ import java.util.function.Function; import java.util.stream.IntStream; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; public class MemoizerUnitTest { @@ -20,7 +20,7 @@ public class MemoizerUnitTest { private static final Function<String, Integer> MEMOIZED_FUNCTION = Memoizer.memoize(MemoizerUnitTest::incrCount); - @Before + @BeforeEach public void setUp() { COUNT_MAP.put(KEY, new AtomicInteger(0)); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/PageTestUtils.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/PageTestUtils.java index 36ce7dc5bff2..e51797db2ba0 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/PageTestUtils.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/PageTestUtils.java @@ -11,7 +11,7 @@ import org.springframework.data.domain.Pageable; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; public class PageTestUtils { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/PropertyLoaderUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/PropertyLoaderUnitTest.java index ccbe5eddb73f..11e1a089307f 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/PropertyLoaderUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/common/PropertyLoaderUnitTest.java @@ -2,8 +2,8 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.common; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; public class PropertyLoaderUnitTest { @@ -11,8 +11,8 @@ public class PropertyLoaderUnitTest { public void testGetProjectVersion() { final String version = PropertyLoader.getProjectVersion(); - Assert.assertNotNull(version); - Assert.assertNotEquals(version, ""); - Assert.assertNotEquals(version, "@project.version@"); + Assertions.assertNotNull(version); + Assertions.assertNotEquals(version, ""); + Assertions.assertNotEquals(version, "@project.version@"); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/config/AbstractCosmosConfigurationIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/config/AbstractCosmosConfigurationIT.java index c3371d44f68f..24f29aeffbf7 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/config/AbstractCosmosConfigurationIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/config/AbstractCosmosConfigurationIT.java @@ -11,10 +11,7 @@ import com.azure.spring.data.cosmos.common.ExpressionResolver; import com.azure.spring.data.cosmos.common.TestConstants; import com.fasterxml.jackson.databind.ObjectMapper; -import org.assertj.core.api.Assertions; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.AnnotationConfigApplicationContext; @@ -26,13 +23,13 @@ import java.lang.reflect.Field; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; public class AbstractCosmosConfigurationIT { - @SuppressWarnings("deprecation") - @Rule - public ExpectedException exception = ExpectedException.none(); + @Test public void containsExpressionResolver() { @@ -47,15 +44,17 @@ public void containsCosmosFactory() { final AbstractApplicationContext context = new AnnotationConfigApplicationContext( TestCosmosConfiguration.class); - Assertions.assertThat(context.getBean(CosmosFactory.class)).isNotNull(); + assertThat(context.getBean(CosmosFactory.class)).isNotNull(); } - @Test(expected = NoSuchBeanDefinitionException.class) + @Test public void defaultObjectMapperBeanNotExists() { - final AbstractApplicationContext context = new AnnotationConfigApplicationContext( - TestCosmosConfiguration.class); + assertThrows(NoSuchBeanDefinitionException.class, () -> { + final AbstractApplicationContext context = new AnnotationConfigApplicationContext( + TestCosmosConfiguration.class); - context.getBean(ObjectMapper.class); + context.getBean(ObjectMapper.class); + }); } @Test @@ -63,8 +62,8 @@ public void objectMapperIsConfigurable() { final AbstractApplicationContext context = new AnnotationConfigApplicationContext( ObjectMapperConfiguration.class); - Assertions.assertThat(context.getBean(ObjectMapper.class)).isNotNull(); - Assertions.assertThat(context.getBean(Constants.OBJECT_MAPPER_BEAN_NAME)).isNotNull(); + assertThat(context.getBean(ObjectMapper.class)).isNotNull(); + assertThat(context.getBean(Constants.OBJECT_MAPPER_BEAN_NAME)).isNotNull(); } @Test @@ -73,16 +72,16 @@ public void testCosmosClientBuilderConfigurable() throws IllegalAccessException, RequestOptionsConfiguration.class); final CosmosFactory factory = context.getBean(CosmosFactory.class); - Assertions.assertThat(factory).isNotNull(); + assertThat(factory).isNotNull(); final CosmosAsyncClient cosmosAsyncClient = factory.getCosmosAsyncClient(); - Assertions.assertThat(cosmosAsyncClient).isNotNull(); + assertThat(cosmosAsyncClient).isNotNull(); Field desiredConsistencyLevel = cosmosAsyncClient.getClass().getDeclaredField("desiredConsistencyLevel"); desiredConsistencyLevel.setAccessible(true); ConsistencyLevel consistencyLevel = (ConsistencyLevel) desiredConsistencyLevel.get(cosmosAsyncClient); - Assertions.assertThat(consistencyLevel).isEqualTo(ConsistencyLevel.CONSISTENT_PREFIX); + assertThat(consistencyLevel).isEqualTo(ConsistencyLevel.CONSISTENT_PREFIX); } @Configuration diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosFactoryUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosFactoryUnitTest.java index cca2296ee87d..940c3caeec01 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosFactoryUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosFactoryUnitTest.java @@ -7,16 +7,16 @@ import com.azure.spring.data.cosmos.Constants; import com.azure.spring.data.cosmos.CosmosFactory; import com.azure.spring.data.cosmos.common.PropertyLoader; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class CosmosFactoryUnitTest { @Test diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java index 1eecb3455ec4..9daa3a398ba4 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java @@ -46,13 +46,12 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import org.assertj.core.util.Lists; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.persistence.autoconfigure.EntityScanner; +import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.data.auditing.IsNewAwareAuditingHandler; @@ -62,7 +61,6 @@ import org.springframework.data.domain.Sort; import org.springframework.data.repository.query.parser.Part; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.util.ReflectionTestUtils; import java.lang.reflect.InvocationTargetException; @@ -102,13 +100,9 @@ import static com.azure.spring.data.cosmos.common.TestConstants.TRANSIENT_PROPERTY; import static com.azure.spring.data.cosmos.common.TestConstants.UPDATED_FIRST_NAME; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.*; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CosmosTemplateIT { private static final Person TEST_PERSON = new Person(ID_1, FIRST_NAME, LAST_NAME, HOBBIES, @@ -161,7 +155,7 @@ public class CosmosTemplateIT { private static final CosmosPatchItemRequestOptions options = new CosmosPatchItemRequestOptions(); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); private static CosmosAsyncClient client; @@ -193,7 +187,7 @@ public class CosmosTemplateIT { public CosmosTemplateIT() throws JsonProcessingException { } - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { if (cosmosTemplate == null) { client = CosmosFactory.createCosmosAsyncClient(cosmosClientBuilder); @@ -244,7 +238,7 @@ public void testInsertDocShouldNotPersistTransientFields() { final Person personWithTransientField = TEST_PERSON_4; assertThat(personWithTransientField.getTransientProperty()).isNotNull(); final Person insertedPerson = cosmosTemplate.insert(Person.class.getSimpleName(), personWithTransientField, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_4))); - Assert.assertEquals(TRANSIENT_PROPERTY, insertedPerson.getTransientProperty()); + assertEquals(TRANSIENT_PROPERTY, insertedPerson.getTransientProperty()); final Person retrievedPerson = cosmosTemplate.findById(Person.class.getSimpleName(), insertedPerson.getId(), Person.class); assertThat(retrievedPerson.getTransientProperty()).isNull(); } @@ -259,7 +253,7 @@ public void testInsertAllAndFindAllWithTransientField() { Iterable<Person> insertAllResponse = cosmosTemplate.insertAll(personInfo, entitiesToSave); //check that the transient field is retained in the response for (Person person : insertAllResponse) { - Assert.assertEquals(TRANSIENT_PROPERTY, person.getTransientProperty()); + assertEquals(TRANSIENT_PROPERTY, person.getTransientProperty()); } Iterable<Person> findByIdsResponse = cosmosTemplate.findByIds(Arrays.asList(TEST_PERSON_4.getId()), Person.class, containerName); @@ -270,10 +264,12 @@ public void testInsertAllAndFindAllWithTransientField() { } - @Test(expected = CosmosBadRequestException.class) + @Test public void testInsertShouldFailIfColumnNotAnnotatedWithAutoGenerate() { - final Person person = new Person(null, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); - cosmosTemplate.insert(Person.class.getSimpleName(), person, new PartitionKey(person.getLastName())); + assertThrows(CosmosBadRequestException.class, () -> { + final Person person = new Person(null, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); + cosmosTemplate.insert(Person.class.getSimpleName(), person, new PartitionKey(person.getLastName())); + }); } @Test @@ -482,7 +478,7 @@ public void testUpsertNewDocumentIgnoresTransientFields() { final Person person = cosmosTemplate.upsertAndReturnEntity(Person.class.getSimpleName(), newPerson); - Assert.assertEquals(TRANSIENT_PROPERTY, person.getTransientProperty()); + assertEquals(TRANSIENT_PROPERTY, person.getTransientProperty()); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIllegalTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIllegalTest.java index e18960ae2da6..bae7b195bee9 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIllegalTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIllegalTest.java @@ -8,12 +8,12 @@ import com.azure.spring.data.cosmos.core.query.CriteriaType; import com.azure.spring.data.cosmos.domain.Person; import org.apache.commons.lang3.StringUtils; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Answers; +import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; import org.springframework.data.repository.query.parser.Part; import org.springframework.util.Assert; @@ -21,7 +21,7 @@ import java.lang.reflect.Method; import java.util.Arrays; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class CosmosTemplateIllegalTest { private static final String NULL_STR = null; private static final String DUMMY_COLL = "dummy"; @@ -35,7 +35,7 @@ public class CosmosTemplateIllegalTest { private CosmosTemplate cosmosTemplate; private Class<?> cosmosTemplateClass; - @Before + @BeforeEach public void setUp() { cosmosTemplateClass = cosmosTemplate.getClass(); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java index eb4816e5fd4c..62beed86c8d1 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java @@ -3,6 +3,9 @@ package com.azure.spring.data.cosmos.core; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; + import com.azure.cosmos.CosmosAsyncClient; import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.models.PartitionKey; @@ -22,12 +25,11 @@ import com.azure.spring.data.cosmos.domain.PartitionPerson; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; + +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.persistence.autoconfigure.EntityScanner; +import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.data.domain.Page; @@ -35,7 +37,6 @@ import org.springframework.data.domain.Sort; import org.springframework.data.repository.query.parser.Part; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Collections; import java.util.List; @@ -57,12 +58,11 @@ import static com.azure.spring.data.cosmos.common.TestConstants.UPDATED_FIRST_NAME; import static com.azure.spring.data.cosmos.common.TestConstants.ZIP_CODE; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.springframework.data.domain.Sort.Direction.ASC; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CosmosTemplatePartitionIT { private static final PartitionPerson TEST_PERSON = new PartitionPerson(ID_1, FIRST_NAME, ZIP_CODE, @@ -74,7 +74,7 @@ public class CosmosTemplatePartitionIT { private static final PartitionPerson TEST_PERSON_3 = new PartitionPerson(ID_3, FIRST_NAME, NEW_ZIP_CODE, HOBBIES, ADDRESSES); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); private static CosmosFactory cosmosFactory; @@ -91,7 +91,7 @@ public class CosmosTemplatePartitionIT { @Autowired private ResponseDiagnosticsTestUtils responseDiagnosticsTestUtils; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { if (cosmosTemplate == null) { // Query plan caching is enabled by default diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateUnitTest.java index 54f515a8a62c..c9aaaa74e4a9 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateUnitTest.java @@ -7,18 +7,22 @@ import com.azure.cosmos.CosmosClientBuilder; import com.azure.spring.data.cosmos.CosmosFactory; import com.azure.spring.data.cosmos.common.TestConstants; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; -@RunWith(MockitoJUnitRunner.class) +import static org.junit.jupiter.api.Assertions.assertThrows; + +@ExtendWith(MockitoExtension.class) public class CosmosTemplateUnitTest { - @Test(expected = IllegalArgumentException.class) + @Test public void rejectNullDbFactory() { - CosmosAsyncClient client = CosmosFactory.createCosmosAsyncClient(new CosmosClientBuilder() - .endpoint("") - .key("")); - new CosmosFactory(client, TestConstants.DB_NAME); + assertThrows(IllegalArgumentException.class, () -> { + CosmosAsyncClient client = CosmosFactory.createCosmosAsyncClient(new CosmosClientBuilder() + .endpoint("") + .key("")); + new CosmosFactory(client, TestConstants.DB_NAME); + }); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java index d2b50d9e9a36..f087dd4888d0 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java @@ -16,17 +16,16 @@ import com.azure.spring.data.cosmos.domain.Person; import com.azure.spring.data.cosmos.repository.MultiTenantTestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.persistence.autoconfigure.EntityScanner; +import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.List; @@ -40,10 +39,9 @@ import static com.azure.spring.data.cosmos.common.TestConstants.LAST_NAME; import static com.azure.spring.data.cosmos.common.TestConstants.PASSPORT_IDS_BY_COUNTRY; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MultiTenantTestRepositoryConfig.class) public class MultiTenantContainerCosmosFactoryIT { @@ -55,7 +53,7 @@ public class MultiTenantContainerCosmosFactoryIT { private final Person TEST_PERSON_1 = new Person(ID_1, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); private final Person TEST_PERSON_2 = new Person(ID_2, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -70,7 +68,7 @@ public class MultiTenantContainerCosmosFactoryIT { private CosmosAsyncClient client; private CosmosEntityInformation<Person, String> personInfo; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { /// Setup client = CosmosFactory.createCosmosAsyncClient(cosmosClientBuilder); @@ -80,7 +78,7 @@ public void setUp() throws ClassNotFoundException { try { mappingContext.setInitialEntitySet(new EntityScanner(this.applicationContext).scan(Persistent.class)); } catch (Exception e) { - Assert.fail(); + Assertions.fail(); } final MappingCosmosConverter cosmosConverter = new MappingCosmosConverter(mappingContext, null); @@ -110,7 +108,7 @@ public void testGetContainerFunctionality() { Iterable<Person> iterableDB2 = cosmosTemplate.findAll(personInfo.getContainerName(), Person.class); List<Person> resultDB2 = new ArrayList<>(); iterableDB2.forEach(resultDB2::add); - Assert.assertEquals(expectedResultsContainer2, resultDB2); + assertEquals(expectedResultsContainer2, resultDB2); // Check that testContainer1 has the correct contents cosmosFactory.manuallySetContainerName = testContainer1; @@ -119,7 +117,7 @@ public void testGetContainerFunctionality() { Iterable<Person> iterableDB1 = cosmosTemplate.findAll(personInfo.getContainerName(), Person.class); List<Person> resultDB1 = new ArrayList<>(); iterableDB1.forEach(resultDB1::add); - Assert.assertEquals(expectedResultsContainer1, resultDB1); + assertEquals(expectedResultsContainer1, resultDB1); //Cleanup deleteDatabaseIfExists(testDB1); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java index c3194aabca05..0de37438ecea 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java @@ -16,17 +16,16 @@ import com.azure.spring.data.cosmos.domain.Person; import com.azure.spring.data.cosmos.repository.MultiTenantTestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.persistence.autoconfigure.EntityScanner; +import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.List; @@ -40,10 +39,9 @@ import static com.azure.spring.data.cosmos.common.TestConstants.LAST_NAME; import static com.azure.spring.data.cosmos.common.TestConstants.PASSPORT_IDS_BY_COUNTRY; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MultiTenantTestRepositoryConfig.class) public class MultiTenantDBCosmosFactoryIT { @@ -53,7 +51,7 @@ public class MultiTenantDBCosmosFactoryIT { private final Person TEST_PERSON_1 = new Person(ID_1, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); private final Person TEST_PERSON_2 = new Person(ID_2, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -68,7 +66,7 @@ public class MultiTenantDBCosmosFactoryIT { private CosmosAsyncClient client; private CosmosEntityInformation<Person, String> personInfo; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { /// Setup client = CosmosFactory.createCosmosAsyncClient(cosmosClientBuilder); @@ -78,7 +76,7 @@ public void setUp() throws ClassNotFoundException { try { mappingContext.setInitialEntitySet(new EntityScanner(this.applicationContext).scan(Persistent.class)); } catch (Exception e) { - Assert.fail(); + Assertions.fail(); } final MappingCosmosConverter cosmosConverter = new MappingCosmosConverter(mappingContext, null); @@ -107,7 +105,7 @@ public void testGetDatabaseFunctionality() { Iterable<Person> iterableDB2 = cosmosTemplate.findAll(personInfo.getContainerName(), Person.class); List<Person> resultDB2 = new ArrayList<>(); iterableDB2.forEach(resultDB2::add); - Assert.assertEquals(expectedResultsDB2, resultDB2); + assertEquals(expectedResultsDB2, resultDB2); // Check that DB1 has the correct contents cosmosFactory.manuallySetDatabaseName = testDB1; @@ -116,7 +114,7 @@ public void testGetDatabaseFunctionality() { Iterable<Person> iterableDB1 = cosmosTemplate.findAll(personInfo.getContainerName(), Person.class); List<Person> resultDB1 = new ArrayList<>(); iterableDB1.forEach(resultDB1::add); - Assert.assertEquals(expectedResultsDB1, resultDB1); + assertEquals(expectedResultsDB1, resultDB1); //Cleanup deleteDatabaseIfExists(testDB1); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java index 7b7af5273812..407187e1c35e 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java @@ -45,23 +45,20 @@ import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import org.assertj.core.api.Assertions; import org.assertj.core.util.Lists; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.persistence.autoconfigure.EntityScanner; +import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.data.auditing.IsNewAwareAuditingHandler; import org.springframework.data.repository.query.parser.Part; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.util.ReflectionTestUtils; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -95,12 +92,11 @@ import static com.azure.spring.data.cosmos.common.TestConstants.PATCH_HOBBY1; import static com.azure.spring.data.cosmos.common.TestConstants.TRANSIENT_PROPERTY; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.fail; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveCosmosTemplateIT { private static final Person TEST_PERSON = new Person(TestConstants.ID_1, TestConstants.FIRST_NAME, @@ -154,7 +150,7 @@ public class ReactiveCosmosTemplateIT { private static final CosmosPatchItemRequestOptions options = new CosmosPatchItemRequestOptions(); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Value("${cosmos.secondaryKey}") @@ -192,7 +188,7 @@ public class ReactiveCosmosTemplateIT { @Autowired private StubDateTimeProvider stubDateTimeProvider; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { if (cosmosTemplate == null) { azureKeyCredential = new AzureKeyCredential(cosmosDbKey); @@ -224,7 +220,7 @@ private ReactiveCosmosTemplate createReactiveCosmosTemplate(CosmosConfig config, return new ReactiveCosmosTemplate(cosmosFactory, config, cosmosConverter, inah); } - @After + @AfterEach public void cleanup() { // Reset master key azureKeyCredential.update(cosmosDbKey); @@ -247,7 +243,7 @@ public void testInsertDocShouldNotPersistTransientFields() { final Person personWithTransientField = TEST_PERSON_5; assertThat(personWithTransientField.getTransientProperty()).isNotNull(); final Mono<Person> insertedPerson = cosmosTemplate.insert(Person.class.getSimpleName(), personWithTransientField, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_5))); - Assert.assertEquals(TRANSIENT_PROPERTY, insertedPerson.block().getTransientProperty()); + assertEquals(TRANSIENT_PROPERTY, insertedPerson.block().getTransientProperty()); final Mono<Person> retrievedPerson = cosmosTemplate.findById(Person.class.getSimpleName(), personWithTransientField.getId(), Person.class); assertThat(retrievedPerson.block().getTransientProperty()).isNull(); } @@ -284,7 +280,7 @@ public void testFindByIdPointRead() { BASIC_ITEM.getId(), BasicItem.class); StepVerifier.create(findById) - .consumeNextWith(actual -> Assert.assertEquals(actual, BASIC_ITEM)) + .consumeNextWith(actual -> assertEquals(actual, BASIC_ITEM)) .verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); @@ -297,11 +293,11 @@ public void testFindByID() { TEST_PERSON.getId(), Person.class); StepVerifier.create(findById) - .consumeNextWith(actual -> Assert.assertEquals(actual, TEST_PERSON)) + .consumeNextWith(actual -> assertEquals(actual, TEST_PERSON)) .verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -311,13 +307,13 @@ public void testFindByIDBySecondaryKey() { TEST_PERSON.getId(), Person.class); StepVerifier.create(findById).consumeNextWith(actual -> { - Assert.assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); - Assert.assertEquals(actual.getLastName(), TEST_PERSON.getLastName()); + assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); + assertEquals(actual.getLastName(), TEST_PERSON.getLastName()); }).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -327,20 +323,20 @@ public void testFindAll() { StepVerifier.create(flux).expectNextCount(1).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test public void testFindByIdWithContainerName() { StepVerifier.create(cosmosTemplate.findById(Person.class.getSimpleName(), TEST_PERSON.getId(), Person.class)) - .consumeNextWith(actual -> Assert.assertEquals(actual, TEST_PERSON)) + .consumeNextWith(actual -> assertEquals(actual, TEST_PERSON)) .verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -350,29 +346,29 @@ public void testSaveSetsAuditData() { stubDateTimeProvider.setNow(now); StepVerifier.create(cosmosTemplate.insert(TEST_AUDITABLE_ENTITY_1)) .consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_1); + assertEquals(actual.getId(), UUID_1); }).verifyComplete(); StepVerifier.create(cosmosTemplate.insert(TEST_AUDITABLE_ENTITY_2)) .consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_2); + assertEquals(actual.getId(), UUID_2); }).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); final Flux<AuditableEntity> flux = cosmosTemplate.findAll(auditableEntityInfo.getContainerName(), AuditableEntity.class); StepVerifier.create(flux).consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_1); - Assert.assertEquals(actual.getCreatedBy(), "test-auditor"); - Assert.assertEquals(actual.getLastModifiedBy(), "test-auditor"); - Assert.assertEquals(actual.getCreatedDate(), now); - Assert.assertEquals(actual.getLastModifiedByDate(), now); + assertEquals(actual.getId(), UUID_1); + assertEquals(actual.getCreatedBy(), "test-auditor"); + assertEquals(actual.getLastModifiedBy(), "test-auditor"); + assertEquals(actual.getCreatedDate(), now); + assertEquals(actual.getLastModifiedByDate(), now); }).consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_2); - Assert.assertEquals(actual.getCreatedBy(), "test-auditor"); - Assert.assertEquals(actual.getLastModifiedBy(), "test-auditor"); - Assert.assertEquals(actual.getCreatedDate(), now); - Assert.assertEquals(actual.getLastModifiedByDate(), now); + assertEquals(actual.getId(), UUID_2); + assertEquals(actual.getCreatedBy(), "test-auditor"); + assertEquals(actual.getLastModifiedBy(), "test-auditor"); + assertEquals(actual.getCreatedDate(), now); + assertEquals(actual.getLastModifiedByDate(), now); }).verifyComplete(); } @@ -384,22 +380,22 @@ public void testSaveAllSetsAuditData() { StepVerifier.create(cosmosTemplate.insertAll(auditableEntityInfo, Lists.newArrayList(TEST_AUDITABLE_ENTITY_1, TEST_AUDITABLE_ENTITY_2))).expectNextCount(2).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); final Flux<AuditableEntity> flux = cosmosTemplate.findAll(auditableEntityInfo.getContainerName(), AuditableEntity.class); StepVerifier.create(flux).consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_1); - Assert.assertEquals(actual.getCreatedBy(), "test-auditor-2"); - Assert.assertEquals(actual.getLastModifiedBy(), "test-auditor-2"); - Assert.assertEquals(actual.getCreatedDate(), now); - Assert.assertEquals(actual.getLastModifiedByDate(), now); + assertEquals(actual.getId(), UUID_1); + assertEquals(actual.getCreatedBy(), "test-auditor-2"); + assertEquals(actual.getLastModifiedBy(), "test-auditor-2"); + assertEquals(actual.getCreatedDate(), now); + assertEquals(actual.getLastModifiedByDate(), now); }).consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_2); - Assert.assertEquals(actual.getCreatedBy(), "test-auditor-2"); - Assert.assertEquals(actual.getLastModifiedBy(), "test-auditor-2"); - Assert.assertEquals(actual.getCreatedDate(), now); - Assert.assertEquals(actual.getLastModifiedByDate(), now); + assertEquals(actual.getId(), UUID_2); + assertEquals(actual.getCreatedBy(), "test-auditor-2"); + assertEquals(actual.getLastModifiedBy(), "test-auditor-2"); + assertEquals(actual.getCreatedDate(), now); + assertEquals(actual.getLastModifiedByDate(), now); }).verifyComplete(); } @@ -411,7 +407,7 @@ public void testSaveAllFailureAuditData() { StepVerifier.create(cosmosTemplate.insertAll(auditableEntityInfo, Lists.newArrayList(TEST_AUDITABLE_ENTITY_1, TEST_AUDITABLE_ENTITY_2, TEST_AUDITABLE_ENTITY_3))).expectNextCount(3).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); final List<AuditableEntity> result = cosmosTemplate.findAll(auditableEntityInfo.getContainerName(), AuditableEntity.class).collectList().block(); @@ -422,28 +418,28 @@ public void testSaveAllFailureAuditData() { stubDateTimeProvider.setNow(now2); StepVerifier.create(cosmosTemplate.insertAll(auditableEntityInfo, result)) - .consumeNextWith(actual -> Assert.assertEquals(actual.getId(), UUID_1)) - .consumeNextWith(actual -> Assert.assertEquals(actual.getId(), UUID_3)).verifyComplete(); + .consumeNextWith(actual -> assertEquals(actual.getId(), UUID_1)) + .consumeNextWith(actual -> assertEquals(actual.getId(), UUID_3)).verifyComplete(); final Flux<AuditableEntity> flux = cosmosTemplate.findAll(auditableEntityInfo.getContainerName(), AuditableEntity.class); StepVerifier.create(flux).consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_1); - Assert.assertEquals(actual.getCreatedBy(), "test-auditor-2"); - Assert.assertEquals(actual.getLastModifiedBy(), "test-auditor-3"); - Assert.assertEquals(actual.getCreatedDate(), now); - Assert.assertEquals(actual.getLastModifiedByDate(), now2); + assertEquals(actual.getId(), UUID_1); + assertEquals(actual.getCreatedBy(), "test-auditor-2"); + assertEquals(actual.getLastModifiedBy(), "test-auditor-3"); + assertEquals(actual.getCreatedDate(), now); + assertEquals(actual.getLastModifiedByDate(), now2); }).consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_2); - Assert.assertEquals(actual.getCreatedBy(), "test-auditor-2"); - Assert.assertEquals(actual.getLastModifiedBy(), "test-auditor-2"); - Assert.assertEquals(actual.getCreatedDate(), now); - Assert.assertEquals(actual.getLastModifiedByDate(), now); + assertEquals(actual.getId(), UUID_2); + assertEquals(actual.getCreatedBy(), "test-auditor-2"); + assertEquals(actual.getLastModifiedBy(), "test-auditor-2"); + assertEquals(actual.getCreatedDate(), now); + assertEquals(actual.getLastModifiedByDate(), now); }).consumeNextWith(actual -> { - Assert.assertEquals(actual.getId(), UUID_3); - Assert.assertEquals(actual.getCreatedBy(), "test-auditor-2"); - Assert.assertEquals(actual.getLastModifiedBy(), "test-auditor-3"); - Assert.assertEquals(actual.getCreatedDate(), now); - Assert.assertEquals(actual.getLastModifiedByDate(), now2); + assertEquals(actual.getId(), UUID_3); + assertEquals(actual.getCreatedBy(), "test-auditor-2"); + assertEquals(actual.getLastModifiedBy(), "test-auditor-3"); + assertEquals(actual.getCreatedDate(), now); + assertEquals(actual.getLastModifiedByDate(), now2); }).verifyComplete(); } @@ -454,7 +450,7 @@ public void testInsert() { .expectNext(TEST_PERSON_3).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @@ -466,7 +462,7 @@ public void testInsertBySecondaryKey() { .expectNext(TEST_PERSON_3).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @@ -477,7 +473,7 @@ public void testInsertWithContainerName() { .expectNext(TEST_PERSON_2).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @@ -510,7 +506,7 @@ public void testUpsert() { p.setHobbies(hobbies); final Mono<Person> upsert = cosmosTemplate.upsert(p); StepVerifier.create(upsert).expectNextCount(1).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @@ -526,7 +522,7 @@ public void testUpsertNewDocumentIgnoresTransientFields() { final Mono<Person> person = cosmosTemplate.upsert(Person.class.getSimpleName(), newPerson); - Assert.assertEquals(TRANSIENT_PROPERTY, person.block().getTransientProperty()); + assertEquals(TRANSIENT_PROPERTY, person.block().getTransientProperty()); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); @@ -606,7 +602,7 @@ public void testUpsertBySecondaryKey() { StepVerifier.create(upsert).expectNextCount(1).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @@ -620,7 +616,7 @@ public void testUpsertWithContainerName() { StepVerifier.create(upsert).expectNextCount(1).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); } @@ -630,15 +626,15 @@ public void testDeleteById() { new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_4))).block(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); Flux<Person> flux = cosmosTemplate.findAll(Person.class.getSimpleName(), Person.class); StepVerifier.create(flux).expectNextCount(2).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); final Mono<Void> voidMono = cosmosTemplate.deleteById(Person.class.getSimpleName(), @@ -647,15 +643,15 @@ public void testDeleteById() { StepVerifier.create(voidMono).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); flux = cosmosTemplate.findAll(Person.class.getSimpleName(), Person.class); StepVerifier.create(flux).expectNextCount(1).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @@ -665,30 +661,30 @@ public void testDeleteByEntity() { new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_4))).block(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); Flux<Person> flux = cosmosTemplate.findAll(Person.class.getSimpleName(), Person.class); StepVerifier.create(flux).expectNextCount(2).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); final Mono<Void> voidMono = cosmosTemplate.deleteEntity(Person.class.getSimpleName(), insertedPerson); StepVerifier.create(voidMono).verifyComplete(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); flux = cosmosTemplate.findAll(Person.class.getSimpleName(), Person.class); StepVerifier.create(flux).expectNextCount(1).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @@ -697,7 +693,7 @@ public void testDeleteByQuery() { cosmosTemplate.insert(TEST_PERSON_4, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON_4))).block(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, "id", @@ -708,8 +704,8 @@ public void testDeleteByQuery() { StepVerifier.create(deleteFlux).expectNextCount(1).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); Mono<Person> itemMono = cosmosTemplate.findById(TEST_PERSON_4.getId(), Person.class); StepVerifier.create(itemMono).expectNextCount(0).verifyComplete(); @@ -748,8 +744,8 @@ public void testFind() { StepVerifier.create(personFluxIgnoreCase).expectNextCount(1).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -768,8 +764,8 @@ public void testExists() { StepVerifier.create(existsIgnoreCase).expectNext(true).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -788,8 +784,8 @@ public void testNotExists() { StepVerifier.create(existsIgnoreCase).expectNext(false).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -798,8 +794,8 @@ public void testCount() { StepVerifier.create(count).expectNext((long) 1).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java index a0c94f82100a..ffbfe5068841 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java @@ -2,6 +2,9 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; + import com.azure.cosmos.CosmosAsyncClient; import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.models.PartitionKey; @@ -18,19 +21,15 @@ import com.azure.spring.data.cosmos.domain.PartitionPerson; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.assertj.core.api.Assertions; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; + +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.persistence.autoconfigure.EntityScanner; +import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.data.repository.query.parser.Part; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -42,8 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveCosmosTemplatePartitionIT { private static final PartitionPerson TEST_PERSON = new PartitionPerson(TestConstants.ID_1, @@ -54,7 +52,7 @@ public class ReactiveCosmosTemplatePartitionIT { TestConstants.NEW_FIRST_NAME, TestConstants.NEW_ZIP_CODE, TestConstants.HOBBIES, TestConstants.ADDRESSES); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); private static CosmosFactory cosmosFactory; @@ -71,7 +69,7 @@ public class ReactiveCosmosTemplatePartitionIT { @Autowired private ResponseDiagnosticsTestUtils responseDiagnosticsTestUtils; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { if (cosmosTemplate == null) { // Query plan caching is enabled by default @@ -102,13 +100,13 @@ public void testFindWithPartition() { PartitionPerson.class, PartitionPerson.class.getSimpleName()); StepVerifier.create(partitionPersonFlux).consumeNextWith(actual -> { - Assert.assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); - Assert.assertEquals(actual.getZipCode(), TEST_PERSON.getZipCode()); + assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); + assertEquals(actual.getZipCode(), TEST_PERSON.getZipCode()); }).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } // TODO: Find a way to test the query plan cache contents without using implementation package @@ -122,8 +120,8 @@ public void testFindWithPartitionWithQueryPlanCachingEnabled() { PartitionPerson.class, PartitionPerson.class.getSimpleName()); StepVerifier.create(partitionPersonFlux).consumeNextWith(actual -> { - Assert.assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); - Assert.assertEquals(actual.getZipCode(), TEST_PERSON.getZipCode()); + assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); + assertEquals(actual.getZipCode(), TEST_PERSON.getZipCode()); }).verifyComplete(); // CosmosAsyncClient cosmosAsyncClient = cosmosFactory.getCosmosAsyncClient(); @@ -143,8 +141,8 @@ public void testFindWithPartitionWithQueryPlanCachingEnabled() { PartitionPerson.class, PartitionPerson.class.getSimpleName()); StepVerifier.create(partitionPersonFlux).consumeNextWith(actual -> { - Assert.assertEquals(actual.getFirstName(), TEST_PERSON_2.getFirstName()); - Assert.assertEquals(actual.getZipCode(), TEST_PERSON_2.getZipCode()); + assertEquals(actual.getFirstName(), TEST_PERSON_2.getFirstName()); + assertEquals(actual.getZipCode(), TEST_PERSON_2.getZipCode()); }).verifyComplete(); // Map<String, PartitionedQueryExecutionInfo> postQueryCallCache = asyncDocumentClient.getQueryPlanCache(); @@ -161,13 +159,13 @@ public void testFindIgnoreCaseWithPartition() { PartitionPerson.class, PartitionPerson.class.getSimpleName()); StepVerifier.create(partitionPersonFlux).consumeNextWith(actual -> { - Assert.assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); - Assert.assertEquals(actual.getZipCode(), TEST_PERSON.getZipCode()); + assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); + assertEquals(actual.getZipCode(), TEST_PERSON.getZipCode()); }).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @@ -177,8 +175,8 @@ public void testFindByIdWithPartition() { PartitionPerson.class, new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON))); StepVerifier.create(partitionPersonMono).consumeNextWith(actual -> { - Assert.assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); - Assert.assertEquals(actual.getZipCode(), TEST_PERSON.getZipCode()); + assertEquals(actual.getFirstName(), TEST_PERSON.getFirstName()); + assertEquals(actual.getZipCode(), TEST_PERSON.getZipCode()); }).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); @@ -221,8 +219,8 @@ public void testUpdateWithPartition() { assertEquals(person, updated); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -237,8 +235,8 @@ public void testDeleteByIdPartition() { .verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -251,8 +249,8 @@ public void testDeleteAll() { .verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -264,8 +262,8 @@ public void testCountForPartitionedCollection() { .expectNext((long) 2).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -278,8 +276,8 @@ public void testCountForPartitionedCollectionByQuery() { .expectNext((long) 1).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } @Test @@ -292,8 +290,8 @@ public void testCountIgnoreCaseForPartitionedCollectionByQuery() { .expectNext((long) 1).verifyComplete(); assertThat(responseDiagnosticsTestUtils.getCosmosDiagnostics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); - Assertions.assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNotNull(); + assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics().getRequestCharge()).isGreaterThan(0); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java index 3bcaca81a3fc..77eef43b221b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java @@ -16,17 +16,16 @@ import com.azure.spring.data.cosmos.domain.Person; import com.azure.spring.data.cosmos.repository.MultiTenantTestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.persistence.autoconfigure.EntityScanner; +import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.test.StepVerifier; @@ -42,10 +41,9 @@ import static com.azure.spring.data.cosmos.common.TestConstants.LAST_NAME; import static com.azure.spring.data.cosmos.common.TestConstants.PASSPORT_IDS_BY_COUNTRY; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MultiTenantTestRepositoryConfig.class) public class ReactiveMultiTenantContainerCosmosFactoryIT { @@ -57,7 +55,7 @@ public class ReactiveMultiTenantContainerCosmosFactoryIT { private final Person TEST_PERSON_1 = new Person(ID_1, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); private final Person TEST_PERSON_2 = new Person(ID_2, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -72,7 +70,7 @@ public class ReactiveMultiTenantContainerCosmosFactoryIT { private CosmosAsyncClient client; private CosmosEntityInformation<Person, String> personInfo; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { /// Setup client = CosmosFactory.createCosmosAsyncClient(cosmosClientBuilder); @@ -82,7 +80,7 @@ public void setUp() throws ClassNotFoundException { try { mappingContext.setInitialEntitySet(new EntityScanner(this.applicationContext).scan(Persistent.class)); } catch (Exception e) { - Assert.fail(); + Assertions.fail(); } final MappingCosmosConverter cosmosConverter = new MappingCosmosConverter(mappingContext, null); @@ -113,7 +111,7 @@ public void testGetContainerFunctionality() { StepVerifier.create(fluxDB2).expectNextCount(1).verifyComplete(); List<Person> resultDB2 = new ArrayList<>(); fluxDB2.toIterable().forEach(resultDB2::add); - Assert.assertEquals(expectedResultsContainer2, resultDB2); + assertEquals(expectedResultsContainer2, resultDB2); // Check that testContainer1 has the correct contents cosmosFactory.manuallySetContainerName = testContainer1; @@ -123,7 +121,7 @@ public void testGetContainerFunctionality() { StepVerifier.create(fluxDB1).expectNextCount(1).verifyComplete(); List<Person> resultDB1 = new ArrayList<>(); fluxDB1.toIterable().forEach(resultDB1::add); - Assert.assertEquals(expectedResultsContainer1, resultDB1); + assertEquals(expectedResultsContainer1, resultDB1); //Cleanup deleteDatabaseIfExists(testDB1); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java index 32619f94c101..56bc2acd0499 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java @@ -16,17 +16,16 @@ import com.azure.spring.data.cosmos.domain.Person; import com.azure.spring.data.cosmos.repository.MultiTenantTestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.persistence.autoconfigure.EntityScanner; +import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.test.StepVerifier; @@ -42,10 +41,9 @@ import static com.azure.spring.data.cosmos.common.TestConstants.LAST_NAME; import static com.azure.spring.data.cosmos.common.TestConstants.PASSPORT_IDS_BY_COUNTRY; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MultiTenantTestRepositoryConfig.class) public class ReactiveMultiTenantDBCosmosFactoryIT { @@ -55,7 +53,7 @@ public class ReactiveMultiTenantDBCosmosFactoryIT { private final Person TEST_PERSON_1 = new Person(ID_1, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); private final Person TEST_PERSON_2 = new Person(ID_2, FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -70,7 +68,7 @@ public class ReactiveMultiTenantDBCosmosFactoryIT { private CosmosAsyncClient client; private CosmosEntityInformation<Person, String> personInfo; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { /// Setup client = CosmosFactory.createCosmosAsyncClient(cosmosClientBuilder); @@ -80,7 +78,7 @@ public void setUp() throws ClassNotFoundException { try { mappingContext.setInitialEntitySet(new EntityScanner(this.applicationContext).scan(Persistent.class)); } catch (Exception e) { - Assert.fail(); + Assertions.fail(); } final MappingCosmosConverter cosmosConverter = new MappingCosmosConverter(mappingContext, null); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/convert/ZonedDateTimeDeserializerTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/convert/ZonedDateTimeDeserializerTest.java index 88b593f2fe95..57059cfc962f 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/convert/ZonedDateTimeDeserializerTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/convert/ZonedDateTimeDeserializerTest.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core.convert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.io.IOException; import java.time.ZoneId; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/converter/MappingCosmosConverterUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/converter/MappingCosmosConverterUnitTest.java index 0a11e4a78741..f86817f8f79a 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/converter/MappingCosmosConverterUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/converter/MappingCosmosConverterUnitTest.java @@ -15,11 +15,11 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.context.ApplicationContext; import java.text.ParseException; @@ -29,7 +29,7 @@ import static org.assertj.core.api.Assertions.assertThat; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class MappingCosmosConverterUnitTest { private static final SimpleDateFormat DATE = new SimpleDateFormat(TestConstants.DATE_FORMAT); private static final SimpleDateFormat TIMEZONE_DATE = new SimpleDateFormat(TestConstants.DATE_TIMEZONE_FORMAT); @@ -39,7 +39,7 @@ public class MappingCosmosConverterUnitTest { @Mock ApplicationContext applicationContext; - @Before + @BeforeEach public void setUp() { final CosmosMappingContext mappingContext = new CosmosMappingContext(); final ObjectMapper objectMapper = new ObjectMapper(); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGeneratorTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGeneratorTest.java index 55c21c65ce11..9c6d48004646 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGeneratorTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/generator/AbstractQueryGeneratorTest.java @@ -10,9 +10,9 @@ import com.azure.spring.data.cosmos.core.query.CriteriaType; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.springframework.data.domain.Sort; import org.springframework.data.repository.query.parser.Part; @@ -22,13 +22,14 @@ import java.util.stream.Collectors; import static org.springframework.data.domain.Sort.Direction.ASC; +import static org.junit.jupiter.api.Assertions.*; public class AbstractQueryGeneratorTest { @Mock private EmptyQueryGenerator queryGenerator; - @Before + @BeforeEach public void setUp() { this.queryGenerator = new EmptyQueryGenerator(); } @@ -45,7 +46,7 @@ public void binaryOperatorPriorityPreserved() { final CosmosQuery query = new CosmosQuery(and); SqlQuerySpec querySpec = queryGenerator.generateCosmos(query); List<String> parameterNames = querySpec.getParameters().stream().map(SqlParameter::getName).collect(Collectors.toList()); - Assert.assertNotNull(querySpec.getQueryText()); + Assertions.assertNotNull(querySpec.getQueryText()); MatcherAssert.assertThat(querySpec.getQueryText(), Matchers.stringContainsInOrder( parameterNames.get(0), CriteriaType.AND.getSqlKeyword(), "(", parameterNames.get(1), CriteriaType.OR.getSqlKeyword(), parameterNames.get(2), ")")); @@ -60,7 +61,7 @@ public void generateBinaryQueryWithStartsWithDoesNotUseUpper() { SqlQuerySpec result = queryGenerator.generateCosmos(query); - Assert.assertEquals(result.getQueryText(), " WHERE STARTSWITH(r.firstName, @firstName0, true) "); + assertEquals(result.getQueryText(), " WHERE STARTSWITH(r.firstName, @firstName0, true) "); } @Test @@ -72,7 +73,7 @@ public void generateBinaryQueryWithSort() { SqlQuerySpec result = queryGenerator.generateCosmos(query); - Assert.assertEquals(result.getQueryText(), " WHERE ARRAY_CONTAINS(UPPER(r.lastName), UPPER(@lastName0)) ORDER BY r.id ASC"); + assertEquals(result.getQueryText(), " WHERE ARRAY_CONTAINS(UPPER(r.lastName), UPPER(@lastName0)) ORDER BY r.id ASC"); } @Test @@ -84,7 +85,7 @@ public void generateBinaryQueryWithArrayContainsUsesUpper() { SqlQuerySpec result = queryGenerator.generateCosmos(query); - Assert.assertEquals(result.getQueryText(), " WHERE ARRAY_CONTAINS(UPPER(r.lastName), UPPER(@lastName0)) "); + assertEquals(result.getQueryText(), " WHERE ARRAY_CONTAINS(UPPER(r.lastName), UPPER(@lastName0)) "); } @Test @@ -98,9 +99,9 @@ public void generateBinaryQueryWithStringEquals() { SqlQuerySpec result = queryGenerator.generateCosmos(query); if (ignoreCaseType == Part.IgnoreCaseType.NEVER) { - Assert.assertEquals(result.getQueryText(), " WHERE STRINGEQUALS(r.firstName, @firstName0) "); + assertEquals(result.getQueryText(), " WHERE STRINGEQUALS(r.firstName, @firstName0) "); } else { - Assert.assertEquals(result.getQueryText(), " WHERE STRINGEQUALS(r.firstName, @firstName0, true) "); + assertEquals(result.getQueryText(), " WHERE STRINGEQUALS(r.firstName, @firstName0, true) "); } } } @@ -114,7 +115,7 @@ public void generateBinaryQueryWithIsEqualIntUsesUpper() { SqlQuerySpec result = queryGenerator.generateCosmos(query); - Assert.assertEquals(result.getQueryText(), " WHERE UPPER(r.zipcode) = UPPER(@zipcode0) "); + assertEquals(result.getQueryText(), " WHERE UPPER(r.zipcode) = UPPER(@zipcode0) "); } @Test @@ -126,7 +127,7 @@ public void generateBinaryQueryWithIsEqualStringDoesNotUseUpper() { SqlQuerySpec result = queryGenerator.generateCosmos(query); - Assert.assertEquals(result.getQueryText(), " WHERE STRINGEQUALS(r.firstName, @firstName0, true) "); + assertEquals(result.getQueryText(), " WHERE STRINGEQUALS(r.firstName, @firstName0, true) "); } private static class EmptyQueryGenerator extends AbstractQueryGenerator implements QuerySpecGenerator { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/generator/NativeQueryGeneratorTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/generator/NativeQueryGeneratorTest.java index a21f4aeb60fc..e6c165623020 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/generator/NativeQueryGeneratorTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/generator/NativeQueryGeneratorTest.java @@ -6,9 +6,8 @@ import com.azure.cosmos.models.SqlParameter; import com.azure.cosmos.models.SqlQuerySpec; import com.azure.spring.data.cosmos.core.query.CosmosQuery; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.springframework.data.domain.Sort; @@ -16,13 +15,14 @@ import java.util.List; import static org.springframework.data.domain.Sort.Direction.ASC; +import static org.junit.jupiter.api.Assertions.*; public class NativeQueryGeneratorTest { @Mock private EmptyQueryGenerator queryGenerator; - @Before + @BeforeEach public void setUp() { this.queryGenerator = new EmptyQueryGenerator(); } @@ -35,7 +35,7 @@ public void generateSortedQueryTest() { SqlQuerySpec querySpec = new SqlQuerySpec("select * from a where a.firstName = @firstName", sqlParameters); final SqlQuerySpec sortedQuerySpec = NativeQueryGenerator.getInstance().generateSortedQuery(querySpec, Sort.by(ASC, "id")); - Assert.assertEquals(sortedQuerySpec.getQueryText(), "select * from a where a.firstName = @firstName ORDER BY a.id ASC"); + assertEquals(sortedQuerySpec.getQueryText(), "select * from a where a.firstName = @firstName ORDER BY a.id ASC"); } private static class EmptyQueryGenerator extends NativeQueryGenerator implements QuerySpecGenerator { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntityUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntityUnitTest.java index 7ae7ed2c90f9..345457579818 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntityUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntityUnitTest.java @@ -4,24 +4,26 @@ package com.azure.spring.data.cosmos.core.mapping; import com.azure.spring.data.cosmos.domain.Person; -import org.junit.Test; -import org.springframework.data.core.TypeInformation; +import org.junit.jupiter.api.Test; +import org.springframework.data.util.ClassTypeInformation; import static org.assertj.core.api.Assertions.assertThat; public class BasicCosmosPersistentEntityUnitTest { + @SuppressWarnings({"deprecation", "removal"}) @Test public void testGetCollection() { final BasicCosmosPersistentEntity<Person> entity = new BasicCosmosPersistentEntity<Person>( - TypeInformation.of(Person.class)); + ClassTypeInformation.from(Person.class)); assertThat(entity.getContainer()).isEqualTo(""); } + @SuppressWarnings({"deprecation", "removal"}) @Test public void testGetLanguage() { final BasicCosmosPersistentEntity<Person> entity = new BasicCosmosPersistentEntity<Person>( - TypeInformation.of(Person.class)); + ClassTypeInformation.from(Person.class)); assertThat(entity.getLanguage()).isEqualTo(""); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/CosmosMappingContextUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/CosmosMappingContextUnitTest.java index 2ed4fbbdc906..506f5034267f 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/CosmosMappingContextUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/CosmosMappingContextUnitTest.java @@ -3,7 +3,7 @@ package com.azure.spring.data.cosmos.core.mapping; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.springframework.context.ApplicationContext; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorIT.java index e2e6ef889a99..200d92e55202 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorIT.java @@ -10,22 +10,21 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.AddressRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS1_PARTITION1; +import static org.junit.jupiter.api.Assertions.assertThrows; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = {TestRepositoryConfig.class, ErrorEventListenerConfig.class}) public class ApplicationContextEventErrorIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -33,14 +32,16 @@ public class ApplicationContextEventErrorIT { @Autowired private CosmosTemplate template; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); repository.saveAll(Lists.newArrayList(TEST_ADDRESS1_PARTITION1)); } - @Test(expected = CosmosAccessException.class) + @Test public void shouldThrowExceptionIfEventListenerThrowsException() { - repository.findById(TEST_ADDRESS1_PARTITION1.getPostalCode(), new PartitionKey(TEST_ADDRESS1_PARTITION1.getCity())); + assertThrows(CosmosAccessException.class, () -> + repository.findById(TEST_ADDRESS1_PARTITION1.getPostalCode(), + new PartitionKey(TEST_ADDRESS1_PARTITION1.getCity()))); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorReactiveIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorReactiveIT.java index 95fc0f2d2af6..5db9dea65ea7 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorReactiveIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventErrorReactiveIT.java @@ -10,22 +10,20 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveAddressRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS1_PARTITION1; +import static org.junit.jupiter.api.Assertions.assertThrows; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = {TestRepositoryConfig.class, ErrorEventListenerConfig.class}) public class ApplicationContextEventErrorReactiveIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -33,14 +31,12 @@ public class ApplicationContextEventErrorReactiveIT { @Autowired private CosmosTemplate template; - @Before - public void setUp() { - collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); - repository.saveAll(Lists.newArrayList(TEST_ADDRESS1_PARTITION1)).collectList().block(); - } - - @Test(expected = CosmosAccessException.class) + @Test public void shouldThrowExceptionIfEventListenerThrowsException() { - repository.findById(TEST_ADDRESS1_PARTITION1.getPostalCode(), new PartitionKey(TEST_ADDRESS1_PARTITION1.getCity())).block(); + assertThrows(CosmosAccessException.class, () -> { + collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); + repository.saveAll(Lists.newArrayList(TEST_ADDRESS1_PARTITION1)).collectList().block(); + repository.findById(TEST_ADDRESS1_PARTITION1.getPostalCode(), new PartitionKey(TEST_ADDRESS1_PARTITION1.getCity())).block(); + }); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventIT.java index 173de249f221..f63cd324cd57 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventIT.java @@ -11,15 +11,12 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.AddressRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.List; @@ -30,12 +27,11 @@ import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS4_PARTITION3; import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ApplicationContextEventIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -45,11 +41,9 @@ public class ApplicationContextEventIT { @Autowired private SimpleCosmosMappingEventListener simpleCosmosMappingEventListener; - @SuppressWarnings("deprecation") - @Rule - public ExpectedException expectedException = ExpectedException.none(); - @Before + + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); repository.saveAll(Lists.newArrayList(TEST_ADDRESS1_PARTITION1, TEST_ADDRESS1_PARTITION2, diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventReactiveIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventReactiveIT.java index 8a3e88ac1395..4ce9f3e4a148 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventReactiveIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/ApplicationContextEventReactiveIT.java @@ -10,15 +10,12 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveAddressRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.List; @@ -29,12 +26,11 @@ import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS4_PARTITION3; import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ApplicationContextEventReactiveIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -44,11 +40,9 @@ public class ApplicationContextEventReactiveIT { @Autowired private SimpleCosmosMappingEventListener simpleCosmosMappingEventListener; - @SuppressWarnings("deprecation") - @Rule - public ExpectedException expectedException = ExpectedException.none(); - @Before + + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); repository.saveAll(Lists.newArrayList(TEST_ADDRESS1_PARTITION1, TEST_ADDRESS1_PARTITION2, diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/CosmosEventListenerUnitTests.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/CosmosEventListenerUnitTests.java index e604fdddd8a9..50339dc8194b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/CosmosEventListenerUnitTests.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/event/CosmosEventListenerUnitTests.java @@ -7,7 +7,7 @@ import com.azure.spring.data.cosmos.domain.Student; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.NullNode; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CosmosQueryUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CosmosQueryUnitTest.java index 39e0e584129a..6a163bc57a7d 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CosmosQueryUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CosmosQueryUnitTest.java @@ -2,8 +2,7 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.core.query; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.data.repository.query.parser.Part; @@ -12,6 +11,7 @@ import static com.azure.spring.data.cosmos.common.TestConstants.CRITERIA_KEY; import static com.azure.spring.data.cosmos.common.TestConstants.CRITERIA_OBJECT; +import static org.junit.jupiter.api.Assertions.*; public class CosmosQueryUnitTest { @@ -22,9 +22,9 @@ public void testDocumentQueryCreate() { final CosmosQuery query = new CosmosQuery(criteria); - Assert.assertEquals(criteria, query.getCriteria()); - Assert.assertEquals(Sort.unsorted(), query.getSort()); - Assert.assertEquals(Pageable.unpaged(), query.getPageable()); - Assert.assertEquals(Part.IgnoreCaseType.NEVER, criteria.getIgnoreCase()); + assertEquals(criteria, query.getCriteria()); + assertEquals(Sort.unsorted(), query.getSort()); + assertEquals(Pageable.unpaged(), query.getPageable()); + assertEquals(Part.IgnoreCaseType.NEVER, criteria.getIgnoreCase()); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CriteriaUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CriteriaUnitTest.java index 3ac5bdd4e561..70eac9006d0b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CriteriaUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/query/CriteriaUnitTest.java @@ -4,8 +4,8 @@ import com.azure.spring.data.cosmos.core.generator.FindQuerySpecGenerator; import com.azure.spring.data.cosmos.exception.IllegalQueryException; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; import org.springframework.data.repository.query.parser.Part; import java.util.Arrays; @@ -14,6 +14,7 @@ import static com.azure.spring.data.cosmos.common.TestConstants.CRITERIA_KEY; import static com.azure.spring.data.cosmos.common.TestConstants.CRITERIA_OBJECT; +import static org.junit.jupiter.api.Assertions.*; public class CriteriaUnitTest { @@ -23,12 +24,12 @@ public void testUnaryCriteria() { final Criteria criteria = Criteria.getInstance(CriteriaType.IS_EQUAL, CRITERIA_KEY, values, Part.IgnoreCaseType.NEVER); - Assert.assertTrue(criteria.getSubCriteria().isEmpty()); - Assert.assertEquals(values, criteria.getSubjectValues()); - Assert.assertEquals(CriteriaType.IS_EQUAL, criteria.getType()); - Assert.assertEquals(CRITERIA_KEY, criteria.getSubject()); - Assert.assertTrue(CriteriaType.isBinary(criteria.getType())); - Assert.assertEquals(Part.IgnoreCaseType.NEVER, criteria.getIgnoreCase()); + Assertions.assertTrue(criteria.getSubCriteria().isEmpty()); + assertEquals(values, criteria.getSubjectValues()); + assertEquals(CriteriaType.IS_EQUAL, criteria.getType()); + assertEquals(CRITERIA_KEY, criteria.getSubject()); + Assertions.assertTrue(CriteriaType.isBinary(criteria.getType())); + assertEquals(Part.IgnoreCaseType.NEVER, criteria.getIgnoreCase()); } @Test @@ -40,37 +41,41 @@ public void testBinaryCriteria() { CRITERIA_OBJECT, values, Part.IgnoreCaseType.NEVER); final Criteria criteria = Criteria.getInstance(CriteriaType.AND, leftCriteria, rightCriteria); - Assert.assertNotNull(criteria.getSubCriteria()); - Assert.assertNull(criteria.getSubjectValues()); - Assert.assertNull(criteria.getSubject()); - Assert.assertEquals(criteria.getType(), CriteriaType.AND); - Assert.assertTrue(CriteriaType.isClosed(criteria.getType())); + Assertions.assertNotNull(criteria.getSubCriteria()); + Assertions.assertNull(criteria.getSubjectValues()); + Assertions.assertNull(criteria.getSubject()); + assertEquals(criteria.getType(), CriteriaType.AND); + Assertions.assertTrue(CriteriaType.isClosed(criteria.getType())); - Assert.assertEquals(2, criteria.getSubCriteria().size()); - Assert.assertEquals(leftCriteria, criteria.getSubCriteria().get(0)); - Assert.assertEquals(rightCriteria, criteria.getSubCriteria().get(1)); + assertEquals(2, criteria.getSubCriteria().size()); + assertEquals(leftCriteria, criteria.getSubCriteria().get(0)); + assertEquals(rightCriteria, criteria.getSubCriteria().get(1)); - Assert.assertEquals(Part.IgnoreCaseType.NEVER, criteria.getSubCriteria().get(0).getIgnoreCase()); - Assert.assertEquals(Part.IgnoreCaseType.NEVER, criteria.getSubCriteria().get(1).getIgnoreCase()); + assertEquals(Part.IgnoreCaseType.NEVER, criteria.getSubCriteria().get(0).getIgnoreCase()); + assertEquals(Part.IgnoreCaseType.NEVER, criteria.getSubCriteria().get(1).getIgnoreCase()); } - @Test(expected = IllegalQueryException.class) + @Test public void testInvalidInKeywordParameter() { - final List<Object> values = Collections.singletonList(CRITERIA_OBJECT); - final Criteria criteria = Criteria.getInstance(CriteriaType.IN, - CRITERIA_KEY, values, Part.IgnoreCaseType.NEVER); - final CosmosQuery query = new CosmosQuery(criteria); + assertThrows(IllegalQueryException.class, () -> { + final List<Object> values = Collections.singletonList(CRITERIA_OBJECT); + final Criteria criteria = Criteria.getInstance(CriteriaType.IN, + CRITERIA_KEY, values, Part.IgnoreCaseType.NEVER); + final CosmosQuery query = new CosmosQuery(criteria); - new FindQuerySpecGenerator().generateCosmos(query); + new FindQuerySpecGenerator().generateCosmos(query); + }); } - @Test(expected = IllegalQueryException.class) + @Test public void testInvalidInKeywordType() { - final List<Object> values = Collections.singletonList(new IllegalQueryException("")); - final Criteria criteria = Criteria.getInstance(CriteriaType.IN, - CRITERIA_KEY, values, Part.IgnoreCaseType.NEVER); - final CosmosQuery query = new CosmosQuery(criteria); + assertThrows(IllegalQueryException.class, () -> { + final List<Object> values = Collections.singletonList(new IllegalQueryException("")); + final Criteria criteria = Criteria.getInstance(CriteriaType.IN, + CRITERIA_KEY, values, Part.IgnoreCaseType.NEVER); + final CosmosQuery query = new CosmosQuery(criteria); - new FindQuerySpecGenerator().generateCosmos(query); + new FindQuerySpecGenerator().generateCosmos(query); + }); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtilsTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtilsTest.java index 0ff893eeea00..917f93b74faf 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtilsTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/exception/CosmosExceptionUtilsTest.java @@ -5,11 +5,11 @@ import com.azure.cosmos.BridgeInternal; import com.azure.cosmos.CosmosException; import com.azure.spring.data.cosmos.core.ResponseDiagnosticsProcessor; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.springframework.http.HttpStatus; -import static org.junit.Assert.assertThrows; +import static org.junit.jupiter.api.Assertions.assertThrows; public class CosmosExceptionUtilsTest { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/CosmosAnnotationUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/CosmosAnnotationUnitTest.java index 73f2c734de4c..4a40d9a968a7 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/CosmosAnnotationUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/CosmosAnnotationUnitTest.java @@ -11,8 +11,8 @@ import com.azure.spring.data.cosmos.domain.Role; import com.azure.spring.data.cosmos.domain.TimeToLiveSample; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.util.Assert; @@ -20,7 +20,7 @@ public class CosmosAnnotationUnitTest { private CosmosEntityInformation<NoDBAnnotationPerson, String> personInfo; private CosmosEntityInformation<Role, String> roleInfo; - @Before + @BeforeEach public void setUp() { personInfo = new CosmosEntityInformation<>(NoDBAnnotationPerson.class); roleInfo = new CosmosEntityInformation<>(Role.class); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/EntityImplRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/EntityImplRepositoryIT.java index c78d31b87851..810c102903cf 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/EntityImplRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/EntityImplRepositoryIT.java @@ -12,24 +12,22 @@ import com.azure.spring.data.cosmos.repository.repository.EntityImplRepository; import com.azure.spring.data.cosmos.repository.repository.ParentEntityRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Iterator; import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class EntityImplRepositoryIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -53,7 +51,7 @@ public class EntityImplRepositoryIT { private final ParentEntity PARENTENTITY_1 = new ParentEntity(); private final ParentEntity PARENTENTITY_2 = new ParentEntity(); - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); ENTITYIMPL_1.setId("entityImpl1"); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/MultiCosmosTemplateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/MultiCosmosTemplateIT.java index dd6f85c54679..d32512bbe743 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/MultiCosmosTemplateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/MultiCosmosTemplateIT.java @@ -10,23 +10,21 @@ import com.azure.spring.data.cosmos.core.ReactiveCosmosTemplate; import com.azure.spring.data.cosmos.domain.Person; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.assertj.core.api.Assertions; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Mono; import java.lang.reflect.Field; import static com.azure.spring.data.cosmos.common.TestConstants.AGE; import static com.azure.spring.data.cosmos.common.TestConstants.PASSPORT_IDS_BY_COUNTRY; +import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = {TestRepositoryConfig.class, SecondaryTestRepositoryConfig.class}) public class MultiCosmosTemplateIT { private static final Person PRIMARY_TEST_PERSON = new Person(TestConstants.ID_1, TestConstants.FIRST_NAME, @@ -34,7 +32,7 @@ public class MultiCosmosTemplateIT { private static final Person SECONDARY_TEST_PERSON = new Person(TestConstants.ID_2, TestConstants.NEW_FIRST_NAME, TestConstants.NEW_LAST_NAME, TestConstants.HOBBIES, TestConstants.ADDRESSES, AGE, PASSPORT_IDS_BY_COUNTRY); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager primaryCollectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -54,7 +52,7 @@ public void testPrimaryTemplate() { primaryReactiveCosmosTemplate.insert(PRIMARY_TEST_PERSON, new PartitionKey(personInfo.getPartitionKeyFieldValue(PRIMARY_TEST_PERSON))).block(); final Mono<Person> findById = primaryReactiveCosmosTemplate.findById(PRIMARY_TEST_PERSON.getId(), Person.class); - Assertions.assertThat(findById.block().getFirstName()).isEqualTo(TestConstants.FIRST_NAME); + assertThat(findById.block().getFirstName()).isEqualTo(TestConstants.FIRST_NAME); } @Test @@ -63,7 +61,7 @@ public void testSecondaryTemplate() { secondaryReactiveCosmosTemplate.insert(SECONDARY_TEST_PERSON, new PartitionKey(personInfo.getPartitionKeyFieldValue(SECONDARY_TEST_PERSON))).block(); final Mono<Person> findById = secondaryReactiveCosmosTemplate.findById(SECONDARY_TEST_PERSON.getId(), Person.class); - Assertions.assertThat(findById.block().getFirstName()).isEqualTo(TestConstants.NEW_FIRST_NAME); + assertThat(findById.block().getFirstName()).isEqualTo(TestConstants.NEW_FIRST_NAME); secondaryReactiveCosmosTemplate.deleteAll(Person.class.getSimpleName(), Person.class).block(); secondaryReactiveCosmosTemplate.deleteContainer(personInfo.getContainerName()); } @@ -74,7 +72,7 @@ public void testSecondaryTemplateWithDiffDatabase() { secondaryDiffDatabaseReactiveCosmosTemplate.insert(SECONDARY_TEST_PERSON, new PartitionKey(personInfo.getPartitionKeyFieldValue(SECONDARY_TEST_PERSON))).block(); final Mono<Person> findById = secondaryDiffDatabaseReactiveCosmosTemplate.findById(SECONDARY_TEST_PERSON.getId(), Person.class); - Assertions.assertThat(findById.block().getFirstName()).isEqualTo(TestConstants.NEW_FIRST_NAME); + assertThat(findById.block().getFirstName()).isEqualTo(TestConstants.NEW_FIRST_NAME); secondaryDiffDatabaseReactiveCosmosTemplate.deleteAll(Person.class.getSimpleName(), Person.class).block(); secondaryDiffDatabaseReactiveCosmosTemplate.deleteContainer(personInfo.getContainerName()); } @@ -87,6 +85,6 @@ public void testSingleCosmosClientForMultipleCosmosTemplate() throws IllegalAcce CosmosAsyncClient client1 = cosmosFactory1.getCosmosAsyncClient(); CosmosFactory cosmosFactory2 = (CosmosFactory) cosmosFactory.get(secondaryDiffDatabaseReactiveCosmosTemplate); CosmosAsyncClient client2 = cosmosFactory2.getCosmosAsyncClient(); - Assertions.assertThat(client1).isEqualTo(client2); + assertThat(client1).isEqualTo(client2); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/ReactiveUUIDIdDomainRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/ReactiveUUIDIdDomainRepositoryIT.java index 6d45b92fd2c8..ce726a3a3c93 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/ReactiveUUIDIdDomainRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/ReactiveUUIDIdDomainRepositoryIT.java @@ -9,13 +9,12 @@ import com.azure.spring.data.cosmos.exception.CosmosNotFoundException; import com.azure.spring.data.cosmos.repository.repository.ReactiveUUIDIdDomainRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -24,8 +23,9 @@ import java.util.Objects; import java.util.UUID; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +import static org.junit.jupiter.api.Assertions.assertThrows; + +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveUUIDIdDomainRepositoryIT { @@ -38,7 +38,7 @@ public class ReactiveUUIDIdDomainRepositoryIT { private static final UUIDIdDomain DOMAIN_1 = new UUIDIdDomain(ID_1, NAME_1); private static final UUIDIdDomain DOMAIN_2 = new UUIDIdDomain(ID_2, NAME_2); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -49,7 +49,7 @@ public class ReactiveUUIDIdDomainRepositoryIT { private CosmosEntityInformation<UUIDIdDomain, ?> entityInformation; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, UUIDIdDomain.class); entityInformation = collectionManager.getEntityInformation(UUIDIdDomain.class); @@ -78,9 +78,10 @@ public void testUUIDIdDomain() { StepVerifier.create(afterDelIdMono).expectNextCount(0).verifyComplete(); } - @Test(expected = IllegalArgumentException.class) + @Test public void testInvalidDomain() { - new CosmosEntityInformation<InvalidDomain, Long>(InvalidDomain.class); + assertThrows(IllegalArgumentException.class, () -> + new CosmosEntityInformation<InvalidDomain, Long>(InvalidDomain.class)); } @Test diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryIllegalTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryIllegalTest.java index 053ebd265c0c..b3819234d44a 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryIllegalTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryIllegalTest.java @@ -8,13 +8,15 @@ import com.azure.spring.data.cosmos.domain.Person; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.repository.support.SimpleCosmosRepository; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; -@RunWith(MockitoJUnitRunner.class) +import static org.junit.jupiter.api.Assertions.assertThrows; + +@ExtendWith(MockitoExtension.class) public class SimpleCosmosRepositoryIllegalTest { private SimpleCosmosRepository<Person, String> repository; @@ -23,49 +25,49 @@ public class SimpleCosmosRepositoryIllegalTest { @Mock CosmosEntityInformation<Person, String> entityInformation; - @Before + @BeforeEach public void setUp() { CosmosContainerProperties containerProperties = new CosmosContainerProperties("", new PartitionKeyDefinition()); repository = new SimpleCosmosRepository<>(entityInformation, dbOperations); } - @Test(expected = IllegalArgumentException.class) + @Test public void deleteNullShouldFail() { - repository.delete(null); + assertThrows(IllegalArgumentException.class, () -> repository.delete(null)); } - @Test(expected = IllegalArgumentException.class) + @Test public void deleteIterableNullShouldFail() { - repository.deleteAll(null); + assertThrows(IllegalArgumentException.class, () -> repository.deleteAll(null)); } - @Test(expected = IllegalArgumentException.class) + @Test public void deleteNullIdShouldFail() { - repository.deleteById(null); + assertThrows(IllegalArgumentException.class, () -> repository.deleteById(null)); } - @Test(expected = IllegalArgumentException.class) + @Test public void existsNullIdShouldFail() { - repository.existsById(null); + assertThrows(IllegalArgumentException.class, () -> repository.existsById(null)); } - @Test(expected = IllegalArgumentException.class) + @Test public void findNullIterableIdsShouldFail() { - repository.findAllById(null); + assertThrows(IllegalArgumentException.class, () -> repository.findAllById(null)); } - @Test(expected = IllegalArgumentException.class) + @Test public void findByNullIdShouldFail() { - repository.findById(null); + assertThrows(IllegalArgumentException.class, () -> repository.findById(null)); } - @Test(expected = IllegalArgumentException.class) + @Test public void saveNullShouldFail() { - repository.save(null); + assertThrows(IllegalArgumentException.class, () -> repository.save(null)); } - @Test(expected = IllegalArgumentException.class) + @Test public void saveNullIterableShouldFail() { - repository.saveAll(null); + assertThrows(IllegalArgumentException.class, () -> repository.saveAll(null)); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryUnitTest.java index 74270cf1c380..7315ebc9955d 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/SimpleCosmosRepositoryUnitTest.java @@ -10,23 +10,23 @@ import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.repository.support.SimpleCosmosRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.util.Arrays; import java.util.List; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.lenient; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class SimpleCosmosRepositoryUnitTest { private static final Person TEST_PERSON = new Person(TestConstants.ID_1, TestConstants.FIRST_NAME, TestConstants.LAST_NAME, @@ -41,15 +41,13 @@ public class SimpleCosmosRepositoryUnitTest { @Mock CosmosEntityInformation<Person, String> entityInformation; - @SuppressWarnings("deprecation") - @Rule - public ExpectedException expectedException = ExpectedException.none(); + - @Before + @BeforeEach public void setUp() { when(entityInformation.getJavaType()).thenReturn(Person.class); when(entityInformation.getContainerName()).thenReturn(Person.class.getSimpleName()); - when(cosmosOperations.findAll(anyString(), any())).thenReturn(Arrays.asList(TEST_PERSON)); + lenient().when(cosmosOperations.findAll(anyString(), any())).thenReturn(Arrays.asList(TEST_PERSON)); repository = new SimpleCosmosRepository<>(entityInformation, cosmosOperations); } @@ -75,15 +73,15 @@ public void testFindOne() { @Test public void testFindOneExceptionForPartitioned() { - expectedException.expect(UnsupportedOperationException.class); - expectedException.expectMessage(PARTITION_VALUE_REQUIRED_MSG); - repository.save(TEST_PERSON); when(cosmosOperations.findById(anyString(), anyString(), any())) .thenThrow(new UnsupportedOperationException(PARTITION_VALUE_REQUIRED_MSG)); - final Person result = repository.findById(TEST_PERSON.getId()).get(); + UnsupportedOperationException exception = assertThrows(UnsupportedOperationException.class, () -> { + repository.findById(TEST_PERSON.getId()).get(); + }); + assertEquals(PARTITION_VALUE_REQUIRED_MSG, exception.getMessage()); } @Test diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/CosmosRepositoryConfigurationExtensionUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/CosmosRepositoryConfigurationExtensionUnitTest.java index 73945c6eeee2..ee084a625675 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/CosmosRepositoryConfigurationExtensionUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/CosmosRepositoryConfigurationExtensionUnitTest.java @@ -4,7 +4,7 @@ package com.azure.spring.data.cosmos.repository.config; import com.azure.spring.data.cosmos.repository.CosmosRepository; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.core.env.Environment; import org.springframework.core.env.StandardEnvironment; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/ReactiveCosmosRepositoryConfigurationExtensionUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/ReactiveCosmosRepositoryConfigurationExtensionUnitTest.java index 57e518e03ef6..562bcb39a5c3 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/ReactiveCosmosRepositoryConfigurationExtensionUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/config/ReactiveCosmosRepositoryConfigurationExtensionUnitTest.java @@ -4,7 +4,7 @@ package com.azure.spring.data.cosmos.repository.config; import com.azure.spring.data.cosmos.repository.ReactiveCosmosRepository; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.core.env.Environment; import org.springframework.core.env.StandardEnvironment; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java index 4dc0bf9260bb..e76518ac9384 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryIT.java @@ -2,6 +2,9 @@ // Licensed under the MIT License. package com.azure.spring.data.cosmos.repository.integration; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; + import com.azure.cosmos.models.CosmosPatchItemRequestOptions; import com.azure.cosmos.models.CosmosPatchOperations; import com.azure.cosmos.models.PartitionKey; @@ -16,16 +19,13 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.AddressRepository; import org.assertj.core.util.Lists; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; + + +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Arrays; import java.util.Comparator; @@ -40,13 +40,13 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.*; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class AddressRepositoryIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -61,9 +61,6 @@ public class AddressRepositoryIT { @Autowired private ResponseDiagnosticsTestUtils responseDiagnosticsTestUtils; - @SuppressWarnings("deprecation") - @Rule - public ExpectedException expectedException = ExpectedException.none(); CosmosPatchOperations patchSetOperation = CosmosPatchOperations .create() @@ -80,7 +77,7 @@ public class AddressRepositoryIT { private static final CosmosPatchItemRequestOptions options = new CosmosPatchItemRequestOptions(); - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); repository.saveAll(Lists.newArrayList(TEST_ADDRESS1_PARTITION1, TEST_ADDRESS1_PARTITION2, @@ -168,8 +165,8 @@ public void testFindByStreetOrCity() { result.sort(Comparator.comparing(Address::getPostalCode)); reference.sort(Comparator.comparing(Address::getPostalCode)); - Assert.assertEquals(reference.size(), result.size()); - Assert.assertEquals(reference, result); + assertEquals(reference.size(), result.size()); + assertEquals(reference, result); } @Test @@ -184,9 +181,8 @@ public void testCount() { @Test public void deleteWithoutPartitionedColumnShouldFail() { - expectedException.expect(Exception.class); - - repository.deleteById(TEST_ADDRESS1_PARTITION1.getPostalCode()); + assertThrows(Exception.class, () -> + repository.deleteById(TEST_ADDRESS1_PARTITION1.getPostalCode())); } @Test @@ -303,7 +299,7 @@ public void testPatchPreConditionFail() { options.setFilterPredicate("FROM address a WHERE a.city = 'dummy'"); Address patchedAddress = repository.save(TestConstants.POSTAL_CODE, new PartitionKey(CITY), Address.class, patchSetOperation, options); assertThat(patchedAddress.getStreet()).isEqualTo(TestConstants.NEW_STREET); - Assert.fail(); + Assertions.fail(); } catch (CosmosAccessException ex) { assertThat(ex.getCosmosException().getStatusCode()).isEqualTo(TestConstants.PRECONDITION_FAILED_STATUS_CODE); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryNoMetricsIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryNoMetricsIT.java index def09ae4b120..a86dd3896023 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryNoMetricsIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AddressRepositoryNoMetricsIT.java @@ -11,13 +11,12 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryNoMetricsConfig; import com.azure.spring.data.cosmos.repository.repository.AddressRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.List; @@ -27,12 +26,11 @@ import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS4_PARTITION3; import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryNoMetricsConfig.class) public class AddressRepositoryNoMetricsIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -48,7 +46,7 @@ public class AddressRepositoryNoMetricsIT { private ResponseDiagnosticsTestUtils responseDiagnosticsTestUtils; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); repository.saveAll(Lists.newArrayList(TEST_ADDRESS1_PARTITION1, TEST_ADDRESS1_PARTITION2, diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AnnotatedQueryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AnnotatedQueryIT.java index d7d36742504a..9919bd9cb865 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AnnotatedQueryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AnnotatedQueryIT.java @@ -12,17 +12,16 @@ import com.azure.spring.data.cosmos.repository.repository.AddressRepository; import com.azure.spring.data.cosmos.repository.repository.AuditableRepository; import com.fasterxml.jackson.databind.JsonNode; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Slice; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.time.LocalDate; import java.util.ArrayList; @@ -38,12 +37,11 @@ import static com.azure.spring.data.cosmos.common.TestConstants.PAGE_SIZE_2; import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class AnnotatedQueryIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -55,7 +53,7 @@ public class AnnotatedQueryIT { @Autowired private AddressRepository addressRepository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class, AuditableEntity.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AuditableIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AuditableIT.java index 906ceb2a3300..8a539413d389 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AuditableIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/AuditableIT.java @@ -18,14 +18,13 @@ import com.azure.spring.data.cosmos.repository.repository.AuditableIdGeneratedRepository; import com.azure.spring.data.cosmos.repository.repository.AuditableRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.repository.query.parser.Part; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.time.OffsetDateTime; import java.time.ZoneId; @@ -35,15 +34,14 @@ import java.util.UUID; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class AuditableIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -57,7 +55,7 @@ public class AuditableIT { @Autowired private StubAuditorProvider stubAuditorProvider; - @Before + @BeforeEach public void setup() { collectionManager.ensureContainersCreatedAndEmpty(cosmosTemplate, AuditableEntity.class, AuditableIdGeneratedEntity.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BasicItemRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BasicItemRepositoryIT.java index 4250a3263a22..8cc0756773dc 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BasicItemRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BasicItemRepositoryIT.java @@ -12,14 +12,13 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.BasicItemRepository; import org.assertj.core.util.Lists; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.Arrays; @@ -27,13 +26,13 @@ import static com.azure.spring.data.cosmos.common.TestConstants.ID_1; import static com.azure.spring.data.cosmos.common.TestConstants.ID_2; +import static org.junit.jupiter.api.Assertions.*; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class BasicItemRepositoryIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -52,7 +51,7 @@ public class BasicItemRepositoryIT { private static final BasicItem BASIC_ITEM_2 = new BasicItem(ID_2); - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); repository.saveAll(Lists.newArrayList(BASIC_ITEM_1, BASIC_ITEM_2)); @@ -62,9 +61,9 @@ public void setUp() { public void testFindAllById() { final Iterable<BasicItem> allById = TestUtils.toList(this.repository.findAllById(Arrays.asList(BASIC_ITEM_1.getId(), BASIC_ITEM_2.getId()))); - Assert.assertTrue(((ArrayList) allById).size() == 2); + Assertions.assertTrue(((ArrayList) allById).size() == 2); Iterator<BasicItem> it = allById.iterator(); - Assert.assertEquals(BASIC_ITEM_1, it.next()); - Assert.assertEquals(BASIC_ITEM_2, it.next()); + assertEquals(BASIC_ITEM_1, it.next()); + assertEquals(BASIC_ITEM_2, it.next()); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BigTypeRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BigTypeRepositoryIT.java index 154687740a8f..f6fb2e6c309c 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BigTypeRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/BigTypeRepositoryIT.java @@ -3,21 +3,18 @@ package com.azure.spring.data.cosmos.repository.integration; import com.azure.spring.data.cosmos.IntegrationTestCollectionManager; -import com.azure.spring.data.cosmos.common.ResponseDiagnosticsTestUtils; import com.azure.spring.data.cosmos.common.TestUtils; -import com.azure.spring.data.cosmos.config.CosmosConfig; import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.domain.BigType; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.BigTypeRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.math.BigDecimal; import java.math.BigInteger; @@ -25,12 +22,11 @@ import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class BigTypeRepositoryIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -49,7 +45,7 @@ public class BigTypeRepositoryIT { private BigType TEST_BIGTYPES_2 = new BigType("2", "BigType2", bigDecimal2, bigInteger2); - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, BigType.class); repository.saveAll(Lists.newArrayList(TEST_BIGTYPES_1, TEST_BIGTYPES_2)); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CompositeIndexIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CompositeIndexIT.java index 33bd3def7a7e..e56206b4bd6f 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CompositeIndexIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CompositeIndexIT.java @@ -15,27 +15,25 @@ import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.repository.support.SimpleCosmosRepository; import com.azure.spring.data.cosmos.repository.support.SimpleReactiveCosmosRepository; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.List; import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CompositeIndexIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -46,12 +44,12 @@ public class CompositeIndexIT { CosmosEntityInformation<CompositeIndexEntity, String> information = new CosmosEntityInformation<>(CompositeIndexEntity.class); - @Before + @BeforeEach public void setup() { collectionManager.ensureContainersCreatedAndEmpty(template, CompositeIndexEntity.class); } - @AfterClass + @AfterAll public static void cleanUp() { collectionManager.deleteContainer(new CosmosEntityInformation<>(CompositeIndexEntity.class)); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java index c8705ef53fbd..235fee153ec0 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ContactRepositoryIT.java @@ -10,14 +10,13 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ContactRepository; import org.assertj.core.util.Lists; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.Arrays; @@ -27,9 +26,10 @@ import java.util.concurrent.atomic.AtomicInteger; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertThrows; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ContactRepositoryIT { @@ -42,7 +42,7 @@ public class ContactRepositoryIT { private static final Contact TEST_CONTACT4 = new Contact("testId4", "faketitle4", INT_VALUE_3, true); private static final Contact TEST_CONTACT5 = new Contact("testId5", "faketitle3", INT_VALUE_3, true); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -51,7 +51,7 @@ public class ContactRepositoryIT { @Autowired private CosmosTemplate template; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Contact.class); repository.save(TEST_CONTACT1); @@ -66,7 +66,7 @@ public void testFindAll() { final List<Contact> result = TestUtils.toList(repository.findAll()); assertThat(result.size()).isEqualTo(5); - Assert.assertEquals(Arrays.asList(TEST_CONTACT1, TEST_CONTACT2, TEST_CONTACT3, TEST_CONTACT4, + assertEquals(Arrays.asList(TEST_CONTACT1, TEST_CONTACT2, TEST_CONTACT3, TEST_CONTACT4, TEST_CONTACT5), result); final Contact contact = repository.findById(TEST_CONTACT1.getLogicId()).get(); @@ -109,7 +109,7 @@ public void testCountAndDeleteEntity() { final List<Contact> result = TestUtils.toList(repository.findAll()); assertThat(result.size()).isEqualTo(5); - Assert.assertEquals(Arrays.asList(TEST_CONTACT1, TEST_CONTACT2, TEST_CONTACT3, TEST_CONTACT4, + assertEquals(Arrays.asList(TEST_CONTACT1, TEST_CONTACT2, TEST_CONTACT3, TEST_CONTACT4, TEST_CONTACT5), result); assertThat(result.get(0).getLogicId()).isEqualTo(TEST_CONTACT1.getLogicId()); assertThat(result.get(0).getTitle()).isEqualTo(TEST_CONTACT1.getTitle()); @@ -176,66 +176,68 @@ public void testCustomQuery() { public void testFindById() { final Optional<Contact> optional = repository.findById(TEST_CONTACT1.getLogicId()); - Assert.assertTrue(optional.isPresent()); - Assert.assertEquals(TEST_CONTACT1, optional.get()); - Assert.assertFalse(repository.findById("").isPresent()); + Assertions.assertTrue(optional.isPresent()); + assertEquals(TEST_CONTACT1, optional.get()); + Assertions.assertFalse(repository.findById("").isPresent()); } @Test public void testFindByIdNotFound() { final Optional<Contact> optional = repository.findById("unknown-id"); - Assert.assertFalse(optional.isPresent()); + Assertions.assertFalse(optional.isPresent()); } @Test public void testShouldFindSingleEntity() { final Contact contact = repository.findOneByTitle(TEST_CONTACT1.getTitle()); - Assert.assertEquals(TEST_CONTACT1, contact); + assertEquals(TEST_CONTACT1, contact); } @Test public void testShouldFindSingleOptionalEntity() { final Optional<Contact> contact = repository.findOptionallyByTitle(TEST_CONTACT1.getTitle()); - Assert.assertTrue(contact.isPresent()); - Assert.assertEquals(TEST_CONTACT1, contact.get()); + Assertions.assertTrue(contact.isPresent()); + assertEquals(TEST_CONTACT1, contact.get()); - Assert.assertFalse(repository.findOptionallyByTitle("not here").isPresent()); + Assertions.assertFalse(repository.findOptionallyByTitle("not here").isPresent()); } - @Test(expected = CosmosAccessException.class) + @Test public void testShouldFailIfMultipleResultsReturned() { - repository.save(new Contact("testId2", TEST_CONTACT1.getTitle())); + assertThrows(CosmosAccessException.class, () -> { + repository.save(new Contact("testId2", TEST_CONTACT1.getTitle())); - repository.findOneByTitle(TEST_CONTACT1.getTitle()); + repository.findOneByTitle(TEST_CONTACT1.getTitle()); + }); } @Test public void testShouldAllowListAndIterableResponses() { final List<Contact> contactList = TestUtils.toList(repository.findByTitle(TEST_CONTACT1.getTitle())); - Assert.assertEquals(TEST_CONTACT1, contactList.get(0)); - Assert.assertEquals(1, contactList.size()); + assertEquals(TEST_CONTACT1, contactList.get(0)); + assertEquals(1, contactList.size()); final Iterator<Contact> contactIterator = repository.findByLogicId(TEST_CONTACT1.getLogicId()).iterator(); - Assert.assertTrue(contactIterator.hasNext()); - Assert.assertEquals(TEST_CONTACT1, contactIterator.next()); - Assert.assertFalse(contactIterator.hasNext()); + Assertions.assertTrue(contactIterator.hasNext()); + assertEquals(TEST_CONTACT1, contactIterator.next()); + Assertions.assertFalse(contactIterator.hasNext()); } // @Test // public void testAnnotatedQueries() { // List<Contact> valueContacts = repository.getContactsByTitleAndValue(43, TEST_CONTACT5.getTitle()); -// Assert.assertEquals(1, valueContacts.size()); -// Assert.assertEquals(TEST_CONTACT5, valueContacts.get(0)); +// assertEquals(1, valueContacts.size()); +// assertEquals(TEST_CONTACT5, valueContacts.get(0)); // // List<Contact> contactsWithOffset = repository.getContactsWithOffsetLimit(1, 2); -// Assert.assertEquals(2, contactsWithOffset.size()); -// Assert.assertEquals(TEST_CONTACT2, contactsWithOffset.get(0)); -// Assert.assertEquals(TEST_CONTACT3, contactsWithOffset.get(1)); +// assertEquals(2, contactsWithOffset.size()); +// assertEquals(TEST_CONTACT2, contactsWithOffset.get(0)); +// assertEquals(TEST_CONTACT3, contactsWithOffset.get(1)); // // List<ObjectNode> groupByContacts = repository.selectGroupBy(); -// Assert.assertEquals(3, groupByContacts.size()); +// assertEquals(3, groupByContacts.size()); // } @Test diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CosmosAnnotationIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CosmosAnnotationIT.java index 03f30ae80758..360188db8650 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CosmosAnnotationIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CosmosAnnotationIT.java @@ -14,14 +14,12 @@ import com.azure.spring.data.cosmos.domain.TimeToLiveSample; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveRoleRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.util.Assert; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -30,9 +28,9 @@ import java.util.stream.Collectors; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertTrue; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CosmosAnnotationIT { @@ -43,7 +41,7 @@ public class CosmosAnnotationIT { private static final Role TEST_ROLE_3 = new Role(TestConstants.ID_3, true, TestConstants.LEVEL, TestConstants.ROLE_NAME); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -51,7 +49,7 @@ public class CosmosAnnotationIT { @Autowired private ReactiveRoleRepository repository; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { collectionManager.ensureContainersCreatedAndEmpty(cosmosTemplate, Role.class, TimeToLiveSample.class); repository.saveAll(Arrays.asList(TEST_ROLE_1, TEST_ROLE_2, TEST_ROLE_3)).collectList().block(); @@ -120,7 +118,7 @@ public void testTimeToLiveAnnotation() { public void testIndexingPolicyAnnotation() { final IndexingPolicy policy = collectionManager.getContainerProperties(Role.class).getIndexingPolicy(); - Assert.isTrue(policy.getIndexingMode() == TestConstants.INDEXING_POLICY_MODE, + assertTrue(policy.getIndexingMode() == TestConstants.INDEXING_POLICY_MODE, "unmatched collection policy indexing mode of class Role"); TestUtils.testIndexingPolicyPathsEquals(policy.getIncludedPaths() diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CountIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CountIT.java index a154dd599f8e..bad9cc5bf56e 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CountIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CountIT.java @@ -9,23 +9,21 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ContactRepository; import com.azure.spring.data.cosmos.repository.repository.ReactiveCourseRepository; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Arrays; +import static org.junit.jupiter.api.Assertions.*; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class CountIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -35,7 +33,7 @@ public class CountIT { @Autowired private CosmosTemplate template; - @Before + @BeforeEach public void setUp() throws ClassNotFoundException { collectionManager.ensureContainersCreatedAndEmpty(template, Contact.class, Course.class); } @@ -48,11 +46,11 @@ public void testCountByField() { Contact contact4 = new Contact("4", "other", 30, true); repository.saveAll(Arrays.asList(contact1, contact2, contact3, contact4)); - Assert.assertEquals(3, repository.countByTitle("title")); - Assert.assertEquals(1, repository.countByTitle("other")); + assertEquals(3, repository.countByTitle("title")); + assertEquals(1, repository.countByTitle("other")); - Assert.assertEquals(Long.valueOf(1), repository.countByTitleAndIntValue("title", 25)); - Assert.assertEquals(Long.valueOf(2), repository.countByTitleAndIntValue("title", 30)); + assertEquals(Long.valueOf(1), repository.countByTitleAndIntValue("title", 25)); + assertEquals(Long.valueOf(2), repository.countByTitleAndIntValue("title", 30)); } @Test @@ -62,11 +60,11 @@ public void testCountByQuery() { Contact contact3 = new Contact("3", "different"); repository.saveAll(Arrays.asList(contact1, contact2, contact3)); - Assert.assertEquals(2, repository.countByQueryWithPrimitive("same")); - Assert.assertEquals(1, repository.countByQueryWithPrimitive("different")); + assertEquals(2, repository.countByQueryWithPrimitive("same")); + assertEquals(1, repository.countByQueryWithPrimitive("different")); - Assert.assertEquals(Long.valueOf(2), repository.countByQueryWithNonPrimitive("same")); - Assert.assertEquals(Long.valueOf(1), repository.countByQueryWithNonPrimitive("different")); + assertEquals(Long.valueOf(2), repository.countByQueryWithNonPrimitive("same")); + assertEquals(Long.valueOf(1), repository.countByQueryWithNonPrimitive("different")); } @Test @@ -76,8 +74,8 @@ public void testReactiveCountByField() { Course course3 = new Course("3", "course2", "department"); reactiveRepository.saveAll(Arrays.asList(course1, course2, course3)).blockLast(); - Assert.assertEquals(Long.valueOf(2), reactiveRepository.countByName("course").block()); - Assert.assertEquals(Long.valueOf(1), reactiveRepository.countByName("course2").block()); + assertEquals(Long.valueOf(2), reactiveRepository.countByName("course").block()); + assertEquals(Long.valueOf(1), reactiveRepository.countByName("course2").block()); } @Test @@ -87,8 +85,8 @@ public void testReactiveCountByQuery() { Course course3 = new Course("3", "course2", "department"); reactiveRepository.saveAll(Arrays.asList(course1, course2, course3)).blockLast(); - Assert.assertEquals(Long.valueOf(2), reactiveRepository.countByQuery("course").block()); - Assert.assertEquals(Long.valueOf(1), reactiveRepository.countByQuery("course2").block()); + assertEquals(Long.valueOf(2), reactiveRepository.countByQuery("course").block()); + assertEquals(Long.valueOf(1), reactiveRepository.countByQuery("course2").block()); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CustomerRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CustomerRepositoryIT.java index 6c4932c62d98..5cd89414c62f 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CustomerRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/CustomerRepositoryIT.java @@ -8,23 +8,23 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.CustomerRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.lang.NonNull; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.List; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) @SuppressWarnings("deprecation") public class CustomerRepositoryIT { @@ -51,7 +51,7 @@ public class CustomerRepositoryIT { private static final Customer CUSTOMER_1 = new Customer(CUSTOMER_ID_1, CUSTOMER_LEVEL_1, USER_1); private static final Customer CUSTOMER_2 = new Customer(CUSTOMER_ID_2, CUSTOMER_LEVEL_1, USER_2); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -60,24 +60,24 @@ public class CustomerRepositoryIT { @Autowired private CosmosTemplate template; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Customer.class); this.repository.saveAll(Arrays.asList(CUSTOMER_0, CUSTOMER_1, CUSTOMER_2)); } - @AfterClass + @AfterAll public static void cleanUp() { collectionManager.deleteContainer(new CosmosEntityInformation<>(Customer.class)); } private void assertCustomerListEquals(@NonNull List<Customer> customers, @NonNull List<Customer> reference) { - Assert.assertEquals(reference.size(), customers.size()); + assertEquals(reference.size(), customers.size()); customers.sort(Comparator.comparing(Customer::getId)); reference.sort(Comparator.comparing(Customer::getId)); - Assert.assertEquals(reference, customers); + assertEquals(reference, customers); } @Test @@ -91,7 +91,7 @@ public void testFindByUserAndLevel() { customers = this.repository.findByUser_Name(FAKE_USER_NAME); - Assert.assertFalse(customers.iterator().hasNext()); + Assertions.assertFalse(customers.iterator().hasNext()); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/EtagIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/EtagIT.java index 3924291cc67b..defeb6e5f92e 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/EtagIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/EtagIT.java @@ -11,15 +11,14 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.PersonWithEtagRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.List; @@ -32,13 +31,13 @@ import static com.azure.spring.data.cosmos.common.TestConstants.FIRST_NAME; import static com.azure.spring.data.cosmos.common.TestConstants.HOBBIES; import static com.azure.spring.data.cosmos.common.TestConstants.LAST_NAME; +import static org.junit.jupiter.api.Assertions.*; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class EtagIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -46,7 +45,7 @@ public class EtagIT { @Autowired PersonWithEtagRepository personWithEtagRepository; - @Before + @BeforeEach public void setup() { collectionManager.ensureContainersCreatedAndEmpty(template, PersonWithEtag.class); } @@ -55,7 +54,7 @@ private static PersonWithEtag createPersonWithEtag() { return new PersonWithEtag(UUID.randomUUID().toString(), FIRST_NAME, LAST_NAME, HOBBIES, ADDRESSES); } - @AfterClass + @AfterAll public static void cleanUp() { collectionManager.deleteContainer(new CosmosEntityInformation<>(PersonWithEtag.class)); } @@ -63,17 +62,17 @@ public static void cleanUp() { @Test public void testCrudOperationsShouldApplyEtag() { final PersonWithEtag insertedPersonWithEtag = personWithEtagRepository.save(createPersonWithEtag()); - Assert.assertNotNull(insertedPersonWithEtag.getEtag()); + Assertions.assertNotNull(insertedPersonWithEtag.getEtag()); insertedPersonWithEtag.setFirstName(LAST_NAME); final PersonWithEtag updatedPersonWithEtag = personWithEtagRepository.save(insertedPersonWithEtag); - Assert.assertNotNull(updatedPersonWithEtag.getEtag()); - Assert.assertNotEquals(insertedPersonWithEtag.getEtag(), updatedPersonWithEtag.getEtag()); + Assertions.assertNotNull(updatedPersonWithEtag.getEtag()); + Assertions.assertNotEquals(insertedPersonWithEtag.getEtag(), updatedPersonWithEtag.getEtag()); final Optional<PersonWithEtag> foundPersonWithEtag = personWithEtagRepository.findById(insertedPersonWithEtag.getId()); - Assert.assertTrue(foundPersonWithEtag.isPresent()); - Assert.assertNotNull(foundPersonWithEtag.get().getEtag()); - Assert.assertEquals(updatedPersonWithEtag.getEtag(), foundPersonWithEtag.get().getEtag()); + Assertions.assertTrue(foundPersonWithEtag.isPresent()); + Assertions.assertNotNull(foundPersonWithEtag.get().getEtag()); + assertEquals(updatedPersonWithEtag.getEtag(), foundPersonWithEtag.get().getEtag()); } @Test @@ -83,16 +82,16 @@ public void testCrudListOperationsShouldApplyEtag() { people.add(createPersonWithEtag()); final List<PersonWithEtag> insertedPeople = toList(personWithEtagRepository.saveAll(people)); - insertedPeople.forEach(person -> Assert.assertNotNull(person.getEtag())); + insertedPeople.forEach(person -> Assertions.assertNotNull(person.getEtag())); insertedPeople.forEach(person -> person.setFirstName(LAST_NAME)); final List<PersonWithEtag> updatedPeople = toList(personWithEtagRepository.saveAll(insertedPeople)); for (int i = 0; i < updatedPeople.size(); i++) { PersonWithEtag insertedPersonWithEtag = insertedPeople.get(i); PersonWithEtag updatedPersonWithEtag = updatedPeople.get(i); - Assert.assertEquals(insertedPersonWithEtag.getId(), updatedPersonWithEtag.getId()); - Assert.assertNotNull(updatedPersonWithEtag.getEtag()); - Assert.assertNotEquals(insertedPersonWithEtag.getEtag(), updatedPersonWithEtag.getEtag()); + assertEquals(insertedPersonWithEtag.getId(), updatedPersonWithEtag.getId()); + Assertions.assertNotNull(updatedPersonWithEtag.getEtag()); + Assertions.assertNotEquals(insertedPersonWithEtag.getEtag(), updatedPersonWithEtag.getEtag()); } final List<String> peopleIds = updatedPeople.stream() @@ -102,8 +101,8 @@ public void testCrudListOperationsShouldApplyEtag() { for (int i = 0; i < foundPeople.size(); i++) { PersonWithEtag updatedPersonWithEtag = updatedPeople.get(i); PersonWithEtag foundPersonWithEtag = foundPeople.get(i); - Assert.assertNotNull(foundPersonWithEtag.getEtag()); - Assert.assertEquals(updatedPersonWithEtag.getEtag(), foundPersonWithEtag.getEtag()); + Assertions.assertNotNull(foundPersonWithEtag.getEtag()); + assertEquals(updatedPersonWithEtag.getEtag(), foundPersonWithEtag.getEtag()); } } @@ -122,13 +121,13 @@ public void testShouldFailIfEtagDoesNotMatch() { try { personWithEtagRepository.save(updatedPersonWithEtag); - Assert.fail(); + Assertions.fail(); } catch (CosmosPreconditionFailedException ex) { } try { personWithEtagRepository.delete(updatedPersonWithEtag); - Assert.fail(); + Assertions.fail(); } catch (CosmosPreconditionFailedException ex) { } } @@ -139,7 +138,7 @@ public void testBulkShouldFailIfEtagDoesNotMatch() { people.add(createPersonWithEtag()); final List<PersonWithEtag> insertedPeople = toList(personWithEtagRepository.saveAll(people)); - insertedPeople.forEach(person -> Assert.assertNotNull(person.getEtag())); + insertedPeople.forEach(person -> Assertions.assertNotNull(person.getEtag())); final List<PersonWithEtag> updatedPeople = toList(insertedPeople); updatedPeople.get(0).setFirstName(LAST_NAME); @@ -149,14 +148,14 @@ public void testBulkShouldFailIfEtagDoesNotMatch() { try { List<PersonWithEtag> result = toList(personWithEtagRepository.saveAll(updatedPeopleWithEtag)); - Assert.assertEquals(result.size(), 0); + assertEquals(result.size(), 0); } catch (CosmosAccessException ex) { } try { personWithEtagRepository.deleteAll(updatedPeopleWithEtag); List<PersonWithEtag> result2 = toList(personWithEtagRepository.findAll()); - Assert.assertEquals(result2.size(), 1); + assertEquals(result2.size(), 1); } catch (CosmosAccessException ex) { } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/HierarchicalPartitionKeyRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/HierarchicalPartitionKeyRepositoryIT.java index b217670c1a67..2f24e534e1cd 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/HierarchicalPartitionKeyRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/HierarchicalPartitionKeyRepositoryIT.java @@ -11,15 +11,14 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.HierarchicalPartitionKeyRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Arrays; import java.util.List; @@ -27,8 +26,7 @@ import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class HierarchicalPartitionKeyRepositoryIT { @@ -38,7 +36,7 @@ public class HierarchicalPartitionKeyRepositoryIT { private static final HierarchicalPartitionKeyEntity HIERARCHICAL_ENTITY_2 = new HierarchicalPartitionKeyEntity("id_2", "Michael", "Smith", "23456"); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); private static CosmosEntityInformation<HierarchicalPartitionKeyEntity, String> hierarchicalPartitionKeyEntityInformation @@ -50,15 +48,15 @@ public class HierarchicalPartitionKeyRepositoryIT { @Autowired HierarchicalPartitionKeyRepository repository; - @BeforeClass + @BeforeAll public static void init() { } - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, HierarchicalPartitionKeyEntity.class); } - @AfterClass + @AfterAll public static void cleanUp() { collectionManager.deleteContainer(hierarchicalPartitionKeyEntityInformation); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IndexPolicyUpdateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IndexPolicyUpdateIT.java index 59bf9e27d8b4..3c2c74fc6253 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IndexPolicyUpdateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IndexPolicyUpdateIT.java @@ -16,26 +16,24 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.repository.support.SimpleCosmosRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Collections; import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class IndexPolicyUpdateIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -52,7 +50,7 @@ public class IndexPolicyUpdateIT { CosmosEntityInformation<Address, String> addressEntityInformation = new CosmosEntityInformation<>(Address.class); - @Before + @BeforeEach public void setup() { collectionManager.ensureContainersCreatedAndEmpty(template, IndexPolicyEntity.class, ComplexIndexPolicyEntity.class, IndexPolicyOverwriteEntity.class, Address.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IntegerIdDomainRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IntegerIdDomainRepositoryIT.java index 66cb22d25815..3240436dbc49 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IntegerIdDomainRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/IntegerIdDomainRepositoryIT.java @@ -10,16 +10,15 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.IntegerIdDomainRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Collections; import java.util.Iterator; @@ -29,9 +28,9 @@ import java.util.Set; import java.util.stream.Collectors; import java.util.stream.StreamSupport; +import static org.junit.jupiter.api.Assertions.*; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class IntegerIdDomainRepositoryIT { @@ -39,7 +38,7 @@ public class IntegerIdDomainRepositoryIT { private static final String NAME = "panli"; private static final IntegerIdDomain DOMAIN = new IntegerIdDomain(ID, NAME); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -48,7 +47,7 @@ public class IntegerIdDomainRepositoryIT { @Autowired private IntegerIdDomainRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, IntegerIdDomain.class); this.repository.save(DOMAIN); @@ -57,43 +56,44 @@ public void setUp() { @Test public void testIntegerIdDomain() { this.repository.deleteAll(); - Assert.assertFalse(this.repository.findById(ID).isPresent()); + Assertions.assertFalse(this.repository.findById(ID).isPresent()); this.repository.save(DOMAIN); final Optional<IntegerIdDomain> foundOptional = this.repository.findById(ID); - Assert.assertTrue(foundOptional.isPresent()); - Assert.assertEquals(DOMAIN.getNumber(), foundOptional.get().getNumber()); - Assert.assertEquals(DOMAIN.getName(), foundOptional.get().getName()); + Assertions.assertTrue(foundOptional.isPresent()); + assertEquals(DOMAIN.getNumber(), foundOptional.get().getNumber()); + assertEquals(DOMAIN.getName(), foundOptional.get().getName()); this.repository.delete(DOMAIN); - Assert.assertFalse(this.repository.findById(ID).isPresent()); + Assertions.assertFalse(this.repository.findById(ID).isPresent()); } - @Test(expected = IllegalArgumentException.class) + @Test public void testInvalidDomain() { - new CosmosEntityInformation<InvalidDomain, Integer>(InvalidDomain.class); + assertThrows(IllegalArgumentException.class, () -> + new CosmosEntityInformation<InvalidDomain, Integer>(InvalidDomain.class)); } @Test public void testBasicQuery() { final IntegerIdDomain save = this.repository.save(DOMAIN); - Assert.assertNotNull(save); + Assertions.assertNotNull(save); } @Test public void testSaveAndFindById() { - Assert.assertNotNull(this.repository.save(DOMAIN)); + Assertions.assertNotNull(this.repository.save(DOMAIN)); final Optional<IntegerIdDomain> savedEntity = this.repository.findById(DOMAIN.getNumber()); - Assert.assertTrue(savedEntity.isPresent()); - Assert.assertEquals(DOMAIN, savedEntity.get()); + Assertions.assertTrue(savedEntity.isPresent()); + assertEquals(DOMAIN, savedEntity.get()); } @Test public void testSaveAllAndFindAll() { - Assert.assertTrue(this.repository.findAll().iterator().hasNext()); + Assertions.assertTrue(this.repository.findAll().iterator().hasNext()); final Set<IntegerIdDomain> entitiesToSave = Collections.singleton(DOMAIN); this.repository.saveAll(entitiesToSave); @@ -101,58 +101,62 @@ public void testSaveAllAndFindAll() { final Set<IntegerIdDomain> savedEntities = StreamSupport.stream(this.repository.findAll().spliterator(), false) .collect(Collectors.toSet()); - Assert.assertTrue(entitiesToSave.containsAll(savedEntities)); + Assertions.assertTrue(entitiesToSave.containsAll(savedEntities)); } @Test public void testFindAllById() { final Iterable<IntegerIdDomain> allById = this.repository.findAllById(Collections.singleton(DOMAIN.getNumber())); - Assert.assertTrue(allById.iterator().hasNext()); + Assertions.assertTrue(allById.iterator().hasNext()); } @Test public void testCount() { - Assert.assertEquals(1, repository.count()); + assertEquals(1, repository.count()); } @Test public void testDeleteById() { this.repository.save(DOMAIN); this.repository.deleteById(DOMAIN.getNumber()); - Assert.assertEquals(0, this.repository.count()); + assertEquals(0, this.repository.count()); } - @Test(expected = CosmosNotFoundException.class) + @Test public void testDeleteByIdShouldFailIfNothingToDelete() { - this.repository.deleteAll(); - this.repository.deleteById(DOMAIN.getNumber()); + assertThrows(CosmosNotFoundException.class, () -> { + this.repository.deleteAll(); + this.repository.deleteById(DOMAIN.getNumber()); + }); } @Test public void testDelete() { this.repository.save(DOMAIN); this.repository.delete(DOMAIN); - Assert.assertEquals(0, this.repository.count()); + assertEquals(0, this.repository.count()); } - @Test(expected = CosmosNotFoundException.class) + @Test public void testDeleteShouldFailIfNothingToDelete() { - this.repository.deleteAll(); - this.repository.delete(DOMAIN); + assertThrows(CosmosNotFoundException.class, () -> { + this.repository.deleteAll(); + this.repository.delete(DOMAIN); + }); } @Test public void testDeleteAll() { this.repository.save(DOMAIN); this.repository.deleteAll(Collections.singleton(DOMAIN)); - Assert.assertEquals(0, this.repository.count()); + assertEquals(0, this.repository.count()); } @Test public void testExistsById() { this.repository.save(DOMAIN); - Assert.assertTrue(this.repository.existsById(DOMAIN.getNumber())); + Assertions.assertTrue(this.repository.existsById(DOMAIN.getNumber())); } @Test @@ -165,17 +169,17 @@ public void testFindAllSort() { final List<IntegerIdDomain> ascending = StreamSupport .stream(this.repository.findAll(ascSort).spliterator(), false) .collect(Collectors.toList()); - Assert.assertEquals(2, ascending.size()); - Assert.assertEquals(DOMAIN, ascending.get(0)); - Assert.assertEquals(other, ascending.get(1)); + assertEquals(2, ascending.size()); + assertEquals(DOMAIN, ascending.get(0)); + assertEquals(other, ascending.get(1)); final Sort descSort = Sort.by(Sort.Direction.DESC, "number"); final List<IntegerIdDomain> descending = StreamSupport .stream(this.repository.findAll(descSort).spliterator(), false) .collect(Collectors.toList()); - Assert.assertEquals(2, descending.size()); - Assert.assertEquals(other, descending.get(0)); - Assert.assertEquals(DOMAIN, descending.get(1)); + assertEquals(2, descending.size()); + assertEquals(other, descending.get(0)); + assertEquals(DOMAIN, descending.get(1)); } @@ -187,13 +191,13 @@ public void testFindAllPageable() { final Page<IntegerIdDomain> page1 = this.repository.findAll(new CosmosPageRequest(0, 1, null)); final Iterator<IntegerIdDomain> page1Iterator = page1.iterator(); - Assert.assertTrue(page1Iterator.hasNext()); - Assert.assertEquals(DOMAIN, page1Iterator.next()); + Assertions.assertTrue(page1Iterator.hasNext()); + assertEquals(DOMAIN, page1Iterator.next()); final Page<IntegerIdDomain> page2 = this.repository.findAll(new CosmosPageRequest(1, 1, null)); final Iterator<IntegerIdDomain> page2Iterator = page2.iterator(); - Assert.assertTrue(page2Iterator.hasNext()); - Assert.assertEquals(other, page2Iterator.next()); + Assertions.assertTrue(page2Iterator.hasNext()); + assertEquals(other, page2Iterator.next()); } private static class InvalidDomain { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/LongIdDomainRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/LongIdDomainRepositoryIT.java index c001d11210eb..9c3c95679394 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/LongIdDomainRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/LongIdDomainRepositoryIT.java @@ -11,16 +11,15 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.LongIdDomainRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.Arrays; @@ -33,9 +32,9 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import java.util.stream.StreamSupport; +import static org.junit.jupiter.api.Assertions.*; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class LongIdDomainRepositoryIT { @@ -48,7 +47,7 @@ public class LongIdDomainRepositoryIT { private static final LongIdDomain DOMAIN_1 = new LongIdDomain(ID_1, NAME_1); private static final LongIdDomain DOMAIN_2 = new LongIdDomain(ID_2, NAME_2); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -57,7 +56,7 @@ public class LongIdDomainRepositoryIT { @Autowired private LongIdDomainRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, LongIdDomain.class); this.repository.save(DOMAIN_1); @@ -67,43 +66,44 @@ public void setUp() { @Test public void testLongIdDomain() { this.repository.deleteAll(); - Assert.assertFalse(this.repository.findById(ID_1).isPresent()); + Assertions.assertFalse(this.repository.findById(ID_1).isPresent()); this.repository.save(DOMAIN_1); final Optional<LongIdDomain> foundOptional = this.repository.findById(ID_1); - Assert.assertTrue(foundOptional.isPresent()); - Assert.assertEquals(DOMAIN_1.getNumber(), foundOptional.get().getNumber()); - Assert.assertEquals(DOMAIN_1.getName(), foundOptional.get().getName()); + Assertions.assertTrue(foundOptional.isPresent()); + assertEquals(DOMAIN_1.getNumber(), foundOptional.get().getNumber()); + assertEquals(DOMAIN_1.getName(), foundOptional.get().getName()); this.repository.delete(DOMAIN_1); - Assert.assertFalse(this.repository.findById(ID_1).isPresent()); + Assertions.assertFalse(this.repository.findById(ID_1).isPresent()); } - @Test(expected = IllegalArgumentException.class) + @Test public void testInvalidDomain() { - new CosmosEntityInformation<InvalidDomain, Long>(InvalidDomain.class); + assertThrows(IllegalArgumentException.class, () -> + new CosmosEntityInformation<InvalidDomain, Long>(InvalidDomain.class)); } @Test public void testBasicQuery() { final LongIdDomain save = this.repository.save(DOMAIN_1); - Assert.assertNotNull(save); + Assertions.assertNotNull(save); } @Test public void testSaveAndFindById() { - Assert.assertNotNull(this.repository.save(DOMAIN_1)); + Assertions.assertNotNull(this.repository.save(DOMAIN_1)); final Optional<LongIdDomain> savedEntity = this.repository.findById(DOMAIN_1.getNumber()); - Assert.assertTrue(savedEntity.isPresent()); - Assert.assertEquals(DOMAIN_1, savedEntity.get()); + Assertions.assertTrue(savedEntity.isPresent()); + assertEquals(DOMAIN_1, savedEntity.get()); } @Test public void testSaveAllAndFindAll() { - Assert.assertTrue(this.repository.findAll().iterator().hasNext()); + Assertions.assertTrue(this.repository.findAll().iterator().hasNext()); final Set<LongIdDomain> entitiesToSave = Stream.of(DOMAIN_1, DOMAIN_2).collect(Collectors.toSet()); this.repository.saveAll(entitiesToSave); @@ -111,14 +111,14 @@ public void testSaveAllAndFindAll() { final Set<LongIdDomain> savedEntities = StreamSupport.stream(this.repository.findAll().spliterator(), false) .collect(Collectors.toSet()); - Assert.assertTrue(entitiesToSave.containsAll(savedEntities)); + Assertions.assertTrue(entitiesToSave.containsAll(savedEntities)); } @Test public void testFindAllById() { final Iterable<LongIdDomain> allById = TestUtils.toList(this.repository.findAllById(Arrays.asList(DOMAIN_1.getNumber(), DOMAIN_2.getNumber()))); - Assert.assertTrue(((ArrayList) allById).size() == 2); + Assertions.assertTrue(((ArrayList) allById).size() == 2); Iterator<LongIdDomain> it = allById.iterator(); assertLongIdDomainEquals(Arrays.asList(it.next(), it.next()), Arrays.asList(DOMAIN_1, DOMAIN_2)); } @@ -126,12 +126,12 @@ public void testFindAllById() { private void assertLongIdDomainEquals(List<LongIdDomain> cur, List<LongIdDomain> reference) { cur.sort(Comparator.comparing(LongIdDomain::getNumber)); reference.sort(Comparator.comparing(LongIdDomain::getNumber)); - Assert.assertEquals(reference, cur); + assertEquals(reference, cur); } @Test public void testCount() { - Assert.assertEquals(2, repository.count()); + assertEquals(2, repository.count()); } @Test @@ -140,26 +140,30 @@ public void testDeleteById() { this.repository.save(DOMAIN_2); this.repository.deleteById(DOMAIN_1.getNumber()); this.repository.deleteById(DOMAIN_2.getNumber()); - Assert.assertEquals(0, this.repository.count()); + assertEquals(0, this.repository.count()); } - @Test(expected = CosmosNotFoundException.class) + @Test public void testDeleteByIdShouldFailIfNothingToDelete() { - this.repository.deleteAll(); - this.repository.deleteById(DOMAIN_1.getNumber()); + assertThrows(CosmosNotFoundException.class, () ->{ + this.repository.deleteAll(); + this.repository.deleteById(DOMAIN_1.getNumber()); + }); } @Test public void testDelete() { this.repository.save(DOMAIN_1); this.repository.delete(DOMAIN_1); - Assert.assertEquals(1, this.repository.count()); + assertEquals(1, this.repository.count()); } - @Test(expected = CosmosNotFoundException.class) + @Test public void testDeleteShouldFailIfNothingToDelete() { - this.repository.deleteAll(); - this.repository.delete(DOMAIN_1); + assertThrows(CosmosNotFoundException.class, () ->{ + this.repository.deleteAll(); + this.repository.delete(DOMAIN_1); + }); } @Test @@ -167,13 +171,13 @@ public void testDeleteAll() { this.repository.save(DOMAIN_1); this.repository.save(DOMAIN_2); this.repository.deleteAll(Arrays.asList(DOMAIN_1, DOMAIN_2)); - Assert.assertEquals(0, this.repository.count()); + assertEquals(0, this.repository.count()); } @Test public void testExistsById() { this.repository.save(DOMAIN_1); - Assert.assertTrue(this.repository.existsById(DOMAIN_1.getNumber())); + Assertions.assertTrue(this.repository.existsById(DOMAIN_1.getNumber())); } @Test @@ -186,19 +190,19 @@ public void testFindAllSort() { final List<LongIdDomain> ascending = StreamSupport .stream(this.repository.findAll(ascSort).spliterator(), false) .collect(Collectors.toList()); - Assert.assertEquals(3, ascending.size()); - Assert.assertEquals(DOMAIN_1, ascending.get(0)); - Assert.assertEquals(other, ascending.get(1)); - Assert.assertEquals(DOMAIN_2, ascending.get(2)); + assertEquals(3, ascending.size()); + assertEquals(DOMAIN_1, ascending.get(0)); + assertEquals(other, ascending.get(1)); + assertEquals(DOMAIN_2, ascending.get(2)); final Sort descSort = Sort.by(Sort.Direction.DESC, "number"); final List<LongIdDomain> descending = StreamSupport .stream(this.repository.findAll(descSort).spliterator(), false) .collect(Collectors.toList()); - Assert.assertEquals(3, descending.size()); - Assert.assertEquals(DOMAIN_2, descending.get(0)); - Assert.assertEquals(other, descending.get(1)); - Assert.assertEquals(DOMAIN_1, descending.get(2)); + assertEquals(3, descending.size()); + assertEquals(DOMAIN_2, descending.get(0)); + assertEquals(other, descending.get(1)); + assertEquals(DOMAIN_1, descending.get(2)); } @@ -209,18 +213,18 @@ public void testFindAllPageable() { final Page<LongIdDomain> page1 = this.repository.findAll(new CosmosPageRequest(0, 1, null)); final Iterator<LongIdDomain> page1Iterator = page1.iterator(); - Assert.assertTrue(page1Iterator.hasNext()); - Assert.assertEquals(DOMAIN_1, page1Iterator.next()); + Assertions.assertTrue(page1Iterator.hasNext()); + assertEquals(DOMAIN_1, page1Iterator.next()); final Page<LongIdDomain> page2 = this.repository.findAll(new CosmosPageRequest(1, 1, null)); final Iterator<LongIdDomain> page2Iterator = page2.iterator(); - Assert.assertTrue(page2Iterator.hasNext()); - Assert.assertEquals(DOMAIN_2, page2Iterator.next()); + Assertions.assertTrue(page2Iterator.hasNext()); + assertEquals(DOMAIN_2, page2Iterator.next()); final Page<LongIdDomain> page3 = this.repository.findAll(new CosmosPageRequest(2, 1, null)); final Iterator<LongIdDomain> page3Iterator = page3.iterator(); - Assert.assertTrue(page3Iterator.hasNext()); - Assert.assertEquals(other, page3Iterator.next()); + Assertions.assertTrue(page3Iterator.hasNext()); + assertEquals(other, page3Iterator.next()); } private static class InvalidDomain { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/MemoRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/MemoRepositoryIT.java index 3199d1fba522..1df8763fec82 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/MemoRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/MemoRepositoryIT.java @@ -11,16 +11,15 @@ import com.azure.spring.data.cosmos.exception.CosmosAccessException; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.MemoRepository; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -31,9 +30,9 @@ import java.util.List; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.*; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class MemoRepositoryIT { private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat(TestConstants.DATE_FORMAT); @@ -48,7 +47,7 @@ public class MemoRepositoryIT { private static Memo testMemo2; private static Memo testMemo3; - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -57,7 +56,7 @@ public class MemoRepositoryIT { @Autowired MemoRepository repository; - @BeforeClass + @BeforeAll public static void init() throws ParseException { memoDate = DATE_FORMAT.parse(TestConstants.DATE_STRING); memoDateBefore = DATE_FORMAT.parse(TestConstants.DATE_BEFORE_STRING); @@ -69,7 +68,7 @@ public static void init() throws ParseException { testMemo3 = new Memo(TestConstants.ID_3, TestConstants.NEW_MESSAGE, memoDateAfter, Importance.LOW); } - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Memo.class); repository.saveAll(Arrays.asList(testMemo1, testMemo2, testMemo3)); @@ -109,12 +108,12 @@ private void assertMemoEquals(Memo actual, Memo expected) { public void testFindByBefore() { List<Memo> memos = TestUtils.toList(this.repository.findByDateBefore(memoDateBefore)); - Assert.assertTrue(memos.isEmpty()); + Assertions.assertTrue(memos.isEmpty()); memos = TestUtils.toList(this.repository.findByDateBefore(memoDate)); - Assert.assertEquals(1, memos.size()); - Assert.assertEquals(testMemo1, memos.get(0)); + assertEquals(1, memos.size()); + assertEquals(testMemo1, memos.get(0)); memos = TestUtils.toList(this.repository.findByDateBefore(memoDateAfter)); final List<Memo> reference = Arrays.asList(testMemo1, testMemo2); @@ -122,8 +121,8 @@ public void testFindByBefore() { memos.sort(Comparator.comparing(Memo::getId)); reference.sort(Comparator.comparing(Memo::getId)); - Assert.assertEquals(reference.size(), memos.size()); - Assert.assertEquals(reference, memos); + assertEquals(reference.size(), memos.size()); + assertEquals(reference, memos); } @Test @@ -131,12 +130,12 @@ public void testFindByBeforeWithAndOr() { List<Memo> memos = TestUtils.toList(this.repository.findByDateBeforeAndMessage(memoDate, TestConstants.NEW_MESSAGE)); - Assert.assertTrue(memos.isEmpty()); + Assertions.assertTrue(memos.isEmpty()); memos = TestUtils.toList(this.repository.findByDateBeforeAndMessage(memoDate, TestConstants.MESSAGE)); - Assert.assertEquals(1, memos.size()); - Assert.assertEquals(testMemo1, memos.get(0)); + assertEquals(1, memos.size()); + assertEquals(testMemo1, memos.get(0)); memos = TestUtils.toList(this.repository.findByDateBeforeOrMessage(memoDateAfter, TestConstants.MESSAGE)); final List<Memo> reference = Arrays.asList(testMemo1, testMemo2); @@ -144,20 +143,20 @@ public void testFindByBeforeWithAndOr() { memos.sort(Comparator.comparing(Memo::getId)); reference.sort(Comparator.comparing(Memo::getId)); - Assert.assertEquals(reference.size(), memos.size()); - Assert.assertEquals(reference, memos); + assertEquals(reference.size(), memos.size()); + assertEquals(reference, memos); } @Test public void testFindByAfter() { List<Memo> memos = TestUtils.toList(this.repository.findByDateAfter(memoDateAfter)); - Assert.assertTrue(memos.isEmpty()); + Assertions.assertTrue(memos.isEmpty()); memos = TestUtils.toList(this.repository.findByDateAfter(memoDate)); - Assert.assertEquals(1, memos.size()); - Assert.assertEquals(testMemo3, memos.get(0)); + assertEquals(1, memos.size()); + assertEquals(testMemo3, memos.get(0)); memos = TestUtils.toList(this.repository.findByDateAfter(memoDateBefore)); final List<Memo> reference = Arrays.asList(testMemo2, testMemo3); @@ -165,20 +164,20 @@ public void testFindByAfter() { memos.sort(Comparator.comparing(Memo::getId)); reference.sort(Comparator.comparing(Memo::getId)); - Assert.assertEquals(reference.size(), memos.size()); - Assert.assertEquals(reference, memos); + assertEquals(reference.size(), memos.size()); + assertEquals(reference, memos); } @Test public void testFindByAfterWithAndOr() { List<Memo> memos = TestUtils.toList(this.repository.findByDateAfterAndMessage(memoDate, TestConstants.MESSAGE)); - Assert.assertTrue(memos.isEmpty()); + Assertions.assertTrue(memos.isEmpty()); memos = TestUtils.toList(this.repository.findByDateAfterAndMessage(memoDate, TestConstants.NEW_MESSAGE)); - Assert.assertEquals(1, memos.size()); - Assert.assertEquals(testMemo3, memos.get(0)); + assertEquals(1, memos.size()); + assertEquals(testMemo3, memos.get(0)); memos = TestUtils.toList(this.repository.findByDateAfterOrMessage(memoDateBefore, TestConstants.MESSAGE)); final List<Memo> reference = Arrays.asList(testMemo1, testMemo2, testMemo3); @@ -186,8 +185,8 @@ public void testFindByAfterWithAndOr() { memos.sort(Comparator.comparing(Memo::getId)); reference.sort(Comparator.comparing(Memo::getId)); - Assert.assertEquals(reference.size(), memos.size()); - Assert.assertEquals(reference, memos); + assertEquals(reference.size(), memos.size()); + assertEquals(reference, memos); } @Test @@ -227,22 +226,22 @@ private void assertMemoListEquals(List<Memo> memos, List<Memo> reference) { memos.sort(Comparator.comparing(Memo::getId)); reference.sort(Comparator.comparing(Memo::getId)); - Assert.assertEquals(reference.size(), memos.size()); - Assert.assertEquals(reference, memos); + assertEquals(reference.size(), memos.size()); + assertEquals(reference, memos); } - @Test(expected = CosmosAccessException.class) - @Ignore // TODO(pan): Ignore this test case for now, will update this from service update. + @Test + @Disabled // TODO(pan): Ignore this test case for now, will update this from service update. public void testFindByStartsWithWithException() { - repository.findByMessageStartsWith(testMemo1.getMessage()); + assertThrows(CosmosAccessException.class, () -> repository.findByMessageStartsWith(testMemo1.getMessage())); } @Test public void testFindByStartsWith() { final List<Memo> result = TestUtils.toList(repository.findByMessageStartsWith(testMemo1.getMessage().substring(0, 10))); - Assert.assertEquals(testMemo1, result.get(0)); - Assert.assertEquals(1, result.size()); + assertEquals(testMemo1, result.get(0)); + assertEquals(1, result.size()); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/NestedPartitionKeyRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/NestedPartitionKeyRepositoryIT.java index 757875a494fc..ee5fc4dad925 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/NestedPartitionKeyRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/NestedPartitionKeyRepositoryIT.java @@ -10,14 +10,13 @@ import com.azure.spring.data.cosmos.domain.NestedPartitionKeyEntityWithGeneratedValue; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.NestedPartitionKeyRepository; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Arrays; import java.util.List; @@ -25,8 +24,7 @@ import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class NestedPartitionKeyRepositoryIT { @@ -36,7 +34,7 @@ public class NestedPartitionKeyRepositoryIT { private static final NestedPartitionKeyEntityWithGeneratedValue NESTED_ENTITY_2 = new NestedPartitionKeyEntityWithGeneratedValue(null, new NestedEntity("partitionKey2")); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -45,10 +43,10 @@ public class NestedPartitionKeyRepositoryIT { @Autowired NestedPartitionKeyRepository repository; - @BeforeClass + @BeforeAll public static void init() { } - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, NestedPartitionKeyEntityWithGeneratedValue.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableAddressRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableAddressRepositoryIT.java index 29d86241abe5..249f183af553 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableAddressRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableAddressRepositoryIT.java @@ -14,15 +14,14 @@ import com.azure.spring.data.cosmos.domain.Address; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.PageableAddressRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.data.domain.Page; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.test.StepVerifier; @@ -39,12 +38,11 @@ import static com.azure.spring.data.cosmos.domain.Address.TEST_ADDRESS4_PARTITION3; import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class PageableAddressRepositoryIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -59,7 +57,7 @@ public class PageableAddressRepositoryIT { @Autowired private CosmosFactory cosmosFactory; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Address.class); repository.save(TEST_ADDRESS1_PARTITION1); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableMemoRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableMemoRepositoryIT.java index 800fc5248244..4bb625fbd45b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableMemoRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableMemoRepositoryIT.java @@ -13,17 +13,16 @@ import com.azure.spring.data.cosmos.domain.PageableMemo; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.PageableMemoRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Slice; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.test.StepVerifier; @@ -38,14 +37,13 @@ import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class PageableMemoRepositoryIT { private static final int TOTAL_CONTENT_SIZE = 500; - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -65,7 +63,7 @@ public class PageableMemoRepositoryIT { private static boolean isSetupDone; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreated(template, PageableMemo.class); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageablePersonRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageablePersonRepositoryIT.java index a89c9fae9ab0..ec134cf81533 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageablePersonRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageablePersonRepositoryIT.java @@ -10,15 +10,14 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.PageablePersonRepository; import org.apache.commons.lang3.StringUtils; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.HashSet; @@ -28,15 +27,14 @@ import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class PageablePersonRepositoryIT { private static final int TOTAL_CONTENT_SIZE = 25; public static final int ONE_KB = 1024; - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -49,7 +47,7 @@ public class PageablePersonRepositoryIT { private static boolean isSetupDone; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreated(template, PageablePerson.class); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersistableIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersistableIT.java index 0bd8bb183a6e..d9fce23c12c1 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersistableIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersistableIT.java @@ -11,31 +11,27 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.PersistableEntityRepository; import com.azure.spring.data.cosmos.repository.repository.ReactivePersistableEntityRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class PersistableIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -47,11 +43,9 @@ public class PersistableIT { @Autowired private CosmosTemplate template; - @SuppressWarnings("deprecation") - @Rule - public ExpectedException expectedException = ExpectedException.none(); - @Before + + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, PersistableEntity.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersonCrossPartitionIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersonCrossPartitionIT.java index 50a608b13ffd..326d62599a71 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersonCrossPartitionIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/PersonCrossPartitionIT.java @@ -15,16 +15,15 @@ import com.azure.spring.data.cosmos.repository.repository.AuditableRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import org.assertj.core.util.Lists; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.List; @@ -43,12 +42,11 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.data.domain.Sort.Direction.ASC; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class PersonCrossPartitionIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); private static final PersonCrossPartition TEST_PERSON_CP = new PersonCrossPartition(ID_1, FIRST_NAME, LAST_NAME, HOBBIES, @@ -76,7 +74,7 @@ public class PersonCrossPartitionIT { @Autowired private AddressRepository addressRepository; - @Before + @BeforeEach public void setUp() { personCrossPartitionInfo = new CosmosEntityInformation<>(PersonCrossPartition.class); containerName = personCrossPartitionInfo.getContainerName(); @@ -84,7 +82,7 @@ public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(cosmosTemplate, PersonCrossPartition.class); } - @AfterClass + @AfterAll public static void cleanUp() { collectionManager.deleteContainer(personCrossPartitionInfo); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositoryIT.java index 85e7c32b40ad..401ec213799b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositoryIT.java @@ -9,15 +9,14 @@ import com.azure.spring.data.cosmos.domain.Project; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ProjectRepository; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.lang.NonNull; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.Arrays; @@ -27,9 +26,10 @@ import java.util.Optional; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.*; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) @SuppressWarnings("deprecation") public class ProjectRepositoryIT { @@ -74,7 +74,7 @@ public class ProjectRepositoryIT { private static final List<Project> PROJECTS = Arrays.asList(PROJECT_0, PROJECT_1, PROJECT_2, PROJECT_3, PROJECT_4); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -83,19 +83,19 @@ public class ProjectRepositoryIT { @Autowired private ProjectRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Project.class); this.repository.saveAll(PROJECTS); } private void assertProjectListEquals(@NonNull List<Project> projects, @NonNull List<Project> reference) { - Assert.assertEquals(reference.size(), projects.size()); + assertEquals(reference.size(), projects.size()); projects.sort(Comparator.comparing(Project::getId)); reference.sort(Comparator.comparing(Project::getId)); - Assert.assertEquals(reference, projects); + assertEquals(reference, projects); } @Test @@ -106,7 +106,7 @@ public void testFindByWithAnd() { projects = TestUtils.toList(this.repository.findByNameAndStarCount(NAME_0, STAR_COUNT_1)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(this.repository.findByNameAndStarCount(NAME_0, STAR_COUNT_0)); @@ -121,7 +121,7 @@ public void testFindByWithOr() { projects = TestUtils.toList(this.repository.findByNameOrForkCount(FAKE_NAME, FAKE_COUNT)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(this.repository.findByNameOrForkCount(NAME_0, FORK_COUNT_1)); @@ -136,7 +136,7 @@ public void testFindByWithAndPartition() { projects = TestUtils.toList(this.repository.findByNameAndCreator(NAME_0, CREATOR_1)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(this.repository.findByNameAndCreator(NAME_0, CREATOR_0)); @@ -158,7 +158,7 @@ public void testFindByWithOrPartition() { projects = TestUtils.toList(this.repository.findByNameOrCreator(FAKE_NAME, FAKE_CREATOR)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(this.repository.findByNameOrCreator(NAME_0, CREATOR_1)); @@ -174,7 +174,7 @@ public void testFindByWithAndOr() { projects = TestUtils.toList(repository.findByNameAndCreatorOrForkCount(NAME_1, CREATOR_2, FAKE_COUNT)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByNameAndCreatorOrForkCount(NAME_1, CREATOR_1, FORK_COUNT_2)); @@ -190,7 +190,7 @@ public void testFindByWithOrAnd() { projects = TestUtils.toList(repository.findByNameOrCreatorAndForkCount(FAKE_NAME, CREATOR_1, FORK_COUNT_2)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByNameOrCreatorAndForkCount(NAME_1, CREATOR_2, FORK_COUNT_2)); @@ -206,7 +206,7 @@ public void testFindByWithOrOr() { projects = TestUtils.toList(repository.findByNameOrCreatorOrForkCount(FAKE_NAME, FAKE_CREATOR, FAKE_COUNT)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); } @Test @@ -225,7 +225,7 @@ public void testFindByWithOrAndOr() { projects = TestUtils.toList(repository.findByNameOrCreatorAndForkCountOrStarCount(FAKE_NAME, CREATOR_1, FORK_COUNT_0, FAKE_COUNT)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); } @Test @@ -236,7 +236,7 @@ public void testFindByGreaterThan() { projects = TestUtils.toList(repository.findByForkCountGreaterThan(FAKE_COUNT)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); } @Test @@ -248,7 +248,7 @@ public void testFindByGreaterThanWithAndOr() { projects = TestUtils.toList(repository.findByCreatorAndForkCountGreaterThan(CREATOR_0, FORK_COUNT_1)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByCreatorOrForkCountGreaterThan(CREATOR_0, FORK_COUNT_2)); @@ -259,7 +259,7 @@ public void testFindByGreaterThanWithAndOr() { public void testFindByLessThan() { List<Project> projects = TestUtils.toList(repository.findByStarCountLessThan(STAR_COUNT_0)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByStarCountLessThan(STAR_COUNT_2)); @@ -270,7 +270,7 @@ public void testFindByLessThan() { public void testFindByLessThanEqual() { List<Project> projects = TestUtils.toList(repository.findByForkCountLessThanEqual(STAR_COUNT_MIN)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByForkCountLessThanEqual(STAR_COUNT_2)); @@ -282,7 +282,7 @@ public void testFindByLessThanAndGreaterThan() { List<Project> projects = TestUtils.toList(repository.findByStarCountLessThanAndForkCountGreaterThan(STAR_COUNT_0, FORK_COUNT_3)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByStarCountLessThanAndForkCountGreaterThan(STAR_COUNT_3, FORK_COUNT_0)); @@ -295,7 +295,7 @@ public void testFindByLessThanEqualsAndGreaterThanEquals() { List<Project> projects = TestUtils.toList(repository.findByForkCountLessThanEqualAndStarCountGreaterThan( STAR_COUNT_MIN, FORK_COUNT_0)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByForkCountLessThanEqualAndStarCountGreaterThan(STAR_COUNT_3, FORK_COUNT_0)); @@ -307,7 +307,7 @@ public void testFindByLessThanEqualsAndGreaterThanEquals() { public void testFindByGreaterThanEqual() { List<Project> projects = TestUtils.toList(repository.findByStarCountGreaterThanEqual(STAR_COUNT_MAX)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByStarCountGreaterThanEqual(STAR_COUNT_2)); @@ -319,7 +319,7 @@ public void testFindByGreaterThanEqualAnd() { List<Project> projects = TestUtils.toList(repository .findByForkCountGreaterThanEqualAndCreator(FORK_COUNT_MAX, CREATOR_2)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByForkCountGreaterThanEqualAndCreator(FORK_COUNT_0, CREATOR_0)); @@ -363,9 +363,9 @@ public void findByIdWithPartitionKey() { final Optional<Project> project = repository.findById(PROJECT_0.getId(), new PartitionKey(collectionManager.getEntityInformation(Project.class).getPartitionKeyFieldValue(PROJECT_0))); - Assert.assertTrue(project.isPresent()); + Assertions.assertTrue(project.isPresent()); - Assert.assertEquals(project.get(), PROJECT_0); + assertEquals(project.get(), PROJECT_0); } @Test @@ -373,7 +373,7 @@ public void findByIdWithPartitionKeyNotFound() { final Optional<Project> project = repository.findById("unknown-id", new PartitionKey("unknown-partition-key")); - Assert.assertFalse(project.isPresent()); + Assertions.assertFalse(project.isPresent()); } @@ -381,7 +381,7 @@ public void findByIdWithPartitionKeyNotFound() { public void testFindByIn() { List<Project> projects = TestUtils.toList(repository.findByCreatorIn(Collections.singleton(FAKE_CREATOR))); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByCreatorIn(Arrays.asList(CREATOR_1, CREATOR_2))); @@ -402,7 +402,7 @@ public void testFindByInWithAnd() { CREATOR_1), Arrays.asList(STAR_COUNT_2, STAR_COUNT_3))); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByCreatorInAndStarCountIn(Arrays.asList(CREATOR_0, CREATOR_1), Arrays.asList(STAR_COUNT_0, STAR_COUNT_2))); @@ -439,7 +439,7 @@ public void testFindByNotIn() { List<Project> projects = TestUtils.toList(repository.findByCreatorNotIn( Arrays.asList(CREATOR_0, CREATOR_1, CREATOR_2, CREATOR_3))); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByCreatorNotIn(Arrays.asList(CREATOR_1, CREATOR_2))); @@ -456,7 +456,7 @@ public void testFindByInWithNotIn() { TestUtils.toList(repository.findByCreatorInAndStarCountNotIn(Collections.singletonList(FAKE_CREATOR), Arrays.asList(STAR_COUNT_2, STAR_COUNT_3))); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); projects = TestUtils.toList(repository.findByCreatorInAndStarCountNotIn(Arrays.asList(CREATOR_0, CREATOR_1), Arrays.asList(STAR_COUNT_0, STAR_COUNT_2))); @@ -474,7 +474,7 @@ public void testFindByInWithNotIn() { public void testFindByNameIsNull() { List<Project> projects = TestUtils.toList(repository.findByNameIsNull()); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); final Project nullNameProject = new Project("id-999", null, CREATOR_0, true, STAR_COUNT_0, FORK_COUNT_0); @@ -496,14 +496,14 @@ public void testFindByNameIsNotNull() { projects = TestUtils.toList(repository.findByNameIsNotNull()); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); } @Test public void testFindByNameIsNullWithAnd() { List<Project> projects = TestUtils.toList(repository.findByNameIsNullAndForkCount(FORK_COUNT_MAX)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); final Project nullNameProject = new Project("id-999", null, CREATOR_0, true, STAR_COUNT_0, FORK_COUNT_0); @@ -524,7 +524,7 @@ public void testFindByNameIsNotNullWithAnd() { this.repository.save(new Project("id-999", null, CREATOR_0, true, STAR_COUNT_0, FORK_COUNT_0)); projects = TestUtils.toList(repository.findByNameIsNotNullAndHasReleased(true)); - Assert.assertTrue(projects.isEmpty()); + Assertions.assertTrue(projects.isEmpty()); } @Test diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositorySortIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositorySortIT.java index 52ccfde1bad2..d4c5e14826af 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositorySortIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ProjectRepositorySortIT.java @@ -11,17 +11,15 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.SortedProjectRepository; import org.assertj.core.util.Lists; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Arrays; import java.util.Comparator; @@ -30,9 +28,9 @@ import java.util.stream.StreamSupport; import static com.azure.spring.data.cosmos.common.PageTestUtils.validateLastPage; +import static org.junit.jupiter.api.Assertions.*; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ProjectRepositorySortIT { @@ -80,7 +78,7 @@ public class ProjectRepositorySortIT { private static final List<SortedProject> PROJECTS = Arrays.asList(PROJECT_4, PROJECT_3, PROJECT_2, PROJECT_1, PROJECT_0); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -89,7 +87,7 @@ public class ProjectRepositorySortIT { @Autowired private SortedProjectRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, SortedProject.class); this.repository.saveAll(PROJECTS); @@ -102,8 +100,8 @@ public void testFindAllSortASC() { PROJECTS.sort(Comparator.comparing(SortedProject::getStarCount)); - Assert.assertEquals(PROJECTS.size(), projects.size()); - Assert.assertEquals(PROJECTS, projects); + assertEquals(PROJECTS.size(), projects.size()); + assertEquals(PROJECTS, projects); } @Test @@ -113,8 +111,8 @@ public void testFindAllSortDESC() { PROJECTS.sort(Comparator.comparing(SortedProject::getCreator).reversed()); - Assert.assertEquals(PROJECTS.size(), projects.size()); - Assert.assertEquals(PROJECTS, projects); + assertEquals(PROJECTS.size(), projects.size()); + assertEquals(PROJECTS, projects); } @Test @@ -125,30 +123,36 @@ public void testFindAllUnSorted() { PROJECTS.sort(Comparator.comparing(SortedProject::getId)); projects.sort(Comparator.comparing(SortedProject::getId)); - Assert.assertEquals(PROJECTS.size(), projects.size()); - Assert.assertEquals(PROJECTS, projects); + assertEquals(PROJECTS.size(), projects.size()); + assertEquals(PROJECTS, projects); } - @Test(expected = CosmosBadRequestException.class) + @Test public void testFindAllSortMoreThanOneOrderException() { - final Sort sort = Sort.by(Sort.Direction.ASC, "name", "creator"); + assertThrows(CosmosBadRequestException.class, () -> { + final Sort sort = Sort.by(Sort.Direction.ASC, "name", "creator"); - this.repository.findAll(sort).iterator().next(); + this.repository.findAll(sort).iterator().next(); + }); } - @Test(expected = IllegalArgumentException.class) + @Test public void testFindAllSortIgnoreCaseException() { - final Sort.Order order = Sort.Order.by("name").ignoreCase(); - final Sort sort = Sort.by(order); + assertThrows(IllegalArgumentException.class, () -> { + final Sort.Order order = Sort.Order.by("name").ignoreCase(); + final Sort sort = Sort.by(order); - this.repository.findAll(sort); + this.repository.findAll(sort); + }); } - @Test(expected = CosmosAccessException.class) + @Test public void testFindAllSortMissMatchException() { - final Sort sort = Sort.by(Sort.Direction.ASC, "fake-name"); + assertThrows(CosmosAccessException.class, () -> { + final Sort sort = Sort.by(Sort.Direction.ASC, "fake-name"); - this.repository.findAll(sort).iterator().next(); + this.repository.findAll(sort).iterator().next(); + }); } public void testFindAllSortWithIdName() { @@ -160,7 +164,7 @@ public void testFindAllSortWithIdName() { false) .collect(Collectors.toList()); - Assert.assertEquals(projectListSortedById, results); + assertEquals(projectListSortedById, results); } @Test @@ -172,8 +176,8 @@ public void testFindSortWithOr() { references.sort(Comparator.comparing(SortedProject::getStarCount)); - Assert.assertEquals(references.size(), projects.size()); - Assert.assertEquals(references, projects); + assertEquals(references.size(), projects.size()); + assertEquals(references, projects); } @Test @@ -185,8 +189,8 @@ public void testFindSortWithAnd() { references.sort(Comparator.comparing(SortedProject::getStarCount)); - Assert.assertEquals(references.size(), projects.size()); - Assert.assertEquals(references, projects); + assertEquals(references.size(), projects.size()); + assertEquals(references, projects); } @Test @@ -197,8 +201,8 @@ public void testFindSortWithEqual() { references.sort(Comparator.comparing(SortedProject::getName).reversed()); - Assert.assertEquals(references.size(), projects.size()); - Assert.assertEquals(references, projects); + assertEquals(references.size(), projects.size()); + assertEquals(references, projects); } @Test @@ -211,8 +215,8 @@ public void testFindAllWithPageableAndSort() { final List<SortedProject> references = Arrays.asList(PROJECT_0, PROJECT_1, PROJECT_2, PROJECT_3, PROJECT_4); references.sort(Comparator.comparing(SortedProject::getName).reversed()); - Assert.assertEquals(references.size(), result.getContent().size()); - Assert.assertEquals(references, result.getContent()); + assertEquals(references.size(), result.getContent().size()); + assertEquals(references, result.getContent()); validateLastPage(result, 5); } @@ -227,8 +231,8 @@ public void testFindWithPageableAndSort() { references.sort(Comparator.comparing(SortedProject::getName).reversed()); - Assert.assertEquals(references.size(), result.getContent().size()); - Assert.assertEquals(references, result.getContent()); + assertEquals(references.size(), result.getContent().size()); + assertEquals(references, result.getContent()); validateLastPage(result, 5); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/QuestionRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/QuestionRepositoryIT.java index db79727bac88..b3516600469f 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/QuestionRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/QuestionRepositoryIT.java @@ -9,23 +9,22 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.QuestionRepository; import org.assertj.core.util.Lists; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Collections; import java.util.List; import java.util.Optional; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.*; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class QuestionRepositoryIT { @@ -37,7 +36,7 @@ public class QuestionRepositoryIT { private static final Question QUESTION = new Question(QUESTION_ID, QUESTION_URL); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -49,7 +48,7 @@ public class QuestionRepositoryIT { @Autowired private ResponseDiagnosticsTestUtils responseDiagnosticsTestUtils; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Question.class); this.repository.save(QUESTION); @@ -59,34 +58,34 @@ public void setUp() { public void testFindById() { final Optional<Question> optional = this.repository.findById(QUESTION_ID); assertThat(responseDiagnosticsTestUtils.getCosmosResponseStatistics()).isNull(); - Assert.assertTrue(optional.isPresent()); - Assert.assertEquals(QUESTION, optional.get()); + Assertions.assertTrue(optional.isPresent()); + assertEquals(QUESTION, optional.get()); } @Test public void testFindByIdNull() { final Optional<Question> byId = this.repository.findById(NULL_ID); - Assert.assertFalse(byId.isPresent()); + Assertions.assertFalse(byId.isPresent()); } @Test public void testFindAll() { final List<Question> questions = Lists.newArrayList(this.repository.findAll()); - Assert.assertEquals(Collections.singletonList(QUESTION), questions); + assertEquals(Collections.singletonList(QUESTION), questions); } @Test public void testDelete() { Optional<Question> optional = this.repository.findById(QUESTION_ID); - Assert.assertTrue(optional.isPresent()); - Assert.assertEquals(QUESTION, optional.get()); + Assertions.assertTrue(optional.isPresent()); + assertEquals(QUESTION, optional.get()); this.repository.delete(QUESTION); optional = this.repository.findById(QUESTION_ID); - Assert.assertFalse(optional.isPresent()); + Assertions.assertFalse(optional.isPresent()); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveAuditableIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveAuditableIT.java index bf676b9f002c..18843d56a619 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveAuditableIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveAuditableIT.java @@ -12,13 +12,12 @@ import com.azure.spring.data.cosmos.repository.repository.ReactiveAuditableIdGeneratedRepository; import com.azure.spring.data.cosmos.repository.repository.ReactiveAuditableRepository; import org.assertj.core.util.Lists; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -30,12 +29,11 @@ import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveAuditableIT { - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -49,7 +47,7 @@ public class ReactiveAuditableIT { @Autowired private StubAuditorProvider stubAuditorProvider; - @Before + @BeforeEach public void setup() { collectionManager.ensureContainersCreatedAndEmpty(template, AuditableEntity.class, AuditableIdGeneratedEntity.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java index 70a4c57a26f4..6a980e9de356 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryIT.java @@ -19,16 +19,13 @@ import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; -import org.assertj.core.api.Assertions; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -40,9 +37,9 @@ import java.util.concurrent.atomic.AtomicBoolean; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.*; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveCourseRepositoryIT { @@ -69,7 +66,7 @@ public class ReactiveCourseRepositoryIT { private static final Course COURSE_4 = new Course(COURSE_ID_4, COURSE_NAME_4, DEPARTMENT_NAME_1); private static final Course COURSE_5 = new Course(COURSE_ID_5, COURSE_NAME_5, DEPARTMENT_NAME_1); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -100,7 +97,7 @@ public class ReactiveCourseRepositoryIT { private static final CosmosPatchItemRequestOptions options = new CosmosPatchItemRequestOptions(); - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Course.class); entityInformation = collectionManager.getEntityInformation(Course.class); @@ -323,7 +320,7 @@ public void testFindByNameAndDepartmentOrNameAndDepartment() { courseResultSet.add(COURSE_1); courseResultSet.add(COURSE_2); StepVerifier.create(findResult).expectNextCount(2).thenConsumeWhile(value -> { - Assertions.assertThat(courseResultSet.contains(value)).isTrue(); + assertThat(courseResultSet.contains(value)).isTrue(); return true; }).verifyComplete(); } @@ -339,9 +336,9 @@ public void testFindByNameOrDepartmentAllIgnoreCase() { public void testFindByNameJsonNode() { final Flux<JsonNode> findResult = repository.annotatedFindByName(COURSE_NAME_1); StepVerifier.create(findResult).consumeNextWith(result -> { - Assert.assertEquals(result.findValue("courseId").asText(), COURSE_1.getCourseId()); - Assert.assertEquals(result.findValue("name").asText(), COURSE_1.getName()); - Assert.assertEquals(result.findValue("department").asText(), COURSE_1.getDepartment()); + assertEquals(result.findValue("courseId").asText(), COURSE_1.getCourseId()); + assertEquals(result.findValue("name").asText(), COURSE_1.getName()); + assertEquals(result.findValue("department").asText(), COURSE_1.getDepartment()); }).verifyComplete(); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryNoMetricsIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryNoMetricsIT.java index 2b4e346afff0..3212abdcc440 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryNoMetricsIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveCourseRepositoryNoMetricsIT.java @@ -10,13 +10,12 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryNoMetricsConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveCourseRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.test.StepVerifier; @@ -24,8 +23,7 @@ import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryNoMetricsConfig.class) public class ReactiveCourseRepositoryNoMetricsIT { @@ -41,7 +39,7 @@ public class ReactiveCourseRepositoryNoMetricsIT { private static final Course COURSE_1 = new Course(COURSE_ID_1, COURSE_NAME_1, DEPARTMENT_NAME_1); private static final Course COURSE_2 = new Course(COURSE_ID_2, COURSE_NAME_2, DEPARTMENT_NAME_2); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -58,7 +56,7 @@ public class ReactiveCourseRepositoryNoMetricsIT { private CosmosEntityInformation<Course, ?> entityInformation; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Course.class); entityInformation = collectionManager.getEntityInformation(Course.class); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveEtagIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveEtagIT.java index 10ef86050958..a72042bce9e1 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveEtagIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveEtagIT.java @@ -8,14 +8,13 @@ import com.azure.spring.data.cosmos.exception.CosmosPreconditionFailedException; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveCourseWithEtagRepository; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -27,13 +26,13 @@ import static com.azure.spring.data.cosmos.common.TestConstants.COURSE_NAME; import static com.azure.spring.data.cosmos.common.TestConstants.DEPARTMENT; +import static org.junit.jupiter.api.Assertions.*; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveEtagIT { - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -41,7 +40,7 @@ public class ReactiveEtagIT { @Autowired ReactiveCourseWithEtagRepository reactiveCourseWithEtagRepository; - @Before + @BeforeEach public void setup() { collectionManager.ensureContainersCreatedAndEmpty(template, CourseWithEtag.class); } @@ -55,23 +54,23 @@ public void testCrudOperationsShouldApplyEtag() { final Mono<CourseWithEtag> insertedCourseWithEtagMono = reactiveCourseWithEtagRepository.save(createCourseWithEtag()); CourseWithEtag insertedCourseWithEtag = insertedCourseWithEtagMono.block(); - Assert.assertNotNull(insertedCourseWithEtag); - Assert.assertNotNull(insertedCourseWithEtag.getEtag()); + Assertions.assertNotNull(insertedCourseWithEtag); + Assertions.assertNotNull(insertedCourseWithEtag.getEtag()); insertedCourseWithEtag.setName("CHANGED"); final Mono<CourseWithEtag> updatedCourseWithEtagMono = reactiveCourseWithEtagRepository.save(insertedCourseWithEtag); CourseWithEtag updatedCourseWithEtag = updatedCourseWithEtagMono.block(); - Assert.assertNotNull(updatedCourseWithEtag); - Assert.assertNotNull(updatedCourseWithEtag.getEtag()); - Assert.assertNotEquals(updatedCourseWithEtag.getEtag(), insertedCourseWithEtag.getEtag()); + Assertions.assertNotNull(updatedCourseWithEtag); + Assertions.assertNotNull(updatedCourseWithEtag.getEtag()); + Assertions.assertNotEquals(updatedCourseWithEtag.getEtag(), insertedCourseWithEtag.getEtag()); final Mono<CourseWithEtag> foundCourseWithEtagMono = reactiveCourseWithEtagRepository.findById(insertedCourseWithEtag.getCourseId()); CourseWithEtag foundCourseWithEtag = foundCourseWithEtagMono.block(); - Assert.assertNotNull(foundCourseWithEtag); - Assert.assertNotNull(foundCourseWithEtag.getEtag()); - Assert.assertEquals(foundCourseWithEtag.getEtag(), updatedCourseWithEtag.getEtag()); + Assertions.assertNotNull(foundCourseWithEtag); + Assertions.assertNotNull(foundCourseWithEtag.getEtag()); + assertEquals(foundCourseWithEtag.getEtag(), updatedCourseWithEtag.getEtag()); } @Test @@ -83,15 +82,15 @@ public void testCrudListOperationsShouldApplyEtag() { final Flux<CourseWithEtag> insertedCourseWithEtagsFlux = reactiveCourseWithEtagRepository.saveAll(courses); List<CourseWithEtag> insertedCourseWithEtags = insertedCourseWithEtagsFlux.collectList().block(); - Assert.assertNotNull(insertedCourseWithEtags); - insertedCourseWithEtags.forEach(course -> Assert.assertNotNull(course.getEtag())); + Assertions.assertNotNull(insertedCourseWithEtags); + insertedCourseWithEtags.forEach(course -> Assertions.assertNotNull(course.getEtag())); insertedCourseWithEtags.forEach(course -> course.setName("CHANGED")); final Flux<CourseWithEtag> updatedCourseWithEtagsFlux = reactiveCourseWithEtagRepository.saveAll(insertedCourseWithEtags); List<CourseWithEtag> updatedCourseWithEtags = updatedCourseWithEtagsFlux.collectList().block(); - Assert.assertNotNull(updatedCourseWithEtags); + Assertions.assertNotNull(updatedCourseWithEtags); insertedCourseWithEtags.sort(Comparator.comparing(CourseWithEtag::getCourseId)); updatedCourseWithEtags.sort(Comparator.comparing(CourseWithEtag::getCourseId)); @@ -99,9 +98,9 @@ public void testCrudListOperationsShouldApplyEtag() { for (int i = 0; i < updatedCourseWithEtags.size(); i++) { CourseWithEtag insertedCourseWithEtag = insertedCourseWithEtags.get(i); CourseWithEtag updatedCourseWithEtag = updatedCourseWithEtags.get(i); - Assert.assertEquals(insertedCourseWithEtag.getCourseId(), updatedCourseWithEtag.getCourseId()); - Assert.assertNotNull(updatedCourseWithEtag.getEtag()); - Assert.assertNotEquals(insertedCourseWithEtag.getEtag(), updatedCourseWithEtag.getEtag()); + assertEquals(insertedCourseWithEtag.getCourseId(), updatedCourseWithEtag.getCourseId()); + Assertions.assertNotNull(updatedCourseWithEtag.getEtag()); + Assertions.assertNotEquals(insertedCourseWithEtag.getEtag(), updatedCourseWithEtag.getEtag()); } } @@ -109,12 +108,12 @@ public void testCrudListOperationsShouldApplyEtag() { public void testShouldFailIfEtagDoesNotMatch() { Mono<CourseWithEtag> insertedCourseWithEtagMono = reactiveCourseWithEtagRepository.save(createCourseWithEtag()); CourseWithEtag insertedCourseWithEtag = insertedCourseWithEtagMono.block(); - Assert.assertNotNull(insertedCourseWithEtag); + Assertions.assertNotNull(insertedCourseWithEtag); insertedCourseWithEtag.setName("CHANGED"); Mono<CourseWithEtag> updatedCourseWithEtagMono = reactiveCourseWithEtagRepository.save(insertedCourseWithEtag); CourseWithEtag updatedCourseWithEtag = updatedCourseWithEtagMono.block(); - Assert.assertNotNull(updatedCourseWithEtag); + Assertions.assertNotNull(updatedCourseWithEtag); updatedCourseWithEtag.setEtag(insertedCourseWithEtag.getEtag()); @@ -129,23 +128,23 @@ public void testShouldFailIfEtagDoesNotMatch() { public void testBulkShouldFailIfEtagDoesNotMatch() { Flux<CourseWithEtag> insertedCourseWithEtagFlux = reactiveCourseWithEtagRepository.saveAll(Flux.just(createCourseWithEtag())); List<CourseWithEtag> insertedCourseWithEtag = insertedCourseWithEtagFlux.collectList().block(); - Assert.assertEquals(insertedCourseWithEtag.size(), 1); + assertEquals(insertedCourseWithEtag.size(), 1); insertedCourseWithEtag.get(0).setName("CHANGED"); Flux<CourseWithEtag> updatedCourseWithEtagFlux = reactiveCourseWithEtagRepository.saveAll(insertedCourseWithEtag); List<CourseWithEtag> updatedCourseWithEtag = updatedCourseWithEtagFlux.collectList().block(); - Assert.assertEquals(updatedCourseWithEtag.size(), 1); + assertEquals(updatedCourseWithEtag.size(), 1); updatedCourseWithEtag.get(0).setEtag(insertedCourseWithEtag.get(0).getEtag()); Flux<CourseWithEtag> courseFlux = reactiveCourseWithEtagRepository.saveAll(updatedCourseWithEtag); StepVerifier.create(courseFlux); - Assert.assertEquals(courseFlux.collectList().block().size(), 0); + assertEquals(courseFlux.collectList().block().size(), 0); reactiveCourseWithEtagRepository.deleteAll(updatedCourseWithEtag); Flux<CourseWithEtag> courseFlux2 = reactiveCourseWithEtagRepository.findAll(); StepVerifier.create(courseFlux2); - Assert.assertEquals(courseFlux2.collectList().block().size(), 1); + assertEquals(courseFlux2.collectList().block().size(), 1); } } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveHierarchicalPartitionKeyRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveHierarchicalPartitionKeyRepositoryIT.java index 74040c3b77fd..c2445f7a4e15 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveHierarchicalPartitionKeyRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveHierarchicalPartitionKeyRepositoryIT.java @@ -10,15 +10,14 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveHierarchicalPartitionKeyRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -26,10 +25,9 @@ import java.util.Arrays; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveHierarchicalPartitionKeyRepositoryIT { @@ -39,7 +37,7 @@ public class ReactiveHierarchicalPartitionKeyRepositoryIT { private static final HierarchicalPartitionKeyEntity HIERARCHICAL_ENTITY_2 = new HierarchicalPartitionKeyEntity("id_2", "Michael", "Smith", "23456"); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); private static CosmosEntityInformation<HierarchicalPartitionKeyEntity, String> hierarchicalPartitionKeyEntityInformation @@ -51,15 +49,15 @@ public class ReactiveHierarchicalPartitionKeyRepositoryIT { @Autowired ReactiveHierarchicalPartitionKeyRepository repository; - @BeforeClass + @BeforeAll public static void init() { } - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(reactiveTemplate, HierarchicalPartitionKeyEntity.class); } - @AfterClass + @AfterAll public static void cleanUp() { collectionManager.deleteContainer(hierarchicalPartitionKeyEntityInformation); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveIndexPolicyUpdateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveIndexPolicyUpdateIT.java index 5fdba53b7a4b..bcd15dfa3f0b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveIndexPolicyUpdateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveIndexPolicyUpdateIT.java @@ -16,26 +16,24 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.repository.support.SimpleReactiveCosmosRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Collections; import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveIndexPolicyUpdateIT { - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -52,7 +50,7 @@ public class ReactiveIndexPolicyUpdateIT { CosmosEntityInformation<Address, String> addressEntityInformation = new CosmosEntityInformation<>(Address.class); - @Before + @BeforeEach public void setup() { collectionManager.ensureContainersCreatedAndEmpty(template, IndexPolicyEntity.class, ComplexIndexPolicyEntity.class, IndexPolicyOverwriteEntity.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveLongIdDomainPartitionPartitionRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveLongIdDomainPartitionPartitionRepositoryIT.java index 649a1821c5da..e6fe821d1ef0 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveLongIdDomainPartitionPartitionRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveLongIdDomainPartitionPartitionRepositoryIT.java @@ -10,14 +10,13 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveLongIdDomainPartitionRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -25,8 +24,9 @@ import java.util.Arrays; import java.util.Objects; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +import static org.junit.jupiter.api.Assertions.assertThrows; + +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveLongIdDomainPartitionPartitionRepositoryIT { @@ -42,7 +42,7 @@ public class ReactiveLongIdDomainPartitionPartitionRepositoryIT { private static final LongIdDomainPartition DOMAIN_2 = new LongIdDomainPartition(ID_2, NAME_2); private static final LongIdDomainPartition DOMAIN_3 = new LongIdDomainPartition(ID_3, NAME_1); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -53,7 +53,7 @@ public class ReactiveLongIdDomainPartitionPartitionRepositoryIT { private CosmosEntityInformation<LongIdDomainPartition, ?> entityInformation; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, LongIdDomainPartition.class); entityInformation = collectionManager.getEntityInformation(LongIdDomainPartition.class); @@ -85,9 +85,10 @@ public void testLongIdDomainPartition() { StepVerifier.create(afterDelIdMono).expectNextCount(0).verifyComplete(); } - @Test(expected = IllegalArgumentException.class) + @Test public void testInvalidDomain() { - new CosmosEntityInformation<InvalidDomain, Long>(InvalidDomain.class); + assertThrows(IllegalArgumentException.class, () -> + new CosmosEntityInformation<InvalidDomain, Long>(InvalidDomain.class)); } @Test diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveNestedPartitionKeyRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveNestedPartitionKeyRepositoryIT.java index 81c0faa585cb..1c34677beb82 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveNestedPartitionKeyRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveNestedPartitionKeyRepositoryIT.java @@ -9,14 +9,13 @@ import com.azure.spring.data.cosmos.domain.NestedPartitionKeyEntity; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveNestedPartitionKeyRepository; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -27,8 +26,7 @@ import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveNestedPartitionKeyRepositoryIT { @@ -38,7 +36,7 @@ public class ReactiveNestedPartitionKeyRepositoryIT { private static final NestedPartitionKeyEntity NESTED_ENTITY_2 = new NestedPartitionKeyEntity(null, new NestedEntity("partitionKey2")); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -47,10 +45,10 @@ public class ReactiveNestedPartitionKeyRepositoryIT { @Autowired ReactiveNestedPartitionKeyRepository repository; - @BeforeClass + @BeforeAll public static void init() { } - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, NestedPartitionKeyEntity.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveRoleRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveRoleRepositoryIT.java index 6a91bab9ccb8..af4364dfeefb 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveRoleRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveRoleRepositoryIT.java @@ -8,14 +8,13 @@ import com.azure.spring.data.cosmos.domain.Role; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveRoleRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -25,8 +24,7 @@ import java.util.List; import java.util.Optional; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveRoleRepositoryIT { @@ -42,7 +40,7 @@ public class ReactiveRoleRepositoryIT { private static final Role TEST_ROLE_5 = new Role(TestConstants.ID_5, true, TestConstants.ROLE_NAME_2, TestConstants.LEVEL_2); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -50,7 +48,7 @@ public class ReactiveRoleRepositoryIT { @Autowired private ReactiveRoleRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Role.class); final Flux<Role> savedFlux = repository.saveAll(Arrays.asList(TEST_ROLE_1, TEST_ROLE_2, TEST_ROLE_3, TEST_ROLE_4)); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveTeacherRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveTeacherRepositoryIT.java index e6b4a53374f6..b6b9e2bc3a18 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveTeacherRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/ReactiveTeacherRepositoryIT.java @@ -8,14 +8,13 @@ import com.azure.spring.data.cosmos.domain.ReactiveTeacher; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.ReactiveTeacherRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -24,8 +23,7 @@ import java.util.Arrays; import java.util.List; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class ReactiveTeacherRepositoryIT { @@ -49,7 +47,7 @@ public class ReactiveTeacherRepositoryIT { private static final ReactiveTeacher TEACHER_3 = new ReactiveTeacher(TEACHER_ID_3, TEACHER_FIRST_NAME_2, DEPARTMENT_LAST_NAME_1); - @ClassRule + public static final ReactiveIntegrationTestCollectionManager collectionManager = new ReactiveIntegrationTestCollectionManager(); @Autowired @@ -58,7 +56,7 @@ public class ReactiveTeacherRepositoryIT { @Autowired private ReactiveTeacherRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, ReactiveTeacher.class); final Flux<ReactiveTeacher> savedFlux = repository.saveAll(Arrays.asList(TEACHER_1)); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosAnnotationIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosAnnotationIT.java index ab4d88dd872c..0e02f5118d3b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosAnnotationIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SpELCosmosAnnotationIT.java @@ -9,23 +9,21 @@ import com.azure.spring.data.cosmos.domain.SpELPropertyStudent; import com.azure.spring.data.cosmos.repository.TestRepositorySpELConfig; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositorySpELConfig.class) public class SpELCosmosAnnotationIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); private static final SpELPropertyStudent TEST_PROPERTY_STUDENT = new SpELPropertyStudent(TestConstants.ID_1, @@ -34,7 +32,7 @@ public class SpELCosmosAnnotationIT { @Autowired private CosmosTemplate cosmosTemplate; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(cosmosTemplate, SpELPropertyStudent.class); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SquareRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SquareRepositoryIT.java index ccc0397c97e9..fe43f90246df 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SquareRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/SquareRepositoryIT.java @@ -8,27 +8,25 @@ import com.azure.spring.data.cosmos.domain.inheritance.Square; import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.SquareRepository; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.List; import java.util.Optional; import static org.assertj.core.api.Assertions.assertThat; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class SquareRepositoryIT { private Square square1 = new Square("id_1", 1, 1); private Square square2 = new Square("id_2", 2, 4); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -37,7 +35,7 @@ public class SquareRepositoryIT { @Autowired private SquareRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Square.class); repository.save(square1); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/StudentRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/StudentRepositoryIT.java index 2781d1d540df..4c2dfa21c0b1 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/StudentRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/StudentRepositoryIT.java @@ -9,25 +9,23 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.StudentRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Arrays; import java.util.Comparator; import java.util.List; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.*; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class StudentRepositoryIT { public static final String ID_0 = "id-0"; @@ -60,7 +58,7 @@ public class StudentRepositoryIT { private static final List<Student> PEOPLE = Arrays.asList(STUDENT_0, STUDENT_1, STUDENT_2, STUDENT_3, STUDENT_4, STUDENT_5); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -69,13 +67,13 @@ public class StudentRepositoryIT { @Autowired private StudentRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Student.class); this.repository.saveAll(PEOPLE); } - @AfterClass + @AfterAll public static void teardown() { collectionManager.deleteContainer(new CosmosEntityInformation<>(Student.class)); } @@ -157,7 +155,7 @@ private void assertPeopleEquals(List<Student> people, List<Student> reference) { people.sort(Comparator.comparing(Student::getId)); reference.sort(Comparator.comparing(Student::getId)); - Assert.assertEquals(reference, people); + assertEquals(reference, people); } @Test diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/TeacherRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/TeacherRepositoryIT.java index 0355f28fbbbd..ccff01a0f465 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/TeacherRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/TeacherRepositoryIT.java @@ -9,25 +9,23 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.TeacherRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.After; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Optional; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class TeacherRepositoryIT { public static final String ID_0 = "id-0"; @@ -38,7 +36,7 @@ public class TeacherRepositoryIT { private static final Teacher TEACHER_0 = new Teacher(ID_0, FIRST_NAME_0, LAST_NAME_0); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -47,13 +45,13 @@ public class TeacherRepositoryIT { @Autowired private TeacherRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, Teacher.class); this.repository.save(TEACHER_0); } - @After + @AfterEach public void teardown() { collectionManager.deleteContainer(new CosmosEntityInformation<>(Teacher.class)); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UUIDIdDomainRepositoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UUIDIdDomainRepositoryIT.java index a6ae8c2aa10b..e61ac65bf20b 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UUIDIdDomainRepositoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UUIDIdDomainRepositoryIT.java @@ -10,14 +10,13 @@ import com.azure.spring.data.cosmos.repository.TestRepositoryConfig; import com.azure.spring.data.cosmos.repository.repository.UUIDIdDomainRepository; import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.Arrays; @@ -31,9 +30,9 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import java.util.stream.StreamSupport; +import static org.junit.jupiter.api.Assertions.*; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class UUIDIdDomainRepositoryIT { @@ -46,7 +45,7 @@ public class UUIDIdDomainRepositoryIT { private static final UUIDIdDomain DOMAIN_1 = new UUIDIdDomain(ID_1, NAME_1); private static final UUIDIdDomain DOMAIN_2 = new UUIDIdDomain(ID_2, NAME_2); - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); @Autowired @@ -55,7 +54,7 @@ public class UUIDIdDomainRepositoryIT { @Autowired private UUIDIdDomainRepository repository; - @Before + @BeforeEach public void setUp() { collectionManager.ensureContainersCreatedAndEmpty(template, UUIDIdDomain.class); this.repository.save(DOMAIN_1); @@ -65,43 +64,45 @@ public void setUp() { @Test public void testUUIDIdDomain() { this.repository.deleteAll(); - Assert.assertFalse(this.repository.findById(ID_1).isPresent()); + Assertions.assertFalse(this.repository.findById(ID_1).isPresent()); this.repository.save(DOMAIN_1); final Optional<UUIDIdDomain> foundOptional = this.repository.findById(ID_1); - Assert.assertTrue(foundOptional.isPresent()); - Assert.assertEquals(DOMAIN_1.getNumber(), foundOptional.get().getNumber()); - Assert.assertEquals(DOMAIN_1.getName(), foundOptional.get().getName()); + Assertions.assertTrue(foundOptional.isPresent()); + assertEquals(DOMAIN_1.getNumber(), foundOptional.get().getNumber()); + assertEquals(DOMAIN_1.getName(), foundOptional.get().getName()); this.repository.delete(DOMAIN_1); - Assert.assertFalse(this.repository.findById(ID_1).isPresent()); + Assertions.assertFalse(this.repository.findById(ID_1).isPresent()); } - @Test(expected = IllegalArgumentException.class) + @Test public void testInvalidDomain() { - new CosmosEntityInformation<InvalidDomain, UUID>(InvalidDomain.class); + assertThrows(IllegalArgumentException.class, () -> + new CosmosEntityInformation<InvalidDomain, UUID>(InvalidDomain.class)); + } @Test public void testBasicQuery() { final UUIDIdDomain save = this.repository.save(DOMAIN_1); - Assert.assertNotNull(save); + Assertions.assertNotNull(save); } @Test public void testSaveAndFindById() { - Assert.assertNotNull(this.repository.save(DOMAIN_1)); + Assertions.assertNotNull(this.repository.save(DOMAIN_1)); final Optional<UUIDIdDomain> savedEntity = this.repository.findById(DOMAIN_1.getNumber()); - Assert.assertTrue(savedEntity.isPresent()); - Assert.assertEquals(DOMAIN_1, savedEntity.get()); + Assertions.assertTrue(savedEntity.isPresent()); + assertEquals(DOMAIN_1, savedEntity.get()); } @Test public void testSaveAllAndFindAll() { - Assert.assertTrue(this.repository.findAll().iterator().hasNext()); + Assertions.assertTrue(this.repository.findAll().iterator().hasNext()); final Set<UUIDIdDomain> entitiesToSave = Stream.of(DOMAIN_1, DOMAIN_2).collect(Collectors.toSet()); this.repository.saveAll(entitiesToSave); @@ -109,14 +110,14 @@ public void testSaveAllAndFindAll() { final Set<UUIDIdDomain> savedEntities = StreamSupport.stream(this.repository.findAll().spliterator(), false) .collect(Collectors.toSet()); - Assert.assertTrue(entitiesToSave.containsAll(savedEntities)); + Assertions.assertTrue(entitiesToSave.containsAll(savedEntities)); } @Test public void testFindAllById() { final Iterable<UUIDIdDomain> allById = TestUtils.toList(this.repository.findAllById(Arrays.asList(DOMAIN_1.getNumber(), DOMAIN_2.getNumber()))); - Assert.assertTrue(((ArrayList) allById).size() == 2); + Assertions.assertTrue(((ArrayList) allById).size() == 2); Iterator<UUIDIdDomain> it = allById.iterator(); assertUUIDIdDomainEquals(Arrays.asList(it.next(), it.next()), Arrays.asList(DOMAIN_1, DOMAIN_2)); } @@ -124,12 +125,12 @@ public void testFindAllById() { private void assertUUIDIdDomainEquals(List<UUIDIdDomain> cur, List<UUIDIdDomain> reference) { cur.sort(Comparator.comparing(UUIDIdDomain::getNumber)); reference.sort(Comparator.comparing(UUIDIdDomain::getNumber)); - Assert.assertEquals(reference, cur); + assertEquals(reference, cur); } @Test public void testCount() { - Assert.assertEquals(2, repository.count()); + assertEquals(2, repository.count()); } @Test @@ -138,26 +139,30 @@ public void testDeleteById() { this.repository.save(DOMAIN_2); this.repository.deleteById(DOMAIN_1.getNumber()); this.repository.deleteById(DOMAIN_2.getNumber()); - Assert.assertEquals(0, this.repository.count()); + assertEquals(0, this.repository.count()); } - @Test(expected = CosmosNotFoundException.class) + @Test public void testDeleteByIdShouldFailIfNothingToDelete() { - this.repository.deleteAll(); - this.repository.deleteById(DOMAIN_1.getNumber()); + assertThrows(CosmosNotFoundException.class, () -> { + this.repository.deleteAll(); + this.repository.deleteById(DOMAIN_1.getNumber()); + }); } @Test public void testDelete() { this.repository.save(DOMAIN_1); this.repository.delete(DOMAIN_1); - Assert.assertEquals(1, this.repository.count()); + assertEquals(1, this.repository.count()); } - @Test(expected = CosmosNotFoundException.class) + @Test public void testDeleteShouldFailIfNothingToDelete() { - this.repository.deleteAll(); - this.repository.delete(DOMAIN_1); + assertThrows(CosmosNotFoundException.class, () -> { + this.repository.deleteAll(); + this.repository.delete(DOMAIN_1); + }); } @Test @@ -165,13 +170,13 @@ public void testDeleteAll() { this.repository.save(DOMAIN_1); this.repository.save(DOMAIN_2); this.repository.deleteAll(Arrays.asList(DOMAIN_1, DOMAIN_2)); - Assert.assertEquals(0, this.repository.count()); + assertEquals(0, this.repository.count()); } @Test public void testExistsById() { this.repository.save(DOMAIN_1); - Assert.assertTrue(this.repository.existsById(DOMAIN_1.getNumber())); + Assertions.assertTrue(this.repository.existsById(DOMAIN_1.getNumber())); } private static class InvalidDomain { diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UniqueKeyPolicyIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UniqueKeyPolicyIT.java index ade372efaf72..0d7e9314d18d 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UniqueKeyPolicyIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/integration/UniqueKeyPolicyIT.java @@ -19,14 +19,13 @@ import com.azure.spring.data.cosmos.repository.support.CosmosEntityInformation; import com.azure.spring.data.cosmos.repository.support.SimpleCosmosRepository; import com.azure.spring.data.cosmos.repository.support.SimpleReactiveCosmosRepository; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Arrays; import java.util.List; @@ -34,12 +33,11 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; -@SuppressWarnings("deprecation") -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) public class UniqueKeyPolicyIT { - @ClassRule + public static final IntegrationTestCollectionManager collectionManager = new IntegrationTestCollectionManager(); private static final UniqueKeyPolicyEntity ENTITY_1 = new UniqueKeyPolicyEntity("id-1", "firstName-1", "lastName" @@ -65,13 +63,13 @@ public class UniqueKeyPolicyIT { private static CosmosEntityInformation<UniqueKeyPolicyEntity, String> information = new CosmosEntityInformation<>(UniqueKeyPolicyEntity.class); - @Before + @BeforeEach public void setup() { collectionManager.ensureContainersCreatedAndEmpty(template, CompositeIndexEntity.class); repository.saveAll(Arrays.asList(ENTITY_1, ENTITY_2, ENTITY_3, ENTITY_4, ENTITY_5)); } - @AfterClass + @AfterAll public static void teardown() { collectionManager.deleteContainer(information); } diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQueryUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQueryUnitTest.java index 33002512f898..4ec575c3c086 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQueryUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractCosmosQueryUnitTest.java @@ -5,15 +5,15 @@ import com.azure.spring.data.cosmos.core.CosmosOperations; import com.azure.spring.data.cosmos.core.query.CosmosPageRequest; import com.azure.spring.data.cosmos.core.query.CosmosQuery; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.util.Assert; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class AbstractCosmosQueryUnitTest { @Mock diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQueryUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQueryUnitTest.java index f64a20601134..b41dfcefd1c9 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQueryUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/query/AbstractReactiveCosmosQueryUnitTest.java @@ -4,16 +4,16 @@ import com.azure.spring.data.cosmos.core.ReactiveCosmosOperations; import com.azure.spring.data.cosmos.core.query.CosmosQuery; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; import org.springframework.util.Assert; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class AbstractReactiveCosmosQueryUnitTest { @Mock diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformationUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformationUnitTest.java index 555a2383ab22..26600cd8e61d 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformationUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosEntityInformationUnitTest.java @@ -10,7 +10,7 @@ import com.azure.spring.data.cosmos.domain.Person; import com.azure.spring.data.cosmos.domain.Student; import com.azure.spring.data.cosmos.domain.UUIDIdDomain; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Version; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryBeanUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryBeanUnitTest.java index 01d75b321d39..b64a27070728 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryBeanUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryBeanUnitTest.java @@ -4,15 +4,15 @@ import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.repository.repository.PersonRepository; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.data.repository.core.support.RepositoryFactorySupport; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class CosmosRepositoryFactoryBeanUnitTest { @Mock diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryUnitTest.java index 4b58b716e4df..68175a6338e9 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/CosmosRepositoryFactoryUnitTest.java @@ -4,15 +4,15 @@ import com.azure.spring.data.cosmos.core.CosmosTemplate; import com.azure.spring.data.cosmos.domain.Person; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.data.repository.core.EntityInformation; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class CosmosRepositoryFactoryUnitTest { @Mock diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/StringBasedCosmosQueryUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/StringBasedCosmosQueryUnitTest.java index 84e09b749ccc..081296b18a7e 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/StringBasedCosmosQueryUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/StringBasedCosmosQueryUnitTest.java @@ -4,17 +4,17 @@ import com.azure.spring.data.cosmos.core.CosmosOperations; import com.azure.spring.data.cosmos.repository.query.CosmosQueryMethod; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class StringBasedCosmosQueryUnitTest { @Mock CosmosQueryMethod cosmosQueryMethod; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/StringBasedReactiveCosmosQueryUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/StringBasedReactiveCosmosQueryUnitTest.java index 1ef3ca08d498..4627fac171ef 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/StringBasedReactiveCosmosQueryUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/repository/support/StringBasedReactiveCosmosQueryUnitTest.java @@ -4,17 +4,17 @@ import com.azure.spring.data.cosmos.core.ReactiveCosmosOperations; import com.azure.spring.data.cosmos.repository.query.ReactiveCosmosQueryMethod; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(MockitoJUnitRunner.class) +@ExtendWith(MockitoExtension.class) public class StringBasedReactiveCosmosQueryUnitTest { @Mock ReactiveCosmosQueryMethod reactiveCosmosQueryMethod; From faa168f890420be2dc973b20c8d33488a8fd3cb0 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Tue, 2 Dec 2025 14:44:59 +0800 Subject: [PATCH 077/186] Fix error --- .../com/azure/spring/data/cosmos/ContainerLockIT.java | 2 +- .../azure/spring/data/cosmos/core/CosmosTemplateIT.java | 2 +- .../data/cosmos/core/CosmosTemplatePartitionIT.java | 2 +- .../cosmos/core/MultiTenantContainerCosmosFactoryIT.java | 2 +- .../data/cosmos/core/MultiTenantDBCosmosFactoryIT.java | 2 +- .../spring/data/cosmos/core/ReactiveCosmosTemplateIT.java | 2 +- .../cosmos/core/ReactiveCosmosTemplatePartitionIT.java | 2 +- .../core/ReactiveMultiTenantContainerCosmosFactoryIT.java | 2 +- .../cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java | 2 +- .../core/mapping/BasicCosmosPersistentEntityUnitTest.java | 8 +++----- 10 files changed, 12 insertions(+), 14 deletions(-) diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/ContainerLockIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/ContainerLockIT.java index 2b817a1aba7e..0874f91e7cf6 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/ContainerLockIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/ContainerLockIT.java @@ -22,7 +22,7 @@ @ExtendWith(SpringExtension.class) @ContextConfiguration(classes = TestRepositoryConfig.class) -@SuppressWarnings({"rawtypes", "unchecked", "deprecation"}) +@SuppressWarnings({"rawtypes", "unchecked"}) public class ContainerLockIT { private static final Duration SHORT_LEASE_DURATION = Duration.ofSeconds(3); diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java index 9daa3a398ba4..c4273aef6f3a 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java @@ -51,7 +51,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.boot.persistence.autoconfigure.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.data.auditing.IsNewAwareAuditingHandler; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java index 62beed86c8d1..4f069d418b45 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplatePartitionIT.java @@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.boot.persistence.autoconfigure.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.data.domain.Page; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java index f087dd4888d0..4ba492852b2c 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantContainerCosmosFactoryIT.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.boot.persistence.autoconfigure.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.test.context.ContextConfiguration; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java index 0de37438ecea..01ad4c86a795 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/MultiTenantDBCosmosFactoryIT.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.boot.persistence.autoconfigure.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.test.context.ContextConfiguration; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java index 407187e1c35e..9a40db71b592 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java @@ -53,7 +53,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.boot.persistence.autoconfigure.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.data.auditing.IsNewAwareAuditingHandler; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java index ffbfe5068841..1e5852078ca1 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplatePartitionIT.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.boot.persistence.autoconfigure.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.data.repository.query.parser.Part; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java index 77eef43b221b..81970d39fc50 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantContainerCosmosFactoryIT.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.boot.persistence.autoconfigure.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.test.context.ContextConfiguration; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java index 56bc2acd0499..d05f905f4f1f 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/ReactiveMultiTenantDBCosmosFactoryIT.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.domain.EntityScanner; +import org.springframework.boot.persistence.autoconfigure.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.data.annotation.Persistent; import org.springframework.test.context.ContextConfiguration; diff --git a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntityUnitTest.java b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntityUnitTest.java index 345457579818..ac0f86f67c98 100644 --- a/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntityUnitTest.java +++ b/sdk/spring/azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntityUnitTest.java @@ -5,25 +5,23 @@ import com.azure.spring.data.cosmos.domain.Person; import org.junit.jupiter.api.Test; -import org.springframework.data.util.ClassTypeInformation; +import org.springframework.data.core.TypeInformation; import static org.assertj.core.api.Assertions.assertThat; public class BasicCosmosPersistentEntityUnitTest { - @SuppressWarnings({"deprecation", "removal"}) @Test public void testGetCollection() { final BasicCosmosPersistentEntity<Person> entity = new BasicCosmosPersistentEntity<Person>( - ClassTypeInformation.from(Person.class)); + TypeInformation.of(Person.class)); assertThat(entity.getContainer()).isEqualTo(""); } - @SuppressWarnings({"deprecation", "removal"}) @Test public void testGetLanguage() { final BasicCosmosPersistentEntity<Person> entity = new BasicCosmosPersistentEntity<Person>( - ClassTypeInformation.from(Person.class)); + TypeInformation.of(Person.class)); assertThat(entity.getLanguage()).isEqualTo(""); } From 463a26e98ac541bb6afca70c04f849750693f94e Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Tue, 2 Dec 2025 14:51:37 +0800 Subject: [PATCH 078/186] skip monitor for not support Spring Boot 4 --- sdk/spring/ci.yml | 22 +++++++++++----------- sdk/spring/pom.xml | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sdk/spring/ci.yml b/sdk/spring/ci.yml index 0fdab4736a25..1e036c6b8ff0 100644 --- a/sdk/spring/ci.yml +++ b/sdk/spring/ci.yml @@ -244,10 +244,10 @@ parameters: displayName: 'spring-cloud-azure-starter-appconfiguration-config' type: boolean default: true -- name: release_springcloudazurestartermonitor - displayName: 'spring-cloud-azure-starter-monitor' - type: boolean - default: true +#- name: release_springcloudazurestartermonitor +# displayName: 'spring-cloud-azure-starter-monitor' +# type: boolean +# default: true extends: @@ -603,12 +603,12 @@ extends: skipPublishDocMs: true skipVerifyChangelog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterappconfigurationconfig }} - - name: spring-cloud-azure-starter-monitor - groupId: com.azure.spring - safeName: springcloudazurestartermonitor - skipPublishDocGithubIo: true - skipPublishDocMs: true - skipVerifyChangelog: true - releaseInBatch: ${{ parameters.release_springcloudazurestartermonitor }} +# - name: spring-cloud-azure-starter-monitor +# groupId: com.azure.spring +# safeName: springcloudazurestartermonitor +# skipPublishDocGithubIo: true +# skipPublishDocMs: true +# skipVerifyChangelog: true +# releaseInBatch: ${{ parameters.release_springcloudazurestartermonitor }} MatrixFilters: - JavaTestVersion=^(?!1.8|1.11).* diff --git a/sdk/spring/pom.xml b/sdk/spring/pom.xml index 005b5bc5c160..b21a8cac2f43 100644 --- a/sdk/spring/pom.xml +++ b/sdk/spring/pom.xml @@ -70,8 +70,8 @@ <module>spring-cloud-azure-feature-management-web</module> <module>spring-cloud-azure-starter-appconfiguration-config</module> <module>azure-spring-data-cosmos</module> - <module>spring-cloud-azure-starter-monitor</module> - <module>spring-cloud-azure-starter-monitor-test</module> +<!-- <module>spring-cloud-azure-starter-monitor</module>--> +<!-- <module>spring-cloud-azure-starter-monitor-test</module>--> </modules> </profile> From 36f685cb48c2a17e9d89648420c8facdf94ad1a6 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Tue, 2 Dec 2025 15:08:24 +0800 Subject: [PATCH 079/186] fix --- eng/versioning/external_dependencies.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 2179ea0b4911..e8991c438080 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -322,7 +322,6 @@ springboot4_io.projectreactor:reactor-test;3.8.0 springboot4_jakarta.servlet:jakarta.servlet-api;6.1.0 springboot4_jakarta.validation:jakarta.validation-api;3.1.1 springboot4_javax.annotation:javax.annotation-api;1.3.2 -springboot4_junit:junit;4.13.2 springboot4_net.bytebuddy:byte-buddy-agent;1.17.8 springboot4_net.bytebuddy:byte-buddy;1.17.8 springboot4_org.apache.commons:commons-lang3;3.19.0 @@ -338,7 +337,6 @@ springboot4_org.assertj:assertj-core;3.27.6 springboot4_org.hibernate.validator:hibernate-validator;9.0.1.Final springboot4_org.javatuples:javatuples;1.2 springboot4_org.junit.jupiter:junit-jupiter;6.0.1 -springboot4_org.junit.vintage:junit-vintage-engine;6.0.1 springboot4_org.messaginghub:pooled-jms;3.1.7 springboot4_org.mockito:mockito-core;5.20.0 springboot4_org.postgresql:postgresql;42.7.8 From a8b7f88fef5d5df77b9496e2d3ae2ccd7118fb03 Mon Sep 17 00:00:00 2001 From: Jose Alvarez <jpalvarezl@users.noreply.github.com> Date: Tue, 2 Dec 2025 08:56:11 +0100 Subject: [PATCH 080/186] MemoryStores updates , tests and samples (#47389) * Updating codeowners * changes in from the private repo * Formatting problems * Changelog correction * Update URL sanitizer regex in ClientTestBase --------- Co-authored-by: Sameeksha Vaity <savaity@microsoft.com> --- .github/CODEOWNERS | 6 +- sdk/ai/azure-ai-agents/CHANGELOG.md | 6 + sdk/ai/azure-ai-agents/_tsp-location.yaml | 2 +- sdk/ai/azure-ai-agents/assets.json | 2 +- .../ai/agents/MemoryStoresAsyncClient.java | 34 +- .../azure/ai/agents/MemoryStoresClient.java | 30 +- .../ai/agents/models/MCPToolAllowedTools.java | 8 +- .../agents/models/MCPToolRequireApproval.java | 4 +- ...oreObject.java => MemoryStoreDetails.java} | 24 +- .../ai/agents/models/ReasoningEffort.java | 27 +- .../azure-ai-agents_apiview_properties.json | 6 +- .../META-INF/azure-ai-agents_metadata.json | 2 +- .../azure/ai/agents/MemorySearchAgent.java | 155 +++++++++ .../com/azure/ai/agents/AgentsAsyncTests.java | 131 +++++--- .../java/com/azure/ai/agents/AgentsTests.java | 76 ++--- .../com/azure/ai/agents/ClientTestBase.java | 24 +- .../ai/agents/MemoryStoresAsyncTests.java | 301 ++++++++++++++++++ .../azure/ai/agents/MemoryStoresTests.java | 289 +++++++++++++++++ 18 files changed, 953 insertions(+), 174 deletions(-) rename sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/{MemoryStoreObject.java => MemoryStoreDetails.java} (88%) create mode 100644 sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/MemorySearchAgent.java create mode 100644 sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/MemoryStoresAsyncTests.java create mode 100644 sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/MemoryStoresTests.java diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bded1b15a829..f3ebd8a34ff4 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -83,13 +83,13 @@ # ServiceOwners: @mojayara @Prasanna-Padmanabhan # PRLabel: %AI -/sdk/ai/ @dargilco @jhakulin @jpalvarezl @Azure/azure-java-sdk +/sdk/ai/ @dargilco @trrwilson @jpalvarezl @Azure/azure-java-sdk # PRLabel: %AI Agents -/sdk/ai/azure-ai-agents-persistent/ @dargilco @jhakulin @jayantjha @Azure/azure-java-sdk +/sdk/ai/azure-ai-agents-persistent/ @dargilco @trrwilson @jayantjha @Azure/azure-java-sdk # PRLabel: %AI Model Inference -/sdk/ai/azure-ai-inference/ @dargilco @jhakulin @glharper @Azure/azure-java-sdk +/sdk/ai/azure-ai-inference/ @dargilco @trrwilson @glharper @Azure/azure-java-sdk # PRLabel: %Voice Live /sdk/ai/azure-ai-voicelive/ @rhurey @xitzhang @amber-yujueWang diff --git a/sdk/ai/azure-ai-agents/CHANGELOG.md b/sdk/ai/azure-ai-agents/CHANGELOG.md index 852013237f5a..a3ca8244915d 100644 --- a/sdk/ai/azure-ai-agents/CHANGELOG.md +++ b/sdk/ai/azure-ai-agents/CHANGELOG.md @@ -4,8 +4,14 @@ ### Features Added +- New `MemorySearchAgent` sample was added demonstrating memory search functionality +- Tests for `MemoryStoresClient` and `MemoryStoresAsyncClient` +- Various documentation updates + ### Breaking Changes +- `MemoryStoreObject` was renamed to `MemoryStoreDetails` + ### Bugs Fixed ### Other Changes diff --git a/sdk/ai/azure-ai-agents/_tsp-location.yaml b/sdk/ai/azure-ai-agents/_tsp-location.yaml index eaad2b612d07..63abffbdc08c 100644 --- a/sdk/ai/azure-ai-agents/_tsp-location.yaml +++ b/sdk/ai/azure-ai-agents/_tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/ai/Azure.AI.Agents.V2.java -commit: d9fef42c87992deb6b3e16de0bd0386723cb9865 +commit: 203d09050acd4d23496c0da4aaff9c6bb83097aa repo: Azure/azure-rest-api-specs-pr additionalDirectories: - specification/ai/Azure.AI.Projects diff --git a/sdk/ai/azure-ai-agents/assets.json b/sdk/ai/azure-ai-agents/assets.json index c62bf899fa88..fc849ff7d2b2 100644 --- a/sdk/ai/azure-ai-agents/assets.json +++ b/sdk/ai/azure-ai-agents/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/ai/azure-ai-agents", - "Tag": "" + "Tag": "java/ai/azure-ai-agents_ca2ca780eb" } \ No newline at end of file diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/MemoryStoresAsyncClient.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/MemoryStoresAsyncClient.java index d540f4563371..cb6b0f3b54a4 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/MemoryStoresAsyncClient.java +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/MemoryStoresAsyncClient.java @@ -15,7 +15,7 @@ import com.azure.ai.agents.models.MemorySearchOptions; import com.azure.ai.agents.models.MemoryStoreDefinition; import com.azure.ai.agents.models.MemoryStoreDeleteScopeResponse; -import com.azure.ai.agents.models.MemoryStoreObject; +import com.azure.ai.agents.models.MemoryStoreDetails; import com.azure.ai.agents.models.MemoryStoreSearchResponse; import com.azure.ai.agents.models.MemoryStoreUpdateCompletedResult; import com.azure.ai.agents.models.MemoryStoreUpdateResponse; @@ -537,7 +537,7 @@ public Mono<Response<BinaryData>> getUpdateResultWithResponse(String name, Strin */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<MemoryStoreObject> createMemoryStore(String name, MemoryStoreDefinition definition, String description, + public Mono<MemoryStoreDetails> createMemoryStore(String name, MemoryStoreDefinition definition, String description, Map<String, String> metadata) { // Generated convenience method for createMemoryStoreWithResponse RequestOptions requestOptions = new RequestOptions(); @@ -545,7 +545,7 @@ public Mono<MemoryStoreObject> createMemoryStore(String name, MemoryStoreDefinit = new CreateMemoryStoreRequest(name, definition).setDescription(description).setMetadata(metadata); BinaryData createMemoryStoreRequest = BinaryData.fromObject(createMemoryStoreRequestObj); return createMemoryStoreWithResponse(createMemoryStoreRequest, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(MemoryStoreObject.class)); + .map(protocolMethodData -> protocolMethodData.toObject(MemoryStoreDetails.class)); } /** @@ -563,13 +563,13 @@ public Mono<MemoryStoreObject> createMemoryStore(String name, MemoryStoreDefinit */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<MemoryStoreObject> createMemoryStore(String name, MemoryStoreDefinition definition) { + public Mono<MemoryStoreDetails> createMemoryStore(String name, MemoryStoreDefinition definition) { // Generated convenience method for createMemoryStoreWithResponse RequestOptions requestOptions = new RequestOptions(); CreateMemoryStoreRequest createMemoryStoreRequestObj = new CreateMemoryStoreRequest(name, definition); BinaryData createMemoryStoreRequest = BinaryData.fromObject(createMemoryStoreRequestObj); return createMemoryStoreWithResponse(createMemoryStoreRequest, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(MemoryStoreObject.class)); + .map(protocolMethodData -> protocolMethodData.toObject(MemoryStoreDetails.class)); } /** @@ -586,11 +586,11 @@ public Mono<MemoryStoreObject> createMemoryStore(String name, MemoryStoreDefinit */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<MemoryStoreObject> getMemoryStore(String name) { + public Mono<MemoryStoreDetails> getMemoryStore(String name) { // Generated convenience method for getMemoryStoreWithResponse RequestOptions requestOptions = new RequestOptions(); return getMemoryStoreWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(MemoryStoreObject.class)); + .map(protocolMethodData -> protocolMethodData.toObject(MemoryStoreDetails.class)); } /** @@ -616,7 +616,7 @@ public Mono<MemoryStoreObject> getMemoryStore(String name) { */ @Generated @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux<MemoryStoreObject> listMemoryStores(Integer limit, ListAgentsRequestOrder order, String after, + public PagedFlux<MemoryStoreDetails> listMemoryStores(Integer limit, ListAgentsRequestOrder order, String after, String before) { // Generated convenience method for listMemoryStores RequestOptions requestOptions = new RequestOptions(); @@ -637,11 +637,11 @@ public PagedFlux<MemoryStoreObject> listMemoryStores(Integer limit, ListAgentsRe Flux<PagedResponse<BinaryData>> flux = (continuationTokenParam == null) ? pagedFluxResponse.byPage().take(1) : pagedFluxResponse.byPage(continuationTokenParam).take(1); - return flux.map(pagedResponse -> new PagedResponseBase<Void, MemoryStoreObject>(pagedResponse.getRequest(), + return flux.map(pagedResponse -> new PagedResponseBase<Void, MemoryStoreDetails>(pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(), pagedResponse.getValue() .stream() - .map(protocolMethodData -> protocolMethodData.toObject(MemoryStoreObject.class)) + .map(protocolMethodData -> protocolMethodData.toObject(MemoryStoreDetails.class)) .collect(Collectors.toList()), pagedResponse.getContinuationToken(), null)); }); @@ -659,7 +659,7 @@ public PagedFlux<MemoryStoreObject> listMemoryStores(Integer limit, ListAgentsRe */ @Generated @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux<MemoryStoreObject> listMemoryStores() { + public PagedFlux<MemoryStoreDetails> listMemoryStores() { // Generated convenience method for listMemoryStores RequestOptions requestOptions = new RequestOptions(); PagedFlux<BinaryData> pagedFluxResponse = listMemoryStores(requestOptions); @@ -667,11 +667,11 @@ public PagedFlux<MemoryStoreObject> listMemoryStores() { Flux<PagedResponse<BinaryData>> flux = (continuationTokenParam == null) ? pagedFluxResponse.byPage().take(1) : pagedFluxResponse.byPage(continuationTokenParam).take(1); - return flux.map(pagedResponse -> new PagedResponseBase<Void, MemoryStoreObject>(pagedResponse.getRequest(), + return flux.map(pagedResponse -> new PagedResponseBase<Void, MemoryStoreDetails>(pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(), pagedResponse.getValue() .stream() - .map(protocolMethodData -> protocolMethodData.toObject(MemoryStoreObject.class)) + .map(protocolMethodData -> protocolMethodData.toObject(MemoryStoreDetails.class)) .collect(Collectors.toList()), pagedResponse.getContinuationToken(), null)); }); @@ -826,14 +826,14 @@ public Mono<Response<BinaryData>> deleteScopeWithResponse(String name, BinaryDat */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<MemoryStoreObject> updateMemoryStore(String name, String description, Map<String, String> metadata) { + public Mono<MemoryStoreDetails> updateMemoryStore(String name, String description, Map<String, String> metadata) { // Generated convenience method for updateMemoryStoreWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateMemoryStoreRequest updateMemoryStoreRequestObj = new UpdateMemoryStoreRequest().setDescription(description).setMetadata(metadata); BinaryData updateMemoryStoreRequest = BinaryData.fromObject(updateMemoryStoreRequestObj); return updateMemoryStoreWithResponse(name, updateMemoryStoreRequest, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(MemoryStoreObject.class)); + .map(protocolMethodData -> protocolMethodData.toObject(MemoryStoreDetails.class)); } /** @@ -850,13 +850,13 @@ public Mono<MemoryStoreObject> updateMemoryStore(String name, String description */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<MemoryStoreObject> updateMemoryStore(String name) { + public Mono<MemoryStoreDetails> updateMemoryStore(String name) { // Generated convenience method for updateMemoryStoreWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateMemoryStoreRequest updateMemoryStoreRequestObj = new UpdateMemoryStoreRequest(); BinaryData updateMemoryStoreRequest = BinaryData.fromObject(updateMemoryStoreRequestObj); return updateMemoryStoreWithResponse(name, updateMemoryStoreRequest, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(MemoryStoreObject.class)); + .map(protocolMethodData -> protocolMethodData.toObject(MemoryStoreDetails.class)); } /** diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/MemoryStoresClient.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/MemoryStoresClient.java index 5f288b08239b..dda6f861558a 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/MemoryStoresClient.java +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/MemoryStoresClient.java @@ -15,7 +15,7 @@ import com.azure.ai.agents.models.MemorySearchOptions; import com.azure.ai.agents.models.MemoryStoreDefinition; import com.azure.ai.agents.models.MemoryStoreDeleteScopeResponse; -import com.azure.ai.agents.models.MemoryStoreObject; +import com.azure.ai.agents.models.MemoryStoreDetails; import com.azure.ai.agents.models.MemoryStoreSearchResponse; import com.azure.ai.agents.models.MemoryStoreUpdateCompletedResult; import com.azure.ai.agents.models.MemoryStoreUpdateResponse; @@ -528,7 +528,7 @@ public Response<BinaryData> getUpdateResultWithResponse(String name, String upda */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public MemoryStoreObject createMemoryStore(String name, MemoryStoreDefinition definition, String description, + public MemoryStoreDetails createMemoryStore(String name, MemoryStoreDefinition definition, String description, Map<String, String> metadata) { // Generated convenience method for createMemoryStoreWithResponse RequestOptions requestOptions = new RequestOptions(); @@ -536,7 +536,7 @@ public MemoryStoreObject createMemoryStore(String name, MemoryStoreDefinition de = new CreateMemoryStoreRequest(name, definition).setDescription(description).setMetadata(metadata); BinaryData createMemoryStoreRequest = BinaryData.fromObject(createMemoryStoreRequestObj); return createMemoryStoreWithResponse(createMemoryStoreRequest, requestOptions).getValue() - .toObject(MemoryStoreObject.class); + .toObject(MemoryStoreDetails.class); } /** @@ -554,13 +554,13 @@ public MemoryStoreObject createMemoryStore(String name, MemoryStoreDefinition de */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public MemoryStoreObject createMemoryStore(String name, MemoryStoreDefinition definition) { + public MemoryStoreDetails createMemoryStore(String name, MemoryStoreDefinition definition) { // Generated convenience method for createMemoryStoreWithResponse RequestOptions requestOptions = new RequestOptions(); CreateMemoryStoreRequest createMemoryStoreRequestObj = new CreateMemoryStoreRequest(name, definition); BinaryData createMemoryStoreRequest = BinaryData.fromObject(createMemoryStoreRequestObj); return createMemoryStoreWithResponse(createMemoryStoreRequest, requestOptions).getValue() - .toObject(MemoryStoreObject.class); + .toObject(MemoryStoreDetails.class); } /** @@ -577,10 +577,10 @@ public MemoryStoreObject createMemoryStore(String name, MemoryStoreDefinition de */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public MemoryStoreObject getMemoryStore(String name) { + public MemoryStoreDetails getMemoryStore(String name) { // Generated convenience method for getMemoryStoreWithResponse RequestOptions requestOptions = new RequestOptions(); - return getMemoryStoreWithResponse(name, requestOptions).getValue().toObject(MemoryStoreObject.class); + return getMemoryStoreWithResponse(name, requestOptions).getValue().toObject(MemoryStoreDetails.class); } /** @@ -606,7 +606,7 @@ public MemoryStoreObject getMemoryStore(String name) { */ @Generated @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<MemoryStoreObject> listMemoryStores(Integer limit, ListAgentsRequestOrder order, String after, + public PagedIterable<MemoryStoreDetails> listMemoryStores(Integer limit, ListAgentsRequestOrder order, String after, String before) { // Generated convenience method for listMemoryStores RequestOptions requestOptions = new RequestOptions(); @@ -623,7 +623,7 @@ public PagedIterable<MemoryStoreObject> listMemoryStores(Integer limit, ListAgen requestOptions.addQueryParam("before", before, false); } return serviceClient.listMemoryStores(requestOptions) - .mapPage(bodyItemValue -> bodyItemValue.toObject(MemoryStoreObject.class)); + .mapPage(bodyItemValue -> bodyItemValue.toObject(MemoryStoreDetails.class)); } /** @@ -638,11 +638,11 @@ public PagedIterable<MemoryStoreObject> listMemoryStores(Integer limit, ListAgen */ @Generated @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<MemoryStoreObject> listMemoryStores() { + public PagedIterable<MemoryStoreDetails> listMemoryStores() { // Generated convenience method for listMemoryStores RequestOptions requestOptions = new RequestOptions(); return serviceClient.listMemoryStores(requestOptions) - .mapPage(bodyItemValue -> bodyItemValue.toObject(MemoryStoreObject.class)); + .mapPage(bodyItemValue -> bodyItemValue.toObject(MemoryStoreDetails.class)); } /** @@ -792,14 +792,14 @@ public Response<BinaryData> deleteScopeWithResponse(String name, BinaryData dele */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public MemoryStoreObject updateMemoryStore(String name, String description, Map<String, String> metadata) { + public MemoryStoreDetails updateMemoryStore(String name, String description, Map<String, String> metadata) { // Generated convenience method for updateMemoryStoreWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateMemoryStoreRequest updateMemoryStoreRequestObj = new UpdateMemoryStoreRequest().setDescription(description).setMetadata(metadata); BinaryData updateMemoryStoreRequest = BinaryData.fromObject(updateMemoryStoreRequestObj); return updateMemoryStoreWithResponse(name, updateMemoryStoreRequest, requestOptions).getValue() - .toObject(MemoryStoreObject.class); + .toObject(MemoryStoreDetails.class); } /** @@ -816,13 +816,13 @@ public MemoryStoreObject updateMemoryStore(String name, String description, Map< */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public MemoryStoreObject updateMemoryStore(String name) { + public MemoryStoreDetails updateMemoryStore(String name) { // Generated convenience method for updateMemoryStoreWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateMemoryStoreRequest updateMemoryStoreRequestObj = new UpdateMemoryStoreRequest(); BinaryData updateMemoryStoreRequest = BinaryData.fromObject(updateMemoryStoreRequestObj); return updateMemoryStoreWithResponse(name, updateMemoryStoreRequest, requestOptions).getValue() - .toObject(MemoryStoreObject.class); + .toObject(MemoryStoreDetails.class); } /** diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MCPToolAllowedTools.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MCPToolAllowedTools.java index ae0451d9af3c..846a635c4e3a 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MCPToolAllowedTools.java +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MCPToolAllowedTools.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.agents.models; import com.azure.core.annotation.Fluent; @@ -18,6 +17,7 @@ */ @Fluent public final class MCPToolAllowedTools implements JsonSerializable<MCPToolAllowedTools> { + /* * List of allowed tool names. */ @@ -68,8 +68,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * Reads an instance of MCPToolAllowedTools from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of MCPToolAllowedTools if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. + * @return An instance of MCPToolAllowedTools if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. * @throws IOException If an error occurs while reading the MCPToolAllowedTools. */ @Generated @@ -79,7 +79,6 @@ public static MCPToolAllowedTools fromJson(JsonReader jsonReader) throws IOExcep while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("tool_names".equals(fieldName)) { List<String> toolNames = reader.readArray(reader1 -> reader1.getString()); deserializedMCPToolAllowedTools.toolNames = toolNames; @@ -87,7 +86,6 @@ public static MCPToolAllowedTools fromJson(JsonReader jsonReader) throws IOExcep reader.skipChildren(); } } - return deserializedMCPToolAllowedTools; }); } diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MCPToolRequireApproval.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MCPToolRequireApproval.java index 4cd0edf7a07b..f7775d3180ce 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MCPToolRequireApproval.java +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MCPToolRequireApproval.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.agents.models; import com.azure.core.annotation.Fluent; @@ -17,6 +16,7 @@ */ @Fluent public final class MCPToolRequireApproval implements JsonSerializable<MCPToolRequireApproval> { + /* * A list of tools that always require approval. */ @@ -107,7 +107,6 @@ public static MCPToolRequireApproval fromJson(JsonReader jsonReader) throws IOEx while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("always".equals(fieldName)) { deserializedMCPToolRequireApproval.always = MCPToolRequireApprovalAlways.fromJson(reader); } else if ("never".equals(fieldName)) { @@ -116,7 +115,6 @@ public static MCPToolRequireApproval fromJson(JsonReader jsonReader) throws IOEx reader.skipChildren(); } } - return deserializedMCPToolRequireApproval; }); } diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MemoryStoreObject.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MemoryStoreDetails.java similarity index 88% rename from sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MemoryStoreObject.java rename to sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MemoryStoreDetails.java index e20eb211aa50..87633054ce76 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MemoryStoreObject.java +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MemoryStoreDetails.java @@ -19,7 +19,7 @@ * A memory store that can store and retrieve user memories. */ @Immutable -public final class MemoryStoreObject implements JsonSerializable<MemoryStoreObject> { +public final class MemoryStoreDetails implements JsonSerializable<MemoryStoreDetails> { /* * The object type, which is always 'memory_store'. @@ -70,7 +70,7 @@ public final class MemoryStoreObject implements JsonSerializable<MemoryStoreObje private final MemoryStoreDefinition definition; /** - * Creates an instance of MemoryStoreObject class. + * Creates an instance of MemoryStoreDetails class. * * @param id the id value to set. * @param createdAt the createdAt value to set. @@ -79,7 +79,7 @@ public final class MemoryStoreObject implements JsonSerializable<MemoryStoreObje * @param definition the definition value to set. */ @Generated - private MemoryStoreObject(String id, OffsetDateTime createdAt, OffsetDateTime updatedAt, String name, + private MemoryStoreDetails(String id, OffsetDateTime createdAt, OffsetDateTime updatedAt, String name, MemoryStoreDefinition definition) { this.id = id; if (createdAt == null) { @@ -195,16 +195,16 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of MemoryStoreObject from the JsonReader. + * Reads an instance of MemoryStoreDetails from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of MemoryStoreObject if the JsonReader was pointing to an instance of it, or null if it was + * @return An instance of MemoryStoreDetails if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MemoryStoreObject. + * @throws IOException If an error occurs while reading the MemoryStoreDetails. */ @Generated - public static MemoryStoreObject fromJson(JsonReader jsonReader) throws IOException { + public static MemoryStoreDetails fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { String id = null; OffsetDateTime createdAt = null; @@ -234,11 +234,11 @@ public static MemoryStoreObject fromJson(JsonReader jsonReader) throws IOExcepti reader.skipChildren(); } } - MemoryStoreObject deserializedMemoryStoreObject - = new MemoryStoreObject(id, createdAt, updatedAt, name, definition); - deserializedMemoryStoreObject.description = description; - deserializedMemoryStoreObject.metadata = metadata; - return deserializedMemoryStoreObject; + MemoryStoreDetails deserializedMemoryStoreDetails + = new MemoryStoreDetails(id, createdAt, updatedAt, name, definition); + deserializedMemoryStoreDetails.description = description; + deserializedMemoryStoreDetails.metadata = metadata; + return deserializedMemoryStoreDetails; }); } } diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/ReasoningEffort.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/ReasoningEffort.java index 1b11941f4bed..ce3d9766d3ad 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/ReasoningEffort.java +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/ReasoningEffort.java @@ -5,15 +5,30 @@ package com.azure.ai.agents.models; /** - * **o-series models only** + * Constrains effort on reasoning for reasoning models. * - * Constrains effort on reasoning for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). - * Currently supported values are `low`, `medium`, and `high`. Reducing - * reasoning effort can result in faster responses and fewer tokens used - * on reasoning in a response. + * Currently supported values are none, minimal, low, medium, and high. + * + * Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. + * + * gpt-5.1 defaults to none, which does not perform reasoning. The supported reasoning values for gpt-5.1 are none, low, + * medium, and high. Tool calls are supported for all reasoning values in gpt-5.1. + * + * All models before gpt-5.1 default to medium reasoning effort, and do not support none. + * + * The gpt-5-pro model defaults to (and only supports) high reasoning effort. */ public enum ReasoningEffort { + /** + * Enum value none. + */ + NONE("none"), + + /** + * Enum value minimal. + */ + MINIMAL("minimal"), + /** * Enum value low. */ diff --git a/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_apiview_properties.json b/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_apiview_properties.json index f62c75ac0007..7ad01ea6db03 100644 --- a/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_apiview_properties.json +++ b/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_apiview_properties.json @@ -213,8 +213,8 @@ "com.azure.ai.agents.models.MCPListToolsItemParam": "OpenAI.MCPListToolsItemParam", "com.azure.ai.agents.models.MCPListToolsTool": "OpenAI.MCPListToolsTool", "com.azure.ai.agents.models.MCPTool": "OpenAI.MCPTool", - "com.azure.ai.agents.models.MCPToolAllowedTools1": "OpenAI.MCPTool.allowed_tools.anonymous", - "com.azure.ai.agents.models.MCPToolRequireApproval1": "OpenAI.MCPTool.require_approval.anonymous", + "com.azure.ai.agents.models.MCPToolAllowedTools": "OpenAI.MCPTool.allowed_tools.anonymous", + "com.azure.ai.agents.models.MCPToolRequireApproval": "OpenAI.MCPTool.require_approval.anonymous", "com.azure.ai.agents.models.MCPToolRequireApprovalAlways": "OpenAI.MCPTool.require_approval.always.anonymous", "com.azure.ai.agents.models.MCPToolRequireApprovalNever": "OpenAI.MCPTool.require_approval.never.anonymous", "com.azure.ai.agents.models.MemoryItem": "Azure.AI.Projects.MemoryItem", @@ -229,8 +229,8 @@ "com.azure.ai.agents.models.MemoryStoreDefaultOptions": "Azure.AI.Projects.MemoryStoreDefaultOptions", "com.azure.ai.agents.models.MemoryStoreDefinition": "Azure.AI.Projects.MemoryStoreDefinition", "com.azure.ai.agents.models.MemoryStoreDeleteScopeResponse": "Azure.AI.Projects.MemoryStoreDeleteScopeResponse", + "com.azure.ai.agents.models.MemoryStoreDetails": "Azure.AI.Projects.MemoryStoreObject", "com.azure.ai.agents.models.MemoryStoreKind": "Azure.AI.Projects.MemoryStoreKind", - "com.azure.ai.agents.models.MemoryStoreObject": "Azure.AI.Projects.MemoryStoreObject", "com.azure.ai.agents.models.MemoryStoreOperationUsage": "Azure.AI.Projects.MemoryStoreOperationUsage", "com.azure.ai.agents.models.MemoryStoreOperationUsageInputTokensDetails": "Azure.AI.Projects.MemoryStoreOperationUsage.input_tokens_details.anonymous", "com.azure.ai.agents.models.MemoryStoreOperationUsageOutputTokensDetails": "Azure.AI.Projects.MemoryStoreOperationUsage.output_tokens_details.anonymous", diff --git a/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json b/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json index f2862d1fffae..84cc4f733278 100644 --- a/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json +++ b/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersion":"2025-11-15-preview","crossLanguageDefinitions":{"com.azure.ai.agents.AgentsAsyncClient":"Azure.AI.Projects.Agents","com.azure.ai.agents.AgentsAsyncClient.createAgent":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsAsyncClient.createAgentFromManifest":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersion":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromManifest":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionWithResponse":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsAsyncClient.createAgentWithResponse":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsAsyncClient.deleteAgent":"Azure.AI.Projects.Agents.deleteAgent","com.azure.ai.agents.AgentsAsyncClient.deleteAgentVersion":"Azure.AI.Projects.Agents.deleteAgentVersion","com.azure.ai.agents.AgentsAsyncClient.deleteAgentVersionWithResponse":"Azure.AI.Projects.Agents.deleteAgentVersion","com.azure.ai.agents.AgentsAsyncClient.deleteAgentWithResponse":"Azure.AI.Projects.Agents.deleteAgent","com.azure.ai.agents.AgentsAsyncClient.getAgent":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsAsyncClient.getAgentVersionDetails":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsAsyncClient.getAgentVersionDetailsWithResponse":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsAsyncClient.getAgentWithResponse":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsAsyncClient.listAgentVersions":"Azure.AI.Projects.Agents.listAgentVersions","com.azure.ai.agents.AgentsAsyncClient.listAgents":"Azure.AI.Projects.Agents.listAgents","com.azure.ai.agents.AgentsAsyncClient.updateAgent":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromManifest":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.updateAgentWithResponse":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClient":"Azure.AI.Projects.Agents","com.azure.ai.agents.AgentsClient.createAgent":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsClient.createAgentFromManifest":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsClient.createAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersion":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsClient.createAgentVersionFromManifest":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersionFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersionWithResponse":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsClient.createAgentWithResponse":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsClient.deleteAgent":"Azure.AI.Projects.Agents.deleteAgent","com.azure.ai.agents.AgentsClient.deleteAgentVersion":"Azure.AI.Projects.Agents.deleteAgentVersion","com.azure.ai.agents.AgentsClient.deleteAgentVersionWithResponse":"Azure.AI.Projects.Agents.deleteAgentVersion","com.azure.ai.agents.AgentsClient.deleteAgentWithResponse":"Azure.AI.Projects.Agents.deleteAgent","com.azure.ai.agents.AgentsClient.getAgent":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsClient.getAgentVersionDetails":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsClient.getAgentVersionDetailsWithResponse":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsClient.getAgentWithResponse":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsClient.listAgentVersions":"Azure.AI.Projects.Agents.listAgentVersions","com.azure.ai.agents.AgentsClient.listAgents":"Azure.AI.Projects.Agents.listAgents","com.azure.ai.agents.AgentsClient.updateAgent":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClient.updateAgentFromManifest":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsClient.updateAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsClient.updateAgentWithResponse":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClientBuilder":"Azure.AI.Projects","com.azure.ai.agents.MemoryStoresAsyncClient":"Azure.AI.Projects.MemoryStores","com.azure.ai.agents.MemoryStoresAsyncClient.beginUpdateMemories":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.MemoryStoresAsyncClient.beginUpdateMemoriesWithModel":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.MemoryStoresAsyncClient.createMemoryStore":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.MemoryStoresAsyncClient.createMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.MemoryStoresAsyncClient.deleteMemoryStore":"Azure.AI.Projects.MemoryStores.deleteMemoryStore","com.azure.ai.agents.MemoryStoresAsyncClient.deleteMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.deleteMemoryStore","com.azure.ai.agents.MemoryStoresAsyncClient.deleteScope":"Azure.AI.Projects.MemoryStores.deleteScope","com.azure.ai.agents.MemoryStoresAsyncClient.deleteScopeWithResponse":"Azure.AI.Projects.MemoryStores.deleteScope","com.azure.ai.agents.MemoryStoresAsyncClient.getMemoryStore":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.MemoryStoresAsyncClient.getMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.MemoryStoresAsyncClient.getUpdateResult":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.MemoryStoresAsyncClient.getUpdateResultWithResponse":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.MemoryStoresAsyncClient.listMemoryStores":"Azure.AI.Projects.MemoryStores.listMemoryStores","com.azure.ai.agents.MemoryStoresAsyncClient.searchMemories":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.MemoryStoresAsyncClient.searchMemoriesWithResponse":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.MemoryStoresAsyncClient.updateMemoryStore":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.MemoryStoresAsyncClient.updateMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.MemoryStoresClient":"Azure.AI.Projects.MemoryStores","com.azure.ai.agents.MemoryStoresClient.beginUpdateMemories":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.MemoryStoresClient.beginUpdateMemoriesWithModel":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.MemoryStoresClient.createMemoryStore":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.MemoryStoresClient.createMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.MemoryStoresClient.deleteMemoryStore":"Azure.AI.Projects.MemoryStores.deleteMemoryStore","com.azure.ai.agents.MemoryStoresClient.deleteMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.deleteMemoryStore","com.azure.ai.agents.MemoryStoresClient.deleteScope":"Azure.AI.Projects.MemoryStores.deleteScope","com.azure.ai.agents.MemoryStoresClient.deleteScopeWithResponse":"Azure.AI.Projects.MemoryStores.deleteScope","com.azure.ai.agents.MemoryStoresClient.getMemoryStore":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.MemoryStoresClient.getMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.MemoryStoresClient.getUpdateResult":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.MemoryStoresClient.getUpdateResultWithResponse":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.MemoryStoresClient.listMemoryStores":"Azure.AI.Projects.MemoryStores.listMemoryStores","com.azure.ai.agents.MemoryStoresClient.searchMemories":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.MemoryStoresClient.searchMemoriesWithResponse":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.MemoryStoresClient.updateMemoryStore":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.MemoryStoresClient.updateMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.implementation.models.CreateAgentFromManifestRequest1":"Azure.AI.Projects.createAgentFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentRequest1":"Azure.AI.Projects.createAgent.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentVersionFromManifestRequest1":"Azure.AI.Projects.createAgentVersionFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentVersionRequest1":"Azure.AI.Projects.createAgentVersion.Request.anonymous","com.azure.ai.agents.implementation.models.CreateMemoryStoreRequest":"Azure.AI.Projects.createMemoryStore.Request.anonymous","com.azure.ai.agents.implementation.models.DeleteScopeRequest":"Azure.AI.Projects.deleteScope.Request.anonymous","com.azure.ai.agents.implementation.models.SearchMemoriesRequest":"Azure.AI.Projects.searchMemories.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateAgentFromManifestRequest1":"Azure.AI.Projects.updateAgentFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateAgentRequest1":"Azure.AI.Projects.updateAgent.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoriesRequest":"Azure.AI.Projects.updateMemories.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoryStoreRequest":"Azure.AI.Projects.updateMemoryStore.Request.anonymous","com.azure.ai.agents.models.A2ATool":"Azure.AI.Projects.A2ATool","com.azure.ai.agents.models.AISearchIndexResource":"Azure.AI.Projects.AISearchIndexResource","com.azure.ai.agents.models.AgentDefinition":"Azure.AI.Projects.AgentDefinition","com.azure.ai.agents.models.AgentDetails":"Azure.AI.Projects.AgentObject","com.azure.ai.agents.models.AgentId":"Azure.AI.Projects.AgentId","com.azure.ai.agents.models.AgentKind":"Azure.AI.Projects.AgentKind","com.azure.ai.agents.models.AgentObjectVersions":"Azure.AI.Projects.AgentObject.versions.anonymous","com.azure.ai.agents.models.AgentProtocol":"Azure.AI.Projects.AgentProtocol","com.azure.ai.agents.models.AgentReference":"Azure.AI.Projects.AgentReference","com.azure.ai.agents.models.AgentVersionDetails":"Azure.AI.Projects.AgentVersionObject","com.azure.ai.agents.models.Annotation":"OpenAI.Annotation","com.azure.ai.agents.models.AnnotationFileCitation":"OpenAI.AnnotationFileCitation","com.azure.ai.agents.models.AnnotationFilePath":"OpenAI.AnnotationFilePath","com.azure.ai.agents.models.AnnotationType":"OpenAI.AnnotationType","com.azure.ai.agents.models.AnnotationUrlCitation":"OpenAI.AnnotationUrlCitation","com.azure.ai.agents.models.ApproximateLocation":"OpenAI.ApproximateLocation","com.azure.ai.agents.models.AzureAISearchAgentTool":"Azure.AI.Projects.AzureAISearchAgentTool","com.azure.ai.agents.models.AzureAISearchQueryType":"Azure.AI.Projects.AzureAISearchQueryType","com.azure.ai.agents.models.AzureAISearchToolResource":"Azure.AI.Projects.AzureAISearchToolResource","com.azure.ai.agents.models.AzureFunctionAgentTool":"Azure.AI.Projects.AzureFunctionAgentTool","com.azure.ai.agents.models.AzureFunctionBinding":"Azure.AI.Projects.AzureFunctionBinding","com.azure.ai.agents.models.AzureFunctionDefinition":"Azure.AI.Projects.AzureFunctionDefinition","com.azure.ai.agents.models.AzureFunctionDefinitionFunction":"Azure.AI.Projects.AzureFunctionDefinition.function.anonymous","com.azure.ai.agents.models.AzureFunctionStorageQueue":"Azure.AI.Projects.AzureFunctionStorageQueue","com.azure.ai.agents.models.BingCustomSearchAgentTool":"Azure.AI.Projects.BingCustomSearchAgentTool","com.azure.ai.agents.models.BingCustomSearchConfiguration":"Azure.AI.Projects.BingCustomSearchConfiguration","com.azure.ai.agents.models.BingCustomSearchToolParameters":"Azure.AI.Projects.BingCustomSearchToolParameters","com.azure.ai.agents.models.BingGroundingAgentTool":"Azure.AI.Projects.BingGroundingAgentTool","com.azure.ai.agents.models.BingGroundingSearchConfiguration":"Azure.AI.Projects.BingGroundingSearchConfiguration","com.azure.ai.agents.models.BingGroundingSearchToolParameters":"Azure.AI.Projects.BingGroundingSearchToolParameters","com.azure.ai.agents.models.BrowserAutomationAgentTool":"Azure.AI.Projects.BrowserAutomationAgentTool","com.azure.ai.agents.models.BrowserAutomationToolConnectionParameters":"Azure.AI.Projects.BrowserAutomationToolConnectionParameters","com.azure.ai.agents.models.BrowserAutomationToolParameters":"Azure.AI.Projects.BrowserAutomationToolParameters","com.azure.ai.agents.models.CaptureStructuredOutputsTool":"Azure.AI.Projects.CaptureStructuredOutputsTool","com.azure.ai.agents.models.ChatSummaryMemoryItem":"Azure.AI.Projects.ChatSummaryMemoryItem","com.azure.ai.agents.models.CodeInterpreterOutput":"OpenAI.CodeInterpreterOutput","com.azure.ai.agents.models.CodeInterpreterOutputImage":"OpenAI.CodeInterpreterOutputImage","com.azure.ai.agents.models.CodeInterpreterOutputLogs":"OpenAI.CodeInterpreterOutputLogs","com.azure.ai.agents.models.CodeInterpreterOutputType":"OpenAI.CodeInterpreterOutputType","com.azure.ai.agents.models.CodeInterpreterTool":"OpenAI.CodeInterpreterTool","com.azure.ai.agents.models.CodeInterpreterToolAuto":"OpenAI.CodeInterpreterToolAuto","com.azure.ai.agents.models.CodeInterpreterToolCallItemParam":"OpenAI.CodeInterpreterToolCallItemParam","com.azure.ai.agents.models.ComparisonFilter":"OpenAI.ComparisonFilter","com.azure.ai.agents.models.ComparisonFilterType":"OpenAI.ComparisonFilter.type.anonymous","com.azure.ai.agents.models.CompoundFilter":"OpenAI.CompoundFilter","com.azure.ai.agents.models.CompoundFilterType":"OpenAI.CompoundFilter.type.anonymous","com.azure.ai.agents.models.ComputerAction":"OpenAI.ComputerAction","com.azure.ai.agents.models.ComputerActionClick":"OpenAI.ComputerActionClick","com.azure.ai.agents.models.ComputerActionClickButton":"OpenAI.ComputerActionClick.button.anonymous","com.azure.ai.agents.models.ComputerActionDoubleClick":"OpenAI.ComputerActionDoubleClick","com.azure.ai.agents.models.ComputerActionDrag":"OpenAI.ComputerActionDrag","com.azure.ai.agents.models.ComputerActionKeyPress":"OpenAI.ComputerActionKeyPress","com.azure.ai.agents.models.ComputerActionMove":"OpenAI.ComputerActionMove","com.azure.ai.agents.models.ComputerActionScreenshot":"OpenAI.ComputerActionScreenshot","com.azure.ai.agents.models.ComputerActionScroll":"OpenAI.ComputerActionScroll","com.azure.ai.agents.models.ComputerActionType":"OpenAI.ComputerActionType","com.azure.ai.agents.models.ComputerActionTypeKeys":"OpenAI.ComputerActionTypeKeys","com.azure.ai.agents.models.ComputerActionWait":"OpenAI.ComputerActionWait","com.azure.ai.agents.models.ComputerToolCallItemParam":"OpenAI.ComputerToolCallItemParam","com.azure.ai.agents.models.ComputerToolCallOutputItemOutput":"OpenAI.ComputerToolCallOutputItemOutput","com.azure.ai.agents.models.ComputerToolCallOutputItemOutputComputerScreenshot":"OpenAI.ComputerToolCallOutputItemOutputComputerScreenshot","com.azure.ai.agents.models.ComputerToolCallOutputItemOutputType":"OpenAI.ComputerToolCallOutputItemOutputType","com.azure.ai.agents.models.ComputerToolCallOutputItemParam":"OpenAI.ComputerToolCallOutputItemParam","com.azure.ai.agents.models.ComputerToolCallSafetyCheck":"OpenAI.ComputerToolCallSafetyCheck","com.azure.ai.agents.models.ComputerUsePreviewTool":"OpenAI.ComputerUsePreviewTool","com.azure.ai.agents.models.ComputerUsePreviewToolEnvironment":"OpenAI.ComputerUsePreviewTool.environment.anonymous","com.azure.ai.agents.models.ContainerAppAgentDefinition":"Azure.AI.Projects.ContainerAppAgentDefinition","com.azure.ai.agents.models.Coordinate":"OpenAI.Coordinate","com.azure.ai.agents.models.DeleteAgentResponse":"Azure.AI.Projects.DeleteAgentResponse","com.azure.ai.agents.models.DeleteAgentVersionResponse":"Azure.AI.Projects.DeleteAgentVersionResponse","com.azure.ai.agents.models.DeleteMemoryStoreResponse":"Azure.AI.Projects.DeleteMemoryStoreResponse","com.azure.ai.agents.models.Error":"OpenAI.Error","com.azure.ai.agents.models.FabricDataAgentToolParameters":"Azure.AI.Projects.FabricDataAgentToolParameters","com.azure.ai.agents.models.FileSearchTool":"OpenAI.FileSearchTool","com.azure.ai.agents.models.FileSearchToolCallItemParam":"OpenAI.FileSearchToolCallItemParam","com.azure.ai.agents.models.FileSearchToolCallItemParamResult":"OpenAI.FileSearchToolCallItemParam.result.anonymous","com.azure.ai.agents.models.FunctionTool":"OpenAI.FunctionTool","com.azure.ai.agents.models.FunctionToolCallItemParam":"OpenAI.FunctionToolCallItemParam","com.azure.ai.agents.models.FunctionToolCallOutputItemParam":"OpenAI.FunctionToolCallOutputItemParam","com.azure.ai.agents.models.HostedAgentDefinition":"Azure.AI.Projects.HostedAgentDefinition","com.azure.ai.agents.models.ImageBasedHostedAgentDefinition":"Azure.AI.Projects.ImageBasedHostedAgentDefinition","com.azure.ai.agents.models.ImageGenTool":"OpenAI.ImageGenTool","com.azure.ai.agents.models.ImageGenToolBackground":"OpenAI.ImageGenTool.background.anonymous","com.azure.ai.agents.models.ImageGenToolCallItemParam":"OpenAI.ImageGenToolCallItemParam","com.azure.ai.agents.models.ImageGenToolInputImageMask":"OpenAI.ImageGenTool.input_image_mask.anonymous","com.azure.ai.agents.models.ImageGenToolModel":null,"com.azure.ai.agents.models.ImageGenToolModeration":"OpenAI.ImageGenTool.moderation.anonymous","com.azure.ai.agents.models.ImageGenToolOutputFormat":"OpenAI.ImageGenTool.output_format.anonymous","com.azure.ai.agents.models.ImageGenToolQuality":"OpenAI.ImageGenTool.quality.anonymous","com.azure.ai.agents.models.ImageGenToolSize":"OpenAI.ImageGenTool.size.anonymous","com.azure.ai.agents.models.ItemContent":"OpenAI.ItemContent","com.azure.ai.agents.models.ItemContentInputAudio":"OpenAI.ItemContentInputAudio","com.azure.ai.agents.models.ItemContentInputAudioFormat":"OpenAI.ItemContentInputAudio.format.anonymous","com.azure.ai.agents.models.ItemContentInputFile":"OpenAI.ItemContentInputFile","com.azure.ai.agents.models.ItemContentInputImage":"OpenAI.ItemContentInputImage","com.azure.ai.agents.models.ItemContentInputImageDetail":"OpenAI.ItemContentInputImage.detail.anonymous","com.azure.ai.agents.models.ItemContentInputText":"OpenAI.ItemContentInputText","com.azure.ai.agents.models.ItemContentOutputAudio":"OpenAI.ItemContentOutputAudio","com.azure.ai.agents.models.ItemContentOutputText":"OpenAI.ItemContentOutputText","com.azure.ai.agents.models.ItemContentRefusal":"OpenAI.ItemContentRefusal","com.azure.ai.agents.models.ItemContentType":"OpenAI.ItemContentType","com.azure.ai.agents.models.ItemParam":"OpenAI.ItemParam","com.azure.ai.agents.models.ItemReferenceItemParam":"OpenAI.ItemReferenceItemParam","com.azure.ai.agents.models.ItemType":"OpenAI.ItemType","com.azure.ai.agents.models.ListAgentsRequestOrder":"Azure.AI.Projects.listAgents.RequestOrder.anonymous","com.azure.ai.agents.models.LocalShellExecAction":"OpenAI.LocalShellExecAction","com.azure.ai.agents.models.LocalShellTool":"OpenAI.LocalShellTool","com.azure.ai.agents.models.LocalShellToolCallItemParam":"OpenAI.LocalShellToolCallItemParam","com.azure.ai.agents.models.LocalShellToolCallOutputItemParam":"OpenAI.LocalShellToolCallOutputItemParam","com.azure.ai.agents.models.Location":"OpenAI.Location","com.azure.ai.agents.models.LocationType":"OpenAI.LocationType","com.azure.ai.agents.models.LogProb":"OpenAI.LogProb","com.azure.ai.agents.models.MCPApprovalRequestItemParam":"OpenAI.MCPApprovalRequestItemParam","com.azure.ai.agents.models.MCPApprovalResponseItemParam":"OpenAI.MCPApprovalResponseItemParam","com.azure.ai.agents.models.MCPCallItemParam":"OpenAI.MCPCallItemParam","com.azure.ai.agents.models.MCPListToolsItemParam":"OpenAI.MCPListToolsItemParam","com.azure.ai.agents.models.MCPListToolsTool":"OpenAI.MCPListToolsTool","com.azure.ai.agents.models.MCPTool":"OpenAI.MCPTool","com.azure.ai.agents.models.MCPToolAllowedTools1":"OpenAI.MCPTool.allowed_tools.anonymous","com.azure.ai.agents.models.MCPToolRequireApproval1":"OpenAI.MCPTool.require_approval.anonymous","com.azure.ai.agents.models.MCPToolRequireApprovalAlways":"OpenAI.MCPTool.require_approval.always.anonymous","com.azure.ai.agents.models.MCPToolRequireApprovalNever":"OpenAI.MCPTool.require_approval.never.anonymous","com.azure.ai.agents.models.MemoryItem":"Azure.AI.Projects.MemoryItem","com.azure.ai.agents.models.MemoryItemKind":"Azure.AI.Projects.MemoryItemKind","com.azure.ai.agents.models.MemoryOperation":"Azure.AI.Projects.MemoryOperation","com.azure.ai.agents.models.MemoryOperationKind":"Azure.AI.Projects.MemoryOperationKind","com.azure.ai.agents.models.MemorySearchItem":"Azure.AI.Projects.MemorySearchItem","com.azure.ai.agents.models.MemorySearchOptions":"Azure.AI.Projects.MemorySearchOptions","com.azure.ai.agents.models.MemorySearchTool":"Azure.AI.Projects.MemorySearchTool","com.azure.ai.agents.models.MemorySearchToolCallItemParam":"Azure.AI.Projects.MemorySearchToolCallItemParam","com.azure.ai.agents.models.MemoryStoreDefaultDefinition":"Azure.AI.Projects.MemoryStoreDefaultDefinition","com.azure.ai.agents.models.MemoryStoreDefaultOptions":"Azure.AI.Projects.MemoryStoreDefaultOptions","com.azure.ai.agents.models.MemoryStoreDefinition":"Azure.AI.Projects.MemoryStoreDefinition","com.azure.ai.agents.models.MemoryStoreDeleteScopeResponse":"Azure.AI.Projects.MemoryStoreDeleteScopeResponse","com.azure.ai.agents.models.MemoryStoreKind":"Azure.AI.Projects.MemoryStoreKind","com.azure.ai.agents.models.MemoryStoreObject":"Azure.AI.Projects.MemoryStoreObject","com.azure.ai.agents.models.MemoryStoreOperationUsage":"Azure.AI.Projects.MemoryStoreOperationUsage","com.azure.ai.agents.models.MemoryStoreOperationUsageInputTokensDetails":"Azure.AI.Projects.MemoryStoreOperationUsage.input_tokens_details.anonymous","com.azure.ai.agents.models.MemoryStoreOperationUsageOutputTokensDetails":"Azure.AI.Projects.MemoryStoreOperationUsage.output_tokens_details.anonymous","com.azure.ai.agents.models.MemoryStoreSearchResponse":"Azure.AI.Projects.MemoryStoreSearchResponse","com.azure.ai.agents.models.MemoryStoreUpdateCompletedResult":"Azure.AI.Projects.MemoryStoreUpdateCompletedResult","com.azure.ai.agents.models.MemoryStoreUpdateResponse":"Azure.AI.Projects.MemoryStoreUpdateResponse","com.azure.ai.agents.models.MemoryStoreUpdateStatus":"Azure.AI.Projects.MemoryStoreUpdateStatus","com.azure.ai.agents.models.MicrosoftFabricAgentTool":"Azure.AI.Projects.MicrosoftFabricAgentTool","com.azure.ai.agents.models.OpenApiAgentTool":"Azure.AI.Projects.OpenApiAgentTool","com.azure.ai.agents.models.OpenApiAnonymousAuthDetails":"Azure.AI.Projects.OpenApiAnonymousAuthDetails","com.azure.ai.agents.models.OpenApiAuthDetails":"Azure.AI.Projects.OpenApiAuthDetails","com.azure.ai.agents.models.OpenApiAuthType":"Azure.AI.Projects.OpenApiAuthType","com.azure.ai.agents.models.OpenApiFunctionDefinition":"Azure.AI.Projects.OpenApiFunctionDefinition","com.azure.ai.agents.models.OpenApiFunctionDefinitionFunction":"Azure.AI.Projects.OpenApiFunctionDefinition.function.anonymous","com.azure.ai.agents.models.OpenApiManagedAuthDetails":"Azure.AI.Projects.OpenApiManagedAuthDetails","com.azure.ai.agents.models.OpenApiManagedSecurityScheme":"Azure.AI.Projects.OpenApiManagedSecurityScheme","com.azure.ai.agents.models.OpenApiProjectConnectionAuthDetails":"Azure.AI.Projects.OpenApiProjectConnectionAuthDetails","com.azure.ai.agents.models.OpenApiProjectConnectionSecurityScheme":"Azure.AI.Projects.OpenApiProjectConnectionSecurityScheme","com.azure.ai.agents.models.PromptAgentDefinition":"Azure.AI.Projects.PromptAgentDefinition","com.azure.ai.agents.models.PromptAgentDefinitionText":"Azure.AI.Projects.PromptAgentDefinition.text.anonymous","com.azure.ai.agents.models.ProtocolVersionRecord":"Azure.AI.Projects.ProtocolVersionRecord","com.azure.ai.agents.models.RaiConfig":"Azure.AI.Projects.RaiConfig","com.azure.ai.agents.models.RankingOptions":"OpenAI.RankingOptions","com.azure.ai.agents.models.RankingOptionsRanker":"OpenAI.RankingOptions.ranker.anonymous","com.azure.ai.agents.models.Reasoning":"OpenAI.Reasoning","com.azure.ai.agents.models.ReasoningEffort":"OpenAI.ReasoningEffort","com.azure.ai.agents.models.ReasoningGenerateSummary":"OpenAI.Reasoning.generate_summary.anonymous","com.azure.ai.agents.models.ReasoningItemParam":"OpenAI.ReasoningItemParam","com.azure.ai.agents.models.ReasoningItemSummaryPart":"OpenAI.ReasoningItemSummaryPart","com.azure.ai.agents.models.ReasoningItemSummaryPartType":"OpenAI.ReasoningItemSummaryPartType","com.azure.ai.agents.models.ReasoningItemSummaryTextPart":"OpenAI.ReasoningItemSummaryTextPart","com.azure.ai.agents.models.ReasoningSummary":"OpenAI.Reasoning.summary.anonymous","com.azure.ai.agents.models.ResponseTextFormatConfiguration":"OpenAI.ResponseTextFormatConfiguration","com.azure.ai.agents.models.ResponseTextFormatConfigurationJsonObject":"OpenAI.ResponseTextFormatConfigurationJsonObject","com.azure.ai.agents.models.ResponseTextFormatConfigurationJsonSchema":"OpenAI.ResponseTextFormatConfigurationJsonSchema","com.azure.ai.agents.models.ResponseTextFormatConfigurationText":"OpenAI.ResponseTextFormatConfigurationText","com.azure.ai.agents.models.ResponseTextFormatConfigurationType":"OpenAI.ResponseTextFormatConfigurationType","com.azure.ai.agents.models.ResponsesAssistantMessageItemParam":"OpenAI.ResponsesAssistantMessageItemParam","com.azure.ai.agents.models.ResponsesDeveloperMessageItemParam":"OpenAI.ResponsesDeveloperMessageItemParam","com.azure.ai.agents.models.ResponsesMessageItemParam":"OpenAI.ResponsesMessageItemParam","com.azure.ai.agents.models.ResponsesMessageRole":"OpenAI.ResponsesMessageRole","com.azure.ai.agents.models.ResponsesSystemMessageItemParam":"OpenAI.ResponsesSystemMessageItemParam","com.azure.ai.agents.models.ResponsesUserMessageItemParam":"OpenAI.ResponsesUserMessageItemParam","com.azure.ai.agents.models.SharepointAgentTool":"Azure.AI.Projects.SharepointAgentTool","com.azure.ai.agents.models.SharepointGroundingToolParameters":"Azure.AI.Projects.SharepointGroundingToolParameters","com.azure.ai.agents.models.StructuredInputDefinition":"Azure.AI.Projects.StructuredInputDefinition","com.azure.ai.agents.models.StructuredOutputDefinition":"Azure.AI.Projects.StructuredOutputDefinition","com.azure.ai.agents.models.Tool":"OpenAI.Tool","com.azure.ai.agents.models.ToolProjectConnection":"Azure.AI.Projects.ToolProjectConnection","com.azure.ai.agents.models.ToolType":"OpenAI.ToolType","com.azure.ai.agents.models.TopLogProb":"OpenAI.TopLogProb","com.azure.ai.agents.models.UserProfileMemoryItem":"Azure.AI.Projects.UserProfileMemoryItem","com.azure.ai.agents.models.VectorStoreFileAttributes":"OpenAI.VectorStoreFileAttributes","com.azure.ai.agents.models.WebSearchAction":"OpenAI.WebSearchAction","com.azure.ai.agents.models.WebSearchActionFind":"OpenAI.WebSearchActionFind","com.azure.ai.agents.models.WebSearchActionOpenPage":"OpenAI.WebSearchActionOpenPage","com.azure.ai.agents.models.WebSearchActionSearch":"OpenAI.WebSearchActionSearch","com.azure.ai.agents.models.WebSearchActionSearchSources":"OpenAI.WebSearchActionSearchSources","com.azure.ai.agents.models.WebSearchActionType":"OpenAI.WebSearchActionType","com.azure.ai.agents.models.WebSearchPreviewTool":"OpenAI.WebSearchPreviewTool","com.azure.ai.agents.models.WebSearchPreviewToolSearchContextSize":"OpenAI.WebSearchPreviewTool.search_context_size.anonymous","com.azure.ai.agents.models.WebSearchToolCallItemParam":"OpenAI.WebSearchToolCallItemParam","com.azure.ai.agents.models.WorkflowAgentDefinition":"Azure.AI.Projects.WorkflowAgentDefinition"},"generatedFiles":["src/main/java/com/azure/ai/agents/AgentsAsyncClient.java","src/main/java/com/azure/ai/agents/AgentsClient.java","src/main/java/com/azure/ai/agents/AgentsClientBuilder.java","src/main/java/com/azure/ai/agents/AgentsServiceVersion.java","src/main/java/com/azure/ai/agents/MemoryStoresAsyncClient.java","src/main/java/com/azure/ai/agents/MemoryStoresClient.java","src/main/java/com/azure/ai/agents/implementation/AgentsClientImpl.java","src/main/java/com/azure/ai/agents/implementation/AgentsImpl.java","src/main/java/com/azure/ai/agents/implementation/MemoryStoresImpl.java","src/main/java/com/azure/ai/agents/implementation/OperationLocationPollingStrategy.java","src/main/java/com/azure/ai/agents/implementation/PollingUtils.java","src/main/java/com/azure/ai/agents/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentFromManifestRequest1.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentRequest1.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentVersionFromManifestRequest1.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentVersionRequest1.java","src/main/java/com/azure/ai/agents/implementation/models/CreateMemoryStoreRequest.java","src/main/java/com/azure/ai/agents/implementation/models/DeleteScopeRequest.java","src/main/java/com/azure/ai/agents/implementation/models/SearchMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateAgentFromManifestRequest1.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateAgentRequest1.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoryStoreRequest.java","src/main/java/com/azure/ai/agents/implementation/models/package-info.java","src/main/java/com/azure/ai/agents/implementation/package-info.java","src/main/java/com/azure/ai/agents/models/A2ATool.java","src/main/java/com/azure/ai/agents/models/AISearchIndexResource.java","src/main/java/com/azure/ai/agents/models/AgentDefinition.java","src/main/java/com/azure/ai/agents/models/AgentDetails.java","src/main/java/com/azure/ai/agents/models/AgentId.java","src/main/java/com/azure/ai/agents/models/AgentKind.java","src/main/java/com/azure/ai/agents/models/AgentObjectVersions.java","src/main/java/com/azure/ai/agents/models/AgentProtocol.java","src/main/java/com/azure/ai/agents/models/AgentReference.java","src/main/java/com/azure/ai/agents/models/AgentVersionDetails.java","src/main/java/com/azure/ai/agents/models/Annotation.java","src/main/java/com/azure/ai/agents/models/AnnotationFileCitation.java","src/main/java/com/azure/ai/agents/models/AnnotationFilePath.java","src/main/java/com/azure/ai/agents/models/AnnotationType.java","src/main/java/com/azure/ai/agents/models/AnnotationUrlCitation.java","src/main/java/com/azure/ai/agents/models/ApproximateLocation.java","src/main/java/com/azure/ai/agents/models/AzureAISearchAgentTool.java","src/main/java/com/azure/ai/agents/models/AzureAISearchQueryType.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolResource.java","src/main/java/com/azure/ai/agents/models/AzureFunctionAgentTool.java","src/main/java/com/azure/ai/agents/models/AzureFunctionBinding.java","src/main/java/com/azure/ai/agents/models/AzureFunctionDefinition.java","src/main/java/com/azure/ai/agents/models/AzureFunctionDefinitionFunction.java","src/main/java/com/azure/ai/agents/models/AzureFunctionStorageQueue.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchAgentTool.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolParameters.java","src/main/java/com/azure/ai/agents/models/BingGroundingAgentTool.java","src/main/java/com/azure/ai/agents/models/BingGroundingSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/BingGroundingSearchToolParameters.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationAgentTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolConnectionParameters.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolParameters.java","src/main/java/com/azure/ai/agents/models/CaptureStructuredOutputsTool.java","src/main/java/com/azure/ai/agents/models/ChatSummaryMemoryItem.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterOutput.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterOutputImage.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterOutputLogs.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterOutputType.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterTool.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterToolAuto.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterToolCallItemParam.java","src/main/java/com/azure/ai/agents/models/ComparisonFilter.java","src/main/java/com/azure/ai/agents/models/ComparisonFilterType.java","src/main/java/com/azure/ai/agents/models/CompoundFilter.java","src/main/java/com/azure/ai/agents/models/CompoundFilterType.java","src/main/java/com/azure/ai/agents/models/ComputerAction.java","src/main/java/com/azure/ai/agents/models/ComputerActionClick.java","src/main/java/com/azure/ai/agents/models/ComputerActionClickButton.java","src/main/java/com/azure/ai/agents/models/ComputerActionDoubleClick.java","src/main/java/com/azure/ai/agents/models/ComputerActionDrag.java","src/main/java/com/azure/ai/agents/models/ComputerActionKeyPress.java","src/main/java/com/azure/ai/agents/models/ComputerActionMove.java","src/main/java/com/azure/ai/agents/models/ComputerActionScreenshot.java","src/main/java/com/azure/ai/agents/models/ComputerActionScroll.java","src/main/java/com/azure/ai/agents/models/ComputerActionType.java","src/main/java/com/azure/ai/agents/models/ComputerActionTypeKeys.java","src/main/java/com/azure/ai/agents/models/ComputerActionWait.java","src/main/java/com/azure/ai/agents/models/ComputerToolCallItemParam.java","src/main/java/com/azure/ai/agents/models/ComputerToolCallOutputItemOutput.java","src/main/java/com/azure/ai/agents/models/ComputerToolCallOutputItemOutputComputerScreenshot.java","src/main/java/com/azure/ai/agents/models/ComputerToolCallOutputItemOutputType.java","src/main/java/com/azure/ai/agents/models/ComputerToolCallOutputItemParam.java","src/main/java/com/azure/ai/agents/models/ComputerToolCallSafetyCheck.java","src/main/java/com/azure/ai/agents/models/ComputerUsePreviewTool.java","src/main/java/com/azure/ai/agents/models/ComputerUsePreviewToolEnvironment.java","src/main/java/com/azure/ai/agents/models/ContainerAppAgentDefinition.java","src/main/java/com/azure/ai/agents/models/Coordinate.java","src/main/java/com/azure/ai/agents/models/DeleteAgentResponse.java","src/main/java/com/azure/ai/agents/models/DeleteAgentVersionResponse.java","src/main/java/com/azure/ai/agents/models/DeleteMemoryStoreResponse.java","src/main/java/com/azure/ai/agents/models/Error.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolParameters.java","src/main/java/com/azure/ai/agents/models/FileSearchTool.java","src/main/java/com/azure/ai/agents/models/FileSearchToolCallItemParam.java","src/main/java/com/azure/ai/agents/models/FileSearchToolCallItemParamResult.java","src/main/java/com/azure/ai/agents/models/FunctionTool.java","src/main/java/com/azure/ai/agents/models/FunctionToolCallItemParam.java","src/main/java/com/azure/ai/agents/models/FunctionToolCallOutputItemParam.java","src/main/java/com/azure/ai/agents/models/HostedAgentDefinition.java","src/main/java/com/azure/ai/agents/models/ImageBasedHostedAgentDefinition.java","src/main/java/com/azure/ai/agents/models/ImageGenTool.java","src/main/java/com/azure/ai/agents/models/ImageGenToolBackground.java","src/main/java/com/azure/ai/agents/models/ImageGenToolCallItemParam.java","src/main/java/com/azure/ai/agents/models/ImageGenToolInputImageMask.java","src/main/java/com/azure/ai/agents/models/ImageGenToolModel.java","src/main/java/com/azure/ai/agents/models/ImageGenToolModeration.java","src/main/java/com/azure/ai/agents/models/ImageGenToolOutputFormat.java","src/main/java/com/azure/ai/agents/models/ImageGenToolQuality.java","src/main/java/com/azure/ai/agents/models/ImageGenToolSize.java","src/main/java/com/azure/ai/agents/models/ItemContent.java","src/main/java/com/azure/ai/agents/models/ItemContentInputAudio.java","src/main/java/com/azure/ai/agents/models/ItemContentInputAudioFormat.java","src/main/java/com/azure/ai/agents/models/ItemContentInputFile.java","src/main/java/com/azure/ai/agents/models/ItemContentInputImage.java","src/main/java/com/azure/ai/agents/models/ItemContentInputImageDetail.java","src/main/java/com/azure/ai/agents/models/ItemContentInputText.java","src/main/java/com/azure/ai/agents/models/ItemContentOutputAudio.java","src/main/java/com/azure/ai/agents/models/ItemContentOutputText.java","src/main/java/com/azure/ai/agents/models/ItemContentRefusal.java","src/main/java/com/azure/ai/agents/models/ItemContentType.java","src/main/java/com/azure/ai/agents/models/ItemParam.java","src/main/java/com/azure/ai/agents/models/ItemReferenceItemParam.java","src/main/java/com/azure/ai/agents/models/ItemType.java","src/main/java/com/azure/ai/agents/models/ListAgentsRequestOrder.java","src/main/java/com/azure/ai/agents/models/LocalShellExecAction.java","src/main/java/com/azure/ai/agents/models/LocalShellTool.java","src/main/java/com/azure/ai/agents/models/LocalShellToolCallItemParam.java","src/main/java/com/azure/ai/agents/models/LocalShellToolCallOutputItemParam.java","src/main/java/com/azure/ai/agents/models/Location.java","src/main/java/com/azure/ai/agents/models/LocationType.java","src/main/java/com/azure/ai/agents/models/LogProb.java","src/main/java/com/azure/ai/agents/models/MCPApprovalRequestItemParam.java","src/main/java/com/azure/ai/agents/models/MCPApprovalResponseItemParam.java","src/main/java/com/azure/ai/agents/models/MCPCallItemParam.java","src/main/java/com/azure/ai/agents/models/MCPListToolsItemParam.java","src/main/java/com/azure/ai/agents/models/MCPListToolsTool.java","src/main/java/com/azure/ai/agents/models/MCPTool.java","src/main/java/com/azure/ai/agents/models/MCPToolAllowedTools1.java","src/main/java/com/azure/ai/agents/models/MCPToolRequireApproval1.java","src/main/java/com/azure/ai/agents/models/MCPToolRequireApprovalAlways.java","src/main/java/com/azure/ai/agents/models/MCPToolRequireApprovalNever.java","src/main/java/com/azure/ai/agents/models/MemoryItem.java","src/main/java/com/azure/ai/agents/models/MemoryItemKind.java","src/main/java/com/azure/ai/agents/models/MemoryOperation.java","src/main/java/com/azure/ai/agents/models/MemoryOperationKind.java","src/main/java/com/azure/ai/agents/models/MemorySearchItem.java","src/main/java/com/azure/ai/agents/models/MemorySearchOptions.java","src/main/java/com/azure/ai/agents/models/MemorySearchTool.java","src/main/java/com/azure/ai/agents/models/MemorySearchToolCallItemParam.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefaultDefinition.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefaultOptions.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefinition.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDeleteScopeResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreKind.java","src/main/java/com/azure/ai/agents/models/MemoryStoreObject.java","src/main/java/com/azure/ai/agents/models/MemoryStoreOperationUsage.java","src/main/java/com/azure/ai/agents/models/MemoryStoreOperationUsageInputTokensDetails.java","src/main/java/com/azure/ai/agents/models/MemoryStoreOperationUsageOutputTokensDetails.java","src/main/java/com/azure/ai/agents/models/MemoryStoreSearchResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateCompletedResult.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateStatus.java","src/main/java/com/azure/ai/agents/models/MicrosoftFabricAgentTool.java","src/main/java/com/azure/ai/agents/models/OpenApiAgentTool.java","src/main/java/com/azure/ai/agents/models/OpenApiAnonymousAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiAuthType.java","src/main/java/com/azure/ai/agents/models/OpenApiFunctionDefinition.java","src/main/java/com/azure/ai/agents/models/OpenApiFunctionDefinitionFunction.java","src/main/java/com/azure/ai/agents/models/OpenApiManagedAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiManagedSecurityScheme.java","src/main/java/com/azure/ai/agents/models/OpenApiProjectConnectionAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiProjectConnectionSecurityScheme.java","src/main/java/com/azure/ai/agents/models/PromptAgentDefinition.java","src/main/java/com/azure/ai/agents/models/PromptAgentDefinitionText.java","src/main/java/com/azure/ai/agents/models/ProtocolVersionRecord.java","src/main/java/com/azure/ai/agents/models/RaiConfig.java","src/main/java/com/azure/ai/agents/models/RankingOptions.java","src/main/java/com/azure/ai/agents/models/RankingOptionsRanker.java","src/main/java/com/azure/ai/agents/models/Reasoning.java","src/main/java/com/azure/ai/agents/models/ReasoningEffort.java","src/main/java/com/azure/ai/agents/models/ReasoningGenerateSummary.java","src/main/java/com/azure/ai/agents/models/ReasoningItemParam.java","src/main/java/com/azure/ai/agents/models/ReasoningItemSummaryPart.java","src/main/java/com/azure/ai/agents/models/ReasoningItemSummaryPartType.java","src/main/java/com/azure/ai/agents/models/ReasoningItemSummaryTextPart.java","src/main/java/com/azure/ai/agents/models/ReasoningSummary.java","src/main/java/com/azure/ai/agents/models/ResponseTextFormatConfiguration.java","src/main/java/com/azure/ai/agents/models/ResponseTextFormatConfigurationJsonObject.java","src/main/java/com/azure/ai/agents/models/ResponseTextFormatConfigurationJsonSchema.java","src/main/java/com/azure/ai/agents/models/ResponseTextFormatConfigurationText.java","src/main/java/com/azure/ai/agents/models/ResponseTextFormatConfigurationType.java","src/main/java/com/azure/ai/agents/models/ResponsesAssistantMessageItemParam.java","src/main/java/com/azure/ai/agents/models/ResponsesDeveloperMessageItemParam.java","src/main/java/com/azure/ai/agents/models/ResponsesMessageItemParam.java","src/main/java/com/azure/ai/agents/models/ResponsesMessageRole.java","src/main/java/com/azure/ai/agents/models/ResponsesSystemMessageItemParam.java","src/main/java/com/azure/ai/agents/models/ResponsesUserMessageItemParam.java","src/main/java/com/azure/ai/agents/models/SharepointAgentTool.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolParameters.java","src/main/java/com/azure/ai/agents/models/StructuredInputDefinition.java","src/main/java/com/azure/ai/agents/models/StructuredOutputDefinition.java","src/main/java/com/azure/ai/agents/models/Tool.java","src/main/java/com/azure/ai/agents/models/ToolProjectConnection.java","src/main/java/com/azure/ai/agents/models/ToolType.java","src/main/java/com/azure/ai/agents/models/TopLogProb.java","src/main/java/com/azure/ai/agents/models/UserProfileMemoryItem.java","src/main/java/com/azure/ai/agents/models/VectorStoreFileAttributes.java","src/main/java/com/azure/ai/agents/models/WebSearchAction.java","src/main/java/com/azure/ai/agents/models/WebSearchActionFind.java","src/main/java/com/azure/ai/agents/models/WebSearchActionOpenPage.java","src/main/java/com/azure/ai/agents/models/WebSearchActionSearch.java","src/main/java/com/azure/ai/agents/models/WebSearchActionSearchSources.java","src/main/java/com/azure/ai/agents/models/WebSearchActionType.java","src/main/java/com/azure/ai/agents/models/WebSearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/WebSearchPreviewToolSearchContextSize.java","src/main/java/com/azure/ai/agents/models/WebSearchToolCallItemParam.java","src/main/java/com/azure/ai/agents/models/WorkflowAgentDefinition.java","src/main/java/com/azure/ai/agents/models/package-info.java","src/main/java/com/azure/ai/agents/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersion":"2025-11-15-preview","crossLanguageDefinitions":{"com.azure.ai.agents.AgentsAsyncClient":"Azure.AI.Projects.Agents","com.azure.ai.agents.AgentsAsyncClient.createAgent":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsAsyncClient.createAgentFromManifest":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersion":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromManifest":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionWithResponse":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsAsyncClient.createAgentWithResponse":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsAsyncClient.deleteAgent":"Azure.AI.Projects.Agents.deleteAgent","com.azure.ai.agents.AgentsAsyncClient.deleteAgentVersion":"Azure.AI.Projects.Agents.deleteAgentVersion","com.azure.ai.agents.AgentsAsyncClient.deleteAgentVersionWithResponse":"Azure.AI.Projects.Agents.deleteAgentVersion","com.azure.ai.agents.AgentsAsyncClient.deleteAgentWithResponse":"Azure.AI.Projects.Agents.deleteAgent","com.azure.ai.agents.AgentsAsyncClient.getAgent":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsAsyncClient.getAgentVersionDetails":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsAsyncClient.getAgentVersionDetailsWithResponse":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsAsyncClient.getAgentWithResponse":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsAsyncClient.listAgentVersions":"Azure.AI.Projects.Agents.listAgentVersions","com.azure.ai.agents.AgentsAsyncClient.listAgents":"Azure.AI.Projects.Agents.listAgents","com.azure.ai.agents.AgentsAsyncClient.updateAgent":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromManifest":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.updateAgentWithResponse":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClient":"Azure.AI.Projects.Agents","com.azure.ai.agents.AgentsClient.createAgent":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsClient.createAgentFromManifest":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsClient.createAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersion":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsClient.createAgentVersionFromManifest":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersionFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersionWithResponse":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsClient.createAgentWithResponse":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsClient.deleteAgent":"Azure.AI.Projects.Agents.deleteAgent","com.azure.ai.agents.AgentsClient.deleteAgentVersion":"Azure.AI.Projects.Agents.deleteAgentVersion","com.azure.ai.agents.AgentsClient.deleteAgentVersionWithResponse":"Azure.AI.Projects.Agents.deleteAgentVersion","com.azure.ai.agents.AgentsClient.deleteAgentWithResponse":"Azure.AI.Projects.Agents.deleteAgent","com.azure.ai.agents.AgentsClient.getAgent":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsClient.getAgentVersionDetails":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsClient.getAgentVersionDetailsWithResponse":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsClient.getAgentWithResponse":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsClient.listAgentVersions":"Azure.AI.Projects.Agents.listAgentVersions","com.azure.ai.agents.AgentsClient.listAgents":"Azure.AI.Projects.Agents.listAgents","com.azure.ai.agents.AgentsClient.updateAgent":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClient.updateAgentFromManifest":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsClient.updateAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsClient.updateAgentWithResponse":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClientBuilder":"Azure.AI.Projects","com.azure.ai.agents.MemoryStoresAsyncClient":"Azure.AI.Projects.MemoryStores","com.azure.ai.agents.MemoryStoresAsyncClient.beginUpdateMemories":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.MemoryStoresAsyncClient.beginUpdateMemoriesWithModel":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.MemoryStoresAsyncClient.createMemoryStore":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.MemoryStoresAsyncClient.createMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.MemoryStoresAsyncClient.deleteMemoryStore":"Azure.AI.Projects.MemoryStores.deleteMemoryStore","com.azure.ai.agents.MemoryStoresAsyncClient.deleteMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.deleteMemoryStore","com.azure.ai.agents.MemoryStoresAsyncClient.deleteScope":"Azure.AI.Projects.MemoryStores.deleteScope","com.azure.ai.agents.MemoryStoresAsyncClient.deleteScopeWithResponse":"Azure.AI.Projects.MemoryStores.deleteScope","com.azure.ai.agents.MemoryStoresAsyncClient.getMemoryStore":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.MemoryStoresAsyncClient.getMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.MemoryStoresAsyncClient.getUpdateResult":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.MemoryStoresAsyncClient.getUpdateResultWithResponse":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.MemoryStoresAsyncClient.listMemoryStores":"Azure.AI.Projects.MemoryStores.listMemoryStores","com.azure.ai.agents.MemoryStoresAsyncClient.searchMemories":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.MemoryStoresAsyncClient.searchMemoriesWithResponse":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.MemoryStoresAsyncClient.updateMemoryStore":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.MemoryStoresAsyncClient.updateMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.MemoryStoresClient":"Azure.AI.Projects.MemoryStores","com.azure.ai.agents.MemoryStoresClient.beginUpdateMemories":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.MemoryStoresClient.beginUpdateMemoriesWithModel":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.MemoryStoresClient.createMemoryStore":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.MemoryStoresClient.createMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.MemoryStoresClient.deleteMemoryStore":"Azure.AI.Projects.MemoryStores.deleteMemoryStore","com.azure.ai.agents.MemoryStoresClient.deleteMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.deleteMemoryStore","com.azure.ai.agents.MemoryStoresClient.deleteScope":"Azure.AI.Projects.MemoryStores.deleteScope","com.azure.ai.agents.MemoryStoresClient.deleteScopeWithResponse":"Azure.AI.Projects.MemoryStores.deleteScope","com.azure.ai.agents.MemoryStoresClient.getMemoryStore":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.MemoryStoresClient.getMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.MemoryStoresClient.getUpdateResult":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.MemoryStoresClient.getUpdateResultWithResponse":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.MemoryStoresClient.listMemoryStores":"Azure.AI.Projects.MemoryStores.listMemoryStores","com.azure.ai.agents.MemoryStoresClient.searchMemories":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.MemoryStoresClient.searchMemoriesWithResponse":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.MemoryStoresClient.updateMemoryStore":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.MemoryStoresClient.updateMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.implementation.models.CreateAgentFromManifestRequest1":"Azure.AI.Projects.createAgentFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentRequest1":"Azure.AI.Projects.createAgent.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentVersionFromManifestRequest1":"Azure.AI.Projects.createAgentVersionFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentVersionRequest1":"Azure.AI.Projects.createAgentVersion.Request.anonymous","com.azure.ai.agents.implementation.models.CreateMemoryStoreRequest":"Azure.AI.Projects.createMemoryStore.Request.anonymous","com.azure.ai.agents.implementation.models.DeleteScopeRequest":"Azure.AI.Projects.deleteScope.Request.anonymous","com.azure.ai.agents.implementation.models.SearchMemoriesRequest":"Azure.AI.Projects.searchMemories.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateAgentFromManifestRequest1":"Azure.AI.Projects.updateAgentFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateAgentRequest1":"Azure.AI.Projects.updateAgent.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoriesRequest":"Azure.AI.Projects.updateMemories.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoryStoreRequest":"Azure.AI.Projects.updateMemoryStore.Request.anonymous","com.azure.ai.agents.models.A2ATool":"Azure.AI.Projects.A2ATool","com.azure.ai.agents.models.AISearchIndexResource":"Azure.AI.Projects.AISearchIndexResource","com.azure.ai.agents.models.AgentDefinition":"Azure.AI.Projects.AgentDefinition","com.azure.ai.agents.models.AgentDetails":"Azure.AI.Projects.AgentObject","com.azure.ai.agents.models.AgentId":"Azure.AI.Projects.AgentId","com.azure.ai.agents.models.AgentKind":"Azure.AI.Projects.AgentKind","com.azure.ai.agents.models.AgentObjectVersions":"Azure.AI.Projects.AgentObject.versions.anonymous","com.azure.ai.agents.models.AgentProtocol":"Azure.AI.Projects.AgentProtocol","com.azure.ai.agents.models.AgentReference":"Azure.AI.Projects.AgentReference","com.azure.ai.agents.models.AgentVersionDetails":"Azure.AI.Projects.AgentVersionObject","com.azure.ai.agents.models.Annotation":"OpenAI.Annotation","com.azure.ai.agents.models.AnnotationFileCitation":"OpenAI.AnnotationFileCitation","com.azure.ai.agents.models.AnnotationFilePath":"OpenAI.AnnotationFilePath","com.azure.ai.agents.models.AnnotationType":"OpenAI.AnnotationType","com.azure.ai.agents.models.AnnotationUrlCitation":"OpenAI.AnnotationUrlCitation","com.azure.ai.agents.models.ApproximateLocation":"OpenAI.ApproximateLocation","com.azure.ai.agents.models.AzureAISearchAgentTool":"Azure.AI.Projects.AzureAISearchAgentTool","com.azure.ai.agents.models.AzureAISearchQueryType":"Azure.AI.Projects.AzureAISearchQueryType","com.azure.ai.agents.models.AzureAISearchToolResource":"Azure.AI.Projects.AzureAISearchToolResource","com.azure.ai.agents.models.AzureFunctionAgentTool":"Azure.AI.Projects.AzureFunctionAgentTool","com.azure.ai.agents.models.AzureFunctionBinding":"Azure.AI.Projects.AzureFunctionBinding","com.azure.ai.agents.models.AzureFunctionDefinition":"Azure.AI.Projects.AzureFunctionDefinition","com.azure.ai.agents.models.AzureFunctionDefinitionFunction":"Azure.AI.Projects.AzureFunctionDefinition.function.anonymous","com.azure.ai.agents.models.AzureFunctionStorageQueue":"Azure.AI.Projects.AzureFunctionStorageQueue","com.azure.ai.agents.models.BingCustomSearchAgentTool":"Azure.AI.Projects.BingCustomSearchAgentTool","com.azure.ai.agents.models.BingCustomSearchConfiguration":"Azure.AI.Projects.BingCustomSearchConfiguration","com.azure.ai.agents.models.BingCustomSearchToolParameters":"Azure.AI.Projects.BingCustomSearchToolParameters","com.azure.ai.agents.models.BingGroundingAgentTool":"Azure.AI.Projects.BingGroundingAgentTool","com.azure.ai.agents.models.BingGroundingSearchConfiguration":"Azure.AI.Projects.BingGroundingSearchConfiguration","com.azure.ai.agents.models.BingGroundingSearchToolParameters":"Azure.AI.Projects.BingGroundingSearchToolParameters","com.azure.ai.agents.models.BrowserAutomationAgentTool":"Azure.AI.Projects.BrowserAutomationAgentTool","com.azure.ai.agents.models.BrowserAutomationToolConnectionParameters":"Azure.AI.Projects.BrowserAutomationToolConnectionParameters","com.azure.ai.agents.models.BrowserAutomationToolParameters":"Azure.AI.Projects.BrowserAutomationToolParameters","com.azure.ai.agents.models.CaptureStructuredOutputsTool":"Azure.AI.Projects.CaptureStructuredOutputsTool","com.azure.ai.agents.models.ChatSummaryMemoryItem":"Azure.AI.Projects.ChatSummaryMemoryItem","com.azure.ai.agents.models.CodeInterpreterOutput":"OpenAI.CodeInterpreterOutput","com.azure.ai.agents.models.CodeInterpreterOutputImage":"OpenAI.CodeInterpreterOutputImage","com.azure.ai.agents.models.CodeInterpreterOutputLogs":"OpenAI.CodeInterpreterOutputLogs","com.azure.ai.agents.models.CodeInterpreterOutputType":"OpenAI.CodeInterpreterOutputType","com.azure.ai.agents.models.CodeInterpreterTool":"OpenAI.CodeInterpreterTool","com.azure.ai.agents.models.CodeInterpreterToolAuto":"OpenAI.CodeInterpreterToolAuto","com.azure.ai.agents.models.CodeInterpreterToolCallItemParam":"OpenAI.CodeInterpreterToolCallItemParam","com.azure.ai.agents.models.ComparisonFilter":"OpenAI.ComparisonFilter","com.azure.ai.agents.models.ComparisonFilterType":"OpenAI.ComparisonFilter.type.anonymous","com.azure.ai.agents.models.CompoundFilter":"OpenAI.CompoundFilter","com.azure.ai.agents.models.CompoundFilterType":"OpenAI.CompoundFilter.type.anonymous","com.azure.ai.agents.models.ComputerAction":"OpenAI.ComputerAction","com.azure.ai.agents.models.ComputerActionClick":"OpenAI.ComputerActionClick","com.azure.ai.agents.models.ComputerActionClickButton":"OpenAI.ComputerActionClick.button.anonymous","com.azure.ai.agents.models.ComputerActionDoubleClick":"OpenAI.ComputerActionDoubleClick","com.azure.ai.agents.models.ComputerActionDrag":"OpenAI.ComputerActionDrag","com.azure.ai.agents.models.ComputerActionKeyPress":"OpenAI.ComputerActionKeyPress","com.azure.ai.agents.models.ComputerActionMove":"OpenAI.ComputerActionMove","com.azure.ai.agents.models.ComputerActionScreenshot":"OpenAI.ComputerActionScreenshot","com.azure.ai.agents.models.ComputerActionScroll":"OpenAI.ComputerActionScroll","com.azure.ai.agents.models.ComputerActionType":"OpenAI.ComputerActionType","com.azure.ai.agents.models.ComputerActionTypeKeys":"OpenAI.ComputerActionTypeKeys","com.azure.ai.agents.models.ComputerActionWait":"OpenAI.ComputerActionWait","com.azure.ai.agents.models.ComputerToolCallItemParam":"OpenAI.ComputerToolCallItemParam","com.azure.ai.agents.models.ComputerToolCallOutputItemOutput":"OpenAI.ComputerToolCallOutputItemOutput","com.azure.ai.agents.models.ComputerToolCallOutputItemOutputComputerScreenshot":"OpenAI.ComputerToolCallOutputItemOutputComputerScreenshot","com.azure.ai.agents.models.ComputerToolCallOutputItemOutputType":"OpenAI.ComputerToolCallOutputItemOutputType","com.azure.ai.agents.models.ComputerToolCallOutputItemParam":"OpenAI.ComputerToolCallOutputItemParam","com.azure.ai.agents.models.ComputerToolCallSafetyCheck":"OpenAI.ComputerToolCallSafetyCheck","com.azure.ai.agents.models.ComputerUsePreviewTool":"OpenAI.ComputerUsePreviewTool","com.azure.ai.agents.models.ComputerUsePreviewToolEnvironment":"OpenAI.ComputerUsePreviewTool.environment.anonymous","com.azure.ai.agents.models.ContainerAppAgentDefinition":"Azure.AI.Projects.ContainerAppAgentDefinition","com.azure.ai.agents.models.Coordinate":"OpenAI.Coordinate","com.azure.ai.agents.models.DeleteAgentResponse":"Azure.AI.Projects.DeleteAgentResponse","com.azure.ai.agents.models.DeleteAgentVersionResponse":"Azure.AI.Projects.DeleteAgentVersionResponse","com.azure.ai.agents.models.DeleteMemoryStoreResponse":"Azure.AI.Projects.DeleteMemoryStoreResponse","com.azure.ai.agents.models.Error":"OpenAI.Error","com.azure.ai.agents.models.FabricDataAgentToolParameters":"Azure.AI.Projects.FabricDataAgentToolParameters","com.azure.ai.agents.models.FileSearchTool":"OpenAI.FileSearchTool","com.azure.ai.agents.models.FileSearchToolCallItemParam":"OpenAI.FileSearchToolCallItemParam","com.azure.ai.agents.models.FileSearchToolCallItemParamResult":"OpenAI.FileSearchToolCallItemParam.result.anonymous","com.azure.ai.agents.models.FunctionTool":"OpenAI.FunctionTool","com.azure.ai.agents.models.FunctionToolCallItemParam":"OpenAI.FunctionToolCallItemParam","com.azure.ai.agents.models.FunctionToolCallOutputItemParam":"OpenAI.FunctionToolCallOutputItemParam","com.azure.ai.agents.models.HostedAgentDefinition":"Azure.AI.Projects.HostedAgentDefinition","com.azure.ai.agents.models.ImageBasedHostedAgentDefinition":"Azure.AI.Projects.ImageBasedHostedAgentDefinition","com.azure.ai.agents.models.ImageGenTool":"OpenAI.ImageGenTool","com.azure.ai.agents.models.ImageGenToolBackground":"OpenAI.ImageGenTool.background.anonymous","com.azure.ai.agents.models.ImageGenToolCallItemParam":"OpenAI.ImageGenToolCallItemParam","com.azure.ai.agents.models.ImageGenToolInputImageMask":"OpenAI.ImageGenTool.input_image_mask.anonymous","com.azure.ai.agents.models.ImageGenToolModel":null,"com.azure.ai.agents.models.ImageGenToolModeration":"OpenAI.ImageGenTool.moderation.anonymous","com.azure.ai.agents.models.ImageGenToolOutputFormat":"OpenAI.ImageGenTool.output_format.anonymous","com.azure.ai.agents.models.ImageGenToolQuality":"OpenAI.ImageGenTool.quality.anonymous","com.azure.ai.agents.models.ImageGenToolSize":"OpenAI.ImageGenTool.size.anonymous","com.azure.ai.agents.models.ItemContent":"OpenAI.ItemContent","com.azure.ai.agents.models.ItemContentInputAudio":"OpenAI.ItemContentInputAudio","com.azure.ai.agents.models.ItemContentInputAudioFormat":"OpenAI.ItemContentInputAudio.format.anonymous","com.azure.ai.agents.models.ItemContentInputFile":"OpenAI.ItemContentInputFile","com.azure.ai.agents.models.ItemContentInputImage":"OpenAI.ItemContentInputImage","com.azure.ai.agents.models.ItemContentInputImageDetail":"OpenAI.ItemContentInputImage.detail.anonymous","com.azure.ai.agents.models.ItemContentInputText":"OpenAI.ItemContentInputText","com.azure.ai.agents.models.ItemContentOutputAudio":"OpenAI.ItemContentOutputAudio","com.azure.ai.agents.models.ItemContentOutputText":"OpenAI.ItemContentOutputText","com.azure.ai.agents.models.ItemContentRefusal":"OpenAI.ItemContentRefusal","com.azure.ai.agents.models.ItemContentType":"OpenAI.ItemContentType","com.azure.ai.agents.models.ItemParam":"OpenAI.ItemParam","com.azure.ai.agents.models.ItemReferenceItemParam":"OpenAI.ItemReferenceItemParam","com.azure.ai.agents.models.ItemType":"OpenAI.ItemType","com.azure.ai.agents.models.ListAgentsRequestOrder":"Azure.AI.Projects.listAgents.RequestOrder.anonymous","com.azure.ai.agents.models.LocalShellExecAction":"OpenAI.LocalShellExecAction","com.azure.ai.agents.models.LocalShellTool":"OpenAI.LocalShellTool","com.azure.ai.agents.models.LocalShellToolCallItemParam":"OpenAI.LocalShellToolCallItemParam","com.azure.ai.agents.models.LocalShellToolCallOutputItemParam":"OpenAI.LocalShellToolCallOutputItemParam","com.azure.ai.agents.models.Location":"OpenAI.Location","com.azure.ai.agents.models.LocationType":"OpenAI.LocationType","com.azure.ai.agents.models.LogProb":"OpenAI.LogProb","com.azure.ai.agents.models.MCPApprovalRequestItemParam":"OpenAI.MCPApprovalRequestItemParam","com.azure.ai.agents.models.MCPApprovalResponseItemParam":"OpenAI.MCPApprovalResponseItemParam","com.azure.ai.agents.models.MCPCallItemParam":"OpenAI.MCPCallItemParam","com.azure.ai.agents.models.MCPListToolsItemParam":"OpenAI.MCPListToolsItemParam","com.azure.ai.agents.models.MCPListToolsTool":"OpenAI.MCPListToolsTool","com.azure.ai.agents.models.MCPTool":"OpenAI.MCPTool","com.azure.ai.agents.models.MCPToolAllowedTools":"OpenAI.MCPTool.allowed_tools.anonymous","com.azure.ai.agents.models.MCPToolRequireApproval":"OpenAI.MCPTool.require_approval.anonymous","com.azure.ai.agents.models.MCPToolRequireApprovalAlways":"OpenAI.MCPTool.require_approval.always.anonymous","com.azure.ai.agents.models.MCPToolRequireApprovalNever":"OpenAI.MCPTool.require_approval.never.anonymous","com.azure.ai.agents.models.MemoryItem":"Azure.AI.Projects.MemoryItem","com.azure.ai.agents.models.MemoryItemKind":"Azure.AI.Projects.MemoryItemKind","com.azure.ai.agents.models.MemoryOperation":"Azure.AI.Projects.MemoryOperation","com.azure.ai.agents.models.MemoryOperationKind":"Azure.AI.Projects.MemoryOperationKind","com.azure.ai.agents.models.MemorySearchItem":"Azure.AI.Projects.MemorySearchItem","com.azure.ai.agents.models.MemorySearchOptions":"Azure.AI.Projects.MemorySearchOptions","com.azure.ai.agents.models.MemorySearchTool":"Azure.AI.Projects.MemorySearchTool","com.azure.ai.agents.models.MemorySearchToolCallItemParam":"Azure.AI.Projects.MemorySearchToolCallItemParam","com.azure.ai.agents.models.MemoryStoreDefaultDefinition":"Azure.AI.Projects.MemoryStoreDefaultDefinition","com.azure.ai.agents.models.MemoryStoreDefaultOptions":"Azure.AI.Projects.MemoryStoreDefaultOptions","com.azure.ai.agents.models.MemoryStoreDefinition":"Azure.AI.Projects.MemoryStoreDefinition","com.azure.ai.agents.models.MemoryStoreDeleteScopeResponse":"Azure.AI.Projects.MemoryStoreDeleteScopeResponse","com.azure.ai.agents.models.MemoryStoreDetails":"Azure.AI.Projects.MemoryStoreObject","com.azure.ai.agents.models.MemoryStoreKind":"Azure.AI.Projects.MemoryStoreKind","com.azure.ai.agents.models.MemoryStoreOperationUsage":"Azure.AI.Projects.MemoryStoreOperationUsage","com.azure.ai.agents.models.MemoryStoreOperationUsageInputTokensDetails":"Azure.AI.Projects.MemoryStoreOperationUsage.input_tokens_details.anonymous","com.azure.ai.agents.models.MemoryStoreOperationUsageOutputTokensDetails":"Azure.AI.Projects.MemoryStoreOperationUsage.output_tokens_details.anonymous","com.azure.ai.agents.models.MemoryStoreSearchResponse":"Azure.AI.Projects.MemoryStoreSearchResponse","com.azure.ai.agents.models.MemoryStoreUpdateCompletedResult":"Azure.AI.Projects.MemoryStoreUpdateCompletedResult","com.azure.ai.agents.models.MemoryStoreUpdateResponse":"Azure.AI.Projects.MemoryStoreUpdateResponse","com.azure.ai.agents.models.MemoryStoreUpdateStatus":"Azure.AI.Projects.MemoryStoreUpdateStatus","com.azure.ai.agents.models.MicrosoftFabricAgentTool":"Azure.AI.Projects.MicrosoftFabricAgentTool","com.azure.ai.agents.models.OpenApiAgentTool":"Azure.AI.Projects.OpenApiAgentTool","com.azure.ai.agents.models.OpenApiAnonymousAuthDetails":"Azure.AI.Projects.OpenApiAnonymousAuthDetails","com.azure.ai.agents.models.OpenApiAuthDetails":"Azure.AI.Projects.OpenApiAuthDetails","com.azure.ai.agents.models.OpenApiAuthType":"Azure.AI.Projects.OpenApiAuthType","com.azure.ai.agents.models.OpenApiFunctionDefinition":"Azure.AI.Projects.OpenApiFunctionDefinition","com.azure.ai.agents.models.OpenApiFunctionDefinitionFunction":"Azure.AI.Projects.OpenApiFunctionDefinition.function.anonymous","com.azure.ai.agents.models.OpenApiManagedAuthDetails":"Azure.AI.Projects.OpenApiManagedAuthDetails","com.azure.ai.agents.models.OpenApiManagedSecurityScheme":"Azure.AI.Projects.OpenApiManagedSecurityScheme","com.azure.ai.agents.models.OpenApiProjectConnectionAuthDetails":"Azure.AI.Projects.OpenApiProjectConnectionAuthDetails","com.azure.ai.agents.models.OpenApiProjectConnectionSecurityScheme":"Azure.AI.Projects.OpenApiProjectConnectionSecurityScheme","com.azure.ai.agents.models.PromptAgentDefinition":"Azure.AI.Projects.PromptAgentDefinition","com.azure.ai.agents.models.PromptAgentDefinitionText":"Azure.AI.Projects.PromptAgentDefinition.text.anonymous","com.azure.ai.agents.models.ProtocolVersionRecord":"Azure.AI.Projects.ProtocolVersionRecord","com.azure.ai.agents.models.RaiConfig":"Azure.AI.Projects.RaiConfig","com.azure.ai.agents.models.RankingOptions":"OpenAI.RankingOptions","com.azure.ai.agents.models.RankingOptionsRanker":"OpenAI.RankingOptions.ranker.anonymous","com.azure.ai.agents.models.Reasoning":"OpenAI.Reasoning","com.azure.ai.agents.models.ReasoningEffort":"OpenAI.ReasoningEffort","com.azure.ai.agents.models.ReasoningGenerateSummary":"OpenAI.Reasoning.generate_summary.anonymous","com.azure.ai.agents.models.ReasoningItemParam":"OpenAI.ReasoningItemParam","com.azure.ai.agents.models.ReasoningItemSummaryPart":"OpenAI.ReasoningItemSummaryPart","com.azure.ai.agents.models.ReasoningItemSummaryPartType":"OpenAI.ReasoningItemSummaryPartType","com.azure.ai.agents.models.ReasoningItemSummaryTextPart":"OpenAI.ReasoningItemSummaryTextPart","com.azure.ai.agents.models.ReasoningSummary":"OpenAI.Reasoning.summary.anonymous","com.azure.ai.agents.models.ResponseTextFormatConfiguration":"OpenAI.ResponseTextFormatConfiguration","com.azure.ai.agents.models.ResponseTextFormatConfigurationJsonObject":"OpenAI.ResponseTextFormatConfigurationJsonObject","com.azure.ai.agents.models.ResponseTextFormatConfigurationJsonSchema":"OpenAI.ResponseTextFormatConfigurationJsonSchema","com.azure.ai.agents.models.ResponseTextFormatConfigurationText":"OpenAI.ResponseTextFormatConfigurationText","com.azure.ai.agents.models.ResponseTextFormatConfigurationType":"OpenAI.ResponseTextFormatConfigurationType","com.azure.ai.agents.models.ResponsesAssistantMessageItemParam":"OpenAI.ResponsesAssistantMessageItemParam","com.azure.ai.agents.models.ResponsesDeveloperMessageItemParam":"OpenAI.ResponsesDeveloperMessageItemParam","com.azure.ai.agents.models.ResponsesMessageItemParam":"OpenAI.ResponsesMessageItemParam","com.azure.ai.agents.models.ResponsesMessageRole":"OpenAI.ResponsesMessageRole","com.azure.ai.agents.models.ResponsesSystemMessageItemParam":"OpenAI.ResponsesSystemMessageItemParam","com.azure.ai.agents.models.ResponsesUserMessageItemParam":"OpenAI.ResponsesUserMessageItemParam","com.azure.ai.agents.models.SharepointAgentTool":"Azure.AI.Projects.SharepointAgentTool","com.azure.ai.agents.models.SharepointGroundingToolParameters":"Azure.AI.Projects.SharepointGroundingToolParameters","com.azure.ai.agents.models.StructuredInputDefinition":"Azure.AI.Projects.StructuredInputDefinition","com.azure.ai.agents.models.StructuredOutputDefinition":"Azure.AI.Projects.StructuredOutputDefinition","com.azure.ai.agents.models.Tool":"OpenAI.Tool","com.azure.ai.agents.models.ToolProjectConnection":"Azure.AI.Projects.ToolProjectConnection","com.azure.ai.agents.models.ToolType":"OpenAI.ToolType","com.azure.ai.agents.models.TopLogProb":"OpenAI.TopLogProb","com.azure.ai.agents.models.UserProfileMemoryItem":"Azure.AI.Projects.UserProfileMemoryItem","com.azure.ai.agents.models.VectorStoreFileAttributes":"OpenAI.VectorStoreFileAttributes","com.azure.ai.agents.models.WebSearchAction":"OpenAI.WebSearchAction","com.azure.ai.agents.models.WebSearchActionFind":"OpenAI.WebSearchActionFind","com.azure.ai.agents.models.WebSearchActionOpenPage":"OpenAI.WebSearchActionOpenPage","com.azure.ai.agents.models.WebSearchActionSearch":"OpenAI.WebSearchActionSearch","com.azure.ai.agents.models.WebSearchActionSearchSources":"OpenAI.WebSearchActionSearchSources","com.azure.ai.agents.models.WebSearchActionType":"OpenAI.WebSearchActionType","com.azure.ai.agents.models.WebSearchPreviewTool":"OpenAI.WebSearchPreviewTool","com.azure.ai.agents.models.WebSearchPreviewToolSearchContextSize":"OpenAI.WebSearchPreviewTool.search_context_size.anonymous","com.azure.ai.agents.models.WebSearchToolCallItemParam":"OpenAI.WebSearchToolCallItemParam","com.azure.ai.agents.models.WorkflowAgentDefinition":"Azure.AI.Projects.WorkflowAgentDefinition"},"generatedFiles":["src/main/java/com/azure/ai/agents/AgentsAsyncClient.java","src/main/java/com/azure/ai/agents/AgentsClient.java","src/main/java/com/azure/ai/agents/AgentsClientBuilder.java","src/main/java/com/azure/ai/agents/AgentsServiceVersion.java","src/main/java/com/azure/ai/agents/MemoryStoresAsyncClient.java","src/main/java/com/azure/ai/agents/MemoryStoresClient.java","src/main/java/com/azure/ai/agents/implementation/AgentsClientImpl.java","src/main/java/com/azure/ai/agents/implementation/AgentsImpl.java","src/main/java/com/azure/ai/agents/implementation/MemoryStoresImpl.java","src/main/java/com/azure/ai/agents/implementation/OperationLocationPollingStrategy.java","src/main/java/com/azure/ai/agents/implementation/PollingUtils.java","src/main/java/com/azure/ai/agents/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentFromManifestRequest1.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentRequest1.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentVersionFromManifestRequest1.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentVersionRequest1.java","src/main/java/com/azure/ai/agents/implementation/models/CreateMemoryStoreRequest.java","src/main/java/com/azure/ai/agents/implementation/models/DeleteScopeRequest.java","src/main/java/com/azure/ai/agents/implementation/models/SearchMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateAgentFromManifestRequest1.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateAgentRequest1.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoryStoreRequest.java","src/main/java/com/azure/ai/agents/implementation/models/package-info.java","src/main/java/com/azure/ai/agents/implementation/package-info.java","src/main/java/com/azure/ai/agents/models/A2ATool.java","src/main/java/com/azure/ai/agents/models/AISearchIndexResource.java","src/main/java/com/azure/ai/agents/models/AgentDefinition.java","src/main/java/com/azure/ai/agents/models/AgentDetails.java","src/main/java/com/azure/ai/agents/models/AgentId.java","src/main/java/com/azure/ai/agents/models/AgentKind.java","src/main/java/com/azure/ai/agents/models/AgentObjectVersions.java","src/main/java/com/azure/ai/agents/models/AgentProtocol.java","src/main/java/com/azure/ai/agents/models/AgentReference.java","src/main/java/com/azure/ai/agents/models/AgentVersionDetails.java","src/main/java/com/azure/ai/agents/models/Annotation.java","src/main/java/com/azure/ai/agents/models/AnnotationFileCitation.java","src/main/java/com/azure/ai/agents/models/AnnotationFilePath.java","src/main/java/com/azure/ai/agents/models/AnnotationType.java","src/main/java/com/azure/ai/agents/models/AnnotationUrlCitation.java","src/main/java/com/azure/ai/agents/models/ApproximateLocation.java","src/main/java/com/azure/ai/agents/models/AzureAISearchAgentTool.java","src/main/java/com/azure/ai/agents/models/AzureAISearchQueryType.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolResource.java","src/main/java/com/azure/ai/agents/models/AzureFunctionAgentTool.java","src/main/java/com/azure/ai/agents/models/AzureFunctionBinding.java","src/main/java/com/azure/ai/agents/models/AzureFunctionDefinition.java","src/main/java/com/azure/ai/agents/models/AzureFunctionDefinitionFunction.java","src/main/java/com/azure/ai/agents/models/AzureFunctionStorageQueue.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchAgentTool.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolParameters.java","src/main/java/com/azure/ai/agents/models/BingGroundingAgentTool.java","src/main/java/com/azure/ai/agents/models/BingGroundingSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/BingGroundingSearchToolParameters.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationAgentTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolConnectionParameters.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolParameters.java","src/main/java/com/azure/ai/agents/models/CaptureStructuredOutputsTool.java","src/main/java/com/azure/ai/agents/models/ChatSummaryMemoryItem.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterOutput.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterOutputImage.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterOutputLogs.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterOutputType.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterTool.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterToolAuto.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterToolCallItemParam.java","src/main/java/com/azure/ai/agents/models/ComparisonFilter.java","src/main/java/com/azure/ai/agents/models/ComparisonFilterType.java","src/main/java/com/azure/ai/agents/models/CompoundFilter.java","src/main/java/com/azure/ai/agents/models/CompoundFilterType.java","src/main/java/com/azure/ai/agents/models/ComputerAction.java","src/main/java/com/azure/ai/agents/models/ComputerActionClick.java","src/main/java/com/azure/ai/agents/models/ComputerActionClickButton.java","src/main/java/com/azure/ai/agents/models/ComputerActionDoubleClick.java","src/main/java/com/azure/ai/agents/models/ComputerActionDrag.java","src/main/java/com/azure/ai/agents/models/ComputerActionKeyPress.java","src/main/java/com/azure/ai/agents/models/ComputerActionMove.java","src/main/java/com/azure/ai/agents/models/ComputerActionScreenshot.java","src/main/java/com/azure/ai/agents/models/ComputerActionScroll.java","src/main/java/com/azure/ai/agents/models/ComputerActionType.java","src/main/java/com/azure/ai/agents/models/ComputerActionTypeKeys.java","src/main/java/com/azure/ai/agents/models/ComputerActionWait.java","src/main/java/com/azure/ai/agents/models/ComputerToolCallItemParam.java","src/main/java/com/azure/ai/agents/models/ComputerToolCallOutputItemOutput.java","src/main/java/com/azure/ai/agents/models/ComputerToolCallOutputItemOutputComputerScreenshot.java","src/main/java/com/azure/ai/agents/models/ComputerToolCallOutputItemOutputType.java","src/main/java/com/azure/ai/agents/models/ComputerToolCallOutputItemParam.java","src/main/java/com/azure/ai/agents/models/ComputerToolCallSafetyCheck.java","src/main/java/com/azure/ai/agents/models/ComputerUsePreviewTool.java","src/main/java/com/azure/ai/agents/models/ComputerUsePreviewToolEnvironment.java","src/main/java/com/azure/ai/agents/models/ContainerAppAgentDefinition.java","src/main/java/com/azure/ai/agents/models/Coordinate.java","src/main/java/com/azure/ai/agents/models/DeleteAgentResponse.java","src/main/java/com/azure/ai/agents/models/DeleteAgentVersionResponse.java","src/main/java/com/azure/ai/agents/models/DeleteMemoryStoreResponse.java","src/main/java/com/azure/ai/agents/models/Error.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolParameters.java","src/main/java/com/azure/ai/agents/models/FileSearchTool.java","src/main/java/com/azure/ai/agents/models/FileSearchToolCallItemParam.java","src/main/java/com/azure/ai/agents/models/FileSearchToolCallItemParamResult.java","src/main/java/com/azure/ai/agents/models/FunctionTool.java","src/main/java/com/azure/ai/agents/models/FunctionToolCallItemParam.java","src/main/java/com/azure/ai/agents/models/FunctionToolCallOutputItemParam.java","src/main/java/com/azure/ai/agents/models/HostedAgentDefinition.java","src/main/java/com/azure/ai/agents/models/ImageBasedHostedAgentDefinition.java","src/main/java/com/azure/ai/agents/models/ImageGenTool.java","src/main/java/com/azure/ai/agents/models/ImageGenToolBackground.java","src/main/java/com/azure/ai/agents/models/ImageGenToolCallItemParam.java","src/main/java/com/azure/ai/agents/models/ImageGenToolInputImageMask.java","src/main/java/com/azure/ai/agents/models/ImageGenToolModel.java","src/main/java/com/azure/ai/agents/models/ImageGenToolModeration.java","src/main/java/com/azure/ai/agents/models/ImageGenToolOutputFormat.java","src/main/java/com/azure/ai/agents/models/ImageGenToolQuality.java","src/main/java/com/azure/ai/agents/models/ImageGenToolSize.java","src/main/java/com/azure/ai/agents/models/ItemContent.java","src/main/java/com/azure/ai/agents/models/ItemContentInputAudio.java","src/main/java/com/azure/ai/agents/models/ItemContentInputAudioFormat.java","src/main/java/com/azure/ai/agents/models/ItemContentInputFile.java","src/main/java/com/azure/ai/agents/models/ItemContentInputImage.java","src/main/java/com/azure/ai/agents/models/ItemContentInputImageDetail.java","src/main/java/com/azure/ai/agents/models/ItemContentInputText.java","src/main/java/com/azure/ai/agents/models/ItemContentOutputAudio.java","src/main/java/com/azure/ai/agents/models/ItemContentOutputText.java","src/main/java/com/azure/ai/agents/models/ItemContentRefusal.java","src/main/java/com/azure/ai/agents/models/ItemContentType.java","src/main/java/com/azure/ai/agents/models/ItemParam.java","src/main/java/com/azure/ai/agents/models/ItemReferenceItemParam.java","src/main/java/com/azure/ai/agents/models/ItemType.java","src/main/java/com/azure/ai/agents/models/ListAgentsRequestOrder.java","src/main/java/com/azure/ai/agents/models/LocalShellExecAction.java","src/main/java/com/azure/ai/agents/models/LocalShellTool.java","src/main/java/com/azure/ai/agents/models/LocalShellToolCallItemParam.java","src/main/java/com/azure/ai/agents/models/LocalShellToolCallOutputItemParam.java","src/main/java/com/azure/ai/agents/models/Location.java","src/main/java/com/azure/ai/agents/models/LocationType.java","src/main/java/com/azure/ai/agents/models/LogProb.java","src/main/java/com/azure/ai/agents/models/MCPApprovalRequestItemParam.java","src/main/java/com/azure/ai/agents/models/MCPApprovalResponseItemParam.java","src/main/java/com/azure/ai/agents/models/MCPCallItemParam.java","src/main/java/com/azure/ai/agents/models/MCPListToolsItemParam.java","src/main/java/com/azure/ai/agents/models/MCPListToolsTool.java","src/main/java/com/azure/ai/agents/models/MCPTool.java","src/main/java/com/azure/ai/agents/models/MCPToolAllowedTools.java","src/main/java/com/azure/ai/agents/models/MCPToolRequireApproval.java","src/main/java/com/azure/ai/agents/models/MCPToolRequireApprovalAlways.java","src/main/java/com/azure/ai/agents/models/MCPToolRequireApprovalNever.java","src/main/java/com/azure/ai/agents/models/MemoryItem.java","src/main/java/com/azure/ai/agents/models/MemoryItemKind.java","src/main/java/com/azure/ai/agents/models/MemoryOperation.java","src/main/java/com/azure/ai/agents/models/MemoryOperationKind.java","src/main/java/com/azure/ai/agents/models/MemorySearchItem.java","src/main/java/com/azure/ai/agents/models/MemorySearchOptions.java","src/main/java/com/azure/ai/agents/models/MemorySearchTool.java","src/main/java/com/azure/ai/agents/models/MemorySearchToolCallItemParam.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefaultDefinition.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefaultOptions.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefinition.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDeleteScopeResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDetails.java","src/main/java/com/azure/ai/agents/models/MemoryStoreKind.java","src/main/java/com/azure/ai/agents/models/MemoryStoreOperationUsage.java","src/main/java/com/azure/ai/agents/models/MemoryStoreOperationUsageInputTokensDetails.java","src/main/java/com/azure/ai/agents/models/MemoryStoreOperationUsageOutputTokensDetails.java","src/main/java/com/azure/ai/agents/models/MemoryStoreSearchResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateCompletedResult.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateStatus.java","src/main/java/com/azure/ai/agents/models/MicrosoftFabricAgentTool.java","src/main/java/com/azure/ai/agents/models/OpenApiAgentTool.java","src/main/java/com/azure/ai/agents/models/OpenApiAnonymousAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiAuthType.java","src/main/java/com/azure/ai/agents/models/OpenApiFunctionDefinition.java","src/main/java/com/azure/ai/agents/models/OpenApiFunctionDefinitionFunction.java","src/main/java/com/azure/ai/agents/models/OpenApiManagedAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiManagedSecurityScheme.java","src/main/java/com/azure/ai/agents/models/OpenApiProjectConnectionAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiProjectConnectionSecurityScheme.java","src/main/java/com/azure/ai/agents/models/PromptAgentDefinition.java","src/main/java/com/azure/ai/agents/models/PromptAgentDefinitionText.java","src/main/java/com/azure/ai/agents/models/ProtocolVersionRecord.java","src/main/java/com/azure/ai/agents/models/RaiConfig.java","src/main/java/com/azure/ai/agents/models/RankingOptions.java","src/main/java/com/azure/ai/agents/models/RankingOptionsRanker.java","src/main/java/com/azure/ai/agents/models/Reasoning.java","src/main/java/com/azure/ai/agents/models/ReasoningEffort.java","src/main/java/com/azure/ai/agents/models/ReasoningGenerateSummary.java","src/main/java/com/azure/ai/agents/models/ReasoningItemParam.java","src/main/java/com/azure/ai/agents/models/ReasoningItemSummaryPart.java","src/main/java/com/azure/ai/agents/models/ReasoningItemSummaryPartType.java","src/main/java/com/azure/ai/agents/models/ReasoningItemSummaryTextPart.java","src/main/java/com/azure/ai/agents/models/ReasoningSummary.java","src/main/java/com/azure/ai/agents/models/ResponseTextFormatConfiguration.java","src/main/java/com/azure/ai/agents/models/ResponseTextFormatConfigurationJsonObject.java","src/main/java/com/azure/ai/agents/models/ResponseTextFormatConfigurationJsonSchema.java","src/main/java/com/azure/ai/agents/models/ResponseTextFormatConfigurationText.java","src/main/java/com/azure/ai/agents/models/ResponseTextFormatConfigurationType.java","src/main/java/com/azure/ai/agents/models/ResponsesAssistantMessageItemParam.java","src/main/java/com/azure/ai/agents/models/ResponsesDeveloperMessageItemParam.java","src/main/java/com/azure/ai/agents/models/ResponsesMessageItemParam.java","src/main/java/com/azure/ai/agents/models/ResponsesMessageRole.java","src/main/java/com/azure/ai/agents/models/ResponsesSystemMessageItemParam.java","src/main/java/com/azure/ai/agents/models/ResponsesUserMessageItemParam.java","src/main/java/com/azure/ai/agents/models/SharepointAgentTool.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolParameters.java","src/main/java/com/azure/ai/agents/models/StructuredInputDefinition.java","src/main/java/com/azure/ai/agents/models/StructuredOutputDefinition.java","src/main/java/com/azure/ai/agents/models/Tool.java","src/main/java/com/azure/ai/agents/models/ToolProjectConnection.java","src/main/java/com/azure/ai/agents/models/ToolType.java","src/main/java/com/azure/ai/agents/models/TopLogProb.java","src/main/java/com/azure/ai/agents/models/UserProfileMemoryItem.java","src/main/java/com/azure/ai/agents/models/VectorStoreFileAttributes.java","src/main/java/com/azure/ai/agents/models/WebSearchAction.java","src/main/java/com/azure/ai/agents/models/WebSearchActionFind.java","src/main/java/com/azure/ai/agents/models/WebSearchActionOpenPage.java","src/main/java/com/azure/ai/agents/models/WebSearchActionSearch.java","src/main/java/com/azure/ai/agents/models/WebSearchActionSearchSources.java","src/main/java/com/azure/ai/agents/models/WebSearchActionType.java","src/main/java/com/azure/ai/agents/models/WebSearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/WebSearchPreviewToolSearchContextSize.java","src/main/java/com/azure/ai/agents/models/WebSearchToolCallItemParam.java","src/main/java/com/azure/ai/agents/models/WorkflowAgentDefinition.java","src/main/java/com/azure/ai/agents/models/package-info.java","src/main/java/com/azure/ai/agents/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/MemorySearchAgent.java b/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/MemorySearchAgent.java new file mode 100644 index 000000000000..2de0ac2a1823 --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/MemorySearchAgent.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents; + +import com.azure.ai.agents.models.AgentReference; +import com.azure.ai.agents.models.AgentVersionDetails; +import com.azure.ai.agents.models.MemorySearchTool; +import com.azure.ai.agents.models.MemoryStoreDefaultDefinition; +import com.azure.ai.agents.models.MemoryStoreDefaultOptions; +import com.azure.ai.agents.models.MemoryStoreDetails; +import com.azure.ai.agents.models.PromptAgentDefinition; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.openai.models.conversations.Conversation; +import com.openai.models.responses.Response; +import com.openai.models.responses.ResponseCreateParams; + +import java.util.Collections; +import java.util.concurrent.TimeUnit; + +/** + * Sample showing how to pair an agent with a memory search tool so it can recall earlier user preferences. + */ +public class MemorySearchAgent { + private static final long MEMORY_WRITE_DELAY_SECONDS = 60; + + public static void main(String[] args) { + Configuration configuration = Configuration.getGlobalConfiguration(); + String endpoint = configuration.get("AZURE_AGENTS_ENDPOINT"); + String agentModel = configuration.get("AZURE_AGENT_MODEL"); + String chatModel = configuration.get("AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME"); + String embeddingModel = configuration.get("AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME"); + + AgentsClientBuilder builder = new AgentsClientBuilder() + .credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(endpoint) + .serviceVersion(AgentsServiceVersion.V2025_05_15_PREVIEW); + + AgentsClient agentsClient = builder.buildAgentsClient(); + MemoryStoresClient memoryStoresClient = builder.buildMemoryStoresClient(); + ConversationsClient conversationsClient = builder.buildConversationsClient(); + ResponsesClient responsesClient = builder.buildResponsesClient(); + + String memoryStoreName = "my_memory_store"; + String agentName = "MyAgent"; + String description = "Example memory store for conversations"; + String scope = "user_123"; + + AgentVersionDetails agent = null; + String firstConversationId = null; + String followUpConversationId = null; + + try { + cleanupMemoryStore(memoryStoresClient, memoryStoreName); + + MemoryStoreDefaultDefinition definition = new MemoryStoreDefaultDefinition(chatModel, embeddingModel) + .setOptions(new MemoryStoreDefaultOptions(true, true)); + + MemoryStoreDetails memoryStore + = memoryStoresClient.createMemoryStore(memoryStoreName, definition, description, null); + System.out.printf("Created memory store: %s (%s)\n", memoryStore.getName(), memoryStore.getId()); + + MemorySearchTool tool = new MemorySearchTool(memoryStore.getName(), scope) + .setUpdateDelay(1); // Wait 1 second of inactivity before extracting memories + + PromptAgentDefinition agentDefinition = new PromptAgentDefinition(agentModel) + .setInstructions("You are a helpful assistant that answers general questions.") + .setTools(Collections.singletonList(tool)); + + agent = agentsClient.createAgentVersion(agentName, agentDefinition); + System.out.printf("Agent created (id: %s, version: %s)\n", agent.getId(), agent.getVersion()); + + AgentReference agentReference = new AgentReference(agent.getName()).setVersion(agent.getVersion()); + + Conversation conversation = conversationsClient.getConversationService().create(); + firstConversationId = conversation.id(); + System.out.println("Created conversation (id: " + firstConversationId + ")"); + + + Response response = responsesClient.createWithAgentConversation(agentReference, firstConversationId, + ResponseCreateParams.builder().input("I prefer dark roast coffee")); + System.out.println("Response output: " + getResponseText(response)); + + System.out.println("Waiting for memories to be stored..."); + sleepSeconds(MEMORY_WRITE_DELAY_SECONDS); + + Conversation newConversation = conversationsClient.getConversationService().create(); + followUpConversationId = newConversation.id(); + System.out.println("Created new conversation (id: " + followUpConversationId + ")"); + + Response followUpResponse = responsesClient.createWithAgentConversation(agentReference, + followUpConversationId, ResponseCreateParams.builder().input("Please order my usual coffee")); + System.out.println("Response output: " + getResponseText(followUpResponse)); + + System.out.println("Sample completed successfully."); + } finally { + deleteConversation(conversationsClient, firstConversationId); + deleteConversation(conversationsClient, followUpConversationId); + if (agent != null) { + agentsClient.deleteAgentVersion(agent.getName(), agent.getVersion()); + System.out.println("Agent deleted"); + } + cleanupMemoryStore(memoryStoresClient, memoryStoreName); + } + } + + private static void cleanupMemoryStore(MemoryStoresClient memoryStoresClient, String memoryStoreName) { + if (memoryStoreName == null) { + return; + } + try { + memoryStoresClient.deleteMemoryStore(memoryStoreName); + System.out.println("Memory store `" + memoryStoreName + "` deleted"); + } catch (ResourceNotFoundException ignored) { + // no-op + } + } + + private static void deleteConversation(ConversationsClient conversationsClient, String conversationId) { + if (conversationId == null) { + return; + } + try { + conversationsClient.getConversationService().delete(conversationId); + System.out.println("Conversation deleted (id: " + conversationId + ")"); + } catch (Exception ignored) { + // best-effort cleanup + } + } + + private static void sleepSeconds(long seconds) { + try { + TimeUnit.SECONDS.sleep(seconds); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new RuntimeException("Sleep interrupted", e); + } + } + + private static String getResponseText(Response response) { + if (response == null || response.output().isEmpty()) { + return "<no output>"; + } + try { + if (response.output().get(0).asMessage().content().isEmpty()) { + return "<no output>"; + } + return response.output().get(0).asMessage().content().get(0).asOutputText().text(); + } catch (RuntimeException ex) { + return "<unavailable>"; + } + } +} diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/AgentsAsyncTests.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/AgentsAsyncTests.java index 8065c6109e69..00696a01ea39 100644 --- a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/AgentsAsyncTests.java +++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/AgentsAsyncTests.java @@ -3,35 +3,46 @@ package com.azure.ai.agents; +import com.azure.ai.agents.models.AgentReference; import com.azure.ai.agents.models.PromptAgentDefinition; import com.azure.core.http.HttpClient; +import com.openai.models.conversations.Conversation; +import com.openai.models.responses.EasyInputMessage; +import com.openai.models.responses.ResponseCreateParams; +import com.openai.models.responses.ResponseInputItem; +import com.openai.models.responses.ResponseStatus; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; +import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import static com.azure.ai.agents.TestUtils.DISPLAY_NAME_WITH_ARGUMENTS; import static org.junit.jupiter.api.Assertions.*; +import java.util.ArrayList; +import java.util.List; + @Disabled("Disabled for lack of recordings. Needs to be enabled on the Public Preview release.") public class AgentsAsyncTests extends ClientTestBase { + private static final String AGENT_NAME = "test-agent-java"; + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.agents.TestUtils#getTestParameters") public void basicCRUDOperations(HttpClient httpClient, AgentsServiceVersion serviceVersion) { AgentsAsyncClient client = getAgentsAsyncClient(httpClient, serviceVersion); - String agentName = "test_agent_java"; String agentModel = "gpt-4o"; PromptAgentDefinition request = new PromptAgentDefinition(agentModel); - StepVerifier.create(client.createAgentVersion(agentName, request).flatMap(created -> { + StepVerifier.create(client.createAgentVersion(AGENT_NAME, request).flatMap(created -> { // Assertions for created agent version assertNotNull(created); assertNotNull(created.getId()); - assertEquals(agentName, created.getName()); + assertEquals(AGENT_NAME, created.getName()); - return client.getAgent(agentName).doOnNext(retrieved -> { + return client.getAgent(AGENT_NAME).doOnNext(retrieved -> { // Assertions for retrieved agent assertNotNull(retrieved); assertNotNull(retrieved.getId()); @@ -40,15 +51,15 @@ public void basicCRUDOperations(HttpClient httpClient, AgentsServiceVersion serv assertEquals(created.getName(), retrieved.getName()); }) .thenMany(client.listAgents()) - .filter(agent -> agent.getName().equals(agentName)) + .filter(agent -> agent.getName().equals(AGENT_NAME)) .next() .doOnNext(agent -> { assertEquals(agent.getVersions().getLatest().getId(), created.getId()); assertEquals(agent.getVersions().getLatest().getName(), created.getName()); }) - .then(client.deleteAgentVersion(agentName, created.getVersion())); + .then(client.deleteAgentVersion(AGENT_NAME, created.getVersion())); })).assertNext(deletedAgent -> { - assertEquals(agentName, deletedAgent.getName()); + assertEquals(AGENT_NAME, deletedAgent.getName()); assertTrue(deletedAgent.isDeleted()); }).verifyComplete(); } @@ -57,18 +68,17 @@ public void basicCRUDOperations(HttpClient httpClient, AgentsServiceVersion serv @MethodSource("com.azure.ai.agents.TestUtils#getTestParameters") public void basicVersionedAgentCRUDOperations(HttpClient httpClient, AgentsServiceVersion serviceVersion) { AgentsAsyncClient client = getAgentsAsyncClient(httpClient, serviceVersion); - String agentName = "test_agent_java"; String agentModel = "gpt-4o"; PromptAgentDefinition request = new PromptAgentDefinition(agentModel); - StepVerifier.create(client.createAgentVersion(agentName, request).flatMap(created -> { + StepVerifier.create(client.createAgentVersion(AGENT_NAME, request).flatMap(created -> { // Assertions for created agent version assertNotNull(created); assertNotNull(created.getId()); - assertEquals(agentName, created.getName()); + assertEquals(AGENT_NAME, created.getName()); - return client.getAgentVersionDetails(agentName, created.getVersion()).doOnNext(retrieved -> { + return client.getAgentVersionDetails(AGENT_NAME, created.getVersion()).doOnNext(retrieved -> { // Assertions for retrieved agent version assertNotNull(retrieved); assertNotNull(retrieved.getId()); @@ -76,54 +86,75 @@ public void basicVersionedAgentCRUDOperations(HttpClient httpClient, AgentsServi assertEquals(created.getId(), retrieved.getId()); assertEquals(created.getName(), retrieved.getName()); }) - .thenMany(client.listAgentVersions(agentName)) + .thenMany(client.listAgentVersions(AGENT_NAME)) .filter(agentVersion -> agentVersion.getVersion().equals(created.getVersion())) .next() .doOnNext(agentVersion -> { assertEquals(agentVersion.getId(), created.getId()); assertEquals(agentVersion.getName(), created.getName()); }) - .then(client.deleteAgentVersion(agentName, created.getVersion())); + .then(client.deleteAgentVersion(AGENT_NAME, created.getVersion())); })).assertNext(deletedAgent -> { - assertEquals(agentName, deletedAgent.getName()); + assertEquals(AGENT_NAME, deletedAgent.getName()); assertTrue(deletedAgent.isDeleted()); }).verifyComplete(); } - // @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) - // @MethodSource("com.azure.ai.agents.TestUtils#getTestParameters") - // public void operationOperations(HttpClient httpClient, AgentsServiceVersion serviceVersion) { - // AgentsAsyncClient client = getAgentsAsyncClient(httpClient, serviceVersion); - // String agentName = "test_agent_java"; - // String agentModel = "gpt-4o"; - // - // PromptAgentDefinition request = new PromptAgentDefinition(agentModel); - // - // StepVerifier.create(client.createAgentVersion(agentName, request).flatMap(created -> { - // // Assertions for created agent version - // assertNotNull(created); - // assertNotNull(created.getId()); - // assertEquals(agentName, created.getName()); - // - // return client.listAgentContainerOperations(created.getId()).doOnNext(retrieved -> { - // // Assertions for retrieved operation - // assertNotNull(retrieved); - // assertNotNull(retrieved.getId()); - // assertEquals(created.getId(), retrieved.getId()); - // }) - // .flatMap(operation -> client.getAgentContainerOperation(operation.getAgentId(), operation.getId()) - // .map(it -> Tuples.of(operation, it))) - // .doOnNext(tuple -> { - // AgentContainerOperationObject operation = tuple.getT1(); - // AgentContainerOperationObject retrievedOperation = tuple.getT2(); - // assertEquals(operation.getId(), retrievedOperation.getId()); - // assertEquals(operation.getAgentId(), retrievedOperation.getAgentId()); - // assertEquals(operation.getStatus(), retrievedOperation.getStatus()); - // }) - // .then(client.deleteAgentVersion(created.getName(), created.getVersion())); - // })).assertNext(deletedAgent -> { - // assertEquals(agentName, deletedAgent.getName()); - // assertTrue(deletedAgent.isDeleted()); - // }).verifyComplete(); - // } + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.agents.TestUtils#getTestParameters") + public void promptAgentTest(HttpClient httpClient, AgentsServiceVersion serviceVersion) { + AgentsAsyncClient agentsClient = getAgentsAsyncClient(httpClient, serviceVersion); + ConversationsAsyncClient conversationsClient = getConversationsAsyncClient(httpClient, serviceVersion); + ResponsesAsyncClient responsesClient = getResponsesAsyncClient(httpClient, serviceVersion); + String agentModel = "gpt-4o"; + + PromptAgentDefinition promptAgentDefinition = new PromptAgentDefinition(agentModel); + + StepVerifier.create(agentsClient.createAgentVersion(AGENT_NAME, promptAgentDefinition).flatMap(createdAgent -> { + assertNotNull(createdAgent); + assertNotNull(createdAgent.getId()); + assertEquals(AGENT_NAME, createdAgent.getName()); + + AgentReference agentReference = new AgentReference(createdAgent.getName()); + agentReference.setVersion(createdAgent.getVersion()); + + return Mono.fromFuture(conversationsClient.getConversationServiceAsync().create()) + .flatMap((Conversation conversation) -> { + List<ResponseInputItem> inputItems = new ArrayList<>(); + inputItems.add(ResponseInputItem.ofEasyInputMessage(EasyInputMessage.builder() + .role(EasyInputMessage.Role.SYSTEM) + .content("You are a helpful assistant who speaks like a pirate. Today is a sunny and warm day.") + .build())); + inputItems.add(ResponseInputItem.ofEasyInputMessage(EasyInputMessage.builder() + .role(EasyInputMessage.Role.USER) + .content("Could you help me decide what clothes to wear today?") + .build())); + + ResponseCreateParams.Builder paramsBuilder + = ResponseCreateParams.builder().inputOfResponse(inputItems); + + return responsesClient.createWithAgentConversation(agentReference, conversation.id(), paramsBuilder) + .doOnNext(response -> { + assertNotNull(response); + assertTrue(response.id().startsWith("resp")); + assertTrue(response.status().isPresent()); + assertEquals(ResponseStatus.COMPLETED, response.status().get()); + assertFalse(response.output().isEmpty()); + assertTrue(response.output().get(0).isMessage()); + assertFalse(response.output().get(0).asMessage().content().isEmpty()); + }) + .flatMap(response -> cleanupPromptAgentTest(agentsClient, conversationsClient, responsesClient, + createdAgent.getId(), conversation.id(), response.id()).thenReturn(response)); + }); + })).assertNext(response -> assertTrue(response.id().startsWith("resp"))).verifyComplete(); + } + + private Mono<Void> cleanupPromptAgentTest(AgentsAsyncClient agentsClient, + ConversationsAsyncClient conversationsClient, ResponsesAsyncClient responsesClient, String agentId, + String conversationId, String responseId) { + return Mono.whenDelayError(agentsClient.deleteAgent(agentId).then(), + Mono.fromFuture(conversationsClient.getConversationServiceAsync().delete(conversationId)).then(), + // Deleting response causes a 500 in service, but keep the request for parity with sync tests. + Mono.fromFuture(responsesClient.getResponseServiceAsync().delete(responseId)).then()); + } } diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/AgentsTests.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/AgentsTests.java index d5bc78544fd8..8955f396c287 100644 --- a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/AgentsTests.java +++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/AgentsTests.java @@ -6,7 +6,11 @@ import com.azure.ai.agents.models.*; import com.azure.core.http.HttpClient; import com.openai.models.conversations.Conversation; -import com.openai.models.responses.*; +import com.openai.models.responses.EasyInputMessage; +import com.openai.models.responses.Response; +import com.openai.models.responses.ResponseCreateParams; +import com.openai.models.responses.ResponseInputItem; +import com.openai.models.responses.ResponseStatus; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -19,22 +23,23 @@ @Disabled("Disabled for lack of recordings. Needs to be enabled on the Public Preview release.") public class AgentsTests extends ClientTestBase { + private static final String AGENT_NAME = "test-agent-java"; + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.agents.TestUtils#getTestParameters") public void basicCRUDOperations(HttpClient httpClient, AgentsServiceVersion serviceVersion) { AgentsClient client = getAgentsSyncClient(httpClient, serviceVersion); - String agentName = "test_agent_java"; String agentModel = "gpt-4o"; AgentDefinition request = new PromptAgentDefinition(agentModel); - AgentVersionDetails createdAgent = client.createAgentVersion(agentName, request); + AgentVersionDetails createdAgent = client.createAgentVersion(AGENT_NAME, request); assertNotNull(createdAgent); assertNotNull(createdAgent.getId()); - assertEquals(agentName, createdAgent.getName()); + assertEquals(AGENT_NAME, createdAgent.getName()); - AgentDetails retrievedAgent = client.getAgent(agentName); + AgentDetails retrievedAgent = client.getAgent(AGENT_NAME); assertNotNull(retrievedAgent); assertNotNull(retrievedAgent.getId()); @@ -43,15 +48,15 @@ public void basicCRUDOperations(HttpClient httpClient, AgentsServiceVersion serv assertEquals(createdAgent.getName(), retrievedAgent.getName()); for (AgentDetails agent : client.listAgents()) { - if (agent.getName().equals(agentName)) { + if (agent.getName().equals(AGENT_NAME)) { assertEquals(agent.getVersions().getLatest().getId(), createdAgent.getId()); assertEquals(agent.getVersions().getLatest().getName(), createdAgent.getName()); break; } } - DeleteAgentResponse deletedAgent = client.deleteAgent(agentName); - assertEquals(agentName, deletedAgent.getName()); + DeleteAgentResponse deletedAgent = client.deleteAgent(AGENT_NAME); + assertEquals(AGENT_NAME, deletedAgent.getName()); assertTrue(deletedAgent.isDeleted()); } @@ -59,17 +64,16 @@ public void basicCRUDOperations(HttpClient httpClient, AgentsServiceVersion serv @MethodSource("com.azure.ai.agents.TestUtils#getTestParameters") public void basicVersionedAgentCRUDOperations(HttpClient httpClient, AgentsServiceVersion serviceVersion) { AgentsClient client = getAgentsSyncClient(httpClient, serviceVersion); - String agentName = "test_agent_java"; String agentModel = "gpt-4o"; AgentDefinition request = new PromptAgentDefinition(agentModel); // Creation - AgentVersionDetails createdAgent = client.createAgentVersion(agentName, request); + AgentVersionDetails createdAgent = client.createAgentVersion(AGENT_NAME, request); assertNotNull(createdAgent); assertNotNull(createdAgent.getId()); - assertEquals(agentName, createdAgent.getName()); + assertEquals(AGENT_NAME, createdAgent.getName()); // Retrieval AgentVersionDetails retrievedAgent @@ -99,55 +103,17 @@ public void basicVersionedAgentCRUDOperations(HttpClient httpClient, AgentsServi assertTrue(deletedAgent.isDeleted()); } - // @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) - // @MethodSource("com.azure.ai.agents.TestUtils#getTestParameters") - // public void operationOperations(HttpClient httpClient, AgentsServiceVersion serviceVersion) { - // AgentsClient client = getAgentsSyncClient(httpClient, serviceVersion); - // String agentName = "test_agent_java"; - // String agentModel = "gpt-4o"; - // - // AgentDefinition request = new PromptAgentDefinition(agentModel); - // - // AgentVersionObject createdAgent = client.createAgentVersion(agentName, request); - // - // assertNotNull(createdAgent); - // assertNotNull(createdAgent.getId()); - // assertEquals(agentName, createdAgent.getName()); - // - // for (AgentContainerOperationObject agentOperation : client - // .listAgentContainerOperations(createdAgent.getName())) { - // assertNotNull(agentOperation.getAgentId()); - // assertNotNull(agentOperation.getId()); - // assertFalse(agentOperation.getId().trim().isEmpty()); - // - // AgentContainerOperationObject retrievedAgentOperation - // = client.getAgentContainerOperation(createdAgent.getName(), agentOperation.getId()); - // assertNotNull(retrievedAgentOperation); - // assertEquals(agentOperation.getId(), retrievedAgentOperation.getId()); - // assertEquals(agentOperation.getAgentId(), retrievedAgentOperation.getAgentId()); - // assertEquals(agentOperation.getStatus(), retrievedAgentOperation.getStatus()); - // } - // - // // Clean up - // DeleteAgentVersionResponse agentDeletion - // = client.deleteAgentVersion(createdAgent.getName(), createdAgent.getVersion()); - // assertEquals(agentName, agentDeletion.getName()); - // assertTrue(agentDeletion.isDeleted()); - // } - @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.agents.TestUtils#getTestParameters") public void promptAgentTest(HttpClient httpClient, AgentsServiceVersion serviceVersion) { AgentsClient agentsClient = getAgentsSyncClient(httpClient, serviceVersion); ConversationsClient conversationsClient = getConversationsSyncClient(httpClient, serviceVersion); ResponsesClient responsesClient = getResponsesSyncClient(httpClient, serviceVersion); - - String agentName = "test_prompt_agent_java"; String agentModel = "gpt-4o"; PromptAgentDefinition promptAgentDefinition = new PromptAgentDefinition(agentModel); - AgentVersionDetails createdAgent = agentsClient.createAgentVersion(agentName, promptAgentDefinition); + AgentVersionDetails createdAgent = agentsClient.createAgentVersion(AGENT_NAME, promptAgentDefinition); AgentReference agentReference = new AgentReference(createdAgent.getName()); agentReference.setVersion(createdAgent.getVersion()); @@ -169,7 +135,7 @@ public void promptAgentTest(HttpClient httpClient, AgentsServiceVersion serviceV assertNotNull(createdAgent); assertNotNull(createdAgent.getId()); - assertEquals(agentName, createdAgent.getName()); + assertEquals(AGENT_NAME, createdAgent.getName()); assertNotNull(response); assertTrue(response.id().startsWith("resp")); @@ -185,7 +151,7 @@ public void promptAgentTest(HttpClient httpClient, AgentsServiceVersion serviceV agentsClient.deleteAgent(createdAgent.getId()); conversationsClient.getConversationService().delete(conversation.id()); // Deleting response causes a 500 - // responsesClient.getOpenAIClient().delete(response.id()); + responsesClient.getResponseService().delete(response.id()); } // // @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @@ -195,14 +161,14 @@ public void promptAgentTest(HttpClient httpClient, AgentsServiceVersion serviceV // ConversationsClient conversationsClient = getConversationsSyncClient(httpClient, serviceVersion); // ResponsesClient responsesClient = getResponsesSyncClient(httpClient, serviceVersion); // - // String agentName = "test_workflow_agent_java"; + // String AGENT_NAME = "test_workflow_agent_java"; // // // Using the new utility function to get workflow data from test resources // WorkflowDefinition workflowAgentDefinition = new WorkflowDefinition(); // // workflowAgentDefinition.setTrigger(TestUtils.getBeginWorkflowMap("test_workflow.json")); // - // AgentVersionObject createdAgent = agentsClient.createAgentVersion(agentName, workflowAgentDefinition); + // AgentVersionObject createdAgent = agentsClient.createAgentVersion(AGENT_NAME, workflowAgentDefinition); // // AgentReference agentReference = new AgentReference(createdAgent.getName()); // agentReference.setVersion(createdAgent.getVersion()); @@ -213,7 +179,7 @@ public void promptAgentTest(HttpClient httpClient, AgentsServiceVersion serviceV // // assertNotNull(createdAgent); // assertNotNull(createdAgent.getId()); - // assertEquals(agentName, createdAgent.getName()); + // assertEquals(AGENT_NAME, createdAgent.getName()); // // assertNotNull(response); // assertTrue(response.id().startsWith("wfresp")); diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ClientTestBase.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ClientTestBase.java index dc2a3bc314a1..fde11bc68459 100644 --- a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ClientTestBase.java +++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ClientTestBase.java @@ -81,12 +81,21 @@ protected ResponsesAsyncClient getResponsesAsyncClient(HttpClient httpClient, return getClientBuilder(httpClient, agentsServiceVersion).buildResponsesAsyncClient(); } + protected MemoryStoresClient getMemoryStoresSyncClient(HttpClient httpClient, + AgentsServiceVersion agentsServiceVersion) { + return getClientBuilder(httpClient, agentsServiceVersion).buildMemoryStoresClient(); + } + + protected MemoryStoresAsyncClient getMemoryStoresAsyncClient(HttpClient httpClient, + AgentsServiceVersion agentsServiceVersion) { + return getClientBuilder(httpClient, agentsServiceVersion).buildMemoryStoresAsyncClient(); + } + private void addTestRecordCustomSanitizers() { ArrayList<TestProxySanitizer> sanitizers = new ArrayList<>(); sanitizers.add(new TestProxySanitizer("$..key", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); - sanitizers.add(new TestProxySanitizer("$..endpoint", "https://.+?/api/projects/.+?/", "https://REDACTED/", - TestProxySanitizerType.URL)); + sanitizers.add(new TestProxySanitizer("(?<=./)([^?]+)", "/REDACTED/", TestProxySanitizerType.URL)); sanitizers.add(new TestProxySanitizer("Content-Type", "(^multipart\\/form-data; boundary=[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{2})", "multipart\\/form-data; boundary=BOUNDARY", TestProxySanitizerType.HEADER)); @@ -99,4 +108,15 @@ private void addCustomMatchers() { interceptorManager.addMatchers(new CustomMatcher().setExcludedHeaders(Arrays.asList("Cookie", "Set-Cookie"))); } + protected void sleep(long millis) { + if (getTestMode() == TestMode.PLAYBACK) { + return; + } + try { + Thread.sleep(millis); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + } + } diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/MemoryStoresAsyncTests.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/MemoryStoresAsyncTests.java new file mode 100644 index 000000000000..53b15506b493 --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/MemoryStoresAsyncTests.java @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents; + +import com.azure.ai.agents.models.ListAgentsRequestOrder; +import com.azure.ai.agents.models.MemoryOperation; +import com.azure.ai.agents.models.MemorySearchItem; +import com.azure.ai.agents.models.MemorySearchOptions; +import com.azure.ai.agents.models.MemoryStoreDefaultDefinition; +import com.azure.ai.agents.models.MemoryStoreDefaultOptions; +import com.azure.ai.agents.models.MemoryStoreDefinition; +import com.azure.ai.agents.models.MemoryStoreDetails; +import com.azure.ai.agents.models.MemoryStoreUpdateCompletedResult; +import com.azure.ai.agents.models.MemoryStoreUpdateResponse; +import com.azure.ai.agents.models.MemoryStoreUpdateStatus; +import com.azure.ai.agents.models.ResponsesAssistantMessageItemParam; +import com.azure.ai.agents.models.ResponsesUserMessageItemParam; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.HttpClient; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollerFlux; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +import java.util.Arrays; +import java.util.Objects; + +import static com.azure.ai.agents.TestUtils.DISPLAY_NAME_WITH_ARGUMENTS; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class MemoryStoresAsyncTests extends ClientTestBase { + + private static final LongRunningOperationStatus COMPLETED_OPERATION_STATUS + = LongRunningOperationStatus.fromString(MemoryStoreUpdateStatus.COMPLETED.toString(), true); + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.agents.TestUtils#getTestParameters") + public void basicMemoryStoresCrud(HttpClient httpClient, AgentsServiceVersion serviceVersion) { + MemoryStoresAsyncClient memoryStoreClient = getMemoryStoresAsyncClient(httpClient, serviceVersion); + + String memoryStoreName = "my_memory_store_java"; + String initialDescription = "Example memory store for conversations"; + String updatedDescription = "Updated description"; + + String deploymentName = System.getenv("AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME"); + String embeddingDeploymentName = System.getenv("AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME"); + MemoryStoreDefinition definition = new MemoryStoreDefaultDefinition(deploymentName, embeddingDeploymentName); + + Mono<Void> testMono = cleanupBeforeTest(memoryStoreClient, memoryStoreName) + .then(memoryStoreClient.createMemoryStore(memoryStoreName, definition, initialDescription, null) + .flatMap(createdStore -> { + assertNotNull(createdStore); + assertNotNull(createdStore.getId()); + assertEquals(memoryStoreName, createdStore.getName()); + assertEquals(initialDescription, createdStore.getDescription()); + + return memoryStoreClient.getMemoryStore(createdStore.getName()).doOnNext(retrievedStore -> { + assertNotNull(retrievedStore); + assertEquals(createdStore.getId(), retrievedStore.getId()); + assertEquals(createdStore.getName(), retrievedStore.getName()); + assertEquals(createdStore.getDescription(), retrievedStore.getDescription()); + }) + .then(memoryStoreClient.updateMemoryStore(createdStore.getName(), updatedDescription, null)) + .flatMap(updatedStore -> { + assertNotNull(updatedStore); + assertEquals(createdStore.getId(), updatedStore.getId()); + assertEquals(createdStore.getName(), updatedStore.getName()); + assertEquals(updatedDescription, updatedStore.getDescription()); + + return memoryStoreClient.listMemoryStores(10, ListAgentsRequestOrder.DESC, null, null) + .collectList() + .doOnNext(stores -> { + assertNotNull(stores); + boolean found = false; + for (MemoryStoreDetails store : stores) { + assertNotNull(store.getId()); + assertNotNull(store.getName()); + if (store.getName().equals(updatedStore.getName())) { + found = true; + assertEquals(updatedStore.getId(), store.getId()); + assertEquals(updatedDescription, store.getDescription()); + } + } + assertTrue(found, "Created memory store not found in list."); + }) + .then(memoryStoreClient.deleteMemoryStore(updatedStore.getName()) + .doOnNext(deleteResponse -> { + assertNotNull(deleteResponse); + assertTrue(deleteResponse.isDeleted()); + })) + .then(memoryStoreClient.getMemoryStore(updatedStore.getName()) + .flatMap(ignored -> Mono.<Void>error(new AssertionError( + "Expected ResourceNotFoundException when retrieving deleted store."))) + .onErrorResume(ResourceNotFoundException.class, ex -> Mono.empty())) + .then(); + }); + })); + + StepVerifier.create(testMono).verifyComplete(); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.agents.TestUtils#getTestParameters") + public void basicMemoryStores(HttpClient httpClient, AgentsServiceVersion serviceVersion) { + MemoryStoresAsyncClient memoryStoreClient = getMemoryStoresAsyncClient(httpClient, serviceVersion); + + String memoryStoreName = "my_memory_store"; + String description = "Example memory store for conversations"; + String scope = "user_123"; + String userMessageContent = "I prefer dark roast coffee and usually drink it in the morning"; + String queryMessageContent = "What are my coffee preferences?"; + + String deploymentName = System.getenv("AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME"); + String embeddingDeploymentName = System.getenv("AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME"); + MemoryStoreDefaultDefinition definition + = new MemoryStoreDefaultDefinition(deploymentName, embeddingDeploymentName); + definition.setOptions(new MemoryStoreDefaultOptions(true, true)); + + ResponsesUserMessageItemParam userMessage + = new ResponsesUserMessageItemParam(BinaryData.fromString(userMessageContent)); + ResponsesUserMessageItemParam queryMessage + = new ResponsesUserMessageItemParam(BinaryData.fromString(queryMessageContent)); + MemorySearchOptions searchOptions = new MemorySearchOptions(); + searchOptions.setMaxMemories(5); + + Mono<Void> testMono = cleanupBeforeTest(memoryStoreClient, memoryStoreName).then( + memoryStoreClient.createMemoryStore(memoryStoreName, definition, description, null).flatMap(memoryStore -> { + assertNotNull(memoryStore); + assertNotNull(memoryStore.getId()); + assertEquals(memoryStoreName, memoryStore.getName()); + assertEquals(description, memoryStore.getDescription()); + + return waitForUpdateCompletion( + memoryStoreClient.beginUpdateMemories(memoryStoreName, scope, Arrays.asList(userMessage), null, 1)) + .doOnNext(updateResult -> { + assertNotNull(updateResult); + assertNotNull(updateResult.getMemoryOperations()); + assertFalse(updateResult.getMemoryOperations().isEmpty()); + for (MemoryOperation operation : updateResult.getMemoryOperations()) { + assertNotNull(operation.getKind()); + assertNotNull(operation.getMemoryItem().getMemoryId()); + assertNotNull(operation.getMemoryItem().getContent()); + } + }) + .then(memoryStoreClient + .searchMemories(memoryStoreName, scope, Arrays.asList(queryMessage), null, searchOptions) + .doOnNext(searchResponse -> { + assertNotNull(searchResponse); + assertNotNull(searchResponse.getMemories()); + assertFalse(searchResponse.getMemories().isEmpty()); + for (MemorySearchItem memory : searchResponse.getMemories()) { + assertNotNull(memory.getMemoryItem().getMemoryId()); + assertNotNull(memory.getMemoryItem().getContent()); + } + })) + .then(memoryStoreClient.deleteScope(memoryStoreName, scope) + .doOnNext(deleteScopeResponse -> assertNotNull(deleteScopeResponse))) + .then(memoryStoreClient.deleteMemoryStore(memoryStoreName).doOnNext(deleteResponse -> { + assertNotNull(deleteResponse); + assertTrue(deleteResponse.isDeleted()); + })) + .then(); + })); + + StepVerifier.create(testMono).verifyComplete(); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.agents.TestUtils#getTestParameters") + public void advancedMemoryStores(HttpClient httpClient, AgentsServiceVersion serviceVersion) { + MemoryStoresAsyncClient memoryStoreClient = getMemoryStoresAsyncClient(httpClient, serviceVersion); + + String memoryStoreName = "my_memory_store"; + String description = "Example memory store for conversations"; + String scope = "user_123"; + String firstMessageContent = "I prefer dark roast coffee and usually drink it in the morning"; + String chainedMessageContent = "I also like cappuccinos in the afternoon"; + String queryMessageContent = "What are my morning coffee preferences?"; + String followupContextContent = "You previously indicated a preference for dark roast coffee in the morning."; + String followupQuestionContent = "What about afternoon?"; + + String deploymentName = System.getenv("AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME"); + String embeddingDeploymentName = System.getenv("AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME"); + + MemoryStoreDefaultOptions options = new MemoryStoreDefaultOptions(true, true); + options.setUserProfileDetails("Preferences and interests relevant to coffee expert agent"); + + MemoryStoreDefaultDefinition definition + = new MemoryStoreDefaultDefinition(deploymentName, embeddingDeploymentName); + definition.setOptions(options); + + ResponsesUserMessageItemParam initialMessage + = new ResponsesUserMessageItemParam(BinaryData.fromString(firstMessageContent)); + ResponsesUserMessageItemParam chainedMessage + = new ResponsesUserMessageItemParam(BinaryData.fromString(chainedMessageContent)); + ResponsesUserMessageItemParam searchQuery + = new ResponsesUserMessageItemParam(BinaryData.fromString(queryMessageContent)); + ResponsesAssistantMessageItemParam agentMessage + = new ResponsesAssistantMessageItemParam(BinaryData.fromString(followupContextContent)); + ResponsesUserMessageItemParam followupQuery + = new ResponsesUserMessageItemParam(BinaryData.fromString(followupQuestionContent)); + + MemorySearchOptions searchOptions = new MemorySearchOptions(); + searchOptions.setMaxMemories(5); + + Mono<Void> testMono = cleanupBeforeTest(memoryStoreClient, memoryStoreName).then( + memoryStoreClient.createMemoryStore(memoryStoreName, definition, description, null).flatMap(memoryStore -> { + assertNotNull(memoryStore); + assertEquals(memoryStoreName, memoryStore.getName()); + + PollerFlux<MemoryStoreUpdateResponse, MemoryStoreUpdateCompletedResult> initialPoller + = memoryStoreClient.beginUpdateMemories(memoryStoreName, scope, Arrays.asList(initialMessage), null, + 300); + + Mono<String> initialUpdateIdMono + = initialPoller.next().map(AsyncPollResponse::getValue).map(response -> { + assertNotNull(response); + String updateId = response.getUpdateId(); + assertNotNull(updateId); + return updateId; + }); + + return initialUpdateIdMono.flatMap( + initialUpdateId -> waitForUpdateCompletion(memoryStoreClient.beginUpdateMemories(memoryStoreName, + scope, Arrays.asList(chainedMessage), initialUpdateId, 0)).doOnNext(updateResult -> { + assertNotNull(updateResult); + assertNotNull(updateResult.getMemoryOperations()); + assertFalse(updateResult.getMemoryOperations().isEmpty()); + for (MemoryOperation operation : updateResult.getMemoryOperations()) { + assertNotNull(operation.getKind()); + assertNotNull(operation.getMemoryItem().getMemoryId()); + assertNotNull(operation.getMemoryItem().getContent()); + } + }) + .then(memoryStoreClient + .searchMemories(memoryStoreName, scope, Arrays.asList(searchQuery), null, searchOptions) + .flatMap(searchResponse -> { + assertNotNull(searchResponse); + assertNotNull(searchResponse.getMemories()); + assertFalse(searchResponse.getMemories().isEmpty()); + for (MemorySearchItem memory : searchResponse.getMemories()) { + assertNotNull(memory.getMemoryItem().getMemoryId()); + assertNotNull(memory.getMemoryItem().getContent()); + } + String previousSearchId = searchResponse.getSearchId(); + assertNotNull(previousSearchId); + + return memoryStoreClient + .searchMemories(memoryStoreName, scope, + Arrays.asList(agentMessage, followupQuery), previousSearchId, searchOptions) + .doOnNext(followupSearch -> { + assertNotNull(followupSearch); + assertNotNull(followupSearch.getMemories()); + assertFalse(followupSearch.getMemories().isEmpty()); + for (MemorySearchItem memory : followupSearch.getMemories()) { + assertNotNull(memory.getMemoryItem().getMemoryId()); + assertNotNull(memory.getMemoryItem().getContent()); + } + }); + })) + .then(memoryStoreClient.deleteScope(memoryStoreName, scope) + .doOnNext(deleteScope -> assertNotNull(deleteScope))) + .then(memoryStoreClient.deleteMemoryStore(memoryStoreName).doOnNext(deleteResponse -> { + assertNotNull(deleteResponse); + assertTrue(deleteResponse.isDeleted()); + })) + .then()); + })); + + StepVerifier.create(testMono).verifyComplete(); + } + + private static Mono<Void> cleanupBeforeTest(MemoryStoresAsyncClient memoryStoreClient, String memoryStoreName) { + return memoryStoreClient.deleteMemoryStore(memoryStoreName) + .onErrorResume(ResourceNotFoundException.class, ex -> Mono.empty()) + .then(); + } + + private static Mono<MemoryStoreUpdateCompletedResult> + waitForUpdateCompletion(PollerFlux<MemoryStoreUpdateResponse, MemoryStoreUpdateCompletedResult> pollerFlux) { + Objects.requireNonNull(pollerFlux, "pollerFlux cannot be null"); + return pollerFlux.takeUntil(response -> COMPLETED_OPERATION_STATUS.equals(response.getStatus())) + .last() + .map(AsyncPollResponse::getValue) + .map(response -> { + MemoryStoreUpdateCompletedResult result = response == null ? null : response.getResult(); + if (result == null) { + throw new IllegalStateException("Memory store update did not complete successfully."); + } + return result; + }); + } +} diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/MemoryStoresTests.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/MemoryStoresTests.java new file mode 100644 index 000000000000..bfd10246c8fa --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/MemoryStoresTests.java @@ -0,0 +1,289 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents; + +import com.azure.ai.agents.models.DeleteMemoryStoreResponse; +import com.azure.ai.agents.models.ListAgentsRequestOrder; +import com.azure.ai.agents.models.MemoryOperation; +import com.azure.ai.agents.models.MemorySearchItem; +import com.azure.ai.agents.models.MemorySearchOptions; +import com.azure.ai.agents.models.MemoryStoreDefaultDefinition; +import com.azure.ai.agents.models.MemoryStoreDefaultOptions; +import com.azure.ai.agents.models.MemoryStoreDefinition; +import com.azure.ai.agents.models.MemoryStoreDetails; +import com.azure.ai.agents.models.MemoryStoreSearchResponse; +import com.azure.ai.agents.models.MemoryStoreUpdateCompletedResult; +import com.azure.ai.agents.models.MemoryStoreUpdateResponse; +import com.azure.ai.agents.models.MemoryStoreUpdateStatus; +import com.azure.ai.agents.models.ResponsesAssistantMessageItemParam; +import com.azure.ai.agents.models.ResponsesUserMessageItemParam; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.HttpClient; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.SyncPoller; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import java.util.Arrays; + +import static com.azure.ai.agents.TestUtils.DISPLAY_NAME_WITH_ARGUMENTS; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class MemoryStoresTests extends ClientTestBase { + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.agents.TestUtils#getTestParameters") + public void basicMemoryStoresCrud(HttpClient httpClient, AgentsServiceVersion serviceVersion) { + MemoryStoresClient memoryStoreClient = getMemoryStoresSyncClient(httpClient, serviceVersion); + + String memoryStoreName = "my_memory_store_java"; + String initialDescription = "Example memory store for conversations"; + String updatedDescription = "Updated description"; + + cleanupBeforeTest(memoryStoreClient, memoryStoreName); + + String deploymentName = System.getenv("AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME"); + String embeddingDeploymentName = System.getenv("AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME"); + // Create Memory Store + MemoryStoreDefinition definition = new MemoryStoreDefaultDefinition(deploymentName, embeddingDeploymentName); + + MemoryStoreDetails createdStore + = memoryStoreClient.createMemoryStore(memoryStoreName, definition, initialDescription, null); + + assertNotNull(createdStore); + assertNotNull(createdStore.getId()); + assertEquals(memoryStoreName, createdStore.getName()); + assertEquals(initialDescription, createdStore.getDescription()); + + // Get Memory Store + MemoryStoreDetails retrievedStore = memoryStoreClient.getMemoryStore(createdStore.getName()); + assertNotNull(retrievedStore); + assertEquals(createdStore.getId(), retrievedStore.getId()); + assertEquals(createdStore.getName(), retrievedStore.getName()); + assertEquals(createdStore.getDescription(), retrievedStore.getDescription()); + + // Update Memory Store + MemoryStoreDetails updatedStore + = memoryStoreClient.updateMemoryStore(createdStore.getName(), updatedDescription, null); + assertNotNull(updatedStore); + assertEquals(createdStore.getId(), updatedStore.getId()); + assertEquals(createdStore.getName(), updatedStore.getName()); + assertEquals(updatedDescription, updatedStore.getDescription()); + + // List Memory Stores and ensure the updated one is present + boolean found = false; + for (MemoryStoreDetails store : memoryStoreClient.listMemoryStores(10, ListAgentsRequestOrder.DESC, null, + null)) { + assertNotNull(store.getId()); + assertNotNull(store.getName()); + if (store.getName().equals(updatedStore.getName())) { + found = true; + assertEquals(updatedStore.getId(), store.getId()); + assertEquals(updatedDescription, store.getDescription()); + } + } + assertTrue(found, "Created memory store not found in list."); + + // Delete Memory Store + DeleteMemoryStoreResponse deleteResponse = memoryStoreClient.deleteMemoryStore(updatedStore.getName()); + assertNotNull(deleteResponse); + assertTrue(deleteResponse.isDeleted()); + + // Verify it was deleted + assertThrows(ResourceNotFoundException.class, () -> memoryStoreClient.getMemoryStore(updatedStore.getName())); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.agents.TestUtils#getTestParameters") + public void basicMemoryStores(HttpClient httpClient, AgentsServiceVersion serviceVersion) { + MemoryStoresClient memoryStoreClient = getMemoryStoresSyncClient(httpClient, serviceVersion); + + String memoryStoreName = "my_memory_store"; + String description = "Example memory store for conversations"; + String scope = "user_123"; + String userMessageContent = "I prefer dark roast coffee and usually drink it in the morning"; + String queryMessageContent = "What are my coffee preferences?"; + + // Ensure clean state: delete if it already exists + cleanupBeforeTest(memoryStoreClient, memoryStoreName); + + String deploymentName = System.getenv("AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME"); + String embeddingDeploymentName = System.getenv("AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME"); + // Create Memory Store with options + MemoryStoreDefaultDefinition definition + = new MemoryStoreDefaultDefinition(deploymentName, embeddingDeploymentName); + definition.setOptions(new MemoryStoreDefaultOptions(true, true)); + + MemoryStoreDetails memoryStore + = memoryStoreClient.createMemoryStore(memoryStoreName, definition, description, null); + assertNotNull(memoryStore); + assertNotNull(memoryStore.getId()); + assertEquals(memoryStoreName, memoryStore.getName()); + assertEquals(description, memoryStore.getDescription()); + + // Add memories to the memory store + ResponsesUserMessageItemParam userMessage + = new ResponsesUserMessageItemParam(BinaryData.fromString(userMessageContent)); + // beginUpdateMemories returns a poller + SyncPoller<MemoryStoreUpdateResponse, MemoryStoreUpdateCompletedResult> updatePoller + = memoryStoreClient.beginUpdateMemories(memoryStoreName, scope, Arrays.asList(userMessage), null, 1); + + // Poll for the write end status + LongRunningOperationStatus status = null; + while (status != LongRunningOperationStatus.fromString(MemoryStoreUpdateStatus.COMPLETED.toString(), true)) { + sleep(500); + System.out.println(status); + status = updatePoller.poll().getStatus(); + } + MemoryStoreUpdateCompletedResult updateResult = updatePoller.getFinalResult(); + assertNotNull(updateResult); + assertNotNull(updateResult.getMemoryOperations()); + assertFalse(updateResult.getMemoryOperations().isEmpty()); + for (MemoryOperation operation : updateResult.getMemoryOperations()) { + assertNotNull(operation.getKind()); + assertNotNull(operation.getMemoryItem().getMemoryId()); + assertNotNull(operation.getMemoryItem().getContent()); + } + + // Retrieve memories from the memory store + ResponsesUserMessageItemParam queryMessage + = new ResponsesUserMessageItemParam(BinaryData.fromString(queryMessageContent)); + MemorySearchOptions searchOptions = new MemorySearchOptions(); + searchOptions.setMaxMemories(5); + MemoryStoreSearchResponse searchResponse = memoryStoreClient.searchMemories(memoryStoreName, scope, + Arrays.asList(queryMessage), null, searchOptions); + assertNotNull(searchResponse); + assertNotNull(searchResponse.getMemories()); + assertFalse(searchResponse.getMemories().isEmpty()); + for (MemorySearchItem memory : searchResponse.getMemories()) { + assertNotNull(memory.getMemoryItem().getMemoryId()); + assertNotNull(memory.getMemoryItem().getContent()); + } + + // Delete memories for a specific scope + memoryStoreClient.deleteScope(memoryStoreName, scope); + // No exception means success + + // Delete memory store + DeleteMemoryStoreResponse deleteResponse = memoryStoreClient.deleteMemoryStore(memoryStoreName); + assertNotNull(deleteResponse); + assertTrue(deleteResponse.isDeleted()); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.agents.TestUtils#getTestParameters") + public void advancedMemoryStores(HttpClient httpClient, AgentsServiceVersion serviceVersion) { + MemoryStoresClient memoryStoreClient = getMemoryStoresSyncClient(httpClient, serviceVersion); + + String memoryStoreName = "my_memory_store"; + String description = "Example memory store for conversations"; + String scope = "user_123"; + String firstMessageContent = "I prefer dark roast coffee and usually drink it in the morning"; + String chainedMessageContent = "I also like cappuccinos in the afternoon"; + String queryMessageContent = "What are my morning coffee preferences?"; + String followupContextContent = "You previously indicated a preference for dark roast coffee in the morning."; + String followupQuestionContent = "What about afternoon?"; + + cleanupBeforeTest(memoryStoreClient, memoryStoreName); + + String deploymentName = System.getenv("AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME"); + String embeddingDeploymentName = System.getenv("AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME"); + + MemoryStoreDefaultOptions options = new MemoryStoreDefaultOptions(true, true); + options.setUserProfileDetails("Preferences and interests relevant to coffee expert agent"); + + MemoryStoreDefaultDefinition definition + = new MemoryStoreDefaultDefinition(deploymentName, embeddingDeploymentName); + definition.setOptions(options); + + MemoryStoreDetails memoryStore + = memoryStoreClient.createMemoryStore(memoryStoreName, definition, description, null); + assertNotNull(memoryStore); + assertEquals(memoryStoreName, memoryStore.getName()); + + ResponsesUserMessageItemParam initialMessage + = new ResponsesUserMessageItemParam(BinaryData.fromString(firstMessageContent)); + SyncPoller<MemoryStoreUpdateResponse, MemoryStoreUpdateCompletedResult> initialPoller + = memoryStoreClient.beginUpdateMemories(memoryStoreName, scope, Arrays.asList(initialMessage), null, 300); + + MemoryStoreUpdateResponse initialResponse = initialPoller.poll().getValue(); + assertNotNull(initialResponse); + String initialUpdateId = initialResponse.getUpdateId(); + assertNotNull(initialUpdateId); + + ResponsesUserMessageItemParam chainedMessage + = new ResponsesUserMessageItemParam(BinaryData.fromString(chainedMessageContent)); + SyncPoller<MemoryStoreUpdateResponse, MemoryStoreUpdateCompletedResult> chainedPoller = memoryStoreClient + .beginUpdateMemories(memoryStoreName, scope, Arrays.asList(chainedMessage), initialUpdateId, 0); + + LongRunningOperationStatus chainedStatus = null; + while (chainedStatus + != LongRunningOperationStatus.fromString(MemoryStoreUpdateStatus.COMPLETED.toString(), true)) { + sleep(500); + System.out.println(chainedStatus); + chainedStatus = chainedPoller.poll().getStatus(); + } + MemoryStoreUpdateCompletedResult updateResult = chainedPoller.getFinalResult(); + assertNotNull(updateResult); + assertNotNull(updateResult.getMemoryOperations()); + assertFalse(updateResult.getMemoryOperations().isEmpty()); + for (MemoryOperation operation : updateResult.getMemoryOperations()) { + assertNotNull(operation.getKind()); + assertNotNull(operation.getMemoryItem().getMemoryId()); + assertNotNull(operation.getMemoryItem().getContent()); + } + + ResponsesUserMessageItemParam searchQuery + = new ResponsesUserMessageItemParam(BinaryData.fromString(queryMessageContent)); + MemorySearchOptions searchOptions = new MemorySearchOptions(); + searchOptions.setMaxMemories(5); + + MemoryStoreSearchResponse searchResponse + = memoryStoreClient.searchMemories(memoryStoreName, scope, Arrays.asList(searchQuery), null, searchOptions); + assertNotNull(searchResponse); + assertNotNull(searchResponse.getMemories()); + assertFalse(searchResponse.getMemories().isEmpty()); + for (MemorySearchItem memory : searchResponse.getMemories()) { + assertNotNull(memory.getMemoryItem().getMemoryId()); + assertNotNull(memory.getMemoryItem().getContent()); + } + String previousSearchId = searchResponse.getSearchId(); + assertNotNull(previousSearchId); + + ResponsesAssistantMessageItemParam agentMessage + = new ResponsesAssistantMessageItemParam(BinaryData.fromString(followupContextContent)); + ResponsesUserMessageItemParam followupQuery + = new ResponsesUserMessageItemParam(BinaryData.fromString(followupQuestionContent)); + + MemoryStoreSearchResponse followupSearch = memoryStoreClient.searchMemories(memoryStoreName, scope, + Arrays.asList(agentMessage, followupQuery), previousSearchId, searchOptions); + assertNotNull(followupSearch); + assertNotNull(followupSearch.getMemories()); + assertFalse(followupSearch.getMemories().isEmpty()); + for (MemorySearchItem memory : followupSearch.getMemories()) { + assertNotNull(memory.getMemoryItem().getMemoryId()); + assertNotNull(memory.getMemoryItem().getContent()); + } + + memoryStoreClient.deleteScope(memoryStoreName, scope); + DeleteMemoryStoreResponse deleteResponse = memoryStoreClient.deleteMemoryStore(memoryStoreName); + assertNotNull(deleteResponse); + assertTrue(deleteResponse.isDeleted()); + } + + private static void cleanupBeforeTest(MemoryStoresClient memoryStoreClient, String memoryStoreName) { + // Ensure clean state: delete if it already exists + try { + DeleteMemoryStoreResponse deleteExisting = memoryStoreClient.deleteMemoryStore(memoryStoreName); + assertNotNull(deleteExisting); + } catch (ResourceNotFoundException ex) { + // ok if it does not exist + } + } +} From bd8c064d4e130e8b14c2efead522d2e70270b7f7 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Tue, 2 Dec 2025 15:56:16 +0800 Subject: [PATCH 081/186] fix --- sdk/spring/azure-spring-data-cosmos/pom.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sdk/spring/azure-spring-data-cosmos/pom.xml b/sdk/spring/azure-spring-data-cosmos/pom.xml index 156af3b37992..092e161d48a8 100644 --- a/sdk/spring/azure-spring-data-cosmos/pom.xml +++ b/sdk/spring/azure-spring-data-cosmos/pom.xml @@ -54,12 +54,6 @@ <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-core;external_dependency} --> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> </dependency> <dependency> <groupId>org.springframework</groupId> From dc2e0882cee4d9746944267bae280c092de46f6d Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 2 Dec 2025 12:10:47 -0800 Subject: [PATCH 082/186] Sync eng/common directory with azure-sdk-tools for PR 13005 (#47355) * Add field for Spec Project Path property * Reorder properties * Cleanup * Logging * Move SpecProjectPath into Package-Properties.ps1 * Update SpecProjectPath * Fix accidental removal of $title * Create or update with SpecProjectPath * Revert logic, cannot test * Revert logic, cannot test * Revert irrelevant file * Retain title * Review feedback * Review feedback --------- Co-authored-by: Daniel Jurek <djurek@microsoft.com> --- .../scripts/Helpers/DevOps-WorkItem-Helpers.ps1 | 16 +++++++++++++++- eng/common/scripts/Package-Properties.ps1 | 11 +++++++++++ eng/common/scripts/Save-Package-Properties.ps1 | 1 + eng/common/scripts/Validate-All-Packages.ps1 | 3 ++- 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 index 0c442a16c7b6..a18aaaeb6d22 100644 --- a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 +++ b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 @@ -268,6 +268,7 @@ function FindPackageWorkItem($lang, $packageName, $version, $outputCommand = $tr $fields += "Custom.Generated" $fields += "Custom.RoadmapState" $fields += "Microsoft.VSTS.Common.StateChangeDate" + $fields += "Custom.SpecProjectPath" $fieldList = ($fields | ForEach-Object { "[$_]"}) -join ", " $query = "SELECT ${fieldList} FROM WorkItems WHERE [Work Item Type] = 'Package'" @@ -516,6 +517,7 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte $pkgType = $pkg.Type $pkgNewLibrary = $pkg.New $pkgRepoPath = $pkg.RepoPath + $specProjectPath = $pkg.SpecProjectPath $serviceName = $pkg.ServiceName $title = $lang + " - " + $pkg.DisplayName + " - " + $verMajorMinor @@ -1256,7 +1258,8 @@ function Update-DevOpsReleaseWorkItem { [string]$packageNewLibrary = "true", [string]$relatedWorkItemId = $null, [string]$tag = $null, - [bool]$inRelease = $true + [bool]$inRelease = $true, + [string]$specProjectPath = "" ) if (!(Get-Command az -ErrorAction SilentlyContinue)) { @@ -1280,6 +1283,7 @@ function Update-DevOpsReleaseWorkItem { RepoPath = $packageRepoPath Type = $packageType New = $packageNewLibrary + SpecProjectPath = $specProjectPath }; if (!$plannedDate) { @@ -1326,6 +1330,16 @@ function Update-DevOpsReleaseWorkItem { } $updatedWI = UpdatePackageVersions $workItem -plannedVersions $plannedVersions + if ((!$workItem.fields.ContainsKey('Custom.SpecProjectPath') -and $packageInfo.SpecProjectPath) -or + ($workItem.fields.ContainsKey('Custom.SpecProjectPath') -and ($workItem.fields['Custom.SpecProjectPath'] -ne $packageInfo.SpecProjectPath)) + ) { + Write-Host "Updating SpecProjectPath to '$($packageInfo.SpecProjectPath)' for work item [$($workItem.id)]" + UpdateWorkItem ` + -id $workItem.id ` + -fields "`"Custom.SpecProjectPath=$($packageInfo.SpecProjectPath)`"" ` + -outputCommand $false + } + Write-Host "Release tracking item is at https://dev.azure.com/azure-sdk/Release/_workitems/edit/$($updatedWI.id)/" return $true } diff --git a/eng/common/scripts/Package-Properties.ps1 b/eng/common/scripts/Package-Properties.ps1 index 0142017c8468..930602444fdb 100644 --- a/eng/common/scripts/Package-Properties.ps1 +++ b/eng/common/scripts/Package-Properties.ps1 @@ -22,6 +22,10 @@ class PackageProps { [HashTable]$ArtifactDetails [HashTable]$CIParameters + # Path from root of azure-rest-api-specs repo to spec project (read from + # tsp-location.yaml if it exists in the package directory) + [string]$SpecProjectPath + PackageProps([string]$name, [string]$version, [string]$directoryPath, [string]$serviceDirectory) { $this.Initialize($name, $version, $directoryPath, $serviceDirectory) } @@ -61,6 +65,13 @@ class PackageProps { $this.ChangeLogPath = $null } + if (Test-Path (Join-Path $directoryPath 'tsp-location.yaml')) { + $tspLocation = LoadFrom-Yaml (Join-Path $directoryPath 'tsp-location.yaml') + if ($tspLocation -and $tspLocation.directory) { + $this.SpecProjectPath = $tspLocation.directory + } + } + $this.CIParameters = @{"CIMatrixConfigs" = @()} $this.InitializeCIArtifacts() } diff --git a/eng/common/scripts/Save-Package-Properties.ps1 b/eng/common/scripts/Save-Package-Properties.ps1 index 0db23f276b96..7734f9ec3cba 100644 --- a/eng/common/scripts/Save-Package-Properties.ps1 +++ b/eng/common/scripts/Save-Package-Properties.ps1 @@ -144,6 +144,7 @@ foreach ($pkg in $allPackageProperties) if (-not [System.String]::IsNullOrEmpty($pkg.Group)) { Write-Host "GroupId: $($pkg.Group)" } + Write-Host "Spec Project Path: $($pkg.SpecProjectPath)" Write-Host "Release date: $($pkg.ReleaseStatus)" $configFilePrefix = $pkg.Name diff --git a/eng/common/scripts/Validate-All-Packages.ps1 b/eng/common/scripts/Validate-All-Packages.ps1 index ab65e1d4bdbd..a247ec3b5110 100644 --- a/eng/common/scripts/Validate-All-Packages.ps1 +++ b/eng/common/scripts/Validate-All-Packages.ps1 @@ -155,7 +155,8 @@ function CreateUpdatePackageWorkItem($pkgInfo) -packageNewLibrary $pkgInfo.IsNewSDK ` -serviceName "unknown" ` -packageDisplayName "unknown" ` - -inRelease $IsReleaseBuild + -inRelease $IsReleaseBuild ` + -specProjectPath $pkgInfo.SpecProjectPath if (-not $result) { From 8d2b0b011722820160d2c929d10870198c69a68e Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty <abhmohanty@microsoft.com> Date: Tue, 2 Dec 2025 17:15:43 -0500 Subject: [PATCH 083/186] Avoid `NullPointerException` when x-region calls are made under high concurrency when using region scoped session container. (#46758) * Make session container and bloom filter insertions atomic. * Make session container and bloom filter insertions atomic. * Make session container and bloom filter insertions atomic. * Fixing tests. * Ensure once a global session is used to not go back to using region-scoped session tokens. * Ensure once a global session is used to not go back to using region-scoped session tokens. * Ensure bloom filter is updated atomically with session container update. * Add a test which concurrently updates and reads from the RegionScopedSessionContainer which "occasional" cross region calls. * Fixing tests. * Clean up PR. * Add user-agent suffix and try-catch block in PartitionScopedRegionLevelProgress. * Track globalLsn progress when hub region is seen in bloom filter. * Centralize fallback to global session token flows and introduce use hub flow. * Fixing baseSessionToken resolution flow. * Enhancing RegionScopedSessionContainerConcurrencyTest to make lsns decrease from service perspective yet session token resolutions client-side should be monotonically increasing. * Enhancing RegionScopedSessionContainerConcurrencyTest to make lsns decrease from service perspective yet session token resolutions client-side should be monotonically increasing. * Enhancing RegionScopedSessionContainerConcurrencyTest to make lsns decrease from service perspective yet session token resolutions client-side should be monotonically increasing. * Add license header. * Fixing compilation errors. * Addressing review comments. * Addressing review comments. * Addressing review comments. * Updating CHANGELOG.md --- ...ScopedSessionContainerConcurrencyTest.java | 639 ++++++++++++++++++ .../RegionScopedSessionContainerTest.java | 4 +- sdk/cosmos/azure-cosmos/CHANGELOG.md | 1 + .../cosmos/implementation/HttpConstants.java | 1 + .../PartitionScopedRegionLevelProgress.java | 619 +++++++++++------ .../RegionScopedSessionContainer.java | 153 ++--- .../implementation/RxDocumentClientImpl.java | 4 + .../implementation/SessionTokenHelper.java | 42 +- .../implementation/UserAgentFeatureFlags.java | 3 +- 9 files changed, 1119 insertions(+), 347 deletions(-) create mode 100644 sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RegionScopedSessionContainerConcurrencyTest.java diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RegionScopedSessionContainerConcurrencyTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RegionScopedSessionContainerConcurrencyTest.java new file mode 100644 index 000000000000..2512f9bd3508 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RegionScopedSessionContainerConcurrencyTest.java @@ -0,0 +1,639 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation; + +import com.azure.cosmos.GatewayTestUtils; +import com.azure.cosmos.implementation.apachecommons.collections.list.UnmodifiableList; +import com.azure.cosmos.implementation.guava25.collect.ImmutableList; +import com.azure.cosmos.implementation.routing.RegionalRoutingContext; +import com.azure.cosmos.models.ModelBridgeInternal; +import com.azure.cosmos.models.PartitionKey; +import com.azure.cosmos.models.PartitionKeyDefinition; +import org.mockito.Mockito; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.Callable; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Phaser; +import java.util.concurrent.ThreadLocalRandom; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; + +import static com.azure.cosmos.implementation.TestUtils.mockDiagnosticsClientContext; +import static org.assertj.core.api.Fail.fail; + +public class RegionScopedSessionContainerConcurrencyTest { + + private static final Logger logger = LoggerFactory.getLogger(RegionScopedSessionContainerConcurrencyTest.class); + + private static final URI EAST_US = createUrl("https://concurrency-east-us.documents.azure.com"); + private static final URI EAST_US2 = createUrl("https://concurrency-east-us-2.documents.azure.com"); + private static final URI CENTRAL_US = createUrl("https://concurrency-central-us.documents.azure.com"); + private static final String REGION_EAST_US = "eastus"; + private static final String REGION_EAST_US2 = "eastus2"; + private static final String REGION_CENTRAL_US = "centralus"; + + private static final String COLLECTION_FULL_NAME = "dbs/db1/colls1/collConcurrency"; + + // Use known-good collection rid from other unit tests (was uf4PAK6T-Cw=) + private static final String COLLECTION_RID = "uf4PAK6T-Cw="; + + // Flag: if true we include OWNER_ID header; if false rely solely on OWNER_FULL_NAME + private static final boolean INCLUDE_OWNER_ID = true; + + private static final int NUM_PK_RANGES = 5000; + private static final String[] PK_RANGE_IDS; + static { + PK_RANGE_IDS = new String[NUM_PK_RANGES]; + for (int i = 0; i < NUM_PK_RANGES; i++) { + PK_RANGE_IDS[i] = "range_" + i; + } + } + + private static final int REGION_ID_SATELLITE_ONE = 2; + private static final int REGION_ID_SATELLITE_TWO = 7; + private static final double REGRESSION_EMISSION_PROBABILITY = 0.05; + private static final long REGRESSION_MAX_DELTA = 10; + + @DataProvider + public Object[][] concurrentSetAndResolveTokensDataArgs() { + return new Object[][] { + // For small expected insertion counts, the bloom filter is more likely to have false positives + // which increases the likelihood of region-specific LSNs to not be present in the region-scoped session container + // This increases the likelihood of the global session token to be resolved + { + "Low expected insertion count => more false positives => more global session token resolutions", + "1000", // bloomFilterExpectedInsertionCount + "0.1", // bloomFilterExpectedFfpRate + new URI[] { EAST_US, EAST_US2, CENTRAL_US }, + 0.5, + 5000, + 5000 + }, + { + "Low expected insertion count => more false positives => more global session token resolutions", + "1000", // bloomFilterExpectedInsertionCount + "0.1", // bloomFilterExpectedFfpRate + new URI[] { EAST_US2, EAST_US, CENTRAL_US }, + 0.5, + 5000, + 5000 + }, + { + "Low expected insertion count => more false positives => more global session token resolutions", + "1000", // bloomFilterExpectedInsertionCount + "0.1", // bloomFilterExpectedFfpRate + new URI[] { EAST_US2, CENTRAL_US, EAST_US }, + 0.5, + 5000, + 5000 + }, + { + "High expected insertion count => less false positives => more region-specific session token resolutions", + "1000000", // bloomFilterExpectedInsertionCount + "0.001", // bloomFilterExpectedFfpRate + new URI[] { EAST_US2, CENTRAL_US, EAST_US }, + 0.5, + 5000, + 5000 + }, + { + "High expected insertion count => less false positives => more region-specific session token resolutions", + "1000000", // bloomFilterExpectedInsertionCount + "0.001", // bloomFilterExpectedFfpRate + new URI[] { EAST_US, EAST_US2, CENTRAL_US }, + 0.5, + 5000, + 5000 + }, + }; + } + + /** + * Stress / correctness test for {@link RegionScopedSessionContainer} exercising concurrent + * {@code setSessionToken} (writers) and {@code resolvePartitionLocalSessionToken} (readers) + * across a large fan-out of physical partition key range ids and multiple region orderings. + * <p> + * The test is parameterized via a TestNG {@code @DataProvider}; each invocation ("profile") + * may vary: + * <ul> + * <li>Bloom filter sizing (expected insertion count & false positive probability)</li> + * <li>Endpoint ordering (first element treated as the "primary" for probabilistic routing)</li> + * <li>Probability of routing to a non-primary region</li> + * <li>Number of writer iterations (synthetic writes)</li> + * <li>Number of simulated physical partition key ranges</li> + * </ul> + * + * <h3>Key Behaviors Simulated</h3> + * <ul> + * <li>Writers emit synthetic vector session tokens for each partition range in round-robin fashion.</li> + * <li>Each token includes a global LSN and two region-local LSN components (satellite regions), + * with a small probability of <em>emitting a regressed (lower) value</em> to mimic out-of-order + * or stale arrivals (the container must still maintain monotonic visibility on resolution).</li> + * <li>Readers continuously resolve local partition session tokens from randomly (skew) selected regions, + * buffering observations per-partition and enforcing in-order application via a per-range + * sequence + gap-buffer (OrderedApplier) to avoid false regression assertions due to + * thread interleaving.</li> + * <li>Bloom filter parameters influence whether region-scoped session tokens or global tokens + * are resolved (higher false positive rate → more fallbacks / global resolutions).</li> + * </ul> + * + * <h3>Invariants Asserted Per Physical Partition (pkRangeId)</h3> + * <ul> + * <li>Observed (resolved) global LSN never decreases.</li> + * <li>Observed satellite region local LSNs (Region IDs {@code REGION_ID_SATELLITE_ONE} and + * {@code REGION_ID_SATELLITE_TWO}) never decrease.</li> + * <li>At least one token was written (first write recorded).</li> + * <li>At least one token was eventually observed by a reader.</li> + * </ul> + * + * <h3>Ordering Strategy</h3> + * Resolved tokens are not asserted immediately. Instead each successful resolve gets a strictly + * increasing per-partition sequence number; records are stored in a concurrent buffer and applied + * only when all prior sequences have been applied, ensuring logical (resolve) order and eliminating + * spurious monotonicity failures caused by racing reader threads. + * + * <h3>Regression Injection</h3> + * A small configurable probability (see constants {@code REGRESSION_EMISSION_PROBABILITY} and + * {@code REGRESSION_MAX_DELTA}) causes writers to emit artificially "regressed" (older) global + * or local LSN values. The container is expected to merge via max semantics so that externally + * resolved tokens still exhibit monotonic progression; any decrease detected after ordered + * application constitutes a real bug in session token capture/merge. + * + * <h3>Failure Modes</h3> + * The test fails fast with descriptive messages if: + * <ul> + * <li>Any per-partition monotonic LSN invariant is violated.</li> + * <li>Writers do not finish within the allotted timeout.</li> + * <li>No token is ever written or observed for a given partition range.</li> + * <li>Unhandled exceptions occur in writer or reader tasks (first one surfaced).</li> + * </ul> + * + * <h3>Resource & Runtime Notes</h3> + * <ul> + * <li>High CPU thread counts (split between writers and readers) can make this test + * expensive; adjust {@code iterationsPerWriter} or {@code numPkRanges} for a lighter profile.</li> + * <li>Bloom filter system properties are set before each profile run and cleared in {@code finally}.</li> + * <li>Logging includes profile parameters and counts of emitted regressions to aid diagnosis.</li> + * </ul> + * + * <h3>Thread Safety & Concurrency Constructs</h3> + * <ul> + * <li>{@link Phaser} acts as a one-time start gate (all worker threads begin simultaneously).</li> + * <li>{@link CountDownLatch} tracks completion of all writers.</li> + * <li>{@link java.util.concurrent.atomic.AtomicLong} arrays hold per-partition max LSN state.</li> + * <li>Ordered application uses a gap-buffer + CAS on a {@code nextToApply} counter.</li> + * </ul> + * + * <h3>Parameters (from DataProvider)</h3> + * @param profileName human-readable name describing this parameter set (appears in logs / failure messages) + * @param bloomFilterExpectedInsertionCount expected element count used to size the partition/region Bloom filter (affects false positive rate) + * @param bloomFilterExpectedFfpRate target (approximate) Bloom filter false positive rate (string form for direct system property injection) + * @param orderedReadEndpoints array of region endpoints; index 0 is treated as the primary for skewed routing probability calculations + * @param nonPrimaryRegionProbability probability (0.0–1.0) that a request (read or write) is routed to a non-primary endpoint + * @param iterationsPerWriter number of synthetic write iterations per writer thread (each iteration targets one partition range) + * @param numPkRanges number of simulated physical partition key range ids (fan-out); higher values increase concurrency stress + * + * @throws Exception on unexpected execution failures or if assertions / invariants fail + * + * @implNote Sets and clears system properties + * {@code COSMOS.PK_BASED_BLOOM_FILTER_EXPECTED_INSERTION_COUNT} and + * {@code COSMOS.PK_BASED_BLOOM_FILTER_EXPECTED_FFP_RATE} per invocation. + * Emitted regressions are counted but not asserted for minimum quantity (can be added if needed). + * + * @see RegionScopedSessionContainer + * @see com.azure.cosmos.implementation.ISessionToken + */ + @Test(groups = "unit", dataProvider = "concurrentSetAndResolveTokensDataArgs") + public void concurrentSetAndResolveTokens(String profileName, + String bloomFilterExpectedInsertionCount, + String bloomFilterExpectedFfpRate, + URI[] orderedReadEndpoints, + double nonPrimaryRegionProbability, + int iterationsPerWriter, + int numPkRanges) throws Exception { + + logger.info("Starting profile=[{}] bloomInsertionCount=[{}] bloomFpp=[{}] endpoints=[{}] nonPrimaryProb=[{}] iterationsPerWriter=[{}] numPkRanges=[{}]", + profileName, + bloomFilterExpectedInsertionCount, + bloomFilterExpectedFfpRate, + Arrays.toString(orderedReadEndpoints), + nonPrimaryRegionProbability, + iterationsPerWriter, + numPkRanges); + + System.setProperty("COSMOS.PK_BASED_BLOOM_FILTER_EXPECTED_INSERTION_COUNT", bloomFilterExpectedInsertionCount); + System.setProperty("COSMOS.PK_BASED_BLOOM_FILTER_EXPECTED_FFP_RATE", bloomFilterExpectedFfpRate); + + final Duration TEST_TIMEOUT = Duration.ofSeconds(120); + + GlobalEndpointManager globalEndpointManagerMock = Mockito.mock(GlobalEndpointManager.class); + RegionScopedSessionContainer regionScopedSessionContainer = + new RegionScopedSessionContainer("127.0.0.1", false, globalEndpointManagerMock); + + // Build endpoints per ordering + ImmutableList.Builder<RegionalRoutingContext> endpointBuilder = ImmutableList.builder(); + for (URI u : orderedReadEndpoints) { + endpointBuilder.add(new RegionalRoutingContext(u)); + } + UnmodifiableList<RegionalRoutingContext> endpoints = + new UnmodifiableList<>(endpointBuilder.build()); + + Mockito.when(globalEndpointManagerMock.getReadEndpoints()).thenReturn(endpoints); + Mockito.when(globalEndpointManagerMock.getRegionName(Mockito.eq(EAST_US), Mockito.any())) + .thenReturn(REGION_EAST_US); + Mockito.when(globalEndpointManagerMock.getRegionName(Mockito.eq(EAST_US2), Mockito.any())) + .thenReturn(REGION_EAST_US2); + Mockito.when(globalEndpointManagerMock.getRegionName(Mockito.eq(CENTRAL_US), Mockito.any())) + .thenReturn(REGION_CENTRAL_US); + Mockito.when(globalEndpointManagerMock.canUseMultipleWriteLocations(Mockito.any())).thenReturn(true); + + int totalCores = Configs.getCPUCnt(); + final int WRITER_THREADS = totalCores / 2; + final int READER_THREADS = totalCores / 2; + + ExecutorService exec = Executors.newFixedThreadPool(WRITER_THREADS + READER_THREADS); + ConcurrentLinkedQueue<Throwable> errors = new ConcurrentLinkedQueue<>(); + Phaser startBarrier = new Phaser(1 + WRITER_THREADS + READER_THREADS); + CountDownLatch writersDone = new CountDownLatch(WRITER_THREADS); + + AtomicLong[] maxObservedGlobal = new AtomicLong[NUM_PK_RANGES]; + AtomicLong[] maxObservedLocalLsnSatelliteOne = new AtomicLong[NUM_PK_RANGES]; + AtomicLong[] maxObservedLocalLsnSatelliteTwo = new AtomicLong[NUM_PK_RANGES]; + boolean[] firstWritten = new boolean[NUM_PK_RANGES]; + OrderedApplier[] orderedAppliers = new OrderedApplier[NUM_PK_RANGES]; + PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition().setPaths(ImmutableList.of("/mypk")); + + // NEW: per-range sequence generators (only for successful resolves) and ordered appliers + AtomicLong[] sequenceGenerators = new AtomicLong[NUM_PK_RANGES]; + + AtomicInteger globalLsnRegressionsCount = new AtomicInteger(); + AtomicInteger satelliteOneLocalLsnRegressionsCount = new AtomicInteger(); + AtomicInteger satelliteTwoLocalLsnRegressionsCount = new AtomicInteger(); + + try { + + // Starting state of lsn (global and regional) is -1 (no token) + // Sequence generators help enforce in-order application of observed tokens + for (int i = 0; i < NUM_PK_RANGES; i++) { + maxObservedGlobal[i] = new AtomicLong(-1); + maxObservedLocalLsnSatelliteOne[i] = new AtomicLong(-1); + maxObservedLocalLsnSatelliteTwo[i] = new AtomicLong(-1); + sequenceGenerators[i] = new AtomicLong(0); + orderedAppliers[i] = new OrderedApplier( + i, + maxObservedGlobal, + maxObservedLocalLsnSatelliteOne, + maxObservedLocalLsnSatelliteTwo + ); + } + + // Each writer writes to all ranges in round-robin fashion for x iterations + // Each write uses a random region (skewed towards default region) + // Each write increments global LSN by 1 and region-specific LSNs by either 0 or 1 + // Each reader randomly reads all ranges in a loop until writers done + // Each read uses a random region (skewed towards default region) + // Each read resolves the token and records observed LSNs (global and region-specific) + // Finally, after writers done, readers do one more sweep of all ranges to resolve any + // tokens that may not have been observed, yet + // Finally we check that for each range the observed LSNs never decreased (globally and regionally) + for (int w = 0; w < WRITER_THREADS; w++) { + final int writerIndex = w; + exec.submit(wrap(errors, () -> { + startBarrier.arriveAndAwaitAdvance(); + long version = 1; + long baseOffset = writerIndex * 10_000_000L; + for (int iter = 1; iter <= iterationsPerWriter; iter++) { + int pkIdx = (iter - 1) % NUM_PK_RANGES; + String pkRangeId = PK_RANGE_IDS[pkIdx]; + + RxDocumentServiceRequest writeRequest = RxDocumentServiceRequest.create( + mockDiagnosticsClientContext(), OperationType.Create, ResourceType.Document, + COLLECTION_FULL_NAME + "/docs", Utils.getUTF8Bytes("payload"), new HashMap<>()); + writeRequest.requestContext.regionalRoutingContextToRoute = chooseRegionWithSkew(endpoints, nonPrimaryRegionProbability); + + PartitionKeyRange pkRange = new PartitionKeyRange(); + pkRange.setId(pkRangeId); + GatewayTestUtils.setParent(pkRange, ImmutableList.of()); + writeRequest.requestContext.resolvedPartitionKeyRange = pkRange; + + // Consistency of mapping crucial PK should always map to same PK Range ID. + writeRequest.setPartitionKeyInternal(ModelBridgeInternal.getPartitionKeyInternal(new PartitionKey(pkRangeId))); + writeRequest.setPartitionKeyDefinition(partitionKeyDefinition); + + long globalLsn = baseOffset + iter; + long satelliteOneLocalLsn = globalLsn; + long satelliteTwoLocalLsn = globalLsn - (writerIndex % 2); + + long possiblyRegressedGlobalLsn = maybeRegress(globalLsn, REGRESSION_EMISSION_PROBABILITY, REGRESSION_MAX_DELTA, globalLsnRegressionsCount); + long possiblyRegressedSatelliteOneLocalLsn = maybeRegress(satelliteOneLocalLsn, REGRESSION_EMISSION_PROBABILITY, REGRESSION_MAX_DELTA, satelliteOneLocalLsnRegressionsCount); + long possiblyRegressedSatelliteTwoLocalLsn = maybeRegress(satelliteTwoLocalLsn, REGRESSION_EMISSION_PROBABILITY, REGRESSION_MAX_DELTA, satelliteTwoLocalLsnRegressionsCount); + + // assumption: globalLsn always increases (per writer) and region-specific LSNs keep monotonically increasing + // (this test assumes LSNs belonging to the same epoch are always monotonically increasing and therefore assumes there are no service-side regressions) + String vector = buildVectorToken(version, possiblyRegressedGlobalLsn, possiblyRegressedSatelliteOneLocalLsn, possiblyRegressedSatelliteTwoLocalLsn); + String headerValue = pkRangeId + ":" + vector; + + Map<String, String> respHeaders = new HashMap<>(); + respHeaders.put(HttpConstants.HttpHeaders.SESSION_TOKEN, headerValue); + respHeaders.put(HttpConstants.HttpHeaders.OWNER_FULL_NAME, COLLECTION_FULL_NAME); + if (INCLUDE_OWNER_ID) { + respHeaders.put(HttpConstants.HttpHeaders.OWNER_ID, COLLECTION_RID); + } + + regionScopedSessionContainer.setSessionToken(writeRequest, respHeaders); + logger.info(System.currentTimeMillis() + "=>" + "Writer " + writerIndex + " set token for " + pkRangeId + " => " + headerValue); + + if (!firstWritten[pkIdx]) { + firstWritten[pkIdx] = true; + } + + Thread.sleep(1); + } + writersDone.countDown(); + })); + } + + // Readers + for (int r = 0; r < READER_THREADS; r++) { + exec.submit(wrap(errors, () -> { + startBarrier.arriveAndAwaitAdvance(); + while (true) { + for (int pkIdx = 0; pkIdx < NUM_PK_RANGES; pkIdx++) { + String pkRangeId = PK_RANGE_IDS[pkIdx]; + + RxDocumentServiceRequest readRequest = RxDocumentServiceRequest.create( + mockDiagnosticsClientContext(), OperationType.Read, ResourceType.Document, + COLLECTION_FULL_NAME + "/docs/doc1", new HashMap<>()); + readRequest.requestContext.regionalRoutingContextToRoute = chooseRegionWithSkew(endpoints, nonPrimaryRegionProbability); + + PartitionKeyRange pkRange = new PartitionKeyRange(); + pkRange.setId(pkRangeId); + GatewayTestUtils.setParent(pkRange, ImmutableList.of()); + readRequest.requestContext.resolvedPartitionKeyRange = pkRange; + + // Consistency of mapping crucial PK should always map to same PK Range ID. + readRequest.setPartitionKeyInternal(ModelBridgeInternal.getPartitionKeyInternal(new PartitionKey(pkRangeId))); + readRequest.setPartitionKeyDefinition(partitionKeyDefinition); + + long sequence = sequenceGenerators[pkIdx].getAndIncrement(); + ISessionToken sessionToken = regionScopedSessionContainer.resolvePartitionLocalSessionToken(readRequest, pkRangeId); + + if (sessionToken != null) { + orderedAppliers[pkIdx].submit(sequence, sessionToken); + } + } + + // There is a possibility that for some ranges no read happened after the last write + // So after writers are done, we do one final sweep of all ranges to pick any + // read stragglers + if (writersDone.getCount() == 0) { + // Single final sweep + for (int pkIdx = 0; pkIdx < NUM_PK_RANGES; pkIdx++) { + String pkRangeId = PK_RANGE_IDS[pkIdx]; + RxDocumentServiceRequest finalRead = RxDocumentServiceRequest.create( + mockDiagnosticsClientContext(), OperationType.Read, ResourceType.Document, + COLLECTION_FULL_NAME + "/docs/doc1", new HashMap<>()); + finalRead.requestContext.regionalRoutingContextToRoute = + chooseRegionWithSkew(endpoints, nonPrimaryRegionProbability); + ISessionToken finalToken = + regionScopedSessionContainer.resolvePartitionLocalSessionToken(finalRead, pkRangeId); + if (finalToken != null) { + maxObservedGlobal[pkIdx].getAndAccumulate(finalToken.getLSN(), Math::max); + } + } + break; + } + Thread.sleep(1); + } + })); + } + + // All threads start executing once the main thread arrives here (this is done so reads and writed happen concurrently) + startBarrier.arriveAndDeregister(); + + boolean finished = writersDone.await(TEST_TIMEOUT.toMillis(), TimeUnit.MILLISECONDS); + exec.shutdown(); + exec.awaitTermination(TEST_TIMEOUT.toMillis(), TimeUnit.MILLISECONDS); + + if (!finished) { + fail("Writers did not finish within timeout " + TEST_TIMEOUT); + } + if (!errors.isEmpty()) { + List<Throwable> snapshot = new ArrayList<>(errors); + snapshot.forEach(Throwable::printStackTrace); + fail("Encountered " + snapshot.size() + " errors. First: " + snapshot.get(0)); + } + + // FINAL DRAIN: ensure all per-range buffered records are applied + for (int i = 0; i < NUM_PK_RANGES; i++) { + orderedAppliers[i].finalDrain(); + } + + // Diagnostic: how many ranges ever written + List<String> notWritten = new ArrayList<>(); + for (int i = 0; i < NUM_PK_RANGES; i++) { + if (firstWritten[i]) { + } else { + notWritten.add(PK_RANGE_IDS[i]); + } + } + if (!notWritten.isEmpty()) { + fail("No writer recorded first token for ranges: " + notWritten); + } + + // Check every pk range observed at least once + List<String> missingObserved = new ArrayList<>(); + for (int i = 0; i < NUM_PK_RANGES; i++) { + if (maxObservedGlobal[i].get() < 0) { + missingObserved.add(PK_RANGE_IDS[i]); + } + } + if (!missingObserved.isEmpty()) { + fail("No token observed for ranges (despite writer writes): " + missingObserved); + } + + logger.info("Emitted regressions: globalLsnRegressionsCount=[{}] satelliteOneLocalLsnRegressionCount=[{}] satelliteTwoLocalLsnRegressionCount=[{}]", + globalLsnRegressionsCount.get(), satelliteOneLocalLsnRegressionsCount.get(), satelliteTwoLocalLsnRegressionsCount.get()); + } catch (RuntimeException e) { + throw new RuntimeException(e); + } finally { + exec.shutdown(); + globalEndpointManagerMock.close(); + System.clearProperty("COSMOS.PK_BASED_BLOOM_FILTER_EXPECTED_INSERTION_COUNT"); + System.clearProperty("COSMOS.PK_BASED_BLOOM_FILTER_EXPECTED_FFP_RATE"); + } + } + + private static RegionalRoutingContext chooseRegionWithSkew(List<RegionalRoutingContext> endpoints, double nonPrimaryProb) { + if (endpoints.size() <= 1) { + return endpoints.get(0); + } + double d = ThreadLocalRandom.current().nextDouble(); + if (d >= nonPrimaryProb) { + return endpoints.get(0); // primary per ordering + } + int idx = 1 + ThreadLocalRandom.current().nextInt(endpoints.size() - 1); + return endpoints.get(idx); + } + + private static String buildVectorToken(long version, + long globalLsn, + long satelliteOneLocalLsn, + long satelliteTwoLocalLsn) { + return version + "#" + globalLsn + "#" + REGION_ID_SATELLITE_ONE + "=" + satelliteOneLocalLsn + "#" + REGION_ID_SATELLITE_TWO + "=" + satelliteTwoLocalLsn; + } + + private static ParsedVector parseVector(String vector) { + String[] parts = vector.split("#"); + Map<Integer, Long> map = new HashMap<>(); + for (int i = 2; i < parts.length; i++) { + int eq = parts[i].indexOf('='); + if (eq < 0) continue; + try { + int regionId = Integer.parseInt(parts[i].substring(0, eq)); + long lsn = Long.parseLong(parts[i].substring(eq + 1)); + map.merge(regionId, lsn, Math::max); + } catch (NumberFormatException ignore) { + // ignore malformed + } + } + return new ParsedVector(map); + } + + private static URI createUrl(String raw) { + try { return new URI(raw); } catch (Exception e) { throw new RuntimeException(e); } + } + + private static <T> Callable<T> wrap(ConcurrentLinkedQueue<Throwable> errors, ThrowingRunnable r) { + return () -> { + try { r.run(); } catch (Throwable t) { errors.add(t); } + return null; + }; + } + + private static long maybeRegress(long baseline, + double probability, + long maxDelta, + AtomicInteger counter) { + if (ThreadLocalRandom.current().nextDouble() < probability && baseline > 0) { + long delta = 1 + ThreadLocalRandom.current().nextLong(Math.min(maxDelta, baseline)); + counter.incrementAndGet(); + return baseline - delta; + } + return baseline; + } + + @FunctionalInterface + private interface ThrowingRunnable { void run() throws Exception; } + + private static class ParsedVector { + final Map<Integer, Long> regionIdToLsn; + ParsedVector(Map<Integer, Long> regionIdToLsn) { + this.regionIdToLsn = Objects.requireNonNull(regionIdToLsn); + } + } + + // NEW: Ordered application support + private static final class ObservedRecord { + final long seq; + final long globalLsn; + final long satelliteOneLocalLsn; + final long satelliteTwoLocalLsn; + ObservedRecord(long seq, long globalLsn, long satelliteOneLocalLsn, long satelliteTwoLocalLsn) { + this.seq = seq; + this.globalLsn = globalLsn; + this.satelliteOneLocalLsn = satelliteOneLocalLsn; + this.satelliteTwoLocalLsn = satelliteTwoLocalLsn; + } + } + + private static final class OrderedApplier { + private final int pkIdx; + private final AtomicLong nextToApply = new AtomicLong(0); + private final ConcurrentHashMap<Long, ObservedRecord> buffer = new ConcurrentHashMap<>(); + + // References to shared arrays for assertions + private final AtomicLong[] maxObservedGlobalLsn; + private final AtomicLong[] maxObservedSatelliteOneLocalLsn; + private final AtomicLong[] maxObservedSatelliteTwoLocalLsn; + + OrderedApplier(int pkIdx, + AtomicLong[] maxObservedGlobalLsn, + AtomicLong[] maxObservedSatelliteOneLocalLsn, + AtomicLong[] maxObservedSatelliteTwoLocalLsn) { + this.pkIdx = pkIdx; + this.maxObservedGlobalLsn = maxObservedGlobalLsn; + this.maxObservedSatelliteOneLocalLsn = maxObservedSatelliteOneLocalLsn; + this.maxObservedSatelliteTwoLocalLsn = maxObservedSatelliteTwoLocalLsn; + } + + void submit(long seq, ISessionToken token) { + ParsedVector pv = parseVector(token.convertToString()); + long glsn = token.getLSN(); + long satelliteOneLocalLsn = pv.regionIdToLsn.getOrDefault(REGION_ID_SATELLITE_ONE, -1L); + long satelliteTwoLocalLsn = pv.regionIdToLsn.getOrDefault(REGION_ID_SATELLITE_TWO, -1L); + + buffer.put(seq, new ObservedRecord(seq, glsn, satelliteOneLocalLsn, satelliteTwoLocalLsn)); + drainInOrder(); + } + + void finalDrain() { + drainInOrder(); + } + + private void drainInOrder() { + // Try to advance while consecutive sequences are present + while (true) { + long expected = nextToApply.get(); + ObservedRecord rec = buffer.remove(expected); + if (rec == null) { + return; + } + apply(rec); + // Advance expected + nextToApply.compareAndSet(expected, expected + 1); + } + } + + private void apply(ObservedRecord rec) { + // Monotonic assertions now enforced strictly in resolve sequence order + long prevG = maxObservedGlobalLsn[pkIdx].getAndAccumulate(rec.globalLsn, Math::max); + if (prevG > rec.globalLsn) { + fail("Global LSN decreased (seq=" + rec.seq + ") for " + PK_RANGE_IDS[pkIdx] + + ": prev=" + prevG + " new=" + rec.globalLsn); + } + if (rec.satelliteOneLocalLsn >= 0) { + long prevP = maxObservedSatelliteOneLocalLsn[pkIdx].getAndAccumulate(rec.satelliteOneLocalLsn, Math::max); + if (prevP > rec.satelliteOneLocalLsn) { + fail("Primary local LSN decreased (seq=" + rec.seq + ") for " + PK_RANGE_IDS[pkIdx] + + ": prev=" + prevP + " new=" + rec.satelliteOneLocalLsn); + } + } + if (rec.satelliteTwoLocalLsn >= 0) { + long prevS = maxObservedSatelliteTwoLocalLsn[pkIdx].getAndAccumulate(rec.satelliteTwoLocalLsn, Math::max); + if (prevS > rec.satelliteTwoLocalLsn) { + fail("Secondary local LSN decreased (seq=" + rec.seq + ") for " + PK_RANGE_IDS[pkIdx] + + ": prev=" + prevS + " new=" + rec.satelliteTwoLocalLsn); + } + } + } + } +} diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RegionScopedSessionContainerTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RegionScopedSessionContainerTest.java index fc537e091437..d1fb33e71dae 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RegionScopedSessionContainerTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RegionScopedSessionContainerTest.java @@ -480,8 +480,8 @@ public void setSessionToken_NoSessionTokenForPartitionKeyRangeId() throws Except assertThat(globalProgress).isNotNull(); assertThat(globalProgress.getSessionToken()).isNotNull(); - assertThat(globalProgress.getSessionToken().convertToString()).isNotNull(); - assertThat(globalProgress.getSessionToken().convertToString()).isEqualTo(sessionToken); + assertThat(globalProgress.getSessionToken().get().convertToString()).isNotNull(); + assertThat(globalProgress.getSessionToken().get().convertToString()).isEqualTo(sessionToken); RxDocumentServiceRequest request2 = RxDocumentServiceRequest.create(mockDiagnosticsClientContext(), OperationType.Read, ResourceType.Document, collectionName + "/docs", Utils.getUTF8Bytes(""), new HashMap<>()); diff --git a/sdk/cosmos/azure-cosmos/CHANGELOG.md b/sdk/cosmos/azure-cosmos/CHANGELOG.md index 47ca8bbf4b36..9cd92218979e 100644 --- a/sdk/cosmos/azure-cosmos/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos/CHANGELOG.md @@ -8,6 +8,7 @@ #### Bugs Fixed * Fixed a possible memory leak (Netty buffers) in Gateway mode caused by a race condition when timeouts are happening. - [47228](https://github.com/Azure/azure-sdk-for-java/pull/47228) and [47251](https://github.com/Azure/azure-sdk-for-java/pull/47251) +* Fixed `NullPointerException` in region-scoped session container when false positive regions are reported for session progress tracking. [PR 46758](https://github.com/Azure/azure-sdk-for-java/pull/46758) #### Other Changes * Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/HttpConstants.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/HttpConstants.java index 63c238f0e6ab..174b155485f8 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/HttpConstants.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/HttpConstants.java @@ -466,6 +466,7 @@ public static class SubStatusCodes { public static final int INVALID_RESULT = 20910; public static final int CLOSED_CLIENT = 20912; public static final int PPCB_INVALID_STATE = 20913; + public static final int REGION_SCOPED_SESSION_CONTAINER_IN_BAD_STATE = 20914; //SDK Codes (Server) // IMPORTANT - whenever possible use consistency substatus codes that .Net SDK also uses diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/PartitionScopedRegionLevelProgress.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/PartitionScopedRegionLevelProgress.java index 5066a33a398d..c88955c78ea4 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/PartitionScopedRegionLevelProgress.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/PartitionScopedRegionLevelProgress.java @@ -3,19 +3,24 @@ package com.azure.cosmos.implementation; +import com.azure.cosmos.BridgeInternal; +import com.azure.cosmos.CosmosException; import com.azure.cosmos.implementation.apachecommons.collections.map.UnmodifiableMap; import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; +import com.azure.cosmos.implementation.routing.PartitionKeyInternal; import com.azure.cosmos.implementation.routing.RegionNameToRegionIdMap; +import com.azure.cosmos.models.PartitionKeyDefinition; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.HashSet; import java.util.Locale; import java.util.Map; import java.util.Objects; +import java.util.Optional; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicReference; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull; @@ -39,273 +44,433 @@ public ConcurrentHashMap<String, ConcurrentHashMap<String, RegionLevelProgress>> return this.partitionKeyRangeIdToRegionLevelProgress; } - public void tryRecordSessionToken(RxDocumentServiceRequest request, ISessionToken parsedSessionToken, String partitionKeyRangeId, String firstEffectivePreferredReadableRegion, String regionRoutedTo) { + public void tryRecordSessionToken( + RxDocumentServiceRequest request, + ISessionToken parsedSessionToken, + Long collectionRid, + String partitionKeyRangeId, + String firstEffectivePreferredReadableRegion, + String regionRoutedTo, + PartitionKeyBasedBloomFilter partitionKeyBasedBloomFilter, + GlobalEndpointManager globalEndpointManager) { checkNotNull(request, "request cannot be null!"); checkNotNull(request.requestContext, "requestContext cannot be null!"); - this.partitionKeyRangeIdToRegionLevelProgress.compute(partitionKeyRangeId, (partitionKeyRangeIdAsKey, regionLevelProgressAsVal) -> { - - if (regionLevelProgressAsVal == null) { + try { + this.partitionKeyRangeIdToRegionLevelProgress.compute(partitionKeyRangeId, (partitionKeyRangeIdAsKey, regionLevelProgressAsVal) -> { - if (logger.isDebugEnabled()) { - logger.debug("Adding newly encountered partitionKeyRangeId - {}", partitionKeyRangeId); - } - - regionLevelProgressAsVal = new ConcurrentHashMap<>(); - } + Utils.ValueHolder<PartitionKeyInternal> partitionKeyInternal = Utils.ValueHolder.initialize(null); + Utils.ValueHolder<PartitionKeyDefinition> partitionKeyDefinition = Utils.ValueHolder.initialize(null); - // store the global merged progress of the session token for a given physical partition - regionLevelProgressAsVal.merge(GLOBAL_PROGRESS_KEY, new RegionLevelProgress(Long.MIN_VALUE, Long.MIN_VALUE, parsedSessionToken, new AtomicBoolean(false)), (regionLevelProgressExisting, regionLevelProgressNew) -> { + // bloom filter is used only when the request is targeted to a specific logical partition and + // multiple write locations are configured + // and a global session token is not already used for the partition key range + boolean shouldUseBloomFilter = shouldUseBloomFilter( + request, + partitionKeyRangeId, + partitionKeyInternal, + partitionKeyDefinition, + this, + globalEndpointManager + ); - ISessionToken existingSessionToken = regionLevelProgressExisting.sessionToken; - ISessionToken newSessionToken = regionLevelProgressNew.sessionToken; - AtomicBoolean hasPartitionSeenNonPointDocumentOperationsInner = regionLevelProgressExisting.hasPartitionSeenNonPointDocumentOperations; + if (regionLevelProgressAsVal == null) { - return new RegionLevelProgress(Long.MIN_VALUE, Long.MIN_VALUE, existingSessionToken.merge(newSessionToken), hasPartitionSeenNonPointDocumentOperationsInner); - }); - - RegionLevelProgress globalLevelProgress = regionLevelProgressAsVal.get(GLOBAL_PROGRESS_KEY); - - checkNotNull(globalLevelProgress, "globalLevelProgress cannot be null!"); - - // identify whether regionRoutedTo has a regionId mapping in session token - Utils.ValueHolder<UnmodifiableMap<Integer, Long>> localLsnByRegion = new Utils.ValueHolder<>(); - - // if regionId to localLsn mappings cannot be extracted, the only mapping would be "global" to whatever is the session token corresponding to the globalLsn seen across all regions - if (!SessionTokenHelper.tryEvaluateLocalLsnByRegionMappingWithNullSafety(parsedSessionToken, localLsnByRegion)) { - request.requestContext.getSessionTokenEvaluationResults().add("Recording only the global session token either because session token doesn't have region id to localLsn mappings or is not a vector session token."); - return regionLevelProgressAsVal; - } + if (logger.isDebugEnabled()) { + logger.debug("Adding newly encountered partitionKeyRangeId - {}", partitionKeyRangeId); + } - if (request.getResourceType() == ResourceType.Document) { - if (!this.isRequestScopedToLogicalPartition(request)) { - globalLevelProgress.hasPartitionSeenNonPointDocumentOperations.set(true); + regionLevelProgressAsVal = new ConcurrentHashMap<>(); } - } - if (globalLevelProgress.hasPartitionSeenNonPointDocumentOperations.get()) { - request.requestContext.getSessionTokenEvaluationResults().add("Recording only the global session token either because the partition has seen non-point operations."); - return regionLevelProgressAsVal; - } + // store the global merged progress of the session token for a given physical partition + regionLevelProgressAsVal.merge(GLOBAL_PROGRESS_KEY, new RegionLevelProgress(Long.MIN_VALUE, Long.MIN_VALUE, parsedSessionToken, new AtomicBoolean(false), new AtomicBoolean(false)), (regionLevelProgressExisting, regionLevelProgressNew) -> { - this.normalizedRegionLookupMap.computeIfAbsent(regionRoutedTo, (regionRoutedToAsVal) -> regionRoutedToAsVal.toLowerCase(Locale.ROOT).trim().replace(" ", "")); + ISessionToken existingSessionToken = regionLevelProgressExisting.sessionToken; + ISessionToken newSessionToken = regionLevelProgressNew.sessionToken; + AtomicBoolean hasPartitionSeenNonPointDocumentOperationsInner = regionLevelProgressExisting.hasPartitionSeenNonPointDocumentOperations; + AtomicBoolean isGlobalSessionTokenUsedForPartitionKeyRangeInner = regionLevelProgressExisting.isGlobalSessionTokenUsedForPartitionKeyRange; - String normalizedRegionRoutedTo = this.normalizedRegionLookupMap.get(regionRoutedTo); + return new RegionLevelProgress(Long.MIN_VALUE, Long.MIN_VALUE, existingSessionToken.merge(newSessionToken), hasPartitionSeenNonPointDocumentOperationsInner, isGlobalSessionTokenUsedForPartitionKeyRangeInner); + }); - int regionId = RegionNameToRegionIdMap.getRegionId(normalizedRegionRoutedTo); + RegionLevelProgress globalLevelProgress = regionLevelProgressAsVal.get(GLOBAL_PROGRESS_KEY); - if (regionId != -1) { - long localLsn = localLsnByRegion.v.getOrDefault(regionId, Long.MIN_VALUE); + checkNotNull(globalLevelProgress, "globalLevelProgress cannot be null!"); - // regionId maps to a satellite region - if (localLsn != Long.MIN_VALUE) { - regionLevelProgressAsVal.compute(normalizedRegionRoutedTo, (normalizedRegionAsKey, regionLevelProgressAsValInner) -> { - - request.requestContext.getSessionTokenEvaluationResults().add("Recording region specific progress of region : " + normalizedRegionRoutedTo + "."); - - if (regionLevelProgressAsValInner == null) { - return new RegionLevelProgress(parsedSessionToken.getLSN(), localLsn, null, globalLevelProgress.hasPartitionSeenNonPointDocumentOperations); - } + // identify whether regionRoutedTo has a regionId mapping in session token + Utils.ValueHolder<UnmodifiableMap<Integer, Long>> localLsnByRegion = new Utils.ValueHolder<>(); - // regionLevelProgressAsValInner.parsedSessionToken is passed - // to have a session token to merge with in case normalizedRegionRoutedTo - // is equal to the first preferred region in the subsequent step - return new RegionLevelProgress( - Math.max(regionLevelProgressAsValInner.getMaxGlobalLsnSeen(), parsedSessionToken.getLSN()), - Math.max(regionLevelProgressAsValInner.getMaxLocalLsnSeen(), localLsn), - regionLevelProgressAsValInner.sessionToken, - globalLevelProgress.hasPartitionSeenNonPointDocumentOperations); - }); + // if regionId to localLsn mappings cannot be extracted, the only mapping would be "global" to whatever is the session token corresponding to the globalLsn seen across all regions + if (!SessionTokenHelper.tryEvaluateLocalLsnByRegionMappingWithNullSafety(parsedSessionToken, localLsnByRegion)) { + request.requestContext.getSessionTokenEvaluationResults().add("Recording only the global session token either because session token doesn't have region id to localLsn mappings or is not a vector session token."); + globalLevelProgress.isGlobalSessionTokenUsedForPartitionKeyRange.set(true); + return regionLevelProgressAsVal; } - // regionId maps to a hub region - else { - regionLevelProgressAsVal.compute(normalizedRegionRoutedTo, (normalizedRegionAsKey, regionLevelProgressAsValInner) -> { - request.requestContext.getSessionTokenEvaluationResults().add("Recording region specific progress of region : " + normalizedRegionRoutedTo + "."); - - if (regionLevelProgressAsValInner == null) { - return new RegionLevelProgress(parsedSessionToken.getLSN(), Long.MIN_VALUE, null, globalLevelProgress.hasPartitionSeenNonPointDocumentOperations); - } - - // regionLevelProgressAsValInner.parsedSessionToken is passed - // to have a session token to merge with in case normalizedRegionRoutedTo - // is equal to the first preferred region in the subsequent step - return new RegionLevelProgress( - Math.max(regionLevelProgressAsValInner.getMaxGlobalLsnSeen(), parsedSessionToken.getLSN()), - Long.MIN_VALUE, - regionLevelProgressAsValInner.sessionToken, - globalLevelProgress.hasPartitionSeenNonPointDocumentOperations); - }); + if (request.getResourceType() == ResourceType.Document) { + // here the request is not pinned to a specific PartitionKey instance (logical partition) + if (!this.isRequestScopedToLogicalPartition(request)) { + globalLevelProgress.hasPartitionSeenNonPointDocumentOperations.set(true); + } } - // store the session token in parsed form if obtained from the firstEffectivePreferredReadableRegion (a merge is necessary to store latest progress from first preferred region) - if (normalizedRegionRoutedTo.equals(firstEffectivePreferredReadableRegion)) { - regionLevelProgressAsVal.compute(normalizedRegionRoutedTo, (normalizedRegionAsKey, regionLevelProgressAsValInner) -> { - - request.requestContext.getSessionTokenEvaluationResults().add("Recording region specific progress of first preferred region : " + regionRoutedTo + "."); - - if (regionLevelProgressAsValInner == null) { - return new RegionLevelProgress(parsedSessionToken.getLSN(), Long.MIN_VALUE, parsedSessionToken, globalLevelProgress.hasPartitionSeenNonPointDocumentOperations); - } - - ISessionToken mergedBasedSessionToken = regionLevelProgressAsValInner.sessionToken == null ? parsedSessionToken : regionLevelProgressAsValInner.sessionToken.merge(parsedSessionToken); + if (globalLevelProgress.hasPartitionSeenNonPointDocumentOperations.get()) { + request.requestContext.getSessionTokenEvaluationResults().add("Recording only the global session token either because the partition has seen non-point operations."); + globalLevelProgress.isGlobalSessionTokenUsedForPartitionKeyRange.set(true); + return regionLevelProgressAsVal; + } - return new RegionLevelProgress( - Math.max(regionLevelProgressAsValInner.getMaxGlobalLsnSeen(), parsedSessionToken.getLSN()), - Long.MIN_VALUE, - mergedBasedSessionToken, - globalLevelProgress.hasPartitionSeenNonPointDocumentOperations); - }); + this.normalizedRegionLookupMap.computeIfAbsent(regionRoutedTo, (regionRoutedToAsVal) -> regionRoutedToAsVal.toLowerCase(Locale.ROOT).trim().replace(" ", "")); + + String normalizedRegionRoutedTo = this.normalizedRegionLookupMap.get(regionRoutedTo); + + int regionId = RegionNameToRegionIdMap.getRegionId(normalizedRegionRoutedTo); + + if (regionId != -1) { + long localLsn = localLsnByRegion.v.getOrDefault(regionId, Long.MIN_VALUE); + + // regionId maps to a satellite region + if (localLsn != Long.MIN_VALUE) { + regionLevelProgressAsVal.compute(normalizedRegionRoutedTo, (normalizedRegionAsKey, regionLevelProgressAsValInner) -> { + + request.requestContext.getSessionTokenEvaluationResults().add("Recording region specific progress of region : " + normalizedRegionRoutedTo + "."); + + if (shouldUseBloomFilter) { + partitionKeyBasedBloomFilter.tryRecordPartitionKey( + request, + collectionRid, + firstEffectivePreferredReadableRegion, + normalizedRegionRoutedTo, + request.getPartitionKeyInternal(), + request.getPartitionKeyDefinition()); + } + + if (regionLevelProgressAsValInner == null) { + return new RegionLevelProgress(parsedSessionToken.getLSN(), localLsn, null, globalLevelProgress.hasPartitionSeenNonPointDocumentOperations, globalLevelProgress.isGlobalSessionTokenUsedForPartitionKeyRange); + } + + // regionLevelProgressAsValInner.parsedSessionToken is passed + // to have a session token to merge with in case normalizedRegionRoutedTo + // is equal to the first preferred region in the subsequent step + return new RegionLevelProgress( + Math.max(regionLevelProgressAsValInner.getMaxGlobalLsnSeen(), parsedSessionToken.getLSN()), + Math.max(regionLevelProgressAsValInner.getMaxLocalLsnSeen(), localLsn), + regionLevelProgressAsValInner.sessionToken, + globalLevelProgress.hasPartitionSeenNonPointDocumentOperations, + globalLevelProgress.isGlobalSessionTokenUsedForPartitionKeyRange); + }); + } + // regionId maps to a hub region + else { + regionLevelProgressAsVal.compute(normalizedRegionRoutedTo, (normalizedRegionAsKey, regionLevelProgressAsValInner) -> { + + request.requestContext.getSessionTokenEvaluationResults().add("Recording region specific progress of region : " + normalizedRegionRoutedTo + "."); + + if (shouldUseBloomFilter) { + partitionKeyBasedBloomFilter.tryRecordPartitionKey( + request, + collectionRid, + firstEffectivePreferredReadableRegion, + normalizedRegionRoutedTo, + request.getPartitionKeyInternal(), + request.getPartitionKeyDefinition()); + } + + if (regionLevelProgressAsValInner == null) { + return new RegionLevelProgress(parsedSessionToken.getLSN(), Long.MIN_VALUE, null, globalLevelProgress.hasPartitionSeenNonPointDocumentOperations, globalLevelProgress.isGlobalSessionTokenUsedForPartitionKeyRange); + } + + // regionLevelProgressAsValInner.parsedSessionToken is passed + // to have a session token to merge with in case normalizedRegionRoutedTo + // is equal to the first preferred region in the subsequent step + return new RegionLevelProgress( + Math.max(regionLevelProgressAsValInner.getMaxGlobalLsnSeen(), parsedSessionToken.getLSN()), + Long.MIN_VALUE, + regionLevelProgressAsValInner.sessionToken, + globalLevelProgress.hasPartitionSeenNonPointDocumentOperations, + globalLevelProgress.isGlobalSessionTokenUsedForPartitionKeyRange); + }); + } + + // store the session token in parsed form if obtained from the firstEffectivePreferredReadableRegion (a merge is necessary to store latest progress from first preferred region) + if (normalizedRegionRoutedTo.equals(firstEffectivePreferredReadableRegion)) { + regionLevelProgressAsVal.compute(normalizedRegionRoutedTo, (normalizedRegionAsKey, regionLevelProgressAsValInner) -> { + + request.requestContext.getSessionTokenEvaluationResults().add("Recording region specific progress of first preferred region : " + regionRoutedTo + "."); + + if (shouldUseBloomFilter) { + partitionKeyBasedBloomFilter.tryRecordPartitionKey( + request, + collectionRid, + firstEffectivePreferredReadableRegion, + normalizedRegionRoutedTo, + request.getPartitionKeyInternal(), + request.getPartitionKeyDefinition()); + } + + if (regionLevelProgressAsValInner == null) { + return new RegionLevelProgress(parsedSessionToken.getLSN(), Long.MIN_VALUE, parsedSessionToken, globalLevelProgress.hasPartitionSeenNonPointDocumentOperations, globalLevelProgress.isGlobalSessionTokenUsedForPartitionKeyRange); + } + + ISessionToken mergedBasedSessionToken = regionLevelProgressAsValInner.sessionToken == null ? parsedSessionToken : regionLevelProgressAsValInner.sessionToken.merge(parsedSessionToken); + + return new RegionLevelProgress( + Math.max(regionLevelProgressAsValInner.getMaxGlobalLsnSeen(), parsedSessionToken.getLSN()), + Long.MIN_VALUE, + mergedBasedSessionToken, + globalLevelProgress.hasPartitionSeenNonPointDocumentOperations, + globalLevelProgress.isGlobalSessionTokenUsedForPartitionKeyRange); + }); + } + } else { + request.requestContext.getSessionTokenEvaluationResults().add("Recording only the global session token since session token provided doesn't have a known region id mapping for region : " + normalizedRegionRoutedTo + "."); + if (logger.isDebugEnabled()) { + logger.debug("Region with name - {} which has no known regionId has been seen", normalizedRegionRoutedTo); + } } + + return regionLevelProgressAsVal; + }); + } catch (Throwable t) { + if (!(t instanceof CosmosException)) { + throw constructInternalServerErrorException(request, t.getMessage()); } else { - request.requestContext.getSessionTokenEvaluationResults().add("Recording only the global session token since session token provided doesn't have a known region id mapping for region : " + normalizedRegionRoutedTo + "."); - if (logger.isDebugEnabled()) { - logger.debug("Region with name - {} which has no known regionId has been seen", normalizedRegionRoutedTo); - } + throw t; } - - return regionLevelProgressAsVal; - }); + } } public ISessionToken tryResolveSessionToken( RxDocumentServiceRequest request, - Set<String> lesserPreferredRegionsPkProbablyRequestedFrom, + Long collectionRid, String partitionKeyRangeId, String firstEffectivePreferredReadableRegion, - boolean canUseRegionScopedSessionTokens) { + PartitionKeyBasedBloomFilter partitionKeyBasedBloomFilter, + GlobalEndpointManager globalEndpointManager) { checkNotNull(request, "request cannot be null!"); checkNotNull(request.requestContext, "requestContext cannot be null!"); - RegionLevelProgress globalLevelProgress = resolvePartitionKeyRangeIdBasedProgress(partitionKeyRangeId, GLOBAL_PROGRESS_KEY); + Utils.ValueHolder<ISessionToken> resultantSessionToken = new Utils.ValueHolder<>(null); + + try { + this.partitionKeyRangeIdToRegionLevelProgress.compute(partitionKeyRangeId, (partitionKeyRangeIdAsKey, regionLevelProgressAsVal) -> { + + Optional<RegionLevelProgress> globalLevelProgress = resolvePartitionKeyRangeIdBasedProgress(partitionKeyRangeId, GLOBAL_PROGRESS_KEY); + Utils.ValueHolder<PartitionKeyInternal> partitionKeyInternal = Utils.ValueHolder.initialize(null); + Utils.ValueHolder<PartitionKeyDefinition> partitionKeyDefinition = Utils.ValueHolder.initialize(null); + + // bloom filter is used only when the request is targeted to a specific logical partition and + // multiple write locations are configured + // and a global session token is not alre used for the partition key range + boolean canUseRegionScopedSessionTokens = shouldUseBloomFilter( + request, + partitionKeyRangeId, + partitionKeyInternal, + partitionKeyDefinition, + this, + globalEndpointManager + ); + + Set<String> lesserPreferredRegionsPkProbablyRequestedFrom = new HashSet<>(); + + // obtain the list of regions (excluding the first preferred region) + // where the partition key of the request has probably seen requests routed to + if (canUseRegionScopedSessionTokens) { + lesserPreferredRegionsPkProbablyRequestedFrom = partitionKeyBasedBloomFilter + .tryGetPossibleRegionsLogicalPartitionResolvedTo( + request, + collectionRid, + partitionKeyInternal.v, + partitionKeyDefinition.v); + } - checkNotNull(globalLevelProgress, "globalLevelProgress cannot be null!"); + // globalLevelProgress cannot be null since it is always added irrespective of routing + if (!globalLevelProgress.isPresent()) { + throw constructInternalServerErrorException(request, "globalLevelProgress cannot be null!"); + } - ISessionToken globalSessionToken = globalLevelProgress.sessionToken; + Optional<ISessionToken> globalSessionToken = globalLevelProgress.get().getSessionToken(); - checkNotNull(globalSessionToken, "The session token corresponding to global progress cannot be null!"); + if (!globalSessionToken.isPresent()) { + throw constructInternalServerErrorException(request, "globalSessionToken cannot be null!"); + } - // if region level scoping is not allowed, then resolve to the global session token - // region level scoping is allowed in the following cases: - // 1. when the request is targeted to a specific logical partition - // 2. when multiple write locations are configured - if (!canUseRegionScopedSessionTokens) { - return globalSessionToken; - } + ISessionToken globalSessionTokenAsVal = globalSessionToken.get(); - if (globalLevelProgress.hasPartitionSeenNonPointDocumentOperations.get()) { - request.requestContext.getSessionTokenEvaluationResults().add("Resolving to the global session token since partition has seen non-point requests."); - return globalSessionToken; - } + // if region level scoping is not allowed, then resolve to the global session token + // region level scoping is allowed in the following cases: + // 1. when the request is targeted to a specific logical partition + // 2. when multiple write locations are configured + if (!canUseRegionScopedSessionTokens) { + resultantSessionToken.v = fallbackToGlobalSessionToken(request, globalLevelProgress); + return regionLevelProgressAsVal; + } - RegionLevelProgress baseLevelProgress = resolvePartitionKeyRangeIdBasedProgress(partitionKeyRangeId, firstEffectivePreferredReadableRegion); + // baseLevelProgress corresponds to the session token recorded for the first preferred readable region + // as the first preferred readable region is not recorded in the bloom filter + // it is necessary to always obtain the session token recorded for the first preferred readable region + // and use it as the base session token to construct the resultant session token + Optional<RegionLevelProgress> baseLevelProgress = resolvePartitionKeyRangeIdBasedProgress(partitionKeyRangeId, firstEffectivePreferredReadableRegion); - if (baseLevelProgress == null || baseLevelProgress.sessionToken == null) { - request.requestContext.getSessionTokenEvaluationResults().add("Resolving to the global session token since session token corresponding to first preferred readable region doesn't exist."); - return globalSessionToken; - } + if (!baseLevelProgress.isPresent() || !baseLevelProgress.get().getSessionToken().isPresent()) { + resultantSessionToken.v = fallbackToGlobalSessionToken(request, globalLevelProgress); + return regionLevelProgressAsVal; + } - ISessionToken baseSessionToken = baseLevelProgress.sessionToken; + Optional<ISessionToken> baseSessionToken = baseLevelProgress.get().getSessionToken(); - // the partition key of the request has not been requested from lesser preferred regions - // hence just return the base session token or in other words the session recorded for the first preferred readable region - if (lesserPreferredRegionsPkProbablyRequestedFrom.isEmpty()) { - request.requestContext.getSessionTokenEvaluationResults().add("Resolving to the session token corresponding to the first preferred readable region since the requested logical partition has not been resolved to other regions."); - return baseSessionToken; - } + // the partition key of the request has not been requested from lesser preferred regions + // hence just return the base session token or in other words the session recorded for the first preferred readable region + if (lesserPreferredRegionsPkProbablyRequestedFrom.isEmpty() && baseSessionToken.isPresent()) { + resultantSessionToken.v = baseSessionToken.get(); + return regionLevelProgressAsVal; + } - long globalLsn = -1; + long globalLsn = -1; - Utils.ValueHolder<UnmodifiableMap<Integer, Long>> localLsnByRegion = new Utils.ValueHolder<>(); + Utils.ValueHolder<UnmodifiableMap<Integer, Long>> localLsnByRegion = new Utils.ValueHolder<>(); - // return global merged progress of the session token for a given physical partition since regionId to localLsn mappings cannot be resolved - if (!SessionTokenHelper.tryEvaluateLocalLsnByRegionMappingWithNullSafety(globalSessionToken, localLsnByRegion)) { - request.requestContext.getSessionTokenEvaluationResults().add("Resolving to the global session token either because session token doesn't have region id to localLsn mappings or is not a vector session token."); - return globalSessionToken; - } + // return global merged progress of the session token for a given physical partition since regionId to localLsn mappings cannot be resolved + if (!SessionTokenHelper.tryEvaluateLocalLsnByRegionMappingWithNullSafety(globalSessionTokenAsVal, localLsnByRegion)) { + resultantSessionToken.v = fallbackToGlobalSessionToken(request, globalLevelProgress); + return regionLevelProgressAsVal; + } - Utils.ValueHolder<Long> sessionTokenVersion = new Utils.ValueHolder<>(); + Utils.ValueHolder<Long> sessionTokenVersion = new Utils.ValueHolder<>(); - // return global merged progress of the session token for a given physical partition since version cannot be resolved - if (!SessionTokenHelper.tryEvaluateVersion(globalSessionToken, sessionTokenVersion)) { - request.requestContext.getSessionTokenEvaluationResults().add("Resolving to the global session token recorded prior because the version cannot be recorded from the global session token."); + // return global merged progress of the session token for a given physical partition since version cannot be resolved + if (!SessionTokenHelper.tryEvaluateVersion(globalSessionTokenAsVal, sessionTokenVersion)) { + resultantSessionToken.v = fallbackToGlobalSessionToken(request, globalLevelProgress); + return regionLevelProgressAsVal; + } - return globalSessionToken; - } + StringBuilder sbPartOne = new StringBuilder(); + StringBuilder sbPartTwo = new StringBuilder(); - StringBuilder sbPartOne = new StringBuilder(); - StringBuilder sbPartTwo = new StringBuilder(); + // iterate through the regionId to localLsn mappings of the session token (satellite regions only) + // find overlap between regions the partition key has probably seen requests routed to + for (Map.Entry<Integer, Long> localLsnByRegionEntry : localLsnByRegion.v.entrySet()) { - for (Map.Entry<Integer, Long> localLsnByRegionEntry : localLsnByRegion.v.entrySet()) { + int regionId = localLsnByRegionEntry.getKey(); + String normalizedRegionName = RegionNameToRegionIdMap.getRegionName(regionId); - int regionId = localLsnByRegionEntry.getKey(); - String normalizedRegionName = RegionNameToRegionIdMap.getRegionName(regionId); + // the regionId to normalizedRegionName does not exist + if (normalizedRegionName.equals(StringUtils.EMPTY)) { - // the regionId to normalizedRegionName does not exist - if (normalizedRegionName.equals(StringUtils.EMPTY)) { + if (logger.isDebugEnabled()) { + logger.debug("regionId with value - {} which has no known region name has been seen in the vector session token", regionId); + } - if (logger.isDebugEnabled()) { - logger.debug("regionId with value - {} which has no known region name has been seen in the vector session token", regionId); + resultantSessionToken.v = fallbackToGlobalSessionToken(request, globalLevelProgress); + return regionLevelProgressAsVal; + } + + // start constructing the session token using the localLsn and globalLsn from lesser preferred regions + if (lesserPreferredRegionsPkProbablyRequestedFrom.contains(normalizedRegionName)) { + request.requestContext.getSessionTokenEvaluationResults().add("Resolving region specific progress from " + normalizedRegionName); + Optional<RegionLevelProgress> satelliteRegionProgress = this.resolvePartitionKeyRangeIdBasedProgress(partitionKeyRangeId, normalizedRegionName); + + if (satelliteRegionProgress.isPresent()) { + globalLsn = Math.max(globalLsn, satelliteRegionProgress.get().getMaxGlobalLsnSeen()); + sbPartTwo.append(VectorSessionToken.SegmentSeparator); + sbPartTwo.append(regionId); + sbPartTwo.append(VectorSessionToken.RegionProgressSeparator); + sbPartTwo.append(satelliteRegionProgress.get().getMaxLocalLsnSeen()); + lesserPreferredRegionsPkProbablyRequestedFrom.remove(normalizedRegionName); + } else { + + // this condition should ideally be hit probabilistically since the bloom filter + // indicated that the partition key has probably seen requests routed to this region but the session container doesn't have any region specific progress recorded + // hence resolve to the global session token recorded prior + resultantSessionToken.v = fallbackToGlobalSessionToken(request, globalLevelProgress); + return regionLevelProgressAsVal; + } + } else { + request.requestContext.getSessionTokenEvaluationResults().add("No region specific progress to resolve from " + normalizedRegionName); + sbPartTwo.append(VectorSessionToken.SegmentSeparator); + sbPartTwo.append(regionId); + sbPartTwo.append(VectorSessionToken.RegionProgressSeparator); + sbPartTwo.append(-1); + } } - request.requestContext.getSessionTokenEvaluationResults().add("Resolving to the global session token since session token provided doesn't have a known region name mapping for region id : " + regionId + "."); - return globalSessionToken; - } + Utils.ValueHolder<ISessionToken> hubSessionToken = new Utils.ValueHolder<>(null); - // start constructing the session token using the localLsn and globalLsn from lesser preferred regions - if (lesserPreferredRegionsPkProbablyRequestedFrom.contains(normalizedRegionName)) { - request.requestContext.getSessionTokenEvaluationResults().add("Resolving region specific progress from " + normalizedRegionName); - RegionLevelProgress satelliteRegionProgress = this.resolvePartitionKeyRangeIdBasedProgress(partitionKeyRangeId, normalizedRegionName); - globalLsn = Math.max(globalLsn, satelliteRegionProgress.maxGlobalLsnSeen); - sbPartTwo.append(VectorSessionToken.SegmentSeparator); - sbPartTwo.append(regionId); - sbPartTwo.append(VectorSessionToken.RegionProgressSeparator); - sbPartTwo.append(satelliteRegionProgress.maxLocalLsnSeen); - } else { - request.requestContext.getSessionTokenEvaluationResults().add("No region specific progress to resolve from " + normalizedRegionName); - sbPartTwo.append(VectorSessionToken.SegmentSeparator); - sbPartTwo.append(regionId); - sbPartTwo.append(VectorSessionToken.RegionProgressSeparator); - sbPartTwo.append(-1); - } - } + // Obtain globalLsn from hub region + for (String lesserPreferredRegionPkProbablyRequestedFrom : lesserPreferredRegionsPkProbablyRequestedFrom) { + int regionId = RegionNameToRegionIdMap.getRegionId(lesserPreferredRegionPkProbablyRequestedFrom); + boolean isHubRegion = !localLsnByRegion.v.containsKey(regionId); - sbPartOne.append(sessionTokenVersion.v); - sbPartOne.append(VectorSessionToken.SegmentSeparator); - sbPartOne.append(globalLsn); + if (isHubRegion) { + Optional<RegionLevelProgress> hubLevelProgress = this.resolvePartitionKeyRangeIdBasedProgress(partitionKeyRangeId, lesserPreferredRegionPkProbablyRequestedFrom); - Utils.ValueHolder<ISessionToken> resolvedSessionToken = new Utils.ValueHolder<>(null); + if (hubLevelProgress.isPresent()) { + hubSessionToken.v = hubLevelProgress.get().getSessionToken().orElse(null); + } else { + resultantSessionToken.v = fallbackToGlobalSessionToken(request, globalLevelProgress); + return regionLevelProgressAsVal; + } + } + } - // one additional step of merging base session token / first preferred read region and resolved session token - if (SessionTokenHelper.tryParse(sbPartOne.append(sbPartTwo).toString(), resolvedSessionToken)) { - return baseSessionToken.merge(resolvedSessionToken.v); - } + sbPartOne.append(sessionTokenVersion.v); + sbPartOne.append(VectorSessionToken.SegmentSeparator); + sbPartOne.append(globalLsn); + + Utils.ValueHolder<ISessionToken> resolvedSessionToken = new Utils.ValueHolder<>(null); - request.requestContext.getSessionTokenEvaluationResults().add("Resolving to the global session token since session token from the first preferred region couldn't be merged with region-resolved session token : " + resolvedSessionToken.v.convertToString() + "."); - return globalSessionToken; + // one additional step of merging base session token / first preferred read region and resolved session token + if (SessionTokenHelper.tryParse(sbPartOne.append(sbPartTwo).toString(), resolvedSessionToken)) { + + ISessionToken baseSessionTokenAsVal = baseSessionToken.get(); + + if (hubSessionToken.v != null) { + resultantSessionToken.v + = baseSessionTokenAsVal.merge(hubSessionToken.v).merge(resolvedSessionToken.v); + } else { + resultantSessionToken.v + = baseSessionTokenAsVal.merge(resolvedSessionToken.v); + } + + return regionLevelProgressAsVal; + } + + resultantSessionToken.v = fallbackToGlobalSessionToken(request, globalLevelProgress); + return regionLevelProgressAsVal; + }); + + return resultantSessionToken.v; + } catch (Throwable t) { + if (!(t instanceof CosmosException)) { + throw constructInternalServerErrorException(request, t.getMessage()); + } else { + throw t; + } + } } public boolean isPartitionKeyRangeIdPresent(String partitionKeyRangeId) { return this.partitionKeyRangeIdToRegionLevelProgress.containsKey(partitionKeyRangeId); } - private RegionLevelProgress resolvePartitionKeyRangeIdBasedProgress(String partitionKeyRangeId, String progressScope) { + private Optional<RegionLevelProgress> resolvePartitionKeyRangeIdBasedProgress(String partitionKeyRangeId, String progressScope) { ConcurrentHashMap<String, RegionLevelProgress> regionToRegionLevelProgress = this.partitionKeyRangeIdToRegionLevelProgress.get(partitionKeyRangeId); checkNotNull(regionToRegionLevelProgress, "regionToRegionLevelProgress cannot be null!"); - return regionToRegionLevelProgress.get(progressScope); + return Optional.ofNullable(regionToRegionLevelProgress.get(progressScope)); } private boolean isRequestScopedToLogicalPartition(RxDocumentServiceRequest request) { return request.getPartitionKeyInternal() != null; } - public boolean getHasPartitionSeenNonPointRequestsForDocuments(String partitionKeyRangeId) { + public boolean useGlobalSessionTokenForPartitionKeyRangeId(String partitionKeyRangeId) { if (this.partitionKeyRangeIdToRegionLevelProgress.containsKey(partitionKeyRangeId)) { ConcurrentHashMap<String, RegionLevelProgress> regionToRegionLevelProgress = this.partitionKeyRangeIdToRegionLevelProgress.get(partitionKeyRangeId); @@ -314,24 +479,90 @@ public boolean getHasPartitionSeenNonPointRequestsForDocuments(String partitionK if (regionLevelProgress == null) { return false; } else { - return regionLevelProgress.hasPartitionSeenNonPointDocumentOperations.get(); + return regionLevelProgress.hasPartitionSeenNonPointDocumentOperations.get() || regionLevelProgress.isGlobalSessionTokenUsedForPartitionKeyRange.get(); } } return false; } + private static CosmosException constructInternalServerErrorException(RxDocumentServiceRequest request, String message) { + CosmosException cosmosException = new InternalServerErrorException( + message, + HttpConstants.SubStatusCodes.REGION_SCOPED_SESSION_CONTAINER_IN_BAD_STATE); + + BridgeInternal.setCosmosDiagnostics(cosmosException, request.requestContext.cosmosDiagnostics); + + return cosmosException; + } + + private static boolean shouldUseBloomFilter( + RxDocumentServiceRequest request, + String partitionKeyRangeId, + Utils.ValueHolder<PartitionKeyInternal> partitionKeyInternal, + Utils.ValueHolder<PartitionKeyDefinition> partitionKeyDefinition, + PartitionScopedRegionLevelProgress partitionScopedRegionLevelProgress, + GlobalEndpointManager globalEndpointManager) { + + checkNotNull(request, "request cannot be null!"); + checkNotNull(globalEndpointManager, "globalEndpointManager cannot be null!"); + checkNotNull(partitionScopedRegionLevelProgress, "partitionScopedRegionLevelProgress cannot be null!"); + + partitionKeyInternal.v = request.getPartitionKeyInternal(); + + if (partitionKeyInternal.v == null) { + return false; + } + + partitionKeyDefinition.v = request.getPartitionKeyDefinition(); + + if (partitionKeyDefinition.v == null) { + return false; + } + + if (partitionScopedRegionLevelProgress.useGlobalSessionTokenForPartitionKeyRangeId(partitionKeyRangeId)) { + return false; + } + + return globalEndpointManager.canUseMultipleWriteLocations(request); + } + + private static ISessionToken fallbackToGlobalSessionToken( + RxDocumentServiceRequest request, + Optional<RegionLevelProgress> globalLevelProgress) { + + if (!globalLevelProgress.isPresent()) { + throw constructInternalServerErrorException(request, "globalSessionToken cannot be null!"); + } + + Optional<ISessionToken> globalSessionToken = globalLevelProgress.get().getSessionToken(); + + if (!globalSessionToken.isPresent()) { + throw constructInternalServerErrorException(request, "globalSessionToken cannot be null!"); + } + + RegionLevelProgress globalLevelProgressAsVal = globalLevelProgress.get(); + ISessionToken globalSessionTokenAsVal = globalSessionToken.get(); + + globalLevelProgressAsVal.isGlobalSessionTokenUsedForPartitionKeyRange.set(true); + request.requestContext.getSessionTokenEvaluationResults().add("Resolving to the global session token recorded prior since region specific progress couldn't be found."); + + return globalSessionTokenAsVal; + } + static class RegionLevelProgress { private final long maxGlobalLsnSeen; private final long maxLocalLsnSeen; private final ISessionToken sessionToken; private final AtomicBoolean hasPartitionSeenNonPointDocumentOperations; + private final AtomicBoolean isGlobalSessionTokenUsedForPartitionKeyRange; - public RegionLevelProgress(long maxGlobalLsnSeen, long maxLocalLsnSeen, ISessionToken sessionToken, AtomicBoolean hasPartitionSeenNonPointDocumentOperations) { + public RegionLevelProgress(long maxGlobalLsnSeen, long maxLocalLsnSeen, ISessionToken sessionToken, AtomicBoolean hasPartitionSeenNonPointDocumentOperations, AtomicBoolean isGlobalSessionTokenUsedForPartitionKeyRange) { this.maxGlobalLsnSeen = maxGlobalLsnSeen; this.maxLocalLsnSeen = maxLocalLsnSeen; this.sessionToken = sessionToken; this.hasPartitionSeenNonPointDocumentOperations = hasPartitionSeenNonPointDocumentOperations; + this.isGlobalSessionTokenUsedForPartitionKeyRange = isGlobalSessionTokenUsedForPartitionKeyRange; } public long getMaxGlobalLsnSeen() { @@ -342,12 +573,8 @@ public long getMaxLocalLsnSeen() { return maxLocalLsnSeen; } - public ISessionToken getSessionToken() { - return sessionToken; - } - - public void setHasPartitionSeenNonPointDocumentOperations(boolean hasPartitionSeenNonPointDocumentOperations) { - this.hasPartitionSeenNonPointDocumentOperations.set(hasPartitionSeenNonPointDocumentOperations); + public Optional<ISessionToken> getSessionToken() { + return Optional.ofNullable(sessionToken); } @Override diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RegionScopedSessionContainer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RegionScopedSessionContainer.java index b93761935dc5..6ce41f538b1d 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RegionScopedSessionContainer.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RegionScopedSessionContainer.java @@ -18,6 +18,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.locks.ReentrantReadWriteLock; @@ -201,13 +202,6 @@ public ISessionToken resolvePartitionLocalSessionToken(RxDocumentServiceRequest this.firstPreferredReadableRegionCached.set(extractFirstEffectivePreferredReadableRegion()); } - boolean shouldUseBloomFilter = shouldUseBloomFilter( - request, - partitionKeyRangeId, - partitionKeyInternal, - partitionKeyDefinition, - partitionScopedRegionLevelProgress); - return SessionTokenHelper.resolvePartitionLocalSessionToken( request, this.partitionKeyBasedBloomFilter, @@ -217,7 +211,7 @@ public ISessionToken resolvePartitionLocalSessionToken(RxDocumentServiceRequest collectionRid, partitionKeyRangeId, this.firstPreferredReadableRegionCached.get(), - shouldUseBloomFilter); + this.globalEndpointManager); } @Override @@ -339,41 +333,6 @@ private void setSessionToken(RxDocumentServiceRequest request, ResourceId resour } } - private void recordPartitionKeyInBloomFilter( - RxDocumentServiceRequest request, - Long collectionRid, - String regionRoutedTo, - PartitionKeyInternal partitionKeyInternal, - PartitionKeyDefinition partitionKeyDefinition) { - - if (Strings.isNullOrEmpty(this.firstPreferredReadableRegionCached.get())) { - this.firstPreferredReadableRegionCached.set(extractFirstEffectivePreferredReadableRegion()); - } - - this.partitionKeyBasedBloomFilter.tryRecordPartitionKey( - request, - collectionRid, - this.firstPreferredReadableRegionCached.get(), - regionRoutedTo, - partitionKeyInternal, - partitionKeyDefinition); - } - - private void recordRegionScopedSessionToken( - RxDocumentServiceRequest request, - PartitionScopedRegionLevelProgress partitionScopedRegionLevelProgress, - ISessionToken parsedSessionToken, - String partitionKeyRangeId, - String regionRoutedTo) { - - partitionScopedRegionLevelProgress.tryRecordSessionToken( - request, - parsedSessionToken, - partitionKeyRangeId, - this.firstPreferredReadableRegionCached.get(), - regionRoutedTo); - } - private void addSessionTokenAndTryRecordEpkInBloomFilter(RxDocumentServiceRequest request, ResourceId resourceId, String partitionKeyRangeId, ISessionToken parsedSessionToken) { final Long collectionResourceId = resourceId.getUniqueDocumentCollectionId(); @@ -399,27 +358,14 @@ private void addSessionTokenAndTryRecordEpkInBloomFilter(RxDocumentServiceReques if (partitionScopedRegionLevelProgress != null) { - if (shouldUseBloomFilter( - request, - partitionKeyRangeId, - partitionKeyInternal, - partitionKeyDefinition, - partitionScopedRegionLevelProgress)) { - - this.recordPartitionKeyInBloomFilter( - request, - collectionResourceId, - regionRoutedTo, - partitionKeyInternal.v, - partitionKeyDefinition.v); - } - this.recordRegionScopedSessionToken( request, partitionScopedRegionLevelProgress, parsedSessionToken, + collectionResourceId, partitionKeyRangeId, - regionRoutedTo); + regionRoutedTo + ); } else { this.collectionResourceIdToPartitionScopedRegionLevelProgress.compute( @@ -444,25 +390,31 @@ private void addSessionTokenAndTryRecordEpkInBloomFilter(RxDocumentServiceReques request, partitionScopedRegionLevelProgress, parsedSessionToken, + collectionResourceId, partitionKeyRangeId, - regionRoutedTo); + regionRoutedTo + ); } + } + } - if (shouldUseBloomFilter( - request, - partitionKeyRangeId, - partitionKeyInternal, - partitionKeyDefinition, - partitionScopedRegionLevelProgress)) { + private void recordRegionScopedSessionToken( + RxDocumentServiceRequest request, + PartitionScopedRegionLevelProgress partitionScopedRegionLevelProgress, + ISessionToken parsedSessionToken, + Long collectionRid, + String partitionKeyRangeId, + String regionRoutedTo) { - this.recordPartitionKeyInBloomFilter( - request, - collectionResourceId, - regionRoutedTo, - partitionKeyInternal.v, - partitionKeyDefinition.v); - } - } + partitionScopedRegionLevelProgress.tryRecordSessionToken( + request, + parsedSessionToken, + collectionRid, + partitionKeyRangeId, + this.firstPreferredReadableRegionCached.get(), + regionRoutedTo, + this.partitionKeyBasedBloomFilter, + this.globalEndpointManager); } private String getCombinedSessionToken(PartitionScopedRegionLevelProgress partitionScopedRegionLevelProgress) { @@ -472,53 +424,28 @@ private String getCombinedSessionToken(PartitionScopedRegionLevelProgress partit StringBuilder result = new StringBuilder(); if (tokens != null) { for (Iterator<Map.Entry<String, ConcurrentHashMap<String, PartitionScopedRegionLevelProgress.RegionLevelProgress>>> iterator = tokens.entrySet().iterator(); iterator.hasNext(); ) { - Map.Entry<String, ConcurrentHashMap<String, PartitionScopedRegionLevelProgress.RegionLevelProgress>> entry = iterator.next(); + Map.Entry<String, ConcurrentHashMap<String, PartitionScopedRegionLevelProgress.RegionLevelProgress>> entry = iterator.next(); String partitionKeyRangeId = entry.getKey(); - String sessionTokenAsString = entry.getValue().get(PartitionScopedRegionLevelProgress.GLOBAL_PROGRESS_KEY).getSessionToken().convertToString(); - - result = result.append(partitionKeyRangeId).append(":").append(sessionTokenAsString); - if (iterator.hasNext()) { - result = result.append(","); - } - } - } - return result.toString(); - } - - // validate whether the request can be scoped to a logical partition - // along with whether multi-write is enabled for the request / account - // multi-write setup needs to be verified since multiple regions can make progress - // independently as multiple regions can process writes - private boolean shouldUseBloomFilter( - RxDocumentServiceRequest request, - String partitionKeyRangeId, - Utils.ValueHolder<PartitionKeyInternal> partitionKeyInternal, - Utils.ValueHolder<PartitionKeyDefinition> partitionKeyDefinition, - PartitionScopedRegionLevelProgress partitionScopedRegionLevelProgress) { + Optional<ISessionToken> sessionToken = entry.getValue().get(PartitionScopedRegionLevelProgress.GLOBAL_PROGRESS_KEY).getSessionToken(); - checkNotNull(request, "request cannot be null!"); - checkNotNull(this.globalEndpointManager, "globalEndpointManager cannot be nulL!"); - checkNotNull(partitionScopedRegionLevelProgress, "partitionScopedRegionLevelProgress cannot be null!"); + if (sessionToken.isPresent()) { - partitionKeyInternal.v = request.getPartitionKeyInternal(); + ISessionToken sessionTokenInner = sessionToken.get(); + String sessionTokenAsString = sessionTokenInner.convertToString(); - if (partitionKeyInternal.v == null) { - return false; - } - - partitionKeyDefinition.v = request.getPartitionKeyDefinition(); - - if (partitionKeyDefinition.v == null) { - return false; - } - - if (partitionScopedRegionLevelProgress.getHasPartitionSeenNonPointRequestsForDocuments(partitionKeyRangeId)) { - return false; + result = result.append(partitionKeyRangeId).append(":").append(sessionTokenAsString); + if (iterator.hasNext()) { + result = result.append(","); + } + } else { + logger.warn("No session token present for partitionKeyRangeId {} in global progress", partitionKeyRangeId); + } + } } - return globalEndpointManager.canUseMultipleWriteLocations(request); + return result.toString(); } private String extractFirstEffectivePreferredReadableRegion() { diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java index 2acea4e9db57..9b035b28dff6 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java @@ -1535,6 +1535,10 @@ private void addUserAgentSuffix(UserAgentContainer userAgentContainer, Set<UserA } } + if (!(this.sessionContainer instanceof RegionScopedSessionContainer)) { + userAgentFeatureFlags.remove(UserAgentFeatureFlags.RegionScopedSessionCapturing); + } + userAgentContainer.setFeatureEnabledFlagsAsSuffix(userAgentFeatureFlags); } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/SessionTokenHelper.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/SessionTokenHelper.java index 71a6faf1bb16..8667e40aa879 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/SessionTokenHelper.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/SessionTokenHelper.java @@ -173,50 +173,21 @@ static ISessionToken resolvePartitionLocalSessionToken(RxDocumentServiceRequest Long collectionRid, String partitionKeyRangeId, String firstEffectivePreferredReadableRegion, - boolean canUseBloomFilter) { + GlobalEndpointManager globalEndpointManager) { if (partitionScopedRegionLevelProgress != null) { - Set<String> partitionKeyPossibleRegions = new HashSet<>(); - if (partitionScopedRegionLevelProgress.isPartitionKeyRangeIdPresent(partitionKeyRangeId)) { - - if (canUseBloomFilter) { - partitionKeyPossibleRegions = partitionKeyBasedBloomFilter - .tryGetPossibleRegionsLogicalPartitionResolvedTo( - request, - collectionRid, - partitionKey, - partitionKeyDefinition); - - return partitionScopedRegionLevelProgress - .tryResolveSessionToken( - request, - partitionKeyPossibleRegions, - partitionKeyRangeId, - firstEffectivePreferredReadableRegion, - true); - - } - return partitionScopedRegionLevelProgress .tryResolveSessionToken( request, - partitionKeyPossibleRegions, + collectionRid, partitionKeyRangeId, firstEffectivePreferredReadableRegion, - false); + partitionKeyBasedBloomFilter, + globalEndpointManager); } else { - if (canUseBloomFilter) { - partitionKeyPossibleRegions = partitionKeyBasedBloomFilter - .tryGetPossibleRegionsLogicalPartitionResolvedTo( - request, - collectionRid, - partitionKey, - partitionKeyDefinition); - } - ISessionToken parentSessionToken = null; Collection<String> parents = request.requestContext.resolvedPartitionKeyRange.getParents(); @@ -232,10 +203,11 @@ static ISessionToken resolvePartitionLocalSessionToken(RxDocumentServiceRequest resolvedSessionTokenForParentPkRangeId = partitionScopedRegionLevelProgress .tryResolveSessionToken( request, - partitionKeyPossibleRegions, + collectionRid, parentPkRangeId, firstEffectivePreferredReadableRegion, - canUseBloomFilter); + partitionKeyBasedBloomFilter, + globalEndpointManager); if (resolvedSessionTokenForParentPkRangeId != null) { parentSessionToken = parentSessionToken != null ? diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/UserAgentFeatureFlags.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/UserAgentFeatureFlags.java index aa8da74a02d3..05dfc14703a5 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/UserAgentFeatureFlags.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/UserAgentFeatureFlags.java @@ -19,7 +19,8 @@ public enum UserAgentFeatureFlags { PerPartitionCircuitBreaker(1 << 1), ThinClient(1 << 2), // BinaryEncoding(1 << 3), - Http2(1 << 4); + Http2(1 << 4), + RegionScopedSessionCapturing(1 << 5); private final int value; From 684d009162a1a542293d3e385ececcaa27d407e8 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:34:10 -0800 Subject: [PATCH 084/186] Sync eng/common directory with azure-sdk-tools for PR 13102 (#47421) * Added forRelease input parameter * Added 'forRelease' to template * Added log --------- Co-authored-by: ray chen <raychen@microsoft.com> --- eng/common/pipelines/templates/steps/verify-changelogs.yml | 4 ++++ eng/common/scripts/Verify-ChangeLogs.ps1 | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/eng/common/pipelines/templates/steps/verify-changelogs.yml b/eng/common/pipelines/templates/steps/verify-changelogs.yml index 3f36954f4cd8..5d6cdf26e99a 100644 --- a/eng/common/pipelines/templates/steps/verify-changelogs.yml +++ b/eng/common/pipelines/templates/steps/verify-changelogs.yml @@ -4,6 +4,9 @@ parameters: - name: Condition type: string default: succeeded() +- name: ForRelease + type: boolean + default: false steps: - task: Powershell@2 @@ -11,6 +14,7 @@ steps: filePath: $(Build.SourcesDirectory)/eng/common/scripts/Verify-ChangeLogs.ps1 arguments: > -PackagePropertiesFolder '${{ parameters.PackagePropertiesFolder }}' + -ForRelease $${{ parameters.ForRelease }} pwsh: true displayName: Verify ChangeLogEntries condition: ${{ parameters.Condition }} diff --git a/eng/common/scripts/Verify-ChangeLogs.ps1 b/eng/common/scripts/Verify-ChangeLogs.ps1 index 9598472720c5..242d00b3da43 100644 --- a/eng/common/scripts/Verify-ChangeLogs.ps1 +++ b/eng/common/scripts/Verify-ChangeLogs.ps1 @@ -1,7 +1,8 @@ # Wrapper Script for ChangeLog Verification in a PR [CmdletBinding()] param ( - [String]$PackagePropertiesFolder + [String]$PackagePropertiesFolder, + [boolean]$ForRelease = $False ) Set-StrictMode -Version 3 @@ -33,7 +34,9 @@ foreach($propertiesFile in $packageProperties) { continue } - $validChangeLog = Confirm-ChangeLogEntry -ChangeLogLocation $PackageProp.ChangeLogPath -VersionString $PackageProp.Version -ForRelease $false + Write-Host "Verifying changelog for $($PackageProp.Name)" + + $validChangeLog = Confirm-ChangeLogEntry -ChangeLogLocation $PackageProp.ChangeLogPath -VersionString $PackageProp.Version -ForRelease $ForRelease if (-not $validChangeLog) { $allPassing = $false From f20192bb25d2b468f39dbd8560a50b15489faaad Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:51:41 +0800 Subject: [PATCH 085/186] Add unit test for CachingConnectionFactory producer/consumer reuse and update azure-servicebus-jms to 2.1.0 (#47282) --- eng/versioning/external_dependencies.txt | 2 +- .../spring-cloud-azure-autoconfigure/pom.xml | 4 +- ...msConnectionFactoryConfigurationTests.java | 103 ++++++++++++++++++ .../pom.xml | 2 +- 4 files changed, 107 insertions(+), 4 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 5be8a8557264..ee3006837816 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -8,7 +8,7 @@ # Format; # groupId:artifactId;dependency-version ch.qos.logback:logback-classic;1.3.14 -com.azure:azure-servicebus-jms;2.0.0 +com.azure:azure-servicebus-jms;2.1.0 com.azure.tools:azure-autorest-customization;1.0.0-beta.11 com.fasterxml:aalto-xml;1.3.3 com.fasterxml.jackson.core:jackson-annotations;2.18.4 diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index b6cdb1aefa60..d9a5de8fe98d 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -140,7 +140,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-servicebus-jms</artifactId> - <version>2.0.0</version> <!-- {x-version-update;com.azure:azure-servicebus-jms;external_dependency} --> + <version>2.1.0</version> <!-- {x-version-update;com.azure:azure-servicebus-jms;external_dependency} --> <optional>true</optional> <exclusions> <exclusion> @@ -542,7 +542,7 @@ <rules> <bannedDependencies> <includes> - <include>com.azure:azure-servicebus-jms:[2.0.0]</include> <!-- {x-include-update;com.azure:azure-servicebus-jms;external_dependency} --> + <include>com.azure:azure-servicebus-jms:[2.1.0]</include> <!-- {x-include-update;com.azure:azure-servicebus-jms;external_dependency} --> <include>com.mysql:mysql-connector-j:[9.4.0]</include> <!-- {x-include-update;springboot3_com.mysql:mysql-connector-j;external_dependency} --> <include>com.fasterxml.jackson.core:jackson-annotations:[2.19.2]</include> <!-- {x-include-update;springboot3_com.fasterxml.jackson.core:jackson-annotations;external_dependency} --> <include>com.fasterxml.jackson.core:jackson-core:[2.19.2]</include> <!-- {x-include-update;springboot3_com.fasterxml.jackson.core:jackson-core;external_dependency} --> diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfigurationTests.java index 10c9fe284a21..1e58a992365c 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfigurationTests.java @@ -5,6 +5,13 @@ import com.azure.servicebus.jms.ServiceBusJmsConnectionFactory; import com.azure.spring.cloud.autoconfigure.implementation.context.properties.AzureGlobalProperties; +import jakarta.jms.Connection; +import jakarta.jms.ConnectionFactory; +import jakarta.jms.Destination; +import jakarta.jms.MessageProducer; +import jakarta.jms.Queue; +import jakarta.jms.Session; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; import org.messaginghub.pooled.jms.JmsPoolConnectionFactory; @@ -18,6 +25,11 @@ import static com.azure.spring.cloud.autoconfigure.implementation.util.TestServiceBusUtils.CONNECTION_STRING_FORMAT; import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; class ServiceBusJmsConnectionFactoryConfigurationTests { @@ -140,6 +152,97 @@ void useCacheConnectionViaAdditionConfigurationFile(String pricingTier) { }); } + @Test + void cachingConnectionFactoryReusesSameProducerForSameDestination() throws Exception { + // Create mock objects for JMS components + ConnectionFactory mockTargetConnectionFactory = mock(ConnectionFactory.class); + Connection mockConnection = mock(Connection.class); + // Create a mock inner session that ServiceBusJmsSession will wrap + Session mockInnerSession = mock(Session.class); + // Create mock inner queues that the inner session returns + Queue mockInnerQueue1 = mock(Queue.class); + Queue mockInnerQueue2 = mock(Queue.class); + Queue mockInnerQueue3 = mock(Queue.class); + when(mockInnerQueue1.getQueueName()).thenReturn("queue1"); + when(mockInnerQueue2.getQueueName()).thenReturn("queue1"); + when(mockInnerQueue3.getQueueName()).thenReturn("queue2"); + when(mockInnerSession.createQueue("queue1")) + .thenReturn(mockInnerQueue1) + .thenReturn(mockInnerQueue2) + .thenReturn(mockInnerQueue1) + .thenReturn(mockInnerQueue2); + when(mockInnerSession.createQueue("queue2")) + .thenReturn(mockInnerQueue3) + .thenReturn(mockInnerQueue3); + + // Create ServiceBusJmsSession using reflection (constructor is package-private) + // ServiceBusJmsSession.createQueue() wraps the inner Queue in ServiceBusJmsQueue + // which has the proper toString() implementation in azure-servicebus-jms 2.1.0 + Session serviceBusJmsSession = createServiceBusJmsSession(mockInnerSession); + + // Create mock producers - each call to createProducer returns a new unique producer + MessageProducer mockProducer1 = mock(MessageProducer.class); + MessageProducer mockProducer2 = mock(MessageProducer.class); + MessageProducer mockProducer3 = mock(MessageProducer.class); + + // Setup mock behavior for connection and session + when(mockTargetConnectionFactory.createConnection()).thenReturn(mockConnection); + when(mockConnection.createSession(anyBoolean(), anyInt())).thenReturn(serviceBusJmsSession); + // Mock createProducer to return different producers for each call + // This simulates that each ServiceBusJmsQueue instance would get a different producer + // if caching doesn't work (i.e., toString() returns unique values as in 2.0.0) + when(mockInnerSession.createProducer(any(Destination.class))) + .thenReturn(mockProducer1) + .thenReturn(mockProducer2) + .thenReturn(mockProducer3); + + // Create CachingConnectionFactory with caching enabled + CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory(mockTargetConnectionFactory); + cachingConnectionFactory.setCacheProducers(true); + + // Get connection and session + Connection connection = cachingConnectionFactory.createConnection(); + Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + + // Create queues - these are ServiceBusJmsQueue instances + Queue queue1FirstCall = session.createQueue("queue1"); + Queue queue1SecondCall = session.createQueue("queue1"); + Queue queue2 = session.createQueue("queue2"); + + // First call: create producer for queue1 (first ServiceBusJmsQueue instance) + MessageProducer producer1ForQueue1 = session.createProducer(queue1FirstCall); + // Second call: create producer for queue1 (second ServiceBusJmsQueue instance) + // In azure-servicebus-jms 2.1.0, this returns cached producer because toString() is consistent + // In azure-servicebus-jms 2.0.0, this would return a different producer because toString() was unique + MessageProducer producer2ForQueue1 = session.createProducer(queue1SecondCall); + // Third call: create producer for different queue2 - should return different producer + MessageProducer producerForQueue2 = session.createProducer(queue2); + + // Verify: same producer is returned for same queue name + // This assertion would fail with azure-servicebus-jms 2.0.0 because toString() returned unique values + assertThat(producer1ForQueue1.toString()) + .as("Same producer should be returned for ServiceBusJmsQueue instances with same queue name") + .isEqualTo(producer2ForQueue1.toString()); + + // Verify: different producer is returned for different queue name + assertThat(producer1ForQueue1.toString()) + .as("Different producer should be returned for different queue name") + .isNotEqualTo(producerForQueue2.toString()); + + // Cleanup + connection.close(); + } + + /** + * Creates a ServiceBusJmsSession instance using reflection since the constructor is package-private. + */ + private Session createServiceBusJmsSession(Session innerSession) throws Exception { + Class<?> sessionClass = Class.forName("com.azure.servicebus.jms.ServiceBusJmsSession"); + java.lang.reflect.Constructor<?> constructor = sessionClass.getDeclaredConstructor(Session.class); + constructor.setAccessible(true); + return (Session) constructor.newInstance(innerSession); + } + @Configuration @PropertySource("classpath:servicebus/additional.properties") static class AdditionalPropertySourceConfiguration { diff --git a/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml b/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml index 26566866ec53..3761f861defd 100644 --- a/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml @@ -106,7 +106,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-servicebus-jms</artifactId> - <version>2.0.0</version> <!-- {x-version-update;com.azure:azure-servicebus-jms;external_dependency} --> + <version>2.1.0</version> <!-- {x-version-update;com.azure:azure-servicebus-jms;external_dependency} --> <exclusions> <exclusion> <groupId>com.azure</groupId> From 2e60d55db848b6a4dc29663914f44646453a84f0 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Wed, 3 Dec 2025 10:02:21 +0800 Subject: [PATCH 086/186] Revert "replace alwaysApplyingWhenNonNull() with always()" This reverts commit ee56cc09dc7d9c03665879244c2016186facb857. --- ...eEventHubsConsumerClientConfiguration.java | 6 +- .../properties/AzureEventHubsProperties.java | 90 ++++++------- .../properties/AzureServiceBusProperties.java | 118 +++++++++--------- 3 files changed, 107 insertions(+), 107 deletions(-) diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsConsumerClientConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsConsumerClientConfiguration.java index 957abf7303c6..f1a8bc145d36 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsConsumerClientConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsConsumerClientConfiguration.java @@ -51,9 +51,9 @@ static class SharedConsumerConnectionConfiguration { SharedConsumerConnectionConfiguration(AzureEventHubsProperties properties, EventHubClientBuilder builder) { this.builder = builder; - PropertyMapper mapper = PropertyMapper.get(); - mapper.from(properties.getConsumer().getConsumerGroup()).always().to(builder::consumerGroup); - mapper.from(properties.getConsumer().getPrefetchCount()).always().to(builder::prefetchCount); + PropertyMapper mapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); + mapper.from(properties.getConsumer().getConsumerGroup()).to(builder::consumerGroup); + mapper.from(properties.getConsumer().getPrefetchCount()).to(builder::prefetchCount); } @Bean diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/properties/AzureEventHubsProperties.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/properties/AzureEventHubsProperties.java index d595fe48e8be..a0ca762af1e2 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/properties/AzureEventHubsProperties.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/properties/AzureEventHubsProperties.java @@ -44,82 +44,82 @@ public class AzureEventHubsProperties extends AzureEventHubsCommonProperties private final Processor processor = new Processor(); public Producer buildProducerProperties() { - PropertyMapper propertyMapper = PropertyMapper.get(); + PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); Producer properties = new Producer(); AzurePropertiesUtils.mergeAzureCommonProperties(this, this.producer, properties); - propertyMapper.from(this.getDomainName()).always().to(properties::setDomainName); - propertyMapper.from(this.getNamespace()).always().to(properties::setNamespace); - propertyMapper.from(this.getEventHubName()).always().to(properties::setEventHubName); - propertyMapper.from(this.getConnectionString()).always().to(properties::setConnectionString); - propertyMapper.from(this.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); + propertyMapper.from(this.getDomainName()).to(properties::setDomainName); + propertyMapper.from(this.getNamespace()).to(properties::setNamespace); + propertyMapper.from(this.getEventHubName()).to(properties::setEventHubName); + propertyMapper.from(this.getConnectionString()).to(properties::setConnectionString); + propertyMapper.from(this.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); - propertyMapper.from(this.producer.getDomainName()).always().to(properties::setDomainName); - propertyMapper.from(this.producer.getNamespace()).always().to(properties::setNamespace); - propertyMapper.from(this.producer.getEventHubName()).always().to(properties::setEventHubName); - propertyMapper.from(this.producer.getConnectionString()).always().to(properties::setConnectionString); - propertyMapper.from(this.producer.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); + propertyMapper.from(this.producer.getDomainName()).to(properties::setDomainName); + propertyMapper.from(this.producer.getNamespace()).to(properties::setNamespace); + propertyMapper.from(this.producer.getEventHubName()).to(properties::setEventHubName); + propertyMapper.from(this.producer.getConnectionString()).to(properties::setConnectionString); + propertyMapper.from(this.producer.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); return properties; } public Consumer buildConsumerProperties() { - PropertyMapper propertyMapper = PropertyMapper.get(); + PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); Consumer properties = new Consumer(); AzurePropertiesUtils.mergeAzureCommonProperties(this, this.consumer, properties); - propertyMapper.from(this.getDomainName()).always().to(properties::setDomainName); - propertyMapper.from(this.getNamespace()).always().to(properties::setNamespace); - propertyMapper.from(this.getEventHubName()).always().to(properties::setEventHubName); - propertyMapper.from(this.getConnectionString()).always().to(properties::setConnectionString); - propertyMapper.from(this.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); + propertyMapper.from(this.getDomainName()).to(properties::setDomainName); + propertyMapper.from(this.getNamespace()).to(properties::setNamespace); + propertyMapper.from(this.getEventHubName()).to(properties::setEventHubName); + propertyMapper.from(this.getConnectionString()).to(properties::setConnectionString); + propertyMapper.from(this.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); - propertyMapper.from(this.consumer.getDomainName()).always().to(properties::setDomainName); - propertyMapper.from(this.consumer.getNamespace()).always().to(properties::setNamespace); - propertyMapper.from(this.consumer.getEventHubName()).always().to(properties::setEventHubName); - propertyMapper.from(this.consumer.getConnectionString()).always().to(properties::setConnectionString); - propertyMapper.from(this.consumer.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); - propertyMapper.from(this.consumer.getPrefetchCount()).always().to(properties::setPrefetchCount); - propertyMapper.from(this.consumer.getConsumerGroup()).always().to(properties::setConsumerGroup); + propertyMapper.from(this.consumer.getDomainName()).to(properties::setDomainName); + propertyMapper.from(this.consumer.getNamespace()).to(properties::setNamespace); + propertyMapper.from(this.consumer.getEventHubName()).to(properties::setEventHubName); + propertyMapper.from(this.consumer.getConnectionString()).to(properties::setConnectionString); + propertyMapper.from(this.consumer.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); + propertyMapper.from(this.consumer.getPrefetchCount()).to(properties::setPrefetchCount); + propertyMapper.from(this.consumer.getConsumerGroup()).to(properties::setConsumerGroup); return properties; } public Processor buildProcessorProperties() { - PropertyMapper propertyMapper = PropertyMapper.get(); + PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); Processor properties = new Processor(); AzurePropertiesUtils.mergeAzureCommonProperties(this, this.processor, properties); - propertyMapper.from(this.getDomainName()).always().to(properties::setDomainName); - propertyMapper.from(this.getNamespace()).always().to(properties::setNamespace); - propertyMapper.from(this.getEventHubName()).always().to(properties::setEventHubName); - propertyMapper.from(this.getConnectionString()).always().to(properties::setConnectionString); - propertyMapper.from(this.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); - - propertyMapper.from(this.processor.getDomainName()).always().to(properties::setDomainName); - propertyMapper.from(this.processor.getNamespace()).always().to(properties::setNamespace); - propertyMapper.from(this.processor.getEventHubName()).always().to(properties::setEventHubName); - propertyMapper.from(this.processor.getConnectionString()).always().to(properties::setConnectionString); - propertyMapper.from(this.processor.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); - propertyMapper.from(this.processor.getPrefetchCount()).always().to(properties::setPrefetchCount); - propertyMapper.from(this.processor.getConsumerGroup()).always().to(properties::setConsumerGroup); - - propertyMapper.from(this.processor.trackLastEnqueuedEventProperties).always().to(properties::setTrackLastEnqueuedEventProperties); + propertyMapper.from(this.getDomainName()).to(properties::setDomainName); + propertyMapper.from(this.getNamespace()).to(properties::setNamespace); + propertyMapper.from(this.getEventHubName()).to(properties::setEventHubName); + propertyMapper.from(this.getConnectionString()).to(properties::setConnectionString); + propertyMapper.from(this.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); + + propertyMapper.from(this.processor.getDomainName()).to(properties::setDomainName); + propertyMapper.from(this.processor.getNamespace()).to(properties::setNamespace); + propertyMapper.from(this.processor.getEventHubName()).to(properties::setEventHubName); + propertyMapper.from(this.processor.getConnectionString()).to(properties::setConnectionString); + propertyMapper.from(this.processor.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); + propertyMapper.from(this.processor.getPrefetchCount()).to(properties::setPrefetchCount); + propertyMapper.from(this.processor.getConsumerGroup()).to(properties::setConsumerGroup); + + propertyMapper.from(this.processor.trackLastEnqueuedEventProperties).to(properties::setTrackLastEnqueuedEventProperties); propertyMapper.from(this.processor.initialPartitionEventPosition).when(c -> !CollectionUtils.isEmpty(c)) - .always().to(m -> { + .to(m -> { Map<String, Processor.StartPosition> eventPositionMap = m.entrySet() .stream() .filter(entry -> entry.getValue() != null) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); properties.getInitialPartitionEventPosition().putAll(eventPositionMap); }); - propertyMapper.from(this.processor.batch.getMaxSize()).always().to(properties.batch::setMaxSize); - propertyMapper.from(this.processor.batch.getMaxWaitTime()).always().to(properties.batch::setMaxWaitTime); - propertyMapper.from(this.processor.loadBalancing.getStrategy()).always().to(properties.loadBalancing::setStrategy); - propertyMapper.from(this.processor.loadBalancing.getUpdateInterval()).always().to(properties.loadBalancing::setUpdateInterval); + propertyMapper.from(this.processor.batch.getMaxSize()).to(properties.batch::setMaxSize); + propertyMapper.from(this.processor.batch.getMaxWaitTime()).to(properties.batch::setMaxWaitTime); + propertyMapper.from(this.processor.loadBalancing.getStrategy()).to(properties.loadBalancing::setStrategy); + propertyMapper.from(this.processor.loadBalancing.getUpdateInterval()).to(properties.loadBalancing::setUpdateInterval); AzurePropertiesUtils.mergeAzureCommonProperties(properties, this.processor.getCheckpointStore(), properties.checkpointStore); BeanUtils.copyProperties(this.processor.checkpointStore, properties.checkpointStore); diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/properties/AzureServiceBusProperties.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/properties/AzureServiceBusProperties.java index f63f951ee087..780d0168ea0c 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/properties/AzureServiceBusProperties.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/properties/AzureServiceBusProperties.java @@ -57,91 +57,91 @@ public Processor getProcessor() { } public Producer buildProducerProperties() { - PropertyMapper propertyMapper = PropertyMapper.get(); + PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); Producer properties = new Producer(); AzurePropertiesUtils.mergeAzureCommonProperties(this, this.producer, properties); - propertyMapper.from(this.getDomainName()).always().to(properties::setDomainName); - propertyMapper.from(this.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); - propertyMapper.from(this.getNamespace()).always().to(properties::setNamespace); - propertyMapper.from(this.getConnectionString()).always().to(properties::setConnectionString); - propertyMapper.from(this.getEntityName()).always().to(properties::setEntityName); - propertyMapper.from(this.getEntityType()).always().to(properties::setEntityType); + propertyMapper.from(this.getDomainName()).to(properties::setDomainName); + propertyMapper.from(this.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); + propertyMapper.from(this.getNamespace()).to(properties::setNamespace); + propertyMapper.from(this.getConnectionString()).to(properties::setConnectionString); + propertyMapper.from(this.getEntityName()).to(properties::setEntityName); + propertyMapper.from(this.getEntityType()).to(properties::setEntityType); - propertyMapper.from(this.producer.getDomainName()).always().to(properties::setDomainName); - propertyMapper.from(this.producer.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); - propertyMapper.from(this.producer.getNamespace()).always().to(properties::setNamespace); - propertyMapper.from(this.producer.getConnectionString()).always().to(properties::setConnectionString); - propertyMapper.from(this.producer.getEntityType()).always().to(properties::setEntityType); - propertyMapper.from(this.producer.getEntityName()).always().to(properties::setEntityName); + propertyMapper.from(this.producer.getDomainName()).to(properties::setDomainName); + propertyMapper.from(this.producer.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); + propertyMapper.from(this.producer.getNamespace()).to(properties::setNamespace); + propertyMapper.from(this.producer.getConnectionString()).to(properties::setConnectionString); + propertyMapper.from(this.producer.getEntityType()).to(properties::setEntityType); + propertyMapper.from(this.producer.getEntityName()).to(properties::setEntityName); return properties; } public Consumer buildConsumerProperties() { - PropertyMapper propertyMapper = PropertyMapper.get(); + PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); Consumer properties = new Consumer(); AzurePropertiesUtils.mergeAzureCommonProperties(this, this.consumer, properties); - propertyMapper.from(this.getDomainName()).always().to(properties::setDomainName); - propertyMapper.from(this.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); - propertyMapper.from(this.getNamespace()).always().to(properties::setNamespace); - propertyMapper.from(this.getConnectionString()).always().to(properties::setConnectionString); - propertyMapper.from(this.getEntityName()).always().to(properties::setEntityName); - propertyMapper.from(this.getEntityType()).always().to(properties::setEntityType); - - propertyMapper.from(this.consumer.getDomainName()).always().to(properties::setDomainName); - propertyMapper.from(this.consumer.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); - propertyMapper.from(this.consumer.getNamespace()).always().to(properties::setNamespace); - propertyMapper.from(this.consumer.getConnectionString()).always().to(properties::setConnectionString); - propertyMapper.from(this.consumer.getEntityType()).always().to(properties::setEntityType); - propertyMapper.from(this.consumer.getEntityName()).always().to(properties::setEntityName); - - propertyMapper.from(this.consumer.getSessionEnabled()).always().to(properties::setSessionEnabled); - propertyMapper.from(this.consumer.getAutoComplete()).always().to(properties::setAutoComplete); - propertyMapper.from(this.consumer.getPrefetchCount()).always().to(properties::setPrefetchCount); - propertyMapper.from(this.consumer.getSubQueue()).always().to(properties::setSubQueue); - propertyMapper.from(this.consumer.getReceiveMode()).always().to(properties::setReceiveMode); - propertyMapper.from(this.consumer.getSubscriptionName()).always().to(properties::setSubscriptionName); - propertyMapper.from(this.consumer.getMaxAutoLockRenewDuration()).always().to(properties::setMaxAutoLockRenewDuration); + propertyMapper.from(this.getDomainName()).to(properties::setDomainName); + propertyMapper.from(this.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); + propertyMapper.from(this.getNamespace()).to(properties::setNamespace); + propertyMapper.from(this.getConnectionString()).to(properties::setConnectionString); + propertyMapper.from(this.getEntityName()).to(properties::setEntityName); + propertyMapper.from(this.getEntityType()).to(properties::setEntityType); + + propertyMapper.from(this.consumer.getDomainName()).to(properties::setDomainName); + propertyMapper.from(this.consumer.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); + propertyMapper.from(this.consumer.getNamespace()).to(properties::setNamespace); + propertyMapper.from(this.consumer.getConnectionString()).to(properties::setConnectionString); + propertyMapper.from(this.consumer.getEntityType()).to(properties::setEntityType); + propertyMapper.from(this.consumer.getEntityName()).to(properties::setEntityName); + + propertyMapper.from(this.consumer.getSessionEnabled()).to(properties::setSessionEnabled); + propertyMapper.from(this.consumer.getAutoComplete()).to(properties::setAutoComplete); + propertyMapper.from(this.consumer.getPrefetchCount()).to(properties::setPrefetchCount); + propertyMapper.from(this.consumer.getSubQueue()).to(properties::setSubQueue); + propertyMapper.from(this.consumer.getReceiveMode()).to(properties::setReceiveMode); + propertyMapper.from(this.consumer.getSubscriptionName()).to(properties::setSubscriptionName); + propertyMapper.from(this.consumer.getMaxAutoLockRenewDuration()).to(properties::setMaxAutoLockRenewDuration); return properties; } public Processor buildProcessorProperties() { - PropertyMapper propertyMapper = PropertyMapper.get(); + PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); Processor properties = new Processor(); AzurePropertiesUtils.mergeAzureCommonProperties(this, this.processor, properties); - propertyMapper.from(this.getDomainName()).always().to(properties::setDomainName); - propertyMapper.from(this.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); - propertyMapper.from(this.getNamespace()).always().to(properties::setNamespace); - propertyMapper.from(this.getConnectionString()).always().to(properties::setConnectionString); - propertyMapper.from(this.getEntityName()).always().to(properties::setEntityName); - propertyMapper.from(this.getEntityType()).always().to(properties::setEntityType); - - propertyMapper.from(this.processor.getDomainName()).always().to(properties::setDomainName); - propertyMapper.from(this.processor.getCustomEndpointAddress()).always().to(properties::setCustomEndpointAddress); - propertyMapper.from(this.processor.getNamespace()).always().to(properties::setNamespace); - propertyMapper.from(this.processor.getConnectionString()).always().to(properties::setConnectionString); - propertyMapper.from(this.processor.getEntityType()).always().to(properties::setEntityType); - propertyMapper.from(this.processor.getEntityName()).always().to(properties::setEntityName); - - propertyMapper.from(this.processor.getSessionEnabled()).always().to(properties::setSessionEnabled); - propertyMapper.from(this.processor.getAutoComplete()).always().to(properties::setAutoComplete); - propertyMapper.from(this.processor.getPrefetchCount()).always().to(properties::setPrefetchCount); - propertyMapper.from(this.processor.getSubQueue()).always().to(properties::setSubQueue); - propertyMapper.from(this.processor.getReceiveMode()).always().to(properties::setReceiveMode); - propertyMapper.from(this.processor.getSubscriptionName()).always().to(properties::setSubscriptionName); - propertyMapper.from(this.processor.getMaxAutoLockRenewDuration()).always().to(properties::setMaxAutoLockRenewDuration); - propertyMapper.from(this.processor.getMaxConcurrentCalls()).always().to(properties::setMaxConcurrentCalls); - propertyMapper.from(this.processor.getMaxConcurrentSessions()).always().to(properties::setMaxConcurrentSessions); + propertyMapper.from(this.getDomainName()).to(properties::setDomainName); + propertyMapper.from(this.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); + propertyMapper.from(this.getNamespace()).to(properties::setNamespace); + propertyMapper.from(this.getConnectionString()).to(properties::setConnectionString); + propertyMapper.from(this.getEntityName()).to(properties::setEntityName); + propertyMapper.from(this.getEntityType()).to(properties::setEntityType); + + propertyMapper.from(this.processor.getDomainName()).to(properties::setDomainName); + propertyMapper.from(this.processor.getCustomEndpointAddress()).to(properties::setCustomEndpointAddress); + propertyMapper.from(this.processor.getNamespace()).to(properties::setNamespace); + propertyMapper.from(this.processor.getConnectionString()).to(properties::setConnectionString); + propertyMapper.from(this.processor.getEntityType()).to(properties::setEntityType); + propertyMapper.from(this.processor.getEntityName()).to(properties::setEntityName); + + propertyMapper.from(this.processor.getSessionEnabled()).to(properties::setSessionEnabled); + propertyMapper.from(this.processor.getAutoComplete()).to(properties::setAutoComplete); + propertyMapper.from(this.processor.getPrefetchCount()).to(properties::setPrefetchCount); + propertyMapper.from(this.processor.getSubQueue()).to(properties::setSubQueue); + propertyMapper.from(this.processor.getReceiveMode()).to(properties::setReceiveMode); + propertyMapper.from(this.processor.getSubscriptionName()).to(properties::setSubscriptionName); + propertyMapper.from(this.processor.getMaxAutoLockRenewDuration()).to(properties::setMaxAutoLockRenewDuration); + propertyMapper.from(this.processor.getMaxConcurrentCalls()).to(properties::setMaxConcurrentCalls); + propertyMapper.from(this.processor.getMaxConcurrentSessions()).to(properties::setMaxConcurrentSessions); return properties; } From 20cff88816a7dd8f19d6c5acd009be326fb2df67 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Wed, 3 Dec 2025 10:07:51 +0800 Subject: [PATCH 087/186] remove alwaysApplyingWhenNonNull() --- .../AzureEventHubsConsumerClientConfiguration.java | 2 +- .../eventhubs/properties/AzureEventHubsProperties.java | 6 +++--- .../servicebus/properties/AzureServiceBusProperties.java | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsConsumerClientConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsConsumerClientConfiguration.java index f1a8bc145d36..a7fd2cbd2b76 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsConsumerClientConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsConsumerClientConfiguration.java @@ -51,7 +51,7 @@ static class SharedConsumerConnectionConfiguration { SharedConsumerConnectionConfiguration(AzureEventHubsProperties properties, EventHubClientBuilder builder) { this.builder = builder; - PropertyMapper mapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); + PropertyMapper mapper = PropertyMapper.get(); mapper.from(properties.getConsumer().getConsumerGroup()).to(builder::consumerGroup); mapper.from(properties.getConsumer().getPrefetchCount()).to(builder::prefetchCount); } diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/properties/AzureEventHubsProperties.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/properties/AzureEventHubsProperties.java index a0ca762af1e2..0b55ae5ae3a4 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/properties/AzureEventHubsProperties.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/properties/AzureEventHubsProperties.java @@ -44,7 +44,7 @@ public class AzureEventHubsProperties extends AzureEventHubsCommonProperties private final Processor processor = new Processor(); public Producer buildProducerProperties() { - PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); + PropertyMapper propertyMapper = PropertyMapper.get(); Producer properties = new Producer(); AzurePropertiesUtils.mergeAzureCommonProperties(this, this.producer, properties); @@ -65,7 +65,7 @@ public Producer buildProducerProperties() { } public Consumer buildConsumerProperties() { - PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); + PropertyMapper propertyMapper = PropertyMapper.get(); Consumer properties = new Consumer(); AzurePropertiesUtils.mergeAzureCommonProperties(this, this.consumer, properties); @@ -88,7 +88,7 @@ public Consumer buildConsumerProperties() { } public Processor buildProcessorProperties() { - PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); + PropertyMapper propertyMapper = PropertyMapper.get(); Processor properties = new Processor(); AzurePropertiesUtils.mergeAzureCommonProperties(this, this.processor, properties); diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/properties/AzureServiceBusProperties.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/properties/AzureServiceBusProperties.java index 780d0168ea0c..314f938cef45 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/properties/AzureServiceBusProperties.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/properties/AzureServiceBusProperties.java @@ -57,7 +57,7 @@ public Processor getProcessor() { } public Producer buildProducerProperties() { - PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); + PropertyMapper propertyMapper = PropertyMapper.get(); Producer properties = new Producer(); @@ -81,7 +81,7 @@ public Producer buildProducerProperties() { } public Consumer buildConsumerProperties() { - PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); + PropertyMapper propertyMapper = PropertyMapper.get(); Consumer properties = new Consumer(); @@ -113,7 +113,7 @@ public Consumer buildConsumerProperties() { } public Processor buildProcessorProperties() { - PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); + PropertyMapper propertyMapper = PropertyMapper.get(); Processor properties = new Processor(); From fad5e4f3f9ef891e68032936493d3be75cb5b833 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 2 Dec 2025 21:00:18 -0800 Subject: [PATCH 088/186] [Automation] Generate SDK based on TypeSpec 0.37.1 (#47418) --- eng/emitter-package-lock.json | 27 +- eng/emitter-package.json | 4 +- .../Compare-CurrentToCodegeneration.ps1 | 3 +- eng/versioning/version_client.txt | 2 +- .../azure-communication-jobrouter/pom.xml | 2 +- .../fluent/WatchersClient.java | 22 +- .../implementation/WatcherImpl.java | 16 +- .../implementation/WatchersClientImpl.java | 63 +-- .../implementation/WatchersImpl.java | 36 +- .../databasewatcher/models/Watcher.java | 12 +- .../databasewatcher/models/Watchers.java | 12 +- ...esCreateOrUpdateWithResponseMockTests.java | 27 +- ...eResourcesDeleteWithResponseMockTests.java | 2 +- ...RuleResourcesGetWithResponseMockTests.java | 12 +- ...ertRuleResourcesListByParentMockTests.java | 16 +- ...edPrivateLinkResourcesCreateMockTests.java | 22 +- ...LinkResourcesGetWithResponseMockTests.java | 12 +- ...teLinkResourcesListByWatcherMockTests.java | 12 +- .../TargetsDeleteWithResponseMockTests.java | 3 +- .../WatchersCreateOrUpdateMockTests.java | 57 +-- .../generated/WatchersStartMockTests.java | 20 +- .../generated/WatchersStopMockTests.java | 20 +- .../fluent/IotDpsResourcesClient.java | 16 +- .../IotDpsResourcesClientImpl.java | 40 +- .../implementation/IotDpsResourcesImpl.java | 27 +- .../models/IotDpsResources.java | 12 +- ...visioningServiceNameAvailabiMockTests.java | 8 +- ...UpdatePrivateEndpointConnectMockTests.java | 24 +- ...etePrivateEndpointConnectionMockTests.java | 13 +- ...ateEndpointConnectionsWithReMockTests.java | 10 +- .../SAMPLE.md | 484 +++++++++++++++--- .../pom.xml | 1 + .../fluent/NamespacesClient.java | 16 +- .../implementation/NamespaceImpl.java | 9 +- .../implementation/NamespacesClientImpl.java | 39 +- .../implementation/NamespacesImpl.java | 23 +- .../deviceregistry/models/Namespace.java | 6 +- .../deviceregistry/models/Namespaces.java | 7 +- ...ingContainersGetWithResponseMockTests.java | 4 +- .../BillingContainersListMockTests.java | 2 +- .../DatasetMqttDestinationTests.java | 14 +- .../DatasetStorageDestinationTests.java | 8 +- .../DeviceMessagingEndpointTests.java | 16 +- .../generated/DeviceRefTests.java | 14 +- .../DiscoveredInboundEndpointsTests.java | 35 +- .../DiscoveredMessagingEndpointsTests.java | 90 ++-- .../DiscoveredOutboundEndpointsTests.java | 21 +- .../generated/EventMqttDestinationTests.java | 20 +- .../EventStorageDestinationTests.java | 8 +- .../generated/ManagementActionTests.java | 44 +- .../generated/ManagementGroupTests.java | 101 ++-- .../MqttDestinationConfigurationTests.java | 20 +- .../NamespaceDatasetDataPointTests.java | 26 +- .../generated/NamespaceDatasetTests.java | 68 +-- .../NamespaceDeviceListResultTests.java | 42 +- ...espaceDiscoveredDatasetDataPointTests.java | 33 +- .../NamespaceDiscoveredDatasetTests.java | 77 ++- .../NamespaceDiscoveredDeviceInnerTests.java | 176 +++---- ...espaceDiscoveredDeviceListResultTests.java | 38 +- ...espaceDiscoveredDevicePropertiesTests.java | 132 ++--- ...DiscoveredDeviceUpdatePropertiesTests.java | 109 ++-- .../NamespaceDiscoveredDeviceUpdateTests.java | 136 +++-- ...overedDevicesCreateOrReplaceMockTests.java | 120 ++--- ...overedDevicesGetWithResponseMockTests.java | 46 +- ...edDevicesListByResourceGroupMockTests.java | 54 +- .../NamespaceDiscoveredEventGroupTests.java | 89 ++-- .../NamespaceDiscoveredEventTests.java | 35 +- ...espaceDiscoveredManagementActionTests.java | 47 +- ...mespaceDiscoveredManagementGroupTests.java | 130 ++--- .../NamespaceDiscoveredStreamTests.java | 28 +- .../generated/NamespaceEventGroupTests.java | 77 ++- .../generated/NamespaceEventTests.java | 26 +- .../NamespaceMessageSchemaReferenceTests.java | 2 +- .../generated/NamespaceStreamTests.java | 22 +- .../NamespacesCreateOrReplaceMockTests.java | 42 +- ...tByResourceGroupWithResponseMockTests.java | 21 +- ...amespacesListByResourceGroupMockTests.java | 20 +- .../generated/NamespacesListMockTests.java | 21 +- .../generated/NamespacesMigrateMockTests.java | 38 ++ .../generated/OperationsListMockTests.java | 2 +- .../generated/OutboundEndpointsTests.java | 32 +- .../generated/SchemaInnerTests.java | 21 +- .../generated/SchemaListResultTests.java | 10 +- .../generated/SchemaPropertiesTests.java | 28 +- ...emaRegistriesCreateOrReplaceMockTests.java | 30 +- ...tByResourceGroupWithResponseMockTests.java | 18 +- ...egistriesListByResourceGroupMockTests.java | 16 +- .../SchemaRegistriesListMockTests.java | 14 +- .../generated/SchemaRegistryInnerTests.java | 38 +- .../SchemaRegistryListResultTests.java | 19 +- .../SchemaRegistryPropertiesTests.java | 26 +- .../SchemaRegistryUpdatePropertiesTests.java | 12 +- .../generated/SchemaRegistryUpdateTests.java | 25 +- .../generated/SchemaVersionInnerTests.java | 12 +- .../SchemaVersionListResultTests.java | 8 +- .../SchemaVersionPropertiesTests.java | 13 +- ...sCreateOrReplaceWithResponseMockTests.java | 12 +- ...chemaVersionsGetWithResponseMockTests.java | 9 +- .../SchemaVersionsListBySchemaMockTests.java | 8 +- ...sCreateOrReplaceWithResponseMockTests.java | 20 +- .../SchemasGetWithResponseMockTests.java | 10 +- .../SchemasListBySchemaRegistryMockTests.java | 10 +- .../StorageDestinationConfigurationTests.java | 8 +- .../generated/StreamMqttDestinationTests.java | 14 +- .../StreamStorageDestinationTests.java | 10 +- .../generated/TrustSettingsTests.java | 8 +- .../MhsmPrivateEndpointConnectionsClient.java | 23 +- .../PrivateEndpointConnectionsClient.java | 23 +- ...mPrivateEndpointConnectionsClientImpl.java | 45 +- .../PrivateEndpointConnectionsClientImpl.java | 42 +- .../keyvault/generated/AttributesTests.java | 33 ++ .../generated/SecretAttributesTests.java | 34 ++ .../generated/SecretPatchParametersTests.java | 63 +++ .../generated/SecretPatchPropertiesTests.java | 40 ++ .../azure-resourcemanager-netapp/SAMPLE.md | 10 +- .../netapp/fluent/CachesClient.java | 29 +- .../netapp/implementation/CacheImpl.java | 35 +- .../implementation/CachesClientImpl.java | 68 ++- .../netapp/implementation/CachesImpl.java | 30 +- .../resourcemanager/netapp/models/Cache.java | 12 +- .../models/CachePropertiesExportPolicy.java | 98 ++++ .../resourcemanager/netapp/models/Caches.java | 36 +- .../netapp/generated/CachesUpdateSamples.java | 10 +- ...eringPassphrasesWithResponseMockTests.java | 11 +- .../generated/CachesPoolChangeMockTests.java | 36 ++ .../ManagedServiceIdentityTests.java | 2 +- .../generated/UserAssignedIdentityTests.java | 2 +- .../assistants/AssistantsAsyncClient.java | 1 - .../openai/assistants/AssistantsClient.java | 1 - .../assistants/AssistantsClientBuilder.java | 1 - .../azure/ai/openai/OpenAIAsyncClient.java | 1 - .../com/azure/ai/openai/OpenAIClient.java | 1 - .../azure/ai/openai/OpenAIClientBuilder.java | 1 - .../azure/ai/openai/models/EmbeddingItem.java | 1 - .../fluent/DeletedVaultsClient.java | 11 +- .../DeletedVaultsClientImpl.java | 38 +- .../implementation/DeletedVaultsImpl.java | 19 +- .../models/DeletedVaults.java | 6 +- .../DeletedVaultsUndeleteMockTests.java | 6 +- ...cesOperationsGetWithResponseMockTests.java | 4 +- ...eLinkResourcesOperationsListMockTests.java | 6 +- ...icesCapabilitiesWithResponseMockTests.java | 14 +- ...NameAvailabilityWithResponseMockTests.java | 10 +- ...IdentitiesDeleteWithResponseMockTests.java | 2 +- .../ReplicationUsagesListMockTests.java | 30 +- .../UsagesListByVaultsMockTests.java | 18 +- ...rtificatesCreateWithResponseMockTests.java | 22 +- .../fluent/ManagedClustersClient.java | 34 +- .../fluent/NodeTypesClient.java | 30 +- .../implementation/ManagedClusterImpl.java | 18 +- .../ManagedClustersClientImpl.java | 75 +-- .../implementation/ManagedClustersImpl.java | 43 +- .../implementation/NodeTypeImpl.java | 17 +- .../implementation/NodeTypesClientImpl.java | 80 +-- .../implementation/NodeTypesImpl.java | 40 +- .../models/ManagedCluster.java | 12 +- .../models/ManagedClusters.java | 18 +- .../models/NodeType.java | 12 +- .../models/NodeTypes.java | 12 +- 159 files changed, 2711 insertions(+), 2177 deletions(-) create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesMigrateMockTests.java create mode 100644 sdk/keyvault/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/generated/AttributesTests.java create mode 100644 sdk/keyvault/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/generated/SecretAttributesTests.java create mode 100644 sdk/keyvault/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/generated/SecretPatchParametersTests.java create mode 100644 sdk/keyvault/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/generated/SecretPatchPropertiesTests.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CachePropertiesExportPolicy.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesPoolChangeMockTests.java diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index 88e60de6199d..43389f85d695 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,12 +5,12 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-java": "0.36.3" + "@azure-tools/typespec-java": "0.37.1" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.62.0", "@azure-tools/typespec-azure-core": "0.62.0", - "@azure-tools/typespec-azure-resource-manager": "0.62.0", + "@azure-tools/typespec-azure-resource-manager": "0.62.1", "@azure-tools/typespec-azure-rulesets": "0.62.0", "@azure-tools/typespec-client-generator-core": "0.62.0", "@azure-tools/typespec-liftr-base": "0.11.0", @@ -111,9 +111,9 @@ } }, "node_modules/@azure-tools/typespec-azure-resource-manager": { - "version": "0.62.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.62.0.tgz", - "integrity": "sha512-e8lO9DhIkZJ3+1o2VItq1P4gEcy9EyA5G7AhTz8qICCfU23e5xUAUfscDHYH8JAfuO9vYLvCee/MKY01MQJ0vA==", + "version": "0.62.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.62.1.tgz", + "integrity": "sha512-sbCwg5Auvm2/fYUWbx3RlQyZGlMoAmhtRjrurgwWzZIBxBJ7sVqgUQktl3WGHAoeJ3qYa2gAIL4j8/xSPwt5kw==", "license": "MIT", "dependencies": { "change-case": "~5.4.4", @@ -173,9 +173,9 @@ } }, "node_modules/@azure-tools/typespec-java": { - "version": "0.36.3", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-java/-/typespec-java-0.36.3.tgz", - "integrity": "sha512-pd4gs4OpZnysqjLraBxpxoGRXEQQWtz9wnw8Uny5Sv/LnVcn7TGu6xdKkfNndEWgCF4/ccT2dtXEaBF+oAVAVg==", + "version": "0.37.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-java/-/typespec-java-0.37.1.tgz", + "integrity": "sha512-8tjfaOURstBel60NGE41Y8ok+sHkjTRTQNFc8oFghaVuNTtSU1GBHGmI8NTKOMdqsgpC18/Cihiz7fdEYL4P9A==", "license": "MIT", "dependencies": { "@autorest/codemodel": "~4.20.1", @@ -188,7 +188,7 @@ "peerDependencies": { "@azure-tools/typespec-autorest": ">=0.62.0 <1.0.0", "@azure-tools/typespec-azure-core": ">=0.62.0 <1.0.0", - "@azure-tools/typespec-azure-resource-manager": ">=0.62.0 <1.0.0", + "@azure-tools/typespec-azure-resource-manager": ">=0.62.1 <1.0.0", "@azure-tools/typespec-azure-rulesets": ">=0.62.0 <1.0.0", "@azure-tools/typespec-client-generator-core": ">=0.62.0 <1.0.0", "@azure-tools/typespec-liftr-base": ">=0.11.0 <1.0.0", @@ -1611,15 +1611,18 @@ } }, "node_modules/yaml": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", - "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz", + "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==", "license": "ISC", "bin": { "yaml": "bin.mjs" }, "engines": { "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" } }, "node_modules/yargs": { diff --git a/eng/emitter-package.json b/eng/emitter-package.json index f4ba8cf5da9f..19b8260968d9 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,12 +1,12 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-java": "0.36.3" + "@azure-tools/typespec-java": "0.37.1" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.62.0", "@azure-tools/typespec-azure-core": "0.62.0", - "@azure-tools/typespec-azure-resource-manager": "0.62.0", + "@azure-tools/typespec-azure-resource-manager": "0.62.1", "@azure-tools/typespec-azure-rulesets": "0.62.0", "@azure-tools/typespec-client-generator-core": "0.62.0", "@azure-tools/typespec-liftr-base": "0.11.0", diff --git a/eng/scripts/Compare-CurrentToCodegeneration.ps1 b/eng/scripts/Compare-CurrentToCodegeneration.ps1 index b4893bb8745f..777d01d640e5 100644 --- a/eng/scripts/Compare-CurrentToCodegeneration.ps1 +++ b/eng/scripts/Compare-CurrentToCodegeneration.ps1 @@ -181,7 +181,8 @@ $generateScript = { } # Update code snippets before comparing the diff - $mvnOutput = (& mvn --no-transfer-progress codesnippet:update-codesnippet 2>&1) + # TODO: remove spotless:apply when issue fixed in emitter + $mvnOutput = (& mvn --no-transfer-progress codesnippet:update-codesnippet spotless:apply 2>&1) if ($LastExitCode -ne 0) { Write-Host "$separatorBar`nError updating TypeSpec codesnippets in directory $directory`n$([String]::Join("`n", $mvnOutput))`n$separatorBar" throw diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 49ef32d64184..1b7313639ee8 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -79,7 +79,7 @@ com.azure:azure-communication-common;1.4.4;1.5.0-beta.1 com.azure:azure-communication-common-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-communication-email;1.1.1;1.2.0-beta.2 com.azure:azure-communication-identity;1.6.9;1.7.0-beta.1 -com.azure:azure-communication-jobrouter;1.1.17;1.2.0-beta.1 +com.azure:azure-communication-jobrouter;1.1.17;2.0.0-beta.1 com.azure:azure-communication-messages;1.1.8;1.2.0-beta.2 com.azure:azure-communication-phonenumbers;1.4.2;1.5.0-beta.1 com.azure:azure-communication-rooms;1.2.5;1.3.0-beta.1 diff --git a/sdk/communication/azure-communication-jobrouter/pom.xml b/sdk/communication/azure-communication-jobrouter/pom.xml index 0630f9ac5e37..f6136fa9121a 100644 --- a/sdk/communication/azure-communication-jobrouter/pom.xml +++ b/sdk/communication/azure-communication-jobrouter/pom.xml @@ -14,7 +14,7 @@ <groupId>com.azure</groupId> <artifactId>azure-communication-jobrouter</artifactId> - <version>1.2.0-beta.1</version> <!-- {x-version-update;com.azure:azure-communication-jobrouter;current} --> + <version>2.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-communication-jobrouter;current} --> <name>Microsoft Azure client library for Azure Communication Services JobRouter application</name> <description> diff --git a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/fluent/WatchersClient.java b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/fluent/WatchersClient.java index 9010d3fb3dc0..6b038f12c640 100644 --- a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/fluent/WatchersClient.java +++ b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/fluent/WatchersClient.java @@ -276,7 +276,7 @@ SyncPoller<PollResult<WatcherInner>, WatcherInner> beginUpdate(String resourceGr * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStart(String resourceGroupName, String watcherName); + SyncPoller<PollResult<Void>, Void> beginStart(String resourceGroupName, String watcherName); /** * The action to start monitoring all targets configured for a database watcher. @@ -290,8 +290,7 @@ SyncPoller<PollResult<WatcherInner>, WatcherInner> beginUpdate(String resourceGr * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStart(String resourceGroupName, String watcherName, - Context context); + SyncPoller<PollResult<Void>, Void> beginStart(String resourceGroupName, String watcherName, Context context); /** * The action to start monitoring all targets configured for a database watcher. @@ -301,10 +300,9 @@ SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStart(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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) - WatcherInner start(String resourceGroupName, String watcherName); + void start(String resourceGroupName, String watcherName); /** * The action to start monitoring all targets configured for a database watcher. @@ -315,10 +313,9 @@ SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStart(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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) - WatcherInner start(String resourceGroupName, String watcherName, Context context); + void start(String resourceGroupName, String watcherName, Context context); /** * The action to stop monitoring all targets configured for a database watcher. @@ -331,7 +328,7 @@ SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStart(String resourceGro * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStop(String resourceGroupName, String watcherName); + SyncPoller<PollResult<Void>, Void> beginStop(String resourceGroupName, String watcherName); /** * The action to stop monitoring all targets configured for a database watcher. @@ -345,8 +342,7 @@ SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStart(String resourceGro * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStop(String resourceGroupName, String watcherName, - Context context); + SyncPoller<PollResult<Void>, Void> beginStop(String resourceGroupName, String watcherName, Context context); /** * The action to stop monitoring all targets configured for a database watcher. @@ -356,10 +352,9 @@ SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStop(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatcherInner stop(String resourceGroupName, String watcherName); + void stop(String resourceGroupName, String watcherName); /** * The action to stop monitoring all targets configured for a database watcher. @@ -370,8 +365,7 @@ SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStop(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatcherInner stop(String resourceGroupName, String watcherName, Context context); + void stop(String resourceGroupName, String watcherName, Context context); } diff --git a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/implementation/WatcherImpl.java b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/implementation/WatcherImpl.java index 3b0002ce3580..6b8b872a2f81 100644 --- a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/implementation/WatcherImpl.java +++ b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/implementation/WatcherImpl.java @@ -152,20 +152,20 @@ public Watcher refresh(Context context) { return this; } - public Watcher start() { - return serviceManager.watchers().start(resourceGroupName, watcherName); + public void start() { + serviceManager.watchers().start(resourceGroupName, watcherName); } - public Watcher start(Context context) { - return serviceManager.watchers().start(resourceGroupName, watcherName, context); + public void start(Context context) { + serviceManager.watchers().start(resourceGroupName, watcherName, context); } - public Watcher stop() { - return serviceManager.watchers().stop(resourceGroupName, watcherName); + public void stop() { + serviceManager.watchers().stop(resourceGroupName, watcherName); } - public Watcher stop(Context context) { - return serviceManager.watchers().stop(resourceGroupName, watcherName, context); + public void stop(Context context) { + serviceManager.watchers().stop(resourceGroupName, watcherName, context); } public WatcherImpl withRegion(Region location) { diff --git a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/implementation/WatchersClientImpl.java b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/implementation/WatchersClientImpl.java index a07eb0365814..e3264f21d971 100644 --- a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/implementation/WatchersClientImpl.java +++ b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/implementation/WatchersClientImpl.java @@ -1076,11 +1076,10 @@ private Response<BinaryData> startWithResponse(String resourceGroupName, String * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<WatcherInner>, WatcherInner> beginStartAsync(String resourceGroupName, - String watcherName) { + private PollerFlux<PollResult<Void>, Void> beginStartAsync(String resourceGroupName, String watcherName) { Mono<Response<Flux<ByteBuffer>>> mono = startWithResponseAsync(resourceGroupName, watcherName); - return this.client.<WatcherInner, WatcherInner>getLroResult(mono, this.client.getHttpPipeline(), - WatcherInner.class, WatcherInner.class, this.client.getContext()); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** @@ -1094,10 +1093,9 @@ private PollerFlux<PollResult<WatcherInner>, WatcherInner> beginStartAsync(Strin * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStart(String resourceGroupName, String watcherName) { + public SyncPoller<PollResult<Void>, Void> beginStart(String resourceGroupName, String watcherName) { Response<BinaryData> response = startWithResponse(resourceGroupName, watcherName); - return this.client.<WatcherInner, WatcherInner>getLroResult(response, WatcherInner.class, WatcherInner.class, - Context.NONE); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -1112,11 +1110,10 @@ public SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStart(String reso * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStart(String resourceGroupName, String watcherName, + public SyncPoller<PollResult<Void>, Void> beginStart(String resourceGroupName, String watcherName, Context context) { Response<BinaryData> response = startWithResponse(resourceGroupName, watcherName, context); - return this.client.<WatcherInner, WatcherInner>getLroResult(response, WatcherInner.class, WatcherInner.class, - context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); } /** @@ -1127,10 +1124,10 @@ public SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStart(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<WatcherInner> startAsync(String resourceGroupName, String watcherName) { + private Mono<Void> startAsync(String resourceGroupName, String watcherName) { return beginStartAsync(resourceGroupName, watcherName).last().flatMap(this.client::getLroFinalResultOrError); } @@ -1142,11 +1139,10 @@ private Mono<WatcherInner> startAsync(String resourceGroupName, String watcherNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 WatcherInner start(String resourceGroupName, String watcherName) { - return beginStart(resourceGroupName, watcherName).getFinalResult(); + public void start(String resourceGroupName, String watcherName) { + beginStart(resourceGroupName, watcherName).getFinalResult(); } /** @@ -1158,11 +1154,10 @@ public WatcherInner start(String resourceGroupName, String watcherName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 WatcherInner start(String resourceGroupName, String watcherName, Context context) { - return beginStart(resourceGroupName, watcherName, context).getFinalResult(); + public void start(String resourceGroupName, String watcherName, Context context) { + beginStart(resourceGroupName, watcherName, context).getFinalResult(); } /** @@ -1230,11 +1225,10 @@ private Response<BinaryData> stopWithResponse(String resourceGroupName, String w * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<WatcherInner>, WatcherInner> beginStopAsync(String resourceGroupName, - String watcherName) { + private PollerFlux<PollResult<Void>, Void> beginStopAsync(String resourceGroupName, String watcherName) { Mono<Response<Flux<ByteBuffer>>> mono = stopWithResponseAsync(resourceGroupName, watcherName); - return this.client.<WatcherInner, WatcherInner>getLroResult(mono, this.client.getHttpPipeline(), - WatcherInner.class, WatcherInner.class, this.client.getContext()); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** @@ -1248,10 +1242,9 @@ private PollerFlux<PollResult<WatcherInner>, WatcherInner> beginStopAsync(String * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStop(String resourceGroupName, String watcherName) { + public SyncPoller<PollResult<Void>, Void> beginStop(String resourceGroupName, String watcherName) { Response<BinaryData> response = stopWithResponse(resourceGroupName, watcherName); - return this.client.<WatcherInner, WatcherInner>getLroResult(response, WatcherInner.class, WatcherInner.class, - Context.NONE); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -1266,11 +1259,9 @@ public SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStop(String resou * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStop(String resourceGroupName, String watcherName, - Context context) { + public SyncPoller<PollResult<Void>, Void> beginStop(String resourceGroupName, String watcherName, Context context) { Response<BinaryData> response = stopWithResponse(resourceGroupName, watcherName, context); - return this.client.<WatcherInner, WatcherInner>getLroResult(response, WatcherInner.class, WatcherInner.class, - context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); } /** @@ -1281,10 +1272,10 @@ public SyncPoller<PollResult<WatcherInner>, WatcherInner> beginStop(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<WatcherInner> stopAsync(String resourceGroupName, String watcherName) { + private Mono<Void> stopAsync(String resourceGroupName, String watcherName) { return beginStopAsync(resourceGroupName, watcherName).last().flatMap(this.client::getLroFinalResultOrError); } @@ -1296,11 +1287,10 @@ private Mono<WatcherInner> stopAsync(String resourceGroupName, String watcherNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 WatcherInner stop(String resourceGroupName, String watcherName) { - return beginStop(resourceGroupName, watcherName).getFinalResult(); + public void stop(String resourceGroupName, String watcherName) { + beginStop(resourceGroupName, watcherName).getFinalResult(); } /** @@ -1312,11 +1302,10 @@ public WatcherInner stop(String resourceGroupName, String watcherName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 WatcherInner stop(String resourceGroupName, String watcherName, Context context) { - return beginStop(resourceGroupName, watcherName, context).getFinalResult(); + public void stop(String resourceGroupName, String watcherName, Context context) { + beginStop(resourceGroupName, watcherName, context).getFinalResult(); } /** diff --git a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/implementation/WatchersImpl.java b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/implementation/WatchersImpl.java index 5c76217efd40..55fc09254025 100644 --- a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/implementation/WatchersImpl.java +++ b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/implementation/WatchersImpl.java @@ -76,40 +76,20 @@ public PagedIterable<Watcher> list(Context context) { return ResourceManagerUtils.mapPage(inner, inner1 -> new WatcherImpl(inner1, this.manager())); } - public Watcher start(String resourceGroupName, String watcherName) { - WatcherInner inner = this.serviceClient().start(resourceGroupName, watcherName); - if (inner != null) { - return new WatcherImpl(inner, this.manager()); - } else { - return null; - } + public void start(String resourceGroupName, String watcherName) { + this.serviceClient().start(resourceGroupName, watcherName); } - public Watcher start(String resourceGroupName, String watcherName, Context context) { - WatcherInner inner = this.serviceClient().start(resourceGroupName, watcherName, context); - if (inner != null) { - return new WatcherImpl(inner, this.manager()); - } else { - return null; - } + public void start(String resourceGroupName, String watcherName, Context context) { + this.serviceClient().start(resourceGroupName, watcherName, context); } - public Watcher stop(String resourceGroupName, String watcherName) { - WatcherInner inner = this.serviceClient().stop(resourceGroupName, watcherName); - if (inner != null) { - return new WatcherImpl(inner, this.manager()); - } else { - return null; - } + public void stop(String resourceGroupName, String watcherName) { + this.serviceClient().stop(resourceGroupName, watcherName); } - public Watcher stop(String resourceGroupName, String watcherName, Context context) { - WatcherInner inner = this.serviceClient().stop(resourceGroupName, watcherName, context); - if (inner != null) { - return new WatcherImpl(inner, this.manager()); - } else { - return null; - } + public void stop(String resourceGroupName, String watcherName, Context context) { + this.serviceClient().stop(resourceGroupName, watcherName, context); } public Watcher getById(String id) { diff --git a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/models/Watcher.java b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/models/Watcher.java index 49b3695c306a..5ed6190c246e 100644 --- a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/models/Watcher.java +++ b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/models/Watcher.java @@ -302,9 +302,8 @@ interface WithProperties { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - Watcher start(); + void start(); /** * The action to start monitoring all targets configured for a database watcher. @@ -313,18 +312,16 @@ interface WithProperties { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - Watcher start(Context context); + void start(Context context); /** * The action to stop monitoring all targets configured for a database watcher. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - Watcher stop(); + void stop(); /** * The action to stop monitoring all targets configured for a database watcher. @@ -333,7 +330,6 @@ interface WithProperties { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - Watcher stop(Context context); + void stop(Context context); } diff --git a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/models/Watchers.java b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/models/Watchers.java index 12c62e6d1903..3f5c681aa0de 100644 --- a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/models/Watchers.java +++ b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/main/java/com/azure/resourcemanager/databasewatcher/models/Watchers.java @@ -111,9 +111,8 @@ public interface Watchers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - Watcher start(String resourceGroupName, String watcherName); + void start(String resourceGroupName, String watcherName); /** * The action to start monitoring all targets configured for a database watcher. @@ -124,9 +123,8 @@ public interface Watchers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - Watcher start(String resourceGroupName, String watcherName, Context context); + void start(String resourceGroupName, String watcherName, Context context); /** * The action to stop monitoring all targets configured for a database watcher. @@ -136,9 +134,8 @@ public interface Watchers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - Watcher stop(String resourceGroupName, String watcherName); + void stop(String resourceGroupName, String watcherName); /** * The action to stop monitoring all targets configured for a database watcher. @@ -149,9 +146,8 @@ public interface Watchers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - Watcher stop(String resourceGroupName, String watcherName, Context context); + void stop(String resourceGroupName, String watcherName, Context context); /** * Get a Watcher. diff --git a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/AlertRuleResourcesCreateOrUpdateWithResponseMockTests.java b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/AlertRuleResourcesCreateOrUpdateWithResponseMockTests.java index 4751b7b1bf01..75dba7119e85 100644 --- a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/AlertRuleResourcesCreateOrUpdateWithResponseMockTests.java +++ b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/AlertRuleResourcesCreateOrUpdateWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class AlertRuleResourcesCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"alertRuleResourceId\":\"wyhzdx\",\"createdWithProperties\":\"CreatedWithActionGroup\",\"creationTime\":\"2021-03-28T04:38:02Z\",\"provisioningState\":\"Succeeded\",\"alertRuleTemplateId\":\"zmnvdfznudaod\",\"alertRuleTemplateVersion\":\"xzb\"},\"id\":\"blylpstdbh\",\"name\":\"xsrz\",\"type\":\"zucerscdntnev\"}"; + = "{\"properties\":{\"alertRuleResourceId\":\"mefqsgzvahapjyzh\",\"createdWithProperties\":\"None\",\"creationTime\":\"2021-04-21T18:37:49Z\",\"provisioningState\":\"Failed\",\"alertRuleTemplateId\":\"cjrvxdjzlmwlxkv\",\"alertRuleTemplateVersion\":\"gfhzovawjvzunlut\"},\"id\":\"n\",\"name\":\"rnxipei\",\"type\":\"pjzu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,20 +33,19 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AlertRuleResource response = manager.alertRuleResources() - .define("l") - .withExistingWatcher("doy", "mifthnzdnd") - .withProperties(new AlertRuleResourceProperties().withAlertRuleResourceId("ayqigynduhav") - .withCreatedWithProperties(AlertRuleCreationProperties.CREATED_WITH_ACTION_GROUP) - .withCreationTime(OffsetDateTime.parse("2021-02-05T08:21:04Z")) - .withAlertRuleTemplateId("humaqolbgyc") - .withAlertRuleTemplateVersion("uie")) + .define("yzm") + .withExistingWatcher("j", "zg") + .withProperties(new AlertRuleResourceProperties().withAlertRuleResourceId("xongmtsavjcbpwxq") + .withCreatedWithProperties(AlertRuleCreationProperties.NONE) + .withCreationTime(OffsetDateTime.parse("2020-12-25T00:52:56Z")) + .withAlertRuleTemplateId("ftguv") + .withAlertRuleTemplateVersion("iuhprwmdyvxqta")) .create(); - Assertions.assertEquals("wyhzdx", response.properties().alertRuleResourceId()); - Assertions.assertEquals(AlertRuleCreationProperties.CREATED_WITH_ACTION_GROUP, - response.properties().createdWithProperties()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-28T04:38:02Z"), response.properties().creationTime()); - Assertions.assertEquals("zmnvdfznudaod", response.properties().alertRuleTemplateId()); - Assertions.assertEquals("xzb", response.properties().alertRuleTemplateVersion()); + Assertions.assertEquals("mefqsgzvahapjyzh", response.properties().alertRuleResourceId()); + Assertions.assertEquals(AlertRuleCreationProperties.NONE, response.properties().createdWithProperties()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-21T18:37:49Z"), response.properties().creationTime()); + Assertions.assertEquals("cjrvxdjzlmwlxkv", response.properties().alertRuleTemplateId()); + Assertions.assertEquals("gfhzovawjvzunlut", response.properties().alertRuleTemplateVersion()); } } diff --git a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/AlertRuleResourcesDeleteWithResponseMockTests.java b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/AlertRuleResourcesDeleteWithResponseMockTests.java index fd56334dcf36..0c445f6f0693 100644 --- a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/AlertRuleResourcesDeleteWithResponseMockTests.java +++ b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/AlertRuleResourcesDeleteWithResponseMockTests.java @@ -28,7 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.alertRuleResources() - .deleteWithResponse("ytkblmpew", "wfbkrvrns", "shqjohxcrsbf", com.azure.core.util.Context.NONE); + .deleteWithResponse("klwndnhjdauwhv", "l", "zbtd", com.azure.core.util.Context.NONE); } } diff --git a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/AlertRuleResourcesGetWithResponseMockTests.java b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/AlertRuleResourcesGetWithResponseMockTests.java index 10ec4141d38e..0b9a097817a4 100644 --- a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/AlertRuleResourcesGetWithResponseMockTests.java +++ b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/AlertRuleResourcesGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class AlertRuleResourcesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"alertRuleResourceId\":\"qzvszjf\",\"createdWithProperties\":\"None\",\"creationTime\":\"2021-03-12T20:34:44Z\",\"provisioningState\":\"Failed\",\"alertRuleTemplateId\":\"dxxiv\",\"alertRuleTemplateVersion\":\"tvtc\"},\"id\":\"qtdo\",\"name\":\"mcbxvwvxysl\",\"type\":\"bhsfxob\"}"; + = "{\"properties\":{\"alertRuleResourceId\":\"twm\",\"createdWithProperties\":\"None\",\"creationTime\":\"2021-01-06T11:18:17Z\",\"provisioningState\":\"Canceled\",\"alertRuleTemplateId\":\"x\",\"alertRuleTemplateVersion\":\"it\"},\"id\":\"rjaw\",\"name\":\"qwgxhniskx\",\"type\":\"bkpyc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AlertRuleResource response = manager.alertRuleResources() - .getWithResponse("n", "u", "ivkrtsw", com.azure.core.util.Context.NONE) + .getWithResponse("cjooxdjebwpucwwf", "ovbvmeueciv", "hzceuojgjrwjue", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qzvszjf", response.properties().alertRuleResourceId()); + Assertions.assertEquals("twm", response.properties().alertRuleResourceId()); Assertions.assertEquals(AlertRuleCreationProperties.NONE, response.properties().createdWithProperties()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-12T20:34:44Z"), response.properties().creationTime()); - Assertions.assertEquals("dxxiv", response.properties().alertRuleTemplateId()); - Assertions.assertEquals("tvtc", response.properties().alertRuleTemplateVersion()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-06T11:18:17Z"), response.properties().creationTime()); + Assertions.assertEquals("x", response.properties().alertRuleTemplateId()); + Assertions.assertEquals("it", response.properties().alertRuleTemplateVersion()); } } diff --git a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/AlertRuleResourcesListByParentMockTests.java b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/AlertRuleResourcesListByParentMockTests.java index 13d6e6c90e2e..245a90092ec1 100644 --- a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/AlertRuleResourcesListByParentMockTests.java +++ b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/AlertRuleResourcesListByParentMockTests.java @@ -23,7 +23,7 @@ public final class AlertRuleResourcesListByParentMockTests { @Test public void testListByParent() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"alertRuleResourceId\":\"bsrfbj\",\"createdWithProperties\":\"CreatedWithActionGroup\",\"creationTime\":\"2021-07-26T21:20:39Z\",\"provisioningState\":\"Canceled\",\"alertRuleTemplateId\":\"sotftpvj\",\"alertRuleTemplateVersion\":\"bexilzznfqqnv\"},\"id\":\"mqtaruoujmkcjh\",\"name\":\"qytjrybnwjewgd\",\"type\":\"jervnaenqpehi\"}]}"; + = "{\"value\":[{\"properties\":{\"alertRuleResourceId\":\"upjm\",\"createdWithProperties\":\"None\",\"creationTime\":\"2021-08-12T08:43:21Z\",\"provisioningState\":\"Failed\",\"alertRuleTemplateId\":\"bbcswsrtjri\",\"alertRuleTemplateVersion\":\"lrbpbewtghfgbl\"},\"id\":\"wxzvlvqhjkb\",\"name\":\"gibtnm\",\"type\":\"iebwwaloayqcgwrt\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,15 @@ public void testListByParent() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<AlertRuleResource> response = manager.alertRuleResources() - .listByParent("vasrruvwb", "sqfsubcgjbirxb", com.azure.core.util.Context.NONE); + PagedIterable<AlertRuleResource> response + = manager.alertRuleResources().listByParent("xujznbmpowu", "przqlveu", com.azure.core.util.Context.NONE); - Assertions.assertEquals("bsrfbj", response.iterator().next().properties().alertRuleResourceId()); - Assertions.assertEquals(AlertRuleCreationProperties.CREATED_WITH_ACTION_GROUP, + Assertions.assertEquals("upjm", response.iterator().next().properties().alertRuleResourceId()); + Assertions.assertEquals(AlertRuleCreationProperties.NONE, response.iterator().next().properties().createdWithProperties()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T21:20:39Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T08:43:21Z"), response.iterator().next().properties().creationTime()); - Assertions.assertEquals("sotftpvj", response.iterator().next().properties().alertRuleTemplateId()); - Assertions.assertEquals("bexilzznfqqnv", response.iterator().next().properties().alertRuleTemplateVersion()); + Assertions.assertEquals("bbcswsrtjri", response.iterator().next().properties().alertRuleTemplateId()); + Assertions.assertEquals("lrbpbewtghfgbl", response.iterator().next().properties().alertRuleTemplateVersion()); } } diff --git a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/SharedPrivateLinkResourcesCreateMockTests.java b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/SharedPrivateLinkResourcesCreateMockTests.java index 46acda55f63b..08b6366b201e 100644 --- a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/SharedPrivateLinkResourcesCreateMockTests.java +++ b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/SharedPrivateLinkResourcesCreateMockTests.java @@ -22,7 +22,7 @@ public final class SharedPrivateLinkResourcesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"privateLinkResourceId\":\"washr\",\"groupId\":\"dtkcnqxwbpokulp\",\"requestMessage\":\"ujw\",\"dnsZone\":\"sipqii\",\"status\":\"Pending\",\"provisioningState\":\"Succeeded\"},\"id\":\"rpqlp\",\"name\":\"wcciuqgbdbu\",\"type\":\"auvfbtkuwhhmhyk\"}"; + = "{\"properties\":{\"privateLinkResourceId\":\"slswtm\",\"groupId\":\"eriofzpyqs\",\"requestMessage\":\"mwabnetshhszhedp\",\"dnsZone\":\"wiwubm\",\"status\":\"Disconnected\",\"provisioningState\":\"Succeeded\"},\"id\":\"dnkwwtppjflcxog\",\"name\":\"okonzmnsikvmkqz\",\"type\":\"qqkdltfzxmhhvhgu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,17 +32,17 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SharedPrivateLinkResource response = manager.sharedPrivateLinkResources() - .define("kcbcue") - .withExistingWatcher("helxprglya", "dd") - .withProperties(new SharedPrivateLinkResourceProperties().withPrivateLinkResourceId("jxgciqibrh") - .withGroupId("sxsdqrhzoymibm") - .withRequestMessage("qyib") - .withDnsZone("wfluszdt")) + .define("aolps") + .withExistingWatcher("vhqlkthumaqo", "bgycduiertgccym") + .withProperties(new SharedPrivateLinkResourceProperties().withPrivateLinkResourceId("qlfmmdnbb") + .withGroupId("lzpswiydm") + .withRequestMessage("wyhzdx") + .withDnsZone("adbzmnvdfznud")) .create(); - Assertions.assertEquals("washr", response.properties().privateLinkResourceId()); - Assertions.assertEquals("dtkcnqxwbpokulp", response.properties().groupId()); - Assertions.assertEquals("ujw", response.properties().requestMessage()); - Assertions.assertEquals("sipqii", response.properties().dnsZone()); + Assertions.assertEquals("slswtm", response.properties().privateLinkResourceId()); + Assertions.assertEquals("eriofzpyqs", response.properties().groupId()); + Assertions.assertEquals("mwabnetshhszhedp", response.properties().requestMessage()); + Assertions.assertEquals("wiwubm", response.properties().dnsZone()); } } diff --git a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/SharedPrivateLinkResourcesGetWithResponseMockTests.java b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/SharedPrivateLinkResourcesGetWithResponseMockTests.java index 237bfddd4c63..331aaaabb0cc 100644 --- a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/SharedPrivateLinkResourcesGetWithResponseMockTests.java +++ b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/SharedPrivateLinkResourcesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class SharedPrivateLinkResourcesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"privateLinkResourceId\":\"bobzdopcjwvnhd\",\"groupId\":\"d\",\"requestMessage\":\"mgxcxrslpm\",\"dnsZone\":\"wuoegrpk\",\"status\":\"Rejected\",\"provisioningState\":\"Failed\"},\"id\":\"qsluicp\",\"name\":\"ggkzzlvmbmpa\",\"type\":\"modfvuefywsbpfvm\"}"; + = "{\"properties\":{\"privateLinkResourceId\":\"tkblmpewww\",\"groupId\":\"bkrvrnsvshqj\",\"requestMessage\":\"hxcr\",\"dnsZone\":\"fovasr\",\"status\":\"Pending\",\"provisioningState\":\"Failed\"},\"id\":\"sqfsubcgjbirxb\",\"name\":\"ybsrfbjfdtwss\",\"type\":\"t\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,12 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SharedPrivateLinkResource response = manager.sharedPrivateLinkResources() - .getWithResponse("pnedgf", "cvkcvqvpkeqdcv", "rhvoods", com.azure.core.util.Context.NONE) + .getWithResponse("cqaqtdoqmcbx", "wvxysl", "bhsfxob", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("bobzdopcjwvnhd", response.properties().privateLinkResourceId()); - Assertions.assertEquals("d", response.properties().groupId()); - Assertions.assertEquals("mgxcxrslpm", response.properties().requestMessage()); - Assertions.assertEquals("wuoegrpk", response.properties().dnsZone()); + Assertions.assertEquals("tkblmpewww", response.properties().privateLinkResourceId()); + Assertions.assertEquals("bkrvrnsvshqj", response.properties().groupId()); + Assertions.assertEquals("hxcr", response.properties().requestMessage()); + Assertions.assertEquals("fovasr", response.properties().dnsZone()); } } diff --git a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/SharedPrivateLinkResourcesListByWatcherMockTests.java b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/SharedPrivateLinkResourcesListByWatcherMockTests.java index 2bf2cceea74d..3ebe88e4efdb 100644 --- a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/SharedPrivateLinkResourcesListByWatcherMockTests.java +++ b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/SharedPrivateLinkResourcesListByWatcherMockTests.java @@ -22,7 +22,7 @@ public final class SharedPrivateLinkResourcesListByWatcherMockTests { @Test public void testListByWatcher() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"privateLinkResourceId\":\"ubex\",\"groupId\":\"pzk\",\"requestMessage\":\"mond\",\"dnsZone\":\"quxvypomgkop\",\"status\":\"Disconnected\",\"provisioningState\":\"Canceled\"},\"id\":\"pajqgxysm\",\"name\":\"cmbqfqvmk\",\"type\":\"xozap\"}]}"; + = "{\"value\":[{\"properties\":{\"privateLinkResourceId\":\"aruoujmkcjhwqyt\",\"groupId\":\"r\",\"requestMessage\":\"bnw\",\"dnsZone\":\"wgdrjervnaenqp\",\"status\":\"Disconnected\",\"provisioningState\":\"Canceled\"},\"id\":\"ygmi\",\"name\":\"thnzd\",\"type\":\"dslgnayqigynduh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,11 @@ public void testListByWatcher() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<SharedPrivateLinkResource> response = manager.sharedPrivateLinkResources() - .listByWatcher("yhrfouyftaakcpw", "yzvqt", com.azure.core.util.Context.NONE); + .listByWatcher("tpvjzbexilzznfqq", "vwpm", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ubex", response.iterator().next().properties().privateLinkResourceId()); - Assertions.assertEquals("pzk", response.iterator().next().properties().groupId()); - Assertions.assertEquals("mond", response.iterator().next().properties().requestMessage()); - Assertions.assertEquals("quxvypomgkop", response.iterator().next().properties().dnsZone()); + Assertions.assertEquals("aruoujmkcjhwqyt", response.iterator().next().properties().privateLinkResourceId()); + Assertions.assertEquals("r", response.iterator().next().properties().groupId()); + Assertions.assertEquals("bnw", response.iterator().next().properties().requestMessage()); + Assertions.assertEquals("wgdrjervnaenqp", response.iterator().next().properties().dnsZone()); } } diff --git a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/TargetsDeleteWithResponseMockTests.java b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/TargetsDeleteWithResponseMockTests.java index e5a2c50d63c4..0e64169dc948 100644 --- a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/TargetsDeleteWithResponseMockTests.java +++ b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/TargetsDeleteWithResponseMockTests.java @@ -27,8 +27,7 @@ public void testDeleteWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.targets() - .deleteWithResponse("ttdumorppxebmnzb", "bhjpglkfgohdne", "el", com.azure.core.util.Context.NONE); + manager.targets().deleteWithResponse("v", "slynqwwnc", "zzhxgktrm", com.azure.core.util.Context.NONE); } } diff --git a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/WatchersCreateOrUpdateMockTests.java b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/WatchersCreateOrUpdateMockTests.java index ddd0fbb4d773..bc5db7621dc0 100644 --- a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/WatchersCreateOrUpdateMockTests.java +++ b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/WatchersCreateOrUpdateMockTests.java @@ -29,7 +29,7 @@ public final class WatchersCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"datastore\":{\"adxClusterResourceId\":\"uh\",\"kustoClusterDisplayName\":\"p\",\"kustoClusterUri\":\"sjyofdx\",\"kustoDataIngestionUri\":\"uusdttouwa\",\"kustoDatabaseName\":\"oekqvk\",\"kustoManagementUrl\":\"lns\",\"kustoOfferingType\":\"adx\"},\"status\":\"Running\",\"provisioningState\":\"Succeeded\",\"defaultAlertRuleIdentityResourceId\":\"sflhhca\"},\"identity\":{\"principalId\":\"jixisxyawjoyaqcs\",\"tenantId\":\"jpkiidzyexznelix\",\"type\":\"None\",\"userAssignedIdentities\":{\"ggdtpnapnyiro\":{\"principalId\":\"folhbnxknal\",\"clientId\":\"lp\"},\"n\":{\"principalId\":\"hpigv\",\"clientId\":\"ylgqgitxmedjvcsl\"},\"tfdygpfqb\":{\"principalId\":\"wncwzzhxgktrmg\",\"clientId\":\"napkteoellw\"}}},\"location\":\"ceopzfqrhhuaopp\",\"tags\":{\"lzdahzxctobgbkdm\":\"eqx\",\"grcfb\":\"izpost\"},\"id\":\"nrmfqjhhk\",\"name\":\"bpvjymjhx\",\"type\":\"j\"}"; + = "{\"properties\":{\"datastore\":{\"adxClusterResourceId\":\"qugxywpmueefjzwf\",\"kustoClusterDisplayName\":\"q\",\"kustoClusterUri\":\"jidsuyonobglaoc\",\"kustoDataIngestionUri\":\"xtccmg\",\"kustoDatabaseName\":\"udxytlmoyrx\",\"kustoManagementUrl\":\"wfudwpzntxhdzhl\",\"kustoOfferingType\":\"adx\"},\"status\":\"Running\",\"provisioningState\":\"Succeeded\",\"defaultAlertRuleIdentityResourceId\":\"frlh\"},\"identity\":{\"principalId\":\"bkyvp\",\"tenantId\":\"anuzbpzkafkuw\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"deemao\":{\"principalId\":\"bmehh\",\"clientId\":\"yvjusrtslhsp\"},\"aquhcdhm\":{\"principalId\":\"xagkvtmelmqkrh\",\"clientId\":\"vljua\"}}},\"location\":\"alaexqpvfadmwsrc\",\"tags\":{\"zlfmisgwbnbbeld\":\"xpvgo\",\"ali\":\"wkz\"},\"id\":\"urqhaka\",\"name\":\"hashsfwxosow\",\"type\":\"xcug\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -38,36 +38,35 @@ public void testCreateOrUpdate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - Watcher response - = manager.watchers() - .define("zbtd") - .withRegion("iwwroyqbexrmc") - .withExistingResourceGroup("l") - .withTags(mapOf("vah", "ycnojvknmefqsg", "qzcjrvxdj", "pjyzhpv", "awjvzunluthnnp", "lmwlxkvugfhzo")) - .withProperties(new WatcherProperties() - .withDatastore(new Datastore().withAdxClusterResourceId("znbmpowuwprzq") - .withKustoClusterDisplayName("eualupjmkhf") - .withKustoClusterUri("obbc") - .withKustoDataIngestionUri("wsrtjriplrbpbe") - .withKustoDatabaseName("tghfgblcgwxzvl") - .withKustoManagementUrl("qhjk") - .withKustoOfferingType(KustoOfferingType.FREE)) - .withDefaultAlertRuleIdentityResourceId("mxiebw")) - .withIdentity(new ManagedServiceIdentityV4().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("iuhprwmdyvxqta", new UserAssignedIdentity()))) - .create(); + Watcher response = manager.watchers() + .define("vlopwiyighx") + .withRegion("k") + .withExistingResourceGroup("xnkjzkdesl") + .withTags(mapOf("kphywpnvjto", "dhbt")) + .withProperties(new WatcherProperties() + .withDatastore(new Datastore().withAdxClusterResourceId("zb") + .withKustoClusterDisplayName("uebbaumnyqup") + .withKustoClusterUri("deoj") + .withKustoDataIngestionUri("a") + .withKustoDatabaseName("ckhsmtxpsieb") + .withKustoManagementUrl("fhvpesaps") + .withKustoOfferingType(KustoOfferingType.FABRIC)) + .withDefaultAlertRuleIdentityResourceId("jdhtldwkyzxu")) + .withIdentity(new ManagedServiceIdentityV4().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("jfcn", new UserAssignedIdentity()))) + .create(); - Assertions.assertEquals("ceopzfqrhhuaopp", response.location()); - Assertions.assertEquals("eqx", response.tags().get("lzdahzxctobgbkdm")); - Assertions.assertEquals("uh", response.properties().datastore().adxClusterResourceId()); - Assertions.assertEquals("p", response.properties().datastore().kustoClusterDisplayName()); - Assertions.assertEquals("sjyofdx", response.properties().datastore().kustoClusterUri()); - Assertions.assertEquals("uusdttouwa", response.properties().datastore().kustoDataIngestionUri()); - Assertions.assertEquals("oekqvk", response.properties().datastore().kustoDatabaseName()); - Assertions.assertEquals("lns", response.properties().datastore().kustoManagementUrl()); + Assertions.assertEquals("alaexqpvfadmwsrc", response.location()); + Assertions.assertEquals("xpvgo", response.tags().get("zlfmisgwbnbbeld")); + Assertions.assertEquals("qugxywpmueefjzwf", response.properties().datastore().adxClusterResourceId()); + Assertions.assertEquals("q", response.properties().datastore().kustoClusterDisplayName()); + Assertions.assertEquals("jidsuyonobglaoc", response.properties().datastore().kustoClusterUri()); + Assertions.assertEquals("xtccmg", response.properties().datastore().kustoDataIngestionUri()); + Assertions.assertEquals("udxytlmoyrx", response.properties().datastore().kustoDatabaseName()); + Assertions.assertEquals("wfudwpzntxhdzhl", response.properties().datastore().kustoManagementUrl()); Assertions.assertEquals(KustoOfferingType.ADX, response.properties().datastore().kustoOfferingType()); - Assertions.assertEquals("sflhhca", response.properties().defaultAlertRuleIdentityResourceId()); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); + Assertions.assertEquals("frlh", response.properties().defaultAlertRuleIdentityResourceId()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); } // Use "Map.of" if available diff --git a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/WatchersStartMockTests.java b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/WatchersStartMockTests.java index ae3f62aba6b9..8270fddaaea6 100644 --- a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/WatchersStartMockTests.java +++ b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/WatchersStartMockTests.java @@ -10,20 +10,15 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databasewatcher.DatabaseWatcherManager; -import com.azure.resourcemanager.databasewatcher.models.KustoOfferingType; -import com.azure.resourcemanager.databasewatcher.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.databasewatcher.models.Watcher; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; public final class WatchersStartMockTests { @Test public void testStart() throws Exception { - String responseStr - = "{\"properties\":{\"datastore\":{\"adxClusterResourceId\":\"gmgsxnkjzkde\",\"kustoClusterDisplayName\":\"pvlopwiyighxpkd\",\"kustoClusterUri\":\"zb\",\"kustoDataIngestionUri\":\"iuebbaumny\",\"kustoDatabaseName\":\"upedeojnabckhs\",\"kustoManagementUrl\":\"txp\",\"kustoOfferingType\":\"fabric\"},\"status\":\"Running\",\"provisioningState\":\"Succeeded\",\"defaultAlertRuleIdentityResourceId\":\"vpesapskrdqmhjjd\"},\"identity\":{\"principalId\":\"dwkyzxuu\",\"tenantId\":\"ncwscwsvlxoto\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"yfjfcnjbkcn\":{\"principalId\":\"pqsxvnmicy\",\"clientId\":\"ceoveilovno\"},\"phoxus\":{\"principalId\":\"hbttkphyw\",\"clientId\":\"vjtoqnermclfp\"},\"wfqkquj\":{\"principalId\":\"pabgyeps\",\"clientId\":\"tazqugxywpmueefj\"}}},\"location\":\"suyonobglaocq\",\"tags\":{\"ytlmoyrxvwfud\":\"cmgyud\"},\"id\":\"pz\",\"name\":\"txhdzh\",\"type\":\"rqjbhckfrl\"}"; + String responseStr = "{}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,18 +27,7 @@ public void testStart() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - Watcher response = manager.watchers().start("gu", "svmkfssxquk", com.azure.core.util.Context.NONE); + manager.watchers().start("gu", "svmkfssxquk", com.azure.core.util.Context.NONE); - Assertions.assertEquals("suyonobglaocq", response.location()); - Assertions.assertEquals("cmgyud", response.tags().get("ytlmoyrxvwfud")); - Assertions.assertEquals("gmgsxnkjzkde", response.properties().datastore().adxClusterResourceId()); - Assertions.assertEquals("pvlopwiyighxpkd", response.properties().datastore().kustoClusterDisplayName()); - Assertions.assertEquals("zb", response.properties().datastore().kustoClusterUri()); - Assertions.assertEquals("iuebbaumny", response.properties().datastore().kustoDataIngestionUri()); - Assertions.assertEquals("upedeojnabckhs", response.properties().datastore().kustoDatabaseName()); - Assertions.assertEquals("txp", response.properties().datastore().kustoManagementUrl()); - Assertions.assertEquals(KustoOfferingType.FABRIC, response.properties().datastore().kustoOfferingType()); - Assertions.assertEquals("vpesapskrdqmhjjd", response.properties().defaultAlertRuleIdentityResourceId()); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); } } diff --git a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/WatchersStopMockTests.java b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/WatchersStopMockTests.java index f11f4cf06c2f..0ea66122afc8 100644 --- a/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/WatchersStopMockTests.java +++ b/sdk/databasewatcher/azure-resourcemanager-databasewatcher/src/test/java/com/azure/resourcemanager/databasewatcher/generated/WatchersStopMockTests.java @@ -10,20 +10,15 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databasewatcher.DatabaseWatcherManager; -import com.azure.resourcemanager.databasewatcher.models.KustoOfferingType; -import com.azure.resourcemanager.databasewatcher.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.databasewatcher.models.Watcher; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; public final class WatchersStopMockTests { @Test public void testStop() throws Exception { - String responseStr - = "{\"properties\":{\"datastore\":{\"adxClusterResourceId\":\"p\",\"kustoClusterDisplayName\":\"afkuwb\",\"kustoClusterUri\":\"rnwb\",\"kustoDataIngestionUri\":\"ehhseyvjusrts\",\"kustoDatabaseName\":\"hspkdeemao\",\"kustoManagementUrl\":\"mx\",\"kustoOfferingType\":\"free\"},\"status\":\"Deleting\",\"provisioningState\":\"Succeeded\",\"defaultAlertRuleIdentityResourceId\":\"lmqkrhahvlj\"},\"identity\":{\"principalId\":\"aquhcdhm\",\"tenantId\":\"alaexqpvfadmwsrc\",\"type\":\"None\",\"userAssignedIdentities\":{\"e\":{\"principalId\":\"vgomz\",\"clientId\":\"misgwbnb\"},\"uhashsfwx\":{\"principalId\":\"awkz\",\"clientId\":\"liourqhak\"}}},\"location\":\"owzxcu\",\"tags\":{\"ucww\":\"jooxdjebw\",\"bvmeuecivy\":\"vo\",\"ueiotwmcdyt\":\"zceuojgjrw\",\"it\":\"x\"},\"id\":\"nrjawgqwg\",\"name\":\"hniskxfbkpyc\",\"type\":\"klwndnhjdauwhv\"}"; + String responseStr = "{}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,18 +27,7 @@ public void testStop() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - Watcher response = manager.watchers().stop("rxsbkyvp", "ca", com.azure.core.util.Context.NONE); + manager.watchers().stop("fpl", "mg", com.azure.core.util.Context.NONE); - Assertions.assertEquals("owzxcu", response.location()); - Assertions.assertEquals("jooxdjebw", response.tags().get("ucww")); - Assertions.assertEquals("p", response.properties().datastore().adxClusterResourceId()); - Assertions.assertEquals("afkuwb", response.properties().datastore().kustoClusterDisplayName()); - Assertions.assertEquals("rnwb", response.properties().datastore().kustoClusterUri()); - Assertions.assertEquals("ehhseyvjusrts", response.properties().datastore().kustoDataIngestionUri()); - Assertions.assertEquals("hspkdeemao", response.properties().datastore().kustoDatabaseName()); - Assertions.assertEquals("mx", response.properties().datastore().kustoManagementUrl()); - Assertions.assertEquals(KustoOfferingType.FREE, response.properties().datastore().kustoOfferingType()); - Assertions.assertEquals("lmqkrhahvlj", response.properties().defaultAlertRuleIdentityResourceId()); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); } } diff --git a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/main/java/com/azure/resourcemanager/deviceprovisioningservices/fluent/IotDpsResourcesClient.java b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/main/java/com/azure/resourcemanager/deviceprovisioningservices/fluent/IotDpsResourcesClient.java index 14a32bc0f1a9..1450fa376a19 100644 --- a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/main/java/com/azure/resourcemanager/deviceprovisioningservices/fluent/IotDpsResourcesClient.java +++ b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/main/java/com/azure/resourcemanager/deviceprovisioningservices/fluent/IotDpsResourcesClient.java @@ -626,9 +626,8 @@ PrivateEndpointConnectionInner createOrUpdatePrivateEndpointConnection(String re * @return the {@link SyncPoller} for polling of the private endpoint connection of a provisioning service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<PrivateEndpointConnectionInner>, PrivateEndpointConnectionInner> - beginDeletePrivateEndpointConnection(String resourceGroupName, String resourceName, - String privateEndpointConnectionName); + SyncPoller<PollResult<Void>, Void> beginDeletePrivateEndpointConnection(String resourceGroupName, + String resourceName, String privateEndpointConnectionName); /** * Delete private endpoint connection with the specified name. @@ -644,9 +643,8 @@ PrivateEndpointConnectionInner createOrUpdatePrivateEndpointConnection(String re * @return the {@link SyncPoller} for polling of the private endpoint connection of a provisioning service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<PrivateEndpointConnectionInner>, PrivateEndpointConnectionInner> - beginDeletePrivateEndpointConnection(String resourceGroupName, String resourceName, - String privateEndpointConnectionName, Context context); + SyncPoller<PollResult<Void>, Void> beginDeletePrivateEndpointConnection(String resourceGroupName, + String resourceName, String privateEndpointConnectionName, Context context); /** * Delete private endpoint connection with the specified name. @@ -658,10 +656,9 @@ PrivateEndpointConnectionInner createOrUpdatePrivateEndpointConnection(String re * @throws com.azure.resourcemanager.deviceprovisioningservices.models.ErrorDetailsException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection of a provisioning service. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner deletePrivateEndpointConnection(String resourceGroupName, String resourceName, + void deletePrivateEndpointConnection(String resourceGroupName, String resourceName, String privateEndpointConnectionName); /** @@ -675,10 +672,9 @@ PrivateEndpointConnectionInner deletePrivateEndpointConnection(String resourceGr * @throws com.azure.resourcemanager.deviceprovisioningservices.models.ErrorDetailsException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection of a provisioning service. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner deletePrivateEndpointConnection(String resourceGroupName, String resourceName, + void deletePrivateEndpointConnection(String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); /** diff --git a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/main/java/com/azure/resourcemanager/deviceprovisioningservices/implementation/IotDpsResourcesClientImpl.java b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/main/java/com/azure/resourcemanager/deviceprovisioningservices/implementation/IotDpsResourcesClientImpl.java index ccc954994b5b..a5203016da09 100644 --- a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/main/java/com/azure/resourcemanager/deviceprovisioningservices/implementation/IotDpsResourcesClientImpl.java +++ b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/main/java/com/azure/resourcemanager/deviceprovisioningservices/implementation/IotDpsResourcesClientImpl.java @@ -2272,13 +2272,11 @@ private Response<BinaryData> deletePrivateEndpointConnectionWithResponse(String * @return the {@link PollerFlux} for polling of the private endpoint connection of a provisioning service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<PrivateEndpointConnectionInner>, PrivateEndpointConnectionInner> - beginDeletePrivateEndpointConnectionAsync(String resourceGroupName, String resourceName, - String privateEndpointConnectionName) { + private PollerFlux<PollResult<Void>, Void> beginDeletePrivateEndpointConnectionAsync(String resourceGroupName, + String resourceName, String privateEndpointConnectionName) { Mono<Response<Flux<ByteBuffer>>> mono = deletePrivateEndpointConnectionWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName); - return this.client.<PrivateEndpointConnectionInner, PrivateEndpointConnectionInner>getLroResult(mono, - this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -2294,13 +2292,11 @@ private Response<BinaryData> deletePrivateEndpointConnectionWithResponse(String * @return the {@link SyncPoller} for polling of the private endpoint connection of a provisioning service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<PrivateEndpointConnectionInner>, PrivateEndpointConnectionInner> - beginDeletePrivateEndpointConnection(String resourceGroupName, String resourceName, - String privateEndpointConnectionName) { + public SyncPoller<PollResult<Void>, Void> beginDeletePrivateEndpointConnection(String resourceGroupName, + String resourceName, String privateEndpointConnectionName) { Response<BinaryData> response = deletePrivateEndpointConnectionWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName); - return this.client.<PrivateEndpointConnectionInner, PrivateEndpointConnectionInner>getLroResult(response, - PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, Context.NONE); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -2316,13 +2312,11 @@ private Response<BinaryData> deletePrivateEndpointConnectionWithResponse(String * @return the {@link SyncPoller} for polling of the private endpoint connection of a provisioning service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<PrivateEndpointConnectionInner>, PrivateEndpointConnectionInner> - beginDeletePrivateEndpointConnection(String resourceGroupName, String resourceName, - String privateEndpointConnectionName, Context context) { + public SyncPoller<PollResult<Void>, Void> beginDeletePrivateEndpointConnection(String resourceGroupName, + String resourceName, String privateEndpointConnectionName, Context context) { Response<BinaryData> response = deletePrivateEndpointConnectionWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, context); - return this.client.<PrivateEndpointConnectionInner, PrivateEndpointConnectionInner>getLroResult(response, - PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); } /** @@ -2337,8 +2331,8 @@ private Response<BinaryData> deletePrivateEndpointConnectionWithResponse(String * @return the private endpoint connection of a provisioning service on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PrivateEndpointConnectionInner> deletePrivateEndpointConnectionAsync(String resourceGroupName, - String resourceName, String privateEndpointConnectionName) { + private Mono<Void> deletePrivateEndpointConnectionAsync(String resourceGroupName, String resourceName, + String privateEndpointConnectionName) { return beginDeletePrivateEndpointConnectionAsync(resourceGroupName, resourceName, privateEndpointConnectionName) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -2353,12 +2347,11 @@ private Mono<PrivateEndpointConnectionInner> deletePrivateEndpointConnectionAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorDetailsException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection of a provisioning service. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner deletePrivateEndpointConnection(String resourceGroupName, String resourceName, + public void deletePrivateEndpointConnection(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { - return beginDeletePrivateEndpointConnection(resourceGroupName, resourceName, privateEndpointConnectionName) + beginDeletePrivateEndpointConnection(resourceGroupName, resourceName, privateEndpointConnectionName) .getFinalResult(); } @@ -2372,13 +2365,12 @@ public PrivateEndpointConnectionInner deletePrivateEndpointConnection(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorDetailsException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection of a provisioning service. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner deletePrivateEndpointConnection(String resourceGroupName, String resourceName, + public void deletePrivateEndpointConnection(String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) { - return beginDeletePrivateEndpointConnection(resourceGroupName, resourceName, privateEndpointConnectionName, - context).getFinalResult(); + beginDeletePrivateEndpointConnection(resourceGroupName, resourceName, privateEndpointConnectionName, context) + .getFinalResult(); } /** diff --git a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/main/java/com/azure/resourcemanager/deviceprovisioningservices/implementation/IotDpsResourcesImpl.java b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/main/java/com/azure/resourcemanager/deviceprovisioningservices/implementation/IotDpsResourcesImpl.java index 7e37e5ba8069..ac0f8a69cdda 100644 --- a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/main/java/com/azure/resourcemanager/deviceprovisioningservices/implementation/IotDpsResourcesImpl.java +++ b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/main/java/com/azure/resourcemanager/deviceprovisioningservices/implementation/IotDpsResourcesImpl.java @@ -235,26 +235,16 @@ public PrivateEndpointConnection getPrivateEndpointConnection(String resourceGro } } - public PrivateEndpointConnection deletePrivateEndpointConnection(String resourceGroupName, String resourceName, + public void deletePrivateEndpointConnection(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { - PrivateEndpointConnectionInner inner = this.serviceClient() + this.serviceClient() .deletePrivateEndpointConnection(resourceGroupName, resourceName, privateEndpointConnectionName); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } } - public PrivateEndpointConnection deletePrivateEndpointConnection(String resourceGroupName, String resourceName, + public void deletePrivateEndpointConnection(String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) { - PrivateEndpointConnectionInner inner = this.serviceClient() + this.serviceClient() .deletePrivateEndpointConnection(resourceGroupName, resourceName, privateEndpointConnectionName, context); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } } public Response<List<PrivateEndpointConnection>> @@ -407,7 +397,7 @@ public void deleteByIdWithResponse(String id, Context context) { this.delete(provisioningServiceName, resourceGroupName, context); } - public PrivateEndpointConnection deletePrivateEndpointConnectionById(String id) { + public void deletePrivateEndpointConnectionById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -424,11 +414,11 @@ public PrivateEndpointConnection deletePrivateEndpointConnectionById(String id) throw LOGGER.logExceptionAsError(new IllegalArgumentException(String .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); } - return this.deletePrivateEndpointConnection(resourceGroupName, resourceName, privateEndpointConnectionName, + this.deletePrivateEndpointConnection(resourceGroupName, resourceName, privateEndpointConnectionName, Context.NONE); } - public PrivateEndpointConnection deletePrivateEndpointConnectionByIdWithResponse(String id, Context context) { + public void deletePrivateEndpointConnectionByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -445,8 +435,7 @@ public PrivateEndpointConnection deletePrivateEndpointConnectionByIdWithResponse throw LOGGER.logExceptionAsError(new IllegalArgumentException(String .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); } - return this.deletePrivateEndpointConnection(resourceGroupName, resourceName, privateEndpointConnectionName, - context); + this.deletePrivateEndpointConnection(resourceGroupName, resourceName, privateEndpointConnectionName, context); } private IotDpsResourcesClient serviceClient() { diff --git a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/main/java/com/azure/resourcemanager/deviceprovisioningservices/models/IotDpsResources.java b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/main/java/com/azure/resourcemanager/deviceprovisioningservices/models/IotDpsResources.java index fcdc51a85a45..43c31e786024 100644 --- a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/main/java/com/azure/resourcemanager/deviceprovisioningservices/models/IotDpsResources.java +++ b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/main/java/com/azure/resourcemanager/deviceprovisioningservices/models/IotDpsResources.java @@ -344,9 +344,8 @@ PrivateEndpointConnection getPrivateEndpointConnection(String resourceGroupName, * @throws com.azure.resourcemanager.deviceprovisioningservices.models.ErrorDetailsException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection of a provisioning service. */ - PrivateEndpointConnection deletePrivateEndpointConnection(String resourceGroupName, String resourceName, + void deletePrivateEndpointConnection(String resourceGroupName, String resourceName, String privateEndpointConnectionName); /** @@ -360,9 +359,8 @@ PrivateEndpointConnection deletePrivateEndpointConnection(String resourceGroupNa * @throws com.azure.resourcemanager.deviceprovisioningservices.models.ErrorDetailsException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection of a provisioning service. */ - PrivateEndpointConnection deletePrivateEndpointConnection(String resourceGroupName, String resourceName, + void deletePrivateEndpointConnection(String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); /** @@ -506,9 +504,8 @@ Response<NameAvailabilityInfo> checkProvisioningServiceNameAvailabilityWithRespo * @throws com.azure.resourcemanager.deviceprovisioningservices.models.ErrorDetailsException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection of a provisioning service. */ - PrivateEndpointConnection deletePrivateEndpointConnectionById(String id); + void deletePrivateEndpointConnectionById(String id); /** * Delete private endpoint connection with the specified name. @@ -519,9 +516,8 @@ Response<NameAvailabilityInfo> checkProvisioningServiceNameAvailabilityWithRespo * @throws com.azure.resourcemanager.deviceprovisioningservices.models.ErrorDetailsException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection of a provisioning service. */ - PrivateEndpointConnection deletePrivateEndpointConnectionByIdWithResponse(String id, Context context); + void deletePrivateEndpointConnectionByIdWithResponse(String id, Context context); /** * Begins definition for a new ProvisioningServiceDescription resource. diff --git a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/test/java/com/azure/resourcemanager/deviceprovisioningservices/generated/IotDpsResourcesCheckProvisioningServiceNameAvailabiMockTests.java b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/test/java/com/azure/resourcemanager/deviceprovisioningservices/generated/IotDpsResourcesCheckProvisioningServiceNameAvailabiMockTests.java index 446ff950ff11..ead1db754c7c 100644 --- a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/test/java/com/azure/resourcemanager/deviceprovisioningservices/generated/IotDpsResourcesCheckProvisioningServiceNameAvailabiMockTests.java +++ b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/test/java/com/azure/resourcemanager/deviceprovisioningservices/generated/IotDpsResourcesCheckProvisioningServiceNameAvailabiMockTests.java @@ -22,7 +22,7 @@ public final class IotDpsResourcesCheckProvisioningServiceNameAvailabiMockTests { @Test public void testCheckProvisioningServiceNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"nameAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"odxun\"}"; + String responseStr = "{\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"wdsjnkalju\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testCheckProvisioningServiceNameAvailabilityWithResponse() throws Ex new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NameAvailabilityInfo response = manager.iotDpsResources() - .checkProvisioningServiceNameAvailabilityWithResponse(new OperationInputs().withName("bogqxndlkzgxhu"), + .checkProvisioningServiceNameAvailabilityWithResponse(new OperationInputs().withName("lvithhqzonosgg"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertTrue(response.nameAvailable()); + Assertions.assertFalse(response.nameAvailable()); Assertions.assertEquals(NameUnavailabilityReason.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("odxun", response.message()); + Assertions.assertEquals("wdsjnkalju", response.message()); } } diff --git a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/test/java/com/azure/resourcemanager/deviceprovisioningservices/generated/IotDpsResourcesCreateOrUpdatePrivateEndpointConnectMockTests.java b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/test/java/com/azure/resourcemanager/deviceprovisioningservices/generated/IotDpsResourcesCreateOrUpdatePrivateEndpointConnectMockTests.java index b1d36211b863..6a12e1bfcf1c 100644 --- a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/test/java/com/azure/resourcemanager/deviceprovisioningservices/generated/IotDpsResourcesCreateOrUpdatePrivateEndpointConnectMockTests.java +++ b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/test/java/com/azure/resourcemanager/deviceprovisioningservices/generated/IotDpsResourcesCreateOrUpdatePrivateEndpointConnectMockTests.java @@ -25,7 +25,7 @@ public final class IotDpsResourcesCreateOrUpdatePrivateEndpointConnectMockTests @Test public void testCreateOrUpdatePrivateEndpointConnection() throws Exception { String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"pzk\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"ondjmq\",\"actionsRequired\":\"vypomgkopkwho\"}},\"id\":\"pajqgxysm\",\"name\":\"cmbqfqvmk\",\"type\":\"xozap\"}"; + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"ox\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"suiizynkedyat\",\"actionsRequired\":\"yhqmibzyhwi\"}},\"id\":\"mypyynpcdpu\",\"name\":\"nzgmwznmabik\",\"type\":\"sorgj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,20 +36,20 @@ public void testCreateOrUpdatePrivateEndpointConnection() throws Exception { PrivateEndpointConnection response = manager.iotDpsResources() - .definePrivateEndpointConnection("yqsluic") - .withExistingProvisioningService("mutwuoe", "rpkhjwn") - .withProperties( - new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.PENDING) - .withDescription("lvmbmpaxmodfvuef") - .withActionsRequired("sbpfvmwyhr"))) + .definePrivateEndpointConnection("iipfpubj") + .withExistingProvisioningService("nzar", "wlquuijfqkace") + .withProperties(new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() + .withStatus(PrivateLinkServiceConnectionStatus.DISCONNECTED) + .withDescription("kvpuvksgplsaknyn") + .withActionsRequired("ynl"))) .create(); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.PENDING, + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ondjmq", response.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("vypomgkopkwho", + Assertions.assertEquals("suiizynkedyat", + response.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("yhqmibzyhwi", response.properties().privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/test/java/com/azure/resourcemanager/deviceprovisioningservices/generated/IotDpsResourcesDeletePrivateEndpointConnectionMockTests.java b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/test/java/com/azure/resourcemanager/deviceprovisioningservices/generated/IotDpsResourcesDeletePrivateEndpointConnectionMockTests.java index 4521d6f402cf..06effe912d93 100644 --- a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/test/java/com/azure/resourcemanager/deviceprovisioningservices/generated/IotDpsResourcesDeletePrivateEndpointConnectionMockTests.java +++ b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/test/java/com/azure/resourcemanager/deviceprovisioningservices/generated/IotDpsResourcesDeletePrivateEndpointConnectionMockTests.java @@ -10,19 +10,15 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.deviceprovisioningservices.IotDpsManager; -import com.azure.resourcemanager.deviceprovisioningservices.models.PrivateEndpointConnection; -import com.azure.resourcemanager.deviceprovisioningservices.models.PrivateLinkServiceConnectionStatus; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; public final class IotDpsResourcesDeletePrivateEndpointConnectionMockTests { @Test public void testDeletePrivateEndpointConnection() throws Exception { - String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"ucerscdntnevfi\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"mygtdssls\",\"actionsRequired\":\"mweriofzpy\"}},\"id\":\"emwabnet\",\"name\":\"hhszh\",\"type\":\"d\"}"; + String responseStr = "{}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +27,8 @@ public void testDeletePrivateEndpointConnection() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PrivateEndpointConnection response = manager.iotDpsResources() + manager.iotDpsResources() .deletePrivateEndpointConnection("od", "xzb", "cblylpstdbhhxsr", com.azure.core.util.Context.NONE); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, - response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("mygtdssls", response.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("mweriofzpy", - response.properties().privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/test/java/com/azure/resourcemanager/deviceprovisioningservices/generated/IotDpsResourcesListPrivateEndpointConnectionsWithReMockTests.java b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/test/java/com/azure/resourcemanager/deviceprovisioningservices/generated/IotDpsResourcesListPrivateEndpointConnectionsWithReMockTests.java index d07846b3f070..9a1cd9c0b7e2 100644 --- a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/test/java/com/azure/resourcemanager/deviceprovisioningservices/generated/IotDpsResourcesListPrivateEndpointConnectionsWithReMockTests.java +++ b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/test/java/com/azure/resourcemanager/deviceprovisioningservices/generated/IotDpsResourcesListPrivateEndpointConnectionsWithReMockTests.java @@ -23,7 +23,7 @@ public final class IotDpsResourcesListPrivateEndpointConnectionsWithReMockTests @Test public void testListPrivateEndpointConnectionsWithResponse() throws Exception { String responseStr - = "[{\"properties\":{\"privateEndpoint\":{\"id\":\"flcxoga\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"onz\",\"actionsRequired\":\"sikvmkqzeqqkdlt\"}},\"id\":\"xmhhvhgureo\",\"name\":\"kwobdagxtibq\",\"type\":\"xbxwa\"}]"; + = "[{\"properties\":{\"privateEndpoint\":{\"id\":\"jmygtdsslswtmwer\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"fzp\",\"actionsRequired\":\"semwabnet\"}},\"id\":\"hszhedplvwiwu\",\"name\":\"mwmbes\",\"type\":\"dnkwwtppjflcxog\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"onz\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"sikvmkqzeqqkdlt\",\"actionsRequired\":\"xmhhvhgureo\"}},\"id\":\"wobdagxtibqdx\",\"name\":\"xwak\",\"type\":\"ogqxndlkzgxhuri\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"podxunkb\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"xmubyyntwlrbq\",\"actionsRequired\":\"oievseotgqrlltm\"}},\"id\":\"lauwzizxbmpgcjef\",\"name\":\"zmuvpbttdumorppx\",\"type\":\"bmnzbtbhjpgl\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"ohdneuel\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"hsd\",\"actionsRequired\":\"t\"}},\"id\":\"fikdowwqu\",\"name\":\"v\",\"type\":\"zx\"}]"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,13 @@ public void testListPrivateEndpointConnectionsWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); List<PrivateEndpointConnection> response = manager.iotDpsResources() - .listPrivateEndpointConnectionsWithResponse("lvwiwubmwmbesl", "nkww", com.azure.core.util.Context.NONE) + .listPrivateEndpointConnectionsWithResponse("dzu", "erscdntne", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.REJECTED, + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.PENDING, response.get(0).properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("onz", response.get(0).properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("sikvmkqzeqqkdlt", + Assertions.assertEquals("fzp", response.get(0).properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("semwabnet", response.get(0).properties().privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/SAMPLE.md b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/SAMPLE.md index af195bd35b21..4e2e556ff2e7 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/SAMPLE.md +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/SAMPLE.md @@ -24,6 +24,15 @@ - [Get](#billingcontainers_get) - [List](#billingcontainers_list) +## Credentials + +- [CreateOrUpdate](#credentials_createorupdate) +- [Delete](#credentials_delete) +- [Get](#credentials_get) +- [ListByResourceGroup](#credentials_listbyresourcegroup) +- [Synchronize](#credentials_synchronize) +- [Update](#credentials_update) + ## NamespaceAssets - [CreateOrReplace](#namespaceassets_createorreplace) @@ -74,6 +83,14 @@ - [List](#operations_list) +## Policies + +- [CreateOrUpdate](#policies_createorupdate) +- [Delete](#policies_delete) +- [Get](#policies_get) +- [ListByResourceGroup](#policies_listbyresourcegroup) +- [Update](#policies_update) + ## SchemaRegistries - [CreateOrReplace](#schemaregistries_createorreplace) @@ -111,7 +128,7 @@ import java.util.Map; */ public final class AssetEndpointProfilesCreateOrReplaceSamples { /* - * x-ms-original-file: 2025-10-01/CreateOrReplace_AssetEndpointProfile_With_DiscoveredAepRef.json + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_AssetEndpointProfile_With_DiscoveredAepRef.json */ /** * Sample code: CreateOrReplace_AssetEndpointProfile_With_DiscoveredAepRef. @@ -137,7 +154,7 @@ public final class AssetEndpointProfilesCreateOrReplaceSamples { } /* - * x-ms-original-file: 2025-10-01/CreateOrReplace_AssetEndpointProfile.json + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_AssetEndpointProfile.json */ /** * Sample code: CreateOrReplace_AssetEndpointProfile. @@ -183,7 +200,7 @@ public final class AssetEndpointProfilesCreateOrReplaceSamples { */ public final class AssetEndpointProfilesDeleteSamples { /* - * x-ms-original-file: 2025-10-01/Delete_AssetEndpointProfile.json + * x-ms-original-file: 2025-11-01-preview/Delete_AssetEndpointProfile.json */ /** * Sample code: Delete_AssetEndpointProfile. @@ -206,7 +223,7 @@ public final class AssetEndpointProfilesDeleteSamples { */ public final class AssetEndpointProfilesGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-10-01/Get_AssetEndpointProfile.json + * x-ms-original-file: 2025-11-01-preview/Get_AssetEndpointProfile.json */ /** * Sample code: Get_AssetEndpointProfile. @@ -220,7 +237,7 @@ public final class AssetEndpointProfilesGetByResourceGroupSamples { } /* - * x-ms-original-file: 2025-10-01/Get_AssetEndpointProfile_With_SyncStatus.json + * x-ms-original-file: 2025-11-01-preview/Get_AssetEndpointProfile_With_SyncStatus.json */ /** * Sample code: Get_AssetEndpointProfile_With_SyncStatus. @@ -244,7 +261,7 @@ public final class AssetEndpointProfilesGetByResourceGroupSamples { */ public final class AssetEndpointProfilesListSamples { /* - * x-ms-original-file: 2025-10-01/List_AssetEndpointProfiles_BySubscription.json + * x-ms-original-file: 2025-11-01-preview/List_AssetEndpointProfiles_BySubscription.json */ /** * Sample code: List_AssetEndpointProfiles_BySubscription. @@ -266,7 +283,7 @@ public final class AssetEndpointProfilesListSamples { */ public final class AssetEndpointProfilesListByResourceGroupSamples { /* - * x-ms-original-file: 2025-10-01/List_AssetEndpointProfiles_ByResourceGroup.json + * x-ms-original-file: 2025-11-01-preview/List_AssetEndpointProfiles_ByResourceGroup.json */ /** * Sample code: List_AssetEndpointProfiles_ByResourceGroup. @@ -291,7 +308,7 @@ import com.azure.resourcemanager.deviceregistry.models.AssetEndpointProfileUpdat */ public final class AssetEndpointProfilesUpdateSamples { /* - * x-ms-original-file: 2025-10-01/Update_AssetEndpointProfile.json + * x-ms-original-file: 2025-11-01-preview/Update_AssetEndpointProfile.json */ /** * Sample code: Update_AssetEndpointProfile. @@ -333,7 +350,7 @@ import java.util.Map; */ public final class AssetsCreateOrReplaceSamples { /* - * x-ms-original-file: 2025-10-01/CreateOrReplace_Asset_Without_DisplayName.json + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_Asset_Without_DisplayName.json */ /** * Sample code: CreateOrReplace_Asset_Without_DisplayName. @@ -398,7 +415,7 @@ public final class AssetsCreateOrReplaceSamples { } /* - * x-ms-original-file: 2025-10-01/CreateOrReplace_Asset_With_DiscoveredAssetRef.json + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_Asset_With_DiscoveredAssetRef.json */ /** * Sample code: CreateOrReplace_Asset_With_DiscoveredAssetRefs. @@ -465,7 +482,7 @@ public final class AssetsCreateOrReplaceSamples { } /* - * x-ms-original-file: 2025-10-01/CreateOrReplace_Asset_Without_ExternalAssetId.json + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_Asset_Without_ExternalAssetId.json */ /** * Sample code: CreateOrReplace_Asset_Without_ExternalAssetId. @@ -530,7 +547,7 @@ public final class AssetsCreateOrReplaceSamples { } /* - * x-ms-original-file: 2025-10-01/CreateOrReplace_Asset_With_ExternalAssetId.json + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_Asset_With_ExternalAssetId.json */ /** * Sample code: CreateOrReplace_Asset_With_ExternalAssetId. @@ -617,7 +634,7 @@ public final class AssetsCreateOrReplaceSamples { */ public final class AssetsDeleteSamples { /* - * x-ms-original-file: 2025-10-01/Delete_Asset.json + * x-ms-original-file: 2025-11-01-preview/Delete_Asset.json */ /** * Sample code: Delete_Asset. @@ -638,7 +655,7 @@ public final class AssetsDeleteSamples { */ public final class AssetsGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-10-01/Get_Asset_With_SyncStatus.json + * x-ms-original-file: 2025-11-01-preview/Get_Asset_With_SyncStatus.json */ /** * Sample code: Get_Asset_With_SyncStatus. @@ -651,7 +668,7 @@ public final class AssetsGetByResourceGroupSamples { } /* - * x-ms-original-file: 2025-10-01/Get_Asset.json + * x-ms-original-file: 2025-11-01-preview/Get_Asset.json */ /** * Sample code: Get_Asset. @@ -673,7 +690,7 @@ public final class AssetsGetByResourceGroupSamples { */ public final class AssetsListSamples { /* - * x-ms-original-file: 2025-10-01/List_Assets_BySubscription.json + * x-ms-original-file: 2025-11-01-preview/List_Assets_BySubscription.json */ /** * Sample code: List_Assets_BySubscription. @@ -695,7 +712,7 @@ public final class AssetsListSamples { */ public final class AssetsListByResourceGroupSamples { /* - * x-ms-original-file: 2025-10-01/List_Assets_ByResourceGroup.json + * x-ms-original-file: 2025-11-01-preview/List_Assets_ByResourceGroup.json */ /** * Sample code: List_Assets_ByResourceGroup. @@ -720,7 +737,7 @@ import com.azure.resourcemanager.deviceregistry.models.AssetUpdateProperties; */ public final class AssetsUpdateSamples { /* - * x-ms-original-file: 2025-10-01/Update_Asset.json + * x-ms-original-file: 2025-11-01-preview/Update_Asset.json */ /** * Sample code: Update_Asset. @@ -746,7 +763,7 @@ public final class AssetsUpdateSamples { */ public final class BillingContainersGetSamples { /* - * x-ms-original-file: 2025-10-01/Get_BillingContainer.json + * x-ms-original-file: 2025-11-01-preview/Get_BillingContainer.json */ /** * Sample code: Get_BillingContainer. @@ -767,7 +784,7 @@ public final class BillingContainersGetSamples { */ public final class BillingContainersListSamples { /* - * x-ms-original-file: 2025-10-01/List_BillingContainers_BySubscription.json + * x-ms-original-file: 2025-11-01-preview/List_BillingContainers_BySubscription.json */ /** * Sample code: List_BillingContainers_BySubscription. @@ -781,6 +798,175 @@ public final class BillingContainersListSamples { } ``` +### Credentials_CreateOrUpdate + +```java +import com.azure.resourcemanager.deviceregistry.fluent.models.CredentialInner; +import com.azure.resourcemanager.deviceregistry.models.CredentialProperties; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Credentials CreateOrUpdate. + */ +public final class CredentialsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_Credentials.json + */ + /** + * Sample code: CreateOrReplace_Credentials. + * + * @param manager Entry point to DeviceRegistryManager. + */ + public static void + createOrReplaceCredentials(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) { + manager.credentials() + .createOrUpdate("rgdeviceregistry", "mynamespace", + new CredentialInner().withLocation("East US 2") + .withTags(mapOf("key7121", "fakeTokenPlaceholder")) + .withProperties(new CredentialProperties()), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### Credentials_Delete + +```java +/** + * Samples for Credentials Delete. + */ +public final class CredentialsDeleteSamples { + /* + * x-ms-original-file: 2025-11-01-preview/Delete_Credentials.json + */ + /** + * Sample code: Delete_Credentials. + * + * @param manager Entry point to DeviceRegistryManager. + */ + public static void deleteCredentials(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) { + manager.credentials().delete("rgdeviceregistry", "mynamespace", com.azure.core.util.Context.NONE); + } +} +``` + +### Credentials_Get + +```java +/** + * Samples for Credentials Get. + */ +public final class CredentialsGetSamples { + /* + * x-ms-original-file: 2025-11-01-preview/Get_Credentials.json + */ + /** + * Sample code: Get_Credentials. + * + * @param manager Entry point to DeviceRegistryManager. + */ + public static void getCredentials(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) { + manager.credentials().getWithResponse("rgdeviceregistry", "mynamespace", com.azure.core.util.Context.NONE); + } +} +``` + +### Credentials_ListByResourceGroup + +```java +/** + * Samples for Credentials ListByResourceGroup. + */ +public final class CredentialsListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-11-01-preview/List_Credentials_ByResourceGroup.json + */ + /** + * Sample code: List_Credentials_ByResourceGroup. + * + * @param manager Entry point to DeviceRegistryManager. + */ + public static void + listCredentialsByResourceGroup(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) { + manager.credentials().listByResourceGroup("rgdeviceregistry", "mynamespace", com.azure.core.util.Context.NONE); + } +} +``` + +### Credentials_Synchronize + +```java +/** + * Samples for Credentials Synchronize. + */ +public final class CredentialsSynchronizeSamples { + /* + * x-ms-original-file: 2025-11-01-preview/Credentials_Synchronize.json + */ + /** + * Sample code: Credentials_Synchronize. + * + * @param manager Entry point to DeviceRegistryManager. + */ + public static void credentialsSynchronize(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) { + manager.credentials().synchronize("rgdeviceregistry", "mynamespace", com.azure.core.util.Context.NONE); + } +} +``` + +### Credentials_Update + +```java +import com.azure.resourcemanager.deviceregistry.models.CredentialUpdate; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Credentials Update. + */ +public final class CredentialsUpdateSamples { + /* + * x-ms-original-file: 2025-11-01-preview/Update_Credentials.json + */ + /** + * Sample code: Update_Credentials. + * + * @param manager Entry point to DeviceRegistryManager. + */ + public static void updateCredentials(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) { + manager.credentials() + .update("rgdeviceregistry", "mynamespace", + new CredentialUpdate().withTags(mapOf("key9580", "fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + ### NamespaceAssets_CreateOrReplace ```java @@ -816,7 +1002,7 @@ import java.util.Map; */ public final class NamespaceAssetsCreateOrReplaceSamples { /* - * x-ms-original-file: 2025-10-01/CreateOrReplace_NamespaceAsset.json + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_NamespaceAsset.json */ /** * Sample code: CreateOrReplace_NamespaceAsset. @@ -963,7 +1149,7 @@ public final class NamespaceAssetsCreateOrReplaceSamples { */ public final class NamespaceAssetsDeleteSamples { /* - * x-ms-original-file: 2025-10-01/Delete_NamespaceAsset.json + * x-ms-original-file: 2025-11-01-preview/Delete_NamespaceAsset.json */ /** * Sample code: Delete_NamespaceAsset. @@ -986,7 +1172,7 @@ public final class NamespaceAssetsDeleteSamples { */ public final class NamespaceAssetsGetSamples { /* - * x-ms-original-file: 2025-10-01/Get_NamespaceAsset.json + * x-ms-original-file: 2025-11-01-preview/Get_NamespaceAsset.json */ /** * Sample code: Get_NamespaceAsset. @@ -1008,7 +1194,7 @@ public final class NamespaceAssetsGetSamples { */ public final class NamespaceAssetsListByResourceGroupSamples { /* - * x-ms-original-file: 2025-10-01/List_NamespaceAssets_ByResourceGroup.json + * x-ms-original-file: 2025-11-01-preview/List_NamespaceAssets_ByResourceGroup.json */ /** * Sample code: List_NamespaceAssets_ByResourceGroup. @@ -1034,7 +1220,7 @@ import com.azure.resourcemanager.deviceregistry.models.NamespaceAssetUpdatePrope */ public final class NamespaceAssetsUpdateSamples { /* - * x-ms-original-file: 2025-10-01/Update_NamespaceAsset.json + * x-ms-original-file: 2025-11-01-preview/Update_NamespaceAsset.json */ /** * Sample code: Update_NamespaceAssets. @@ -1078,7 +1264,7 @@ import java.util.Map; */ public final class NamespaceDevicesCreateOrReplaceSamples { /* - * x-ms-original-file: 2025-10-01/CreateOrReplace_NamespaceDevice_Edge_x509.json + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_NamespaceDevice_Edge_x509.json */ /** * Sample code: Create edge enabled device with x509 inbound authentication. @@ -1125,7 +1311,7 @@ public final class NamespaceDevicesCreateOrReplaceSamples { } /* - * x-ms-original-file: 2025-10-01/CreateOrReplace_NamespaceDevice_Edge_Anonymous.json + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_NamespaceDevice_Edge_Anonymous.json */ /** * Sample code: Create edge enabled device with anonymous host authentication. @@ -1156,7 +1342,7 @@ public final class NamespaceDevicesCreateOrReplaceSamples { } /* - * x-ms-original-file: 2025-10-01/CreateOrReplace_NamespaceDevice_Edge_UsernamePass.json + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_NamespaceDevice_Edge_UsernamePass.json */ /** * Sample code: Create edge enabled device with UsernamesPassword inbound authentication. @@ -1189,7 +1375,7 @@ public final class NamespaceDevicesCreateOrReplaceSamples { } /* - * x-ms-original-file: 2025-10-01/CreateOrReplace_NamespaceDevice.json + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_NamespaceDevice.json */ /** * Sample code: CreateOrReplace_NamespaceDevices. @@ -1236,7 +1422,7 @@ public final class NamespaceDevicesCreateOrReplaceSamples { */ public final class NamespaceDevicesDeleteSamples { /* - * x-ms-original-file: 2025-10-01/Delete_NamespaceDevice.json + * x-ms-original-file: 2025-11-01-preview/Delete_NamespaceDevice.json */ /** * Sample code: Delete_NamespaceDevice. @@ -1259,7 +1445,7 @@ public final class NamespaceDevicesDeleteSamples { */ public final class NamespaceDevicesGetSamples { /* - * x-ms-original-file: 2025-10-01/Get_NamespaceDeviceWithEndpointErrorStatus.json + * x-ms-original-file: 2025-11-01-preview/Get_NamespaceDeviceWithEndpointErrorStatus.json */ /** * Sample code: Get NamespaceDevice with Endpoint Error Status. @@ -1273,7 +1459,7 @@ public final class NamespaceDevicesGetSamples { } /* - * x-ms-original-file: 2025-10-01/Get_NamespaceDevice.json + * x-ms-original-file: 2025-11-01-preview/Get_NamespaceDevice.json */ /** * Sample code: Get_NamespaceDevice. @@ -1295,7 +1481,7 @@ public final class NamespaceDevicesGetSamples { */ public final class NamespaceDevicesListByResourceGroupSamples { /* - * x-ms-original-file: 2025-10-01/List_NamespaceDevices_ByResourceGroup.json + * x-ms-original-file: 2025-11-01-preview/List_NamespaceDevices_ByResourceGroup.json */ /** * Sample code: List_NamespaceDevices_ByResourceGroup. @@ -1328,7 +1514,7 @@ import java.util.Map; */ public final class NamespaceDevicesUpdateSamples { /* - * x-ms-original-file: 2025-10-01/Update_NamespaceDevice.json + * x-ms-original-file: 2025-11-01-preview/Update_NamespaceDevice.json */ /** * Sample code: Update_NamespaceDevices. @@ -1403,7 +1589,7 @@ import java.util.Map; */ public final class NamespaceDiscoveredAssetsCreateOrReplaceSamples { /* - * x-ms-original-file: 2025-10-01/CreateOrReplace_NamespaceDiscoveredAsset.json + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_NamespaceDiscoveredAsset.json */ /** * Sample code: CreateOrReplace_NamespaceDiscoveredAsset. @@ -1558,7 +1744,7 @@ public final class NamespaceDiscoveredAssetsCreateOrReplaceSamples { */ public final class NamespaceDiscoveredAssetsDeleteSamples { /* - * x-ms-original-file: 2025-10-01/Delete_NamespaceDiscoveredAsset.json + * x-ms-original-file: 2025-11-01-preview/Delete_NamespaceDiscoveredAsset.json */ /** * Sample code: Delete_NamespaceDiscoveredAsset. @@ -1581,7 +1767,7 @@ public final class NamespaceDiscoveredAssetsDeleteSamples { */ public final class NamespaceDiscoveredAssetsGetSamples { /* - * x-ms-original-file: 2025-10-01/Get_NamespaceDiscoveredAsset.json + * x-ms-original-file: 2025-11-01-preview/Get_NamespaceDiscoveredAsset.json */ /** * Sample code: Get_NamespaceDiscoveredAsset. @@ -1605,7 +1791,7 @@ public final class NamespaceDiscoveredAssetsGetSamples { */ public final class NamespaceDiscoveredAssetsListByResourceGroupSamples { /* - * x-ms-original-file: 2025-10-01/List_NamespaceDiscoveredAssets_ByResourceGroup.json + * x-ms-original-file: 2025-11-01-preview/List_NamespaceDiscoveredAssets_ByResourceGroup.json */ /** * Sample code: List_NamespaceDiscoveredAssets_ByResourceGroup. @@ -1631,7 +1817,7 @@ import com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredAssetU */ public final class NamespaceDiscoveredAssetsUpdateSamples { /* - * x-ms-original-file: 2025-10-01/Update_NamespaceDiscoveredAsset.json + * x-ms-original-file: 2025-11-01-preview/Update_NamespaceDiscoveredAsset.json */ /** * Sample code: Update_NamespaceDiscoveredAsset. @@ -1668,7 +1854,7 @@ import java.util.Map; */ public final class NamespaceDiscoveredDevicesCreateOrReplaceSamples { /* - * x-ms-original-file: 2025-10-01/CreateOrReplace_NamespaceDiscoveredDevice.json + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_NamespaceDiscoveredDevice.json */ /** * Sample code: CreateOrReplace_NamespaceDiscoveredDevice. @@ -1717,7 +1903,7 @@ public final class NamespaceDiscoveredDevicesCreateOrReplaceSamples { */ public final class NamespaceDiscoveredDevicesDeleteSamples { /* - * x-ms-original-file: 2025-10-01/Delete_NamespaceDiscoveredDevice.json + * x-ms-original-file: 2025-11-01-preview/Delete_NamespaceDiscoveredDevice.json */ /** * Sample code: Delete_NamespaceDiscoveredDevice. @@ -1740,7 +1926,7 @@ public final class NamespaceDiscoveredDevicesDeleteSamples { */ public final class NamespaceDiscoveredDevicesGetSamples { /* - * x-ms-original-file: 2025-10-01/Get_NamespaceDiscoveredDevice.json + * x-ms-original-file: 2025-11-01-preview/Get_NamespaceDiscoveredDevice.json */ /** * Sample code: Get_NamespaceDiscoveredDevice. @@ -1764,7 +1950,7 @@ public final class NamespaceDiscoveredDevicesGetSamples { */ public final class NamespaceDiscoveredDevicesListByResourceGroupSamples { /* - * x-ms-original-file: 2025-10-01/List_NamespaceDiscoveredDevices_ByResourceGroup.json + * x-ms-original-file: 2025-11-01-preview/List_NamespaceDiscoveredDevices_ByResourceGroup.json */ /** * Sample code: List_NamespaceDiscoveredDevices_ByResourceGroup. @@ -1795,7 +1981,7 @@ import java.util.Map; */ public final class NamespaceDiscoveredDevicesUpdateSamples { /* - * x-ms-original-file: 2025-10-01/Update_NamespaceDiscoveredDevice.json + * x-ms-original-file: 2025-11-01-preview/Update_NamespaceDiscoveredDevice.json */ /** * Sample code: Update_NamespaceDiscoveredDevice. @@ -1847,7 +2033,7 @@ import java.util.Map; */ public final class NamespacesCreateOrReplaceSamples { /* - * x-ms-original-file: 2025-10-01/CreateOrReplace_Namespace_With_Endpoints.json + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_Namespace_With_Endpoints.json */ /** * Sample code: CreateOrReplace_Namespace_With_Endpoints. @@ -1894,7 +2080,7 @@ public final class NamespacesCreateOrReplaceSamples { */ public final class NamespacesDeleteSamples { /* - * x-ms-original-file: 2025-10-01/Delete_Namespace.json + * x-ms-original-file: 2025-11-01-preview/Delete_Namespace.json */ /** * Sample code: Delete_Namespace. @@ -1915,7 +2101,7 @@ public final class NamespacesDeleteSamples { */ public final class NamespacesGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-10-01/Get_Namespace.json + * x-ms-original-file: 2025-11-01-preview/Get_Namespace.json */ /** * Sample code: Get_Namespace. @@ -1938,7 +2124,7 @@ public final class NamespacesGetByResourceGroupSamples { */ public final class NamespacesListSamples { /* - * x-ms-original-file: 2025-10-01/List_Namespace_BySubscription.json + * x-ms-original-file: 2025-11-01-preview/List_Namespace_BySubscription.json */ /** * Sample code: List_Namespaces_BySubscription. @@ -1960,7 +2146,7 @@ public final class NamespacesListSamples { */ public final class NamespacesListByResourceGroupSamples { /* - * x-ms-original-file: 2025-10-01/List_Namespace_ByResourceGroup.json + * x-ms-original-file: 2025-11-01-preview/List_Namespace_ByResourceGroup.json */ /** * Sample code: List_Namespaces_ByResourceGroup. @@ -1986,7 +2172,7 @@ import java.util.Arrays; */ public final class NamespacesMigrateSamples { /* - * x-ms-original-file: 2025-10-01/Migrate_Assets_Namespace.json + * x-ms-original-file: 2025-11-01-preview/Migrate_Assets_Namespace.json */ /** * Sample code: Namespace Migrate. @@ -2020,7 +2206,7 @@ import java.util.Map; */ public final class NamespacesUpdateSamples { /* - * x-ms-original-file: 2025-10-01/Update_Namespace_Endpoints.json + * x-ms-original-file: 2025-11-01-preview/Update_Namespace_Endpoints.json */ /** * Sample code: Update_Namespace_Endpoints. @@ -2063,7 +2249,7 @@ public final class NamespacesUpdateSamples { */ public final class OperationStatusGetSamples { /* - * x-ms-original-file: 2025-10-01/Get_OperationStatus.json + * x-ms-original-file: 2025-11-01-preview/Get_OperationStatus.json */ /** * Sample code: Get_OperationStatus. @@ -2085,7 +2271,7 @@ public final class OperationStatusGetSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: 2025-10-01/List_Operations.json + * x-ms-original-file: 2025-11-01-preview/List_Operations.json */ /** * Sample code: List_Operations. @@ -2098,6 +2284,170 @@ public final class OperationsListSamples { } ``` +### Policies_CreateOrUpdate + +```java +import com.azure.resourcemanager.deviceregistry.models.CertificateAuthorityConfiguration; +import com.azure.resourcemanager.deviceregistry.models.CertificateConfiguration; +import com.azure.resourcemanager.deviceregistry.models.LeafCertificateConfiguration; +import com.azure.resourcemanager.deviceregistry.models.PolicyProperties; +import com.azure.resourcemanager.deviceregistry.models.SupportedKeyType; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Policies CreateOrUpdate. + */ +public final class PoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_Policies.json + */ + /** + * Sample code: CreateOrReplace_Policies. + * + * @param manager Entry point to DeviceRegistryManager. + */ + public static void createOrReplacePolicies(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) { + manager.policies() + .define("mypolicy") + .withRegion("zjqtuvprnxvimzkkxaobgkm") + .withExistingNamespace("rgdeviceregistry", "mynamespace") + .withTags(mapOf("key1088", "fakeTokenPlaceholder")) + .withProperties(new PolicyProperties().withCertificate(new CertificateConfiguration() + .withCertificateAuthorityConfiguration( + new CertificateAuthorityConfiguration().withKeyType(SupportedKeyType.ECC)) + .withLeafCertificateConfiguration(new LeafCertificateConfiguration().withValidityPeriodInDays(10)))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### Policies_Delete + +```java +/** + * Samples for Policies Delete. + */ +public final class PoliciesDeleteSamples { + /* + * x-ms-original-file: 2025-11-01-preview/Delete_Policies.json + */ + /** + * Sample code: Delete_Policies. + * + * @param manager Entry point to DeviceRegistryManager. + */ + public static void deletePolicies(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) { + manager.policies().delete("rgdeviceregistry", "mynamespace", "mypolicy", com.azure.core.util.Context.NONE); + } +} +``` + +### Policies_Get + +```java +/** + * Samples for Policies Get. + */ +public final class PoliciesGetSamples { + /* + * x-ms-original-file: 2025-11-01-preview/Get_Policies.json + */ + /** + * Sample code: Get_Policies. + * + * @param manager Entry point to DeviceRegistryManager. + */ + public static void getPolicies(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) { + manager.policies() + .getWithResponse("rgdeviceregistry", "mynamespace", "myPolicy", com.azure.core.util.Context.NONE); + } +} +``` + +### Policies_ListByResourceGroup + +```java +/** + * Samples for Policies ListByResourceGroup. + */ +public final class PoliciesListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-11-01-preview/List_Policies_ByResourceGroup.json + */ + /** + * Sample code: List_Policies_ByResourceGroup. + * + * @param manager Entry point to DeviceRegistryManager. + */ + public static void + listPoliciesByResourceGroup(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) { + manager.policies().listByResourceGroup("rgdeviceregistry", "mynamespace", com.azure.core.util.Context.NONE); + } +} +``` + +### Policies_Update + +```java +import com.azure.resourcemanager.deviceregistry.models.CertificateAuthorityConfiguration; +import com.azure.resourcemanager.deviceregistry.models.CertificateConfiguration; +import com.azure.resourcemanager.deviceregistry.models.LeafCertificateConfiguration; +import com.azure.resourcemanager.deviceregistry.models.Policy; +import com.azure.resourcemanager.deviceregistry.models.PolicyUpdateProperties; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Policies Update. + */ +public final class PoliciesUpdateSamples { + /* + * x-ms-original-file: 2025-11-01-preview/Update_Policies.json + */ + /** + * Sample code: Update_Policies. + * + * @param manager Entry point to DeviceRegistryManager. + */ + public static void updatePolicies(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) { + Policy resource = manager.policies() + .getWithResponse("rgdeviceregistry", "mynamespace", "mypolicy", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key5535", "fakeTokenPlaceholder")) + .withProperties(new PolicyUpdateProperties().withCertificate(new CertificateConfiguration() + .withCertificateAuthorityConfiguration(new CertificateAuthorityConfiguration()) + .withLeafCertificateConfiguration(new LeafCertificateConfiguration().withValidityPeriodInDays(10)))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + ### SchemaRegistries_CreateOrReplace ```java @@ -2110,7 +2460,7 @@ import java.util.Map; */ public final class SchemaRegistriesCreateOrReplaceSamples { /* - * x-ms-original-file: 2025-10-01/CreateOrReplace_SchemaRegistry.json + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_SchemaRegistry.json */ /** * Sample code: CreateOrReplace_SchemaRegistry. @@ -2153,7 +2503,7 @@ public final class SchemaRegistriesCreateOrReplaceSamples { */ public final class SchemaRegistriesDeleteSamples { /* - * x-ms-original-file: 2025-10-01/Delete_SchemaRegistry.json + * x-ms-original-file: 2025-11-01-preview/Delete_SchemaRegistry.json */ /** * Sample code: Delete_SchemaRegistry. @@ -2174,7 +2524,7 @@ public final class SchemaRegistriesDeleteSamples { */ public final class SchemaRegistriesGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-10-01/Get_SchemaRegistry.json + * x-ms-original-file: 2025-11-01-preview/Get_SchemaRegistry.json */ /** * Sample code: Get_SchemaRegistry. @@ -2196,7 +2546,7 @@ public final class SchemaRegistriesGetByResourceGroupSamples { */ public final class SchemaRegistriesListSamples { /* - * x-ms-original-file: 2025-10-01/List_SchemaRegistries_BySubscription.json + * x-ms-original-file: 2025-11-01-preview/List_SchemaRegistries_BySubscription.json */ /** * Sample code: List_SchemaRegistries_Subscription. @@ -2218,7 +2568,7 @@ public final class SchemaRegistriesListSamples { */ public final class SchemaRegistriesListByResourceGroupSamples { /* - * x-ms-original-file: 2025-10-01/List_SchemaRegistries_ByResourceGroup.json + * x-ms-original-file: 2025-11-01-preview/List_SchemaRegistries_ByResourceGroup.json */ /** * Sample code: List_SchemaRegistries_ResourceGroup. @@ -2245,7 +2595,7 @@ import java.util.Map; */ public final class SchemaRegistriesUpdateSamples { /* - * x-ms-original-file: 2025-10-01/Update_SchemaRegistry.json + * x-ms-original-file: 2025-11-01-preview/Update_SchemaRegistry.json */ /** * Sample code: Update_SchemaRegistry. @@ -2287,7 +2637,7 @@ import com.azure.resourcemanager.deviceregistry.models.SchemaVersionProperties; */ public final class SchemaVersionsCreateOrReplaceSamples { /* - * x-ms-original-file: 2025-10-01/CreateOrReplace_SchemaVersion.json + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_SchemaVersion.json */ /** * Sample code: CreateOrReplace_SchemaVersion. @@ -2315,7 +2665,7 @@ public final class SchemaVersionsCreateOrReplaceSamples { */ public final class SchemaVersionsDeleteSamples { /* - * x-ms-original-file: 2025-10-01/Delete_SchemaVersion.json + * x-ms-original-file: 2025-11-01-preview/Delete_SchemaVersion.json */ /** * Sample code: Delete_SchemaVersion. @@ -2337,7 +2687,7 @@ public final class SchemaVersionsDeleteSamples { */ public final class SchemaVersionsGetSamples { /* - * x-ms-original-file: 2025-10-01/Get_SchemaVersion.json + * x-ms-original-file: 2025-11-01-preview/Get_SchemaVersion.json */ /** * Sample code: Get_SchemaVersion. @@ -2360,7 +2710,7 @@ public final class SchemaVersionsGetSamples { */ public final class SchemaVersionsListBySchemaSamples { /* - * x-ms-original-file: 2025-10-01/List_SchemaVersions_BySchema.json + * x-ms-original-file: 2025-11-01-preview/List_SchemaVersions_BySchema.json */ /** * Sample code: List_SchemaVersions_Schema. @@ -2389,7 +2739,7 @@ import java.util.Map; */ public final class SchemasCreateOrReplaceSamples { /* - * x-ms-original-file: 2025-10-01/CreateOrReplace_Schema.json + * x-ms-original-file: 2025-11-01-preview/CreateOrReplace_Schema.json */ /** * Sample code: CreateOrReplace_Schema. @@ -2430,7 +2780,7 @@ public final class SchemasCreateOrReplaceSamples { */ public final class SchemasDeleteSamples { /* - * x-ms-original-file: 2025-10-01/Delete_Schema.json + * x-ms-original-file: 2025-11-01-preview/Delete_Schema.json */ /** * Sample code: Delete_Schema. @@ -2452,7 +2802,7 @@ public final class SchemasDeleteSamples { */ public final class SchemasGetSamples { /* - * x-ms-original-file: 2025-10-01/Get_Schema.json + * x-ms-original-file: 2025-11-01-preview/Get_Schema.json */ /** * Sample code: Schemas_Get. @@ -2474,7 +2824,7 @@ public final class SchemasGetSamples { */ public final class SchemasListBySchemaRegistrySamples { /* - * x-ms-original-file: 2025-10-01/List_Schemas_BySchemaRegistry.json + * x-ms-original-file: 2025-11-01-preview/List_Schemas_BySchemaRegistry.json */ /** * Sample code: List_Schemas_SchemaRegistry. diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/pom.xml b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/pom.xml index 061c43707091..89f246a1ce80 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/pom.xml +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/pom.xml @@ -45,6 +45,7 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <jacoco.min.linecoverage>0</jacoco.min.linecoverage> <jacoco.min.branchcoverage>0</jacoco.min.branchcoverage> + <revapi.skip>true</revapi.skip> </properties> <dependencies> <dependency> diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/NamespacesClient.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/NamespacesClient.java index 84e4054740f0..8811e01ee5f1 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/NamespacesClient.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/NamespacesClient.java @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceInner; -import com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceMigrateResponseInner; import com.azure.resourcemanager.deviceregistry.models.NamespaceMigrateRequest; import com.azure.resourcemanager.deviceregistry.models.NamespaceUpdate; @@ -280,8 +279,8 @@ SyncPoller<PollResult<NamespaceInner>, NamespaceInner> beginUpdate(String resour * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<NamespaceMigrateResponseInner>, NamespaceMigrateResponseInner> - beginMigrate(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body); + SyncPoller<PollResult<Void>, Void> beginMigrate(String resourceGroupName, String namespaceName, + NamespaceMigrateRequest body); /** * Migrate the resources into Namespace. @@ -296,8 +295,8 @@ SyncPoller<PollResult<NamespaceInner>, NamespaceInner> beginUpdate(String resour * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<NamespaceMigrateResponseInner>, NamespaceMigrateResponseInner> - beginMigrate(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body, Context context); + SyncPoller<PollResult<Void>, Void> beginMigrate(String resourceGroupName, String namespaceName, + NamespaceMigrateRequest body, Context context); /** * Migrate the resources into Namespace. @@ -308,10 +307,9 @@ SyncPoller<PollResult<NamespaceInner>, NamespaceInner> beginUpdate(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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) - NamespaceMigrateResponseInner migrate(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body); + void migrate(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body); /** * Migrate the resources into Namespace. @@ -323,9 +321,7 @@ SyncPoller<PollResult<NamespaceInner>, NamespaceInner> beginUpdate(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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) - NamespaceMigrateResponseInner migrate(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body, - Context context); + void migrate(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body, Context context); } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceImpl.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceImpl.java index 0fdad6e194a3..983fbf8da92d 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceImpl.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceImpl.java @@ -10,7 +10,6 @@ import com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceInner; import com.azure.resourcemanager.deviceregistry.models.Namespace; import com.azure.resourcemanager.deviceregistry.models.NamespaceMigrateRequest; -import com.azure.resourcemanager.deviceregistry.models.NamespaceMigrateResponse; import com.azure.resourcemanager.deviceregistry.models.NamespaceProperties; import com.azure.resourcemanager.deviceregistry.models.NamespaceUpdate; import com.azure.resourcemanager.deviceregistry.models.NamespaceUpdateProperties; @@ -154,12 +153,12 @@ public Namespace refresh(Context context) { return this; } - public NamespaceMigrateResponse migrate(NamespaceMigrateRequest body) { - return serviceManager.namespaces().migrate(resourceGroupName, namespaceName, body); + public void migrate(NamespaceMigrateRequest body) { + serviceManager.namespaces().migrate(resourceGroupName, namespaceName, body); } - public NamespaceMigrateResponse migrate(NamespaceMigrateRequest body, Context context) { - return serviceManager.namespaces().migrate(resourceGroupName, namespaceName, body, context); + public void migrate(NamespaceMigrateRequest body, Context context) { + serviceManager.namespaces().migrate(resourceGroupName, namespaceName, body, context); } public NamespaceImpl withRegion(Region location) { diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespacesClientImpl.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespacesClientImpl.java index 881fde064fe1..438675228dcb 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespacesClientImpl.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespacesClientImpl.java @@ -36,7 +36,6 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient; import com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceInner; -import com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceMigrateResponseInner; import com.azure.resourcemanager.deviceregistry.implementation.models.NamespaceListResult; import com.azure.resourcemanager.deviceregistry.models.NamespaceMigrateRequest; import com.azure.resourcemanager.deviceregistry.models.NamespaceUpdate; @@ -1074,11 +1073,10 @@ private Response<BinaryData> migrateWithResponse(String resourceGroupName, Strin * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<NamespaceMigrateResponseInner>, NamespaceMigrateResponseInner> - beginMigrateAsync(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body) { + private PollerFlux<PollResult<Void>, Void> beginMigrateAsync(String resourceGroupName, String namespaceName, + NamespaceMigrateRequest body) { Mono<Response<Flux<ByteBuffer>>> mono = migrateWithResponseAsync(resourceGroupName, namespaceName, body); - return this.client.<NamespaceMigrateResponseInner, NamespaceMigrateResponseInner>getLroResult(mono, - this.client.getHttpPipeline(), NamespaceMigrateResponseInner.class, NamespaceMigrateResponseInner.class, + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -1094,11 +1092,10 @@ private Response<BinaryData> migrateWithResponse(String resourceGroupName, Strin * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<NamespaceMigrateResponseInner>, NamespaceMigrateResponseInner> - beginMigrate(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body) { + public SyncPoller<PollResult<Void>, Void> beginMigrate(String resourceGroupName, String namespaceName, + NamespaceMigrateRequest body) { Response<BinaryData> response = migrateWithResponse(resourceGroupName, namespaceName, body); - return this.client.<NamespaceMigrateResponseInner, NamespaceMigrateResponseInner>getLroResult(response, - NamespaceMigrateResponseInner.class, NamespaceMigrateResponseInner.class, Context.NONE); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -1114,11 +1111,10 @@ private Response<BinaryData> migrateWithResponse(String resourceGroupName, Strin * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<NamespaceMigrateResponseInner>, NamespaceMigrateResponseInner> - beginMigrate(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body, Context context) { + public SyncPoller<PollResult<Void>, Void> beginMigrate(String resourceGroupName, String namespaceName, + NamespaceMigrateRequest body, Context context) { Response<BinaryData> response = migrateWithResponse(resourceGroupName, namespaceName, body, context); - return this.client.<NamespaceMigrateResponseInner, NamespaceMigrateResponseInner>getLroResult(response, - NamespaceMigrateResponseInner.class, NamespaceMigrateResponseInner.class, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); } /** @@ -1130,11 +1126,10 @@ private Response<BinaryData> migrateWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<NamespaceMigrateResponseInner> migrateAsync(String resourceGroupName, String namespaceName, - NamespaceMigrateRequest body) { + private Mono<Void> migrateAsync(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body) { return beginMigrateAsync(resourceGroupName, namespaceName, body).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1148,12 +1143,10 @@ private Mono<NamespaceMigrateResponseInner> migrateAsync(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NamespaceMigrateResponseInner migrate(String resourceGroupName, String namespaceName, - NamespaceMigrateRequest body) { - return beginMigrate(resourceGroupName, namespaceName, body).getFinalResult(); + public void migrate(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body) { + beginMigrate(resourceGroupName, namespaceName, body).getFinalResult(); } /** @@ -1166,12 +1159,10 @@ public NamespaceMigrateResponseInner migrate(String resourceGroupName, String na * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 NamespaceMigrateResponseInner migrate(String resourceGroupName, String namespaceName, - NamespaceMigrateRequest body, Context context) { - return beginMigrate(resourceGroupName, namespaceName, body, context).getFinalResult(); + public void migrate(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body, Context context) { + beginMigrate(resourceGroupName, namespaceName, body, context).getFinalResult(); } /** diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespacesImpl.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespacesImpl.java index 755178944ee7..b88d68e1a46b 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespacesImpl.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespacesImpl.java @@ -11,10 +11,8 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient; import com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceInner; -import com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceMigrateResponseInner; import com.azure.resourcemanager.deviceregistry.models.Namespace; import com.azure.resourcemanager.deviceregistry.models.NamespaceMigrateRequest; -import com.azure.resourcemanager.deviceregistry.models.NamespaceMigrateResponse; import com.azure.resourcemanager.deviceregistry.models.Namespaces; public final class NamespacesImpl implements Namespaces { @@ -79,25 +77,12 @@ public PagedIterable<Namespace> list(Context context) { return ResourceManagerUtils.mapPage(inner, inner1 -> new NamespaceImpl(inner1, this.manager())); } - public NamespaceMigrateResponse migrate(String resourceGroupName, String namespaceName, - NamespaceMigrateRequest body) { - NamespaceMigrateResponseInner inner = this.serviceClient().migrate(resourceGroupName, namespaceName, body); - if (inner != null) { - return new NamespaceMigrateResponseImpl(inner, this.manager()); - } else { - return null; - } + public void migrate(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body) { + this.serviceClient().migrate(resourceGroupName, namespaceName, body); } - public NamespaceMigrateResponse migrate(String resourceGroupName, String namespaceName, - NamespaceMigrateRequest body, Context context) { - NamespaceMigrateResponseInner inner - = this.serviceClient().migrate(resourceGroupName, namespaceName, body, context); - if (inner != null) { - return new NamespaceMigrateResponseImpl(inner, this.manager()); - } else { - return null; - } + public void migrate(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body, Context context) { + this.serviceClient().migrate(resourceGroupName, namespaceName, body, context); } public Namespace getById(String id) { diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/Namespace.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/Namespace.java index ff57e3f48467..a78506019d01 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/Namespace.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/Namespace.java @@ -304,9 +304,8 @@ interface WithProperties { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - NamespaceMigrateResponse migrate(NamespaceMigrateRequest body); + void migrate(NamespaceMigrateRequest body); /** * Migrate the resources into Namespace. @@ -316,7 +315,6 @@ interface WithProperties { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - NamespaceMigrateResponse migrate(NamespaceMigrateRequest body, Context context); + void migrate(NamespaceMigrateRequest body, Context context); } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/Namespaces.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/Namespaces.java index d2bfcd87e8c3..04a60ed8c1f5 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/Namespaces.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/Namespaces.java @@ -112,9 +112,8 @@ public interface Namespaces { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - NamespaceMigrateResponse migrate(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body); + void migrate(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body); /** * Migrate the resources into Namespace. @@ -126,10 +125,8 @@ public interface Namespaces { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - NamespaceMigrateResponse migrate(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body, - Context context); + void migrate(String resourceGroupName, String namespaceName, NamespaceMigrateRequest body, Context context); /** * Get a Namespace. diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/BillingContainersGetWithResponseMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/BillingContainersGetWithResponseMockTests.java index bb25c25d3ab4..389d2602611d 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/BillingContainersGetWithResponseMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/BillingContainersGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class BillingContainersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\"},\"etag\":\"kcxk\",\"id\":\"bn\",\"name\":\"mysu\",\"type\":\"swqrntvlwijp\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"etag\":\"sxwaabzm\",\"id\":\"rygznmmaxriz\",\"name\":\"zob\",\"type\":\"opxlhslnelxieixy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BillingContainer response - = manager.billingContainers().getWithResponse("vl", com.azure.core.util.Context.NONE).getValue(); + = manager.billingContainers().getWithResponse("igjkskyrio", com.azure.core.util.Context.NONE).getValue(); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/BillingContainersListMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/BillingContainersListMockTests.java index 712ad0ab414c..573fd48f9fbe 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/BillingContainersListMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/BillingContainersListMockTests.java @@ -21,7 +21,7 @@ public final class BillingContainersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\"},\"etag\":\"oqq\",\"id\":\"cyyufmh\",\"name\":\"uncuw\",\"type\":\"qspkcdqzhlctd\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\"},\"etag\":\"cwcrojphs\",\"id\":\"cawjutifdwfmvi\",\"name\":\"orq\",\"type\":\"bttzhraglkafhonq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DatasetMqttDestinationTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DatasetMqttDestinationTests.java index d3b4c2b9e9fe..f0f518ffb0c8 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DatasetMqttDestinationTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DatasetMqttDestinationTests.java @@ -15,25 +15,25 @@ public final class DatasetMqttDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DatasetMqttDestination model = BinaryData.fromString( - "{\"target\":\"Mqtt\",\"configuration\":{\"topic\":\"wzbaiue\",\"retain\":\"Keep\",\"qos\":\"Qos0\",\"ttl\":7484019295322681584}}") + "{\"target\":\"Mqtt\",\"configuration\":{\"topic\":\"obbc\",\"retain\":\"Keep\",\"qos\":\"Qos0\",\"ttl\":4282365131498375699}}") .toObject(DatasetMqttDestination.class); - Assertions.assertEquals("wzbaiue", model.configuration().topic()); + Assertions.assertEquals("obbc", model.configuration().topic()); Assertions.assertEquals(TopicRetainType.KEEP, model.configuration().retain()); Assertions.assertEquals(MqttDestinationQos.QOS0, model.configuration().qos()); - Assertions.assertEquals(7484019295322681584L, model.configuration().ttl()); + Assertions.assertEquals(4282365131498375699L, model.configuration().ttl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DatasetMqttDestination model - = new DatasetMqttDestination().withConfiguration(new MqttDestinationConfiguration().withTopic("wzbaiue") + = new DatasetMqttDestination().withConfiguration(new MqttDestinationConfiguration().withTopic("obbc") .withRetain(TopicRetainType.KEEP) .withQos(MqttDestinationQos.QOS0) - .withTtl(7484019295322681584L)); + .withTtl(4282365131498375699L)); model = BinaryData.fromObject(model).toObject(DatasetMqttDestination.class); - Assertions.assertEquals("wzbaiue", model.configuration().topic()); + Assertions.assertEquals("obbc", model.configuration().topic()); Assertions.assertEquals(TopicRetainType.KEEP, model.configuration().retain()); Assertions.assertEquals(MqttDestinationQos.QOS0, model.configuration().qos()); - Assertions.assertEquals(7484019295322681584L, model.configuration().ttl()); + Assertions.assertEquals(4282365131498375699L, model.configuration().ttl()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DatasetStorageDestinationTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DatasetStorageDestinationTests.java index deadd46e8956..4f422963394e 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DatasetStorageDestinationTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DatasetStorageDestinationTests.java @@ -13,16 +13,16 @@ public final class DatasetStorageDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DatasetStorageDestination model - = BinaryData.fromString("{\"target\":\"Storage\",\"configuration\":{\"path\":\"tkncwsc\"}}") + = BinaryData.fromString("{\"target\":\"Storage\",\"configuration\":{\"path\":\"mxiebw\"}}") .toObject(DatasetStorageDestination.class); - Assertions.assertEquals("tkncwsc", model.configuration().path()); + Assertions.assertEquals("mxiebw", model.configuration().path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DatasetStorageDestination model = new DatasetStorageDestination() - .withConfiguration(new StorageDestinationConfiguration().withPath("tkncwsc")); + .withConfiguration(new StorageDestinationConfiguration().withPath("mxiebw")); model = BinaryData.fromObject(model).toObject(DatasetStorageDestination.class); - Assertions.assertEquals("tkncwsc", model.configuration().path()); + Assertions.assertEquals("mxiebw", model.configuration().path()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DeviceMessagingEndpointTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DeviceMessagingEndpointTests.java index 2f337703a5f4..74773781eb90 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DeviceMessagingEndpointTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DeviceMessagingEndpointTests.java @@ -11,19 +11,17 @@ public final class DeviceMessagingEndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DeviceMessagingEndpoint model - = BinaryData.fromString("{\"endpointType\":\"ipfpubji\",\"address\":\"wwiftohqkvpuv\"}") - .toObject(DeviceMessagingEndpoint.class); - Assertions.assertEquals("ipfpubji", model.endpointType()); - Assertions.assertEquals("wwiftohqkvpuv", model.address()); + DeviceMessagingEndpoint model = BinaryData.fromString("{\"endpointType\":\"hky\",\"address\":\"ubeddg\"}") + .toObject(DeviceMessagingEndpoint.class); + Assertions.assertEquals("hky", model.endpointType()); + Assertions.assertEquals("ubeddg", model.address()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeviceMessagingEndpoint model - = new DeviceMessagingEndpoint().withEndpointType("ipfpubji").withAddress("wwiftohqkvpuv"); + DeviceMessagingEndpoint model = new DeviceMessagingEndpoint().withEndpointType("hky").withAddress("ubeddg"); model = BinaryData.fromObject(model).toObject(DeviceMessagingEndpoint.class); - Assertions.assertEquals("ipfpubji", model.endpointType()); - Assertions.assertEquals("wwiftohqkvpuv", model.address()); + Assertions.assertEquals("hky", model.endpointType()); + Assertions.assertEquals("ubeddg", model.address()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DeviceRefTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DeviceRefTests.java index e14dcfb44a97..990537f007ce 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DeviceRefTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DeviceRefTests.java @@ -11,17 +11,17 @@ public final class DeviceRefTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DeviceRef model - = BinaryData.fromString("{\"deviceName\":\"opwi\",\"endpointName\":\"ighxpk\"}").toObject(DeviceRef.class); - Assertions.assertEquals("opwi", model.deviceName()); - Assertions.assertEquals("ighxpk", model.endpointName()); + DeviceRef model = BinaryData.fromString("{\"deviceName\":\"uwprzql\",\"endpointName\":\"eualupjmkhf\"}") + .toObject(DeviceRef.class); + Assertions.assertEquals("uwprzql", model.deviceName()); + Assertions.assertEquals("eualupjmkhf", model.endpointName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeviceRef model = new DeviceRef().withDeviceName("opwi").withEndpointName("ighxpk"); + DeviceRef model = new DeviceRef().withDeviceName("uwprzql").withEndpointName("eualupjmkhf"); model = BinaryData.fromObject(model).toObject(DeviceRef.class); - Assertions.assertEquals("opwi", model.deviceName()); - Assertions.assertEquals("ighxpk", model.endpointName()); + Assertions.assertEquals("uwprzql", model.deviceName()); + Assertions.assertEquals("eualupjmkhf", model.endpointName()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredInboundEndpointsTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredInboundEndpointsTests.java index a155e1de20b2..bc90216c5e76 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredInboundEndpointsTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredInboundEndpointsTests.java @@ -15,30 +15,31 @@ public final class DiscoveredInboundEndpointsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DiscoveredInboundEndpoints model = BinaryData.fromString( - "{\"endpointType\":\"zpnfqntcypsxj\",\"address\":\"foimwkslircizjxv\",\"version\":\"fceacvlhvygd\",\"supportedAuthenticationMethods\":[\"Anonymous\"],\"additionalConfiguration\":\"rtwnawjslbi\",\"lastUpdatedOn\":\"2021-06-28T20:11:56Z\"}") + "{\"endpointType\":\"rxgibbd\",\"address\":\"xconfozauors\",\"version\":\"okwbqplh\",\"supportedAuthenticationMethods\":[\"Anonymous\",\"UsernamePassword\",\"UsernamePassword\"],\"additionalConfiguration\":\"zlrphwzs\",\"lastUpdatedOn\":\"2021-03-12T05:54:27Z\"}") .toObject(DiscoveredInboundEndpoints.class); - Assertions.assertEquals("zpnfqntcypsxj", model.endpointType()); - Assertions.assertEquals("foimwkslircizjxv", model.address()); - Assertions.assertEquals("fceacvlhvygd", model.version()); + Assertions.assertEquals("rxgibbd", model.endpointType()); + Assertions.assertEquals("xconfozauors", model.address()); + Assertions.assertEquals("okwbqplh", model.version()); Assertions.assertEquals(AuthenticationMethod.ANONYMOUS, model.supportedAuthenticationMethods().get(0)); - Assertions.assertEquals("rtwnawjslbi", model.additionalConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-28T20:11:56Z"), model.lastUpdatedOn()); + Assertions.assertEquals("zlrphwzs", model.additionalConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-12T05:54:27Z"), model.lastUpdatedOn()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DiscoveredInboundEndpoints model = new DiscoveredInboundEndpoints().withEndpointType("zpnfqntcypsxj") - .withAddress("foimwkslircizjxv") - .withVersion("fceacvlhvygd") - .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.ANONYMOUS)) - .withAdditionalConfiguration("rtwnawjslbi") - .withLastUpdatedOn(OffsetDateTime.parse("2021-06-28T20:11:56Z")); + DiscoveredInboundEndpoints model = new DiscoveredInboundEndpoints().withEndpointType("rxgibbd") + .withAddress("xconfozauors") + .withVersion("okwbqplh") + .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.ANONYMOUS, + AuthenticationMethod.USERNAME_PASSWORD, AuthenticationMethod.USERNAME_PASSWORD)) + .withAdditionalConfiguration("zlrphwzs") + .withLastUpdatedOn(OffsetDateTime.parse("2021-03-12T05:54:27Z")); model = BinaryData.fromObject(model).toObject(DiscoveredInboundEndpoints.class); - Assertions.assertEquals("zpnfqntcypsxj", model.endpointType()); - Assertions.assertEquals("foimwkslircizjxv", model.address()); - Assertions.assertEquals("fceacvlhvygd", model.version()); + Assertions.assertEquals("rxgibbd", model.endpointType()); + Assertions.assertEquals("xconfozauors", model.address()); + Assertions.assertEquals("okwbqplh", model.version()); Assertions.assertEquals(AuthenticationMethod.ANONYMOUS, model.supportedAuthenticationMethods().get(0)); - Assertions.assertEquals("rtwnawjslbi", model.additionalConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-28T20:11:56Z"), model.lastUpdatedOn()); + Assertions.assertEquals("zlrphwzs", model.additionalConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-12T05:54:27Z"), model.lastUpdatedOn()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredMessagingEndpointsTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredMessagingEndpointsTests.java index 521a192b062a..52836acf1a5e 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredMessagingEndpointsTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredMessagingEndpointsTests.java @@ -20,56 +20,62 @@ public final class DiscoveredMessagingEndpointsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DiscoveredMessagingEndpoints model = BinaryData.fromString( - "{\"inbound\":{\"omvzzbtd\":{\"endpointType\":\"tbghhavgrvkf\",\"address\":\"ovjzhpjbibgjmfx\",\"version\":\"vfcluyovwxnbkfe\",\"supportedAuthenticationMethods\":[\"Certificate\",\"UsernamePassword\",\"Anonymous\",\"UsernamePassword\"],\"additionalConfiguration\":\"zdgiruj\",\"lastUpdatedOn\":\"2021-05-23T20:25:15Z\"},\"otmrfhir\":{\"endpointType\":\"qvpn\",\"address\":\"yujviylwdshfssn\",\"version\":\"gy\",\"supportedAuthenticationMethods\":[\"Anonymous\",\"Anonymous\",\"Anonymous\"],\"additionalConfiguration\":\"aojfm\",\"lastUpdatedOn\":\"2021-07-25T05:28:25Z\"}},\"outbound\":{\"assigned\":{\"pskasdvlmfwdg\":{\"endpointType\":\"oxoftpipiwycz\",\"address\":\"hxacpqjlihhyu\"},\"urisjnhnytxifqj\":{\"endpointType\":\"ulucv\",\"address\":\"amrsreuzv\"},\"cesutrgjupauut\":{\"endpointType\":\"xmrhu\",\"address\":\"lw\"},\"g\":{\"endpointType\":\"oqh\",\"address\":\"hej\"}}}}") + "{\"inbound\":{\"leorfmluiqtqz\":{\"endpointType\":\"jfsmlmbtxhwgfwsr\",\"address\":\"a\",\"version\":\"oezbrhubsk\",\"supportedAuthenticationMethods\":[\"Anonymous\"],\"additionalConfiguration\":\"oookkqfq\",\"lastUpdatedOn\":\"2021-07-12T13:05:01Z\"},\"tiewdj\":{\"endpointType\":\"avyvnqqyba\",\"address\":\"yeua\",\"version\":\"kq\",\"supportedAuthenticationMethods\":[\"Certificate\",\"Anonymous\"],\"additionalConfiguration\":\"lesjcbhe\",\"lastUpdatedOn\":\"2021-04-10T08:53:01Z\"},\"acoebj\":{\"endpointType\":\"vbquwr\",\"address\":\"ehwagoh\",\"version\":\"f\",\"supportedAuthenticationMethods\":[\"UsernamePassword\",\"Certificate\",\"UsernamePassword\"],\"additionalConfiguration\":\"vvhmxtdrj\",\"lastUpdatedOn\":\"2021-06-23T19:55:26Z\"}},\"outbound\":{\"assigned\":{\"v\":{\"endpointType\":\"cjznmwcpmg\",\"address\":\"aadraufactkahz\"},\"lqubkwdlen\":{\"endpointType\":\"j\",\"address\":\"iuxxpshneekulfg\"},\"orwmduvwpklv\":{\"endpointType\":\"sutujba\",\"address\":\"pjuohminyfl\"},\"nnbj\":{\"endpointType\":\"mygdxpgpqch\",\"address\":\"sze\"}}}}") .toObject(DiscoveredMessagingEndpoints.class); - Assertions.assertEquals("tbghhavgrvkf", model.inbound().get("omvzzbtd").endpointType()); - Assertions.assertEquals("ovjzhpjbibgjmfx", model.inbound().get("omvzzbtd").address()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.inbound().get("omvzzbtd").version()); - Assertions.assertEquals(AuthenticationMethod.CERTIFICATE, - model.inbound().get("omvzzbtd").supportedAuthenticationMethods().get(0)); - Assertions.assertEquals("zdgiruj", model.inbound().get("omvzzbtd").additionalConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T20:25:15Z"), - model.inbound().get("omvzzbtd").lastUpdatedOn()); - Assertions.assertEquals("oxoftpipiwycz", model.outbound().assigned().get("pskasdvlmfwdg").endpointType()); - Assertions.assertEquals("hxacpqjlihhyu", model.outbound().assigned().get("pskasdvlmfwdg").address()); + Assertions.assertEquals("jfsmlmbtxhwgfwsr", model.inbound().get("leorfmluiqtqz").endpointType()); + Assertions.assertEquals("a", model.inbound().get("leorfmluiqtqz").address()); + Assertions.assertEquals("oezbrhubsk", model.inbound().get("leorfmluiqtqz").version()); + Assertions.assertEquals(AuthenticationMethod.ANONYMOUS, + model.inbound().get("leorfmluiqtqz").supportedAuthenticationMethods().get(0)); + Assertions.assertEquals("oookkqfq", model.inbound().get("leorfmluiqtqz").additionalConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-12T13:05:01Z"), + model.inbound().get("leorfmluiqtqz").lastUpdatedOn()); + Assertions.assertEquals("cjznmwcpmg", model.outbound().assigned().get("v").endpointType()); + Assertions.assertEquals("aadraufactkahz", model.outbound().assigned().get("v").address()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DiscoveredMessagingEndpoints model = new DiscoveredMessagingEndpoints() - .withInbound(mapOf("omvzzbtd", - new DiscoveredInboundEndpoints().withEndpointType("tbghhavgrvkf") - .withAddress("ovjzhpjbibgjmfx") - .withVersion("vfcluyovwxnbkfe") + .withInbound(mapOf("leorfmluiqtqz", + new DiscoveredInboundEndpoints().withEndpointType("jfsmlmbtxhwgfwsr") + .withAddress("a") + .withVersion("oezbrhubsk") + .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.ANONYMOUS)) + .withAdditionalConfiguration("oookkqfq") + .withLastUpdatedOn(OffsetDateTime.parse("2021-07-12T13:05:01Z")), + "tiewdj", + new DiscoveredInboundEndpoints().withEndpointType("avyvnqqyba") + .withAddress("yeua") + .withVersion("kq") .withSupportedAuthenticationMethods( - Arrays.asList(AuthenticationMethod.CERTIFICATE, AuthenticationMethod.USERNAME_PASSWORD, - AuthenticationMethod.ANONYMOUS, AuthenticationMethod.USERNAME_PASSWORD)) - .withAdditionalConfiguration("zdgiruj") - .withLastUpdatedOn(OffsetDateTime.parse("2021-05-23T20:25:15Z")), - "otmrfhir", - new DiscoveredInboundEndpoints().withEndpointType("qvpn") - .withAddress("yujviylwdshfssn") - .withVersion("gy") - .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.ANONYMOUS, - AuthenticationMethod.ANONYMOUS, AuthenticationMethod.ANONYMOUS)) - .withAdditionalConfiguration("aojfm") - .withLastUpdatedOn(OffsetDateTime.parse("2021-07-25T05:28:25Z")))) - .withOutbound(new DiscoveredOutboundEndpoints().withAssigned(mapOf("pskasdvlmfwdg", - new DeviceMessagingEndpoint().withEndpointType("oxoftpipiwycz").withAddress("hxacpqjlihhyu"), - "urisjnhnytxifqj", new DeviceMessagingEndpoint().withEndpointType("ulucv").withAddress("amrsreuzv"), - "cesutrgjupauut", new DeviceMessagingEndpoint().withEndpointType("xmrhu").withAddress("lw"), "g", - new DeviceMessagingEndpoint().withEndpointType("oqh").withAddress("hej")))); + Arrays.asList(AuthenticationMethod.CERTIFICATE, AuthenticationMethod.ANONYMOUS)) + .withAdditionalConfiguration("lesjcbhe") + .withLastUpdatedOn(OffsetDateTime.parse("2021-04-10T08:53:01Z")), + "acoebj", + new DiscoveredInboundEndpoints().withEndpointType("vbquwr") + .withAddress("ehwagoh") + .withVersion("f") + .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.USERNAME_PASSWORD, + AuthenticationMethod.CERTIFICATE, AuthenticationMethod.USERNAME_PASSWORD)) + .withAdditionalConfiguration("vvhmxtdrj") + .withLastUpdatedOn(OffsetDateTime.parse("2021-06-23T19:55:26Z")))) + .withOutbound(new DiscoveredOutboundEndpoints().withAssigned(mapOf("v", + new DeviceMessagingEndpoint().withEndpointType("cjznmwcpmg").withAddress("aadraufactkahz"), + "lqubkwdlen", new DeviceMessagingEndpoint().withEndpointType("j").withAddress("iuxxpshneekulfg"), + "orwmduvwpklv", new DeviceMessagingEndpoint().withEndpointType("sutujba").withAddress("pjuohminyfl"), + "nnbj", new DeviceMessagingEndpoint().withEndpointType("mygdxpgpqch").withAddress("sze")))); model = BinaryData.fromObject(model).toObject(DiscoveredMessagingEndpoints.class); - Assertions.assertEquals("tbghhavgrvkf", model.inbound().get("omvzzbtd").endpointType()); - Assertions.assertEquals("ovjzhpjbibgjmfx", model.inbound().get("omvzzbtd").address()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.inbound().get("omvzzbtd").version()); - Assertions.assertEquals(AuthenticationMethod.CERTIFICATE, - model.inbound().get("omvzzbtd").supportedAuthenticationMethods().get(0)); - Assertions.assertEquals("zdgiruj", model.inbound().get("omvzzbtd").additionalConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T20:25:15Z"), - model.inbound().get("omvzzbtd").lastUpdatedOn()); - Assertions.assertEquals("oxoftpipiwycz", model.outbound().assigned().get("pskasdvlmfwdg").endpointType()); - Assertions.assertEquals("hxacpqjlihhyu", model.outbound().assigned().get("pskasdvlmfwdg").address()); + Assertions.assertEquals("jfsmlmbtxhwgfwsr", model.inbound().get("leorfmluiqtqz").endpointType()); + Assertions.assertEquals("a", model.inbound().get("leorfmluiqtqz").address()); + Assertions.assertEquals("oezbrhubsk", model.inbound().get("leorfmluiqtqz").version()); + Assertions.assertEquals(AuthenticationMethod.ANONYMOUS, + model.inbound().get("leorfmluiqtqz").supportedAuthenticationMethods().get(0)); + Assertions.assertEquals("oookkqfq", model.inbound().get("leorfmluiqtqz").additionalConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-12T13:05:01Z"), + model.inbound().get("leorfmluiqtqz").lastUpdatedOn()); + Assertions.assertEquals("cjznmwcpmg", model.outbound().assigned().get("v").endpointType()); + Assertions.assertEquals("aadraufactkahz", model.outbound().assigned().get("v").address()); } // Use "Map.of" if available diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredOutboundEndpointsTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredOutboundEndpointsTests.java index d538f72d500d..302ac938ee75 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredOutboundEndpointsTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredOutboundEndpointsTests.java @@ -14,23 +14,20 @@ public final class DiscoveredOutboundEndpointsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DiscoveredOutboundEndpoints model = BinaryData.fromString( - "{\"assigned\":{\"qgaifmviklbydv\":{\"endpointType\":\"cyztsfmznbaeqp\",\"address\":\"chqnrnrpxehuwry\"},\"v\":{\"endpointType\":\"bejdznxcv\",\"address\":\"srhnjivo\"},\"ceamtm\":{\"endpointType\":\"ovqfzge\",\"address\":\"jdftuljltd\"},\"jw\":{\"endpointType\":\"u\",\"address\":\"m\"}}}") - .toObject(DiscoveredOutboundEndpoints.class); - Assertions.assertEquals("cyztsfmznbaeqp", model.assigned().get("qgaifmviklbydv").endpointType()); - Assertions.assertEquals("chqnrnrpxehuwry", model.assigned().get("qgaifmviklbydv").address()); + DiscoveredOutboundEndpoints model + = BinaryData.fromString("{\"assigned\":{\"biorktal\":{\"endpointType\":\"yuqdu\",\"address\":\"vmnnrw\"}}}") + .toObject(DiscoveredOutboundEndpoints.class); + Assertions.assertEquals("yuqdu", model.assigned().get("biorktal").endpointType()); + Assertions.assertEquals("vmnnrw", model.assigned().get("biorktal").address()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DiscoveredOutboundEndpoints model = new DiscoveredOutboundEndpoints().withAssigned(mapOf("qgaifmviklbydv", - new DeviceMessagingEndpoint().withEndpointType("cyztsfmznbaeqp").withAddress("chqnrnrpxehuwry"), "v", - new DeviceMessagingEndpoint().withEndpointType("bejdznxcv").withAddress("srhnjivo"), "ceamtm", - new DeviceMessagingEndpoint().withEndpointType("ovqfzge").withAddress("jdftuljltd"), "jw", - new DeviceMessagingEndpoint().withEndpointType("u").withAddress("m"))); + DiscoveredOutboundEndpoints model = new DiscoveredOutboundEndpoints().withAssigned( + mapOf("biorktal", new DeviceMessagingEndpoint().withEndpointType("yuqdu").withAddress("vmnnrw"))); model = BinaryData.fromObject(model).toObject(DiscoveredOutboundEndpoints.class); - Assertions.assertEquals("cyztsfmznbaeqp", model.assigned().get("qgaifmviklbydv").endpointType()); - Assertions.assertEquals("chqnrnrpxehuwry", model.assigned().get("qgaifmviklbydv").address()); + Assertions.assertEquals("yuqdu", model.assigned().get("biorktal").endpointType()); + Assertions.assertEquals("vmnnrw", model.assigned().get("biorktal").address()); } // Use "Map.of" if available diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/EventMqttDestinationTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/EventMqttDestinationTests.java index 7da1288a8bec..5f6f2a243aab 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/EventMqttDestinationTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/EventMqttDestinationTests.java @@ -15,25 +15,25 @@ public final class EventMqttDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EventMqttDestination model = BinaryData.fromString( - "{\"target\":\"Mqtt\",\"configuration\":{\"topic\":\"sx\",\"retain\":\"Never\",\"qos\":\"Qos0\",\"ttl\":8129000076742915216}}") + "{\"target\":\"Mqtt\",\"configuration\":{\"topic\":\"gwyzm\",\"retain\":\"Never\",\"qos\":\"Qos1\",\"ttl\":5337530926252366469}}") .toObject(EventMqttDestination.class); - Assertions.assertEquals("sx", model.configuration().topic()); + Assertions.assertEquals("gwyzm", model.configuration().topic()); Assertions.assertEquals(TopicRetainType.NEVER, model.configuration().retain()); - Assertions.assertEquals(MqttDestinationQos.QOS0, model.configuration().qos()); - Assertions.assertEquals(8129000076742915216L, model.configuration().ttl()); + Assertions.assertEquals(MqttDestinationQos.QOS1, model.configuration().qos()); + Assertions.assertEquals(5337530926252366469L, model.configuration().ttl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EventMqttDestination model - = new EventMqttDestination().withConfiguration(new MqttDestinationConfiguration().withTopic("sx") + = new EventMqttDestination().withConfiguration(new MqttDestinationConfiguration().withTopic("gwyzm") .withRetain(TopicRetainType.NEVER) - .withQos(MqttDestinationQos.QOS0) - .withTtl(8129000076742915216L)); + .withQos(MqttDestinationQos.QOS1) + .withTtl(5337530926252366469L)); model = BinaryData.fromObject(model).toObject(EventMqttDestination.class); - Assertions.assertEquals("sx", model.configuration().topic()); + Assertions.assertEquals("gwyzm", model.configuration().topic()); Assertions.assertEquals(TopicRetainType.NEVER, model.configuration().retain()); - Assertions.assertEquals(MqttDestinationQos.QOS0, model.configuration().qos()); - Assertions.assertEquals(8129000076742915216L, model.configuration().ttl()); + Assertions.assertEquals(MqttDestinationQos.QOS1, model.configuration().qos()); + Assertions.assertEquals(5337530926252366469L, model.configuration().ttl()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/EventStorageDestinationTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/EventStorageDestinationTests.java index fb3ccf8bb9e4..c78e1b026614 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/EventStorageDestinationTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/EventStorageDestinationTests.java @@ -13,16 +13,16 @@ public final class EventStorageDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EventStorageDestination model - = BinaryData.fromString("{\"target\":\"Storage\",\"configuration\":{\"path\":\"ceoveilovno\"}}") + = BinaryData.fromString("{\"target\":\"Storage\",\"configuration\":{\"path\":\"savjcbpwxqps\"}}") .toObject(EventStorageDestination.class); - Assertions.assertEquals("ceoveilovno", model.configuration().path()); + Assertions.assertEquals("savjcbpwxqps", model.configuration().path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EventStorageDestination model = new EventStorageDestination() - .withConfiguration(new StorageDestinationConfiguration().withPath("ceoveilovno")); + .withConfiguration(new StorageDestinationConfiguration().withPath("savjcbpwxqps")); model = BinaryData.fromObject(model).toObject(EventStorageDestination.class); - Assertions.assertEquals("ceoveilovno", model.configuration().path()); + Assertions.assertEquals("savjcbpwxqps", model.configuration().path()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/ManagementActionTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/ManagementActionTests.java index 7f0a7b3b6938..209c106b8a4b 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/ManagementActionTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/ManagementActionTests.java @@ -13,33 +13,33 @@ public final class ManagementActionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagementAction model = BinaryData.fromString( - "{\"name\":\"gfhzovawjvzunlut\",\"actionConfiguration\":\"n\",\"targetUri\":\"rnxipei\",\"typeRef\":\"jzuaejxdultskzbb\",\"topic\":\"zumveekgpwo\",\"actionType\":\"Call\",\"timeoutInSeconds\":733253816}") + "{\"name\":\"glzpswiydm\",\"actionConfiguration\":\"yhz\",\"targetUri\":\"xssadbzmnvdf\",\"typeRef\":\"ud\",\"topic\":\"dvxzbncblylpst\",\"actionType\":\"Write\",\"timeoutInSeconds\":907370686}") .toObject(ManagementAction.class); - Assertions.assertEquals("gfhzovawjvzunlut", model.name()); - Assertions.assertEquals("n", model.actionConfiguration()); - Assertions.assertEquals("rnxipei", model.targetUri()); - Assertions.assertEquals("jzuaejxdultskzbb", model.typeRef()); - Assertions.assertEquals("zumveekgpwo", model.topic()); - Assertions.assertEquals(ManagementActionType.CALL, model.actionType()); - Assertions.assertEquals(733253816, model.timeoutInSeconds()); + Assertions.assertEquals("glzpswiydm", model.name()); + Assertions.assertEquals("yhz", model.actionConfiguration()); + Assertions.assertEquals("xssadbzmnvdf", model.targetUri()); + Assertions.assertEquals("ud", model.typeRef()); + Assertions.assertEquals("dvxzbncblylpst", model.topic()); + Assertions.assertEquals(ManagementActionType.WRITE, model.actionType()); + Assertions.assertEquals(907370686, model.timeoutInSeconds()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagementAction model = new ManagementAction().withName("gfhzovawjvzunlut") - .withActionConfiguration("n") - .withTargetUri("rnxipei") - .withTypeRef("jzuaejxdultskzbb") - .withTopic("zumveekgpwo") - .withActionType(ManagementActionType.CALL) - .withTimeoutInSeconds(733253816); + ManagementAction model = new ManagementAction().withName("glzpswiydm") + .withActionConfiguration("yhz") + .withTargetUri("xssadbzmnvdf") + .withTypeRef("ud") + .withTopic("dvxzbncblylpst") + .withActionType(ManagementActionType.WRITE) + .withTimeoutInSeconds(907370686); model = BinaryData.fromObject(model).toObject(ManagementAction.class); - Assertions.assertEquals("gfhzovawjvzunlut", model.name()); - Assertions.assertEquals("n", model.actionConfiguration()); - Assertions.assertEquals("rnxipei", model.targetUri()); - Assertions.assertEquals("jzuaejxdultskzbb", model.typeRef()); - Assertions.assertEquals("zumveekgpwo", model.topic()); - Assertions.assertEquals(ManagementActionType.CALL, model.actionType()); - Assertions.assertEquals(733253816, model.timeoutInSeconds()); + Assertions.assertEquals("glzpswiydm", model.name()); + Assertions.assertEquals("yhz", model.actionConfiguration()); + Assertions.assertEquals("xssadbzmnvdf", model.targetUri()); + Assertions.assertEquals("ud", model.typeRef()); + Assertions.assertEquals("dvxzbncblylpst", model.topic()); + Assertions.assertEquals(ManagementActionType.WRITE, model.actionType()); + Assertions.assertEquals(907370686, model.timeoutInSeconds()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/ManagementGroupTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/ManagementGroupTests.java index 1a5adb343a9a..3f5f1a00b31a 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/ManagementGroupTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/ManagementGroupTests.java @@ -15,59 +15,66 @@ public final class ManagementGroupTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagementGroup model = BinaryData.fromString( - "{\"name\":\"wuwprzqlv\",\"dataSource\":\"alupjm\",\"managementGroupConfiguration\":\"fxobbcsws\",\"typeRef\":\"jriplrbpbewtghf\",\"defaultTopic\":\"lcgwxzvlvqh\",\"defaultTimeoutInSeconds\":1823532721,\"actions\":[{\"name\":\"ibtnmxiebwwaloay\",\"actionConfiguration\":\"gwrtzju\",\"targetUri\":\"gwyzm\",\"typeRef\":\"xongmtsavjcbpwxq\",\"topic\":\"rknftguvriuhprwm\",\"actionType\":\"Call\",\"timeoutInSeconds\":1468047146},{\"name\":\"tayriwwroyqbex\",\"actionConfiguration\":\"cqibycnojv\",\"targetUri\":\"nmefqsgzvahapj\",\"typeRef\":\"hpvgqz\",\"topic\":\"rvxdjzlmw\",\"actionType\":\"Write\",\"timeoutInSeconds\":413444138}]}") + "{\"name\":\"xyslqbh\",\"dataSource\":\"xoblytkbl\",\"managementGroupConfiguration\":\"ewwwfbkrvrnsv\",\"typeRef\":\"q\",\"defaultTopic\":\"hxcr\",\"defaultTimeoutInSeconds\":1416358219,\"actions\":[{\"name\":\"asrru\",\"actionConfiguration\":\"bhsqfsubcgjbirxb\",\"targetUri\":\"ybsrfbjfdtwss\",\"typeRef\":\"ftpvjzbexil\",\"topic\":\"nfqqnvwp\",\"actionType\":\"Read\",\"timeoutInSeconds\":1628769376},{\"name\":\"uoujmkcjhwqy\",\"actionConfiguration\":\"r\",\"targetUri\":\"bnw\",\"typeRef\":\"wgdrjervnaenqp\",\"topic\":\"indoygmifthnzd\",\"actionType\":\"Read\",\"timeoutInSeconds\":962281735},{\"name\":\"nayqi\",\"actionConfiguration\":\"nduhavhqlkthum\",\"targetUri\":\"qolbgyc\",\"typeRef\":\"iertgccymvaolp\",\"topic\":\"lqlfm\",\"actionType\":\"Read\",\"timeoutInSeconds\":1962598042}]}") .toObject(ManagementGroup.class); - Assertions.assertEquals("wuwprzqlv", model.name()); - Assertions.assertEquals("alupjm", model.dataSource()); - Assertions.assertEquals("fxobbcsws", model.managementGroupConfiguration()); - Assertions.assertEquals("jriplrbpbewtghf", model.typeRef()); - Assertions.assertEquals("lcgwxzvlvqh", model.defaultTopic()); - Assertions.assertEquals(1823532721, model.defaultTimeoutInSeconds()); - Assertions.assertEquals("ibtnmxiebwwaloay", model.actions().get(0).name()); - Assertions.assertEquals("gwrtzju", model.actions().get(0).actionConfiguration()); - Assertions.assertEquals("gwyzm", model.actions().get(0).targetUri()); - Assertions.assertEquals("xongmtsavjcbpwxq", model.actions().get(0).typeRef()); - Assertions.assertEquals("rknftguvriuhprwm", model.actions().get(0).topic()); - Assertions.assertEquals(ManagementActionType.CALL, model.actions().get(0).actionType()); - Assertions.assertEquals(1468047146, model.actions().get(0).timeoutInSeconds()); + Assertions.assertEquals("xyslqbh", model.name()); + Assertions.assertEquals("xoblytkbl", model.dataSource()); + Assertions.assertEquals("ewwwfbkrvrnsv", model.managementGroupConfiguration()); + Assertions.assertEquals("q", model.typeRef()); + Assertions.assertEquals("hxcr", model.defaultTopic()); + Assertions.assertEquals(1416358219, model.defaultTimeoutInSeconds()); + Assertions.assertEquals("asrru", model.actions().get(0).name()); + Assertions.assertEquals("bhsqfsubcgjbirxb", model.actions().get(0).actionConfiguration()); + Assertions.assertEquals("ybsrfbjfdtwss", model.actions().get(0).targetUri()); + Assertions.assertEquals("ftpvjzbexil", model.actions().get(0).typeRef()); + Assertions.assertEquals("nfqqnvwp", model.actions().get(0).topic()); + Assertions.assertEquals(ManagementActionType.READ, model.actions().get(0).actionType()); + Assertions.assertEquals(1628769376, model.actions().get(0).timeoutInSeconds()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagementGroup model = new ManagementGroup().withName("wuwprzqlv") - .withDataSource("alupjm") - .withManagementGroupConfiguration("fxobbcsws") - .withTypeRef("jriplrbpbewtghf") - .withDefaultTopic("lcgwxzvlvqh") - .withDefaultTimeoutInSeconds(1823532721) + ManagementGroup model = new ManagementGroup().withName("xyslqbh") + .withDataSource("xoblytkbl") + .withManagementGroupConfiguration("ewwwfbkrvrnsv") + .withTypeRef("q") + .withDefaultTopic("hxcr") + .withDefaultTimeoutInSeconds(1416358219) .withActions(Arrays.asList( - new ManagementAction().withName("ibtnmxiebwwaloay") - .withActionConfiguration("gwrtzju") - .withTargetUri("gwyzm") - .withTypeRef("xongmtsavjcbpwxq") - .withTopic("rknftguvriuhprwm") - .withActionType(ManagementActionType.CALL) - .withTimeoutInSeconds(1468047146), - new ManagementAction().withName("tayriwwroyqbex") - .withActionConfiguration("cqibycnojv") - .withTargetUri("nmefqsgzvahapj") - .withTypeRef("hpvgqz") - .withTopic("rvxdjzlmw") - .withActionType(ManagementActionType.WRITE) - .withTimeoutInSeconds(413444138))); + new ManagementAction().withName("asrru") + .withActionConfiguration("bhsqfsubcgjbirxb") + .withTargetUri("ybsrfbjfdtwss") + .withTypeRef("ftpvjzbexil") + .withTopic("nfqqnvwp") + .withActionType(ManagementActionType.READ) + .withTimeoutInSeconds(1628769376), + new ManagementAction().withName("uoujmkcjhwqy") + .withActionConfiguration("r") + .withTargetUri("bnw") + .withTypeRef("wgdrjervnaenqp") + .withTopic("indoygmifthnzd") + .withActionType(ManagementActionType.READ) + .withTimeoutInSeconds(962281735), + new ManagementAction().withName("nayqi") + .withActionConfiguration("nduhavhqlkthum") + .withTargetUri("qolbgyc") + .withTypeRef("iertgccymvaolp") + .withTopic("lqlfm") + .withActionType(ManagementActionType.READ) + .withTimeoutInSeconds(1962598042))); model = BinaryData.fromObject(model).toObject(ManagementGroup.class); - Assertions.assertEquals("wuwprzqlv", model.name()); - Assertions.assertEquals("alupjm", model.dataSource()); - Assertions.assertEquals("fxobbcsws", model.managementGroupConfiguration()); - Assertions.assertEquals("jriplrbpbewtghf", model.typeRef()); - Assertions.assertEquals("lcgwxzvlvqh", model.defaultTopic()); - Assertions.assertEquals(1823532721, model.defaultTimeoutInSeconds()); - Assertions.assertEquals("ibtnmxiebwwaloay", model.actions().get(0).name()); - Assertions.assertEquals("gwrtzju", model.actions().get(0).actionConfiguration()); - Assertions.assertEquals("gwyzm", model.actions().get(0).targetUri()); - Assertions.assertEquals("xongmtsavjcbpwxq", model.actions().get(0).typeRef()); - Assertions.assertEquals("rknftguvriuhprwm", model.actions().get(0).topic()); - Assertions.assertEquals(ManagementActionType.CALL, model.actions().get(0).actionType()); - Assertions.assertEquals(1468047146, model.actions().get(0).timeoutInSeconds()); + Assertions.assertEquals("xyslqbh", model.name()); + Assertions.assertEquals("xoblytkbl", model.dataSource()); + Assertions.assertEquals("ewwwfbkrvrnsv", model.managementGroupConfiguration()); + Assertions.assertEquals("q", model.typeRef()); + Assertions.assertEquals("hxcr", model.defaultTopic()); + Assertions.assertEquals(1416358219, model.defaultTimeoutInSeconds()); + Assertions.assertEquals("asrru", model.actions().get(0).name()); + Assertions.assertEquals("bhsqfsubcgjbirxb", model.actions().get(0).actionConfiguration()); + Assertions.assertEquals("ybsrfbjfdtwss", model.actions().get(0).targetUri()); + Assertions.assertEquals("ftpvjzbexil", model.actions().get(0).typeRef()); + Assertions.assertEquals("nfqqnvwp", model.actions().get(0).topic()); + Assertions.assertEquals(ManagementActionType.READ, model.actions().get(0).actionType()); + Assertions.assertEquals(1628769376, model.actions().get(0).timeoutInSeconds()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/MqttDestinationConfigurationTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/MqttDestinationConfigurationTests.java index 9fd1c876e22b..2815628fe412 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/MqttDestinationConfigurationTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/MqttDestinationConfigurationTests.java @@ -15,24 +15,24 @@ public final class MqttDestinationConfigurationTests { public void testDeserialize() throws Exception { MqttDestinationConfiguration model = BinaryData .fromString( - "{\"topic\":\"upedeojnabckhs\",\"retain\":\"Never\",\"qos\":\"Qos1\",\"ttl\":3122084023078299905}") + "{\"topic\":\"plrbpbewtghf\",\"retain\":\"Never\",\"qos\":\"Qos0\",\"ttl\":6671653333153914115}") .toObject(MqttDestinationConfiguration.class); - Assertions.assertEquals("upedeojnabckhs", model.topic()); + Assertions.assertEquals("plrbpbewtghf", model.topic()); Assertions.assertEquals(TopicRetainType.NEVER, model.retain()); - Assertions.assertEquals(MqttDestinationQos.QOS1, model.qos()); - Assertions.assertEquals(3122084023078299905L, model.ttl()); + Assertions.assertEquals(MqttDestinationQos.QOS0, model.qos()); + Assertions.assertEquals(6671653333153914115L, model.ttl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MqttDestinationConfiguration model = new MqttDestinationConfiguration().withTopic("upedeojnabckhs") + MqttDestinationConfiguration model = new MqttDestinationConfiguration().withTopic("plrbpbewtghf") .withRetain(TopicRetainType.NEVER) - .withQos(MqttDestinationQos.QOS1) - .withTtl(3122084023078299905L); + .withQos(MqttDestinationQos.QOS0) + .withTtl(6671653333153914115L); model = BinaryData.fromObject(model).toObject(MqttDestinationConfiguration.class); - Assertions.assertEquals("upedeojnabckhs", model.topic()); + Assertions.assertEquals("plrbpbewtghf", model.topic()); Assertions.assertEquals(TopicRetainType.NEVER, model.retain()); - Assertions.assertEquals(MqttDestinationQos.QOS1, model.qos()); - Assertions.assertEquals(3122084023078299905L, model.ttl()); + Assertions.assertEquals(MqttDestinationQos.QOS0, model.qos()); + Assertions.assertEquals(6671653333153914115L, model.ttl()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDatasetDataPointTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDatasetDataPointTests.java index eb624c5b888d..747659c5f913 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDatasetDataPointTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDatasetDataPointTests.java @@ -12,24 +12,24 @@ public final class NamespaceDatasetDataPointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceDatasetDataPoint model = BinaryData.fromString( - "{\"name\":\"wfudwpzntxhdzhl\",\"dataSource\":\"qj\",\"dataPointConfiguration\":\"ck\",\"typeRef\":\"lhrxsbkyvpyc\"}") + "{\"name\":\"o\",\"dataSource\":\"hb\",\"dataPointConfiguration\":\"knalaulppg\",\"typeRef\":\"tpnapnyiropuhpig\"}") .toObject(NamespaceDatasetDataPoint.class); - Assertions.assertEquals("wfudwpzntxhdzhl", model.name()); - Assertions.assertEquals("qj", model.dataSource()); - Assertions.assertEquals("ck", model.dataPointConfiguration()); - Assertions.assertEquals("lhrxsbkyvpyc", model.typeRef()); + Assertions.assertEquals("o", model.name()); + Assertions.assertEquals("hb", model.dataSource()); + Assertions.assertEquals("knalaulppg", model.dataPointConfiguration()); + Assertions.assertEquals("tpnapnyiropuhpig", model.typeRef()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamespaceDatasetDataPoint model = new NamespaceDatasetDataPoint().withName("wfudwpzntxhdzhl") - .withDataSource("qj") - .withDataPointConfiguration("ck") - .withTypeRef("lhrxsbkyvpyc"); + NamespaceDatasetDataPoint model = new NamespaceDatasetDataPoint().withName("o") + .withDataSource("hb") + .withDataPointConfiguration("knalaulppg") + .withTypeRef("tpnapnyiropuhpig"); model = BinaryData.fromObject(model).toObject(NamespaceDatasetDataPoint.class); - Assertions.assertEquals("wfudwpzntxhdzhl", model.name()); - Assertions.assertEquals("qj", model.dataSource()); - Assertions.assertEquals("ck", model.dataPointConfiguration()); - Assertions.assertEquals("lhrxsbkyvpyc", model.typeRef()); + Assertions.assertEquals("o", model.name()); + Assertions.assertEquals("hb", model.dataSource()); + Assertions.assertEquals("knalaulppg", model.dataPointConfiguration()); + Assertions.assertEquals("tpnapnyiropuhpig", model.typeRef()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDatasetTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDatasetTests.java index fc036017c189..be3845e80eb7 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDatasetTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDatasetTests.java @@ -15,42 +15,50 @@ public final class NamespaceDatasetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceDataset model = BinaryData.fromString( - "{\"name\":\"wpn\",\"dataSource\":\"t\",\"typeRef\":\"nermcl\",\"datasetConfiguration\":\"lphox\",\"destinations\":[{\"target\":\"DatasetDestination\"},{\"target\":\"DatasetDestination\"}],\"dataPoints\":[{\"name\":\"abgy\",\"dataSource\":\"psbjta\",\"dataPointConfiguration\":\"ugxywpmueef\",\"typeRef\":\"wfqkquj\"},{\"name\":\"dsuyonobgla\",\"dataSource\":\"cq\",\"dataPointConfiguration\":\"ccm\",\"typeRef\":\"udxytlmoyrx\"}]}") + "{\"name\":\"wroyqbexrmcq\",\"dataSource\":\"ycnojvknmefqsg\",\"typeRef\":\"ah\",\"datasetConfiguration\":\"jyzhpvgq\",\"destinations\":[{\"target\":\"DatasetDestination\"}],\"dataPoints\":[{\"name\":\"xdjzlmwlxk\",\"dataSource\":\"ug\",\"dataPointConfiguration\":\"zovawjvz\",\"typeRef\":\"luthn\"},{\"name\":\"prnxipeil\",\"dataSource\":\"jzuaejxdultskzbb\",\"dataPointConfiguration\":\"zumveekgpwo\",\"typeRef\":\"hkfpbs\"},{\"name\":\"yofd\",\"dataSource\":\"luu\",\"dataPointConfiguration\":\"ttouwaboekqvkel\",\"typeRef\":\"mvb\"},{\"name\":\"wyjsflhhcaalnjix\",\"dataSource\":\"sxyawjoyaqcs\",\"dataPointConfiguration\":\"jpkiidzyexznelix\",\"typeRef\":\"rzt\"}]}") .toObject(NamespaceDataset.class); - Assertions.assertEquals("wpn", model.name()); - Assertions.assertEquals("t", model.dataSource()); - Assertions.assertEquals("nermcl", model.typeRef()); - Assertions.assertEquals("lphox", model.datasetConfiguration()); - Assertions.assertEquals("abgy", model.dataPoints().get(0).name()); - Assertions.assertEquals("psbjta", model.dataPoints().get(0).dataSource()); - Assertions.assertEquals("ugxywpmueef", model.dataPoints().get(0).dataPointConfiguration()); - Assertions.assertEquals("wfqkquj", model.dataPoints().get(0).typeRef()); + Assertions.assertEquals("wroyqbexrmcq", model.name()); + Assertions.assertEquals("ycnojvknmefqsg", model.dataSource()); + Assertions.assertEquals("ah", model.typeRef()); + Assertions.assertEquals("jyzhpvgq", model.datasetConfiguration()); + Assertions.assertEquals("xdjzlmwlxk", model.dataPoints().get(0).name()); + Assertions.assertEquals("ug", model.dataPoints().get(0).dataSource()); + Assertions.assertEquals("zovawjvz", model.dataPoints().get(0).dataPointConfiguration()); + Assertions.assertEquals("luthn", model.dataPoints().get(0).typeRef()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamespaceDataset model = new NamespaceDataset().withName("wpn") - .withDataSource("t") - .withTypeRef("nermcl") - .withDatasetConfiguration("lphox") - .withDestinations(Arrays.asList(new DatasetDestination(), new DatasetDestination())) + NamespaceDataset model = new NamespaceDataset().withName("wroyqbexrmcq") + .withDataSource("ycnojvknmefqsg") + .withTypeRef("ah") + .withDatasetConfiguration("jyzhpvgq") + .withDestinations(Arrays.asList(new DatasetDestination())) .withDataPoints(Arrays.asList( - new NamespaceDatasetDataPoint().withName("abgy") - .withDataSource("psbjta") - .withDataPointConfiguration("ugxywpmueef") - .withTypeRef("wfqkquj"), - new NamespaceDatasetDataPoint().withName("dsuyonobgla") - .withDataSource("cq") - .withDataPointConfiguration("ccm") - .withTypeRef("udxytlmoyrx"))); + new NamespaceDatasetDataPoint().withName("xdjzlmwlxk") + .withDataSource("ug") + .withDataPointConfiguration("zovawjvz") + .withTypeRef("luthn"), + new NamespaceDatasetDataPoint().withName("prnxipeil") + .withDataSource("jzuaejxdultskzbb") + .withDataPointConfiguration("zumveekgpwo") + .withTypeRef("hkfpbs"), + new NamespaceDatasetDataPoint().withName("yofd") + .withDataSource("luu") + .withDataPointConfiguration("ttouwaboekqvkel") + .withTypeRef("mvb"), + new NamespaceDatasetDataPoint().withName("wyjsflhhcaalnjix") + .withDataSource("sxyawjoyaqcs") + .withDataPointConfiguration("jpkiidzyexznelix") + .withTypeRef("rzt"))); model = BinaryData.fromObject(model).toObject(NamespaceDataset.class); - Assertions.assertEquals("wpn", model.name()); - Assertions.assertEquals("t", model.dataSource()); - Assertions.assertEquals("nermcl", model.typeRef()); - Assertions.assertEquals("lphox", model.datasetConfiguration()); - Assertions.assertEquals("abgy", model.dataPoints().get(0).name()); - Assertions.assertEquals("psbjta", model.dataPoints().get(0).dataSource()); - Assertions.assertEquals("ugxywpmueef", model.dataPoints().get(0).dataPointConfiguration()); - Assertions.assertEquals("wfqkquj", model.dataPoints().get(0).typeRef()); + Assertions.assertEquals("wroyqbexrmcq", model.name()); + Assertions.assertEquals("ycnojvknmefqsg", model.dataSource()); + Assertions.assertEquals("ah", model.typeRef()); + Assertions.assertEquals("jyzhpvgq", model.datasetConfiguration()); + Assertions.assertEquals("xdjzlmwlxk", model.dataPoints().get(0).name()); + Assertions.assertEquals("ug", model.dataPoints().get(0).dataSource()); + Assertions.assertEquals("zovawjvz", model.dataPoints().get(0).dataPointConfiguration()); + Assertions.assertEquals("luthn", model.dataPoints().get(0).typeRef()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDeviceListResultTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDeviceListResultTests.java index 02098f0b9be6..5e1a903edd25 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDeviceListResultTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDeviceListResultTests.java @@ -12,26 +12,28 @@ public final class NamespaceDeviceListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceDeviceListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"uuid\":\"v\",\"enabled\":true,\"externalDeviceId\":\"qqtch\",\"discoveredDeviceRef\":\"lmfmtdaay\",\"manufacturer\":\"v\",\"model\":\"gpiohgwxrtfudxe\",\"operatingSystem\":\"gyqagvrvmnpkuk\",\"operatingSystemVersion\":\"i\",\"endpoints\":{\"inbound\":{\"xw\":{\"endpointType\":\"xgwim\",\"address\":\"njhf\"},\"wneaiv\":{\"endpointType\":\"szkkfoqre\",\"address\":\"fkzikfj\"},\"abfatkl\":{\"endpointType\":\"wczelpci\",\"address\":\"elsfeaen\"}},\"outbound\":{\"assigned\":{\"zjosp\":{\"address\":\"bjhwuaan\"},\"rvxaglrvimjwosy\":{\"address\":\"youlp\"},\"kfcktqum\":{\"address\":\"xitc\"},\"gqggebdunygae\":{\"address\":\"ekkezzikhlyfjh\"}},\"unassigned\":{\"dsuvarmywdmjsjqb\":{\"address\":\"bqfatpxllrxcyjmo\"}}}},\"attributes\":{},\"status\":{\"config\":{\"version\":1441168522946793011,\"lastTransitionTime\":\"2021-08-21T13:48:09Z\",\"error\":{}},\"endpoints\":{\"inbound\":{\"hp\":{},\"xkgymareqnajxqu\":{},\"jhkycub\":{}}}},\"version\":5313229010418378323,\"lastTransitionTime\":\"2021-04-18T16:03:28Z\",\"provisioningState\":\"Deleting\"},\"etag\":\"qmzqalkrmnjijpx\",\"extendedLocation\":{\"type\":\"q\",\"name\":\"udfnbyxba\"},\"location\":\"bjyvay\",\"tags\":{\"zrtuzq\":\"m\",\"fdnw\":\"gsexne\",\"euzsoi\":\"wmewzsyy\"},\"id\":\"judpfrxt\",\"name\":\"thzvaytdwkqbrqu\",\"type\":\"paxh\"}],\"nextLink\":\"iilivpdtiirqtd\"}") + "{\"value\":[{\"properties\":{\"uuid\":\"jinfw\",\"enabled\":false,\"externalDeviceId\":\"tkacj\",\"discoveredDeviceRef\":\"f\",\"manufacturer\":\"lfoakg\",\"model\":\"fpagaowpulp\",\"operatingSystem\":\"lyls\",\"operatingSystemVersion\":\"k\",\"endpoints\":{\"inbound\":{\"kfzbeyvpnqicvi\":{\"endpointType\":\"jervtia\",\"address\":\"xsdszuempsb\"},\"rbuukzclewyhmlwp\":{\"endpointType\":\"v\",\"address\":\"jjxd\"}},\"outbound\":{\"assigned\":{\"cckwyfzqwhxxbu\":{\"address\":\"zpof\"},\"zfeqztppri\":{\"address\":\"qa\"},\"bqwcsdbnwdcf\":{\"address\":\"lxorjaltolmncws\"},\"jcanvxbvtvudut\":{\"address\":\"ucqdpfuvglsb\"}},\"unassigned\":{\"dflvkg\":{\"address\":\"rmrlxqtvcof\"},\"gdknnqv\":{\"address\":\"u\"},\"sgsahmkycgr\":{\"address\":\"aznqntoru\"},\"s\":{\"address\":\"uwjuetaeburuvdmo\"}}}},\"attributes\":{},\"status\":{\"config\":{\"version\":194940168582147354,\"lastTransitionTime\":\"2021-06-22T12:18:54Z\",\"error\":{}},\"endpoints\":{\"inbound\":{\"frvtpuqu\":{},\"mqlgk\":{}}}},\"version\":2595329865796026079,\"lastTransitionTime\":\"2021-06-07T02:06:17Z\",\"provisioningState\":\"Succeeded\",\"policy\":{\"resourceId\":\"bjcntujitc\"}},\"etag\":\"df\",\"extendedLocation\":{\"type\":\"waezkojvd\",\"name\":\"pzfoqoui\"},\"location\":\"bxarzgszufoxci\",\"tags\":{\"xkhnzbonlwnto\":\"idoamciodhkha\"},\"id\":\"gokdwbwhks\",\"name\":\"zcmrvexztvb\",\"type\":\"qgsfraoyzkoow\"},{\"properties\":{\"uuid\":\"nguxawqaldsy\",\"enabled\":true,\"externalDeviceId\":\"merqfobwyznkb\",\"discoveredDeviceRef\":\"utwpfhp\",\"manufacturer\":\"m\",\"model\":\"skdsnfdsdoakg\",\"operatingSystem\":\"lmkk\",\"operatingSystemVersion\":\"vdlhewpusdsttwv\",\"endpoints\":{\"inbound\":{\"gm\":{\"endpointType\":\"bejdcn\",\"address\":\"qqmoaku\"},\"enuuzkopbm\":{\"endpointType\":\"zr\",\"address\":\"rdgrtw\"},\"efozbhdms\":{\"endpointType\":\"nrfdw\",\"address\":\"yuhhziu\"}},\"outbound\":{\"assigned\":{\"rmaequ\":{\"address\":\"zqhof\"},\"icslfaoq\":{\"address\":\"ah\"},\"kaivwit\":{\"address\":\"piyylhalnswhccsp\"},\"bwemhairs\":{\"address\":\"scywuggwoluhc\"}},\"unassigned\":{\"wmsweypqwd\":{\"address\":\"z\"}}}},\"attributes\":{},\"status\":{\"config\":{\"version\":7620570472087923252,\"lastTransitionTime\":\"2021-07-21T16:23:57Z\",\"error\":{}},\"endpoints\":{\"inbound\":{\"mkttlstvlzywem\":{},\"zrncsdt\":{}}}},\"version\":407518124888159377,\"lastTransitionTime\":\"2021-08-31T08:14:30Z\",\"provisioningState\":\"Deleting\",\"policy\":{\"resourceId\":\"ytguslf\"}},\"etag\":\"dcygqukyhejhz\",\"extendedLocation\":{\"type\":\"xgfpelolppv\",\"name\":\"srp\"},\"location\":\"ujzra\",\"tags\":{\"wrft\":\"w\"},\"id\":\"wib\",\"name\":\"rcdlbhshfwpr\",\"type\":\"cstwity\"}],\"nextLink\":\"evxccedcp\"}") .toObject(NamespaceDeviceListResult.class); - Assertions.assertEquals("bjyvay", model.value().get(0).location()); - Assertions.assertEquals("m", model.value().get(0).tags().get("zrtuzq")); - Assertions.assertTrue(model.value().get(0).properties().enabled()); - Assertions.assertEquals("qqtch", model.value().get(0).properties().externalDeviceId()); - Assertions.assertEquals("lmfmtdaay", model.value().get(0).properties().discoveredDeviceRef()); - Assertions.assertEquals("v", model.value().get(0).properties().manufacturer()); - Assertions.assertEquals("gpiohgwxrtfudxe", model.value().get(0).properties().model()); - Assertions.assertEquals("gyqagvrvmnpkuk", model.value().get(0).properties().operatingSystem()); - Assertions.assertEquals("i", model.value().get(0).properties().operatingSystemVersion()); - Assertions.assertEquals("xgwim", - model.value().get(0).properties().endpoints().inbound().get("xw").endpointType()); - Assertions.assertEquals("njhf", model.value().get(0).properties().endpoints().inbound().get("xw").address()); - Assertions.assertEquals("bjhwuaan", - model.value().get(0).properties().endpoints().outbound().assigned().get("zjosp").address()); - Assertions.assertEquals("bqfatpxllrxcyjmo", - model.value().get(0).properties().endpoints().outbound().unassigned().get("dsuvarmywdmjsjqb").address()); - Assertions.assertEquals("q", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("udfnbyxba", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("iilivpdtiirqtd", model.nextLink()); + Assertions.assertEquals("bxarzgszufoxci", model.value().get(0).location()); + Assertions.assertEquals("idoamciodhkha", model.value().get(0).tags().get("xkhnzbonlwnto")); + Assertions.assertFalse(model.value().get(0).properties().enabled()); + Assertions.assertEquals("tkacj", model.value().get(0).properties().externalDeviceId()); + Assertions.assertEquals("f", model.value().get(0).properties().discoveredDeviceRef()); + Assertions.assertEquals("lfoakg", model.value().get(0).properties().manufacturer()); + Assertions.assertEquals("fpagaowpulp", model.value().get(0).properties().model()); + Assertions.assertEquals("lyls", model.value().get(0).properties().operatingSystem()); + Assertions.assertEquals("k", model.value().get(0).properties().operatingSystemVersion()); + Assertions.assertEquals("jervtia", + model.value().get(0).properties().endpoints().inbound().get("kfzbeyvpnqicvi").endpointType()); + Assertions.assertEquals("xsdszuempsb", + model.value().get(0).properties().endpoints().inbound().get("kfzbeyvpnqicvi").address()); + Assertions.assertEquals("zpof", + model.value().get(0).properties().endpoints().outbound().assigned().get("cckwyfzqwhxxbu").address()); + Assertions.assertEquals("rmrlxqtvcof", + model.value().get(0).properties().endpoints().outbound().unassigned().get("dflvkg").address()); + Assertions.assertEquals("bjcntujitc", model.value().get(0).properties().policy().resourceId()); + Assertions.assertEquals("waezkojvd", model.value().get(0).extendedLocation().type()); + Assertions.assertEquals("pzfoqoui", model.value().get(0).extendedLocation().name()); + Assertions.assertEquals("evxccedcp", model.nextLink()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDatasetDataPointTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDatasetDataPointTests.java index cffae47bab5e..322d254c60e0 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDatasetDataPointTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDatasetDataPointTests.java @@ -13,27 +13,28 @@ public final class NamespaceDiscoveredDatasetDataPointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceDiscoveredDatasetDataPoint model = BinaryData.fromString( - "{\"name\":\"ed\",\"dataSource\":\"twwaezkojvdcpzf\",\"dataPointConfiguration\":\"ouicybxarzgszu\",\"lastUpdatedOn\":\"2021-07-26T12:22:12Z\",\"typeRef\":\"iqopidoamciod\"}") + "{\"name\":\"ueluqhhahhxvrhmz\",\"dataSource\":\"wpjgwws\",\"dataPointConfiguration\":\"ghftqsxhqxujxuk\",\"lastUpdatedOn\":\"2021-03-24T06:22:09Z\",\"typeRef\":\"igrjguufzdm\"}") .toObject(NamespaceDiscoveredDatasetDataPoint.class); - Assertions.assertEquals("ed", model.name()); - Assertions.assertEquals("twwaezkojvdcpzf", model.dataSource()); - Assertions.assertEquals("ouicybxarzgszu", model.dataPointConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T12:22:12Z"), model.lastUpdatedOn()); - Assertions.assertEquals("iqopidoamciod", model.typeRef()); + Assertions.assertEquals("ueluqhhahhxvrhmz", model.name()); + Assertions.assertEquals("wpjgwws", model.dataSource()); + Assertions.assertEquals("ghftqsxhqxujxuk", model.dataPointConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-24T06:22:09Z"), model.lastUpdatedOn()); + Assertions.assertEquals("igrjguufzdm", model.typeRef()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamespaceDiscoveredDatasetDataPoint model = new NamespaceDiscoveredDatasetDataPoint().withName("ed") - .withDataSource("twwaezkojvdcpzf") - .withDataPointConfiguration("ouicybxarzgszu") - .withLastUpdatedOn(OffsetDateTime.parse("2021-07-26T12:22:12Z")) - .withTypeRef("iqopidoamciod"); + NamespaceDiscoveredDatasetDataPoint model + = new NamespaceDiscoveredDatasetDataPoint().withName("ueluqhhahhxvrhmz") + .withDataSource("wpjgwws") + .withDataPointConfiguration("ghftqsxhqxujxuk") + .withLastUpdatedOn(OffsetDateTime.parse("2021-03-24T06:22:09Z")) + .withTypeRef("igrjguufzdm"); model = BinaryData.fromObject(model).toObject(NamespaceDiscoveredDatasetDataPoint.class); - Assertions.assertEquals("ed", model.name()); - Assertions.assertEquals("twwaezkojvdcpzf", model.dataSource()); - Assertions.assertEquals("ouicybxarzgszu", model.dataPointConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T12:22:12Z"), model.lastUpdatedOn()); - Assertions.assertEquals("iqopidoamciod", model.typeRef()); + Assertions.assertEquals("ueluqhhahhxvrhmz", model.name()); + Assertions.assertEquals("wpjgwws", model.dataSource()); + Assertions.assertEquals("ghftqsxhqxujxuk", model.dataPointConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-24T06:22:09Z"), model.lastUpdatedOn()); + Assertions.assertEquals("igrjguufzdm", model.typeRef()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDatasetTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDatasetTests.java index 350c96da9ea7..54143142f633 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDatasetTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDatasetTests.java @@ -16,56 +16,51 @@ public final class NamespaceDiscoveredDatasetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceDiscoveredDataset model = BinaryData.fromString( - "{\"name\":\"t\",\"dataSource\":\"dut\",\"typeRef\":\"ormrlxqtvcofudfl\",\"datasetConfiguration\":\"gj\",\"destinations\":[{\"target\":\"DatasetDestination\"},{\"target\":\"DatasetDestination\"}],\"dataPoints\":[{\"name\":\"nnqvsa\",\"dataSource\":\"nqntorudsgsahm\",\"dataPointConfiguration\":\"c\",\"lastUpdatedOn\":\"2021-03-24T00:12:01Z\",\"typeRef\":\"wjue\"},{\"name\":\"aeburuvdmo\",\"dataSource\":\"s\",\"dataPointConfiguration\":\"l\",\"lastUpdatedOn\":\"2021-04-25T07:43:26Z\",\"typeRef\":\"mqoefkifrvtpuqu\"},{\"name\":\"mqlgk\",\"dataSource\":\"btndo\",\"dataPointConfiguration\":\"n\",\"lastUpdatedOn\":\"2021-06-02T01:39:29Z\",\"typeRef\":\"ntuji\"}],\"lastUpdatedOn\":\"2021-04-17T23:49:38Z\"}") + "{\"name\":\"rcgp\",\"dataSource\":\"pzimejzanlfzxi\",\"typeRef\":\"rmbzo\",\"datasetConfiguration\":\"kixrj\",\"destinations\":[{\"target\":\"DatasetDestination\"},{\"target\":\"DatasetDestination\"}],\"dataPoints\":[{\"name\":\"zpfrla\",\"dataSource\":\"szrnwo\",\"dataPointConfiguration\":\"ndfpwpj\",\"lastUpdatedOn\":\"2021-03-31T10:48:17Z\",\"typeRef\":\"tlhflsjcdhszf\"},{\"name\":\"vfbgofeljagrqmqh\",\"dataSource\":\"dvriiiojnal\",\"dataPointConfiguration\":\"fk\",\"lastUpdatedOn\":\"2021-04-04T08:27:15Z\",\"typeRef\":\"ex\"}],\"lastUpdatedOn\":\"2021-10-16T07:40:20Z\"}") .toObject(NamespaceDiscoveredDataset.class); - Assertions.assertEquals("t", model.name()); - Assertions.assertEquals("dut", model.dataSource()); - Assertions.assertEquals("ormrlxqtvcofudfl", model.typeRef()); - Assertions.assertEquals("gj", model.datasetConfiguration()); - Assertions.assertEquals("nnqvsa", model.dataPoints().get(0).name()); - Assertions.assertEquals("nqntorudsgsahm", model.dataPoints().get(0).dataSource()); - Assertions.assertEquals("c", model.dataPoints().get(0).dataPointConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-24T00:12:01Z"), + Assertions.assertEquals("rcgp", model.name()); + Assertions.assertEquals("pzimejzanlfzxi", model.dataSource()); + Assertions.assertEquals("rmbzo", model.typeRef()); + Assertions.assertEquals("kixrj", model.datasetConfiguration()); + Assertions.assertEquals("zpfrla", model.dataPoints().get(0).name()); + Assertions.assertEquals("szrnwo", model.dataPoints().get(0).dataSource()); + Assertions.assertEquals("ndfpwpj", model.dataPoints().get(0).dataPointConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-31T10:48:17Z"), model.dataPoints().get(0).lastUpdatedOn()); - Assertions.assertEquals("wjue", model.dataPoints().get(0).typeRef()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-17T23:49:38Z"), model.lastUpdatedOn()); + Assertions.assertEquals("tlhflsjcdhszf", model.dataPoints().get(0).typeRef()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-16T07:40:20Z"), model.lastUpdatedOn()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamespaceDiscoveredDataset model = new NamespaceDiscoveredDataset().withName("t") - .withDataSource("dut") - .withTypeRef("ormrlxqtvcofudfl") - .withDatasetConfiguration("gj") + NamespaceDiscoveredDataset model = new NamespaceDiscoveredDataset().withName("rcgp") + .withDataSource("pzimejzanlfzxi") + .withTypeRef("rmbzo") + .withDatasetConfiguration("kixrj") .withDestinations(Arrays.asList(new DatasetDestination(), new DatasetDestination())) .withDataPoints(Arrays.asList( - new NamespaceDiscoveredDatasetDataPoint().withName("nnqvsa") - .withDataSource("nqntorudsgsahm") - .withDataPointConfiguration("c") - .withLastUpdatedOn(OffsetDateTime.parse("2021-03-24T00:12:01Z")) - .withTypeRef("wjue"), - new NamespaceDiscoveredDatasetDataPoint().withName("aeburuvdmo") - .withDataSource("s") - .withDataPointConfiguration("l") - .withLastUpdatedOn(OffsetDateTime.parse("2021-04-25T07:43:26Z")) - .withTypeRef("mqoefkifrvtpuqu"), - new NamespaceDiscoveredDatasetDataPoint().withName("mqlgk") - .withDataSource("btndo") - .withDataPointConfiguration("n") - .withLastUpdatedOn(OffsetDateTime.parse("2021-06-02T01:39:29Z")) - .withTypeRef("ntuji"))) - .withLastUpdatedOn(OffsetDateTime.parse("2021-04-17T23:49:38Z")); + new NamespaceDiscoveredDatasetDataPoint().withName("zpfrla") + .withDataSource("szrnwo") + .withDataPointConfiguration("ndfpwpj") + .withLastUpdatedOn(OffsetDateTime.parse("2021-03-31T10:48:17Z")) + .withTypeRef("tlhflsjcdhszf"), + new NamespaceDiscoveredDatasetDataPoint().withName("vfbgofeljagrqmqh") + .withDataSource("dvriiiojnal") + .withDataPointConfiguration("fk") + .withLastUpdatedOn(OffsetDateTime.parse("2021-04-04T08:27:15Z")) + .withTypeRef("ex"))) + .withLastUpdatedOn(OffsetDateTime.parse("2021-10-16T07:40:20Z")); model = BinaryData.fromObject(model).toObject(NamespaceDiscoveredDataset.class); - Assertions.assertEquals("t", model.name()); - Assertions.assertEquals("dut", model.dataSource()); - Assertions.assertEquals("ormrlxqtvcofudfl", model.typeRef()); - Assertions.assertEquals("gj", model.datasetConfiguration()); - Assertions.assertEquals("nnqvsa", model.dataPoints().get(0).name()); - Assertions.assertEquals("nqntorudsgsahm", model.dataPoints().get(0).dataSource()); - Assertions.assertEquals("c", model.dataPoints().get(0).dataPointConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-24T00:12:01Z"), + Assertions.assertEquals("rcgp", model.name()); + Assertions.assertEquals("pzimejzanlfzxi", model.dataSource()); + Assertions.assertEquals("rmbzo", model.typeRef()); + Assertions.assertEquals("kixrj", model.datasetConfiguration()); + Assertions.assertEquals("zpfrla", model.dataPoints().get(0).name()); + Assertions.assertEquals("szrnwo", model.dataPoints().get(0).dataSource()); + Assertions.assertEquals("ndfpwpj", model.dataPoints().get(0).dataPointConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-31T10:48:17Z"), model.dataPoints().get(0).lastUpdatedOn()); - Assertions.assertEquals("wjue", model.dataPoints().get(0).typeRef()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-17T23:49:38Z"), model.lastUpdatedOn()); + Assertions.assertEquals("tlhflsjcdhszf", model.dataPoints().get(0).typeRef()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-16T07:40:20Z"), model.lastUpdatedOn()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDeviceInnerTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDeviceInnerTests.java index 506230657899..d41e2468380c 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDeviceInnerTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDeviceInnerTests.java @@ -23,107 +23,93 @@ public final class NamespaceDiscoveredDeviceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceDiscoveredDeviceInner model = BinaryData.fromString( - "{\"properties\":{\"externalDeviceId\":\"rqwky\",\"endpoints\":{\"inbound\":{\"wfqatmtd\":{\"endpointType\":\"opgxedkowepb\",\"address\":\"pc\",\"version\":\"kbwcc\",\"supportedAuthenticationMethods\":[\"Anonymous\",\"UsernamePassword\",\"Anonymous\"],\"additionalConfiguration\":\"xlpqekftnkhtjsy\",\"lastUpdatedOn\":\"2021-09-20T22:34:13Z\"},\"v\":{\"endpointType\":\"tmdvypgikdgs\",\"address\":\"ywkbirryuzhlhkjo\",\"version\":\"vqqaatjinrvgo\",\"supportedAuthenticationMethods\":[\"Certificate\",\"UsernamePassword\",\"Certificate\"],\"additionalConfiguration\":\"fggjioolvr\",\"lastUpdatedOn\":\"2021-01-31T00:57:49Z\"},\"hlmctlpdngitvgb\":{\"endpointType\":\"kkgll\",\"address\":\"wjygvjayvblmhvk\",\"version\":\"hbxvvyhgsopbyrqu\",\"supportedAuthenticationMethods\":[\"UsernamePassword\"],\"additionalConfiguration\":\"vwz\",\"lastUpdatedOn\":\"2021-04-02T15:27:05Z\"},\"ghtpw\":{\"endpointType\":\"hrixkwmy\",\"address\":\"jejveg\",\"version\":\"bpnaixexccbdre\",\"supportedAuthenticationMethods\":[\"Certificate\",\"UsernamePassword\",\"UsernamePassword\"],\"additionalConfiguration\":\"rrvqa\",\"lastUpdatedOn\":\"2021-04-26T15:49:54Z\"}},\"outbound\":{\"assigned\":{\"fvoow\":{\"endpointType\":\"yjsvfyc\",\"address\":\"z\"},\"ronzmyhgfip\":{\"endpointType\":\"vmtgjqppy\",\"address\":\"s\"}}}},\"manufacturer\":\"xkmcwaekrrjre\",\"model\":\"xt\",\"operatingSystem\":\"umh\",\"operatingSystemVersion\":\"lik\",\"attributes\":{},\"discoveryId\":\"slol\",\"version\":3996169992007046944,\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"type\":\"zlmvfelfktgp\",\"name\":\"crpw\"},\"location\":\"eznoig\",\"tags\":{\"zejjoqk\":\"jwmwkpnbs\",\"aa\":\"gfhsxttaugzxn\",\"jlwuenvrkp\":\"pxdtnkdmkq\",\"ibreb\":\"ou\"},\"id\":\"aays\",\"name\":\"kixqtnqtt\",\"type\":\"zlwfffiakp\"}") + "{\"properties\":{\"externalDeviceId\":\"tmr\",\"endpoints\":{\"inbound\":{\"rsre\":{\"endpointType\":\"ctymoxoftp\",\"address\":\"piwyczuhxacpqjl\",\"version\":\"hyus\",\"supportedAuthenticationMethods\":[\"Certificate\",\"UsernamePassword\"],\"additionalConfiguration\":\"vlmfwdgzxulucv\",\"lastUpdatedOn\":\"2021-09-17T07:51:38Z\"},\"pnfqntcyp\":{\"endpointType\":\"zvxurisjnhny\",\"address\":\"xifqjzgxm\",\"version\":\"ublwpcesutrg\",\"supportedAuthenticationMethods\":[\"Certificate\",\"UsernamePassword\"],\"additionalConfiguration\":\"tpwoqhihejq\",\"lastUpdatedOn\":\"2021-11-12T23:28:54Z\"}},\"outbound\":{\"assigned\":{\"vlhv\":{\"endpointType\":\"foimwkslircizjxv\",\"address\":\"dfcea\"}}}},\"manufacturer\":\"dyftumrtwna\",\"model\":\"slbi\",\"operatingSystem\":\"ojgcyzt\",\"operatingSystemVersion\":\"mznbaeqphch\",\"attributes\":{},\"discoveryId\":\"nrpxehuw\",\"version\":2363907746060609588,\"provisioningState\":\"Canceled\"},\"extendedLocation\":{\"type\":\"aifmvikl\",\"name\":\"ydv\"},\"location\":\"bejdznxcv\",\"tags\":{\"v\":\"hnjivo\"},\"id\":\"novqfzge\",\"name\":\"jdftuljltd\",\"type\":\"ceamtm\"}") .toObject(NamespaceDiscoveredDeviceInner.class); - Assertions.assertEquals("eznoig", model.location()); - Assertions.assertEquals("jwmwkpnbs", model.tags().get("zejjoqk")); - Assertions.assertEquals("rqwky", model.properties().externalDeviceId()); - Assertions.assertEquals("opgxedkowepb", - model.properties().endpoints().inbound().get("wfqatmtd").endpointType()); - Assertions.assertEquals("pc", model.properties().endpoints().inbound().get("wfqatmtd").address()); - Assertions.assertEquals("kbwcc", model.properties().endpoints().inbound().get("wfqatmtd").version()); - Assertions.assertEquals(AuthenticationMethod.ANONYMOUS, - model.properties().endpoints().inbound().get("wfqatmtd").supportedAuthenticationMethods().get(0)); - Assertions.assertEquals("xlpqekftnkhtjsy", - model.properties().endpoints().inbound().get("wfqatmtd").additionalConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-20T22:34:13Z"), - model.properties().endpoints().inbound().get("wfqatmtd").lastUpdatedOn()); - Assertions.assertEquals("yjsvfyc", - model.properties().endpoints().outbound().assigned().get("fvoow").endpointType()); - Assertions.assertEquals("z", model.properties().endpoints().outbound().assigned().get("fvoow").address()); - Assertions.assertEquals("xkmcwaekrrjre", model.properties().manufacturer()); - Assertions.assertEquals("xt", model.properties().model()); - Assertions.assertEquals("umh", model.properties().operatingSystem()); - Assertions.assertEquals("lik", model.properties().operatingSystemVersion()); - Assertions.assertEquals("slol", model.properties().discoveryId()); - Assertions.assertEquals(3996169992007046944L, model.properties().version()); - Assertions.assertEquals("zlmvfelfktgp", model.extendedLocation().type()); - Assertions.assertEquals("crpw", model.extendedLocation().name()); + Assertions.assertEquals("bejdznxcv", model.location()); + Assertions.assertEquals("hnjivo", model.tags().get("v")); + Assertions.assertEquals("tmr", model.properties().externalDeviceId()); + Assertions.assertEquals("ctymoxoftp", model.properties().endpoints().inbound().get("rsre").endpointType()); + Assertions.assertEquals("piwyczuhxacpqjl", model.properties().endpoints().inbound().get("rsre").address()); + Assertions.assertEquals("hyus", model.properties().endpoints().inbound().get("rsre").version()); + Assertions.assertEquals(AuthenticationMethod.CERTIFICATE, + model.properties().endpoints().inbound().get("rsre").supportedAuthenticationMethods().get(0)); + Assertions.assertEquals("vlmfwdgzxulucv", + model.properties().endpoints().inbound().get("rsre").additionalConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-17T07:51:38Z"), + model.properties().endpoints().inbound().get("rsre").lastUpdatedOn()); + Assertions.assertEquals("foimwkslircizjxv", + model.properties().endpoints().outbound().assigned().get("vlhv").endpointType()); + Assertions.assertEquals("dfcea", model.properties().endpoints().outbound().assigned().get("vlhv").address()); + Assertions.assertEquals("dyftumrtwna", model.properties().manufacturer()); + Assertions.assertEquals("slbi", model.properties().model()); + Assertions.assertEquals("ojgcyzt", model.properties().operatingSystem()); + Assertions.assertEquals("mznbaeqphch", model.properties().operatingSystemVersion()); + Assertions.assertEquals("nrpxehuw", model.properties().discoveryId()); + Assertions.assertEquals(2363907746060609588L, model.properties().version()); + Assertions.assertEquals("aifmvikl", model.extendedLocation().type()); + Assertions.assertEquals("ydv", model.extendedLocation().name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamespaceDiscoveredDeviceInner model = new NamespaceDiscoveredDeviceInner().withLocation("eznoig") - .withTags(mapOf("zejjoqk", "jwmwkpnbs", "aa", "gfhsxttaugzxn", "jlwuenvrkp", "pxdtnkdmkq", "ibreb", "ou")) - .withProperties(new NamespaceDiscoveredDeviceProperties().withExternalDeviceId("rqwky") - .withEndpoints(new DiscoveredMessagingEndpoints() - .withInbound(mapOf("wfqatmtd", - new DiscoveredInboundEndpoints().withEndpointType("opgxedkowepb") - .withAddress("pc") - .withVersion("kbwcc") - .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.ANONYMOUS, - AuthenticationMethod.USERNAME_PASSWORD, AuthenticationMethod.ANONYMOUS)) - .withAdditionalConfiguration("xlpqekftnkhtjsy") - .withLastUpdatedOn(OffsetDateTime.parse("2021-09-20T22:34:13Z")), - "v", - new DiscoveredInboundEndpoints().withEndpointType("tmdvypgikdgs") - .withAddress("ywkbirryuzhlhkjo") - .withVersion("vqqaatjinrvgo") - .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.CERTIFICATE, - AuthenticationMethod.USERNAME_PASSWORD, AuthenticationMethod.CERTIFICATE)) - .withAdditionalConfiguration("fggjioolvr") - .withLastUpdatedOn(OffsetDateTime.parse("2021-01-31T00:57:49Z")), - "hlmctlpdngitvgb", - new DiscoveredInboundEndpoints().withEndpointType("kkgll") - .withAddress("wjygvjayvblmhvk") - .withVersion("hbxvvyhgsopbyrqu") - .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.USERNAME_PASSWORD)) - .withAdditionalConfiguration("vwz") - .withLastUpdatedOn(OffsetDateTime.parse("2021-04-02T15:27:05Z")), - "ghtpw", - new DiscoveredInboundEndpoints().withEndpointType("hrixkwmy") - .withAddress("jejveg") - .withVersion("bpnaixexccbdre") - .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.CERTIFICATE, - AuthenticationMethod.USERNAME_PASSWORD, AuthenticationMethod.USERNAME_PASSWORD)) - .withAdditionalConfiguration("rrvqa") - .withLastUpdatedOn(OffsetDateTime.parse("2021-04-26T15:49:54Z")))) - .withOutbound(new DiscoveredOutboundEndpoints().withAssigned(mapOf("fvoow", - new DeviceMessagingEndpoint().withEndpointType("yjsvfyc").withAddress("z"), "ronzmyhgfip", - new DeviceMessagingEndpoint().withEndpointType("vmtgjqppy").withAddress("s"))))) - .withManufacturer("xkmcwaekrrjre") - .withModel("xt") - .withOperatingSystem("umh") - .withOperatingSystemVersion("lik") - .withAttributes(mapOf()) - .withDiscoveryId("slol") - .withVersion(3996169992007046944L)) - .withExtendedLocation(new ExtendedLocation().withType("zlmvfelfktgp").withName("crpw")); + NamespaceDiscoveredDeviceInner model + = new NamespaceDiscoveredDeviceInner().withLocation("bejdznxcv") + .withTags(mapOf("v", "hnjivo")) + .withProperties( + new NamespaceDiscoveredDeviceProperties().withExternalDeviceId("tmr") + .withEndpoints( + new DiscoveredMessagingEndpoints() + .withInbound(mapOf("rsre", + new DiscoveredInboundEndpoints().withEndpointType("ctymoxoftp") + .withAddress("piwyczuhxacpqjl") + .withVersion("hyus") + .withSupportedAuthenticationMethods(Arrays.asList( + AuthenticationMethod.CERTIFICATE, AuthenticationMethod.USERNAME_PASSWORD)) + .withAdditionalConfiguration("vlmfwdgzxulucv") + .withLastUpdatedOn(OffsetDateTime.parse("2021-09-17T07:51:38Z")), + "pnfqntcyp", + new DiscoveredInboundEndpoints().withEndpointType("zvxurisjnhny") + .withAddress("xifqjzgxm") + .withVersion("ublwpcesutrg") + .withSupportedAuthenticationMethods(Arrays.asList( + AuthenticationMethod.CERTIFICATE, AuthenticationMethod.USERNAME_PASSWORD)) + .withAdditionalConfiguration("tpwoqhihejq") + .withLastUpdatedOn(OffsetDateTime.parse("2021-11-12T23:28:54Z")))) + .withOutbound(new DiscoveredOutboundEndpoints().withAssigned(mapOf("vlhv", + new DeviceMessagingEndpoint().withEndpointType("foimwkslircizjxv") + .withAddress("dfcea"))))) + .withManufacturer("dyftumrtwna") + .withModel("slbi") + .withOperatingSystem("ojgcyzt") + .withOperatingSystemVersion("mznbaeqphch") + .withAttributes(mapOf()) + .withDiscoveryId("nrpxehuw") + .withVersion(2363907746060609588L)) + .withExtendedLocation(new ExtendedLocation().withType("aifmvikl").withName("ydv")); model = BinaryData.fromObject(model).toObject(NamespaceDiscoveredDeviceInner.class); - Assertions.assertEquals("eznoig", model.location()); - Assertions.assertEquals("jwmwkpnbs", model.tags().get("zejjoqk")); - Assertions.assertEquals("rqwky", model.properties().externalDeviceId()); - Assertions.assertEquals("opgxedkowepb", - model.properties().endpoints().inbound().get("wfqatmtd").endpointType()); - Assertions.assertEquals("pc", model.properties().endpoints().inbound().get("wfqatmtd").address()); - Assertions.assertEquals("kbwcc", model.properties().endpoints().inbound().get("wfqatmtd").version()); - Assertions.assertEquals(AuthenticationMethod.ANONYMOUS, - model.properties().endpoints().inbound().get("wfqatmtd").supportedAuthenticationMethods().get(0)); - Assertions.assertEquals("xlpqekftnkhtjsy", - model.properties().endpoints().inbound().get("wfqatmtd").additionalConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-20T22:34:13Z"), - model.properties().endpoints().inbound().get("wfqatmtd").lastUpdatedOn()); - Assertions.assertEquals("yjsvfyc", - model.properties().endpoints().outbound().assigned().get("fvoow").endpointType()); - Assertions.assertEquals("z", model.properties().endpoints().outbound().assigned().get("fvoow").address()); - Assertions.assertEquals("xkmcwaekrrjre", model.properties().manufacturer()); - Assertions.assertEquals("xt", model.properties().model()); - Assertions.assertEquals("umh", model.properties().operatingSystem()); - Assertions.assertEquals("lik", model.properties().operatingSystemVersion()); - Assertions.assertEquals("slol", model.properties().discoveryId()); - Assertions.assertEquals(3996169992007046944L, model.properties().version()); - Assertions.assertEquals("zlmvfelfktgp", model.extendedLocation().type()); - Assertions.assertEquals("crpw", model.extendedLocation().name()); + Assertions.assertEquals("bejdznxcv", model.location()); + Assertions.assertEquals("hnjivo", model.tags().get("v")); + Assertions.assertEquals("tmr", model.properties().externalDeviceId()); + Assertions.assertEquals("ctymoxoftp", model.properties().endpoints().inbound().get("rsre").endpointType()); + Assertions.assertEquals("piwyczuhxacpqjl", model.properties().endpoints().inbound().get("rsre").address()); + Assertions.assertEquals("hyus", model.properties().endpoints().inbound().get("rsre").version()); + Assertions.assertEquals(AuthenticationMethod.CERTIFICATE, + model.properties().endpoints().inbound().get("rsre").supportedAuthenticationMethods().get(0)); + Assertions.assertEquals("vlmfwdgzxulucv", + model.properties().endpoints().inbound().get("rsre").additionalConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-17T07:51:38Z"), + model.properties().endpoints().inbound().get("rsre").lastUpdatedOn()); + Assertions.assertEquals("foimwkslircizjxv", + model.properties().endpoints().outbound().assigned().get("vlhv").endpointType()); + Assertions.assertEquals("dfcea", model.properties().endpoints().outbound().assigned().get("vlhv").address()); + Assertions.assertEquals("dyftumrtwna", model.properties().manufacturer()); + Assertions.assertEquals("slbi", model.properties().model()); + Assertions.assertEquals("ojgcyzt", model.properties().operatingSystem()); + Assertions.assertEquals("mznbaeqphch", model.properties().operatingSystemVersion()); + Assertions.assertEquals("nrpxehuw", model.properties().discoveryId()); + Assertions.assertEquals(2363907746060609588L, model.properties().version()); + Assertions.assertEquals("aifmvikl", model.extendedLocation().type()); + Assertions.assertEquals("ydv", model.extendedLocation().name()); } // Use "Map.of" if available diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDeviceListResultTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDeviceListResultTests.java index 4fc806773966..76929ed9d4fb 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDeviceListResultTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDeviceListResultTests.java @@ -12,25 +12,25 @@ public final class NamespaceDiscoveredDeviceListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceDiscoveredDeviceListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"externalDeviceId\":\"sttktlahbqa\",\"endpoints\":{\"inbound\":{\"qqxhrnxrxcpj\":{\"endpointType\":\"gzukxitmm\",\"address\":\"tg\"},\"azivjlfrqttbajl\":{\"endpointType\":\"isavok\",\"address\":\"dzf\"},\"vscx\":{\"endpointType\":\"atnwxyiopi\",\"address\":\"kqqfk\"}},\"outbound\":{\"assigned\":{\"oaz\":{\"address\":\"ligovibrxkpm\"},\"rb\":{\"address\":\"ruocbgo\"}}}},\"manufacturer\":\"oybfhjxakvvj\",\"model\":\"lordilmywwtkgkxn\",\"operatingSystem\":\"dabg\",\"operatingSystemVersion\":\"udtjuewbc\",\"attributes\":{},\"discoveryId\":\"uuwhcjyxcc\",\"version\":4402960897406815871,\"provisioningState\":\"Canceled\"},\"extendedLocation\":{\"type\":\"yakk\",\"name\":\"dzpxgwjpl\"},\"location\":\"gstcyohpf\",\"tags\":{\"mnwqj\":\"kdbdgiogsj\",\"n\":\"obaiyhddviaceg\",\"dwvvba\":\"ntfpmvmemfnc\",\"db\":\"xlllchp\"},\"id\":\"evwrdnhfuk\",\"name\":\"vsjcswsmystuluqy\",\"type\":\"fcvlerch\"},{\"properties\":{\"externalDeviceId\":\"mfpjbabw\",\"endpoints\":{\"inbound\":{\"ddrihpf\":{\"endpointType\":\"xsspuunnoxyhk\",\"address\":\"g\"},\"jxxkzbrmsgei\":{\"endpointType\":\"oqcaaewdaomdj\",\"address\":\"l\"},\"z\":{\"endpointType\":\"siykzkdncjdxonbz\",\"address\":\"ggcula\"},\"b\":{\"endpointType\":\"y\",\"address\":\"pgogtqxepny\"}},\"outbound\":{\"assigned\":{\"hvfcibyfmow\":{\"address\":\"jlyjtlvofq\"},\"fzwiivwzjbhyz\":{\"address\":\"xrkjpvdw\"},\"mbtrnegvmnvu\":{\"address\":\"xjrk\"},\"bkkd\":{\"address\":\"eqvldspast\"}}}},\"manufacturer\":\"lves\",\"model\":\"jlxr\",\"operatingSystem\":\"lozapeewchpxlk\",\"operatingSystemVersion\":\"kuziycsle\",\"attributes\":{},\"discoveryId\":\"uztcktyhjtqed\",\"version\":4305474554682539257,\"provisioningState\":\"Accepted\"},\"extendedLocation\":{\"type\":\"wmmrq\",\"name\":\"zrrjvpgly\"},\"location\":\"gkrvqeevto\",\"tags\":{\"vf\":\"yutnwytpzdmov\"},\"id\":\"aawzqadfl\",\"name\":\"z\",\"type\":\"riglaec\"}],\"nextLink\":\"dticokpvzml\"}") + "{\"value\":[{\"properties\":{\"externalDeviceId\":\"fkyrk\",\"endpoints\":{\"inbound\":{\"m\":{\"endpointType\":\"iogsjkmnwq\",\"address\":\"nobaiyhddviacegf\"},\"podbzevwrdnh\":{\"endpointType\":\"tfpmvmemfnczdw\",\"address\":\"vbalxlllc\"},\"uluqypfc\":{\"endpointType\":\"ukuv\",\"address\":\"jcswsmys\"},\"dfc\":{\"endpointType\":\"lerchpq\",\"address\":\"mfpjbabw\"}},\"outbound\":{\"assigned\":{\"rihpfhoq\":{\"address\":\"puunnoxyhkxgqd\"},\"pjxxkzb\":{\"address\":\"aaewdaomdjv\"},\"ncj\":{\"address\":\"msgeivsiykzk\"},\"y\":{\"address\":\"xonbzoggculapz\"}}}},\"manufacturer\":\"gogtqxepnylbf\",\"model\":\"jlyjtlvofq\",\"operatingSystem\":\"vfcibyfmowux\",\"operatingSystemVersion\":\"jpvd\",\"attributes\":{},\"discoveryId\":\"zwiivwzjbhyzs\",\"version\":7980088587869256386,\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"mbtrnegvmnvu\",\"name\":\"eqvldspast\"},\"location\":\"kkdmfl\",\"tags\":{\"ril\":\"tmjlx\",\"ktwkuziyc\":\"zapeewchpx\",\"qedcgzulwm\":\"levufuztcktyhj\"},\"id\":\"rqzz\",\"name\":\"rjvpglydzgkrvqee\",\"type\":\"toepryu\"},{\"properties\":{\"externalDeviceId\":\"ytp\",\"endpoints\":{\"inbound\":{\"riglaec\":{\"endpointType\":\"vzvfvaawzqadfl\",\"address\":\"z\"}},\"outbound\":{\"assigned\":{\"cokpv\":{\"address\":\"t\"},\"irclnpk\":{\"address\":\"mlqtmldgxob\"},\"iykhy\":{\"address\":\"iayz\"}}}},\"manufacturer\":\"fvjlboxqvkjlmx\",\"model\":\"mdy\",\"operatingSystem\":\"dwdigumb\",\"operatingSystemVersion\":\"aauzzptjazysd\",\"attributes\":{},\"discoveryId\":\"zwwva\",\"version\":1821585547650833137,\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"type\":\"vfonkphhqyikvyl\",\"name\":\"uyav\"},\"location\":\"wmn\",\"tags\":{\"ekrsgs\":\"tijfybvp\",\"huzqgn\":\"b\",\"omtkub\":\"dgkynscliqhzvhxn\",\"dxzxhi\":\"tppn\"},\"id\":\"frbbc\",\"name\":\"vqagtltdhlf\",\"type\":\"qojpy\"},{\"properties\":{\"externalDeviceId\":\"trdcnifmzzs\",\"endpoints\":{\"inbound\":{\"vdff\":{\"endpointType\":\"rnysux\",\"address\":\"prafwgckhoc\"}},\"outbound\":{\"assigned\":{\"avehhrvkbunzo\":{\"address\":\"fqroudas\"}}}},\"manufacturer\":\"dhcxgkmoy\",\"model\":\"dyuib\",\"operatingSystem\":\"fdn\",\"operatingSystemVersion\":\"ydvfvfcjnae\",\"attributes\":{},\"discoveryId\":\"rvhmgor\",\"version\":3872649645694596383,\"provisioningState\":\"Deleting\"},\"extendedLocation\":{\"type\":\"scvwmzhwplef\",\"name\":\"xvxilcbtg\"},\"location\":\"nzeyqxtjj\",\"tags\":{\"avodg\":\"lqhy\",\"ariaawi\":\"xdbeesmieknl\",\"wqfbylyrfgiagt\":\"agy\"},\"id\":\"ojocqwogf\",\"name\":\"zjvusfzldmo\",\"type\":\"uxylfsbtkadpy\"},{\"properties\":{\"externalDeviceId\":\"nbtgkbugrjqctoj\",\"endpoints\":{\"inbound\":{\"cuplcplcwkhih\":{\"endpointType\":\"of\",\"address\":\"eypefojyqd\"},\"teyowclu\":{\"endpointType\":\"hlhzdsqtzbsrgno\",\"address\":\"cjhfgmvecactxmw\"},\"ikf\":{\"endpointType\":\"ovekqvgqouwi\",\"address\":\"zmpjwyiv\"},\"kvyklxubyjaffmm\":{\"endpointType\":\"cvhrfsp\",\"address\":\"uagrttikteusqc\"}},\"outbound\":{\"assigned\":{\"ubgq\":{\"address\":\"cqc\"},\"metttwgd\":{\"address\":\"brta\"},\"seypxiutcxapz\":{\"address\":\"lqxihhrmooiz\"},\"petogebjox\":{\"address\":\"y\"}}}},\"manufacturer\":\"hvnh\",\"model\":\"brqnkkzjcjb\",\"operatingSystem\":\"gaehvvibrxjjst\",\"operatingSystemVersion\":\"beitpkx\",\"attributes\":{},\"discoveryId\":\"oobklftidgfcwq\",\"version\":5707153626073678719,\"provisioningState\":\"Accepted\"},\"extendedLocation\":{\"type\":\"qxzhem\",\"name\":\"yhohujswtwkozzwc\"},\"location\":\"kb\",\"tags\":{\"alhsnvkc\":\"fajnjwltlwtjjguk\",\"mlnwiaaomylweazu\":\"mxzrpoa\",\"hwwn\":\"cse\",\"ousnfepgfewe\":\"jhlfzswpchwahf\"},\"id\":\"wlyxgncxyk\",\"name\":\"hdjhlimmbcx\",\"type\":\"h\"}],\"nextLink\":\"po\"}") .toObject(NamespaceDiscoveredDeviceListResult.class); - Assertions.assertEquals("gstcyohpf", model.value().get(0).location()); - Assertions.assertEquals("kdbdgiogsj", model.value().get(0).tags().get("mnwqj")); - Assertions.assertEquals("sttktlahbqa", model.value().get(0).properties().externalDeviceId()); - Assertions.assertEquals("gzukxitmm", - model.value().get(0).properties().endpoints().inbound().get("qqxhrnxrxcpj").endpointType()); - Assertions.assertEquals("tg", - model.value().get(0).properties().endpoints().inbound().get("qqxhrnxrxcpj").address()); - Assertions.assertEquals("ligovibrxkpm", - model.value().get(0).properties().endpoints().outbound().assigned().get("oaz").address()); - Assertions.assertEquals("oybfhjxakvvj", model.value().get(0).properties().manufacturer()); - Assertions.assertEquals("lordilmywwtkgkxn", model.value().get(0).properties().model()); - Assertions.assertEquals("dabg", model.value().get(0).properties().operatingSystem()); - Assertions.assertEquals("udtjuewbc", model.value().get(0).properties().operatingSystemVersion()); - Assertions.assertEquals("uuwhcjyxcc", model.value().get(0).properties().discoveryId()); - Assertions.assertEquals(4402960897406815871L, model.value().get(0).properties().version()); - Assertions.assertEquals("yakk", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("dzpxgwjpl", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("dticokpvzml", model.nextLink()); + Assertions.assertEquals("kkdmfl", model.value().get(0).location()); + Assertions.assertEquals("tmjlx", model.value().get(0).tags().get("ril")); + Assertions.assertEquals("fkyrk", model.value().get(0).properties().externalDeviceId()); + Assertions.assertEquals("iogsjkmnwq", + model.value().get(0).properties().endpoints().inbound().get("m").endpointType()); + Assertions.assertEquals("nobaiyhddviacegf", + model.value().get(0).properties().endpoints().inbound().get("m").address()); + Assertions.assertEquals("puunnoxyhkxgqd", + model.value().get(0).properties().endpoints().outbound().assigned().get("rihpfhoq").address()); + Assertions.assertEquals("gogtqxepnylbf", model.value().get(0).properties().manufacturer()); + Assertions.assertEquals("jlyjtlvofq", model.value().get(0).properties().model()); + Assertions.assertEquals("vfcibyfmowux", model.value().get(0).properties().operatingSystem()); + Assertions.assertEquals("jpvd", model.value().get(0).properties().operatingSystemVersion()); + Assertions.assertEquals("zwiivwzjbhyzs", model.value().get(0).properties().discoveryId()); + Assertions.assertEquals(7980088587869256386L, model.value().get(0).properties().version()); + Assertions.assertEquals("mbtrnegvmnvu", model.value().get(0).extendedLocation().type()); + Assertions.assertEquals("eqvldspast", model.value().get(0).extendedLocation().name()); + Assertions.assertEquals("po", model.nextLink()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDevicePropertiesTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDevicePropertiesTests.java index a98607ac92d2..66dc90fdcf4a 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDevicePropertiesTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDevicePropertiesTests.java @@ -21,93 +21,71 @@ public final class NamespaceDiscoveredDevicePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceDiscoveredDeviceProperties model = BinaryData.fromString( - "{\"externalDeviceId\":\"qqmtedltmmji\",\"endpoints\":{\"inbound\":{\"mc\":{\"endpointType\":\"zphv\",\"address\":\"auyqncygupkv\",\"version\":\"mdscwxqupev\",\"supportedAuthenticationMethods\":[\"Certificate\"],\"additionalConfiguration\":\"otxhojujby\",\"lastUpdatedOn\":\"2021-06-17T22:54:10Z\"},\"oiwiithtywub\":{\"endpointType\":\"vhixbjxy\",\"address\":\"w\",\"version\":\"lrcoolsttpki\",\"supportedAuthenticationMethods\":[\"UsernamePassword\",\"Certificate\"],\"additionalConfiguration\":\"jrywvtylbfpnc\",\"lastUpdatedOn\":\"2021-06-14T14:38:01Z\"},\"fiufx\":{\"endpointType\":\"cbihwqk\",\"address\":\"fdntwjchrdgoih\",\"version\":\"mwctondzjluudfd\",\"supportedAuthenticationMethods\":[\"Anonymous\"],\"additionalConfiguration\":\"tsbwtovvtgse\",\"lastUpdatedOn\":\"2020-12-22T06:21:03Z\"},\"qyzhf\":{\"endpointType\":\"knpirgnepttwq\",\"address\":\"sniffc\",\"version\":\"qnrojlpijnkrxfrd\",\"supportedAuthenticationMethods\":[\"UsernamePassword\"],\"additionalConfiguration\":\"tizzronasxif\",\"lastUpdatedOn\":\"2021-08-28T08:11:06Z\"}},\"outbound\":{\"assigned\":{\"dhqxvcx\":{\"endpointType\":\"gogczhonnxkrlgny\",\"address\":\"mossxkkgthrrghxj\"},\"ybycnunvj\":{\"endpointType\":\"rpdsof\",\"address\":\"shrnsvbuswdvz\"}}}},\"manufacturer\":\"tkfa\",\"model\":\"opqgikyzirtxdyux\",\"operatingSystem\":\"jntpsewgioilqu\",\"operatingSystemVersion\":\"ydxtqm\",\"attributes\":{},\"discoveryId\":\"xorgg\",\"version\":467906638726749311,\"provisioningState\":\"Succeeded\"}") + "{\"externalDeviceId\":\"u\",\"endpoints\":{\"inbound\":{\"yxgtczh\":{\"endpointType\":\"wcw\",\"address\":\"qioknssxmojm\",\"version\":\"p\",\"supportedAuthenticationMethods\":[\"Certificate\",\"Certificate\",\"UsernamePassword\",\"Certificate\"],\"additionalConfiguration\":\"fz\",\"lastUpdatedOn\":\"2021-04-14T17:30:15Z\"}},\"outbound\":{\"assigned\":{\"iplt\":{\"endpointType\":\"sdshmkxmaehvb\",\"address\":\"xu\"},\"kpyklyhp\":{\"endpointType\":\"htba\",\"address\":\"kgxywr\"}}}},\"manufacturer\":\"odpvruudlgzib\",\"model\":\"ostgkts\",\"operatingSystem\":\"dxeclzedqbcvh\",\"operatingSystemVersion\":\"h\",\"attributes\":{},\"discoveryId\":\"dqkdlwwqfbu\",\"version\":3679022657074806419,\"provisioningState\":\"Accepted\"}") .toObject(NamespaceDiscoveredDeviceProperties.class); - Assertions.assertEquals("qqmtedltmmji", model.externalDeviceId()); - Assertions.assertEquals("zphv", model.endpoints().inbound().get("mc").endpointType()); - Assertions.assertEquals("auyqncygupkv", model.endpoints().inbound().get("mc").address()); - Assertions.assertEquals("mdscwxqupev", model.endpoints().inbound().get("mc").version()); + Assertions.assertEquals("u", model.externalDeviceId()); + Assertions.assertEquals("wcw", model.endpoints().inbound().get("yxgtczh").endpointType()); + Assertions.assertEquals("qioknssxmojm", model.endpoints().inbound().get("yxgtczh").address()); + Assertions.assertEquals("p", model.endpoints().inbound().get("yxgtczh").version()); Assertions.assertEquals(AuthenticationMethod.CERTIFICATE, - model.endpoints().inbound().get("mc").supportedAuthenticationMethods().get(0)); - Assertions.assertEquals("otxhojujby", model.endpoints().inbound().get("mc").additionalConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-17T22:54:10Z"), - model.endpoints().inbound().get("mc").lastUpdatedOn()); - Assertions.assertEquals("gogczhonnxkrlgny", - model.endpoints().outbound().assigned().get("dhqxvcx").endpointType()); - Assertions.assertEquals("mossxkkgthrrghxj", model.endpoints().outbound().assigned().get("dhqxvcx").address()); - Assertions.assertEquals("tkfa", model.manufacturer()); - Assertions.assertEquals("opqgikyzirtxdyux", model.model()); - Assertions.assertEquals("jntpsewgioilqu", model.operatingSystem()); - Assertions.assertEquals("ydxtqm", model.operatingSystemVersion()); - Assertions.assertEquals("xorgg", model.discoveryId()); - Assertions.assertEquals(467906638726749311L, model.version()); + model.endpoints().inbound().get("yxgtczh").supportedAuthenticationMethods().get(0)); + Assertions.assertEquals("fz", model.endpoints().inbound().get("yxgtczh").additionalConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-14T17:30:15Z"), + model.endpoints().inbound().get("yxgtczh").lastUpdatedOn()); + Assertions.assertEquals("sdshmkxmaehvb", model.endpoints().outbound().assigned().get("iplt").endpointType()); + Assertions.assertEquals("xu", model.endpoints().outbound().assigned().get("iplt").address()); + Assertions.assertEquals("odpvruudlgzib", model.manufacturer()); + Assertions.assertEquals("ostgkts", model.model()); + Assertions.assertEquals("dxeclzedqbcvh", model.operatingSystem()); + Assertions.assertEquals("h", model.operatingSystemVersion()); + Assertions.assertEquals("dqkdlwwqfbu", model.discoveryId()); + Assertions.assertEquals(3679022657074806419L, model.version()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NamespaceDiscoveredDeviceProperties model - = new NamespaceDiscoveredDeviceProperties().withExternalDeviceId("qqmtedltmmji") - .withEndpoints(new DiscoveredMessagingEndpoints() - .withInbound(mapOf("mc", - new DiscoveredInboundEndpoints().withEndpointType("zphv") - .withAddress("auyqncygupkv") - .withVersion("mdscwxqupev") - .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.CERTIFICATE)) - .withAdditionalConfiguration("otxhojujby") - .withLastUpdatedOn(OffsetDateTime.parse("2021-06-17T22:54:10Z")), - "oiwiithtywub", - new DiscoveredInboundEndpoints().withEndpointType("vhixbjxy") - .withAddress("w") - .withVersion("lrcoolsttpki") - .withSupportedAuthenticationMethods( - Arrays.asList(AuthenticationMethod.USERNAME_PASSWORD, AuthenticationMethod.CERTIFICATE)) - .withAdditionalConfiguration("jrywvtylbfpnc") - .withLastUpdatedOn(OffsetDateTime.parse("2021-06-14T14:38:01Z")), - "fiufx", - new DiscoveredInboundEndpoints().withEndpointType("cbihwqk") - .withAddress("fdntwjchrdgoih") - .withVersion("mwctondzjluudfd") - .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.ANONYMOUS)) - .withAdditionalConfiguration("tsbwtovvtgse") - .withLastUpdatedOn(OffsetDateTime.parse("2020-12-22T06:21:03Z")), - "qyzhf", - new DiscoveredInboundEndpoints().withEndpointType("knpirgnepttwq") - .withAddress("sniffc") - .withVersion("qnrojlpijnkrxfrd") - .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.USERNAME_PASSWORD)) - .withAdditionalConfiguration("tizzronasxif") - .withLastUpdatedOn(OffsetDateTime.parse("2021-08-28T08:11:06Z")))) - .withOutbound(new DiscoveredOutboundEndpoints().withAssigned(mapOf("dhqxvcx", - new DeviceMessagingEndpoint().withEndpointType("gogczhonnxkrlgny") - .withAddress("mossxkkgthrrghxj"), - "ybycnunvj", - new DeviceMessagingEndpoint().withEndpointType("rpdsof").withAddress("shrnsvbuswdvz"))))) - .withManufacturer("tkfa") - .withModel("opqgikyzirtxdyux") - .withOperatingSystem("jntpsewgioilqu") - .withOperatingSystemVersion("ydxtqm") + = new NamespaceDiscoveredDeviceProperties().withExternalDeviceId("u") + .withEndpoints( + new DiscoveredMessagingEndpoints() + .withInbound( + mapOf("yxgtczh", + new DiscoveredInboundEndpoints().withEndpointType("wcw") + .withAddress("qioknssxmojm") + .withVersion("p") + .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.CERTIFICATE, + AuthenticationMethod.CERTIFICATE, AuthenticationMethod.USERNAME_PASSWORD, + AuthenticationMethod.CERTIFICATE)) + .withAdditionalConfiguration("fz") + .withLastUpdatedOn(OffsetDateTime.parse("2021-04-14T17:30:15Z")))) + .withOutbound(new DiscoveredOutboundEndpoints().withAssigned(mapOf("iplt", + new DeviceMessagingEndpoint().withEndpointType("sdshmkxmaehvb").withAddress("xu"), + "kpyklyhp", new DeviceMessagingEndpoint().withEndpointType("htba").withAddress("kgxywr"))))) + .withManufacturer("odpvruudlgzib") + .withModel("ostgkts") + .withOperatingSystem("dxeclzedqbcvh") + .withOperatingSystemVersion("h") .withAttributes(mapOf()) - .withDiscoveryId("xorgg") - .withVersion(467906638726749311L); + .withDiscoveryId("dqkdlwwqfbu") + .withVersion(3679022657074806419L); model = BinaryData.fromObject(model).toObject(NamespaceDiscoveredDeviceProperties.class); - Assertions.assertEquals("qqmtedltmmji", model.externalDeviceId()); - Assertions.assertEquals("zphv", model.endpoints().inbound().get("mc").endpointType()); - Assertions.assertEquals("auyqncygupkv", model.endpoints().inbound().get("mc").address()); - Assertions.assertEquals("mdscwxqupev", model.endpoints().inbound().get("mc").version()); + Assertions.assertEquals("u", model.externalDeviceId()); + Assertions.assertEquals("wcw", model.endpoints().inbound().get("yxgtczh").endpointType()); + Assertions.assertEquals("qioknssxmojm", model.endpoints().inbound().get("yxgtczh").address()); + Assertions.assertEquals("p", model.endpoints().inbound().get("yxgtczh").version()); Assertions.assertEquals(AuthenticationMethod.CERTIFICATE, - model.endpoints().inbound().get("mc").supportedAuthenticationMethods().get(0)); - Assertions.assertEquals("otxhojujby", model.endpoints().inbound().get("mc").additionalConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-17T22:54:10Z"), - model.endpoints().inbound().get("mc").lastUpdatedOn()); - Assertions.assertEquals("gogczhonnxkrlgny", - model.endpoints().outbound().assigned().get("dhqxvcx").endpointType()); - Assertions.assertEquals("mossxkkgthrrghxj", model.endpoints().outbound().assigned().get("dhqxvcx").address()); - Assertions.assertEquals("tkfa", model.manufacturer()); - Assertions.assertEquals("opqgikyzirtxdyux", model.model()); - Assertions.assertEquals("jntpsewgioilqu", model.operatingSystem()); - Assertions.assertEquals("ydxtqm", model.operatingSystemVersion()); - Assertions.assertEquals("xorgg", model.discoveryId()); - Assertions.assertEquals(467906638726749311L, model.version()); + model.endpoints().inbound().get("yxgtczh").supportedAuthenticationMethods().get(0)); + Assertions.assertEquals("fz", model.endpoints().inbound().get("yxgtczh").additionalConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-14T17:30:15Z"), + model.endpoints().inbound().get("yxgtczh").lastUpdatedOn()); + Assertions.assertEquals("sdshmkxmaehvb", model.endpoints().outbound().assigned().get("iplt").endpointType()); + Assertions.assertEquals("xu", model.endpoints().outbound().assigned().get("iplt").address()); + Assertions.assertEquals("odpvruudlgzib", model.manufacturer()); + Assertions.assertEquals("ostgkts", model.model()); + Assertions.assertEquals("dxeclzedqbcvh", model.operatingSystem()); + Assertions.assertEquals("h", model.operatingSystemVersion()); + Assertions.assertEquals("dqkdlwwqfbu", model.discoveryId()); + Assertions.assertEquals(3679022657074806419L, model.version()); } // Use "Map.of" if available diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDeviceUpdatePropertiesTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDeviceUpdatePropertiesTests.java index fbabcc92f1ac..ecf4f7643d3f 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDeviceUpdatePropertiesTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDeviceUpdatePropertiesTests.java @@ -21,84 +21,61 @@ public final class NamespaceDiscoveredDeviceUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceDiscoveredDeviceUpdateProperties model = BinaryData.fromString( - "{\"externalDeviceId\":\"ulfgslqu\",\"endpoints\":{\"inbound\":{\"gpqch\":{\"endpointType\":\"lenrd\",\"address\":\"utujba\",\"version\":\"juohminyflnorw\",\"supportedAuthenticationMethods\":[\"UsernamePassword\",\"UsernamePassword\",\"UsernamePassword\"],\"additionalConfiguration\":\"lvxwmyg\",\"lastUpdatedOn\":\"2021-08-06T16:36:03Z\"},\"hlvnuuepzlr\":{\"endpointType\":\"sze\",\"address\":\"nnbj\",\"version\":\"xgibbda\",\"supportedAuthenticationMethods\":[\"UsernamePassword\"],\"additionalConfiguration\":\"ozauorsukokwb\",\"lastUpdatedOn\":\"2021-03-26T17:33:57Z\"},\"xmsivfomiloxggdu\":{\"endpointType\":\"hw\",\"address\":\"soldweyuqdunv\",\"version\":\"nrwrbiork\",\"supportedAuthenticationMethods\":[\"Anonymous\",\"Certificate\"],\"additionalConfiguration\":\"hhg\",\"lastUpdatedOn\":\"2021-09-05T06:42:05Z\"},\"m\":{\"endpointType\":\"iqndieuzaofj\",\"address\":\"hvcyyysfg\",\"version\":\"tcubiipuipwoqonm\",\"supportedAuthenticationMethods\":[\"UsernamePassword\",\"UsernamePassword\",\"UsernamePassword\"],\"additionalConfiguration\":\"zshq\",\"lastUpdatedOn\":\"2021-10-26T01:34:18Z\"}},\"outbound\":{\"assigned\":{\"rwfscjfnynszquj\":{\"endpointType\":\"gmblrri\",\"address\":\"bywdxsmicc\"},\"hjoxo\":{\"endpointType\":\"dvoqyt\",\"address\":\"byowbblgyavutp\"},\"cgxxlxs\":{\"endpointType\":\"msksbp\",\"address\":\"mlqoljx\"}}}},\"operatingSystemVersion\":\"gcvizqzdwlvwlyou\",\"attributes\":{},\"discoveryId\":\"bkjubdyhgkfmins\",\"version\":3264236544937493152}") + "{\"externalDeviceId\":\"okqdzfvaz\",\"endpoints\":{\"inbound\":{\"zuruocbgo\":{\"endpointType\":\"frqttbajlkatnw\",\"address\":\"yiopi\",\"version\":\"qqfkuv\",\"supportedAuthenticationMethods\":[\"UsernamePassword\",\"Certificate\"],\"additionalConfiguration\":\"ligovibrxkpm\",\"lastUpdatedOn\":\"2021-08-05T02:44:40Z\"}},\"outbound\":{\"assigned\":{\"dabg\":{\"endpointType\":\"eoybfhjxakvvjgs\",\"address\":\"ordilmywwtkgkxny\"},\"yakk\":{\"endpointType\":\"udtjuewbc\",\"address\":\"hxuuwhcjyxccybvp\"}}}},\"operatingSystemVersion\":\"zp\",\"attributes\":{},\"discoveryId\":\"plmag\",\"version\":5000537664273654881}") .toObject(NamespaceDiscoveredDeviceUpdateProperties.class); - Assertions.assertEquals("ulfgslqu", model.externalDeviceId()); - Assertions.assertEquals("lenrd", model.endpoints().inbound().get("gpqch").endpointType()); - Assertions.assertEquals("utujba", model.endpoints().inbound().get("gpqch").address()); - Assertions.assertEquals("juohminyflnorw", model.endpoints().inbound().get("gpqch").version()); + Assertions.assertEquals("okqdzfvaz", model.externalDeviceId()); + Assertions.assertEquals("frqttbajlkatnw", model.endpoints().inbound().get("zuruocbgo").endpointType()); + Assertions.assertEquals("yiopi", model.endpoints().inbound().get("zuruocbgo").address()); + Assertions.assertEquals("qqfkuv", model.endpoints().inbound().get("zuruocbgo").version()); Assertions.assertEquals(AuthenticationMethod.USERNAME_PASSWORD, - model.endpoints().inbound().get("gpqch").supportedAuthenticationMethods().get(0)); - Assertions.assertEquals("lvxwmyg", model.endpoints().inbound().get("gpqch").additionalConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-06T16:36:03Z"), - model.endpoints().inbound().get("gpqch").lastUpdatedOn()); - Assertions.assertEquals("gmblrri", - model.endpoints().outbound().assigned().get("rwfscjfnynszquj").endpointType()); - Assertions.assertEquals("bywdxsmicc", model.endpoints().outbound().assigned().get("rwfscjfnynszquj").address()); - Assertions.assertEquals("gcvizqzdwlvwlyou", model.operatingSystemVersion()); - Assertions.assertEquals("bkjubdyhgkfmins", model.discoveryId()); - Assertions.assertEquals(3264236544937493152L, model.version()); + model.endpoints().inbound().get("zuruocbgo").supportedAuthenticationMethods().get(0)); + Assertions.assertEquals("ligovibrxkpm", model.endpoints().inbound().get("zuruocbgo").additionalConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-05T02:44:40Z"), + model.endpoints().inbound().get("zuruocbgo").lastUpdatedOn()); + Assertions.assertEquals("eoybfhjxakvvjgs", model.endpoints().outbound().assigned().get("dabg").endpointType()); + Assertions.assertEquals("ordilmywwtkgkxny", model.endpoints().outbound().assigned().get("dabg").address()); + Assertions.assertEquals("zp", model.operatingSystemVersion()); + Assertions.assertEquals("plmag", model.discoveryId()); + Assertions.assertEquals(5000537664273654881L, model.version()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NamespaceDiscoveredDeviceUpdateProperties model - = new NamespaceDiscoveredDeviceUpdateProperties().withExternalDeviceId("ulfgslqu") + = new NamespaceDiscoveredDeviceUpdateProperties().withExternalDeviceId("okqdzfvaz") .withEndpoints(new DiscoveredMessagingEndpoints() - .withInbound(mapOf("gpqch", - new DiscoveredInboundEndpoints().withEndpointType("lenrd") - .withAddress("utujba") - .withVersion("juohminyflnorw") - .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.USERNAME_PASSWORD, - AuthenticationMethod.USERNAME_PASSWORD, AuthenticationMethod.USERNAME_PASSWORD)) - .withAdditionalConfiguration("lvxwmyg") - .withLastUpdatedOn(OffsetDateTime.parse("2021-08-06T16:36:03Z")), - "hlvnuuepzlr", - new DiscoveredInboundEndpoints().withEndpointType("sze") - .withAddress("nnbj") - .withVersion("xgibbda") - .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.USERNAME_PASSWORD)) - .withAdditionalConfiguration("ozauorsukokwb") - .withLastUpdatedOn(OffsetDateTime.parse("2021-03-26T17:33:57Z")), - "xmsivfomiloxggdu", - new DiscoveredInboundEndpoints().withEndpointType("hw") - .withAddress("soldweyuqdunv") - .withVersion("nrwrbiork") + .withInbound(mapOf("zuruocbgo", + new DiscoveredInboundEndpoints().withEndpointType("frqttbajlkatnw") + .withAddress("yiopi") + .withVersion("qqfkuv") .withSupportedAuthenticationMethods( - Arrays.asList(AuthenticationMethod.ANONYMOUS, AuthenticationMethod.CERTIFICATE)) - .withAdditionalConfiguration("hhg") - .withLastUpdatedOn(OffsetDateTime.parse("2021-09-05T06:42:05Z")), - "m", new DiscoveredInboundEndpoints().withEndpointType("iqndieuzaofj") - .withAddress("hvcyyysfg") - .withVersion("tcubiipuipwoqonm") - .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.USERNAME_PASSWORD, - AuthenticationMethod.USERNAME_PASSWORD, AuthenticationMethod.USERNAME_PASSWORD)) - .withAdditionalConfiguration("zshq") - .withLastUpdatedOn(OffsetDateTime.parse("2021-10-26T01:34:18Z")))) - .withOutbound(new DiscoveredOutboundEndpoints().withAssigned(mapOf("rwfscjfnynszquj", - new DeviceMessagingEndpoint().withEndpointType("gmblrri").withAddress("bywdxsmicc"), "hjoxo", - new DeviceMessagingEndpoint().withEndpointType("dvoqyt").withAddress("byowbblgyavutp"), - "cgxxlxs", new DeviceMessagingEndpoint().withEndpointType("msksbp").withAddress("mlqoljx"))))) - .withOperatingSystemVersion("gcvizqzdwlvwlyou") + Arrays.asList(AuthenticationMethod.USERNAME_PASSWORD, AuthenticationMethod.CERTIFICATE)) + .withAdditionalConfiguration("ligovibrxkpm") + .withLastUpdatedOn(OffsetDateTime.parse("2021-08-05T02:44:40Z")))) + .withOutbound(new DiscoveredOutboundEndpoints().withAssigned(mapOf("dabg", + new DeviceMessagingEndpoint().withEndpointType("eoybfhjxakvvjgs") + .withAddress("ordilmywwtkgkxny"), + "yakk", + new DeviceMessagingEndpoint().withEndpointType("udtjuewbc").withAddress("hxuuwhcjyxccybvp"))))) + .withOperatingSystemVersion("zp") .withAttributes(mapOf()) - .withDiscoveryId("bkjubdyhgkfmins") - .withVersion(3264236544937493152L); + .withDiscoveryId("plmag") + .withVersion(5000537664273654881L); model = BinaryData.fromObject(model).toObject(NamespaceDiscoveredDeviceUpdateProperties.class); - Assertions.assertEquals("ulfgslqu", model.externalDeviceId()); - Assertions.assertEquals("lenrd", model.endpoints().inbound().get("gpqch").endpointType()); - Assertions.assertEquals("utujba", model.endpoints().inbound().get("gpqch").address()); - Assertions.assertEquals("juohminyflnorw", model.endpoints().inbound().get("gpqch").version()); + Assertions.assertEquals("okqdzfvaz", model.externalDeviceId()); + Assertions.assertEquals("frqttbajlkatnw", model.endpoints().inbound().get("zuruocbgo").endpointType()); + Assertions.assertEquals("yiopi", model.endpoints().inbound().get("zuruocbgo").address()); + Assertions.assertEquals("qqfkuv", model.endpoints().inbound().get("zuruocbgo").version()); Assertions.assertEquals(AuthenticationMethod.USERNAME_PASSWORD, - model.endpoints().inbound().get("gpqch").supportedAuthenticationMethods().get(0)); - Assertions.assertEquals("lvxwmyg", model.endpoints().inbound().get("gpqch").additionalConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-06T16:36:03Z"), - model.endpoints().inbound().get("gpqch").lastUpdatedOn()); - Assertions.assertEquals("gmblrri", - model.endpoints().outbound().assigned().get("rwfscjfnynszquj").endpointType()); - Assertions.assertEquals("bywdxsmicc", model.endpoints().outbound().assigned().get("rwfscjfnynszquj").address()); - Assertions.assertEquals("gcvizqzdwlvwlyou", model.operatingSystemVersion()); - Assertions.assertEquals("bkjubdyhgkfmins", model.discoveryId()); - Assertions.assertEquals(3264236544937493152L, model.version()); + model.endpoints().inbound().get("zuruocbgo").supportedAuthenticationMethods().get(0)); + Assertions.assertEquals("ligovibrxkpm", model.endpoints().inbound().get("zuruocbgo").additionalConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-05T02:44:40Z"), + model.endpoints().inbound().get("zuruocbgo").lastUpdatedOn()); + Assertions.assertEquals("eoybfhjxakvvjgs", model.endpoints().outbound().assigned().get("dabg").endpointType()); + Assertions.assertEquals("ordilmywwtkgkxny", model.endpoints().outbound().assigned().get("dabg").address()); + Assertions.assertEquals("zp", model.operatingSystemVersion()); + Assertions.assertEquals("plmag", model.discoveryId()); + Assertions.assertEquals(5000537664273654881L, model.version()); } // Use "Map.of" if available diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDeviceUpdateTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDeviceUpdateTests.java index a6a39700fc81..0687c2e88dc7 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDeviceUpdateTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDeviceUpdateTests.java @@ -22,84 +22,78 @@ public final class NamespaceDiscoveredDeviceUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceDiscoveredDeviceUpdate model = BinaryData.fromString( - "{\"tags\":{\"vpkjpr\":\"qioknssxmojm\",\"ql\":\"kwcf\"},\"properties\":{\"externalDeviceId\":\"gtczheydb\",\"endpoints\":{\"inbound\":{\"lyhpluodpvruud\":{\"endpointType\":\"m\",\"address\":\"xmaehvbbxu\",\"version\":\"pltfnhtba\",\"supportedAuthenticationMethods\":[\"Anonymous\"],\"additionalConfiguration\":\"wrck\",\"lastUpdatedOn\":\"2021-09-26T20:36:36Z\"},\"srtawcoezbr\":{\"endpointType\":\"gzibthostgktstv\",\"address\":\"xeclzedqbcvhzlhp\",\"version\":\"dqkdlwwqfbu\",\"supportedAuthenticationMethods\":[\"Certificate\",\"Anonymous\"],\"additionalConfiguration\":\"qjfsmlmbtxhw\",\"lastUpdatedOn\":\"2021-10-04T15:27:21Z\"},\"qabqgzslesjcb\":{\"endpointType\":\"ubskhudygoookkq\",\"address\":\"qjbvleorfmlu\",\"version\":\"tqzfavyv\",\"supportedAuthenticationMethods\":[\"Anonymous\",\"Anonymous\",\"Certificate\"],\"additionalConfiguration\":\"yeua\",\"lastUpdatedOn\":\"2021-06-23T02:25:47Z\"}},\"outbound\":{\"assigned\":{\"uwrbehwagoh\":{\"endpointType\":\"ntiew\",\"address\":\"jcvb\"},\"emvvhm\":{\"endpointType\":\"f\",\"address\":\"kmr\"},\"ebjvewzcjzn\":{\"endpointType\":\"drjf\",\"address\":\"tac\"}}}},\"operatingSystemVersion\":\"cpmguaadraufact\",\"attributes\":{},\"discoveryId\":\"ovajjziuxxps\",\"version\":7816879352665514868}}") + "{\"tags\":{\"nhxmsi\":\"hhg\",\"ufiqndieuzaof\":\"fomiloxgg\",\"cubiipuipw\":\"chvcyyysfgdo\"},\"properties\":{\"externalDeviceId\":\"nmacj\",\"endpoints\":{\"inbound\":{\"nszqujiz\":{\"endpointType\":\"zshq\",\"address\":\"cimpevfg\",\"version\":\"lrri\",\"supportedAuthenticationMethods\":[\"UsernamePassword\",\"Certificate\"],\"additionalConfiguration\":\"smiccwrwfscj\",\"lastUpdatedOn\":\"2021-01-04T01:05:07Z\"}},\"outbound\":{\"assigned\":{\"xoi\":{\"endpointType\":\"ytibyow\",\"address\":\"blgyavutpthj\"},\"lqol\":{\"endpointType\":\"sks\",\"address\":\"pi\"},\"gfbkjubdyh\":{\"endpointType\":\"kcgxxlxsffgcvi\",\"address\":\"qzdwlvwlyoup\"},\"ctxtgzukxi\":{\"endpointType\":\"fminsgowzf\",\"address\":\"tsttktlahbq\"}}}},\"operatingSystemVersion\":\"m\",\"attributes\":{},\"discoveryId\":\"qqxhrnxrxcpj\",\"version\":250519210827189161}}") .toObject(NamespaceDiscoveredDeviceUpdate.class); - Assertions.assertEquals("qioknssxmojm", model.tags().get("vpkjpr")); - Assertions.assertEquals("gtczheydb", model.properties().externalDeviceId()); - Assertions.assertEquals("m", model.properties().endpoints().inbound().get("lyhpluodpvruud").endpointType()); - Assertions.assertEquals("xmaehvbbxu", model.properties().endpoints().inbound().get("lyhpluodpvruud").address()); - Assertions.assertEquals("pltfnhtba", model.properties().endpoints().inbound().get("lyhpluodpvruud").version()); - Assertions.assertEquals(AuthenticationMethod.ANONYMOUS, - model.properties().endpoints().inbound().get("lyhpluodpvruud").supportedAuthenticationMethods().get(0)); - Assertions.assertEquals("wrck", - model.properties().endpoints().inbound().get("lyhpluodpvruud").additionalConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-26T20:36:36Z"), - model.properties().endpoints().inbound().get("lyhpluodpvruud").lastUpdatedOn()); - Assertions.assertEquals("ntiew", - model.properties().endpoints().outbound().assigned().get("uwrbehwagoh").endpointType()); - Assertions.assertEquals("jcvb", - model.properties().endpoints().outbound().assigned().get("uwrbehwagoh").address()); - Assertions.assertEquals("cpmguaadraufact", model.properties().operatingSystemVersion()); - Assertions.assertEquals("ovajjziuxxps", model.properties().discoveryId()); - Assertions.assertEquals(7816879352665514868L, model.properties().version()); + Assertions.assertEquals("hhg", model.tags().get("nhxmsi")); + Assertions.assertEquals("nmacj", model.properties().externalDeviceId()); + Assertions.assertEquals("zshq", model.properties().endpoints().inbound().get("nszqujiz").endpointType()); + Assertions.assertEquals("cimpevfg", model.properties().endpoints().inbound().get("nszqujiz").address()); + Assertions.assertEquals("lrri", model.properties().endpoints().inbound().get("nszqujiz").version()); + Assertions.assertEquals(AuthenticationMethod.USERNAME_PASSWORD, + model.properties().endpoints().inbound().get("nszqujiz").supportedAuthenticationMethods().get(0)); + Assertions.assertEquals("smiccwrwfscj", + model.properties().endpoints().inbound().get("nszqujiz").additionalConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-04T01:05:07Z"), + model.properties().endpoints().inbound().get("nszqujiz").lastUpdatedOn()); + Assertions.assertEquals("ytibyow", + model.properties().endpoints().outbound().assigned().get("xoi").endpointType()); + Assertions.assertEquals("blgyavutpthj", + model.properties().endpoints().outbound().assigned().get("xoi").address()); + Assertions.assertEquals("m", model.properties().operatingSystemVersion()); + Assertions.assertEquals("qqxhrnxrxcpj", model.properties().discoveryId()); + Assertions.assertEquals(250519210827189161L, model.properties().version()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NamespaceDiscoveredDeviceUpdate model - = new NamespaceDiscoveredDeviceUpdate().withTags(mapOf("vpkjpr", "qioknssxmojm", "ql", "kwcf")) - .withProperties(new NamespaceDiscoveredDeviceUpdateProperties().withExternalDeviceId("gtczheydb") - .withEndpoints(new DiscoveredMessagingEndpoints() - .withInbound(mapOf("lyhpluodpvruud", - new DiscoveredInboundEndpoints().withEndpointType("m") - .withAddress("xmaehvbbxu") - .withVersion("pltfnhtba") - .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.ANONYMOUS)) - .withAdditionalConfiguration("wrck") - .withLastUpdatedOn(OffsetDateTime.parse("2021-09-26T20:36:36Z")), - "srtawcoezbr", - new DiscoveredInboundEndpoints().withEndpointType("gzibthostgktstv") - .withAddress("xeclzedqbcvhzlhp") - .withVersion("dqkdlwwqfbu") - .withSupportedAuthenticationMethods( - Arrays.asList(AuthenticationMethod.CERTIFICATE, AuthenticationMethod.ANONYMOUS)) - .withAdditionalConfiguration("qjfsmlmbtxhw") - .withLastUpdatedOn(OffsetDateTime.parse("2021-10-04T15:27:21Z")), - "qabqgzslesjcb", - new DiscoveredInboundEndpoints().withEndpointType("ubskhudygoookkq") - .withAddress("qjbvleorfmlu") - .withVersion("tqzfavyv") - .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.ANONYMOUS, - AuthenticationMethod.ANONYMOUS, AuthenticationMethod.CERTIFICATE)) - .withAdditionalConfiguration("yeua") - .withLastUpdatedOn(OffsetDateTime.parse("2021-06-23T02:25:47Z")))) - .withOutbound(new DiscoveredOutboundEndpoints().withAssigned(mapOf("uwrbehwagoh", - new DeviceMessagingEndpoint().withEndpointType("ntiew").withAddress("jcvb"), "emvvhm", - new DeviceMessagingEndpoint().withEndpointType("f").withAddress("kmr"), "ebjvewzcjzn", - new DeviceMessagingEndpoint().withEndpointType("drjf").withAddress("tac"))))) - .withOperatingSystemVersion("cpmguaadraufact") - .withAttributes(mapOf()) - .withDiscoveryId("ovajjziuxxps") - .withVersion(7816879352665514868L)); + = new NamespaceDiscoveredDeviceUpdate() + .withTags(mapOf("nhxmsi", "hhg", "ufiqndieuzaof", "fomiloxgg", "cubiipuipw", "chvcyyysfgdo")) + .withProperties( + new NamespaceDiscoveredDeviceUpdateProperties().withExternalDeviceId("nmacj") + .withEndpoints( + new DiscoveredMessagingEndpoints() + .withInbound(mapOf("nszqujiz", + new DiscoveredInboundEndpoints().withEndpointType("zshq") + .withAddress("cimpevfg") + .withVersion("lrri") + .withSupportedAuthenticationMethods(Arrays.asList( + AuthenticationMethod.USERNAME_PASSWORD, AuthenticationMethod.CERTIFICATE)) + .withAdditionalConfiguration("smiccwrwfscj") + .withLastUpdatedOn(OffsetDateTime.parse("2021-01-04T01:05:07Z")))) + .withOutbound(new DiscoveredOutboundEndpoints().withAssigned(mapOf("xoi", + new DeviceMessagingEndpoint().withEndpointType("ytibyow") + .withAddress("blgyavutpthj"), + "lqol", new DeviceMessagingEndpoint().withEndpointType("sks").withAddress("pi"), + "gfbkjubdyh", + new DeviceMessagingEndpoint().withEndpointType("kcgxxlxsffgcvi") + .withAddress("qzdwlvwlyoup"), + "ctxtgzukxi", + new DeviceMessagingEndpoint().withEndpointType("fminsgowzf") + .withAddress("tsttktlahbq"))))) + .withOperatingSystemVersion("m") + .withAttributes(mapOf()) + .withDiscoveryId("qqxhrnxrxcpj") + .withVersion(250519210827189161L)); model = BinaryData.fromObject(model).toObject(NamespaceDiscoveredDeviceUpdate.class); - Assertions.assertEquals("qioknssxmojm", model.tags().get("vpkjpr")); - Assertions.assertEquals("gtczheydb", model.properties().externalDeviceId()); - Assertions.assertEquals("m", model.properties().endpoints().inbound().get("lyhpluodpvruud").endpointType()); - Assertions.assertEquals("xmaehvbbxu", model.properties().endpoints().inbound().get("lyhpluodpvruud").address()); - Assertions.assertEquals("pltfnhtba", model.properties().endpoints().inbound().get("lyhpluodpvruud").version()); - Assertions.assertEquals(AuthenticationMethod.ANONYMOUS, - model.properties().endpoints().inbound().get("lyhpluodpvruud").supportedAuthenticationMethods().get(0)); - Assertions.assertEquals("wrck", - model.properties().endpoints().inbound().get("lyhpluodpvruud").additionalConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-26T20:36:36Z"), - model.properties().endpoints().inbound().get("lyhpluodpvruud").lastUpdatedOn()); - Assertions.assertEquals("ntiew", - model.properties().endpoints().outbound().assigned().get("uwrbehwagoh").endpointType()); - Assertions.assertEquals("jcvb", - model.properties().endpoints().outbound().assigned().get("uwrbehwagoh").address()); - Assertions.assertEquals("cpmguaadraufact", model.properties().operatingSystemVersion()); - Assertions.assertEquals("ovajjziuxxps", model.properties().discoveryId()); - Assertions.assertEquals(7816879352665514868L, model.properties().version()); + Assertions.assertEquals("hhg", model.tags().get("nhxmsi")); + Assertions.assertEquals("nmacj", model.properties().externalDeviceId()); + Assertions.assertEquals("zshq", model.properties().endpoints().inbound().get("nszqujiz").endpointType()); + Assertions.assertEquals("cimpevfg", model.properties().endpoints().inbound().get("nszqujiz").address()); + Assertions.assertEquals("lrri", model.properties().endpoints().inbound().get("nszqujiz").version()); + Assertions.assertEquals(AuthenticationMethod.USERNAME_PASSWORD, + model.properties().endpoints().inbound().get("nszqujiz").supportedAuthenticationMethods().get(0)); + Assertions.assertEquals("smiccwrwfscj", + model.properties().endpoints().inbound().get("nszqujiz").additionalConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-04T01:05:07Z"), + model.properties().endpoints().inbound().get("nszqujiz").lastUpdatedOn()); + Assertions.assertEquals("ytibyow", + model.properties().endpoints().outbound().assigned().get("xoi").endpointType()); + Assertions.assertEquals("blgyavutpthj", + model.properties().endpoints().outbound().assigned().get("xoi").address()); + Assertions.assertEquals("m", model.properties().operatingSystemVersion()); + Assertions.assertEquals("qqxhrnxrxcpj", model.properties().discoveryId()); + Assertions.assertEquals(250519210827189161L, model.properties().version()); } // Use "Map.of" if available diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDevicesCreateOrReplaceMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDevicesCreateOrReplaceMockTests.java index a3d43b27fa33..9410ac4d2b9f 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDevicesCreateOrReplaceMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDevicesCreateOrReplaceMockTests.java @@ -31,7 +31,7 @@ public final class NamespaceDiscoveredDevicesCreateOrReplaceMockTests { @Test public void testCreateOrReplace() throws Exception { String responseStr - = "{\"properties\":{\"externalDeviceId\":\"zlanrupdwvnph\",\"endpoints\":{\"inbound\":{\"pxy\":{\"endpointType\":\"tpjhm\",\"address\":\"rhv\",\"version\":\"laiwdcxsmlzzh\",\"supportedAuthenticationMethods\":[\"UsernamePassword\",\"Anonymous\",\"Anonymous\"],\"additionalConfiguration\":\"gydlhqv\",\"lastUpdatedOn\":\"2021-05-07T23:31:59Z\"}},\"outbound\":{\"assigned\":{\"arbgjekgl\":{\"address\":\"iqge\"},\"jonfhjirwgdnqzbr\":{\"address\":\"lbyulidwcwvmze\"}}}},\"manufacturer\":\"spzhzmtksjc\",\"model\":\"digsxcdgl\",\"operatingSystem\":\"lkeuac\",\"operatingSystemVersion\":\"omflrytswfp\",\"attributes\":{},\"discoveryId\":\"gycxnmskwhqjjys\",\"version\":7889594370600381712,\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"shhkvpedw\",\"name\":\"slsrhmpq\"},\"location\":\"wskondcbrwimuvqe\",\"tags\":{\"tljqobbpih\":\"ovyrrleaesinu\"},\"id\":\"hcecybmrqbr\",\"name\":\"bbmpxdlvykfre\",\"type\":\"crse\"}"; + = "{\"properties\":{\"externalDeviceId\":\"hxiidlopedb\",\"endpoints\":{\"inbound\":{\"x\":{\"endpointType\":\"qyybxubmdnafcbq\",\"address\":\"remj\",\"version\":\"aqacigeleohd\",\"supportedAuthenticationMethods\":[\"Anonymous\",\"Anonymous\",\"Certificate\",\"Certificate\"],\"additionalConfiguration\":\"opwbeonrlkwzd\",\"lastUpdatedOn\":\"2021-11-15T17:26:10Z\"},\"inhmdptys\":{\"endpointType\":\"eakxcptsoqfyi\",\"address\":\"seqchkrt\",\"version\":\"razisg\",\"supportedAuthenticationMethods\":[\"Anonymous\",\"UsernamePassword\",\"Certificate\",\"UsernamePassword\"],\"additionalConfiguration\":\"nbwzohmnrxxbso\",\"lastUpdatedOn\":\"2021-01-19T09:33:12Z\"},\"dzbenri\":{\"endpointType\":\"rqsgnzx\",\"address\":\"jp\",\"version\":\"svjgpliufiqwoyxq\",\"supportedAuthenticationMethods\":[\"UsernamePassword\",\"UsernamePassword\",\"Certificate\",\"Certificate\"],\"additionalConfiguration\":\"ucqpqojxcxzrz\",\"lastUpdatedOn\":\"2021-06-25T21:59:34Z\"}},\"outbound\":{\"assigned\":{\"namtuatmzw\":{\"address\":\"wetzqddtjwfljh\"},\"cqtjzmi\":{\"address\":\"jj\"}}}},\"manufacturer\":\"gbgatzuuvbxn\",\"model\":\"ebwgga\",\"operatingSystem\":\"tzlswvaj\",\"operatingSystemVersion\":\"utlxjoqzasunwqrj\",\"attributes\":{},\"discoveryId\":\"gqhaohcmbuocn\",\"version\":51492514860144135,\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"bpyr\",\"name\":\"xameblydyvkfkm\"},\"location\":\"cxneh\",\"tags\":{\"fpyapucygvoavyu\":\"tod\",\"vpaseksgbu\":\"ssxlghieegjlg\"},\"id\":\"antuygdhgaqipirp\",\"name\":\"wrq\",\"type\":\"fulopmjnlexwhcb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -40,70 +40,62 @@ public void testCreateOrReplace() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - NamespaceDiscoveredDevice response - = manager.namespaceDiscoveredDevices() - .define("rryejylmbkzudnig") - .withRegion("uchlgmltx") - .withExistingNamespace("jk", "mykyujxsglhs") - .withExtendedLocation(new ExtendedLocation().withType("kolawjmjsmwrokc").withName("xfzzzwyjafitlhgu")) - .withTags(mapOf("pafolp", "mozusgzvlnsnnjz")) - .withProperties( - new NamespaceDiscoveredDeviceProperties().withExternalDeviceId("hotj") - .withEndpoints( - new DiscoveredMessagingEndpoints() - .withInbound(mapOf("ietgbebjfu", - new DiscoveredInboundEndpoints().withEndpointType("xuzzjgnrefq") - .withAddress("hqo") - .withVersion("ihiqakydiw") - .withSupportedAuthenticationMethods(Arrays.asList( - AuthenticationMethod.CERTIFICATE, AuthenticationMethod.ANONYMOUS, - AuthenticationMethod.CERTIFICATE, AuthenticationMethod.USERNAME_PASSWORD)) - .withAdditionalConfiguration("qtvhcspodaqax") - .withLastUpdatedOn(OffsetDateTime.parse("2021-11-02T02:37:56Z")), - "ggcvk", - new DiscoveredInboundEndpoints().withEndpointType("bmoichd") - .withAddress("pnfpubntnbat") - .withVersion("iqsowsaaelc") - .withSupportedAuthenticationMethods( - Arrays.asList(AuthenticationMethod.ANONYMOUS)) - .withAdditionalConfiguration("uhplrvkmjcwmjv") - .withLastUpdatedOn(OffsetDateTime.parse("2021-02-18T02:13:56Z")))) - .withOutbound(new DiscoveredOutboundEndpoints() - .withAssigned(mapOf("psfxsf", new DeviceMessagingEndpoint().withAddress("izrzb"), - "ukoveofi", new DeviceMessagingEndpoint().withAddress("ztlvtmvagbwidqlv"), "z", - new DeviceMessagingEndpoint().withAddress("rvjfnmjmvlw"), "lfojuidjp", - new DeviceMessagingEndpoint().withAddress("iblkujr"))))) - .withManufacturer("yjucejikzoeo") - .withModel("tzejetjklnt") - .withOperatingSystem("yjuzkdb") - .withOperatingSystemVersion("o") - .withAttributes(mapOf()) - .withDiscoveryId("zvhqjwtrhtgvg") - .withVersion(4723059854814602691L)) - .create(); + NamespaceDiscoveredDevice response = manager.namespaceDiscoveredDevices() + .define("xtwbta") + .withRegion("k") + .withExistingNamespace("lzgaufcshhvnew", "nxkympqanxrjk") + .withExtendedLocation(new ExtendedLocation().withType("gwwrxaomzis").withName("lrrcz")) + .withTags(mapOf("aw", "tnjadhq")) + .withProperties(new NamespaceDiscoveredDeviceProperties().withExternalDeviceId("nyghshxcylhkgmn") + .withEndpoints(new DiscoveredMessagingEndpoints() + .withInbound(mapOf("obkdqzrdzsyl", + new DiscoveredInboundEndpoints().withEndpointType("xycphdrwjjkh") + .withAddress("yomacluzvxnqm") + .withVersion("pqpdfwmkoisqc") + .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.CERTIFICATE)) + .withAdditionalConfiguration("uifmc") + .withLastUpdatedOn(OffsetDateTime.parse("2021-03-21T06:41:36Z")), + "dcoxnbk", + new DiscoveredInboundEndpoints().withEndpointType("llg") + .withAddress("rc") + .withVersion("ydmxzj") + .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.CERTIFICATE)) + .withAdditionalConfiguration("aurkihcirlde") + .withLastUpdatedOn(OffsetDateTime.parse("2021-08-25T17:41:41Z")))) + .withOutbound(new DiscoveredOutboundEndpoints() + .withAssigned(mapOf("nqbpi", new DeviceMessagingEndpoint().withAddress("nurnnq"), + "gypxrxvbfihwuhvc", new DeviceMessagingEndpoint().withAddress("xqltgrd"))))) + .withManufacturer("fsrb") + .withModel("blml") + .withOperatingSystem("wxihs") + .withOperatingSystemVersion("xwqagnepzw") + .withAttributes(mapOf()) + .withDiscoveryId("sbs") + .withVersion(6558908859438336972L)) + .create(); - Assertions.assertEquals("wskondcbrwimuvqe", response.location()); - Assertions.assertEquals("ovyrrleaesinu", response.tags().get("tljqobbpih")); - Assertions.assertEquals("zlanrupdwvnph", response.properties().externalDeviceId()); - Assertions.assertEquals("tpjhm", response.properties().endpoints().inbound().get("pxy").endpointType()); - Assertions.assertEquals("rhv", response.properties().endpoints().inbound().get("pxy").address()); - Assertions.assertEquals("laiwdcxsmlzzh", response.properties().endpoints().inbound().get("pxy").version()); - Assertions.assertEquals(AuthenticationMethod.USERNAME_PASSWORD, - response.properties().endpoints().inbound().get("pxy").supportedAuthenticationMethods().get(0)); - Assertions.assertEquals("gydlhqv", - response.properties().endpoints().inbound().get("pxy").additionalConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-07T23:31:59Z"), - response.properties().endpoints().inbound().get("pxy").lastUpdatedOn()); - Assertions.assertEquals("iqge", - response.properties().endpoints().outbound().assigned().get("arbgjekgl").address()); - Assertions.assertEquals("spzhzmtksjc", response.properties().manufacturer()); - Assertions.assertEquals("digsxcdgl", response.properties().model()); - Assertions.assertEquals("lkeuac", response.properties().operatingSystem()); - Assertions.assertEquals("omflrytswfp", response.properties().operatingSystemVersion()); - Assertions.assertEquals("gycxnmskwhqjjys", response.properties().discoveryId()); - Assertions.assertEquals(7889594370600381712L, response.properties().version()); - Assertions.assertEquals("shhkvpedw", response.extendedLocation().type()); - Assertions.assertEquals("slsrhmpq", response.extendedLocation().name()); + Assertions.assertEquals("cxneh", response.location()); + Assertions.assertEquals("tod", response.tags().get("fpyapucygvoavyu")); + Assertions.assertEquals("hxiidlopedb", response.properties().externalDeviceId()); + Assertions.assertEquals("qyybxubmdnafcbq", response.properties().endpoints().inbound().get("x").endpointType()); + Assertions.assertEquals("remj", response.properties().endpoints().inbound().get("x").address()); + Assertions.assertEquals("aqacigeleohd", response.properties().endpoints().inbound().get("x").version()); + Assertions.assertEquals(AuthenticationMethod.ANONYMOUS, + response.properties().endpoints().inbound().get("x").supportedAuthenticationMethods().get(0)); + Assertions.assertEquals("opwbeonrlkwzd", + response.properties().endpoints().inbound().get("x").additionalConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-15T17:26:10Z"), + response.properties().endpoints().inbound().get("x").lastUpdatedOn()); + Assertions.assertEquals("wetzqddtjwfljh", + response.properties().endpoints().outbound().assigned().get("namtuatmzw").address()); + Assertions.assertEquals("gbgatzuuvbxn", response.properties().manufacturer()); + Assertions.assertEquals("ebwgga", response.properties().model()); + Assertions.assertEquals("tzlswvaj", response.properties().operatingSystem()); + Assertions.assertEquals("utlxjoqzasunwqrj", response.properties().operatingSystemVersion()); + Assertions.assertEquals("gqhaohcmbuocn", response.properties().discoveryId()); + Assertions.assertEquals(51492514860144135L, response.properties().version()); + Assertions.assertEquals("bpyr", response.extendedLocation().type()); + Assertions.assertEquals("xameblydyvkfkm", response.extendedLocation().name()); } // Use "Map.of" if available diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDevicesGetWithResponseMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDevicesGetWithResponseMockTests.java index 857b749782ab..7a20d660aac4 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDevicesGetWithResponseMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDevicesGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class NamespaceDiscoveredDevicesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"externalDeviceId\":\"ttvwkpqh\",\"endpoints\":{\"inbound\":{\"njqikcz\":{\"endpointType\":\"uygb\",\"address\":\"eqqe\",\"version\":\"wv\",\"supportedAuthenticationMethods\":[\"Anonymous\",\"UsernamePassword\"],\"additionalConfiguration\":\"guaucmfdjwnla\",\"lastUpdatedOn\":\"2021-11-24T18:23:37Z\"},\"chrszi\":{\"endpointType\":\"vitac\",\"address\":\"xmfcsserxhtv\",\"version\":\"xhlw\",\"supportedAuthenticationMethods\":[\"Certificate\",\"Anonymous\",\"Anonymous\"],\"additionalConfiguration\":\"sxypruuu\",\"lastUpdatedOn\":\"2021-03-03T11:10:41Z\"},\"hkpigqfusuckzmkw\":{\"endpointType\":\"oyuelyetn\",\"address\":\"nb\",\"version\":\"yggagflnlgmt\",\"supportedAuthenticationMethods\":[\"Certificate\",\"Anonymous\",\"Certificate\"],\"additionalConfiguration\":\"ucftbyrp\",\"lastUpdatedOn\":\"2020-12-22T05:32:19Z\"},\"hp\":{\"endpointType\":\"lsnoxaxmqeqalh\",\"address\":\"jnhgwydyyn\",\"version\":\"vkh\",\"supportedAuthenticationMethods\":[\"Certificate\",\"Anonymous\",\"Certificate\",\"UsernamePassword\"],\"additionalConfiguration\":\"rfdl\",\"lastUpdatedOn\":\"2021-05-07T13:36:52Z\"}},\"outbound\":{\"assigned\":{\"ro\":{\"address\":\"eizjcpeogkhnmg\"},\"zoyw\":{\"address\":\"xddbhfhpfpaz\"}}}},\"manufacturer\":\"hpdulon\",\"model\":\"cnpqwteht\",\"operatingSystem\":\"vrh\",\"operatingSystemVersion\":\"jyoogwxh\",\"attributes\":{},\"discoveryId\":\"uug\",\"version\":4498449621335160642,\"provisioningState\":\"Deleting\"},\"extendedLocation\":{\"type\":\"urfqkfuare\",\"name\":\"lvhhtklnvn\"},\"location\":\"vvkyfedevjboslcq\",\"tags\":{\"ymc\":\"okkhminq\"},\"id\":\"ngnbdxxew\",\"name\":\"ninvudbchaqdt\",\"type\":\"qecrqctmxx\"}"; + = "{\"properties\":{\"externalDeviceId\":\"bv\",\"endpoints\":{\"inbound\":{\"tbw\":{\"endpointType\":\"y\",\"address\":\"rhpw\",\"version\":\"ddei\",\"supportedAuthenticationMethods\":[\"Anonymous\",\"Anonymous\"],\"additionalConfiguration\":\"gkkumuikjcj\",\"lastUpdatedOn\":\"2021-05-27T02:24:48Z\"}},\"outbound\":{\"assigned\":{\"ikytwvczcswka\":{\"address\":\"qowxwcom\"},\"yfdvlvhbwrnfxtgd\":{\"address\":\"ve\"}}}},\"manufacturer\":\"qthe\",\"model\":\"mnaoy\",\"operatingSystem\":\"kcoeqswank\",\"operatingSystemVersion\":\"ytmhdroznnhdrlkt\",\"attributes\":{},\"discoveryId\":\"sggux\",\"version\":3084216658070710977,\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"ywaeeczgf\",\"name\":\"ukklelss\"},\"location\":\"lycsxz\",\"tags\":{\"sqplpvmjcd\":\"srlsmd\"},\"id\":\"ewbidyvteowxv\",\"name\":\"piudeugfsxzecpa\",\"type\":\"wkufykhvuhxepm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,30 +32,30 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NamespaceDiscoveredDevice response = manager.namespaceDiscoveredDevices() - .getWithResponse("sfikayiansharuj", "ji", "xfz", com.azure.core.util.Context.NONE) + .getWithResponse("xog", "ggsvoujkxibdaf", "rkmdyom", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("vvkyfedevjboslcq", response.location()); - Assertions.assertEquals("okkhminq", response.tags().get("ymc")); - Assertions.assertEquals("ttvwkpqh", response.properties().externalDeviceId()); - Assertions.assertEquals("uygb", response.properties().endpoints().inbound().get("njqikcz").endpointType()); - Assertions.assertEquals("eqqe", response.properties().endpoints().inbound().get("njqikcz").address()); - Assertions.assertEquals("wv", response.properties().endpoints().inbound().get("njqikcz").version()); + Assertions.assertEquals("lycsxz", response.location()); + Assertions.assertEquals("srlsmd", response.tags().get("sqplpvmjcd")); + Assertions.assertEquals("bv", response.properties().externalDeviceId()); + Assertions.assertEquals("y", response.properties().endpoints().inbound().get("tbw").endpointType()); + Assertions.assertEquals("rhpw", response.properties().endpoints().inbound().get("tbw").address()); + Assertions.assertEquals("ddei", response.properties().endpoints().inbound().get("tbw").version()); Assertions.assertEquals(AuthenticationMethod.ANONYMOUS, - response.properties().endpoints().inbound().get("njqikcz").supportedAuthenticationMethods().get(0)); - Assertions.assertEquals("guaucmfdjwnla", - response.properties().endpoints().inbound().get("njqikcz").additionalConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-24T18:23:37Z"), - response.properties().endpoints().inbound().get("njqikcz").lastUpdatedOn()); - Assertions.assertEquals("eizjcpeogkhnmg", - response.properties().endpoints().outbound().assigned().get("ro").address()); - Assertions.assertEquals("hpdulon", response.properties().manufacturer()); - Assertions.assertEquals("cnpqwteht", response.properties().model()); - Assertions.assertEquals("vrh", response.properties().operatingSystem()); - Assertions.assertEquals("jyoogwxh", response.properties().operatingSystemVersion()); - Assertions.assertEquals("uug", response.properties().discoveryId()); - Assertions.assertEquals(4498449621335160642L, response.properties().version()); - Assertions.assertEquals("urfqkfuare", response.extendedLocation().type()); - Assertions.assertEquals("lvhhtklnvn", response.extendedLocation().name()); + response.properties().endpoints().inbound().get("tbw").supportedAuthenticationMethods().get(0)); + Assertions.assertEquals("gkkumuikjcj", + response.properties().endpoints().inbound().get("tbw").additionalConfiguration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-27T02:24:48Z"), + response.properties().endpoints().inbound().get("tbw").lastUpdatedOn()); + Assertions.assertEquals("qowxwcom", + response.properties().endpoints().outbound().assigned().get("ikytwvczcswka").address()); + Assertions.assertEquals("qthe", response.properties().manufacturer()); + Assertions.assertEquals("mnaoy", response.properties().model()); + Assertions.assertEquals("kcoeqswank", response.properties().operatingSystem()); + Assertions.assertEquals("ytmhdroznnhdrlkt", response.properties().operatingSystemVersion()); + Assertions.assertEquals("sggux", response.properties().discoveryId()); + Assertions.assertEquals(3084216658070710977L, response.properties().version()); + Assertions.assertEquals("ywaeeczgf", response.extendedLocation().type()); + Assertions.assertEquals("ukklelss", response.extendedLocation().name()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDevicesListByResourceGroupMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDevicesListByResourceGroupMockTests.java index 30451a2c3faa..544667c5c220 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDevicesListByResourceGroupMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredDevicesListByResourceGroupMockTests.java @@ -23,7 +23,7 @@ public final class NamespaceDiscoveredDevicesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"externalDeviceId\":\"bannovvoxczytp\",\"endpoints\":{\"inbound\":{\"bzxliohrdddtfgxq\":{\"endpointType\":\"vroevytlyo\",\"address\":\"rrrouuxvnsa\",\"version\":\"crymodizrxklobd\",\"supportedAuthenticationMethods\":[\"UsernamePassword\",\"Certificate\",\"UsernamePassword\"],\"additionalConfiguration\":\"mlmvevfxzo\",\"lastUpdatedOn\":\"2021-11-27T07:57:43Z\"},\"dmhm\":{\"endpointType\":\"awpcbbnzqcykn\",\"address\":\"p\",\"version\":\"fyuicdh\",\"supportedAuthenticationMethods\":[\"UsernamePassword\"],\"additionalConfiguration\":\"wwgbdv\",\"lastUpdatedOn\":\"2021-03-28T14:58:27Z\"},\"bragapyyrmf\":{\"endpointType\":\"ffplfmuvapckcc\",\"address\":\"rv\",\"version\":\"yoxoy\",\"supportedAuthenticationMethods\":[\"UsernamePassword\"],\"additionalConfiguration\":\"aimmoiroqb\",\"lastUpdatedOn\":\"2021-04-15T04:47:34Z\"},\"nbldxeaclgschori\":{\"endpointType\":\"vbpavbopfppdbw\",\"address\":\"upgahxkum\",\"version\":\"jcaacfdmmcpugm\",\"supportedAuthenticationMethods\":[\"UsernamePassword\",\"Anonymous\",\"Anonymous\"],\"additionalConfiguration\":\"fhbzehewhoqhn\",\"lastUpdatedOn\":\"2021-03-29T02:42:53Z\"}},\"outbound\":{\"assigned\":{\"ucsofldpuviyf\":{\"address\":\"srrm\"},\"bsxtkcudfbsfarfs\":{\"address\":\"aabeolhbhlvbmxuq\"},\"gf\":{\"address\":\"owlkjxnqpv\"},\"d\":{\"address\":\"tmhqykiz\"}}}},\"manufacturer\":\"aoaf\",\"model\":\"uqvoxmycjimryv\",\"operatingSystem\":\"cwwp\",\"operatingSystemVersion\":\"zgwe\",\"attributes\":{},\"discoveryId\":\"sxwef\",\"version\":3478912566983097711,\"provisioningState\":\"Canceled\"},\"extendedLocation\":{\"type\":\"vopwndyqleallk\",\"name\":\"mtkhlowkxxpvbr\"},\"location\":\"jmzsyzfh\",\"tags\":{\"k\":\"h\",\"nsjlpjrtws\":\"yych\",\"uic\":\"hv\",\"ubhvj\":\"hvtrrmhwrbfdpyf\"},\"id\":\"lrocuyzlwh\",\"name\":\"memhooclutnpq\",\"type\":\"emc\"}]}"; + = "{\"value\":[{\"properties\":{\"externalDeviceId\":\"ywart\",\"endpoints\":{\"inbound\":{\"totiowlxteqdptjg\":{\"endpointType\":\"kixkykxdssjpemm\",\"address\":\"cfxhikkflrmy\",\"version\":\"incqlhriswsl\",\"supportedAuthenticationMethods\":[\"Certificate\",\"Anonymous\",\"Certificate\"],\"additionalConfiguration\":\"qcgxuug\",\"lastUpdatedOn\":\"2021-03-05T05:58:38Z\"},\"d\":{\"endpointType\":\"dtguk\",\"address\":\"anblwphqlkccu\",\"version\":\"ygqwahoiu\",\"supportedAuthenticationMethods\":[\"Certificate\",\"Anonymous\",\"UsernamePassword\"],\"additionalConfiguration\":\"rglvaw\",\"lastUpdatedOn\":\"2021-07-24T11:19:34Z\"},\"tefjoknssqyzq\":{\"endpointType\":\"fypiv\",\"address\":\"sbbjpmcu\",\"version\":\"mifoxxkub\",\"supportedAuthenticationMethods\":[\"Anonymous\",\"Anonymous\",\"Certificate\",\"UsernamePassword\"],\"additionalConfiguration\":\"brbqgvgovp\",\"lastUpdatedOn\":\"2021-04-13T05:47:21Z\"}},\"outbound\":{\"assigned\":{\"lg\":{\"address\":\"kdfrdbiqmrjgeihf\"}}}},\"manufacturer\":\"fiwzcxmjpbyep\",\"model\":\"gt\",\"operatingSystem\":\"j\",\"operatingSystemVersion\":\"cmyfqipgxhnpo\",\"attributes\":{},\"discoveryId\":\"wcabvnuileeya\",\"version\":8457400905561321165,\"provisioningState\":\"Canceled\"},\"extendedLocation\":{\"type\":\"ugmrmf\",\"name\":\"lrxw\"},\"location\":\"aukhfkvcisiz\",\"tags\":{\"jwuive\":\"eds\"},\"id\":\"wcgyeewxeiqb\",\"name\":\"smgomguaml\",\"type\":\"dlrgms\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,45 +33,45 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<NamespaceDiscoveredDevice> response = manager.namespaceDiscoveredDevices() - .listByResourceGroup("tddmf", "huytxzvtzn", com.azure.core.util.Context.NONE); + .listByResourceGroup("utznabaobns", "ujdjltymkmvg", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jmzsyzfh", response.iterator().next().location()); - Assertions.assertEquals("h", response.iterator().next().tags().get("k")); - Assertions.assertEquals("bannovvoxczytp", response.iterator().next().properties().externalDeviceId()); - Assertions.assertEquals("vroevytlyo", - response.iterator().next().properties().endpoints().inbound().get("bzxliohrdddtfgxq").endpointType()); - Assertions.assertEquals("rrrouuxvnsa", - response.iterator().next().properties().endpoints().inbound().get("bzxliohrdddtfgxq").address()); - Assertions.assertEquals("crymodizrxklobd", - response.iterator().next().properties().endpoints().inbound().get("bzxliohrdddtfgxq").version()); - Assertions.assertEquals(AuthenticationMethod.USERNAME_PASSWORD, + Assertions.assertEquals("aukhfkvcisiz", response.iterator().next().location()); + Assertions.assertEquals("eds", response.iterator().next().tags().get("jwuive")); + Assertions.assertEquals("ywart", response.iterator().next().properties().externalDeviceId()); + Assertions.assertEquals("kixkykxdssjpemm", + response.iterator().next().properties().endpoints().inbound().get("totiowlxteqdptjg").endpointType()); + Assertions.assertEquals("cfxhikkflrmy", + response.iterator().next().properties().endpoints().inbound().get("totiowlxteqdptjg").address()); + Assertions.assertEquals("incqlhriswsl", + response.iterator().next().properties().endpoints().inbound().get("totiowlxteqdptjg").version()); + Assertions.assertEquals(AuthenticationMethod.CERTIFICATE, response.iterator() .next() .properties() .endpoints() .inbound() - .get("bzxliohrdddtfgxq") + .get("totiowlxteqdptjg") .supportedAuthenticationMethods() .get(0)); - Assertions.assertEquals("mlmvevfxzo", + Assertions.assertEquals("qcgxuug", response.iterator() .next() .properties() .endpoints() .inbound() - .get("bzxliohrdddtfgxq") + .get("totiowlxteqdptjg") .additionalConfiguration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-27T07:57:43Z"), - response.iterator().next().properties().endpoints().inbound().get("bzxliohrdddtfgxq").lastUpdatedOn()); - Assertions.assertEquals("srrm", - response.iterator().next().properties().endpoints().outbound().assigned().get("ucsofldpuviyf").address()); - Assertions.assertEquals("aoaf", response.iterator().next().properties().manufacturer()); - Assertions.assertEquals("uqvoxmycjimryv", response.iterator().next().properties().model()); - Assertions.assertEquals("cwwp", response.iterator().next().properties().operatingSystem()); - Assertions.assertEquals("zgwe", response.iterator().next().properties().operatingSystemVersion()); - Assertions.assertEquals("sxwef", response.iterator().next().properties().discoveryId()); - Assertions.assertEquals(3478912566983097711L, response.iterator().next().properties().version()); - Assertions.assertEquals("vopwndyqleallk", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("mtkhlowkxxpvbr", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-05T05:58:38Z"), + response.iterator().next().properties().endpoints().inbound().get("totiowlxteqdptjg").lastUpdatedOn()); + Assertions.assertEquals("kdfrdbiqmrjgeihf", + response.iterator().next().properties().endpoints().outbound().assigned().get("lg").address()); + Assertions.assertEquals("fiwzcxmjpbyep", response.iterator().next().properties().manufacturer()); + Assertions.assertEquals("gt", response.iterator().next().properties().model()); + Assertions.assertEquals("j", response.iterator().next().properties().operatingSystem()); + Assertions.assertEquals("cmyfqipgxhnpo", response.iterator().next().properties().operatingSystemVersion()); + Assertions.assertEquals("wcabvnuileeya", response.iterator().next().properties().discoveryId()); + Assertions.assertEquals(8457400905561321165L, response.iterator().next().properties().version()); + Assertions.assertEquals("ugmrmf", response.iterator().next().extendedLocation().type()); + Assertions.assertEquals("lrxw", response.iterator().next().extendedLocation().name()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredEventGroupTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredEventGroupTests.java index ce3f81dfec13..81d252413a18 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredEventGroupTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredEventGroupTests.java @@ -16,61 +16,62 @@ public final class NamespaceDiscoveredEventGroupTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceDiscoveredEventGroup model = BinaryData.fromString( - "{\"name\":\"khazxkhnzbonlwn\",\"dataSource\":\"egokdwbwhkszzcmr\",\"eventGroupConfiguration\":\"xztvbtqgsfraoyzk\",\"defaultDestinations\":[{\"target\":\"EventDestination\"}],\"typeRef\":\"lmnguxaw\",\"events\":[{\"name\":\"dsyuuximerqfob\",\"dataSource\":\"znkbykutwpfhpagm\",\"eventConfiguration\":\"skdsnfdsdoakg\",\"destinations\":[{\"target\":\"EventDestination\"}],\"typeRef\":\"kkze\",\"lastUpdatedOn\":\"2020-12-20T17:30:39Z\"},{\"name\":\"hewpusdsttwv\",\"dataSource\":\"vbbejdcng\",\"eventConfiguration\":\"m\",\"destinations\":[{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"}],\"typeRef\":\"fgmjzrwrdgrt\",\"lastUpdatedOn\":\"2021-08-17T18:50:12Z\"},{\"name\":\"nuuzkopbm\",\"dataSource\":\"rfdwoyu\",\"eventConfiguration\":\"ziuiefozbhdm\",\"destinations\":[{\"target\":\"EventDestination\"}],\"typeRef\":\"zqhof\",\"lastUpdatedOn\":\"2021-05-05T04:42:21Z\"},{\"name\":\"ae\",\"dataSource\":\"iahxicsl\",\"eventConfiguration\":\"oqzpiyylha\",\"destinations\":[{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"}],\"typeRef\":\"hc\",\"lastUpdatedOn\":\"2021-04-28T09:04:54Z\"}]}") + "{\"name\":\"yqtfihwh\",\"dataSource\":\"tzingamvpph\",\"eventGroupConfiguration\":\"zqzudph\",\"defaultDestinations\":[{\"target\":\"EventDestination\"}],\"typeRef\":\"dkfw\",\"events\":[{\"name\":\"cvtbv\",\"dataSource\":\"yhmtnvyqiat\",\"eventConfiguration\":\"wp\",\"destinations\":[{\"target\":\"EventDestination\"}],\"typeRef\":\"zcjaesgvvsccy\",\"lastUpdatedOn\":\"2021-01-01T20:15:01Z\"},{\"name\":\"uq\",\"dataSource\":\"wygzlvdnkfxusem\",\"eventConfiguration\":\"zrmuhapfcqdps\",\"destinations\":[{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"}],\"typeRef\":\"psvuoymgc\",\"lastUpdatedOn\":\"2021-08-18T08:31:36Z\"},{\"name\":\"vezrypqlmfeo\",\"dataSource\":\"rqwky\",\"eventConfiguration\":\"ob\",\"destinations\":[{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"}],\"typeRef\":\"edkowepbqpcrfk\",\"lastUpdatedOn\":\"2021-08-28T15:47:36Z\"},{\"name\":\"csnjvcdwxlpqekft\",\"dataSource\":\"htjsying\",\"eventConfiguration\":\"qatmtdhtmdvy\",\"destinations\":[{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"}],\"typeRef\":\"dgszywkbirryuzh\",\"lastUpdatedOn\":\"2021-06-25T00:54:57Z\"}]}") .toObject(NamespaceDiscoveredEventGroup.class); - Assertions.assertEquals("khazxkhnzbonlwn", model.name()); - Assertions.assertEquals("egokdwbwhkszzcmr", model.dataSource()); - Assertions.assertEquals("xztvbtqgsfraoyzk", model.eventGroupConfiguration()); - Assertions.assertEquals("lmnguxaw", model.typeRef()); - Assertions.assertEquals("dsyuuximerqfob", model.events().get(0).name()); - Assertions.assertEquals("znkbykutwpfhpagm", model.events().get(0).dataSource()); - Assertions.assertEquals("skdsnfdsdoakg", model.events().get(0).eventConfiguration()); - Assertions.assertEquals("kkze", model.events().get(0).typeRef()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-20T17:30:39Z"), model.events().get(0).lastUpdatedOn()); + Assertions.assertEquals("yqtfihwh", model.name()); + Assertions.assertEquals("tzingamvpph", model.dataSource()); + Assertions.assertEquals("zqzudph", model.eventGroupConfiguration()); + Assertions.assertEquals("dkfw", model.typeRef()); + Assertions.assertEquals("cvtbv", model.events().get(0).name()); + Assertions.assertEquals("yhmtnvyqiat", model.events().get(0).dataSource()); + Assertions.assertEquals("wp", model.events().get(0).eventConfiguration()); + Assertions.assertEquals("zcjaesgvvsccy", model.events().get(0).typeRef()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T20:15:01Z"), model.events().get(0).lastUpdatedOn()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamespaceDiscoveredEventGroup model = new NamespaceDiscoveredEventGroup().withName("khazxkhnzbonlwn") - .withDataSource("egokdwbwhkszzcmr") - .withEventGroupConfiguration("xztvbtqgsfraoyzk") + NamespaceDiscoveredEventGroup model = new NamespaceDiscoveredEventGroup().withName("yqtfihwh") + .withDataSource("tzingamvpph") + .withEventGroupConfiguration("zqzudph") .withDefaultDestinations(Arrays.asList(new EventDestination())) - .withTypeRef("lmnguxaw") + .withTypeRef("dkfw") .withEvents(Arrays.asList( - new NamespaceDiscoveredEvent().withName("dsyuuximerqfob") - .withDataSource("znkbykutwpfhpagm") - .withEventConfiguration("skdsnfdsdoakg") + new NamespaceDiscoveredEvent().withName("cvtbv") + .withDataSource("yhmtnvyqiat") + .withEventConfiguration("wp") .withDestinations(Arrays.asList(new EventDestination())) - .withTypeRef("kkze") - .withLastUpdatedOn(OffsetDateTime.parse("2020-12-20T17:30:39Z")), - new NamespaceDiscoveredEvent().withName("hewpusdsttwv") - .withDataSource("vbbejdcng") - .withEventConfiguration("m") + .withTypeRef("zcjaesgvvsccy") + .withLastUpdatedOn(OffsetDateTime.parse("2021-01-01T20:15:01Z")), + new NamespaceDiscoveredEvent().withName("uq") + .withDataSource("wygzlvdnkfxusem") + .withEventConfiguration("zrmuhapfcqdps") + .withDestinations( + Arrays.asList(new EventDestination(), new EventDestination(), new EventDestination())) + .withTypeRef("psvuoymgc") + .withLastUpdatedOn(OffsetDateTime.parse("2021-08-18T08:31:36Z")), + new NamespaceDiscoveredEvent().withName("vezrypqlmfeo") + .withDataSource("rqwky") + .withEventConfiguration("ob") .withDestinations(Arrays.asList(new EventDestination(), new EventDestination())) - .withTypeRef("fgmjzrwrdgrt") - .withLastUpdatedOn(OffsetDateTime.parse("2021-08-17T18:50:12Z")), - new NamespaceDiscoveredEvent().withName("nuuzkopbm") - .withDataSource("rfdwoyu") - .withEventConfiguration("ziuiefozbhdm") - .withDestinations(Arrays.asList(new EventDestination())) - .withTypeRef("zqhof") - .withLastUpdatedOn(OffsetDateTime.parse("2021-05-05T04:42:21Z")), - new NamespaceDiscoveredEvent().withName("ae") - .withDataSource("iahxicsl") - .withEventConfiguration("oqzpiyylha") + .withTypeRef("edkowepbqpcrfk") + .withLastUpdatedOn(OffsetDateTime.parse("2021-08-28T15:47:36Z")), + new NamespaceDiscoveredEvent().withName("csnjvcdwxlpqekft") + .withDataSource("htjsying") + .withEventConfiguration("qatmtdhtmdvy") .withDestinations( Arrays.asList(new EventDestination(), new EventDestination(), new EventDestination())) - .withTypeRef("hc") - .withLastUpdatedOn(OffsetDateTime.parse("2021-04-28T09:04:54Z")))); + .withTypeRef("dgszywkbirryuzh") + .withLastUpdatedOn(OffsetDateTime.parse("2021-06-25T00:54:57Z")))); model = BinaryData.fromObject(model).toObject(NamespaceDiscoveredEventGroup.class); - Assertions.assertEquals("khazxkhnzbonlwn", model.name()); - Assertions.assertEquals("egokdwbwhkszzcmr", model.dataSource()); - Assertions.assertEquals("xztvbtqgsfraoyzk", model.eventGroupConfiguration()); - Assertions.assertEquals("lmnguxaw", model.typeRef()); - Assertions.assertEquals("dsyuuximerqfob", model.events().get(0).name()); - Assertions.assertEquals("znkbykutwpfhpagm", model.events().get(0).dataSource()); - Assertions.assertEquals("skdsnfdsdoakg", model.events().get(0).eventConfiguration()); - Assertions.assertEquals("kkze", model.events().get(0).typeRef()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-20T17:30:39Z"), model.events().get(0).lastUpdatedOn()); + Assertions.assertEquals("yqtfihwh", model.name()); + Assertions.assertEquals("tzingamvpph", model.dataSource()); + Assertions.assertEquals("zqzudph", model.eventGroupConfiguration()); + Assertions.assertEquals("dkfw", model.typeRef()); + Assertions.assertEquals("cvtbv", model.events().get(0).name()); + Assertions.assertEquals("yhmtnvyqiat", model.events().get(0).dataSource()); + Assertions.assertEquals("wp", model.events().get(0).eventConfiguration()); + Assertions.assertEquals("zcjaesgvvsccy", model.events().get(0).typeRef()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T20:15:01Z"), model.events().get(0).lastUpdatedOn()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredEventTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredEventTests.java index 3c894722b659..ef37ec58873b 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredEventTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredEventTests.java @@ -15,28 +15,29 @@ public final class NamespaceDiscoveredEventTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceDiscoveredEvent model = BinaryData.fromString( - "{\"name\":\"hka\",\"dataSource\":\"witqscywuggwoluh\",\"eventConfiguration\":\"bwemhairs\",\"destinations\":[{\"target\":\"EventDestination\"}],\"typeRef\":\"dwmsweypqwd\",\"lastUpdatedOn\":\"2021-03-07T15:59:58Z\"}") + "{\"name\":\"joqrvqqaatj\",\"dataSource\":\"rv\",\"eventConfiguration\":\"upmfiibfg\",\"destinations\":[{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"}],\"typeRef\":\"olvrw\",\"lastUpdatedOn\":\"2021-05-18T06:59:06Z\"}") .toObject(NamespaceDiscoveredEvent.class); - Assertions.assertEquals("hka", model.name()); - Assertions.assertEquals("witqscywuggwoluh", model.dataSource()); - Assertions.assertEquals("bwemhairs", model.eventConfiguration()); - Assertions.assertEquals("dwmsweypqwd", model.typeRef()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-07T15:59:58Z"), model.lastUpdatedOn()); + Assertions.assertEquals("joqrvqqaatj", model.name()); + Assertions.assertEquals("rv", model.dataSource()); + Assertions.assertEquals("upmfiibfg", model.eventConfiguration()); + Assertions.assertEquals("olvrw", model.typeRef()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-18T06:59:06Z"), model.lastUpdatedOn()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamespaceDiscoveredEvent model = new NamespaceDiscoveredEvent().withName("hka") - .withDataSource("witqscywuggwoluh") - .withEventConfiguration("bwemhairs") - .withDestinations(Arrays.asList(new EventDestination())) - .withTypeRef("dwmsweypqwd") - .withLastUpdatedOn(OffsetDateTime.parse("2021-03-07T15:59:58Z")); + NamespaceDiscoveredEvent model = new NamespaceDiscoveredEvent().withName("joqrvqqaatj") + .withDataSource("rv") + .withEventConfiguration("upmfiibfg") + .withDestinations(Arrays.asList(new EventDestination(), new EventDestination(), new EventDestination(), + new EventDestination())) + .withTypeRef("olvrw") + .withLastUpdatedOn(OffsetDateTime.parse("2021-05-18T06:59:06Z")); model = BinaryData.fromObject(model).toObject(NamespaceDiscoveredEvent.class); - Assertions.assertEquals("hka", model.name()); - Assertions.assertEquals("witqscywuggwoluh", model.dataSource()); - Assertions.assertEquals("bwemhairs", model.eventConfiguration()); - Assertions.assertEquals("dwmsweypqwd", model.typeRef()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-07T15:59:58Z"), model.lastUpdatedOn()); + Assertions.assertEquals("joqrvqqaatj", model.name()); + Assertions.assertEquals("rv", model.dataSource()); + Assertions.assertEquals("upmfiibfg", model.eventConfiguration()); + Assertions.assertEquals("olvrw", model.typeRef()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-18T06:59:06Z"), model.lastUpdatedOn()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredManagementActionTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredManagementActionTests.java index 6143056f9e35..5de8e35220b5 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredManagementActionTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredManagementActionTests.java @@ -14,36 +14,37 @@ public final class NamespaceDiscoveredManagementActionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceDiscoveredManagementAction model = BinaryData.fromString( - "{\"name\":\"dvncjabudurgk\",\"actionConfiguration\":\"mokzhjjklf\",\"targetUri\":\"hmouwqlgzrfze\",\"typeRef\":\"ebizikayuh\",\"topic\":\"bjbsybb\",\"actionType\":\"Write\",\"timeoutInSeconds\":146564330,\"lastUpdatedOn\":\"2021-08-07T02:44:31Z\"}") + "{\"name\":\"tnqttezlwfffiak\",\"actionConfiguration\":\"pqqmted\",\"targetUri\":\"tmmjihyeozph\",\"typeRef\":\"auyqncygupkv\",\"topic\":\"mdscwxqupev\",\"actionType\":\"Write\",\"timeoutInSeconds\":434974760,\"lastUpdatedOn\":\"2021-10-10T08:16:26Z\"}") .toObject(NamespaceDiscoveredManagementAction.class); - Assertions.assertEquals("dvncjabudurgk", model.name()); - Assertions.assertEquals("mokzhjjklf", model.actionConfiguration()); - Assertions.assertEquals("hmouwqlgzrfze", model.targetUri()); - Assertions.assertEquals("ebizikayuh", model.typeRef()); - Assertions.assertEquals("bjbsybb", model.topic()); + Assertions.assertEquals("tnqttezlwfffiak", model.name()); + Assertions.assertEquals("pqqmted", model.actionConfiguration()); + Assertions.assertEquals("tmmjihyeozph", model.targetUri()); + Assertions.assertEquals("auyqncygupkv", model.typeRef()); + Assertions.assertEquals("mdscwxqupev", model.topic()); Assertions.assertEquals(NamespaceDiscoveredManagementActionType.WRITE, model.actionType()); - Assertions.assertEquals(146564330, model.timeoutInSeconds()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-07T02:44:31Z"), model.lastUpdatedOn()); + Assertions.assertEquals(434974760, model.timeoutInSeconds()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-10T08:16:26Z"), model.lastUpdatedOn()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamespaceDiscoveredManagementAction model = new NamespaceDiscoveredManagementAction().withName("dvncjabudurgk") - .withActionConfiguration("mokzhjjklf") - .withTargetUri("hmouwqlgzrfze") - .withTypeRef("ebizikayuh") - .withTopic("bjbsybb") - .withActionType(NamespaceDiscoveredManagementActionType.WRITE) - .withTimeoutInSeconds(146564330) - .withLastUpdatedOn(OffsetDateTime.parse("2021-08-07T02:44:31Z")); + NamespaceDiscoveredManagementAction model + = new NamespaceDiscoveredManagementAction().withName("tnqttezlwfffiak") + .withActionConfiguration("pqqmted") + .withTargetUri("tmmjihyeozph") + .withTypeRef("auyqncygupkv") + .withTopic("mdscwxqupev") + .withActionType(NamespaceDiscoveredManagementActionType.WRITE) + .withTimeoutInSeconds(434974760) + .withLastUpdatedOn(OffsetDateTime.parse("2021-10-10T08:16:26Z")); model = BinaryData.fromObject(model).toObject(NamespaceDiscoveredManagementAction.class); - Assertions.assertEquals("dvncjabudurgk", model.name()); - Assertions.assertEquals("mokzhjjklf", model.actionConfiguration()); - Assertions.assertEquals("hmouwqlgzrfze", model.targetUri()); - Assertions.assertEquals("ebizikayuh", model.typeRef()); - Assertions.assertEquals("bjbsybb", model.topic()); + Assertions.assertEquals("tnqttezlwfffiak", model.name()); + Assertions.assertEquals("pqqmted", model.actionConfiguration()); + Assertions.assertEquals("tmmjihyeozph", model.targetUri()); + Assertions.assertEquals("auyqncygupkv", model.typeRef()); + Assertions.assertEquals("mdscwxqupev", model.topic()); Assertions.assertEquals(NamespaceDiscoveredManagementActionType.WRITE, model.actionType()); - Assertions.assertEquals(146564330, model.timeoutInSeconds()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-07T02:44:31Z"), model.lastUpdatedOn()); + Assertions.assertEquals(434974760, model.timeoutInSeconds()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-10T08:16:26Z"), model.lastUpdatedOn()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredManagementGroupTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredManagementGroupTests.java index 680f038bf9e5..3144379fdedf 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredManagementGroupTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredManagementGroupTests.java @@ -16,74 +16,82 @@ public final class NamespaceDiscoveredManagementGroupTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceDiscoveredManagementGroup model = BinaryData.fromString( - "{\"name\":\"csdtclusiypbs\",\"managementGroupConfiguration\":\"ytguslf\",\"typeRef\":\"dcygqukyhejhz\",\"dataSource\":\"xgfpelolppv\",\"defaultTopic\":\"r\",\"defaultTimeoutInSeconds\":500405809,\"actions\":[{\"name\":\"zraehtwd\",\"actionConfiguration\":\"ftswibyrcdlbhsh\",\"targetUri\":\"wpracstwitykhev\",\"typeRef\":\"cedcpnmdy\",\"topic\":\"nwzxltjcv\",\"actionType\":\"Read\",\"timeoutInSeconds\":823307226,\"lastUpdatedOn\":\"2021-08-16T09:13:32Z\"},{\"name\":\"cxnavv\",\"actionConfiguration\":\"qiby\",\"targetUri\":\"unyowxwl\",\"typeRef\":\"jrkvfgbvfvpdbo\",\"topic\":\"cizsjqlhkrribdei\",\"actionType\":\"Read\",\"timeoutInSeconds\":972824299,\"lastUpdatedOn\":\"2021-05-03T06:31:18Z\"},{\"name\":\"hvxndzwmkrefajpj\",\"actionConfiguration\":\"wkqnyhg\",\"targetUri\":\"ij\",\"typeRef\":\"ivfxzsjabibsyst\",\"topic\":\"fsdjpvkvp\",\"actionType\":\"Write\",\"timeoutInSeconds\":1795251983,\"lastUpdatedOn\":\"2021-11-27T09:38:57Z\"}],\"lastUpdatedOn\":\"2021-05-24T23:12:37Z\"}") + "{\"name\":\"byrqufeg\",\"managementGroupConfiguration\":\"vwz\",\"typeRef\":\"nhlmctlpdng\",\"dataSource\":\"vgbmhr\",\"defaultTopic\":\"kw\",\"defaultTimeoutInSeconds\":881216516,\"actions\":[{\"name\":\"jvegrhbpnaixexcc\",\"actionConfiguration\":\"reaxhcexdr\",\"targetUri\":\"vqahqkghtpwi\",\"typeRef\":\"hyjsvfycx\",\"topic\":\"fvoow\",\"actionType\":\"Call\",\"timeoutInSeconds\":64762748,\"lastUpdatedOn\":\"2021-12-04T01:16:08Z\"},{\"name\":\"qp\",\"actionConfiguration\":\"ostronz\",\"targetUri\":\"yhgfipnsx\",\"typeRef\":\"cwaekrrjre\",\"topic\":\"xt\",\"actionType\":\"Write\",\"timeoutInSeconds\":1781492308,\"lastUpdatedOn\":\"2021-06-07T04:38:31Z\"},{\"name\":\"lik\",\"actionConfiguration\":\"wslolbqp\",\"targetUri\":\"uzlm\",\"typeRef\":\"elfk\",\"topic\":\"plcrpwjxeznoig\",\"actionType\":\"Read\",\"timeoutInSeconds\":78326163,\"lastUpdatedOn\":\"2021-07-10T07:09:22Z\"},{\"name\":\"kpnb\",\"actionConfiguration\":\"zejjoqk\",\"targetUri\":\"gfhsxttaugzxn\",\"typeRef\":\"azpxdtnkdmkqjjl\",\"topic\":\"envrkpyouaibrebq\",\"actionType\":\"Call\",\"timeoutInSeconds\":34950484,\"lastUpdatedOn\":\"2021-11-07T06:56:28Z\"}],\"lastUpdatedOn\":\"2021-04-29T05:21:23Z\"}") .toObject(NamespaceDiscoveredManagementGroup.class); - Assertions.assertEquals("csdtclusiypbs", model.name()); - Assertions.assertEquals("ytguslf", model.managementGroupConfiguration()); - Assertions.assertEquals("dcygqukyhejhz", model.typeRef()); - Assertions.assertEquals("xgfpelolppv", model.dataSource()); - Assertions.assertEquals("r", model.defaultTopic()); - Assertions.assertEquals(500405809, model.defaultTimeoutInSeconds()); - Assertions.assertEquals("zraehtwd", model.actions().get(0).name()); - Assertions.assertEquals("ftswibyrcdlbhsh", model.actions().get(0).actionConfiguration()); - Assertions.assertEquals("wpracstwitykhev", model.actions().get(0).targetUri()); - Assertions.assertEquals("cedcpnmdy", model.actions().get(0).typeRef()); - Assertions.assertEquals("nwzxltjcv", model.actions().get(0).topic()); - Assertions.assertEquals(NamespaceDiscoveredManagementActionType.READ, model.actions().get(0).actionType()); - Assertions.assertEquals(823307226, model.actions().get(0).timeoutInSeconds()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-16T09:13:32Z"), model.actions().get(0).lastUpdatedOn()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-24T23:12:37Z"), model.lastUpdatedOn()); + Assertions.assertEquals("byrqufeg", model.name()); + Assertions.assertEquals("vwz", model.managementGroupConfiguration()); + Assertions.assertEquals("nhlmctlpdng", model.typeRef()); + Assertions.assertEquals("vgbmhr", model.dataSource()); + Assertions.assertEquals("kw", model.defaultTopic()); + Assertions.assertEquals(881216516, model.defaultTimeoutInSeconds()); + Assertions.assertEquals("jvegrhbpnaixexcc", model.actions().get(0).name()); + Assertions.assertEquals("reaxhcexdr", model.actions().get(0).actionConfiguration()); + Assertions.assertEquals("vqahqkghtpwi", model.actions().get(0).targetUri()); + Assertions.assertEquals("hyjsvfycx", model.actions().get(0).typeRef()); + Assertions.assertEquals("fvoow", model.actions().get(0).topic()); + Assertions.assertEquals(NamespaceDiscoveredManagementActionType.CALL, model.actions().get(0).actionType()); + Assertions.assertEquals(64762748, model.actions().get(0).timeoutInSeconds()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-04T01:16:08Z"), model.actions().get(0).lastUpdatedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-29T05:21:23Z"), model.lastUpdatedOn()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamespaceDiscoveredManagementGroup model = new NamespaceDiscoveredManagementGroup().withName("csdtclusiypbs") - .withManagementGroupConfiguration("ytguslf") - .withTypeRef("dcygqukyhejhz") - .withDataSource("xgfpelolppv") - .withDefaultTopic("r") - .withDefaultTimeoutInSeconds(500405809) + NamespaceDiscoveredManagementGroup model = new NamespaceDiscoveredManagementGroup().withName("byrqufeg") + .withManagementGroupConfiguration("vwz") + .withTypeRef("nhlmctlpdng") + .withDataSource("vgbmhr") + .withDefaultTopic("kw") + .withDefaultTimeoutInSeconds(881216516) .withActions(Arrays.asList( - new NamespaceDiscoveredManagementAction().withName("zraehtwd") - .withActionConfiguration("ftswibyrcdlbhsh") - .withTargetUri("wpracstwitykhev") - .withTypeRef("cedcpnmdy") - .withTopic("nwzxltjcv") - .withActionType(NamespaceDiscoveredManagementActionType.READ) - .withTimeoutInSeconds(823307226) - .withLastUpdatedOn(OffsetDateTime.parse("2021-08-16T09:13:32Z")), - new NamespaceDiscoveredManagementAction().withName("cxnavv") - .withActionConfiguration("qiby") - .withTargetUri("unyowxwl") - .withTypeRef("jrkvfgbvfvpdbo") - .withTopic("cizsjqlhkrribdei") - .withActionType(NamespaceDiscoveredManagementActionType.READ) - .withTimeoutInSeconds(972824299) - .withLastUpdatedOn(OffsetDateTime.parse("2021-05-03T06:31:18Z")), - new NamespaceDiscoveredManagementAction().withName("hvxndzwmkrefajpj") - .withActionConfiguration("wkqnyhg") - .withTargetUri("ij") - .withTypeRef("ivfxzsjabibsyst") - .withTopic("fsdjpvkvp") + new NamespaceDiscoveredManagementAction().withName("jvegrhbpnaixexcc") + .withActionConfiguration("reaxhcexdr") + .withTargetUri("vqahqkghtpwi") + .withTypeRef("hyjsvfycx") + .withTopic("fvoow") + .withActionType(NamespaceDiscoveredManagementActionType.CALL) + .withTimeoutInSeconds(64762748) + .withLastUpdatedOn(OffsetDateTime.parse("2021-12-04T01:16:08Z")), + new NamespaceDiscoveredManagementAction().withName("qp") + .withActionConfiguration("ostronz") + .withTargetUri("yhgfipnsx") + .withTypeRef("cwaekrrjre") + .withTopic("xt") .withActionType(NamespaceDiscoveredManagementActionType.WRITE) - .withTimeoutInSeconds(1795251983) - .withLastUpdatedOn(OffsetDateTime.parse("2021-11-27T09:38:57Z")))) - .withLastUpdatedOn(OffsetDateTime.parse("2021-05-24T23:12:37Z")); + .withTimeoutInSeconds(1781492308) + .withLastUpdatedOn(OffsetDateTime.parse("2021-06-07T04:38:31Z")), + new NamespaceDiscoveredManagementAction().withName("lik") + .withActionConfiguration("wslolbqp") + .withTargetUri("uzlm") + .withTypeRef("elfk") + .withTopic("plcrpwjxeznoig") + .withActionType(NamespaceDiscoveredManagementActionType.READ) + .withTimeoutInSeconds(78326163) + .withLastUpdatedOn(OffsetDateTime.parse("2021-07-10T07:09:22Z")), + new NamespaceDiscoveredManagementAction().withName("kpnb") + .withActionConfiguration("zejjoqk") + .withTargetUri("gfhsxttaugzxn") + .withTypeRef("azpxdtnkdmkqjjl") + .withTopic("envrkpyouaibrebq") + .withActionType(NamespaceDiscoveredManagementActionType.CALL) + .withTimeoutInSeconds(34950484) + .withLastUpdatedOn(OffsetDateTime.parse("2021-11-07T06:56:28Z")))) + .withLastUpdatedOn(OffsetDateTime.parse("2021-04-29T05:21:23Z")); model = BinaryData.fromObject(model).toObject(NamespaceDiscoveredManagementGroup.class); - Assertions.assertEquals("csdtclusiypbs", model.name()); - Assertions.assertEquals("ytguslf", model.managementGroupConfiguration()); - Assertions.assertEquals("dcygqukyhejhz", model.typeRef()); - Assertions.assertEquals("xgfpelolppv", model.dataSource()); - Assertions.assertEquals("r", model.defaultTopic()); - Assertions.assertEquals(500405809, model.defaultTimeoutInSeconds()); - Assertions.assertEquals("zraehtwd", model.actions().get(0).name()); - Assertions.assertEquals("ftswibyrcdlbhsh", model.actions().get(0).actionConfiguration()); - Assertions.assertEquals("wpracstwitykhev", model.actions().get(0).targetUri()); - Assertions.assertEquals("cedcpnmdy", model.actions().get(0).typeRef()); - Assertions.assertEquals("nwzxltjcv", model.actions().get(0).topic()); - Assertions.assertEquals(NamespaceDiscoveredManagementActionType.READ, model.actions().get(0).actionType()); - Assertions.assertEquals(823307226, model.actions().get(0).timeoutInSeconds()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-16T09:13:32Z"), model.actions().get(0).lastUpdatedOn()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-24T23:12:37Z"), model.lastUpdatedOn()); + Assertions.assertEquals("byrqufeg", model.name()); + Assertions.assertEquals("vwz", model.managementGroupConfiguration()); + Assertions.assertEquals("nhlmctlpdng", model.typeRef()); + Assertions.assertEquals("vgbmhr", model.dataSource()); + Assertions.assertEquals("kw", model.defaultTopic()); + Assertions.assertEquals(881216516, model.defaultTimeoutInSeconds()); + Assertions.assertEquals("jvegrhbpnaixexcc", model.actions().get(0).name()); + Assertions.assertEquals("reaxhcexdr", model.actions().get(0).actionConfiguration()); + Assertions.assertEquals("vqahqkghtpwi", model.actions().get(0).targetUri()); + Assertions.assertEquals("hyjsvfycx", model.actions().get(0).typeRef()); + Assertions.assertEquals("fvoow", model.actions().get(0).topic()); + Assertions.assertEquals(NamespaceDiscoveredManagementActionType.CALL, model.actions().get(0).actionType()); + Assertions.assertEquals(64762748, model.actions().get(0).timeoutInSeconds()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-04T01:16:08Z"), model.actions().get(0).lastUpdatedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-29T05:21:23Z"), model.lastUpdatedOn()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredStreamTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredStreamTests.java index 7fde89052fa7..7d74157c34a2 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredStreamTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceDiscoveredStreamTests.java @@ -15,25 +15,25 @@ public final class NamespaceDiscoveredStreamTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceDiscoveredStream model = BinaryData.fromString( - "{\"name\":\"icccn\",\"streamConfiguration\":\"huexmk\",\"typeRef\":\"lstvlzywe\",\"destinations\":[{\"target\":\"StreamDestination\"},{\"target\":\"StreamDestination\"}],\"lastUpdatedOn\":\"2021-05-25T03:52:53Z\"}") + "{\"name\":\"tkkgllqwjy\",\"streamConfiguration\":\"jayvblmhv\",\"typeRef\":\"uhbxvvy\",\"destinations\":[{\"target\":\"StreamDestination\"}],\"lastUpdatedOn\":\"2021-10-11T00:15:08Z\"}") .toObject(NamespaceDiscoveredStream.class); - Assertions.assertEquals("icccn", model.name()); - Assertions.assertEquals("huexmk", model.streamConfiguration()); - Assertions.assertEquals("lstvlzywe", model.typeRef()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-25T03:52:53Z"), model.lastUpdatedOn()); + Assertions.assertEquals("tkkgllqwjy", model.name()); + Assertions.assertEquals("jayvblmhv", model.streamConfiguration()); + Assertions.assertEquals("uhbxvvy", model.typeRef()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-11T00:15:08Z"), model.lastUpdatedOn()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamespaceDiscoveredStream model = new NamespaceDiscoveredStream().withName("icccn") - .withStreamConfiguration("huexmk") - .withTypeRef("lstvlzywe") - .withDestinations(Arrays.asList(new StreamDestination(), new StreamDestination())) - .withLastUpdatedOn(OffsetDateTime.parse("2021-05-25T03:52:53Z")); + NamespaceDiscoveredStream model = new NamespaceDiscoveredStream().withName("tkkgllqwjy") + .withStreamConfiguration("jayvblmhv") + .withTypeRef("uhbxvvy") + .withDestinations(Arrays.asList(new StreamDestination())) + .withLastUpdatedOn(OffsetDateTime.parse("2021-10-11T00:15:08Z")); model = BinaryData.fromObject(model).toObject(NamespaceDiscoveredStream.class); - Assertions.assertEquals("icccn", model.name()); - Assertions.assertEquals("huexmk", model.streamConfiguration()); - Assertions.assertEquals("lstvlzywe", model.typeRef()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-25T03:52:53Z"), model.lastUpdatedOn()); + Assertions.assertEquals("tkkgllqwjy", model.name()); + Assertions.assertEquals("jayvblmhv", model.streamConfiguration()); + Assertions.assertEquals("uhbxvvy", model.typeRef()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-11T00:15:08Z"), model.lastUpdatedOn()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceEventGroupTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceEventGroupTests.java index bd3bb79b5662..0ce2886ec350 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceEventGroupTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceEventGroupTests.java @@ -15,56 +15,45 @@ public final class NamespaceEventGroupTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceEventGroup model = BinaryData.fromString( - "{\"name\":\"n\",\"dataSource\":\"bpzkafkuwbc\",\"eventGroupConfiguration\":\"wbme\",\"defaultDestinations\":[{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"}],\"typeRef\":\"yvjusrtslhsp\",\"events\":[{\"name\":\"emaofmxagkvt\",\"dataSource\":\"lmqkrhahvlj\",\"eventConfiguration\":\"haquhcdh\",\"destinations\":[{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"}],\"typeRef\":\"laexqp\"},{\"name\":\"fadmws\",\"dataSource\":\"r\",\"eventConfiguration\":\"xpvgo\",\"destinations\":[{\"target\":\"EventDestination\"}],\"typeRef\":\"misgwbnb\"},{\"name\":\"e\",\"dataSource\":\"awkz\",\"eventConfiguration\":\"liourqhak\",\"destinations\":[{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"}],\"typeRef\":\"shsfwxosowzxcu\"},{\"name\":\"i\",\"dataSource\":\"ooxdjebwpuc\",\"eventConfiguration\":\"fvovbvmeuecivy\",\"destinations\":[{\"target\":\"EventDestination\"}],\"typeRef\":\"uojgj\"}]}") + "{\"name\":\"pgylg\",\"dataSource\":\"itxmedjvcslynqww\",\"eventGroupConfiguration\":\"wzz\",\"defaultDestinations\":[{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"}],\"typeRef\":\"trmgucnapkte\",\"events\":[{\"name\":\"lwptfdy\",\"dataSource\":\"fqbuaceopzf\",\"eventConfiguration\":\"hhuao\",\"destinations\":[{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"}],\"typeRef\":\"qeqxo\"},{\"name\":\"z\",\"dataSource\":\"hzxct\",\"eventConfiguration\":\"gbkdmoizpos\",\"destinations\":[{\"target\":\"EventDestination\"},{\"target\":\"EventDestination\"}],\"typeRef\":\"cfbu\"}]}") .toObject(NamespaceEventGroup.class); - Assertions.assertEquals("n", model.name()); - Assertions.assertEquals("bpzkafkuwbc", model.dataSource()); - Assertions.assertEquals("wbme", model.eventGroupConfiguration()); - Assertions.assertEquals("yvjusrtslhsp", model.typeRef()); - Assertions.assertEquals("emaofmxagkvt", model.events().get(0).name()); - Assertions.assertEquals("lmqkrhahvlj", model.events().get(0).dataSource()); - Assertions.assertEquals("haquhcdh", model.events().get(0).eventConfiguration()); - Assertions.assertEquals("laexqp", model.events().get(0).typeRef()); + Assertions.assertEquals("pgylg", model.name()); + Assertions.assertEquals("itxmedjvcslynqww", model.dataSource()); + Assertions.assertEquals("wzz", model.eventGroupConfiguration()); + Assertions.assertEquals("trmgucnapkte", model.typeRef()); + Assertions.assertEquals("lwptfdy", model.events().get(0).name()); + Assertions.assertEquals("fqbuaceopzf", model.events().get(0).dataSource()); + Assertions.assertEquals("hhuao", model.events().get(0).eventConfiguration()); + Assertions.assertEquals("qeqxo", model.events().get(0).typeRef()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamespaceEventGroup model = new NamespaceEventGroup().withName("n") - .withDataSource("bpzkafkuwbc") - .withEventGroupConfiguration("wbme") - .withDefaultDestinations(Arrays.asList(new EventDestination(), new EventDestination())) - .withTypeRef("yvjusrtslhsp") + NamespaceEventGroup model = new NamespaceEventGroup().withName("pgylg") + .withDataSource("itxmedjvcslynqww") + .withEventGroupConfiguration("wzz") + .withDefaultDestinations(Arrays.asList(new EventDestination(), new EventDestination(), + new EventDestination(), new EventDestination())) + .withTypeRef("trmgucnapkte") .withEvents(Arrays.asList( - new NamespaceEvent().withName("emaofmxagkvt") - .withDataSource("lmqkrhahvlj") - .withEventConfiguration("haquhcdh") - .withDestinations(Arrays.asList(new EventDestination(), new EventDestination(), - new EventDestination(), new EventDestination())) - .withTypeRef("laexqp"), - new NamespaceEvent().withName("fadmws") - .withDataSource("r") - .withEventConfiguration("xpvgo") - .withDestinations(Arrays.asList(new EventDestination())) - .withTypeRef("misgwbnb"), - new NamespaceEvent().withName("e") - .withDataSource("awkz") - .withEventConfiguration("liourqhak") - .withDestinations( - Arrays.asList(new EventDestination(), new EventDestination(), new EventDestination())) - .withTypeRef("shsfwxosowzxcu"), - new NamespaceEvent().withName("i") - .withDataSource("ooxdjebwpuc") - .withEventConfiguration("fvovbvmeuecivy") - .withDestinations(Arrays.asList(new EventDestination())) - .withTypeRef("uojgj"))); + new NamespaceEvent().withName("lwptfdy") + .withDataSource("fqbuaceopzf") + .withEventConfiguration("hhuao") + .withDestinations(Arrays.asList(new EventDestination(), new EventDestination())) + .withTypeRef("qeqxo"), + new NamespaceEvent().withName("z") + .withDataSource("hzxct") + .withEventConfiguration("gbkdmoizpos") + .withDestinations(Arrays.asList(new EventDestination(), new EventDestination())) + .withTypeRef("cfbu"))); model = BinaryData.fromObject(model).toObject(NamespaceEventGroup.class); - Assertions.assertEquals("n", model.name()); - Assertions.assertEquals("bpzkafkuwbc", model.dataSource()); - Assertions.assertEquals("wbme", model.eventGroupConfiguration()); - Assertions.assertEquals("yvjusrtslhsp", model.typeRef()); - Assertions.assertEquals("emaofmxagkvt", model.events().get(0).name()); - Assertions.assertEquals("lmqkrhahvlj", model.events().get(0).dataSource()); - Assertions.assertEquals("haquhcdh", model.events().get(0).eventConfiguration()); - Assertions.assertEquals("laexqp", model.events().get(0).typeRef()); + Assertions.assertEquals("pgylg", model.name()); + Assertions.assertEquals("itxmedjvcslynqww", model.dataSource()); + Assertions.assertEquals("wzz", model.eventGroupConfiguration()); + Assertions.assertEquals("trmgucnapkte", model.typeRef()); + Assertions.assertEquals("lwptfdy", model.events().get(0).name()); + Assertions.assertEquals("fqbuaceopzf", model.events().get(0).dataSource()); + Assertions.assertEquals("hhuao", model.events().get(0).eventConfiguration()); + Assertions.assertEquals("qeqxo", model.events().get(0).typeRef()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceEventTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceEventTests.java index 4e10ffc17956..164e0e1f98b4 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceEventTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceEventTests.java @@ -14,25 +14,25 @@ public final class NamespaceEventTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceEvent model = BinaryData.fromString( - "{\"name\":\"wjue\",\"dataSource\":\"twm\",\"eventConfiguration\":\"ytdxwit\",\"destinations\":[{\"target\":\"EventDestination\"}],\"typeRef\":\"awgqwgxhni\"}") + "{\"name\":\"rmfqjhhkxbpvj\",\"dataSource\":\"jhxxjyn\",\"eventConfiguration\":\"divkrt\",\"destinations\":[{\"target\":\"EventDestination\"}],\"typeRef\":\"qzvszjf\"}") .toObject(NamespaceEvent.class); - Assertions.assertEquals("wjue", model.name()); - Assertions.assertEquals("twm", model.dataSource()); - Assertions.assertEquals("ytdxwit", model.eventConfiguration()); - Assertions.assertEquals("awgqwgxhni", model.typeRef()); + Assertions.assertEquals("rmfqjhhkxbpvj", model.name()); + Assertions.assertEquals("jhxxjyn", model.dataSource()); + Assertions.assertEquals("divkrt", model.eventConfiguration()); + Assertions.assertEquals("qzvszjf", model.typeRef()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamespaceEvent model = new NamespaceEvent().withName("wjue") - .withDataSource("twm") - .withEventConfiguration("ytdxwit") + NamespaceEvent model = new NamespaceEvent().withName("rmfqjhhkxbpvj") + .withDataSource("jhxxjyn") + .withEventConfiguration("divkrt") .withDestinations(Arrays.asList(new EventDestination())) - .withTypeRef("awgqwgxhni"); + .withTypeRef("qzvszjf"); model = BinaryData.fromObject(model).toObject(NamespaceEvent.class); - Assertions.assertEquals("wjue", model.name()); - Assertions.assertEquals("twm", model.dataSource()); - Assertions.assertEquals("ytdxwit", model.eventConfiguration()); - Assertions.assertEquals("awgqwgxhni", model.typeRef()); + Assertions.assertEquals("rmfqjhhkxbpvj", model.name()); + Assertions.assertEquals("jhxxjyn", model.dataSource()); + Assertions.assertEquals("divkrt", model.eventConfiguration()); + Assertions.assertEquals("qzvszjf", model.typeRef()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceMessageSchemaReferenceTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceMessageSchemaReferenceTests.java index cf7db0256bd6..382d091bee98 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceMessageSchemaReferenceTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceMessageSchemaReferenceTests.java @@ -11,7 +11,7 @@ public final class NamespaceMessageSchemaReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceMessageSchemaReference model = BinaryData.fromString( - "{\"schemaRegistryNamespace\":\"idzyexznelixhnr\",\"schemaName\":\"tfolhbnx\",\"schemaVersion\":\"nalaulppg\"}") + "{\"schemaRegistryNamespace\":\"onz\",\"schemaName\":\"nsikvmkqzeqqkdl\",\"schemaVersion\":\"fzxmhhvhgureodkw\"}") .toObject(NamespaceMessageSchemaReference.class); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceStreamTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceStreamTests.java index 84577408e3ae..cf25a96497b0 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceStreamTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespaceStreamTests.java @@ -14,22 +14,22 @@ public final class NamespaceStreamTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NamespaceStream model = BinaryData.fromString( - "{\"name\":\"kxfbkpycgklwndn\",\"streamConfiguration\":\"dauwhvylwzbtd\",\"typeRef\":\"ujznb\",\"destinations\":[{\"target\":\"StreamDestination\"}]}") + "{\"name\":\"uvjfdxxive\",\"streamConfiguration\":\"t\",\"typeRef\":\"aqtdoqmcbx\",\"destinations\":[{\"target\":\"StreamDestination\"},{\"target\":\"StreamDestination\"}]}") .toObject(NamespaceStream.class); - Assertions.assertEquals("kxfbkpycgklwndn", model.name()); - Assertions.assertEquals("dauwhvylwzbtd", model.streamConfiguration()); - Assertions.assertEquals("ujznb", model.typeRef()); + Assertions.assertEquals("uvjfdxxive", model.name()); + Assertions.assertEquals("t", model.streamConfiguration()); + Assertions.assertEquals("aqtdoqmcbx", model.typeRef()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamespaceStream model = new NamespaceStream().withName("kxfbkpycgklwndn") - .withStreamConfiguration("dauwhvylwzbtd") - .withTypeRef("ujznb") - .withDestinations(Arrays.asList(new StreamDestination())); + NamespaceStream model = new NamespaceStream().withName("uvjfdxxive") + .withStreamConfiguration("t") + .withTypeRef("aqtdoqmcbx") + .withDestinations(Arrays.asList(new StreamDestination(), new StreamDestination())); model = BinaryData.fromObject(model).toObject(NamespaceStream.class); - Assertions.assertEquals("kxfbkpycgklwndn", model.name()); - Assertions.assertEquals("dauwhvylwzbtd", model.streamConfiguration()); - Assertions.assertEquals("ujznb", model.typeRef()); + Assertions.assertEquals("uvjfdxxive", model.name()); + Assertions.assertEquals("t", model.streamConfiguration()); + Assertions.assertEquals("aqtdoqmcbx", model.typeRef()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesCreateOrReplaceMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesCreateOrReplaceMockTests.java index 561d9a44c560..fc21595c7094 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesCreateOrReplaceMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesCreateOrReplaceMockTests.java @@ -28,7 +28,7 @@ public final class NamespacesCreateOrReplaceMockTests { @Test public void testCreateOrReplace() throws Exception { String responseStr - = "{\"properties\":{\"uuid\":\"ebwtswb\",\"messaging\":{\"endpoints\":{\"bsazgakg\":{\"endpointType\":\"duragegizvc\",\"address\":\"felisdjub\",\"resourceId\":\"bqigkx\"}}},\"provisioningState\":\"Succeeded\"},\"identity\":{\"principalId\":\"m\",\"tenantId\":\"mspofapvuhryl\",\"type\":\"SystemAssigned\"},\"location\":\"frzgbzjed\",\"tags\":{\"f\":\"kvnlvxbcuiiznkt\",\"bmikost\":\"nsnvpd\",\"kiwbuqnyoph\":\"z\",\"sgcrpfbcunezzce\":\"fy\"},\"id\":\"elfwy\",\"name\":\"wl\",\"type\":\"xjwet\"}"; + = "{\"properties\":{\"uuid\":\"xff\",\"messaging\":{\"endpoints\":{\"nugj\":{\"endpointType\":\"fbkgozxwopdby\",\"address\":\"p\",\"resourceId\":\"qaclnapxbiy\"},\"hmrnjhvsuj\":{\"endpointType\":\"fsmfcttuxuuyi\",\"address\":\"flqo\",\"resourceId\":\"uvr\"}}},\"provisioningState\":\"Succeeded\"},\"identity\":{\"principalId\":\"tqjtwhauu\",\"tenantId\":\"prnjletlxsmr\",\"type\":\"None\"},\"location\":\"ou\",\"tags\":{\"iwhxqszdtmaajq\":\"mowaziynknlqwzdv\",\"rjvmtygjbmzyosp\":\"huxy\",\"hckfkyjpmspbps\":\"p\",\"pyogtieyuj\":\"df\"},\"id\":\"vczkcnyxrxmunjd\",\"name\":\"vg\",\"type\":\"nkvxlxpaglqi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -38,31 +38,27 @@ public void testCreateOrReplace() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Namespace response = manager.namespaces() - .define("ojphslhc") - .withRegion("mv") - .withExistingResourceGroup("llxecwc") - .withTags( - mapOf("nsup", "tayx", "oibgsxg", "ujlzqnhcvsqltn", "dbxiqx", "xfyqonmpqoxwdo", "htmwwinh", "iiqbi")) - .withProperties(new NamespaceProperties().withMessaging(new Messaging().withEndpoints(mapOf("vcpopmxe", - new MessagingEndpoint().withEndpointType("fmvigorqjbttzh") - .withAddress("aglkafhon") - .withResourceId("ujeickp"), - "awx", - new MessagingEndpoint().withEndpointType("wcltyjede").withAddress("xm").withResourceId("mkqscaz"), - "lvgsgzwywakoih", - new MessagingEndpoint().withEndpointType("x") - .withAddress("uamwabzxrvxc") - .withResourceId("hsphaivmxyas"))))) + .define("xqdlyrtltlapr") + .withRegion("isngwflqqmpizru") + .withExistingResourceGroup("amktcqiosmgbzah") + .withTags(mapOf("iixtmkzj", "qxpxiwfcngjsaa", "irhgfgrwsdp", "kv")) + .withProperties(new NamespaceProperties().withMessaging(new Messaging().withEndpoints(mapOf("mhyreeudz", + new MessagingEndpoint().withEndpointType("oqeq").withAddress("larvlagunbtg").withResourceId("bwln"), + "xkjeytunlbfj", + new MessagingEndpoint().withEndpointType("vbpdqmjxlyyzglgo") + .withAddress("wtlmjjyuo") + .withResourceId("tob"), + "enx", new MessagingEndpoint().withEndpointType("rusnk").withAddress("bhsy").withResourceId("unjqh"))))) .withIdentity(new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.NONE)) .create(); - Assertions.assertEquals("frzgbzjed", response.location()); - Assertions.assertEquals("kvnlvxbcuiiznkt", response.tags().get("f")); - Assertions.assertEquals("duragegizvc", - response.properties().messaging().endpoints().get("bsazgakg").endpointType()); - Assertions.assertEquals("felisdjub", response.properties().messaging().endpoints().get("bsazgakg").address()); - Assertions.assertEquals("bqigkx", response.properties().messaging().endpoints().get("bsazgakg").resourceId()); - Assertions.assertEquals(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); + Assertions.assertEquals("ou", response.location()); + Assertions.assertEquals("mowaziynknlqwzdv", response.tags().get("iwhxqszdtmaajq")); + Assertions.assertEquals("fbkgozxwopdby", + response.properties().messaging().endpoints().get("nugj").endpointType()); + Assertions.assertEquals("p", response.properties().messaging().endpoints().get("nugj").address()); + Assertions.assertEquals("qaclnapxbiy", response.properties().messaging().endpoints().get("nugj").resourceId()); + Assertions.assertEquals(SystemAssignedServiceIdentityType.NONE, response.identity().type()); } // Use "Map.of" if available diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesGetByResourceGroupWithResponseMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesGetByResourceGroupWithResponseMockTests.java index b9d34c5c8762..0e0da6f2adb1 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesGetByResourceGroupWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class NamespacesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"uuid\":\"xjumvq\",\"messaging\":{\"endpoints\":{\"rzpasccbiuimzdly\":{\"endpointType\":\"r\",\"address\":\"aiouaubrjt\",\"resourceId\":\"qxfuojrngif\"},\"eyzihgrky\":{\"endpointType\":\"fqwmkyoquf\",\"address\":\"vruzslzojhpctfnm\",\"resourceId\":\"otngfdgu\"},\"yhsgz\":{\"endpointType\":\"zabs\",\"address\":\"mfp\",\"resourceId\":\"ojeevy\"}}},\"provisioningState\":\"Accepted\"},\"identity\":{\"principalId\":\"omfgbeglqgleohib\",\"tenantId\":\"nlu\",\"type\":\"None\"},\"location\":\"rrfx\",\"tags\":{\"z\":\"btijvacvbm\",\"wxacevehj\":\"qqxlajr\",\"aoqltfaey\":\"uyxoaf\",\"hriypoqeyhlqhy\":\"inmfgvxirp\"},\"id\":\"prlpy\",\"name\":\"nuciqdsmexiit\",\"type\":\"fuxtyasiibmiybnn\"}"; + = "{\"properties\":{\"uuid\":\"clt\",\"messaging\":{\"endpoints\":{\"aivmxyasflvgs\":{\"endpointType\":\"xxmlfmkqscazua\",\"address\":\"xtzx\",\"resourceId\":\"amwabzxrvxcushsp\"},\"ljhlnymzotq\":{\"endpointType\":\"wywa\",\"address\":\"oi\",\"resourceId\":\"nsmjbl\"},\"gsxgnxfyqon\":{\"endpointType\":\"yuzcbmqqvxmvw\",\"address\":\"gtayxonsupeujlz\",\"resourceId\":\"hcvsqltnzoi\"},\"bcblemb\":{\"endpointType\":\"qoxwd\",\"address\":\"fdbxiqxeiiqbim\",\"resourceId\":\"mwwinhehfqpofv\"}}},\"provisioningState\":\"Succeeded\"},\"identity\":{\"principalId\":\"qvxkd\",\"tenantId\":\"qihebw\",\"type\":\"SystemAssigned\"},\"location\":\"bzuwfmdurag\",\"tags\":{\"igkxkbsazga\":\"zvcjfelisdjubggb\",\"apvu\":\"gacyrcmjdmspo\"},\"id\":\"rylniofrzg\",\"name\":\"zjedmstkvnlv\",\"type\":\"bcuiiz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,17 +32,16 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Namespace response = manager.namespaces() - .getByResourceGroupWithResponse("unqndyfpchrqb", "jjrcgegydc", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("ujeickp", "vcpopmxe", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("rrfx", response.location()); - Assertions.assertEquals("btijvacvbm", response.tags().get("z")); - Assertions.assertEquals("r", - response.properties().messaging().endpoints().get("rzpasccbiuimzdly").endpointType()); - Assertions.assertEquals("aiouaubrjt", - response.properties().messaging().endpoints().get("rzpasccbiuimzdly").address()); - Assertions.assertEquals("qxfuojrngif", - response.properties().messaging().endpoints().get("rzpasccbiuimzdly").resourceId()); - Assertions.assertEquals(SystemAssignedServiceIdentityType.NONE, response.identity().type()); + Assertions.assertEquals("bzuwfmdurag", response.location()); + Assertions.assertEquals("zvcjfelisdjubggb", response.tags().get("igkxkbsazga")); + Assertions.assertEquals("xxmlfmkqscazua", + response.properties().messaging().endpoints().get("aivmxyasflvgs").endpointType()); + Assertions.assertEquals("xtzx", response.properties().messaging().endpoints().get("aivmxyasflvgs").address()); + Assertions.assertEquals("amwabzxrvxcushsp", + response.properties().messaging().endpoints().get("aivmxyasflvgs").resourceId()); + Assertions.assertEquals(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesListByResourceGroupMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesListByResourceGroupMockTests.java index 38b413580363..2ea1378e35f5 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesListByResourceGroupMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesListByResourceGroupMockTests.java @@ -23,7 +23,7 @@ public final class NamespacesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"uuid\":\"mgixhcmavmqfou\",\"messaging\":{\"endpoints\":{\"or\":{\"endpointType\":\"gyyprotwy\",\"address\":\"undmbx\",\"resourceId\":\"gcmjkavl\"},\"bdb\":{\"endpointType\":\"ftpmdtzfjltfv\",\"address\":\"zcyjtot\",\"resourceId\":\"opv\"},\"sgqcwdho\":{\"endpointType\":\"gqqihedsvqwt\",\"address\":\"mkyi\",\"resourceId\":\"ysi\"}}},\"provisioningState\":\"Accepted\"},\"identity\":{\"principalId\":\"cdzsu\",\"tenantId\":\"ohdxbzlmcmu\",\"type\":\"SystemAssigned\"},\"location\":\"vhdbevwqqxey\",\"tags\":{\"kfkbgbzbowxeqocl\":\"nqzi\",\"eokbze\":\"mygvkzqkj\",\"kwv\":\"ezrxcczurtleipqx\",\"pnodawopqhe\":\"gnzvdfbzdixzm\"},\"id\":\"jptmcgsbost\",\"name\":\"eln\",\"type\":\"la\"}]}"; + = "{\"value\":[{\"properties\":{\"uuid\":\"v\",\"messaging\":{\"endpoints\":{\"fwlwxjwetnps\":{\"endpointType\":\"ikostbzbkiwbuqny\",\"address\":\"phzfylsgcrp\",\"resourceId\":\"cunezzcezelfw\"},\"fewz\":{\"endpointType\":\"clafzvaylpt\",\"address\":\"sqqw\",\"resourceId\":\"cmwqkchcxwa\"}}},\"provisioningState\":\"Canceled\"},\"identity\":{\"principalId\":\"fdeqvhpsyl\",\"tenantId\":\"shk\",\"type\":\"SystemAssigned\"},\"location\":\"mbmxzjrgywwpgj\",\"tags\":{\"aqutdewemxswvruu\":\"ptfujgicgaaoept\",\"rtixokff\":\"zzjgehkfki\"},\"id\":\"yinljqe\",\"name\":\"qwhix\",\"type\":\"onsts\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,16 +33,16 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<Namespace> response - = manager.namespaces().listByResourceGroup("stgnl", com.azure.core.util.Context.NONE); + = manager.namespaces().listByResourceGroup("ktwfa", com.azure.core.util.Context.NONE); - Assertions.assertEquals("vhdbevwqqxey", response.iterator().next().location()); - Assertions.assertEquals("nqzi", response.iterator().next().tags().get("kfkbgbzbowxeqocl")); - Assertions.assertEquals("gyyprotwy", - response.iterator().next().properties().messaging().endpoints().get("or").endpointType()); - Assertions.assertEquals("undmbx", - response.iterator().next().properties().messaging().endpoints().get("or").address()); - Assertions.assertEquals("gcmjkavl", - response.iterator().next().properties().messaging().endpoints().get("or").resourceId()); + Assertions.assertEquals("mbmxzjrgywwpgj", response.iterator().next().location()); + Assertions.assertEquals("ptfujgicgaaoept", response.iterator().next().tags().get("aqutdewemxswvruu")); + Assertions.assertEquals("ikostbzbkiwbuqny", + response.iterator().next().properties().messaging().endpoints().get("fwlwxjwetnps").endpointType()); + Assertions.assertEquals("phzfylsgcrp", + response.iterator().next().properties().messaging().endpoints().get("fwlwxjwetnps").address()); + Assertions.assertEquals("cunezzcezelfw", + response.iterator().next().properties().messaging().endpoints().get("fwlwxjwetnps").resourceId()); Assertions.assertEquals(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesListMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesListMockTests.java index ecfac76d0369..5763997e65cf 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesListMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesListMockTests.java @@ -23,7 +23,7 @@ public final class NamespacesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"uuid\":\"mzlbiojlvfhrb\",\"messaging\":{\"endpoints\":{\"cpilj\":{\"endpointType\":\"vcwwyyurmochppr\",\"address\":\"rsnm\",\"resourceId\":\"ayzejnhlbkpbz\"},\"e\":{\"endpointType\":\"hzvechndbnwieho\",\"address\":\"ewjwiuubw\",\"resourceId\":\"qsfapaqt\"},\"pud\":{\"endpointType\":\"q\",\"address\":\"ex\",\"resourceId\":\"mfxapjwogqqno\"},\"i\":{\"endpointType\":\"abtqwpwyawbzasqb\",\"address\":\"clj\",\"resourceId\":\"yexaoguy\"}}},\"provisioningState\":\"Failed\"},\"identity\":{\"principalId\":\"ault\",\"tenantId\":\"jjum\",\"type\":\"SystemAssigned\"},\"location\":\"azlnqnmcjngzqdqx\",\"tags\":{\"zh\":\"wgnyfusfzsvtui\"},\"id\":\"jqg\",\"name\":\"cfhmlrqryxyn\",\"type\":\"nzrdpsovwxz\"}]}"; + = "{\"value\":[{\"properties\":{\"uuid\":\"xgvelfclduccbird\",\"messaging\":{\"endpoints\":{\"tbxqmuluxlxq\":{\"endpointType\":\"o\",\"address\":\"iegstm\",\"resourceId\":\"nwjizcilnghgshej\"},\"ziqgfuh\":{\"endpointType\":\"nersb\",\"address\":\"cucrwnamikze\",\"resourceId\":\"qbsms\"}}},\"provisioningState\":\"Accepted\"},\"identity\":{\"principalId\":\"swhvhczznvfbycj\",\"tenantId\":\"jww\",\"type\":\"None\"},\"location\":\"vumwmxqh\",\"tags\":{\"hflzokxco\":\"noamldsehaohdj\",\"tsxoatftgz\":\"pelnjetag\",\"vefloccsrmozihmi\":\"npbs\"},\"id\":\"g\",\"name\":\"wtxxpkyjcx\",\"type\":\"jxgrytfmp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,15 +34,14 @@ public void testList() throws Exception { PagedIterable<Namespace> response = manager.namespaces().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("azlnqnmcjngzqdqx", response.iterator().next().location()); - Assertions.assertEquals("wgnyfusfzsvtui", response.iterator().next().tags().get("zh")); - Assertions.assertEquals("vcwwyyurmochppr", - response.iterator().next().properties().messaging().endpoints().get("cpilj").endpointType()); - Assertions.assertEquals("rsnm", - response.iterator().next().properties().messaging().endpoints().get("cpilj").address()); - Assertions.assertEquals("ayzejnhlbkpbz", - response.iterator().next().properties().messaging().endpoints().get("cpilj").resourceId()); - Assertions.assertEquals(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED, - response.iterator().next().identity().type()); + Assertions.assertEquals("vumwmxqh", response.iterator().next().location()); + Assertions.assertEquals("noamldsehaohdj", response.iterator().next().tags().get("hflzokxco")); + Assertions.assertEquals("o", + response.iterator().next().properties().messaging().endpoints().get("tbxqmuluxlxq").endpointType()); + Assertions.assertEquals("iegstm", + response.iterator().next().properties().messaging().endpoints().get("tbxqmuluxlxq").address()); + Assertions.assertEquals("nwjizcilnghgshej", + response.iterator().next().properties().messaging().endpoints().get("tbxqmuluxlxq").resourceId()); + Assertions.assertEquals(SystemAssignedServiceIdentityType.NONE, response.iterator().next().identity().type()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesMigrateMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesMigrateMockTests.java new file mode 100644 index 000000000000..2f8437417d36 --- /dev/null +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/NamespacesMigrateMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.deviceregistry.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.deviceregistry.DeviceRegistryManager; +import com.azure.resourcemanager.deviceregistry.models.NamespaceMigrateRequest; +import com.azure.resourcemanager.deviceregistry.models.Scope; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NamespacesMigrateMockTests { + @Test + public void testMigrate() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + DeviceRegistryManager manager = DeviceRegistryManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.namespaces() + .migrate("ycilrmcaykggnox", "ztrksxwpndf", new NamespaceMigrateRequest().withScope(Scope.RESOURCES) + .withResourceIds(Arrays.asList("nthjtwkjaosrxuzv")), com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/OperationsListMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/OperationsListMockTests.java index 9555d0c33268..2a948ebaa1db 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/OperationsListMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/OperationsListMockTests.java @@ -21,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"bwpypqtgsfjacb\",\"isDataAction\":false,\"display\":{\"provider\":\"udbxv\",\"resource\":\"htnsi\",\"operation\":\"dhzmmesckdlp\",\"description\":\"zrcxfailcfxwmdbo\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"dqzh\",\"isDataAction\":false,\"display\":{\"provider\":\"unqndyfpchrqb\",\"resource\":\"jrcg\",\"operation\":\"ydcwboxjumv\",\"description\":\"olihrra\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/OutboundEndpointsTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/OutboundEndpointsTests.java index eef827af4040..189b6e8095cb 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/OutboundEndpointsTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/OutboundEndpointsTests.java @@ -15,29 +15,29 @@ public final class OutboundEndpointsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OutboundEndpoints model = BinaryData.fromString( - "{\"assigned\":{\"btkuwhh\":{\"endpointType\":\"uqerpqlpqwc\",\"address\":\"iuqgbdbutauv\"},\"h\":{\"endpointType\":\"ykojoxafnndlpic\",\"address\":\"koymkcd\"},\"syrsndsytgadgvra\":{\"endpointType\":\"kkpwdreqnovvq\",\"address\":\"ovljxywsu\"}},\"unassigned\":{\"wlquuijfqkace\":{\"endpointType\":\"e\",\"address\":\"nzar\"}}}") + "{\"assigned\":{\"osphyoul\":{\"endpointType\":\"enwabfatk\",\"address\":\"ddxbjhwuaanoz\"}},\"unassigned\":{\"tx\":{\"endpointType\":\"xagl\",\"address\":\"vimjwos\"},\"gge\":{\"endpointType\":\"cskfcktqumiekk\",\"address\":\"zzikhlyfjhdg\"},\"a\":{\"endpointType\":\"unygaeqid\",\"address\":\"qfatpxllrxcyjm\"},\"xkgymareqnajxqu\":{\"endpointType\":\"uvarmywdmjsjq\",\"address\":\"jhhyxxrwlycoduhp\"}}}") .toObject(OutboundEndpoints.class); - Assertions.assertEquals("uqerpqlpqwc", model.assigned().get("btkuwhh").endpointType()); - Assertions.assertEquals("iuqgbdbutauv", model.assigned().get("btkuwhh").address()); - Assertions.assertEquals("e", model.unassigned().get("wlquuijfqkace").endpointType()); - Assertions.assertEquals("nzar", model.unassigned().get("wlquuijfqkace").address()); + Assertions.assertEquals("enwabfatk", model.assigned().get("osphyoul").endpointType()); + Assertions.assertEquals("ddxbjhwuaanoz", model.assigned().get("osphyoul").address()); + Assertions.assertEquals("xagl", model.unassigned().get("tx").endpointType()); + Assertions.assertEquals("vimjwos", model.unassigned().get("tx").address()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { OutboundEndpoints model = new OutboundEndpoints() - .withAssigned(mapOf("btkuwhh", - new DeviceMessagingEndpoint().withEndpointType("uqerpqlpqwc").withAddress("iuqgbdbutauv"), "h", - new DeviceMessagingEndpoint().withEndpointType("ykojoxafnndlpic").withAddress("koymkcd"), - "syrsndsytgadgvra", - new DeviceMessagingEndpoint().withEndpointType("kkpwdreqnovvq").withAddress("ovljxywsu"))) - .withUnassigned( - mapOf("wlquuijfqkace", new DeviceMessagingEndpoint().withEndpointType("e").withAddress("nzar"))); + .withAssigned(mapOf("osphyoul", + new DeviceMessagingEndpoint().withEndpointType("enwabfatk").withAddress("ddxbjhwuaanoz"))) + .withUnassigned(mapOf("tx", new DeviceMessagingEndpoint().withEndpointType("xagl").withAddress("vimjwos"), + "gge", new DeviceMessagingEndpoint().withEndpointType("cskfcktqumiekk").withAddress("zzikhlyfjhdg"), + "a", new DeviceMessagingEndpoint().withEndpointType("unygaeqid").withAddress("qfatpxllrxcyjm"), + "xkgymareqnajxqu", + new DeviceMessagingEndpoint().withEndpointType("uvarmywdmjsjq").withAddress("jhhyxxrwlycoduhp"))); model = BinaryData.fromObject(model).toObject(OutboundEndpoints.class); - Assertions.assertEquals("uqerpqlpqwc", model.assigned().get("btkuwhh").endpointType()); - Assertions.assertEquals("iuqgbdbutauv", model.assigned().get("btkuwhh").address()); - Assertions.assertEquals("e", model.unassigned().get("wlquuijfqkace").endpointType()); - Assertions.assertEquals("nzar", model.unassigned().get("wlquuijfqkace").address()); + Assertions.assertEquals("enwabfatk", model.assigned().get("osphyoul").endpointType()); + Assertions.assertEquals("ddxbjhwuaanoz", model.assigned().get("osphyoul").address()); + Assertions.assertEquals("xagl", model.unassigned().get("tx").endpointType()); + Assertions.assertEquals("vimjwos", model.unassigned().get("tx").address()); } // Use "Map.of" if available diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaInnerTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaInnerTests.java index 917badbdeaa7..7b1659c85ba6 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaInnerTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaInnerTests.java @@ -17,28 +17,29 @@ public final class SchemaInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SchemaInner model = BinaryData.fromString( - "{\"properties\":{\"uuid\":\"etttwgdslqxihhr\",\"displayName\":\"oi\",\"description\":\"seypxiutcxapz\",\"format\":\"JsonSchema/draft-07\",\"schemaType\":\"MessageSchema\",\"provisioningState\":\"Succeeded\",\"tags\":{\"bjoxs\":\"g\"}},\"id\":\"vnh\",\"name\":\"abrqnkkzj\",\"type\":\"jb\"}") + "{\"properties\":{\"uuid\":\"disdosfjbjsvgj\",\"displayName\":\"hryvy\",\"description\":\"t\",\"format\":\"JsonSchema/draft-07\",\"schemaType\":\"MessageSchema\",\"provisioningState\":\"Accepted\",\"tags\":{\"dhttzaefedxihchr\":\"knfnwmbtmvpdv\",\"crjdqnsdfzpbgtg\":\"hk\",\"utlwxezwzhok\":\"ylkdghrje\",\"ehgpp\":\"bwnhhtql\"}},\"id\":\"ifhpf\",\"name\":\"oajvgcxtxjcs\",\"type\":\"eafidltugsresm\"}") .toObject(SchemaInner.class); - Assertions.assertEquals("oi", model.properties().displayName()); - Assertions.assertEquals("seypxiutcxapz", model.properties().description()); + Assertions.assertEquals("hryvy", model.properties().displayName()); + Assertions.assertEquals("t", model.properties().description()); Assertions.assertEquals(Format.JSON_SCHEMA_DRAFT7, model.properties().format()); Assertions.assertEquals(SchemaType.MESSAGE_SCHEMA, model.properties().schemaType()); - Assertions.assertEquals("g", model.properties().tags().get("bjoxs")); + Assertions.assertEquals("knfnwmbtmvpdv", model.properties().tags().get("dhttzaefedxihchr")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SchemaInner model = new SchemaInner().withProperties(new SchemaProperties().withDisplayName("oi") - .withDescription("seypxiutcxapz") + SchemaInner model = new SchemaInner().withProperties(new SchemaProperties().withDisplayName("hryvy") + .withDescription("t") .withFormat(Format.JSON_SCHEMA_DRAFT7) .withSchemaType(SchemaType.MESSAGE_SCHEMA) - .withTags(mapOf("bjoxs", "g"))); + .withTags(mapOf("dhttzaefedxihchr", "knfnwmbtmvpdv", "crjdqnsdfzpbgtg", "hk", "utlwxezwzhok", "ylkdghrje", + "ehgpp", "bwnhhtql"))); model = BinaryData.fromObject(model).toObject(SchemaInner.class); - Assertions.assertEquals("oi", model.properties().displayName()); - Assertions.assertEquals("seypxiutcxapz", model.properties().description()); + Assertions.assertEquals("hryvy", model.properties().displayName()); + Assertions.assertEquals("t", model.properties().description()); Assertions.assertEquals(Format.JSON_SCHEMA_DRAFT7, model.properties().format()); Assertions.assertEquals(SchemaType.MESSAGE_SCHEMA, model.properties().schemaType()); - Assertions.assertEquals("g", model.properties().tags().get("bjoxs")); + Assertions.assertEquals("knfnwmbtmvpdv", model.properties().tags().get("dhttzaefedxihchr")); } // Use "Map.of" if available diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaListResultTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaListResultTests.java index f1fe3008ef2e..cfac8c704530 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaListResultTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaListResultTests.java @@ -14,13 +14,13 @@ public final class SchemaListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SchemaListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"uuid\":\"mylweazulc\",\"displayName\":\"thwwn\",\"description\":\"hlf\",\"format\":\"Delta/1.0\",\"schemaType\":\"MessageSchema\",\"provisioningState\":\"Succeeded\",\"tags\":{\"fepgfew\":\"ahfbous\",\"gncxykxhdj\":\"twly\",\"bcporxvxcjzhqizx\":\"limmbcxf\",\"t\":\"pxtgqscjav\"}},\"id\":\"hdqazkmtgguwp\",\"name\":\"jrajcivm\",\"type\":\"ghfcfiwrxgkneuvy\"},{\"properties\":{\"uuid\":\"qodfvp\",\"displayName\":\"hoxgsgbpf\",\"description\":\"djtxvzflbq\",\"format\":\"Delta/1.0\",\"schemaType\":\"MessageSchema\",\"provisioningState\":\"Canceled\",\"tags\":{\"cqusr\":\"a\",\"lduycv\":\"vetnwsdtutn\"}},\"id\":\"hyrmewipmvekdx\",\"name\":\"kuqgsjjxundxgket\",\"type\":\"zhhzjhfjmhvvmu\"},{\"properties\":{\"uuid\":\"mun\",\"displayName\":\"sx\",\"description\":\"hfbuzjyihsasbhud\",\"format\":\"Delta/1.0\",\"schemaType\":\"MessageSchema\",\"provisioningState\":\"Canceled\",\"tags\":{\"ynsqyrpfoobr\":\"ms\",\"qdnfwqzdz\":\"ttymsjny\",\"fhqlyvi\":\"tilaxh\"}},\"id\":\"uwivkxoy\",\"name\":\"un\",\"type\":\"ixxrtikvcpw\"}],\"nextLink\":\"clrcivtsox\"}") + "{\"value\":[{\"properties\":{\"uuid\":\"guufuzboyjathwtz\",\"displayName\":\"b\",\"description\":\"mwmdxmebwjscjpa\",\"format\":\"Delta/1.0\",\"schemaType\":\"MessageSchema\",\"provisioningState\":\"Accepted\",\"tags\":{\"xnmwmqtibxyijddt\":\"f\",\"ekpndzaapmudq\":\"qcttadijaeukmrsi\",\"gp\":\"eqw\",\"qwyxebeybpm\":\"bu\"}},\"id\":\"nrtffyaqi\",\"name\":\"mhh\",\"type\":\"ioqaqhvs\"},{\"properties\":{\"uuid\":\"uqyrxpdl\",\"displayName\":\"qlsismjqfrddg\",\"description\":\"quhiosrsjuivf\",\"format\":\"Delta/1.0\",\"schemaType\":\"MessageSchema\",\"provisioningState\":\"Failed\",\"tags\":{\"rxzbujr\":\"nxzhcze\",\"nlnzonzlrpi\":\"rhqvwrevkh\"}},\"id\":\"wncvjtszcofiz\",\"name\":\"htd\",\"type\":\"gbjkvreljeamur\"}],\"nextLink\":\"mlovuanashcxl\"}") .toObject(SchemaListResult.class); - Assertions.assertEquals("thwwn", model.value().get(0).properties().displayName()); - Assertions.assertEquals("hlf", model.value().get(0).properties().description()); + Assertions.assertEquals("b", model.value().get(0).properties().displayName()); + Assertions.assertEquals("mwmdxmebwjscjpa", model.value().get(0).properties().description()); Assertions.assertEquals(Format.DELTA_1_0, model.value().get(0).properties().format()); Assertions.assertEquals(SchemaType.MESSAGE_SCHEMA, model.value().get(0).properties().schemaType()); - Assertions.assertEquals("ahfbous", model.value().get(0).properties().tags().get("fepgfew")); - Assertions.assertEquals("clrcivtsox", model.nextLink()); + Assertions.assertEquals("f", model.value().get(0).properties().tags().get("xnmwmqtibxyijddt")); + Assertions.assertEquals("mlovuanashcxl", model.nextLink()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaPropertiesTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaPropertiesTests.java index 2ac166c4592f..d5f97924dce1 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaPropertiesTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaPropertiesTests.java @@ -16,29 +16,29 @@ public final class SchemaPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SchemaProperties model = BinaryData.fromString( - "{\"uuid\":\"gaehvvibrxjjst\",\"displayName\":\"beitpkx\",\"description\":\"moob\",\"format\":\"Delta/1.0\",\"schemaType\":\"MessageSchema\",\"provisioningState\":\"Accepted\",\"tags\":{\"qmpimaqxzhem\":\"fc\",\"lkb\":\"yhohujswtwkozzwc\",\"jwltlwtjjgu\":\"wpfaj\",\"oaimlnw\":\"talhsnvkcdmxzr\"}}") + "{\"uuid\":\"sjhoiftxfkfwegpr\",\"displayName\":\"tillucbiqtg\",\"description\":\"ohmcwsld\",\"format\":\"JsonSchema/draft-07\",\"schemaType\":\"MessageSchema\",\"provisioningState\":\"Canceled\",\"tags\":{\"llibphbqzmizak\":\"bra\",\"jpdn\":\"kan\",\"xprimrsop\":\"zhajoylhjlmuo\",\"stvasylwxdzaumw\":\"eecjmeis\"}}") .toObject(SchemaProperties.class); - Assertions.assertEquals("beitpkx", model.displayName()); - Assertions.assertEquals("moob", model.description()); - Assertions.assertEquals(Format.DELTA_1_0, model.format()); + Assertions.assertEquals("tillucbiqtg", model.displayName()); + Assertions.assertEquals("ohmcwsld", model.description()); + Assertions.assertEquals(Format.JSON_SCHEMA_DRAFT7, model.format()); Assertions.assertEquals(SchemaType.MESSAGE_SCHEMA, model.schemaType()); - Assertions.assertEquals("fc", model.tags().get("qmpimaqxzhem")); + Assertions.assertEquals("bra", model.tags().get("llibphbqzmizak")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SchemaProperties model = new SchemaProperties().withDisplayName("beitpkx") - .withDescription("moob") - .withFormat(Format.DELTA_1_0) + SchemaProperties model = new SchemaProperties().withDisplayName("tillucbiqtg") + .withDescription("ohmcwsld") + .withFormat(Format.JSON_SCHEMA_DRAFT7) .withSchemaType(SchemaType.MESSAGE_SCHEMA) - .withTags(mapOf("qmpimaqxzhem", "fc", "lkb", "yhohujswtwkozzwc", "jwltlwtjjgu", "wpfaj", "oaimlnw", - "talhsnvkcdmxzr")); + .withTags(mapOf("llibphbqzmizak", "bra", "jpdn", "kan", "xprimrsop", "zhajoylhjlmuo", "stvasylwxdzaumw", + "eecjmeis")); model = BinaryData.fromObject(model).toObject(SchemaProperties.class); - Assertions.assertEquals("beitpkx", model.displayName()); - Assertions.assertEquals("moob", model.description()); - Assertions.assertEquals(Format.DELTA_1_0, model.format()); + Assertions.assertEquals("tillucbiqtg", model.displayName()); + Assertions.assertEquals("ohmcwsld", model.description()); + Assertions.assertEquals(Format.JSON_SCHEMA_DRAFT7, model.format()); Assertions.assertEquals(SchemaType.MESSAGE_SCHEMA, model.schemaType()); - Assertions.assertEquals("fc", model.tags().get("qmpimaqxzhem")); + Assertions.assertEquals("bra", model.tags().get("llibphbqzmizak")); } // Use "Map.of" if available diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesCreateOrReplaceMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesCreateOrReplaceMockTests.java index aec81587e90c..6a988af1d22f 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesCreateOrReplaceMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesCreateOrReplaceMockTests.java @@ -26,7 +26,7 @@ public final class SchemaRegistriesCreateOrReplaceMockTests { @Test public void testCreateOrReplace() throws Exception { String responseStr - = "{\"properties\":{\"uuid\":\"aoypny\",\"namespace\":\"hshxcylhkgmnsghp\",\"displayName\":\"cphdrwjjkhvyo\",\"description\":\"c\",\"storageAccountContainerUrl\":\"u\",\"provisioningState\":\"Succeeded\"},\"identity\":{\"principalId\":\"mhrpqpdfw\",\"tenantId\":\"oi\",\"type\":\"None\"},\"location\":\"ssffxuifmc\",\"tags\":{\"llg\":\"obkdqzrdzsyl\"},\"id\":\"rc\",\"name\":\"zydmxzjijpvuaurk\",\"type\":\"hci\"}"; + = "{\"properties\":{\"uuid\":\"hzjkn\",\"namespace\":\"uxgvttxpnr\",\"displayName\":\"zaamrdixtrekid\",\"description\":\"yskbruff\",\"storageAccountContainerUrl\":\"l\",\"provisioningState\":\"Succeeded\"},\"identity\":{\"principalId\":\"tvlxhrpqh\",\"tenantId\":\"blcouqehbhbcdszi\",\"type\":\"None\"},\"location\":\"an\",\"tags\":{\"xldykalsygaolnjp\":\"pmbltoormkfql\",\"mr\":\"nbmjksibjgsjjxxa\",\"yqegx\":\"ad\",\"inbmh\":\"iv\"},\"id\":\"bjijkgqxnh\",\"name\":\"bkezn\",\"type\":\"aujvaa\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,23 +36,23 @@ public void testCreateOrReplace() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SchemaRegistry response = manager.schemaRegistries() - .define("kdfrdbiqmrjgeihf") - .withRegion("zmoaeds") - .withExistingResourceGroup("nssqyzqed") - .withTags(mapOf("psmgo", "uivedwcgyeewxeiq", "l", "guamlj")) - .withProperties(new SchemaRegistryProperties().withNamespace("phmgtvljvrcmyfq") - .withDisplayName("gxhnpomyqwcabv") - .withDescription("ilee") - .withStorageAccountContainerUrl("aswlp")) + .define("uflgbhgauacdixm") + .withRegion("sgxjc") + .withExistingResourceGroup("hulrtywikdmhla") + .withTags(mapOf("qwodiffjx", "rrscubiwsdrnp", "jogjonmc", "jrmmuabwib")) + .withProperties(new SchemaRegistryProperties().withNamespace("yjq") + .withDisplayName("kfnozoeoqbvj") + .withDescription("efgwbmqjc") + .withStorageAccountContainerUrl("ntasfaymxbu")) .withIdentity(new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.NONE)) .create(); - Assertions.assertEquals("ssffxuifmc", response.location()); - Assertions.assertEquals("obkdqzrdzsyl", response.tags().get("llg")); - Assertions.assertEquals("hshxcylhkgmnsghp", response.properties().namespace()); - Assertions.assertEquals("cphdrwjjkhvyo", response.properties().displayName()); - Assertions.assertEquals("c", response.properties().description()); - Assertions.assertEquals("u", response.properties().storageAccountContainerUrl()); + Assertions.assertEquals("an", response.location()); + Assertions.assertEquals("pmbltoormkfql", response.tags().get("xldykalsygaolnjp")); + Assertions.assertEquals("uxgvttxpnr", response.properties().namespace()); + Assertions.assertEquals("zaamrdixtrekid", response.properties().displayName()); + Assertions.assertEquals("yskbruff", response.properties().description()); + Assertions.assertEquals("l", response.properties().storageAccountContainerUrl()); Assertions.assertEquals(SystemAssignedServiceIdentityType.NONE, response.identity().type()); } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesGetByResourceGroupWithResponseMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesGetByResourceGroupWithResponseMockTests.java index 266a3c2d10f0..a6ba922b19d0 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesGetByResourceGroupWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class SchemaRegistriesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"uuid\":\"xibdafhrkmdyo\",\"namespace\":\"kxfbvfbhdyirhp\",\"displayName\":\"gddeimaw\",\"description\":\"vgkk\",\"storageAccountContainerUrl\":\"muikjcjcaztbws\",\"provisioningState\":\"Canceled\"},\"identity\":{\"principalId\":\"xwc\",\"tenantId\":\"likytwvczcswka\",\"type\":\"None\"},\"location\":\"jyfdvlv\",\"tags\":{\"th\":\"rnfxtgddp\",\"naoyank\":\"hn\",\"swankltytmh\":\"oe\"},\"id\":\"roznnhdrlktgj\",\"name\":\"sggux\",\"type\":\"eml\"}"; + = "{\"properties\":{\"uuid\":\"brlc\",\"namespace\":\"rduczkgofxyfs\",\"displayName\":\"cvcrrp\",\"description\":\"ttbst\",\"storageAccountContainerUrl\":\"jeaq\",\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"fkoxmlghktuidvr\",\"tenantId\":\"zlpdwwex\",\"type\":\"SystemAssigned\"},\"location\":\"vlazipbhpwvqsgny\",\"tags\":{\"rpmey\":\"ziven\",\"jp\":\"vpkpatlb\",\"olmk\":\"gsksrfhf\",\"ommpvfqaw\":\"bnxwc\"},\"id\":\"fgbrtt\",\"name\":\"iac\",\"type\":\"kiexhajlfnthiq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,15 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SchemaRegistry response = manager.schemaRegistries() - .getByResourceGroupWithResponse("wjksghudgzhxo", "jggsvo", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("pibkephuu", "erctatoyin", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("jyfdvlv", response.location()); - Assertions.assertEquals("rnfxtgddp", response.tags().get("th")); - Assertions.assertEquals("kxfbvfbhdyirhp", response.properties().namespace()); - Assertions.assertEquals("gddeimaw", response.properties().displayName()); - Assertions.assertEquals("vgkk", response.properties().description()); - Assertions.assertEquals("muikjcjcaztbws", response.properties().storageAccountContainerUrl()); - Assertions.assertEquals(SystemAssignedServiceIdentityType.NONE, response.identity().type()); + Assertions.assertEquals("vlazipbhpwvqsgny", response.location()); + Assertions.assertEquals("ziven", response.tags().get("rpmey")); + Assertions.assertEquals("rduczkgofxyfs", response.properties().namespace()); + Assertions.assertEquals("cvcrrp", response.properties().displayName()); + Assertions.assertEquals("ttbst", response.properties().description()); + Assertions.assertEquals("jeaq", response.properties().storageAccountContainerUrl()); + Assertions.assertEquals(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesListByResourceGroupMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesListByResourceGroupMockTests.java index 6a02ec329ca4..7a3fa7ff6180 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesListByResourceGroupMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesListByResourceGroupMockTests.java @@ -23,7 +23,7 @@ public final class SchemaRegistriesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"uuid\":\"klelssxb\",\"namespace\":\"ycsxzu\",\"displayName\":\"srlsmd\",\"description\":\"qplpvmjc\",\"storageAccountContainerUrl\":\"oewbid\",\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"wxvgpiudeugfsxze\",\"tenantId\":\"axwk\",\"type\":\"SystemAssigned\"},\"location\":\"khvuhxepmrutz\",\"tags\":{\"lujdjltymkmv\":\"aobn\",\"pphkixkykxds\":\"uihywart\"},\"id\":\"j\",\"name\":\"emmucfxh\",\"type\":\"kkflrmymyincqlhr\"}]}"; + = "{\"value\":[{\"properties\":{\"uuid\":\"yctww\",\"namespace\":\"zwxjlm\",\"displayName\":\"vogygzyvneez\",\"description\":\"fg\",\"storageAccountContainerUrl\":\"tmoqqtlffhzb\",\"provisioningState\":\"Failed\"},\"identity\":{\"principalId\":\"javfqn\",\"tenantId\":\"nq\",\"type\":\"SystemAssigned\"},\"location\":\"dogiyetesyp\",\"tags\":{\"etnjuhpsprkz\":\"bztjhqtfbovnynkb\",\"cxnafbwqrooh\":\"aupia\",\"mghihp\":\"uovmaonurjt\"},\"id\":\"ecmslclbl\",\"name\":\"jxl\",\"type\":\"bsjuscvsfx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,14 +33,14 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<SchemaRegistry> response - = manager.schemaRegistries().listByResourceGroup("ywaeeczgf", com.azure.core.util.Context.NONE); + = manager.schemaRegistries().listByResourceGroup("yuttdiygbpvnwswm", com.azure.core.util.Context.NONE); - Assertions.assertEquals("khvuhxepmrutz", response.iterator().next().location()); - Assertions.assertEquals("aobn", response.iterator().next().tags().get("lujdjltymkmv")); - Assertions.assertEquals("ycsxzu", response.iterator().next().properties().namespace()); - Assertions.assertEquals("srlsmd", response.iterator().next().properties().displayName()); - Assertions.assertEquals("qplpvmjc", response.iterator().next().properties().description()); - Assertions.assertEquals("oewbid", response.iterator().next().properties().storageAccountContainerUrl()); + Assertions.assertEquals("dogiyetesyp", response.iterator().next().location()); + Assertions.assertEquals("bztjhqtfbovnynkb", response.iterator().next().tags().get("etnjuhpsprkz")); + Assertions.assertEquals("zwxjlm", response.iterator().next().properties().namespace()); + Assertions.assertEquals("vogygzyvneez", response.iterator().next().properties().displayName()); + Assertions.assertEquals("fg", response.iterator().next().properties().description()); + Assertions.assertEquals("tmoqqtlffhzb", response.iterator().next().properties().storageAccountContainerUrl()); Assertions.assertEquals(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesListMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesListMockTests.java index 9d3de242e6b2..fb7e20c513f0 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesListMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesListMockTests.java @@ -23,7 +23,7 @@ public final class SchemaRegistriesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"uuid\":\"sl\",\"namespace\":\"iiiovgqcgxuugq\",\"displayName\":\"totiowlxteqdptjg\",\"description\":\"tgukranblwphql\",\"storageAccountContainerUrl\":\"ccuzgygq\",\"provisioningState\":\"Canceled\"},\"identity\":{\"principalId\":\"ulwgniiprglvawuw\",\"tenantId\":\"ufypiv\",\"type\":\"None\"},\"location\":\"bjpmcubk\",\"tags\":{\"avp\":\"oxxkubvp\"},\"id\":\"h\",\"name\":\"rbqgvgov\",\"type\":\"bbttefjo\"}]}"; + = "{\"value\":[{\"properties\":{\"uuid\":\"tmgxuupbezqcc\",\"namespace\":\"drtc\",\"displayName\":\"kdqkkyihzt\",\"description\":\"qm\",\"storageAccountContainerUrl\":\"qzgwldoychil\",\"provisioningState\":\"Accepted\"},\"identity\":{\"principalId\":\"ehuwaoa\",\"tenantId\":\"h\",\"type\":\"None\"},\"location\":\"llizs\",\"tags\":{\"weftkwq\":\"sjvh\",\"vssehaepw\":\"jp\",\"euknijduyyes\":\"mcxtczhu\"},\"id\":\"ydjfb\",\"name\":\"c\",\"type\":\"v\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,12 +34,12 @@ public void testList() throws Exception { PagedIterable<SchemaRegistry> response = manager.schemaRegistries().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("bjpmcubk", response.iterator().next().location()); - Assertions.assertEquals("oxxkubvp", response.iterator().next().tags().get("avp")); - Assertions.assertEquals("iiiovgqcgxuugq", response.iterator().next().properties().namespace()); - Assertions.assertEquals("totiowlxteqdptjg", response.iterator().next().properties().displayName()); - Assertions.assertEquals("tgukranblwphql", response.iterator().next().properties().description()); - Assertions.assertEquals("ccuzgygq", response.iterator().next().properties().storageAccountContainerUrl()); + Assertions.assertEquals("llizs", response.iterator().next().location()); + Assertions.assertEquals("sjvh", response.iterator().next().tags().get("weftkwq")); + Assertions.assertEquals("drtc", response.iterator().next().properties().namespace()); + Assertions.assertEquals("kdqkkyihzt", response.iterator().next().properties().displayName()); + Assertions.assertEquals("qm", response.iterator().next().properties().description()); + Assertions.assertEquals("qzgwldoychil", response.iterator().next().properties().storageAccountContainerUrl()); Assertions.assertEquals(SystemAssignedServiceIdentityType.NONE, response.iterator().next().identity().type()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryInnerTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryInnerTests.java index 6d8a5feb08cf..0b369dd29c92 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryInnerTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryInnerTests.java @@ -17,34 +17,34 @@ public final class SchemaRegistryInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SchemaRegistryInner model = BinaryData.fromString( - "{\"properties\":{\"uuid\":\"ld\",\"namespace\":\"x\",\"displayName\":\"firclnpkciayz\",\"description\":\"ykhyawfvjlboxqvk\",\"storageAccountContainerUrl\":\"lmxhomdyn\",\"provisioningState\":\"Accepted\"},\"identity\":{\"principalId\":\"gumbnraauzzptja\",\"tenantId\":\"sdzhezww\",\"type\":\"SystemAssigned\"},\"location\":\"qyuvvfonkp\",\"tags\":{\"y\":\"yik\",\"vluwmncsttij\":\"auy\"},\"id\":\"y\",\"name\":\"vpo\",\"type\":\"krsgsgb\"}") + "{\"properties\":{\"uuid\":\"xcjzhqizxfpxt\",\"namespace\":\"qscjavftjuh\",\"displayName\":\"azkmtgguwp\",\"description\":\"r\",\"storageAccountContainerUrl\":\"jcivmmg\",\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"wrxgkneuvy\",\"tenantId\":\"zqodfvpgshox\",\"type\":\"SystemAssigned\"},\"location\":\"bpfgzdj\",\"tags\":{\"qvlgafcqusrdvetn\":\"zflbqvg\",\"uzhyrmewipmvekdx\":\"sdtutnwlduyc\"},\"id\":\"kuqgsjjxundxgket\",\"name\":\"zhhzjhfjmhvvmu\",\"type\":\"gpmuneqsxvmhfbuz\"}") .toObject(SchemaRegistryInner.class); - Assertions.assertEquals("qyuvvfonkp", model.location()); - Assertions.assertEquals("yik", model.tags().get("y")); - Assertions.assertEquals("x", model.properties().namespace()); - Assertions.assertEquals("firclnpkciayz", model.properties().displayName()); - Assertions.assertEquals("ykhyawfvjlboxqvk", model.properties().description()); - Assertions.assertEquals("lmxhomdyn", model.properties().storageAccountContainerUrl()); + Assertions.assertEquals("bpfgzdj", model.location()); + Assertions.assertEquals("zflbqvg", model.tags().get("qvlgafcqusrdvetn")); + Assertions.assertEquals("qscjavftjuh", model.properties().namespace()); + Assertions.assertEquals("azkmtgguwp", model.properties().displayName()); + Assertions.assertEquals("r", model.properties().description()); + Assertions.assertEquals("jcivmmg", model.properties().storageAccountContainerUrl()); Assertions.assertEquals(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SchemaRegistryInner model = new SchemaRegistryInner().withLocation("qyuvvfonkp") - .withTags(mapOf("y", "yik", "vluwmncsttij", "auy")) - .withProperties(new SchemaRegistryProperties().withNamespace("x") - .withDisplayName("firclnpkciayz") - .withDescription("ykhyawfvjlboxqvk") - .withStorageAccountContainerUrl("lmxhomdyn")) + SchemaRegistryInner model = new SchemaRegistryInner().withLocation("bpfgzdj") + .withTags(mapOf("qvlgafcqusrdvetn", "zflbqvg", "uzhyrmewipmvekdx", "sdtutnwlduyc")) + .withProperties(new SchemaRegistryProperties().withNamespace("qscjavftjuh") + .withDisplayName("azkmtgguwp") + .withDescription("r") + .withStorageAccountContainerUrl("jcivmmg")) .withIdentity( new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED)); model = BinaryData.fromObject(model).toObject(SchemaRegistryInner.class); - Assertions.assertEquals("qyuvvfonkp", model.location()); - Assertions.assertEquals("yik", model.tags().get("y")); - Assertions.assertEquals("x", model.properties().namespace()); - Assertions.assertEquals("firclnpkciayz", model.properties().displayName()); - Assertions.assertEquals("ykhyawfvjlboxqvk", model.properties().description()); - Assertions.assertEquals("lmxhomdyn", model.properties().storageAccountContainerUrl()); + Assertions.assertEquals("bpfgzdj", model.location()); + Assertions.assertEquals("zflbqvg", model.tags().get("qvlgafcqusrdvetn")); + Assertions.assertEquals("qscjavftjuh", model.properties().namespace()); + Assertions.assertEquals("azkmtgguwp", model.properties().displayName()); + Assertions.assertEquals("r", model.properties().description()); + Assertions.assertEquals("jcivmmg", model.properties().storageAccountContainerUrl()); Assertions.assertEquals(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryListResultTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryListResultTests.java index ea0ab4e90528..bbfae9891944 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryListResultTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryListResultTests.java @@ -13,15 +13,16 @@ public final class SchemaRegistryListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SchemaRegistryListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"uuid\":\"vfvfcj\",\"namespace\":\"aeoisrvh\",\"displayName\":\"orffukiscv\",\"description\":\"zhwplefaxvxilc\",\"storageAccountContainerUrl\":\"tg\",\"provisioningState\":\"Canceled\"},\"identity\":{\"principalId\":\"yqxtjjfzql\",\"tenantId\":\"ycavodggxdbees\",\"type\":\"None\"},\"location\":\"knlrariaawiuagy\",\"tags\":{\"agt\":\"fbylyrfg\"},\"id\":\"ojocqwogf\",\"name\":\"zjvusfzldmo\",\"type\":\"uxylfsbtkadpy\"},{\"properties\":{\"uuid\":\"nbtgkbugrjqctoj\",\"namespace\":\"mi\",\"displayName\":\"fieypefojyqdhcup\",\"description\":\"plcwkhi\",\"storageAccountContainerUrl\":\"ihlhzdsqtzb\",\"provisioningState\":\"Failed\"},\"identity\":{\"principalId\":\"wcjhfgmv\",\"tenantId\":\"actxmwoteyowc\",\"type\":\"SystemAssigned\"},\"location\":\"ovekqvgqouwi\",\"tags\":{\"ikf\":\"pjwyiv\"},\"id\":\"cvhrfsp\",\"name\":\"uagrttikteusqc\",\"type\":\"kvyklxubyjaffmm\"}],\"nextLink\":\"lcqcuubgqibrt\"}") + "{\"value\":[{\"properties\":{\"uuid\":\"alzxwhcan\",\"namespace\":\"ymo\",\"displayName\":\"hlwigdivbkbxg\",\"description\":\"fajuwas\",\"storageAccountContainerUrl\":\"vdaeyyguxakjsq\",\"provisioningState\":\"Canceled\"},\"identity\":{\"principalId\":\"zkgimsid\",\"tenantId\":\"sicddyvv\",\"type\":\"SystemAssigned\"},\"location\":\"gfmo\",\"tags\":{\"hnakzyb\":\"hpqgatjeaahhvj\"},\"id\":\"jjidjk\",\"name\":\"yxkyxvx\",\"type\":\"vblbjednljlageua\"},{\"properties\":{\"uuid\":\"unsmjbnkpp\",\"namespace\":\"ynenlsvxeizz\",\"displayName\":\"klnsrmffey\",\"description\":\"ckt\",\"storageAccountContainerUrl\":\"iymerteeammxqi\",\"provisioningState\":\"Failed\"},\"identity\":{\"principalId\":\"ddrtkgdojb\",\"tenantId\":\"vavrefdees\",\"type\":\"SystemAssigned\"},\"location\":\"uij\",\"tags\":{\"wprtu\":\"xs\"},\"id\":\"wsawddjibabxvi\",\"name\":\"itvtzeexavo\",\"type\":\"tfgle\"},{\"properties\":{\"uuid\":\"dqbwpypqtgsfja\",\"namespace\":\"b\",\"displayName\":\"hhxud\",\"description\":\"vodhtn\",\"storageAccountContainerUrl\":\"irudh\",\"provisioningState\":\"Succeeded\"},\"identity\":{\"principalId\":\"ckdlpag\",\"tenantId\":\"cxfailcfxwmdboxd\",\"type\":\"SystemAssigned\"},\"location\":\"ft\",\"tags\":{\"knh\":\"obrjlnacgcc\"},\"id\":\"kizvytn\",\"name\":\"zvulj\",\"type\":\"aaeranokqgukk\"}],\"nextLink\":\"nvbroylaxx\"}") .toObject(SchemaRegistryListResult.class); - Assertions.assertEquals("knlrariaawiuagy", model.value().get(0).location()); - Assertions.assertEquals("fbylyrfg", model.value().get(0).tags().get("agt")); - Assertions.assertEquals("aeoisrvh", model.value().get(0).properties().namespace()); - Assertions.assertEquals("orffukiscv", model.value().get(0).properties().displayName()); - Assertions.assertEquals("zhwplefaxvxilc", model.value().get(0).properties().description()); - Assertions.assertEquals("tg", model.value().get(0).properties().storageAccountContainerUrl()); - Assertions.assertEquals(SystemAssignedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("lcqcuubgqibrt", model.nextLink()); + Assertions.assertEquals("gfmo", model.value().get(0).location()); + Assertions.assertEquals("hpqgatjeaahhvj", model.value().get(0).tags().get("hnakzyb")); + Assertions.assertEquals("ymo", model.value().get(0).properties().namespace()); + Assertions.assertEquals("hlwigdivbkbxg", model.value().get(0).properties().displayName()); + Assertions.assertEquals("fajuwas", model.value().get(0).properties().description()); + Assertions.assertEquals("vdaeyyguxakjsq", model.value().get(0).properties().storageAccountContainerUrl()); + Assertions.assertEquals(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED, + model.value().get(0).identity().type()); + Assertions.assertEquals("nvbroylaxx", model.nextLink()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryPropertiesTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryPropertiesTests.java index 79d0adbc956d..2086862de57d 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryPropertiesTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryPropertiesTests.java @@ -12,24 +12,24 @@ public final class SchemaRegistryPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SchemaRegistryProperties model = BinaryData.fromString( - "{\"uuid\":\"uzqgnjdgkynsc\",\"namespace\":\"i\",\"displayName\":\"zvhxnk\",\"description\":\"tkubotppn\",\"storageAccountContainerUrl\":\"dxzxhi\",\"provisioningState\":\"Succeeded\"}") + "{\"uuid\":\"ihsasb\",\"namespace\":\"udypohyuems\",\"displayName\":\"nsqyrpfoobrltt\",\"description\":\"sjnygqdnfwqzdzgt\",\"storageAccountContainerUrl\":\"la\",\"provisioningState\":\"Failed\"}") .toObject(SchemaRegistryProperties.class); - Assertions.assertEquals("i", model.namespace()); - Assertions.assertEquals("zvhxnk", model.displayName()); - Assertions.assertEquals("tkubotppn", model.description()); - Assertions.assertEquals("dxzxhi", model.storageAccountContainerUrl()); + Assertions.assertEquals("udypohyuems", model.namespace()); + Assertions.assertEquals("nsqyrpfoobrltt", model.displayName()); + Assertions.assertEquals("sjnygqdnfwqzdzgt", model.description()); + Assertions.assertEquals("la", model.storageAccountContainerUrl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SchemaRegistryProperties model = new SchemaRegistryProperties().withNamespace("i") - .withDisplayName("zvhxnk") - .withDescription("tkubotppn") - .withStorageAccountContainerUrl("dxzxhi"); + SchemaRegistryProperties model = new SchemaRegistryProperties().withNamespace("udypohyuems") + .withDisplayName("nsqyrpfoobrltt") + .withDescription("sjnygqdnfwqzdzgt") + .withStorageAccountContainerUrl("la"); model = BinaryData.fromObject(model).toObject(SchemaRegistryProperties.class); - Assertions.assertEquals("i", model.namespace()); - Assertions.assertEquals("zvhxnk", model.displayName()); - Assertions.assertEquals("tkubotppn", model.description()); - Assertions.assertEquals("dxzxhi", model.storageAccountContainerUrl()); + Assertions.assertEquals("udypohyuems", model.namespace()); + Assertions.assertEquals("nsqyrpfoobrltt", model.displayName()); + Assertions.assertEquals("sjnygqdnfwqzdzgt", model.description()); + Assertions.assertEquals("la", model.storageAccountContainerUrl()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryUpdatePropertiesTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryUpdatePropertiesTests.java index dd5c4be757e2..fb80c47490c6 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryUpdatePropertiesTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryUpdatePropertiesTests.java @@ -12,18 +12,18 @@ public final class SchemaRegistryUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SchemaRegistryUpdateProperties model - = BinaryData.fromString("{\"displayName\":\"oyxcdyuib\",\"description\":\"fdn\"}") + = BinaryData.fromString("{\"displayName\":\"itgvkx\",\"description\":\"yqdrf\"}") .toObject(SchemaRegistryUpdateProperties.class); - Assertions.assertEquals("oyxcdyuib", model.displayName()); - Assertions.assertEquals("fdn", model.description()); + Assertions.assertEquals("itgvkx", model.displayName()); + Assertions.assertEquals("yqdrf", model.description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SchemaRegistryUpdateProperties model - = new SchemaRegistryUpdateProperties().withDisplayName("oyxcdyuib").withDescription("fdn"); + = new SchemaRegistryUpdateProperties().withDisplayName("itgvkx").withDescription("yqdrf"); model = BinaryData.fromObject(model).toObject(SchemaRegistryUpdateProperties.class); - Assertions.assertEquals("oyxcdyuib", model.displayName()); - Assertions.assertEquals("fdn", model.description()); + Assertions.assertEquals("itgvkx", model.displayName()); + Assertions.assertEquals("yqdrf", model.description()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryUpdateTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryUpdateTests.java index b7b8eed35e0c..d0d7da339ab8 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryUpdateTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryUpdateTests.java @@ -17,25 +17,26 @@ public final class SchemaRegistryUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SchemaRegistryUpdate model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"cev\",\"tenantId\":\"gtltdhlf\",\"type\":\"None\"},\"tags\":{\"vgtrdcnifmzzs\":\"py\",\"g\":\"ymbrnysuxmpraf\",\"roud\":\"khocxvdfffwaf\",\"hrv\":\"spave\"},\"properties\":{\"displayName\":\"n\",\"description\":\"zudhcxg\"}}") + "{\"identity\":{\"principalId\":\"qlyvijo\",\"tenantId\":\"iv\",\"type\":\"SystemAssigned\"},\"tags\":{\"ti\":\"zunbixx\",\"vtsoxf\":\"vcpwpgclrc\",\"m\":\"kenx\",\"ao\":\"yefrpmpdnqqska\"},\"properties\":{\"displayName\":\"mbnpqf\",\"description\":\"qlkzme\"}}") .toObject(SchemaRegistryUpdate.class); - Assertions.assertEquals(SystemAssignedServiceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("py", model.tags().get("vgtrdcnifmzzs")); - Assertions.assertEquals("n", model.properties().displayName()); - Assertions.assertEquals("zudhcxg", model.properties().description()); + Assertions.assertEquals(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("zunbixx", model.tags().get("ti")); + Assertions.assertEquals("mbnpqf", model.properties().displayName()); + Assertions.assertEquals("qlkzme", model.properties().description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SchemaRegistryUpdate model = new SchemaRegistryUpdate() - .withIdentity(new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.NONE)) - .withTags(mapOf("vgtrdcnifmzzs", "py", "g", "ymbrnysuxmpraf", "roud", "khocxvdfffwaf", "hrv", "spave")) - .withProperties(new SchemaRegistryUpdateProperties().withDisplayName("n").withDescription("zudhcxg")); + .withIdentity( + new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED)) + .withTags(mapOf("ti", "zunbixx", "vtsoxf", "vcpwpgclrc", "m", "kenx", "ao", "yefrpmpdnqqska")) + .withProperties(new SchemaRegistryUpdateProperties().withDisplayName("mbnpqf").withDescription("qlkzme")); model = BinaryData.fromObject(model).toObject(SchemaRegistryUpdate.class); - Assertions.assertEquals(SystemAssignedServiceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("py", model.tags().get("vgtrdcnifmzzs")); - Assertions.assertEquals("n", model.properties().displayName()); - Assertions.assertEquals("zudhcxg", model.properties().description()); + Assertions.assertEquals(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("zunbixx", model.tags().get("ti")); + Assertions.assertEquals("mbnpqf", model.properties().displayName()); + Assertions.assertEquals("qlkzme", model.properties().description()); } // Use "Map.of" if available diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionInnerTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionInnerTests.java index 2716fcfa369c..c5c9b773f031 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionInnerTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionInnerTests.java @@ -13,18 +13,18 @@ public final class SchemaVersionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SchemaVersionInner model = BinaryData.fromString( - "{\"properties\":{\"uuid\":\"enxpmyyefr\",\"description\":\"pdnqqskawaoqvmmb\",\"schemaContent\":\"pqfrtqlkz\",\"hash\":\"gnitgvkxlzyq\",\"provisioningState\":\"Succeeded\"},\"id\":\"gcealzxwh\",\"name\":\"ansym\",\"type\":\"yqhlwigdivbkbx\"}") + "{\"properties\":{\"uuid\":\"erbdk\",\"description\":\"vidizozsdb\",\"schemaContent\":\"cxjmonfdgnwncyp\",\"hash\":\"w\",\"provisioningState\":\"Canceled\"},\"id\":\"uqj\",\"name\":\"tzenk\",\"type\":\"if\"}") .toObject(SchemaVersionInner.class); - Assertions.assertEquals("pdnqqskawaoqvmmb", model.properties().description()); - Assertions.assertEquals("pqfrtqlkz", model.properties().schemaContent()); + Assertions.assertEquals("vidizozsdb", model.properties().description()); + Assertions.assertEquals("cxjmonfdgnwncyp", model.properties().schemaContent()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SchemaVersionInner model = new SchemaVersionInner().withProperties( - new SchemaVersionProperties().withDescription("pdnqqskawaoqvmmb").withSchemaContent("pqfrtqlkz")); + new SchemaVersionProperties().withDescription("vidizozsdb").withSchemaContent("cxjmonfdgnwncyp")); model = BinaryData.fromObject(model).toObject(SchemaVersionInner.class); - Assertions.assertEquals("pdnqqskawaoqvmmb", model.properties().description()); - Assertions.assertEquals("pqfrtqlkz", model.properties().schemaContent()); + Assertions.assertEquals("vidizozsdb", model.properties().description()); + Assertions.assertEquals("cxjmonfdgnwncyp", model.properties().schemaContent()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionListResultTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionListResultTests.java index 8634297214d2..0aafecb50236 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionListResultTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionListResultTests.java @@ -12,10 +12,10 @@ public final class SchemaVersionListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SchemaVersionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"uuid\":\"bezkgimsidxasic\",\"description\":\"yvvjskgfmo\",\"schemaContent\":\"wa\",\"hash\":\"qgatjeaahhvjhhn\",\"provisioningState\":\"Failed\"},\"id\":\"bbjjidjksyxk\",\"name\":\"xvxevblbjednljla\",\"type\":\"euaulxu\"},{\"properties\":{\"uuid\":\"jbnkpp\",\"description\":\"nenlsvxeizzg\",\"schemaContent\":\"klnsrmffey\",\"hash\":\"ckt\",\"provisioningState\":\"Accepted\"},\"id\":\"erteeammxqiekk\",\"name\":\"zddrt\",\"type\":\"g\"},{\"properties\":{\"uuid\":\"bmxva\",\"description\":\"efdeesve\",\"schemaContent\":\"uij\",\"hash\":\"txsu\",\"provisioningState\":\"Failed\"},\"id\":\"ujwsawddjibabxvi\",\"name\":\"itvtzeexavo\",\"type\":\"tfgle\"}],\"nextLink\":\"m\"}") + "{\"value\":[{\"properties\":{\"uuid\":\"btuodxeszabbel\",\"description\":\"umuaslzkwrrwoycq\",\"schemaContent\":\"cwyhahno\",\"hash\":\"rkywuhpsvfuu\",\"provisioningState\":\"Failed\"},\"id\":\"we\",\"name\":\"xwlalniexzsrzpg\",\"type\":\"pqtybb\"},{\"properties\":{\"uuid\":\"gdakchz\",\"description\":\"lixqnrkcxkjibn\",\"schemaContent\":\"mysu\",\"hash\":\"wq\",\"provisioningState\":\"Succeeded\"},\"id\":\"lwi\",\"name\":\"psttexoq\",\"type\":\"pwcyyufmhr\"}],\"nextLink\":\"cuwmqsp\"}") .toObject(SchemaVersionListResult.class); - Assertions.assertEquals("yvvjskgfmo", model.value().get(0).properties().description()); - Assertions.assertEquals("wa", model.value().get(0).properties().schemaContent()); - Assertions.assertEquals("m", model.nextLink()); + Assertions.assertEquals("umuaslzkwrrwoycq", model.value().get(0).properties().description()); + Assertions.assertEquals("cwyhahno", model.value().get(0).properties().schemaContent()); + Assertions.assertEquals("cuwmqsp", model.nextLink()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionPropertiesTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionPropertiesTests.java index 2e66ad693cf1..e23f583ec16b 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionPropertiesTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionPropertiesTests.java @@ -12,17 +12,18 @@ public final class SchemaVersionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SchemaVersionProperties model = BinaryData.fromString( - "{\"uuid\":\"mf\",\"description\":\"uwasqvd\",\"schemaContent\":\"e\",\"hash\":\"guxak\",\"provisioningState\":\"Failed\"}") + "{\"uuid\":\"hmkdasvfl\",\"description\":\"bxcudchx\",\"schemaContent\":\"srboldforobw\",\"hash\":\"vizbfhfo\",\"provisioningState\":\"Accepted\"}") .toObject(SchemaVersionProperties.class); - Assertions.assertEquals("uwasqvd", model.description()); - Assertions.assertEquals("e", model.schemaContent()); + Assertions.assertEquals("bxcudchx", model.description()); + Assertions.assertEquals("srboldforobw", model.schemaContent()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SchemaVersionProperties model = new SchemaVersionProperties().withDescription("uwasqvd").withSchemaContent("e"); + SchemaVersionProperties model + = new SchemaVersionProperties().withDescription("bxcudchx").withSchemaContent("srboldforobw"); model = BinaryData.fromObject(model).toObject(SchemaVersionProperties.class); - Assertions.assertEquals("uwasqvd", model.description()); - Assertions.assertEquals("e", model.schemaContent()); + Assertions.assertEquals("bxcudchx", model.description()); + Assertions.assertEquals("srboldforobw", model.schemaContent()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsCreateOrReplaceWithResponseMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsCreateOrReplaceWithResponseMockTests.java index c38901e56fdb..44fce64f1a09 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsCreateOrReplaceWithResponseMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsCreateOrReplaceWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class SchemaVersionsCreateOrReplaceWithResponseMockTests { @Test public void testCreateOrReplaceWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"uuid\":\"njuhpsprkzya\",\"description\":\"ia\",\"schemaContent\":\"cxnafbwqrooh\",\"hash\":\"ovmaonurjtum\",\"provisioningState\":\"Accepted\"},\"id\":\"pv\",\"name\":\"cmslclblyjxltbs\",\"type\":\"uscv\"}"; + = "{\"properties\":{\"uuid\":\"vvlfntymtp\",\"description\":\"wenaz\",\"schemaContent\":\"r\",\"hash\":\"zrsq\",\"provisioningState\":\"Accepted\"},\"id\":\"kdnwqapfgsdpcve\",\"name\":\"smzhhkuuipldqqct\",\"type\":\"kva\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testCreateOrReplaceWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SchemaVersion response = manager.schemaVersions() - .define("fhzbkr") - .withExistingSchema("ecvo", "ygzyvneezaifght", "oqqtl") - .withProperties(new SchemaVersionProperties().withDescription("nq").withSchemaContent("ewdogiyetesy")) + .define("uvjmv") + .withExistingSchema("ueatgroe", "hoygzcbyfq", "kfaoytehq") + .withProperties(new SchemaVersionProperties().withDescription("ndljdjuskbr").withSchemaContent("eqy")) .create(); - Assertions.assertEquals("ia", response.properties().description()); - Assertions.assertEquals("cxnafbwqrooh", response.properties().schemaContent()); + Assertions.assertEquals("wenaz", response.properties().description()); + Assertions.assertEquals("r", response.properties().schemaContent()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsGetWithResponseMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsGetWithResponseMockTests.java index 0b7fa0550068..9451735d7f2d 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsGetWithResponseMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class SchemaVersionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"uuid\":\"rucvcrrpcjttbs\",\"description\":\"jeaq\",\"schemaContent\":\"rmvvfkoxmlghktui\",\"hash\":\"r\",\"provisioningState\":\"Failed\"},\"id\":\"pdwwexymzvlazi\",\"name\":\"bhpwvqsgnyy\",\"type\":\"uzivensrpmeyyvp\"}"; + = "{\"properties\":{\"uuid\":\"kphyjdxrav\",\"description\":\"qdbrxmrgc\",\"schemaContent\":\"bapxkiyfjjkb\",\"hash\":\"buscgduus\",\"provisioningState\":\"Canceled\"},\"id\":\"blevpmcluj\",\"name\":\"xkyxlzgs\",\"type\":\"gkzz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,11 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SchemaVersion response = manager.schemaVersions() - .getWithResponse("hu", "uerct", "toyint", "pbrlcyrduczkgofx", com.azure.core.util.Context.NONE) + .getWithResponse("blxydkxr", "vvbxiwkgfbqljnq", "hychocokuleh", "rqlrqffawe", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("jeaq", response.properties().description()); - Assertions.assertEquals("rmvvfkoxmlghktui", response.properties().schemaContent()); + Assertions.assertEquals("qdbrxmrgc", response.properties().description()); + Assertions.assertEquals("bapxkiyfjjkb", response.properties().schemaContent()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsListBySchemaMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsListBySchemaMockTests.java index 1939c157e140..dbda64571fa0 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsListBySchemaMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsListBySchemaMockTests.java @@ -22,7 +22,7 @@ public final class SchemaVersionsListBySchemaMockTests { @Test public void testListBySchema() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"uuid\":\"xwcdomm\",\"description\":\"fqawzfgbrttui\",\"schemaContent\":\"clkiexhajl\",\"hash\":\"t\",\"provisioningState\":\"Accepted\"},\"id\":\"yuttdiygbpvnwswm\",\"name\":\"xkyctwwgzwx\",\"type\":\"l\"}]}"; + = "{\"value\":[{\"properties\":{\"uuid\":\"pfdqwowftptnu\",\"description\":\"tkschgcgqyhl\",\"schemaContent\":\"seyqrhvyeldotjv\",\"hash\":\"wiswskukjtasbvw\",\"provisioningState\":\"Accepted\"},\"id\":\"xkdtxfkndlqvtwkn\",\"name\":\"gmmbu\",\"type\":\"tywatmqaq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListBySchema() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<SchemaVersion> response - = manager.schemaVersions().listBySchema("patlbijp", "gsksrfhf", "olmk", com.azure.core.util.Context.NONE); + = manager.schemaVersions().listBySchema("taf", "bzf", "ovwmbjlzqsczpgvd", com.azure.core.util.Context.NONE); - Assertions.assertEquals("fqawzfgbrttui", response.iterator().next().properties().description()); - Assertions.assertEquals("clkiexhajl", response.iterator().next().properties().schemaContent()); + Assertions.assertEquals("tkschgcgqyhl", response.iterator().next().properties().description()); + Assertions.assertEquals("seyqrhvyeldotjv", response.iterator().next().properties().schemaContent()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemasCreateOrReplaceWithResponseMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemasCreateOrReplaceWithResponseMockTests.java index d51e9e318fc7..8baf5f0dbb7c 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemasCreateOrReplaceWithResponseMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemasCreateOrReplaceWithResponseMockTests.java @@ -26,7 +26,7 @@ public final class SchemasCreateOrReplaceWithResponseMockTests { @Test public void testCreateOrReplaceWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"uuid\":\"dyvkfkmr\",\"displayName\":\"xne\",\"description\":\"sm\",\"format\":\"Delta/1.0\",\"schemaType\":\"MessageSchema\",\"provisioningState\":\"Accepted\",\"tags\":{\"vyuns\":\"apucygvo\",\"gvvpasek\":\"xlghieegj\",\"aq\":\"gbuxantuygdh\"}},\"id\":\"irpiwrqofulopmj\",\"name\":\"lexwhcbjp\",\"type\":\"bke\"}"; + = "{\"properties\":{\"uuid\":\"wxudgn\",\"displayName\":\"ookrtalvnbw\",\"description\":\"bemeluclvd\",\"format\":\"JsonSchema/draft-07\",\"schemaType\":\"MessageSchema\",\"provisioningState\":\"Failed\",\"tags\":{\"aqnvzoqgyipemchg\":\"nqodxahhxhq\",\"czuejdtxptl\":\"v\"}},\"id\":\"wzhomewjjstl\",\"name\":\"uhqawmoaianc\",\"type\":\"nvodrrs\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,20 +36,20 @@ public void testCreateOrReplaceWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Schema response = manager.schemas() - .define("rzdcgdzbenribcaw") - .withExistingSchemaRegistry("apcohhouc", "pqojxcx") - .withProperties(new SchemaProperties().withDisplayName("jwfljhznamtua") - .withDescription("zwcjjncqtj") + .define("bscm") + .withExistingSchemaRegistry("oyvivbsiz", "sjsz") + .withProperties(new SchemaProperties().withDisplayName("v") + .withDescription("xrerlniylylyf") .withFormat(Format.DELTA_1_0) .withSchemaType(SchemaType.MESSAGE_SCHEMA) - .withTags(mapOf("uuvbx", "gat", "ajqfutlx", "grebwggahttzlsw"))) + .withTags(mapOf("yjtcdxabbujftab", "ztwhghmupg"))) .create(); - Assertions.assertEquals("xne", response.properties().displayName()); - Assertions.assertEquals("sm", response.properties().description()); - Assertions.assertEquals(Format.DELTA_1_0, response.properties().format()); + Assertions.assertEquals("ookrtalvnbw", response.properties().displayName()); + Assertions.assertEquals("bemeluclvd", response.properties().description()); + Assertions.assertEquals(Format.JSON_SCHEMA_DRAFT7, response.properties().format()); Assertions.assertEquals(SchemaType.MESSAGE_SCHEMA, response.properties().schemaType()); - Assertions.assertEquals("apucygvo", response.properties().tags().get("vyuns")); + Assertions.assertEquals("nqodxahhxhq", response.properties().tags().get("aqnvzoqgyipemchg")); } // Use "Map.of" if available diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemasGetWithResponseMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemasGetWithResponseMockTests.java index f6a4d15c81f6..177f44d0905d 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemasGetWithResponseMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemasGetWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class SchemasGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"uuid\":\"bfihw\",\"displayName\":\"vctafsrb\",\"description\":\"blml\",\"format\":\"JsonSchema/draft-07\",\"schemaType\":\"MessageSchema\",\"provisioningState\":\"Deleting\",\"tags\":{\"xwqagnepzw\":\"p\",\"rxaomzisglrrcze\":\"klsbsbqqqagw\",\"hltnjadhqoawjq\":\"k\",\"byrrueqth\":\"yueayfbpcmsp\"}},\"id\":\"gnmbscbbxigdhx\",\"name\":\"idlopedbwdpy\",\"type\":\"yybxubmdnafcbqw\"}"; + = "{\"properties\":{\"uuid\":\"mbzmqk\",\"displayName\":\"tbnxwbjsid\",\"description\":\"rkfpks\",\"format\":\"JsonSchema/draft-07\",\"schemaType\":\"MessageSchema\",\"provisioningState\":\"Canceled\",\"tags\":{\"bguzozky\":\"wijymr\",\"zhhh\":\"wnf\",\"mffjkutycyarn\":\"o\"}},\"id\":\"ohguabz\",\"name\":\"ghktdpy\",\"type\":\"z\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,13 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Schema response = manager.schemas() - .getWithResponse("ldefxrdcoxn", "kkjanurnnqbnqbp", "zxqltgrdogypx", com.azure.core.util.Context.NONE) + .getWithResponse("nggiycwkdtaa", "xw", "ekaum", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("vctafsrb", response.properties().displayName()); - Assertions.assertEquals("blml", response.properties().description()); + Assertions.assertEquals("tbnxwbjsid", response.properties().displayName()); + Assertions.assertEquals("rkfpks", response.properties().description()); Assertions.assertEquals(Format.JSON_SCHEMA_DRAFT7, response.properties().format()); Assertions.assertEquals(SchemaType.MESSAGE_SCHEMA, response.properties().schemaType()); - Assertions.assertEquals("p", response.properties().tags().get("xwqagnepzw")); + Assertions.assertEquals("wijymr", response.properties().tags().get("bguzozky")); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemasListBySchemaRegistryMockTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemasListBySchemaRegistryMockTests.java index 6485b6bc15db..ef016bb2d9a6 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemasListBySchemaRegistryMockTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemasListBySchemaRegistryMockTests.java @@ -24,7 +24,7 @@ public final class SchemasListBySchemaRegistryMockTests { @Test public void testListBySchemaRegistry() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"uuid\":\"bvqvwzkjopwbeo\",\"displayName\":\"lkwzdqybxceakxcp\",\"description\":\"oqfyiaseqch\",\"format\":\"Delta/1.0\",\"schemaType\":\"MessageSchema\",\"provisioningState\":\"Accepted\",\"tags\":{\"zohmnrxxbs\":\"zisgykiuemvanb\",\"dptysprqs\":\"jklinh\"}},\"id\":\"zxojpslsv\",\"name\":\"g\",\"type\":\"liufiqwoyxq\"}]}"; + = "{\"value\":[{\"properties\":{\"uuid\":\"ttjzcfyjzpt\",\"displayName\":\"lohap\",\"description\":\"nfszpyglqdhmrjz\",\"format\":\"Delta/1.0\",\"schemaType\":\"MessageSchema\",\"provisioningState\":\"Accepted\",\"tags\":{\"fq\":\"byypsjoqcjenky\"}},\"id\":\"sqxfxjelgcmpz\",\"name\":\"jhhhqxu\",\"type\":\"yvca\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,12 +34,12 @@ public void testListBySchemaRegistry() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<Schema> response - = manager.schemas().listBySchemaRegistry("e", "jelaqacigele", com.azure.core.util.Context.NONE); + = manager.schemas().listBySchemaRegistry("coe", "cnhz", com.azure.core.util.Context.NONE); - Assertions.assertEquals("lkwzdqybxceakxcp", response.iterator().next().properties().displayName()); - Assertions.assertEquals("oqfyiaseqch", response.iterator().next().properties().description()); + Assertions.assertEquals("lohap", response.iterator().next().properties().displayName()); + Assertions.assertEquals("nfszpyglqdhmrjz", response.iterator().next().properties().description()); Assertions.assertEquals(Format.DELTA_1_0, response.iterator().next().properties().format()); Assertions.assertEquals(SchemaType.MESSAGE_SCHEMA, response.iterator().next().properties().schemaType()); - Assertions.assertEquals("zisgykiuemvanb", response.iterator().next().properties().tags().get("zohmnrxxbs")); + Assertions.assertEquals("byypsjoqcjenky", response.iterator().next().properties().tags().get("fq")); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/StorageDestinationConfigurationTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/StorageDestinationConfigurationTests.java index 7afae8ce293f..8ceb5fee512c 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/StorageDestinationConfigurationTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/StorageDestinationConfigurationTests.java @@ -12,14 +12,14 @@ public final class StorageDestinationConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageDestinationConfiguration model - = BinaryData.fromString("{\"path\":\"svlxotogtwrup\"}").toObject(StorageDestinationConfiguration.class); - Assertions.assertEquals("svlxotogtwrup", model.path()); + = BinaryData.fromString("{\"path\":\"aloayqcgwrtzju\"}").toObject(StorageDestinationConfiguration.class); + Assertions.assertEquals("aloayqcgwrtzju", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StorageDestinationConfiguration model = new StorageDestinationConfiguration().withPath("svlxotogtwrup"); + StorageDestinationConfiguration model = new StorageDestinationConfiguration().withPath("aloayqcgwrtzju"); model = BinaryData.fromObject(model).toObject(StorageDestinationConfiguration.class); - Assertions.assertEquals("svlxotogtwrup", model.path()); + Assertions.assertEquals("aloayqcgwrtzju", model.path()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/StreamMqttDestinationTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/StreamMqttDestinationTests.java index 74bedde128ba..968dbfd4b962 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/StreamMqttDestinationTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/StreamMqttDestinationTests.java @@ -15,25 +15,25 @@ public final class StreamMqttDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StreamMqttDestination model = BinaryData.fromString( - "{\"target\":\"Mqtt\",\"configuration\":{\"topic\":\"yfjfcnjbkcn\",\"retain\":\"Never\",\"qos\":\"Qos1\",\"ttl\":2825151831912713640}}") + "{\"target\":\"Mqtt\",\"configuration\":{\"topic\":\"knftguvriuh\",\"retain\":\"Never\",\"qos\":\"Qos1\",\"ttl\":8091606100814503434}}") .toObject(StreamMqttDestination.class); - Assertions.assertEquals("yfjfcnjbkcn", model.configuration().topic()); + Assertions.assertEquals("knftguvriuh", model.configuration().topic()); Assertions.assertEquals(TopicRetainType.NEVER, model.configuration().retain()); Assertions.assertEquals(MqttDestinationQos.QOS1, model.configuration().qos()); - Assertions.assertEquals(2825151831912713640L, model.configuration().ttl()); + Assertions.assertEquals(8091606100814503434L, model.configuration().ttl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StreamMqttDestination model - = new StreamMqttDestination().withConfiguration(new MqttDestinationConfiguration().withTopic("yfjfcnjbkcn") + = new StreamMqttDestination().withConfiguration(new MqttDestinationConfiguration().withTopic("knftguvriuh") .withRetain(TopicRetainType.NEVER) .withQos(MqttDestinationQos.QOS1) - .withTtl(2825151831912713640L)); + .withTtl(8091606100814503434L)); model = BinaryData.fromObject(model).toObject(StreamMqttDestination.class); - Assertions.assertEquals("yfjfcnjbkcn", model.configuration().topic()); + Assertions.assertEquals("knftguvriuh", model.configuration().topic()); Assertions.assertEquals(TopicRetainType.NEVER, model.configuration().retain()); Assertions.assertEquals(MqttDestinationQos.QOS1, model.configuration().qos()); - Assertions.assertEquals(2825151831912713640L, model.configuration().ttl()); + Assertions.assertEquals(8091606100814503434L, model.configuration().ttl()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/StreamStorageDestinationTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/StreamStorageDestinationTests.java index 715b249107be..dba22d63716d 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/StreamStorageDestinationTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/StreamStorageDestinationTests.java @@ -13,16 +13,16 @@ public final class StreamStorageDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StreamStorageDestination model - = BinaryData.fromString("{\"target\":\"Storage\",\"configuration\":{\"path\":\"h\"}}") + = BinaryData.fromString("{\"target\":\"Storage\",\"configuration\":{\"path\":\"qtayri\"}}") .toObject(StreamStorageDestination.class); - Assertions.assertEquals("h", model.configuration().path()); + Assertions.assertEquals("qtayri", model.configuration().path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StreamStorageDestination model - = new StreamStorageDestination().withConfiguration(new StorageDestinationConfiguration().withPath("h")); + StreamStorageDestination model = new StreamStorageDestination() + .withConfiguration(new StorageDestinationConfiguration().withPath("qtayri")); model = BinaryData.fromObject(model).toObject(StreamStorageDestination.class); - Assertions.assertEquals("h", model.configuration().path()); + Assertions.assertEquals("qtayri", model.configuration().path()); } } diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/TrustSettingsTests.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/TrustSettingsTests.java index aa55adb5f9a3..8d21f50adbdd 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/TrustSettingsTests.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/TrustSettingsTests.java @@ -11,14 +11,14 @@ public final class TrustSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TrustSettings model = BinaryData.fromString("{\"trustList\":\"sipqii\"}").toObject(TrustSettings.class); - Assertions.assertEquals("sipqii", model.trustList()); + TrustSettings model = BinaryData.fromString("{\"trustList\":\"irels\"}").toObject(TrustSettings.class); + Assertions.assertEquals("irels", model.trustList()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TrustSettings model = new TrustSettings().withTrustList("sipqii"); + TrustSettings model = new TrustSettings().withTrustList("irels"); model = BinaryData.fromObject(model).toObject(TrustSettings.class); - Assertions.assertEquals("sipqii", model.trustList()); + Assertions.assertEquals("irels", model.trustList()); } } diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/MhsmPrivateEndpointConnectionsClient.java b/sdk/keyvault/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/MhsmPrivateEndpointConnectionsClient.java index 2e080899b02e..06a221767550 100644 --- a/sdk/keyvault/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/MhsmPrivateEndpointConnectionsClient.java +++ b/sdk/keyvault/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/MhsmPrivateEndpointConnectionsClient.java @@ -189,8 +189,8 @@ Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupNam * @return the {@link PollerFlux} for polling of private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<MhsmPrivateEndpointConnectionInner>, MhsmPrivateEndpointConnectionInner> - beginDeleteAsync(String resourceGroupName, String name, String privateEndpointConnectionName); + PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String name, + String privateEndpointConnectionName); /** * Deletes the specified private endpoint connection associated with the managed hsm pool. @@ -205,8 +205,8 @@ Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupNam * @return the {@link SyncPoller} for polling of private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<MhsmPrivateEndpointConnectionInner>, MhsmPrivateEndpointConnectionInner> - beginDelete(String resourceGroupName, String name, String privateEndpointConnectionName); + SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String name, + String privateEndpointConnectionName); /** * Deletes the specified private endpoint connection associated with the managed hsm pool. @@ -222,8 +222,8 @@ Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupNam * @return the {@link SyncPoller} for polling of private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<MhsmPrivateEndpointConnectionInner>, MhsmPrivateEndpointConnectionInner> - beginDelete(String resourceGroupName, String name, String privateEndpointConnectionName, Context context); + SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String name, + String privateEndpointConnectionName, Context context); /** * Deletes the specified private endpoint connection associated with the managed hsm pool. @@ -238,8 +238,7 @@ Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupNam * @return private endpoint connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono<MhsmPrivateEndpointConnectionInner> deleteAsync(String resourceGroupName, String name, - String privateEndpointConnectionName); + Mono<Void> deleteAsync(String resourceGroupName, String name, String privateEndpointConnectionName); /** * Deletes the specified private endpoint connection associated with the managed hsm pool. @@ -251,11 +250,9 @@ Mono<MhsmPrivateEndpointConnectionInner> deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - MhsmPrivateEndpointConnectionInner delete(String resourceGroupName, String name, - String privateEndpointConnectionName); + void delete(String resourceGroupName, String name, String privateEndpointConnectionName); /** * Deletes the specified private endpoint connection associated with the managed hsm pool. @@ -268,11 +265,9 @@ MhsmPrivateEndpointConnectionInner delete(String resourceGroupName, String name, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - MhsmPrivateEndpointConnectionInner delete(String resourceGroupName, String name, - String privateEndpointConnectionName, Context context); + void delete(String resourceGroupName, String name, String privateEndpointConnectionName, Context context); /** * The List operation gets information about the private endpoint connections associated with the managed HSM Pool. diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/PrivateEndpointConnectionsClient.java b/sdk/keyvault/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/PrivateEndpointConnectionsClient.java index 90d0fbdd14c5..45dac97b58e3 100644 --- a/sdk/keyvault/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/keyvault/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/PrivateEndpointConnectionsClient.java @@ -179,8 +179,8 @@ Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupNam * @return the {@link PollerFlux} for polling of private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<PrivateEndpointConnectionInner>, PrivateEndpointConnectionInner> - beginDeleteAsync(String resourceGroupName, String vaultName, String privateEndpointConnectionName); + PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String vaultName, + String privateEndpointConnectionName); /** * Deletes the specified private endpoint connection associated with the key vault. @@ -194,8 +194,8 @@ Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupNam * @return the {@link SyncPoller} for polling of private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<PrivateEndpointConnectionInner>, PrivateEndpointConnectionInner> - beginDelete(String resourceGroupName, String vaultName, String privateEndpointConnectionName); + SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String vaultName, + String privateEndpointConnectionName); /** * Deletes the specified private endpoint connection associated with the key vault. @@ -210,8 +210,8 @@ Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupNam * @return the {@link SyncPoller} for polling of private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<PrivateEndpointConnectionInner>, PrivateEndpointConnectionInner> - beginDelete(String resourceGroupName, String vaultName, String privateEndpointConnectionName, Context context); + SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String vaultName, + String privateEndpointConnectionName, Context context); /** * Deletes the specified private endpoint connection associated with the key vault. @@ -225,8 +225,7 @@ Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupNam * @return private endpoint connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono<PrivateEndpointConnectionInner> deleteAsync(String resourceGroupName, String vaultName, - String privateEndpointConnectionName); + Mono<Void> deleteAsync(String resourceGroupName, String vaultName, String privateEndpointConnectionName); /** * Deletes the specified private endpoint connection associated with the key vault. @@ -237,11 +236,9 @@ Mono<PrivateEndpointConnectionInner> deleteAsync(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner delete(String resourceGroupName, String vaultName, - String privateEndpointConnectionName); + void delete(String resourceGroupName, String vaultName, String privateEndpointConnectionName); /** * Deletes the specified private endpoint connection associated with the key vault. @@ -253,11 +250,9 @@ PrivateEndpointConnectionInner delete(String resourceGroupName, String vaultName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner delete(String resourceGroupName, String vaultName, - String privateEndpointConnectionName, Context context); + void delete(String resourceGroupName, String vaultName, String privateEndpointConnectionName, Context context); /** * The List operation gets information about the private endpoint connections associated with the vault. diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/implementation/MhsmPrivateEndpointConnectionsClientImpl.java b/sdk/keyvault/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/implementation/MhsmPrivateEndpointConnectionsClientImpl.java index f4fa21796533..738e79f12091 100644 --- a/sdk/keyvault/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/implementation/MhsmPrivateEndpointConnectionsClientImpl.java +++ b/sdk/keyvault/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/implementation/MhsmPrivateEndpointConnectionsClientImpl.java @@ -515,13 +515,12 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource * @return the {@link PollerFlux} for polling of private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux<PollResult<MhsmPrivateEndpointConnectionInner>, MhsmPrivateEndpointConnectionInner> - beginDeleteAsync(String resourceGroupName, String name, String privateEndpointConnectionName) { + public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String name, + String privateEndpointConnectionName) { Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, name, privateEndpointConnectionName); - return this.client.<MhsmPrivateEndpointConnectionInner, MhsmPrivateEndpointConnectionInner>getLroResult(mono, - this.client.getHttpPipeline(), MhsmPrivateEndpointConnectionInner.class, - MhsmPrivateEndpointConnectionInner.class, this.client.getContext()); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** @@ -538,14 +537,13 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource * @return the {@link PollerFlux} for polling of private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<MhsmPrivateEndpointConnectionInner>, MhsmPrivateEndpointConnectionInner> - beginDeleteAsync(String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String name, + String privateEndpointConnectionName, Context context) { context = this.client.mergeContext(context); Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, name, privateEndpointConnectionName, context); - return this.client.<MhsmPrivateEndpointConnectionInner, MhsmPrivateEndpointConnectionInner>getLroResult(mono, - this.client.getHttpPipeline(), MhsmPrivateEndpointConnectionInner.class, - MhsmPrivateEndpointConnectionInner.class, context); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** @@ -561,8 +559,8 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource * @return the {@link SyncPoller} for polling of private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<MhsmPrivateEndpointConnectionInner>, MhsmPrivateEndpointConnectionInner> - beginDelete(String resourceGroupName, String name, String privateEndpointConnectionName) { + public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String name, + String privateEndpointConnectionName) { return this.beginDeleteAsync(resourceGroupName, name, privateEndpointConnectionName).getSyncPoller(); } @@ -580,8 +578,8 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource * @return the {@link SyncPoller} for polling of private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<MhsmPrivateEndpointConnectionInner>, MhsmPrivateEndpointConnectionInner> - beginDelete(String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String name, + String privateEndpointConnectionName, Context context) { return this.beginDeleteAsync(resourceGroupName, name, privateEndpointConnectionName, context).getSyncPoller(); } @@ -598,8 +596,7 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource * @return private endpoint connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<MhsmPrivateEndpointConnectionInner> deleteAsync(String resourceGroupName, String name, - String privateEndpointConnectionName) { + public Mono<Void> deleteAsync(String resourceGroupName, String name, String privateEndpointConnectionName) { return beginDeleteAsync(resourceGroupName, name, privateEndpointConnectionName).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -618,8 +615,8 @@ public Mono<MhsmPrivateEndpointConnectionInner> deleteAsync(String resourceGroup * @return private endpoint connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<MhsmPrivateEndpointConnectionInner> deleteAsync(String resourceGroupName, String name, - String privateEndpointConnectionName, Context context) { + private Mono<Void> deleteAsync(String resourceGroupName, String name, String privateEndpointConnectionName, + Context context) { return beginDeleteAsync(resourceGroupName, name, privateEndpointConnectionName, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -634,12 +631,10 @@ private Mono<MhsmPrivateEndpointConnectionInner> deleteAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MhsmPrivateEndpointConnectionInner delete(String resourceGroupName, String name, - String privateEndpointConnectionName) { - return deleteAsync(resourceGroupName, name, privateEndpointConnectionName).block(); + public void delete(String resourceGroupName, String name, String privateEndpointConnectionName) { + deleteAsync(resourceGroupName, name, privateEndpointConnectionName).block(); } /** @@ -653,12 +648,10 @@ public MhsmPrivateEndpointConnectionInner delete(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MhsmPrivateEndpointConnectionInner delete(String resourceGroupName, String name, - String privateEndpointConnectionName, Context context) { - return deleteAsync(resourceGroupName, name, privateEndpointConnectionName, context).block(); + public void delete(String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + deleteAsync(resourceGroupName, name, privateEndpointConnectionName, context).block(); } /** diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/keyvault/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/implementation/PrivateEndpointConnectionsClientImpl.java index f5d045d55e03..286b4b6e3601 100644 --- a/sdk/keyvault/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/keyvault/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/implementation/PrivateEndpointConnectionsClientImpl.java @@ -504,12 +504,11 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource * @return the {@link PollerFlux} for polling of private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux<PollResult<PrivateEndpointConnectionInner>, PrivateEndpointConnectionInner> - beginDeleteAsync(String resourceGroupName, String vaultName, String privateEndpointConnectionName) { + public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String vaultName, + String privateEndpointConnectionName) { Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, vaultName, privateEndpointConnectionName); - return this.client.<PrivateEndpointConnectionInner, PrivateEndpointConnectionInner>getLroResult(mono, - this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -526,13 +525,12 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource * @return the {@link PollerFlux} for polling of private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<PrivateEndpointConnectionInner>, PrivateEndpointConnectionInner> beginDeleteAsync( - String resourceGroupName, String vaultName, String privateEndpointConnectionName, Context context) { + private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String vaultName, + String privateEndpointConnectionName, Context context) { context = this.client.mergeContext(context); Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, vaultName, privateEndpointConnectionName, context); - return this.client.<PrivateEndpointConnectionInner, PrivateEndpointConnectionInner>getLroResult(mono, - this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } @@ -548,8 +546,8 @@ private PollerFlux<PollResult<PrivateEndpointConnectionInner>, PrivateEndpointCo * @return the {@link SyncPoller} for polling of private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<PrivateEndpointConnectionInner>, PrivateEndpointConnectionInner> - beginDelete(String resourceGroupName, String vaultName, String privateEndpointConnectionName) { + public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String vaultName, + String privateEndpointConnectionName) { return this.beginDeleteAsync(resourceGroupName, vaultName, privateEndpointConnectionName).getSyncPoller(); } @@ -566,8 +564,8 @@ private PollerFlux<PollResult<PrivateEndpointConnectionInner>, PrivateEndpointCo * @return the {@link SyncPoller} for polling of private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<PrivateEndpointConnectionInner>, PrivateEndpointConnectionInner> - beginDelete(String resourceGroupName, String vaultName, String privateEndpointConnectionName, Context context) { + public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String vaultName, + String privateEndpointConnectionName, Context context) { return this.beginDeleteAsync(resourceGroupName, vaultName, privateEndpointConnectionName, context) .getSyncPoller(); } @@ -584,8 +582,7 @@ private PollerFlux<PollResult<PrivateEndpointConnectionInner>, PrivateEndpointCo * @return private endpoint connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<PrivateEndpointConnectionInner> deleteAsync(String resourceGroupName, String vaultName, - String privateEndpointConnectionName) { + public Mono<Void> deleteAsync(String resourceGroupName, String vaultName, String privateEndpointConnectionName) { return beginDeleteAsync(resourceGroupName, vaultName, privateEndpointConnectionName).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -603,8 +600,8 @@ public Mono<PrivateEndpointConnectionInner> deleteAsync(String resourceGroupName * @return private endpoint connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PrivateEndpointConnectionInner> deleteAsync(String resourceGroupName, String vaultName, - String privateEndpointConnectionName, Context context) { + private Mono<Void> deleteAsync(String resourceGroupName, String vaultName, String privateEndpointConnectionName, + Context context) { return beginDeleteAsync(resourceGroupName, vaultName, privateEndpointConnectionName, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -618,12 +615,10 @@ private Mono<PrivateEndpointConnectionInner> deleteAsync(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner delete(String resourceGroupName, String vaultName, - String privateEndpointConnectionName) { - return deleteAsync(resourceGroupName, vaultName, privateEndpointConnectionName).block(); + public void delete(String resourceGroupName, String vaultName, String privateEndpointConnectionName) { + deleteAsync(resourceGroupName, vaultName, privateEndpointConnectionName).block(); } /** @@ -636,12 +631,11 @@ public PrivateEndpointConnectionInner delete(String resourceGroupName, String va * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner delete(String resourceGroupName, String vaultName, - String privateEndpointConnectionName, Context context) { - return deleteAsync(resourceGroupName, vaultName, privateEndpointConnectionName, context).block(); + public void delete(String resourceGroupName, String vaultName, String privateEndpointConnectionName, + Context context) { + deleteAsync(resourceGroupName, vaultName, privateEndpointConnectionName, context).block(); } /** diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/generated/AttributesTests.java b/sdk/keyvault/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/generated/AttributesTests.java new file mode 100644 index 000000000000..a9f394369f96 --- /dev/null +++ b/sdk/keyvault/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/generated/AttributesTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.keyvault.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.keyvault.models.Attributes; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class AttributesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Attributes model = BinaryData.fromString( + "{\"enabled\":false,\"nbf\":1218996877,\"exp\":1229712399,\"created\":754766432,\"updated\":1395198209}") + .toObject(Attributes.class); + Assertions.assertFalse(model.enabled()); + Assertions.assertEquals(OffsetDateTime.parse("2008-08-17T18:14:37Z"), model.notBefore()); + Assertions.assertEquals(OffsetDateTime.parse("2008-12-19T18:46:39Z"), model.expires()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Attributes model = new Attributes().withEnabled(false) + .withNotBefore(OffsetDateTime.parse("2008-08-17T18:14:37Z")) + .withExpires(OffsetDateTime.parse("2008-12-19T18:46:39Z")); + model = BinaryData.fromObject(model).toObject(Attributes.class); + Assertions.assertFalse(model.enabled()); + Assertions.assertEquals(OffsetDateTime.parse("2008-08-17T18:14:37Z"), model.notBefore()); + Assertions.assertEquals(OffsetDateTime.parse("2008-12-19T18:46:39Z"), model.expires()); + } +} diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/generated/SecretAttributesTests.java b/sdk/keyvault/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/generated/SecretAttributesTests.java new file mode 100644 index 000000000000..784de5a3a61e --- /dev/null +++ b/sdk/keyvault/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/generated/SecretAttributesTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.keyvault.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.keyvault.models.SecretAttributes; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class SecretAttributesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SecretAttributes model = BinaryData + .fromString( + "{\"enabled\":false,\"nbf\":1601872964,\"exp\":1320056895,\"created\":574519404,\"updated\":175295404}") + .toObject(SecretAttributes.class); + Assertions.assertFalse(model.enabled()); + Assertions.assertEquals(OffsetDateTime.parse("2020-10-05T04:42:44Z"), model.notBefore()); + Assertions.assertEquals(OffsetDateTime.parse("2011-10-31T10:28:15Z"), model.expires()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SecretAttributes model = new SecretAttributes().withEnabled(false) + .withNotBefore(OffsetDateTime.parse("2020-10-05T04:42:44Z")) + .withExpires(OffsetDateTime.parse("2011-10-31T10:28:15Z")); + model = BinaryData.fromObject(model).toObject(SecretAttributes.class); + Assertions.assertFalse(model.enabled()); + Assertions.assertEquals(OffsetDateTime.parse("2020-10-05T04:42:44Z"), model.notBefore()); + Assertions.assertEquals(OffsetDateTime.parse("2011-10-31T10:28:15Z"), model.expires()); + } +} diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/generated/SecretPatchParametersTests.java b/sdk/keyvault/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/generated/SecretPatchParametersTests.java new file mode 100644 index 000000000000..51ee2ee8c395 --- /dev/null +++ b/sdk/keyvault/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/generated/SecretPatchParametersTests.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.keyvault.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.keyvault.models.SecretAttributes; +import com.azure.resourcemanager.keyvault.models.SecretPatchParameters; +import com.azure.resourcemanager.keyvault.models.SecretPatchProperties; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class SecretPatchParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SecretPatchParameters model = BinaryData.fromString( + "{\"tags\":{\"tpuqujmq\":\"efkifr\",\"jcntuj\":\"gkfbtndoaong\"},\"properties\":{\"value\":\"jed\",\"contentType\":\"wwa\",\"attributes\":{\"enabled\":true,\"nbf\":229411798,\"exp\":242462331,\"created\":1248397235,\"updated\":2081099839}}}") + .toObject(SecretPatchParameters.class); + Assertions.assertEquals("efkifr", model.tags().get("tpuqujmq")); + Assertions.assertEquals("jed", model.properties().value()); + Assertions.assertEquals("wwa", model.properties().contentType()); + Assertions.assertTrue(model.properties().attributes().enabled()); + Assertions.assertEquals(OffsetDateTime.parse("1977-04-09T05:29:58Z"), + model.properties().attributes().notBefore()); + Assertions.assertEquals(OffsetDateTime.parse("1977-09-07T06:38:51Z"), + model.properties().attributes().expires()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SecretPatchParameters model + = new SecretPatchParameters().withTags(mapOf("tpuqujmq", "efkifr", "jcntuj", "gkfbtndoaong")) + .withProperties(new SecretPatchProperties().withValue("jed") + .withContentType("wwa") + .withAttributes(new SecretAttributes().withEnabled(true) + .withNotBefore(OffsetDateTime.parse("1977-04-09T05:29:58Z")) + .withExpires(OffsetDateTime.parse("1977-09-07T06:38:51Z")))); + model = BinaryData.fromObject(model).toObject(SecretPatchParameters.class); + Assertions.assertEquals("efkifr", model.tags().get("tpuqujmq")); + Assertions.assertEquals("jed", model.properties().value()); + Assertions.assertEquals("wwa", model.properties().contentType()); + Assertions.assertTrue(model.properties().attributes().enabled()); + Assertions.assertEquals(OffsetDateTime.parse("1977-04-09T05:29:58Z"), + model.properties().attributes().notBefore()); + Assertions.assertEquals(OffsetDateTime.parse("1977-09-07T06:38:51Z"), + model.properties().attributes().expires()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/generated/SecretPatchPropertiesTests.java b/sdk/keyvault/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/generated/SecretPatchPropertiesTests.java new file mode 100644 index 000000000000..baa7fa554b6b --- /dev/null +++ b/sdk/keyvault/azure-resourcemanager-keyvault/src/test/java/com/azure/resourcemanager/keyvault/generated/SecretPatchPropertiesTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.keyvault.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.keyvault.models.SecretAttributes; +import com.azure.resourcemanager.keyvault.models.SecretPatchProperties; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class SecretPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SecretPatchProperties model = BinaryData.fromString( + "{\"value\":\"ouicybxarzgszu\",\"contentType\":\"x\",\"attributes\":{\"enabled\":true,\"nbf\":1114621463,\"exp\":2028743450,\"created\":1543353321,\"updated\":1108967269}}") + .toObject(SecretPatchProperties.class); + Assertions.assertEquals("ouicybxarzgszu", model.value()); + Assertions.assertEquals("x", model.contentType()); + Assertions.assertTrue(model.attributes().enabled()); + Assertions.assertEquals(OffsetDateTime.parse("2005-04-27T17:04:23Z"), model.attributes().notBefore()); + Assertions.assertEquals(OffsetDateTime.parse("2034-04-15T19:50:50Z"), model.attributes().expires()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SecretPatchProperties model = new SecretPatchProperties().withValue("ouicybxarzgszu") + .withContentType("x") + .withAttributes(new SecretAttributes().withEnabled(true) + .withNotBefore(OffsetDateTime.parse("2005-04-27T17:04:23Z")) + .withExpires(OffsetDateTime.parse("2034-04-15T19:50:50Z"))); + model = BinaryData.fromObject(model).toObject(SecretPatchProperties.class); + Assertions.assertEquals("ouicybxarzgszu", model.value()); + Assertions.assertEquals("x", model.contentType()); + Assertions.assertTrue(model.attributes().enabled()); + Assertions.assertEquals(OffsetDateTime.parse("2005-04-27T17:04:23Z"), model.attributes().notBefore()); + Assertions.assertEquals(OffsetDateTime.parse("2034-04-15T19:50:50Z"), model.attributes().expires()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md index 98d746b14c13..c076e4b17155 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md +++ b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md @@ -1542,7 +1542,7 @@ public final class CachesPoolChangeSamples { ### Caches_Update ```java -import com.azure.resourcemanager.netapp.models.Cache; +import com.azure.resourcemanager.netapp.models.CacheUpdate; import com.azure.resourcemanager.netapp.models.CacheUpdateProperties; /** @@ -1558,10 +1558,10 @@ public final class CachesUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void cachesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - Cache resource = manager.caches() - .getWithResponse("myRG", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withProperties(new CacheUpdateProperties().withSize(214748364800L)).apply(); + manager.caches() + .update("myRG", "account1", "pool1", "cache1", + new CacheUpdate().withProperties(new CacheUpdateProperties().withSize(214748364800L)), + com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java index 3b9f98aa04e7..dd8426d42fbe 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java @@ -136,8 +136,8 @@ CacheInner createOrUpdate(String resourceGroupName, String accountName, String p * @return the {@link SyncPoller} for polling of cache resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupName, String accountName, - String poolName, String cacheName, CacheUpdate body); + SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String accountName, String poolName, + String cacheName, CacheUpdate body); /** * Patch the specified Cache. @@ -154,8 +154,8 @@ SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupN * @return the {@link SyncPoller} for polling of cache resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupName, String accountName, - String poolName, String cacheName, CacheUpdate body, Context context); + SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String accountName, String poolName, + String cacheName, CacheUpdate body, Context context); /** * Patch the specified Cache. @@ -168,11 +168,9 @@ SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cache resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName, - CacheUpdate body); + void update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body); /** * Patch the specified Cache. @@ -186,10 +184,9 @@ CacheInner update(String resourceGroupName, String accountName, String poolName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cache resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body, + void update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body, Context context); /** @@ -332,8 +329,8 @@ PeeringPassphrasesInner listPeeringPassphrases(String resourceGroupName, String * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<CacheInner>, CacheInner> beginPoolChange(String resourceGroupName, String accountName, - String poolName, String cacheName, PoolChangeRequest body); + SyncPoller<PollResult<Void>, Void> beginPoolChange(String resourceGroupName, String accountName, String poolName, + String cacheName, PoolChangeRequest body); /** * Moves Cache to another Capacity Pool. @@ -350,8 +347,8 @@ SyncPoller<PollResult<CacheInner>, CacheInner> beginPoolChange(String resourceGr * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<CacheInner>, CacheInner> beginPoolChange(String resourceGroupName, String accountName, - String poolName, String cacheName, PoolChangeRequest body, Context context); + SyncPoller<PollResult<Void>, Void> beginPoolChange(String resourceGroupName, String accountName, String poolName, + String cacheName, PoolChangeRequest body, Context context); /** * Moves Cache to another Capacity Pool. @@ -364,10 +361,9 @@ SyncPoller<PollResult<CacheInner>, CacheInner> beginPoolChange(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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) - CacheInner poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + void poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, PoolChangeRequest body); /** @@ -382,9 +378,8 @@ CacheInner poolChange(String resourceGroupName, String accountName, String poolN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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) - CacheInner poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + void poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, PoolChangeRequest body, Context context); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java index 6166ad27377d..fcf4f401ca04 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java @@ -11,8 +11,6 @@ import com.azure.resourcemanager.netapp.fluent.models.CacheInner; import com.azure.resourcemanager.netapp.models.Cache; import com.azure.resourcemanager.netapp.models.CacheProperties; -import com.azure.resourcemanager.netapp.models.CacheUpdate; -import com.azure.resourcemanager.netapp.models.CacheUpdateProperties; import com.azure.resourcemanager.netapp.models.PeeringPassphrases; import com.azure.resourcemanager.netapp.models.PoolChangeRequest; import java.util.Collections; @@ -98,8 +96,6 @@ private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { private String cacheName; - private CacheUpdate updateBody; - public CacheImpl withExistingCapacityPool(String resourceGroupName, String accountName, String poolName) { this.resourceGroupName = resourceGroupName; this.accountName = accountName; @@ -128,21 +124,20 @@ public Cache create(Context context) { } public CacheImpl update() { - this.updateBody = new CacheUpdate(); return this; } public Cache apply() { this.innerObject = serviceManager.serviceClient() .getCaches() - .update(resourceGroupName, accountName, poolName, cacheName, updateBody, Context.NONE); + .createOrUpdate(resourceGroupName, accountName, poolName, cacheName, this.innerModel(), Context.NONE); return this; } public Cache apply(Context context) { this.innerObject = serviceManager.serviceClient() .getCaches() - .update(resourceGroupName, accountName, poolName, cacheName, updateBody, context); + .createOrUpdate(resourceGroupName, accountName, poolName, cacheName, this.innerModel(), context); return this; } @@ -180,12 +175,12 @@ public PeeringPassphrases listPeeringPassphrases() { return serviceManager.caches().listPeeringPassphrases(resourceGroupName, accountName, poolName, cacheName); } - public Cache poolChange(PoolChangeRequest body) { - return serviceManager.caches().poolChange(resourceGroupName, accountName, poolName, cacheName, body); + public void poolChange(PoolChangeRequest body) { + serviceManager.caches().poolChange(resourceGroupName, accountName, poolName, cacheName, body); } - public Cache poolChange(PoolChangeRequest body, Context context) { - return serviceManager.caches().poolChange(resourceGroupName, accountName, poolName, cacheName, body, context); + public void poolChange(PoolChangeRequest body, Context context) { + serviceManager.caches().poolChange(resourceGroupName, accountName, poolName, cacheName, body, context); } public CacheImpl withRegion(Region location) { @@ -204,26 +199,12 @@ public CacheImpl withProperties(CacheProperties properties) { } public CacheImpl withTags(Map<String, String> tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } + this.innerModel().withTags(tags); + return this; } public CacheImpl withZones(List<String> zones) { this.innerModel().withZones(zones); return this; } - - public CacheImpl withProperties(CacheUpdateProperties properties) { - this.updateBody.withProperties(properties); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java index 2a78888e1a17..ec7cebab6484 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java @@ -812,12 +812,12 @@ private Response<BinaryData> updateWithResponse(String resourceGroupName, String * @return the {@link PollerFlux} for polling of cache resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<CacheInner>, CacheInner> beginUpdateAsync(String resourceGroupName, - String accountName, String poolName, String cacheName, CacheUpdate body) { + private PollerFlux<PollResult<Void>, Void> beginUpdateAsync(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheUpdate body) { Mono<Response<Flux<ByteBuffer>>> mono = updateWithResponseAsync(resourceGroupName, accountName, poolName, cacheName, body); - return this.client.<CacheInner, CacheInner>getLroResult(mono, this.client.getHttpPipeline(), CacheInner.class, - CacheInner.class, this.client.getContext()); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** @@ -834,11 +834,10 @@ private PollerFlux<PollResult<CacheInner>, CacheInner> beginUpdateAsync(String r * @return the {@link SyncPoller} for polling of cache resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupName, String accountName, - String poolName, String cacheName, CacheUpdate body) { + public SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String accountName, String poolName, + String cacheName, CacheUpdate body) { Response<BinaryData> response = updateWithResponse(resourceGroupName, accountName, poolName, cacheName, body); - return this.client.<CacheInner, CacheInner>getLroResult(response, CacheInner.class, CacheInner.class, - Context.NONE); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -856,11 +855,11 @@ public SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourc * @return the {@link SyncPoller} for polling of cache resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupName, String accountName, - String poolName, String cacheName, CacheUpdate body, Context context) { + public SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String accountName, String poolName, + String cacheName, CacheUpdate body, Context context) { Response<BinaryData> response = updateWithResponse(resourceGroupName, accountName, poolName, cacheName, body, context); - return this.client.<CacheInner, CacheInner>getLroResult(response, CacheInner.class, CacheInner.class, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); } /** @@ -877,8 +876,8 @@ public SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourc * @return cache resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<CacheInner> updateAsync(String resourceGroupName, String accountName, String poolName, - String cacheName, CacheUpdate body) { + private Mono<Void> updateAsync(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheUpdate body) { return beginUpdateAsync(resourceGroupName, accountName, poolName, cacheName, body).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -894,12 +893,11 @@ private Mono<CacheInner> updateAsync(String resourceGroupName, String accountNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cache resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName, + public void update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body) { - return beginUpdate(resourceGroupName, accountName, poolName, cacheName, body).getFinalResult(); + beginUpdate(resourceGroupName, accountName, poolName, cacheName, body).getFinalResult(); } /** @@ -914,12 +912,11 @@ public CacheInner update(String resourceGroupName, String accountName, String po * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cache resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName, + public void update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body, Context context) { - return beginUpdate(resourceGroupName, accountName, poolName, cacheName, body, context).getFinalResult(); + beginUpdate(resourceGroupName, accountName, poolName, cacheName, body, context).getFinalResult(); } /** @@ -1660,12 +1657,12 @@ private Response<BinaryData> poolChangeWithResponse(String resourceGroupName, St * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<CacheInner>, CacheInner> beginPoolChangeAsync(String resourceGroupName, - String accountName, String poolName, String cacheName, PoolChangeRequest body) { + private PollerFlux<PollResult<Void>, Void> beginPoolChangeAsync(String resourceGroupName, String accountName, + String poolName, String cacheName, PoolChangeRequest body) { Mono<Response<Flux<ByteBuffer>>> mono = poolChangeWithResponseAsync(resourceGroupName, accountName, poolName, cacheName, body); - return this.client.<CacheInner, CacheInner>getLroResult(mono, this.client.getHttpPipeline(), CacheInner.class, - CacheInner.class, this.client.getContext()); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** @@ -1682,12 +1679,11 @@ private PollerFlux<PollResult<CacheInner>, CacheInner> beginPoolChangeAsync(Stri * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<CacheInner>, CacheInner> beginPoolChange(String resourceGroupName, String accountName, + public SyncPoller<PollResult<Void>, Void> beginPoolChange(String resourceGroupName, String accountName, String poolName, String cacheName, PoolChangeRequest body) { Response<BinaryData> response = poolChangeWithResponse(resourceGroupName, accountName, poolName, cacheName, body); - return this.client.<CacheInner, CacheInner>getLroResult(response, CacheInner.class, CacheInner.class, - Context.NONE); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -1705,11 +1701,11 @@ public SyncPoller<PollResult<CacheInner>, CacheInner> beginPoolChange(String res * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<CacheInner>, CacheInner> beginPoolChange(String resourceGroupName, String accountName, + public SyncPoller<PollResult<Void>, Void> beginPoolChange(String resourceGroupName, String accountName, String poolName, String cacheName, PoolChangeRequest body, Context context) { Response<BinaryData> response = poolChangeWithResponse(resourceGroupName, accountName, poolName, cacheName, body, context); - return this.client.<CacheInner, CacheInner>getLroResult(response, CacheInner.class, CacheInner.class, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); } /** @@ -1723,11 +1719,11 @@ public SyncPoller<PollResult<CacheInner>, CacheInner> beginPoolChange(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<CacheInner> poolChangeAsync(String resourceGroupName, String accountName, String poolName, - String cacheName, PoolChangeRequest body) { + private Mono<Void> poolChangeAsync(String resourceGroupName, String accountName, String poolName, String cacheName, + PoolChangeRequest body) { return beginPoolChangeAsync(resourceGroupName, accountName, poolName, cacheName, body).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1743,12 +1739,11 @@ private Mono<CacheInner> poolChangeAsync(String resourceGroupName, String accoun * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 CacheInner poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + public void poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, PoolChangeRequest body) { - return beginPoolChange(resourceGroupName, accountName, poolName, cacheName, body).getFinalResult(); + beginPoolChange(resourceGroupName, accountName, poolName, cacheName, body).getFinalResult(); } /** @@ -1763,12 +1758,11 @@ public CacheInner poolChange(String resourceGroupName, String accountName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 CacheInner poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + public void poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, PoolChangeRequest body, Context context) { - return beginPoolChange(resourceGroupName, accountName, poolName, cacheName, body, context).getFinalResult(); + beginPoolChange(resourceGroupName, accountName, poolName, cacheName, body, context).getFinalResult(); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java index 65993f8b2a55..94d3d1e3fda1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java @@ -13,6 +13,7 @@ import com.azure.resourcemanager.netapp.fluent.models.CacheInner; import com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner; import com.azure.resourcemanager.netapp.models.Cache; +import com.azure.resourcemanager.netapp.models.CacheUpdate; import com.azure.resourcemanager.netapp.models.Caches; import com.azure.resourcemanager.netapp.models.PeeringPassphrases; import com.azure.resourcemanager.netapp.models.PoolChangeRequest; @@ -50,6 +51,16 @@ public Cache get(String resourceGroupName, String accountName, String poolName, } } + public void update(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheUpdate body) { + this.serviceClient().update(resourceGroupName, accountName, poolName, cacheName, body); + } + + public void update(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheUpdate body, Context context) { + this.serviceClient().update(resourceGroupName, accountName, poolName, cacheName, body, context); + } + public void delete(String resourceGroupName, String accountName, String poolName, String cacheName) { this.serviceClient().delete(resourceGroupName, accountName, poolName, cacheName); } @@ -95,25 +106,14 @@ public PeeringPassphrases listPeeringPassphrases(String resourceGroupName, Strin } } - public Cache poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + public void poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, PoolChangeRequest body) { - CacheInner inner = this.serviceClient().poolChange(resourceGroupName, accountName, poolName, cacheName, body); - if (inner != null) { - return new CacheImpl(inner, this.manager()); - } else { - return null; - } + this.serviceClient().poolChange(resourceGroupName, accountName, poolName, cacheName, body); } - public Cache poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + public void poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, PoolChangeRequest body, Context context) { - CacheInner inner - = this.serviceClient().poolChange(resourceGroupName, accountName, poolName, cacheName, body, context); - if (inner != null) { - return new CacheImpl(inner, this.manager()); - } else { - return null; - } + this.serviceClient().poolChange(resourceGroupName, accountName, poolName, cacheName, body, context); } public Cache getById(String id) { diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Cache.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Cache.java index bf3925343e18..0626dbe8c45a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Cache.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Cache.java @@ -273,12 +273,12 @@ interface WithTags { */ interface WithProperties { /** - * Specifies the properties property: The resource-specific properties for this resource.. + * Specifies the properties property: Cache properties. * - * @param properties The resource-specific properties for this resource. + * @param properties Cache properties. * @return the next definition stage. */ - Update withProperties(CacheUpdateProperties properties); + Update withProperties(CacheProperties properties); } } @@ -325,9 +325,8 @@ interface WithProperties { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - Cache poolChange(PoolChangeRequest body); + void poolChange(PoolChangeRequest body); /** * Moves Cache to another Capacity Pool. @@ -337,7 +336,6 @@ interface WithProperties { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - Cache poolChange(PoolChangeRequest body, Context context); + void poolChange(PoolChangeRequest body, Context context); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CachePropertiesExportPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CachePropertiesExportPolicy.java new file mode 100644 index 000000000000..1300d4693b12 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CachePropertiesExportPolicy.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Set of export policy rules. + */ +@Fluent +public final class CachePropertiesExportPolicy implements JsonSerializable<CachePropertiesExportPolicy> { + /* + * Export policy rule + */ + private List<ExportPolicyRule> rules; + + /** + * Creates an instance of CachePropertiesExportPolicy class. + */ + public CachePropertiesExportPolicy() { + } + + /** + * Get the rules property: Export policy rule. + * + * @return the rules value. + */ + public List<ExportPolicyRule> rules() { + return this.rules; + } + + /** + * Set the rules property: Export policy rule. + * + * @param rules the rules value to set. + * @return the CachePropertiesExportPolicy object itself. + */ + public CachePropertiesExportPolicy withRules(List<ExportPolicyRule> rules) { + this.rules = rules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (rules() != null) { + rules().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CachePropertiesExportPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CachePropertiesExportPolicy if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CachePropertiesExportPolicy. + */ + public static CachePropertiesExportPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CachePropertiesExportPolicy deserializedCachePropertiesExportPolicy = new CachePropertiesExportPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("rules".equals(fieldName)) { + List<ExportPolicyRule> rules = reader.readArray(reader1 -> ExportPolicyRule.fromJson(reader1)); + deserializedCachePropertiesExportPolicy.rules = rules; + } else { + reader.skipChildren(); + } + } + + return deserializedCachePropertiesExportPolicy; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Caches.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Caches.java index 7a67b8b70775..b052164fafcb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Caches.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Caches.java @@ -42,6 +42,36 @@ Response<Cache> getWithResponse(String resourceGroupName, String accountName, St */ Cache get(String resourceGroupName, String accountName, String poolName, String cacheName); + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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. + */ + void update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body); + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body 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. + */ + void update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body, + Context context); + /** * Delete the specified cache. * @@ -140,9 +170,8 @@ PeeringPassphrases listPeeringPassphrases(String resourceGroupName, String accou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - Cache poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + void poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, PoolChangeRequest body); /** @@ -157,9 +186,8 @@ Cache poolChange(String resourceGroupName, String accountName, String poolName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - Cache poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + void poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, PoolChangeRequest body, Context context); /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesUpdateSamples.java index b50607616f4f..2e39e35273ec 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesUpdateSamples.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.netapp.generated; -import com.azure.resourcemanager.netapp.models.Cache; +import com.azure.resourcemanager.netapp.models.CacheUpdate; import com.azure.resourcemanager.netapp.models.CacheUpdateProperties; /** @@ -20,9 +20,9 @@ public final class CachesUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void cachesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - Cache resource = manager.caches() - .getWithResponse("myRG", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withProperties(new CacheUpdateProperties().withSize(214748364800L)).apply(); + manager.caches() + .update("myRG", "account1", "pool1", "cache1", + new CacheUpdate().withProperties(new CacheUpdateProperties().withSize(214748364800L)), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java index 131c5bdf8936..deadd16cbfab 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class CachesListPeeringPassphrasesWithResponseMockTests { @Test public void testListPeeringPassphrasesWithResponse() throws Exception { String responseStr - = "{\"clusterPeeringCommand\":\"oka\",\"clusterPeeringPassphrase\":\"vfejvqnttmbqda\",\"vserverPeeringCommand\":\"zfivfokpysthhzag\"}"; + = "{\"clusterPeeringCommand\":\"yrfwbivq\",\"clusterPeeringPassphrase\":\"ogfuyzwvbhlim\",\"vserverPeeringCommand\":\"yqe\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,11 @@ public void testListPeeringPassphrasesWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PeeringPassphrases response = manager.caches() - .listPeeringPassphrasesWithResponse("vzkwwwncknr", "dajlskzpt", "xulweucyrthxqle", "mcgcjeinue", - com.azure.core.util.Context.NONE) + .listPeeringPassphrasesWithResponse("ziuswsw", "rk", "qsj", "btqqvyfs", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("oka", response.clusterPeeringCommand()); - Assertions.assertEquals("vfejvqnttmbqda", response.clusterPeeringPassphrase()); - Assertions.assertEquals("zfivfokpysthhzag", response.vserverPeeringCommand()); + Assertions.assertEquals("yrfwbivq", response.clusterPeeringCommand()); + Assertions.assertEquals("ogfuyzwvbhlim", response.clusterPeeringPassphrase()); + Assertions.assertEquals("yqe", response.vserverPeeringCommand()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesPoolChangeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesPoolChangeMockTests.java new file mode 100644 index 000000000000..a616b2f870f1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesPoolChangeMockTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.PoolChangeRequest; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class CachesPoolChangeMockTests { + @Test + public void testPoolChange() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.caches() + .poolChange("r", "odlikcdrdaasax", "obsmf", "wiyjvzuko", new PoolChangeRequest().withNewPoolResourceId("r"), + com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java index a999c7847393..f98717261664 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java @@ -16,7 +16,7 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"c29e39cb-6be6-42bc-808b-c5c9c768897d\",\"tenantId\":\"f6242acb-b959-43fa-96ee-2bb381ba93fc\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"wmn\":{\"principalId\":\"d67e0450-50b0-4741-94d3-f6fe2d5cb126\",\"clientId\":\"ef778493-9a1e-431b-8ddf-eeb9d7035aea\"},\"tijfybvp\":{\"principalId\":\"e836aa81-9d98-4fe0-a608-6cb31a6e5dcd\",\"clientId\":\"28e8a56b-7369-4c44-bae9-ea7318fd74a8\"},\"rsg\":{\"principalId\":\"dd1876bd-c143-4302-a5a2-3c3eeb8876da\",\"clientId\":\"f8958442-8819-4067-baaf-9248afa8b045\"}}}") + "{\"principalId\":\"14327628-3cb7-44c5-8ebf-281279a7795b\",\"tenantId\":\"a1e05bd5-2b9f-411b-a83b-2414638ccfb4\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"wmn\":{\"principalId\":\"db1afe1a-6475-4f1e-92ba-09660a59ed2b\",\"clientId\":\"64236551-a6d8-4825-9556-71a3ae3828ce\"},\"tijfybvp\":{\"principalId\":\"837667f2-f348-4365-bb3b-8a8db0ff73d0\",\"clientId\":\"490395e5-b324-4280-a808-38bfcc725c3a\"},\"rsg\":{\"principalId\":\"b1d1b3b2-49ef-4517-8db3-53309da920ae\",\"clientId\":\"2fa4adde-f592-4020-a1fe-2f88b2f21a93\"}}}") .toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java index 4d956b2977a1..9f8fee886f7e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java @@ -11,7 +11,7 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"8b7f5ca4-98f6-4926-9f97-a8528493724c\",\"clientId\":\"e9d13bc1-3e29-42d6-9b19-f1ba7ebb8cde\"}") + "{\"principalId\":\"d1190002-a806-459d-9cfd-bd99a8e32b9d\",\"clientId\":\"27e171c3-68d5-4c6b-955b-3260363fbd45\"}") .toObject(UserAssignedIdentity.class); } diff --git a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsAsyncClient.java b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsAsyncClient.java index 65db9a08874b..9f933e98b48d 100644 --- a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsAsyncClient.java +++ b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsAsyncClient.java @@ -4,7 +4,6 @@ package com.azure.ai.openai.assistants; import static com.azure.ai.openai.assistants.implementation.OpenAIUtils.addAzureVersionToRequestOptions; - import com.azure.ai.openai.assistants.implementation.AssistantsClientImpl; import com.azure.ai.openai.assistants.implementation.MultipartFormDataHelper; import com.azure.ai.openai.assistants.implementation.OpenAIUtils; diff --git a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsClient.java b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsClient.java index 83fbf6c7bd32..941599ea2f3f 100644 --- a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsClient.java +++ b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsClient.java @@ -4,7 +4,6 @@ package com.azure.ai.openai.assistants; import static com.azure.ai.openai.assistants.implementation.OpenAIUtils.addAzureVersionToRequestOptions; - import com.azure.ai.openai.assistants.implementation.AssistantsClientImpl; import com.azure.ai.openai.assistants.implementation.MultipartFormDataHelper; import com.azure.ai.openai.assistants.implementation.OpenAIUtils; diff --git a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsClientBuilder.java b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsClientBuilder.java index cf2b0e8560d9..e8ffca254cd1 100644 --- a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsClientBuilder.java +++ b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsClientBuilder.java @@ -4,7 +4,6 @@ package com.azure.ai.openai.assistants; import static com.azure.ai.openai.assistants.implementation.OpenAIUtils.useAzureOpenAIService; - import com.azure.ai.openai.assistants.implementation.AssistantsClientImpl; import com.azure.ai.openai.assistants.implementation.OpenAIUtils; import com.azure.core.annotation.Generated; diff --git a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIAsyncClient.java b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIAsyncClient.java index d99e353eb994..f875802f1bcc 100644 --- a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIAsyncClient.java +++ b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIAsyncClient.java @@ -11,7 +11,6 @@ import static com.azure.ai.openai.implementation.NonAzureOpenAIClientImpl.addModelIdJson; import static com.azure.ai.openai.implementation.OpenAIUtils.addAzureVersionToRequestOptions; import static com.azure.core.util.FluxUtil.monoError; - import com.azure.ai.openai.implementation.CompletionsUtils; import com.azure.ai.openai.implementation.MultipartFormDataHelper; import com.azure.ai.openai.implementation.NonAzureOpenAIClientImpl; diff --git a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClient.java b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClient.java index 6fd49fc09aec..7722894c3b1e 100644 --- a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClient.java +++ b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClient.java @@ -10,7 +10,6 @@ import static com.azure.ai.openai.implementation.EmbeddingsUtils.addEncodingFormat; import static com.azure.ai.openai.implementation.NonAzureOpenAIClientImpl.addModelIdJson; import static com.azure.ai.openai.implementation.OpenAIUtils.addAzureVersionToRequestOptions; - import com.azure.ai.openai.implementation.CompletionsUtils; import com.azure.ai.openai.implementation.MultipartFormDataHelper; import com.azure.ai.openai.implementation.NonAzureOpenAIClientImpl; diff --git a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClientBuilder.java b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClientBuilder.java index 151f613e1fa2..fe1860e480bd 100644 --- a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClientBuilder.java +++ b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClientBuilder.java @@ -4,7 +4,6 @@ package com.azure.ai.openai; import static com.azure.ai.openai.implementation.NonAzureOpenAIClientImpl.OPEN_AI_ENDPOINT; - import com.azure.ai.openai.implementation.NonAzureOpenAIClientImpl; import com.azure.ai.openai.implementation.OpenAIClientImpl; import com.azure.core.annotation.Generated; diff --git a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/models/EmbeddingItem.java b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/models/EmbeddingItem.java index 5752569e7a07..0fd63715395d 100644 --- a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/models/EmbeddingItem.java +++ b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/models/EmbeddingItem.java @@ -5,7 +5,6 @@ import static com.azure.ai.openai.implementation.EmbeddingsUtils.convertBase64ToFloatList; import static com.azure.ai.openai.implementation.EmbeddingsUtils.convertFloatListToBase64; - import com.azure.core.annotation.Generated; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/DeletedVaultsClient.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/DeletedVaultsClient.java index 07884ed3bb04..dbb13c53d079 100644 --- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/DeletedVaultsClient.java +++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/DeletedVaultsClient.java @@ -83,7 +83,7 @@ public interface DeletedVaultsClient { * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<DeletedVaultInner>, DeletedVaultInner> beginUndelete(String location, String deletedVaultName, + SyncPoller<PollResult<Void>, Void> beginUndelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body); /** @@ -99,7 +99,7 @@ SyncPoller<PollResult<DeletedVaultInner>, DeletedVaultInner> beginUndelete(Strin * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<DeletedVaultInner>, DeletedVaultInner> beginUndelete(String location, String deletedVaultName, + SyncPoller<PollResult<Void>, Void> beginUndelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body, Context context); /** @@ -111,10 +111,9 @@ SyncPoller<PollResult<DeletedVaultInner>, DeletedVaultInner> beginUndelete(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeletedVaultInner undelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body); + void undelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body); /** * Start undelete of a deleted vault. @@ -126,11 +125,9 @@ SyncPoller<PollResult<DeletedVaultInner>, DeletedVaultInner> beginUndelete(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeletedVaultInner undelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body, - Context context); + void undelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body, Context context); /** * Get the operation status of a deleted vault. diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/DeletedVaultsClientImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/DeletedVaultsClientImpl.java index ec2b41e928eb..dfe5a42745fd 100644 --- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/DeletedVaultsClientImpl.java +++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/DeletedVaultsClientImpl.java @@ -405,11 +405,11 @@ private Response<BinaryData> undeleteWithResponse(String location, String delete * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<DeletedVaultInner>, DeletedVaultInner> beginUndeleteAsync(String location, - String deletedVaultName, DeletedVaultUndeleteInput body) { + private PollerFlux<PollResult<Void>, Void> beginUndeleteAsync(String location, String deletedVaultName, + DeletedVaultUndeleteInput body) { Mono<Response<Flux<ByteBuffer>>> mono = undeleteWithResponseAsync(location, deletedVaultName, body); - return this.client.<DeletedVaultInner, DeletedVaultInner>getLroResult(mono, this.client.getHttpPipeline(), - DeletedVaultInner.class, DeletedVaultInner.class, this.client.getContext()); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** @@ -424,11 +424,10 @@ private PollerFlux<PollResult<DeletedVaultInner>, DeletedVaultInner> beginUndele * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<DeletedVaultInner>, DeletedVaultInner> beginUndelete(String location, - String deletedVaultName, DeletedVaultUndeleteInput body) { + public SyncPoller<PollResult<Void>, Void> beginUndelete(String location, String deletedVaultName, + DeletedVaultUndeleteInput body) { Response<BinaryData> response = undeleteWithResponse(location, deletedVaultName, body); - return this.client.<DeletedVaultInner, DeletedVaultInner>getLroResult(response, DeletedVaultInner.class, - DeletedVaultInner.class, Context.NONE); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -444,11 +443,10 @@ public SyncPoller<PollResult<DeletedVaultInner>, DeletedVaultInner> beginUndelet * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<DeletedVaultInner>, DeletedVaultInner> beginUndelete(String location, - String deletedVaultName, DeletedVaultUndeleteInput body, Context context) { + public SyncPoller<PollResult<Void>, Void> beginUndelete(String location, String deletedVaultName, + DeletedVaultUndeleteInput body, Context context) { Response<BinaryData> response = undeleteWithResponse(location, deletedVaultName, body, context); - return this.client.<DeletedVaultInner, DeletedVaultInner>getLroResult(response, DeletedVaultInner.class, - DeletedVaultInner.class, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); } /** @@ -460,11 +458,10 @@ public SyncPoller<PollResult<DeletedVaultInner>, DeletedVaultInner> beginUndelet * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<DeletedVaultInner> undeleteAsync(String location, String deletedVaultName, - DeletedVaultUndeleteInput body) { + private Mono<Void> undeleteAsync(String location, String deletedVaultName, DeletedVaultUndeleteInput body) { return beginUndeleteAsync(location, deletedVaultName, body).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -478,11 +475,10 @@ private Mono<DeletedVaultInner> undeleteAsync(String location, String deletedVau * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 DeletedVaultInner undelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body) { - return beginUndelete(location, deletedVaultName, body).getFinalResult(); + public void undelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body) { + beginUndelete(location, deletedVaultName, body).getFinalResult(); } /** @@ -495,12 +491,10 @@ public DeletedVaultInner undelete(String location, String deletedVaultName, Dele * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 DeletedVaultInner undelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body, - Context context) { - return beginUndelete(location, deletedVaultName, body, context).getFinalResult(); + public void undelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body, Context context) { + beginUndelete(location, deletedVaultName, body, context).getFinalResult(); } /** diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/DeletedVaultsImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/DeletedVaultsImpl.java index ab96798d1275..694bada98972 100644 --- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/DeletedVaultsImpl.java +++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/DeletedVaultsImpl.java @@ -59,23 +59,12 @@ public DeletedVault get(String location, String deletedVaultName) { } } - public DeletedVault undelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body) { - DeletedVaultInner inner = this.serviceClient().undelete(location, deletedVaultName, body); - if (inner != null) { - return new DeletedVaultImpl(inner, this.manager()); - } else { - return null; - } + public void undelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body) { + this.serviceClient().undelete(location, deletedVaultName, body); } - public DeletedVault undelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body, - Context context) { - DeletedVaultInner inner = this.serviceClient().undelete(location, deletedVaultName, body, context); - if (inner != null) { - return new DeletedVaultImpl(inner, this.manager()); - } else { - return null; - } + public void undelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body, Context context) { + this.serviceClient().undelete(location, deletedVaultName, body, context); } public Response<OperationResource> getOperationStatusWithResponse(String location, String deletedVaultName, diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/models/DeletedVaults.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/models/DeletedVaults.java index 4399de5da00c..df812bed70ed 100644 --- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/models/DeletedVaults.java +++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/models/DeletedVaults.java @@ -69,9 +69,8 @@ public interface DeletedVaults { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - DeletedVault undelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body); + void undelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body); /** * Start undelete of a deleted vault. @@ -83,9 +82,8 @@ public interface DeletedVaults { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - DeletedVault undelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body, Context context); + void undelete(String location, String deletedVaultName, DeletedVaultUndeleteInput body, Context context); /** * Get the operation status of a deleted vault. diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/DeletedVaultsUndeleteMockTests.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/DeletedVaultsUndeleteMockTests.java index d09f897a9c7b..a30555898175 100644 --- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/DeletedVaultsUndeleteMockTests.java +++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/DeletedVaultsUndeleteMockTests.java @@ -10,7 +10,6 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.recoveryservices.RecoveryServicesManager; -import com.azure.resourcemanager.recoveryservices.models.DeletedVault; import com.azure.resourcemanager.recoveryservices.models.DeletedVaultUndeleteInput; import com.azure.resourcemanager.recoveryservices.models.DeletedVaultUndeleteInputProperties; import java.nio.charset.StandardCharsets; @@ -21,8 +20,7 @@ public final class DeletedVaultsUndeleteMockTests { @Test public void testUndelete() throws Exception { - String responseStr - = "{\"properties\":{\"vaultId\":\"d\",\"vaultDeletionTime\":\"2021-11-22T15:14:34Z\",\"purgeAt\":\"2021-03-06T05:36:52Z\"},\"id\":\"dxssadbzm\",\"name\":\"vdfznudaodvxzb\",\"type\":\"cblylpstdbhhxsr\"}"; + String responseStr = "{}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +29,7 @@ public void testUndelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - DeletedVault response = manager.deletedVaults() + manager.deletedVaults() .undelete("aolps", "lqlfm", new DeletedVaultUndeleteInput() .withProperties(new DeletedVaultUndeleteInputProperties().withRecoveryResourceGroupId("dnbbglzps")), diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/PrivateLinkResourcesOperationsGetWithResponseMockTests.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/PrivateLinkResourcesOperationsGetWithResponseMockTests.java index d0d0f75c3662..bffee22df517 100644 --- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/PrivateLinkResourcesOperationsGetWithResponseMockTests.java +++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/PrivateLinkResourcesOperationsGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class PrivateLinkResourcesOperationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"groupId\":\"mbes\",\"requiredMembers\":[\"k\"],\"requiredZoneNames\":[\"pp\",\"flcxoga\"]},\"id\":\"onz\",\"name\":\"nsikvmkqzeqqkdl\",\"type\":\"fzxmhhvhgureodkw\"}"; + = "{\"properties\":{\"groupId\":\"weriofzpyqsem\",\"requiredMembers\":[\"n\",\"tshhszhedp\"],\"requiredZoneNames\":[\"iwubmwmbesldnk\",\"wtppjflcxogaoko\"]},\"id\":\"m\",\"name\":\"sikvmkqzeqqkdlt\",\"type\":\"zxmhhvhgu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateLinkResource response = manager.privateLinkResourcesOperations() - .getWithResponse("wab", "ets", "hszhedplvwiwu", com.azure.core.util.Context.NONE) + .getWithResponse("dzu", "erscdntne", "fiwjmygtdssls", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/PrivateLinkResourcesOperationsListMockTests.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/PrivateLinkResourcesOperationsListMockTests.java index 56d5491691cb..abf09361babc 100644 --- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/PrivateLinkResourcesOperationsListMockTests.java +++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/PrivateLinkResourcesOperationsListMockTests.java @@ -21,7 +21,7 @@ public final class PrivateLinkResourcesOperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"bogqxndlkzgxhu\",\"requiredMembers\":[\"lbpodxunk\",\"ebxmubyynt\",\"lrb\"],\"requiredZoneNames\":[\"oievseotgqrlltm\",\"wlauwzizxbmpg\"]},\"id\":\"efuzmuvpbttd\",\"name\":\"morppxebmnzbtbh\",\"type\":\"pglkf\"}]}"; + = "{\"value\":[{\"properties\":{\"groupId\":\"dlkzgxhuri\",\"requiredMembers\":[\"podxunkb\",\"bxmubyynt\",\"lrb\",\"tkoievseotgq\"],\"requiredZoneNames\":[\"tmuwlauwzi\",\"xbmp\",\"cjefuzmu\",\"pbttdum\"]},\"id\":\"p\",\"name\":\"xe\",\"type\":\"mnzb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,8 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<PrivateLinkResource> response - = manager.privateLinkResourcesOperations().list("bdagxt", "bqdxbx", com.azure.core.util.Context.NONE); + PagedIterable<PrivateLinkResource> response = manager.privateLinkResourcesOperations() + .list("eodkwobda", "xtibqdxbxwakbog", com.azure.core.util.Context.NONE); } } diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/RecoveryServicesCapabilitiesWithResponseMockTests.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/RecoveryServicesCapabilitiesWithResponseMockTests.java index b31aef7d4d92..4283071a3e7e 100644 --- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/RecoveryServicesCapabilitiesWithResponseMockTests.java +++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/RecoveryServicesCapabilitiesWithResponseMockTests.java @@ -26,7 +26,7 @@ public final class RecoveryServicesCapabilitiesWithResponseMockTests { @Test public void testCapabilitiesWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"dnsZones\":[{\"requiredZoneNames\":[\"wcciuqgbdbu\",\"auvfbtkuwhhmhyk\"],\"subResource\":\"AzureBackup_secondary\"}]},\"type\":\"xafnndlpichko\"}"; + = "{\"properties\":{\"dnsZones\":[{\"requiredZoneNames\":[\"wbpokulpiujwaasi\",\"qiiobyuqer\",\"qlpqwcciuq\"],\"subResource\":\"AzureSiteRecovery\"},{\"requiredZoneNames\":[\"t\",\"uvfbtkuwh\"],\"subResource\":\"AzureBackup_secondary\"}]},\"type\":\"ykojoxafnndlpic\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,17 +36,19 @@ public void testCapabilitiesWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CapabilitiesResponse response = manager.recoveryServices() - .capabilitiesWithResponse("dtkcnqxwbpokulp", - new ResourceCapabilities().withType("pqiiobyuqe") + .capabilitiesWithResponse("ofyyvoqacpi", + new ResourceCapabilities().withType("nwashrtd") .withProperties(new CapabilitiesProperties().withDnsZones( Arrays.asList(new DnsZone().withSubResource(VaultSubResourceType.AZURE_BACKUP_SECONDARY), + new DnsZone().withSubResource(VaultSubResourceType.AZURE_BACKUP), + new DnsZone().withSubResource(VaultSubResourceType.AZURE_BACKUP_SECONDARY), new DnsZone().withSubResource(VaultSubResourceType.AZURE_BACKUP)))), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xafnndlpichko", response.type()); - Assertions.assertEquals(VaultSubResourceType.AZURE_BACKUP_SECONDARY, + Assertions.assertEquals("ykojoxafnndlpic", response.type()); + Assertions.assertEquals(VaultSubResourceType.AZURE_SITE_RECOVERY, response.properties().dnsZones().get(0).subResource()); - Assertions.assertEquals("wcciuqgbdbu", response.properties().dnsZones().get(0).requiredZoneNames().get(0)); + Assertions.assertEquals("wbpokulpiujwaasi", response.properties().dnsZones().get(0).requiredZoneNames().get(0)); } } diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/RecoveryServicesCheckNameAvailabilityWithResponseMockTests.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/RecoveryServicesCheckNameAvailabilityWithResponseMockTests.java index b930893bea55..fc366bce9332 100644 --- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/RecoveryServicesCheckNameAvailabilityWithResponseMockTests.java +++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/RecoveryServicesCheckNameAvailabilityWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class RecoveryServicesCheckNameAvailabilityWithResponseMockTests { @Test public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"nameAvailable\":true,\"reason\":\"xpbtgiwbwo\",\"message\":\"washr\"}"; + String responseStr = "{\"nameAvailable\":true,\"reason\":\"hzoymibmrqy\",\"message\":\"ahwfluszdtmhrk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testCheckNameAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CheckNameAvailabilityResult response = manager.recoveryServices() - .checkNameAvailabilityWithResponse("sxsdqrhzoymibm", "qyib", - new CheckNameAvailabilityParameters().withType("wfluszdt").withName("rkwofyyvoqa"), + .checkNameAvailabilityWithResponse("xozap", "helxprglya", + new CheckNameAvailabilityParameters().withType("dckcbc").withName("jrjxgciqibrhosx"), com.azure.core.util.Context.NONE) .getValue(); Assertions.assertTrue(response.nameAvailable()); - Assertions.assertEquals("xpbtgiwbwo", response.reason()); - Assertions.assertEquals("washr", response.message()); + Assertions.assertEquals("hzoymibmrqy", response.reason()); + Assertions.assertEquals("ahwfluszdtmhrk", response.message()); } } diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/RegisteredIdentitiesDeleteWithResponseMockTests.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/RegisteredIdentitiesDeleteWithResponseMockTests.java index c04d7d1fd14c..bb8b4cc2b469 100644 --- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/RegisteredIdentitiesDeleteWithResponseMockTests.java +++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/RegisteredIdentitiesDeleteWithResponseMockTests.java @@ -28,7 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.registeredIdentities() - .deleteWithResponse("yjrxsagafcnih", "wqapnedgfbcvk", "vq", com.azure.core.util.Context.NONE); + .deleteWithResponse("vhqcrail", "pnppfuf", "rwdmhdlxyjrxsa", com.azure.core.util.Context.NONE); } } diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/ReplicationUsagesListMockTests.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/ReplicationUsagesListMockTests.java index ef19c2e0ffb9..8837f4b422da 100644 --- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/ReplicationUsagesListMockTests.java +++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/ReplicationUsagesListMockTests.java @@ -22,7 +22,7 @@ public final class ReplicationUsagesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"monitoringSummary\":{\"unHealthyVmCount\":1257406932,\"unHealthyProviderCount\":118794160,\"eventsCount\":1324146324,\"deprecatedProviderCount\":1193975954,\"supportedProviderCount\":459767106,\"unsupportedProviderCount\":3568430},\"jobsSummary\":{\"failedJobs\":1518598912,\"suspendedJobs\":1488418313,\"inProgressJobs\":121454695},\"protectedItemCount\":1757688267,\"recoveryPlanCount\":1073132708,\"registeredServersCount\":2107317095,\"recoveryServicesProviderAuthType\":306696017}]}"; + = "{\"value\":[{\"monitoringSummary\":{\"unHealthyVmCount\":771325912,\"unHealthyProviderCount\":1489059266,\"eventsCount\":346770564,\"deprecatedProviderCount\":914097739,\"supportedProviderCount\":978047634,\"unsupportedProviderCount\":1258366887},\"jobsSummary\":{\"failedJobs\":943919605,\"suspendedJobs\":1383619855,\"inProgressJobs\":1193557953},\"protectedItemCount\":1582782062,\"recoveryPlanCount\":540707002,\"registeredServersCount\":67092515,\"recoveryServicesProviderAuthType\":1146790818}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,20 +32,20 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ReplicationUsage> response - = manager.replicationUsages().list("pkeqdcvdrhvoo", "sotbob", com.azure.core.util.Context.NONE); + = manager.replicationUsages().list("afcnih", "wqapnedgfbcvk", com.azure.core.util.Context.NONE); - Assertions.assertEquals(1257406932, response.iterator().next().monitoringSummary().unHealthyVmCount()); - Assertions.assertEquals(118794160, response.iterator().next().monitoringSummary().unHealthyProviderCount()); - Assertions.assertEquals(1324146324, response.iterator().next().monitoringSummary().eventsCount()); - Assertions.assertEquals(1193975954, response.iterator().next().monitoringSummary().deprecatedProviderCount()); - Assertions.assertEquals(459767106, response.iterator().next().monitoringSummary().supportedProviderCount()); - Assertions.assertEquals(3568430, response.iterator().next().monitoringSummary().unsupportedProviderCount()); - Assertions.assertEquals(1518598912, response.iterator().next().jobsSummary().failedJobs()); - Assertions.assertEquals(1488418313, response.iterator().next().jobsSummary().suspendedJobs()); - Assertions.assertEquals(121454695, response.iterator().next().jobsSummary().inProgressJobs()); - Assertions.assertEquals(1757688267, response.iterator().next().protectedItemCount()); - Assertions.assertEquals(1073132708, response.iterator().next().recoveryPlanCount()); - Assertions.assertEquals(2107317095, response.iterator().next().registeredServersCount()); - Assertions.assertEquals(306696017, response.iterator().next().recoveryServicesProviderAuthType()); + Assertions.assertEquals(771325912, response.iterator().next().monitoringSummary().unHealthyVmCount()); + Assertions.assertEquals(1489059266, response.iterator().next().monitoringSummary().unHealthyProviderCount()); + Assertions.assertEquals(346770564, response.iterator().next().monitoringSummary().eventsCount()); + Assertions.assertEquals(914097739, response.iterator().next().monitoringSummary().deprecatedProviderCount()); + Assertions.assertEquals(978047634, response.iterator().next().monitoringSummary().supportedProviderCount()); + Assertions.assertEquals(1258366887, response.iterator().next().monitoringSummary().unsupportedProviderCount()); + Assertions.assertEquals(943919605, response.iterator().next().jobsSummary().failedJobs()); + Assertions.assertEquals(1383619855, response.iterator().next().jobsSummary().suspendedJobs()); + Assertions.assertEquals(1193557953, response.iterator().next().jobsSummary().inProgressJobs()); + Assertions.assertEquals(1582782062, response.iterator().next().protectedItemCount()); + Assertions.assertEquals(540707002, response.iterator().next().recoveryPlanCount()); + Assertions.assertEquals(67092515, response.iterator().next().registeredServersCount()); + Assertions.assertEquals(1146790818, response.iterator().next().recoveryServicesProviderAuthType()); } } diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/UsagesListByVaultsMockTests.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/UsagesListByVaultsMockTests.java index 399189a58767..ee2be786e1a7 100644 --- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/UsagesListByVaultsMockTests.java +++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/UsagesListByVaultsMockTests.java @@ -23,7 +23,7 @@ public final class UsagesListByVaultsMockTests { @Test public void testListByVaults() throws Exception { String responseStr - = "{\"value\":[{\"unit\":\"BytesPerSecond\",\"quotaPeriod\":\"gk\",\"nextResetTime\":\"2021-04-02T01:13:45Z\",\"currentValue\":2377355799268639179,\"limit\":1390680046285193953,\"name\":{\"value\":\"dfvue\",\"localizedValue\":\"wsbpfvm\"}}]}"; + = "{\"value\":[{\"unit\":\"Bytes\",\"quotaPeriod\":\"utwu\",\"nextResetTime\":\"2021-07-28T00:53:44Z\",\"currentValue\":7851561021443013055,\"limit\":1501475305067379063,\"name\":{\"value\":\"yqsluic\",\"localizedValue\":\"ggkzzlvmbmpa\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,15 @@ public void testListByVaults() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<VaultUsage> response - = manager.usages().listByVaults("egrpkhj", "niyqslui", com.azure.core.util.Context.NONE); + = manager.usages().listByVaults("j", "vnhdldwmgxcxr", com.azure.core.util.Context.NONE); - Assertions.assertEquals(UsagesUnit.BYTES_PER_SECOND, response.iterator().next().unit()); - Assertions.assertEquals("gk", response.iterator().next().quotaPeriod()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-02T01:13:45Z"), + Assertions.assertEquals(UsagesUnit.BYTES, response.iterator().next().unit()); + Assertions.assertEquals("utwu", response.iterator().next().quotaPeriod()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-28T00:53:44Z"), response.iterator().next().nextResetTime()); - Assertions.assertEquals(2377355799268639179L, response.iterator().next().currentValue()); - Assertions.assertEquals(1390680046285193953L, response.iterator().next().limit()); - Assertions.assertEquals("dfvue", response.iterator().next().name().value()); - Assertions.assertEquals("wsbpfvm", response.iterator().next().name().localizedValue()); + Assertions.assertEquals(7851561021443013055L, response.iterator().next().currentValue()); + Assertions.assertEquals(1501475305067379063L, response.iterator().next().limit()); + Assertions.assertEquals("yqsluic", response.iterator().next().name().value()); + Assertions.assertEquals("ggkzzlvmbmpa", response.iterator().next().name().localizedValue()); } } diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/VaultCertificatesCreateWithResponseMockTests.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/VaultCertificatesCreateWithResponseMockTests.java index c55dee97eab7..f00eed26d85a 100644 --- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/VaultCertificatesCreateWithResponseMockTests.java +++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/test/java/com/azure/resourcemanager/recoveryservices/generated/VaultCertificatesCreateWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class VaultCertificatesCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "{\"name\":\"lvithhqzonosgg\",\"type\":\"c\",\"id\":\"fwdsj\",\"properties\":{\"authType\":\"ResourceCertificateDetails\",\"friendlyName\":\"jutiiswacff\",\"issuer\":\"k\",\"resourceId\":2817316502996814580,\"subject\":\"fvhqc\",\"thumbprint\":\"ilvpnppfuflrwd\",\"validFrom\":\"2021-03-11T09:23:13Z\",\"validTo\":\"2021-05-07T08:59:17Z\"}}"; + = "{\"name\":\"wwquuvxzxclvithh\",\"type\":\"o\",\"id\":\"sg\",\"properties\":{\"authType\":\"ResourceCertificateDetails\",\"friendlyName\":\"ohfwds\",\"issuer\":\"ka\",\"resourceId\":923632264277516469,\"subject\":\"iswac\",\"thumbprint\":\"gdkz\",\"validFrom\":\"2021-09-01T23:23:38Z\",\"validTo\":\"2021-06-27T17:37:44Z\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,17 +33,17 @@ public void testCreateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VaultCertificateResponse response = manager.vaultCertificates() - .define("fikdowwqu") - .withExistingVault("ohdneuel", "phsdyhto") - .withProperties(new RawCertificateData().withAuthType(AuthType.INVALID)) + .define("phsdyhto") + .withExistingVault("bhjpglkfgohdne", "el") + .withProperties(new RawCertificateData().withAuthType(AuthType.ACCESS_CONTROL_SERVICE)) .create(); - Assertions.assertEquals("jutiiswacff", response.properties().friendlyName()); - Assertions.assertEquals("k", response.properties().issuer()); - Assertions.assertEquals(2817316502996814580L, response.properties().resourceId()); - Assertions.assertEquals("fvhqc", response.properties().subject()); - Assertions.assertEquals("ilvpnppfuflrwd", response.properties().thumbprint()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-11T09:23:13Z"), response.properties().validFrom()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-07T08:59:17Z"), response.properties().validTo()); + Assertions.assertEquals("ohfwds", response.properties().friendlyName()); + Assertions.assertEquals("ka", response.properties().issuer()); + Assertions.assertEquals(923632264277516469L, response.properties().resourceId()); + Assertions.assertEquals("iswac", response.properties().subject()); + Assertions.assertEquals("gdkz", response.properties().thumbprint()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-01T23:23:38Z"), response.properties().validFrom()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-27T17:37:44Z"), response.properties().validTo()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java index 064c432bc32a..597530237f79 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java @@ -349,8 +349,8 @@ PagedIterable<FaultSimulationInner> listFaultSimulation(String resourceGroupName * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginStartFaultSimulation(String resourceGroupName, String clusterName, - FaultSimulationContentWrapper parameters); + SyncPoller<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStartFaultSimulation( + String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters); /** * Starts a fault simulation on the cluster. @@ -365,8 +365,8 @@ SyncPoller<PollResult<Void>, Void> beginStartFaultSimulation(String resourceGrou * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginStartFaultSimulation(String resourceGroupName, String clusterName, - FaultSimulationContentWrapper parameters, Context context); + SyncPoller<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStartFaultSimulation( + String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters, Context context); /** * Starts a fault simulation on the cluster. @@ -377,9 +377,11 @@ SyncPoller<PollResult<Void>, Void> beginStartFaultSimulation(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void startFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters); + FaultSimulationInner startFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationContentWrapper parameters); /** * Starts a fault simulation on the cluster. @@ -391,10 +393,11 @@ SyncPoller<PollResult<Void>, Void> beginStartFaultSimulation(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void startFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters, - Context context); + FaultSimulationInner startFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationContentWrapper parameters, Context context); /** * Stops a fault simulation on the cluster. @@ -408,8 +411,8 @@ void startFaultSimulation(String resourceGroupName, String clusterName, FaultSim * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginStopFaultSimulation(String resourceGroupName, String clusterName, - FaultSimulationIdContent parameters); + SyncPoller<PollResult<FaultSimulationInner>, FaultSimulationInner> + beginStopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters); /** * Stops a fault simulation on the cluster. @@ -424,8 +427,8 @@ SyncPoller<PollResult<Void>, Void> beginStopFaultSimulation(String resourceGroup * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginStopFaultSimulation(String resourceGroupName, String clusterName, - FaultSimulationIdContent parameters, Context context); + SyncPoller<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStopFaultSimulation( + String resourceGroupName, String clusterName, FaultSimulationIdContent parameters, Context context); /** * Stops a fault simulation on the cluster. @@ -436,9 +439,11 @@ SyncPoller<PollResult<Void>, Void> beginStopFaultSimulation(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void stopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters); + FaultSimulationInner stopFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters); /** * Stops a fault simulation on the cluster. @@ -450,8 +455,9 @@ SyncPoller<PollResult<Void>, Void> beginStopFaultSimulation(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void stopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters, - Context context); + FaultSimulationInner stopFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters, Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java index c2e1ca8b8dff..3785d7672a0b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java @@ -692,8 +692,8 @@ void start(String resourceGroupName, String clusterName, String nodeTypeName, No * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginStartFaultSimulation(String resourceGroupName, String clusterName, - String nodeTypeName, FaultSimulationContentWrapper parameters); + SyncPoller<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStartFaultSimulation( + String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters); /** * Starts a fault simulation on the node type. @@ -709,8 +709,9 @@ SyncPoller<PollResult<Void>, Void> beginStartFaultSimulation(String resourceGrou * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginStartFaultSimulation(String resourceGroupName, String clusterName, - String nodeTypeName, FaultSimulationContentWrapper parameters, Context context); + SyncPoller<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStartFaultSimulation( + String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters, + Context context); /** * Starts a fault simulation on the node type. @@ -722,9 +723,10 @@ SyncPoller<PollResult<Void>, Void> beginStartFaultSimulation(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationInner startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters); /** @@ -738,9 +740,10 @@ void startFaultSimulation(String resourceGroupName, String clusterName, String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationInner startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters, Context context); /** @@ -756,8 +759,8 @@ void startFaultSimulation(String resourceGroupName, String clusterName, String n * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginStopFaultSimulation(String resourceGroupName, String clusterName, - String nodeTypeName, FaultSimulationIdContent parameters); + SyncPoller<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStopFaultSimulation( + String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationIdContent parameters); /** * Stops a fault simulation on the node type. @@ -773,8 +776,9 @@ SyncPoller<PollResult<Void>, Void> beginStopFaultSimulation(String resourceGroup * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginStopFaultSimulation(String resourceGroupName, String clusterName, - String nodeTypeName, FaultSimulationIdContent parameters, Context context); + SyncPoller<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStopFaultSimulation( + String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationIdContent parameters, + Context context); /** * Stops a fault simulation on the node type. @@ -786,9 +790,10 @@ SyncPoller<PollResult<Void>, Void> beginStopFaultSimulation(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationInner stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationIdContent parameters); /** @@ -802,9 +807,10 @@ void stopFaultSimulation(String resourceGroupName, String clusterName, String no * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationInner stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationIdContent parameters, Context context); /** diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java index 6643c6a27b2d..790970d9e8b4 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java @@ -409,20 +409,22 @@ public PagedIterable<FaultSimulation> listFaultSimulation(Context context) { return serviceManager.managedClusters().listFaultSimulation(resourceGroupName, clusterName, context); } - public void startFaultSimulation(FaultSimulationContentWrapper parameters) { - serviceManager.managedClusters().startFaultSimulation(resourceGroupName, clusterName, parameters); + public FaultSimulation startFaultSimulation(FaultSimulationContentWrapper parameters) { + return serviceManager.managedClusters().startFaultSimulation(resourceGroupName, clusterName, parameters); } - public void startFaultSimulation(FaultSimulationContentWrapper parameters, Context context) { - serviceManager.managedClusters().startFaultSimulation(resourceGroupName, clusterName, parameters, context); + public FaultSimulation startFaultSimulation(FaultSimulationContentWrapper parameters, Context context) { + return serviceManager.managedClusters() + .startFaultSimulation(resourceGroupName, clusterName, parameters, context); } - public void stopFaultSimulation(FaultSimulationIdContent parameters) { - serviceManager.managedClusters().stopFaultSimulation(resourceGroupName, clusterName, parameters); + public FaultSimulation stopFaultSimulation(FaultSimulationIdContent parameters) { + return serviceManager.managedClusters().stopFaultSimulation(resourceGroupName, clusterName, parameters); } - public void stopFaultSimulation(FaultSimulationIdContent parameters, Context context) { - serviceManager.managedClusters().stopFaultSimulation(resourceGroupName, clusterName, parameters, context); + public FaultSimulation stopFaultSimulation(FaultSimulationIdContent parameters, Context context) { + return serviceManager.managedClusters() + .stopFaultSimulation(resourceGroupName, clusterName, parameters, context); } public ManagedClusterImpl withRegion(Region location) { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java index 09e59ea0c8ba..5d6e69f0a13d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java @@ -1360,12 +1360,12 @@ private Response<BinaryData> startFaultSimulationWithResponse(String resourceGro * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<Void>, Void> beginStartFaultSimulationAsync(String resourceGroupName, - String clusterName, FaultSimulationContentWrapper parameters) { + private PollerFlux<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStartFaultSimulationAsync( + String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters) { Mono<Response<Flux<ByteBuffer>>> mono = startFaultSimulationWithResponseAsync(resourceGroupName, clusterName, parameters); - return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + return this.client.<FaultSimulationInner, FaultSimulationInner>getLroResult(mono, this.client.getHttpPipeline(), + FaultSimulationInner.class, FaultSimulationInner.class, this.client.getContext()); } /** @@ -1380,10 +1380,11 @@ private PollerFlux<PollResult<Void>, Void> beginStartFaultSimulationAsync(String * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginStartFaultSimulation(String resourceGroupName, String clusterName, - FaultSimulationContentWrapper parameters) { + public SyncPoller<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStartFaultSimulation( + String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters) { Response<BinaryData> response = startFaultSimulationWithResponse(resourceGroupName, clusterName, parameters); - return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + return this.client.<FaultSimulationInner, FaultSimulationInner>getLroResult(response, + FaultSimulationInner.class, FaultSimulationInner.class, Context.NONE); } /** @@ -1399,11 +1400,12 @@ public SyncPoller<PollResult<Void>, Void> beginStartFaultSimulation(String resou * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginStartFaultSimulation(String resourceGroupName, String clusterName, - FaultSimulationContentWrapper parameters, Context context) { + public SyncPoller<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStartFaultSimulation( + String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters, Context context) { Response<BinaryData> response = startFaultSimulationWithResponse(resourceGroupName, clusterName, parameters, context); - return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + return this.client.<FaultSimulationInner, FaultSimulationInner>getLroResult(response, + FaultSimulationInner.class, FaultSimulationInner.class, context); } /** @@ -1415,10 +1417,10 @@ public SyncPoller<PollResult<Void>, Void> beginStartFaultSimulation(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Void> startFaultSimulationAsync(String resourceGroupName, String clusterName, + private Mono<FaultSimulationInner> startFaultSimulationAsync(String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters) { return beginStartFaultSimulationAsync(resourceGroupName, clusterName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); @@ -1433,11 +1435,12 @@ private Mono<Void> startFaultSimulationAsync(String resourceGroupName, String cl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void startFaultSimulation(String resourceGroupName, String clusterName, + public FaultSimulationInner startFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters) { - beginStartFaultSimulation(resourceGroupName, clusterName, parameters).getFinalResult(); + return beginStartFaultSimulation(resourceGroupName, clusterName, parameters).getFinalResult(); } /** @@ -1450,11 +1453,12 @@ public void startFaultSimulation(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void startFaultSimulation(String resourceGroupName, String clusterName, + public FaultSimulationInner startFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters, Context context) { - beginStartFaultSimulation(resourceGroupName, clusterName, parameters, context).getFinalResult(); + return beginStartFaultSimulation(resourceGroupName, clusterName, parameters, context).getFinalResult(); } /** @@ -1529,12 +1533,12 @@ private Response<BinaryData> stopFaultSimulationWithResponse(String resourceGrou * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<Void>, Void> beginStopFaultSimulationAsync(String resourceGroupName, - String clusterName, FaultSimulationIdContent parameters) { + private PollerFlux<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStopFaultSimulationAsync( + String resourceGroupName, String clusterName, FaultSimulationIdContent parameters) { Mono<Response<Flux<ByteBuffer>>> mono = stopFaultSimulationWithResponseAsync(resourceGroupName, clusterName, parameters); - return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + return this.client.<FaultSimulationInner, FaultSimulationInner>getLroResult(mono, this.client.getHttpPipeline(), + FaultSimulationInner.class, FaultSimulationInner.class, this.client.getContext()); } /** @@ -1549,10 +1553,11 @@ private PollerFlux<PollResult<Void>, Void> beginStopFaultSimulationAsync(String * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginStopFaultSimulation(String resourceGroupName, String clusterName, - FaultSimulationIdContent parameters) { + public SyncPoller<PollResult<FaultSimulationInner>, FaultSimulationInner> + beginStopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters) { Response<BinaryData> response = stopFaultSimulationWithResponse(resourceGroupName, clusterName, parameters); - return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + return this.client.<FaultSimulationInner, FaultSimulationInner>getLroResult(response, + FaultSimulationInner.class, FaultSimulationInner.class, Context.NONE); } /** @@ -1568,11 +1573,12 @@ public SyncPoller<PollResult<Void>, Void> beginStopFaultSimulation(String resour * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginStopFaultSimulation(String resourceGroupName, String clusterName, - FaultSimulationIdContent parameters, Context context) { + public SyncPoller<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStopFaultSimulation( + String resourceGroupName, String clusterName, FaultSimulationIdContent parameters, Context context) { Response<BinaryData> response = stopFaultSimulationWithResponse(resourceGroupName, clusterName, parameters, context); - return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + return this.client.<FaultSimulationInner, FaultSimulationInner>getLroResult(response, + FaultSimulationInner.class, FaultSimulationInner.class, context); } /** @@ -1584,10 +1590,10 @@ public SyncPoller<PollResult<Void>, Void> beginStopFaultSimulation(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Void> stopFaultSimulationAsync(String resourceGroupName, String clusterName, + private Mono<FaultSimulationInner> stopFaultSimulationAsync(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters) { return beginStopFaultSimulationAsync(resourceGroupName, clusterName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); @@ -1602,10 +1608,12 @@ private Mono<Void> stopFaultSimulationAsync(String resourceGroupName, String clu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void stopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters) { - beginStopFaultSimulation(resourceGroupName, clusterName, parameters).getFinalResult(); + public FaultSimulationInner stopFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters) { + return beginStopFaultSimulation(resourceGroupName, clusterName, parameters).getFinalResult(); } /** @@ -1618,11 +1626,12 @@ public void stopFaultSimulation(String resourceGroupName, String clusterName, Fa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void stopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters, - Context context) { - beginStopFaultSimulation(resourceGroupName, clusterName, parameters, context).getFinalResult(); + public FaultSimulationInner stopFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters, Context context) { + return beginStopFaultSimulation(resourceGroupName, clusterName, parameters, context).getFinalResult(); } /** diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersImpl.java index 758b586a5010..60cf16837201 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersImpl.java @@ -116,23 +116,48 @@ public PagedIterable<FaultSimulation> listFaultSimulation(String resourceGroupNa return ResourceManagerUtils.mapPage(inner, inner1 -> new FaultSimulationImpl(inner1, this.manager())); } - public void startFaultSimulation(String resourceGroupName, String clusterName, + public FaultSimulation startFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters) { - this.serviceClient().startFaultSimulation(resourceGroupName, clusterName, parameters); + FaultSimulationInner inner + = this.serviceClient().startFaultSimulation(resourceGroupName, clusterName, parameters); + if (inner != null) { + return new FaultSimulationImpl(inner, this.manager()); + } else { + return null; + } } - public void startFaultSimulation(String resourceGroupName, String clusterName, + public FaultSimulation startFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters, Context context) { - this.serviceClient().startFaultSimulation(resourceGroupName, clusterName, parameters, context); + FaultSimulationInner inner + = this.serviceClient().startFaultSimulation(resourceGroupName, clusterName, parameters, context); + if (inner != null) { + return new FaultSimulationImpl(inner, this.manager()); + } else { + return null; + } } - public void stopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters) { - this.serviceClient().stopFaultSimulation(resourceGroupName, clusterName, parameters); + public FaultSimulation stopFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters) { + FaultSimulationInner inner + = this.serviceClient().stopFaultSimulation(resourceGroupName, clusterName, parameters); + if (inner != null) { + return new FaultSimulationImpl(inner, this.manager()); + } else { + return null; + } } - public void stopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters, - Context context) { - this.serviceClient().stopFaultSimulation(resourceGroupName, clusterName, parameters, context); + public FaultSimulation stopFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters, Context context) { + FaultSimulationInner inner + = this.serviceClient().stopFaultSimulation(resourceGroupName, clusterName, parameters, context); + if (inner != null) { + return new FaultSimulationImpl(inner, this.manager()); + } else { + return null; + } } public ManagedCluster getById(String id) { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeImpl.java index 3fe29e0dac7a..234823dd64c8 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeImpl.java @@ -483,21 +483,22 @@ public void start(NodeTypeActionParameters parameters, Context context) { serviceManager.nodeTypes().start(resourceGroupName, clusterName, nodeTypeName, parameters, context); } - public void startFaultSimulation(FaultSimulationContentWrapper parameters) { - serviceManager.nodeTypes().startFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters); + public FaultSimulation startFaultSimulation(FaultSimulationContentWrapper parameters) { + return serviceManager.nodeTypes() + .startFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters); } - public void startFaultSimulation(FaultSimulationContentWrapper parameters, Context context) { - serviceManager.nodeTypes() + public FaultSimulation startFaultSimulation(FaultSimulationContentWrapper parameters, Context context) { + return serviceManager.nodeTypes() .startFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters, context); } - public void stopFaultSimulation(FaultSimulationIdContent parameters) { - serviceManager.nodeTypes().stopFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters); + public FaultSimulation stopFaultSimulation(FaultSimulationIdContent parameters) { + return serviceManager.nodeTypes().stopFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters); } - public void stopFaultSimulation(FaultSimulationIdContent parameters, Context context) { - serviceManager.nodeTypes() + public FaultSimulation stopFaultSimulation(FaultSimulationIdContent parameters, Context context) { + return serviceManager.nodeTypes() .stopFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters, context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java index 4ad520fb18a7..30813c9a5ec2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java @@ -2367,12 +2367,12 @@ private Response<BinaryData> startFaultSimulationWithResponse(String resourceGro * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<Void>, Void> beginStartFaultSimulationAsync(String resourceGroupName, - String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters) { + private PollerFlux<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStartFaultSimulationAsync( + String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters) { Mono<Response<Flux<ByteBuffer>>> mono = startFaultSimulationWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters); - return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + return this.client.<FaultSimulationInner, FaultSimulationInner>getLroResult(mono, this.client.getHttpPipeline(), + FaultSimulationInner.class, FaultSimulationInner.class, this.client.getContext()); } /** @@ -2388,11 +2388,12 @@ private PollerFlux<PollResult<Void>, Void> beginStartFaultSimulationAsync(String * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginStartFaultSimulation(String resourceGroupName, String clusterName, - String nodeTypeName, FaultSimulationContentWrapper parameters) { + public SyncPoller<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStartFaultSimulation( + String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters) { Response<BinaryData> response = startFaultSimulationWithResponse(resourceGroupName, clusterName, nodeTypeName, parameters); - return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + return this.client.<FaultSimulationInner, FaultSimulationInner>getLroResult(response, + FaultSimulationInner.class, FaultSimulationInner.class, Context.NONE); } /** @@ -2409,11 +2410,13 @@ public SyncPoller<PollResult<Void>, Void> beginStartFaultSimulation(String resou * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginStartFaultSimulation(String resourceGroupName, String clusterName, - String nodeTypeName, FaultSimulationContentWrapper parameters, Context context) { + public SyncPoller<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStartFaultSimulation( + String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters, + Context context) { Response<BinaryData> response = startFaultSimulationWithResponse(resourceGroupName, clusterName, nodeTypeName, parameters, context); - return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + return this.client.<FaultSimulationInner, FaultSimulationInner>getLroResult(response, + FaultSimulationInner.class, FaultSimulationInner.class, context); } /** @@ -2426,11 +2429,11 @@ public SyncPoller<PollResult<Void>, Void> beginStartFaultSimulation(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Void> startFaultSimulationAsync(String resourceGroupName, String clusterName, String nodeTypeName, - FaultSimulationContentWrapper parameters) { + private Mono<FaultSimulationInner> startFaultSimulationAsync(String resourceGroupName, String clusterName, + String nodeTypeName, FaultSimulationContentWrapper parameters) { return beginStartFaultSimulationAsync(resourceGroupName, clusterName, nodeTypeName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2445,11 +2448,12 @@ private Mono<Void> startFaultSimulationAsync(String resourceGroupName, String cl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + public FaultSimulationInner startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters) { - beginStartFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters).getFinalResult(); + return beginStartFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters).getFinalResult(); } /** @@ -2463,11 +2467,13 @@ public void startFaultSimulation(String resourceGroupName, String clusterName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + public FaultSimulationInner startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters, Context context) { - beginStartFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters, context).getFinalResult(); + return beginStartFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters, context) + .getFinalResult(); } /** @@ -2549,12 +2555,12 @@ private Response<BinaryData> stopFaultSimulationWithResponse(String resourceGrou * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<Void>, Void> beginStopFaultSimulationAsync(String resourceGroupName, - String clusterName, String nodeTypeName, FaultSimulationIdContent parameters) { + private PollerFlux<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStopFaultSimulationAsync( + String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationIdContent parameters) { Mono<Response<Flux<ByteBuffer>>> mono = stopFaultSimulationWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters); - return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + return this.client.<FaultSimulationInner, FaultSimulationInner>getLroResult(mono, this.client.getHttpPipeline(), + FaultSimulationInner.class, FaultSimulationInner.class, this.client.getContext()); } /** @@ -2570,11 +2576,12 @@ private PollerFlux<PollResult<Void>, Void> beginStopFaultSimulationAsync(String * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginStopFaultSimulation(String resourceGroupName, String clusterName, - String nodeTypeName, FaultSimulationIdContent parameters) { + public SyncPoller<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStopFaultSimulation( + String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationIdContent parameters) { Response<BinaryData> response = stopFaultSimulationWithResponse(resourceGroupName, clusterName, nodeTypeName, parameters); - return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + return this.client.<FaultSimulationInner, FaultSimulationInner>getLroResult(response, + FaultSimulationInner.class, FaultSimulationInner.class, Context.NONE); } /** @@ -2591,11 +2598,13 @@ public SyncPoller<PollResult<Void>, Void> beginStopFaultSimulation(String resour * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginStopFaultSimulation(String resourceGroupName, String clusterName, - String nodeTypeName, FaultSimulationIdContent parameters, Context context) { + public SyncPoller<PollResult<FaultSimulationInner>, FaultSimulationInner> beginStopFaultSimulation( + String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationIdContent parameters, + Context context) { Response<BinaryData> response = stopFaultSimulationWithResponse(resourceGroupName, clusterName, nodeTypeName, parameters, context); - return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + return this.client.<FaultSimulationInner, FaultSimulationInner>getLroResult(response, + FaultSimulationInner.class, FaultSimulationInner.class, context); } /** @@ -2608,11 +2617,11 @@ public SyncPoller<PollResult<Void>, Void> beginStopFaultSimulation(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Void> stopFaultSimulationAsync(String resourceGroupName, String clusterName, String nodeTypeName, - FaultSimulationIdContent parameters) { + private Mono<FaultSimulationInner> stopFaultSimulationAsync(String resourceGroupName, String clusterName, + String nodeTypeName, FaultSimulationIdContent parameters) { return beginStopFaultSimulationAsync(resourceGroupName, clusterName, nodeTypeName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2627,11 +2636,12 @@ private Mono<Void> stopFaultSimulationAsync(String resourceGroupName, String clu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + public FaultSimulationInner stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationIdContent parameters) { - beginStopFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters).getFinalResult(); + return beginStopFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters).getFinalResult(); } /** @@ -2645,11 +2655,13 @@ public void stopFaultSimulation(String resourceGroupName, String clusterName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + public FaultSimulationInner stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationIdContent parameters, Context context) { - beginStopFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters, context).getFinalResult(); + return beginStopFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters, context) + .getFinalResult(); } /** diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesImpl.java index 5721abcbdb0e..e9e3a2edd81b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesImpl.java @@ -133,24 +133,48 @@ public void start(String resourceGroupName, String clusterName, String nodeTypeN this.serviceClient().start(resourceGroupName, clusterName, nodeTypeName, parameters, context); } - public void startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + public FaultSimulation startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters) { - this.serviceClient().startFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters); + FaultSimulationInner inner + = this.serviceClient().startFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters); + if (inner != null) { + return new FaultSimulationImpl(inner, this.manager()); + } else { + return null; + } } - public void startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + public FaultSimulation startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters, Context context) { - this.serviceClient().startFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters, context); + FaultSimulationInner inner = this.serviceClient() + .startFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters, context); + if (inner != null) { + return new FaultSimulationImpl(inner, this.manager()); + } else { + return null; + } } - public void stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + public FaultSimulation stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationIdContent parameters) { - this.serviceClient().stopFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters); + FaultSimulationInner inner + = this.serviceClient().stopFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters); + if (inner != null) { + return new FaultSimulationImpl(inner, this.manager()); + } else { + return null; + } } - public void stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + public FaultSimulation stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationIdContent parameters, Context context) { - this.serviceClient().stopFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters, context); + FaultSimulationInner inner = this.serviceClient() + .stopFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters, context); + if (inner != null) { + return new FaultSimulationImpl(inner, this.manager()); + } else { + return null; + } } public Response<FaultSimulation> getFaultSimulationWithResponse(String resourceGroupName, String clusterName, diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedCluster.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedCluster.java index 8e8a7794e728..8af7f0bdc355 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedCluster.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedCluster.java @@ -1199,8 +1199,9 @@ interface WithTags { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void startFaultSimulation(FaultSimulationContentWrapper parameters); + FaultSimulation startFaultSimulation(FaultSimulationContentWrapper parameters); /** * Starts a fault simulation on the cluster. @@ -1210,8 +1211,9 @@ interface WithTags { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void startFaultSimulation(FaultSimulationContentWrapper parameters, Context context); + FaultSimulation startFaultSimulation(FaultSimulationContentWrapper parameters, Context context); /** * Stops a fault simulation on the cluster. @@ -1220,8 +1222,9 @@ interface WithTags { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void stopFaultSimulation(FaultSimulationIdContent parameters); + FaultSimulation stopFaultSimulation(FaultSimulationIdContent parameters); /** * Stops a fault simulation on the cluster. @@ -1231,6 +1234,7 @@ interface WithTags { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void stopFaultSimulation(FaultSimulationIdContent parameters, Context context); + FaultSimulation stopFaultSimulation(FaultSimulationIdContent parameters, Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusters.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusters.java index 6d586ce7855c..6bb8275aad43 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusters.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusters.java @@ -175,8 +175,10 @@ FaultSimulation getFaultSimulation(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void startFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters); + FaultSimulation startFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationContentWrapper parameters); /** * Starts a fault simulation on the cluster. @@ -188,9 +190,10 @@ FaultSimulation getFaultSimulation(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void startFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters, - Context context); + FaultSimulation startFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationContentWrapper parameters, Context context); /** * Stops a fault simulation on the cluster. @@ -201,8 +204,10 @@ void startFaultSimulation(String resourceGroupName, String clusterName, FaultSim * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void stopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters); + FaultSimulation stopFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters); /** * Stops a fault simulation on the cluster. @@ -214,9 +219,10 @@ void startFaultSimulation(String resourceGroupName, String clusterName, FaultSim * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void stopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters, - Context context); + FaultSimulation stopFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters, Context context); /** * Get a Service Fabric managed cluster resource created or in the process of being created in the specified diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeType.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeType.java index 6ddafb19a7e9..df4f54b7b220 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeType.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeType.java @@ -1611,8 +1611,9 @@ interface WithSku { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void startFaultSimulation(FaultSimulationContentWrapper parameters); + FaultSimulation startFaultSimulation(FaultSimulationContentWrapper parameters); /** * Starts a fault simulation on the node type. @@ -1622,8 +1623,9 @@ interface WithSku { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void startFaultSimulation(FaultSimulationContentWrapper parameters, Context context); + FaultSimulation startFaultSimulation(FaultSimulationContentWrapper parameters, Context context); /** * Stops a fault simulation on the node type. @@ -1632,8 +1634,9 @@ interface WithSku { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void stopFaultSimulation(FaultSimulationIdContent parameters); + FaultSimulation stopFaultSimulation(FaultSimulationIdContent parameters); /** * Stops a fault simulation on the node type. @@ -1643,8 +1646,9 @@ interface WithSku { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void stopFaultSimulation(FaultSimulationIdContent parameters, Context context); + FaultSimulation stopFaultSimulation(FaultSimulationIdContent parameters, Context context); /** * Gets a fault simulation by the simulationId. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypes.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypes.java index 574edbdbaa67..14866858614f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypes.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypes.java @@ -285,8 +285,9 @@ void start(String resourceGroupName, String clusterName, String nodeTypeName, No * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulation startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters); /** @@ -300,8 +301,9 @@ void startFaultSimulation(String resourceGroupName, String clusterName, String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulation startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters, Context context); /** @@ -314,8 +316,9 @@ void startFaultSimulation(String resourceGroupName, String clusterName, String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulation stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationIdContent parameters); /** @@ -329,8 +332,9 @@ void stopFaultSimulation(String resourceGroupName, String clusterName, String no * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulation stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, FaultSimulationIdContent parameters, Context context); /** From fee30da2ed8337a8fd10ea16a49aa75fa86b823c Mon Sep 17 00:00:00 2001 From: Isabelle <141270045+ibrandes@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:18:48 -0800 Subject: [PATCH 089/186] STG100 Beta Features (#46518) * stg100 versioning changes (#46145) * stg100 versioning changes * removing extra space * fixing formatting error * listblob startsFrom changes (#46220) * listblob startsFrom changes * adding recordings * fixing review comments * adding listblobsbyhierachy tests * adding enableSmbDirectoryLease property (#46362) * adding enableSmbDirectoryLease property * adding tests * fixing linting errors * STG100 - Files Encryption in Transit (#46444) * encryption in transit changes * adding tests * fixing review comments * STG100 - Blob Principal Bound Identity SAS (#46282) * adding implementation and happy path test * adding more tests and recordings, and moving token extraction to common * re-adding recordings after pull * fixing string to sign test * forgot that token can't be recorded * reverting assets and moving query param * adding old assets tag back because im silly * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * consolidating string to sign logic --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * STG100 - Datalake Principal Bound Identity SAS (#46445) * adding implementation and happy path test * adding more tests and recordings, and moving token extraction to common * re-adding recordings after pull * fixing string to sign test * forgot that token can't be recorded * reverting assets and moving query param * adding old assets tag back because im silly * whole feature * adding more tests and consolidating string to sign logic * fixing test that was unocovered through the fix to liveTestScenarioWithRetry * removing change in blobsasimplutil * STG100 - Get and Set Blob Tags Conditional Headers (#46406) * generating off swagger * wip * proper implementation added * adding tests and recordings * adding new headers to recording ignore list * regenerating off swagger and adding listblob starts from implementation back * fixing position of startsfrom in implementations * fixing formatting * fixing formatting again * updating recordings * STG100 - Queue User Delegation SAS (#46311) * adding implementation and happy path test * adding more tests and recordings, and moving token extraction to common * re-adding recordings after pull * fixing string to sign test * forgot that token can't be recorded * initial implementation * async implementations and tests * fixing typo * style * adding send message with user delegation sas test and service tests * expanding tid and oid acronyms * adding new test and recordings * removing change in blobsasimplutil * updating recordings * STG100 - reflect main branch swagger (#46474) * re-generating off of swagger * more swagger * enabling and disabling * swapping binary data for flux<bytebuffer> and removing requirement in module-info * STG100 - Files User Delegation Sas (#46376) * adding implementation and happy path test * adding more tests and recordings, and moving token extraction to common * re-adding recordings after pull * fixing string to sign test * forgot that token can't be recorded * initial implementation * async implementations and tests * fixing typo * style * initial implementation and fixing typos * adding oid tests * formatting * fixing tests in FileSasClientTests * adding service sync and async tests * spotless * Update sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/ServicesImpl.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/ServicesImpl.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * undoing copilot change because it edited an impl file * regenerating off swagger * Update sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/sas/ShareServiceSasSignatureValues.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/sas/ShareServiceSasSignatureValues.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/sas/ShareServiceSasSignatureValues.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/sas/ShareServiceSasSignatureValues.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * removing oid and tid acronyms * removing changes to other packages from branching issue * removing changes to other packages from branching issue * please retain the indent git * correctly scoping file generateuserdelegationsas * adding scope verifying test for share * adding async tests and recordings * updating assets * updating assets --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * changing enablesmbdirectorylease getter and setter method names * re-generating off of all swaggers and fixing queue swagger link * adding queue data contributor rbac role to live test resources * making share service Share service * STG100 - DFS List Paths Begin From (#46469) * swagger changes * adding tests * adding recordings and fixing tests * fixing review comments * fixing review comments * renaming beginFrom to startFrom * adding records * STG100 - Create File With Data (#46486) * wip * swagger * making FilePropertySemantics a public model and updating options bags * wip md5 * md5 implementation and filepropertysemantics test * deleting redundant models * adding create tests * assets and spotbugs * assets again * more assets * changing get/setBinaryData to get/setData * adding new test for flux bytebuffer and explanitory comment for other test * adjusting recordings * test cleanup * updating assets after update from main * reverting smb directory lease property (#47094) * updating assets after update from main * updating datalake swagger to point to azure remote * reverting create file with data * updating assets for blob share and queue * updating assets for blob and datalake * updating changelogs to include new features * adjusting failing live tests * updating assets for queue --------- Co-authored-by: gunjansingh-msft <gunjansingh@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- sdk/storage/azure-storage-blob/CHANGELOG.md | 3 + sdk/storage/azure-storage-blob/assets.json | 2 +- .../blob/BlobContainerAsyncClient.java | 17 +- .../storage/blob/BlobContainerClient.java | 10 +- .../storage/blob/BlobServiceVersion.java | 9 +- .../blob/implementation/BlobsImpl.java | 300 +++++-- .../blob/implementation/ContainersImpl.java | 188 +++-- .../implementation/util/BlobSasImplUtil.java | 7 +- .../storage/blob/models/ListBlobsOptions.java | 24 + .../sas/BlobServiceSasSignatureValues.java | 26 + .../blob/specialized/BlobAsyncClientBase.java | 8 +- .../blob/specialized/BlobClientBase.java | 8 +- .../com/azure/storage/blob/BlobApiTests.java | 95 ++- .../azure/storage/blob/BlobAsyncApiTests.java | 79 +- .../com/azure/storage/blob/BlobTestBase.java | 11 +- .../azure/storage/blob/ContainerApiTests.java | 35 + .../storage/blob/ContainerAsyncApiTests.java | 38 + .../storage/blob/SasAsyncClientTests.java | 193 ++++- .../azure/storage/blob/SasClientTests.java | 175 +++- .../azure-storage-blob/swagger/README.md | 9 +- .../azure-storage-common/ci.system.properties | 4 +- .../common/implementation/Constants.java | 9 +- .../common/implementation/UploadUtils.java | 19 + .../common/sas/CommonSasQueryParameters.java | 16 + .../test/shared/StorageCommonTestUtils.java | 33 + .../azure-storage-file-datalake/CHANGELOG.md | 3 + .../azure-storage-file-datalake/assets.json | 2 +- .../DataLakeDirectoryAsyncClient.java | 55 +- .../datalake/DataLakeDirectoryClient.java | 28 +- .../DataLakeFileSystemAsyncClient.java | 5 +- .../datalake/DataLakeFileSystemClient.java | 3 +- .../file/datalake/DataLakeServiceVersion.java | 9 +- .../implementation/FileSystemsImpl.java | 99 ++- .../util/DataLakeSasImplUtil.java | 9 +- .../implementation/util/TransformUtils.java | 2 + .../datalake/models/ListPathsOptions.java | 24 + .../DataLakeServiceSasSignatureValues.java | 25 + .../file/datalake/DataLakeTestBase.java | 22 + .../file/datalake/DirectoryApiTests.java | 14 + .../file/datalake/DirectoryAsyncApiTests.java | 13 + .../storage/file/datalake/FileApiTest.java | 18 - .../file/datalake/FileAsyncApiTests.java | 28 +- .../file/datalake/FileSystemApiTests.java | 28 + .../datalake/FileSystemAsyncApiTests.java | 21 + .../storage/file/datalake/SasAsyncTests.java | 189 ++++- .../azure/storage/file/datalake/SasTests.java | 182 ++++ .../swagger/README.md | 2 +- .../azure-storage-file-share/CHANGELOG.md | 3 + .../azure-storage-file-share/assets.json | 2 +- .../storage/file/share/ShareAsyncClient.java | 53 +- .../azure/storage/file/share/ShareClient.java | 52 +- .../file/share/ShareDirectoryAsyncClient.java | 21 +- .../file/share/ShareDirectoryClient.java | 8 +- .../file/share/ShareFileAsyncClient.java | 64 +- .../storage/file/share/ShareFileClient.java | 48 +- .../file/share/ShareServiceAsyncClient.java | 70 +- .../file/share/ShareServiceClient.java | 63 +- .../file/share/ShareServiceVersion.java | 9 +- .../share/implementation/DirectoriesImpl.java | 89 +- .../file/share/implementation/FilesImpl.java | 799 ++++++++++++++++-- .../share/implementation/ServicesImpl.java | 273 ++++++ .../file/share/implementation/SharesImpl.java | 176 +++- .../models/FilesCreateHeaders.java | 70 ++ .../ServicesGetUserDelegationKeyHeaders.java | 157 ++++ .../models/SharePropertiesInternal.java | 32 + .../models/SharesGetPropertiesHeaders.java | 37 + .../implementation/util/ShareSasImplUtil.java | 86 +- .../share/models/FilePropertySemantics.java | 57 ++ .../storage/file/share/models/KeyInfo.java | 144 ++++ .../file/share/models/ShareNfsSettings.java | 113 +++ .../ShareNfsSettingsEncryptionInTransit.java | 119 +++ .../file/share/models/ShareProperties.java | 30 + .../share/models/ShareProtocolSettings.java | 31 + .../file/share/models/ShareSmbSettings.java | 32 + .../ShareSmbSettingsEncryptionInTransit.java | 119 +++ .../file/share/models/UserDelegationKey.java | 306 +++++++ .../options/ShareDirectoryCreateOptions.java | 29 + .../share/options/ShareFileCreateOptions.java | 52 ++ .../sas/ShareServiceSasSignatureValues.java | 25 + .../src/samples/README.md | 2 +- .../storage/file/share/DirectoryApiTests.java | 46 + .../file/share/DirectoryAsyncApiTests.java | 47 ++ .../storage/file/share/FileApiTests.java | 198 ++++- .../storage/file/share/FileAsyncApiTests.java | 180 +++- .../file/share/FileSasClientTests.java | 591 +++++++++++++ .../file/share/FileServiceApiTests.java | 111 +++ .../file/share/FileServiceAsyncApiTests.java | 121 +++ .../storage/file/share/FileShareTestBase.java | 71 +- .../file/share/FileShareTestHelper.java | 6 + .../storage/file/share/ShareApiTests.java | 4 +- .../swagger/README.md | 14 +- sdk/storage/azure-storage-queue/CHANGELOG.md | 2 + sdk/storage/azure-storage-queue/assets.json | 2 +- .../azure/storage/queue/QueueAsyncClient.java | 33 + .../com/azure/storage/queue/QueueClient.java | 33 + .../queue/QueueServiceAsyncClient.java | 58 ++ .../storage/queue/QueueServiceClient.java | 53 ++ .../storage/queue/QueueServiceVersion.java | 9 +- .../queue/implementation/ServicesImpl.java | 273 ++++++ .../ServicesGetUserDelegationKeyHeaders.java | 157 ++++ .../implementation/util/QueueSasImplUtil.java | 74 +- .../azure/storage/queue/models/KeyInfo.java | 144 ++++ .../queue/models/UserDelegationKey.java | 306 +++++++ .../sas/QueueServiceSasSignatureValues.java | 35 +- .../storage/queue/QueueAsyncApiTests.java | 2 +- .../queue/QueueSasAsyncClientTests.java | 124 +++ .../storage/queue/QueueSasClientTests.java | 104 +++ .../storage/queue/QueueServiceApiTests.java | 28 + .../queue/QueueServiceAsyncApiTests.java | 30 +- .../azure/storage/queue/QueueTestBase.java | 26 +- .../azure-storage-queue/swagger/README.md | 14 +- sdk/storage/test-resources.json | 13 + 112 files changed, 7549 insertions(+), 630 deletions(-) create mode 100644 sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/ServicesGetUserDelegationKeyHeaders.java create mode 100644 sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/FilePropertySemantics.java create mode 100644 sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/KeyInfo.java create mode 100644 sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareNfsSettings.java create mode 100644 sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareNfsSettingsEncryptionInTransit.java create mode 100644 sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareSmbSettingsEncryptionInTransit.java create mode 100644 sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/UserDelegationKey.java create mode 100644 sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesGetUserDelegationKeyHeaders.java create mode 100644 sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/KeyInfo.java create mode 100644 sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/UserDelegationKey.java diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index d3145dd28c8e..54f772c8d7b5 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -3,6 +3,9 @@ ## 12.33.0-beta.1 (Unreleased) ### Features Added +- Added support for the StartFrom parameter on `BlobContainerClient.listBlobs()` and `BlobContainerClient.listBlobsByHierarchy()` APIs. +- Added support for conditional headers on `BlobClientBase.getTags()` and `BlobClientBase.setTags()` APIs. +- Added support for Principal-Bound Identity User Delegation SAS. ### Breaking Changes diff --git a/sdk/storage/azure-storage-blob/assets.json b/sdk/storage/azure-storage-blob/assets.json index 82f1a7906dca..a2bc9bdaa663 100644 --- a/sdk/storage/azure-storage-blob/assets.json +++ b/sdk/storage/azure-storage-blob/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-blob", - "Tag": "java/storage/azure-storage-blob_c018337a13" + "Tag": "java/storage/azure-storage-blob_f26563826e" } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index 540ade6b8e06..b86fe4e76b2f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -1170,9 +1170,10 @@ PagedFlux<BlobItem> listBlobsFlatWithOptionalTimeout(ListBlobsOptions options, S ArrayList<ListBlobsIncludeItem> include = options.getDetails().toList().isEmpty() ? null : options.getDetails().toList(); - return StorageImplUtils.applyOptionalTimeout(this.azureBlobStorage.getContainers() - .listBlobFlatSegmentWithResponseAsync(containerName, options.getPrefix(), marker, - options.getMaxResultsPerPage(), include, null, null, Context.NONE), + return StorageImplUtils.applyOptionalTimeout( + this.azureBlobStorage.getContainers() + .listBlobFlatSegmentWithResponseAsync(containerName, options.getPrefix(), marker, + options.getMaxResultsPerPage(), include, options.getStartFrom(), null, null, Context.NONE), timeout); } @@ -1299,7 +1300,8 @@ PagedFlux<BlobItem> listBlobsHierarchyWithOptionalTimeout(String delimiter, List // Note that this prefers the value passed to .byPage(int) over the value on the options finalOptions = new ListBlobsOptions().setMaxResultsPerPage(pageSize) .setPrefix(options.getPrefix()) - .setDetails(options.getDetails()); + .setDetails(options.getDetails()) + .setStartFrom(options.getStartFrom()); } } else { finalOptions = options; @@ -1335,9 +1337,10 @@ PagedFlux<BlobItem> listBlobsHierarchyWithOptionalTimeout(String delimiter, List ArrayList<ListBlobsIncludeItem> include = options.getDetails().toList().isEmpty() ? null : options.getDetails().toList(); - return StorageImplUtils.applyOptionalTimeout(this.azureBlobStorage.getContainers() - .listBlobHierarchySegmentWithResponseAsync(containerName, delimiter, options.getPrefix(), marker, - options.getMaxResultsPerPage(), include, null, null, Context.NONE), + return StorageImplUtils.applyOptionalTimeout( + this.azureBlobStorage.getContainers() + .listBlobHierarchySegmentWithResponseAsync(containerName, delimiter, options.getPrefix(), marker, + options.getMaxResultsPerPage(), include, options.getStartFrom(), null, null, Context.NONE), timeout); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 12ff712b405c..64de81617f9c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -1026,7 +1026,9 @@ public PagedIterable<BlobItem> listBlobs(ListBlobsOptions options, String contin if (options != null) { finalOptions.setMaxResultsPerPage(options.getMaxResultsPerPage()) .setPrefix(options.getPrefix()) + .setStartFrom(options.getStartFrom()) .setDetails(options.getDetails()); + } /* If pageSize was not set in a .byPage(int) method, the page size from options will be preserved. @@ -1041,7 +1043,8 @@ public PagedIterable<BlobItem> listBlobs(ListBlobsOptions options, String contin Callable<ResponseBase<ContainersListBlobFlatSegmentHeaders, ListBlobsFlatSegmentResponse>> operation = () -> this.azureBlobStorage.getContainers() .listBlobFlatSegmentWithResponse(containerName, finalOptions.getPrefix(), nextMarker, - finalOptions.getMaxResultsPerPage(), include, null, null, Context.NONE); + finalOptions.getMaxResultsPerPage(), include, finalOptions.getStartFrom(), null, null, + Context.NONE); ResponseBase<ContainersListBlobFlatSegmentHeaders, ListBlobsFlatSegmentResponse> response = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); @@ -1159,7 +1162,8 @@ public PagedIterable<BlobItem> listBlobsByHierarchy(String delimiter, ListBlobsO if (options != null) { finalOptions.setMaxResultsPerPage(options.getMaxResultsPerPage()) .setPrefix(options.getPrefix()) - .setDetails(options.getDetails()); + .setDetails(options.getDetails()) + .setStartFrom(options.getStartFrom()); } /* If pageSize was not set in a .byPage(int) method, the page size from options will be preserved. @@ -1185,7 +1189,7 @@ private PagedResponse<BlobItem> listBlobsHierarchySegment(String marker, String Callable<ResponseBase<ContainersListBlobHierarchySegmentHeaders, ListBlobsHierarchySegmentResponse>> operation = () -> azureBlobStorage.getContainers() .listBlobHierarchySegmentWithResponse(containerName, delimiter, options.getPrefix(), marker, - options.getMaxResultsPerPage(), include, null, null, Context.NONE); + options.getMaxResultsPerPage(), include, options.getStartFrom(), null, null, Context.NONE); ResponseBase<ContainersListBlobHierarchySegmentHeaders, ListBlobsHierarchySegmentResponse> response = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceVersion.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceVersion.java index 5ffba2570e93..49b155578740 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceVersion.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceVersion.java @@ -147,7 +147,12 @@ public enum BlobServiceVersion implements ServiceVersion { /** * Service version {@code 2025-11-05}. */ - V2025_11_05("2025-11-05"); + V2025_11_05("2025-11-05"), + + /** + * Service version {@code 2026-02-06}. + */ + V2026_02_06("2026-02-06"); private final String version; @@ -169,6 +174,6 @@ public String getVersion() { * @return the latest {@link BlobServiceVersion} */ public static BlobServiceVersion getLatest() { - return V2025_11_05; + return V2026_02_06; } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java index a34e03d27510..f40fcb2d962a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java @@ -1468,7 +1468,11 @@ Mono<ResponseBase<BlobsGetTagsHeaders, BlobTags>> getTags(@HostParam("url") Stri @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("x-ms-blob-if-modified-since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("x-ms-blob-if-unmodified-since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-blob-if-match") String ifMatch, + @HeaderParam("x-ms-blob-if-none-match") String ifNoneMatch, @HeaderParam("Accept") String accept, + Context context); @Get("/{containerName}/{blob}") @ExpectedResponses({ 200 }) @@ -1479,7 +1483,11 @@ Mono<Response<BlobTags>> getTagsNoCustomHeaders(@HostParam("url") String url, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("x-ms-blob-if-modified-since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("x-ms-blob-if-unmodified-since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-blob-if-match") String ifMatch, + @HeaderParam("x-ms-blob-if-none-match") String ifNoneMatch, @HeaderParam("Accept") String accept, + Context context); @Get("/{containerName}/{blob}") @ExpectedResponses({ 200 }) @@ -1490,7 +1498,11 @@ ResponseBase<BlobsGetTagsHeaders, BlobTags> getTagsSync(@HostParam("url") String @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("x-ms-blob-if-modified-since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("x-ms-blob-if-unmodified-since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-blob-if-match") String ifMatch, + @HeaderParam("x-ms-blob-if-none-match") String ifNoneMatch, @HeaderParam("Accept") String accept, + Context context); @Get("/{containerName}/{blob}") @ExpectedResponses({ 200 }) @@ -1501,7 +1513,11 @@ Response<BlobTags> getTagsNoCustomHeadersSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("x-ms-blob-if-modified-since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("x-ms-blob-if-unmodified-since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-blob-if-match") String ifMatch, + @HeaderParam("x-ms-blob-if-none-match") String ifNoneMatch, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") @ExpectedResponses({ 204 }) @@ -1513,7 +1529,11 @@ Mono<ResponseBase<BlobsSetTagsHeaders, Void>> setTags(@HostParam("url") String u @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-lease-id") String leaseId, @BodyParam("application/xml") BlobTags tags, + @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-if-modified-since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("x-ms-blob-if-unmodified-since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-blob-if-match") String ifMatch, + @HeaderParam("x-ms-blob-if-none-match") String ifNoneMatch, @BodyParam("application/xml") BlobTags tags, @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") @@ -1526,7 +1546,11 @@ Mono<Response<Void>> setTagsNoCustomHeaders(@HostParam("url") String url, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-lease-id") String leaseId, @BodyParam("application/xml") BlobTags tags, + @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-if-modified-since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("x-ms-blob-if-unmodified-since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-blob-if-match") String ifMatch, + @HeaderParam("x-ms-blob-if-none-match") String ifNoneMatch, @BodyParam("application/xml") BlobTags tags, @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") @@ -1539,7 +1563,11 @@ ResponseBase<BlobsSetTagsHeaders, Void> setTagsSync(@HostParam("url") String url @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-lease-id") String leaseId, @BodyParam("application/xml") BlobTags tags, + @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-if-modified-since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("x-ms-blob-if-unmodified-since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-blob-if-match") String ifMatch, + @HeaderParam("x-ms-blob-if-none-match") String ifNoneMatch, @BodyParam("application/xml") BlobTags tags, @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") @@ -1552,7 +1580,11 @@ Response<Void> setTagsNoCustomHeadersSync(@HostParam("url") String url, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-lease-id") String leaseId, @BodyParam("application/xml") BlobTags tags, + @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-if-modified-since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("x-ms-blob-if-unmodified-since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-blob-if-match") String ifMatch, + @HeaderParam("x-ms-blob-if-none-match") String ifNoneMatch, @BodyParam("application/xml") BlobTags tags, @HeaderParam("Accept") String accept, Context context); } @@ -10463,6 +10495,12 @@ public Response<InputStream> queryNoCustomHeadersWithResponse(String containerNa * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -10470,10 +10508,11 @@ public Response<InputStream> queryNoCustomHeadersWithResponse(String containerNa */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono<ResponseBase<BlobsGetTagsHeaders, BlobTags>> getTagsWithResponseAsync(String containerName, String blob, - Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId) { + Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch) { return FluxUtil .withContext(context -> getTagsWithResponseAsync(containerName, blob, timeout, requestId, snapshot, - versionId, ifTags, leaseId, context)) + versionId, ifTags, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, context)) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } @@ -10495,6 +10534,12 @@ public Mono<ResponseBase<BlobsGetTagsHeaders, BlobTags>> getTagsWithResponseAsyn * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. @@ -10504,12 +10549,18 @@ public Mono<ResponseBase<BlobsGetTagsHeaders, BlobTags>> getTagsWithResponseAsyn @ServiceMethod(returns = ReturnType.SINGLE) public Mono<ResponseBase<BlobsGetTagsHeaders, BlobTags>> getTagsWithResponseAsync(String containerName, String blob, Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Context context) { final String comp = "tags"; final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); return service .getTags(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), requestId, - snapshot, versionId, ifTags, leaseId, accept, context) + snapshot, versionId, ifTags, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, accept, context) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } @@ -10531,6 +10582,12 @@ public Mono<ResponseBase<BlobsGetTagsHeaders, BlobTags>> getTagsWithResponseAsyn * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -10538,10 +10595,12 @@ public Mono<ResponseBase<BlobsGetTagsHeaders, BlobTags>> getTagsWithResponseAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono<BlobTags> getTagsAsync(String containerName, String blob, Integer timeout, String requestId, - String snapshot, String versionId, String ifTags, String leaseId) { - return getTagsWithResponseAsync(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + String snapshot, String versionId, String ifTags, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch) { + return getTagsWithResponseAsync(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch) + .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -10562,6 +10621,12 @@ public Mono<BlobTags> getTagsAsync(String containerName, String blob, Integer ti * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. @@ -10570,9 +10635,11 @@ public Mono<BlobTags> getTagsAsync(String containerName, String blob, Integer ti */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono<BlobTags> getTagsAsync(String containerName, String blob, Integer timeout, String requestId, - String snapshot, String versionId, String ifTags, String leaseId, Context context) { + String snapshot, String versionId, String ifTags, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Context context) { return getTagsWithResponseAsync(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId, - context).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, context) + .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -10594,6 +10661,12 @@ public Mono<BlobTags> getTagsAsync(String containerName, String blob, Integer ti * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -10601,10 +10674,12 @@ public Mono<BlobTags> getTagsAsync(String containerName, String blob, Integer ti */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<BlobTags>> getTagsNoCustomHeadersWithResponseAsync(String containerName, String blob, - Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId) { + Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch) { return FluxUtil - .withContext(context -> getTagsNoCustomHeadersWithResponseAsync(containerName, blob, timeout, requestId, - snapshot, versionId, ifTags, leaseId, context)) + .withContext( + context -> getTagsNoCustomHeadersWithResponseAsync(containerName, blob, timeout, requestId, snapshot, + versionId, ifTags, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, context)) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } @@ -10626,6 +10701,12 @@ public Mono<Response<BlobTags>> getTagsNoCustomHeadersWithResponseAsync(String c * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. @@ -10635,12 +10716,18 @@ public Mono<Response<BlobTags>> getTagsNoCustomHeadersWithResponseAsync(String c @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<BlobTags>> getTagsNoCustomHeadersWithResponseAsync(String containerName, String blob, Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Context context) { final String comp = "tags"; final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); return service .getTagsNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), - requestId, snapshot, versionId, ifTags, leaseId, accept, context) + requestId, snapshot, versionId, ifTags, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, accept, context) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } @@ -10662,6 +10749,12 @@ public Mono<Response<BlobTags>> getTagsNoCustomHeadersWithResponseAsync(String c * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. @@ -10671,12 +10764,18 @@ public Mono<Response<BlobTags>> getTagsNoCustomHeadersWithResponseAsync(String c @ServiceMethod(returns = ReturnType.SINGLE) public ResponseBase<BlobsGetTagsHeaders, BlobTags> getTagsWithResponse(String containerName, String blob, Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Context context) { try { final String comp = "tags"; final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); return service.getTagsSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, accept, context); + this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, accept, context); } catch (BlobStorageExceptionInternal internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } @@ -10700,6 +10799,12 @@ public ResponseBase<BlobsGetTagsHeaders, BlobTags> getTagsWithResponse(String co * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -10707,10 +10812,11 @@ public ResponseBase<BlobsGetTagsHeaders, BlobTags> getTagsWithResponse(String co */ @ServiceMethod(returns = ReturnType.SINGLE) public BlobTags getTags(String containerName, String blob, Integer timeout, String requestId, String snapshot, - String versionId, String ifTags, String leaseId) { + String versionId, String ifTags, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch) { try { return getTagsWithResponse(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId, - Context.NONE).getValue(); + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, Context.NONE).getValue(); } catch (BlobStorageExceptionInternal internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } @@ -10734,6 +10840,12 @@ public BlobTags getTags(String containerName, String blob, Integer timeout, Stri * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. @@ -10742,12 +10854,19 @@ public BlobTags getTags(String containerName, String blob, Integer timeout, Stri */ @ServiceMethod(returns = ReturnType.SINGLE) public Response<BlobTags> getTagsNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - String requestId, String snapshot, String versionId, String ifTags, String leaseId, Context context) { + String requestId, String snapshot, String versionId, String ifTags, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + Context context) { try { final String comp = "tags"; final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); return service.getTagsNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, accept, context); + this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, accept, context); } catch (BlobStorageExceptionInternal internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } @@ -10769,6 +10888,12 @@ public Response<BlobTags> getTagsNoCustomHeadersWithResponse(String containerNam * analytics logs when storage analytics logging is enabled. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param tags Blob tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. @@ -10778,10 +10903,12 @@ public Response<BlobTags> getTagsNoCustomHeadersWithResponse(String containerNam @ServiceMethod(returns = ReturnType.SINGLE) public Mono<ResponseBase<BlobsSetTagsHeaders, Void>> setTagsWithResponseAsync(String containerName, String blob, Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, - String requestId, String ifTags, String leaseId, BlobTags tags) { + String requestId, String ifTags, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, BlobTags tags) { return FluxUtil .withContext(context -> setTagsWithResponseAsync(containerName, blob, timeout, versionId, - transactionalContentMD5, transactionalContentCrc64, requestId, ifTags, leaseId, tags, context)) + transactionalContentMD5, transactionalContentCrc64, requestId, ifTags, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, tags, context)) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } @@ -10801,6 +10928,12 @@ public Mono<ResponseBase<BlobsSetTagsHeaders, Void>> setTagsWithResponseAsync(St * analytics logs when storage analytics logging is enabled. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param tags Blob tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -10811,15 +10944,20 @@ public Mono<ResponseBase<BlobsSetTagsHeaders, Void>> setTagsWithResponseAsync(St @ServiceMethod(returns = ReturnType.SINGLE) public Mono<ResponseBase<BlobsSetTagsHeaders, Void>> setTagsWithResponseAsync(String containerName, String blob, Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, - String requestId, String ifTags, String leaseId, BlobTags tags, Context context) { + String requestId, String ifTags, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, BlobTags tags, Context context) { final String comp = "tags"; final String accept = "application/xml"; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); return service .setTags(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), timeout, versionId, - transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags, leaseId, tags, - accept, context) + transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, tags, accept, context) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } @@ -10839,6 +10977,12 @@ public Mono<ResponseBase<BlobsSetTagsHeaders, Void>> setTagsWithResponseAsync(St * analytics logs when storage analytics logging is enabled. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param tags Blob tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. @@ -10848,10 +10992,11 @@ public Mono<ResponseBase<BlobsSetTagsHeaders, Void>> setTagsWithResponseAsync(St @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Void> setTagsAsync(String containerName, String blob, Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags, - String leaseId, BlobTags tags) { + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, BlobTags tags) { return setTagsWithResponseAsync(containerName, blob, timeout, versionId, transactionalContentMD5, - transactionalContentCrc64, requestId, ifTags, leaseId, tags) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) + transactionalContentCrc64, requestId, ifTags, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, tags).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) .flatMap(ignored -> Mono.empty()); } @@ -10871,6 +11016,12 @@ public Mono<Void> setTagsAsync(String containerName, String blob, Integer timeou * analytics logs when storage analytics logging is enabled. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param tags Blob tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -10881,9 +11032,11 @@ public Mono<Void> setTagsAsync(String containerName, String blob, Integer timeou @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Void> setTagsAsync(String containerName, String blob, Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags, - String leaseId, BlobTags tags, Context context) { + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, BlobTags tags, Context context) { return setTagsWithResponseAsync(containerName, blob, timeout, versionId, transactionalContentMD5, - transactionalContentCrc64, requestId, ifTags, leaseId, tags, context) + transactionalContentCrc64, requestId, ifTags, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, tags, context) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) .flatMap(ignored -> Mono.empty()); } @@ -10904,6 +11057,12 @@ public Mono<Void> setTagsAsync(String containerName, String blob, Integer timeou * analytics logs when storage analytics logging is enabled. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param tags Blob tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. @@ -10913,10 +11072,12 @@ public Mono<Void> setTagsAsync(String containerName, String blob, Integer timeou @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<Void>> setTagsNoCustomHeadersWithResponseAsync(String containerName, String blob, Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, - String requestId, String ifTags, String leaseId, BlobTags tags) { + String requestId, String ifTags, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, BlobTags tags) { return FluxUtil .withContext(context -> setTagsNoCustomHeadersWithResponseAsync(containerName, blob, timeout, versionId, - transactionalContentMD5, transactionalContentCrc64, requestId, ifTags, leaseId, tags, context)) + transactionalContentMD5, transactionalContentCrc64, requestId, ifTags, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, tags, context)) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } @@ -10936,6 +11097,12 @@ public Mono<Response<Void>> setTagsNoCustomHeadersWithResponseAsync(String conta * analytics logs when storage analytics logging is enabled. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param tags Blob tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -10946,15 +11113,19 @@ public Mono<Response<Void>> setTagsNoCustomHeadersWithResponseAsync(String conta @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<Void>> setTagsNoCustomHeadersWithResponseAsync(String containerName, String blob, Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, - String requestId, String ifTags, String leaseId, BlobTags tags, Context context) { + String requestId, String ifTags, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, BlobTags tags, Context context) { final String comp = "tags"; final String accept = "application/xml"; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service - .setTagsNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), timeout, - versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags, - leaseId, tags, accept, context) + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.setTagsNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), + timeout, versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags, + leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, tags, accept, context) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } @@ -10974,6 +11145,12 @@ public Mono<Response<Void>> setTagsNoCustomHeadersWithResponseAsync(String conta * analytics logs when storage analytics logging is enabled. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param tags Blob tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -10984,15 +11161,21 @@ public Mono<Response<Void>> setTagsNoCustomHeadersWithResponseAsync(String conta @ServiceMethod(returns = ReturnType.SINGLE) public ResponseBase<BlobsSetTagsHeaders, Void> setTagsWithResponse(String containerName, String blob, Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, - String requestId, String ifTags, String leaseId, BlobTags tags, Context context) { + String requestId, String ifTags, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, BlobTags tags, Context context) { try { final String comp = "tags"; final String accept = "application/xml"; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); return service.setTagsSync(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, - ifTags, leaseId, tags, accept, context); + ifTags, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, tags, + accept, context); } catch (BlobStorageExceptionInternal internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } @@ -11014,6 +11197,12 @@ public ResponseBase<BlobsSetTagsHeaders, Void> setTagsWithResponse(String contai * analytics logs when storage analytics logging is enabled. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param tags Blob tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. @@ -11022,9 +11211,10 @@ public ResponseBase<BlobsSetTagsHeaders, Void> setTagsWithResponse(String contai @ServiceMethod(returns = ReturnType.SINGLE) public void setTags(String containerName, String blob, Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags, - String leaseId, BlobTags tags) { + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, BlobTags tags) { setTagsWithResponse(containerName, blob, timeout, versionId, transactionalContentMD5, transactionalContentCrc64, - requestId, ifTags, leaseId, tags, Context.NONE); + requestId, ifTags, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, tags, Context.NONE); } /** @@ -11043,6 +11233,12 @@ public void setTags(String containerName, String blob, Integer timeout, String v * analytics logs when storage analytics logging is enabled. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param tags Blob tags. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -11053,15 +11249,21 @@ public void setTags(String containerName, String blob, Integer timeout, String v @ServiceMethod(returns = ReturnType.SINGLE) public Response<Void> setTagsNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, - String ifTags, String leaseId, BlobTags tags, Context context) { + String ifTags, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, BlobTags tags, Context context) { try { final String comp = "tags"; final String accept = "application/xml"; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); return service.setTagsNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted, - transactionalContentCrc64Converted, requestId, ifTags, leaseId, tags, accept, context); + transactionalContentCrc64Converted, requestId, ifTags, leaseId, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, tags, accept, context); } catch (BlobStorageExceptionInternal internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java index fe6635976625..7fd2af96e4df 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java @@ -814,9 +814,10 @@ Mono<ResponseBase<ContainersListBlobFlatSegmentHeaders, ListBlobsFlatSegmentResp @HostParam("url") String url, @PathParam("containerName") String containerName, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("include") String include, @QueryParam("startFrom") String startFrom, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Get("/{containerName}") @ExpectedResponses({ 200 }) @@ -825,9 +826,9 @@ Mono<Response<ListBlobsFlatSegmentResponse>> listBlobFlatSegmentNoCustomHeaders( @PathParam("containerName") String containerName, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, - @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("startFrom") String startFrom, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}") @ExpectedResponses({ 200 }) @@ -836,9 +837,10 @@ ResponseBase<ContainersListBlobFlatSegmentHeaders, ListBlobsFlatSegmentResponse> @HostParam("url") String url, @PathParam("containerName") String containerName, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("include") String include, @QueryParam("startFrom") String startFrom, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Get("/{containerName}") @ExpectedResponses({ 200 }) @@ -847,9 +849,9 @@ Response<ListBlobsFlatSegmentResponse> listBlobFlatSegmentNoCustomHeadersSync(@H @PathParam("containerName") String containerName, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, - @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("startFrom") String startFrom, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}") @ExpectedResponses({ 200 }) @@ -859,9 +861,10 @@ Response<ListBlobsFlatSegmentResponse> listBlobFlatSegmentNoCustomHeadersSync(@H @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("include") String include, @QueryParam("startFrom") String startFrom, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Get("/{containerName}") @ExpectedResponses({ 200 }) @@ -871,9 +874,9 @@ Mono<Response<ListBlobsHierarchySegmentResponse>> listBlobHierarchySegmentNoCust @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, - @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("startFrom") String startFrom, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}") @ExpectedResponses({ 200 }) @@ -883,9 +886,10 @@ Mono<Response<ListBlobsHierarchySegmentResponse>> listBlobHierarchySegmentNoCust @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("include") String include, @QueryParam("startFrom") String startFrom, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Get("/{containerName}") @ExpectedResponses({ 200 }) @@ -895,9 +899,9 @@ Response<ListBlobsHierarchySegmentResponse> listBlobHierarchySegmentNoCustomHead @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, - @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("startFrom") String startFrom, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}") @ExpectedResponses({ 200 }) @@ -5700,6 +5704,8 @@ public Response<Void> changeLeaseNoCustomHeadersWithResponse(String containerNam * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -5713,10 +5719,10 @@ public Response<Void> changeLeaseNoCustomHeadersWithResponse(String containerNam @ServiceMethod(returns = ReturnType.SINGLE) public Mono<ResponseBase<ContainersListBlobFlatSegmentHeaders, ListBlobsFlatSegmentResponse>> listBlobFlatSegmentWithResponseAsync(String containerName, String prefix, String marker, Integer maxresults, - List<ListBlobsIncludeItem> include, Integer timeout, String requestId) { + List<ListBlobsIncludeItem> include, String startFrom, Integer timeout, String requestId) { return FluxUtil .withContext(context -> listBlobFlatSegmentWithResponseAsync(containerName, prefix, marker, maxresults, - include, timeout, requestId, context)) + include, startFrom, timeout, requestId, context)) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } @@ -5736,6 +5742,8 @@ public Response<Void> changeLeaseNoCustomHeadersWithResponse(String containerNam * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -5750,7 +5758,7 @@ public Response<Void> changeLeaseNoCustomHeadersWithResponse(String containerNam @ServiceMethod(returns = ReturnType.SINGLE) public Mono<ResponseBase<ContainersListBlobFlatSegmentHeaders, ListBlobsFlatSegmentResponse>> listBlobFlatSegmentWithResponseAsync(String containerName, String prefix, String marker, Integer maxresults, - List<ListBlobsIncludeItem> include, Integer timeout, String requestId, Context context) { + List<ListBlobsIncludeItem> include, String startFrom, Integer timeout, String requestId, Context context) { final String restype = "container"; final String comp = "list"; final String accept = "application/xml"; @@ -5761,7 +5769,7 @@ public Response<Void> changeLeaseNoCustomHeadersWithResponse(String containerNam .collect(Collectors.joining(",")); return service .listBlobFlatSegment(this.client.getUrl(), containerName, restype, comp, prefix, marker, maxresults, - includeConverted, timeout, this.client.getVersion(), requestId, accept, context) + includeConverted, startFrom, timeout, this.client.getVersion(), requestId, accept, context) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } @@ -5781,6 +5789,8 @@ public Response<Void> changeLeaseNoCustomHeadersWithResponse(String containerNam * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -5793,9 +5803,10 @@ public Response<Void> changeLeaseNoCustomHeadersWithResponse(String containerNam */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono<ListBlobsFlatSegmentResponse> listBlobFlatSegmentAsync(String containerName, String prefix, - String marker, Integer maxresults, List<ListBlobsIncludeItem> include, Integer timeout, String requestId) { - return listBlobFlatSegmentWithResponseAsync(containerName, prefix, marker, maxresults, include, timeout, - requestId).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) + String marker, Integer maxresults, List<ListBlobsIncludeItem> include, String startFrom, Integer timeout, + String requestId) { + return listBlobFlatSegmentWithResponseAsync(containerName, prefix, marker, maxresults, include, startFrom, + timeout, requestId).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -5815,6 +5826,8 @@ public Mono<ListBlobsFlatSegmentResponse> listBlobFlatSegmentAsync(String contai * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -5828,10 +5841,11 @@ public Mono<ListBlobsFlatSegmentResponse> listBlobFlatSegmentAsync(String contai */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono<ListBlobsFlatSegmentResponse> listBlobFlatSegmentAsync(String containerName, String prefix, - String marker, Integer maxresults, List<ListBlobsIncludeItem> include, Integer timeout, String requestId, - Context context) { - return listBlobFlatSegmentWithResponseAsync(containerName, prefix, marker, maxresults, include, timeout, - requestId, context).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) + String marker, Integer maxresults, List<ListBlobsIncludeItem> include, String startFrom, Integer timeout, + String requestId, Context context) { + return listBlobFlatSegmentWithResponseAsync(containerName, prefix, marker, maxresults, include, startFrom, + timeout, requestId, context) + .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -5851,6 +5865,8 @@ public Mono<ListBlobsFlatSegmentResponse> listBlobFlatSegmentAsync(String contai * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -5864,10 +5880,10 @@ public Mono<ListBlobsFlatSegmentResponse> listBlobFlatSegmentAsync(String contai @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<ListBlobsFlatSegmentResponse>> listBlobFlatSegmentNoCustomHeadersWithResponseAsync( String containerName, String prefix, String marker, Integer maxresults, List<ListBlobsIncludeItem> include, - Integer timeout, String requestId) { + String startFrom, Integer timeout, String requestId) { return FluxUtil .withContext(context -> listBlobFlatSegmentNoCustomHeadersWithResponseAsync(containerName, prefix, marker, - maxresults, include, timeout, requestId, context)) + maxresults, include, startFrom, timeout, requestId, context)) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } @@ -5887,6 +5903,8 @@ public Mono<Response<ListBlobsFlatSegmentResponse>> listBlobFlatSegmentNoCustomH * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -5901,7 +5919,7 @@ public Mono<Response<ListBlobsFlatSegmentResponse>> listBlobFlatSegmentNoCustomH @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<ListBlobsFlatSegmentResponse>> listBlobFlatSegmentNoCustomHeadersWithResponseAsync( String containerName, String prefix, String marker, Integer maxresults, List<ListBlobsIncludeItem> include, - Integer timeout, String requestId, Context context) { + String startFrom, Integer timeout, String requestId, Context context) { final String restype = "container"; final String comp = "list"; final String accept = "application/xml"; @@ -5912,7 +5930,7 @@ public Mono<Response<ListBlobsFlatSegmentResponse>> listBlobFlatSegmentNoCustomH .collect(Collectors.joining(",")); return service .listBlobFlatSegmentNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, prefix, marker, - maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, context) + maxresults, includeConverted, startFrom, timeout, this.client.getVersion(), requestId, accept, context) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } @@ -5932,6 +5950,8 @@ public Mono<Response<ListBlobsFlatSegmentResponse>> listBlobFlatSegmentNoCustomH * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -5946,7 +5966,7 @@ public Mono<Response<ListBlobsFlatSegmentResponse>> listBlobFlatSegmentNoCustomH @ServiceMethod(returns = ReturnType.SINGLE) public ResponseBase<ContainersListBlobFlatSegmentHeaders, ListBlobsFlatSegmentResponse> listBlobFlatSegmentWithResponse(String containerName, String prefix, String marker, Integer maxresults, - List<ListBlobsIncludeItem> include, Integer timeout, String requestId, Context context) { + List<ListBlobsIncludeItem> include, String startFrom, Integer timeout, String requestId, Context context) { try { final String restype = "container"; final String comp = "list"; @@ -5957,7 +5977,7 @@ public Mono<Response<ListBlobsFlatSegmentResponse>> listBlobFlatSegmentNoCustomH .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); return service.listBlobFlatSegmentSync(this.client.getUrl(), containerName, restype, comp, prefix, marker, - maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, context); + maxresults, includeConverted, startFrom, timeout, this.client.getVersion(), requestId, accept, context); } catch (BlobStorageExceptionInternal internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } @@ -5979,6 +5999,8 @@ public Mono<Response<ListBlobsFlatSegmentResponse>> listBlobFlatSegmentNoCustomH * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -5991,10 +6013,10 @@ public Mono<Response<ListBlobsFlatSegmentResponse>> listBlobFlatSegmentNoCustomH */ @ServiceMethod(returns = ReturnType.SINGLE) public ListBlobsFlatSegmentResponse listBlobFlatSegment(String containerName, String prefix, String marker, - Integer maxresults, List<ListBlobsIncludeItem> include, Integer timeout, String requestId) { + Integer maxresults, List<ListBlobsIncludeItem> include, String startFrom, Integer timeout, String requestId) { try { - return listBlobFlatSegmentWithResponse(containerName, prefix, marker, maxresults, include, timeout, - requestId, Context.NONE).getValue(); + return listBlobFlatSegmentWithResponse(containerName, prefix, marker, maxresults, include, startFrom, + timeout, requestId, Context.NONE).getValue(); } catch (BlobStorageExceptionInternal internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } @@ -6016,6 +6038,8 @@ public ListBlobsFlatSegmentResponse listBlobFlatSegment(String containerName, St * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -6029,8 +6053,8 @@ public ListBlobsFlatSegmentResponse listBlobFlatSegment(String containerName, St */ @ServiceMethod(returns = ReturnType.SINGLE) public Response<ListBlobsFlatSegmentResponse> listBlobFlatSegmentNoCustomHeadersWithResponse(String containerName, - String prefix, String marker, Integer maxresults, List<ListBlobsIncludeItem> include, Integer timeout, - String requestId, Context context) { + String prefix, String marker, Integer maxresults, List<ListBlobsIncludeItem> include, String startFrom, + Integer timeout, String requestId, Context context) { try { final String restype = "container"; final String comp = "list"; @@ -6041,8 +6065,8 @@ public Response<ListBlobsFlatSegmentResponse> listBlobFlatSegmentNoCustomHeaders .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); return service.listBlobFlatSegmentNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, - prefix, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, - context); + prefix, marker, maxresults, includeConverted, startFrom, timeout, this.client.getVersion(), requestId, + accept, context); } catch (BlobStorageExceptionInternal internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } @@ -6067,6 +6091,8 @@ public Response<ListBlobsFlatSegmentResponse> listBlobFlatSegmentNoCustomHeaders * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -6080,10 +6106,11 @@ public Response<ListBlobsFlatSegmentResponse> listBlobFlatSegmentNoCustomHeaders @ServiceMethod(returns = ReturnType.SINGLE) public Mono<ResponseBase<ContainersListBlobHierarchySegmentHeaders, ListBlobsHierarchySegmentResponse>> listBlobHierarchySegmentWithResponseAsync(String containerName, String delimiter, String prefix, String marker, - Integer maxresults, List<ListBlobsIncludeItem> include, Integer timeout, String requestId) { + Integer maxresults, List<ListBlobsIncludeItem> include, String startFrom, Integer timeout, + String requestId) { return FluxUtil .withContext(context -> listBlobHierarchySegmentWithResponseAsync(containerName, delimiter, prefix, marker, - maxresults, include, timeout, requestId, context)) + maxresults, include, startFrom, timeout, requestId, context)) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } @@ -6106,6 +6133,8 @@ public Response<ListBlobsFlatSegmentResponse> listBlobFlatSegmentNoCustomHeaders * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -6120,7 +6149,7 @@ public Response<ListBlobsFlatSegmentResponse> listBlobFlatSegmentNoCustomHeaders @ServiceMethod(returns = ReturnType.SINGLE) public Mono<ResponseBase<ContainersListBlobHierarchySegmentHeaders, ListBlobsHierarchySegmentResponse>> listBlobHierarchySegmentWithResponseAsync(String containerName, String delimiter, String prefix, String marker, - Integer maxresults, List<ListBlobsIncludeItem> include, Integer timeout, String requestId, + Integer maxresults, List<ListBlobsIncludeItem> include, String startFrom, Integer timeout, String requestId, Context context) { final String restype = "container"; final String comp = "list"; @@ -6132,7 +6161,7 @@ public Response<ListBlobsFlatSegmentResponse> listBlobFlatSegmentNoCustomHeaders .collect(Collectors.joining(",")); return service .listBlobHierarchySegment(this.client.getUrl(), containerName, restype, comp, prefix, delimiter, marker, - maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, context) + maxresults, includeConverted, startFrom, timeout, this.client.getVersion(), requestId, accept, context) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } @@ -6155,6 +6184,8 @@ public Response<ListBlobsFlatSegmentResponse> listBlobFlatSegmentNoCustomHeaders * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -6167,10 +6198,11 @@ public Response<ListBlobsFlatSegmentResponse> listBlobFlatSegmentNoCustomHeaders */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono<ListBlobsHierarchySegmentResponse> listBlobHierarchySegmentAsync(String containerName, String delimiter, - String prefix, String marker, Integer maxresults, List<ListBlobsIncludeItem> include, Integer timeout, - String requestId) { + String prefix, String marker, Integer maxresults, List<ListBlobsIncludeItem> include, String startFrom, + Integer timeout, String requestId) { return listBlobHierarchySegmentWithResponseAsync(containerName, delimiter, prefix, marker, maxresults, include, - timeout, requestId).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) + startFrom, timeout, requestId) + .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -6193,6 +6225,8 @@ public Mono<ListBlobsHierarchySegmentResponse> listBlobHierarchySegmentAsync(Str * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -6206,10 +6240,10 @@ public Mono<ListBlobsHierarchySegmentResponse> listBlobHierarchySegmentAsync(Str */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono<ListBlobsHierarchySegmentResponse> listBlobHierarchySegmentAsync(String containerName, String delimiter, - String prefix, String marker, Integer maxresults, List<ListBlobsIncludeItem> include, Integer timeout, - String requestId, Context context) { + String prefix, String marker, Integer maxresults, List<ListBlobsIncludeItem> include, String startFrom, + Integer timeout, String requestId, Context context) { return listBlobHierarchySegmentWithResponseAsync(containerName, delimiter, prefix, marker, maxresults, include, - timeout, requestId, context) + startFrom, timeout, requestId, context) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -6233,6 +6267,8 @@ public Mono<ListBlobsHierarchySegmentResponse> listBlobHierarchySegmentAsync(Str * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -6246,10 +6282,10 @@ public Mono<ListBlobsHierarchySegmentResponse> listBlobHierarchySegmentAsync(Str @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<ListBlobsHierarchySegmentResponse>> listBlobHierarchySegmentNoCustomHeadersWithResponseAsync( String containerName, String delimiter, String prefix, String marker, Integer maxresults, - List<ListBlobsIncludeItem> include, Integer timeout, String requestId) { + List<ListBlobsIncludeItem> include, String startFrom, Integer timeout, String requestId) { return FluxUtil .withContext(context -> listBlobHierarchySegmentNoCustomHeadersWithResponseAsync(containerName, delimiter, - prefix, marker, maxresults, include, timeout, requestId, context)) + prefix, marker, maxresults, include, startFrom, timeout, requestId, context)) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } @@ -6272,6 +6308,8 @@ public Mono<Response<ListBlobsHierarchySegmentResponse>> listBlobHierarchySegmen * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -6286,7 +6324,7 @@ public Mono<Response<ListBlobsHierarchySegmentResponse>> listBlobHierarchySegmen @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<ListBlobsHierarchySegmentResponse>> listBlobHierarchySegmentNoCustomHeadersWithResponseAsync( String containerName, String delimiter, String prefix, String marker, Integer maxresults, - List<ListBlobsIncludeItem> include, Integer timeout, String requestId, Context context) { + List<ListBlobsIncludeItem> include, String startFrom, Integer timeout, String requestId, Context context) { final String restype = "container"; final String comp = "list"; final String accept = "application/xml"; @@ -6297,8 +6335,8 @@ public Mono<Response<ListBlobsHierarchySegmentResponse>> listBlobHierarchySegmen .collect(Collectors.joining(",")); return service .listBlobHierarchySegmentNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, prefix, - delimiter, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, - context) + delimiter, marker, maxresults, includeConverted, startFrom, timeout, this.client.getVersion(), + requestId, accept, context) .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } @@ -6321,6 +6359,8 @@ public Mono<Response<ListBlobsHierarchySegmentResponse>> listBlobHierarchySegmen * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -6335,7 +6375,7 @@ public Mono<Response<ListBlobsHierarchySegmentResponse>> listBlobHierarchySegmen @ServiceMethod(returns = ReturnType.SINGLE) public ResponseBase<ContainersListBlobHierarchySegmentHeaders, ListBlobsHierarchySegmentResponse> listBlobHierarchySegmentWithResponse(String containerName, String delimiter, String prefix, String marker, - Integer maxresults, List<ListBlobsIncludeItem> include, Integer timeout, String requestId, + Integer maxresults, List<ListBlobsIncludeItem> include, String startFrom, Integer timeout, String requestId, Context context) { try { final String restype = "container"; @@ -6347,8 +6387,8 @@ public Mono<Response<ListBlobsHierarchySegmentResponse>> listBlobHierarchySegmen .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); return service.listBlobHierarchySegmentSync(this.client.getUrl(), containerName, restype, comp, prefix, - delimiter, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, - context); + delimiter, marker, maxresults, includeConverted, startFrom, timeout, this.client.getVersion(), + requestId, accept, context); } catch (BlobStorageExceptionInternal internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } @@ -6373,6 +6413,8 @@ public Mono<Response<ListBlobsHierarchySegmentResponse>> listBlobHierarchySegmen * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -6385,11 +6427,11 @@ public Mono<Response<ListBlobsHierarchySegmentResponse>> listBlobHierarchySegmen */ @ServiceMethod(returns = ReturnType.SINGLE) public ListBlobsHierarchySegmentResponse listBlobHierarchySegment(String containerName, String delimiter, - String prefix, String marker, Integer maxresults, List<ListBlobsIncludeItem> include, Integer timeout, - String requestId) { + String prefix, String marker, Integer maxresults, List<ListBlobsIncludeItem> include, String startFrom, + Integer timeout, String requestId) { try { return listBlobHierarchySegmentWithResponse(containerName, delimiter, prefix, marker, maxresults, include, - timeout, requestId, Context.NONE).getValue(); + startFrom, timeout, requestId, Context.NONE).getValue(); } catch (BlobStorageExceptionInternal internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } @@ -6414,6 +6456,8 @@ public ListBlobsHierarchySegmentResponse listBlobHierarchySegment(String contain * the remainder of the results. For this reason, it is possible that the service will return fewer results than * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; For recursive list, multiple entity levels are supported. (Inclusive). * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -6428,7 +6472,7 @@ public ListBlobsHierarchySegmentResponse listBlobHierarchySegment(String contain @ServiceMethod(returns = ReturnType.SINGLE) public Response<ListBlobsHierarchySegmentResponse> listBlobHierarchySegmentNoCustomHeadersWithResponse( String containerName, String delimiter, String prefix, String marker, Integer maxresults, - List<ListBlobsIncludeItem> include, Integer timeout, String requestId, Context context) { + List<ListBlobsIncludeItem> include, String startFrom, Integer timeout, String requestId, Context context) { try { final String restype = "container"; final String comp = "list"; @@ -6439,8 +6483,8 @@ public Response<ListBlobsHierarchySegmentResponse> listBlobHierarchySegmentNoCus .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); return service.listBlobHierarchySegmentNoCustomHeadersSync(this.client.getUrl(), containerName, restype, - comp, prefix, delimiter, marker, maxresults, includeConverted, timeout, this.client.getVersion(), - requestId, accept, context); + comp, prefix, delimiter, marker, maxresults, includeConverted, startFrom, timeout, + this.client.getVersion(), requestId, accept, context); } catch (BlobStorageExceptionInternal internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobSasImplUtil.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobSasImplUtil.java index 12caac54befa..76803a1ed4b6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobSasImplUtil.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobSasImplUtil.java @@ -95,6 +95,8 @@ public class BlobSasImplUtil { private String encryptionScope; + private String delegatedUserObjectId; + /** * Creates a new {@link BlobSasImplUtil} with the specified parameters * @@ -140,6 +142,7 @@ public BlobSasImplUtil(BlobServiceSasSignatureValues sasValues, String container this.authorizedAadObjectId = sasValues.getPreauthorizedAgentObjectId(); this.correlationId = sasValues.getCorrelationId(); this.encryptionScope = encryptionScope; + this.delegatedUserObjectId = sasValues.getDelegatedUserObjectId(); } /** @@ -262,6 +265,8 @@ private String encode(UserDelegationKey userDelegationKey, String signature) { tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_PREAUTHORIZED_AGENT_OBJECT_ID, this.authorizedAadObjectId); tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_CORRELATION_ID, this.correlationId); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_DELEGATED_USER_OBJECT_ID, + this.delegatedUserObjectId); } tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_RESOURCE, this.resource); tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_PERMISSIONS, this.permissions); @@ -453,7 +458,7 @@ private String stringToSign(final UserDelegationKey key, String canonicalName) { this.authorizedAadObjectId == null ? "" : this.authorizedAadObjectId, "", /* suoid - empty since this applies to HNS only accounts. */ this.correlationId == null ? "" : this.correlationId, "", /* new schema 2025-07-05 */ - "", /* new schema 2025-07-05 */ + this.delegatedUserObjectId == null ? "" : this.delegatedUserObjectId, this.sasIpRange == null ? "" : this.sasIpRange.toString(), this.protocol == null ? "" : this.protocol.toString(), VERSION, resource, versionSegment == null ? "" : versionSegment, this.encryptionScope == null ? "" : this.encryptionScope, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java index d33edff1afa5..47f29c2ab2b3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsOptions.java @@ -17,6 +17,7 @@ public final class ListBlobsOptions { private BlobListDetails details; private String prefix; + private String startFrom; private Integer maxResultsPerPage; /** @@ -68,6 +69,29 @@ public ListBlobsOptions setPrefix(String prefix) { return this; } + /** + * Gets an optional parameter that specifies an absolute path within the container. + * This parameter is similar to the prefix filter: it allows listing blobs starting from the specified path, rather than from the beginning of the container. + * For non-recursive lists, only one entity level is supported. + * + * @return the marker indicating where to start listing blobs + */ + public String getStartFrom() { + return startFrom; + } + + /** + * Sets an optional parameter that specifies an absolute path within the container. This parameter is similar to the prefix filter: it allows listing blobs starting from the specified path, rather than from the beginning of the container. + * For non-recursive lists, only one entity level is supported. + * + * @param startFrom The marker indicating where to start listing blobs + * @return the updated ListBlobsOptions object + */ + public ListBlobsOptions setStartFrom(String startFrom) { + this.startFrom = startFrom; + return this; + } + /** * Specifies the maximum number of blobs to return, including all BlobPrefix elements. If the request does not * specify maxResultsPerPage or specifies a value greater than 5,000, the server will return up to 5,000 items. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobServiceSasSignatureValues.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobServiceSasSignatureValues.java index 113672d9522c..829bac396031 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobServiceSasSignatureValues.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobServiceSasSignatureValues.java @@ -82,6 +82,7 @@ public final class BlobServiceSasSignatureValues { private String preauthorizedAgentObjectId; /* saoid */ private String correlationId; private String encryptionScope; + private String delegatedUserObjectId; /** * Creates an object with empty values for all fields. @@ -575,6 +576,30 @@ public BlobServiceSasSignatureValues setCorrelationId(String correlationId) { return this; } + /** + * Optional. Beginning in version 2025-07-05, this value specifies the Entra ID of the user that is authorized to + * use the resulting SAS URL. The resulting SAS URL must be used in conjunction with an Entra ID token that has been + * issued to the user specified in this value. + * + * @return The Entra ID of the user that is authorized to use the resulting SAS URL. + */ + public String getDelegatedUserObjectId() { + return delegatedUserObjectId; + } + + /** + * Optional. Beginning in version 2025-07-05, this value specifies the Entra ID of the user that is authorized to + * use the resulting SAS URL. The resulting SAS URL must be used in conjunction with an Entra ID token that has been + * issued to the user specified in this value. + * + * @param delegatedUserObjectId The Entra ID of the user that is authorized to use the resulting SAS URL. + * @return the updated BlobServiceSasSignatureValues object + */ + public BlobServiceSasSignatureValues setDelegatedUserObjectId(String delegatedUserObjectId) { + this.delegatedUserObjectId = delegatedUserObjectId; + return this; + } + /** * Uses an account's shared key credential to sign these signature values to produce the proper SAS query * parameters. @@ -754,6 +779,7 @@ private String stringToSign(final UserDelegationKey key, String canonicalName) { key.getSignedExpiry() == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(key.getSignedExpiry()), key.getSignedService() == null ? "" : key.getSignedService(), key.getSignedVersion() == null ? "" : key.getSignedVersion(), + this.delegatedUserObjectId == null ? "" : this.delegatedUserObjectId, this.sasIpRange == null ? "" : this.sasIpRange.toString(), this.protocol == null ? "" : this.protocol.toString(), VERSION_DEPRECATED_USER_DELEGATION_SAS_STRING_TO_SIGN, /* Pin down to version so old string to sign works. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index bb2df93aabdd..add82343acb6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -1999,7 +1999,9 @@ Mono<Response<Map<String, String>>> getTagsWithResponse(BlobGetTagsOptions optio = (options.getRequestConditions() == null) ? new BlobRequestConditions() : options.getRequestConditions(); return this.azureBlobStorage.getBlobs() .getTagsWithResponseAsync(containerName, blobName, null, null, snapshot, versionId, - requestConditions.getTagsConditions(), requestConditions.getLeaseId(), context) + requestConditions.getTagsConditions(), requestConditions.getLeaseId(), + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), context) .map(response -> { Map<String, String> tags = new HashMap<>(); for (BlobTag tag : response.getValue().getBlobTagSet()) { @@ -2078,7 +2080,9 @@ Mono<Response<Void>> setTagsWithResponse(BlobSetTagsOptions options, Context con BlobTags t = new BlobTags().setBlobTagSet(tagList); return this.azureBlobStorage.getBlobs() .setTagsNoCustomHeadersWithResponseAsync(containerName, blobName, null, versionId, null, null, null, - requestConditions.getTagsConditions(), requestConditions.getLeaseId(), t, context); + requestConditions.getTagsConditions(), requestConditions.getLeaseId(), + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), t, context); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index e76e752f0f86..49cc5b30d728 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -1954,7 +1954,9 @@ public Response<Map<String, String>> getTagsWithResponse(BlobGetTagsOptions opti Callable<ResponseBase<BlobsGetTagsHeaders, BlobTags>> operation = () -> this.azureBlobStorage.getBlobs() .getTagsWithResponse(containerName, blobName, null, null, snapshot, versionId, - requestConditions.getTagsConditions(), requestConditions.getLeaseId(), finalContext); + requestConditions.getTagsConditions(), requestConditions.getLeaseId(), + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), finalContext); ResponseBase<BlobsGetTagsHeaders, BlobTags> response = sendRequest(operation, timeout, BlobStorageException.class); @@ -2027,7 +2029,9 @@ public Response<Void> setTagsWithResponse(BlobSetTagsOptions options, Duration t BlobTags t = new BlobTags().setBlobTagSet(tagList); Callable<Response<Void>> operation = () -> this.azureBlobStorage.getBlobs() .setTagsNoCustomHeadersWithResponse(containerName, blobName, null, versionId, null, null, null, - requestConditions.getTagsConditions(), requestConditions.getLeaseId(), t, finalContext); + requestConditions.getTagsConditions(), requestConditions.getLeaseId(), + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), t, finalContext); return sendRequest(operation, timeout, BlobStorageException.class); } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java index ef01e27eef7c..c107c9d572e0 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java @@ -328,33 +328,31 @@ public void uploadTimeout() { @LiveOnly @Test public void uploadFailWithSmallTimeoutsForServiceClient() { - // setting very small timeout values for the service client - liveTestScenarioWithRetry(() -> { - HttpClientOptions clientOptions = new HttpClientOptions().setApplicationId("client-options-id") - .setResponseTimeout(Duration.ofNanos(1)) - .setReadTimeout(Duration.ofNanos(1)) - .setWriteTimeout(Duration.ofNanos(1)) - .setConnectTimeout(Duration.ofNanos(1)); - - BlobServiceClientBuilder clientBuilder - = new BlobServiceClientBuilder().endpoint(ENVIRONMENT.getPrimaryAccount().getBlobEndpoint()) - .credential(ENVIRONMENT.getPrimaryAccount().getCredential()) - .retryOptions(new RequestRetryOptions(null, 1, (Integer) null, null, null, null)) - .clientOptions(clientOptions); + // Use realistic but small timeout values that will fail for upload but are deterministic in their behavior + HttpClientOptions clientOptions = new HttpClientOptions().setApplicationId("client-options-id") + .setResponseTimeout(Duration.ofMillis(1)) + .setReadTimeout(Duration.ofMillis(1)) + .setWriteTimeout(Duration.ofMillis(1)) + .setConnectTimeout(Duration.ofMillis(1)); - BlobServiceClient serviceClient = clientBuilder.buildClient(); + BlobServiceClient serviceClient + = new BlobServiceClientBuilder().endpoint(ENVIRONMENT.getPrimaryAccount().getBlobEndpoint()) + .credential(ENVIRONMENT.getPrimaryAccount().getCredential()) + .retryOptions(new RequestRetryOptions(null, 1, (Integer) null, null, null, null)) + .clientOptions(clientOptions) + .buildClient(); + liveTestScenarioWithRetry(() -> { int size = 1024; byte[] randomData = getRandomByteArray(size); ByteArrayInputStream input = new ByteArrayInputStream(randomData); - BlobContainerClient blobContainer = serviceClient.createBlobContainer(generateContainerName()); + BlobContainerClient blobContainer = serviceClient.getBlobContainerClient(cc.getBlobContainerName()); BlobClient blobClient = blobContainer.getBlobClient(generateBlobName()); // test whether failure occurs due to small timeout intervals set on the service client assertThrows(RuntimeException.class, () -> blobClient.uploadWithResponse(input, size, null, null, null, null, null, Duration.ofSeconds(10), null)); }); - } @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2021-12-02") @@ -1663,6 +1661,71 @@ private static Stream<Arguments> setTagsACSupplier() { return Stream.of(Arguments.of((String) null), Arguments.of("\"foo\" = 'bar'")); } + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @ParameterizedTest + @MethodSource("com.azure.storage.blob.BlobTestBase#allConditionsSupplier") + public void setGetTagOptionsAC(OffsetDateTime modified, OffsetDateTime unmodified, String match, String noneMatch, + String leaseID) { + Map<String, String> t = new HashMap<>(); + + t.put("foo", "bar"); + + match = setupBlobMatchCondition(bc, match); + leaseID = setupBlobLeaseCondition(bc, leaseID); + BlobRequestConditions bac = new BlobRequestConditions().setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified); + + assertResponseStatusCode( + bc.setTagsWithResponse(new BlobSetTagsOptions(t).setRequestConditions(bac), null, Context.NONE), 204); + assertResponseStatusCode( + bc.getTagsWithResponse(new BlobGetTagsOptions().setRequestConditions(bac), null, Context.NONE), 200); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @ParameterizedTest + @MethodSource("com.azure.storage.blob.BlobTestBase#allConditionsFailSupplier") + public void setTagOptionsACFail(OffsetDateTime modified, OffsetDateTime unmodified, String match, String noneMatch, + String leaseID, String tags) { + Map<String, String> t = new HashMap<>(); + + //The x-ms-if-tags-request header is not supported + t.put("notfoo", "notbar"); + + noneMatch = setupBlobMatchCondition(bc, noneMatch); + + BlobRequestConditions bac = new BlobRequestConditions().setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags); + + assertThrows(BlobStorageException.class, + () -> bc.setTagsWithResponse(new BlobSetTagsOptions(t).setRequestConditions(bac), null, Context.NONE)); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @ParameterizedTest + @MethodSource("com.azure.storage.blob.BlobTestBase#allConditionsFailSupplier") + public void getTagOptionsACFail(OffsetDateTime modified, OffsetDateTime unmodified, String match, String noneMatch, + String leaseID, String tags) { + //The x-ms-if-tags-request header is not supported + + noneMatch = setupBlobMatchCondition(bc, noneMatch); + BlobRequestConditions bac = new BlobRequestConditions().setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags); + + assertThrows(BlobStorageException.class, + () -> bc.getTagsWithResponse(new BlobGetTagsOptions().setRequestConditions(bac), null, Context.NONE)); + } + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2019-07-07") @Test public void setTagsACFail() { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java index 2c27dbb8f110..104eb587387c 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java @@ -279,8 +279,8 @@ public void uploadInputStreamBadLength(long badLength, Class<? extends Throwable .verifyError(exception); } catch (IllegalArgumentException e) { //StepVerifier cant handle the error in the creation of BlobParallelUploadOptions - assertEquals(e.getMessage(), - "The value of the parameter 'length' should be between 0 and 9223372036854775807."); + assertEquals("The value of the parameter 'length' should be between 0 and 9223372036854775807.", + e.getMessage()); } } @@ -1347,7 +1347,7 @@ public void setHTTPHeadersNull() { } @Test - public void setHTTPHeadersMin() throws NoSuchAlgorithmException { + public void setHTTPHeadersMin() { Mono<BlobProperties> response = bc.getProperties().flatMap(properties -> { BlobHttpHeaders headers; try { @@ -1621,6 +1621,75 @@ private static Stream<Arguments> setTagsACSupplier() { return Stream.of(Arguments.of((String) null), Arguments.of("\"foo\" = 'bar'")); } + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @ParameterizedTest + @MethodSource("com.azure.storage.blob.BlobTestBase#allConditionsSupplier") + public void setGetTagOptionsAC(OffsetDateTime modified, OffsetDateTime unmodified, String match, String noneMatch, + String leaseID) { + Map<String, String> t = new HashMap<>(); + + t.put("foo", "bar"); + + Mono<Response<Map<String, String>>> response = Mono + .zip(setupBlobLeaseCondition(bc, leaseID), setupBlobMatchCondition(bc, match), BlobTestBase::convertNulls) + .flatMap(conditions -> { + BlobRequestConditions bac = new BlobRequestConditions().setLeaseId(conditions.get(0)) + .setIfMatch(conditions.get(1)) + .setIfNoneMatch(noneMatch) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified); + return bc.setTagsWithResponse(new BlobSetTagsOptions(t).setRequestConditions(bac)) + .then(bc.getTagsWithResponse(new BlobGetTagsOptions().setRequestConditions(bac))); + }); + + StepVerifier.create(response).assertNext(r -> { + assertResponseStatusCode(r, 200); + assertEquals(t, r.getValue()); + }).verifyComplete(); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @ParameterizedTest + @MethodSource("com.azure.storage.blob.BlobTestBase#allConditionsFailSupplier") + public void setTagOptionsACFail(OffsetDateTime modified, OffsetDateTime unmodified, String match, String noneMatch, + String leaseID, String tags) { + Map<String, String> t = new HashMap<>(); + + //The x-ms-if-tags-request header is not supported + t.put("notfoo", "notbar"); + + Mono<Response<Void>> response = setupBlobMatchCondition(bc, noneMatch).flatMap(condition -> { + BlobRequestConditions bac = new BlobRequestConditions().setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(convertNull(condition)) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags); + return bc.setTagsWithResponse(new BlobSetTagsOptions(t).setRequestConditions(bac)); + }); + + StepVerifier.create(response).verifyError(BlobStorageException.class); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @ParameterizedTest + @MethodSource("com.azure.storage.blob.BlobTestBase#allConditionsFailSupplier") + public void getTagOptionsACFail(OffsetDateTime modified, OffsetDateTime unmodified, String match, String noneMatch, + String leaseID, String tags) { + //The x-ms-if-tags-request header is not supported + Mono<Response<Map<String, String>>> response = setupBlobMatchCondition(bc, noneMatch).flatMap(condition -> { + BlobRequestConditions bac = new BlobRequestConditions().setLeaseId(leaseID) + .setIfMatch(match) + .setIfNoneMatch(convertNull(condition)) + .setIfModifiedSince(modified) + .setIfUnmodifiedSince(unmodified) + .setTagsConditions(tags); + return bc.getTagsWithResponse(new BlobGetTagsOptions().setRequestConditions(bac)); + }); + + StepVerifier.create(response).verifyError(BlobStorageException.class); + } + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2019-07-07") @Test public void setTagsACFail() { @@ -2751,7 +2820,7 @@ public void getNonEncodedSpecializedBlob() { specializedBlobClientBuilder.containerName(ccAsync.getBlobContainerName()).blobName(originalBlobName); BlockBlobAsyncClient blockBlobClient = specializedBlobClientBuilder.buildBlockBlobAsyncClient(); - assertEquals(blockBlobClient.getBlobName(), originalBlobName); + assertEquals(originalBlobName, blockBlobClient.getBlobName()); // see if the blob name will be properly encoded in the url String encodedName = Utility.urlEncode(originalBlobName); @@ -2765,7 +2834,7 @@ public void getNonEncodedBlobClient() { blobClientBuilder.containerName(ccAsync.getBlobContainerName()).blobName(originalBlobName); BlobAsyncClient blobClient = blobClientBuilder.buildAsyncClient(); - assertEquals(blobClient.getBlobName(), originalBlobName); + assertEquals(originalBlobName, blobClient.getBlobName()); // see if the blob name will be properly encoded in the url String encodedName = Utility.urlEncode(originalBlobName); diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java index 6279058fec9c..3c0db26ebfd4 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java @@ -200,7 +200,8 @@ public void beforeTest() { interceptorManager.addMatchers(Collections.singletonList(new CustomMatcher().setComparingBodies(false) .setHeadersKeyOnlyMatch(Arrays.asList("x-ms-lease-id", "x-ms-proposed-lease-id", "If-Modified-Since", "If-Unmodified-Since", "x-ms-expiry-time", "x-ms-source-if-modified-since", - "x-ms-source-if-unmodified-since", "x-ms-source-lease-id", "x-ms-encryption-key-sha256")) + "x-ms-source-if-unmodified-since", "x-ms-source-lease-id", "x-ms-encryption-key-sha256", + "x-ms-blob-if-modified-since", "x-ms-blob-if-unmodified-since")) .setQueryOrderingIgnored(true) .setIgnoredQueryParameters(Collections.singletonList("sv")))); @@ -773,15 +774,19 @@ protected void liveTestScenarioWithRetry(Runnable runnable) { } int retry = 0; - while (retry < 5) { + + // Try up to 5 times (4 retries + 1 final attempt) + while (retry < 4) { try { runnable.run(); - break; + return; // success } catch (Exception ex) { retry++; sleepIfRunningAgainstService(5000); } } + // Final attempt (5th try) + runnable.run(); } protected HttpPipelinePolicy getPerCallVersionPolicy() { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index 377e3378fb83..f46116acdbb5 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -912,6 +912,41 @@ public void listBlobsFlatOptionsPrefix() { assertFalse(blobs.hasNext()); // Normal } + @Test + public void listBlobsFlatOptionsStartsFrom() { + String blob1 = "a" + generateBlobName(); + String blob2 = "b" + generateBlobName(); + String blob3 = "c" + generateBlobName(); + cc.getBlobClient(blob1).getBlockBlobClient().upload(DATA.getDefaultInputStream(), 7); + cc.getBlobClient(blob2).getBlockBlobClient().upload(DATA.getDefaultInputStream(), 7); + cc.getBlobClient(blob3).getBlockBlobClient().upload(DATA.getDefaultInputStream(), 7); + + ListBlobsOptions options = new ListBlobsOptions().setStartFrom(blob2); + Iterator<BlobItem> blobs = cc.listBlobs(options, null).iterator(); + + assertEquals(blob2, blobs.next().getName()); + assertEquals(blob3, blobs.next().getName()); + assertFalse(blobs.hasNext()); + } + + @Test + public void listBlobsByHierarchyOptionsStartsFrom() { + String blob1 = "a" + generateBlobName(); + String blob2 = "b" + generateBlobName(); + String blob3 = "c" + generateBlobName(); + + cc.getBlobClient(blob1).getBlockBlobClient().upload(DATA.getDefaultInputStream(), 7); + cc.getBlobClient(blob2).getBlockBlobClient().upload(DATA.getDefaultInputStream(), 7); + cc.getBlobClient(blob3).getBlockBlobClient().upload(DATA.getDefaultInputStream(), 7); + + ListBlobsOptions options = new ListBlobsOptions().setStartFrom(blob2); + Iterator<BlobItem> blobs = cc.listBlobsByHierarchy("/", options, null).iterator(); + + assertEquals(blob2, blobs.next().getName()); + assertEquals(blob3, blobs.next().getName()); + assertFalse(blobs.hasNext()); + } + @Test public void listBlobsFlatOptionsMaxResults() { int pageSize = 2; diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java index ed2ea12103d0..04ebc06dc2b6 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java @@ -941,6 +941,44 @@ public void listBlobsFlatOptionsPrefix() { .verifyComplete(); } + @Test + public void listBlobsFlatOptionsStartsFrom() { + String blob1 = "a" + generateBlobName(); + String blob2 = "b" + generateBlobName(); + String blob3 = "c" + generateBlobName(); + + Mono<Void> uploads + = Mono.when(ccAsync.getBlobAsyncClient(blob1).getBlockBlobAsyncClient().upload(DATA.getDefaultFlux(), 7), + ccAsync.getBlobAsyncClient(blob2).getBlockBlobAsyncClient().upload(DATA.getDefaultFlux(), 7), + ccAsync.getBlobAsyncClient(blob3).getBlockBlobAsyncClient().upload(DATA.getDefaultFlux(), 7)); + + ListBlobsOptions options = new ListBlobsOptions().setStartFrom(blob2); + + StepVerifier.create(uploads.thenMany(ccAsync.listBlobs(options))) + .expectNextMatches(blob -> blob2.equals(blob.getName())) + .expectNextMatches(blob -> blob3.equals(blob.getName())) + .verifyComplete(); + } + + @Test + public void listBlobsByHierarchyOptionsStartsFrom() { + String blob1 = "a" + generateBlobName(); + String blob2 = "b" + generateBlobName(); + String blob3 = "c" + generateBlobName(); + + Mono<Void> uploads + = Mono.when(ccAsync.getBlobAsyncClient(blob1).getBlockBlobAsyncClient().upload(DATA.getDefaultFlux(), 7), + ccAsync.getBlobAsyncClient(blob2).getBlockBlobAsyncClient().upload(DATA.getDefaultFlux(), 7), + ccAsync.getBlobAsyncClient(blob3).getBlockBlobAsyncClient().upload(DATA.getDefaultFlux(), 7)); + + ListBlobsOptions options = new ListBlobsOptions().setStartFrom(blob2); + + StepVerifier.create(uploads.thenMany(ccAsync.listBlobsByHierarchy("/", options))) + .expectNextMatches(blob -> blob2.equals(blob.getName())) + .expectNextMatches(blob -> blob3.equals(blob.getName())) + .verifyComplete(); + } + @SuppressWarnings("deprecation") @Test public void listBlobsFlatOptionsMaxResults() { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SasAsyncClientTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SasAsyncClientTests.java index 5cfba2918022..86b9c91304fc 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SasAsyncClientTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SasAsyncClientTests.java @@ -4,10 +4,13 @@ package com.azure.storage.blob; import com.azure.core.credential.AzureSasCredential; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.storage.blob.implementation.util.BlobSasImplUtil; import com.azure.storage.blob.models.BlobContainerProperties; +import com.azure.storage.blob.models.BlobErrorCode; import com.azure.storage.blob.models.BlobItem; import com.azure.storage.blob.models.BlobProperties; import com.azure.storage.blob.models.BlobStorageException; @@ -30,6 +33,8 @@ import com.azure.storage.common.sas.CommonSasQueryParameters; import com.azure.storage.common.sas.SasIpRange; import com.azure.storage.common.sas.SasProtocol; +import com.azure.storage.common.test.shared.StorageCommonTestUtils; +import com.azure.storage.common.test.shared.extensions.LiveOnly; import com.azure.storage.common.test.shared.extensions.RequiredServiceVersion; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -53,6 +58,7 @@ import java.util.Map; import java.util.stream.Stream; +import static com.azure.storage.common.test.shared.StorageCommonTestUtils.getOidFromToken; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -196,6 +202,74 @@ public void blobSasUserDelegation() { }); } + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + public void blobSasUserDelegationDelegatedObjectId() { + liveTestScenarioWithRetry(() -> { + BlobSasPermission permissions = new BlobSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + BlobServiceSasSignatureValues sasValues + = new BlobServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + + Mono<Response<BlobProperties>> response = getUserDelegationInfo().flatMap(key -> { + String sas = sasClient.generateUserDelegationSas(sasValues, key); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. + BlockBlobAsyncClient client = instrument( + new BlobClientBuilder().endpoint(sasClient.getBlobUrl()).sasToken(sas).credential(tokenCredential)) + .buildAsyncClient() + .getBlockBlobAsyncClient(); + + return client.getPropertiesWithResponse(null); + }); + + StepVerifier.create(response).assertNext(r -> assertResponseStatusCode(r, 200)).verifyComplete(); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + public void blobSasUserDelegationDelegatedObjectIdFail() { + liveTestScenarioWithRetry(() -> { + BlobSasPermission permissions = new BlobSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + BlobServiceSasSignatureValues sasValues + = new BlobServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + + Mono<Response<BlobProperties>> response = getUserDelegationInfo().flatMap(key -> { + String sas = sasClient.generateUserDelegationSas(sasValues, key); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. Token credential is not provided here, so the request should fail. + BlockBlobAsyncClient client + = instrument(new BlobClientBuilder().endpoint(sasClient.getBlobUrl()).sasToken(sas)) + .buildAsyncClient() + .getBlockBlobAsyncClient(); + + return client.getPropertiesWithResponse(null); + }); + + StepVerifier.create(response).verifyErrorSatisfies(e -> { + assertExceptionStatusCodeAndMessage(e, 403, BlobErrorCode.AUTHENTICATION_FAILED); + }); + }); + } + @SuppressWarnings("deprecation") @Test public void blobSasSnapshot() { @@ -308,6 +382,73 @@ public void containerSasUserDelegation() { }); } + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + public void containerSasUserDelegationDelegatedObjectId() { + liveTestScenarioWithRetry(() -> { + BlobContainerSasPermission permissions = new BlobContainerSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + BlobServiceSasSignatureValues sasValues + = new BlobServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + + Flux<BlobItem> response = getUserDelegationInfo().flatMapMany(key -> { + String sas = ccAsync.generateUserDelegationSas(sasValues, key); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. + BlobContainerAsyncClient client + = instrument(new BlobContainerClientBuilder().endpoint(ccAsync.getBlobContainerUrl()) + .sasToken(sas) + .credential(tokenCredential)).buildAsyncClient(); + + return client.listBlobs(); + }); + + StepVerifier.create(response).expectNextCount(1).verifyComplete(); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + public void containerSasUserDelegationDelegatedObjectIdFail() { + liveTestScenarioWithRetry(() -> { + BlobContainerSasPermission permissions = new BlobContainerSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + BlobServiceSasSignatureValues sasValues + = new BlobServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + + Flux<BlobItem> response = getUserDelegationInfo().flatMapMany(key -> { + String sas = ccAsync.generateUserDelegationSas(sasValues, key); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. Token credential is not provided here, so the request should fail. + BlobContainerAsyncClient client + = instrument(new BlobContainerClientBuilder().endpoint(ccAsync.getBlobContainerUrl()).sasToken(sas)) + .buildAsyncClient(); + + return client.listBlobs(); + }); + + StepVerifier.create(response).verifyErrorSatisfies(e -> { + assertExceptionStatusCodeAndMessage(e, 403, BlobErrorCode.AUTHENTICATION_FAILED); + }); + }); + } + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2019-12-12") @Test public void blobSasTags() { @@ -1013,7 +1154,7 @@ public void blobSasImplUtilStringToSignUserDelegationKey(OffsetDateTime startTim OffsetDateTime keyStart, OffsetDateTime keyExpiry, String keyService, String keyVersion, String keyValue, SasIpRange ipRange, SasProtocol protocol, String snapId, String cacheControl, String disposition, String encoding, String language, String type, String versionId, String saoid, String cid, - String encryptionScope, String expectedStringToSign) { + String encryptionScope, String delegatedUserObjectId, String expectedStringToSign) { OffsetDateTime e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC); BlobSasPermission p = new BlobSasPermission().setReadPermission(true); BlobServiceSasSignatureValues v = new BlobServiceSasSignatureValues(e, p); @@ -1035,7 +1176,8 @@ public void blobSasImplUtilStringToSignUserDelegationKey(OffsetDateTime startTim .setContentLanguage(language) .setContentType(type) .setPreauthorizedAgentObjectId(saoid) - .setCorrelationId(cid); + .setCorrelationId(cid) + .setDelegatedUserObjectId(delegatedUserObjectId); UserDelegationKey key = new UserDelegationKey().setSignedObjectId(keyOid) .setSignedTenantId(keyTid) @@ -1062,7 +1204,7 @@ private static Stream<Arguments> blobSasImplUtilStringToSignUserDelegationKeySup return Stream.of( Arguments.of(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC), null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, null, null, null, null, null, null, null, null, - null, null, null, + null, null, null, null, "r\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) @@ -1073,7 +1215,7 @@ private static Stream<Arguments> blobSasImplUtilStringToSignUserDelegationKeySup + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, "11111111-1111-1111-1111-111111111111", null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, null, null, null, null, null, null, null, null, - null, null, null, + null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) @@ -1081,7 +1223,7 @@ private static Stream<Arguments> blobSasImplUtilStringToSignUserDelegationKeySup + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, "22222222-2222-2222-2222-222222222222", null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, null, null, null, null, null, null, null, null, - null, null, null, + null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) @@ -1089,7 +1231,7 @@ private static Stream<Arguments> blobSasImplUtilStringToSignUserDelegationKeySup + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC), null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, null, null, null, null, null, null, - null, null, null, null, null, + null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) @@ -1097,14 +1239,14 @@ private static Stream<Arguments> blobSasImplUtilStringToSignUserDelegationKeySup + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, null, OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC), null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, null, null, null, null, null, null, - null, null, null, null, null, + null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, "b", null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) @@ -1112,96 +1254,103 @@ private static Stream<Arguments> blobSasImplUtilStringToSignUserDelegationKeySup + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, null, "2018-06-17", "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, null, null, null, null, null, null, null, null, - null, null, null, + null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n2018-06-17\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", - new SasIpRange(), null, null, null, null, null, null, null, null, null, null, null, + new SasIpRange(), null, null, null, null, null, null, null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\nip\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - SasProtocol.HTTPS_ONLY, null, null, null, null, null, null, null, null, null, null, + SasProtocol.HTTPS_ONLY, null, null, null, null, null, null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n" + SasProtocol.HTTPS_ONLY + "\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, "snapId", null, null, null, null, null, null, null, null, null, + null, "snapId", null, null, null, null, null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nbs\nsnapId\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, "control", null, null, null, null, null, null, null, null, + null, null, "control", null, null, null, null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\ncontrol\n\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, "disposition", null, null, null, null, null, null, null, + null, null, null, "disposition", null, null, null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\ndisposition\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, null, "encoding", null, null, null, null, null, null, + null, null, null, null, "encoding", null, null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\nencoding\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, null, null, "language", null, null, null, null, null, + null, null, null, null, null, "language", null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\nlanguage\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, null, null, null, "type", null, null, null, null, + null, null, null, null, null, null, "type", null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\ntype"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, null, null, null, null, "versionId", null, null, null, + null, null, null, null, null, null, null, "versionId", null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nbv\nversionId\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, null, null, null, null, null, "saoid", null, null, + null, null, null, null, null, null, null, null, "saoid", null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\nsaoid\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, null, null, null, null, null, null, "cid", null, + null, null, null, null, null, null, null, null, null, "cid", null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\ncid\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, null, null, null, null, null, null, null, "encryptionScope", + null, null, null, null, null, null, null, null, null, null, "encryptionScope", null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION - + "\nb\n\nencryptionScope\n\n\n\n\n")); + + "\nb\n\nencryptionScope\n\n\n\n\n"), + Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, + null, null, null, null, null, null, null, null, null, null, null, "delegatedOid", + "r\n\n" + + Constants.ISO_8601_UTC_DATE_FORMATTER + .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\ndelegatedOid\n\n\n" + + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n")); } @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2020-12-06") diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SasClientTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SasClientTests.java index ea2223591889..6e6a0f25d112 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SasClientTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SasClientTests.java @@ -4,8 +4,11 @@ package com.azure.storage.blob; import com.azure.core.credential.AzureSasCredential; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.storage.blob.implementation.util.BlobSasImplUtil; +import com.azure.storage.blob.models.BlobErrorCode; import com.azure.storage.blob.models.BlobProperties; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.UserDelegationKey; @@ -26,6 +29,8 @@ import com.azure.storage.common.sas.CommonSasQueryParameters; import com.azure.storage.common.sas.SasIpRange; import com.azure.storage.common.sas.SasProtocol; +import com.azure.storage.common.test.shared.StorageCommonTestUtils; +import com.azure.storage.common.test.shared.extensions.LiveOnly; import com.azure.storage.common.test.shared.extensions.RequiredServiceVersion; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -44,6 +49,7 @@ import java.util.Map; import java.util.stream.Stream; +import static com.azure.storage.common.test.shared.StorageCommonTestUtils.getOidFromToken; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -177,6 +183,64 @@ public void blobSasUserDelegation() { }); } + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + public void blobSasUserDelegationDelegatedObjectId() { + liveTestScenarioWithRetry(() -> { + BlobSasPermission permissions = new BlobSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + BlobServiceSasSignatureValues sasValues + = new BlobServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = sasClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. + BlockBlobClient client = instrument( + new BlobClientBuilder().endpoint(sasClient.getBlobUrl()).sasToken(sas).credential(tokenCredential)) + .buildClient() + .getBlockBlobClient(); + + Response<BlobProperties> response = client.getPropertiesWithResponse(null, null, Context.NONE); + assertResponseStatusCode(response, 200); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + public void blobSasUserDelegationDelegatedObjectIdFail() { + liveTestScenarioWithRetry(() -> { + BlobSasPermission permissions = new BlobSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + BlobServiceSasSignatureValues sasValues + = new BlobServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = sasClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. Token credential is not provided here, so the request should fail. + BlockBlobClient client + = instrument(new BlobClientBuilder().endpoint(sasClient.getBlobUrl()).sasToken(sas)).buildClient() + .getBlockBlobClient(); + + BlobStorageException e = assertThrows(BlobStorageException.class, + () -> client.getPropertiesWithResponse(null, null, Context.NONE)); + assertExceptionStatusCodeAndMessage(e, 403, BlobErrorCode.AUTHENTICATION_FAILED); + }); + } + @SuppressWarnings("deprecation") @Test public void blobSasSnapshot() { @@ -263,6 +327,63 @@ public void containerSasUserDelegation() { }); } + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + public void containerSasUserDelegationDelegatedObjectId() { + liveTestScenarioWithRetry(() -> { + BlobContainerSasPermission permissions = new BlobContainerSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + BlobServiceSasSignatureValues sasValues + = new BlobServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = cc.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. + BlobContainerClient client = instrument(new BlobContainerClientBuilder().endpoint(cc.getBlobContainerUrl()) + .sasToken(sas) + .credential(tokenCredential)).buildClient(); + + assertDoesNotThrow(() -> client.listBlobs().iterator().hasNext()); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + public void containerSasUserDelegationDelegatedObjectIdFail() { + liveTestScenarioWithRetry(() -> { + + BlobContainerSasPermission permissions = new BlobContainerSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + BlobServiceSasSignatureValues sasValues + = new BlobServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = cc.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. Token credential is not provided here, so the request should fail. + BlobContainerClient client + = instrument(new BlobContainerClientBuilder().endpoint(cc.getBlobContainerUrl()).sasToken(sas)) + .buildClient(); + + BlobStorageException e + = assertThrows(BlobStorageException.class, () -> client.listBlobs().iterator().hasNext()); + assertExceptionStatusCodeAndMessage(e, 403, BlobErrorCode.AUTHENTICATION_FAILED); + }); + } + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2019-12-12") @Test public void blobSasTags() { @@ -334,7 +455,7 @@ public void containerSasTagsFail() { .setCreatePermission(true) .setDeletePermission(true) .setAddPermission(true); - /* No tags permission. */ + /* No tagsPermission. */ OffsetDateTime expiryTime = testResourceNamer.now().plusDays(1); BlobServiceSasSignatureValues sasValues = new BlobServiceSasSignatureValues(expiryTime, permissions); @@ -943,7 +1064,7 @@ public void blobSasImplUtilStringToSignUserDelegationKey(OffsetDateTime startTim OffsetDateTime keyStart, OffsetDateTime keyExpiry, String keyService, String keyVersion, String keyValue, SasIpRange ipRange, SasProtocol protocol, String snapId, String cacheControl, String disposition, String encoding, String language, String type, String versionId, String saoid, String cid, - String encryptionScope, String expectedStringToSign) { + String encryptionScope, String delegatedUserObjectId, String expectedStringToSign) { OffsetDateTime e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC); BlobSasPermission p = new BlobSasPermission().setReadPermission(true); BlobServiceSasSignatureValues v = new BlobServiceSasSignatureValues(e, p); @@ -965,7 +1086,8 @@ public void blobSasImplUtilStringToSignUserDelegationKey(OffsetDateTime startTim .setContentLanguage(language) .setContentType(type) .setPreauthorizedAgentObjectId(saoid) - .setCorrelationId(cid); + .setCorrelationId(cid) + .setDelegatedUserObjectId(delegatedUserObjectId); UserDelegationKey key = new UserDelegationKey().setSignedObjectId(keyOid) .setSignedTenantId(keyTid) @@ -992,7 +1114,7 @@ private static Stream<Arguments> blobSasImplUtilStringToSignUserDelegationKeySup return Stream.of( Arguments.of(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC), null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, null, null, null, null, null, null, null, null, - null, null, null, + null, null, null, null, "r\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) @@ -1003,7 +1125,7 @@ private static Stream<Arguments> blobSasImplUtilStringToSignUserDelegationKeySup + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, "11111111-1111-1111-1111-111111111111", null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, null, null, null, null, null, null, null, null, - null, null, null, + null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) @@ -1011,7 +1133,7 @@ private static Stream<Arguments> blobSasImplUtilStringToSignUserDelegationKeySup + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, "22222222-2222-2222-2222-222222222222", null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, null, null, null, null, null, null, null, null, - null, null, null, + null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) @@ -1019,7 +1141,7 @@ private static Stream<Arguments> blobSasImplUtilStringToSignUserDelegationKeySup + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC), null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, null, null, null, null, null, null, - null, null, null, null, null, + null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) @@ -1027,14 +1149,14 @@ private static Stream<Arguments> blobSasImplUtilStringToSignUserDelegationKeySup + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, null, OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC), null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, null, null, null, null, null, null, - null, null, null, null, null, + null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, "b", null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) @@ -1042,96 +1164,103 @@ private static Stream<Arguments> blobSasImplUtilStringToSignUserDelegationKeySup + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, null, "2018-06-17", "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, null, null, null, null, null, null, null, null, - null, null, null, + null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n2018-06-17\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", - new SasIpRange(), null, null, null, null, null, null, null, null, null, null, null, + new SasIpRange(), null, null, null, null, null, null, null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\nip\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - SasProtocol.HTTPS_ONLY, null, null, null, null, null, null, null, null, null, null, + SasProtocol.HTTPS_ONLY, null, null, null, null, null, null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n" + SasProtocol.HTTPS_ONLY + "\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, "snapId", null, null, null, null, null, null, null, null, null, + null, "snapId", null, null, null, null, null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nbs\nsnapId\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, "control", null, null, null, null, null, null, null, null, + null, null, "control", null, null, null, null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\ncontrol\n\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, "disposition", null, null, null, null, null, null, null, + null, null, null, "disposition", null, null, null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\ndisposition\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, null, "encoding", null, null, null, null, null, null, + null, null, null, null, "encoding", null, null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\nencoding\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, null, null, "language", null, null, null, null, null, + null, null, null, null, null, "language", null, null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\nlanguage\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, null, null, null, "type", null, null, null, null, + null, null, null, null, null, null, "type", null, null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\ntype"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, null, null, null, null, "versionId", null, null, null, + null, null, null, null, null, null, null, "versionId", null, null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nbv\nversionId\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, null, null, null, null, null, "saoid", null, null, + null, null, null, null, null, null, null, null, "saoid", null, null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\nsaoid\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, null, null, null, null, null, null, "cid", null, + null, null, null, null, null, null, null, null, null, "cid", null, null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\ncid\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n"), Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, - null, null, null, null, null, null, null, null, null, null, "encryptionScope", + null, null, null, null, null, null, null, null, null, null, "encryptionScope", null, "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + Constants.SAS_SERVICE_VERSION - + "\nb\n\nencryptionScope\n\n\n\n\n")); + + "\nb\n\nencryptionScope\n\n\n\n\n"), + Arguments.of(null, null, null, null, null, null, null, "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=", null, + null, null, null, null, null, null, null, null, null, null, null, "delegatedOid", + "r\n\n" + + Constants.ISO_8601_UTC_DATE_FORMATTER + .format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n\n\ndelegatedOid\n\n\n" + + Constants.SAS_SERVICE_VERSION + "\nb\n\n\n\n\n\n\n")); } @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2020-12-06") diff --git a/sdk/storage/azure-storage-blob/swagger/README.md b/sdk/storage/azure-storage-blob/swagger/README.md index 338f914542a2..d0a682c5ad34 100644 --- a/sdk/storage/azure-storage-blob/swagger/README.md +++ b/sdk/storage/azure-storage-blob/swagger/README.md @@ -16,7 +16,7 @@ autorest ### Code generation settings ``` yaml use: '@autorest/java@4.1.52' -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/596d8d2a8c1c50bd6ebe60036143f4c4787fc816/specification/storage/data-plane/Microsoft.BlobStorage/stable/2025-11-05/blob.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/refs/heads/main/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-02-06/blob.json java: true output-folder: ../ namespace: com.azure.storage.blob @@ -473,6 +473,13 @@ directive: delete $.IfNoneMatch["x-ms-parameter-grouping"]; delete $.IfUnmodifiedSince["x-ms-parameter-grouping"]; delete $.IfTags["x-ms-parameter-grouping"]; +- from: swagger-document + where: $.parameters + transform: > + delete $.IfBlobMatch["x-ms-parameter-grouping"]; + delete $.IfBlobModifiedSince["x-ms-parameter-grouping"]; + delete $.IfBlobNoneMatch["x-ms-parameter-grouping"]; + delete $.IfBlobUnmodifiedSince["x-ms-parameter-grouping"]; - from: swagger-document where: $.parameters transform: > diff --git a/sdk/storage/azure-storage-common/ci.system.properties b/sdk/storage/azure-storage-common/ci.system.properties index efd8a72a4c56..62035cf54f16 100644 --- a/sdk/storage/azure-storage-common/ci.system.properties +++ b/sdk/storage/azure-storage-common/ci.system.properties @@ -1,2 +1,2 @@ -AZURE_LIVE_TEST_SERVICE_VERSION=V2025_11_05 -AZURE_STORAGE_SAS_SERVICE_VERSION=2025-11-05 +AZURE_LIVE_TEST_SERVICE_VERSION=V2026_02_06 +AZURE_STORAGE_SAS_SERVICE_VERSION=2026-02-06 diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java index d7142f29a8d4..7c16991161bb 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java @@ -88,7 +88,7 @@ public final class Constants { public static final String PROPERTY_AZURE_STORAGE_SAS_SERVICE_VERSION = "AZURE_STORAGE_SAS_SERVICE_VERSION"; public static final String SAS_SERVICE_VERSION - = Configuration.getGlobalConfiguration().get(PROPERTY_AZURE_STORAGE_SAS_SERVICE_VERSION, "2025-11-05"); + = Configuration.getGlobalConfiguration().get(PROPERTY_AZURE_STORAGE_SAS_SERVICE_VERSION, "2026-02-06"); public static final String ADJUSTED_BLOB_LENGTH_KEY = "adjustedBlobLength"; @@ -220,7 +220,7 @@ public static final class HeaderConstants { * @deprecated For SAS Service Version use {@link Constants#SAS_SERVICE_VERSION}. */ @Deprecated - public static final String TARGET_STORAGE_VERSION = "2025-11-05"; + public static final String TARGET_STORAGE_VERSION = "2026-02-06"; /** * Error code returned from the service. @@ -354,6 +354,11 @@ public static final class UrlConstants { */ public static final String SAS_SIGNATURE = "sig"; + /** + * The SAS delegated user object id parameter. + */ + public static final String SAS_DELEGATED_USER_OBJECT_ID = "sduoid"; + /** * The SAS encryption scope parameter. */ diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/UploadUtils.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/UploadUtils.java index 00b0735056cb..fcb9478238ec 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/UploadUtils.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/UploadUtils.java @@ -148,6 +148,25 @@ public static void uploadFileCleanup(AsynchronousFileChannel channel, ClientLogg } } + /* PULLED FROM RELEASE + * Computes the md5 of the data. + * + * @param data The data. + * @param logger Logger to log errors. + * @return The md5 of the data. + public static byte[] computeMd5(ByteBuffer data, ClientLogger logger) { + if (data == null) { + return null; + } + try { + MessageDigest digest = MessageDigest.getInstance("MD5"); + digest.update(data.duplicate().asReadOnlyBuffer()); + return digest.digest(); + } catch (NoSuchAlgorithmException e) { + throw logger.logExceptionAsError(new RuntimeException(e)); + } + } */ + /** * Computes the md5 of the data and wraps it with the data. * diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/CommonSasQueryParameters.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/CommonSasQueryParameters.java index aa54d3623836..f4a526e50212 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/CommonSasQueryParameters.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/CommonSasQueryParameters.java @@ -45,6 +45,7 @@ public class CommonSasQueryParameters { private final String unauthorizedObjectId; private final String correlationId; private final String encryptionScope; + private final String delegatedUserObjectId; /** * Creates a new {@link CommonSasQueryParameters} object. @@ -108,6 +109,8 @@ public CommonSasQueryParameters(Map<String, String[]> queryParamsMap, boolean re removeSasParametersFromMap, Integer::parseInt); this.encryptionScope = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_ENCRYPTION_SCOPE, removeSasParametersFromMap); + this.delegatedUserObjectId = getQueryParameter(queryParamsMap, + Constants.UrlConstants.SAS_DELEGATED_USER_OBJECT_ID, removeSasParametersFromMap); } /** @@ -168,6 +171,8 @@ public String encode() { SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_IP_RANGE, this.sasIpRange); SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_PERMISSIONS, this.permissions); SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNATURE, this.signature); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_DELEGATED_USER_OBJECT_ID, + this.delegatedUserObjectId); // Account SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SERVICES, this.services); @@ -466,4 +471,15 @@ public String getCorrelationId() { public String getEncryptionScope() { return encryptionScope; } + + /** + * Optional. Beginning in version 2025-07-05, this value specifies the Entra ID of the user that is authorized to + * use the resulting SAS URL. The resulting SAS URL must be used in conjunction with an Entra ID token that has been + * issued to the user specified in this value. + * + * @return The Entra ID of the user that is authorized to use the resulting SAS URL. + */ + public String getDelegatedUserObjectId() { + return delegatedUserObjectId; + } } diff --git a/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/StorageCommonTestUtils.java b/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/StorageCommonTestUtils.java index a57842ce582b..f6790e20d37d 100644 --- a/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/StorageCommonTestUtils.java +++ b/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/StorageCommonTestUtils.java @@ -3,7 +3,9 @@ package com.azure.storage.common.test.shared; import com.azure.core.client.traits.HttpTrait; +import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenCredential; +import com.azure.core.credential.TokenRequestContext; import com.azure.core.http.HttpClient; import com.azure.core.http.netty.NettyAsyncHttpClientProvider; import com.azure.core.http.okhttp.OkHttpAsyncClientProvider; @@ -43,8 +45,11 @@ import java.util.Random; import java.util.UUID; import java.util.function.Supplier; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.zip.CRC32; +import static java.util.Base64.getUrlDecoder; import static org.junit.jupiter.api.Assertions.assertEquals; /** @@ -389,4 +394,32 @@ public static TokenCredential getTokenCredential(InterceptorManager interceptorM return builder.build(); } } + + /** + * Extracts the OID (Object ID) from a token. + * + * @param credential The TokenCredential to extract the OID from. + * @return The OID extracted from the token. + */ + public static String getOidFromToken(TokenCredential credential) { + AccessToken accessToken + = credential.getTokenSync(new TokenRequestContext().addScopes("https://storage.azure.com/.default")); + String[] chunks = accessToken.getToken().split("\\."); + if (chunks.length < 2) { + throw new RuntimeException("Malformed JWT: expected at least 2 parts, got " + chunks.length); + } + String payload; + try { + payload = new String(getUrlDecoder().decode(chunks[1]), StandardCharsets.UTF_8); + } catch (IllegalArgumentException e) { + throw new RuntimeException("Malformed JWT: payload is not valid base64url", e); + } + + Pattern pattern = Pattern.compile("\"oid\":\"(.*?)\""); + Matcher matcher = pattern.matcher(payload); + if (matcher.find()) { + return matcher.group(1); + } + throw new RuntimeException("Could not find oid in token"); + } } diff --git a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md index d8fe79037786..9914e825d341 100644 --- a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md +++ b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md @@ -3,6 +3,9 @@ ## 12.26.0-beta.1 (Unreleased) ### Features Added +- Added support for the StartFrom parameter on `DataLakeFileSystemClient.listPaths()` APIs. +- Added support for Principal-Bound Identity User Delegation SAS. + ### Breaking Changes diff --git a/sdk/storage/azure-storage-file-datalake/assets.json b/sdk/storage/azure-storage-file-datalake/assets.json index 74cab7061d15..90e1f30a59e7 100644 --- a/sdk/storage/azure-storage-file-datalake/assets.json +++ b/sdk/storage/azure-storage-file-datalake/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-file-datalake", - "Tag": "java/storage/azure-storage-file-datalake_53fb07cde0" + "Tag": "java/storage/azure-storage-file-datalake_e7c65c4771" } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeDirectoryAsyncClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeDirectoryAsyncClient.java index e447c186c248..83c9c3fcae58 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeDirectoryAsyncClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeDirectoryAsyncClient.java @@ -33,6 +33,7 @@ import com.azure.storage.file.datalake.models.CustomerProvidedKey; import com.azure.storage.file.datalake.models.DataLakeRequestConditions; import com.azure.storage.file.datalake.models.DataLakeStorageException; +import com.azure.storage.file.datalake.models.ListPathsOptions; import com.azure.storage.file.datalake.models.PathHttpHeaders; import com.azure.storage.file.datalake.models.PathItem; import com.azure.storage.file.datalake.options.DataLakePathCreateOptions; @@ -1246,36 +1247,62 @@ public PagedFlux<PathItem> listPaths() { @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux<PathItem> listPaths(boolean recursive, boolean userPrincipleNameReturned, Integer maxResults) { try { - return listPathsWithOptionalTimeout(recursive, userPrincipleNameReturned, maxResults, null); + ListPathsOptions options = new ListPathsOptions().setRecursive(recursive) + .setUserPrincipalNameReturned(userPrincipleNameReturned) + .setMaxResults(maxResults); + return listPathsWithOptionalTimeout(options, null); } catch (RuntimeException ex) { return pagedFluxError(LOGGER, ex); } } - PagedFlux<PathItem> listPathsWithOptionalTimeout(boolean recursive, boolean userPrincipleNameReturned, - Integer maxResults, Duration timeout) { - BiFunction<String, Integer, Mono<PagedResponse<PathItem>>> func = (marker, pageSize) -> listPathsSegment(marker, - recursive, userPrincipleNameReturned, pageSize == null ? maxResults : pageSize, timeout).map(response -> { - List<PathItem> value = response.getValue() == null - ? Collections.emptyList() - : response.getValue().getPaths().stream().map(Transforms::toPathItem).collect(Collectors.toList()); - - return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), - value, response.getDeserializedHeaders().getXMsContinuation(), response.getDeserializedHeaders()); - }); + PagedFlux<PathItem> listPathsWithOptionalTimeout(ListPathsOptions options, Duration timeout) { + BiFunction<String, Integer, Mono<PagedResponse<PathItem>>> func = (marker, + pageSize) -> listPathsSegment(marker, options.isRecursive(), options.isUserPrincipalNameReturned(), + pageSize == null ? options.getMaxResults() : pageSize, options.getStartFrom(), timeout) + .map(response -> { + List<PathItem> value = response.getValue() == null + ? Collections.emptyList() + : response.getValue() + .getPaths() + .stream() + .map(Transforms::toPathItem) + .collect(Collectors.toList()); + + return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), + response.getHeaders(), value, response.getDeserializedHeaders().getXMsContinuation(), + response.getDeserializedHeaders()); + }); return new PagedFlux<>(pageSize -> func.apply(null, pageSize), func); } private Mono<ResponseBase<FileSystemsListPathsHeaders, PathList>> listPathsSegment(String marker, boolean recursive, - boolean userPrincipleNameReturned, Integer maxResults, Duration timeout) { + boolean userPrincipleNameReturned, Integer maxResults, String beginFrom, Duration timeout) { return StorageImplUtils.applyOptionalTimeout(this.fileSystemDataLakeStorage.getFileSystems() .listPathsWithResponseAsync(recursive, null, null, marker, getDirectoryPath(), maxResults, - userPrincipleNameReturned, Context.NONE), + userPrincipleNameReturned, beginFrom, Context.NONE), timeout); } + /** + * Returns a reactive Publisher emitting all the files/directories in this directory lazily as needed. For more + * information, see the <a href="https://docs.microsoft.com/rest/api/storageservices/datalakestoragegen2/filesystem/list">Azure Docs</a>. + * + * @param options A {@link ListPathsOptions} which specifies what data should be returned by the service. + * @param timeout The maximum duration to wait for each page response. If {@code null}, no timeout is applied. + * @return A reactive response emitting the list of files/directories. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux<PathItem> listPaths(ListPathsOptions options, Duration timeout) { + try { + return listPathsWithOptionalTimeout(options, timeout); + } catch (RuntimeException ex) { + return pagedFluxError(LOGGER, ex); + } + } + /** * Prepares a SpecializedBlobClientBuilder with the pathname appended to the end of the current BlockBlobClient's * url diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeDirectoryClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeDirectoryClient.java index 695d979d2fe9..28ff49f93f24 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeDirectoryClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeDirectoryClient.java @@ -29,6 +29,7 @@ import com.azure.storage.file.datalake.models.CustomerProvidedKey; import com.azure.storage.file.datalake.models.DataLakeRequestConditions; import com.azure.storage.file.datalake.models.DataLakeStorageException; +import com.azure.storage.file.datalake.models.ListPathsOptions; import com.azure.storage.file.datalake.models.PathHttpHeaders; import com.azure.storage.file.datalake.models.PathInfo; import com.azure.storage.file.datalake.models.PathItem; @@ -1149,11 +1150,36 @@ public PagedIterable<PathItem> listPaths() { @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable<PathItem> listPaths(boolean recursive, boolean userPrincipleNameReturned, Integer maxResults, Duration timeout) { + ListPathsOptions options = new ListPathsOptions().setRecursive(recursive) + .setUserPrincipalNameReturned(userPrincipleNameReturned) + .setMaxResults(maxResults); + return listPaths(options, timeout); + } + + /** + * Returns a lazy loaded list of files/directories in this directory. The returned {@link PagedIterable} can be + * consumed while new items are automatically retrieved as needed. For more information, see the + * <a href="https://docs.microsoft.com/rest/api/storageservices/datalakestoragegen2/filesystem/list#filesystem">Azure Docs</a>. + * + * @param options A {@link ListPathsOptions} which specifies what data should be returned by the service. If + * iterating by page, the page size passed to byPage methods such as + * {@link PagedIterable#iterableByPage(int)} will be preferred over the value set on these options. + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @return The list of files/directories. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<PathItem> listPaths(ListPathsOptions options, Duration timeout) { + ListPathsOptions finalOptions = options == null ? new ListPathsOptions() : options; + Integer maxResults = finalOptions.getMaxResults(); + boolean recursive = finalOptions.isRecursive(); + boolean upn = finalOptions.isUserPrincipalNameReturned(); + String beginFrom = finalOptions.getStartFrom(); + BiFunction<String, Integer, PagedResponse<PathItem>> retriever = (marker, pageSize) -> { Callable<ResponseBase<FileSystemsListPathsHeaders, PathList>> operation = () -> this.fileSystemDataLakeStorage.getFileSystems() .listPathsWithResponse(recursive, null, null, marker, getDirectoryPath(), - pageSize == null ? maxResults : pageSize, userPrincipleNameReturned, Context.NONE); + pageSize == null ? maxResults : pageSize, upn, beginFrom, Context.NONE); ResponseBase<FileSystemsListPathsHeaders, PathList> response = StorageImplUtils.sendRequest(operation, timeout, DataLakeStorageException.class); diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemAsyncClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemAsyncClient.java index 716618f9011b..d57b4515ab0d 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemAsyncClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemAsyncClient.java @@ -745,7 +745,8 @@ PagedFlux<PathItem> listPathsWithOptionalTimeout(ListPathsOptions options, Durat finalOptions = new ListPathsOptions().setMaxResults(pageSize) .setPath(options.getPath()) .setRecursive(options.isRecursive()) - .setUserPrincipalNameReturned(options.isUserPrincipalNameReturned()); + .setUserPrincipalNameReturned(options.isUserPrincipalNameReturned()) + .setStartFrom(options.getStartFrom()); } } else { finalOptions = options; @@ -768,7 +769,7 @@ private Mono<ResponseBase<FileSystemsListPathsHeaders, PathList>> listPathsSegme return StorageImplUtils.applyOptionalTimeout(this.azureDataLakeStorage.getFileSystems() .listPathsWithResponseAsync(options.isRecursive(), null, null, marker, options.getPath(), - options.getMaxResults(), options.isUserPrincipalNameReturned(), Context.NONE), + options.getMaxResults(), options.isUserPrincipalNameReturned(), options.getStartFrom(), Context.NONE), timeout); } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemClient.java index 1aeeaa0c560a..19fea2e7b5e8 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemClient.java @@ -714,12 +714,13 @@ public PagedIterable<PathItem> listPaths(ListPathsOptions options, Duration time boolean recursive = finalOptions.isRecursive(); boolean upn = finalOptions.isUserPrincipalNameReturned(); String path = finalOptions.getPath(); + String beginFrom = finalOptions.getStartFrom(); BiFunction<String, Integer, PagedResponse<PathItem>> pageRetriever = (continuation, pageSize) -> { Callable<ResponseBase<FileSystemsListPathsHeaders, PathList>> operation = () -> this.azureDataLakeStorage.getFileSystems() .listPathsWithResponse(recursive, null, null, continuation, path, - pageSize == null ? maxResults : pageSize, upn, Context.NONE); + pageSize == null ? maxResults : pageSize, upn, beginFrom, Context.NONE); ResponseBase<FileSystemsListPathsHeaders, PathList> response = StorageImplUtils.sendRequest(operation, timeout, DataLakeStorageException.class); diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceVersion.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceVersion.java index d6b536225b5e..c11bcac8befa 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceVersion.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceVersion.java @@ -147,7 +147,12 @@ public enum DataLakeServiceVersion implements ServiceVersion { /** * Service version {@code 2025-11-05}. */ - V2025_11_05("2025-11-05"); + V2025_11_05("2025-11-05"), + + /** + * Service version {@code 2026-02-06}. + */ + V2026_02_06("2026-02-06"); private final String version; @@ -169,6 +174,6 @@ public String getVersion() { * @return the latest {@link DataLakeServiceVersion} */ public static DataLakeServiceVersion getLatest() { - return V2025_11_05; + return V2026_02_06; } } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/FileSystemsImpl.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/FileSystemsImpl.java index f77b19732ade..a26c41972a9c 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/FileSystemsImpl.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/FileSystemsImpl.java @@ -242,7 +242,7 @@ Mono<ResponseBase<FileSystemsListPathsHeaders, PathList>> listPaths(@HostParam(" @HeaderParam("x-ms-version") String version, @QueryParam("continuation") String continuation, @QueryParam("directory") String path, @QueryParam("recursive") boolean recursive, @QueryParam("maxResults") Integer maxResults, @QueryParam("upn") Boolean upn, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("beginFrom") String beginFrom, @HeaderParam("Accept") String accept, Context context); @Get("/{filesystem}") @ExpectedResponses({ 200 }) @@ -253,7 +253,7 @@ Mono<Response<PathList>> listPathsNoCustomHeaders(@HostParam("url") String url, @HeaderParam("x-ms-version") String version, @QueryParam("continuation") String continuation, @QueryParam("directory") String path, @QueryParam("recursive") boolean recursive, @QueryParam("maxResults") Integer maxResults, @QueryParam("upn") Boolean upn, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("beginFrom") String beginFrom, @HeaderParam("Accept") String accept, Context context); @Get("/{filesystem}") @ExpectedResponses({ 200 }) @@ -264,7 +264,7 @@ ResponseBase<FileSystemsListPathsHeaders, PathList> listPathsSync(@HostParam("ur @HeaderParam("x-ms-version") String version, @QueryParam("continuation") String continuation, @QueryParam("directory") String path, @QueryParam("recursive") boolean recursive, @QueryParam("maxResults") Integer maxResults, @QueryParam("upn") Boolean upn, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("beginFrom") String beginFrom, @HeaderParam("Accept") String accept, Context context); @Get("/{filesystem}") @ExpectedResponses({ 200 }) @@ -275,7 +275,7 @@ Response<PathList> listPathsNoCustomHeadersSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String version, @QueryParam("continuation") String continuation, @QueryParam("directory") String path, @QueryParam("recursive") boolean recursive, @QueryParam("maxResults") Integer maxResults, @QueryParam("upn") Boolean upn, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("beginFrom") String beginFrom, @HeaderParam("Accept") String accept, Context context); @Get("/{filesystem}") @ExpectedResponses({ 200 }) @@ -1562,6 +1562,11 @@ public Response<Void> deleteNoCustomHeadersWithResponse(String requestId, Intege * Azure Active Directory Object IDs to User Principal Names. If "false", the values will be returned as Azure * Active Directory Object IDs. The default value is false. Note that group and application Object IDs are not * translated because they do not have unique friendly names. + * @param beginFrom Optional. A relative path within the specified directory where the listing will start from. For + * example, a recursive listing under directory folder1/folder2 with beginFrom as folder3/readmefile.txt will start + * listing from folder1/folder2/folder3/readmefile.txt. Please note that, multiple entity levels are supported for + * recursive listing. Non-recursive listing supports only one entity level. An error will appear if multiple entity + * levels are specified for non-recursive listing. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DataLakeStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1569,10 +1574,11 @@ public Response<Void> deleteNoCustomHeadersWithResponse(String requestId, Intege */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono<ResponseBase<FileSystemsListPathsHeaders, PathList>> listPathsWithResponseAsync(boolean recursive, - String requestId, Integer timeout, String continuation, String path, Integer maxResults, Boolean upn) { + String requestId, Integer timeout, String continuation, String path, Integer maxResults, Boolean upn, + String beginFrom) { return FluxUtil .withContext(context -> listPathsWithResponseAsync(recursive, requestId, timeout, continuation, path, - maxResults, upn, context)) + maxResults, upn, beginFrom, context)) .onErrorMap(DataLakeStorageExceptionInternal.class, ModelHelper::mapToDataLakeStorageException); } @@ -1600,6 +1606,11 @@ public Mono<ResponseBase<FileSystemsListPathsHeaders, PathList>> listPathsWithRe * Azure Active Directory Object IDs to User Principal Names. If "false", the values will be returned as Azure * Active Directory Object IDs. The default value is false. Note that group and application Object IDs are not * translated because they do not have unique friendly names. + * @param beginFrom Optional. A relative path within the specified directory where the listing will start from. For + * example, a recursive listing under directory folder1/folder2 with beginFrom as folder3/readmefile.txt will start + * listing from folder1/folder2/folder3/readmefile.txt. Please note that, multiple entity levels are supported for + * recursive listing. Non-recursive listing supports only one entity level. An error will appear if multiple entity + * levels are specified for non-recursive listing. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DataLakeStorageExceptionInternal thrown if the request is rejected by server. @@ -1609,11 +1620,11 @@ public Mono<ResponseBase<FileSystemsListPathsHeaders, PathList>> listPathsWithRe @ServiceMethod(returns = ReturnType.SINGLE) public Mono<ResponseBase<FileSystemsListPathsHeaders, PathList>> listPathsWithResponseAsync(boolean recursive, String requestId, Integer timeout, String continuation, String path, Integer maxResults, Boolean upn, - Context context) { + String beginFrom, Context context) { final String accept = "application/json"; return service .listPaths(this.client.getUrl(), this.client.getFileSystem(), this.client.getResource(), requestId, timeout, - this.client.getVersion(), continuation, path, recursive, maxResults, upn, accept, context) + this.client.getVersion(), continuation, path, recursive, maxResults, upn, beginFrom, accept, context) .onErrorMap(DataLakeStorageExceptionInternal.class, ModelHelper::mapToDataLakeStorageException); } @@ -1641,6 +1652,11 @@ public Mono<ResponseBase<FileSystemsListPathsHeaders, PathList>> listPathsWithRe * Azure Active Directory Object IDs to User Principal Names. If "false", the values will be returned as Azure * Active Directory Object IDs. The default value is false. Note that group and application Object IDs are not * translated because they do not have unique friendly names. + * @param beginFrom Optional. A relative path within the specified directory where the listing will start from. For + * example, a recursive listing under directory folder1/folder2 with beginFrom as folder3/readmefile.txt will start + * listing from folder1/folder2/folder3/readmefile.txt. Please note that, multiple entity levels are supported for + * recursive listing. Non-recursive listing supports only one entity level. An error will appear if multiple entity + * levels are specified for non-recursive listing. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DataLakeStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1648,8 +1664,8 @@ public Mono<ResponseBase<FileSystemsListPathsHeaders, PathList>> listPathsWithRe */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono<PathList> listPathsAsync(boolean recursive, String requestId, Integer timeout, String continuation, - String path, Integer maxResults, Boolean upn) { - return listPathsWithResponseAsync(recursive, requestId, timeout, continuation, path, maxResults, upn) + String path, Integer maxResults, Boolean upn, String beginFrom) { + return listPathsWithResponseAsync(recursive, requestId, timeout, continuation, path, maxResults, upn, beginFrom) .onErrorMap(DataLakeStorageExceptionInternal.class, ModelHelper::mapToDataLakeStorageException) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1678,6 +1694,11 @@ public Mono<PathList> listPathsAsync(boolean recursive, String requestId, Intege * Azure Active Directory Object IDs to User Principal Names. If "false", the values will be returned as Azure * Active Directory Object IDs. The default value is false. Note that group and application Object IDs are not * translated because they do not have unique friendly names. + * @param beginFrom Optional. A relative path within the specified directory where the listing will start from. For + * example, a recursive listing under directory folder1/folder2 with beginFrom as folder3/readmefile.txt will start + * listing from folder1/folder2/folder3/readmefile.txt. Please note that, multiple entity levels are supported for + * recursive listing. Non-recursive listing supports only one entity level. An error will appear if multiple entity + * levels are specified for non-recursive listing. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DataLakeStorageExceptionInternal thrown if the request is rejected by server. @@ -1686,10 +1707,10 @@ public Mono<PathList> listPathsAsync(boolean recursive, String requestId, Intege */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono<PathList> listPathsAsync(boolean recursive, String requestId, Integer timeout, String continuation, - String path, Integer maxResults, Boolean upn, Context context) { - return listPathsWithResponseAsync(recursive, requestId, timeout, continuation, path, maxResults, upn, context) - .onErrorMap(DataLakeStorageExceptionInternal.class, ModelHelper::mapToDataLakeStorageException) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + String path, Integer maxResults, Boolean upn, String beginFrom, Context context) { + return listPathsWithResponseAsync(recursive, requestId, timeout, continuation, path, maxResults, upn, beginFrom, + context).onErrorMap(DataLakeStorageExceptionInternal.class, ModelHelper::mapToDataLakeStorageException) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1716,6 +1737,11 @@ public Mono<PathList> listPathsAsync(boolean recursive, String requestId, Intege * Azure Active Directory Object IDs to User Principal Names. If "false", the values will be returned as Azure * Active Directory Object IDs. The default value is false. Note that group and application Object IDs are not * translated because they do not have unique friendly names. + * @param beginFrom Optional. A relative path within the specified directory where the listing will start from. For + * example, a recursive listing under directory folder1/folder2 with beginFrom as folder3/readmefile.txt will start + * listing from folder1/folder2/folder3/readmefile.txt. Please note that, multiple entity levels are supported for + * recursive listing. Non-recursive listing supports only one entity level. An error will appear if multiple entity + * levels are specified for non-recursive listing. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DataLakeStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1723,10 +1749,10 @@ public Mono<PathList> listPathsAsync(boolean recursive, String requestId, Intege */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<PathList>> listPathsNoCustomHeadersWithResponseAsync(boolean recursive, String requestId, - Integer timeout, String continuation, String path, Integer maxResults, Boolean upn) { + Integer timeout, String continuation, String path, Integer maxResults, Boolean upn, String beginFrom) { return FluxUtil .withContext(context -> listPathsNoCustomHeadersWithResponseAsync(recursive, requestId, timeout, - continuation, path, maxResults, upn, context)) + continuation, path, maxResults, upn, beginFrom, context)) .onErrorMap(DataLakeStorageExceptionInternal.class, ModelHelper::mapToDataLakeStorageException); } @@ -1754,6 +1780,11 @@ public Mono<Response<PathList>> listPathsNoCustomHeadersWithResponseAsync(boolea * Azure Active Directory Object IDs to User Principal Names. If "false", the values will be returned as Azure * Active Directory Object IDs. The default value is false. Note that group and application Object IDs are not * translated because they do not have unique friendly names. + * @param beginFrom Optional. A relative path within the specified directory where the listing will start from. For + * example, a recursive listing under directory folder1/folder2 with beginFrom as folder3/readmefile.txt will start + * listing from folder1/folder2/folder3/readmefile.txt. Please note that, multiple entity levels are supported for + * recursive listing. Non-recursive listing supports only one entity level. An error will appear if multiple entity + * levels are specified for non-recursive listing. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DataLakeStorageExceptionInternal thrown if the request is rejected by server. @@ -1762,12 +1793,13 @@ public Mono<Response<PathList>> listPathsNoCustomHeadersWithResponseAsync(boolea */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<PathList>> listPathsNoCustomHeadersWithResponseAsync(boolean recursive, String requestId, - Integer timeout, String continuation, String path, Integer maxResults, Boolean upn, Context context) { + Integer timeout, String continuation, String path, Integer maxResults, Boolean upn, String beginFrom, + Context context) { final String accept = "application/json"; return service .listPathsNoCustomHeaders(this.client.getUrl(), this.client.getFileSystem(), this.client.getResource(), - requestId, timeout, this.client.getVersion(), continuation, path, recursive, maxResults, upn, accept, - context) + requestId, timeout, this.client.getVersion(), continuation, path, recursive, maxResults, upn, beginFrom, + accept, context) .onErrorMap(DataLakeStorageExceptionInternal.class, ModelHelper::mapToDataLakeStorageException); } @@ -1795,6 +1827,11 @@ public Mono<Response<PathList>> listPathsNoCustomHeadersWithResponseAsync(boolea * Azure Active Directory Object IDs to User Principal Names. If "false", the values will be returned as Azure * Active Directory Object IDs. The default value is false. Note that group and application Object IDs are not * translated because they do not have unique friendly names. + * @param beginFrom Optional. A relative path within the specified directory where the listing will start from. For + * example, a recursive listing under directory folder1/folder2 with beginFrom as folder3/readmefile.txt will start + * listing from folder1/folder2/folder3/readmefile.txt. Please note that, multiple entity levels are supported for + * recursive listing. Non-recursive listing supports only one entity level. An error will appear if multiple entity + * levels are specified for non-recursive listing. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DataLakeStorageExceptionInternal thrown if the request is rejected by server. @@ -1804,12 +1841,12 @@ public Mono<Response<PathList>> listPathsNoCustomHeadersWithResponseAsync(boolea @ServiceMethod(returns = ReturnType.SINGLE) public ResponseBase<FileSystemsListPathsHeaders, PathList> listPathsWithResponse(boolean recursive, String requestId, Integer timeout, String continuation, String path, Integer maxResults, Boolean upn, - Context context) { + String beginFrom, Context context) { try { final String accept = "application/json"; return service.listPathsSync(this.client.getUrl(), this.client.getFileSystem(), this.client.getResource(), - requestId, timeout, this.client.getVersion(), continuation, path, recursive, maxResults, upn, accept, - context); + requestId, timeout, this.client.getVersion(), continuation, path, recursive, maxResults, upn, beginFrom, + accept, context); } catch (DataLakeStorageExceptionInternal internalException) { throw ModelHelper.mapToDataLakeStorageException(internalException); } @@ -1839,6 +1876,11 @@ public ResponseBase<FileSystemsListPathsHeaders, PathList> listPathsWithResponse * Azure Active Directory Object IDs to User Principal Names. If "false", the values will be returned as Azure * Active Directory Object IDs. The default value is false. Note that group and application Object IDs are not * translated because they do not have unique friendly names. + * @param beginFrom Optional. A relative path within the specified directory where the listing will start from. For + * example, a recursive listing under directory folder1/folder2 with beginFrom as folder3/readmefile.txt will start + * listing from folder1/folder2/folder3/readmefile.txt. Please note that, multiple entity levels are supported for + * recursive listing. Non-recursive listing supports only one entity level. An error will appear if multiple entity + * levels are specified for non-recursive listing. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DataLakeStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1846,9 +1888,9 @@ public ResponseBase<FileSystemsListPathsHeaders, PathList> listPathsWithResponse */ @ServiceMethod(returns = ReturnType.SINGLE) public PathList listPaths(boolean recursive, String requestId, Integer timeout, String continuation, String path, - Integer maxResults, Boolean upn) { + Integer maxResults, Boolean upn, String beginFrom) { try { - return listPathsWithResponse(recursive, requestId, timeout, continuation, path, maxResults, upn, + return listPathsWithResponse(recursive, requestId, timeout, continuation, path, maxResults, upn, beginFrom, Context.NONE).getValue(); } catch (DataLakeStorageExceptionInternal internalException) { throw ModelHelper.mapToDataLakeStorageException(internalException); @@ -1879,6 +1921,11 @@ public PathList listPaths(boolean recursive, String requestId, Integer timeout, * Azure Active Directory Object IDs to User Principal Names. If "false", the values will be returned as Azure * Active Directory Object IDs. The default value is false. Note that group and application Object IDs are not * translated because they do not have unique friendly names. + * @param beginFrom Optional. A relative path within the specified directory where the listing will start from. For + * example, a recursive listing under directory folder1/folder2 with beginFrom as folder3/readmefile.txt will start + * listing from folder1/folder2/folder3/readmefile.txt. Please note that, multiple entity levels are supported for + * recursive listing. Non-recursive listing supports only one entity level. An error will appear if multiple entity + * levels are specified for non-recursive listing. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DataLakeStorageExceptionInternal thrown if the request is rejected by server. @@ -1887,12 +1934,12 @@ public PathList listPaths(boolean recursive, String requestId, Integer timeout, */ @ServiceMethod(returns = ReturnType.SINGLE) public Response<PathList> listPathsNoCustomHeadersWithResponse(boolean recursive, String requestId, Integer timeout, - String continuation, String path, Integer maxResults, Boolean upn, Context context) { + String continuation, String path, Integer maxResults, Boolean upn, String beginFrom, Context context) { try { final String accept = "application/json"; return service.listPathsNoCustomHeadersSync(this.client.getUrl(), this.client.getFileSystem(), this.client.getResource(), requestId, timeout, this.client.getVersion(), continuation, path, recursive, - maxResults, upn, accept, context); + maxResults, upn, beginFrom, accept, context); } catch (DataLakeStorageExceptionInternal internalException) { throw ModelHelper.mapToDataLakeStorageException(internalException); } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/util/DataLakeSasImplUtil.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/util/DataLakeSasImplUtil.java index d75a2826d2ac..e4b75d4e50c1 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/util/DataLakeSasImplUtil.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/util/DataLakeSasImplUtil.java @@ -92,6 +92,8 @@ public class DataLakeSasImplUtil { private String encryptionScope; + private String delegatedUserObjectId; + /** * Creates a new {@link DataLakeSasImplUtil} with the specified parameters * @@ -108,7 +110,7 @@ public DataLakeSasImplUtil(DataLakeServiceSasSignatureValues sasValues, String f * @param sasValues {@link DataLakeServiceSasSignatureValues} * @param fileSystemName The file system name * @param pathName The path name - * @param isDirectory Whether or not the path points to a directory. + * @param isDirectory Whether the path points to a directory. */ public DataLakeSasImplUtil(DataLakeServiceSasSignatureValues sasValues, String fileSystemName, String pathName, boolean isDirectory) { @@ -131,6 +133,7 @@ public DataLakeSasImplUtil(DataLakeServiceSasSignatureValues sasValues, String f this.correlationId = sasValues.getCorrelationId(); this.isDirectory = isDirectory; this.encryptionScope = sasValues.getEncryptionScope(); + this.delegatedUserObjectId = sasValues.getDelegatedUserObjectId(); } /** @@ -255,6 +258,8 @@ private String encode(UserDelegationKey userDelegationKey, String signature) { this.authorizedAadObjectId); tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_AGENT_OBJECT_ID, this.unauthorizedAadObjectId); tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_CORRELATION_ID, this.correlationId); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_DELEGATED_USER_OBJECT_ID, + this.delegatedUserObjectId); } tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_RESOURCE, this.resource); @@ -455,7 +460,7 @@ public String stringToSign(final UserDelegationKey key, String canonicalName) { this.authorizedAadObjectId == null ? "" : this.authorizedAadObjectId, this.unauthorizedAadObjectId == null ? "" : this.unauthorizedAadObjectId, this.correlationId == null ? "" : this.correlationId, "", /* new schema 2025-07-05 */ - "", /* new schema 2025-07-05 */ + this.delegatedUserObjectId == null ? "" : this.delegatedUserObjectId, this.sasIpRange == null ? "" : this.sasIpRange.toString(), this.protocol == null ? "" : this.protocol.toString(), VERSION, resource, "", /* Version segment. */ this.encryptionScope == null ? "" : this.encryptionScope, diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/util/TransformUtils.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/util/TransformUtils.java index 9983b4776cd9..d6c4cd6b478d 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/util/TransformUtils.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/util/TransformUtils.java @@ -68,6 +68,8 @@ public static BlobServiceVersion toBlobServiceVersion(DataLakeServiceVersion ver return BlobServiceVersion.V2025_07_05; } else if (DataLakeServiceVersion.V2025_11_05.ordinal() == version.ordinal()) { return BlobServiceVersion.V2025_11_05; + } else if (DataLakeServiceVersion.V2026_02_06.ordinal() == version.ordinal()) { + return BlobServiceVersion.V2026_02_06; } return null; diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/ListPathsOptions.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/ListPathsOptions.java index 5766ef00ba41..63da55f0c0c4 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/ListPathsOptions.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/ListPathsOptions.java @@ -19,6 +19,7 @@ public class ListPathsOptions { private boolean recursive; private boolean userPrincipalNameReturned; private Integer maxResults; + private String startFrom; /** * Constructs an unpopulated {@link ListPathsOptions}. @@ -124,4 +125,27 @@ public ListPathsOptions setMaxResults(Integer maxResults) { this.maxResults = maxResults; return this; } + + /** + * Gets the startFrom parameter, which allows starting the listing from a specific path within the directory. + * This parameter is similar to a marker and allows continuing enumeration from a particular point. + * + * @return the beginFrom value. + */ + public String getStartFrom() { + return startFrom; + } + + /** + * Sets the startFrom parameter, which allows starting the listing from a specific path within the directory. + * This parameter is similar to a marker and allows continuing enumeration from a particular point. + * + * @param startFrom The path to begin listing from + * @return the updated ListPathsOptions object + */ + public ListPathsOptions setStartFrom(String startFrom) { + this.startFrom = startFrom; + return this; + } + } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/sas/DataLakeServiceSasSignatureValues.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/sas/DataLakeServiceSasSignatureValues.java index 5177240086e5..abca896a2f00 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/sas/DataLakeServiceSasSignatureValues.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/sas/DataLakeServiceSasSignatureValues.java @@ -44,6 +44,7 @@ public final class DataLakeServiceSasSignatureValues { private String agentObjectId; /* suoid */ private String correlationId; private String encryptionScope; + private String delegatedUserObjectId; /** * Creates an object with the specified expiry time and permissions @@ -450,4 +451,28 @@ public DataLakeServiceSasSignatureValues setEncryptionScope(String encryptionSco this.encryptionScope = encryptionScope; return this; } + + /** + * Optional. Beginning in version 2025-07-05, this value specifies the Entra ID of the user that is authorized to + * use the resulting SAS URL. The resulting SAS URL must be used in conjunction with an Entra ID token that has been + * issued to the user specified in this value. + * + * @return The Entra ID of the user that is authorized to use the resulting SAS URL. + */ + public String getDelegatedUserObjectId() { + return delegatedUserObjectId; + } + + /** + * Optional. Beginning in version 2025-07-05, this value specifies the Entra ID of the user that is authorized to + * use the resulting SAS URL. The resulting SAS URL must be used in conjunction with an Entra ID token that has been + * issued to the user specified in this value. + * + * @param delegatedUserObjectId The Entra ID of the user that is authorized to use the resulting SAS URL. + * @return the updated DataLakeServiceSasSignatureValues object + */ + public DataLakeServiceSasSignatureValues setDelegatedUserObjectId(String delegatedUserObjectId) { + this.delegatedUserObjectId = delegatedUserObjectId; + return this; + } } diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DataLakeTestBase.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DataLakeTestBase.java index 974cbd042fcb..c7d419313413 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DataLakeTestBase.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DataLakeTestBase.java @@ -762,6 +762,28 @@ public static void waitUntilPredicate(long delayMillis, int numberOfDelays, Supp } } + protected void liveTestScenarioWithRetry(Runnable runnable) { + if (!interceptorManager.isLiveMode()) { + runnable.run(); + return; + } + + int retry = 0; + + // Try up to 5 times (4 retries + 1 final attempt) + while (retry < 4) { + try { + runnable.run(); + return; // success + } catch (Exception ex) { + retry++; + sleepIfRunningAgainstService(5000); + } + } + // Final attempt (5th try) + runnable.run(); + } + protected static void validatePropsSet(DataLakeServiceProperties sent, DataLakeServiceProperties received) { validatePropsSet(sent, received, true); } diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DirectoryApiTests.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DirectoryApiTests.java index 36a91b899b6f..cfc0cf2602e2 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DirectoryApiTests.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DirectoryApiTests.java @@ -37,6 +37,7 @@ import com.azure.storage.file.datalake.models.DataLakeStorageException; import com.azure.storage.file.datalake.models.LeaseStateType; import com.azure.storage.file.datalake.models.LeaseStatusType; +import com.azure.storage.file.datalake.models.ListPathsOptions; import com.azure.storage.file.datalake.models.PathAccessControl; import com.azure.storage.file.datalake.models.PathAccessControlEntry; import com.azure.storage.file.datalake.models.PathHttpHeaders; @@ -3622,4 +3623,17 @@ public void directoryNameEncodingOnGetPathUrl() { String expectedName = "my%20directory"; assertTrue(directoryClient.getPathUrl().contains(expectedName)); } + + @Test + public void listPathsStartFrom() { + String dirName = generatePathName(); + DataLakeDirectoryClient dir = dataLakeFileSystemClient.createDirectory(dirName); + + setupDirectoryForListing(dir); + + ListPathsOptions options = new ListPathsOptions().setRecursive(true).setStartFrom("foo"); + List<PathItem> pathsFromFoo = dir.listPaths(options, null).stream().collect(Collectors.toList()); + + assertEquals(3, pathsFromFoo.size()); + } } diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DirectoryAsyncApiTests.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DirectoryAsyncApiTests.java index 1a119cb7b8c8..c74f0f8e550a 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DirectoryAsyncApiTests.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DirectoryAsyncApiTests.java @@ -31,6 +31,7 @@ import com.azure.storage.file.datalake.models.DataLakeStorageException; import com.azure.storage.file.datalake.models.LeaseStateType; import com.azure.storage.file.datalake.models.LeaseStatusType; +import com.azure.storage.file.datalake.models.ListPathsOptions; import com.azure.storage.file.datalake.models.PathAccessControl; import com.azure.storage.file.datalake.models.PathAccessControlEntry; import com.azure.storage.file.datalake.models.PathHttpHeaders; @@ -3981,4 +3982,16 @@ public void directoryNameEncodingOnGetPathUrl() { String expectedName = "my%20directory"; assertTrue(directoryClient.getPathUrl().contains(expectedName)); } + + @Test + public void listPathsStartFrom() { + String dirName = generatePathName(); + + ListPathsOptions options = new ListPathsOptions().setRecursive(true).setStartFrom("foo"); + + Flux<PathItem> response = dataLakeFileSystemAsyncClient.createDirectory(dirName) + .flatMapMany(dir -> setupDirectoryForListing(dir).thenMany(dir.listPaths(options, null))); + + StepVerifier.create(response.collectList()).assertNext(paths -> assertEquals(3, paths.size())).verifyComplete(); + } } diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileApiTest.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileApiTest.java index cbb120507cbd..db4f76d5ea54 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileApiTest.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileApiTest.java @@ -3192,24 +3192,6 @@ public void queryAC(OffsetDateTime modified, OffsetDateTime unmodified, String m }); } - private void liveTestScenarioWithRetry(Runnable runnable) { - if (!interceptorManager.isLiveMode()) { - runnable.run(); - return; - } - - int retry = 0; - while (retry < 5) { - try { - runnable.run(); - break; - } catch (Exception ex) { - retry++; - sleepIfRunningAgainstService(5000); - } - } - } - @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2019-12-12") @ParameterizedTest @MethodSource("invalidModifiedMatchAndLeaseIdSupplier") diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAsyncApiTests.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAsyncApiTests.java index e059ee7c0ded..369511041d21 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAsyncApiTests.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAsyncApiTests.java @@ -3903,12 +3903,15 @@ public void queryInputOutputIA(boolean input, boolean output) { FileQuerySerialization outSer = output ? ser : null; String expression = "SELECT * from BlobStorage"; - liveTestScenarioWithRetry(() -> { - StepVerifier.create(fc.queryWithResponse( - new FileQueryOptions(expression, new ByteArrayOutputStream()).setInputSerialization(inSer) - .setOutputSerialization(outSer))) - .verifyError(IllegalArgumentException.class); - }); + FileQueryOptions options + = new FileQueryOptions(expression, new ByteArrayOutputStream()).setInputSerialization(inSer) + .setOutputSerialization(outSer); + + // The IllegalArgumentException is thrown synchronously by the fc.queryWithResponse(options) method call itself, + // before StepVerifier.create() can subscribe to the Mono. StepVerifier.verifyError() is designed to verify an + // onError signal emitted by a reactive stream. It does not catch exceptions thrown during the assembly or + // creation of the stream. + assertThrows(IllegalArgumentException.class, () -> fc.queryWithResponse(options)); } @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2019-12-12") @@ -3975,19 +3978,6 @@ public void queryAC(OffsetDateTime modified, OffsetDateTime unmodified, String m }); } - private void liveTestScenarioWithRetry(Runnable runnable) { - int retry = 0; - while (retry < 5) { - try { - runnable.run(); - break; - } catch (Exception ex) { - retry++; - sleepIfLiveTesting(5000); - } - } - } - @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2019-12-12") @ParameterizedTest @MethodSource("invalidModifiedMatchAndLeaseIdSupplier") diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemApiTests.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemApiTests.java index 8e76f9861b6f..5b76412c6909 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemApiTests.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemApiTests.java @@ -2411,6 +2411,34 @@ public void fileSystemNameEncodingOnGetPathUrl() { assertTrue(directoryClient.getPathUrl().contains(expectedName)); } + @Test + public void listPathsStartFrom() { + String dirName = generatePathName(); + DataLakeDirectoryClient dir = dataLakeFileSystemClient.createDirectory(dirName); + + setupDirectoryForListing(dir); + ListPathsOptions options = new ListPathsOptions().setRecursive(true).setStartFrom("foo"); + + List<PathItem> pathsFromFoo = dir.listPaths(options, null).stream().collect(Collectors.toList()); + + assertEquals(3, pathsFromFoo.size()); + } + + private void setupDirectoryForListing(DataLakeDirectoryClient client) { + // Create 3 subdirs + DataLakeDirectoryClient foo = client.createSubdirectory("foo"); + client.createSubdirectory("bar"); + DataLakeDirectoryClient baz = client.createSubdirectory("baz"); + + // Create subdirs for foo + foo.createSubdirectory("foo"); + foo.createSubdirectory("bar"); + + // Creat subdirs for baz + baz.createSubdirectory("foo").createSubdirectory("bar"); + baz.createSubdirectory("bar/foo"); + } + // @Test // public void rename() { // DataLakeFileSystemClient renamedContainer = dataLakeFileSystemClient.rename(generateFileSystemName()); diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemAsyncApiTests.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemAsyncApiTests.java index a9c9a6a12271..7b2fe9c8b7a8 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemAsyncApiTests.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemAsyncApiTests.java @@ -2584,4 +2584,25 @@ public void fileSystemNameEncodingOnGetPathUrl() { DataLakeDirectoryAsyncClient directoryClient = fileSystemClient.getDirectoryAsyncClient(generatePathName()); assertTrue(directoryClient.getPathUrl().contains(expectedName)); } + + @Test + public void listPathsStartFrom() { + String dirName = generatePathName(); + DataLakeDirectoryAsyncClient dir = dataLakeFileSystemAsyncClient.getDirectoryAsyncClient(dirName); + + StepVerifier.create(dir.create() + .then(setupDirectoryForListing(dir)) // properly chained + .thenMany(dir.listPaths(new ListPathsOptions().setRecursive(true).setStartFrom("foo"), null)) + .collectList()).assertNext(pathsNames -> assertEquals(3, pathsNames.size())).verifyComplete(); + } + + private Mono<DataLakeDirectoryAsyncClient> setupDirectoryForListing(DataLakeDirectoryAsyncClient client) { + return client.createSubdirectory("foo") + .flatMap(foo -> foo.createSubdirectory("foo").then(foo.createSubdirectory("bar"))) + .then(client.createSubdirectory("bar")) + .then(client.createSubdirectory("baz")) + .flatMap(baz -> baz.createSubdirectory("foo") + .flatMap(foo2 -> foo2.createSubdirectory("bar")) + .then(baz.createSubdirectory("bar/foo"))); + } } diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/SasAsyncTests.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/SasAsyncTests.java index a77aa84593cf..198c18abdc87 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/SasAsyncTests.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/SasAsyncTests.java @@ -3,6 +3,7 @@ package com.azure.storage.file.datalake; import com.azure.core.credential.AzureSasCredential; +import com.azure.core.credential.TokenCredential; import com.azure.core.util.FluxUtil; import com.azure.storage.blob.specialized.BlockBlobAsyncClient; import com.azure.storage.common.implementation.Constants; @@ -11,6 +12,8 @@ import com.azure.storage.common.sas.AccountSasService; import com.azure.storage.common.sas.AccountSasSignatureValues; import com.azure.storage.common.sas.SasProtocol; +import com.azure.storage.common.test.shared.StorageCommonTestUtils; +import com.azure.storage.common.test.shared.extensions.LiveOnly; import com.azure.storage.common.test.shared.extensions.RequiredServiceVersion; import com.azure.storage.file.datalake.models.AccessControlType; import com.azure.storage.file.datalake.models.DataLakeAccessPolicy; @@ -36,6 +39,7 @@ import java.time.OffsetDateTime; import java.util.Collections; +import static com.azure.storage.common.test.shared.StorageCommonTestUtils.getOidFromToken; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -106,6 +110,66 @@ public void fileSasPermission() { .verifyComplete(); } + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2026-02-06") + public void fileDatalakeSasUserDelegationDelegatedObjectId() { + liveTestScenarioWithRetry(() -> { + PathSasPermission permissions = new PathSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + DataLakeServiceSasSignatureValues sasValues + = new DataLakeServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = sasClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. + DataLakeFileAsyncClient client = instrument(new DataLakePathClientBuilder().endpoint(sasClient.getFileUrl()) + .sasToken(sas) + .credential(tokenCredential)).buildFileAsyncClient(); + + StepVerifier.create(client.getPropertiesWithResponse(null)) + .assertNext(r -> assertEquals(200, r.getStatusCode())) + .verifyComplete(); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2026-02-06") + public void fileDatalakeSasUserDelegationDelegatedObjectIdFail() { + liveTestScenarioWithRetry(() -> { + PathSasPermission permissions = new PathSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + DataLakeServiceSasSignatureValues sasValues + = new DataLakeServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = sasClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. Token credential is not provided here, so the request should fail. + DataLakeFileAsyncClient client + = instrument(new DataLakePathClientBuilder().endpoint(sasClient.getFileUrl()).sasToken(sas)) + .buildFileAsyncClient(); + + StepVerifier.create(client.getPropertiesWithResponse(null)).verifyErrorSatisfies(r -> { + DataLakeStorageException e = Assertions.assertInstanceOf(DataLakeStorageException.class, r); + assertEquals(403, e.getStatusCode()); + assertEquals("AuthenticationFailed", e.getErrorCode()); + }); + }); + } + @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2020-02-10") @Test public void directorySasPermission() { @@ -157,9 +221,73 @@ public void directorySasPermissionFail() { StepVerifier.create(response).verifyError(DataLakeStorageException.class); } + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2026-02-06") + public void directorySasUserDelegationDelegatedObjectId() { + liveTestScenarioWithRetry(() -> { + DataLakeDirectoryAsyncClient directoryClient + = getDirectoryAsyncClient(getDataLakeCredential(), getFileSystemUrl(), pathName); + PathSasPermission permissions = new PathSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + DataLakeServiceSasSignatureValues sasValues + = new DataLakeServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = directoryClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. + DataLakeDirectoryAsyncClient client + = instrument(new DataLakePathClientBuilder().endpoint(directoryClient.getDirectoryUrl()) + .sasToken(sas) + .credential(tokenCredential)).buildDirectoryAsyncClient(); + + StepVerifier.create(client.getPropertiesWithResponse(null)) + .assertNext(r -> assertEquals(200, r.getStatusCode())) + .verifyComplete(); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2026-02-06") + public void directorySasUserDelegationDelegatedObjectIdFail() { + liveTestScenarioWithRetry(() -> { + DataLakeDirectoryAsyncClient directoryClient + = getDirectoryAsyncClient(getDataLakeCredential(), getFileSystemUrl(), pathName); + PathSasPermission permissions = new PathSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + DataLakeServiceSasSignatureValues sasValues + = new DataLakeServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = directoryClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. Token credential is not provided here, so the request should fail. + DataLakeDirectoryAsyncClient client + = instrument(new DataLakePathClientBuilder().endpoint(directoryClient.getDirectoryUrl()).sasToken(sas)) + .buildDirectoryAsyncClient(); + + StepVerifier.create(client.getPropertiesWithResponse(null)).verifyErrorSatisfies(r -> { + DataLakeStorageException e = Assertions.assertInstanceOf(DataLakeStorageException.class, r); + assertEquals(403, e.getStatusCode()); + assertEquals("AuthenticationFailed", e.getErrorCode()); + }); + }); + } + @Test public void fileSystemSasIdentifier() { - //todo isbr DataLakeSignedIdentifier identifier = new DataLakeSignedIdentifier().setId("0000") .setAccessPolicy( new DataLakeAccessPolicy().setPermissions("racwdl").setExpiresOn(testResourceNamer.now().plusDays(1))); @@ -463,6 +591,65 @@ public void fileSystemUserDelegationCorrelationIdError() { assertTrue(sasWithPermissions.contains("scid=" + cid)); } + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2026-02-06") + public void fileSystemSasUserDelegationDelegatedObjectId() { + liveTestScenarioWithRetry(() -> { + FileSystemSasPermission permissions = new FileSystemSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + DataLakeServiceSasSignatureValues sasValues + = new DataLakeServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = dataLakeFileSystemClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. + DataLakeFileSystemAsyncClient client + = instrument(new DataLakeFileSystemClientBuilder().endpoint(dataLakeFileSystemClient.getFileSystemUrl()) + .sasToken(sas) + .credential(tokenCredential)).buildAsyncClient(); + + StepVerifier.create(client.listPaths().collectList()).expectNextCount(1).verifyComplete(); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2026-02-06") + public void fileSystemSasUserDelegationDelegatedObjectIdFail() { + liveTestScenarioWithRetry(() -> { + FileSystemSasPermission permissions = new FileSystemSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + DataLakeServiceSasSignatureValues sasValues + = new DataLakeServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = dataLakeFileSystemClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. Token credential is not provided here, so the request should fail. + DataLakeFileSystemAsyncClient client + = instrument(new DataLakeFileSystemClientBuilder().endpoint(dataLakeFileSystemClient.getFileSystemUrl()) + .sasToken(sas)).buildAsyncClient(); + + StepVerifier.create(client.listPaths().collectList()).verifyErrorSatisfies(r -> { + DataLakeStorageException e = Assertions.assertInstanceOf(DataLakeStorageException.class, r); + assertEquals(403, e.getStatusCode()); + assertEquals("AuthenticationFailed", e.getErrorCode()); + }); + }); + } + @SuppressWarnings("deprecation") @Test public void accountSasFileRead() { diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/SasTests.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/SasTests.java index 9da14e3fe8da..9e6979070c7c 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/SasTests.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/SasTests.java @@ -3,6 +3,8 @@ package com.azure.storage.file.datalake; import com.azure.core.credential.AzureSasCredential; +import com.azure.core.credential.TokenCredential; +import com.azure.core.util.Context; import com.azure.storage.blob.specialized.BlockBlobClient; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.sas.AccountSasPermission; @@ -11,6 +13,8 @@ import com.azure.storage.common.sas.AccountSasSignatureValues; import com.azure.storage.common.sas.SasIpRange; import com.azure.storage.common.sas.SasProtocol; +import com.azure.storage.common.test.shared.StorageCommonTestUtils; +import com.azure.storage.common.test.shared.extensions.LiveOnly; import com.azure.storage.common.test.shared.extensions.RequiredServiceVersion; import com.azure.storage.file.datalake.implementation.util.DataLakeSasImplUtil; import com.azure.storage.file.datalake.models.AccessControlType; @@ -41,6 +45,7 @@ import java.util.Iterator; import java.util.stream.Stream; +import static com.azure.storage.common.test.shared.StorageCommonTestUtils.getOidFromToken; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -117,6 +122,63 @@ public void fileSasPermission() { assertEquals(DATA.getDefaultText(), os.toString()); } + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2026-02-06") + public void fileDatalakeSasUserDelegationDelegatedObjectId() { + liveTestScenarioWithRetry(() -> { + PathSasPermission permissions = new PathSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + DataLakeServiceSasSignatureValues sasValues + = new DataLakeServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = sasClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. + DataLakeFileClient client = instrument(new DataLakePathClientBuilder().endpoint(sasClient.getFileUrl()) + .sasToken(sas) + .credential(tokenCredential)).buildFileClient(); + + assertDoesNotThrow(() -> client.getPropertiesWithResponse(null, null, Context.NONE)); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2026-02-06") + public void fileDatalakeSasUserDelegationDelegatedObjectIdFail() { + liveTestScenarioWithRetry(() -> { + PathSasPermission permissions = new PathSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + DataLakeServiceSasSignatureValues sasValues + = new DataLakeServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = sasClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. Token credential is not provided here, so the request should fail. + DataLakeFileClient client + = instrument(new DataLakePathClientBuilder().endpoint(sasClient.getFileUrl()).sasToken(sas)) + .buildFileClient(); + + DataLakeStorageException e = assertThrows(DataLakeStorageException.class, + () -> client.getPropertiesWithResponse(null, null, Context.NONE)); + assertEquals(403, e.getStatusCode()); + assertEquals("AuthenticationFailed", e.getErrorCode()); + }); + } + @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2020-02-10") @Test public void directorySasPermission() { @@ -159,6 +221,68 @@ public void directorySasPermissionFail() { () -> getDirectoryClient(sas, getFileSystemUrl(), pathName).getProperties()); } + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2026-02-06") + public void directorySasUserDelegationDelegatedObjectId() { + liveTestScenarioWithRetry(() -> { + DataLakeDirectoryClient directoryClient + = getDirectoryClient(getDataLakeCredential(), getFileSystemUrl(), pathName); + PathSasPermission permissions = new PathSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + DataLakeServiceSasSignatureValues sasValues + = new DataLakeServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = directoryClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. + DataLakeDirectoryClient client + = instrument(new DataLakePathClientBuilder().endpoint(directoryClient.getDirectoryUrl()) + .sasToken(sas) + .credential(tokenCredential)).buildDirectoryClient(); + + assertDoesNotThrow(() -> client.getPropertiesWithResponse(null, null, Context.NONE)); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2026-02-06") + public void directorySasUserDelegationDelegatedObjectIdFail() { + liveTestScenarioWithRetry(() -> { + DataLakeDirectoryClient directoryClient + = getDirectoryClient(getDataLakeCredential(), getFileSystemUrl(), pathName); + PathSasPermission permissions = new PathSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + DataLakeServiceSasSignatureValues sasValues + = new DataLakeServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = directoryClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. Token credential is not provided here, so the request should fail. + DataLakeDirectoryClient client + = instrument(new DataLakePathClientBuilder().endpoint(directoryClient.getDirectoryUrl()).sasToken(sas)) + .buildDirectoryClient(); + + DataLakeStorageException e = assertThrows(DataLakeStorageException.class, + () -> client.getPropertiesWithResponse(null, null, Context.NONE)); + assertEquals(403, e.getStatusCode()); + assertEquals("AuthenticationFailed", e.getErrorCode()); + }); + } + @Test public void fileSystemSasIdentifier() { DataLakeSignedIdentifier identifier = new DataLakeSignedIdentifier().setId("0000") @@ -453,6 +577,64 @@ public void fileSystemUserDelegationCorrelationIdError() { assertTrue(sasWithPermissions.contains("scid=" + cid)); } + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2026-02-06") + public void fileSystemSasUserDelegationDelegatedObjectId() { + liveTestScenarioWithRetry(() -> { + FileSystemSasPermission permissions = new FileSystemSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + DataLakeServiceSasSignatureValues sasValues + = new DataLakeServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = dataLakeFileSystemClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. + DataLakeFileSystemClient client + = instrument(new DataLakeFileSystemClientBuilder().endpoint(dataLakeFileSystemClient.getFileSystemUrl()) + .sasToken(sas) + .credential(tokenCredential)).buildClient(); + + assertDoesNotThrow(() -> client.listPaths().iterator().hasNext()); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2026-02-06") + public void fileSystemSasUserDelegationDelegatedObjectIdFail() { + liveTestScenarioWithRetry(() -> { + FileSystemSasPermission permissions = new FileSystemSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + DataLakeServiceSasSignatureValues sasValues + = new DataLakeServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = dataLakeFileSystemClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. Token credential is not provided here, so the request should fail. + DataLakeFileSystemClient client + = instrument(new DataLakeFileSystemClientBuilder().endpoint(dataLakeFileSystemClient.getFileSystemUrl()) + .sasToken(sas)).buildClient(); + + DataLakeStorageException e + = assertThrows(DataLakeStorageException.class, () -> client.listPaths().iterator().hasNext()); + assertEquals(403, e.getStatusCode()); + assertEquals("AuthenticationFailed", e.getErrorCode()); + }); + } + @SuppressWarnings("deprecation") @Test public void accountSasFileRead() { diff --git a/sdk/storage/azure-storage-file-datalake/swagger/README.md b/sdk/storage/azure-storage-file-datalake/swagger/README.md index a1e469c17b74..6f9871d69ce2 100644 --- a/sdk/storage/azure-storage-file-datalake/swagger/README.md +++ b/sdk/storage/azure-storage-file-datalake/swagger/README.md @@ -16,7 +16,7 @@ autorest ### Code generation settings ``` yaml use: '@autorest/java@4.1.52' -input-file: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/storage/data-plane/Azure.Storage.Files.DataLake/stable/2025-05-05/DataLakeStorage.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/refs/heads/main/specification/storage/data-plane/Azure.Storage.Files.DataLake/stable/2026-02-06/DataLakeStorage.json java: true output-folder: ../ namespace: com.azure.storage.file.datalake diff --git a/sdk/storage/azure-storage-file-share/CHANGELOG.md b/sdk/storage/azure-storage-file-share/CHANGELOG.md index 5ba436a2382d..8c8df94775c7 100644 --- a/sdk/storage/azure-storage-file-share/CHANGELOG.md +++ b/sdk/storage/azure-storage-file-share/CHANGELOG.md @@ -3,6 +3,9 @@ ## 12.29.0-beta.1 (Unreleased) ### Features Added +- Added support for User Delegation SAS. +- Added support for Principal-Bound Identity User Delegation SAS. +- Added support for the `ShareServiceProperties.Protocol.SMB.EncryptionInTransit` parameter on `ShareServiceClient.setProperties()` APIs. ### Breaking Changes diff --git a/sdk/storage/azure-storage-file-share/assets.json b/sdk/storage/azure-storage-file-share/assets.json index 73d939de2a4c..532bacc95059 100644 --- a/sdk/storage/azure-storage-file-share/assets.json +++ b/sdk/storage/azure-storage-file-share/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-file-share", - "Tag": "java/storage/azure-storage-file-share_bf4bf2f437" + "Tag": "java/storage/azure-storage-file-share_62019cc18e" } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareAsyncClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareAsyncClient.java index 8304dad29a8b..4f9c29bc7d9c 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareAsyncClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareAsyncClient.java @@ -34,6 +34,7 @@ import com.azure.storage.file.share.models.ShareSnapshotInfo; import com.azure.storage.file.share.models.ShareStatistics; import com.azure.storage.file.share.models.ShareStorageException; +import com.azure.storage.file.share.models.UserDelegationKey; import com.azure.storage.file.share.options.ShareCreateOptions; import com.azure.storage.file.share.options.ShareDeleteOptions; import com.azure.storage.file.share.options.ShareDirectoryCreateOptions; @@ -370,7 +371,7 @@ Mono<Response<ShareInfo>> createWithResponse(ShareCreateOptions options, Context options.getAccessTier(), enabledProtocol, options.getRootSquash(), options.isSnapshotVirtualDirectoryAccessEnabled(), options.isPaidBurstingEnabled(), options.getPaidBurstingMaxBandwidthMibps(), options.getPaidBurstingMaxIops(), - options.getProvisionedMaxIops(), options.getProvisionedMaxBandwidthMibps(), context) + options.getProvisionedMaxIops(), options.getProvisionedMaxBandwidthMibps(), null, context) .map(ModelHelper::mapToShareInfoResponse); } @@ -939,7 +940,7 @@ Mono<Response<ShareInfo>> setPropertiesWithResponse(ShareSetPropertiesOptions op options.getAccessTier(), requestConditions.getLeaseId(), options.getRootSquash(), options.isSnapshotVirtualDirectoryAccessEnabled(), options.isPaidBurstingEnabled(), options.getPaidBurstingMaxBandwidthMibps(), options.getPaidBurstingMaxIops(), - options.getProvisionedMaxIops(), options.getProvisionedMaxBandwidthMibps(), context) + options.getProvisionedMaxIops(), options.getProvisionedMaxBandwidthMibps(), null, context) .map(ModelHelper::mapToShareInfoResponse); } @@ -1087,7 +1088,7 @@ Mono<Response<ShareInfo>> setMetadataWithResponse(ShareSetMetadataOptions option * <p>For more information, see the * <a href="https://docs.microsoft.com/rest/api/storageservices/get-share-acl">Azure Docs</a>.</p> * - * @return The stored access policies specified on the queue. + * @return The stored access policies specified on the share. * @throws ShareStorageException If the share doesn't exist */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -1116,7 +1117,7 @@ public PagedFlux<ShareSignedIdentifier> getAccessPolicy() { * <a href="https://docs.microsoft.com/rest/api/storageservices/get-share-acl">Azure Docs</a>.</p> * * @param options {@link ShareGetAccessPolicyOptions} - * @return The stored access policies specified on the queue. + * @return The stored access policies specified on the share. * @throws ShareStorageException If the share doesn't exist */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -1160,7 +1161,7 @@ public PagedFlux<ShareSignedIdentifier> getAccessPolicy(ShareGetAccessPolicyOpti * <p>For more information, see the * <a href="https://docs.microsoft.com/rest/api/storageservices/set-share-acl">Azure Docs</a>.</p> * - * @param permissions Access policies to set on the queue + * @param permissions Access policies to set on the share. * @return The {@link ShareInfo information about the share} * @throws ShareStorageException If the share doesn't exist, a stored access policy doesn't have all fields filled * out, or the share will have more than five policies. @@ -1193,7 +1194,7 @@ public Mono<ShareInfo> setAccessPolicy(List<ShareSignedIdentifier> permissions) * <p>For more information, see the * <a href="https://docs.microsoft.com/rest/api/storageservices/set-share-acl">Azure Docs</a>.</p> * - * @param permissions Access policies to set on the queue + * @param permissions Access policies to set on the share. * @return A response containing the {@link ShareInfo information about the share} with headers and response status * code * @throws ShareStorageException If the share doesn't exist, a stored access policy doesn't have all fields filled @@ -1691,7 +1692,7 @@ Mono<Response<ShareFileAsyncClient>> createFileWithResponse(String fileName, lon ShareFileAsyncClient shareFileAsyncClient = getFileClient(fileName); return shareFileAsyncClient .createWithResponse(maxSize, httpHeaders, smbProperties, filePermission, null, null, metadata, - requestConditions, context) + requestConditions, null, null, context) .map(response -> new SimpleResponse<>(response, shareFileAsyncClient)); } @@ -2313,7 +2314,7 @@ public HttpPipeline getHttpPipeline() { } /** - * Generates a service sas for the queue using the specified {@link ShareServiceSasSignatureValues} + * Generates a service sas for the share using the specified {@link ShareServiceSasSignatureValues} * <p>Note : The client must be authenticated via {@link StorageSharedKeyCredential} * <p>See {@link ShareServiceSasSignatureValues} for more information on how to construct a service SAS.</p> * @@ -2340,7 +2341,7 @@ public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatur } /** - * Generates a service sas for the queue using the specified {@link ShareServiceSasSignatureValues} + * Generates a service sas for the share using the specified {@link ShareServiceSasSignatureValues} * <p>Note : The client must be authenticated via {@link StorageSharedKeyCredential} * <p>See {@link ShareServiceSasSignatureValues} for more information on how to construct a service SAS.</p> * @@ -2369,7 +2370,7 @@ public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatur } /** - * Generates a service sas for the queue using the specified {@link ShareServiceSasSignatureValues} + * Generates a service sas for the share using the specified {@link ShareServiceSasSignatureValues} * <p>Note : The client must be authenticated via {@link StorageSharedKeyCredential} * <p>See {@link ShareServiceSasSignatureValues} for more information on how to construct a service SAS.</p> * @@ -2385,4 +2386,36 @@ public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatur return new ShareSasImplUtil(shareServiceSasSignatureValues, getShareName()) .generateSas(SasImplUtils.extractSharedKeyCredential(getHttpPipeline()), stringToSignHandler, context); } + + /** + * Generates a user delegation SAS for the share using the specified {@link ShareServiceSasSignatureValues}. + * <p>See {@link ShareServiceSasSignatureValues} for more information on how to construct a user delegation SAS.</p> + * + * @param shareServiceSasSignatureValues {@link ShareServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * + * @return A {@code String} representing the SAS query parameters. + */ + public String generateUserDelegationSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, + UserDelegationKey userDelegationKey) { + return generateUserDelegationSas(shareServiceSasSignatureValues, userDelegationKey, null, Context.NONE); + } + + /** + * Generates a user delegation SAS for the share using the specified {@link ShareServiceSasSignatureValues}. + * <p>See {@link ShareServiceSasSignatureValues} for more information on how to construct a user delegation SAS.</p> + * + * @param shareServiceSasSignatureValues {@link ShareServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * @param stringToSignHandler For debugging purposes only. Returns the string to sign that was used to generate the + * signature. + * @param context Additional context that is passed through the code when generating a SAS. + * + * @return A {@code String} representing the SAS query parameters. + */ + public String generateUserDelegationSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, + UserDelegationKey userDelegationKey, Consumer<String> stringToSignHandler, Context context) { + return new ShareSasImplUtil(shareServiceSasSignatureValues, getShareName()) + .generateUserDelegationSas(userDelegationKey, accountName, stringToSignHandler, context); + } } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareClient.java index a40eed26854d..5eddfa88edf7 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareClient.java @@ -44,6 +44,7 @@ import com.azure.storage.file.share.models.ShareSnapshotInfo; import com.azure.storage.file.share.models.ShareStatistics; import com.azure.storage.file.share.models.ShareStorageException; +import com.azure.storage.file.share.models.UserDelegationKey; import com.azure.storage.file.share.options.ShareCreateOptions; import com.azure.storage.file.share.options.ShareDeleteOptions; import com.azure.storage.file.share.options.ShareDirectoryCreateOptions; @@ -367,7 +368,8 @@ public Response<ShareInfo> createWithResponse(ShareCreateOptions options, Durati finalOptions.getAccessTier(), finalEnabledProtocol, finalOptions.getRootSquash(), finalOptions.isSnapshotVirtualDirectoryAccessEnabled(), finalOptions.isPaidBurstingEnabled(), finalOptions.getPaidBurstingMaxBandwidthMibps(), finalOptions.getPaidBurstingMaxIops(), - finalOptions.getProvisionedMaxIops(), finalOptions.getProvisionedMaxBandwidthMibps(), finalContext); + finalOptions.getProvisionedMaxIops(), finalOptions.getProvisionedMaxBandwidthMibps(), null, + finalContext); return ModelHelper.mapToShareInfoResponse(sendRequest(operation, timeout, ShareStorageException.class)); } @@ -897,7 +899,7 @@ public Response<ShareInfo> setPropertiesWithResponse(ShareSetPropertiesOptions o requestConditions.getLeaseId(), options.getRootSquash(), options.isSnapshotVirtualDirectoryAccessEnabled(), options.isPaidBurstingEnabled(), options.getPaidBurstingMaxBandwidthMibps(), options.getPaidBurstingMaxIops(), - options.getProvisionedMaxIops(), options.getProvisionedMaxBandwidthMibps(), finalContext); + options.getProvisionedMaxIops(), options.getProvisionedMaxBandwidthMibps(), null, finalContext); return ModelHelper.mapToShareInfoResponse(sendRequest(operation, timeout, ShareStorageException.class)); } @@ -1039,7 +1041,7 @@ public Response<ShareInfo> setMetadataWithResponse(ShareSetMetadataOptions optio * <p>For more information, see the * <a href="https://docs.microsoft.com/rest/api/storageservices/get-share-acl">Azure Docs</a>.</p> * - * @return The stored access policies specified on the queue. + * @return The stored access policies specified on the share. * @throws ShareStorageException If the share doesn't exist */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -1069,7 +1071,7 @@ public PagedIterable<ShareSignedIdentifier> getAccessPolicy() { * <a href="https://docs.microsoft.com/rest/api/storageservices/get-share-acl">Azure Docs</a>.</p> * * @param options {@link ShareGetAccessPolicyOptions} - * @return The stored access policies specified on the queue. + * @return The stored access policies specified on the share. * @throws ShareStorageException If the share doesn't exist */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -1114,7 +1116,7 @@ public PagedIterable<ShareSignedIdentifier> getAccessPolicy(ShareGetAccessPolicy * <p>For more information, see the * <a href="https://docs.microsoft.com/rest/api/storageservices/set-share-acl">Azure Docs</a>.</p> * - * @param permissions Access policies to set on the queue + * @param permissions Access policies to set on the share. * @return The {@link ShareInfo information of the share} * @throws ShareStorageException If the share doesn't exist, a stored access policy doesn't have all fields filled * out, or the share will have more than five policies. @@ -1148,7 +1150,7 @@ public ShareInfo setAccessPolicy(List<ShareSignedIdentifier> permissions) { * <p>For more information, see the * <a href="https://docs.microsoft.com/rest/api/storageservices/set-share-acl">Azure Docs</a>.</p> * - * @param permissions Access policies to set on the queue + * @param permissions Access policies to set on the share. * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout * concludes a {@link RuntimeException} will be thrown. * @param context Additional context that is passed through the Http pipeline during the service call. @@ -2191,7 +2193,7 @@ public HttpPipeline getHttpPipeline() { } /** - * Generates a service sas for the queue using the specified {@link ShareServiceSasSignatureValues} + * Generates a service sas for the share using the specified {@link ShareServiceSasSignatureValues} * <p>Note : The client must be authenticated via {@link StorageSharedKeyCredential} * <p>See {@link ShareServiceSasSignatureValues} for more information on how to construct a service SAS.</p> * @@ -2218,7 +2220,7 @@ public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatur } /** - * Generates a service sas for the queue using the specified {@link ShareServiceSasSignatureValues} + * Generates a service sas for the share using the specified {@link ShareServiceSasSignatureValues} * <p>Note : The client must be authenticated via {@link StorageSharedKeyCredential} * <p>See {@link ShareServiceSasSignatureValues} for more information on how to construct a service SAS.</p> * @@ -2247,7 +2249,7 @@ public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatur } /** - * Generates a service sas for the queue using the specified {@link ShareServiceSasSignatureValues} + * Generates a service sas for the share using the specified {@link ShareServiceSasSignatureValues} * <p>Note : The client must be authenticated via {@link StorageSharedKeyCredential} * <p>See {@link ShareServiceSasSignatureValues} for more information on how to construct a service SAS.</p> * @@ -2263,4 +2265,36 @@ public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatur return new ShareSasImplUtil(shareServiceSasSignatureValues, getShareName()) .generateSas(SasImplUtils.extractSharedKeyCredential(getHttpPipeline()), stringToSignHandler, context); } + + /** + * Generates a user delegation SAS for the share using the specified {@link ShareServiceSasSignatureValues}. + * <p>See {@link ShareServiceSasSignatureValues} for more information on how to construct a user delegation SAS.</p> + * + * @param shareServiceSasSignatureValues {@link ShareServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * + * @return A {@code String} representing the SAS query parameters. + */ + public String generateUserDelegationSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, + UserDelegationKey userDelegationKey) { + return generateUserDelegationSas(shareServiceSasSignatureValues, userDelegationKey, null, Context.NONE); + } + + /** + * Generates a user delegation SAS for the share using the specified {@link ShareServiceSasSignatureValues}. + * <p>See {@link ShareServiceSasSignatureValues} for more information on how to construct a user delegation SAS.</p> + * + * @param shareServiceSasSignatureValues {@link ShareServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * @param stringToSignHandler For debugging purposes only. Returns the string to sign that was used to generate the + * signature. + * @param context Additional context that is passed through the code when generating a SAS. + * + * @return A {@code String} representing the SAS query parameters. + */ + public String generateUserDelegationSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, + UserDelegationKey userDelegationKey, Consumer<String> stringToSignHandler, Context context) { + return new ShareSasImplUtil(shareServiceSasSignatureValues, getShareName()) + .generateUserDelegationSas(userDelegationKey, accountName, stringToSignHandler, context); + } } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryAsyncClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryAsyncClient.java index 36059230e384..0be8a4408623 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryAsyncClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryAsyncClient.java @@ -32,6 +32,7 @@ import com.azure.storage.file.share.models.CloseHandlesInfo; import com.azure.storage.file.share.models.FilePermissionFormat; import com.azure.storage.file.share.models.FilePosixProperties; +import com.azure.storage.file.share.models.FilePropertySemantics; import com.azure.storage.file.share.models.HandleItem; import com.azure.storage.file.share.models.NtfsFileAttributes; import com.azure.storage.file.share.models.ShareDirectoryInfo; @@ -305,7 +306,7 @@ public Mono<Response<ShareDirectoryInfo>> createWithResponse(FileSmbProperties s Map<String, String> metadata) { try { return withContext( - context -> createWithResponse(smbProperties, filePermission, null, null, metadata, context)); + context -> createWithResponse(smbProperties, filePermission, null, null, metadata, null, context)); } catch (RuntimeException ex) { return monoError(LOGGER, ex); } @@ -345,7 +346,7 @@ public Mono<Response<ShareDirectoryInfo>> createWithResponse(FileSmbProperties s public Mono<Response<ShareDirectoryInfo>> createWithResponse(ShareDirectoryCreateOptions options) { try { return withContext(context -> createWithResponse(options.getSmbProperties(), options.getFilePermission(), - options.getFilePermissionFormat(), options.getPosixProperties(), options.getMetadata(), context)); + options.getFilePermissionFormat(), options.getPosixProperties(), options.getMetadata(), null, context)); } catch (RuntimeException ex) { return monoError(LOGGER, ex); } @@ -353,7 +354,7 @@ public Mono<Response<ShareDirectoryInfo>> createWithResponse(ShareDirectoryCreat Mono<Response<ShareDirectoryInfo>> createWithResponse(FileSmbProperties smbProperties, String filePermission, FilePermissionFormat filePermissionFormat, FilePosixProperties posixProperties, Map<String, String> metadata, - Context context) { + FilePropertySemantics filePropertySemantics, Context context) { context = context == null ? Context.NONE : context; smbProperties = smbProperties == null ? new FileSmbProperties() : smbProperties; posixProperties = posixProperties == null ? new FilePosixProperties() : posixProperties; @@ -366,7 +367,7 @@ Mono<Response<ShareDirectoryInfo>> createWithResponse(FileSmbProperties smbPrope smbProperties.getFilePermissionKey(), smbProperties.getNtfsFileAttributesString(), smbProperties.getFileCreationTimeString(), smbProperties.getFileLastWriteTimeString(), smbProperties.getFileChangeTimeString(), posixProperties.getOwner(), posixProperties.getGroup(), - posixProperties.getFileMode(), context) + posixProperties.getFileMode(), null, context) .map(ModelHelper::mapShareDirectoryInfo); } @@ -447,7 +448,7 @@ Mono<Response<ShareDirectoryInfo>> createIfNotExistsWithResponse(ShareDirectoryC try { options = options == null ? new ShareDirectoryCreateOptions() : options; return createWithResponse(options.getSmbProperties(), options.getFilePermission(), - options.getFilePermissionFormat(), options.getPosixProperties(), options.getMetadata(), context) + options.getFilePermissionFormat(), options.getPosixProperties(), options.getMetadata(), null, context) .onErrorResume( t -> t instanceof ShareStorageException && ((ShareStorageException) t).getStatusCode() == 409, t -> { @@ -1377,7 +1378,7 @@ public Mono<Response<ShareDirectoryAsyncClient>> createSubdirectoryWithResponse( Mono<Response<ShareDirectoryAsyncClient>> createSubdirectoryWithResponse(String subdirectoryName, FileSmbProperties smbProperties, String filePermission, Map<String, String> metadata, Context context) { ShareDirectoryAsyncClient createSubClient = getSubdirectoryClient(subdirectoryName); - return createSubClient.createWithResponse(smbProperties, filePermission, null, null, metadata, context) + return createSubClient.createWithResponse(smbProperties, filePermission, null, null, metadata, null, context) .map(response -> new SimpleResponse<>(response, createSubClient)); } @@ -1764,7 +1765,7 @@ Mono<Response<ShareFileAsyncClient>> createFileWithResponse(String fileName, lon ShareFileAsyncClient shareFileAsyncClient = getFileClient(fileName); return shareFileAsyncClient .createWithResponse(maxSize, httpHeaders, smbProperties, filePermission, null, null, metadata, - requestConditions, context) + requestConditions, null, null, context) .map(response -> new SimpleResponse<>(response, shareFileAsyncClient)); } @@ -2100,7 +2101,9 @@ public HttpPipeline getHttpPipeline() { * @param shareServiceSasSignatureValues {@link ShareServiceSasSignatureValues} * * @return A {@code String} representing the SAS query parameters. + * @deprecated The service does not support Directory-level SAS. */ + @Deprecated public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues) { return generateSas(shareServiceSasSignatureValues, Context.NONE); } @@ -2129,7 +2132,9 @@ public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatur * @param context Additional context that is passed through the code when generating a SAS. * * @return A {@code String} representing the SAS query parameters. + * @deprecated The service does not support Directory-level SAS. */ + @Deprecated public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context) { return generateSas(shareServiceSasSignatureValues, null, context); } @@ -2145,7 +2150,9 @@ public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatur * @param context Additional context that is passed through the code when generating a SAS. * * @return A {@code String} representing the SAS query parameters. + * @deprecated The service does not support Directory-level SAS. */ + @Deprecated public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Consumer<String> stringToSignHandler, Context context) { return new ShareSasImplUtil(shareServiceSasSignatureValues, getShareName(), getDirectoryPath()) diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryClient.java index fc24e6e8fe6d..1a4d1895e82b 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryClient.java @@ -360,7 +360,7 @@ public Response<ShareDirectoryInfo> createWithResponse(ShareDirectoryCreateOptio smbProperties.getFilePermissionKey(), smbProperties.getNtfsFileAttributesString(), smbProperties.getFileCreationTimeString(), smbProperties.getFileLastWriteTimeString(), smbProperties.getFileChangeTimeString(), fileposixProperties.getOwner(), fileposixProperties.getGroup(), - fileposixProperties.getFileMode(), finalContext); + fileposixProperties.getFileMode(), null, finalContext); return ModelHelper.mapShareDirectoryInfo(sendRequest(operation, timeout, ShareStorageException.class)); } @@ -2002,7 +2002,9 @@ public HttpPipeline getHttpPipeline() { * @param shareServiceSasSignatureValues {@link ShareServiceSasSignatureValues} * * @return A {@code String} representing the SAS query parameters. + * @deprecated The service does not support Directory-level SAS. */ + @Deprecated public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues) { return generateSas(shareServiceSasSignatureValues, Context.NONE); } @@ -2031,7 +2033,9 @@ public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatur * @param context Additional context that is passed through the code when generating a SAS. * * @return A {@code String} representing the SAS query parameters. + * @deprecated The service does not support Directory-level SAS. */ + @Deprecated public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context) { return generateSas(shareServiceSasSignatureValues, null, context); } @@ -2047,7 +2051,9 @@ public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatur * @param context Additional context that is passed through the code when generating a SAS. * * @return A {@code String} representing the SAS query parameters. + * @deprecated The service does not support Directory-level SAS. */ + @Deprecated public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Consumer<String> stringToSignHandler, Context context) { return new ShareSasImplUtil(shareServiceSasSignatureValues, getShareName(), getDirectoryPath()) diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileAsyncClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileAsyncClient.java index e4a400e9c5f4..42c3f9042874 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileAsyncClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileAsyncClient.java @@ -16,6 +16,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.ResponseBase; import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.Contexts; import com.azure.core.util.CoreUtils; @@ -49,6 +50,7 @@ import com.azure.storage.file.share.models.DownloadRetryOptions; import com.azure.storage.file.share.models.FilePermissionFormat; import com.azure.storage.file.share.models.FilePosixProperties; +import com.azure.storage.file.share.models.FilePropertySemantics; import com.azure.storage.file.share.models.HandleItem; import com.azure.storage.file.share.models.NtfsFileAttributes; import com.azure.storage.file.share.models.PermissionCopyModeType; @@ -70,6 +72,7 @@ import com.azure.storage.file.share.models.ShareFileUploadRangeOptions; import com.azure.storage.file.share.models.ShareRequestConditions; import com.azure.storage.file.share.models.ShareStorageException; +import com.azure.storage.file.share.models.UserDelegationKey; import com.azure.storage.file.share.options.ShareFileCopyOptions; import com.azure.storage.file.share.options.ShareFileCreateHardLinkOptions; import com.azure.storage.file.share.options.ShareFileCreateOptions; @@ -394,7 +397,7 @@ public Mono<Response<ShareFileInfo>> createWithResponse(long maxSize, ShareFileH ShareRequestConditions requestConditions) { try { return withContext(context -> createWithResponse(maxSize, httpHeaders, smbProperties, filePermission, null, - null, metadata, requestConditions, context)); + null, metadata, requestConditions, null, null, context)); } catch (RuntimeException ex) { return monoError(LOGGER, ex); } @@ -447,7 +450,8 @@ public Mono<Response<ShareFileInfo>> createWithResponse(ShareFileCreateOptions o StorageImplUtils.assertNotNull("options", options); return withContext(context -> createWithResponse(options.getSize(), options.getShareFileHttpHeaders(), options.getSmbProperties(), options.getFilePermission(), options.getFilePermissionFormat(), - options.getPosixProperties(), options.getMetadata(), options.getRequestConditions(), context)); + options.getPosixProperties(), options.getMetadata(), options.getRequestConditions(), null, null, + context)); } catch (RuntimeException ex) { return monoError(LOGGER, ex); } @@ -455,23 +459,35 @@ public Mono<Response<ShareFileInfo>> createWithResponse(ShareFileCreateOptions o Mono<Response<ShareFileInfo>> createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, FilePermissionFormat filePermissionFormat, - FilePosixProperties fileposixProperties, Map<String, String> metadata, ShareRequestConditions requestConditions, - Context context) { + FilePosixProperties filePosixProperties, Map<String, String> metadata, ShareRequestConditions requestConditions, + FilePropertySemantics filePropertySemantics, BinaryData binaryData, Context context) { context = context == null ? Context.NONE : context; requestConditions = requestConditions == null ? new ShareRequestConditions() : requestConditions; smbProperties = smbProperties == null ? new FileSmbProperties() : smbProperties; - fileposixProperties = fileposixProperties == null ? new FilePosixProperties() : fileposixProperties; + filePosixProperties = filePosixProperties == null ? new FilePosixProperties() : filePosixProperties; // Checks that file permission and file permission key are valid ModelHelper.validateFilePermissionAndKey(filePermission, smbProperties.getFilePermissionKey()); + /* PULLED FROM RELEASE + Mono<UploadUtils.FluxMd5Wrapper> contentMD5Mono; + Long contentLength; + if (binaryData != null) { + contentLength = binaryData.getLength(); + contentMD5Mono = UploadUtils.computeMd5(binaryData.toFluxByteBuffer(), true, LOGGER); + } else { + contentLength = null; + contentMD5Mono = UploadUtils.computeMd5(null, false, LOGGER); + } */ + + //return contentMD5Mono.flatMap(fluxMD5wrapper -> azureFileStorageClient.getFiles() return azureFileStorageClient.getFiles() .createWithResponseAsync(shareName, filePath, maxSize, null, metadata, filePermission, filePermissionFormat, smbProperties.getFilePermissionKey(), smbProperties.getNtfsFileAttributesString(), smbProperties.getFileCreationTimeString(), smbProperties.getFileLastWriteTimeString(), - smbProperties.getFileChangeTimeString(), requestConditions.getLeaseId(), fileposixProperties.getOwner(), - fileposixProperties.getGroup(), fileposixProperties.getFileMode(), fileposixProperties.getFileType(), - httpHeaders, context) + smbProperties.getFileChangeTimeString(), requestConditions.getLeaseId(), filePosixProperties.getOwner(), + filePosixProperties.getGroup(), filePosixProperties.getFileMode(), filePosixProperties.getFileType(), + null, null, null, (Flux<ByteBuffer>) null, httpHeaders, context) .map(ModelHelper::createFileInfoResponse); } @@ -3484,4 +3500,36 @@ Mono<Response<ShareFileSymbolicLinkInfo>> getSymbolicLinkWithResponse(Context co .getSymbolicLinkWithResponseAsync(shareName, filePath, null, snapshot, null, context) .map(ModelHelper::getSymbolicLinkResponse); } + + /** + * Generates a user delegation SAS for the file using the specified {@link ShareServiceSasSignatureValues}. + * <p>See {@link ShareServiceSasSignatureValues} for more information on how to construct a user delegation SAS.</p> + * + * @param shareServiceSasSignatureValues {@link ShareServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * + * @return A {@code String} representing the SAS query parameters. + */ + public String generateUserDelegationSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, + UserDelegationKey userDelegationKey) { + return generateUserDelegationSas(shareServiceSasSignatureValues, userDelegationKey, null, Context.NONE); + } + + /** + * Generates a user delegation SAS for the file using the specified {@link ShareServiceSasSignatureValues}. + * <p>See {@link ShareServiceSasSignatureValues} for more information on how to construct a user delegation SAS.</p> + * + * @param shareServiceSasSignatureValues {@link ShareServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * @param stringToSignHandler For debugging purposes only. Returns the string to sign that was used to generate the + * signature. + * @param context Additional context that is passed through the code when generating a SAS. + * + * @return A {@code String} representing the SAS query parameters. + */ + public String generateUserDelegationSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, + UserDelegationKey userDelegationKey, Consumer<String> stringToSignHandler, Context context) { + return new ShareSasImplUtil(shareServiceSasSignatureValues, getShareName(), getFilePath()) + .generateUserDelegationSas(userDelegationKey, accountName, stringToSignHandler, context); + } } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileClient.java index f1b6f1fc2c00..114d50a24946 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileClient.java @@ -77,6 +77,7 @@ import com.azure.storage.file.share.models.ShareFileUploadRangeOptions; import com.azure.storage.file.share.models.ShareRequestConditions; import com.azure.storage.file.share.models.ShareStorageException; +import com.azure.storage.file.share.models.UserDelegationKey; import com.azure.storage.file.share.options.ShareFileCopyOptions; import com.azure.storage.file.share.options.ShareFileCreateHardLinkOptions; import com.azure.storage.file.share.options.ShareFileCreateOptions; @@ -539,14 +540,25 @@ public Response<ShareFileInfo> createWithResponse(ShareFileCreateOptions options // Checks that file permission and file permission key are valid ModelHelper.validateFilePermissionAndKey(options.getFilePermission(), smbProperties.getFilePermissionKey()); + /* PULLED FROM RELEASE + Long contentLength; + byte[] contentMD5; + if (options.getData() != null) { + contentLength = options.getData().getLength(); + contentMD5 = UploadUtils.computeMd5(options.getData().toByteBuffer(), LOGGER); + } else { + contentLength = null; + contentMD5 = null; + } */ + Callable<ResponseBase<FilesCreateHeaders, Void>> operation = () -> this.azureFileStorageClient.getFiles() .createWithResponse(shareName, filePath, options.getSize(), null, options.getMetadata(), options.getFilePermission(), options.getFilePermissionFormat(), smbProperties.getFilePermissionKey(), smbProperties.getNtfsFileAttributesString(), smbProperties.getFileCreationTimeString(), smbProperties.getFileLastWriteTimeString(), smbProperties.getFileChangeTimeString(), requestConditions.getLeaseId(), fileposixProperties.getOwner(), fileposixProperties.getGroup(), - fileposixProperties.getFileMode(), fileposixProperties.getFileType(), options.getShareFileHttpHeaders(), - finalContext); + fileposixProperties.getFileMode(), fileposixProperties.getFileType(), null, null, null, null, + options.getShareFileHttpHeaders(), finalContext); return ModelHelper.createFileInfoResponse(sendRequest(operation, timeout, ShareStorageException.class)); } @@ -3261,4 +3273,36 @@ public Response<ShareFileSymbolicLinkInfo> getSymbolicLinkWithResponse(Duration return ModelHelper.getSymbolicLinkResponse(sendRequest(operation, timeout, ShareStorageException.class)); } + + /** + * Generates a user delegation SAS for the file using the specified {@link ShareServiceSasSignatureValues}. + * <p>See {@link ShareServiceSasSignatureValues} for more information on how to construct a user delegation SAS.</p> + * + * @param shareServiceSasSignatureValues {@link ShareServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * + * @return A {@code String} representing the SAS query parameters. + */ + public String generateUserDelegationSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, + UserDelegationKey userDelegationKey) { + return generateUserDelegationSas(shareServiceSasSignatureValues, userDelegationKey, null, Context.NONE); + } + + /** + * Generates a user delegation SAS for the file using the specified {@link ShareServiceSasSignatureValues}. + * <p>See {@link ShareServiceSasSignatureValues} for more information on how to construct a user delegation SAS.</p> + * + * @param shareServiceSasSignatureValues {@link ShareServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * @param stringToSignHandler For debugging purposes only. Returns the string to sign that was used to generate the + * signature. + * @param context Additional context that is passed through the code when generating a SAS. + * + * @return A {@code String} representing the SAS query parameters. + */ + public String generateUserDelegationSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, + UserDelegationKey userDelegationKey, Consumer<String> stringToSignHandler, Context context) { + return new ShareSasImplUtil(shareServiceSasSignatureValues, getShareName(), getFilePath()) + .generateUserDelegationSas(userDelegationKey, accountName, stringToSignHandler, context); + } } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceAsyncClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceAsyncClient.java index 0e93b3e3ead7..99b105763911 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceAsyncClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceAsyncClient.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; import com.azure.core.credential.AzureSasCredential; +import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedResponse; @@ -19,6 +20,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.AccountSasImplUtil; +import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.sas.AccountSasSignatureValues; @@ -26,15 +28,18 @@ import com.azure.storage.file.share.implementation.models.DeleteSnapshotsOptionType; import com.azure.storage.file.share.implementation.models.ListSharesIncludeType; import com.azure.storage.file.share.implementation.util.ModelHelper; +import com.azure.storage.file.share.models.KeyInfo; import com.azure.storage.file.share.models.ListSharesOptions; import com.azure.storage.file.share.models.ShareCorsRule; import com.azure.storage.file.share.models.ShareItem; import com.azure.storage.file.share.models.ShareServiceProperties; import com.azure.storage.file.share.models.ShareStorageException; +import com.azure.storage.file.share.models.UserDelegationKey; import com.azure.storage.file.share.options.ShareCreateOptions; import reactor.core.publisher.Mono; import java.time.Duration; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -337,8 +342,8 @@ Mono<Response<ShareServiceProperties>> getPropertiesWithResponse(Context context * Sets the properties for the storage account's File service. The properties range from storage analytics and * metric to CORS (Cross-Origin Resource Sharing). * - * To maintain the CORS in the Queue service pass a {@code null} value for {@link ShareServiceProperties#getCors() - * CORS}. To disable all CORS in the Queue service pass an empty list for {@link ShareServiceProperties#getCors() + * To maintain the CORS in the Share service pass a {@code null} value for {@link ShareServiceProperties#getCors() + * CORS}. To disable all CORS in the Share service pass an empty list for {@link ShareServiceProperties#getCors() * CORS}. * * <p><strong>Code Sample</strong></p> @@ -366,7 +371,7 @@ Mono<Response<ShareServiceProperties>> getPropertiesWithResponse(Context context * @throws ShareStorageException When one of the following is true * <ul> * <li>A CORS rule is missing one of its fields</li> - * <li>More than five CORS rules will exist for the Queue service</li> + * <li>More than five CORS rules will exist for the Share service</li> * <li>Size of all CORS rules exceeds 2KB</li> * <li> * Length of {@link ShareCorsRule#getAllowedHeaders() allowed headers}, {@link ShareCorsRule#getExposedHeaders() @@ -385,8 +390,8 @@ public Mono<Void> setProperties(ShareServiceProperties properties) { * Sets the properties for the storage account's File service. The properties range from storage analytics and * metric to CORS (Cross-Origin Resource Sharing). * - * To maintain the CORS in the Queue service pass a {@code null} value for {@link ShareServiceProperties#getCors() - * CORS}. To disable all CORS in the Queue service pass an empty list for {@link ShareServiceProperties#getCors() + * To maintain the CORS in the Share service pass a {@code null} value for {@link ShareServiceProperties#getCors() + * CORS}. To disable all CORS in the Share service pass an empty list for {@link ShareServiceProperties#getCors() * CORS}. * * <p><strong>Code Sample</strong></p> @@ -429,7 +434,7 @@ public Mono<Void> setProperties(ShareServiceProperties properties) { * @throws ShareStorageException When one of the following is true * <ul> * <li>A CORS rule is missing one of its fields</li> - * <li>More than five CORS rules will exist for the Queue service</li> + * <li>More than five CORS rules will exist for the Share service</li> * <li>Size of all CORS rules exceeds 2KB</li> * <li> * Length of {@link ShareCorsRule#getAllowedHeaders() allowed headers}, {@link ShareCorsRule#getExposedHeaders() @@ -851,4 +856,57 @@ Mono<Response<ShareAsyncClient>> undeleteShareWithResponse(String deletedShareNa .restoreWithResponseAsync(deletedShareName, null, null, deletedShareName, deletedShareVersion, context) .map(response -> new SimpleResponse<>(response, getShareAsyncClient(deletedShareName))); } + + /** + * Gets a user delegation key for use with this account's share. Note: This method call is only valid when + * using {@link TokenCredential} in this object's {@link HttpPipeline}. + * + * @param start Start time for the key's validity. Null indicates immediate start. + * @param expiry Expiration of the key's validity. + * @return A {@link Mono} containing the user delegation key. + * @throws IllegalArgumentException If {@code start} isn't null and is after {@code expiry}. + * @throws NullPointerException If {@code expiry} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<UserDelegationKey> getUserDelegationKey(OffsetDateTime start, OffsetDateTime expiry) { + return getUserDelegationKeyWithResponse(start, expiry).flatMap(FluxUtil::toMono); + } + + /** + * Gets a user delegation key for use with this account's share. Note: This method call is only valid when + * using {@link TokenCredential} in this object's {@link HttpPipeline}. + * + * @param start Start time for the key's validity. Null indicates immediate start. + * @param expiry Expiration of the key's validity. + * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} containing the user + * delegation key. + * @throws IllegalArgumentException If {@code start} isn't null and is after {@code expiry}. + * @throws NullPointerException If {@code expiry} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<UserDelegationKey>> getUserDelegationKeyWithResponse(OffsetDateTime start, + OffsetDateTime expiry) { + try { + return withContext(context -> getUserDelegationKeyWithResponse(start, expiry, context)); + } catch (RuntimeException ex) { + return monoError(LOGGER, ex); + } + } + + Mono<Response<UserDelegationKey>> getUserDelegationKeyWithResponse(OffsetDateTime start, OffsetDateTime expiry, + Context context) { + StorageImplUtils.assertNotNull("expiry", expiry); + if (start != null && !start.isBefore(expiry)) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("`start` must be null or a datetime before `expiry`.")); + } + context = context == null ? Context.NONE : context; + + return this.azureFileStorageClient.getServices() + .getUserDelegationKeyWithResponseAsync( + new KeyInfo().setStart(start == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(start)) + .setExpiry(Constants.ISO_8601_UTC_DATE_FORMATTER.format(expiry)), + null, null, context) + .map(rb -> new SimpleResponse<>(rb, rb.getValue())); + } } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceClient.java index 083446d15d1f..d04bc7003187 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceClient.java @@ -7,32 +7,40 @@ import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; import com.azure.core.credential.AzureSasCredential; +import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; 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.ResponseBase; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.AccountSasImplUtil; +import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.SasImplUtils; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.sas.AccountSasSignatureValues; import com.azure.storage.file.share.implementation.AzureFileStorageImpl; import com.azure.storage.file.share.implementation.models.DeleteSnapshotsOptionType; import com.azure.storage.file.share.implementation.models.ListSharesIncludeType; +import com.azure.storage.file.share.implementation.models.ServicesGetUserDelegationKeyHeaders; import com.azure.storage.file.share.implementation.models.ShareItemInternal; import com.azure.storage.file.share.implementation.util.ModelHelper; +import com.azure.storage.file.share.models.KeyInfo; import com.azure.storage.file.share.models.ListSharesOptions; import com.azure.storage.file.share.models.ShareCorsRule; import com.azure.storage.file.share.models.ShareItem; import com.azure.storage.file.share.models.ShareServiceProperties; import com.azure.storage.file.share.models.ShareStorageException; +import com.azure.storage.file.share.models.UserDelegationKey; import com.azure.storage.file.share.options.ShareCreateOptions; import java.time.Duration; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -303,8 +311,8 @@ public Response<ShareServiceProperties> getPropertiesWithResponse(Duration timeo * Sets the properties for the storage account's File service. The properties range from storage analytics and * metric to CORS (Cross-Origin Resource Sharing). * <p> - * To maintain the CORS in the Queue service pass a {@code null} value for {@link ShareServiceProperties#getCors() - * CORS}. To disable all CORS in the Queue service pass an empty list for {@link ShareServiceProperties#getCors() + * To maintain the CORS in the Share service pass a {@code null} value for {@link ShareServiceProperties#getCors() + * CORS}. To disable all CORS in the Share service pass an empty list for {@link ShareServiceProperties#getCors() * CORS}. * * <p><strong>Code Sample</strong></p> @@ -344,7 +352,7 @@ public Response<ShareServiceProperties> getPropertiesWithResponse(Duration timeo * @throws ShareStorageException When one of the following is true * <ul> * <li>A CORS rule is missing one of its fields</li> - * <li>More than five CORS rules will exist for the Queue service</li> + * <li>More than five CORS rules will exist for the Share service</li> * <li>Size of all CORS rules exceeds 2KB</li> * <li> * Length of {@link ShareCorsRule#getAllowedHeaders() allowed headers}, {@link ShareCorsRule#getExposedHeaders() @@ -363,8 +371,8 @@ public void setProperties(ShareServiceProperties properties) { * Sets the properties for the storage account's File service. The properties range from storage analytics and * metric to CORS (Cross-Origin Resource Sharing). * - * To maintain the CORS in the Queue service pass a {@code null} value for {@link ShareServiceProperties#getCors() - * CORS}. To disable all CORS in the Queue service pass an empty list for {@link ShareServiceProperties#getCors() + * To maintain the CORS in the Share service pass a {@code null} value for {@link ShareServiceProperties#getCors() + * CORS}. To disable all CORS in the Share service pass an empty list for {@link ShareServiceProperties#getCors() * CORS}. * * <p><strong>Code Sample</strong></p> @@ -410,7 +418,7 @@ public void setProperties(ShareServiceProperties properties) { * @throws ShareStorageException When one of the following is true * <ul> * <li>A CORS rule is missing one of its fields</li> - * <li>More than five CORS rules will exist for the Queue service</li> + * <li>More than five CORS rules will exist for the Share service</li> * <li>Size of all CORS rules exceeds 2KB</li> * <li> * Length of {@link ShareCorsRule#getAllowedHeaders() allowed headers}, {@link ShareCorsRule#getExposedHeaders() @@ -792,4 +800,47 @@ public Response<ShareClient> undeleteShareWithResponse(String deletedShareName, return new SimpleResponse<>(sendRequest(operation, timeout, ShareStorageException.class), getShareClient(deletedShareName)); } + + /** + * Gets a user delegation key for use with this account's share. Note: This method call is only valid when + * using {@link TokenCredential} in this object's {@link HttpPipeline}. + * + * @param start Start time for the key's validity. Null indicates immediate start. + * @param expiry Expiration of the key's validity. + * @return The user delegation key. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UserDelegationKey getUserDelegationKey(OffsetDateTime start, OffsetDateTime expiry) { + return getUserDelegationKeyWithResponse(start, expiry, null, Context.NONE).getValue(); + } + + /** + * Gets a user delegation key for use with this account's share. Note: This method call is only valid when + * using {@link TokenCredential} in this object's {@link HttpPipeline}. + * + * @param start Start time for the key's validity. Null indicates immediate start. + * @param expiry Expiration of the key's validity. + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link Response} whose {@link Response#getValue() value} contains the user delegation key. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<UserDelegationKey> getUserDelegationKeyWithResponse(OffsetDateTime start, OffsetDateTime expiry, + Duration timeout, Context context) { + StorageImplUtils.assertNotNull("expiry", expiry); + if (start != null && !start.isBefore(expiry)) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("`start` must be null or a datetime before `expiry`.")); + } + Context finalContext = context == null ? Context.NONE : context; + Callable<ResponseBase<ServicesGetUserDelegationKeyHeaders, UserDelegationKey>> operation + = () -> this.azureFileStorageClient.getServices() + .getUserDelegationKeyWithResponse( + new KeyInfo().setStart(start == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(start)) + .setExpiry(Constants.ISO_8601_UTC_DATE_FORMATTER.format(expiry)), + null, null, finalContext); + ResponseBase<ServicesGetUserDelegationKeyHeaders, UserDelegationKey> response + = sendRequest(operation, timeout, ShareStorageException.class); + return new SimpleResponse<>(response, response.getValue()); + } } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceVersion.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceVersion.java index 9fe61dbf7145..d65a922ef89f 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceVersion.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceVersion.java @@ -147,7 +147,12 @@ public enum ShareServiceVersion implements ServiceVersion { /** * Service version {@code 2025-11-05}. */ - V2025_11_05("2025-11-05"); + V2025_11_05("2025-11-05"), + + /** + * Service version {@code 2026-02-06}. + */ + V2026_02_06("2026-02-06"); private final String version; @@ -169,6 +174,6 @@ public String getVersion() { * @return the latest {@link ShareServiceVersion} */ public static ShareServiceVersion getLatest() { - return V2025_11_05; + return V2026_02_06; } } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/DirectoriesImpl.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/DirectoriesImpl.java index 0e969e2f520f..f166775a06c6 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/DirectoriesImpl.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/DirectoriesImpl.java @@ -39,6 +39,7 @@ import com.azure.storage.file.share.implementation.models.SourceLeaseAccessConditions; import com.azure.storage.file.share.implementation.util.ModelHelper; import com.azure.storage.file.share.models.FilePermissionFormat; +import com.azure.storage.file.share.models.FilePropertySemantics; import com.azure.storage.file.share.models.ShareTokenIntent; import java.util.List; import java.util.Map; @@ -96,7 +97,9 @@ Mono<ResponseBase<DirectoriesCreateHeaders, Void>> create(@HostParam("url") Stri @HeaderParam("x-ms-file-change-time") String fileChangeTime, @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, @HeaderParam("x-ms-owner") String owner, @HeaderParam("x-ms-group") String group, - @HeaderParam("x-ms-mode") String fileMode, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("x-ms-mode") String fileMode, + @HeaderParam("x-ms-file-property-semantics") FilePropertySemantics filePropertySemantics, + @HeaderParam("Accept") String accept, Context context); @Put("/{shareName}/{directory}") @ExpectedResponses({ 201 }) @@ -114,7 +117,9 @@ Mono<Response<Void>> createNoCustomHeaders(@HostParam("url") String url, @HeaderParam("x-ms-file-change-time") String fileChangeTime, @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, @HeaderParam("x-ms-owner") String owner, @HeaderParam("x-ms-group") String group, - @HeaderParam("x-ms-mode") String fileMode, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("x-ms-mode") String fileMode, + @HeaderParam("x-ms-file-property-semantics") FilePropertySemantics filePropertySemantics, + @HeaderParam("Accept") String accept, Context context); @Put("/{shareName}/{directory}") @ExpectedResponses({ 201 }) @@ -132,7 +137,9 @@ ResponseBase<DirectoriesCreateHeaders, Void> createSync(@HostParam("url") String @HeaderParam("x-ms-file-change-time") String fileChangeTime, @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, @HeaderParam("x-ms-owner") String owner, @HeaderParam("x-ms-group") String group, - @HeaderParam("x-ms-mode") String fileMode, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("x-ms-mode") String fileMode, + @HeaderParam("x-ms-file-property-semantics") FilePropertySemantics filePropertySemantics, + @HeaderParam("Accept") String accept, Context context); @Put("/{shareName}/{directory}") @ExpectedResponses({ 201 }) @@ -150,7 +157,9 @@ Response<Void> createNoCustomHeadersSync(@HostParam("url") String url, @PathPara @HeaderParam("x-ms-file-change-time") String fileChangeTime, @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, @HeaderParam("x-ms-owner") String owner, @HeaderParam("x-ms-group") String group, - @HeaderParam("x-ms-mode") String fileMode, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("x-ms-mode") String fileMode, + @HeaderParam("x-ms-file-property-semantics") FilePropertySemantics filePropertySemantics, + @HeaderParam("Accept") String accept, Context context); @Get("/{shareName}/{directory}") @ExpectedResponses({ 200 }) @@ -652,6 +661,9 @@ Response<Void> renameNoCustomHeadersSync(@HostParam("url") String url, @PathPara * @param owner Optional, NFS only. The owner of the file or directory. * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -662,11 +674,11 @@ public Mono<ResponseBase<DirectoriesCreateHeaders, Void>> createWithResponseAsyn String directory, Integer timeout, Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, String fileChangeTime, String owner, String group, - String fileMode) { + String fileMode, FilePropertySemantics filePropertySemantics) { return FluxUtil .withContext(context -> createWithResponseAsync(shareName, directory, timeout, metadata, filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, - fileChangeTime, owner, group, fileMode, context)) + fileChangeTime, owner, group, fileMode, filePropertySemantics, context)) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } @@ -698,6 +710,9 @@ public Mono<ResponseBase<DirectoriesCreateHeaders, Void>> createWithResponseAsyn * @param owner Optional, NFS only. The owner of the file or directory. * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -709,14 +724,14 @@ public Mono<ResponseBase<DirectoriesCreateHeaders, Void>> createWithResponseAsyn String directory, Integer timeout, Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, String fileChangeTime, String owner, String group, - String fileMode, Context context) { + String fileMode, FilePropertySemantics filePropertySemantics, Context context) { final String restype = "directory"; final String accept = "application/xml"; return service .create(this.client.getUrl(), shareName, directory, restype, this.client.isAllowTrailingDot(), timeout, metadata, this.client.getVersion(), filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, fileChangeTime, this.client.getFileRequestIntent(), - owner, group, fileMode, accept, context) + owner, group, fileMode, filePropertySemantics, accept, context) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } @@ -748,6 +763,9 @@ public Mono<ResponseBase<DirectoriesCreateHeaders, Void>> createWithResponseAsyn * @param owner Optional, NFS only. The owner of the file or directory. * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -757,10 +775,11 @@ public Mono<ResponseBase<DirectoriesCreateHeaders, Void>> createWithResponseAsyn public Mono<Void> createAsync(String shareName, String directory, Integer timeout, Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, String fileChangeTime, String owner, - String group, String fileMode) { + String group, String fileMode, FilePropertySemantics filePropertySemantics) { return createWithResponseAsync(shareName, directory, timeout, metadata, filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, fileChangeTime, owner, group, - fileMode).onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException) + fileMode, filePropertySemantics) + .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException) .flatMap(ignored -> Mono.empty()); } @@ -792,6 +811,9 @@ public Mono<Void> createAsync(String shareName, String directory, Integer timeou * @param owner Optional, NFS only. The owner of the file or directory. * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -802,10 +824,11 @@ public Mono<Void> createAsync(String shareName, String directory, Integer timeou public Mono<Void> createAsync(String shareName, String directory, Integer timeout, Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, String fileChangeTime, String owner, - String group, String fileMode, Context context) { + String group, String fileMode, FilePropertySemantics filePropertySemantics, Context context) { return createWithResponseAsync(shareName, directory, timeout, metadata, filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, fileChangeTime, owner, group, - fileMode, context).onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException) + fileMode, filePropertySemantics, context) + .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException) .flatMap(ignored -> Mono.empty()); } @@ -837,6 +860,9 @@ public Mono<Void> createAsync(String shareName, String directory, Integer timeou * @param owner Optional, NFS only. The owner of the file or directory. * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -846,11 +872,12 @@ public Mono<Void> createAsync(String shareName, String directory, Integer timeou public Mono<Response<Void>> createNoCustomHeadersWithResponseAsync(String shareName, String directory, Integer timeout, Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, - String fileChangeTime, String owner, String group, String fileMode) { + String fileChangeTime, String owner, String group, String fileMode, + FilePropertySemantics filePropertySemantics) { return FluxUtil .withContext(context -> createNoCustomHeadersWithResponseAsync(shareName, directory, timeout, metadata, filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, - fileLastWriteTime, fileChangeTime, owner, group, fileMode, context)) + fileLastWriteTime, fileChangeTime, owner, group, fileMode, filePropertySemantics, context)) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } @@ -882,6 +909,9 @@ public Mono<Response<Void>> createNoCustomHeadersWithResponseAsync(String shareN * @param owner Optional, NFS only. The owner of the file or directory. * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -892,14 +922,16 @@ public Mono<Response<Void>> createNoCustomHeadersWithResponseAsync(String shareN public Mono<Response<Void>> createNoCustomHeadersWithResponseAsync(String shareName, String directory, Integer timeout, Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, - String fileChangeTime, String owner, String group, String fileMode, Context context) { + String fileChangeTime, String owner, String group, String fileMode, FilePropertySemantics filePropertySemantics, + Context context) { final String restype = "directory"; final String accept = "application/xml"; return service .createNoCustomHeaders(this.client.getUrl(), shareName, directory, restype, this.client.isAllowTrailingDot(), timeout, metadata, this.client.getVersion(), filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, - fileChangeTime, this.client.getFileRequestIntent(), owner, group, fileMode, accept, context) + fileChangeTime, this.client.getFileRequestIntent(), owner, group, fileMode, filePropertySemantics, + accept, context) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } @@ -931,6 +963,9 @@ public Mono<Response<Void>> createNoCustomHeadersWithResponseAsync(String shareN * @param owner Optional, NFS only. The owner of the file or directory. * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -941,14 +976,16 @@ public Mono<Response<Void>> createNoCustomHeadersWithResponseAsync(String shareN public ResponseBase<DirectoriesCreateHeaders, Void> createWithResponse(String shareName, String directory, Integer timeout, Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, - String fileChangeTime, String owner, String group, String fileMode, Context context) { + String fileChangeTime, String owner, String group, String fileMode, FilePropertySemantics filePropertySemantics, + Context context) { try { final String restype = "directory"; final String accept = "application/xml"; return service.createSync(this.client.getUrl(), shareName, directory, restype, this.client.isAllowTrailingDot(), timeout, metadata, this.client.getVersion(), filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, - fileChangeTime, this.client.getFileRequestIntent(), owner, group, fileMode, accept, context); + fileChangeTime, this.client.getFileRequestIntent(), owner, group, fileMode, filePropertySemantics, + accept, context); } catch (ShareStorageExceptionInternal internalException) { throw ModelHelper.mapToShareStorageException(internalException); } @@ -982,6 +1019,9 @@ public ResponseBase<DirectoriesCreateHeaders, Void> createWithResponse(String sh * @param owner Optional, NFS only. The owner of the file or directory. * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -990,10 +1030,10 @@ public ResponseBase<DirectoriesCreateHeaders, Void> createWithResponse(String sh public void create(String shareName, String directory, Integer timeout, Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, String fileChangeTime, String owner, - String group, String fileMode) { + String group, String fileMode, FilePropertySemantics filePropertySemantics) { createWithResponse(shareName, directory, timeout, metadata, filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, fileChangeTime, owner, group, - fileMode, Context.NONE); + fileMode, filePropertySemantics, Context.NONE); } /** @@ -1024,6 +1064,9 @@ public void create(String shareName, String directory, Integer timeout, Map<Stri * @param owner Optional, NFS only. The owner of the file or directory. * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -1034,14 +1077,16 @@ public void create(String shareName, String directory, Integer timeout, Map<Stri public Response<Void> createNoCustomHeadersWithResponse(String shareName, String directory, Integer timeout, Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, - String fileChangeTime, String owner, String group, String fileMode, Context context) { + String fileChangeTime, String owner, String group, String fileMode, FilePropertySemantics filePropertySemantics, + Context context) { try { final String restype = "directory"; final String accept = "application/xml"; return service.createNoCustomHeadersSync(this.client.getUrl(), shareName, directory, restype, this.client.isAllowTrailingDot(), timeout, metadata, this.client.getVersion(), filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, - fileChangeTime, this.client.getFileRequestIntent(), owner, group, fileMode, accept, context); + fileChangeTime, this.client.getFileRequestIntent(), owner, group, fileMode, filePropertySemantics, + accept, context); } catch (ShareStorageExceptionInternal internalException) { throw ModelHelper.mapToShareStorageException(internalException); } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/FilesImpl.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/FilesImpl.java index 596c6b0b2f58..473e877246d4 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/FilesImpl.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/FilesImpl.java @@ -56,6 +56,7 @@ import com.azure.storage.file.share.implementation.util.ModelHelper; import com.azure.storage.file.share.models.FileLastWrittenMode; import com.azure.storage.file.share.models.FilePermissionFormat; +import com.azure.storage.file.share.models.FilePropertySemantics; import com.azure.storage.file.share.models.ModeCopyMode; import com.azure.storage.file.share.models.NfsFileType; import com.azure.storage.file.share.models.OwnerCopyMode; @@ -126,7 +127,11 @@ Mono<ResponseBase<FilesCreateHeaders, Void>> create(@HostParam("url") String url @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, @HeaderParam("x-ms-owner") String owner, @HeaderParam("x-ms-group") String group, @HeaderParam("x-ms-mode") String fileMode, @HeaderParam("x-ms-file-file-type") NfsFileType nfsFileType, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-MD5") String contentMD5, + @HeaderParam("x-ms-file-property-semantics") FilePropertySemantics filePropertySemantics, + @HeaderParam("Content-Length") Long contentLength, + @BodyParam("application/octet-stream") Flux<ByteBuffer> optionalbody, @HeaderParam("Accept") String accept, + Context context); @Put("/{shareName}/{fileName}") @ExpectedResponses({ 201 }) @@ -151,7 +156,69 @@ Mono<Response<Void>> createNoCustomHeaders(@HostParam("url") String url, @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, @HeaderParam("x-ms-owner") String owner, @HeaderParam("x-ms-group") String group, @HeaderParam("x-ms-mode") String fileMode, @HeaderParam("x-ms-file-file-type") NfsFileType nfsFileType, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-MD5") String contentMD5, + @HeaderParam("x-ms-file-property-semantics") FilePropertySemantics filePropertySemantics, + @HeaderParam("Content-Length") Long contentLength, + @BodyParam("application/octet-stream") Flux<ByteBuffer> optionalbody, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{shareName}/{fileName}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(ShareStorageExceptionInternal.class) + Mono<ResponseBase<FilesCreateHeaders, Void>> create(@HostParam("url") String url, + @PathParam("shareName") String shareName, @PathParam("fileName") String fileName, + @HeaderParam("x-ms-allow-trailing-dot") Boolean allowTrailingDot, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-content-length") long fileContentLength, + @HeaderParam("x-ms-type") String fileTypeConstant, @HeaderParam("x-ms-content-type") String contentType, + @HeaderParam("x-ms-content-encoding") String contentEncoding, + @HeaderParam("x-ms-content-language") String contentLanguage, + @HeaderParam("x-ms-cache-control") String cacheControl, @HeaderParam("x-ms-content-md5") String contentMd5, + @HeaderParam("x-ms-content-disposition") String contentDisposition, + @HeaderParam("x-ms-meta-") Map<String, String> metadata, + @HeaderParam("x-ms-file-permission") String filePermission, + @HeaderParam("x-ms-file-permission-format") FilePermissionFormat filePermissionFormat, + @HeaderParam("x-ms-file-permission-key") String filePermissionKey, + @HeaderParam("x-ms-file-attributes") String fileAttributes, + @HeaderParam("x-ms-file-creation-time") String fileCreationTime, + @HeaderParam("x-ms-file-last-write-time") String fileLastWriteTime, + @HeaderParam("x-ms-file-change-time") String fileChangeTime, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, + @HeaderParam("x-ms-owner") String owner, @HeaderParam("x-ms-group") String group, + @HeaderParam("x-ms-mode") String fileMode, @HeaderParam("x-ms-file-file-type") NfsFileType nfsFileType, + @HeaderParam("Content-MD5") String contentMD5, + @HeaderParam("x-ms-file-property-semantics") FilePropertySemantics filePropertySemantics, + @HeaderParam("Content-Length") Long contentLength, + @BodyParam("application/octet-stream") BinaryData optionalbody, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{shareName}/{fileName}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(ShareStorageExceptionInternal.class) + Mono<Response<Void>> createNoCustomHeaders(@HostParam("url") String url, + @PathParam("shareName") String shareName, @PathParam("fileName") String fileName, + @HeaderParam("x-ms-allow-trailing-dot") Boolean allowTrailingDot, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-content-length") long fileContentLength, + @HeaderParam("x-ms-type") String fileTypeConstant, @HeaderParam("x-ms-content-type") String contentType, + @HeaderParam("x-ms-content-encoding") String contentEncoding, + @HeaderParam("x-ms-content-language") String contentLanguage, + @HeaderParam("x-ms-cache-control") String cacheControl, @HeaderParam("x-ms-content-md5") String contentMd5, + @HeaderParam("x-ms-content-disposition") String contentDisposition, + @HeaderParam("x-ms-meta-") Map<String, String> metadata, + @HeaderParam("x-ms-file-permission") String filePermission, + @HeaderParam("x-ms-file-permission-format") FilePermissionFormat filePermissionFormat, + @HeaderParam("x-ms-file-permission-key") String filePermissionKey, + @HeaderParam("x-ms-file-attributes") String fileAttributes, + @HeaderParam("x-ms-file-creation-time") String fileCreationTime, + @HeaderParam("x-ms-file-last-write-time") String fileLastWriteTime, + @HeaderParam("x-ms-file-change-time") String fileChangeTime, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, + @HeaderParam("x-ms-owner") String owner, @HeaderParam("x-ms-group") String group, + @HeaderParam("x-ms-mode") String fileMode, @HeaderParam("x-ms-file-file-type") NfsFileType nfsFileType, + @HeaderParam("Content-MD5") String contentMD5, + @HeaderParam("x-ms-file-property-semantics") FilePropertySemantics filePropertySemantics, + @HeaderParam("Content-Length") Long contentLength, + @BodyParam("application/octet-stream") BinaryData optionalbody, @HeaderParam("Accept") String accept, + Context context); @Put("/{shareName}/{fileName}") @ExpectedResponses({ 201 }) @@ -176,7 +243,11 @@ ResponseBase<FilesCreateHeaders, Void> createSync(@HostParam("url") String url, @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, @HeaderParam("x-ms-owner") String owner, @HeaderParam("x-ms-group") String group, @HeaderParam("x-ms-mode") String fileMode, @HeaderParam("x-ms-file-file-type") NfsFileType nfsFileType, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-MD5") String contentMD5, + @HeaderParam("x-ms-file-property-semantics") FilePropertySemantics filePropertySemantics, + @HeaderParam("Content-Length") Long contentLength, + @BodyParam("application/octet-stream") BinaryData optionalbody, @HeaderParam("Accept") String accept, + Context context); @Put("/{shareName}/{fileName}") @ExpectedResponses({ 201 }) @@ -201,7 +272,11 @@ Response<Void> createNoCustomHeadersSync(@HostParam("url") String url, @PathPara @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, @HeaderParam("x-ms-owner") String owner, @HeaderParam("x-ms-group") String group, @HeaderParam("x-ms-mode") String fileMode, @HeaderParam("x-ms-file-file-type") NfsFileType nfsFileType, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-MD5") String contentMD5, + @HeaderParam("x-ms-file-property-semantics") FilePropertySemantics filePropertySemantics, + @HeaderParam("Content-Length") Long contentLength, + @BodyParam("application/octet-stream") BinaryData optionalbody, @HeaderParam("Accept") String accept, + Context context); @Get("/{shareName}/{fileName}") @ExpectedResponses({ 200, 206 }) @@ -1457,6 +1532,16 @@ Response<Void> createHardLinkNoCustomHeadersSync(@HostParam("url") String url, * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. * @param nfsFileType Optional, NFS only. Type of the file or directory. + * @param contentMD5 An MD5 hash of the content. This hash is used to verify the integrity of the data during + * transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has + * arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error + * code 400 (Bad Request). + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. + * @param contentLength Specifies the number of bytes being transmitted in the request body. When the x-ms-write + * header is set to clear, the value of this header must be set to zero. + * @param optionalbody Initial data. * @param shareFileHttpHeaders Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -1468,11 +1553,15 @@ public Mono<ResponseBase<FilesCreateHeaders, Void>> createWithResponseAsync(Stri long fileContentLength, Integer timeout, Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, String fileChangeTime, String leaseId, String owner, - String group, String fileMode, NfsFileType nfsFileType, ShareFileHttpHeaders shareFileHttpHeaders) { - return FluxUtil.withContext(context -> createWithResponseAsync(shareName, fileName, fileContentLength, timeout, - metadata, filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, - fileLastWriteTime, fileChangeTime, leaseId, owner, group, fileMode, nfsFileType, shareFileHttpHeaders, - context)).onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); + String group, String fileMode, NfsFileType nfsFileType, byte[] contentMD5, + FilePropertySemantics filePropertySemantics, Long contentLength, Flux<ByteBuffer> optionalbody, + ShareFileHttpHeaders shareFileHttpHeaders) { + return FluxUtil + .withContext(context -> createWithResponseAsync(shareName, fileName, fileContentLength, timeout, metadata, + filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, + fileLastWriteTime, fileChangeTime, leaseId, owner, group, fileMode, nfsFileType, contentMD5, + filePropertySemantics, contentLength, optionalbody, shareFileHttpHeaders, context)) + .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } /** @@ -1506,6 +1595,16 @@ public Mono<ResponseBase<FilesCreateHeaders, Void>> createWithResponseAsync(Stri * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. * @param nfsFileType Optional, NFS only. Type of the file or directory. + * @param contentMD5 An MD5 hash of the content. This hash is used to verify the integrity of the data during + * transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has + * arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error + * code 400 (Bad Request). + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. + * @param contentLength Specifies the number of bytes being transmitted in the request body. When the x-ms-write + * header is set to clear, the value of this header must be set to zero. + * @param optionalbody Initial data. * @param shareFileHttpHeaders Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1518,8 +1617,9 @@ public Mono<ResponseBase<FilesCreateHeaders, Void>> createWithResponseAsync(Stri long fileContentLength, Integer timeout, Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, String fileChangeTime, String leaseId, String owner, - String group, String fileMode, NfsFileType nfsFileType, ShareFileHttpHeaders shareFileHttpHeaders, - Context context) { + String group, String fileMode, NfsFileType nfsFileType, byte[] contentMD5, + FilePropertySemantics filePropertySemantics, Long contentLength, Flux<ByteBuffer> optionalbody, + ShareFileHttpHeaders shareFileHttpHeaders, Context context) { final String fileTypeConstant = "file"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -1553,13 +1653,14 @@ public Mono<ResponseBase<FilesCreateHeaders, Void>> createWithResponseAsync(Stri } String contentDisposition = contentDispositionInternal; String contentMd5Converted = Base64Util.encodeToString(contentMd5); + String contentMD5Converted = Base64Util.encodeToString(contentMD5); return service .create(this.client.getUrl(), shareName, fileName, this.client.isAllowTrailingDot(), timeout, this.client.getVersion(), fileContentLength, fileTypeConstant, contentType, contentEncoding, contentLanguage, cacheControl, contentMd5Converted, contentDisposition, metadata, filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, fileChangeTime, leaseId, this.client.getFileRequestIntent(), owner, group, fileMode, nfsFileType, - accept, context) + contentMD5Converted, filePropertySemantics, contentLength, optionalbody, accept, context) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } @@ -1594,6 +1695,16 @@ public Mono<ResponseBase<FilesCreateHeaders, Void>> createWithResponseAsync(Stri * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. * @param nfsFileType Optional, NFS only. Type of the file or directory. + * @param contentMD5 An MD5 hash of the content. This hash is used to verify the integrity of the data during + * transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has + * arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error + * code 400 (Bad Request). + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. + * @param contentLength Specifies the number of bytes being transmitted in the request body. When the x-ms-write + * header is set to clear, the value of this header must be set to zero. + * @param optionalbody Initial data. * @param shareFileHttpHeaders Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -1605,10 +1716,12 @@ public Mono<Void> createAsync(String shareName, String fileName, long fileConten Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, String fileChangeTime, String leaseId, String owner, String group, String fileMode, NfsFileType nfsFileType, - ShareFileHttpHeaders shareFileHttpHeaders) { + byte[] contentMD5, FilePropertySemantics filePropertySemantics, Long contentLength, + Flux<ByteBuffer> optionalbody, ShareFileHttpHeaders shareFileHttpHeaders) { return createWithResponseAsync(shareName, fileName, fileContentLength, timeout, metadata, filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, - fileChangeTime, leaseId, owner, group, fileMode, nfsFileType, shareFileHttpHeaders) + fileChangeTime, leaseId, owner, group, fileMode, nfsFileType, contentMD5, filePropertySemantics, + contentLength, optionalbody, shareFileHttpHeaders) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException) .flatMap(ignored -> Mono.empty()); } @@ -1644,6 +1757,16 @@ public Mono<Void> createAsync(String shareName, String fileName, long fileConten * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. * @param nfsFileType Optional, NFS only. Type of the file or directory. + * @param contentMD5 An MD5 hash of the content. This hash is used to verify the integrity of the data during + * transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has + * arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error + * code 400 (Bad Request). + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. + * @param contentLength Specifies the number of bytes being transmitted in the request body. When the x-ms-write + * header is set to clear, the value of this header must be set to zero. + * @param optionalbody Initial data. * @param shareFileHttpHeaders Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1656,10 +1779,12 @@ public Mono<Void> createAsync(String shareName, String fileName, long fileConten Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, String fileChangeTime, String leaseId, String owner, String group, String fileMode, NfsFileType nfsFileType, - ShareFileHttpHeaders shareFileHttpHeaders, Context context) { + byte[] contentMD5, FilePropertySemantics filePropertySemantics, Long contentLength, + Flux<ByteBuffer> optionalbody, ShareFileHttpHeaders shareFileHttpHeaders, Context context) { return createWithResponseAsync(shareName, fileName, fileContentLength, timeout, metadata, filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, - fileChangeTime, leaseId, owner, group, fileMode, nfsFileType, shareFileHttpHeaders, context) + fileChangeTime, leaseId, owner, group, fileMode, nfsFileType, contentMD5, filePropertySemantics, + contentLength, optionalbody, shareFileHttpHeaders, context) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException) .flatMap(ignored -> Mono.empty()); } @@ -1695,6 +1820,16 @@ public Mono<Void> createAsync(String shareName, String fileName, long fileConten * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. * @param nfsFileType Optional, NFS only. Type of the file or directory. + * @param contentMD5 An MD5 hash of the content. This hash is used to verify the integrity of the data during + * transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has + * arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error + * code 400 (Bad Request). + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. + * @param contentLength Specifies the number of bytes being transmitted in the request body. When the x-ms-write + * header is set to clear, the value of this header must be set to zero. + * @param optionalbody Initial data. * @param shareFileHttpHeaders Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -1706,12 +1841,14 @@ public Mono<Response<Void>> createNoCustomHeadersWithResponseAsync(String shareN long fileContentLength, Integer timeout, Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, String fileChangeTime, String leaseId, String owner, - String group, String fileMode, NfsFileType nfsFileType, ShareFileHttpHeaders shareFileHttpHeaders) { + String group, String fileMode, NfsFileType nfsFileType, byte[] contentMD5, + FilePropertySemantics filePropertySemantics, Long contentLength, Flux<ByteBuffer> optionalbody, + ShareFileHttpHeaders shareFileHttpHeaders) { return FluxUtil .withContext(context -> createNoCustomHeadersWithResponseAsync(shareName, fileName, fileContentLength, timeout, metadata, filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, fileChangeTime, leaseId, owner, group, fileMode, nfsFileType, - shareFileHttpHeaders, context)) + contentMD5, filePropertySemantics, contentLength, optionalbody, shareFileHttpHeaders, context)) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } @@ -1746,6 +1883,16 @@ public Mono<Response<Void>> createNoCustomHeadersWithResponseAsync(String shareN * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. * @param nfsFileType Optional, NFS only. Type of the file or directory. + * @param contentMD5 An MD5 hash of the content. This hash is used to verify the integrity of the data during + * transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has + * arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error + * code 400 (Bad Request). + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. + * @param contentLength Specifies the number of bytes being transmitted in the request body. When the x-ms-write + * header is set to clear, the value of this header must be set to zero. + * @param optionalbody Initial data. * @param shareFileHttpHeaders Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1758,8 +1905,9 @@ public Mono<Response<Void>> createNoCustomHeadersWithResponseAsync(String shareN long fileContentLength, Integer timeout, Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, String fileChangeTime, String leaseId, String owner, - String group, String fileMode, NfsFileType nfsFileType, ShareFileHttpHeaders shareFileHttpHeaders, - Context context) { + String group, String fileMode, NfsFileType nfsFileType, byte[] contentMD5, + FilePropertySemantics filePropertySemantics, Long contentLength, Flux<ByteBuffer> optionalbody, + ShareFileHttpHeaders shareFileHttpHeaders, Context context) { final String fileTypeConstant = "file"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -1793,13 +1941,14 @@ public Mono<Response<Void>> createNoCustomHeadersWithResponseAsync(String shareN } String contentDisposition = contentDispositionInternal; String contentMd5Converted = Base64Util.encodeToString(contentMd5); + String contentMD5Converted = Base64Util.encodeToString(contentMD5); return service .createNoCustomHeaders(this.client.getUrl(), shareName, fileName, this.client.isAllowTrailingDot(), timeout, this.client.getVersion(), fileContentLength, fileTypeConstant, contentType, contentEncoding, contentLanguage, cacheControl, contentMd5Converted, contentDisposition, metadata, filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, fileChangeTime, leaseId, this.client.getFileRequestIntent(), owner, group, fileMode, nfsFileType, - accept, context) + contentMD5Converted, filePropertySemantics, contentLength, optionalbody, accept, context) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } @@ -1834,63 +1983,36 @@ public Mono<Response<Void>> createNoCustomHeadersWithResponseAsync(String shareN * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. * @param nfsFileType Optional, NFS only. Type of the file or directory. + * @param contentMD5 An MD5 hash of the content. This hash is used to verify the integrity of the data during + * transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has + * arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error + * code 400 (Bad Request). + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. + * @param contentLength Specifies the number of bytes being transmitted in the request body. When the x-ms-write + * header is set to clear, the value of this header must be set to zero. + * @param optionalbody Initial data. * @param shareFileHttpHeaders Parameter group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase<FilesCreateHeaders, Void> createWithResponse(String shareName, String fileName, + public Mono<ResponseBase<FilesCreateHeaders, Void>> createWithResponseAsync(String shareName, String fileName, long fileContentLength, Integer timeout, Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, String fileChangeTime, String leaseId, String owner, - String group, String fileMode, NfsFileType nfsFileType, ShareFileHttpHeaders shareFileHttpHeaders, - Context context) { - try { - final String fileTypeConstant = "file"; - final String accept = "application/xml"; - String contentTypeInternal = null; - if (shareFileHttpHeaders != null) { - contentTypeInternal = shareFileHttpHeaders.getContentType(); - } - String contentType = contentTypeInternal; - String contentEncodingInternal = null; - if (shareFileHttpHeaders != null) { - contentEncodingInternal = shareFileHttpHeaders.getContentEncoding(); - } - String contentEncoding = contentEncodingInternal; - String contentLanguageInternal = null; - if (shareFileHttpHeaders != null) { - contentLanguageInternal = shareFileHttpHeaders.getContentLanguage(); - } - String contentLanguage = contentLanguageInternal; - String cacheControlInternal = null; - if (shareFileHttpHeaders != null) { - cacheControlInternal = shareFileHttpHeaders.getCacheControl(); - } - String cacheControl = cacheControlInternal; - byte[] contentMd5Internal = null; - if (shareFileHttpHeaders != null) { - contentMd5Internal = shareFileHttpHeaders.getContentMd5(); - } - byte[] contentMd5 = contentMd5Internal; - String contentDispositionInternal = null; - if (shareFileHttpHeaders != null) { - contentDispositionInternal = shareFileHttpHeaders.getContentDisposition(); - } - String contentDisposition = contentDispositionInternal; - String contentMd5Converted = Base64Util.encodeToString(contentMd5); - return service.createSync(this.client.getUrl(), shareName, fileName, this.client.isAllowTrailingDot(), - timeout, this.client.getVersion(), fileContentLength, fileTypeConstant, contentType, contentEncoding, - contentLanguage, cacheControl, contentMd5Converted, contentDisposition, metadata, filePermission, - filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, - fileChangeTime, leaseId, this.client.getFileRequestIntent(), owner, group, fileMode, nfsFileType, - accept, context); - } catch (ShareStorageExceptionInternal internalException) { - throw ModelHelper.mapToShareStorageException(internalException); - } + String group, String fileMode, NfsFileType nfsFileType, byte[] contentMD5, + FilePropertySemantics filePropertySemantics, Long contentLength, BinaryData optionalbody, + ShareFileHttpHeaders shareFileHttpHeaders) { + return FluxUtil + .withContext(context -> createWithResponseAsync(shareName, fileName, fileContentLength, timeout, metadata, + filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, + fileLastWriteTime, fileChangeTime, leaseId, owner, group, fileMode, nfsFileType, contentMD5, + filePropertySemantics, contentLength, optionalbody, shareFileHttpHeaders, context)) + .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } /** @@ -1924,20 +2046,73 @@ public ResponseBase<FilesCreateHeaders, Void> createWithResponse(String shareNam * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. * @param nfsFileType Optional, NFS only. Type of the file or directory. + * @param contentMD5 An MD5 hash of the content. This hash is used to verify the integrity of the data during + * transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has + * arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error + * code 400 (Bad Request). + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. + * @param contentLength Specifies the number of bytes being transmitted in the request body. When the x-ms-write + * header is set to clear, the value of this header must be set to zero. + * @param optionalbody Initial data. * @param shareFileHttpHeaders Parameter group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void create(String shareName, String fileName, long fileContentLength, Integer timeout, - Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, - String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, - String fileChangeTime, String leaseId, String owner, String group, String fileMode, NfsFileType nfsFileType, - ShareFileHttpHeaders shareFileHttpHeaders) { - createWithResponse(shareName, fileName, fileContentLength, timeout, metadata, filePermission, - filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, - fileChangeTime, leaseId, owner, group, fileMode, nfsFileType, shareFileHttpHeaders, Context.NONE); + public Mono<ResponseBase<FilesCreateHeaders, Void>> createWithResponseAsync(String shareName, String fileName, + long fileContentLength, Integer timeout, Map<String, String> metadata, String filePermission, + FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, + String fileCreationTime, String fileLastWriteTime, String fileChangeTime, String leaseId, String owner, + String group, String fileMode, NfsFileType nfsFileType, byte[] contentMD5, + FilePropertySemantics filePropertySemantics, Long contentLength, BinaryData optionalbody, + ShareFileHttpHeaders shareFileHttpHeaders, Context context) { + final String fileTypeConstant = "file"; + final String accept = "application/xml"; + String contentTypeInternal = null; + if (shareFileHttpHeaders != null) { + contentTypeInternal = shareFileHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + String contentEncodingInternal = null; + if (shareFileHttpHeaders != null) { + contentEncodingInternal = shareFileHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (shareFileHttpHeaders != null) { + contentLanguageInternal = shareFileHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + String cacheControlInternal = null; + if (shareFileHttpHeaders != null) { + cacheControlInternal = shareFileHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + byte[] contentMd5Internal = null; + if (shareFileHttpHeaders != null) { + contentMd5Internal = shareFileHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String contentDispositionInternal = null; + if (shareFileHttpHeaders != null) { + contentDispositionInternal = shareFileHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + String contentMD5Converted = Base64Util.encodeToString(contentMD5); + return service + .create(this.client.getUrl(), shareName, fileName, this.client.isAllowTrailingDot(), timeout, + this.client.getVersion(), fileContentLength, fileTypeConstant, contentType, contentEncoding, + contentLanguage, cacheControl, contentMd5Converted, contentDisposition, metadata, filePermission, + filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, + fileChangeTime, leaseId, this.client.getFileRequestIntent(), owner, group, fileMode, nfsFileType, + contentMD5Converted, filePropertySemantics, contentLength, optionalbody, accept, context) + .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } /** @@ -1971,18 +2146,478 @@ public void create(String shareName, String fileName, long fileContentLength, In * @param group Optional, NFS only. The owning group of the file or directory. * @param fileMode Optional, NFS only. The file mode of the file or directory. * @param nfsFileType Optional, NFS only. Type of the file or directory. + * @param contentMD5 An MD5 hash of the content. This hash is used to verify the integrity of the data during + * transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has + * arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error + * code 400 (Bad Request). + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. + * @param contentLength Specifies the number of bytes being transmitted in the request body. When the x-ms-write + * header is set to clear, the value of this header must be set to zero. + * @param optionalbody Initial data. * @param shareFileHttpHeaders Parameter group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown 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}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response<Void> createNoCustomHeadersWithResponse(String shareName, String fileName, long fileContentLength, + public Mono<Void> createAsync(String shareName, String fileName, long fileContentLength, Integer timeout, + Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, + String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, + String fileChangeTime, String leaseId, String owner, String group, String fileMode, NfsFileType nfsFileType, + byte[] contentMD5, FilePropertySemantics filePropertySemantics, Long contentLength, BinaryData optionalbody, + ShareFileHttpHeaders shareFileHttpHeaders) { + return createWithResponseAsync(shareName, fileName, fileContentLength, timeout, metadata, filePermission, + filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, + fileChangeTime, leaseId, owner, group, fileMode, nfsFileType, contentMD5, filePropertySemantics, + contentLength, optionalbody, shareFileHttpHeaders) + .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Creates a new file or replaces a file. Note it only initializes the file with no content. + * + * @param shareName The name of the target share. + * @param fileName The path of the target file. + * @param fileContentLength Specifies the maximum size for the file, up to 4 TB. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations">Setting + * Timeouts for File Service Operations.</a>. + * @param metadata A name-value pair to associate with a file storage object. + * @param filePermission If specified the permission (security descriptor) shall be set for the directory/file. This + * header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default + * value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the + * x-ms-file-permission or x-ms-file-permission-key should be specified. + * @param filePermissionFormat Optional. Available for version 2023-06-01 and later. Specifies the format in which + * the permission is returned. Acceptable values are SDDL or binary. If x-ms-file-permission-format is unspecified + * or explicitly set to SDDL, the permission is returned in SDDL format. If x-ms-file-permission-format is + * explicitly set to binary, the permission is returned as a base64 string representing the binary encoding of the + * permission. + * @param filePermissionKey Key of the permission to be set for the directory/file. Note: Only one of the + * x-ms-file-permission or x-ms-file-permission-key should be specified. + * @param fileAttributes If specified, the provided file attributes shall be set. Default value: ‘Archive’ for file + * and ‘Directory’ for directory. ‘None’ can also be specified as default. + * @param fileCreationTime Creation time for the file/directory. Default value: Now. + * @param fileLastWriteTime Last write time for the file/directory. Default value: Now. + * @param fileChangeTime Change time for the file/directory. Default value: Now. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param owner Optional, NFS only. The owner of the file or directory. + * @param group Optional, NFS only. The owning group of the file or directory. + * @param fileMode Optional, NFS only. The file mode of the file or directory. + * @param nfsFileType Optional, NFS only. Type of the file or directory. + * @param contentMD5 An MD5 hash of the content. This hash is used to verify the integrity of the data during + * transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has + * arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error + * code 400 (Bad Request). + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. + * @param contentLength Specifies the number of bytes being transmitted in the request body. When the x-ms-write + * header is set to clear, the value of this header must be set to zero. + * @param optionalbody Initial data. + * @param shareFileHttpHeaders Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Void> createAsync(String shareName, String fileName, long fileContentLength, Integer timeout, + Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, + String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, + String fileChangeTime, String leaseId, String owner, String group, String fileMode, NfsFileType nfsFileType, + byte[] contentMD5, FilePropertySemantics filePropertySemantics, Long contentLength, BinaryData optionalbody, + ShareFileHttpHeaders shareFileHttpHeaders, Context context) { + return createWithResponseAsync(shareName, fileName, fileContentLength, timeout, metadata, filePermission, + filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, + fileChangeTime, leaseId, owner, group, fileMode, nfsFileType, contentMD5, filePropertySemantics, + contentLength, optionalbody, shareFileHttpHeaders, context) + .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Creates a new file or replaces a file. Note it only initializes the file with no content. + * + * @param shareName The name of the target share. + * @param fileName The path of the target file. + * @param fileContentLength Specifies the maximum size for the file, up to 4 TB. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations">Setting + * Timeouts for File Service Operations.</a>. + * @param metadata A name-value pair to associate with a file storage object. + * @param filePermission If specified the permission (security descriptor) shall be set for the directory/file. This + * header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default + * value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the + * x-ms-file-permission or x-ms-file-permission-key should be specified. + * @param filePermissionFormat Optional. Available for version 2023-06-01 and later. Specifies the format in which + * the permission is returned. Acceptable values are SDDL or binary. If x-ms-file-permission-format is unspecified + * or explicitly set to SDDL, the permission is returned in SDDL format. If x-ms-file-permission-format is + * explicitly set to binary, the permission is returned as a base64 string representing the binary encoding of the + * permission. + * @param filePermissionKey Key of the permission to be set for the directory/file. Note: Only one of the + * x-ms-file-permission or x-ms-file-permission-key should be specified. + * @param fileAttributes If specified, the provided file attributes shall be set. Default value: ‘Archive’ for file + * and ‘Directory’ for directory. ‘None’ can also be specified as default. + * @param fileCreationTime Creation time for the file/directory. Default value: Now. + * @param fileLastWriteTime Last write time for the file/directory. Default value: Now. + * @param fileChangeTime Change time for the file/directory. Default value: Now. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param owner Optional, NFS only. The owner of the file or directory. + * @param group Optional, NFS only. The owning group of the file or directory. + * @param fileMode Optional, NFS only. The file mode of the file or directory. + * @param nfsFileType Optional, NFS only. Type of the file or directory. + * @param contentMD5 An MD5 hash of the content. This hash is used to verify the integrity of the data during + * transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has + * arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error + * code 400 (Bad Request). + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. + * @param contentLength Specifies the number of bytes being transmitted in the request body. When the x-ms-write + * header is set to clear, the value of this header must be set to zero. + * @param optionalbody Initial data. + * @param shareFileHttpHeaders Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<Void>> createNoCustomHeadersWithResponseAsync(String shareName, String fileName, + long fileContentLength, Integer timeout, Map<String, String> metadata, String filePermission, + FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, + String fileCreationTime, String fileLastWriteTime, String fileChangeTime, String leaseId, String owner, + String group, String fileMode, NfsFileType nfsFileType, byte[] contentMD5, + FilePropertySemantics filePropertySemantics, Long contentLength, BinaryData optionalbody, + ShareFileHttpHeaders shareFileHttpHeaders) { + return FluxUtil + .withContext(context -> createNoCustomHeadersWithResponseAsync(shareName, fileName, fileContentLength, + timeout, metadata, filePermission, filePermissionFormat, filePermissionKey, fileAttributes, + fileCreationTime, fileLastWriteTime, fileChangeTime, leaseId, owner, group, fileMode, nfsFileType, + contentMD5, filePropertySemantics, contentLength, optionalbody, shareFileHttpHeaders, context)) + .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); + } + + /** + * Creates a new file or replaces a file. Note it only initializes the file with no content. + * + * @param shareName The name of the target share. + * @param fileName The path of the target file. + * @param fileContentLength Specifies the maximum size for the file, up to 4 TB. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations">Setting + * Timeouts for File Service Operations.</a>. + * @param metadata A name-value pair to associate with a file storage object. + * @param filePermission If specified the permission (security descriptor) shall be set for the directory/file. This + * header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default + * value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the + * x-ms-file-permission or x-ms-file-permission-key should be specified. + * @param filePermissionFormat Optional. Available for version 2023-06-01 and later. Specifies the format in which + * the permission is returned. Acceptable values are SDDL or binary. If x-ms-file-permission-format is unspecified + * or explicitly set to SDDL, the permission is returned in SDDL format. If x-ms-file-permission-format is + * explicitly set to binary, the permission is returned as a base64 string representing the binary encoding of the + * permission. + * @param filePermissionKey Key of the permission to be set for the directory/file. Note: Only one of the + * x-ms-file-permission or x-ms-file-permission-key should be specified. + * @param fileAttributes If specified, the provided file attributes shall be set. Default value: ‘Archive’ for file + * and ‘Directory’ for directory. ‘None’ can also be specified as default. + * @param fileCreationTime Creation time for the file/directory. Default value: Now. + * @param fileLastWriteTime Last write time for the file/directory. Default value: Now. + * @param fileChangeTime Change time for the file/directory. Default value: Now. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param owner Optional, NFS only. The owner of the file or directory. + * @param group Optional, NFS only. The owning group of the file or directory. + * @param fileMode Optional, NFS only. The file mode of the file or directory. + * @param nfsFileType Optional, NFS only. Type of the file or directory. + * @param contentMD5 An MD5 hash of the content. This hash is used to verify the integrity of the data during + * transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has + * arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error + * code 400 (Bad Request). + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. + * @param contentLength Specifies the number of bytes being transmitted in the request body. When the x-ms-write + * header is set to clear, the value of this header must be set to zero. + * @param optionalbody Initial data. + * @param shareFileHttpHeaders Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<Void>> createNoCustomHeadersWithResponseAsync(String shareName, String fileName, + long fileContentLength, Integer timeout, Map<String, String> metadata, String filePermission, + FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, + String fileCreationTime, String fileLastWriteTime, String fileChangeTime, String leaseId, String owner, + String group, String fileMode, NfsFileType nfsFileType, byte[] contentMD5, + FilePropertySemantics filePropertySemantics, Long contentLength, BinaryData optionalbody, + ShareFileHttpHeaders shareFileHttpHeaders, Context context) { + final String fileTypeConstant = "file"; + final String accept = "application/xml"; + String contentTypeInternal = null; + if (shareFileHttpHeaders != null) { + contentTypeInternal = shareFileHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + String contentEncodingInternal = null; + if (shareFileHttpHeaders != null) { + contentEncodingInternal = shareFileHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (shareFileHttpHeaders != null) { + contentLanguageInternal = shareFileHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + String cacheControlInternal = null; + if (shareFileHttpHeaders != null) { + cacheControlInternal = shareFileHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + byte[] contentMd5Internal = null; + if (shareFileHttpHeaders != null) { + contentMd5Internal = shareFileHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String contentDispositionInternal = null; + if (shareFileHttpHeaders != null) { + contentDispositionInternal = shareFileHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + String contentMD5Converted = Base64Util.encodeToString(contentMD5); + return service + .createNoCustomHeaders(this.client.getUrl(), shareName, fileName, this.client.isAllowTrailingDot(), timeout, + this.client.getVersion(), fileContentLength, fileTypeConstant, contentType, contentEncoding, + contentLanguage, cacheControl, contentMd5Converted, contentDisposition, metadata, filePermission, + filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, + fileChangeTime, leaseId, this.client.getFileRequestIntent(), owner, group, fileMode, nfsFileType, + contentMD5Converted, filePropertySemantics, contentLength, optionalbody, accept, context) + .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); + } + + /** + * Creates a new file or replaces a file. Note it only initializes the file with no content. + * + * @param shareName The name of the target share. + * @param fileName The path of the target file. + * @param fileContentLength Specifies the maximum size for the file, up to 4 TB. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations">Setting + * Timeouts for File Service Operations.</a>. + * @param metadata A name-value pair to associate with a file storage object. + * @param filePermission If specified the permission (security descriptor) shall be set for the directory/file. This + * header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default + * value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the + * x-ms-file-permission or x-ms-file-permission-key should be specified. + * @param filePermissionFormat Optional. Available for version 2023-06-01 and later. Specifies the format in which + * the permission is returned. Acceptable values are SDDL or binary. If x-ms-file-permission-format is unspecified + * or explicitly set to SDDL, the permission is returned in SDDL format. If x-ms-file-permission-format is + * explicitly set to binary, the permission is returned as a base64 string representing the binary encoding of the + * permission. + * @param filePermissionKey Key of the permission to be set for the directory/file. Note: Only one of the + * x-ms-file-permission or x-ms-file-permission-key should be specified. + * @param fileAttributes If specified, the provided file attributes shall be set. Default value: ‘Archive’ for file + * and ‘Directory’ for directory. ‘None’ can also be specified as default. + * @param fileCreationTime Creation time for the file/directory. Default value: Now. + * @param fileLastWriteTime Last write time for the file/directory. Default value: Now. + * @param fileChangeTime Change time for the file/directory. Default value: Now. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param owner Optional, NFS only. The owner of the file or directory. + * @param group Optional, NFS only. The owning group of the file or directory. + * @param fileMode Optional, NFS only. The file mode of the file or directory. + * @param nfsFileType Optional, NFS only. Type of the file or directory. + * @param contentMD5 An MD5 hash of the content. This hash is used to verify the integrity of the data during + * transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has + * arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error + * code 400 (Bad Request). + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. + * @param contentLength Specifies the number of bytes being transmitted in the request body. When the x-ms-write + * header is set to clear, the value of this header must be set to zero. + * @param optionalbody Initial data. + * @param shareFileHttpHeaders Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase<FilesCreateHeaders, Void> createWithResponse(String shareName, String fileName, + long fileContentLength, Integer timeout, Map<String, String> metadata, String filePermission, + FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, + String fileCreationTime, String fileLastWriteTime, String fileChangeTime, String leaseId, String owner, + String group, String fileMode, NfsFileType nfsFileType, byte[] contentMD5, + FilePropertySemantics filePropertySemantics, Long contentLength, BinaryData optionalbody, + ShareFileHttpHeaders shareFileHttpHeaders, Context context) { + try { + final String fileTypeConstant = "file"; + final String accept = "application/xml"; + String contentTypeInternal = null; + if (shareFileHttpHeaders != null) { + contentTypeInternal = shareFileHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + String contentEncodingInternal = null; + if (shareFileHttpHeaders != null) { + contentEncodingInternal = shareFileHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (shareFileHttpHeaders != null) { + contentLanguageInternal = shareFileHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + String cacheControlInternal = null; + if (shareFileHttpHeaders != null) { + cacheControlInternal = shareFileHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + byte[] contentMd5Internal = null; + if (shareFileHttpHeaders != null) { + contentMd5Internal = shareFileHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String contentDispositionInternal = null; + if (shareFileHttpHeaders != null) { + contentDispositionInternal = shareFileHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + String contentMD5Converted = Base64Util.encodeToString(contentMD5); + return service.createSync(this.client.getUrl(), shareName, fileName, this.client.isAllowTrailingDot(), + timeout, this.client.getVersion(), fileContentLength, fileTypeConstant, contentType, contentEncoding, + contentLanguage, cacheControl, contentMd5Converted, contentDisposition, metadata, filePermission, + filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, + fileChangeTime, leaseId, this.client.getFileRequestIntent(), owner, group, fileMode, nfsFileType, + contentMD5Converted, filePropertySemantics, contentLength, optionalbody, accept, context); + } catch (ShareStorageExceptionInternal internalException) { + throw ModelHelper.mapToShareStorageException(internalException); + } + } + + /** + * Creates a new file or replaces a file. Note it only initializes the file with no content. + * + * @param shareName The name of the target share. + * @param fileName The path of the target file. + * @param fileContentLength Specifies the maximum size for the file, up to 4 TB. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations">Setting + * Timeouts for File Service Operations.</a>. + * @param metadata A name-value pair to associate with a file storage object. + * @param filePermission If specified the permission (security descriptor) shall be set for the directory/file. This + * header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default + * value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the + * x-ms-file-permission or x-ms-file-permission-key should be specified. + * @param filePermissionFormat Optional. Available for version 2023-06-01 and later. Specifies the format in which + * the permission is returned. Acceptable values are SDDL or binary. If x-ms-file-permission-format is unspecified + * or explicitly set to SDDL, the permission is returned in SDDL format. If x-ms-file-permission-format is + * explicitly set to binary, the permission is returned as a base64 string representing the binary encoding of the + * permission. + * @param filePermissionKey Key of the permission to be set for the directory/file. Note: Only one of the + * x-ms-file-permission or x-ms-file-permission-key should be specified. + * @param fileAttributes If specified, the provided file attributes shall be set. Default value: ‘Archive’ for file + * and ‘Directory’ for directory. ‘None’ can also be specified as default. + * @param fileCreationTime Creation time for the file/directory. Default value: Now. + * @param fileLastWriteTime Last write time for the file/directory. Default value: Now. + * @param fileChangeTime Change time for the file/directory. Default value: Now. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param owner Optional, NFS only. The owner of the file or directory. + * @param group Optional, NFS only. The owning group of the file or directory. + * @param fileMode Optional, NFS only. The file mode of the file or directory. + * @param nfsFileType Optional, NFS only. Type of the file or directory. + * @param contentMD5 An MD5 hash of the content. This hash is used to verify the integrity of the data during + * transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has + * arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error + * code 400 (Bad Request). + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. + * @param contentLength Specifies the number of bytes being transmitted in the request body. When the x-ms-write + * header is set to clear, the value of this header must be set to zero. + * @param optionalbody Initial data. + * @param shareFileHttpHeaders Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ShareStorageExceptionInternal 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 create(String shareName, String fileName, long fileContentLength, Integer timeout, + Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, + String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, + String fileChangeTime, String leaseId, String owner, String group, String fileMode, NfsFileType nfsFileType, + byte[] contentMD5, FilePropertySemantics filePropertySemantics, Long contentLength, BinaryData optionalbody, + ShareFileHttpHeaders shareFileHttpHeaders) { + createWithResponse(shareName, fileName, fileContentLength, timeout, metadata, filePermission, + filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, + fileChangeTime, leaseId, owner, group, fileMode, nfsFileType, contentMD5, filePropertySemantics, + contentLength, optionalbody, shareFileHttpHeaders, Context.NONE); + } + + /** + * Creates a new file or replaces a file. Note it only initializes the file with no content. + * + * @param shareName The name of the target share. + * @param fileName The path of the target file. + * @param fileContentLength Specifies the maximum size for the file, up to 4 TB. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations">Setting + * Timeouts for File Service Operations.</a>. + * @param metadata A name-value pair to associate with a file storage object. + * @param filePermission If specified the permission (security descriptor) shall be set for the directory/file. This + * header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default + * value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the + * x-ms-file-permission or x-ms-file-permission-key should be specified. + * @param filePermissionFormat Optional. Available for version 2023-06-01 and later. Specifies the format in which + * the permission is returned. Acceptable values are SDDL or binary. If x-ms-file-permission-format is unspecified + * or explicitly set to SDDL, the permission is returned in SDDL format. If x-ms-file-permission-format is + * explicitly set to binary, the permission is returned as a base64 string representing the binary encoding of the + * permission. + * @param filePermissionKey Key of the permission to be set for the directory/file. Note: Only one of the + * x-ms-file-permission or x-ms-file-permission-key should be specified. + * @param fileAttributes If specified, the provided file attributes shall be set. Default value: ‘Archive’ for file + * and ‘Directory’ for directory. ‘None’ can also be specified as default. + * @param fileCreationTime Creation time for the file/directory. Default value: Now. + * @param fileLastWriteTime Last write time for the file/directory. Default value: Now. + * @param fileChangeTime Change time for the file/directory. Default value: Now. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param owner Optional, NFS only. The owner of the file or directory. + * @param group Optional, NFS only. The owning group of the file or directory. + * @param fileMode Optional, NFS only. The file mode of the file or directory. + * @param nfsFileType Optional, NFS only. Type of the file or directory. + * @param contentMD5 An MD5 hash of the content. This hash is used to verify the integrity of the data during + * transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has + * arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error + * code 400 (Bad Request). + * @param filePropertySemantics SMB only, default value is New. New will forcefully add the ARCHIVE attribute flag + * and alter the permissions specified in x-ms-file-permission to inherit missing permissions from the parent. + * Restore will apply changes without further modification. + * @param contentLength Specifies the number of bytes being transmitted in the request body. When the x-ms-write + * header is set to clear, the value of this header must be set to zero. + * @param optionalbody Initial data. + * @param shareFileHttpHeaders Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ShareStorageExceptionInternal thrown 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<Void> createNoCustomHeadersWithResponse(String shareName, String fileName, long fileContentLength, Integer timeout, Map<String, String> metadata, String filePermission, FilePermissionFormat filePermissionFormat, String filePermissionKey, String fileAttributes, String fileCreationTime, String fileLastWriteTime, String fileChangeTime, String leaseId, String owner, String group, String fileMode, NfsFileType nfsFileType, + byte[] contentMD5, FilePropertySemantics filePropertySemantics, Long contentLength, BinaryData optionalbody, ShareFileHttpHeaders shareFileHttpHeaders, Context context) { try { final String fileTypeConstant = "file"; @@ -2018,12 +2653,14 @@ public Response<Void> createNoCustomHeadersWithResponse(String shareName, String } String contentDisposition = contentDispositionInternal; String contentMd5Converted = Base64Util.encodeToString(contentMd5); + String contentMD5Converted = Base64Util.encodeToString(contentMD5); return service.createNoCustomHeadersSync(this.client.getUrl(), shareName, fileName, this.client.isAllowTrailingDot(), timeout, this.client.getVersion(), fileContentLength, fileTypeConstant, contentType, contentEncoding, contentLanguage, cacheControl, contentMd5Converted, contentDisposition, metadata, filePermission, filePermissionFormat, filePermissionKey, fileAttributes, fileCreationTime, fileLastWriteTime, fileChangeTime, leaseId, this.client.getFileRequestIntent(), owner, - group, fileMode, nfsFileType, accept, context); + group, fileMode, nfsFileType, contentMD5Converted, filePropertySemantics, contentLength, optionalbody, + accept, context); } catch (ShareStorageExceptionInternal internalException) { throw ModelHelper.mapToShareStorageException(internalException); } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/ServicesImpl.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/ServicesImpl.java index b16b76485ff0..d1e8849b338c 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/ServicesImpl.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/ServicesImpl.java @@ -10,6 +10,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -28,14 +29,17 @@ import com.azure.storage.file.share.implementation.models.ListSharesIncludeType; import com.azure.storage.file.share.implementation.models.ListSharesResponse; import com.azure.storage.file.share.implementation.models.ServicesGetPropertiesHeaders; +import com.azure.storage.file.share.implementation.models.ServicesGetUserDelegationKeyHeaders; import com.azure.storage.file.share.implementation.models.ServicesListSharesSegmentHeaders; import com.azure.storage.file.share.implementation.models.ServicesListSharesSegmentNextHeaders; import com.azure.storage.file.share.implementation.models.ServicesSetPropertiesHeaders; import com.azure.storage.file.share.implementation.models.ShareItemInternal; import com.azure.storage.file.share.implementation.models.ShareStorageExceptionInternal; import com.azure.storage.file.share.implementation.util.ModelHelper; +import com.azure.storage.file.share.models.KeyInfo; import com.azure.storage.file.share.models.ShareServiceProperties; import com.azure.storage.file.share.models.ShareTokenIntent; +import com.azure.storage.file.share.models.UserDelegationKey; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; @@ -192,6 +196,42 @@ Response<ListSharesResponse> listSharesSegmentNoCustomHeadersSync(@HostParam("ur @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, @HeaderParam("Accept") String accept, Context context); + @Post("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ShareStorageExceptionInternal.class) + Mono<ResponseBase<ServicesGetUserDelegationKeyHeaders, UserDelegationKey>> getUserDelegationKey( + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @BodyParam("application/xml") KeyInfo keyInfo, + @HeaderParam("Accept") String accept, Context context); + + @Post("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ShareStorageExceptionInternal.class) + Mono<Response<UserDelegationKey>> getUserDelegationKeyNoCustomHeaders(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @BodyParam("application/xml") KeyInfo keyInfo, + @HeaderParam("Accept") String accept, Context context); + + @Post("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ShareStorageExceptionInternal.class) + ResponseBase<ServicesGetUserDelegationKeyHeaders, UserDelegationKey> getUserDelegationKeySync( + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @BodyParam("application/xml") KeyInfo keyInfo, + @HeaderParam("Accept") String accept, Context context); + + @Post("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ShareStorageExceptionInternal.class) + Response<UserDelegationKey> getUserDelegationKeyNoCustomHeadersSync(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @BodyParam("application/xml") KeyInfo keyInfo, + @HeaderParam("Accept") String accept, Context context); + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ShareStorageExceptionInternal.class) @@ -1182,6 +1222,239 @@ public PagedIterable<ShareItemInternal> listSharesSegmentNoCustomHeaders(String nextLink -> listSharesSegmentNextSinglePage(nextLink, context)); } + /** + * Retrieves a user delegation key for the File service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations">Setting + * Timeouts for File Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<ResponseBase<ServicesGetUserDelegationKeyHeaders, UserDelegationKey>> + getUserDelegationKeyWithResponseAsync(KeyInfo keyInfo, Integer timeout, String requestId) { + return FluxUtil + .withContext(context -> getUserDelegationKeyWithResponseAsync(keyInfo, timeout, requestId, context)) + .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); + } + + /** + * Retrieves a user delegation key for the File service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations">Setting + * Timeouts for File Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<ResponseBase<ServicesGetUserDelegationKeyHeaders, UserDelegationKey>> + getUserDelegationKeyWithResponseAsync(KeyInfo keyInfo, Integer timeout, String requestId, Context context) { + final String restype = "service"; + final String comp = "userdelegationkey"; + final String accept = "application/xml"; + return service + .getUserDelegationKey(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, + keyInfo, accept, context) + .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); + } + + /** + * Retrieves a user delegation key for the File service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations">Setting + * Timeouts for File Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<UserDelegationKey> getUserDelegationKeyAsync(KeyInfo keyInfo, Integer timeout, String requestId) { + return getUserDelegationKeyWithResponseAsync(keyInfo, timeout, requestId) + .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieves a user delegation key for the File service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations">Setting + * Timeouts for File Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<UserDelegationKey> getUserDelegationKeyAsync(KeyInfo keyInfo, Integer timeout, String requestId, + Context context) { + return getUserDelegationKeyWithResponseAsync(keyInfo, timeout, requestId, context) + .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieves a user delegation key for the File service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations">Setting + * Timeouts for File Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<UserDelegationKey>> getUserDelegationKeyNoCustomHeadersWithResponseAsync(KeyInfo keyInfo, + Integer timeout, String requestId) { + return FluxUtil + .withContext( + context -> getUserDelegationKeyNoCustomHeadersWithResponseAsync(keyInfo, timeout, requestId, context)) + .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); + } + + /** + * Retrieves a user delegation key for the File service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations">Setting + * Timeouts for File Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<UserDelegationKey>> getUserDelegationKeyNoCustomHeadersWithResponseAsync(KeyInfo keyInfo, + Integer timeout, String requestId, Context context) { + final String restype = "service"; + final String comp = "userdelegationkey"; + final String accept = "application/xml"; + return service + .getUserDelegationKeyNoCustomHeaders(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), + requestId, keyInfo, accept, context) + .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); + } + + /** + * Retrieves a user delegation key for the File service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations">Setting + * Timeouts for File Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase<ServicesGetUserDelegationKeyHeaders, UserDelegationKey> + getUserDelegationKeyWithResponse(KeyInfo keyInfo, Integer timeout, String requestId, Context context) { + try { + final String restype = "service"; + final String comp = "userdelegationkey"; + final String accept = "application/xml"; + return service.getUserDelegationKeySync(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, keyInfo, accept, context); + } catch (ShareStorageExceptionInternal internalException) { + throw ModelHelper.mapToShareStorageException(internalException); + } + } + + /** + * Retrieves a user delegation key for the File service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations">Setting + * Timeouts for File Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UserDelegationKey getUserDelegationKey(KeyInfo keyInfo, Integer timeout, String requestId) { + try { + return getUserDelegationKeyWithResponse(keyInfo, timeout, requestId, Context.NONE).getValue(); + } catch (ShareStorageExceptionInternal internalException) { + throw ModelHelper.mapToShareStorageException(internalException); + } + } + + /** + * Retrieves a user delegation key for the File service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations">Setting + * Timeouts for File Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<UserDelegationKey> getUserDelegationKeyNoCustomHeadersWithResponse(KeyInfo keyInfo, Integer timeout, + String requestId, Context context) { + try { + final String restype = "service"; + final String comp = "userdelegationkey"; + final String accept = "application/xml"; + return service.getUserDelegationKeyNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, keyInfo, accept, context); + } catch (ShareStorageExceptionInternal internalException) { + throw ModelHelper.mapToShareStorageException(internalException); + } + } + /** * Get the next page of items. * diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/SharesImpl.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/SharesImpl.java index 02a6f1155791..1ce207620adc 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/SharesImpl.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/SharesImpl.java @@ -103,6 +103,7 @@ Mono<ResponseBase<SharesCreateHeaders, Void>> create(@HostParam("url") String ur @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, @HeaderParam("x-ms-share-provisioned-iops") Long shareProvisionedIops, @HeaderParam("x-ms-share-provisioned-bandwidth-mibps") Long shareProvisionedBandwidthMibps, + @HeaderParam("x-ms-enable-smb-directory-lease") Boolean enableSmbDirectoryLease, @HeaderParam("Accept") String accept, Context context); @Put("/{shareName}") @@ -121,6 +122,7 @@ Mono<Response<Void>> createNoCustomHeaders(@HostParam("url") String url, @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, @HeaderParam("x-ms-share-provisioned-iops") Long shareProvisionedIops, @HeaderParam("x-ms-share-provisioned-bandwidth-mibps") Long shareProvisionedBandwidthMibps, + @HeaderParam("x-ms-enable-smb-directory-lease") Boolean enableSmbDirectoryLease, @HeaderParam("Accept") String accept, Context context); @Put("/{shareName}") @@ -139,6 +141,7 @@ ResponseBase<SharesCreateHeaders, Void> createSync(@HostParam("url") String url, @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, @HeaderParam("x-ms-share-provisioned-iops") Long shareProvisionedIops, @HeaderParam("x-ms-share-provisioned-bandwidth-mibps") Long shareProvisionedBandwidthMibps, + @HeaderParam("x-ms-enable-smb-directory-lease") Boolean enableSmbDirectoryLease, @HeaderParam("Accept") String accept, Context context); @Put("/{shareName}") @@ -157,6 +160,7 @@ Response<Void> createNoCustomHeadersSync(@HostParam("url") String url, @PathPara @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, @HeaderParam("x-ms-share-provisioned-iops") Long shareProvisionedIops, @HeaderParam("x-ms-share-provisioned-bandwidth-mibps") Long shareProvisionedBandwidthMibps, + @HeaderParam("x-ms-enable-smb-directory-lease") Boolean enableSmbDirectoryLease, @HeaderParam("Accept") String accept, Context context); @Get("/{shareName}") @@ -630,6 +634,7 @@ Mono<ResponseBase<SharesSetPropertiesHeaders, Void>> setProperties(@HostParam("u @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, @HeaderParam("x-ms-share-provisioned-iops") Long shareProvisionedIops, @HeaderParam("x-ms-share-provisioned-bandwidth-mibps") Long shareProvisionedBandwidthMibps, + @HeaderParam("x-ms-enable-smb-directory-lease") Boolean enableSmbDirectoryLease, @HeaderParam("Accept") String accept, Context context); @Put("/{shareName}") @@ -648,6 +653,7 @@ Mono<Response<Void>> setPropertiesNoCustomHeaders(@HostParam("url") String url, @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, @HeaderParam("x-ms-share-provisioned-iops") Long shareProvisionedIops, @HeaderParam("x-ms-share-provisioned-bandwidth-mibps") Long shareProvisionedBandwidthMibps, + @HeaderParam("x-ms-enable-smb-directory-lease") Boolean enableSmbDirectoryLease, @HeaderParam("Accept") String accept, Context context); @Put("/{shareName}") @@ -666,6 +672,7 @@ ResponseBase<SharesSetPropertiesHeaders, Void> setPropertiesSync(@HostParam("url @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, @HeaderParam("x-ms-share-provisioned-iops") Long shareProvisionedIops, @HeaderParam("x-ms-share-provisioned-bandwidth-mibps") Long shareProvisionedBandwidthMibps, + @HeaderParam("x-ms-enable-smb-directory-lease") Boolean enableSmbDirectoryLease, @HeaderParam("Accept") String accept, Context context); @Put("/{shareName}") @@ -684,6 +691,7 @@ Response<Void> setPropertiesNoCustomHeadersSync(@HostParam("url") String url, @HeaderParam("x-ms-file-request-intent") ShareTokenIntent fileRequestIntent, @HeaderParam("x-ms-share-provisioned-iops") Long shareProvisionedIops, @HeaderParam("x-ms-share-provisioned-bandwidth-mibps") Long shareProvisionedBandwidthMibps, + @HeaderParam("x-ms-enable-smb-directory-lease") Boolean enableSmbDirectoryLease, @HeaderParam("Accept") String accept, Context context); @Put("/{shareName}") @@ -931,6 +939,10 @@ Response<Void> restoreNoCustomHeadersSync(@HostParam("url") String url, * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -941,12 +953,12 @@ public Mono<ResponseBase<SharesCreateHeaders, Void>> createWithResponseAsync(Str Map<String, String> metadata, Integer quota, ShareAccessTier accessTier, String enabledProtocols, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, Long paidBurstingMaxIops, Long shareProvisionedIops, - Long shareProvisionedBandwidthMibps) { + Long shareProvisionedBandwidthMibps, Boolean enableSmbDirectoryLease) { return FluxUtil .withContext(context -> createWithResponseAsync(shareName, timeout, metadata, quota, accessTier, enabledProtocols, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, paidBurstingMaxIops, shareProvisionedIops, - shareProvisionedBandwidthMibps, context)) + shareProvisionedBandwidthMibps, enableSmbDirectoryLease, context)) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } @@ -976,6 +988,10 @@ public Mono<ResponseBase<SharesCreateHeaders, Void>> createWithResponseAsync(Str * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -987,13 +1003,13 @@ public Mono<ResponseBase<SharesCreateHeaders, Void>> createWithResponseAsync(Str Map<String, String> metadata, Integer quota, ShareAccessTier accessTier, String enabledProtocols, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, Long paidBurstingMaxIops, Long shareProvisionedIops, - Long shareProvisionedBandwidthMibps, Context context) { + Long shareProvisionedBandwidthMibps, Boolean enableSmbDirectoryLease, Context context) { final String restype = "share"; final String accept = "application/xml"; return service.create(this.client.getUrl(), shareName, restype, timeout, metadata, quota, accessTier, this.client.getVersion(), enabledProtocols, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, paidBurstingMaxIops, this.client.getFileRequestIntent(), - shareProvisionedIops, shareProvisionedBandwidthMibps, accept, context) + shareProvisionedIops, shareProvisionedBandwidthMibps, enableSmbDirectoryLease, accept, context) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } @@ -1023,6 +1039,10 @@ public Mono<ResponseBase<SharesCreateHeaders, Void>> createWithResponseAsync(Str * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1032,10 +1052,11 @@ public Mono<ResponseBase<SharesCreateHeaders, Void>> createWithResponseAsync(Str public Mono<Void> createAsync(String shareName, Integer timeout, Map<String, String> metadata, Integer quota, ShareAccessTier accessTier, String enabledProtocols, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, - Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps) { + Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, + Boolean enableSmbDirectoryLease) { return createWithResponseAsync(shareName, timeout, metadata, quota, accessTier, enabledProtocols, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, - paidBurstingMaxIops, shareProvisionedIops, shareProvisionedBandwidthMibps) + paidBurstingMaxIops, shareProvisionedIops, shareProvisionedBandwidthMibps, enableSmbDirectoryLease) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException) .flatMap(ignored -> Mono.empty()); } @@ -1066,6 +1087,10 @@ public Mono<Void> createAsync(String shareName, Integer timeout, Map<String, Str * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -1076,10 +1101,11 @@ public Mono<Void> createAsync(String shareName, Integer timeout, Map<String, Str public Mono<Void> createAsync(String shareName, Integer timeout, Map<String, String> metadata, Integer quota, ShareAccessTier accessTier, String enabledProtocols, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, - Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, Context context) { + Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, + Boolean enableSmbDirectoryLease, Context context) { return createWithResponseAsync(shareName, timeout, metadata, quota, accessTier, enabledProtocols, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, - paidBurstingMaxIops, shareProvisionedIops, shareProvisionedBandwidthMibps, context) + paidBurstingMaxIops, shareProvisionedIops, shareProvisionedBandwidthMibps, enableSmbDirectoryLease, context) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException) .flatMap(ignored -> Mono.empty()); } @@ -1110,6 +1136,10 @@ public Mono<Void> createAsync(String shareName, Integer timeout, Map<String, Str * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1120,12 +1150,12 @@ public Mono<Response<Void>> createNoCustomHeadersWithResponseAsync(String shareN Map<String, String> metadata, Integer quota, ShareAccessTier accessTier, String enabledProtocols, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, Long paidBurstingMaxIops, Long shareProvisionedIops, - Long shareProvisionedBandwidthMibps) { + Long shareProvisionedBandwidthMibps, Boolean enableSmbDirectoryLease) { return FluxUtil .withContext(context -> createNoCustomHeadersWithResponseAsync(shareName, timeout, metadata, quota, accessTier, enabledProtocols, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, paidBurstingMaxIops, shareProvisionedIops, - shareProvisionedBandwidthMibps, context)) + shareProvisionedBandwidthMibps, enableSmbDirectoryLease, context)) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } @@ -1155,6 +1185,10 @@ public Mono<Response<Void>> createNoCustomHeadersWithResponseAsync(String shareN * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -1166,13 +1200,13 @@ public Mono<Response<Void>> createNoCustomHeadersWithResponseAsync(String shareN Map<String, String> metadata, Integer quota, ShareAccessTier accessTier, String enabledProtocols, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, Long paidBurstingMaxIops, Long shareProvisionedIops, - Long shareProvisionedBandwidthMibps, Context context) { + Long shareProvisionedBandwidthMibps, Boolean enableSmbDirectoryLease, Context context) { final String restype = "share"; final String accept = "application/xml"; return service.createNoCustomHeaders(this.client.getUrl(), shareName, restype, timeout, metadata, quota, accessTier, this.client.getVersion(), enabledProtocols, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, paidBurstingMaxIops, this.client.getFileRequestIntent(), - shareProvisionedIops, shareProvisionedBandwidthMibps, accept, context) + shareProvisionedIops, shareProvisionedBandwidthMibps, enableSmbDirectoryLease, accept, context) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } @@ -1202,6 +1236,10 @@ public Mono<Response<Void>> createNoCustomHeadersWithResponseAsync(String shareN * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -1213,15 +1251,15 @@ public ResponseBase<SharesCreateHeaders, Void> createWithResponse(String shareNa Map<String, String> metadata, Integer quota, ShareAccessTier accessTier, String enabledProtocols, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, Long paidBurstingMaxIops, Long shareProvisionedIops, - Long shareProvisionedBandwidthMibps, Context context) { + Long shareProvisionedBandwidthMibps, Boolean enableSmbDirectoryLease, Context context) { try { final String restype = "share"; final String accept = "application/xml"; return service.createSync(this.client.getUrl(), shareName, restype, timeout, metadata, quota, accessTier, this.client.getVersion(), enabledProtocols, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, paidBurstingMaxIops, - this.client.getFileRequestIntent(), shareProvisionedIops, shareProvisionedBandwidthMibps, accept, - context); + this.client.getFileRequestIntent(), shareProvisionedIops, shareProvisionedBandwidthMibps, + enableSmbDirectoryLease, accept, context); } catch (ShareStorageExceptionInternal internalException) { throw ModelHelper.mapToShareStorageException(internalException); } @@ -1253,6 +1291,10 @@ public ResponseBase<SharesCreateHeaders, Void> createWithResponse(String shareNa * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1261,10 +1303,12 @@ public ResponseBase<SharesCreateHeaders, Void> createWithResponse(String shareNa public void create(String shareName, Integer timeout, Map<String, String> metadata, Integer quota, ShareAccessTier accessTier, String enabledProtocols, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, - Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps) { + Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, + Boolean enableSmbDirectoryLease) { createWithResponse(shareName, timeout, metadata, quota, accessTier, enabledProtocols, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, - paidBurstingMaxIops, shareProvisionedIops, shareProvisionedBandwidthMibps, Context.NONE); + paidBurstingMaxIops, shareProvisionedIops, shareProvisionedBandwidthMibps, enableSmbDirectoryLease, + Context.NONE); } /** @@ -1293,6 +1337,10 @@ public void create(String shareName, Integer timeout, Map<String, String> metada * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -1304,7 +1352,7 @@ public Response<Void> createNoCustomHeadersWithResponse(String shareName, Intege Map<String, String> metadata, Integer quota, ShareAccessTier accessTier, String enabledProtocols, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, Long paidBurstingMaxIops, Long shareProvisionedIops, - Long shareProvisionedBandwidthMibps, Context context) { + Long shareProvisionedBandwidthMibps, Boolean enableSmbDirectoryLease, Context context) { try { final String restype = "share"; final String accept = "application/xml"; @@ -1312,7 +1360,7 @@ public Response<Void> createNoCustomHeadersWithResponse(String shareName, Intege accessTier, this.client.getVersion(), enabledProtocols, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, paidBurstingMaxIops, this.client.getFileRequestIntent(), shareProvisionedIops, - shareProvisionedBandwidthMibps, accept, context); + shareProvisionedBandwidthMibps, enableSmbDirectoryLease, accept, context); } catch (ShareStorageExceptionInternal internalException) { throw ModelHelper.mapToShareStorageException(internalException); } @@ -3960,6 +4008,10 @@ public Response<SharePermission> getPermissionNoCustomHeadersWithResponse(String * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3969,11 +4021,12 @@ public Response<SharePermission> getPermissionNoCustomHeadersWithResponse(String public Mono<ResponseBase<SharesSetPropertiesHeaders, Void>> setPropertiesWithResponseAsync(String shareName, Integer timeout, Integer quota, ShareAccessTier accessTier, String leaseId, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, - Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps) { - return FluxUtil - .withContext(context -> setPropertiesWithResponseAsync(shareName, timeout, quota, accessTier, leaseId, - rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, - paidBurstingMaxIops, shareProvisionedIops, shareProvisionedBandwidthMibps, context)) + Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, + Boolean enableSmbDirectoryLease) { + return FluxUtil.withContext(context -> setPropertiesWithResponseAsync(shareName, timeout, quota, accessTier, + leaseId, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, + paidBurstingMaxBandwidthMibps, paidBurstingMaxIops, shareProvisionedIops, shareProvisionedBandwidthMibps, + enableSmbDirectoryLease, context)) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } @@ -4001,6 +4054,10 @@ public Mono<ResponseBase<SharesSetPropertiesHeaders, Void>> setPropertiesWithRes * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -4011,7 +4068,8 @@ public Mono<ResponseBase<SharesSetPropertiesHeaders, Void>> setPropertiesWithRes public Mono<ResponseBase<SharesSetPropertiesHeaders, Void>> setPropertiesWithResponseAsync(String shareName, Integer timeout, Integer quota, ShareAccessTier accessTier, String leaseId, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, - Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, Context context) { + Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, + Boolean enableSmbDirectoryLease, Context context) { final String restype = "share"; final String comp = "properties"; final String accept = "application/xml"; @@ -4019,7 +4077,7 @@ public Mono<ResponseBase<SharesSetPropertiesHeaders, Void>> setPropertiesWithRes .setProperties(this.client.getUrl(), shareName, restype, comp, timeout, this.client.getVersion(), quota, accessTier, leaseId, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, paidBurstingMaxIops, this.client.getFileRequestIntent(), - shareProvisionedIops, shareProvisionedBandwidthMibps, accept, context) + shareProvisionedIops, shareProvisionedBandwidthMibps, enableSmbDirectoryLease, accept, context) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } @@ -4047,6 +4105,10 @@ public Mono<ResponseBase<SharesSetPropertiesHeaders, Void>> setPropertiesWithRes * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -4056,10 +4118,10 @@ public Mono<ResponseBase<SharesSetPropertiesHeaders, Void>> setPropertiesWithRes public Mono<Void> setPropertiesAsync(String shareName, Integer timeout, Integer quota, ShareAccessTier accessTier, String leaseId, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, Long paidBurstingMaxIops, - Long shareProvisionedIops, Long shareProvisionedBandwidthMibps) { + Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, Boolean enableSmbDirectoryLease) { return setPropertiesWithResponseAsync(shareName, timeout, quota, accessTier, leaseId, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, - paidBurstingMaxIops, shareProvisionedIops, shareProvisionedBandwidthMibps) + paidBurstingMaxIops, shareProvisionedIops, shareProvisionedBandwidthMibps, enableSmbDirectoryLease) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException) .flatMap(ignored -> Mono.empty()); } @@ -4088,6 +4150,10 @@ public Mono<Void> setPropertiesAsync(String shareName, Integer timeout, Integer * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -4098,10 +4164,11 @@ public Mono<Void> setPropertiesAsync(String shareName, Integer timeout, Integer public Mono<Void> setPropertiesAsync(String shareName, Integer timeout, Integer quota, ShareAccessTier accessTier, String leaseId, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, Long paidBurstingMaxIops, - Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, Context context) { + Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, Boolean enableSmbDirectoryLease, + Context context) { return setPropertiesWithResponseAsync(shareName, timeout, quota, accessTier, leaseId, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, - paidBurstingMaxIops, shareProvisionedIops, shareProvisionedBandwidthMibps, context) + paidBurstingMaxIops, shareProvisionedIops, shareProvisionedBandwidthMibps, enableSmbDirectoryLease, context) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException) .flatMap(ignored -> Mono.empty()); } @@ -4130,6 +4197,10 @@ public Mono<Void> setPropertiesAsync(String shareName, Integer timeout, Integer * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -4139,12 +4210,13 @@ public Mono<Void> setPropertiesAsync(String shareName, Integer timeout, Integer public Mono<Response<Void>> setPropertiesNoCustomHeadersWithResponseAsync(String shareName, Integer timeout, Integer quota, ShareAccessTier accessTier, String leaseId, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, - Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps) { + Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, + Boolean enableSmbDirectoryLease) { return FluxUtil .withContext(context -> setPropertiesNoCustomHeadersWithResponseAsync(shareName, timeout, quota, accessTier, leaseId, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, paidBurstingMaxIops, shareProvisionedIops, - shareProvisionedBandwidthMibps, context)) + shareProvisionedBandwidthMibps, enableSmbDirectoryLease, context)) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } @@ -4172,6 +4244,10 @@ public Mono<Response<Void>> setPropertiesNoCustomHeadersWithResponseAsync(String * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -4182,14 +4258,15 @@ public Mono<Response<Void>> setPropertiesNoCustomHeadersWithResponseAsync(String public Mono<Response<Void>> setPropertiesNoCustomHeadersWithResponseAsync(String shareName, Integer timeout, Integer quota, ShareAccessTier accessTier, String leaseId, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, - Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, Context context) { + Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, + Boolean enableSmbDirectoryLease, Context context) { final String restype = "share"; final String comp = "properties"; final String accept = "application/xml"; return service.setPropertiesNoCustomHeaders(this.client.getUrl(), shareName, restype, comp, timeout, this.client.getVersion(), quota, accessTier, leaseId, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, paidBurstingMaxIops, this.client.getFileRequestIntent(), - shareProvisionedIops, shareProvisionedBandwidthMibps, accept, context) + shareProvisionedIops, shareProvisionedBandwidthMibps, enableSmbDirectoryLease, accept, context) .onErrorMap(ShareStorageExceptionInternal.class, ModelHelper::mapToShareStorageException); } @@ -4217,6 +4294,10 @@ public Mono<Response<Void>> setPropertiesNoCustomHeadersWithResponseAsync(String * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -4227,7 +4308,8 @@ public Mono<Response<Void>> setPropertiesNoCustomHeadersWithResponseAsync(String public ResponseBase<SharesSetPropertiesHeaders, Void> setPropertiesWithResponse(String shareName, Integer timeout, Integer quota, ShareAccessTier accessTier, String leaseId, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, - Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, Context context) { + Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, + Boolean enableSmbDirectoryLease, Context context) { try { final String restype = "share"; final String comp = "properties"; @@ -4235,8 +4317,8 @@ public ResponseBase<SharesSetPropertiesHeaders, Void> setPropertiesWithResponse( return service.setPropertiesSync(this.client.getUrl(), shareName, restype, comp, timeout, this.client.getVersion(), quota, accessTier, leaseId, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, paidBurstingMaxIops, - this.client.getFileRequestIntent(), shareProvisionedIops, shareProvisionedBandwidthMibps, accept, - context); + this.client.getFileRequestIntent(), shareProvisionedIops, shareProvisionedBandwidthMibps, + enableSmbDirectoryLease, accept, context); } catch (ShareStorageExceptionInternal internalException) { throw ModelHelper.mapToShareStorageException(internalException); } @@ -4266,6 +4348,10 @@ public ResponseBase<SharesSetPropertiesHeaders, Void> setPropertiesWithResponse( * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -4274,10 +4360,11 @@ public ResponseBase<SharesSetPropertiesHeaders, Void> setPropertiesWithResponse( public void setProperties(String shareName, Integer timeout, Integer quota, ShareAccessTier accessTier, String leaseId, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, Long paidBurstingMaxIops, - Long shareProvisionedIops, Long shareProvisionedBandwidthMibps) { + Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, Boolean enableSmbDirectoryLease) { setPropertiesWithResponse(shareName, timeout, quota, accessTier, leaseId, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, - paidBurstingMaxIops, shareProvisionedIops, shareProvisionedBandwidthMibps, Context.NONE); + paidBurstingMaxIops, shareProvisionedIops, shareProvisionedBandwidthMibps, enableSmbDirectoryLease, + Context.NONE); } /** @@ -4304,6 +4391,10 @@ public void setProperties(String shareName, Integer timeout, Integer quota, Shar * @param shareProvisionedBandwidthMibps Optional. Supported in version 2025-01-05 and later. Only allowed for * provisioned v2 file shares. Specifies the provisioned bandwidth of the share, in mebibytes per second (MiBps). If * this is not specified, the provisioned bandwidth is set to value calculated based on recommendation formula. + * @param enableSmbDirectoryLease SMB only, default is true. Specifies whether granting of new directory leases for + * directories present in a share are to be enabled or disabled. An input of true specifies that granting of new + * directory leases is to be allowed. An input of false specifies that granting of new directory leases is to be + * blocked. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageExceptionInternal thrown if the request is rejected by server. @@ -4314,7 +4405,8 @@ public void setProperties(String shareName, Integer timeout, Integer quota, Shar public Response<Void> setPropertiesNoCustomHeadersWithResponse(String shareName, Integer timeout, Integer quota, ShareAccessTier accessTier, String leaseId, ShareRootSquash rootSquash, Boolean enableSnapshotVirtualDirectoryAccess, Boolean paidBurstingEnabled, Long paidBurstingMaxBandwidthMibps, - Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, Context context) { + Long paidBurstingMaxIops, Long shareProvisionedIops, Long shareProvisionedBandwidthMibps, + Boolean enableSmbDirectoryLease, Context context) { try { final String restype = "share"; final String comp = "properties"; @@ -4322,8 +4414,8 @@ public Response<Void> setPropertiesNoCustomHeadersWithResponse(String shareName, return service.setPropertiesNoCustomHeadersSync(this.client.getUrl(), shareName, restype, comp, timeout, this.client.getVersion(), quota, accessTier, leaseId, rootSquash, enableSnapshotVirtualDirectoryAccess, paidBurstingEnabled, paidBurstingMaxBandwidthMibps, paidBurstingMaxIops, - this.client.getFileRequestIntent(), shareProvisionedIops, shareProvisionedBandwidthMibps, accept, - context); + this.client.getFileRequestIntent(), shareProvisionedIops, shareProvisionedBandwidthMibps, + enableSmbDirectoryLease, accept, context); } catch (ShareStorageExceptionInternal internalException) { throw ModelHelper.mapToShareStorageException(internalException); } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FilesCreateHeaders.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FilesCreateHeaders.java index ed8aae750388..c6f8e37bf2f3 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FilesCreateHeaders.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FilesCreateHeaders.java @@ -8,9 +8,11 @@ import com.azure.core.annotation.Generated; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; +import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; import com.azure.storage.file.share.models.NfsFileType; import java.time.OffsetDateTime; +import java.util.Base64; /** * The FilesCreateHeaders model. @@ -77,6 +79,12 @@ public final class FilesCreateHeaders { @Generated private String xMsMode; + /* + * The Content-MD5 property. + */ + @Generated + private byte[] contentMD5; + /* * The ETag property. */ @@ -101,6 +109,12 @@ public final class FilesCreateHeaders { @Generated private String xMsFileParentId; + /* + * The Content-Length property. + */ + @Generated + private Long contentLength; + /* * The x-ms-request-id property. */ @@ -190,6 +204,12 @@ public FilesCreateHeaders(HttpHeaders rawHeaders) { this.date = null; } this.xMsMode = rawHeaders.getValue(X_MS_MODE); + String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMD5 != null) { + this.contentMD5 = Base64.getDecoder().decode(contentMD5); + } else { + this.contentMD5 = null; + } this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); this.xMsFileAttributes = rawHeaders.getValue(X_MS_FILE_ATTRIBUTES); String xMsFileChangeTime = rawHeaders.getValue(X_MS_FILE_CHANGE_TIME); @@ -199,6 +219,12 @@ public FilesCreateHeaders(HttpHeaders rawHeaders) { this.xMsFileChangeTime = null; } this.xMsFileParentId = rawHeaders.getValue(X_MS_FILE_PARENT_ID); + String contentLength = rawHeaders.getValue(HttpHeaderName.CONTENT_LENGTH); + if (contentLength != null) { + this.contentLength = Long.parseLong(contentLength); + } else { + this.contentLength = null; + } this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); String xMsFileLastWriteTime = rawHeaders.getValue(X_MS_FILE_LAST_WRITE_TIME); if (xMsFileLastWriteTime != null) { @@ -443,6 +469,28 @@ public FilesCreateHeaders setXMsMode(String xMsMode) { return this; } + /** + * Get the contentMD5 property: The Content-MD5 property. + * + * @return the contentMD5 value. + */ + @Generated + public byte[] getContentMD5() { + return CoreUtils.clone(this.contentMD5); + } + + /** + * Set the contentMD5 property: The Content-MD5 property. + * + * @param contentMD5 the contentMD5 value to set. + * @return the FilesCreateHeaders object itself. + */ + @Generated + public FilesCreateHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); + return this; + } + /** * Get the eTag property: The ETag property. * @@ -531,6 +579,28 @@ public FilesCreateHeaders setXMsFileParentId(String xMsFileParentId) { return this; } + /** + * Get the contentLength property: The Content-Length property. + * + * @return the contentLength value. + */ + @Generated + public Long getContentLength() { + return this.contentLength; + } + + /** + * Set the contentLength property: The Content-Length property. + * + * @param contentLength the contentLength value to set. + * @return the FilesCreateHeaders object itself. + */ + @Generated + public FilesCreateHeaders setContentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + /** * Get the xMsRequestId property: The x-ms-request-id property. * diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/ServicesGetUserDelegationKeyHeaders.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/ServicesGetUserDelegationKeyHeaders.java new file mode 100644 index 000000000000..70a4468aa7f1 --- /dev/null +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/ServicesGetUserDelegationKeyHeaders.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.share.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.util.DateTimeRfc1123; +import java.time.OffsetDateTime; + +/** + * The ServicesGetUserDelegationKeyHeaders model. + */ +@Fluent +public final class ServicesGetUserDelegationKeyHeaders { + /* + * The x-ms-version property. + */ + @Generated + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @Generated + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @Generated + private String xMsClientRequestId; + + /* + * The Date property. + */ + @Generated + private DateTimeRfc1123 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ServicesGetUserDelegationKeyHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ServicesGetUserDelegationKeyHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } else { + this.date = null; + } + } + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + @Generated + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the ServicesGetUserDelegationKeyHeaders object itself. + */ + @Generated + public ServicesGetUserDelegationKeyHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + @Generated + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the ServicesGetUserDelegationKeyHeaders object itself. + */ + @Generated + public ServicesGetUserDelegationKeyHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + @Generated + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the ServicesGetUserDelegationKeyHeaders object itself. + */ + @Generated + public ServicesGetUserDelegationKeyHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + @Generated + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); + } + + /** + * Set the date property: The Date property. + * + * @param date the date value to set. + * @return the ServicesGetUserDelegationKeyHeaders object itself. + */ + @Generated + public ServicesGetUserDelegationKeyHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } +} diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/SharePropertiesInternal.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/SharePropertiesInternal.java index 7b664ca4c963..b59ff963df07 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/SharePropertiesInternal.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/SharePropertiesInternal.java @@ -183,6 +183,12 @@ public final class SharePropertiesInternal implements XmlSerializable<SharePrope @Generated private DateTimeRfc1123 nextAllowedProvisionedBandwidthDowngradeTime; + /* + * The EnableSmbDirectoryLease property. + */ + @Generated + private Boolean enableSmbDirectoryLease; + /* * Dictionary of <string> */ @@ -819,6 +825,28 @@ public OffsetDateTime getNextAllowedProvisionedBandwidthDowngradeTime() { return this; } + /** + * Get the enableSmbDirectoryLease property: The EnableSmbDirectoryLease property. + * + * @return the enableSmbDirectoryLease value. + */ + @Generated + public Boolean isEnableSmbDirectoryLease() { + return this.enableSmbDirectoryLease; + } + + /** + * Set the enableSmbDirectoryLease property: The EnableSmbDirectoryLease property. + * + * @param enableSmbDirectoryLease the enableSmbDirectoryLease value to set. + * @return the SharePropertiesInternal object itself. + */ + @Generated + public SharePropertiesInternal setEnableSmbDirectoryLease(Boolean enableSmbDirectoryLease) { + this.enableSmbDirectoryLease = enableSmbDirectoryLease; + return this; + } + /** * Get the metadata property: Dictionary of <string>. * @@ -884,6 +912,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt Objects.toString(this.nextAllowedProvisionedIopsDowngradeTime, null)); xmlWriter.writeStringElement("NextAllowedProvisionedBandwidthDowngradeTime", Objects.toString(this.nextAllowedProvisionedBandwidthDowngradeTime, null)); + xmlWriter.writeBooleanElement("EnableSmbDirectoryLease", this.enableSmbDirectoryLease); if (this.metadata != null) { xmlWriter.writeStartElement("Metadata"); for (Map.Entry<String, String> entry : this.metadata.entrySet()) { @@ -996,6 +1025,9 @@ public static SharePropertiesInternal fromXml(XmlReader xmlReader, String rootEl } else if ("NextAllowedProvisionedBandwidthDowngradeTime".equals(elementName.getLocalPart())) { deserializedSharePropertiesInternal.nextAllowedProvisionedBandwidthDowngradeTime = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("EnableSmbDirectoryLease".equals(elementName.getLocalPart())) { + deserializedSharePropertiesInternal.enableSmbDirectoryLease + = reader.getNullableElement(Boolean::parseBoolean); } else if ("Metadata".equals(elementName.getLocalPart())) { while (reader.nextElement() != XmlToken.END_ELEMENT) { if (deserializedSharePropertiesInternal.metadata == null) { diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/SharesGetPropertiesHeaders.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/SharesGetPropertiesHeaders.java index 4817b3a01e19..9aee16e2abd0 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/SharesGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/SharesGetPropertiesHeaders.java @@ -106,6 +106,12 @@ public final class SharesGetPropertiesHeaders { @Generated private LeaseDurationType xMsLeaseDuration; + /* + * The x-ms-enable-smb-directory-lease property. + */ + @Generated + private Boolean xMsEnableSmbDirectoryLease; + /* * The x-ms-request-id property. */ @@ -223,6 +229,9 @@ public final class SharesGetPropertiesHeaders { private static final HttpHeaderName X_MS_LEASE_DURATION = HttpHeaderName.fromString("x-ms-lease-duration"); + private static final HttpHeaderName X_MS_ENABLE_SMB_DIRECTORY_LEASE + = HttpHeaderName.fromString("x-ms-enable-smb-directory-lease"); + private static final HttpHeaderName X_MS_ACCESS_TIER_TRANSITION_STATE = HttpHeaderName.fromString("x-ms-access-tier-transition-state"); @@ -333,6 +342,12 @@ public SharesGetPropertiesHeaders(HttpHeaders rawHeaders) { } else { this.xMsLeaseDuration = null; } + String xMsEnableSmbDirectoryLease = rawHeaders.getValue(X_MS_ENABLE_SMB_DIRECTORY_LEASE); + if (xMsEnableSmbDirectoryLease != null) { + this.xMsEnableSmbDirectoryLease = Boolean.parseBoolean(xMsEnableSmbDirectoryLease); + } else { + this.xMsEnableSmbDirectoryLease = null; + } this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsAccessTierTransitionState = rawHeaders.getValue(X_MS_ACCESS_TIER_TRANSITION_STATE); String xMsShareNextAllowedQuotaDowngradeTime @@ -734,6 +749,28 @@ public SharesGetPropertiesHeaders setXMsLeaseDuration(LeaseDurationType xMsLease return this; } + /** + * Get the xMsEnableSmbDirectoryLease property: The x-ms-enable-smb-directory-lease property. + * + * @return the xMsEnableSmbDirectoryLease value. + */ + @Generated + public Boolean isXMsEnableSmbDirectoryLease() { + return this.xMsEnableSmbDirectoryLease; + } + + /** + * Set the xMsEnableSmbDirectoryLease property: The x-ms-enable-smb-directory-lease property. + * + * @param xMsEnableSmbDirectoryLease the xMsEnableSmbDirectoryLease value to set. + * @return the SharesGetPropertiesHeaders object itself. + */ + @Generated + public SharesGetPropertiesHeaders setXMsEnableSmbDirectoryLease(Boolean xMsEnableSmbDirectoryLease) { + this.xMsEnableSmbDirectoryLease = xMsEnableSmbDirectoryLease; + return this; + } + /** * Get the xMsRequestId property: The x-ms-request-id property. * diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/util/ShareSasImplUtil.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/util/ShareSasImplUtil.java index 2cb3bb6a632c..5006a119913d 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/util/ShareSasImplUtil.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/util/ShareSasImplUtil.java @@ -14,6 +14,7 @@ import com.azure.storage.common.sas.SasIpRange; import com.azure.storage.common.sas.SasProtocol; import com.azure.storage.file.share.ShareServiceVersion; +import com.azure.storage.file.share.models.UserDelegationKey; import com.azure.storage.file.share.sas.ShareFileSasPermission; import com.azure.storage.file.share.sas.ShareSasPermission; import com.azure.storage.file.share.sas.ShareServiceSasSignatureValues; @@ -47,32 +48,20 @@ public class ShareSasImplUtil { .get(Constants.PROPERTY_AZURE_STORAGE_SAS_SERVICE_VERSION, ShareServiceVersion.getLatest().getVersion()); private SasProtocol protocol; - private OffsetDateTime startTime; - private OffsetDateTime expiryTime; - private String permissions; - private SasIpRange sasIpRange; - private String shareName; - private String filePath; - private String resource; - private String identifier; - private String cacheControl; - private String contentDisposition; - private String contentEncoding; - private String contentLanguage; - private String contentType; + private String delegatedUserObjectId; /** * Creates a new {@link ShareSasImplUtil} with the specified parameters @@ -106,6 +95,7 @@ public ShareSasImplUtil(ShareServiceSasSignatureValues sasValues, String shareNa this.contentEncoding = sasValues.getContentEncoding(); this.contentLanguage = sasValues.getContentLanguage(); this.contentType = sasValues.getContentType(); + this.delegatedUserObjectId = sasValues.getDelegatedUserObjectId(); } /** @@ -144,15 +134,46 @@ public String generateSas(StorageSharedKeyCredential storageSharedKeyCredentials stringToSignHandler.accept(stringToSign); } - return encode(signature); + return encode(null /* userDelegationKey */, signature); + } + + /** + * Generates a Sas signed with a {@link UserDelegationKey} + * + * @param delegationKey {@link UserDelegationKey} + * @param accountName The account name + * @param stringToSignHandler For debugging purposes only. Returns the string to sign that was used to generate the + * signature. + * @param context Additional context that is passed through the code when generating a SAS. + * @return A String representing the Sas + */ + public String generateUserDelegationSas(UserDelegationKey delegationKey, String accountName, + Consumer<String> stringToSignHandler, Context context) { + StorageImplUtils.assertNotNull("delegationKey", delegationKey); + StorageImplUtils.assertNotNull("accountName", accountName); + + ensureState(); + + // Signature is generated on the un-url-encoded values. + final String canonicalName = getCanonicalName(accountName); + final String stringToSign = stringToSign(delegationKey, canonicalName); + StorageImplUtils.logStringToSign(LOGGER, stringToSign, context); + String signature = StorageImplUtils.computeHMac256(delegationKey.getValue(), stringToSign); + + if (stringToSignHandler != null) { + stringToSignHandler.accept(stringToSign); + } + + return encode(delegationKey, signature); } /** * Encodes a Sas from the values in this type. + * @param userDelegationKey The user delegation key, if available. * @param signature The signature of the Sas. * @return A String representing the Sas. */ - private String encode(String signature) { + private String encode(UserDelegationKey userDelegationKey, String signature) { /* We should be url-encoding each key and each value, but because we know all the keys and values will encode to themselves, we cheat except for the signature value. @@ -167,6 +188,22 @@ private String encode(String signature) { formatQueryParameterDate(new TimeAndFormat(this.expiryTime, null))); tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_IP_RANGE, this.sasIpRange); tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_IDENTIFIER, this.identifier); + if (userDelegationKey != null) { + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_OBJECT_ID, + userDelegationKey.getSignedObjectId()); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_TENANT_ID, + userDelegationKey.getSignedTenantId()); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_START, + formatQueryParameterDate(new TimeAndFormat(userDelegationKey.getSignedStart(), null))); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_EXPIRY, + formatQueryParameterDate(new TimeAndFormat(userDelegationKey.getSignedExpiry(), null))); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_SERVICE, + userDelegationKey.getSignedService()); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_VERSION, + userDelegationKey.getSignedVersion()); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_DELEGATED_USER_OBJECT_ID, + this.delegatedUserObjectId); + } tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_RESOURCE, this.resource); tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_PERMISSIONS, this.permissions); tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNATURE, signature); @@ -248,4 +285,23 @@ private String stringToSign(String canonicalName) { this.contentEncoding == null ? "" : this.contentEncoding, this.contentLanguage == null ? "" : this.contentLanguage, this.contentType == null ? "" : this.contentType); } + + private String stringToSign(final UserDelegationKey key, String canonicalName) { + return String.join("\n", this.permissions == null ? "" : this.permissions, + this.startTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), + this.expiryTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), canonicalName, + key.getSignedObjectId() == null ? "" : key.getSignedObjectId(), + key.getSignedTenantId() == null ? "" : key.getSignedTenantId(), + key.getSignedStart() == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(key.getSignedStart()), + key.getSignedExpiry() == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(key.getSignedExpiry()), + key.getSignedService() == null ? "" : key.getSignedService(), + key.getSignedVersion() == null ? "" : key.getSignedVersion(), "", // SignedKeyDelegatedUserTenantId, will be added in a future release. + this.delegatedUserObjectId == null ? "" : this.delegatedUserObjectId, + this.sasIpRange == null ? "" : this.sasIpRange.toString(), + this.protocol == null ? "" : this.protocol.toString(), VERSION == null ? "" : VERSION, + this.cacheControl == null ? "" : this.cacheControl, + this.contentDisposition == null ? "" : this.contentDisposition, + this.contentEncoding == null ? "" : this.contentEncoding, + this.contentLanguage == null ? "" : this.contentLanguage, this.contentType == null ? "" : this.contentType); + } } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/FilePropertySemantics.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/FilePropertySemantics.java new file mode 100644 index 000000000000..09d3dbc64747 --- /dev/null +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/FilePropertySemantics.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.share.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for FilePropertySemantics. + */ +public final class FilePropertySemantics extends ExpandableStringEnum<FilePropertySemantics> { + /** + * Static value New for FilePropertySemantics. + */ + @Generated + public static final FilePropertySemantics NEW = fromString("New"); + + /** + * Static value Restore for FilePropertySemantics. + */ + @Generated + public static final FilePropertySemantics RESTORE = fromString("Restore"); + + /** + * Creates a new instance of FilePropertySemantics value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public FilePropertySemantics() { + } + + /** + * Creates or finds a FilePropertySemantics from its string representation. + * + * @param name a name to look for. + * @return the corresponding FilePropertySemantics. + */ + @Generated + public static FilePropertySemantics fromString(String name) { + return fromString(name, FilePropertySemantics.class); + } + + /** + * Gets known FilePropertySemantics values. + * + * @return known FilePropertySemantics values. + */ + @Generated + public static Collection<FilePropertySemantics> values() { + return values(FilePropertySemantics.class); + } +} diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/KeyInfo.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/KeyInfo.java new file mode 100644 index 000000000000..37dcd8ba1b3a --- /dev/null +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/KeyInfo.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.share.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Key information. + */ +@Fluent +public final class KeyInfo implements XmlSerializable<KeyInfo> { + /* + * The date-time the key is active in ISO 8601 UTC time + */ + @Generated + private String start; + + /* + * The date-time the key expires in ISO 8601 UTC time + */ + @Generated + private String expiry; + + /** + * Creates an instance of KeyInfo class. + */ + @Generated + public KeyInfo() { + } + + /** + * Get the start property: The date-time the key is active in ISO 8601 UTC time. + * + * @return the start value. + */ + @Generated + public String getStart() { + return this.start; + } + + /** + * Set the start property: The date-time the key is active in ISO 8601 UTC time. + * + * @param start the start value to set. + * @return the KeyInfo object itself. + */ + @Generated + public KeyInfo setStart(String start) { + this.start = start; + return this; + } + + /** + * Get the expiry property: The date-time the key expires in ISO 8601 UTC time. + * + * @return the expiry value. + */ + @Generated + public String getExpiry() { + return this.expiry; + } + + /** + * Set the expiry property: The date-time the key expires in ISO 8601 UTC time. + * + * @param expiry the expiry value to set. + * @return the KeyInfo object itself. + */ + @Generated + public KeyInfo setExpiry(String expiry) { + this.expiry = expiry; + return this; + } + + @Generated + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Generated + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "KeyInfo" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Start", this.start); + xmlWriter.writeStringElement("Expiry", this.expiry); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of KeyInfo from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of KeyInfo if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the KeyInfo. + */ + @Generated + public static KeyInfo fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of KeyInfo from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of KeyInfo if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the KeyInfo. + */ + @Generated + public static KeyInfo fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "KeyInfo" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + KeyInfo deserializedKeyInfo = new KeyInfo(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Start".equals(elementName.getLocalPart())) { + deserializedKeyInfo.start = reader.getStringElement(); + } else if ("Expiry".equals(elementName.getLocalPart())) { + deserializedKeyInfo.expiry = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedKeyInfo; + }); + } +} diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareNfsSettings.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareNfsSettings.java new file mode 100644 index 000000000000..73a774a63d08 --- /dev/null +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareNfsSettings.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.share.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Settings for SMB protocol. + */ +@Fluent +public final class ShareNfsSettings implements XmlSerializable<ShareNfsSettings> { + /* + * Enable or disable encryption in transit. + */ + @Generated + private ShareNfsSettingsEncryptionInTransit encryptionInTransit; + + /** + * Creates an instance of ShareNfsSettings class. + */ + @Generated + public ShareNfsSettings() { + } + + /** + * Get the encryptionInTransit property: Enable or disable encryption in transit. + * + * @return the encryptionInTransit value. + */ + @Generated + public ShareNfsSettingsEncryptionInTransit getEncryptionInTransit() { + return this.encryptionInTransit; + } + + /** + * Set the encryptionInTransit property: Enable or disable encryption in transit. + * + * @param encryptionInTransit the encryptionInTransit value to set. + * @return the ShareNfsSettings object itself. + */ + @Generated + public ShareNfsSettings setEncryptionInTransit(ShareNfsSettingsEncryptionInTransit encryptionInTransit) { + this.encryptionInTransit = encryptionInTransit; + return this; + } + + @Generated + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Generated + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "NFS" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeXml(this.encryptionInTransit, "EncryptionInTransit"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of ShareNfsSettings from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of ShareNfsSettings if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the ShareNfsSettings. + */ + @Generated + public static ShareNfsSettings fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of ShareNfsSettings from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of ShareNfsSettings if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the ShareNfsSettings. + */ + @Generated + public static ShareNfsSettings fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "NFS" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + ShareNfsSettings deserializedShareNfsSettings = new ShareNfsSettings(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("EncryptionInTransit".equals(elementName.getLocalPart())) { + deserializedShareNfsSettings.encryptionInTransit + = ShareNfsSettingsEncryptionInTransit.fromXml(reader, "EncryptionInTransit"); + } else { + reader.skipElement(); + } + } + + return deserializedShareNfsSettings; + }); + } +} diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareNfsSettingsEncryptionInTransit.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareNfsSettingsEncryptionInTransit.java new file mode 100644 index 000000000000..3ab4d10f37a2 --- /dev/null +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareNfsSettingsEncryptionInTransit.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.share.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Enable or disable encryption in transit. + */ +@Fluent +public final class ShareNfsSettingsEncryptionInTransit implements XmlSerializable<ShareNfsSettingsEncryptionInTransit> { + /* + * If encryption in transit is required + */ + @Generated + private Boolean required; + + /** + * Creates an instance of ShareNfsSettingsEncryptionInTransit class. + */ + @Generated + public ShareNfsSettingsEncryptionInTransit() { + } + + /** + * Get the required property: If encryption in transit is required. + * + * @return the required value. + */ + @Generated + public Boolean isRequired() { + return this.required; + } + + /** + * Set the required property: If encryption in transit is required. + * + * @param required the required value to set. + * @return the ShareNfsSettingsEncryptionInTransit object itself. + */ + @Generated + public ShareNfsSettingsEncryptionInTransit setRequired(Boolean required) { + this.required = required; + return this; + } + + @Generated + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Generated + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = rootElementName == null || rootElementName.isEmpty() + ? "ShareNfsSettingsEncryptionInTransit" + : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeBooleanElement("Required", this.required); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of ShareNfsSettingsEncryptionInTransit from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of ShareNfsSettingsEncryptionInTransit if the XmlReader was pointing to an instance of it, or + * null if it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the ShareNfsSettingsEncryptionInTransit. + */ + @Generated + public static ShareNfsSettingsEncryptionInTransit fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of ShareNfsSettingsEncryptionInTransit from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of ShareNfsSettingsEncryptionInTransit if the XmlReader was pointing to an instance of it, or + * null if it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the ShareNfsSettingsEncryptionInTransit. + */ + @Generated + public static ShareNfsSettingsEncryptionInTransit fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + String finalRootElementName = rootElementName == null || rootElementName.isEmpty() + ? "ShareNfsSettingsEncryptionInTransit" + : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + ShareNfsSettingsEncryptionInTransit deserializedShareNfsSettingsEncryptionInTransit + = new ShareNfsSettingsEncryptionInTransit(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Required".equals(elementName.getLocalPart())) { + deserializedShareNfsSettingsEncryptionInTransit.required + = reader.getNullableElement(Boolean::parseBoolean); + } else { + reader.skipElement(); + } + } + + return deserializedShareNfsSettingsEncryptionInTransit; + }); + } +} diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareProperties.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareProperties.java index 1aa305654033..9293d4e89bae 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareProperties.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareProperties.java @@ -162,6 +162,12 @@ public final class ShareProperties implements XmlSerializable<ShareProperties> { */ private OffsetDateTime nextAllowedProvisionedBandwidthDowngradeTime; + /* + * Optional, default value is true. Only applicable to SMB shares. + * Specifies whether granting of new directory leases for directories present in a share are to be enabled or disabled. + */ + private Boolean enableSmbDirectoryLease; + /** * Creates a new instance of {@link ShareProperties}. */ @@ -796,6 +802,30 @@ public OffsetDateTime getNextAllowedProvisionedBandwidthDowngradeTime() { return this; } + /** + * Optional, default value is true. Only applicable to SMB shares. + * Specifies whether granting of new directory leases for directories present in a share are to be enabled or disabled. + * An input of true specifies that granting of new directory leases is to be allowed. + * An input of false specifies that granting of new directory leases is to be blocked. + * @return the enableSmbDirectoryLease value. + */ + public Boolean isSmbDirectoryLeaseEnabled() { + return enableSmbDirectoryLease; + } + + /** + * Optional, default value is true. Only applicable to SMB shares. + * Specifies whether granting of new directory leases for directories present in a share are to be enabled or disabled. + * An input of true specifies that granting of new directory leases is to be allowed. + * An input of false specifies that granting of new directory leases is to be blocked. + * @param enableSmbDirectoryLease the enableSmbDirectoryLease value to set. + * @return the ShareProperties object itself. + */ + public ShareProperties setSmbDirectoryLeaseEnabled(Boolean enableSmbDirectoryLease) { + this.enableSmbDirectoryLease = enableSmbDirectoryLease; + return this; + } + @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { return toXml(xmlWriter, null); diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareProtocolSettings.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareProtocolSettings.java index 1c450a295242..31dc752c64ad 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareProtocolSettings.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareProtocolSettings.java @@ -24,6 +24,12 @@ public final class ShareProtocolSettings implements XmlSerializable<ShareProtoco @Generated private ShareSmbSettings smb; + /* + * Settings for NFS protocol. + */ + @Generated + private ShareNfsSettings nfs; + /** * Creates an instance of ShareProtocolSettings class. */ @@ -53,6 +59,28 @@ public ShareProtocolSettings setSmb(ShareSmbSettings smb) { return this; } + /** + * Get the nfs property: Settings for NFS protocol. + * + * @return the nfs value. + */ + @Generated + public ShareNfsSettings getNfs() { + return this.nfs; + } + + /** + * Set the nfs property: Settings for NFS protocol. + * + * @param nfs the nfs value to set. + * @return the ShareProtocolSettings object itself. + */ + @Generated + public ShareProtocolSettings setNfs(ShareNfsSettings nfs) { + this.nfs = nfs; + return this; + } + @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -65,6 +93,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt rootElementName = rootElementName == null || rootElementName.isEmpty() ? "ProtocolSettings" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeXml(this.smb, "SMB"); + xmlWriter.writeXml(this.nfs, "NFS"); return xmlWriter.writeEndElement(); } @@ -102,6 +131,8 @@ public static ShareProtocolSettings fromXml(XmlReader xmlReader, String rootElem if ("SMB".equals(elementName.getLocalPart())) { deserializedShareProtocolSettings.smb = ShareSmbSettings.fromXml(reader, "SMB"); + } else if ("NFS".equals(elementName.getLocalPart())) { + deserializedShareProtocolSettings.nfs = ShareNfsSettings.fromXml(reader, "NFS"); } else { reader.skipElement(); } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareSmbSettings.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareSmbSettings.java index 293d23aa666b..db2f5a1ece99 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareSmbSettings.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareSmbSettings.java @@ -24,6 +24,12 @@ public final class ShareSmbSettings implements XmlSerializable<ShareSmbSettings> @Generated private SmbMultichannel multichannel; + /* + * Enable or disable encryption in transit. + */ + @Generated + private ShareSmbSettingsEncryptionInTransit encryptionInTransit; + /** * Creates an instance of ShareSmbSettings class. */ @@ -53,6 +59,28 @@ public ShareSmbSettings setMultichannel(SmbMultichannel multichannel) { return this; } + /** + * Get the encryptionInTransit property: Enable or disable encryption in transit. + * + * @return the encryptionInTransit value. + */ + @Generated + public ShareSmbSettingsEncryptionInTransit getEncryptionInTransit() { + return this.encryptionInTransit; + } + + /** + * Set the encryptionInTransit property: Enable or disable encryption in transit. + * + * @param encryptionInTransit the encryptionInTransit value to set. + * @return the ShareSmbSettings object itself. + */ + @Generated + public ShareSmbSettings setEncryptionInTransit(ShareSmbSettingsEncryptionInTransit encryptionInTransit) { + this.encryptionInTransit = encryptionInTransit; + return this; + } + @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -65,6 +93,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt rootElementName = rootElementName == null || rootElementName.isEmpty() ? "SMB" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeXml(this.multichannel, "Multichannel"); + xmlWriter.writeXml(this.encryptionInTransit, "EncryptionInTransit"); return xmlWriter.writeEndElement(); } @@ -101,6 +130,9 @@ public static ShareSmbSettings fromXml(XmlReader xmlReader, String rootElementNa if ("Multichannel".equals(elementName.getLocalPart())) { deserializedShareSmbSettings.multichannel = SmbMultichannel.fromXml(reader, "Multichannel"); + } else if ("EncryptionInTransit".equals(elementName.getLocalPart())) { + deserializedShareSmbSettings.encryptionInTransit + = ShareSmbSettingsEncryptionInTransit.fromXml(reader, "EncryptionInTransit"); } else { reader.skipElement(); } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareSmbSettingsEncryptionInTransit.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareSmbSettingsEncryptionInTransit.java new file mode 100644 index 000000000000..64e46a883d22 --- /dev/null +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareSmbSettingsEncryptionInTransit.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.share.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Enable or disable encryption in transit. + */ +@Fluent +public final class ShareSmbSettingsEncryptionInTransit implements XmlSerializable<ShareSmbSettingsEncryptionInTransit> { + /* + * If encryption in transit is required + */ + @Generated + private Boolean required; + + /** + * Creates an instance of ShareSmbSettingsEncryptionInTransit class. + */ + @Generated + public ShareSmbSettingsEncryptionInTransit() { + } + + /** + * Get the required property: If encryption in transit is required. + * + * @return the required value. + */ + @Generated + public Boolean isRequired() { + return this.required; + } + + /** + * Set the required property: If encryption in transit is required. + * + * @param required the required value to set. + * @return the ShareSmbSettingsEncryptionInTransit object itself. + */ + @Generated + public ShareSmbSettingsEncryptionInTransit setRequired(Boolean required) { + this.required = required; + return this; + } + + @Generated + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Generated + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = rootElementName == null || rootElementName.isEmpty() + ? "ShareSmbSettingsEncryptionInTransit" + : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeBooleanElement("Required", this.required); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of ShareSmbSettingsEncryptionInTransit from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of ShareSmbSettingsEncryptionInTransit if the XmlReader was pointing to an instance of it, or + * null if it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the ShareSmbSettingsEncryptionInTransit. + */ + @Generated + public static ShareSmbSettingsEncryptionInTransit fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of ShareSmbSettingsEncryptionInTransit from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of ShareSmbSettingsEncryptionInTransit if the XmlReader was pointing to an instance of it, or + * null if it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the ShareSmbSettingsEncryptionInTransit. + */ + @Generated + public static ShareSmbSettingsEncryptionInTransit fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + String finalRootElementName = rootElementName == null || rootElementName.isEmpty() + ? "ShareSmbSettingsEncryptionInTransit" + : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + ShareSmbSettingsEncryptionInTransit deserializedShareSmbSettingsEncryptionInTransit + = new ShareSmbSettingsEncryptionInTransit(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Required".equals(elementName.getLocalPart())) { + deserializedShareSmbSettingsEncryptionInTransit.required + = reader.getNullableElement(Boolean::parseBoolean); + } else { + reader.skipElement(); + } + } + + return deserializedShareSmbSettingsEncryptionInTransit; + }); + } +} diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/UserDelegationKey.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/UserDelegationKey.java new file mode 100644 index 000000000000..f130d3ec43ab --- /dev/null +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/UserDelegationKey.java @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.file.share.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * A user delegation key. + */ +@Fluent +public final class UserDelegationKey implements XmlSerializable<UserDelegationKey> { + /* + * The Azure Active Directory object ID in GUID format. + */ + @Generated + private String signedObjectId; + + /* + * The Azure Active Directory tenant ID in GUID format + */ + @Generated + private String signedTenantId; + + /* + * The date-time the key is active + */ + @Generated + private OffsetDateTime signedStart; + + /* + * The date-time the key expires + */ + @Generated + private OffsetDateTime signedExpiry; + + /* + * Abbreviation of the Azure Storage service that accepts the key + */ + @Generated + private String signedService; + + /* + * The service version that created the key + */ + @Generated + private String signedVersion; + + /* + * The key as a base64 string + */ + @Generated + private String value; + + /** + * Creates an instance of UserDelegationKey class. + */ + @Generated + public UserDelegationKey() { + } + + /** + * Get the signedObjectId property: The Azure Active Directory object ID in GUID format. + * + * @return the signedObjectId value. + */ + @Generated + public String getSignedObjectId() { + return this.signedObjectId; + } + + /** + * Set the signedObjectId property: The Azure Active Directory object ID in GUID format. + * + * @param signedObjectId the signedObjectId value to set. + * @return the UserDelegationKey object itself. + */ + @Generated + public UserDelegationKey setSignedObjectId(String signedObjectId) { + this.signedObjectId = signedObjectId; + return this; + } + + /** + * Get the signedTenantId property: The Azure Active Directory tenant ID in GUID format. + * + * @return the signedTenantId value. + */ + @Generated + public String getSignedTenantId() { + return this.signedTenantId; + } + + /** + * Set the signedTenantId property: The Azure Active Directory tenant ID in GUID format. + * + * @param signedTenantId the signedTenantId value to set. + * @return the UserDelegationKey object itself. + */ + @Generated + public UserDelegationKey setSignedTenantId(String signedTenantId) { + this.signedTenantId = signedTenantId; + return this; + } + + /** + * Get the signedStart property: The date-time the key is active. + * + * @return the signedStart value. + */ + @Generated + public OffsetDateTime getSignedStart() { + return this.signedStart; + } + + /** + * Set the signedStart property: The date-time the key is active. + * + * @param signedStart the signedStart value to set. + * @return the UserDelegationKey object itself. + */ + @Generated + public UserDelegationKey setSignedStart(OffsetDateTime signedStart) { + this.signedStart = signedStart; + return this; + } + + /** + * Get the signedExpiry property: The date-time the key expires. + * + * @return the signedExpiry value. + */ + @Generated + public OffsetDateTime getSignedExpiry() { + return this.signedExpiry; + } + + /** + * Set the signedExpiry property: The date-time the key expires. + * + * @param signedExpiry the signedExpiry value to set. + * @return the UserDelegationKey object itself. + */ + @Generated + public UserDelegationKey setSignedExpiry(OffsetDateTime signedExpiry) { + this.signedExpiry = signedExpiry; + return this; + } + + /** + * Get the signedService property: Abbreviation of the Azure Storage service that accepts the key. + * + * @return the signedService value. + */ + @Generated + public String getSignedService() { + return this.signedService; + } + + /** + * Set the signedService property: Abbreviation of the Azure Storage service that accepts the key. + * + * @param signedService the signedService value to set. + * @return the UserDelegationKey object itself. + */ + @Generated + public UserDelegationKey setSignedService(String signedService) { + this.signedService = signedService; + return this; + } + + /** + * Get the signedVersion property: The service version that created the key. + * + * @return the signedVersion value. + */ + @Generated + public String getSignedVersion() { + return this.signedVersion; + } + + /** + * Set the signedVersion property: The service version that created the key. + * + * @param signedVersion the signedVersion value to set. + * @return the UserDelegationKey object itself. + */ + @Generated + public UserDelegationKey setSignedVersion(String signedVersion) { + this.signedVersion = signedVersion; + return this; + } + + /** + * Get the value property: The key as a base64 string. + * + * @return the value value. + */ + @Generated + public String getValue() { + return this.value; + } + + /** + * Set the value property: The key as a base64 string. + * + * @param value the value value to set. + * @return the UserDelegationKey object itself. + */ + @Generated + public UserDelegationKey setValue(String value) { + this.value = value; + return this; + } + + @Generated + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Generated + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "UserDelegationKey" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("SignedOid", this.signedObjectId); + xmlWriter.writeStringElement("SignedTid", this.signedTenantId); + xmlWriter.writeStringElement("SignedStart", + this.signedStart == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.signedStart)); + xmlWriter.writeStringElement("SignedExpiry", + this.signedExpiry == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.signedExpiry)); + xmlWriter.writeStringElement("SignedService", this.signedService); + xmlWriter.writeStringElement("SignedVersion", this.signedVersion); + xmlWriter.writeStringElement("Value", this.value); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of UserDelegationKey from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of UserDelegationKey if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the UserDelegationKey. + */ + @Generated + public static UserDelegationKey fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of UserDelegationKey from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of UserDelegationKey if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the UserDelegationKey. + */ + @Generated + public static UserDelegationKey fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "UserDelegationKey" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + UserDelegationKey deserializedUserDelegationKey = new UserDelegationKey(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("SignedOid".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedObjectId = reader.getStringElement(); + } else if ("SignedTid".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedTenantId = reader.getStringElement(); + } else if ("SignedStart".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedStart + = reader.getNullableElement(dateString -> CoreUtils.parseBestOffsetDateTime(dateString)); + } else if ("SignedExpiry".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedExpiry + = reader.getNullableElement(dateString -> CoreUtils.parseBestOffsetDateTime(dateString)); + } else if ("SignedService".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedService = reader.getStringElement(); + } else if ("SignedVersion".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedVersion = reader.getStringElement(); + } else if ("Value".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.value = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedUserDelegationKey; + }); + } +} diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareDirectoryCreateOptions.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareDirectoryCreateOptions.java index 86163d82a656..46fed0b28c58 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareDirectoryCreateOptions.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareDirectoryCreateOptions.java @@ -20,6 +20,7 @@ public class ShareDirectoryCreateOptions { private FilePermissionFormat filePermissionFormat; private Map<String, String> metadata; private FilePosixProperties posixProperties; + // private FilePropertySemantics filePropertySemantics; PULLED FROM RELEASE /** * Creates a new instance of {@link ShareDirectoryCreateOptions}. @@ -133,4 +134,32 @@ public ShareDirectoryCreateOptions setPosixProperties(FilePosixProperties posixP this.posixProperties = posixProperties; return this; } + + /* PULLED FROM RELEASE + * Optional, only applicable to SMB directories. Gets how attributes and permissions should be set on the file. + * New: automatically adds the ARCHIVE file attribute flag to the file and uses Windows create file permissions + * semantics (ex: inherit from parent). + * Restore: does not modify file attribute flag and uses Windows update file permissions semantics. + * If Restore is specified, the file permission must also be provided, otherwise PropertySemantics will default to New. + * + * @return {@link FilePropertySemantics} + + public FilePropertySemantics getFilePropertySemantics() { + return filePropertySemantics; + } + + /** + * Optional, only applicable to SMB directories. Sets how attributes and permissions should be set on the file. + * New: automatically adds the ARCHIVE file attribute flag to the file and uses Windows create file permissions + * semantics (ex: inherit from parent). + * Restore: does not modify file attribute flag and uses Windows update file permissions semantics. + * If Restore is specified, the file permission must also be provided, otherwise PropertySemantics will default to New. + * + * @param filePropertySemantics {@link FilePropertySemantics} + * @return The updated options. + + public ShareDirectoryCreateOptions setFilePropertySemantics(FilePropertySemantics filePropertySemantics) { + this.filePropertySemantics = filePropertySemantics; + return this; + } */ } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareFileCreateOptions.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareFileCreateOptions.java index 89ad4f2298e3..8394060c5d43 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareFileCreateOptions.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareFileCreateOptions.java @@ -25,6 +25,8 @@ public class ShareFileCreateOptions { private Map<String, String> metadata; private ShareRequestConditions requestConditions; private FilePosixProperties posixProperties; + // private FilePropertySemantics filePropertySemantics; PULLED FROM RELEASE + // private BinaryData binaryData; /** * Creates a new instance of {@link ShareFileCreateOptions}. @@ -190,4 +192,54 @@ public ShareFileCreateOptions setPosixProperties(FilePosixProperties posixProper this.posixProperties = posixProperties; return this; } + + /* PULLED FROM RELEASE + * Optional, only applicable to SMB files. Gets how attributes and permissions should be set on the file. + * New: automatically adds the ARCHIVE file attribute flag to the file and uses Windows create file permissions + * semantics (ex: inherit from parent). + * Restore: does not modify file attribute flag and uses Windows update file permissions semantics. + * If Restore is specified, the file permission must also be provided, otherwise PropertySemantics will default to New. + * + * @return {@link FilePropertySemantics} + + public FilePropertySemantics getFilePropertySemantics() { + return filePropertySemantics; + } + + /* + * Optional, only applicable to SMB files. Sets how attributes and permissions should be set on the file. + * New: automatically adds the ARCHIVE file attribute flag to the file and uses Windows create file permissions + * semantics (ex: inherit from parent). + * Restore: does not modify file attribute flag and uses Windows update file permissions semantics. + * If Restore is specified, the file permission must also be provided, otherwise PropertySemantics will default to New. + * + * @param filePropertySemantics {@link FilePropertySemantics} + * @return The updated options. + + public ShareFileCreateOptions setFilePropertySemantics(FilePropertySemantics filePropertySemantics) { + this.filePropertySemantics = filePropertySemantics; + return this; + } + + /* + * Optional, valid for version 2026-02-06 and later. + * Gets the content to upload to the file when it is created. Must be less than or equal to 4 MiB in size. + * + * @return The {@link BinaryData}. + + public BinaryData getData() { + return binaryData; + } + + /* + * Optional, valid for version 2026-02-06 and later. + * Sets the content to upload to the file when it is created. Must be less than or equal to 4 MiB in size. + * + * @param binaryData The {@link BinaryData}. + * @return The updated options. + + public ShareFileCreateOptions setData(BinaryData binaryData) { + this.binaryData = binaryData; + return this; + } */ } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/sas/ShareServiceSasSignatureValues.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/sas/ShareServiceSasSignatureValues.java index 3272eb4fdcad..d4dcb7abc7f3 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/sas/ShareServiceSasSignatureValues.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/sas/ShareServiceSasSignatureValues.java @@ -51,6 +51,7 @@ public final class ShareServiceSasSignatureValues { private String contentEncoding; private String contentLanguage; private String contentType; + private String delegatedUserObjectId; /** * Creates an object with empty values for all fields. @@ -422,6 +423,30 @@ public ShareServiceSasSignatureValues setContentType(String contentType) { return this; } + /** + * Optional. Beginning in version 2025-07-05, this value specifies the Entra ID of the user that is authorized to + * use the resulting SAS URL. The resulting SAS URL must be used in conjunction with an Entra ID token that has been + * issued to the user specified in this value. + * + * @return The Entra ID of the user that is authorized to use the resulting SAS URL. + */ + public String getDelegatedUserObjectId() { + return delegatedUserObjectId; + } + + /** + * Optional. Beginning in version 2025-07-05, this value specifies the Entra ID of the user that is authorized to + * use the resulting SAS URL. The resulting SAS URL must be used in conjunction with an Entra ID token that has been + * issued to the user specified in this value. + * + * @param delegatedUserObjectId The Entra ID of the user that is authorized to use the resulting SAS URL. + * @return the updated ShareServiceSasSignatureValues object + */ + public ShareServiceSasSignatureValues setDelegatedUserObjectId(String delegatedUserObjectId) { + this.delegatedUserObjectId = delegatedUserObjectId; + return this; + } + /** * Uses an account's shared key credential to sign these signature values to produce the proper SAS query * parameters. diff --git a/sdk/storage/azure-storage-file-share/src/samples/README.md b/sdk/storage/azure-storage-file-share/src/samples/README.md index ee2991f11f88..9e5a5e63ead0 100644 --- a/sdk/storage/azure-storage-file-share/src/samples/README.md +++ b/sdk/storage/azure-storage-file-share/src/samples/README.md @@ -34,7 +34,7 @@ Following are examples for some common use-cases. More details about troubleshooting steps can be found [here][SDK_README_TROUBLESHOOTING]. ## Next steps -Start using Storage Queue Java SDK in your solutions. Our SDK details could be found at [SDK README][SDK_README]. +Start using Storage Share Java SDK in your solutions. Our SDK details could be found at [SDK README][SDK_README]. ### Additional Documentation For more extensive documentation on Azure Storage files, see the [REST API documentation][storage_file_rest]. diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryApiTests.java b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryApiTests.java index 9b4a089a8fc7..dbbb3dc03dcd 100644 --- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryApiTests.java +++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryApiTests.java @@ -1828,4 +1828,50 @@ public void directoryExistsHandlesParentNotFound() { assertEquals(ShareErrorCode.PARENT_NOT_FOUND.getValue(), response.getHeaders().getValue(ERROR_CODE_HEADER_NAME)); } + + /* PULLED FROM RELEASE + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @ParameterizedTest + @MethodSource("com.azure.storage.file.share.FileShareTestHelper#filePropertySemanticsSupplier") + public void createDirectoryFilePropertySemantics(FilePropertySemantics filePropertySemantics) { + ShareDirectoryCreateOptions options + = new ShareDirectoryCreateOptions().setFilePropertySemantics(filePropertySemantics); + + // For Create File and Directory with FilePropertySemantics == Restore, + // the File Permission property must be provided, otherwise FilePropertySemantics will default to new. + if (filePropertySemantics == FilePropertySemantics.RESTORE) { + options.setFilePermission(FILE_PERMISSION); + } + + Response<ShareDirectoryInfo> response = primaryDirectoryClient.createWithResponse(options, null, Context.NONE); + HttpHeader retrievedHeader = response.getRequest().getHeaders().get(X_MS_FILE_PROPERTY_SEMANTICS); + if (filePropertySemantics != null) { + assertEquals(filePropertySemantics.toString(), retrievedHeader.getValue()); + } else { + assertNull(retrievedHeader); + } + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @ParameterizedTest + @MethodSource("com.azure.storage.file.share.FileShareTestHelper#filePropertySemanticsSupplier") + public void createDirectoryIfNotExistsFilePropertySemantics(FilePropertySemantics filePropertySemantics) { + ShareDirectoryCreateOptions options + = new ShareDirectoryCreateOptions().setFilePropertySemantics(filePropertySemantics); + + // For Create File and Directory with FilePropertySemantics == Restore, + // the File Permission property must be provided, otherwise FilePropertySemantics will default to new. + if (filePropertySemantics == FilePropertySemantics.RESTORE) { + options.setFilePermission(FILE_PERMISSION); + } + + Response<ShareDirectoryInfo> response + = primaryDirectoryClient.createIfNotExistsWithResponse(options, null, Context.NONE); + HttpHeader retrievedHeader = response.getRequest().getHeaders().get(X_MS_FILE_PROPERTY_SEMANTICS); + if (filePropertySemantics != null) { + assertEquals(filePropertySemantics.toString(), retrievedHeader.getValue()); + } else { + assertNull(retrievedHeader); + } + } */ } diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryAsyncApiTests.java b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryAsyncApiTests.java index 9572c5f32ce0..664285c2d29b 100644 --- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryAsyncApiTests.java +++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryAsyncApiTests.java @@ -1153,4 +1153,51 @@ public void directoryExistsHandlesParentNotFound() { assertEquals(ShareErrorCode.PARENT_NOT_FOUND.getValue(), r.getHeaders().getValue(ERROR_CODE_HEADER_NAME)); }).verifyComplete(); } + + /* PULLED FROM RELEASE + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @ParameterizedTest + @MethodSource("com.azure.storage.file.share.FileShareTestHelper#filePropertySemanticsSupplier") + public void createDirectoryFilePropertySemantics(FilePropertySemantics filePropertySemantics) { + ShareDirectoryCreateOptions options + = new ShareDirectoryCreateOptions().setFilePropertySemantics(filePropertySemantics); + + // For Create File and Directory with FilePropertySemantics == Restore, + // the File Permission property must be provided, otherwise FilePropertySemantics will default to new. + if (filePropertySemantics == FilePropertySemantics.RESTORE) { + options.setFilePermission(FILE_PERMISSION); + } + + StepVerifier.create(primaryDirectoryAsyncClient.createWithResponse(options)).assertNext(r -> { + HttpHeader retrievedHeader = r.getRequest().getHeaders().get(X_MS_FILE_PROPERTY_SEMANTICS); + if (filePropertySemantics != null) { + assertEquals(filePropertySemantics.toString(), retrievedHeader.getValue()); + } else { + assertNull(retrievedHeader); + } + }).verifyComplete(); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @ParameterizedTest + @MethodSource("com.azure.storage.file.share.FileShareTestHelper#filePropertySemanticsSupplier") + public void createDirectoryIfNotExistsFilePropertySemantics(FilePropertySemantics filePropertySemantics) { + ShareDirectoryCreateOptions options + = new ShareDirectoryCreateOptions().setFilePropertySemantics(filePropertySemantics); + + // For Create File and Directory with FilePropertySemantics == Restore, + // the File Permission property must be provided, otherwise FilePropertySemantics will default to new. + if (filePropertySemantics == FilePropertySemantics.RESTORE) { + options.setFilePermission(FILE_PERMISSION); + } + + StepVerifier.create(primaryDirectoryAsyncClient.createIfNotExistsWithResponse(options)).assertNext(r -> { + HttpHeader retrievedHeader = r.getRequest().getHeaders().get(X_MS_FILE_PROPERTY_SEMANTICS); + if (filePropertySemantics != null) { + assertEquals(filePropertySemantics.toString(), retrievedHeader.getValue()); + } else { + assertNull(retrievedHeader); + } + }).verifyComplete(); + } */ } diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileApiTests.java b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileApiTests.java index b23ff7b48d83..55ea5a58eaae 100644 --- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileApiTests.java +++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileApiTests.java @@ -120,6 +120,8 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +// It is still necessary to test deprecated APIs. +@SuppressWarnings("deprecation") class FileApiTests extends FileShareTestBase { private ShareFileClient primaryFileClient; private ShareClient shareClient; @@ -724,7 +726,7 @@ public void downloadToFileRetryExhausted() throws Exception { primaryFileClient.create(DATA.getDefaultDataSize()); primaryFileClient.uploadFromFile(uploadFile.toString()); - // Throws a Exceptions.ReactiveException.class because of Flux.error + // Throws an Exceptions.ReactiveException.class because of Flux.error Throwable thrown = assertThrows(Throwable.class, () -> downloadClient.downloadToFile(outFile.toString())); assertInstanceOf(IOException.class, thrown.getCause()); @@ -866,7 +868,7 @@ public void uploadRangeOAuth() { } @ParameterizedTest - @MethodSource("bufferedUploadVariousPartitions") + @MethodSource("bufferedUploadVariousPartitionsSupplier") public void bufferedUploadVariousPartitions(Long length, Long uploadChunkLength) { primaryFileClient.create(length); ByteArrayInputStream data = new ByteArrayInputStream(getRandomByteArray(Math.toIntExact(length))); @@ -875,7 +877,7 @@ public void bufferedUploadVariousPartitions(Long length, Long uploadChunkLength) .setMaxSingleUploadSizeLong(uploadChunkLength))); } - private static Stream<Arguments> bufferedUploadVariousPartitions() { + private static Stream<Arguments> bufferedUploadVariousPartitionsSupplier() { return Stream.of(Arguments.of(1024L, null), Arguments.of(1024L, 1024L), Arguments.of(1024L, 256L), Arguments.of(4L * Constants.MB, null), Arguments.of(4L * Constants.MB, 1024L), Arguments.of(20L * Constants.MB, null), Arguments.of(20L * Constants.MB, 4L * Constants.MB)); @@ -1062,8 +1064,9 @@ public void downloadDataError() { } @Test + @SuppressWarnings("ResultOfMethodCallIgnored") public void uploadFileDoesNotExist() throws IOException { - File uploadFile = new File(testFolder.getPath() + "/fakefile.txt"); + File uploadFile = new File(testFolder.getPath() + "/fake_file.txt"); Files.deleteIfExists(uploadFile.toPath()); UncheckedIOException e = assertThrows(UncheckedIOException.class, () -> primaryFileClient.uploadFromFile(uploadFile.getPath())); @@ -1086,6 +1089,7 @@ public void uploadFileDoesNotExist() throws IOException { 8 * 1026 * 1024 + 10, // medium file not aligned to block 50 * Constants.MB // large file requiring multiple requests }) + @SuppressWarnings("ResultOfMethodCallIgnored") public void downloadFileBufferCopy(int fileSize) throws IOException { ShareServiceClient shareServiceClient = new ShareServiceClientBuilder().connectionString(ENVIRONMENT.getPrimaryAccount().getConnectionString()) @@ -1110,6 +1114,7 @@ public void downloadFileBufferCopy(int fileSize) throws IOException { } @Test + @SuppressWarnings("ResultOfMethodCallIgnored") public void uploadAndDownloadFileExists() throws IOException { String data = "Download file exists"; File downloadFile = new File(String.format("%s/%s.txt", testFolder.getPath(), prefix)); @@ -1223,7 +1228,7 @@ public void uploadRangeFromURLSourceErrorAndStatusCode() { ShareStorageException e = assertThrows(ShareStorageException.class, () -> destinationClient.uploadRangeFromUrl(5, 0, 0, primaryFileClient.getFileUrl())); - assertTrue(e.getStatusCode() == 401); + assertEquals(401, e.getStatusCode()); assertTrue(e.getServiceMessage().contains("NoAuthenticationInformation")); assertTrue(e.getServiceMessage() .contains( @@ -1248,7 +1253,7 @@ public void startCopySourceErrorAndStatusCode() { poller.waitForCompletion(); }); - assertTrue(e.getStatusCode() == 403); + assertEquals(403, e.getStatusCode()); assertTrue(e.getServiceMessage().contains("AuthorizationPermissionMismatch")); assertTrue(e.getServiceMessage() .contains("This request is not authorized to perform this operation using this permission.")); @@ -1258,7 +1263,7 @@ public void startCopySourceErrorAndStatusCode() { @Test public void uploadRangeFromURLOAuth() { ShareServiceClient oAuthServiceClient - = getOAuthServiceClientSharedKey(new ShareServiceClientBuilder().shareTokenIntent(ShareTokenIntent.BACKUP)); + = getOAuthServiceClient(new ShareServiceClientBuilder().shareTokenIntent(ShareTokenIntent.BACKUP)); ShareDirectoryClient dirClient = oAuthServiceClient.getShareClient(shareName).getDirectoryClient(generatePathName()); dirClient.create(); @@ -1339,8 +1344,6 @@ public void uploadRangeFromUrlPreserveFileLastWrittenOn() { null, null); ShareFileProperties resultProps = destinationClient.getProperties(); if (mode.equals(FileLastWrittenMode.PRESERVE)) { - // assertEquals(initialProps.getSmbProperties().getFileLastWriteTime(), resultProps.getSmbProperties() - // .getFileLastWriteTime()); assertTrue(FileShareTestHelper.compareDatesWithPrecision( initialProps.getSmbProperties().getFileLastWriteTime(), resultProps.getSmbProperties().getFileLastWriteTime())); @@ -1496,21 +1499,6 @@ public void startCopyError() { FileShareTestHelper.assertExceptionStatusCodeAndMessage(e, 400, ShareErrorCode.INVALID_HEADER_VALUE); } - // @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2024-08-04") - // @Test - // public void startCopySourceErrorAndStatusCode() { - // primaryFileClient.create(1024); - // - // ShareStorageException e = assertThrows(ShareStorageException.class, () -> { - // SyncPoller<ShareFileCopyInfo, Void> poller = primaryFileClient.beginCopy("https://error.file.core.windows.net/garbage", testMetadata, null); - // poller.waitForCompletion(); - // }); - // - // assertTrue(e.getStatusCode() == 400); - // assertTrue(e.getServiceMessage().contains("InvalidUri")); - // assertTrue(e.getServiceMessage().contains("The requested URI does not represent any resource on the server.")); - // } - @ParameterizedTest @MethodSource("com.azure.storage.file.share.FileShareTestHelper#startCopyArgumentsSupplier") public void startCopyWithOptions(boolean setFilePermissionKey, boolean setFilePermission, boolean ignoreReadOnly, @@ -1602,7 +1590,7 @@ public void startCopyFilePermissionFormat(FilePermissionFormat filePermissionFor @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2021-06-08") @Test public void startCopyWithOptionsChangeTime() { - ShareFileInfo client = primaryFileClient.create(1024); + primaryFileClient.create(1024); String sourceURL = primaryFileClient.getFileUrl(); // We recreate file properties for each test since we need to store the times for the test with // testResourceNamer.now() @@ -2815,7 +2803,7 @@ public void renameFilePermissionAndKeySet() { () -> primaryFileClient .renameWithResponse( new ShareFileRenameOptions(generatePathName()).setFilePermission(filePermission) - .setSmbProperties(new FileSmbProperties().setFilePermissionKey("filePermissionkey")), + .setSmbProperties(new FileSmbProperties().setFilePermissionKey("filePermissionKey")), null, null) .getValue()); } @@ -2946,11 +2934,11 @@ public void renameDestACFail() { public void renameContentType() { primaryFileClient.create(512); Response<ShareFileClient> resp = primaryFileClient - .renameWithResponse(new ShareFileRenameOptions(generatePathName()).setContentType("mytype"), null, null); + .renameWithResponse(new ShareFileRenameOptions(generatePathName()).setContentType("type"), null, null); ShareFileClient renamedClient = resp.getValue(); ShareFileProperties props = renamedClient.getProperties(); - assertEquals("mytype", props.getContentType()); + assertEquals("type", props.getContentType()); } @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2021-04-10") @@ -3010,6 +2998,7 @@ public void getNonEncodedFileName(String fileName) { // This tests the policy is in the right place because if it were added per retry, it would be after the credentials // and auth would fail because we changed a signed header. + @Test public void perCallPolicy() { primaryFileClient.create(512); @@ -3100,6 +3089,7 @@ public void createNFS() { .setPosixProperties(new FilePosixProperties().setOwner("345").setGroup("123").setFileMode("7777")); ShareFileInfo response = premiumFileClient.createWithResponse(options, null, null).getValue(); + assertNotNull(response.getPosixProperties()); assertEquals(NfsFileType.REGULAR, response.getPosixProperties().getFileType()); assertEquals("345", response.getPosixProperties().getOwner()); assertEquals("123", response.getPosixProperties().getGroup()); @@ -3124,6 +3114,7 @@ public void setPropertiesNFS() { ShareFileInfo response = premiumFileClient.setPropertiesWithResponse(options, null, null).getValue(); + assertNotNull(response.getPosixProperties()); assertEquals("345", response.getPosixProperties().getOwner()); assertEquals("123", response.getPosixProperties().getGroup()); assertEquals("7777", response.getPosixProperties().getFileMode()); @@ -3145,6 +3136,7 @@ public void getPropertiesNFS() { ShareFileProperties response = premiumFileClient.getPropertiesWithResponse(null, null).getValue(); + assertNotNull(response.getPosixProperties()); assertEquals(NfsFileType.REGULAR, response.getPosixProperties().getFileType()); assertEquals("0", response.getPosixProperties().getOwner()); assertEquals("0", response.getPosixProperties().getGroup()); @@ -3200,6 +3192,7 @@ public void beginCopyNFS(ModeCopyMode modeAndOwnerCopyMode) { } else if (modeAndOwnerCopyMode == ModeCopyMode.SOURCE) { options.setModeCopyMode(ModeCopyMode.SOURCE); options.setOwnerCopyMode(OwnerCopyMode.SOURCE); + assertNotNull(sourceProperties.getPosixProperties()); owner = sourceProperties.getPosixProperties().getOwner(); group = sourceProperties.getPosixProperties().getGroup(); mode = sourceProperties.getPosixProperties().getFileMode(); @@ -3216,8 +3209,9 @@ public void beginCopyNFS(ModeCopyMode modeAndOwnerCopyMode) { ShareFileProperties resultProperties = premiumFileClientDest.getProperties(); assertNotNull(pollResponse.getValue().getCopyId()); - assertEquals(pollResponse.getStatus(), LongRunningOperationStatus.SUCCESSFULLY_COMPLETED); + assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, pollResponse.getStatus()); + assertNotNull(resultProperties.getPosixProperties()); assertEquals(owner, resultProperties.getPosixProperties().getOwner()); assertEquals(group, resultProperties.getPosixProperties().getGroup()); assertEquals(mode, resultProperties.getPosixProperties().getFileMode()); @@ -3245,6 +3239,7 @@ public void createHardLink() { ShareFileInfo response = hardLink.createHardLinkWithResponse(options, null, null).getValue(); + assertNotNull(response.getPosixProperties()); assertEquals(NfsFileType.REGULAR, response.getPosixProperties().getFileType()); assertEquals("0", response.getPosixProperties().getOwner()); assertEquals("0", response.getPosixProperties().getGroup()); @@ -3289,20 +3284,22 @@ public void createGetSymbolicLink() throws UnsupportedEncodingException { .setGroup(group); // Act - Response<ShareFileInfo> response = symlink.createSymbolicLinkWithResponse(options, null, null); + ShareFileInfo response = symlink.createSymbolicLinkWithResponse(options, null, null).getValue(); // Assert - assertEquals(NfsFileType.SYM_LINK, response.getValue().getPosixProperties().getFileType()); - assertEquals(owner, response.getValue().getPosixProperties().getOwner()); - assertEquals(group, response.getValue().getPosixProperties().getGroup()); - assertEquals(fileCreatedOn, response.getValue().getSmbProperties().getFileCreationTime()); - assertEquals(fileLastWrittenOn, response.getValue().getSmbProperties().getFileLastWriteTime()); - assertNull(response.getValue().getSmbProperties().getNtfsFileAttributes()); - assertNull(response.getValue().getSmbProperties().getFilePermissionKey()); + assertNotNull(response.getPosixProperties()); + assertEquals(NfsFileType.SYM_LINK, response.getPosixProperties().getFileType()); + assertEquals(owner, response.getPosixProperties().getOwner()); + assertEquals(group, response.getPosixProperties().getGroup()); + assertEquals(fileCreatedOn, response.getSmbProperties().getFileCreationTime()); + assertEquals(fileLastWrittenOn, response.getSmbProperties().getFileLastWriteTime()); - assertNotNull(response.getValue().getSmbProperties().getFileId()); - assertNotNull(response.getValue().getSmbProperties().getParentId()); + assertNull(response.getSmbProperties().getNtfsFileAttributes()); + assertNull(response.getSmbProperties().getFilePermissionKey()); + + assertNotNull(response.getSmbProperties().getFileId()); + assertNotNull(response.getSmbProperties().getParentId()); // Act Response<ShareFileSymbolicLinkInfo> getSymLinkResponse = symlink.getSymbolicLinkWithResponse(null, null); @@ -3382,4 +3379,127 @@ public void fileExistsHandlesParentNotFound() { assertEquals(ShareErrorCode.PARENT_NOT_FOUND.getValue(), response.getHeaders().getValue(ERROR_CODE_HEADER_NAME)); } + + /* PULLED FROM RELEASE + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @ParameterizedTest + @MethodSource("com.azure.storage.file.share.FileShareTestHelper#filePropertySemanticsSupplier") + public void createFileFilePropertySemantics(FilePropertySemantics filePropertySemantics) { + ShareFileCreateOptions options + = new ShareFileCreateOptions(Constants.KB).setFilePropertySemantics(filePropertySemantics); + + // For Create File and Directory with FilePropertySemantics == Restore, + // the File Permission property must be provided, otherwise FilePropertySemantics will default to new. + if (filePropertySemantics == FilePropertySemantics.RESTORE) { + options.setFilePermission(FILE_PERMISSION); + } + + Response<ShareFileInfo> response = primaryFileClient.createWithResponse(options, null, Context.NONE); + HttpHeader retrievedHeader = response.getRequest().getHeaders().get(X_MS_FILE_PROPERTY_SEMANTICS); + if (filePropertySemantics != null) { + assertEquals(filePropertySemantics.toString(), retrievedHeader.getValue()); + } else { + assertNull(retrievedHeader); + } + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @Test + public void createFileWithBinaryData() { + ShareFileCreateOptions options + = new ShareFileCreateOptions(DATA.getDefaultDataSize()).setData(DATA.getDefaultBinaryData()); + + primaryFileClient.createWithResponse(options, null, Context.NONE); + + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + primaryFileClient.download(stream); + + assertArrayEquals(DATA.getDefaultBytes(), stream.toByteArray()); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @Test + public void createFileWithBinaryDataFail() { + ShareFileCreateOptions options = new ShareFileCreateOptions(2L).setData(DATA.getDefaultBinaryData()); + + assertThrows(ShareStorageException.class, + () -> primaryFileClient.createWithResponse(options, null, Context.NONE)); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @Test + public void createFileWithBinaryDataPartiallyEmpty() { + ShareFileCreateOptions options = new ShareFileCreateOptions(Constants.KB).setData(DATA.getDefaultBinaryData()); + + primaryFileClient.createWithResponse(options, null, Context.NONE); + + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + primaryFileClient.download(stream); + + // When the max file size is larger than the data size, the rest of the file is zeroed out. + // We only check the part we wrote to here, which is why we use copyOfRange. + assertArrayEquals(DATA.getDefaultBytes(), + Arrays.copyOfRange(stream.toByteArray(), 0, DATA.getDefaultDataSize())); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @Test + public void createFileWithLargeBinaryData() { + byte[] randomByteArray = getRandomByteArray(Constants.MB * 4); + BinaryData data = BinaryData.fromBytes(randomByteArray); + + ShareFileCreateOptions options = new ShareFileCreateOptions(Constants.MB * 4).setData(data); + + primaryFileClient.createWithResponse(options, null, Context.NONE); + + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + primaryFileClient.download(stream); + + assertArrayEquals(randomByteArray, stream.toByteArray()); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @Test + public void createFileWithLargeBinaryDataPartiallyEmpty() { + byte[] randomByteArray = getRandomByteArray(Constants.MB * 4); + BinaryData data = BinaryData.fromBytes(randomByteArray); + + ShareFileCreateOptions options = new ShareFileCreateOptions(Constants.MB * 5).setData(data); + + primaryFileClient.createWithResponse(options, null, Context.NONE); + + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + primaryFileClient.download(stream); + + assertArrayEquals(randomByteArray, Arrays.copyOfRange(stream.toByteArray(), 0, Constants.MB * 4)); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @Test + public void createFileWithBinaryDataMD5() throws NoSuchAlgorithmException { + ShareFileCreateOptions options = new ShareFileCreateOptions(Constants.KB).setData(DATA.getDefaultBinaryData()); + + primaryFileClient.createWithResponse(options, null, Context.NONE); + + Response<ShareFileInfo> response = primaryFileClient.createWithResponse(options, null, Context.NONE); + String contentMD5 = response.getRequest().getHeaders().get(HttpHeaderName.CONTENT_MD5).getValue(); + byte[] decodedContentMd5 = Base64.getDecoder().decode(contentMD5); + + assertArrayEquals(MessageDigest.getInstance("MD5").digest(DATA.getDefaultText().getBytes()), decodedContentMd5); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @Test + public void createFileWithLargeBinaryDataPartiallyEmptyMD5() throws NoSuchAlgorithmException { + byte[] randomByteArray = getRandomByteArray(Constants.MB * 4); + BinaryData data = BinaryData.fromBytes(randomByteArray); + + ShareFileCreateOptions options = new ShareFileCreateOptions(Constants.MB * 5).setData(data); + + Response<ShareFileInfo> response = primaryFileClient.createWithResponse(options, null, Context.NONE); + String contentMD5 = response.getRequest().getHeaders().get(HttpHeaderName.CONTENT_MD5).getValue(); + byte[] decodedContentMd5 = Base64.getDecoder().decode(contentMD5); + + assertArrayEquals(MessageDigest.getInstance("MD5").digest(randomByteArray), decodedContentMd5); + } */ } diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileAsyncApiTests.java b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileAsyncApiTests.java index d1fbd396ae34..cdb7af270ad5 100644 --- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileAsyncApiTests.java +++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileAsyncApiTests.java @@ -87,6 +87,7 @@ import java.util.EnumSet; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Scanner; import java.util.stream.Stream; @@ -276,8 +277,8 @@ public void downloadFileBufferCopy(int fileSize) throws IOException { })) .then(shareServiceAsyncClient.deleteShare(shareName))).verifyComplete(); - file.delete(); - outFile.delete(); + assertTrue(file.delete()); + assertTrue(outFile.delete()); } @Test @@ -498,16 +499,13 @@ public void clearRangeLeaseFail() { @Test public void uploadFileDoesNotExist() { - File uploadFile = new File(testFolder.getPath() + "/fakefile.txt"); + File uploadFile = new File(testFolder.getPath() + "/fakeFile.txt"); if (uploadFile.exists()) { assertTrue(uploadFile.delete()); } StepVerifier.create(primaryFileAsyncClient.uploadFromFile(uploadFile.getPath())) .verifyErrorSatisfies(it -> assertInstanceOf(NoSuchFileException.class, it.getCause())); - - // cleanup - uploadFile.delete(); } @Test @@ -527,7 +525,7 @@ public void uploadAndDownloadFileExists() throws IOException { .verifyErrorSatisfies(it -> assertInstanceOf(FileAlreadyExistsException.class, it.getCause())); // cleanup - downloadFile.delete(); + assertTrue(downloadFile.delete()); } @Test @@ -552,7 +550,7 @@ public void uploadAndDownloadToFileDoesNotExist() throws FileNotFoundException { scanner.close(); // cleanup - downloadFile.delete(); + assertTrue(downloadFile.delete()); } @Test @@ -605,7 +603,7 @@ null, new ShareRequestConditions().setLeaseId(leaseId)))) .verifyComplete(); // cleanup - downloadFile.delete(); + assertTrue(downloadFile.delete()); } @Test @@ -624,7 +622,7 @@ null, new ShareRequestConditions().setLeaseId(testResourceNamer.randomUuid())))) .verifyError(ShareStorageException.class); // cleanup - downloadFile.delete(); + assertTrue(downloadFile.delete()); } @Test @@ -763,7 +761,7 @@ public void uploadRangeFromURLSourceErrorAndStatusCode() { .then(destinationClient.uploadRangeFromUrl(5, 0, 0, primaryFileAsyncClient.getFileUrl()))) .verifyErrorSatisfies(r -> { ShareStorageException e = assertInstanceOf(ShareStorageException.class, r); - assertTrue(e.getStatusCode() == 401); + assertEquals(401, e.getStatusCode()); assertTrue(e.getServiceMessage().contains("NoAuthenticationInformation")); assertTrue(e.getServiceMessage() .contains( @@ -789,7 +787,7 @@ public void startCopySourceErrorAndStatusCode() { destFile.beginCopy(sourceUri, new ShareFileCopyOptions(), null)))) .verifyErrorSatisfies(error -> { ShareStorageException e = assertInstanceOf(ShareStorageException.class, error); - assertTrue(e.getStatusCode() == 403); + assertEquals(403, e.getStatusCode()); assertTrue(e.getServiceMessage().contains("AuthorizationPermissionMismatch")); assertTrue(e.getServiceMessage() .contains("This request is not authorized to perform this operation using this permission.")); @@ -799,8 +797,8 @@ public void startCopySourceErrorAndStatusCode() { @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2021-04-10") @Test public void uploadRangeFromURLOAuth() { - ShareServiceAsyncClient oAuthServiceClient = getOAuthServiceClientAsyncSharedKey( - new ShareServiceClientBuilder().shareTokenIntent(ShareTokenIntent.BACKUP)); + ShareServiceAsyncClient oAuthServiceClient + = getOAuthServiceAsyncClient(new ShareServiceClientBuilder().shareTokenIntent(ShareTokenIntent.BACKUP)); ShareDirectoryAsyncClient dirClient = oAuthServiceClient.getShareAsyncClient(shareName).getDirectoryClient(generatePathName()); @@ -851,7 +849,7 @@ public void uploadRangeFromURLOAuth() { return FluxUtil.collectBytesInByteBufferStream(r.getValue()); })).assertNext(bytes -> { //u - assertEquals(bytes[0], 117); + assertEquals(117, bytes[0]); }).verifyComplete(); } @@ -1709,6 +1707,8 @@ public void listRangesDiffWithRename(Boolean renameSupport) throws IOException { .block(); //setup options + assertNotNull(previousSnapshot); + assertNotNull(destFile); ShareFileListRangesDiffOptions options = new ShareFileListRangesDiffOptions(previousSnapshot.getSnapshot()); options.setRenameIncluded(renameSupport); @@ -1901,6 +1901,7 @@ public void createNFS() { StepVerifier.create(create).assertNext(r -> { ShareFileInfo response = r.getValue(); + assertNotNull(response.getPosixProperties()); assertEquals(NfsFileType.REGULAR, response.getPosixProperties().getFileType()); assertEquals("345", response.getPosixProperties().getOwner()); assertEquals("123", response.getPosixProperties().getGroup()); @@ -1927,6 +1928,7 @@ public void setPropertiesNFS() { StepVerifier.create(create).assertNext(r -> { ShareFileInfo response = r.getValue(); + assertNotNull(response.getPosixProperties()); assertEquals("345", response.getPosixProperties().getOwner()); assertEquals("123", response.getPosixProperties().getGroup()); assertEquals("7777", response.getPosixProperties().getFileMode()); @@ -1952,6 +1954,7 @@ public void getPropertiesNFS() { StepVerifier.create(create).assertNext(r -> { ShareFileProperties response = r.getValue(); + assertNotNull(response.getPosixProperties()); assertEquals(NfsFileType.REGULAR, response.getPosixProperties().getFileType()); assertEquals("0", response.getPosixProperties().getOwner()); assertEquals("0", response.getPosixProperties().getGroup()); @@ -2011,6 +2014,7 @@ public void beginCopyNFS(ModeCopyMode modeAndOwnerCopyMode) { } else if (modeAndOwnerCopyMode == ModeCopyMode.SOURCE) { options.setModeCopyMode(ModeCopyMode.SOURCE); options.setOwnerCopyMode(OwnerCopyMode.SOURCE); + assertNotNull(sourceProperties.getPosixProperties()); owner = sourceProperties.getPosixProperties().getOwner(); group = sourceProperties.getPosixProperties().getGroup(); mode = sourceProperties.getPosixProperties().getFileMode(); @@ -2029,6 +2033,7 @@ public void beginCopyNFS(ModeCopyMode modeAndOwnerCopyMode) { }); StepVerifier.create(setup).assertNext(r -> { + assertNotNull(r.getT1().getPosixProperties()); assertEquals(r.getT2(), r.getT1().getPosixProperties().getOwner()); assertEquals(r.getT3(), r.getT1().getPosixProperties().getGroup()); assertEquals(r.getT4(), r.getT1().getPosixProperties().getFileMode()); @@ -2056,6 +2061,7 @@ public void createHardLink() { .setRequestConditions(new ShareRequestConditions().setLeaseId(lease)); return hardLink.createHardLinkWithResponse(options).flatMap(res -> { ShareFileInfo info = res.getValue(); + assertNotNull(info.getPosixProperties()); assertEquals(NfsFileType.REGULAR, info.getPosixProperties().getFileType()); assertEquals("0", info.getPosixProperties().getOwner()); assertEquals("0", info.getPosixProperties().getGroup()); @@ -2106,7 +2112,8 @@ public void createGetSymbolicLink() { // Act & Assert return source.create(1024).then(symlink.createSymbolicLinkWithResponse(options)).flatMap(response -> { - assertEquals(NfsFileType.SYM_LINK, response.getValue().getPosixProperties().getFileType()); + assertEquals(NfsFileType.SYM_LINK, + Objects.requireNonNull(response.getValue().getPosixProperties()).getFileType()); assertEquals(owner, response.getValue().getPosixProperties().getOwner()); assertEquals(group, response.getValue().getPosixProperties().getGroup()); assertEquals(fileCreatedOn, response.getValue().getSmbProperties().getFileCreationTime()); @@ -2209,4 +2216,145 @@ public void fileExistsHandlesParentNotFound() { assertEquals(ShareErrorCode.PARENT_NOT_FOUND.getValue(), r.getHeaders().getValue(ERROR_CODE_HEADER_NAME)); }).verifyComplete(); } + + /* PULLED FROM RELEASE + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @ParameterizedTest + @MethodSource("com.azure.storage.file.share.FileShareTestHelper#filePropertySemanticsSupplier") + public void createFileFilePropertySemantics(FilePropertySemantics filePropertySemantics) { + ShareFileCreateOptions options + = new ShareFileCreateOptions(Constants.KB).setFilePropertySemantics(filePropertySemantics); + + // For Create File and Directory with FilePropertySemantics == Restore, + // the File Permission property must be provided, otherwise FilePropertySemantics will default to new. + if (filePropertySemantics == FilePropertySemantics.RESTORE) { + options.setFilePermission(FILE_PERMISSION); + } + + StepVerifier.create(primaryFileAsyncClient.createWithResponse(options)).assertNext(r -> { + HttpHeader retrievedHeader = r.getRequest().getHeaders().get(X_MS_FILE_PROPERTY_SEMANTICS); + if (filePropertySemantics != null) { + assertEquals(filePropertySemantics.toString(), retrievedHeader.getValue()); + } else { + assertNull(retrievedHeader); + } + }).verifyComplete(); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @Test + public void createFileWithBinaryData() { + ShareFileCreateOptions options + = new ShareFileCreateOptions(DATA.getDefaultDataSize()).setData(DATA.getDefaultBinaryData()); + + StepVerifier + .create(primaryFileAsyncClient.createWithResponse(options) + .then(FluxUtil.collectBytesInByteBufferStream(primaryFileAsyncClient.download()))) + .assertNext(bytes -> assertArrayEquals(DATA.getDefaultBytes(), bytes)) + .verifyComplete(); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @Test + public void createFileWithBinaryDataFail() { + ShareFileCreateOptions options = new ShareFileCreateOptions(2L).setData(DATA.getDefaultBinaryData()); + + StepVerifier.create(primaryFileAsyncClient.createWithResponse(options)) + .verifyError(ShareStorageException.class); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @Test + public void createFileWithBinaryDataPartiallyEmpty() { + ShareFileCreateOptions options = new ShareFileCreateOptions(Constants.KB).setData(DATA.getDefaultBinaryData()); + + StepVerifier + .create(primaryFileAsyncClient.createWithResponse(options) + .then(FluxUtil.collectBytesInByteBufferStream(primaryFileAsyncClient.download()))) + // When the max file size is larger than the data size, the rest of the file is zeroed out. + // We only check the part we wrote to here, which is why we use copyOfRange. + .assertNext(bytes -> assertArrayEquals(DATA.getDefaultBytes(), + Arrays.copyOfRange(bytes, 0, DATA.getDefaultDataSize()))) + .verifyComplete(); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @Test + public void createFileWithLargeBinaryData() { + byte[] randomByteArray = getRandomByteArray(Constants.MB * 4); + BinaryData data = BinaryData.fromBytes(randomByteArray); + + ShareFileCreateOptions options = new ShareFileCreateOptions(Constants.MB * 4).setData(data); + + StepVerifier + .create(primaryFileAsyncClient.createWithResponse(options) + .then(FluxUtil.collectBytesInByteBufferStream(primaryFileAsyncClient.download()))) + .assertNext(bytes -> assertArrayEquals(randomByteArray, bytes)) + .verifyComplete(); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @Test + public void createFileWithLargeBinaryDataBackedByFlux() { + ByteBuffer randomByteBuffer = getRandomByteBuffer(Constants.MB * 4); + + Mono<byte[]> response + = BinaryData.fromFlux(Flux.just(randomByteBuffer), Constants.MB * 4L, false).flatMap(data -> { + ShareFileCreateOptions options = new ShareFileCreateOptions(Constants.MB * 4).setData(data); + return primaryFileAsyncClient.createWithResponse(options) + .then(FluxUtil.collectBytesInByteBufferStream(primaryFileAsyncClient.download())); + }); + + StepVerifier.create(response) + .assertNext(bytes -> assertArrayEquals(randomByteBuffer.array(), bytes)) + .verifyComplete(); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @Test + public void createFileWithLargeBinaryDataPartiallyEmpty() { + byte[] randomByteArray = getRandomByteArray(Constants.MB * 4); + BinaryData data = BinaryData.fromBytes(randomByteArray); + + ShareFileCreateOptions options = new ShareFileCreateOptions(Constants.MB * 5).setData(data); + + StepVerifier + .create(primaryFileAsyncClient.createWithResponse(options) + .then(FluxUtil.collectBytesInByteBufferStream(primaryFileAsyncClient.download()))) + .assertNext(bytes -> assertArrayEquals(randomByteArray, Arrays.copyOfRange(bytes, 0, Constants.MB * 4))) + .verifyComplete(); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @Test + public void createFileWithBinaryDataMD5() throws NoSuchAlgorithmException { + ShareFileCreateOptions options = new ShareFileCreateOptions(Constants.KB).setData(DATA.getDefaultBinaryData()); + + MessageDigest md5Digest = MessageDigest.getInstance("MD5"); + byte[] expectedMd5 = md5Digest.digest(DATA.getDefaultText().getBytes()); + + StepVerifier.create(primaryFileAsyncClient.createWithResponse(options)).assertNext(response -> { + String contentMD5 = response.getRequest().getHeaders().get(HttpHeaderName.CONTENT_MD5).getValue(); + byte[] decodedContentMd5 = Base64.getDecoder().decode(contentMD5); + assertArrayEquals(expectedMd5, decodedContentMd5); + }).verifyComplete(); + } + + @RequiredServiceVersion(clazz = BlobServiceVersion.class, min = "2026-02-06") + @Test + public void createFileWithLargeBinaryDataPartiallyEmptyMD5() throws NoSuchAlgorithmException { + byte[] randomByteArray = getRandomByteArray(Constants.MB * 4); + BinaryData data = BinaryData.fromBytes(randomByteArray); + + ShareFileCreateOptions options = new ShareFileCreateOptions(Constants.MB * 5).setData(data); + + MessageDigest md5Digest = MessageDigest.getInstance("MD5"); + byte[] expectedMd5 = md5Digest.digest(randomByteArray); + + StepVerifier.create(primaryFileAsyncClient.createWithResponse(options)).assertNext(response -> { + String contentMD5 = response.getRequest().getHeaders().get(HttpHeaderName.CONTENT_MD5).getValue(); + byte[] decodedContentMd5 = Base64.getDecoder().decode(contentMD5); + assertArrayEquals(expectedMd5, decodedContentMd5); + }).verifyComplete(); + } */ } diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileSasClientTests.java b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileSasClientTests.java index b47257ce029c..6d72eb6e6091 100644 --- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileSasClientTests.java +++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileSasClientTests.java @@ -3,30 +3,53 @@ package com.azure.storage.file.share; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.sas.AccountSasPermission; import com.azure.storage.common.sas.AccountSasResourceType; import com.azure.storage.common.sas.AccountSasService; import com.azure.storage.common.sas.AccountSasSignatureValues; import com.azure.storage.common.sas.SasProtocol; +import com.azure.storage.common.test.shared.StorageCommonTestUtils; +import com.azure.storage.common.test.shared.extensions.LiveOnly; +import com.azure.storage.common.test.shared.extensions.RequiredServiceVersion; import com.azure.storage.file.share.models.ShareAccessPolicy; +import com.azure.storage.file.share.models.ShareErrorCode; +import com.azure.storage.file.share.models.ShareFileInfo; +import com.azure.storage.file.share.models.ShareFileProperties; +import com.azure.storage.file.share.models.ShareFileRange; +import com.azure.storage.file.share.models.ShareFileUploadInfo; +import com.azure.storage.file.share.models.ShareInfo; +import com.azure.storage.file.share.models.ShareProperties; import com.azure.storage.file.share.models.ShareSignedIdentifier; import com.azure.storage.file.share.models.ShareStorageException; +import com.azure.storage.file.share.models.ShareTokenIntent; +import com.azure.storage.file.share.models.UserDelegationKey; import com.azure.storage.file.share.sas.ShareFileSasPermission; import com.azure.storage.file.share.sas.ShareSasPermission; import com.azure.storage.file.share.sas.ShareServiceSasSignatureValues; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; import java.io.ByteArrayOutputStream; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; +import static com.azure.storage.common.test.shared.StorageCommonTestUtils.getOidFromToken; +import static com.azure.storage.file.share.FileShareTestHelper.assertExceptionStatusCodeAndMessage; +import static com.azure.storage.file.share.FileShareTestHelper.assertResponseStatusCode; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; class FileSasClientTests extends FileShareTestBase { @@ -179,4 +202,572 @@ public void rememberAboutStringToSignDeprecation() { assertEquals(deprecatedStringToSign, stringToSign); } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void fileSasUserDelegationDelegatedObjectId() { + liveTestScenarioWithRetry(() -> { + ShareFileSasPermission permissions = new ShareFileSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + ShareServiceSasSignatureValues sasValues + = new ShareServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = primaryFileClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. + ShareFileClient client = instrument(new ShareFileClientBuilder().endpoint(primaryFileClient.getFileUrl()) + .sasToken(sas) + .shareTokenIntent(ShareTokenIntent.BACKUP) + .credential(tokenCredential)).buildFileClient(); + + Response<ShareFileProperties> response = client.getPropertiesWithResponse(null, Context.NONE); + FileShareTestHelper.assertResponseStatusCode(response, 200); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void fileSasUserDelegationDelegatedObjectIdAsync() { + liveTestScenarioWithRetry(() -> { + ShareFileAsyncClient primaryFileAsyncClient = fileBuilderHelper(shareName, filePath).buildFileAsyncClient(); + ShareFileSasPermission permissions = new ShareFileSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + ShareServiceSasSignatureValues sasValues + = new ShareServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + + Flux<Response<ShareFileProperties>> response = getUserDelegationInfoAsync().flatMapMany(key -> { + String sas = primaryFileAsyncClient.generateUserDelegationSas(sasValues, key); + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. + ShareFileAsyncClient client + = instrument(new ShareFileClientBuilder().endpoint(primaryFileClient.getFileUrl()) + .sasToken(sas) + .shareTokenIntent(ShareTokenIntent.BACKUP) + .credential(tokenCredential)).buildFileAsyncClient(); + + return client.getPropertiesWithResponse(); + }); + + StepVerifier.create(response).assertNext(r -> assertResponseStatusCode(r, 200)).verifyComplete(); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void fileSasUserDelegationDelegatedObjectIdFail() { + liveTestScenarioWithRetry(() -> { + ShareFileSasPermission permissions = new ShareFileSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + ShareServiceSasSignatureValues sasValues + = new ShareServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = primaryFileClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. No token credential here. + ShareFileClient client = instrument(new ShareFileClientBuilder().endpoint(primaryFileClient.getFileUrl()) + .shareTokenIntent(ShareTokenIntent.BACKUP) + .sasToken(sas)).buildFileClient(); + + ShareStorageException e + = assertThrows(ShareStorageException.class, () -> client.getPropertiesWithResponse(null, Context.NONE)); + assertExceptionStatusCodeAndMessage(e, 403, ShareErrorCode.AUTHENTICATION_FAILED); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void fileSasUserDelegationDelegatedObjectIdFailAsync() { + liveTestScenarioWithRetry(() -> { + ShareFileAsyncClient primaryFileAsyncClient = fileBuilderHelper(shareName, filePath).buildFileAsyncClient(); + ShareFileSasPermission permissions = new ShareFileSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + ShareServiceSasSignatureValues sasValues + = new ShareServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + + Flux<Response<ShareFileProperties>> response = getUserDelegationInfoAsync().flatMapMany(key -> { + String sas = primaryFileAsyncClient.generateUserDelegationSas(sasValues, key); + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. No token credential here. + ShareFileAsyncClient client + = instrument(new ShareFileClientBuilder().endpoint(primaryFileClient.getFileUrl()) + .sasToken(sas) + .shareTokenIntent(ShareTokenIntent.BACKUP)).buildFileAsyncClient(); + + return client.getPropertiesWithResponse(); + }); + + StepVerifier.create(response) + .verifyErrorSatisfies( + e -> assertExceptionStatusCodeAndMessage(e, 403, ShareErrorCode.AUTHENTICATION_FAILED)); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void shareSasUserDelegationDelegatedObjectId() { + liveTestScenarioWithRetry(() -> { + ShareSasPermission permissions = new ShareSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + ShareServiceSasSignatureValues sasValues + = new ShareServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = primaryShareClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. + ShareClient client = instrument(new ShareClientBuilder().endpoint(primaryShareClient.getShareUrl()) + .sasToken(sas) + .shareTokenIntent(ShareTokenIntent.BACKUP) + .credential(tokenCredential)).buildClient(); + + Response<ShareProperties> response = client.getPropertiesWithResponse(null, Context.NONE); + FileShareTestHelper.assertResponseStatusCode(response, 200); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void shareSasUserDelegationDelegatedObjectIdAsync() { + liveTestScenarioWithRetry(() -> { + ShareAsyncClient primaryShareAsyncClient = shareBuilderHelper(shareName).buildAsyncClient(); + ShareSasPermission permissions = new ShareSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + ShareServiceSasSignatureValues sasValues + = new ShareServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + + Flux<Response<ShareProperties>> response = getUserDelegationInfoAsync().flatMapMany(key -> { + String sas = primaryShareAsyncClient.generateUserDelegationSas(sasValues, key); + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. + ShareAsyncClient client + = instrument(new ShareClientBuilder().endpoint(primaryShareAsyncClient.getShareUrl()) + .sasToken(sas) + .shareTokenIntent(ShareTokenIntent.BACKUP) + .credential(tokenCredential)).buildAsyncClient(); + + return client.getPropertiesWithResponse(); + }); + + StepVerifier.create(response).assertNext(r -> assertResponseStatusCode(r, 200)).verifyComplete(); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void shareSasUserDelegationDelegatedObjectIdFail() { + liveTestScenarioWithRetry(() -> { + ShareSasPermission permissions = new ShareSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + ShareServiceSasSignatureValues sasValues + = new ShareServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = primaryShareClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. No token credential here. + ShareClient client = instrument(new ShareClientBuilder().endpoint(primaryShareClient.getShareUrl()) + .sasToken(sas) + .shareTokenIntent(ShareTokenIntent.BACKUP)).buildClient(); + + ShareStorageException e + = assertThrows(ShareStorageException.class, () -> client.getPropertiesWithResponse(null, Context.NONE)); + assertExceptionStatusCodeAndMessage(e, 403, ShareErrorCode.AUTHENTICATION_FAILED); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void shareSasUserDelegationDelegatedObjectIdFailAsync() { + liveTestScenarioWithRetry(() -> { + ShareAsyncClient primaryShareAsyncClient = shareBuilderHelper(shareName).buildAsyncClient(); + ShareSasPermission permissions = new ShareSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + ShareServiceSasSignatureValues sasValues + = new ShareServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + + Flux<Response<ShareProperties>> response = getUserDelegationInfoAsync().flatMapMany(key -> { + String sas = primaryShareAsyncClient.generateUserDelegationSas(sasValues, key); + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. No token credential here. + ShareAsyncClient client + = instrument(new ShareClientBuilder().endpoint(primaryShareAsyncClient.getShareUrl()) + .sasToken(sas) + .shareTokenIntent(ShareTokenIntent.BACKUP)).buildAsyncClient(); + + return client.getPropertiesWithResponse(); + }); + + StepVerifier.create(response) + .verifyErrorSatisfies( + e -> assertExceptionStatusCodeAndMessage(e, 403, ShareErrorCode.AUTHENTICATION_FAILED)); + }); + } + + protected UserDelegationKey getUserDelegationInfo() { + UserDelegationKey key = getOAuthServiceClient().getUserDelegationKey(testResourceNamer.now().minusDays(1), + testResourceNamer.now().plusDays(1)); + String keyOid = testResourceNamer.recordValueFromConfig(key.getSignedObjectId()); + key.setSignedObjectId(keyOid); + String keyTid = testResourceNamer.recordValueFromConfig(key.getSignedTenantId()); + key.setSignedTenantId(keyTid); + return key; + } + + private Mono<UserDelegationKey> getUserDelegationInfoAsync() { + return getOAuthServiceAsyncClient() + .getUserDelegationKey(testResourceNamer.now().minusDays(1), testResourceNamer.now().plusDays(1)) + .flatMap(r -> { + String keyOid = testResourceNamer.recordValueFromConfig(r.getSignedObjectId()); + r.setSignedObjectId(keyOid); + String keyTid = testResourceNamer.recordValueFromConfig(r.getSignedTenantId()); + r.setSignedTenantId(keyTid); + return Mono.just(r); + }); + } + + // RBAC replication lag + // Make sure a file SAS with user delegation key CANNOT be used to access other files in the share + @Test + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void verifyScopeFileSasUserDelegation() { + liveTestScenarioWithRetry(() -> { + ShareFileSasPermission permissions = new ShareFileSasPermission().setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true); + + ShareServiceSasSignatureValues sasValues = generateValues(permissions); + + ShareFileClient client1 = primaryShareClient.createFile(generatePathName(), Constants.KB); + ShareFileClient client2 = primaryShareClient.createFile(generatePathName(), Constants.KB); + String client1Sas = client1.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + ShareFileClient correctClientAuth + = fileBuilderHelper(shareName, client1.getFilePath()).endpoint(client1.getFileUrl()) + .sasToken(client1Sas) + .shareTokenIntent(ShareTokenIntent.BACKUP) + .buildFileClient(); + + assertDoesNotThrow( + () -> correctClientAuth.uploadRange(DATA.getDefaultInputStream(), DATA.getDefaultDataSizeLong())); + + ShareFileClient wrongClientAuth + = fileBuilderHelper(shareName, client2.getFilePath()).endpoint(client2.getFileUrl()) + .sasToken(client1Sas) + .shareTokenIntent(ShareTokenIntent.BACKUP) + .buildFileClient(); + + assertThrows(ShareStorageException.class, + () -> wrongClientAuth.uploadRange(DATA.getDefaultInputStream(), DATA.getDefaultDataSizeLong())); + }); + } + + // RBAC replication lag + // Make sure a file SAS with user delegation key CANNOT be used to access other files in the share + @Test + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void verifyScopeAsyncFileSasUserDelegation() { + liveTestScenarioWithRetry(() -> { + ShareFileSasPermission permissions = new ShareFileSasPermission().setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true); + + ShareServiceSasSignatureValues sasValues = generateValues(permissions); + + ShareAsyncClient shareAsyncClient = shareBuilderHelper(shareName).buildAsyncClient(); + ShareFileAsyncClient client1 = shareAsyncClient.getFileClient(generatePathName()); + ShareFileAsyncClient client2 = shareAsyncClient.getFileClient(generatePathName()); + + String sas = client1.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + Mono<ShareFileInfo> createMono = client1.create(Constants.KB).then(client2.create(Constants.KB)); + + ShareFileAsyncClient correctClientAuth + = fileBuilderHelper(shareName, client1.getFilePath()).endpoint(client1.getFileUrl()) + .sasToken(sas) + .shareTokenIntent(ShareTokenIntent.BACKUP) + .buildFileAsyncClient(); + + ShareFileAsyncClient wrongClientAuth + = fileBuilderHelper(shareName, client2.getFilePath()).endpoint(client2.getFileUrl()) + .sasToken(sas) + .shareTokenIntent(ShareTokenIntent.BACKUP) + .buildFileAsyncClient(); + + Mono<ShareFileUploadInfo> correctClientAuthUpload + = correctClientAuth.uploadRange(DATA.getDefaultFlux(), DATA.getDefaultDataSizeLong()); + Mono<ShareFileUploadInfo> wrongClientAuthUpload + = wrongClientAuth.uploadRange(DATA.getDefaultFlux(), DATA.getDefaultDataSizeLong()); + + StepVerifier.create(createMono.then(correctClientAuthUpload)).expectNextCount(1).verifyComplete(); + + StepVerifier.create(wrongClientAuthUpload).verifyErrorSatisfies(r -> { + ShareStorageException e = assertInstanceOf(ShareStorageException.class, r); + assertEquals(ShareErrorCode.AUTHENTICATION_FAILED, e.getErrorCode()); + }); + + }); + } + + // RBAC replication lag + @Test + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void fileSasUserDelegation() { + liveTestScenarioWithRetry(() -> { + ShareFileSasPermission permissions = new ShareFileSasPermission().setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true); + + ShareServiceSasSignatureValues sasValues = generateValues(permissions); + + String sas = primaryFileClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + ShareFileClient client = fileBuilderHelper(shareName, filePath).endpoint(primaryFileClient.getFileUrl()) + .sasToken(sas) + .shareTokenIntent(ShareTokenIntent.BACKUP) + .buildFileClient(); + + client.uploadRange(DATA.getDefaultInputStream(), DATA.getDefaultDataSizeLong()); + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + client.downloadWithResponse(stream, new ShareFileRange(0L, DATA.getDefaultDataSizeLong() - 1), null, null, + Context.NONE); + + ShareFileProperties properties = client.getProperties(); + + assertArrayEquals(DATA.getDefaultBytes(), stream.toByteArray()); + assertTrue(validateSasProperties(properties)); + }); + } + + // RBAC replication lag + @Test + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void fileSasUserDelegationAsync() { + liveTestScenarioWithRetry(() -> { + ShareFileAsyncClient primaryFileAsyncClient = fileBuilderHelper(shareName, filePath).buildFileAsyncClient(); + ShareFileSasPermission permissions = new ShareFileSasPermission().setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true); + + ShareServiceSasSignatureValues sasValues = generateValues(permissions); + + Flux<Response<ShareFileProperties>> response = getUserDelegationInfoAsync().flatMapMany(key -> { + String sas = primaryFileAsyncClient.generateUserDelegationSas(sasValues, key); + ShareFileAsyncClient client + = instrument(new ShareFileClientBuilder().endpoint(primaryFileAsyncClient.getFileUrl()) + .sasToken(sas) + .shareTokenIntent(ShareTokenIntent.BACKUP)).buildFileAsyncClient(); + + return client.getPropertiesWithResponse(); + }); + + StepVerifier.create(response).assertNext(r -> assertResponseStatusCode(r, 200)).verifyComplete(); + }); + } + + // RBAC replication lag + @Test + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void shareSasUserDelegation() { + liveTestScenarioWithRetry(() -> { + ShareSasPermission permissions = new ShareSasPermission().setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true); + + ShareServiceSasSignatureValues sasValues = generateValues(permissions); + + String sas = primaryShareClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + ShareClient client = shareBuilderHelper(shareName).endpoint(primaryShareClient.getShareUrl()) + .sasToken(sas) + .shareTokenIntent(ShareTokenIntent.BACKUP) + .buildClient(); + + FileShareTestHelper.assertResponseStatusCode( + client.createDirectoryWithResponse(generatePathName(), null, null, null, null, Context.NONE), 201); + }); + } + + // RBAC replication lag + @Test + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void shareSasUserDelegationAsync() { + liveTestScenarioWithRetry(() -> { + ShareAsyncClient primaryAsyncClient = shareBuilderHelper(shareName).buildAsyncClient(); + ShareSasPermission permissions = new ShareSasPermission().setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true); + + ShareServiceSasSignatureValues sasValues = generateValues(permissions); + + Flux<Response<ShareDirectoryAsyncClient>> response = getUserDelegationInfoAsync().flatMapMany(key -> { + String sas = primaryAsyncClient.generateUserDelegationSas(sasValues, key); + ShareAsyncClient client = instrument(new ShareClientBuilder().endpoint(primaryAsyncClient.getShareUrl()) + .sasToken(sas) + .shareTokenIntent(ShareTokenIntent.BACKUP)).buildAsyncClient(); + + return client.createDirectoryWithResponse(generatePathName(), null, null, null); + }); + + StepVerifier.create(response).assertNext(r -> assertResponseStatusCode(r, 201)).verifyComplete(); + }); + } + + // RBAC replication lag + // Make sure a file SAS with user delegation key CANNOT be used to access other files in the share + @Test + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void verifyScopeShareSasUserDelegation() { + liveTestScenarioWithRetry(() -> { + ShareSasPermission permissions = new ShareSasPermission().setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true); + + ShareServiceSasSignatureValues sasValues = generateValues(permissions); + + ShareClient client1 = primaryFileServiceClient.createShare(generateShareName()); + ShareClient client2 = primaryFileServiceClient.createShare(generateShareName()); + String client1Sas = client1.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + ShareClient correctClientAuth = shareBuilderHelper(shareName, null).endpoint(client1.getShareUrl()) + .sasToken(client1Sas) + .shareTokenIntent(ShareTokenIntent.BACKUP) + .buildClient(); + + assertDoesNotThrow(() -> correctClientAuth.createFile(generatePathName(), Constants.KB)); + + ShareClient wrongClientAuth = shareBuilderHelper(shareName, null).endpoint(client2.getShareUrl()) + .sasToken(client1Sas) + .shareTokenIntent(ShareTokenIntent.BACKUP) + .buildClient(); + + assertThrows(ShareStorageException.class, + () -> wrongClientAuth.createFile(generatePathName(), Constants.KB)); + }); + } + + // RBAC replication lag + // Make sure a file SAS with user delegation key CANNOT be used to access other files in the share + @Test + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void verifyScopeAsyncShareSasUserDelegation() { + liveTestScenarioWithRetry(() -> { + ShareSasPermission permissions = new ShareSasPermission().setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true); + + ShareServiceSasSignatureValues sasValues = generateValues(permissions); + + ShareServiceAsyncClient shareServiceAsyncClient = fileServiceBuilderHelper().buildAsyncClient(); + ShareAsyncClient client1 = shareServiceAsyncClient.getShareAsyncClient(generateShareName()); + ShareAsyncClient client2 = shareServiceAsyncClient.getShareAsyncClient(generateShareName()); + + String sas = client1.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + Mono<ShareInfo> createMono = client1.create().then(client2.create()); + + ShareAsyncClient correctClientAuth = shareBuilderHelper(shareName, null).endpoint(client1.getShareUrl()) + .sasToken(sas) + .shareTokenIntent(ShareTokenIntent.BACKUP) + .buildAsyncClient(); + + ShareAsyncClient wrongClientAuth = shareBuilderHelper(shareName, null).endpoint(client2.getShareUrl()) + .sasToken(sas) + .shareTokenIntent(ShareTokenIntent.BACKUP) + .buildAsyncClient(); + + Mono<ShareFileAsyncClient> correctClientAuthUpload + = correctClientAuth.createFile(generatePathName(), Constants.KB); + Mono<ShareFileAsyncClient> wrongClientAuthUpload + = wrongClientAuth.createFile(generatePathName(), Constants.KB); + + StepVerifier.create(createMono.then(correctClientAuthUpload)).expectNextCount(1).verifyComplete(); + + StepVerifier.create(wrongClientAuthUpload).verifyErrorSatisfies(r -> { + ShareStorageException e = assertInstanceOf(ShareStorageException.class, r); + assertEquals(ShareErrorCode.AUTHENTICATION_FAILED, e.getErrorCode()); + }); + + }); + } + + private boolean validateSasProperties(ShareFileProperties properties) { + boolean ret; + ret = properties.getCacheControl().equals("cache"); + ret &= properties.getContentDisposition().equals("disposition"); + ret &= properties.getContentEncoding().equals("encoding"); + return ret; + } + + ShareServiceSasSignatureValues generateValues(ShareSasPermission permission) { + return new ShareServiceSasSignatureValues(testResourceNamer.now().plusDays(1), permission) + .setStartTime(testResourceNamer.now().minusDays(1)) + .setProtocol(SasProtocol.HTTPS_HTTP) + .setCacheControl("cache") + .setContentDisposition("disposition") + .setContentEncoding("encoding") + .setContentLanguage("language") + .setContentType("type"); + } } diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileServiceApiTests.java b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileServiceApiTests.java index d7cb6080086d..0d8ad5418323 100644 --- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileServiceApiTests.java +++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileServiceApiTests.java @@ -17,15 +17,19 @@ import com.azure.storage.file.share.models.ShareErrorCode; import com.azure.storage.file.share.models.ShareItem; import com.azure.storage.file.share.models.ShareMetrics; +import com.azure.storage.file.share.models.ShareNfsSettings; +import com.azure.storage.file.share.models.ShareNfsSettingsEncryptionInTransit; import com.azure.storage.file.share.models.ShareProperties; import com.azure.storage.file.share.models.ShareProtocolSettings; import com.azure.storage.file.share.models.ShareProtocols; import com.azure.storage.file.share.models.ShareRetentionPolicy; import com.azure.storage.file.share.models.ShareServiceProperties; import com.azure.storage.file.share.models.ShareSmbSettings; +import com.azure.storage.file.share.models.ShareSmbSettingsEncryptionInTransit; import com.azure.storage.file.share.models.ShareStorageException; import com.azure.storage.file.share.models.ShareTokenIntent; import com.azure.storage.file.share.models.SmbMultichannel; +import com.azure.storage.file.share.models.UserDelegationKey; import com.azure.storage.file.share.options.ShareCreateOptions; import com.azure.storage.file.share.options.ShareSetPropertiesOptions; import org.junit.jupiter.api.BeforeAll; @@ -564,4 +568,111 @@ public void listSharePaidBursting() { assertEquals(5000L, share.getProperties().getPaidBurstingMaxIops()); assertEquals(1000L, share.getProperties().getPaidBurstingMaxBandwidthMibps()); } + + @Test + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void fileServiceGetUserDelegationKey() { + ShareServiceClient oAuthServiceClient + = getOAuthServiceClient(new ShareServiceClientBuilder().shareTokenIntent(ShareTokenIntent.BACKUP)); + + OffsetDateTime expiry = testResourceNamer.now().plusHours(1).truncatedTo(ChronoUnit.SECONDS); + Response<UserDelegationKey> response + = oAuthServiceClient.getUserDelegationKeyWithResponse(testResourceNamer.now(), expiry, null, null); + + assertEquals(expiry, response.getValue().getSignedExpiry()); + } + + @Test + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void fileServiceGetUserDelegationKeyAuthError() { + OffsetDateTime expiry = testResourceNamer.now().plusHours(1).truncatedTo(ChronoUnit.SECONDS); + + //not oauth client + ShareStorageException e = assertThrows(ShareStorageException.class, () -> primaryFileServiceClient + .getUserDelegationKeyWithResponse(testResourceNamer.now(), expiry, null, null)); + + FileShareTestHelper.assertExceptionStatusCodeAndMessage(e, 403, ShareErrorCode.AUTHENTICATION_FAILED); + } + + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + @ResourceLock("ServiceProperties") + @Test + public void getSetServicePropertiesEncryptionInTransitSMB() { + + ShareServiceClient service = primaryFileServiceClient; + Response<ShareServiceProperties> propertiesResponse = service.getPropertiesWithResponse(null, null); + ShareServiceProperties properties = propertiesResponse.getValue(); + + if (properties.getProtocol() != null + && properties.getProtocol().getSmb() != null + && properties.getProtocol().getSmb().getEncryptionInTransit() != null + && Boolean.TRUE.equals(properties.getProtocol().getSmb().getEncryptionInTransit().isRequired())) { + + properties.getProtocol().getSmb().setMultichannel(null); + properties.getProtocol().getSmb().getEncryptionInTransit().setRequired(false); + service.setPropertiesWithResponse(properties, null, null); + propertiesResponse = service.getPropertiesWithResponse(null, null); + properties = propertiesResponse.getValue(); + + assertFalse(properties.getProtocol().getSmb().getEncryptionInTransit().isRequired()); + + properties.getProtocol().getSmb().getEncryptionInTransit().setRequired(false); + properties.getProtocol().getSmb().setMultichannel(null); + service.setPropertiesWithResponse(properties, null, null); + } else { + properties.setProtocol(new ShareProtocolSettings()); + properties.getProtocol() + .setSmb(new ShareSmbSettings() + .setEncryptionInTransit(new ShareSmbSettingsEncryptionInTransit().setRequired(true)) + .setMultichannel(null)); + service.setPropertiesWithResponse(properties, null, null); + propertiesResponse = service.getPropertiesWithResponse(null, null); + properties = propertiesResponse.getValue(); + + assertTrue(properties.getProtocol().getSmb().getEncryptionInTransit().isRequired()); + + properties.getProtocol().getSmb().setMultichannel(null); + properties.getProtocol().getSmb().getEncryptionInTransit().setRequired(false); + service.setPropertiesWithResponse(properties, null, null); + } + } + + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + @ResourceLock("ServiceProperties") + @Test + public void getSetServicePropertiesEncryptionInTransitNFS() { + + ShareServiceClient service = premiumFileServiceClient; + Response<ShareServiceProperties> propertiesResponse = service.getPropertiesWithResponse(null, null); + ShareServiceProperties properties = propertiesResponse.getValue(); + + if (properties.getProtocol() != null + && properties.getProtocol().getNfs() != null + && properties.getProtocol().getNfs().getEncryptionInTransit() != null + && Boolean.TRUE.equals(properties.getProtocol().getNfs().getEncryptionInTransit().isRequired())) { + + properties.getProtocol().getNfs().getEncryptionInTransit().setRequired(false); + service.setPropertiesWithResponse(properties, null, null); + propertiesResponse = service.getPropertiesWithResponse(null, null); + properties = propertiesResponse.getValue(); + + assertFalse(properties.getProtocol().getNfs().getEncryptionInTransit().isRequired()); + + properties.getProtocol().getNfs().getEncryptionInTransit().setRequired(true); + service.setPropertiesWithResponse(properties, null, null); + } else { + properties.setProtocol(new ShareProtocolSettings()); + properties.getProtocol() + .setNfs(new ShareNfsSettings() + .setEncryptionInTransit(new ShareNfsSettingsEncryptionInTransit().setRequired(true))); + service.setPropertiesWithResponse(properties, null, null); + propertiesResponse = service.getPropertiesWithResponse(null, null); + properties = propertiesResponse.getValue(); + + assertTrue(properties.getProtocol().getNfs().getEncryptionInTransit().isRequired()); + + properties.getProtocol().getNfs().getEncryptionInTransit().setRequired(false); + service.setPropertiesWithResponse(properties, null, null); + } + } } diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileServiceAsyncApiTests.java b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileServiceAsyncApiTests.java index f26abaaefcb1..124d482bb8e3 100644 --- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileServiceAsyncApiTests.java +++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileServiceAsyncApiTests.java @@ -16,10 +16,16 @@ import com.azure.storage.file.share.models.ShareErrorCode; import com.azure.storage.file.share.models.ShareItem; import com.azure.storage.file.share.models.ShareMetrics; +import com.azure.storage.file.share.models.ShareNfsSettings; +import com.azure.storage.file.share.models.ShareNfsSettingsEncryptionInTransit; import com.azure.storage.file.share.models.ShareProperties; +import com.azure.storage.file.share.models.ShareProtocolSettings; import com.azure.storage.file.share.models.ShareProtocols; import com.azure.storage.file.share.models.ShareRetentionPolicy; import com.azure.storage.file.share.models.ShareServiceProperties; +import com.azure.storage.file.share.models.UserDelegationKey; +import com.azure.storage.file.share.models.ShareSmbSettings; +import com.azure.storage.file.share.models.ShareSmbSettingsEncryptionInTransit; import com.azure.storage.file.share.options.ShareCreateOptions; import com.azure.storage.file.share.models.ShareTokenIntent; import org.junit.jupiter.api.Assertions; @@ -35,6 +41,8 @@ import reactor.util.function.Tuple2; import java.time.Duration; +import java.time.OffsetDateTime; +import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.Collections; import java.util.LinkedList; @@ -44,6 +52,7 @@ import java.util.stream.Stream; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -477,4 +486,116 @@ public void listSharePaidBursting() { assertEquals(5000L, share.getProperties().getPaidBurstingMaxIops()); assertEquals(1000L, share.getProperties().getPaidBurstingMaxBandwidthMibps()); } + + @Test + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void fileServiceGetUserDelegationKey() { + ShareServiceAsyncClient oAuthServiceClient + = getOAuthServiceAsyncClient(new ShareServiceClientBuilder().shareTokenIntent(ShareTokenIntent.BACKUP)); + + OffsetDateTime expiry = testResourceNamer.now().plusHours(1).truncatedTo(ChronoUnit.SECONDS); + Mono<Response<UserDelegationKey>> response + = oAuthServiceClient.getUserDelegationKeyWithResponse(testResourceNamer.now(), expiry); + + StepVerifier.create(response) + .assertNext(r -> assertEquals(expiry, r.getValue().getSignedExpiry())) + .verifyComplete(); + } + + @Test + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + public void fileServiceGetUserDelegationKeyAuthError() { + OffsetDateTime expiry = testResourceNamer.now().plusHours(1).truncatedTo(ChronoUnit.SECONDS); + + //not oauth client + StepVerifier + .create(primaryFileServiceAsyncClient.getUserDelegationKeyWithResponse(testResourceNamer.now(), expiry)) + .verifyErrorSatisfies(it -> FileShareTestHelper.assertExceptionStatusCodeAndMessage(it, 403, + ShareErrorCode.AUTHENTICATION_FAILED)); + } + + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + @ResourceLock("ServiceProperties") + @Test + public void getSetServicePropertiesEncryptionInTransitSMB() { + Mono<Response<ShareServiceProperties>> propertiesResponseMono + = primaryFileServiceAsyncClient.getPropertiesWithResponse(); + + StepVerifier.create(propertiesResponseMono.flatMap(propertiesResponse -> { + ShareServiceProperties properties = propertiesResponse.getValue(); + + if (properties.getProtocol() != null + && properties.getProtocol().getSmb() != null + && properties.getProtocol().getSmb().getEncryptionInTransit() != null + && Boolean.TRUE.equals(properties.getProtocol().getSmb().getEncryptionInTransit().isRequired())) { + + properties.getProtocol().getSmb().setMultichannel(null); + properties.getProtocol().getSmb().getEncryptionInTransit().setRequired(false); + + return primaryFileServiceAsyncClient.setPropertiesWithResponse(properties) + .then(primaryFileServiceAsyncClient.getPropertiesWithResponse()) + .doOnNext(updatedResponse -> assertFalse( + updatedResponse.getValue().getProtocol().getSmb().getEncryptionInTransit().isRequired())) + .then(); + } else { + properties.setProtocol(new ShareProtocolSettings()); + properties.getProtocol() + .setSmb(new ShareSmbSettings() + .setEncryptionInTransit(new ShareSmbSettingsEncryptionInTransit().setRequired(true)) + .setMultichannel(null)); + + return primaryFileServiceAsyncClient.setPropertiesWithResponse(properties) + .then(primaryFileServiceAsyncClient.getPropertiesWithResponse()) + .doOnNext(updatedResponse -> assertTrue( + updatedResponse.getValue().getProtocol().getSmb().getEncryptionInTransit().isRequired())) + .then(); + } + })).verifyComplete(); + } + + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "2026-02-06") + @ResourceLock("ServiceProperties") + @Test + public void getSetServicePropertiesEncryptionInTransitNFS() { + ShareServiceAsyncClient service = premiumFileServiceAsyncClient; + + Mono<Response<ShareServiceProperties>> propertiesResponseMono = service.getPropertiesWithResponse(); + + StepVerifier.create(propertiesResponseMono.flatMap(propertiesResponse -> { + ShareServiceProperties properties = propertiesResponse.getValue(); + + if (properties.getProtocol() != null + && properties.getProtocol().getNfs() != null + && properties.getProtocol().getNfs().getEncryptionInTransit() != null + && Boolean.TRUE.equals(properties.getProtocol().getNfs().getEncryptionInTransit().isRequired())) { + + properties.getProtocol().getNfs().getEncryptionInTransit().setRequired(false); + return service.setPropertiesWithResponse(properties) + .then(service.getPropertiesWithResponse()) + .doOnNext(updatedResponse -> assertFalse( + updatedResponse.getValue().getProtocol().getNfs().getEncryptionInTransit().isRequired())) + .then(service.getPropertiesWithResponse()) + .flatMap(updatedResponse -> { + properties.getProtocol().getNfs().getEncryptionInTransit().setRequired(true); + return service.setPropertiesWithResponse(properties); + }) + .then(); + } else { + properties.setProtocol(new ShareProtocolSettings()); + properties.getProtocol() + .setNfs(new ShareNfsSettings() + .setEncryptionInTransit(new ShareNfsSettingsEncryptionInTransit().setRequired(true))); + return service.setPropertiesWithResponse(properties) + .then(service.getPropertiesWithResponse()) + .doOnNext(updatedResponse -> assertTrue( + updatedResponse.getValue().getProtocol().getNfs().getEncryptionInTransit().isRequired())) + .then(service.getPropertiesWithResponse()) + .flatMap(updatedResponse -> { + properties.getProtocol().getNfs().getEncryptionInTransit().setRequired(false); + return service.setPropertiesWithResponse(properties); + }) + .then(); + } + })).verifyComplete(); + } } diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileShareTestBase.java b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileShareTestBase.java index edaf86ba3399..b9ee8dfb621e 100644 --- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileShareTestBase.java +++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileShareTestBase.java @@ -53,6 +53,8 @@ import java.util.function.Predicate; import java.util.function.Supplier; +import static org.junit.jupiter.api.Assertions.assertTrue; + public class FileShareTestBase extends TestProxyTestBase { protected static final TestEnvironment ENVIRONMENT = TestEnvironment.getInstance(); protected static final TestDataFactory DATA = TestDataFactory.getInstance(); @@ -63,6 +65,8 @@ public class FileShareTestBase extends TestProxyTestBase { = HttpHeaderName.fromString("x-ms-share-provisioned-iops"); protected static final HttpHeaderName X_MS_SHARE_PROVISIONED_BANDWIDTH_MIBPS = HttpHeaderName.fromString("x-ms-share-provisioned-bandwidth-mibps"); + protected static final HttpHeaderName X_MS_FILE_PROPERTY_SEMANTICS + = HttpHeaderName.fromString("x-ms-file-property-semantics"); protected String prefix; @@ -361,6 +365,14 @@ protected ShareServiceClient getOAuthServiceClient(ShareServiceClientBuilder bui return builder.credential(StorageCommonTestUtils.getTokenCredential(interceptorManager)).buildClient(); } + protected ShareServiceClient getOAuthServiceClient() { + return getOAuthServiceClient(null); + } + + protected ShareServiceAsyncClient getOAuthServiceAsyncClient() { + return getOAuthServiceAsyncClient(null); + } + protected ShareServiceClient getOAuthPremiumServiceClient(ShareServiceClientBuilder builder) { if (builder == null) { builder = new ShareServiceClientBuilder(); @@ -383,17 +395,6 @@ protected ShareServiceAsyncClient getOAuthPremiumServiceAsyncClient(ShareService return builder.credential(StorageCommonTestUtils.getTokenCredential(interceptorManager)).buildAsyncClient(); } - protected ShareServiceClient getOAuthServiceClientSharedKey(ShareServiceClientBuilder builder) { - if (builder == null) { - builder = new ShareServiceClientBuilder(); - } - builder.endpoint(ENVIRONMENT.getPrimaryAccount().getFileEndpoint()); - - instrument(builder); - - return builder.credential(StorageCommonTestUtils.getTokenCredential(interceptorManager)).buildClient(); - } - protected ShareServiceAsyncClient getOAuthServiceAsyncClient(ShareServiceClientBuilder builder) { if (builder == null) { builder = new ShareServiceClientBuilder(); @@ -405,21 +406,6 @@ protected ShareServiceAsyncClient getOAuthServiceAsyncClient(ShareServiceClientB return builder.credential(StorageCommonTestUtils.getTokenCredential(interceptorManager)).buildAsyncClient(); } - protected ShareServiceAsyncClient getOAuthServiceClientAsyncSharedKey(ShareServiceClientBuilder builder) { - if (builder == null) { - builder = new ShareServiceClientBuilder(); - } - builder.endpoint(ENVIRONMENT.getPrimaryAccount().getFileEndpoint()); - - instrument(builder); - - return builder.credential(ENVIRONMENT.getPrimaryAccount().getCredential()).buildAsyncClient(); - } - - protected ShareClient getOAuthShareClient(ShareClientBuilder builder) { - return getOAuthShareClientBuilder(builder).buildClient(); - } - protected ShareClientBuilder getOAuthShareClientBuilder(ShareClientBuilder builder) { if (builder == null) { builder = new ShareClientBuilder(); @@ -494,18 +480,17 @@ protected Mono<String> setupFileLeaseCondition(ShareFileAsyncClient fc, String l /** * Validates the presence of headers that are present on a large number of responses. These headers are generally * random and can really only be checked as not null. - * @param headers The object (may be headers object or response object) that has properties which expose these + * @param headers The object (can be headers object or response object) that has properties which expose these * common headers. - * @return Whether or not the header values are appropriate. */ - protected boolean validateBasicHeaders(HttpHeaders headers) { - return headers.getValue(HttpHeaderName.ETAG) != null + protected void validateBasicHeaders(HttpHeaders headers) { + assertTrue(headers.getValue(HttpHeaderName.ETAG) != null // Quotes should be scrubbed from etag header values && !headers.getValue(HttpHeaderName.ETAG).contains("\"") && headers.getValue(HttpHeaderName.LAST_MODIFIED) != null && headers.getValue(X_MS_REQUEST_ID) != null && headers.getValue(X_MS_VERSION) != null - && headers.getValue(HttpHeaderName.DATE) != null; + && headers.getValue(HttpHeaderName.DATE) != null); } protected String setupShareLeaseCondition(ShareClient sc, String leaseID) { @@ -521,7 +506,7 @@ protected String setupShareLeaseCondition(ShareClient sc, String leaseID) { protected Mono<String> setupShareLeaseAsyncCondition(ShareAsyncClient sc, String leaseID) { if (Objects.equals(leaseID, RECEIVED_LEASE_ID)) { return createLeaseClient(sc).acquireLeaseWithResponse(new ShareAcquireLeaseOptions().setDuration(-1)) - .map(response -> response.getValue()); + .map(Response::getValue); } else { return Mono.just(leaseID); } @@ -573,4 +558,26 @@ protected HttpPipelinePolicy getPerCallVersionPolicy() { protected static boolean isServiceVersionSpecified() { return ENVIRONMENT.getServiceVersion() != null; } + + protected void liveTestScenarioWithRetry(Runnable runnable) { + if (!interceptorManager.isLiveMode()) { + runnable.run(); + return; + } + + int retry = 0; + + // Try up to 4 times + while (retry < 4) { + try { + runnable.run(); + return; // success + } catch (Exception ex) { + retry++; + sleepIfRunningAgainstService(5000); + } + } + // Final attempt (5th try) + runnable.run(); + } } diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileShareTestHelper.java b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileShareTestHelper.java index 10a73f52ad8d..21563e7f65da 100644 --- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileShareTestHelper.java +++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileShareTestHelper.java @@ -8,6 +8,7 @@ import com.azure.storage.common.implementation.Constants; import com.azure.storage.file.share.models.ClearRange; import com.azure.storage.file.share.models.FilePermissionFormat; +import com.azure.storage.file.share.models.FilePropertySemantics; import com.azure.storage.file.share.models.FileRange; import com.azure.storage.file.share.models.PermissionCopyModeType; import com.azure.storage.file.share.models.ShareCorsRule; @@ -382,4 +383,9 @@ protected static void assertSmbPropertiesNull(FileSmbProperties smbProperties) { assertNull(smbProperties.getFilePermissionKey()); assertNull(smbProperties.getNtfsFileAttributes()); } + + protected static Stream<Arguments> filePropertySemanticsSupplier() { + return Stream.of(Arguments.of(FilePropertySemantics.NEW), Arguments.of(FilePropertySemantics.RESTORE), + Arguments.of((Object) null)); + } } diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/ShareApiTests.java b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/ShareApiTests.java index 8bd980d12cbd..fc0b3b5ce816 100644 --- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/ShareApiTests.java +++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/ShareApiTests.java @@ -274,8 +274,8 @@ public void createDirectoryAndFileTrailingDot(boolean allowTrailingDot) { @Test public void createFileAndDirectoryOAuth() { primaryShareClient.create(); - ShareClient oAuthShareClient = getOAuthShareClient( - new ShareClientBuilder().shareName(shareName).shareTokenIntent(ShareTokenIntent.BACKUP)); + ShareClient oAuthShareClient = getOAuthShareClientBuilder( + new ShareClientBuilder().shareName(shareName).shareTokenIntent(ShareTokenIntent.BACKUP)).buildClient(); String dirName = generatePathName(); ShareDirectoryClient dirClient = oAuthShareClient.getDirectoryClient(dirName); diff --git a/sdk/storage/azure-storage-file-share/swagger/README.md b/sdk/storage/azure-storage-file-share/swagger/README.md index 8f0e7efb3f85..f758157dd669 100644 --- a/sdk/storage/azure-storage-file-share/swagger/README.md +++ b/sdk/storage/azure-storage-file-share/swagger/README.md @@ -16,7 +16,7 @@ autorest ### Code generation settings ``` yaml use: '@autorest/java@4.1.52' -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/596d8d2a8c1c50bd6ebe60036143f4c4787fc816/specification/storage/data-plane/Microsoft.FileStorage/stable/2025-11-05/file.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/refs/heads/main/specification/storage/data-plane/Microsoft.FileStorage/stable/2026-02-06/file.json java: true output-folder: ../ namespace: com.azure.storage.file.share @@ -26,7 +26,7 @@ enable-sync-stack: true default-http-exception-type: com.azure.storage.file.share.implementation.models.ShareStorageExceptionInternal models-subpackage: implementation.models custom-types-subpackage: models -custom-types: ShareFileHttpHeaders,ShareServiceProperties,ShareCorsRule,Range,FileRange,ClearRange,ShareFileRangeList,CopyStatusType,ShareSignedIdentifier,SourceModifiedAccessConditions,ShareErrorCode,StorageServiceProperties,ShareMetrics,ShareAccessPolicy,ShareFileDownloadHeaders,LeaseDurationType,LeaseStateType,LeaseStatusType,PermissionCopyModeType,ShareAccessTier,ShareRootSquash,ShareRetentionPolicy,ShareProtocolSettings,ShareSmbSettings,SmbMultichannel,FileLastWrittenMode,ShareTokenIntent,ShareFileHandleAccessRights,FilePermissionFormat,NfsFileType,ModeCopyMode,OwnerCopyMode +custom-types: ShareFileHttpHeaders,ShareServiceProperties,ShareCorsRule,Range,FileRange,ClearRange,ShareFileRangeList,CopyStatusType,ShareSignedIdentifier,SourceModifiedAccessConditions,ShareErrorCode,StorageServiceProperties,ShareMetrics,ShareAccessPolicy,ShareFileDownloadHeaders,LeaseDurationType,LeaseStateType,LeaseStatusType,PermissionCopyModeType,ShareAccessTier,ShareRootSquash,ShareRetentionPolicy,ShareProtocolSettings,ShareSmbSettings,SmbMultichannel,FileLastWrittenMode,ShareTokenIntent,ShareFileHandleAccessRights,FilePermissionFormat,NfsFileType,ModeCopyMode,OwnerCopyMode,UserDelegationKey,KeyInfo,ShareNfsSettingsEncryptionInTransit,ShareSmbSettingsEncryptionInTransit,ShareNfsSettings,FilePropertySemantics customization-class: src/main/java/ShareStorageCustomization.java use-input-stream-for-binary: true disable-client-builder: true @@ -439,3 +439,13 @@ directive: $.xml = {"name": "AccessRight"}; $["x-ms-enum"].name = "ShareFileHandleAccessRights"; ``` + +### Rename UserDelegationKey SignedOid and SignedTid +``` yaml +directive: +- from: swagger-document + where: $.definitions.UserDelegationKey + transform: > + $.properties.SignedOid["x-ms-client-name"] = "signedObjectId"; + $.properties.SignedTid["x-ms-client-name"] = "signedTenantId"; +``` diff --git a/sdk/storage/azure-storage-queue/CHANGELOG.md b/sdk/storage/azure-storage-queue/CHANGELOG.md index 3a3bd0bb5672..d0ea5126cc8a 100644 --- a/sdk/storage/azure-storage-queue/CHANGELOG.md +++ b/sdk/storage/azure-storage-queue/CHANGELOG.md @@ -3,6 +3,8 @@ ## 12.28.0-beta.1 (Unreleased) ### Features Added +- Added support for User Delegation SAS. +- Added support for Principal-Bound Identity User Delegation SAS. ### Breaking Changes diff --git a/sdk/storage/azure-storage-queue/assets.json b/sdk/storage/azure-storage-queue/assets.json index 707c584fd5e6..942a9e8181cf 100644 --- a/sdk/storage/azure-storage-queue/assets.json +++ b/sdk/storage/azure-storage-queue/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-queue", - "Tag": "java/storage/azure-storage-queue_06da25b415" + "Tag": "java/storage/azure-storage-queue_ac6cddbd36" } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java index 6df171fedff7..57ef891385dd 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java @@ -37,6 +37,7 @@ import com.azure.storage.queue.models.QueueStorageException; import com.azure.storage.queue.models.SendMessageResult; import com.azure.storage.queue.models.UpdateMessageResult; +import com.azure.storage.queue.models.UserDelegationKey; import com.azure.storage.queue.sas.QueueServiceSasSignatureValues; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -1516,4 +1517,36 @@ public String generateSas(QueueServiceSasSignatureValues queueServiceSasSignatur return new QueueSasImplUtil(queueServiceSasSignatureValues, getQueueName()) .generateSas(SasImplUtils.extractSharedKeyCredential(getHttpPipeline()), stringToSignHandler, context); } + + /** + * Generates a user delegation SAS for the queue using the specified {@link QueueServiceSasSignatureValues}. + * <p>See {@link QueueServiceSasSignatureValues} for more information on how to construct a user delegation SAS.</p> + * + * @param queueServiceSasSignatureValues {@link QueueServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * + * @return A {@code String} representing the SAS query parameters. + */ + public String generateUserDelegationSas(QueueServiceSasSignatureValues queueServiceSasSignatureValues, + UserDelegationKey userDelegationKey) { + return generateUserDelegationSas(queueServiceSasSignatureValues, userDelegationKey, null, Context.NONE); + } + + /** + * Generates a user delegation SAS for the queue using the specified {@link QueueServiceSasSignatureValues}. + * <p>See {@link QueueServiceSasSignatureValues} for more information on how to construct a user delegation SAS.</p> + * + * @param queueServiceSasSignatureValues {@link QueueServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * @param stringToSignHandler For debugging purposes only. Returns the string to sign that was used to generate the + * signature. + * @param context Additional context that is passed through the code when generating a SAS. + * + * @return A {@code String} representing the SAS query parameters. + */ + public String generateUserDelegationSas(QueueServiceSasSignatureValues queueServiceSasSignatureValues, + UserDelegationKey userDelegationKey, Consumer<String> stringToSignHandler, Context context) { + return new QueueSasImplUtil(queueServiceSasSignatureValues, getQueueName()) + .generateUserDelegationSas(userDelegationKey, accountName, stringToSignHandler, context); + } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java index 85d1994b6412..6bd3751a4328 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java @@ -32,6 +32,7 @@ import com.azure.storage.queue.implementation.models.QueuesGetAccessPolicyHeaders; import com.azure.storage.queue.implementation.models.QueuesGetPropertiesHeaders; import com.azure.storage.queue.implementation.models.SendMessageResultWrapper; +import com.azure.storage.queue.models.UserDelegationKey; import com.azure.storage.queue.implementation.util.ModelHelper; import com.azure.storage.queue.implementation.util.QueueSasImplUtil; import com.azure.storage.queue.models.PeekedMessageItem; @@ -1459,4 +1460,36 @@ public String generateSas(QueueServiceSasSignatureValues queueServiceSasSignatur return new QueueSasImplUtil(queueServiceSasSignatureValues, getQueueName()) .generateSas(SasImplUtils.extractSharedKeyCredential(getHttpPipeline()), stringToSignHandler, context); } + + /** + * Generates a user delegation SAS for the queue using the specified {@link QueueServiceSasSignatureValues}. + * <p>See {@link QueueServiceSasSignatureValues} for more information on how to construct a user delegation SAS.</p> + * + * @param queueServiceSasSignatureValues {@link QueueServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * + * @return A {@code String} representing the SAS query parameters. + */ + public String generateUserDelegationSas(QueueServiceSasSignatureValues queueServiceSasSignatureValues, + UserDelegationKey userDelegationKey) { + return generateUserDelegationSas(queueServiceSasSignatureValues, userDelegationKey, null, Context.NONE); + } + + /** + * Generates a user delegation SAS for the queue using the specified {@link QueueServiceSasSignatureValues}. + * <p>See {@link QueueServiceSasSignatureValues} for more information on how to construct a user delegation SAS.</p> + * + * @param queueServiceSasSignatureValues {@link QueueServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * @param stringToSignHandler For debugging purposes only. Returns the string to sign that was used to generate the + * signature. + * @param context Additional context that is passed through the code when generating a SAS. + * + * @return A {@code String} representing the SAS query parameters. + */ + public String generateUserDelegationSas(QueueServiceSasSignatureValues queueServiceSasSignatureValues, + UserDelegationKey userDelegationKey, Consumer<String> stringToSignHandler, Context context) { + return new QueueSasImplUtil(queueServiceSasSignatureValues, getQueueName()) + .generateUserDelegationSas(userDelegationKey, accountName, stringToSignHandler, context); + } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java index ce58fb71758f..92979bebaf0d 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java @@ -5,6 +5,7 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; +import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedResponse; @@ -15,10 +16,12 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.AccountSasImplUtil; +import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.sas.AccountSasSignatureValues; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; +import com.azure.storage.queue.models.KeyInfo; import com.azure.storage.queue.models.QueueCorsRule; import com.azure.storage.queue.models.QueueItem; import com.azure.storage.queue.models.QueueMessageDecodingError; @@ -26,9 +29,11 @@ import com.azure.storage.queue.models.QueueServiceStatistics; import com.azure.storage.queue.models.QueueStorageException; import com.azure.storage.queue.models.QueuesSegmentOptions; +import com.azure.storage.queue.models.UserDelegationKey; import reactor.core.publisher.Mono; import java.time.Duration; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -709,4 +714,57 @@ public String generateAccountSas(AccountSasSignatureValues accountSasSignatureVa return new AccountSasImplUtil(accountSasSignatureValues, null) .generateSas(SasImplUtils.extractSharedKeyCredential(getHttpPipeline()), stringToSignHandler, context); } + + /** + * Gets a user delegation key for use with this account's queue storage. Note: This method call is only valid when + * using {@link TokenCredential} in this object's {@link HttpPipeline}. + * + * @param start Start time for the key's validity. Null indicates immediate start. + * @param expiry Expiration of the key's validity. + * @return A {@link Mono} containing the user delegation key. + * @throws IllegalArgumentException If {@code start} isn't null and is after {@code expiry}. + * @throws NullPointerException If {@code expiry} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<UserDelegationKey> getUserDelegationKey(OffsetDateTime start, OffsetDateTime expiry) { + return getUserDelegationKeyWithResponse(start, expiry).flatMap(FluxUtil::toMono); + } + + /** + * Gets a user delegation key for use with this account's queue storage. Note: This method call is only valid when + * using {@link TokenCredential} in this object's {@link HttpPipeline}. + * + * @param start Start time for the key's validity. Null indicates immediate start. + * @param expiry Expiration of the key's validity. + * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} containing the user + * delegation key. + * @throws IllegalArgumentException If {@code start} isn't null and is after {@code expiry}. + * @throws NullPointerException If {@code expiry} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<UserDelegationKey>> getUserDelegationKeyWithResponse(OffsetDateTime start, + OffsetDateTime expiry) { + try { + return withContext(context -> getUserDelegationKeyWithResponse(start, expiry, context)); + } catch (RuntimeException ex) { + return monoError(LOGGER, ex); + } + } + + Mono<Response<UserDelegationKey>> getUserDelegationKeyWithResponse(OffsetDateTime start, OffsetDateTime expiry, + Context context) { + StorageImplUtils.assertNotNull("expiry", expiry); + if (start != null && !start.isBefore(expiry)) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("`start` must be null or a datetime before `expiry`.")); + } + context = context == null ? Context.NONE : context; + + return client.getServices() + .getUserDelegationKeyWithResponseAsync( + new KeyInfo().setStart(start == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(start)) + .setExpiry(Constants.ISO_8601_UTC_DATE_FORMATTER.format(expiry)), + null, null, context) + .map(rb -> new SimpleResponse<>(rb, rb.getValue())); + } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java index c51516b84116..778c0681027d 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java @@ -5,6 +5,7 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; +import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.PagedResponse; @@ -15,10 +16,14 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.AccountSasImplUtil; +import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.SasImplUtils; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.sas.AccountSasSignatureValues; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; +import com.azure.storage.queue.models.KeyInfo; import com.azure.storage.queue.implementation.models.ServicesGetStatisticsHeaders; +import com.azure.storage.queue.implementation.models.ServicesGetUserDelegationKeyHeaders; import com.azure.storage.queue.models.QueueCorsRule; import com.azure.storage.queue.models.QueueItem; import com.azure.storage.queue.models.QueueMessageDecodingError; @@ -26,18 +31,22 @@ import com.azure.storage.queue.models.QueueServiceStatistics; import com.azure.storage.queue.models.QueueStorageException; import com.azure.storage.queue.models.QueuesSegmentOptions; +import com.azure.storage.queue.models.UserDelegationKey; import reactor.core.publisher.Mono; import java.time.Duration; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.concurrent.Callable; import java.util.function.BiFunction; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Supplier; +import static com.azure.storage.common.implementation.StorageImplUtils.sendRequest; import static com.azure.storage.common.implementation.StorageImplUtils.submitThreadPool; /** @@ -693,4 +702,48 @@ public String generateAccountSas(AccountSasSignatureValues accountSasSignatureVa return new AccountSasImplUtil(accountSasSignatureValues, null) .generateSas(SasImplUtils.extractSharedKeyCredential(getHttpPipeline()), stringToSignHandler, context); } + + /** + * Gets a user delegation key for use with this account's queue storage. Note: This method call is only valid when + * using {@link TokenCredential} in this object's {@link HttpPipeline}. + * + * @param start Start time for the key's validity. Null indicates immediate start. + * @param expiry Expiration of the key's validity. + * @return The user delegation key. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UserDelegationKey getUserDelegationKey(OffsetDateTime start, OffsetDateTime expiry) { + return getUserDelegationKeyWithResponse(start, expiry, null, Context.NONE).getValue(); + } + + /** + * Gets a user delegation key for use with this account's queue storage. Note: This method call is only valid when + * using {@link TokenCredential} in this object's {@link HttpPipeline}. + * + * @param start Start time for the key's validity. Null indicates immediate start. + * @param expiry Expiration of the key's validity. + * @param timeout An optional timeout value beyond which a {@link RuntimeException} will be raised. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A {@link Response} whose {@link Response#getValue() value} contains the user delegation key. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<UserDelegationKey> getUserDelegationKeyWithResponse(OffsetDateTime start, OffsetDateTime expiry, + Duration timeout, Context context) { + StorageImplUtils.assertNotNull("expiry", expiry); + if (start != null && !start.isBefore(expiry)) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("`start` must be null or a datetime before `expiry`.")); + } + Context finalContext = context == null ? Context.NONE : context; + Callable<ResponseBase<ServicesGetUserDelegationKeyHeaders, UserDelegationKey>> operation + = () -> this.azureQueueStorage.getServices() + .getUserDelegationKeyWithResponse( + new KeyInfo().setStart(start == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(start)) + .setExpiry(Constants.ISO_8601_UTC_DATE_FORMATTER.format(expiry)), + null, null, finalContext); + ResponseBase<ServicesGetUserDelegationKeyHeaders, UserDelegationKey> response + = sendRequest(operation, timeout, QueueStorageException.class); + return new SimpleResponse<>(response, response.getValue()); + } + } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceVersion.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceVersion.java index 2cc10eb2fd04..5caf6300587b 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceVersion.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceVersion.java @@ -147,7 +147,12 @@ public enum QueueServiceVersion implements ServiceVersion { /** * Service version {@code 2025-11-05}. */ - V2025_11_05("2025-11-05"); + V2025_11_05("2025-11-05"), + + /** + * Service version {@code 2026-02-06}. + */ + V2026_02_06("2026-02-06"); private final String version; @@ -169,6 +174,6 @@ public String getVersion() { * @return the latest {@link QueueServiceVersion} */ public static QueueServiceVersion getLatest() { - return V2025_11_05; + return V2026_02_06; } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ServicesImpl.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ServicesImpl.java index 3e066282d0ef..b5224b043ffd 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ServicesImpl.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ServicesImpl.java @@ -10,6 +10,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -29,13 +30,16 @@ import com.azure.storage.queue.implementation.models.QueueStorageExceptionInternal; import com.azure.storage.queue.implementation.models.ServicesGetPropertiesHeaders; import com.azure.storage.queue.implementation.models.ServicesGetStatisticsHeaders; +import com.azure.storage.queue.implementation.models.ServicesGetUserDelegationKeyHeaders; import com.azure.storage.queue.implementation.models.ServicesListQueuesSegmentHeaders; import com.azure.storage.queue.implementation.models.ServicesListQueuesSegmentNextHeaders; import com.azure.storage.queue.implementation.models.ServicesSetPropertiesHeaders; import com.azure.storage.queue.implementation.util.ModelHelper; +import com.azure.storage.queue.models.KeyInfo; import com.azure.storage.queue.models.QueueItem; import com.azure.storage.queue.models.QueueServiceProperties; import com.azure.storage.queue.models.QueueServiceStatistics; +import com.azure.storage.queue.models.UserDelegationKey; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; @@ -186,6 +190,42 @@ Response<QueueServiceStatistics> getStatisticsNoCustomHeadersSync(@HostParam("ur @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, Context context); + @Post("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(QueueStorageExceptionInternal.class) + Mono<ResponseBase<ServicesGetUserDelegationKeyHeaders, UserDelegationKey>> getUserDelegationKey( + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @BodyParam("application/xml") KeyInfo keyInfo, + @HeaderParam("Accept") String accept, Context context); + + @Post("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(QueueStorageExceptionInternal.class) + Mono<Response<UserDelegationKey>> getUserDelegationKeyNoCustomHeaders(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @BodyParam("application/xml") KeyInfo keyInfo, + @HeaderParam("Accept") String accept, Context context); + + @Post("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(QueueStorageExceptionInternal.class) + ResponseBase<ServicesGetUserDelegationKeyHeaders, UserDelegationKey> getUserDelegationKeySync( + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @BodyParam("application/xml") KeyInfo keyInfo, + @HeaderParam("Accept") String accept, Context context); + + @Post("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(QueueStorageExceptionInternal.class) + Response<UserDelegationKey> getUserDelegationKeyNoCustomHeadersSync(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @BodyParam("application/xml") KeyInfo keyInfo, + @HeaderParam("Accept") String accept, Context context); + @Get("/") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(QueueStorageExceptionInternal.class) @@ -939,6 +979,239 @@ public Response<QueueServiceStatistics> getStatisticsNoCustomHeadersWithResponse } } + /** + * Retrieves a user delegation key for the Queue service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws QueueStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<ResponseBase<ServicesGetUserDelegationKeyHeaders, UserDelegationKey>> + getUserDelegationKeyWithResponseAsync(KeyInfo keyInfo, Integer timeout, String requestId) { + return FluxUtil + .withContext(context -> getUserDelegationKeyWithResponseAsync(keyInfo, timeout, requestId, context)) + .onErrorMap(QueueStorageExceptionInternal.class, ModelHelper::mapToQueueStorageException); + } + + /** + * Retrieves a user delegation key for the Queue service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws QueueStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<ResponseBase<ServicesGetUserDelegationKeyHeaders, UserDelegationKey>> + getUserDelegationKeyWithResponseAsync(KeyInfo keyInfo, Integer timeout, String requestId, Context context) { + final String restype = "service"; + final String comp = "userdelegationkey"; + final String accept = "application/xml"; + return service + .getUserDelegationKey(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, + keyInfo, accept, context) + .onErrorMap(QueueStorageExceptionInternal.class, ModelHelper::mapToQueueStorageException); + } + + /** + * Retrieves a user delegation key for the Queue service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws QueueStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<UserDelegationKey> getUserDelegationKeyAsync(KeyInfo keyInfo, Integer timeout, String requestId) { + return getUserDelegationKeyWithResponseAsync(keyInfo, timeout, requestId) + .onErrorMap(QueueStorageExceptionInternal.class, ModelHelper::mapToQueueStorageException) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieves a user delegation key for the Queue service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws QueueStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<UserDelegationKey> getUserDelegationKeyAsync(KeyInfo keyInfo, Integer timeout, String requestId, + Context context) { + return getUserDelegationKeyWithResponseAsync(keyInfo, timeout, requestId, context) + .onErrorMap(QueueStorageExceptionInternal.class, ModelHelper::mapToQueueStorageException) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieves a user delegation key for the Queue service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws QueueStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<UserDelegationKey>> getUserDelegationKeyNoCustomHeadersWithResponseAsync(KeyInfo keyInfo, + Integer timeout, String requestId) { + return FluxUtil + .withContext( + context -> getUserDelegationKeyNoCustomHeadersWithResponseAsync(keyInfo, timeout, requestId, context)) + .onErrorMap(QueueStorageExceptionInternal.class, ModelHelper::mapToQueueStorageException); + } + + /** + * Retrieves a user delegation key for the Queue service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws QueueStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<Response<UserDelegationKey>> getUserDelegationKeyNoCustomHeadersWithResponseAsync(KeyInfo keyInfo, + Integer timeout, String requestId, Context context) { + final String restype = "service"; + final String comp = "userdelegationkey"; + final String accept = "application/xml"; + return service + .getUserDelegationKeyNoCustomHeaders(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), + requestId, keyInfo, accept, context) + .onErrorMap(QueueStorageExceptionInternal.class, ModelHelper::mapToQueueStorageException); + } + + /** + * Retrieves a user delegation key for the Queue service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws QueueStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase<ServicesGetUserDelegationKeyHeaders, UserDelegationKey> + getUserDelegationKeyWithResponse(KeyInfo keyInfo, Integer timeout, String requestId, Context context) { + try { + final String restype = "service"; + final String comp = "userdelegationkey"; + final String accept = "application/xml"; + return service.getUserDelegationKeySync(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, keyInfo, accept, context); + } catch (QueueStorageExceptionInternal internalException) { + throw ModelHelper.mapToQueueStorageException(internalException); + } + } + + /** + * Retrieves a user delegation key for the Queue service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws QueueStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UserDelegationKey getUserDelegationKey(KeyInfo keyInfo, Integer timeout, String requestId) { + try { + return getUserDelegationKeyWithResponse(keyInfo, timeout, requestId, Context.NONE).getValue(); + } catch (QueueStorageExceptionInternal internalException) { + throw ModelHelper.mapToQueueStorageException(internalException); + } + } + + /** + * Retrieves a user delegation key for the Queue service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws QueueStorageExceptionInternal thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<UserDelegationKey> getUserDelegationKeyNoCustomHeadersWithResponse(KeyInfo keyInfo, Integer timeout, + String requestId, Context context) { + try { + final String restype = "service"; + final String comp = "userdelegationkey"; + final String accept = "application/xml"; + return service.getUserDelegationKeyNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, keyInfo, accept, context); + } catch (QueueStorageExceptionInternal internalException) { + throw ModelHelper.mapToQueueStorageException(internalException); + } + } + /** * The List Queues Segment operation returns a list of the queues under the specified account. * diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesGetUserDelegationKeyHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesGetUserDelegationKeyHeaders.java new file mode 100644 index 000000000000..83c3124e9c4f --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesGetUserDelegationKeyHeaders.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.queue.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.util.DateTimeRfc1123; +import java.time.OffsetDateTime; + +/** + * The ServicesGetUserDelegationKeyHeaders model. + */ +@Fluent +public final class ServicesGetUserDelegationKeyHeaders { + /* + * The x-ms-version property. + */ + @Generated + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @Generated + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @Generated + private String xMsClientRequestId; + + /* + * The Date property. + */ + @Generated + private DateTimeRfc1123 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ServicesGetUserDelegationKeyHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ServicesGetUserDelegationKeyHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } else { + this.date = null; + } + } + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + @Generated + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the ServicesGetUserDelegationKeyHeaders object itself. + */ + @Generated + public ServicesGetUserDelegationKeyHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + @Generated + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the ServicesGetUserDelegationKeyHeaders object itself. + */ + @Generated + public ServicesGetUserDelegationKeyHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + @Generated + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the ServicesGetUserDelegationKeyHeaders object itself. + */ + @Generated + public ServicesGetUserDelegationKeyHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + @Generated + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); + } + + /** + * Set the date property: The Date property. + * + * @param date the date value to set. + * @return the ServicesGetUserDelegationKeyHeaders object itself. + */ + @Generated + public ServicesGetUserDelegationKeyHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } +} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/QueueSasImplUtil.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/QueueSasImplUtil.java index d79c87724d4e..c353b6690fb8 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/QueueSasImplUtil.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/QueueSasImplUtil.java @@ -13,6 +13,7 @@ import com.azure.storage.common.sas.SasIpRange; import com.azure.storage.common.sas.SasProtocol; import com.azure.storage.queue.QueueServiceVersion; +import com.azure.storage.queue.models.UserDelegationKey; import com.azure.storage.queue.sas.QueueSasPermission; import com.azure.storage.queue.sas.QueueServiceSasSignatureValues; @@ -36,18 +37,13 @@ public class QueueSasImplUtil { .get(Constants.PROPERTY_AZURE_STORAGE_SAS_SERVICE_VERSION, QueueServiceVersion.getLatest().getVersion()); private SasProtocol protocol; - private OffsetDateTime startTime; - private OffsetDateTime expiryTime; - private String permissions; - private SasIpRange sasIpRange; - private String queueName; - private String identifier; + private String delegatedUserObjectId; /** * Creates a new {@link QueueSasImplUtil} with the specified parameters @@ -64,6 +60,7 @@ public QueueSasImplUtil(QueueServiceSasSignatureValues sasValues, String queueNa this.sasIpRange = sasValues.getSasIpRange(); this.queueName = queueName; this.identifier = sasValues.getIdentifier(); + this.delegatedUserObjectId = sasValues.getDelegatedUserObjectId(); } /** @@ -102,10 +99,40 @@ public String generateSas(StorageSharedKeyCredential storageSharedKeyCredentials stringToSignHandler.accept(stringToSign); } - return encode(signature); + return encode(null /* userDelegationKey */, signature); + } + + /** + * Generates a Sas signed with a {@link UserDelegationKey} + * + * @param delegationKey {@link UserDelegationKey} + * @param accountName The account name + * @param stringToSignHandler For debugging purposes only. Returns the string to sign that was used to generate the + * signature. + * @param context Additional context that is passed through the code when generating a SAS. + * @return A String representing the Sas + */ + public String generateUserDelegationSas(UserDelegationKey delegationKey, String accountName, + Consumer<String> stringToSignHandler, Context context) { + StorageImplUtils.assertNotNull("delegationKey", delegationKey); + StorageImplUtils.assertNotNull("accountName", accountName); + + ensureState(); + + // Signature is generated on the un-url-encoded values. + final String canonicalName = getCanonicalName(accountName); + final String stringToSign = stringToSign(delegationKey, canonicalName); + StorageImplUtils.logStringToSign(LOGGER, stringToSign, context); + String signature = StorageImplUtils.computeHMac256(delegationKey.getValue(), stringToSign); + + if (stringToSignHandler != null) { + stringToSignHandler.accept(stringToSign); + } + + return encode(delegationKey, signature); } - private String encode(String signature) { + private String encode(UserDelegationKey userDelegationKey, String signature) { /* We should be url-encoding each key and each value, but because we know all the keys and values will encode to themselves, we cheat except for the signature value. @@ -120,6 +147,22 @@ private String encode(String signature) { formatQueryParameterDate(new TimeAndFormat(this.expiryTime, null))); tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_IP_RANGE, this.sasIpRange); tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_IDENTIFIER, this.identifier); + if (userDelegationKey != null) { + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_OBJECT_ID, + userDelegationKey.getSignedObjectId()); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_TENANT_ID, + userDelegationKey.getSignedTenantId()); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_START, + formatQueryParameterDate(new TimeAndFormat(userDelegationKey.getSignedStart(), null))); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_EXPIRY, + formatQueryParameterDate(new TimeAndFormat(userDelegationKey.getSignedExpiry(), null))); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_SERVICE, + userDelegationKey.getSignedService()); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_VERSION, + userDelegationKey.getSignedVersion()); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_DELEGATED_USER_OBJECT_ID, + this.delegatedUserObjectId); + } tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_PERMISSIONS, this.permissions); tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNATURE, signature); @@ -169,4 +212,19 @@ private String stringToSign(String canonicalName) { this.protocol == null ? "" : protocol.toString(), VERSION == null ? "" : VERSION); } + private String stringToSign(final UserDelegationKey key, String canonicalName) { + return String.join("\n", this.permissions == null ? "" : this.permissions, + this.startTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), + this.expiryTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), canonicalName, + key.getSignedObjectId() == null ? "" : key.getSignedObjectId(), + key.getSignedTenantId() == null ? "" : key.getSignedTenantId(), + key.getSignedStart() == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(key.getSignedStart()), + key.getSignedExpiry() == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(key.getSignedExpiry()), + key.getSignedService() == null ? "" : key.getSignedService(), + key.getSignedVersion() == null ? "" : key.getSignedVersion(), "", // SignedKeyDelegatedUserTenantId, will be added in a future release. + this.delegatedUserObjectId == null ? "" : this.delegatedUserObjectId, + this.sasIpRange == null ? "" : this.sasIpRange.toString(), + this.protocol == null ? "" : this.protocol.toString(), VERSION); + } + } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/KeyInfo.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/KeyInfo.java new file mode 100644 index 000000000000..330812896c7a --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/KeyInfo.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.queue.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Key information. + */ +@Fluent +public final class KeyInfo implements XmlSerializable<KeyInfo> { + /* + * The date-time the key is active in ISO 8601 UTC time + */ + @Generated + private String start; + + /* + * The date-time the key expires in ISO 8601 UTC time + */ + @Generated + private String expiry; + + /** + * Creates an instance of KeyInfo class. + */ + @Generated + public KeyInfo() { + } + + /** + * Get the start property: The date-time the key is active in ISO 8601 UTC time. + * + * @return the start value. + */ + @Generated + public String getStart() { + return this.start; + } + + /** + * Set the start property: The date-time the key is active in ISO 8601 UTC time. + * + * @param start the start value to set. + * @return the KeyInfo object itself. + */ + @Generated + public KeyInfo setStart(String start) { + this.start = start; + return this; + } + + /** + * Get the expiry property: The date-time the key expires in ISO 8601 UTC time. + * + * @return the expiry value. + */ + @Generated + public String getExpiry() { + return this.expiry; + } + + /** + * Set the expiry property: The date-time the key expires in ISO 8601 UTC time. + * + * @param expiry the expiry value to set. + * @return the KeyInfo object itself. + */ + @Generated + public KeyInfo setExpiry(String expiry) { + this.expiry = expiry; + return this; + } + + @Generated + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Generated + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "KeyInfo" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Start", this.start); + xmlWriter.writeStringElement("Expiry", this.expiry); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of KeyInfo from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of KeyInfo if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the KeyInfo. + */ + @Generated + public static KeyInfo fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of KeyInfo from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of KeyInfo if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the KeyInfo. + */ + @Generated + public static KeyInfo fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "KeyInfo" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + KeyInfo deserializedKeyInfo = new KeyInfo(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Start".equals(elementName.getLocalPart())) { + deserializedKeyInfo.start = reader.getStringElement(); + } else if ("Expiry".equals(elementName.getLocalPart())) { + deserializedKeyInfo.expiry = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedKeyInfo; + }); + } +} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/UserDelegationKey.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/UserDelegationKey.java new file mode 100644 index 000000000000..1fb20470a5ac --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/UserDelegationKey.java @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.queue.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * A user delegation key. + */ +@Fluent +public final class UserDelegationKey implements XmlSerializable<UserDelegationKey> { + /* + * The Azure Active Directory object ID in GUID format. + */ + @Generated + private String signedObjectId; + + /* + * The Azure Active Directory tenant ID in GUID format + */ + @Generated + private String signedTenantId; + + /* + * The date-time the key is active + */ + @Generated + private OffsetDateTime signedStart; + + /* + * The date-time the key expires + */ + @Generated + private OffsetDateTime signedExpiry; + + /* + * Abbreviation of the Azure Storage service that accepts the key + */ + @Generated + private String signedService; + + /* + * The service version that created the key + */ + @Generated + private String signedVersion; + + /* + * The key as a base64 string + */ + @Generated + private String value; + + /** + * Creates an instance of UserDelegationKey class. + */ + @Generated + public UserDelegationKey() { + } + + /** + * Get the signedObjectId property: The Azure Active Directory object ID in GUID format. + * + * @return the signedObjectId value. + */ + @Generated + public String getSignedObjectId() { + return this.signedObjectId; + } + + /** + * Set the signedObjectId property: The Azure Active Directory object ID in GUID format. + * + * @param signedObjectId the signedObjectId value to set. + * @return the UserDelegationKey object itself. + */ + @Generated + public UserDelegationKey setSignedObjectId(String signedObjectId) { + this.signedObjectId = signedObjectId; + return this; + } + + /** + * Get the signedTenantId property: The Azure Active Directory tenant ID in GUID format. + * + * @return the signedTenantId value. + */ + @Generated + public String getSignedTenantId() { + return this.signedTenantId; + } + + /** + * Set the signedTenantId property: The Azure Active Directory tenant ID in GUID format. + * + * @param signedTenantId the signedTenantId value to set. + * @return the UserDelegationKey object itself. + */ + @Generated + public UserDelegationKey setSignedTenantId(String signedTenantId) { + this.signedTenantId = signedTenantId; + return this; + } + + /** + * Get the signedStart property: The date-time the key is active. + * + * @return the signedStart value. + */ + @Generated + public OffsetDateTime getSignedStart() { + return this.signedStart; + } + + /** + * Set the signedStart property: The date-time the key is active. + * + * @param signedStart the signedStart value to set. + * @return the UserDelegationKey object itself. + */ + @Generated + public UserDelegationKey setSignedStart(OffsetDateTime signedStart) { + this.signedStart = signedStart; + return this; + } + + /** + * Get the signedExpiry property: The date-time the key expires. + * + * @return the signedExpiry value. + */ + @Generated + public OffsetDateTime getSignedExpiry() { + return this.signedExpiry; + } + + /** + * Set the signedExpiry property: The date-time the key expires. + * + * @param signedExpiry the signedExpiry value to set. + * @return the UserDelegationKey object itself. + */ + @Generated + public UserDelegationKey setSignedExpiry(OffsetDateTime signedExpiry) { + this.signedExpiry = signedExpiry; + return this; + } + + /** + * Get the signedService property: Abbreviation of the Azure Storage service that accepts the key. + * + * @return the signedService value. + */ + @Generated + public String getSignedService() { + return this.signedService; + } + + /** + * Set the signedService property: Abbreviation of the Azure Storage service that accepts the key. + * + * @param signedService the signedService value to set. + * @return the UserDelegationKey object itself. + */ + @Generated + public UserDelegationKey setSignedService(String signedService) { + this.signedService = signedService; + return this; + } + + /** + * Get the signedVersion property: The service version that created the key. + * + * @return the signedVersion value. + */ + @Generated + public String getSignedVersion() { + return this.signedVersion; + } + + /** + * Set the signedVersion property: The service version that created the key. + * + * @param signedVersion the signedVersion value to set. + * @return the UserDelegationKey object itself. + */ + @Generated + public UserDelegationKey setSignedVersion(String signedVersion) { + this.signedVersion = signedVersion; + return this; + } + + /** + * Get the value property: The key as a base64 string. + * + * @return the value value. + */ + @Generated + public String getValue() { + return this.value; + } + + /** + * Set the value property: The key as a base64 string. + * + * @param value the value value to set. + * @return the UserDelegationKey object itself. + */ + @Generated + public UserDelegationKey setValue(String value) { + this.value = value; + return this; + } + + @Generated + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Generated + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "UserDelegationKey" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("SignedOid", this.signedObjectId); + xmlWriter.writeStringElement("SignedTid", this.signedTenantId); + xmlWriter.writeStringElement("SignedStart", + this.signedStart == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.signedStart)); + xmlWriter.writeStringElement("SignedExpiry", + this.signedExpiry == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.signedExpiry)); + xmlWriter.writeStringElement("SignedService", this.signedService); + xmlWriter.writeStringElement("SignedVersion", this.signedVersion); + xmlWriter.writeStringElement("Value", this.value); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of UserDelegationKey from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of UserDelegationKey if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the UserDelegationKey. + */ + @Generated + public static UserDelegationKey fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of UserDelegationKey from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of UserDelegationKey if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the UserDelegationKey. + */ + @Generated + public static UserDelegationKey fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "UserDelegationKey" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + UserDelegationKey deserializedUserDelegationKey = new UserDelegationKey(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("SignedOid".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedObjectId = reader.getStringElement(); + } else if ("SignedTid".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedTenantId = reader.getStringElement(); + } else if ("SignedStart".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedStart + = reader.getNullableElement(dateString -> CoreUtils.parseBestOffsetDateTime(dateString)); + } else if ("SignedExpiry".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedExpiry + = reader.getNullableElement(dateString -> CoreUtils.parseBestOffsetDateTime(dateString)); + } else if ("SignedService".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedService = reader.getStringElement(); + } else if ("SignedVersion".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedVersion = reader.getStringElement(); + } else if ("Value".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.value = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedUserDelegationKey; + }); + } +} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/sas/QueueServiceSasSignatureValues.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/sas/QueueServiceSasSignatureValues.java index 833d08fa9120..2b15ba039978 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/sas/QueueServiceSasSignatureValues.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/sas/QueueServiceSasSignatureValues.java @@ -28,18 +28,13 @@ public final class QueueServiceSasSignatureValues { .get(Constants.PROPERTY_AZURE_STORAGE_SAS_SERVICE_VERSION, QueueServiceVersion.getLatest().getVersion()); private SasProtocol protocol; - private OffsetDateTime startTime; - private OffsetDateTime expiryTime; - private String permissions; - private SasIpRange sasIpRange; - private String queueName; - private String identifier; + private String delegatedUserObjectId; /** * Creates an object with empty values for all fields. @@ -212,7 +207,7 @@ public QueueServiceSasSignatureValues setSasIpRange(SasIpRange sasIpRange) { * Gets the name of the queue this SAS may access. * * @return The name of the queue the SAS user may access. - * @deprecated Queue name is now auto-populated by the SAS generation methods provided on the desired queue client. + * @deprecated Queue name is now autopopulated by the SAS generation methods provided on the desired queue client. */ @Deprecated public String getQueueName() { @@ -225,7 +220,7 @@ public String getQueueName() { * @param queueName Canonical name of the object the SAS grants access * @return the updated QueueServiceSasSignatureValues object * @deprecated Please use the generateSas methods provided on the desired queue client that will - * auto-populate the queue name. + * autopopulate the queue name. */ @Deprecated public QueueServiceSasSignatureValues setQueueName(String queueName) { @@ -270,6 +265,30 @@ public QueueServiceSasSignatureValues setIdentifier(String identifier) { return this; } + /** + * Optional. Beginning in version 2025-07-05, this value specifies the Entra ID of the user that is authorized to + * use the resulting SAS URL. The resulting SAS URL must be used in conjunction with an Entra ID token that has been + * issued to the user specified in this value. + * + * @return The Entra ID of the user that is authorized to use the resulting SAS URL. + */ + public String getDelegatedUserObjectId() { + return delegatedUserObjectId; + } + + /** + * Optional. Beginning in version 2025-07-05, this value specifies the Entra ID of the user that is authorized to + * use the resulting SAS URL. The resulting SAS URL must be used in conjunction with an Entra ID token that has been + * issued to the user specified in this value. + * + * @param delegatedUserObjectId The Entra ID of the user that is authorized to use the resulting SAS URL. + * @return the updated QueueServiceSasSignatureValues object + */ + public QueueServiceSasSignatureValues setDelegatedUserObjectId(String delegatedUserObjectId) { + this.delegatedUserObjectId = delegatedUserObjectId; + return this; + } + /** * Uses an account's shared key credential to sign these signature values to produce the proper SAS query * parameters. diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAsyncApiTests.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAsyncApiTests.java index 9d06fc7aa2ec..7e59683ec577 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAsyncApiTests.java +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueAsyncApiTests.java @@ -897,7 +897,7 @@ public void audienceFromString() { @RequiredServiceVersion(clazz = QueueServiceVersion.class, min = "2025-07-05") public void getSetAccessPolicyOAuth() { // Arrange - QueueServiceAsyncClient service = getOAuthQueueAsyncServiceClient(); + QueueServiceAsyncClient service = getOAuthQueueServiceAsyncClient(); Mono<Boolean> createQueue = queueAsyncClient.createIfNotExists(); queueAsyncClient = service.getQueueAsyncClient(queueName); diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasAsyncClientTests.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasAsyncClientTests.java index 33884b813d1d..b042584fd886 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasAsyncClientTests.java +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasAsyncClientTests.java @@ -3,26 +3,41 @@ package com.azure.storage.queue; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.rest.Response; import com.azure.storage.common.sas.AccountSasPermission; import com.azure.storage.common.sas.AccountSasResourceType; import com.azure.storage.common.sas.AccountSasService; import com.azure.storage.common.sas.AccountSasSignatureValues; import com.azure.storage.common.sas.SasProtocol; +import com.azure.storage.common.test.shared.StorageCommonTestUtils; +import com.azure.storage.common.test.shared.extensions.LiveOnly; +import com.azure.storage.common.test.shared.extensions.RequiredServiceVersion; import com.azure.storage.queue.models.QueueAccessPolicy; +import com.azure.storage.queue.models.QueueErrorCode; +import com.azure.storage.queue.models.QueueMessageItem; +import com.azure.storage.queue.models.QueueProperties; import com.azure.storage.queue.models.QueueSignedIdentifier; import com.azure.storage.queue.models.QueueStorageException; import com.azure.storage.queue.models.SendMessageResult; +import com.azure.storage.queue.models.UserDelegationKey; import com.azure.storage.queue.sas.QueueSasPermission; import com.azure.storage.queue.sas.QueueServiceSasSignatureValues; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import java.time.Duration; import java.time.OffsetDateTime; import java.time.temporal.ChronoUnit; import java.util.Arrays; +import java.util.List; +import static com.azure.storage.common.test.shared.StorageCommonTestUtils.getOidFromToken; +import static com.azure.storage.queue.QueueTestHelper.assertExceptionStatusCodeAndMessage; +import static com.azure.storage.queue.QueueTestHelper.assertResponseStatusCode; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -160,4 +175,113 @@ public void accountSasListQueues() { assertDoesNotThrow(() -> sc.listQueues().next().block() != null); } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = QueueServiceVersion.class, min = "2026-02-06") + public void queueSasUserDelegationDelegatedObjectId() { + liveTestScenarioWithRetry(() -> { + QueueSasPermission permissions = new QueueSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + QueueServiceSasSignatureValues sasValues + = new QueueServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + + Flux<Response<QueueProperties>> response = getUserDelegationInfo().flatMapMany(key -> { + String sas = asyncSasClient.generateUserDelegationSas(sasValues, key); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. + QueueAsyncClient client = instrument(new QueueClientBuilder().endpoint(asyncSasClient.getQueueUrl()) + .sasToken(sas) + .credential(tokenCredential)).buildAsyncClient(); + + return client.getPropertiesWithResponse(); + }); + + StepVerifier.create(response).assertNext(r -> assertResponseStatusCode(r, 200)).verifyComplete(); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = QueueServiceVersion.class, min = "2026-02-06") + public void queueSasUserDelegationDelegatedObjectIdFail() { + liveTestScenarioWithRetry(() -> { + QueueSasPermission permissions = new QueueSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + QueueServiceSasSignatureValues sasValues + = new QueueServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + + Flux<Response<QueueProperties>> response = getUserDelegationInfo().flatMapMany(key -> { + String sas = asyncSasClient.generateUserDelegationSas(sasValues, key); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. + QueueAsyncClient client + = instrument(new QueueClientBuilder().endpoint(asyncSasClient.getQueueUrl()).sasToken(sas)) + .buildAsyncClient(); + + return client.getPropertiesWithResponse(); + }); + + StepVerifier.create(response) + .verifyErrorSatisfies( + e -> assertExceptionStatusCodeAndMessage(e, 403, QueueErrorCode.AUTHENTICATION_FAILED)); + }); + } + + @Test + @RequiredServiceVersion(clazz = QueueServiceVersion.class, min = "2026-02-06") + public void sendMessageUserDelegationSAS() { + liveTestScenarioWithRetry(() -> { + QueueSasPermission permissions = new QueueSasPermission().setReadPermission(true) + .setAddPermission(true) + .setProcessPermission(true) + .setUpdatePermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + QueueServiceSasSignatureValues sasValues = new QueueServiceSasSignatureValues(expiryTime, permissions); + + Mono<List<QueueMessageItem>> response = getUserDelegationInfo().flatMap(key -> { + String sas = asyncSasClient.generateUserDelegationSas(sasValues, key); + + QueueAsyncClient client + = instrument(new QueueClientBuilder().endpoint(asyncSasClient.getQueueUrl()).sasToken(sas)) + .buildAsyncClient(); + + return client.sendMessage(DATA.getDefaultBinaryData()).then(client.receiveMessages(2).collectList()); + }); + + StepVerifier.create(response).assertNext(messageItemList -> { + // The first message is the one sent in setup. + assertEquals(2, messageItemList.size()); + assertEquals("test", messageItemList.get(0).getBody().toString()); + assertEquals(DATA.getDefaultText(), messageItemList.get(1).getBody().toString()); + }).verifyComplete(); + }); + } + + private Mono<UserDelegationKey> getUserDelegationInfo() { + return getOAuthQueueServiceAsyncClient() + .getUserDelegationKey(testResourceNamer.now().minusDays(1), testResourceNamer.now().plusDays(1)) + .flatMap(r -> { + String keyOid = testResourceNamer.recordValueFromConfig(r.getSignedObjectId()); + r.setSignedObjectId(keyOid); + String keyTid = testResourceNamer.recordValueFromConfig(r.getSignedTenantId()); + r.setSignedTenantId(keyTid); + return Mono.just(r); + }); + } } diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasClientTests.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasClientTests.java index d7b208bcc0c8..0a6c9df1466d 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasClientTests.java +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasClientTests.java @@ -3,16 +3,25 @@ package com.azure.storage.queue; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; import com.azure.storage.common.sas.AccountSasPermission; import com.azure.storage.common.sas.AccountSasResourceType; import com.azure.storage.common.sas.AccountSasService; import com.azure.storage.common.sas.AccountSasSignatureValues; import com.azure.storage.common.sas.SasProtocol; +import com.azure.storage.common.test.shared.StorageCommonTestUtils; +import com.azure.storage.common.test.shared.extensions.LiveOnly; +import com.azure.storage.common.test.shared.extensions.RequiredServiceVersion; import com.azure.storage.queue.models.QueueAccessPolicy; +import com.azure.storage.queue.models.QueueErrorCode; import com.azure.storage.queue.models.QueueMessageItem; +import com.azure.storage.queue.models.QueueProperties; import com.azure.storage.queue.models.QueueSignedIdentifier; import com.azure.storage.queue.models.QueueStorageException; import com.azure.storage.queue.models.SendMessageResult; +import com.azure.storage.queue.models.UserDelegationKey; import com.azure.storage.queue.sas.QueueSasPermission; import com.azure.storage.queue.sas.QueueServiceSasSignatureValues; import org.junit.jupiter.api.BeforeEach; @@ -24,9 +33,14 @@ import java.util.Arrays; import java.util.Iterator; +import static com.azure.storage.common.test.shared.StorageCommonTestUtils.getOidFromToken; +import static com.azure.storage.queue.QueueTestHelper.assertExceptionStatusCodeAndMessage; +import static com.azure.storage.queue.QueueTestHelper.assertResponseStatusCode; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; public class QueueSasClientTests extends QueueTestBase { private QueueClient sasClient; @@ -172,4 +186,94 @@ public void rememberAboutStringToSignDeprecation() { assertEquals(deprecatedStringToSign, client.generateSas(values)); } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = QueueServiceVersion.class, min = "2026-02-06") + public void queueSasUserDelegationDelegatedObjectId() { + liveTestScenarioWithRetry(() -> { + QueueSasPermission permissions = new QueueSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + QueueServiceSasSignatureValues sasValues + = new QueueServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = sasClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. + QueueClient client = instrument( + new QueueClientBuilder().endpoint(sasClient.getQueueUrl()).sasToken(sas).credential(tokenCredential)) + .buildClient(); + + Response<QueueProperties> response = client.getPropertiesWithResponse(null, Context.NONE); + assertResponseStatusCode(response, 200); + }); + } + + // RBAC replication lag + @Test + @LiveOnly + @RequiredServiceVersion(clazz = QueueServiceVersion.class, min = "2026-02-06") + public void queueSasUserDelegationDelegatedObjectIdFail() { + liveTestScenarioWithRetry(() -> { + QueueSasPermission permissions = new QueueSasPermission().setReadPermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + TokenCredential tokenCredential = StorageCommonTestUtils.getTokenCredential(interceptorManager); + + // We need to get the object ID from the token credential used to authenticate the request + String oid = getOidFromToken(tokenCredential); + QueueServiceSasSignatureValues sasValues + = new QueueServiceSasSignatureValues(expiryTime, permissions).setDelegatedUserObjectId(oid); + String sas = sasClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + // When a delegated user object ID is set, the client must be authenticated with both the SAS and the + // token credential. Token credential is not provided here, so the request should fail. + QueueClient client + = instrument(new QueueClientBuilder().endpoint(sasClient.getQueueUrl()).sasToken(sas)).buildClient(); + + QueueStorageException e + = assertThrows(QueueStorageException.class, () -> client.getPropertiesWithResponse(null, Context.NONE)); + assertExceptionStatusCodeAndMessage(e, 403, QueueErrorCode.AUTHENTICATION_FAILED); + }); + } + + @Test + @RequiredServiceVersion(clazz = QueueServiceVersion.class, min = "2026-02-06") + public void sendMessageUserDelegationSAS() { + liveTestScenarioWithRetry(() -> { + QueueSasPermission permissions = new QueueSasPermission().setReadPermission(true) + .setAddPermission(true) + .setProcessPermission(true) + .setUpdatePermission(true); + OffsetDateTime expiryTime = testResourceNamer.now().plusHours(1); + + QueueServiceSasSignatureValues sasValues = new QueueServiceSasSignatureValues(expiryTime, permissions); + String sas = sasClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()); + + QueueClient client + = instrument(new QueueClientBuilder().endpoint(sasClient.getQueueUrl()).sasToken(sas)).buildClient(); + + client.sendMessage(DATA.getDefaultBinaryData()); + Iterator<QueueMessageItem> dequeueMsgIter = client.receiveMessages(2).iterator(); + assertTrue(dequeueMsgIter.hasNext()); + dequeueMsgIter.next(); // Skip the first message, which is the one we sent in the setup + assertArrayEquals(DATA.getDefaultBytes(), dequeueMsgIter.next().getBody().toBytes()); + }); + } + + protected UserDelegationKey getUserDelegationInfo() { + UserDelegationKey key = getOAuthQueueServiceClient().getUserDelegationKey(testResourceNamer.now().minusDays(1), + testResourceNamer.now().plusDays(1)); + String keyOid = testResourceNamer.recordValueFromConfig(key.getSignedObjectId()); + key.setSignedObjectId(keyOid); + String keyTid = testResourceNamer.recordValueFromConfig(key.getSignedTenantId()); + key.setSignedTenantId(keyTid); + return key; + } } diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceApiTests.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceApiTests.java index 8e5901c27f1c..0c98ae65d2b8 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceApiTests.java +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceApiTests.java @@ -6,6 +6,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.storage.common.test.shared.extensions.LiveOnly; import com.azure.storage.common.test.shared.extensions.RequiredServiceVersion; @@ -18,6 +19,7 @@ import com.azure.storage.queue.models.QueueServiceProperties; import com.azure.storage.queue.models.QueueStorageException; import com.azure.storage.queue.models.QueuesSegmentOptions; +import com.azure.storage.queue.models.UserDelegationKey; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.parallel.ResourceLock; @@ -27,6 +29,8 @@ import java.net.MalformedURLException; import java.net.URL; +import java.time.OffsetDateTime; +import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.Collections; import java.util.LinkedList; @@ -272,4 +276,28 @@ public void audienceFromString() { assertNotNull(aadService.getProperties()); } + + @Test + @RequiredServiceVersion(clazz = QueueServiceVersion.class, min = "2026-02-06") + public void queueServiceGetUserDelegationKey() { + QueueServiceClient oAuthServiceClient = getOAuthQueueServiceClient(); + + OffsetDateTime expiry = testResourceNamer.now().plusHours(1).truncatedTo(ChronoUnit.SECONDS); + Response<UserDelegationKey> response + = oAuthServiceClient.getUserDelegationKeyWithResponse(testResourceNamer.now(), expiry, null, Context.NONE); + + assertEquals(expiry, response.getValue().getSignedExpiry()); + } + + @Test + @RequiredServiceVersion(clazz = QueueServiceVersion.class, min = "2026-02-06") + public void queueServiceGetUserDelegationKeyAuthError() { + OffsetDateTime expiry = testResourceNamer.now().plusHours(1).truncatedTo(ChronoUnit.SECONDS); + + //not oauth client + QueueStorageException e = assertThrows(QueueStorageException.class, () -> primaryQueueServiceClient + .getUserDelegationKeyWithResponse(testResourceNamer.now(), expiry, null, Context.NONE)); + + QueueTestHelper.assertExceptionStatusCodeAndMessage(e, 403, QueueErrorCode.AUTHENTICATION_FAILED); + } } diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAsyncApiTests.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAsyncApiTests.java index b54015b65c24..ae16863899a8 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAsyncApiTests.java +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueServiceAsyncApiTests.java @@ -15,6 +15,7 @@ import com.azure.storage.queue.models.QueueRetentionPolicy; import com.azure.storage.queue.models.QueueServiceProperties; import com.azure.storage.queue.models.QueuesSegmentOptions; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.parallel.ResourceLock; @@ -25,6 +26,8 @@ import java.net.MalformedURLException; import java.net.URL; +import java.time.OffsetDateTime; +import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.Collections; import java.util.LinkedList; @@ -235,7 +238,7 @@ public void audienceErrorBearerChallengeRetry() { = getOAuthServiceClientBuilder().audience(QueueAudience.createQueueServiceAccountAudience("badaudience")) .buildAsyncClient(); - StepVerifier.create(aadService.getProperties()).assertNext(r -> assertNotNull(r)).verifyComplete(); + StepVerifier.create(aadService.getProperties()).assertNext(Assertions::assertNotNull).verifyComplete(); } @Test @@ -246,6 +249,29 @@ public void audienceFromString() { QueueServiceAsyncClient aadService = getOAuthServiceClientBuilder().audience(audience).buildAsyncClient(); - StepVerifier.create(aadService.getProperties()).assertNext(r -> assertNotNull(r)).verifyComplete(); + StepVerifier.create(aadService.getProperties()).assertNext(Assertions::assertNotNull).verifyComplete(); + } + + @Test + @RequiredServiceVersion(clazz = QueueServiceVersion.class, min = "2026-02-06") + public void queueServiceGetUserDelegationKey() { + QueueServiceAsyncClient oAuthServiceClient = getOAuthQueueServiceAsyncClient(); + + OffsetDateTime expiry = testResourceNamer.now().plusHours(1).truncatedTo(ChronoUnit.SECONDS); + StepVerifier.create(oAuthServiceClient.getUserDelegationKeyWithResponse(testResourceNamer.now(), expiry)) + .assertNext(r -> assertEquals(expiry, r.getValue().getSignedExpiry())) + .verifyComplete(); + } + + @Test + @RequiredServiceVersion(clazz = QueueServiceVersion.class, min = "2026-02-06") + public void queueServiceGetUserDelegationKeyAuthError() { + OffsetDateTime expiry = testResourceNamer.now().plusHours(1).truncatedTo(ChronoUnit.SECONDS); + + //not oauth client + StepVerifier + .create(primaryQueueServiceAsyncClient.getUserDelegationKeyWithResponse(testResourceNamer.now(), expiry)) + .verifyErrorSatisfies( + e -> QueueTestHelper.assertExceptionStatusCodeAndMessage(e, 403, QueueErrorCode.AUTHENTICATION_FAILED)); } } diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestBase.java b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestBase.java index 23b94a8041ca..09fa8892604e 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestBase.java +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueTestBase.java @@ -13,6 +13,7 @@ import com.azure.core.util.Context; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.test.shared.StorageCommonTestUtils; +import com.azure.storage.common.test.shared.TestDataFactory; import com.azure.storage.common.test.shared.TestEnvironment; import com.azure.storage.common.test.shared.policy.PerCallVersionPolicy; import com.azure.storage.queue.models.QueuesSegmentOptions; @@ -26,6 +27,7 @@ */ public class QueueTestBase extends TestProxyTestBase { protected static final TestEnvironment ENVIRONMENT = TestEnvironment.getInstance(); + protected static final TestDataFactory DATA = TestDataFactory.getInstance(); protected String prefix; @@ -88,7 +90,7 @@ protected QueueServiceClient getOAuthQueueServiceClient() { return getOAuthServiceClientBuilder().buildClient(); } - protected QueueServiceAsyncClient getOAuthQueueAsyncServiceClient() { + protected QueueServiceAsyncClient getOAuthQueueServiceAsyncClient() { return getOAuthServiceClientBuilder().buildAsyncClient(); } @@ -145,4 +147,26 @@ protected <T extends HttpTrait<T>, E extends Enum<E>> T instrument(T builder) { protected String getPrimaryConnectionString() { return ENVIRONMENT.getPrimaryAccount().getConnectionString(); } + + protected void liveTestScenarioWithRetry(Runnable runnable) { + if (!interceptorManager.isLiveMode()) { + runnable.run(); + return; + } + + int retry = 0; + + // Try up to 4 times + while (retry < 4) { + try { + runnable.run(); + return; // success + } catch (Exception ex) { + retry++; + sleepIfRunningAgainstService(5000); + } + } + // Final attempt (5th try) + runnable.run(); + } } diff --git a/sdk/storage/azure-storage-queue/swagger/README.md b/sdk/storage/azure-storage-queue/swagger/README.md index 99294513c115..d24cb97c225f 100644 --- a/sdk/storage/azure-storage-queue/swagger/README.md +++ b/sdk/storage/azure-storage-queue/swagger/README.md @@ -15,7 +15,7 @@ autorest ### Code generation settings ``` yaml use: '@autorest/java@4.1.52' -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/f031b8ef2830772c5c33d1768886551f7e538b7c/specification/storage/data-plane/Microsoft.QueueStorage/stable/2018-03-28/queue.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/refs/heads/main/specification/storage/data-plane/Microsoft.QueueStorage/stable/2026-02-06/queue.json java: true output-folder: ../ namespace: com.azure.storage.queue @@ -24,7 +24,7 @@ license-header: MICROSOFT_MIT_SMALL enable-sync-stack: true default-http-exception-type: com.azure.storage.queue.implementation.models.QueueStorageExceptionInternal models-subpackage: implementation.models -custom-types: QueueErrorCode,QueueSignedIdentifier,SendMessageResult,QueueMessageItem,PeekedMessageItem,QueueItem,QueueServiceProperties,QueueServiceStatistics,QueueCorsRule,QueueAccessPolicy,QueueAnalyticsLogging,QueueMetrics,QueueRetentionPolicy,GeoReplicationStatus,GeoReplicationStatusType,GeoReplication +custom-types: QueueErrorCode,QueueSignedIdentifier,SendMessageResult,QueueMessageItem,PeekedMessageItem,QueueItem,QueueServiceProperties,QueueServiceStatistics,QueueCorsRule,QueueAccessPolicy,QueueAnalyticsLogging,QueueMetrics,QueueRetentionPolicy,GeoReplicationStatus,GeoReplicationStatusType,GeoReplication,UserDelegationKey,KeyInfo custom-types-subpackage: models customization-class: src/main/java/QueueStorageCustomization.java use-input-stream-for-binary: true @@ -141,4 +141,14 @@ directive: $["x-ms-pageable"].itemName = "QueueItems"; ``` +### Rename UserDelegationKey SignedOid and SignedTid +``` yaml +directive: +- from: swagger-document + where: $.definitions.UserDelegationKey + transform: > + $.properties.SignedOid["x-ms-client-name"] = "signedObjectId"; + $.properties.SignedTid["x-ms-client-name"] = "signedTenantId"; +``` + diff --git a/sdk/storage/test-resources.json b/sdk/storage/test-resources.json index 92cbf61f3e59..eb61855840d7 100644 --- a/sdk/storage/test-resources.json +++ b/sdk/storage/test-resources.json @@ -31,6 +31,7 @@ "contributorRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c')]", "blobDataOwnerRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/b7e6dc6d-f1e8-4753-8033-0f276bb0955b')]", "fileDataPrivilegedContributorRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/69566ab7-960f-475b-8e7c-b3118f30c6bd')]", + "queueDataContributorRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/974c5e8b-45b9-4653-ba55-5f855dd0fb88')]", "primaryAccountName": "[concat('prim', parameters('baseName'))]", "secondaryAccountName": "[concat('sec', parameters('baseName'))]", "softDeleteAccountName": "[concat('sftdl', parameters('baseName'))]", @@ -59,6 +60,18 @@ "principalId": "[parameters('testApplicationOid')]" } }, + { + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "[variables('authorizationApiVersion')]", + "name": "[guid(concat('queueDataContributorRoleId', variables('primaryAccountName')))]", + "dependsOn": [ + "[variables('primaryAccountName')]" + ], + "properties": { + "roleDefinitionId": "[variables('queueDataContributorRoleId')]", + "principalId": "[parameters('testApplicationOid')]" + } + }, { "type": "Microsoft.Authorization/roleAssignments", "apiVersion": "[variables('authorizationApiVersion')]", From 3276116ce10f281405321f2080f4b044f0f99783 Mon Sep 17 00:00:00 2001 From: Isabelle <141270045+ibrandes@users.noreply.github.com> Date: Wed, 3 Dec 2025 10:33:17 -0800 Subject: [PATCH 090/186] STG100 Beta Release (#47430) --- sdk/storage/azure-storage-blob-batch/CHANGELOG.md | 5 ++--- sdk/storage/azure-storage-blob-batch/README.md | 2 +- sdk/storage/azure-storage-blob-changefeed/CHANGELOG.md | 9 ++------- sdk/storage/azure-storage-blob-changefeed/README.md | 2 +- sdk/storage/azure-storage-blob-cryptography/CHANGELOG.md | 9 ++------- sdk/storage/azure-storage-blob-cryptography/README.md | 2 +- sdk/storage/azure-storage-blob-nio/CHANGELOG.md | 7 ++----- sdk/storage/azure-storage-blob-nio/README.md | 2 +- sdk/storage/azure-storage-blob/CHANGELOG.md | 7 ++----- sdk/storage/azure-storage-blob/README.md | 2 +- sdk/storage/azure-storage-common/CHANGELOG.md | 7 ++----- 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 | 9 ++------- sdk/storage/azure-storage-file-share/README.md | 2 +- sdk/storage/azure-storage-internal-avro/CHANGELOG.md | 9 ++------- sdk/storage/azure-storage-queue/CHANGELOG.md | 9 ++------- sdk/storage/azure-storage-queue/README.md | 2 +- 19 files changed, 29 insertions(+), 68 deletions(-) diff --git a/sdk/storage/azure-storage-blob-batch/CHANGELOG.md b/sdk/storage/azure-storage-blob-batch/CHANGELOG.md index 425197e0922f..24779f23c28d 100644 --- a/sdk/storage/azure-storage-blob-batch/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob-batch/CHANGELOG.md @@ -1,10 +1,9 @@ # Release History -## 12.29.0-beta.1 (Unreleased) +## 12.29.0-beta.1 (2025-12-03) ### Features Added - -### Breaking Changes +- Added support for service version 2026-02-06. ### Bugs Fixed - Fixed an issue where `BlobBatchSetBlobAccessTierOptions` would not properly handle blob names with special characters. diff --git a/sdk/storage/azure-storage-blob-batch/README.md b/sdk/storage/azure-storage-blob-batch/README.md index dbd906f935b3..a162c0eab9b6 100644 --- a/sdk/storage/azure-storage-blob-batch/README.md +++ b/sdk/storage/azure-storage-blob-batch/README.md @@ -56,7 +56,7 @@ add the direct dependency to your project as follows. <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-blob-batch</artifactId> - <version>12.28.0</version> + <version>12.29.0-beta.1</version> </dependency> ``` [//]: # ({x-version-update-end}) diff --git a/sdk/storage/azure-storage-blob-changefeed/CHANGELOG.md b/sdk/storage/azure-storage-blob-changefeed/CHANGELOG.md index 1b62d17bb3c0..a105df27b6ee 100644 --- a/sdk/storage/azure-storage-blob-changefeed/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob-changefeed/CHANGELOG.md @@ -1,14 +1,9 @@ # Release History -## 12.0.0-beta.33 (Unreleased) +## 12.0.0-beta.33 (2025-12-03) ### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Added support for service version 2026-02-06. ## 12.0.0-beta.32 (2025-10-21) diff --git a/sdk/storage/azure-storage-blob-changefeed/README.md b/sdk/storage/azure-storage-blob-changefeed/README.md index efc1e06574c7..97e5613a7c1e 100644 --- a/sdk/storage/azure-storage-blob-changefeed/README.md +++ b/sdk/storage/azure-storage-blob-changefeed/README.md @@ -21,7 +21,7 @@ process change events that occur in your Blob Storage account at a low cost. <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-blob-changefeed</artifactId> - <version>12.0.0-beta.32</version> + <version>12.0.0-beta.33</version> </dependency> ``` [//]: # ({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 5b8ea02ede57..58d1c938ede5 100644 --- a/sdk/storage/azure-storage-blob-cryptography/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob-cryptography/CHANGELOG.md @@ -1,14 +1,9 @@ # Release History -## 12.32.0-beta.1 (Unreleased) +## 12.32.0-beta.1 (2025-12-03) ### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Added support for service version 2026-02-06. ## 12.31.0 (2025-10-21) diff --git a/sdk/storage/azure-storage-blob-cryptography/README.md b/sdk/storage/azure-storage-blob-cryptography/README.md index 82347ef0e694..b836a062ae49 100644 --- a/sdk/storage/azure-storage-blob-cryptography/README.md +++ b/sdk/storage/azure-storage-blob-cryptography/README.md @@ -58,7 +58,7 @@ add the direct dependency to your project as follows. <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-blob-cryptography</artifactId> - <version>12.31.0</version> + <version>12.32.0-beta.1</version> </dependency> ``` [//]: # ({x-version-update-end}) diff --git a/sdk/storage/azure-storage-blob-nio/CHANGELOG.md b/sdk/storage/azure-storage-blob-nio/CHANGELOG.md index 1995acb47e1e..70466b927dfa 100644 --- a/sdk/storage/azure-storage-blob-nio/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob-nio/CHANGELOG.md @@ -1,16 +1,13 @@ # Release History -## 12.0.0-beta.34 (Unreleased) +## 12.0.0-beta.34 (2025-12-03) ### Features Added - -### Breaking Changes +- Added support for service version 2026-02-06. ### Bugs Fixed - Fixed an issue where the copy file operation would fail when using SAS token credentials. -### Other Changes - ## 12.0.0-beta.33 (2025-10-21) ### Features Added diff --git a/sdk/storage/azure-storage-blob-nio/README.md b/sdk/storage/azure-storage-blob-nio/README.md index c64ed9768f9a..6209cccc2e79 100644 --- a/sdk/storage/azure-storage-blob-nio/README.md +++ b/sdk/storage/azure-storage-blob-nio/README.md @@ -20,7 +20,7 @@ This package allows you to interact with Azure Blob Storage through the standard <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-blob-nio</artifactId> - <version>12.0.0-beta.33</version> + <version>12.0.0-beta.34</version> </dependency> ``` [//]: # ({x-version-update-end}) diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index 54f772c8d7b5..0b698c4aaa5b 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -1,15 +1,12 @@ # Release History -## 12.33.0-beta.1 (Unreleased) +## 12.33.0-beta.1 (2025-12-03) ### Features Added - Added support for the StartFrom parameter on `BlobContainerClient.listBlobs()` and `BlobContainerClient.listBlobsByHierarchy()` APIs. - Added support for conditional headers on `BlobClientBase.getTags()` and `BlobClientBase.setTags()` APIs. - Added support for Principal-Bound Identity User Delegation SAS. - -### Breaking Changes - -### Bugs Fixed +- Added support for service version 2026-02-06. ### Other Changes - Added support for container names with special characters when using OneLake. diff --git a/sdk/storage/azure-storage-blob/README.md b/sdk/storage/azure-storage-blob/README.md index 5195777ed02c..60b70bdd81e0 100644 --- a/sdk/storage/azure-storage-blob/README.md +++ b/sdk/storage/azure-storage-blob/README.md @@ -56,7 +56,7 @@ add the direct dependency to your project as follows. <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-blob</artifactId> - <version>12.32.0</version> + <version>12.33.0-beta.1</version> </dependency> ``` [//]: # ({x-version-update-end}) diff --git a/sdk/storage/azure-storage-common/CHANGELOG.md b/sdk/storage/azure-storage-common/CHANGELOG.md index 6c2a3842e421..e063dd51e3bb 100644 --- a/sdk/storage/azure-storage-common/CHANGELOG.md +++ b/sdk/storage/azure-storage-common/CHANGELOG.md @@ -1,17 +1,14 @@ # Release History -## 12.32.0-beta.1 (Unreleased) +## 12.32.0-beta.1 (2025-12-03) ### Features Added - -### Breaking Changes +- Added support for service version 2026-02-06. ### Bugs Fixed - Addressed a performance regression introduced in version 12.27.0+ of the Azure Storage SDK for Java, where token retrieval became thread-local, causing a consistent 4 to 5-second delay across threads during initial authorization. -### Other Changes - ## 12.31.0 (2025-10-21) ### Features Added diff --git a/sdk/storage/azure-storage-common/README.md b/sdk/storage/azure-storage-common/README.md index 8fa92ee9049f..172f28926ade 100644 --- a/sdk/storage/azure-storage-common/README.md +++ b/sdk/storage/azure-storage-common/README.md @@ -53,7 +53,7 @@ add the direct dependency to your project as follows. <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-common</artifactId> - <version>12.31.0</version> + <version>12.32.0-beta.1</version> </dependency> ``` [//]: # ({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 9914e825d341..1f808020a68f 100644 --- a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md +++ b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md @@ -1,15 +1,11 @@ # Release History -## 12.26.0-beta.1 (Unreleased) +## 12.26.0-beta.1 (2025-12-03) ### Features Added - Added support for the StartFrom parameter on `DataLakeFileSystemClient.listPaths()` APIs. - Added support for Principal-Bound Identity User Delegation SAS. - - -### Breaking Changes - -### Bugs Fixed +- Added support for service version 2026-02-06. ### Other Changes - Added support for container names with special characters when using OneLake. diff --git a/sdk/storage/azure-storage-file-datalake/README.md b/sdk/storage/azure-storage-file-datalake/README.md index d9de59c1d6bb..27e70d552719 100644 --- a/sdk/storage/azure-storage-file-datalake/README.md +++ b/sdk/storage/azure-storage-file-datalake/README.md @@ -57,7 +57,7 @@ add the direct dependency to your project as follows. <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-file-datalake</artifactId> - <version>12.25.0</version> + <version>12.26.0-beta.1</version> </dependency> ``` [//]: # ({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 8c8df94775c7..d25557538553 100644 --- a/sdk/storage/azure-storage-file-share/CHANGELOG.md +++ b/sdk/storage/azure-storage-file-share/CHANGELOG.md @@ -1,17 +1,12 @@ # Release History -## 12.29.0-beta.1 (Unreleased) +## 12.29.0-beta.1 (2025-12-03) ### Features Added - Added support for User Delegation SAS. - Added support for Principal-Bound Identity User Delegation SAS. - Added support for the `ShareServiceProperties.Protocol.SMB.EncryptionInTransit` parameter on `ShareServiceClient.setProperties()` APIs. - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Added support for service version 2026-02-06. ## 12.28.0 (2025-10-21) diff --git a/sdk/storage/azure-storage-file-share/README.md b/sdk/storage/azure-storage-file-share/README.md index 672bcbacc772..4de0fca8db90 100644 --- a/sdk/storage/azure-storage-file-share/README.md +++ b/sdk/storage/azure-storage-file-share/README.md @@ -60,7 +60,7 @@ add the direct dependency to your project as follows. <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-file-share</artifactId> - <version>12.28.0</version> + <version>12.29.0-beta.1</version> </dependency> ``` [//]: # ({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 7e24a71fd86b..e2f927d3c80f 100644 --- a/sdk/storage/azure-storage-internal-avro/CHANGELOG.md +++ b/sdk/storage/azure-storage-internal-avro/CHANGELOG.md @@ -1,14 +1,9 @@ # Release History -## 12.18.0-beta.1 (Unreleased) +## 12.18.0-beta.1 (2025-12-03) ### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Added support for service version 2026-02-06. ## 12.17.0 (2025-10-21) diff --git a/sdk/storage/azure-storage-queue/CHANGELOG.md b/sdk/storage/azure-storage-queue/CHANGELOG.md index d0ea5126cc8a..e054610c692c 100644 --- a/sdk/storage/azure-storage-queue/CHANGELOG.md +++ b/sdk/storage/azure-storage-queue/CHANGELOG.md @@ -1,16 +1,11 @@ # Release History -## 12.28.0-beta.1 (Unreleased) +## 12.28.0-beta.1 (2025-12-03) ### Features Added - Added support for User Delegation SAS. - Added support for Principal-Bound Identity User Delegation SAS. - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Added support for service version 2026-02-06. ## 12.27.0 (2025-10-21) diff --git a/sdk/storage/azure-storage-queue/README.md b/sdk/storage/azure-storage-queue/README.md index d0374af62c2f..42e1ecc9b0d2 100644 --- a/sdk/storage/azure-storage-queue/README.md +++ b/sdk/storage/azure-storage-queue/README.md @@ -54,7 +54,7 @@ add the direct dependency to your project as follows. <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-queue</artifactId> - <version>12.27.0</version> + <version>12.28.0-beta.1</version> </dependency> ``` [//]: # ({x-version-update-end}) From d0b14609fe3ec959ccd2e6a0e16435f0e2c97870 Mon Sep 17 00:00:00 2001 From: xitzhang <zhangxiting.zxt@gmail.com> Date: Wed, 3 Dec 2025 11:13:34 -0800 Subject: [PATCH 091/186] [VoiceLive] Release 1.0.0-beta.3 (#47423) * [VoiceLive] Release 1.0.0-beta.3 * update date --------- Co-authored-by: Xiting Zhang <xitzhang@microsoft.com> --- sdk/ai/azure-ai-voicelive/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/ai/azure-ai-voicelive/CHANGELOG.md b/sdk/ai/azure-ai-voicelive/CHANGELOG.md index ac7b58ba06f6..dfaefa1198e4 100644 --- a/sdk/ai/azure-ai-voicelive/CHANGELOG.md +++ b/sdk/ai/azure-ai-voicelive/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.3 (2025-12-03) ### Features Added From 8b04f91d1ccd302e1f6559a55b1aaad19fe32356 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 3 Dec 2025 11:50:55 -0800 Subject: [PATCH 092/186] Remove redundant usage of SpecProjectPath (#47435) Co-authored-by: Daniel Jurek <djurek@microsoft.com> --- eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 index a18aaaeb6d22..2e7521fb8b93 100644 --- a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 +++ b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 @@ -517,7 +517,6 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte $pkgType = $pkg.Type $pkgNewLibrary = $pkg.New $pkgRepoPath = $pkg.RepoPath - $specProjectPath = $pkg.SpecProjectPath $serviceName = $pkg.ServiceName $title = $lang + " - " + $pkg.DisplayName + " - " + $verMajorMinor From 12340c10c58acb6c3415f7fa15025674d81cb34e Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Wed, 3 Dec 2025 15:35:39 -0500 Subject: [PATCH 093/186] Remove shaded libraries from Cosmos with simple replacements (#47383) * Remove shaded UUID as nothing uses it * Remove shaded Apache Commons Math as it was only used for Pair, replaced with another shaded Pair implementation * Remove shaded Apache Commons Codec as it was only used in testing, use a Maven test dependency instead * Few updates for Apache Commons Codec change * Remove Guava 27 as all usages were string formatting, replaced by String.format * Fix enforcer failing build --- .../ReadMyWritesConsistencyTest.java | 3 +- .../EncryptionExceptionFactory.java | 8 +- .../CosmosEncryptionAsyncClientTest.java | 16 +- sdk/cosmos/azure-cosmos-tests/pom.xml | 6 + .../azure/cosmos/CosmosAsyncClientTest.java | 16 +- .../com/azure/cosmos/CosmosExceptionTest.java | 5 +- .../com/azure/cosmos/DocumentClientTest.java | 16 +- .../MurmurHash3_32Test.java | 2 +- .../RntbdTransportClientTest.java | 3 +- .../rntbd/ServerRntbdConstants.java | 10 +- .../rntbd/ServerRntbdContextRequest.java | 3 +- .../rntbd/ServerRntbdObjectMapper.java | 7 +- .../rntbd/ServerRntbdRequest.java | 3 +- .../TcpServerMock/rntbd/ServerRntbdToken.java | 5 +- .../rntbd/ServerRntbdTokenStream.java | 3 +- .../rntbd/ServerRntbdTokenType.java | 9 +- .../azure/cosmos/rx/AggregateQueryTests.java | 8 +- .../rx/DocumentClientResourceLeakTest.java | 3 +- .../cosmos/rx/ParallelDocumentQueryTest.java | 3 +- .../CosmosDaemonThreadFactory.java | 5 +- .../DiagnosticsClientContext.java | 5 +- .../FeedResponseDiagnostics.java | 4 +- .../cosmos/implementation/QueryMetrics.java | 4 +- .../RegionScopedSessionContainer.java | 4 +- .../apachecommons/codec/CharEncoding.java | 126 - .../codec/binary/CharSequenceUtils.java | 91 - .../codec/binary/StringUtils.java | 426 -- .../codec/digest/MurmurHash3.java | 1250 ---- .../apachecommons/math/Field.java | 62 - .../apachecommons/math/FieldElement.java | 91 - .../apachecommons/math/RealFieldElement.java | 406 -- .../math/analysis/UnivariateFunction.java | 85 - .../solvers/AbstractUnivariateSolver.java | 64 - .../analysis/solvers/AllowedSolution.java | 79 - .../solvers/BaseAbstractUnivariateSolver.java | 322 - .../solvers/BaseUnivariateSolver.java | 146 - .../solvers/BracketedUnivariateSolver.java | 96 - .../math/analysis/solvers/BrentSolver.java | 247 - .../analysis/solvers/UnivariateSolver.java | 32 - .../solvers/UnivariateSolverUtils.java | 471 -- .../AbstractIntegerDistribution.java | 257 - .../AbstractRealDistribution.java | 311 - .../math/distribution/BetaDistribution.java | 410 -- .../distribution/BinomialDistribution.java | 202 - .../math/distribution/CauchyDistribution.java | 260 - .../distribution/ChiSquaredDistribution.java | 200 - .../distribution/EnumeratedDistribution.java | 295 - .../EnumeratedIntegerDistribution.java | 280 - .../distribution/ExponentialDistribution.java | 355 - .../math/distribution/FDistribution.java | 332 - .../math/distribution/GammaDistribution.java | 517 -- .../HypergeometricDistribution.java | 351 - .../distribution/IntegerDistribution.java | 159 - .../math/distribution/NormalDistribution.java | 315 - .../math/distribution/PascalDistribution.java | 252 - .../distribution/PoissonDistribution.java | 399 -- .../math/distribution/RealDistribution.java | 200 - .../distribution/SaddlePointExpansion.java | 204 - .../math/distribution/TDistribution.java | 276 - .../UniformIntegerDistribution.java | 185 - .../distribution/WeibullDistribution.java | 357 - .../math/distribution/ZipfDistribution.java | 492 -- .../math/exception/ConvergenceException.java | 54 - .../exception/DimensionMismatchException.java | 68 - .../exception/MathArithmeticException.java | 80 - .../MathIllegalArgumentException.java | 68 - .../exception/MathIllegalNumberException.java | 64 - .../exception/MathIllegalStateException.java | 92 - .../math/exception/MathInternalError.java | 61 - .../MathUnsupportedOperationException.java | 76 - .../exception/MaxCountExceededException.java | 67 - .../math/exception/NoBracketingException.java | 110 - .../math/exception/NoDataException.java | 50 - .../NonMonotonicSequenceException.java | 124 - .../math/exception/NotANumberException.java | 41 - .../exception/NotFiniteNumberException.java | 58 - .../math/exception/NotPositiveException.java | 52 - .../NotStrictlyPositiveException.java | 53 - .../math/exception/NullArgumentException.java | 56 - .../exception/NumberIsTooLargeException.java | 89 - .../exception/NumberIsTooSmallException.java | 90 - .../math/exception/OutOfRangeException.java | 82 - .../TooManyEvaluationsException.java | 43 - .../math/exception/ZeroException.java | 52 - .../math/exception/util/ArgUtils.java | 59 - .../math/exception/util/DummyLocalizable.java | 61 - .../math/exception/util/ExceptionContext.java | 338 - .../util/ExceptionContextProvider.java | 37 - .../math/exception/util/Localizable.java | 47 - .../math/exception/util/LocalizedFormats.java | 418 -- .../math/exception/util/package-info.java | 26 - .../math/random/AbstractRandomGenerator.java | 275 - .../math/random/AbstractWell.java | 191 - .../math/random/BitsStreamGenerator.java | 274 - .../apachecommons/math/random/RandomData.java | 268 - .../math/random/RandomDataGenerator.java | 786 --- .../math/random/RandomDataImpl.java | 589 -- .../math/random/RandomGenerator.java | 151 - .../math/random/RandomGeneratorFactory.java | 125 - .../apachecommons/math/random/Well19937c.java | 118 - .../apachecommons/math/special/BesselJ.java | 652 -- .../apachecommons/math/special/Beta.java | 518 -- .../apachecommons/math/special/Erf.java | 248 - .../apachecommons/math/special/Gamma.java | 724 -- .../math/util/ArithmeticUtils.java | 911 --- .../apachecommons/math/util/Combinations.java | 409 -- .../math/util/CombinatoricsUtils.java | 466 -- .../math/util/ContinuedFraction.java | 185 - .../apachecommons/math/util/DoubleArray.java | 114 - .../apachecommons/math/util/FastMath.java | 4300 ------------ .../apachecommons/math/util/FastMathCalc.java | 662 -- .../math/util/FastMathLiteralArrays.java | 6179 ----------------- .../math/util/IntegerSequence.java | 366 - .../apachecommons/math/util/MathArrays.java | 1939 ------ .../apachecommons/math/util/MathUtils.java | 313 - .../apachecommons/math/util/Pair.java | 160 - .../apachecommons/math/util/Precision.java | 612 -- .../math/util/ResizableDoubleArray.java | 1214 ---- .../RntbdTransportClient.java | 7 +- .../rntbd/FailFastRntbdRequestRecord.java | 7 +- .../ProactiveOpenConnectionsProcessor.java | 7 +- .../rntbd/RntbdClientChannelPool.java | 5 +- .../rntbd/RntbdConstants.java | 10 +- .../rntbd/RntbdContextRequest.java | 5 +- .../directconnectivity/rntbd/RntbdFramer.java | 7 +- .../rntbd/RntbdObjectMapper.java | 7 +- .../rntbd/RntbdRequest.java | 3 +- .../rntbd/RntbdRequestFrame.java | 5 +- .../rntbd/RntbdRequestManager.java | 7 +- .../rntbd/RntbdRequestRecord.java | 3 +- .../rntbd/RntbdResponseStatus.java | 5 +- .../rntbd/RntbdServiceEndpoint.java | 5 +- .../rntbd/RntbdThreadFactory.java | 4 +- .../directconnectivity/rntbd/RntbdToken.java | 5 +- .../rntbd/RntbdTokenStream.java | 3 +- .../rntbd/RntbdTokenType.java | 9 +- .../directconnectivity/rntbd/RntbdUUID.java | 3 +- .../directconnectivity/rntbd/RntbdUtils.java | 4 +- .../implementation/guava27/Strings.java | 113 - .../routing/LocationHelper.java | 3 +- .../implementation/uuid/EthernetAddress.java | 509 -- .../implementation/uuid/Generators.java | 204 - .../azure/cosmos/implementation/uuid/Jug.java | 328 - .../implementation/uuid/NoArgGenerator.java | 33 - .../uuid/StringArgGenerator.java | 45 - .../uuid/TimestampSynchronizer.java | 88 - .../cosmos/implementation/uuid/UUIDClock.java | 40 - .../implementation/uuid/UUIDComparator.java | 96 - .../implementation/uuid/UUIDGenerator.java | 53 - .../cosmos/implementation/uuid/UUIDTimer.java | 411 -- .../cosmos/implementation/uuid/UUIDType.java | 48 - .../ext/FileBasedTimestampSynchronizer.java | 243 - .../implementation/uuid/ext/LockedFile.java | 293 - .../uuid/impl/NameBasedGenerator.java | 162 - .../uuid/impl/RandomBasedGenerator.java | 137 - .../uuid/impl/TimeBasedGenerator.java | 135 - .../implementation/uuid/impl/UUIDUtil.java | 327 - .../src/main/java/module-info.java | 1 - sdk/cosmos/cgmanifest.json | 40 - 159 files changed, 91 insertions(+), 39348 deletions(-) delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/codec/CharEncoding.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/codec/binary/CharSequenceUtils.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/codec/binary/StringUtils.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/codec/digest/MurmurHash3.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/Field.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/FieldElement.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/RealFieldElement.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/UnivariateFunction.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/AbstractUnivariateSolver.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/AllowedSolution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/BaseAbstractUnivariateSolver.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/BaseUnivariateSolver.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/BracketedUnivariateSolver.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/BrentSolver.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/UnivariateSolver.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/UnivariateSolverUtils.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/AbstractIntegerDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/AbstractRealDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/BetaDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/BinomialDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/CauchyDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/ChiSquaredDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/EnumeratedDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/EnumeratedIntegerDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/ExponentialDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/FDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/GammaDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/HypergeometricDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/IntegerDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/NormalDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/PascalDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/PoissonDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/RealDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/SaddlePointExpansion.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/TDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/UniformIntegerDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/WeibullDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/ZipfDistribution.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/ConvergenceException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/DimensionMismatchException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathArithmeticException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathIllegalArgumentException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathIllegalNumberException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathIllegalStateException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathInternalError.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathUnsupportedOperationException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MaxCountExceededException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NoBracketingException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NoDataException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NonMonotonicSequenceException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NotANumberException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NotFiniteNumberException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NotPositiveException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NotStrictlyPositiveException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NullArgumentException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NumberIsTooLargeException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NumberIsTooSmallException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/OutOfRangeException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/TooManyEvaluationsException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/ZeroException.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/ArgUtils.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/DummyLocalizable.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/ExceptionContext.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/ExceptionContextProvider.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/Localizable.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/LocalizedFormats.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/package-info.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/AbstractRandomGenerator.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/AbstractWell.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/BitsStreamGenerator.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomData.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomDataGenerator.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomDataImpl.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomGenerator.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomGeneratorFactory.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/Well19937c.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/special/BesselJ.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/special/Beta.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/special/Erf.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/special/Gamma.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/ArithmeticUtils.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/Combinations.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/CombinatoricsUtils.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/ContinuedFraction.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/DoubleArray.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/FastMath.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/FastMathCalc.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/FastMathLiteralArrays.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/IntegerSequence.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/MathArrays.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/MathUtils.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/Pair.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/Precision.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/ResizableDoubleArray.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/guava27/Strings.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/EthernetAddress.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/Generators.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/Jug.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/NoArgGenerator.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/StringArgGenerator.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/TimestampSynchronizer.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDClock.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDComparator.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDGenerator.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDTimer.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDType.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/ext/FileBasedTimestampSynchronizer.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/ext/LockedFile.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/impl/NameBasedGenerator.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/impl/RandomBasedGenerator.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/impl/TimeBasedGenerator.java delete mode 100644 sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/impl/UUIDUtil.java diff --git a/sdk/cosmos/azure-cosmos-benchmark/src/test/java/com/azure/cosmos/benchmark/ReadMyWritesConsistencyTest.java b/sdk/cosmos/azure-cosmos-benchmark/src/test/java/com/azure/cosmos/benchmark/ReadMyWritesConsistencyTest.java index 9955534afc46..47056d257f45 100644 --- a/sdk/cosmos/azure-cosmos-benchmark/src/test/java/com/azure/cosmos/benchmark/ReadMyWritesConsistencyTest.java +++ b/sdk/cosmos/azure-cosmos-benchmark/src/test/java/com/azure/cosmos/benchmark/ReadMyWritesConsistencyTest.java @@ -34,7 +34,6 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; @@ -113,7 +112,7 @@ public void readMyWrites(boolean useNameLink) throws Exception { " -printingInterval 60" + "%s"; - String cmd = lenientFormat(cmdFormat, + String cmd = String.format(cmdFormat, TestConfigurations.HOST, TestConfigurations.MASTER_KEY, database.getId(), diff --git a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/implementation/EncryptionExceptionFactory.java b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/implementation/EncryptionExceptionFactory.java index 7493b76c6d2c..adb792f2240c 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/implementation/EncryptionExceptionFactory.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/main/java/com/azure/cosmos/encryption/implementation/EncryptionExceptionFactory.java @@ -3,25 +3,23 @@ package com.azure.cosmos.encryption.implementation; -import com.azure.cosmos.implementation.guava27.Strings; - class EncryptionExceptionFactory { static class InvalidArgumentException extends IllegalArgumentException { public InvalidArgumentException(String msg, String argName) { - super(Strings.lenientFormat("argName: %s, details: %s", argName, msg)); + super(String.format("argName: %s, details: %s", argName, msg)); } } static IllegalArgumentException invalidKeySize(String algorithmName, int actualKeylength, int expectedLength) { return new InvalidArgumentException( - Strings.lenientFormat("Invalid key size for %s; actual: %s, expected: %s", + String.format("Invalid key size for %s; actual: %s, expected: %s", algorithmName, actualKeylength, expectedLength), "dataEncryptionKey"); } static IllegalArgumentException invalidCipherTextSize(int actualSize, int minimumSize) { return new InvalidArgumentException( - Strings.lenientFormat("Invalid cipher text size; actual: %s, minimum expected: %s.", + String.format("Invalid cipher text size; actual: %s, minimum expected: %s.", actualSize, minimumSize), "cipherText"); } diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/CosmosEncryptionAsyncClientTest.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/CosmosEncryptionAsyncClientTest.java index d91fdd7c7af8..90adb01b8f80 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/CosmosEncryptionAsyncClientTest.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/CosmosEncryptionAsyncClientTest.java @@ -9,26 +9,14 @@ import com.azure.cosmos.implementation.Configs; import com.azure.cosmos.implementation.ConnectionPolicy; import com.azure.cosmos.implementation.ImplementationBridgeHelpers; -import com.azure.cosmos.implementation.RxDocumentClientImpl; -import com.azure.cosmos.implementation.guava27.Strings; -import io.netty.buffer.PooledByteBufAllocator; -import io.netty.util.internal.PlatformDependent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.ITest; -import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; -import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Listeners; -import java.lang.management.BufferPoolMXBean; -import java.lang.management.ManagementFactory; import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.atomic.AtomicInteger; @Listeners({TestNGLogListener.class, CosmosNettyLeakDetectorFactory.class}) public abstract class CosmosEncryptionAsyncClientTest implements ITest { @@ -59,7 +47,7 @@ public final String getTestName() { @BeforeMethod(alwaysRun = true) public final void setTestName(Method method, Object[] row) { - String testClassAndMethodName = Strings.lenientFormat("%s::%s", + String testClassAndMethodName = String.format("%s::%s", method.getDeclaringClass().getSimpleName(), method.getName()); @@ -71,7 +59,7 @@ public final void setTestName(Method method, Object[] row) { : "Gateway"; ConsistencyLevel consistencyLevel = cosmosClientBuilderAccessor.getConsistencyLevel(clientBuilder); - this.testName = Strings.lenientFormat("%s[%s with %s consistency]", + this.testName = String.format("%s[%s with %s consistency]", testClassAndMethodName, connectionMode, consistencyLevel); diff --git a/sdk/cosmos/azure-cosmos-tests/pom.xml b/sdk/cosmos/azure-cosmos-tests/pom.xml index 3131458840f7..939815cdbc54 100644 --- a/sdk/cosmos/azure-cosmos-tests/pom.xml +++ b/sdk/cosmos/azure-cosmos-tests/pom.xml @@ -142,6 +142,12 @@ Licensed under the MIT License. <scope>test</scope> <version>1.10.0</version> <!-- {x-version-update;org.apache.commons:commons-text;external_dependency} --> </dependency> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <version>1.15</version> <!-- {x-version-update;commons-codec:commons-codec;external_dependency} --> + <scope>test</scope> + </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-collections4</artifactId> diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosAsyncClientTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosAsyncClientTest.java index 72c2f1d43a04..477300b19669 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosAsyncClientTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosAsyncClientTest.java @@ -4,29 +4,17 @@ package com.azure.cosmos; import com.azure.cosmos.implementation.ConnectionPolicy; -import com.azure.cosmos.implementation.RxDocumentClientImpl; -import com.azure.cosmos.implementation.guava27.Strings; import com.azure.cosmos.models.CosmosItemRequestOptions; import com.azure.cosmos.models.CosmosItemResponse; import com.azure.cosmos.models.PartitionKey; -import io.netty.buffer.PooledByteBufAllocator; -import io.netty.util.internal.PlatformDependent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.ITest; -import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; -import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Listeners; -import java.lang.management.BufferPoolMXBean; -import java.lang.management.ManagementFactory; import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.atomic.AtomicInteger; import static org.assertj.core.api.Assertions.assertThat; @@ -120,7 +108,7 @@ public final String getTestName() { @BeforeMethod(alwaysRun = true) public final void setTestName(Method method, Object[] row) { - String testClassAndMethodName = Strings.lenientFormat("%s::%s", + String testClassAndMethodName = String.format("%s::%s", method.getDeclaringClass().getSimpleName(), method.getName()); @@ -134,7 +122,7 @@ public final void setTestName(Method method, Object[] row) { "%s[%s with %s consistency]" : "%s[%s with %s consistency ContentOnWriteDisabled]"; - this.testName = Strings.lenientFormat(template, + this.testName = String.format(template, testClassAndMethodName, connectionMode, clientBuilder.getConsistencyLevel()); diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosExceptionTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosExceptionTest.java index 43f46eca5991..6a1bdad90e1c 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosExceptionTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosExceptionTest.java @@ -63,7 +63,6 @@ import static com.azure.cosmos.implementation.HttpConstants.SubStatusCodes.SERVER_GENERATED_503; import static com.azure.cosmos.implementation.HttpConstants.SubStatusCodes.TIMEOUT_GENERATED_410; import static com.azure.cosmos.implementation.HttpConstants.SubStatusCodes.TRANSPORT_GENERATED_410; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertEquals; @@ -134,7 +133,7 @@ public void statusCodeIsCorrect(Class<CosmosException> type, int expectedStatusC assertEquals(instance.getStatusCode(), expectedStatusCode); assertThat(instance.toString()).contains("\"userAgent\":\"" + Utils.getUserAgent()); } catch (IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException error) { - String message = lenientFormat("could not create instance of %s due to %s", type, error); + String message = String.format("could not create instance of %s due to %s", type, error); throw new AssertionError(message, error); } } @@ -149,7 +148,7 @@ public void subStatusCodeIsCorrect(Class<CosmosException> type, int expectedStat assertEquals(instance.getSubStatusCode(), expectedSubStatusCode); assertThat(instance.toString()).contains("\"userAgent\":\"" + Utils.getUserAgent()); } catch (IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException error) { - String message = lenientFormat("could not create instance of %s due to %s", type, error); + String message = String.format("could not create instance of %s due to %s", type, error); throw new AssertionError(message, error); } } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/DocumentClientTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/DocumentClientTest.java index 44b609aa5a55..2cf6345a22ff 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/DocumentClientTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/DocumentClientTest.java @@ -4,26 +4,14 @@ package com.azure.cosmos; import com.azure.cosmos.implementation.AsyncDocumentClient; -import com.azure.cosmos.implementation.RxDocumentClientImpl; -import com.azure.cosmos.implementation.guava27.Strings; -import io.netty.buffer.PooledByteBufAllocator; -import io.netty.util.internal.PlatformDependent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.ITest; -import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; -import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Listeners; -import java.lang.management.BufferPoolMXBean; -import java.lang.management.ManagementFactory; import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.atomic.AtomicInteger; @Listeners({TestNGLogListener.class, CosmosNettyLeakDetectorFactory.class}) public abstract class DocumentClientTest implements ITest { @@ -51,7 +39,7 @@ public final String getTestName() { @BeforeMethod(alwaysRun = true) public final void setTestName(Method method) { - String testClassAndMethodName = Strings.lenientFormat("%s::%s", + String testClassAndMethodName = String.format("%s::%s", method.getDeclaringClass().getSimpleName(), method.getName()); @@ -60,7 +48,7 @@ public final void setTestName(Method method) { ? "Direct " + this.clientBuilder.getConfigs().getProtocol() : "Gateway"; - this.testName = Strings.lenientFormat("%s[%s with %s consistency]", + this.testName = String.format("%s[%s with %s consistency]", testClassAndMethodName, connectionMode, clientBuilder.getDesiredConsistencyLevel()); diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/MurmurHash3_32Test.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/MurmurHash3_32Test.java index 0a8e3ccc71f0..a0d44fad1bfc 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/MurmurHash3_32Test.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/MurmurHash3_32Test.java @@ -4,8 +4,8 @@ package com.azure.cosmos.implementation.directconnectivity; -import com.azure.cosmos.implementation.apachecommons.codec.digest.MurmurHash3; import com.azure.cosmos.implementation.routing.MurmurHash3_32; +import org.apache.commons.codec.digest.MurmurHash3; import org.apache.commons.lang3.RandomUtils; import org.testng.annotations.Test; import java.io.UnsupportedEncodingException; diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClientTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClientTest.java index b1c93b2ee7a3..7685ebb7dff4 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClientTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClientTest.java @@ -97,7 +97,6 @@ import static com.azure.cosmos.implementation.HttpConstants.HttpHeaders; import static com.azure.cosmos.implementation.HttpConstants.SubStatusCodes; import static com.azure.cosmos.implementation.TestUtils.mockDiagnosticsClientContext; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.testng.Assert.assertEquals; @@ -1007,7 +1006,7 @@ private FakeEndpoint( this.durableEndpointMetrics.setEndpoint(this); } catch (URISyntaxException error) { throw new IllegalArgumentException( - lenientFormat("addressUri %s cannot be parsed as a server-based authority", addressUri), + String.format("addressUri %s cannot be parsed as a server-based authority", addressUri), error); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdConstants.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdConstants.java index 092a551e5c41..579819fde6ed 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdConstants.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdConstants.java @@ -14,8 +14,6 @@ import java.util.EnumSet; import java.util.stream.Collector; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; - /** * Methods included in this class are copied from {@link RntbdConstants}. */ @@ -180,7 +178,7 @@ public static ServerRntbdConstants.RntbdOperationType fromId(final short id) { case 0x0025: return ServerRntbdConstants.RntbdOperationType.Batch; default: - throw new DecoderException(lenientFormat("expected byte value matching %s value, not %s", + throw new DecoderException(String.format("expected byte value matching %s value, not %s", RntbdConstants.RntbdOperationType.class.getSimpleName(), id)); } @@ -257,7 +255,7 @@ public static RntbdConstants.RntbdOperationType fromType(OperationType type) { case Batch: return RntbdConstants.RntbdOperationType.Batch; default: - throw new IllegalArgumentException(lenientFormat("unrecognized operation type: %s", type)); + throw new IllegalArgumentException(String.format("unrecognized operation type: %s", type)); } } @@ -550,7 +548,7 @@ public static ServerRntbdConstants.RntbdResourceType fromId(final short id) thro case 0x001D: return ServerRntbdConstants.RntbdResourceType.UserDefinedType; default: - throw new DecoderException(lenientFormat("expected byte value matching %s value, not %s", + throw new DecoderException(String.format("expected byte value matching %s value, not %s", RntbdConstants.RntbdResourceType.class.getSimpleName(), id)); } @@ -616,7 +614,7 @@ public static RntbdConstants.RntbdResourceType fromType(ResourceType type) { case UserDefinedType: return RntbdConstants.RntbdResourceType.UserDefinedType; default: - throw new IllegalArgumentException(lenientFormat("unrecognized resource type: %s", type)); + throw new IllegalArgumentException(String.format("unrecognized resource type: %s", type)); } } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdContextRequest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdContextRequest.java index e8ade4bacc4d..e594fb727c9f 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdContextRequest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdContextRequest.java @@ -7,7 +7,6 @@ import com.azure.cosmos.implementation.UserAgentContainer; import com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdContextRequest; import com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdObjectMapper; -import com.azure.cosmos.implementation.guava27.Strings; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectWriter; @@ -55,7 +54,7 @@ public static ServerRntbdContextRequest decode(final ByteBuf in) { final int observedLength = in.readerIndex() - start; if (observedLength != expectedLength) { - final String reason = Strings.lenientFormat("expectedLength=%s, observedLength=%s", expectedLength, observedLength); + final String reason = String.format("expectedLength=%s, observedLength=%s", expectedLength, observedLength); throw new IllegalStateException(reason); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdObjectMapper.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdObjectMapper.java index 3d4a2ba36f0f..63a5f6ea2b60 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdObjectMapper.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdObjectMapper.java @@ -30,7 +30,6 @@ import java.util.concurrent.ConcurrentHashMap; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; /** * The methods included in this class are copied from {@link RntbdObjectMapper}. @@ -77,7 +76,7 @@ public static String toJson(final Object value) { } catch (final JsonProcessingException error) { logger.debug("could not convert {} value to JSON due to:", value.getClass(), error); try { - return lenientFormat("{\"error\":%s}", objectWriter.writeValueAsString(error.toString())); + return String.format("{\"error\":%s}", objectWriter.writeValueAsString(error.toString())); } catch (final JsonProcessingException exception) { return "null"; } @@ -86,7 +85,7 @@ public static String toJson(final Object value) { public static String toString(final Object value) { final String name = simpleClassNames.computeIfAbsent(value.getClass(), Class::getSimpleName); - return lenientFormat("%s(%s)", name, toJson(value)); + return String.format("%s(%s)", name, toJson(value)); } public static ObjectWriter writer() { @@ -113,7 +112,7 @@ static ObjectNode readTree(final ByteBuf in) { return (ObjectNode)node; } - final String cause = lenientFormat("Expected %s, not %s", JsonNodeType.OBJECT, node.getNodeType()); + final String cause = String.format("Expected %s, not %s", JsonNodeType.OBJECT, node.getNodeType()); throw new CorruptedFrameException(cause); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdRequest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdRequest.java index 343191622a98..2339711c2519 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdRequest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdRequest.java @@ -4,7 +4,6 @@ package com.azure.cosmos.implementation.directconnectivity.TcpServerMock.rntbd; import com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdRequest; -import com.azure.cosmos.implementation.guava27.Strings; import com.fasterxml.jackson.annotation.JsonIgnore; import io.netty.buffer.ByteBuf; @@ -66,7 +65,7 @@ public static ServerRntbdRequest decode(final ByteBuf in) { final int observedLength = in.readerIndex() - payloadStart; if (observedLength != payloadExpectedLength) { - final String reason = Strings.lenientFormat("expectedLength=%s, observedLength=%s", payloadExpectedLength, observedLength); + final String reason = String.format("expectedLength=%s, observedLength=%s", payloadExpectedLength, observedLength); throw new IllegalStateException(reason); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdToken.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdToken.java index 6903b50846bf..5c553dea07fa 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdToken.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdToken.java @@ -17,7 +17,6 @@ import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkArgument; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkState; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; /** * Methods included in this class are copied from com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdToken. @@ -81,7 +80,7 @@ public Object getValue() { this.value = codec.defaultValue(); this.value = codec.read(buffer); } catch (final CorruptedFrameException error) { - String message = lenientFormat("failed to read %s value: %s", this.getName(), error.getMessage()); + String message = String.format("failed to read %s value: %s", this.getName(), error.getMessage()); throw new CorruptedFrameException(message); } } else { @@ -156,7 +155,7 @@ public void encode(final ByteBuf out) { if (!this.isPresent()) { if (this.isRequired()) { - final String message = lenientFormat("Missing value for required header: %s", this); + final String message = String.format("Missing value for required header: %s", this); throw new IllegalStateException(message); } return; diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdTokenStream.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdTokenStream.java index d77f4ee80c1d..a8d9bca11f97 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdTokenStream.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdTokenStream.java @@ -13,7 +13,6 @@ import java.util.stream.Collector; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; /** * Methods included in this class are copied from com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdTokenStream. @@ -69,7 +68,7 @@ static <T extends ServerRntbdTokenStream<?>> T decode(final T stream) { for (final ServerRntbdToken token : stream.tokens.values()) { if (!token.isPresent() && token.isRequired()) { - final String message = lenientFormat("Required header not found on token stream: %s", token); + final String message = String.format("Required header not found on token stream: %s", token); throw new CorruptedFrameException(message); } } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdTokenType.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdTokenType.java index 048934ed01d2..0ab979bb14cd 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdTokenType.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdTokenType.java @@ -13,7 +13,6 @@ import java.util.UUID; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkState; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; /** * Methods included in this class are copied from com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdTokenType. @@ -114,14 +113,14 @@ static void checkReadableBytes(final ByteBuf in, final long length, final long m if (length > maxLength) { throw new CorruptedFrameException( - lenientFormat("value length (%s) is greater than maxLength (%s)", length, maxLength)); + java.lang.String.format("value length (%s) is greater than maxLength (%s)", length, maxLength)); } final int readableBytes = in.readableBytes(); if (length != readableBytes) { throw new CorruptedFrameException( - lenientFormat("readableBytes (%s) does not match value length (%s)", readableBytes, length)); + java.lang.String.format("readableBytes (%s) does not match value length (%s)", readableBytes, length)); } } } @@ -722,7 +721,7 @@ final int computeLength(final Object value, final int maxLength) { final byte[] string = (byte[])value; if (!Utf8.isWellFormed(string)) { - final String reason = lenientFormat("UTF-8 byte string is ill-formed: %s", ByteBufUtil.hexDump(string)); + final String reason = java.lang.String.format("UTF-8 byte string is ill-formed: %s", ByteBufUtil.hexDump(string)); throw new CorruptedFrameException(reason); } @@ -730,7 +729,7 @@ final int computeLength(final Object value, final int maxLength) { } if (length > maxLength) { - final String reason = lenientFormat("UTF-8 byte string exceeds %s bytes: %s bytes", maxLength, length); + final String reason = java.lang.String.format("UTF-8 byte string exceeds %s bytes: %s bytes", maxLength, length); throw new CorruptedFrameException(reason); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/AggregateQueryTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/AggregateQueryTests.java index a171bf00a4bc..e6d58eb148bc 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/AggregateQueryTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/AggregateQueryTests.java @@ -25,8 +25,6 @@ import java.util.UUID; import java.util.stream.Collectors; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; - public class AggregateQueryTests extends TestSuiteBase { public static class QueryConfig { @@ -272,9 +270,9 @@ public void before_AggregateQueryTests() throws Throwable { } catch (Throwable throwable) { throwable = Exceptions.unwrap(throwable); if (!(throwable instanceof CosmosException)) { - throw new AssertionError(lenientFormat("stopping test due to collection %s truncation failure: ", - createdCollection, - throwable)); + throw new AssertionError(String.format("stopping test due to collection %s truncation failure: ", + createdCollection), + throwable); } logger.error("ignored: collection {} truncation failure: ", createdCollection, throwable); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/DocumentClientResourceLeakTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/DocumentClientResourceLeakTest.java index 90a02c038c6a..1186e344ea5a 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/DocumentClientResourceLeakTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/DocumentClientResourceLeakTest.java @@ -7,7 +7,6 @@ import com.azure.cosmos.CosmosAsyncDatabase; import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.implementation.InternalObjectNode; -import com.azure.cosmos.implementation.guava27.Strings; import org.testng.annotations.BeforeClass; import org.testng.annotations.Factory; import org.testng.annotations.Test; @@ -77,7 +76,7 @@ public void before_DocumentClientResourceLeakTest() { private InternalObjectNode getDocumentDefinition() { String uuid = UUID.randomUUID().toString(); - return new InternalObjectNode(Strings.lenientFormat( + return new InternalObjectNode(String.format( "{\"id\":\"%s\",\"mypk\":\"%s\",\"sgmts\":[[6519456,1471916863],[2498434,1455671440]]}", uuid, uuid )); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ParallelDocumentQueryTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ParallelDocumentQueryTest.java index 50b6a7b84c45..a2e4dd401504 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ParallelDocumentQueryTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ParallelDocumentQueryTest.java @@ -25,7 +25,6 @@ import com.azure.cosmos.implementation.apachecommons.lang.NotImplementedException; import com.azure.cosmos.implementation.apachecommons.lang.tuple.Pair; import com.azure.cosmos.implementation.guava25.base.Function; -import com.azure.cosmos.implementation.guava27.Strings; import com.azure.cosmos.implementation.query.CompositeContinuationToken; import com.azure.cosmos.implementation.routing.Range; import com.azure.cosmos.models.CosmosItemIdentity; @@ -489,7 +488,7 @@ private List<InternalObjectNode> prepareCosmosContainer(CosmosAsyncContainer cos try { truncateCollection(cosmosContainer); } catch (Throwable lastChanceException) { - String message = Strings.lenientFormat("container %s truncation failed due to first chance %s followed by last chance %s", + String message = String.format("container %s truncation failed due to first chance %s followed by last chance %s", cosmosContainer, firstChanceException, lastChanceException); diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/CosmosDaemonThreadFactory.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/CosmosDaemonThreadFactory.java index a56f189e4495..bd3ba343a0ba 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/CosmosDaemonThreadFactory.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/CosmosDaemonThreadFactory.java @@ -7,7 +7,6 @@ import java.util.concurrent.atomic.AtomicInteger; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; public class CosmosDaemonThreadFactory implements ThreadFactory { private static final String NAME_TEMPLATE = "cosmos-daemon-%s[%s]"; @@ -22,9 +21,9 @@ public CosmosDaemonThreadFactory(String namePrefix) { @Override public Thread newThread(Runnable r) { - final String name = lenientFormat(NAME_TEMPLATE, this.namePrefix, this.threadCount.incrementAndGet()); + final String name = String.format(NAME_TEMPLATE, this.namePrefix, this.threadCount.incrementAndGet()); Thread t = new Thread(r, name); t.setDaemon(true); return t; } -} \ No newline at end of file +} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/DiagnosticsClientContext.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/DiagnosticsClientContext.java index d540bf33a082..7b843bea7378 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/DiagnosticsClientContext.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/DiagnosticsClientContext.java @@ -13,7 +13,6 @@ import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; import com.azure.cosmos.implementation.perPartitionCircuitBreaker.PartitionLevelCircuitBreakerConfig; import com.azure.cosmos.implementation.clienttelemetry.ClientTelemetry; -import com.azure.cosmos.implementation.guava27.Strings; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.annotation.JsonSerialize; @@ -293,7 +292,7 @@ public String gwConfig() { public String otherConnectionConfig() { if (this.otherCfgAsString == null) { - this.otherCfgAsString = Strings.lenientFormat("(ed: %s, cs: %s, rv: %s)", + this.otherCfgAsString = String.format("(ed: %s, cs: %s, rv: %s)", this.endpointDiscoveryEnabled, this.connectionSharingAcrossClientsEnabled, this.replicaValidationEnabled); @@ -313,7 +312,7 @@ public int getActiveClientsCount() { } private String consistencyRelatedConfigInternal() { - return Strings.lenientFormat("(consistency: %s, readConsistencyStrategy: %s, mm: %s, prgns: [%s])", + return String.format("(consistency: %s, readConsistencyStrategy: %s, mm: %s, prgns: [%s])", this.consistencyLevel, this.readConsistencyStrategy, this.multipleWriteRegionsEnabled, diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/FeedResponseDiagnostics.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/FeedResponseDiagnostics.java index 505145e61fd5..fef7af5f31d1 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/FeedResponseDiagnostics.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/FeedResponseDiagnostics.java @@ -12,8 +12,6 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; - /** * The type Feed response diagnostics. */ @@ -65,7 +63,7 @@ public String toString() { } catch (final JsonProcessingException error) { LOGGER.debug("could not convert {} value to JSON due to:", this.getClass(), error); try { - return lenientFormat("{\"error\":%s}", Utils.getDurationEnabledObjectMapper().writeValueAsString(error.toString())); + return String.format("{\"error\":%s}", Utils.getDurationEnabledObjectMapper().writeValueAsString(error.toString())); } catch (final JsonProcessingException exception) { return "null"; } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/QueryMetrics.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/QueryMetrics.java index d1b492b6c3c0..afe741eed723 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/QueryMetrics.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/QueryMetrics.java @@ -18,8 +18,6 @@ import java.util.List; import java.util.Map; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; - /** * Query metrics in the Azure Cosmos database service. * This metric represents a moving average for a set of queries whose metrics have been aggregated together. @@ -299,7 +297,7 @@ public String toString() { } catch (final JsonProcessingException error) { LOGGER.debug("could not convert {} value to JSON due to:", this.getClass(), error); try { - return lenientFormat("{\"error\":%s}", Utils.getDurationEnabledObjectMapper().writeValueAsString(error.toString())); + return String.format("{\"error\":%s}", Utils.getDurationEnabledObjectMapper().writeValueAsString(error.toString())); } catch (final JsonProcessingException exception) { return "null"; } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RegionScopedSessionContainer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RegionScopedSessionContainer.java index 6ce41f538b1d..12f766f8f43e 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RegionScopedSessionContainer.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RegionScopedSessionContainer.java @@ -5,7 +5,7 @@ import com.azure.cosmos.implementation.apachecommons.lang.NotImplementedException; import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; -import com.azure.cosmos.implementation.apachecommons.math.util.Pair; +import com.azure.cosmos.implementation.apachecommons.lang.tuple.Pair; import com.azure.cosmos.implementation.routing.PartitionKeyInternal; import com.azure.cosmos.implementation.routing.PartitionKeyInternalHelper; import com.azure.cosmos.implementation.routing.RegionalRoutingContext; @@ -161,7 +161,7 @@ private Pair<Long, PartitionScopedRegionLevelProgress> getCollectionRidToPartiti } if (partitionScopedRegionLevelProgress != null && collectionResourceId != null) { - return new Pair<>(collectionResourceId, partitionScopedRegionLevelProgress); + return Pair.of(collectionResourceId, partitionScopedRegionLevelProgress); } return null; diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/codec/CharEncoding.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/codec/CharEncoding.java deleted file mode 100644 index 803997fc21f9..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/codec/CharEncoding.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.codec; - -/** - * Character encoding names required of every implementation of the Java platform. - * - * From the Java documentation <a - * href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a>: - * <p> - * <cite>Every implementation of the Java platform is required to support the following character encodings. Consult the - * release documentation for your implementation to see if any other encodings are supported. Consult the release - * documentation for your implementation to see if any other encodings are supported.</cite> - * </p> - * - * <ul> - * <li>{@code US-ASCII}<p> - * Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set.</p></li> - * <li>{@code ISO-8859-1}<p> - * ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.</p></li> - * <li>{@code UTF-8}<p> - * Eight-bit Unicode Transformation Format.</p></li> - * <li>{@code UTF-16BE}<p> - * Sixteen-bit Unicode Transformation Format, big-endian byte order.</p></li> - * <li>{@code UTF-16LE}<p> - * Sixteen-bit Unicode Transformation Format, little-endian byte order.</p></li> - * <li>{@code UTF-16}<p> - * Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either order - * accepted on input, big-endian used on output.)</p></li> - * </ul> - * - * This perhaps would best belong in the [lang] project. Even if a similar interface is defined in [lang], it is not - * foreseen that [codec] would be made to depend on [lang]. - * - * <p> - * This class is immutable and thread-safe. - * </p> - * - * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a> - * @since 1.4 - */ -/** - * This class is shaded from version 1.14 of apache commons-codec library - */ -public class CharEncoding { - - /** - * CharEncodingISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1. - * <p> - * Every implementation of the Java platform is required to support this character encoding. - * </p> - * - * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a> - */ - public static final String ISO_8859_1 = "ISO-8859-1"; - - /** - * Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set. - * <p> - * Every implementation of the Java platform is required to support this character encoding. - * </p> - * - * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a> - */ - public static final String US_ASCII = "US-ASCII"; - - /** - * Sixteen-bit Unicode Transformation Format, The byte order specified by a mandatory initial byte-order mark - * (either order accepted on input, big-endian used on output) - * <p> - * Every implementation of the Java platform is required to support this character encoding. - * </p> - * - * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a> - */ - public static final String UTF_16 = "UTF-16"; - - /** - * Sixteen-bit Unicode Transformation Format, big-endian byte order. - * <p> - * Every implementation of the Java platform is required to support this character encoding. - * </p> - * - * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a> - */ - public static final String UTF_16BE = "UTF-16BE"; - - /** - * Sixteen-bit Unicode Transformation Format, little-endian byte order. - * <p> - * Every implementation of the Java platform is required to support this character encoding. - * </p> - * - * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a> - */ - public static final String UTF_16LE = "UTF-16LE"; - - /** - * Eight-bit Unicode Transformation Format. - * <p> - * Every implementation of the Java platform is required to support this character encoding. - * </p> - * - * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a> - */ - public static final String UTF_8 = "UTF-8"; -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/codec/binary/CharSequenceUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/codec/binary/CharSequenceUtils.java deleted file mode 100644 index 735d20865717..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/codec/binary/CharSequenceUtils.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.codec.binary; - - -/** - * <p> - * Operations on {@link CharSequence} that are {@code null} safe. - * </p> - * <p> - * Copied from Apache Commons Lang r1586295 on April 10, 2014 (day of 3.3.2 release). - * </p> - * - * @see CharSequence - * @since 1.10 - */ -/** - * This class is shaded from version 1.14 of apache commons-codec library - */ -public class CharSequenceUtils { - - /** - * Green implementation of regionMatches. - * - * <p>Note: This function differs from the current implementation in Apache Commons Lang - * where the input indices are not valid. It is only used within this package. - * - * @param cs - * the {@code CharSequence} to be processed - * @param ignoreCase - * whether or not to be case-insensitive - * @param thisStart - * the index to start on the {@code cs} CharSequence - * @param substring - * the {@code CharSequence} to be looked for - * @param start - * the index to start on the {@code substring} CharSequence - * @param length - * character length of the region - * @return whether the region matched - */ - static boolean regionMatches(final CharSequence cs, final boolean ignoreCase, final int thisStart, - final CharSequence substring, final int start, final int length) { - if (cs instanceof String && substring instanceof String) { - return ((String) cs).regionMatches(ignoreCase, thisStart, (String) substring, start, length); - } - int index1 = thisStart; - int index2 = start; - int tmpLen = length; - - while (tmpLen-- > 0) { - final char c1 = cs.charAt(index1++); - final char c2 = substring.charAt(index2++); - - if (c1 == c2) { - continue; - } - - if (!ignoreCase) { - return false; - } - - // The same check as in String.regionMatches(): - if (Character.toUpperCase(c1) != Character.toUpperCase(c2) && - Character.toLowerCase(c1) != Character.toLowerCase(c2)) { - return false; - } - } - - return true; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/codec/binary/StringUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/codec/binary/StringUtils.java deleted file mode 100644 index c24dde5f4f29..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/codec/binary/StringUtils.java +++ /dev/null @@ -1,426 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.codec.binary; - -import com.azure.cosmos.implementation.apachecommons.codec.CharEncoding; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; - - -/** - * Converts String to and from bytes using the encodings required by the Java specification. These encodings are - * specified in <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html"> - * Standard charsets</a>. - * - * <p>This class is immutable and thread-safe.</p> - * - * @see CharEncoding - * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a> - * @since 1.4 - */ -/** - * This class is shaded from version 1.14 of apache commons-codec library - */ -public class StringUtils { - - /** - * <p> - * Compares two CharSequences, returning {@code true} if they represent equal sequences of characters. - * </p> - * - * <p> - * {@code null}s are handled without exceptions. Two {@code null} references are considered to be equal. - * The comparison is case sensitive. - * </p> - * - * <pre> - * StringUtils.equals(null, null) = true - * StringUtils.equals(null, "abc") = false - * StringUtils.equals("abc", null) = false - * StringUtils.equals("abc", "abc") = true - * StringUtils.equals("abc", "ABC") = false - * </pre> - * - * <p> - * Copied from Apache Commons Lang r1583482 on April 10, 2014 (day of 3.3.2 release). - * </p> - * - * @see Object#equals(Object) - * @param cs1 - * the first CharSequence, may be {@code null} - * @param cs2 - * the second CharSequence, may be {@code null} - * @return {@code true} if the CharSequences are equal (case-sensitive), or both {@code null} - * @since 1.10 - */ - public static boolean equals(final CharSequence cs1, final CharSequence cs2) { - if (cs1 == cs2) { - return true; - } - if (cs1 == null || cs2 == null) { - return false; - } - if (cs1 instanceof String && cs2 instanceof String) { - return cs1.equals(cs2); - } - return cs1.length() == cs2.length() && CharSequenceUtils.regionMatches(cs1, false, 0, cs2, 0, cs1.length()); - } - - /** - * Calls {@link String#getBytes(Charset)} - * - * @param string - * The string to encode (if null, return null). - * @param charset - * The {@link Charset} to encode the {@code String} - * @return the encoded bytes - */ - private static ByteBuffer getByteBuffer(final String string, final Charset charset) { - if (string == null) { - return null; - } - return ByteBuffer.wrap(string.getBytes(charset)); - } - - /** - * Encodes the given string into a byte buffer using the UTF-8 charset, storing the result into a new byte - * array. - * - * @param string - * the String to encode, may be {@code null} - * @return encoded bytes, or {@code null} if the input string was {@code null} - * @throws NullPointerException - * Thrown if {@link StandardCharsets#UTF_8} is not initialized, which should never happen since it is - * required by the Java platform specification. - * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a> - * @see #getBytesUnchecked(String, String) - * @since 1.11 - */ - public static ByteBuffer getByteBufferUtf8(final String string) { - return getByteBuffer(string, StandardCharsets.UTF_8); - } - - /** - * Calls {@link String#getBytes(Charset)} - * - * @param string - * The string to encode (if null, return null). - * @param charset - * The {@link Charset} to encode the {@code String} - * @return the encoded bytes - */ - private static byte[] getBytes(final String string, final Charset charset) { - if (string == null) { - return null; - } - return string.getBytes(charset); - } - - /** - * Encodes the given string into a sequence of bytes using the ISO-8859-1 charset, storing the result into a new - * byte array. - * - * @param string - * the String to encode, may be {@code null} - * @return encoded bytes, or {@code null} if the input string was {@code null} - * @throws NullPointerException - * Thrown if {@link StandardCharsets#ISO_8859_1} is not initialized, which should never happen - * since it is required by the Java platform specification. - * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException - * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a> - * @see #getBytesUnchecked(String, String) - */ - public static byte[] getBytesIso8859_1(final String string) { - return getBytes(string, StandardCharsets.ISO_8859_1); - } - - - /** - * Encodes the given string into a sequence of bytes using the named charset, storing the result into a new byte - * array. - * <p> - * This method catches {@link UnsupportedEncodingException} and rethrows it as {@link IllegalStateException}, which - * should never happen for a required charset name. Use this method when the encoding is required to be in the JRE. - * </p> - * - * @param string - * the String to encode, may be {@code null} - * @param charsetName - * The name of a required {@link java.nio.charset.Charset} - * @return encoded bytes, or {@code null} if the input string was {@code null} - * @throws IllegalStateException - * Thrown when a {@link UnsupportedEncodingException} is caught, which should never happen for a - * required charset name. - * @see CharEncoding - * @see String#getBytes(String) - */ - public static byte[] getBytesUnchecked(final String string, final String charsetName) { - if (string == null) { - return null; - } - try { - return string.getBytes(charsetName); - } catch (final UnsupportedEncodingException e) { - throw StringUtils.newIllegalStateException(charsetName, e); - } - } - - /** - * Encodes the given string into a sequence of bytes using the US-ASCII charset, storing the result into a new byte - * array. - * - * @param string - * the String to encode, may be {@code null} - * @return encoded bytes, or {@code null} if the input string was {@code null} - * @throws NullPointerException - * Thrown if {@link StandardCharsets#US_ASCII} is not initialized, which should never happen since it is - * required by the Java platform specification. - * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException - * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a> - * @see #getBytesUnchecked(String, String) - */ - public static byte[] getBytesUsAscii(final String string) { - return getBytes(string, StandardCharsets.US_ASCII); - } - - /** - * Encodes the given string into a sequence of bytes using the UTF-16 charset, storing the result into a new byte - * array. - * - * @param string - * the String to encode, may be {@code null} - * @return encoded bytes, or {@code null} if the input string was {@code null} - * @throws NullPointerException - * Thrown if {@link StandardCharsets#UTF_16} is not initialized, which should never happen since it is - * required by the Java platform specification. - * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException - * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a> - * @see #getBytesUnchecked(String, String) - */ - public static byte[] getBytesUtf16(final String string) { - return getBytes(string, StandardCharsets.UTF_16); - } - - /** - * Encodes the given string into a sequence of bytes using the UTF-16BE charset, storing the result into a new byte - * array. - * - * @param string - * the String to encode, may be {@code null} - * @return encoded bytes, or {@code null} if the input string was {@code null} - * @throws NullPointerException - * Thrown if {@link StandardCharsets#UTF_16BE} is not initialized, which should never happen since it is - * required by the Java platform specification. - * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException - * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a> - * @see #getBytesUnchecked(String, String) - */ - public static byte[] getBytesUtf16Be(final String string) { - return getBytes(string, StandardCharsets.UTF_16BE); - } - - /** - * Encodes the given string into a sequence of bytes using the UTF-16LE charset, storing the result into a new byte - * array. - * - * @param string - * the String to encode, may be {@code null} - * @return encoded bytes, or {@code null} if the input string was {@code null} - * @throws NullPointerException - * Thrown if {@link StandardCharsets#UTF_16LE} is not initialized, which should never happen since it is - * required by the Java platform specification. - * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException - * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a> - * @see #getBytesUnchecked(String, String) - */ - public static byte[] getBytesUtf16Le(final String string) { - return getBytes(string, StandardCharsets.UTF_16LE); - } - - /** - * Encodes the given string into a sequence of bytes using the UTF-8 charset, storing the result into a new byte - * array. - * - * @param string - * the String to encode, may be {@code null} - * @return encoded bytes, or {@code null} if the input string was {@code null} - * @throws NullPointerException - * Thrown if {@link StandardCharsets#UTF_8} is not initialized, which should never happen since it is - * required by the Java platform specification. - * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException - * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a> - * @see #getBytesUnchecked(String, String) - */ - public static byte[] getBytesUtf8(final String string) { - return getBytes(string, StandardCharsets.UTF_8); - } - - private static IllegalStateException newIllegalStateException(final String charsetName, - final UnsupportedEncodingException e) { - return new IllegalStateException(charsetName + ": " + e); - } - - /** - * Constructs a new {@code String} by decoding the specified array of bytes using the given charset. - * - * @param bytes - * The bytes to be decoded into characters - * @param charset - * The {@link Charset} to encode the {@code String}; not {@code null} - * @return A new {@code String} decoded from the specified array of bytes using the given charset, - * or {@code null} if the input byte array was {@code null}. - * @throws NullPointerException - * Thrown if charset is {@code null} - */ - private static String newString(final byte[] bytes, final Charset charset) { - return bytes == null ? null : new String(bytes, charset); - } - - /** - * Constructs a new {@code String} by decoding the specified array of bytes using the given charset. - * <p> - * This method catches {@link UnsupportedEncodingException} and re-throws it as {@link IllegalStateException}, which - * should never happen for a required charset name. Use this method when the encoding is required to be in the JRE. - * </p> - * - * @param bytes - * The bytes to be decoded into characters, may be {@code null} - * @param charsetName - * The name of a required {@link java.nio.charset.Charset} - * @return A new {@code String} decoded from the specified array of bytes using the given charset, - * or {@code null} if the input byte array was {@code null}. - * @throws IllegalStateException - * Thrown when a {@link UnsupportedEncodingException} is caught, which should never happen for a - * required charset name. - * @see CharEncoding - * @see String#String(byte[], String) - */ - public static String newString(final byte[] bytes, final String charsetName) { - if (bytes == null) { - return null; - } - try { - return new String(bytes, charsetName); - } catch (final UnsupportedEncodingException e) { - throw StringUtils.newIllegalStateException(charsetName, e); - } - } - - /** - * Constructs a new {@code String} by decoding the specified array of bytes using the ISO-8859-1 charset. - * - * @param bytes - * The bytes to be decoded into characters, may be {@code null} - * @return A new {@code String} decoded from the specified array of bytes using the ISO-8859-1 charset, or - * {@code null} if the input byte array was {@code null}. - * @throws NullPointerException - * Thrown if {@link StandardCharsets#ISO_8859_1} is not initialized, which should never happen - * since it is required by the Java platform specification. - * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException - */ - public static String newStringIso8859_1(final byte[] bytes) { - return newString(bytes, StandardCharsets.ISO_8859_1); - } - - /** - * Constructs a new {@code String} by decoding the specified array of bytes using the US-ASCII charset. - * - * @param bytes - * The bytes to be decoded into characters - * @return A new {@code String} decoded from the specified array of bytes using the US-ASCII charset, - * or {@code null} if the input byte array was {@code null}. - * @throws NullPointerException - * Thrown if {@link StandardCharsets#US_ASCII} is not initialized, which should never happen since it is - * required by the Java platform specification. - * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException - */ - public static String newStringUsAscii(final byte[] bytes) { - return newString(bytes, StandardCharsets.US_ASCII); - } - - /** - * Constructs a new {@code String} by decoding the specified array of bytes using the UTF-16 charset. - * - * @param bytes - * The bytes to be decoded into characters - * @return A new {@code String} decoded from the specified array of bytes using the UTF-16 charset - * or {@code null} if the input byte array was {@code null}. - * @throws NullPointerException - * Thrown if {@link StandardCharsets#UTF_16} is not initialized, which should never happen since it is - * required by the Java platform specification. - * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException - */ - public static String newStringUtf16(final byte[] bytes) { - return newString(bytes, StandardCharsets.UTF_16); - } - - /** - * Constructs a new {@code String} by decoding the specified array of bytes using the UTF-16BE charset. - * - * @param bytes - * The bytes to be decoded into characters - * @return A new {@code String} decoded from the specified array of bytes using the UTF-16BE charset, - * or {@code null} if the input byte array was {@code null}. - * @throws NullPointerException - * Thrown if {@link StandardCharsets#UTF_16BE} is not initialized, which should never happen since it is - * required by the Java platform specification. - * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException - */ - public static String newStringUtf16Be(final byte[] bytes) { - return newString(bytes, StandardCharsets.UTF_16BE); - } - - /** - * Constructs a new {@code String} by decoding the specified array of bytes using the UTF-16LE charset. - * - * @param bytes - * The bytes to be decoded into characters - * @return A new {@code String} decoded from the specified array of bytes using the UTF-16LE charset, - * or {@code null} if the input byte array was {@code null}. - * @throws NullPointerException - * Thrown if {@link StandardCharsets#UTF_16LE} is not initialized, which should never happen since it is - * required by the Java platform specification. - * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException - */ - public static String newStringUtf16Le(final byte[] bytes) { - return newString(bytes, StandardCharsets.UTF_16LE); - } - - /** - * Constructs a new {@code String} by decoding the specified array of bytes using the UTF-8 charset. - * - * @param bytes - * The bytes to be decoded into characters - * @return A new {@code String} decoded from the specified array of bytes using the UTF-8 charset, - * or {@code null} if the input byte array was {@code null}. - * @throws NullPointerException - * Thrown if {@link StandardCharsets#UTF_8} is not initialized, which should never happen since it is - * required by the Java platform specification. - * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException - */ - public static String newStringUtf8(final byte[] bytes) { - return newString(bytes, StandardCharsets.UTF_8); - } - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/codec/digest/MurmurHash3.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/codec/digest/MurmurHash3.java deleted file mode 100644 index 1f85648354b2..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/codec/digest/MurmurHash3.java +++ /dev/null @@ -1,1250 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.codec.digest; - -import com.azure.cosmos.implementation.apachecommons.codec.binary.StringUtils; - - -/** - * Implementation of the MurmurHash3 32-bit and 128-bit hash functions. - * - * <p> - * MurmurHash is a non-cryptographic hash function suitable for general hash-based lookup. The name comes from two basic - * operations, multiply (MU) and rotate (R), used in its inner loop. Unlike cryptographic hash functions, it is not - * specifically designed to be difficult to reverse by an adversary, making it unsuitable for cryptographic purposes. - * </p> - * - * <p> - * This contains a Java port of the 32-bit hash function {@code MurmurHash3_x86_32} and the 128-bit hash function - * {@code MurmurHash3_x64_128} from Austin Applyby's original {@code c++} code in SMHasher. - * </p> - * - * <p> - * This is public domain code with no copyrights. From home page of - * <a href="https://github.com/aappleby/smhasher">SMHasher</a>: - * </p> - * - * <blockquote> "All MurmurHash versions are public domain software, and the author disclaims all copyright to their - * code." </blockquote> - * - * <p> - * Original adaption from Apache Hive. That adaption contains a {@code hash64} method that is not part of the original - * MurmurHash3 code. It is not recommended to use these methods. They will be removed in a future release. To obtain a - * 64-bit hash use half of the bits from the {@code hash128x64} methods using the input data converted to bytes. - * <p> - * - * @see <a href="https://en.wikipedia.org/wiki/MurmurHash">MurmurHash</a> - * @see <a href="https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp"> Original MurmurHash3 c++ - * code</a> - * @see <a href= - * "https://github.com/apache/hive/blob/master/storage-api/src/java/org/apache/hive/common/util/Murmur3.java"> - * Apache Hive Murmer3</a> - * @since 1.13 - */ -/** - * This class is shaded from version 1.14 of apache commons-codec library - */ -public final class MurmurHash3 { - - /** - * A random number to use for a hash code. - * - * @deprecated This is not used internally and will be removed in a future release. - */ - @Deprecated - public static final long NULL_HASHCODE = 2862933555777941757L; - - /** - * A default seed to use for the murmur hash algorithm. - * Has the value {@code 104729}. - */ - public static final int DEFAULT_SEED = 104729; - - /** TODO Replace on Java 8 with Long.BYTES. */ - static final int LONG_BYTES = Long.SIZE / Byte.SIZE; - - /** TODO Replace on Java 8 with Integer.BYTES. */ - static final int INTEGER_BYTES = Integer.SIZE / Byte.SIZE; - - /** TODO Replace on Java 8 with Short.BYTES. */ - static final int SHORT_BYTES = Short.SIZE / Byte.SIZE; - - // Constants for 32-bit variant - private static final int C1_32 = 0xcc9e2d51; - private static final int C2_32 = 0x1b873593; - private static final int R1_32 = 15; - private static final int R2_32 = 13; - private static final int M_32 = 5; - private static final int N_32 = 0xe6546b64; - - // Constants for 128-bit variant - private static final long C1 = 0x87c37b91114253d5L; - private static final long C2 = 0x4cf5ad432745937fL; - private static final int R1 = 31; - private static final int R2 = 27; - private static final int R3 = 33; - private static final int M = 5; - private static final int N1 = 0x52dce729; - private static final int N2 = 0x38495ab5; - - /** No instance methods. */ - private MurmurHash3() { - } - - /** - * Generates 32-bit hash from two longs with a default seed value. - * This is a helper method that will produce the same result as: - * - * <pre> - * int offset = 0; - * int seed = 104729; - * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(16) - * .putLong(data1) - * .putLong(data2) - * .array(), offset, 16, seed); - * </pre> - * - * @param data1 The first long to hash - * @param data2 The second long to hash - * @return The 32-bit hash - * @see #hash32x86(byte[], int, int, int) - */ - public static int hash32(final long data1, final long data2) { - return hash32(data1, data2, DEFAULT_SEED); - } - - /** - * Generates 32-bit hash from two longs with the given seed. - * This is a helper method that will produce the same result as: - * - * <pre> - * int offset = 0; - * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(16) - * .putLong(data1) - * .putLong(data2) - * .array(), offset, 16, seed); - * </pre> - * - * @param data1 The first long to hash - * @param data2 The second long to hash - * @param seed The initial seed value - * @return The 32-bit hash - * @see #hash32x86(byte[], int, int, int) - */ - public static int hash32(final long data1, final long data2, final int seed) { - int hash = seed; - final long r0 = Long.reverseBytes(data1); - final long r1 = Long.reverseBytes(data2); - - hash = mix32((int) r0, hash); - hash = mix32((int) (r0 >>> 32), hash); - hash = mix32((int) (r1), hash); - hash = mix32((int) (r1 >>> 32), hash); - - hash ^= LONG_BYTES * 2; - return fmix32(hash); - } - - /** - * Generates 32-bit hash from a long with a default seed value. - * This is a helper method that will produce the same result as: - * - * <pre> - * int offset = 0; - * int seed = 104729; - * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(8) - * .putLong(data) - * .array(), offset, 8, seed); - * </pre> - * - * @param data The long to hash - * @return The 32-bit hash - * @see #hash32x86(byte[], int, int, int) - */ - public static int hash32(final long data) { - return hash32(data, DEFAULT_SEED); - } - - /** - * Generates 32-bit hash from a long with the given seed. - * This is a helper method that will produce the same result as: - * - * <pre> - * int offset = 0; - * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(8) - * .putLong(data) - * .array(), offset, 8, seed); - * </pre> - * - * @param data The long to hash - * @param seed The initial seed value - * @return The 32-bit hash - * @see #hash32x86(byte[], int, int, int) - */ - public static int hash32(final long data, final int seed) { - int hash = seed; - final long r0 = Long.reverseBytes(data); - - hash = mix32((int) r0, hash); - hash = mix32((int) (r0 >>> 32), hash); - - hash ^= LONG_BYTES; - return fmix32(hash); - } - - /** - * Generates 32-bit hash from the byte array with a default seed. - * This is a helper method that will produce the same result as: - * - * <pre> - * int offset = 0; - * int seed = 104729; - * int hash = MurmurHash3.hash32(data, offset, data.length, seed); - * </pre> - * - * <p>This implementation contains a sign-extension bug in the finalization step of - * any bytes left over from dividing the length by 4. This manifests if any of these - * bytes are negative.<p> - * - * @param data The input byte array - * @return The 32-bit hash - * @see #hash32(byte[], int, int, int) - * @deprecated Use {@link #hash32x86(byte[], int, int, int)}. This corrects the processing of trailing bytes. - */ - @Deprecated - public static int hash32(final byte[] data) { - return hash32(data, 0, data.length, DEFAULT_SEED); - } - - /** - * Generates 32-bit hash from a string with a default seed. - * <p> - * Before 1.14 the string was converted using default encoding. - * Since 1.14 the string is converted to bytes using UTF-8 encoding. - * </p> - * This is a helper method that will produce the same result as: - * - * <pre> - * int offset = 0; - * int seed = 104729; - * byte[] bytes = data.getBytes(StandardCharsets.UTF_8); - * int hash = MurmurHash3.hash32(bytes, offset, bytes.length, seed); - * </pre> - * - * <p>This implementation contains a sign-extension bug in the finalization step of - * any bytes left over from dividing the length by 4. This manifests if any of these - * bytes are negative.<p> - * - * @param data The input string - * @return The 32-bit hash - * @see #hash32(byte[], int, int, int) - * @deprecated Use {@link #hash32x86(byte[], int, int, int)} with the bytes returned from - * {@link String#getBytes(java.nio.charset.Charset)}. This corrects the processing of trailing bytes. - */ - @Deprecated - public static int hash32(final String data) { - final byte[] bytes = StringUtils.getBytesUtf8(data); - return hash32(bytes, 0, bytes.length, DEFAULT_SEED); - } - - /** - * Generates 32-bit hash from the byte array with the given length and a default seed. - * This is a helper method that will produce the same result as: - * - * <pre> - * int offset = 0; - * int seed = 104729; - * int hash = MurmurHash3.hash32(data, offset, length, seed); - * </pre> - * - * <p>This implementation contains a sign-extension bug in the finalization step of - * any bytes left over from dividing the length by 4. This manifests if any of these - * bytes are negative.<p> - * - * @param data The input byte array - * @param length The length of array - * @return The 32-bit hash - * @see #hash32(byte[], int, int, int) - * @deprecated Use {@link #hash32x86(byte[], int, int, int)}. This corrects the processing of trailing bytes. - */ - @Deprecated - public static int hash32(final byte[] data, final int length) { - return hash32(data, length, DEFAULT_SEED); - } - - /** - * Generates 32-bit hash from the byte array with the given length and seed. This is a - * helper method that will produce the same result as: - * - * <pre> - * int offset = 0; - * int hash = MurmurHash3.hash32(data, offset, length, seed); - * </pre> - * - * <p>This implementation contains a sign-extension bug in the finalization step of - * any bytes left over from dividing the length by 4. This manifests if any of these - * bytes are negative.<p> - * - * @param data The input byte array - * @param length The length of array - * @param seed The initial seed value - * @return The 32-bit hash - * @see #hash32(byte[], int, int, int) - * @deprecated Use {@link #hash32x86(byte[], int, int, int)}. This corrects the processing of trailing bytes. - */ - @Deprecated - public static int hash32(final byte[] data, final int length, final int seed) { - return hash32(data, 0, length, seed); - } - - /** - * Generates 32-bit hash from the byte array with the given offset, length and seed. - * - * <p>This is an implementation of the 32-bit hash function {@code MurmurHash3_x86_32} - * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p> - * - * <p>This implementation contains a sign-extension bug in the finalization step of - * any bytes left over from dividing the length by 4. This manifests if any of these - * bytes are negative.<p> - * - * @param data The input byte array - * @param offset The offset of data - * @param length The length of array - * @param seed The initial seed value - * @return The 32-bit hash - * @deprecated Use {@link #hash32x86(byte[], int, int, int)}. This corrects the processing of trailing bytes. - */ - @Deprecated - @SuppressWarnings("fallthrough") - public static int hash32(final byte[] data, final int offset, final int length, final int seed) { - int hash = seed; - final int nblocks = length >> 2; - - // body - for (int i = 0; i < nblocks; i++) { - final int index = offset + (i << 2); - final int k = getLittleEndianInt(data, index); - hash = mix32(k, hash); - } - - // tail - // ************ - // Note: This fails to apply masking using 0xff to the 3 remaining bytes. - // ************ - final int index = offset + (nblocks << 2); - int k1 = 0; - switch (offset + length - index) { - case 3: - k1 ^= data[index + 2] << 16; - case 2: - k1 ^= data[index + 1] << 8; - case 1: - k1 ^= data[index]; - - // mix functions - k1 *= C1_32; - k1 = Integer.rotateLeft(k1, R1_32); - k1 *= C2_32; - hash ^= k1; - } - - hash ^= length; - return fmix32(hash); - } - - /** - * Generates 32-bit hash from the byte array with a seed of zero. - * This is a helper method that will produce the same result as: - * - * <pre> - * int offset = 0; - * int seed = 0; - * int hash = MurmurHash3.hash32x86(data, offset, data.length, seed); - * </pre> - * - * @param data The input byte array - * @return The 32-bit hash - * @see #hash32x86(byte[], int, int, int) - * @since 1.14 - */ - public static int hash32x86(final byte[] data) { - return hash32x86(data, 0, data.length, 0); - } - - /** - * Generates 32-bit hash from the byte array with the given offset, length and seed. - * - * <p>This is an implementation of the 32-bit hash function {@code MurmurHash3_x86_32} - * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p> - * - * @param data The input byte array - * @param offset The offset of data - * @param length The length of array - * @param seed The initial seed value - * @return The 32-bit hash - * @since 1.14 - */ - @SuppressWarnings("fallthrough") - public static int hash32x86(final byte[] data, final int offset, final int length, final int seed) { - int hash = seed; - final int nblocks = length >> 2; - - // body - for (int i = 0; i < nblocks; i++) { - final int index = offset + (i << 2); - final int k = getLittleEndianInt(data, index); - hash = mix32(k, hash); - } - - // tail - final int index = offset + (nblocks << 2); - int k1 = 0; - switch (offset + length - index) { - case 3: - k1 ^= (data[index + 2] & 0xff) << 16; - case 2: - k1 ^= (data[index + 1] & 0xff) << 8; - case 1: - k1 ^= (data[index] & 0xff); - - // mix functions - k1 *= C1_32; - k1 = Integer.rotateLeft(k1, R1_32); - k1 *= C2_32; - hash ^= k1; - } - - hash ^= length; - return fmix32(hash); - } - - /** - * Generates 64-bit hash from a long with a default seed. - * - * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p> - * - * <p>This is a Murmur3-like 64-bit variant. - * The method does not produce the same result as either half of the hash bytes from - * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code long}. - * This method will be removed in a future release.</p> - * - * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect - * this result as the default seed is positive.</p> - * - * <p>This is a helper method that will produce the same result as:</p> - * - * <pre> - * int offset = 0; - * int seed = 104729; - * long hash = MurmurHash3.hash64(ByteBuffer.allocate(8) - * .putLong(data) - * .array(), offset, 8, seed); - * </pre> - * - * @param data The long to hash - * @return The 64-bit hash - * @see #hash64(byte[], int, int, int) - * @deprecated Not part of the MurmurHash3 implementation. - * Use half of the hash bytes from {@link #hash128x64(byte[])} with the bytes from the {@code long}. - */ - @Deprecated - public static long hash64(final long data) { - long hash = DEFAULT_SEED; - long k = Long.reverseBytes(data); - final int length = LONG_BYTES; - // mix functions - k *= C1; - k = Long.rotateLeft(k, R1); - k *= C2; - hash ^= k; - hash = Long.rotateLeft(hash, R2) * M + N1; - // finalization - hash ^= length; - hash = fmix64(hash); - return hash; - } - - /** - * Generates 64-bit hash from an int with a default seed. - * - * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p> - * - * <p>This is a Murmur3-like 64-bit variant. - * The method does not produce the same result as either half of the hash bytes from - * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code int}. - * This method will be removed in a future release.</p> - * - * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect - * this result as the default seed is positive.</p> - * - * <p>This is a helper method that will produce the same result as:</p> - * - * <pre> - * int offset = 0; - * int seed = 104729; - * long hash = MurmurHash3.hash64(ByteBuffer.allocate(4) - * .putInt(data) - * .array(), offset, 4, seed); - * </pre> - * - * @param data The int to hash - * @return The 64-bit hash - * @see #hash64(byte[], int, int, int) - * @deprecated Not part of the MurmurHash3 implementation. - * Use half of the hash bytes from {@link #hash128x64(byte[])} with the bytes from the {@code int}. - */ - @Deprecated - public static long hash64(final int data) { - long k1 = Integer.reverseBytes(data) & (-1L >>> 32); - final int length = INTEGER_BYTES; - long hash = DEFAULT_SEED; - k1 *= C1; - k1 = Long.rotateLeft(k1, R1); - k1 *= C2; - hash ^= k1; - // finalization - hash ^= length; - hash = fmix64(hash); - return hash; - } - - /** - * Generates 64-bit hash from a short with a default seed. - * - * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p> - * - * <p>This is a Murmur3-like 64-bit variant. - * The method does not produce the same result as either half of the hash bytes from - * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code short}. - * This method will be removed in a future release.</p> - * - * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect - * this result as the default seed is positive.</p> - * - * <p>This is a helper method that will produce the same result as:</p> - * - * <pre> - * int offset = 0; - * int seed = 104729; - * long hash = MurmurHash3.hash64(ByteBuffer.allocate(2) - * .putShort(data) - * .array(), offset, 2, seed); - * </pre> - * - * @param data The short to hash - * @return The 64-bit hash - * @see #hash64(byte[], int, int, int) - * @deprecated Not part of the MurmurHash3 implementation. - * Use half of the hash bytes from {@link #hash128x64(byte[])} with the bytes from the {@code short}. - */ - @Deprecated - public static long hash64(final short data) { - long hash = DEFAULT_SEED; - long k1 = 0; - k1 ^= ((long) data & 0xff) << 8; - k1 ^= ((long) ((data & 0xFF00) >> 8) & 0xff); - k1 *= C1; - k1 = Long.rotateLeft(k1, R1); - k1 *= C2; - hash ^= k1; - - // finalization - hash ^= SHORT_BYTES; - hash = fmix64(hash); - return hash; - } - - /** - * Generates 64-bit hash from a byte array with a default seed. - * - * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p> - * - * <p>This is a Murmur3-like 64-bit variant. - * The method does not produce the same result as either half of the hash bytes from - * {@linkplain #hash128x64(byte[])} with the same byte data. - * This method will be removed in a future release.</p> - * - * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect - * this result as the default seed is positive.</p> - * - * <p>This is a helper method that will produce the same result as:</p> - * - * <pre> - * int offset = 0; - * int seed = 104729; - * long hash = MurmurHash3.hash64(data, offset, data.length, seed); - * </pre> - * - * @param data The input byte array - * @return The 64-bit hash - * @see #hash64(byte[], int, int, int) - * @deprecated Not part of the MurmurHash3 implementation. - * Use half of the hash bytes from {@link #hash128x64(byte[])}. - */ - @Deprecated - public static long hash64(final byte[] data) { - return hash64(data, 0, data.length, DEFAULT_SEED); - } - - /** - * Generates 64-bit hash from a byte array with the given offset and length and a default seed. - * - * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p> - * - * <p>This is a Murmur3-like 64-bit variant. - * The method does not produce the same result as either half of the hash bytes from - * {@linkplain #hash128x64(byte[])} with the same byte data. - * This method will be removed in a future release.</p> - * - * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect - * this result as the default seed is positive.</p> - * - * <p>This is a helper method that will produce the same result as:</p> - * - * <pre> - * int seed = 104729; - * long hash = MurmurHash3.hash64(data, offset, length, seed); - * </pre> - * - * @param data The input byte array - * @param offset The offset of data - * @param length The length of array - * @return The 64-bit hash - * @see #hash64(byte[], int, int, int) - * @deprecated Not part of the MurmurHash3 implementation. - * Use half of the hash bytes from {@link #hash128x64(byte[], int, int, int)}. - */ - @Deprecated - public static long hash64(final byte[] data, final int offset, final int length) { - return hash64(data, offset, length, DEFAULT_SEED); - } - - /** - * Generates 64-bit hash from a byte array with the given offset, length and seed. - * - * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p> - * - * <p>This is a Murmur3-like 64-bit variant. - * This method will be removed in a future release.</p> - * - * <p>This implementation contains a sign-extension bug in the seed initialization. - * This manifests if the seed is negative.</p> - * - * <p>This algorithm processes 8 bytes chunks of data in a manner similar to the 16 byte chunks - * of data processed in the MurmurHash3 {@code MurmurHash3_x64_128} method. However the hash - * is not mixed with a hash chunk from the next 8 bytes of data. The method will not return - * the same value as the first or second 64-bits of the function - * {@link #hash128(byte[], int, int, int)}.</p> - * - * <p>Use of this method is not advised. Use the first long returned from - * {@link #hash128x64(byte[], int, int, int)}.<p> - * - * @param data The input byte array - * @param offset The offset of data - * @param length The length of array - * @param seed The initial seed value - * @return The 64-bit hash - * @deprecated Not part of the MurmurHash3 implementation. - * Use half of the hash bytes from {@link #hash128x64(byte[], int, int, int)}. - */ - @Deprecated - @SuppressWarnings("fallthrough") - public static long hash64(final byte[] data, final int offset, final int length, final int seed) { - // ************ - // Note: This fails to apply masking using 0xffffffffL to the seed. - // ************ - long hash = seed; - final int nblocks = length >> 3; - - // body - for (int i = 0; i < nblocks; i++) { - final int index = offset + (i << 3); - long k = getLittleEndianLong(data, index); - - // mix functions - k *= C1; - k = Long.rotateLeft(k, R1); - k *= C2; - hash ^= k; - hash = Long.rotateLeft(hash, R2) * M + N1; - } - - // tail - long k1 = 0; - final int index = offset + (nblocks << 3); - switch (offset + length - index) { - case 7: - k1 ^= ((long) data[index + 6] & 0xff) << 48; - case 6: - k1 ^= ((long) data[index + 5] & 0xff) << 40; - case 5: - k1 ^= ((long) data[index + 4] & 0xff) << 32; - case 4: - k1 ^= ((long) data[index + 3] & 0xff) << 24; - case 3: - k1 ^= ((long) data[index + 2] & 0xff) << 16; - case 2: - k1 ^= ((long) data[index + 1] & 0xff) << 8; - case 1: - k1 ^= ((long) data[index] & 0xff); - k1 *= C1; - k1 = Long.rotateLeft(k1, R1); - k1 *= C2; - hash ^= k1; - } - - // finalization - hash ^= length; - hash = fmix64(hash); - - return hash; - } - - /** - * Generates 128-bit hash from the byte array with a default seed. - * This is a helper method that will produce the same result as: - * - * <pre> - * int offset = 0; - * int seed = 104729; - * int hash = MurmurHash3.hash128(data, offset, data.length, seed); - * </pre> - * - * <p>Note: The sign extension bug in {@link #hash128(byte[], int, int, int)} does not effect - * this result as the default seed is positive.</p> - * - * @param data The input byte array - * @return The 128-bit hash (2 longs) - * @see #hash128(byte[], int, int, int) - */ - public static long[] hash128(final byte[] data) { - return hash128(data, 0, data.length, DEFAULT_SEED); - } - - /** - * Generates 128-bit hash from the byte array with a seed of zero. - * This is a helper method that will produce the same result as: - * - * <pre> - * int offset = 0; - * int seed = 0; - * int hash = MurmurHash3.hash128x64(data, offset, data.length, seed); - * </pre> - * - * @param data The input byte array - * @return The 128-bit hash (2 longs) - * @see #hash128x64(byte[], int, int, int) - * @since 1.14 - */ - public static long[] hash128x64(final byte[] data) { - return hash128x64(data, 0, data.length, 0); - } - - /** - * Generates 128-bit hash from a string with a default seed. - * <p> - * Before 1.14 the string was converted using default encoding. - * Since 1.14 the string is converted to bytes using UTF-8 encoding. - * </p> - * This is a helper method that will produce the same result as: - * - * <pre> - * int offset = 0; - * int seed = 104729; - * byte[] bytes = data.getBytes(StandardCharsets.UTF_8); - * int hash = MurmurHash3.hash128(bytes, offset, bytes.length, seed); - * </pre> - * - * <p>Note: The sign extension bug in {@link #hash128(byte[], int, int, int)} does not effect - * this result as the default seed is positive.</p> - * - * @param data The input String - * @return The 128-bit hash (2 longs) - * @see #hash128(byte[], int, int, int) - * @deprecated Use {@link #hash128x64(byte[])} using the bytes returned from - * {@link String#getBytes(java.nio.charset.Charset)}. - */ - @Deprecated - public static long[] hash128(final String data) { - final byte[] bytes = StringUtils.getBytesUtf8(data); - return hash128(bytes, 0, bytes.length, DEFAULT_SEED); - } - - /** - * Generates 128-bit hash from the byte array with the given offset, length and seed. - * - * <p>This is an implementation of the 128-bit hash function {@code MurmurHash3_x64_128} - * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p> - * - * <p>This implementation contains a sign-extension bug in the seed initialization. - * This manifests if the seed is negative.<p> - * - * @param data The input byte array - * @param offset The first element of array - * @param length The length of array - * @param seed The initial seed value - * @return The 128-bit hash (2 longs) - * @deprecated Use {@link #hash128x64(byte[], int, int, int)}. This corrects the seed initialization. - */ - @Deprecated - public static long[] hash128(final byte[] data, final int offset, final int length, final int seed) { - // ************ - // Note: This fails to apply masking using 0xffffffffL to the seed. - // ************ - return hash128x64(data, offset, length, seed); - } - - /** - * Generates 128-bit hash from the byte array with the given offset, length and seed. - * - * <p>This is an implementation of the 128-bit hash function {@code MurmurHash3_x64_128} - * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p> - * - * @param data The input byte array - * @param offset The first element of array - * @param length The length of array - * @param seed The initial seed value - * @return The 128-bit hash (2 longs) - * @since 1.14 - */ - public static long[] hash128x64(final byte[] data, final int offset, final int length, final int seed) { - // Use an unsigned 32-bit integer as the seed - return hash128x64(data, offset, length, seed & 0xffffffffL); - } - - /** - * Generates 128-bit hash from the byte array with the given offset, length and seed. - * - * <p>This is an implementation of the 128-bit hash function {@code MurmurHash3_x64_128} - * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p> - * - * @param data The input byte array - * @param offset The first element of array - * @param length The length of array - * @param seed The initial seed value - * @return The 128-bit hash (2 longs) - */ - @SuppressWarnings("fallthrough") - private static long[] hash128x64(final byte[] data, final int offset, final int length, final long seed) { - long h1 = seed; - long h2 = seed; - final int nblocks = length >> 4; - - // body - for (int i = 0; i < nblocks; i++) { - final int index = offset + (i << 4); - long k1 = getLittleEndianLong(data, index); - long k2 = getLittleEndianLong(data, index + 8); - - // mix functions for k1 - k1 *= C1; - k1 = Long.rotateLeft(k1, R1); - k1 *= C2; - h1 ^= k1; - h1 = Long.rotateLeft(h1, R2); - h1 += h2; - h1 = h1 * M + N1; - - // mix functions for k2 - k2 *= C2; - k2 = Long.rotateLeft(k2, R3); - k2 *= C1; - h2 ^= k2; - h2 = Long.rotateLeft(h2, R1); - h2 += h1; - h2 = h2 * M + N2; - } - - // tail - long k1 = 0; - long k2 = 0; - final int index = offset + (nblocks << 4); - switch (offset + length - index) { - case 15: - k2 ^= ((long) data[index + 14] & 0xff) << 48; - case 14: - k2 ^= ((long) data[index + 13] & 0xff) << 40; - case 13: - k2 ^= ((long) data[index + 12] & 0xff) << 32; - case 12: - k2 ^= ((long) data[index + 11] & 0xff) << 24; - case 11: - k2 ^= ((long) data[index + 10] & 0xff) << 16; - case 10: - k2 ^= ((long) data[index + 9] & 0xff) << 8; - case 9: - k2 ^= data[index + 8] & 0xff; - k2 *= C2; - k2 = Long.rotateLeft(k2, R3); - k2 *= C1; - h2 ^= k2; - - case 8: - k1 ^= ((long) data[index + 7] & 0xff) << 56; - case 7: - k1 ^= ((long) data[index + 6] & 0xff) << 48; - case 6: - k1 ^= ((long) data[index + 5] & 0xff) << 40; - case 5: - k1 ^= ((long) data[index + 4] & 0xff) << 32; - case 4: - k1 ^= ((long) data[index + 3] & 0xff) << 24; - case 3: - k1 ^= ((long) data[index + 2] & 0xff) << 16; - case 2: - k1 ^= ((long) data[index + 1] & 0xff) << 8; - case 1: - k1 ^= data[index] & 0xff; - k1 *= C1; - k1 = Long.rotateLeft(k1, R1); - k1 *= C2; - h1 ^= k1; - } - - // finalization - h1 ^= length; - h2 ^= length; - - h1 += h2; - h2 += h1; - - h1 = fmix64(h1); - h2 = fmix64(h2); - - h1 += h2; - h2 += h1; - - return new long[] { h1, h2 }; - } - - /** - * Gets the little-endian long from 8 bytes starting at the specified index. - * - * @param data The data - * @param index The index - * @return The little-endian long - */ - private static long getLittleEndianLong(final byte[] data, final int index) { - return (((long) data[index ] & 0xff) ) | - (((long) data[index + 1] & 0xff) << 8) | - (((long) data[index + 2] & 0xff) << 16) | - (((long) data[index + 3] & 0xff) << 24) | - (((long) data[index + 4] & 0xff) << 32) | - (((long) data[index + 5] & 0xff) << 40) | - (((long) data[index + 6] & 0xff) << 48) | - (((long) data[index + 7] & 0xff) << 56); - } - - /** - * Gets the little-endian int from 4 bytes starting at the specified index. - * - * @param data The data - * @param index The index - * @return The little-endian int - */ - private static int getLittleEndianInt(final byte[] data, final int index) { - return ((data[index ] & 0xff) ) | - ((data[index + 1] & 0xff) << 8) | - ((data[index + 2] & 0xff) << 16) | - ((data[index + 3] & 0xff) << 24); - } - - /** - * Performs the intermediate mix step of the 32-bit hash function {@code MurmurHash3_x86_32}. - * - * @param k The data to add to the hash - * @param hash The current hash - * @return The new hash - */ - private static int mix32(int k, int hash) { - k *= C1_32; - k = Integer.rotateLeft(k, R1_32); - k *= C2_32; - hash ^= k; - return Integer.rotateLeft(hash, R2_32) * M_32 + N_32; - } - - /** - * Performs the final avalanche mix step of the 32-bit hash function {@code MurmurHash3_x86_32}. - * - * @param hash The current hash - * @return The final hash - */ - private static int fmix32(int hash) { - hash ^= (hash >>> 16); - hash *= 0x85ebca6b; - hash ^= (hash >>> 13); - hash *= 0xc2b2ae35; - hash ^= (hash >>> 16); - return hash; - } - - /** - * Performs the final avalanche mix step of the 64-bit hash function {@code MurmurHash3_x64_128}. - * - * @param hash The current hash - * @return The final hash - */ - private static long fmix64(long hash) { - hash ^= (hash >>> 33); - hash *= 0xff51afd7ed558ccdL; - hash ^= (hash >>> 33); - hash *= 0xc4ceb9fe1a85ec53L; - hash ^= (hash >>> 33); - return hash; - } - - /** - * Generates 32-bit hash from input bytes. Bytes can be added incrementally and the new - * hash computed. - * - * <p>This is an implementation of the 32-bit hash function {@code MurmurHash3_x86_32} - * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p> - * - * @since 1.14 - */ - public static class IncrementalHash32x86 { - - /** The size of byte blocks that are processed together. */ - private static final int BLOCK_SIZE = 4; - - /** Up to 3 unprocessed bytes from input data. */ - private final byte[] unprocessed = new byte[3]; - - /** The number of unprocessed bytes in the tail data. */ - private int unprocessedLength; - - /** The total number of input bytes added since the start. */ - private int totalLen; - - /** - * The current running hash. - * This must be finalised to generate the 32-bit hash value. - */ - private int hash; - - /** - * Starts a new incremental hash. - * - * @param seed The initial seed value - */ - public final void start(final int seed) { - // Reset - unprocessedLength = totalLen = 0; - this.hash = seed; - } - - /** - * Adds the byte array to the current incremental hash. - * - * @param data The input byte array - * @param offset The offset of data - * @param length The length of array - */ - @SuppressWarnings("fallthrough") - public final void add(final byte[] data, final int offset, final int length) { - if (length <= 0) { - // Nothing to add - return; - } - totalLen += length; - - // Process the bytes in blocks of 4. - // New bytes must be added to any current unprocessed bytes, - // then processed in blocks of 4 and the remaining bytes saved: - // - // |--|---------------------------|--| - // unprocessed - // main block - // remaining - - // Check if the unprocessed bytes and new bytes can fill a block of 4. - // Make this overflow safe in the event that length is Integer.MAX_VALUE. - // Equivalent to: (unprocessedLength + length < BLOCK_SIZE) - if (unprocessedLength + length - BLOCK_SIZE < 0) { - // Not enough so add to the unprocessed bytes - System.arraycopy(data, offset, unprocessed, unprocessedLength, length); - unprocessedLength += length; - return; - } - - // Combine unprocessed bytes with new bytes. - int newOffset; - int newLength; - if (unprocessedLength > 0) { - int k = -1; - switch (unprocessedLength) { - case 1: - k = orBytes(unprocessed[0], data[offset], data[offset + 1], data[offset + 2]); - break; - case 2: - k = orBytes(unprocessed[0], unprocessed[1], data[offset], data[offset + 1]); - break; - case 3: - k = orBytes(unprocessed[0], unprocessed[1], unprocessed[2], data[offset]); - break; - default: - throw new IllegalStateException("Unprocessed length should be 1, 2, or 3: " + unprocessedLength); - } - hash = mix32(k, hash); - // Update the offset and length - final int consumed = BLOCK_SIZE - unprocessedLength; - newOffset = offset + consumed; - newLength = length - consumed; - } else { - newOffset = offset; - newLength = length; - } - - // Main processing of blocks of 4 bytes - final int nblocks = newLength >> 2; - - for (int i = 0; i < nblocks; i++) { - final int index = newOffset + (i << 2); - final int k = getLittleEndianInt(data, index); - hash = mix32(k, hash); - } - - // Save left-over unprocessed bytes - final int consumed = (nblocks << 2); - unprocessedLength = newLength - consumed; - if (unprocessedLength != 0) { - System.arraycopy(data, newOffset + consumed, unprocessed, 0, unprocessedLength); - } - } - - /** - * Generate the 32-bit hash value. Repeat calls to this method with no additional data - * will generate the same hash value. - * - * @return The 32-bit hash - */ - public final int end() { - // Allow calling end() again after adding no data to return the same result. - return finalise(hash, unprocessedLength, unprocessed, totalLen); - } - - /** - * Finalize the running hash to the output 32-bit hash by processing remaining bytes - * and performing final mixing. - * - * @param hash The running hash - * @param unprocessedLength The number of unprocessed bytes in the tail data. - * @param unprocessed Up to 3 unprocessed bytes from input data. - * @param totalLen The total number of input bytes added since the start. - * @return The 32-bit hash - */ - @SuppressWarnings("fallthrough") - int finalise(final int hash, final int unprocessedLength, final byte[] unprocessed, final int totalLen) { - int result = hash; - int k1 = 0; - switch (unprocessedLength) { - case 3: - k1 ^= (unprocessed[2] & 0xff) << 16; - case 2: - k1 ^= (unprocessed[1] & 0xff) << 8; - case 1: - k1 ^= (unprocessed[0] & 0xff); - - // mix functions - k1 *= C1_32; - k1 = Integer.rotateLeft(k1, R1_32); - k1 *= C2_32; - result ^= k1; - } - - // finalization - result ^= totalLen; - return fmix32(result); - } - - /** - * Combines the bytes using an Or operation ({@code | } in a little-endian representation - * of a 32-bit integer; byte 1 will be the least significant byte, byte 4 the most - * significant. - * - * @param b1 The first byte - * @param b2 The second byte - * @param b3 The third byte - * @param b4 The fourth byte - * @return The 32-bit integer - */ - private static int orBytes(final byte b1, final byte b2, final byte b3, final byte b4) { - return (b1 & 0xff) | ((b2 & 0xff) << 8) | ((b3 & 0xff) << 16) | ((b4 & 0xff) << 24); - } - } - - /** - * Generates 32-bit hash from input bytes. Bytes can be added incrementally and the new - * hash computed. - * - * <p>This is an implementation of the 32-bit hash function {@code MurmurHash3_x86_32} - * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p> - * - * <p>This implementation contains a sign-extension bug in the finalization step of - * any bytes left over from dividing the length by 4. This manifests if any of these - * bytes are negative.<p> - * - * @deprecated Use IncrementalHash32x86. This corrects the processing of trailing bytes. - */ - @Deprecated - public static class IncrementalHash32 extends IncrementalHash32x86 { - - /** - * {@inheritDoc} - * - * <p>This implementation contains a sign-extension bug in the finalization step of - * any bytes left over from dividing the length by 4. This manifests if any of these - * bytes are negative.<p> - * - * @deprecated Use IncrementalHash32x86. This corrects the processing of trailing bytes. - */ - @Override - @Deprecated - @SuppressWarnings("fallthrough") - int finalise(final int hash, final int unprocessedLength, final byte[] unprocessed, final int totalLen) { - int result = hash; - // ************ - // Note: This fails to apply masking using 0xff to the 3 remaining bytes. - // ************ - int k1 = 0; - switch (unprocessedLength) { - case 3: - k1 ^= unprocessed[2] << 16; - case 2: - k1 ^= unprocessed[1] << 8; - case 1: - k1 ^= unprocessed[0]; - - // mix functions - k1 *= C1_32; - k1 = Integer.rotateLeft(k1, R1_32); - k1 *= C2_32; - result ^= k1; - } - - // finalization - result ^= totalLen; - return fmix32(result); - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/Field.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/Field.java deleted file mode 100644 index 30dd68d2cc65..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/Field.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math; - -/** - * Interface representing a <a href="http://mathworld.wolfram.com/Field.html">field</a>. - * <p> - * Classes implementing this interface will often be singletons. - * </p> - * @param <T> the type of the field elements - * @see FieldElement - * @since 2.0 - */ -public interface Field<T> { - - /** Get the additive identity of the field. - * <p> - * The additive identity is the element e<sub>0</sub> of the field such that - * for all elements a of the field, the equalities a + e<sub>0</sub> = - * e<sub>0</sub> + a = a hold. - * </p> - * @return additive identity of the field - */ - T getZero(); - - /** Get the multiplicative identity of the field. - * <p> - * The multiplicative identity is the element e<sub>1</sub> of the field such that - * for all elements a of the field, the equalities a × e<sub>1</sub> = - * e<sub>1</sub> × a = a hold. - * </p> - * @return multiplicative identity of the field - */ - T getOne(); - - /** - * Returns the runtime class of the FieldElement. - * - * @return The {@code Class} object that represents the runtime - * class of this object. - */ - Class<? extends FieldElement<T>> getRuntimeClass(); - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/FieldElement.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/FieldElement.java deleted file mode 100644 index 66c68ae8158c..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/FieldElement.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math; - -import com.azure.cosmos.implementation.apachecommons.math.exception.MathArithmeticException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NullArgumentException; - - -/** - * Interface representing <a href="http://mathworld.wolfram.com/Field.html">field</a> elements. - * @param <T> the type of the field elements - * @see Field - * @since 2.0 - */ -public interface FieldElement<T> { - - /** Compute this + a. - * @param a element to add - * @return a new element representing this + a - * @throws NullArgumentException if {@code a} is {@code null}. - */ - T add(T a) throws NullArgumentException; - - /** Compute this - a. - * @param a element to subtract - * @return a new element representing this - a - * @throws NullArgumentException if {@code a} is {@code null}. - */ - T subtract(T a) throws NullArgumentException; - - /** - * Returns the additive inverse of {@code this} element. - * @return the opposite of {@code this}. - */ - T negate(); - - /** Compute n × this. Multiplication by an integer number is defined - * as the following sum - * <center> - * n × this = ∑<sub>i=1</sub><sup>n</sup> this. - * </center> - * @param n Number of times {@code this} must be added to itself. - * @return A new element representing n × this. - */ - T multiply(int n); - - /** Compute this × a. - * @param a element to multiply - * @return a new element representing this × a - * @throws NullArgumentException if {@code a} is {@code null}. - */ - T multiply(T a) throws NullArgumentException; - - /** Compute this ÷ a. - * @param a element to divide by - * @return a new element representing this ÷ a - * @throws NullArgumentException if {@code a} is {@code null}. - * @throws MathArithmeticException if {@code a} is zero - */ - T divide(T a) throws NullArgumentException, MathArithmeticException; - - /** - * Returns the multiplicative inverse of {@code this} element. - * @return the inverse of {@code this}. - * @throws MathArithmeticException if {@code this} is zero - */ - T reciprocal() throws MathArithmeticException; - - /** Get the {@link Field} to which the instance belongs. - * @return {@link Field} to which the instance belongs - */ - Field<T> getField(); -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/RealFieldElement.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/RealFieldElement.java deleted file mode 100644 index 2ca74780deec..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/RealFieldElement.java +++ /dev/null @@ -1,406 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math; - -import com.azure.cosmos.implementation.apachecommons.math.exception.DimensionMismatchException; - -/** - * Interface representing a <a href="http://mathworld.wolfram.com/RealNumber.html">real</a> - * <a href="http://mathworld.wolfram.com/Field.html">field</a>. - * @param <T> the type of the field elements - * @see FieldElement - * @since 3.2 - */ -public interface RealFieldElement<T> extends FieldElement<T> { - - /** Get the real value of the number. - * @return real value - */ - double getReal(); - - /** '+' operator. - * @param a right hand side parameter of the operator - * @return this+a - */ - T add(double a); - - /** '-' operator. - * @param a right hand side parameter of the operator - * @return this-a - */ - T subtract(double a); - - /** '×' operator. - * @param a right hand side parameter of the operator - * @return this×a - */ - T multiply(double a); - - /** '÷' operator. - * @param a right hand side parameter of the operator - * @return this÷a - */ - T divide(double a); - - /** IEEE remainder operator. - * @param a right hand side parameter of the operator - * @return this - n × a where n is the closest integer to this/a - * (the even integer is chosen for n if this/a is halfway between two integers) - */ - T remainder(double a); - - /** IEEE remainder operator. - * @param a right hand side parameter of the operator - * @return this - n × a where n is the closest integer to this/a - * (the even integer is chosen for n if this/a is halfway between two integers) - * @exception DimensionMismatchException if number of free parameters or orders are inconsistent - */ - T remainder(T a) - throws DimensionMismatchException; - - /** absolute value. - * @return abs(this) - */ - T abs(); - - /** Get the smallest whole number larger than instance. - * @return ceil(this) - */ - T ceil(); - - /** Get the largest whole number smaller than instance. - * @return floor(this) - */ - T floor(); - - /** Get the whole number that is the nearest to the instance, or the even one if x is exactly half way between two integers. - * @return a double number r such that r is an integer r - 0.5 ≤ this ≤ r + 0.5 - */ - T rint(); - - /** Get the closest long to instance value. - * @return closest long to {@link #getReal()} - */ - long round(); - - /** Compute the signum of the instance. - * The signum is -1 for negative numbers, +1 for positive numbers and 0 otherwise - * @return -1.0, -0.0, +0.0, +1.0 or NaN depending on sign of a - */ - T signum(); - - /** - * Returns the instance with the sign of the argument. - * A NaN {@code sign} argument is treated as positive. - * - * @param sign the sign for the returned value - * @return the instance with the same sign as the {@code sign} argument - */ - T copySign(T sign); - - /** - * Returns the instance with the sign of the argument. - * A NaN {@code sign} argument is treated as positive. - * - * @param sign the sign for the returned value - * @return the instance with the same sign as the {@code sign} argument - */ - T copySign(double sign); - - /** - * Multiply the instance by a power of 2. - * @param n power of 2 - * @return this × 2<sup>n</sup> - */ - T scalb(int n); - - /** - * Returns the hypotenuse of a triangle with sides {@code this} and {@code y} - * - sqrt(<i>this</i><sup>2</sup> +<i>y</i><sup>2</sup>) - * avoiding intermediate overflow or underflow. - * - * <ul> - * <li> If either argument is infinite, then the result is positive infinity.</li> - * <li> else, if either argument is NaN then the result is NaN.</li> - * </ul> - * - * @param y a value - * @return sqrt(<i>this</i><sup>2</sup> +<i>y</i><sup>2</sup>) - * @exception DimensionMismatchException if number of free parameters or orders are inconsistent - */ - T hypot(T y) - throws DimensionMismatchException; - - /** {@inheritDoc} */ - T reciprocal(); - - /** Square root. - * @return square root of the instance - */ - T sqrt(); - - /** Cubic root. - * @return cubic root of the instance - */ - T cbrt(); - - /** N<sup>th</sup> root. - * @param n order of the root - * @return n<sup>th</sup> root of the instance - */ - T rootN(int n); - - /** Power operation. - * @param p power to apply - * @return this<sup>p</sup> - */ - T pow(double p); - - /** Integer power operation. - * @param n power to apply - * @return this<sup>n</sup> - */ - T pow(int n); - - /** Power operation. - * @param e exponent - * @return this<sup>e</sup> - * @exception DimensionMismatchException if number of free parameters or orders are inconsistent - */ - T pow(T e) - throws DimensionMismatchException; - - /** Exponential. - * @return exponential of the instance - */ - T exp(); - - /** Exponential minus 1. - * @return exponential minus one of the instance - */ - T expm1(); - - /** Natural logarithm. - * @return logarithm of the instance - */ - T log(); - - /** Shifted natural logarithm. - * @return logarithm of one plus the instance - */ - T log1p(); - -// TODO: add this method in 4.0, as it is not possible to do it in 3.2 -// due to incompatibility of the return type in the Dfp class -// /** Base 10 logarithm. -// * @return base 10 logarithm of the instance -// */ -// T log10(); - - /** Cosine operation. - * @return cos(this) - */ - T cos(); - - /** Sine operation. - * @return sin(this) - */ - T sin(); - - /** Tangent operation. - * @return tan(this) - */ - T tan(); - - /** Arc cosine operation. - * @return acos(this) - */ - T acos(); - - /** Arc sine operation. - * @return asin(this) - */ - T asin(); - - /** Arc tangent operation. - * @return atan(this) - */ - T atan(); - - /** Two arguments arc tangent operation. - * @param x second argument of the arc tangent - * @return atan2(this, x) - * @exception DimensionMismatchException if number of free parameters or orders are inconsistent - */ - T atan2(T x) - throws DimensionMismatchException; - - /** Hyperbolic cosine operation. - * @return cosh(this) - */ - T cosh(); - - /** Hyperbolic sine operation. - * @return sinh(this) - */ - T sinh(); - - /** Hyperbolic tangent operation. - * @return tanh(this) - */ - T tanh(); - - /** Inverse hyperbolic cosine operation. - * @return acosh(this) - */ - T acosh(); - - /** Inverse hyperbolic sine operation. - * @return asin(this) - */ - T asinh(); - - /** Inverse hyperbolic tangent operation. - * @return atanh(this) - */ - T atanh(); - - /** - * Compute a linear combination. - * @param a Factors. - * @param b Factors. - * @return <code>Σ<sub>i</sub> a<sub>i</sub> b<sub>i</sub></code>. - * @throws DimensionMismatchException if arrays dimensions don't match - * @since 3.2 - */ - T linearCombination(T[] a, T[] b) - throws DimensionMismatchException; - - /** - * Compute a linear combination. - * @param a Factors. - * @param b Factors. - * @return <code>Σ<sub>i</sub> a<sub>i</sub> b<sub>i</sub></code>. - * @throws DimensionMismatchException if arrays dimensions don't match - * @since 3.2 - */ - T linearCombination(double[] a, T[] b) - throws DimensionMismatchException; - - /** - * Compute a linear combination. - * @param a1 first factor of the first term - * @param b1 second factor of the first term - * @param a2 first factor of the second term - * @param b2 second factor of the second term - * @return a<sub>1</sub>×b<sub>1</sub> + - * a<sub>2</sub>×b<sub>2</sub> - * @see #linearCombination(Object, Object, Object, Object, Object, Object) - * @see #linearCombination(Object, Object, Object, Object, Object, Object, Object, Object) - * @since 3.2 - */ - T linearCombination(T a1, T b1, T a2, T b2); - - /** - * Compute a linear combination. - * @param a1 first factor of the first term - * @param b1 second factor of the first term - * @param a2 first factor of the second term - * @param b2 second factor of the second term - * @return a<sub>1</sub>×b<sub>1</sub> + - * a<sub>2</sub>×b<sub>2</sub> - * @see #linearCombination(double, Object, double, Object, double, Object) - * @see #linearCombination(double, Object, double, Object, double, Object, double, Object) - * @since 3.2 - */ - T linearCombination(double a1, T b1, double a2, T b2); - - /** - * Compute a linear combination. - * @param a1 first factor of the first term - * @param b1 second factor of the first term - * @param a2 first factor of the second term - * @param b2 second factor of the second term - * @param a3 first factor of the third term - * @param b3 second factor of the third term - * @return a<sub>1</sub>×b<sub>1</sub> + - * a<sub>2</sub>×b<sub>2</sub> + a<sub>3</sub>×b<sub>3</sub> - * @see #linearCombination(Object, Object, Object, Object) - * @see #linearCombination(Object, Object, Object, Object, Object, Object, Object, Object) - * @since 3.2 - */ - T linearCombination(T a1, T b1, T a2, T b2, T a3, T b3); - - /** - * Compute a linear combination. - * @param a1 first factor of the first term - * @param b1 second factor of the first term - * @param a2 first factor of the second term - * @param b2 second factor of the second term - * @param a3 first factor of the third term - * @param b3 second factor of the third term - * @return a<sub>1</sub>×b<sub>1</sub> + - * a<sub>2</sub>×b<sub>2</sub> + a<sub>3</sub>×b<sub>3</sub> - * @see #linearCombination(double, Object, double, Object) - * @see #linearCombination(double, Object, double, Object, double, Object, double, Object) - * @since 3.2 - */ - T linearCombination(double a1, T b1, double a2, T b2, double a3, T b3); - - /** - * Compute a linear combination. - * @param a1 first factor of the first term - * @param b1 second factor of the first term - * @param a2 first factor of the second term - * @param b2 second factor of the second term - * @param a3 first factor of the third term - * @param b3 second factor of the third term - * @param a4 first factor of the third term - * @param b4 second factor of the third term - * @return a<sub>1</sub>×b<sub>1</sub> + - * a<sub>2</sub>×b<sub>2</sub> + a<sub>3</sub>×b<sub>3</sub> + - * a<sub>4</sub>×b<sub>4</sub> - * @see #linearCombination(Object, Object, Object, Object) - * @see #linearCombination(Object, Object, Object, Object, Object, Object) - * @since 3.2 - */ - T linearCombination(T a1, T b1, T a2, T b2, T a3, T b3, T a4, T b4); - - /** - * Compute a linear combination. - * @param a1 first factor of the first term - * @param b1 second factor of the first term - * @param a2 first factor of the second term - * @param b2 second factor of the second term - * @param a3 first factor of the third term - * @param b3 second factor of the third term - * @param a4 first factor of the third term - * @param b4 second factor of the third term - * @return a<sub>1</sub>×b<sub>1</sub> + - * a<sub>2</sub>×b<sub>2</sub> + a<sub>3</sub>×b<sub>3</sub> + - * a<sub>4</sub>×b<sub>4</sub> - * @see #linearCombination(double, Object, double, Object) - * @see #linearCombination(double, Object, double, Object, double, Object) - * @since 3.2 - */ - T linearCombination(double a1, T b1, double a2, T b2, double a3, T b3, double a4, T b4); - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/UnivariateFunction.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/UnivariateFunction.java deleted file mode 100644 index 53f602af86bb..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/UnivariateFunction.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.analysis; - -/** - * An interface representing a univariate real function. - * <p> - * When a <em>user-defined</em> function encounters an error during - * evaluation, the {@link #value(double) value} method should throw a - * <em>user-defined</em> unchecked exception.</p> - * <p> - * The following code excerpt shows the recommended way to do that using - * a root solver as an example, but the same construct is applicable to - * ODE integrators or optimizers.</p> - * - * <pre> - * private static class LocalException extends RuntimeException { - * // The x value that caused the problem. - * private final double x; - * - * public LocalException(double x) { - * this.x = x; - * } - * - * public double getX() { - * return x; - * } - * } - * - * private static class MyFunction implements UnivariateFunction { - * public double value(double x) { - * double y = hugeFormula(x); - * if (somethingBadHappens) { - * throw new LocalException(x); - * } - * return y; - * } - * } - * - * public void compute() { - * try { - * solver.solve(maxEval, new MyFunction(a, b, c), min, max); - * } catch (LocalException le) { - * // Retrieve the x value. - * } - * } - * </pre> - * - * As shown, the exception is local to the user's code and it is guaranteed - * that Apache Commons Math will not catch it. - * - */ -public interface UnivariateFunction { - /** - * Compute the value of the function. - * - * @param x Point at which the function value should be computed. - * @return the value of the function. - * @throws IllegalArgumentException when the activated method itself can - * ascertain that a precondition, specified in the API expressed at the - * level of the activated method, has been violated. - * When Commons Math throws an {@code IllegalArgumentException}, it is - * usually the consequence of checking the actual parameters passed to - * the method. - */ - double value(double x); -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/AbstractUnivariateSolver.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/AbstractUnivariateSolver.java deleted file mode 100644 index 5840599ca813..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/AbstractUnivariateSolver.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.analysis.solvers; - -import com.azure.cosmos.implementation.apachecommons.math.analysis.UnivariateFunction; - -/** - * Base class for solvers. - * - * @since 3.0 - */ -public abstract class AbstractUnivariateSolver - extends BaseAbstractUnivariateSolver<UnivariateFunction> - implements UnivariateSolver { - /** - * Construct a solver with given absolute accuracy. - * - * @param absoluteAccuracy Maximum absolute error. - */ - protected AbstractUnivariateSolver(final double absoluteAccuracy) { - super(absoluteAccuracy); - } - /** - * Construct a solver with given accuracies. - * - * @param relativeAccuracy Maximum relative error. - * @param absoluteAccuracy Maximum absolute error. - */ - protected AbstractUnivariateSolver(final double relativeAccuracy, - final double absoluteAccuracy) { - super(relativeAccuracy, absoluteAccuracy); - } - /** - * Construct a solver with given accuracies. - * - * @param relativeAccuracy Maximum relative error. - * @param absoluteAccuracy Maximum absolute error. - * @param functionValueAccuracy Maximum function value error. - */ - protected AbstractUnivariateSolver(final double relativeAccuracy, - final double absoluteAccuracy, - final double functionValueAccuracy) { - super(relativeAccuracy, absoluteAccuracy, functionValueAccuracy); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/AllowedSolution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/AllowedSolution.java deleted file mode 100644 index 96c4a19551a2..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/AllowedSolution.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.analysis.solvers; - - -/** The kinds of solutions that a {@link BracketedUnivariateSolver - * (bracketed univariate real) root-finding algorithm} may accept as solutions. - * This basically controls whether or not under-approximations and - * over-approximations are allowed. - * - * <p>If all solutions are accepted ({@link #ANY_SIDE}), then the solution - * that the root-finding algorithm returns for a given root may be equal to the - * actual root, but it may also be an approximation that is slightly smaller - * or slightly larger than the actual root. Root-finding algorithms generally - * only guarantee that the returned solution is within the requested - * tolerances. In certain cases however, in particular for - * {@link com.azure.cosmos.implementation.apachecommons.math.ode.events.EventHandler state events} of - * {@link com.azure.cosmos.implementation.apachecommons.math.ode.ODEIntegrator ODE solvers}, it - * may be necessary to guarantee that a solution is returned that lies on a - * specific side the solution.</p> - * - * @see BracketedUnivariateSolver - * @since 3.0 - */ -public enum AllowedSolution { - /** There are no additional side restriction on the solutions for - * root-finding. That is, both under-approximations and over-approximations - * are allowed. So, if a function f(x) has a root at x = x0, then the - * root-finding result s may be smaller than x0, equal to x0, or greater - * than x0. - */ - ANY_SIDE, - - /** Only solutions that are less than or equal to the actual root are - * acceptable as solutions for root-finding. In other words, - * over-approximations are not allowed. So, if a function f(x) has a root - * at x = x0, then the root-finding result s must satisfy s <= x0. - */ - LEFT_SIDE, - - /** Only solutions that are greater than or equal to the actual root are - * acceptable as solutions for root-finding. In other words, - * under-approximations are not allowed. So, if a function f(x) has a root - * at x = x0, then the root-finding result s must satisfy s >= x0. - */ - RIGHT_SIDE, - - /** Only solutions for which values are less than or equal to zero are - * acceptable as solutions for root-finding. So, if a function f(x) has - * a root at x = x0, then the root-finding result s must satisfy f(s) <= 0. - */ - BELOW_SIDE, - - /** Only solutions for which values are greater than or equal to zero are - * acceptable as solutions for root-finding. So, if a function f(x) has - * a root at x = x0, then the root-finding result s must satisfy f(s) >= 0. - */ - ABOVE_SIDE; - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/BaseAbstractUnivariateSolver.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/BaseAbstractUnivariateSolver.java deleted file mode 100644 index 737af68b6467..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/BaseAbstractUnivariateSolver.java +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.analysis.solvers; - -import com.azure.cosmos.implementation.apachecommons.math.analysis.UnivariateFunction; -import com.azure.cosmos.implementation.apachecommons.math.exception.MaxCountExceededException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NoBracketingException; -import com.azure.cosmos.implementation.apachecommons.math.exception.TooManyEvaluationsException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NullArgumentException; -import com.azure.cosmos.implementation.apachecommons.math.util.IntegerSequence; -import com.azure.cosmos.implementation.apachecommons.math.util.MathUtils; - -/** - * Provide a default implementation for several functions useful to generic - * solvers. - * The default values for relative and function tolerances are 1e-14 - * and 1e-15, respectively. It is however highly recommended to not - * rely on the default, but rather carefully consider values that match - * user's expectations, as well as the specifics of each implementation. - * - * @param <FUNC> Type of function to solve. - * - * @since 2.0 - */ -public abstract class BaseAbstractUnivariateSolver<FUNC extends UnivariateFunction> - implements BaseUnivariateSolver<FUNC> { - /** Default relative accuracy. */ - private static final double DEFAULT_RELATIVE_ACCURACY = 1e-14; - /** Default function value accuracy. */ - private static final double DEFAULT_FUNCTION_VALUE_ACCURACY = 1e-15; - /** Function value accuracy. */ - private final double functionValueAccuracy; - /** Absolute accuracy. */ - private final double absoluteAccuracy; - /** Relative accuracy. */ - private final double relativeAccuracy; - /** Evaluations counter. */ - private IntegerSequence.Incrementor evaluations; - /** Lower end of search interval. */ - private double searchMin; - /** Higher end of search interval. */ - private double searchMax; - /** Initial guess. */ - private double searchStart; - /** Function to solve. */ - private FUNC function; - - /** - * Construct a solver with given absolute accuracy. - * - * @param absoluteAccuracy Maximum absolute error. - */ - protected BaseAbstractUnivariateSolver(final double absoluteAccuracy) { - this(DEFAULT_RELATIVE_ACCURACY, - absoluteAccuracy, - DEFAULT_FUNCTION_VALUE_ACCURACY); - } - - /** - * Construct a solver with given accuracies. - * - * @param relativeAccuracy Maximum relative error. - * @param absoluteAccuracy Maximum absolute error. - */ - protected BaseAbstractUnivariateSolver(final double relativeAccuracy, - final double absoluteAccuracy) { - this(relativeAccuracy, - absoluteAccuracy, - DEFAULT_FUNCTION_VALUE_ACCURACY); - } - - /** - * Construct a solver with given accuracies. - * - * @param relativeAccuracy Maximum relative error. - * @param absoluteAccuracy Maximum absolute error. - * @param functionValueAccuracy Maximum function value error. - */ - protected BaseAbstractUnivariateSolver(final double relativeAccuracy, - final double absoluteAccuracy, - final double functionValueAccuracy) { - this.absoluteAccuracy = absoluteAccuracy; - this.relativeAccuracy = relativeAccuracy; - this.functionValueAccuracy = functionValueAccuracy; - this.evaluations = IntegerSequence.Incrementor.create(); - } - - /** {@inheritDoc} */ - public int getMaxEvaluations() { - return evaluations.getMaximalCount(); - } - /** {@inheritDoc} */ - public int getEvaluations() { - return evaluations.getCount(); - } - /** - * @return the lower end of the search interval. - */ - public double getMin() { - return searchMin; - } - /** - * @return the higher end of the search interval. - */ - public double getMax() { - return searchMax; - } - /** - * @return the initial guess. - */ - public double getStartValue() { - return searchStart; - } - /** - * {@inheritDoc} - */ - public double getAbsoluteAccuracy() { - return absoluteAccuracy; - } - /** - * {@inheritDoc} - */ - public double getRelativeAccuracy() { - return relativeAccuracy; - } - /** - * {@inheritDoc} - */ - public double getFunctionValueAccuracy() { - return functionValueAccuracy; - } - - /** - * Compute the objective function value. - * - * @param point Point at which the objective function must be evaluated. - * @return the objective function value at specified point. - * @throws TooManyEvaluationsException if the maximal number of evaluations - * is exceeded. - */ - protected double computeObjectiveValue(double point) - throws TooManyEvaluationsException { - incrementEvaluationCount(); - return function.value(point); - } - - /** - * Prepare for computation. - * Subclasses must call this method if they override any of the - * {@code solve} methods. - * - * @param f Function to solve. - * @param min Lower bound for the interval. - * @param max Upper bound for the interval. - * @param startValue Start value to use. - * @param maxEval Maximum number of evaluations. - * @exception NullArgumentException if f is null - */ - protected void setup(int maxEval, - FUNC f, - double min, double max, - double startValue) - throws NullArgumentException { - // Checks. - MathUtils.checkNotNull(f); - - // Reset. - searchMin = min; - searchMax = max; - searchStart = startValue; - function = f; - evaluations = evaluations.withMaximalCount(maxEval).withStart(0); - } - - /** {@inheritDoc} */ - public double solve(int maxEval, FUNC f, double min, double max, double startValue) - throws TooManyEvaluationsException, - NoBracketingException { - // Initialization. - setup(maxEval, f, min, max, startValue); - - // Perform computation. - return doSolve(); - } - - /** {@inheritDoc} */ - public double solve(int maxEval, FUNC f, double min, double max) { - return solve(maxEval, f, min, max, min + 0.5 * (max - min)); - } - - /** {@inheritDoc} */ - public double solve(int maxEval, FUNC f, double startValue) - throws TooManyEvaluationsException, - NoBracketingException { - return solve(maxEval, f, Double.NaN, Double.NaN, startValue); - } - - /** - * Method for implementing actual optimization algorithms in derived - * classes. - * - * @return the root. - * @throws TooManyEvaluationsException if the maximal number of evaluations - * is exceeded. - * @throws NoBracketingException if the initial search interval does not bracket - * a root and the solver requires it. - */ - protected abstract double doSolve() - throws TooManyEvaluationsException, NoBracketingException; - - /** - * Check whether the function takes opposite signs at the endpoints. - * - * @param lower Lower endpoint. - * @param upper Upper endpoint. - * @return {@code true} if the function values have opposite signs at the - * given points. - */ - protected boolean isBracketing(final double lower, - final double upper) { - return UnivariateSolverUtils.isBracketing(function, lower, upper); - } - - /** - * Check whether the arguments form a (strictly) increasing sequence. - * - * @param start First number. - * @param mid Second number. - * @param end Third number. - * @return {@code true} if the arguments form an increasing sequence. - */ - protected boolean isSequence(final double start, - final double mid, - final double end) { - return UnivariateSolverUtils.isSequence(start, mid, end); - } - - /** - * Check that the endpoints specify an interval. - * - * @param lower Lower endpoint. - * @param upper Upper endpoint. - * @throws NumberIsTooLargeException if {@code lower >= upper}. - */ - protected void verifyInterval(final double lower, - final double upper) - throws NumberIsTooLargeException { - UnivariateSolverUtils.verifyInterval(lower, upper); - } - - /** - * Check that {@code lower < initial < upper}. - * - * @param lower Lower endpoint. - * @param initial Initial value. - * @param upper Upper endpoint. - * @throws NumberIsTooLargeException if {@code lower >= initial} or - * {@code initial >= upper}. - */ - protected void verifySequence(final double lower, - final double initial, - final double upper) - throws NumberIsTooLargeException { - UnivariateSolverUtils.verifySequence(lower, initial, upper); - } - - /** - * Check that the endpoints specify an interval and the function takes - * opposite signs at the endpoints. - * - * @param lower Lower endpoint. - * @param upper Upper endpoint. - * @throws NullArgumentException if the function has not been set. - * @throws NoBracketingException if the function has the same sign at - * the endpoints. - */ - protected void verifyBracketing(final double lower, - final double upper) - throws NullArgumentException, - NoBracketingException { - UnivariateSolverUtils.verifyBracketing(function, lower, upper); - } - - /** - * Increment the evaluation count by one. - * Method {@link #computeObjectiveValue(double)} calls this method internally. - * It is provided for subclasses that do not exclusively use - * {@code computeObjectiveValue} to solve the function. - * See e.g. {@link AbstractUnivariateDifferentiableSolver}. - * - * @throws TooManyEvaluationsException when the allowed number of function - * evaluations has been exhausted. - */ - protected void incrementEvaluationCount() - throws TooManyEvaluationsException { - try { - evaluations.increment(); - } catch (MaxCountExceededException e) { - throw new TooManyEvaluationsException(e.getMax()); - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/BaseUnivariateSolver.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/BaseUnivariateSolver.java deleted file mode 100644 index fd06ba59e617..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/BaseUnivariateSolver.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.analysis.solvers; - -import com.azure.cosmos.implementation.apachecommons.math.analysis.UnivariateFunction; -import com.azure.cosmos.implementation.apachecommons.math.exception.MathIllegalArgumentException; -import com.azure.cosmos.implementation.apachecommons.math.exception.TooManyEvaluationsException; - - -/** - * Interface for (univariate real) rootfinding algorithms. - * Implementations will search for only one zero in the given interval. - * - * This class is not intended for use outside of the Apache Commons Math - * library, regular user should rely on more specific interfaces like - * {@link UnivariateSolver}, {@link PolynomialSolver} or {@link - * DifferentiableUnivariateSolver}. - * @param <FUNC> Type of function to solve. - * - * @since 3.0 - * @see UnivariateSolver - * @see PolynomialSolver - * @see DifferentiableUnivariateSolver - */ -public interface BaseUnivariateSolver<FUNC extends UnivariateFunction> { - /** - * Get the maximum number of function evaluations. - * - * @return the maximum number of function evaluations. - */ - int getMaxEvaluations(); - - /** - * Get the number of evaluations of the objective function. - * The number of evaluations corresponds to the last call to the - * {@code optimize} method. It is 0 if the method has not been - * called yet. - * - * @return the number of evaluations of the objective function. - */ - int getEvaluations(); - - /** - * Get the absolute accuracy of the solver. Solutions returned by the - * solver should be accurate to this tolerance, i.e., if ε is the - * absolute accuracy of the solver and {@code v} is a value returned by - * one of the {@code solve} methods, then a root of the function should - * exist somewhere in the interval ({@code v} - ε, {@code v} + ε). - * - * @return the absolute accuracy. - */ - double getAbsoluteAccuracy(); - - /** - * Get the relative accuracy of the solver. The contract for relative - * accuracy is the same as {@link #getAbsoluteAccuracy()}, but using - * relative, rather than absolute error. If ρ is the relative accuracy - * configured for a solver and {@code v} is a value returned, then a root - * of the function should exist somewhere in the interval - * ({@code v} - ρ {@code v}, {@code v} + ρ {@code v}). - * - * @return the relative accuracy. - */ - double getRelativeAccuracy(); - - /** - * Get the function value accuracy of the solver. If {@code v} is - * a value returned by the solver for a function {@code f}, - * then by contract, {@code |f(v)|} should be less than or equal to - * the function value accuracy configured for the solver. - * - * @return the function value accuracy. - */ - double getFunctionValueAccuracy(); - - /** - * Solve for a zero root in the given interval. - * A solver may require that the interval brackets a single zero root. - * Solvers that do require bracketing should be able to handle the case - * where one of the endpoints is itself a root. - * - * @param maxEval Maximum number of evaluations. - * @param f Function to solve. - * @param min Lower bound for the interval. - * @param max Upper bound for the interval. - * @return a value where the function is zero. - * @throws MathIllegalArgumentException - * if the arguments do not satisfy the requirements specified by the solver. - * @throws TooManyEvaluationsException if - * the allowed number of evaluations is exceeded. - */ - double solve(int maxEval, FUNC f, double min, double max) - throws MathIllegalArgumentException, TooManyEvaluationsException; - - /** - * Solve for a zero in the given interval, start at {@code startValue}. - * A solver may require that the interval brackets a single zero root. - * Solvers that do require bracketing should be able to handle the case - * where one of the endpoints is itself a root. - * - * @param maxEval Maximum number of evaluations. - * @param f Function to solve. - * @param min Lower bound for the interval. - * @param max Upper bound for the interval. - * @param startValue Start value to use. - * @return a value where the function is zero. - * @throws MathIllegalArgumentException - * if the arguments do not satisfy the requirements specified by the solver. - * @throws TooManyEvaluationsException if - * the allowed number of evaluations is exceeded. - */ - double solve(int maxEval, FUNC f, double min, double max, double startValue) - throws MathIllegalArgumentException, TooManyEvaluationsException; - - /** - * Solve for a zero in the vicinity of {@code startValue}. - * - * @param f Function to solve. - * @param startValue Start value to use. - * @return a value where the function is zero. - * @param maxEval Maximum number of evaluations. - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.MathIllegalArgumentException - * if the arguments do not satisfy the requirements specified by the solver. - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.TooManyEvaluationsException if - * the allowed number of evaluations is exceeded. - */ - double solve(int maxEval, FUNC f, double startValue); -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/BracketedUnivariateSolver.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/BracketedUnivariateSolver.java deleted file mode 100644 index 8d75eb004ea2..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/BracketedUnivariateSolver.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.analysis.solvers; - -import com.azure.cosmos.implementation.apachecommons.math.analysis.UnivariateFunction; - -/** Interface for {@link UnivariateSolver (univariate real) root-finding - * algorithms} that maintain a bracketed solution. There are several advantages - * to having such root-finding algorithms: - * <ul> - * <li>The bracketed solution guarantees that the root is kept within the - * interval. As such, these algorithms generally also guarantee - * convergence.</li> - * <li>The bracketed solution means that we have the opportunity to only - * return roots that are greater than or equal to the actual root, or - * are less than or equal to the actual root. That is, we can control - * whether under-approximations and over-approximations are - * {@link AllowedSolution allowed solutions}. Other root-finding - * algorithms can usually only guarantee that the solution (the root that - * was found) is around the actual root.</li> - * </ul> - * - * <p>For backwards compatibility, all root-finding algorithms must have - * {@link AllowedSolution#ANY_SIDE ANY_SIDE} as default for the allowed - * solutions.</p> - * @param <FUNC> Type of function to solve. - * - * @see AllowedSolution - * @since 3.0 - */ -public interface BracketedUnivariateSolver<FUNC extends UnivariateFunction> - extends BaseUnivariateSolver<FUNC> { - - /** - * Solve for a zero in the given interval. - * A solver may require that the interval brackets a single zero root. - * Solvers that do require bracketing should be able to handle the case - * where one of the endpoints is itself a root. - * - * @param maxEval Maximum number of evaluations. - * @param f Function to solve. - * @param min Lower bound for the interval. - * @param max Upper bound for the interval. - * @param allowedSolution The kind of solutions that the root-finding algorithm may - * accept as solutions. - * @return A value where the function is zero. - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.MathIllegalArgumentException - * if the arguments do not satisfy the requirements specified by the solver. - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.TooManyEvaluationsException if - * the allowed number of evaluations is exceeded. - */ - double solve(int maxEval, FUNC f, double min, double max, - AllowedSolution allowedSolution); - - /** - * Solve for a zero in the given interval, start at {@code startValue}. - * A solver may require that the interval brackets a single zero root. - * Solvers that do require bracketing should be able to handle the case - * where one of the endpoints is itself a root. - * - * @param maxEval Maximum number of evaluations. - * @param f Function to solve. - * @param min Lower bound for the interval. - * @param max Upper bound for the interval. - * @param startValue Start value to use. - * @param allowedSolution The kind of solutions that the root-finding algorithm may - * accept as solutions. - * @return A value where the function is zero. - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.MathIllegalArgumentException - * if the arguments do not satisfy the requirements specified by the solver. - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.TooManyEvaluationsException if - * the allowed number of evaluations is exceeded. - */ - double solve(int maxEval, FUNC f, double min, double max, double startValue, - AllowedSolution allowedSolution); - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/BrentSolver.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/BrentSolver.java deleted file mode 100644 index 016a2a382168..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/BrentSolver.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.analysis.solvers; - - -import com.azure.cosmos.implementation.apachecommons.math.exception.NoBracketingException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.TooManyEvaluationsException; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; -import com.azure.cosmos.implementation.apachecommons.math.util.Precision; - -/** - * This class implements the <a href="http://mathworld.wolfram.com/BrentsMethod.html"> - * Brent algorithm</a> for finding zeros of real univariate functions. - * The function should be continuous but not necessarily smooth. - * The {@code solve} method returns a zero {@code x} of the function {@code f} - * in the given interval {@code [a, b]} to within a tolerance - * {@code 2 eps abs(x) + t} where {@code eps} is the relative accuracy and - * {@code t} is the absolute accuracy. - * <p>The given interval must bracket the root.</p> - * <p> - * The reference implementation is given in chapter 4 of - * <blockquote> - * <b>Algorithms for Minimization Without Derivatives</b>, - * <em>Richard P. Brent</em>, - * Dover, 2002 - * </blockquote> - * - * @see BaseAbstractUnivariateSolver - */ -public class BrentSolver extends AbstractUnivariateSolver { - - /** Default absolute accuracy. */ - private static final double DEFAULT_ABSOLUTE_ACCURACY = 1e-6; - - /** - * Construct a solver with default absolute accuracy (1e-6). - */ - public BrentSolver() { - this(DEFAULT_ABSOLUTE_ACCURACY); - } - /** - * Construct a solver. - * - * @param absoluteAccuracy Absolute accuracy. - */ - public BrentSolver(double absoluteAccuracy) { - super(absoluteAccuracy); - } - /** - * Construct a solver. - * - * @param relativeAccuracy Relative accuracy. - * @param absoluteAccuracy Absolute accuracy. - */ - public BrentSolver(double relativeAccuracy, - double absoluteAccuracy) { - super(relativeAccuracy, absoluteAccuracy); - } - /** - * Construct a solver. - * - * @param relativeAccuracy Relative accuracy. - * @param absoluteAccuracy Absolute accuracy. - * @param functionValueAccuracy Function value accuracy. - * - * @see BaseAbstractUnivariateSolver#BaseAbstractUnivariateSolver(double,double,double) - */ - public BrentSolver(double relativeAccuracy, - double absoluteAccuracy, - double functionValueAccuracy) { - super(relativeAccuracy, absoluteAccuracy, functionValueAccuracy); - } - - /** - * {@inheritDoc} - */ - @Override - protected double doSolve() - throws NoBracketingException, - TooManyEvaluationsException, - NumberIsTooLargeException { - double min = getMin(); - double max = getMax(); - final double initial = getStartValue(); - final double functionValueAccuracy = getFunctionValueAccuracy(); - - verifySequence(min, initial, max); - - // Return the initial guess if it is good enough. - double yInitial = computeObjectiveValue(initial); - if (FastMath.abs(yInitial) <= functionValueAccuracy) { - return initial; - } - - // Return the first endpoint if it is good enough. - double yMin = computeObjectiveValue(min); - if (FastMath.abs(yMin) <= functionValueAccuracy) { - return min; - } - - // Reduce interval if min and initial bracket the root. - if (yInitial * yMin < 0) { - return brent(min, initial, yMin, yInitial); - } - - // Return the second endpoint if it is good enough. - double yMax = computeObjectiveValue(max); - if (FastMath.abs(yMax) <= functionValueAccuracy) { - return max; - } - - // Reduce interval if initial and max bracket the root. - if (yInitial * yMax < 0) { - return brent(initial, max, yInitial, yMax); - } - - throw new NoBracketingException(min, max, yMin, yMax); - } - - /** - * Search for a zero inside the provided interval. - * This implementation is based on the algorithm described at page 58 of - * the book - * <blockquote> - * <b>Algorithms for Minimization Without Derivatives</b>, - * <it>Richard P. Brent</it>, - * Dover 0-486-41998-3 - * </blockquote> - * - * @param lo Lower bound of the search interval. - * @param hi Higher bound of the search interval. - * @param fLo Function value at the lower bound of the search interval. - * @param fHi Function value at the higher bound of the search interval. - * @return the value where the function is zero. - */ - private double brent(double lo, double hi, - double fLo, double fHi) { - double a = lo; - double fa = fLo; - double b = hi; - double fb = fHi; - double c = a; - double fc = fa; - double d = b - a; - double e = d; - - final double t = getAbsoluteAccuracy(); - final double eps = getRelativeAccuracy(); - - while (true) { - if (FastMath.abs(fc) < FastMath.abs(fb)) { - a = b; - b = c; - c = a; - fa = fb; - fb = fc; - fc = fa; - } - - final double tol = 2 * eps * FastMath.abs(b) + t; - final double m = 0.5 * (c - b); - - if (FastMath.abs(m) <= tol || - Precision.equals(fb, 0)) { - return b; - } - if (FastMath.abs(e) < tol || - FastMath.abs(fa) <= FastMath.abs(fb)) { - // Force bisection. - d = m; - e = d; - } else { - double s = fb / fa; - double p; - double q; - // The equality test (a == c) is intentional, - // it is part of the original Brent's method and - // it should NOT be replaced by proximity test. - if (a == c) { - // Linear interpolation. - p = 2 * m * s; - q = 1 - s; - } else { - // Inverse quadratic interpolation. - q = fa / fc; - final double r = fb / fc; - p = s * (2 * m * q * (q - r) - (b - a) * (r - 1)); - q = (q - 1) * (r - 1) * (s - 1); - } - if (p > 0) { - q = -q; - } else { - p = -p; - } - s = e; - e = d; - if (p >= 1.5 * m * q - FastMath.abs(tol * q) || - p >= FastMath.abs(0.5 * s * q)) { - // Inverse quadratic interpolation gives a value - // in the wrong direction, or progress is slow. - // Fall back to bisection. - d = m; - e = d; - } else { - d = p / q; - } - } - a = b; - fa = fb; - - if (FastMath.abs(d) > tol) { - b += d; - } else if (m > 0) { - b += tol; - } else { - b -= tol; - } - fb = computeObjectiveValue(b); - if ((fb > 0 && fc > 0) || - (fb <= 0 && fc <= 0)) { - c = a; - fc = fa; - d = b - a; - e = d; - } - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/UnivariateSolver.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/UnivariateSolver.java deleted file mode 100644 index fd243c028ee1..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/UnivariateSolver.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.analysis.solvers; - -import com.azure.cosmos.implementation.apachecommons.math.analysis.UnivariateFunction; - - -/** - * Interface for (univariate real) root-finding algorithms. - * Implementations will search for only one zero in the given interval. - * - */ -public interface UnivariateSolver - extends BaseUnivariateSolver<UnivariateFunction> {} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/UnivariateSolverUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/UnivariateSolverUtils.java deleted file mode 100644 index 0eb95c4e9136..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/analysis/solvers/UnivariateSolverUtils.java +++ /dev/null @@ -1,471 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.analysis.solvers; - -import com.azure.cosmos.implementation.apachecommons.math.analysis.UnivariateFunction; -import com.azure.cosmos.implementation.apachecommons.math.exception.NoBracketingException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NullArgumentException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** - * Utility routines for {@link UnivariateSolver} objects. - * - */ -public class UnivariateSolverUtils { - /** - * Class contains only static methods. - */ - private UnivariateSolverUtils() {} - - /** - * Convenience method to find a zero of a univariate real function. A default - * solver is used. - * - * @param function Function. - * @param x0 Lower bound for the interval. - * @param x1 Upper bound for the interval. - * @return a value where the function is zero. - * @throws NoBracketingException if the function has the same sign at the - * endpoints. - * @throws NullArgumentException if {@code function} is {@code null}. - */ - public static double solve(UnivariateFunction function, double x0, double x1) - throws NullArgumentException, - NoBracketingException { - if (function == null) { - throw new NullArgumentException(LocalizedFormats.FUNCTION); - } - final UnivariateSolver solver = new BrentSolver(); - return solver.solve(Integer.MAX_VALUE, function, x0, x1); - } - - /** - * Convenience method to find a zero of a univariate real function. A default - * solver is used. - * - * @param function Function. - * @param x0 Lower bound for the interval. - * @param x1 Upper bound for the interval. - * @param absoluteAccuracy Accuracy to be used by the solver. - * @return a value where the function is zero. - * @throws NoBracketingException if the function has the same sign at the - * endpoints. - * @throws NullArgumentException if {@code function} is {@code null}. - */ - public static double solve(UnivariateFunction function, - double x0, double x1, - double absoluteAccuracy) - throws NullArgumentException, - NoBracketingException { - if (function == null) { - throw new NullArgumentException(LocalizedFormats.FUNCTION); - } - final UnivariateSolver solver = new BrentSolver(absoluteAccuracy); - return solver.solve(Integer.MAX_VALUE, function, x0, x1); - } - - /** - * Force a root found by a non-bracketing solver to lie on a specified side, - * as if the solver were a bracketing one. - * - * @param maxEval maximal number of new evaluations of the function - * (evaluations already done for finding the root should have already been subtracted - * from this number) - * @param f function to solve - * @param bracketing bracketing solver to use for shifting the root - * @param baseRoot original root found by a previous non-bracketing solver - * @param min minimal bound of the search interval - * @param max maximal bound of the search interval - * @param allowedSolution the kind of solutions that the root-finding algorithm may - * accept as solutions. - * @return a root approximation, on the specified side of the exact root - * @throws NoBracketingException if the function has the same sign at the - * endpoints. - */ - public static double forceSide(final int maxEval, final UnivariateFunction f, - final BracketedUnivariateSolver<UnivariateFunction> bracketing, - final double baseRoot, final double min, final double max, - final AllowedSolution allowedSolution) - throws NoBracketingException { - - if (allowedSolution == AllowedSolution.ANY_SIDE) { - // no further bracketing required - return baseRoot; - } - - // find a very small interval bracketing the root - final double step = FastMath.max(bracketing.getAbsoluteAccuracy(), - FastMath.abs(baseRoot * bracketing.getRelativeAccuracy())); - double xLo = FastMath.max(min, baseRoot - step); - double fLo = f.value(xLo); - double xHi = FastMath.min(max, baseRoot + step); - double fHi = f.value(xHi); - int remainingEval = maxEval - 2; - while (remainingEval > 0) { - - if ((fLo >= 0 && fHi <= 0) || (fLo <= 0 && fHi >= 0)) { - // compute the root on the selected side - return bracketing.solve(remainingEval, f, xLo, xHi, baseRoot, allowedSolution); - } - - // try increasing the interval - boolean changeLo = false; - boolean changeHi = false; - if (fLo < fHi) { - // increasing function - if (fLo >= 0) { - changeLo = true; - } else { - changeHi = true; - } - } else if (fLo > fHi) { - // decreasing function - if (fLo <= 0) { - changeLo = true; - } else { - changeHi = true; - } - } else { - // unknown variation - changeLo = true; - changeHi = true; - } - - // update the lower bound - if (changeLo) { - xLo = FastMath.max(min, xLo - step); - fLo = f.value(xLo); - remainingEval--; - } - - // update the higher bound - if (changeHi) { - xHi = FastMath.min(max, xHi + step); - fHi = f.value(xHi); - remainingEval--; - } - - } - - throw new NoBracketingException(LocalizedFormats.FAILED_BRACKETING, - xLo, xHi, fLo, fHi, - maxEval - remainingEval, maxEval, baseRoot, - min, max); - - } - - /** - * This method simply calls {@link #bracket(UnivariateFunction, double, double, double, - * double, double, int) bracket(function, initial, lowerBound, upperBound, q, r, maximumIterations)} - * with {@code q} and {@code r} set to 1.0 and {@code maximumIterations} set to {@code Integer.MAX_VALUE}. - * <p> - * <strong>Note: </strong> this method can take {@code Integer.MAX_VALUE} - * iterations to throw a {@code ConvergenceException.} Unless you are - * confident that there is a root between {@code lowerBound} and - * {@code upperBound} near {@code initial}, it is better to use - * {@link #bracket(UnivariateFunction, double, double, double, double,double, int) - * bracket(function, initial, lowerBound, upperBound, q, r, maximumIterations)}, - * explicitly specifying the maximum number of iterations.</p> - * - * @param function Function. - * @param initial Initial midpoint of interval being expanded to - * bracket a root. - * @param lowerBound Lower bound (a is never lower than this value) - * @param upperBound Upper bound (b never is greater than this - * value). - * @return a two-element array holding a and b. - * @throws NoBracketingException if a root cannot be bracketted. - * @throws NotStrictlyPositiveException if {@code maximumIterations <= 0}. - * @throws NullArgumentException if {@code function} is {@code null}. - */ - public static double[] bracket(UnivariateFunction function, - double initial, - double lowerBound, double upperBound) - throws NullArgumentException, - NotStrictlyPositiveException, - NoBracketingException { - return bracket(function, initial, lowerBound, upperBound, 1.0, 1.0, Integer.MAX_VALUE); - } - - /** - * This method simply calls {@link #bracket(UnivariateFunction, double, double, double, - * double, double, int) bracket(function, initial, lowerBound, upperBound, q, r, maximumIterations)} - * with {@code q} and {@code r} set to 1.0. - * @param function Function. - * @param initial Initial midpoint of interval being expanded to - * bracket a root. - * @param lowerBound Lower bound (a is never lower than this value). - * @param upperBound Upper bound (b never is greater than this - * value). - * @param maximumIterations Maximum number of iterations to perform - * @return a two element array holding a and b. - * @throws NoBracketingException if the algorithm fails to find a and b - * satisfying the desired conditions. - * @throws NotStrictlyPositiveException if {@code maximumIterations <= 0}. - * @throws NullArgumentException if {@code function} is {@code null}. - */ - public static double[] bracket(UnivariateFunction function, - double initial, - double lowerBound, double upperBound, - int maximumIterations) - throws NullArgumentException, - NotStrictlyPositiveException, - NoBracketingException { - return bracket(function, initial, lowerBound, upperBound, 1.0, 1.0, maximumIterations); - } - - /** - * This method attempts to find two values a and b satisfying <ul> - * <li> {@code lowerBound <= a < initial < b <= upperBound} </li> - * <li> {@code f(a) * f(b) <= 0} </li> - * </ul> - * If {@code f} is continuous on {@code [a,b]}, this means that {@code a} - * and {@code b} bracket a root of {@code f}. - * <p> - * The algorithm checks the sign of \( f(l_k) \) and \( f(u_k) \) for increasing - * values of k, where \( l_k = max(lower, initial - \delta_k) \), - * \( u_k = min(upper, initial + \delta_k) \), using recurrence - * \( \delta_{k+1} = r \delta_k + q, \delta_0 = 0\) and starting search with \( k=1 \). - * The algorithm stops when one of the following happens: <ul> - * <li> at least one positive and one negative value have been found -- success!</li> - * <li> both endpoints have reached their respective limits -- NoBracketingException </li> - * <li> {@code maximumIterations} iterations elapse -- NoBracketingException </li></ul> - * <p> - * If different signs are found at first iteration ({@code k=1}), then the returned - * interval will be \( [a, b] = [l_1, u_1] \). If different signs are found at a later - * iteration {@code k>1}, then the returned interval will be either - * \( [a, b] = [l_{k+1}, l_{k}] \) or \( [a, b] = [u_{k}, u_{k+1}] \). A root solver called - * with these parameters will therefore start with the smallest bracketing interval known - * at this step. - * </p> - * <p> - * Interval expansion rate is tuned by changing the recurrence parameters {@code r} and - * {@code q}. When the multiplicative factor {@code r} is set to 1, the sequence is a - * simple arithmetic sequence with linear increase. When the multiplicative factor {@code r} - * is larger than 1, the sequence has an asymptotically exponential rate. Note than the - * additive parameter {@code q} should never be set to zero, otherwise the interval would - * degenerate to the single initial point for all values of {@code k}. - * </p> - * <p> - * As a rule of thumb, when the location of the root is expected to be approximately known - * within some error margin, {@code r} should be set to 1 and {@code q} should be set to the - * order of magnitude of the error margin. When the location of the root is really a wild guess, - * then {@code r} should be set to a value larger than 1 (typically 2 to double the interval - * length at each iteration) and {@code q} should be set according to half the initial - * search interval length. - * </p> - * <p> - * As an example, if we consider the trivial function {@code f(x) = 1 - x} and use - * {@code initial = 4}, {@code r = 1}, {@code q = 2}, the algorithm will compute - * {@code f(4-2) = f(2) = -1} and {@code f(4+2) = f(6) = -5} for {@code k = 1}, then - * {@code f(4-4) = f(0) = +1} and {@code f(4+4) = f(8) = -7} for {@code k = 2}. Then it will - * return the interval {@code [0, 2]} as the smallest one known to be bracketing the root. - * As shown by this example, the initial value (here {@code 4}) may lie outside of the returned - * bracketing interval. - * </p> - * @param function function to check - * @param initial Initial midpoint of interval being expanded to - * bracket a root. - * @param lowerBound Lower bound (a is never lower than this value). - * @param upperBound Upper bound (b never is greater than this - * value). - * @param q additive offset used to compute bounds sequence (must be strictly positive) - * @param r multiplicative factor used to compute bounds sequence - * @param maximumIterations Maximum number of iterations to perform - * @return a two element array holding the bracketing values. - * @exception NoBracketingException if function cannot be bracketed in the search interval - */ - public static double[] bracket(final UnivariateFunction function, final double initial, - final double lowerBound, final double upperBound, - final double q, final double r, final int maximumIterations) - throws NoBracketingException { - - if (function == null) { - throw new NullArgumentException(LocalizedFormats.FUNCTION); - } - if (q <= 0) { - throw new NotStrictlyPositiveException(q); - } - if (maximumIterations <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.INVALID_MAX_ITERATIONS, maximumIterations); - } - verifySequence(lowerBound, initial, upperBound); - - // initialize the recurrence - double a = initial; - double b = initial; - double fa = Double.NaN; - double fb = Double.NaN; - double delta = 0; - - for (int numIterations = 0; - (numIterations < maximumIterations) && (a > lowerBound || b < upperBound); - ++numIterations) { - - final double previousA = a; - final double previousFa = fa; - final double previousB = b; - final double previousFb = fb; - - delta = r * delta + q; - a = FastMath.max(initial - delta, lowerBound); - b = FastMath.min(initial + delta, upperBound); - fa = function.value(a); - fb = function.value(b); - - if (numIterations == 0) { - // at first iteration, we don't have a previous interval - // we simply compare both sides of the initial interval - if (fa * fb <= 0) { - // the first interval already brackets a root - return new double[] { a, b }; - } - } else { - // we have a previous interval with constant sign and expand it, - // we expect sign changes to occur at boundaries - if (fa * previousFa <= 0) { - // sign change detected at near lower bound - return new double[] { a, previousA }; - } else if (fb * previousFb <= 0) { - // sign change detected at near upper bound - return new double[] { previousB, b }; - } - } - - } - - // no bracketing found - throw new NoBracketingException(a, b, fa, fb); - - } - - /** - * Compute the midpoint of two values. - * - * @param a first value. - * @param b second value. - * @return the midpoint. - */ - public static double midpoint(double a, double b) { - return (a + b) * 0.5; - } - - /** - * Check whether the interval bounds bracket a root. That is, if the - * values at the endpoints are not equal to zero, then the function takes - * opposite signs at the endpoints. - * - * @param function Function. - * @param lower Lower endpoint. - * @param upper Upper endpoint. - * @return {@code true} if the function values have opposite signs at the - * given points. - * @throws NullArgumentException if {@code function} is {@code null}. - */ - public static boolean isBracketing(UnivariateFunction function, - final double lower, - final double upper) - throws NullArgumentException { - if (function == null) { - throw new NullArgumentException(LocalizedFormats.FUNCTION); - } - final double fLo = function.value(lower); - final double fHi = function.value(upper); - return (fLo >= 0 && fHi <= 0) || (fLo <= 0 && fHi >= 0); - } - - /** - * Check whether the arguments form a (strictly) increasing sequence. - * - * @param start First number. - * @param mid Second number. - * @param end Third number. - * @return {@code true} if the arguments form an increasing sequence. - */ - public static boolean isSequence(final double start, - final double mid, - final double end) { - return (start < mid) && (mid < end); - } - - /** - * Check that the endpoints specify an interval. - * - * @param lower Lower endpoint. - * @param upper Upper endpoint. - * @throws NumberIsTooLargeException if {@code lower >= upper}. - */ - public static void verifyInterval(final double lower, - final double upper) - throws NumberIsTooLargeException { - if (lower >= upper) { - throw new NumberIsTooLargeException(LocalizedFormats.ENDPOINTS_NOT_AN_INTERVAL, - lower, upper, false); - } - } - - /** - * Check that {@code lower < initial < upper}. - * - * @param lower Lower endpoint. - * @param initial Initial value. - * @param upper Upper endpoint. - * @throws NumberIsTooLargeException if {@code lower >= initial} or - * {@code initial >= upper}. - */ - public static void verifySequence(final double lower, - final double initial, - final double upper) - throws NumberIsTooLargeException { - verifyInterval(lower, initial); - verifyInterval(initial, upper); - } - - /** - * Check that the endpoints specify an interval and the end points - * bracket a root. - * - * @param function Function. - * @param lower Lower endpoint. - * @param upper Upper endpoint. - * @throws NoBracketingException if the function has the same sign at the - * endpoints. - * @throws NullArgumentException if {@code function} is {@code null}. - */ - public static void verifyBracketing(UnivariateFunction function, - final double lower, - final double upper) - throws NullArgumentException, - NoBracketingException { - if (function == null) { - throw new NullArgumentException(LocalizedFormats.FUNCTION); - } - verifyInterval(lower, upper); - if (!isBracketing(function, lower, upper)) { - throw new NoBracketingException(lower, upper, - function.value(lower), - function.value(upper)); - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/AbstractIntegerDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/AbstractIntegerDistribution.java deleted file mode 100644 index 3d92b567d92f..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/AbstractIntegerDistribution.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import java.io.Serializable; - -import com.azure.cosmos.implementation.apachecommons.math.exception.MathInternalError; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.OutOfRangeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** - * Base class for integer-valued discrete distributions. Default - * implementations are provided for some of the methods that do not vary - * from distribution to distribution. - * - */ -public abstract class AbstractIntegerDistribution implements IntegerDistribution, Serializable { - - /** Serializable version identifier */ - private static final long serialVersionUID = -1146319659338487221L; - - /** - * RandomData instance used to generate samples from the distribution. - * @deprecated As of 3.1, to be removed in 4.0. Please use the - * {@link #random} instance variable instead. - */ - @Deprecated - protected final com.azure.cosmos.implementation.apachecommons.math.random.RandomDataImpl randomData = - new com.azure.cosmos.implementation.apachecommons.math.random.RandomDataImpl(); - - /** - * RNG instance used to generate samples from the distribution. - * @since 3.1 - */ - protected final RandomGenerator random; - - /** - * @deprecated As of 3.1, to be removed in 4.0. Please use - * {@link #AbstractIntegerDistribution(RandomGenerator)} instead. - */ - @Deprecated - protected AbstractIntegerDistribution() { - // Legacy users are only allowed to access the deprecated "randomData". - // New users are forbidden to use this constructor. - random = null; - } - - /** - * @param rng Random number generator. - * @since 3.1 - */ - protected AbstractIntegerDistribution(RandomGenerator rng) { - random = rng; - } - - /** - * {@inheritDoc} - * - * The default implementation uses the identity - * <p>{@code P(x0 < X <= x1) = P(X <= x1) - P(X <= x0)}</p> - */ - public double cumulativeProbability(int x0, int x1) throws NumberIsTooLargeException { - if (x1 < x0) { - throw new NumberIsTooLargeException(LocalizedFormats.LOWER_ENDPOINT_ABOVE_UPPER_ENDPOINT, - x0, x1, true); - } - return cumulativeProbability(x1) - cumulativeProbability(x0); - } - - /** - * {@inheritDoc} - * - * The default implementation returns - * <ul> - * <li>{@link #getSupportLowerBound()} for {@code p = 0},</li> - * <li>{@link #getSupportUpperBound()} for {@code p = 1}, and</li> - * <li>{@link #solveInverseCumulativeProbability(double, int, int)} for - * {@code 0 < p < 1}.</li> - * </ul> - */ - public int inverseCumulativeProbability(final double p) throws OutOfRangeException { - if (p < 0.0 || p > 1.0) { - throw new OutOfRangeException(p, 0, 1); - } - - int lower = getSupportLowerBound(); - if (p == 0.0) { - return lower; - } - if (lower == Integer.MIN_VALUE) { - if (checkedCumulativeProbability(lower) >= p) { - return lower; - } - } else { - lower -= 1; // this ensures cumulativeProbability(lower) < p, which - // is important for the solving step - } - - int upper = getSupportUpperBound(); - if (p == 1.0) { - return upper; - } - - // use the one-sided Chebyshev inequality to narrow the bracket - // cf. AbstractRealDistribution.inverseCumulativeProbability(double) - final double mu = getNumericalMean(); - final double sigma = FastMath.sqrt(getNumericalVariance()); - final boolean chebyshevApplies = !(Double.isInfinite(mu) || Double.isNaN(mu) || - Double.isInfinite(sigma) || Double.isNaN(sigma) || sigma == 0.0); - if (chebyshevApplies) { - double k = FastMath.sqrt((1.0 - p) / p); - double tmp = mu - k * sigma; - if (tmp > lower) { - lower = ((int) FastMath.ceil(tmp)) - 1; - } - k = 1.0 / k; - tmp = mu + k * sigma; - if (tmp < upper) { - upper = ((int) FastMath.ceil(tmp)) - 1; - } - } - - return solveInverseCumulativeProbability(p, lower, upper); - } - - /** - * This is a utility function used by {@link - * #inverseCumulativeProbability(double)}. It assumes {@code 0 < p < 1} and - * that the inverse cumulative probability lies in the bracket {@code - * (lower, upper]}. The implementation does simple bisection to find the - * smallest {@code p}-quantile <code>inf{x in Z | P(X<=x) >= p}</code>. - * - * @param p the cumulative probability - * @param lower a value satisfying {@code cumulativeProbability(lower) < p} - * @param upper a value satisfying {@code p <= cumulativeProbability(upper)} - * @return the smallest {@code p}-quantile of this distribution - */ - protected int solveInverseCumulativeProbability(final double p, int lower, int upper) { - while (lower + 1 < upper) { - int xm = (lower + upper) / 2; - if (xm < lower || xm > upper) { - /* - * Overflow. - * There will never be an overflow in both calculation methods - * for xm at the same time - */ - xm = lower + (upper - lower) / 2; - } - - double pm = checkedCumulativeProbability(xm); - if (pm >= p) { - upper = xm; - } else { - lower = xm; - } - } - return upper; - } - - /** {@inheritDoc} */ - public void reseedRandomGenerator(long seed) { - random.setSeed(seed); - randomData.reSeed(seed); - } - - /** - * {@inheritDoc} - * - * The default implementation uses the - * <a href="http://en.wikipedia.org/wiki/Inverse_transform_sampling"> - * inversion method</a>. - */ - public int sample() { - return inverseCumulativeProbability(random.nextDouble()); - } - - /** - * {@inheritDoc} - * - * The default implementation generates the sample by calling - * {@link #sample()} in a loop. - */ - public int[] sample(int sampleSize) { - if (sampleSize <= 0) { - throw new NotStrictlyPositiveException( - LocalizedFormats.NUMBER_OF_SAMPLES, sampleSize); - } - int[] out = new int[sampleSize]; - for (int i = 0; i < sampleSize; i++) { - out[i] = sample(); - } - return out; - } - - /** - * Computes the cumulative probability function and checks for {@code NaN} - * values returned. Throws {@code MathInternalError} if the value is - * {@code NaN}. Rethrows any exception encountered evaluating the cumulative - * probability function. Throws {@code MathInternalError} if the cumulative - * probability function returns {@code NaN}. - * - * @param argument input value - * @return the cumulative probability - * @throws MathInternalError if the cumulative probability is {@code NaN} - */ - private double checkedCumulativeProbability(int argument) - throws MathInternalError { - double result = Double.NaN; - result = cumulativeProbability(argument); - if (Double.isNaN(result)) { - throw new MathInternalError(LocalizedFormats - .DISCRETE_CUMULATIVE_PROBABILITY_RETURNED_NAN, argument); - } - return result; - } - - /** - * For a random variable {@code X} whose values are distributed according to - * this distribution, this method returns {@code log(P(X = x))}, where - * {@code log} is the natural logarithm. In other words, this method - * represents the logarithm of the probability mass function (PMF) for the - * distribution. Note that due to the floating point precision and - * under/overflow issues, this method will for some distributions be more - * precise and faster than computing the logarithm of - * {@link #probability(int)}. - * <p> - * The default implementation simply computes the logarithm of {@code probability(x)}.</p> - * - * @param x the point at which the PMF is evaluated - * @return the logarithm of the value of the probability mass function at {@code x} - */ - public double logProbability(int x) { - return FastMath.log(probability(x)); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/AbstractRealDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/AbstractRealDistribution.java deleted file mode 100644 index 0d76e6f6f631..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/AbstractRealDistribution.java +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import java.io.Serializable; - -import com.azure.cosmos.implementation.apachecommons.math.analysis.UnivariateFunction; -import com.azure.cosmos.implementation.apachecommons.math.analysis.solvers.UnivariateSolverUtils; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.OutOfRangeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** - * Base class for probability distributions on the reals. - * Default implementations are provided for some of the methods - * that do not vary from distribution to distribution. - * - * @since 3.0 - */ -public abstract class AbstractRealDistribution -implements RealDistribution, Serializable { - /** Default accuracy. */ - public static final double SOLVER_DEFAULT_ABSOLUTE_ACCURACY = 1e-6; - /** Serializable version identifier */ - private static final long serialVersionUID = -38038050983108802L; - /** - * RandomData instance used to generate samples from the distribution. - * @deprecated As of 3.1, to be removed in 4.0. Please use the - * {@link #random} instance variable instead. - */ - @Deprecated - protected com.azure.cosmos.implementation.apachecommons.math.random.RandomDataImpl randomData = - new com.azure.cosmos.implementation.apachecommons.math.random.RandomDataImpl(); - - /** - * RNG instance used to generate samples from the distribution. - * @since 3.1 - */ - protected final RandomGenerator random; - - /** Solver absolute accuracy for inverse cumulative computation */ - private double solverAbsoluteAccuracy = SOLVER_DEFAULT_ABSOLUTE_ACCURACY; - - /** - * @deprecated As of 3.1, to be removed in 4.0. Please use - * {@link #AbstractRealDistribution(RandomGenerator)} instead. - */ - @Deprecated - protected AbstractRealDistribution() { - // Legacy users are only allowed to access the deprecated "randomData". - // New users are forbidden to use this constructor. - random = null; - } - /** - * @param rng Random number generator. - * @since 3.1 - */ - protected AbstractRealDistribution(RandomGenerator rng) { - random = rng; - } - - /** - * {@inheritDoc} - * - * The default implementation uses the identity - * <p>{@code P(x0 < X <= x1) = P(X <= x1) - P(X <= x0)}</p> - * - * @deprecated As of 3.1 (to be removed in 4.0). Please use - * {@link #probability(double,double)} instead. - */ - @Deprecated - public double cumulativeProbability(double x0, double x1) throws NumberIsTooLargeException { - return probability(x0, x1); - } - - /** - * For a random variable {@code X} whose values are distributed according - * to this distribution, this method returns {@code P(x0 < X <= x1)}. - * - * @param x0 Lower bound (excluded). - * @param x1 Upper bound (included). - * @return the probability that a random variable with this distribution - * takes a value between {@code x0} and {@code x1}, excluding the lower - * and including the upper endpoint. - * @throws NumberIsTooLargeException if {@code x0 > x1}. - * - * The default implementation uses the identity - * {@code P(x0 < X <= x1) = P(X <= x1) - P(X <= x0)} - * - * @since 3.1 - */ - public double probability(double x0, - double x1) { - if (x0 > x1) { - throw new NumberIsTooLargeException(LocalizedFormats.LOWER_ENDPOINT_ABOVE_UPPER_ENDPOINT, - x0, x1, true); - } - return cumulativeProbability(x1) - cumulativeProbability(x0); - } - - /** - * {@inheritDoc} - * - * The default implementation returns - * <ul> - * <li>{@link #getSupportLowerBound()} for {@code p = 0},</li> - * <li>{@link #getSupportUpperBound()} for {@code p = 1}.</li> - * </ul> - */ - public double inverseCumulativeProbability(final double p) throws OutOfRangeException { - /* - * IMPLEMENTATION NOTES - * -------------------- - * Where applicable, use is made of the one-sided Chebyshev inequality - * to bracket the root. This inequality states that - * P(X - mu >= k * sig) <= 1 / (1 + k^2), - * mu: mean, sig: standard deviation. Equivalently - * 1 - P(X < mu + k * sig) <= 1 / (1 + k^2), - * F(mu + k * sig) >= k^2 / (1 + k^2). - * - * For k = sqrt(p / (1 - p)), we find - * F(mu + k * sig) >= p, - * and (mu + k * sig) is an upper-bound for the root. - * - * Then, introducing Y = -X, mean(Y) = -mu, sd(Y) = sig, and - * P(Y >= -mu + k * sig) <= 1 / (1 + k^2), - * P(-X >= -mu + k * sig) <= 1 / (1 + k^2), - * P(X <= mu - k * sig) <= 1 / (1 + k^2), - * F(mu - k * sig) <= 1 / (1 + k^2). - * - * For k = sqrt((1 - p) / p), we find - * F(mu - k * sig) <= p, - * and (mu - k * sig) is a lower-bound for the root. - * - * In cases where the Chebyshev inequality does not apply, geometric - * progressions 1, 2, 4, ... and -1, -2, -4, ... are used to bracket - * the root. - */ - if (p < 0.0 || p > 1.0) { - throw new OutOfRangeException(p, 0, 1); - } - - double lowerBound = getSupportLowerBound(); - if (p == 0.0) { - return lowerBound; - } - - double upperBound = getSupportUpperBound(); - if (p == 1.0) { - return upperBound; - } - - final double mu = getNumericalMean(); - final double sig = FastMath.sqrt(getNumericalVariance()); - final boolean chebyshevApplies; - chebyshevApplies = !(Double.isInfinite(mu) || Double.isNaN(mu) || - Double.isInfinite(sig) || Double.isNaN(sig)); - - if (lowerBound == Double.NEGATIVE_INFINITY) { - if (chebyshevApplies) { - lowerBound = mu - sig * FastMath.sqrt((1. - p) / p); - } else { - lowerBound = -1.0; - while (cumulativeProbability(lowerBound) >= p) { - lowerBound *= 2.0; - } - } - } - - if (upperBound == Double.POSITIVE_INFINITY) { - if (chebyshevApplies) { - upperBound = mu + sig * FastMath.sqrt(p / (1. - p)); - } else { - upperBound = 1.0; - while (cumulativeProbability(upperBound) < p) { - upperBound *= 2.0; - } - } - } - - final UnivariateFunction toSolve = new UnivariateFunction() { - /** {@inheritDoc} */ - public double value(final double x) { - return cumulativeProbability(x) - p; - } - }; - - double x = UnivariateSolverUtils.solve(toSolve, - lowerBound, - upperBound, - getSolverAbsoluteAccuracy()); - - if (!isSupportConnected()) { - /* Test for plateau. */ - final double dx = getSolverAbsoluteAccuracy(); - if (x - dx >= getSupportLowerBound()) { - double px = cumulativeProbability(x); - if (cumulativeProbability(x - dx) == px) { - upperBound = x; - while (upperBound - lowerBound > dx) { - final double midPoint = 0.5 * (lowerBound + upperBound); - if (cumulativeProbability(midPoint) < px) { - lowerBound = midPoint; - } else { - upperBound = midPoint; - } - } - return upperBound; - } - } - } - return x; - } - - /** - * Returns the solver absolute accuracy for inverse cumulative computation. - * You can override this method in order to use a Brent solver with an - * absolute accuracy different from the default. - * - * @return the maximum absolute error in inverse cumulative probability estimates - */ - protected double getSolverAbsoluteAccuracy() { - return solverAbsoluteAccuracy; - } - - /** {@inheritDoc} */ - public void reseedRandomGenerator(long seed) { - random.setSeed(seed); - randomData.reSeed(seed); - } - - /** - * {@inheritDoc} - * - * The default implementation uses the - * <a href="http://en.wikipedia.org/wiki/Inverse_transform_sampling"> - * inversion method. - * </a> - */ - public double sample() { - return inverseCumulativeProbability(random.nextDouble()); - } - - /** - * {@inheritDoc} - * - * The default implementation generates the sample by calling - * {@link #sample()} in a loop. - */ - public double[] sample(int sampleSize) { - if (sampleSize <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.NUMBER_OF_SAMPLES, - sampleSize); - } - double[] out = new double[sampleSize]; - for (int i = 0; i < sampleSize; i++) { - out[i] = sample(); - } - return out; - } - - /** - * {@inheritDoc} - * - * @return zero. - * @since 3.1 - */ - public double probability(double x) { - return 0d; - } - - /** - * Returns the natural logarithm of the probability density function (PDF) of this distribution - * evaluated at the specified point {@code x}. In general, the PDF is the derivative of the - * {@link #cumulativeProbability(double) CDF}. If the derivative does not exist at {@code x}, - * then an appropriate replacement should be returned, e.g. {@code Double.POSITIVE_INFINITY}, - * {@code Double.NaN}, or the limit inferior or limit superior of the difference quotient. Note - * that due to the floating point precision and under/overflow issues, this method will for some - * distributions be more precise and faster than computing the logarithm of - * {@link #density(double)}. The default implementation simply computes the logarithm of - * {@code density(x)}. - * - * @param x the point at which the PDF is evaluated - * @return the logarithm of the value of the probability density function at point {@code x} - */ - public double logDensity(double x) { - return FastMath.log(density(x)); - } -} - diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/BetaDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/BetaDistribution.java deleted file mode 100644 index 34a3caaa7056..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/BetaDistribution.java +++ /dev/null @@ -1,410 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooSmallException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; -import com.azure.cosmos.implementation.apachecommons.math.special.Beta; -import com.azure.cosmos.implementation.apachecommons.math.special.Gamma; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; -import com.azure.cosmos.implementation.apachecommons.math.util.Precision; - -/** - * Implements the Beta distribution. - * - * @see <a href="http://en.wikipedia.org/wiki/Beta_distribution">Beta distribution</a> - * @since 2.0 (changed to concrete class in 3.0) - */ -public class BetaDistribution extends AbstractRealDistribution { - /** - * Default inverse cumulative probability accuracy. - * @since 2.1 - */ - public static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY = 1e-9; - /** Serializable version identifier. */ - private static final long serialVersionUID = -1221965979403477668L; - /** First shape parameter. */ - private final double alpha; - /** Second shape parameter. */ - private final double beta; - /** Normalizing factor used in density computations. - * updated whenever alpha or beta are changed. - */ - private double z; - /** Inverse cumulative probability accuracy. */ - private final double solverAbsoluteAccuracy; - - /** - * Build a new instance. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param alpha First shape parameter (must be positive). - * @param beta Second shape parameter (must be positive). - */ - public BetaDistribution(double alpha, double beta) { - this(alpha, beta, DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Build a new instance. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param alpha First shape parameter (must be positive). - * @param beta Second shape parameter (must be positive). - * @param inverseCumAccuracy Maximum absolute error in inverse - * cumulative probability estimates (defaults to - * {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}). - * @since 2.1 - */ - public BetaDistribution(double alpha, double beta, double inverseCumAccuracy) { - this(new Well19937c(), alpha, beta, inverseCumAccuracy); - } - - /** - * Creates a β distribution. - * - * @param rng Random number generator. - * @param alpha First shape parameter (must be positive). - * @param beta Second shape parameter (must be positive). - * @since 3.3 - */ - public BetaDistribution(RandomGenerator rng, double alpha, double beta) { - this(rng, alpha, beta, DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Creates a β distribution. - * - * @param rng Random number generator. - * @param alpha First shape parameter (must be positive). - * @param beta Second shape parameter (must be positive). - * @param inverseCumAccuracy Maximum absolute error in inverse - * cumulative probability estimates (defaults to - * {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}). - * @since 3.1 - */ - public BetaDistribution(RandomGenerator rng, - double alpha, - double beta, - double inverseCumAccuracy) { - super(rng); - - this.alpha = alpha; - this.beta = beta; - z = Double.NaN; - solverAbsoluteAccuracy = inverseCumAccuracy; - } - - /** - * Access the first shape parameter, {@code alpha}. - * - * @return the first shape parameter. - */ - public double getAlpha() { - return alpha; - } - - /** - * Access the second shape parameter, {@code beta}. - * - * @return the second shape parameter. - */ - public double getBeta() { - return beta; - } - - /** Recompute the normalization factor. */ - private void recomputeZ() { - if (Double.isNaN(z)) { - z = Gamma.logGamma(alpha) + Gamma.logGamma(beta) - Gamma.logGamma(alpha + beta); - } - } - - /** {@inheritDoc} */ - public double density(double x) { - final double logDensity = logDensity(x); - return logDensity == Double.NEGATIVE_INFINITY ? 0 : FastMath.exp(logDensity); - } - - /** {@inheritDoc} **/ - @Override - public double logDensity(double x) { - recomputeZ(); - if (x < 0 || x > 1) { - return Double.NEGATIVE_INFINITY; - } else if (x == 0) { - if (alpha < 1) { - throw new NumberIsTooSmallException(LocalizedFormats.CANNOT_COMPUTE_BETA_DENSITY_AT_0_FOR_SOME_ALPHA, alpha, 1, false); - } - return Double.NEGATIVE_INFINITY; - } else if (x == 1) { - if (beta < 1) { - throw new NumberIsTooSmallException(LocalizedFormats.CANNOT_COMPUTE_BETA_DENSITY_AT_1_FOR_SOME_BETA, beta, 1, false); - } - return Double.NEGATIVE_INFINITY; - } else { - double logX = FastMath.log(x); - double log1mX = FastMath.log1p(-x); - return (alpha - 1) * logX + (beta - 1) * log1mX - z; - } - } - - /** {@inheritDoc} */ - public double cumulativeProbability(double x) { - if (x <= 0) { - return 0; - } else if (x >= 1) { - return 1; - } else { - return Beta.regularizedBeta(x, alpha, beta); - } - } - - /** - * Return the absolute accuracy setting of the solver used to estimate - * inverse cumulative probabilities. - * - * @return the solver absolute accuracy. - * @since 2.1 - */ - @Override - protected double getSolverAbsoluteAccuracy() { - return solverAbsoluteAccuracy; - } - - /** - * {@inheritDoc} - * - * For first shape parameter {@code alpha} and second shape parameter - * {@code beta}, the mean is {@code alpha / (alpha + beta)}. - */ - public double getNumericalMean() { - final double a = getAlpha(); - return a / (a + getBeta()); - } - - /** - * {@inheritDoc} - * - * For first shape parameter {@code alpha} and second shape parameter - * {@code beta}, the variance is - * {@code (alpha * beta) / [(alpha + beta)^2 * (alpha + beta + 1)]}. - */ - public double getNumericalVariance() { - final double a = getAlpha(); - final double b = getBeta(); - final double alphabetasum = a + b; - return (a * b) / ((alphabetasum * alphabetasum) * (alphabetasum + 1)); - } - - /** - * {@inheritDoc} - * - * The lower bound of the support is always 0 no matter the parameters. - * - * @return lower bound of the support (always 0) - */ - public double getSupportLowerBound() { - return 0; - } - - /** - * {@inheritDoc} - * - * The upper bound of the support is always 1 no matter the parameters. - * - * @return upper bound of the support (always 1) - */ - public double getSupportUpperBound() { - return 1; - } - - /** {@inheritDoc} */ - public boolean isSupportLowerBoundInclusive() { - return false; - } - - /** {@inheritDoc} */ - public boolean isSupportUpperBoundInclusive() { - return false; - } - - /** - * {@inheritDoc} - * - * The support of this distribution is connected. - * - * @return {@code true} - */ - public boolean isSupportConnected() { - return true; - } - - - /** {@inheritDoc} - * <p> - * Sampling is performed using Cheng algorithms: - * </p> - * <p> - * R. C. H. Cheng, "Generating beta variates with nonintegral shape parameters.". - * Communications of the ACM, 21, 317–322, 1978. - * </p> - */ - @Override - public double sample() { - return ChengBetaSampler.sample(random, alpha, beta); - } - - /** Utility class implementing Cheng's algorithms for beta distribution sampling. - * <p> - * R. C. H. Cheng, "Generating beta variates with nonintegral shape parameters.". - * Communications of the ACM, 21, 317–322, 1978. - * </p> - * @since 3.6 - */ - private static final class ChengBetaSampler { - - /** - * Returns one sample using Cheng's sampling algorithm. - * @param random random generator to use - * @param alpha distribution first shape parameter - * @param beta distribution second shape parameter - * @return sampled value - */ - static double sample(RandomGenerator random, final double alpha, final double beta) { - final double a = FastMath.min(alpha, beta); - final double b = FastMath.max(alpha, beta); - - if (a > 1) { - return algorithmBB(random, alpha, a, b); - } else { - return algorithmBC(random, alpha, b, a); - } - } - - /** - * Returns one sample using Cheng's BB algorithm, when both α and β are greater than 1. - * @param random random generator to use - * @param a0 distribution first shape parameter (α) - * @param a min(α, β) where α, β are the two distribution shape parameters - * @param b max(α, β) where α, β are the two distribution shape parameters - * @return sampled value - */ - private static double algorithmBB(RandomGenerator random, - final double a0, - final double a, - final double b) { - final double alpha = a + b; - final double beta = FastMath.sqrt((alpha - 2.) / (2. * a * b - alpha)); - final double gamma = a + 1. / beta; - - double r; - double w; - double t; - do { - final double u1 = random.nextDouble(); - final double u2 = random.nextDouble(); - final double v = beta * (FastMath.log(u1) - FastMath.log1p(-u1)); - w = a * FastMath.exp(v); - final double z = u1 * u1 * u2; - r = gamma * v - 1.3862944; - final double s = a + r - w; - if (s + 2.609438 >= 5 * z) { - break; - } - - t = FastMath.log(z); - if (s >= t) { - break; - } - } while (r + alpha * (FastMath.log(alpha) - FastMath.log(b + w)) < t); - - w = FastMath.min(w, Double.MAX_VALUE); - return Precision.equals(a, a0) ? w / (b + w) : b / (b + w); - } - - /** - * Returns one sample using Cheng's BC algorithm, when at least one of α and β is smaller than 1. - * @param random random generator to use - * @param a0 distribution first shape parameter (α) - * @param a max(α, β) where α, β are the two distribution shape parameters - * @param b min(α, β) where α, β are the two distribution shape parameters - * @return sampled value - */ - private static double algorithmBC(RandomGenerator random, - final double a0, - final double a, - final double b) { - final double alpha = a + b; - final double beta = 1. / b; - final double delta = 1. + a - b; - final double k1 = delta * (0.0138889 + 0.0416667 * b) / (a * beta - 0.777778); - final double k2 = 0.25 + (0.5 + 0.25 / delta) * b; - - double w; - for (;;) { - final double u1 = random.nextDouble(); - final double u2 = random.nextDouble(); - final double y = u1 * u2; - final double z = u1 * y; - if (u1 < 0.5) { - if (0.25 * u2 + z - y >= k1) { - continue; - } - } else { - if (z <= 0.25) { - final double v = beta * (FastMath.log(u1) - FastMath.log1p(-u1)); - w = a * FastMath.exp(v); - break; - } - - if (z >= k2) { - continue; - } - } - - final double v = beta * (FastMath.log(u1) - FastMath.log1p(-u1)); - w = a * FastMath.exp(v); - if (alpha * (FastMath.log(alpha) - FastMath.log(b + w) + v) - 1.3862944 >= FastMath.log(z)) { - break; - } - } - - w = FastMath.min(w, Double.MAX_VALUE); - return Precision.equals(a, a0) ? w / (b + w) : b / (b + w); - } - - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/BinomialDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/BinomialDistribution.java deleted file mode 100644 index 95125ef44247..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/BinomialDistribution.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NotPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.OutOfRangeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; -import com.azure.cosmos.implementation.apachecommons.math.special.Beta; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** - * Implementation of the binomial distribution. - * - * @see <a href="http://en.wikipedia.org/wiki/Binomial_distribution">Binomial distribution (Wikipedia)</a> - * @see <a href="http://mathworld.wolfram.com/BinomialDistribution.html">Binomial Distribution (MathWorld)</a> - */ -public class BinomialDistribution extends AbstractIntegerDistribution { - /** Serializable version identifier. */ - private static final long serialVersionUID = 6751309484392813623L; - /** The number of trials. */ - private final int numberOfTrials; - /** The probability of success. */ - private final double probabilityOfSuccess; - - /** - * Create a binomial distribution with the given number of trials and - * probability of success. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param trials Number of trials. - * @param p Probability of success. - * @throws NotPositiveException if {@code trials < 0}. - * @throws OutOfRangeException if {@code p < 0} or {@code p > 1}. - */ - public BinomialDistribution(int trials, double p) { - this(new Well19937c(), trials, p); - } - - /** - * Creates a binomial distribution. - * - * @param rng Random number generator. - * @param trials Number of trials. - * @param p Probability of success. - * @throws NotPositiveException if {@code trials < 0}. - * @throws OutOfRangeException if {@code p < 0} or {@code p > 1}. - * @since 3.1 - */ - public BinomialDistribution(RandomGenerator rng, - int trials, - double p) { - super(rng); - - if (trials < 0) { - throw new NotPositiveException(LocalizedFormats.NUMBER_OF_TRIALS, - trials); - } - if (p < 0 || p > 1) { - throw new OutOfRangeException(p, 0, 1); - } - - probabilityOfSuccess = p; - numberOfTrials = trials; - } - - /** - * Access the number of trials for this distribution. - * - * @return the number of trials. - */ - public int getNumberOfTrials() { - return numberOfTrials; - } - - /** - * Access the probability of success for this distribution. - * - * @return the probability of success. - */ - public double getProbabilityOfSuccess() { - return probabilityOfSuccess; - } - - /** {@inheritDoc} */ - public double probability(int x) { - final double logProbability = logProbability(x); - return logProbability == Double.NEGATIVE_INFINITY ? 0 : FastMath.exp(logProbability); - } - - /** {@inheritDoc} **/ - @Override - public double logProbability(int x) { - if (numberOfTrials == 0) { - return (x == 0) ? 0. : Double.NEGATIVE_INFINITY; - } - double ret; - if (x < 0 || x > numberOfTrials) { - ret = Double.NEGATIVE_INFINITY; - } else { - ret = SaddlePointExpansion.logBinomialProbability(x, - numberOfTrials, probabilityOfSuccess, - 1.0 - probabilityOfSuccess); - } - return ret; - } - - /** {@inheritDoc} */ - public double cumulativeProbability(int x) { - double ret; - if (x < 0) { - ret = 0.0; - } else if (x >= numberOfTrials) { - ret = 1.0; - } else { - ret = 1.0 - Beta.regularizedBeta(probabilityOfSuccess, - x + 1.0, numberOfTrials - x); - } - return ret; - } - - /** - * {@inheritDoc} - * - * For {@code n} trials and probability parameter {@code p}, the mean is - * {@code n * p}. - */ - public double getNumericalMean() { - return numberOfTrials * probabilityOfSuccess; - } - - /** - * {@inheritDoc} - * - * For {@code n} trials and probability parameter {@code p}, the variance is - * {@code n * p * (1 - p)}. - */ - public double getNumericalVariance() { - final double p = probabilityOfSuccess; - return numberOfTrials * p * (1 - p); - } - - /** - * {@inheritDoc} - * - * The lower bound of the support is always 0 except for the probability - * parameter {@code p = 1}. - * - * @return lower bound of the support (0 or the number of trials) - */ - public int getSupportLowerBound() { - return probabilityOfSuccess < 1.0 ? 0 : numberOfTrials; - } - - /** - * {@inheritDoc} - * - * The upper bound of the support is the number of trials except for the - * probability parameter {@code p = 0}. - * - * @return upper bound of the support (number of trials or 0) - */ - public int getSupportUpperBound() { - return probabilityOfSuccess > 0.0 ? numberOfTrials : 0; - } - - /** - * {@inheritDoc} - * - * The support of this distribution is connected. - * - * @return {@code true} - */ - public boolean isSupportConnected() { - return true; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/CauchyDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/CauchyDistribution.java deleted file mode 100644 index 32d23c39fbe3..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/CauchyDistribution.java +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.OutOfRangeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** - * Implementation of the Cauchy distribution. - * - * @see <a href="http://en.wikipedia.org/wiki/Cauchy_distribution">Cauchy distribution (Wikipedia)</a> - * @see <a href="http://mathworld.wolfram.com/CauchyDistribution.html">Cauchy Distribution (MathWorld)</a> - * @since 1.1 (changed to concrete class in 3.0) - */ -public class CauchyDistribution extends AbstractRealDistribution { - /** - * Default inverse cumulative probability accuracy. - * @since 2.1 - */ - public static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY = 1e-9; - /** Serializable version identifier */ - private static final long serialVersionUID = 8589540077390120676L; - /** The median of this distribution. */ - private final double median; - /** The scale of this distribution. */ - private final double scale; - /** Inverse cumulative probability accuracy */ - private final double solverAbsoluteAccuracy; - - /** - * Creates a Cauchy distribution with the median equal to zero and scale - * equal to one. - */ - public CauchyDistribution() { - this(0, 1); - } - - /** - * Creates a Cauchy distribution using the given median and scale. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param median Median for this distribution. - * @param scale Scale parameter for this distribution. - */ - public CauchyDistribution(double median, double scale) { - this(median, scale, DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Creates a Cauchy distribution using the given median and scale. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param median Median for this distribution. - * @param scale Scale parameter for this distribution. - * @param inverseCumAccuracy Maximum absolute error in inverse - * cumulative probability estimates - * (defaults to {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}). - * @throws NotStrictlyPositiveException if {@code scale <= 0}. - * @since 2.1 - */ - public CauchyDistribution(double median, double scale, - double inverseCumAccuracy) { - this(new Well19937c(), median, scale, inverseCumAccuracy); - } - - /** - * Creates a Cauchy distribution. - * - * @param rng Random number generator. - * @param median Median for this distribution. - * @param scale Scale parameter for this distribution. - * @throws NotStrictlyPositiveException if {@code scale <= 0}. - * @since 3.3 - */ - public CauchyDistribution(RandomGenerator rng, double median, double scale) { - this(rng, median, scale, DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Creates a Cauchy distribution. - * - * @param rng Random number generator. - * @param median Median for this distribution. - * @param scale Scale parameter for this distribution. - * @param inverseCumAccuracy Maximum absolute error in inverse - * cumulative probability estimates - * (defaults to {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}). - * @throws NotStrictlyPositiveException if {@code scale <= 0}. - * @since 3.1 - */ - public CauchyDistribution(RandomGenerator rng, - double median, - double scale, - double inverseCumAccuracy) { - super(rng); - if (scale <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.SCALE, scale); - } - this.scale = scale; - this.median = median; - solverAbsoluteAccuracy = inverseCumAccuracy; - } - - /** {@inheritDoc} */ - public double cumulativeProbability(double x) { - return 0.5 + (FastMath.atan((x - median) / scale) / FastMath.PI); - } - - /** - * Access the median. - * - * @return the median for this distribution. - */ - public double getMedian() { - return median; - } - - /** - * Access the scale parameter. - * - * @return the scale parameter for this distribution. - */ - public double getScale() { - return scale; - } - - /** {@inheritDoc} */ - public double density(double x) { - final double dev = x - median; - return (1 / FastMath.PI) * (scale / (dev * dev + scale * scale)); - } - - /** - * {@inheritDoc} - * - * Returns {@code Double.NEGATIVE_INFINITY} when {@code p == 0} - * and {@code Double.POSITIVE_INFINITY} when {@code p == 1}. - */ - @Override - public double inverseCumulativeProbability(double p) throws OutOfRangeException { - double ret; - if (p < 0 || p > 1) { - throw new OutOfRangeException(p, 0, 1); - } else if (p == 0) { - ret = Double.NEGATIVE_INFINITY; - } else if (p == 1) { - ret = Double.POSITIVE_INFINITY; - } else { - ret = median + scale * FastMath.tan(FastMath.PI * (p - .5)); - } - return ret; - } - - /** {@inheritDoc} */ - @Override - protected double getSolverAbsoluteAccuracy() { - return solverAbsoluteAccuracy; - } - - /** - * {@inheritDoc} - * - * The mean is always undefined no matter the parameters. - * - * @return mean (always Double.NaN) - */ - public double getNumericalMean() { - return Double.NaN; - } - - /** - * {@inheritDoc} - * - * The variance is always undefined no matter the parameters. - * - * @return variance (always Double.NaN) - */ - public double getNumericalVariance() { - return Double.NaN; - } - - /** - * {@inheritDoc} - * - * The lower bound of the support is always negative infinity no matter - * the parameters. - * - * @return lower bound of the support (always Double.NEGATIVE_INFINITY) - */ - public double getSupportLowerBound() { - return Double.NEGATIVE_INFINITY; - } - - /** - * {@inheritDoc} - * - * The upper bound of the support is always positive infinity no matter - * the parameters. - * - * @return upper bound of the support (always Double.POSITIVE_INFINITY) - */ - public double getSupportUpperBound() { - return Double.POSITIVE_INFINITY; - } - - /** {@inheritDoc} */ - public boolean isSupportLowerBoundInclusive() { - return false; - } - - /** {@inheritDoc} */ - public boolean isSupportUpperBoundInclusive() { - return false; - } - - /** - * {@inheritDoc} - * - * The support of this distribution is connected. - * - * @return {@code true} - */ - public boolean isSupportConnected() { - return true; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/ChiSquaredDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/ChiSquaredDistribution.java deleted file mode 100644 index def328308ad9..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/ChiSquaredDistribution.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; - -/** - * Implementation of the chi-squared distribution. - * - * @see <a href="http://en.wikipedia.org/wiki/Chi-squared_distribution">Chi-squared distribution (Wikipedia)</a> - * @see <a href="http://mathworld.wolfram.com/Chi-SquaredDistribution.html">Chi-squared Distribution (MathWorld)</a> - */ -public class ChiSquaredDistribution extends AbstractRealDistribution { - /** - * Default inverse cumulative probability accuracy - * @since 2.1 - */ - public static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY = 1e-9; - /** Serializable version identifier */ - private static final long serialVersionUID = -8352658048349159782L; - /** Internal Gamma distribution. */ - private final GammaDistribution gamma; - /** Inverse cumulative probability accuracy */ - private final double solverAbsoluteAccuracy; - - /** - * Create a Chi-Squared distribution with the given degrees of freedom. - * - * @param degreesOfFreedom Degrees of freedom. - */ - public ChiSquaredDistribution(double degreesOfFreedom) { - this(degreesOfFreedom, DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Create a Chi-Squared distribution with the given degrees of freedom and - * inverse cumulative probability accuracy. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param degreesOfFreedom Degrees of freedom. - * @param inverseCumAccuracy the maximum absolute error in inverse - * cumulative probability estimates (defaults to - * {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}). - * @since 2.1 - */ - public ChiSquaredDistribution(double degreesOfFreedom, - double inverseCumAccuracy) { - this(new Well19937c(), degreesOfFreedom, inverseCumAccuracy); - } - - /** - * Create a Chi-Squared distribution with the given degrees of freedom. - * - * @param rng Random number generator. - * @param degreesOfFreedom Degrees of freedom. - * @since 3.3 - */ - public ChiSquaredDistribution(RandomGenerator rng, double degreesOfFreedom) { - this(rng, degreesOfFreedom, DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Create a Chi-Squared distribution with the given degrees of freedom and - * inverse cumulative probability accuracy. - * - * @param rng Random number generator. - * @param degreesOfFreedom Degrees of freedom. - * @param inverseCumAccuracy the maximum absolute error in inverse - * cumulative probability estimates (defaults to - * {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}). - * @since 3.1 - */ - public ChiSquaredDistribution(RandomGenerator rng, - double degreesOfFreedom, - double inverseCumAccuracy) { - super(rng); - - gamma = new GammaDistribution(degreesOfFreedom / 2, 2); - solverAbsoluteAccuracy = inverseCumAccuracy; - } - - /** - * Access the number of degrees of freedom. - * - * @return the degrees of freedom. - */ - public double getDegreesOfFreedom() { - return gamma.getShape() * 2.0; - } - - /** {@inheritDoc} */ - public double density(double x) { - return gamma.density(x); - } - - /** {@inheritDoc} **/ - @Override - public double logDensity(double x) { - return gamma.logDensity(x); - } - - /** {@inheritDoc} */ - public double cumulativeProbability(double x) { - return gamma.cumulativeProbability(x); - } - - /** {@inheritDoc} */ - @Override - protected double getSolverAbsoluteAccuracy() { - return solverAbsoluteAccuracy; - } - - /** - * {@inheritDoc} - * - * For {@code k} degrees of freedom, the mean is {@code k}. - */ - public double getNumericalMean() { - return getDegreesOfFreedom(); - } - - /** - * {@inheritDoc} - * - * @return {@code 2 * k}, where {@code k} is the number of degrees of freedom. - */ - public double getNumericalVariance() { - return 2 * getDegreesOfFreedom(); - } - - /** - * {@inheritDoc} - * - * The lower bound of the support is always 0 no matter the - * degrees of freedom. - * - * @return zero. - */ - public double getSupportLowerBound() { - return 0; - } - - /** - * {@inheritDoc} - * - * The upper bound of the support is always positive infinity no matter the - * degrees of freedom. - * - * @return {@code Double.POSITIVE_INFINITY}. - */ - public double getSupportUpperBound() { - return Double.POSITIVE_INFINITY; - } - - /** {@inheritDoc} */ - public boolean isSupportLowerBoundInclusive() { - return true; - } - - /** {@inheritDoc} */ - public boolean isSupportUpperBoundInclusive() { - return false; - } - - /** - * {@inheritDoc} - * - * The support of this distribution is connected. - * - * @return {@code true} - */ - public boolean isSupportConnected() { - return true; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/EnumeratedDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/EnumeratedDistribution.java deleted file mode 100644 index d402b86746bb..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/EnumeratedDistribution.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import java.io.Serializable; -import java.lang.reflect.Array; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.azure.cosmos.implementation.apachecommons.math.exception.MathArithmeticException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotANumberException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotFiniteNumberException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NullArgumentException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; -import com.azure.cosmos.implementation.apachecommons.math.util.MathArrays; -import com.azure.cosmos.implementation.apachecommons.math.util.Pair; - -/** - * <p>A generic implementation of a - * <a href="http://en.wikipedia.org/wiki/Probability_distribution#Discrete_probability_distribution"> - * discrete probability distribution (Wikipedia)</a> over a finite sample space, - * based on an enumerated list of <value, probability> pairs. Input probabilities must all be non-negative, - * but zero values are allowed and their sum does not have to equal one. Constructors will normalize input - * probabilities to make them sum to one.</p> - * - * <p>The list of <value, probability> pairs does not, strictly speaking, have to be a function and it can - * contain null values. The pmf created by the constructor will combine probabilities of equal values and - * will treat null values as equal. For example, if the list of pairs <"dog", 0.2>, <null, 0.1>, - * <"pig", 0.2>, <"dog", 0.1>, <null, 0.4> is provided to the constructor, the resulting - * pmf will assign mass of 0.5 to null, 0.3 to "dog" and 0.2 to null.</p> - * - * @param <T> type of the elements in the sample space. - * @since 3.2 - */ -public class EnumeratedDistribution<T> implements Serializable { - - /** Serializable UID. */ - private static final long serialVersionUID = 20123308L; - - /** - * RNG instance used to generate samples from the distribution. - */ - protected final RandomGenerator random; - - /** - * List of random variable values. - */ - private final List<T> singletons; - - /** - * Probabilities of respective random variable values. For i = 0, ..., singletons.size() - 1, - * probability[i] is the probability that a random variable following this distribution takes - * the value singletons[i]. - */ - private final double[] probabilities; - - /** - * Cumulative probabilities, cached to speed up sampling. - */ - private final double[] cumulativeProbabilities; - - /** - * Create an enumerated distribution using the given probability mass function - * enumeration. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param pmf probability mass function enumerated as a list of <T, probability> - * pairs. - * @throws NotPositiveException if any of the probabilities are negative. - * @throws NotFiniteNumberException if any of the probabilities are infinite. - * @throws NotANumberException if any of the probabilities are NaN. - * @throws MathArithmeticException all of the probabilities are 0. - */ - public EnumeratedDistribution(final List<Pair<T, Double>> pmf) - throws NotPositiveException, MathArithmeticException, NotFiniteNumberException, NotANumberException { - this(new Well19937c(), pmf); - } - - /** - * Create an enumerated distribution using the given random number generator - * and probability mass function enumeration. - * - * @param rng random number generator. - * @param pmf probability mass function enumerated as a list of <T, probability> - * pairs. - * @throws NotPositiveException if any of the probabilities are negative. - * @throws NotFiniteNumberException if any of the probabilities are infinite. - * @throws NotANumberException if any of the probabilities are NaN. - * @throws MathArithmeticException all of the probabilities are 0. - */ - public EnumeratedDistribution(final RandomGenerator rng, final List<Pair<T, Double>> pmf) - throws NotPositiveException, MathArithmeticException, NotFiniteNumberException, NotANumberException { - random = rng; - - singletons = new ArrayList<T>(pmf.size()); - final double[] probs = new double[pmf.size()]; - - for (int i = 0; i < pmf.size(); i++) { - final Pair<T, Double> sample = pmf.get(i); - singletons.add(sample.getKey()); - final double p = sample.getValue(); - if (p < 0) { - throw new NotPositiveException(sample.getValue()); - } - if (Double.isInfinite(p)) { - throw new NotFiniteNumberException(p); - } - if (Double.isNaN(p)) { - throw new NotANumberException(); - } - probs[i] = p; - } - - probabilities = MathArrays.normalizeArray(probs, 1.0); - - cumulativeProbabilities = new double[probabilities.length]; - double sum = 0; - for (int i = 0; i < probabilities.length; i++) { - sum += probabilities[i]; - cumulativeProbabilities[i] = sum; - } - } - - /** - * Reseed the random generator used to generate samples. - * - * @param seed the new seed - */ - public void reseedRandomGenerator(long seed) { - random.setSeed(seed); - } - - /** - * <p>For a random variable {@code X} whose values are distributed according to - * this distribution, this method returns {@code P(X = x)}. In other words, - * this method represents the probability mass function (PMF) for the - * distribution.</p> - * - * <p>Note that if {@code x1} and {@code x2} satisfy {@code x1.equals(x2)}, - * or both are null, then {@code probability(x1) = probability(x2)}.</p> - * - * @param x the point at which the PMF is evaluated - * @return the value of the probability mass function at {@code x} - */ - double probability(final T x) { - double probability = 0; - - for (int i = 0; i < probabilities.length; i++) { - if ((x == null && singletons.get(i) == null) || - (x != null && x.equals(singletons.get(i)))) { - probability += probabilities[i]; - } - } - - return probability; - } - - /** - * <p>Return the probability mass function as a list of <value, probability> pairs.</p> - * - * <p>Note that if duplicate and / or null values were provided to the constructor - * when creating this EnumeratedDistribution, the returned list will contain these - * values. If duplicates values exist, what is returned will not represent - * a pmf (i.e., it is up to the caller to consolidate duplicate mass points).</p> - * - * @return the probability mass function. - */ - public List<Pair<T, Double>> getPmf() { - final List<Pair<T, Double>> samples = new ArrayList<Pair<T, Double>>(probabilities.length); - - for (int i = 0; i < probabilities.length; i++) { - samples.add(new Pair<T, Double>(singletons.get(i), probabilities[i])); - } - - return samples; - } - - /** - * Generate a random value sampled from this distribution. - * - * @return a random value. - */ - public T sample() { - final double randomValue = random.nextDouble(); - - int index = Arrays.binarySearch(cumulativeProbabilities, randomValue); - if (index < 0) { - index = -index-1; - } - - if (index >= 0 && - index < probabilities.length && - randomValue < cumulativeProbabilities[index]) { - return singletons.get(index); - } - - /* This should never happen, but it ensures we will return a correct - * object in case there is some floating point inequality problem - * wrt the cumulative probabilities. */ - return singletons.get(singletons.size() - 1); - } - - /** - * Generate a random sample from the distribution. - * - * @param sampleSize the number of random values to generate. - * @return an array representing the random sample. - * @throws NotStrictlyPositiveException if {@code sampleSize} is not - * positive. - */ - public Object[] sample(int sampleSize) throws NotStrictlyPositiveException { - if (sampleSize <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.NUMBER_OF_SAMPLES, - sampleSize); - } - - final Object[] out = new Object[sampleSize]; - - for (int i = 0; i < sampleSize; i++) { - out[i] = sample(); - } - - return out; - - } - - /** - * Generate a random sample from the distribution. - * <p> - * If the requested samples fit in the specified array, it is returned - * therein. Otherwise, a new array is allocated with the runtime type of - * the specified array and the size of this collection. - * - * @param sampleSize the number of random values to generate. - * @param array the array to populate. - * @return an array representing the random sample. - * @throws NotStrictlyPositiveException if {@code sampleSize} is not positive. - * @throws NullArgumentException if {@code array} is null - */ - public T[] sample(int sampleSize, final T[] array) throws NotStrictlyPositiveException { - if (sampleSize <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.NUMBER_OF_SAMPLES, sampleSize); - } - - if (array == null) { - throw new NullArgumentException(LocalizedFormats.INPUT_ARRAY); - } - - T[] out; - if (array.length < sampleSize) { - @SuppressWarnings("unchecked") // safe as both are of type T - final T[] unchecked = (T[]) Array.newInstance(array.getClass().getComponentType(), sampleSize); - out = unchecked; - } else { - out = array; - } - - for (int i = 0; i < sampleSize; i++) { - out[i] = sample(); - } - - return out; - - } - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/EnumeratedIntegerDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/EnumeratedIntegerDistribution.java deleted file mode 100644 index e4a8764dbc2e..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/EnumeratedIntegerDistribution.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import com.azure.cosmos.implementation.apachecommons.math.exception.DimensionMismatchException; -import com.azure.cosmos.implementation.apachecommons.math.exception.MathArithmeticException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotANumberException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotFiniteNumberException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; -import com.azure.cosmos.implementation.apachecommons.math.util.Pair; - -/** - * <p>Implementation of an integer-valued {@link EnumeratedDistribution}.</p> - * - * <p>Values with zero-probability are allowed but they do not extend the - * support.<br/> - * Duplicate values are allowed. Probabilities of duplicate values are combined - * when computing cumulative probabilities and statistics.</p> - * - * @since 3.2 - */ -public class EnumeratedIntegerDistribution extends AbstractIntegerDistribution { - - /** Serializable UID. */ - private static final long serialVersionUID = 20130308L; - - /** - * {@link EnumeratedDistribution} instance (using the {@link Integer} wrapper) - * used to generate the pmf. - */ - protected final EnumeratedDistribution<Integer> innerDistribution; - - /** - * Create a discrete distribution using the given probability mass function - * definition. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param singletons array of random variable values. - * @param probabilities array of probabilities. - * @throws DimensionMismatchException if - * {@code singletons.length != probabilities.length} - * @throws NotPositiveException if any of the probabilities are negative. - * @throws NotFiniteNumberException if any of the probabilities are infinite. - * @throws NotANumberException if any of the probabilities are NaN. - * @throws MathArithmeticException all of the probabilities are 0. - */ - public EnumeratedIntegerDistribution(final int[] singletons, final double[] probabilities) - throws DimensionMismatchException, NotPositiveException, MathArithmeticException, - NotFiniteNumberException, NotANumberException{ - this(new Well19937c(), singletons, probabilities); - } - - /** - * Create a discrete distribution using the given random number generator - * and probability mass function definition. - * - * @param rng random number generator. - * @param singletons array of random variable values. - * @param probabilities array of probabilities. - * @throws DimensionMismatchException if - * {@code singletons.length != probabilities.length} - * @throws NotPositiveException if any of the probabilities are negative. - * @throws NotFiniteNumberException if any of the probabilities are infinite. - * @throws NotANumberException if any of the probabilities are NaN. - * @throws MathArithmeticException all of the probabilities are 0. - */ - public EnumeratedIntegerDistribution(final RandomGenerator rng, - final int[] singletons, final double[] probabilities) - throws DimensionMismatchException, NotPositiveException, MathArithmeticException, - NotFiniteNumberException, NotANumberException { - super(rng); - innerDistribution = new EnumeratedDistribution<Integer>( - rng, createDistribution(singletons, probabilities)); - } - - /** - * Create a discrete integer-valued distribution from the input data. Values are assigned - * mass based on their frequency. - * - * @param rng random number generator used for sampling - * @param data input dataset - * @since 3.6 - */ - public EnumeratedIntegerDistribution(final RandomGenerator rng, final int[] data) { - super(rng); - final Map<Integer, Integer> dataMap = new HashMap<Integer, Integer>(); - for (int value : data) { - Integer count = dataMap.get(value); - if (count == null) { - count = 0; - } - dataMap.put(value, ++count); - } - final int massPoints = dataMap.size(); - final double denom = data.length; - final int[] values = new int[massPoints]; - final double[] probabilities = new double[massPoints]; - int index = 0; - for (Entry<Integer, Integer> entry : dataMap.entrySet()) { - values[index] = entry.getKey(); - probabilities[index] = entry.getValue().intValue() / denom; - index++; - } - innerDistribution = new EnumeratedDistribution<Integer>(rng, createDistribution(values, probabilities)); - } - - /** - * Create a discrete integer-valued distribution from the input data. Values are assigned - * mass based on their frequency. For example, [0,1,1,2] as input creates a distribution - * with values 0, 1 and 2 having probability masses 0.25, 0.5 and 0.25 respectively, - * - * @param data input dataset - * @since 3.6 - */ - public EnumeratedIntegerDistribution(final int[] data) { - this(new Well19937c(), data); - } - - /** - * Create the list of Pairs representing the distribution from singletons and probabilities. - * - * @param singletons values - * @param probabilities probabilities - * @return list of value/probability pairs - */ - private static List<Pair<Integer, Double>> createDistribution(int[] singletons, double[] probabilities) { - if (singletons.length != probabilities.length) { - throw new DimensionMismatchException(probabilities.length, singletons.length); - } - - final List<Pair<Integer, Double>> samples = new ArrayList<Pair<Integer, Double>>(singletons.length); - - for (int i = 0; i < singletons.length; i++) { - samples.add(new Pair<Integer, Double>(singletons[i], probabilities[i])); - } - return samples; - - } - - /** - * {@inheritDoc} - */ - public double probability(final int x) { - return innerDistribution.probability(x); - } - - /** - * {@inheritDoc} - */ - public double cumulativeProbability(final int x) { - double probability = 0; - - for (final Pair<Integer, Double> sample : innerDistribution.getPmf()) { - if (sample.getKey() <= x) { - probability += sample.getValue(); - } - } - - return probability; - } - - /** - * {@inheritDoc} - * - * @return {@code sum(singletons[i] * probabilities[i])} - */ - public double getNumericalMean() { - double mean = 0; - - for (final Pair<Integer, Double> sample : innerDistribution.getPmf()) { - mean += sample.getValue() * sample.getKey(); - } - - return mean; - } - - /** - * {@inheritDoc} - * - * @return {@code sum((singletons[i] - mean) ^ 2 * probabilities[i])} - */ - public double getNumericalVariance() { - double mean = 0; - double meanOfSquares = 0; - - for (final Pair<Integer, Double> sample : innerDistribution.getPmf()) { - mean += sample.getValue() * sample.getKey(); - meanOfSquares += sample.getValue() * sample.getKey() * sample.getKey(); - } - - return meanOfSquares - mean * mean; - } - - /** - * {@inheritDoc} - * - * Returns the lowest value with non-zero probability. - * - * @return the lowest value with non-zero probability. - */ - public int getSupportLowerBound() { - int min = Integer.MAX_VALUE; - for (final Pair<Integer, Double> sample : innerDistribution.getPmf()) { - if (sample.getKey() < min && sample.getValue() > 0) { - min = sample.getKey(); - } - } - - return min; - } - - /** - * {@inheritDoc} - * - * Returns the highest value with non-zero probability. - * - * @return the highest value with non-zero probability. - */ - public int getSupportUpperBound() { - int max = Integer.MIN_VALUE; - for (final Pair<Integer, Double> sample : innerDistribution.getPmf()) { - if (sample.getKey() > max && sample.getValue() > 0) { - max = sample.getKey(); - } - } - - return max; - } - - /** - * {@inheritDoc} - * - * The support of this distribution is connected. - * - * @return {@code true} - */ - public boolean isSupportConnected() { - return true; - } - - /** - * {@inheritDoc} - */ - @Override - public int sample() { - return innerDistribution.sample(); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/ExponentialDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/ExponentialDistribution.java deleted file mode 100644 index 7c5f0afddbcc..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/ExponentialDistribution.java +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.OutOfRangeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; -import com.azure.cosmos.implementation.apachecommons.math.util.CombinatoricsUtils; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; -import com.azure.cosmos.implementation.apachecommons.math.util.ResizableDoubleArray; - -/** - * Implementation of the exponential distribution. - * - * @see <a href="http://en.wikipedia.org/wiki/Exponential_distribution">Exponential distribution (Wikipedia)</a> - * @see <a href="http://mathworld.wolfram.com/ExponentialDistribution.html">Exponential distribution (MathWorld)</a> - */ -public class ExponentialDistribution extends AbstractRealDistribution { - /** - * Default inverse cumulative probability accuracy. - * @since 2.1 - */ - public static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY = 1e-9; - /** Serializable version identifier */ - private static final long serialVersionUID = 2401296428283614780L; - /** - * Used when generating Exponential samples. - * Table containing the constants - * q_i = sum_{j=1}^i (ln 2)^j/j! = ln 2 + (ln 2)^2/2 + ... + (ln 2)^i/i! - * until the largest representable fraction below 1 is exceeded. - * - * Note that - * 1 = 2 - 1 = exp(ln 2) - 1 = sum_{n=1}^infty (ln 2)^n / n! - * thus q_i -> 1 as i -> +inf, - * so the higher i, the closer to one we get (the series is not alternating). - * - * By trying, n = 16 in Java is enough to reach 1.0. - */ - private static final double[] EXPONENTIAL_SA_QI; - /** The mean of this distribution. */ - private final double mean; - /** The logarithm of the mean, stored to reduce computing time. **/ - private final double logMean; - /** Inverse cumulative probability accuracy. */ - private final double solverAbsoluteAccuracy; - - /** - * Initialize tables. - */ - static { - /** - * Filling EXPONENTIAL_SA_QI table. - * Note that we don't want qi = 0 in the table. - */ - final double LN2 = FastMath.log(2); - double qi = 0; - int i = 1; - - /** - * ArithmeticUtils provides factorials up to 20, so let's use that - * limit together with Precision.EPSILON to generate the following - * code (a priori, we know that there will be 16 elements, but it is - * better to not hardcode it). - */ - final ResizableDoubleArray ra = new ResizableDoubleArray(20); - - while (qi < 1) { - qi += FastMath.pow(LN2, i) / CombinatoricsUtils.factorial(i); - ra.addElement(qi); - ++i; - } - - EXPONENTIAL_SA_QI = ra.getElements(); - } - - /** - * Create an exponential distribution with the given mean. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param mean mean of this distribution. - */ - public ExponentialDistribution(double mean) { - this(mean, DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Create an exponential distribution with the given mean. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param mean Mean of this distribution. - * @param inverseCumAccuracy Maximum absolute error in inverse - * cumulative probability estimates (defaults to - * {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}). - * @throws NotStrictlyPositiveException if {@code mean <= 0}. - * @since 2.1 - */ - public ExponentialDistribution(double mean, double inverseCumAccuracy) { - this(new Well19937c(), mean, inverseCumAccuracy); - } - - /** - * Creates an exponential distribution. - * - * @param rng Random number generator. - * @param mean Mean of this distribution. - * @throws NotStrictlyPositiveException if {@code mean <= 0}. - * @since 3.3 - */ - public ExponentialDistribution(RandomGenerator rng, double mean) - throws NotStrictlyPositiveException { - this(rng, mean, DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Creates an exponential distribution. - * - * @param rng Random number generator. - * @param mean Mean of this distribution. - * @param inverseCumAccuracy Maximum absolute error in inverse - * cumulative probability estimates (defaults to - * {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}). - * @throws NotStrictlyPositiveException if {@code mean <= 0}. - * @since 3.1 - */ - public ExponentialDistribution(RandomGenerator rng, - double mean, - double inverseCumAccuracy) - throws NotStrictlyPositiveException { - super(rng); - - if (mean <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.MEAN, mean); - } - this.mean = mean; - logMean = FastMath.log(mean); - solverAbsoluteAccuracy = inverseCumAccuracy; - } - - /** - * Access the mean. - * - * @return the mean. - */ - public double getMean() { - return mean; - } - - /** {@inheritDoc} */ - public double density(double x) { - final double logDensity = logDensity(x); - return logDensity == Double.NEGATIVE_INFINITY ? 0 : FastMath.exp(logDensity); - } - - /** {@inheritDoc} **/ - @Override - public double logDensity(double x) { - if (x < 0) { - return Double.NEGATIVE_INFINITY; - } - return -x / mean - logMean; - } - - /** - * {@inheritDoc} - * - * The implementation of this method is based on: - * <ul> - * <li> - * <a href="http://mathworld.wolfram.com/ExponentialDistribution.html"> - * Exponential Distribution</a>, equation (1).</li> - * </ul> - */ - public double cumulativeProbability(double x) { - double ret; - if (x <= 0.0) { - ret = 0.0; - } else { - ret = 1.0 - FastMath.exp(-x / mean); - } - return ret; - } - - /** - * {@inheritDoc} - * - * Returns {@code 0} when {@code p= = 0} and - * {@code Double.POSITIVE_INFINITY} when {@code p == 1}. - */ - @Override - public double inverseCumulativeProbability(double p) throws OutOfRangeException { - double ret; - - if (p < 0.0 || p > 1.0) { - throw new OutOfRangeException(p, 0.0, 1.0); - } else if (p == 1.0) { - ret = Double.POSITIVE_INFINITY; - } else { - ret = -mean * FastMath.log(1.0 - p); - } - - return ret; - } - - /** - * {@inheritDoc} - * - * <p><strong>Algorithm Description</strong>: this implementation uses the - * <a href="http://www.jesus.ox.ac.uk/~clifford/a5/chap1/node5.html"> - * Inversion Method</a> to generate exponentially distributed random values - * from uniform deviates.</p> - * - * @return a random value. - * @since 2.2 - */ - @Override - public double sample() { - // Step 1: - double a = 0; - double u = random.nextDouble(); - - // Step 2 and 3: - while (u < 0.5) { - a += EXPONENTIAL_SA_QI[0]; - u *= 2; - } - - // Step 4 (now u >= 0.5): - u += u - 1; - - // Step 5: - if (u <= EXPONENTIAL_SA_QI[0]) { - return mean * (a + u); - } - - // Step 6: - int i = 0; // Should be 1, be we iterate before it in while using 0 - double u2 = random.nextDouble(); - double umin = u2; - - // Step 7 and 8: - do { - ++i; - u2 = random.nextDouble(); - - if (u2 < umin) { - umin = u2; - } - - // Step 8: - } while (u > EXPONENTIAL_SA_QI[i]); // Ensured to exit since EXPONENTIAL_SA_QI[MAX] = 1 - - return mean * (a + umin * EXPONENTIAL_SA_QI[0]); - } - - /** {@inheritDoc} */ - @Override - protected double getSolverAbsoluteAccuracy() { - return solverAbsoluteAccuracy; - } - - /** - * {@inheritDoc} - * - * For mean parameter {@code k}, the mean is {@code k}. - */ - public double getNumericalMean() { - return getMean(); - } - - /** - * {@inheritDoc} - * - * For mean parameter {@code k}, the variance is {@code k^2}. - */ - public double getNumericalVariance() { - final double m = getMean(); - return m * m; - } - - /** - * {@inheritDoc} - * - * The lower bound of the support is always 0 no matter the mean parameter. - * - * @return lower bound of the support (always 0) - */ - public double getSupportLowerBound() { - return 0; - } - - /** - * {@inheritDoc} - * - * The upper bound of the support is always positive infinity - * no matter the mean parameter. - * - * @return upper bound of the support (always Double.POSITIVE_INFINITY) - */ - public double getSupportUpperBound() { - return Double.POSITIVE_INFINITY; - } - - /** {@inheritDoc} */ - public boolean isSupportLowerBoundInclusive() { - return true; - } - - /** {@inheritDoc} */ - public boolean isSupportUpperBoundInclusive() { - return false; - } - - /** - * {@inheritDoc} - * - * The support of this distribution is connected. - * - * @return {@code true} - */ - public boolean isSupportConnected() { - return true; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/FDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/FDistribution.java deleted file mode 100644 index 5eed244d6429..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/FDistribution.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; -import com.azure.cosmos.implementation.apachecommons.math.special.Beta; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** - * Implementation of the F-distribution. - * - * @see <a href="http://en.wikipedia.org/wiki/F-distribution">F-distribution (Wikipedia)</a> - * @see <a href="http://mathworld.wolfram.com/F-Distribution.html">F-distribution (MathWorld)</a> - */ -public class FDistribution extends AbstractRealDistribution { - /** - * Default inverse cumulative probability accuracy. - * @since 2.1 - */ - public static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY = 1e-9; - /** Serializable version identifier. */ - private static final long serialVersionUID = -8516354193418641566L; - /** The numerator degrees of freedom. */ - private final double numeratorDegreesOfFreedom; - /** The numerator degrees of freedom. */ - private final double denominatorDegreesOfFreedom; - /** Inverse cumulative probability accuracy. */ - private final double solverAbsoluteAccuracy; - /** Cached numerical variance */ - private double numericalVariance = Double.NaN; - /** Whether or not the numerical variance has been calculated */ - private boolean numericalVarianceIsCalculated = false; - - /** - * Creates an F distribution using the given degrees of freedom. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param numeratorDegreesOfFreedom Numerator degrees of freedom. - * @param denominatorDegreesOfFreedom Denominator degrees of freedom. - * @throws NotStrictlyPositiveException if - * {@code numeratorDegreesOfFreedom <= 0} or - * {@code denominatorDegreesOfFreedom <= 0}. - */ - public FDistribution(double numeratorDegreesOfFreedom, - double denominatorDegreesOfFreedom) - throws NotStrictlyPositiveException { - this(numeratorDegreesOfFreedom, denominatorDegreesOfFreedom, - DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Creates an F distribution using the given degrees of freedom - * and inverse cumulative probability accuracy. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param numeratorDegreesOfFreedom Numerator degrees of freedom. - * @param denominatorDegreesOfFreedom Denominator degrees of freedom. - * @param inverseCumAccuracy the maximum absolute error in inverse - * cumulative probability estimates. - * @throws NotStrictlyPositiveException if - * {@code numeratorDegreesOfFreedom <= 0} or - * {@code denominatorDegreesOfFreedom <= 0}. - * @since 2.1 - */ - public FDistribution(double numeratorDegreesOfFreedom, - double denominatorDegreesOfFreedom, - double inverseCumAccuracy) - throws NotStrictlyPositiveException { - this(new Well19937c(), numeratorDegreesOfFreedom, - denominatorDegreesOfFreedom, inverseCumAccuracy); - } - - /** - * Creates an F distribution. - * - * @param rng Random number generator. - * @param numeratorDegreesOfFreedom Numerator degrees of freedom. - * @param denominatorDegreesOfFreedom Denominator degrees of freedom. - * @throws NotStrictlyPositiveException if {@code numeratorDegreesOfFreedom <= 0} or - * {@code denominatorDegreesOfFreedom <= 0}. - * @since 3.3 - */ - public FDistribution(RandomGenerator rng, - double numeratorDegreesOfFreedom, - double denominatorDegreesOfFreedom) - throws NotStrictlyPositiveException { - this(rng, numeratorDegreesOfFreedom, denominatorDegreesOfFreedom, DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Creates an F distribution. - * - * @param rng Random number generator. - * @param numeratorDegreesOfFreedom Numerator degrees of freedom. - * @param denominatorDegreesOfFreedom Denominator degrees of freedom. - * @param inverseCumAccuracy the maximum absolute error in inverse - * cumulative probability estimates. - * @throws NotStrictlyPositiveException if {@code numeratorDegreesOfFreedom <= 0} or - * {@code denominatorDegreesOfFreedom <= 0}. - * @since 3.1 - */ - public FDistribution(RandomGenerator rng, - double numeratorDegreesOfFreedom, - double denominatorDegreesOfFreedom, - double inverseCumAccuracy) - throws NotStrictlyPositiveException { - super(rng); - - if (numeratorDegreesOfFreedom <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.DEGREES_OF_FREEDOM, - numeratorDegreesOfFreedom); - } - if (denominatorDegreesOfFreedom <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.DEGREES_OF_FREEDOM, - denominatorDegreesOfFreedom); - } - this.numeratorDegreesOfFreedom = numeratorDegreesOfFreedom; - this.denominatorDegreesOfFreedom = denominatorDegreesOfFreedom; - solverAbsoluteAccuracy = inverseCumAccuracy; - } - - /** - * {@inheritDoc} - * - * @since 2.1 - */ - public double density(double x) { - return FastMath.exp(logDensity(x)); - } - - /** {@inheritDoc} **/ - @Override - public double logDensity(double x) { - final double nhalf = numeratorDegreesOfFreedom / 2; - final double mhalf = denominatorDegreesOfFreedom / 2; - final double logx = FastMath.log(x); - final double logn = FastMath.log(numeratorDegreesOfFreedom); - final double logm = FastMath.log(denominatorDegreesOfFreedom); - final double lognxm = FastMath.log(numeratorDegreesOfFreedom * x + - denominatorDegreesOfFreedom); - return nhalf * logn + nhalf * logx - logx + - mhalf * logm - nhalf * lognxm - mhalf * lognxm - - Beta.logBeta(nhalf, mhalf); - } - - /** - * {@inheritDoc} - * - * The implementation of this method is based on - * <ul> - * <li> - * <a href="http://mathworld.wolfram.com/F-Distribution.html"> - * F-Distribution</a>, equation (4). - * </li> - * </ul> - */ - public double cumulativeProbability(double x) { - double ret; - if (x <= 0) { - ret = 0; - } else { - double n = numeratorDegreesOfFreedom; - double m = denominatorDegreesOfFreedom; - - ret = Beta.regularizedBeta((n * x) / (m + n * x), - 0.5 * n, - 0.5 * m); - } - return ret; - } - - /** - * Access the numerator degrees of freedom. - * - * @return the numerator degrees of freedom. - */ - public double getNumeratorDegreesOfFreedom() { - return numeratorDegreesOfFreedom; - } - - /** - * Access the denominator degrees of freedom. - * - * @return the denominator degrees of freedom. - */ - public double getDenominatorDegreesOfFreedom() { - return denominatorDegreesOfFreedom; - } - - /** {@inheritDoc} */ - @Override - protected double getSolverAbsoluteAccuracy() { - return solverAbsoluteAccuracy; - } - - /** - * {@inheritDoc} - * - * For denominator degrees of freedom parameter {@code b}, the mean is - * <ul> - * <li>if {@code b > 2} then {@code b / (b - 2)},</li> - * <li>else undefined ({@code Double.NaN}). - * </ul> - */ - public double getNumericalMean() { - final double denominatorDF = getDenominatorDegreesOfFreedom(); - - if (denominatorDF > 2) { - return denominatorDF / (denominatorDF - 2); - } - - return Double.NaN; - } - - /** - * {@inheritDoc} - * - * For numerator degrees of freedom parameter {@code a} and denominator - * degrees of freedom parameter {@code b}, the variance is - * <ul> - * <li> - * if {@code b > 4} then - * {@code [2 * b^2 * (a + b - 2)] / [a * (b - 2)^2 * (b - 4)]}, - * </li> - * <li>else undefined ({@code Double.NaN}). - * </ul> - */ - public double getNumericalVariance() { - if (!numericalVarianceIsCalculated) { - numericalVariance = calculateNumericalVariance(); - numericalVarianceIsCalculated = true; - } - return numericalVariance; - } - - /** - * used by {@link #getNumericalVariance()} - * - * @return the variance of this distribution - */ - protected double calculateNumericalVariance() { - final double denominatorDF = getDenominatorDegreesOfFreedom(); - - if (denominatorDF > 4) { - final double numeratorDF = getNumeratorDegreesOfFreedom(); - final double denomDFMinusTwo = denominatorDF - 2; - - return ( 2 * (denominatorDF * denominatorDF) * (numeratorDF + denominatorDF - 2) ) / - ( (numeratorDF * (denomDFMinusTwo * denomDFMinusTwo) * (denominatorDF - 4)) ); - } - - return Double.NaN; - } - - /** - * {@inheritDoc} - * - * The lower bound of the support is always 0 no matter the parameters. - * - * @return lower bound of the support (always 0) - */ - public double getSupportLowerBound() { - return 0; - } - - /** - * {@inheritDoc} - * - * The upper bound of the support is always positive infinity - * no matter the parameters. - * - * @return upper bound of the support (always Double.POSITIVE_INFINITY) - */ - public double getSupportUpperBound() { - return Double.POSITIVE_INFINITY; - } - - /** {@inheritDoc} */ - public boolean isSupportLowerBoundInclusive() { - return false; - } - - /** {@inheritDoc} */ - public boolean isSupportUpperBoundInclusive() { - return false; - } - - /** - * {@inheritDoc} - * - * The support of this distribution is connected. - * - * @return {@code true} - */ - public boolean isSupportConnected() { - return true; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/GammaDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/GammaDistribution.java deleted file mode 100644 index de3039d3f233..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/GammaDistribution.java +++ /dev/null @@ -1,517 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; -import com.azure.cosmos.implementation.apachecommons.math.special.Gamma; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** - * Implementation of the Gamma distribution. - * - * @see <a href="http://en.wikipedia.org/wiki/Gamma_distribution">Gamma distribution (Wikipedia)</a> - * @see <a href="http://mathworld.wolfram.com/GammaDistribution.html">Gamma distribution (MathWorld)</a> - */ -public class GammaDistribution extends AbstractRealDistribution { - /** - * Default inverse cumulative probability accuracy. - * @since 2.1 - */ - public static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY = 1e-9; - /** Serializable version identifier. */ - private static final long serialVersionUID = 20120524L; - /** The shape parameter. */ - private final double shape; - /** The scale parameter. */ - private final double scale; - /** - * The constant value of {@code shape + g + 0.5}, where {@code g} is the - * Lanczos constant {@link Gamma#LANCZOS_G}. - */ - private final double shiftedShape; - /** - * The constant value of - * {@code shape / scale * sqrt(e / (2 * pi * (shape + g + 0.5))) / L(shape)}, - * where {@code L(shape)} is the Lanczos approximation returned by - * {@link Gamma#lanczos(double)}. This prefactor is used in - * {@link #density(double)}, when no overflow occurs with the natural - * calculation. - */ - private final double densityPrefactor1; - /** - * The constant value of - * {@code log(shape / scale * sqrt(e / (2 * pi * (shape + g + 0.5))) / L(shape))}, - * where {@code L(shape)} is the Lanczos approximation returned by - * {@link Gamma#lanczos(double)}. This prefactor is used in - * {@link #logDensity(double)}, when no overflow occurs with the natural - * calculation. - */ - private final double logDensityPrefactor1; - /** - * The constant value of - * {@code shape * sqrt(e / (2 * pi * (shape + g + 0.5))) / L(shape)}, - * where {@code L(shape)} is the Lanczos approximation returned by - * {@link Gamma#lanczos(double)}. This prefactor is used in - * {@link #density(double)}, when overflow occurs with the natural - * calculation. - */ - private final double densityPrefactor2; - /** - * The constant value of - * {@code log(shape * sqrt(e / (2 * pi * (shape + g + 0.5))) / L(shape))}, - * where {@code L(shape)} is the Lanczos approximation returned by - * {@link Gamma#lanczos(double)}. This prefactor is used in - * {@link #logDensity(double)}, when overflow occurs with the natural - * calculation. - */ - private final double logDensityPrefactor2; - /** - * Lower bound on {@code y = x / scale} for the selection of the computation - * method in {@link #density(double)}. For {@code y <= minY}, the natural - * calculation overflows. - */ - private final double minY; - /** - * Upper bound on {@code log(y)} ({@code y = x / scale}) for the selection - * of the computation method in {@link #density(double)}. For - * {@code log(y) >= maxLogY}, the natural calculation overflows. - */ - private final double maxLogY; - /** Inverse cumulative probability accuracy. */ - private final double solverAbsoluteAccuracy; - - /** - * Creates a new gamma distribution with specified values of the shape and - * scale parameters. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param shape the shape parameter - * @param scale the scale parameter - * @throws NotStrictlyPositiveException if {@code shape <= 0} or - * {@code scale <= 0}. - */ - public GammaDistribution(double shape, double scale) throws NotStrictlyPositiveException { - this(shape, scale, DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Creates a new gamma distribution with specified values of the shape and - * scale parameters. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param shape the shape parameter - * @param scale the scale parameter - * @param inverseCumAccuracy the maximum absolute error in inverse - * cumulative probability estimates (defaults to - * {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}). - * @throws NotStrictlyPositiveException if {@code shape <= 0} or - * {@code scale <= 0}. - * @since 2.1 - */ - public GammaDistribution(double shape, double scale, double inverseCumAccuracy) - throws NotStrictlyPositiveException { - this(new Well19937c(), shape, scale, inverseCumAccuracy); - } - - /** - * Creates a Gamma distribution. - * - * @param rng Random number generator. - * @param shape the shape parameter - * @param scale the scale parameter - * @throws NotStrictlyPositiveException if {@code shape <= 0} or - * {@code scale <= 0}. - * @since 3.3 - */ - public GammaDistribution(RandomGenerator rng, double shape, double scale) - throws NotStrictlyPositiveException { - this(rng, shape, scale, DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Creates a Gamma distribution. - * - * @param rng Random number generator. - * @param shape the shape parameter - * @param scale the scale parameter - * @param inverseCumAccuracy the maximum absolute error in inverse - * cumulative probability estimates (defaults to - * {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}). - * @throws NotStrictlyPositiveException if {@code shape <= 0} or - * {@code scale <= 0}. - * @since 3.1 - */ - public GammaDistribution(RandomGenerator rng, - double shape, - double scale, - double inverseCumAccuracy) - throws NotStrictlyPositiveException { - super(rng); - - if (shape <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.SHAPE, shape); - } - if (scale <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.SCALE, scale); - } - - this.shape = shape; - this.scale = scale; - this.solverAbsoluteAccuracy = inverseCumAccuracy; - this.shiftedShape = shape + Gamma.LANCZOS_G + 0.5; - final double aux = FastMath.E / (2.0 * FastMath.PI * shiftedShape); - this.densityPrefactor2 = shape * FastMath.sqrt(aux) / Gamma.lanczos(shape); - this.logDensityPrefactor2 = FastMath.log(shape) + 0.5 * FastMath.log(aux) - - FastMath.log(Gamma.lanczos(shape)); - this.densityPrefactor1 = this.densityPrefactor2 / scale * - FastMath.pow(shiftedShape, -shape) * - FastMath.exp(shape + Gamma.LANCZOS_G); - this.logDensityPrefactor1 = this.logDensityPrefactor2 - FastMath.log(scale) - - FastMath.log(shiftedShape) * shape + - shape + Gamma.LANCZOS_G; - this.minY = shape + Gamma.LANCZOS_G - FastMath.log(Double.MAX_VALUE); - this.maxLogY = FastMath.log(Double.MAX_VALUE) / (shape - 1.0); - } - - /** - * Returns the shape parameter of {@code this} distribution. - * - * @return the shape parameter - * @deprecated as of version 3.1, {@link #getShape()} should be preferred. - * This method will be removed in version 4.0. - */ - @Deprecated - public double getAlpha() { - return shape; - } - - /** - * Returns the shape parameter of {@code this} distribution. - * - * @return the shape parameter - * @since 3.1 - */ - public double getShape() { - return shape; - } - - /** - * Returns the scale parameter of {@code this} distribution. - * - * @return the scale parameter - * @deprecated as of version 3.1, {@link #getScale()} should be preferred. - * This method will be removed in version 4.0. - */ - @Deprecated - public double getBeta() { - return scale; - } - - /** - * Returns the scale parameter of {@code this} distribution. - * - * @return the scale parameter - * @since 3.1 - */ - public double getScale() { - return scale; - } - - /** {@inheritDoc} */ - public double density(double x) { - /* The present method must return the value of - * - * 1 x a - x - * ---------- (-) exp(---) - * x Gamma(a) b b - * - * where a is the shape parameter, and b the scale parameter. - * Substituting the Lanczos approximation of Gamma(a) leads to the - * following expression of the density - * - * a e 1 y a - * - sqrt(------------------) ---- (-----------) exp(a - y + g), - * x 2 pi (a + g + 0.5) L(a) a + g + 0.5 - * - * where y = x / b. The above formula is the "natural" computation, which - * is implemented when no overflow is likely to occur. If overflow occurs - * with the natural computation, the following identity is used. It is - * based on the BOOST library - * http://www.boost.org/doc/libs/1_35_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma.html - * Formula (15) needs adaptations, which are detailed below. - * - * y a - * (-----------) exp(a - y + g) - * a + g + 0.5 - * y - a - g - 0.5 y (g + 0.5) - * = exp(a log1pm(---------------) - ----------- + g), - * a + g + 0.5 a + g + 0.5 - * - * where log1pm(z) = log(1 + z) - z. Therefore, the value to be - * returned is - * - * a e 1 - * - sqrt(------------------) ---- - * x 2 pi (a + g + 0.5) L(a) - * y - a - g - 0.5 y (g + 0.5) - * * exp(a log1pm(---------------) - ----------- + g). - * a + g + 0.5 a + g + 0.5 - */ - if (x < 0) { - return 0; - } - final double y = x / scale; - if ((y <= minY) || (FastMath.log(y) >= maxLogY)) { - /* - * Overflow. - */ - final double aux1 = (y - shiftedShape) / shiftedShape; - final double aux2 = shape * (FastMath.log1p(aux1) - aux1); - final double aux3 = -y * (Gamma.LANCZOS_G + 0.5) / shiftedShape + - Gamma.LANCZOS_G + aux2; - return densityPrefactor2 / x * FastMath.exp(aux3); - } - /* - * Natural calculation. - */ - return densityPrefactor1 * FastMath.exp(-y) * FastMath.pow(y, shape - 1); - } - - /** {@inheritDoc} **/ - @Override - public double logDensity(double x) { - /* - * see the comment in {@link #density(double)} for computation details - */ - if (x < 0) { - return Double.NEGATIVE_INFINITY; - } - final double y = x / scale; - if ((y <= minY) || (FastMath.log(y) >= maxLogY)) { - /* - * Overflow. - */ - final double aux1 = (y - shiftedShape) / shiftedShape; - final double aux2 = shape * (FastMath.log1p(aux1) - aux1); - final double aux3 = -y * (Gamma.LANCZOS_G + 0.5) / shiftedShape + - Gamma.LANCZOS_G + aux2; - return logDensityPrefactor2 - FastMath.log(x) + aux3; - } - /* - * Natural calculation. - */ - return logDensityPrefactor1 - y + FastMath.log(y) * (shape - 1); - } - - /** - * {@inheritDoc} - * - * The implementation of this method is based on: - * <ul> - * <li> - * <a href="http://mathworld.wolfram.com/Chi-SquaredDistribution.html"> - * Chi-Squared Distribution</a>, equation (9). - * </li> - * <li>Casella, G., & Berger, R. (1990). <i>Statistical Inference</i>. - * Belmont, CA: Duxbury Press. - * </li> - * </ul> - */ - public double cumulativeProbability(double x) { - double ret; - - if (x <= 0) { - ret = 0; - } else { - ret = Gamma.regularizedGammaP(shape, x / scale); - } - - return ret; - } - - /** {@inheritDoc} */ - @Override - protected double getSolverAbsoluteAccuracy() { - return solverAbsoluteAccuracy; - } - - /** - * {@inheritDoc} - * - * For shape parameter {@code alpha} and scale parameter {@code beta}, the - * mean is {@code alpha * beta}. - */ - public double getNumericalMean() { - return shape * scale; - } - - /** - * {@inheritDoc} - * - * For shape parameter {@code alpha} and scale parameter {@code beta}, the - * variance is {@code alpha * beta^2}. - * - * @return {@inheritDoc} - */ - public double getNumericalVariance() { - return shape * scale * scale; - } - - /** - * {@inheritDoc} - * - * The lower bound of the support is always 0 no matter the parameters. - * - * @return lower bound of the support (always 0) - */ - public double getSupportLowerBound() { - return 0; - } - - /** - * {@inheritDoc} - * - * The upper bound of the support is always positive infinity - * no matter the parameters. - * - * @return upper bound of the support (always Double.POSITIVE_INFINITY) - */ - public double getSupportUpperBound() { - return Double.POSITIVE_INFINITY; - } - - /** {@inheritDoc} */ - public boolean isSupportLowerBoundInclusive() { - return true; - } - - /** {@inheritDoc} */ - public boolean isSupportUpperBoundInclusive() { - return false; - } - - /** - * {@inheritDoc} - * - * The support of this distribution is connected. - * - * @return {@code true} - */ - public boolean isSupportConnected() { - return true; - } - - /** - * <p>This implementation uses the following algorithms: </p> - * - * <p>For 0 < shape < 1: <br/> - * Ahrens, J. H. and Dieter, U., <i>Computer methods for - * sampling from gamma, beta, Poisson and binomial distributions.</i> - * Computing, 12, 223-246, 1974.</p> - * - * <p>For shape >= 1: <br/> - * Marsaglia and Tsang, <i>A Simple Method for Generating - * Gamma Variables.</i> ACM Transactions on Mathematical Software, - * Volume 26 Issue 3, September, 2000.</p> - * - * @return random value sampled from the Gamma(shape, scale) distribution - */ - @Override - public double sample() { - if (shape < 1) { - // [1]: p. 228, Algorithm GS - - while (true) { - // Step 1: - final double u = random.nextDouble(); - final double bGS = 1 + shape / FastMath.E; - final double p = bGS * u; - - if (p <= 1) { - // Step 2: - - final double x = FastMath.pow(p, 1 / shape); - final double u2 = random.nextDouble(); - - if (u2 > FastMath.exp(-x)) { - // Reject - continue; - } else { - return scale * x; - } - } else { - // Step 3: - - final double x = -1 * FastMath.log((bGS - p) / shape); - final double u2 = random.nextDouble(); - - if (u2 > FastMath.pow(x, shape - 1)) { - // Reject - continue; - } else { - return scale * x; - } - } - } - } - - // Now shape >= 1 - - final double d = shape - 0.333333333333333333; - final double c = 1 / (3 * FastMath.sqrt(d)); - - while (true) { - final double x = random.nextGaussian(); - final double v = (1 + c * x) * (1 + c * x) * (1 + c * x); - - if (v <= 0) { - continue; - } - - final double x2 = x * x; - final double u = random.nextDouble(); - - // Squeeze - if (u < 1 - 0.0331 * x2 * x2) { - return scale * d * v; - } - - if (FastMath.log(u) < 0.5 * x2 + d * (1 - v + FastMath.log(v))) { - return scale * d * v; - } - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/HypergeometricDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/HypergeometricDistribution.java deleted file mode 100644 index 3d20885c9cb9..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/HypergeometricDistribution.java +++ /dev/null @@ -1,351 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NotPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** - * Implementation of the hypergeometric distribution. - * - * @see <a href="http://en.wikipedia.org/wiki/Hypergeometric_distribution">Hypergeometric distribution (Wikipedia)</a> - * @see <a href="http://mathworld.wolfram.com/HypergeometricDistribution.html">Hypergeometric distribution (MathWorld)</a> - */ -public class HypergeometricDistribution extends AbstractIntegerDistribution { - /** Serializable version identifier. */ - private static final long serialVersionUID = -436928820673516179L; - /** The number of successes in the population. */ - private final int numberOfSuccesses; - /** The population size. */ - private final int populationSize; - /** The sample size. */ - private final int sampleSize; - /** Cached numerical variance */ - private double numericalVariance = Double.NaN; - /** Whether or not the numerical variance has been calculated */ - private boolean numericalVarianceIsCalculated = false; - - /** - * Construct a new hypergeometric distribution with the specified population - * size, number of successes in the population, and sample size. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param populationSize Population size. - * @param numberOfSuccesses Number of successes in the population. - * @param sampleSize Sample size. - * @throws NotPositiveException if {@code numberOfSuccesses < 0}. - * @throws NotStrictlyPositiveException if {@code populationSize <= 0}. - * @throws NumberIsTooLargeException if {@code numberOfSuccesses > populationSize}, - * or {@code sampleSize > populationSize}. - */ - public HypergeometricDistribution(int populationSize, int numberOfSuccesses, int sampleSize) - throws NotPositiveException, NotStrictlyPositiveException, NumberIsTooLargeException { - this(new Well19937c(), populationSize, numberOfSuccesses, sampleSize); - } - - /** - * Creates a new hypergeometric distribution. - * - * @param rng Random number generator. - * @param populationSize Population size. - * @param numberOfSuccesses Number of successes in the population. - * @param sampleSize Sample size. - * @throws NotPositiveException if {@code numberOfSuccesses < 0}. - * @throws NotStrictlyPositiveException if {@code populationSize <= 0}. - * @throws NumberIsTooLargeException if {@code numberOfSuccesses > populationSize}, - * or {@code sampleSize > populationSize}. - * @since 3.1 - */ - public HypergeometricDistribution(RandomGenerator rng, - int populationSize, - int numberOfSuccesses, - int sampleSize) - throws NotPositiveException, NotStrictlyPositiveException, NumberIsTooLargeException { - super(rng); - - if (populationSize <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.POPULATION_SIZE, - populationSize); - } - if (numberOfSuccesses < 0) { - throw new NotPositiveException(LocalizedFormats.NUMBER_OF_SUCCESSES, - numberOfSuccesses); - } - if (sampleSize < 0) { - throw new NotPositiveException(LocalizedFormats.NUMBER_OF_SAMPLES, - sampleSize); - } - - if (numberOfSuccesses > populationSize) { - throw new NumberIsTooLargeException(LocalizedFormats.NUMBER_OF_SUCCESS_LARGER_THAN_POPULATION_SIZE, - numberOfSuccesses, populationSize, true); - } - if (sampleSize > populationSize) { - throw new NumberIsTooLargeException(LocalizedFormats.SAMPLE_SIZE_LARGER_THAN_POPULATION_SIZE, - sampleSize, populationSize, true); - } - - this.numberOfSuccesses = numberOfSuccesses; - this.populationSize = populationSize; - this.sampleSize = sampleSize; - } - - /** {@inheritDoc} */ - public double cumulativeProbability(int x) { - double ret; - - int[] domain = getDomain(populationSize, numberOfSuccesses, sampleSize); - if (x < domain[0]) { - ret = 0.0; - } else if (x >= domain[1]) { - ret = 1.0; - } else { - ret = innerCumulativeProbability(domain[0], x, 1); - } - - return ret; - } - - /** - * Return the domain for the given hypergeometric distribution parameters. - * - * @param n Population size. - * @param m Number of successes in the population. - * @param k Sample size. - * @return a two element array containing the lower and upper bounds of the - * hypergeometric distribution. - */ - private int[] getDomain(int n, int m, int k) { - return new int[] { getLowerDomain(n, m, k), getUpperDomain(m, k) }; - } - - /** - * Return the lowest domain value for the given hypergeometric distribution - * parameters. - * - * @param n Population size. - * @param m Number of successes in the population. - * @param k Sample size. - * @return the lowest domain value of the hypergeometric distribution. - */ - private int getLowerDomain(int n, int m, int k) { - return FastMath.max(0, m - (n - k)); - } - - /** - * Access the number of successes. - * - * @return the number of successes. - */ - public int getNumberOfSuccesses() { - return numberOfSuccesses; - } - - /** - * Access the population size. - * - * @return the population size. - */ - public int getPopulationSize() { - return populationSize; - } - - /** - * Access the sample size. - * - * @return the sample size. - */ - public int getSampleSize() { - return sampleSize; - } - - /** - * Return the highest domain value for the given hypergeometric distribution - * parameters. - * - * @param m Number of successes in the population. - * @param k Sample size. - * @return the highest domain value of the hypergeometric distribution. - */ - private int getUpperDomain(int m, int k) { - return FastMath.min(k, m); - } - - /** {@inheritDoc} */ - public double probability(int x) { - final double logProbability = logProbability(x); - return logProbability == Double.NEGATIVE_INFINITY ? 0 : FastMath.exp(logProbability); - } - - /** {@inheritDoc} */ - @Override - public double logProbability(int x) { - double ret; - - int[] domain = getDomain(populationSize, numberOfSuccesses, sampleSize); - if (x < domain[0] || x > domain[1]) { - ret = Double.NEGATIVE_INFINITY; - } else { - double p = (double) sampleSize / (double) populationSize; - double q = (double) (populationSize - sampleSize) / (double) populationSize; - double p1 = SaddlePointExpansion.logBinomialProbability(x, - numberOfSuccesses, p, q); - double p2 = - SaddlePointExpansion.logBinomialProbability(sampleSize - x, - populationSize - numberOfSuccesses, p, q); - double p3 = - SaddlePointExpansion.logBinomialProbability(sampleSize, populationSize, p, q); - ret = p1 + p2 - p3; - } - - return ret; - } - - /** - * For this distribution, {@code X}, this method returns {@code P(X >= x)}. - * - * @param x Value at which the CDF is evaluated. - * @return the upper tail CDF for this distribution. - * @since 1.1 - */ - public double upperCumulativeProbability(int x) { - double ret; - - final int[] domain = getDomain(populationSize, numberOfSuccesses, sampleSize); - if (x <= domain[0]) { - ret = 1.0; - } else if (x > domain[1]) { - ret = 0.0; - } else { - ret = innerCumulativeProbability(domain[1], x, -1); - } - - return ret; - } - - /** - * For this distribution, {@code X}, this method returns - * {@code P(x0 <= X <= x1)}. - * This probability is computed by summing the point probabilities for the - * values {@code x0, x0 + 1, x0 + 2, ..., x1}, in the order directed by - * {@code dx}. - * - * @param x0 Inclusive lower bound. - * @param x1 Inclusive upper bound. - * @param dx Direction of summation (1 indicates summing from x0 to x1, and - * 0 indicates summing from x1 to x0). - * @return {@code P(x0 <= X <= x1)}. - */ - private double innerCumulativeProbability(int x0, int x1, int dx) { - double ret = probability(x0); - while (x0 != x1) { - x0 += dx; - ret += probability(x0); - } - return ret; - } - - /** - * {@inheritDoc} - * - * For population size {@code N}, number of successes {@code m}, and sample - * size {@code n}, the mean is {@code n * m / N}. - */ - public double getNumericalMean() { - return getSampleSize() * (getNumberOfSuccesses() / (double) getPopulationSize()); - } - - /** - * {@inheritDoc} - * - * For population size {@code N}, number of successes {@code m}, and sample - * size {@code n}, the variance is - * {@code [n * m * (N - n) * (N - m)] / [N^2 * (N - 1)]}. - */ - public double getNumericalVariance() { - if (!numericalVarianceIsCalculated) { - numericalVariance = calculateNumericalVariance(); - numericalVarianceIsCalculated = true; - } - return numericalVariance; - } - - /** - * Used by {@link #getNumericalVariance()}. - * - * @return the variance of this distribution - */ - protected double calculateNumericalVariance() { - final double N = getPopulationSize(); - final double m = getNumberOfSuccesses(); - final double n = getSampleSize(); - return (n * m * (N - n) * (N - m)) / (N * N * (N - 1)); - } - - /** - * {@inheritDoc} - * - * For population size {@code N}, number of successes {@code m}, and sample - * size {@code n}, the lower bound of the support is - * {@code max(0, n + m - N)}. - * - * @return lower bound of the support - */ - public int getSupportLowerBound() { - return FastMath.max(0, - getSampleSize() + getNumberOfSuccesses() - getPopulationSize()); - } - - /** - * {@inheritDoc} - * - * For number of successes {@code m} and sample size {@code n}, the upper - * bound of the support is {@code min(m, n)}. - * - * @return upper bound of the support - */ - public int getSupportUpperBound() { - return FastMath.min(getNumberOfSuccesses(), getSampleSize()); - } - - /** - * {@inheritDoc} - * - * The support of this distribution is connected. - * - * @return {@code true} - */ - public boolean isSupportConnected() { - return true; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/IntegerDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/IntegerDistribution.java deleted file mode 100644 index 6699204c4aa9..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/IntegerDistribution.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.OutOfRangeException; - -/** - * Interface for distributions on the integers. - * - */ -public interface IntegerDistribution { - /** - * For a random variable {@code X} whose values are distributed according - * to this distribution, this method returns {@code P(X = x)}. In other - * words, this method represents the probability mass function (PMF) - * for the distribution. - * - * @param x the point at which the PMF is evaluated - * @return the value of the probability mass function at {@code x} - */ - double probability(int x); - - /** - * For a random variable {@code X} whose values are distributed according - * to this distribution, this method returns {@code P(X <= x)}. In other - * words, this method represents the (cumulative) distribution function - * (CDF) for this distribution. - * - * @param x the point at which the CDF is evaluated - * @return the probability that a random variable with this - * distribution takes a value less than or equal to {@code x} - */ - double cumulativeProbability(int x); - - /** - * For a random variable {@code X} whose values are distributed according - * to this distribution, this method returns {@code P(x0 < X <= x1)}. - * - * @param x0 the exclusive lower bound - * @param x1 the inclusive upper bound - * @return the probability that a random variable with this distribution - * will take a value between {@code x0} and {@code x1}, - * excluding the lower and including the upper endpoint - * @throws NumberIsTooLargeException if {@code x0 > x1} - */ - double cumulativeProbability(int x0, int x1) throws NumberIsTooLargeException; - - /** - * Computes the quantile function of this distribution. - * For a random variable {@code X} distributed according to this distribution, - * the returned value is - * <ul> - * <li><code>inf{x in Z | P(X<=x) >= p}</code> for {@code 0 < p <= 1},</li> - * <li><code>inf{x in Z | P(X<=x) > 0}</code> for {@code p = 0}.</li> - * </ul> - * If the result exceeds the range of the data type {@code int}, - * then {@code Integer.MIN_VALUE} or {@code Integer.MAX_VALUE} is returned. - * - * @param p the cumulative probability - * @return the smallest {@code p}-quantile of this distribution - * (largest 0-quantile for {@code p = 0}) - * @throws OutOfRangeException if {@code p < 0} or {@code p > 1} - */ - int inverseCumulativeProbability(double p) throws OutOfRangeException; - - /** - * Use this method to get the numerical value of the mean of this - * distribution. - * - * @return the mean or {@code Double.NaN} if it is not defined - */ - double getNumericalMean(); - - /** - * Use this method to get the numerical value of the variance of this - * distribution. - * - * @return the variance (possibly {@code Double.POSITIVE_INFINITY} or - * {@code Double.NaN} if it is not defined) - */ - double getNumericalVariance(); - - /** - * Access the lower bound of the support. This method must return the same - * value as {@code inverseCumulativeProbability(0)}. In other words, this - * method must return - * <p><code>inf {x in Z | P(X <= x) > 0}</code>.</p> - * - * @return lower bound of the support ({@code Integer.MIN_VALUE} - * for negative infinity) - */ - int getSupportLowerBound(); - - /** - * Access the upper bound of the support. This method must return the same - * value as {@code inverseCumulativeProbability(1)}. In other words, this - * method must return - * <p><code>inf {x in R | P(X <= x) = 1}</code>.</p> - * - * @return upper bound of the support ({@code Integer.MAX_VALUE} - * for positive infinity) - */ - int getSupportUpperBound(); - - /** - * Use this method to get information about whether the support is - * connected, i.e. whether all integers between the lower and upper bound of - * the support are included in the support. - * - * @return whether the support is connected or not - */ - boolean isSupportConnected(); - - /** - * Reseed the random generator used to generate samples. - * - * @param seed the new seed - * @since 3.0 - */ - void reseedRandomGenerator(long seed); - - /** - * Generate a random value sampled from this distribution. - * - * @return a random value - * @since 3.0 - */ - int sample(); - - /** - * Generate a random sample from the distribution. - * - * @param sampleSize the number of random values to generate - * @return an array representing the random sample - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException - * if {@code sampleSize} is not positive - * @since 3.0 - */ - int[] sample(int sampleSize); -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/NormalDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/NormalDistribution.java deleted file mode 100644 index 537d01d7ceb6..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/NormalDistribution.java +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.OutOfRangeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; -import com.azure.cosmos.implementation.apachecommons.math.special.Erf; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** - * Implementation of the normal (gaussian) distribution. - * - * @see <a href="http://en.wikipedia.org/wiki/Normal_distribution">Normal distribution (Wikipedia)</a> - * @see <a href="http://mathworld.wolfram.com/NormalDistribution.html">Normal distribution (MathWorld)</a> - */ -public class NormalDistribution extends AbstractRealDistribution { - /** - * Default inverse cumulative probability accuracy. - * @since 2.1 - */ - public static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY = 1e-9; - /** Serializable version identifier. */ - private static final long serialVersionUID = 8589540077390120676L; - /** √(2) */ - private static final double SQRT2 = FastMath.sqrt(2.0); - /** Mean of this distribution. */ - private final double mean; - /** Standard deviation of this distribution. */ - private final double standardDeviation; - /** The value of {@code log(sd) + 0.5*log(2*pi)} stored for faster computation. */ - private final double logStandardDeviationPlusHalfLog2Pi; - /** Inverse cumulative probability accuracy. */ - private final double solverAbsoluteAccuracy; - - /** - * Create a normal distribution with mean equal to zero and standard - * deviation equal to one. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - */ - public NormalDistribution() { - this(0, 1); - } - - /** - * Create a normal distribution using the given mean and standard deviation. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param mean Mean for this distribution. - * @param sd Standard deviation for this distribution. - * @throws NotStrictlyPositiveException if {@code sd <= 0}. - */ - public NormalDistribution(double mean, double sd) - throws NotStrictlyPositiveException { - this(mean, sd, DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Create a normal distribution using the given mean, standard deviation and - * inverse cumulative distribution accuracy. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param mean Mean for this distribution. - * @param sd Standard deviation for this distribution. - * @param inverseCumAccuracy Inverse cumulative probability accuracy. - * @throws NotStrictlyPositiveException if {@code sd <= 0}. - * @since 2.1 - */ - public NormalDistribution(double mean, double sd, double inverseCumAccuracy) - throws NotStrictlyPositiveException { - this(new Well19937c(), mean, sd, inverseCumAccuracy); - } - - /** - * Creates a normal distribution. - * - * @param rng Random number generator. - * @param mean Mean for this distribution. - * @param sd Standard deviation for this distribution. - * @throws NotStrictlyPositiveException if {@code sd <= 0}. - * @since 3.3 - */ - public NormalDistribution(RandomGenerator rng, double mean, double sd) - throws NotStrictlyPositiveException { - this(rng, mean, sd, DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Creates a normal distribution. - * - * @param rng Random number generator. - * @param mean Mean for this distribution. - * @param sd Standard deviation for this distribution. - * @param inverseCumAccuracy Inverse cumulative probability accuracy. - * @throws NotStrictlyPositiveException if {@code sd <= 0}. - * @since 3.1 - */ - public NormalDistribution(RandomGenerator rng, - double mean, - double sd, - double inverseCumAccuracy) - throws NotStrictlyPositiveException { - super(rng); - - if (sd <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sd); - } - - this.mean = mean; - standardDeviation = sd; - logStandardDeviationPlusHalfLog2Pi = FastMath.log(sd) + 0.5 * FastMath.log(2 * FastMath.PI); - solverAbsoluteAccuracy = inverseCumAccuracy; - } - - /** - * Access the mean. - * - * @return the mean for this distribution. - */ - public double getMean() { - return mean; - } - - /** - * Access the standard deviation. - * - * @return the standard deviation for this distribution. - */ - public double getStandardDeviation() { - return standardDeviation; - } - - /** {@inheritDoc} */ - public double density(double x) { - return FastMath.exp(logDensity(x)); - } - - /** {@inheritDoc} */ - @Override - public double logDensity(double x) { - final double x0 = x - mean; - final double x1 = x0 / standardDeviation; - return -0.5 * x1 * x1 - logStandardDeviationPlusHalfLog2Pi; - } - - /** - * {@inheritDoc} - * - * If {@code x} is more than 40 standard deviations from the mean, 0 or 1 - * is returned, as in these cases the actual value is within - * {@code Double.MIN_VALUE} of 0 or 1. - */ - public double cumulativeProbability(double x) { - final double dev = x - mean; - if (FastMath.abs(dev) > 40 * standardDeviation) { - return dev < 0 ? 0.0d : 1.0d; - } - return 0.5 * Erf.erfc(-dev / (standardDeviation * SQRT2)); - } - - /** {@inheritDoc} - * @since 3.2 - */ - @Override - public double inverseCumulativeProbability(final double p) throws OutOfRangeException { - if (p < 0.0 || p > 1.0) { - throw new OutOfRangeException(p, 0, 1); - } - return mean + standardDeviation * SQRT2 * Erf.erfInv(2 * p - 1); - } - - /** - * {@inheritDoc} - * - * @deprecated See {@link RealDistribution#cumulativeProbability(double,double)} - */ - @Override@Deprecated - public double cumulativeProbability(double x0, double x1) - throws NumberIsTooLargeException { - return probability(x0, x1); - } - - /** {@inheritDoc} */ - @Override - public double probability(double x0, - double x1) - throws NumberIsTooLargeException { - if (x0 > x1) { - throw new NumberIsTooLargeException(LocalizedFormats.LOWER_ENDPOINT_ABOVE_UPPER_ENDPOINT, - x0, x1, true); - } - final double denom = standardDeviation * SQRT2; - final double v0 = (x0 - mean) / denom; - final double v1 = (x1 - mean) / denom; - return 0.5 * Erf.erf(v0, v1); - } - - /** {@inheritDoc} */ - @Override - protected double getSolverAbsoluteAccuracy() { - return solverAbsoluteAccuracy; - } - - /** - * {@inheritDoc} - * - * For mean parameter {@code mu}, the mean is {@code mu}. - */ - public double getNumericalMean() { - return getMean(); - } - - /** - * {@inheritDoc} - * - * For standard deviation parameter {@code s}, the variance is {@code s^2}. - */ - public double getNumericalVariance() { - final double s = getStandardDeviation(); - return s * s; - } - - /** - * {@inheritDoc} - * - * The lower bound of the support is always negative infinity - * no matter the parameters. - * - * @return lower bound of the support (always - * {@code Double.NEGATIVE_INFINITY}) - */ - public double getSupportLowerBound() { - return Double.NEGATIVE_INFINITY; - } - - /** - * {@inheritDoc} - * - * The upper bound of the support is always positive infinity - * no matter the parameters. - * - * @return upper bound of the support (always - * {@code Double.POSITIVE_INFINITY}) - */ - public double getSupportUpperBound() { - return Double.POSITIVE_INFINITY; - } - - /** {@inheritDoc} */ - public boolean isSupportLowerBoundInclusive() { - return false; - } - - /** {@inheritDoc} */ - public boolean isSupportUpperBoundInclusive() { - return false; - } - - /** - * {@inheritDoc} - * - * The support of this distribution is connected. - * - * @return {@code true} - */ - public boolean isSupportConnected() { - return true; - } - - /** {@inheritDoc} */ - @Override - public double sample() { - return standardDeviation * random.nextGaussian() + mean; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/PascalDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/PascalDistribution.java deleted file mode 100644 index cc0f9053f830..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/PascalDistribution.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.OutOfRangeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; -import com.azure.cosmos.implementation.apachecommons.math.special.Beta; -import com.azure.cosmos.implementation.apachecommons.math.util.CombinatoricsUtils; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** - * <p> - * Implementation of the Pascal distribution. The Pascal distribution is a - * special case of the Negative Binomial distribution where the number of - * successes parameter is an integer. - * </p> - * <p> - * There are various ways to express the probability mass and distribution - * functions for the Pascal distribution. The present implementation represents - * the distribution of the number of failures before {@code r} successes occur. - * This is the convention adopted in e.g. - * <a href="http://mathworld.wolfram.com/NegativeBinomialDistribution.html">MathWorld</a>, - * but <em>not</em> in - * <a href="http://en.wikipedia.org/wiki/Negative_binomial_distribution">Wikipedia</a>. - * </p> - * <p> - * For a random variable {@code X} whose values are distributed according to this - * distribution, the probability mass function is given by<br/> - * {@code P(X = k) = C(k + r - 1, r - 1) * p^r * (1 - p)^k,}<br/> - * where {@code r} is the number of successes, {@code p} is the probability of - * success, and {@code X} is the total number of failures. {@code C(n, k)} is - * the binomial coefficient ({@code n} choose {@code k}). The mean and variance - * of {@code X} are<br/> - * {@code E(X) = (1 - p) * r / p, var(X) = (1 - p) * r / p^2.}<br/> - * Finally, the cumulative distribution function is given by<br/> - * {@code P(X <= k) = I(p, r, k + 1)}, - * where I is the regularized incomplete Beta function. - * </p> - * - * @see <a href="http://en.wikipedia.org/wiki/Negative_binomial_distribution"> - * Negative binomial distribution (Wikipedia)</a> - * @see <a href="http://mathworld.wolfram.com/NegativeBinomialDistribution.html"> - * Negative binomial distribution (MathWorld)</a> - * @since 1.2 (changed to concrete class in 3.0) - */ -public class PascalDistribution extends AbstractIntegerDistribution { - /** Serializable version identifier. */ - private static final long serialVersionUID = 6751309484392813623L; - /** The number of successes. */ - private final int numberOfSuccesses; - /** The probability of success. */ - private final double probabilityOfSuccess; - /** The value of {@code log(p)}, where {@code p} is the probability of success, - * stored for faster computation. */ - private final double logProbabilityOfSuccess; - /** The value of {@code log(1-p)}, where {@code p} is the probability of success, - * stored for faster computation. */ - private final double log1mProbabilityOfSuccess; - - /** - * Create a Pascal distribution with the given number of successes and - * probability of success. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param r Number of successes. - * @param p Probability of success. - * @throws NotStrictlyPositiveException if the number of successes is not positive - * @throws OutOfRangeException if the probability of success is not in the - * range {@code [0, 1]}. - */ - public PascalDistribution(int r, double p) - throws NotStrictlyPositiveException, OutOfRangeException { - this(new Well19937c(), r, p); - } - - /** - * Create a Pascal distribution with the given number of successes and - * probability of success. - * - * @param rng Random number generator. - * @param r Number of successes. - * @param p Probability of success. - * @throws NotStrictlyPositiveException if the number of successes is not positive - * @throws OutOfRangeException if the probability of success is not in the - * range {@code [0, 1]}. - * @since 3.1 - */ - public PascalDistribution(RandomGenerator rng, - int r, - double p) - throws NotStrictlyPositiveException, OutOfRangeException { - super(rng); - - if (r <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.NUMBER_OF_SUCCESSES, - r); - } - if (p < 0 || p > 1) { - throw new OutOfRangeException(p, 0, 1); - } - - numberOfSuccesses = r; - probabilityOfSuccess = p; - logProbabilityOfSuccess = FastMath.log(p); - log1mProbabilityOfSuccess = FastMath.log1p(-p); - } - - /** - * Access the number of successes for this distribution. - * - * @return the number of successes. - */ - public int getNumberOfSuccesses() { - return numberOfSuccesses; - } - - /** - * Access the probability of success for this distribution. - * - * @return the probability of success. - */ - public double getProbabilityOfSuccess() { - return probabilityOfSuccess; - } - - /** {@inheritDoc} */ - public double probability(int x) { - double ret; - if (x < 0) { - ret = 0.0; - } else { - ret = CombinatoricsUtils.binomialCoefficientDouble(x + - numberOfSuccesses - 1, numberOfSuccesses - 1) * - FastMath.pow(probabilityOfSuccess, numberOfSuccesses) * - FastMath.pow(1.0 - probabilityOfSuccess, x); - } - return ret; - } - - /** {@inheritDoc} */ - @Override - public double logProbability(int x) { - double ret; - if (x < 0) { - ret = Double.NEGATIVE_INFINITY; - } else { - ret = CombinatoricsUtils.binomialCoefficientLog(x + - numberOfSuccesses - 1, numberOfSuccesses - 1) + - logProbabilityOfSuccess * numberOfSuccesses + - log1mProbabilityOfSuccess * x; - } - return ret; - } - - /** {@inheritDoc} */ - public double cumulativeProbability(int x) { - double ret; - if (x < 0) { - ret = 0.0; - } else { - ret = Beta.regularizedBeta(probabilityOfSuccess, - numberOfSuccesses, x + 1.0); - } - return ret; - } - - /** - * {@inheritDoc} - * - * For number of successes {@code r} and probability of success {@code p}, - * the mean is {@code r * (1 - p) / p}. - */ - public double getNumericalMean() { - final double p = getProbabilityOfSuccess(); - final double r = getNumberOfSuccesses(); - return (r * (1 - p)) / p; - } - - /** - * {@inheritDoc} - * - * For number of successes {@code r} and probability of success {@code p}, - * the variance is {@code r * (1 - p) / p^2}. - */ - public double getNumericalVariance() { - final double p = getProbabilityOfSuccess(); - final double r = getNumberOfSuccesses(); - return r * (1 - p) / (p * p); - } - - /** - * {@inheritDoc} - * - * The lower bound of the support is always 0 no matter the parameters. - * - * @return lower bound of the support (always 0) - */ - public int getSupportLowerBound() { - return 0; - } - - /** - * {@inheritDoc} - * - * The upper bound of the support is always positive infinity no matter the - * parameters. Positive infinity is symbolized by {@code Integer.MAX_VALUE}. - * - * @return upper bound of the support (always {@code Integer.MAX_VALUE} - * for positive infinity) - */ - public int getSupportUpperBound() { - return Integer.MAX_VALUE; - } - - /** - * {@inheritDoc} - * - * The support of this distribution is connected. - * - * @return {@code true} - */ - public boolean isSupportConnected() { - return true; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/PoissonDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/PoissonDistribution.java deleted file mode 100644 index 84b9eca11e59..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/PoissonDistribution.java +++ /dev/null @@ -1,399 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; -import com.azure.cosmos.implementation.apachecommons.math.special.Gamma; -import com.azure.cosmos.implementation.apachecommons.math.util.CombinatoricsUtils; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; -import com.azure.cosmos.implementation.apachecommons.math.util.MathUtils; - -/** - * Implementation of the Poisson distribution. - * - * @see <a href="http://en.wikipedia.org/wiki/Poisson_distribution">Poisson distribution (Wikipedia)</a> - * @see <a href="http://mathworld.wolfram.com/PoissonDistribution.html">Poisson distribution (MathWorld)</a> - */ -public class PoissonDistribution extends AbstractIntegerDistribution { - /** - * Default maximum number of iterations for cumulative probability calculations. - * @since 2.1 - */ - public static final int DEFAULT_MAX_ITERATIONS = 10000000; - /** - * Default convergence criterion. - * @since 2.1 - */ - public static final double DEFAULT_EPSILON = 1e-12; - /** Serializable version identifier. */ - private static final long serialVersionUID = -3349935121172596109L; - /** Distribution used to compute normal approximation. */ - private final NormalDistribution normal; - /** Distribution needed for the {@link #sample()} method. */ - private final ExponentialDistribution exponential; - /** Mean of the distribution. */ - private final double mean; - - /** - * Maximum number of iterations for cumulative probability. Cumulative - * probabilities are estimated using either Lanczos series approximation - * of {@link Gamma#regularizedGammaP(double, double, double, int)} - * or continued fraction approximation of - * {@link Gamma#regularizedGammaQ(double, double, double, int)}. - */ - private final int maxIterations; - - /** Convergence criterion for cumulative probability. */ - private final double epsilon; - - /** - * Creates a new Poisson distribution with specified mean. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param p the Poisson mean - * @throws NotStrictlyPositiveException if {@code p <= 0}. - */ - public PoissonDistribution(double p) throws NotStrictlyPositiveException { - this(p, DEFAULT_EPSILON, DEFAULT_MAX_ITERATIONS); - } - - /** - * Creates a new Poisson distribution with specified mean, convergence - * criterion and maximum number of iterations. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param p Poisson mean. - * @param epsilon Convergence criterion for cumulative probabilities. - * @param maxIterations the maximum number of iterations for cumulative - * probabilities. - * @throws NotStrictlyPositiveException if {@code p <= 0}. - * @since 2.1 - */ - public PoissonDistribution(double p, double epsilon, int maxIterations) - throws NotStrictlyPositiveException { - this(new Well19937c(), p, epsilon, maxIterations); - } - - /** - * Creates a new Poisson distribution with specified mean, convergence - * criterion and maximum number of iterations. - * - * @param rng Random number generator. - * @param p Poisson mean. - * @param epsilon Convergence criterion for cumulative probabilities. - * @param maxIterations the maximum number of iterations for cumulative - * probabilities. - * @throws NotStrictlyPositiveException if {@code p <= 0}. - * @since 3.1 - */ - public PoissonDistribution(RandomGenerator rng, - double p, - double epsilon, - int maxIterations) - throws NotStrictlyPositiveException { - super(rng); - - if (p <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.MEAN, p); - } - mean = p; - this.epsilon = epsilon; - this.maxIterations = maxIterations; - - // Use the same RNG instance as the parent class. - normal = new NormalDistribution(rng, p, FastMath.sqrt(p), - NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - exponential = new ExponentialDistribution(rng, 1, - ExponentialDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Creates a new Poisson distribution with the specified mean and - * convergence criterion. - * - * @param p Poisson mean. - * @param epsilon Convergence criterion for cumulative probabilities. - * @throws NotStrictlyPositiveException if {@code p <= 0}. - * @since 2.1 - */ - public PoissonDistribution(double p, double epsilon) - throws NotStrictlyPositiveException { - this(p, epsilon, DEFAULT_MAX_ITERATIONS); - } - - /** - * Creates a new Poisson distribution with the specified mean and maximum - * number of iterations. - * - * @param p Poisson mean. - * @param maxIterations Maximum number of iterations for cumulative - * probabilities. - * @since 2.1 - */ - public PoissonDistribution(double p, int maxIterations) { - this(p, DEFAULT_EPSILON, maxIterations); - } - - /** - * Get the mean for the distribution. - * - * @return the mean for the distribution. - */ - public double getMean() { - return mean; - } - - /** {@inheritDoc} */ - public double probability(int x) { - final double logProbability = logProbability(x); - return logProbability == Double.NEGATIVE_INFINITY ? 0 : FastMath.exp(logProbability); - } - - /** {@inheritDoc} */ - @Override - public double logProbability(int x) { - double ret; - if (x < 0 || x == Integer.MAX_VALUE) { - ret = Double.NEGATIVE_INFINITY; - } else if (x == 0) { - ret = -mean; - } else { - ret = -SaddlePointExpansion.getStirlingError(x) - - SaddlePointExpansion.getDeviancePart(x, mean) - - 0.5 * FastMath.log(MathUtils.TWO_PI) - 0.5 * FastMath.log(x); - } - return ret; - } - - /** {@inheritDoc} */ - public double cumulativeProbability(int x) { - if (x < 0) { - return 0; - } - if (x == Integer.MAX_VALUE) { - return 1; - } - return Gamma.regularizedGammaQ((double) x + 1, mean, epsilon, - maxIterations); - } - - /** - * Calculates the Poisson distribution function using a normal - * approximation. The {@code N(mean, sqrt(mean))} distribution is used - * to approximate the Poisson distribution. The computation uses - * "half-correction" (evaluating the normal distribution function at - * {@code x + 0.5}). - * - * @param x Upper bound, inclusive. - * @return the distribution function value calculated using a normal - * approximation. - */ - public double normalApproximateProbability(int x) { - // calculate the probability using half-correction - return normal.cumulativeProbability(x + 0.5); - } - - /** - * {@inheritDoc} - * - * For mean parameter {@code p}, the mean is {@code p}. - */ - public double getNumericalMean() { - return getMean(); - } - - /** - * {@inheritDoc} - * - * For mean parameter {@code p}, the variance is {@code p}. - */ - public double getNumericalVariance() { - return getMean(); - } - - /** - * {@inheritDoc} - * - * The lower bound of the support is always 0 no matter the mean parameter. - * - * @return lower bound of the support (always 0) - */ - public int getSupportLowerBound() { - return 0; - } - - /** - * {@inheritDoc} - * - * The upper bound of the support is positive infinity, - * regardless of the parameter values. There is no integer infinity, - * so this method returns {@code Integer.MAX_VALUE}. - * - * @return upper bound of the support (always {@code Integer.MAX_VALUE} for - * positive infinity) - */ - public int getSupportUpperBound() { - return Integer.MAX_VALUE; - } - - /** - * {@inheritDoc} - * - * The support of this distribution is connected. - * - * @return {@code true} - */ - public boolean isSupportConnected() { - return true; - } - - /** - * {@inheritDoc} - * <p> - * <strong>Algorithm Description</strong>: - * <ul> - * <li>For small means, uses simulation of a Poisson process - * using Uniform deviates, as described - * <a href="http://mathaa.epfl.ch/cours/PMMI2001/interactive/rng7.htm"> here</a>. - * The Poisson process (and hence value returned) is bounded by 1000 * mean. - * </li> - * <li>For large means, uses the rejection algorithm described in - * <blockquote> - * Devroye, Luc. (1981).<i>The Computer Generation of Poisson Random Variables</i><br> - * <strong>Computing</strong> vol. 26 pp. 197-207.<br> - * </blockquote> - * </li> - * </ul> - * </p> - * - * @return a random value. - * @since 2.2 - */ - @Override - public int sample() { - return (int) FastMath.min(nextPoisson(mean), Integer.MAX_VALUE); - } - - /** - * @param meanPoisson Mean of the Poisson distribution. - * @return the next sample. - */ - private long nextPoisson(double meanPoisson) { - final double pivot = 40.0d; - if (meanPoisson < pivot) { - double p = FastMath.exp(-meanPoisson); - long n = 0; - double r = 1.0d; - double rnd = 1.0d; - - while (n < 1000 * meanPoisson) { - rnd = random.nextDouble(); - r *= rnd; - if (r >= p) { - n++; - } else { - return n; - } - } - return n; - } else { - final double lambda = FastMath.floor(meanPoisson); - final double lambdaFractional = meanPoisson - lambda; - final double logLambda = FastMath.log(lambda); - final double logLambdaFactorial = CombinatoricsUtils.factorialLog((int) lambda); - final long y2 = lambdaFractional < Double.MIN_VALUE ? 0 : nextPoisson(lambdaFractional); - final double delta = FastMath.sqrt(lambda * FastMath.log(32 * lambda / FastMath.PI + 1)); - final double halfDelta = delta / 2; - final double twolpd = 2 * lambda + delta; - final double a1 = FastMath.sqrt(FastMath.PI * twolpd) * FastMath.exp(1 / (8 * lambda)); - final double a2 = (twolpd / delta) * FastMath.exp(-delta * (1 + delta) / twolpd); - final double aSum = a1 + a2 + 1; - final double p1 = a1 / aSum; - final double p2 = a2 / aSum; - final double c1 = 1 / (8 * lambda); - - double x = 0; - double y = 0; - double v = 0; - int a = 0; - double t = 0; - double qr = 0; - double qa = 0; - for (;;) { - final double u = random.nextDouble(); - if (u <= p1) { - final double n = random.nextGaussian(); - x = n * FastMath.sqrt(lambda + halfDelta) - 0.5d; - if (x > delta || x < -lambda) { - continue; - } - y = x < 0 ? FastMath.floor(x) : FastMath.ceil(x); - final double e = exponential.sample(); - v = -e - (n * n / 2) + c1; - } else { - if (u > p1 + p2) { - y = lambda; - break; - } else { - x = delta + (twolpd / delta) * exponential.sample(); - y = FastMath.ceil(x); - v = -exponential.sample() - delta * (x + 1) / twolpd; - } - } - a = x < 0 ? 1 : 0; - t = y * (y + 1) / (2 * lambda); - if (v < -t && a == 0) { - y = lambda + y; - break; - } - qr = t * ((2 * y + 1) / (6 * lambda) - 1); - qa = qr - (t * t) / (3 * (lambda + a * (y + 1))); - if (v < qa) { - y = lambda + y; - break; - } - if (v > qr) { - continue; - } - if (v < y * logLambda - CombinatoricsUtils.factorialLog((int) (y + lambda)) + logLambdaFactorial) { - y = lambda + y; - break; - } - } - return y2 + (long) y; - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/RealDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/RealDistribution.java deleted file mode 100644 index 37b4358399eb..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/RealDistribution.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.OutOfRangeException; - -/** - * Base interface for distributions on the reals. - * - * @since 3.0 - */ -public interface RealDistribution { - /** - * For a random variable {@code X} whose values are distributed according - * to this distribution, this method returns {@code P(X = x)}. In other - * words, this method represents the probability mass function (PMF) - * for the distribution. - * - * @param x the point at which the PMF is evaluated - * @return the value of the probability mass function at point {@code x} - */ - double probability(double x); - - /** - * Returns the probability density function (PDF) of this distribution - * evaluated at the specified point {@code x}. In general, the PDF is - * the derivative of the {@link #cumulativeProbability(double) CDF}. - * If the derivative does not exist at {@code x}, then an appropriate - * replacement should be returned, e.g. {@code Double.POSITIVE_INFINITY}, - * {@code Double.NaN}, or the limit inferior or limit superior of the - * difference quotient. - * - * @param x the point at which the PDF is evaluated - * @return the value of the probability density function at point {@code x} - */ - double density(double x); - - /** - * For a random variable {@code X} whose values are distributed according - * to this distribution, this method returns {@code P(X <= x)}. In other - * words, this method represents the (cumulative) distribution function - * (CDF) for this distribution. - * - * @param x the point at which the CDF is evaluated - * @return the probability that a random variable with this - * distribution takes a value less than or equal to {@code x} - */ - double cumulativeProbability(double x); - - /** - * For a random variable {@code X} whose values are distributed according - * to this distribution, this method returns {@code P(x0 < X <= x1)}. - * - * @param x0 the exclusive lower bound - * @param x1 the inclusive upper bound - * @return the probability that a random variable with this distribution - * takes a value between {@code x0} and {@code x1}, - * excluding the lower and including the upper endpoint - * @throws NumberIsTooLargeException if {@code x0 > x1} - * - * @deprecated As of 3.1. In 4.0, this method will be renamed - * {@code probability(double x0, double x1)}. - */ - @Deprecated - double cumulativeProbability(double x0, double x1) throws NumberIsTooLargeException; - - /** - * Computes the quantile function of this distribution. For a random - * variable {@code X} distributed according to this distribution, the - * returned value is - * <ul> - * <li><code>inf{x in R | P(X<=x) >= p}</code> for {@code 0 < p <= 1},</li> - * <li><code>inf{x in R | P(X<=x) > 0}</code> for {@code p = 0}.</li> - * </ul> - * - * @param p the cumulative probability - * @return the smallest {@code p}-quantile of this distribution - * (largest 0-quantile for {@code p = 0}) - * @throws OutOfRangeException if {@code p < 0} or {@code p > 1} - */ - double inverseCumulativeProbability(double p) throws OutOfRangeException; - - /** - * Use this method to get the numerical value of the mean of this - * distribution. - * - * @return the mean or {@code Double.NaN} if it is not defined - */ - double getNumericalMean(); - - /** - * Use this method to get the numerical value of the variance of this - * distribution. - * - * @return the variance (possibly {@code Double.POSITIVE_INFINITY} as - * for certain cases in {@link TDistribution}) or {@code Double.NaN} if it - * is not defined - */ - double getNumericalVariance(); - - /** - * Access the lower bound of the support. This method must return the same - * value as {@code inverseCumulativeProbability(0)}. In other words, this - * method must return - * <p><code>inf {x in R | P(X <= x) > 0}</code>.</p> - * - * @return lower bound of the support (might be - * {@code Double.NEGATIVE_INFINITY}) - */ - double getSupportLowerBound(); - - /** - * Access the upper bound of the support. This method must return the same - * value as {@code inverseCumulativeProbability(1)}. In other words, this - * method must return - * <p><code>inf {x in R | P(X <= x) = 1}</code>.</p> - * - * @return upper bound of the support (might be - * {@code Double.POSITIVE_INFINITY}) - */ - double getSupportUpperBound(); - - /** - * Whether or not the lower bound of support is in the domain of the density - * function. Returns true iff {@code getSupporLowerBound()} is finite and - * {@code density(getSupportLowerBound())} returns a non-NaN, non-infinite - * value. - * - * @return true if the lower bound of support is finite and the density - * function returns a non-NaN, non-infinite value there - * @deprecated to be removed in 4.0 - */ - @Deprecated - boolean isSupportLowerBoundInclusive(); - - /** - * Whether or not the upper bound of support is in the domain of the density - * function. Returns true iff {@code getSupportUpperBound()} is finite and - * {@code density(getSupportUpperBound())} returns a non-NaN, non-infinite - * value. - * - * @return true if the upper bound of support is finite and the density - * function returns a non-NaN, non-infinite value there - * @deprecated to be removed in 4.0 - */ - @Deprecated - boolean isSupportUpperBoundInclusive(); - - /** - * Use this method to get information about whether the support is connected, - * i.e. whether all values between the lower and upper bound of the support - * are included in the support. - * - * @return whether the support is connected or not - */ - boolean isSupportConnected(); - - /** - * Reseed the random generator used to generate samples. - * - * @param seed the new seed - */ - void reseedRandomGenerator(long seed); - - /** - * Generate a random value sampled from this distribution. - * - * @return a random value. - */ - double sample(); - - /** - * Generate a random sample from the distribution. - * - * @param sampleSize the number of random values to generate - * @return an array representing the random sample - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException - * if {@code sampleSize} is not positive - */ - double[] sample(int sampleSize); -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/SaddlePointExpansion.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/SaddlePointExpansion.java deleted file mode 100644 index 67d0c3eb52f4..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/SaddlePointExpansion.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.special.Gamma; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; -import com.azure.cosmos.implementation.apachecommons.math.util.MathUtils; - -/** - * <p> - * Utility class used by various distributions to accurately compute their - * respective probability mass functions. The implementation for this class is - * based on the Catherine Loader's <a target="_blank" - * href="http://www.herine.net/stat/software/dbinom.html">dbinom</a> routines. - * </p> - * <p> - * This class is not intended to be called directly. - * </p> - * <p> - * References: - * <ol> - * <li>Catherine Loader (2000). "Fast and Accurate Computation of Binomial - * Probabilities.". <a target="_blank" - * href="http://www.herine.net/stat/papers/dbinom.pdf"> - * http://www.herine.net/stat/papers/dbinom.pdf</a></li> - * </ol> - * </p> - * - * @since 2.1 - */ -final class SaddlePointExpansion { - - /** 1/2 * log(2 π). */ - private static final double HALF_LOG_2_PI = 0.5 * FastMath.log(MathUtils.TWO_PI); - - /** exact Stirling expansion error for certain values. */ - private static final double[] EXACT_STIRLING_ERRORS = { 0.0, /* 0.0 */ - 0.1534264097200273452913848, /* 0.5 */ - 0.0810614667953272582196702, /* 1.0 */ - 0.0548141210519176538961390, /* 1.5 */ - 0.0413406959554092940938221, /* 2.0 */ - 0.03316287351993628748511048, /* 2.5 */ - 0.02767792568499833914878929, /* 3.0 */ - 0.02374616365629749597132920, /* 3.5 */ - 0.02079067210376509311152277, /* 4.0 */ - 0.01848845053267318523077934, /* 4.5 */ - 0.01664469118982119216319487, /* 5.0 */ - 0.01513497322191737887351255, /* 5.5 */ - 0.01387612882307074799874573, /* 6.0 */ - 0.01281046524292022692424986, /* 6.5 */ - 0.01189670994589177009505572, /* 7.0 */ - 0.01110455975820691732662991, /* 7.5 */ - 0.010411265261972096497478567, /* 8.0 */ - 0.009799416126158803298389475, /* 8.5 */ - 0.009255462182712732917728637, /* 9.0 */ - 0.008768700134139385462952823, /* 9.5 */ - 0.008330563433362871256469318, /* 10.0 */ - 0.007934114564314020547248100, /* 10.5 */ - 0.007573675487951840794972024, /* 11.0 */ - 0.007244554301320383179543912, /* 11.5 */ - 0.006942840107209529865664152, /* 12.0 */ - 0.006665247032707682442354394, /* 12.5 */ - 0.006408994188004207068439631, /* 13.0 */ - 0.006171712263039457647532867, /* 13.5 */ - 0.005951370112758847735624416, /* 14.0 */ - 0.005746216513010115682023589, /* 14.5 */ - 0.005554733551962801371038690 /* 15.0 */ - }; - - /** - * Default constructor. - */ - private SaddlePointExpansion() { - super(); - } - - /** - * Compute the error of Stirling's series at the given value. - * <p> - * References: - * <ol> - * <li>Eric W. Weisstein. "Stirling's Series." From MathWorld--A Wolfram Web - * Resource. <a target="_blank" - * href="http://mathworld.wolfram.com/StirlingsSeries.html"> - * http://mathworld.wolfram.com/StirlingsSeries.html</a></li> - * </ol> - * </p> - * - * @param z the value. - * @return the Striling's series error. - */ - static double getStirlingError(double z) { - double ret; - if (z < 15.0) { - double z2 = 2.0 * z; - if (FastMath.floor(z2) == z2) { - ret = EXACT_STIRLING_ERRORS[(int) z2]; - } else { - ret = Gamma.logGamma(z + 1.0) - (z + 0.5) * FastMath.log(z) + - z - HALF_LOG_2_PI; - } - } else { - double z2 = z * z; - ret = (0.083333333333333333333 - - (0.00277777777777777777778 - - (0.00079365079365079365079365 - - (0.000595238095238095238095238 - - 0.0008417508417508417508417508 / - z2) / z2) / z2) / z2) / z; - } - return ret; - } - - /** - * A part of the deviance portion of the saddle point approximation. - * <p> - * References: - * <ol> - * <li>Catherine Loader (2000). "Fast and Accurate Computation of Binomial - * Probabilities.". <a target="_blank" - * href="http://www.herine.net/stat/papers/dbinom.pdf"> - * http://www.herine.net/stat/papers/dbinom.pdf</a></li> - * </ol> - * </p> - * - * @param x the x value. - * @param mu the average. - * @return a part of the deviance. - */ - static double getDeviancePart(double x, double mu) { - double ret; - if (FastMath.abs(x - mu) < 0.1 * (x + mu)) { - double d = x - mu; - double v = d / (x + mu); - double s1 = v * d; - double s = Double.NaN; - double ej = 2.0 * x * v; - v *= v; - int j = 1; - while (s1 != s) { - s = s1; - ej *= v; - s1 = s + ej / ((j * 2) + 1); - ++j; - } - ret = s1; - } else { - ret = x * FastMath.log(x / mu) + mu - x; - } - return ret; - } - - /** - * Compute the logarithm of the PMF for a binomial distribution - * using the saddle point expansion. - * - * @param x the value at which the probability is evaluated. - * @param n the number of trials. - * @param p the probability of success. - * @param q the probability of failure (1 - p). - * @return log(p(x)). - */ - static double logBinomialProbability(int x, int n, double p, double q) { - double ret; - if (x == 0) { - if (p < 0.1) { - ret = -getDeviancePart(n, n * q) - n * p; - } else { - ret = n * FastMath.log(q); - } - } else if (x == n) { - if (q < 0.1) { - ret = -getDeviancePart(n, n * p) - n * q; - } else { - ret = n * FastMath.log(p); - } - } else { - ret = getStirlingError(n) - getStirlingError(x) - - getStirlingError(n - x) - getDeviancePart(x, n * p) - - getDeviancePart(n - x, n * q); - double f = (MathUtils.TWO_PI * x * (n - x)) / n; - ret = -0.5 * FastMath.log(f) + ret; - } - return ret; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/TDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/TDistribution.java deleted file mode 100644 index d222eca5487a..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/TDistribution.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; -import com.azure.cosmos.implementation.apachecommons.math.special.Beta; -import com.azure.cosmos.implementation.apachecommons.math.special.Gamma; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** - * Implementation of Student's t-distribution. - * - * @see "<a href='http://en.wikipedia.org/wiki/Student's_t-distribution'>Student's t-distribution (Wikipedia)</a>" - * @see "<a href='http://mathworld.wolfram.com/Studentst-Distribution.html'>Student's t-distribution (MathWorld)</a>" - */ -public class TDistribution extends AbstractRealDistribution { - /** - * Default inverse cumulative probability accuracy. - * @since 2.1 - */ - public static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY = 1e-9; - /** Serializable version identifier */ - private static final long serialVersionUID = -5852615386664158222L; - /** The degrees of freedom. */ - private final double degreesOfFreedom; - /** Inverse cumulative probability accuracy. */ - private final double solverAbsoluteAccuracy; - /** Static computation factor based on degreesOfFreedom. */ - private final double factor; - - /** - * Create a t distribution using the given degrees of freedom. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param degreesOfFreedom Degrees of freedom. - * @throws NotStrictlyPositiveException if {@code degreesOfFreedom <= 0} - */ - public TDistribution(double degreesOfFreedom) - throws NotStrictlyPositiveException { - this(degreesOfFreedom, DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Create a t distribution using the given degrees of freedom and the - * specified inverse cumulative probability absolute accuracy. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param degreesOfFreedom Degrees of freedom. - * @param inverseCumAccuracy the maximum absolute error in inverse - * cumulative probability estimates - * (defaults to {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}). - * @throws NotStrictlyPositiveException if {@code degreesOfFreedom <= 0} - * @since 2.1 - */ - public TDistribution(double degreesOfFreedom, double inverseCumAccuracy) - throws NotStrictlyPositiveException { - this(new Well19937c(), degreesOfFreedom, inverseCumAccuracy); - } - - /** - * Creates a t distribution. - * - * @param rng Random number generator. - * @param degreesOfFreedom Degrees of freedom. - * @throws NotStrictlyPositiveException if {@code degreesOfFreedom <= 0} - * @since 3.3 - */ - public TDistribution(RandomGenerator rng, double degreesOfFreedom) - throws NotStrictlyPositiveException { - this(rng, degreesOfFreedom, DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Creates a t distribution. - * - * @param rng Random number generator. - * @param degreesOfFreedom Degrees of freedom. - * @param inverseCumAccuracy the maximum absolute error in inverse - * cumulative probability estimates - * (defaults to {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}). - * @throws NotStrictlyPositiveException if {@code degreesOfFreedom <= 0} - * @since 3.1 - */ - public TDistribution(RandomGenerator rng, - double degreesOfFreedom, - double inverseCumAccuracy) - throws NotStrictlyPositiveException { - super(rng); - - if (degreesOfFreedom <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.DEGREES_OF_FREEDOM, - degreesOfFreedom); - } - this.degreesOfFreedom = degreesOfFreedom; - solverAbsoluteAccuracy = inverseCumAccuracy; - - final double n = degreesOfFreedom; - final double nPlus1Over2 = (n + 1) / 2; - factor = Gamma.logGamma(nPlus1Over2) - - 0.5 * (FastMath.log(FastMath.PI) + FastMath.log(n)) - - Gamma.logGamma(n / 2); - } - - /** - * Access the degrees of freedom. - * - * @return the degrees of freedom. - */ - public double getDegreesOfFreedom() { - return degreesOfFreedom; - } - - /** {@inheritDoc} */ - public double density(double x) { - return FastMath.exp(logDensity(x)); - } - - /** {@inheritDoc} */ - @Override - public double logDensity(double x) { - final double n = degreesOfFreedom; - final double nPlus1Over2 = (n + 1) / 2; - return factor - nPlus1Over2 * FastMath.log(1 + x * x / n); - } - - /** {@inheritDoc} */ - public double cumulativeProbability(double x) { - double ret; - if (x == 0) { - ret = 0.5; - } else { - double t = - Beta.regularizedBeta( - degreesOfFreedom / (degreesOfFreedom + (x * x)), - 0.5 * degreesOfFreedom, - 0.5); - if (x < 0.0) { - ret = 0.5 * t; - } else { - ret = 1.0 - 0.5 * t; - } - } - - return ret; - } - - /** {@inheritDoc} */ - @Override - protected double getSolverAbsoluteAccuracy() { - return solverAbsoluteAccuracy; - } - - /** - * {@inheritDoc} - * - * For degrees of freedom parameter {@code df}, the mean is - * <ul> - * <li>if {@code df > 1} then {@code 0},</li> - * <li>else undefined ({@code Double.NaN}).</li> - * </ul> - */ - public double getNumericalMean() { - final double df = getDegreesOfFreedom(); - - if (df > 1) { - return 0; - } - - return Double.NaN; - } - - /** - * {@inheritDoc} - * - * For degrees of freedom parameter {@code df}, the variance is - * <ul> - * <li>if {@code df > 2} then {@code df / (df - 2)},</li> - * <li>if {@code 1 < df <= 2} then positive infinity - * ({@code Double.POSITIVE_INFINITY}),</li> - * <li>else undefined ({@code Double.NaN}).</li> - * </ul> - */ - public double getNumericalVariance() { - final double df = getDegreesOfFreedom(); - - if (df > 2) { - return df / (df - 2); - } - - if (df > 1 && df <= 2) { - return Double.POSITIVE_INFINITY; - } - - return Double.NaN; - } - - /** - * {@inheritDoc} - * - * The lower bound of the support is always negative infinity no matter the - * parameters. - * - * @return lower bound of the support (always - * {@code Double.NEGATIVE_INFINITY}) - */ - public double getSupportLowerBound() { - return Double.NEGATIVE_INFINITY; - } - - /** - * {@inheritDoc} - * - * The upper bound of the support is always positive infinity no matter the - * parameters. - * - * @return upper bound of the support (always - * {@code Double.POSITIVE_INFINITY}) - */ - public double getSupportUpperBound() { - return Double.POSITIVE_INFINITY; - } - - /** {@inheritDoc} */ - public boolean isSupportLowerBoundInclusive() { - return false; - } - - /** {@inheritDoc} */ - public boolean isSupportUpperBoundInclusive() { - return false; - } - - /** - * {@inheritDoc} - * - * The support of this distribution is connected. - * - * @return {@code true} - */ - public boolean isSupportConnected() { - return true; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/UniformIntegerDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/UniformIntegerDistribution.java deleted file mode 100644 index 3558c4ffbd76..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/UniformIntegerDistribution.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; - -/** - * Implementation of the uniform integer distribution. - * - * @see <a href="http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)" - * >Uniform distribution (discrete), at Wikipedia</a> - * - * @since 3.0 - */ -public class UniformIntegerDistribution extends AbstractIntegerDistribution { - /** Serializable version identifier. */ - private static final long serialVersionUID = 20120109L; - /** Lower bound (inclusive) of this distribution. */ - private final int lower; - /** Upper bound (inclusive) of this distribution. */ - private final int upper; - - /** - * Creates a new uniform integer distribution using the given lower and - * upper bounds (both inclusive). - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param lower Lower bound (inclusive) of this distribution. - * @param upper Upper bound (inclusive) of this distribution. - * @throws NumberIsTooLargeException if {@code lower >= upper}. - */ - public UniformIntegerDistribution(int lower, int upper) - throws NumberIsTooLargeException { - this(new Well19937c(), lower, upper); - } - - /** - * Creates a new uniform integer distribution using the given lower and - * upper bounds (both inclusive). - * - * @param rng Random number generator. - * @param lower Lower bound (inclusive) of this distribution. - * @param upper Upper bound (inclusive) of this distribution. - * @throws NumberIsTooLargeException if {@code lower > upper}. - * @since 3.1 - */ - public UniformIntegerDistribution(RandomGenerator rng, - int lower, - int upper) - throws NumberIsTooLargeException { - super(rng); - - if (lower > upper) { - throw new NumberIsTooLargeException( - LocalizedFormats.LOWER_BOUND_NOT_BELOW_UPPER_BOUND, - lower, upper, true); - } - this.lower = lower; - this.upper = upper; - } - - /** {@inheritDoc} */ - public double probability(int x) { - if (x < lower || x > upper) { - return 0; - } - return 1.0 / (upper - lower + 1); - } - - /** {@inheritDoc} */ - public double cumulativeProbability(int x) { - if (x < lower) { - return 0; - } - if (x > upper) { - return 1; - } - return (x - lower + 1.0) / (upper - lower + 1.0); - } - - /** - * {@inheritDoc} - * - * For lower bound {@code lower} and upper bound {@code upper}, the mean is - * {@code 0.5 * (lower + upper)}. - */ - public double getNumericalMean() { - return 0.5 * (lower + upper); - } - - /** - * {@inheritDoc} - * - * For lower bound {@code lower} and upper bound {@code upper}, and - * {@code n = upper - lower + 1}, the variance is {@code (n^2 - 1) / 12}. - */ - public double getNumericalVariance() { - double n = upper - lower + 1; - return (n * n - 1) / 12.0; - } - - /** - * {@inheritDoc} - * - * The lower bound of the support is equal to the lower bound parameter - * of the distribution. - * - * @return lower bound of the support - */ - public int getSupportLowerBound() { - return lower; - } - - /** - * {@inheritDoc} - * - * The upper bound of the support is equal to the upper bound parameter - * of the distribution. - * - * @return upper bound of the support - */ - public int getSupportUpperBound() { - return upper; - } - - /** - * {@inheritDoc} - * - * The support of this distribution is connected. - * - * @return {@code true} - */ - public boolean isSupportConnected() { - return true; - } - - /** {@inheritDoc} */ - @Override - public int sample() { - final int max = (upper - lower) + 1; - if (max <= 0) { - // The range is too wide to fit in a positive int (larger - // than 2^31); as it covers more than half the integer range, - // we use a simple rejection method. - while (true) { - final int r = random.nextInt(); - if (r >= lower && - r <= upper) { - return r; - } - } - } else { - // We can shift the range and directly generate a positive int. - return lower + random.nextInt(max); - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/WeibullDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/WeibullDistribution.java deleted file mode 100644 index 717b358a2dd9..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/WeibullDistribution.java +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.OutOfRangeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; -import com.azure.cosmos.implementation.apachecommons.math.special.Gamma; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** - * Implementation of the Weibull distribution. This implementation uses the - * two parameter form of the distribution defined by - * <a href="http://mathworld.wolfram.com/WeibullDistribution.html"> - * Weibull Distribution</a>, equations (1) and (2). - * - * @see <a href="http://en.wikipedia.org/wiki/Weibull_distribution">Weibull distribution (Wikipedia)</a> - * @see <a href="http://mathworld.wolfram.com/WeibullDistribution.html">Weibull distribution (MathWorld)</a> - * @since 1.1 (changed to concrete class in 3.0) - */ -public class WeibullDistribution extends AbstractRealDistribution { - /** - * Default inverse cumulative probability accuracy. - * @since 2.1 - */ - public static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY = 1e-9; - /** Serializable version identifier. */ - private static final long serialVersionUID = 8589540077390120676L; - /** The shape parameter. */ - private final double shape; - /** The scale parameter. */ - private final double scale; - /** Inverse cumulative probability accuracy. */ - private final double solverAbsoluteAccuracy; - /** Cached numerical mean */ - private double numericalMean = Double.NaN; - /** Whether or not the numerical mean has been calculated */ - private boolean numericalMeanIsCalculated = false; - /** Cached numerical variance */ - private double numericalVariance = Double.NaN; - /** Whether or not the numerical variance has been calculated */ - private boolean numericalVarianceIsCalculated = false; - - /** - * Create a Weibull distribution with the given shape and scale and a - * location equal to zero. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param alpha Shape parameter. - * @param beta Scale parameter. - * @throws NotStrictlyPositiveException if {@code alpha <= 0} or - * {@code beta <= 0}. - */ - public WeibullDistribution(double alpha, double beta) - throws NotStrictlyPositiveException { - this(alpha, beta, DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Create a Weibull distribution with the given shape, scale and inverse - * cumulative probability accuracy and a location equal to zero. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param alpha Shape parameter. - * @param beta Scale parameter. - * @param inverseCumAccuracy Maximum absolute error in inverse - * cumulative probability estimates - * (defaults to {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}). - * @throws NotStrictlyPositiveException if {@code alpha <= 0} or - * {@code beta <= 0}. - * @since 2.1 - */ - public WeibullDistribution(double alpha, double beta, - double inverseCumAccuracy) { - this(new Well19937c(), alpha, beta, inverseCumAccuracy); - } - - /** - * Creates a Weibull distribution. - * - * @param rng Random number generator. - * @param alpha Shape parameter. - * @param beta Scale parameter. - * @throws NotStrictlyPositiveException if {@code alpha <= 0} or {@code beta <= 0}. - * @since 3.3 - */ - public WeibullDistribution(RandomGenerator rng, double alpha, double beta) - throws NotStrictlyPositiveException { - this(rng, alpha, beta, DEFAULT_INVERSE_ABSOLUTE_ACCURACY); - } - - /** - * Creates a Weibull distribution. - * - * @param rng Random number generator. - * @param alpha Shape parameter. - * @param beta Scale parameter. - * @param inverseCumAccuracy Maximum absolute error in inverse - * cumulative probability estimates - * (defaults to {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}). - * @throws NotStrictlyPositiveException if {@code alpha <= 0} or {@code beta <= 0}. - * @since 3.1 - */ - public WeibullDistribution(RandomGenerator rng, - double alpha, - double beta, - double inverseCumAccuracy) - throws NotStrictlyPositiveException { - super(rng); - - if (alpha <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.SHAPE, - alpha); - } - if (beta <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.SCALE, - beta); - } - scale = beta; - shape = alpha; - solverAbsoluteAccuracy = inverseCumAccuracy; - } - - /** - * Access the shape parameter, {@code alpha}. - * - * @return the shape parameter, {@code alpha}. - */ - public double getShape() { - return shape; - } - - /** - * Access the scale parameter, {@code beta}. - * - * @return the scale parameter, {@code beta}. - */ - public double getScale() { - return scale; - } - - /** {@inheritDoc} */ - public double density(double x) { - if (x < 0) { - return 0; - } - - final double xscale = x / scale; - final double xscalepow = FastMath.pow(xscale, shape - 1); - - /* - * FastMath.pow(x / scale, shape) = - * FastMath.pow(xscale, shape) = - * FastMath.pow(xscale, shape - 1) * xscale - */ - final double xscalepowshape = xscalepow * xscale; - - return (shape / scale) * xscalepow * FastMath.exp(-xscalepowshape); - } - - /** {@inheritDoc} */ - @Override - public double logDensity(double x) { - if (x < 0) { - return Double.NEGATIVE_INFINITY; - } - - final double xscale = x / scale; - final double logxscalepow = FastMath.log(xscale) * (shape - 1); - - /* - * FastMath.pow(x / scale, shape) = - * FastMath.pow(xscale, shape) = - * FastMath.pow(xscale, shape - 1) * xscale - */ - final double xscalepowshape = FastMath.exp(logxscalepow) * xscale; - - return FastMath.log(shape / scale) + logxscalepow - xscalepowshape; - } - - /** {@inheritDoc} */ - public double cumulativeProbability(double x) { - double ret; - if (x <= 0.0) { - ret = 0.0; - } else { - ret = 1.0 - FastMath.exp(-FastMath.pow(x / scale, shape)); - } - return ret; - } - - /** - * {@inheritDoc} - * - * Returns {@code 0} when {@code p == 0} and - * {@code Double.POSITIVE_INFINITY} when {@code p == 1}. - */ - @Override - public double inverseCumulativeProbability(double p) { - double ret; - if (p < 0.0 || p > 1.0) { - throw new OutOfRangeException(p, 0.0, 1.0); - } else if (p == 0) { - ret = 0.0; - } else if (p == 1) { - ret = Double.POSITIVE_INFINITY; - } else { - ret = scale * FastMath.pow(-FastMath.log1p(-p), 1.0 / shape); - } - return ret; - } - - /** - * Return the absolute accuracy setting of the solver used to estimate - * inverse cumulative probabilities. - * - * @return the solver absolute accuracy. - * @since 2.1 - */ - @Override - protected double getSolverAbsoluteAccuracy() { - return solverAbsoluteAccuracy; - } - - /** - * {@inheritDoc} - * - * The mean is {@code scale * Gamma(1 + (1 / shape))}, where {@code Gamma()} - * is the Gamma-function. - */ - public double getNumericalMean() { - if (!numericalMeanIsCalculated) { - numericalMean = calculateNumericalMean(); - numericalMeanIsCalculated = true; - } - return numericalMean; - } - - /** - * used by {@link #getNumericalMean()} - * - * @return the mean of this distribution - */ - protected double calculateNumericalMean() { - final double sh = getShape(); - final double sc = getScale(); - - return sc * FastMath.exp(Gamma.logGamma(1 + (1 / sh))); - } - - /** - * {@inheritDoc} - * - * The variance is {@code scale^2 * Gamma(1 + (2 / shape)) - mean^2} - * where {@code Gamma()} is the Gamma-function. - */ - public double getNumericalVariance() { - if (!numericalVarianceIsCalculated) { - numericalVariance = calculateNumericalVariance(); - numericalVarianceIsCalculated = true; - } - return numericalVariance; - } - - /** - * used by {@link #getNumericalVariance()} - * - * @return the variance of this distribution - */ - protected double calculateNumericalVariance() { - final double sh = getShape(); - final double sc = getScale(); - final double mn = getNumericalMean(); - - return (sc * sc) * FastMath.exp(Gamma.logGamma(1 + (2 / sh))) - - (mn * mn); - } - - /** - * {@inheritDoc} - * - * The lower bound of the support is always 0 no matter the parameters. - * - * @return lower bound of the support (always 0) - */ - public double getSupportLowerBound() { - return 0; - } - - /** - * {@inheritDoc} - * - * The upper bound of the support is always positive infinity - * no matter the parameters. - * - * @return upper bound of the support (always - * {@code Double.POSITIVE_INFINITY}) - */ - public double getSupportUpperBound() { - return Double.POSITIVE_INFINITY; - } - - /** {@inheritDoc} */ - public boolean isSupportLowerBoundInclusive() { - return true; - } - - /** {@inheritDoc} */ - public boolean isSupportUpperBoundInclusive() { - return false; - } - - /** - * {@inheritDoc} - * - * The support of this distribution is connected. - * - * @return {@code true} - */ - public boolean isSupportConnected() { - return true; - } -} - diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/ZipfDistribution.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/ZipfDistribution.java deleted file mode 100644 index ef32ae7659cd..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/distribution/ZipfDistribution.java +++ /dev/null @@ -1,492 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.distribution; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** - * Implementation of the Zipf distribution. - * <p> - * <strong>Parameters:</strong> - * For a random variable {@code X} whose values are distributed according to this - * distribution, the probability mass function is given by - * <pre> - * P(X = k) = H(N,s) * 1 / k^s for {@code k = 1,2,...,N}. - * </pre> - * {@code H(N,s)} is the normalizing constant - * which corresponds to the generalized harmonic number of order N of s. - * <p> - * <ul> - * <li>{@code N} is the number of elements</li> - * <li>{@code s} is the exponent</li> - * </ul> - * @see <a href="https://en.wikipedia.org/wiki/Zipf's_law">Zipf's law (Wikipedia)</a> - * @see <a href="https://en.wikipedia.org/wiki/Harmonic_number#Generalized_harmonic_numbers">Generalized harmonic numbers</a> - */ -public class ZipfDistribution extends AbstractIntegerDistribution { - /** Serializable version identifier. */ - private static final long serialVersionUID = -140627372283420404L; - /** Number of elements. */ - private final int numberOfElements; - /** Exponent parameter of the distribution. */ - private final double exponent; - /** Cached numerical mean */ - private double numericalMean = Double.NaN; - /** Whether or not the numerical mean has been calculated */ - private boolean numericalMeanIsCalculated = false; - /** Cached numerical variance */ - private double numericalVariance = Double.NaN; - /** Whether or not the numerical variance has been calculated */ - private boolean numericalVarianceIsCalculated = false; - /** The sampler to be used for the sample() method */ - private transient ZipfRejectionInversionSampler sampler; - - /** - * Create a new Zipf distribution with the given number of elements and - * exponent. - * <p> - * <b>Note:</b> this constructor will implicitly create an instance of - * {@link Well19937c} as random generator to be used for sampling only (see - * {@link #sample()} and {@link #sample(int)}). In case no sampling is - * needed for the created distribution, it is advised to pass {@code null} - * as random generator via the appropriate constructors to avoid the - * additional initialisation overhead. - * - * @param numberOfElements Number of elements. - * @param exponent Exponent. - * @exception NotStrictlyPositiveException if {@code numberOfElements <= 0} - * or {@code exponent <= 0}. - */ - public ZipfDistribution(final int numberOfElements, final double exponent) { - this(new Well19937c(), numberOfElements, exponent); - } - - /** - * Creates a Zipf distribution. - * - * @param rng Random number generator. - * @param numberOfElements Number of elements. - * @param exponent Exponent. - * @exception NotStrictlyPositiveException if {@code numberOfElements <= 0} - * or {@code exponent <= 0}. - * @since 3.1 - */ - public ZipfDistribution(RandomGenerator rng, - int numberOfElements, - double exponent) - throws NotStrictlyPositiveException { - super(rng); - - if (numberOfElements <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, - numberOfElements); - } - if (exponent <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.EXPONENT, - exponent); - } - - this.numberOfElements = numberOfElements; - this.exponent = exponent; - } - - /** - * Get the number of elements (e.g. corpus size) for the distribution. - * - * @return the number of elements - */ - public int getNumberOfElements() { - return numberOfElements; - } - - /** - * Get the exponent characterizing the distribution. - * - * @return the exponent - */ - public double getExponent() { - return exponent; - } - - /** {@inheritDoc} */ - public double probability(final int x) { - if (x <= 0 || x > numberOfElements) { - return 0.0; - } - - return (1.0 / FastMath.pow(x, exponent)) / generalizedHarmonic(numberOfElements, exponent); - } - - /** {@inheritDoc} */ - @Override - public double logProbability(int x) { - if (x <= 0 || x > numberOfElements) { - return Double.NEGATIVE_INFINITY; - } - - return -FastMath.log(x) * exponent - FastMath.log(generalizedHarmonic(numberOfElements, exponent)); - } - - /** {@inheritDoc} */ - public double cumulativeProbability(final int x) { - if (x <= 0) { - return 0.0; - } else if (x >= numberOfElements) { - return 1.0; - } - - return generalizedHarmonic(x, exponent) / generalizedHarmonic(numberOfElements, exponent); - } - - /** - * {@inheritDoc} - * - * For number of elements {@code N} and exponent {@code s}, the mean is - * {@code Hs1 / Hs}, where - * <ul> - * <li>{@code Hs1 = generalizedHarmonic(N, s - 1)},</li> - * <li>{@code Hs = generalizedHarmonic(N, s)}.</li> - * </ul> - */ - public double getNumericalMean() { - if (!numericalMeanIsCalculated) { - numericalMean = calculateNumericalMean(); - numericalMeanIsCalculated = true; - } - return numericalMean; - } - - /** - * Used by {@link #getNumericalMean()}. - * - * @return the mean of this distribution - */ - protected double calculateNumericalMean() { - final int N = getNumberOfElements(); - final double s = getExponent(); - - final double Hs1 = generalizedHarmonic(N, s - 1); - final double Hs = generalizedHarmonic(N, s); - - return Hs1 / Hs; - } - - /** - * {@inheritDoc} - * - * For number of elements {@code N} and exponent {@code s}, the mean is - * {@code (Hs2 / Hs) - (Hs1^2 / Hs^2)}, where - * <ul> - * <li>{@code Hs2 = generalizedHarmonic(N, s - 2)},</li> - * <li>{@code Hs1 = generalizedHarmonic(N, s - 1)},</li> - * <li>{@code Hs = generalizedHarmonic(N, s)}.</li> - * </ul> - */ - public double getNumericalVariance() { - if (!numericalVarianceIsCalculated) { - numericalVariance = calculateNumericalVariance(); - numericalVarianceIsCalculated = true; - } - return numericalVariance; - } - - /** - * Used by {@link #getNumericalVariance()}. - * - * @return the variance of this distribution - */ - protected double calculateNumericalVariance() { - final int N = getNumberOfElements(); - final double s = getExponent(); - - final double Hs2 = generalizedHarmonic(N, s - 2); - final double Hs1 = generalizedHarmonic(N, s - 1); - final double Hs = generalizedHarmonic(N, s); - - return (Hs2 / Hs) - ((Hs1 * Hs1) / (Hs * Hs)); - } - - /** - * Calculates the Nth generalized harmonic number. See - * <a href="http://mathworld.wolfram.com/HarmonicSeries.html">Harmonic - * Series</a>. - * - * @param n Term in the series to calculate (must be larger than 1) - * @param m Exponent (special case {@code m = 1} is the harmonic series). - * @return the n<sup>th</sup> generalized harmonic number. - */ - private double generalizedHarmonic(final int n, final double m) { - double value = 0; - for (int k = n; k > 0; --k) { - value += 1.0 / FastMath.pow(k, m); - } - return value; - } - - /** - * {@inheritDoc} - * - * The lower bound of the support is always 1 no matter the parameters. - * - * @return lower bound of the support (always 1) - */ - public int getSupportLowerBound() { - return 1; - } - - /** - * {@inheritDoc} - * - * The upper bound of the support is the number of elements. - * - * @return upper bound of the support - */ - public int getSupportUpperBound() { - return getNumberOfElements(); - } - - /** - * {@inheritDoc} - * - * The support of this distribution is connected. - * - * @return {@code true} - */ - public boolean isSupportConnected() { - return true; - } - - /** - * {@inheritDoc} - */ - @Override - public int sample() { - if (sampler == null) { - sampler = new ZipfRejectionInversionSampler(numberOfElements, exponent); - } - return sampler.sample(random); - } - - /** - * Utility class implementing a rejection inversion sampling method for a discrete, - * bounded Zipf distribution that is based on the method described in - * <p> - * Wolfgang Hörmann and Gerhard Derflinger - * "Rejection-inversion to generate variates from monotone discrete distributions." - * ACM Transactions on Modeling and Computer Simulation (TOMACS) 6.3 (1996): 169-184. - * <p> - * The paper describes an algorithm for exponents larger than 1 (Algorithm ZRI). - * The original method uses {@code H(x) := (v + x)^(1 - q) / (1 - q)} - * as the integral of the hat function. This function is undefined for - * q = 1, which is the reason for the limitation of the exponent. - * If instead the integral function - * {@code H(x) := ((v + x)^(1 - q) - 1) / (1 - q)} is used, - * for which a meaningful limit exists for q = 1, - * the method works for all positive exponents. - * <p> - * The following implementation uses v := 0 and generates integral numbers - * in the range [1, numberOfElements]. This is different to the original method - * where v is defined to be positive and numbers are taken from [0, i_max]. - * This explains why the implementation looks slightly different. - * - * @since 3.6 - */ - static final class ZipfRejectionInversionSampler { - - /** Exponent parameter of the distribution. */ - private final double exponent; - /** Number of elements. */ - private final int numberOfElements; - /** Constant equal to {@code hIntegral(1.5) - 1}. */ - private final double hIntegralX1; - /** Constant equal to {@code hIntegral(numberOfElements + 0.5)}. */ - private final double hIntegralNumberOfElements; - /** Constant equal to {@code 2 - hIntegralInverse(hIntegral(2.5) - h(2)}. */ - private final double s; - - /** Simple constructor. - * @param numberOfElements number of elements - * @param exponent exponent parameter of the distribution - */ - ZipfRejectionInversionSampler(final int numberOfElements, final double exponent) { - this.exponent = exponent; - this.numberOfElements = numberOfElements; - this.hIntegralX1 = hIntegral(1.5) - 1d; - this.hIntegralNumberOfElements = hIntegral(numberOfElements + 0.5); - this.s = 2d - hIntegralInverse(hIntegral(2.5) - h(2)); - } - - /** Generate one integral number in the range [1, numberOfElements]. - * @param random random generator to use - * @return generated integral number in the range [1, numberOfElements] - */ - int sample(final RandomGenerator random) { - while(true) { - - final double u = hIntegralNumberOfElements + random.nextDouble() * (hIntegralX1 - hIntegralNumberOfElements); - // u is uniformly distributed in (hIntegralX1, hIntegralNumberOfElements] - - double x = hIntegralInverse(u); - - int k = (int)(x + 0.5); - - // Limit k to the range [1, numberOfElements] - // (k could be outside due to numerical inaccuracies) - if (k < 1) { - k = 1; - } - else if (k > numberOfElements) { - k = numberOfElements; - } - - // Here, the distribution of k is given by: - // - // P(k = 1) = C * (hIntegral(1.5) - hIntegralX1) = C - // P(k = m) = C * (hIntegral(m + 1/2) - hIntegral(m - 1/2)) for m >= 2 - // - // where C := 1 / (hIntegralNumberOfElements - hIntegralX1) - - if (k - x <= s || u >= hIntegral(k + 0.5) - h(k)) { - - // Case k = 1: - // - // The right inequality is always true, because replacing k by 1 gives - // u >= hIntegral(1.5) - h(1) = hIntegralX1 and u is taken from - // (hIntegralX1, hIntegralNumberOfElements]. - // - // Therefore, the acceptance rate for k = 1 is P(accepted | k = 1) = 1 - // and the probability that 1 is returned as random value is - // P(k = 1 and accepted) = P(accepted | k = 1) * P(k = 1) = C = C / 1^exponent - // - // Case k >= 2: - // - // The left inequality (k - x <= s) is just a short cut - // to avoid the more expensive evaluation of the right inequality - // (u >= hIntegral(k + 0.5) - h(k)) in many cases. - // - // If the left inequality is true, the right inequality is also true: - // Theorem 2 in the paper is valid for all positive exponents, because - // the requirements h'(x) = -exponent/x^(exponent + 1) < 0 and - // (-1/hInverse'(x))'' = (1+1/exponent) * x^(1/exponent-1) >= 0 - // are both fulfilled. - // Therefore, f(x) := x - hIntegralInverse(hIntegral(x + 0.5) - h(x)) - // is a non-decreasing function. If k - x <= s holds, - // k - x <= s + f(k) - f(2) is obviously also true which is equivalent to - // -x <= -hIntegralInverse(hIntegral(k + 0.5) - h(k)), - // -hIntegralInverse(u) <= -hIntegralInverse(hIntegral(k + 0.5) - h(k)), - // and finally u >= hIntegral(k + 0.5) - h(k). - // - // Hence, the right inequality determines the acceptance rate: - // P(accepted | k = m) = h(m) / (hIntegrated(m+1/2) - hIntegrated(m-1/2)) - // The probability that m is returned is given by - // P(k = m and accepted) = P(accepted | k = m) * P(k = m) = C * h(m) = C / m^exponent. - // - // In both cases the probabilities are proportional to the probability mass function - // of the Zipf distribution. - - return k; - } - } - } - - /** - * {@code H(x) :=} - * <ul> - * <li>{@code (x^(1-exponent) - 1)/(1 - exponent)}, if {@code exponent != 1}</li> - * <li>{@code log(x)}, if {@code exponent == 1}</li> - * </ul> - * H(x) is an integral function of h(x), - * the derivative of H(x) is h(x). - * - * @param x free parameter - * @return {@code H(x)} - */ - private double hIntegral(final double x) { - final double logX = FastMath.log(x); - return helper2((1d-exponent)*logX)*logX; - } - - /** - * {@code h(x) := 1/x^exponent} - * - * @param x free parameter - * @return h(x) - */ - private double h(final double x) { - return FastMath.exp(-exponent * FastMath.log(x)); - } - - /** - * The inverse function of H(x). - * - * @param x free parameter - * @return y for which {@code H(y) = x} - */ - private double hIntegralInverse(final double x) { - double t = x*(1d-exponent); - if (t < -1d) { - // Limit value to the range [-1, +inf). - // t could be smaller than -1 in some rare cases due to numerical errors. - t = -1; - } - return FastMath.exp(helper1(t)*x); - } - - /** - * Helper function that calculates {@code log(1+x)/x}. - * <p> - * A Taylor series expansion is used, if x is close to 0. - * - * @param x a value larger than or equal to -1 - * @return {@code log(1+x)/x} - */ - static double helper1(final double x) { - if (FastMath.abs(x)>1e-8) { - return FastMath.log1p(x)/x; - } - else { - return 1.-x*((1./2.)-x*((1./3.)-x*(1./4.))); - } - } - - /** - * Helper function to calculate {@code (exp(x)-1)/x}. - * <p> - * A Taylor series expansion is used, if x is close to 0. - * - * @param x free parameter - * @return {@code (exp(x)-1)/x} if x is non-zero, or 1 if x=0 - */ - static double helper2(final double x) { - if (FastMath.abs(x)>1e-8) { - return FastMath.expm1(x)/x; - } - else { - return 1.+x*(1./2.)*(1.+x*(1./3.)*(1.+x*(1./4.))); - } - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/ConvergenceException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/ConvergenceException.java deleted file mode 100644 index 9fb59c1accab..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/ConvergenceException.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Error thrown when a numerical computation can not be performed because the - * numerical result failed to converge to a finite value. - * - * @since 2.2 - */ -public class ConvergenceException extends MathIllegalStateException { - /** Serializable version Id. */ - private static final long serialVersionUID = 4330003017885151975L; - - /** - * Construct the exception. - */ - public ConvergenceException() { - this(LocalizedFormats.CONVERGENCE_FAILED); - } - - /** - * Construct the exception with a specific context and arguments. - * - * @param pattern Message pattern providing the specific context of - * the error. - * @param args Arguments. - */ - public ConvergenceException(Localizable pattern, - Object ... args) { - getContext().addMessage(pattern, args); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/DimensionMismatchException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/DimensionMismatchException.java deleted file mode 100644 index 282eeeb4e7d0..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/DimensionMismatchException.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; - -/** - * Exception to be thrown when two dimensions differ. - * - * @since 2.2 - */ -public class DimensionMismatchException extends MathIllegalNumberException { - /** Serializable version Id. */ - private static final long serialVersionUID = -8415396756375798143L; - /** Correct dimension. */ - private final int dimension; - - /** - * Construct an exception from the mismatched dimensions. - * - * @param specific Specific context information pattern. - * @param wrong Wrong dimension. - * @param expected Expected dimension. - */ - public DimensionMismatchException(Localizable specific, - int wrong, - int expected) { - super(specific, Integer.valueOf(wrong), Integer.valueOf(expected)); - dimension = expected; - } - - /** - * Construct an exception from the mismatched dimensions. - * - * @param wrong Wrong dimension. - * @param expected Expected dimension. - */ - public DimensionMismatchException(int wrong, - int expected) { - this(LocalizedFormats.DIMENSIONS_MISMATCH_SIMPLE, wrong, expected); - } - - /** - * @return the expected dimension. - */ - public int getDimension() { - return dimension; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathArithmeticException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathArithmeticException.java deleted file mode 100644 index 14bf21eb4dc7..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathArithmeticException.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.ExceptionContext; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.ExceptionContextProvider; - -/** - * Base class for arithmetic exceptions. - * It is used for all the exceptions that have the semantics of the standard - * {@link ArithmeticException}, but must also provide a localized - * message. - * - * @since 3.0 - */ -public class MathArithmeticException extends ArithmeticException - implements ExceptionContextProvider { - /** Serializable version Id. */ - private static final long serialVersionUID = -6024911025449780478L; - /** Context. */ - private final ExceptionContext context; - - /** - * Default constructor. - */ - public MathArithmeticException() { - context = new ExceptionContext(this); - context.addMessage(LocalizedFormats.ARITHMETIC_EXCEPTION); - } - - /** - * Constructor with a specific message. - * - * @param pattern Message pattern providing the specific context of - * the error. - * @param args Arguments. - */ - public MathArithmeticException(Localizable pattern, - Object ... args) { - context = new ExceptionContext(this); - context.addMessage(pattern, args); - } - - /** {@inheritDoc} */ - public ExceptionContext getContext() { - return context; - } - - /** {@inheritDoc} */ - @Override - public String getMessage() { - return context.getMessage(); - } - - /** {@inheritDoc} */ - @Override - public String getLocalizedMessage() { - return context.getLocalizedMessage(); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathIllegalArgumentException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathIllegalArgumentException.java deleted file mode 100644 index 31037b394d02..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathIllegalArgumentException.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.ExceptionContext; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.ExceptionContextProvider; - -/** - * Base class for all preconditions violation exceptions. - * In most cases, this class should not be instantiated directly: it should - * serve as a base class to create all the exceptions that have the semantics - * of the standard {@link IllegalArgumentException}. - * - * @since 2.2 - */ -public class MathIllegalArgumentException extends IllegalArgumentException - implements ExceptionContextProvider { - /** Serializable version Id. */ - private static final long serialVersionUID = -6024911025449780478L; - /** Context. */ - private final ExceptionContext context; - - /** - * @param pattern Message pattern explaining the cause of the error. - * @param args Arguments. - */ - public MathIllegalArgumentException(Localizable pattern, - Object ... args) { - context = new ExceptionContext(this); - context.addMessage(pattern, args); - } - - /** {@inheritDoc} */ - public ExceptionContext getContext() { - return context; - } - - /** {@inheritDoc} */ - @Override - public String getMessage() { - return context.getMessage(); - } - - /** {@inheritDoc} */ - @Override - public String getLocalizedMessage() { - return context.getLocalizedMessage(); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathIllegalNumberException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathIllegalNumberException.java deleted file mode 100644 index e12ab9164f4d..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathIllegalNumberException.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; - -/** - * Base class for exceptions raised by a wrong number. - * This class is not intended to be instantiated directly: it should serve - * as a base class to create all the exceptions that are raised because some - * precondition is violated by a number argument. - * - * @since 2.2 - */ -public class MathIllegalNumberException extends MathIllegalArgumentException { - - /** Helper to avoid boxing warnings. @since 3.3 */ - protected static final Integer INTEGER_ZERO = Integer.valueOf(0); - - /** Serializable version Id. */ - private static final long serialVersionUID = -7447085893598031110L; - - /** Requested. */ - private final Number argument; - - /** - * Construct an exception. - * - * @param pattern Localizable pattern. - * @param wrong Wrong number. - * @param arguments Arguments. - */ - protected MathIllegalNumberException(Localizable pattern, - Number wrong, - Object ... arguments) { - super(pattern, wrong, arguments); - argument = wrong; - } - - /** - * @return the requested value. - */ - public Number getArgument() { - return argument; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathIllegalStateException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathIllegalStateException.java deleted file mode 100644 index 6c1dc615bcc6..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathIllegalStateException.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.ExceptionContext; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.ExceptionContextProvider; - -/** - * Base class for all exceptions that signal that the process - * throwing the exception is in a state that does not comply with - * the set of states that it is designed to be in. - * - * @since 2.2 - */ -public class MathIllegalStateException extends IllegalStateException - implements ExceptionContextProvider { - /** Serializable version Id. */ - private static final long serialVersionUID = -6024911025449780478L; - /** Context. */ - private final ExceptionContext context; - - /** - * Simple constructor. - * - * @param pattern Message pattern explaining the cause of the error. - * @param args Arguments. - */ - public MathIllegalStateException(Localizable pattern, - Object ... args) { - context = new ExceptionContext(this); - context.addMessage(pattern, args); - } - - /** - * Simple constructor. - * - * @param cause Root cause. - * @param pattern Message pattern explaining the cause of the error. - * @param args Arguments. - */ - public MathIllegalStateException(Throwable cause, - Localizable pattern, - Object ... args) { - super(cause); - context = new ExceptionContext(this); - context.addMessage(pattern, args); - } - - /** - * Default constructor. - */ - public MathIllegalStateException() { - this(LocalizedFormats.ILLEGAL_STATE); - } - - /** {@inheritDoc} */ - public ExceptionContext getContext() { - return context; - } - - /** {@inheritDoc} */ - @Override - public String getMessage() { - return context.getMessage(); - } - - /** {@inheritDoc} */ - @Override - public String getLocalizedMessage() { - return context.getLocalizedMessage(); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathInternalError.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathInternalError.java deleted file mode 100644 index e1c69fa9717e..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathInternalError.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Exception triggered when something that shouldn't happen does happen. - * - * @since 2.2 - */ -public class MathInternalError extends MathIllegalStateException { - /** Serializable version Id. */ - private static final long serialVersionUID = -6276776513966934846L; - /** URL for reporting problems. */ - private static final String REPORT_URL = "https://issues.apache.org/jira/browse/MATH"; - - /** - * Simple constructor. - */ - public MathInternalError() { - getContext().addMessage(LocalizedFormats.INTERNAL_ERROR, REPORT_URL); - } - - /** - * Simple constructor. - * @param cause root cause - */ - public MathInternalError(final Throwable cause) { - super(cause, LocalizedFormats.INTERNAL_ERROR, REPORT_URL); - } - - /** - * Constructor accepting a localized message. - * - * @param pattern Message pattern explaining the cause of the error. - * @param args Arguments. - */ - public MathInternalError(Localizable pattern, Object ... args) { - super(pattern, args); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathUnsupportedOperationException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathUnsupportedOperationException.java deleted file mode 100644 index ce0e6f3ab493..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MathUnsupportedOperationException.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.ExceptionContext; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.ExceptionContextProvider; - -/** - * Base class for all unsupported features. - * It is used for all the exceptions that have the semantics of the standard - * {@link UnsupportedOperationException}, but must also provide a localized - * message. - * - * @since 2.2 - */ -public class MathUnsupportedOperationException extends UnsupportedOperationException - implements ExceptionContextProvider { - /** Serializable version Id. */ - private static final long serialVersionUID = -6024911025449780478L; - /** Context. */ - private final ExceptionContext context; - - /** - * Default constructor. - */ - public MathUnsupportedOperationException() { - this(LocalizedFormats.UNSUPPORTED_OPERATION); - } - /** - * @param pattern Message pattern providing the specific context of - * the error. - * @param args Arguments. - */ - public MathUnsupportedOperationException(Localizable pattern, - Object ... args) { - context = new ExceptionContext(this); - context.addMessage(pattern, args); - } - - /** {@inheritDoc} */ - public ExceptionContext getContext() { - return context; - } - - /** {@inheritDoc} */ - @Override - public String getMessage() { - return context.getMessage(); - } - - /** {@inheritDoc} */ - @Override - public String getLocalizedMessage() { - return context.getLocalizedMessage(); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MaxCountExceededException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MaxCountExceededException.java deleted file mode 100644 index 1229d2b9010e..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/MaxCountExceededException.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Exception to be thrown when some counter maximum value is exceeded. - * - * @since 3.0 - */ -public class MaxCountExceededException extends MathIllegalStateException { - /** Serializable version Id. */ - private static final long serialVersionUID = 4330003017885151975L; - /** - * Maximum number of evaluations. - */ - private final Number max; - - /** - * Construct the exception. - * - * @param max Maximum. - */ - public MaxCountExceededException(Number max) { - this(LocalizedFormats.MAX_COUNT_EXCEEDED, max); - } - /** - * Construct the exception with a specific context. - * - * @param specific Specific context pattern. - * @param max Maximum. - * @param args Additional arguments. - */ - public MaxCountExceededException(Localizable specific, - Number max, - Object ... args) { - getContext().addMessage(specific, max, args); - this.max = max; - } - - /** - * @return the maximum number of evaluations. - */ - public Number getMax() { - return max; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NoBracketingException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NoBracketingException.java deleted file mode 100644 index 4edcff6b68b7..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NoBracketingException.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Exception to be thrown when function values have the same sign at both - * ends of an interval. - * - * @since 3.0 - */ -public class NoBracketingException extends MathIllegalArgumentException { - /** Serializable version Id. */ - private static final long serialVersionUID = -3629324471511904459L; - /** Lower end of the interval. */ - private final double lo; - /** Higher end of the interval. */ - private final double hi; - /** Value at lower end of the interval. */ - private final double fLo; - /** Value at higher end of the interval. */ - private final double fHi; - - /** - * Construct the exception. - * - * @param lo Lower end of the interval. - * @param hi Higher end of the interval. - * @param fLo Value at lower end of the interval. - * @param fHi Value at higher end of the interval. - */ - public NoBracketingException(double lo, double hi, - double fLo, double fHi) { - this(LocalizedFormats.SAME_SIGN_AT_ENDPOINTS, lo, hi, fLo, fHi); - } - - /** - * Construct the exception with a specific context. - * - * @param specific Contextual information on what caused the exception. - * @param lo Lower end of the interval. - * @param hi Higher end of the interval. - * @param fLo Value at lower end of the interval. - * @param fHi Value at higher end of the interval. - * @param args Additional arguments. - */ - public NoBracketingException(Localizable specific, - double lo, double hi, - double fLo, double fHi, - Object ... args) { - super(specific, Double.valueOf(lo), Double.valueOf(hi), Double.valueOf(fLo), Double.valueOf(fHi), args); - this.lo = lo; - this.hi = hi; - this.fLo = fLo; - this.fHi = fHi; - } - - /** - * Get the lower end of the interval. - * - * @return the lower end. - */ - public double getLo() { - return lo; - } - /** - * Get the higher end of the interval. - * - * @return the higher end. - */ - public double getHi() { - return hi; - } - /** - * Get the value at the lower end of the interval. - * - * @return the value at the lower end. - */ - public double getFLo() { - return fLo; - } - /** - * Get the value at the higher end of the interval. - * - * @return the value at the higher end. - */ - public double getFHi() { - return fHi; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NoDataException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NoDataException.java deleted file mode 100644 index 6a27421c72b8..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NoDataException.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Exception to be thrown when the required data is missing. - * - * @since 2.2 - */ -public class NoDataException extends MathIllegalArgumentException { - - /** Serializable version Id. */ - private static final long serialVersionUID = -3629324471511904459L; - - /** - * Construct the exception. - */ - public NoDataException() { - this(LocalizedFormats.NO_DATA); - } - /** - * Construct the exception with a specific context. - * - * @param specific Contextual information on what caused the exception. - */ - public NoDataException(Localizable specific) { - super(specific); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NonMonotonicSequenceException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NonMonotonicSequenceException.java deleted file mode 100644 index 9ad213238aef..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NonMonotonicSequenceException.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.util.MathArrays; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Exception to be thrown when the a sequence of values is not monotonically - * increasing or decreasing. - * - * @since 2.2 (name changed to "NonMonotonicSequenceException" in 3.0) - */ -public class NonMonotonicSequenceException extends MathIllegalNumberException { - /** Serializable version Id. */ - private static final long serialVersionUID = 3596849179428944575L; - /** - * Direction (positive for increasing, negative for decreasing). - */ - private final MathArrays.OrderDirection direction; - /** - * Whether the sequence must be strictly increasing or decreasing. - */ - private final boolean strict; - /** - * Index of the wrong value. - */ - private final int index; - /** - * Previous value. - */ - private final Number previous; - - /** - * Construct the exception. - * This constructor uses default values assuming that the sequence should - * have been strictly increasing. - * - * @param wrong Value that did not match the requirements. - * @param previous Previous value in the sequence. - * @param index Index of the value that did not match the requirements. - */ - public NonMonotonicSequenceException(Number wrong, - Number previous, - int index) { - this(wrong, previous, index, MathArrays.OrderDirection.INCREASING, true); - } - - /** - * Construct the exception. - * - * @param wrong Value that did not match the requirements. - * @param previous Previous value in the sequence. - * @param index Index of the value that did not match the requirements. - * @param direction Strictly positive for a sequence required to be - * increasing, negative (or zero) for a decreasing sequence. - * @param strict Whether the sequence must be strictly increasing or - * decreasing. - */ - public NonMonotonicSequenceException(Number wrong, - Number previous, - int index, - MathArrays.OrderDirection direction, - boolean strict) { - super(direction == MathArrays.OrderDirection.INCREASING ? - (strict ? - LocalizedFormats.NOT_STRICTLY_INCREASING_SEQUENCE : - LocalizedFormats.NOT_INCREASING_SEQUENCE) : - (strict ? - LocalizedFormats.NOT_STRICTLY_DECREASING_SEQUENCE : - LocalizedFormats.NOT_DECREASING_SEQUENCE), - wrong, previous, Integer.valueOf(index), Integer.valueOf(index - 1)); - - this.direction = direction; - this.strict = strict; - this.index = index; - this.previous = previous; - } - - /** - * @return the order direction. - **/ - public MathArrays.OrderDirection getDirection() { - return direction; - } - /** - * @return {@code true} is the sequence should be strictly monotonic. - **/ - public boolean getStrict() { - return strict; - } - /** - * Get the index of the wrong value. - * - * @return the current index. - */ - public int getIndex() { - return index; - } - /** - * @return the previous value. - */ - public Number getPrevious() { - return previous; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NotANumberException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NotANumberException.java deleted file mode 100644 index 8f8edc2e30fc..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NotANumberException.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Exception to be thrown when a number is not a number. - * - * @since 3.1 - */ -public class NotANumberException extends MathIllegalNumberException { - /** Serializable version Id. */ - private static final long serialVersionUID = 20120906L; - - /** - * Construct the exception. - */ - public NotANumberException() { - super(LocalizedFormats.NAN_NOT_ALLOWED, Double.valueOf(Double.NaN)); - } - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NotFiniteNumberException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NotFiniteNumberException.java deleted file mode 100644 index bae07e7c891d..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NotFiniteNumberException.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Exception to be thrown when a number is not finite. - * - * @since 3.0 - */ -public class NotFiniteNumberException extends MathIllegalNumberException { - /** Serializable version Id. */ - private static final long serialVersionUID = -6100997100383932834L; - - /** - * Construct the exception. - * - * @param wrong Value that is infinite or NaN. - * @param args Optional arguments. - */ - public NotFiniteNumberException(Number wrong, - Object ... args) { - this(LocalizedFormats.NOT_FINITE_NUMBER, wrong, args); - } - - /** - * Construct the exception with a specific context. - * - * @param specific Specific context pattern. - * @param wrong Value that is infinite or NaN. - * @param args Optional arguments. - */ - public NotFiniteNumberException(Localizable specific, - Number wrong, - Object ... args) { - super(specific, wrong, args); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NotPositiveException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NotPositiveException.java deleted file mode 100644 index 1e91eb035493..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NotPositiveException.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; - -/** - * Exception to be thrown when the argument is negative. - * - * @since 2.2 - */ -public class NotPositiveException extends NumberIsTooSmallException { - /** Serializable version Id. */ - private static final long serialVersionUID = -2250556892093726375L; - - /** - * Construct the exception. - * - * @param value Argument. - */ - public NotPositiveException(Number value) { - super(value, INTEGER_ZERO, true); - } - /** - * Construct the exception with a specific context. - * - * @param specific Specific context where the error occurred. - * @param value Argument. - */ - public NotPositiveException(Localizable specific, - Number value) { - super(specific, value, INTEGER_ZERO, true); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NotStrictlyPositiveException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NotStrictlyPositiveException.java deleted file mode 100644 index e76647673aad..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NotStrictlyPositiveException.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; - -/** - * Exception to be thrown when the argument is not greater than 0. - * - * @since 2.2 - */ -public class NotStrictlyPositiveException extends NumberIsTooSmallException { - - /** Serializable version Id. */ - private static final long serialVersionUID = -7824848630829852237L; - - /** - * Construct the exception. - * - * @param value Argument. - */ - public NotStrictlyPositiveException(Number value) { - super(value, INTEGER_ZERO, false); - } - /** - * Construct the exception with a specific context. - * - * @param specific Specific context where the error occurred. - * @param value Argument. - */ - public NotStrictlyPositiveException(Localizable specific, - Number value) { - super(specific, value, INTEGER_ZERO, false); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NullArgumentException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NullArgumentException.java deleted file mode 100644 index cce9d4445454..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NullArgumentException.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * All conditions checks that fail due to a {@code null} argument must throw - * this exception. - * This class is meant to signal a precondition violation ("null is an illegal - * argument") and so does not extend the standard {@code NullPointerException}. - * Propagation of {@code NullPointerException} from within Commons-Math is - * construed to be a bug. - * - * @since 2.2 - */ -public class NullArgumentException extends MathIllegalArgumentException { - /** Serializable version Id. */ - private static final long serialVersionUID = -6024911025449780478L; - - /** - * Default constructor. - */ - public NullArgumentException() { - this(LocalizedFormats.NULL_NOT_ALLOWED); - } - /** - * @param pattern Message pattern providing the specific context of - * the error. - * @param arguments Values for replacing the placeholders in {@code pattern}. - */ - public NullArgumentException(Localizable pattern, - Object ... arguments) { - super(pattern, arguments); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NumberIsTooLargeException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NumberIsTooLargeException.java deleted file mode 100644 index cb3116e22c67..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NumberIsTooLargeException.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Exception to be thrown when a number is too large. - * - * @since 2.2 - */ -public class NumberIsTooLargeException extends MathIllegalNumberException { - /** Serializable version Id. */ - private static final long serialVersionUID = 4330003017885151975L; - /** - * Higher bound. - */ - private final Number max; - /** - * Whether the maximum is included in the allowed range. - */ - private final boolean boundIsAllowed; - - /** - * Construct the exception. - * - * @param wrong Value that is larger than the maximum. - * @param max Maximum. - * @param boundIsAllowed if true the maximum is included in the allowed range. - */ - public NumberIsTooLargeException(Number wrong, - Number max, - boolean boundIsAllowed) { - this(boundIsAllowed ? - LocalizedFormats.NUMBER_TOO_LARGE : - LocalizedFormats.NUMBER_TOO_LARGE_BOUND_EXCLUDED, - wrong, max, boundIsAllowed); - } - /** - * Construct the exception with a specific context. - * - * @param specific Specific context pattern. - * @param wrong Value that is larger than the maximum. - * @param max Maximum. - * @param boundIsAllowed if true the maximum is included in the allowed range. - */ - public NumberIsTooLargeException(Localizable specific, - Number wrong, - Number max, - boolean boundIsAllowed) { - super(specific, wrong, max); - - this.max = max; - this.boundIsAllowed = boundIsAllowed; - } - - /** - * @return {@code true} if the maximum is included in the allowed range. - */ - public boolean getBoundIsAllowed() { - return boundIsAllowed; - } - - /** - * @return the maximum. - */ - public Number getMax() { - return max; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NumberIsTooSmallException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NumberIsTooSmallException.java deleted file mode 100644 index 9aedf0ea500d..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/NumberIsTooSmallException.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Exception to be thrown when a number is too small. - * - * @since 2.2 - */ -public class NumberIsTooSmallException extends MathIllegalNumberException { - /** Serializable version Id. */ - private static final long serialVersionUID = -6100997100383932834L; - /** - * Higher bound. - */ - private final Number min; - /** - * Whether the maximum is included in the allowed range. - */ - private final boolean boundIsAllowed; - - /** - * Construct the exception. - * - * @param wrong Value that is smaller than the minimum. - * @param min Minimum. - * @param boundIsAllowed Whether {@code min} is included in the allowed range. - */ - public NumberIsTooSmallException(Number wrong, - Number min, - boolean boundIsAllowed) { - this(boundIsAllowed ? - LocalizedFormats.NUMBER_TOO_SMALL : - LocalizedFormats.NUMBER_TOO_SMALL_BOUND_EXCLUDED, - wrong, min, boundIsAllowed); - } - - /** - * Construct the exception with a specific context. - * - * @param specific Specific context pattern. - * @param wrong Value that is smaller than the minimum. - * @param min Minimum. - * @param boundIsAllowed Whether {@code min} is included in the allowed range. - */ - public NumberIsTooSmallException(Localizable specific, - Number wrong, - Number min, - boolean boundIsAllowed) { - super(specific, wrong, min); - - this.min = min; - this.boundIsAllowed = boundIsAllowed; - } - - /** - * @return {@code true} if the minimum is included in the allowed range. - */ - public boolean getBoundIsAllowed() { - return boundIsAllowed; - } - - /** - * @return the minimum. - */ - public Number getMin() { - return min; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/OutOfRangeException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/OutOfRangeException.java deleted file mode 100644 index b34cc75410f4..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/OutOfRangeException.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; - -/** - * Exception to be thrown when some argument is out of range. - * - * @since 2.2 - */ -public class OutOfRangeException extends MathIllegalNumberException { - /** Serializable version Id. */ - private static final long serialVersionUID = 111601815794403609L; - /** Lower bound. */ - private final Number lo; - /** Higher bound. */ - private final Number hi; - - /** - * Construct an exception from the mismatched dimensions. - * - * @param wrong Requested value. - * @param lo Lower bound. - * @param hi Higher bound. - */ - public OutOfRangeException(Number wrong, - Number lo, - Number hi) { - this(LocalizedFormats.OUT_OF_RANGE_SIMPLE, wrong, lo, hi); - } - - /** - * Construct an exception from the mismatched dimensions with a - * specific context information. - * - * @param specific Context information. - * @param wrong Requested value. - * @param lo Lower bound. - * @param hi Higher bound. - */ - public OutOfRangeException(Localizable specific, - Number wrong, - Number lo, - Number hi) { - super(specific, wrong, lo, hi); - this.lo = lo; - this.hi = hi; - } - - /** - * @return the lower bound. - */ - public Number getLo() { - return lo; - } - /** - * @return the higher bound. - */ - public Number getHi() { - return hi; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/TooManyEvaluationsException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/TooManyEvaluationsException.java deleted file mode 100644 index f3920a4d8128..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/TooManyEvaluationsException.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Exception to be thrown when the maximal number of evaluations is exceeded. - * - * @since 3.0 - */ -public class TooManyEvaluationsException extends MaxCountExceededException { - /** Serializable version Id. */ - private static final long serialVersionUID = 4330003017885151975L; - - /** - * Construct the exception. - * - * @param max Maximum number of evaluations. - */ - public TooManyEvaluationsException(Number max) { - super(max); - getContext().addMessage(LocalizedFormats.EVALUATIONS); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/ZeroException.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/ZeroException.java deleted file mode 100644 index 1aed8132bf80..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/ZeroException.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception; - -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Exception to be thrown when zero is provided where it is not allowed. - * - * @since 2.2 - */ -public class ZeroException extends MathIllegalNumberException { - - /** Serializable version identifier */ - private static final long serialVersionUID = -1960874856936000015L; - - /** - * Construct the exception. - */ - public ZeroException() { - this(LocalizedFormats.ZERO_NOT_ALLOWED); - } - - /** - * Construct the exception with a specific context. - * - * @param specific Specific context pattern. - * @param arguments Arguments. - */ - public ZeroException(Localizable specific, Object ... arguments) { - super(specific, INTEGER_ZERO, arguments); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/ArgUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/ArgUtils.java deleted file mode 100644 index 7630722724a6..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/ArgUtils.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception.util; - -import java.util.List; -import java.util.ArrayList; - -/** - * Utility class for transforming the list of arguments passed to - * constructors of exceptions. - * - */ -public class ArgUtils { - /** - * Class contains only static methods. - */ - private ArgUtils() {} - - /** - * Transform a multidimensional array into a one-dimensional list. - * - * @param array Array (possibly multidimensional). - * @return a list of all the {@code Object} instances contained in - * {@code array}. - */ - public static Object[] flatten(Object[] array) { - final List<Object> list = new ArrayList<Object>(); - if (array != null) { - for (Object o : array) { - if (o instanceof Object[]) { - for (Object oR : flatten((Object[]) o)) { - list.add(oR); - } - } else { - list.add(o); - } - } - } - return list.toArray(); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/DummyLocalizable.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/DummyLocalizable.java deleted file mode 100644 index 43ed8bdb3c04..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/DummyLocalizable.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception.util; - -import java.util.Locale; - -/** - * Dummy implementation of the {@link Localizable} interface, without localization. - * - * @since 2.2 - */ -public class DummyLocalizable implements Localizable { - - /** Serializable version identifier. */ - private static final long serialVersionUID = 8843275624471387299L; - - /** Source string. */ - private final String source; - - /** Simple constructor. - * @param source source text - */ - public DummyLocalizable(final String source) { - this.source = source; - } - - /** {@inheritDoc} */ - public String getSourceString() { - return source; - } - - /** {@inheritDoc} */ - public String getLocalizedString(Locale locale) { - return source; - } - - /** {@inheritDoc} */ - @Override - public String toString() { - return source; - } - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/ExceptionContext.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/ExceptionContext.java deleted file mode 100644 index 6d93100780d4..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/ExceptionContext.java +++ /dev/null @@ -1,338 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception.util; - -import java.util.List; -import java.util.ArrayList; -import java.util.Set; -import java.util.Map; -import java.io.IOException; -import java.io.Serializable; -import java.io.ObjectOutputStream; -import java.io.ObjectInputStream; -import java.util.HashMap; -import java.text.MessageFormat; -import java.util.Locale; - -/** - * Class that contains the actual implementation of the functionality mandated - * by the {@link ExceptionContext} interface. - * All Commons Math exceptions delegate the interface's methods to this class. - * - * @since 3.0 - */ -public class ExceptionContext implements Serializable { - /** Serializable version Id. */ - private static final long serialVersionUID = -6024911025449780478L; - /** - * The throwable to which this context refers to. - */ - private Throwable throwable; - /** - * Various informations that enrich the informative message. - */ - private List<Localizable> msgPatterns; - /** - * Various informations that enrich the informative message. - * The arguments will replace the corresponding place-holders in - * {@link #msgPatterns}. - */ - private List<Object[]> msgArguments; - /** - * Arbitrary context information. - */ - private Map<String, Object> context; - - /** Simple constructor. - * @param throwable the exception this context refers too - */ - public ExceptionContext(final Throwable throwable) { - this.throwable = throwable; - msgPatterns = new ArrayList<Localizable>(); - msgArguments = new ArrayList<Object[]>(); - context = new HashMap<String, Object>(); - } - - /** Get a reference to the exception to which the context relates. - * @return a reference to the exception to which the context relates - */ - public Throwable getThrowable() { - return throwable; - } - - /** - * Adds a message. - * - * @param pattern Message pattern. - * @param arguments Values for replacing the placeholders in the message - * pattern. - */ - public void addMessage(Localizable pattern, - Object ... arguments) { - msgPatterns.add(pattern); - msgArguments.add(ArgUtils.flatten(arguments)); - } - - /** - * Sets the context (key, value) pair. - * Keys are assumed to be unique within an instance. If the same key is - * assigned a new value, the previous one will be lost. - * - * @param key Context key (not null). - * @param value Context value. - */ - public void setValue(String key, Object value) { - context.put(key, value); - } - - /** - * Gets the value associated to the given context key. - * - * @param key Context key. - * @return the context value or {@code null} if the key does not exist. - */ - public Object getValue(String key) { - return context.get(key); - } - - /** - * Gets all the keys stored in the exception - * - * @return the set of keys. - */ - public Set<String> getKeys() { - return context.keySet(); - } - - /** - * Gets the default message. - * - * @return the message. - */ - public String getMessage() { - return getMessage(Locale.US); - } - - /** - * Gets the message in the default locale. - * - * @return the localized message. - */ - public String getLocalizedMessage() { - return getMessage(Locale.getDefault()); - } - - /** - * Gets the message in a specified locale. - * - * @param locale Locale in which the message should be translated. - * @return the localized message. - */ - public String getMessage(final Locale locale) { - return buildMessage(locale, ": "); - } - - /** - * Gets the message in a specified locale. - * - * @param locale Locale in which the message should be translated. - * @param separator Separator inserted between the message parts. - * @return the localized message. - */ - public String getMessage(final Locale locale, - final String separator) { - return buildMessage(locale, separator); - } - - /** - * Builds a message string. - * - * @param locale Locale in which the message should be translated. - * @param separator Message separator. - * @return a localized message string. - */ - private String buildMessage(Locale locale, - String separator) { - final StringBuilder sb = new StringBuilder(); - int count = 0; - final int len = msgPatterns.size(); - for (int i = 0; i < len; i++) { - final Localizable pat = msgPatterns.get(i); - final Object[] args = msgArguments.get(i); - final MessageFormat fmt = new MessageFormat(pat.getLocalizedString(locale), - locale); - sb.append(fmt.format(args)); - if (++count < len) { - // Add a separator if there are other messages. - sb.append(separator); - } - } - - return sb.toString(); - } - - /** - * Serialize this object to the given stream. - * - * @param out Stream. - * @throws IOException This should never happen. - */ - private void writeObject(ObjectOutputStream out) - throws IOException { - out.writeObject(throwable); - serializeMessages(out); - serializeContext(out); - } - /** - * Deserialize this object from the given stream. - * - * @param in Stream. - * @throws IOException This should never happen. - * @throws ClassNotFoundException This should never happen. - */ - private void readObject(ObjectInputStream in) - throws IOException, - ClassNotFoundException { - throwable = (Throwable) in.readObject(); - deSerializeMessages(in); - deSerializeContext(in); - } - - /** - * Serialize {@link #msgPatterns} and {@link #msgArguments}. - * - * @param out Stream. - * @throws IOException This should never happen. - */ - private void serializeMessages(ObjectOutputStream out) - throws IOException { - // Step 1. - final int len = msgPatterns.size(); - out.writeInt(len); - // Step 2. - for (int i = 0; i < len; i++) { - final Localizable pat = msgPatterns.get(i); - // Step 3. - out.writeObject(pat); - final Object[] args = msgArguments.get(i); - final int aLen = args.length; - // Step 4. - out.writeInt(aLen); - for (int j = 0; j < aLen; j++) { - if (args[j] instanceof Serializable) { - // Step 5a. - out.writeObject(args[j]); - } else { - // Step 5b. - out.writeObject(nonSerializableReplacement(args[j])); - } - } - } - } - - /** - * Deserialize {@link #msgPatterns} and {@link #msgArguments}. - * - * @param in Stream. - * @throws IOException This should never happen. - * @throws ClassNotFoundException This should never happen. - */ - private void deSerializeMessages(ObjectInputStream in) - throws IOException, - ClassNotFoundException { - // Step 1. - final int len = in.readInt(); - msgPatterns = new ArrayList<Localizable>(len); - msgArguments = new ArrayList<Object[]>(len); - // Step 2. - for (int i = 0; i < len; i++) { - // Step 3. - final Localizable pat = (Localizable) in.readObject(); - msgPatterns.add(pat); - // Step 4. - final int aLen = in.readInt(); - final Object[] args = new Object[aLen]; - for (int j = 0; j < aLen; j++) { - // Step 5. - args[j] = in.readObject(); - } - msgArguments.add(args); - } - } - - /** - * Serialize {@link #context}. - * - * @param out Stream. - * @throws IOException This should never happen. - */ - private void serializeContext(ObjectOutputStream out) - throws IOException { - // Step 1. - final int len = context.size(); - out.writeInt(len); - for (Map.Entry<String, Object> entry : context.entrySet()) { - // Step 2. - out.writeObject(entry.getKey()); - final Object value = entry.getValue(); - if (value instanceof Serializable) { - // Step 3a. - out.writeObject(value); - } else { - // Step 3b. - out.writeObject(nonSerializableReplacement(value)); - } - } - } - - /** - * Deserialize {@link #context}. - * - * @param in Stream. - * @throws IOException This should never happen. - * @throws ClassNotFoundException This should never happen. - */ - private void deSerializeContext(ObjectInputStream in) - throws IOException, - ClassNotFoundException { - // Step 1. - final int len = in.readInt(); - context = new HashMap<String, Object>(); - for (int i = 0; i < len; i++) { - // Step 2. - final String key = (String) in.readObject(); - // Step 3. - final Object value = in.readObject(); - context.put(key, value); - } - } - - /** - * Replaces a non-serializable object with an error message string. - * - * @param obj Object that does not implement the {@code Serializable} - * interface. - * @return a string that mentions which class could not be serialized. - */ - private String nonSerializableReplacement(Object obj) { - return "[Object could not be serialized: " + obj.getClass().getName() + "]"; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/ExceptionContextProvider.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/ExceptionContextProvider.java deleted file mode 100644 index 33f864dd348f..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/ExceptionContextProvider.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception.util; - -/** - * Interface for accessing the context data structure stored in Commons Math - * exceptions. - * - */ -public interface ExceptionContextProvider { - /** - * Gets a reference to the "rich context" data structure that allows to - * customize error messages and store key, value pairs in exceptions. - * - * @return a reference to the exception context. - */ - ExceptionContext getContext(); - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/Localizable.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/Localizable.java deleted file mode 100644 index 0a5fa1911358..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/Localizable.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception.util; - -import java.io.Serializable; -import java.util.Locale; - -/** - * Interface for localizable strings. - * - * @since 2.2 - */ -public interface Localizable extends Serializable { - /** - * Gets the source (non-localized) string. - * - * @return the source string. - */ - String getSourceString(); - - /** - * Gets the localized string. - * - * @param locale locale into which to get the string. - * @return the localized string or the source string if no - * localized version is available. - */ - String getLocalizedString(Locale locale); -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/LocalizedFormats.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/LocalizedFormats.java deleted file mode 100644 index a999accd6fc5..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/LocalizedFormats.java +++ /dev/null @@ -1,418 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.exception.util; - -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * Enumeration for localized messages formats used in exceptions messages. - * <p> - * The constants in this enumeration represent the available - * formats as localized strings. These formats are intended to be - * localized using simple properties files, using the constant - * name as the key and the property value as the message format. - * The source English format is provided in the constants themselves - * to serve both as a reminder for developers to understand the parameters - * needed by each format, as a basis for translators to create - * localized properties files, and as a default format if some - * translation is missing. - * </p> - * @since 2.2 - */ -public enum LocalizedFormats implements Localizable { - - // CHECKSTYLE: stop MultipleVariableDeclarations - // CHECKSTYLE: stop JavadocVariable - - ARGUMENT_OUTSIDE_DOMAIN("Argument {0} outside domain [{1} ; {2}]"), - ARRAY_SIZE_EXCEEDS_MAX_VARIABLES("array size cannot be greater than {0}"), - ARRAY_SIZES_SHOULD_HAVE_DIFFERENCE_1("array sizes should have difference 1 ({0} != {1} + 1)"), - ARRAY_SUMS_TO_ZERO("array sums to zero"), - ASSYMETRIC_EIGEN_NOT_SUPPORTED("eigen decomposition of assymetric matrices not supported yet"), - AT_LEAST_ONE_COLUMN("matrix must have at least one column"), - AT_LEAST_ONE_ROW("matrix must have at least one row"), - BANDWIDTH("bandwidth ({0})"), - BESSEL_FUNCTION_BAD_ARGUMENT("Bessel function of order {0} cannot be computed for x = {1}"), - BESSEL_FUNCTION_FAILED_CONVERGENCE("Bessel function of order {0} failed to converge for x = {1}"), - BINOMIAL_INVALID_PARAMETERS_ORDER("must have n >= k for binomial coefficient (n, k), got k = {0}, n = {1}"), - BINOMIAL_NEGATIVE_PARAMETER("must have n >= 0 for binomial coefficient (n, k), got n = {0}"), - CANNOT_CLEAR_STATISTIC_CONSTRUCTED_FROM_EXTERNAL_MOMENTS("statistics constructed from external moments cannot be cleared"), - CANNOT_COMPUTE_0TH_ROOT_OF_UNITY("cannot compute 0-th root of unity, indefinite result"), - CANNOT_COMPUTE_BETA_DENSITY_AT_0_FOR_SOME_ALPHA("cannot compute beta density at 0 when alpha = {0,number}"), - CANNOT_COMPUTE_BETA_DENSITY_AT_1_FOR_SOME_BETA("cannot compute beta density at 1 when beta = %.3g"), - CANNOT_COMPUTE_NTH_ROOT_FOR_NEGATIVE_N("cannot compute nth root for null or negative n: {0}"), - CANNOT_DISCARD_NEGATIVE_NUMBER_OF_ELEMENTS("cannot discard a negative number of elements ({0})"), - CANNOT_FORMAT_INSTANCE_AS_3D_VECTOR("cannot format a {0} instance as a 3D vector"), - CANNOT_FORMAT_INSTANCE_AS_COMPLEX("cannot format a {0} instance as a complex number"), - CANNOT_FORMAT_INSTANCE_AS_REAL_VECTOR("cannot format a {0} instance as a real vector"), - CANNOT_FORMAT_OBJECT_TO_FRACTION("cannot format given object as a fraction number"), - CANNOT_INCREMENT_STATISTIC_CONSTRUCTED_FROM_EXTERNAL_MOMENTS("statistics constructed from external moments cannot be incremented"), - CANNOT_NORMALIZE_A_ZERO_NORM_VECTOR("cannot normalize a zero norm vector"), - CANNOT_RETRIEVE_AT_NEGATIVE_INDEX("elements cannot be retrieved from a negative array index {0}"), - CANNOT_SET_AT_NEGATIVE_INDEX("cannot set an element at a negative index {0}"), - CANNOT_SUBSTITUTE_ELEMENT_FROM_EMPTY_ARRAY("cannot substitute an element from an empty array"), - CANNOT_TRANSFORM_TO_DOUBLE("Conversion Exception in Transformation: {0}"), - CARDAN_ANGLES_SINGULARITY("Cardan angles singularity"), - CLASS_DOESNT_IMPLEMENT_COMPARABLE("class ({0}) does not implement Comparable"), - CLOSE_VERTICES("too close vertices near point ({0}, {1}, {2})"), - CLOSEST_ORTHOGONAL_MATRIX_HAS_NEGATIVE_DETERMINANT("the closest orthogonal matrix has a negative determinant {0}"), - COLUMN_INDEX_OUT_OF_RANGE("column index {0} out of allowed range [{1}, {2}]"), - COLUMN_INDEX("column index ({0})"), /* keep */ - CONSTRAINT("constraint"), /* keep */ - CONTINUED_FRACTION_INFINITY_DIVERGENCE("Continued fraction convergents diverged to +/- infinity for value {0}"), - CONTINUED_FRACTION_NAN_DIVERGENCE("Continued fraction diverged to NaN for value {0}"), - CONTRACTION_CRITERIA_SMALLER_THAN_EXPANSION_FACTOR("contraction criteria ({0}) smaller than the expansion factor ({1}). This would lead to a never ending loop of expansion and contraction as a newly expanded internal storage array would immediately satisfy the criteria for contraction."), - CONTRACTION_CRITERIA_SMALLER_THAN_ONE("contraction criteria smaller than one ({0}). This would lead to a never ending loop of expansion and contraction as an internal storage array length equal to the number of elements would satisfy the contraction criteria."), - CONVERGENCE_FAILED("convergence failed"), /* keep */ - CROSSING_BOUNDARY_LOOPS("some outline boundary loops cross each other"), - CROSSOVER_RATE("crossover rate ({0})"), - CUMULATIVE_PROBABILITY_RETURNED_NAN("Cumulative probability function returned NaN for argument {0} p = {1}"), - DIFFERENT_ROWS_LENGTHS("some rows have length {0} while others have length {1}"), - DIFFERENT_ORIG_AND_PERMUTED_DATA("original and permuted data must contain the same elements"), - DIGEST_NOT_INITIALIZED("digest not initialized"), - DIMENSIONS_MISMATCH_2x2("got {0}x{1} but expected {2}x{3}"), /* keep */ - DIMENSIONS_MISMATCH_SIMPLE("{0} != {1}"), /* keep */ - DIMENSIONS_MISMATCH("dimensions mismatch"), /* keep */ - DISCRETE_CUMULATIVE_PROBABILITY_RETURNED_NAN("Discrete cumulative probability function returned NaN for argument {0}"), - DISTRIBUTION_NOT_LOADED("distribution not loaded"), - DUPLICATED_ABSCISSA_DIVISION_BY_ZERO("duplicated abscissa {0} causes division by zero"), - EDGE_CONNECTED_TO_ONE_FACET("edge joining points ({0}, {1}, {2}) and ({3}, {4}, {5}) is connected to one facet only"), - ELITISM_RATE("elitism rate ({0})"), - EMPTY_CLUSTER_IN_K_MEANS("empty cluster in k-means"), - EMPTY_INTERPOLATION_SAMPLE("sample for interpolation is empty"), - EMPTY_POLYNOMIALS_COEFFICIENTS_ARRAY("empty polynomials coefficients array"), /* keep */ - EMPTY_SELECTED_COLUMN_INDEX_ARRAY("empty selected column index array"), - EMPTY_SELECTED_ROW_INDEX_ARRAY("empty selected row index array"), - EMPTY_STRING_FOR_IMAGINARY_CHARACTER("empty string for imaginary character"), - ENDPOINTS_NOT_AN_INTERVAL("endpoints do not specify an interval: [{0}, {1}]"), - EQUAL_VERTICES_IN_SIMPLEX("equal vertices {0} and {1} in simplex configuration"), - EULER_ANGLES_SINGULARITY("Euler angles singularity"), - EVALUATION("evaluation"), /* keep */ - EXPANSION_FACTOR_SMALLER_THAN_ONE("expansion factor smaller than one ({0})"), - FACET_ORIENTATION_MISMATCH("facets orientation mismatch around edge joining points ({0}, {1}, {2}) and ({3}, {4}, {5})"), - FACTORIAL_NEGATIVE_PARAMETER("must have n >= 0 for n!, got n = {0}"), - FAILED_BRACKETING("number of iterations={4}, maximum iterations={5}, initial={6}, lower bound={7}, upper bound={8}, final a value={0}, final b value={1}, f(a)={2}, f(b)={3}"), - FAILED_FRACTION_CONVERSION("Unable to convert {0} to fraction after {1} iterations"), - FIRST_COLUMNS_NOT_INITIALIZED_YET("first {0} columns are not initialized yet"), - FIRST_ELEMENT_NOT_ZERO("first element is not 0: {0}"), - FIRST_ROWS_NOT_INITIALIZED_YET("first {0} rows are not initialized yet"), - FRACTION_CONVERSION_OVERFLOW("Overflow trying to convert {0} to fraction ({1}/{2})"), - FUNCTION_NOT_DIFFERENTIABLE("function is not differentiable"), - FUNCTION_NOT_POLYNOMIAL("function is not polynomial"), - GCD_OVERFLOW_32_BITS("overflow: gcd({0}, {1}) is 2^31"), - GCD_OVERFLOW_64_BITS("overflow: gcd({0}, {1}) is 2^63"), - HOLE_BETWEEN_MODELS_TIME_RANGES("{0} wide hole between models time ranges"), - ILL_CONDITIONED_OPERATOR("condition number {1} is too high "), - INCONSISTENT_STATE_AT_2_PI_WRAPPING("inconsistent state at 2\u03c0 wrapping"), - INDEX_LARGER_THAN_MAX("the index specified: {0} is larger than the current maximal index {1}"), - INDEX_NOT_POSITIVE("index ({0}) is not positive"), - INDEX_OUT_OF_RANGE("index {0} out of allowed range [{1}, {2}]"), - INDEX("index ({0})"), /* keep */ - NOT_FINITE_NUMBER("{0} is not a finite number"), /* keep */ - INFINITE_BOUND("interval bounds must be finite"), - ARRAY_ELEMENT("value {0} at index {1}"), /* keep */ - INFINITE_ARRAY_ELEMENT("Array contains an infinite element, {0} at index {1}"), - INFINITE_VALUE_CONVERSION("cannot convert infinite value"), - INITIAL_CAPACITY_NOT_POSITIVE("initial capacity ({0}) is not positive"), - INITIAL_COLUMN_AFTER_FINAL_COLUMN("initial column {1} after final column {0}"), - INITIAL_ROW_AFTER_FINAL_ROW("initial row {1} after final row {0}"), - @Deprecated - INPUT_DATA_FROM_UNSUPPORTED_DATASOURCE("input data comes from unsupported datasource: {0}, supported sources: {1}, {2}"), - INSTANCES_NOT_COMPARABLE_TO_EXISTING_VALUES("instance of class {0} not comparable to existing values"), - INSUFFICIENT_DATA("insufficient data"), - INSUFFICIENT_DATA_FOR_T_STATISTIC("insufficient data for t statistic, needs at least 2, got {0}"), - INSUFFICIENT_DIMENSION("insufficient dimension {0}, must be at least {1}"), - DIMENSION("dimension ({0})"), /* keep */ - INSUFFICIENT_OBSERVED_POINTS_IN_SAMPLE("sample contains {0} observed points, at least {1} are required"), - INSUFFICIENT_ROWS_AND_COLUMNS("insufficient data: only {0} rows and {1} columns."), - INTEGRATION_METHOD_NEEDS_AT_LEAST_TWO_PREVIOUS_POINTS("multistep method needs at least {0} previous steps, got {1}"), - INTERNAL_ERROR("internal error, please fill a bug report at {0}"), - INVALID_BINARY_DIGIT("invalid binary digit: {0}"), - INVALID_BINARY_CHROMOSOME("binary mutation works on BinaryChromosome only"), - INVALID_BRACKETING_PARAMETERS("invalid bracketing parameters: lower bound={0}, initial={1}, upper bound={2}"), - INVALID_FIXED_LENGTH_CHROMOSOME("one-point crossover only works with fixed-length chromosomes"), - INVALID_IMPLEMENTATION("required functionality is missing in {0}"), - INVALID_INTERVAL_INITIAL_VALUE_PARAMETERS("invalid interval, initial value parameters: lower={0}, initial={1}, upper={2}"), - INVALID_ITERATIONS_LIMITS("invalid iteration limits: min={0}, max={1}"), - INVALID_MAX_ITERATIONS("bad value for maximum iterations number: {0}"), - NOT_ENOUGH_DATA_REGRESSION("the number of observations is not sufficient to conduct regression"), - INVALID_REGRESSION_ARRAY("input data array length = {0} does not match the number of observations = {1} and the number of regressors = {2}"), - INVALID_REGRESSION_OBSERVATION("length of regressor array = {0} does not match the number of variables = {1} in the model"), - INVALID_ROUNDING_METHOD("invalid rounding method {0}, valid methods: {1} ({2}), {3} ({4}), {5} ({6}), {7} ({8}), {9} ({10}), {11} ({12}), {13} ({14}), {15} ({16})"), - ITERATOR_EXHAUSTED("iterator exhausted"), - ITERATIONS("iterations"), /* keep */ - LCM_OVERFLOW_32_BITS("overflow: lcm({0}, {1}) is 2^31"), - LCM_OVERFLOW_64_BITS("overflow: lcm({0}, {1}) is 2^63"), - LIST_OF_CHROMOSOMES_BIGGER_THAN_POPULATION_SIZE("list of chromosomes bigger than maxPopulationSize"), - LOESS_EXPECTS_AT_LEAST_ONE_POINT("Loess expects at least 1 point"), - LOWER_BOUND_NOT_BELOW_UPPER_BOUND("lower bound ({0}) must be strictly less than upper bound ({1})"), /* keep */ - LOWER_ENDPOINT_ABOVE_UPPER_ENDPOINT("lower endpoint ({0}) must be less than or equal to upper endpoint ({1})"), - MAP_MODIFIED_WHILE_ITERATING("map has been modified while iterating"), - MULTISTEP_STARTER_STOPPED_EARLY("multistep integrator starter stopped early, maybe too large step size"), - EVALUATIONS("evaluations"), /* keep */ - MAX_COUNT_EXCEEDED("maximal count ({0}) exceeded"), /* keep */ - MAX_ITERATIONS_EXCEEDED("maximal number of iterations ({0}) exceeded"), - MINIMAL_STEPSIZE_REACHED_DURING_INTEGRATION("minimal step size ({1,number,0.00E00}) reached, integration needs {0,number,0.00E00}"), - MISMATCHED_LOESS_ABSCISSA_ORDINATE_ARRAYS("Loess expects the abscissa and ordinate arrays to be of the same size, but got {0} abscissae and {1} ordinatae"), - MUTATION_RATE("mutation rate ({0})"), - NAN_ELEMENT_AT_INDEX("element {0} is NaN"), - NAN_VALUE_CONVERSION("cannot convert NaN value"), - NEGATIVE_BRIGHTNESS_EXPONENT("brightness exponent should be positive or null, but got {0}"), - NEGATIVE_COMPLEX_MODULE("negative complex module {0}"), - NEGATIVE_ELEMENT_AT_2D_INDEX("element ({0}, {1}) is negative: {2}"), - NEGATIVE_ELEMENT_AT_INDEX("element {0} is negative: {1}"), - NEGATIVE_NUMBER_OF_SUCCESSES("number of successes must be non-negative ({0})"), - NUMBER_OF_SUCCESSES("number of successes ({0})"), /* keep */ - NEGATIVE_NUMBER_OF_TRIALS("number of trials must be non-negative ({0})"), - NUMBER_OF_INTERPOLATION_POINTS("number of interpolation points ({0})"), /* keep */ - NUMBER_OF_TRIALS("number of trials ({0})"), - NOT_CONVEX("vertices do not form a convex hull in CCW winding"), - NOT_CONVEX_HYPERPLANES("hyperplanes do not define a convex region"), - ROBUSTNESS_ITERATIONS("number of robustness iterations ({0})"), - START_POSITION("start position ({0})"), /* keep */ - NON_CONVERGENT_CONTINUED_FRACTION("Continued fraction convergents failed to converge (in less than {0} iterations) for value {1}"), - NON_INVERTIBLE_TRANSFORM("non-invertible affine transform collapses some lines into single points"), - NON_POSITIVE_MICROSPHERE_ELEMENTS("number of microsphere elements must be positive, but got {0}"), - NON_POSITIVE_POLYNOMIAL_DEGREE("polynomial degree must be positive: degree={0}"), - NON_REAL_FINITE_ABSCISSA("all abscissae must be finite real numbers, but {0}-th is {1}"), - NON_REAL_FINITE_ORDINATE("all ordinatae must be finite real numbers, but {0}-th is {1}"), - NON_REAL_FINITE_WEIGHT("all weights must be finite real numbers, but {0}-th is {1}"), - NON_SQUARE_MATRIX("non square ({0}x{1}) matrix"), - NORM("Norm ({0})"), /* keep */ - NORMALIZE_INFINITE("Cannot normalize to an infinite value"), - NORMALIZE_NAN("Cannot normalize to NaN"), - NOT_ADDITION_COMPATIBLE_MATRICES("{0}x{1} and {2}x{3} matrices are not addition compatible"), - NOT_DECREASING_NUMBER_OF_POINTS("points {0} and {1} are not decreasing ({2} < {3})"), - NOT_DECREASING_SEQUENCE("points {3} and {2} are not decreasing ({1} < {0})"), /* keep */ - NOT_ENOUGH_DATA_FOR_NUMBER_OF_PREDICTORS("not enough data ({0} rows) for this many predictors ({1} predictors)"), - NOT_ENOUGH_POINTS_IN_SPLINE_PARTITION("spline partition must have at least {0} points, got {1}"), - NOT_INCREASING_NUMBER_OF_POINTS("points {0} and {1} are not increasing ({2} > {3})"), - NOT_INCREASING_SEQUENCE("points {3} and {2} are not increasing ({1} > {0})"), /* keep */ - NOT_MULTIPLICATION_COMPATIBLE_MATRICES("{0}x{1} and {2}x{3} matrices are not multiplication compatible"), - NOT_POSITIVE_DEFINITE_MATRIX("not positive definite matrix"), /* keep */ - NON_POSITIVE_DEFINITE_MATRIX("not positive definite matrix: diagonal element at ({1},{1}) is smaller than {2} ({0})"), - NON_POSITIVE_DEFINITE_OPERATOR("non positive definite linear operator"), /* keep */ - NON_SELF_ADJOINT_OPERATOR("non self-adjoint linear operator"), /* keep */ - NON_SQUARE_OPERATOR("non square ({0}x{1}) linear operator"), /* keep */ - DEGREES_OF_FREEDOM("degrees of freedom ({0})"), /* keep */ - NOT_POSITIVE_DEGREES_OF_FREEDOM("degrees of freedom must be positive ({0})"), - NOT_POSITIVE_ELEMENT_AT_INDEX("element {0} is not positive: {1}"), - NOT_POSITIVE_EXPONENT("invalid exponent {0} (must be positive)"), - NUMBER_OF_ELEMENTS_SHOULD_BE_POSITIVE("number of elements should be positive ({0})"), - BASE("base ({0})"), /* keep */ - EXPONENT("exponent ({0})"), /* keep */ - NOT_POSITIVE_LENGTH("length must be positive ({0})"), - LENGTH("length ({0})"), /* keep */ - NOT_POSITIVE_MEAN("mean must be positive ({0})"), - MEAN("mean ({0})"), /* keep */ - NOT_POSITIVE_NUMBER_OF_SAMPLES("number of sample is not positive: {0}"), - NUMBER_OF_SAMPLES("number of samples ({0})"), /* keep */ - NOT_POSITIVE_PERMUTATION("permutation k ({0}) must be positive"), - PERMUTATION_SIZE("permutation size ({0}"), /* keep */ - NOT_POSITIVE_POISSON_MEAN("the Poisson mean must be positive ({0})"), - NOT_POSITIVE_POPULATION_SIZE("population size must be positive ({0})"), - POPULATION_SIZE("population size ({0})"), /* keep */ - NOT_POSITIVE_ROW_DIMENSION("invalid row dimension: {0} (must be positive)"), - NOT_POSITIVE_SAMPLE_SIZE("sample size must be positive ({0})"), - NOT_POSITIVE_SCALE("scale must be positive ({0})"), - SCALE("scale ({0})"), /* keep */ - NOT_POSITIVE_SHAPE("shape must be positive ({0})"), - SHAPE("shape ({0})"), /* keep */ - NOT_POSITIVE_STANDARD_DEVIATION("standard deviation must be positive ({0})"), - STANDARD_DEVIATION("standard deviation ({0})"), /* keep */ - NOT_POSITIVE_UPPER_BOUND("upper bound must be positive ({0})"), - NOT_POSITIVE_WINDOW_SIZE("window size must be positive ({0})"), - NOT_POWER_OF_TWO("{0} is not a power of 2"), - NOT_POWER_OF_TWO_CONSIDER_PADDING("{0} is not a power of 2, consider padding for fix"), - NOT_POWER_OF_TWO_PLUS_ONE("{0} is not a power of 2 plus one"), - NOT_STRICTLY_DECREASING_NUMBER_OF_POINTS("points {0} and {1} are not strictly decreasing ({2} <= {3})"), - NOT_STRICTLY_DECREASING_SEQUENCE("points {3} and {2} are not strictly decreasing ({1} <= {0})"), /* keep */ - NOT_STRICTLY_INCREASING_KNOT_VALUES("knot values must be strictly increasing"), - NOT_STRICTLY_INCREASING_NUMBER_OF_POINTS("points {0} and {1} are not strictly increasing ({2} >= {3})"), - NOT_STRICTLY_INCREASING_SEQUENCE("points {3} and {2} are not strictly increasing ({1} >= {0})"), /* keep */ - NOT_SUBTRACTION_COMPATIBLE_MATRICES("{0}x{1} and {2}x{3} matrices are not subtraction compatible"), - NOT_SUPPORTED_IN_DIMENSION_N("method not supported in dimension {0}"), - NOT_SYMMETRIC_MATRIX("not symmetric matrix"), - NON_SYMMETRIC_MATRIX("non symmetric matrix: the difference between entries at ({0},{1}) and ({1},{0}) is larger than {2}"), /* keep */ - NO_BIN_SELECTED("no bin selected"), - NO_CONVERGENCE_WITH_ANY_START_POINT("none of the {0} start points lead to convergence"), /* keep */ - NO_DATA("no data"), /* keep */ - NO_DEGREES_OF_FREEDOM("no degrees of freedom ({0} measurements, {1} parameters)"), - NO_DENSITY_FOR_THIS_DISTRIBUTION("This distribution does not have a density function implemented"), - NO_FEASIBLE_SOLUTION("no feasible solution"), - NO_OPTIMUM_COMPUTED_YET("no optimum computed yet"), /* keep */ - NO_REGRESSORS("Regression model must include at least one regressor"), - NO_RESULT_AVAILABLE("no result available"), - NO_SUCH_MATRIX_ENTRY("no entry at indices ({0}, {1}) in a {2}x{3} matrix"), - NAN_NOT_ALLOWED("NaN is not allowed"), - NULL_NOT_ALLOWED("null is not allowed"), /* keep */ - ARRAY_ZERO_LENGTH_OR_NULL_NOT_ALLOWED("a null or zero length array not allowed"), - COVARIANCE_MATRIX("covariance matrix"), /* keep */ - DENOMINATOR("denominator"), /* keep */ - DENOMINATOR_FORMAT("denominator format"), /* keep */ - FRACTION("fraction"), /* keep */ - FUNCTION("function"), /* keep */ - IMAGINARY_FORMAT("imaginary format"), /* keep */ - INPUT_ARRAY("input array"), /* keep */ - NUMERATOR("numerator"), /* keep */ - NUMERATOR_FORMAT("numerator format"), /* keep */ - OBJECT_TRANSFORMATION("conversion exception in transformation"), /* keep */ - REAL_FORMAT("real format"), /* keep */ - WHOLE_FORMAT("whole format"), /* keep */ - NUMBER_TOO_LARGE("{0} is larger than the maximum ({1})"), /* keep */ - NUMBER_TOO_SMALL("{0} is smaller than the minimum ({1})"), /* keep */ - NUMBER_TOO_LARGE_BOUND_EXCLUDED("{0} is larger than, or equal to, the maximum ({1})"), /* keep */ - NUMBER_TOO_SMALL_BOUND_EXCLUDED("{0} is smaller than, or equal to, the minimum ({1})"), /* keep */ - NUMBER_OF_SUCCESS_LARGER_THAN_POPULATION_SIZE("number of successes ({0}) must be less than or equal to population size ({1})"), - NUMERATOR_OVERFLOW_AFTER_MULTIPLY("overflow, numerator too large after multiply: {0}"), - N_POINTS_GAUSS_LEGENDRE_INTEGRATOR_NOT_SUPPORTED("{0} points Legendre-Gauss integrator not supported, number of points must be in the {1}-{2} range"), - OBSERVED_COUNTS_ALL_ZERO("observed counts are all 0 in observed array {0}"), - OBSERVED_COUNTS_BOTTH_ZERO_FOR_ENTRY("observed counts are both zero for entry {0}"), - BOBYQA_BOUND_DIFFERENCE_CONDITION("the difference between the upper and lower bound must be larger than twice the initial trust region radius ({0})"), - OUT_OF_BOUNDS_QUANTILE_VALUE("out of bounds quantile value: {0}, must be in (0, 100]"), - OUT_OF_BOUNDS_CONFIDENCE_LEVEL("out of bounds confidence level {0}, must be between {1} and {2}"), - OUT_OF_BOUND_SIGNIFICANCE_LEVEL("out of bounds significance level {0}, must be between {1} and {2}"), - SIGNIFICANCE_LEVEL("significance level ({0})"), /* keep */ - OUT_OF_ORDER_ABSCISSA_ARRAY("the abscissae array must be sorted in a strictly increasing order, but the {0}-th element is {1} whereas {2}-th is {3}"), - OUT_OF_PLANE("point ({0}, {1}, {2}) is out of plane"), - OUT_OF_RANGE_ROOT_OF_UNITY_INDEX("out of range root of unity index {0} (must be in [{1};{2}])"), - OUT_OF_RANGE("out of range"), /* keep */ - OUT_OF_RANGE_SIMPLE("{0} out of [{1}, {2}] range"), /* keep */ - OUT_OF_RANGE_LEFT("{0} out of ({1}, {2}] range"), - OUT_OF_RANGE_RIGHT("{0} out of [{1}, {2}) range"), - OUTLINE_BOUNDARY_LOOP_OPEN("an outline boundary loop is open"), - OVERFLOW("overflow"), /* keep */ - OVERFLOW_IN_FRACTION("overflow in fraction {0}/{1}, cannot negate"), - OVERFLOW_IN_ADDITION("overflow in addition: {0} + {1}"), - OVERFLOW_IN_SUBTRACTION("overflow in subtraction: {0} - {1}"), - OVERFLOW_IN_MULTIPLICATION("overflow in multiplication: {0} * {1}"), - PERCENTILE_IMPLEMENTATION_CANNOT_ACCESS_METHOD("cannot access {0} method in percentile implementation {1}"), - PERCENTILE_IMPLEMENTATION_UNSUPPORTED_METHOD("percentile implementation {0} does not support {1}"), - PERMUTATION_EXCEEDS_N("permutation size ({0}) exceeds permuation domain ({1})"), /* keep */ - POLYNOMIAL("polynomial"), /* keep */ - POLYNOMIAL_INTERPOLANTS_MISMATCH_SEGMENTS("number of polynomial interpolants must match the number of segments ({0} != {1} - 1)"), - POPULATION_LIMIT_NOT_POSITIVE("population limit has to be positive"), - POWER_NEGATIVE_PARAMETERS("cannot raise an integral value to a negative power ({0}^{1})"), - PROPAGATION_DIRECTION_MISMATCH("propagation direction mismatch"), - RANDOMKEY_MUTATION_WRONG_CLASS("RandomKeyMutation works only with RandomKeys, not {0}"), - ROOTS_OF_UNITY_NOT_COMPUTED_YET("roots of unity have not been computed yet"), - ROTATION_MATRIX_DIMENSIONS("a {0}x{1} matrix cannot be a rotation matrix"), - ROW_INDEX_OUT_OF_RANGE("row index {0} out of allowed range [{1}, {2}]"), - ROW_INDEX("row index ({0})"), /* keep */ - SAME_SIGN_AT_ENDPOINTS("function values at endpoints do not have different signs, endpoints: [{0}, {1}], values: [{2}, {3}]"), - SAMPLE_SIZE_EXCEEDS_COLLECTION_SIZE("sample size ({0}) exceeds collection size ({1})"), /* keep */ - SAMPLE_SIZE_LARGER_THAN_POPULATION_SIZE("sample size ({0}) must be less than or equal to population size ({1})"), - SIMPLEX_NEED_ONE_POINT("simplex must contain at least one point"), - SIMPLE_MESSAGE("{0}"), - SINGULAR_MATRIX("matrix is singular"), /* keep */ - SINGULAR_OPERATOR("operator is singular"), - SUBARRAY_ENDS_AFTER_ARRAY_END("subarray ends after array end"), - TOO_LARGE_CUTOFF_SINGULAR_VALUE("cutoff singular value is {0}, should be at most {1}"), - TOO_LARGE_TOURNAMENT_ARITY("tournament arity ({0}) cannot be bigger than population size ({1})"), - TOO_MANY_ELEMENTS_TO_DISCARD_FROM_ARRAY("cannot discard {0} elements from a {1} elements array"), - TOO_MANY_REGRESSORS("too many regressors ({0}) specified, only {1} in the model"), - TOO_SMALL_COST_RELATIVE_TOLERANCE("cost relative tolerance is too small ({0}), no further reduction in the sum of squares is possible"), - TOO_SMALL_INTEGRATION_INTERVAL("too small integration interval: length = {0}"), - TOO_SMALL_ORTHOGONALITY_TOLERANCE("orthogonality tolerance is too small ({0}), solution is orthogonal to the jacobian"), - TOO_SMALL_PARAMETERS_RELATIVE_TOLERANCE("parameters relative tolerance is too small ({0}), no further improvement in the approximate solution is possible"), - TRUST_REGION_STEP_FAILED("trust region step has failed to reduce Q"), - TWO_OR_MORE_CATEGORIES_REQUIRED("two or more categories required, got {0}"), - TWO_OR_MORE_VALUES_IN_CATEGORY_REQUIRED("two or more values required in each category, one has {0}"), - UNABLE_TO_BRACKET_OPTIMUM_IN_LINE_SEARCH("unable to bracket optimum in line search"), - UNABLE_TO_COMPUTE_COVARIANCE_SINGULAR_PROBLEM("unable to compute covariances: singular problem"), - UNABLE_TO_FIRST_GUESS_HARMONIC_COEFFICIENTS("unable to first guess the harmonic coefficients"), - UNABLE_TO_ORTHOGONOLIZE_MATRIX("unable to orthogonalize matrix in {0} iterations"), - UNABLE_TO_PERFORM_QR_DECOMPOSITION_ON_JACOBIAN("unable to perform Q.R decomposition on the {0}x{1} jacobian matrix"), - UNABLE_TO_SOLVE_SINGULAR_PROBLEM("unable to solve: singular problem"), - UNBOUNDED_SOLUTION("unbounded solution"), - UNKNOWN_MODE("unknown mode {0}, known modes: {1} ({2}), {3} ({4}), {5} ({6}), {7} ({8}), {9} ({10}) and {11} ({12})"), - UNKNOWN_PARAMETER("unknown parameter {0}"), - UNMATCHED_ODE_IN_EXPANDED_SET("ode does not match the main ode set in the extended set"), - CANNOT_PARSE_AS_TYPE("string \"{0}\" unparseable (from position {1}) as an object of type {2}"), /* keep */ - CANNOT_PARSE("string \"{0}\" unparseable (from position {1})"), /* keep */ - UNPARSEABLE_3D_VECTOR("unparseable 3D vector: \"{0}\""), - UNPARSEABLE_COMPLEX_NUMBER("unparseable complex number: \"{0}\""), - UNPARSEABLE_REAL_VECTOR("unparseable real vector: \"{0}\""), - UNSUPPORTED_EXPANSION_MODE("unsupported expansion mode {0}, supported modes are {1} ({2}) and {3} ({4})"), - UNSUPPORTED_OPERATION("unsupported operation"), /* keep */ - ARITHMETIC_EXCEPTION("arithmetic exception"), /* keep */ - ILLEGAL_STATE("illegal state"), /* keep */ - USER_EXCEPTION("exception generated in user code"), /* keep */ - URL_CONTAINS_NO_DATA("URL {0} contains no data"), - VALUES_ADDED_BEFORE_CONFIGURING_STATISTIC("{0} values have been added before statistic is configured"), - VECTOR_LENGTH_MISMATCH("vector length mismatch: got {0} but expected {1}"), - VECTOR_MUST_HAVE_AT_LEAST_ONE_ELEMENT("vector must have at least one element"), - WEIGHT_AT_LEAST_ONE_NON_ZERO("weigth array must contain at least one non-zero value"), - WRONG_BLOCK_LENGTH("wrong array shape (block length = {0}, expected {1})"), - WRONG_NUMBER_OF_POINTS("{0} points are required, got only {1}"), - NUMBER_OF_POINTS("number of points ({0})"), /* keep */ - ZERO_DENOMINATOR("denominator must be different from 0"), /* keep */ - ZERO_DENOMINATOR_IN_FRACTION("zero denominator in fraction {0}/{1}"), - ZERO_FRACTION_TO_DIVIDE_BY("the fraction to divide by must not be zero: {0}/{1}"), - ZERO_NORM("zero norm"), - ZERO_NORM_FOR_ROTATION_AXIS("zero norm for rotation axis"), - ZERO_NORM_FOR_ROTATION_DEFINING_VECTOR("zero norm for rotation defining vector"), - ZERO_NOT_ALLOWED("zero not allowed here"); - - // CHECKSTYLE: resume JavadocVariable - // CHECKSTYLE: resume MultipleVariableDeclarations - - - /** Source English format. */ - private final String sourceFormat; - - /** Simple constructor. - * @param sourceFormat source English format to use when no - * localized version is available - */ - LocalizedFormats(final String sourceFormat) { - this.sourceFormat = sourceFormat; - } - - /** {@inheritDoc} */ - public String getSourceString() { - return sourceFormat; - } - - /** {@inheritDoc} */ - public String getLocalizedString(final Locale locale) { - try { - final String path = LocalizedFormats.class.getName().replaceAll("\\.", "/"); - ResourceBundle bundle = - ResourceBundle.getBundle("assets/" + path, locale); - if (bundle.getLocale().getLanguage().equals(locale.getLanguage())) { - // the value of the resource is the translated format - return bundle.getString(toString()); - } - - } catch (MissingResourceException mre) { // NOPMD - // do nothing here - } - - // either the locale is not supported or the resource is unknown - // don't translate and fall back to using the source format - return sourceFormat; - - } - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/package-info.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/package-info.java deleted file mode 100644 index baee14deb93b..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/exception/util/package-info.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -/** - * - * Classes supporting exception localization. - * - */ -package com.azure.cosmos.implementation.apachecommons.math.exception.util; diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/AbstractRandomGenerator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/AbstractRandomGenerator.java deleted file mode 100644 index f12a13b8d7c0..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/AbstractRandomGenerator.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.random; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** - * Abstract class implementing the {@link RandomGenerator} interface. - * Default implementations for all methods other than {@link #nextDouble()} and - * {@link #setSeed(long)} are provided. - * <p> - * All data generation methods are based on {@code code nextDouble()}. - * Concrete implementations <strong>must</strong> override - * this method and <strong>should</strong> provide better / more - * performant implementations of the other methods if the underlying PRNG - * supplies them.</p> - * - * @since 1.1 - */ -public abstract class AbstractRandomGenerator implements RandomGenerator { - - /** - * Cached random normal value. The default implementation for - * {@link #nextGaussian} generates pairs of values and this field caches the - * second value so that the full algorithm is not executed for every - * activation. The value {@code Double.NaN} signals that there is - * no cached value. Use {@link #clear} to clear the cached value. - */ - private double cachedNormalDeviate = Double.NaN; - - /** - * Construct a RandomGenerator. - */ - public AbstractRandomGenerator() { - super(); - - } - - /** - * Clears the cache used by the default implementation of - * {@link #nextGaussian}. Implementations that do not override the - * default implementation of {@code nextGaussian} should call this - * method in the implementation of {@link #setSeed(long)} - */ - public void clear() { - cachedNormalDeviate = Double.NaN; - } - - /** {@inheritDoc} */ - public void setSeed(int seed) { - setSeed((long) seed); - } - - /** {@inheritDoc} */ - public void setSeed(int[] seed) { - // the following number is the largest prime that fits in 32 bits (it is 2^32 - 5) - final long prime = 4294967291l; - - long combined = 0l; - for (int s : seed) { - combined = combined * prime + s; - } - setSeed(combined); - } - - /** - * Sets the seed of the underlying random number generator using a - * {@code long} seed. Sequences of values generated starting with the - * same seeds should be identical. - * <p> - * Implementations that do not override the default implementation of - * {@code nextGaussian} should include a call to {@link #clear} in the - * implementation of this method.</p> - * - * @param seed the seed value - */ - public abstract void setSeed(long seed); - - /** - * Generates random bytes and places them into a user-supplied - * byte array. The number of random bytes produced is equal to - * the length of the byte array. - * <p> - * The default implementation fills the array with bytes extracted from - * random integers generated using {@link #nextInt}.</p> - * - * @param bytes the non-null byte array in which to put the - * random bytes - */ - public void nextBytes(byte[] bytes) { - int bytesOut = 0; - while (bytesOut < bytes.length) { - int randInt = nextInt(); - for (int i = 0; i < 3; i++) { - if ( i > 0) { - randInt >>= 8; - } - bytes[bytesOut++] = (byte) randInt; - if (bytesOut == bytes.length) { - return; - } - } - } - } - - /** - * Returns the next pseudorandom, uniformly distributed {@code int} - * value from this random number generator's sequence. - * All 2<font size="-1"><sup>32</sup></font> possible {@code int} values - * should be produced with (approximately) equal probability. - * <p> - * The default implementation provided here returns - * <pre> - * <code>(int) (nextDouble() * Integer.MAX_VALUE)</code> - * </pre></p> - * - * @return the next pseudorandom, uniformly distributed {@code int} - * value from this random number generator's sequence - */ - public int nextInt() { - return (int) ((2d * nextDouble() - 1d) * Integer.MAX_VALUE); - } - - /** - * Returns a pseudorandom, uniformly distributed {@code int} value - * between 0 (inclusive) and the specified value (exclusive), drawn from - * this random number generator's sequence. - * <p> - * The default implementation returns - * <pre> - * <code>(int) (nextDouble() * n</code> - * </pre></p> - * - * @param n the bound on the random number to be returned. Must be - * positive. - * @return a pseudorandom, uniformly distributed {@code int} - * value between 0 (inclusive) and n (exclusive). - * @throws NotStrictlyPositiveException if {@code n <= 0}. - */ - public int nextInt(int n) { - if (n <= 0 ) { - throw new NotStrictlyPositiveException(n); - } - int result = (int) (nextDouble() * n); - return result < n ? result : n - 1; - } - - /** - * Returns the next pseudorandom, uniformly distributed {@code long} - * value from this random number generator's sequence. All - * 2<font size="-1"><sup>64</sup></font> possible {@code long} values - * should be produced with (approximately) equal probability. - * <p> - * The default implementation returns - * <pre> - * <code>(long) (nextDouble() * Long.MAX_VALUE)</code> - * </pre></p> - * - * @return the next pseudorandom, uniformly distributed {@code long} - *value from this random number generator's sequence - */ - public long nextLong() { - return (long) ((2d * nextDouble() - 1d) * Long.MAX_VALUE); - } - - /** - * Returns the next pseudorandom, uniformly distributed - * {@code boolean} value from this random number generator's - * sequence. - * <p> - * The default implementation returns - * <pre> - * <code>nextDouble() <= 0.5</code> - * </pre></p> - * - * @return the next pseudorandom, uniformly distributed - * {@code boolean} value from this random number generator's - * sequence - */ - public boolean nextBoolean() { - return nextDouble() <= 0.5; - } - - /** - * Returns the next pseudorandom, uniformly distributed {@code float} - * value between {@code 0.0} and {@code 1.0} from this random - * number generator's sequence. - * <p> - * The default implementation returns - * <pre> - * <code>(float) nextDouble() </code> - * </pre></p> - * - * @return the next pseudorandom, uniformly distributed {@code float} - * value between {@code 0.0} and {@code 1.0} from this - * random number generator's sequence - */ - public float nextFloat() { - return (float) nextDouble(); - } - - /** - * Returns the next pseudorandom, uniformly distributed - * {@code double} value between {@code 0.0} and - * {@code 1.0} from this random number generator's sequence. - * <p> - * This method provides the underlying source of random data used by the - * other methods.</p> - * - * @return the next pseudorandom, uniformly distributed - * {@code double} value between {@code 0.0} and - * {@code 1.0} from this random number generator's sequence - */ - public abstract double nextDouble(); - - /** - * Returns the next pseudorandom, Gaussian ("normally") distributed - * {@code double} value with mean {@code 0.0} and standard - * deviation {@code 1.0} from this random number generator's sequence. - * <p> - * The default implementation uses the <em>Polar Method</em> - * due to G.E.P. Box, M.E. Muller and G. Marsaglia, as described in - * D. Knuth, <u>The Art of Computer Programming</u>, 3.4.1C.</p> - * <p> - * The algorithm generates a pair of independent random values. One of - * these is cached for reuse, so the full algorithm is not executed on each - * activation. Implementations that do not override this method should - * make sure to call {@link #clear} to clear the cached value in the - * implementation of {@link #setSeed(long)}.</p> - * - * @return the next pseudorandom, Gaussian ("normally") distributed - * {@code double} value with mean {@code 0.0} and - * standard deviation {@code 1.0} from this random number - * generator's sequence - */ - public double nextGaussian() { - if (!Double.isNaN(cachedNormalDeviate)) { - double dev = cachedNormalDeviate; - cachedNormalDeviate = Double.NaN; - return dev; - } - double v1 = 0; - double v2 = 0; - double s = 1; - while (s >=1 ) { - v1 = 2 * nextDouble() - 1; - v2 = 2 * nextDouble() - 1; - s = v1 * v1 + v2 * v2; - } - if (s != 0) { - s = FastMath.sqrt(-2 * FastMath.log(s) / s); - } - cachedNormalDeviate = v2 * s; - return v1 * s; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/AbstractWell.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/AbstractWell.java deleted file mode 100644 index f8b354b32062..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/AbstractWell.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.random; - -import java.io.Serializable; - -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - - -/** This abstract class implements the WELL class of pseudo-random number generator - * from François Panneton, Pierre L'Ecuyer and Makoto Matsumoto. - - * <p>This generator is described in a paper by François Panneton, - * Pierre L'Ecuyer and Makoto Matsumoto <a - * href="http://www.iro.umontreal.ca/~lecuyer/myftp/papers/wellrng.pdf">Improved - * Long-Period Generators Based on Linear Recurrences Modulo 2</a> ACM - * Transactions on Mathematical Software, 32, 1 (2006). The errata for the paper - * are in <a href="http://www.iro.umontreal.ca/~lecuyer/myftp/papers/wellrng-errata.txt">wellrng-errata.txt</a>.</p> - - * @see <a href="http://www.iro.umontreal.ca/~panneton/WELLRNG.html">WELL Random number generator</a> - * @since 2.2 - - */ -public abstract class AbstractWell extends BitsStreamGenerator implements Serializable { - - /** Serializable version identifier. */ - private static final long serialVersionUID = -817701723016583596L; - - /** Current index in the bytes pool. */ - protected int index; - - /** Bytes pool. */ - protected final int[] v; - - /** Index indirection table giving for each index its predecessor taking table size into account. */ - protected final int[] iRm1; - - /** Index indirection table giving for each index its second predecessor taking table size into account. */ - protected final int[] iRm2; - - /** Index indirection table giving for each index the value index + m1 taking table size into account. */ - protected final int[] i1; - - /** Index indirection table giving for each index the value index + m2 taking table size into account. */ - protected final int[] i2; - - /** Index indirection table giving for each index the value index + m3 taking table size into account. */ - protected final int[] i3; - - /** Creates a new random number generator. - * <p>The instance is initialized using the current time plus the - * system identity hash code of this instance as the seed.</p> - * @param k number of bits in the pool (not necessarily a multiple of 32) - * @param m1 first parameter of the algorithm - * @param m2 second parameter of the algorithm - * @param m3 third parameter of the algorithm - */ - protected AbstractWell(final int k, final int m1, final int m2, final int m3) { - this(k, m1, m2, m3, null); - } - - /** Creates a new random number generator using a single int seed. - * @param k number of bits in the pool (not necessarily a multiple of 32) - * @param m1 first parameter of the algorithm - * @param m2 second parameter of the algorithm - * @param m3 third parameter of the algorithm - * @param seed the initial seed (32 bits integer) - */ - protected AbstractWell(final int k, final int m1, final int m2, final int m3, final int seed) { - this(k, m1, m2, m3, new int[] { seed }); - } - - /** Creates a new random number generator using an int array seed. - * @param k number of bits in the pool (not necessarily a multiple of 32) - * @param m1 first parameter of the algorithm - * @param m2 second parameter of the algorithm - * @param m3 third parameter of the algorithm - * @param seed the initial seed (32 bits integers array), if null - * the seed of the generator will be related to the current time - */ - protected AbstractWell(final int k, final int m1, final int m2, final int m3, final int[] seed) { - - // the bits pool contains k bits, k = r w - p where r is the number - // of w bits blocks, w is the block size (always 32 in the original paper) - // and p is the number of unused bits in the last block - final int w = 32; - final int r = (k + w - 1) / w; - this.v = new int[r]; - this.index = 0; - - // precompute indirection index tables. These tables are used for optimizing access - // they allow saving computations like "(j + r - 2) % r" with costly modulo operations - iRm1 = new int[r]; - iRm2 = new int[r]; - i1 = new int[r]; - i2 = new int[r]; - i3 = new int[r]; - for (int j = 0; j < r; ++j) { - iRm1[j] = (j + r - 1) % r; - iRm2[j] = (j + r - 2) % r; - i1[j] = (j + m1) % r; - i2[j] = (j + m2) % r; - i3[j] = (j + m3) % r; - } - - // initialize the pool content - setSeed(seed); - - } - - /** Creates a new random number generator using a single long seed. - * @param k number of bits in the pool (not necessarily a multiple of 32) - * @param m1 first parameter of the algorithm - * @param m2 second parameter of the algorithm - * @param m3 third parameter of the algorithm - * @param seed the initial seed (64 bits integer) - */ - protected AbstractWell(final int k, final int m1, final int m2, final int m3, final long seed) { - this(k, m1, m2, m3, new int[] { (int) (seed >>> 32), (int) (seed & 0xffffffffl) }); - } - - /** Reinitialize the generator as if just built with the given int seed. - * <p>The state of the generator is exactly the same as a new - * generator built with the same seed.</p> - * @param seed the initial seed (32 bits integer) - */ - @Override - public void setSeed(final int seed) { - setSeed(new int[] { seed }); - } - - /** Reinitialize the generator as if just built with the given int array seed. - * <p>The state of the generator is exactly the same as a new - * generator built with the same seed.</p> - * @param seed the initial seed (32 bits integers array). If null - * the seed of the generator will be the system time plus the system identity - * hash code of the instance. - */ - @Override - public void setSeed(final int[] seed) { - if (seed == null) { - setSeed(System.currentTimeMillis() + System.identityHashCode(this)); - return; - } - - System.arraycopy(seed, 0, v, 0, FastMath.min(seed.length, v.length)); - - if (seed.length < v.length) { - for (int i = seed.length; i < v.length; ++i) { - final long l = v[i - seed.length]; - v[i] = (int) ((1812433253l * (l ^ (l >> 30)) + i) & 0xffffffffL); - } - } - - index = 0; - clear(); // Clear normal deviate cache - } - - /** Reinitialize the generator as if just built with the given long seed. - * <p>The state of the generator is exactly the same as a new - * generator built with the same seed.</p> - * @param seed the initial seed (64 bits integer) - */ - @Override - public void setSeed(final long seed) { - setSeed(new int[] { (int) (seed >>> 32), (int) (seed & 0xffffffffl) }); - } - - /** {@inheritDoc} */ - @Override - protected abstract int next(final int bits); - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/BitsStreamGenerator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/BitsStreamGenerator.java deleted file mode 100644 index 1f16ae7dadfe..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/BitsStreamGenerator.java +++ /dev/null @@ -1,274 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.random; - -import java.io.Serializable; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.OutOfRangeException; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** Base class for random number generators that generates bits streams. - * - * @since 2.0 - */ -public abstract class BitsStreamGenerator - implements RandomGenerator, - Serializable { - /** Serializable version identifier */ - private static final long serialVersionUID = 20130104L; - /** Next gaussian. */ - private double nextGaussian; - - /** - * Creates a new random number generator. - */ - public BitsStreamGenerator() { - nextGaussian = Double.NaN; - } - - /** {@inheritDoc} */ - public abstract void setSeed(int seed); - - /** {@inheritDoc} */ - public abstract void setSeed(int[] seed); - - /** {@inheritDoc} */ - public abstract void setSeed(long seed); - - /** Generate next pseudorandom number. - * <p>This method is the core generation algorithm. It is used by all the - * public generation methods for the various primitive types {@link - * #nextBoolean()}, {@link #nextBytes(byte[])}, {@link #nextDouble()}, - * {@link #nextFloat()}, {@link #nextGaussian()}, {@link #nextInt()}, - * {@link #next(int)} and {@link #nextLong()}.</p> - * @param bits number of random bits to produce - * @return random bits generated - */ - protected abstract int next(int bits); - - /** {@inheritDoc} */ - public boolean nextBoolean() { - return next(1) != 0; - } - - /** {@inheritDoc} */ - public double nextDouble() { - final long high = ((long) next(26)) << 26; - final int low = next(26); - return (high | low) * 0x1.0p-52d; - } - - /** {@inheritDoc} */ - public float nextFloat() { - return next(23) * 0x1.0p-23f; - } - - /** {@inheritDoc} */ - public double nextGaussian() { - - final double random; - if (Double.isNaN(nextGaussian)) { - // generate a new pair of gaussian numbers - final double x = nextDouble(); - final double y = nextDouble(); - final double alpha = 2 * FastMath.PI * x; - final double r = FastMath.sqrt(-2 * FastMath.log(y)); - random = r * FastMath.cos(alpha); - nextGaussian = r * FastMath.sin(alpha); - } else { - // use the second element of the pair already generated - random = nextGaussian; - nextGaussian = Double.NaN; - } - - return random; - - } - - /** {@inheritDoc} */ - public int nextInt() { - return next(32); - } - - /** - * {@inheritDoc} - * <p>This default implementation is copied from Apache Harmony - * java.util.Random (r929253).</p> - * - * <p>Implementation notes: <ul> - * <li>If n is a power of 2, this method returns - * {@code (int) ((n * (long) next(31)) >> 31)}.</li> - * - * <li>If n is not a power of 2, what is returned is {@code next(31) % n} - * with {@code next(31)} values rejected (i.e. regenerated) until a - * value that is larger than the remainder of {@code Integer.MAX_VALUE / n} - * is generated. Rejection of this initial segment is necessary to ensure - * a uniform distribution.</li></ul></p> - */ - public int nextInt(int n) throws IllegalArgumentException { - if (n > 0) { - if ((n & -n) == n) { - return (int) ((n * (long) next(31)) >> 31); - } - int bits; - int val; - do { - bits = next(31); - val = bits % n; - } while (bits - val + (n - 1) < 0); - return val; - } - throw new NotStrictlyPositiveException(n); - } - - /** {@inheritDoc} */ - public long nextLong() { - final long high = ((long) next(32)) << 32; - final long low = ((long) next(32)) & 0xffffffffL; - return high | low; - } - - /** - * Returns a pseudorandom, uniformly distributed {@code long} value - * between 0 (inclusive) and the specified value (exclusive), drawn from - * this random number generator's sequence. - * - * @param n the bound on the random number to be returned. Must be - * positive. - * @return a pseudorandom, uniformly distributed {@code long} - * value between 0 (inclusive) and n (exclusive). - * @throws IllegalArgumentException if n is not positive. - */ - public long nextLong(long n) throws IllegalArgumentException { - if (n > 0) { - long bits; - long val; - do { - bits = ((long) next(31)) << 32; - bits |= ((long) next(32)) & 0xffffffffL; - val = bits % n; - } while (bits - val + (n - 1) < 0); - return val; - } - throw new NotStrictlyPositiveException(n); - } - - /** - * Clears the cache used by the default implementation of - * {@link #nextGaussian}. - */ - public void clear() { - nextGaussian = Double.NaN; - } - - /** - * Generates random bytes and places them into a user-supplied array. - * - * <p> - * The array is filled with bytes extracted from random integers. - * This implies that the number of random bytes generated may be larger than - * the length of the byte array. - * </p> - * - * @param bytes Array in which to put the generated bytes. Cannot be {@code null}. - */ - public void nextBytes(byte[] bytes) { - nextBytesFill(bytes, 0, bytes.length); - } - - /** - * Generates random bytes and places them into a user-supplied array. - * - * <p> - * The array is filled with bytes extracted from random integers. - * This implies that the number of random bytes generated may be larger than - * the length of the byte array. - * </p> - * - * @param bytes Array in which to put the generated bytes. Cannot be {@code null}. - * @param start Index at which to start inserting the generated bytes. - * @param len Number of bytes to insert. - * @throws OutOfRangeException if {@code start < 0} or {@code start >= bytes.length}. - * @throws OutOfRangeException if {@code len < 0} or {@code len > bytes.length - start}. - */ - public void nextBytes(byte[] bytes, - int start, - int len) { - if (start < 0 || - start >= bytes.length) { - throw new OutOfRangeException(start, 0, bytes.length); - } - if (len < 0 || - len > bytes.length - start) { - throw new OutOfRangeException(len, 0, bytes.length - start); - } - - nextBytesFill(bytes, start, len); - } - - /** - * Generates random bytes and places them into a user-supplied array. - * - * <p> - * The array is filled with bytes extracted from random integers. - * This implies that the number of random bytes generated may be larger than - * the length of the byte array. - * </p> - * - * @param bytes Array in which to put the generated bytes. Cannot be {@code null}. - * @param start Index at which to start inserting the generated bytes. - * @param len Number of bytes to insert. - */ - private void nextBytesFill(byte[] bytes, - int start, - int len) { - int index = start; // Index of first insertion. - - // Index of first insertion plus multiple 4 part of length (i.e. length - // with two least significant bits unset). - final int indexLoopLimit = index + (len & 0x7ffffffc); - - // Start filling in the byte array, 4 bytes at a time. - while (index < indexLoopLimit) { - final int random = next(32); - bytes[index++] = (byte) random; - bytes[index++] = (byte) (random >>> 8); - bytes[index++] = (byte) (random >>> 16); - bytes[index++] = (byte) (random >>> 24); - } - - final int indexLimit = start + len; // Index of last insertion + 1. - - // Fill in the remaining bytes. - if (index < indexLimit) { - int random = next(32); - while (true) { - bytes[index++] = (byte) random; - if (index < indexLimit) { - random >>>= 8; - } else { - break; - } - } - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomData.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomData.java deleted file mode 100644 index e12f96d87e9d..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomData.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.random; -import java.util.Collection; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NotANumberException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotFiniteNumberException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException; - -/** - * Random data generation utilities. - * @deprecated to be removed in 4.0. Use {@link RandomDataGenerator} directly - */ -@Deprecated -public interface RandomData { - /** - * Generates a random string of hex characters of length {@code len}. - * <p> - * The generated string will be random, but not cryptographically - * secure. To generate cryptographically secure strings, use - * {@link #nextSecureHexString(int)}. - * </p> - * - * @param len the length of the string to be generated - * @return a random string of hex characters of length {@code len} - * @throws NotStrictlyPositiveException - * if {@code len <= 0} - */ - String nextHexString(int len) throws NotStrictlyPositiveException; - - /** - * Generates a uniformly distributed random integer between {@code lower} - * and {@code upper} (endpoints included). - * <p> - * The generated integer will be random, but not cryptographically secure. - * To generate cryptographically secure integer sequences, use - * {@link #nextSecureInt(int, int)}. - * </p> - * - * @param lower lower bound for generated integer - * @param upper upper bound for generated integer - * @return a random integer greater than or equal to {@code lower} - * and less than or equal to {@code upper} - * @throws NumberIsTooLargeException if {@code lower >= upper} - */ - int nextInt(int lower, int upper) throws NumberIsTooLargeException; - - /** - * Generates a uniformly distributed random long integer between - * {@code lower} and {@code upper} (endpoints included). - * <p> - * The generated long integer values will be random, but not - * cryptographically secure. To generate cryptographically secure sequences - * of longs, use {@link #nextSecureLong(long, long)}. - * </p> - * - * @param lower lower bound for generated long integer - * @param upper upper bound for generated long integer - * @return a random long integer greater than or equal to {@code lower} and - * less than or equal to {@code upper} - * @throws NumberIsTooLargeException if {@code lower >= upper} - */ - long nextLong(long lower, long upper) throws NumberIsTooLargeException; - - /** - * Generates a random string of hex characters from a secure random - * sequence. - * <p> - * If cryptographic security is not required, use - * {@link #nextHexString(int)}. - * </p> - * - * @param len the length of the string to be generated - * @return a random string of hex characters of length {@code len} - * @throws NotStrictlyPositiveException if {@code len <= 0} - */ - String nextSecureHexString(int len) throws NotStrictlyPositiveException; - - /** - * Generates a uniformly distributed random integer between {@code lower} - * and {@code upper} (endpoints included) from a secure random sequence. - * <p> - * Sequences of integers generated using this method will be - * cryptographically secure. If cryptographic security is not required, - * {@link #nextInt(int, int)} should be used instead of this method.</p> - * <p> - * <strong>Definition</strong>: - * <a href="http://en.wikipedia.org/wiki/Cryptographically_secure_pseudo-random_number_generator"> - * Secure Random Sequence</a></p> - * - * @param lower lower bound for generated integer - * @param upper upper bound for generated integer - * @return a random integer greater than or equal to {@code lower} and less - * than or equal to {@code upper}. - * @throws NumberIsTooLargeException if {@code lower >= upper}. - */ - int nextSecureInt(int lower, int upper) throws NumberIsTooLargeException; - - /** - * Generates a uniformly distributed random long integer between - * {@code lower} and {@code upper} (endpoints included) from a secure random - * sequence. - * <p> - * Sequences of long values generated using this method will be - * cryptographically secure. If cryptographic security is not required, - * {@link #nextLong(long, long)} should be used instead of this method.</p> - * <p> - * <strong>Definition</strong>: - * <a href="http://en.wikipedia.org/wiki/Cryptographically_secure_pseudo-random_number_generator"> - * Secure Random Sequence</a></p> - * - * @param lower lower bound for generated integer - * @param upper upper bound for generated integer - * @return a random long integer greater than or equal to {@code lower} and - * less than or equal to {@code upper}. - * @throws NumberIsTooLargeException if {@code lower >= upper}. - */ - long nextSecureLong(long lower, long upper) throws NumberIsTooLargeException; - - /** - * Generates a random value from the Poisson distribution with the given - * mean. - * <p> - * <strong>Definition</strong>: - * <a href="http://www.itl.nist.gov/div898/handbook/eda/section3/eda366j.htm"> - * Poisson Distribution</a></p> - * - * @param mean the mean of the Poisson distribution - * @return a random value following the specified Poisson distribution - * @throws NotStrictlyPositiveException if {@code mean <= 0}. - */ - long nextPoisson(double mean) throws NotStrictlyPositiveException; - - /** - * Generates a random value from the Normal (or Gaussian) distribution with - * specified mean and standard deviation. - * <p> - * <strong>Definition</strong>: - * <a href="http://www.itl.nist.gov/div898/handbook/eda/section3/eda3661.htm"> - * Normal Distribution</a></p> - * - * @param mu the mean of the distribution - * @param sigma the standard deviation of the distribution - * @return a random value following the specified Gaussian distribution - * @throws NotStrictlyPositiveException if {@code sigma <= 0}. - */ - double nextGaussian(double mu, double sigma) throws NotStrictlyPositiveException; - - /** - * Generates a random value from the exponential distribution - * with specified mean. - * <p> - * <strong>Definition</strong>: - * <a href="http://www.itl.nist.gov/div898/handbook/eda/section3/eda3667.htm"> - * Exponential Distribution</a></p> - * - * @param mean the mean of the distribution - * @return a random value following the specified exponential distribution - * @throws NotStrictlyPositiveException if {@code mean <= 0}. - */ - double nextExponential(double mean) throws NotStrictlyPositiveException; - - /** - * Generates a uniformly distributed random value from the open interval - * {@code (lower, upper)} (i.e., endpoints excluded). - * <p> - * <strong>Definition</strong>: - * <a href="http://www.itl.nist.gov/div898/handbook/eda/section3/eda3662.htm"> - * Uniform Distribution</a> {@code lower} and {@code upper - lower} are the - * <a href = "http://www.itl.nist.gov/div898/handbook/eda/section3/eda364.htm"> - * location and scale parameters</a>, respectively.</p> - * - * @param lower the exclusive lower bound of the support - * @param upper the exclusive upper bound of the support - * @return a uniformly distributed random value between lower and upper - * (exclusive) - * @throws NumberIsTooLargeException if {@code lower >= upper} - * @throws NotFiniteNumberException if one of the bounds is infinite - * @throws NotANumberException if one of the bounds is NaN - */ - double nextUniform(double lower, double upper) - throws NumberIsTooLargeException, NotFiniteNumberException, NotANumberException; - - /** - * Generates a uniformly distributed random value from the interval - * {@code (lower, upper)} or the interval {@code [lower, upper)}. The lower - * bound is thus optionally included, while the upper bound is always - * excluded. - * <p> - * <strong>Definition</strong>: - * <a href="http://www.itl.nist.gov/div898/handbook/eda/section3/eda3662.htm"> - * Uniform Distribution</a> {@code lower} and {@code upper - lower} are the - * <a href = "http://www.itl.nist.gov/div898/handbook/eda/section3/eda364.htm"> - * location and scale parameters</a>, respectively.</p> - * - * @param lower the lower bound of the support - * @param upper the exclusive upper bound of the support - * @param lowerInclusive {@code true} if the lower bound is inclusive - * @return uniformly distributed random value in the {@code (lower, upper)} - * interval, if {@code lowerInclusive} is {@code false}, or in the - * {@code [lower, upper)} interval, if {@code lowerInclusive} is - * {@code true} - * @throws NumberIsTooLargeException if {@code lower >= upper} - * @throws NotFiniteNumberException if one of the bounds is infinite - * @throws NotANumberException if one of the bounds is NaN - */ - double nextUniform(double lower, double upper, boolean lowerInclusive) - throws NumberIsTooLargeException, NotFiniteNumberException, NotANumberException; - - /** - * Generates an integer array of length {@code k} whose entries are selected - * randomly, without repetition, from the integers {@code 0, ..., n - 1} - * (inclusive). - * <p> - * Generated arrays represent permutations of {@code n} taken {@code k} at a - * time.</p> - * - * @param n the domain of the permutation - * @param k the size of the permutation - * @return a random {@code k}-permutation of {@code n}, as an array of - * integers - * @throws NumberIsTooLargeException if {@code k > n}. - * @throws NotStrictlyPositiveException if {@code k <= 0}. - */ - int[] nextPermutation(int n, int k) - throws NumberIsTooLargeException, NotStrictlyPositiveException; - - /** - * Returns an array of {@code k} objects selected randomly from the - * Collection {@code c}. - * <p> - * Sampling from {@code c} is without replacement; but if {@code c} contains - * identical objects, the sample may include repeats. If all elements of - * {@code c} are distinct, the resulting object array represents a - * <a href="http://rkb.home.cern.ch/rkb/AN16pp/node250.html#SECTION0002500000000000000000"> - * Simple Random Sample</a> of size {@code k} from the elements of - * {@code c}.</p> - * - * @param c the collection to be sampled - * @param k the size of the sample - * @return a random sample of {@code k} elements from {@code c} - * @throws NumberIsTooLargeException if {@code k > c.size()}. - * @throws NotStrictlyPositiveException if {@code k <= 0}. - */ - Object[] nextSample(Collection<?> c, int k) - throws NumberIsTooLargeException, NotStrictlyPositiveException; - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomDataGenerator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomDataGenerator.java deleted file mode 100644 index e0caa0fdba0a..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomDataGenerator.java +++ /dev/null @@ -1,786 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.random; - -import java.io.Serializable; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.security.NoSuchProviderException; -import java.security.SecureRandom; -import java.util.Collection; - -import com.azure.cosmos.implementation.apachecommons.math.distribution.BetaDistribution; -import com.azure.cosmos.implementation.apachecommons.math.distribution.BinomialDistribution; -import com.azure.cosmos.implementation.apachecommons.math.distribution.CauchyDistribution; -import com.azure.cosmos.implementation.apachecommons.math.distribution.ChiSquaredDistribution; -import com.azure.cosmos.implementation.apachecommons.math.distribution.ExponentialDistribution; -import com.azure.cosmos.implementation.apachecommons.math.distribution.FDistribution; -import com.azure.cosmos.implementation.apachecommons.math.distribution.GammaDistribution; -import com.azure.cosmos.implementation.apachecommons.math.distribution.HypergeometricDistribution; -import com.azure.cosmos.implementation.apachecommons.math.distribution.PascalDistribution; -import com.azure.cosmos.implementation.apachecommons.math.distribution.PoissonDistribution; -import com.azure.cosmos.implementation.apachecommons.math.distribution.TDistribution; -import com.azure.cosmos.implementation.apachecommons.math.distribution.WeibullDistribution; -import com.azure.cosmos.implementation.apachecommons.math.distribution.ZipfDistribution; -import com.azure.cosmos.implementation.apachecommons.math.distribution.UniformIntegerDistribution; -import com.azure.cosmos.implementation.apachecommons.math.exception.MathInternalError; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotANumberException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotFiniteNumberException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.OutOfRangeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.util.MathArrays; - -/** - * Implements the {@link RandomData} interface using a {@link RandomGenerator} - * instance to generate non-secure data and a {@link SecureRandom} - * instance to provide data for the <code>nextSecureXxx</code> methods. If no - * <code>RandomGenerator</code> is provided in the constructor, the default is - * to use a {@link Well19937c} generator. To plug in a different - * implementation, either implement <code>RandomGenerator</code> directly or - * extend {@link AbstractRandomGenerator}. - * <p> - * Supports reseeding the underlying pseudo-random number generator (PRNG). The - * <code>SecurityProvider</code> and <code>Algorithm</code> used by the - * <code>SecureRandom</code> instance can also be reset. - * </p> - * <p> - * For details on the default PRNGs, see {@link java.util.Random} and - * {@link SecureRandom}. - * </p> - * <p> - * <strong>Usage Notes</strong>: - * <ul> - * <li> - * Instance variables are used to maintain <code>RandomGenerator</code> and - * <code>SecureRandom</code> instances used in data generation. Therefore, to - * generate a random sequence of values or strings, you should use just - * <strong>one</strong> <code>RandomDataImpl</code> instance repeatedly.</li> - * <li> - * The "secure" methods are *much* slower. These should be used only when a - * cryptographically secure random sequence is required. A secure random - * sequence is a sequence of pseudo-random values which, in addition to being - * well-dispersed (so no subsequence of values is an any more likely than other - * subsequence of the the same length), also has the additional property that - * knowledge of values generated up to any point in the sequence does not make - * it any easier to predict subsequent values.</li> - * <li> - * When a new <code>RandomDataImpl</code> is created, the underlying random - * number generators are <strong>not</strong> initialized. If you do not - * explicitly seed the default non-secure generator, it is seeded with the - * current time in milliseconds plus the system identity hash code on first use. - * The same holds for the secure generator. If you provide a <code>RandomGenerator</code> - * to the constructor, however, this generator is not reseeded by the constructor - * nor is it reseeded on first use.</li> - * <li> - * The <code>reSeed</code> and <code>reSeedSecure</code> methods delegate to the - * corresponding methods on the underlying <code>RandomGenerator</code> and - * <code>SecureRandom</code> instances. Therefore, <code>reSeed(long)</code> - * fully resets the initial state of the non-secure random number generator (so - * that reseeding with a specific value always results in the same subsequent - * random sequence); whereas reSeedSecure(long) does <strong>not</strong> - * reinitialize the secure random number generator (so secure sequences started - * with calls to reseedSecure(long) won't be identical).</li> - * <li> - * This implementation is not synchronized. The underlying <code>RandomGenerator</code> - * or <code>SecureRandom</code> instances are not protected by synchronization and - * are not guaranteed to be thread-safe. Therefore, if an instance of this class - * is concurrently utilized by multiple threads, it is the responsibility of - * client code to synchronize access to seeding and data generation methods. - * </li> - * </ul> - * </p> - * @since 3.1 - */ -public class RandomDataGenerator implements RandomData, Serializable { - - /** Serializable version identifier */ - private static final long serialVersionUID = -626730818244969716L; - - /** underlying random number generator */ - private RandomGenerator rand = null; - - /** underlying secure random number generator */ - private RandomGenerator secRand = null; - - /** - * Construct a RandomDataGenerator, using a default random generator as the source - * of randomness. - * - * <p>The default generator is a {@link Well19937c} seeded - * with {@code System.currentTimeMillis() + System.identityHashCode(this))}. - * The generator is initialized and seeded on first use.</p> - */ - public RandomDataGenerator() { - } - - /** - * Construct a RandomDataGenerator using the supplied {@link RandomGenerator} as - * the source of (non-secure) random data. - * - * @param rand the source of (non-secure) random data - * (may be null, resulting in the default generator) - */ - public RandomDataGenerator(RandomGenerator rand) { - this.rand = rand; - } - - /** - * {@inheritDoc} - * <p> - * <strong>Algorithm Description:</strong> hex strings are generated using a - * 2-step process. - * <ol> - * <li>{@code len / 2 + 1} binary bytes are generated using the underlying - * Random</li> - * <li>Each binary byte is translated into 2 hex digits</li> - * </ol> - * </p> - * - * @param len the desired string length. - * @return the random string. - * @throws NotStrictlyPositiveException if {@code len <= 0}. - */ - public String nextHexString(int len) throws NotStrictlyPositiveException { - if (len <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.LENGTH, len); - } - - // Get a random number generator - RandomGenerator ran = getRandomGenerator(); - - // Initialize output buffer - StringBuilder outBuffer = new StringBuilder(); - - // Get int(len/2)+1 random bytes - byte[] randomBytes = new byte[(len / 2) + 1]; - ran.nextBytes(randomBytes); - - // Convert each byte to 2 hex digits - for (int i = 0; i < randomBytes.length; i++) { - Integer c = Integer.valueOf(randomBytes[i]); - - /* - * Add 128 to byte value to make interval 0-255 before doing hex - * conversion. This guarantees <= 2 hex digits from toHexString() - * toHexString would otherwise add 2^32 to negative arguments. - */ - String hex = Integer.toHexString(c.intValue() + 128); - - // Make sure we add 2 hex digits for each byte - if (hex.length() == 1) { - hex = "0" + hex; - } - outBuffer.append(hex); - } - return outBuffer.toString().substring(0, len); - } - - /** {@inheritDoc} */ - public int nextInt(final int lower, final int upper) throws NumberIsTooLargeException { - return new UniformIntegerDistribution(getRandomGenerator(), lower, upper).sample(); - } - - /** {@inheritDoc} */ - public long nextLong(final long lower, final long upper) throws NumberIsTooLargeException { - if (lower >= upper) { - throw new NumberIsTooLargeException(LocalizedFormats.LOWER_BOUND_NOT_BELOW_UPPER_BOUND, - lower, upper, false); - } - final long max = (upper - lower) + 1; - if (max <= 0) { - // the range is too wide to fit in a positive long (larger than 2^63); as it covers - // more than half the long range, we use directly a simple rejection method - final RandomGenerator rng = getRandomGenerator(); - while (true) { - final long r = rng.nextLong(); - if (r >= lower && r <= upper) { - return r; - } - } - } else if (max < Integer.MAX_VALUE){ - // we can shift the range and generate directly a positive int - return lower + getRandomGenerator().nextInt((int) max); - } else { - // we can shift the range and generate directly a positive long - return lower + nextLong(getRandomGenerator(), max); - } - } - - /** - * Returns a pseudorandom, uniformly distributed {@code long} value - * between 0 (inclusive) and the specified value (exclusive), drawn from - * this random number generator's sequence. - * - * @param rng random generator to use - * @param n the bound on the random number to be returned. Must be - * positive. - * @return a pseudorandom, uniformly distributed {@code long} - * value between 0 (inclusive) and n (exclusive). - * @throws IllegalArgumentException if n is not positive. - */ - private static long nextLong(final RandomGenerator rng, final long n) throws IllegalArgumentException { - if (n > 0) { - final byte[] byteArray = new byte[8]; - long bits; - long val; - do { - rng.nextBytes(byteArray); - bits = 0; - for (final byte b : byteArray) { - bits = (bits << 8) | (((long) b) & 0xffL); - } - bits &= 0x7fffffffffffffffL; - val = bits % n; - } while (bits - val + (n - 1) < 0); - return val; - } - throw new NotStrictlyPositiveException(n); - } - - /** - * {@inheritDoc} - * <p> - * <strong>Algorithm Description:</strong> hex strings are generated in - * 40-byte segments using a 3-step process. - * <ol> - * <li> - * 20 random bytes are generated using the underlying - * <code>SecureRandom</code>.</li> - * <li> - * SHA-1 hash is applied to yield a 20-byte binary digest.</li> - * <li> - * Each byte of the binary digest is converted to 2 hex digits.</li> - * </ol> - * </p> - * @throws NotStrictlyPositiveException if {@code len <= 0} - */ - public String nextSecureHexString(int len) throws NotStrictlyPositiveException { - if (len <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.LENGTH, len); - } - - // Get SecureRandom and setup Digest provider - final RandomGenerator secRan = getSecRan(); - MessageDigest alg = null; - try { - alg = MessageDigest.getInstance("SHA-1"); - } catch (NoSuchAlgorithmException ex) { - // this should never happen - throw new MathInternalError(ex); - } - alg.reset(); - - // Compute number of iterations required (40 bytes each) - int numIter = (len / 40) + 1; - - StringBuilder outBuffer = new StringBuilder(); - for (int iter = 1; iter < numIter + 1; iter++) { - byte[] randomBytes = new byte[40]; - secRan.nextBytes(randomBytes); - alg.update(randomBytes); - - // Compute hash -- will create 20-byte binary hash - byte[] hash = alg.digest(); - - // Loop over the hash, converting each byte to 2 hex digits - for (int i = 0; i < hash.length; i++) { - Integer c = Integer.valueOf(hash[i]); - - /* - * Add 128 to byte value to make interval 0-255 This guarantees - * <= 2 hex digits from toHexString() toHexString would - * otherwise add 2^32 to negative arguments - */ - String hex = Integer.toHexString(c.intValue() + 128); - - // Keep strings uniform length -- guarantees 40 bytes - if (hex.length() == 1) { - hex = "0" + hex; - } - outBuffer.append(hex); - } - } - return outBuffer.toString().substring(0, len); - } - - /** {@inheritDoc} */ - public int nextSecureInt(final int lower, final int upper) throws NumberIsTooLargeException { - return new UniformIntegerDistribution(getSecRan(), lower, upper).sample(); - } - - /** {@inheritDoc} */ - public long nextSecureLong(final long lower, final long upper) throws NumberIsTooLargeException { - if (lower >= upper) { - throw new NumberIsTooLargeException(LocalizedFormats.LOWER_BOUND_NOT_BELOW_UPPER_BOUND, - lower, upper, false); - } - final RandomGenerator rng = getSecRan(); - final long max = (upper - lower) + 1; - if (max <= 0) { - // the range is too wide to fit in a positive long (larger than 2^63); as it covers - // more than half the long range, we use directly a simple rejection method - while (true) { - final long r = rng.nextLong(); - if (r >= lower && r <= upper) { - return r; - } - } - } else if (max < Integer.MAX_VALUE){ - // we can shift the range and generate directly a positive int - return lower + rng.nextInt((int) max); - } else { - // we can shift the range and generate directly a positive long - return lower + nextLong(rng, max); - } - } - - /** - * {@inheritDoc} - * <p> - * <strong>Algorithm Description</strong>: - * <ul><li> For small means, uses simulation of a Poisson process - * using Uniform deviates, as described - * <a href="http://irmi.epfl.ch/cmos/Pmmi/interactive/rng7.htm"> here.</a> - * The Poisson process (and hence value returned) is bounded by 1000 * mean.</li> - * - * <li> For large means, uses the rejection algorithm described in <br/> - * Devroye, Luc. (1981).<i>The Computer Generation of Poisson Random Variables</i> - * <strong>Computing</strong> vol. 26 pp. 197-207.</li></ul></p> - * @throws NotStrictlyPositiveException if {@code len <= 0} - */ - public long nextPoisson(double mean) throws NotStrictlyPositiveException { - return new PoissonDistribution(getRandomGenerator(), mean, - PoissonDistribution.DEFAULT_EPSILON, - PoissonDistribution.DEFAULT_MAX_ITERATIONS).sample(); - } - - /** {@inheritDoc} */ - public double nextGaussian(double mu, double sigma) throws NotStrictlyPositiveException { - if (sigma <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sigma); - } - return sigma * getRandomGenerator().nextGaussian() + mu; - } - - /** - * {@inheritDoc} - * - * <p> - * <strong>Algorithm Description</strong>: Uses the Algorithm SA (Ahrens) - * from p. 876 in: - * [1]: Ahrens, J. H. and Dieter, U. (1972). Computer methods for - * sampling from the exponential and normal distributions. - * Communications of the ACM, 15, 873-882. - * </p> - */ - public double nextExponential(double mean) throws NotStrictlyPositiveException { - return new ExponentialDistribution(getRandomGenerator(), mean, - ExponentialDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY).sample(); - } - - /** - * <p>Generates a random value from the - * {@link com.azure.cosmos.implementation.apachecommons.math.distribution.GammaDistribution Gamma Distribution}.</p> - * - * <p>This implementation uses the following algorithms: </p> - * - * <p>For 0 < shape < 1: <br/> - * Ahrens, J. H. and Dieter, U., <i>Computer methods for - * sampling from gamma, beta, Poisson and binomial distributions.</i> - * Computing, 12, 223-246, 1974.</p> - * - * <p>For shape >= 1: <br/> - * Marsaglia and Tsang, <i>A Simple Method for Generating - * Gamma Variables.</i> ACM Transactions on Mathematical Software, - * Volume 26 Issue 3, September, 2000.</p> - * - * @param shape the median of the Gamma distribution - * @param scale the scale parameter of the Gamma distribution - * @return random value sampled from the Gamma(shape, scale) distribution - * @throws NotStrictlyPositiveException if {@code shape <= 0} or - * {@code scale <= 0}. - */ - public double nextGamma(double shape, double scale) throws NotStrictlyPositiveException { - return new GammaDistribution(getRandomGenerator(),shape, scale, - GammaDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY).sample(); - } - - /** - * Generates a random value from the {@link HypergeometricDistribution Hypergeometric Distribution}. - * - * @param populationSize the population size of the Hypergeometric distribution - * @param numberOfSuccesses number of successes in the population of the Hypergeometric distribution - * @param sampleSize the sample size of the Hypergeometric distribution - * @return random value sampled from the Hypergeometric(numberOfSuccesses, sampleSize) distribution - * @throws NumberIsTooLargeException if {@code numberOfSuccesses > populationSize}, - * or {@code sampleSize > populationSize}. - * @throws NotStrictlyPositiveException if {@code populationSize <= 0}. - * @throws NotPositiveException if {@code numberOfSuccesses < 0}. - */ - public int nextHypergeometric(int populationSize, int numberOfSuccesses, int sampleSize) throws NotPositiveException, NotStrictlyPositiveException, NumberIsTooLargeException { - return new HypergeometricDistribution(getRandomGenerator(),populationSize, - numberOfSuccesses, sampleSize).sample(); - } - - /** - * Generates a random value from the {@link PascalDistribution Pascal Distribution}. - * - * @param r the number of successes of the Pascal distribution - * @param p the probability of success of the Pascal distribution - * @return random value sampled from the Pascal(r, p) distribution - * @throws NotStrictlyPositiveException if the number of successes is not positive - * @throws OutOfRangeException if the probability of success is not in the - * range {@code [0, 1]}. - */ - public int nextPascal(int r, double p) throws NotStrictlyPositiveException, OutOfRangeException { - return new PascalDistribution(getRandomGenerator(), r, p).sample(); - } - - /** - * Generates a random value from the {@link TDistribution T Distribution}. - * - * @param df the degrees of freedom of the T distribution - * @return random value from the T(df) distribution - * @throws NotStrictlyPositiveException if {@code df <= 0} - */ - public double nextT(double df) throws NotStrictlyPositiveException { - return new TDistribution(getRandomGenerator(), df, - TDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY).sample(); - } - - /** - * Generates a random value from the {@link WeibullDistribution Weibull Distribution}. - * - * @param shape the shape parameter of the Weibull distribution - * @param scale the scale parameter of the Weibull distribution - * @return random value sampled from the Weibull(shape, size) distribution - * @throws NotStrictlyPositiveException if {@code shape <= 0} or - * {@code scale <= 0}. - */ - public double nextWeibull(double shape, double scale) throws NotStrictlyPositiveException { - return new WeibullDistribution(getRandomGenerator(), shape, scale, - WeibullDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY).sample(); - } - - /** - * Generates a random value from the {@link ZipfDistribution Zipf Distribution}. - * - * @param numberOfElements the number of elements of the ZipfDistribution - * @param exponent the exponent of the ZipfDistribution - * @return random value sampled from the Zipf(numberOfElements, exponent) distribution - * @exception NotStrictlyPositiveException if {@code numberOfElements <= 0} - * or {@code exponent <= 0}. - */ - public int nextZipf(int numberOfElements, double exponent) throws NotStrictlyPositiveException { - return new ZipfDistribution(getRandomGenerator(), numberOfElements, exponent).sample(); - } - - /** - * Generates a random value from the {@link BetaDistribution Beta Distribution}. - * - * @param alpha first distribution shape parameter - * @param beta second distribution shape parameter - * @return random value sampled from the beta(alpha, beta) distribution - */ - public double nextBeta(double alpha, double beta) { - return new BetaDistribution(getRandomGenerator(), alpha, beta, - BetaDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY).sample(); - } - - /** - * Generates a random value from the {@link BinomialDistribution Binomial Distribution}. - * - * @param numberOfTrials number of trials of the Binomial distribution - * @param probabilityOfSuccess probability of success of the Binomial distribution - * @return random value sampled from the Binomial(numberOfTrials, probabilityOfSuccess) distribution - */ - public int nextBinomial(int numberOfTrials, double probabilityOfSuccess) { - return new BinomialDistribution(getRandomGenerator(), numberOfTrials, probabilityOfSuccess).sample(); - } - - /** - * Generates a random value from the {@link CauchyDistribution Cauchy Distribution}. - * - * @param median the median of the Cauchy distribution - * @param scale the scale parameter of the Cauchy distribution - * @return random value sampled from the Cauchy(median, scale) distribution - */ - public double nextCauchy(double median, double scale) { - return new CauchyDistribution(getRandomGenerator(), median, scale, - CauchyDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY).sample(); - } - - /** - * Generates a random value from the {@link ChiSquaredDistribution ChiSquare Distribution}. - * - * @param df the degrees of freedom of the ChiSquare distribution - * @return random value sampled from the ChiSquare(df) distribution - */ - public double nextChiSquare(double df) { - return new ChiSquaredDistribution(getRandomGenerator(), df, - ChiSquaredDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY).sample(); - } - - /** - * Generates a random value from the {@link FDistribution F Distribution}. - * - * @param numeratorDf the numerator degrees of freedom of the F distribution - * @param denominatorDf the denominator degrees of freedom of the F distribution - * @return random value sampled from the F(numeratorDf, denominatorDf) distribution - * @throws NotStrictlyPositiveException if - * {@code numeratorDf <= 0} or {@code denominatorDf <= 0}. - */ - public double nextF(double numeratorDf, double denominatorDf) throws NotStrictlyPositiveException { - return new FDistribution(getRandomGenerator(), numeratorDf, denominatorDf, - FDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY).sample(); - } - - /** - * {@inheritDoc} - * - * <p> - * <strong>Algorithm Description</strong>: scales the output of - * Random.nextDouble(), but rejects 0 values (i.e., will generate another - * random double if Random.nextDouble() returns 0). This is necessary to - * provide a symmetric output interval (both endpoints excluded). - * </p> - * @throws NumberIsTooLargeException if {@code lower >= upper} - * @throws NotFiniteNumberException if one of the bounds is infinite - * @throws NotANumberException if one of the bounds is NaN - */ - public double nextUniform(double lower, double upper) - throws NumberIsTooLargeException, NotFiniteNumberException, NotANumberException { - return nextUniform(lower, upper, false); - } - - /** - * {@inheritDoc} - * - * <p> - * <strong>Algorithm Description</strong>: if the lower bound is excluded, - * scales the output of Random.nextDouble(), but rejects 0 values (i.e., - * will generate another random double if Random.nextDouble() returns 0). - * This is necessary to provide a symmetric output interval (both - * endpoints excluded). - * </p> - * - * @throws NumberIsTooLargeException if {@code lower >= upper} - * @throws NotFiniteNumberException if one of the bounds is infinite - * @throws NotANumberException if one of the bounds is NaN - */ - public double nextUniform(double lower, double upper, boolean lowerInclusive) - throws NumberIsTooLargeException, NotFiniteNumberException, NotANumberException { - - if (lower >= upper) { - throw new NumberIsTooLargeException(LocalizedFormats.LOWER_BOUND_NOT_BELOW_UPPER_BOUND, - lower, upper, false); - } - - if (Double.isInfinite(lower)) { - throw new NotFiniteNumberException(LocalizedFormats.INFINITE_BOUND, lower); - } - if (Double.isInfinite(upper)) { - throw new NotFiniteNumberException(LocalizedFormats.INFINITE_BOUND, upper); - } - - if (Double.isNaN(lower) || Double.isNaN(upper)) { - throw new NotANumberException(); - } - - final RandomGenerator generator = getRandomGenerator(); - - // ensure nextDouble() isn't 0.0 - double u = generator.nextDouble(); - while (!lowerInclusive && u <= 0.0) { - u = generator.nextDouble(); - } - - return u * upper + (1.0 - u) * lower; - } - - /** - * {@inheritDoc} - * - * This method calls {@link MathArrays#shuffle(int[],RandomGenerator) - * MathArrays.shuffle} in order to create a random shuffle of the set - * of natural numbers {@code { 0, 1, ..., n - 1 }}. - * - * @throws NumberIsTooLargeException if {@code k > n}. - * @throws NotStrictlyPositiveException if {@code k <= 0}. - */ - public int[] nextPermutation(int n, int k) - throws NumberIsTooLargeException, NotStrictlyPositiveException { - if (k > n) { - throw new NumberIsTooLargeException(LocalizedFormats.PERMUTATION_EXCEEDS_N, - k, n, true); - } - if (k <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.PERMUTATION_SIZE, - k); - } - - int[] index = MathArrays.natural(n); - MathArrays.shuffle(index, getRandomGenerator()); - - // Return a new array containing the first "k" entries of "index". - return MathArrays.copyOf(index, k); - } - - /** - * {@inheritDoc} - * - * This method calls {@link #nextPermutation(int,int) nextPermutation(c.size(), k)} - * in order to sample the collection. - */ - public Object[] nextSample(Collection<?> c, int k) throws NumberIsTooLargeException, NotStrictlyPositiveException { - - int len = c.size(); - if (k > len) { - throw new NumberIsTooLargeException(LocalizedFormats.SAMPLE_SIZE_EXCEEDS_COLLECTION_SIZE, - k, len, true); - } - if (k <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.NUMBER_OF_SAMPLES, k); - } - - Object[] objects = c.toArray(); - int[] index = nextPermutation(len, k); - Object[] result = new Object[k]; - for (int i = 0; i < k; i++) { - result[i] = objects[index[i]]; - } - return result; - } - - - - /** - * Reseeds the random number generator with the supplied seed. - * <p> - * Will create and initialize if null. - * </p> - * - * @param seed the seed value to use - */ - public void reSeed(long seed) { - getRandomGenerator().setSeed(seed); - } - - /** - * Reseeds the secure random number generator with the current time in - * milliseconds. - * <p> - * Will create and initialize if null. - * </p> - */ - public void reSeedSecure() { - getSecRan().setSeed(System.currentTimeMillis()); - } - - /** - * Reseeds the secure random number generator with the supplied seed. - * <p> - * Will create and initialize if null. - * </p> - * - * @param seed the seed value to use - */ - public void reSeedSecure(long seed) { - getSecRan().setSeed(seed); - } - - /** - * Reseeds the random number generator with - * {@code System.currentTimeMillis() + System.identityHashCode(this))}. - */ - public void reSeed() { - getRandomGenerator().setSeed(System.currentTimeMillis() + System.identityHashCode(this)); - } - - /** - * Sets the PRNG algorithm for the underlying SecureRandom instance using - * the Security Provider API. The Security Provider API is defined in <a - * href = - * "http://java.sun.com/j2se/1.3/docs/guide/security/CryptoSpec.html#AppA"> - * Java Cryptography Architecture API Specification & Reference.</a> - * <p> - * <strong>USAGE NOTE:</strong> This method carries <i>significant</i> - * overhead and may take several seconds to execute. - * </p> - * - * @param algorithm the name of the PRNG algorithm - * @param provider the name of the provider - * @throws NoSuchAlgorithmException if the specified algorithm is not available - * @throws NoSuchProviderException if the specified provider is not installed - */ - public void setSecureAlgorithm(String algorithm, String provider) - throws NoSuchAlgorithmException, NoSuchProviderException { - secRand = RandomGeneratorFactory.createRandomGenerator(SecureRandom.getInstance(algorithm, provider)); - } - - /** - * Returns the RandomGenerator used to generate non-secure random data. - * <p> - * Creates and initializes a default generator if null. Uses a {@link Well19937c} - * generator with {@code System.currentTimeMillis() + System.identityHashCode(this))} - * as the default seed. - * </p> - * - * @return the Random used to generate random data - * @since 3.2 - */ - public RandomGenerator getRandomGenerator() { - if (rand == null) { - initRan(); - } - return rand; - } - - /** - * Sets the default generator to a {@link Well19937c} generator seeded with - * {@code System.currentTimeMillis() + System.identityHashCode(this))}. - */ - private void initRan() { - rand = new Well19937c(System.currentTimeMillis() + System.identityHashCode(this)); - } - - /** - * Returns the SecureRandom used to generate secure random data. - * <p> - * Creates and initializes if null. Uses - * {@code System.currentTimeMillis() + System.identityHashCode(this)} as the default seed. - * </p> - * - * @return the SecureRandom used to generate secure random data, wrapped in a - * {@link RandomGenerator}. - */ - private RandomGenerator getSecRan() { - if (secRand == null) { - secRand = RandomGeneratorFactory.createRandomGenerator(new SecureRandom()); - secRand.setSeed(System.currentTimeMillis() + System.identityHashCode(this)); - } - return secRand; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomDataImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomDataImpl.java deleted file mode 100644 index c6efc8cc5dac..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomDataImpl.java +++ /dev/null @@ -1,589 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.random; - -import java.io.Serializable; -import java.security.NoSuchAlgorithmException; -import java.security.NoSuchProviderException; -import java.util.Collection; - -import com.azure.cosmos.implementation.apachecommons.math.distribution.IntegerDistribution; -import com.azure.cosmos.implementation.apachecommons.math.distribution.RealDistribution; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotANumberException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotFiniteNumberException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.MathIllegalArgumentException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.OutOfRangeException; - -/** - * Generates random deviates and other random data using a {@link RandomGenerator} - * instance to generate non-secure data and a {@link java.security.SecureRandom} - * instance to provide data for the <code>nextSecureXxx</code> methods. If no - * <code>RandomGenerator</code> is provided in the constructor, the default is - * to use a {@link Well19937c} generator. To plug in a different - * implementation, either implement <code>RandomGenerator</code> directly or - * extend {@link AbstractRandomGenerator}. - * <p> - * Supports reseeding the underlying pseudo-random number generator (PRNG). The - * <code>SecurityProvider</code> and <code>Algorithm</code> used by the - * <code>SecureRandom</code> instance can also be reset. - * </p> - * <p> - * For details on the default PRNGs, see {@link java.util.Random} and - * {@link java.security.SecureRandom}. - * </p> - * <p> - * <strong>Usage Notes</strong>: - * <ul> - * <li> - * Instance variables are used to maintain <code>RandomGenerator</code> and - * <code>SecureRandom</code> instances used in data generation. Therefore, to - * generate a random sequence of values or strings, you should use just - * <strong>one</strong> <code>RandomDataGenerator</code> instance repeatedly.</li> - * <li> - * The "secure" methods are *much* slower. These should be used only when a - * cryptographically secure random sequence is required. A secure random - * sequence is a sequence of pseudo-random values which, in addition to being - * well-dispersed (so no subsequence of values is an any more likely than other - * subsequence of the the same length), also has the additional property that - * knowledge of values generated up to any point in the sequence does not make - * it any easier to predict subsequent values.</li> - * <li> - * When a new <code>RandomDataGenerator</code> is created, the underlying random - * number generators are <strong>not</strong> initialized. If you do not - * explicitly seed the default non-secure generator, it is seeded with the - * current time in milliseconds plus the system identity hash code on first use. - * The same holds for the secure generator. If you provide a <code>RandomGenerator</code> - * to the constructor, however, this generator is not reseeded by the constructor - * nor is it reseeded on first use.</li> - * <li> - * The <code>reSeed</code> and <code>reSeedSecure</code> methods delegate to the - * corresponding methods on the underlying <code>RandomGenerator</code> and - * <code>SecureRandom</code> instances. Therefore, <code>reSeed(long)</code> - * fully resets the initial state of the non-secure random number generator (so - * that reseeding with a specific value always results in the same subsequent - * random sequence); whereas reSeedSecure(long) does <strong>not</strong> - * reinitialize the secure random number generator (so secure sequences started - * with calls to reseedSecure(long) won't be identical).</li> - * <li> - * This implementation is not synchronized. The underlying <code>RandomGenerator</code> - * or <code>SecureRandom</code> instances are not protected by synchronization and - * are not guaranteed to be thread-safe. Therefore, if an instance of this class - * is concurrently utilized by multiple threads, it is the responsibility of - * client code to synchronize access to seeding and data generation methods. - * </li> - * </ul> - * </p> - * @deprecated to be removed in 4.0. Use {@link RandomDataGenerator} instead - */ -@Deprecated -public class RandomDataImpl implements RandomData, Serializable { - - /** Serializable version identifier */ - private static final long serialVersionUID = -626730818244969716L; - - /** RandomDataGenerator delegate */ - private final RandomDataGenerator delegate; - - /** - * Construct a RandomDataImpl, using a default random generator as the source - * of randomness. - * - * <p>The default generator is a {@link Well19937c} seeded - * with {@code System.currentTimeMillis() + System.identityHashCode(this))}. - * The generator is initialized and seeded on first use.</p> - */ - public RandomDataImpl() { - delegate = new RandomDataGenerator(); - } - - /** - * Construct a RandomDataImpl using the supplied {@link RandomGenerator} as - * the source of (non-secure) random data. - * - * @param rand the source of (non-secure) random data - * (may be null, resulting in the default generator) - * @since 1.1 - */ - public RandomDataImpl(RandomGenerator rand) { - delegate = new RandomDataGenerator(rand); - } - - /** - * @return the delegate object. - * @deprecated To be removed in 4.0. - */ - @Deprecated - RandomDataGenerator getDelegate() { - return delegate; - } - - /** - * {@inheritDoc} - * <p> - * <strong>Algorithm Description:</strong> hex strings are generated using a - * 2-step process. - * <ol> - * <li>{@code len / 2 + 1} binary bytes are generated using the underlying - * Random</li> - * <li>Each binary byte is translated into 2 hex digits</li> - * </ol> - * </p> - * - * @param len the desired string length. - * @return the random string. - * @throws NotStrictlyPositiveException if {@code len <= 0}. - */ - public String nextHexString(int len) throws NotStrictlyPositiveException { - return delegate.nextHexString(len); - } - - /** {@inheritDoc} */ - public int nextInt(int lower, int upper) throws NumberIsTooLargeException { - return delegate.nextInt(lower, upper); - } - - /** {@inheritDoc} */ - public long nextLong(long lower, long upper) throws NumberIsTooLargeException { - return delegate.nextLong(lower, upper); - } - - /** - * {@inheritDoc} - * <p> - * <strong>Algorithm Description:</strong> hex strings are generated in - * 40-byte segments using a 3-step process. - * <ol> - * <li> - * 20 random bytes are generated using the underlying - * <code>SecureRandom</code>.</li> - * <li> - * SHA-1 hash is applied to yield a 20-byte binary digest.</li> - * <li> - * Each byte of the binary digest is converted to 2 hex digits.</li> - * </ol> - * </p> - */ - public String nextSecureHexString(int len) throws NotStrictlyPositiveException { - return delegate.nextSecureHexString(len); - } - - /** {@inheritDoc} */ - public int nextSecureInt(int lower, int upper) throws NumberIsTooLargeException { - return delegate.nextSecureInt(lower, upper); - } - - /** {@inheritDoc} */ - public long nextSecureLong(long lower, long upper) throws NumberIsTooLargeException { - return delegate.nextSecureLong(lower,upper); - } - - /** - * {@inheritDoc} - * <p> - * <strong>Algorithm Description</strong>: - * <ul><li> For small means, uses simulation of a Poisson process - * using Uniform deviates, as described - * <a href="http://irmi.epfl.ch/cmos/Pmmi/interactive/rng7.htm"> here.</a> - * The Poisson process (and hence value returned) is bounded by 1000 * mean.</li> - * - * <li> For large means, uses the rejection algorithm described in <br/> - * Devroye, Luc. (1981).<i>The Computer Generation of Poisson Random Variables</i> - * <strong>Computing</strong> vol. 26 pp. 197-207.</li></ul></p> - */ - public long nextPoisson(double mean) throws NotStrictlyPositiveException { - return delegate.nextPoisson(mean); - } - - /** {@inheritDoc} */ - public double nextGaussian(double mu, double sigma) throws NotStrictlyPositiveException { - return delegate.nextGaussian(mu,sigma); - } - - /** - * {@inheritDoc} - * - * <p> - * <strong>Algorithm Description</strong>: Uses the Algorithm SA (Ahrens) - * from p. 876 in: - * [1]: Ahrens, J. H. and Dieter, U. (1972). Computer methods for - * sampling from the exponential and normal distributions. - * Communications of the ACM, 15, 873-882. - * </p> - */ - public double nextExponential(double mean) throws NotStrictlyPositiveException { - return delegate.nextExponential(mean); - } - - /** - * {@inheritDoc} - * - * <p> - * <strong>Algorithm Description</strong>: scales the output of - * Random.nextDouble(), but rejects 0 values (i.e., will generate another - * random double if Random.nextDouble() returns 0). This is necessary to - * provide a symmetric output interval (both endpoints excluded). - * </p> - */ - public double nextUniform(double lower, double upper) - throws NumberIsTooLargeException, NotFiniteNumberException, NotANumberException { - return delegate.nextUniform(lower, upper); - } - - /** - * {@inheritDoc} - * - * <p> - * <strong>Algorithm Description</strong>: if the lower bound is excluded, - * scales the output of Random.nextDouble(), but rejects 0 values (i.e., - * will generate another random double if Random.nextDouble() returns 0). - * This is necessary to provide a symmetric output interval (both - * endpoints excluded). - * </p> - * @since 3.0 - */ - public double nextUniform(double lower, double upper, boolean lowerInclusive) - throws NumberIsTooLargeException, NotFiniteNumberException, NotANumberException { - return delegate.nextUniform(lower, upper, lowerInclusive); - } - - /** - * Generates a random value from the {@link com.azure.cosmos.implementation.apachecommons.math.distribution.BetaDistribution Beta Distribution}. - * This implementation uses {@link #nextInversionDeviate(RealDistribution) inversion} - * to generate random values. - * - * @param alpha first distribution shape parameter - * @param beta second distribution shape parameter - * @return random value sampled from the beta(alpha, beta) distribution - * @since 2.2 - */ - public double nextBeta(double alpha, double beta) { - return delegate.nextBeta(alpha, beta); - } - - /** - * Generates a random value from the {@link com.azure.cosmos.implementation.apachecommons.math.distribution.BinomialDistribution Binomial Distribution}. - * This implementation uses {@link #nextInversionDeviate(RealDistribution) inversion} - * to generate random values. - * - * @param numberOfTrials number of trials of the Binomial distribution - * @param probabilityOfSuccess probability of success of the Binomial distribution - * @return random value sampled from the Binomial(numberOfTrials, probabilityOfSuccess) distribution - * @since 2.2 - */ - public int nextBinomial(int numberOfTrials, double probabilityOfSuccess) { - return delegate.nextBinomial(numberOfTrials, probabilityOfSuccess); - } - - /** - * Generates a random value from the {@link com.azure.cosmos.implementation.apachecommons.math.distribution.CauchyDistribution Cauchy Distribution}. - * This implementation uses {@link #nextInversionDeviate(RealDistribution) inversion} - * to generate random values. - * - * @param median the median of the Cauchy distribution - * @param scale the scale parameter of the Cauchy distribution - * @return random value sampled from the Cauchy(median, scale) distribution - * @since 2.2 - */ - public double nextCauchy(double median, double scale) { - return delegate.nextCauchy(median, scale); - } - - /** - * Generates a random value from the {@link com.azure.cosmos.implementation.apachecommons.math.distribution.ChiSquaredDistribution ChiSquare Distribution}. - * This implementation uses {@link #nextInversionDeviate(RealDistribution) inversion} - * to generate random values. - * - * @param df the degrees of freedom of the ChiSquare distribution - * @return random value sampled from the ChiSquare(df) distribution - * @since 2.2 - */ - public double nextChiSquare(double df) { - return delegate.nextChiSquare(df); - } - - /** - * Generates a random value from the {@link com.azure.cosmos.implementation.apachecommons.math.distribution.FDistribution F Distribution}. - * This implementation uses {@link #nextInversionDeviate(RealDistribution) inversion} - * to generate random values. - * - * @param numeratorDf the numerator degrees of freedom of the F distribution - * @param denominatorDf the denominator degrees of freedom of the F distribution - * @return random value sampled from the F(numeratorDf, denominatorDf) distribution - * @throws NotStrictlyPositiveException if - * {@code numeratorDf <= 0} or {@code denominatorDf <= 0}. - * @since 2.2 - */ - public double nextF(double numeratorDf, double denominatorDf) throws NotStrictlyPositiveException { - return delegate.nextF(numeratorDf, denominatorDf); - } - - /** - * <p>Generates a random value from the - * {@link com.azure.cosmos.implementation.apachecommons.math.distribution.GammaDistribution Gamma Distribution}.</p> - * - * <p>This implementation uses the following algorithms: </p> - * - * <p>For 0 < shape < 1: <br/> - * Ahrens, J. H. and Dieter, U., <i>Computer methods for - * sampling from gamma, beta, Poisson and binomial distributions.</i> - * Computing, 12, 223-246, 1974.</p> - * - * <p>For shape >= 1: <br/> - * Marsaglia and Tsang, <i>A Simple Method for Generating - * Gamma Variables.</i> ACM Transactions on Mathematical Software, - * Volume 26 Issue 3, September, 2000.</p> - * - * @param shape the median of the Gamma distribution - * @param scale the scale parameter of the Gamma distribution - * @return random value sampled from the Gamma(shape, scale) distribution - * @throws NotStrictlyPositiveException if {@code shape <= 0} or - * {@code scale <= 0}. - * @since 2.2 - */ - public double nextGamma(double shape, double scale) throws NotStrictlyPositiveException { - return delegate.nextGamma(shape, scale); - } - - /** - * Generates a random value from the {@link com.azure.cosmos.implementation.apachecommons.math.distribution.HypergeometricDistribution Hypergeometric Distribution}. - * This implementation uses {@link #nextInversionDeviate(IntegerDistribution) inversion} - * to generate random values. - * - * @param populationSize the population size of the Hypergeometric distribution - * @param numberOfSuccesses number of successes in the population of the Hypergeometric distribution - * @param sampleSize the sample size of the Hypergeometric distribution - * @return random value sampled from the Hypergeometric(numberOfSuccesses, sampleSize) distribution - * @throws NumberIsTooLargeException if {@code numberOfSuccesses > populationSize}, - * or {@code sampleSize > populationSize}. - * @throws NotStrictlyPositiveException if {@code populationSize <= 0}. - * @throws NotPositiveException if {@code numberOfSuccesses < 0}. - * @since 2.2 - */ - public int nextHypergeometric(int populationSize, int numberOfSuccesses, int sampleSize) - throws NotPositiveException, NotStrictlyPositiveException, NumberIsTooLargeException { - return delegate.nextHypergeometric(populationSize, numberOfSuccesses, sampleSize); - } - - /** - * Generates a random value from the {@link com.azure.cosmos.implementation.apachecommons.math.distribution.PascalDistribution Pascal Distribution}. - * This implementation uses {@link #nextInversionDeviate(IntegerDistribution) inversion} - * to generate random values. - * - * @param r the number of successes of the Pascal distribution - * @param p the probability of success of the Pascal distribution - * @return random value sampled from the Pascal(r, p) distribution - * @since 2.2 - * @throws NotStrictlyPositiveException if the number of successes is not positive - * @throws OutOfRangeException if the probability of success is not in the - * range {@code [0, 1]}. - */ - public int nextPascal(int r, double p) - throws NotStrictlyPositiveException, OutOfRangeException { - return delegate.nextPascal(r, p); - } - - /** - * Generates a random value from the {@link com.azure.cosmos.implementation.apachecommons.math.distribution.TDistribution T Distribution}. - * This implementation uses {@link #nextInversionDeviate(RealDistribution) inversion} - * to generate random values. - * - * @param df the degrees of freedom of the T distribution - * @return random value from the T(df) distribution - * @since 2.2 - * @throws NotStrictlyPositiveException if {@code df <= 0} - */ - public double nextT(double df) throws NotStrictlyPositiveException { - return delegate.nextT(df); - } - - /** - * Generates a random value from the {@link com.azure.cosmos.implementation.apachecommons.math.distribution.WeibullDistribution Weibull Distribution}. - * This implementation uses {@link #nextInversionDeviate(RealDistribution) inversion} - * to generate random values. - * - * @param shape the shape parameter of the Weibull distribution - * @param scale the scale parameter of the Weibull distribution - * @return random value sampled from the Weibull(shape, size) distribution - * @since 2.2 - * @throws NotStrictlyPositiveException if {@code shape <= 0} or - * {@code scale <= 0}. - */ - public double nextWeibull(double shape, double scale) throws NotStrictlyPositiveException { - return delegate.nextWeibull(shape, scale); - } - - /** - * Generates a random value from the {@link com.azure.cosmos.implementation.apachecommons.math.distribution.ZipfDistribution Zipf Distribution}. - * This implementation uses {@link #nextInversionDeviate(IntegerDistribution) inversion} - * to generate random values. - * - * @param numberOfElements the number of elements of the ZipfDistribution - * @param exponent the exponent of the ZipfDistribution - * @return random value sampled from the Zipf(numberOfElements, exponent) distribution - * @since 2.2 - * @exception NotStrictlyPositiveException if {@code numberOfElements <= 0} - * or {@code exponent <= 0}. - */ - public int nextZipf(int numberOfElements, double exponent) throws NotStrictlyPositiveException { - return delegate.nextZipf(numberOfElements, exponent); - } - - - /** - * Reseeds the random number generator with the supplied seed. - * <p> - * Will create and initialize if null. - * </p> - * - * @param seed - * the seed value to use - */ - public void reSeed(long seed) { - delegate.reSeed(seed); - } - - /** - * Reseeds the secure random number generator with the current time in - * milliseconds. - * <p> - * Will create and initialize if null. - * </p> - */ - public void reSeedSecure() { - delegate.reSeedSecure(); - } - - /** - * Reseeds the secure random number generator with the supplied seed. - * <p> - * Will create and initialize if null. - * </p> - * - * @param seed - * the seed value to use - */ - public void reSeedSecure(long seed) { - delegate.reSeedSecure(seed); - } - - /** - * Reseeds the random number generator with - * {@code System.currentTimeMillis() + System.identityHashCode(this))}. - */ - public void reSeed() { - delegate.reSeed(); - } - - /** - * Sets the PRNG algorithm for the underlying SecureRandom instance using - * the Security Provider API. The Security Provider API is defined in <a - * href = - * "http://java.sun.com/j2se/1.3/docs/guide/security/CryptoSpec.html#AppA"> - * Java Cryptography Architecture API Specification & Reference.</a> - * <p> - * <strong>USAGE NOTE:</strong> This method carries <i>significant</i> - * overhead and may take several seconds to execute. - * </p> - * - * @param algorithm - * the name of the PRNG algorithm - * @param provider - * the name of the provider - * @throws NoSuchAlgorithmException - * if the specified algorithm is not available - * @throws NoSuchProviderException - * if the specified provider is not installed - */ - public void setSecureAlgorithm(String algorithm, String provider) - throws NoSuchAlgorithmException, NoSuchProviderException { - delegate.setSecureAlgorithm(algorithm, provider); - } - - /** - * {@inheritDoc} - * - * <p> - * Uses a 2-cycle permutation shuffle. The shuffling process is described <a - * href="http://www.maths.abdn.ac.uk/~igc/tch/mx4002/notes/node83.html"> - * here</a>. - * </p> - */ - public int[] nextPermutation(int n, int k) - throws NotStrictlyPositiveException, NumberIsTooLargeException { - return delegate.nextPermutation(n, k); - } - - /** - * {@inheritDoc} - * - * <p> - * <strong>Algorithm Description</strong>: Uses a 2-cycle permutation - * shuffle to generate a random permutation of <code>c.size()</code> and - * then returns the elements whose indexes correspond to the elements of the - * generated permutation. This technique is described, and proven to - * generate random samples <a - * href="http://www.maths.abdn.ac.uk/~igc/tch/mx4002/notes/node83.html"> - * here</a> - * </p> - */ - public Object[] nextSample(Collection<?> c, int k) - throws NotStrictlyPositiveException, NumberIsTooLargeException { - return delegate.nextSample(c, k); - } - - /** - * Generate a random deviate from the given distribution using the - * <a href="http://en.wikipedia.org/wiki/Inverse_transform_sampling"> inversion method.</a> - * - * @param distribution Continuous distribution to generate a random value from - * @return a random value sampled from the given distribution - * @throws MathIllegalArgumentException if the underlynig distribution throws one - * @since 2.2 - * @deprecated use the distribution's sample() method - */ - @Deprecated - public double nextInversionDeviate(RealDistribution distribution) - throws MathIllegalArgumentException { - return distribution.inverseCumulativeProbability(nextUniform(0, 1)); - - } - - /** - * Generate a random deviate from the given distribution using the - * <a href="http://en.wikipedia.org/wiki/Inverse_transform_sampling"> inversion method.</a> - * - * @param distribution Integer distribution to generate a random value from - * @return a random value sampled from the given distribution - * @throws MathIllegalArgumentException if the underlynig distribution throws one - * @since 2.2 - * @deprecated use the distribution's sample() method - */ - @Deprecated - public int nextInversionDeviate(IntegerDistribution distribution) - throws MathIllegalArgumentException { - return distribution.inverseCumulativeProbability(nextUniform(0, 1)); - } - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomGenerator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomGenerator.java deleted file mode 100644 index 3ae8774585d2..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomGenerator.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.random; - - -/** - * Interface extracted from <code>java.util.Random</code>. This interface is - * implemented by {@link AbstractRandomGenerator}. - * - * @since 1.1 - */ -public interface RandomGenerator { - - /** - * Sets the seed of the underlying random number generator using an - * <code>int</code> seed. - * <p>Sequences of values generated starting with the same seeds - * should be identical. - * </p> - * @param seed the seed value - */ - void setSeed(int seed); - - /** - * Sets the seed of the underlying random number generator using an - * <code>int</code> array seed. - * <p>Sequences of values generated starting with the same seeds - * should be identical. - * </p> - * @param seed the seed value - */ - void setSeed(int[] seed); - - /** - * Sets the seed of the underlying random number generator using a - * <code>long</code> seed. - * <p>Sequences of values generated starting with the same seeds - * should be identical. - * </p> - * @param seed the seed value - */ - void setSeed(long seed); - - /** - * Generates random bytes and places them into a user-supplied - * byte array. The number of random bytes produced is equal to - * the length of the byte array. - * - * @param bytes the non-null byte array in which to put the - * random bytes - */ - void nextBytes(byte[] bytes); - - /** - * Returns the next pseudorandom, uniformly distributed <code>int</code> - * value from this random number generator's sequence. - * All 2<font size="-1"><sup>32</sup></font> possible {@code int} values - * should be produced with (approximately) equal probability. - * - * @return the next pseudorandom, uniformly distributed <code>int</code> - * value from this random number generator's sequence - */ - int nextInt(); - - /** - * Returns a pseudorandom, uniformly distributed {@code int} value - * between 0 (inclusive) and the specified value (exclusive), drawn from - * this random number generator's sequence. - * - * @param n the bound on the random number to be returned. Must be - * positive. - * @return a pseudorandom, uniformly distributed {@code int} - * value between 0 (inclusive) and n (exclusive). - * @throws IllegalArgumentException if n is not positive. - */ - int nextInt(int n); - - /** - * Returns the next pseudorandom, uniformly distributed <code>long</code> - * value from this random number generator's sequence. All - * 2<font size="-1"><sup>64</sup></font> possible {@code long} values - * should be produced with (approximately) equal probability. - * - * @return the next pseudorandom, uniformly distributed <code>long</code> - *value from this random number generator's sequence - */ - long nextLong(); - - /** - * Returns the next pseudorandom, uniformly distributed - * <code>boolean</code> value from this random number generator's - * sequence. - * - * @return the next pseudorandom, uniformly distributed - * <code>boolean</code> value from this random number generator's - * sequence - */ - boolean nextBoolean(); - - /** - * Returns the next pseudorandom, uniformly distributed <code>float</code> - * value between <code>0.0</code> and <code>1.0</code> from this random - * number generator's sequence. - * - * @return the next pseudorandom, uniformly distributed <code>float</code> - * value between <code>0.0</code> and <code>1.0</code> from this - * random number generator's sequence - */ - float nextFloat(); - - /** - * Returns the next pseudorandom, uniformly distributed - * <code>double</code> value between <code>0.0</code> and - * <code>1.0</code> from this random number generator's sequence. - * - * @return the next pseudorandom, uniformly distributed - * <code>double</code> value between <code>0.0</code> and - * <code>1.0</code> from this random number generator's sequence - */ - double nextDouble(); - - /** - * Returns the next pseudorandom, Gaussian ("normally") distributed - * <code>double</code> value with mean <code>0.0</code> and standard - * deviation <code>1.0</code> from this random number generator's sequence. - * - * @return the next pseudorandom, Gaussian ("normally") distributed - * <code>double</code> value with mean <code>0.0</code> and - * standard deviation <code>1.0</code> from this random number - * generator's sequence - */ - double nextGaussian(); -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomGeneratorFactory.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomGeneratorFactory.java deleted file mode 100644 index be22f9796a24..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/RandomGeneratorFactory.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.random; - -import java.util.Random; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; - -/** - * Utilities for creating {@link RandomGenerator} instances. - * - * @since 3.3 - */ -public class RandomGeneratorFactory { - /** - * Class contains only static methods. - */ - private RandomGeneratorFactory() {} - - /** - * Creates a {@link RandomDataGenerator} instance that wraps a - * {@link Random} instance. - * - * @param rng JDK {@link Random} instance that will generate the - * the random data. - * @return the given RNG, wrapped in a {@link RandomGenerator}. - */ - public static RandomGenerator createRandomGenerator(final Random rng) { - return new RandomGenerator() { - /** {@inheritDoc} */ - public void setSeed(int seed) { - rng.setSeed((long) seed); - } - - /** {@inheritDoc} */ - public void setSeed(int[] seed) { - rng.setSeed(convertToLong(seed)); - } - - /** {@inheritDoc} */ - public void setSeed(long seed) { - rng.setSeed(seed); - } - - /** {@inheritDoc} */ - public void nextBytes(byte[] bytes) { - rng.nextBytes(bytes); - } - - /** {@inheritDoc} */ - public int nextInt() { - return rng.nextInt(); - } - - /** {@inheritDoc} */ - public int nextInt(int n) { - if (n <= 0) { - throw new NotStrictlyPositiveException(n); - } - return rng.nextInt(n); - } - - /** {@inheritDoc} */ - public long nextLong() { - return rng.nextLong(); - } - - /** {@inheritDoc} */ - public boolean nextBoolean() { - return rng.nextBoolean(); - } - - /** {@inheritDoc} */ - public float nextFloat() { - return rng.nextFloat(); - } - - /** {@inheritDoc} */ - public double nextDouble() { - return rng.nextDouble(); - } - - /** {@inheritDoc} */ - public double nextGaussian() { - return rng.nextGaussian(); - } - }; - } - - /** - * Converts seed from one representation to another. - * - * @param seed Original seed. - * @return the converted seed. - */ - public static long convertToLong(int[] seed) { - // The following number is the largest prime that fits - // in 32 bits (i.e. 2^32 - 5). - final long prime = 4294967291l; - - long combined = 0l; - for (int s : seed) { - combined = combined * prime + s; - } - - return combined; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/Well19937c.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/Well19937c.java deleted file mode 100644 index 312a3db9120c..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/random/Well19937c.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.random; - - -/** This class implements the WELL19937c pseudo-random number generator - * from François Panneton, Pierre L'Ecuyer and Makoto Matsumoto. - - * <p>This generator is described in a paper by François Panneton, - * Pierre L'Ecuyer and Makoto Matsumoto <a - * href="http://www.iro.umontreal.ca/~lecuyer/myftp/papers/wellrng.pdf">Improved - * Long-Period Generators Based on Linear Recurrences Modulo 2</a> ACM - * Transactions on Mathematical Software, 32, 1 (2006). The errata for the paper - * are in <a href="http://www.iro.umontreal.ca/~lecuyer/myftp/papers/wellrng-errata.txt">wellrng-errata.txt</a>.</p> - - * @see <a href="http://www.iro.umontreal.ca/~panneton/WELLRNG.html">WELL Random number generator</a> - * @since 2.2 - - */ -public class Well19937c extends AbstractWell { - - /** Serializable version identifier. */ - private static final long serialVersionUID = -7203498180754925124L; - - /** Number of bits in the pool. */ - private static final int K = 19937; - - /** First parameter of the algorithm. */ - private static final int M1 = 70; - - /** Second parameter of the algorithm. */ - private static final int M2 = 179; - - /** Third parameter of the algorithm. */ - private static final int M3 = 449; - - /** Creates a new random number generator. - * <p>The instance is initialized using the current time as the - * seed.</p> - */ - public Well19937c() { - super(K, M1, M2, M3); - } - - /** Creates a new random number generator using a single int seed. - * @param seed the initial seed (32 bits integer) - */ - public Well19937c(int seed) { - super(K, M1, M2, M3, seed); - } - - /** Creates a new random number generator using an int array seed. - * @param seed the initial seed (32 bits integers array), if null - * the seed of the generator will be related to the current time - */ - public Well19937c(int[] seed) { - super(K, M1, M2, M3, seed); - } - - /** Creates a new random number generator using a single long seed. - * @param seed the initial seed (64 bits integer) - */ - public Well19937c(long seed) { - super(K, M1, M2, M3, seed); - } - - /** {@inheritDoc} */ - @Override - protected int next(final int bits) { - - final int indexRm1 = iRm1[index]; - final int indexRm2 = iRm2[index]; - - final int v0 = v[index]; - final int vM1 = v[i1[index]]; - final int vM2 = v[i2[index]]; - final int vM3 = v[i3[index]]; - - final int z0 = (0x80000000 & v[indexRm1]) ^ (0x7FFFFFFF & v[indexRm2]); - final int z1 = (v0 ^ (v0 << 25)) ^ (vM1 ^ (vM1 >>> 27)); - final int z2 = (vM2 >>> 9) ^ (vM3 ^ (vM3 >>> 1)); - final int z3 = z1 ^ z2; - int z4 = z0 ^ (z1 ^ (z1 << 9)) ^ (z2 ^ (z2 << 21)) ^ (z3 ^ (z3 >>> 21)); - - v[index] = z3; - v[indexRm1] = z4; - v[indexRm2] &= 0x80000000; - index = indexRm1; - - - // add Matsumoto-Kurita tempering - // to get a maximally-equidistributed generator - z4 ^= (z4 << 7) & 0xe46e1700; - z4 ^= (z4 << 15) & 0x9b868000; - - return z4 >>> (32 - bits); - - } - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/special/BesselJ.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/special/BesselJ.java deleted file mode 100644 index 6daa165cf643..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/special/BesselJ.java +++ /dev/null @@ -1,652 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.special; - -import com.azure.cosmos.implementation.apachecommons.math.analysis.UnivariateFunction; -import com.azure.cosmos.implementation.apachecommons.math.exception.ConvergenceException; -import com.azure.cosmos.implementation.apachecommons.math.exception.MathIllegalArgumentException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; -import com.azure.cosmos.implementation.apachecommons.math.util.MathArrays; - -/** - * This class provides computation methods related to Bessel - * functions of the first kind. Detailed descriptions of these functions are - * available in <a - * href="http://en.wikipedia.org/wiki/Bessel_function">Wikipedia</a>, <a - * href="http://en.wikipedia.org/wiki/Abramowitz_and_Stegun">Abrabowitz and - * Stegun</a> (Ch. 9-11), and <a href="http://dlmf.nist.gov/">DLMF</a> (Ch. 10). - * <p> - * This implementation is based on the rjbesl Fortran routine at - * <a href="http://www.netlib.org/specfun/rjbesl">Netlib</a>.</p> - * <p> - * From the Fortran code: </p> - * <p> - * This program is based on a program written by David J. Sookne (2) that - * computes values of the Bessel functions J or I of real argument and integer - * order. Modifications include the restriction of the computation to the J - * Bessel function of non-negative real argument, the extension of the - * computation to arbitrary positive order, and the elimination of most - * underflow.</p> - * <p> - * References:</p> - * <ul> - * <li>"A Note on Backward Recurrence Algorithms," Olver, F. W. J., and Sookne, - * D. J., Math. Comp. 26, 1972, pp 941-947.</li> - * <li>"Bessel Functions of Real Argument and Integer Order," Sookne, D. J., NBS - * Jour. of Res. B. 77B, 1973, pp 125-132.</li> - * </ul> </p> - * @since 3.4 - */ -public class BesselJ - implements UnivariateFunction { - - // --------------------------------------------------------------------- - // Mathematical constants - // --------------------------------------------------------------------- - - /** -2 / pi */ - private static final double PI2 = 0.636619772367581343075535; - - /** first few significant digits of 2pi */ - private static final double TOWPI1 = 6.28125; - - /** 2pi - TWOPI1 to working precision */ - private static final double TWOPI2 = 1.935307179586476925286767e-3; - - /** TOWPI1 + TWOPI2 */ - private static final double TWOPI = TOWPI1 + TWOPI2; - - // --------------------------------------------------------------------- - // Machine-dependent parameters - // --------------------------------------------------------------------- - - /** - * 10.0^K, where K is the largest integer such that ENTEN is - * machine-representable in working precision - */ - private static final double ENTEN = 1.0e308; - - /** - * Decimal significance desired. Should be set to (INT(log_{10}(2) * (it)+1)). - * Setting NSIG lower will result in decreased accuracy while setting - * NSIG higher will increase CPU time without increasing accuracy. - * The truncation error is limited to a relative error of - * T=.5(10^(-NSIG)). - */ - private static final double ENSIG = 1.0e16; - - /** 10.0 ** (-K) for the smallest integer K such that K >= NSIG/4 */ - private static final double RTNSIG = 1.0e-4; - - /** Smallest ABS(X) such that X/4 does not underflow */ - private static final double ENMTEN = 8.90e-308; - - /** Minimum acceptable value for x */ - private static final double X_MIN = 0.0; - - /** - * Upper limit on the magnitude of x. If abs(x) = n, then at least - * n iterations of the backward recursion will be executed. The value of - * 10.0 ** 4 is used on every machine. - */ - private static final double X_MAX = 1.0e4; - - /** First 25 factorials as doubles */ - private static final double[] FACT = { - 1.0, 1.0, 2.0, 6.0, 24.0, 120.0, 720.0, 5040.0, 40320.0, 362880.0, - 3628800.0, 39916800.0, 479001600.0, 6227020800.0, 87178291200.0, - 1.307674368e12, 2.0922789888e13, 3.55687428096e14, 6.402373705728e15, - 1.21645100408832e17, 2.43290200817664e18, 5.109094217170944e19, - 1.12400072777760768e21, 2.585201673888497664e22, - 6.2044840173323943936e23 - }; - - /** Order of the function computed when {@link #value(double)} is used */ - private final double order; - - /** - * Create a new BesselJ with the given order. - * - * @param order order of the function computed when using {@link #value(double)}. - */ - public BesselJ(double order) { - this.order = order; - } - - /** - * Returns the value of the constructed Bessel function of the first kind, - * for the passed argument. - * - * @param x Argument - * @return Value of the Bessel function at x - * @throws MathIllegalArgumentException if {@code x} is too large relative to {@code order} - * @throws ConvergenceException if the algorithm fails to converge - */ - public double value(double x) - throws MathIllegalArgumentException, ConvergenceException { - return BesselJ.value(order, x); - } - - /** - * Returns the first Bessel function, \(J_{order}(x)\). - * - * @param order Order of the Bessel function - * @param x Argument - * @return Value of the Bessel function of the first kind, \(J_{order}(x)\) - * @throws MathIllegalArgumentException if {@code x} is too large relative to {@code order} - * @throws ConvergenceException if the algorithm fails to converge - */ - public static double value(double order, double x) - throws MathIllegalArgumentException, ConvergenceException { - final int n = (int) order; - final double alpha = order - n; - final int nb = n + 1; - final BesselJResult res = rjBesl(x, alpha, nb); - - if (res.nVals >= nb) { - return res.vals[n]; - } else if (res.nVals < 0) { - throw new MathIllegalArgumentException(LocalizedFormats.BESSEL_FUNCTION_BAD_ARGUMENT,order, x); - } else if (FastMath.abs(res.vals[res.nVals - 1]) < 1e-100) { - return res.vals[n]; // underflow; return value (will be zero) - } - throw new ConvergenceException(LocalizedFormats.BESSEL_FUNCTION_FAILED_CONVERGENCE, order, x); - } - - /** - * Encapsulates the results returned by {@link BesselJ#rjBesl(double, double, int)}. - * <p> - * {@link #getVals()} returns the computed function values. - * {@link #getnVals()} is the number of values among those returned by {@link #getnVals()} - * that can be considered accurate. - * </p><p> - * <ul> - * <li>nVals < 0: An argument is out of range. For example, nb <= 0, alpha - * < 0 or > 1, or x is too large. In this case, b(0) is set to zero, the - * remainder of the b-vector is not calculated, and nVals is set to - * MIN(nb,0) - 1 so that nVals != nb.</li> - * <li>nb > nVals > 0: Not all requested function values could be calculated - * accurately. This usually occurs because nb is much larger than abs(x). In - * this case, b(n) is calculated to the desired accuracy for n < nVals, but - * precision is lost for nVals < n <= nb. If b(n) does not vanish for n > - * nVals (because it is too small to be represented), and b(n)/b(nVals) = - * \(10^{-k}\), then only the first NSIG-k significant figures of b(n) can be - * trusted.</li></ul></p> - */ - public static class BesselJResult { - - /** Bessel function values */ - private final double[] vals; - - /** Valid value count */ - private final int nVals; - - /** - * Create a new BesselJResult with the given values and valid value count. - * - * @param b values - * @param n count of valid values - */ - public BesselJResult(double[] b, int n) { - vals = MathArrays.copyOf(b, b.length); - nVals = n; - } - - /** - * @return the computed function values - */ - public double[] getVals() { - return MathArrays.copyOf(vals, vals.length); - } - - /** - * @return the number of valid function values (normally the same as the - * length of the array returned by {@link #getnVals()}) - */ - public int getnVals() { - return nVals; - } - } - - /** - * Calculates Bessel functions \(J_{n+alpha}(x)\) for - * non-negative argument x, and non-negative order n + alpha. - * <p> - * Before using the output vector, the user should check that - * nVals = nb, i.e., all orders have been calculated to the desired accuracy. - * See BesselResult class javadoc for details on return values. - * </p> - * @param x non-negative real argument for which J's are to be calculated - * @param alpha fractional part of order for which J's or exponentially - * scaled J's (\(J\cdot e^{x}\)) are to be calculated. 0 <= alpha < 1.0. - * @param nb integer number of functions to be calculated, nb > 0. The first - * function calculated is of order alpha, and the last is of order - * nb - 1 + alpha. - * @return BesselJResult a vector of the functions - * \(J_{alpha}(x)\) through \(J_{nb-1+alpha}(x)\), or the corresponding exponentially - * scaled functions and an integer output variable indicating possible errors - */ - public static BesselJResult rjBesl(double x, double alpha, int nb) { - final double[] b = new double[nb]; - - int ncalc = 0; - double alpem = 0; - double alp2em = 0; - - // --------------------------------------------------------------------- - // Check for out of range arguments. - // --------------------------------------------------------------------- - final int magx = (int) x; - if ((nb > 0) && (x >= X_MIN) && (x <= X_MAX) && (alpha >= 0) && - (alpha < 1)) { - // --------------------------------------------------------------------- - // Initialize result array to zero. - // --------------------------------------------------------------------- - ncalc = nb; - for (int i = 0; i < nb; ++i) { - b[i] = 0; - } - - // --------------------------------------------------------------------- - // Branch to use 2-term ascending series for small X and asymptotic - // form for large X when NB is not too large. - // --------------------------------------------------------------------- - double tempa; - double tempb; - double tempc; - double tover; - if (x < RTNSIG) { - // --------------------------------------------------------------------- - // Two-term ascending series for small X. - // --------------------------------------------------------------------- - tempa = 1; - alpem = 1 + alpha; - double halfx = 0; - if (x > ENMTEN) { - halfx = 0.5 * x; - } - if (alpha != 0) { - tempa = FastMath.pow(halfx, alpha) / - (alpha * Gamma.gamma(alpha)); - } - tempb = 0; - if (x + 1 > 1) { - tempb = -halfx * halfx; - } - b[0] = tempa + (tempa * tempb / alpem); - if ((x != 0) && (b[0] == 0)) { - ncalc = 0; - } - if (nb != 1) { - if (x <= 0) { - for (int n = 1; n < nb; ++n) { - b[n] = 0; - } - } else { - // --------------------------------------------------------------------- - // Calculate higher order functions. - // --------------------------------------------------------------------- - tempc = halfx; - tover = tempb != 0 ? ENMTEN / tempb : 2 * ENMTEN / x; - for (int n = 1; n < nb; ++n) { - tempa /= alpem; - alpem += 1; - tempa *= tempc; - if (tempa <= tover * alpem) { - tempa = 0; - } - b[n] = tempa + (tempa * tempb / alpem); - if ((b[n] == 0) && (ncalc > n)) { - ncalc = n; - } - } - } - } - } else if ((x > 25.0) && (nb <= magx + 1)) { - // --------------------------------------------------------------------- - // Asymptotic series for X > 25 - // --------------------------------------------------------------------- - final double xc = FastMath.sqrt(PI2 / x); - final double mul = 0.125 / x; - final double xin = mul * mul; - int m = 0; - if (x >= 130.0) { - m = 4; - } else if (x >= 35.0) { - m = 8; - } else { - m = 11; - } - - final double xm = 4.0 * m; - // --------------------------------------------------------------------- - // Argument reduction for SIN and COS routines. - // --------------------------------------------------------------------- - double t = (double) ((int) ((x / TWOPI) + 0.5)); - final double z = x - t * TOWPI1 - t * TWOPI2 - (alpha + 0.5) / PI2; - double vsin = FastMath.sin(z); - double vcos = FastMath.cos(z); - double gnu = 2 * alpha; - double capq; - double capp; - double s; - double t1; - double xk; - for (int i = 1; i <= 2; i++) { - s = (xm - 1 - gnu) * (xm - 1 + gnu) * xin * 0.5; - t = (gnu - (xm - 3.0)) * (gnu + (xm - 3.0)); - capp = (s * t) / FACT[2 * m]; - t1 = (gnu - (xm + 1)) * (gnu + (xm + 1)); - capq = (s * t1) / FACT[2 * m + 1]; - xk = xm; - int k = 2 * m; - t1 = t; - - for (int j = 2; j <= m; j++) { - xk -= 4.0; - s = (xk - 1 - gnu) * (xk - 1 + gnu); - t = (gnu - (xk - 3.0)) * (gnu + (xk - 3.0)); - capp = (capp + 1 / FACT[k - 2]) * s * t * xin; - capq = (capq + 1 / FACT[k - 1]) * s * t1 * xin; - k -= 2; - t1 = t; - } - - capp += 1; - capq = (capq + 1) * ((gnu * gnu) - 1) * (0.125 / x); - b[i - 1] = xc * (capp * vcos - capq * vsin); - if (nb == 1) { - return new BesselJResult(MathArrays.copyOf(b, b.length), - ncalc); - } - t = vsin; - vsin = -vcos; - vcos = t; - gnu += 2.0; - } - - // --------------------------------------------------------------------- - // If NB > 2, compute J(X,ORDER+I) I = 2, NB-1 - // --------------------------------------------------------------------- - if (nb > 2) { - gnu = 2 * alpha + 2.0; - for (int j = 2; j < nb; ++j) { - b[j] = gnu * b[j - 1] / x - b[j - 2]; - gnu += 2.0; - } - } - } else { - // --------------------------------------------------------------------- - // Use recurrence to generate results. First initialize the - // calculation of P*S. - // --------------------------------------------------------------------- - final int nbmx = nb - magx; - int n = magx + 1; - int nstart = 0; - int nend = 0; - double en = 2 * (n + alpha); - double plast = 1; - double p = en / x; - double pold; - // --------------------------------------------------------------------- - // Calculate general significance test. - // --------------------------------------------------------------------- - double test = 2 * ENSIG; - boolean readyToInitialize = false; - if (nbmx >= 3) { - // --------------------------------------------------------------------- - // Calculate P*S until N = NB-1. Check for possible - // overflow. - // --------------------------------------------------------------------- - tover = ENTEN / ENSIG; - nstart = magx + 2; - nend = nb - 1; - en = 2 * (nstart - 1 + alpha); - double psave; - double psavel; - for (int k = nstart; k <= nend; k++) { - n = k; - en += 2.0; - pold = plast; - plast = p; - p = (en * plast / x) - pold; - if (p > tover) { - // --------------------------------------------------------------------- - // To avoid overflow, divide P*S by TOVER. Calculate - // P*S until - // ABS(P) > 1. - // --------------------------------------------------------------------- - tover = ENTEN; - p /= tover; - plast /= tover; - psave = p; - psavel = plast; - nstart = n + 1; - do { - n += 1; - en += 2.0; - pold = plast; - plast = p; - p = (en * plast / x) - pold; - } while (p <= 1); - tempb = en / x; - // --------------------------------------------------------------------- - // Calculate backward test and find NCALC, the - // highest N such that - // the test is passed. - // --------------------------------------------------------------------- - test = pold * plast * (0.5 - 0.5 / (tempb * tempb)); - test /= ENSIG; - p = plast * tover; - n -= 1; - en -= 2.0; - nend = FastMath.min(nb, n); - for (int l = nstart; l <= nend; l++) { - pold = psavel; - psavel = psave; - psave = (en * psavel / x) - pold; - if (psave * psavel > test) { - ncalc = l - 1; - readyToInitialize = true; - break; - } - } - ncalc = nend; - readyToInitialize = true; - break; - } - } - if (!readyToInitialize) { - n = nend; - en = 2 * (n + alpha); - // --------------------------------------------------------------------- - // Calculate special significance test for NBMX > 2. - // --------------------------------------------------------------------- - test = FastMath.max(test, FastMath.sqrt(plast * ENSIG) * - FastMath.sqrt(2 * p)); - } - } - // --------------------------------------------------------------------- - // Calculate P*S until significance test passes. - // --------------------------------------------------------------------- - if (!readyToInitialize) { - do { - n += 1; - en += 2.0; - pold = plast; - plast = p; - p = (en * plast / x) - pold; - } while (p < test); - } - // --------------------------------------------------------------------- - // Initialize the backward recursion and the normalization sum. - // --------------------------------------------------------------------- - n += 1; - en += 2.0; - tempb = 0; - tempa = 1 / p; - int m = (2 * n) - 4 * (n / 2); - double sum = 0; - double em = (double) (n / 2); - alpem = em - 1 + alpha; - alp2em = 2 * em + alpha; - if (m != 0) { - sum = tempa * alpem * alp2em / em; - } - nend = n - nb; - - boolean readyToNormalize = false; - boolean calculatedB0 = false; - - // --------------------------------------------------------------------- - // Recur backward via difference equation, calculating (but not - // storing) B(N), until N = NB. - // --------------------------------------------------------------------- - for (int l = 1; l <= nend; l++) { - n -= 1; - en -= 2.0; - tempc = tempb; - tempb = tempa; - tempa = (en * tempb / x) - tempc; - m = 2 - m; - if (m != 0) { - em -= 1; - alp2em = 2 * em + alpha; - if (n == 1) { - break; - } - alpem = em - 1 + alpha; - if (alpem == 0) { - alpem = 1; - } - sum = (sum + tempa * alp2em) * alpem / em; - } - } - - // --------------------------------------------------------------------- - // Store B(NB). - // --------------------------------------------------------------------- - b[n - 1] = tempa; - if (nend >= 0) { - if (nb <= 1) { - alp2em = alpha; - if (alpha + 1 == 1) { - alp2em = 1; - } - sum += b[0] * alp2em; - readyToNormalize = true; - } else { - // --------------------------------------------------------------------- - // Calculate and store B(NB-1). - // --------------------------------------------------------------------- - n -= 1; - en -= 2.0; - b[n - 1] = (en * tempa / x) - tempb; - if (n == 1) { - calculatedB0 = true; - } else { - m = 2 - m; - if (m != 0) { - em -= 1; - alp2em = 2 * em + alpha; - alpem = em - 1 + alpha; - if (alpem == 0) { - alpem = 1; - } - - sum = (sum + (b[n - 1] * alp2em)) * alpem / em; - } - } - } - } - if (!readyToNormalize && !calculatedB0) { - nend = n - 2; - if (nend != 0) { - // --------------------------------------------------------------------- - // Calculate via difference equation and store B(N), - // until N = 2. - // --------------------------------------------------------------------- - - for (int l = 1; l <= nend; l++) { - n -= 1; - en -= 2.0; - b[n - 1] = (en * b[n] / x) - b[n + 1]; - m = 2 - m; - if (m != 0) { - em -= 1; - alp2em = 2 * em + alpha; - alpem = em - 1 + alpha; - if (alpem == 0) { - alpem = 1; - } - - sum = (sum + b[n - 1] * alp2em) * alpem / em; - } - } - } - } - // --------------------------------------------------------------------- - // Calculate b[0] - // --------------------------------------------------------------------- - if (!readyToNormalize) { - if (!calculatedB0) { - b[0] = 2.0 * (alpha + 1) * b[1] / x - b[2]; - } - em -= 1; - alp2em = 2 * em + alpha; - if (alp2em == 0) { - alp2em = 1; - } - sum += b[0] * alp2em; - } - // --------------------------------------------------------------------- - // Normalize. Divide all B(N) by sum. - // --------------------------------------------------------------------- - - if (FastMath.abs(alpha) > 1e-16) { - sum *= Gamma.gamma(alpha) * FastMath.pow(x * 0.5, -alpha); - } - tempa = ENMTEN; - if (sum > 1) { - tempa *= sum; - } - - for (n = 0; n < nb; n++) { - if (FastMath.abs(b[n]) < tempa) { - b[n] = 0; - } - b[n] /= sum; - } - } - // --------------------------------------------------------------------- - // Error return -- X, NB, or ALPHA is out of range. - // --------------------------------------------------------------------- - } else { - if (b.length > 0) { - b[0] = 0; - } - ncalc = FastMath.min(nb, 0) - 1; - } - return new BesselJResult(MathArrays.copyOf(b, b.length), ncalc); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/special/Beta.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/special/Beta.java deleted file mode 100644 index 0374d3db5702..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/special/Beta.java +++ /dev/null @@ -1,518 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.special; - -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooSmallException; -import com.azure.cosmos.implementation.apachecommons.math.exception.OutOfRangeException; -import com.azure.cosmos.implementation.apachecommons.math.special.Gamma; -import com.azure.cosmos.implementation.apachecommons.math.util.ContinuedFraction; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** - * <p> - * This is a utility class that provides computation methods related to the - * Beta family of functions. - * </p> - * <p> - * Implementation of {@link #logBeta(double, double)} is based on the - * algorithms described in - * <ul> - * <li><a href="http://dx.doi.org/10.1145/22721.23109">Didonato and Morris - * (1986)</a>, <em>Computation of the Incomplete Gamma Function Ratios - * and their Inverse</em>, TOMS 12(4), 377-393,</li> - * <li><a href="http://dx.doi.org/10.1145/131766.131776">Didonato and Morris - * (1992)</a>, <em>Algorithm 708: Significant Digit Computation of the - * Incomplete Beta Function Ratios</em>, TOMS 18(3), 360-373,</li> - * </ul> - * and implemented in the - * <a href="http://www.dtic.mil/docs/citations/ADA476840">NSWC Library of Mathematical Functions</a>, - * available - * <a href="http://www.ualberta.ca/CNS/RESEARCH/Software/NumericalNSWC/site.html">here</a>. - * This library is "approved for public release", and the - * <a href="http://www.dtic.mil/dtic/pdf/announcements/CopyrightGuidance.pdf">Copyright guidance</a> - * indicates that unless otherwise stated in the code, all FORTRAN functions in - * this library are license free. Since no such notice appears in the code these - * functions can safely be ported to Commons-Math. - * </p> - * - * - */ -public class Beta { - /** Maximum allowed numerical error. */ - private static final double DEFAULT_EPSILON = 1E-14; - - /** The constant value of ½log 2π. */ - private static final double HALF_LOG_TWO_PI = .9189385332046727; - - /** - * <p> - * The coefficients of the series expansion of the Δ function. This function - * is defined as follows - * </p> - * <center>Δ(x) = log Γ(x) - (x - 0.5) log a + a - 0.5 log 2π,</center> - * <p> - * see equation (23) in Didonato and Morris (1992). The series expansion, - * which applies for x ≥ 10, reads - * </p> - * <pre> - * 14 - * ==== - * 1 \ 2 n - * Δ(x) = --- > d (10 / x) - * x / n - * ==== - * n = 0 - * <pre> - */ - private static final double[] DELTA = { - .833333333333333333333333333333E-01, - -.277777777777777777777777752282E-04, - .793650793650793650791732130419E-07, - -.595238095238095232389839236182E-09, - .841750841750832853294451671990E-11, - -.191752691751854612334149171243E-12, - .641025640510325475730918472625E-14, - -.295506514125338232839867823991E-15, - .179643716359402238723287696452E-16, - -.139228964661627791231203060395E-17, - .133802855014020915603275339093E-18, - -.154246009867966094273710216533E-19, - .197701992980957427278370133333E-20, - -.234065664793997056856992426667E-21, - .171348014966398575409015466667E-22 - }; - - /** - * Default constructor. Prohibit instantiation. - */ - private Beta() {} - - /** - * Returns the - * <a href="http://mathworld.wolfram.com/RegularizedBetaFunction.html"> - * regularized beta function</a> I(x, a, b). - * - * @param x Value. - * @param a Parameter {@code a}. - * @param b Parameter {@code b}. - * @return the regularized beta function I(x, a, b). - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.MaxCountExceededException - * if the algorithm fails to converge. - */ - public static double regularizedBeta(double x, double a, double b) { - return regularizedBeta(x, a, b, DEFAULT_EPSILON, Integer.MAX_VALUE); - } - - /** - * Returns the - * <a href="http://mathworld.wolfram.com/RegularizedBetaFunction.html"> - * regularized beta function</a> I(x, a, b). - * - * @param x Value. - * @param a Parameter {@code a}. - * @param b Parameter {@code b}. - * @param epsilon When the absolute value of the nth item in the - * series is less than epsilon the approximation ceases to calculate - * further elements in the series. - * @return the regularized beta function I(x, a, b) - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.MaxCountExceededException - * if the algorithm fails to converge. - */ - public static double regularizedBeta(double x, - double a, double b, - double epsilon) { - return regularizedBeta(x, a, b, epsilon, Integer.MAX_VALUE); - } - - /** - * Returns the regularized beta function I(x, a, b). - * - * @param x the value. - * @param a Parameter {@code a}. - * @param b Parameter {@code b}. - * @param maxIterations Maximum number of "iterations" to complete. - * @return the regularized beta function I(x, a, b) - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.MaxCountExceededException - * if the algorithm fails to converge. - */ - public static double regularizedBeta(double x, - double a, double b, - int maxIterations) { - return regularizedBeta(x, a, b, DEFAULT_EPSILON, maxIterations); - } - - /** - * Returns the regularized beta function I(x, a, b). - * - * The implementation of this method is based on: - * <ul> - * <li> - * <a href="http://mathworld.wolfram.com/RegularizedBetaFunction.html"> - * Regularized Beta Function</a>.</li> - * <li> - * <a href="http://functions.wolfram.com/06.21.10.0001.01"> - * Regularized Beta Function</a>.</li> - * </ul> - * - * @param x the value. - * @param a Parameter {@code a}. - * @param b Parameter {@code b}. - * @param epsilon When the absolute value of the nth item in the - * series is less than epsilon the approximation ceases to calculate - * further elements in the series. - * @param maxIterations Maximum number of "iterations" to complete. - * @return the regularized beta function I(x, a, b) - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.MaxCountExceededException - * if the algorithm fails to converge. - */ - public static double regularizedBeta(double x, - final double a, final double b, - double epsilon, int maxIterations) { - double ret; - - if (Double.isNaN(x) || - Double.isNaN(a) || - Double.isNaN(b) || - x < 0 || - x > 1 || - a <= 0 || - b <= 0) { - ret = Double.NaN; - } else if (x > (a + 1) / (2 + b + a) && - 1 - x <= (b + 1) / (2 + b + a)) { - ret = 1 - regularizedBeta(1 - x, b, a, epsilon, maxIterations); - } else { - ContinuedFraction fraction = new ContinuedFraction() { - - /** {@inheritDoc} */ - @Override - protected double getB(int n, double x) { - double ret; - double m; - if (n % 2 == 0) { // even - m = n / 2.0; - ret = (m * (b - m) * x) / - ((a + (2 * m) - 1) * (a + (2 * m))); - } else { - m = (n - 1.0) / 2.0; - ret = -((a + m) * (a + b + m) * x) / - ((a + (2 * m)) * (a + (2 * m) + 1.0)); - } - return ret; - } - - /** {@inheritDoc} */ - @Override - protected double getA(int n, double x) { - return 1.0; - } - }; - ret = FastMath.exp((a * FastMath.log(x)) + (b * FastMath.log1p(-x)) - - FastMath.log(a) - logBeta(a, b)) * - 1.0 / fraction.evaluate(x, epsilon, maxIterations); - } - - return ret; - } - - /** - * Returns the natural logarithm of the beta function B(a, b). - * - * The implementation of this method is based on: - * <ul> - * <li><a href="http://mathworld.wolfram.com/BetaFunction.html"> - * Beta Function</a>, equation (1).</li> - * </ul> - * - * @param a Parameter {@code a}. - * @param b Parameter {@code b}. - * @param epsilon This parameter is ignored. - * @param maxIterations This parameter is ignored. - * @return log(B(a, b)). - * @deprecated as of version 3.1, this method is deprecated as the - * computation of the beta function is no longer iterative; it will be - * removed in version 4.0. Current implementation of this method - * internally calls {@link #logBeta(double, double)}. - */ - @Deprecated - public static double logBeta(double a, double b, - double epsilon, - int maxIterations) { - - return logBeta(a, b); - } - - - /** - * Returns the value of log Γ(a + b) for 1 ≤ a, b ≤ 2. Based on the - * <em>NSWC Library of Mathematics Subroutines</em> double precision - * implementation, {@code DGSMLN}. In {@code BetaTest.testLogGammaSum()}, - * this private method is accessed through reflection. - * - * @param a First argument. - * @param b Second argument. - * @return the value of {@code log(Gamma(a + b))}. - * @throws OutOfRangeException if {@code a} or {@code b} is lower than - * {@code 1.0} or greater than {@code 2.0}. - */ - private static double logGammaSum(final double a, final double b) - throws OutOfRangeException { - - if ((a < 1.0) || (a > 2.0)) { - throw new OutOfRangeException(a, 1.0, 2.0); - } - if ((b < 1.0) || (b > 2.0)) { - throw new OutOfRangeException(b, 1.0, 2.0); - } - - final double x = (a - 1.0) + (b - 1.0); - if (x <= 0.5) { - return Gamma.logGamma1p(1.0 + x); - } else if (x <= 1.5) { - return Gamma.logGamma1p(x) + FastMath.log1p(x); - } else { - return Gamma.logGamma1p(x - 1.0) + FastMath.log(x * (1.0 + x)); - } - } - - /** - * Returns the value of log[Γ(b) / Γ(a + b)] for a ≥ 0 and b ≥ 10. Based on - * the <em>NSWC Library of Mathematics Subroutines</em> double precision - * implementation, {@code DLGDIV}. In - * {@code BetaTest.testLogGammaMinusLogGammaSum()}, this private method is - * accessed through reflection. - * - * @param a First argument. - * @param b Second argument. - * @return the value of {@code log(Gamma(b) / Gamma(a + b))}. - * @throws NumberIsTooSmallException if {@code a < 0.0} or {@code b < 10.0}. - */ - private static double logGammaMinusLogGammaSum(final double a, - final double b) - throws NumberIsTooSmallException { - - if (a < 0.0) { - throw new NumberIsTooSmallException(a, 0.0, true); - } - if (b < 10.0) { - throw new NumberIsTooSmallException(b, 10.0, true); - } - - /* - * d = a + b - 0.5 - */ - final double d; - final double w; - if (a <= b) { - d = b + (a - 0.5); - w = deltaMinusDeltaSum(a, b); - } else { - d = a + (b - 0.5); - w = deltaMinusDeltaSum(b, a); - } - - final double u = d * FastMath.log1p(a / b); - final double v = a * (FastMath.log(b) - 1.0); - - return u <= v ? (w - u) - v : (w - v) - u; - } - - /** - * Returns the value of Δ(b) - Δ(a + b), with 0 ≤ a ≤ b and b ≥ 10. Based - * on equations (26), (27) and (28) in Didonato and Morris (1992). - * - * @param a First argument. - * @param b Second argument. - * @return the value of {@code Delta(b) - Delta(a + b)} - * @throws OutOfRangeException if {@code a < 0} or {@code a > b} - * @throws NumberIsTooSmallException if {@code b < 10} - */ - private static double deltaMinusDeltaSum(final double a, - final double b) - throws OutOfRangeException, NumberIsTooSmallException { - - if ((a < 0) || (a > b)) { - throw new OutOfRangeException(a, 0, b); - } - if (b < 10) { - throw new NumberIsTooSmallException(b, 10, true); - } - - final double h = a / b; - final double p = h / (1.0 + h); - final double q = 1.0 / (1.0 + h); - final double q2 = q * q; - /* - * s[i] = 1 + q + ... - q**(2 * i) - */ - final double[] s = new double[DELTA.length]; - s[0] = 1.0; - for (int i = 1; i < s.length; i++) { - s[i] = 1.0 + (q + q2 * s[i - 1]); - } - /* - * w = Delta(b) - Delta(a + b) - */ - final double sqrtT = 10.0 / b; - final double t = sqrtT * sqrtT; - double w = DELTA[DELTA.length - 1] * s[s.length - 1]; - for (int i = DELTA.length - 2; i >= 0; i--) { - w = t * w + DELTA[i] * s[i]; - } - return w * p / b; - } - - /** - * Returns the value of Δ(p) + Δ(q) - Δ(p + q), with p, q ≥ 10. Based on - * the <em>NSWC Library of Mathematics Subroutines</em> double precision - * implementation, {@code DBCORR}. In - * {@code BetaTest.testSumDeltaMinusDeltaSum()}, this private method is - * accessed through reflection. - * - * @param p First argument. - * @param q Second argument. - * @return the value of {@code Delta(p) + Delta(q) - Delta(p + q)}. - * @throws NumberIsTooSmallException if {@code p < 10.0} or {@code q < 10.0}. - */ - private static double sumDeltaMinusDeltaSum(final double p, - final double q) { - - if (p < 10.0) { - throw new NumberIsTooSmallException(p, 10.0, true); - } - if (q < 10.0) { - throw new NumberIsTooSmallException(q, 10.0, true); - } - - final double a = FastMath.min(p, q); - final double b = FastMath.max(p, q); - final double sqrtT = 10.0 / a; - final double t = sqrtT * sqrtT; - double z = DELTA[DELTA.length - 1]; - for (int i = DELTA.length - 2; i >= 0; i--) { - z = t * z + DELTA[i]; - } - return z / a + deltaMinusDeltaSum(a, b); - } - - /** - * Returns the value of log B(p, q) for 0 ≤ x ≤ 1 and p, q > 0. Based on the - * <em>NSWC Library of Mathematics Subroutines</em> implementation, - * {@code DBETLN}. - * - * @param p First argument. - * @param q Second argument. - * @return the value of {@code log(Beta(p, q))}, {@code NaN} if - * {@code p <= 0} or {@code q <= 0}. - */ - public static double logBeta(final double p, final double q) { - if (Double.isNaN(p) || Double.isNaN(q) || (p <= 0.0) || (q <= 0.0)) { - return Double.NaN; - } - - final double a = FastMath.min(p, q); - final double b = FastMath.max(p, q); - if (a >= 10.0) { - final double w = sumDeltaMinusDeltaSum(a, b); - final double h = a / b; - final double c = h / (1.0 + h); - final double u = -(a - 0.5) * FastMath.log(c); - final double v = b * FastMath.log1p(h); - if (u <= v) { - return (((-0.5 * FastMath.log(b) + HALF_LOG_TWO_PI) + w) - u) - v; - } else { - return (((-0.5 * FastMath.log(b) + HALF_LOG_TWO_PI) + w) - v) - u; - } - } else if (a > 2.0) { - if (b > 1000.0) { - final int n = (int) FastMath.floor(a - 1.0); - double prod = 1.0; - double ared = a; - for (int i = 0; i < n; i++) { - ared -= 1.0; - prod *= ared / (1.0 + ared / b); - } - return (FastMath.log(prod) - n * FastMath.log(b)) + - (Gamma.logGamma(ared) + - logGammaMinusLogGammaSum(ared, b)); - } else { - double prod1 = 1.0; - double ared = a; - while (ared > 2.0) { - ared -= 1.0; - final double h = ared / b; - prod1 *= h / (1.0 + h); - } - if (b < 10.0) { - double prod2 = 1.0; - double bred = b; - while (bred > 2.0) { - bred -= 1.0; - prod2 *= bred / (ared + bred); - } - return FastMath.log(prod1) + - FastMath.log(prod2) + - (Gamma.logGamma(ared) + - (Gamma.logGamma(bred) - - logGammaSum(ared, bred))); - } else { - return FastMath.log(prod1) + - Gamma.logGamma(ared) + - logGammaMinusLogGammaSum(ared, b); - } - } - } else if (a >= 1.0) { - if (b > 2.0) { - if (b < 10.0) { - double prod = 1.0; - double bred = b; - while (bred > 2.0) { - bred -= 1.0; - prod *= bred / (a + bred); - } - return FastMath.log(prod) + - (Gamma.logGamma(a) + - (Gamma.logGamma(bred) - - logGammaSum(a, bred))); - } else { - return Gamma.logGamma(a) + - logGammaMinusLogGammaSum(a, b); - } - } else { - return Gamma.logGamma(a) + - Gamma.logGamma(b) - - logGammaSum(a, b); - } - } else { - if (b >= 10.0) { - return Gamma.logGamma(a) + - logGammaMinusLogGammaSum(a, b); - } else { - // The following command is the original NSWC implementation. - // return Gamma.logGamma(a) + - // (Gamma.logGamma(b) - Gamma.logGamma(a + b)); - // The following command turns out to be more accurate. - return FastMath.log(Gamma.gamma(a) * Gamma.gamma(b) / - Gamma.gamma(a + b)); - } - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/special/Erf.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/special/Erf.java deleted file mode 100644 index 018c22281c78..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/special/Erf.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.special; - -import com.azure.cosmos.implementation.apachecommons.math.special.Gamma; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** - * This is a utility class that provides computation methods related to the - * error functions. - * - */ -public class Erf { - - /** - * The number {@code X_CRIT} is used by {@link #erf(double, double)} internally. - * This number solves {@code erf(x)=0.5} within 1ulp. - * More precisely, the current implementations of - * {@link #erf(double)} and {@link #erfc(double)} satisfy:<br/> - * {@code erf(X_CRIT) < 0.5},<br/> - * {@code erf(Math.nextUp(X_CRIT) > 0.5},<br/> - * {@code erfc(X_CRIT) = 0.5}, and<br/> - * {@code erfc(Math.nextUp(X_CRIT) < 0.5} - */ - private static final double X_CRIT = 0.4769362762044697; - - /** - * Default constructor. Prohibit instantiation. - */ - private Erf() {} - - /** - * Returns the error function. - * - * <p>erf(x) = 2/√π <sub>0</sub>∫<sup>x</sup> e<sup>-t<sup>2</sup></sup>dt </p> - * - * <p>This implementation computes erf(x) using the - * {@link Gamma#regularizedGammaP(double, double, double, int) regularized gamma function}, - * following <a href="http://mathworld.wolfram.com/Erf.html"> Erf</a>, equation (3)</p> - * - * <p>The value returned is always between -1 and 1 (inclusive). - * If {@code abs(x) > 40}, then {@code erf(x)} is indistinguishable from - * either 1 or -1 as a double, so the appropriate extreme value is returned. - * </p> - * - * @param x the value. - * @return the error function erf(x) - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.MaxCountExceededException - * if the algorithm fails to converge. - * @see Gamma#regularizedGammaP(double, double, double, int) - */ - public static double erf(double x) { - if (FastMath.abs(x) > 40) { - return x > 0 ? 1 : -1; - } - final double ret = Gamma.regularizedGammaP(0.5, x * x, 1.0e-15, 10000); - return x < 0 ? -ret : ret; - } - - /** - * Returns the complementary error function. - * - * <p>erfc(x) = 2/√π <sub>x</sub>∫<sup>∞</sup> e<sup>-t<sup>2</sup></sup>dt - * <br/> - * = 1 - {@link #erf(double) erf(x)} </p> - * - * <p>This implementation computes erfc(x) using the - * {@link Gamma#regularizedGammaQ(double, double, double, int) regularized gamma function}, - * following <a href="http://mathworld.wolfram.com/Erf.html"> Erf</a>, equation (3).</p> - * - * <p>The value returned is always between 0 and 2 (inclusive). - * If {@code abs(x) > 40}, then {@code erf(x)} is indistinguishable from - * either 0 or 2 as a double, so the appropriate extreme value is returned. - * </p> - * - * @param x the value - * @return the complementary error function erfc(x) - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.MaxCountExceededException - * if the algorithm fails to converge. - * @see Gamma#regularizedGammaQ(double, double, double, int) - * @since 2.2 - */ - public static double erfc(double x) { - if (FastMath.abs(x) > 40) { - return x > 0 ? 0 : 2; - } - final double ret = Gamma.regularizedGammaQ(0.5, x * x, 1.0e-15, 10000); - return x < 0 ? 2 - ret : ret; - } - - /** - * Returns the difference between erf(x1) and erf(x2). - * - * The implementation uses either erf(double) or erfc(double) - * depending on which provides the most precise result. - * - * @param x1 the first value - * @param x2 the second value - * @return erf(x2) - erf(x1) - */ - public static double erf(double x1, double x2) { - if(x1 > x2) { - return -erf(x2, x1); - } - - return - x1 < -X_CRIT ? - x2 < 0.0 ? - erfc(-x2) - erfc(-x1) : - erf(x2) - erf(x1) : - x2 > X_CRIT && x1 > 0.0 ? - erfc(x1) - erfc(x2) : - erf(x2) - erf(x1); - } - - /** - * Returns the inverse erf. - * <p> - * This implementation is described in the paper: - * <a href="http://people.maths.ox.ac.uk/gilesm/files/gems_erfinv.pdf">Approximating - * the erfinv function</a> by Mike Giles, Oxford-Man Institute of Quantitative Finance, - * which was published in GPU Computing Gems, volume 2, 2010. - * The source code is available <a href="http://gpucomputing.net/?q=node/1828">here</a>. - * </p> - * @param x the value - * @return t such that x = erf(t) - * @since 3.2 - */ - public static double erfInv(final double x) { - - // beware that the logarithm argument must be - // commputed as (1.0 - x) * (1.0 + x), - // it must NOT be simplified as 1.0 - x * x as this - // would induce rounding errors near the boundaries +/-1 - double w = - FastMath.log((1.0 - x) * (1.0 + x)); - double p; - - if (w < 6.25) { - w -= 3.125; - p = -3.6444120640178196996e-21; - p = -1.685059138182016589e-19 + p * w; - p = 1.2858480715256400167e-18 + p * w; - p = 1.115787767802518096e-17 + p * w; - p = -1.333171662854620906e-16 + p * w; - p = 2.0972767875968561637e-17 + p * w; - p = 6.6376381343583238325e-15 + p * w; - p = -4.0545662729752068639e-14 + p * w; - p = -8.1519341976054721522e-14 + p * w; - p = 2.6335093153082322977e-12 + p * w; - p = -1.2975133253453532498e-11 + p * w; - p = -5.4154120542946279317e-11 + p * w; - p = 1.051212273321532285e-09 + p * w; - p = -4.1126339803469836976e-09 + p * w; - p = -2.9070369957882005086e-08 + p * w; - p = 4.2347877827932403518e-07 + p * w; - p = -1.3654692000834678645e-06 + p * w; - p = -1.3882523362786468719e-05 + p * w; - p = 0.0001867342080340571352 + p * w; - p = -0.00074070253416626697512 + p * w; - p = -0.0060336708714301490533 + p * w; - p = 0.24015818242558961693 + p * w; - p = 1.6536545626831027356 + p * w; - } else if (w < 16.0) { - w = FastMath.sqrt(w) - 3.25; - p = 2.2137376921775787049e-09; - p = 9.0756561938885390979e-08 + p * w; - p = -2.7517406297064545428e-07 + p * w; - p = 1.8239629214389227755e-08 + p * w; - p = 1.5027403968909827627e-06 + p * w; - p = -4.013867526981545969e-06 + p * w; - p = 2.9234449089955446044e-06 + p * w; - p = 1.2475304481671778723e-05 + p * w; - p = -4.7318229009055733981e-05 + p * w; - p = 6.8284851459573175448e-05 + p * w; - p = 2.4031110387097893999e-05 + p * w; - p = -0.0003550375203628474796 + p * w; - p = 0.00095328937973738049703 + p * w; - p = -0.0016882755560235047313 + p * w; - p = 0.0024914420961078508066 + p * w; - p = -0.0037512085075692412107 + p * w; - p = 0.005370914553590063617 + p * w; - p = 1.0052589676941592334 + p * w; - p = 3.0838856104922207635 + p * w; - } else if (!Double.isInfinite(w)) { - w = FastMath.sqrt(w) - 5.0; - p = -2.7109920616438573243e-11; - p = -2.5556418169965252055e-10 + p * w; - p = 1.5076572693500548083e-09 + p * w; - p = -3.7894654401267369937e-09 + p * w; - p = 7.6157012080783393804e-09 + p * w; - p = -1.4960026627149240478e-08 + p * w; - p = 2.9147953450901080826e-08 + p * w; - p = -6.7711997758452339498e-08 + p * w; - p = 2.2900482228026654717e-07 + p * w; - p = -9.9298272942317002539e-07 + p * w; - p = 4.5260625972231537039e-06 + p * w; - p = -1.9681778105531670567e-05 + p * w; - p = 7.5995277030017761139e-05 + p * w; - p = -0.00021503011930044477347 + p * w; - p = -0.00013871931833623122026 + p * w; - p = 1.0103004648645343977 + p * w; - p = 4.8499064014085844221 + p * w; - } else { - // this branch does not appears in the original code, it - // was added because the previous branch does not handle - // x = +/-1 correctly. In this case, w is positive infinity - // and as the first coefficient (-2.71e-11) is negative. - // Once the first multiplication is done, p becomes negative - // infinity and remains so throughout the polynomial evaluation. - // So the branch above incorrectly returns negative infinity - // instead of the correct positive infinity. - p = Double.POSITIVE_INFINITY; - } - - return p * x; - - } - - /** - * Returns the inverse erfc. - * @param x the value - * @return t such that x = erfc(t) - * @since 3.2 - */ - public static double erfcInv(final double x) { - return erfInv(1 - x); - } - -} - diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/special/Gamma.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/special/Gamma.java deleted file mode 100644 index d143e306bdba..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/special/Gamma.java +++ /dev/null @@ -1,724 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.special; - -import com.azure.cosmos.implementation.apachecommons.math.exception.MaxCountExceededException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooSmallException; -import com.azure.cosmos.implementation.apachecommons.math.util.ContinuedFraction; -import com.azure.cosmos.implementation.apachecommons.math.util.FastMath; - -/** - * <p> - * This is a utility class that provides computation methods related to the - * Γ (Gamma) family of functions. - * </p> - * <p> - * Implementation of {@link #invGamma1pm1(double)} and - * {@link #logGamma1p(double)} is based on the algorithms described in - * <ul> - * <li><a href="http://dx.doi.org/10.1145/22721.23109">Didonato and Morris - * (1986)</a>, <em>Computation of the Incomplete Gamma Function Ratios and - * their Inverse</em>, TOMS 12(4), 377-393,</li> - * <li><a href="http://dx.doi.org/10.1145/131766.131776">Didonato and Morris - * (1992)</a>, <em>Algorithm 708: Significant Digit Computation of the - * Incomplete Beta Function Ratios</em>, TOMS 18(3), 360-373,</li> - * </ul> - * and implemented in the - * <a href="http://www.dtic.mil/docs/citations/ADA476840">NSWC Library of Mathematical Functions</a>, - * available - * <a href="http://www.ualberta.ca/CNS/RESEARCH/Software/NumericalNSWC/site.html">here</a>. - * This library is "approved for public release", and the - * <a href="http://www.dtic.mil/dtic/pdf/announcements/CopyrightGuidance.pdf">Copyright guidance</a> - * indicates that unless otherwise stated in the code, all FORTRAN functions in - * this library are license free. Since no such notice appears in the code these - * functions can safely be ported to Commons-Math. - * </p> - * - */ -public class Gamma { - /** - * <a href="http://en.wikipedia.org/wiki/Euler-Mascheroni_constant">Euler-Mascheroni constant</a> - * @since 2.0 - */ - public static final double GAMMA = 0.577215664901532860606512090082; - - /** - * The value of the {@code g} constant in the Lanczos approximation, see - * {@link #lanczos(double)}. - * @since 3.1 - */ - public static final double LANCZOS_G = 607.0 / 128.0; - - /** Maximum allowed numerical error. */ - private static final double DEFAULT_EPSILON = 10e-15; - - /** Lanczos coefficients */ - private static final double[] LANCZOS = { - 0.99999999999999709182, - 57.156235665862923517, - -59.597960355475491248, - 14.136097974741747174, - -0.49191381609762019978, - .33994649984811888699e-4, - .46523628927048575665e-4, - -.98374475304879564677e-4, - .15808870322491248884e-3, - -.21026444172410488319e-3, - .21743961811521264320e-3, - -.16431810653676389022e-3, - .84418223983852743293e-4, - -.26190838401581408670e-4, - .36899182659531622704e-5, - }; - - /** Avoid repeated computation of log of 2 PI in logGamma */ - private static final double HALF_LOG_2_PI = 0.5 * FastMath.log(2.0 * FastMath.PI); - - /** The constant value of √(2π). */ - private static final double SQRT_TWO_PI = 2.506628274631000502; - - // limits for switching algorithm in digamma - /** C limit. */ - private static final double C_LIMIT = 49; - - /** S limit. */ - private static final double S_LIMIT = 1e-5; - - /* - * Constants for the computation of double invGamma1pm1(double). - * Copied from DGAM1 in the NSWC library. - */ - - /** The constant {@code A0} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_A0 = .611609510448141581788E-08; - - /** The constant {@code A1} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_A1 = .624730830116465516210E-08; - - /** The constant {@code B1} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_B1 = .203610414066806987300E+00; - - /** The constant {@code B2} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_B2 = .266205348428949217746E-01; - - /** The constant {@code B3} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_B3 = .493944979382446875238E-03; - - /** The constant {@code B4} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_B4 = -.851419432440314906588E-05; - - /** The constant {@code B5} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_B5 = -.643045481779353022248E-05; - - /** The constant {@code B6} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_B6 = .992641840672773722196E-06; - - /** The constant {@code B7} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_B7 = -.607761895722825260739E-07; - - /** The constant {@code B8} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_B8 = .195755836614639731882E-09; - - /** The constant {@code P0} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_P0 = .6116095104481415817861E-08; - - /** The constant {@code P1} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_P1 = .6871674113067198736152E-08; - - /** The constant {@code P2} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_P2 = .6820161668496170657918E-09; - - /** The constant {@code P3} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_P3 = .4686843322948848031080E-10; - - /** The constant {@code P4} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_P4 = .1572833027710446286995E-11; - - /** The constant {@code P5} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_P5 = -.1249441572276366213222E-12; - - /** The constant {@code P6} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_P6 = .4343529937408594255178E-14; - - /** The constant {@code Q1} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_Q1 = .3056961078365221025009E+00; - - /** The constant {@code Q2} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_Q2 = .5464213086042296536016E-01; - - /** The constant {@code Q3} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_Q3 = .4956830093825887312020E-02; - - /** The constant {@code Q4} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_Q4 = .2692369466186361192876E-03; - - /** The constant {@code C} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_C = -.422784335098467139393487909917598E+00; - - /** The constant {@code C0} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_C0 = .577215664901532860606512090082402E+00; - - /** The constant {@code C1} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_C1 = -.655878071520253881077019515145390E+00; - - /** The constant {@code C2} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_C2 = -.420026350340952355290039348754298E-01; - - /** The constant {@code C3} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_C3 = .166538611382291489501700795102105E+00; - - /** The constant {@code C4} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_C4 = -.421977345555443367482083012891874E-01; - - /** The constant {@code C5} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_C5 = -.962197152787697356211492167234820E-02; - - /** The constant {@code C6} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_C6 = .721894324666309954239501034044657E-02; - - /** The constant {@code C7} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_C7 = -.116516759185906511211397108401839E-02; - - /** The constant {@code C8} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_C8 = -.215241674114950972815729963053648E-03; - - /** The constant {@code C9} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_C9 = .128050282388116186153198626328164E-03; - - /** The constant {@code C10} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_C10 = -.201348547807882386556893914210218E-04; - - /** The constant {@code C11} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_C11 = -.125049348214267065734535947383309E-05; - - /** The constant {@code C12} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_C12 = .113302723198169588237412962033074E-05; - - /** The constant {@code C13} defined in {@code DGAM1}. */ - private static final double INV_GAMMA1P_M1_C13 = -.205633841697760710345015413002057E-06; - - /** - * Default constructor. Prohibit instantiation. - */ - private Gamma() {} - - /** - * <p> - * Returns the value of log Γ(x) for x > 0. - * </p> - * <p> - * For x ≤ 8, the implementation is based on the double precision - * implementation in the <em>NSWC Library of Mathematics Subroutines</em>, - * {@code DGAMLN}. For x > 8, the implementation is based on - * </p> - * <ul> - * <li><a href="http://mathworld.wolfram.com/GammaFunction.html">Gamma - * Function</a>, equation (28).</li> - * <li><a href="http://mathworld.wolfram.com/LanczosApproximation.html"> - * Lanczos Approximation</a>, equations (1) through (5).</li> - * <li><a href="http://my.fit.edu/~gabdo/gamma.txt">Paul Godfrey, A note on - * the computation of the convergent Lanczos complex Gamma - * approximation</a></li> - * </ul> - * - * @param x Argument. - * @return the value of {@code log(Gamma(x))}, {@code Double.NaN} if - * {@code x <= 0.0}. - */ - public static double logGamma(double x) { - double ret; - - if (Double.isNaN(x) || (x <= 0.0)) { - ret = Double.NaN; - } else if (x < 0.5) { - return logGamma1p(x) - FastMath.log(x); - } else if (x <= 2.5) { - return logGamma1p((x - 0.5) - 0.5); - } else if (x <= 8.0) { - final int n = (int) FastMath.floor(x - 1.5); - double prod = 1.0; - for (int i = 1; i <= n; i++) { - prod *= x - i; - } - return logGamma1p(x - (n + 1)) + FastMath.log(prod); - } else { - double sum = lanczos(x); - double tmp = x + LANCZOS_G + .5; - ret = ((x + .5) * FastMath.log(tmp)) - tmp + - HALF_LOG_2_PI + FastMath.log(sum / x); - } - - return ret; - } - - /** - * Returns the regularized gamma function P(a, x). - * - * @param a Parameter. - * @param x Value. - * @return the regularized gamma function P(a, x). - * @throws MaxCountExceededException if the algorithm fails to converge. - */ - public static double regularizedGammaP(double a, double x) { - return regularizedGammaP(a, x, DEFAULT_EPSILON, Integer.MAX_VALUE); - } - - /** - * Returns the regularized gamma function P(a, x). - * - * The implementation of this method is based on: - * <ul> - * <li> - * <a href="http://mathworld.wolfram.com/RegularizedGammaFunction.html"> - * Regularized Gamma Function</a>, equation (1) - * </li> - * <li> - * <a href="http://mathworld.wolfram.com/IncompleteGammaFunction.html"> - * Incomplete Gamma Function</a>, equation (4). - * </li> - * <li> - * <a href="http://mathworld.wolfram.com/ConfluentHypergeometricFunctionoftheFirstKind.html"> - * Confluent Hypergeometric Function of the First Kind</a>, equation (1). - * </li> - * </ul> - * - * @param a the a parameter. - * @param x the value. - * @param epsilon When the absolute value of the nth item in the - * series is less than epsilon the approximation ceases to calculate - * further elements in the series. - * @param maxIterations Maximum number of "iterations" to complete. - * @return the regularized gamma function P(a, x) - * @throws MaxCountExceededException if the algorithm fails to converge. - */ - public static double regularizedGammaP(double a, - double x, - double epsilon, - int maxIterations) { - double ret; - - if (Double.isNaN(a) || Double.isNaN(x) || (a <= 0.0) || (x < 0.0)) { - ret = Double.NaN; - } else if (x == 0.0) { - ret = 0.0; - } else if (x >= a + 1) { - // use regularizedGammaQ because it should converge faster in this - // case. - ret = 1.0 - regularizedGammaQ(a, x, epsilon, maxIterations); - } else { - // calculate series - double n = 0.0; // current element index - double an = 1.0 / a; // n-th element in the series - double sum = an; // partial sum - while (FastMath.abs(an/sum) > epsilon && - n < maxIterations && - sum < Double.POSITIVE_INFINITY) { - // compute next element in the series - n += 1.0; - an *= x / (a + n); - - // update partial sum - sum += an; - } - if (n >= maxIterations) { - throw new MaxCountExceededException(maxIterations); - } else if (Double.isInfinite(sum)) { - ret = 1.0; - } else { - ret = FastMath.exp(-x + (a * FastMath.log(x)) - logGamma(a)) * sum; - } - } - - return ret; - } - - /** - * Returns the regularized gamma function Q(a, x) = 1 - P(a, x). - * - * @param a the a parameter. - * @param x the value. - * @return the regularized gamma function Q(a, x) - * @throws MaxCountExceededException if the algorithm fails to converge. - */ - public static double regularizedGammaQ(double a, double x) { - return regularizedGammaQ(a, x, DEFAULT_EPSILON, Integer.MAX_VALUE); - } - - /** - * Returns the regularized gamma function Q(a, x) = 1 - P(a, x). - * - * The implementation of this method is based on: - * <ul> - * <li> - * <a href="http://mathworld.wolfram.com/RegularizedGammaFunction.html"> - * Regularized Gamma Function</a>, equation (1). - * </li> - * <li> - * <a href="http://functions.wolfram.com/GammaBetaErf/GammaRegularized/10/0003/"> - * Regularized incomplete gamma function: Continued fraction representations - * (formula 06.08.10.0003)</a> - * </li> - * </ul> - * - * @param a the a parameter. - * @param x the value. - * @param epsilon When the absolute value of the nth item in the - * series is less than epsilon the approximation ceases to calculate - * further elements in the series. - * @param maxIterations Maximum number of "iterations" to complete. - * @return the regularized gamma function P(a, x) - * @throws MaxCountExceededException if the algorithm fails to converge. - */ - public static double regularizedGammaQ(final double a, - double x, - double epsilon, - int maxIterations) { - double ret; - - if (Double.isNaN(a) || Double.isNaN(x) || (a <= 0.0) || (x < 0.0)) { - ret = Double.NaN; - } else if (x == 0.0) { - ret = 1.0; - } else if (x < a + 1.0) { - // use regularizedGammaP because it should converge faster in this - // case. - ret = 1.0 - regularizedGammaP(a, x, epsilon, maxIterations); - } else { - // create continued fraction - ContinuedFraction cf = new ContinuedFraction() { - - /** {@inheritDoc} */ - @Override - protected double getA(int n, double x) { - return ((2.0 * n) + 1.0) - a + x; - } - - /** {@inheritDoc} */ - @Override - protected double getB(int n, double x) { - return n * (a - n); - } - }; - - ret = 1.0 / cf.evaluate(x, epsilon, maxIterations); - ret = FastMath.exp(-x + (a * FastMath.log(x)) - logGamma(a)) * ret; - } - - return ret; - } - - - /** - * <p>Computes the digamma function of x.</p> - * - * <p>This is an independently written implementation of the algorithm described in - * Jose Bernardo, Algorithm AS 103: Psi (Digamma) Function, Applied Statistics, 1976.</p> - * - * <p>Some of the constants have been changed to increase accuracy at the moderate expense - * of run-time. The result should be accurate to within 10^-8 absolute tolerance for - * x >= 10^-5 and within 10^-8 relative tolerance for x > 0.</p> - * - * <p>Performance for large negative values of x will be quite expensive (proportional to - * |x|). Accuracy for negative values of x should be about 10^-8 absolute for results - * less than 10^5 and 10^-8 relative for results larger than that.</p> - * - * @param x Argument. - * @return digamma(x) to within 10-8 relative or absolute error whichever is smaller. - * @see <a href="http://en.wikipedia.org/wiki/Digamma_function">Digamma</a> - * @see <a href="http://www.uv.es/~bernardo/1976AppStatist.pdf">Bernardo's original article </a> - * @since 2.0 - */ - public static double digamma(double x) { - if (Double.isNaN(x) || Double.isInfinite(x)) { - return x; - } - - if (x > 0 && x <= S_LIMIT) { - // use method 5 from Bernardo AS103 - // accurate to O(x) - return -GAMMA - 1 / x; - } - - if (x >= C_LIMIT) { - // use method 4 (accurate to O(1/x^8) - double inv = 1 / (x * x); - // 1 1 1 1 - // log(x) - --- - ------ + ------- - ------- - // 2 x 12 x^2 120 x^4 252 x^6 - return FastMath.log(x) - 0.5 / x - inv * ((1.0 / 12) + inv * (1.0 / 120 - inv / 252)); - } - - return digamma(x + 1) - 1 / x; - } - - /** - * Computes the trigamma function of x. - * This function is derived by taking the derivative of the implementation - * of digamma. - * - * @param x Argument. - * @return trigamma(x) to within 10-8 relative or absolute error whichever is smaller - * @see <a href="http://en.wikipedia.org/wiki/Trigamma_function">Trigamma</a> - * @see Gamma#digamma(double) - * @since 2.0 - */ - public static double trigamma(double x) { - if (Double.isNaN(x) || Double.isInfinite(x)) { - return x; - } - - if (x > 0 && x <= S_LIMIT) { - return 1 / (x * x); - } - - if (x >= C_LIMIT) { - double inv = 1 / (x * x); - // 1 1 1 1 1 - // - + ---- + ---- - ----- + ----- - // x 2 3 5 7 - // 2 x 6 x 30 x 42 x - return 1 / x + inv / 2 + inv / x * (1.0 / 6 - inv * (1.0 / 30 + inv / 42)); - } - - return trigamma(x + 1) + 1 / (x * x); - } - - /** - * <p> - * Returns the Lanczos approximation used to compute the gamma function. - * The Lanczos approximation is related to the Gamma function by the - * following equation - * <center> - * {@code gamma(x) = sqrt(2 * pi) / x * (x + g + 0.5) ^ (x + 0.5) - * * exp(-x - g - 0.5) * lanczos(x)}, - * </center> - * where {@code g} is the Lanczos constant. - * </p> - * - * @param x Argument. - * @return The Lanczos approximation. - * @see <a href="http://mathworld.wolfram.com/LanczosApproximation.html">Lanczos Approximation</a> - * equations (1) through (5), and Paul Godfrey's - * <a href="http://my.fit.edu/~gabdo/gamma.txt">Note on the computation - * of the convergent Lanczos complex Gamma approximation</a> - * @since 3.1 - */ - public static double lanczos(final double x) { - double sum = 0.0; - for (int i = LANCZOS.length - 1; i > 0; --i) { - sum += LANCZOS[i] / (x + i); - } - return sum + LANCZOS[0]; - } - - /** - * Returns the value of 1 / Γ(1 + x) - 1 for -0.5 ≤ x ≤ - * 1.5. This implementation is based on the double precision - * implementation in the <em>NSWC Library of Mathematics Subroutines</em>, - * {@code DGAM1}. - * - * @param x Argument. - * @return The value of {@code 1.0 / Gamma(1.0 + x) - 1.0}. - * @throws NumberIsTooSmallException if {@code x < -0.5} - * @throws NumberIsTooLargeException if {@code x > 1.5} - * @since 3.1 - */ - public static double invGamma1pm1(final double x) { - - if (x < -0.5) { - throw new NumberIsTooSmallException(x, -0.5, true); - } - if (x > 1.5) { - throw new NumberIsTooLargeException(x, 1.5, true); - } - - final double ret; - final double t = x <= 0.5 ? x : (x - 0.5) - 0.5; - if (t < 0.0) { - final double a = INV_GAMMA1P_M1_A0 + t * INV_GAMMA1P_M1_A1; - double b = INV_GAMMA1P_M1_B8; - b = INV_GAMMA1P_M1_B7 + t * b; - b = INV_GAMMA1P_M1_B6 + t * b; - b = INV_GAMMA1P_M1_B5 + t * b; - b = INV_GAMMA1P_M1_B4 + t * b; - b = INV_GAMMA1P_M1_B3 + t * b; - b = INV_GAMMA1P_M1_B2 + t * b; - b = INV_GAMMA1P_M1_B1 + t * b; - b = 1.0 + t * b; - - double c = INV_GAMMA1P_M1_C13 + t * (a / b); - c = INV_GAMMA1P_M1_C12 + t * c; - c = INV_GAMMA1P_M1_C11 + t * c; - c = INV_GAMMA1P_M1_C10 + t * c; - c = INV_GAMMA1P_M1_C9 + t * c; - c = INV_GAMMA1P_M1_C8 + t * c; - c = INV_GAMMA1P_M1_C7 + t * c; - c = INV_GAMMA1P_M1_C6 + t * c; - c = INV_GAMMA1P_M1_C5 + t * c; - c = INV_GAMMA1P_M1_C4 + t * c; - c = INV_GAMMA1P_M1_C3 + t * c; - c = INV_GAMMA1P_M1_C2 + t * c; - c = INV_GAMMA1P_M1_C1 + t * c; - c = INV_GAMMA1P_M1_C + t * c; - if (x > 0.5) { - ret = t * c / x; - } else { - ret = x * ((c + 0.5) + 0.5); - } - } else { - double p = INV_GAMMA1P_M1_P6; - p = INV_GAMMA1P_M1_P5 + t * p; - p = INV_GAMMA1P_M1_P4 + t * p; - p = INV_GAMMA1P_M1_P3 + t * p; - p = INV_GAMMA1P_M1_P2 + t * p; - p = INV_GAMMA1P_M1_P1 + t * p; - p = INV_GAMMA1P_M1_P0 + t * p; - - double q = INV_GAMMA1P_M1_Q4; - q = INV_GAMMA1P_M1_Q3 + t * q; - q = INV_GAMMA1P_M1_Q2 + t * q; - q = INV_GAMMA1P_M1_Q1 + t * q; - q = 1.0 + t * q; - - double c = INV_GAMMA1P_M1_C13 + (p / q) * t; - c = INV_GAMMA1P_M1_C12 + t * c; - c = INV_GAMMA1P_M1_C11 + t * c; - c = INV_GAMMA1P_M1_C10 + t * c; - c = INV_GAMMA1P_M1_C9 + t * c; - c = INV_GAMMA1P_M1_C8 + t * c; - c = INV_GAMMA1P_M1_C7 + t * c; - c = INV_GAMMA1P_M1_C6 + t * c; - c = INV_GAMMA1P_M1_C5 + t * c; - c = INV_GAMMA1P_M1_C4 + t * c; - c = INV_GAMMA1P_M1_C3 + t * c; - c = INV_GAMMA1P_M1_C2 + t * c; - c = INV_GAMMA1P_M1_C1 + t * c; - c = INV_GAMMA1P_M1_C0 + t * c; - - if (x > 0.5) { - ret = (t / x) * ((c - 0.5) - 0.5); - } else { - ret = x * c; - } - } - - return ret; - } - - /** - * Returns the value of log Γ(1 + x) for -0.5 ≤ x ≤ 1.5. - * This implementation is based on the double precision implementation in - * the <em>NSWC Library of Mathematics Subroutines</em>, {@code DGMLN1}. - * - * @param x Argument. - * @return The value of {@code log(Gamma(1 + x))}. - * @throws NumberIsTooSmallException if {@code x < -0.5}. - * @throws NumberIsTooLargeException if {@code x > 1.5}. - * @since 3.1 - */ - public static double logGamma1p(final double x) - throws NumberIsTooSmallException, NumberIsTooLargeException { - - if (x < -0.5) { - throw new NumberIsTooSmallException(x, -0.5, true); - } - if (x > 1.5) { - throw new NumberIsTooLargeException(x, 1.5, true); - } - - return -FastMath.log1p(invGamma1pm1(x)); - } - - - /** - * Returns the value of Γ(x). Based on the <em>NSWC Library of - * Mathematics Subroutines</em> double precision implementation, - * {@code DGAMMA}. - * - * @param x Argument. - * @return the value of {@code Gamma(x)}. - * @since 3.1 - */ - public static double gamma(final double x) { - - if ((x == FastMath.rint(x)) && (x <= 0.0)) { - return Double.NaN; - } - - final double ret; - final double absX = FastMath.abs(x); - if (absX <= 20.0) { - if (x >= 1.0) { - /* - * From the recurrence relation - * Gamma(x) = (x - 1) * ... * (x - n) * Gamma(x - n), - * then - * Gamma(t) = 1 / [1 + invGamma1pm1(t - 1)], - * where t = x - n. This means that t must satisfy - * -0.5 <= t - 1 <= 1.5. - */ - double prod = 1.0; - double t = x; - while (t > 2.5) { - t -= 1.0; - prod *= t; - } - ret = prod / (1.0 + invGamma1pm1(t - 1.0)); - } else { - /* - * From the recurrence relation - * Gamma(x) = Gamma(x + n + 1) / [x * (x + 1) * ... * (x + n)] - * then - * Gamma(x + n + 1) = 1 / [1 + invGamma1pm1(x + n)], - * which requires -0.5 <= x + n <= 1.5. - */ - double prod = x; - double t = x; - while (t < -0.5) { - t += 1.0; - prod *= t; - } - ret = 1.0 / (prod * (1.0 + invGamma1pm1(t))); - } - } else { - final double y = absX + LANCZOS_G + 0.5; - final double gammaAbs = SQRT_TWO_PI / absX * - FastMath.pow(y, absX + 0.5) * - FastMath.exp(-y) * lanczos(absX); - if (x > 0.0) { - ret = gammaAbs; - } else { - /* - * From the reflection formula - * Gamma(x) * Gamma(1 - x) * sin(pi * x) = pi, - * and the recurrence relation - * Gamma(1 - x) = -x * Gamma(-x), - * it is found - * Gamma(x) = -pi / [x * sin(pi * x) * Gamma(-x)]. - */ - ret = -FastMath.PI / - (x * FastMath.sin(FastMath.PI * x) * gammaAbs); - } - } - return ret; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/ArithmeticUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/ArithmeticUtils.java deleted file mode 100644 index 6e61d90f937c..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/ArithmeticUtils.java +++ /dev/null @@ -1,911 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.util; - -import java.math.BigInteger; - -import com.azure.cosmos.implementation.apachecommons.math.exception.MathArithmeticException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Some useful, arithmetics related, additions to the built-in functions in - * {@link Math}. - * - */ -public final class ArithmeticUtils { - - /** Private constructor. */ - private ArithmeticUtils() { - super(); - } - - /** - * Add two integers, checking for overflow. - * - * @param x an addend - * @param y an addend - * @return the sum {@code x+y} - * @throws MathArithmeticException if the result can not be represented - * as an {@code int}. - * @since 1.1 - */ - public static int addAndCheck(int x, int y) - throws MathArithmeticException { - long s = (long)x + (long)y; - if (s < Integer.MIN_VALUE || s > Integer.MAX_VALUE) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_ADDITION, x, y); - } - return (int)s; - } - - /** - * Add two long integers, checking for overflow. - * - * @param a an addend - * @param b an addend - * @return the sum {@code a+b} - * @throws MathArithmeticException if the result can not be represented as an long - * @since 1.2 - */ - public static long addAndCheck(long a, long b) throws MathArithmeticException { - return addAndCheck(a, b, LocalizedFormats.OVERFLOW_IN_ADDITION); - } - - /** - * Returns an exact representation of the <a - * href="http://mathworld.wolfram.com/BinomialCoefficient.html"> Binomial - * Coefficient</a>, "{@code n choose k}", the number of - * {@code k}-element subsets that can be selected from an - * {@code n}-element set. - * <p> - * <Strong>Preconditions</strong>: - * <ul> - * <li> {@code 0 <= k <= n } (otherwise - * {@code IllegalArgumentException} is thrown)</li> - * <li> The result is small enough to fit into a {@code long}. The - * largest value of {@code n} for which all coefficients are - * {@code < Long.MAX_VALUE} is 66. If the computed value exceeds - * {@code Long.MAX_VALUE} an {@code ArithMeticException} is - * thrown.</li> - * </ul></p> - * - * @param n the size of the set - * @param k the size of the subsets to be counted - * @return {@code n choose k} - * @throws NotPositiveException if {@code n < 0}. - * @throws NumberIsTooLargeException if {@code k > n}. - * @throws MathArithmeticException if the result is too large to be - * represented by a long integer. - * @deprecated use {@link CombinatoricsUtils#binomialCoefficient(int, int)} - */ - @Deprecated - public static long binomialCoefficient(final int n, final int k) - throws NotPositiveException, NumberIsTooLargeException, MathArithmeticException { - return CombinatoricsUtils.binomialCoefficient(n, k); - } - - /** - * Returns a {@code double} representation of the <a - * href="http://mathworld.wolfram.com/BinomialCoefficient.html"> Binomial - * Coefficient</a>, "{@code n choose k}", the number of - * {@code k}-element subsets that can be selected from an - * {@code n}-element set. - * <p> - * <Strong>Preconditions</strong>: - * <ul> - * <li> {@code 0 <= k <= n } (otherwise - * {@code IllegalArgumentException} is thrown)</li> - * <li> The result is small enough to fit into a {@code double}. The - * largest value of {@code n} for which all coefficients are < - * Double.MAX_VALUE is 1029. If the computed value exceeds Double.MAX_VALUE, - * Double.POSITIVE_INFINITY is returned</li> - * </ul></p> - * - * @param n the size of the set - * @param k the size of the subsets to be counted - * @return {@code n choose k} - * @throws NotPositiveException if {@code n < 0}. - * @throws NumberIsTooLargeException if {@code k > n}. - * @throws MathArithmeticException if the result is too large to be - * represented by a long integer. - * @deprecated use {@link CombinatoricsUtils#binomialCoefficientDouble(int, int)} - */ - @Deprecated - public static double binomialCoefficientDouble(final int n, final int k) - throws NotPositiveException, NumberIsTooLargeException, MathArithmeticException { - return CombinatoricsUtils.binomialCoefficientDouble(n, k); - } - - /** - * Returns the natural {@code log} of the <a - * href="http://mathworld.wolfram.com/BinomialCoefficient.html"> Binomial - * Coefficient</a>, "{@code n choose k}", the number of - * {@code k}-element subsets that can be selected from an - * {@code n}-element set. - * <p> - * <Strong>Preconditions</strong>: - * <ul> - * <li> {@code 0 <= k <= n } (otherwise - * {@code IllegalArgumentException} is thrown)</li> - * </ul></p> - * - * @param n the size of the set - * @param k the size of the subsets to be counted - * @return {@code n choose k} - * @throws NotPositiveException if {@code n < 0}. - * @throws NumberIsTooLargeException if {@code k > n}. - * @throws MathArithmeticException if the result is too large to be - * represented by a long integer. - * @deprecated use {@link CombinatoricsUtils#binomialCoefficientLog(int, int)} - */ - @Deprecated - public static double binomialCoefficientLog(final int n, final int k) - throws NotPositiveException, NumberIsTooLargeException, MathArithmeticException { - return CombinatoricsUtils.binomialCoefficientLog(n, k); - } - - /** - * Returns n!. Shorthand for {@code n} <a - * href="http://mathworld.wolfram.com/Factorial.html"> Factorial</a>, the - * product of the numbers {@code 1,...,n}. - * <p> - * <Strong>Preconditions</strong>: - * <ul> - * <li> {@code n >= 0} (otherwise - * {@code IllegalArgumentException} is thrown)</li> - * <li> The result is small enough to fit into a {@code long}. The - * largest value of {@code n} for which {@code n!} < - * Long.MAX_VALUE} is 20. If the computed value exceeds {@code Long.MAX_VALUE} - * an {@code ArithMeticException } is thrown.</li> - * </ul> - * </p> - * - * @param n argument - * @return {@code n!} - * @throws MathArithmeticException if the result is too large to be represented - * by a {@code long}. - * @throws NotPositiveException if {@code n < 0}. - * @throws MathArithmeticException if {@code n > 20}: The factorial value is too - * large to fit in a {@code long}. - * @deprecated use {@link CombinatoricsUtils#factorial(int)} - */ - @Deprecated - public static long factorial(final int n) throws NotPositiveException, MathArithmeticException { - return CombinatoricsUtils.factorial(n); - } - - /** - * Compute n!, the<a href="http://mathworld.wolfram.com/Factorial.html"> - * factorial</a> of {@code n} (the product of the numbers 1 to n), as a - * {@code double}. - * The result should be small enough to fit into a {@code double}: The - * largest {@code n} for which {@code n! < Double.MAX_VALUE} is 170. - * If the computed value exceeds {@code Double.MAX_VALUE}, - * {@code Double.POSITIVE_INFINITY} is returned. - * - * @param n Argument. - * @return {@code n!} - * @throws NotPositiveException if {@code n < 0}. - * @deprecated use {@link CombinatoricsUtils#factorialDouble(int)} - */ - @Deprecated - public static double factorialDouble(final int n) throws NotPositiveException { - return CombinatoricsUtils.factorialDouble(n); - } - - /** - * Compute the natural logarithm of the factorial of {@code n}. - * - * @param n Argument. - * @return {@code n!} - * @throws NotPositiveException if {@code n < 0}. - * @deprecated use {@link CombinatoricsUtils#factorialLog(int)} - */ - @Deprecated - public static double factorialLog(final int n) throws NotPositiveException { - return CombinatoricsUtils.factorialLog(n); - } - - /** - * Computes the greatest common divisor of the absolute value of two - * numbers, using a modified version of the "binary gcd" method. - * See Knuth 4.5.2 algorithm B. - * The algorithm is due to Josef Stein (1961). - * <br/> - * Special cases: - * <ul> - * <li>The invocations - * {@code gcd(Integer.MIN_VALUE, Integer.MIN_VALUE)}, - * {@code gcd(Integer.MIN_VALUE, 0)} and - * {@code gcd(0, Integer.MIN_VALUE)} throw an - * {@code ArithmeticException}, because the result would be 2^31, which - * is too large for an int value.</li> - * <li>The result of {@code gcd(x, x)}, {@code gcd(0, x)} and - * {@code gcd(x, 0)} is the absolute value of {@code x}, except - * for the special cases above.</li> - * <li>The invocation {@code gcd(0, 0)} is the only one which returns - * {@code 0}.</li> - * </ul> - * - * @param p Number. - * @param q Number. - * @return the greatest common divisor (never negative). - * @throws MathArithmeticException if the result cannot be represented as - * a non-negative {@code int} value. - * @since 1.1 - */ - public static int gcd(int p, int q) throws MathArithmeticException { - int a = p; - int b = q; - if (a == 0 || - b == 0) { - if (a == Integer.MIN_VALUE || - b == Integer.MIN_VALUE) { - throw new MathArithmeticException(LocalizedFormats.GCD_OVERFLOW_32_BITS, - p, q); - } - return FastMath.abs(a + b); - } - - long al = a; - long bl = b; - boolean useLong = false; - if (a < 0) { - if(Integer.MIN_VALUE == a) { - useLong = true; - } else { - a = -a; - } - al = -al; - } - if (b < 0) { - if (Integer.MIN_VALUE == b) { - useLong = true; - } else { - b = -b; - } - bl = -bl; - } - if (useLong) { - if(al == bl) { - throw new MathArithmeticException(LocalizedFormats.GCD_OVERFLOW_32_BITS, - p, q); - } - long blbu = bl; - bl = al; - al = blbu % al; - if (al == 0) { - if (bl > Integer.MAX_VALUE) { - throw new MathArithmeticException(LocalizedFormats.GCD_OVERFLOW_32_BITS, - p, q); - } - return (int) bl; - } - blbu = bl; - - // Now "al" and "bl" fit in an "int". - b = (int) al; - a = (int) (blbu % al); - } - - return gcdPositive(a, b); - } - - /** - * Computes the greatest common divisor of two <em>positive</em> numbers - * (this precondition is <em>not</em> checked and the result is undefined - * if not fulfilled) using the "binary gcd" method which avoids division - * and modulo operations. - * See Knuth 4.5.2 algorithm B. - * The algorithm is due to Josef Stein (1961). - * <br/> - * Special cases: - * <ul> - * <li>The result of {@code gcd(x, x)}, {@code gcd(0, x)} and - * {@code gcd(x, 0)} is the value of {@code x}.</li> - * <li>The invocation {@code gcd(0, 0)} is the only one which returns - * {@code 0}.</li> - * </ul> - * - * @param a Positive number. - * @param b Positive number. - * @return the greatest common divisor. - */ - private static int gcdPositive(int a, int b) { - if (a == 0) { - return b; - } - else if (b == 0) { - return a; - } - - // Make "a" and "b" odd, keeping track of common power of 2. - final int aTwos = Integer.numberOfTrailingZeros(a); - a >>= aTwos; - final int bTwos = Integer.numberOfTrailingZeros(b); - b >>= bTwos; - final int shift = FastMath.min(aTwos, bTwos); - - // "a" and "b" are positive. - // If a > b then "gdc(a, b)" is equal to "gcd(a - b, b)". - // If a < b then "gcd(a, b)" is equal to "gcd(b - a, a)". - // Hence, in the successive iterations: - // "a" becomes the absolute difference of the current values, - // "b" becomes the minimum of the current values. - while (a != b) { - final int delta = a - b; - b = Math.min(a, b); - a = Math.abs(delta); - - // Remove any power of 2 in "a" ("b" is guaranteed to be odd). - a >>= Integer.numberOfTrailingZeros(a); - } - - // Recover the common power of 2. - return a << shift; - } - - /** - * <p> - * Gets the greatest common divisor of the absolute value of two numbers, - * using the "binary gcd" method which avoids division and modulo - * operations. See Knuth 4.5.2 algorithm B. This algorithm is due to Josef - * Stein (1961). - * </p> - * Special cases: - * <ul> - * <li>The invocations - * {@code gcd(Long.MIN_VALUE, Long.MIN_VALUE)}, - * {@code gcd(Long.MIN_VALUE, 0L)} and - * {@code gcd(0L, Long.MIN_VALUE)} throw an - * {@code ArithmeticException}, because the result would be 2^63, which - * is too large for a long value.</li> - * <li>The result of {@code gcd(x, x)}, {@code gcd(0L, x)} and - * {@code gcd(x, 0L)} is the absolute value of {@code x}, except - * for the special cases above. - * <li>The invocation {@code gcd(0L, 0L)} is the only one which returns - * {@code 0L}.</li> - * </ul> - * - * @param p Number. - * @param q Number. - * @return the greatest common divisor, never negative. - * @throws MathArithmeticException if the result cannot be represented as - * a non-negative {@code long} value. - * @since 2.1 - */ - public static long gcd(final long p, final long q) throws MathArithmeticException { - long u = p; - long v = q; - if ((u == 0) || (v == 0)) { - if ((u == Long.MIN_VALUE) || (v == Long.MIN_VALUE)){ - throw new MathArithmeticException(LocalizedFormats.GCD_OVERFLOW_64_BITS, - p, q); - } - return FastMath.abs(u) + FastMath.abs(v); - } - // keep u and v negative, as negative integers range down to - // -2^63, while positive numbers can only be as large as 2^63-1 - // (i.e. we can't necessarily negate a negative number without - // overflow) - /* assert u!=0 && v!=0; */ - if (u > 0) { - u = -u; - } // make u negative - if (v > 0) { - v = -v; - } // make v negative - // B1. [Find power of 2] - int k = 0; - while ((u & 1) == 0 && (v & 1) == 0 && k < 63) { // while u and v are - // both even... - u /= 2; - v /= 2; - k++; // cast out twos. - } - if (k == 63) { - throw new MathArithmeticException(LocalizedFormats.GCD_OVERFLOW_64_BITS, - p, q); - } - // B2. Initialize: u and v have been divided by 2^k and at least - // one is odd. - long t = ((u & 1) == 1) ? v : -(u / 2)/* B3 */; - // t negative: u was odd, v may be even (t replaces v) - // t positive: u was even, v is odd (t replaces u) - do { - /* assert u<0 && v<0; */ - // B4/B3: cast out twos from t. - while ((t & 1) == 0) { // while t is even.. - t /= 2; // cast out twos - } - // B5 [reset max(u,v)] - if (t > 0) { - u = -t; - } else { - v = t; - } - // B6/B3. at this point both u and v should be odd. - t = (v - u) / 2; - // |u| larger: t positive (replace u) - // |v| larger: t negative (replace v) - } while (t != 0); - return -u * (1L << k); // gcd is u*2^k - } - - /** - * <p> - * Returns the least common multiple of the absolute value of two numbers, - * using the formula {@code lcm(a,b) = (a / gcd(a,b)) * b}. - * </p> - * Special cases: - * <ul> - * <li>The invocations {@code lcm(Integer.MIN_VALUE, n)} and - * {@code lcm(n, Integer.MIN_VALUE)}, where {@code abs(n)} is a - * power of 2, throw an {@code ArithmeticException}, because the result - * would be 2^31, which is too large for an int value.</li> - * <li>The result of {@code lcm(0, x)} and {@code lcm(x, 0)} is - * {@code 0} for any {@code x}. - * </ul> - * - * @param a Number. - * @param b Number. - * @return the least common multiple, never negative. - * @throws MathArithmeticException if the result cannot be represented as - * a non-negative {@code int} value. - * @since 1.1 - */ - public static int lcm(int a, int b) throws MathArithmeticException { - if (a == 0 || b == 0){ - return 0; - } - int lcm = FastMath.abs(ArithmeticUtils.mulAndCheck(a / gcd(a, b), b)); - if (lcm == Integer.MIN_VALUE) { - throw new MathArithmeticException(LocalizedFormats.LCM_OVERFLOW_32_BITS, - a, b); - } - return lcm; - } - - /** - * <p> - * Returns the least common multiple of the absolute value of two numbers, - * using the formula {@code lcm(a,b) = (a / gcd(a,b)) * b}. - * </p> - * Special cases: - * <ul> - * <li>The invocations {@code lcm(Long.MIN_VALUE, n)} and - * {@code lcm(n, Long.MIN_VALUE)}, where {@code abs(n)} is a - * power of 2, throw an {@code ArithmeticException}, because the result - * would be 2^63, which is too large for an int value.</li> - * <li>The result of {@code lcm(0L, x)} and {@code lcm(x, 0L)} is - * {@code 0L} for any {@code x}. - * </ul> - * - * @param a Number. - * @param b Number. - * @return the least common multiple, never negative. - * @throws MathArithmeticException if the result cannot be represented - * as a non-negative {@code long} value. - * @since 2.1 - */ - public static long lcm(long a, long b) throws MathArithmeticException { - if (a == 0 || b == 0){ - return 0; - } - long lcm = FastMath.abs(ArithmeticUtils.mulAndCheck(a / gcd(a, b), b)); - if (lcm == Long.MIN_VALUE){ - throw new MathArithmeticException(LocalizedFormats.LCM_OVERFLOW_64_BITS, - a, b); - } - return lcm; - } - - /** - * Multiply two integers, checking for overflow. - * - * @param x Factor. - * @param y Factor. - * @return the product {@code x * y}. - * @throws MathArithmeticException if the result can not be - * represented as an {@code int}. - * @since 1.1 - */ - public static int mulAndCheck(int x, int y) throws MathArithmeticException { - long m = ((long)x) * ((long)y); - if (m < Integer.MIN_VALUE || m > Integer.MAX_VALUE) { - throw new MathArithmeticException(); - } - return (int)m; - } - - /** - * Multiply two long integers, checking for overflow. - * - * @param a Factor. - * @param b Factor. - * @return the product {@code a * b}. - * @throws MathArithmeticException if the result can not be represented - * as a {@code long}. - * @since 1.2 - */ - public static long mulAndCheck(long a, long b) throws MathArithmeticException { - long ret; - if (a > b) { - // use symmetry to reduce boundary cases - ret = mulAndCheck(b, a); - } else { - if (a < 0) { - if (b < 0) { - // check for positive overflow with negative a, negative b - if (a >= Long.MAX_VALUE / b) { - ret = a * b; - } else { - throw new MathArithmeticException(); - } - } else if (b > 0) { - // check for negative overflow with negative a, positive b - if (Long.MIN_VALUE / b <= a) { - ret = a * b; - } else { - throw new MathArithmeticException(); - - } - } else { - // assert b == 0 - ret = 0; - } - } else if (a > 0) { - // assert a > 0 - // assert b > 0 - - // check for positive overflow with positive a, positive b - if (a <= Long.MAX_VALUE / b) { - ret = a * b; - } else { - throw new MathArithmeticException(); - } - } else { - // assert a == 0 - ret = 0; - } - } - return ret; - } - - /** - * Subtract two integers, checking for overflow. - * - * @param x Minuend. - * @param y Subtrahend. - * @return the difference {@code x - y}. - * @throws MathArithmeticException if the result can not be represented - * as an {@code int}. - * @since 1.1 - */ - public static int subAndCheck(int x, int y) throws MathArithmeticException { - long s = (long)x - (long)y; - if (s < Integer.MIN_VALUE || s > Integer.MAX_VALUE) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_SUBTRACTION, x, y); - } - return (int)s; - } - - /** - * Subtract two long integers, checking for overflow. - * - * @param a Value. - * @param b Value. - * @return the difference {@code a - b}. - * @throws MathArithmeticException if the result can not be represented as a - * {@code long}. - * @since 1.2 - */ - public static long subAndCheck(long a, long b) throws MathArithmeticException { - long ret; - if (b == Long.MIN_VALUE) { - if (a < 0) { - ret = a - b; - } else { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_ADDITION, a, -b); - } - } else { - // use additive inverse - ret = addAndCheck(a, -b, LocalizedFormats.OVERFLOW_IN_ADDITION); - } - return ret; - } - - /** - * Raise an int to an int power. - * - * @param k Number to raise. - * @param e Exponent (must be positive or zero). - * @return \( k^e \) - * @throws NotPositiveException if {@code e < 0}. - * @throws MathArithmeticException if the result would overflow. - */ - public static int pow(final int k, - final int e) - throws NotPositiveException, - MathArithmeticException { - if (e < 0) { - throw new NotPositiveException(LocalizedFormats.EXPONENT, e); - } - - try { - int exp = e; - int result = 1; - int k2p = k; - while (true) { - if ((exp & 0x1) != 0) { - result = mulAndCheck(result, k2p); - } - - exp >>= 1; - if (exp == 0) { - break; - } - - k2p = mulAndCheck(k2p, k2p); - } - - return result; - } catch (MathArithmeticException mae) { - // Add context information. - mae.getContext().addMessage(LocalizedFormats.OVERFLOW); - mae.getContext().addMessage(LocalizedFormats.BASE, k); - mae.getContext().addMessage(LocalizedFormats.EXPONENT, e); - - // Rethrow. - throw mae; - } - } - - /** - * Raise an int to a long power. - * - * @param k Number to raise. - * @param e Exponent (must be positive or zero). - * @return k<sup>e</sup> - * @throws NotPositiveException if {@code e < 0}. - * @deprecated As of 3.3. Please use {@link #pow(int,int)} instead. - */ - @Deprecated - public static int pow(final int k, long e) throws NotPositiveException { - if (e < 0) { - throw new NotPositiveException(LocalizedFormats.EXPONENT, e); - } - - int result = 1; - int k2p = k; - while (e != 0) { - if ((e & 0x1) != 0) { - result *= k2p; - } - k2p *= k2p; - e >>= 1; - } - - return result; - } - - /** - * Raise a long to an int power. - * - * @param k Number to raise. - * @param e Exponent (must be positive or zero). - * @return \( k^e \) - * @throws NotPositiveException if {@code e < 0}. - * @throws MathArithmeticException if the result would overflow. - */ - public static long pow(final long k, - final int e) - throws NotPositiveException, - MathArithmeticException { - if (e < 0) { - throw new NotPositiveException(LocalizedFormats.EXPONENT, e); - } - - try { - int exp = e; - long result = 1; - long k2p = k; - while (true) { - if ((exp & 0x1) != 0) { - result = mulAndCheck(result, k2p); - } - - exp >>= 1; - if (exp == 0) { - break; - } - - k2p = mulAndCheck(k2p, k2p); - } - - return result; - } catch (MathArithmeticException mae) { - // Add context information. - mae.getContext().addMessage(LocalizedFormats.OVERFLOW); - mae.getContext().addMessage(LocalizedFormats.BASE, k); - mae.getContext().addMessage(LocalizedFormats.EXPONENT, e); - - // Rethrow. - throw mae; - } - } - - /** - * Raise a long to a long power. - * - * @param k Number to raise. - * @param e Exponent (must be positive or zero). - * @return k<sup>e</sup> - * @throws NotPositiveException if {@code e < 0}. - * @deprecated As of 3.3. Please use {@link #pow(long,int)} instead. - */ - @Deprecated - public static long pow(final long k, long e) throws NotPositiveException { - if (e < 0) { - throw new NotPositiveException(LocalizedFormats.EXPONENT, e); - } - - long result = 1l; - long k2p = k; - while (e != 0) { - if ((e & 0x1) != 0) { - result *= k2p; - } - k2p *= k2p; - e >>= 1; - } - - return result; - } - - /** - * Raise a BigInteger to an int power. - * - * @param k Number to raise. - * @param e Exponent (must be positive or zero). - * @return k<sup>e</sup> - * @throws NotPositiveException if {@code e < 0}. - */ - public static BigInteger pow(final BigInteger k, int e) throws NotPositiveException { - if (e < 0) { - throw new NotPositiveException(LocalizedFormats.EXPONENT, e); - } - - return k.pow(e); - } - - /** - * Raise a BigInteger to a long power. - * - * @param k Number to raise. - * @param e Exponent (must be positive or zero). - * @return k<sup>e</sup> - * @throws NotPositiveException if {@code e < 0}. - */ - public static BigInteger pow(final BigInteger k, long e) throws NotPositiveException { - if (e < 0) { - throw new NotPositiveException(LocalizedFormats.EXPONENT, e); - } - - BigInteger result = BigInteger.ONE; - BigInteger k2p = k; - while (e != 0) { - if ((e & 0x1) != 0) { - result = result.multiply(k2p); - } - k2p = k2p.multiply(k2p); - e >>= 1; - } - - return result; - - } - - /** - * Raise a BigInteger to a BigInteger power. - * - * @param k Number to raise. - * @param e Exponent (must be positive or zero). - * @return k<sup>e</sup> - * @throws NotPositiveException if {@code e < 0}. - */ - public static BigInteger pow(final BigInteger k, BigInteger e) throws NotPositiveException { - if (e.compareTo(BigInteger.ZERO) < 0) { - throw new NotPositiveException(LocalizedFormats.EXPONENT, e); - } - - BigInteger result = BigInteger.ONE; - BigInteger k2p = k; - while (!BigInteger.ZERO.equals(e)) { - if (e.testBit(0)) { - result = result.multiply(k2p); - } - k2p = k2p.multiply(k2p); - e = e.shiftRight(1); - } - - return result; - } - - /** - * Returns the <a - * href="http://mathworld.wolfram.com/StirlingNumberoftheSecondKind.html"> - * Stirling number of the second kind</a>, "{@code S(n,k)}", the number of - * ways of partitioning an {@code n}-element set into {@code k} non-empty - * subsets. - * <p> - * The preconditions are {@code 0 <= k <= n } (otherwise - * {@code NotPositiveException} is thrown) - * </p> - * @param n the size of the set - * @param k the number of non-empty subsets - * @return {@code S(n,k)} - * @throws NotPositiveException if {@code k < 0}. - * @throws NumberIsTooLargeException if {@code k > n}. - * @throws MathArithmeticException if some overflow happens, typically for n exceeding 25 and - * k between 20 and n-2 (S(n,n-1) is handled specifically and does not overflow) - * @since 3.1 - * @deprecated use {@link CombinatoricsUtils#stirlingS2(int, int)} - */ - @Deprecated - public static long stirlingS2(final int n, final int k) - throws NotPositiveException, NumberIsTooLargeException, MathArithmeticException { - return CombinatoricsUtils.stirlingS2(n, k); - - } - - /** - * Add two long integers, checking for overflow. - * - * @param a Addend. - * @param b Addend. - * @param pattern Pattern to use for any thrown exception. - * @return the sum {@code a + b}. - * @throws MathArithmeticException if the result cannot be represented - * as a {@code long}. - * @since 1.2 - */ - private static long addAndCheck(long a, long b, Localizable pattern) throws MathArithmeticException { - final long result = a + b; - if (!((a ^ b) < 0 | (a ^ result) >= 0)) { - throw new MathArithmeticException(pattern, a, b); - } - return result; - } - - /** - * Returns true if the argument is a power of two. - * - * @param n the number to test - * @return true if the argument is a power of two - */ - public static boolean isPowerOfTwo(long n) { - return (n > 0) && ((n & (n - 1)) == 0); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/Combinations.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/Combinations.java deleted file mode 100644 index 139fad82d8e0..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/Combinations.java +++ /dev/null @@ -1,409 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.util; - -import java.util.Iterator; -import java.util.Comparator; -import java.util.Arrays; -import java.util.NoSuchElementException; -import java.io.Serializable; -import com.azure.cosmos.implementation.apachecommons.math.exception.MathInternalError; -import com.azure.cosmos.implementation.apachecommons.math.exception.DimensionMismatchException; -import com.azure.cosmos.implementation.apachecommons.math.exception.OutOfRangeException; - -/** - * Utility to create <a href="http://en.wikipedia.org/wiki/Combination"> - * combinations</a> {@code (n, k)} of {@code k} elements in a set of - * {@code n} elements. - * - * @since 3.3 - */ -public class Combinations implements Iterable<int[]> { - /** Size of the set from which combinations are drawn. */ - private final int n; - /** Number of elements in each combination. */ - private final int k; - /** Iteration order. */ - private final IterationOrder iterationOrder; - - /** - * Describes the type of iteration performed by the - * {@link #iterator() iterator}. - */ - private enum IterationOrder { - /** Lexicographic order. */ - LEXICOGRAPHIC - } - - /** - * Creates an instance whose range is the k-element subsets of - * {0, ..., n - 1} represented as {@code int[]} arrays. - * <p> - * The iteration order is lexicographic: the arrays returned by the - * {@link #iterator() iterator} are sorted in descending order and - * they are visited in lexicographic order with significance from - * right to left. - * For example, {@code new Combinations(4, 2).iterator()} returns - * an iterator that will generate the following sequence of arrays - * on successive calls to - * {@code next()}:<br/> - * {@code [0, 1], [0, 2], [1, 2], [0, 3], [1, 3], [2, 3]} - * </p> - * If {@code k == 0} an iterator containing an empty array is returned; - * if {@code k == n} an iterator containing [0, ..., n - 1] is returned. - * - * @param n Size of the set from which subsets are selected. - * @param k Size of the subsets to be enumerated. - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.NotPositiveException if {@code n < 0}. - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException if {@code k > n}. - */ - public Combinations(int n, - int k) { - this(n, k, IterationOrder.LEXICOGRAPHIC); - } - - /** - * Creates an instance whose range is the k-element subsets of - * {0, ..., n - 1} represented as {@code int[]} arrays. - * <p> - * If the {@code iterationOrder} argument is set to - * {@link IterationOrder#LEXICOGRAPHIC}, the arrays returned by the - * {@link #iterator() iterator} are sorted in descending order and - * they are visited in lexicographic order with significance from - * right to left. - * For example, {@code new Combinations(4, 2).iterator()} returns - * an iterator that will generate the following sequence of arrays - * on successive calls to - * {@code next()}:<br/> - * {@code [0, 1], [0, 2], [1, 2], [0, 3], [1, 3], [2, 3]} - * </p> - * If {@code k == 0} an iterator containing an empty array is returned; - * if {@code k == n} an iterator containing [0, ..., n - 1] is returned. - * - * @param n Size of the set from which subsets are selected. - * @param k Size of the subsets to be enumerated. - * @param iterationOrder Specifies the {@link #iterator() iteration order}. - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.NotPositiveException if {@code n < 0}. - * @throws com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException if {@code k > n}. - */ - private Combinations(int n, - int k, - IterationOrder iterationOrder) { - CombinatoricsUtils.checkBinomial(n, k); - this.n = n; - this.k = k; - this.iterationOrder = iterationOrder; - } - - /** - * Gets the size of the set from which combinations are drawn. - * - * @return the size of the universe. - */ - public int getN() { - return n; - } - - /** - * Gets the number of elements in each combination. - * - * @return the size of the subsets to be enumerated. - */ - public int getK() { - return k; - } - - /** {@inheritDoc} */ - public Iterator<int[]> iterator() { - if (k == 0 || - k == n) { - return new SingletonIterator(MathArrays.natural(k)); - } - - switch (iterationOrder) { - case LEXICOGRAPHIC: - return new LexicographicIterator(n, k); - default: - throw new MathInternalError(); // Should never happen. - } - } - - /** - * Defines a lexicographic ordering of combinations. - * The returned comparator allows to compare any two combinations - * that can be produced by this instance's {@link #iterator() iterator}. - * Its {@code compare(int[],int[])} method will throw exceptions if - * passed combinations that are inconsistent with this instance: - * <ul> - * <li>{@code DimensionMismatchException} if the array lengths are not - * equal to {@code k},</li> - * <li>{@code OutOfRangeException} if an element of the array is not - * within the interval [0, {@code n}).</li> - * </ul> - * @return a lexicographic comparator. - */ - public Comparator<int[]> comparator() { - return new LexicographicComparator(n, k); - } - - /** - * Lexicographic combinations iterator. - * <p> - * Implementation follows Algorithm T in <i>The Art of Computer Programming</i> - * Internet Draft (PRE-FASCICLE 3A), "A Draft of Section 7.2.1.3 Generating All - * Combinations</a>, D. Knuth, 2004.</p> - * <p> - * The degenerate cases {@code k == 0} and {@code k == n} are NOT handled by this - * implementation. If constructor arguments satisfy {@code k == 0} - * or {@code k >= n}, no exception is generated, but the iterator is empty. - * </p> - * - */ - private static class LexicographicIterator implements Iterator<int[]> { - /** Size of subsets returned by the iterator */ - private final int k; - - /** - * c[1], ..., c[k] stores the next combination; c[k + 1], c[k + 2] are - * sentinels. - * <p> - * Note that c[0] is "wasted" but this makes it a little easier to - * follow the code. - * </p> - */ - private final int[] c; - - /** Return value for {@link #hasNext()} */ - private boolean more = true; - - /** Marker: smallest index such that c[j + 1] > j */ - private int j; - - /** - * Construct a CombinationIterator to enumerate k-sets from n. - * <p> - * NOTE: If {@code k === 0} or {@code k >= n}, the Iterator will be empty - * (that is, {@link #hasNext()} will return {@code false} immediately. - * </p> - * - * @param n size of the set from which subsets are enumerated - * @param k size of the subsets to enumerate - */ - LexicographicIterator(int n, int k) { - this.k = k; - c = new int[k + 3]; - if (k == 0 || k >= n) { - more = false; - return; - } - // Initialize c to start with lexicographically first k-set - for (int i = 1; i <= k; i++) { - c[i] = i - 1; - } - // Initialize sentinels - c[k + 1] = n; - c[k + 2] = 0; - j = k; // Set up invariant: j is smallest index such that c[j + 1] > j - } - - /** - * {@inheritDoc} - */ - public boolean hasNext() { - return more; - } - - /** - * {@inheritDoc} - */ - public int[] next() { - if (!more) { - throw new NoSuchElementException(); - } - // Copy return value (prepared by last activation) - final int[] ret = new int[k]; - System.arraycopy(c, 1, ret, 0, k); - - // Prepare next iteration - // T2 and T6 loop - int x = 0; - if (j > 0) { - x = j; - c[j] = x; - j--; - return ret; - } - // T3 - if (c[1] + 1 < c[2]) { - c[1]++; - return ret; - } else { - j = 2; - } - // T4 - boolean stepDone = false; - while (!stepDone) { - c[j - 1] = j - 2; - x = c[j] + 1; - if (x == c[j + 1]) { - j++; - } else { - stepDone = true; - } - } - // T5 - if (j > k) { - more = false; - return ret; - } - // T6 - c[j] = x; - j--; - return ret; - } - - /** - * Not supported. - */ - public void remove() { - throw new UnsupportedOperationException(); - } - } - - /** - * Iterator with just one element to handle degenerate cases (full array, - * empty array) for combination iterator. - */ - private static class SingletonIterator implements Iterator<int[]> { - /** Singleton array */ - private final int[] singleton; - /** True on initialization, false after first call to next */ - private boolean more = true; - /** - * Create a singleton iterator providing the given array. - * @param singleton array returned by the iterator - */ - SingletonIterator(final int[] singleton) { - this.singleton = singleton; - } - /** @return True until next is called the first time, then false */ - public boolean hasNext() { - return more; - } - /** @return the singleton in first activation; throws NSEE thereafter */ - public int[] next() { - if (more) { - more = false; - return singleton; - } else { - throw new NoSuchElementException(); - } - } - /** Not supported */ - public void remove() { - throw new UnsupportedOperationException(); - } - } - - /** - * Defines the lexicographic ordering of combinations, using - * the {@link #lexNorm(int[])} method. - */ - private static class LexicographicComparator - implements Comparator<int[]>, Serializable { - /** Serializable version identifier. */ - private static final long serialVersionUID = 20130906L; - /** Size of the set from which combinations are drawn. */ - private final int n; - /** Number of elements in each combination. */ - private final int k; - - /** - * @param n Size of the set from which subsets are selected. - * @param k Size of the subsets to be enumerated. - */ - LexicographicComparator(int n, int k) { - this.n = n; - this.k = k; - } - - /** - * {@inheritDoc} - * - * @throws DimensionMismatchException if the array lengths are not - * equal to {@code k}. - * @throws OutOfRangeException if an element of the array is not - * within the interval [0, {@code n}). - */ - public int compare(int[] c1, - int[] c2) { - if (c1.length != k) { - throw new DimensionMismatchException(c1.length, k); - } - if (c2.length != k) { - throw new DimensionMismatchException(c2.length, k); - } - - // Method "lexNorm" works with ordered arrays. - final int[] c1s = MathArrays.copyOf(c1); - Arrays.sort(c1s); - final int[] c2s = MathArrays.copyOf(c2); - Arrays.sort(c2s); - - final long v1 = lexNorm(c1s); - final long v2 = lexNorm(c2s); - - if (v1 < v2) { - return -1; - } else if (v1 > v2) { - return 1; - } else { - return 0; - } - } - - /** - * Computes the value (in base 10) represented by the digit - * (interpreted in base {@code n}) in the input array in reverse - * order. - * For example if {@code c} is {@code {3, 2, 1}}, and {@code n} - * is 3, the method will return 18. - * - * @param c Input array. - * @return the lexicographic norm. - * @throws OutOfRangeException if an element of the array is not - * within the interval [0, {@code n}). - */ - private long lexNorm(int[] c) { - long ret = 0; - for (int i = 0; i < c.length; i++) { - final int digit = c[i]; - if (digit < 0 || - digit >= n) { - throw new OutOfRangeException(digit, 0, n - 1); - } - - ret += c[i] * ArithmeticUtils.pow(n, i); - } - return ret; - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/CombinatoricsUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/CombinatoricsUtils.java deleted file mode 100644 index 03dde2cc6587..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/CombinatoricsUtils.java +++ /dev/null @@ -1,466 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.util; - -import java.util.Iterator; -import java.util.concurrent.atomic.AtomicReference; - -import com.azure.cosmos.implementation.apachecommons.math.exception.MathArithmeticException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Combinatorial utilities. - * - * @since 3.3 - */ -public final class CombinatoricsUtils { - - /** All long-representable factorials */ - static final long[] FACTORIALS = new long[] { - 1l, 1l, 2l, - 6l, 24l, 120l, - 720l, 5040l, 40320l, - 362880l, 3628800l, 39916800l, - 479001600l, 6227020800l, 87178291200l, - 1307674368000l, 20922789888000l, 355687428096000l, - 6402373705728000l, 121645100408832000l, 2432902008176640000l }; - - /** Stirling numbers of the second kind. */ - static final AtomicReference<long[][]> STIRLING_S2 = new AtomicReference<long[][]> (null); - - /** Private constructor (class contains only static methods). */ - private CombinatoricsUtils() {} - - - /** - * Returns an exact representation of the <a - * href="http://mathworld.wolfram.com/BinomialCoefficient.html"> Binomial - * Coefficient</a>, "{@code n choose k}", the number of - * {@code k}-element subsets that can be selected from an - * {@code n}-element set. - * <p> - * <Strong>Preconditions</strong>: - * <ul> - * <li> {@code 0 <= k <= n } (otherwise - * {@code MathIllegalArgumentException} is thrown)</li> - * <li> The result is small enough to fit into a {@code long}. The - * largest value of {@code n} for which all coefficients are - * {@code < Long.MAX_VALUE} is 66. If the computed value exceeds - * {@code Long.MAX_VALUE} a {@code MathArithMeticException} is - * thrown.</li> - * </ul></p> - * - * @param n the size of the set - * @param k the size of the subsets to be counted - * @return {@code n choose k} - * @throws NotPositiveException if {@code n < 0}. - * @throws NumberIsTooLargeException if {@code k > n}. - * @throws MathArithmeticException if the result is too large to be - * represented by a long integer. - */ - public static long binomialCoefficient(final int n, final int k) - throws NotPositiveException, NumberIsTooLargeException, MathArithmeticException { - CombinatoricsUtils.checkBinomial(n, k); - if ((n == k) || (k == 0)) { - return 1; - } - if ((k == 1) || (k == n - 1)) { - return n; - } - // Use symmetry for large k - if (k > n / 2) { - return binomialCoefficient(n, n - k); - } - - // We use the formula - // (n choose k) = n! / (n-k)! / k! - // (n choose k) == ((n-k+1)*...*n) / (1*...*k) - // which could be written - // (n choose k) == (n-1 choose k-1) * n / k - long result = 1; - if (n <= 61) { - // For n <= 61, the naive implementation cannot overflow. - int i = n - k + 1; - for (int j = 1; j <= k; j++) { - result = result * i / j; - i++; - } - } else if (n <= 66) { - // For n > 61 but n <= 66, the result cannot overflow, - // but we must take care not to overflow intermediate values. - int i = n - k + 1; - for (int j = 1; j <= k; j++) { - // We know that (result * i) is divisible by j, - // but (result * i) may overflow, so we split j: - // Filter out the gcd, d, so j/d and i/d are integer. - // result is divisible by (j/d) because (j/d) - // is relative prime to (i/d) and is a divisor of - // result * (i/d). - final long d = ArithmeticUtils.gcd(i, j); - result = (result / (j / d)) * (i / d); - i++; - } - } else { - // For n > 66, a result overflow might occur, so we check - // the multiplication, taking care to not overflow - // unnecessary. - int i = n - k + 1; - for (int j = 1; j <= k; j++) { - final long d = ArithmeticUtils.gcd(i, j); - result = ArithmeticUtils.mulAndCheck(result / (j / d), i / d); - i++; - } - } - return result; - } - - /** - * Returns a {@code double} representation of the <a - * href="http://mathworld.wolfram.com/BinomialCoefficient.html"> Binomial - * Coefficient</a>, "{@code n choose k}", the number of - * {@code k}-element subsets that can be selected from an - * {@code n}-element set. - * <p> - * <Strong>Preconditions</strong>: - * <ul> - * <li> {@code 0 <= k <= n } (otherwise - * {@code IllegalArgumentException} is thrown)</li> - * <li> The result is small enough to fit into a {@code double}. The - * largest value of {@code n} for which all coefficients are less than - * Double.MAX_VALUE is 1029. If the computed value exceeds Double.MAX_VALUE, - * Double.POSITIVE_INFINITY is returned</li> - * </ul></p> - * - * @param n the size of the set - * @param k the size of the subsets to be counted - * @return {@code n choose k} - * @throws NotPositiveException if {@code n < 0}. - * @throws NumberIsTooLargeException if {@code k > n}. - * @throws MathArithmeticException if the result is too large to be - * represented by a long integer. - */ - public static double binomialCoefficientDouble(final int n, final int k) - throws NotPositiveException, NumberIsTooLargeException, MathArithmeticException { - CombinatoricsUtils.checkBinomial(n, k); - if ((n == k) || (k == 0)) { - return 1d; - } - if ((k == 1) || (k == n - 1)) { - return n; - } - if (k > n/2) { - return binomialCoefficientDouble(n, n - k); - } - if (n < 67) { - return binomialCoefficient(n,k); - } - - double result = 1d; - for (int i = 1; i <= k; i++) { - result *= (double)(n - k + i) / (double)i; - } - - return FastMath.floor(result + 0.5); - } - - /** - * Returns the natural {@code log} of the <a - * href="http://mathworld.wolfram.com/BinomialCoefficient.html"> Binomial - * Coefficient</a>, "{@code n choose k}", the number of - * {@code k}-element subsets that can be selected from an - * {@code n}-element set. - * <p> - * <Strong>Preconditions</strong>: - * <ul> - * <li> {@code 0 <= k <= n } (otherwise - * {@code MathIllegalArgumentException} is thrown)</li> - * </ul></p> - * - * @param n the size of the set - * @param k the size of the subsets to be counted - * @return {@code n choose k} - * @throws NotPositiveException if {@code n < 0}. - * @throws NumberIsTooLargeException if {@code k > n}. - * @throws MathArithmeticException if the result is too large to be - * represented by a long integer. - */ - public static double binomialCoefficientLog(final int n, final int k) - throws NotPositiveException, NumberIsTooLargeException, MathArithmeticException { - CombinatoricsUtils.checkBinomial(n, k); - if ((n == k) || (k == 0)) { - return 0; - } - if ((k == 1) || (k == n - 1)) { - return FastMath.log(n); - } - - /* - * For values small enough to do exact integer computation, - * return the log of the exact value - */ - if (n < 67) { - return FastMath.log(binomialCoefficient(n,k)); - } - - /* - * Return the log of binomialCoefficientDouble for values that will not - * overflow binomialCoefficientDouble - */ - if (n < 1030) { - return FastMath.log(binomialCoefficientDouble(n, k)); - } - - if (k > n / 2) { - return binomialCoefficientLog(n, n - k); - } - - /* - * Sum logs for values that could overflow - */ - double logSum = 0; - - // n!/(n-k)! - for (int i = n - k + 1; i <= n; i++) { - logSum += FastMath.log(i); - } - - // divide by k! - for (int i = 2; i <= k; i++) { - logSum -= FastMath.log(i); - } - - return logSum; - } - - /** - * Returns n!. Shorthand for {@code n} <a - * href="http://mathworld.wolfram.com/Factorial.html"> Factorial</a>, the - * product of the numbers {@code 1,...,n}. - * <p> - * <Strong>Preconditions</strong>: - * <ul> - * <li> {@code n >= 0} (otherwise - * {@code MathIllegalArgumentException} is thrown)</li> - * <li> The result is small enough to fit into a {@code long}. The - * largest value of {@code n} for which {@code n!} does not exceed - * Long.MAX_VALUE} is 20. If the computed value exceeds {@code Long.MAX_VALUE} - * an {@code MathArithMeticException } is thrown.</li> - * </ul> - * </p> - * - * @param n argument - * @return {@code n!} - * @throws MathArithmeticException if the result is too large to be represented - * by a {@code long}. - * @throws NotPositiveException if {@code n < 0}. - * @throws MathArithmeticException if {@code n > 20}: The factorial value is too - * large to fit in a {@code long}. - */ - public static long factorial(final int n) throws NotPositiveException, MathArithmeticException { - if (n < 0) { - throw new NotPositiveException(LocalizedFormats.FACTORIAL_NEGATIVE_PARAMETER, - n); - } - if (n > 20) { - throw new MathArithmeticException(); - } - return FACTORIALS[n]; - } - - /** - * Compute n!, the<a href="http://mathworld.wolfram.com/Factorial.html"> - * factorial</a> of {@code n} (the product of the numbers 1 to n), as a - * {@code double}. - * The result should be small enough to fit into a {@code double}: The - * largest {@code n} for which {@code n!} does not exceed - * {@code Double.MAX_VALUE} is 170. If the computed value exceeds - * {@code Double.MAX_VALUE}, {@code Double.POSITIVE_INFINITY} is returned. - * - * @param n Argument. - * @return {@code n!} - * @throws NotPositiveException if {@code n < 0}. - */ - public static double factorialDouble(final int n) throws NotPositiveException { - if (n < 0) { - throw new NotPositiveException(LocalizedFormats.FACTORIAL_NEGATIVE_PARAMETER, - n); - } - if (n < 21) { - return FACTORIALS[n]; - } - return FastMath.floor(FastMath.exp(CombinatoricsUtils.factorialLog(n)) + 0.5); - } - - /** - * Compute the natural logarithm of the factorial of {@code n}. - * - * @param n Argument. - * @return {@code n!} - * @throws NotPositiveException if {@code n < 0}. - */ - public static double factorialLog(final int n) throws NotPositiveException { - if (n < 0) { - throw new NotPositiveException(LocalizedFormats.FACTORIAL_NEGATIVE_PARAMETER, - n); - } - if (n < 21) { - return FastMath.log(FACTORIALS[n]); - } - double logSum = 0; - for (int i = 2; i <= n; i++) { - logSum += FastMath.log(i); - } - return logSum; - } - - /** - * Returns the <a - * href="http://mathworld.wolfram.com/StirlingNumberoftheSecondKind.html"> - * Stirling number of the second kind</a>, "{@code S(n,k)}", the number of - * ways of partitioning an {@code n}-element set into {@code k} non-empty - * subsets. - * <p> - * The preconditions are {@code 0 <= k <= n } (otherwise - * {@code NotPositiveException} is thrown) - * </p> - * @param n the size of the set - * @param k the number of non-empty subsets - * @return {@code S(n,k)} - * @throws NotPositiveException if {@code k < 0}. - * @throws NumberIsTooLargeException if {@code k > n}. - * @throws MathArithmeticException if some overflow happens, typically for n exceeding 25 and - * k between 20 and n-2 (S(n,n-1) is handled specifically and does not overflow) - * @since 3.1 - */ - public static long stirlingS2(final int n, final int k) - throws NotPositiveException, NumberIsTooLargeException, MathArithmeticException { - if (k < 0) { - throw new NotPositiveException(k); - } - if (k > n) { - throw new NumberIsTooLargeException(k, n, true); - } - - long[][] stirlingS2 = STIRLING_S2.get(); - - if (stirlingS2 == null) { - // the cache has never been initialized, compute the first numbers - // by direct recurrence relation - - // as S(26,9) = 11201516780955125625 is larger than Long.MAX_VALUE - // we must stop computation at row 26 - final int maxIndex = 26; - stirlingS2 = new long[maxIndex][]; - stirlingS2[0] = new long[] { 1l }; - for (int i = 1; i < stirlingS2.length; ++i) { - stirlingS2[i] = new long[i + 1]; - stirlingS2[i][0] = 0; - stirlingS2[i][1] = 1; - stirlingS2[i][i] = 1; - for (int j = 2; j < i; ++j) { - stirlingS2[i][j] = j * stirlingS2[i - 1][j] + stirlingS2[i - 1][j - 1]; - } - } - - // atomically save the cache - STIRLING_S2.compareAndSet(null, stirlingS2); - - } - - if (n < stirlingS2.length) { - // the number is in the small cache - return stirlingS2[n][k]; - } else { - // use explicit formula to compute the number without caching it - if (k == 0) { - return 0; - } else if (k == 1 || k == n) { - return 1; - } else if (k == 2) { - return (1l << (n - 1)) - 1l; - } else if (k == n - 1) { - return binomialCoefficient(n, 2); - } else { - // definition formula: note that this may trigger some overflow - long sum = 0; - long sign = ((k & 0x1) == 0) ? 1 : -1; - for (int j = 1; j <= k; ++j) { - sign = -sign; - sum += sign * binomialCoefficient(k, j) * ArithmeticUtils.pow(j, n); - if (sum < 0) { - // there was an overflow somewhere - throw new MathArithmeticException(LocalizedFormats.ARGUMENT_OUTSIDE_DOMAIN, - n, 0, stirlingS2.length - 1); - } - } - return sum / factorial(k); - } - } - - } - - /** - * Returns an iterator whose range is the k-element subsets of {0, ..., n - 1} - * represented as {@code int[]} arrays. - * <p> - * The arrays returned by the iterator are sorted in descending order and - * they are visited in lexicographic order with significance from right to - * left. For example, combinationsIterator(4, 2) returns an Iterator that - * will generate the following sequence of arrays on successive calls to - * {@code next()}:</p><p> - * {@code [0, 1], [0, 2], [1, 2], [0, 3], [1, 3], [2, 3]} - * </p><p> - * If {@code k == 0} an Iterator containing an empty array is returned and - * if {@code k == n} an Iterator containing [0, ..., n -1] is returned.</p> - * - * @param n Size of the set from which subsets are selected. - * @param k Size of the subsets to be enumerated. - * @return an {@link Iterator iterator} over the k-sets in n. - * @throws NotPositiveException if {@code n < 0}. - * @throws NumberIsTooLargeException if {@code k > n}. - */ - public static Iterator<int[]> combinationsIterator(int n, int k) { - return new Combinations(n, k).iterator(); - } - - /** - * Check binomial preconditions. - * - * @param n Size of the set. - * @param k Size of the subsets to be counted. - * @throws NotPositiveException if {@code n < 0}. - * @throws NumberIsTooLargeException if {@code k > n}. - */ - public static void checkBinomial(final int n, - final int k) - throws NumberIsTooLargeException, - NotPositiveException { - if (n < k) { - throw new NumberIsTooLargeException(LocalizedFormats.BINOMIAL_INVALID_PARAMETERS_ORDER, - k, n, true); - } - if (n < 0) { - throw new NotPositiveException(LocalizedFormats.BINOMIAL_NEGATIVE_PARAMETER, n); - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/ContinuedFraction.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/ContinuedFraction.java deleted file mode 100644 index 60ac8aba43da..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/ContinuedFraction.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.util; - -import com.azure.cosmos.implementation.apachecommons.math.exception.ConvergenceException; -import com.azure.cosmos.implementation.apachecommons.math.exception.MaxCountExceededException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Provides a generic means to evaluate continued fractions. Subclasses simply - * provided the a and b coefficients to evaluate the continued fraction. - * - * <p> - * References: - * <ul> - * <li><a href="http://mathworld.wolfram.com/ContinuedFraction.html"> - * Continued Fraction</a></li> - * </ul> - * </p> - * - */ -public abstract class ContinuedFraction { - /** Maximum allowed numerical error. */ - private static final double DEFAULT_EPSILON = 10e-9; - - /** - * Default constructor. - */ - protected ContinuedFraction() { - super(); - } - - /** - * Access the n-th a coefficient of the continued fraction. Since a can be - * a function of the evaluation point, x, that is passed in as well. - * @param n the coefficient index to retrieve. - * @param x the evaluation point. - * @return the n-th a coefficient. - */ - protected abstract double getA(int n, double x); - - /** - * Access the n-th b coefficient of the continued fraction. Since b can be - * a function of the evaluation point, x, that is passed in as well. - * @param n the coefficient index to retrieve. - * @param x the evaluation point. - * @return the n-th b coefficient. - */ - protected abstract double getB(int n, double x); - - /** - * Evaluates the continued fraction at the value x. - * @param x the evaluation point. - * @return the value of the continued fraction evaluated at x. - * @throws ConvergenceException if the algorithm fails to converge. - */ - public double evaluate(double x) throws ConvergenceException { - return evaluate(x, DEFAULT_EPSILON, Integer.MAX_VALUE); - } - - /** - * Evaluates the continued fraction at the value x. - * @param x the evaluation point. - * @param epsilon maximum error allowed. - * @return the value of the continued fraction evaluated at x. - * @throws ConvergenceException if the algorithm fails to converge. - */ - public double evaluate(double x, double epsilon) throws ConvergenceException { - return evaluate(x, epsilon, Integer.MAX_VALUE); - } - - /** - * Evaluates the continued fraction at the value x. - * @param x the evaluation point. - * @param maxIterations maximum number of convergents - * @return the value of the continued fraction evaluated at x. - * @throws ConvergenceException if the algorithm fails to converge. - * @throws MaxCountExceededException if maximal number of iterations is reached - */ - public double evaluate(double x, int maxIterations) - throws ConvergenceException, MaxCountExceededException { - return evaluate(x, DEFAULT_EPSILON, maxIterations); - } - - /** - * Evaluates the continued fraction at the value x. - * <p> - * The implementation of this method is based on the modified Lentz algorithm as described - * on page 18 ff. in: - * <ul> - * <li> - * I. J. Thompson, A. R. Barnett. "Coulomb and Bessel Functions of Complex Arguments and Order." - * <a target="_blank" href="http://www.fresco.org.uk/papers/Thompson-JCP64p490.pdf"> - * http://www.fresco.org.uk/papers/Thompson-JCP64p490.pdf</a> - * </li> - * </ul> - * <b>Note:</b> the implementation uses the terms a<sub>i</sub> and b<sub>i</sub> as defined in - * <a href="http://mathworld.wolfram.com/ContinuedFraction.html">Continued Fraction @ MathWorld</a>. - * </p> - * - * @param x the evaluation point. - * @param epsilon maximum error allowed. - * @param maxIterations maximum number of convergents - * @return the value of the continued fraction evaluated at x. - * @throws ConvergenceException if the algorithm fails to converge. - * @throws MaxCountExceededException if maximal number of iterations is reached - */ - public double evaluate(double x, double epsilon, int maxIterations) - throws ConvergenceException, MaxCountExceededException { - final double small = 1e-50; - double hPrev = getA(0, x); - - // use the value of small as epsilon criteria for zero checks - if (Precision.equals(hPrev, 0.0, small)) { - hPrev = small; - } - - int n = 1; - double dPrev = 0.0; - double cPrev = hPrev; - double hN = hPrev; - - while (n < maxIterations) { - final double a = getA(n, x); - final double b = getB(n, x); - - double dN = a + b * dPrev; - if (Precision.equals(dN, 0.0, small)) { - dN = small; - } - double cN = a + b / cPrev; - if (Precision.equals(cN, 0.0, small)) { - cN = small; - } - - dN = 1 / dN; - final double deltaN = cN * dN; - hN = hPrev * deltaN; - - if (Double.isInfinite(hN)) { - throw new ConvergenceException(LocalizedFormats.CONTINUED_FRACTION_INFINITY_DIVERGENCE, - x); - } - if (Double.isNaN(hN)) { - throw new ConvergenceException(LocalizedFormats.CONTINUED_FRACTION_NAN_DIVERGENCE, - x); - } - - if (FastMath.abs(deltaN - 1.0) < epsilon) { - break; - } - - dPrev = dN; - cPrev = cN; - hPrev = hN; - n++; - } - - if (n >= maxIterations) { - throw new MaxCountExceededException(LocalizedFormats.NON_CONVERGENT_CONTINUED_FRACTION, - maxIterations, x); - } - - return hN; - } - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/DoubleArray.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/DoubleArray.java deleted file mode 100644 index 9274cec63bf8..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/DoubleArray.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.util; - - -/** - * Provides a standard interface for double arrays. Allows different - * array implementations to support various storage mechanisms - * such as automatic expansion, contraction, and array "rolling". - * - */ -public interface DoubleArray { - - /** - * Returns the number of elements currently in the array. Please note - * that this may be different from the length of the internal storage array. - * - * @return number of elements - */ - int getNumElements(); - - /** - * Returns the element at the specified index. Note that if an - * out of bounds index is supplied a ArrayIndexOutOfBoundsException - * will be thrown. - * - * @param index index to fetch a value from - * @return value stored at the specified index - * @throws ArrayIndexOutOfBoundsException if <code>index</code> is less than - * zero or is greater than <code>getNumElements() - 1</code>. - */ - double getElement(int index); - - /** - * Sets the element at the specified index. If the specified index is greater than - * <code>getNumElements() - 1</code>, the <code>numElements</code> property - * is increased to <code>index +1</code> and additional storage is allocated - * (if necessary) for the new element and all (uninitialized) elements - * between the new element and the previous end of the array). - * - * @param index index to store a value in - * @param value value to store at the specified index - * @throws ArrayIndexOutOfBoundsException if <code>index</code> is less than - * zero. - */ - void setElement(int index, double value); - - /** - * Adds an element to the end of this expandable array - * - * @param value to be added to end of array - */ - void addElement(double value); - - /** - * Adds elements to the end of this expandable array - * - * @param values to be added to end of array - */ - void addElements(double[] values); - - /** - * <p> - * Adds an element to the end of the array and removes the first - * element in the array. Returns the discarded first element. - * The effect is similar to a push operation in a FIFO queue. - * </p> - * <p> - * Example: If the array contains the elements 1, 2, 3, 4 (in that order) - * and addElementRolling(5) is invoked, the result is an array containing - * the entries 2, 3, 4, 5 and the value returned is 1. - * </p> - * - * @param value the value to be added to the array - * @return the value which has been discarded or "pushed" out of the array - * by this rolling insert - */ - double addElementRolling(double value); - - /** - * Returns a double[] array containing the elements of this - * <code>DoubleArray</code>. If the underlying implementation is - * array-based, this method should always return a copy, rather than a - * reference to the underlying array so that changes made to the returned - * array have no effect on the <code>DoubleArray.</code> - * - * @return all elements added to the array - */ - double[] getElements(); - - /** - * Clear the double array - */ - void clear(); - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/FastMath.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/FastMath.java deleted file mode 100644 index eb8461eba060..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/FastMath.java +++ /dev/null @@ -1,4300 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.util; - -import java.io.PrintStream; - -import com.azure.cosmos.implementation.apachecommons.math.exception.MathArithmeticException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Faster, more accurate, portable alternative to {@link Math} and - * {@link StrictMath} for large scale computation. - * <p> - * FastMath is a drop-in replacement for both Math and StrictMath. This - * means that for any method in Math (say {@code Math.sin(x)} or - * {@code Math.cbrt(y)}), user can directly change the class and use the - * methods as is (using {@code FastMath.sin(x)} or {@code FastMath.cbrt(y)} - * in the previous example). - * </p> - * <p> - * FastMath speed is achieved by relying heavily on optimizing compilers - * to native code present in many JVMs today and use of large tables. - * The larger tables are lazily initialised on first use, so that the setup - * time does not penalise methods that don't need them. - * </p> - * <p> - * Note that FastMath is - * extensively used inside Apache Commons Math, so by calling some algorithms, - * the overhead when the the tables need to be intialised will occur - * regardless of the end-user calling FastMath methods directly or not. - * Performance figures for a specific JVM and hardware can be evaluated by - * running the FastMathTestPerformance tests in the test directory of the source - * distribution. - * </p> - * <p> - * FastMath accuracy should be mostly independent of the JVM as it relies only - * on IEEE-754 basic operations and on embedded tables. Almost all operations - * are accurate to about 0.5 ulp throughout the domain range. This statement, - * of course is only a rough global observed behavior, it is <em>not</em> a - * guarantee for <em>every</em> double numbers input (see William Kahan's <a - * href="http://en.wikipedia.org/wiki/Rounding#The_table-maker.27s_dilemma">Table - * Maker's Dilemma</a>). - * </p> - * <p> - * FastMath additionally implements the following methods not found in Math/StrictMath: - * <ul> - * <li>{@link #asinh(double)}</li> - * <li>{@link #acosh(double)}</li> - * <li>{@link #atanh(double)}</li> - * </ul> - * The following methods are found in Math/StrictMath since 1.6 only, they are provided - * by FastMath even in 1.5 Java virtual machines - * <ul> - * <li>{@link #copySign(double, double)}</li> - * <li>{@link #getExponent(double)}</li> - * <li>{@link #nextAfter(double,double)}</li> - * <li>{@link #nextUp(double)}</li> - * <li>{@link #scalb(double, int)}</li> - * <li>{@link #copySign(float, float)}</li> - * <li>{@link #getExponent(float)}</li> - * <li>{@link #nextAfter(float,double)}</li> - * <li>{@link #nextUp(float)}</li> - * <li>{@link #scalb(float, int)}</li> - * </ul> - * </p> - * @since 2.2 - */ -public class FastMath { - /** Archimede's constant PI, ratio of circle circumference to diameter. */ - public static final double PI = 105414357.0 / 33554432.0 + 1.984187159361080883e-9; - - /** Napier's constant e, base of the natural logarithm. */ - public static final double E = 2850325.0 / 1048576.0 + 8.254840070411028747e-8; - - /** Index of exp(0) in the array of integer exponentials. */ - static final int EXP_INT_TABLE_MAX_INDEX = 750; - /** Length of the array of integer exponentials. */ - static final int EXP_INT_TABLE_LEN = EXP_INT_TABLE_MAX_INDEX * 2; - /** Logarithm table length. */ - static final int LN_MANT_LEN = 1024; - /** Exponential fractions table length. */ - static final int EXP_FRAC_TABLE_LEN = 1025; // 0, 1/1024, ... 1024/1024 - - /** StrictMath.log(Double.MAX_VALUE): {@value} */ - private static final double LOG_MAX_VALUE = StrictMath.log(Double.MAX_VALUE); - - /** Indicator for tables initialization. - * <p> - * This compile-time constant should be set to true only if one explicitly - * wants to compute the tables at class loading time instead of using the - * already computed ones provided as literal arrays below. - * </p> - */ - private static final boolean RECOMPUTE_TABLES_AT_RUNTIME = false; - - /** log(2) (high bits). */ - private static final double LN_2_A = 0.693147063255310059; - - /** log(2) (low bits). */ - private static final double LN_2_B = 1.17304635250823482e-7; - - /** Coefficients for log, when input 0.99 < x < 1.01. */ - private static final double LN_QUICK_COEF[][] = { - {1.0, 5.669184079525E-24}, - {-0.25, -0.25}, - {0.3333333134651184, 1.986821492305628E-8}, - {-0.25, -6.663542893624021E-14}, - {0.19999998807907104, 1.1921056801463227E-8}, - {-0.1666666567325592, -7.800414592973399E-9}, - {0.1428571343421936, 5.650007086920087E-9}, - {-0.12502530217170715, -7.44321345601866E-11}, - {0.11113807559013367, 9.219544613762692E-9}, - }; - - /** Coefficients for log in the range of 1.0 < x < 1.0 + 2^-10. */ - private static final double LN_HI_PREC_COEF[][] = { - {1.0, -6.032174644509064E-23}, - {-0.25, -0.25}, - {0.3333333134651184, 1.9868161777724352E-8}, - {-0.2499999701976776, -2.957007209750105E-8}, - {0.19999954104423523, 1.5830993332061267E-10}, - {-0.16624879837036133, -2.6033824355191673E-8} - }; - - /** Sine, Cosine, Tangent tables are for 0, 1/8, 2/8, ... 13/8 = PI/2 approx. */ - private static final int SINE_TABLE_LEN = 14; - - /** Sine table (high bits). */ - private static final double SINE_TABLE_A[] = - { - +0.0d, - +0.1246747374534607d, - +0.24740394949913025d, - +0.366272509098053d, - +0.4794255495071411d, - +0.5850973129272461d, - +0.6816387176513672d, - +0.7675435543060303d, - +0.8414709568023682d, - +0.902267575263977d, - +0.9489846229553223d, - +0.9808930158615112d, - +0.9974949359893799d, - +0.9985313415527344d, - }; - - /** Sine table (low bits). */ - private static final double SINE_TABLE_B[] = - { - +0.0d, - -4.068233003401932E-9d, - +9.755392680573412E-9d, - +1.9987994582857286E-8d, - -1.0902938113007961E-8d, - -3.9986783938944604E-8d, - +4.23719669792332E-8d, - -5.207000323380292E-8d, - +2.800552834259E-8d, - +1.883511811213715E-8d, - -3.5997360512765566E-9d, - +4.116164446561962E-8d, - +5.0614674548127384E-8d, - -1.0129027912496858E-9d, - }; - - /** Cosine table (high bits). */ - private static final double COSINE_TABLE_A[] = - { - +1.0d, - +0.9921976327896118d, - +0.9689123630523682d, - +0.9305076599121094d, - +0.8775825500488281d, - +0.8109631538391113d, - +0.7316888570785522d, - +0.6409968137741089d, - +0.5403022766113281d, - +0.4311765432357788d, - +0.3153223395347595d, - +0.19454771280288696d, - +0.07073719799518585d, - -0.05417713522911072d, - }; - - /** Cosine table (low bits). */ - private static final double COSINE_TABLE_B[] = - { - +0.0d, - +3.4439717236742845E-8d, - +5.865827662008209E-8d, - -3.7999795083850525E-8d, - +1.184154459111628E-8d, - -3.43338934259355E-8d, - +1.1795268640216787E-8d, - +4.438921624363781E-8d, - +2.925681159240093E-8d, - -2.6437112632041807E-8d, - +2.2860509143963117E-8d, - -4.813899778443457E-9d, - +3.6725170580355583E-9d, - +2.0217439756338078E-10d, - }; - - - /** Tangent table, used by atan() (high bits). */ - private static final double TANGENT_TABLE_A[] = - { - +0.0d, - +0.1256551444530487d, - +0.25534194707870483d, - +0.3936265707015991d, - +0.5463024377822876d, - +0.7214844226837158d, - +0.9315965175628662d, - +1.1974215507507324d, - +1.5574076175689697d, - +2.092571258544922d, - +3.0095696449279785d, - +5.041914939880371d, - +14.101419448852539d, - -18.430862426757812d, - }; - - /** Tangent table, used by atan() (low bits). */ - private static final double TANGENT_TABLE_B[] = - { - +0.0d, - -7.877917738262007E-9d, - -2.5857668567479893E-8d, - +5.2240336371356666E-9d, - +5.206150291559893E-8d, - +1.8307188599677033E-8d, - -5.7618793749770706E-8d, - +7.848361555046424E-8d, - +1.0708593250394448E-7d, - +1.7827257129423813E-8d, - +2.893485277253286E-8d, - +3.1660099222737955E-7d, - +4.983191803254889E-7d, - -3.356118100840571E-7d, - }; - - /** Bits of 1/(2*pi), need for reducePayneHanek(). */ - private static final long RECIP_2PI[] = new long[] { - (0x28be60dbL << 32) | 0x9391054aL, - (0x7f09d5f4L << 32) | 0x7d4d3770L, - (0x36d8a566L << 32) | 0x4f10e410L, - (0x7f9458eaL << 32) | 0xf7aef158L, - (0x6dc91b8eL << 32) | 0x909374b8L, - (0x01924bbaL << 32) | 0x82746487L, - (0x3f877ac7L << 32) | 0x2c4a69cfL, - (0xba208d7dL << 32) | 0x4baed121L, - (0x3a671c09L << 32) | 0xad17df90L, - (0x4e64758eL << 32) | 0x60d4ce7dL, - (0x272117e2L << 32) | 0xef7e4a0eL, - (0xc7fe25ffL << 32) | 0xf7816603L, - (0xfbcbc462L << 32) | 0xd6829b47L, - (0xdb4d9fb3L << 32) | 0xc9f2c26dL, - (0xd3d18fd9L << 32) | 0xa797fa8bL, - (0x5d49eeb1L << 32) | 0xfaf97c5eL, - (0xcf41ce7dL << 32) | 0xe294a4baL, - 0x9afed7ecL << 32 }; - - /** Bits of pi/4, need for reducePayneHanek(). */ - private static final long PI_O_4_BITS[] = new long[] { - (0xc90fdaa2L << 32) | 0x2168c234L, - (0xc4c6628bL << 32) | 0x80dc1cd1L }; - - /** Eighths. - * This is used by sinQ, because its faster to do a table lookup than - * a multiply in this time-critical routine - */ - private static final double EIGHTHS[] = {0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1.0, 1.125, 1.25, 1.375, 1.5, 1.625}; - - /** Table of 2^((n+2)/3) */ - private static final double CBRTTWO[] = { 0.6299605249474366, - 0.7937005259840998, - 1.0, - 1.2599210498948732, - 1.5874010519681994 }; - - /* - * There are 52 bits in the mantissa of a double. - * For additional precision, the code splits double numbers into two parts, - * by clearing the low order 30 bits if possible, and then performs the arithmetic - * on each half separately. - */ - - /** - * 0x40000000 - used to split a double into two parts, both with the low order bits cleared. - * Equivalent to 2^30. - */ - private static final long HEX_40000000 = 0x40000000L; // 1073741824L - - /** Mask used to clear low order 30 bits */ - private static final long MASK_30BITS = -1L - (HEX_40000000 -1); // 0xFFFFFFFFC0000000L; - - /** Mask used to clear the non-sign part of an int. */ - private static final int MASK_NON_SIGN_INT = 0x7fffffff; - - /** Mask used to clear the non-sign part of a long. */ - private static final long MASK_NON_SIGN_LONG = 0x7fffffffffffffffl; - - /** Mask used to extract exponent from double bits. */ - private static final long MASK_DOUBLE_EXPONENT = 0x7ff0000000000000L; - - /** Mask used to extract mantissa from double bits. */ - private static final long MASK_DOUBLE_MANTISSA = 0x000fffffffffffffL; - - /** Mask used to add implicit high order bit for normalized double. */ - private static final long IMPLICIT_HIGH_BIT = 0x0010000000000000L; - - /** 2^52 - double numbers this large must be integral (no fraction) or NaN or Infinite */ - private static final double TWO_POWER_52 = 4503599627370496.0; - - /** Constant: {@value}. */ - private static final double F_1_3 = 1d / 3d; - /** Constant: {@value}. */ - private static final double F_1_5 = 1d / 5d; - /** Constant: {@value}. */ - private static final double F_1_7 = 1d / 7d; - /** Constant: {@value}. */ - private static final double F_1_9 = 1d / 9d; - /** Constant: {@value}. */ - private static final double F_1_11 = 1d / 11d; - /** Constant: {@value}. */ - private static final double F_1_13 = 1d / 13d; - /** Constant: {@value}. */ - private static final double F_1_15 = 1d / 15d; - /** Constant: {@value}. */ - private static final double F_1_17 = 1d / 17d; - /** Constant: {@value}. */ - private static final double F_3_4 = 3d / 4d; - /** Constant: {@value}. */ - private static final double F_15_16 = 15d / 16d; - /** Constant: {@value}. */ - private static final double F_13_14 = 13d / 14d; - /** Constant: {@value}. */ - private static final double F_11_12 = 11d / 12d; - /** Constant: {@value}. */ - private static final double F_9_10 = 9d / 10d; - /** Constant: {@value}. */ - private static final double F_7_8 = 7d / 8d; - /** Constant: {@value}. */ - private static final double F_5_6 = 5d / 6d; - /** Constant: {@value}. */ - private static final double F_1_2 = 1d / 2d; - /** Constant: {@value}. */ - private static final double F_1_4 = 1d / 4d; - - /** - * Private Constructor - */ - private FastMath() {} - - // Generic helper methods - - /** - * Get the high order bits from the mantissa. - * Equivalent to adding and subtracting HEX_40000 but also works for very large numbers - * - * @param d the value to split - * @return the high order part of the mantissa - */ - private static double doubleHighPart(double d) { - if (d > -Precision.SAFE_MIN && d < Precision.SAFE_MIN){ - return d; // These are un-normalised - don't try to convert - } - long xl = Double.doubleToRawLongBits(d); // can take raw bits because just gonna convert it back - xl &= MASK_30BITS; // Drop low order bits - return Double.longBitsToDouble(xl); - } - - /** Compute the square root of a number. - * <p><b>Note:</b> this implementation currently delegates to {@link Math#sqrt} - * @param a number on which evaluation is done - * @return square root of a - */ - public static double sqrt(final double a) { - return Math.sqrt(a); - } - - /** Compute the hyperbolic cosine of a number. - * @param x number on which evaluation is done - * @return hyperbolic cosine of x - */ - public static double cosh(double x) { - if (x != x) { - return x; - } - - // cosh[z] = (exp(z) + exp(-z))/2 - - // for numbers with magnitude 20 or so, - // exp(-z) can be ignored in comparison with exp(z) - - if (x > 20) { - if (x >= LOG_MAX_VALUE) { - // Avoid overflow (MATH-905). - final double t = exp(0.5 * x); - return (0.5 * t) * t; - } else { - return 0.5 * exp(x); - } - } else if (x < -20) { - if (x <= -LOG_MAX_VALUE) { - // Avoid overflow (MATH-905). - final double t = exp(-0.5 * x); - return (0.5 * t) * t; - } else { - return 0.5 * exp(-x); - } - } - - final double hiPrec[] = new double[2]; - if (x < 0.0) { - x = -x; - } - exp(x, 0.0, hiPrec); - - double ya = hiPrec[0] + hiPrec[1]; - double yb = -(ya - hiPrec[0] - hiPrec[1]); - - double temp = ya * HEX_40000000; - double yaa = ya + temp - temp; - double yab = ya - yaa; - - // recip = 1/y - double recip = 1.0/ya; - temp = recip * HEX_40000000; - double recipa = recip + temp - temp; - double recipb = recip - recipa; - - // Correct for rounding in division - recipb += (1.0 - yaa*recipa - yaa*recipb - yab*recipa - yab*recipb) * recip; - // Account for yb - recipb += -yb * recip * recip; - - // y = y + 1/y - temp = ya + recipa; - yb += -(temp - ya - recipa); - ya = temp; - temp = ya + recipb; - yb += -(temp - ya - recipb); - ya = temp; - - double result = ya + yb; - result *= 0.5; - return result; - } - - /** Compute the hyperbolic sine of a number. - * @param x number on which evaluation is done - * @return hyperbolic sine of x - */ - public static double sinh(double x) { - boolean negate = false; - if (x != x) { - return x; - } - - // sinh[z] = (exp(z) - exp(-z) / 2 - - // for values of z larger than about 20, - // exp(-z) can be ignored in comparison with exp(z) - - if (x > 20) { - if (x >= LOG_MAX_VALUE) { - // Avoid overflow (MATH-905). - final double t = exp(0.5 * x); - return (0.5 * t) * t; - } else { - return 0.5 * exp(x); - } - } else if (x < -20) { - if (x <= -LOG_MAX_VALUE) { - // Avoid overflow (MATH-905). - final double t = exp(-0.5 * x); - return (-0.5 * t) * t; - } else { - return -0.5 * exp(-x); - } - } - - if (x == 0) { - return x; - } - - if (x < 0.0) { - x = -x; - negate = true; - } - - double result; - - if (x > 0.25) { - double hiPrec[] = new double[2]; - exp(x, 0.0, hiPrec); - - double ya = hiPrec[0] + hiPrec[1]; - double yb = -(ya - hiPrec[0] - hiPrec[1]); - - double temp = ya * HEX_40000000; - double yaa = ya + temp - temp; - double yab = ya - yaa; - - // recip = 1/y - double recip = 1.0/ya; - temp = recip * HEX_40000000; - double recipa = recip + temp - temp; - double recipb = recip - recipa; - - // Correct for rounding in division - recipb += (1.0 - yaa*recipa - yaa*recipb - yab*recipa - yab*recipb) * recip; - // Account for yb - recipb += -yb * recip * recip; - - recipa = -recipa; - recipb = -recipb; - - // y = y + 1/y - temp = ya + recipa; - yb += -(temp - ya - recipa); - ya = temp; - temp = ya + recipb; - yb += -(temp - ya - recipb); - ya = temp; - - result = ya + yb; - result *= 0.5; - } - else { - double hiPrec[] = new double[2]; - expm1(x, hiPrec); - - double ya = hiPrec[0] + hiPrec[1]; - double yb = -(ya - hiPrec[0] - hiPrec[1]); - - /* Compute expm1(-x) = -expm1(x) / (expm1(x) + 1) */ - double denom = 1.0 + ya; - double denomr = 1.0 / denom; - double denomb = -(denom - 1.0 - ya) + yb; - double ratio = ya * denomr; - double temp = ratio * HEX_40000000; - double ra = ratio + temp - temp; - double rb = ratio - ra; - - temp = denom * HEX_40000000; - double za = denom + temp - temp; - double zb = denom - za; - - rb += (ya - za*ra - za*rb - zb*ra - zb*rb) * denomr; - - // Adjust for yb - rb += yb*denomr; // numerator - rb += -ya * denomb * denomr * denomr; // denominator - - // y = y - 1/y - temp = ya + ra; - yb += -(temp - ya - ra); - ya = temp; - temp = ya + rb; - yb += -(temp - ya - rb); - ya = temp; - - result = ya + yb; - result *= 0.5; - } - - if (negate) { - result = -result; - } - - return result; - } - - /** Compute the hyperbolic tangent of a number. - * @param x number on which evaluation is done - * @return hyperbolic tangent of x - */ - public static double tanh(double x) { - boolean negate = false; - - if (x != x) { - return x; - } - - // tanh[z] = sinh[z] / cosh[z] - // = (exp(z) - exp(-z)) / (exp(z) + exp(-z)) - // = (exp(2x) - 1) / (exp(2x) + 1) - - // for magnitude > 20, sinh[z] == cosh[z] in double precision - - if (x > 20.0) { - return 1.0; - } - - if (x < -20) { - return -1.0; - } - - if (x == 0) { - return x; - } - - if (x < 0.0) { - x = -x; - negate = true; - } - - double result; - if (x >= 0.5) { - double hiPrec[] = new double[2]; - // tanh(x) = (exp(2x) - 1) / (exp(2x) + 1) - exp(x*2.0, 0.0, hiPrec); - - double ya = hiPrec[0] + hiPrec[1]; - double yb = -(ya - hiPrec[0] - hiPrec[1]); - - /* Numerator */ - double na = -1.0 + ya; - double nb = -(na + 1.0 - ya); - double temp = na + yb; - nb += -(temp - na - yb); - na = temp; - - /* Denominator */ - double da = 1.0 + ya; - double db = -(da - 1.0 - ya); - temp = da + yb; - db += -(temp - da - yb); - da = temp; - - temp = da * HEX_40000000; - double daa = da + temp - temp; - double dab = da - daa; - - // ratio = na/da - double ratio = na/da; - temp = ratio * HEX_40000000; - double ratioa = ratio + temp - temp; - double ratiob = ratio - ratioa; - - // Correct for rounding in division - ratiob += (na - daa*ratioa - daa*ratiob - dab*ratioa - dab*ratiob) / da; - - // Account for nb - ratiob += nb / da; - // Account for db - ratiob += -db * na / da / da; - - result = ratioa + ratiob; - } - else { - double hiPrec[] = new double[2]; - // tanh(x) = expm1(2x) / (expm1(2x) + 2) - expm1(x*2.0, hiPrec); - - double ya = hiPrec[0] + hiPrec[1]; - double yb = -(ya - hiPrec[0] - hiPrec[1]); - - /* Numerator */ - double na = ya; - double nb = yb; - - /* Denominator */ - double da = 2.0 + ya; - double db = -(da - 2.0 - ya); - double temp = da + yb; - db += -(temp - da - yb); - da = temp; - - temp = da * HEX_40000000; - double daa = da + temp - temp; - double dab = da - daa; - - // ratio = na/da - double ratio = na/da; - temp = ratio * HEX_40000000; - double ratioa = ratio + temp - temp; - double ratiob = ratio - ratioa; - - // Correct for rounding in division - ratiob += (na - daa*ratioa - daa*ratiob - dab*ratioa - dab*ratiob) / da; - - // Account for nb - ratiob += nb / da; - // Account for db - ratiob += -db * na / da / da; - - result = ratioa + ratiob; - } - - if (negate) { - result = -result; - } - - return result; - } - - /** Compute the inverse hyperbolic cosine of a number. - * @param a number on which evaluation is done - * @return inverse hyperbolic cosine of a - */ - public static double acosh(final double a) { - return FastMath.log(a + FastMath.sqrt(a * a - 1)); - } - - /** Compute the inverse hyperbolic sine of a number. - * @param a number on which evaluation is done - * @return inverse hyperbolic sine of a - */ - public static double asinh(double a) { - boolean negative = false; - if (a < 0) { - negative = true; - a = -a; - } - - double absAsinh; - if (a > 0.167) { - absAsinh = FastMath.log(FastMath.sqrt(a * a + 1) + a); - } else { - final double a2 = a * a; - if (a > 0.097) { - absAsinh = a * (1 - a2 * (F_1_3 - a2 * (F_1_5 - a2 * (F_1_7 - a2 * (F_1_9 - a2 * (F_1_11 - a2 * (F_1_13 - a2 * (F_1_15 - a2 * F_1_17 * F_15_16) * F_13_14) * F_11_12) * F_9_10) * F_7_8) * F_5_6) * F_3_4) * F_1_2); - } else if (a > 0.036) { - absAsinh = a * (1 - a2 * (F_1_3 - a2 * (F_1_5 - a2 * (F_1_7 - a2 * (F_1_9 - a2 * (F_1_11 - a2 * F_1_13 * F_11_12) * F_9_10) * F_7_8) * F_5_6) * F_3_4) * F_1_2); - } else if (a > 0.0036) { - absAsinh = a * (1 - a2 * (F_1_3 - a2 * (F_1_5 - a2 * (F_1_7 - a2 * F_1_9 * F_7_8) * F_5_6) * F_3_4) * F_1_2); - } else { - absAsinh = a * (1 - a2 * (F_1_3 - a2 * F_1_5 * F_3_4) * F_1_2); - } - } - - return negative ? -absAsinh : absAsinh; - } - - /** Compute the inverse hyperbolic tangent of a number. - * @param a number on which evaluation is done - * @return inverse hyperbolic tangent of a - */ - public static double atanh(double a) { - boolean negative = false; - if (a < 0) { - negative = true; - a = -a; - } - - double absAtanh; - if (a > 0.15) { - absAtanh = 0.5 * FastMath.log((1 + a) / (1 - a)); - } else { - final double a2 = a * a; - if (a > 0.087) { - absAtanh = a * (1 + a2 * (F_1_3 + a2 * (F_1_5 + a2 * (F_1_7 + a2 * (F_1_9 + a2 * (F_1_11 + a2 * (F_1_13 + a2 * (F_1_15 + a2 * F_1_17)))))))); - } else if (a > 0.031) { - absAtanh = a * (1 + a2 * (F_1_3 + a2 * (F_1_5 + a2 * (F_1_7 + a2 * (F_1_9 + a2 * (F_1_11 + a2 * F_1_13)))))); - } else if (a > 0.003) { - absAtanh = a * (1 + a2 * (F_1_3 + a2 * (F_1_5 + a2 * (F_1_7 + a2 * F_1_9)))); - } else { - absAtanh = a * (1 + a2 * (F_1_3 + a2 * F_1_5)); - } - } - - return negative ? -absAtanh : absAtanh; - } - - /** Compute the signum of a number. - * The signum is -1 for negative numbers, +1 for positive numbers and 0 otherwise - * @param a number on which evaluation is done - * @return -1.0, -0.0, +0.0, +1.0 or NaN depending on sign of a - */ - public static double signum(final double a) { - return (a < 0.0) ? -1.0 : ((a > 0.0) ? 1.0 : a); // return +0.0/-0.0/NaN depending on a - } - - /** Compute the signum of a number. - * The signum is -1 for negative numbers, +1 for positive numbers and 0 otherwise - * @param a number on which evaluation is done - * @return -1.0, -0.0, +0.0, +1.0 or NaN depending on sign of a - */ - public static float signum(final float a) { - return (a < 0.0f) ? -1.0f : ((a > 0.0f) ? 1.0f : a); // return +0.0/-0.0/NaN depending on a - } - - /** Compute next number towards positive infinity. - * @param a number to which neighbor should be computed - * @return neighbor of a towards positive infinity - */ - public static double nextUp(final double a) { - return nextAfter(a, Double.POSITIVE_INFINITY); - } - - /** Compute next number towards positive infinity. - * @param a number to which neighbor should be computed - * @return neighbor of a towards positive infinity - */ - public static float nextUp(final float a) { - return nextAfter(a, Float.POSITIVE_INFINITY); - } - - /** Compute next number towards negative infinity. - * @param a number to which neighbor should be computed - * @return neighbor of a towards negative infinity - * @since 3.4 - */ - public static double nextDown(final double a) { - return nextAfter(a, Double.NEGATIVE_INFINITY); - } - - /** Compute next number towards negative infinity. - * @param a number to which neighbor should be computed - * @return neighbor of a towards negative infinity - * @since 3.4 - */ - public static float nextDown(final float a) { - return nextAfter(a, Float.NEGATIVE_INFINITY); - } - - /** Returns a pseudo-random number between 0.0 and 1.0. - * <p><b>Note:</b> this implementation currently delegates to {@link Math#random} - * @return a random number between 0.0 and 1.0 - */ - public static double random() { - return Math.random(); - } - - /** - * Exponential function. - * - * Computes exp(x), function result is nearly rounded. It will be correctly - * rounded to the theoretical value for 99.9% of input values, otherwise it will - * have a 1 ULP error. - * - * Method: - * Lookup intVal = exp(int(x)) - * Lookup fracVal = exp(int(x-int(x) / 1024.0) * 1024.0 ); - * Compute z as the exponential of the remaining bits by a polynomial minus one - * exp(x) = intVal * fracVal * (1 + z) - * - * Accuracy: - * Calculation is done with 63 bits of precision, so result should be correctly - * rounded for 99.9% of input values, with less than 1 ULP error otherwise. - * - * @param x a double - * @return double e<sup>x</sup> - */ - public static double exp(double x) { - return exp(x, 0.0, null); - } - - /** - * Internal helper method for exponential function. - * @param x original argument of the exponential function - * @param extra extra bits of precision on input (To Be Confirmed) - * @param hiPrec extra bits of precision on output (To Be Confirmed) - * @return exp(x) - */ - private static double exp(double x, double extra, double[] hiPrec) { - double intPartA; - double intPartB; - int intVal = (int) x; - - /* Lookup exp(floor(x)). - * intPartA will have the upper 22 bits, intPartB will have the lower - * 52 bits. - */ - if (x < 0.0) { - - // We don't check against intVal here as conversion of large negative double values - // may be affected by a JIT bug. Subsequent comparisons can safely use intVal - if (x < -746d) { - if (hiPrec != null) { - hiPrec[0] = 0.0; - hiPrec[1] = 0.0; - } - return 0.0; - } - - if (intVal < -709) { - /* This will produce a subnormal output */ - final double result = exp(x+40.19140625, extra, hiPrec) / 285040095144011776.0; - if (hiPrec != null) { - hiPrec[0] /= 285040095144011776.0; - hiPrec[1] /= 285040095144011776.0; - } - return result; - } - - if (intVal == -709) { - /* exp(1.494140625) is nearly a machine number... */ - final double result = exp(x+1.494140625, extra, hiPrec) / 4.455505956692756620; - if (hiPrec != null) { - hiPrec[0] /= 4.455505956692756620; - hiPrec[1] /= 4.455505956692756620; - } - return result; - } - - intVal--; - - } else { - if (intVal > 709) { - if (hiPrec != null) { - hiPrec[0] = Double.POSITIVE_INFINITY; - hiPrec[1] = 0.0; - } - return Double.POSITIVE_INFINITY; - } - - } - - intPartA = ExpIntTable.EXP_INT_TABLE_A[EXP_INT_TABLE_MAX_INDEX+intVal]; - intPartB = ExpIntTable.EXP_INT_TABLE_B[EXP_INT_TABLE_MAX_INDEX+intVal]; - - /* Get the fractional part of x, find the greatest multiple of 2^-10 less than - * x and look up the exp function of it. - * fracPartA will have the upper 22 bits, fracPartB the lower 52 bits. - */ - final int intFrac = (int) ((x - intVal) * 1024.0); - final double fracPartA = ExpFracTable.EXP_FRAC_TABLE_A[intFrac]; - final double fracPartB = ExpFracTable.EXP_FRAC_TABLE_B[intFrac]; - - /* epsilon is the difference in x from the nearest multiple of 2^-10. It - * has a value in the range 0 <= epsilon < 2^-10. - * Do the subtraction from x as the last step to avoid possible loss of precision. - */ - final double epsilon = x - (intVal + intFrac / 1024.0); - - /* Compute z = exp(epsilon) - 1.0 via a minimax polynomial. z has - full double precision (52 bits). Since z < 2^-10, we will have - 62 bits of precision when combined with the constant 1. This will be - used in the last addition below to get proper rounding. */ - - /* Remez generated polynomial. Converges on the interval [0, 2^-10], error - is less than 0.5 ULP */ - double z = 0.04168701738764507; - z = z * epsilon + 0.1666666505023083; - z = z * epsilon + 0.5000000000042687; - z = z * epsilon + 1.0; - z = z * epsilon + -3.940510424527919E-20; - - /* Compute (intPartA+intPartB) * (fracPartA+fracPartB) by binomial - expansion. - tempA is exact since intPartA and intPartB only have 22 bits each. - tempB will have 52 bits of precision. - */ - double tempA = intPartA * fracPartA; - double tempB = intPartA * fracPartB + intPartB * fracPartA + intPartB * fracPartB; - - /* Compute the result. (1+z)(tempA+tempB). Order of operations is - important. For accuracy add by increasing size. tempA is exact and - much larger than the others. If there are extra bits specified from the - pow() function, use them. */ - final double tempC = tempB + tempA; - - // If tempC is positive infinite, the evaluation below could result in NaN, - // because z could be negative at the same time. - if (tempC == Double.POSITIVE_INFINITY) { - return Double.POSITIVE_INFINITY; - } - - final double result; - if (extra != 0.0) { - result = tempC*extra*z + tempC*extra + tempC*z + tempB + tempA; - } else { - result = tempC*z + tempB + tempA; - } - - if (hiPrec != null) { - // If requesting high precision - hiPrec[0] = tempA; - hiPrec[1] = tempC*extra*z + tempC*extra + tempC*z + tempB; - } - - return result; - } - - /** Compute exp(x) - 1 - * @param x number to compute shifted exponential - * @return exp(x) - 1 - */ - public static double expm1(double x) { - return expm1(x, null); - } - - /** Internal helper method for expm1 - * @param x number to compute shifted exponential - * @param hiPrecOut receive high precision result for -1.0 < x < 1.0 - * @return exp(x) - 1 - */ - private static double expm1(double x, double hiPrecOut[]) { - if (x != x || x == 0.0) { // NaN or zero - return x; - } - - if (x <= -1.0 || x >= 1.0) { - // If not between +/- 1.0 - //return exp(x) - 1.0; - double hiPrec[] = new double[2]; - exp(x, 0.0, hiPrec); - if (x > 0.0) { - return -1.0 + hiPrec[0] + hiPrec[1]; - } else { - final double ra = -1.0 + hiPrec[0]; - double rb = -(ra + 1.0 - hiPrec[0]); - rb += hiPrec[1]; - return ra + rb; - } - } - - double baseA; - double baseB; - double epsilon; - boolean negative = false; - - if (x < 0.0) { - x = -x; - negative = true; - } - - { - int intFrac = (int) (x * 1024.0); - double tempA = ExpFracTable.EXP_FRAC_TABLE_A[intFrac] - 1.0; - double tempB = ExpFracTable.EXP_FRAC_TABLE_B[intFrac]; - - double temp = tempA + tempB; - tempB = -(temp - tempA - tempB); - tempA = temp; - - temp = tempA * HEX_40000000; - baseA = tempA + temp - temp; - baseB = tempB + (tempA - baseA); - - epsilon = x - intFrac/1024.0; - } - - - /* Compute expm1(epsilon) */ - double zb = 0.008336750013465571; - zb = zb * epsilon + 0.041666663879186654; - zb = zb * epsilon + 0.16666666666745392; - zb = zb * epsilon + 0.49999999999999994; - zb *= epsilon; - zb *= epsilon; - - double za = epsilon; - double temp = za + zb; - zb = -(temp - za - zb); - za = temp; - - temp = za * HEX_40000000; - temp = za + temp - temp; - zb += za - temp; - za = temp; - - /* Combine the parts. expm1(a+b) = expm1(a) + expm1(b) + expm1(a)*expm1(b) */ - double ya = za * baseA; - //double yb = za*baseB + zb*baseA + zb*baseB; - temp = ya + za * baseB; - double yb = -(temp - ya - za * baseB); - ya = temp; - - temp = ya + zb * baseA; - yb += -(temp - ya - zb * baseA); - ya = temp; - - temp = ya + zb * baseB; - yb += -(temp - ya - zb*baseB); - ya = temp; - - //ya = ya + za + baseA; - //yb = yb + zb + baseB; - temp = ya + baseA; - yb += -(temp - baseA - ya); - ya = temp; - - temp = ya + za; - //yb += (ya > za) ? -(temp - ya - za) : -(temp - za - ya); - yb += -(temp - ya - za); - ya = temp; - - temp = ya + baseB; - //yb += (ya > baseB) ? -(temp - ya - baseB) : -(temp - baseB - ya); - yb += -(temp - ya - baseB); - ya = temp; - - temp = ya + zb; - //yb += (ya > zb) ? -(temp - ya - zb) : -(temp - zb - ya); - yb += -(temp - ya - zb); - ya = temp; - - if (negative) { - /* Compute expm1(-x) = -expm1(x) / (expm1(x) + 1) */ - double denom = 1.0 + ya; - double denomr = 1.0 / denom; - double denomb = -(denom - 1.0 - ya) + yb; - double ratio = ya * denomr; - temp = ratio * HEX_40000000; - final double ra = ratio + temp - temp; - double rb = ratio - ra; - - temp = denom * HEX_40000000; - za = denom + temp - temp; - zb = denom - za; - - rb += (ya - za * ra - za * rb - zb * ra - zb * rb) * denomr; - - // f(x) = x/1+x - // Compute f'(x) - // Product rule: d(uv) = du*v + u*dv - // Chain rule: d(f(g(x)) = f'(g(x))*f(g'(x)) - // d(1/x) = -1/(x*x) - // d(1/1+x) = -1/( (1+x)^2) * 1 = -1/((1+x)*(1+x)) - // d(x/1+x) = -x/((1+x)(1+x)) + 1/1+x = 1 / ((1+x)(1+x)) - - // Adjust for yb - rb += yb * denomr; // numerator - rb += -ya * denomb * denomr * denomr; // denominator - - // negate - ya = -ra; - yb = -rb; - } - - if (hiPrecOut != null) { - hiPrecOut[0] = ya; - hiPrecOut[1] = yb; - } - - return ya + yb; - } - - /** - * Natural logarithm. - * - * @param x a double - * @return log(x) - */ - public static double log(final double x) { - return log(x, null); - } - - /** - * Internal helper method for natural logarithm function. - * @param x original argument of the natural logarithm function - * @param hiPrec extra bits of precision on output (To Be Confirmed) - * @return log(x) - */ - private static double log(final double x, final double[] hiPrec) { - if (x==0) { // Handle special case of +0/-0 - return Double.NEGATIVE_INFINITY; - } - long bits = Double.doubleToRawLongBits(x); - - /* Handle special cases of negative input, and NaN */ - if (((bits & 0x8000000000000000L) != 0 || x != x) && x != 0.0) { - if (hiPrec != null) { - hiPrec[0] = Double.NaN; - } - - return Double.NaN; - } - - /* Handle special cases of Positive infinity. */ - if (x == Double.POSITIVE_INFINITY) { - if (hiPrec != null) { - hiPrec[0] = Double.POSITIVE_INFINITY; - } - - return Double.POSITIVE_INFINITY; - } - - /* Extract the exponent */ - int exp = (int)(bits >> 52)-1023; - - if ((bits & 0x7ff0000000000000L) == 0) { - // Subnormal! - if (x == 0) { - // Zero - if (hiPrec != null) { - hiPrec[0] = Double.NEGATIVE_INFINITY; - } - - return Double.NEGATIVE_INFINITY; - } - - /* Normalize the subnormal number. */ - bits <<= 1; - while ( (bits & 0x0010000000000000L) == 0) { - --exp; - bits <<= 1; - } - } - - - if ((exp == -1 || exp == 0) && x < 1.01 && x > 0.99 && hiPrec == null) { - /* The normal method doesn't work well in the range [0.99, 1.01], so call do a straight - polynomial expansion in higer precision. */ - - /* Compute x - 1.0 and split it */ - double xa = x - 1.0; - double xb = xa - x + 1.0; - double tmp = xa * HEX_40000000; - double aa = xa + tmp - tmp; - double ab = xa - aa; - xa = aa; - xb = ab; - - final double[] lnCoef_last = LN_QUICK_COEF[LN_QUICK_COEF.length - 1]; - double ya = lnCoef_last[0]; - double yb = lnCoef_last[1]; - - for (int i = LN_QUICK_COEF.length - 2; i >= 0; i--) { - /* Multiply a = y * x */ - aa = ya * xa; - ab = ya * xb + yb * xa + yb * xb; - /* split, so now y = a */ - tmp = aa * HEX_40000000; - ya = aa + tmp - tmp; - yb = aa - ya + ab; - - /* Add a = y + lnQuickCoef */ - final double[] lnCoef_i = LN_QUICK_COEF[i]; - aa = ya + lnCoef_i[0]; - ab = yb + lnCoef_i[1]; - /* Split y = a */ - tmp = aa * HEX_40000000; - ya = aa + tmp - tmp; - yb = aa - ya + ab; - } - - /* Multiply a = y * x */ - aa = ya * xa; - ab = ya * xb + yb * xa + yb * xb; - /* split, so now y = a */ - tmp = aa * HEX_40000000; - ya = aa + tmp - tmp; - yb = aa - ya + ab; - - return ya + yb; - } - - // lnm is a log of a number in the range of 1.0 - 2.0, so 0 <= lnm < ln(2) - final double[] lnm = lnMant.LN_MANT[(int)((bits & 0x000ffc0000000000L) >> 42)]; - - /* - double epsilon = x / Double.longBitsToDouble(bits & 0xfffffc0000000000L); - - epsilon -= 1.0; - */ - - // y is the most significant 10 bits of the mantissa - //double y = Double.longBitsToDouble(bits & 0xfffffc0000000000L); - //double epsilon = (x - y) / y; - final double epsilon = (bits & 0x3ffffffffffL) / (TWO_POWER_52 + (bits & 0x000ffc0000000000L)); - - double lnza = 0.0; - double lnzb = 0.0; - - if (hiPrec != null) { - /* split epsilon -> x */ - double tmp = epsilon * HEX_40000000; - double aa = epsilon + tmp - tmp; - double ab = epsilon - aa; - double xa = aa; - double xb = ab; - - /* Need a more accurate epsilon, so adjust the division. */ - final double numer = bits & 0x3ffffffffffL; - final double denom = TWO_POWER_52 + (bits & 0x000ffc0000000000L); - aa = numer - xa*denom - xb * denom; - xb += aa / denom; - - /* Remez polynomial evaluation */ - final double[] lnCoef_last = LN_HI_PREC_COEF[LN_HI_PREC_COEF.length-1]; - double ya = lnCoef_last[0]; - double yb = lnCoef_last[1]; - - for (int i = LN_HI_PREC_COEF.length - 2; i >= 0; i--) { - /* Multiply a = y * x */ - aa = ya * xa; - ab = ya * xb + yb * xa + yb * xb; - /* split, so now y = a */ - tmp = aa * HEX_40000000; - ya = aa + tmp - tmp; - yb = aa - ya + ab; - - /* Add a = y + lnHiPrecCoef */ - final double[] lnCoef_i = LN_HI_PREC_COEF[i]; - aa = ya + lnCoef_i[0]; - ab = yb + lnCoef_i[1]; - /* Split y = a */ - tmp = aa * HEX_40000000; - ya = aa + tmp - tmp; - yb = aa - ya + ab; - } - - /* Multiply a = y * x */ - aa = ya * xa; - ab = ya * xb + yb * xa + yb * xb; - - /* split, so now lnz = a */ - /* - tmp = aa * 1073741824.0; - lnza = aa + tmp - tmp; - lnzb = aa - lnza + ab; - */ - lnza = aa + ab; - lnzb = -(lnza - aa - ab); - } else { - /* High precision not required. Eval Remez polynomial - using standard double precision */ - lnza = -0.16624882440418567; - lnza = lnza * epsilon + 0.19999954120254515; - lnza = lnza * epsilon + -0.2499999997677497; - lnza = lnza * epsilon + 0.3333333333332802; - lnza = lnza * epsilon + -0.5; - lnza = lnza * epsilon + 1.0; - lnza *= epsilon; - } - - /* Relative sizes: - * lnzb [0, 2.33E-10] - * lnm[1] [0, 1.17E-7] - * ln2B*exp [0, 1.12E-4] - * lnza [0, 9.7E-4] - * lnm[0] [0, 0.692] - * ln2A*exp [0, 709] - */ - - /* Compute the following sum: - * lnzb + lnm[1] + ln2B*exp + lnza + lnm[0] + ln2A*exp; - */ - - //return lnzb + lnm[1] + ln2B*exp + lnza + lnm[0] + ln2A*exp; - double a = LN_2_A*exp; - double b = 0.0; - double c = a+lnm[0]; - double d = -(c-a-lnm[0]); - a = c; - b += d; - - c = a + lnza; - d = -(c - a - lnza); - a = c; - b += d; - - c = a + LN_2_B*exp; - d = -(c - a - LN_2_B*exp); - a = c; - b += d; - - c = a + lnm[1]; - d = -(c - a - lnm[1]); - a = c; - b += d; - - c = a + lnzb; - d = -(c - a - lnzb); - a = c; - b += d; - - if (hiPrec != null) { - hiPrec[0] = a; - hiPrec[1] = b; - } - - return a + b; - } - - /** - * Computes log(1 + x). - * - * @param x Number. - * @return {@code log(1 + x)}. - */ - public static double log1p(final double x) { - if (x == -1) { - return Double.NEGATIVE_INFINITY; - } - - if (x == Double.POSITIVE_INFINITY) { - return Double.POSITIVE_INFINITY; - } - - if (x > 1e-6 || - x < -1e-6) { - final double xpa = 1 + x; - final double xpb = -(xpa - 1 - x); - - final double[] hiPrec = new double[2]; - final double lores = log(xpa, hiPrec); - if (Double.isInfinite(lores)) { // Don't allow this to be converted to NaN - return lores; - } - - // Do a taylor series expansion around xpa: - // f(x+y) = f(x) + f'(x) y + f''(x)/2 y^2 - final double fx1 = xpb / xpa; - final double epsilon = 0.5 * fx1 + 1; - return epsilon * fx1 + hiPrec[1] + hiPrec[0]; - } else { - // Value is small |x| < 1e6, do a Taylor series centered on 1. - final double y = (x * F_1_3 - F_1_2) * x + 1; - return y * x; - } - } - - /** Compute the base 10 logarithm. - * @param x a number - * @return log10(x) - */ - public static double log10(final double x) { - final double hiPrec[] = new double[2]; - - final double lores = log(x, hiPrec); - if (Double.isInfinite(lores)){ // don't allow this to be converted to NaN - return lores; - } - - final double tmp = hiPrec[0] * HEX_40000000; - final double lna = hiPrec[0] + tmp - tmp; - final double lnb = hiPrec[0] - lna + hiPrec[1]; - - final double rln10a = 0.4342944622039795; - final double rln10b = 1.9699272335463627E-8; - - return rln10b * lnb + rln10b * lna + rln10a * lnb + rln10a * lna; - } - - /** - * Computes the <a href="http://mathworld.wolfram.com/Logarithm.html"> - * logarithm</a> in a given base. - * - * Returns {@code NaN} if either argument is negative. - * If {@code base} is 0 and {@code x} is positive, 0 is returned. - * If {@code base} is positive and {@code x} is 0, - * {@code Double.NEGATIVE_INFINITY} is returned. - * If both arguments are 0, the result is {@code NaN}. - * - * @param base Base of the logarithm, must be greater than 0. - * @param x Argument, must be greater than 0. - * @return the value of the logarithm, i.e. the number {@code y} such that - * <code>base<sup>y</sup> = x</code>. - * @since 1.2 (previously in {@code MathUtils}, moved as of version 3.0) - */ - public static double log(double base, double x) { - return log(x) / log(base); - } - - /** - * Power function. Compute x^y. - * - * @param x a double - * @param y a double - * @return double - */ - public static double pow(final double x, final double y) { - - if (y == 0) { - // y = -0 or y = +0 - return 1.0; - } else { - - final long yBits = Double.doubleToRawLongBits(y); - final int yRawExp = (int) ((yBits & MASK_DOUBLE_EXPONENT) >> 52); - final long yRawMantissa = yBits & MASK_DOUBLE_MANTISSA; - final long xBits = Double.doubleToRawLongBits(x); - final int xRawExp = (int) ((xBits & MASK_DOUBLE_EXPONENT) >> 52); - final long xRawMantissa = xBits & MASK_DOUBLE_MANTISSA; - - if (yRawExp > 1085) { - // y is either a very large integral value that does not fit in a long or it is a special number - - if ((yRawExp == 2047 && yRawMantissa != 0) || - (xRawExp == 2047 && xRawMantissa != 0)) { - // NaN - return Double.NaN; - } else if (xRawExp == 1023 && xRawMantissa == 0) { - // x = -1.0 or x = +1.0 - if (yRawExp == 2047) { - // y is infinite - return Double.NaN; - } else { - // y is a large even integer - return 1.0; - } - } else { - // the absolute value of x is either greater or smaller than 1.0 - - // if yRawExp == 2047 and mantissa is 0, y = -infinity or y = +infinity - // if 1085 < yRawExp < 2047, y is simply a large number, however, due to limited - // accuracy, at this magnitude it behaves just like infinity with regards to x - if ((y > 0) ^ (xRawExp < 1023)) { - // either y = +infinity (or large engouh) and abs(x) > 1.0 - // or y = -infinity (or large engouh) and abs(x) < 1.0 - return Double.POSITIVE_INFINITY; - } else { - // either y = +infinity (or large engouh) and abs(x) < 1.0 - // or y = -infinity (or large engouh) and abs(x) > 1.0 - return +0.0; - } - } - - } else { - // y is a regular non-zero number - - if (yRawExp >= 1023) { - // y may be an integral value, which should be handled specifically - final long yFullMantissa = IMPLICIT_HIGH_BIT | yRawMantissa; - if (yRawExp < 1075) { - // normal number with negative shift that may have a fractional part - final long integralMask = (-1L) << (1075 - yRawExp); - if ((yFullMantissa & integralMask) == yFullMantissa) { - // all fractional bits are 0, the number is really integral - final long l = yFullMantissa >> (1075 - yRawExp); - return FastMath.pow(x, (y < 0) ? -l : l); - } - } else { - // normal number with positive shift, always an integral value - // we know it fits in a primitive long because yRawExp > 1085 has been handled above - final long l = yFullMantissa << (yRawExp - 1075); - return FastMath.pow(x, (y < 0) ? -l : l); - } - } - - // y is a non-integral value - - if (x == 0) { - // x = -0 or x = +0 - // the integer powers have already been handled above - return y < 0 ? Double.POSITIVE_INFINITY : +0.0; - } else if (xRawExp == 2047) { - if (xRawMantissa == 0) { - // x = -infinity or x = +infinity - return (y < 0) ? +0.0 : Double.POSITIVE_INFINITY; - } else { - // NaN - return Double.NaN; - } - } else if (x < 0) { - // the integer powers have already been handled above - return Double.NaN; - } else { - - // this is the general case, for regular fractional numbers x and y - - // Split y into ya and yb such that y = ya+yb - final double tmp = y * HEX_40000000; - final double ya = (y + tmp) - tmp; - final double yb = y - ya; - - /* Compute ln(x) */ - final double lns[] = new double[2]; - final double lores = log(x, lns); - if (Double.isInfinite(lores)) { // don't allow this to be converted to NaN - return lores; - } - - double lna = lns[0]; - double lnb = lns[1]; - - /* resplit lns */ - final double tmp1 = lna * HEX_40000000; - final double tmp2 = (lna + tmp1) - tmp1; - lnb += lna - tmp2; - lna = tmp2; - - // y*ln(x) = (aa+ab) - final double aa = lna * ya; - final double ab = lna * yb + lnb * ya + lnb * yb; - - lna = aa+ab; - lnb = -(lna - aa - ab); - - double z = 1.0 / 120.0; - z = z * lnb + (1.0 / 24.0); - z = z * lnb + (1.0 / 6.0); - z = z * lnb + 0.5; - z = z * lnb + 1.0; - z *= lnb; - - final double result = exp(lna, z, null); - //result = result + result * z; - return result; - - } - } - - } - - } - - /** - * Raise a double to an int power. - * - * @param d Number to raise. - * @param e Exponent. - * @return d<sup>e</sup> - * @since 3.1 - */ - public static double pow(double d, int e) { - return pow(d, (long) e); - } - - /** - * Raise a double to a long power. - * - * @param d Number to raise. - * @param e Exponent. - * @return d<sup>e</sup> - * @since 3.6 - */ - public static double pow(double d, long e) { - if (e == 0) { - return 1.0; - } else if (e > 0) { - return new Split(d).pow(e).full; - } else { - return new Split(d).reciprocal().pow(-e).full; - } - } - - /** Class operator on double numbers split into one 26 bits number and one 27 bits number. */ - private static class Split { - - /** Split version of NaN. */ - public static final Split NAN = new Split(Double.NaN, 0); - - /** Split version of positive infinity. */ - public static final Split POSITIVE_INFINITY = new Split(Double.POSITIVE_INFINITY, 0); - - /** Split version of negative infinity. */ - public static final Split NEGATIVE_INFINITY = new Split(Double.NEGATIVE_INFINITY, 0); - - /** Full number. */ - private final double full; - - /** High order bits. */ - private final double high; - - /** Low order bits. */ - private final double low; - - /** Simple constructor. - * @param x number to split - */ - Split(final double x) { - full = x; - high = Double.longBitsToDouble(Double.doubleToRawLongBits(x) & ((-1L) << 27)); - low = x - high; - } - - /** Simple constructor. - * @param high high order bits - * @param low low order bits - */ - Split(final double high, final double low) { - this(high == 0.0 ? (low == 0.0 && Double.doubleToRawLongBits(high) == Long.MIN_VALUE /* negative zero */ ? -0.0 : low) : high + low, high, low); - } - - /** Simple constructor. - * @param full full number - * @param high high order bits - * @param low low order bits - */ - Split(final double full, final double high, final double low) { - this.full = full; - this.high = high; - this.low = low; - } - - /** Multiply the instance by another one. - * @param b other instance to multiply by - * @return product - */ - public Split multiply(final Split b) { - // beware the following expressions must NOT be simplified, they rely on floating point arithmetic properties - final Split mulBasic = new Split(full * b.full); - final double mulError = low * b.low - (((mulBasic.full - high * b.high) - low * b.high) - high * b.low); - return new Split(mulBasic.high, mulBasic.low + mulError); - } - - /** Compute the reciprocal of the instance. - * @return reciprocal of the instance - */ - public Split reciprocal() { - - final double approximateInv = 1.0 / full; - final Split splitInv = new Split(approximateInv); - - // if 1.0/d were computed perfectly, remultiplying it by d should give 1.0 - // we want to estimate the error so we can fix the low order bits of approximateInvLow - // beware the following expressions must NOT be simplified, they rely on floating point arithmetic properties - final Split product = multiply(splitInv); - final double error = (product.high - 1) + product.low; - - // better accuracy estimate of reciprocal - return Double.isNaN(error) ? splitInv : new Split(splitInv.high, splitInv.low - error / full); - - } - - /** Computes this^e. - * @param e exponent (beware, here it MUST be > 0; the only exclusion is Long.MIN_VALUE) - * @return d^e, split in high and low bits - * @since 3.6 - */ - private Split pow(final long e) { - - // prepare result - Split result = new Split(1); - - // d^(2p) - Split d2p = new Split(full, high, low); - - for (long p = e; p != 0; p >>>= 1) { - - if ((p & 0x1) != 0) { - // accurate multiplication result = result * d^(2p) using Veltkamp TwoProduct algorithm - result = result.multiply(d2p); - } - - // accurate squaring d^(2(p+1)) = d^(2p) * d^(2p) using Veltkamp TwoProduct algorithm - d2p = d2p.multiply(d2p); - - } - - if (Double.isNaN(result.full)) { - if (Double.isNaN(full)) { - return Split.NAN; - } else { - // some intermediate numbers exceeded capacity, - // and the low order bits became NaN (because infinity - infinity = NaN) - if (FastMath.abs(full) < 1) { - return new Split(FastMath.copySign(0.0, full), 0.0); - } else if (full < 0 && (e & 0x1) == 1) { - return Split.NEGATIVE_INFINITY; - } else { - return Split.POSITIVE_INFINITY; - } - } - } else { - return result; - } - - } - - } - - /** - * Computes sin(x) - x, where |x| < 1/16. - * Use a Remez polynomial approximation. - * @param x a number smaller than 1/16 - * @return sin(x) - x - */ - private static double polySine(final double x) - { - double x2 = x*x; - - double p = 2.7553817452272217E-6; - p = p * x2 + -1.9841269659586505E-4; - p = p * x2 + 0.008333333333329196; - p = p * x2 + -0.16666666666666666; - //p *= x2; - //p *= x; - p = p * x2 * x; - - return p; - } - - /** - * Computes cos(x) - 1, where |x| < 1/16. - * Use a Remez polynomial approximation. - * @param x a number smaller than 1/16 - * @return cos(x) - 1 - */ - private static double polyCosine(double x) { - double x2 = x*x; - - double p = 2.479773539153719E-5; - p = p * x2 + -0.0013888888689039883; - p = p * x2 + 0.041666666666621166; - p = p * x2 + -0.49999999999999994; - p *= x2; - - return p; - } - - /** - * Compute sine over the first quadrant (0 < x < pi/2). - * Use combination of table lookup and rational polynomial expansion. - * @param xa number from which sine is requested - * @param xb extra bits for x (may be 0.0) - * @return sin(xa + xb) - */ - private static double sinQ(double xa, double xb) { - int idx = (int) ((xa * 8.0) + 0.5); - final double epsilon = xa - EIGHTHS[idx]; //idx*0.125; - - // Table lookups - final double sintA = SINE_TABLE_A[idx]; - final double sintB = SINE_TABLE_B[idx]; - final double costA = COSINE_TABLE_A[idx]; - final double costB = COSINE_TABLE_B[idx]; - - // Polynomial eval of sin(epsilon), cos(epsilon) - double sinEpsA = epsilon; - double sinEpsB = polySine(epsilon); - final double cosEpsA = 1.0; - final double cosEpsB = polyCosine(epsilon); - - // Split epsilon xa + xb = x - final double temp = sinEpsA * HEX_40000000; - double temp2 = (sinEpsA + temp) - temp; - sinEpsB += sinEpsA - temp2; - sinEpsA = temp2; - - /* Compute sin(x) by angle addition formula */ - double result; - - /* Compute the following sum: - * - * result = sintA + costA*sinEpsA + sintA*cosEpsB + costA*sinEpsB + - * sintB + costB*sinEpsA + sintB*cosEpsB + costB*sinEpsB; - * - * Ranges of elements - * - * xxxtA 0 PI/2 - * xxxtB -1.5e-9 1.5e-9 - * sinEpsA -0.0625 0.0625 - * sinEpsB -6e-11 6e-11 - * cosEpsA 1.0 - * cosEpsB 0 -0.0625 - * - */ - - //result = sintA + costA*sinEpsA + sintA*cosEpsB + costA*sinEpsB + - // sintB + costB*sinEpsA + sintB*cosEpsB + costB*sinEpsB; - - //result = sintA + sintA*cosEpsB + sintB + sintB * cosEpsB; - //result += costA*sinEpsA + costA*sinEpsB + costB*sinEpsA + costB * sinEpsB; - double a = 0; - double b = 0; - - double t = sintA; - double c = a + t; - double d = -(c - a - t); - a = c; - b += d; - - t = costA * sinEpsA; - c = a + t; - d = -(c - a - t); - a = c; - b += d; - - b = b + sintA * cosEpsB + costA * sinEpsB; - /* - t = sintA*cosEpsB; - c = a + t; - d = -(c - a - t); - a = c; - b = b + d; - - t = costA*sinEpsB; - c = a + t; - d = -(c - a - t); - a = c; - b = b + d; - */ - - b = b + sintB + costB * sinEpsA + sintB * cosEpsB + costB * sinEpsB; - /* - t = sintB; - c = a + t; - d = -(c - a - t); - a = c; - b = b + d; - - t = costB*sinEpsA; - c = a + t; - d = -(c - a - t); - a = c; - b = b + d; - - t = sintB*cosEpsB; - c = a + t; - d = -(c - a - t); - a = c; - b = b + d; - - t = costB*sinEpsB; - c = a + t; - d = -(c - a - t); - a = c; - b = b + d; - */ - - if (xb != 0.0) { - t = ((costA + costB) * (cosEpsA + cosEpsB) - - (sintA + sintB) * (sinEpsA + sinEpsB)) * xb; // approximate cosine*xb - c = a + t; - d = -(c - a - t); - a = c; - b += d; - } - - result = a + b; - - return result; - } - - /** - * Compute cosine in the first quadrant by subtracting input from PI/2 and - * then calling sinQ. This is more accurate as the input approaches PI/2. - * @param xa number from which cosine is requested - * @param xb extra bits for x (may be 0.0) - * @return cos(xa + xb) - */ - private static double cosQ(double xa, double xb) { - final double pi2a = 1.5707963267948966; - final double pi2b = 6.123233995736766E-17; - - final double a = pi2a - xa; - double b = -(a - pi2a + xa); - b += pi2b - xb; - - return sinQ(a, b); - } - - /** - * Compute tangent (or cotangent) over the first quadrant. 0 < x < pi/2 - * Use combination of table lookup and rational polynomial expansion. - * @param xa number from which sine is requested - * @param xb extra bits for x (may be 0.0) - * @param cotanFlag if true, compute the cotangent instead of the tangent - * @return tan(xa+xb) (or cotangent, depending on cotanFlag) - */ - private static double tanQ(double xa, double xb, boolean cotanFlag) { - - int idx = (int) ((xa * 8.0) + 0.5); - final double epsilon = xa - EIGHTHS[idx]; //idx*0.125; - - // Table lookups - final double sintA = SINE_TABLE_A[idx]; - final double sintB = SINE_TABLE_B[idx]; - final double costA = COSINE_TABLE_A[idx]; - final double costB = COSINE_TABLE_B[idx]; - - // Polynomial eval of sin(epsilon), cos(epsilon) - double sinEpsA = epsilon; - double sinEpsB = polySine(epsilon); - final double cosEpsA = 1.0; - final double cosEpsB = polyCosine(epsilon); - - // Split epsilon xa + xb = x - double temp = sinEpsA * HEX_40000000; - double temp2 = (sinEpsA + temp) - temp; - sinEpsB += sinEpsA - temp2; - sinEpsA = temp2; - - /* Compute sin(x) by angle addition formula */ - - /* Compute the following sum: - * - * result = sintA + costA*sinEpsA + sintA*cosEpsB + costA*sinEpsB + - * sintB + costB*sinEpsA + sintB*cosEpsB + costB*sinEpsB; - * - * Ranges of elements - * - * xxxtA 0 PI/2 - * xxxtB -1.5e-9 1.5e-9 - * sinEpsA -0.0625 0.0625 - * sinEpsB -6e-11 6e-11 - * cosEpsA 1.0 - * cosEpsB 0 -0.0625 - * - */ - - //result = sintA + costA*sinEpsA + sintA*cosEpsB + costA*sinEpsB + - // sintB + costB*sinEpsA + sintB*cosEpsB + costB*sinEpsB; - - //result = sintA + sintA*cosEpsB + sintB + sintB * cosEpsB; - //result += costA*sinEpsA + costA*sinEpsB + costB*sinEpsA + costB * sinEpsB; - double a = 0; - double b = 0; - - // Compute sine - double t = sintA; - double c = a + t; - double d = -(c - a - t); - a = c; - b += d; - - t = costA*sinEpsA; - c = a + t; - d = -(c - a - t); - a = c; - b += d; - - b += sintA*cosEpsB + costA*sinEpsB; - b += sintB + costB*sinEpsA + sintB*cosEpsB + costB*sinEpsB; - - double sina = a + b; - double sinb = -(sina - a - b); - - // Compute cosine - - a = b = c = d = 0.0; - - t = costA*cosEpsA; - c = a + t; - d = -(c - a - t); - a = c; - b += d; - - t = -sintA*sinEpsA; - c = a + t; - d = -(c - a - t); - a = c; - b += d; - - b += costB*cosEpsA + costA*cosEpsB + costB*cosEpsB; - b -= sintB*sinEpsA + sintA*sinEpsB + sintB*sinEpsB; - - double cosa = a + b; - double cosb = -(cosa - a - b); - - if (cotanFlag) { - double tmp; - tmp = cosa; cosa = sina; sina = tmp; - tmp = cosb; cosb = sinb; sinb = tmp; - } - - - /* estimate and correct, compute 1.0/(cosa+cosb) */ - /* - double est = (sina+sinb)/(cosa+cosb); - double err = (sina - cosa*est) + (sinb - cosb*est); - est += err/(cosa+cosb); - err = (sina - cosa*est) + (sinb - cosb*est); - */ - - // f(x) = 1/x, f'(x) = -1/x^2 - - double est = sina/cosa; - - /* Split the estimate to get more accurate read on division rounding */ - temp = est * HEX_40000000; - double esta = (est + temp) - temp; - double estb = est - esta; - - temp = cosa * HEX_40000000; - double cosaa = (cosa + temp) - temp; - double cosab = cosa - cosaa; - - //double err = (sina - est*cosa)/cosa; // Correction for division rounding - double err = (sina - esta*cosaa - esta*cosab - estb*cosaa - estb*cosab)/cosa; // Correction for division rounding - err += sinb/cosa; // Change in est due to sinb - err += -sina * cosb / cosa / cosa; // Change in est due to cosb - - if (xb != 0.0) { - // tan' = 1 + tan^2 cot' = -(1 + cot^2) - // Approximate impact of xb - double xbadj = xb + est*est*xb; - if (cotanFlag) { - xbadj = -xbadj; - } - - err += xbadj; - } - - return est+err; - } - - /** Reduce the input argument using the Payne and Hanek method. - * This is good for all inputs 0.0 < x < inf - * Output is remainder after dividing by PI/2 - * The result array should contain 3 numbers. - * result[0] is the integer portion, so mod 4 this gives the quadrant. - * result[1] is the upper bits of the remainder - * result[2] is the lower bits of the remainder - * - * @param x number to reduce - * @param result placeholder where to put the result - */ - private static void reducePayneHanek(double x, double result[]) - { - /* Convert input double to bits */ - long inbits = Double.doubleToRawLongBits(x); - int exponent = (int) ((inbits >> 52) & 0x7ff) - 1023; - - /* Convert to fixed point representation */ - inbits &= 0x000fffffffffffffL; - inbits |= 0x0010000000000000L; - - /* Normalize input to be between 0.5 and 1.0 */ - exponent++; - inbits <<= 11; - - /* Based on the exponent, get a shifted copy of recip2pi */ - long shpi0; - long shpiA; - long shpiB; - int idx = exponent >> 6; - int shift = exponent - (idx << 6); - - if (shift != 0) { - shpi0 = (idx == 0) ? 0 : (RECIP_2PI[idx-1] << shift); - shpi0 |= RECIP_2PI[idx] >>> (64-shift); - shpiA = (RECIP_2PI[idx] << shift) | (RECIP_2PI[idx+1] >>> (64-shift)); - shpiB = (RECIP_2PI[idx+1] << shift) | (RECIP_2PI[idx+2] >>> (64-shift)); - } else { - shpi0 = (idx == 0) ? 0 : RECIP_2PI[idx-1]; - shpiA = RECIP_2PI[idx]; - shpiB = RECIP_2PI[idx+1]; - } - - /* Multiply input by shpiA */ - long a = inbits >>> 32; - long b = inbits & 0xffffffffL; - - long c = shpiA >>> 32; - long d = shpiA & 0xffffffffL; - - long ac = a * c; - long bd = b * d; - long bc = b * c; - long ad = a * d; - - long prodB = bd + (ad << 32); - long prodA = ac + (ad >>> 32); - - boolean bita = (bd & 0x8000000000000000L) != 0; - boolean bitb = (ad & 0x80000000L ) != 0; - boolean bitsum = (prodB & 0x8000000000000000L) != 0; - - /* Carry */ - if ( (bita && bitb) || - ((bita || bitb) && !bitsum) ) { - prodA++; - } - - bita = (prodB & 0x8000000000000000L) != 0; - bitb = (bc & 0x80000000L ) != 0; - - prodB += bc << 32; - prodA += bc >>> 32; - - bitsum = (prodB & 0x8000000000000000L) != 0; - - /* Carry */ - if ( (bita && bitb) || - ((bita || bitb) && !bitsum) ) { - prodA++; - } - - /* Multiply input by shpiB */ - c = shpiB >>> 32; - d = shpiB & 0xffffffffL; - ac = a * c; - bc = b * c; - ad = a * d; - - /* Collect terms */ - ac += (bc + ad) >>> 32; - - bita = (prodB & 0x8000000000000000L) != 0; - bitb = (ac & 0x8000000000000000L ) != 0; - prodB += ac; - bitsum = (prodB & 0x8000000000000000L) != 0; - /* Carry */ - if ( (bita && bitb) || - ((bita || bitb) && !bitsum) ) { - prodA++; - } - - /* Multiply by shpi0 */ - c = shpi0 >>> 32; - d = shpi0 & 0xffffffffL; - - bd = b * d; - bc = b * c; - ad = a * d; - - prodA += bd + ((bc + ad) << 32); - - /* - * prodA, prodB now contain the remainder as a fraction of PI. We want this as a fraction of - * PI/2, so use the following steps: - * 1.) multiply by 4. - * 2.) do a fixed point muliply by PI/4. - * 3.) Convert to floating point. - * 4.) Multiply by 2 - */ - - /* This identifies the quadrant */ - int intPart = (int)(prodA >>> 62); - - /* Multiply by 4 */ - prodA <<= 2; - prodA |= prodB >>> 62; - prodB <<= 2; - - /* Multiply by PI/4 */ - a = prodA >>> 32; - b = prodA & 0xffffffffL; - - c = PI_O_4_BITS[0] >>> 32; - d = PI_O_4_BITS[0] & 0xffffffffL; - - ac = a * c; - bd = b * d; - bc = b * c; - ad = a * d; - - long prod2B = bd + (ad << 32); - long prod2A = ac + (ad >>> 32); - - bita = (bd & 0x8000000000000000L) != 0; - bitb = (ad & 0x80000000L ) != 0; - bitsum = (prod2B & 0x8000000000000000L) != 0; - - /* Carry */ - if ( (bita && bitb) || - ((bita || bitb) && !bitsum) ) { - prod2A++; - } - - bita = (prod2B & 0x8000000000000000L) != 0; - bitb = (bc & 0x80000000L ) != 0; - - prod2B += bc << 32; - prod2A += bc >>> 32; - - bitsum = (prod2B & 0x8000000000000000L) != 0; - - /* Carry */ - if ( (bita && bitb) || - ((bita || bitb) && !bitsum) ) { - prod2A++; - } - - /* Multiply input by pio4bits[1] */ - c = PI_O_4_BITS[1] >>> 32; - d = PI_O_4_BITS[1] & 0xffffffffL; - ac = a * c; - bc = b * c; - ad = a * d; - - /* Collect terms */ - ac += (bc + ad) >>> 32; - - bita = (prod2B & 0x8000000000000000L) != 0; - bitb = (ac & 0x8000000000000000L ) != 0; - prod2B += ac; - bitsum = (prod2B & 0x8000000000000000L) != 0; - /* Carry */ - if ( (bita && bitb) || - ((bita || bitb) && !bitsum) ) { - prod2A++; - } - - /* Multiply inputB by pio4bits[0] */ - a = prodB >>> 32; - b = prodB & 0xffffffffL; - c = PI_O_4_BITS[0] >>> 32; - d = PI_O_4_BITS[0] & 0xffffffffL; - ac = a * c; - bc = b * c; - ad = a * d; - - /* Collect terms */ - ac += (bc + ad) >>> 32; - - bita = (prod2B & 0x8000000000000000L) != 0; - bitb = (ac & 0x8000000000000000L ) != 0; - prod2B += ac; - bitsum = (prod2B & 0x8000000000000000L) != 0; - /* Carry */ - if ( (bita && bitb) || - ((bita || bitb) && !bitsum) ) { - prod2A++; - } - - /* Convert to double */ - double tmpA = (prod2A >>> 12) / TWO_POWER_52; // High order 52 bits - double tmpB = (((prod2A & 0xfffL) << 40) + (prod2B >>> 24)) / TWO_POWER_52 / TWO_POWER_52; // Low bits - - double sumA = tmpA + tmpB; - double sumB = -(sumA - tmpA - tmpB); - - /* Multiply by PI/2 and return */ - result[0] = intPart; - result[1] = sumA * 2.0; - result[2] = sumB * 2.0; - } - - /** - * Sine function. - * - * @param x Argument. - * @return sin(x) - */ - public static double sin(double x) { - boolean negative = false; - int quadrant = 0; - double xa; - double xb = 0.0; - - /* Take absolute value of the input */ - xa = x; - if (x < 0) { - negative = true; - xa = -xa; - } - - /* Check for zero and negative zero */ - if (xa == 0.0) { - long bits = Double.doubleToRawLongBits(x); - if (bits < 0) { - return -0.0; - } - return 0.0; - } - - if (xa != xa || xa == Double.POSITIVE_INFINITY) { - return Double.NaN; - } - - /* Perform any argument reduction */ - if (xa > 3294198.0) { - // PI * (2**20) - // Argument too big for CodyWaite reduction. Must use - // PayneHanek. - double reduceResults[] = new double[3]; - reducePayneHanek(xa, reduceResults); - quadrant = ((int) reduceResults[0]) & 3; - xa = reduceResults[1]; - xb = reduceResults[2]; - } else if (xa > 1.5707963267948966) { - final CodyWaite cw = new CodyWaite(xa); - quadrant = cw.getK() & 3; - xa = cw.getRemA(); - xb = cw.getRemB(); - } - - if (negative) { - quadrant ^= 2; // Flip bit 1 - } - - switch (quadrant) { - case 0: - return sinQ(xa, xb); - case 1: - return cosQ(xa, xb); - case 2: - return -sinQ(xa, xb); - case 3: - return -cosQ(xa, xb); - default: - return Double.NaN; - } - } - - /** - * Cosine function. - * - * @param x Argument. - * @return cos(x) - */ - public static double cos(double x) { - int quadrant = 0; - - /* Take absolute value of the input */ - double xa = x; - if (x < 0) { - xa = -xa; - } - - if (xa != xa || xa == Double.POSITIVE_INFINITY) { - return Double.NaN; - } - - /* Perform any argument reduction */ - double xb = 0; - if (xa > 3294198.0) { - // PI * (2**20) - // Argument too big for CodyWaite reduction. Must use - // PayneHanek. - double reduceResults[] = new double[3]; - reducePayneHanek(xa, reduceResults); - quadrant = ((int) reduceResults[0]) & 3; - xa = reduceResults[1]; - xb = reduceResults[2]; - } else if (xa > 1.5707963267948966) { - final CodyWaite cw = new CodyWaite(xa); - quadrant = cw.getK() & 3; - xa = cw.getRemA(); - xb = cw.getRemB(); - } - - //if (negative) - // quadrant = (quadrant + 2) % 4; - - switch (quadrant) { - case 0: - return cosQ(xa, xb); - case 1: - return -sinQ(xa, xb); - case 2: - return -cosQ(xa, xb); - case 3: - return sinQ(xa, xb); - default: - return Double.NaN; - } - } - - /** - * Tangent function. - * - * @param x Argument. - * @return tan(x) - */ - public static double tan(double x) { - boolean negative = false; - int quadrant = 0; - - /* Take absolute value of the input */ - double xa = x; - if (x < 0) { - negative = true; - xa = -xa; - } - - /* Check for zero and negative zero */ - if (xa == 0.0) { - long bits = Double.doubleToRawLongBits(x); - if (bits < 0) { - return -0.0; - } - return 0.0; - } - - if (xa != xa || xa == Double.POSITIVE_INFINITY) { - return Double.NaN; - } - - /* Perform any argument reduction */ - double xb = 0; - if (xa > 3294198.0) { - // PI * (2**20) - // Argument too big for CodyWaite reduction. Must use - // PayneHanek. - double reduceResults[] = new double[3]; - reducePayneHanek(xa, reduceResults); - quadrant = ((int) reduceResults[0]) & 3; - xa = reduceResults[1]; - xb = reduceResults[2]; - } else if (xa > 1.5707963267948966) { - final CodyWaite cw = new CodyWaite(xa); - quadrant = cw.getK() & 3; - xa = cw.getRemA(); - xb = cw.getRemB(); - } - - if (xa > 1.5) { - // Accuracy suffers between 1.5 and PI/2 - final double pi2a = 1.5707963267948966; - final double pi2b = 6.123233995736766E-17; - - final double a = pi2a - xa; - double b = -(a - pi2a + xa); - b += pi2b - xb; - - xa = a + b; - xb = -(xa - a - b); - quadrant ^= 1; - negative ^= true; - } - - double result; - if ((quadrant & 1) == 0) { - result = tanQ(xa, xb, false); - } else { - result = -tanQ(xa, xb, true); - } - - if (negative) { - result = -result; - } - - return result; - } - - /** - * Arctangent function - * @param x a number - * @return atan(x) - */ - public static double atan(double x) { - return atan(x, 0.0, false); - } - - /** Internal helper function to compute arctangent. - * @param xa number from which arctangent is requested - * @param xb extra bits for x (may be 0.0) - * @param leftPlane if true, result angle must be put in the left half plane - * @return atan(xa + xb) (or angle shifted by {@code PI} if leftPlane is true) - */ - private static double atan(double xa, double xb, boolean leftPlane) { - if (xa == 0.0) { // Matches +/- 0.0; return correct sign - return leftPlane ? copySign(Math.PI, xa) : xa; - } - - final boolean negate; - if (xa < 0) { - // negative - xa = -xa; - xb = -xb; - negate = true; - } else { - negate = false; - } - - if (xa > 1.633123935319537E16) { // Very large input - return (negate ^ leftPlane) ? (-Math.PI * F_1_2) : (Math.PI * F_1_2); - } - - /* Estimate the closest tabulated arctan value, compute eps = xa-tangentTable */ - final int idx; - if (xa < 1) { - idx = (int) (((-1.7168146928204136 * xa * xa + 8.0) * xa) + 0.5); - } else { - final double oneOverXa = 1 / xa; - idx = (int) (-((-1.7168146928204136 * oneOverXa * oneOverXa + 8.0) * oneOverXa) + 13.07); - } - - final double ttA = TANGENT_TABLE_A[idx]; - final double ttB = TANGENT_TABLE_B[idx]; - - double epsA = xa - ttA; - double epsB = -(epsA - xa + ttA); - epsB += xb - ttB; - - double temp = epsA + epsB; - epsB = -(temp - epsA - epsB); - epsA = temp; - - /* Compute eps = eps / (1.0 + xa*tangent) */ - temp = xa * HEX_40000000; - double ya = xa + temp - temp; - double yb = xb + xa - ya; - xa = ya; - xb += yb; - - //if (idx > 8 || idx == 0) - if (idx == 0) { - /* If the slope of the arctan is gentle enough (< 0.45), this approximation will suffice */ - //double denom = 1.0 / (1.0 + xa*tangentTableA[idx] + xb*tangentTableA[idx] + xa*tangentTableB[idx] + xb*tangentTableB[idx]); - final double denom = 1d / (1d + (xa + xb) * (ttA + ttB)); - //double denom = 1.0 / (1.0 + xa*tangentTableA[idx]); - ya = epsA * denom; - yb = epsB * denom; - } else { - double temp2 = xa * ttA; - double za = 1d + temp2; - double zb = -(za - 1d - temp2); - temp2 = xb * ttA + xa * ttB; - temp = za + temp2; - zb += -(temp - za - temp2); - za = temp; - - zb += xb * ttB; - ya = epsA / za; - - temp = ya * HEX_40000000; - final double yaa = (ya + temp) - temp; - final double yab = ya - yaa; - - temp = za * HEX_40000000; - final double zaa = (za + temp) - temp; - final double zab = za - zaa; - - /* Correct for rounding in division */ - yb = (epsA - yaa * zaa - yaa * zab - yab * zaa - yab * zab) / za; - - yb += -epsA * zb / za / za; - yb += epsB / za; - } - - - epsA = ya; - epsB = yb; - - /* Evaluate polynomial */ - final double epsA2 = epsA * epsA; - - /* - yb = -0.09001346640161823; - yb = yb * epsA2 + 0.11110718400605211; - yb = yb * epsA2 + -0.1428571349122913; - yb = yb * epsA2 + 0.19999999999273194; - yb = yb * epsA2 + -0.33333333333333093; - yb = yb * epsA2 * epsA; - */ - - yb = 0.07490822288864472; - yb = yb * epsA2 - 0.09088450866185192; - yb = yb * epsA2 + 0.11111095942313305; - yb = yb * epsA2 - 0.1428571423679182; - yb = yb * epsA2 + 0.19999999999923582; - yb = yb * epsA2 - 0.33333333333333287; - yb = yb * epsA2 * epsA; - - - ya = epsA; - - temp = ya + yb; - yb = -(temp - ya - yb); - ya = temp; - - /* Add in effect of epsB. atan'(x) = 1/(1+x^2) */ - yb += epsB / (1d + epsA * epsA); - - final double eighths = EIGHTHS[idx]; - - //result = yb + eighths[idx] + ya; - double za = eighths + ya; - double zb = -(za - eighths - ya); - temp = za + yb; - zb += -(temp - za - yb); - za = temp; - - double result = za + zb; - - if (leftPlane) { - // Result is in the left plane - final double resultb = -(result - za - zb); - final double pia = 1.5707963267948966 * 2; - final double pib = 6.123233995736766E-17 * 2; - - za = pia - result; - zb = -(za - pia + result); - zb += pib - resultb; - - result = za + zb; - } - - - if (negate ^ leftPlane) { - result = -result; - } - - return result; - } - - /** - * Two arguments arctangent function - * @param y ordinate - * @param x abscissa - * @return phase angle of point (x,y) between {@code -PI} and {@code PI} - */ - public static double atan2(double y, double x) { - if (x != x || y != y) { - return Double.NaN; - } - - if (y == 0) { - final double result = x * y; - final double invx = 1d / x; - final double invy = 1d / y; - - if (invx == 0) { // X is infinite - if (x > 0) { - return y; // return +/- 0.0 - } else { - return copySign(Math.PI, y); - } - } - - if (x < 0 || invx < 0) { - if (y < 0 || invy < 0) { - return -Math.PI; - } else { - return Math.PI; - } - } else { - return result; - } - } - - // y cannot now be zero - - if (y == Double.POSITIVE_INFINITY) { - if (x == Double.POSITIVE_INFINITY) { - return Math.PI * F_1_4; - } - - if (x == Double.NEGATIVE_INFINITY) { - return Math.PI * F_3_4; - } - - return Math.PI * F_1_2; - } - - if (y == Double.NEGATIVE_INFINITY) { - if (x == Double.POSITIVE_INFINITY) { - return -Math.PI * F_1_4; - } - - if (x == Double.NEGATIVE_INFINITY) { - return -Math.PI * F_3_4; - } - - return -Math.PI * F_1_2; - } - - if (x == Double.POSITIVE_INFINITY) { - if (y > 0 || 1 / y > 0) { - return 0d; - } - - if (y < 0 || 1 / y < 0) { - return -0d; - } - } - - if (x == Double.NEGATIVE_INFINITY) - { - if (y > 0.0 || 1 / y > 0.0) { - return Math.PI; - } - - if (y < 0 || 1 / y < 0) { - return -Math.PI; - } - } - - // Neither y nor x can be infinite or NAN here - - if (x == 0) { - if (y > 0 || 1 / y > 0) { - return Math.PI * F_1_2; - } - - if (y < 0 || 1 / y < 0) { - return -Math.PI * F_1_2; - } - } - - // Compute ratio r = y/x - final double r = y / x; - if (Double.isInfinite(r)) { // bypass calculations that can create NaN - return atan(r, 0, x < 0); - } - - double ra = doubleHighPart(r); - double rb = r - ra; - - // Split x - final double xa = doubleHighPart(x); - final double xb = x - xa; - - rb += (y - ra * xa - ra * xb - rb * xa - rb * xb) / x; - - final double temp = ra + rb; - rb = -(temp - ra - rb); - ra = temp; - - if (ra == 0) { // Fix up the sign so atan works correctly - ra = copySign(0d, y); - } - - // Call atan - final double result = atan(ra, rb, x < 0); - - return result; - } - - /** Compute the arc sine of a number. - * @param x number on which evaluation is done - * @return arc sine of x - */ - public static double asin(double x) { - if (x != x) { - return Double.NaN; - } - - if (x > 1.0 || x < -1.0) { - return Double.NaN; - } - - if (x == 1.0) { - return Math.PI/2.0; - } - - if (x == -1.0) { - return -Math.PI/2.0; - } - - if (x == 0.0) { // Matches +/- 0.0; return correct sign - return x; - } - - /* Compute asin(x) = atan(x/sqrt(1-x*x)) */ - - /* Split x */ - double temp = x * HEX_40000000; - final double xa = x + temp - temp; - final double xb = x - xa; - - /* Square it */ - double ya = xa*xa; - double yb = xa*xb*2.0 + xb*xb; - - /* Subtract from 1 */ - ya = -ya; - yb = -yb; - - double za = 1.0 + ya; - double zb = -(za - 1.0 - ya); - - temp = za + yb; - zb += -(temp - za - yb); - za = temp; - - /* Square root */ - double y; - y = sqrt(za); - temp = y * HEX_40000000; - ya = y + temp - temp; - yb = y - ya; - - /* Extend precision of sqrt */ - yb += (za - ya*ya - 2*ya*yb - yb*yb) / (2.0*y); - - /* Contribution of zb to sqrt */ - double dx = zb / (2.0*y); - - // Compute ratio r = x/y - double r = x/y; - temp = r * HEX_40000000; - double ra = r + temp - temp; - double rb = r - ra; - - rb += (x - ra*ya - ra*yb - rb*ya - rb*yb) / y; // Correct for rounding in division - rb += -x * dx / y / y; // Add in effect additional bits of sqrt. - - temp = ra + rb; - rb = -(temp - ra - rb); - ra = temp; - - return atan(ra, rb, false); - } - - /** Compute the arc cosine of a number. - * @param x number on which evaluation is done - * @return arc cosine of x - */ - public static double acos(double x) { - if (x != x) { - return Double.NaN; - } - - if (x > 1.0 || x < -1.0) { - return Double.NaN; - } - - if (x == -1.0) { - return Math.PI; - } - - if (x == 1.0) { - return 0.0; - } - - if (x == 0) { - return Math.PI/2.0; - } - - /* Compute acos(x) = atan(sqrt(1-x*x)/x) */ - - /* Split x */ - double temp = x * HEX_40000000; - final double xa = x + temp - temp; - final double xb = x - xa; - - /* Square it */ - double ya = xa*xa; - double yb = xa*xb*2.0 + xb*xb; - - /* Subtract from 1 */ - ya = -ya; - yb = -yb; - - double za = 1.0 + ya; - double zb = -(za - 1.0 - ya); - - temp = za + yb; - zb += -(temp - za - yb); - za = temp; - - /* Square root */ - double y = sqrt(za); - temp = y * HEX_40000000; - ya = y + temp - temp; - yb = y - ya; - - /* Extend precision of sqrt */ - yb += (za - ya*ya - 2*ya*yb - yb*yb) / (2.0*y); - - /* Contribution of zb to sqrt */ - yb += zb / (2.0*y); - y = ya+yb; - yb = -(y - ya - yb); - - // Compute ratio r = y/x - double r = y/x; - - // Did r overflow? - if (Double.isInfinite(r)) { // x is effectively zero - return Math.PI/2; // so return the appropriate value - } - - double ra = doubleHighPart(r); - double rb = r - ra; - - rb += (y - ra*xa - ra*xb - rb*xa - rb*xb) / x; // Correct for rounding in division - rb += yb / x; // Add in effect additional bits of sqrt. - - temp = ra + rb; - rb = -(temp - ra - rb); - ra = temp; - - return atan(ra, rb, x<0); - } - - /** Compute the cubic root of a number. - * @param x number on which evaluation is done - * @return cubic root of x - */ - public static double cbrt(double x) { - /* Convert input double to bits */ - long inbits = Double.doubleToRawLongBits(x); - int exponent = (int) ((inbits >> 52) & 0x7ff) - 1023; - boolean subnormal = false; - - if (exponent == -1023) { - if (x == 0) { - return x; - } - - /* Subnormal, so normalize */ - subnormal = true; - x *= 1.8014398509481984E16; // 2^54 - inbits = Double.doubleToRawLongBits(x); - exponent = (int) ((inbits >> 52) & 0x7ff) - 1023; - } - - if (exponent == 1024) { - // Nan or infinity. Don't care which. - return x; - } - - /* Divide the exponent by 3 */ - int exp3 = exponent / 3; - - /* p2 will be the nearest power of 2 to x with its exponent divided by 3 */ - double p2 = Double.longBitsToDouble((inbits & 0x8000000000000000L) | - (long)(((exp3 + 1023) & 0x7ff)) << 52); - - /* This will be a number between 1 and 2 */ - final double mant = Double.longBitsToDouble((inbits & 0x000fffffffffffffL) | 0x3ff0000000000000L); - - /* Estimate the cube root of mant by polynomial */ - double est = -0.010714690733195933; - est = est * mant + 0.0875862700108075; - est = est * mant + -0.3058015757857271; - est = est * mant + 0.7249995199969751; - est = est * mant + 0.5039018405998233; - - est *= CBRTTWO[exponent % 3 + 2]; - - // est should now be good to about 15 bits of precision. Do 2 rounds of - // Newton's method to get closer, this should get us full double precision - // Scale down x for the purpose of doing newtons method. This avoids over/under flows. - final double xs = x / (p2*p2*p2); - est += (xs - est*est*est) / (3*est*est); - est += (xs - est*est*est) / (3*est*est); - - // Do one round of Newton's method in extended precision to get the last bit right. - double temp = est * HEX_40000000; - double ya = est + temp - temp; - double yb = est - ya; - - double za = ya * ya; - double zb = ya * yb * 2.0 + yb * yb; - temp = za * HEX_40000000; - double temp2 = za + temp - temp; - zb += za - temp2; - za = temp2; - - zb = za * yb + ya * zb + zb * yb; - za *= ya; - - double na = xs - za; - double nb = -(na - xs + za); - nb -= zb; - - est += (na+nb)/(3*est*est); - - /* Scale by a power of two, so this is exact. */ - est *= p2; - - if (subnormal) { - est *= 3.814697265625E-6; // 2^-18 - } - - return est; - } - - /** - * Convert degrees to radians, with error of less than 0.5 ULP - * @param x angle in degrees - * @return x converted into radians - */ - public static double toRadians(double x) - { - if (Double.isInfinite(x) || x == 0.0) { // Matches +/- 0.0; return correct sign - return x; - } - - // These are PI/180 split into high and low order bits - final double facta = 0.01745329052209854; - final double factb = 1.997844754509471E-9; - - double xa = doubleHighPart(x); - double xb = x - xa; - - double result = xb * factb + xb * facta + xa * factb + xa * facta; - if (result == 0) { - result *= x; // ensure correct sign if calculation underflows - } - return result; - } - - /** - * Convert radians to degrees, with error of less than 0.5 ULP - * @param x angle in radians - * @return x converted into degrees - */ - public static double toDegrees(double x) - { - if (Double.isInfinite(x) || x == 0.0) { // Matches +/- 0.0; return correct sign - return x; - } - - // These are 180/PI split into high and low order bits - final double facta = 57.2957763671875; - final double factb = 3.145894820876798E-6; - - double xa = doubleHighPart(x); - double xb = x - xa; - - return xb * factb + xb * facta + xa * factb + xa * facta; - } - - /** - * Absolute value. - * @param x number from which absolute value is requested - * @return abs(x) - */ - public static int abs(final int x) { - final int i = x >>> 31; - return (x ^ (~i + 1)) + i; - } - - /** - * Absolute value. - * @param x number from which absolute value is requested - * @return abs(x) - */ - public static long abs(final long x) { - final long l = x >>> 63; - // l is one if x negative zero else - // ~l+1 is zero if x is positive, -1 if x is negative - // x^(~l+1) is x is x is positive, ~x if x is negative - // add around - return (x ^ (~l + 1)) + l; - } - - /** - * Absolute value. - * @param x number from which absolute value is requested - * @return abs(x) - */ - public static float abs(final float x) { - return Float.intBitsToFloat(MASK_NON_SIGN_INT & Float.floatToRawIntBits(x)); - } - - /** - * Absolute value. - * @param x number from which absolute value is requested - * @return abs(x) - */ - public static double abs(double x) { - return Double.longBitsToDouble(MASK_NON_SIGN_LONG & Double.doubleToRawLongBits(x)); - } - - /** - * Compute least significant bit (Unit in Last Position) for a number. - * @param x number from which ulp is requested - * @return ulp(x) - */ - public static double ulp(double x) { - if (Double.isInfinite(x)) { - return Double.POSITIVE_INFINITY; - } - return abs(x - Double.longBitsToDouble(Double.doubleToRawLongBits(x) ^ 1)); - } - - /** - * Compute least significant bit (Unit in Last Position) for a number. - * @param x number from which ulp is requested - * @return ulp(x) - */ - public static float ulp(float x) { - if (Float.isInfinite(x)) { - return Float.POSITIVE_INFINITY; - } - return abs(x - Float.intBitsToFloat(Float.floatToIntBits(x) ^ 1)); - } - - /** - * Multiply a double number by a power of 2. - * @param d number to multiply - * @param n power of 2 - * @return d × 2<sup>n</sup> - */ - public static double scalb(final double d, final int n) { - - // first simple and fast handling when 2^n can be represented using normal numbers - if ((n > -1023) && (n < 1024)) { - return d * Double.longBitsToDouble(((long) (n + 1023)) << 52); - } - - // handle special cases - if (Double.isNaN(d) || Double.isInfinite(d) || (d == 0)) { - return d; - } - if (n < -2098) { - return (d > 0) ? 0.0 : -0.0; - } - if (n > 2097) { - return (d > 0) ? Double.POSITIVE_INFINITY : Double.NEGATIVE_INFINITY; - } - - // decompose d - final long bits = Double.doubleToRawLongBits(d); - final long sign = bits & 0x8000000000000000L; - int exponent = ((int) (bits >>> 52)) & 0x7ff; - long mantissa = bits & 0x000fffffffffffffL; - - // compute scaled exponent - int scaledExponent = exponent + n; - - if (n < 0) { - // we are really in the case n <= -1023 - if (scaledExponent > 0) { - // both the input and the result are normal numbers, we only adjust the exponent - return Double.longBitsToDouble(sign | (((long) scaledExponent) << 52) | mantissa); - } else if (scaledExponent > -53) { - // the input is a normal number and the result is a subnormal number - - // recover the hidden mantissa bit - mantissa |= 1L << 52; - - // scales down complete mantissa, hence losing least significant bits - final long mostSignificantLostBit = mantissa & (1L << (-scaledExponent)); - mantissa >>>= 1 - scaledExponent; - if (mostSignificantLostBit != 0) { - // we need to add 1 bit to round up the result - mantissa++; - } - return Double.longBitsToDouble(sign | mantissa); - - } else { - // no need to compute the mantissa, the number scales down to 0 - return (sign == 0L) ? 0.0 : -0.0; - } - } else { - // we are really in the case n >= 1024 - if (exponent == 0) { - - // the input number is subnormal, normalize it - while ((mantissa >>> 52) != 1) { - mantissa <<= 1; - --scaledExponent; - } - ++scaledExponent; - mantissa &= 0x000fffffffffffffL; - - if (scaledExponent < 2047) { - return Double.longBitsToDouble(sign | (((long) scaledExponent) << 52) | mantissa); - } else { - return (sign == 0L) ? Double.POSITIVE_INFINITY : Double.NEGATIVE_INFINITY; - } - - } else if (scaledExponent < 2047) { - return Double.longBitsToDouble(sign | (((long) scaledExponent) << 52) | mantissa); - } else { - return (sign == 0L) ? Double.POSITIVE_INFINITY : Double.NEGATIVE_INFINITY; - } - } - - } - - /** - * Multiply a float number by a power of 2. - * @param f number to multiply - * @param n power of 2 - * @return f × 2<sup>n</sup> - */ - public static float scalb(final float f, final int n) { - - // first simple and fast handling when 2^n can be represented using normal numbers - if ((n > -127) && (n < 128)) { - return f * Float.intBitsToFloat((n + 127) << 23); - } - - // handle special cases - if (Float.isNaN(f) || Float.isInfinite(f) || (f == 0f)) { - return f; - } - if (n < -277) { - return (f > 0) ? 0.0f : -0.0f; - } - if (n > 276) { - return (f > 0) ? Float.POSITIVE_INFINITY : Float.NEGATIVE_INFINITY; - } - - // decompose f - final int bits = Float.floatToIntBits(f); - final int sign = bits & 0x80000000; - int exponent = (bits >>> 23) & 0xff; - int mantissa = bits & 0x007fffff; - - // compute scaled exponent - int scaledExponent = exponent + n; - - if (n < 0) { - // we are really in the case n <= -127 - if (scaledExponent > 0) { - // both the input and the result are normal numbers, we only adjust the exponent - return Float.intBitsToFloat(sign | (scaledExponent << 23) | mantissa); - } else if (scaledExponent > -24) { - // the input is a normal number and the result is a subnormal number - - // recover the hidden mantissa bit - mantissa |= 1 << 23; - - // scales down complete mantissa, hence losing least significant bits - final int mostSignificantLostBit = mantissa & (1 << (-scaledExponent)); - mantissa >>>= 1 - scaledExponent; - if (mostSignificantLostBit != 0) { - // we need to add 1 bit to round up the result - mantissa++; - } - return Float.intBitsToFloat(sign | mantissa); - - } else { - // no need to compute the mantissa, the number scales down to 0 - return (sign == 0) ? 0.0f : -0.0f; - } - } else { - // we are really in the case n >= 128 - if (exponent == 0) { - - // the input number is subnormal, normalize it - while ((mantissa >>> 23) != 1) { - mantissa <<= 1; - --scaledExponent; - } - ++scaledExponent; - mantissa &= 0x007fffff; - - if (scaledExponent < 255) { - return Float.intBitsToFloat(sign | (scaledExponent << 23) | mantissa); - } else { - return (sign == 0) ? Float.POSITIVE_INFINITY : Float.NEGATIVE_INFINITY; - } - - } else if (scaledExponent < 255) { - return Float.intBitsToFloat(sign | (scaledExponent << 23) | mantissa); - } else { - return (sign == 0) ? Float.POSITIVE_INFINITY : Float.NEGATIVE_INFINITY; - } - } - - } - - /** - * Get the next machine representable number after a number, moving - * in the direction of another number. - * <p> - * The ordering is as follows (increasing): - * <ul> - * <li>-INFINITY</li> - * <li>-MAX_VALUE</li> - * <li>-MIN_VALUE</li> - * <li>-0.0</li> - * <li>+0.0</li> - * <li>+MIN_VALUE</li> - * <li>+MAX_VALUE</li> - * <li>+INFINITY</li> - * <li></li> - * <p> - * If arguments compare equal, then the second argument is returned. - * <p> - * If {@code direction} is greater than {@code d}, - * the smallest machine representable number strictly greater than - * {@code d} is returned; if less, then the largest representable number - * strictly less than {@code d} is returned.</p> - * <p> - * If {@code d} is infinite and direction does not - * bring it back to finite numbers, it is returned unchanged.</p> - * - * @param d base number - * @param direction (the only important thing is whether - * {@code direction} is greater or smaller than {@code d}) - * @return the next machine representable number in the specified direction - */ - public static double nextAfter(double d, double direction) { - - // handling of some important special cases - if (Double.isNaN(d) || Double.isNaN(direction)) { - return Double.NaN; - } else if (d == direction) { - return direction; - } else if (Double.isInfinite(d)) { - return (d < 0) ? -Double.MAX_VALUE : Double.MAX_VALUE; - } else if (d == 0) { - return (direction < 0) ? -Double.MIN_VALUE : Double.MIN_VALUE; - } - // special cases MAX_VALUE to infinity and MIN_VALUE to 0 - // are handled just as normal numbers - // can use raw bits since already dealt with infinity and NaN - final long bits = Double.doubleToRawLongBits(d); - final long sign = bits & 0x8000000000000000L; - if ((direction < d) ^ (sign == 0L)) { - return Double.longBitsToDouble(sign | ((bits & 0x7fffffffffffffffL) + 1)); - } else { - return Double.longBitsToDouble(sign | ((bits & 0x7fffffffffffffffL) - 1)); - } - - } - - /** - * Get the next machine representable number after a number, moving - * in the direction of another number. - * <p> - * The ordering is as follows (increasing): - * <ul> - * <li>-INFINITY</li> - * <li>-MAX_VALUE</li> - * <li>-MIN_VALUE</li> - * <li>-0.0</li> - * <li>+0.0</li> - * <li>+MIN_VALUE</li> - * <li>+MAX_VALUE</li> - * <li>+INFINITY</li> - * <li></li> - * <p> - * If arguments compare equal, then the second argument is returned. - * <p> - * If {@code direction} is greater than {@code f}, - * the smallest machine representable number strictly greater than - * {@code f} is returned; if less, then the largest representable number - * strictly less than {@code f} is returned.</p> - * <p> - * If {@code f} is infinite and direction does not - * bring it back to finite numbers, it is returned unchanged.</p> - * - * @param f base number - * @param direction (the only important thing is whether - * {@code direction} is greater or smaller than {@code f}) - * @return the next machine representable number in the specified direction - */ - public static float nextAfter(final float f, final double direction) { - - // handling of some important special cases - if (Double.isNaN(f) || Double.isNaN(direction)) { - return Float.NaN; - } else if (f == direction) { - return (float) direction; - } else if (Float.isInfinite(f)) { - return (f < 0f) ? -Float.MAX_VALUE : Float.MAX_VALUE; - } else if (f == 0f) { - return (direction < 0) ? -Float.MIN_VALUE : Float.MIN_VALUE; - } - // special cases MAX_VALUE to infinity and MIN_VALUE to 0 - // are handled just as normal numbers - - final int bits = Float.floatToIntBits(f); - final int sign = bits & 0x80000000; - if ((direction < f) ^ (sign == 0)) { - return Float.intBitsToFloat(sign | ((bits & 0x7fffffff) + 1)); - } else { - return Float.intBitsToFloat(sign | ((bits & 0x7fffffff) - 1)); - } - - } - - /** Get the largest whole number smaller than x. - * @param x number from which floor is requested - * @return a double number f such that f is an integer f <= x < f + 1.0 - */ - public static double floor(double x) { - long y; - - if (x != x) { // NaN - return x; - } - - if (x >= TWO_POWER_52 || x <= -TWO_POWER_52) { - return x; - } - - y = (long) x; - if (x < 0 && y != x) { - y--; - } - - if (y == 0) { - return x*y; - } - - return y; - } - - /** Get the smallest whole number larger than x. - * @param x number from which ceil is requested - * @return a double number c such that c is an integer c - 1.0 < x <= c - */ - public static double ceil(double x) { - double y; - - if (x != x) { // NaN - return x; - } - - y = floor(x); - if (y == x) { - return y; - } - - y += 1.0; - - if (y == 0) { - return x*y; - } - - return y; - } - - /** Get the whole number that is the nearest to x, or the even one if x is exactly half way between two integers. - * @param x number from which nearest whole number is requested - * @return a double number r such that r is an integer r - 0.5 <= x <= r + 0.5 - */ - public static double rint(double x) { - double y = floor(x); - double d = x - y; - - if (d > 0.5) { - if (y == -1.0) { - return -0.0; // Preserve sign of operand - } - return y+1.0; - } - if (d < 0.5) { - return y; - } - - /* half way, round to even */ - long z = (long) y; - return (z & 1) == 0 ? y : y + 1.0; - } - - /** Get the closest long to x. - * @param x number from which closest long is requested - * @return closest long to x - */ - public static long round(double x) { - return (long) floor(x + 0.5); - } - - /** Get the closest int to x. - * @param x number from which closest int is requested - * @return closest int to x - */ - public static int round(final float x) { - return (int) floor(x + 0.5f); - } - - /** Compute the minimum of two values - * @param a first value - * @param b second value - * @return a if a is lesser or equal to b, b otherwise - */ - public static int min(final int a, final int b) { - return (a <= b) ? a : b; - } - - /** Compute the minimum of two values - * @param a first value - * @param b second value - * @return a if a is lesser or equal to b, b otherwise - */ - public static long min(final long a, final long b) { - return (a <= b) ? a : b; - } - - /** Compute the minimum of two values - * @param a first value - * @param b second value - * @return a if a is lesser or equal to b, b otherwise - */ - public static float min(final float a, final float b) { - if (a > b) { - return b; - } - if (a < b) { - return a; - } - /* if either arg is NaN, return NaN */ - if (a != b) { - return Float.NaN; - } - /* min(+0.0,-0.0) == -0.0 */ - /* 0x80000000 == Float.floatToRawIntBits(-0.0d) */ - int bits = Float.floatToRawIntBits(a); - if (bits == 0x80000000) { - return a; - } - return b; - } - - /** Compute the minimum of two values - * @param a first value - * @param b second value - * @return a if a is lesser or equal to b, b otherwise - */ - public static double min(final double a, final double b) { - if (a > b) { - return b; - } - if (a < b) { - return a; - } - /* if either arg is NaN, return NaN */ - if (a != b) { - return Double.NaN; - } - /* min(+0.0,-0.0) == -0.0 */ - /* 0x8000000000000000L == Double.doubleToRawLongBits(-0.0d) */ - long bits = Double.doubleToRawLongBits(a); - if (bits == 0x8000000000000000L) { - return a; - } - return b; - } - - /** Compute the maximum of two values - * @param a first value - * @param b second value - * @return b if a is lesser or equal to b, a otherwise - */ - public static int max(final int a, final int b) { - return (a <= b) ? b : a; - } - - /** Compute the maximum of two values - * @param a first value - * @param b second value - * @return b if a is lesser or equal to b, a otherwise - */ - public static long max(final long a, final long b) { - return (a <= b) ? b : a; - } - - /** Compute the maximum of two values - * @param a first value - * @param b second value - * @return b if a is lesser or equal to b, a otherwise - */ - public static float max(final float a, final float b) { - if (a > b) { - return a; - } - if (a < b) { - return b; - } - /* if either arg is NaN, return NaN */ - if (a != b) { - return Float.NaN; - } - /* min(+0.0,-0.0) == -0.0 */ - /* 0x80000000 == Float.floatToRawIntBits(-0.0d) */ - int bits = Float.floatToRawIntBits(a); - if (bits == 0x80000000) { - return b; - } - return a; - } - - /** Compute the maximum of two values - * @param a first value - * @param b second value - * @return b if a is lesser or equal to b, a otherwise - */ - public static double max(final double a, final double b) { - if (a > b) { - return a; - } - if (a < b) { - return b; - } - /* if either arg is NaN, return NaN */ - if (a != b) { - return Double.NaN; - } - /* min(+0.0,-0.0) == -0.0 */ - /* 0x8000000000000000L == Double.doubleToRawLongBits(-0.0d) */ - long bits = Double.doubleToRawLongBits(a); - if (bits == 0x8000000000000000L) { - return b; - } - return a; - } - - /** - * Returns the hypotenuse of a triangle with sides {@code x} and {@code y} - * - sqrt(<i>x</i><sup>2</sup> +<i>y</i><sup>2</sup>)<br/> - * avoiding intermediate overflow or underflow. - * - * <ul> - * <li> If either argument is infinite, then the result is positive infinity.</li> - * <li> else, if either argument is NaN then the result is NaN.</li> - * </ul> - * - * @param x a value - * @param y a value - * @return sqrt(<i>x</i><sup>2</sup> +<i>y</i><sup>2</sup>) - */ - public static double hypot(final double x, final double y) { - if (Double.isInfinite(x) || Double.isInfinite(y)) { - return Double.POSITIVE_INFINITY; - } else if (Double.isNaN(x) || Double.isNaN(y)) { - return Double.NaN; - } else { - - final int expX = getExponent(x); - final int expY = getExponent(y); - if (expX > expY + 27) { - // y is neglectible with respect to x - return abs(x); - } else if (expY > expX + 27) { - // x is neglectible with respect to y - return abs(y); - } else { - - // find an intermediate scale to avoid both overflow and underflow - final int middleExp = (expX + expY) / 2; - - // scale parameters without losing precision - final double scaledX = scalb(x, -middleExp); - final double scaledY = scalb(y, -middleExp); - - // compute scaled hypotenuse - final double scaledH = sqrt(scaledX * scaledX + scaledY * scaledY); - - // remove scaling - return scalb(scaledH, middleExp); - - } - - } - } - - /** - * Computes the remainder as prescribed by the IEEE 754 standard. - * The remainder value is mathematically equal to {@code x - y*n} - * where {@code n} is the mathematical integer closest to the exact mathematical value - * of the quotient {@code x/y}. - * If two mathematical integers are equally close to {@code x/y} then - * {@code n} is the integer that is even. - * <p> - * <ul> - * <li>If either operand is NaN, the result is NaN.</li> - * <li>If the result is not NaN, the sign of the result equals the sign of the dividend.</li> - * <li>If the dividend is an infinity, or the divisor is a zero, or both, the result is NaN.</li> - * <li>If the dividend is finite and the divisor is an infinity, the result equals the dividend.</li> - * <li>If the dividend is a zero and the divisor is finite, the result equals the dividend.</li> - * </ul> - * <p><b>Note:</b> this implementation currently delegates to {@link StrictMath#IEEEremainder} - * @param dividend the number to be divided - * @param divisor the number by which to divide - * @return the remainder, rounded - */ - public static double IEEEremainder(double dividend, double divisor) { - return StrictMath.IEEEremainder(dividend, divisor); // TODO provide our own implementation - } - - /** Convert a long to interger, detecting overflows - * @param n number to convert to int - * @return integer with same valie as n if no overflows occur - * @exception MathArithmeticException if n cannot fit into an int - * @since 3.4 - */ - public static int toIntExact(final long n) throws MathArithmeticException { - if (n < Integer.MIN_VALUE || n > Integer.MAX_VALUE) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW); - } - return (int) n; - } - - /** Increment a number, detecting overflows. - * @param n number to increment - * @return n+1 if no overflows occur - * @exception MathArithmeticException if an overflow occurs - * @since 3.4 - */ - public static int incrementExact(final int n) throws MathArithmeticException { - - if (n == Integer.MAX_VALUE) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_ADDITION, n, 1); - } - - return n + 1; - - } - - /** Increment a number, detecting overflows. - * @param n number to increment - * @return n+1 if no overflows occur - * @exception MathArithmeticException if an overflow occurs - * @since 3.4 - */ - public static long incrementExact(final long n) throws MathArithmeticException { - - if (n == Long.MAX_VALUE) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_ADDITION, n, 1); - } - - return n + 1; - - } - - /** Decrement a number, detecting overflows. - * @param n number to decrement - * @return n-1 if no overflows occur - * @exception MathArithmeticException if an overflow occurs - * @since 3.4 - */ - public static int decrementExact(final int n) throws MathArithmeticException { - - if (n == Integer.MIN_VALUE) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_SUBTRACTION, n, 1); - } - - return n - 1; - - } - - /** Decrement a number, detecting overflows. - * @param n number to decrement - * @return n-1 if no overflows occur - * @exception MathArithmeticException if an overflow occurs - * @since 3.4 - */ - public static long decrementExact(final long n) throws MathArithmeticException { - - if (n == Long.MIN_VALUE) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_SUBTRACTION, n, 1); - } - - return n - 1; - - } - - /** Add two numbers, detecting overflows. - * @param a first number to add - * @param b second number to add - * @return a+b if no overflows occur - * @exception MathArithmeticException if an overflow occurs - * @since 3.4 - */ - public static int addExact(final int a, final int b) throws MathArithmeticException { - - // compute sum - final int sum = a + b; - - // check for overflow - if ((a ^ b) >= 0 && (sum ^ b) < 0) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_ADDITION, a, b); - } - - return sum; - - } - - /** Add two numbers, detecting overflows. - * @param a first number to add - * @param b second number to add - * @return a+b if no overflows occur - * @exception MathArithmeticException if an overflow occurs - * @since 3.4 - */ - public static long addExact(final long a, final long b) throws MathArithmeticException { - - // compute sum - final long sum = a + b; - - // check for overflow - if ((a ^ b) >= 0 && (sum ^ b) < 0) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_ADDITION, a, b); - } - - return sum; - - } - - /** Subtract two numbers, detecting overflows. - * @param a first number - * @param b second number to subtract from a - * @return a-b if no overflows occur - * @exception MathArithmeticException if an overflow occurs - * @since 3.4 - */ - public static int subtractExact(final int a, final int b) { - - // compute subtraction - final int sub = a - b; - - // check for overflow - if ((a ^ b) < 0 && (sub ^ b) >= 0) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_SUBTRACTION, a, b); - } - - return sub; - - } - - /** Subtract two numbers, detecting overflows. - * @param a first number - * @param b second number to subtract from a - * @return a-b if no overflows occur - * @exception MathArithmeticException if an overflow occurs - * @since 3.4 - */ - public static long subtractExact(final long a, final long b) { - - // compute subtraction - final long sub = a - b; - - // check for overflow - if ((a ^ b) < 0 && (sub ^ b) >= 0) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_SUBTRACTION, a, b); - } - - return sub; - - } - - /** Multiply two numbers, detecting overflows. - * @param a first number to multiply - * @param b second number to multiply - * @return a*b if no overflows occur - * @exception MathArithmeticException if an overflow occurs - * @since 3.4 - */ - public static int multiplyExact(final int a, final int b) { - if (((b > 0) && (a > Integer.MAX_VALUE / b || a < Integer.MIN_VALUE / b)) || - ((b < -1) && (a > Integer.MIN_VALUE / b || a < Integer.MAX_VALUE / b)) || - ((b == -1) && (a == Integer.MIN_VALUE))) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_MULTIPLICATION, a, b); - } - return a * b; - } - - /** Multiply two numbers, detecting overflows. - * @param a first number to multiply - * @param b second number to multiply - * @return a*b if no overflows occur - * @exception MathArithmeticException if an overflow occurs - * @since 3.4 - */ - public static long multiplyExact(final long a, final long b) { - if (((b > 0l) && (a > Long.MAX_VALUE / b || a < Long.MIN_VALUE / b)) || - ((b < -1l) && (a > Long.MIN_VALUE / b || a < Long.MAX_VALUE / b)) || - ((b == -1l) && (a == Long.MIN_VALUE))) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_MULTIPLICATION, a, b); - } - return a * b; - } - - /** Finds q such that a = q b + r with 0 <= r < b if b > 0 and b < r <= 0 if b < 0. - * <p> - * This methods returns the same value as integer division when - * a and b are same signs, but returns a different value when - * they are opposite (i.e. q is negative). - * </p> - * @param a dividend - * @param b divisor - * @return q such that a = q b + r with 0 <= r < b if b > 0 and b < r <= 0 if b < 0 - * @exception MathArithmeticException if b == 0 - * @see #floorMod(int, int) - * @since 3.4 - */ - public static int floorDiv(final int a, final int b) throws MathArithmeticException { - - if (b == 0) { - throw new MathArithmeticException(LocalizedFormats.ZERO_DENOMINATOR); - } - - final int m = a % b; - if ((a ^ b) >= 0 || m == 0) { - // a an b have same sign, or division is exact - return a / b; - } else { - // a and b have opposite signs and division is not exact - return (a / b) - 1; - } - - } - - /** Finds q such that a = q b + r with 0 <= r < b if b > 0 and b < r <= 0 if b < 0. - * <p> - * This methods returns the same value as integer division when - * a and b are same signs, but returns a different value when - * they are opposite (i.e. q is negative). - * </p> - * @param a dividend - * @param b divisor - * @return q such that a = q b + r with 0 <= r < b if b > 0 and b < r <= 0 if b < 0 - * @exception MathArithmeticException if b == 0 - * @see #floorMod(long, long) - * @since 3.4 - */ - public static long floorDiv(final long a, final long b) throws MathArithmeticException { - - if (b == 0l) { - throw new MathArithmeticException(LocalizedFormats.ZERO_DENOMINATOR); - } - - final long m = a % b; - if ((a ^ b) >= 0l || m == 0l) { - // a an b have same sign, or division is exact - return a / b; - } else { - // a and b have opposite signs and division is not exact - return (a / b) - 1l; - } - - } - - /** Finds r such that a = q b + r with 0 <= r < b if b > 0 and b < r <= 0 if b < 0. - * <p> - * This methods returns the same value as integer modulo when - * a and b are same signs, but returns a different value when - * they are opposite (i.e. q is negative). - * </p> - * @param a dividend - * @param b divisor - * @return r such that a = q b + r with 0 <= r < b if b > 0 and b < r <= 0 if b < 0 - * @exception MathArithmeticException if b == 0 - * @see #floorDiv(int, int) - * @since 3.4 - */ - public static int floorMod(final int a, final int b) throws MathArithmeticException { - - if (b == 0) { - throw new MathArithmeticException(LocalizedFormats.ZERO_DENOMINATOR); - } - - final int m = a % b; - if ((a ^ b) >= 0 || m == 0) { - // a an b have same sign, or division is exact - return m; - } else { - // a and b have opposite signs and division is not exact - return b + m; - } - - } - - /** Finds r such that a = q b + r with 0 <= r < b if b > 0 and b < r <= 0 if b < 0. - * <p> - * This methods returns the same value as integer modulo when - * a and b are same signs, but returns a different value when - * they are opposite (i.e. q is negative). - * </p> - * @param a dividend - * @param b divisor - * @return r such that a = q b + r with 0 <= r < b if b > 0 and b < r <= 0 if b < 0 - * @exception MathArithmeticException if b == 0 - * @see #floorDiv(long, long) - * @since 3.4 - */ - public static long floorMod(final long a, final long b) { - - if (b == 0l) { - throw new MathArithmeticException(LocalizedFormats.ZERO_DENOMINATOR); - } - - final long m = a % b; - if ((a ^ b) >= 0l || m == 0l) { - // a an b have same sign, or division is exact - return m; - } else { - // a and b have opposite signs and division is not exact - return b + m; - } - - } - - /** - * Returns the first argument with the sign of the second argument. - * A NaN {@code sign} argument is treated as positive. - * - * @param magnitude the value to return - * @param sign the sign for the returned value - * @return the magnitude with the same sign as the {@code sign} argument - */ - public static double copySign(double magnitude, double sign){ - // The highest order bit is going to be zero if the - // highest order bit of m and s is the same and one otherwise. - // So (m^s) will be positive if both m and s have the same sign - // and negative otherwise. - final long m = Double.doubleToRawLongBits(magnitude); // don't care about NaN - final long s = Double.doubleToRawLongBits(sign); - if ((m^s) >= 0) { - return magnitude; - } - return -magnitude; // flip sign - } - - /** - * Returns the first argument with the sign of the second argument. - * A NaN {@code sign} argument is treated as positive. - * - * @param magnitude the value to return - * @param sign the sign for the returned value - * @return the magnitude with the same sign as the {@code sign} argument - */ - public static float copySign(float magnitude, float sign){ - // The highest order bit is going to be zero if the - // highest order bit of m and s is the same and one otherwise. - // So (m^s) will be positive if both m and s have the same sign - // and negative otherwise. - final int m = Float.floatToRawIntBits(magnitude); - final int s = Float.floatToRawIntBits(sign); - if ((m^s) >= 0) { - return magnitude; - } - return -magnitude; // flip sign - } - - /** - * Return the exponent of a double number, removing the bias. - * <p> - * For double numbers of the form 2<sup>x</sup>, the unbiased - * exponent is exactly x. - * </p> - * @param d number from which exponent is requested - * @return exponent for d in IEEE754 representation, without bias - */ - public static int getExponent(final double d) { - // NaN and Infinite will return 1024 anywho so can use raw bits - return (int) ((Double.doubleToRawLongBits(d) >>> 52) & 0x7ff) - 1023; - } - - /** - * Return the exponent of a float number, removing the bias. - * <p> - * For float numbers of the form 2<sup>x</sup>, the unbiased - * exponent is exactly x. - * </p> - * @param f number from which exponent is requested - * @return exponent for d in IEEE754 representation, without bias - */ - public static int getExponent(final float f) { - // NaN and Infinite will return the same exponent anywho so can use raw bits - return ((Float.floatToRawIntBits(f) >>> 23) & 0xff) - 127; - } - - /** - * Print out contents of arrays, and check the length. - * <p>used to generate the preset arrays originally.</p> - * @param a unused - */ - public static void main(String[] a) { - PrintStream out = System.out; - FastMathCalc.printarray(out, "EXP_INT_TABLE_A", EXP_INT_TABLE_LEN, ExpIntTable.EXP_INT_TABLE_A); - FastMathCalc.printarray(out, "EXP_INT_TABLE_B", EXP_INT_TABLE_LEN, ExpIntTable.EXP_INT_TABLE_B); - FastMathCalc.printarray(out, "EXP_FRAC_TABLE_A", EXP_FRAC_TABLE_LEN, ExpFracTable.EXP_FRAC_TABLE_A); - FastMathCalc.printarray(out, "EXP_FRAC_TABLE_B", EXP_FRAC_TABLE_LEN, ExpFracTable.EXP_FRAC_TABLE_B); - FastMathCalc.printarray(out, "LN_MANT",LN_MANT_LEN, lnMant.LN_MANT); - FastMathCalc.printarray(out, "SINE_TABLE_A", SINE_TABLE_LEN, SINE_TABLE_A); - FastMathCalc.printarray(out, "SINE_TABLE_B", SINE_TABLE_LEN, SINE_TABLE_B); - FastMathCalc.printarray(out, "COSINE_TABLE_A", SINE_TABLE_LEN, COSINE_TABLE_A); - FastMathCalc.printarray(out, "COSINE_TABLE_B", SINE_TABLE_LEN, COSINE_TABLE_B); - FastMathCalc.printarray(out, "TANGENT_TABLE_A", SINE_TABLE_LEN, TANGENT_TABLE_A); - FastMathCalc.printarray(out, "TANGENT_TABLE_B", SINE_TABLE_LEN, TANGENT_TABLE_B); - } - - /** Enclose large data table in nested static class so it's only loaded on first access. */ - private static class ExpIntTable { - /** Exponential evaluated at integer values, - * exp(x) = expIntTableA[x + EXP_INT_TABLE_MAX_INDEX] + expIntTableB[x+EXP_INT_TABLE_MAX_INDEX]. - */ - private static final double[] EXP_INT_TABLE_A; - /** Exponential evaluated at integer values, - * exp(x) = expIntTableA[x + EXP_INT_TABLE_MAX_INDEX] + expIntTableB[x+EXP_INT_TABLE_MAX_INDEX] - */ - private static final double[] EXP_INT_TABLE_B; - - static { - if (RECOMPUTE_TABLES_AT_RUNTIME) { - EXP_INT_TABLE_A = new double[FastMath.EXP_INT_TABLE_LEN]; - EXP_INT_TABLE_B = new double[FastMath.EXP_INT_TABLE_LEN]; - - final double tmp[] = new double[2]; - final double recip[] = new double[2]; - - // Populate expIntTable - for (int i = 0; i < FastMath.EXP_INT_TABLE_MAX_INDEX; i++) { - FastMathCalc.expint(i, tmp); - EXP_INT_TABLE_A[i + FastMath.EXP_INT_TABLE_MAX_INDEX] = tmp[0]; - EXP_INT_TABLE_B[i + FastMath.EXP_INT_TABLE_MAX_INDEX] = tmp[1]; - - if (i != 0) { - // Negative integer powers - FastMathCalc.splitReciprocal(tmp, recip); - EXP_INT_TABLE_A[FastMath.EXP_INT_TABLE_MAX_INDEX - i] = recip[0]; - EXP_INT_TABLE_B[FastMath.EXP_INT_TABLE_MAX_INDEX - i] = recip[1]; - } - } - } else { - EXP_INT_TABLE_A = FastMathLiteralArrays.loadExpIntA(); - EXP_INT_TABLE_B = FastMathLiteralArrays.loadExpIntB(); - } - } - } - - /** Enclose large data table in nested static class so it's only loaded on first access. */ - private static class ExpFracTable { - /** Exponential over the range of 0 - 1 in increments of 2^-10 - * exp(x/1024) = expFracTableA[x] + expFracTableB[x]. - * 1024 = 2^10 - */ - private static final double[] EXP_FRAC_TABLE_A; - /** Exponential over the range of 0 - 1 in increments of 2^-10 - * exp(x/1024) = expFracTableA[x] + expFracTableB[x]. - */ - private static final double[] EXP_FRAC_TABLE_B; - - static { - if (RECOMPUTE_TABLES_AT_RUNTIME) { - EXP_FRAC_TABLE_A = new double[FastMath.EXP_FRAC_TABLE_LEN]; - EXP_FRAC_TABLE_B = new double[FastMath.EXP_FRAC_TABLE_LEN]; - - final double tmp[] = new double[2]; - - // Populate expFracTable - final double factor = 1d / (EXP_FRAC_TABLE_LEN - 1); - for (int i = 0; i < EXP_FRAC_TABLE_A.length; i++) { - FastMathCalc.slowexp(i * factor, tmp); - EXP_FRAC_TABLE_A[i] = tmp[0]; - EXP_FRAC_TABLE_B[i] = tmp[1]; - } - } else { - EXP_FRAC_TABLE_A = FastMathLiteralArrays.loadExpFracA(); - EXP_FRAC_TABLE_B = FastMathLiteralArrays.loadExpFracB(); - } - } - } - - /** Enclose large data table in nested static class so it's only loaded on first access. */ - private static class lnMant { - /** Extended precision logarithm table over the range 1 - 2 in increments of 2^-10. */ - private static final double[][] LN_MANT; - - static { - if (RECOMPUTE_TABLES_AT_RUNTIME) { - LN_MANT = new double[FastMath.LN_MANT_LEN][]; - - // Populate lnMant table - for (int i = 0; i < LN_MANT.length; i++) { - final double d = Double.longBitsToDouble( (((long) i) << 42) | 0x3ff0000000000000L ); - LN_MANT[i] = FastMathCalc.slowLog(d); - } - } else { - LN_MANT = FastMathLiteralArrays.loadLnMant(); - } - } - } - - /** Enclose the Cody/Waite reduction (used in "sin", "cos" and "tan"). */ - private static class CodyWaite { - /** k */ - private final int finalK; - /** remA */ - private final double finalRemA; - /** remB */ - private final double finalRemB; - - /** - * @param xa Argument. - */ - CodyWaite(double xa) { - // Estimate k. - //k = (int)(xa / 1.5707963267948966); - int k = (int)(xa * 0.6366197723675814); - - // Compute remainder. - double remA; - double remB; - while (true) { - double a = -k * 1.570796251296997; - remA = xa + a; - remB = -(remA - xa - a); - - a = -k * 7.549789948768648E-8; - double b = remA; - remA = a + b; - remB += -(remA - b - a); - - a = -k * 6.123233995736766E-17; - b = remA; - remA = a + b; - remB += -(remA - b - a); - - if (remA > 0) { - break; - } - - // Remainder is negative, so decrement k and try again. - // This should only happen if the input is very close - // to an even multiple of pi/2. - --k; - } - - this.finalK = k; - this.finalRemA = remA; - this.finalRemB = remB; - } - - /** - * @return k - */ - int getK() { - return finalK; - } - /** - * @return remA - */ - double getRemA() { - return finalRemA; - } - /** - * @return remB - */ - double getRemB() { - return finalRemB; - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/FastMathCalc.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/FastMathCalc.java deleted file mode 100644 index 2263eeff9cd3..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/FastMathCalc.java +++ /dev/null @@ -1,662 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.util; - -import java.io.PrintStream; - -import com.azure.cosmos.implementation.apachecommons.math.exception.DimensionMismatchException; - -/** Class used to compute the classical functions tables. - * @since 3.0 - */ -class FastMathCalc { - - /** - * 0x40000000 - used to split a double into two parts, both with the low order bits cleared. - * Equivalent to 2^30. - */ - private static final long HEX_40000000 = 0x40000000L; // 1073741824L - - /** Factorial table, for Taylor series expansions. 0!, 1!, 2!, ... 19! */ - private static final double FACT[] = new double[] - { - +1.0d, // 0 - +1.0d, // 1 - +2.0d, // 2 - +6.0d, // 3 - +24.0d, // 4 - +120.0d, // 5 - +720.0d, // 6 - +5040.0d, // 7 - +40320.0d, // 8 - +362880.0d, // 9 - +3628800.0d, // 10 - +39916800.0d, // 11 - +479001600.0d, // 12 - +6227020800.0d, // 13 - +87178291200.0d, // 14 - +1307674368000.0d, // 15 - +20922789888000.0d, // 16 - +355687428096000.0d, // 17 - +6402373705728000.0d, // 18 - +121645100408832000.0d, // 19 - }; - - /** Coefficients for slowLog. */ - private static final double LN_SPLIT_COEF[][] = { - {2.0, 0.0}, - {0.6666666269302368, 3.9736429850260626E-8}, - {0.3999999761581421, 2.3841857910019882E-8}, - {0.2857142686843872, 1.7029898543501842E-8}, - {0.2222222089767456, 1.3245471311735498E-8}, - {0.1818181574344635, 2.4384203044354907E-8}, - {0.1538461446762085, 9.140260083262505E-9}, - {0.13333332538604736, 9.220590270857665E-9}, - {0.11764700710773468, 1.2393345855018391E-8}, - {0.10526403784751892, 8.251545029714408E-9}, - {0.0952233225107193, 1.2675934823758863E-8}, - {0.08713622391223907, 1.1430250008909141E-8}, - {0.07842259109020233, 2.404307984052299E-9}, - {0.08371849358081818, 1.176342548272881E-8}, - {0.030589580535888672, 1.2958646899018938E-9}, - {0.14982303977012634, 1.225743062930824E-8}, - }; - - /** Table start declaration. */ - private static final String TABLE_START_DECL = " {"; - - /** Table end declaration. */ - private static final String TABLE_END_DECL = " };"; - - /** - * Private Constructor. - */ - private FastMathCalc() { - } - - /** Build the sine and cosine tables. - * @param SINE_TABLE_A table of the most significant part of the sines - * @param SINE_TABLE_B table of the least significant part of the sines - * @param COSINE_TABLE_A table of the most significant part of the cosines - * @param COSINE_TABLE_B table of the most significant part of the cosines - * @param SINE_TABLE_LEN length of the tables - * @param TANGENT_TABLE_A table of the most significant part of the tangents - * @param TANGENT_TABLE_B table of the most significant part of the tangents - */ - @SuppressWarnings("unused") - private static void buildSinCosTables(double[] SINE_TABLE_A, double[] SINE_TABLE_B, - double[] COSINE_TABLE_A, double[] COSINE_TABLE_B, - int SINE_TABLE_LEN, double[] TANGENT_TABLE_A, double[] TANGENT_TABLE_B) { - final double result[] = new double[2]; - - /* Use taylor series for 0 <= x <= 6/8 */ - for (int i = 0; i < 7; i++) { - double x = i / 8.0; - - slowSin(x, result); - SINE_TABLE_A[i] = result[0]; - SINE_TABLE_B[i] = result[1]; - - slowCos(x, result); - COSINE_TABLE_A[i] = result[0]; - COSINE_TABLE_B[i] = result[1]; - } - - /* Use angle addition formula to complete table to 13/8, just beyond pi/2 */ - for (int i = 7; i < SINE_TABLE_LEN; i++) { - double xs[] = new double[2]; - double ys[] = new double[2]; - double as[] = new double[2]; - double bs[] = new double[2]; - double temps[] = new double[2]; - - if ( (i & 1) == 0) { - // Even, use double angle - xs[0] = SINE_TABLE_A[i/2]; - xs[1] = SINE_TABLE_B[i/2]; - ys[0] = COSINE_TABLE_A[i/2]; - ys[1] = COSINE_TABLE_B[i/2]; - - /* compute sine */ - splitMult(xs, ys, result); - SINE_TABLE_A[i] = result[0] * 2.0; - SINE_TABLE_B[i] = result[1] * 2.0; - - /* Compute cosine */ - splitMult(ys, ys, as); - splitMult(xs, xs, temps); - temps[0] = -temps[0]; - temps[1] = -temps[1]; - splitAdd(as, temps, result); - COSINE_TABLE_A[i] = result[0]; - COSINE_TABLE_B[i] = result[1]; - } else { - xs[0] = SINE_TABLE_A[i/2]; - xs[1] = SINE_TABLE_B[i/2]; - ys[0] = COSINE_TABLE_A[i/2]; - ys[1] = COSINE_TABLE_B[i/2]; - as[0] = SINE_TABLE_A[i/2+1]; - as[1] = SINE_TABLE_B[i/2+1]; - bs[0] = COSINE_TABLE_A[i/2+1]; - bs[1] = COSINE_TABLE_B[i/2+1]; - - /* compute sine */ - splitMult(xs, bs, temps); - splitMult(ys, as, result); - splitAdd(result, temps, result); - SINE_TABLE_A[i] = result[0]; - SINE_TABLE_B[i] = result[1]; - - /* Compute cosine */ - splitMult(ys, bs, result); - splitMult(xs, as, temps); - temps[0] = -temps[0]; - temps[1] = -temps[1]; - splitAdd(result, temps, result); - COSINE_TABLE_A[i] = result[0]; - COSINE_TABLE_B[i] = result[1]; - } - } - - /* Compute tangent = sine/cosine */ - for (int i = 0; i < SINE_TABLE_LEN; i++) { - double xs[] = new double[2]; - double ys[] = new double[2]; - double as[] = new double[2]; - - as[0] = COSINE_TABLE_A[i]; - as[1] = COSINE_TABLE_B[i]; - - splitReciprocal(as, ys); - - xs[0] = SINE_TABLE_A[i]; - xs[1] = SINE_TABLE_B[i]; - - splitMult(xs, ys, as); - - TANGENT_TABLE_A[i] = as[0]; - TANGENT_TABLE_B[i] = as[1]; - } - - } - - /** - * For x between 0 and pi/4 compute cosine using Talor series - * cos(x) = 1 - x^2/2! + x^4/4! ... - * @param x number from which cosine is requested - * @param result placeholder where to put the result in extended precision - * (may be null) - * @return cos(x) - */ - static double slowCos(final double x, final double result[]) { - - final double xs[] = new double[2]; - final double ys[] = new double[2]; - final double facts[] = new double[2]; - final double as[] = new double[2]; - split(x, xs); - ys[0] = ys[1] = 0.0; - - for (int i = FACT.length-1; i >= 0; i--) { - splitMult(xs, ys, as); - ys[0] = as[0]; ys[1] = as[1]; - - if ( (i & 1) != 0) { // skip odd entries - continue; - } - - split(FACT[i], as); - splitReciprocal(as, facts); - - if ( (i & 2) != 0 ) { // alternate terms are negative - facts[0] = -facts[0]; - facts[1] = -facts[1]; - } - - splitAdd(ys, facts, as); - ys[0] = as[0]; ys[1] = as[1]; - } - - if (result != null) { - result[0] = ys[0]; - result[1] = ys[1]; - } - - return ys[0] + ys[1]; - } - - /** - * For x between 0 and pi/4 compute sine using Taylor expansion: - * sin(x) = x - x^3/3! + x^5/5! - x^7/7! ... - * @param x number from which sine is requested - * @param result placeholder where to put the result in extended precision - * (may be null) - * @return sin(x) - */ - static double slowSin(final double x, final double result[]) { - final double xs[] = new double[2]; - final double ys[] = new double[2]; - final double facts[] = new double[2]; - final double as[] = new double[2]; - split(x, xs); - ys[0] = ys[1] = 0.0; - - for (int i = FACT.length-1; i >= 0; i--) { - splitMult(xs, ys, as); - ys[0] = as[0]; ys[1] = as[1]; - - if ( (i & 1) == 0) { // Ignore even numbers - continue; - } - - split(FACT[i], as); - splitReciprocal(as, facts); - - if ( (i & 2) != 0 ) { // alternate terms are negative - facts[0] = -facts[0]; - facts[1] = -facts[1]; - } - - splitAdd(ys, facts, as); - ys[0] = as[0]; ys[1] = as[1]; - } - - if (result != null) { - result[0] = ys[0]; - result[1] = ys[1]; - } - - return ys[0] + ys[1]; - } - - - /** - * For x between 0 and 1, returns exp(x), uses extended precision - * @param x argument of exponential - * @param result placeholder where to place exp(x) split in two terms - * for extra precision (i.e. exp(x) = result[0] + result[1] - * @return exp(x) - */ - static double slowexp(final double x, final double result[]) { - final double xs[] = new double[2]; - final double ys[] = new double[2]; - final double facts[] = new double[2]; - final double as[] = new double[2]; - split(x, xs); - ys[0] = ys[1] = 0.0; - - for (int i = FACT.length-1; i >= 0; i--) { - splitMult(xs, ys, as); - ys[0] = as[0]; - ys[1] = as[1]; - - split(FACT[i], as); - splitReciprocal(as, facts); - - splitAdd(ys, facts, as); - ys[0] = as[0]; - ys[1] = as[1]; - } - - if (result != null) { - result[0] = ys[0]; - result[1] = ys[1]; - } - - return ys[0] + ys[1]; - } - - /** Compute split[0], split[1] such that their sum is equal to d, - * and split[0] has its 30 least significant bits as zero. - * @param d number to split - * @param split placeholder where to place the result - */ - private static void split(final double d, final double split[]) { - if (d < 8e298 && d > -8e298) { - final double a = d * HEX_40000000; - split[0] = (d + a) - a; - split[1] = d - split[0]; - } else { - final double a = d * 9.31322574615478515625E-10; - split[0] = (d + a - d) * HEX_40000000; - split[1] = d - split[0]; - } - } - - /** Recompute a split. - * @param a input/out array containing the split, changed - * on output - */ - private static void resplit(final double a[]) { - final double c = a[0] + a[1]; - final double d = -(c - a[0] - a[1]); - - if (c < 8e298 && c > -8e298) { // MAGIC NUMBER - double z = c * HEX_40000000; - a[0] = (c + z) - z; - a[1] = c - a[0] + d; - } else { - double z = c * 9.31322574615478515625E-10; - a[0] = (c + z - c) * HEX_40000000; - a[1] = c - a[0] + d; - } - } - - /** Multiply two numbers in split form. - * @param a first term of multiplication - * @param b second term of multiplication - * @param ans placeholder where to put the result - */ - private static void splitMult(double a[], double b[], double ans[]) { - ans[0] = a[0] * b[0]; - ans[1] = a[0] * b[1] + a[1] * b[0] + a[1] * b[1]; - - /* Resplit */ - resplit(ans); - } - - /** Add two numbers in split form. - * @param a first term of addition - * @param b second term of addition - * @param ans placeholder where to put the result - */ - private static void splitAdd(final double a[], final double b[], final double ans[]) { - ans[0] = a[0] + b[0]; - ans[1] = a[1] + b[1]; - - resplit(ans); - } - - /** Compute the reciprocal of in. Use the following algorithm. - * in = c + d. - * want to find x + y such that x+y = 1/(c+d) and x is much - * larger than y and x has several zero bits on the right. - * - * Set b = 1/(2^22), a = 1 - b. Thus (a+b) = 1. - * Use following identity to compute (a+b)/(c+d) - * - * (a+b)/(c+d) = a/c + (bc - ad) / (c^2 + cd) - * set x = a/c and y = (bc - ad) / (c^2 + cd) - * This will be close to the right answer, but there will be - * some rounding in the calculation of X. So by carefully - * computing 1 - (c+d)(x+y) we can compute an error and - * add that back in. This is done carefully so that terms - * of similar size are subtracted first. - * @param in initial number, in split form - * @param result placeholder where to put the result - */ - static void splitReciprocal(final double in[], final double result[]) { - final double b = 1.0/4194304.0; - final double a = 1.0 - b; - - if (in[0] == 0.0) { - in[0] = in[1]; - in[1] = 0.0; - } - - result[0] = a / in[0]; - result[1] = (b*in[0]-a*in[1]) / (in[0]*in[0] + in[0]*in[1]); - - if (result[1] != result[1]) { // can happen if result[1] is NAN - result[1] = 0.0; - } - - /* Resplit */ - resplit(result); - - for (int i = 0; i < 2; i++) { - /* this may be overkill, probably once is enough */ - double err = 1.0 - result[0] * in[0] - result[0] * in[1] - - result[1] * in[0] - result[1] * in[1]; - /*err = 1.0 - err; */ - err *= result[0] + result[1]; - /*printf("err = %16e\n", err); */ - result[1] += err; - } - } - - /** Compute (a[0] + a[1]) * (b[0] + b[1]) in extended precision. - * @param a first term of the multiplication - * @param b second term of the multiplication - * @param result placeholder where to put the result - */ - private static void quadMult(final double a[], final double b[], final double result[]) { - final double xs[] = new double[2]; - final double ys[] = new double[2]; - final double zs[] = new double[2]; - - /* a[0] * b[0] */ - split(a[0], xs); - split(b[0], ys); - splitMult(xs, ys, zs); - - result[0] = zs[0]; - result[1] = zs[1]; - - /* a[0] * b[1] */ - split(b[1], ys); - splitMult(xs, ys, zs); - - double tmp = result[0] + zs[0]; - result[1] -= tmp - result[0] - zs[0]; - result[0] = tmp; - tmp = result[0] + zs[1]; - result[1] -= tmp - result[0] - zs[1]; - result[0] = tmp; - - /* a[1] * b[0] */ - split(a[1], xs); - split(b[0], ys); - splitMult(xs, ys, zs); - - tmp = result[0] + zs[0]; - result[1] -= tmp - result[0] - zs[0]; - result[0] = tmp; - tmp = result[0] + zs[1]; - result[1] -= tmp - result[0] - zs[1]; - result[0] = tmp; - - /* a[1] * b[0] */ - split(a[1], xs); - split(b[1], ys); - splitMult(xs, ys, zs); - - tmp = result[0] + zs[0]; - result[1] -= tmp - result[0] - zs[0]; - result[0] = tmp; - tmp = result[0] + zs[1]; - result[1] -= tmp - result[0] - zs[1]; - result[0] = tmp; - } - - /** Compute exp(p) for a integer p in extended precision. - * @param p integer whose exponential is requested - * @param result placeholder where to put the result in extended precision - * @return exp(p) in standard precision (equal to result[0] + result[1]) - */ - static double expint(int p, final double result[]) { - //double x = M_E; - final double xs[] = new double[2]; - final double as[] = new double[2]; - final double ys[] = new double[2]; - //split(x, xs); - //xs[1] = (double)(2.7182818284590452353602874713526625L - xs[0]); - //xs[0] = 2.71827697753906250000; - //xs[1] = 4.85091998273542816811e-06; - //xs[0] = Double.longBitsToDouble(0x4005bf0800000000L); - //xs[1] = Double.longBitsToDouble(0x3ed458a2bb4a9b00L); - - /* E */ - xs[0] = 2.718281828459045; - xs[1] = 1.4456468917292502E-16; - - split(1.0, ys); - - while (p > 0) { - if ((p & 1) != 0) { - quadMult(ys, xs, as); - ys[0] = as[0]; ys[1] = as[1]; - } - - quadMult(xs, xs, as); - xs[0] = as[0]; xs[1] = as[1]; - - p >>= 1; - } - - if (result != null) { - result[0] = ys[0]; - result[1] = ys[1]; - - resplit(result); - } - - return ys[0] + ys[1]; - } - /** xi in the range of [1, 2]. - * 3 5 7 - * x+1 / x x x \ - * ln ----- = 2 * | x + ---- + ---- + ---- + ... | - * 1-x \ 3 5 7 / - * - * So, compute a Remez approximation of the following function - * - * ln ((sqrt(x)+1)/(1-sqrt(x))) / x - * - * This will be an even function with only positive coefficents. - * x is in the range [0 - 1/3]. - * - * Transform xi for input to the above function by setting - * x = (xi-1)/(xi+1). Input to the polynomial is x^2, then - * the result is multiplied by x. - * @param xi number from which log is requested - * @return log(xi) - */ - static double[] slowLog(double xi) { - double x[] = new double[2]; - double x2[] = new double[2]; - double y[] = new double[2]; - double a[] = new double[2]; - - split(xi, x); - - /* Set X = (x-1)/(x+1) */ - x[0] += 1.0; - resplit(x); - splitReciprocal(x, a); - x[0] -= 2.0; - resplit(x); - splitMult(x, a, y); - x[0] = y[0]; - x[1] = y[1]; - - /* Square X -> X2*/ - splitMult(x, x, x2); - - - //x[0] -= 1.0; - //resplit(x); - - y[0] = LN_SPLIT_COEF[LN_SPLIT_COEF.length-1][0]; - y[1] = LN_SPLIT_COEF[LN_SPLIT_COEF.length-1][1]; - - for (int i = LN_SPLIT_COEF.length-2; i >= 0; i--) { - splitMult(y, x2, a); - y[0] = a[0]; - y[1] = a[1]; - splitAdd(y, LN_SPLIT_COEF[i], a); - y[0] = a[0]; - y[1] = a[1]; - } - - splitMult(y, x, a); - y[0] = a[0]; - y[1] = a[1]; - - return y; - } - - - /** - * Print an array. - * @param out text output stream where output should be printed - * @param name array name - * @param expectedLen expected length of the array - * @param array2d array data - */ - static void printarray(PrintStream out, String name, int expectedLen, double[][] array2d) { - out.println(name); - checkLen(expectedLen, array2d.length); - out.println(TABLE_START_DECL + " "); - int i = 0; - for(double[] array : array2d) { // "double array[]" causes PMD parsing error - out.print(" {"); - for(double d : array) { // assume inner array has very few entries - out.printf("%-25.25s", format(d)); // multiple entries per line - } - out.println("}, // " + i++); - } - out.println(TABLE_END_DECL); - } - - /** - * Print an array. - * @param out text output stream where output should be printed - * @param name array name - * @param expectedLen expected length of the array - * @param array array data - */ - static void printarray(PrintStream out, String name, int expectedLen, double[] array) { - out.println(name + "="); - checkLen(expectedLen, array.length); - out.println(TABLE_START_DECL); - for(double d : array){ - out.printf(" %s%n", format(d)); // one entry per line - } - out.println(TABLE_END_DECL); - } - - /** Format a double. - * @param d double number to format - * @return formatted number - */ - static String format(double d) { - if (d != d) { - return "Double.NaN,"; - } else { - return ((d >= 0) ? "+" : "") + Double.toString(d) + "d,"; - } - } - - /** - * Check two lengths are equal. - * @param expectedLen expected length - * @param actual actual length - * @exception DimensionMismatchException if the two lengths are not equal - */ - private static void checkLen(int expectedLen, int actual) - throws DimensionMismatchException { - if (expectedLen != actual) { - throw new DimensionMismatchException(actual, expectedLen); - } - } - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/FastMathLiteralArrays.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/FastMathLiteralArrays.java deleted file mode 100644 index 416442b50391..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/FastMathLiteralArrays.java +++ /dev/null @@ -1,6179 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.util; - -/** - * Utility class for loading tabulated data used by {@link FastMath}. - * - */ -class FastMathLiteralArrays { - /** Exponential evaluated at integer values, - * exp(x) = expIntTableA[x + EXP_INT_TABLE_MAX_INDEX] + expIntTableB[x+EXP_INT_TABLE_MAX_INDEX]. - */ - private static final double[] EXP_INT_A = new double[] { - +0.0d, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - +1.2167807682331913E-308d, - +3.3075532478807267E-308d, - +8.990862214387203E-308d, - +2.4439696075216986E-307d, - +6.64339758024534E-307d, - +1.8058628951432254E-306d, - +4.908843759498681E-306d, - +1.334362017065677E-305d, - +3.627172425759641E-305d, - +9.85967600992008E-305d, - +2.680137967689915E-304d, - +7.285370725133842E-304d, - +1.9803689272433392E-303d, - +5.3832011494782624E-303d, - +1.463305638201413E-302d, - +3.9776772027043775E-302d, - +1.0812448255518705E-301d, - +2.9391280956327795E-301d, - +7.989378677301346E-301d, - +2.1717383041010577E-300d, - +5.903396499766243E-300d, - +1.604709595901607E-299d, - +4.3620527352131126E-299d, - +1.1857289715706991E-298d, - +3.2231452986239366E-298d, - +8.761416875971053E-298d, - +2.381600167287677E-297d, - +6.473860152384321E-297d, - +1.7597776278732318E-296d, - +4.7835721669653157E-296d, - +1.3003096668152053E-295d, - +3.5346080979652066E-295d, - +9.608060944124859E-295d, - +2.6117415961302846E-294d, - +7.099449830809996E-294d, - +1.9298305829106006E-293d, - +5.245823134132673E-293d, - +1.4259627797225802E-292d, - +3.8761686729764145E-292d, - +1.0536518897078156E-291d, - +2.864122672853628E-291d, - +7.785491934690374E-291d, - +2.116316283183901E-290d, - +5.7527436249968E-290d, - +1.5637579898345352E-289d, - +4.250734424415339E-289d, - +1.1554696041977512E-288d, - +3.1408919441362495E-288d, - +8.537829238438662E-288d, - +2.320822576772103E-287d, - +6.308649765138419E-287d, - +1.7148689119310826E-286d, - +4.66149719271323E-286d, - +1.267126226441217E-285d, - +3.444406231880653E-285d, - +9.362866914115166E-285d, - +2.5450911557068313E-284d, - +6.918275021321188E-284d, - +1.880582039589629E-283d, - +5.111952261540649E-283d, - +1.3895726688907995E-282d, - +3.7772500667438066E-282d, - +1.026763015362553E-281d, - +2.791031173360063E-281d, - +7.586808748646825E-281d, - +2.0623086887184633E-280d, - +5.605936171588964E-280d, - +1.5238514098804918E-279d, - +4.1422578754033235E-279d, - +1.1259823210174452E-278d, - +3.060737220976933E-278d, - +8.319947089683576E-278d, - +2.2615958035357106E-277d, - +6.147655179898435E-277d, - +1.6711060014400145E-276d, - +4.542536646012133E-276d, - +1.2347896500246374E-275d, - +3.3565057475434694E-275d, - +9.123929070778758E-275d, - +2.4801413921885483E-274d, - +6.741722283079056E-274d, - +1.8325902719086093E-273d, - +4.981496462621207E-273d, - +1.3541112064618357E-272d, - +3.68085620656127E-272d, - +1.0005602916630382E-271d, - +2.719805132368625E-271d, - +7.393196131284108E-271d, - +2.0096791226867E-270d, - +5.462874707256208E-270d, - +1.4849631831943512E-269d, - +4.036548930895323E-269d, - +1.0972476870931676E-268d, - +2.9826282194717127E-268d, - +8.107624153838987E-268d, - +2.2038806519542315E-267d, - +5.990769236615968E-267d, - +1.628459873440512E-266d, - +4.4266130556431266E-266d, - +1.203278237867575E-265d, - +3.270849446965521E-265d, - +8.891090288030614E-265d, - +2.4168487931443637E-264d, - +6.569676185250389E-264d, - +1.7858231429575898E-263d, - +4.85437090269903E-263d, - +1.3195548295785448E-262d, - +3.5869215528816054E-262d, - +9.750264097807267E-262d, - +2.650396454019762E-261d, - +7.204525142098426E-261d, - +1.958392846081373E-260d, - +5.32346341339996E-260d, - +1.4470673509275515E-259d, - +3.9335373658569176E-259d, - +1.0692462289051038E-258d, - +2.9065128598079075E-258d, - +7.900720862969045E-258d, - +2.147638465376883E-257d, - +5.8378869339035456E-257d, - +1.5869022483809747E-256d, - +4.3136475849391444E-256d, - +1.1725710340687719E-255d, - +3.1873780814410126E-255d, - +8.66419234315257E-255d, - +2.35517168886351E-254d, - +6.402020300783889E-254d, - +1.740249660600677E-253d, - +4.7304887145310405E-253d, - +1.2858802448614707E-252d, - +3.495384792953975E-252d, - +9.501439740542955E-252d, - +2.582759362004277E-251d, - +7.020668578160457E-251d, - +1.908415302517694E-250d, - +5.1876107490791666E-250d, - +1.4101386971763257E-249d, - +3.8331545111676784E-249d, - +1.0419594359065132E-248d, - +2.8323395451363237E-248d, - +7.699097067385825E-248d, - +2.0928317096428755E-247d, - +5.688906371296133E-247d, - +1.5464049837965422E-246d, - +4.2035646586788297E-246d, - +1.1426473877336358E-245d, - +3.106037603716254E-245d, - +8.443084996839363E-245d, - +2.2950686306677644E-244d, - +6.238642390386363E-244d, - +1.695838923802857E-243d, - +4.6097680405580995E-243d, - +1.2530649392922358E-242d, - +3.4061835424180075E-242d, - +9.25896798127602E-242d, - +2.5168480541429286E-241d, - +6.841502859109196E-241d, - +1.8597132378953187E-240d, - +5.055224959032211E-240d, - +1.374152583940637E-239d, - +3.735333866258403E-239d, - +1.0153690688015855E-238d, - +2.7600590782738726E-238d, - +7.502618487550056E-238d, - +2.0394233446495043E-237d, - +5.543727690168612E-237d, - +1.5069412868172555E-236d, - +4.0962906236847E-236d, - +1.1134873918971586E-235d, - +3.026772467749944E-235d, - +8.227620163729258E-235d, - +2.2364990583200056E-234d, - +6.079434951446575E-234d, - +1.6525617499662284E-233d, - +4.4921289690525345E-233d, - +1.2210872189854344E-232d, - +3.3192593301633E-232d, - +9.02268127425393E-232d, - +2.4526190464373087E-231d, - +6.666909874218774E-231d, - +1.8122539547625083E-230d, - +4.926216840507529E-230d, - +1.3390847149416908E-229d, - +3.6400093808551196E-229d, - +9.894571625944288E-229d, - +2.689623698321582E-228d, - +7.31115423069187E-228d, - +1.9873779569310022E-227d, - +5.402252865260326E-227d, - +1.4684846983789053E-226d, - +3.991755413823315E-226d, - +1.0850715739509136E-225d, - +2.9495302004590423E-225d, - +8.017654713159388E-225d, - +2.179424521221378E-224d, - +5.924290380648597E-224d, - +1.6103890140790331E-223d, - +4.377491272857675E-223d, - +1.1899254154663847E-222d, - +3.2345523990372546E-222d, - +8.792425221770645E-222d, - +2.3900289095512176E-221d, - +6.496772856703278E-221d, - +1.7660059778220905E-220d, - +4.800501435803201E-220d, - +1.3049116216750674E-219d, - +3.5471180281159325E-219d, - +9.642065709892252E-219d, - +2.6209850274990846E-218d, - +7.124574366530717E-218d, - +1.9366601417010147E-217d, - +5.264388476949737E-217d, - +1.431009021985696E-216d, - +3.889885799962507E-216d, - +1.057380684430436E-215d, - +2.8742587656021775E-215d, - +7.813044552050569E-215d, - +2.1238058974550874E-214d, - +5.773102661099307E-214d, - +1.5692921723471877E-213d, - +4.2657777816050375E-213d, - +1.1595585743839232E-212d, - +3.1520070828798975E-212d, - +8.568043768122183E-212d, - +2.329035966595791E-211d, - +6.33097561889469E-211d, - +1.720937714565362E-210d, - +4.677993239821998E-210d, - +1.2716105485691878E-209d, - +3.456595573934475E-209d, - +9.396000024637834E-209d, - +2.55409795397022E-208d, - +6.942757623821567E-208d, - +1.887237361505784E-207d, - +5.13004286606108E-207d, - +1.3944901709366118E-206d, - +3.7906173667738715E-206d, - +1.0303966192973381E-205d, - +2.8009086220877197E-205d, - +7.613657850210907E-205d, - +2.0696069842597556E-204d, - +5.6257755605305175E-204d, - +1.5292444435954893E-203d, - +4.156916476922876E-203d, - +1.12996721591364E-202d, - +3.071569248856111E-202d, - +8.349390727162016E-202d, - +2.2695999828608633E-201d, - +6.1694117899971836E-201d, - +1.677020107827128E-200d, - +4.558612479525779E-200d, - +1.2391595516612638E-199d, - +3.3683846288580648E-199d, - +9.156218120779494E-199d, - +2.4889182184335247E-198d, - +6.765580431441772E-198d, - +1.839075686473352E-197d, - +4.999126524757713E-197d, - +1.3589033107846643E-196d, - +3.6938826366068014E-196d, - +1.0041012794280992E-195d, - +2.7294301888986675E-195d, - +7.419361045185406E-195d, - +2.016791373353671E-194d, - +5.482208065983983E-194d, - +1.490218341008089E-193d, - +4.050833763855709E-193d, - +1.101130773265179E-192d, - +2.993183789477209E-192d, - +8.136316299122392E-192d, - +2.2116799789922265E-191d, - +6.011969568315371E-191d, - +1.6342228966392253E-190d, - +4.4422779589171113E-190d, - +1.2075364784547675E-189d, - +3.282424571107068E-189d, - +8.92255448602772E-189d, - +2.425402115319395E-188d, - +6.592926904915355E-188d, - +1.79214305133496E-187d, - +4.871550528055661E-187d, - +1.3242245776666673E-186d, - +3.599615946028287E-186d, - +9.78476998200719E-186d, - +2.659776075359514E-185d, - +7.230020851688713E-185d, - +1.9653234116333892E-184d, - +5.34230278107224E-184d, - +1.4521887058451231E-183d, - +3.947457923821984E-183d, - +1.0730302255093144E-182d, - +2.9167986204137332E-182d, - +7.928680793406766E-182d, - +2.1552386987482013E-181d, - +5.858546779607288E-181d, - +1.5925182066949723E-180d, - +4.328913614497258E-180d, - +1.1767205227552116E-179d, - +3.198658219194836E-179d, - +8.694853785564504E-179d, - +2.363506255864984E-178d, - +6.42467573615509E-178d, - +1.746408207555959E-177d, - +4.747229597770176E-177d, - +1.2904307529671472E-176d, - +3.507754341050756E-176d, - +9.535066345267336E-176d, - +2.591899541396432E-175d, - +7.045512786902009E-175d, - +1.9151693415969248E-174d, - +5.205969622575851E-174d, - +1.4151292367806538E-173d, - +3.846720258072078E-173d, - +1.045647032279984E-172d, - +2.8423629805010285E-172d, - +7.726344058192276E-172d, - +2.1002377128928765E-171d, - +5.709039546124285E-171d, - +1.5518778128928824E-170d, - +4.218440703602533E-170d, - +1.1466910691560932E-169d, - +3.1170298734336303E-169d, - +8.472965161251656E-169d, - +2.303190374523956E-168d, - +6.260720440258473E-168d, - +1.701840523821621E-167d, - +4.62608152166211E-167d, - +1.2574995962791943E-166d, - +3.418237608335161E-166d, - +9.29173407843235E-166d, - +2.5257552661512635E-165d, - +6.865714679174435E-165d, - +1.866294830116931E-164d, - +5.073114566291778E-164d, - +1.3790154522394582E-163d, - +3.7485528226129495E-163d, - +1.0189624503698769E-162d, - +2.7698267293941856E-162d, - +7.529170882336924E-162d, - +2.0466404088178596E-161d, - +5.56334611651382E-161d, - +1.512274346576166E-160d, - +4.110787043867721E-160d, - +1.1174279267498045E-159d, - +3.0374839443564585E-159d, - +8.25673801176584E-159d, - +2.244414150254963E-158d, - +6.1009492034592176E-158d, - +1.6584100275603453E-157d, - +4.50802633729044E-157d, - +1.2254085656601853E-156d, - +3.3310057014599044E-156d, - +9.054612259832416E-156d, - +2.4612985502035675E-155d, - +6.690503835950083E-155d, - +1.8186679660152888E-154d, - +4.9436516047443576E-154d, - +1.3438240331106108E-153d, - +3.652892398145774E-153d, - +9.92958982547828E-153d, - +2.6991427376823027E-152d, - +7.3370297995122135E-152d, - +1.994411660450821E-151d, - +5.421372463189529E-151d, - +1.4736818914204564E-150d, - +4.005882964287806E-150d, - +1.088911919926534E-149d, - +2.9599693109692324E-149d, - +8.046030012041041E-149d, - +2.18713790898745E-148d, - +5.945256705384597E-148d, - +1.6160884846515524E-147d, - +4.392983574030969E-147d, - +1.1941366764543551E-146d, - +3.2460001983475855E-146d, - +8.8235440586675E-146d, - +2.3984878190403553E-145d, - +6.519765758635405E-145d, - +1.772256261139753E-144d, - +4.817491674217065E-144d, - +1.3095299991573769E-143d, - +3.559671483107555E-143d, - +9.676190774054103E-143d, - +2.630261301303634E-142d, - +7.149792225695347E-142d, - +1.943514969662872E-141d, - +5.283020542151163E-141d, - +1.4360739330834996E-140d, - +3.9036541111764032E-140d, - +1.0611230602364477E-139d, - +2.8844319473099593E-139d, - +7.84069876400596E-139d, - +2.1313228444765414E-138d, - +5.793536445518422E-138d, - +1.5748463788034308E-137d, - +4.2808762411845363E-137d, - +1.1636629220608724E-136d, - +3.163163464591171E-136d, - +8.598369704466743E-136d, - +2.337279322276433E-135d, - +6.353384093665193E-135d, - +1.7270287031459572E-134d, - +4.694550492773212E-134d, - +1.2761111606368036E-133d, - +3.4688299108856403E-133d, - +9.429257929713919E-133d, - +2.5631381141873417E-132d, - +6.967331001069377E-132d, - +1.8939170679975288E-131d, - +5.148199748336684E-131d, - +1.3994258162094293E-130d, - +3.804034213613942E-130d, - +1.0340436948077763E-129d, - +2.8108219632627907E-129d, - +7.640606938467665E-129d, - +2.0769322678328357E-128d, - +5.645687086879944E-128d, - +1.5346568127351796E-127d, - +4.171630237420918E-127d, - +1.1339665711932977E-126d, - +3.0824406750909563E-126d, - +8.37894218404787E-126d, - +2.2776327994966818E-125d, - +6.191247522703296E-125d, - +1.6829556040859853E-124d, - +4.5747479502862494E-124d, - +1.2435453481209945E-123d, - +3.3803067202247166E-123d, - +9.188625696750548E-123d, - +2.4977273040076145E-122d, - +6.789527378582775E-122d, - +1.845584943222965E-121d, - +5.016820182185716E-121d, - +1.3637129731022491E-120d, - +3.706956710275979E-120d, - +1.0076552294433743E-119d, - +2.739090595934893E-119d, - +7.445620503219039E-119d, - +2.023929422267303E-118d, - +5.501611507503037E-118d, - +1.4954928881576769E-117d, - +4.0651709187617596E-117d, - +1.1050280679513555E-116d, - +3.003777734030334E-116d, - +8.165114384910189E-116d, - +2.219508285637377E-115d, - +6.033249389304709E-115d, - +1.6400070480930697E-114d, - +4.458001565878111E-114d, - +1.2118105325725891E-113d, - +3.2940421731384895E-113d, - +8.954135150208654E-113d, - +2.433986351722258E-112d, - +6.616260705434716E-112d, - +1.7984863104885375E-111d, - +4.888792154132158E-111d, - +1.3289115531074511E-110d, - +3.612356038181234E-110d, - +9.819402293160495E-110d, - +2.6691899766673256E-109d, - +7.255611264437603E-109d, - +1.9722796756250217E-108d, - +5.361211684173837E-108d, - +1.4573285967670963E-107d, - +3.961429477016909E-107d, - +1.0768281419102595E-106d, - +2.9271223293841774E-106d, - +7.956744351476403E-106d, - +2.1628672925745152E-105d, - +5.879282834821692E-105d, - +1.5981547034872092E-104d, - +4.344234755347641E-104d, - +1.1808855501885005E-103d, - +3.2099795870407646E-103d, - +8.725629524586503E-103d, - +2.3718718327094683E-102d, - +6.44741641521183E-102d, - +1.7525895549820557E-101d, - +4.7640323331013947E-101d, - +1.2949980563724296E-100d, - +3.5201699899499525E-100d, - +9.56881327374431E-100d, - +2.6010732940533088E-99d, - +7.070450309820548E-99d, - +1.9219478787856753E-98d, - +5.2243955659975294E-98d, - +1.4201378353978042E-97d, - +3.8603349913851996E-97d, - +1.0493479260117497E-96d, - +2.8524232604238555E-96d, - +7.753690709912764E-96d, - +2.1076716069929933E-95d, - +5.72924572981599E-95d, - +1.5573703263204683E-94d, - +4.233371554108682E-94d, - +1.1507496472539512E-93d, - +3.1280620563875923E-93d, - +8.5029538631631E-93d, - +2.3113425190436427E-92d, - +6.28287989314225E-92d, - +1.7078641226055994E-91d, - +4.6424556110307644E-91d, - +1.261950308999819E-90d, - +3.430336362898836E-90d, - +9.324622137237299E-90d, - +2.5346947846365435E-89d, - +6.890014851450124E-89d, - +1.8729003560057785E-88d, - +5.091070300111434E-88d, - +1.3838964592430477E-87d, - +3.761820584522275E-87d, - +1.0225689628581036E-86d, - +2.7796303536272215E-86d, - +7.555818934379333E-86d, - +2.053884626293416E-85d, - +5.583037134407759E-85d, - +1.5176268538776042E-84d, - +4.125337057189083E-84d, - +1.121383042095528E-83d, - +3.0482348236054953E-83d, - +8.285962249116636E-83d, - +2.2523580600947705E-82d, - +6.122543452787843E-82d, - +1.664279766968299E-81d, - +4.523982262003404E-81d, - +1.2297456769063303E-80d, - +3.342795345742034E-80d, - +9.086660081726823E-80d, - +2.4700104681773258E-79d, - +6.714184569587689E-79d, - +1.8251046352720517E-78d, - +4.961148056969105E-78d, - +1.3485799924445315E-77d, - +3.665820371396835E-77d, - +9.964732578705785E-77d, - +2.708695208461993E-76d, - +7.362996533913695E-76d, - +2.0014700145557332E-75d, - +5.440559532453721E-75d, - +1.4788974793889734E-74d, - +4.020060558571273E-74d, - +1.092765612182012E-73d, - +2.970445258959489E-73d, - +8.074507236705857E-73d, - +2.1948784599535102E-72d, - +5.966298125808066E-72d, - +1.6218081151910012E-71d, - +4.408531734441582E-71d, - +1.198363039426718E-70d, - +3.257488853378793E-70d, - +8.854771398921902E-70d, - +2.406976727302894E-69d, - +6.542840888268955E-69d, - +1.778528517418201E-68d, - +4.834541417183388E-68d, - +1.3141647465063647E-67d, - +3.572270133517001E-67d, - +9.710435805122717E-67d, - +2.63957027915428E-66d, - +7.175096392165733E-66d, - +1.9503931430716318E-65d, - +5.3017188565638215E-65d, - +1.4411566290936352E-64d, - +3.9174693825966044E-64d, - +1.0648786018364265E-63d, - +2.8946401383311E-63d, - +7.868447965383903E-63d, - +2.1388659707647114E-62d, - +5.814040618670345E-62d, - +1.5804200403673568E-61d, - +4.296027044486766E-61d, - +1.1677812418806031E-60d, - +3.174358801839755E-60d, - +8.62880163941313E-60d, - +2.345551464945955E-59d, - +6.3758692300917355E-59d, - +1.733140900346534E-58d, - +4.711165925070571E-58d, - +1.2806275683797178E-57d, - +3.481106736845E-57d, - +9.462629520363307E-57d, - +2.5722094667974783E-56d, - +6.9919903587080315E-56d, - +1.9006201022568844E-55d, - +5.166420404109835E-55d, - +1.4043786616805493E-54d, - +3.8174968984748894E-54d, - +1.03770335512154E-53d, - +2.820769858672565E-53d, - +7.667647949477605E-53d, - +2.0842827711783212E-52d, - +5.6656680900216754E-52d, - +1.5400881501571645E-51d, - +4.1863938339341257E-51d, - +1.1379799629071911E-50d, - +3.093350150840571E-50d, - +8.408597060399334E-50d, - +2.2856938448387544E-49d, - +6.2131591878042886E-49d, - +1.688911928929718E-48d, - +4.5909386437919143E-48d, - +1.2479464696643861E-47d, - +3.3922703599272275E-47d, - +9.221146830884422E-47d, - +2.5065676066043174E-46d, - +6.8135571305481364E-46d, - +1.8521166948363666E-45d, - +5.0345752964740226E-45d, - +1.368539456379101E-44d, - +3.720075801577098E-44d, - +1.0112214979786464E-43d, - +2.7487849807248755E-43d, - +7.47197247068667E-43d, - +2.0310928323153876E-42d, - +5.521082422279256E-42d, - +1.5007857288519654E-41d, - +4.0795586181406803E-41d, - +1.108938997126179E-40d, - +3.0144088843073416E-40d, - +8.194012195477669E-40d, - +2.2273635587196807E-39d, - +6.054601485195952E-39d, - +1.6458113136245473E-38d, - +4.473779311490168E-38d, - +1.2160992719555806E-37d, - +3.3057007442449645E-37d, - +8.985825281444118E-37d, - +2.442600707513088E-36d, - +6.639677673630215E-36d, - +1.8048513285848406E-35d, - +4.906094420881007E-35d, - +1.3336148713971936E-34d, - +3.625141007634431E-34d, - +9.854154449263851E-34d, - +2.6786368134431636E-33d, - +7.28128971953363E-33d, - +1.9792597720953414E-32d, - +5.380185921962174E-32d, - +1.4624861244004054E-31d, - +3.975449484028966E-31d, - +1.080639291795678E-30d, - +2.9374821418009058E-30d, - +7.984904044796711E-30d, - +2.1705221445447534E-29d, - +5.900089995748943E-29d, - +1.6038109389511792E-28d, - +4.359610133382778E-28d, - +1.185064946717304E-27d, - +3.221340469489223E-27d, - +8.756510122348782E-27d, - +2.380266370880709E-26d, - +6.47023467943241E-26d, - +1.75879225876483E-25d, - +4.780892502168074E-25d, - +1.2995814853898995E-24d, - +3.5326287852455166E-24d, - +9.602680736954162E-24d, - +2.6102792042257208E-23d, - +7.095474414148981E-23d, - +1.9287497671359936E-22d, - +5.242885191553114E-22d, - +1.4251641388208515E-21d, - +3.873997809109103E-21d, - +1.0530616658562386E-20d, - +2.862518609581133E-20d, - +7.78113163345177E-20d, - +2.1151310700892382E-19d, - +5.74952254077566E-19d, - +1.5628822871880503E-18d, - +4.24835413113866E-18d, - +1.1548223864099742E-17d, - +3.139132557537509E-17d, - +8.533046968331264E-17d, - +2.3195229636950566E-16d, - +6.305116324200775E-16d, - +1.71390848833098E-15d, - +4.6588861918718874E-15d, - +1.2664165777252073E-14d, - +3.442477422913037E-14d, - +9.357622912219837E-14d, - +2.5436656904062604E-13d, - +6.914399608426436E-13d, - +1.879528650772233E-12d, - +5.1090893668503945E-12d, - +1.3887944613766301E-11d, - +3.775134371775124E-11d, - +1.0261880234452292E-10d, - +2.789468100949932E-10d, - +7.582560135332983E-10d, - +2.061153470123145E-9d, - +5.602796449011294E-9d, - +1.5229979055675358E-8d, - +4.139937459513021E-8d, - +1.1253517584464134E-7d, - +3.059023470086686E-7d, - +8.315287232107949E-7d, - +2.260329438286135E-6d, - +6.1442124206223525E-6d, - +1.670170240686275E-5d, - +4.539993096841499E-5d, - +1.2340981629677117E-4d, - +3.35462624207139E-4d, - +9.118819143623114E-4d, - +0.0024787522852420807d, - +0.006737947463989258d, - +0.018315639346837997d, - +0.049787066876888275d, - +0.1353352963924408d, - +0.3678794503211975d, - +1.0d, - +2.7182817459106445d, - +7.389056205749512d, - +20.08553695678711d, - +54.59815216064453d, - +148.41314697265625d, - +403.42877197265625d, - +1096.633056640625d, - +2980.9580078125d, - +8103.083984375d, - +22026.46484375d, - +59874.140625d, - +162754.78125d, - +442413.375d, - +1202604.25d, - +3269017.5d, - +8886110.0d, - +2.4154952E7d, - +6.5659968E7d, - +1.78482304E8d, - +4.85165184E8d, - +1.318815744E9d, - +3.584912896E9d, - +9.74480384E9d, - +2.6489122816E10d, - +7.200489472E10d, - +1.95729620992E11d, - +5.32048248832E11d, - +1.446257098752E12d, - +3.9313342464E12d, - +1.0686474223616E13d, - +2.904884772864E13d, - +7.8962956959744E13d, - +2.14643574308864E14d, - +5.83461777702912E14d, - +1.586013579247616E15d, - +4.31123180027904E15d, - +1.1719142537166848E16d, - +3.1855931348221952E16d, - +8.6593395455164416E16d, - +2.35385270340419584E17d, - +6.3984347447610573E17d, - +1.73927483790327808E18d, - +4.7278395262972723E18d, - +1.285159987981792E19d, - +3.493427277593156E19d, - +9.496119530068797E19d, - +2.581312717296228E20d, - +7.016736290557636E20d, - +1.907346499785443E21d, - +5.1847060206155E21d, - +1.4093490364499379E22d, - +3.831007739580998E22d, - +1.0413759887481643E23d, - +2.8307533984544136E23d, - +7.694785471490595E23d, - +2.0916595931561093E24d, - +5.685720022003016E24d, - +1.545539007875769E25d, - +4.201209991636407E25d, - +1.142007304008196E26d, - +3.104297782658242E26d, - +8.43835682327257E26d, - +2.2937832658080656E27d, - +6.23514943204966E27d, - +1.694889206675675E28d, - +4.607187019879158E28d, - +1.2523630909973607E29d, - +3.4042761729010895E29d, - +9.253781621373885E29d, - +2.5154385492401904E30d, - +6.837671137556327E30d, - +1.8586717056324128E31d, - +5.05239404378821E31d, - +1.3733830589835937E32d, - +3.733241849647479E32d, - +1.014800418749161E33d, - +2.758513549969986E33d, - +7.498416981578345E33d, - +2.0382811492597872E34d, - +5.540622484676759E34d, - +1.5060972626944096E35d, - +4.0939972479624634E35d, - +1.1128638067747114E36d, - +3.0250770246136387E36d, - +8.223012393018281E36d, - +2.2352467822017166E37d, - +6.076029840339376E37d, - +1.6516361647240826E38d, - +4.4896127778163155E38d, - +1.2204032949639917E39d, - +3.3174000012927697E39d, - +9.017628107716908E39d, - +2.451245443147225E40d, - +6.663175904917432E40d, - +1.8112388823726723E41d, - +4.923458004084836E41d, - +1.3383347029375378E42d, - +3.637970747803715E42d, - +9.889030935681123E42d, - +2.6881169167589747E43d, - +7.307059786371152E43d, - +1.986264756071962E44d, - +5.399227989109673E44d, - +1.467662348860426E45d, - +3.989519470441919E45d, - +1.0844638420493122E46d, - +2.9478781225754055E46d, - +8.013164089994031E46d, - +2.1782039447564253E47d, - +5.920972420778763E47d, - +1.609486943324346E48d, - +4.3750396394525074E48d, - +1.1892591576149107E49d, - +3.2327411123173475E49d, - +8.787501601904039E49d, - +2.3886908001521312E50d, - +6.493134033643613E50d, - +1.7650169203544438E51d, - +4.7978130078372714E51d, - +1.3041809768060802E52d, - +3.5451314095271004E52d, - +9.636666808527841E52d, - +2.6195174357581655E53d, - +7.120586694432509E53d, - +1.9355758655647052E54d, - +5.2614409704305464E54d, - +1.4302079642723736E55d, - +3.8877083524279136E55d, - +1.0567886837680406E56d, - +2.872649515690124E56d, - +7.808670894670738E56d, - +2.1226166967029073E57d, - +5.769871153180574E57d, - +1.568413405104933E58d, - +4.263390023436419E58d, - +1.1589095247718807E59d, - +3.150242850860434E59d, - +8.563247933339596E59d, - +2.3277319969498524E60d, - +6.327431953939798E60d, - +1.719974302355042E61d, - +4.675374788964851E61d, - +1.2708985520400816E62d, - +3.454660807101683E62d, - +9.390740355567705E62d, - +2.5526681615684215E63d, - +6.938871462941557E63d, - +1.8861808782043154E64d, - +5.1271712215233855E64d, - +1.3937096689052236E65d, - +3.7884955399150257E65d, - +1.0298199046367501E66d, - +2.799340708992666E66d, - +7.609396391563323E66d, - +2.0684484008569103E67d, - +5.622626080395226E67d, - +1.528388084444653E68d, - +4.1545899609113734E68d, - +1.1293346659459732E69d, - +3.069849599753188E69d, - +8.344717266683004E69d, - +2.268329019570017E70d, - +6.165958325782564E70d, - +1.676081191364984E71d, - +4.556060380835955E71d, - +1.2384658100355657E72d, - +3.3664990715562672E72d, - +9.15109220707761E72d, - +2.4875248571153216E73d, - +6.761793219649385E73d, - +1.8380461271305958E74d, - +4.996327312938759E74d, - +1.3581426848077408E75d, - +3.691814001080034E75d, - +1.0035391101975138E76d, - +2.7279024753382288E76d, - +7.415207287657125E76d, - +2.0156621983963848E77d, - +5.479138512760614E77d, - +1.4893842728520671E78d, - +4.048565732162643E78d, - +1.1005142643914475E79d, - +2.991508131437659E79d, - +8.131762373533769E79d, - +2.210442148596269E80d, - +6.008604166110734E80d, - +1.633308028614055E81d, - +4.439791652732591E81d, - +1.206860599814453E82d, - +3.280586734644871E82d, - +8.917559854082513E82d, - +2.4240442814945802E83d, - +6.589235682116406E83d, - +1.7911398904871E84d, - +4.86882298924053E84d, - +1.3234832005748183E85d, - +3.597600556519039E85d, - +9.77929222446451E85d, - +2.658286976862848E86d, - +7.225974166887662E86d, - +1.9642232209552433E87d, - +5.3393125705958075E87d, - +1.4513757076459615E88d, - +3.945247871835613E88d, - +1.0724295693252266E89d, - +2.915165904253785E89d, - +7.924242330665303E89d, - +2.1540322390343345E90d, - +5.855267177907345E90d, - +1.5916266807316476E91d, - +4.326489915443873E91d, - +1.1760619079592718E92d, - +3.1968677404735245E92d, - +8.689987517871135E92d, - +2.3621834216830225E93d, - +6.421080550439423E93d, - +1.7454306955949023E94d, - +4.744571892885607E94d, - +1.2897084285532175E95d, - +3.505791114318544E95d, - +9.529727908157224E95d, - +2.5904487437231458E96d, - +7.041568925985714E96d, - +1.9140971884979424E97d, - +5.203055142575272E97d, - +1.4143368931719686E98d, - +3.8445667684706366E98d, - +1.0450615121235744E99d, - +2.8407720200442806E99d, - +7.722018663521402E99d, - +2.0990624115923312E100d, - +5.705842978547001E100d, - +1.5510089388648915E101d, - +4.216079296087462E101d, - +1.1460491592124923E102d, - +3.1152847602082673E102d, - +8.468222063292654E102d, - +2.3019011105282883E103d, - +6.257216813084462E103d, - +1.7008878437355237E104d, - +4.62349260394851E104d, - +1.2567956334920216E105d, - +3.416324322370112E105d, - +9.286532888251822E105d, - +2.5243410574836706E106d, - +6.861870970598542E106d, - +1.8652499723625443E107d, - +5.070274654122399E107d, - +1.3782437251846782E108d, - +3.746454626411946E108d, - +1.0183920005400422E109d, - +2.768276122845335E109d, - +7.524954624697075E109d, - +2.0454950851007314E110d, - +5.56023190218245E110d, - +1.511427628805191E111d, - +4.1084862677372065E111d, - +1.1168024085164686E112d, - +3.0357834799588566E112d, - +8.252116273466952E112d, - +2.2431576057283144E113d, - +6.097534318207731E113d, - +1.65748157925005E114d, - +4.5055022172222453E114d, - +1.2247224482958058E115d, - +3.329140840363789E115d, - +9.049543313665034E115d, - +2.4599209935197392E116d, - +6.686758417135634E116d, - +1.817649308779104E117d, - +4.940883275207154E117d, - +1.3430713954289087E118d, - +3.6508464654683645E118d, - +9.924030156169606E118d, - +2.697631034485758E119d, - +7.332921137166064E119d, - +1.9932945470297703E120d, - +5.418336099279846E120d, - +1.472856595860236E121d, - +4.0036393271908754E121d, - +1.0883019300873278E122d, - +2.9583112936666607E122d, - +8.041523923017192E122d, - +2.1859129781586158E123d, - +5.941927186144745E123d, - +1.6151834292371802E124d, - +4.390523815859274E124d, - +1.1934680816813702E125d, - +3.2441826014060764E125d, - +8.81860282490643E125d, - +2.3971445233885962E126d, - +6.516115189736396E126d, - +1.7712635751001657E127d, - +4.814793918384117E127d, - +1.3087966177291396E128d, - +3.557678449715009E128d, - +9.670771210463886E128d, - +2.628788218289742E129d, - +7.145787619369324E129d, - +1.9424264981694277E130d, - +5.280062387569078E130d, - +1.4352697002457768E131d, - +3.901467289560222E131d, - +1.0605288965077546E132d, - +2.882816299252225E132d, - +7.836307815186044E132d, - +2.1301292155181736E133d, - +5.790291758828013E133d, - +1.573964437869041E134d, - +4.278478878300888E134d, - +1.1630112062985817E135d, - +3.1613917467297413E135d, - +8.593554223894477E135d, - +2.335970335559215E136d, - +6.349826172787151E136d, - +1.7260616357651607E137d, - +4.691921416188566E137d, - +1.2753966504932798E138d, - +3.466887271843006E138d, - +9.423976538577447E138d, - +2.561702766944378E139d, - +6.963429563637273E139d, - +1.892856346657855E140d, - +5.1453167686439515E140d, - +1.3986421289359558E141d, - +3.8019036618832785E141d, - +1.033464507572145E142d, - +2.809247950589945E142d, - +7.636326960498012E142d, - +2.075769060297565E143d, - +5.64252553828769E143d, - +1.5337974510118784E144d, - +4.169293918423203E144d, - +1.1333315586787883E145d, - +3.080714152600695E145d, - +8.374250298636991E145d, - +2.276357074042286E146d, - +6.187780443461367E146d, - +1.6820131331794073E147d, - +4.572185635487065E147d, - +1.2428488853188662E148d, - +3.378413594504258E148d, - +9.183480622172801E148d, - +2.4963286658278886E149d, - +6.785725312893433E149d, - +1.8445514681108982E150d, - +5.014010481958507E150d, - +1.3629491735708616E151d, - +3.7048805655699485E151d, - +1.0070909418550386E152d, - +2.7375567044077912E152d, - +7.441451374243517E152d, - +2.022795961737854E153d, - +5.4985298195094216E153d, - +1.494655405262451E154d, - +4.062894701808608E154d, - +1.1044092571980793E155d, - +3.002095574584687E155d, - +8.160542326793782E155d, - +2.218265110516721E156d, - +6.02987028472758E156d, - +1.6390888071605646E157d, - +4.455504920700703E157d, - +1.2111317421229415E158d, - +3.2921976772303727E158d, - +8.94912101169977E158d, - +2.432623425087251E159d, - +6.612555731556604E159d, - +1.7974788874847574E160d, - +4.8860545948985793E160d, - +1.328167263606087E161d, - +3.610333312791256E161d, - +9.813901863427107E161d, - +2.667695552814763E162d, - +7.251548346906463E162d, - +1.9711751621240536E163d, - +5.3582093498119173E163d, - +1.4565123573071036E164d, - +3.959211091077107E164d, - +1.0762251933089556E165d, - +2.9254832789181E165d, - +7.952287052787358E165d, - +2.161656025361765E166d, - +5.8759898326913254E166d, - +1.597259768214821E167d, - +4.3418021646459346E167d, - +1.1802241249113175E168d, - +3.2081817253680657E168d, - +8.720743087611513E168d, - +2.3705435424427623E169d, - +6.443805025317327E169d, - +1.7516078165936552E170d, - +4.7613641572445654E170d, - +1.2942728582966776E171d, - +3.518198614137319E171d, - +9.563454814394247E171d, - +2.5996166206245285E172d, - +7.066491077377918E172d, - +1.920871394985668E173d, - +5.221469250951617E173d, - +1.4193426880442385E174d, - +3.8581732071331E174d, - +1.0487601931965087E175d, - +2.850825930161946E175d, - +7.749348772180658E175d, - +2.1064911705560668E176d, - +5.726036941135634E176d, - +1.5564982816556894E177d, - +4.231000988846797E177d, - +1.1501053030837989E178d, - +3.1263099916916113E178d, - +8.498192212235393E178d, - +2.3100480183046895E179d, - +6.279361500971995E179d, - +1.7069074829463731E180d, - +4.63985600437427E180d, - +1.2612435745231905E181d, - +3.4284156709489884E181d, - +9.319400030019162E181d, - +2.5332752658571312E182d, - +6.88615578404537E182d, - +1.8718514371423056E183d, - +5.088219872370737E183d, - +1.3831214731781958E184d, - +3.759713966511158E184d, - +1.021996184153141E185d, - +2.778073442169904E185d, - +7.55158797540476E185d, - +2.0527342305586606E186d, - +5.579910641313343E186d, - +1.5167767828844167E187d, - +4.123026721295484E187d, - +1.1207549425651513E188d, - +3.0465278560980536E188d, - +8.281321669236493E188d, - +2.251096660331649E189d, - +6.119114404399683E189d, - +1.6633478556884994E190d, - +4.521448560089285E190d, - +1.2290570545894685E191d, - +3.340923580982338E191d, - +9.081571104550255E191d, - +2.468626868232408E192d, - +6.710424255583952E192d, - +1.8240823171621646E193d, - +4.958369974640573E193d, - +1.3478247120462365E194d, - +3.6637673548790206E194d, - +9.959152908532152E194d, - +2.707178052117959E195d, - +7.358873642076596E195d, - +2.0003490682463053E196d, - +5.4375131636754E196d, - +1.4780692924846082E197d, - +4.01780853635105E197d, - +1.0921536132159379E198d, - +2.968781250496917E198d, - +8.069984512111955E198d, - +2.193649279840519E199d, - +5.962956589227457E199d, - +1.620899738203635E200d, - +4.406062052965071E200d, - +1.1976919074588434E201d, - +3.2556641859513496E201d, - +8.849812639395597E201d, - +2.40562867677584E202d, - +6.539175932653188E202d, - +1.7775323307944624E203d, - +4.831833881898182E203d, - +1.3134287685114547E204d, - +3.5702693195009266E204d, - +9.704997606668411E204d, - +2.63809219778715E205d, - +7.171077244202293E205d, - +1.949300880034352E206d, - +5.298749302736127E206d, - +1.4403494631058154E207d, - +3.91527572177694E207d, - +1.0642823992403076E208d, - +2.8930193727937684E208d, - +7.8640411896421955E208d, - +2.1376680994038112E209d, - +5.8107841809216616E209d, - +1.5795351101531684E210d, - +4.293620869258453E210d, - +1.1671272667059652E211d, - +3.172580666390786E211d, - +8.623968972387222E211d, - +2.3442378838418366E212d, - +6.372298757235201E212d, - +1.7321703934464356E213d, - +4.708527306855985E213d, - +1.279910496643312E214d, - +3.479157135998568E214d, - +9.45732984079136E214d, - +2.5707689593428096E215d, - +6.988074107282322E215d, - +1.8995553996578656E216d, - +5.1635269305465607E216d, - +1.4035923083915864E217d, - +3.815359096108819E217d, - +1.0371220592190472E218d, - +2.819190456167585E218d, - +7.663353127378024E218d, - +2.083115484919861E219d, - +5.662495731848751E219d, - +1.5392257142577226E220d, - +4.184049381430498E220d, - +1.1373425785132867E221d, - +3.091617462831603E221d, - +8.403887374207366E221d, - +2.2844135610697528E222d, - +6.209679892802781E222d, - +1.6879660933816274E223d, - +4.588367423411997E223d, - +1.2472476068464461E224d, - +3.3903703993793316E224d, - +9.215982463319503E224d, - +2.5051637206758385E225d, - +6.809741127603255E225d, - +1.8510795864289367E226d, - +5.031755776868959E226d, - +1.3677729802316034E227d, - +3.7179924024793253E227d, - +1.0106552237522032E228d, - +2.7472456017809066E228d, - +7.467788172398272E228d, - +2.029955237703202E229d, - +5.517990469846618E229d, - +1.4999452522236406E230d, - +4.0772734783595525E230d, - +1.1083180046837618E231d, - +3.012720614547867E231d, - +8.18942426109357E231d, - +2.2261161215322043E232d, - +6.051211457626543E232d, - +1.6448897917725177E233d, - +4.471273900208441E233d, - +1.2154183152078517E234d, - +3.3038494682728794E234d, - +8.98079409878202E234d, - +2.4412328161430576E235d, - +6.63595840453991E235d, - +1.8038406914061554E236d, - +4.90334700062756E236d, - +1.3328680266667662E237d, - +3.623110695743118E237d, - +9.848636053777669E237d, - +2.677136737066629E238d, - +7.277212447141125E238d, - +1.978151484427976E239d, - +5.377173488599035E239d, - +1.4616672175682191E240d, - +3.973222981713661E240d, - +1.0800340064859439E241d, - +2.935837009891444E241d, - +7.980432566722885E241d, - +2.169306470354036E242d, - +5.896786161387733E242d, - +1.6029126916635028E243d, - +4.357168123448786E243d, - +1.1844011798406507E244d, - +3.2195361624179725E244d, - +8.751606149833694E244d, - +2.3789334438756013E245d, - +6.466611224443739E245d, - +1.7578073785142153E246d, - +4.7782149589194885E246d, - +1.2988535295611824E247d, - +3.5306502960727705E247d, - +9.597302512507479E247d, - +2.608817438130718E248d, - +7.091500562953208E248d, - +1.9276698418065647E249d, - +5.239949786641934E249d, - +1.42436589329759E250d, - +3.8718282216768776E250d, - +1.0524719896550007E251d, - +2.860915548426704E251d, - +7.77677492833005E251d, - +2.113946677051906E252d, - +5.7463023795153145E252d, - +1.56200679236425E253d, - +4.2459748085663055E253d, - +1.1541756557557508E254d, - +3.137374584307575E254d, - +8.528268445871411E254d, - +2.3182239583484444E255d, - +6.301585387776819E255d, - +1.7129486892266285E256d, - +4.6562769567905925E256d, - +1.26570724146049E257d, - +3.4405490416979487E257d, - +9.352382323649647E257d, - +2.54224113415832E258d, - +6.910528108396216E258d, - +1.8784760208391767E259d, - +5.106228040084293E259d, - +1.3880166914480165E260d, - +3.7730204737910044E260d, - +1.0256131352582533E261d, - +2.787906051540986E261d, - +7.578313650939932E261d, - +2.0599991793068063E262d, - +5.5996586041611455E262d, - +1.522145133131402E263d, - +4.137618951061827E263d, - +1.1247213964487372E264d, - +3.0573102223682595E264d, - +8.310629417537063E264d, - +2.2590636576955473E265d, - +6.1407711078356886E265d, - +1.6692346202615142E266d, - +4.5374504961394207E266d, - +1.2334070098307164E267d, - +3.3527476928456816E267d, - +9.113713162029408E267d, - +2.4773638527240193E268d, - +6.734172833429278E268d, - +1.8305382378470305E269d, - +4.9759187284770303E269d, - +1.352594940263854E270d, - +3.6767339705169146E270d, - +9.994400500679653E270d, - +2.716759624268743E271d, - +7.384918458508588E271d, - +2.007428933605617E272d, - +5.456757565532369E272d, - +1.4833003969415539E273d, - +4.0320284712983994E273d, - +1.096019026243815E274d, - +2.979288529962515E274d, - +8.098545495417704E274d, - +2.201412886580694E275d, - +5.984060832462728E275d, - +1.6266362950862408E276d, - +4.4216561713555547E276d, - +1.2019307065458128E277d, - +3.2671863888979078E277d, - +8.881133159512924E277d, - +2.4141423627760256E278d, - +6.562319473965767E278d, - +1.7838233889223407E279d, - +4.848934634563382E279d, - +1.3180771991576186E280d, - +3.5829049382293792E280d, - +9.739345931419228E280d, - +2.6474285478041252E281d, - +7.196457718729758E281d, - +1.956199868121249E282d, - +5.31750271790054E282d, - +1.4454470027638629E283d, - +3.929132560365955E283d, - +1.0680488848057261E284d, - +2.9032581477488686E284d, - +7.89187408872514E284d, - +2.1452336456259667E285d, - +5.831349876080173E285d, - +1.5851251724785243E286d, - +4.308816643345461E286d, - +1.1712579802975851E287d, - +3.1838092090922606E287d, - +8.654490685278886E287d, - +2.3525345191912968E288d, - +6.39485115791896E288d, - +1.7383009254496851E289d, - +4.725191397657393E289d, - +1.2844402232816276E290d, - +3.491470347090126E290d, - +9.490800658395667E290d, - +2.579867270991543E291d, - +7.012806239173502E291d, - +1.906278351789277E292d, - +5.181801397059486E292d, - +1.408559707497606E293d, - +3.8288623079292884E293d, - +1.0407926842436056E294d, - +2.829168201470791E294d, - +7.690475570840264E294d, - +2.0904882610105383E295d, - +5.68253547942899E295d, - +1.544673396032028E296d, - +4.1988574190754736E296d, - +1.1413677466646359E297d, - +3.102559332875688E297d, - +8.433630296371073E297d, - +2.292498520423419E298d, - +6.23165710486722E298d, - +1.6939399242810123E299d, - +4.604606371472047E299d, - +1.2516618713553432E300d, - +3.402369329874797E300d, - +9.248598815279678E300d, - +2.51402968559859E301d, - +6.833842035076675E301d, - +1.8576309291617257E302d, - +5.049564425991982E302d, - +1.3726137091534984E303d, - +3.7311513682845094E303d, - +1.0142320772726397E304d, - +2.7569686255975333E304d, - +7.494218049456063E304d, - +2.037139607241041E305d, - +5.5375196488302575E305d, - +1.5052539519895093E306d, - +4.091704288360009E306d, - +1.1122405335641184E307d, - +3.023383151402969E307d, - +8.218407798110846E307d, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - }; - - /** Exponential evaluated at integer values, - * exp(x) = expIntTableA[x + EXP_INT_TABLE_MAX_INDEX] + expIntTableB[x+EXP_INT_TABLE_MAX_INDEX] - */ - private static final double[] EXP_INT_B = new double[] { - +0.0d, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - -1.76097684E-316d, - -2.44242319E-315d, - -9.879317845E-315d, - -1.3811462167E-314d, - +2.1775261204E-314d, - -1.4379095864E-313d, - +1.4219324087E-313d, - +1.00605438061E-312d, - -1.287101187097E-312d, - +5.33839690397E-312d, - -9.35130825405E-313d, - -4.15218681073E-311d, - +4.546040329134E-311d, - -1.57333572310673E-310d, - +1.05387548454467E-309d, - +2.095732474644446E-309d, - -2.62524392470767E-310d, - +5.86440876259637E-309d, - -2.401816502004675E-309d, - -2.2711230715729753E-308d, - +2.0670460065057715E-307d, - +3.436860020483706E-308d, - +2.0862243734177337E-306d, - -4.637025318037353E-306d, - +9.222671009756424E-306d, - +6.704597874020559E-305d, - +4.351284159444109E-305d, - +4.232889602759328E-304d, - +1.2840977763293412E-303d, - -2.6993478083348727E-303d, - -1.053265874779237E-303d, - +1.207746682843556E-303d, - +5.21281096513035E-303d, - +1.6515377082609677E-301d, - +3.3951607353932444E-301d, - +5.609418227003629E-301d, - +4.238775357914848E-300d, - -9.441842771290538E-300d, - -2.1745347282493023E-299d, - -6.203839803215248E-299d, - -5.617718879466363E-299d, - +5.2869976233132615E-298d, - -1.4300075619643524E-298d, - +4.3198234936686506E-297d, - -2.6448316331572387E-297d, - +4.315655444002347E-296d, - -7.253671992213344E-296d, - -1.1288398461391523E-295d, - -4.83901764243093E-296d, - +1.7407497662694827E-295d, - +1.1969717029666017E-294d, - -7.752519943329177E-294d, - -4.019569741253664E-293d, - -2.4467928392518484E-293d, - -1.0269233640424235E-292d, - -3.2330960700986594E-292d, - -1.440995270758115E-291d, - -3.726946038150935E-291d, - -1.3424576100819801E-291d, - -3.128894928199484E-290d, - -5.989337506920005E-290d, - -9.438168176533759E-290d, - -1.9220613500411237E-289d, - +2.1186736024949195E-289d, - +6.3015208029537436E-288d, - -8.168129112703755E-288d, - -1.6040513288090055E-287d, - -1.0809972724404233E-287d, - -3.080380385962424E-286d, - +2.6399157174374624E-286d, - +1.3317127674213423E-285d, - -3.5821668044872306E-285d, - +1.978536584535392E-284d, - +1.3399392455370071E-284d, - -2.870168560029448E-284d, - +3.5311184272663063E-283d, - -7.204247881190918E-283d, - +3.2425604548983798E-282d, - +3.913063150326019E-282d, - -2.260957518848075E-281d, - +3.807242187736102E-281d, - -5.095591405025083E-281d, - +2.3400625068490396E-280d, - -1.1564717694090882E-280d, - -3.517594695450786E-279d, - +6.666544384808297E-279d, - -9.204784113858607E-279d, - +4.8677119923665573E-278d, - +7.942176091555472E-278d, - -2.5113270522478854E-277d, - +5.332900939354667E-277d, - -3.491241408725929E-276d, - -2.1141094074221325E-276d, - +1.722049095222509E-275d, - +4.0430160253378594E-275d, - +1.9888195459082551E-274d, - +3.230089643550739E-275d, - +5.077824728028163E-274d, - -3.526547961682877E-274d, - -6.4376298274983765E-273d, - -2.5338279333399964E-272d, - -3.614847626733713E-272d, - +2.510812179067931E-272d, - +3.953806005373127E-272d, - +7.112596406315374E-272d, - -2.850217520533226E-270d, - -8.571477929711754E-270d, - +1.2902019831221148E-269d, - -6.978783784755863E-270d, - +9.89845486618531E-269d, - -3.538563171970534E-268d, - +3.537475449241181E-268d, - +3.6924578046381256E-267d, - +1.3555502536444713E-266d, - -1.1279742372661484E-266d, - +5.475072932318336E-266d, - -1.1679889049814275E-265d, - -8.946297908979776E-266d, - +1.0565816011650582E-264d, - -3.2161237736296753E-265d, - -6.022045553485609E-264d, - -2.0332050860436034E-263d, - -1.0488538406930105E-262d, - +1.6793752843984384E-262d, - +3.2558720916543104E-263d, - -1.9546569053899882E-262d, - +5.082190670014963E-262d, - -1.0188117475357564E-260d, - +3.7920054509691455E-261d, - -8.330969967504819E-260d, - -1.1623181434592597E-259d, - +9.09665088462258E-259d, - -1.56400149127482E-259d, - -7.796557225750673E-258d, - +6.751460509863465E-258d, - +7.243157658226935E-258d, - +1.2574668958946027E-256d, - +2.2678858131411216E-256d, - +5.1079306249351287E-256d, - -5.672261759108003E-257d, - +3.476539491009769E-256d, - -1.3481093992496937E-254d, - -3.314051560952014E-254d, - +7.408112967339146E-255d, - -7.164884605413269E-254d, - -6.456588023278983E-253d, - -1.4881197370811587E-252d, - +1.7534012237555307E-252d, - -1.3070101381473173E-251d, - +6.081420141954215E-251d, - +6.591143677421159E-251d, - +2.6917461073773043E-250d, - +3.683043641790553E-251d, - +1.2195076420741757E-249d, - -8.220283439582378E-249d, - +1.637852737426943E-248d, - -8.332543237340988E-249d, - +2.9581193516975647E-248d, - -1.7790661150204172E-247d, - -1.7809679916043692E-247d, - +8.378574405736031E-247d, - -2.883847036065813E-246d, - +1.3223776943337897E-245d, - +3.098547586845664E-245d, - -1.1036542789147287E-244d, - -5.7187703271582225E-244d, - -1.8058492822440396E-244d, - +4.4373726292703545E-243d, - -3.4631935816990754E-243d, - -1.82770041073856E-243d, - +3.845535085273936E-242d, - +8.446532344375812E-242d, - +2.7751016140238277E-242d, - +1.3158882241538003E-241d, - -3.579433051074272E-240d, - -6.151751570213211E-240d, - -2.990535475079021E-239d, - +2.3396028616528764E-239d, - +7.233790684263346E-239d, - +1.0847913100494912E-238d, - +7.103148400942551E-238d, - +3.463600299750966E-237d, - -4.873121855093712E-237d, - +1.3407295326570417E-236d, - +9.390271617387205E-237d, - -2.4767709454727603E-235d, - +3.205923535388443E-235d, - -1.0074984709952582E-234d, - +2.4747880175747574E-234d, - -5.146939682310558E-234d, - -2.827581009333298E-233d, - -3.0307641004671077E-233d, - +5.92044714050651E-233d, - -2.0582596893119236E-232d, - -6.58066591313112E-232d, - -4.869955151949929E-231d, - -5.763495903609913E-231d, - -2.3580462372762525E-230d, - +1.8559980428862584E-230d, - +2.854978560542175E-229d, - +5.637945686485334E-229d, - +2.1454644909004582E-228d, - -1.1918070206953359E-228d, - -5.021851606912854E-228d, - +3.861525553653117E-227d, - +6.533561982617909E-227d, - -3.015709444206057E-226d, - -5.042005018212734E-227d, - +1.5959614205422845E-225d, - +2.0402105689098835E-224d, - +5.164902728917601E-224d, - +9.981031744879876E-224d, - +4.0281104210095145E-223d, - +1.1158160971176672E-222d, - +2.0736172194624895E-222d, - +4.983162653734032E-222d, - +2.1753390051977871E-221d, - +3.969413618002761E-221d, - +1.3961255018698695E-220d, - +2.1290855095314206E-220d, - +1.1927747883417406E-219d, - +3.7264401117998796E-219d, - +9.318532410862293E-219d, - +2.3414841777613345E-218d, - +4.3791842770430786E-218d, - +1.7173159016511951E-217d, - +3.5037536832675478E-217d, - +1.4300098613455884E-216d, - +2.4189403362149483E-216d, - +9.306541421999056E-216d, - +3.442100456607687E-215d, - +5.94407068841904E-215d, - +2.0483260435783403E-214d, - +3.8410992889527954E-214d, - +1.2038281262953917E-213d, - +3.865007795216205E-213d, - +9.754659138599756E-213d, - +2.7653605770745684E-212d, - +5.359568079675375E-212d, - +2.61726605666378E-211d, - +5.054202073556894E-211d, - +8.707092668016246E-211d, - +1.4080573899148006E-210d, - +1.288124387778789E-209d, - +1.8639901642011898E-209d, - +6.076014540574561E-209d, - +1.798489141298457E-208d, - +2.1525406805994896E-208d, - +1.1864056832305874E-207d, - +2.1077440662171152E-207d, - +1.3784853708457332E-206d, - +1.6965806532093783E-206d, - +7.241626420445137E-206d, - +2.575584299085016E-205d, - +6.151951078101721E-205d, - +2.40652042118887E-204d, - +4.022633486003565E-204d, - +5.8840879519086286E-204d, - +3.2820308007277566E-203d, - +4.31880454864738E-203d, - +2.427240455243201E-202d, - +7.326955749884755E-202d, - +1.4310184489676175E-201d, - +4.464279133463661E-201d, - +4.895131474682867E-201d, - +4.48614966943544E-200d, - +8.924048768324976E-200d, - +2.5035535029701945E-199d, - +6.627829836338812E-199d, - +2.6066826304502746E-198d, - +8.042275310036546E-198d, - +2.115062964308555E-197d, - +4.413745413236018E-197d, - +1.644449394585716E-196d, - +3.138217752973845E-196d, - +7.48533983136081E-196d, - +2.613626422028823E-195d, - +3.6741841454219095E-195d, - +5.906102862953403E-195d, - +4.4940857547850743E-194d, - +5.840064709376958E-194d, - +3.087661273836024E-193d, - +4.995552216100365E-193d, - +1.991444798915497E-192d, - +7.097454751809522E-192d, - +2.0510193986749737E-191d, - +5.759440286608551E-191d, - +1.7013941257113314E-190d, - +2.1383323934483528E-190d, - +8.280292810015406E-190d, - +3.138655772049104E-189d, - +7.961506427685701E-189d, - +2.0579001228504997E-188d, - +7.530840351477639E-188d, - +1.4582863136475673E-187d, - +3.149267215638608E-187d, - +5.443114553057336E-187d, - +3.4672966834277804E-186d, - +7.374944406615125E-186d, - +2.7318417252599104E-185d, - +7.913674211949961E-185d, - +2.5217716516462005E-184d, - +4.0866585874353075E-184d, - +1.2087698972768686E-183d, - +3.7072473866919033E-183d, - +1.1333588840402273E-182d, - +1.61949812578045E-182d, - +6.567779607147072E-182d, - +2.422974840736314E-181d, - +2.551170809294396E-181d, - +1.0905890688083124E-180d, - +3.221279639653057E-180d, - +7.068244813489027E-180d, - +1.3752309224575428E-179d, - +7.20154303462761E-179d, - +1.5391707185581056E-178d, - +7.708777608683431E-178d, - +5.597398155472547E-178d, - +1.8487854656676722E-177d, - +1.0577249492414076E-176d, - +2.8926683313922764E-176d, - +4.090184282164232E-176d, - +1.6142943398013813E-175d, - +7.873864351702525E-175d, - +2.242630017261011E-174d, - +3.4637009373878283E-174d, - +1.5907089565090164E-173d, - +1.6985075903314236E-173d, - +1.1552273904608563E-172d, - +2.237894048535414E-172d, - +5.321990399912051E-172d, - +1.4106062639738257E-171d, - +2.9850404523368767E-171d, - +1.5683802588004895E-170d, - +4.880146806045633E-170d, - +1.1489352403441815E-169d, - +1.6401586605693734E-169d, - +8.29169700697816E-169d, - +1.0380723705441457E-168d, - +7.126414081261746E-168d, - +1.253325949455206E-167d, - +2.595079206183114E-167d, - +1.537490712803659E-166d, - +2.6338455225993276E-166d, - +7.994936425058567E-166d, - +1.5716634677516025E-165d, - +3.669404761339415E-165d, - +1.9941628263579332E-164d, - +4.5012079983352374E-164d, - +7.283163019991001E-164d, - +2.398038505188316E-163d, - +7.868666894503849E-163d, - +2.1478649410390003E-162d, - +8.306111510463843E-162d, - +1.5453160659068463E-161d, - -4.590496588813841E-162d, - +3.5449293983801232E-161d, - -1.0440854056870505E-160d, - -2.321064927632431E-160d, - +5.707867001443433E-160d, - -2.238614484037969E-159d, - +2.482282821883242E-159d, - -1.1508772192025259E-158d, - +1.9903990578876104E-158d, - -1.2116165315442256E-158d, - -2.9084557554502667E-157d, - -1.1211083853006645E-156d, - -1.309893394818129E-156d, - +4.2269712317468864E-156d, - -7.678973146281339E-156d, - +3.2021376921211934E-155d, - -7.08313012515209E-155d, - +1.944398214330544E-154d, - +1.1860061363751161E-153d, - +1.5234465914578058E-153d, - -2.9020908354550263E-153d, - +4.980100072851796E-153d, - +2.3101551448625578E-152d, - -1.1959241322537072E-151d, - -9.27398924154364E-153d, - +5.999390491704392E-152d, - +1.3373196561281372E-150d, - -1.0271780540759147E-150d, - +2.575620466387945E-150d, - -6.56250013356227E-149d, - -1.1961357917482867E-148d, - +5.5807813570926636E-148d, - +9.252840189663807E-148d, - -1.830335419852293E-147d, - +9.350990339947455E-147d, - -1.6072409939877762E-146d, - -2.5309995887229526E-146d, - -1.6014373376410622E-146d, - -3.303297758377758E-145d, - +1.5640419864850202E-145d, - +9.544642884951585E-145d, - -8.64864445321803E-144d, - +7.580392204597681E-144d, - +2.678334184447568E-143d, - -3.7269289985326055E-143d, - -2.851965258161176E-142d, - +7.243267286265823E-142d, - +4.4510805312036926E-141d, - +9.008499734799015E-141d, - +1.130435759928337E-140d, - -3.096539751496479E-140d, - -1.497405487919762E-139d, - +3.51519845948652E-139d, - -4.713790209541894E-139d, - +4.740753295616865E-138d, - +9.517570994930463E-138d, - -1.8842098029339485E-137d, - -3.825558165008403E-137d, - +1.1817638600528107E-136d, - -3.514601201473235E-136d, - -6.344612631552417E-136d, - -1.6754164785291923E-136d, - +4.445372986583078E-135d, - -3.89604237755475E-134d, - -1.0155552195374609E-134d, - +2.1858142063550155E-134d, - +3.497714990137842E-133d, - -7.635830383612894E-133d, - +1.2050744860079718E-132d, - -7.683019590615251E-133d, - -3.344806129021162E-131d, - -1.6737914131474577E-131d, - -4.30610076666344E-131d, - +5.184023388254773E-130d, - +2.6290763595212492E-129d, - +7.90041744728452E-130d, - -3.204473056113754E-129d, - -2.552517201762272E-128d, - +7.130134251490065E-128d, - -3.2244113258340395E-127d, - -1.064920993515727E-127d, - +2.7466520735457463E-126d, - +4.368312797746065E-126d, - +1.8802599072446818E-125d, - -4.257625799463564E-125d, - +5.491672256552995E-125d, - +3.7298611779671127E-124d, - +5.724180836308973E-124d, - +1.3861841053630075E-123d, - +4.2303826056297614E-123d, - +3.5335436928899096E-123d, - -2.522906629540626E-122d, - +1.0147808005267102E-121d, - +6.734406065735473E-122d, - -4.948973160958133E-121d, - +2.4256181927024344E-120d, - +4.9056283164780554E-120d, - +6.846440394397547E-120d, - +3.512747689569002E-119d, - -9.020907406701404E-119d, - +2.5718749916003624E-118d, - +4.3724191002977524E-119d, - +1.001455050575191E-117d, - -2.4442443105031435E-117d, - +2.38873950760028E-116d, - -4.831068747037129E-118d, - -5.148989321866988E-116d, - +1.7875271881514469E-115d, - -1.1821586412088555E-114d, - +4.43247726423679E-115d, - +4.634817120492781E-114d, - +1.671311907037975E-113d, - -4.595250028278979E-113d, - -5.905511605694905E-113d, - -1.3657642265608213E-112d, - +2.881416869529271E-112d, - +2.1253302469985373E-111d, - -5.301386276260592E-111d, - +1.4198782892306878E-112d, - -3.395494928605007E-110d, - +9.284633292147283E-110d, - -6.054133004896379E-110d, - -8.324100783330331E-109d, - -2.193190669794277E-108d, - +1.3613655394659198E-107d, - +6.463452607647978E-108d, - +1.0187183636134904E-106d, - +1.0705673935006142E-106d, - +2.509050608571019E-106d, - -1.5096182622106617E-105d, - +1.7794190449526737E-106d, - +1.2261246749706581E-104d, - +2.1377905661197194E-104d, - -2.2015877944429946E-104d, - +7.873970951802825E-104d, - -1.7999197335480384E-103d, - +1.0487383011058756E-105d, - -2.9988278531841556E-102d, - +4.7976477743232285E-102d, - +3.452316818502442E-102d, - +5.89953246760617E-101d, - -4.0785601577267006E-101d, - +2.7214076662438963E-100d, - +5.237807655758373E-100d, - +6.180972117932364E-99d, - -1.3019742873005683E-98d, - +4.501188264957416E-99d, - -2.4075054705261798E-98d, - +1.6503086546628772E-97d, - -6.878666975101243E-97d, - +1.196718116616528E-96d, - +2.476190162339265E-96d, - -7.1844969234484515E-96d, - +5.088386759261555E-95d, - +6.749368983223726E-95d, - +1.965737856765605E-94d, - -5.574080023496771E-94d, - +1.2493696959436675E-93d, - +8.533262777516794E-94d, - -7.225259028588793E-93d, - -7.340587186324432E-93d, - -3.482412195764625E-92d, - +3.4742610108480497E-91d, - -7.177274244758699E-91d, - +1.2736636153072213E-90d, - -5.730160886217076E-90d, - -1.545495535488274E-89d, - +1.1304179460367007E-89d, - +1.249260560756154E-88d, - -4.7439719382414206E-88d, - +7.164663249266942E-88d, - +1.7617425105337704E-87d, - +2.4175248449172035E-87d, - -1.043079666926483E-86d, - -2.8137609614326677E-86d, - -1.2091497144395591E-85d, - +3.7944631664558904E-85d, - -2.8144926807308225E-85d, - +3.9782728352520784E-85d, - +4.313978872469646E-84d, - +5.82190887044604E-84d, - +5.883385169571802E-83d, - +1.134857098306787E-82d, - +3.468049324128309E-82d, - +2.625423995658143E-82d, - -3.42827917465521E-81d, - +5.119461911618321E-81d, - -2.134387988350615E-80d, - -4.4703076268400615E-80d, - +4.806078883451016E-80d, - +2.3820250362443495E-79d, - -7.258551497833573E-79d, - -4.0297835558876335E-78d, - +2.1424166787650852E-78d, - -3.2117127164185917E-77d, - +4.8459153070935316E-77d, - -1.766924303914492E-76d, - -2.6921749814579492E-76d, - -4.1291070428848755E-76d, - +2.2086994756104319E-75d, - -7.814146377574201E-75d, - -1.9589778310104216E-74d, - +6.52658129486538E-74d, - +1.7804909509998055E-74d, - -4.1900132227036916E-73d, - +1.5705861683841123E-72d, - -1.904714978998808E-72d, - -7.81295459930537E-72d, - +2.818537910881676E-71d, - +5.840507984320445E-71d, - +1.7331720051707087E-70d, - +1.936946987935961E-70d, - -5.86517231340979E-71d, - -1.3277440528416646E-69d, - +1.9906256185827793E-69d, - +8.668714514280051E-69d, - +6.643105496829061E-69d, - -2.5436254170647032E-67d, - -4.8279217213630774E-67d, - -1.2640304072937576E-66d, - +3.51187258511716E-66d, - +1.4199501303738373E-65d, - -1.2351697477129173E-65d, - +7.0542365522414836E-65d, - +1.030593104122615E-64d, - -5.452692909894593E-65d, - -9.415506349675128E-64d, - -3.6206211446779087E-63d, - -1.6699188275658641E-62d, - +2.287280262665656E-62d, - +7.076135457313529E-62d, - +2.9019628518165404E-61d, - -3.1305705497720186E-61d, - +2.2978757040142953E-60d, - +1.2424439441817321E-60d, - +7.140343013236265E-60d, - +8.633726388939636E-60d, - +1.3483035574114863E-58d, - +1.653701058949654E-58d, - -8.939932297357388E-58d, - -1.395320103272191E-57d, - +6.440430933947252E-58d, - -1.681200826841738E-56d, - +3.9904382022898837E-56d, - -4.870518577546228E-56d, - -1.6990896855901115E-55d, - -6.751434891261518E-56d, - -1.669012123121194E-54d, - -4.079585475491198E-54d, - -1.3070436427679952E-53d, - -3.090028378908628E-53d, - +7.468160889798606E-53d, - +6.229095980733463E-53d, - +1.4794751934479566E-52d, - +1.7444373785853918E-51d, - -5.3681978363391484E-52d, - +2.71853394036182E-51d, - -1.3334367969274016E-50d, - -1.6958057665854177E-49d, - -1.452507231312146E-49d, - +3.3855429446520427E-49d, - +4.903687986212687E-49d, - +2.2185957416622524E-48d, - -9.924196700842429E-48d, - +4.285128462851149E-47d, - +3.076063086193525E-48d, - +4.102052341676543E-46d, - +1.1745772638457318E-45d, - -5.309047216809048E-47d, - +2.72972449891179E-45d, - -1.1748423022293739E-44d, - +6.626052626622228E-44d, - +3.0227439688367925E-44d, - -4.740494808228372E-43d, - +5.926057457356852E-43d, - +3.09768273342776E-42d, - -5.589493227475577E-42d, - -8.84908716783327E-42d, - +2.3684740712822874E-41d, - +1.4836491430755657E-40d, - +4.5878801324451396E-40d, - +1.0585156316103144E-39d, - +2.3805896467049493E-39d, - +1.0285082556185196E-38d, - +2.5187968110874885E-38d, - -1.4088399542613178E-38d, - -3.00901028043488E-38d, - +2.0089026801414973E-37d, - -1.3324111396289096E-36d, - +5.458481186294964E-36d, - -4.8402541351522003E-36d, - -1.3331969720555312E-35d, - -8.248332290732976E-35d, - -1.8349670703969982E-34d, - +6.403477383195494E-34d, - +3.7813691654412385E-34d, - +2.4621305031382827E-33d, - -5.634051826192439E-33d, - +3.817173955083142E-32d, - -6.038239639506472E-32d, - -2.130447095555397E-31d, - -6.824454861992054E-31d, - -1.3455801602048414E-30d, - -2.518642767561659E-30d, - +8.082792416221215E-30d, - +4.718103502869148E-29d, - -5.607991635038776E-29d, - -1.8042191582018579E-28d, - +6.989914264479507E-28d, - -2.9031739430339586E-28d, - +6.076820259849921E-27d, - -3.24981577480893E-27d, - -2.7648210023059463E-26d, - -9.785306155980342E-26d, - +1.241529292737115E-25d, - +3.0891604448087654E-25d, - +2.3451052074796954E-24d, - +6.574128018028633E-24d, - -1.3345148716925826E-23d, - +4.3594621428644293E-23d, - -5.678896695157704E-23d, - -4.676849004137386E-23d, - -2.281578975407609E-22d, - -3.144430608076357E-21d, - +5.662033727488754E-22d, - -4.30293375386492E-21d, - +4.985137671479376E-20d, - +1.657668502165438E-19d, - -3.3878706977811337E-19d, - -7.488022803661722E-19d, - +1.725039737424264E-18d, - -6.0275040161173166E-18d, - -8.081007442213538E-19d, - +2.9257892371894816E-17d, - +1.5231541295722552E-16d, - -1.1474026049124666E-17d, - +6.890372706231206E-16d, - +2.592721454922832E-15d, - -1.1253822296423454E-15d, - -2.650684279637763E-14d, - -4.107226967119929E-15d, - -3.130508064738312E-14d, - -6.729414275200856E-14d, - -1.6166170913368169E-12d, - -1.2059301405584488E-12d, - -1.2210091619211167E-11d, - +3.695372823623631E-12d, - +5.119220484478292E-11d, - -1.0857572226543142E-10d, - -4.6490379071586397E-10d, - -4.5810381714280557E-10d, - +1.4909756678328582E-9d, - -1.3155828104004438E-8d, - -9.149755188170102E-9d, - +0.0d, - +8.254840070411029E-8d, - -1.0681886149151956E-7d, - -3.359944163407147E-8d, - -2.1275002921718894E-6d, - +1.2129920353421116E-5d, - +2.1520078872608393E-5d, - +1.0178783359926372E-4d, - -2.077077172525637E-5d, - -5.67996159922899E-5d, - +9.510567165169581E-4d, - +0.0010901978184553272d, - +0.010169003920808009d, - +0.017008920503326107d, - +0.03416477677774927d, - -0.1275278893606981d, - +0.5205078726367633d, - +0.7535752982147762d, - +1.1373305111387886d, - -3.036812739155085d, - +11.409790277969124d, - -9.516785302789955d, - -49.86840843831867d, - -393.7510973999651d, - -686.1565277058598d, - +4617.385872524165d, - -11563.161235730215d, - -8230.201383316231d, - -34460.52482632287d, - +50744.04207438878d, - +357908.46214699093d, - +1936607.425231087d, - +3222936.695160983d, - +5477052.0646243105d, - -3.517545711859706E7d, - -1.2693418527187027E8d, - -2.5316384477288628E8d, - -1.6436423669122624E8d, - +4.0889180422033095E8d, - +4.968829330953611E9d, - -3.503399598592085E9d, - +1.905394922122271E10d, - +1.0361722296739479E11d, - -5.806792575852521E10d, - +2.3454138776381036E11d, - -1.718446464587963E12d, - -1.0946634815588584E12d, - +1.6889383928999305E13d, - -3.784600043778247E13d, - +7.270965670658928E13d, - -4.9202842786896806E14d, - +4.597700093952774E14d, - +2.6113557852262235E15d, - -4.544525556171388E15d, - -9.517971970450354E15d, - -2.0634857819227416E16d, - -9.7143113104549808E16d, - -2.2667083759873216E16d, - -7.2285665164439578E17d, - +4.1215410760803866E18d, - +8.5807488300972206E18d, - +1.530436781375042E19d, - -1.5453111533064765E19d, - -1.0633845571643594E20d, - -3.512380426745336E20d, - +3.7734658676841284E20d, - -3.855478664503271E21d, - +7.984485303520287E21d, - -1.2296934902142301E22d, - +1.042139023692827E22d, - +1.2167897656061312E23d, - +9.22064170155394E22d, - +3.965171513035854E23d, - -4.135121057126514E24d, - -7.944341754299148E24d, - +1.4715152230577016E25d, - -3.0635272288480756E25d, - -9.54468158713835E25d, - +1.5411775738825048E25d, - -8.274711842374368E26d, - -1.0028324930788433E27d, - +5.189062091114782E27d, - -2.8583500869462184E28d, - -5.198295198128238E28d, - +2.9758750368256437E29d, - +3.216046320616945E29d, - -1.7846700158234043E30d, - +3.847174961282827E30d, - +9.026991921214922E30d, - +4.1358029739592175E30d, - -6.461509354879894E29d, - +9.704297297526684E31d, - +2.9731739067444943E32d, - +9.97728609663656E32d, - +3.1149346370027763E33d, - +2.0051635097366476E34d, - +2.819272221032373E34d, - +1.6266731695798413E34d, - +1.998050894021586E35d, - -6.1633417615076335E35d, - +2.2505716077585116E36d, - +1.9299691540987203E36d, - +8.006569251375383E36d, - -3.785295042408568E37d, - -1.1870498357197593E38d, - +1.0010529668998112E38d, - +1.3240710866573994E38d, - +2.6888010385137123E39d, - +1.7400655988987023E39d, - -6.402740469853475E39d, - -3.93114092562274E40d, - +1.2363717201084252E41d, - -1.9219116633978794E41d, - -1.347867098583136E42d, - +7.87675118338788E41d, - +3.3932984011177642E41d, - -1.9872713979884691E43d, - +2.220208491349658E43d, - -3.466267817480825E43d, - +3.19462030745197E44d, - -9.841244788104406E44d, - -2.2676593395522725E45d, - -1.1349246400274207E46d, - -1.1700910284427406E46d, - -3.6754317105801715E46d, - +1.7647101734915075E47d, - +2.122358392979746E47d, - +3.156243682143956E47d, - +5.356668151937413E47d, - +2.7668218233914262E48d, - +3.5127708120698784E48d, - +1.7884841356632925E49d, - +1.716531820904728E50d, - -2.9114757102866277E50d, - +1.0657703081219677E51d, - -7.512169809356372E50d, - +1.764200470879736E51d, - -1.0088898215431471E52d, - -3.1085734725176E52d, - +4.3529009584292495E52d, - -2.467842129213774E53d, - -3.9317379627195146E53d, - -4.332335454045836E52d, - +7.979013724931926E54d, - -1.5038413653121357E55d, - +9.310799925566843E55d, - -2.2042966348036592E55d, - -4.518315366841937E55d, - -6.971366338144781E56d, - -2.0461505570781806E57d, - -8.823884392655312E57d, - -1.1264032993918548E58d, - -7.692065092509875E58d, - -1.8472516879728875E59d, - +8.72220314694275E58d, - +1.6525336989036362E59d, - -3.343201925128334E60d, - +5.493352163155986E60d, - -2.548073509300398E61d, - -9.566541624209933E61d, - +4.0891054447206644E61d, - -7.724182294653349E62d, - +1.0143022354947225E63d, - -4.952031310451961E63d, - -7.877410133454722E63d, - +4.505432606253564E64d, - -7.330635250808021E64d, - -1.642361029990822E65d, - +5.982180242124184E65d, - +7.120242132370469E65d, - +5.908356249789671E66d, - -2.8477710945673134E65d, - +6.65688196961235E66d, - -9.233295580238604E67d, - +3.2850043261803593E68d, - +7.041681569694413E68d, - -1.5652761725518397E69d, - +1.5377053215489084E68d, - +1.282130763903269E70d, - -2.380286345847567E70d, - -7.207022875977515E70d, - +2.7641662602473095E71d, - +7.685235201534525E71d, - +4.3239378585884645E70d, - -1.6840562544109314E72d, - -5.04128025464686E71d, - +5.4557485189210095E73d, - +7.160277784358221E73d, - +7.636179075087608E73d, - -8.18804507680012E74d, - +2.807397988979441E75d, - +2.165163304600171E75d, - -1.3208450062862734E76d, - -5.1939252391404724E76d, - -6.985952908805853E76d, - -1.6259920998287064E77d, - +6.098975200926637E77d, - -5.63383579957466E77d, - -1.5876819186852907E78d, - +2.1487475413123092E79d, - -3.987619123706934E79d, - +9.772655251656639E79d, - -1.638756156057952E79d, - -7.83892088580041E80d, - +1.274413296252691E81d, - +2.51946651720982E81d, - -2.516866097506943E81d, - +1.053956282234684E82d, - +1.8279051206232177E83d, - +1.2250764591564252E82d, - -4.0353723442917463E83d, - -1.4121324224340735E84d, - -5.45287716696021E84d, - -1.7514953095665195E85d, - -5.0706081370522526E85d, - -4.35799392139009E85d, - -3.982538093450217E86d, - -1.4591838284752642E87d, - +2.5313735821872488E87d, - -3.718501227185903E86d, - -1.3907979640327008E88d, - -5.79002114093961E86d, - -1.2500675565781447E89d, - +4.8182788286170926E89d, - -1.7198866036687559E90d, - -4.690417668647599E88d, - +1.3020631859056421E91d, - -1.3850458263351744E91d, - +4.87301010703588E91d, - -1.695546877943826E92d, - -1.6353756659909833E92d, - -1.5483926773679628E93d, - -1.8921091400297595E93d, - -6.183525570536406E93d, - -4.987913342551977E93d, - +1.0186485886120274E93d, - -1.5343120819745468E95d, - -5.262123923229857E95d, - +1.618327917706804E96d, - -4.135185828158998E96d, - -8.016793741945299E96d, - -3.0399439534134115E97d, - -1.2319346292749103E98d, - +7.536337311795176E97d, - -3.577715974851322E98d, - +2.0521614818695524E99d, - +1.2627736197958951E98d, - -5.206910481915062E99d, - +3.0974593993948837E100d, - -9.522726334561169E100d, - -1.1909272509710985E100d, - -5.056512677995137E101d, - +2.0902045062932175E102d, - +6.243669516810509E102d, - -1.7375090618655787E103d, - -2.5445477450140954E103d, - +3.619891246849381E103d, - +8.90737333900943E103d, - -2.7897360297480367E104d, - +1.3725786770437066E105d, - -8.316530604593264E105d, - -6.054541568735673E105d, - +7.523374196797555E105d, - +1.1475955030427985E107d, - +1.5260756679495707E107d, - +7.370294848920685E107d, - +1.3608995799112174E108d, - +1.0700758858011432E108d, - -4.989318918773146E108d, - -1.6629755787634093E108d, - +7.635999584053557E109d, - +1.892621828736983E109d, - -6.793094743406533E110d, - -8.160628910742724E110d, - -7.724219106106896E111d, - -1.6059226011778748E112d, - -1.5277127454062126E112d, - +3.911086668967361E112d, - +3.529920406834134E113d, - -4.3991443996021166E113d, - -1.2631909085915044E114d, - +3.8656278695544835E114d, - +1.71845288713123E115d, - +3.7660598745907915E115d, - -4.048086182363988E115d, - +2.3093822298965837E116d, - -9.684925795536813E116d, - -3.137992585221854E117d, - -5.637415935329794E117d, - -1.5536658521931418E118d, - -6.336314643222911E118d, - +8.550658957115427E118d, - -5.591880480212007E119d, - +2.4137404318673354E119d, - -2.631656656397244E120d, - -7.653117429165879E119d, - -4.073965591445897E121d, - +3.634781057940233E121d, - +4.537273754534966E121d, - -2.5138919966097735E122d, - -1.0292817180691822E123d, - -1.4265564976097062E122d, - +6.000235114895513E123d, - +4.186590347846346E124d, - -1.8950538406321535E124d, - +7.716762345695022E124d, - -4.443798187035849E125d, - -2.268994961992292E125d, - -2.8169291774231604E126d, - -2.749127978087685E126d, - -2.2929764629585683E126d, - -7.369842361872221E127d, - +2.81312841469177E128d, - +2.7856896414497757E128d, - -3.096733638475319E128d, - -5.4199510725063615E129d, - -7.315860999413894E129d, - +3.6424644535156437E130d, - -7.886250961456327E130d, - +5.289988151341401E130d, - +2.7758613753516344E131d, - -2.738246981762776E132d, - -2.2667181460478093E132d, - -3.614672661225457E131d, - +2.325337720526947E133d, - +4.16603235883392E133d, - -6.50348962894948E133d, - +3.851445905038431E134d, - -5.46060534001412E134d, - +5.4679180659102885E135d, - -3.037477806841494E135d, - -3.0417051809209134E136d, - -6.995964550587914E136d, - -3.6897084415718804E137d, - -6.938000231893302E137d, - +2.403806217004454E138d, - -3.4552363953199905E138d, - +7.3409917428393E138d, - -1.7445917446236717E139d, - -6.680679913078676E139d, - -8.193572619487537E139d, - +5.337290292186291E139d, - -3.951314467739045E140d, - -4.4662073456574476E141d, - +6.249381778908997E141d, - -2.928362616578011E142d, - -1.6661676835672304E143d, - -1.974465323891493E143d, - +1.3083870531380308E144d, - -2.382825271750576E144d, - -5.4826958838142734E144d, - +1.5340733916570804E145d, - -3.1327120557842516E145d, - +1.5790297768522832E146d, - +1.1518771984292262E146d, - -4.789917000227385E145d, - -8.689594184775204E146d, - +3.0680417869552433E146d, - +4.877860620031438E147d, - -3.4650891244084597E148d, - +1.8702183451052442E149d, - -3.5727227900139915E148d, - -1.3457821696677932E150d, - +3.3212950284273017E149d, - +7.316033240396569E150d, - -7.187723217018267E150d, - -8.537194547485455E150d, - -1.4561530066010593E152d, - -7.548155147049997E151d, - +1.0047353208353007E153d, - -1.2489460589853119E153d, - +4.426120229279107E153d, - -2.5466223330961086E154d, - +8.831699889789037E154d, - -2.0258084311749475E155d, - -5.525009099476396E155d, - -1.0235056525096769E156d, - -4.117971654572494E154d, - -4.7559175309753334E156d, - -1.4656240137098836E157d, - -7.675790582869644E157d, - -1.0126616322947826E158d, - +7.084865265284368E158d, - -9.374695893307895E158d, - +2.05597910889115E159d, - -7.368602086210704E159d, - -1.6167825196198978E160d, - +2.3832096207000712E160d, - +1.3166970112139726E161d, - -6.432337568761393E161d, - +2.9279594746502846E161d, - +4.8926595743317624E162d, - +1.2704793774453618E163d, - -1.1345910784680524E163d, - +7.75933511025868E163d, - -1.1441115218462356E163d, - +5.162248481759758E164d, - +6.362563919556132E164d, - -2.8362173224732088E165d, - -4.342161053332263E165d, - +4.388125271425036E166d, - -7.049068240916723E166d, - +3.8520227881415595E166d, - +2.9274120974020826E167d, - -7.500936767542933E167d, - -6.540181860667302E168d, - +4.664436780622191E168d, - -1.436111169285268E169d, - -1.0407581736224179E170d, - -2.7670181051374297E170d, - -6.788169932297778E170d, - +1.6997387217850427E171d, - -1.0965324942770584E171d, - +9.841563119484623E171d, - +3.175748919314254E172d, - +2.9621181706527444E172d, - -3.30101656090905E173d, - -3.791840683760427E173d, - -2.841347842666459E174d, - -7.836327226971707E174d, - +9.650358667643114E174d, - +5.9994277301267294E175d, - -6.0490084078440215E175d, - -2.8964095485948707E176d, - +9.916187343252014E175d, - +2.7535627955313556E176d, - +3.886891475472745E177d, - +3.1962472803616787E178d, - -5.50599549115449E178d, - +5.672812341879918E178d, - -3.295268490032475E179d, - +9.761163062156018E179d, - +3.107837179570674E180d, - +3.3894811576571423E179d, - -5.235397688850367E180d, - -5.004237248003625E181d, - -1.7544995191195304E182d, - +2.645622651144787E182d, - -3.459885432869825E182d, - -4.0361435606199565E183d, - -1.8382923511801317E183d, - -1.7332235571505177E184d, - +2.847653455671381E184d, - +1.7991060813894693E185d, - -2.0937429891059164E185d, - +5.744446753652847E185d, - -2.1349396267483754E184d, - -1.2542332720182776E186d, - +3.3730714236579374E186d, - -5.923734606208998E187d, - +2.24669039465627E188d, - -1.2588742703536392E188d, - +1.474522484905093E189d, - -2.4006971787803736E189d, - -3.52597540499141E189d, - +2.6676722922838097E190d, - +5.27579825970359E190d, - +2.1360492104281465E191d, - +1.9442210982008953E191d, - -1.4691239161932232E190d, - +3.8218180377739526E192d, - +1.9722862688653467E192d, - +3.047601928063002E193d, - +1.6747356805175311E193d, - +7.710512446969693E192d, - +1.7780021277684035E194d, - -1.4015110811648513E195d, - +4.0447634595724164E195d, - +9.023639664212642E195d, - +1.976868146639626E196d, - -9.084495133765657E196d, - -1.2023077889892748E196d, - +5.7455368446308694E197d, - -1.7766273910482863E198d, - +3.5590470673352285E198d, - +1.1304970373249033E199d, - +1.6496143246803731E199d, - -2.394588390685223E199d, - -1.4677321100833294E199d, - -1.1843870433971731E201d, - -1.8853982316037226E201d, - +2.8829871423339434E201d, - +5.369687677705385E200d, - +1.8356062677502141E202d, - -1.5544655377217875E203d, - +2.955364187248884E203d, - -2.7651059253677425E203d, - +9.903174064539538E203d, - -3.284204788892967E204d, - -1.5843229740595697E205d, - +5.333371443528904E204d, - +1.2781631468016048E205d, - +3.2188292385399854E205d, - -6.619064395428225E206d, - +1.291561142865928E207d, - +1.3142988156905172E207d, - -1.3841980097978606E208d, - +6.380177790989479E207d, - +1.0386032577072378E209d, - +2.7681631086098026E209d, - -9.053874899534375E209d, - +1.2424707839848734E210d, - +1.045546633850141E211d, - -1.2448938139338362E211d, - +7.221902646057552E211d, - +6.651345415954053E211d, - -5.8180712702152444E212d, - +5.275183961165903E212d, - +5.092753117288608E212d, - -2.437796532151255E213d, - +1.3480763914637323E214d, - +5.619995933180841E214d, - +2.547000388735681E214d, - +4.817319356453926E214d, - -7.897146442236022E215d, - -7.93844120619577E215d, - -4.9489938500591624E216d, - -2.862720607805682E216d, - -2.9275804461593914E217d, - -3.411186219855533E217d, - -2.0110092718356274E218d, - -8.472642266772353E218d, - -4.357990742470246E217d, - +4.793444363780116E219d, - +1.6544084224626834E220d, - -6.017988576347111E220d, - -3.580397221598409E220d, - -4.7208848667217906E221d, - -7.724899660259369E221d, - -2.4459728627968634E222d, - +3.667348665023154E221d, - +4.544122762558404E223d, - -4.0573420909530794E223d, - -3.2552002992257195E223d, - -6.488296536838142E224d, - +1.7544839352461719E224d, - -4.0873400635183405E225d, - -8.833499967268279E225d, - -1.0953484767704112E226d, - -8.56825295972308E226d, - -1.8097633115378247E227d, - -6.171564449018882E227d, - -4.351843341274115E227d, - +2.8032429752543687E228d, - -1.0065901934522996E229d, - +9.863720960170636E228d, - -9.481088691357648E229d, - -1.6843492713373762E229d, - -1.3282890219894906E230d, - +6.883577595238845E230d, - -1.153577281189635E231d, - -8.009548754642203E231d, - -4.722612904888278E232d, - -4.768909872963015E232d, - +3.2542391242036633E233d, - +6.513425781583774E233d, - -1.8889614379831606E233d, - -2.227647301474917E234d, - -4.7971208532986115E234d, - +6.693500938105557E234d, - -6.587776621471115E234d, - +3.0099905634916516E236d, - -4.6694407626686244E235d, - +2.965546585110978E236d, - +5.771457643937893E237d, - -9.029878114318277E237d, - +8.169926810324408E237d, - -1.779945804977441E239d, - +4.1218749988429474E239d, - +7.201319954099161E239d, - -1.530845432304069E240d, - -3.861762510530086E240d, - -2.4090696463777446E241d, - -1.8196842273916379E241d, - -1.7959243076374794E242d, - -3.7257346819782323E242d, - +3.413310324247329E242d, - -2.0406580894051073E243d, - -1.5335923091350053E243d, - -1.056727406551016E244d, - -4.6753408714233723E244d, - -2.0697130057384643E245d, - -1.0356006160554071E245d, - +1.1339195187304043E246d, - +1.792783182582235E246d, - +9.599214853681978E245d, - +1.5367645598839362E247d, - +2.934570385464815E247d, - -1.6411525886171892E248d, - +2.2638862982382794E248d, - -1.2268014119628852E249d, - +4.737693450915584E247d, - +6.3818993714899675E249d, - +1.2639113706171572E250d, - -4.011320021817099E249d, - -5.2744376732859406E250d, - -3.732266217624991E251d, - +1.7591819833844019E252d, - -3.292458622014749E252d, - -9.161340309319204E252d, - -1.728610646009749E253d, - +1.1698424008604891E254d, - -1.8494343291160577E254d, - +2.0568656302182574E254d, - +1.0537591246531136E255d, - +1.803052068234866E254d, - -1.053036399720808E256d, - +2.1836166619192508E256d, - +1.0368403169781264E257d, - -2.0648015610276362E257d, - +8.426174035728768E257d, - -1.3577357192972777E258d, - +2.1313950901331177E258d, - +8.919141843592823E258d, - -1.1800039972549816E259d, - -1.1878772398311421E260d, - -1.538273497873993E260d, - -4.51305093266001E260d, - +1.1241179396053055E261d, - +6.154786508667658E261d, - -1.0626125049032536E262d, - -1.8908603201210102E262d, - -4.571195152299358E262d, - +1.526100002923062E263d, - -9.457084582570225E263d, - -1.5460500618825853E264d, - -5.598276199126451E264d, - -1.2074097381167957E265d, - -3.015972957475025E265d, - +1.4345106852061226E265d, - +8.28479585346867E265d, - -3.118741081244705E266d, - -1.2054747399765794E266d, - +3.4454766202661184E267d, - +1.1279135096919439E268d, - +1.2066382528772518E268d, - +1.1984128162292276E269d, - +3.685169705587367E268d, - +6.570047690198998E269d, - +1.8836492887460383E270d, - +7.4364594917181125E270d, - +1.2773080633674971E271d, - +1.8928981707279692E271d, - +4.039437286589528E271d, - +1.785277385538302E272d, - -6.017681359527226E272d, - +1.9716943051755635E273d, - -8.772048092842086E271d, - +1.5645672698520312E274d, - -3.7979660725865874E274d, - +5.324902289537048E274d, - -1.8806716685063293E274d, - +9.320900373401115E275d, - +1.4615985810260016E275d, - +8.321226457219046E276d, - -4.608112855795952E276d, - -3.476352191116455E277d, - +5.266381689434054E277d, - -9.622106063561645E277d, - +4.1719443712336026E278d, - +4.222411269063919E279d, - -6.714376022102489E279d, - -1.0732735585199074E280d, - -2.5866883048437488E280d, - -1.1306860837934988E281d, - +3.690690354793168E281d, - -5.5299180508885456E281d, - +2.7006726968568243E282d, - +4.135457669031131E282d, - +2.8401159516008676E283d, - +5.127265762024798E283d, - -3.4893601256685762E283d, - -1.145160459652136E283d, - +2.1742808735341656E284d, - +4.656972469326391E285d, - +7.672307991205681E285d, - +1.5781599575584034E286d, - +4.218682431618625E286d, - -2.4602260687026867E287d, - +2.7211316452521414E287d, - -1.8740018211089393E288d, - +2.6367639658206183E288d, - -3.102678910525039E288d, - +1.1992295328636466E289d, - +6.8190133180135345E289d, - +5.783203879030497E289d, - +5.171047077293295E290d, - +1.8396930096213817E290d, - +1.4977047507315718E290d, - +1.0672499803427623E292d, - +3.3310942289102464E291d, - -7.962256961838823E292d, - +1.7396889119023863E293d, - +3.8072183820435085E293d, - +2.2772059538865722E294d, - -2.0549866377878678E294d, - -1.2277120342804144E295d, - -3.609949022969024E295d, - +1.1479863663699871E296d, - -1.5314373779304356E296d, - -2.2537635160762597E296d, - -6.1370690793508674E296d, - -4.996854125490041E297d, - -6.883499809714189E297d, - -2.595456638706416E298d, - -1.1892631528580186E299d, - -1.4672600326020399E299d, - -3.200068509818696E299d, - -7.126913872617518E298d, - -3.3655587417265094E300d, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - Double.NaN, - }; - - - /** Exponential over the range of 0 - 1 in increments of 2^-10 - * exp(x/1024) = expFracTableA[x] + expFracTableB[x]. - * 1024 = 2^10 - */ - private static final double[] EXP_FRAC_A = new double[] { - +1.0d, - +1.0009770393371582d, - +1.0019550323486328d, - +1.0029339790344238d, - +1.0039138793945312d, - +1.004894733428955d, - +1.0058765411376953d, - +1.006859302520752d, - +1.007843017578125d, - +1.0088276863098145d, - +1.0098135471343994d, - +1.0108001232147217d, - +1.0117876529693604d, - +1.0127761363983154d, - +1.013765811920166d, - +1.014756202697754d, - +1.0157477855682373d, - +1.016740083694458d, - +1.0177335739135742d, - +1.0187277793884277d, - +1.0197231769561768d, - +1.0207195281982422d, - +1.021716833114624d, - +1.0227150917053223d, - +1.023714303970337d, - +1.024714469909668d, - +1.0257158279418945d, - +1.0267179012298584d, - +1.0277209281921387d, - +1.0287251472473145d, - +1.0297303199768066d, - +1.0307364463806152d, - +1.0317435264587402d, - +1.0327515602111816d, - +1.0337605476379395d, - +1.0347704887390137d, - +1.0357816219329834d, - +1.0367934703826904d, - +1.037806510925293d, - +1.038820505142212d, - +1.0398354530334473d, - +1.040851354598999d, - +1.0418684482574463d, - +1.0428862571716309d, - +1.043905258178711d, - +1.0449252128601074d, - +1.0459461212158203d, - +1.0469679832458496d, - +1.0479910373687744d, - +1.0490150451660156d, - +1.0500397682189941d, - +1.0510656833648682d, - +1.0520927906036377d, - +1.0531206130981445d, - +1.0541496276855469d, - +1.0551795959472656d, - +1.0562105178833008d, - +1.0572423934936523d, - +1.0582754611968994d, - +1.059309482574463d, - +1.0603444576263428d, - +1.061380386352539d, - +1.0624175071716309d, - +1.06345534324646d, - +1.0644943714141846d, - +1.0655345916748047d, - +1.066575527191162d, - +1.067617654800415d, - +1.0686607360839844d, - +1.0697050094604492d, - +1.0707499980926514d, - +1.071796178817749d, - +1.072843313217163d, - +1.0738916397094727d, - +1.0749409198760986d, - +1.075991153717041d, - +1.0770423412322998d, - +1.078094720840454d, - +1.0791480541229248d, - +1.080202341079712d, - +1.0812578201293945d, - +1.0823142528533936d, - +1.083371639251709d, - +1.08443021774292d, - +1.0854897499084473d, - +1.086550235748291d, - +1.0876119136810303d, - +1.088674545288086d, - +1.089738130569458d, - +1.0908029079437256d, - +1.0918686389923096d, - +1.092935562133789d, - +1.094003438949585d, - +1.0950722694396973d, - +1.096142053604126d, - +1.0972130298614502d, - +1.09828519821167d, - +1.099358320236206d, - +1.1004323959350586d, - +1.1015074253082275d, - +1.102583646774292d, - +1.103661060333252d, - +1.1047391891479492d, - +1.105818748474121d, - +1.1068990230560303d, - +1.107980489730835d, - +1.1090631484985352d, - +1.1101467609405518d, - +1.1112313270568848d, - +1.1123170852661133d, - +1.1134037971496582d, - +1.1144917011260986d, - +1.1155805587768555d, - +1.1166706085205078d, - +1.1177616119384766d, - +1.1188538074493408d, - +1.1199469566345215d, - +1.1210410594940186d, - +1.1221363544464111d, - +1.1232328414916992d, - +1.1243302822113037d, - +1.1254286766052246d, - +1.126528263092041d, - +1.127629041671753d, - +1.1287307739257812d, - +1.129833459854126d, - +1.1309373378753662d, - +1.132042407989502d, - +1.133148431777954d, - +1.1342556476593018d, - +1.1353638172149658d, - +1.1364731788635254d, - +1.1375834941864014d, - +1.1386950016021729d, - +1.1398074626922607d, - +1.1409211158752441d, - +1.142035961151123d, - +1.1431517601013184d, - +1.14426851272583d, - +1.1453864574432373d, - +1.14650559425354d, - +1.1476259231567383d, - +1.148747205734253d, - +1.149869441986084d, - +1.1509928703308105d, - +1.1521174907684326d, - +1.153243064880371d, - +1.154369831085205d, - +1.1554977893829346d, - +1.1566267013549805d, - +1.1577568054199219d, - +1.1588881015777588d, - +1.160020351409912d, - +1.161153793334961d, - +1.1622881889343262d, - +1.163423776626587d, - +1.1645605564117432d, - +1.1656982898712158d, - +1.166837215423584d, - +1.1679773330688477d, - +1.1691184043884277d, - +1.1702606678009033d, - +1.1714041233062744d, - +1.172548532485962d, - +1.173694133758545d, - +1.1748409271240234d, - +1.1759889125823975d, - +1.177137851715088d, - +1.1782879829406738d, - +1.1794393062591553d, - +1.1805915832519531d, - +1.1817450523376465d, - +1.1828997135162354d, - +1.1840553283691406d, - +1.1852121353149414d, - +1.1863701343536377d, - +1.1875293254852295d, - +1.1886897087097168d, - +1.1898510456085205d, - +1.1910135746002197d, - +1.1921772956848145d, - +1.1933419704437256d, - +1.1945080757141113d, - +1.1956751346588135d, - +1.1968433856964111d, - +1.1980125904083252d, - +1.1991832256317139d, - +1.200354814529419d, - +1.2015275955200195d, - +1.2027015686035156d, - +1.2038767337799072d, - +1.2050528526306152d, - +1.2062301635742188d, - +1.2074086666107178d, - +1.2085883617401123d, - +1.2097692489624023d, - +1.210951328277588d, - +1.2121343612670898d, - +1.2133188247680664d, - +1.2145042419433594d, - +1.2156908512115479d, - +1.2168786525726318d, - +1.2180676460266113d, - +1.2192575931549072d, - +1.2204489707946777d, - +1.2216413021087646d, - +1.222834825515747d, - +1.224029779434204d, - +1.2252256870269775d, - +1.2264227867126465d, - +1.227621078491211d, - +1.2288203239440918d, - +1.2300209999084473d, - +1.2312228679656982d, - +1.2324256896972656d, - +1.2336299419403076d, - +1.234835147857666d, - +1.23604154586792d, - +1.2372493743896484d, - +1.2384581565856934d, - +1.2396681308746338d, - +1.2408792972564697d, - +1.2420918941497803d, - +1.2433054447174072d, - +1.2445201873779297d, - +1.2457361221313477d, - +1.2469532489776611d, - +1.2481715679168701d, - +1.2493910789489746d, - +1.2506117820739746d, - +1.2518336772918701d, - +1.2530567646026611d, - +1.2542810440063477d, - +1.2555065155029297d, - +1.2567331790924072d, - +1.2579610347747803d, - +1.2591900825500488d, - +1.260420322418213d, - +1.2616519927978516d, - +1.2628846168518066d, - +1.2641184329986572d, - +1.2653534412384033d, - +1.266589879989624d, - +1.2678272724151611d, - +1.2690660953521729d, - +1.27030611038208d, - +1.2715470790863037d, - +1.272789478302002d, - +1.2740330696105957d, - +1.275277853012085d, - +1.2765238285064697d, - +1.27777099609375d, - +1.2790195941925049d, - +1.2802691459655762d, - +1.281519889831543d, - +1.2827720642089844d, - +1.2840254306793213d, - +1.2852799892425537d, - +1.2865357398986816d, - +1.287792682647705d, - +1.2890510559082031d, - +1.2903103828430176d, - +1.2915711402893066d, - +1.2928330898284912d, - +1.2940962314605713d, - +1.2953605651855469d, - +1.296626091003418d, - +1.2978930473327637d, - +1.2991611957550049d, - +1.3004305362701416d, - +1.3017010688781738d, - +1.3029727935791016d, - +1.304245948791504d, - +1.3055200576782227d, - +1.3067958354949951d, - +1.308072566986084d, - +1.3093504905700684d, - +1.3106298446655273d, - +1.3119103908538818d, - +1.3131921291351318d, - +1.3144752979278564d, - +1.3157594203948975d, - +1.317044973373413d, - +1.3183319568634033d, - +1.31961989402771d, - +1.3209092617034912d, - +1.322199821472168d, - +1.3234915733337402d, - +1.324784755706787d, - +1.3260791301727295d, - +1.3273746967315674d, - +1.3286716938018799d, - +1.329969882965088d, - +1.3312692642211914d, - +1.3325698375701904d, - +1.333871841430664d, - +1.3351752758026123d, - +1.336479663848877d, - +1.3377854824066162d, - +1.339092493057251d, - +1.3404009342193604d, - +1.3417105674743652d, - +1.3430213928222656d, - +1.3443336486816406d, - +1.3456470966339111d, - +1.3469617366790771d, - +1.3482778072357178d, - +1.349595069885254d, - +1.3509137630462646d, - +1.352233648300171d, - +1.3535549640655518d, - +1.3548774719238281d, - +1.356201171875d, - +1.3575263023376465d, - +1.3588526248931885d, - +1.360180139541626d, - +1.361509084701538d, - +1.3628394603729248d, - +1.364171028137207d, - +1.3655037879943848d, - +1.366837978363037d, - +1.368173360824585d, - +1.3695101737976074d, - +1.3708481788635254d, - +1.372187614440918d, - +1.373528242111206d, - +1.3748703002929688d, - +1.376213550567627d, - +1.3775582313537598d, - +1.378904104232788d, - +1.380251407623291d, - +1.3815999031066895d, - +1.3829498291015625d, - +1.384300947189331d, - +1.3856534957885742d, - +1.387007236480713d, - +1.3883624076843262d, - +1.389719009399414d, - +1.3910768032073975d, - +1.3924360275268555d, - +1.393796443939209d, - +1.395158290863037d, - +1.3965213298797607d, - +1.397885799407959d, - +1.3992514610290527d, - +1.4006187915802002d, - +1.401987075805664d, - +1.4033570289611816d, - +1.4047281742095947d, - +1.4061005115509033d, - +1.4074742794036865d, - +1.4088494777679443d, - +1.4102261066436768d, - +1.4116039276123047d, - +1.4129831790924072d, - +1.4143636226654053d, - +1.415745496749878d, - +1.4171288013458252d, - +1.418513298034668d, - +1.4198992252349854d, - +1.4212865829467773d, - +1.4226751327514648d, - +1.424065351486206d, - +1.4254565238952637d, - +1.426849365234375d, - +1.4282433986663818d, - +1.4296388626098633d, - +1.4310357570648193d, - +1.432433843612671d, - +1.433833360671997d, - +1.4352343082427979d, - +1.4366366863250732d, - +1.4380402565002441d, - +1.4394452571868896d, - +1.4408516883850098d, - +1.4422595500946045d, - +1.4436686038970947d, - +1.4450790882110596d, - +1.446491003036499d, - +1.447904348373413d, - +1.4493188858032227d, - +1.450735092163086d, - +1.4521524906158447d, - +1.4535713195800781d, - +1.454991340637207d, - +1.4564130306243896d, - +1.4578359127044678d, - +1.4592602252960205d, - +1.460686206817627d, - +1.4621131420135498d, - +1.4635417461395264d, - +1.4649717807769775d, - +1.4664030075073242d, - +1.4678359031677246d, - +1.4692699909210205d, - +1.470705509185791d, - +1.4721424579620361d, - +1.4735808372497559d, - +1.475020408630371d, - +1.47646164894104d, - +1.4779040813446045d, - +1.4793481826782227d, - +1.4807934761047363d, - +1.4822404384613037d, - +1.4836885929107666d, - +1.485138177871704d, - +1.4865891933441162d, - +1.488041639328003d, - +1.4894955158233643d, - +1.4909508228302002d, - +1.4924075603485107d, - +1.493865728378296d, - +1.4953253269195557d, - +1.49678635597229d, - +1.49824857711792d, - +1.4997124671936035d, - +1.5011777877807617d, - +1.5026445388793945d, - +1.504112720489502d, - +1.505582332611084d, - +1.5070531368255615d, - +1.5085256099700928d, - +1.5099995136260986d, - +1.511474847793579d, - +1.5129516124725342d, - +1.5144298076629639d, - +1.5159096717834473d, - +1.5173907279968262d, - +1.5188732147216797d, - +1.5203571319580078d, - +1.5218427181243896d, - +1.523329496383667d, - +1.524817943572998d, - +1.5263078212738037d, - +1.5277988910675049d, - +1.5292916297912598d, - +1.5307857990264893d, - +1.5322813987731934d, - +1.5337786674499512d, - +1.5352771282196045d, - +1.5367772579193115d, - +1.538278579711914d, - +1.5397815704345703d, - +1.5412859916687012d, - +1.5427920818328857d, - +1.5442993640899658d, - +1.5458080768585205d, - +1.547318458557129d, - +1.548830270767212d, - +1.5503435134887695d, - +1.5518584251403809d, - +1.5533745288848877d, - +1.5548923015594482d, - +1.5564115047454834d, - +1.5579321384429932d, - +1.5594542026519775d, - +1.5609779357910156d, - +1.5625030994415283d, - +1.5640296936035156d, - +1.5655577182769775d, - +1.5670874118804932d, - +1.5686185359954834d, - +1.5701510906219482d, - +1.5716853141784668d, - +1.5732207298278809d, - +1.5747578144073486d, - +1.5762965679168701d, - +1.577836513519287d, - +1.5793781280517578d, - +1.5809214115142822d, - +1.5824658870697021d, - +1.5840120315551758d, - +1.5855598449707031d, - +1.587108850479126d, - +1.5886595249176025d, - +1.5902118682861328d, - +1.5917654037475586d, - +1.593320608139038d, - +1.5948774814605713d, - +1.596435785293579d, - +1.5979955196380615d, - +1.5995566844940186d, - +1.6011195182800293d, - +1.6026840209960938d, - +1.6042497158050537d, - +1.6058173179626465d, - +1.6073861122131348d, - +1.6089565753936768d, - +1.6105287075042725d, - +1.6121022701263428d, - +1.6136772632598877d, - +1.6152539253234863d, - +1.6168320178985596d, - +1.6184117794036865d, - +1.619992971420288d, - +1.6215758323669434d, - +1.6231601238250732d, - +1.6247460842132568d, - +1.626333475112915d, - +1.627922534942627d, - +1.6295130252838135d, - +1.6311051845550537d, - +1.6326987743377686d, - +1.634294033050537d, - +1.6358907222747803d, - +1.6374890804290771d, - +1.6390891075134277d, - +1.640690565109253d, - +1.6422934532165527d, - +1.6438980102539062d, - +1.6455042362213135d, - +1.6471118927001953d, - +1.6487212181091309d, - +1.6503322124481201d, - +1.651944637298584d, - +1.6535584926605225d, - +1.6551742553710938d, - +1.6567914485931396d, - +1.6584100723266602d, - +1.6600303649902344d, - +1.6616523265838623d, - +1.663275957107544d, - +1.6649010181427002d, - +1.666527509689331d, - +1.6681559085845947d, - +1.669785737991333d, - +1.671417236328125d, - +1.6730501651763916d, - +1.674684762954712d, - +1.676321029663086d, - +1.6779589653015137d, - +1.679598331451416d, - +1.681239366531372d, - +1.6828820705413818d, - +1.6845262050628662d, - +1.6861720085144043d, - +1.687819480895996d, - +1.6894686222076416d, - +1.6911191940307617d, - +1.6927716732025146d, - +1.6944255828857422d, - +1.6960809230804443d, - +1.6977381706237793d, - +1.6993968486785889d, - +1.7010571956634521d, - +1.7027192115783691d, - +1.7043828964233398d, - +1.7060482501983643d, - +1.7077150344848633d, - +1.709383487701416d, - +1.7110536098480225d, - +1.7127254009246826d, - +1.7143988609313965d, - +1.716073989868164d, - +1.7177505493164062d, - +1.7194287776947021d, - +1.7211089134216309d, - +1.7227904796600342d, - +1.7244737148284912d, - +1.726158618927002d, - +1.7278449535369873d, - +1.7295331954956055d, - +1.7312231063842773d, - +1.7329144477844238d, - +1.7346076965332031d, - +1.736302375793457d, - +1.7379989624023438d, - +1.739696979522705d, - +1.7413966655731201d, - +1.7430980205535889d, - +1.7448012828826904d, - +1.7465059757232666d, - +1.7482123374938965d, - +1.74992036819458d, - +1.7516300678253174d, - +1.7533416748046875d, - +1.7550547122955322d, - +1.7567694187164307d, - +1.7584857940673828d, - +1.7602040767669678d, - +1.7619237899780273d, - +1.7636451721191406d, - +1.7653684616088867d, - +1.7670931816101074d, - +1.768819808959961d, - +1.770547866821289d, - +1.77227783203125d, - +1.7740094661712646d, - +1.775742769241333d, - +1.777477741241455d, - +1.7792143821716309d, - +1.7809526920318604d, - +1.7826926708221436d, - +1.7844345569610596d, - +1.7861778736114502d, - +1.7879230976104736d, - +1.7896699905395508d, - +1.7914185523986816d, - +1.7931687831878662d, - +1.7949209213256836d, - +1.7966744899749756d, - +1.7984299659729004d, - +1.800187110900879d, - +1.8019459247589111d, - +1.8037066459655762d, - +1.8054687976837158d, - +1.8072328567504883d, - +1.8089985847473145d, - +1.8107659816741943d, - +1.812535285949707d, - +1.8143062591552734d, - +1.8160789012908936d, - +1.8178532123565674d, - +1.819629430770874d, - +1.8214070796966553d, - +1.8231868743896484d, - +1.8249680995941162d, - +1.8267512321472168d, - +1.828536033630371d, - +1.830322504043579d, - +1.83211088180542d, - +1.8339009284973145d, - +1.8356926441192627d, - +1.8374862670898438d, - +1.8392815589904785d, - +1.841078519821167d, - +1.8428773880004883d, - +1.8446779251098633d, - +1.846480131149292d, - +1.8482842445373535d, - +1.8500902652740479d, - +1.8518977165222168d, - +1.8537070751190186d, - +1.8555183410644531d, - +1.8573312759399414d, - +1.8591458797454834d, - +1.8609623908996582d, - +1.8627805709838867d, - +1.864600658416748d, - +1.866422414779663d, - +1.8682458400726318d, - +1.8700714111328125d, - +1.8718984127044678d, - +1.8737273216247559d, - +1.8755581378936768d, - +1.8773906230926514d, - +1.8792247772216797d, - +1.8810608386993408d, - +1.8828988075256348d, - +1.8847384452819824d, - +1.886579990386963d, - +1.888423204421997d, - +1.890268325805664d, - +1.8921151161193848d, - +1.8939638137817383d, - +1.8958141803741455d, - +1.8976664543151855d, - +1.8995206356048584d, - +1.901376485824585d, - +1.9032342433929443d, - +1.9050939083099365d, - +1.9069552421569824d, - +1.908818244934082d, - +1.9106833934783936d, - +1.9125502109527588d, - +1.9144186973571777d, - +1.9162893295288086d, - +1.9181616306304932d, - +1.9200356006622314d, - +1.9219114780426025d, - +1.9237892627716064d, - +1.9256689548492432d, - +1.9275505542755127d, - +1.929433822631836d, - +1.931318759918213d, - +1.9332058429718018d, - +1.9350945949554443d, - +1.9369852542877197d, - +1.938877820968628d, - +1.940772294998169d, - +1.9426684379577637d, - +1.9445664882659912d, - +1.9464664459228516d, - +1.9483680725097656d, - +1.9502718448638916d, - +1.9521772861480713d, - +1.9540846347808838d, - +1.955993890762329d, - +1.9579050540924072d, - +1.959817886352539d, - +1.9617326259613037d, - +1.9636495113372803d, - +1.9655680656433105d, - +1.9674885272979736d, - +1.9694106578826904d, - +1.9713349342346191d, - +1.9732608795166016d, - +1.975188970565796d, - +1.977118730545044d, - +1.9790503978729248d, - +1.9809842109680176d, - +1.982919692993164d, - +1.9848570823669434d, - +1.9867963790893555d, - +1.9887375831604004d, - +1.990680456161499d, - +1.9926254749298096d, - +1.994572401046753d, - +1.996521234512329d, - +1.998471736907959d, - +2.000424385070801d, - +2.0023789405822754d, - +2.004335403442383d, - +2.006293773651123d, - +2.008254051208496d, - +2.010216236114502d, - +2.0121798515319824d, - +2.014145851135254d, - +2.016113758087158d, - +2.0180835723876953d, - +2.0200552940368652d, - +2.022029399871826d, - +2.0240049362182617d, - +2.02598237991333d, - +2.0279617309570312d, - +2.0299429893493652d, - +2.0319266319274902d, - +2.03391170501709d, - +2.0358991622924805d, - +2.0378880500793457d, - +2.039879322052002d, - +2.041872501373291d, - +2.0438671112060547d, - +2.0458641052246094d, - +2.047863006591797d, - +2.049863815307617d, - +2.0518670082092285d, - +2.0538716316223145d, - +2.055878162384033d, - +2.057887077331543d, - +2.0598974227905273d, - +2.0619101524353027d, - +2.063924789428711d, - +2.065941333770752d, - +2.067959785461426d, - +2.0699801445007324d, - +2.07200288772583d, - +2.0740270614624023d, - +2.0760536193847656d, - +2.0780820846557617d, - +2.0801124572753906d, - +2.0821447372436523d, - +2.084178924560547d, - +2.0862154960632324d, - +2.0882534980773926d, - +2.0902938842773438d, - +2.0923361778259277d, - +2.0943803787231445d, - +2.0964269638061523d, - +2.0984749794006348d, - +2.100525379180908d, - +2.1025776863098145d, - +2.1046319007873535d, - +2.1066884994506836d, - +2.1087465286254883d, - +2.110806941986084d, - +2.1128692626953125d, - +2.114933490753174d, - +2.117000102996826d, - +2.1190686225891113d, - +2.1211390495300293d, - +2.12321138381958d, - +2.1252856254577637d, - +2.1273622512817383d, - +2.1294407844543457d, - +2.131521224975586d, - +2.133604049682617d, - +2.135688304901123d, - +2.13777494430542d, - +2.139863967895508d, - +2.1419544219970703d, - +2.144047260284424d, - +2.14614200592041d, - +2.1482391357421875d, - +2.1503376960754395d, - +2.1524391174316406d, - +2.1545419692993164d, - +2.156647205352783d, - +2.1587538719177246d, - +2.1608633995056152d, - +2.1629743576049805d, - +2.1650876998901367d, - +2.167203426361084d, - +2.169320583343506d, - +2.1714401245117188d, - +2.1735615730285645d, - +2.175685405731201d, - +2.1778111457824707d, - +2.179938793182373d, - +2.1820688247680664d, - +2.1842007637023926d, - +2.1863350868225098d, - +2.1884708404541016d, - +2.1906094551086426d, - +2.192749500274658d, - +2.194891929626465d, - +2.1970362663269043d, - +2.1991829872131348d, - +2.201331615447998d, - +2.2034826278686523d, - +2.2056355476379395d, - +2.2077903747558594d, - +2.2099475860595703d, - +2.212106704711914d, - +2.214268207550049d, - +2.2164316177368164d, - +2.218596935272217d, - +2.220764636993408d, - +2.2229342460632324d, - +2.2251062393188477d, - +2.2272801399230957d, - +2.2294564247131348d, - +2.2316346168518066d, - +2.2338151931762695d, - +2.2359976768493652d, - +2.2381820678710938d, - +2.2403693199157715d, - +2.242558002471924d, - +2.244749069213867d, - +2.2469425201416016d, - +2.2491378784179688d, - +2.2513351440429688d, - +2.2535347938537598d, - +2.2557363510131836d, - +2.2579402923583984d, - +2.2601466178894043d, - +2.262354850769043d, - +2.2645654678344727d, - +2.266777992248535d, - +2.2689924240112305d, - +2.271209716796875d, - +2.273428440093994d, - +2.2756495475769043d, - +2.2778730392456055d, - +2.2800989151000977d, - +2.2823266983032227d, - +2.2845563888549805d, - +2.2867884635925293d, - +2.289022922515869d, - +2.291259288787842d, - +2.2934980392456055d, - +2.295738697052002d, - +2.2979817390441895d, - +2.300227165222168d, - +2.3024744987487793d, - +2.3047242164611816d, - +2.306975841522217d, - +2.309229850769043d, - +2.31148624420166d, - +2.31374454498291d, - +2.316005229949951d, - +2.318267822265625d, - +2.32053279876709d, - +2.3228001594543457d, - +2.3250694274902344d, - +2.3273415565490723d, - +2.3296151161193848d, - +2.3318915367126465d, - +2.334169864654541d, - +2.3364500999450684d, - +2.338733196258545d, - +2.3410181999206543d, - +2.3433055877685547d, - +2.345594882965088d, - +2.347886562347412d, - +2.3501806259155273d, - +2.3524770736694336d, - +2.3547754287719727d, - +2.3570761680603027d, - +2.3593788146972656d, - +2.3616843223571777d, - +2.3639917373657227d, - +2.3663015365600586d, - +2.3686132431030273d, - +2.370927333831787d, - +2.373243808746338d, - +2.3755626678466797d, - +2.3778839111328125d, - +2.380207061767578d, - +2.3825325965881348d, - +2.3848605155944824d, - +2.387190818786621d, - +2.3895230293273926d, - +2.391857624053955d, - +2.3941946029663086d, - +2.396533966064453d, - +2.3988752365112305d, - +2.401218891143799d, - +2.4035654067993164d, - +2.4059133529663086d, - +2.40826416015625d, - +2.4106173515319824d, - +2.4129724502563477d, - +2.415329933166504d, - +2.417689800262451d, - +2.4200520515441895d, - +2.4224166870117188d, - +2.424783229827881d, - +2.427152633666992d, - +2.4295239448547363d, - +2.4318976402282715d, - +2.4342737197875977d, - +2.436652183532715d, - +2.439032554626465d, - +2.441415786743164d, - +2.4438014030456543d, - +2.4461889266967773d, - +2.4485788345336914d, - +2.4509711265563965d, - +2.4533658027648926d, - +2.4557628631591797d, - +2.458162307739258d, - +2.460564136505127d, - +2.462968349456787d, - +2.46537446975708d, - +2.4677834510803223d, - +2.4701943397521973d, - +2.4726080894470215d, - +2.4750237464904785d, - +2.4774417877197266d, - +2.479862689971924d, - +2.482285499572754d, - +2.484710693359375d, - +2.487138271331787d, - +2.4895682334899902d, - +2.4920010566711426d, - +2.4944357872009277d, - +2.496872901916504d, - +2.499312400817871d, - +2.5017542839050293d, - +2.5041985511779785d, - +2.5066452026367188d, - +2.50909423828125d, - +2.5115456581115723d, - +2.5139999389648438d, - +2.516456127166748d, - +2.5189146995544434d, - +2.5213756561279297d, - +2.5238394737243652d, - +2.5263051986694336d, - +2.528773307800293d, - +2.5312442779541016d, - +2.533717155456543d, - +2.5361928939819336d, - +2.538670539855957d, - +2.5411510467529297d, - +2.5436339378356934d, - +2.546119213104248d, - +2.5486068725585938d, - +2.5510969161987305d, - +2.553589344024658d, - +2.556084632873535d, - +2.558581829071045d, - +2.5610814094543457d, - +2.5635838508605957d, - +2.5660886764526367d, - +2.5685958862304688d, - +2.571105480194092d, - +2.573617458343506d, - +2.576131820678711d, - +2.5786490440368652d, - +2.5811686515808105d, - +2.5836901664733887d, - +2.586214542388916d, - +2.5887417793273926d, - +2.591270923614502d, - +2.5938024520874023d, - +2.596336841583252d, - +2.5988736152648926d, - +2.601412773132324d, - +2.603954315185547d, - +2.6064987182617188d, - +2.6090455055236816d, - +2.6115946769714355d, - +2.6141462326049805d, - +2.6167001724243164d, - +2.6192569732666016d, - +2.6218161582946777d, - +2.624377727508545d, - +2.626941680908203d, - +2.6295084953308105d, - +2.632077217102051d, - +2.6346492767333984d, - +2.637223243713379d, - +2.6398000717163086d, - +2.6423792839050293d, - +2.644960880279541d, - +2.6475448608398438d, - +2.6501317024230957d, - +2.6527209281921387d, - +2.655313014984131d, - +2.657907009124756d, - +2.6605043411254883d, - +2.6631035804748535d, - +2.665705680847168d, - +2.6683101654052734d, - +2.67091703414917d, - +2.6735267639160156d, - +2.6761388778686523d, - +2.67875337600708d, - +2.681370735168457d, - +2.683990478515625d, - +2.686613082885742d, - +2.689237594604492d, - +2.6918654441833496d, - +2.69449520111084d, - +2.6971278190612793d, - +2.699763298034668d, - +2.7024011611938477d, - +2.7050414085388184d, - +2.70768404006958d, - +2.710329532623291d, - +2.712977886199951d, - +2.7156286239624023d, - +2.7182817459106445d, - }; - - /** Exponential over the range of 0 - 1 in increments of 2^-10 - * exp(x/1024) = expFracTableA[x] + expFracTableB[x]. - */ - private static final double[] EXP_FRAC_B = new double[] { - +0.0d, - +1.552583321178453E-10d, - +1.2423699995465188E-9d, - +4.194022929828008E-9d, - +9.94381632344361E-9d, - +1.9426261544163577E-8d, - +3.3576783010266685E-8d, - +5.3331719086630523E-8d, - +7.962832297769345E-8d, - +1.1340476362128895E-7d, - -8.281845251820919E-8d, - -3.126416414805498E-8d, - +3.058997113995161E-8d, - +1.0368579417304741E-7d, - -4.9452513107409435E-8d, - +4.8955889659397494E-8d, - -7.698155155722897E-8d, - +5.051784853384516E-8d, - -4.443661736519001E-8d, - +1.1593958457401774E-7d, - +5.575759739697068E-8d, - +1.4385227981629147E-8d, - -7.227368462584163E-9d, - -8.129108387083023E-9d, - +1.263202100290635E-8d, - +5.600896265625552E-8d, - -1.154629885168314E-7d, - -2.399186832888246E-8d, - +9.295948298604103E-8d, - -2.070841011504222E-9d, - -6.97066538508643E-8d, - -1.0898941254272996E-7d, - -1.1895963756343625E-7d, - -9.865691193993138E-8d, - -4.711988033385175E-8d, - +3.6613751875298095E-8d, - -8.491135959370133E-8d, - +6.610611940107793E-8d, - +1.3794148633283659E-8d, - -2.462631860370667E-9d, - +1.830278273495162E-8d, - +7.705834203598065E-8d, - -6.364563771711373E-8d, - +7.39978436695387E-8d, - +1.4122417557484554E-8d, - -3.881598887298574E-9d, - +2.0958481826069642E-8d, - +8.96162975425619E-8d, - -3.535214171178576E-8d, - -1.1455271549574576E-7d, - +9.140964977432485E-8d, - +1.0667524445105459E-7d, - -6.777752790396222E-8d, - +4.586785041291296E-8d, - -2.8245462428022094E-8d, - -5.071761314397018E-8d, - -2.0566368810068663E-8d, - +6.319146317890346E-8d, - -3.687854305539139E-8d, - -8.137269363160008E-8d, - -6.930491127388755E-8d, - +3.1184473002226595E-10d, - -1.0995299963140049E-7d, - +7.772668425499348E-8d, - +8.750367485925089E-8d, - -7.963112393823186E-8d, - +5.415131809829094E-8d, - +1.3006683896462346E-8d, - +3.634736373360733E-8d, - -1.132504393233074E-7d, - +4.2046187038837375E-8d, - +2.6396811618001066E-8d, - +7.92177143584738E-8d, - -3.691100820545433E-8d, - -8.257112559083188E-8d, - -5.676200971739166E-8d, - +4.151794514828518E-8d, - -2.5147255753587636E-8d, - -1.7335469415174996E-8d, - +6.595784859136531E-8d, - -1.2680354928109105E-8d, - -1.3824992526093461E-8d, - +6.353142754175797E-8d, - -1.8021197722549054E-8d, - -1.9054827792903468E-8d, - +6.144098503892116E-8d, - -1.3940903373095247E-8d, - -5.7694907599522404E-9d, - +8.696863522320578E-8d, - +2.6869297963554945E-8d, - +5.3366470162689076E-8d, - -7.094204160127543E-8d, - -1.0662027949814858E-7d, - -5.26498707801063E-8d, - +9.198855229106814E-8d, - +8.989677431456647E-8d, - -5.790384407322479E-8d, - -1.1197236522467887E-7d, - -7.12854317090566E-8d, - +6.51813137650059E-8d, - +6.003465022483798E-8d, - -8.569906238528267E-8d, - +1.0584469687624562E-7d, - -7.956144278281947E-8d, - +7.43676272093501E-8d, - +9.182512565315022E-8d, - -2.6157563728873715E-8d, - -4.012947040998503E-8d, - +5.094280572218447E-8d, - +9.675095351161728E-9d, - +7.552139802281006E-8d, - +1.1099566726533146E-8d, - +5.58656252899437E-8d, - -2.756054703800197E-8d, - +2.791018095971047E-10d, - -9.799351869734466E-8d, - -8.291832428736212E-8d, - +4.654720780112994E-8d, - +5.302803981406403E-8d, - -6.243126731995636E-8d, - -6.036655299348577E-8d, - +6.026878587378257E-8d, - +6.210379583313526E-8d, - -5.381287389094251E-8d, - -4.8012970400697E-8d, - +8.055420567281602E-8d, - +9.452180117175641E-8d, - -5.057430382371206E-9d, - +2.1288872215266507E-8d, - -6.380305844689076E-8d, - -2.0858800984600168E-8d, - -8.724006061713588E-8d, - -2.3470351753125604E-8d, - -6.690931338790221E-8d, - +2.192160831263035E-8d, - +5.6648446166177225E-9d, - -1.1461755745719884E-7d, - -9.944393412663547E-8d, - +5.2249837964645906E-8d, - +1.0311034276196487E-7d, - +5.4203784018566126E-8d, - -9.340259278913173E-8d, - -1.0022192034216903E-7d, - +3.481513333662908E-8d, - +7.436036590244714E-8d, - +1.9485199912395296E-8d, - +1.0968068384729757E-7d, - +1.0760175582979094E-7d, - +1.4322981952798675E-8d, - +6.933855730431659E-8d, - +3.530656968851287E-8d, - -8.669526204279467E-8d, - -5.7169586962345785E-8d, - -1.1345515834332824E-7d, - -1.605251622332555E-8d, - -2.298302779758532E-9d, - -7.110952399338234E-8d, - +1.70164513845372E-8d, - +2.4746155561368937E-8d, - -4.6834239957353325E-8d, - +4.1781076667923185E-8d, - +5.326182134294869E-8d, - -1.1302647617762544E-8d, - +8.759667154796094E-8d, - +1.126326877851684E-7d, - +6.48979555673987E-8d, - -5.451390316294111E-8d, - -6.0896188500539086E-9d, - -2.7152010585461855E-8d, - -1.1660424775832058E-7d, - -3.492984900939992E-8d, - -1.944841848873016E-8d, - -6.905990750285027E-8d, - +5.575538653428039E-8d, - +1.1768108384670781E-7d, - +1.178204606523101E-7d, - +5.727787111340131E-8d, - -6.284125161007433E-8d, - -3.0118152047565877E-9d, - -5.448044533034374E-10d, - -5.433154287341921E-8d, - +7.515630833946181E-8d, - -8.780756503572527E-8d, - -6.527407547535494E-8d, - -9.45487863616303E-8d, - +6.390098458668406E-8d, - -6.564672913105876E-8d, - -5.238488022920792E-9d, - +7.824500749252316E-9d, - -2.5339299158309795E-8d, - -1.036103313062145E-7d, - +1.2550633697348567E-8d, - +8.584676196065558E-8d, - +1.1740089468291563E-7d, - +1.0833697012353316E-7d, - +5.978002467397905E-8d, - -2.7143806069290897E-8d, - +8.711129287069315E-8d, - -7.316349947981893E-8d, - -3.00015852582934E-8d, - -2.0691000399732483E-8d, - -4.4100097152254264E-8d, - -9.909612209943178E-8d, - +5.38733640215475E-8d, - -6.0893829005035E-8d, - +3.457553391989844E-8d, - +1.0300006058273187E-7d, - -9.290053015365092E-8d, - -7.514966995961323E-8d, - -8.10254145615142E-8d, - -1.0938612624777085E-7d, - +7.932952721989251E-8d, - +9.428257290008738E-9d, - -7.952636967837795E-8d, - +5.203033137154554E-8d, - -7.159157201731446E-8d, - +2.7593424989059015E-8d, - +1.1231621190000476E-7d, - -5.469119869891027E-8d, - +4.560067256086347E-9d, - +5.280427179595944E-8d, - +9.119538242455128E-8d, - -1.1753008498403413E-7d, - -9.537874867759656E-8d, - -7.96118345325538E-8d, - -6.907085854395348E-8d, - -6.259620482221904E-8d, - -5.902712448725381E-8d, - -5.720173456146447E-8d, - -5.5957016861703E-8d, - -5.412881689012608E-8d, - -5.0551842723970724E-8d, - -4.405966390424518E-8d, - -3.348471032333413E-8d, - -1.7658271111516935E-8d, - +4.589506477601956E-9d, - +3.4429618182751655E-8d, - +7.303420385174346E-8d, - -1.168420305422519E-7d, - -5.718749537552229E-8d, - +1.4754809136835937E-8d, - +1.001616104682875E-7d, - -3.8207793300052055E-8d, - +7.766278405014509E-8d, - -2.7883635712109803E-8d, - -1.1524714043067699E-7d, - +5.517333625963128E-8d, - +7.724278756071081E-9d, - -1.7990934773848504E-8d, - -2.0786347668702902E-8d, - +5.251554594269693E-10d, - +4.7131849857076246E-8d, - -1.1819540733893871E-7d, - -1.742885956093543E-8d, - +1.1220467571570283E-7d, - +3.347954541376715E-8d, - -1.399157980498908E-8d, - -2.9013441705763093E-8d, - -1.0389614239253089E-8d, - +4.307749759934266E-8d, - -1.0583192018912101E-7d, - +2.0919226941745448E-8d, - -5.2305110482722706E-8d, - -8.588407110184028E-8d, - -7.861419797923639E-8d, - -2.929085835358592E-8d, - +6.329175751021792E-8d, - -3.807794163054899E-8d, - -9.377320954068088E-8d, - -1.0258469865953145E-7d, - -6.330187984612758E-8d, - +2.5286958775281306E-8d, - -7.40238661307607E-8d, - +1.1681688445204168E-7d, - -1.1623125976292733E-7d, - -5.6696107089038004E-8d, - +5.822140627806124E-8d, - -8.678466172071259E-9d, - -1.7757121899175995E-8d, - +3.220665454652531E-8d, - -9.598330731102836E-8d, - +7.573375369829243E-8d, - +7.174547784678893E-8d, - -1.0672213971363184E-7d, - +1.8395252217743006E-8d, - -2.8511112548600118E-8d, - -7.79306270997787E-9d, - +8.178019529487065E-8d, - +3.0220784595602374E-9d, - -4.4156343103298585E-9d, - +6.07014616741277E-8d, - -3.8809601937571554E-8d, - -6.329342805230603E-8d, - -1.1511990258493999E-8d, - +1.177739474561431E-7d, - +8.738625278484571E-8d, - -1.0143341551207646E-7d, - +2.9394972678456236E-8d, - +4.278345398213486E-9d, - +6.28805835150457E-8d, - -3.197037359731606E-8d, - -4.060821046423735E-8d, - +3.82160283750664E-8d, - -3.2666060441373307E-8d, - -1.3584500601329896E-8d, - +9.671332777035621E-8d, - +6.10626893063691E-8d, - +1.1913723189736356E-7d, - +3.3774671482641995E-8d, - +4.4651109654500895E-8d, - -8.539328154875224E-8d, - -1.166799420361101E-7d, - -4.794765976694151E-8d, - -1.1635256954820579E-7d, - -8.221241452580445E-8d, - +5.5737717715868425E-8d, - +6.034539636024073E-8d, - -6.712199323081945E-8d, - -8.697724830833087E-8d, - +2.0494942705297694E-9d, - -3.718924074653624E-8d, - +3.499747150995707E-8d, - -1.8535359161566028E-8d, - +4.1905679587096103E-8d, - -2.0821912536551675E-8d, - +3.297776915751238E-8d, - -3.3835280846270374E-8d, - +1.8437339356553904E-8d, - -4.734187609526424E-8d, - +8.527976799299225E-9d, - -5.1088103279787804E-8d, - +1.3513294656751725E-8d, - -3.480032127343472E-8d, - +4.367697180842916E-8d, - +1.1815196363705356E-8d, - +1.0932279207149782E-7d, - +9.907230065250944E-8d, - -1.764389559496152E-8d, - -1.1135725625095859E-9d, - -8.846040040259342E-8d, - -3.996962588736431E-8d, - -9.276238757878814E-8d, - -7.12139818505956E-9d, - -2.016525972830718E-8d, - +1.0782585410141121E-7d, - -9.868269632073771E-8d, - +7.686861750031585E-8d, - -7.947087669425045E-8d, - -8.955768055535647E-8d, - +4.791582240886607E-8d, - +9.583994718167641E-8d, - +5.5524866689108584E-8d, - -7.171796605211277E-8d, - -4.6157237582310713E-8d, - -1.0489751005162237E-7d, - -8.204903560604627E-9d, - +6.818588687884566E-9d, - -5.850916105103205E-8d, - +3.5549586192569994E-8d, - +5.1896700056778354E-8d, - -8.146080588190463E-9d, - +9.516285362051742E-8d, - -1.1368933260611668E-7d, - +8.187871486648885E-8d, - -3.206182925646474E-8d, - +2.265440168347286E-8d, - +8.938334752179552E-9d, - -7.187922490287331E-8d, - +1.9952407216533937E-8d, - +4.734805892507655E-8d, - +1.1642439930208906E-8d, - -8.582843599651953E-8d, - -5.3086706437795354E-9d, - +1.6121782610217253E-8d, - -2.0197142620980974E-8d, - -1.129242035557684E-7d, - -2.2298267863810133E-8d, - +1.4605950309628873E-8d, - -8.663710700190489E-10d, - -6.736873974532501E-8d, - +5.486523121881414E-8d, - -1.0965249168570443E-7d, - -8.27343074126263E-8d, - -1.0144703278439455E-7d, - +7.39809943048038E-8d, - -3.193297932837415E-8d, - +5.900393284617182E-8d, - +1.0973020465397083E-7d, - -1.1681436418514489E-7d, - +9.5985669644661E-8d, - +3.423560333632085E-8d, - -6.22836197265283E-8d, - +4.621027492345726E-8d, - -1.1575484316683829E-7d, - -6.997545435826076E-8d, - -5.3502441327259514E-8d, - -6.49667713553005E-8d, - -1.029980741248172E-7d, - +7.219393868923887E-8d, - -1.4854841678687828E-8d, - +1.1406713393562271E-7d, - -1.650155887561251E-8d, - +7.165331603232264E-8d, - -9.692697614257269E-8d, - -4.402550702194912E-8d, - -6.679737442193143E-9d, - +1.6492800268960003E-8d, - +2.68759245092879E-8d, - +2.5854805721793077E-8d, - +1.4815967715704613E-8d, - -4.852711011229633E-9d, - -3.176199594915881E-8d, - -6.452129525125173E-8d, - -1.01738658407525E-7d, - +9.639780418418697E-8d, - +5.4445606140746644E-8d, - +1.2219361033150988E-8d, - -2.8883532688356087E-8d, - -6.746431126005811E-8d, - -1.0212284427080097E-7d, - +1.0696094577483825E-7d, - +8.43527683868743E-8d, - +6.987544103716777E-8d, - +6.493457409236137E-8d, - +7.093715125593688E-8d, - +8.929153091001965E-8d, - -1.1701113164306871E-7d, - -6.972256643013266E-8d, - -5.848862070736576E-9d, - +7.602385197610123E-8d, - -6.110775144284437E-8d, - +6.101012058093429E-8d, - -3.304167134225169E-8d, - -1.0342514383702196E-7d, - +8.969907328603505E-8d, - +7.091600108064668E-8d, - +8.006778743052707E-8d, - +1.1857939200074815E-7d, - -5.0541412403312774E-8d, - +5.0970277930552287E-8d, - -5.229355472795119E-8d, - +1.1793478462381443E-7d, - +8.625007227318527E-8d, - +9.250422086873268E-8d, - -1.0028661472061573E-7d, - -1.384914052949463E-8d, - +1.1483560326413004E-7d, - +4.878798101459259E-8d, - +2.7866921183936055E-8d, - +5.3514180410849046E-8d, - -1.1124565511436785E-7d, - +1.186914813275767E-8d, - -5.253258132241335E-8d, - -6.458486486369316E-8d, - -2.2838888809969377E-8d, - +7.415557606805398E-8d, - -1.0568403170659571E-8d, - -3.7139182948393606E-8d, - -4.1022790876160215E-9d, - +8.999821367768787E-8d, - +8.201043988912348E-9d, - -9.616457442665051E-9d, - +3.8005886250603055E-8d, - -8.588890051473289E-8d, - +9.699937202692456E-8d, - +1.11298006674538E-7d, - -4.1527104733570825E-8d, - +1.1682852007826251E-7d, - +1.1099648061301941E-7d, - -5.755303038890997E-8d, - +8.948877445235827E-8d, - +7.675780395028194E-8d, - -9.427143563390596E-8d, - +5.471416081500162E-8d, - +4.8354824064383506E-8d, - -1.118706134478866E-7d, - +5.235528379688445E-8d, - +6.567708120053687E-8d, - -7.042204992948526E-8d, - -1.1603891006723397E-7d, - -6.968742825553785E-8d, - +7.01199184127881E-8d, - +6.645352711199266E-8d, - -7.919617109348822E-8d, - +1.1149986927391714E-7d, - -7.522074418324674E-8d, - +7.739252980388984E-8d, - +9.39987974788905E-8d, - -2.390421480210064E-8d, - -3.639873824357815E-8d, - +5.8015881615938497E-8d, - +2.2423186335040668E-8d, - +9.674534330665206E-8d, - +4.4068830785712375E-8d, - +1.0431875573076199E-7d, - +4.0584538834428926E-8d, - +9.279423236781974E-8d, - +2.404020521381534E-8d, - +7.425346071427343E-8d, - +6.529321706138789E-9d, - +6.080174837146273E-8d, - +1.6902327633329284E-10d, - +6.456806922371733E-8d, - +1.7100134295216033E-8d, - +9.770510970673519E-8d, - +6.94872148530716E-8d, - -6.602926393514549E-8d, - -6.889997193778161E-8d, - +6.240235720677117E-8d, - +9.098790295810902E-8d, - +1.8386917534879182E-8d, - +8.454972737414241E-8d, - +5.259099728747365E-8d, - -7.595453077213505E-8d, - -6.113203624663034E-8d, - +9.859622328905143E-8d, - -7.206766550807255E-8d, - -9.474579567171831E-8d, - +3.210408693366267E-8d, - +7.160716418525417E-8d, - +2.530870537724554E-8d, - -1.0524451040704701E-7d, - -8.008561371849434E-8d, - +1.0233519853128553E-7d, - -3.326791455362767E-8d, - -8.504961764629757E-9d, - -6.024017201863256E-8d, - +5.1500902632092514E-8d, - +8.98570720774568E-8d, - +5.638724693948384E-8d, - -4.734813904255994E-8d, - +1.8631451577542948E-8d, - +1.7470924137873214E-8d, - -4.926470933588261E-8d, - +5.84096713620797E-8d, - +1.0364355880696472E-7d, - +8.800655674349468E-8d, - +1.3069802481237792E-8d, - +1.1882454749452428E-7d, - -6.999215748398631E-8d, - -7.49674072510849E-8d, - +1.054760847603618E-7d, - -3.920012014371067E-9d, - +7.526183084319617E-8d, - +1.0618494853096868E-7d, - +9.043280094115832E-8d, - +2.9590395068826316E-8d, - -7.475571347653619E-8d, - +1.7401160143611842E-8d, - +6.923209420670962E-8d, - +8.232829924979753E-8d, - +5.82825404854514E-8d, - -1.3108606792380822E-9d, - -9.485602512220194E-8d, - +1.7663064617118723E-8d, - +9.942682855652123E-8d, - -8.638275100090915E-8d, - -6.132639063569726E-8d, - -6.221897889344726E-8d, - -8.745525834919404E-8d, - +1.029901759234897E-7d, - +3.3888561478632076E-8d, - -5.47315553588771E-8d, - +7.715994473741065E-8d, - -4.566098167230033E-8d, - +5.5257514455273825E-8d, - -9.530545662611411E-8d, - -1.889488909834863E-8d, - +4.769006625301079E-8d, - +1.0607041998938709E-7d, - -8.054981263802322E-8d, - -3.370929373457322E-8d, - +9.799164177397836E-9d, - +5.160291611526656E-8d, - +9.333090708652975E-8d, - -1.0180490545927503E-7d, - -5.533523366931846E-8d, - -4.044932340334176E-9d, - +5.370131904567218E-8d, - -1.1887814032213867E-7d, - -4.3307634616102625E-8d, - +4.363437558318513E-8d, - -9.482896784430338E-8d, - +1.9782818312325887E-8d, - -8.77224935488516E-8d, - +6.113879253864931E-8d, - -8.822335132515693E-9d, - -5.753754066078771E-8d, - -8.335545536862392E-8d, - -8.462309712606694E-8d, - -5.968586877433824E-8d, - -6.887556547891059E-9d, - +7.542967150507818E-8d, - -4.949331199790077E-8d, - +9.684172421525468E-8d, - +3.9260317944365246E-8d, - +1.784536881359796E-8d, - +3.426282345243592E-8d, - +9.018025618601154E-8d, - -5.1151708476133135E-8d, - +8.877492215808044E-8d, - +3.479545684576179E-8d, - +2.7002575714977818E-8d, - +6.707201545505014E-8d, - -8.173742908533777E-8d, - +5.909041310777802E-8d, - +1.439903710393587E-8d, - +2.4289317341982113E-8d, - +9.044519282818302E-8d, - -2.3866331257845713E-8d, - -7.853944465095286E-8d, - -7.188526769607005E-8d, - -2.2132706360079843E-9d, - -1.0624985110080394E-7d, - +9.453598391231829E-8d, - -1.134160131581847E-7d, - -1.315295870404327E-8d, - -7.981320644583728E-8d, - -7.327771300038971E-8d, - +8.155647334672472E-9d, - -7.222791579580787E-8d, - -7.430436987497092E-8d, - +3.633404807819848E-9d, - -7.512438321498593E-8d, - -7.044869765481105E-8d, - +1.9372589859580955E-8d, - -4.2365298585101096E-8d, - -1.552830824758035E-8d, - +1.0160071259930585E-7d, - +7.232201430620959E-8d, - -1.0164389431039905E-7d, - +5.826233477413577E-8d, - +7.6927415825689E-8d, - -4.392309439525734E-8d, - -6.414337408955734E-8d, - +1.799550702470095E-8d, - -3.4194410638967946E-8d, - +1.9437762419688045E-8d, - -5.7792549966531335E-8d, - -2.5731071572354522E-8d, - +1.173595905705643E-7d, - -1.0361863127101014E-7d, - +2.8330789837569332E-8d, - +3.81131861433539E-8d, - -7.252724942149532E-8d, - -6.342604067787756E-8d, - +6.716441526213986E-8d, - +8.257484966196574E-8d, - -1.5443717968117592E-8d, - +1.3280021798948244E-8d, - -6.79180673261558E-8d, - -1.8863249269709046E-8d, - -7.62162303263991E-8d, - +2.011589233663723E-10d, - -2.62683511147141E-8d, - +8.455684903712996E-8d, - +9.602293320384794E-8d, - +9.896378545255258E-9d, - +6.636396724067746E-8d, - +2.8777050870552646E-8d, - -1.0109271059094341E-7d, - -8.305334708631055E-8d, - +8.467026501338835E-8d, - -7.29821745001452E-8d, - -7.739491336852633E-8d, - +7.321238022013781E-8d, - -9.621538067089515E-8d, - -1.0705722541811197E-7d, - +4.247240125405735E-8d, - +1.1574222007764044E-7d, - +1.145412771487496E-7d, - +4.066036653218687E-8d, - -1.0410796803072171E-7d, - -7.955085231106037E-8d, - +1.1612776191572459E-7d, - +7.888519481107568E-9d, - +7.436813814737735E-8d, - +7.894935661289349E-8d, - +2.343525263620692E-8d, - -9.036933434595339E-8d, - -2.2239222395888823E-8d, - -8.784622656707742E-9d, - -4.819540032304379E-8d, - +9.975892708522332E-8d, - -3.9945124955316294E-8d, - +1.1345047468988893E-8d, - +1.702808472925844E-8d, - -2.10770182066344E-8d, - -1.0114948914089626E-7d, - +1.70518021921727E-8d, - +9.693260855961159E-8d, - -9.809953482725758E-8d, - -8.937957126662392E-8d, - -1.134963954323427E-7d, - +6.980004387880031E-8d, - -1.4494150014095534E-8d, - +1.122932337832262E-7d, - -2.483811732227808E-8d, - +5.278759515330048E-8d, - +1.0859222881334994E-7d, - -9.400056055939758E-8d, - -7.630957994128623E-8d, - -7.490757191850264E-8d, - -8.794689652049879E-8d, - -1.1357810855950775E-7d, - +8.846862323478745E-8d, - +4.32092015744956E-8d, - -9.082923009890997E-9d, - -6.655106680680314E-8d, - +1.1108184705020206E-7d, - +4.8838973948592766E-8d, - -1.2998975819628988E-8d, - -7.25680516883106E-8d, - -1.280024819379844E-7d, - -1.7743467191652895E-7d, - -2.1899520225809197E-7d, - +2.2602433110285232E-7d, - +2.0582268590356215E-7d, - +1.9911192455808124E-7d, - +2.0776878313278689E-7d, - +2.3367183133931002E-7d, - -1.9813568387704588E-7d, - -1.320972037315105E-7d, - -4.316580502355056E-8d, - +7.054443447243064E-8d, - +2.109212796025238E-7d, - -9.698281856949837E-8d, - +1.0239791185239086E-7d, - -1.4271754202157014E-7d, - +1.232402895636637E-7d, - -5.150590480969644E-8d, - -1.882201085012735E-7d, - +1.918355503889933E-7d, - +1.368893262241355E-7d, - +1.256828068633383E-7d, - +1.601222826656464E-7d, - -2.3472125169205568E-7d, - -1.032634625827871E-7d, - +7.957037517331382E-8d, - -1.6114314525832115E-7d, - +1.3018591370778052E-7d, - +1.8007284821359149E-9d, - -6.75421764491544E-8d, - -7.592155950645605E-8d, - -2.1414301981236817E-8d, - +9.79045937979623E-8d, - -1.9287515190177685E-7d, - +6.184953843236509E-8d, - -8.966500602352001E-8d, - -1.686490951669855E-7d, - -1.7316830893872364E-7d, - -1.0128633727463388E-7d, - +4.8935021740786486E-8d, - -1.9740129448026905E-7d, - +1.1532102163380318E-7d, - +3.5371542244169364E-8d, - +4.153321337726989E-8d, - +1.3575372396796738E-7d, - -1.5685449228299222E-7d, - +1.1933437776279623E-7d, - +1.2599421120614435E-8d, - +1.7331079674066365E-9d, - +8.869266069401045E-8d, - -2.013999442282902E-7d, - +8.709065843311144E-8d, - +2.453117120472083E-9d, - +2.3489472779602617E-8d, - +1.5216652792122652E-7d, - -8.638415150333099E-8d, - -2.1335475961524608E-7d, - -2.2677272333821516E-7d, - -1.246635423141374E-7d, - +9.494921297991565E-8d, - -4.27932550865546E-8d, - -5.907349480138712E-8d, - +4.809072216941908E-8d, - -1.9615359732789476E-7d, - +1.6385396676990034E-7d, - +1.7642714221524228E-7d, - -1.564440844355254E-7d, - +1.2090653407564583E-7d, - +5.679855838941285E-8d, - +1.3006497185242537E-7d, - -1.341336085949317E-7d, - +2.1987686050231372E-7d, - -2.3641341460419062E-7d, - -7.048932272279454E-8d, - -2.3401958604540354E-7d, - +2.2867766559333004E-7d, - -1.1089952719756529E-7d, - +1.7977178878541792E-7d, - +1.4903074102418675E-7d, - -2.011072593789072E-7d, - +8.504948422097802E-8d, - +5.5846006716348844E-8d, - +1.9014079059505456E-7d, - +1.3119976852347583E-8d, - +3.645999732952202E-9d, - +1.6374611405314333E-7d, - +1.8612397134087598E-8d, - +4.7113225346448296E-8d, - -2.2555535676499395E-7d, - +1.5631615647329739E-7d, - -2.3574653182047758E-7d, - +3.08072210937242E-8d, - +4.344259288116142E-9d, - +1.6374489573868447E-7d, - +3.42171232580676E-8d, - +9.46452492584643E-8d, - -1.297587351085525E-7d, - -1.601065201853145E-7d, - +5.6550495386976275E-9d, - -1.0725602261510391E-7d, - -1.9945408945084193E-8d, - -2.071910882200156E-7d, - -1.900947109027913E-7d, - +3.34069282059055E-8d, - -1.145810806477298E-8d, - +1.5421457732308477E-7d, - +5.5657084775121975E-8d, - +1.7177785285061278E-7d, - +2.7813027425289027E-8d, - +1.0267509648109748E-7d, - -7.839574072711142E-8d, - -3.648293887796095E-8d, - +2.3049492079013518E-7d, - -2.290530257391564E-7d, - +1.747018414872141E-8d, - +1.8477759656842807E-8d, - -2.2394073401050633E-7d, - -2.3085653185818848E-7d, - -1.7598351175286083E-10d, - -6.640551220774385E-9d, - +2.2868466674913266E-7d, - +2.3106230530437902E-7d, - +2.594209135294356E-9d, - +2.2221434720602702E-8d, - -1.847872222755186E-7d, - -1.3948659218254467E-7d, - +1.6023339607737848E-7d, - -2.3718944120137026E-7d, - +1.0087056692827474E-7d, - +2.228553660510707E-7d, - +1.3088328582956644E-7d, - -1.7292527438195104E-7d, - -2.0961068531216087E-7d, - +2.2951597845188004E-8d, - +5.005103745740068E-8d, - -1.2618366811281002E-7d, - -2.6784582477238417E-8d, - -1.2645600379949252E-7d, - +5.3774170051560117E-8d, - +3.9205810725333715E-8d, - -1.6802196396307013E-7d, - -8.893078799284047E-8d, - -1.9821451970481713E-7d, - -1.689060694498032E-8d, - -1.9648717830943396E-8d, - -2.0433926409457167E-7d, - -9.1973399031975E-8d, - -1.5723449006087263E-7d, - +7.887051614592191E-8d, - +1.4166246290402286E-7d, - +3.330146018487787E-8d, - +2.3278688667580978E-7d, - -2.1139124097042925E-7d, - +1.334449995534113E-7d, - -1.6104730195920897E-7d, - -1.3902314592614197E-7d, - +2.0169027167169864E-7d, - -9.040643863751471E-8d, - -5.946190852360168E-8d, - -1.8013411720005014E-7d, - +2.6595401669835947E-8d, - +8.607292924069425E-8d, - +4.84038176769263E-10d, - -2.2798356346688802E-7d, - -1.203028719549339E-7d, - -1.5111906039270745E-7d, - +1.5859915617670956E-7d, - -1.426262681506497E-7d, - -9.892260062323546E-8d, - -1.8492643515928268E-7d, - +7.840210076743552E-8d, - +2.1643071541578027E-7d, - +2.313664294893465E-7d, - +1.2541842003811723E-7d, - -9.920197743470107E-8d, - +3.655589133934081E-8d, - +5.807052689551411E-8d, - -3.244024724169575E-8d, - -2.327564406466327E-7d, - -6.38187356721971E-8d, - -2.3995994000400915E-10d, - -3.9793609609721186E-8d, - -1.802510054588344E-7d, - +5.745586744591196E-8d, - +1.987228872666507E-7d, - -2.3105188606976847E-7d, - +2.0088042407239129E-7d, - +6.624793114025702E-8d, - -1.5587043044056635E-7d, - +1.3606464059428694E-8d, - +1.0008761540741556E-7d, - +1.058213771597129E-7d, - +3.3058299602856804E-8d, - -1.1594886810010702E-7d, - +1.378919824418909E-7d, - -1.5683631181406778E-7d, - -4.4200075770425176E-8d, - +1.2250985436706623E-9d, - -1.8297013058336644E-8d, - -1.005004229646318E-7d, - +2.337202285991116E-7d, - +3.296104292035678E-8d, - -2.23668185816307E-7d, - -5.7055442971184756E-8d, - +5.82391923137467E-8d, - +1.244950238958056E-7d, - +1.4399358260219398E-7d, - +1.1901862840583523E-7d, - +5.1856152603337505E-8d, - -5.520562000491495E-8d, - -1.9987622893254038E-7d, - +9.697418238031897E-8d, - -1.1603376405901542E-7d, - +1.170714288147407E-7d, - -1.550851303094034E-7d, - +2.3472546699189522E-8d, - +1.78211222185955E-7d, - -1.6540009048230807E-7d, - -5.137865010872577E-8d, - +4.57490653163866E-8d, - +1.2829599363166098E-7d, - +1.985773325073412E-7d, - -2.1792661654989742E-7d, - -1.652218131743459E-7d, - -1.178234251477505E-7d, - -7.34071933723896E-8d, - -2.9646587857612632E-8d, - +1.5787194498912167E-8d, - +6.52252321321176E-8d, - +1.2100088103262734E-7d, - +1.8544977697201776E-7d, - -2.159273204728711E-7d, - -1.2711589287782304E-7d, - -2.2610609958205195E-8d, - +9.993330547750349E-8d, - -2.33974236642384E-7d, - -6.830955860192377E-8d, - +1.2244183812423448E-7d, - -1.3620325027706252E-7d, - +1.1178574689680927E-7d, - -8.490693031052439E-8d, - +2.2975389535985893E-7d, - +1.0445707500867073E-7d, - +1.8405243253979117E-8d, - -2.6033812325397097E-8d, - -2.6489990728664908E-8d, - +1.9409124727247465E-8d, - +1.1403826867020365E-7d, - -2.1706266226554237E-7d, - -1.7839974359909697E-8d, - +2.3725087624341041E-7d, - +7.37567604176979E-8d, - -2.9098805266958403E-8d, - -6.892713087722722E-8d, - -4.333719263537725E-8d, - +5.006436936098099E-8d, - +2.1367325342138113E-7d, - -2.6949659655907758E-8d, - -1.9256682968755803E-7d, - +1.960616287777496E-7d, - +1.876664741413704E-7d, - -2.1534486893602122E-7d, - -5.688830723853217E-8d, - +1.8861113228746644E-7d, - +4.6730779443102234E-8d, - -3.275360514112964E-9d, - +4.1011920825226876E-8d, - +1.820141955326842E-7d, - -5.468175655175594E-8d, - -1.8981247089866317E-7d, - -2.209492705846306E-7d, - -1.4566110577298295E-7d, - +3.848544860465368E-8d, - -1.429109630340783E-7d, - -2.105749999899302E-7d, - -1.6206609756618993E-7d, - +5.058693461947143E-9d, - -1.8359244902596882E-7d, - +2.2810251664891242E-7d, - -1.8791776732592608E-7d, - +1.3106843166204263E-9d, - -1.5543153797220025E-7d, - -1.7884997059081524E-7d, - -6.648490725635754E-8d, - +1.8412576154421806E-7d, - +9.860939269906055E-8d, - +1.5627006743114285E-7d, - -1.17260039161597E-7d, - +2.3416513526430908E-7d, - -2.1749172296989992E-7d, - -3.9242560971295217E-8d, - -1.822826971477839E-7d, - -1.6729355321895212E-7d, - +8.208715337901827E-9d, - -1.301267783434537E-7d, - -1.029741755377153E-7d, - +9.215765583599035E-8d, - -1.907487641016455E-8d, - +4.2661388254716074E-8d, - -1.9697226735187428E-7d, - +2.1819935527247946E-7d, - -1.398318929248588E-7d, - +1.6195123407015624E-7d, - +1.723826394935661E-7d, - -1.0602700638269148E-7d, - -1.9392742205954563E-7d, - -8.880302882034106E-8d, - +2.1186420987133E-7d, - +2.3375763256988976E-7d, - -2.0599801342241997E-8d, - -7.184550924856607E-8d, - +8.254840070367875E-8d, - }; - - /** Extended precision logarithm table over the range 1 - 2 in increments of 2^-10. */ - private static final double[][] LN_MANT = new double[][] { - {+0.0d, +0.0d, }, // 0 - {+9.760860120877624E-4d, -3.903230345984362E-11d, }, // 1 - {+0.0019512202125042677d, -8.124251825289188E-11d, }, // 2 - {+0.0029254043474793434d, -1.8374207360194882E-11d,}, // 3 - {+0.0038986406289041042d, -2.1324678121885073E-10d,}, // 4 - {+0.004870930686593056d, -4.5199654318611534E-10d,}, // 5 - {+0.00584227591753006d, -2.933016992001806E-10d, }, // 6 - {+0.006812678650021553d, -2.325147219074669E-10d, }, // 7 - {+0.007782140746712685d, -3.046577356838847E-10d, }, // 8 - {+0.008750664070248604d, -5.500631513861575E-10d, }, // 9 - {+0.00971824862062931d, +8.48292035519895E-10d, }, // 10 - {+0.010684899985790253d, +1.1422610134013436E-10d,}, // 11 - {+0.01165061630308628d, +9.168889933128375E-10d, }, // 12 - {+0.012615403160452843d, -5.303786078838E-10d, }, // 13 - {+0.013579258695244789d, -5.688639355498786E-10d, }, // 14 - {+0.01454218477010727d, +7.296670293275653E-10d, }, // 15 - {+0.015504186972975731d, -4.370104767451421E-10d, }, // 16 - {+0.016465261578559875d, +1.43695591408832E-9d, }, // 17 - {+0.01742541790008545d, -1.1862263158849434E-9d, }, // 18 - {+0.018384650349617004d, -9.482976524690715E-10d, }, // 19 - {+0.01934296265244484d, +1.9068609515836638E-10d,}, // 20 - {+0.020300358533859253d, +2.655990315697216E-10d, }, // 21 - {+0.021256837993860245d, +1.0315548713040775E-9d, }, // 22 - {+0.022212404757738113d, +5.13345647019085E-10d, }, // 23 - {+0.02316705882549286d, +4.5604151934208014E-10d,}, // 24 - {+0.02412080392241478d, -1.1255706987475148E-9d, }, // 25 - {+0.025073636323213577d, +1.2289023836765196E-9d, }, // 26 - {+0.02602556347846985d, +1.7990281828096504E-9d, }, // 27 - {+0.026976589113473892d, -1.4152718164638451E-9d, }, // 28 - {+0.02792670577764511d, +7.568772963781632E-10d, }, // 29 - {+0.0288759246468544d, -1.1449998592111558E-9d, }, // 30 - {+0.029824241995811462d, -1.6850976862319495E-9d, }, // 31 - {+0.030771657824516296d, +8.422373919843096E-10d, }, // 32 - {+0.0317181795835495d, +6.872350402175489E-10d, }, // 33 - {+0.03266380727291107d, -4.541194749189272E-10d, }, // 34 - {+0.03360854089260101d, -8.9064764856495E-10d, }, // 35 - {+0.034552380442619324d, +1.0640404096769032E-9d, }, // 36 - {+0.0354953333735466d, -3.5901655945224663E-10d,}, // 37 - {+0.03643739968538284d, -3.4829517943661266E-9d, }, // 38 - {+0.037378571927547455d, +8.149473794244232E-10d, }, // 39 - {+0.03831886500120163d, -6.990650304449166E-10d, }, // 40 - {+0.03925827145576477d, +1.0883076226453258E-9d, }, // 41 - {+0.040196798741817474d, +3.845192807999274E-10d, }, // 42 - {+0.04113444685935974d, -1.1570594692045927E-9d, }, // 43 - {+0.04207121580839157d, -1.8877045166697178E-9d, }, // 44 - {+0.043007105588912964d, -1.6332083257987747E-10d,}, // 45 - {+0.04394212365150452d, -1.7950057534514933E-9d, }, // 46 - {+0.04487626254558563d, +2.302710041648838E-9d, }, // 47 - {+0.045809537172317505d, -1.1410233017161343E-9d, }, // 48 - {+0.04674194008111954d, -3.0498741599744685E-9d, }, // 49 - {+0.04767347127199173d, -1.8026348269183678E-9d, }, // 50 - {+0.04860413819551468d, -3.233204600453039E-9d, }, // 51 - {+0.04953393340110779d, +1.7211688427961583E-9d, }, // 52 - {+0.05046287178993225d, -2.329967807055457E-10d, }, // 53 - {+0.05139094591140747d, -4.191810118556531E-11d, }, // 54 - {+0.052318163216114044d, -3.5574324788328143E-9d, }, // 55 - {+0.053244516253471375d, -1.7346590916458485E-9d, }, // 56 - {+0.05417001247406006d, -4.343048751383674E-10d, }, // 57 - {+0.055094651877880096d, +1.92909364037955E-9d, }, // 58 - {+0.056018441915512085d, -5.139745677199588E-10d, }, // 59 - {+0.05694137513637543d, +1.2637629975129189E-9d, }, // 60 - {+0.05786345899105072d, +1.3840561112481119E-9d, }, // 61 - {+0.058784693479537964d, +1.414889689612056E-9d, }, // 62 - {+0.05970507860183716d, +2.9199191907666474E-9d, }, // 63 - {+0.0606246218085289d, +7.90594243412116E-12d, }, // 64 - {+0.06154331564903259d, +1.6844747839686189E-9d, }, // 65 - {+0.06246116757392883d, +2.0498074572151747E-9d, }, // 66 - {+0.06337818503379822d, -4.800180493433863E-9d, }, // 67 - {+0.06429435312747955d, -2.4220822960064277E-9d, }, // 68 - {+0.06520968675613403d, -4.179048566709334E-9d, }, // 69 - {+0.06612417101860046d, +6.363872957010456E-9d, }, // 70 - {+0.06703783571720123d, +9.339468680056365E-10d, }, // 71 - {+0.06795066595077515d, -4.04226739708981E-9d, }, // 72 - {+0.0688626617193222d, -7.043545052852817E-9d, }, // 73 - {+0.06977382302284241d, -6.552819560439773E-9d, }, // 74 - {+0.07068414986133575d, -1.0571674860370546E-9d, }, // 75 - {+0.07159365713596344d, -3.948954622015801E-9d, }, // 76 - {+0.07250232994556427d, +1.1776625988228244E-9d, }, // 77 - {+0.07341018319129944d, +9.221072639606492E-10d, }, // 78 - {+0.07431721687316895d, -3.219119568928366E-9d, }, // 79 - {+0.0752234160900116d, +5.147575929018918E-9d, }, // 80 - {+0.07612881064414978d, -2.291749683541979E-9d, }, // 81 - {+0.07703337073326111d, +5.749565906124772E-9d, }, // 82 - {+0.07793712615966797d, +9.495158151301779E-10d, }, // 83 - {+0.07884006202220917d, -3.144331429489291E-10d, }, // 84 - {+0.0797421783208847d, +3.430029236134205E-9d, }, // 85 - {+0.08064348995685577d, -1.2499290483167703E-9d, }, // 86 - {+0.08154398202896118d, +2.011215719133196E-9d, }, // 87 - {+0.08244366943836212d, -2.2728753031387152E-10d,}, // 88 - {+0.0833425521850586d, -6.508966857277253E-9d, }, // 89 - {+0.0842406153678894d, -4.801131671405377E-10d, }, // 90 - {+0.08513787388801575d, +4.406750291994231E-9d, }, // 91 - {+0.08603434264659882d, -5.304795662536171E-9d, }, // 92 - {+0.08692999184131622d, +1.6284313912612293E-9d, }, // 93 - {+0.08782485127449036d, -3.158898981674071E-9d, }, // 94 - {+0.08871890604496002d, -3.3324878834139977E-9d, }, // 95 - {+0.08961215615272522d, +2.536961912893389E-9d, }, // 96 - {+0.09050461649894714d, +9.737596728980696E-10d, }, // 97 - {+0.0913962870836258d, -6.600437262505396E-9d, }, // 98 - {+0.09228715300559998d, -3.866609889222889E-9d, }, // 99 - {+0.09317722916603088d, -4.311847594020281E-9d, }, // 100 - {+0.09406651556491852d, -6.525851105645959E-9d, }, // 101 - {+0.09495499730110168d, +5.799080912675435E-9d, }, // 102 - {+0.09584270417690277d, +4.2634204358490415E-9d, }, // 103 - {+0.09672962129116058d, +5.167390528799477E-9d, }, // 104 - {+0.09761576354503632d, -4.994827392841906E-9d, }, // 105 - {+0.09850110113620758d, +4.970725577861395E-9d, }, // 106 - {+0.09938566386699677d, +6.6496705953229645E-9d, }, // 107 - {+0.10026945173740387d, +1.4262712796792241E-9d, }, // 108 - {+0.1011524498462677d, +5.5822855204629114E-9d, }, // 109 - {+0.10203467309474945d, +5.593494835247651E-9d, }, // 110 - {+0.10291612148284912d, +2.8332008343480686E-9d, }, // 111 - {+0.10379679501056671d, -1.3289231465997192E-9d, }, // 112 - {+0.10467669367790222d, -5.526819276639527E-9d, }, // 113 - {+0.10555580258369446d, +6.503128678219282E-9d, }, // 114 - {+0.10643415153026581d, +6.317463237641817E-9d, }, // 115 - {+0.10731174051761627d, -4.728528221305482E-9d, }, // 116 - {+0.10818853974342346d, +4.519199083083901E-9d, }, // 117 - {+0.10906457901000977d, +5.606492666349878E-9d, }, // 118 - {+0.10993985831737518d, -1.220176214398581E-10d, }, // 119 - {+0.11081436276435852d, +3.5759315936869937E-9d, }, // 120 - {+0.11168810725212097d, +3.1367659571899855E-9d, }, // 121 - {+0.11256109178066254d, -1.0543075713098835E-10d,}, // 122 - {+0.11343331634998322d, -4.820065619207094E-9d, }, // 123 - {+0.11430476605892181d, +5.221136819669415E-9d, }, // 124 - {+0.11517547070980072d, +1.5395018670011342E-9d, }, // 125 - {+0.11604541540145874d, +3.5638391501880846E-10d,}, // 126 - {+0.11691460013389587d, +2.9885336757136527E-9d, }, // 127 - {+0.11778303980827332d, -4.151889860890893E-9d, }, // 128 - {+0.11865071952342987d, -4.853823938804204E-9d, }, // 129 - {+0.11951763927936554d, +2.189226237170704E-9d, }, // 130 - {+0.12038381397724152d, +3.3791993048776982E-9d, }, // 131 - {+0.1212492436170578d, +1.5811884868243975E-11d,}, // 132 - {+0.12211392819881439d, -6.6045909118908625E-9d, }, // 133 - {+0.1229778528213501d, -2.8786263916116364E-10d,}, // 134 - {+0.12384103238582611d, +5.354472503748251E-9d, }, // 135 - {+0.12470348179340363d, -3.2924463896248744E-9d, }, // 136 - {+0.12556517124176025d, +4.856678149580005E-9d, }, // 137 - {+0.12642613053321838d, +1.2791850600366742E-9d, }, // 138 - {+0.12728634476661682d, +2.1525945093362843E-9d, }, // 139 - {+0.12814581394195557d, +8.749974471767862E-9d, }, // 140 - {+0.129004567861557d, -7.461209161105275E-9d, }, // 141 - {+0.12986254692077637d, +1.4390208226263824E-8d, }, // 142 - {+0.1307198405265808d, -1.3839477920475328E-8d, }, // 143 - {+0.13157635927200317d, -1.483283901239408E-9d, }, // 144 - {+0.13243216276168823d, -6.889072914229094E-9d, }, // 145 - {+0.1332872211933136d, +9.990351100568362E-10d, }, // 146 - {+0.13414156436920166d, -6.370937412495338E-9d, }, // 147 - {+0.13499516248703003d, +2.05047480130511E-9d, }, // 148 - {+0.1358480453491211d, -2.29509872547079E-9d, }, // 149 - {+0.13670018315315247d, +1.16354361977249E-8d, }, // 150 - {+0.13755163550376892d, -1.452496267904829E-8d, }, // 151 - {+0.1384023129940033d, +9.865115839786888E-9d, }, // 152 - {+0.13925230503082275d, -3.369999130712228E-9d, }, // 153 - {+0.14010155200958252d, +6.602496401651853E-9d, }, // 154 - {+0.14095008373260498d, +1.1205312852298845E-8d, }, // 155 - {+0.14179790019989014d, +1.1660367213160203E-8d, }, // 156 - {+0.142645001411438d, +9.186471222585239E-9d, }, // 157 - {+0.14349138736724854d, +4.999341878263704E-9d, }, // 158 - {+0.14433705806732178d, +3.11611905696257E-10d, }, // 159 - {+0.14518201351165771d, -3.6671598175618173E-9d, }, // 160 - {+0.14602625370025635d, -5.730477881659618E-9d, }, // 161 - {+0.14686977863311768d, -4.674900007989718E-9d, }, // 162 - {+0.1477125883102417d, +6.999732437141968E-10d, }, // 163 - {+0.14855468273162842d, +1.159150872494107E-8d, }, // 164 - {+0.14939609169960022d, -6.082714828488485E-10d, }, // 165 - {+0.15023678541183472d, -4.905712741596318E-9d, }, // 166 - {+0.1510767638683319d, -1.124848988733307E-10d, }, // 167 - {+0.15191605687141418d, -1.484557220949851E-8d, }, // 168 - {+0.15275460481643677d, +1.1682026251371384E-8d, }, // 169 - {+0.15359249711036682d, -8.757272519238786E-9d, }, // 170 - {+0.15442964434623718d, +1.4419920764774415E-8d, }, // 171 - {+0.15526613593101501d, -7.019891063126053E-9d, }, // 172 - {+0.15610191226005554d, -1.230153548825964E-8d, }, // 173 - {+0.15693697333335876d, -2.574172005933276E-10d, }, // 174 - {+0.15777134895324707d, +4.748140799544371E-10d, }, // 175 - {+0.15860503911972046d, -8.943081874891003E-9d, }, // 176 - {+0.15943801403045654d, +2.4500739038517657E-9d, }, // 177 - {+0.1602703034877777d, +6.007922084557054E-9d, }, // 178 - {+0.16110190749168396d, +2.8835418231126645E-9d, }, // 179 - {+0.1619328260421753d, -5.772862039728412E-9d, }, // 180 - {+0.16276302933692932d, +1.0988372954605789E-8d, }, // 181 - {+0.16359257698059082d, -5.292913162607026E-9d, }, // 182 - {+0.16442140936851501d, +6.12956339275823E-9d, }, // 183 - {+0.16524958610534668d, -1.3210039516811888E-8d, }, // 184 - {+0.16607704758644104d, -2.5711014608334873E-9d, }, // 185 - {+0.16690382361412048d, +9.37721319457112E-9d, }, // 186 - {+0.1677299439907074d, -6.0370682395944045E-9d, }, // 187 - {+0.168555349111557d, +1.1918249660105651E-8d, }, // 188 - {+0.1693800985813141d, +4.763282949656017E-9d, }, // 189 - {+0.17020416259765625d, +3.4223342273948817E-9d, }, // 190 - {+0.1710275411605835d, +9.014612241310916E-9d, }, // 191 - {+0.1718502640724182d, -7.145758990550526E-9d, }, // 192 - {+0.172672301530838d, -1.4142763934081504E-8d, }, // 193 - {+0.1734936535358429d, -1.0865453656579032E-8d, }, // 194 - {+0.17431432008743286d, +3.794385569450774E-9d, }, // 195 - {+0.1751343309879303d, +1.1399188501627291E-9d, }, // 196 - {+0.17595365643501282d, +1.2076238768270153E-8d, }, // 197 - {+0.1767723262310028d, +7.901084730502162E-9d, }, // 198 - {+0.17759034037590027d, -1.0288181007465474E-8d, }, // 199 - {+0.1784076690673828d, -1.15945645153806E-8d, }, // 200 - {+0.17922431230545044d, +5.073923825786778E-9d, }, // 201 - {+0.18004029989242554d, +1.1004278077575267E-8d, }, // 202 - {+0.1808556318283081d, +7.2831502374676964E-9d, }, // 203 - {+0.18167030811309814d, -5.0054634662706464E-9d, }, // 204 - {+0.18248429894447327d, +5.022108460298934E-9d, }, // 205 - {+0.18329763412475586d, +8.642254225732676E-9d, }, // 206 - {+0.18411031365394592d, +6.931054493326395E-9d, }, // 207 - {+0.18492233753204346d, +9.619685356326533E-10d, }, // 208 - {+0.18573370575904846d, -8.194157257980706E-9d, }, // 209 - {+0.18654438853263855d, +1.0333241479437797E-8d, }, // 210 - {+0.1873544454574585d, -1.9948340196027965E-9d, }, // 211 - {+0.1881638467311859d, -1.4313002926259948E-8d, }, // 212 - {+0.1889725625514984d, +4.241536392174967E-9d, }, // 213 - {+0.18978065252304077d, -4.877952454011428E-9d, }, // 214 - {+0.1905880868434906d, -1.0813801247641613E-8d, }, // 215 - {+0.1913948655128479d, -1.2513218445781325E-8d, }, // 216 - {+0.19220098853111267d, -8.925958555729115E-9d, }, // 217 - {+0.1930064558982849d, +9.956860681280245E-10d, }, // 218 - {+0.193811297416687d, -1.1505428993246996E-8d, }, // 219 - {+0.1946154534816742d, +1.4217997464522202E-8d, }, // 220 - {+0.19541901350021362d, -1.0200858727747717E-8d, }, // 221 - {+0.19622188806533813d, +5.682607223902455E-9d, }, // 222 - {+0.1970241367816925d, +3.2988908516009827E-9d, }, // 223 - {+0.19782572984695435d, +1.3482965534659446E-8d, }, // 224 - {+0.19862669706344604d, +7.462678536479685E-9d, }, // 225 - {+0.1994270384311676d, -1.3734273888891115E-8d, }, // 226 - {+0.20022669434547424d, +1.0521983802642893E-8d, }, // 227 - {+0.20102575421333313d, -8.152742388541905E-9d, }, // 228 - {+0.2018241584300995d, -9.133484280193855E-9d, }, // 229 - {+0.20262190699577332d, +8.59763959528144E-9d, }, // 230 - {+0.2034190595149994d, -1.3548568223001414E-8d, }, // 231 - {+0.20421552658081055d, +1.4847880344628818E-8d, }, // 232 - {+0.20501139760017395d, +5.390620378060543E-9d, }, // 233 - {+0.2058066427707672d, -1.1109834472051523E-8d, }, // 234 - {+0.20660123229026794d, -3.845373872038116E-9d, }, // 235 - {+0.20739519596099854d, -1.6149279479975042E-9d, }, // 236 - {+0.20818853378295898d, -3.4174925203771133E-9d, }, // 237 - {+0.2089812457561493d, -8.254443919468538E-9d, }, // 238 - {+0.20977330207824707d, +1.4672790944499144E-8d, }, // 239 - {+0.2105647623538971d, +6.753452542942992E-9d, }, // 240 - {+0.21135559678077698d, -1.218609462241927E-9d, }, // 241 - {+0.21214580535888672d, -8.254218316367887E-9d, }, // 242 - {+0.21293538808822632d, -1.3366540360587255E-8d, }, // 243 - {+0.2137243151664734d, +1.4231244750190031E-8d, }, // 244 - {+0.2145126760005951d, -1.3885660525939072E-8d, }, // 245 - {+0.21530038118362427d, -7.3304404046850136E-9d, }, // 246 - {+0.2160874605178833d, +5.072117654842356E-9d, }, // 247 - {+0.21687394380569458d, -5.505080220459036E-9d, }, // 248 - {+0.21765980124473572d, -8.286782292266659E-9d, }, // 249 - {+0.2184450328350067d, -2.302351152358085E-9d, }, // 250 - {+0.21922963857650757d, +1.3416565858314603E-8d, }, // 251 - {+0.22001364827156067d, +1.0033721426962048E-8d, }, // 252 - {+0.22079706192016602d, -1.1487079818684332E-8d, }, // 253 - {+0.22157981991767883d, +9.420348186357043E-9d, }, // 254 - {+0.2223619818687439d, +1.4110645699377834E-8d, }, // 255 - {+0.2231435477733612d, +3.5408485497116107E-9d, }, // 256 - {+0.22392448782920837d, +8.468072777056227E-9d, }, // 257 - {+0.2247048318386078d, +4.255446699237779E-11d, }, // 258 - {+0.22548454999923706d, +9.016946273084244E-9d, }, // 259 - {+0.22626367211341858d, +6.537034810260226E-9d, }, // 260 - {+0.22704219818115234d, -6.451285264969768E-9d, }, // 261 - {+0.22782009840011597d, +7.979956357126066E-10d, }, // 262 - {+0.22859740257263184d, -5.759582672039005E-10d, }, // 263 - {+0.22937411069869995d, -9.633854121180397E-9d, }, // 264 - {+0.23015019297599792d, +4.363736368635843E-9d, }, // 265 - {+0.23092567920684814d, +1.2549416560182509E-8d, }, // 266 - {+0.231700599193573d, -1.3946383592553814E-8d, }, // 267 - {+0.2324748933315277d, -1.458843364504023E-8d, }, // 268 - {+0.23324856162071228d, +1.1551692104697154E-8d, }, // 269 - {+0.23402166366577148d, +5.795621295524984E-9d, }, // 270 - {+0.23479416966438293d, -1.1301979046684263E-9d, }, // 271 - {+0.23556607961654663d, -8.303779721781787E-9d, }, // 272 - {+0.23633739352226257d, -1.4805271785394075E-8d, }, // 273 - {+0.23710808157920837d, +1.0085373835899469E-8d, }, // 274 - {+0.2378782033920288d, +7.679117635349454E-9d, }, // 275 - {+0.2386477291584015d, +8.69177352065934E-9d, }, // 276 - {+0.23941665887832642d, +1.4034725764547136E-8d, }, // 277 - {+0.24018502235412598d, -5.185064518887831E-9d, }, // 278 - {+0.2409527599811554d, +1.1544236628121676E-8d, }, // 279 - {+0.24171993136405945d, +5.523085719902123E-9d, }, // 280 - {+0.24248650670051575d, +7.456824943331887E-9d, }, // 281 - {+0.24325251579284668d, -1.1555923403029638E-8d, }, // 282 - {+0.24401789903640747d, +8.988361382732908E-9d, }, // 283 - {+0.2447827160358429d, +1.0381848020926893E-8d, }, // 284 - {+0.24554696679115295d, -6.480706118857055E-9d, }, // 285 - {+0.24631062150001526d, -1.0904271124793968E-8d, }, // 286 - {+0.2470736801624298d, -1.998183061531611E-9d, }, // 287 - {+0.247836172580719d, -8.676137737360023E-9d, }, // 288 - {+0.24859806895256042d, -2.4921733203932487E-10d,}, // 289 - {+0.2493593990802765d, -5.635173762130303E-9d, }, // 290 - {+0.2501201629638672d, -2.3951455355985637E-8d, }, // 291 - {+0.25088030099868774d, +5.287121672447825E-9d, }, // 292 - {+0.2516399025917053d, -6.447877375049486E-9d, }, // 293 - {+0.25239890813827515d, +1.32472428796441E-9d, }, // 294 - {+0.2531573176383972d, +2.9479464287605006E-8d, }, // 295 - {+0.2539151906967163d, +1.9284247135543574E-8d, }, // 296 - {+0.2546725273132324d, -2.8390360197221716E-8d, }, // 297 - {+0.255429208278656d, +6.533522495226226E-9d, }, // 298 - {+0.2561853528022766d, +5.713225978895991E-9d, }, // 299 - {+0.25694090127944946d, +2.9618050962556135E-8d, }, // 300 - {+0.25769591331481934d, +1.950605015323617E-8d, }, // 301 - {+0.25845038890838623d, -2.3762031507525576E-8d, }, // 302 - {+0.2592042088508606d, +1.98818938195077E-8d, }, // 303 - {+0.25995755195617676d, -2.751925069084042E-8d, }, // 304 - {+0.2607102394104004d, +1.3703391844683932E-8d, }, // 305 - {+0.26146239042282104d, +2.5193525310038174E-8d, }, // 306 - {+0.2622140049934387d, +7.802219817310385E-9d, }, // 307 - {+0.26296502351760864d, +2.1983272709242607E-8d, }, // 308 - {+0.2637155055999756d, +8.979279989292184E-9d, }, // 309 - {+0.2644653916358948d, +2.9240221157844312E-8d, }, // 310 - {+0.265214741230011d, +2.4004885823813374E-8d, }, // 311 - {+0.2659635543823242d, -5.885186277410878E-9d, }, // 312 - {+0.2667117714881897d, +1.4300386517357162E-11d,}, // 313 - {+0.2674594521522522d, -1.7063531531989365E-8d, }, // 314 - {+0.26820653676986694d, +3.3218524692903896E-9d, }, // 315 - {+0.2689530849456787d, +2.3998252479954764E-9d, }, // 316 - {+0.2696990966796875d, -1.8997462070389404E-8d, }, // 317 - {+0.27044451236724854d, -4.350745270980051E-10d, }, // 318 - {+0.2711893916130066d, -6.892221115467135E-10d, }, // 319 - {+0.27193373441696167d, -1.89333199110902E-8d, }, // 320 - {+0.272677481174469d, +5.262017392507765E-9d, }, // 321 - {+0.27342069149017334d, +1.3115046679980076E-8d, }, // 322 - {+0.2741633653640747d, +5.4468361834451975E-9d, }, // 323 - {+0.2749055027961731d, -1.692337384653611E-8d, }, // 324 - {+0.27564704418182373d, +6.426479056697412E-9d, }, // 325 - {+0.2763880491256714d, +1.670735065191342E-8d, }, // 326 - {+0.27712851762771606d, +1.4733029698334834E-8d, }, // 327 - {+0.27786844968795776d, +1.315498542514467E-9d, }, // 328 - {+0.2786078453063965d, -2.2735061539223372E-8d, }, // 329 - {+0.27934664487838745d, +2.994379757313727E-9d, }, // 330 - {+0.28008490800857544d, +1.970577274107218E-8d, }, // 331 - {+0.28082263469696045d, +2.820392733542077E-8d, }, // 332 - {+0.2815598249435425d, +2.929187356678173E-8d, }, // 333 - {+0.28229647874832153d, +2.377086680926386E-8d, }, // 334 - {+0.2830325961112976d, +1.2440393009992529E-8d, }, // 335 - {+0.2837681770324707d, -3.901826104778096E-9d, }, // 336 - {+0.2845032215118408d, -2.4459827842685974E-8d, }, // 337 - {+0.2852376699447632d, +1.1165241398059789E-8d, }, // 338 - {+0.28597164154052734d, -1.54434478239181E-8d, }, // 339 - {+0.28670501708984375d, +1.5714110564653245E-8d, }, // 340 - {+0.28743791580200195d, -1.3782394940142479E-8d, }, // 341 - {+0.2881702184677124d, +1.6063569876284005E-8d, }, // 342 - {+0.28890204429626465d, -1.317176818216125E-8d, }, // 343 - {+0.28963327407836914d, +1.8504673536253893E-8d, }, // 344 - {+0.29036402702331543d, -7.334319635123628E-9d, }, // 345 - {+0.29109418392181396d, +2.9300903540317107E-8d, }, // 346 - {+0.2918238639831543d, +9.979706999541057E-9d, }, // 347 - {+0.29255300760269165d, -4.916314210412424E-9d, }, // 348 - {+0.293281614780426d, -1.4611908070155308E-8d, }, // 349 - {+0.2940096855163574d, -1.833351586679361E-8d, }, // 350 - {+0.29473721981048584d, -1.530926726615185E-8d, }, // 351 - {+0.2954642176628113d, -4.7689754029101934E-9d, }, // 352 - {+0.29619067907333374d, +1.4055868011423819E-8d, }, // 353 - {+0.296916663646698d, -1.7672547212604003E-8d, }, // 354 - {+0.2976420521736145d, +2.0020234215759705E-8d, }, // 355 - {+0.2983669638633728d, +8.688424478730524E-9d, }, // 356 - {+0.2990913391113281d, +8.69851089918337E-9d, }, // 357 - {+0.29981517791748047d, +2.0810681643102672E-8d, }, // 358 - {+0.3005385398864746d, -1.3821169493779352E-8d, }, // 359 - {+0.301261305809021d, +2.4769140784919128E-8d, }, // 360 - {+0.3019835948944092d, +1.8127576600610336E-8d, }, // 361 - {+0.3027053475379944d, +2.6612401062437074E-8d, }, // 362 - {+0.3034266233444214d, -8.629042891789934E-9d, }, // 363 - {+0.3041473627090454d, -2.724174869314043E-8d, }, // 364 - {+0.30486756563186646d, -2.8476975783775358E-8d, }, // 365 - {+0.3055872321128845d, -1.1587600174449919E-8d, }, // 366 - {+0.3063063621520996d, +2.417189020581056E-8d, }, // 367 - {+0.3070250153541565d, +1.99407553679345E-8d, }, // 368 - {+0.3077431917190552d, -2.35387025694381E-8d, }, // 369 - {+0.3084607720375061d, +1.3683509995845583E-8d, }, // 370 - {+0.30917787551879883d, +1.3137214081023085E-8d, }, // 371 - {+0.30989450216293335d, -2.444006866174775E-8d, }, // 372 - {+0.3106105327606201d, +2.0896888605749563E-8d, }, // 373 - {+0.31132614612579346d, -2.893149098508887E-8d, }, // 374 - {+0.31204116344451904d, +5.621509038251498E-9d, }, // 375 - {+0.3127557039260864d, +6.0778104626050015E-9d, }, // 376 - {+0.3134697675704956d, -2.6832941696716294E-8d, }, // 377 - {+0.31418323516845703d, +2.6826625274495256E-8d, }, // 378 - {+0.31489628553390503d, -1.1030897183911054E-8d, }, // 379 - {+0.31560879945755005d, -2.047124671392676E-8d, }, // 380 - {+0.3163207769393921d, -7.709990443086711E-10d, }, // 381 - {+0.3170322775840759d, -1.0812918808112342E-8d, }, // 382 - {+0.3177432417869568d, +9.727979174888975E-9d, }, // 383 - {+0.31845372915267944d, +1.9658551724508715E-9d, }, // 384 - {+0.3191636800765991d, +2.6222628001695826E-8d, }, // 385 - {+0.3198731541633606d, +2.3609400272358744E-8d, }, // 386 - {+0.32058215141296387d, -5.159602957634814E-9d, }, // 387 - {+0.32129061222076416d, +2.329701319016099E-10d, }, // 388 - {+0.32199859619140625d, -1.910633190395738E-8d, }, // 389 - {+0.32270604372024536d, -2.863180390093667E-9d, }, // 390 - {+0.32341301441192627d, -9.934041364456825E-9d, }, // 391 - {+0.3241194486618042d, +1.999240777687192E-8d, }, // 392 - {+0.3248254060745239d, +2.801670341647724E-8d, }, // 393 - {+0.32553088665008545d, +1.4842534265191358E-8d, }, // 394 - {+0.32623589038848877d, -1.882789920477354E-8d, }, // 395 - {+0.3269403576850891d, -1.268923579073577E-8d, }, // 396 - {+0.32764434814453125d, -2.564688370677835E-8d, }, // 397 - {+0.3283478021621704d, +2.6015626820520968E-9d, }, // 398 - {+0.32905077934265137d, +1.3147747907784344E-8d, }, // 399 - {+0.3297532796859741d, +6.686493860720675E-9d, }, // 400 - {+0.33045530319213867d, -1.608884086544153E-8d, }, // 401 - {+0.33115679025650024d, +5.118287907840204E-9d, }, // 402 - {+0.3318578004837036d, +1.139367970944884E-8d, }, // 403 - {+0.3325583338737488d, +3.426327822115399E-9d, }, // 404 - {+0.33325839042663574d, -1.809622142990733E-8d, }, // 405 - {+0.3339579105377197d, +7.116780143398601E-9d, }, // 406 - {+0.3346569538116455d, +2.0145352306345386E-8d, }, // 407 - {+0.3353555202484131d, +2.167272474431968E-8d, }, // 408 - {+0.33605360984802246d, +1.2380696294966822E-8d, }, // 409 - {+0.33675122261047363d, -7.050361059209181E-9d, }, // 410 - {+0.3374482989311218d, +2.366314656322868E-8d, }, // 411 - {+0.3381449580192566d, -1.4010540194086646E-8d, }, // 412 - {+0.3388410806655884d, -1.860165465666482E-10d, }, // 413 - {+0.33953672647476196d, +6.206776940880773E-9d, }, // 414 - {+0.34023189544677734d, +5.841137379010982E-9d, }, // 415 - {+0.3409265875816345d, -6.11041311179286E-10d, }, // 416 - {+0.3416208028793335d, -1.2479264502054702E-8d, }, // 417 - {+0.34231454133987427d, -2.909443297645926E-8d, }, // 418 - {+0.34300774335861206d, +9.815805717097634E-9d, }, // 419 - {+0.3437005281448364d, -1.4291517981101049E-8d, }, // 420 - {+0.3443927764892578d, +1.8457821628427503E-8d, }, // 421 - {+0.34508460760116577d, -1.0481908869377813E-8d, }, // 422 - {+0.34577590227127075d, +1.876076001514746E-8d, }, // 423 - {+0.3464667797088623d, -1.2362653723769037E-8d, }, // 424 - {+0.3471571207046509d, +1.6016578405624026E-8d, }, // 425 - {+0.347847044467926d, -1.4652759033760925E-8d, }, // 426 - {+0.3485364317893982d, +1.549533655901835E-8d, }, // 427 - {+0.34922540187835693d, -1.2093068629412478E-8d, }, // 428 - {+0.3499138355255127d, +2.244531711424792E-8d, }, // 429 - {+0.35060185194015503d, +5.538565518604807E-10d, }, // 430 - {+0.35128939151763916d, -1.7511499366215853E-8d, }, // 431 - {+0.3519763946533203d, +2.850385787215544E-8d, }, // 432 - {+0.35266298055648804d, +2.003926370146842E-8d, }, // 433 - {+0.35334908962249756d, +1.734665280502264E-8d, }, // 434 - {+0.3540347218513489d, +2.1071983674869414E-8d, }, // 435 - {+0.35471993684768677d, -2.774475773922311E-8d, }, // 436 - {+0.3554046154022217d, -9.250975291734664E-9d, }, // 437 - {+0.3560888171195984d, +1.7590672330295415E-8d, }, // 438 - {+0.35677260160446167d, -6.1837904549178745E-9d, }, // 439 - {+0.35745590925216675d, -2.0330362973820856E-8d, }, // 440 - {+0.3581387400627136d, -2.42109990366786E-8d, }, // 441 - {+0.3588210940361023d, -1.7188958587407816E-8d, }, // 442 - {+0.35950297117233276d, +1.3711958590112228E-9d, }, // 443 - {+0.3601844310760498d, -2.7501042008405925E-8d, }, // 444 - {+0.36086535453796387d, +1.6036460343275798E-8d, }, // 445 - {+0.3615458607673645d, +1.3405964389498495E-8d, }, // 446 - {+0.36222589015960693d, +2.484237749027735E-8d, }, // 447 - {+0.36290550231933594d, -8.629967484362177E-9d, }, // 448 - {+0.36358463764190674d, -2.6778729562324134E-8d, }, // 449 - {+0.36426329612731934d, -2.8977490516960565E-8d, }, // 450 - {+0.36494147777557373d, -1.4601106624823502E-8d, }, // 451 - {+0.3656191825866699d, +1.69742947894444E-8d, }, // 452 - {+0.3662964701652527d, +6.7666740211281175E-9d, }, // 453 - {+0.36697328090667725d, +1.500201674336832E-8d, }, // 454 - {+0.3676496744155884d, -1.730424167425052E-8d, }, // 455 - {+0.36832553148269653d, +2.9676011119845104E-8d, }, // 456 - {+0.36900103092193604d, -2.2253590346826743E-8d, }, // 457 - {+0.36967599391937256d, +6.3372065441089185E-9d, }, // 458 - {+0.37035053968429565d, -3.145816653215968E-9d, }, // 459 - {+0.37102460861206055d, +9.515812117036965E-9d, }, // 460 - {+0.371698260307312d, -1.4669965113042639E-8d, }, // 461 - {+0.3723714351654053d, -1.548715389333397E-8d, }, // 462 - {+0.37304413318634033d, +7.674361647125109E-9d, }, // 463 - {+0.37371641397476196d, -4.181177882069608E-9d, }, // 464 - {+0.3743882179260254d, +9.158530500130718E-9d, }, // 465 - {+0.3750596046447754d, -1.13047236597869E-8d, }, // 466 - {+0.3757305145263672d, -5.36108186384227E-9d, }, // 467 - {+0.3764009475708008d, +2.7593452284747873E-8d, }, // 468 - {+0.37707096338272095d, +2.8557016344085205E-8d, }, // 469 - {+0.3777405619621277d, -1.868818164036E-9d, }, // 470 - {+0.3784096837043762d, -3.479042513414447E-9d, }, // 471 - {+0.37907832860946655d, +2.432550290565648E-8d, }, // 472 - {+0.37974655628204346d, +2.2538131805476768E-8d, }, // 473 - {+0.38041436672210693d, -8.244395239939089E-9d, }, // 474 - {+0.3810817003250122d, -7.821867597227376E-9d, }, // 475 - {+0.3817485570907593d, +2.4400089062515914E-8d, }, // 476 - {+0.3824149966239929d, +2.9410015940087773E-8d, }, // 477 - {+0.38308101892471313d, +7.799913824734797E-9d, }, // 478 - {+0.38374656438827515d, +1.976524624939355E-8d, }, // 479 - {+0.38441169261932373d, +6.291008309266035E-9d, }, // 480 - {+0.3850763440132141d, +2.757030889767851E-8d, }, // 481 - {+0.38574057817459106d, +2.4585794728405612E-8d, }, // 482 - {+0.3864043951034546d, -2.0764122246389383E-9d, }, // 483 - {+0.3870677351951599d, +7.77328837578952E-9d, }, // 484 - {+0.3877306580543518d, -4.8859560029989374E-9d, }, // 485 - {+0.3883931040763855d, +2.0133131420595028E-8d, }, // 486 - {+0.38905513286590576d, +2.380738071335498E-8d, }, // 487 - {+0.3897167444229126d, +6.7171126157142075E-9d, }, // 488 - {+0.39037787914276123d, +2.9046141593926277E-8d, }, // 489 - {+0.3910386562347412d, -2.7836800219410262E-8d, }, // 490 - {+0.3916988968849182d, +1.545909820981726E-8d, }, // 491 - {+0.39235877990722656d, -1.930436269002062E-8d, }, // 492 - {+0.3930181860923767d, -1.2343297554921835E-8d, }, // 493 - {+0.3936771750450134d, -2.268889128622553E-8d, }, // 494 - {+0.39433568716049194d, +9.835827818608177E-9d, }, // 495 - {+0.39499378204345703d, +2.6197411946856397E-8d, }, // 496 - {+0.3956514596939087d, +2.6965931069318893E-8d, }, // 497 - {+0.3963087201118469d, +1.2710331127772166E-8d, }, // 498 - {+0.39696556329727173d, -1.6001563011916016E-8d, }, // 499 - {+0.39762192964553833d, +1.0016001590267064E-9d, }, // 500 - {+0.3982778787612915d, +4.680767399874334E-9d, }, // 501 - {+0.39893341064453125d, -4.399582029272418E-9d, }, // 502 - {+0.39958852529525757d, -2.5676078228301587E-8d, }, // 503 - {+0.4002431631088257d, +1.0181870233355787E-9d, }, // 504 - {+0.40089738368988037d, +1.6639728835984655E-8d, }, // 505 - {+0.40155118703842163d, +2.174860642202632E-8d, }, // 506 - {+0.40220457315444946d, +1.6903781197123503E-8d, }, // 507 - {+0.40285754203796387d, +2.663119647467697E-9d, }, // 508 - {+0.40351009368896484d, -2.0416603812329616E-8d, }, // 509 - {+0.4041621685028076d, +7.82494078472695E-9d, }, // 510 - {+0.40481382608413696d, +2.833770747113627E-8d, }, // 511 - {+0.40546512603759766d, -1.7929433274271985E-8d, }, // 512 - {+0.40611594915390015d, -1.1214757379328965E-8d, }, // 513 - {+0.4067663550376892d, -1.0571553019207106E-8d, }, // 514 - {+0.40741634368896484d, -1.5449538712332313E-8d, }, // 515 - {+0.40806591510772705d, -2.529950530235105E-8d, }, // 516 - {+0.40871500968933105d, +2.0031331601617008E-8d, }, // 517 - {+0.4093637466430664d, +1.880755298741952E-9d, }, // 518 - {+0.41001206636428833d, -1.9600580584843318E-8d, }, // 519 - {+0.41065990924835205d, +1.573691633515306E-8d, }, // 520 - {+0.4113073945045471d, -1.0772154376548336E-8d, }, // 521 - {+0.411954402923584d, +2.0624330192486066E-8d, }, // 522 - {+0.4126010537147522d, -8.741139170029572E-9d, }, // 523 - {+0.4132472276687622d, +2.0881457123894216E-8d, }, // 524 - {+0.41389304399490356d, -9.177488027521808E-9d, }, // 525 - {+0.4145383834838867d, +2.0829952491625585E-8d, }, // 526 - {+0.4151833653450012d, -7.767915492597301E-9d, }, // 527 - {+0.4158278703689575d, +2.4774753446082082E-8d, }, // 528 - {+0.41647201776504517d, -2.1581119071750435E-10d,}, // 529 - {+0.4171157479286194d, -2.260047972865202E-8d, }, // 530 - {+0.4177590012550354d, +1.775884601423381E-8d, }, // 531 - {+0.41840189695358276d, +2.185301053838889E-9d, }, // 532 - {+0.4190443754196167d, -9.185071463667081E-9d, }, // 533 - {+0.4196864366531372d, -1.5821896727910552E-8d, }, // 534 - {+0.4203280806541443d, -1.719582086188318E-8d, }, // 535 - {+0.42096930742263794d, -1.2778508303324259E-8d, }, // 536 - {+0.42161011695861816d, -2.042639194493364E-9d, }, // 537 - {+0.42225050926208496d, +1.5538093219698803E-8d, }, // 538 - {+0.4228905439376831d, -1.9115659590156936E-8d, }, // 539 - {+0.42353010177612305d, +1.3729680248843432E-8d, }, // 540 - {+0.42416930198669434d, -4.611893838830296E-9d, }, // 541 - {+0.4248080849647522d, -1.4013456880651706E-8d, }, // 542 - {+0.42544645071029663d, -1.3953728897042917E-8d, }, // 543 - {+0.42608439922332764d, -3.912427573594197E-9d, }, // 544 - {+0.4267219305038452d, +1.6629734283189315E-8d, }, // 545 - {+0.42735910415649414d, -1.1413593493354881E-8d, }, // 546 - {+0.42799586057662964d, -2.792046157580119E-8d, }, // 547 - {+0.42863214015960693d, +2.723009182661306E-8d, }, // 548 - {+0.42926812171936035d, -2.4260535621557444E-8d, }, // 549 - {+0.42990362644195557d, -3.064060124024764E-9d, }, // 550 - {+0.43053877353668213d, -2.787640178598121E-8d, }, // 551 - {+0.4311734437942505d, +2.102412085257792E-8d, }, // 552 - {+0.4318077564239502d, +2.4939635093999683E-8d, }, // 553 - {+0.43244171142578125d, -1.5619414792273914E-8d, }, // 554 - {+0.4330751895904541d, +1.9065734894871523E-8d, }, // 555 - {+0.4337083101272583d, +1.0294301092654604E-8d, }, // 556 - {+0.4343410134315491d, +1.8178469851136E-8d, }, // 557 - {+0.4349733591079712d, -1.6379825102473853E-8d, }, // 558 - {+0.4356052279472351d, +2.6334323946685834E-8d, }, // 559 - {+0.43623673915863037d, +2.761628769925529E-8d, }, // 560 - {+0.436867892742157d, -1.2030229087793677E-8d, }, // 561 - {+0.4374985694885254d, +2.7106814809424793E-8d, }, // 562 - {+0.43812888860702515d, +2.631993083235205E-8d, }, // 563 - {+0.43875885009765625d, -1.3890028312254422E-8d, }, // 564 - {+0.43938833475112915d, +2.6186133735555794E-8d, }, // 565 - {+0.4400174617767334d, +2.783809071694788E-8d, }, // 566 - {+0.440646231174469d, -8.436135220472006E-9d, }, // 567 - {+0.44127458333969116d, -2.2534815932619883E-8d, }, // 568 - {+0.4419025182723999d, -1.3961804471714283E-8d, }, // 569 - {+0.4425300359725952d, +1.7778112039716255E-8d, }, // 570 - {+0.4431571960449219d, +1.3574569976673652E-8d, }, // 571 - {+0.4437839984893799d, -2.607907890164073E-8d, }, // 572 - {+0.4444103240966797d, +1.8518879652136628E-8d, }, // 573 - {+0.44503629207611084d, +2.865065604247164E-8d, }, // 574 - {+0.44566190242767334d, +4.806827797299427E-9d, }, // 575 - {+0.4462870955467224d, +7.0816970994232115E-9d, }, // 576 - {+0.44691193103790283d, -2.3640641240074437E-8d, }, // 577 - {+0.4475363492965698d, -2.7267718387865538E-8d, }, // 578 - {+0.4481603503227234d, -3.3126235292976077E-9d, }, // 579 - {+0.4487839937210083d, -1.0894001590268427E-8d, }, // 580 - {+0.4494072198867798d, +1.0077883359971829E-8d, }, // 581 - {+0.4500300884246826d, +4.825712712114668E-10d, }, // 582 - {+0.450652539730072d, +2.0407987470746858E-8d, }, // 583 - {+0.4512746334075928d, +1.073186581170719E-8d, }, // 584 - {+0.4518963694572449d, -2.8064314757880205E-8d, }, // 585 - {+0.45251762866973877d, +2.3709316816226527E-8d, }, // 586 - {+0.4531385898590088d, -1.2281487504266522E-8d, }, // 587 - {+0.4537591338157654d, -1.634864487421458E-8d, }, // 588 - {+0.45437926054000854d, +1.1985747222409522E-8d, }, // 589 - {+0.45499902963638306d, +1.3594057956219485E-8d, }, // 590 - {+0.4556184411048889d, -1.1047585095328619E-8d, }, // 591 - {+0.45623743534088135d, -1.8592937532754405E-9d, }, // 592 - {+0.4568560719490051d, -1.797135137545755E-8d, }, // 593 - {+0.4574742913246155d, +6.943684261645378E-10d, }, // 594 - {+0.4580921530723572d, -4.994175141684681E-9d, }, // 595 - {+0.45870959758758545d, +2.5039391215625133E-8d, }, // 596 - {+0.45932674407958984d, -2.7943366835352838E-8d, }, // 597 - {+0.45994341373443604d, +1.534146910128904E-8d, }, // 598 - {+0.46055978536605835d, -2.3450920230816267E-8d, }, // 599 - {+0.46117573976516724d, -2.4642997069960124E-8d, }, // 600 - {+0.4617912769317627d, +1.2232622070370946E-8d, }, // 601 - {+0.4624064564704895d, +2.80378133047839E-8d, }, // 602 - {+0.46302127838134766d, +2.3238237048117092E-8d, }, // 603 - {+0.46363574266433716d, -1.7013046451109475E-9d, }, // 604 - {+0.46424978971481323d, +1.3287778803035383E-8d, }, // 605 - {+0.46486347913742065d, +9.06393426961373E-9d, }, // 606 - {+0.4654768109321594d, -1.3910598647592876E-8d, }, // 607 - {+0.46608972549438477d, +4.430214458933614E-9d, }, // 608 - {+0.46670228242874146d, +4.942270562885745E-9d, }, // 609 - {+0.4673144817352295d, -1.1914734393460718E-8d, }, // 610 - {+0.4679262638092041d, +1.3922696570638494E-8d, }, // 611 - {+0.46853768825531006d, +2.3307929211781914E-8d, }, // 612 - {+0.46914875507354736d, +1.669813444584674E-8d, }, // 613 - {+0.469759464263916d, -5.450354376430758E-9d, }, // 614 - {+0.47036975622177124d, +1.6922605350647674E-8d, }, // 615 - {+0.4709796905517578d, +2.4667033200046904E-8d, }, // 616 - {+0.47158926725387573d, +1.8236762070433784E-8d, }, // 617 - {+0.472198486328125d, -1.915204563140137E-9d, }, // 618 - {+0.47280728816986084d, +2.426795414605756E-8d, }, // 619 - {+0.4734157919883728d, -2.19717006713618E-8d, }, // 620 - {+0.47402387857437134d, -2.0974352165535873E-8d, }, // 621 - {+0.47463154792785645d, +2.770970558184228E-8d, }, // 622 - {+0.4752389192581177d, +5.32006955298355E-9d, }, // 623 - {+0.47584593296051025d, -2.809054633964104E-8d, }, // 624 - {+0.4764525294303894d, -1.2470243596102937E-8d, }, // 625 - {+0.4770587682723999d, -6.977226702440138E-9d, }, // 626 - {+0.47766464948654175d, -1.1165866833118273E-8d, }, // 627 - {+0.47827017307281494d, -2.4591344661022708E-8d, }, // 628 - {+0.4788752794265747d, +1.2794996377383974E-8d, }, // 629 - {+0.4794800877571106d, -1.7772927065973874E-8d, }, // 630 - {+0.48008447885513306d, +3.35657712457243E-9d, }, // 631 - {+0.48068851232528687d, +1.7020465042442242E-8d, }, // 632 - {+0.481292188167572d, +2.365953779624783E-8d, }, // 633 - {+0.4818955063819885d, +2.3713798664443718E-8d, }, // 634 - {+0.4824984669685364d, +1.7622455019548098E-8d, }, // 635 - {+0.4831010699272156d, +5.823920246566496E-9d, }, // 636 - {+0.4837033152580261d, -1.1244184344361017E-8d, }, // 637 - {+0.48430514335632324d, +2.645961716432205E-8d, }, // 638 - {+0.4849066734313965d, +1.6207809718247905E-10d,}, // 639 - {+0.4855077862739563d, +2.9507744508973654E-8d, }, // 640 - {+0.48610860109329224d, -4.278201128741098E-9d, }, // 641 - {+0.48670899868011475d, +1.844722015961139E-8d, }, // 642 - {+0.4873090982437134d, -2.1092372471088425E-8d, }, // 643 - {+0.4879087805747986d, -3.2555596107382053E-9d, }, // 644 - {+0.48850810527801514d, +1.2784366845429667E-8d, }, // 645 - {+0.48910707235336304d, +2.7457984659996047E-8d, }, // 646 - {+0.48970574140548706d, -1.8409546441412518E-8d, }, // 647 - {+0.49030399322509766d, -5.179903818099661E-9d, }, // 648 - {+0.4909018874168396d, +7.97053127828682E-9d, }, // 649 - {+0.4914994239807129d, +2.146925464473481E-8d, }, // 650 - {+0.4920966625213623d, -2.3861648589988232E-8d, }, // 651 - {+0.4926934838294983d, -8.386923035320549E-9d, }, // 652 - {+0.4932899475097656d, +8.713990131749256E-9d, }, // 653 - {+0.4938860535621643d, +2.7865534085810115E-8d, }, // 654 - {+0.4944818615913391d, -1.011325138560159E-8d, }, // 655 - {+0.4950772523880005d, +1.4409851026316708E-8d, }, // 656 - {+0.495672345161438d, -1.735227547472004E-8d, }, // 657 - {+0.49626702070236206d, +1.4231078209064581E-8d, }, // 658 - {+0.49686139822006226d, -9.628709342929729E-9d, }, // 659 - {+0.4974554181098938d, -2.8907074856577267E-8d, }, // 660 - {+0.4980490207672119d, +1.6419797090870802E-8d, }, // 661 - {+0.49864232540130615d, +7.561041519403049E-9d, }, // 662 - {+0.49923527240753174d, +4.538983468118194E-9d, }, // 663 - {+0.49982786178588867d, +7.770560657946324E-9d, }, // 664 - {+0.500420093536377d, +1.767197002609876E-8d, }, // 665 - {+0.5010119676589966d, +3.46586694799214E-8d, }, // 666 - {+0.5016034841537476d, +5.914537964556077E-8d, }, // 667 - {+0.5021947622299194d, -2.7663203939320167E-8d, }, // 668 - {+0.5027855634689331d, +1.3064749115929298E-8d, }, // 669 - {+0.5033761262893677d, -5.667682106730711E-8d, }, // 670 - {+0.503966212272644d, +1.9424534974370594E-9d, }, // 671 - {+0.5045560598373413d, -4.908494602153544E-8d, }, // 672 - {+0.5051454305648804d, +2.906989285008994E-8d, }, // 673 - {+0.5057345628738403d, -1.602000800745108E-9d, }, // 674 - {+0.5063233375549316d, -2.148245271118002E-8d, }, // 675 - {+0.5069117546081543d, -3.016329994276181E-8d, }, // 676 - {+0.5074998140335083d, -2.7237099632871992E-8d, }, // 677 - {+0.5080875158309937d, -1.2297127301923986E-8d, }, // 678 - {+0.5086748600006104d, +1.5062624834468093E-8d, }, // 679 - {+0.5092618465423584d, +5.524744954836658E-8d, }, // 680 - {+0.5098485946655273d, -1.054736327333046E-8d, }, // 681 - {+0.5104348659515381d, +5.650063324725722E-8d, }, // 682 - {+0.5110208988189697d, +1.8376017791642605E-8d, }, // 683 - {+0.5116065740585327d, -5.309470636324855E-9d, }, // 684 - {+0.512191891670227d, -1.4154089255217218E-8d, }, // 685 - {+0.5127768516540527d, -7.756800301729815E-9d, }, // 686 - {+0.5133614540100098d, +1.4282730618002001E-8d, }, // 687 - {+0.5139456987380981d, +5.2364136172269755E-8d, }, // 688 - {+0.5145297050476074d, -1.2322940607922115E-8d, }, // 689 - {+0.5151132345199585d, +5.903831350855322E-8d, }, // 690 - {+0.5156965255737305d, +2.8426856726994483E-8d, }, // 691 - {+0.5162794589996338d, +1.544882070711032E-8d, }, // 692 - {+0.5168620347976685d, +2.0500353979930155E-8d, }, // 693 - {+0.5174442529678345d, +4.397691311390564E-8d, }, // 694 - {+0.5180262327194214d, -3.2936025225250634E-8d, }, // 695 - {+0.5186077356338501d, +2.857419553449673E-8d, }, // 696 - {+0.5191890001296997d, -9.51761338269325E-9d, }, // 697 - {+0.5197699069976807d, -2.7609457648450225E-8d, }, // 698 - {+0.520350456237793d, -2.5309316441333305E-8d, }, // 699 - {+0.5209306478500366d, -2.2258513086839407E-9d, }, // 700 - {+0.5215104818344116d, +4.203159541613745E-8d, }, // 701 - {+0.5220900774002075d, -1.1356287358852729E-8d, }, // 702 - {+0.5226693153381348d, -4.279090925831093E-8d, }, // 703 - {+0.5232481956481934d, -5.188364552285819E-8d, }, // 704 - {+0.5238267183303833d, -3.82465458937857E-8d, }, // 705 - {+0.5244048833847046d, -1.4923330530645769E-9d, }, // 706 - {+0.5249826908111572d, +5.8765598932137004E-8d, }, // 707 - {+0.5255602598190308d, +2.3703896609663678E-8d, }, // 708 - {+0.5261374711990356d, +1.2917117341231647E-8d, }, // 709 - {+0.5267143249511719d, +2.6789862192139226E-8d, }, // 710 - {+0.527290940284729d, -5.350322253112414E-8d, }, // 711 - {+0.5278670787811279d, +1.0839714455426386E-8d, }, // 712 - {+0.5284429788589478d, -1.821729591343314E-8d, }, // 713 - {+0.5290185213088989d, -2.1083014672301448E-8d, }, // 714 - {+0.5295937061309814d, +2.623848491704216E-9d, }, // 715 - {+0.5301685333251953d, +5.328392630534142E-8d, }, // 716 - {+0.5307431221008301d, +1.206790586971942E-8d, }, // 717 - {+0.5313173532485962d, -1.4356011804377797E-9d, }, // 718 - {+0.5318912267684937d, +1.3152074173459994E-8d, }, // 719 - {+0.5324647426605225d, +5.6208949382936426E-8d, }, // 720 - {+0.5330380201339722d, +8.90310227565917E-9d, }, // 721 - {+0.5336109399795532d, -9.179458802504127E-9d, }, // 722 - {+0.5341835021972656d, +2.337337845617735E-9d, }, // 723 - {+0.5347557067871094d, +4.3828918300477925E-8d, }, // 724 - {+0.535327672958374d, -3.5392250480081715E-9d, }, // 725 - {+0.53589928150177d, -2.0183663375378704E-8d, }, // 726 - {+0.5364705324172974d, -5.730898606435436E-9d, }, // 727 - {+0.537041425704956d, +4.0191927599879235E-8d, }, // 728 - {+0.5376120805740356d, -1.2522542401353875E-9d, }, // 729 - {+0.5381823778152466d, -1.0482571326594316E-8d, }, // 730 - {+0.5387523174285889d, +1.2871924223480165E-8d, }, // 731 - {+0.539322018623352d, -5.002774317612589E-8d, }, // 732 - {+0.539891242980957d, +3.960668706590162E-8d, }, // 733 - {+0.5404602289199829d, +4.372568630242375E-8d, }, // 734 - {+0.5410289764404297d, -3.730232461206926E-8d, }, // 735 - {+0.5415972471237183d, +3.5309026109857795E-8d, }, // 736 - {+0.5421652793884277d, +2.3508325311148225E-8d, }, // 737 - {+0.5427329540252686d, +4.6871403168921666E-8d, }, // 738 - {+0.5433003902435303d, -1.3445113140270216E-8d, }, // 739 - {+0.5438674688339233d, -3.786663982218041E-8d, }, // 740 - {+0.5444341897964478d, -2.602850370608209E-8d, }, // 741 - {+0.5450005531311035d, +2.2433348713144506E-8d, }, // 742 - {+0.5455666780471802d, -1.1326936872620137E-8d, }, // 743 - {+0.5461324453353882d, -7.737252533211342E-9d, }, // 744 - {+0.5466978549957275d, +3.3564604642699844E-8d, }, // 745 - {+0.5472630262374878d, -6.269066061111782E-9d, }, // 746 - {+0.5478278398513794d, -7.667998948729528E-9d, }, // 747 - {+0.5483922958374023d, +2.9728170818998143E-8d, }, // 748 - {+0.5489565134048462d, -1.2930091396008281E-8d, }, // 749 - {+0.5495203733444214d, -1.607434968107079E-8d, }, // 750 - {+0.5500838756561279d, +2.0653935146671156E-8d, }, // 751 - {+0.5506471395492554d, -2.1596593091833788E-8d, }, // 752 - {+0.5512100458145142d, -2.3259315921149476E-8d, }, // 753 - {+0.5517725944519043d, +1.6022492496522704E-8d, }, // 754 - {+0.5523349046707153d, -2.260433328226171E-8d, }, // 755 - {+0.5528968572616577d, -1.957497997726303E-8d, }, // 756 - {+0.5534584522247314d, +2.5465477111883854E-8d, }, // 757 - {+0.5540198087692261d, -6.33792454933092E-9d, }, // 758 - {+0.554580807685852d, +4.577835263278281E-9d, }, // 759 - {+0.5551414489746094d, +5.856589221771548E-8d, }, // 760 - {+0.5557018518447876d, +3.6769498759522324E-8d, }, // 761 - {+0.5562618970870972d, +5.874989409410614E-8d, }, // 762 - {+0.5568217039108276d, +5.649147309876989E-9d, }, // 763 - {+0.5573811531066895d, -2.9726830960751796E-9d, }, // 764 - {+0.5579402446746826d, +3.323458344853057E-8d, }, // 765 - {+0.5584990978240967d, -4.588749093664028E-9d, }, // 766 - {+0.5590575933456421d, +3.115616594184543E-9d, }, // 767 - {+0.5596157312393188d, +5.6696103838614634E-8d, }, // 768 - {+0.5601736307144165d, +3.7291263280048303E-8d, }, // 769 - {+0.5607312917709351d, -5.4751646725093355E-8d, }, // 770 - {+0.5612884759902954d, +1.9332630743320287E-8d, }, // 771 - {+0.5618454217910767d, +2.147161515775941E-8d, }, // 772 - {+0.5624021291732788d, -4.7989172862560625E-8d, }, // 773 - {+0.5629583597183228d, +4.971378973445109E-8d, }, // 774 - {+0.5635144710540771d, -4.2702997139152675E-8d, }, // 775 - {+0.5640701055526733d, +3.273212962622764E-8d, }, // 776 - {+0.5646255016326904d, +3.79438125545842E-8d, }, // 777 - {+0.5651806592941284d, -2.6725298288329835E-8d, }, // 778 - {+0.5657354593276978d, -4.1723833577410244E-8d, }, // 779 - {+0.5662899017333984d, -6.71028256490915E-9d, }, // 780 - {+0.56684410572052d, -4.055299181908475E-8d, }, // 781 - {+0.567397952079773d, -2.3702295314000405E-8d, }, // 782 - {+0.5679514408111572d, +4.4181618172507453E-8d, }, // 783 - {+0.5685046911239624d, +4.4228706309734985E-8d, }, // 784 - {+0.5690577030181885d, -2.3222346436879016E-8d, }, // 785 - {+0.5696103572845459d, -3.862412756175274E-8d, }, // 786 - {+0.5701626539230347d, -1.6390743801589046E-9d, }, // 787 - {+0.5707147121429443d, -3.1139472791083883E-8d, }, // 788 - {+0.5712664127349854d, -7.579587391156013E-9d, }, // 789 - {+0.5718178749084473d, -4.983281844744412E-8d, }, // 790 - {+0.5723689794540405d, -3.835454246739619E-8d, }, // 791 - {+0.5729197263717651d, +2.7190020372374008E-8d, }, // 792 - {+0.5734702348709106d, +2.7925807446276126E-8d, }, // 793 - {+0.574020504951477d, -3.5813506001861646E-8d, }, // 794 - {+0.5745704174041748d, -4.448550564530588E-8d, }, // 795 - {+0.5751199722290039d, +2.2423840341717488E-9d, }, // 796 - {+0.5756692886352539d, -1.450709904687712E-8d, }, // 797 - {+0.5762182474136353d, +2.4806815282282017E-8d, }, // 798 - {+0.5767669677734375d, +1.3057724436551892E-9d, }, // 799 - {+0.5773153305053711d, +3.4529452510568104E-8d, }, // 800 - {+0.5778634548187256d, +5.598413198183808E-9d, }, // 801 - {+0.5784112215042114d, +3.405124925700107E-8d, }, // 802 - {+0.5789587497711182d, +1.0074354568442952E-9d, }, // 803 - {+0.5795059204101562d, +2.600448597385527E-8d, }, // 804 - {+0.5800528526306152d, -9.83920263200211E-9d, }, // 805 - {+0.5805994272232056d, +1.3012807963586057E-8d, }, // 806 - {+0.5811457633972168d, -2.432215917965441E-8d, }, // 807 - {+0.5816917419433594d, -2.308736892479391E-9d, }, // 808 - {+0.5822374820709229d, -3.983067093146514E-8d, }, // 809 - {+0.5827828645706177d, -1.735366061128156E-8d, }, // 810 - {+0.5833280086517334d, -5.376251584638963E-8d, }, // 811 - {+0.5838727951049805d, -2.952399778965259E-8d, }, // 812 - {+0.5844172239303589d, +5.5685313670430624E-8d, }, // 813 - {+0.5849615335464478d, -3.6230268489088716E-8d, }, // 814 - {+0.5855053663253784d, +5.267948957869391E-8d, }, // 815 - {+0.5860490798950195d, -3.489144132234588E-8d, }, // 816 - {+0.5865923166275024d, +5.9006122320612716E-8d, }, // 817 - {+0.5871354341506958d, -2.2934896740542648E-8d, }, // 818 - {+0.5876781940460205d, -4.1975650319859075E-8d, }, // 819 - {+0.5882205963134766d, +2.2036094805348692E-9d, }, // 820 - {+0.5887627601623535d, -9.287179048539306E-9d, }, // 821 - {+0.5893045663833618d, +4.3079982556221595E-8d, }, // 822 - {+0.589846134185791d, +4.041399585161321E-8d, }, // 823 - {+0.5903874635696411d, -1.696746473863933E-8d, }, // 824 - {+0.5909284353256226d, -9.53795080582038E-9d, }, // 825 - {+0.5914691686630249d, -5.619010749352923E-8d, }, // 826 - {+0.5920095443725586d, -3.7398514182529506E-8d, }, // 827 - {+0.5925495624542236d, +4.71524479659295E-8d, }, // 828 - {+0.5930894613265991d, -4.0640692434639215E-8d, }, // 829 - {+0.5936288833618164d, +5.716453096255401E-8d, }, // 830 - {+0.5941681861877441d, -1.6745661720946737E-8d, }, // 831 - {+0.5947071313858032d, -2.3639110433141897E-8d, }, // 832 - {+0.5952457189559937d, +3.67972590471072E-8d, }, // 833 - {+0.595784068107605d, +4.566672575206695E-8d, }, // 834 - {+0.5963221788406372d, +3.2813537149653483E-9d, }, // 835 - {+0.5968599319458008d, +2.916199305533732E-8d, }, // 836 - {+0.5973974466323853d, +4.410412409109416E-9d, }, // 837 - {+0.5979346036911011d, +4.85464582112459E-8d, }, // 838 - {+0.5984715223312378d, +4.267089756924666E-8d, }, // 839 - {+0.5990082025527954d, -1.2906712010774655E-8d, }, // 840 - {+0.5995445251464844d, +1.3319784467641742E-9d, }, // 841 - {+0.6000806093215942d, -3.35137581974451E-8d, }, // 842 - {+0.6006163358688354d, +2.0734340706476473E-9d, }, // 843 - {+0.6011518239974976d, -1.0808162722402073E-8d, }, // 844 - {+0.601686954498291d, +4.735781872502109E-8d, }, // 845 - {+0.6022218465805054d, +5.76686738430634E-8d, }, // 846 - {+0.6027565002441406d, +2.043049589651736E-8d, }, // 847 - {+0.6032907962799072d, +5.515817703577808E-8d, }, // 848 - {+0.6038248538970947d, +4.2947540692649586E-8d, }, // 849 - {+0.6043586730957031d, -1.589678872195875E-8d, }, // 850 - {+0.6048921346664429d, -1.8613847754677912E-9d, }, // 851 - {+0.6054253578186035d, -3.3851886626187444E-8d, }, // 852 - {+0.6059582233428955d, +7.64416021682279E-9d, }, // 853 - {+0.6064908504486084d, +3.7201467248814224E-9d, }, // 854 - {+0.6070232391357422d, -4.532172996647129E-8d, }, // 855 - {+0.6075552701950073d, -1.997046552871766E-8d, }, // 856 - {+0.6080870628356934d, -3.913411606668587E-8d, }, // 857 - {+0.6086184978485107d, +1.6697361107868944E-8d, }, // 858 - {+0.609149694442749d, +2.8614950293715483E-8d, }, // 859 - {+0.6096806526184082d, -3.081552929643174E-9d, }, // 860 - {+0.6102112531661987d, +4.111645931319645E-8d, }, // 861 - {+0.6107416152954102d, +4.2298539553668435E-8d, }, // 862 - {+0.6112717390060425d, +7.630546413718035E-10d, }, // 863 - {+0.6118015050888062d, +3.601718675118614E-8d, }, // 864 - {+0.6123310327529907d, +2.914906573537692E-8d, }, // 865 - {+0.6128603219985962d, -1.9544361222269494E-8d, }, // 866 - {+0.613389253616333d, +9.442671392695732E-9d, }, // 867 - {+0.6139179468154907d, -2.8031202304593286E-9d, }, // 868 - {+0.6144464015960693d, -5.598619958143586E-8d, }, // 869 - {+0.6149744987487793d, -3.060220883766096E-8d, }, // 870 - {+0.6155023574829102d, -4.556583652800433E-8d, }, // 871 - {+0.6160298585891724d, +1.8626341656366314E-8d, }, // 872 - {+0.6165571212768555d, +4.305870564227991E-8d, }, // 873 - {+0.6170841455459595d, +2.8024460607734262E-8d, }, // 874 - {+0.6176109313964844d, -2.6183651590639875E-8d, }, // 875 - {+0.6181373596191406d, -6.406189112730307E-11d, }, // 876 - {+0.6186635494232178d, -1.2534241706168776E-8d, }, // 877 - {+0.6191893815994263d, +5.5906456251308664E-8d, }, // 878 - {+0.6197150945663452d, -3.286964881802063E-8d, }, // 879 - {+0.6202404499053955d, -4.0153537978961E-8d, }, // 880 - {+0.6207654476165771d, +3.434477109643361E-8d, }, // 881 - {+0.6212903261184692d, -4.750377491075032E-8d, }, // 882 - {+0.6218148469924927d, -4.699152670372743E-8d, }, // 883 - {+0.6223390102386475d, +3.617013128065961E-8d, }, // 884 - {+0.6228630542755127d, -3.6149218175202596E-8d, }, // 885 - {+0.6233867406845093d, -2.5243286814648133E-8d, }, // 886 - {+0.6239101886749268d, -5.003410681432538E-8d, }, // 887 - {+0.6244332790374756d, +8.974417915105033E-9d, }, // 888 - {+0.6249561309814453d, +3.285935446876949E-8d, }, // 889 - {+0.6254787445068359d, +2.190661054038537E-8d, }, // 890 - {+0.6260011196136475d, -2.3598354190515998E-8d, }, // 891 - {+0.6265231370925903d, +1.5838762427747586E-8d, }, // 892 - {+0.6270449161529541d, +2.129323729978037E-8d, }, // 893 - {+0.6275664567947388d, -6.950808333865794E-9d, }, // 894 - {+0.6280876398086548d, +5.059959203156465E-8d, }, // 895 - {+0.6286087036132812d, -4.41909071122557E-8d, }, // 896 - {+0.6291294097900391d, -5.262093550784066E-8d, }, // 897 - {+0.6296497583389282d, +2.559185648444699E-8d, }, // 898 - {+0.6301699876785278d, -4.768920119497491E-8d, }, // 899 - {+0.6306898593902588d, -3.376406008397877E-8d, }, // 900 - {+0.6312094926834106d, -5.156097914033476E-8d, }, // 901 - {+0.6317287683486938d, +1.840992392368355E-8d, }, // 902 - {+0.632247805595398d, +5.721951534729663E-8d, }, // 903 - {+0.6327667236328125d, -5.406177467045421E-8d, }, // 904 - {+0.6332851648330688d, +4.247320713683124E-8d, }, // 905 - {+0.6338034868240356d, -1.0524557502830645E-8d, }, // 906 - {+0.6343214511871338d, +2.5641927558519502E-8d, }, // 907 - {+0.6348391771316528d, +3.204135737993823E-8d, }, // 908 - {+0.6353566646575928d, +8.951285029786536E-9d, }, // 909 - {+0.6358739137649536d, -4.335116707228395E-8d, }, // 910 - {+0.6363908052444458d, -5.380016714089483E-9d, }, // 911 - {+0.6369074583053589d, +3.931710344901743E-9d, }, // 912 - {+0.6374238729476929d, -1.5140150088220166E-8d, }, // 913 - {+0.6379399299621582d, +5.688910024377372E-8d, }, // 914 - {+0.638455867767334d, -1.8124135273572568E-8d, }, // 915 - {+0.6389714479446411d, -1.486720391901626E-9d, }, // 916 - {+0.6394867897033691d, -1.2133811978747018E-8d, }, // 917 - {+0.6400018930435181d, -4.9791700939901716E-8d, }, // 918 - {+0.6405166387557983d, +5.022188652837274E-9d, }, // 919 - {+0.6410311460494995d, +3.337143177933685E-8d, }, // 920 - {+0.6415454149246216d, +3.55284719912458E-8d, }, // 921 - {+0.6420594453811646d, +1.1765332726757802E-8d, }, // 922 - {+0.6425732374191284d, -3.7646381826067834E-8d, }, // 923 - {+0.6430866718292236d, +6.773803682579552E-9d, }, // 924 - {+0.6435998678207397d, +2.608736797081283E-8d, }, // 925 - {+0.6441128253936768d, +2.056466263408266E-8d, }, // 926 - {+0.6446255445480347d, -9.524376551107945E-9d, }, // 927 - {+0.6451379060745239d, +5.5299060775883977E-8d, }, // 928 - {+0.6456501483917236d, -2.3114497793159813E-8d, }, // 929 - {+0.6461620330810547d, -6.077779731902102E-9d, }, // 930 - {+0.6466736793518066d, -1.2531793589140273E-8d, }, // 931 - {+0.6471850872039795d, -4.220866994206517E-8d, }, // 932 - {+0.6476961374282837d, +2.4368339445199057E-8d, }, // 933 - {+0.6482070684432983d, -5.095229574221907E-8d, }, // 934 - {+0.6487176418304443d, -2.9485356677301627E-8d, }, // 935 - {+0.6492279767990112d, -3.0173901411577916E-8d, }, // 936 - {+0.649738073348999d, -5.275210583909726E-8d, }, // 937 - {+0.6502478122711182d, +2.2254737134350224E-8d, }, // 938 - {+0.6507574319839478d, -4.330693978322885E-8d, }, // 939 - {+0.6512666940689087d, -1.0753950588009912E-8d, }, // 940 - {+0.6517757177352905d, +9.686179886293545E-10d, }, // 941 - {+0.6522845029830933d, -7.875434494414498E-9d, }, // 942 - {+0.6527930498123169d, -3.702271091849158E-8d, }, // 943 - {+0.6533012390136719d, +3.2999073763758614E-8d, }, // 944 - {+0.6538093090057373d, -3.5966064858620067E-8d, }, // 945 - {+0.6543170213699341d, -5.23735298540578E-9d, }, // 946 - {+0.6548244953155518d, +6.237715351293023E-9d, }, // 947 - {+0.6553317308425903d, -1.279462699936282E-9d, }, // 948 - {+0.6558387279510498d, -2.7527887552743672E-8d, }, // 949 - {+0.6563453674316406d, +4.696233317356646E-8d, }, // 950 - {+0.6568518877029419d, -1.5967172745329108E-8d, }, // 951 - {+0.6573580503463745d, +2.2361985518423144E-8d, }, // 952 - {+0.657863974571228d, +4.2999935789083046E-8d, }, // 953 - {+0.6583696603775024d, +4.620570188811826E-8d, }, // 954 - {+0.6588751077651978d, +3.223791487908353E-8d, }, // 955 - {+0.659380316734314d, +1.3548138612715822E-9d, }, // 956 - {+0.6598852872848511d, -4.618575323863973E-8d, }, // 957 - {+0.6603899002075195d, +9.082960673843353E-9d, }, // 958 - {+0.6608942747116089d, +4.820873399634487E-8d, }, // 959 - {+0.6613985300064087d, -4.776104368314602E-8d, }, // 960 - {+0.6619024276733398d, -4.0151502150238136E-8d, }, // 961 - {+0.6624060869216919d, -4.791602708710648E-8d, }, // 962 - {+0.6629093885421753d, +4.8410188461165925E-8d, }, // 963 - {+0.6634125709533691d, +1.0663697110471944E-8d, }, // 964 - {+0.6639155149459839d, -4.1691464781797555E-8d, }, // 965 - {+0.66441810131073d, +1.080835500478704E-8d, }, // 966 - {+0.664920449256897d, +4.920784622407246E-8d, }, // 967 - {+0.6654226779937744d, -4.544868396511241E-8d, }, // 968 - {+0.6659245491027832d, -3.448944157854234E-8d, }, // 969 - {+0.6664261817932129d, -3.6870882345139385E-8d, }, // 970 - {+0.6669275760650635d, -5.234055273962444E-8d, }, // 971 - {+0.6674286127090454d, +3.856291077979099E-8d, }, // 972 - {+0.6679295301437378d, -2.327375671320742E-9d, }, // 973 - {+0.6684302091598511d, -5.555080534042001E-8d, }, // 974 - {+0.6689305305480957d, -1.6471487337453832E-9d, }, // 975 - {+0.6694306135177612d, +4.042486803683015E-8d, }, // 976 - {+0.6699305772781372d, -4.8293856891818295E-8d, }, // 977 - {+0.6704301834106445d, -2.9134931730784303E-8d, }, // 978 - {+0.6709295511245728d, -2.1058207594753368E-8d, }, // 979 - {+0.6714286804199219d, -2.3814619551682855E-8d, }, // 980 - {+0.6719275712966919d, -3.7155475428252136E-8d, }, // 981 - {+0.6724261045455933d, +5.8376834484391746E-8d, }, // 982 - {+0.6729245185852051d, +2.4611679969129262E-8d, }, // 983 - {+0.6734226942062378d, -1.899407107267079E-8d, }, // 984 - {+0.6739205121994019d, +4.7016079464436395E-8d, }, // 985 - {+0.6744182109832764d, -1.5529608026276525E-8d, }, // 986 - {+0.6749155521392822d, +3.203391672602453E-8d, }, // 987 - {+0.6754127740859985d, -4.8465821804075345E-8d, }, // 988 - {+0.6759096384048462d, -1.8364507801369988E-8d, }, // 989 - {+0.6764062643051147d, +3.3739397633046517E-9d, }, // 990 - {+0.6769026517868042d, +1.6994526063192333E-8d, }, // 991 - {+0.6773988008499146d, +2.2741891590028428E-8d, }, // 992 - {+0.6778947114944458d, +2.0860312877435047E-8d, }, // 993 - {+0.678390383720398d, +1.1593703222523284E-8d, }, // 994 - {+0.678885817527771d, -4.814386594291911E-9d, }, // 995 - {+0.6793810129165649d, -2.812076759125914E-8d, }, // 996 - {+0.6798759698867798d, -5.808261186903479E-8d, }, // 997 - {+0.680370569229126d, +2.4751837654582522E-8d, }, // 998 - {+0.6808650493621826d, -1.7793890245755405E-8d, }, // 999 - {+0.6813591718673706d, +5.294053246347931E-8d, }, // 1000 - {+0.681853175163269d, -1.2220826223585654E-9d, }, // 1001 - {+0.6823468208312988d, +5.8377876767612725E-8d, }, // 1002 - {+0.6828403472900391d, -6.437492120743254E-9d, }, // 1003 - {+0.6833335161209106d, +4.2990710043633113E-8d, }, // 1004 - {+0.6838265657424927d, -3.1516131027023284E-8d, }, // 1005 - {+0.684319257736206d, +8.70017386744679E-9d, }, // 1006 - {+0.6848117113113403d, +4.466959125843237E-8d, }, // 1007 - {+0.6853040456771851d, -4.25782656420497E-8d, }, // 1008 - {+0.6857960224151611d, -1.4386267593671393E-8d, }, // 1009 - {+0.6862877607345581d, +1.0274494061148778E-8d, }, // 1010 - {+0.686779260635376d, +3.164186629229597E-8d, }, // 1011 - {+0.6872705221176147d, +4.995334552140326E-8d, }, // 1012 - {+0.687761664390564d, -5.3763211240398744E-8d, }, // 1013 - {+0.6882524490356445d, -4.0852427502515625E-8d, }, // 1014 - {+0.688742995262146d, -3.0287143914420064E-8d, }, // 1015 - {+0.6892333030700684d, -2.183125937905008E-8d, }, // 1016 - {+0.6897233724594116d, -1.524901992178814E-8d, }, // 1017 - {+0.6902132034301758d, -1.0305018010328949E-8d, }, // 1018 - {+0.6907027959823608d, -6.764191876212205E-9d, }, // 1019 - {+0.6911921501159668d, -4.391824838015402E-9d, }, // 1020 - {+0.6916812658309937d, -2.9535446262017846E-9d, }, // 1021 - {+0.6921701431274414d, -2.2153227096187463E-9d, }, // 1022 - {+0.6926587820053101d, -1.943473623641502E-9d, }, // 1023 - }; - - - /** - * Class contains only static methods. - */ - private FastMathLiteralArrays() {} - - /** - * Load "EXP_INT_A". - * - * @return a clone of the data array. - */ - static double[] loadExpIntA() { - return EXP_INT_A.clone(); - } - /** - * Load "EXP_INT_B". - * - * @return a clone of the data array. - */ - static double[] loadExpIntB() { - return EXP_INT_B.clone(); - } - /** - * Load "EXP_FRAC_A". - * - * @return a clone of the data array. - */ - static double[] loadExpFracA() { - return EXP_FRAC_A.clone(); - } - /** - * Load "EXP_FRAC_B". - * - * @return a clone of the data array. - */ - static double[] loadExpFracB() { - return EXP_FRAC_B.clone(); - } - /** - * Load "LN_MANT". - * - * @return a clone of the data array. - */ - static double[][] loadLnMant() { - return LN_MANT.clone(); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/IntegerSequence.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/IntegerSequence.java deleted file mode 100644 index 9f67e29341e6..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/IntegerSequence.java +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.util; - -import java.util.Iterator; -import com.azure.cosmos.implementation.apachecommons.math.exception.MaxCountExceededException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NullArgumentException; -import com.azure.cosmos.implementation.apachecommons.math.exception.MathUnsupportedOperationException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.ZeroException; - -/** - * Provides a sequence of integers. - * - * @since 3.6 - */ -public class IntegerSequence { - /** - * Utility class contains only static methods. - */ - private IntegerSequence() {} - - /** - * Creates a sequence {@code [start .. end]}. - * It calls {@link #range(int,int,int) range(start, end, 1)}. - * - * @param start First value of the range. - * @param end Last value of the range. - * @return a range. - */ - public static Range range(int start, - int end) { - return range(start, end, 1); - } - - /** - * Creates a sequence \( a_i, i < 0 <= n \) - * where \( a_i = start + i * step \) - * and \( n \) is such that \( a_n <= max \) and \( a_{n+1} > max \). - * - * @param start First value of the range. - * @param max Last value of the range that satisfies the above - * construction rule. - * @param step Increment. - * @return a range. - */ - public static Range range(final int start, - final int max, - final int step) { - return new Range(start, max, step); - } - - /** - * Generates a sequence of integers. - */ - public static class Range implements Iterable<Integer> { - /** Number of integers contained in this range. */ - private final int size; - /** First value. */ - private final int start; - /** Final value. */ - private final int max; - /** Increment. */ - private final int step; - - /** - * Creates a sequence \( a_i, i < 0 <= n \) - * where \( a_i = start + i * step \) - * and \( n \) is such that \( a_n <= max \) and \( a_{n+1} > max \). - * - * @param start First value of the range. - * @param max Last value of the range that satisfies the above - * construction rule. - * @param step Increment. - */ - public Range(int start, - int max, - int step) { - this.start = start; - this.max = max; - this.step = step; - - final int s = (max - start) / step + 1; - this.size = s < 0 ? 0 : s; - } - - /** - * Gets the number of elements contained in the range. - * - * @return the size of the range. - */ - public int size() { - return size; - } - - /** {@inheritDoc} */ - public Iterator<Integer> iterator() { - return Incrementor.create() - .withStart(start) - .withMaximalCount(max + (step > 0 ? 1 : -1)) - .withIncrement(step); - } - } - - /** - * Utility that increments a counter until a maximum is reached, at - * which point, the instance will by default throw a - * {@link MaxCountExceededException}. - * However, the user is able to override this behaviour by defining a - * custom {@link MaxCountExceededCallback callback}, in order to e.g. - * select which exception must be thrown. - */ - public static class Incrementor implements Iterator<Integer> { - /** Default callback. */ - private static final MaxCountExceededCallback CALLBACK - = new MaxCountExceededCallback() { - /** {@inheritDoc} */ - public void trigger(int max) throws MaxCountExceededException { - throw new MaxCountExceededException(max); - } - }; - - /** Initial value the counter. */ - private final int init; - /** Upper limit for the counter. */ - private final int maximalCount; - /** Increment. */ - private final int increment; - /** Function called at counter exhaustion. */ - private final MaxCountExceededCallback maxCountCallback; - /** Current count. */ - private int count = 0; - - /** - * Defines a method to be called at counter exhaustion. - * The {@link #trigger(int) trigger} method should usually throw an exception. - */ - public interface MaxCountExceededCallback { - /** - * Function called when the maximal count has been reached. - * - * @param maximalCount Maximal count. - * @throws MaxCountExceededException at counter exhaustion - */ - void trigger(int maximalCount) throws MaxCountExceededException; - } - - /** - * Creates an incrementor. - * The counter will be exhausted either when {@code max} is reached - * or when {@code nTimes} increments have been performed. - * - * @param start Initial value. - * @param max Maximal count. - * @param step Increment. - * @param cb Function to be called when the maximal count has been reached. - * @throws NullArgumentException if {@code cb} is {@code null}. - */ - private Incrementor(int start, - int max, - int step, - MaxCountExceededCallback cb) - throws NullArgumentException { - if (cb == null) { - throw new NullArgumentException(); - } - this.init = start; - this.maximalCount = max; - this.increment = step; - this.maxCountCallback = cb; - this.count = start; - } - - /** - * Factory method that creates a default instance. - * The initial and maximal values are set to 0. - * For the new instance to be useful, the maximal count must be set - * by calling {@link #withMaximalCount(int) withMaximalCount}. - * - * @return an new instance. - */ - public static Incrementor create() { - return new Incrementor(0, 0, 1, CALLBACK); - } - - /** - * Creates a new instance with a given initial value. - * The counter is reset to the initial value. - * - * @param start Initial value of the counter. - * @return a new instance. - */ - public Incrementor withStart(int start) { - return new Incrementor(start, - this.maximalCount, - this.increment, - this.maxCountCallback); - } - - /** - * Creates a new instance with a given maximal count. - * The counter is reset to the initial value. - * - * @param max Maximal count. - * @return a new instance. - */ - public Incrementor withMaximalCount(int max) { - return new Incrementor(this.init, - max, - this.increment, - this.maxCountCallback); - } - - /** - * Creates a new instance with a given increment. - * The counter is reset to the initial value. - * - * @param step Increment. - * @return a new instance. - */ - public Incrementor withIncrement(int step) { - if (step == 0) { - throw new ZeroException(); - } - return new Incrementor(this.init, - this.maximalCount, - step, - this.maxCountCallback); - } - - /** - * Creates a new instance with a given callback. - * The counter is reset to the initial value. - * - * @param cb Callback to be called at counter exhaustion. - * @return a new instance. - */ - public Incrementor withCallback(MaxCountExceededCallback cb) { - return new Incrementor(this.init, - this.maximalCount, - this.increment, - cb); - } - - /** - * Gets the upper limit of the counter. - * - * @return the counter upper limit. - */ - public int getMaximalCount() { - return maximalCount; - } - - /** - * Gets the current count. - * - * @return the current count. - */ - public int getCount() { - return count; - } - - /** - * Checks whether incrementing the counter {@code nTimes} is allowed. - * - * @return {@code false} if calling {@link #increment()} - * will trigger a {@code MaxCountExceededException}, - * {@code true} otherwise. - */ - public boolean canIncrement() { - return canIncrement(1); - } - - /** - * Checks whether incrementing the counter several times is allowed. - * - * @param nTimes Number of increments. - * @return {@code false} if calling {@link #increment(int) - * increment(nTimes)} would call the {@link MaxCountExceededCallback callback} - * {@code true} otherwise. - */ - public boolean canIncrement(int nTimes) { - final int finalCount = count + nTimes * increment; - return increment < 0 ? - finalCount > maximalCount : - finalCount < maximalCount; - } - - /** - * Performs multiple increments. - * - * @param nTimes Number of increments. - * @throws MaxCountExceededException at counter exhaustion. - * @throws NotStrictlyPositiveException if {@code nTimes <= 0}. - * - * @see #increment() - */ - public void increment(int nTimes) throws MaxCountExceededException { - if (nTimes <= 0) { - throw new NotStrictlyPositiveException(nTimes); - } - - if (!canIncrement(0)) { - maxCountCallback.trigger(maximalCount); - } - count += nTimes * increment; - } - - /** - * Adds the increment value to the current iteration count. - * At counter exhaustion, this method will call the - * {@link MaxCountExceededCallback#trigger(int) trigger} method of the - * callback object passed to the - * {@link #withCallback(MaxCountExceededCallback)} method. - * If not explicitly set, a default callback is used that will throw - * a {@code MaxCountExceededException}. - * - * @throws MaxCountExceededException at counter exhaustion, unless a - * custom {@link MaxCountExceededCallback callback} has been set. - * - * @see #increment(int) - */ - public void increment() throws MaxCountExceededException { - increment(1); - } - - /** {@inheritDoc} */ - public boolean hasNext() { - return canIncrement(0); - } - - /** {@inheritDoc} */ - public Integer next() { - final int value = count; - increment(); - return value; - } - - /** - * Not applicable. - * - * @throws MathUnsupportedOperationException - */ - public void remove() { - throw new MathUnsupportedOperationException(); - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/MathArrays.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/MathArrays.java deleted file mode 100644 index cd9910f8d448..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/MathArrays.java +++ /dev/null @@ -1,1939 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.util; - -import java.lang.reflect.Array; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Comparator; -import java.util.Iterator; -import java.util.List; -import java.util.TreeSet; - -import com.azure.cosmos.implementation.apachecommons.math.Field; -import com.azure.cosmos.implementation.apachecommons.math.random.RandomGenerator; -import com.azure.cosmos.implementation.apachecommons.math.random.Well19937c; -import com.azure.cosmos.implementation.apachecommons.math.distribution.UniformIntegerDistribution; -import com.azure.cosmos.implementation.apachecommons.math.exception.DimensionMismatchException; -import com.azure.cosmos.implementation.apachecommons.math.exception.MathArithmeticException; -import com.azure.cosmos.implementation.apachecommons.math.exception.MathIllegalArgumentException; -import com.azure.cosmos.implementation.apachecommons.math.exception.MathInternalError; -import com.azure.cosmos.implementation.apachecommons.math.exception.NoDataException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NonMonotonicSequenceException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NullArgumentException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooLargeException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotANumberException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Arrays utilities. - * - * @since 3.0 - */ -public class MathArrays { - - /** - * Private constructor. - */ - private MathArrays() {} - - /** - * Real-valued function that operate on an array or a part of it. - * @since 3.1 - */ - public interface Function { - /** - * Operates on an entire array. - * - * @param array Array to operate on. - * @return the result of the operation. - */ - double evaluate(double[] array); - /** - * @param array Array to operate on. - * @param startIndex Index of the first element to take into account. - * @param numElements Number of elements to take into account. - * @return the result of the operation. - */ - double evaluate(double[] array, - int startIndex, - int numElements); - } - - /** - * Create a copy of an array scaled by a value. - * - * @param arr Array to scale. - * @param val Scalar. - * @return scaled copy of array with each entry multiplied by val. - * @since 3.2 - */ - public static double[] scale(double val, final double[] arr) { - double[] newArr = new double[arr.length]; - for (int i = 0; i < arr.length; i++) { - newArr[i] = arr[i] * val; - } - return newArr; - } - - /** - * <p>Multiply each element of an array by a value.</p> - * - * <p>The array is modified in place (no copy is created).</p> - * - * @param arr Array to scale - * @param val Scalar - * @since 3.2 - */ - public static void scaleInPlace(double val, final double[] arr) { - for (int i = 0; i < arr.length; i++) { - arr[i] *= val; - } - } - - /** - * Creates an array whose contents will be the element-by-element - * addition of the arguments. - * - * @param a First term of the addition. - * @param b Second term of the addition. - * @return a new array {@code r} where {@code r[i] = a[i] + b[i]}. - * @throws DimensionMismatchException if the array lengths differ. - * @since 3.1 - */ - public static double[] ebeAdd(double[] a, double[] b) - throws DimensionMismatchException { - checkEqualLength(a, b); - - final double[] result = a.clone(); - for (int i = 0; i < a.length; i++) { - result[i] += b[i]; - } - return result; - } - /** - * Creates an array whose contents will be the element-by-element - * subtraction of the second argument from the first. - * - * @param a First term. - * @param b Element to be subtracted. - * @return a new array {@code r} where {@code r[i] = a[i] - b[i]}. - * @throws DimensionMismatchException if the array lengths differ. - * @since 3.1 - */ - public static double[] ebeSubtract(double[] a, double[] b) - throws DimensionMismatchException { - checkEqualLength(a, b); - - final double[] result = a.clone(); - for (int i = 0; i < a.length; i++) { - result[i] -= b[i]; - } - return result; - } - /** - * Creates an array whose contents will be the element-by-element - * multiplication of the arguments. - * - * @param a First factor of the multiplication. - * @param b Second factor of the multiplication. - * @return a new array {@code r} where {@code r[i] = a[i] * b[i]}. - * @throws DimensionMismatchException if the array lengths differ. - * @since 3.1 - */ - public static double[] ebeMultiply(double[] a, double[] b) - throws DimensionMismatchException { - checkEqualLength(a, b); - - final double[] result = a.clone(); - for (int i = 0; i < a.length; i++) { - result[i] *= b[i]; - } - return result; - } - /** - * Creates an array whose contents will be the element-by-element - * division of the first argument by the second. - * - * @param a Numerator of the division. - * @param b Denominator of the division. - * @return a new array {@code r} where {@code r[i] = a[i] / b[i]}. - * @throws DimensionMismatchException if the array lengths differ. - * @since 3.1 - */ - public static double[] ebeDivide(double[] a, double[] b) - throws DimensionMismatchException { - checkEqualLength(a, b); - - final double[] result = a.clone(); - for (int i = 0; i < a.length; i++) { - result[i] /= b[i]; - } - return result; - } - - /** - * Calculates the L<sub>1</sub> (sum of abs) distance between two points. - * - * @param p1 the first point - * @param p2 the second point - * @return the L<sub>1</sub> distance between the two points - * @throws DimensionMismatchException if the array lengths differ. - */ - public static double distance1(double[] p1, double[] p2) - throws DimensionMismatchException { - checkEqualLength(p1, p2); - double sum = 0; - for (int i = 0; i < p1.length; i++) { - sum += FastMath.abs(p1[i] - p2[i]); - } - return sum; - } - - /** - * Calculates the L<sub>1</sub> (sum of abs) distance between two points. - * - * @param p1 the first point - * @param p2 the second point - * @return the L<sub>1</sub> distance between the two points - * @throws DimensionMismatchException if the array lengths differ. - */ - public static int distance1(int[] p1, int[] p2) - throws DimensionMismatchException { - checkEqualLength(p1, p2); - int sum = 0; - for (int i = 0; i < p1.length; i++) { - sum += FastMath.abs(p1[i] - p2[i]); - } - return sum; - } - - /** - * Calculates the L<sub>2</sub> (Euclidean) distance between two points. - * - * @param p1 the first point - * @param p2 the second point - * @return the L<sub>2</sub> distance between the two points - * @throws DimensionMismatchException if the array lengths differ. - */ - public static double distance(double[] p1, double[] p2) - throws DimensionMismatchException { - checkEqualLength(p1, p2); - double sum = 0; - for (int i = 0; i < p1.length; i++) { - final double dp = p1[i] - p2[i]; - sum += dp * dp; - } - return FastMath.sqrt(sum); - } - - /** - * Calculates the cosine of the angle between two vectors. - * - * @param v1 Cartesian coordinates of the first vector. - * @param v2 Cartesian coordinates of the second vector. - * @return the cosine of the angle between the vectors. - * @since 3.6 - */ - public static double cosAngle(double[] v1, double[] v2) { - return linearCombination(v1, v2) / (safeNorm(v1) * safeNorm(v2)); - } - - /** - * Calculates the L<sub>2</sub> (Euclidean) distance between two points. - * - * @param p1 the first point - * @param p2 the second point - * @return the L<sub>2</sub> distance between the two points - * @throws DimensionMismatchException if the array lengths differ. - */ - public static double distance(int[] p1, int[] p2) - throws DimensionMismatchException { - checkEqualLength(p1, p2); - double sum = 0; - for (int i = 0; i < p1.length; i++) { - final double dp = p1[i] - p2[i]; - sum += dp * dp; - } - return FastMath.sqrt(sum); - } - - /** - * Calculates the L<sub>∞</sub> (max of abs) distance between two points. - * - * @param p1 the first point - * @param p2 the second point - * @return the L<sub>∞</sub> distance between the two points - * @throws DimensionMismatchException if the array lengths differ. - */ - public static double distanceInf(double[] p1, double[] p2) - throws DimensionMismatchException { - checkEqualLength(p1, p2); - double max = 0; - for (int i = 0; i < p1.length; i++) { - max = FastMath.max(max, FastMath.abs(p1[i] - p2[i])); - } - return max; - } - - /** - * Calculates the L<sub>∞</sub> (max of abs) distance between two points. - * - * @param p1 the first point - * @param p2 the second point - * @return the L<sub>∞</sub> distance between the two points - * @throws DimensionMismatchException if the array lengths differ. - */ - public static int distanceInf(int[] p1, int[] p2) - throws DimensionMismatchException { - checkEqualLength(p1, p2); - int max = 0; - for (int i = 0; i < p1.length; i++) { - max = FastMath.max(max, FastMath.abs(p1[i] - p2[i])); - } - return max; - } - - /** - * Specification of ordering direction. - */ - public enum OrderDirection { - /** Constant for increasing direction. */ - INCREASING, - /** Constant for decreasing direction. */ - DECREASING - } - - /** - * Check that an array is monotonically increasing or decreasing. - * - * @param <T> the type of the elements in the specified array - * @param val Values. - * @param dir Ordering direction. - * @param strict Whether the order should be strict. - * @return {@code true} if sorted, {@code false} otherwise. - */ - public static <T extends Comparable<? super T>> boolean isMonotonic(T[] val, - OrderDirection dir, - boolean strict) { - T previous = val[0]; - final int max = val.length; - for (int i = 1; i < max; i++) { - final int comp; - switch (dir) { - case INCREASING: - comp = previous.compareTo(val[i]); - if (strict) { - if (comp >= 0) { - return false; - } - } else { - if (comp > 0) { - return false; - } - } - break; - case DECREASING: - comp = val[i].compareTo(previous); - if (strict) { - if (comp >= 0) { - return false; - } - } else { - if (comp > 0) { - return false; - } - } - break; - default: - // Should never happen. - throw new MathInternalError(); - } - - previous = val[i]; - } - return true; - } - - /** - * Check that an array is monotonically increasing or decreasing. - * - * @param val Values. - * @param dir Ordering direction. - * @param strict Whether the order should be strict. - * @return {@code true} if sorted, {@code false} otherwise. - */ - public static boolean isMonotonic(double[] val, OrderDirection dir, boolean strict) { - return checkOrder(val, dir, strict, false); - } - - /** - * Check that both arrays have the same length. - * - * @param a Array. - * @param b Array. - * @param abort Whether to throw an exception if the check fails. - * @return {@code true} if the arrays have the same length. - * @throws DimensionMismatchException if the lengths differ and - * {@code abort} is {@code true}. - * @since 3.6 - */ - public static boolean checkEqualLength(double[] a, - double[] b, - boolean abort) { - if (a.length == b.length) { - return true; - } else { - if (abort) { - throw new DimensionMismatchException(a.length, b.length); - } - return false; - } - } - - /** - * Check that both arrays have the same length. - * - * @param a Array. - * @param b Array. - * @throws DimensionMismatchException if the lengths differ. - * @since 3.6 - */ - public static void checkEqualLength(double[] a, - double[] b) { - checkEqualLength(a, b, true); - } - - - /** - * Check that both arrays have the same length. - * - * @param a Array. - * @param b Array. - * @param abort Whether to throw an exception if the check fails. - * @return {@code true} if the arrays have the same length. - * @throws DimensionMismatchException if the lengths differ and - * {@code abort} is {@code true}. - * @since 3.6 - */ - public static boolean checkEqualLength(int[] a, - int[] b, - boolean abort) { - if (a.length == b.length) { - return true; - } else { - if (abort) { - throw new DimensionMismatchException(a.length, b.length); - } - return false; - } - } - - /** - * Check that both arrays have the same length. - * - * @param a Array. - * @param b Array. - * @throws DimensionMismatchException if the lengths differ. - * @since 3.6 - */ - public static void checkEqualLength(int[] a, - int[] b) { - checkEqualLength(a, b, true); - } - - /** - * Check that the given array is sorted. - * - * @param val Values. - * @param dir Ordering direction. - * @param strict Whether the order should be strict. - * @param abort Whether to throw an exception if the check fails. - * @return {@code true} if the array is sorted. - * @throws NonMonotonicSequenceException if the array is not sorted - * and {@code abort} is {@code true}. - */ - public static boolean checkOrder(double[] val, OrderDirection dir, - boolean strict, boolean abort) - throws NonMonotonicSequenceException { - double previous = val[0]; - final int max = val.length; - - int index; - ITEM: - for (index = 1; index < max; index++) { - switch (dir) { - case INCREASING: - if (strict) { - if (val[index] <= previous) { - break ITEM; - } - } else { - if (val[index] < previous) { - break ITEM; - } - } - break; - case DECREASING: - if (strict) { - if (val[index] >= previous) { - break ITEM; - } - } else { - if (val[index] > previous) { - break ITEM; - } - } - break; - default: - // Should never happen. - throw new MathInternalError(); - } - - previous = val[index]; - } - - if (index == max) { - // Loop completed. - return true; - } - - // Loop early exit means wrong ordering. - if (abort) { - throw new NonMonotonicSequenceException(val[index], previous, index, dir, strict); - } else { - return false; - } - } - - /** - * Check that the given array is sorted. - * - * @param val Values. - * @param dir Ordering direction. - * @param strict Whether the order should be strict. - * @throws NonMonotonicSequenceException if the array is not sorted. - * @since 2.2 - */ - public static void checkOrder(double[] val, OrderDirection dir, - boolean strict) throws NonMonotonicSequenceException { - checkOrder(val, dir, strict, true); - } - - /** - * Check that the given array is sorted in strictly increasing order. - * - * @param val Values. - * @throws NonMonotonicSequenceException if the array is not sorted. - * @since 2.2 - */ - public static void checkOrder(double[] val) throws NonMonotonicSequenceException { - checkOrder(val, OrderDirection.INCREASING, true); - } - - /** - * Throws DimensionMismatchException if the input array is not rectangular. - * - * @param in array to be tested - * @throws NullArgumentException if input array is null - * @throws DimensionMismatchException if input array is not rectangular - * @since 3.1 - */ - public static void checkRectangular(final long[][] in) - throws NullArgumentException, DimensionMismatchException { - MathUtils.checkNotNull(in); - for (int i = 1; i < in.length; i++) { - if (in[i].length != in[0].length) { - throw new DimensionMismatchException( - LocalizedFormats.DIFFERENT_ROWS_LENGTHS, - in[i].length, in[0].length); - } - } - } - - /** - * Check that all entries of the input array are strictly positive. - * - * @param in Array to be tested - * @throws NotStrictlyPositiveException if any entries of the array are not - * strictly positive. - * @since 3.1 - */ - public static void checkPositive(final double[] in) - throws NotStrictlyPositiveException { - for (int i = 0; i < in.length; i++) { - if (in[i] <= 0) { - throw new NotStrictlyPositiveException(in[i]); - } - } - } - - /** - * Check that no entry of the input array is {@code NaN}. - * - * @param in Array to be tested. - * @throws NotANumberException if an entry is {@code NaN}. - * @since 3.4 - */ - public static void checkNotNaN(final double[] in) - throws NotANumberException { - for(int i = 0; i < in.length; i++) { - if (Double.isNaN(in[i])) { - throw new NotANumberException(); - } - } - } - - /** - * Check that all entries of the input array are >= 0. - * - * @param in Array to be tested - * @throws NotPositiveException if any array entries are less than 0. - * @since 3.1 - */ - public static void checkNonNegative(final long[] in) - throws NotPositiveException { - for (int i = 0; i < in.length; i++) { - if (in[i] < 0) { - throw new NotPositiveException(in[i]); - } - } - } - - /** - * Check all entries of the input array are >= 0. - * - * @param in Array to be tested - * @throws NotPositiveException if any array entries are less than 0. - * @since 3.1 - */ - public static void checkNonNegative(final long[][] in) - throws NotPositiveException { - for (int i = 0; i < in.length; i ++) { - for (int j = 0; j < in[i].length; j++) { - if (in[i][j] < 0) { - throw new NotPositiveException(in[i][j]); - } - } - } - } - - /** - * Returns the Cartesian norm (2-norm), handling both overflow and underflow. - * Translation of the minpack enorm subroutine. - * - * The redistribution policy for MINPACK is available - * <a href="http://www.netlib.org/minpack/disclaimer">here</a>, for - * convenience, it is reproduced below.</p> - * - * <table border="0" width="80%" cellpadding="10" align="center" bgcolor="#E0E0E0"> - * <tr><td> - * Minpack Copyright Notice (1999) University of Chicago. - * All rights reserved - * </td></tr> - * <tr><td> - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * <ol> - * <li>Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer.</li> - * <li>Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution.</li> - * <li>The end-user documentation included with the redistribution, if any, - * must include the following acknowledgment: - * {@code This product includes software developed by the University of - * Chicago, as Operator of Argonne National Laboratory.} - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear.</li> - * <li><strong>WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" - * WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE - * UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND - * THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE - * OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY - * OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR - * USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF - * THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4) - * DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION - * UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL - * BE CORRECTED.</strong></li> - * <li><strong>LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT - * HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF - * ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, - * INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF - * ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF - * PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER - * SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT - * (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, - * EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE - * POSSIBILITY OF SUCH LOSS OR DAMAGES.</strong></li> - * <ol></td></tr> - * </table> - * - * @param v Vector of doubles. - * @return the 2-norm of the vector. - * @since 2.2 - */ - public static double safeNorm(double[] v) { - double rdwarf = 3.834e-20; - double rgiant = 1.304e+19; - double s1 = 0; - double s2 = 0; - double s3 = 0; - double x1max = 0; - double x3max = 0; - double floatn = v.length; - double agiant = rgiant / floatn; - for (int i = 0; i < v.length; i++) { - double xabs = FastMath.abs(v[i]); - if (xabs < rdwarf || xabs > agiant) { - if (xabs > rdwarf) { - if (xabs > x1max) { - double r = x1max / xabs; - s1= 1 + s1 * r * r; - x1max = xabs; - } else { - double r = xabs / x1max; - s1 += r * r; - } - } else { - if (xabs > x3max) { - double r = x3max / xabs; - s3= 1 + s3 * r * r; - x3max = xabs; - } else { - if (xabs != 0) { - double r = xabs / x3max; - s3 += r * r; - } - } - } - } else { - s2 += xabs * xabs; - } - } - double norm; - if (s1 != 0) { - norm = x1max * Math.sqrt(s1 + (s2 / x1max) / x1max); - } else { - if (s2 == 0) { - norm = x3max * Math.sqrt(s3); - } else { - if (s2 >= x3max) { - norm = Math.sqrt(s2 * (1 + (x3max / s2) * (x3max * s3))); - } else { - norm = Math.sqrt(x3max * ((s2 / x3max) + (x3max * s3))); - } - } - } - return norm; - } - - /** - * A helper data structure holding a double and an integer value. - */ - private static class PairDoubleInteger { - /** Key */ - private final double key; - /** Value */ - private final int value; - - /** - * @param key Key. - * @param value Value. - */ - PairDoubleInteger(double key, int value) { - this.key = key; - this.value = value; - } - - /** @return the key. */ - public double getKey() { - return key; - } - - /** @return the value. */ - public int getValue() { - return value; - } - } - - /** - * Sort an array in ascending order in place and perform the same reordering - * of entries on other arrays. For example, if - * {@code x = [3, 1, 2], y = [1, 2, 3]} and {@code z = [0, 5, 7]}, then - * {@code sortInPlace(x, y, z)} will update {@code x} to {@code [1, 2, 3]}, - * {@code y} to {@code [2, 3, 1]} and {@code z} to {@code [5, 7, 0]}. - * - * @param x Array to be sorted and used as a pattern for permutation - * of the other arrays. - * @param yList Set of arrays whose permutations of entries will follow - * those performed on {@code x}. - * @throws DimensionMismatchException if any {@code y} is not the same - * size as {@code x}. - * @throws NullArgumentException if {@code x} or any {@code y} is null. - * @since 3.0 - */ - public static void sortInPlace(double[] x, double[] ... yList) - throws DimensionMismatchException, NullArgumentException { - sortInPlace(x, OrderDirection.INCREASING, yList); - } - - /** - * Sort an array in place and perform the same reordering of entries on - * other arrays. This method works the same as the other - * {@link #sortInPlace(double[], double[][]) sortInPlace} method, but - * allows the order of the sort to be provided in the {@code dir} - * parameter. - * - * @param x Array to be sorted and used as a pattern for permutation - * of the other arrays. - * @param dir Order direction. - * @param yList Set of arrays whose permutations of entries will follow - * those performed on {@code x}. - * @throws DimensionMismatchException if any {@code y} is not the same - * size as {@code x}. - * @throws NullArgumentException if {@code x} or any {@code y} is null - * @since 3.0 - */ - public static void sortInPlace(double[] x, - final OrderDirection dir, - double[] ... yList) - throws NullArgumentException, - DimensionMismatchException { - - // Consistency checks. - if (x == null) { - throw new NullArgumentException(); - } - - final int yListLen = yList.length; - final int len = x.length; - - for (int j = 0; j < yListLen; j++) { - final double[] y = yList[j]; - if (y == null) { - throw new NullArgumentException(); - } - if (y.length != len) { - throw new DimensionMismatchException(y.length, len); - } - } - - // Associate each abscissa "x[i]" with its index "i". - final List<PairDoubleInteger> list - = new ArrayList<PairDoubleInteger>(len); - for (int i = 0; i < len; i++) { - list.add(new PairDoubleInteger(x[i], i)); - } - - // Create comparators for increasing and decreasing orders. - final Comparator<PairDoubleInteger> comp - = dir == OrderDirection.INCREASING ? - new Comparator<PairDoubleInteger>() { - /** {@inheritDoc} */ - public int compare(PairDoubleInteger o1, - PairDoubleInteger o2) { - return Double.compare(o1.getKey(), o2.getKey()); - } - } : new Comparator<PairDoubleInteger>() { - /** {@inheritDoc} */ - public int compare(PairDoubleInteger o1, - PairDoubleInteger o2) { - return Double.compare(o2.getKey(), o1.getKey()); - } - }; - - // Sort. - Collections.sort(list, comp); - - // Modify the original array so that its elements are in - // the prescribed order. - // Retrieve indices of original locations. - final int[] indices = new int[len]; - for (int i = 0; i < len; i++) { - final PairDoubleInteger e = list.get(i); - x[i] = e.getKey(); - indices[i] = e.getValue(); - } - - // In each of the associated arrays, move the - // elements to their new location. - for (int j = 0; j < yListLen; j++) { - // Input array will be modified in place. - final double[] yInPlace = yList[j]; - final double[] yOrig = yInPlace.clone(); - - for (int i = 0; i < len; i++) { - yInPlace[i] = yOrig[indices[i]]; - } - } - } - - /** - * Creates a copy of the {@code source} array. - * - * @param source Array to be copied. - * @return the copied array. - */ - public static int[] copyOf(int[] source) { - return copyOf(source, source.length); - } - - /** - * Creates a copy of the {@code source} array. - * - * @param source Array to be copied. - * @return the copied array. - */ - public static double[] copyOf(double[] source) { - return copyOf(source, source.length); - } - - /** - * Creates a copy of the {@code source} array. - * - * @param source Array to be copied. - * @param len Number of entries to copy. If smaller then the source - * length, the copy will be truncated, if larger it will padded with - * zeroes. - * @return the copied array. - */ - public static int[] copyOf(int[] source, int len) { - final int[] output = new int[len]; - System.arraycopy(source, 0, output, 0, FastMath.min(len, source.length)); - return output; - } - - /** - * Creates a copy of the {@code source} array. - * - * @param source Array to be copied. - * @param len Number of entries to copy. If smaller then the source - * length, the copy will be truncated, if larger it will padded with - * zeroes. - * @return the copied array. - */ - public static double[] copyOf(double[] source, int len) { - final double[] output = new double[len]; - System.arraycopy(source, 0, output, 0, FastMath.min(len, source.length)); - return output; - } - - /** - * Creates a copy of the {@code source} array. - * - * @param source Array to be copied. - * @param from Initial index of the range to be copied, inclusive. - * @param to Final index of the range to be copied, exclusive. (This index may lie outside the array.) - * @return the copied array. - */ - public static double[] copyOfRange(double[] source, int from, int to) { - final int len = to - from; - final double[] output = new double[len]; - System.arraycopy(source, from, output, 0, FastMath.min(len, source.length - from)); - return output; - } - - /** - * Compute a linear combination accurately. - * This method computes the sum of the products - * <code>a<sub>i</sub> b<sub>i</sub></code> to high accuracy. - * It does so by using specific multiplication and addition algorithms to - * preserve accuracy and reduce cancellation effects. - * <br/> - * It is based on the 2005 paper - * <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.2.1547"> - * Accurate Sum and Dot Product</a> by Takeshi Ogita, Siegfried M. Rump, - * and Shin'ichi Oishi published in SIAM J. Sci. Comput. - * - * @param a Factors. - * @param b Factors. - * @return <code>Σ<sub>i</sub> a<sub>i</sub> b<sub>i</sub></code>. - * @throws DimensionMismatchException if arrays dimensions don't match - */ - public static double linearCombination(final double[] a, final double[] b) - throws DimensionMismatchException { - checkEqualLength(a, b); - final int len = a.length; - - if (len == 1) { - // Revert to scalar multiplication. - return a[0] * b[0]; - } - - final double[] prodHigh = new double[len]; - double prodLowSum = 0; - - for (int i = 0; i < len; i++) { - final double ai = a[i]; - final double aHigh = Double.longBitsToDouble(Double.doubleToRawLongBits(ai) & ((-1L) << 27)); - final double aLow = ai - aHigh; - - final double bi = b[i]; - final double bHigh = Double.longBitsToDouble(Double.doubleToRawLongBits(bi) & ((-1L) << 27)); - final double bLow = bi - bHigh; - prodHigh[i] = ai * bi; - final double prodLow = aLow * bLow - (((prodHigh[i] - - aHigh * bHigh) - - aLow * bHigh) - - aHigh * bLow); - prodLowSum += prodLow; - } - - - final double prodHighCur = prodHigh[0]; - double prodHighNext = prodHigh[1]; - double sHighPrev = prodHighCur + prodHighNext; - double sPrime = sHighPrev - prodHighNext; - double sLowSum = (prodHighNext - (sHighPrev - sPrime)) + (prodHighCur - sPrime); - - final int lenMinusOne = len - 1; - for (int i = 1; i < lenMinusOne; i++) { - prodHighNext = prodHigh[i + 1]; - final double sHighCur = sHighPrev + prodHighNext; - sPrime = sHighCur - prodHighNext; - sLowSum += (prodHighNext - (sHighCur - sPrime)) + (sHighPrev - sPrime); - sHighPrev = sHighCur; - } - - double result = sHighPrev + (prodLowSum + sLowSum); - - if (Double.isNaN(result)) { - // either we have split infinite numbers or some coefficients were NaNs, - // just rely on the naive implementation and let IEEE754 handle this - result = 0; - for (int i = 0; i < len; ++i) { - result += a[i] * b[i]; - } - } - - return result; - } - - /** - * Compute a linear combination accurately. - * <p> - * This method computes a<sub>1</sub>×b<sub>1</sub> + - * a<sub>2</sub>×b<sub>2</sub> to high accuracy. It does - * so by using specific multiplication and addition algorithms to - * preserve accuracy and reduce cancellation effects. It is based - * on the 2005 paper <a - * href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.2.1547"> - * Accurate Sum and Dot Product</a> by Takeshi Ogita, - * Siegfried M. Rump, and Shin'ichi Oishi published in SIAM J. Sci. Comput. - * </p> - * @param a1 first factor of the first term - * @param b1 second factor of the first term - * @param a2 first factor of the second term - * @param b2 second factor of the second term - * @return a<sub>1</sub>×b<sub>1</sub> + - * a<sub>2</sub>×b<sub>2</sub> - * @see #linearCombination(double, double, double, double, double, double) - * @see #linearCombination(double, double, double, double, double, double, double, double) - */ - public static double linearCombination(final double a1, final double b1, - final double a2, final double b2) { - - // the code below is split in many additions/subtractions that may - // appear redundant. However, they should NOT be simplified, as they - // use IEEE754 floating point arithmetic rounding properties. - // The variable naming conventions are that xyzHigh contains the most significant - // bits of xyz and xyzLow contains its least significant bits. So theoretically - // xyz is the sum xyzHigh + xyzLow, but in many cases below, this sum cannot - // be represented in only one double precision number so we preserve two numbers - // to hold it as long as we can, combining the high and low order bits together - // only at the end, after cancellation may have occurred on high order bits - - // split a1 and b1 as one 26 bits number and one 27 bits number - final double a1High = Double.longBitsToDouble(Double.doubleToRawLongBits(a1) & ((-1L) << 27)); - final double a1Low = a1 - a1High; - final double b1High = Double.longBitsToDouble(Double.doubleToRawLongBits(b1) & ((-1L) << 27)); - final double b1Low = b1 - b1High; - - // accurate multiplication a1 * b1 - final double prod1High = a1 * b1; - final double prod1Low = a1Low * b1Low - (((prod1High - a1High * b1High) - a1Low * b1High) - a1High * b1Low); - - // split a2 and b2 as one 26 bits number and one 27 bits number - final double a2High = Double.longBitsToDouble(Double.doubleToRawLongBits(a2) & ((-1L) << 27)); - final double a2Low = a2 - a2High; - final double b2High = Double.longBitsToDouble(Double.doubleToRawLongBits(b2) & ((-1L) << 27)); - final double b2Low = b2 - b2High; - - // accurate multiplication a2 * b2 - final double prod2High = a2 * b2; - final double prod2Low = a2Low * b2Low - (((prod2High - a2High * b2High) - a2Low * b2High) - a2High * b2Low); - - // accurate addition a1 * b1 + a2 * b2 - final double s12High = prod1High + prod2High; - final double s12Prime = s12High - prod2High; - final double s12Low = (prod2High - (s12High - s12Prime)) + (prod1High - s12Prime); - - // final rounding, s12 may have suffered many cancellations, we try - // to recover some bits from the extra words we have saved up to now - double result = s12High + (prod1Low + prod2Low + s12Low); - - if (Double.isNaN(result)) { - // either we have split infinite numbers or some coefficients were NaNs, - // just rely on the naive implementation and let IEEE754 handle this - result = a1 * b1 + a2 * b2; - } - - return result; - } - - /** - * Compute a linear combination accurately. - * <p> - * This method computes a<sub>1</sub>×b<sub>1</sub> + - * a<sub>2</sub>×b<sub>2</sub> + a<sub>3</sub>×b<sub>3</sub> - * to high accuracy. It does so by using specific multiplication and - * addition algorithms to preserve accuracy and reduce cancellation effects. - * It is based on the 2005 paper <a - * href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.2.1547"> - * Accurate Sum and Dot Product</a> by Takeshi Ogita, - * Siegfried M. Rump, and Shin'ichi Oishi published in SIAM J. Sci. Comput. - * </p> - * @param a1 first factor of the first term - * @param b1 second factor of the first term - * @param a2 first factor of the second term - * @param b2 second factor of the second term - * @param a3 first factor of the third term - * @param b3 second factor of the third term - * @return a<sub>1</sub>×b<sub>1</sub> + - * a<sub>2</sub>×b<sub>2</sub> + a<sub>3</sub>×b<sub>3</sub> - * @see #linearCombination(double, double, double, double) - * @see #linearCombination(double, double, double, double, double, double, double, double) - */ - public static double linearCombination(final double a1, final double b1, - final double a2, final double b2, - final double a3, final double b3) { - - // the code below is split in many additions/subtractions that may - // appear redundant. However, they should NOT be simplified, as they - // do use IEEE754 floating point arithmetic rounding properties. - // The variables naming conventions are that xyzHigh contains the most significant - // bits of xyz and xyzLow contains its least significant bits. So theoretically - // xyz is the sum xyzHigh + xyzLow, but in many cases below, this sum cannot - // be represented in only one double precision number so we preserve two numbers - // to hold it as long as we can, combining the high and low order bits together - // only at the end, after cancellation may have occurred on high order bits - - // split a1 and b1 as one 26 bits number and one 27 bits number - final double a1High = Double.longBitsToDouble(Double.doubleToRawLongBits(a1) & ((-1L) << 27)); - final double a1Low = a1 - a1High; - final double b1High = Double.longBitsToDouble(Double.doubleToRawLongBits(b1) & ((-1L) << 27)); - final double b1Low = b1 - b1High; - - // accurate multiplication a1 * b1 - final double prod1High = a1 * b1; - final double prod1Low = a1Low * b1Low - (((prod1High - a1High * b1High) - a1Low * b1High) - a1High * b1Low); - - // split a2 and b2 as one 26 bits number and one 27 bits number - final double a2High = Double.longBitsToDouble(Double.doubleToRawLongBits(a2) & ((-1L) << 27)); - final double a2Low = a2 - a2High; - final double b2High = Double.longBitsToDouble(Double.doubleToRawLongBits(b2) & ((-1L) << 27)); - final double b2Low = b2 - b2High; - - // accurate multiplication a2 * b2 - final double prod2High = a2 * b2; - final double prod2Low = a2Low * b2Low - (((prod2High - a2High * b2High) - a2Low * b2High) - a2High * b2Low); - - // split a3 and b3 as one 26 bits number and one 27 bits number - final double a3High = Double.longBitsToDouble(Double.doubleToRawLongBits(a3) & ((-1L) << 27)); - final double a3Low = a3 - a3High; - final double b3High = Double.longBitsToDouble(Double.doubleToRawLongBits(b3) & ((-1L) << 27)); - final double b3Low = b3 - b3High; - - // accurate multiplication a3 * b3 - final double prod3High = a3 * b3; - final double prod3Low = a3Low * b3Low - (((prod3High - a3High * b3High) - a3Low * b3High) - a3High * b3Low); - - // accurate addition a1 * b1 + a2 * b2 - final double s12High = prod1High + prod2High; - final double s12Prime = s12High - prod2High; - final double s12Low = (prod2High - (s12High - s12Prime)) + (prod1High - s12Prime); - - // accurate addition a1 * b1 + a2 * b2 + a3 * b3 - final double s123High = s12High + prod3High; - final double s123Prime = s123High - prod3High; - final double s123Low = (prod3High - (s123High - s123Prime)) + (s12High - s123Prime); - - // final rounding, s123 may have suffered many cancellations, we try - // to recover some bits from the extra words we have saved up to now - double result = s123High + (prod1Low + prod2Low + prod3Low + s12Low + s123Low); - - if (Double.isNaN(result)) { - // either we have split infinite numbers or some coefficients were NaNs, - // just rely on the naive implementation and let IEEE754 handle this - result = a1 * b1 + a2 * b2 + a3 * b3; - } - - return result; - } - - /** - * Compute a linear combination accurately. - * <p> - * This method computes a<sub>1</sub>×b<sub>1</sub> + - * a<sub>2</sub>×b<sub>2</sub> + a<sub>3</sub>×b<sub>3</sub> + - * a<sub>4</sub>×b<sub>4</sub> - * to high accuracy. It does so by using specific multiplication and - * addition algorithms to preserve accuracy and reduce cancellation effects. - * It is based on the 2005 paper <a - * href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.2.1547"> - * Accurate Sum and Dot Product</a> by Takeshi Ogita, - * Siegfried M. Rump, and Shin'ichi Oishi published in SIAM J. Sci. Comput. - * </p> - * @param a1 first factor of the first term - * @param b1 second factor of the first term - * @param a2 first factor of the second term - * @param b2 second factor of the second term - * @param a3 first factor of the third term - * @param b3 second factor of the third term - * @param a4 first factor of the third term - * @param b4 second factor of the third term - * @return a<sub>1</sub>×b<sub>1</sub> + - * a<sub>2</sub>×b<sub>2</sub> + a<sub>3</sub>×b<sub>3</sub> + - * a<sub>4</sub>×b<sub>4</sub> - * @see #linearCombination(double, double, double, double) - * @see #linearCombination(double, double, double, double, double, double) - */ - public static double linearCombination(final double a1, final double b1, - final double a2, final double b2, - final double a3, final double b3, - final double a4, final double b4) { - - // the code below is split in many additions/subtractions that may - // appear redundant. However, they should NOT be simplified, as they - // do use IEEE754 floating point arithmetic rounding properties. - // The variables naming conventions are that xyzHigh contains the most significant - // bits of xyz and xyzLow contains its least significant bits. So theoretically - // xyz is the sum xyzHigh + xyzLow, but in many cases below, this sum cannot - // be represented in only one double precision number so we preserve two numbers - // to hold it as long as we can, combining the high and low order bits together - // only at the end, after cancellation may have occurred on high order bits - - // split a1 and b1 as one 26 bits number and one 27 bits number - final double a1High = Double.longBitsToDouble(Double.doubleToRawLongBits(a1) & ((-1L) << 27)); - final double a1Low = a1 - a1High; - final double b1High = Double.longBitsToDouble(Double.doubleToRawLongBits(b1) & ((-1L) << 27)); - final double b1Low = b1 - b1High; - - // accurate multiplication a1 * b1 - final double prod1High = a1 * b1; - final double prod1Low = a1Low * b1Low - (((prod1High - a1High * b1High) - a1Low * b1High) - a1High * b1Low); - - // split a2 and b2 as one 26 bits number and one 27 bits number - final double a2High = Double.longBitsToDouble(Double.doubleToRawLongBits(a2) & ((-1L) << 27)); - final double a2Low = a2 - a2High; - final double b2High = Double.longBitsToDouble(Double.doubleToRawLongBits(b2) & ((-1L) << 27)); - final double b2Low = b2 - b2High; - - // accurate multiplication a2 * b2 - final double prod2High = a2 * b2; - final double prod2Low = a2Low * b2Low - (((prod2High - a2High * b2High) - a2Low * b2High) - a2High * b2Low); - - // split a3 and b3 as one 26 bits number and one 27 bits number - final double a3High = Double.longBitsToDouble(Double.doubleToRawLongBits(a3) & ((-1L) << 27)); - final double a3Low = a3 - a3High; - final double b3High = Double.longBitsToDouble(Double.doubleToRawLongBits(b3) & ((-1L) << 27)); - final double b3Low = b3 - b3High; - - // accurate multiplication a3 * b3 - final double prod3High = a3 * b3; - final double prod3Low = a3Low * b3Low - (((prod3High - a3High * b3High) - a3Low * b3High) - a3High * b3Low); - - // split a4 and b4 as one 26 bits number and one 27 bits number - final double a4High = Double.longBitsToDouble(Double.doubleToRawLongBits(a4) & ((-1L) << 27)); - final double a4Low = a4 - a4High; - final double b4High = Double.longBitsToDouble(Double.doubleToRawLongBits(b4) & ((-1L) << 27)); - final double b4Low = b4 - b4High; - - // accurate multiplication a4 * b4 - final double prod4High = a4 * b4; - final double prod4Low = a4Low * b4Low - (((prod4High - a4High * b4High) - a4Low * b4High) - a4High * b4Low); - - // accurate addition a1 * b1 + a2 * b2 - final double s12High = prod1High + prod2High; - final double s12Prime = s12High - prod2High; - final double s12Low = (prod2High - (s12High - s12Prime)) + (prod1High - s12Prime); - - // accurate addition a1 * b1 + a2 * b2 + a3 * b3 - final double s123High = s12High + prod3High; - final double s123Prime = s123High - prod3High; - final double s123Low = (prod3High - (s123High - s123Prime)) + (s12High - s123Prime); - - // accurate addition a1 * b1 + a2 * b2 + a3 * b3 + a4 * b4 - final double s1234High = s123High + prod4High; - final double s1234Prime = s1234High - prod4High; - final double s1234Low = (prod4High - (s1234High - s1234Prime)) + (s123High - s1234Prime); - - // final rounding, s1234 may have suffered many cancellations, we try - // to recover some bits from the extra words we have saved up to now - double result = s1234High + (prod1Low + prod2Low + prod3Low + prod4Low + s12Low + s123Low + s1234Low); - - if (Double.isNaN(result)) { - // either we have split infinite numbers or some coefficients were NaNs, - // just rely on the naive implementation and let IEEE754 handle this - result = a1 * b1 + a2 * b2 + a3 * b3 + a4 * b4; - } - - return result; - } - - /** - * Returns true iff both arguments are null or have same dimensions and all - * their elements are equal as defined by - * {@link Precision#equals(float,float)}. - * - * @param x first array - * @param y second array - * @return true if the values are both null or have same dimension - * and equal elements. - */ - public static boolean equals(float[] x, float[] y) { - if ((x == null) || (y == null)) { - return !((x == null) ^ (y == null)); - } - if (x.length != y.length) { - return false; - } - for (int i = 0; i < x.length; ++i) { - if (!Precision.equals(x[i], y[i])) { - return false; - } - } - return true; - } - - /** - * Returns true iff both arguments are null or have same dimensions and all - * their elements are equal as defined by - * {@link Precision#equalsIncludingNaN(double,double) this method}. - * - * @param x first array - * @param y second array - * @return true if the values are both null or have same dimension and - * equal elements - * @since 2.2 - */ - public static boolean equalsIncludingNaN(float[] x, float[] y) { - if ((x == null) || (y == null)) { - return !((x == null) ^ (y == null)); - } - if (x.length != y.length) { - return false; - } - for (int i = 0; i < x.length; ++i) { - if (!Precision.equalsIncludingNaN(x[i], y[i])) { - return false; - } - } - return true; - } - - /** - * Returns {@code true} iff both arguments are {@code null} or have same - * dimensions and all their elements are equal as defined by - * {@link Precision#equals(double,double)}. - * - * @param x First array. - * @param y Second array. - * @return {@code true} if the values are both {@code null} or have same - * dimension and equal elements. - */ - public static boolean equals(double[] x, double[] y) { - if ((x == null) || (y == null)) { - return !((x == null) ^ (y == null)); - } - if (x.length != y.length) { - return false; - } - for (int i = 0; i < x.length; ++i) { - if (!Precision.equals(x[i], y[i])) { - return false; - } - } - return true; - } - - /** - * Returns {@code true} iff both arguments are {@code null} or have same - * dimensions and all their elements are equal as defined by - * {@link Precision#equalsIncludingNaN(double,double) this method}. - * - * @param x First array. - * @param y Second array. - * @return {@code true} if the values are both {@code null} or have same - * dimension and equal elements. - * @since 2.2 - */ - public static boolean equalsIncludingNaN(double[] x, double[] y) { - if ((x == null) || (y == null)) { - return !((x == null) ^ (y == null)); - } - if (x.length != y.length) { - return false; - } - for (int i = 0; i < x.length; ++i) { - if (!Precision.equalsIncludingNaN(x[i], y[i])) { - return false; - } - } - return true; - } - - /** - * Normalizes an array to make it sum to a specified value. - * Returns the result of the transformation - * <pre> - * x |-> x * normalizedSum / sum - * </pre> - * applied to each non-NaN element x of the input array, where sum is the - * sum of the non-NaN entries in the input array. - * <p> - * Throws IllegalArgumentException if {@code normalizedSum} is infinite - * or NaN and ArithmeticException if the input array contains any infinite elements - * or sums to 0. - * <p> - * Ignores (i.e., copies unchanged to the output array) NaNs in the input array. - * - * @param values Input array to be normalized - * @param normalizedSum Target sum for the normalized array - * @return the normalized array. - * @throws MathArithmeticException if the input array contains infinite - * elements or sums to zero. - * @throws MathIllegalArgumentException if the target sum is infinite or {@code NaN}. - * @since 2.1 - */ - public static double[] normalizeArray(double[] values, double normalizedSum) - throws MathIllegalArgumentException, MathArithmeticException { - if (Double.isInfinite(normalizedSum)) { - throw new MathIllegalArgumentException(LocalizedFormats.NORMALIZE_INFINITE); - } - if (Double.isNaN(normalizedSum)) { - throw new MathIllegalArgumentException(LocalizedFormats.NORMALIZE_NAN); - } - double sum = 0d; - final int len = values.length; - double[] out = new double[len]; - for (int i = 0; i < len; i++) { - if (Double.isInfinite(values[i])) { - throw new MathIllegalArgumentException(LocalizedFormats.INFINITE_ARRAY_ELEMENT, values[i], i); - } - if (!Double.isNaN(values[i])) { - sum += values[i]; - } - } - if (sum == 0) { - throw new MathArithmeticException(LocalizedFormats.ARRAY_SUMS_TO_ZERO); - } - for (int i = 0; i < len; i++) { - if (Double.isNaN(values[i])) { - out[i] = Double.NaN; - } else { - out[i] = values[i] * normalizedSum / sum; - } - } - return out; - } - - /** Build an array of elements. - * <p> - * Arrays are filled with field.getZero() - * - * @param <T> the type of the field elements - * @param field field to which array elements belong - * @param length of the array - * @return a new array - * @since 3.2 - */ - public static <T> T[] buildArray(final Field<T> field, final int length) { - @SuppressWarnings("unchecked") // OK because field must be correct class - T[] array = (T[]) Array.newInstance(field.getRuntimeClass(), length); - Arrays.fill(array, field.getZero()); - return array; - } - - /** Build a double dimension array of elements. - * <p> - * Arrays are filled with field.getZero() - * - * @param <T> the type of the field elements - * @param field field to which array elements belong - * @param rows number of rows in the array - * @param columns number of columns (may be negative to build partial - * arrays in the same way <code>new Field[rows][]</code> works) - * @return a new array - * @since 3.2 - */ - @SuppressWarnings("unchecked") - public static <T> T[][] buildArray(final Field<T> field, final int rows, final int columns) { - final T[][] array; - if (columns < 0) { - T[] dummyRow = buildArray(field, 0); - array = (T[][]) Array.newInstance(dummyRow.getClass(), rows); - } else { - array = (T[][]) Array.newInstance(field.getRuntimeClass(), - new int[] { - rows, columns - }); - for (int i = 0; i < rows; ++i) { - Arrays.fill(array[i], field.getZero()); - } - } - return array; - } - - /** - * Calculates the <a href="http://en.wikipedia.org/wiki/Convolution"> - * convolution</a> between two sequences. - * <p> - * The solution is obtained via straightforward computation of the - * convolution sum (and not via FFT). Whenever the computation needs - * an element that would be located at an index outside the input arrays, - * the value is assumed to be zero. - * - * @param x First sequence. - * Typically, this sequence will represent an input signal to a system. - * @param h Second sequence. - * Typically, this sequence will represent the impulse response of the system. - * @return the convolution of {@code x} and {@code h}. - * This array's length will be {@code x.length + h.length - 1}. - * @throws NullArgumentException if either {@code x} or {@code h} is {@code null}. - * @throws NoDataException if either {@code x} or {@code h} is empty. - * - * @since 3.3 - */ - public static double[] convolve(double[] x, double[] h) - throws NullArgumentException, - NoDataException { - MathUtils.checkNotNull(x); - MathUtils.checkNotNull(h); - - final int xLen = x.length; - final int hLen = h.length; - - if (xLen == 0 || hLen == 0) { - throw new NoDataException(); - } - - // initialize the output array - final int totalLength = xLen + hLen - 1; - final double[] y = new double[totalLength]; - - // straightforward implementation of the convolution sum - for (int n = 0; n < totalLength; n++) { - double yn = 0; - int k = FastMath.max(0, n + 1 - xLen); - int j = n - k; - while (k < hLen && j >= 0) { - yn += x[j--] * h[k++]; - } - y[n] = yn; - } - - return y; - } - - /** - * Specification for indicating that some operation applies - * before or after a given index. - */ - public enum Position { - /** Designates the beginning of the array (near index 0). */ - HEAD, - /** Designates the end of the array. */ - TAIL - } - - /** - * Shuffle the entries of the given array. - * The {@code start} and {@code pos} parameters select which portion - * of the array is randomized and which is left untouched. - * - * @see #shuffle(int[],int,Position,RandomGenerator) - * - * @param list Array whose entries will be shuffled (in-place). - * @param start Index at which shuffling begins. - * @param pos Shuffling is performed for index positions between - * {@code start} and either the end (if {@link Position#TAIL}) - * or the beginning (if {@link Position#HEAD}) of the array. - */ - public static void shuffle(int[] list, - int start, - Position pos) { - shuffle(list, start, pos, new Well19937c()); - } - - /** - * Shuffle the entries of the given array, using the - * <a href="http://en.wikipedia.org/wiki/Fisher–Yates_shuffle#The_modern_algorithm"> - * Fisher–Yates</a> algorithm. - * The {@code start} and {@code pos} parameters select which portion - * of the array is randomized and which is left untouched. - * - * @param list Array whose entries will be shuffled (in-place). - * @param start Index at which shuffling begins. - * @param pos Shuffling is performed for index positions between - * {@code start} and either the end (if {@link Position#TAIL}) - * or the beginning (if {@link Position#HEAD}) of the array. - * @param rng Random number generator. - */ - public static void shuffle(int[] list, - int start, - Position pos, - RandomGenerator rng) { - switch (pos) { - case TAIL: { - for (int i = list.length - 1; i >= start; i--) { - final int target; - if (i == start) { - target = start; - } else { - // NumberIsTooLargeException cannot occur. - target = new UniformIntegerDistribution(rng, start, i).sample(); - } - final int temp = list[target]; - list[target] = list[i]; - list[i] = temp; - } - } - break; - case HEAD: { - for (int i = 0; i <= start; i++) { - final int target; - if (i == start) { - target = start; - } else { - // NumberIsTooLargeException cannot occur. - target = new UniformIntegerDistribution(rng, i, start).sample(); - } - final int temp = list[target]; - list[target] = list[i]; - list[i] = temp; - } - } - break; - default: - throw new MathInternalError(); // Should never happen. - } - } - - /** - * Shuffle the entries of the given array. - * - * @see #shuffle(int[],int,Position,RandomGenerator) - * - * @param list Array whose entries will be shuffled (in-place). - * @param rng Random number generator. - */ - public static void shuffle(int[] list, - RandomGenerator rng) { - shuffle(list, 0, Position.TAIL, rng); - } - - /** - * Shuffle the entries of the given array. - * - * @see #shuffle(int[],int,Position,RandomGenerator) - * - * @param list Array whose entries will be shuffled (in-place). - */ - public static void shuffle(int[] list) { - shuffle(list, new Well19937c()); - } - - /** - * Returns an array representing the natural number {@code n}. - * - * @param n Natural number. - * @return an array whose entries are the numbers 0, 1, ..., {@code n}-1. - * If {@code n == 0}, the returned array is empty. - */ - public static int[] natural(int n) { - return sequence(n, 0, 1); - } - /** - * Returns an array of {@code size} integers starting at {@code start}, - * skipping {@code stride} numbers. - * - * @param size Natural number. - * @param start Natural number. - * @param stride Natural number. - * @return an array whose entries are the numbers - * {@code start, start + stride, ..., start + (size - 1) * stride}. - * If {@code size == 0}, the returned array is empty. - * - * @since 3.4 - */ - public static int[] sequence(int size, - int start, - int stride) { - final int[] a = new int[size]; - for (int i = 0; i < size; i++) { - a[i] = start + i * stride; - } - return a; - } - /** - * This method is used - * to verify that the input parameters designate a subarray of positive length. - * <p> - * <ul> - * <li>returns <code>true</code> iff the parameters designate a subarray of - * positive length</li> - * <li>throws <code>MathIllegalArgumentException</code> if the array is null or - * or the indices are invalid</li> - * <li>returns <code>false</li> if the array is non-null, but - * <code>length</code> is 0. - * </ul></p> - * - * @param values the input array - * @param begin index of the first array element to include - * @param length the number of elements to include - * @return true if the parameters are valid and designate a subarray of positive length - * @throws MathIllegalArgumentException if the indices are invalid or the array is null - * @since 3.3 - */ - public static boolean verifyValues(final double[] values, final int begin, final int length) - throws MathIllegalArgumentException { - return verifyValues(values, begin, length, false); - } - - /** - * This method is used - * to verify that the input parameters designate a subarray of positive length. - * <p> - * <ul> - * <li>returns <code>true</code> iff the parameters designate a subarray of - * non-negative length</li> - * <li>throws <code>IllegalArgumentException</code> if the array is null or - * or the indices are invalid</li> - * <li>returns <code>false</li> if the array is non-null, but - * <code>length</code> is 0 unless <code>allowEmpty</code> is <code>true</code> - * </ul></p> - * - * @param values the input array - * @param begin index of the first array element to include - * @param length the number of elements to include - * @param allowEmpty if <code>true</code> then zero length arrays are allowed - * @return true if the parameters are valid - * @throws MathIllegalArgumentException if the indices are invalid or the array is null - * @since 3.3 - */ - public static boolean verifyValues(final double[] values, final int begin, - final int length, final boolean allowEmpty) throws MathIllegalArgumentException { - - if (values == null) { - throw new NullArgumentException(LocalizedFormats.INPUT_ARRAY); - } - - if (begin < 0) { - throw new NotPositiveException(LocalizedFormats.START_POSITION, Integer.valueOf(begin)); - } - - if (length < 0) { - throw new NotPositiveException(LocalizedFormats.LENGTH, Integer.valueOf(length)); - } - - if (begin + length > values.length) { - throw new NumberIsTooLargeException(LocalizedFormats.SUBARRAY_ENDS_AFTER_ARRAY_END, - Integer.valueOf(begin + length), Integer.valueOf(values.length), true); - } - - if (length == 0 && !allowEmpty) { - return false; - } - - return true; - - } - - /** - * This method is used - * to verify that the begin and length parameters designate a subarray of positive length - * and the weights are all non-negative, non-NaN, finite, and not all zero. - * <p> - * <ul> - * <li>returns <code>true</code> iff the parameters designate a subarray of - * positive length and the weights array contains legitimate values.</li> - * <li>throws <code>IllegalArgumentException</code> if any of the following are true: - * <ul><li>the values array is null</li> - * <li>the weights array is null</li> - * <li>the weights array does not have the same length as the values array</li> - * <li>the weights array contains one or more infinite values</li> - * <li>the weights array contains one or more NaN values</li> - * <li>the weights array contains negative values</li> - * <li>the start and length arguments do not determine a valid array</li></ul> - * </li> - * <li>returns <code>false</li> if the array is non-null, but - * <code>length</code> is 0. - * </ul></p> - * - * @param values the input array - * @param weights the weights array - * @param begin index of the first array element to include - * @param length the number of elements to include - * @return true if the parameters are valid and designate a subarray of positive length - * @throws MathIllegalArgumentException if the indices are invalid or the array is null - * @since 3.3 - */ - public static boolean verifyValues( - final double[] values, - final double[] weights, - final int begin, - final int length) throws MathIllegalArgumentException { - return verifyValues(values, weights, begin, length, false); - } - - /** - * This method is used - * to verify that the begin and length parameters designate a subarray of positive length - * and the weights are all non-negative, non-NaN, finite, and not all zero. - * <p> - * <ul> - * <li>returns <code>true</code> iff the parameters designate a subarray of - * non-negative length and the weights array contains legitimate values.</li> - * <li>throws <code>MathIllegalArgumentException</code> if any of the following are true: - * <ul><li>the values array is null</li> - * <li>the weights array is null</li> - * <li>the weights array does not have the same length as the values array</li> - * <li>the weights array contains one or more infinite values</li> - * <li>the weights array contains one or more NaN values</li> - * <li>the weights array contains negative values</li> - * <li>the start and length arguments do not determine a valid array</li></ul> - * </li> - * <li>returns <code>false</li> if the array is non-null, but - * <code>length</code> is 0 unless <code>allowEmpty</code> is <code>true</code>. - * </ul></p> - * - * @param values the input array. - * @param weights the weights array. - * @param begin index of the first array element to include. - * @param length the number of elements to include. - * @param allowEmpty if {@code true} than allow zero length arrays to pass. - * @return {@code true} if the parameters are valid. - * @throws NullArgumentException if either of the arrays are null - * @throws MathIllegalArgumentException if the array indices are not valid, - * the weights array contains NaN, infinite or negative elements, or there - * are no positive weights. - * @since 3.3 - */ - public static boolean verifyValues(final double[] values, final double[] weights, - final int begin, final int length, final boolean allowEmpty) throws MathIllegalArgumentException { - - if (weights == null || values == null) { - throw new NullArgumentException(LocalizedFormats.INPUT_ARRAY); - } - - checkEqualLength(weights, values); - - boolean containsPositiveWeight = false; - for (int i = begin; i < begin + length; i++) { - final double weight = weights[i]; - if (Double.isNaN(weight)) { - throw new MathIllegalArgumentException(LocalizedFormats.NAN_ELEMENT_AT_INDEX, Integer.valueOf(i)); - } - if (Double.isInfinite(weight)) { - throw new MathIllegalArgumentException(LocalizedFormats.INFINITE_ARRAY_ELEMENT, Double.valueOf(weight), Integer.valueOf(i)); - } - if (weight < 0) { - throw new MathIllegalArgumentException(LocalizedFormats.NEGATIVE_ELEMENT_AT_INDEX, Integer.valueOf(i), Double.valueOf(weight)); - } - if (!containsPositiveWeight && weight > 0.0) { - containsPositiveWeight = true; - } - } - - if (!containsPositiveWeight) { - throw new MathIllegalArgumentException(LocalizedFormats.WEIGHT_AT_LEAST_ONE_NON_ZERO); - } - - return verifyValues(values, begin, length, allowEmpty); - } - - /** - * Concatenates a sequence of arrays. The return array consists of the - * entries of the input arrays concatenated in the order they appear in - * the argument list. Null arrays cause NullPointerExceptions; zero - * length arrays are allowed (contributing nothing to the output array). - * - * @param x list of double[] arrays to concatenate - * @return a new array consisting of the entries of the argument arrays - * @throws NullPointerException if any of the arrays are null - * @since 3.6 - */ - public static double[] concatenate(double[] ...x) { - int combinedLength = 0; - for (double[] a : x) { - combinedLength += a.length; - } - int offset = 0; - int curLength = 0; - final double[] combined = new double[combinedLength]; - for (int i = 0; i < x.length; i++) { - curLength = x[i].length; - System.arraycopy(x[i], 0, combined, offset, curLength); - offset += curLength; - } - return combined; - } - - /** - * Returns an array consisting of the unique values in {@code data}. - * The return array is sorted in descending order. Empty arrays - * are allowed, but null arrays result in NullPointerException. - * Infinities are allowed. NaN values are allowed with maximum - * sort order - i.e., if there are NaN values in {@code data}, - * {@code Double.NaN} will be the first element of the output array, - * even if the array also contains {@code Double.POSITIVE_INFINITY}. - * - * @param data array to scan - * @return descending list of values included in the input array - * @throws NullPointerException if data is null - * @since 3.6 - */ - public static double[] unique(double[] data) { - TreeSet<Double> values = new TreeSet<Double>(); - for (int i = 0; i < data.length; i++) { - values.add(data[i]); - } - final int count = values.size(); - final double[] out = new double[count]; - Iterator<Double> iterator = values.iterator(); - int i = 0; - while (iterator.hasNext()) { - out[count - ++i] = iterator.next(); - } - return out; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/MathUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/MathUtils.java deleted file mode 100644 index cc403874b7ea..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/MathUtils.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.util; - -import java.util.Arrays; - -import com.azure.cosmos.implementation.apachecommons.math.RealFieldElement; -import com.azure.cosmos.implementation.apachecommons.math.exception.MathArithmeticException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotFiniteNumberException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NullArgumentException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.Localizable; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Miscellaneous utility functions. - * - * @see ArithmeticUtils - * @see Precision - * @see MathArrays - * - */ -public final class MathUtils { - /** - * \(2\pi\) - * @since 2.1 - */ - public static final double TWO_PI = 2 * FastMath.PI; - - /** - * \(\pi^2\) - * @since 3.4 - */ - public static final double PI_SQUARED = FastMath.PI * FastMath.PI; - - - /** - * Class contains only static methods. - */ - private MathUtils() {} - - - /** - * Returns an integer hash code representing the given double value. - * - * @param value the value to be hashed - * @return the hash code - */ - public static int hash(double value) { - return Double.valueOf(value).hashCode(); - } - - /** - * Returns {@code true} if the values are equal according to semantics of - * {@link Double#equals(Object)}. - * - * @param x Value - * @param y Value - * @return {@code new Double(x).equals(new Double(y))} - */ - public static boolean equals(double x, double y) { - return Double.valueOf(x).equals(y); - } - - /** - * Returns an integer hash code representing the given double array. - * - * @param value the value to be hashed (may be null) - * @return the hash code - * @since 1.2 - */ - public static int hash(double[] value) { - return Arrays.hashCode(value); - } - - /** - * Normalize an angle in a 2π wide interval around a center value. - * <p>This method has three main uses:</p> - * <ul> - * <li>normalize an angle between 0 and 2π:<br/> - * {@code a = MathUtils.normalizeAngle(a, FastMath.PI);}</li> - * <li>normalize an angle between -π and +π<br/> - * {@code a = MathUtils.normalizeAngle(a, 0.0);}</li> - * <li>compute the angle between two defining angular positions:<br> - * {@code angle = MathUtils.normalizeAngle(end, start) - start;}</li> - * </ul> - * <p>Note that due to numerical accuracy and since π cannot be represented - * exactly, the result interval is <em>closed</em>, it cannot be half-closed - * as would be more satisfactory in a purely mathematical view.</p> - * @param a angle to normalize - * @param center center of the desired 2π interval for the result - * @return a-2kπ with integer k and center-π <= a-2kπ <= center+π - * @since 1.2 - */ - public static double normalizeAngle(double a, double center) { - return a - TWO_PI * FastMath.floor((a + FastMath.PI - center) / TWO_PI); - } - - /** Find the maximum of two field elements. - * @param <T> the type of the field elements - * @param e1 first element - * @param e2 second element - * @return max(a1, e2) - * @since 3.6 - */ - public static <T extends RealFieldElement<T>> T max(final T e1, final T e2) { - return e1.subtract(e2).getReal() >= 0 ? e1 : e2; - } - - /** Find the minimum of two field elements. - * @param <T> the type of the field elements - * @param e1 first element - * @param e2 second element - * @return min(a1, e2) - * @since 3.6 - */ - public static <T extends RealFieldElement<T>> T min(final T e1, final T e2) { - return e1.subtract(e2).getReal() >= 0 ? e2 : e1; - } - - /** - * <p>Reduce {@code |a - offset|} to the primary interval - * {@code [0, |period|)}.</p> - * - * <p>Specifically, the value returned is <br/> - * {@code a - |period| * floor((a - offset) / |period|) - offset}.</p> - * - * <p>If any of the parameters are {@code NaN} or infinite, the result is - * {@code NaN}.</p> - * - * @param a Value to reduce. - * @param period Period. - * @param offset Value that will be mapped to {@code 0}. - * @return the value, within the interval {@code [0 |period|)}, - * that corresponds to {@code a}. - */ - public static double reduce(double a, - double period, - double offset) { - final double p = FastMath.abs(period); - return a - p * FastMath.floor((a - offset) / p) - offset; - } - - /** - * Returns the first argument with the sign of the second argument. - * - * @param magnitude Magnitude of the returned value. - * @param sign Sign of the returned value. - * @return a value with magnitude equal to {@code magnitude} and with the - * same sign as the {@code sign} argument. - * @throws MathArithmeticException if {@code magnitude == Byte.MIN_VALUE} - * and {@code sign >= 0}. - */ - public static byte copySign(byte magnitude, byte sign) - throws MathArithmeticException { - if ((magnitude >= 0 && sign >= 0) || - (magnitude < 0 && sign < 0)) { // Sign is OK. - return magnitude; - } else if (sign >= 0 && - magnitude == Byte.MIN_VALUE) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW); - } else { - return (byte) -magnitude; // Flip sign. - } - } - - /** - * Returns the first argument with the sign of the second argument. - * - * @param magnitude Magnitude of the returned value. - * @param sign Sign of the returned value. - * @return a value with magnitude equal to {@code magnitude} and with the - * same sign as the {@code sign} argument. - * @throws MathArithmeticException if {@code magnitude == Short.MIN_VALUE} - * and {@code sign >= 0}. - */ - public static short copySign(short magnitude, short sign) - throws MathArithmeticException { - if ((magnitude >= 0 && sign >= 0) || - (magnitude < 0 && sign < 0)) { // Sign is OK. - return magnitude; - } else if (sign >= 0 && - magnitude == Short.MIN_VALUE) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW); - } else { - return (short) -magnitude; // Flip sign. - } - } - - /** - * Returns the first argument with the sign of the second argument. - * - * @param magnitude Magnitude of the returned value. - * @param sign Sign of the returned value. - * @return a value with magnitude equal to {@code magnitude} and with the - * same sign as the {@code sign} argument. - * @throws MathArithmeticException if {@code magnitude == Integer.MIN_VALUE} - * and {@code sign >= 0}. - */ - public static int copySign(int magnitude, int sign) - throws MathArithmeticException { - if ((magnitude >= 0 && sign >= 0) || - (magnitude < 0 && sign < 0)) { // Sign is OK. - return magnitude; - } else if (sign >= 0 && - magnitude == Integer.MIN_VALUE) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW); - } else { - return -magnitude; // Flip sign. - } - } - - /** - * Returns the first argument with the sign of the second argument. - * - * @param magnitude Magnitude of the returned value. - * @param sign Sign of the returned value. - * @return a value with magnitude equal to {@code magnitude} and with the - * same sign as the {@code sign} argument. - * @throws MathArithmeticException if {@code magnitude == Long.MIN_VALUE} - * and {@code sign >= 0}. - */ - public static long copySign(long magnitude, long sign) - throws MathArithmeticException { - if ((magnitude >= 0 && sign >= 0) || - (magnitude < 0 && sign < 0)) { // Sign is OK. - return magnitude; - } else if (sign >= 0 && - magnitude == Long.MIN_VALUE) { - throw new MathArithmeticException(LocalizedFormats.OVERFLOW); - } else { - return -magnitude; // Flip sign. - } - } - /** - * Check that the argument is a real number. - * - * @param x Argument. - * @throws NotFiniteNumberException if {@code x} is not a - * finite real number. - */ - public static void checkFinite(final double x) - throws NotFiniteNumberException { - if (Double.isInfinite(x) || Double.isNaN(x)) { - throw new NotFiniteNumberException(x); - } - } - - /** - * Check that all the elements are real numbers. - * - * @param val Arguments. - * @throws NotFiniteNumberException if any values of the array is not a - * finite real number. - */ - public static void checkFinite(final double[] val) - throws NotFiniteNumberException { - for (int i = 0; i < val.length; i++) { - final double x = val[i]; - if (Double.isInfinite(x) || Double.isNaN(x)) { - throw new NotFiniteNumberException(LocalizedFormats.ARRAY_ELEMENT, x, i); - } - } - } - - /** - * Checks that an object is not null. - * - * @param o Object to be checked. - * @param pattern Message pattern. - * @param args Arguments to replace the placeholders in {@code pattern}. - * @throws NullArgumentException if {@code o} is {@code null}. - */ - public static void checkNotNull(Object o, - Localizable pattern, - Object ... args) - throws NullArgumentException { - if (o == null) { - throw new NullArgumentException(pattern, args); - } - } - - /** - * Checks that an object is not null. - * - * @param o Object to be checked. - * @throws NullArgumentException if {@code o} is {@code null}. - */ - public static void checkNotNull(Object o) - throws NullArgumentException { - if (o == null) { - throw new NullArgumentException(); - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/Pair.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/Pair.java deleted file mode 100644 index 7ac062089d86..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/Pair.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.util; - -/** - * Generic pair. - * <br/> - * Although the instances of this class are immutable, it is impossible - * to ensure that the references passed to the constructor will not be - * modified by the caller. - * - * @param <K> Key type. - * @param <V> Value type. - * - * @since 3.0 - */ -public class Pair<K, V> { - /** Key. */ - private final K key; - /** Value. */ - private final V value; - - /** - * Create an entry representing a mapping from the specified key to the - * specified value. - * - * @param k Key (first element of the pair). - * @param v Value (second element of the pair). - */ - public Pair(K k, V v) { - key = k; - value = v; - } - - /** - * Create an entry representing the same mapping as the specified entry. - * - * @param entry Entry to copy. - */ - public Pair(Pair<? extends K, ? extends V> entry) { - this(entry.getKey(), entry.getValue()); - } - - /** - * Get the key. - * - * @return the key (first element of the pair). - */ - public K getKey() { - return key; - } - - /** - * Get the value. - * - * @return the value (second element of the pair). - */ - public V getValue() { - return value; - } - - /** - * Get the first element of the pair. - * - * @return the first element of the pair. - * @since 3.1 - */ - public K getFirst() { - return key; - } - - /** - * Get the second element of the pair. - * - * @return the second element of the pair. - * @since 3.1 - */ - public V getSecond() { - return value; - } - - /** - * Compare the specified object with this entry for equality. - * - * @param o Object. - * @return {@code true} if the given object is also a map entry and - * the two entries represent the same mapping. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (!(o instanceof Pair)) { - return false; - } else { - Pair<?, ?> oP = (Pair<?, ?>) o; - return (key == null ? - oP.key == null : - key.equals(oP.key)) && - (value == null ? - oP.value == null : - value.equals(oP.value)); - } - } - - /** - * Compute a hash code. - * - * @return the hash code value. - */ - @Override - public int hashCode() { - int result = key == null ? 0 : key.hashCode(); - - final int h = value == null ? 0 : value.hashCode(); - result = 37 * result + h ^ (h >>> 16); - - return result; - } - - /** {@inheritDoc} */ - @Override - public String toString() { - return "[" + getKey() + ", " + getValue() + "]"; - } - - /** - * Convenience factory method that calls the - * {@link #Pair(Object, Object) constructor}. - * - * @param <K> the key type - * @param <V> the value type - * @param k First element of the pair. - * @param v Second element of the pair. - * @return a new {@code Pair} containing {@code k} and {@code v}. - * @since 3.3 - */ - public static <K, V> Pair<K, V> create(K k, V v) { - return new Pair<K, V>(k, v); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/Precision.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/Precision.java deleted file mode 100644 index 7027e494c0a0..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/Precision.java +++ /dev/null @@ -1,612 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.apachecommons.math.util; - -import java.math.BigDecimal; - -import com.azure.cosmos.implementation.apachecommons.math.exception.MathArithmeticException; -import com.azure.cosmos.implementation.apachecommons.math.exception.MathIllegalArgumentException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * Utilities for comparing numbers. - * - * @since 3.0 - */ -public class Precision { - /** - * <p> - * Largest double-precision floating-point number such that - * {@code 1 + EPSILON} is numerically equal to 1. This value is an upper - * bound on the relative error due to rounding real numbers to double - * precision floating-point numbers. - * </p> - * <p> - * In IEEE 754 arithmetic, this is 2<sup>-53</sup>. - * </p> - * - * @see <a href="http://en.wikipedia.org/wiki/Machine_epsilon">Machine epsilon</a> - */ - public static final double EPSILON; - - /** - * Safe minimum, such that {@code 1 / SAFE_MIN} does not overflow. - * <br/> - * In IEEE 754 arithmetic, this is also the smallest normalized - * number 2<sup>-1022</sup>. - */ - public static final double SAFE_MIN; - - /** Exponent offset in IEEE754 representation. */ - private static final long EXPONENT_OFFSET = 1023l; - - /** Offset to order signed double numbers lexicographically. */ - private static final long SGN_MASK = 0x8000000000000000L; - /** Offset to order signed double numbers lexicographically. */ - private static final int SGN_MASK_FLOAT = 0x80000000; - /** Positive zero. */ - private static final double POSITIVE_ZERO = 0d; - /** Positive zero bits. */ - private static final long POSITIVE_ZERO_DOUBLE_BITS = Double.doubleToRawLongBits(+0.0); - /** Negative zero bits. */ - private static final long NEGATIVE_ZERO_DOUBLE_BITS = Double.doubleToRawLongBits(-0.0); - /** Positive zero bits. */ - private static final int POSITIVE_ZERO_FLOAT_BITS = Float.floatToRawIntBits(+0.0f); - /** Negative zero bits. */ - private static final int NEGATIVE_ZERO_FLOAT_BITS = Float.floatToRawIntBits(-0.0f); - - static { - /* - * This was previously expressed as = 0x1.0p-53; - * However, OpenJDK (Sparc Solaris) cannot handle such small - * constants: MATH-721 - */ - EPSILON = Double.longBitsToDouble((EXPONENT_OFFSET - 53l) << 52); - - /* - * This was previously expressed as = 0x1.0p-1022; - * However, OpenJDK (Sparc Solaris) cannot handle such small - * constants: MATH-721 - */ - SAFE_MIN = Double.longBitsToDouble((EXPONENT_OFFSET - 1022l) << 52); - } - - /** - * Private constructor. - */ - private Precision() {} - - /** - * Compares two numbers given some amount of allowed error. - * - * @param x the first number - * @param y the second number - * @param eps the amount of error to allow when checking for equality - * @return <ul><li>0 if {@link #equals(double, double, double) equals(x, y, eps)}</li> - * <li>< 0 if !{@link #equals(double, double, double) equals(x, y, eps)} && x < y</li> - * <li>> 0 if !{@link #equals(double, double, double) equals(x, y, eps)} && x > y or - * either argument is NaN</li></ul> - */ - public static int compareTo(double x, double y, double eps) { - if (equals(x, y, eps)) { - return 0; - } else if (x < y) { - return -1; - } - return 1; - } - - /** - * Compares two numbers given some amount of allowed error. - * Two float numbers are considered equal if there are {@code (maxUlps - 1)} - * (or fewer) floating point numbers between them, i.e. two adjacent floating - * point numbers are considered equal. - * Adapted from <a - * href="http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/"> - * Bruce Dawson</a>. Returns {@code false} if either of the arguments is NaN. - * - * @param x first value - * @param y second value - * @param maxUlps {@code (maxUlps - 1)} is the number of floating point - * values between {@code x} and {@code y}. - * @return <ul><li>0 if {@link #equals(double, double, int) equals(x, y, maxUlps)}</li> - * <li>< 0 if !{@link #equals(double, double, int) equals(x, y, maxUlps)} && x < y</li> - * <li>> 0 if !{@link #equals(double, double, int) equals(x, y, maxUlps)} && x > y - * or either argument is NaN</li></ul> - */ - public static int compareTo(final double x, final double y, final int maxUlps) { - if (equals(x, y, maxUlps)) { - return 0; - } else if (x < y) { - return -1; - } - return 1; - } - - /** - * Returns true iff they are equal as defined by - * {@link #equals(float,float,int) equals(x, y, 1)}. - * - * @param x first value - * @param y second value - * @return {@code true} if the values are equal. - */ - public static boolean equals(float x, float y) { - return equals(x, y, 1); - } - - /** - * Returns true if both arguments are NaN or they are - * equal as defined by {@link #equals(float,float) equals(x, y, 1)}. - * - * @param x first value - * @param y second value - * @return {@code true} if the values are equal or both are NaN. - * @since 2.2 - */ - public static boolean equalsIncludingNaN(float x, float y) { - return (x != x || y != y) ? !(x != x ^ y != y) : equals(x, y, 1); - } - - /** - * Returns true if the arguments are equal or within the range of allowed - * error (inclusive). Returns {@code false} if either of the arguments - * is NaN. - * - * @param x first value - * @param y second value - * @param eps the amount of absolute error to allow. - * @return {@code true} if the values are equal or within range of each other. - * @since 2.2 - */ - public static boolean equals(float x, float y, float eps) { - return equals(x, y, 1) || FastMath.abs(y - x) <= eps; - } - - /** - * Returns true if the arguments are both NaN, are equal, or are within the range - * of allowed error (inclusive). - * - * @param x first value - * @param y second value - * @param eps the amount of absolute error to allow. - * @return {@code true} if the values are equal or within range of each other, - * or both are NaN. - * @since 2.2 - */ - public static boolean equalsIncludingNaN(float x, float y, float eps) { - return equalsIncludingNaN(x, y) || (FastMath.abs(y - x) <= eps); - } - - /** - * Returns true if the arguments are equal or within the range of allowed - * error (inclusive). - * Two float numbers are considered equal if there are {@code (maxUlps - 1)} - * (or fewer) floating point numbers between them, i.e. two adjacent floating - * point numbers are considered equal. - * Adapted from <a - * href="http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/"> - * Bruce Dawson</a>. Returns {@code false} if either of the arguments is NaN. - * - * @param x first value - * @param y second value - * @param maxUlps {@code (maxUlps - 1)} is the number of floating point - * values between {@code x} and {@code y}. - * @return {@code true} if there are fewer than {@code maxUlps} floating - * point values between {@code x} and {@code y}. - * @since 2.2 - */ - public static boolean equals(final float x, final float y, final int maxUlps) { - - final int xInt = Float.floatToRawIntBits(x); - final int yInt = Float.floatToRawIntBits(y); - - final boolean isEqual; - if (((xInt ^ yInt) & SGN_MASK_FLOAT) == 0) { - // number have same sign, there is no risk of overflow - isEqual = FastMath.abs(xInt - yInt) <= maxUlps; - } else { - // number have opposite signs, take care of overflow - final int deltaPlus; - final int deltaMinus; - if (xInt < yInt) { - deltaPlus = yInt - POSITIVE_ZERO_FLOAT_BITS; - deltaMinus = xInt - NEGATIVE_ZERO_FLOAT_BITS; - } else { - deltaPlus = xInt - POSITIVE_ZERO_FLOAT_BITS; - deltaMinus = yInt - NEGATIVE_ZERO_FLOAT_BITS; - } - - if (deltaPlus > maxUlps) { - isEqual = false; - } else { - isEqual = deltaMinus <= (maxUlps - deltaPlus); - } - - } - - return isEqual && !Float.isNaN(x) && !Float.isNaN(y); - - } - - /** - * Returns true if the arguments are both NaN or if they are equal as defined - * by {@link #equals(float,float,int) equals(x, y, maxUlps)}. - * - * @param x first value - * @param y second value - * @param maxUlps {@code (maxUlps - 1)} is the number of floating point - * values between {@code x} and {@code y}. - * @return {@code true} if both arguments are NaN or if there are less than - * {@code maxUlps} floating point values between {@code x} and {@code y}. - * @since 2.2 - */ - public static boolean equalsIncludingNaN(float x, float y, int maxUlps) { - return (x != x || y != y) ? !(x != x ^ y != y) : equals(x, y, maxUlps); - } - - /** - * Returns true iff they are equal as defined by - * {@link #equals(double,double,int) equals(x, y, 1)}. - * - * @param x first value - * @param y second value - * @return {@code true} if the values are equal. - */ - public static boolean equals(double x, double y) { - return equals(x, y, 1); - } - - /** - * Returns true if the arguments are both NaN or they are - * equal as defined by {@link #equals(double,double) equals(x, y, 1)}. - * - * @param x first value - * @param y second value - * @return {@code true} if the values are equal or both are NaN. - * @since 2.2 - */ - public static boolean equalsIncludingNaN(double x, double y) { - return (x != x || y != y) ? !(x != x ^ y != y) : equals(x, y, 1); - } - - /** - * Returns {@code true} if there is no double value strictly between the - * arguments or the difference between them is within the range of allowed - * error (inclusive). Returns {@code false} if either of the arguments - * is NaN. - * - * @param x First value. - * @param y Second value. - * @param eps Amount of allowed absolute error. - * @return {@code true} if the values are two adjacent floating point - * numbers or they are within range of each other. - */ - public static boolean equals(double x, double y, double eps) { - return equals(x, y, 1) || FastMath.abs(y - x) <= eps; - } - - /** - * Returns {@code true} if there is no double value strictly between the - * arguments or the relative difference between them is less than or equal - * to the given tolerance. Returns {@code false} if either of the arguments - * is NaN. - * - * @param x First value. - * @param y Second value. - * @param eps Amount of allowed relative error. - * @return {@code true} if the values are two adjacent floating point - * numbers or they are within range of each other. - * @since 3.1 - */ - public static boolean equalsWithRelativeTolerance(double x, double y, double eps) { - if (equals(x, y, 1)) { - return true; - } - - final double absoluteMax = FastMath.max(FastMath.abs(x), FastMath.abs(y)); - final double relativeDifference = FastMath.abs((x - y) / absoluteMax); - - return relativeDifference <= eps; - } - - /** - * Returns true if the arguments are both NaN, are equal or are within the range - * of allowed error (inclusive). - * - * @param x first value - * @param y second value - * @param eps the amount of absolute error to allow. - * @return {@code true} if the values are equal or within range of each other, - * or both are NaN. - * @since 2.2 - */ - public static boolean equalsIncludingNaN(double x, double y, double eps) { - return equalsIncludingNaN(x, y) || (FastMath.abs(y - x) <= eps); - } - - /** - * Returns true if the arguments are equal or within the range of allowed - * error (inclusive). - * <p> - * Two float numbers are considered equal if there are {@code (maxUlps - 1)} - * (or fewer) floating point numbers between them, i.e. two adjacent - * floating point numbers are considered equal. - * </p> - * <p> - * Adapted from <a - * href="http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/"> - * Bruce Dawson</a>. Returns {@code false} if either of the arguments is NaN. - * </p> - * - * @param x first value - * @param y second value - * @param maxUlps {@code (maxUlps - 1)} is the number of floating point - * values between {@code x} and {@code y}. - * @return {@code true} if there are fewer than {@code maxUlps} floating - * point values between {@code x} and {@code y}. - */ - public static boolean equals(final double x, final double y, final int maxUlps) { - - final long xInt = Double.doubleToRawLongBits(x); - final long yInt = Double.doubleToRawLongBits(y); - - final boolean isEqual; - if (((xInt ^ yInt) & SGN_MASK) == 0l) { - // number have same sign, there is no risk of overflow - isEqual = FastMath.abs(xInt - yInt) <= maxUlps; - } else { - // number have opposite signs, take care of overflow - final long deltaPlus; - final long deltaMinus; - if (xInt < yInt) { - deltaPlus = yInt - POSITIVE_ZERO_DOUBLE_BITS; - deltaMinus = xInt - NEGATIVE_ZERO_DOUBLE_BITS; - } else { - deltaPlus = xInt - POSITIVE_ZERO_DOUBLE_BITS; - deltaMinus = yInt - NEGATIVE_ZERO_DOUBLE_BITS; - } - - if (deltaPlus > maxUlps) { - isEqual = false; - } else { - isEqual = deltaMinus <= (maxUlps - deltaPlus); - } - - } - - return isEqual && !Double.isNaN(x) && !Double.isNaN(y); - - } - - /** - * Returns true if both arguments are NaN or if they are equal as defined - * by {@link #equals(double,double,int) equals(x, y, maxUlps)}. - * - * @param x first value - * @param y second value - * @param maxUlps {@code (maxUlps - 1)} is the number of floating point - * values between {@code x} and {@code y}. - * @return {@code true} if both arguments are NaN or if there are less than - * {@code maxUlps} floating point values between {@code x} and {@code y}. - * @since 2.2 - */ - public static boolean equalsIncludingNaN(double x, double y, int maxUlps) { - return (x != x || y != y) ? !(x != x ^ y != y) : equals(x, y, maxUlps); - } - - /** - * Rounds the given value to the specified number of decimal places. - * The value is rounded using the {@link BigDecimal#ROUND_HALF_UP} method. - * - * @param x Value to round. - * @param scale Number of digits to the right of the decimal point. - * @return the rounded value. - * @since 1.1 (previously in {@code MathUtils}, moved as of version 3.0) - */ - public static double round(double x, int scale) { - return round(x, scale, BigDecimal.ROUND_HALF_UP); - } - - /** - * Rounds the given value to the specified number of decimal places. - * The value is rounded using the given method which is any method defined - * in {@link BigDecimal}. - * If {@code x} is infinite or {@code NaN}, then the value of {@code x} is - * returned unchanged, regardless of the other parameters. - * - * @param x Value to round. - * @param scale Number of digits to the right of the decimal point. - * @param roundingMethod Rounding method as defined in {@link BigDecimal}. - * @return the rounded value. - * @throws ArithmeticException if {@code roundingMethod == ROUND_UNNECESSARY} - * and the specified scaling operation would require rounding. - * @throws IllegalArgumentException if {@code roundingMethod} does not - * represent a valid rounding mode. - * @since 1.1 (previously in {@code MathUtils}, moved as of version 3.0) - */ - public static double round(double x, int scale, int roundingMethod) { - try { - final double rounded = (new BigDecimal(Double.toString(x)) - .setScale(scale, roundingMethod)) - .doubleValue(); - // MATH-1089: negative values rounded to zero should result in negative zero - return rounded == POSITIVE_ZERO ? POSITIVE_ZERO * x : rounded; - } catch (NumberFormatException ex) { - if (Double.isInfinite(x)) { - return x; - } else { - return Double.NaN; - } - } - } - - /** - * Rounds the given value to the specified number of decimal places. - * The value is rounded using the {@link BigDecimal#ROUND_HALF_UP} method. - * - * @param x Value to round. - * @param scale Number of digits to the right of the decimal point. - * @return the rounded value. - * @since 1.1 (previously in {@code MathUtils}, moved as of version 3.0) - */ - public static float round(float x, int scale) { - return round(x, scale, BigDecimal.ROUND_HALF_UP); - } - - /** - * Rounds the given value to the specified number of decimal places. - * The value is rounded using the given method which is any method defined - * in {@link BigDecimal}. - * - * @param x Value to round. - * @param scale Number of digits to the right of the decimal point. - * @param roundingMethod Rounding method as defined in {@link BigDecimal}. - * @return the rounded value. - * @since 1.1 (previously in {@code MathUtils}, moved as of version 3.0) - * @throws MathArithmeticException if an exact operation is required but result is not exact - * @throws MathIllegalArgumentException if {@code roundingMethod} is not a valid rounding method. - */ - public static float round(float x, int scale, int roundingMethod) - throws MathArithmeticException, MathIllegalArgumentException { - final float sign = FastMath.copySign(1f, x); - final float factor = (float) FastMath.pow(10.0f, scale) * sign; - return (float) roundUnscaled(x * factor, sign, roundingMethod) / factor; - } - - /** - * Rounds the given non-negative value to the "nearest" integer. Nearest is - * determined by the rounding method specified. Rounding methods are defined - * in {@link BigDecimal}. - * - * @param unscaled Value to round. - * @param sign Sign of the original, scaled value. - * @param roundingMethod Rounding method, as defined in {@link BigDecimal}. - * @return the rounded value. - * @throws MathArithmeticException if an exact operation is required but result is not exact - * @throws MathIllegalArgumentException if {@code roundingMethod} is not a valid rounding method. - * @since 1.1 (previously in {@code MathUtils}, moved as of version 3.0) - */ - private static double roundUnscaled(double unscaled, - double sign, - int roundingMethod) - throws MathArithmeticException, MathIllegalArgumentException { - switch (roundingMethod) { - case BigDecimal.ROUND_CEILING : - if (sign == -1) { - unscaled = FastMath.floor(FastMath.nextAfter(unscaled, Double.NEGATIVE_INFINITY)); - } else { - unscaled = FastMath.ceil(FastMath.nextAfter(unscaled, Double.POSITIVE_INFINITY)); - } - break; - case BigDecimal.ROUND_DOWN : - unscaled = FastMath.floor(FastMath.nextAfter(unscaled, Double.NEGATIVE_INFINITY)); - break; - case BigDecimal.ROUND_FLOOR : - if (sign == -1) { - unscaled = FastMath.ceil(FastMath.nextAfter(unscaled, Double.POSITIVE_INFINITY)); - } else { - unscaled = FastMath.floor(FastMath.nextAfter(unscaled, Double.NEGATIVE_INFINITY)); - } - break; - case BigDecimal.ROUND_HALF_DOWN : { - unscaled = FastMath.nextAfter(unscaled, Double.NEGATIVE_INFINITY); - double fraction = unscaled - FastMath.floor(unscaled); - if (fraction > 0.5) { - unscaled = FastMath.ceil(unscaled); - } else { - unscaled = FastMath.floor(unscaled); - } - break; - } - case BigDecimal.ROUND_HALF_EVEN : { - double fraction = unscaled - FastMath.floor(unscaled); - if (fraction > 0.5) { - unscaled = FastMath.ceil(unscaled); - } else if (fraction < 0.5) { - unscaled = FastMath.floor(unscaled); - } else { - // The following equality test is intentional and needed for rounding purposes - if (FastMath.floor(unscaled) / 2.0 == FastMath.floor(FastMath.floor(unscaled) / 2.0)) { // even - unscaled = FastMath.floor(unscaled); - } else { // odd - unscaled = FastMath.ceil(unscaled); - } - } - break; - } - case BigDecimal.ROUND_HALF_UP : { - unscaled = FastMath.nextAfter(unscaled, Double.POSITIVE_INFINITY); - double fraction = unscaled - FastMath.floor(unscaled); - if (fraction >= 0.5) { - unscaled = FastMath.ceil(unscaled); - } else { - unscaled = FastMath.floor(unscaled); - } - break; - } - case BigDecimal.ROUND_UNNECESSARY : - if (unscaled != FastMath.floor(unscaled)) { - throw new MathArithmeticException(); - } - break; - case BigDecimal.ROUND_UP : - // do not round if the discarded fraction is equal to zero - if (unscaled != FastMath.floor(unscaled)) { - unscaled = FastMath.ceil(FastMath.nextAfter(unscaled, Double.POSITIVE_INFINITY)); - } - break; - default : - throw new MathIllegalArgumentException(LocalizedFormats.INVALID_ROUNDING_METHOD, - roundingMethod, - "ROUND_CEILING", BigDecimal.ROUND_CEILING, - "ROUND_DOWN", BigDecimal.ROUND_DOWN, - "ROUND_FLOOR", BigDecimal.ROUND_FLOOR, - "ROUND_HALF_DOWN", BigDecimal.ROUND_HALF_DOWN, - "ROUND_HALF_EVEN", BigDecimal.ROUND_HALF_EVEN, - "ROUND_HALF_UP", BigDecimal.ROUND_HALF_UP, - "ROUND_UNNECESSARY", BigDecimal.ROUND_UNNECESSARY, - "ROUND_UP", BigDecimal.ROUND_UP); - } - return unscaled; - } - - - /** - * Computes a number {@code delta} close to {@code originalDelta} with - * the property that <pre><code> - * x + delta - x - * </code></pre> - * is exactly machine-representable. - * This is useful when computing numerical derivatives, in order to reduce - * roundoff errors. - * - * @param x Value. - * @param originalDelta Offset value. - * @return a number {@code delta} so that {@code x + delta} and {@code x} - * differ by a representable floating number. - */ - public static double representableDelta(double x, - double originalDelta) { - return x + originalDelta - x; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/ResizableDoubleArray.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/ResizableDoubleArray.java deleted file mode 100644 index e2cb6f4c2567..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/apachecommons/math/util/ResizableDoubleArray.java +++ /dev/null @@ -1,1214 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ -package com.azure.cosmos.implementation.apachecommons.math.util; - -import java.io.Serializable; -import java.util.Arrays; - -import com.azure.cosmos.implementation.apachecommons.math.exception.MathIllegalArgumentException; -import com.azure.cosmos.implementation.apachecommons.math.exception.MathIllegalStateException; -import com.azure.cosmos.implementation.apachecommons.math.exception.MathInternalError; -import com.azure.cosmos.implementation.apachecommons.math.exception.NullArgumentException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NotStrictlyPositiveException; -import com.azure.cosmos.implementation.apachecommons.math.exception.NumberIsTooSmallException; -import com.azure.cosmos.implementation.apachecommons.math.exception.util.LocalizedFormats; - -/** - * <p> - * A variable length {@link DoubleArray} implementation that automatically - * handles expanding and contracting its internal storage array as elements - * are added and removed. - * </p> - * <h3>Important note: Usage should not assume that this class is thread-safe - * even though some of the methods are {@code synchronized}. - * This qualifier will be dropped in the next major release (4.0).</h3> - * <p> - * The internal storage array starts with capacity determined by the - * {@code initialCapacity} property, which can be set by the constructor. - * The default initial capacity is 16. Adding elements using - * {@link #addElement(double)} appends elements to the end of the array. - * When there are no open entries at the end of the internal storage array, - * the array is expanded. The size of the expanded array depends on the - * {@code expansionMode} and {@code expansionFactor} properties. - * The {@code expansionMode} determines whether the size of the array is - * multiplied by the {@code expansionFactor} - * ({@link ExpansionMode#MULTIPLICATIVE}) or if the expansion is additive - * ({@link ExpansionMode#ADDITIVE} -- {@code expansionFactor} storage - * locations added). - * The default {@code expansionMode} is {@code MULTIPLICATIVE} and the default - * {@code expansionFactor} is 2. - * </p> - * <p> - * The {@link #addElementRolling(double)} method adds a new element to the end - * of the internal storage array and adjusts the "usable window" of the - * internal array forward by one position (effectively making what was the - * second element the first, and so on). Repeated activations of this method - * (or activation of {@link #discardFrontElements(int)}) will effectively orphan - * the storage locations at the beginning of the internal storage array. To - * reclaim this storage, each time one of these methods is activated, the size - * of the internal storage array is compared to the number of addressable - * elements (the {@code numElements} property) and if the difference - * is too large, the internal array is contracted to size - * {@code numElements + 1}. The determination of when the internal - * storage array is "too large" depends on the {@code expansionMode} and - * {@code contractionFactor} properties. If the {@code expansionMode} - * is {@code MULTIPLICATIVE}, contraction is triggered when the - * ratio between storage array length and {@code numElements} exceeds - * {@code contractionFactor.} If the {@code expansionMode} - * is {@code ADDITIVE}, the number of excess storage locations - * is compared to {@code contractionFactor}. - * </p> - * <p> - * To avoid cycles of expansions and contractions, the - * {@code expansionFactor} must not exceed the {@code contractionFactor}. - * Constructors and mutators for both of these properties enforce this - * requirement, throwing a {@code MathIllegalArgumentException} if it is - * violated. - * </p> - */ -public class ResizableDoubleArray implements DoubleArray, Serializable { - /** Additive expansion mode. - * @deprecated As of 3.1. Please use {@link ExpansionMode#ADDITIVE} instead. - */ - @Deprecated - public static final int ADDITIVE_MODE = 1; - /** Multiplicative expansion mode. - * @deprecated As of 3.1. Please use {@link ExpansionMode#MULTIPLICATIVE} instead. - */ - @Deprecated - public static final int MULTIPLICATIVE_MODE = 0; - /** Serializable version identifier. */ - private static final long serialVersionUID = -3485529955529426875L; - - /** Default value for initial capacity. */ - private static final int DEFAULT_INITIAL_CAPACITY = 16; - /** Default value for array size modifier. */ - private static final double DEFAULT_EXPANSION_FACTOR = 2.0; - /** - * Default value for the difference between {@link #contractionCriterion} - * and {@link #expansionFactor}. - */ - private static final double DEFAULT_CONTRACTION_DELTA = 0.5; - - /** - * The contraction criteria determines when the internal array will be - * contracted to fit the number of elements contained in the element - * array + 1. - */ - private double contractionCriterion = 2.5; - - /** - * The expansion factor of the array. When the array needs to be expanded, - * the new array size will be - * {@code internalArray.length * expansionFactor} - * if {@code expansionMode} is set to MULTIPLICATIVE_MODE, or - * {@code internalArray.length + expansionFactor} if - * {@code expansionMode} is set to ADDITIVE_MODE. - */ - private double expansionFactor = 2.0; - - /** - * Determines whether array expansion by {@code expansionFactor} - * is additive or multiplicative. - */ - private ExpansionMode expansionMode = ExpansionMode.MULTIPLICATIVE; - - /** - * The internal storage array. - */ - private double[] internalArray; - - /** - * The number of addressable elements in the array. Note that this - * has nothing to do with the length of the internal storage array. - */ - private int numElements = 0; - - /** - * The position of the first addressable element in the internal storage - * array. The addressable elements in the array are - * {@code internalArray[startIndex],...,internalArray[startIndex + numElements - 1]}. - */ - private int startIndex = 0; - - /** - * Specification of expansion algorithm. - * @since 3.1 - */ - public enum ExpansionMode { - /** Multiplicative expansion mode. */ - MULTIPLICATIVE, - /** Additive expansion mode. */ - ADDITIVE - } - - /** - * Creates an instance with default properties. - * <ul> - * <li>{@code initialCapacity = 16}</li> - * <li>{@code expansionMode = MULTIPLICATIVE}</li> - * <li>{@code expansionFactor = 2.0}</li> - * <li>{@code contractionCriterion = 2.5}</li> - * </ul> - */ - public ResizableDoubleArray() { - this(DEFAULT_INITIAL_CAPACITY); - } - - /** - * Creates an instance with the specified initial capacity. - * Other properties take default values: - * <ul> - * <li>{@code expansionMode = MULTIPLICATIVE}</li> - * <li>{@code expansionFactor = 2.0}</li> - * <li>{@code contractionCriterion = 2.5}</li> - * </ul> - * @param initialCapacity Initial size of the internal storage array. - * @throws MathIllegalArgumentException if {@code initialCapacity <= 0}. - */ - public ResizableDoubleArray(int initialCapacity) - throws MathIllegalArgumentException { - this(initialCapacity, DEFAULT_EXPANSION_FACTOR); - } - - /** - * Creates an instance from an existing {@code double[]} with the - * initial capacity and numElements corresponding to the size of - * the supplied {@code double[]} array. - * If the supplied array is null, a new empty array with the default - * initial capacity will be created. - * The input array is copied, not referenced. - * Other properties take default values: - * <ul> - * <li>{@code initialCapacity = 16}</li> - * <li>{@code expansionMode = MULTIPLICATIVE}</li> - * <li>{@code expansionFactor = 2.0}</li> - * <li>{@code contractionCriterion = 2.5}</li> - * </ul> - * - * @param initialArray initial array - * @since 2.2 - */ - public ResizableDoubleArray(double[] initialArray) { - this(DEFAULT_INITIAL_CAPACITY, - DEFAULT_EXPANSION_FACTOR, - DEFAULT_CONTRACTION_DELTA + DEFAULT_EXPANSION_FACTOR, - ExpansionMode.MULTIPLICATIVE, - initialArray); - } - - /** - * Creates an instance with the specified initial capacity - * and expansion factor. - * The remaining properties take default values: - * <ul> - * <li>{@code expansionMode = MULTIPLICATIVE}</li> - * <li>{@code contractionCriterion = 0.5 + expansionFactor}</li> - * </ul> - * <br/> - * Throws IllegalArgumentException if the following conditions are - * not met: - * <ul> - * <li>{@code initialCapacity > 0}</li> - * <li>{@code expansionFactor > 1}</li> - * </ul> - * - * @param initialCapacity Initial size of the internal storage array. - * @param expansionFactor The array will be expanded based on this - * parameter. - * @throws MathIllegalArgumentException if parameters are not valid. - * @deprecated As of 3.1. Please use - * {@link #ResizableDoubleArray(int,double)} instead. - */ - @Deprecated - public ResizableDoubleArray(int initialCapacity, - float expansionFactor) - throws MathIllegalArgumentException { - this(initialCapacity, - (double) expansionFactor); - } - - /** - * Creates an instance with the specified initial capacity - * and expansion factor. - * The remaining properties take default values: - * <ul> - * <li>{@code expansionMode = MULTIPLICATIVE}</li> - * <li>{@code contractionCriterion = 0.5 + expansionFactor}</li> - * </ul> - * <br/> - * Throws IllegalArgumentException if the following conditions are - * not met: - * <ul> - * <li>{@code initialCapacity > 0}</li> - * <li>{@code expansionFactor > 1}</li> - * </ul> - * - * @param initialCapacity Initial size of the internal storage array. - * @param expansionFactor The array will be expanded based on this - * parameter. - * @throws MathIllegalArgumentException if parameters are not valid. - * @since 3.1 - */ - public ResizableDoubleArray(int initialCapacity, - double expansionFactor) - throws MathIllegalArgumentException { - this(initialCapacity, - expansionFactor, - DEFAULT_CONTRACTION_DELTA + expansionFactor); - } - - /** - * Creates an instance with the specified initialCapacity, - * expansionFactor, and contractionCriterion. - * The expansion mode will default to {@code MULTIPLICATIVE}. - * <br/> - * Throws IllegalArgumentException if the following conditions are - * not met: - * <ul> - * <li>{@code initialCapacity > 0}</li> - * <li>{@code expansionFactor > 1}</li> - * <li>{@code contractionCriterion >= expansionFactor}</li> - * </ul> - * - * @param initialCapacity Initial size of the internal storage array.. - * @param expansionFactor The array will be expanded based on this - * parameter. - * @param contractionCriteria Contraction criteria. - * @throws MathIllegalArgumentException if parameters are not valid. - * @deprecated As of 3.1. Please use - * {@link #ResizableDoubleArray(int,double,double)} instead. - */ - @Deprecated - public ResizableDoubleArray(int initialCapacity, - float expansionFactor, - float contractionCriteria) - throws MathIllegalArgumentException { - this(initialCapacity, - (double) expansionFactor, - (double) contractionCriteria); - } - - /** - * Creates an instance with the specified initial capacity, - * expansion factor, and contraction criteria. - * The expansion mode will default to {@code MULTIPLICATIVE}. - * <br/> - * Throws IllegalArgumentException if the following conditions are - * not met: - * <ul> - * <li>{@code initialCapacity > 0}</li> - * <li>{@code expansionFactor > 1}</li> - * <li>{@code contractionCriterion >= expansionFactor}</li> - * </ul> - * - * @param initialCapacity Initial size of the internal storage array.. - * @param expansionFactor The array will be expanded based on this - * parameter. - * @param contractionCriterion Contraction criterion. - * @throws MathIllegalArgumentException if the parameters are not valid. - * @since 3.1 - */ - public ResizableDoubleArray(int initialCapacity, - double expansionFactor, - double contractionCriterion) - throws MathIllegalArgumentException { - this(initialCapacity, - expansionFactor, - contractionCriterion, - ExpansionMode.MULTIPLICATIVE, - null); - } - - /** - * <p> - * Create a ResizableArray with the specified properties.</p> - * <p> - * Throws IllegalArgumentException if the following conditions are - * not met: - * <ul> - * <li><code>initialCapacity > 0</code></li> - * <li><code>expansionFactor > 1</code></li> - * <li><code>contractionFactor >= expansionFactor</code></li> - * <li><code>expansionMode in {MULTIPLICATIVE_MODE, ADDITIVE_MODE}</code> - * </li> - * </ul></p> - * - * @param initialCapacity the initial size of the internal storage array - * @param expansionFactor the array will be expanded based on this - * parameter - * @param contractionCriteria the contraction Criteria - * @param expansionMode the expansion mode - * @throws MathIllegalArgumentException if parameters are not valid - * @deprecated As of 3.1. Please use - * {@link #ResizableDoubleArray(int,double,double,ExpansionMode,double[])} - * instead. - */ - @Deprecated - public ResizableDoubleArray(int initialCapacity, float expansionFactor, - float contractionCriteria, int expansionMode) throws MathIllegalArgumentException { - this(initialCapacity, - expansionFactor, - contractionCriteria, - expansionMode == ADDITIVE_MODE ? - ExpansionMode.ADDITIVE : - ExpansionMode.MULTIPLICATIVE, - null); - // XXX Just ot retain the expected failure in a unit test. - // With the new "enum", that test will become obsolete. - setExpansionMode(expansionMode); - } - - /** - * Creates an instance with the specified properties. - * <br/> - * Throws MathIllegalArgumentException if the following conditions are - * not met: - * <ul> - * <li>{@code initialCapacity > 0}</li> - * <li>{@code expansionFactor > 1}</li> - * <li>{@code contractionCriterion >= expansionFactor}</li> - * </ul> - * - * @param initialCapacity Initial size of the internal storage array. - * @param expansionFactor The array will be expanded based on this - * parameter. - * @param contractionCriterion Contraction criteria. - * @param expansionMode Expansion mode. - * @param data Initial contents of the array. - * @throws MathIllegalArgumentException if the parameters are not valid. - */ - public ResizableDoubleArray(int initialCapacity, - double expansionFactor, - double contractionCriterion, - ExpansionMode expansionMode, - double ... data) - throws MathIllegalArgumentException { - if (initialCapacity <= 0) { - throw new NotStrictlyPositiveException(LocalizedFormats.INITIAL_CAPACITY_NOT_POSITIVE, - initialCapacity); - } - checkContractExpand(contractionCriterion, expansionFactor); - - this.expansionFactor = expansionFactor; - this.contractionCriterion = contractionCriterion; - this.expansionMode = expansionMode; - internalArray = new double[initialCapacity]; - numElements = 0; - startIndex = 0; - - if (data != null && data.length > 0) { - addElements(data); - } - } - - /** - * Copy constructor. Creates a new ResizableDoubleArray that is a deep, - * fresh copy of the original. Needs to acquire synchronization lock - * on original. Original may not be null; otherwise a {@link NullArgumentException} - * is thrown. - * - * @param original array to copy - * @exception NullArgumentException if original is null - * @since 2.0 - */ - public ResizableDoubleArray(ResizableDoubleArray original) - throws NullArgumentException { - MathUtils.checkNotNull(original); - copy(original, this); - } - - /** - * Adds an element to the end of this expandable array. - * - * @param value Value to be added to end of array. - */ - public synchronized void addElement(double value) { - if (internalArray.length <= startIndex + numElements) { - expand(); - } - internalArray[startIndex + numElements++] = value; - } - - /** - * Adds several element to the end of this expandable array. - * - * @param values Values to be added to end of array. - * @since 2.2 - */ - public synchronized void addElements(double[] values) { - final double[] tempArray = new double[numElements + values.length + 1]; - System.arraycopy(internalArray, startIndex, tempArray, 0, numElements); - System.arraycopy(values, 0, tempArray, numElements, values.length); - internalArray = tempArray; - startIndex = 0; - numElements += values.length; - } - - /** - * <p> - * Adds an element to the end of the array and removes the first - * element in the array. Returns the discarded first element. - * The effect is similar to a push operation in a FIFO queue. - * </p> - * <p> - * Example: If the array contains the elements 1, 2, 3, 4 (in that order) - * and addElementRolling(5) is invoked, the result is an array containing - * the entries 2, 3, 4, 5 and the value returned is 1. - * </p> - * - * @param value Value to be added to the array. - * @return the value which has been discarded or "pushed" out of the array - * by this rolling insert. - */ - public synchronized double addElementRolling(double value) { - double discarded = internalArray[startIndex]; - - if ((startIndex + (numElements + 1)) > internalArray.length) { - expand(); - } - // Increment the start index - startIndex += 1; - - // Add the new value - internalArray[startIndex + (numElements - 1)] = value; - - // Check the contraction criterion. - if (shouldContract()) { - contract(); - } - return discarded; - } - - /** - * Substitutes <code>value</code> for the most recently added value. - * Returns the value that has been replaced. If the array is empty (i.e. - * if {@link #numElements} is zero), an IllegalStateException is thrown. - * - * @param value New value to substitute for the most recently added value - * @return the value that has been replaced in the array. - * @throws MathIllegalStateException if the array is empty - * @since 2.0 - */ - public synchronized double substituteMostRecentElement(double value) - throws MathIllegalStateException { - if (numElements < 1) { - throw new MathIllegalStateException( - LocalizedFormats.CANNOT_SUBSTITUTE_ELEMENT_FROM_EMPTY_ARRAY); - } - - final int substIndex = startIndex + (numElements - 1); - final double discarded = internalArray[substIndex]; - - internalArray[substIndex] = value; - - return discarded; - } - - /** - * Checks the expansion factor and the contraction criterion and throws an - * IllegalArgumentException if the contractionCriteria is less than the - * expansionCriteria - * - * @param expansion factor to be checked - * @param contraction criteria to be checked - * @throws MathIllegalArgumentException if the contractionCriteria is less than - * the expansionCriteria. - * @deprecated As of 3.1. Please use - * {@link #checkContractExpand(double,double)} instead. - */ - @Deprecated - protected void checkContractExpand(float contraction, float expansion) - throws MathIllegalArgumentException { - checkContractExpand((double) contraction, - (double) expansion); - } - - /** - * Checks the expansion factor and the contraction criterion and raises - * an exception if the contraction criterion is smaller than the - * expansion criterion. - * - * @param contraction Criterion to be checked. - * @param expansion Factor to be checked. - * @throws NumberIsTooSmallException if {@code contraction < expansion}. - * @throws NumberIsTooSmallException if {@code contraction <= 1}. - * @throws NumberIsTooSmallException if {@code expansion <= 1 }. - * @since 3.1 - */ - protected void checkContractExpand(double contraction, - double expansion) - throws NumberIsTooSmallException { - if (contraction < expansion) { - final NumberIsTooSmallException e = new NumberIsTooSmallException(contraction, 1, true); - e.getContext().addMessage(LocalizedFormats.CONTRACTION_CRITERIA_SMALLER_THAN_EXPANSION_FACTOR, - contraction, expansion); - throw e; - } - - if (contraction <= 1) { - final NumberIsTooSmallException e = new NumberIsTooSmallException(contraction, 1, false); - e.getContext().addMessage(LocalizedFormats.CONTRACTION_CRITERIA_SMALLER_THAN_ONE, - contraction); - throw e; - } - - if (expansion <= 1) { - final NumberIsTooSmallException e = new NumberIsTooSmallException(contraction, 1, false); - e.getContext().addMessage(LocalizedFormats.EXPANSION_FACTOR_SMALLER_THAN_ONE, - expansion); - throw e; - } - } - - /** - * Clear the array contents, resetting the number of elements to zero. - */ - public synchronized void clear() { - numElements = 0; - startIndex = 0; - } - - /** - * Contracts the storage array to the (size of the element set) + 1 - to - * avoid a zero length array. This function also resets the startIndex to - * zero. - */ - public synchronized void contract() { - final double[] tempArray = new double[numElements + 1]; - - // Copy and swap - copy only the element array from the src array. - System.arraycopy(internalArray, startIndex, tempArray, 0, numElements); - internalArray = tempArray; - - // Reset the start index to zero - startIndex = 0; - } - - /** - * Discards the <code>i</code> initial elements of the array. For example, - * if the array contains the elements 1,2,3,4, invoking - * <code>discardFrontElements(2)</code> will cause the first two elements - * to be discarded, leaving 3,4 in the array. Throws illegalArgumentException - * if i exceeds numElements. - * - * @param i the number of elements to discard from the front of the array - * @throws MathIllegalArgumentException if i is greater than numElements. - * @since 2.0 - */ - public synchronized void discardFrontElements(int i) - throws MathIllegalArgumentException { - discardExtremeElements(i,true); - } - - /** - * Discards the <code>i</code> last elements of the array. For example, - * if the array contains the elements 1,2,3,4, invoking - * <code>discardMostRecentElements(2)</code> will cause the last two elements - * to be discarded, leaving 1,2 in the array. Throws illegalArgumentException - * if i exceeds numElements. - * - * @param i the number of elements to discard from the end of the array - * @throws MathIllegalArgumentException if i is greater than numElements. - * @since 2.0 - */ - public synchronized void discardMostRecentElements(int i) - throws MathIllegalArgumentException { - discardExtremeElements(i,false); - } - - /** - * Discards the <code>i</code> first or last elements of the array, - * depending on the value of <code>front</code>. - * For example, if the array contains the elements 1,2,3,4, invoking - * <code>discardExtremeElements(2,false)</code> will cause the last two elements - * to be discarded, leaving 1,2 in the array. - * For example, if the array contains the elements 1,2,3,4, invoking - * <code>discardExtremeElements(2,true)</code> will cause the first two elements - * to be discarded, leaving 3,4 in the array. - * Throws illegalArgumentException - * if i exceeds numElements. - * - * @param i the number of elements to discard from the front/end of the array - * @param front true if elements are to be discarded from the front - * of the array, false if elements are to be discarded from the end - * of the array - * @throws MathIllegalArgumentException if i is greater than numElements. - * @since 2.0 - */ - private synchronized void discardExtremeElements(int i, - boolean front) - throws MathIllegalArgumentException { - if (i > numElements) { - throw new MathIllegalArgumentException( - LocalizedFormats.TOO_MANY_ELEMENTS_TO_DISCARD_FROM_ARRAY, - i, numElements); - } else if (i < 0) { - throw new MathIllegalArgumentException( - LocalizedFormats.CANNOT_DISCARD_NEGATIVE_NUMBER_OF_ELEMENTS, - i); - } else { - // "Subtract" this number of discarded from numElements - numElements -= i; - if (front) { - startIndex += i; - } - } - if (shouldContract()) { - contract(); - } - } - - /** - * Expands the internal storage array using the expansion factor. - * <p> - * if <code>expansionMode</code> is set to MULTIPLICATIVE_MODE, - * the new array size will be <code>internalArray.length * expansionFactor.</code> - * If <code>expansionMode</code> is set to ADDITIVE_MODE, the length - * after expansion will be <code>internalArray.length + expansionFactor</code> - * </p> - */ - protected synchronized void expand() { - // notice the use of FastMath.ceil(), this guarantees that we will always - // have an array of at least currentSize + 1. Assume that the - // current initial capacity is 1 and the expansion factor - // is 1.000000000000000001. The newly calculated size will be - // rounded up to 2 after the multiplication is performed. - int newSize = 0; - if (expansionMode == ExpansionMode.MULTIPLICATIVE) { - newSize = (int) FastMath.ceil(internalArray.length * expansionFactor); - } else { - newSize = (int) (internalArray.length + FastMath.round(expansionFactor)); - } - final double[] tempArray = new double[newSize]; - - // Copy and swap - System.arraycopy(internalArray, 0, tempArray, 0, internalArray.length); - internalArray = tempArray; - } - - /** - * Expands the internal storage array to the specified size. - * - * @param size Size of the new internal storage array. - */ - private synchronized void expandTo(int size) { - final double[] tempArray = new double[size]; - // Copy and swap - System.arraycopy(internalArray, 0, tempArray, 0, internalArray.length); - internalArray = tempArray; - } - - /** - * The contraction criteria defines when the internal array will contract - * to store only the number of elements in the element array. - * If the <code>expansionMode</code> is <code>MULTIPLICATIVE_MODE</code>, - * contraction is triggered when the ratio between storage array length - * and <code>numElements</code> exceeds <code>contractionFactor</code>. - * If the <code>expansionMode</code> is <code>ADDITIVE_MODE</code>, the - * number of excess storage locations is compared to - * <code>contractionFactor.</code> - * - * @return the contraction criteria used to reclaim memory. - * @deprecated As of 3.1. Please use {@link #getContractionCriterion()} - * instead. - */ - @Deprecated - public float getContractionCriteria() { - return (float) getContractionCriterion(); - } - - /** - * The contraction criterion defines when the internal array will contract - * to store only the number of elements in the element array. - * If the <code>expansionMode</code> is <code>MULTIPLICATIVE_MODE</code>, - * contraction is triggered when the ratio between storage array length - * and <code>numElements</code> exceeds <code>contractionFactor</code>. - * If the <code>expansionMode</code> is <code>ADDITIVE_MODE</code>, the - * number of excess storage locations is compared to - * <code>contractionFactor.</code> - * - * @return the contraction criterion used to reclaim memory. - * @since 3.1 - */ - public double getContractionCriterion() { - return contractionCriterion; - } - - /** - * Returns the element at the specified index - * - * @param index index to fetch a value from - * @return value stored at the specified index - * @throws ArrayIndexOutOfBoundsException if <code>index</code> is less than - * zero or is greater than <code>getNumElements() - 1</code>. - */ - public synchronized double getElement(int index) { - if (index >= numElements) { - throw new ArrayIndexOutOfBoundsException(index); - } else if (index >= 0) { - return internalArray[startIndex + index]; - } else { - throw new ArrayIndexOutOfBoundsException(index); - } - } - - /** - * Returns a double array containing the elements of this - * <code>ResizableArray</code>. This method returns a copy, not a - * reference to the underlying array, so that changes made to the returned - * array have no effect on this <code>ResizableArray.</code> - * @return the double array. - */ - public synchronized double[] getElements() { - final double[] elementArray = new double[numElements]; - System.arraycopy(internalArray, startIndex, elementArray, 0, numElements); - return elementArray; - } - - /** - * The expansion factor controls the size of a new array when an array - * needs to be expanded. The <code>expansionMode</code> - * determines whether the size of the array is multiplied by the - * <code>expansionFactor</code> (MULTIPLICATIVE_MODE) or if - * the expansion is additive (ADDITIVE_MODE -- <code>expansionFactor</code> - * storage locations added). The default <code>expansionMode</code> is - * MULTIPLICATIVE_MODE and the default <code>expansionFactor</code> - * is 2.0. - * - * @return the expansion factor of this expandable double array - * @deprecated As of 3.1. Return type will be changed to "double" in 4.0. - */ - @Deprecated - public float getExpansionFactor() { - return (float) expansionFactor; - } - - /** - * The expansion mode determines whether the internal storage - * array grows additively or multiplicatively when it is expanded. - * - * @return the expansion mode. - * @deprecated As of 3.1. Return value to be changed to - * {@link ExpansionMode} in 4.0. - */ - @Deprecated - public int getExpansionMode() { - synchronized (this) { - switch (expansionMode) { - case MULTIPLICATIVE: - return MULTIPLICATIVE_MODE; - case ADDITIVE: - return ADDITIVE_MODE; - default: - throw new MathInternalError(); // Should never happen. - } - } - } - - /** - * Notice the package scope on this method. This method is simply here - * for the JUnit test, it allows us check if the expansion is working - * properly after a number of expansions. This is not meant to be a part - * of the public interface of this class. - * - * @return the length of the internal storage array. - * @deprecated As of 3.1. Please use {@link #getCapacity()} instead. - */ - @Deprecated - synchronized int getInternalLength() { - return internalArray.length; - } - - /** - * Gets the currently allocated size of the internal data structure used - * for storing elements. - * This is not to be confused with {@link #getNumElements() the number of - * elements actually stored}. - * - * @return the length of the internal array. - * @since 3.1 - */ - public int getCapacity() { - return internalArray.length; - } - - /** - * Returns the number of elements currently in the array. Please note - * that this is different from the length of the internal storage array. - * - * @return the number of elements. - */ - public synchronized int getNumElements() { - return numElements; - } - - /** - * Returns the internal storage array. Note that this method returns - * a reference to the internal storage array, not a copy, and to correctly - * address elements of the array, the <code>startIndex</code> is - * required (available via the {@link #start} method). This method should - * only be used in cases where copying the internal array is not practical. - * The {@link #getElements} method should be used in all other cases. - * - * - * @return the internal storage array used by this object - * @since 2.0 - * @deprecated As of 3.1. - */ - @Deprecated - public synchronized double[] getInternalValues() { - return internalArray; - } - - /** - * Provides <em>direct</em> access to the internal storage array. - * Please note that this method returns a reference to this object's - * storage array, not a copy. - * <br/> - * To correctly address elements of the array, the "start index" is - * required (available via the {@link #getStartIndex() getStartIndex} - * method. - * <br/> - * This method should only be used to avoid copying the internal array. - * The returned value <em>must</em> be used for reading only; other - * uses could lead to this object becoming inconsistent. - * <br/> - * The {@link #getElements} method has no such limitation since it - * returns a copy of this array's addressable elements. - * - * @return the internal storage array used by this object. - * @since 3.1 - */ - protected double[] getArrayRef() { - return internalArray; - } - - /** - * Returns the "start index" of the internal array. - * This index is the position of the first addressable element in the - * internal storage array. - * The addressable elements in the array are at indices contained in - * the interval [{@link #getStartIndex()}, - * {@link #getStartIndex()} + {@link #getNumElements()} - 1]. - * - * @return the start index. - * @since 3.1 - */ - protected int getStartIndex() { - return startIndex; - } - - /** - * Sets the contraction criteria. - * - * @param contractionCriteria contraction criteria - * @throws MathIllegalArgumentException if the contractionCriteria is less than - * the expansionCriteria. - * @deprecated As of 3.1 (to be removed in 4.0 as field will become "final"). - */ - @Deprecated - public void setContractionCriteria(float contractionCriteria) - throws MathIllegalArgumentException { - checkContractExpand(contractionCriteria, getExpansionFactor()); - synchronized(this) { - this.contractionCriterion = contractionCriteria; - } - } - - /** - * Performs an operation on the addressable elements of the array. - * - * @param f Function to be applied on this array. - * @return the result. - * @since 3.1 - */ - public double compute(MathArrays.Function f) { - final double[] array; - final int start; - final int num; - synchronized(this) { - array = internalArray; - start = startIndex; - num = numElements; - } - return f.evaluate(array, start, num); - } - - /** - * Sets the element at the specified index. If the specified index is greater than - * <code>getNumElements() - 1</code>, the <code>numElements</code> property - * is increased to <code>index +1</code> and additional storage is allocated - * (if necessary) for the new element and all (uninitialized) elements - * between the new element and the previous end of the array). - * - * @param index index to store a value in - * @param value value to store at the specified index - * @throws ArrayIndexOutOfBoundsException if {@code index < 0}. - */ - public synchronized void setElement(int index, double value) { - if (index < 0) { - throw new ArrayIndexOutOfBoundsException(index); - } - if (index + 1 > numElements) { - numElements = index + 1; - } - if ((startIndex + index) >= internalArray.length) { - expandTo(startIndex + (index + 1)); - } - internalArray[startIndex + index] = value; - } - - /** - * Sets the expansionFactor. Throws IllegalArgumentException if the - * the following conditions are not met: - * <ul> - * <li><code>expansionFactor > 1</code></li> - * <li><code>contractionFactor >= expansionFactor</code></li> - * </ul> - * @param expansionFactor the new expansion factor value. - * @throws MathIllegalArgumentException if expansionFactor is <= 1 or greater - * than contractionFactor - * @deprecated As of 3.1 (to be removed in 4.0 as field will become "final"). - */ - @Deprecated - public void setExpansionFactor(float expansionFactor) throws MathIllegalArgumentException { - checkContractExpand(getContractionCriterion(), expansionFactor); - // The check above verifies that the expansion factor is > 1.0; - synchronized(this) { - this.expansionFactor = expansionFactor; - } - } - - /** - * Sets the <code>expansionMode</code>. The specified value must be one of - * ADDITIVE_MODE, MULTIPLICATIVE_MODE. - * - * @param expansionMode The expansionMode to set. - * @throws MathIllegalArgumentException if the specified mode value is not valid. - * @deprecated As of 3.1. Please use {@link #setExpansionMode(ExpansionMode)} instead. - */ - @Deprecated - public void setExpansionMode(int expansionMode) - throws MathIllegalArgumentException { - if (expansionMode != MULTIPLICATIVE_MODE && - expansionMode != ADDITIVE_MODE) { - throw new MathIllegalArgumentException(LocalizedFormats.UNSUPPORTED_EXPANSION_MODE, expansionMode, - MULTIPLICATIVE_MODE, "MULTIPLICATIVE_MODE", - ADDITIVE_MODE, "ADDITIVE_MODE"); - } - synchronized(this) { - if (expansionMode == MULTIPLICATIVE_MODE) { - setExpansionMode(ExpansionMode.MULTIPLICATIVE); - } else if (expansionMode == ADDITIVE_MODE) { - setExpansionMode(ExpansionMode.ADDITIVE); - } - } - } - - /** - * Sets the {@link ExpansionMode expansion mode}. - * - * @param expansionMode Expansion mode to use for resizing the array. - * @deprecated As of 3.1 (to be removed in 4.0 as field will become "final"). - */ - @Deprecated - public void setExpansionMode(ExpansionMode expansionMode) { - synchronized(this) { - this.expansionMode = expansionMode; - } - } - - /** - * Sets the initial capacity. Should only be invoked by constructors. - * - * @param initialCapacity of the array - * @throws MathIllegalArgumentException if <code>initialCapacity</code> is not - * positive. - * @deprecated As of 3.1, this is a no-op. - */ - @Deprecated - protected void setInitialCapacity(int initialCapacity) - throws MathIllegalArgumentException { - // Body removed in 3.1. - } - - /** - * This function allows you to control the number of elements contained - * in this array, and can be used to "throw out" the last n values in an - * array. This function will also expand the internal array as needed. - * - * @param i a new number of elements - * @throws MathIllegalArgumentException if <code>i</code> is negative. - */ - public synchronized void setNumElements(int i) - throws MathIllegalArgumentException { - // If index is negative thrown an error. - if (i < 0) { - throw new MathIllegalArgumentException( - LocalizedFormats.INDEX_NOT_POSITIVE, - i); - } - - // Test the new num elements, check to see if the array needs to be - // expanded to accommodate this new number of elements. - final int newSize = startIndex + i; - if (newSize > internalArray.length) { - expandTo(newSize); - } - - // Set the new number of elements to new value. - numElements = i; - } - - /** - * Returns true if the internal storage array has too many unused - * storage positions. - * - * @return true if array satisfies the contraction criteria - */ - private synchronized boolean shouldContract() { - if (expansionMode == ExpansionMode.MULTIPLICATIVE) { - return (internalArray.length / ((float) numElements)) > contractionCriterion; - } else { - return (internalArray.length - numElements) > contractionCriterion; - } - } - - /** - * Returns the starting index of the internal array. The starting index is - * the position of the first addressable element in the internal storage - * array. The addressable elements in the array are <code> - * internalArray[startIndex],...,internalArray[startIndex + numElements -1] - * </code> - * - * @return the starting index. - * @deprecated As of 3.1. - */ - @Deprecated - public synchronized int start() { - return startIndex; - } - - /** - * <p>Copies source to dest, copying the underlying data, so dest is - * a new, independent copy of source. Does not contract before - * the copy.</p> - * - * <p>Obtains synchronization locks on both source and dest - * (in that order) before performing the copy.</p> - * - * <p>Neither source nor dest may be null; otherwise a {@link NullArgumentException} - * is thrown</p> - * - * @param source ResizableDoubleArray to copy - * @param dest ResizableArray to replace with a copy of the source array - * @exception NullArgumentException if either source or dest is null - * @since 2.0 - * - */ - public static void copy(ResizableDoubleArray source, - ResizableDoubleArray dest) - throws NullArgumentException { - MathUtils.checkNotNull(source); - MathUtils.checkNotNull(dest); - synchronized(source) { - synchronized(dest) { - dest.contractionCriterion = source.contractionCriterion; - dest.expansionFactor = source.expansionFactor; - dest.expansionMode = source.expansionMode; - dest.internalArray = new double[source.internalArray.length]; - System.arraycopy(source.internalArray, 0, dest.internalArray, - 0, dest.internalArray.length); - dest.numElements = source.numElements; - dest.startIndex = source.startIndex; - } - } - } - - /** - * Returns a copy of the ResizableDoubleArray. Does not contract before - * the copy, so the returned object is an exact copy of this. - * - * @return a new ResizableDoubleArray with the same data and configuration - * properties as this - * @since 2.0 - */ - public synchronized ResizableDoubleArray copy() { - final ResizableDoubleArray result = new ResizableDoubleArray(); - copy(this, result); - return result; - } - - /** - * Returns true iff object is a ResizableDoubleArray with the same properties - * as this and an identical internal storage array. - * - * @param object object to be compared for equality with this - * @return true iff object is a ResizableDoubleArray with the same data and - * properties as this - * @since 2.0 - */ - @Override - public boolean equals(Object object) { - if (object == this ) { - return true; - } - if (object instanceof ResizableDoubleArray == false) { - return false; - } - synchronized(this) { - synchronized(object) { - boolean result = true; - final ResizableDoubleArray other = (ResizableDoubleArray) object; - result = result && (other.contractionCriterion == contractionCriterion); - result = result && (other.expansionFactor == expansionFactor); - result = result && (other.expansionMode == expansionMode); - result = result && (other.numElements == numElements); - result = result && (other.startIndex == startIndex); - if (!result) { - return false; - } else { - return Arrays.equals(internalArray, other.internalArray); - } - } - } - } - - /** - * Returns a hash code consistent with equals. - * - * @return the hash code representing this {@code ResizableDoubleArray}. - * @since 2.0 - */ - @Override - public synchronized int hashCode() { - final int[] hashData = new int[6]; - hashData[0] = Double.valueOf(expansionFactor).hashCode(); - hashData[1] = Double.valueOf(contractionCriterion).hashCode(); - hashData[2] = expansionMode.hashCode(); - hashData[3] = Arrays.hashCode(internalArray); - hashData[4] = numElements; - hashData[5] = startIndex; - return Arrays.hashCode(hashData); - } - -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClient.java index 22c5ed8624b6..d6f568c9f3d9 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClient.java @@ -69,7 +69,6 @@ import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkArgument; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkState; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; @JsonSerialize(using = RntbdTransportClient.JsonSerializer.class) public class RntbdTransportClient extends TransportClient { @@ -344,7 +343,7 @@ public Mono<StoreResponse> invokeStoreAsync(final Uri addressUri, final RxDocume } error = new GoneException( - lenientFormat("an unexpected %s occurred: %s", unexpectedError), + String.format("an unexpected %s occurred: %s", unexpectedError.getClass(), unexpectedError), address, error instanceof Exception ? (Exception) error : new RuntimeException(error), HttpConstants.SubStatusCodes.TRANSPORT_GENERATED_410); @@ -422,7 +421,7 @@ private static Tag tag(long id) { private void throwIfClosed() { if (this.closed.get()) { - String message = lenientFormat("%s is closed", this); + String message = String.format("%s is closed", this); ClosedClientTransportException transportException = new ClosedClientTransportException(message, null); throw new InternalServerErrorException(message, transportException, HttpConstants.SubStatusCodes.CLOSED_CLIENT); @@ -887,7 +886,7 @@ public String toString() { } public String toDiagnosticsString() { - return lenientFormat("(cto:%s, nrto:%s, icto:%s, ieto:%s, mcpe:%s, mrpc:%s, cer:%s)", + return String.format("(cto:%s, nrto:%s, icto:%s, ieto:%s, mcpe:%s, mrpc:%s, cer:%s)", connectTimeout, tcpNetworkRequestTimeout, idleChannelTimeout, diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/FailFastRntbdRequestRecord.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/FailFastRntbdRequestRecord.java index b7d005a49fb7..0210ec8955a6 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/FailFastRntbdRequestRecord.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/FailFastRntbdRequestRecord.java @@ -6,7 +6,6 @@ import com.azure.cosmos.BridgeInternal; import com.azure.cosmos.implementation.GoneException; import com.azure.cosmos.implementation.HttpConstants; -import com.azure.cosmos.implementation.RequestTimeoutException; import com.azure.cosmos.implementation.http.HttpHeaders; import io.netty.util.Timeout; import io.netty.util.TimerTask; @@ -14,10 +13,6 @@ import org.slf4j.LoggerFactory; import java.net.SocketAddress; -import java.util.UUID; -import java.util.concurrent.atomic.AtomicInteger; - -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; public class FailFastRntbdRequestRecord extends RntbdRequestRecord { private static final Logger logger = LoggerFactory.getLogger(FailFastRntbdRequestRecord.class); @@ -45,7 +40,7 @@ public static FailFastRntbdRequestRecord createAndFailFast( args, concurrentRequestsSnapshot); - final String reason = lenientFormat( + final String reason = String.format( "Failed due to too many (%s) concurrent requests.", concurrentRequestsSnapshot); final HttpHeaders headers = new HttpHeaders(); diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/ProactiveOpenConnectionsProcessor.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/ProactiveOpenConnectionsProcessor.java index 24834837722f..a1740a127c30 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/ProactiveOpenConnectionsProcessor.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/ProactiveOpenConnectionsProcessor.java @@ -9,7 +9,6 @@ import com.azure.cosmos.implementation.OpenConnectionResponse; import com.azure.cosmos.implementation.ShouldRetryResult; import com.azure.cosmos.implementation.directconnectivity.AddressSelector; -import com.azure.cosmos.implementation.directconnectivity.TransportException; import com.azure.cosmos.implementation.directconnectivity.Uri; import com.azure.cosmos.models.CosmosContainerIdentity; import org.slf4j.Logger; @@ -36,8 +35,6 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.stream.Collectors; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; - public final class ProactiveOpenConnectionsProcessor implements Closeable { private static final Logger logger = LoggerFactory.getLogger(ProactiveOpenConnectionsProcessor.class); @@ -109,7 +106,7 @@ private void submitOpenConnectionTaskOutsideLoopInternal(OpenConnectionTask open // and RntbdTransportClient / RntbdEndpointProvider are also closed // this prevents netty executor classes from entering into IllegalStateException if (this.endpointProvider.isClosed() || this.isClosed.get()) { - openConnectionTask.completeExceptionally(new ClosedClientTransportException(lenientFormat("%s is closed", this), null)); + openConnectionTask.completeExceptionally(new ClosedClientTransportException(String.format("%s is closed", this), null)); return; } @@ -159,7 +156,7 @@ public void close() throws IOException { // Fail all pending tasks this.endpointsUnderMonitorMap.forEach((addresses, taskList) -> { for (OpenConnectionTask openConnectionTask : taskList) { - openConnectionTask.completeExceptionally(new ClosedClientTransportException(lenientFormat("%s is closed", this), null)); + openConnectionTask.completeExceptionally(new ClosedClientTransportException(String.format("%s is closed", this), null)); } }); } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelPool.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelPool.java index a302cdd253b4..a8b108f01675 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelPool.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelPool.java @@ -60,7 +60,6 @@ import static com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdReporter.reportIssueUnless; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkState; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; /** * A {@link ChannelPool} implementation that enforces a maximum number of concurrent direct TCP Cosmos connections. @@ -1441,7 +1440,7 @@ private void releaseAndOfferChannel(final Channel channel, final Promise<Void> p this.poolHandler.channelReleased(channel); promise.setSuccess(null); } else { - final ChannelAcquisitionException error = new ChannelAcquisitionException(lenientFormat( + final ChannelAcquisitionException error = new ChannelAcquisitionException(String.format( "cannot offer channel back to pool because the pool is at capacity (%s)\n %s\n %s", this.maxChannels, this, @@ -1520,7 +1519,7 @@ private void releaseChannel(final Channel channel, final Promise<Void> promise) } } } else { - final IllegalStateException error = new IllegalStateException(lenientFormat( + final IllegalStateException error = new IllegalStateException(String.format( "%s cannot be released because it was not acquired by this pool: %s", RntbdObjectMapper.toJson(channel), this)); diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java index 773ec185ba13..0e9dfa7b86de 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java @@ -16,8 +16,6 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; - public final class RntbdConstants { static final int CURRENT_PROTOCOL_VERSION = 0x00000001; @@ -352,7 +350,7 @@ public static RntbdOperationType fromId(final short id) { case 0x0025: return RntbdOperationType.Batch; default: - throw new DecoderException(lenientFormat("expected byte value matching %s value, not %s", + throw new DecoderException(String.format("expected byte value matching %s value, not %s", RntbdOperationType.class.getSimpleName(), id)); } @@ -429,7 +427,7 @@ public static RntbdOperationType fromType(OperationType type) { case Batch: return RntbdOperationType.Batch; default: - throw new IllegalArgumentException(lenientFormat("unrecognized operation type: %s", type)); + throw new IllegalArgumentException(String.format("unrecognized operation type: %s", type)); } } @@ -767,7 +765,7 @@ public static RntbdResourceType fromId(final short id) throws IllegalArgumentExc case 0x001D: return RntbdResourceType.UserDefinedType; default: - throw new DecoderException(lenientFormat("expected byte value matching %s value, not %s", + throw new DecoderException(String.format("expected byte value matching %s value, not %s", RntbdResourceType.class.getSimpleName(), id)); } @@ -833,7 +831,7 @@ public static RntbdResourceType fromType(ResourceType type) { case UserDefinedType: return RntbdResourceType.UserDefinedType; default: - throw new IllegalArgumentException(lenientFormat("unrecognized resource type: %s", type)); + throw new IllegalArgumentException(String.format("unrecognized resource type: %s", type)); } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdContextRequest.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdContextRequest.java index ebb91e0edda6..641eb8f4aba6 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdContextRequest.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdContextRequest.java @@ -4,7 +4,6 @@ package com.azure.cosmos.implementation.directconnectivity.rntbd; import com.azure.cosmos.implementation.UserAgentContainer; -import com.azure.cosmos.implementation.guava27.Strings; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectWriter; @@ -64,7 +63,7 @@ public static RntbdContextRequest decode(final ByteBuf in) { final int observedLength = in.readerIndex() - start; if (observedLength != expectedLength) { - final String reason = Strings.lenientFormat("expectedLength=%s, observedLength=%s", expectedLength, observedLength); + final String reason = String.format("expectedLength=%s, observedLength=%s", expectedLength, observedLength); throw new IllegalStateException(reason); } @@ -86,7 +85,7 @@ public void encode(final ByteBuf out) { final int observedLength = out.writerIndex() - start; if (observedLength != expectedLength) { - final String reason = Strings.lenientFormat("expectedLength=%s, observedLength=%s", expectedLength, observedLength); + final String reason = String.format("expectedLength=%s, observedLength=%s", expectedLength, observedLength); throw new IllegalStateException(reason); } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdFramer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdFramer.java index bb4f27ee6f1b..cb575665f3f7 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdFramer.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdFramer.java @@ -3,7 +3,6 @@ package com.azure.cosmos.implementation.directconnectivity.rntbd; -import com.azure.cosmos.implementation.guava27.Strings; import io.netty.buffer.ByteBuf; import io.netty.handler.codec.CorruptedFrameException; @@ -26,14 +25,14 @@ public static boolean canDecodeHead(final ByteBuf in) throws CorruptedFrameExcep final long length = in.getUnsignedIntLE(start); if (length > Integer.MAX_VALUE) { - final String reason = Strings.lenientFormat("Head frame length exceeds Integer.MAX_VALUE, %s: %s", + final String reason = String.format("Head frame length exceeds Integer.MAX_VALUE, %s: %s", Integer.MAX_VALUE, length ); throw new CorruptedFrameException(reason); } if (length < Integer.BYTES) { - final String reason = Strings.lenientFormat("Head frame length is less than size of length field, %s: %s", + final String reason = String.format("Head frame length is less than size of length field, %s: %s", Integer.BYTES, length ); throw new CorruptedFrameException(reason); @@ -61,7 +60,7 @@ static boolean canDecodePayload(final ByteBuf in, final int start) { final long length = in.getUnsignedIntLE(start); if (length > Integer.MAX_VALUE) { - final String reason = Strings.lenientFormat("Payload frame length exceeds Integer.MAX_VALUE, %s: %s", + final String reason = String.format("Payload frame length exceeds Integer.MAX_VALUE, %s: %s", Integer.MAX_VALUE, length ); throw new CorruptedFrameException(reason); diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdObjectMapper.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdObjectMapper.java index fcf1858cf266..04418f197ac1 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdObjectMapper.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdObjectMapper.java @@ -29,7 +29,6 @@ import java.util.concurrent.ConcurrentHashMap; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; public final class RntbdObjectMapper { @@ -91,7 +90,7 @@ public static String toJson(final Object value) { } catch (final JsonProcessingException error) { logger.debug("could not convert {} value to JSON due to:", value.getClass(), error); try { - return lenientFormat("{\"error\":%s}", objectWriter.writeValueAsString(error.toString())); + return String.format("{\"error\":%s}", objectWriter.writeValueAsString(error.toString())); } catch (final JsonProcessingException exception) { return "null"; } @@ -100,7 +99,7 @@ public static String toJson(final Object value) { public static String toString(final Object value) { final String name = simpleClassNames.computeIfAbsent(value.getClass(), Class::getSimpleName); - return lenientFormat("%s(%s)", name, toJson(value)); + return String.format("%s(%s)", name, toJson(value)); } public static ObjectWriter writer() { @@ -127,7 +126,7 @@ static ObjectNode readTree(final ByteBuf in) { return (ObjectNode)node; } - final String cause = lenientFormat("Expected %s, not %s", JsonNodeType.OBJECT, node.getNodeType()); + final String cause = String.format("Expected %s, not %s", JsonNodeType.OBJECT, node.getNodeType()); throw new CorruptedFrameException(cause); } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequest.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequest.java index dd8da32f9e0f..67f24745f1ff 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequest.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequest.java @@ -4,7 +4,6 @@ package com.azure.cosmos.implementation.directconnectivity.rntbd; import com.azure.cosmos.implementation.RxDocumentServiceRequest; -import com.azure.cosmos.implementation.guava27.Strings; import com.fasterxml.jackson.annotation.JsonIgnore; import io.netty.buffer.ByteBuf; @@ -77,7 +76,7 @@ public static RntbdRequest decode(final ByteBuf in) { final int observedLength = in.readerIndex() - start; if (observedLength != expectedLength) { - final String reason = Strings.lenientFormat("expectedLength=%s, observedLength=%s", expectedLength, observedLength); + final String reason = String.format("expectedLength=%s, observedLength=%s", expectedLength, observedLength); throw new IllegalStateException(reason); } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestFrame.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestFrame.java index 868ab3050b04..8eb632c48c8c 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestFrame.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestFrame.java @@ -5,7 +5,6 @@ import com.azure.cosmos.implementation.OperationType; import com.azure.cosmos.implementation.ResourceType; -import com.azure.cosmos.implementation.guava27.Strings; import io.netty.buffer.ByteBuf; import java.util.UUID; @@ -129,7 +128,7 @@ private static RntbdResourceType map(final ResourceType resourceType) { case RidRange: return RntbdResourceType.RidRange; default: - final String reason = Strings.lenientFormat("Unrecognized resource type: %s", resourceType); + final String reason = String.format("Unrecognized resource type: %s", resourceType); throw new UnsupportedOperationException(reason); } } @@ -206,7 +205,7 @@ private static RntbdOperationType map(final OperationType operationType) { case Batch: return RntbdOperationType.Batch; default: - final String reason = Strings.lenientFormat("Unrecognized operation type: %s", operationType); + final String reason = String.format("Unrecognized operation type: %s", operationType); throw new UnsupportedOperationException(reason); } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestManager.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestManager.java index d7e8ccb56421..31bdb8081cd0 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestManager.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestManager.java @@ -84,7 +84,6 @@ import static com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdConstants.RntbdResponseHeader; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkArgument; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; public final class RntbdRequestManager implements ChannelHandler, ChannelInboundHandler, ChannelOutboundHandler { @@ -235,7 +234,7 @@ public void channelRead(final ChannelHandlerContext context, final Object messag } else { final IllegalStateException error = new IllegalStateException( - lenientFormat("expected message of %s, not %s: %s", + String.format("expected message of %s, not %s: %s", RntbdResponse.class, message.getClass(), message)); @@ -680,7 +679,7 @@ public void write(final ChannelHandlerContext context, final Object message, fin return; } - final IllegalStateException error = new IllegalStateException(lenientFormat("message of %s: %s", + final IllegalStateException error = new IllegalStateException(String.format("message of %s: %s", message.getClass(), message)); @@ -920,7 +919,7 @@ private void completeAllPendingRequestsExceptionally( phrase = "closed exceptionally"; } - final String message = lenientFormat("%s %s with %s pending requests", context, phrase, count); + final String message = String.format("%s %s with %s pending requests", context, phrase, count); final Exception cause; if (throwable instanceof ClosedChannelException) { diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestRecord.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestRecord.java index f3113c5e2d6c..d5b9568b0b48 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestRecord.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestRecord.java @@ -40,7 +40,6 @@ import static com.azure.cosmos.implementation.RequestTimeline.EventName.RECEIVED; import static com.azure.cosmos.implementation.RequestTimeline.EventName.TRANSIT_TIME; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; @JsonSerialize(using = RntbdRequestRecord.JsonSerializer.class) public abstract class RntbdRequestRecord extends CompletableFuture<StoreResponse> implements IRequestRecord { @@ -181,7 +180,7 @@ public RntbdRequestRecord stage(final Stage value, Instant time) { this.timeCompleted = time; break; default: - throw new IllegalStateException(lenientFormat("there is no transition from %s to %s", + throw new IllegalStateException(String.format("there is no transition from %s to %s", current, value)); } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdResponseStatus.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdResponseStatus.java index 60a4e0196738..7cfc2e87cef3 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdResponseStatus.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdResponseStatus.java @@ -3,7 +3,6 @@ package com.azure.cosmos.implementation.directconnectivity.rntbd; -import com.azure.cosmos.implementation.guava27.Strings; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.core.JsonProcessingException; @@ -65,7 +64,7 @@ static RntbdResponseStatus decode(final ByteBuf in) { final long length = in.readUnsignedIntLE(); if (!(LENGTH <= length && length <= Integer.MAX_VALUE)) { - final String reason = Strings.lenientFormat("frame length: %s", length); + final String reason = String.format("frame length: %s", length); throw new CorruptedFrameException(reason); } @@ -73,7 +72,7 @@ static RntbdResponseStatus decode(final ByteBuf in) { final HttpResponseStatus status = HttpResponseStatus.valueOf(code); if (status == null) { - final String reason = Strings.lenientFormat("status code: %s", code); + final String reason = String.format("status code: %s", code); throw new CorruptedFrameException(reason); } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java index feb8cdb32a7e..04db3536834c 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java @@ -60,7 +60,6 @@ import static com.azure.cosmos.implementation.HttpConstants.HttpHeaders; import static com.azure.cosmos.implementation.directconnectivity.RntbdTransportClient.Options; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; import static java.util.concurrent.TimeUnit.NANOSECONDS; @JsonSerialize(using = RntbdServiceEndpoint.JsonSerializer.class) @@ -544,7 +543,7 @@ private void releaseToPool(final Channel channel) { private void throwIfClosed() { if (this.closed.get()) { - throw new TransportException(lenientFormat("%s is closed", this), new IllegalStateException()); + throw new TransportException(String.format("%s is closed", this), new IllegalStateException()); } } @@ -602,7 +601,7 @@ private RntbdRequestRecord writeWhenConnected( final String reason = cause.toString(); final GoneException goneException = new GoneException( - lenientFormat("failed to establish connection to %s due to %s", this.remoteAddress, reason), + String.format("failed to establish connection to %s due to %s", this.remoteAddress, reason), cause instanceof Exception ? (Exception) cause : new IOException(reason, cause), ImmutableMap.of(HttpHeaders.ACTIVITY_ID, activityId.toString()), requestArgs.replicaPath(), diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdThreadFactory.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdThreadFactory.java index 124e57c3f27b..5a0c7364dbab 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdThreadFactory.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdThreadFactory.java @@ -5,8 +5,6 @@ import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicInteger; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; - /** * A factory for creating daemon threads. * <p> @@ -31,7 +29,7 @@ class RntbdThreadFactory implements ThreadFactory { @Override public Thread newThread(final Runnable runnable) { - final String name = lenientFormat(NAME_TEMPLATE, this.name, this.threadCount.incrementAndGet()); + final String name = String.format(NAME_TEMPLATE, this.name, this.threadCount.incrementAndGet()); final Thread thread = new Thread(runnable, name); if (thread.isDaemon() != this.daemon) { diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdToken.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdToken.java index 1c064c30fe90..72306c060348 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdToken.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdToken.java @@ -17,7 +17,6 @@ import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkArgument; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkState; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; @JsonPropertyOrder({ "id", "name", "type", "present", "required", "value" }) final class RntbdToken { @@ -84,7 +83,7 @@ public Object getValue() { this.value = codec.read(buffer); this.hasConvertedValue = true; } catch (final CorruptedFrameException error) { - String message = lenientFormat("failed to read %s value: %s", this.getName(), error.getMessage()); + String message = String.format("failed to read %s value: %s", this.getName(), error.getMessage()); throw new CorruptedFrameException(message); } } else { @@ -160,7 +159,7 @@ public void encode(final ByteBuf out) { if (!this.isPresent()) { if (this.isRequired()) { - final String message = lenientFormat("Missing value for required header: %s", this); + final String message = String.format("Missing value for required header: %s", this); throw new IllegalStateException(message); } return; diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdTokenStream.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdTokenStream.java index 7cedc0676a0c..74977627bc46 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdTokenStream.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdTokenStream.java @@ -13,7 +13,6 @@ import static com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdConstants.RntbdHeader; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; @SuppressWarnings("UnstableApiUsage") abstract class RntbdTokenStream<T extends Enum<T> & RntbdHeader> implements ReferenceCounted { @@ -88,7 +87,7 @@ static <T extends RntbdTokenStream<?>> T decode(final T stream) { for (final RntbdToken token : stream.tokens.values()) { if (!token.isPresent() && token.isRequired()) { - final String message = lenientFormat("Required header not found on token stream: %s", token); + final String message = String.format("Required header not found on token stream: %s", token); throw new CorruptedFrameException(message); } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdTokenType.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdTokenType.java index 052267869590..bd91cfe83b44 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdTokenType.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdTokenType.java @@ -12,7 +12,6 @@ import java.util.UUID; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkState; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; enum RntbdTokenType { @@ -111,14 +110,14 @@ static void checkReadableBytes(final ByteBuf in, final long length, final long m if (length > maxLength) { throw new CorruptedFrameException( - lenientFormat("value length (%s) is greater than maxLength (%s)", length, maxLength)); + java.lang.String.format("value length (%s) is greater than maxLength (%s)", length, maxLength)); } final int readableBytes = in.readableBytes(); if (length != readableBytes) { throw new CorruptedFrameException( - lenientFormat("readableBytes (%s) does not match value length (%s)", readableBytes, length)); + java.lang.String.format("readableBytes (%s) does not match value length (%s)", readableBytes, length)); } } } @@ -719,7 +718,7 @@ final int computeLength(final Object value, final int maxLength) { final byte[] string = (byte[])value; if (!Utf8.isWellFormed(string)) { - final String reason = lenientFormat("UTF-8 byte string is ill-formed: %s", ByteBufUtil.hexDump(string)); + final String reason = java.lang.String.format("UTF-8 byte string is ill-formed: %s", ByteBufUtil.hexDump(string)); throw new CorruptedFrameException(reason); } @@ -727,7 +726,7 @@ final int computeLength(final Object value, final int maxLength) { } if (length > maxLength) { - final String reason = lenientFormat("UTF-8 byte string exceeds %s bytes: %s bytes", maxLength, length); + final String reason = java.lang.String.format("UTF-8 byte string exceeds %s bytes: %s bytes", maxLength, length); throw new CorruptedFrameException(reason); } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdUUID.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdUUID.java index 5158da2798ef..ce5794967cb2 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdUUID.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdUUID.java @@ -3,7 +3,6 @@ package com.azure.cosmos.implementation.directconnectivity.rntbd; -import com.azure.cosmos.implementation.guava27.Strings; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.handler.codec.CorruptedFrameException; @@ -40,7 +39,7 @@ public static UUID decode(final ByteBuf in) { checkNotNull(in, "in"); if (in.readableBytes() < 2 * Long.BYTES) { - final String reason = Strings.lenientFormat("invalid frame length: %s", in.readableBytes()); + final String reason = String.format("invalid frame length: %s", in.readableBytes()); throw new CorruptedFrameException(reason); } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdUtils.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdUtils.java index 9d46be9acaad..96017703c6da 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdUtils.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdUtils.java @@ -12,8 +12,6 @@ import java.net.URI; import java.net.URISyntaxException; -import static com.azure.cosmos.implementation.guava27.Strings.lenientFormat; - public class RntbdUtils { private static final Logger logger = LoggerFactory.getLogger(RntbdUtils.class); @@ -50,7 +48,7 @@ public static URI getServerKey(URI physicalAddress) { null); } catch (URISyntaxException error) { throw new IllegalArgumentException( - lenientFormat("physicalAddress %s cannot be parsed as a server-based authority", physicalAddress), + String.format("physicalAddress %s cannot be parsed as a server-based authority", physicalAddress), error); } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/guava27/Strings.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/guava27/Strings.java deleted file mode 100644 index 601e41564db4..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/guava27/Strings.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (C) 2010 The Guava Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.guava27; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class Strings { - - private static final Logger logger = LoggerFactory.getLogger(Strings.class); - - /** - * Returns the given {@code template} string with each occurrence of {@code "%s"} replaced with - * the corresponding argument value from {@code args}; or, if the placeholder and argument counts - * do not match, returns a best-effort form of that string. Will not throw an exception under - * normal conditions. - * - * <p><b>Note:</b> For most string-formatting needs, use {@link String#format String.format}, - * {@link java.io.PrintWriter#format PrintWriter.format}, and related methods. These support the - * full range of <a - * href="https://docs.oracle.com/javase/9/docs/api/java/util/Formatter.html#syntax">format - * specifiers</a>, and alert you to usage errors by throwing {@link - * java.util.IllegalFormatException}. - * - * <p>In certain cases, such as outputting debugging information or constructing a message to be - * used for another unchecked exception, an exception during string formatting would serve little - * purpose except to supplant the real information you were trying to provide. These are the cases - * this method is made for; it instead generates a best-effort string with all supplied argument - * values present. This method is also useful in environments such as GWT where {@code - * String.format} is not available. As an example, method implementations of the {@link - * com.google.common.base.Preconditions} class use this formatter, for both of the reasons just discussed. - * - * <p><b>Warning:</b> Only the exact two-character placeholder sequence {@code "%s"} is - * recognized. - * - * @param template a string containing zero or more {@code "%s"} placeholder sequences. {@code - * null} is treated as the four-character string {@code "null"}. - * @param args the arguments to be substituted into the message template. The first argument - * specified is substituted for the first occurrence of {@code "%s"} in the template, and so - * forth. A {@code null} argument is converted to the four-character string {@code "null"}; - * non-null values are converted to strings using {@link Object#toString()}. - * @since guava - 25.1 - */ - // TODO(diamondm) consider using Arrays.toString() for array parameters - public static String lenientFormat( - String template, Object ... args) { - template = String.valueOf(template); // null -> "null" - - if (args == null) { - args = new Object[] {"(Object[])null"}; - } else { - for (int i = 0; i < args.length; i++) { - args[i] = lenientToString(args[i]); - } - } - - // start substituting the arguments into the '%s' placeholders - StringBuilder builder = new StringBuilder(template.length() + 16 * args.length); - int templateStart = 0; - int i = 0; - while (i < args.length) { - int placeholderStart = template.indexOf("%s", templateStart); - if (placeholderStart == -1) { - break; - } - builder.append(template, templateStart, placeholderStart); - builder.append(args[i++]); - templateStart = placeholderStart + 2; - } - builder.append(template, templateStart, template.length()); - - // if we run out of placeholders, append the extra args in square braces - if (i < args.length) { - builder.append(" ["); - builder.append(args[i++]); - while (i < args.length) { - builder.append(", "); - builder.append(args[i++]); - } - builder.append(']'); - } - - return builder.toString(); - } - - private static String lenientToString(Object o) { - try { - return String.valueOf(o); - } catch (Exception e) { - // Default toString() behavior - see Object.toString() - String objectToString = - o.getClass().getName() + '@' + Integer.toHexString(System.identityHashCode(o)); - logger.warn("Exception during lenientFormat for " + objectToString, e); - return "<" + objectToString + " threw " + e.getClass().getName() + ">"; - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/routing/LocationHelper.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/routing/LocationHelper.java index f4326057820f..fd5abf33647e 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/routing/LocationHelper.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/routing/LocationHelper.java @@ -4,7 +4,6 @@ package com.azure.cosmos.implementation.routing; import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; -import com.azure.cosmos.implementation.guava27.Strings; import java.net.URI; @@ -41,7 +40,7 @@ public static URI getLocationEndpoint(URI serviceEndpoint, String location) { serviceEndpoint.getPath(), serviceEndpoint.getQuery(), serviceEndpoint.getFragment()); } catch (Exception e) { - throw new RuntimeException(Strings.lenientFormat("invalid location [%s] or serviceEndpoint [%s]", location, serviceEndpoint.toString()), e); + throw new RuntimeException(String.format("invalid location [%s] or serviceEndpoint [%s]", location, serviceEndpoint.toString()), e); } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/EthernetAddress.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/EthernetAddress.java deleted file mode 100644 index 6528e592f62e..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/EthernetAddress.java +++ /dev/null @@ -1,509 +0,0 @@ -/* JUG Java Uuid Generator - * - * Copyright (c) 2002- Tatu Saloranta, tatu.saloranta@iki.fi - * - * Licensed under the License specified in the file LICENSE which is - * included with the source code. - * You may not use this file except in compliance with the License. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.uuid; - -import java.io.Serializable; -import java.net.NetworkInterface; -import java.security.SecureRandom; -import java.util.Enumeration; -import java.util.Objects; -import java.util.Random; - -/** - * EthernetAddress encapsulates the 6-byte MAC address defined in - * IEEE 802.1 standard. - */ -public class EthernetAddress - implements Serializable, Cloneable, Comparable<EthernetAddress> -{ - private static final long serialVersionUID = 1L; - - private final static char[] HEX_CHARS = "0123456789abcdefABCDEF".toCharArray(); - - /** - * We may need a random number generator, for creating dummy ethernet - * address if no real interface is found. - */ - protected static Random _rnd; - - /** - * 48-bit MAC address, stored in 6 lowest-significant bytes (in - * big endian notation) - */ - protected final long _address; - - /** - * Lazily-constructed String serialization - */ - private volatile String _asString; - - /* - /********************************************************************** - /* Instance construction - /********************************************************************** - */ - - /** - * String constructor; given a 'standard' ethernet MAC address string - * (like '00:C0:F0:3D:5B:7C'), constructs an EthernetAddress instance. - * - * Note that string is case-insensitive, and also that leading zeroes - * may be omitted. Thus '00:C0:F0:3D:5B:7C' and '0:c0:f0:3d:5b:7c' are - * equivalent, and a 'null' address could be passed as ':::::' as well - * as '00:00:00:00:00:00' (or any other intermediate combination). - * - * @param addrStr String representation of the ethernet address - */ - public EthernetAddress(String addrStr) - throws NumberFormatException - { - int len = addrStr.length(); - long addr = 0L; - - /* Ugh. Although the most logical format would be the 17-char one - * (12 hex digits separated by colons), apparently leading zeroes - * can be omitted. Thus... Can't just check string length. :-/ - */ - for (int i = 0, j = 0; j < 6; ++j) { - if (i >= len) { - // Is valid if this would have been the last byte: - if (j == 5) { - addr <<= 8; - break; - } - throw new NumberFormatException("Incomplete ethernet address (missing one or more digits"); - } - - char c = addrStr.charAt(i); - ++i; - int value; - - // The whole number may be omitted (if it was zero): - if (c == ':') { - value = 0; - } else { - // No, got at least one digit? - if (c >= '0' && c <= '9') { - value = (c - '0'); - } else if (c >= 'a' && c <= 'f') { - value = (c - 'a' + 10); - } else if (c >= 'A' && c <= 'F') { - value = (c - 'A' + 10); - } else { - throw new NumberFormatException("Non-hex character '"+c+"'"); - } - - // How about another one? - if (i < len) { - c = addrStr.charAt(i); - ++i; - if (c != ':') { - value = (value << 4); - if (c >= '0' && c <= '9') { - value |= (c - '0'); - } else if (c >= 'a' && c <= 'f') { - value |= (c - 'a' + 10); - } else if (c >= 'A' && c <= 'F') { - value |= (c - 'A' + 10); - } else { - throw new NumberFormatException("Non-hex character '"+c+"'"); - } - } - } - } - - addr = (addr << 8) | value; - - if (c != ':') { - if (i < len) { - if (addrStr.charAt(i) != ':') { - throw new NumberFormatException("Expected ':', got ('"+ addrStr.charAt(i)+"')"); - } - ++i; - } else if (j < 5) { - throw new NumberFormatException("Incomplete ethernet address (missing one or more digits"); - } - } - } - _address = addr; - } - - /** - * Binary constructor that constructs an instance given the 6 byte - * (48-bit) address. Useful if an address is saved in binary format - * (for saving space for example). - */ - public EthernetAddress(byte [] addr) - throws NumberFormatException - { - if (addr.length != 6) { - throw new NumberFormatException("Ethernet address has to consist of 6 bytes"); - } - long l = addr[0] & 0xFF; - for (int i = 1; i < 6; ++i) { - l = (l << 8) | (addr[i] & 0xFF); - } - _address = l; - } - - /** - * Another binary constructor; constructs an instance from the given - * long argument; the lowest 6 bytes contain the address. - * - * @param addr long that contains the MAC address in 6 least significant - * bytes. - */ - public EthernetAddress(long addr) { - _address = addr; - } - - /** - * Default cloning behaviour (bitwise copy) is just fine... - */ - @Override - public Object clone() - { - return new EthernetAddress(_address); - } - - /** - * Constructs a new EthernetAddress given the byte array that contains - * binary representation of the address. - * - * Note that calling this method returns the same result as would - * using the matching constructor. - * - * @param addr Binary representation of the ethernet address - * - * @throws NumberFormatException if addr is invalid (less or more than - * 6 bytes in array) - */ - public static EthernetAddress valueOf(byte[] addr) - throws NumberFormatException - { - return new EthernetAddress(addr); - } - - /** - * Constructs a new EthernetAddress given the byte array that contains - * binary representation of the address. - * - * Note that calling this method returns the same result as would - * using the matching constructor. - * - * @param addr Binary representation of the ethernet address - * - * @throws NumberFormatException if addr is invalid (less or more than - * 6 ints in array) - */ - public static EthernetAddress valueOf(int[] addr) - throws NumberFormatException - { - byte[] bAddr = new byte[addr.length]; - - for (int i = 0; i < addr.length; ++i) { - bAddr[i] = (byte) addr[i]; - } - return new EthernetAddress(bAddr); - } - - /** - * Constructs a new EthernetAddress given a string representation of - * the ethernet address. - * - * Note that calling this method returns the same result as would - * using the matching constructor. - * - * @param addrStr String representation of the ethernet address - * - * @throws NumberFormatException if addr representation is invalid - */ - public static EthernetAddress valueOf(String addrStr) - throws NumberFormatException - { - return new EthernetAddress(addrStr); - } - - /** - * Constructs a new EthernetAddress given the long int value (64-bit) - * representation of the ethernet address (of which 48 LSB contain - * the definition) - * - * Note that calling this method returns the same result as would - * using the matching constructor. - * - * @param addr Long int representation of the ethernet address - */ - public static EthernetAddress valueOf(long addr) - { - return new EthernetAddress(addr); - } - - /** - * Factory method that locates a network interface that has - * a suitable mac address (ethernet cards, and things that - * emulate one), and return that address. If there are multiple - * applicable interfaces, one of them is returned; which one - * is returned is not specified. - * Method is meant for accessing an address needed to construct - * generator for time+location based UUID generation method. - * - * @return Ethernet address of one of interfaces system has; - * not including local or loopback addresses; if one exists, - * null if no such interfaces are found. - */ - public static EthernetAddress fromInterface() - { - try { - Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); - while (en.hasMoreElements()) { - NetworkInterface nint = en.nextElement(); - if (!nint.isLoopback()) { - byte[] data = nint.getHardwareAddress(); - if (data != null && data.length == 6) { - return new EthernetAddress(data); - } - } - } - } catch (java.net.SocketException e) { - // fine, let's take is as signal of not having any interfaces - } - return null; - } - - /** - * Factory method that can be used to construct a random multicast - * address; to be used in cases where there is no "real" ethernet - * address to use. Address to generate should be a multicase address - * to avoid accidental collision with real manufacturer-assigned - * MAC addresses. - *<p> - * Internally a {@link SecureRandom} instance is used for generating - * random number to base address on. - */ - public static EthernetAddress constructMulticastAddress() - { - return constructMulticastAddress(_randomNumberGenerator()); - } - - /** - * Factory method that can be used to construct a random multicast - * address; to be used in cases where there is no "real" ethernet - * address to use. Address to generate should be a multicase address - * to avoid accidental collision with real manufacturer-assigned - * MAC addresses. - *<p> - * Address is created using specified random number generator. - */ - public static EthernetAddress constructMulticastAddress(Random rnd) - { - byte[] dummy = new byte[6]; - synchronized (rnd) { - rnd.nextBytes(dummy); - } - /* Need to set the broadcast bit to indicate it's not a real - * address. - */ - /* 20-May-2010, tatu: Actually, we could use both second least-sig-bit - * ("locally administered") or the LSB (multicast), as neither is - * ever set for 'real' addresses. - * Since UUID specs recommends latter, use that. - */ - dummy[0] |= (byte) 0x01; - return new EthernetAddress(dummy); - } - - /* - /********************************************************************** - /* Conversions to raw types - /********************************************************************** - */ - - /** - * Returns 6 byte byte array that contains the binary representation - * of this ethernet address; byte 0 is the most significant byte - * (and so forth) - * - * @return 6 byte byte array that contains the binary representation - */ - public byte[] asByteArray() - { - byte[] result = new byte[6]; - toByteArray(result); - return result; - } - - /** - * Synonym to 'asByteArray()' - * - * @return 6 byte byte array that contains the binary representation - */ - public byte[] toByteArray() { return asByteArray(); } - - public void toByteArray(byte[] array) { - if (array.length < 6) { - throw new IllegalArgumentException("Too small array, need to have space for 6 bytes"); - } - toByteArray(array, 0); - } - - public void toByteArray(byte[] array, int pos) - { - if (pos < 0 || (pos + 6) > array.length) { - throw new IllegalArgumentException("Illegal offset ("+pos+"), need room for 6 bytes"); - } - int i = (int) (_address >> 32); - array[pos++] = (byte) (i >> 8); - array[pos++] = (byte) i; - i = (int) _address; - array[pos++] = (byte) (i >> 24); - array[pos++] = (byte) (i >> 16); - array[pos++] = (byte) (i >> 8); - array[pos] = (byte) i; - } - - public long toLong() { - return _address; - } - - /* - /********************************************************************** - /* Accessors - /********************************************************************** - */ - - /** - * Method that can be used to check if this address refers - * to a multicast address. - * Such addresses are never assigned to individual network - * cards. - */ - public boolean isMulticastAddress() { - return (((int) (_address >> 40)) & 0x01) != 0; - } - - /** - * Method that can be used to check if this address refers - * to a "locally administered address" - * (see [http://en.wikipedia.org/wiki/MAC_address] for details). - * Such addresses are not assigned to individual network - * cards. - */ - public boolean isLocallyAdministeredAddress() { - return (((int) (_address >> 40)) & 0x02) != 0; - } - - /* - /********************************************************************** - /* Standard methods - /********************************************************************** - */ - - @Override - public boolean equals(Object o) - { - if (o == this) return true; - if (o == null) return false; - if (o.getClass() != getClass()) return false; - return ((EthernetAddress) o)._address == _address; - } - - @Override - public int hashCode() { - return Objects.hash(_address, _asString); - } - - /** - * Method that compares this EthernetAddress to one passed in as - * argument. Comparison is done simply by comparing individual - * address bytes in the order. - * - * @return negative number if this EthernetAddress should be sorted before the - * parameter address if they are equal, os positive non-zero number if this address - * should be sorted after parameter - */ - @Override - public int compareTo(EthernetAddress other) - { - long l = _address - other._address; - if (l < 0L) return -1; - return (l == 0L) ? 0 : 1; - } - - /** - * Returns the canonical string representation of this ethernet address. - * Canonical means that all characters are lower-case and string length - * is always 17 characters (ie. leading zeroes are not omitted). - * - * @return Canonical string representation of this ethernet address. - */ - @Override - public String toString() - { - String str = _asString; - if (str != null) { - return str; - } - - /* Let's not cache the output here (unlike with UUID), assuming - * this won't be called as often: - */ - StringBuilder b = new StringBuilder(17); - int i1 = (int) (_address >> 32); - int i2 = (int) _address; - - _appendHex(b, i1 >> 8); - b.append(':'); - _appendHex(b, i1); - b.append(':'); - _appendHex(b, i2 >> 24); - b.append(':'); - _appendHex(b, i2 >> 16); - b.append(':'); - _appendHex(b, i2 >> 8); - b.append(':'); - _appendHex(b, i2); - _asString = str = b.toString(); - return str; - } - - /* - /********************************************************************** - /* Internal methods - /********************************************************************** - */ - - /** - * Helper method for accessing configured random number generator - */ - protected synchronized static Random _randomNumberGenerator() - { - if (_rnd == null) { - _rnd = new SecureRandom(); - } - return _rnd; - } - - private final void _appendHex(StringBuilder sb, int hex) - { - sb.append(HEX_CHARS[(hex >> 4) & 0xF]); - sb.append(HEX_CHARS[(hex & 0x0f)]); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/Generators.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/Generators.java deleted file mode 100644 index d072f6a66c47..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/Generators.java +++ /dev/null @@ -1,204 +0,0 @@ -/* JUG Java Uuid Generator - * - * Copyright (c) 2002- Tatu Saloranta, tatu.saloranta@iki.fi - * - * Licensed under the License specified in the file LICENSE which is - * included with the source code. - * You may not use this file except in compliance with the License. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.uuid; - -import com.azure.cosmos.implementation.uuid.ext.FileBasedTimestampSynchronizer; -import com.azure.cosmos.implementation.uuid.impl.NameBasedGenerator; -import com.azure.cosmos.implementation.uuid.impl.RandomBasedGenerator; -import com.azure.cosmos.implementation.uuid.impl.TimeBasedGenerator; - -import java.io.IOException; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.util.Random; -import java.util.UUID; - -/** - * Root factory class for constructing UUID generators. - * - * @author tatu - * - * @since 3.0 - */ -public class Generators -{ - /** - * If no explicit timer (and synchronizer it implicitly uses) is specified, - * we will create and use a single lazily-constructed timer, which uses in-JVM - * synchronization but no external file-based syncing. - */ - protected static UUIDTimer _sharedTimer; - - // // Random-based generation - - /** - * Factory method for constructing UUID generator that uses default (shared) - * random number generator for constructing UUIDs according to standard - * method number 4. - */ - public static RandomBasedGenerator randomBasedGenerator() { - return randomBasedGenerator(null); - } - - /** - * Factory method for constructing UUID generator that uses specified - * random number generator for constructing UUIDs according to standard - * method number 4. - */ - public static RandomBasedGenerator randomBasedGenerator(Random rnd) { - return new RandomBasedGenerator(rnd); - } - - // // Name-based generation - - /** - * Factory method for constructing UUID generator that uses specified - * random number generator for constructing UUIDs according to standard - * method number 5, but without using a namespace. - * Digester to use will be SHA-1 as recommened by UUID spec. - */ - public static NameBasedGenerator nameBasedGenerator() { - return nameBasedGenerator(null); - } - - /** - * Factory method for constructing UUID generator that uses specified - * random number generator for constructing UUIDs according to standard - * method number 5, with specified namespace (or without one if null - * is specified). - * Digester to use will be SHA-1 as recommened by UUID spec. - * - * @param namespace UUID that represents namespace to use; see - * {@link NameBasedGenerator} for 'standard' namespaces specified by - * UUID specs - */ - public static NameBasedGenerator nameBasedGenerator(UUID namespace) { - return nameBasedGenerator(namespace, null); - } - - /** - * Factory method for constructing UUID generator that uses specified - * random number generator for constructing UUIDs according to standard - * method number 3 or 5, with specified namespace (or without one if null - * is specified), using specified digester. - * If digester is passed as null, a SHA-1 digester will be constructed. - * - * @param namespace UUID that represents namespace to use; see - * {@link NameBasedGenerator} for 'standard' namespaces specified by - * UUID specs - * @param digester Digester to use; should be a MD5 or SHA-1 digester. - */ - public static NameBasedGenerator nameBasedGenerator(UUID namespace, MessageDigest digester) - { - UUIDType type = null; - if (digester == null) { - try { - digester = MessageDigest.getInstance("SHA-1"); - type = UUIDType.NAME_BASED_SHA1; - } catch (NoSuchAlgorithmException nex) { - throw new IllegalArgumentException("Couldn't instantiate SHA-1 MessageDigest instance: "+nex.toString()); - } - } - return new NameBasedGenerator(namespace, digester, type); - } - - // // Time+location-based generation - - /** - * Factory method for constructing UUID generator that generates UUID using - * variant 1 (time+location based). - * Since no Ethernet address is passed, a bogus broadcast address will be - * constructed for purpose of UUID generation; usually it is better to - * instead access one of host's NIC addresses using - * {@link EthernetAddress#fromInterface} which will use one of available - * MAC (Ethernet) addresses available. - */ - public static TimeBasedGenerator timeBasedGenerator() - { - return timeBasedGenerator(null); - } - - /** - * Factory method for constructing UUID generator that generates UUID using - * variant 1 (time+location based), using specified Ethernet address - * as the location part of UUID. - * No additional external synchronization is used. - */ - public static TimeBasedGenerator timeBasedGenerator(EthernetAddress ethernetAddress) - { - return timeBasedGenerator(ethernetAddress, (UUIDTimer) null); - } - - /** - * Factory method for constructing UUID generator that generates UUID using - * variant 1 (time+location based), using specified Ethernet address - * as the location part of UUID, and specified synchronizer (which may add - * additional restrictions to guarantee system-wide uniqueness). - * - * @param ethernetAddress (optional) MAC address to use; if null, a transient - * random address is generated. - * - * @see FileBasedTimestampSynchronizer - */ - public static TimeBasedGenerator timeBasedGenerator(EthernetAddress ethernetAddress, - TimestampSynchronizer sync) - { - UUIDTimer timer; - try { - timer = new UUIDTimer(new Random(System.currentTimeMillis()), sync); - } catch (IOException e) { - throw new IllegalArgumentException("Failed to create UUIDTimer with specified synchronizer: "+e.getMessage(), e); - } - return timeBasedGenerator(ethernetAddress, timer); - } - - /** - * Factory method for constructing UUID generator that generates UUID using - * variant 1 (time+location based), using specified Ethernet address - * as the location part of UUID, and specified {@link UUIDTimer} instance - * (which includes embedded synchronizer that defines synchronization behavior). - */ - public static TimeBasedGenerator timeBasedGenerator(EthernetAddress ethernetAddress, - UUIDTimer timer) - { - if (timer == null) { - timer = sharedTimer(); - } - return new TimeBasedGenerator(ethernetAddress, timer); - } - - /* - /********************************************************************** - /* Internal methods - /********************************************************************** - */ - - private static synchronized UUIDTimer sharedTimer() - { - if (_sharedTimer == null) { - try { - _sharedTimer = new UUIDTimer(new Random(System.currentTimeMillis()), null); - } catch (IOException e) { - throw new IllegalArgumentException("Failed to create UUIDTimer with specified synchronizer: "+e.getMessage(), e); - } - } - return _sharedTimer; - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/Jug.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/Jug.java deleted file mode 100644 index 3cf282899b46..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/Jug.java +++ /dev/null @@ -1,328 +0,0 @@ -/* JUG Java Uuid Generator - * - * Copyright (c) 2002- Tatu Saloranta, tatu.saloranta@iki.fi - * - * Licensed under the License specified in the file LICENSE which is - * included with the source code. - * You may not use this file except in compliance with the License. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.uuid; - -import com.azure.cosmos.implementation.uuid.impl.NameBasedGenerator; - -import java.io.PrintStream; -import java.security.SecureRandom; -import java.util.HashMap; -import java.util.Map; -import java.util.Random; -import java.util.UUID; - -/** - * Simple command-line interface to UUID generation functionality. - */ -public class Jug -{ - protected final static HashMap<String,String> TYPES = new HashMap<String,String>(); - static { - TYPES.put("time-based", "t"); - TYPES.put("random-based", "r"); - TYPES.put("name-based", "n"); - } - - protected final static HashMap<String,String> OPTIONS = new HashMap<String,String>(); - static { - OPTIONS.put("count", "c"); - OPTIONS.put("ethernet-address", "e"); - OPTIONS.put("help", "h"); - OPTIONS.put("namespace", "s"); - OPTIONS.put("name", "n"); - OPTIONS.put("performance", "p"); - OPTIONS.put("verbose", "v"); - } - - protected static void printUsage() - { - String clsName = Jug.class.getName(); - System.err.println("Usage: java "+clsName+" [options] type"); - System.err.println("Where options are:"); - System.err.println(" --count / -c <number>: will generate <number> UUIDs (default: 1)"); - System.err.println(" --ethernet-address / -e <ether-address>: defines the ethernet address"); - System.err.println(" (in xx:xx:xx:xx:xx:xx notation, usually obtained using 'ifconfig' etc)"); - System.err.println(" to use with time-based UUID generation"); - System.err.println(" --help / -h: lists the usage (ie. what you see now)"); - System.err.println(" --name / -n: specifies"); - System.err.println(" o name for name-based UUID generation"); - System.err.println(" o 'information' part of tag-URI for tag-URI UUID generation"); - System.err.println(" --namespace / -s: specifies"); - System.err.println(" o the namespace (DNS or URL) for name-based UUID generation"); - System.err.println(" o 'authority' part of tag-URI for tag-URI UUID generation;"); - System.err.println(" (fully-qualified domain name, email address)"); - System.err.println(" --performance / -p: measure time it takes to generate UUID(s)."); - System.err.println(" [note that UUIDs are not printed out unless 'verbose' is also specified]"); - System.err.println(" --verbose / -v: lists additional information about UUID generation\n (by default only UUIDs are printed out (to make it usable in scripts)"); - System.err.println("And type is one of:"); - System.err.println(" time-based / t: generate UUID based on current time and optional\n location information (defined with -e option)"); - System.err.println(" random-based / r: generate UUID based on the default secure random number generator"); - System.err.println(" name-based / n: generate UUID based on the na the default secure random number generator"); - } - - private static void printMap(Map<String,String> m, PrintStream out, boolean option) - { - int i = 0; - int len = m.size(); - for (Map.Entry<String, String> en : m.entrySet()) { - if (++i > 1) { - if (i < len) { - out.print(", "); - } else { - out.print(" and "); - } - } - if (option) { - out.print("--"); - } - out.print(en.getKey()); - out.print(" ("); - if (option) { - out.print("-"); - } - out.print(en.getValue()); - out.print(")"); - } - } - - public static void main(String[] args) - { - if (args.length == 0) { - printUsage(); - return; - } - - int count = args.length; - String type = args[count-1]; - boolean verbose = false; - int genCount = 1; - String name = null; - String nameSpace = null; - EthernetAddress addr = null; - boolean performance = false; - - --count; - - // Type we recognize? - String tmp = TYPES.get(type); - if (tmp == null) { - if (!TYPES.containsValue(type)) { - System.err.println("Unrecognized UUID generation type '"+ - type+"'; currently available ones are:"); - printMap(TYPES, System.err, false); - System.err.println(); - System.exit(1); - } - } else { - // Long names get translated to shorter ones: - type = tmp; - } - - - NoArgGenerator noArgGenerator = null; // random- or time-based - StringArgGenerator nameArgGenerator = null; // name-based - - for (int i = 0; i < count; ++i) { - String opt = args[i]; - - if (opt.length() == 0 || opt.charAt(0) != '-') { - System.err.println("Unrecognized option '"+opt+"' (missing leading hyphen?), exiting."); - System.exit(1); - } - - char option = (char)0; - if (opt.startsWith("--")) { - String o = OPTIONS.get(opt.substring(2)); - // Let's translate longer names to simple names: - if (o != null) { - option = o.charAt(0); - } - } else { - if (OPTIONS.containsValue(opt.substring(1))) { - option = opt.charAt(1); - } - } - - if (option == (char) 0) { - System.err.println("Unrecognized option '"+opt+"'; exiting."); - System.err.print("[options currently available are: "); - printMap(OPTIONS, System.err, true); - System.err.println("]"); - System.exit(1); - } - - // K. Now we have one-letter options to handle: - try { - String next; - switch (option) { - case 'c': - // Need a number now: - next = args[++i]; - try { - genCount = Integer.parseInt(next); - } catch (NumberFormatException nex) { - System.err.println("Invalid number argument for option '"+opt+"', exiting."); - System.exit(1); - } - if (genCount < 1) { - System.err.println("Invalid number argument for option '"+opt+"'; negative numbers not allowed, ignoring (defaults to 1)."); - } - break; - case 'e': - // Need the ethernet address: - next = args[++i]; - try { - addr = EthernetAddress.valueOf(next); - } catch (NumberFormatException nex) { - System.err.println("Invalid ethernet address for option '"+opt+"', error: "+nex.toString()); - System.exit(1); - } - break; - case 'h': - printUsage(); - return; - case 'n': - // Need the name - name = args[++i]; - break; - case 'p': // performance: - performance = true; - break; - case 's': - // Need the namespace id - nameSpace = args[++i]; - break; - case 'v': - verbose = true; - break; - } - } catch (IndexOutOfBoundsException ie) { - // We get here when an arg is missing... - System.err.println("Missing argument for option '"+opt+"', exiting."); - System.exit(1); - } - } // for (int i = 0....) - - /* Ok, args look ok so far. Now to the generation; some args/options - * can't be validated without knowing the type: - */ - char typeC = type.charAt(0); - UUID nsUUID = null; - - boolean usesRnd = false; - - switch (typeC) { - case 't': // time-based - usesRnd = true; - // No address specified? Need a dummy one... - if (addr == null) { - if (verbose) { - System.out.print("(no address specified, generating dummy address: "); - } - addr = EthernetAddress.constructMulticastAddress(new Random(System.currentTimeMillis())); - if (verbose) { - System.out.print(addr.toString()); - System.out.println(")"); - } - } - noArgGenerator = Generators.timeBasedGenerator(addr); - break; - case 'r': // random-based - usesRnd = true; - { - SecureRandom r = new SecureRandom(); - if (verbose) { - System.out.print("(using secure random generator, info = '"+r.getProvider().getInfo()+"')"); - } - noArgGenerator = Generators.randomBasedGenerator(r); - } - break; - case 'n': // name-based - if (name == null) { - System.err.println("--name-space (-s) - argument missing when using method that requires it, exiting."); - System.exit(1); - } - if (name == null) { - System.err.println("--name (-n) - argument missing when using method that requires it, exiting."); - System.exit(1); - } - if (typeC == 'n') { - String orig = nameSpace; - nameSpace = nameSpace.toLowerCase(); - if (nameSpace.equals("url")) { - nsUUID = NameBasedGenerator.NAMESPACE_URL; - } else if (nameSpace.equals("dns")) { - nsUUID = NameBasedGenerator.NAMESPACE_DNS; - } else { - System.err.println("Unrecognized namespace '"+orig - +"'; only DNS and URL allowed for name-based generation."); - System.exit(1); - } - } - nameArgGenerator = Generators.nameBasedGenerator(nsUUID); - break; - } - - // And then let's rock: - if (verbose) { - System.out.println(); - } - - /* When measuring performance, make sure that the random number - * generator is initialized prior to measurements... - */ - long now = 0L; - - if (performance) { - // No need to pre-initialize for name-based schemes? - if (usesRnd) { - if (verbose) { - System.out.println("(initializing random number generator before UUID generation so that performance measurements are not skewed due to one-time init costs)"); - } - // should initialize by just calling it - noArgGenerator.generate(); - if (verbose) { - System.out.println("(random number generator initialized ok)"); - } - } - now = System.currentTimeMillis(); - } - - for (int i = 0; i < genCount; ++i) { - UUID uuid = (nameArgGenerator == null) ? - noArgGenerator.generate() : nameArgGenerator.generate(name); - if (verbose) { - System.out.print("UUID: "); - } - if (!performance || verbose) { - System.out.println(uuid.toString()); - } - } // for (int i = 0; ...) - - if (verbose) { - System.out.println("Done."); - } - if (performance) { - now = System.currentTimeMillis() - now; - long avg = (now * 10 + (genCount / 2)) / genCount; - System.out.println("Performance: took "+now+" milliseconds to generate (and print out) "+genCount+" UUIDs; average being "+(avg / 10)+"."+(avg%10)+" msec."); - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/NoArgGenerator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/NoArgGenerator.java deleted file mode 100644 index 9ebbe92090b5..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/NoArgGenerator.java +++ /dev/null @@ -1,33 +0,0 @@ -/* JUG Java Uuid Generator - * - * Copyright (c) 2002- Tatu Saloranta, tatu.saloranta@iki.fi - * - * Licensed under the License specified in the file LICENSE which is - * included with the source code. - * You may not use this file except in compliance with the License. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.uuid; - -import java.util.UUID; - -/** - * Intermediate base class for UUID generators that do not take arguments for individual - * calls. This includes random and time-based variants, but not name-based ones. - * - * @since 3.0 - */ -public abstract class NoArgGenerator extends UUIDGenerator -{ - public abstract UUID generate(); -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/StringArgGenerator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/StringArgGenerator.java deleted file mode 100644 index 408b5c63d1ec..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/StringArgGenerator.java +++ /dev/null @@ -1,45 +0,0 @@ -/* JUG Java Uuid Generator - * - * Copyright (c) 2002- Tatu Saloranta, tatu.saloranta@iki.fi - * - * Licensed under the License specified in the file LICENSE which is - * included with the source code. - * You may not use this file except in compliance with the License. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.uuid; - -import java.util.UUID; - -/** - * Intermediate base class for UUID generators that take one String argument for individual - * calls. This includes name-based generators, but not random and time-based generators. - * - * @since 3.0 - */ -public abstract class StringArgGenerator extends UUIDGenerator -{ - /** - * Method for generating name-based UUIDs using specified name (serialized to - * bytes using UTF-8 encoding) - */ - public abstract UUID generate(String name); - - /** - * Method for generating name-based UUIDs using specified byte-serialization - * of name. - * - * @since 3.1 - */ - public abstract UUID generate(byte[] nameBytes); -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/TimestampSynchronizer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/TimestampSynchronizer.java deleted file mode 100644 index 9853ed2464de..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/TimestampSynchronizer.java +++ /dev/null @@ -1,88 +0,0 @@ -/* JUG Java Uuid Generator - * - * Copyright (c) 2002- Tatu Saloranta, tatu.saloranta@iki.fi - * - * Licensed under the License specified in the file LICENSE which is - * included with the source code. - * You may not use this file except in compliance with the License. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.uuid; - -import com.azure.cosmos.implementation.uuid.ext.FileBasedTimestampSynchronizer; - -import java.io.IOException; - -/** - * This is the API for utility classes optionally used by {@link UUIDTimer} to - * ensure that timestamp values used for generating time/location-based UUIDs - * are monotonically increasing, as well as that only one such generator - * is ever used on a single system, even in presence of multiple JVMs. - *<p> - * The default implementation used by JUG is - * {@link FileBasedTimestampSynchronizer}. - */ -public abstract class TimestampSynchronizer -{ - protected TimestampSynchronizer() { } - - /** - * Initialization method is will be called on an instance by - * {@link UUIDTimer} right after it's been configured with one. - * At this point the implementation instance should have been properly - * configured, and should be able to determine the first legal timestamp - * value (return value). Method should also initialize any locking that - * it does (if any), such as locking files it needs. - *<p> - * Return value thus indicates the lowest initial time value that can - * be used by the caller that can not have been used by previous - * incarnations of the UUID generator (assuming instance was able to - * find properly persisted data to figure that out). - * However, caller also needs to make sure that it will - * call {@link #update} when it actually needs the time stamp for the - * first time, - * since this method can not allocate timestamps beyond this initial - * value at this point. - * - * @return First (and last) legal timestamp to use; <code>0L</code> if it - * can not - * determine it and caller can use whatever value (current timestamp) - * it has access to. - */ - protected abstract long initialize() - throws IOException; - - /** - * Method {@link UUIDTimer} will call if this synchronizer object is - * being replaced by another synchronizer (or removed, that is, no - * more synchronization is to be done). It will not be called if JVM - * terminates. - */ - protected abstract void deactivate() - throws IOException; - - /** - * Method called by {@link UUIDTimer} to indicate that it has generated - * a timestamp value that is beyond last legal timestamp value. - * The method should only return once it has "locked" specified timestamp - * value (and possible additional ones). - * - * @param now Timestamp value caller wants to use, and that the - * synchronizer is asked to protect. - * - * @return First timestamp value that can NOT be used by the caller; - * has to be higher than the input timestamp value - */ - protected abstract long update(long now) - throws IOException; -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDClock.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDClock.java deleted file mode 100644 index 13dad6dc8624..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDClock.java +++ /dev/null @@ -1,40 +0,0 @@ -/* JUG Java Uuid Generator - * - * Copyright (c) 2002- Tatu Saloranta, tatu.saloranta@iki.fi - * - * Licensed under the License specified in the file LICENSE which is - * included with the source code. - * You may not use this file except in compliance with the License. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.uuid; - -/** - * UUIDClock is used by UUIDTimer to get the current time. The default - * implementation returns the time from the system clock, but this class can - * be overriden to return any number. This is useful when UUIDs with past or - * future timestamps should be generated, or when UUIDs must be generated in - * a reproducible manner. - * - * @since 3.3 - */ -public class UUIDClock -{ - /** - * Returns the current time in milliseconds. - */ - public long currentTimeMillis() - { - return System.currentTimeMillis(); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDComparator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDComparator.java deleted file mode 100644 index b20ea9c19d06..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDComparator.java +++ /dev/null @@ -1,96 +0,0 @@ -/* JUG Java Uuid Generator - * - * Copyright (c) 2002- Tatu Saloranta, tatu.saloranta@iki.fi - * - * Licensed under the License specified in the file LICENSE which is - * included with the source code. - * You may not use this file except in compliance with the License. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.uuid; - -import java.util.Comparator; -import java.util.UUID; - -/** - * Default {@link UUID} comparator is not very useful, since - * it just does blind byte-by-byte comparison which does not work well - * for time+location - based UUIDs. Additionally it also uses signed - * comparisons for longs which can lead to unexpected behavior - * This comparator does implement proper lexical ordering: starting with - * type (different types are collated - * separately), followed by time and location (for time/location based), - * and simple lexical (byte-by-byte) ordering for name/hash and random - * variants. - * - * @author tatu - */ -public class UUIDComparator implements Comparator<UUID> -{ - @Override - public int compare(UUID u1, UUID u2) - { - return staticCompare(u1, u2); - } - - /** - * Static helper method that can be used instead of instantiating comparator - * (used by unit tests, can be used by code too) - */ - public static int staticCompare(UUID u1, UUID u2) - { - // First: major sorting by types - int type = u1.version(); - int diff = type - u2.version(); - if (diff != 0) { - return diff; - } - // Second: for time-based variant, order by time stamp: - if (type == UUIDType.TIME_BASED.raw()) { - diff = compareULongs(u1.timestamp(), u2.timestamp()); - if (diff == 0) { - // or if that won't work, by other bits lexically - diff = compareULongs(u1.getLeastSignificantBits(), u2.getLeastSignificantBits()); - } - } else { - // note: java.util.UUIDs compares with sign extension, IMO that's wrong, so: - diff = compareULongs(u1.getMostSignificantBits(), - u2.getMostSignificantBits()); - if (diff == 0) { - diff = compareULongs(u1.getLeastSignificantBits(), - u2.getLeastSignificantBits()); - } - } - return diff; - } - - protected final static int compareULongs(long l1, long l2) { - int diff = compareUInts((int) (l1 >> 32), (int) (l2 >> 32)); - if (diff == 0) { - diff = compareUInts((int) l1, (int) l2); - } - return diff; - } - - protected final static int compareUInts(int i1, int i2) - { - /* bit messier due to java's insistence on signed values: if both - * have same sign, normal comparison (by subtraction) works fine; - * but if signs don't agree need to resolve differently - */ - if (i1 < 0) { - return (i2 < 0) ? (i1 - i2) : 1; - } - return (i2 < 0) ? -1 : (i1 - i2); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDGenerator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDGenerator.java deleted file mode 100644 index 0fcd0031069f..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDGenerator.java +++ /dev/null @@ -1,53 +0,0 @@ -/* JUG Java Uuid Generator - * - * Copyright (c) 2002- Tatu Saloranta, tatu.saloranta@iki.fi - * - * Licensed under the License specified in the file LICENSE which is - * included with the source code. - * You may not use this file except in compliance with the License. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.uuid; - -/** - * Minimal "tag" base class from which all generator implementations - * derive. Actual generation methods are not included since different - * generators take different number of arguments. - * - * @since 3.0 - */ -public abstract class UUIDGenerator -{ - /* - /********************************************************** - /* Life-cycle - /********************************************************** - */ - - /** - * Constructor is private to enforce singleton access. - */ - protected UUIDGenerator() { } - - /* - /********************************************************** - /* Shared (minimal) API - /********************************************************** - */ - - /** - * Accessor for determining type of UUIDs (variant) that this - * generator instance will produce. - */ - public abstract UUIDType getType(); -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDTimer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDTimer.java deleted file mode 100644 index 7adce995e74a..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDTimer.java +++ /dev/null @@ -1,411 +0,0 @@ -/* JUG Java Uuid Generator - * - * Copyright (c) 2002- Tatu Saloranta, tatu.saloranta@iki.fi - * - * Licensed under the License specified in the file LICENSE which is - * included with the source code. - * You may not use this file except in compliance with the License. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.uuid; - -import com.azure.cosmos.implementation.uuid.impl.UUIDUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.util.Random; - -/** - * UUIDTimer produces the time stamps required for time-based UUIDs. - * It works as outlined in the UUID specification, with following - * implementation: - *<ul> - *<li>Java classes can only product time stamps with maximum resolution - * of one millisecond (at least before JDK 1.5). - * To compensate, an additional counter is used, - * so that more than one UUID can be generated between java clock - * updates. Counter may be used to generate up to 10000 UUIDs for - * each distinct java clock value. - *<li>Due to even lower clock resolution on some platforms (older - * Windows versions use 55 msec resolution), timestamp value can - * also advanced ahead of physical value within limits (by default, - * up 100 millisecond ahead of reported), if necessary (ie. 10000 - * instances created before clock time advances). - *<li>As an additional precaution, counter is initialized not to 0 - * but to a random 8-bit number, and each time clock changes, lowest - * 8-bits of counter are preserved. The purpose it to make likelyhood - * of multi-JVM multi-instance generators to collide, without significantly - * reducing max. UUID generation speed. Note though that using more than - * one generator (from separate JVMs) is strongly discouraged, so - * hopefully this enhancement isn't needed. - * This 8-bit offset has to be reduced from total max. UUID count to - * preserve ordering property of UUIDs (ie. one can see which UUID - * was generated first for given UUID generator); the resulting - * 9500 UUIDs isn't much different from the optimal choice. - *<li>Finally, as of version 2.0 and onwards, optional external timestamp - * synchronization can be done. This is done similar to the way UUID - * specification suggests; except that since there is no way to - * lock the whole system, file-based locking is used. This works - * between multiple JVMs and Jug instances. - *</ul> - *<p> - *Some additional assumptions about calculating the timestamp: - *<ul> - *<li>System.currentTimeMillis() is assumed to give time offset in UTC, - * or at least close enough thing to get correct timestamps. The - * alternate route would have to go through calendar object, use - * TimeZone offset to get to UTC, and then modify. Using currentTimeMillis - * should be much faster to allow rapid UUID creation. - *<li>Similarly, the constant used for time offset between 1.1.1970 and - * start of Gregorian calendar is assumed to be correct (which seems - * to be the case when testing with Java calendars). - *</ul> - *<p> - * Note about synchronization: main synchronization point (as of version - * 3.1.1 and above) is {@link #getTimestamp}, so caller need not - * synchronize access explicitly. - */ -public class UUIDTimer -{ - - private static final Logger logger = LoggerFactory.getLogger(UUIDTimer.class); - - // // // Constants - - /** - * Since System.longTimeMillis() returns time from january 1st 1970, - * and UUIDs need time from the beginning of gregorian calendar - * (15-oct-1582), need to apply the offset: - */ - private final static long kClockOffset = 0x01b21dd213814000L; - /** - * Also, instead of getting time in units of 100nsecs, we get something - * with max resolution of 1 msec... and need the multiplier as well - */ - private final static int kClockMultiplier = 10000; - - private final static long kClockMultiplierL = 10000L; - - /** - * Let's allow "virtual" system time to advance at most 100 milliseconds - * beyond actual physical system time, before adding delays. - */ - private final static long kMaxClockAdvance = 100L; - - // // // Configuration - - /** - * Object used to reliably ensure that no multiple JVMs - * generate UUIDs, and also that the time stamp value used for - * generating time-based UUIDs is monotonically increasing - * even if system clock moves backwards over a reboot (usually - * due to some system level problem). - *<p> - * See {@link TimestampSynchronizer} for details. - */ - protected final TimestampSynchronizer _syncer; - - /** - * Random number generator used to generate additional information - * to further reduce probability of collisions. - */ - protected final Random _random; - - /** - * Clock used to get the time when a timestamp is requested. - * - * @since 3.3 - */ - protected final UUIDClock _clock; - - // // // Clock state: - - /** - * Additional state information used to protect against anomalous - * cases (clock time going backwards, node id getting mixed up). - * Third byte is actually used for seeding counter on counter - * overflow. - * Note that only lowermost 16 bits are actually used as sequence - */ - private int _clockSequence; - - /** - * Last physical timestamp value <code>System.currentTimeMillis()</code> - * returned: used to catch (and report) cases where system clock - * goes backwards. Is also used to limit "drifting", that is, amount - * timestamps used can differ from the system time value. This value - * is not guaranteed to be monotonically increasing. - */ - private long _lastSystemTimestamp = 0L; - - /** - * Timestamp value last used for generating a UUID (along with - * {@link #_clockCounter}. Usually the same as - * {@link #_lastSystemTimestamp}, but not always (system clock - * moved backwards). Note that this value is guaranteed to be - * monotonically increasing; that is, at given absolute time points - * t1 and t2 (where t2 is after t1), t1 <= t2 will always hold true. - */ - private long _lastUsedTimestamp = 0L; - - /** - * First timestamp that can NOT be used without synchronizing - * using synchronization object ({@link #_syncer}). Only used when - * external timestamp synchronization (and persistence) is used, - * ie. when {@link #_syncer} is not null. - */ - private long _firstUnsafeTimestamp = Long.MAX_VALUE; - - /** - * Counter used to compensate inadequate resolution of JDK system - * timer. - */ - private int _clockCounter = 0; - - public UUIDTimer(Random rnd, TimestampSynchronizer sync) throws IOException - { - this(rnd, sync, new UUIDClock()); - } - - /** - * @param rnd Random-number generator to use - * @param sync Synchronizer needed for multi-threaded timestamp access - * @param clock Provider for milli-second resolution timestamp - * - * @throws IOException if initialization of {@code sync} fails due to problem related - * to reading of persisted last-used timestamp - * - * @since 3.3 - */ - public UUIDTimer(Random rnd, TimestampSynchronizer sync, UUIDClock clock) throws IOException - { - _random = rnd; - _syncer = sync; - _clock = clock; - initCounters(rnd); - _lastSystemTimestamp = 0L; - // This may get overwritten by the synchronizer - _lastUsedTimestamp = 0L; - - /* Ok, now; synchronizer can tell us what is the first timestamp - * value that definitely was NOT used by the previous incarnation. - * This can serve as the last used time stamp, assuming it is not - * less than value we are using now. - */ - if (sync != null) { - long lastSaved = sync.initialize(); - if (lastSaved > _lastUsedTimestamp) { - _lastUsedTimestamp = lastSaved; - } - } - - /* Also, we need to make sure there are now no safe values (since - * synchronizer is not yet requested to allocate any): - */ - _firstUnsafeTimestamp = 0L; // ie. will always trigger sync.update() - } - - private void initCounters(Random rnd) - { - /* Let's generate the clock sequence field now; as with counter, - * this reduces likelihood of collisions (as explained in UUID specs) - */ - _clockSequence = rnd.nextInt(); - /* Ok, let's also initialize the counter... - * Counter is used to make it slightly less likely that - * two instances of UUIDGenerator (from separate JVMs as no more - * than one can be created in one JVM) would produce colliding - * time-based UUIDs. The practice of using multiple generators, - * is strongly discouraged, of course, but just in case... - */ - _clockCounter = (_clockSequence >> 16) & 0xFF; - } - - public int getClockSequence() { - return (_clockSequence & 0xFFFF); - } - - /** - * Method that constructs unique timestamp suitable for use for - * constructing UUIDs. Default implementation is fully synchronized; - * sub-classes may choose to implemented alternate strategies - * - * @return 64-bit timestamp to use for constructing UUID - */ - public synchronized long getTimestamp() - { - long systime = _clock.currentTimeMillis(); - /* Let's first verify that the system time is not going backwards; - * independent of whether we can use it: - */ - if (systime < _lastSystemTimestamp) { - logger.warn("System time going backwards! (got value {}, last {}", systime, _lastSystemTimestamp); - // Let's write it down, still - _lastSystemTimestamp = systime; - } - - /* But even without it going backwards, it may be less than the - * last one used (when generating UUIDs fast with coarse clock - * resolution; or if clock has gone backwards over reboot etc). - */ - if (systime <= _lastUsedTimestamp) { - /* Can we just use the last time stamp (ok if the counter - * hasn't hit max yet) - */ - if (_clockCounter < kClockMultiplier) { // yup, still have room - systime = _lastUsedTimestamp; - } else { // nope, have to roll over to next value and maybe wait - long actDiff = _lastUsedTimestamp - systime; - long origTime = systime; - systime = _lastUsedTimestamp + 1L; - - logger.warn("Timestamp over-run: need to reinitialize random sequence"); - - /* Clock counter is now at exactly the multiplier; no use - * just anding its value. So, we better get some random - * numbers instead... - */ - initCounters(_random); - - /* But do we also need to slow down? (to try to keep virtual - * time close to physical time; i.e. either catch up when - * system clock has been moved backwards, or when coarse - * clock resolution has forced us to advance virtual timer - * too far) - */ - if (actDiff >= kMaxClockAdvance) { - slowDown(origTime, actDiff); - } - } - } else { - /* Clock has advanced normally; just need to make sure counter is - * reset to a low value (need not be 0; good to leave a small - * residual to further decrease collisions) - */ - _clockCounter &= 0xFF; - } - - _lastUsedTimestamp = systime; - - /* Ok, we have consistent clock (virtual or physical) value that - * we can and should use. - * But do we need to check external syncing now? - */ - if (_syncer != null && systime >= _firstUnsafeTimestamp) { - try { - _firstUnsafeTimestamp = _syncer.update(systime); - } catch (IOException ioe) { - throw new RuntimeException("Failed to synchronize timestamp: "+ioe); - } - } - - /* Now, let's translate the timestamp to one UUID needs, 100ns - * unit offset from the beginning of Gregorian calendar... - */ - systime *= kClockMultiplierL; - systime += kClockOffset; - - // Plus add the clock counter: - systime += _clockCounter; - // and then increase - ++_clockCounter; - return systime; - } - - /* - /********************************************************************** - /* Test-support methods - /********************************************************************** - */ - - /* Method for accessing timestamp to use for creating UUIDs. - * Used ONLY by unit tests, hence protected. - */ - protected final void getAndSetTimestamp(byte[] uuidBytes) - { - long timestamp = getTimestamp(); - - uuidBytes[UUIDUtil.BYTE_OFFSET_CLOCK_SEQUENCE] = (byte) _clockSequence; - uuidBytes[UUIDUtil.BYTE_OFFSET_CLOCK_SEQUENCE+1] = (byte) (_clockSequence >> 8); - - // Time fields aren't nicely split across the UUID, so can't just - // linearly dump the stamp: - int clockHi = (int) (timestamp >>> 32); - int clockLo = (int) timestamp; - - uuidBytes[UUIDUtil.BYTE_OFFSET_CLOCK_HI] = (byte) (clockHi >>> 24); - uuidBytes[UUIDUtil.BYTE_OFFSET_CLOCK_HI+1] = (byte) (clockHi >>> 16); - uuidBytes[UUIDUtil.BYTE_OFFSET_CLOCK_MID] = (byte) (clockHi >>> 8); - uuidBytes[UUIDUtil.BYTE_OFFSET_CLOCK_MID+1] = (byte) clockHi; - - uuidBytes[UUIDUtil.BYTE_OFFSET_CLOCK_LO] = (byte) (clockLo >>> 24); - uuidBytes[UUIDUtil.BYTE_OFFSET_CLOCK_LO+1] = (byte) (clockLo >>> 16); - uuidBytes[UUIDUtil.BYTE_OFFSET_CLOCK_LO+2] = (byte) (clockLo >>> 8); - uuidBytes[UUIDUtil.BYTE_OFFSET_CLOCK_LO+3] = (byte) clockLo; - } - - /* - /********************************************************************** - /* Private methods - /********************************************************************** - */ - - private final static int MAX_WAIT_COUNT = 50; - - /** - * Simple utility method to use to wait for couple of milliseconds, - * to let system clock hopefully advance closer to the virtual - * timestamps used. Delay is kept to just a millisecond or two, - * to prevent excessive blocking; but that should be enough to - * eventually synchronize physical clock with virtual clock values - * used for UUIDs. - * - * @param actDiff Number of milliseconds to wait for from current - * time point, to catch up - */ - protected static void slowDown(long startTime, long actDiff) - { - /* First, let's determine how long we'd like to wait. - * This is based on how far ahead are we as of now. - */ - long ratio = actDiff / kMaxClockAdvance; - long delay; - - if (ratio < 2L) { // 200 msecs or less - delay = 1L; - } else if (ratio < 10L) { // 1 second or less - delay = 2L; - } else if (ratio < 600L) { // 1 minute or less - delay = 3L; - } else { - delay = 5L; - } - logger.warn("Need to wait for {} milliseconds; virtual clock advanced too far in the future", delay); - long waitUntil = startTime + delay; - int counter = 0; - do { - try { - Thread.sleep(delay); - } catch (InterruptedException ie) { } - delay = 1L; - /* This is just a sanity check: don't want an "infinite" - * loop if clock happened to be moved backwards by, say, - * an hour... - */ - if (++counter > MAX_WAIT_COUNT) { - break; - } - } while (System.currentTimeMillis() < waitUntil); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDType.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDType.java deleted file mode 100644 index 007d73c90d67..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/UUIDType.java +++ /dev/null @@ -1,48 +0,0 @@ -/* JUG Java Uuid Generator - * - * Copyright (c) 2002- Tatu Saloranta, tatu.saloranta@iki.fi - * - * Licensed under the License specified in the file LICENSE which is - * included with the source code. - * You may not use this file except in compliance with the License. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.uuid; - -/** - * Enumeration of different flavors of UUIDs: 5 specified by specs - * (<a href="http://tools.ietf.org/html/rfc4122">RFC-4122</a>) - * and one - * virtual entry ("UNKNOWN") to represent invalid one that consists of - * all zero bites - */ -public enum UUIDType { - TIME_BASED(1), - DCE(2), - NAME_BASED_MD5(3), - RANDOM_BASED(4), - NAME_BASED_SHA1(5), - UNKNOWN(0) - ; - - private final int _raw; - - private UUIDType(int raw) { - _raw = raw; - } - - /** - * Returns "raw" type constants, embedded within UUID bytes. - */ - public int raw() { return _raw; } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/ext/FileBasedTimestampSynchronizer.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/ext/FileBasedTimestampSynchronizer.java deleted file mode 100644 index 3694172574fc..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/ext/FileBasedTimestampSynchronizer.java +++ /dev/null @@ -1,243 +0,0 @@ -/* JUG Java Uuid Generator - * - * Copyright (c) 2002- Tatu Saloranta, tatu.saloranta@iki.fi - * - * Licensed under the License specified in the file LICENSE which is - * included with the source code. - * You may not use this file except in compliance with the License. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.azure.cosmos.implementation.uuid.ext; - -import com.azure.cosmos.implementation.uuid.TimestampSynchronizer; -import com.azure.cosmos.implementation.uuid.UUIDTimer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.io.IOException; -import java.io.RandomAccessFile; - -/** - * Implementation of {@link TimestampSynchronizer}, which uses file system - * as the storage and locking mechanism. - *<p> - * Synchronization is achieved by obtaining an exclusive file locks on two - * specified lock files, and by using the files to store first "safe" timestamp - * value that the generator can use; alternating between one to use to ensure - * one of them always contains a valid timestamp. Latter is needed to guard - * against system clock moving backwards after UUID generator restart. - *<p> - * Note: this class will only work on JDK 1.4 and above, since it requires - * NIO package to do proper file locking (as well as new opening mode for - * {@link RandomAccessFile}). - *<p> - * Also note that it is assumed that the caller has taken care to synchronize - * access to method to be single-threaded. As such, none of the methods - * is explicitly synchronized here. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -public final class FileBasedTimestampSynchronizer - extends TimestampSynchronizer -{ - - private static final Logger logger = LoggerFactory.getLogger(FileBasedTimestampSynchronizer.class); - - // // // Constants: - - /** - * The default update interval is 10 seconds, meaning that the - * synchronizer "reserves" next 10 seconds for generation. This - * also means that the lock files need to be accessed at most - * once every ten second. - */ - final static long DEFAULT_UPDATE_INTERVAL = 10L * 1000L; - - protected final static String DEFAULT_LOCK_FILE_NAME1 = "uuid1.lck"; - - protected final static String DEFAULT_LOCK_FILE_NAME2 = "uuid2.lck"; - - // // // Configuration: - - protected long mInterval = DEFAULT_UPDATE_INTERVAL; - - protected final LockedFile mLocked1, mLocked2; - - // // // State: - - /** - * Flag used to indicate which of timestamp files has the most - * recently succesfully updated timestamp value. True means that - * <code>mFile1</code> is more recent; false that <code>mFile2</code> - * is. - */ - boolean mFirstActive = false; - - /** - * Constructor that uses default values for names of files to use - * (files will get created in the current working directory), as - * well as for the update frequency value (10 seconds). - */ - public FileBasedTimestampSynchronizer() - throws IOException - { - this(new File(DEFAULT_LOCK_FILE_NAME1), new File(DEFAULT_LOCK_FILE_NAME2)); - } - - public FileBasedTimestampSynchronizer(File lockFile1, File lockFile2) - throws IOException - { - this(lockFile1, lockFile2, DEFAULT_UPDATE_INTERVAL); - } - - public FileBasedTimestampSynchronizer(File lockFile1, File lockFile2, long interval) - throws IOException - { - mInterval = interval; - mLocked1 = new LockedFile(lockFile1); - - boolean ok = false; - try { - mLocked2 = new LockedFile(lockFile2); - ok = true; - } finally { - if (!ok) { - mLocked1.deactivate(); - } - } - - // But let's leave reading up to initialization - } - - /* - ////////////////////////////////////////////////////////////// - // Configuration - ////////////////////////////////////////////////////////////// - */ - - public void setUpdateInterval(long interval) - { - if (interval < 1L) { - throw new IllegalArgumentException("Illegal value ("+interval+"); has to be a positive integer value"); - } - mInterval = interval; - } - - /* - ////////////////////////////////////////////////////////////// - // Implementation of the API - ////////////////////////////////////////////////////////////// - */ - - /** - * This method is to be called only once by - * {@link UUIDTimer}. It - * should fetch the persisted timestamp value, which indicates - * first timestamp value that is guaranteed NOT to have used by - * a previous incarnation. If it can not determine such value, it - * is to return 0L as a marker. - * - * @return First timestamp value that was NOT locked by lock files; - * 0L to indicate that no information was read. - */ - @Override - protected long initialize() throws IOException - { - long ts1 = mLocked1.readStamp(); - long ts2 = mLocked2.readStamp(); - long result; - - if (ts1 > ts2) { - mFirstActive = true; - result = ts1; - } else { - mFirstActive = false; - result = ts2; - } - - /* Hmmh. If we didn't get a time stamp (-> 0), or if written time is - * ahead of current time, let's log something: - */ - if (result <= 0L) { - logger.warn("Could not determine safe timer starting point: assuming current system time is acceptable"); - } else { - long now = System.currentTimeMillis(); - //long diff = now - result; - - /* It's more suspicious if old time was ahead... although with - * longer iteration values, it can be ahead without errors. So - * let's base check on current iteration value: - */ - if ((now + mInterval) < result) { - logger.warn("Safe timestamp read is {} milliseconds in future, and is greater than the inteval ({})", (result - now), mInterval); - } - - /* Hmmh. Is there any way a suspiciously old timestamp could be - * harmful? It can obviously be useless but... - */ - } - - return result; - } - - @Override - public void deactivate() throws IOException - { - doDeactivate(mLocked1, mLocked2); - } - - /** - * @return Timestamp value that the caller can NOT use. That is, all - * timestamp values prior to (less than) this value can be used - * ok, but this value and ones after can only be used by first - * calling update. - */ - @Override - public long update(long now) - throws IOException - { - long nextAllowed = now + mInterval; - - /* We have to make sure to (over)write the one that is NOT - * actively used, to ensure that we always have fully persisted - * timestamp value, even if the write process gets interruped - * half-way through. - */ - - if (mFirstActive) { - mLocked2.writeStamp(nextAllowed); - } else { - mLocked1.writeStamp(nextAllowed); - } - - mFirstActive = !mFirstActive; - - return nextAllowed; - } - - /* - ////////////////////////////////////////////////////////////// - // Internal methods - ////////////////////////////////////////////////////////////// - */ - - protected static void doDeactivate(LockedFile lf1, LockedFile lf2) - { - if (lf1 != null) { - lf1.deactivate(); - } - if (lf2 != null) { - lf2.deactivate(); - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/ext/LockedFile.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/ext/LockedFile.java deleted file mode 100644 index 4568bb5cbb97..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/ext/LockedFile.java +++ /dev/null @@ -1,293 +0,0 @@ -/* JUG Java Uuid Generator - * - * Copyright (c) 2002- Tatu Saloranta, tatu.saloranta@iki.fi - * - * Licensed under the License specified in the file LICENSE which is - * included with the source code. - * You may not use this file except in compliance with the License. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.uuid.ext; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.io.IOException; -import java.io.RandomAccessFile; -import java.nio.ByteBuffer; -import java.nio.channels.FileChannel; -import java.nio.channels.FileLock; - -/** - * Utility class used by {@link FileBasedTimestampSynchronizer} to do - * actual file access and locking. - *<p> - * Class stores simple timestamp values based on system time accessed - * using <code>System.currentTimeMillis()</code>. A single timestamp - * is stored into a file using {@link RandomAccessFile} in fully - * synchronized mode. Value is written in ISO-Latin (ISO-8859-1) - * encoding (superset of Ascii, 1 byte per char) as 16-digit hexadecimal - * number, surrounded by brackets. As such, file produced should - * always have exact size of 18 bytes. For extra robustness, slight - * variations in number of digits are accepeted, as are white space - * chars before and after bracketed value. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -class LockedFile -{ - - private static final Logger logger = LoggerFactory.getLogger(LockedFile.class); - - /** - * Expected file length comes from hex-timestamp (16 digits), - * preamble "[0x",(3 chars) and trailer "]\r\n" (2 chars, linefeed - * to help debugging -- in some environments, missing trailing linefeed - * causes problems: also, 2-char linefeed to be compatible with all - * standard linefeeds on MacOS, Unix and Windows). - */ - final static int DEFAULT_LENGTH = 22; - - final static long READ_ERROR = 0L; - - // // // Configuration: - - final File mFile; - - // // // File state - - RandomAccessFile mRAFile; - - FileChannel mChannel; - - FileLock mLock; - - ByteBuffer mWriteBuffer = null; - - /** - * Flag set if the original file (created before this instance was - * created) had size other than default size and needs to be - * truncated - */ - boolean mWeirdSize; - - /** - * Marker used to ensure that the timestamps stored are monotonously - * increasing. Shouldn't really be needed, since caller should take - * care of it, but let's be bit paranoid here. - */ - long mLastTimestamp = 0L; - - LockedFile(File f) - throws IOException - { - mFile = f; - - RandomAccessFile raf = null; - FileChannel channel = null; - FileLock lock = null; - boolean ok = false; - - try { // let's just use a single block to share cleanup code - raf = new RandomAccessFile(f, "rwd"); - - // Then lock them, if possible; if not, let's err out - channel = raf.getChannel(); - if (channel == null) { - throw new IOException("Failed to access channel for '"+f+"'"); - } - lock = channel.tryLock(); - if (lock == null) { - throw new IOException("Failed to lock '"+f+"' (another JVM running UUIDGenerator?)"); - } - ok = true; - } finally { - if (!ok) { - doDeactivate(f, raf, lock); - } - } - - mRAFile = raf; - mChannel = channel; - mLock = lock; - } - - public void deactivate() - { - RandomAccessFile raf = mRAFile; - mRAFile = null; - FileLock lock = mLock; - mLock = null; - doDeactivate(mFile, raf, lock); - } - - public long readStamp() - { - int size; - - try { - size = (int) mChannel.size(); - } catch (IOException ioe) { - logger.error("Failed to read file size", ioe); - return READ_ERROR; - } - - mWeirdSize = (size != DEFAULT_LENGTH); - - // Let's check specifically empty files though - if (size == 0) { - logger.warn("Missing or empty file, can not read timestamp value"); - return READ_ERROR; - } - - // Let's also allow some slack... but just a bit - if (size > 100) { - size = 100; - } - byte[] data = new byte[size]; - try { - mRAFile.readFully(data); - } catch (IOException ie) { - logger.error("(file '{}') Failed to read {} bytes", mFile, size, ie); - return READ_ERROR; - } - - /* Ok, got data. Now, we could just directly parse the bytes (since - * it is single-byte encoding)... but for convenience, let's create - * the String (this is only called once per JVM session) - */ - char[] cdata = new char[size]; - for (int i = 0; i < size; ++i) { - cdata[i] = (char) (data[i] & 0xFF); - } - String dataStr = new String(cdata); - // And let's trim leading (and trailing, who cares) - dataStr = dataStr.trim(); - - long result = -1; - String err = null; - - if (!dataStr.startsWith("[0") - || dataStr.length() < 3 - || Character.toLowerCase(dataStr.charAt(2)) != 'x') { - err = "does not start with '[0x' prefix"; - } else { - int ix = dataStr.indexOf(']', 3); - if (ix <= 0) { - err = "does not end with ']' marker"; - } else { - String hex = dataStr.substring(3, ix); - if (hex.length() > 16) { - err = "length of the (hex) timestamp too long; expected 16, had "+hex.length()+" ('"+hex+"')"; - } else { - try { - result = Long.parseLong(hex, 16); - } catch (NumberFormatException nex) { - err = "does not contain a valid hex timestamp; got '" - +hex+"' (parse error: "+nex+")"; - } - } - } - } - - // Unsuccesful? - if (result < 0L) { - logger.error("(file '{}') Malformed timestamp file contents: {}", mFile, err); - return READ_ERROR; - } - - mLastTimestamp = result; - return result; - } - - final static String HEX_DIGITS = "0123456789abcdef"; - - public void writeStamp(long stamp) - throws IOException - { - // Let's do sanity check first: - if (stamp <= mLastTimestamp) { - /* same stamp is not dangerous, but pointless... so warning, - * not an error: - */ - if (stamp == mLastTimestamp) { - logger.warn("(file '{}') Trying to re-write existing timestamp ({})", mFile, stamp); - return; - } - throw new IOException(""+mFile+" trying to overwrite existing value ("+mLastTimestamp+") with an earlier timestamp ("+stamp+")"); - } - -//System.err.println("!!!! Syncing ["+mFile+"] with "+stamp+" !!!"); - - // Need to initialize the buffer? - if (mWriteBuffer == null) { - mWriteBuffer = ByteBuffer.allocate(DEFAULT_LENGTH); - mWriteBuffer.put(0, (byte) '['); - mWriteBuffer.put(1, (byte) '0'); - mWriteBuffer.put(2, (byte) 'x'); - mWriteBuffer.put(19, (byte) ']'); - mWriteBuffer.put(20, (byte) '\r'); - mWriteBuffer.put(21, (byte) '\n'); - } - - // Converting to hex is simple - for (int i = 18; i >= 3; --i) { - int val = (((int) stamp) & 0x0F); - mWriteBuffer.put(i, (byte) HEX_DIGITS.charAt(val)); - stamp = (stamp >> 4); - } - // and off we go: - mWriteBuffer.position(0); // to make sure we always write it all - mChannel.write(mWriteBuffer, 0L); - if (mWeirdSize) { - mRAFile.setLength(DEFAULT_LENGTH); - mWeirdSize = false; - } - - // This is probably not needed (as the random access file is supposedly synced)... but let's be safe: - mChannel.force(false); - - // And that's it! - } - - /* - ////////////////////////////////////////////////////////////// - // Internal methods - ////////////////////////////////////////////////////////////// - */ - - protected static void doDeactivate(File f, RandomAccessFile raf, - FileLock lock) - { - if (lock != null) { - try { - lock.release(); - } catch (Throwable t) { - logger.error("Failed to release lock (for file '{}')", f, t); - } - } - if (raf != null) { - try { - raf.close(); - } catch (Throwable t) { - logger.error("Failed to close file '{}'", f, t); - } - } - } -} - - diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/impl/NameBasedGenerator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/impl/NameBasedGenerator.java deleted file mode 100644 index 2605c073d882..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/impl/NameBasedGenerator.java +++ /dev/null @@ -1,162 +0,0 @@ -/* JUG Java Uuid Generator - * - * Copyright (c) 2002- Tatu Saloranta, tatu.saloranta@iki.fi - * - * Licensed under the License specified in the file LICENSE which is - * included with the source code. - * You may not use this file except in compliance with the License. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.uuid.impl; - -import com.azure.cosmos.implementation.uuid.StringArgGenerator; -import com.azure.cosmos.implementation.uuid.UUIDType; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.nio.charset.Charset; -import java.security.MessageDigest; -import java.util.UUID; - -/** - * Implementation of UUID generator that uses one of name-based generation methods - * (variants 3 (MD5) and 5 (SHA1)). - *<p> - * As all JUG provided implementations, this generator is fully thread-safe; access - * to digester is synchronized as necessary. - * - * @since 3.0 - */ -public class NameBasedGenerator extends StringArgGenerator -{ - - private static final Logger logger = LoggerFactory.getLogger(NameBasedGenerator.class); - - public final static Charset _utf8; - static { - _utf8 = Charset.forName("UTF-8"); - } - - /** - * Namespace used when name is a DNS name. - */ - public final static UUID NAMESPACE_DNS = UUID.fromString("6ba7b810-9dad-11d1-80b4-00c04fd430c8"); - - /** - * Namespace used when name is a URL. - */ - public final static UUID NAMESPACE_URL = UUID.fromString("6ba7b811-9dad-11d1-80b4-00c04fd430c8"); - /** - * Namespace used when name is an OID. - */ - public final static UUID NAMESPACE_OID = UUID.fromString("6ba7b812-9dad-11d1-80b4-00c04fd430c8"); - /** - * Namespace used when name is an X500 identifier - */ - public final static UUID NAMESPACE_X500 = UUID.fromString("6ba7b814-9dad-11d1-80b4-00c04fd430c8"); - - /* - /********************************************************************** - /* Configuration - /********************************************************************** - */ - - /** - * Namespace to use as prefix. - */ - protected final UUID _namespace; - - /** - * Message digesster to use for hash calculation - */ - protected final MessageDigest _digester; - - protected final UUIDType _type; - - /* - /********************************************************************** - /* Construction - /********************************************************************** - */ - - /** - * @param namespace of the namespace, as defined by the - * spec. UUID has 4 pre-defined "standard" name space strings - * that can be passed to UUID constructor (see example below). - * Note that this argument is optional; if no namespace is needed - * (for example when name includes namespace prefix), null may be passed. - * @param digester Hashing algorithm to use. - - */ - public NameBasedGenerator(UUID namespace, MessageDigest digester, UUIDType type) - { - _namespace = namespace; - // And default digester SHA-1 - if (digester == null) { - - } - if (type == null) { - String typeStr = digester.getAlgorithm(); - if (typeStr.startsWith("MD5")) { - type = UUIDType.NAME_BASED_MD5; - } else if (typeStr.startsWith("SHA")) { - type = UUIDType.NAME_BASED_SHA1; - } else { - // Hmmh... error out? Let's default to SHA-1, but log a warning - type = UUIDType.NAME_BASED_SHA1; - logger.warn("Could not determine type of Digester from '{}'; assuming 'SHA-1' type", typeStr); - } - } - _digester = digester; - _type = type; - } - - /* - /********************************************************************** - /* Access to config - /********************************************************************** - */ - - @Override - public UUIDType getType() { return _type; } - - public UUID getNamespace() { return _namespace; } - - /* - /********************************************************************** - /* UUID generation - /********************************************************************** - */ - - @Override - public UUID generate(String name) - { - // !!! TODO: 14-Oct-2010, tatu: can repurpose faster UTF-8 encoding from Jackson - return generate(name.getBytes(_utf8)); - } - - @Override - public UUID generate(byte[] nameBytes) - { - byte[] digest; - synchronized (_digester) { - _digester.reset(); - if (_namespace != null) { - _digester.update(UUIDUtil.asByteArray(_namespace)); - } - _digester.update(nameBytes); - digest = _digester.digest(); - } - return UUIDUtil.constructUUID(_type, digest); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/impl/RandomBasedGenerator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/impl/RandomBasedGenerator.java deleted file mode 100644 index 384b8a664d39..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/impl/RandomBasedGenerator.java +++ /dev/null @@ -1,137 +0,0 @@ -package com.azure.cosmos.implementation.uuid.impl; - -import com.azure.cosmos.implementation.uuid.NoArgGenerator; -import com.azure.cosmos.implementation.uuid.UUIDType; - -import java.security.SecureRandom; -import java.util.Random; -import java.util.UUID; - -/** - * Implementation of UUID generator that uses generation method 4. - *<p> - * Note on random number generation when using {@link SecureRandom} for random number - * generation: the first time {@link SecureRandom} object is used, there is noticeable delay between - * calling the method and getting the reply. This is because SecureRandom - * has to initialize itself to reasonably random state. Thus, if you - * want to lessen delay, it may be be a good idea to either get the - * first random UUID asynchronously from a separate thread, or to - * use the other generateRandomBasedUUID passing a previously initialized - * SecureRandom instance. - * - * @since 3.0 - */ -public class RandomBasedGenerator extends NoArgGenerator -{ - /** - * Default shared random number generator, used if no random number generator - * is explicitly specified for instance - */ - protected static Random _sharedRandom = null; - - /** - * Random number generator that this generator uses. - */ - protected final Random _random; - - /** - * Looks like {@link SecureRandom} implementation is more efficient - * using single call access (compared to basic {@link Random}), - * so let's use that knowledge to our benefit. - */ - protected final boolean _secureRandom; - - /** - * @param rnd Random number generator to use for generating UUIDs; if null, - * shared default generator is used. Note that it is strongly recommend to - * use a <b>good</b> (pseudo) random number generator; for example, JDK's - * {@link SecureRandom}. - */ - public RandomBasedGenerator(Random rnd) - { - if (rnd == null) { - rnd = LazyRandom.sharedSecureRandom(); - _secureRandom = true; - } else { - _secureRandom = (rnd instanceof SecureRandom); - } - _random = rnd; - } - - /* - /********************************************************************** - /* Access to config - /********************************************************************** - */ - - @Override - public UUIDType getType() { return UUIDType.RANDOM_BASED; } - - /* - /********************************************************************** - /* UUID generation - /********************************************************************** - */ - - @Override - public UUID generate() - { - /* 14-Oct-2010, tatu: Surprisingly, variant for reading byte array is - * tad faster for SecureRandom... so let's use that then - */ - long r1, r2; - - if (_secureRandom) { - final byte[] buffer = new byte[16]; - _random.nextBytes(buffer); - r1 = _toLong(buffer, 0); - r2 = _toLong(buffer, 1); - } else { - r1 = _random.nextLong(); - r2 = _random.nextLong(); - } - return UUIDUtil.constructUUID(UUIDType.RANDOM_BASED, r1, r2); - } - - /* - /********************************************************************** - /* Internal methods - /********************************************************************** - */ - - private final static long _toLong(byte[] buffer, int offset) - { - long l1 = _toInt(buffer, offset); - long l2 = _toInt(buffer, offset+4); - long l = (l1 << 32) + ((l2 << 32) >>> 32); - return l; - } - - private final static long _toInt(byte[] buffer, int offset) - { - return (buffer[offset] << 24) - + ((buffer[++offset] & 0xFF) << 16) - + ((buffer[++offset] & 0xFF) << 8) - + (buffer[++offset] & 0xFF); - } - - /* - /********************************************************************** - /* Helper classes - /********************************************************************** - */ - - /** - * Trivial helper class that uses class loading as synchronization - * mechanism for lazy instantation of the shared secure random - * instance. - */ - private final static class LazyRandom - { - private final static SecureRandom shared = new SecureRandom(); - - public static SecureRandom sharedSecureRandom() { - return shared; - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/impl/TimeBasedGenerator.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/impl/TimeBasedGenerator.java deleted file mode 100644 index 29d336b421fc..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/impl/TimeBasedGenerator.java +++ /dev/null @@ -1,135 +0,0 @@ -/* JUG Java Uuid Generator - * - * Copyright (c) 2002- Tatu Saloranta, tatu.saloranta@iki.fi - * - * Licensed under the License specified in the file LICENSE which is - * included with the source code. - * You may not use this file except in compliance with the License. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.uuid.impl; - -import com.azure.cosmos.implementation.uuid.EthernetAddress; -import com.azure.cosmos.implementation.uuid.NoArgGenerator; -import com.azure.cosmos.implementation.uuid.UUIDTimer; -import com.azure.cosmos.implementation.uuid.UUIDType; -import com.azure.cosmos.implementation.uuid.ext.FileBasedTimestampSynchronizer; - -import java.util.UUID; - -/** - * Implementation of UUID generator that uses time/location based generation - * method (variant 1). - *<p> - * As all JUG provided implementations, this generator is fully thread-safe. - * Additionally it can also be made externally synchronized with other - * instances (even ones running on other JVMs); to do this, - * use {@link FileBasedTimestampSynchronizer} - * (or equivalent). - * - * @since 3.0 - */ -public class TimeBasedGenerator extends NoArgGenerator -{ - /* - /********************************************************************** - /* Configuration - /********************************************************************** - */ - - protected final EthernetAddress _ethernetAddress; - - /** - * Object used for synchronizing access to timestamps, to guarantee - * that timestamps produced by this generator are unique and monotonically increasings. - * Some implementations offer even stronger guarantees, for example that - * same guarantee holds between instances running on different JVMs (or - * with native code). - */ - protected final UUIDTimer _timer; - - /** - * Base values for the second long (last 8 bytes) of UUID to construct - */ - protected final long _uuidL2; - - /* - /********************************************************************** - /* Construction - /********************************************************************** - */ - - /** - * @param ethAddr Hardware address (802.1) to use for generating - * spatially unique part of UUID. If system has more than one NIC, - */ - - public TimeBasedGenerator(EthernetAddress ethAddr, UUIDTimer timer) - { - byte[] uuidBytes = new byte[16]; - if (ethAddr == null) { - ethAddr = EthernetAddress.constructMulticastAddress(); - } - // initialize baseline with MAC address info - _ethernetAddress = ethAddr; - _ethernetAddress.toByteArray(uuidBytes, 10); - // and add clock sequence - int clockSeq = timer.getClockSequence(); - uuidBytes[UUIDUtil.BYTE_OFFSET_CLOCK_SEQUENCE] = (byte) (clockSeq >> 8); - uuidBytes[UUIDUtil.BYTE_OFFSET_CLOCK_SEQUENCE+1] = (byte) clockSeq; - long l2 = UUIDUtil.gatherLong(uuidBytes, 8); - _uuidL2 = UUIDUtil.initUUIDSecondLong(l2); - _timer = timer; - } - - /* - /********************************************************************** - /* Access to config - /********************************************************************** - */ - - @Override - public UUIDType getType() { return UUIDType.TIME_BASED; } - - public EthernetAddress getEthernetAddress() { return _ethernetAddress; } - - /* - /********************************************************************** - /* UUID generation - /********************************************************************** - */ - - /* As timer is not synchronized (nor _uuidBytes), need to sync; but most - * importantly, synchronize on timer which may also be shared between - * multiple instances - */ - @Override - public UUID generate() - { - final long rawTimestamp = _timer.getTimestamp(); - // Time field components are kind of shuffled, need to slice: - int clockHi = (int) (rawTimestamp >>> 32); - int clockLo = (int) rawTimestamp; - // and dice - int midhi = (clockHi << 16) | (clockHi >>> 16); - // need to squeeze in type (4 MSBs in byte 6, clock hi) - midhi &= ~0xF000; // remove high nibble of 6th byte - midhi |= 0x1000; // type 1 - long midhiL = (long) midhi; - midhiL = ((midhiL << 32) >>> 32); // to get rid of sign extension - // and reconstruct - long l1 = (((long) clockLo) << 32) | midhiL; - // last detail: must force 2 MSB to be '10' - return new UUID(l1, _uuidL2); - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/impl/UUIDUtil.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/impl/UUIDUtil.java deleted file mode 100644 index a2f9f429ed08..000000000000 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/uuid/impl/UUIDUtil.java +++ /dev/null @@ -1,327 +0,0 @@ -/* JUG Java Uuid Generator - * - * Copyright (c) 2002- Tatu Saloranta, tatu.saloranta@iki.fi - * - * Licensed under the License specified in the file LICENSE which is - * included with the source code. - * You may not use this file except in compliance with the License. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Portions Copyright (c) Microsoft Corporation - */ - -package com.azure.cosmos.implementation.uuid.impl; - -import com.azure.cosmos.implementation.uuid.UUIDType; - -import java.util.UUID; - -public class UUIDUtil -{ - public final static int BYTE_OFFSET_CLOCK_LO = 0; - public final static int BYTE_OFFSET_CLOCK_MID = 4; - public final static int BYTE_OFFSET_CLOCK_HI = 6; - - // note: clock-hi and type occupy same byte (different bits) - public final static int BYTE_OFFSET_TYPE = 6; - - // similarly, clock sequence and variant are multiplexed - public final static int BYTE_OFFSET_CLOCK_SEQUENCE = 8; - public final static int BYTE_OFFSET_VARIATION = 8; - - /* - /********************************************************************** - /* Construction (can instantiate, although usually not necessary) - /********************************************************************** - */ - - // note: left public just for convenience; all functionality available - // via static methods - public UUIDUtil() { } - - /* - /********************************************************************** - /* Factory methods - /********************************************************************** - */ - - /** - * Factory method for creating UUIDs from the canonical string - * representation. - * - * @param id String that contains the canonical representation of - * the UUID to build; 36-char string (see UUID specs for details). - * Hex-chars may be in upper-case too; UUID class will always output - * them in lowercase. - */ - public static UUID uuid(String id) - { - if (id == null) { - throw new NullPointerException(); - } - if (id.length() != 36) { - throw new NumberFormatException("UUID has to be represented by the standard 36-char representation"); - } - - long lo, hi; - lo = hi = 0; - - for (int i = 0, j = 0; i < 36; ++j) { - - // Need to bypass hyphens: - switch (i) { - case 8: - case 13: - case 18: - case 23: - if (id.charAt(i) != '-') { - throw new NumberFormatException("UUID has to be represented by the standard 36-char representation"); - } - ++i; - } - int curr; - char c = id.charAt(i); - - if (c >= '0' && c <= '9') { - curr = (c - '0'); - } else if (c >= 'a' && c <= 'f') { - curr = (c - 'a' + 10); - } else if (c >= 'A' && c <= 'F') { - curr = (c - 'A' + 10); - } else { - throw new NumberFormatException("Non-hex character at #"+i+": '"+c - +"' (value 0x"+Integer.toHexString(c)+")"); - } - curr = (curr << 4); - - c = id.charAt(++i); - - if (c >= '0' && c <= '9') { - curr |= (c - '0'); - } else if (c >= 'a' && c <= 'f') { - curr |= (c - 'a' + 10); - } else if (c >= 'A' && c <= 'F') { - curr |= (c - 'A' + 10); - } else { - throw new NumberFormatException("Non-hex character at #"+i+": '"+c - +"' (value 0x"+Integer.toHexString(c)+")"); - } - if (j < 8) { - hi = (hi << 8) | curr; - } else { - lo = (lo << 8) | curr; - } - ++i; - } - return new UUID(hi, lo); - } - - /** - * Factory method for constructing {@link UUID} instance from given - * 16 bytes. - * NOTE: since absolutely no validation is done for contents, this method should - * only be used if contents are known to be valid. - */ - public static UUID uuid(byte[] bytes) - { - _checkUUIDByteArray(bytes, 0); - long l1 = gatherLong(bytes, 0); - long l2 = gatherLong(bytes, 8); - return new UUID(l1, l2); - } - - /** - * Factory method for constructing {@link UUID} instance from given - * 16 bytes. - * NOTE: since absolutely no validation is done for contents, this method should - * only be used if contents are known to be valid. - * - * @param bytes Array that contains sequence of 16 bytes that contain a valid UUID - * @param offset Offset of the first of 16 bytes - */ - public static UUID uuid(byte[] bytes, int offset) - { - _checkUUIDByteArray(bytes, offset); - return new UUID(gatherLong(bytes, offset), gatherLong(bytes, offset+8)); - } - - /** - * Helper method for constructing UUID instances with appropriate type - */ - public static UUID constructUUID(UUIDType type, byte[] uuidBytes) - { - // first, ensure type is ok - int b = uuidBytes[BYTE_OFFSET_TYPE] & 0xF; // clear out high nibble - b |= type.raw() << 4; - uuidBytes[BYTE_OFFSET_TYPE] = (byte) b; - // second, ensure variant is properly set too - b = uuidBytes[UUIDUtil.BYTE_OFFSET_VARIATION] & 0x3F; // remove 2 MSB - b |= 0x80; // set as '10' - uuidBytes[BYTE_OFFSET_VARIATION] = (byte) b; - return uuid(uuidBytes); - } - - public static UUID constructUUID(UUIDType type, long l1, long l2) - { - // first, ensure type is ok - l1 &= ~0xF000L; // remove high nibble of 6th byte - l1 |= (long) (type.raw() << 12); - // second, ensure variant is properly set too (8th byte; most-sig byte of second long) - l2 = ((l2 << 2) >>> 2); // remove 2 MSB - l2 |= (2L << 62); // set 2 MSB to '10' - return new UUID(l1, l2); - } - - public static long initUUIDFirstLong(long l1, UUIDType type) - { - return initUUIDFirstLong(l1, type.raw()); - } - - public static long initUUIDFirstLong(long l1, int rawType) - { - l1 &= ~0xF000L; // remove high nibble of 6th byte - l1 |= (long) (rawType << 12); - return l1; - } - - public static long initUUIDSecondLong(long l2) - { - l2 = ((l2 << 2) >>> 2); // remove 2 MSB - l2 |= (2L << 62); // set 2 MSB to '10' - return l2; - } - - /* - /*********************************************************************** - /* Type introspection - /*********************************************************************** - */ - - /** - * Method for determining which type of UUID given UUID is. - * Returns null if type can not be determined. - * - * @param uuid UUID to check - * - * @return Null if UUID is null or type can not be determined (== invalid UUID); - * otherwise type - */ - public static UUIDType typeOf(UUID uuid) - { - if (uuid == null) { - return null; - } - // Ok: so 4 MSB of byte at offset 6... - long l = uuid.getMostSignificantBits(); - int typeNibble = (((int) l) >> 12) & 0xF; - switch (typeNibble) { - case 0: - // possibly null? - if (l == 0L && uuid.getLeastSignificantBits() == l) { - return UUIDType.UNKNOWN; - } - break; - case 1: - return UUIDType.TIME_BASED; - case 2: - return UUIDType.DCE; - case 3: - return UUIDType.NAME_BASED_MD5; - case 4: - return UUIDType.RANDOM_BASED; - case 5: - return UUIDType.NAME_BASED_SHA1; - } - // not recognized: return null - return null; - } - - /* - /*********************************************************************** - /* Conversions to other types - /*********************************************************************** - */ - - public static byte[] asByteArray(UUID uuid) - { - long hi = uuid.getMostSignificantBits(); - long lo = uuid.getLeastSignificantBits(); - byte[] result = new byte[16]; - _appendInt((int) (hi >> 32), result, 0); - _appendInt((int) hi, result, 4); - _appendInt((int) (lo >> 32), result, 8); - _appendInt((int) lo, result, 12); - return result; - } - - public static void toByteArray(UUID uuid, byte[] buffer) { - toByteArray(uuid, buffer, 0); - } - - public static void toByteArray(UUID uuid, byte[] buffer, int offset) - { - _checkUUIDByteArray(buffer, offset); - long hi = uuid.getMostSignificantBits(); - long lo = uuid.getLeastSignificantBits(); - _appendInt((int) (hi >> 32), buffer, offset); - _appendInt((int) hi, buffer, offset+4); - _appendInt((int) (lo >> 32), buffer, offset+8); - _appendInt((int) lo, buffer, offset+12); - } - - /* - /******************************************************************************** - /* Package helper methods - /******************************************************************************** - */ - - //private final static long MASK_LOW_INT = 0x0FFFFFFFF; - - protected final static long gatherLong(byte[] buffer, int offset) - { - long hi = ((long) _gatherInt(buffer, offset)) << 32; - //long lo = ((long) _gatherInt(buffer, offset+4)) & MASK_LOW_INT; - long lo = (((long) _gatherInt(buffer, offset+4)) << 32) >>> 32; - return hi | lo; - } - - /* - /******************************************************************************** - /* Internal helper methods - /******************************************************************************** - */ - - private final static void _appendInt(int value, byte[] buffer, int offset) - { - buffer[offset++] = (byte) (value >> 24); - buffer[offset++] = (byte) (value >> 16); - buffer[offset++] = (byte) (value >> 8); - buffer[offset] = (byte) value; - } - - private final static int _gatherInt(byte[] buffer, int offset) - { - return (buffer[offset] << 24) | ((buffer[offset+1] & 0xFF) << 16) - | ((buffer[offset+2] & 0xFF) << 8) | (buffer[offset+3] & 0xFF); - } - - private final static void _checkUUIDByteArray(byte[] bytes, int offset) - { - if (bytes == null) { - throw new IllegalArgumentException("Invalid byte[] passed: can not be null"); - } - if (offset < 0) { - throw new IllegalArgumentException("Invalid offset ("+offset+") passed: can not be negative"); - } - if ((offset + 16) > bytes.length) { - throw new IllegalArgumentException("Invalid offset ("+offset+") passed: not enough room in byte array (need 16 bytes)"); - } - } -} diff --git a/sdk/cosmos/azure-cosmos/src/main/java/module-info.java b/sdk/cosmos/azure-cosmos/src/main/java/module-info.java index f69228ebe38b..6479868df882 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/module-info.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/module-info.java @@ -39,7 +39,6 @@ exports com.azure.cosmos.implementation.apachecommons.lang to com.azure.cosmos.encryption, com.azure.cosmos.test, com.azure.cosmos.kafka.connect; exports com.azure.cosmos.implementation.guava25.base to com.azure.cosmos.encryption, com.azure.cosmos.test, com.azure.cosmos.kafka.connect; exports com.azure.cosmos.implementation.guava25.collect to com.azure.cosmos.encryption, com.azure.cosmos.test, com.azure.cosmos.kafka.connect; - exports com.azure.cosmos.implementation.guava27 to com.azure.cosmos.encryption, com.azure.cosmos.test, com.azure.cosmos.kafka.connect; exports com.azure.cosmos.implementation.directconnectivity to com.azure.cosmos.encryption, com.azure.cosmos.test; opens com.azure.cosmos.implementation to com.fasterxml.jackson.databind, java.logging, com.fasterxml.jackson.module.afterburner; diff --git a/sdk/cosmos/cgmanifest.json b/sdk/cosmos/cgmanifest.json index a0a2127bceff..e7c03ac900f1 100644 --- a/sdk/cosmos/cgmanifest.json +++ b/sdk/cosmos/cgmanifest.json @@ -2,16 +2,6 @@ "$schema": "https://json.schemastore.org/component-detection-manifest.json", "version": 1, "registrations": [ - { - "component": { - "type": "maven", - "maven": { - "groupId": "com.google.guava", - "artifactId": "guava", - "version": "27.0.1-jre" - } - } - }, { "component": { "type": "maven", @@ -51,36 +41,6 @@ "version": "3.8.1" } } - }, - { - "component": { - "type": "maven", - "maven": { - "groupId": "org.apache.commons", - "artifactId": "commons-math3", - "version": "3.6.1" - } - } - }, - { - "component": { - "type": "maven", - "maven": { - "groupId": "com.fasterxml.uuid", - "artifactId": "java-uuid-generator", - "version": "4.0.1" - } - } - }, - { - "component": { - "type": "maven", - "maven": { - "groupId": "commons-codec", - "artifactId": "commons-codec", - "version": "1.14" - } - } } ] } From ba4a4116639a0158ecc06c0e07072ed06a8aa778 Mon Sep 17 00:00:00 2001 From: Ray Chen <raychen@microsoft.com> Date: Wed, 3 Dec 2025 15:12:54 -0800 Subject: [PATCH 094/186] Migrated pipeline templates to use 'verify-changelogs.yml' for changelog verification (#47420) * Consumed verify-changelogs yml * temp change for the verify-changelogs yml * added log for changelog verification * Analyze step depends on the build * Generate package info before verify changelog step * Moved the save package property step to the location after set test pipeline version step * Reverted change of files under eng/common * Removed depend on * Moved verify changelog step to build job --- eng/pipelines/templates/jobs/ci.yml | 19 +++++------------- .../stages/archetype-java-release-batch.yml | 12 +++++------ .../stages/archetype-sdk-client-patch.yml | 20 ++++++------------- 3 files changed, 17 insertions(+), 34 deletions(-) diff --git a/eng/pipelines/templates/jobs/ci.yml b/eng/pipelines/templates/jobs/ci.yml index 633498c91e28..81a0c1cc6ca8 100644 --- a/eng/pipelines/templates/jobs/ci.yml +++ b/eng/pipelines/templates/jobs/ci.yml @@ -184,6 +184,11 @@ jobs: displayName: Update package properties with dev version condition: and(succeeded(), eq(variables['SetDevVersion'],'true')) + - ${{if ne(parameters.SDKType, 'data')}}: + - template: /eng/common/pipelines/templates/steps/verify-changelogs.yml + parameters: + PackagePropertiesFolder: $(Build.ArtifactStagingDirectory)/PackageInfo + - script: | python -m pip install markdown2==2.4.6 BeautifulSoup4==4.11.1 displayName: 'pip install markdown2 and BeautifulSoup4' @@ -390,20 +395,6 @@ jobs: SourceDirectory: $(Build.SourcesDirectory) BasePathLength: 38 - - ${{if ne(parameters.SDKType, 'data')}}: - - ${{ if and(eq(variables['Build.Reason'], 'PullRequest'), eq(parameters.ServiceDirectory, 'auto')) }}: - - template: /eng/common/pipelines/templates/steps/verify-changelogs.yml - parameters: - PackagePropertiesFolder: $(Build.ArtifactStagingDirectory)/PackageInfo - - ${{ else }}: - - ${{ each artifact in parameters.Artifacts }}: - - ${{if ne(artifact.skipVerifyChangelog, 'true')}}: - - template: /eng/common/pipelines/templates/steps/verify-changelog.yml - parameters: - PackageName: ${{artifact.name}} - ServiceName: ${{parameters.ServiceDirectory}} - ForRelease: false - - task: UseNode@1 inputs: version: 22.x diff --git a/eng/pipelines/templates/stages/archetype-java-release-batch.yml b/eng/pipelines/templates/stages/archetype-java-release-batch.yml index 2d76d4878abb..f50b06a2839a 100644 --- a/eng/pipelines/templates/stages/archetype-java-release-batch.yml +++ b/eng/pipelines/templates/stages/archetype-java-release-batch.yml @@ -152,13 +152,13 @@ stages: } displayName: "Verify no unreleased dependencies or beta dependencies for GA libraries" + - ${{if ne(parameters.SDKType, 'data')}}: + - template: /eng/common/pipelines/templates/steps/verify-changelogs.yml + parameters: + PackagePropertiesFolder: $(Pipeline.Workspace)/packages-signed/PackageInfo + ForRelease: true + - ${{ each artifact in parameters.Artifacts }}: - - ${{if and(ne(parameters.SDKType, 'data'), ne(artifact.skipVerifyChangelog, 'true'))}}: - - template: /eng/common/pipelines/templates/steps/verify-changelog.yml - parameters: - PackageName: ${{artifact.name}} - ServiceName: ${{parameters.ServiceDirectory}} - ForRelease: true # Verify both TypeSpec and swagger specification are from the main branch of Azure/azure-rest-api-specs repo. - template: /eng/common/pipelines/templates/steps/verify-restapi-spec-location.yml parameters: diff --git a/eng/pipelines/templates/stages/archetype-sdk-client-patch.yml b/eng/pipelines/templates/stages/archetype-sdk-client-patch.yml index ea159f5774a9..fef0435d4538 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client-patch.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client-patch.yml @@ -110,6 +110,12 @@ extends: workingDirectory: $(Pipeline.Workspace) displayName: "Save Package Properties" + - ${{if ne(parameters.SDKType, 'data')}}: + - template: /eng/common/pipelines/templates/steps/verify-changelogs.yml + parameters: + PackagePropertiesFolder: $(Build.ArtifactStagingDirectory)/PackageInfo + ForRelease: true + - task: Maven@4 displayName: 'Build From Source and Package, JDK Version: ${{ parameters.JavaBuildVersion }}' inputs: @@ -282,20 +288,6 @@ extends: SourceDirectory: $(Build.SourcesDirectory) BasePathLength: 38 - # Verify changelog, the way it currently works would require a complete overhaul in order to be able to deal - # with multiple artifacts and multiple service directories. Even ignoring this, there's still the fact that each - # artifact's metadata can cause this step to be skipped, so we still need to loop over this. - - ${{if ne(parameters.SDKType, 'data')}}: - - ${{ each artifact in parameters.Artifacts }}: - - ${{if ne(artifact.skipVerifyChangelog, 'true')}}: - - template: /eng/common/pipelines/templates/steps/verify-changelog.yml - parameters: - PackageName: ${{artifact.name}} - ServiceName: ${{artifact.ServiceDirectory}} - # Note: For the patch release pipeline there's no point in verifying the non-release changelog since - # the only time this pipeline should run is for a patch release. - ForRelease: true - - template: /eng/common/pipelines/templates/steps/eng-common-workflow-enforcer.yml # This pipeline should never get kicked off outside an internal, manual run. Put the checks here so the pipeline never From d1d626938e93fb28676d7e6439e917eeb036cb0e Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 3 Dec 2025 15:49:23 -0800 Subject: [PATCH 095/186] Increment package versions for storage releases (#47440) --- eng/versioning/version_client.txt | 20 +++++++++---------- .../azure-storage-blob-batch/CHANGELOG.md | 10 ++++++++++ sdk/storage/azure-storage-blob-batch/pom.xml | 6 +++--- .../CHANGELOG.md | 10 ++++++++++ .../azure-storage-blob-changefeed/pom.xml | 6 +++--- .../CHANGELOG.md | 10 ++++++++++ .../azure-storage-blob-cryptography/pom.xml | 6 +++--- .../azure-storage-blob-nio/CHANGELOG.md | 10 ++++++++++ sdk/storage/azure-storage-blob-nio/pom.xml | 6 +++--- sdk/storage/azure-storage-blob-stress/pom.xml | 2 +- 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 +- .../pom.xml | 2 +- .../azure-storage-file-datalake/CHANGELOG.md | 10 ++++++++++ .../azure-storage-file-datalake/pom.xml | 6 +++--- .../azure-storage-file-share-stress/pom.xml | 2 +- .../azure-storage-file-share/CHANGELOG.md | 10 ++++++++++ sdk/storage/azure-storage-file-share/pom.xml | 8 ++++---- .../azure-storage-internal-avro/CHANGELOG.md | 10 ++++++++++ .../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 +++--- 25 files changed, 147 insertions(+), 47 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 1b7313639ee8..e053f4f6c2a7 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -190,17 +190,17 @@ com.azure:azure-sdk-template-three;1.0.0-beta.1;1.0.0-beta.1 com.azure.v2:azure-sdk-template;1.0.1-beta.1;1.0.1-beta.1 com.azure.v2:azure-sdk-template-two;1.0.0-beta.1;1.0.0-beta.1 com.azure.v2:azure-sdk-template-three;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-storage-blob;12.32.0;12.33.0-beta.1 -com.azure:azure-storage-blob-batch;12.28.0;12.29.0-beta.1 -com.azure:azure-storage-blob-changefeed;12.0.0-beta.32;12.0.0-beta.33 -com.azure:azure-storage-blob-cryptography;12.31.0;12.32.0-beta.1 -com.azure:azure-storage-blob-nio;12.0.0-beta.33;12.0.0-beta.34 -com.azure:azure-storage-common;12.31.0;12.32.0-beta.1 -com.azure:azure-storage-file-share;12.28.0;12.29.0-beta.1 -com.azure:azure-storage-file-datalake;12.25.0;12.26.0-beta.1 -com.azure:azure-storage-internal-avro;12.17.0;12.18.0-beta.1 +com.azure:azure-storage-blob;12.32.0;12.33.0-beta.2 +com.azure:azure-storage-blob-batch;12.28.0;12.29.0-beta.2 +com.azure:azure-storage-blob-changefeed;12.0.0-beta.33;12.0.0-beta.34 +com.azure:azure-storage-blob-cryptography;12.31.0;12.32.0-beta.2 +com.azure:azure-storage-blob-nio;12.0.0-beta.34;12.0.0-beta.35 +com.azure:azure-storage-common;12.31.0;12.32.0-beta.2 +com.azure:azure-storage-file-share;12.28.0;12.29.0-beta.2 +com.azure:azure-storage-file-datalake;12.25.0;12.26.0-beta.2 +com.azure:azure-storage-internal-avro;12.17.0;12.18.0-beta.2 com.azure:azure-storage-perf;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-storage-queue;12.27.0;12.28.0-beta.1 +com.azure:azure-storage-queue;12.27.0;12.28.0-beta.2 com.azure:azure-template-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-template-stress;1.0.0-beta.1;1.0.0-beta.1 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 24779f23c28d..0dd2063b80f5 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.29.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.29.0-beta.1 (2025-12-03) ### Features Added diff --git a/sdk/storage/azure-storage-blob-batch/pom.xml b/sdk/storage/azure-storage-blob-batch/pom.xml index 2b6c0efd2fb0..4f67433b2f1e 100644 --- a/sdk/storage/azure-storage-blob-batch/pom.xml +++ b/sdk/storage/azure-storage-blob-batch/pom.xml @@ -13,7 +13,7 @@ <groupId>com.azure</groupId> <artifactId>azure-storage-blob-batch</artifactId> - <version>12.29.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-blob-batch;current} --> + <version>12.29.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-blob-batch;current} --> <name>Microsoft Azure client library for Blob Storage batching</name> <description>This module contains client library for Microsoft Azure Blob Storage batching.</description> @@ -67,7 +67,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-blob</artifactId> - <version>12.33.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> + <version>12.33.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> </dependency> <!-- Added this dependency to include necessary annotations used by reactor core. @@ -83,7 +83,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-common</artifactId> - <version>12.32.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> + <version>12.32.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> <classifier>tests</classifier> <type>test-jar</type> <scope>test</scope> diff --git a/sdk/storage/azure-storage-blob-changefeed/CHANGELOG.md b/sdk/storage/azure-storage-blob-changefeed/CHANGELOG.md index a105df27b6ee..1180731a26ee 100644 --- a/sdk/storage/azure-storage-blob-changefeed/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob-changefeed/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.0.0-beta.34 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.0.0-beta.33 (2025-12-03) ### Features Added diff --git a/sdk/storage/azure-storage-blob-changefeed/pom.xml b/sdk/storage/azure-storage-blob-changefeed/pom.xml index 3f49c060b9e1..9a5115608c38 100644 --- a/sdk/storage/azure-storage-blob-changefeed/pom.xml +++ b/sdk/storage/azure-storage-blob-changefeed/pom.xml @@ -13,7 +13,7 @@ <groupId>com.azure</groupId> <artifactId>azure-storage-blob-changefeed</artifactId> - <version>12.0.0-beta.33</version> <!-- {x-version-update;com.azure:azure-storage-blob-changefeed;current} --> + <version>12.0.0-beta.34</version> <!-- {x-version-update;com.azure:azure-storage-blob-changefeed;current} --> <name>Microsoft Azure client library for Blob Storage changefeed</name> <description>This module contains client library for Microsoft Azure Blob Storage changefeed.</description> @@ -79,7 +79,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-blob</artifactId> - <version>12.33.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> + <version>12.33.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> </dependency> <!-- Added this dependency to include necessary annotations used by reactor core. @@ -95,7 +95,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-common</artifactId> - <version>12.32.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> + <version>12.32.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> <classifier>tests</classifier> <type>test-jar</type> <scope>test</scope> diff --git a/sdk/storage/azure-storage-blob-cryptography/CHANGELOG.md b/sdk/storage/azure-storage-blob-cryptography/CHANGELOG.md index 58d1c938ede5..967424dc8cee 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.32.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.32.0-beta.1 (2025-12-03) ### Features Added diff --git a/sdk/storage/azure-storage-blob-cryptography/pom.xml b/sdk/storage/azure-storage-blob-cryptography/pom.xml index eb0aaac7cd87..1dabc7c7f82c 100644 --- a/sdk/storage/azure-storage-blob-cryptography/pom.xml +++ b/sdk/storage/azure-storage-blob-cryptography/pom.xml @@ -13,7 +13,7 @@ <groupId>com.azure</groupId> <artifactId>azure-storage-blob-cryptography</artifactId> - <version>12.32.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-blob-cryptography;current} --> + <version>12.32.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-blob-cryptography;current} --> <name>Microsoft Azure client library for Blob Storage cryptography</name> <description>This module contains client library for Microsoft Azure Blob Storage cryptography.</description> @@ -73,13 +73,13 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-blob</artifactId> - <version>12.33.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> + <version>12.33.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-common</artifactId> - <version>12.32.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> + <version>12.32.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> <classifier>tests</classifier> <type>test-jar</type> <scope>test</scope> diff --git a/sdk/storage/azure-storage-blob-nio/CHANGELOG.md b/sdk/storage/azure-storage-blob-nio/CHANGELOG.md index 70466b927dfa..81c53dad0c3e 100644 --- a/sdk/storage/azure-storage-blob-nio/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob-nio/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.0.0-beta.35 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.0.0-beta.34 (2025-12-03) ### Features Added diff --git a/sdk/storage/azure-storage-blob-nio/pom.xml b/sdk/storage/azure-storage-blob-nio/pom.xml index 767491c79a2f..2db394bd0152 100644 --- a/sdk/storage/azure-storage-blob-nio/pom.xml +++ b/sdk/storage/azure-storage-blob-nio/pom.xml @@ -13,7 +13,7 @@ <groupId>com.azure</groupId> <artifactId>azure-storage-blob-nio</artifactId> - <version>12.0.0-beta.34</version> <!-- {x-version-update;com.azure:azure-storage-blob-nio;current} --> + <version>12.0.0-beta.35</version> <!-- {x-version-update;com.azure:azure-storage-blob-nio;current} --> <name>Microsoft Azure implementation of NIO on top of Azure Blob Storage</name> <description>This module contains an implementation of Java's NIO interface on top of Azure Blob Storage.</description> <url>https://github.com/Azure/azure-sdk-for-java</url> @@ -65,13 +65,13 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-blob</artifactId> - <version>12.33.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> + <version>12.33.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-common</artifactId> - <version>12.32.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> + <version>12.32.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> <classifier>tests</classifier> <type>test-jar</type> <scope>test</scope> diff --git a/sdk/storage/azure-storage-blob-stress/pom.xml b/sdk/storage/azure-storage-blob-stress/pom.xml index 0bd0b13c5944..ea057704b211 100644 --- a/sdk/storage/azure-storage-blob-stress/pom.xml +++ b/sdk/storage/azure-storage-blob-stress/pom.xml @@ -40,7 +40,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-blob</artifactId> - <version>12.33.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> + <version>12.33.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index 0b698c4aaa5b..2a99dac0ecf7 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.33.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.33.0-beta.1 (2025-12-03) ### Features Added diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 4e6b2056abee..739b2eece7c6 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -13,7 +13,7 @@ <groupId>com.azure</groupId> <artifactId>azure-storage-blob</artifactId> - <version>12.33.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> + <version>12.33.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> <name>Microsoft Azure client library for Blob Storage</name> <description>This module contains client library for Microsoft Azure Blob Storage.</description> @@ -81,12 +81,12 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-common</artifactId> - <version>12.32.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> + <version>12.32.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-internal-avro</artifactId> - <version>12.18.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-internal-avro;current} --> + <version>12.18.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-internal-avro;current} --> </dependency> <!-- Added this dependency to include necessary annotations used by reactor core. @@ -101,7 +101,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-common</artifactId> - <version>12.32.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> + <version>12.32.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> <classifier>tests</classifier> <type>test-jar</type> <scope>test</scope> diff --git a/sdk/storage/azure-storage-common/CHANGELOG.md b/sdk/storage/azure-storage-common/CHANGELOG.md index e063dd51e3bb..9c792ea8f5e3 100644 --- a/sdk/storage/azure-storage-common/CHANGELOG.md +++ b/sdk/storage/azure-storage-common/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.32.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.32.0-beta.1 (2025-12-03) ### Features Added diff --git a/sdk/storage/azure-storage-common/pom.xml b/sdk/storage/azure-storage-common/pom.xml index 8c284d249730..0175ce7a8690 100644 --- a/sdk/storage/azure-storage-common/pom.xml +++ b/sdk/storage/azure-storage-common/pom.xml @@ -13,7 +13,7 @@ <groupId>com.azure</groupId> <artifactId>azure-storage-common</artifactId> - <version>12.32.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> + <version>12.32.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> <name>Microsoft Azure common module for Storage</name> <description>This module contains common code based for all Microsoft Azure Storage client libraries.</description> diff --git a/sdk/storage/azure-storage-file-datalake-stress/pom.xml b/sdk/storage/azure-storage-file-datalake-stress/pom.xml index a1e747272b0e..6f6c7ea70eef 100644 --- a/sdk/storage/azure-storage-file-datalake-stress/pom.xml +++ b/sdk/storage/azure-storage-file-datalake-stress/pom.xml @@ -40,7 +40,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-file-datalake</artifactId> - <version>12.26.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-file-datalake;current} --> + <version>12.26.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-file-datalake;current} --> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md index 1f808020a68f..cfe4e7100c6f 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.26.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.26.0-beta.1 (2025-12-03) ### Features Added diff --git a/sdk/storage/azure-storage-file-datalake/pom.xml b/sdk/storage/azure-storage-file-datalake/pom.xml index 8850723ef5bb..e2dd9793fb61 100644 --- a/sdk/storage/azure-storage-file-datalake/pom.xml +++ b/sdk/storage/azure-storage-file-datalake/pom.xml @@ -13,7 +13,7 @@ <groupId>com.azure</groupId> <artifactId>azure-storage-file-datalake</artifactId> - <version>12.26.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-file-datalake;current} --> + <version>12.26.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-file-datalake;current} --> <name>Microsoft Azure client library for File Storage Data Lake</name> <description>This module contains client library for Microsoft Azure File Storage Data Lake.</description> @@ -78,7 +78,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-blob</artifactId> - <version>12.33.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> + <version>12.33.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> </dependency> <!-- Added this dependency to include necessary annotations used by reactor core. @@ -94,7 +94,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-common</artifactId> - <version>12.32.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> + <version>12.32.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> <classifier>tests</classifier> <type>test-jar</type> <scope>test</scope> diff --git a/sdk/storage/azure-storage-file-share-stress/pom.xml b/sdk/storage/azure-storage-file-share-stress/pom.xml index d20465075b24..8586aba7bd02 100644 --- a/sdk/storage/azure-storage-file-share-stress/pom.xml +++ b/sdk/storage/azure-storage-file-share-stress/pom.xml @@ -40,7 +40,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-file-share</artifactId> - <version>12.29.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-file-share;current} --> + <version>12.29.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-file-share;current} --> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/storage/azure-storage-file-share/CHANGELOG.md b/sdk/storage/azure-storage-file-share/CHANGELOG.md index d25557538553..22b85c3931f0 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.29.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.29.0-beta.1 (2025-12-03) ### Features Added diff --git a/sdk/storage/azure-storage-file-share/pom.xml b/sdk/storage/azure-storage-file-share/pom.xml index 5642ef503751..84549d6f05f5 100644 --- a/sdk/storage/azure-storage-file-share/pom.xml +++ b/sdk/storage/azure-storage-file-share/pom.xml @@ -13,7 +13,7 @@ <groupId>com.azure</groupId> <artifactId>azure-storage-file-share</artifactId> - <version>12.29.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-file-share;current} --> + <version>12.29.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-file-share;current} --> <name>Microsoft Azure client library for File Share Storage</name> <description>This module contains client library for Microsoft Azure File Share Storage.</description> @@ -78,13 +78,13 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-common</artifactId> - <version>12.32.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> + <version>12.32.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-common</artifactId> - <version>12.32.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> + <version>12.32.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> <classifier>tests</classifier> <type>test-jar</type> <scope>test</scope> @@ -115,7 +115,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-blob</artifactId> - <version>12.33.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> + <version>12.33.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/storage/azure-storage-internal-avro/CHANGELOG.md b/sdk/storage/azure-storage-internal-avro/CHANGELOG.md index e2f927d3c80f..3226d4fcfde9 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.18.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.18.0-beta.1 (2025-12-03) ### Features Added diff --git a/sdk/storage/azure-storage-internal-avro/pom.xml b/sdk/storage/azure-storage-internal-avro/pom.xml index f0200a0c684a..a4d21895ec29 100644 --- a/sdk/storage/azure-storage-internal-avro/pom.xml +++ b/sdk/storage/azure-storage-internal-avro/pom.xml @@ -13,7 +13,7 @@ <groupId>com.azure</groupId> <artifactId>azure-storage-internal-avro</artifactId> - <version>12.18.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-internal-avro;current} --> + <version>12.18.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-internal-avro;current} --> <name>Microsoft Azure internal Avro module for Storage</name> <description>This module contains internal use only avro parser code based for Microsoft Azure Storage client libraries.</description> @@ -60,7 +60,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-common</artifactId> - <version>12.32.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> + <version>12.32.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> </dependency> <dependency> @@ -72,7 +72,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-common</artifactId> - <version>12.32.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> + <version>12.32.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> <classifier>tests</classifier> <type>test-jar</type> <scope>test</scope> diff --git a/sdk/storage/azure-storage-perf/pom.xml b/sdk/storage/azure-storage-perf/pom.xml index 5bff8705a3c3..c1bdfaa05da3 100644 --- a/sdk/storage/azure-storage-perf/pom.xml +++ b/sdk/storage/azure-storage-perf/pom.xml @@ -25,25 +25,25 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-blob</artifactId> - <version>12.33.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> + <version>12.33.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} --> </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-blob-cryptography</artifactId> - <version>12.32.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-blob-cryptography;current} --> + <version>12.32.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-blob-cryptography;current} --> </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-file-datalake</artifactId> - <version>12.26.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-file-datalake;current} --> + <version>12.26.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-file-datalake;current} --> </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-file-share</artifactId> - <version>12.29.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-file-share;current} --> + <version>12.29.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-file-share;current} --> </dependency> <dependency> diff --git a/sdk/storage/azure-storage-queue/CHANGELOG.md b/sdk/storage/azure-storage-queue/CHANGELOG.md index e054610c692c..bb553c5ec5c0 100644 --- a/sdk/storage/azure-storage-queue/CHANGELOG.md +++ b/sdk/storage/azure-storage-queue/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.28.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.28.0-beta.1 (2025-12-03) ### Features Added diff --git a/sdk/storage/azure-storage-queue/pom.xml b/sdk/storage/azure-storage-queue/pom.xml index 167ed64416e8..3106610c0ad9 100644 --- a/sdk/storage/azure-storage-queue/pom.xml +++ b/sdk/storage/azure-storage-queue/pom.xml @@ -13,7 +13,7 @@ <groupId>com.azure</groupId> <artifactId>azure-storage-queue</artifactId> - <version>12.28.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-queue;current} --> + <version>12.28.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-queue;current} --> <name>Microsoft Azure client library for Queue Storage</name> <description>This module contains client library for Microsoft Azure Queue Storage.</description> @@ -73,13 +73,13 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-common</artifactId> - <version>12.32.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> + <version>12.32.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-storage-common</artifactId> - <version>12.32.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> + <version>12.32.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-common;current} --> <classifier>tests</classifier> <type>test-jar</type> <scope>test</scope> From 879ea4e094e323512672dd1df6c824f2d67328c4 Mon Sep 17 00:00:00 2001 From: Haoling Dong <87355844+haolingdong-msft@users.noreply.github.com> Date: Thu, 4 Dec 2025 13:27:20 +0800 Subject: [PATCH 096/186] Add eng\scripts\ci.yml to run pester unit tests (#47403) * Add CI to run pester test * remove exclude * add a new line --------- Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> --- eng/scripts/ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 eng/scripts/ci.yml diff --git a/eng/scripts/ci.yml b/eng/scripts/ci.yml new file mode 100644 index 000000000000..fcecd646d6fc --- /dev/null +++ b/eng/scripts/ci.yml @@ -0,0 +1,31 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + paths: + include: + - eng/scripts/* + exclude: + - eng/scripts/typespec + +pr: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + paths: + include: + - eng/scripts/* + +extends: + template: /eng/common/pipelines/templates/stages/archetype-sdk-tool-pwsh.yml + parameters: + TargetDirectory: eng/scripts/ + TargetTags: 'UnitTest' From dcc772e2f52cb88efeb8e77923a9c080bebe73cd Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 4 Dec 2025 00:08:36 -0800 Subject: [PATCH 097/186] Sync eng/common directory with azure-sdk-tools for PR 13193 (#47451) * Fix property name for skipVerifyChangeLog * Apply suggestion from @raych1 * Refactor ShouldVerifyChangeLog function condition * Apply suggestion from @raych1 --------- Co-authored-by: Ray Chen <raychen@microsoft.com> --- eng/common/scripts/Verify-ChangeLogs.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eng/common/scripts/Verify-ChangeLogs.ps1 b/eng/common/scripts/Verify-ChangeLogs.ps1 index 242d00b3da43..3b09a8ceebfd 100644 --- a/eng/common/scripts/Verify-ChangeLogs.ps1 +++ b/eng/common/scripts/Verify-ChangeLogs.ps1 @@ -11,8 +11,10 @@ Set-StrictMode -Version 3 function ShouldVerifyChangeLog ($PkgArtifactDetails) { if ($PkgArtifactDetails) { - if ($PkgArtifactDetails.PSObject.Properties["skipVerifyChangeLog"] -eq $true) { - return $false + if ($PkgArtifactDetails.PSObject.Properties.Name -contains "skipVerifyChangeLog") { + if ($PkgArtifactDetails.skipVerifyChangeLog) { + return $false + } } return $true From 795bfabf86088ca07ea1f0dab6603a33d91ac134 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 4 Dec 2025 04:42:21 -0800 Subject: [PATCH 098/186] [Automation] Generate SDK based on TypeSpec 0.37.2 (#47455) --- eng/emitter-package-lock.json | 8 +- eng/emitter-package.json | 2 +- .../models/CachePropertiesExportPolicy.java | 98 ------------------- 3 files changed, 5 insertions(+), 103 deletions(-) delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CachePropertiesExportPolicy.java diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index 43389f85d695..7de7856193fe 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-java": "0.37.1" + "@azure-tools/typespec-java": "0.37.2" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.62.0", @@ -173,9 +173,9 @@ } }, "node_modules/@azure-tools/typespec-java": { - "version": "0.37.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-java/-/typespec-java-0.37.1.tgz", - "integrity": "sha512-8tjfaOURstBel60NGE41Y8ok+sHkjTRTQNFc8oFghaVuNTtSU1GBHGmI8NTKOMdqsgpC18/Cihiz7fdEYL4P9A==", + "version": "0.37.2", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-java/-/typespec-java-0.37.2.tgz", + "integrity": "sha512-JIMD4ZLdX5fZPxUtEDtxLyyKewXhZlJZQFgov/ce2WOaTz2RSTnDh5o9S3U+Xvpk98Wl1PPHWQASlOhjECkv/g==", "license": "MIT", "dependencies": { "@autorest/codemodel": "~4.20.1", diff --git a/eng/emitter-package.json b/eng/emitter-package.json index 19b8260968d9..49dd4225f929 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,7 +1,7 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-java": "0.37.1" + "@azure-tools/typespec-java": "0.37.2" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.62.0", diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CachePropertiesExportPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CachePropertiesExportPolicy.java deleted file mode 100644 index 1300d4693b12..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CachePropertiesExportPolicy.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Set of export policy rules. - */ -@Fluent -public final class CachePropertiesExportPolicy implements JsonSerializable<CachePropertiesExportPolicy> { - /* - * Export policy rule - */ - private List<ExportPolicyRule> rules; - - /** - * Creates an instance of CachePropertiesExportPolicy class. - */ - public CachePropertiesExportPolicy() { - } - - /** - * Get the rules property: Export policy rule. - * - * @return the rules value. - */ - public List<ExportPolicyRule> rules() { - return this.rules; - } - - /** - * Set the rules property: Export policy rule. - * - * @param rules the rules value to set. - * @return the CachePropertiesExportPolicy object itself. - */ - public CachePropertiesExportPolicy withRules(List<ExportPolicyRule> rules) { - this.rules = rules; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (rules() != null) { - rules().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CachePropertiesExportPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CachePropertiesExportPolicy if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CachePropertiesExportPolicy. - */ - public static CachePropertiesExportPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CachePropertiesExportPolicy deserializedCachePropertiesExportPolicy = new CachePropertiesExportPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("rules".equals(fieldName)) { - List<ExportPolicyRule> rules = reader.readArray(reader1 -> ExportPolicyRule.fromJson(reader1)); - deserializedCachePropertiesExportPolicy.rules = rules; - } else { - reader.skipChildren(); - } - } - - return deserializedCachePropertiesExportPolicy; - }); - } -} From 9f0155e4032f0f101a9e00f788949c4a0f34d6b5 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 4 Dec 2025 05:25:34 -0800 Subject: [PATCH 099/186] [AutoPR azure-resourcemanager-netapp]-generated-from-SDK Generation - Java-5627710 (#47414) * Configurations: 'specification/netapp/resource-manager/Microsoft.NetApp/NetApp/tspconfig.yaml', API Version: 2025-09-01-preview, SDK Release Type: beta, and CommitSHA: 'fa4de8af2faa4a809027619c6ec8ed45b1e0a761' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5627710 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. * Configurations: 'specification/netapp/resource-manager/Microsoft.NetApp/NetApp/tspconfig.yaml', API Version: 2025-09-01-preview, SDK Release Type: beta, and CommitSHA: '2ec4c94bd944ea1230297b26ba6bbfa94becdcce' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5631309 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. * Configurations: 'specification/netapp/resource-manager/Microsoft.NetApp/NetApp/tspconfig.yaml', API Version: 2025-09-01-preview, SDK Release Type: beta, and CommitSHA: '29c080bf3c463cb98a563e959cacf6d7f128fcad' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5637666 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --------- Co-authored-by: Weidong Xu <weidxu@microsoft.com> --- .../azure-resourcemanager-netapp/CHANGELOG.md | 40 ++--- .../azure-resourcemanager-netapp/SAMPLE.md | 10 +- .../netapp/fluent/CachesClient.java | 15 +- .../netapp/implementation/CacheImpl.java | 27 +++- .../implementation/CachesClientImpl.java | 35 +++-- .../netapp/implementation/CachesImpl.java | 11 -- .../resourcemanager/netapp/models/Cache.java | 6 +- .../netapp/models/CacheProperties.java | 20 ++- .../models/CachePropertiesExportPolicy.java | 98 ++++++++++++ .../netapp/models/CacheUpdateProperties.java | 20 ++- .../resourcemanager/netapp/models/Caches.java | 30 ---- .../netapp/models/ProtocolTypes.java | 2 +- ...urcemanager-netapp_apiview_properties.json | 1 + ...azure-resourcemanager-netapp_metadata.json | 2 +- .../netapp/generated/CachesUpdateSamples.java | 10 +- .../AccountsRenewCredentialsMockTests.java | 2 +- .../BackupPoliciesCreateMockTests.java | 30 ++-- .../BackupPoliciesDeleteMockTests.java | 3 +- ...ackupPoliciesGetWithResponseMockTests.java | 14 +- .../BackupPoliciesListMockTests.java | 14 +- .../generated/BackupRestoreFilesTests.java | 21 ++- .../BackupVaultsCreateOrUpdateMockTests.java | 14 +- .../BackupVaultsGetWithResponseMockTests.java | 8 +- ...kupVaultsListByNetAppAccountMockTests.java | 10 +- .../generated/BackupsCreateMockTests.java | 20 +-- ...sGetLatestStatusWithResponseMockTests.java | 4 +- ...estRestoreStatusWithResponseMockTests.java | 4 +- .../BackupsGetWithResponseMockTests.java | 12 +- .../BackupsListByVaultMockTests.java | 12 +- .../BackupsMigrationRequestTests.java | 8 +- .../BucketsCreateOrUpdateMockTests.java | 28 ++-- .../BucketsGetWithResponseMockTests.java | 18 +-- .../generated/BucketsListMockTests.java | 20 +-- .../CacheMountTargetPropertiesTests.java | 2 +- .../CachePropertiesExportPolicyTests.java | 72 +++++++++ ...eringPassphrasesWithResponseMockTests.java | 11 +- .../generated/CachesPoolChangeMockTests.java | 4 +- .../generated/CapacityPoolInnerTests.java | 45 +++--- .../generated/CapacityPoolListTests.java | 16 +- .../generated/CapacityPoolPatchTests.java | 32 ++-- .../generated/ChangeZoneRequestTests.java | 8 +- .../CheckAvailabilityResponseInnerTests.java | 12 +- ...esourceAvailabilityResponseInnerTests.java | 8 +- ...olumeFilePathAvailabilityRequestTests.java | 8 +- .../generated/ElasticBackupInnerTests.java | 20 +-- .../ElasticBackupListResultTests.java | 10 +- ...BackupPoliciesCreateOrUpdateMockTests.java | 28 ++-- ...ackupPoliciesGetWithResponseMockTests.java | 14 +- ...PoliciesListByElasticAccountMockTests.java | 14 +- .../ElasticBackupPolicyInnerTests.java | 32 ++-- .../ElasticBackupPolicyListResultTests.java | 14 +- .../ElasticBackupPolicyPropertiesTests.java | 20 +-- ...sticBackupPolicyUpdatePropertiesTests.java | 26 ++-- .../ElasticBackupPolicyUpdateTests.java | 30 ++-- .../ElasticBackupPropertiesTests.java | 20 +-- .../ElasticBackupVaultInnerTests.java | 14 +- .../ElasticBackupVaultListResultTests.java | 8 +- .../ElasticBackupVaultPropertiesTests.java | 4 +- .../ElasticBackupVaultUpdateTests.java | 14 +- ...icBackupVaultsCreateOrUpdateMockTests.java | 14 +- ...cBackupVaultsGetWithResponseMockTests.java | 8 +- ...upVaultsListByElasticAccountMockTests.java | 10 +- ...ElasticBackupsCreateOrUpdateMockTests.java | 18 +-- ...lasticBackupsGetWithResponseMockTests.java | 10 +- .../ElasticBackupsListByVaultMockTests.java | 10 +- ...PathAvailabilityWithResponseMockTests.java | 8 +- .../ElasticEncryptionIdentityTests.java | 8 +- .../ElasticExportPolicyRuleTests.java | 26 ++-- .../generated/ElasticExportPolicyTests.java | 38 ++--- .../ElasticMountTargetPropertiesTests.java | 5 +- .../generated/ElasticSnapshotInnerTests.java | 2 +- .../ElasticSnapshotListResultTests.java | 4 +- ...apshotPoliciesCreateOrUpdateMockTests.java | 65 ++++---- ...pshotPoliciesGetWithResponseMockTests.java | 36 ++--- ...PoliciesListByElasticAccountMockTests.java | 35 +++-- ...otPoliciesListElasticVolumesMockTests.java | 42 ++--- ...asticSnapshotPolicyDailyScheduleTests.java | 20 +-- ...sticSnapshotPolicyHourlyScheduleTests.java | 12 +- .../ElasticSnapshotPolicyInnerTests.java | 96 ++++++------ .../ElasticSnapshotPolicyListResultTests.java | 36 ++--- ...ticSnapshotPolicyMonthlyScheduleTests.java | 29 ++-- .../ElasticSnapshotPolicyPropertiesTests.java | 78 +++++----- ...icSnapshotPolicyUpdatePropertiesTests.java | 84 +++++----- .../ElasticSnapshotPolicyUpdateTests.java | 92 +++++------ .../ElasticSnapshotPolicyVolumeListTests.java | 32 ++-- ...sticSnapshotPolicyWeeklyScheduleTests.java | 26 ++-- ...asticSnapshotsCreateOrUpdateMockTests.java | 6 +- ...sticSnapshotsGetWithResponseMockTests.java | 5 +- ...SnapshotsListByElasticVolumeMockTests.java | 5 +- .../ElasticVolumeBackupPropertiesTests.java | 20 +-- ...umeDataProtectionPatchPropertiesTests.java | 26 ++-- ...icVolumeDataProtectionPropertiesTests.java | 20 +-- .../generated/ElasticVolumeInnerTests.java | 144 ++++++++---------- .../ElasticVolumeListResultTests.java | 28 ++-- .../ElasticVolumePropertiesTests.java | 105 +++++++------ .../generated/ElasticVolumeRevertTests.java | 8 +- .../ElasticVolumeSnapshotPropertiesTests.java | 8 +- .../ElasticVolumeUpdatePropertiesTests.java | 90 +++++------ .../generated/ElasticVolumeUpdateTests.java | 109 +++++++------ ...ElasticVolumesCreateOrUpdateMockTests.java | 105 +++++-------- ...lasticVolumesGetWithResponseMockTests.java | 37 +++-- ...sticVolumesListByElasticPoolMockTests.java | 36 ++--- .../ElasticVolumesRevertMockTests.java | 39 +++-- .../generated/EncryptionIdentityTests.java | 12 +- .../EncryptionTransitionRequestTests.java | 18 +-- .../FilePathAvailabilityRequestTests.java | 16 +- .../KeyVaultPrivateEndpointTests.java | 12 +- .../generated/LdapConfigurationTests.java | 32 ++-- .../generated/LdapSearchScopeOptTests.java | 22 +-- .../ManagedServiceIdentityTests.java | 6 +- ...imitsAccountsGetWithResponseMockTests.java | 4 +- ...ourceQuotaLimitsAccountsListMockTests.java | 6 +- ...ceQuotaLimitsGetWithResponseMockTests.java | 4 +- ...etAppResourceQuotaLimitsListMockTests.java | 4 +- ...ceRegionInfosGetWithResponseMockTests.java | 9 +- ...etAppResourceRegionInfosListMockTests.java | 8 +- ...esourceUsagesGetWithResponseMockTests.java | 4 +- .../NetAppResourceUsagesListMockTests.java | 4 +- ...PathAvailabilityWithResponseMockTests.java | 10 +- ...NameAvailabilityWithResponseMockTests.java | 14 +- ...uotaAvailabilityWithResponseMockTests.java | 14 +- ...etworkSiblingSetWithResponseMockTests.java | 24 ++- ...sQueryRegionInfoWithResponseMockTests.java | 8 +- ...urcesUpdateNetworkSiblingSetMockTests.java | 22 +-- .../NetworkSiblingSetInnerTests.java | 10 +- .../netapp/generated/NicInfoTests.java | 6 +- .../generated/OperationsListMockTests.java | 42 ++--- .../OriginClusterInformationTests.java | 26 ++-- .../PeeringPassphrasesInnerTests.java | 8 +- .../generated/PoolPatchPropertiesTests.java | 20 +-- .../netapp/generated/PoolPropertiesTests.java | 26 ++-- .../PoolsCreateOrUpdateMockTests.java | 28 ++-- .../PoolsGetWithResponseMockTests.java | 19 +-- .../netapp/generated/PoolsListMockTests.java | 18 +-- .../QueryNetworkSiblingSetRequestTests.java | 12 +- .../QuotaAvailabilityRequestTests.java | 20 +-- ...omwareReportsGetWithResponseMockTests.java | 4 +- .../RansomwareReportsListMockTests.java | 4 +- ...InfoAvailabilityZoneMappingsItemTests.java | 6 +- .../generated/RegionInfoInnerTests.java | 7 +- .../RegionInfoResourceInnerTests.java | 7 +- .../generated/RegionInfosListTests.java | 8 +- .../ResourceNameAvailabilityRequestTests.java | 22 ++- .../SecretPasswordIdentityTests.java | 8 +- .../netapp/generated/SmbSettingsTests.java | 8 +- ...otPoliciesCreateWithResponseMockTests.java | 85 ++++++----- .../SnapshotPoliciesDeleteMockTests.java | 2 +- ...pshotPoliciesGetWithResponseMockTests.java | 44 +++--- .../SnapshotPoliciesListMockTests.java | 44 +++--- .../generated/SnapshotsDeleteMockTests.java | 3 +- .../SnapshotsGetWithResponseMockTests.java | 6 +- .../generated/SnapshotsListMockTests.java | 6 +- .../SnapshotsRestoreFilesMockTests.java | 6 +- .../generated/SubvolumeInfoInnerTests.java | 16 +- .../generated/SubvolumeModelInnerTests.java | 22 +-- .../SubvolumeModelPropertiesTests.java | 22 +-- .../generated/SubvolumePatchParamsTests.java | 13 +- .../generated/SubvolumePatchRequestTests.java | 12 +- .../generated/SubvolumePropertiesTests.java | 20 +-- .../generated/SubvolumesCreateMockTests.java | 18 +-- .../generated/SubvolumesDeleteMockTests.java | 3 +- .../SubvolumesGetMetadataMockTests.java | 22 +-- .../SubvolumesGetWithResponseMockTests.java | 11 +- .../SubvolumesListByVolumeMockTests.java | 12 +- .../netapp/generated/SubvolumesListTests.java | 10 +- .../UpdateNetworkSiblingSetRequestTests.java | 26 ++-- .../netapp/generated/UsageNameTests.java | 6 +- .../generated/UsagePropertiesTests.java | 2 +- .../generated/UsageResultInnerTests.java | 2 +- .../generated/UsagesListResultTests.java | 4 +- .../generated/UserAssignedIdentityTests.java | 2 +- .../VolumeGroupsDeleteMockTests.java | 2 +- .../VolumeQuotaRulesCreateMockTests.java | 25 +-- .../VolumeQuotaRulesDeleteMockTests.java | 2 +- ...umeQuotaRulesGetWithResponseMockTests.java | 14 +- ...VolumeQuotaRulesListByVolumeMockTests.java | 14 +- ...AuthorizeExternalReplicationMockTests.java | 7 +- .../VolumesAuthorizeReplicationMockTests.java | 5 +- .../VolumesBreakFileLocksMockTests.java | 4 +- .../VolumesBreakReplicationMockTests.java | 4 +- .../VolumesDeleteReplicationMockTests.java | 4 +- .../VolumesFinalizeRelocationMockTests.java | 2 +- ...istGetGroupIdListForLdapUserMockTests.java | 8 +- .../VolumesListQuotaReportMockTests.java | 16 +- .../VolumesListReplicationsMockTests.java | 14 +- .../VolumesPeerExternalClusterMockTests.java | 14 +- .../generated/VolumesPoolChangeMockTests.java | 4 +- ...lumesReInitializeReplicationMockTests.java | 3 +- ...eplicationStatusWithResponseMockTests.java | 13 +- .../VolumesResyncReplicationMockTests.java | 3 +- .../generated/VolumesRevertMockTests.java | 4 +- .../VolumesRevertRelocationMockTests.java | 3 +- .../tsp-location.yaml | 2 +- 193 files changed, 1972 insertions(+), 1866 deletions(-) create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CachePropertiesExportPolicy.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachePropertiesExportPolicyTests.java diff --git a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md index ce11e041cb86..763b0c962817 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md +++ b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.1.0-beta.1 (2025-11-28) +## 2.1.0-beta.1 (2025-12-04) - Azure Resource Manager NetAppFiles client library for Java. This package contains Microsoft Azure SDK for NetAppFiles Management SDK. Microsoft NetApp Files Azure Resource Provider specification. Package api-version 2025-09-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). @@ -238,6 +238,8 @@ * `models.ElasticBackupVaultProperties` was added +* `models.CachePropertiesExportPolicy` was added + * `models.ElasticBackupPolicy$DefinitionStages` was added * `models.ElasticNfsv4Access` was added @@ -376,22 +378,22 @@ #### `models.Volume$Definition` was modified -* `withLdapServerType(models.LdapServerType)` was added * `withBreakthroughMode(models.BreakthroughMode)` was added * `withLargeVolumeType(models.LargeVolumeType)` was added * `withLanguage(models.VolumeLanguage)` was added +* `withLdapServerType(models.LdapServerType)` was added #### `models.ReplicationObject` was modified -* `mirrorState()` was added +* `relationshipStatus()` was added * `externalReplicationSetupInfo()` was added * `externalReplicationSetupStatus()` was added -* `relationshipStatus()` was added +* `mirrorState()` was added #### `models.NetAppAccountPatch` was modified -* `ldapConfiguration()` was added * `withLdapConfiguration(models.LdapConfiguration)` was added +* `ldapConfiguration()` was added #### `models.NetAppAccount$Update` was modified @@ -399,23 +401,23 @@ #### `models.VolumeGroupVolumeProperties` was modified -* `language()` was added * `withLargeVolumeType(models.LargeVolumeType)` was added -* `withBreakthroughMode(models.BreakthroughMode)` was added +* `ldapServerType()` was added +* `largeVolumeType()` was added * `withLanguage(models.VolumeLanguage)` was added * `breakthroughMode()` was added -* `ldapServerType()` was added +* `language()` was added +* `withBreakthroughMode(models.BreakthroughMode)` was added * `withLdapServerType(models.LdapServerType)` was added -* `largeVolumeType()` was added #### `models.Volume` was modified -* `largeVolumeType()` was added +* `listQuotaReport(com.azure.core.util.Context)` was added * `language()` was added +* `largeVolumeType()` was added +* `breakthroughMode()` was added * `listQuotaReport()` was added * `ldapServerType()` was added -* `breakthroughMode()` was added -* `listQuotaReport(com.azure.core.util.Context)` was added #### `models.VolumePropertiesDataProtection` was modified @@ -424,23 +426,23 @@ #### `NetAppFilesManager` was modified -* `elasticAccounts()` was added -* `ransomwareReports()` was added * `buckets()` was added -* `elasticSnapshotPolicies()` was added * `activeDirectoryConfigs()` was added +* `elasticCapacityPools()` was added +* `elasticAccounts()` was added * `caches()` was added -* `elasticBackupVaults()` was added * `elasticBackupPolicies()` was added -* `elasticCapacityPools()` was added +* `ransomwareReports()` was added +* `elasticSnapshotPolicies()` was added * `elasticVolumes()` was added -* `elasticSnapshots()` was added * `elasticBackups()` was added +* `elasticBackupVaults()` was added +* `elasticSnapshots()` was added #### `models.VolumePatchPropertiesDataProtection` was modified -* `ransomwareProtection()` was added * `withRansomwareProtection(models.RansomwareProtectionPatchSettings)` was added +* `ransomwareProtection()` was added #### `models.Volumes` was modified diff --git a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md index c076e4b17155..98d746b14c13 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md +++ b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md @@ -1542,7 +1542,7 @@ public final class CachesPoolChangeSamples { ### Caches_Update ```java -import com.azure.resourcemanager.netapp.models.CacheUpdate; +import com.azure.resourcemanager.netapp.models.Cache; import com.azure.resourcemanager.netapp.models.CacheUpdateProperties; /** @@ -1558,10 +1558,10 @@ public final class CachesUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void cachesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.caches() - .update("myRG", "account1", "pool1", "cache1", - new CacheUpdate().withProperties(new CacheUpdateProperties().withSize(214748364800L)), - com.azure.core.util.Context.NONE); + Cache resource = manager.caches() + .getWithResponse("myRG", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withProperties(new CacheUpdateProperties().withSize(214748364800L)).apply(); } } ``` diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java index dd8426d42fbe..9e24e657eb3a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java @@ -136,8 +136,8 @@ CacheInner createOrUpdate(String resourceGroupName, String accountName, String p * @return the {@link SyncPoller} for polling of cache resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String accountName, String poolName, - String cacheName, CacheUpdate body); + SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheUpdate body); /** * Patch the specified Cache. @@ -154,8 +154,8 @@ SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String * @return the {@link SyncPoller} for polling of cache resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String accountName, String poolName, - String cacheName, CacheUpdate body, Context context); + SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheUpdate body, Context context); /** * Patch the specified Cache. @@ -168,9 +168,11 @@ SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cache resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - void update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body); + CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheUpdate body); /** * Patch the specified Cache. @@ -184,9 +186,10 @@ SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cache resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - void update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body, + CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body, Context context); /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java index fcf4f401ca04..ec8e7fc09d35 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java @@ -11,6 +11,8 @@ import com.azure.resourcemanager.netapp.fluent.models.CacheInner; import com.azure.resourcemanager.netapp.models.Cache; import com.azure.resourcemanager.netapp.models.CacheProperties; +import com.azure.resourcemanager.netapp.models.CacheUpdate; +import com.azure.resourcemanager.netapp.models.CacheUpdateProperties; import com.azure.resourcemanager.netapp.models.PeeringPassphrases; import com.azure.resourcemanager.netapp.models.PoolChangeRequest; import java.util.Collections; @@ -96,6 +98,8 @@ private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { private String cacheName; + private CacheUpdate updateBody; + public CacheImpl withExistingCapacityPool(String resourceGroupName, String accountName, String poolName) { this.resourceGroupName = resourceGroupName; this.accountName = accountName; @@ -124,20 +128,21 @@ public Cache create(Context context) { } public CacheImpl update() { + this.updateBody = new CacheUpdate(); return this; } public Cache apply() { this.innerObject = serviceManager.serviceClient() .getCaches() - .createOrUpdate(resourceGroupName, accountName, poolName, cacheName, this.innerModel(), Context.NONE); + .update(resourceGroupName, accountName, poolName, cacheName, updateBody, Context.NONE); return this; } public Cache apply(Context context) { this.innerObject = serviceManager.serviceClient() .getCaches() - .createOrUpdate(resourceGroupName, accountName, poolName, cacheName, this.innerModel(), context); + .update(resourceGroupName, accountName, poolName, cacheName, updateBody, context); return this; } @@ -199,12 +204,26 @@ public CacheImpl withProperties(CacheProperties properties) { } public CacheImpl withTags(Map<String, String> tags) { - this.innerModel().withTags(tags); - return this; + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } } public CacheImpl withZones(List<String> zones) { this.innerModel().withZones(zones); return this; } + + public CacheImpl withProperties(CacheUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java index ec7cebab6484..36a28ac092cc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java @@ -812,12 +812,12 @@ private Response<BinaryData> updateWithResponse(String resourceGroupName, String * @return the {@link PollerFlux} for polling of cache resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<Void>, Void> beginUpdateAsync(String resourceGroupName, String accountName, - String poolName, String cacheName, CacheUpdate body) { + private PollerFlux<PollResult<CacheInner>, CacheInner> beginUpdateAsync(String resourceGroupName, + String accountName, String poolName, String cacheName, CacheUpdate body) { Mono<Response<Flux<ByteBuffer>>> mono = updateWithResponseAsync(resourceGroupName, accountName, poolName, cacheName, body); - return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + return this.client.<CacheInner, CacheInner>getLroResult(mono, this.client.getHttpPipeline(), CacheInner.class, + CacheInner.class, this.client.getContext()); } /** @@ -834,10 +834,11 @@ private PollerFlux<PollResult<Void>, Void> beginUpdateAsync(String resourceGroup * @return the {@link SyncPoller} for polling of cache resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String accountName, String poolName, - String cacheName, CacheUpdate body) { + public SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheUpdate body) { Response<BinaryData> response = updateWithResponse(resourceGroupName, accountName, poolName, cacheName, body); - return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + return this.client.<CacheInner, CacheInner>getLroResult(response, CacheInner.class, CacheInner.class, + Context.NONE); } /** @@ -855,11 +856,11 @@ public SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, * @return the {@link SyncPoller} for polling of cache resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String accountName, String poolName, - String cacheName, CacheUpdate body, Context context) { + public SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheUpdate body, Context context) { Response<BinaryData> response = updateWithResponse(resourceGroupName, accountName, poolName, cacheName, body, context); - return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + return this.client.<CacheInner, CacheInner>getLroResult(response, CacheInner.class, CacheInner.class, context); } /** @@ -876,8 +877,8 @@ public SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, * @return cache resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Void> updateAsync(String resourceGroupName, String accountName, String poolName, String cacheName, - CacheUpdate body) { + private Mono<CacheInner> updateAsync(String resourceGroupName, String accountName, String poolName, + String cacheName, CacheUpdate body) { return beginUpdateAsync(resourceGroupName, accountName, poolName, cacheName, body).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -893,11 +894,12 @@ private Mono<Void> updateAsync(String resourceGroupName, String accountName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cache resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void update(String resourceGroupName, String accountName, String poolName, String cacheName, + public CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body) { - beginUpdate(resourceGroupName, accountName, poolName, cacheName, body).getFinalResult(); + return beginUpdate(resourceGroupName, accountName, poolName, cacheName, body).getFinalResult(); } /** @@ -912,11 +914,12 @@ public void update(String resourceGroupName, String accountName, String poolName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cache resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void update(String resourceGroupName, String accountName, String poolName, String cacheName, + public CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body, Context context) { - beginUpdate(resourceGroupName, accountName, poolName, cacheName, body, context).getFinalResult(); + return beginUpdate(resourceGroupName, accountName, poolName, cacheName, body, context).getFinalResult(); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java index 94d3d1e3fda1..0b1711d6641f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java @@ -13,7 +13,6 @@ import com.azure.resourcemanager.netapp.fluent.models.CacheInner; import com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner; import com.azure.resourcemanager.netapp.models.Cache; -import com.azure.resourcemanager.netapp.models.CacheUpdate; import com.azure.resourcemanager.netapp.models.Caches; import com.azure.resourcemanager.netapp.models.PeeringPassphrases; import com.azure.resourcemanager.netapp.models.PoolChangeRequest; @@ -51,16 +50,6 @@ public Cache get(String resourceGroupName, String accountName, String poolName, } } - public void update(String resourceGroupName, String accountName, String poolName, String cacheName, - CacheUpdate body) { - this.serviceClient().update(resourceGroupName, accountName, poolName, cacheName, body); - } - - public void update(String resourceGroupName, String accountName, String poolName, String cacheName, - CacheUpdate body, Context context) { - this.serviceClient().update(resourceGroupName, accountName, poolName, cacheName, body, context); - } - public void delete(String resourceGroupName, String accountName, String poolName, String cacheName) { this.serviceClient().delete(resourceGroupName, accountName, poolName, cacheName); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Cache.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Cache.java index 0626dbe8c45a..886fad5933dc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Cache.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Cache.java @@ -273,12 +273,12 @@ interface WithTags { */ interface WithProperties { /** - * Specifies the properties property: Cache properties. + * Specifies the properties property: The resource-specific properties for this resource.. * - * @param properties Cache properties. + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ - Update withProperties(CacheProperties properties); + Update withProperties(CacheUpdateProperties properties); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProperties.java index 896c921d63e8..0eebd796592e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProperties.java @@ -32,10 +32,10 @@ public final class CacheProperties implements JsonSerializable<CacheProperties> /* * Set of export policy rules */ - private List<ExportPolicyRule> exportPolicy; + private CachePropertiesExportPolicy exportPolicy; /* - * Set of protocol types, default NFSv3, CIFS for SMB protocol + * Set of supported protocol types, which include NFSv3, NFSv4 and SMB protocol */ private List<ProtocolTypes> protocolTypes; @@ -195,7 +195,7 @@ public CacheProperties withSize(long size) { * * @return the exportPolicy value. */ - public List<ExportPolicyRule> exportPolicy() { + public CachePropertiesExportPolicy exportPolicy() { return this.exportPolicy; } @@ -205,13 +205,13 @@ public List<ExportPolicyRule> exportPolicy() { * @param exportPolicy the exportPolicy value to set. * @return the CacheProperties object itself. */ - public CacheProperties withExportPolicy(List<ExportPolicyRule> exportPolicy) { + public CacheProperties withExportPolicy(CachePropertiesExportPolicy exportPolicy) { this.exportPolicy = exportPolicy; return this; } /** - * Get the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. + * Get the protocolTypes property: Set of supported protocol types, which include NFSv3, NFSv4 and SMB protocol. * * @return the protocolTypes value. */ @@ -220,7 +220,7 @@ public List<ProtocolTypes> protocolTypes() { } /** - * Set the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. + * Set the protocolTypes property: Set of supported protocol types, which include NFSv3, NFSv4 and SMB protocol. * * @param protocolTypes the protocolTypes value to set. * @return the CacheProperties object itself. @@ -579,7 +579,7 @@ public void validate() { .log(new IllegalArgumentException("Missing required property filepath in model CacheProperties")); } if (exportPolicy() != null) { - exportPolicy().forEach(e -> e.validate()); + exportPolicy().validate(); } if (cacheSubnetResourceId() == null) { throw LOGGER.atError() @@ -626,7 +626,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("encryptionKeySource", this.encryptionKeySource == null ? null : this.encryptionKeySource.toString()); jsonWriter.writeJsonField("originClusterInformation", this.originClusterInformation); - jsonWriter.writeArrayField("exportPolicy", this.exportPolicy, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("exportPolicy", this.exportPolicy); jsonWriter.writeArrayField("protocolTypes", this.protocolTypes, (writer, element) -> writer.writeString(element == null ? null : element.toString())); jsonWriter.writeStringField("kerberos", this.kerberos == null ? null : this.kerberos.toString()); @@ -674,9 +674,7 @@ public static CacheProperties fromJson(JsonReader jsonReader) throws IOException } else if ("originClusterInformation".equals(fieldName)) { deserializedCacheProperties.originClusterInformation = OriginClusterInformation.fromJson(reader); } else if ("exportPolicy".equals(fieldName)) { - List<ExportPolicyRule> exportPolicy - = reader.readArray(reader1 -> ExportPolicyRule.fromJson(reader1)); - deserializedCacheProperties.exportPolicy = exportPolicy; + deserializedCacheProperties.exportPolicy = CachePropertiesExportPolicy.fromJson(reader); } else if ("protocolTypes".equals(fieldName)) { List<ProtocolTypes> protocolTypes = reader.readArray(reader1 -> ProtocolTypes.fromString(reader1.getString())); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CachePropertiesExportPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CachePropertiesExportPolicy.java new file mode 100644 index 000000000000..1300d4693b12 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CachePropertiesExportPolicy.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Set of export policy rules. + */ +@Fluent +public final class CachePropertiesExportPolicy implements JsonSerializable<CachePropertiesExportPolicy> { + /* + * Export policy rule + */ + private List<ExportPolicyRule> rules; + + /** + * Creates an instance of CachePropertiesExportPolicy class. + */ + public CachePropertiesExportPolicy() { + } + + /** + * Get the rules property: Export policy rule. + * + * @return the rules value. + */ + public List<ExportPolicyRule> rules() { + return this.rules; + } + + /** + * Set the rules property: Export policy rule. + * + * @param rules the rules value to set. + * @return the CachePropertiesExportPolicy object itself. + */ + public CachePropertiesExportPolicy withRules(List<ExportPolicyRule> rules) { + this.rules = rules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (rules() != null) { + rules().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CachePropertiesExportPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CachePropertiesExportPolicy if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CachePropertiesExportPolicy. + */ + public static CachePropertiesExportPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CachePropertiesExportPolicy deserializedCachePropertiesExportPolicy = new CachePropertiesExportPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("rules".equals(fieldName)) { + List<ExportPolicyRule> rules = reader.readArray(reader1 -> ExportPolicyRule.fromJson(reader1)); + deserializedCachePropertiesExportPolicy.rules = rules; + } else { + reader.skipChildren(); + } + } + + return deserializedCachePropertiesExportPolicy; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdateProperties.java index 79353a2528ca..074818eda95f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdateProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdateProperties.java @@ -26,10 +26,10 @@ public final class CacheUpdateProperties implements JsonSerializable<CacheUpdate /* * Set of export policy rules */ - private List<ExportPolicyRule> exportPolicy; + private CachePropertiesExportPolicy exportPolicy; /* - * Set of protocol types, default NFSv3, CIFS for SMB protocol + * Set of supported protocol types, which include NFSv3, NFSv4 and SMB protocol */ private List<ProtocolTypes> protocolTypes; @@ -93,7 +93,7 @@ public CacheUpdateProperties withSize(Long size) { * * @return the exportPolicy value. */ - public List<ExportPolicyRule> exportPolicy() { + public CachePropertiesExportPolicy exportPolicy() { return this.exportPolicy; } @@ -103,13 +103,13 @@ public List<ExportPolicyRule> exportPolicy() { * @param exportPolicy the exportPolicy value to set. * @return the CacheUpdateProperties object itself. */ - public CacheUpdateProperties withExportPolicy(List<ExportPolicyRule> exportPolicy) { + public CacheUpdateProperties withExportPolicy(CachePropertiesExportPolicy exportPolicy) { this.exportPolicy = exportPolicy; return this; } /** - * Get the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. + * Get the protocolTypes property: Set of supported protocol types, which include NFSv3, NFSv4 and SMB protocol. * * @return the protocolTypes value. */ @@ -118,7 +118,7 @@ public List<ProtocolTypes> protocolTypes() { } /** - * Set the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. + * Set the protocolTypes property: Set of supported protocol types, which include NFSv3, NFSv4 and SMB protocol. * * @param protocolTypes the protocolTypes value to set. * @return the CacheUpdateProperties object itself. @@ -241,7 +241,7 @@ public CacheUpdateProperties withWriteBack(EnableWriteBackState writeBack) { */ public void validate() { if (exportPolicy() != null) { - exportPolicy().forEach(e -> e.validate()); + exportPolicy().validate(); } if (smbSettings() != null) { smbSettings().validate(); @@ -255,7 +255,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeNumberField("size", this.size); - jsonWriter.writeArrayField("exportPolicy", this.exportPolicy, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("exportPolicy", this.exportPolicy); jsonWriter.writeArrayField("protocolTypes", this.protocolTypes, (writer, element) -> writer.writeString(element == null ? null : element.toString())); jsonWriter.writeJsonField("smbSettings", this.smbSettings); @@ -285,9 +285,7 @@ public static CacheUpdateProperties fromJson(JsonReader jsonReader) throws IOExc if ("size".equals(fieldName)) { deserializedCacheUpdateProperties.size = reader.getNullable(JsonReader::getLong); } else if ("exportPolicy".equals(fieldName)) { - List<ExportPolicyRule> exportPolicy - = reader.readArray(reader1 -> ExportPolicyRule.fromJson(reader1)); - deserializedCacheUpdateProperties.exportPolicy = exportPolicy; + deserializedCacheUpdateProperties.exportPolicy = CachePropertiesExportPolicy.fromJson(reader); } else if ("protocolTypes".equals(fieldName)) { List<ProtocolTypes> protocolTypes = reader.readArray(reader1 -> ProtocolTypes.fromString(reader1.getString())); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Caches.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Caches.java index b052164fafcb..cbbaaa112839 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Caches.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Caches.java @@ -42,36 +42,6 @@ Response<Cache> getWithResponse(String resourceGroupName, String accountName, St */ Cache get(String resourceGroupName, String accountName, String poolName, String cacheName); - /** - * Patch the specified Cache. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param cacheName The name of the cache resource. - * @param body 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. - */ - void update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body); - - /** - * Patch the specified Cache. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param cacheName The name of the cache resource. - * @param body 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. - */ - void update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body, - Context context); - /** * Delete the specified cache. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProtocolTypes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProtocolTypes.java index f849640c12ac..e1435a14065f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProtocolTypes.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProtocolTypes.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Export policy rule. + * Set of supported protocol types, which include NFSv3, NFSv4 and SMB protocol. */ public final class ProtocolTypes extends ExpandableStringEnum<ProtocolTypes> { /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_apiview_properties.json b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_apiview_properties.json index 0eef4a5f275f..e9f15c8ec3f6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_apiview_properties.json +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_apiview_properties.json @@ -468,6 +468,7 @@ "com.azure.resourcemanager.netapp.models.CacheLifeCycleState": "Microsoft.NetApp.CacheLifeCycleState", "com.azure.resourcemanager.netapp.models.CacheMountTargetProperties": "Microsoft.NetApp.CacheMountTargetProperties", "com.azure.resourcemanager.netapp.models.CacheProperties": "Microsoft.NetApp.CacheProperties", + "com.azure.resourcemanager.netapp.models.CachePropertiesExportPolicy": "Microsoft.NetApp.CachePropertiesExportPolicy", "com.azure.resourcemanager.netapp.models.CacheProvisioningState": "Microsoft.NetApp.CacheProvisioningState", "com.azure.resourcemanager.netapp.models.CacheUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", "com.azure.resourcemanager.netapp.models.CacheUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_metadata.json b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_metadata.json index 7b1e4f6b1db2..a39e3e5b4b8e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_metadata.json +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersion":"2025-09-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.netapp.fluent.AccountsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginChangeKeyVault":"Microsoft.NetApp.NetAppAccounts.changeKeyVault","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginCreateOrUpdate":"Microsoft.NetApp.NetAppAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginDelete":"Microsoft.NetApp.NetAppAccounts.delete","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginGetChangeKeyVaultInformation":"Microsoft.NetApp.NetAppAccounts.getChangeKeyVaultInformation","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginRenewCredentials":"Microsoft.NetApp.NetAppAccounts.renewCredentials","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginTransitionToCmk":"Microsoft.NetApp.NetAppAccounts.transitionToCmk","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginUpdate":"Microsoft.NetApp.NetAppAccounts.update","com.azure.resourcemanager.netapp.fluent.AccountsClient.changeKeyVault":"Microsoft.NetApp.NetAppAccounts.changeKeyVault","com.azure.resourcemanager.netapp.fluent.AccountsClient.createOrUpdate":"Microsoft.NetApp.NetAppAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.AccountsClient.delete":"Microsoft.NetApp.NetAppAccounts.delete","com.azure.resourcemanager.netapp.fluent.AccountsClient.getByResourceGroup":"Microsoft.NetApp.NetAppAccounts.get","com.azure.resourcemanager.netapp.fluent.AccountsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.NetAppAccounts.get","com.azure.resourcemanager.netapp.fluent.AccountsClient.getChangeKeyVaultInformation":"Microsoft.NetApp.NetAppAccounts.getChangeKeyVaultInformation","com.azure.resourcemanager.netapp.fluent.AccountsClient.list":"Microsoft.NetApp.NetAppAccounts.listBySubscription","com.azure.resourcemanager.netapp.fluent.AccountsClient.listByResourceGroup":"Microsoft.NetApp.NetAppAccounts.list","com.azure.resourcemanager.netapp.fluent.AccountsClient.renewCredentials":"Microsoft.NetApp.NetAppAccounts.renewCredentials","com.azure.resourcemanager.netapp.fluent.AccountsClient.transitionToCmk":"Microsoft.NetApp.NetAppAccounts.transitionToCmk","com.azure.resourcemanager.netapp.fluent.AccountsClient.update":"Microsoft.NetApp.NetAppAccounts.update","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient":"Microsoft.NetApp.ActiveDirectoryConfigs","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.beginCreateOrUpdate":"Microsoft.NetApp.ActiveDirectoryConfigs.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.beginDelete":"Microsoft.NetApp.ActiveDirectoryConfigs.delete","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.beginUpdate":"Microsoft.NetApp.ActiveDirectoryConfigs.update","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.createOrUpdate":"Microsoft.NetApp.ActiveDirectoryConfigs.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.delete":"Microsoft.NetApp.ActiveDirectoryConfigs.delete","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.getByResourceGroup":"Microsoft.NetApp.ActiveDirectoryConfigs.get","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.ActiveDirectoryConfigs.get","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.list":"Microsoft.NetApp.ActiveDirectoryConfigs.listBySubscription","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.listByResourceGroup":"Microsoft.NetApp.ActiveDirectoryConfigs.listByResourceGroup","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.update":"Microsoft.NetApp.ActiveDirectoryConfigs.update","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient":"Microsoft.NetApp.BackupPolicies","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginCreate":"Microsoft.NetApp.BackupPolicies.create","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginDelete":"Microsoft.NetApp.BackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginUpdate":"Microsoft.NetApp.BackupPolicies.update","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.create":"Microsoft.NetApp.BackupPolicies.create","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.delete":"Microsoft.NetApp.BackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.get":"Microsoft.NetApp.BackupPolicies.get","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.getWithResponse":"Microsoft.NetApp.BackupPolicies.get","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.list":"Microsoft.NetApp.BackupPolicies.list","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.update":"Microsoft.NetApp.BackupPolicies.update","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient":"Microsoft.NetApp.BackupVaults","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginCreateOrUpdate":"Microsoft.NetApp.BackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginDelete":"Microsoft.NetApp.BackupVaults.delete","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginUpdate":"Microsoft.NetApp.BackupVaults.update","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.createOrUpdate":"Microsoft.NetApp.BackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.delete":"Microsoft.NetApp.BackupVaults.delete","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.get":"Microsoft.NetApp.BackupVaults.get","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.getWithResponse":"Microsoft.NetApp.BackupVaults.get","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.listByNetAppAccount":"Microsoft.NetApp.BackupVaults.listByNetAppAccount","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.update":"Microsoft.NetApp.BackupVaults.update","com.azure.resourcemanager.netapp.fluent.BackupsClient":"Microsoft.NetApp.Backups","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginCreate":"Microsoft.NetApp.Backups.create","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginDelete":"Microsoft.NetApp.Backups.delete","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginUpdate":"Microsoft.NetApp.Backups.update","com.azure.resourcemanager.netapp.fluent.BackupsClient.create":"Microsoft.NetApp.Backups.create","com.azure.resourcemanager.netapp.fluent.BackupsClient.delete":"Microsoft.NetApp.Backups.delete","com.azure.resourcemanager.netapp.fluent.BackupsClient.get":"Microsoft.NetApp.Backups.get","com.azure.resourcemanager.netapp.fluent.BackupsClient.getLatestStatus":"Microsoft.NetApp.Volumes.getLatestStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getLatestStatusWithResponse":"Microsoft.NetApp.Volumes.getLatestStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getVolumeLatestRestoreStatus":"Microsoft.NetApp.Volumes.getVolumeLatestRestoreStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getVolumeLatestRestoreStatusWithResponse":"Microsoft.NetApp.Volumes.getVolumeLatestRestoreStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getWithResponse":"Microsoft.NetApp.Backups.get","com.azure.resourcemanager.netapp.fluent.BackupsClient.listByVault":"Microsoft.NetApp.Backups.listByVault","com.azure.resourcemanager.netapp.fluent.BackupsClient.update":"Microsoft.NetApp.Backups.update","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient.beginMigrateBackups":"Microsoft.NetApp.NetAppAccounts.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient.migrateBackups":"Microsoft.NetApp.NetAppAccounts.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient.beginRestoreFiles":"Microsoft.NetApp.Backups.restoreFiles","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient.restoreFiles":"Microsoft.NetApp.Backups.restoreFiles","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient.beginMigrateBackups":"Microsoft.NetApp.Volumes.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient.migrateBackups":"Microsoft.NetApp.Volumes.migrateBackups","com.azure.resourcemanager.netapp.fluent.BucketsClient":"Microsoft.NetApp.Buckets","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginCreateOrUpdate":"Microsoft.NetApp.Buckets.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginDelete":"Microsoft.NetApp.Buckets.delete","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginUpdate":"Microsoft.NetApp.Buckets.update","com.azure.resourcemanager.netapp.fluent.BucketsClient.createOrUpdate":"Microsoft.NetApp.Buckets.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BucketsClient.delete":"Microsoft.NetApp.Buckets.delete","com.azure.resourcemanager.netapp.fluent.BucketsClient.generateCredentials":"Microsoft.NetApp.Buckets.generateCredentials","com.azure.resourcemanager.netapp.fluent.BucketsClient.generateCredentialsWithResponse":"Microsoft.NetApp.Buckets.generateCredentials","com.azure.resourcemanager.netapp.fluent.BucketsClient.get":"Microsoft.NetApp.Buckets.get","com.azure.resourcemanager.netapp.fluent.BucketsClient.getWithResponse":"Microsoft.NetApp.Buckets.get","com.azure.resourcemanager.netapp.fluent.BucketsClient.list":"Microsoft.NetApp.Buckets.list","com.azure.resourcemanager.netapp.fluent.BucketsClient.update":"Microsoft.NetApp.Buckets.update","com.azure.resourcemanager.netapp.fluent.CachesClient":"Microsoft.NetApp.Caches","com.azure.resourcemanager.netapp.fluent.CachesClient.beginCreateOrUpdate":"Microsoft.NetApp.Caches.createOrUpdate","com.azure.resourcemanager.netapp.fluent.CachesClient.beginDelete":"Microsoft.NetApp.Caches.delete","com.azure.resourcemanager.netapp.fluent.CachesClient.beginPoolChange":"Microsoft.NetApp.Caches.poolChange","com.azure.resourcemanager.netapp.fluent.CachesClient.beginUpdate":"Microsoft.NetApp.Caches.update","com.azure.resourcemanager.netapp.fluent.CachesClient.createOrUpdate":"Microsoft.NetApp.Caches.createOrUpdate","com.azure.resourcemanager.netapp.fluent.CachesClient.delete":"Microsoft.NetApp.Caches.delete","com.azure.resourcemanager.netapp.fluent.CachesClient.get":"Microsoft.NetApp.Caches.get","com.azure.resourcemanager.netapp.fluent.CachesClient.getWithResponse":"Microsoft.NetApp.Caches.get","com.azure.resourcemanager.netapp.fluent.CachesClient.listByCapacityPools":"Microsoft.NetApp.Caches.listByCapacityPools","com.azure.resourcemanager.netapp.fluent.CachesClient.listPeeringPassphrases":"Microsoft.NetApp.Caches.listPeeringPassphrases","com.azure.resourcemanager.netapp.fluent.CachesClient.listPeeringPassphrasesWithResponse":"Microsoft.NetApp.Caches.listPeeringPassphrases","com.azure.resourcemanager.netapp.fluent.CachesClient.poolChange":"Microsoft.NetApp.Caches.poolChange","com.azure.resourcemanager.netapp.fluent.CachesClient.update":"Microsoft.NetApp.Caches.update","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient":"Microsoft.NetApp.ElasticAccounts","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginDelete":"Microsoft.NetApp.ElasticAccounts.delete","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginUpdate":"Microsoft.NetApp.ElasticAccounts.update","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.createOrUpdate":"Microsoft.NetApp.ElasticAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.delete":"Microsoft.NetApp.ElasticAccounts.delete","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.getByResourceGroup":"Microsoft.NetApp.ElasticAccounts.get","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.ElasticAccounts.get","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.list":"Microsoft.NetApp.ElasticAccounts.listBySubscription","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.listByResourceGroup":"Microsoft.NetApp.ElasticAccounts.listByResourceGroup","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.update":"Microsoft.NetApp.ElasticAccounts.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient":"Microsoft.NetApp.ElasticBackupPolicies","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginDelete":"Microsoft.NetApp.ElasticBackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginUpdate":"Microsoft.NetApp.ElasticBackupPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.createOrUpdate":"Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.delete":"Microsoft.NetApp.ElasticBackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.get":"Microsoft.NetApp.ElasticBackupPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.getWithResponse":"Microsoft.NetApp.ElasticBackupPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.listByElasticAccount":"Microsoft.NetApp.ElasticBackupPolicies.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.update":"Microsoft.NetApp.ElasticBackupPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient":"Microsoft.NetApp.ElasticBackupVaults","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticBackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginDelete":"Microsoft.NetApp.ElasticBackupVaults.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginUpdate":"Microsoft.NetApp.ElasticBackupVaults.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.createOrUpdate":"Microsoft.NetApp.ElasticBackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.delete":"Microsoft.NetApp.ElasticBackupVaults.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.get":"Microsoft.NetApp.ElasticBackupVaults.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.getWithResponse":"Microsoft.NetApp.ElasticBackupVaults.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.listByElasticAccount":"Microsoft.NetApp.ElasticBackupVaults.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.update":"Microsoft.NetApp.ElasticBackupVaults.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient":"Microsoft.NetApp.ElasticBackups","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticBackups.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginDelete":"Microsoft.NetApp.ElasticBackups.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginUpdate":"Microsoft.NetApp.ElasticBackups.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.createOrUpdate":"Microsoft.NetApp.ElasticBackups.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.delete":"Microsoft.NetApp.ElasticBackups.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.get":"Microsoft.NetApp.ElasticBackups.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.getWithResponse":"Microsoft.NetApp.ElasticBackups.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.listByVault":"Microsoft.NetApp.ElasticBackups.listByVault","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.update":"Microsoft.NetApp.ElasticBackups.update","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient":"Microsoft.NetApp.ElasticCapacityPools","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginChangeZone":"Microsoft.NetApp.ElasticCapacityPools.changeZone","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticCapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginDelete":"Microsoft.NetApp.ElasticCapacityPools.delete","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginUpdate":"Microsoft.NetApp.ElasticCapacityPools.update","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.changeZone":"Microsoft.NetApp.ElasticCapacityPools.changeZone","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.checkVolumeFilePathAvailability":"Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.checkVolumeFilePathAvailabilityWithResponse":"Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.createOrUpdate":"Microsoft.NetApp.ElasticCapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.delete":"Microsoft.NetApp.ElasticCapacityPools.delete","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.get":"Microsoft.NetApp.ElasticCapacityPools.get","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.getWithResponse":"Microsoft.NetApp.ElasticCapacityPools.get","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.listByElasticAccount":"Microsoft.NetApp.ElasticCapacityPools.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.update":"Microsoft.NetApp.ElasticCapacityPools.update","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient":"Microsoft.NetApp.ElasticSnapshotPolicies","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginDelete":"Microsoft.NetApp.ElasticSnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginUpdate":"Microsoft.NetApp.ElasticSnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.createOrUpdate":"Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.delete":"Microsoft.NetApp.ElasticSnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.get":"Microsoft.NetApp.ElasticSnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.getWithResponse":"Microsoft.NetApp.ElasticSnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.listByElasticAccount":"Microsoft.NetApp.ElasticSnapshotPolicies.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.listElasticVolumes":"Microsoft.NetApp.ElasticSnapshotPolicies.listElasticVolumes","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.update":"Microsoft.NetApp.ElasticSnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient":"Microsoft.NetApp.ElasticSnapshots","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticSnapshots.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.beginDelete":"Microsoft.NetApp.ElasticSnapshots.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.createOrUpdate":"Microsoft.NetApp.ElasticSnapshots.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.delete":"Microsoft.NetApp.ElasticSnapshots.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.get":"Microsoft.NetApp.ElasticSnapshots.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.getWithResponse":"Microsoft.NetApp.ElasticSnapshots.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.listByElasticVolume":"Microsoft.NetApp.ElasticSnapshots.listByElasticVolume","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient":"Microsoft.NetApp.ElasticVolumes","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticVolumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginDelete":"Microsoft.NetApp.ElasticVolumes.delete","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginRevert":"Microsoft.NetApp.ElasticVolumes.revert","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginUpdate":"Microsoft.NetApp.ElasticVolumes.update","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.createOrUpdate":"Microsoft.NetApp.ElasticVolumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.delete":"Microsoft.NetApp.ElasticVolumes.delete","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.get":"Microsoft.NetApp.ElasticVolumes.get","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.getWithResponse":"Microsoft.NetApp.ElasticVolumes.get","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.listByElasticPool":"Microsoft.NetApp.ElasticVolumes.listByElasticPool","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.revert":"Microsoft.NetApp.ElasticVolumes.revert","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.update":"Microsoft.NetApp.ElasticVolumes.update","com.azure.resourcemanager.netapp.fluent.NetAppManagementClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.get":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.getWithResponse":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.list":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.get":"Microsoft.NetApp.SubscriptionQuotaItems.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.getWithResponse":"Microsoft.NetApp.SubscriptionQuotaItems.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.list":"Microsoft.NetApp.SubscriptionQuotaItems.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.get":"Microsoft.NetApp.RegionInfoResources.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.getWithResponse":"Microsoft.NetApp.RegionInfoResources.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.list":"Microsoft.NetApp.RegionInfoResources.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.get":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.getWithResponse":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.list":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.list","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.beginUpdateNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.updateNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkFilePathAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkFilePathAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkFilePathAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkFilePathAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkNameAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkNameAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkNameAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkNameAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkQuotaAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkQuotaAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkQuotaAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkQuotaAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.queryNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryNetworkSiblingSetWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.queryNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryRegionInfo":"Microsoft.NetApp.NetAppResourceOperationGroup.queryRegionInfo","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryRegionInfoWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.queryRegionInfo","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.updateNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.updateNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.OperationsClient":"Microsoft.NetApp.Operations","com.azure.resourcemanager.netapp.fluent.OperationsClient.list":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.netapp.fluent.PoolsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginCreateOrUpdate":"Microsoft.NetApp.CapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginDelete":"Microsoft.NetApp.CapacityPools.delete","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginUpdate":"Microsoft.NetApp.CapacityPools.update","com.azure.resourcemanager.netapp.fluent.PoolsClient.createOrUpdate":"Microsoft.NetApp.CapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.PoolsClient.delete":"Microsoft.NetApp.CapacityPools.delete","com.azure.resourcemanager.netapp.fluent.PoolsClient.get":"Microsoft.NetApp.CapacityPools.get","com.azure.resourcemanager.netapp.fluent.PoolsClient.getWithResponse":"Microsoft.NetApp.CapacityPools.get","com.azure.resourcemanager.netapp.fluent.PoolsClient.list":"Microsoft.NetApp.CapacityPools.list","com.azure.resourcemanager.netapp.fluent.PoolsClient.update":"Microsoft.NetApp.CapacityPools.update","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient":"Microsoft.NetApp.RansomwareReports","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.beginClearSuspects":"Microsoft.NetApp.RansomwareReports.clearSuspects","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.clearSuspects":"Microsoft.NetApp.RansomwareReports.clearSuspects","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.get":"Microsoft.NetApp.RansomwareReports.get","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.getWithResponse":"Microsoft.NetApp.RansomwareReports.get","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.list":"Microsoft.NetApp.RansomwareReports.list","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient":"Microsoft.NetApp.SnapshotPolicies","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.beginDelete":"Microsoft.NetApp.SnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.beginUpdate":"Microsoft.NetApp.SnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.create":"Microsoft.NetApp.SnapshotPolicies.create","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.createWithResponse":"Microsoft.NetApp.SnapshotPolicies.create","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.delete":"Microsoft.NetApp.SnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.get":"Microsoft.NetApp.SnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.getWithResponse":"Microsoft.NetApp.SnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.list":"Microsoft.NetApp.SnapshotPolicies.list","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.listVolumes":"Microsoft.NetApp.SnapshotPolicies.listVolumes","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.listVolumesWithResponse":"Microsoft.NetApp.SnapshotPolicies.listVolumes","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.update":"Microsoft.NetApp.SnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.SnapshotsClient":"Microsoft.NetApp.Snapshots","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginCreate":"Microsoft.NetApp.Snapshots.create","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginDelete":"Microsoft.NetApp.Snapshots.delete","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginRestoreFiles":"Microsoft.NetApp.Snapshots.restoreFiles","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.create":"Microsoft.NetApp.Snapshots.create","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.delete":"Microsoft.NetApp.Snapshots.delete","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.get":"Microsoft.NetApp.Snapshots.get","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.getWithResponse":"Microsoft.NetApp.Snapshots.get","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.list":"Microsoft.NetApp.Snapshots.list","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.restoreFiles":"Microsoft.NetApp.Snapshots.restoreFiles","com.azure.resourcemanager.netapp.fluent.SubvolumesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginCreate":"Microsoft.NetApp.SubvolumeInfos.create","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginDelete":"Microsoft.NetApp.SubvolumeInfos.delete","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginGetMetadata":"Microsoft.NetApp.SubvolumeInfos.getMetadata","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginUpdate":"Microsoft.NetApp.SubvolumeInfos.update","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.create":"Microsoft.NetApp.SubvolumeInfos.create","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.delete":"Microsoft.NetApp.SubvolumeInfos.delete","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.get":"Microsoft.NetApp.SubvolumeInfos.get","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.getMetadata":"Microsoft.NetApp.SubvolumeInfos.getMetadata","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.getWithResponse":"Microsoft.NetApp.SubvolumeInfos.get","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.listByVolume":"Microsoft.NetApp.SubvolumeInfos.listByVolume","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.update":"Microsoft.NetApp.SubvolumeInfos.update","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient":"Microsoft.NetApp.VolumeGroups","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.beginCreate":"Microsoft.NetApp.VolumeGroups.create","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.beginDelete":"Microsoft.NetApp.VolumeGroups.delete","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.create":"Microsoft.NetApp.VolumeGroups.create","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.delete":"Microsoft.NetApp.VolumeGroups.delete","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.get":"Microsoft.NetApp.VolumeGroups.get","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.getWithResponse":"Microsoft.NetApp.VolumeGroups.get","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.listByNetAppAccount":"Microsoft.NetApp.NetAppAccounts.listByNetAppAccount","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient":"Microsoft.NetApp.VolumeQuotaRules","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginCreate":"Microsoft.NetApp.VolumeQuotaRules.create","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginDelete":"Microsoft.NetApp.VolumeQuotaRules.delete","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginUpdate":"Microsoft.NetApp.VolumeQuotaRules.update","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.create":"Microsoft.NetApp.VolumeQuotaRules.create","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.delete":"Microsoft.NetApp.VolumeQuotaRules.delete","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.get":"Microsoft.NetApp.VolumeQuotaRules.get","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.getWithResponse":"Microsoft.NetApp.VolumeQuotaRules.get","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.listByVolume":"Microsoft.NetApp.VolumeQuotaRules.listByVolume","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.update":"Microsoft.NetApp.VolumeQuotaRules.update","com.azure.resourcemanager.netapp.fluent.VolumesClient":"Microsoft.NetApp.Volumes","com.azure.resourcemanager.netapp.fluent.VolumesClient.authorizeExternalReplication":"Microsoft.NetApp.Volumes.authorizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.authorizeReplication":"Microsoft.NetApp.Volumes.authorizeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginAuthorizeExternalReplication":"Microsoft.NetApp.Volumes.authorizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginAuthorizeReplication":"Microsoft.NetApp.Volumes.authorizeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginBreakFileLocks":"Microsoft.NetApp.Volumes.breakFileLocks","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginBreakReplication":"Microsoft.NetApp.Volumes.breakReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginCreateOrUpdate":"Microsoft.NetApp.Volumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginDelete":"Microsoft.NetApp.Volumes.delete","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginDeleteReplication":"Microsoft.NetApp.Volumes.deleteReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginFinalizeExternalReplication":"Microsoft.NetApp.Volumes.finalizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginFinalizeRelocation":"Microsoft.NetApp.Volumes.finalizeRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginListGetGroupIdListForLdapUser":"Microsoft.NetApp.Volumes.listGetGroupIdListForLdapUser","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginListQuotaReport":"Microsoft.NetApp.Volumes.listQuotaReport","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPeerExternalCluster":"Microsoft.NetApp.Volumes.peerExternalCluster","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPerformReplicationTransfer":"Microsoft.NetApp.Volumes.performReplicationTransfer","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPoolChange":"Microsoft.NetApp.Volumes.poolChange","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPopulateAvailabilityZone":"Microsoft.NetApp.Volumes.populateAvailabilityZone","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginReInitializeReplication":"Microsoft.NetApp.Volumes.reInitializeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginReestablishReplication":"Microsoft.NetApp.Volumes.reestablishReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRelocate":"Microsoft.NetApp.Volumes.relocate","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginResetCifsPassword":"Microsoft.NetApp.Volumes.resetCifsPassword","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginResyncReplication":"Microsoft.NetApp.Volumes.resyncReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRevert":"Microsoft.NetApp.Volumes.revert","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRevertRelocation":"Microsoft.NetApp.Volumes.revertRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginSplitCloneFromParent":"Microsoft.NetApp.Volumes.splitCloneFromParent","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginUpdate":"Microsoft.NetApp.Volumes.update","com.azure.resourcemanager.netapp.fluent.VolumesClient.breakFileLocks":"Microsoft.NetApp.Volumes.breakFileLocks","com.azure.resourcemanager.netapp.fluent.VolumesClient.breakReplication":"Microsoft.NetApp.Volumes.breakReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.createOrUpdate":"Microsoft.NetApp.Volumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.VolumesClient.delete":"Microsoft.NetApp.Volumes.delete","com.azure.resourcemanager.netapp.fluent.VolumesClient.deleteReplication":"Microsoft.NetApp.Volumes.deleteReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.finalizeExternalReplication":"Microsoft.NetApp.Volumes.finalizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.finalizeRelocation":"Microsoft.NetApp.Volumes.finalizeRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.get":"Microsoft.NetApp.Volumes.get","com.azure.resourcemanager.netapp.fluent.VolumesClient.getWithResponse":"Microsoft.NetApp.Volumes.get","com.azure.resourcemanager.netapp.fluent.VolumesClient.list":"Microsoft.NetApp.Volumes.list","com.azure.resourcemanager.netapp.fluent.VolumesClient.listGetGroupIdListForLdapUser":"Microsoft.NetApp.Volumes.listGetGroupIdListForLdapUser","com.azure.resourcemanager.netapp.fluent.VolumesClient.listQuotaReport":"Microsoft.NetApp.Volumes.listQuotaReport","com.azure.resourcemanager.netapp.fluent.VolumesClient.listReplications":"Microsoft.NetApp.Volumes.listReplications","com.azure.resourcemanager.netapp.fluent.VolumesClient.peerExternalCluster":"Microsoft.NetApp.Volumes.peerExternalCluster","com.azure.resourcemanager.netapp.fluent.VolumesClient.performReplicationTransfer":"Microsoft.NetApp.Volumes.performReplicationTransfer","com.azure.resourcemanager.netapp.fluent.VolumesClient.poolChange":"Microsoft.NetApp.Volumes.poolChange","com.azure.resourcemanager.netapp.fluent.VolumesClient.populateAvailabilityZone":"Microsoft.NetApp.Volumes.populateAvailabilityZone","com.azure.resourcemanager.netapp.fluent.VolumesClient.reInitializeReplication":"Microsoft.NetApp.Volumes.reInitializeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.reestablishReplication":"Microsoft.NetApp.Volumes.reestablishReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.relocate":"Microsoft.NetApp.Volumes.relocate","com.azure.resourcemanager.netapp.fluent.VolumesClient.replicationStatus":"Microsoft.NetApp.Volumes.replicationStatus","com.azure.resourcemanager.netapp.fluent.VolumesClient.replicationStatusWithResponse":"Microsoft.NetApp.Volumes.replicationStatus","com.azure.resourcemanager.netapp.fluent.VolumesClient.resetCifsPassword":"Microsoft.NetApp.Volumes.resetCifsPassword","com.azure.resourcemanager.netapp.fluent.VolumesClient.resyncReplication":"Microsoft.NetApp.Volumes.resyncReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.revert":"Microsoft.NetApp.Volumes.revert","com.azure.resourcemanager.netapp.fluent.VolumesClient.revertRelocation":"Microsoft.NetApp.Volumes.revertRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.splitCloneFromParent":"Microsoft.NetApp.Volumes.splitCloneFromParent","com.azure.resourcemanager.netapp.fluent.VolumesClient.update":"Microsoft.NetApp.Volumes.update","com.azure.resourcemanager.netapp.fluent.models.AccountProperties":"Microsoft.NetApp.AccountProperties","com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner":"Microsoft.NetApp.ActiveDirectoryConfig","com.azure.resourcemanager.netapp.fluent.models.BackupInner":"Microsoft.NetApp.Backup","com.azure.resourcemanager.netapp.fluent.models.BackupPatchProperties":"Microsoft.NetApp.BackupPatchProperties","com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner":"Microsoft.NetApp.BackupPolicy","com.azure.resourcemanager.netapp.fluent.models.BackupPolicyProperties":"Microsoft.NetApp.BackupPolicyProperties","com.azure.resourcemanager.netapp.fluent.models.BackupProperties":"Microsoft.NetApp.BackupProperties","com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner":"Microsoft.NetApp.BackupStatus","com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner":"Microsoft.NetApp.BackupVault","com.azure.resourcemanager.netapp.fluent.models.BackupVaultProperties":"Microsoft.NetApp.BackupVaultProperties","com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner":"Microsoft.NetApp.BucketGenerateCredentials","com.azure.resourcemanager.netapp.fluent.models.BucketInner":"Microsoft.NetApp.Bucket","com.azure.resourcemanager.netapp.fluent.models.BucketPatchProperties":"Microsoft.NetApp.BucketPatchProperties","com.azure.resourcemanager.netapp.fluent.models.BucketProperties":"Microsoft.NetApp.BucketProperties","com.azure.resourcemanager.netapp.fluent.models.CacheInner":"Microsoft.NetApp.Cache","com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner":"Microsoft.NetApp.CapacityPool","com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner":"Microsoft.NetApp.CheckAvailabilityResponse","com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner":"Microsoft.NetApp.CheckElasticResourceAvailabilityResponse","com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner":"Microsoft.NetApp.ClusterPeerCommandResponse","com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner":"Microsoft.NetApp.ElasticAccount","com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner":"Microsoft.NetApp.ElasticBackup","com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner":"Microsoft.NetApp.ElasticBackupPolicy","com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner":"Microsoft.NetApp.ElasticBackupVault","com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner":"Microsoft.NetApp.ElasticCapacityPool","com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner":"Microsoft.NetApp.ElasticSnapshot","com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner":"Microsoft.NetApp.ElasticSnapshotPolicy","com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner":"Microsoft.NetApp.ElasticVolume","com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner":"Microsoft.NetApp.GetGroupIdListForLdapUserResponse","com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseInner":"Microsoft.NetApp.GetKeyVaultStatusResponse","com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseProperties":"Microsoft.NetApp.GetKeyVaultStatusResponseProperties","com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner":"Microsoft.NetApp.ListQuotaReportResponse","com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner":"Microsoft.NetApp.NetAppAccount","com.azure.resourcemanager.netapp.fluent.models.NetworkSiblingSetInner":"Microsoft.NetApp.NetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.models.OperationInner":"Microsoft.NetApp.Operation","com.azure.resourcemanager.netapp.fluent.models.OperationProperties":"Microsoft.NetApp.OperationProperties","com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner":"Microsoft.NetApp.PeeringPassphrases","com.azure.resourcemanager.netapp.fluent.models.PoolPatchProperties":"Microsoft.NetApp.PoolPatchProperties","com.azure.resourcemanager.netapp.fluent.models.PoolProperties":"Microsoft.NetApp.PoolProperties","com.azure.resourcemanager.netapp.fluent.models.QuotaItemProperties":"Microsoft.NetApp.QuotaItemProperties","com.azure.resourcemanager.netapp.fluent.models.RansomwareReportInner":"Microsoft.NetApp.RansomwareReport","com.azure.resourcemanager.netapp.fluent.models.RegionInfoInner":"Microsoft.NetApp.RegionInfo","com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner":"Microsoft.NetApp.RegionInfoResource","com.azure.resourcemanager.netapp.fluent.models.ReplicationInner":"Microsoft.NetApp.Replication","com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner":"Microsoft.NetApp.ReplicationStatus","com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner":"Microsoft.NetApp.RestoreStatus","com.azure.resourcemanager.netapp.fluent.models.SnapshotInner":"Microsoft.NetApp.Snapshot","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner":"Microsoft.NetApp.SnapshotPolicy","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyProperties":"Microsoft.NetApp.SnapshotPolicyProperties","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyVolumeListInner":"Microsoft.NetApp.SnapshotPolicyVolumeList","com.azure.resourcemanager.netapp.fluent.models.SnapshotProperties":"Microsoft.NetApp.SnapshotProperties","com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner":"Microsoft.NetApp.QuotaItem","com.azure.resourcemanager.netapp.fluent.models.SubvolumeInfoInner":"Microsoft.NetApp.SubvolumeInfo","com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelInner":"Microsoft.NetApp.SubvolumeModel","com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelProperties":"Microsoft.NetApp.SubvolumeModelProperties","com.azure.resourcemanager.netapp.fluent.models.SubvolumePatchParams":"Microsoft.NetApp.SubvolumePatchParams","com.azure.resourcemanager.netapp.fluent.models.SubvolumeProperties":"Microsoft.NetApp.SubvolumeProperties","com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner":"Microsoft.NetApp.SvmPeerCommandResponse","com.azure.resourcemanager.netapp.fluent.models.UsageProperties":"Microsoft.NetApp.UsageProperties","com.azure.resourcemanager.netapp.fluent.models.UsageResultInner":"Microsoft.NetApp.UsageResult","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupDetailsInner":"Microsoft.NetApp.VolumeGroupDetails","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner":"Microsoft.NetApp.VolumeGroup","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupListProperties":"Microsoft.NetApp.VolumeGroupListProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupProperties":"Microsoft.NetApp.VolumeGroupProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeInner":"Microsoft.NetApp.Volume","com.azure.resourcemanager.netapp.fluent.models.VolumePatchProperties":"Microsoft.NetApp.VolumePatchProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeProperties":"Microsoft.NetApp.VolumeProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner":"Microsoft.NetApp.VolumeQuotaRule","com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRulesProperties":"Microsoft.NetApp.VolumeQuotaRulesProperties","com.azure.resourcemanager.netapp.implementation.NetAppManagementClientBuilder":"Microsoft.NetApp","com.azure.resourcemanager.netapp.implementation.models.ActiveDirectoryConfigListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.BackupPoliciesList":"Microsoft.NetApp.BackupPoliciesList","com.azure.resourcemanager.netapp.implementation.models.BackupVaultsList":"Microsoft.NetApp.BackupVaultsList","com.azure.resourcemanager.netapp.implementation.models.BackupsList":"Microsoft.NetApp.BackupsList","com.azure.resourcemanager.netapp.implementation.models.BucketList":"Microsoft.NetApp.BucketList","com.azure.resourcemanager.netapp.implementation.models.CacheList":"Microsoft.NetApp.CacheList","com.azure.resourcemanager.netapp.implementation.models.CapacityPoolList":"Microsoft.NetApp.CapacityPoolList","com.azure.resourcemanager.netapp.implementation.models.ElasticAccountListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticBackupListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticBackupPolicyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticBackupVaultListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticCapacityPoolListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyVolumeList":"Microsoft.NetApp.ElasticSnapshotPolicyVolumeList","com.azure.resourcemanager.netapp.implementation.models.ElasticVolumeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ListReplications":"Microsoft.NetApp.ListReplications","com.azure.resourcemanager.netapp.implementation.models.NetAppAccountList":"Microsoft.NetApp.NetAppAccountList","com.azure.resourcemanager.netapp.implementation.models.OperationListResult":"Microsoft.NetApp.OperationListResult","com.azure.resourcemanager.netapp.implementation.models.QuotaItemList":"Microsoft.NetApp.QuotaItemList","com.azure.resourcemanager.netapp.implementation.models.RansomwareReportsList":"Microsoft.NetApp.RansomwareReportsList","com.azure.resourcemanager.netapp.implementation.models.RegionInfosList":"Microsoft.NetApp.RegionInfosList","com.azure.resourcemanager.netapp.implementation.models.SnapshotPoliciesList":"Microsoft.NetApp.SnapshotPoliciesList","com.azure.resourcemanager.netapp.implementation.models.SnapshotsList":"Microsoft.NetApp.SnapshotsList","com.azure.resourcemanager.netapp.implementation.models.SubvolumesList":"Microsoft.NetApp.SubvolumesList","com.azure.resourcemanager.netapp.implementation.models.UsagesListResult":"Microsoft.NetApp.UsagesListResult","com.azure.resourcemanager.netapp.implementation.models.VolumeGroupList":"Microsoft.NetApp.VolumeGroupList","com.azure.resourcemanager.netapp.implementation.models.VolumeList":"Microsoft.NetApp.VolumeList","com.azure.resourcemanager.netapp.implementation.models.VolumeQuotaRulesList":"Microsoft.NetApp.VolumeQuotaRulesList","com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit":"Microsoft.NetApp.AcceptGrowCapacityPoolForShortTermCloneSplit","com.azure.resourcemanager.netapp.models.AccountEncryption":"Microsoft.NetApp.AccountEncryption","com.azure.resourcemanager.netapp.models.ActiveDirectory":"Microsoft.NetApp.ActiveDirectory","com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigProperties":"Microsoft.NetApp.ActiveDirectoryConfigProperties","com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ActiveDirectoryStatus":"Microsoft.NetApp.ActiveDirectoryStatus","com.azure.resourcemanager.netapp.models.ActualRansomwareProtectionState":"Microsoft.NetApp.ActualRansomwareProtectionState","com.azure.resourcemanager.netapp.models.ApplicationType":"Microsoft.NetApp.ApplicationType","com.azure.resourcemanager.netapp.models.AuthorizeRequest":"Microsoft.NetApp.AuthorizeRequest","com.azure.resourcemanager.netapp.models.AvsDataStore":"Microsoft.NetApp.AvsDataStore","com.azure.resourcemanager.netapp.models.BackupPatch":"Microsoft.NetApp.BackupPatch","com.azure.resourcemanager.netapp.models.BackupPolicyPatch":"Microsoft.NetApp.BackupPolicyPatch","com.azure.resourcemanager.netapp.models.BackupRestoreFiles":"Microsoft.NetApp.BackupRestoreFiles","com.azure.resourcemanager.netapp.models.BackupType":"Microsoft.NetApp.BackupType","com.azure.resourcemanager.netapp.models.BackupVaultPatch":"Microsoft.NetApp.BackupVaultPatch","com.azure.resourcemanager.netapp.models.BackupsMigrationRequest":"Microsoft.NetApp.BackupsMigrationRequest","com.azure.resourcemanager.netapp.models.BreakFileLocksRequest":"Microsoft.NetApp.BreakFileLocksRequest","com.azure.resourcemanager.netapp.models.BreakReplicationRequest":"Microsoft.NetApp.BreakReplicationRequest","com.azure.resourcemanager.netapp.models.BreakthroughMode":"Microsoft.NetApp.BreakthroughMode","com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry":"Microsoft.NetApp.BucketCredentialsExpiry","com.azure.resourcemanager.netapp.models.BucketPatch":"Microsoft.NetApp.BucketPatch","com.azure.resourcemanager.netapp.models.BucketPatchPermissions":"Microsoft.NetApp.BucketPatchPermissions","com.azure.resourcemanager.netapp.models.BucketPermissions":"Microsoft.NetApp.BucketPermissions","com.azure.resourcemanager.netapp.models.BucketServerPatchProperties":"Microsoft.NetApp.BucketServerPatchProperties","com.azure.resourcemanager.netapp.models.BucketServerProperties":"Microsoft.NetApp.BucketServerProperties","com.azure.resourcemanager.netapp.models.CacheLifeCycleState":"Microsoft.NetApp.CacheLifeCycleState","com.azure.resourcemanager.netapp.models.CacheMountTargetProperties":"Microsoft.NetApp.CacheMountTargetProperties","com.azure.resourcemanager.netapp.models.CacheProperties":"Microsoft.NetApp.CacheProperties","com.azure.resourcemanager.netapp.models.CacheProvisioningState":"Microsoft.NetApp.CacheProvisioningState","com.azure.resourcemanager.netapp.models.CacheUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.CacheUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.CapacityPoolPatch":"Microsoft.NetApp.CapacityPoolPatch","com.azure.resourcemanager.netapp.models.ChangeKeyVault":"Microsoft.NetApp.ChangeKeyVault","com.azure.resourcemanager.netapp.models.ChangeZoneRequest":"Microsoft.NetApp.ChangeZoneRequest","com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityReason":"Microsoft.NetApp.CheckElasticResourceAvailabilityReason","com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityStatus":"Microsoft.NetApp.CheckElasticResourceAvailabilityStatus","com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest":"Microsoft.NetApp.CheckElasticVolumeFilePathAvailabilityRequest","com.azure.resourcemanager.netapp.models.CheckNameResourceTypes":"Microsoft.NetApp.CheckNameResourceTypes","com.azure.resourcemanager.netapp.models.CheckQuotaNameResourceTypes":"Microsoft.NetApp.CheckQuotaNameResourceTypes","com.azure.resourcemanager.netapp.models.ChownMode":"Microsoft.NetApp.ChownMode","com.azure.resourcemanager.netapp.models.CifsChangeNotifyState":"Microsoft.NetApp.CifsChangeNotifyState","com.azure.resourcemanager.netapp.models.CifsUser":"Microsoft.NetApp.CifsUser","com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy":"Microsoft.NetApp.CoolAccessRetrievalPolicy","com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy":"Microsoft.NetApp.CoolAccessTieringPolicy","com.azure.resourcemanager.netapp.models.CredentialsStatus":"Microsoft.NetApp.CredentialsStatus","com.azure.resourcemanager.netapp.models.DailySchedule":"Microsoft.NetApp.DailySchedule","com.azure.resourcemanager.netapp.models.DayOfWeek":"Microsoft.NetApp.DayOfWeek","com.azure.resourcemanager.netapp.models.DesiredRansomwareProtectionState":"Microsoft.NetApp.DesiredRansomwareProtectionState","com.azure.resourcemanager.netapp.models.DestinationReplication":"Microsoft.NetApp.DestinationReplication","com.azure.resourcemanager.netapp.models.Dimension":"Microsoft.NetApp.Dimension","com.azure.resourcemanager.netapp.models.ElasticAccountProperties":"Microsoft.NetApp.ElasticAccountProperties","com.azure.resourcemanager.netapp.models.ElasticAccountUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticAccountUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties":"Microsoft.NetApp.ElasticBackupPolicyProperties","com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState":"Microsoft.NetApp.ElasticBackupPolicyState","com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ElasticBackupProperties":"Microsoft.NetApp.ElasticBackupProperties","com.azure.resourcemanager.netapp.models.ElasticBackupType":"Microsoft.NetApp.ElasticBackupType","com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties":"Microsoft.NetApp.ElasticBackupVaultProperties","com.azure.resourcemanager.netapp.models.ElasticBackupVaultUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticCapacityPoolProperties":"Microsoft.NetApp.ElasticCapacityPoolProperties","com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ElasticEncryption":"Microsoft.NetApp.ElasticEncryption","com.azure.resourcemanager.netapp.models.ElasticEncryptionConfiguration":"Microsoft.NetApp.ElasticEncryptionConfiguration","com.azure.resourcemanager.netapp.models.ElasticEncryptionIdentity":"Microsoft.NetApp.ElasticEncryptionIdentity","com.azure.resourcemanager.netapp.models.ElasticExportPolicy":"Microsoft.NetApp.ElasticExportPolicy","com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule":"Microsoft.NetApp.ElasticExportPolicyRule","com.azure.resourcemanager.netapp.models.ElasticKeyVaultProperties":"Microsoft.NetApp.ElasticKeyVaultProperties","com.azure.resourcemanager.netapp.models.ElasticKeyVaultStatus":"Microsoft.NetApp.ElasticKeyVaultStatus","com.azure.resourcemanager.netapp.models.ElasticMountTargetProperties":"Microsoft.NetApp.ElasticMountTargetProperties","com.azure.resourcemanager.netapp.models.ElasticNfsv3Access":"Microsoft.NetApp.ElasticNfsv3Access","com.azure.resourcemanager.netapp.models.ElasticNfsv4Access":"Microsoft.NetApp.ElasticNfsv4Access","com.azure.resourcemanager.netapp.models.ElasticPoolEncryptionKeySource":"Microsoft.NetApp.ElasticPoolEncryptionKeySource","com.azure.resourcemanager.netapp.models.ElasticProtocolType":"Microsoft.NetApp.ElasticProtocolType","com.azure.resourcemanager.netapp.models.ElasticResourceAvailabilityStatus":"Microsoft.NetApp.ElasticResourceAvailabilityStatus","com.azure.resourcemanager.netapp.models.ElasticRootAccess":"Microsoft.NetApp.ElasticRootAccess","com.azure.resourcemanager.netapp.models.ElasticServiceLevel":"Microsoft.NetApp.ElasticServiceLevel","com.azure.resourcemanager.netapp.models.ElasticSmbEncryption":"Microsoft.NetApp.ElasticSmbEncryption","com.azure.resourcemanager.netapp.models.ElasticSmbPatchProperties":"Microsoft.NetApp.ElasticSmbPatchProperties","com.azure.resourcemanager.netapp.models.ElasticSmbProperties":"Microsoft.NetApp.ElasticSmbProperties","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule":"Microsoft.NetApp.ElasticSnapshotPolicyDailySchedule","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule":"Microsoft.NetApp.ElasticSnapshotPolicyHourlySchedule","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule":"Microsoft.NetApp.ElasticSnapshotPolicyMonthlySchedule","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties":"Microsoft.NetApp.ElasticSnapshotPolicyProperties","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule":"Microsoft.NetApp.ElasticSnapshotPolicyWeeklySchedule","com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties":"Microsoft.NetApp.ElasticSnapshotProperties","com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule":"Microsoft.NetApp.ElasticUnixAccessRule","com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties":"Microsoft.NetApp.ElasticVolumeBackupProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionPatchProperties":"Microsoft.NetApp.ElasticVolumeDataProtectionPatchProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties":"Microsoft.NetApp.ElasticVolumeDataProtectionProperties","com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement":"Microsoft.NetApp.ElasticVolumePolicyEnforcement","com.azure.resourcemanager.netapp.models.ElasticVolumeProperties":"Microsoft.NetApp.ElasticVolumeProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeRestorationState":"Microsoft.NetApp.ElasticVolumeRestorationState","com.azure.resourcemanager.netapp.models.ElasticVolumeRevert":"Microsoft.NetApp.ElasticVolumeRevert","com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties":"Microsoft.NetApp.ElasticVolumeSnapshotProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.EnableSubvolumes":"Microsoft.NetApp.EnableSubvolumes","com.azure.resourcemanager.netapp.models.EnableWriteBackState":"Microsoft.NetApp.EnableWriteBackState","com.azure.resourcemanager.netapp.models.EncryptionIdentity":"Microsoft.NetApp.EncryptionIdentity","com.azure.resourcemanager.netapp.models.EncryptionKeySource":"Microsoft.NetApp.EncryptionKeySource","com.azure.resourcemanager.netapp.models.EncryptionState":"Microsoft.NetApp.EncryptionState","com.azure.resourcemanager.netapp.models.EncryptionTransitionRequest":"Microsoft.NetApp.EncryptionTransitionRequest","com.azure.resourcemanager.netapp.models.EncryptionType":"Microsoft.NetApp.EncryptionType","com.azure.resourcemanager.netapp.models.EndpointType":"Microsoft.NetApp.EndpointType","com.azure.resourcemanager.netapp.models.Exclude":"Microsoft.NetApp.Exclude","com.azure.resourcemanager.netapp.models.ExportPolicyRule":"Microsoft.NetApp.ExportPolicyRule","com.azure.resourcemanager.netapp.models.ExternalReplicationSetupStatus":"Microsoft.NetApp.ExternalReplicationSetupStatus","com.azure.resourcemanager.netapp.models.FileAccessLogs":"Microsoft.NetApp.FileAccessLogs","com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest":"Microsoft.NetApp.FilePathAvailabilityRequest","com.azure.resourcemanager.netapp.models.FileSystemUser":"Microsoft.NetApp.FileSystemUser","com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest":"Microsoft.NetApp.GetGroupIdListForLdapUserRequest","com.azure.resourcemanager.netapp.models.GlobalFileLockingState":"Microsoft.NetApp.GlobalFileLockingState","com.azure.resourcemanager.netapp.models.HourlySchedule":"Microsoft.NetApp.HourlySchedule","com.azure.resourcemanager.netapp.models.InAvailabilityReasonType":"Microsoft.NetApp.InAvailabilityReasonType","com.azure.resourcemanager.netapp.models.KerberosState":"Microsoft.NetApp.KerberosState","com.azure.resourcemanager.netapp.models.KeySource":"Microsoft.NetApp.KeySource","com.azure.resourcemanager.netapp.models.KeyVaultPrivateEndpoint":"Microsoft.NetApp.KeyVaultPrivateEndpoint","com.azure.resourcemanager.netapp.models.KeyVaultProperties":"Microsoft.NetApp.KeyVaultProperties","com.azure.resourcemanager.netapp.models.KeyVaultStatus":"Microsoft.NetApp.KeyVaultStatus","com.azure.resourcemanager.netapp.models.LargeVolumeType":"Microsoft.NetApp.LargeVolumeType","com.azure.resourcemanager.netapp.models.LdapConfiguration":"Microsoft.NetApp.LdapConfiguration","com.azure.resourcemanager.netapp.models.LdapSearchScopeOpt":"Microsoft.NetApp.LdapSearchScopeOpt","com.azure.resourcemanager.netapp.models.LdapServerType":"Microsoft.NetApp.LdapServerType","com.azure.resourcemanager.netapp.models.LdapState":"Microsoft.NetApp.LdapState","com.azure.resourcemanager.netapp.models.ListReplicationsRequest":"Microsoft.NetApp.ListReplicationsRequest","com.azure.resourcemanager.netapp.models.LogSpecification":"Microsoft.NetApp.LogSpecification","com.azure.resourcemanager.netapp.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.netapp.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.netapp.models.MetricAggregationType":"Microsoft.NetApp.MetricAggregationType","com.azure.resourcemanager.netapp.models.MetricSpecification":"Microsoft.NetApp.MetricSpecification","com.azure.resourcemanager.netapp.models.MirrorState":"Microsoft.NetApp.MirrorState","com.azure.resourcemanager.netapp.models.MonthlySchedule":"Microsoft.NetApp.MonthlySchedule","com.azure.resourcemanager.netapp.models.MountTargetProperties":"Microsoft.NetApp.MountTargetProperties","com.azure.resourcemanager.netapp.models.MultiAdStatus":"Microsoft.NetApp.MultiAdStatus","com.azure.resourcemanager.netapp.models.NetAppAccountPatch":"Microsoft.NetApp.NetAppAccountPatch","com.azure.resourcemanager.netapp.models.NetworkFeatures":"Microsoft.NetApp.NetworkFeatures","com.azure.resourcemanager.netapp.models.NetworkSiblingSetProvisioningState":"Microsoft.NetApp.NetworkSiblingSetProvisioningState","com.azure.resourcemanager.netapp.models.NfsUser":"Microsoft.NetApp.NfsUser","com.azure.resourcemanager.netapp.models.NicInfo":"Microsoft.NetApp.NicInfo","com.azure.resourcemanager.netapp.models.OperationDisplay":"Microsoft.NetApp.OperationDisplay","com.azure.resourcemanager.netapp.models.OriginClusterInformation":"Microsoft.NetApp.OriginClusterInformation","com.azure.resourcemanager.netapp.models.PeerClusterForVolumeMigrationRequest":"Microsoft.NetApp.PeerClusterForVolumeMigrationRequest","com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs":"Microsoft.NetApp.PlacementKeyValuePairs","com.azure.resourcemanager.netapp.models.PolicyStatus":"Microsoft.NetApp.PolicyStatus","com.azure.resourcemanager.netapp.models.PoolChangeRequest":"Microsoft.NetApp.PoolChangeRequest","com.azure.resourcemanager.netapp.models.ProtocolTypes":"Microsoft.NetApp.ProtocolTypes","com.azure.resourcemanager.netapp.models.ProvisioningState":"Microsoft.NetApp.NetAppProvisioningState","com.azure.resourcemanager.netapp.models.QosType":"Microsoft.NetApp.QosType","com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest":"Microsoft.NetApp.QueryNetworkSiblingSetRequest","com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest":"Microsoft.NetApp.QuotaAvailabilityRequest","com.azure.resourcemanager.netapp.models.QuotaReport":"Microsoft.NetApp.QuotaReport","com.azure.resourcemanager.netapp.models.RansomwareProtectionPatchSettings":"Microsoft.NetApp.RansomwareProtectionPatchSettings","com.azure.resourcemanager.netapp.models.RansomwareProtectionSettings":"Microsoft.NetApp.RansomwareProtectionSettings","com.azure.resourcemanager.netapp.models.RansomwareReportProperties":"Microsoft.NetApp.RansomwareReportProperties","com.azure.resourcemanager.netapp.models.RansomwareReportSeverity":"Microsoft.NetApp.RansomwareReportSeverity","com.azure.resourcemanager.netapp.models.RansomwareReportState":"Microsoft.NetApp.RansomwareReportState","com.azure.resourcemanager.netapp.models.RansomwareSuspectResolution":"Microsoft.NetApp.RansomwareSuspectResolution","com.azure.resourcemanager.netapp.models.RansomwareSuspects":"Microsoft.NetApp.RansomwareSuspects","com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest":"Microsoft.NetApp.RansomwareSuspectsClearRequest","com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest":"Microsoft.NetApp.ReestablishReplicationRequest","com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem":"Microsoft.NetApp.RegionInfoAvailabilityZoneMappingsItem","com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity":"Microsoft.NetApp.RegionStorageToNetworkProximity","com.azure.resourcemanager.netapp.models.RelocateVolumeRequest":"Microsoft.NetApp.RelocateVolumeRequest","com.azure.resourcemanager.netapp.models.RemotePath":"Microsoft.NetApp.RemotePath","com.azure.resourcemanager.netapp.models.ReplicationMirrorState":"Microsoft.NetApp.ReplicationMirrorState","com.azure.resourcemanager.netapp.models.ReplicationObject":"Microsoft.NetApp.ReplicationObject","com.azure.resourcemanager.netapp.models.ReplicationSchedule":"Microsoft.NetApp.ReplicationSchedule","com.azure.resourcemanager.netapp.models.ReplicationType":"Microsoft.NetApp.ReplicationType","com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest":"Microsoft.NetApp.ResourceNameAvailabilityRequest","com.azure.resourcemanager.netapp.models.SecretPassword":"Microsoft.NetApp.SecretPassword","com.azure.resourcemanager.netapp.models.SecretPasswordIdentity":"Microsoft.NetApp.SecretPasswordIdentity","com.azure.resourcemanager.netapp.models.SecretPasswordKeyVaultProperties":"Microsoft.NetApp.SecretPasswordKeyVaultProperties","com.azure.resourcemanager.netapp.models.SecurityStyle":"Microsoft.NetApp.SecurityStyle","com.azure.resourcemanager.netapp.models.ServiceLevel":"Microsoft.NetApp.ServiceLevel","com.azure.resourcemanager.netapp.models.ServiceSpecification":"Microsoft.NetApp.ServiceSpecification","com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration":"Microsoft.NetApp.SmbAccessBasedEnumeration","com.azure.resourcemanager.netapp.models.SmbEncryptionState":"Microsoft.NetApp.SmbEncryptionState","com.azure.resourcemanager.netapp.models.SmbNonBrowsable":"Microsoft.NetApp.SmbNonBrowsable","com.azure.resourcemanager.netapp.models.SmbSettings":"Microsoft.NetApp.SmbSettings","com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility":"Microsoft.NetApp.SnapshotDirectoryVisibility","com.azure.resourcemanager.netapp.models.SnapshotPolicyPatch":"Microsoft.NetApp.SnapshotPolicyPatch","com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles":"Microsoft.NetApp.SnapshotRestoreFiles","com.azure.resourcemanager.netapp.models.SnapshotUsage":"Microsoft.NetApp.SnapshotUsage","com.azure.resourcemanager.netapp.models.SubvolumePatchRequest":"Microsoft.NetApp.SubvolumePatchRequest","com.azure.resourcemanager.netapp.models.SuspectFile":"Microsoft.NetApp.SuspectFile","com.azure.resourcemanager.netapp.models.Type":"Microsoft.NetApp.Type","com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest":"Microsoft.NetApp.UpdateNetworkSiblingSetRequest","com.azure.resourcemanager.netapp.models.UsageName":"Microsoft.NetApp.UsageName","com.azure.resourcemanager.netapp.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.netapp.models.VolumeBackupProperties":"Microsoft.NetApp.VolumeBackupProperties","com.azure.resourcemanager.netapp.models.VolumeBackupRelationshipStatus":"Microsoft.NetApp.VolumeBackupRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeBackups":"Microsoft.NetApp.VolumeBackups","com.azure.resourcemanager.netapp.models.VolumeGroupMetadata":"Microsoft.NetApp.VolumeGroupMetaData","com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties":"Microsoft.NetApp.VolumeGroupVolumeProperties","com.azure.resourcemanager.netapp.models.VolumeLanguage":"Microsoft.NetApp.VolumeLanguage","com.azure.resourcemanager.netapp.models.VolumePatch":"Microsoft.NetApp.VolumePatch","com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection":"Microsoft.NetApp.VolumePatchPropertiesDataProtection","com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy":"Microsoft.NetApp.VolumePatchPropertiesExportPolicy","com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection":"Microsoft.NetApp.VolumePropertiesDataProtection","com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy":"Microsoft.NetApp.VolumePropertiesExportPolicy","com.azure.resourcemanager.netapp.models.VolumeQuotaRulePatch":"Microsoft.NetApp.VolumeQuotaRulePatch","com.azure.resourcemanager.netapp.models.VolumeRelocationProperties":"Microsoft.NetApp.VolumeRelocationProperties","com.azure.resourcemanager.netapp.models.VolumeReplicationRelationshipStatus":"Microsoft.NetApp.VolumeReplicationRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeRestoreRelationshipStatus":"Microsoft.NetApp.VolumeRestoreRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeRevert":"Microsoft.NetApp.VolumeRevert","com.azure.resourcemanager.netapp.models.VolumeSize":"Microsoft.NetApp.VolumeSize","com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties":"Microsoft.NetApp.VolumeSnapshotProperties","com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity":"Microsoft.NetApp.VolumeStorageToNetworkProximity","com.azure.resourcemanager.netapp.models.WeeklySchedule":"Microsoft.NetApp.WeeklySchedule"},"generatedFiles":["src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java","src/main/java/com/azure/resourcemanager/netapp/fluent/AccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ActiveDirectoryConfigsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderBackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderVolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BucketsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticCapacityPoolsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticVolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceRegionInfosClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceUsagesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourcesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/PoolsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/RansomwareReportsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SubvolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeGroupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeQuotaRulesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ActiveDirectoryConfigInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketGenerateCredentialsInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CacheInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckAvailabilityResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckElasticResourceAvailabilityResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ClusterPeerCommandResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticAccountInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupVaultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticCapacityPoolInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticVolumeInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetGroupIdListForLdapUserResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetKeyVaultStatusResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetKeyVaultStatusResponseProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ListQuotaReportResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetworkSiblingSetInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PeeringPassphrasesInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/QuotaItemProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RansomwareReportInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeInfoInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumePatchParams.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SvmPeerCommandResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/UsageProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/UsageResultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRuleInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRulesProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/netapp/fluent/package-info.java","src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketGenerateCredentialsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CheckAvailabilityResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CheckElasticResourceAvailabilityResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeerCommandResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumeImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/GetGroupIdListForLdapUserResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/GetKeyVaultStatusResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ListQuotaReportResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceUsagesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceUsagesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetworkSiblingSetImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PeeringPassphrasesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoResourceImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RestoreStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyVolumeListImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubscriptionQuotaItemImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeInfoImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeModelImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeerCommandResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/UsageResultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupDetailsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRuleImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ActiveDirectoryConfigListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupPoliciesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupVaultsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BucketList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/CacheList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/CapacityPoolList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticAccountListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupPolicyListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupVaultListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticCapacityPoolListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyVolumeList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticVolumeListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ListReplications.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/NetAppAccountList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/QuotaItemList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/RansomwareReportsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/RegionInfosList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SnapshotPoliciesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SnapshotsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SubvolumesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/UsagesListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeGroupList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeQuotaRulesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/package-info.java","src/main/java/com/azure/resourcemanager/netapp/models/AcceptGrowCapacityPoolForShortTermCloneSplit.java","src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.java","src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfig.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigs.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ActualRansomwareProtectionState.java","src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java","src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java","src/main/java/com/azure/resourcemanager/netapp/models/Backup.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVault.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/Backups.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderBackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderVolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakFileLocksRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakthroughMode.java","src/main/java/com/azure/resourcemanager/netapp/models/Bucket.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketCredentialsExpiry.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketGenerateCredentials.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPatchPermissions.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPermissions.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketServerPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketServerProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/Buckets.java","src/main/java/com/azure/resourcemanager/netapp/models/Cache.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheLifeCycleState.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheMountTargetProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/Caches.java","src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java","src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/ChangeKeyVault.java","src/main/java/com/azure/resourcemanager/netapp/models/ChangeZoneRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckAvailabilityResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityReason.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticVolumeFilePathAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java","src/main/java/com/azure/resourcemanager/netapp/models/CifsChangeNotifyState.java","src/main/java/com/azure/resourcemanager/netapp/models/CifsUser.java","src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerCommandResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessRetrievalPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessTieringPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/CredentialsStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/DayOfWeek.java","src/main/java/com/azure/resourcemanager/netapp/models/DesiredRansomwareProtectionState.java","src/main/java/com/azure/resourcemanager/netapp/models/DestinationReplication.java","src/main/java/com/azure/resourcemanager/netapp/models/Dimension.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccount.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackup.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyState.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupType.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVault.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackups.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPool.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPools.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryption.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionConfiguration.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicyRule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticMountTargetProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv3Access.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv4Access.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticPoolEncryptionKeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticProtocolType.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticResourceAvailabilityStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticRootAccess.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticServiceLevel.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbEncryption.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshot.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyDailySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyHourlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyMonthlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyWeeklySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshots.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticUnixAccessRule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolume.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeBackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumePolicyEnforcement.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRestorationState.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRevert.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeSnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/EnableSubvolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/EnableWriteBackState.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionKeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionState.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionTransitionRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java","src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java","src/main/java/com/azure/resourcemanager/netapp/models/Exclude.java","src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalReplicationSetupStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/FileAccessLogs.java","src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/FileSystemUser.java","src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/GetKeyVaultStatusResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/GlobalFileLockingState.java","src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java","src/main/java/com/azure/resourcemanager/netapp/models/KerberosState.java","src/main/java/com/azure/resourcemanager/netapp/models/KeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultPrivateEndpoint.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/LargeVolumeType.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapConfiguration.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapSearchScopeOpt.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapServerType.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapState.java","src/main/java/com/azure/resourcemanager/netapp/models/ListQuotaReportResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/ListReplicationsRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/netapp/models/MetricAggregationType.java","src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java","src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/MountTargetProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/MultiAdStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceQuotaLimits.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceQuotaLimitsAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceRegionInfos.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceUsages.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResources.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSet.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSetProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/NfsUser.java","src/main/java/com/azure/resourcemanager/netapp/models/NicInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/Operation.java","src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/netapp/models/Operations.java","src/main/java/com/azure/resourcemanager/netapp/models/OriginClusterInformation.java","src/main/java/com/azure/resourcemanager/netapp/models/PeerClusterForVolumeMigrationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/PeeringPassphrases.java","src/main/java/com/azure/resourcemanager/netapp/models/PlacementKeyValuePairs.java","src/main/java/com/azure/resourcemanager/netapp/models/PolicyStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/PoolChangeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/Pools.java","src/main/java/com/azure/resourcemanager/netapp/models/ProtocolTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/QosType.java","src/main/java/com/azure/resourcemanager/netapp/models/QueryNetworkSiblingSetRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/QuotaReport.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionPatchSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReport.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportSeverity.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportState.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReports.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectResolution.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspects.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectsClearRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/ReestablishReplicationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoAvailabilityZoneMappingsItem.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionStorageToNetworkProximity.java","src/main/java/com/azure/resourcemanager/netapp/models/RelocateVolumeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RemotePath.java","src/main/java/com/azure/resourcemanager/netapp/models/Replication.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationMirrorState.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationType.java","src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RestoreStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/SecretPassword.java","src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordKeyVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java","src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java","src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbAccessBasedEnumeration.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbEncryptionState.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbNonBrowsable.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/Snapshot.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotDirectoryVisibility.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyVolumeList.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotRestoreFiles.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotUsage.java","src/main/java/com/azure/resourcemanager/netapp/models/Snapshots.java","src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItem.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeModel.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumePatchRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/Subvolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/SuspectFile.java","src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerCommandResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/Type.java","src/main/java/com/azure/resourcemanager/netapp/models/UpdateNetworkSiblingSetRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/UsageName.java","src/main/java/com/azure/resourcemanager/netapp/models/UsageResult.java","src/main/java/com/azure/resourcemanager/netapp/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/Volume.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroup.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupDetails.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroups.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeLanguage.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRule.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulePatch.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRules.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRelocationProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeReplicationRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRestoreRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeSize.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java","src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java","src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/package-info.java","src/main/java/com/azure/resourcemanager/netapp/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersion":"2025-09-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.netapp.fluent.AccountsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginChangeKeyVault":"Microsoft.NetApp.NetAppAccounts.changeKeyVault","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginCreateOrUpdate":"Microsoft.NetApp.NetAppAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginDelete":"Microsoft.NetApp.NetAppAccounts.delete","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginGetChangeKeyVaultInformation":"Microsoft.NetApp.NetAppAccounts.getChangeKeyVaultInformation","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginRenewCredentials":"Microsoft.NetApp.NetAppAccounts.renewCredentials","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginTransitionToCmk":"Microsoft.NetApp.NetAppAccounts.transitionToCmk","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginUpdate":"Microsoft.NetApp.NetAppAccounts.update","com.azure.resourcemanager.netapp.fluent.AccountsClient.changeKeyVault":"Microsoft.NetApp.NetAppAccounts.changeKeyVault","com.azure.resourcemanager.netapp.fluent.AccountsClient.createOrUpdate":"Microsoft.NetApp.NetAppAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.AccountsClient.delete":"Microsoft.NetApp.NetAppAccounts.delete","com.azure.resourcemanager.netapp.fluent.AccountsClient.getByResourceGroup":"Microsoft.NetApp.NetAppAccounts.get","com.azure.resourcemanager.netapp.fluent.AccountsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.NetAppAccounts.get","com.azure.resourcemanager.netapp.fluent.AccountsClient.getChangeKeyVaultInformation":"Microsoft.NetApp.NetAppAccounts.getChangeKeyVaultInformation","com.azure.resourcemanager.netapp.fluent.AccountsClient.list":"Microsoft.NetApp.NetAppAccounts.listBySubscription","com.azure.resourcemanager.netapp.fluent.AccountsClient.listByResourceGroup":"Microsoft.NetApp.NetAppAccounts.list","com.azure.resourcemanager.netapp.fluent.AccountsClient.renewCredentials":"Microsoft.NetApp.NetAppAccounts.renewCredentials","com.azure.resourcemanager.netapp.fluent.AccountsClient.transitionToCmk":"Microsoft.NetApp.NetAppAccounts.transitionToCmk","com.azure.resourcemanager.netapp.fluent.AccountsClient.update":"Microsoft.NetApp.NetAppAccounts.update","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient":"Microsoft.NetApp.ActiveDirectoryConfigs","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.beginCreateOrUpdate":"Microsoft.NetApp.ActiveDirectoryConfigs.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.beginDelete":"Microsoft.NetApp.ActiveDirectoryConfigs.delete","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.beginUpdate":"Microsoft.NetApp.ActiveDirectoryConfigs.update","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.createOrUpdate":"Microsoft.NetApp.ActiveDirectoryConfigs.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.delete":"Microsoft.NetApp.ActiveDirectoryConfigs.delete","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.getByResourceGroup":"Microsoft.NetApp.ActiveDirectoryConfigs.get","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.ActiveDirectoryConfigs.get","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.list":"Microsoft.NetApp.ActiveDirectoryConfigs.listBySubscription","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.listByResourceGroup":"Microsoft.NetApp.ActiveDirectoryConfigs.listByResourceGroup","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.update":"Microsoft.NetApp.ActiveDirectoryConfigs.update","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient":"Microsoft.NetApp.BackupPolicies","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginCreate":"Microsoft.NetApp.BackupPolicies.create","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginDelete":"Microsoft.NetApp.BackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginUpdate":"Microsoft.NetApp.BackupPolicies.update","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.create":"Microsoft.NetApp.BackupPolicies.create","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.delete":"Microsoft.NetApp.BackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.get":"Microsoft.NetApp.BackupPolicies.get","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.getWithResponse":"Microsoft.NetApp.BackupPolicies.get","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.list":"Microsoft.NetApp.BackupPolicies.list","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.update":"Microsoft.NetApp.BackupPolicies.update","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient":"Microsoft.NetApp.BackupVaults","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginCreateOrUpdate":"Microsoft.NetApp.BackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginDelete":"Microsoft.NetApp.BackupVaults.delete","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginUpdate":"Microsoft.NetApp.BackupVaults.update","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.createOrUpdate":"Microsoft.NetApp.BackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.delete":"Microsoft.NetApp.BackupVaults.delete","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.get":"Microsoft.NetApp.BackupVaults.get","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.getWithResponse":"Microsoft.NetApp.BackupVaults.get","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.listByNetAppAccount":"Microsoft.NetApp.BackupVaults.listByNetAppAccount","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.update":"Microsoft.NetApp.BackupVaults.update","com.azure.resourcemanager.netapp.fluent.BackupsClient":"Microsoft.NetApp.Backups","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginCreate":"Microsoft.NetApp.Backups.create","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginDelete":"Microsoft.NetApp.Backups.delete","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginUpdate":"Microsoft.NetApp.Backups.update","com.azure.resourcemanager.netapp.fluent.BackupsClient.create":"Microsoft.NetApp.Backups.create","com.azure.resourcemanager.netapp.fluent.BackupsClient.delete":"Microsoft.NetApp.Backups.delete","com.azure.resourcemanager.netapp.fluent.BackupsClient.get":"Microsoft.NetApp.Backups.get","com.azure.resourcemanager.netapp.fluent.BackupsClient.getLatestStatus":"Microsoft.NetApp.Volumes.getLatestStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getLatestStatusWithResponse":"Microsoft.NetApp.Volumes.getLatestStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getVolumeLatestRestoreStatus":"Microsoft.NetApp.Volumes.getVolumeLatestRestoreStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getVolumeLatestRestoreStatusWithResponse":"Microsoft.NetApp.Volumes.getVolumeLatestRestoreStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getWithResponse":"Microsoft.NetApp.Backups.get","com.azure.resourcemanager.netapp.fluent.BackupsClient.listByVault":"Microsoft.NetApp.Backups.listByVault","com.azure.resourcemanager.netapp.fluent.BackupsClient.update":"Microsoft.NetApp.Backups.update","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient.beginMigrateBackups":"Microsoft.NetApp.NetAppAccounts.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient.migrateBackups":"Microsoft.NetApp.NetAppAccounts.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient.beginRestoreFiles":"Microsoft.NetApp.Backups.restoreFiles","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient.restoreFiles":"Microsoft.NetApp.Backups.restoreFiles","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient.beginMigrateBackups":"Microsoft.NetApp.Volumes.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient.migrateBackups":"Microsoft.NetApp.Volumes.migrateBackups","com.azure.resourcemanager.netapp.fluent.BucketsClient":"Microsoft.NetApp.Buckets","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginCreateOrUpdate":"Microsoft.NetApp.Buckets.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginDelete":"Microsoft.NetApp.Buckets.delete","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginUpdate":"Microsoft.NetApp.Buckets.update","com.azure.resourcemanager.netapp.fluent.BucketsClient.createOrUpdate":"Microsoft.NetApp.Buckets.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BucketsClient.delete":"Microsoft.NetApp.Buckets.delete","com.azure.resourcemanager.netapp.fluent.BucketsClient.generateCredentials":"Microsoft.NetApp.Buckets.generateCredentials","com.azure.resourcemanager.netapp.fluent.BucketsClient.generateCredentialsWithResponse":"Microsoft.NetApp.Buckets.generateCredentials","com.azure.resourcemanager.netapp.fluent.BucketsClient.get":"Microsoft.NetApp.Buckets.get","com.azure.resourcemanager.netapp.fluent.BucketsClient.getWithResponse":"Microsoft.NetApp.Buckets.get","com.azure.resourcemanager.netapp.fluent.BucketsClient.list":"Microsoft.NetApp.Buckets.list","com.azure.resourcemanager.netapp.fluent.BucketsClient.update":"Microsoft.NetApp.Buckets.update","com.azure.resourcemanager.netapp.fluent.CachesClient":"Microsoft.NetApp.Caches","com.azure.resourcemanager.netapp.fluent.CachesClient.beginCreateOrUpdate":"Microsoft.NetApp.Caches.createOrUpdate","com.azure.resourcemanager.netapp.fluent.CachesClient.beginDelete":"Microsoft.NetApp.Caches.delete","com.azure.resourcemanager.netapp.fluent.CachesClient.beginPoolChange":"Microsoft.NetApp.Caches.poolChange","com.azure.resourcemanager.netapp.fluent.CachesClient.beginUpdate":"Microsoft.NetApp.Caches.update","com.azure.resourcemanager.netapp.fluent.CachesClient.createOrUpdate":"Microsoft.NetApp.Caches.createOrUpdate","com.azure.resourcemanager.netapp.fluent.CachesClient.delete":"Microsoft.NetApp.Caches.delete","com.azure.resourcemanager.netapp.fluent.CachesClient.get":"Microsoft.NetApp.Caches.get","com.azure.resourcemanager.netapp.fluent.CachesClient.getWithResponse":"Microsoft.NetApp.Caches.get","com.azure.resourcemanager.netapp.fluent.CachesClient.listByCapacityPools":"Microsoft.NetApp.Caches.listByCapacityPools","com.azure.resourcemanager.netapp.fluent.CachesClient.listPeeringPassphrases":"Microsoft.NetApp.Caches.listPeeringPassphrases","com.azure.resourcemanager.netapp.fluent.CachesClient.listPeeringPassphrasesWithResponse":"Microsoft.NetApp.Caches.listPeeringPassphrases","com.azure.resourcemanager.netapp.fluent.CachesClient.poolChange":"Microsoft.NetApp.Caches.poolChange","com.azure.resourcemanager.netapp.fluent.CachesClient.update":"Microsoft.NetApp.Caches.update","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient":"Microsoft.NetApp.ElasticAccounts","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginDelete":"Microsoft.NetApp.ElasticAccounts.delete","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginUpdate":"Microsoft.NetApp.ElasticAccounts.update","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.createOrUpdate":"Microsoft.NetApp.ElasticAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.delete":"Microsoft.NetApp.ElasticAccounts.delete","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.getByResourceGroup":"Microsoft.NetApp.ElasticAccounts.get","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.ElasticAccounts.get","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.list":"Microsoft.NetApp.ElasticAccounts.listBySubscription","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.listByResourceGroup":"Microsoft.NetApp.ElasticAccounts.listByResourceGroup","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.update":"Microsoft.NetApp.ElasticAccounts.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient":"Microsoft.NetApp.ElasticBackupPolicies","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginDelete":"Microsoft.NetApp.ElasticBackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginUpdate":"Microsoft.NetApp.ElasticBackupPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.createOrUpdate":"Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.delete":"Microsoft.NetApp.ElasticBackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.get":"Microsoft.NetApp.ElasticBackupPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.getWithResponse":"Microsoft.NetApp.ElasticBackupPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.listByElasticAccount":"Microsoft.NetApp.ElasticBackupPolicies.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.update":"Microsoft.NetApp.ElasticBackupPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient":"Microsoft.NetApp.ElasticBackupVaults","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticBackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginDelete":"Microsoft.NetApp.ElasticBackupVaults.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginUpdate":"Microsoft.NetApp.ElasticBackupVaults.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.createOrUpdate":"Microsoft.NetApp.ElasticBackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.delete":"Microsoft.NetApp.ElasticBackupVaults.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.get":"Microsoft.NetApp.ElasticBackupVaults.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.getWithResponse":"Microsoft.NetApp.ElasticBackupVaults.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.listByElasticAccount":"Microsoft.NetApp.ElasticBackupVaults.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.update":"Microsoft.NetApp.ElasticBackupVaults.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient":"Microsoft.NetApp.ElasticBackups","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticBackups.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginDelete":"Microsoft.NetApp.ElasticBackups.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginUpdate":"Microsoft.NetApp.ElasticBackups.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.createOrUpdate":"Microsoft.NetApp.ElasticBackups.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.delete":"Microsoft.NetApp.ElasticBackups.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.get":"Microsoft.NetApp.ElasticBackups.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.getWithResponse":"Microsoft.NetApp.ElasticBackups.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.listByVault":"Microsoft.NetApp.ElasticBackups.listByVault","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.update":"Microsoft.NetApp.ElasticBackups.update","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient":"Microsoft.NetApp.ElasticCapacityPools","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginChangeZone":"Microsoft.NetApp.ElasticCapacityPools.changeZone","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticCapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginDelete":"Microsoft.NetApp.ElasticCapacityPools.delete","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginUpdate":"Microsoft.NetApp.ElasticCapacityPools.update","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.changeZone":"Microsoft.NetApp.ElasticCapacityPools.changeZone","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.checkVolumeFilePathAvailability":"Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.checkVolumeFilePathAvailabilityWithResponse":"Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.createOrUpdate":"Microsoft.NetApp.ElasticCapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.delete":"Microsoft.NetApp.ElasticCapacityPools.delete","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.get":"Microsoft.NetApp.ElasticCapacityPools.get","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.getWithResponse":"Microsoft.NetApp.ElasticCapacityPools.get","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.listByElasticAccount":"Microsoft.NetApp.ElasticCapacityPools.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.update":"Microsoft.NetApp.ElasticCapacityPools.update","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient":"Microsoft.NetApp.ElasticSnapshotPolicies","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginDelete":"Microsoft.NetApp.ElasticSnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginUpdate":"Microsoft.NetApp.ElasticSnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.createOrUpdate":"Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.delete":"Microsoft.NetApp.ElasticSnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.get":"Microsoft.NetApp.ElasticSnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.getWithResponse":"Microsoft.NetApp.ElasticSnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.listByElasticAccount":"Microsoft.NetApp.ElasticSnapshotPolicies.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.listElasticVolumes":"Microsoft.NetApp.ElasticSnapshotPolicies.listElasticVolumes","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.update":"Microsoft.NetApp.ElasticSnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient":"Microsoft.NetApp.ElasticSnapshots","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticSnapshots.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.beginDelete":"Microsoft.NetApp.ElasticSnapshots.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.createOrUpdate":"Microsoft.NetApp.ElasticSnapshots.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.delete":"Microsoft.NetApp.ElasticSnapshots.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.get":"Microsoft.NetApp.ElasticSnapshots.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.getWithResponse":"Microsoft.NetApp.ElasticSnapshots.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.listByElasticVolume":"Microsoft.NetApp.ElasticSnapshots.listByElasticVolume","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient":"Microsoft.NetApp.ElasticVolumes","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticVolumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginDelete":"Microsoft.NetApp.ElasticVolumes.delete","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginRevert":"Microsoft.NetApp.ElasticVolumes.revert","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginUpdate":"Microsoft.NetApp.ElasticVolumes.update","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.createOrUpdate":"Microsoft.NetApp.ElasticVolumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.delete":"Microsoft.NetApp.ElasticVolumes.delete","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.get":"Microsoft.NetApp.ElasticVolumes.get","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.getWithResponse":"Microsoft.NetApp.ElasticVolumes.get","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.listByElasticPool":"Microsoft.NetApp.ElasticVolumes.listByElasticPool","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.revert":"Microsoft.NetApp.ElasticVolumes.revert","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.update":"Microsoft.NetApp.ElasticVolumes.update","com.azure.resourcemanager.netapp.fluent.NetAppManagementClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.get":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.getWithResponse":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.list":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.get":"Microsoft.NetApp.SubscriptionQuotaItems.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.getWithResponse":"Microsoft.NetApp.SubscriptionQuotaItems.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.list":"Microsoft.NetApp.SubscriptionQuotaItems.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.get":"Microsoft.NetApp.RegionInfoResources.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.getWithResponse":"Microsoft.NetApp.RegionInfoResources.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.list":"Microsoft.NetApp.RegionInfoResources.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.get":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.getWithResponse":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.list":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.list","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.beginUpdateNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.updateNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkFilePathAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkFilePathAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkFilePathAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkFilePathAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkNameAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkNameAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkNameAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkNameAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkQuotaAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkQuotaAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkQuotaAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkQuotaAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.queryNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryNetworkSiblingSetWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.queryNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryRegionInfo":"Microsoft.NetApp.NetAppResourceOperationGroup.queryRegionInfo","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryRegionInfoWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.queryRegionInfo","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.updateNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.updateNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.OperationsClient":"Microsoft.NetApp.Operations","com.azure.resourcemanager.netapp.fluent.OperationsClient.list":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.netapp.fluent.PoolsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginCreateOrUpdate":"Microsoft.NetApp.CapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginDelete":"Microsoft.NetApp.CapacityPools.delete","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginUpdate":"Microsoft.NetApp.CapacityPools.update","com.azure.resourcemanager.netapp.fluent.PoolsClient.createOrUpdate":"Microsoft.NetApp.CapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.PoolsClient.delete":"Microsoft.NetApp.CapacityPools.delete","com.azure.resourcemanager.netapp.fluent.PoolsClient.get":"Microsoft.NetApp.CapacityPools.get","com.azure.resourcemanager.netapp.fluent.PoolsClient.getWithResponse":"Microsoft.NetApp.CapacityPools.get","com.azure.resourcemanager.netapp.fluent.PoolsClient.list":"Microsoft.NetApp.CapacityPools.list","com.azure.resourcemanager.netapp.fluent.PoolsClient.update":"Microsoft.NetApp.CapacityPools.update","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient":"Microsoft.NetApp.RansomwareReports","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.beginClearSuspects":"Microsoft.NetApp.RansomwareReports.clearSuspects","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.clearSuspects":"Microsoft.NetApp.RansomwareReports.clearSuspects","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.get":"Microsoft.NetApp.RansomwareReports.get","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.getWithResponse":"Microsoft.NetApp.RansomwareReports.get","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.list":"Microsoft.NetApp.RansomwareReports.list","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient":"Microsoft.NetApp.SnapshotPolicies","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.beginDelete":"Microsoft.NetApp.SnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.beginUpdate":"Microsoft.NetApp.SnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.create":"Microsoft.NetApp.SnapshotPolicies.create","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.createWithResponse":"Microsoft.NetApp.SnapshotPolicies.create","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.delete":"Microsoft.NetApp.SnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.get":"Microsoft.NetApp.SnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.getWithResponse":"Microsoft.NetApp.SnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.list":"Microsoft.NetApp.SnapshotPolicies.list","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.listVolumes":"Microsoft.NetApp.SnapshotPolicies.listVolumes","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.listVolumesWithResponse":"Microsoft.NetApp.SnapshotPolicies.listVolumes","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.update":"Microsoft.NetApp.SnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.SnapshotsClient":"Microsoft.NetApp.Snapshots","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginCreate":"Microsoft.NetApp.Snapshots.create","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginDelete":"Microsoft.NetApp.Snapshots.delete","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginRestoreFiles":"Microsoft.NetApp.Snapshots.restoreFiles","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.create":"Microsoft.NetApp.Snapshots.create","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.delete":"Microsoft.NetApp.Snapshots.delete","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.get":"Microsoft.NetApp.Snapshots.get","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.getWithResponse":"Microsoft.NetApp.Snapshots.get","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.list":"Microsoft.NetApp.Snapshots.list","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.restoreFiles":"Microsoft.NetApp.Snapshots.restoreFiles","com.azure.resourcemanager.netapp.fluent.SubvolumesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginCreate":"Microsoft.NetApp.SubvolumeInfos.create","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginDelete":"Microsoft.NetApp.SubvolumeInfos.delete","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginGetMetadata":"Microsoft.NetApp.SubvolumeInfos.getMetadata","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginUpdate":"Microsoft.NetApp.SubvolumeInfos.update","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.create":"Microsoft.NetApp.SubvolumeInfos.create","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.delete":"Microsoft.NetApp.SubvolumeInfos.delete","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.get":"Microsoft.NetApp.SubvolumeInfos.get","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.getMetadata":"Microsoft.NetApp.SubvolumeInfos.getMetadata","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.getWithResponse":"Microsoft.NetApp.SubvolumeInfos.get","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.listByVolume":"Microsoft.NetApp.SubvolumeInfos.listByVolume","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.update":"Microsoft.NetApp.SubvolumeInfos.update","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient":"Microsoft.NetApp.VolumeGroups","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.beginCreate":"Microsoft.NetApp.VolumeGroups.create","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.beginDelete":"Microsoft.NetApp.VolumeGroups.delete","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.create":"Microsoft.NetApp.VolumeGroups.create","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.delete":"Microsoft.NetApp.VolumeGroups.delete","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.get":"Microsoft.NetApp.VolumeGroups.get","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.getWithResponse":"Microsoft.NetApp.VolumeGroups.get","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.listByNetAppAccount":"Microsoft.NetApp.NetAppAccounts.listByNetAppAccount","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient":"Microsoft.NetApp.VolumeQuotaRules","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginCreate":"Microsoft.NetApp.VolumeQuotaRules.create","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginDelete":"Microsoft.NetApp.VolumeQuotaRules.delete","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginUpdate":"Microsoft.NetApp.VolumeQuotaRules.update","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.create":"Microsoft.NetApp.VolumeQuotaRules.create","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.delete":"Microsoft.NetApp.VolumeQuotaRules.delete","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.get":"Microsoft.NetApp.VolumeQuotaRules.get","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.getWithResponse":"Microsoft.NetApp.VolumeQuotaRules.get","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.listByVolume":"Microsoft.NetApp.VolumeQuotaRules.listByVolume","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.update":"Microsoft.NetApp.VolumeQuotaRules.update","com.azure.resourcemanager.netapp.fluent.VolumesClient":"Microsoft.NetApp.Volumes","com.azure.resourcemanager.netapp.fluent.VolumesClient.authorizeExternalReplication":"Microsoft.NetApp.Volumes.authorizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.authorizeReplication":"Microsoft.NetApp.Volumes.authorizeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginAuthorizeExternalReplication":"Microsoft.NetApp.Volumes.authorizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginAuthorizeReplication":"Microsoft.NetApp.Volumes.authorizeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginBreakFileLocks":"Microsoft.NetApp.Volumes.breakFileLocks","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginBreakReplication":"Microsoft.NetApp.Volumes.breakReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginCreateOrUpdate":"Microsoft.NetApp.Volumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginDelete":"Microsoft.NetApp.Volumes.delete","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginDeleteReplication":"Microsoft.NetApp.Volumes.deleteReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginFinalizeExternalReplication":"Microsoft.NetApp.Volumes.finalizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginFinalizeRelocation":"Microsoft.NetApp.Volumes.finalizeRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginListGetGroupIdListForLdapUser":"Microsoft.NetApp.Volumes.listGetGroupIdListForLdapUser","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginListQuotaReport":"Microsoft.NetApp.Volumes.listQuotaReport","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPeerExternalCluster":"Microsoft.NetApp.Volumes.peerExternalCluster","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPerformReplicationTransfer":"Microsoft.NetApp.Volumes.performReplicationTransfer","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPoolChange":"Microsoft.NetApp.Volumes.poolChange","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPopulateAvailabilityZone":"Microsoft.NetApp.Volumes.populateAvailabilityZone","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginReInitializeReplication":"Microsoft.NetApp.Volumes.reInitializeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginReestablishReplication":"Microsoft.NetApp.Volumes.reestablishReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRelocate":"Microsoft.NetApp.Volumes.relocate","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginResetCifsPassword":"Microsoft.NetApp.Volumes.resetCifsPassword","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginResyncReplication":"Microsoft.NetApp.Volumes.resyncReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRevert":"Microsoft.NetApp.Volumes.revert","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRevertRelocation":"Microsoft.NetApp.Volumes.revertRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginSplitCloneFromParent":"Microsoft.NetApp.Volumes.splitCloneFromParent","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginUpdate":"Microsoft.NetApp.Volumes.update","com.azure.resourcemanager.netapp.fluent.VolumesClient.breakFileLocks":"Microsoft.NetApp.Volumes.breakFileLocks","com.azure.resourcemanager.netapp.fluent.VolumesClient.breakReplication":"Microsoft.NetApp.Volumes.breakReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.createOrUpdate":"Microsoft.NetApp.Volumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.VolumesClient.delete":"Microsoft.NetApp.Volumes.delete","com.azure.resourcemanager.netapp.fluent.VolumesClient.deleteReplication":"Microsoft.NetApp.Volumes.deleteReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.finalizeExternalReplication":"Microsoft.NetApp.Volumes.finalizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.finalizeRelocation":"Microsoft.NetApp.Volumes.finalizeRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.get":"Microsoft.NetApp.Volumes.get","com.azure.resourcemanager.netapp.fluent.VolumesClient.getWithResponse":"Microsoft.NetApp.Volumes.get","com.azure.resourcemanager.netapp.fluent.VolumesClient.list":"Microsoft.NetApp.Volumes.list","com.azure.resourcemanager.netapp.fluent.VolumesClient.listGetGroupIdListForLdapUser":"Microsoft.NetApp.Volumes.listGetGroupIdListForLdapUser","com.azure.resourcemanager.netapp.fluent.VolumesClient.listQuotaReport":"Microsoft.NetApp.Volumes.listQuotaReport","com.azure.resourcemanager.netapp.fluent.VolumesClient.listReplications":"Microsoft.NetApp.Volumes.listReplications","com.azure.resourcemanager.netapp.fluent.VolumesClient.peerExternalCluster":"Microsoft.NetApp.Volumes.peerExternalCluster","com.azure.resourcemanager.netapp.fluent.VolumesClient.performReplicationTransfer":"Microsoft.NetApp.Volumes.performReplicationTransfer","com.azure.resourcemanager.netapp.fluent.VolumesClient.poolChange":"Microsoft.NetApp.Volumes.poolChange","com.azure.resourcemanager.netapp.fluent.VolumesClient.populateAvailabilityZone":"Microsoft.NetApp.Volumes.populateAvailabilityZone","com.azure.resourcemanager.netapp.fluent.VolumesClient.reInitializeReplication":"Microsoft.NetApp.Volumes.reInitializeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.reestablishReplication":"Microsoft.NetApp.Volumes.reestablishReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.relocate":"Microsoft.NetApp.Volumes.relocate","com.azure.resourcemanager.netapp.fluent.VolumesClient.replicationStatus":"Microsoft.NetApp.Volumes.replicationStatus","com.azure.resourcemanager.netapp.fluent.VolumesClient.replicationStatusWithResponse":"Microsoft.NetApp.Volumes.replicationStatus","com.azure.resourcemanager.netapp.fluent.VolumesClient.resetCifsPassword":"Microsoft.NetApp.Volumes.resetCifsPassword","com.azure.resourcemanager.netapp.fluent.VolumesClient.resyncReplication":"Microsoft.NetApp.Volumes.resyncReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.revert":"Microsoft.NetApp.Volumes.revert","com.azure.resourcemanager.netapp.fluent.VolumesClient.revertRelocation":"Microsoft.NetApp.Volumes.revertRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.splitCloneFromParent":"Microsoft.NetApp.Volumes.splitCloneFromParent","com.azure.resourcemanager.netapp.fluent.VolumesClient.update":"Microsoft.NetApp.Volumes.update","com.azure.resourcemanager.netapp.fluent.models.AccountProperties":"Microsoft.NetApp.AccountProperties","com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner":"Microsoft.NetApp.ActiveDirectoryConfig","com.azure.resourcemanager.netapp.fluent.models.BackupInner":"Microsoft.NetApp.Backup","com.azure.resourcemanager.netapp.fluent.models.BackupPatchProperties":"Microsoft.NetApp.BackupPatchProperties","com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner":"Microsoft.NetApp.BackupPolicy","com.azure.resourcemanager.netapp.fluent.models.BackupPolicyProperties":"Microsoft.NetApp.BackupPolicyProperties","com.azure.resourcemanager.netapp.fluent.models.BackupProperties":"Microsoft.NetApp.BackupProperties","com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner":"Microsoft.NetApp.BackupStatus","com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner":"Microsoft.NetApp.BackupVault","com.azure.resourcemanager.netapp.fluent.models.BackupVaultProperties":"Microsoft.NetApp.BackupVaultProperties","com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner":"Microsoft.NetApp.BucketGenerateCredentials","com.azure.resourcemanager.netapp.fluent.models.BucketInner":"Microsoft.NetApp.Bucket","com.azure.resourcemanager.netapp.fluent.models.BucketPatchProperties":"Microsoft.NetApp.BucketPatchProperties","com.azure.resourcemanager.netapp.fluent.models.BucketProperties":"Microsoft.NetApp.BucketProperties","com.azure.resourcemanager.netapp.fluent.models.CacheInner":"Microsoft.NetApp.Cache","com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner":"Microsoft.NetApp.CapacityPool","com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner":"Microsoft.NetApp.CheckAvailabilityResponse","com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner":"Microsoft.NetApp.CheckElasticResourceAvailabilityResponse","com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner":"Microsoft.NetApp.ClusterPeerCommandResponse","com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner":"Microsoft.NetApp.ElasticAccount","com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner":"Microsoft.NetApp.ElasticBackup","com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner":"Microsoft.NetApp.ElasticBackupPolicy","com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner":"Microsoft.NetApp.ElasticBackupVault","com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner":"Microsoft.NetApp.ElasticCapacityPool","com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner":"Microsoft.NetApp.ElasticSnapshot","com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner":"Microsoft.NetApp.ElasticSnapshotPolicy","com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner":"Microsoft.NetApp.ElasticVolume","com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner":"Microsoft.NetApp.GetGroupIdListForLdapUserResponse","com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseInner":"Microsoft.NetApp.GetKeyVaultStatusResponse","com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseProperties":"Microsoft.NetApp.GetKeyVaultStatusResponseProperties","com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner":"Microsoft.NetApp.ListQuotaReportResponse","com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner":"Microsoft.NetApp.NetAppAccount","com.azure.resourcemanager.netapp.fluent.models.NetworkSiblingSetInner":"Microsoft.NetApp.NetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.models.OperationInner":"Microsoft.NetApp.Operation","com.azure.resourcemanager.netapp.fluent.models.OperationProperties":"Microsoft.NetApp.OperationProperties","com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner":"Microsoft.NetApp.PeeringPassphrases","com.azure.resourcemanager.netapp.fluent.models.PoolPatchProperties":"Microsoft.NetApp.PoolPatchProperties","com.azure.resourcemanager.netapp.fluent.models.PoolProperties":"Microsoft.NetApp.PoolProperties","com.azure.resourcemanager.netapp.fluent.models.QuotaItemProperties":"Microsoft.NetApp.QuotaItemProperties","com.azure.resourcemanager.netapp.fluent.models.RansomwareReportInner":"Microsoft.NetApp.RansomwareReport","com.azure.resourcemanager.netapp.fluent.models.RegionInfoInner":"Microsoft.NetApp.RegionInfo","com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner":"Microsoft.NetApp.RegionInfoResource","com.azure.resourcemanager.netapp.fluent.models.ReplicationInner":"Microsoft.NetApp.Replication","com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner":"Microsoft.NetApp.ReplicationStatus","com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner":"Microsoft.NetApp.RestoreStatus","com.azure.resourcemanager.netapp.fluent.models.SnapshotInner":"Microsoft.NetApp.Snapshot","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner":"Microsoft.NetApp.SnapshotPolicy","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyProperties":"Microsoft.NetApp.SnapshotPolicyProperties","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyVolumeListInner":"Microsoft.NetApp.SnapshotPolicyVolumeList","com.azure.resourcemanager.netapp.fluent.models.SnapshotProperties":"Microsoft.NetApp.SnapshotProperties","com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner":"Microsoft.NetApp.QuotaItem","com.azure.resourcemanager.netapp.fluent.models.SubvolumeInfoInner":"Microsoft.NetApp.SubvolumeInfo","com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelInner":"Microsoft.NetApp.SubvolumeModel","com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelProperties":"Microsoft.NetApp.SubvolumeModelProperties","com.azure.resourcemanager.netapp.fluent.models.SubvolumePatchParams":"Microsoft.NetApp.SubvolumePatchParams","com.azure.resourcemanager.netapp.fluent.models.SubvolumeProperties":"Microsoft.NetApp.SubvolumeProperties","com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner":"Microsoft.NetApp.SvmPeerCommandResponse","com.azure.resourcemanager.netapp.fluent.models.UsageProperties":"Microsoft.NetApp.UsageProperties","com.azure.resourcemanager.netapp.fluent.models.UsageResultInner":"Microsoft.NetApp.UsageResult","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupDetailsInner":"Microsoft.NetApp.VolumeGroupDetails","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner":"Microsoft.NetApp.VolumeGroup","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupListProperties":"Microsoft.NetApp.VolumeGroupListProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupProperties":"Microsoft.NetApp.VolumeGroupProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeInner":"Microsoft.NetApp.Volume","com.azure.resourcemanager.netapp.fluent.models.VolumePatchProperties":"Microsoft.NetApp.VolumePatchProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeProperties":"Microsoft.NetApp.VolumeProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner":"Microsoft.NetApp.VolumeQuotaRule","com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRulesProperties":"Microsoft.NetApp.VolumeQuotaRulesProperties","com.azure.resourcemanager.netapp.implementation.NetAppManagementClientBuilder":"Microsoft.NetApp","com.azure.resourcemanager.netapp.implementation.models.ActiveDirectoryConfigListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.BackupPoliciesList":"Microsoft.NetApp.BackupPoliciesList","com.azure.resourcemanager.netapp.implementation.models.BackupVaultsList":"Microsoft.NetApp.BackupVaultsList","com.azure.resourcemanager.netapp.implementation.models.BackupsList":"Microsoft.NetApp.BackupsList","com.azure.resourcemanager.netapp.implementation.models.BucketList":"Microsoft.NetApp.BucketList","com.azure.resourcemanager.netapp.implementation.models.CacheList":"Microsoft.NetApp.CacheList","com.azure.resourcemanager.netapp.implementation.models.CapacityPoolList":"Microsoft.NetApp.CapacityPoolList","com.azure.resourcemanager.netapp.implementation.models.ElasticAccountListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticBackupListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticBackupPolicyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticBackupVaultListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticCapacityPoolListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyVolumeList":"Microsoft.NetApp.ElasticSnapshotPolicyVolumeList","com.azure.resourcemanager.netapp.implementation.models.ElasticVolumeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ListReplications":"Microsoft.NetApp.ListReplications","com.azure.resourcemanager.netapp.implementation.models.NetAppAccountList":"Microsoft.NetApp.NetAppAccountList","com.azure.resourcemanager.netapp.implementation.models.OperationListResult":"Microsoft.NetApp.OperationListResult","com.azure.resourcemanager.netapp.implementation.models.QuotaItemList":"Microsoft.NetApp.QuotaItemList","com.azure.resourcemanager.netapp.implementation.models.RansomwareReportsList":"Microsoft.NetApp.RansomwareReportsList","com.azure.resourcemanager.netapp.implementation.models.RegionInfosList":"Microsoft.NetApp.RegionInfosList","com.azure.resourcemanager.netapp.implementation.models.SnapshotPoliciesList":"Microsoft.NetApp.SnapshotPoliciesList","com.azure.resourcemanager.netapp.implementation.models.SnapshotsList":"Microsoft.NetApp.SnapshotsList","com.azure.resourcemanager.netapp.implementation.models.SubvolumesList":"Microsoft.NetApp.SubvolumesList","com.azure.resourcemanager.netapp.implementation.models.UsagesListResult":"Microsoft.NetApp.UsagesListResult","com.azure.resourcemanager.netapp.implementation.models.VolumeGroupList":"Microsoft.NetApp.VolumeGroupList","com.azure.resourcemanager.netapp.implementation.models.VolumeList":"Microsoft.NetApp.VolumeList","com.azure.resourcemanager.netapp.implementation.models.VolumeQuotaRulesList":"Microsoft.NetApp.VolumeQuotaRulesList","com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit":"Microsoft.NetApp.AcceptGrowCapacityPoolForShortTermCloneSplit","com.azure.resourcemanager.netapp.models.AccountEncryption":"Microsoft.NetApp.AccountEncryption","com.azure.resourcemanager.netapp.models.ActiveDirectory":"Microsoft.NetApp.ActiveDirectory","com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigProperties":"Microsoft.NetApp.ActiveDirectoryConfigProperties","com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ActiveDirectoryStatus":"Microsoft.NetApp.ActiveDirectoryStatus","com.azure.resourcemanager.netapp.models.ActualRansomwareProtectionState":"Microsoft.NetApp.ActualRansomwareProtectionState","com.azure.resourcemanager.netapp.models.ApplicationType":"Microsoft.NetApp.ApplicationType","com.azure.resourcemanager.netapp.models.AuthorizeRequest":"Microsoft.NetApp.AuthorizeRequest","com.azure.resourcemanager.netapp.models.AvsDataStore":"Microsoft.NetApp.AvsDataStore","com.azure.resourcemanager.netapp.models.BackupPatch":"Microsoft.NetApp.BackupPatch","com.azure.resourcemanager.netapp.models.BackupPolicyPatch":"Microsoft.NetApp.BackupPolicyPatch","com.azure.resourcemanager.netapp.models.BackupRestoreFiles":"Microsoft.NetApp.BackupRestoreFiles","com.azure.resourcemanager.netapp.models.BackupType":"Microsoft.NetApp.BackupType","com.azure.resourcemanager.netapp.models.BackupVaultPatch":"Microsoft.NetApp.BackupVaultPatch","com.azure.resourcemanager.netapp.models.BackupsMigrationRequest":"Microsoft.NetApp.BackupsMigrationRequest","com.azure.resourcemanager.netapp.models.BreakFileLocksRequest":"Microsoft.NetApp.BreakFileLocksRequest","com.azure.resourcemanager.netapp.models.BreakReplicationRequest":"Microsoft.NetApp.BreakReplicationRequest","com.azure.resourcemanager.netapp.models.BreakthroughMode":"Microsoft.NetApp.BreakthroughMode","com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry":"Microsoft.NetApp.BucketCredentialsExpiry","com.azure.resourcemanager.netapp.models.BucketPatch":"Microsoft.NetApp.BucketPatch","com.azure.resourcemanager.netapp.models.BucketPatchPermissions":"Microsoft.NetApp.BucketPatchPermissions","com.azure.resourcemanager.netapp.models.BucketPermissions":"Microsoft.NetApp.BucketPermissions","com.azure.resourcemanager.netapp.models.BucketServerPatchProperties":"Microsoft.NetApp.BucketServerPatchProperties","com.azure.resourcemanager.netapp.models.BucketServerProperties":"Microsoft.NetApp.BucketServerProperties","com.azure.resourcemanager.netapp.models.CacheLifeCycleState":"Microsoft.NetApp.CacheLifeCycleState","com.azure.resourcemanager.netapp.models.CacheMountTargetProperties":"Microsoft.NetApp.CacheMountTargetProperties","com.azure.resourcemanager.netapp.models.CacheProperties":"Microsoft.NetApp.CacheProperties","com.azure.resourcemanager.netapp.models.CachePropertiesExportPolicy":"Microsoft.NetApp.CachePropertiesExportPolicy","com.azure.resourcemanager.netapp.models.CacheProvisioningState":"Microsoft.NetApp.CacheProvisioningState","com.azure.resourcemanager.netapp.models.CacheUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.CacheUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.CapacityPoolPatch":"Microsoft.NetApp.CapacityPoolPatch","com.azure.resourcemanager.netapp.models.ChangeKeyVault":"Microsoft.NetApp.ChangeKeyVault","com.azure.resourcemanager.netapp.models.ChangeZoneRequest":"Microsoft.NetApp.ChangeZoneRequest","com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityReason":"Microsoft.NetApp.CheckElasticResourceAvailabilityReason","com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityStatus":"Microsoft.NetApp.CheckElasticResourceAvailabilityStatus","com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest":"Microsoft.NetApp.CheckElasticVolumeFilePathAvailabilityRequest","com.azure.resourcemanager.netapp.models.CheckNameResourceTypes":"Microsoft.NetApp.CheckNameResourceTypes","com.azure.resourcemanager.netapp.models.CheckQuotaNameResourceTypes":"Microsoft.NetApp.CheckQuotaNameResourceTypes","com.azure.resourcemanager.netapp.models.ChownMode":"Microsoft.NetApp.ChownMode","com.azure.resourcemanager.netapp.models.CifsChangeNotifyState":"Microsoft.NetApp.CifsChangeNotifyState","com.azure.resourcemanager.netapp.models.CifsUser":"Microsoft.NetApp.CifsUser","com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy":"Microsoft.NetApp.CoolAccessRetrievalPolicy","com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy":"Microsoft.NetApp.CoolAccessTieringPolicy","com.azure.resourcemanager.netapp.models.CredentialsStatus":"Microsoft.NetApp.CredentialsStatus","com.azure.resourcemanager.netapp.models.DailySchedule":"Microsoft.NetApp.DailySchedule","com.azure.resourcemanager.netapp.models.DayOfWeek":"Microsoft.NetApp.DayOfWeek","com.azure.resourcemanager.netapp.models.DesiredRansomwareProtectionState":"Microsoft.NetApp.DesiredRansomwareProtectionState","com.azure.resourcemanager.netapp.models.DestinationReplication":"Microsoft.NetApp.DestinationReplication","com.azure.resourcemanager.netapp.models.Dimension":"Microsoft.NetApp.Dimension","com.azure.resourcemanager.netapp.models.ElasticAccountProperties":"Microsoft.NetApp.ElasticAccountProperties","com.azure.resourcemanager.netapp.models.ElasticAccountUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticAccountUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties":"Microsoft.NetApp.ElasticBackupPolicyProperties","com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState":"Microsoft.NetApp.ElasticBackupPolicyState","com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ElasticBackupProperties":"Microsoft.NetApp.ElasticBackupProperties","com.azure.resourcemanager.netapp.models.ElasticBackupType":"Microsoft.NetApp.ElasticBackupType","com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties":"Microsoft.NetApp.ElasticBackupVaultProperties","com.azure.resourcemanager.netapp.models.ElasticBackupVaultUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticCapacityPoolProperties":"Microsoft.NetApp.ElasticCapacityPoolProperties","com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ElasticEncryption":"Microsoft.NetApp.ElasticEncryption","com.azure.resourcemanager.netapp.models.ElasticEncryptionConfiguration":"Microsoft.NetApp.ElasticEncryptionConfiguration","com.azure.resourcemanager.netapp.models.ElasticEncryptionIdentity":"Microsoft.NetApp.ElasticEncryptionIdentity","com.azure.resourcemanager.netapp.models.ElasticExportPolicy":"Microsoft.NetApp.ElasticExportPolicy","com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule":"Microsoft.NetApp.ElasticExportPolicyRule","com.azure.resourcemanager.netapp.models.ElasticKeyVaultProperties":"Microsoft.NetApp.ElasticKeyVaultProperties","com.azure.resourcemanager.netapp.models.ElasticKeyVaultStatus":"Microsoft.NetApp.ElasticKeyVaultStatus","com.azure.resourcemanager.netapp.models.ElasticMountTargetProperties":"Microsoft.NetApp.ElasticMountTargetProperties","com.azure.resourcemanager.netapp.models.ElasticNfsv3Access":"Microsoft.NetApp.ElasticNfsv3Access","com.azure.resourcemanager.netapp.models.ElasticNfsv4Access":"Microsoft.NetApp.ElasticNfsv4Access","com.azure.resourcemanager.netapp.models.ElasticPoolEncryptionKeySource":"Microsoft.NetApp.ElasticPoolEncryptionKeySource","com.azure.resourcemanager.netapp.models.ElasticProtocolType":"Microsoft.NetApp.ElasticProtocolType","com.azure.resourcemanager.netapp.models.ElasticResourceAvailabilityStatus":"Microsoft.NetApp.ElasticResourceAvailabilityStatus","com.azure.resourcemanager.netapp.models.ElasticRootAccess":"Microsoft.NetApp.ElasticRootAccess","com.azure.resourcemanager.netapp.models.ElasticServiceLevel":"Microsoft.NetApp.ElasticServiceLevel","com.azure.resourcemanager.netapp.models.ElasticSmbEncryption":"Microsoft.NetApp.ElasticSmbEncryption","com.azure.resourcemanager.netapp.models.ElasticSmbPatchProperties":"Microsoft.NetApp.ElasticSmbPatchProperties","com.azure.resourcemanager.netapp.models.ElasticSmbProperties":"Microsoft.NetApp.ElasticSmbProperties","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule":"Microsoft.NetApp.ElasticSnapshotPolicyDailySchedule","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule":"Microsoft.NetApp.ElasticSnapshotPolicyHourlySchedule","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule":"Microsoft.NetApp.ElasticSnapshotPolicyMonthlySchedule","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties":"Microsoft.NetApp.ElasticSnapshotPolicyProperties","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule":"Microsoft.NetApp.ElasticSnapshotPolicyWeeklySchedule","com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties":"Microsoft.NetApp.ElasticSnapshotProperties","com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule":"Microsoft.NetApp.ElasticUnixAccessRule","com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties":"Microsoft.NetApp.ElasticVolumeBackupProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionPatchProperties":"Microsoft.NetApp.ElasticVolumeDataProtectionPatchProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties":"Microsoft.NetApp.ElasticVolumeDataProtectionProperties","com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement":"Microsoft.NetApp.ElasticVolumePolicyEnforcement","com.azure.resourcemanager.netapp.models.ElasticVolumeProperties":"Microsoft.NetApp.ElasticVolumeProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeRestorationState":"Microsoft.NetApp.ElasticVolumeRestorationState","com.azure.resourcemanager.netapp.models.ElasticVolumeRevert":"Microsoft.NetApp.ElasticVolumeRevert","com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties":"Microsoft.NetApp.ElasticVolumeSnapshotProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.EnableSubvolumes":"Microsoft.NetApp.EnableSubvolumes","com.azure.resourcemanager.netapp.models.EnableWriteBackState":"Microsoft.NetApp.EnableWriteBackState","com.azure.resourcemanager.netapp.models.EncryptionIdentity":"Microsoft.NetApp.EncryptionIdentity","com.azure.resourcemanager.netapp.models.EncryptionKeySource":"Microsoft.NetApp.EncryptionKeySource","com.azure.resourcemanager.netapp.models.EncryptionState":"Microsoft.NetApp.EncryptionState","com.azure.resourcemanager.netapp.models.EncryptionTransitionRequest":"Microsoft.NetApp.EncryptionTransitionRequest","com.azure.resourcemanager.netapp.models.EncryptionType":"Microsoft.NetApp.EncryptionType","com.azure.resourcemanager.netapp.models.EndpointType":"Microsoft.NetApp.EndpointType","com.azure.resourcemanager.netapp.models.Exclude":"Microsoft.NetApp.Exclude","com.azure.resourcemanager.netapp.models.ExportPolicyRule":"Microsoft.NetApp.ExportPolicyRule","com.azure.resourcemanager.netapp.models.ExternalReplicationSetupStatus":"Microsoft.NetApp.ExternalReplicationSetupStatus","com.azure.resourcemanager.netapp.models.FileAccessLogs":"Microsoft.NetApp.FileAccessLogs","com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest":"Microsoft.NetApp.FilePathAvailabilityRequest","com.azure.resourcemanager.netapp.models.FileSystemUser":"Microsoft.NetApp.FileSystemUser","com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest":"Microsoft.NetApp.GetGroupIdListForLdapUserRequest","com.azure.resourcemanager.netapp.models.GlobalFileLockingState":"Microsoft.NetApp.GlobalFileLockingState","com.azure.resourcemanager.netapp.models.HourlySchedule":"Microsoft.NetApp.HourlySchedule","com.azure.resourcemanager.netapp.models.InAvailabilityReasonType":"Microsoft.NetApp.InAvailabilityReasonType","com.azure.resourcemanager.netapp.models.KerberosState":"Microsoft.NetApp.KerberosState","com.azure.resourcemanager.netapp.models.KeySource":"Microsoft.NetApp.KeySource","com.azure.resourcemanager.netapp.models.KeyVaultPrivateEndpoint":"Microsoft.NetApp.KeyVaultPrivateEndpoint","com.azure.resourcemanager.netapp.models.KeyVaultProperties":"Microsoft.NetApp.KeyVaultProperties","com.azure.resourcemanager.netapp.models.KeyVaultStatus":"Microsoft.NetApp.KeyVaultStatus","com.azure.resourcemanager.netapp.models.LargeVolumeType":"Microsoft.NetApp.LargeVolumeType","com.azure.resourcemanager.netapp.models.LdapConfiguration":"Microsoft.NetApp.LdapConfiguration","com.azure.resourcemanager.netapp.models.LdapSearchScopeOpt":"Microsoft.NetApp.LdapSearchScopeOpt","com.azure.resourcemanager.netapp.models.LdapServerType":"Microsoft.NetApp.LdapServerType","com.azure.resourcemanager.netapp.models.LdapState":"Microsoft.NetApp.LdapState","com.azure.resourcemanager.netapp.models.ListReplicationsRequest":"Microsoft.NetApp.ListReplicationsRequest","com.azure.resourcemanager.netapp.models.LogSpecification":"Microsoft.NetApp.LogSpecification","com.azure.resourcemanager.netapp.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.netapp.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.netapp.models.MetricAggregationType":"Microsoft.NetApp.MetricAggregationType","com.azure.resourcemanager.netapp.models.MetricSpecification":"Microsoft.NetApp.MetricSpecification","com.azure.resourcemanager.netapp.models.MirrorState":"Microsoft.NetApp.MirrorState","com.azure.resourcemanager.netapp.models.MonthlySchedule":"Microsoft.NetApp.MonthlySchedule","com.azure.resourcemanager.netapp.models.MountTargetProperties":"Microsoft.NetApp.MountTargetProperties","com.azure.resourcemanager.netapp.models.MultiAdStatus":"Microsoft.NetApp.MultiAdStatus","com.azure.resourcemanager.netapp.models.NetAppAccountPatch":"Microsoft.NetApp.NetAppAccountPatch","com.azure.resourcemanager.netapp.models.NetworkFeatures":"Microsoft.NetApp.NetworkFeatures","com.azure.resourcemanager.netapp.models.NetworkSiblingSetProvisioningState":"Microsoft.NetApp.NetworkSiblingSetProvisioningState","com.azure.resourcemanager.netapp.models.NfsUser":"Microsoft.NetApp.NfsUser","com.azure.resourcemanager.netapp.models.NicInfo":"Microsoft.NetApp.NicInfo","com.azure.resourcemanager.netapp.models.OperationDisplay":"Microsoft.NetApp.OperationDisplay","com.azure.resourcemanager.netapp.models.OriginClusterInformation":"Microsoft.NetApp.OriginClusterInformation","com.azure.resourcemanager.netapp.models.PeerClusterForVolumeMigrationRequest":"Microsoft.NetApp.PeerClusterForVolumeMigrationRequest","com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs":"Microsoft.NetApp.PlacementKeyValuePairs","com.azure.resourcemanager.netapp.models.PolicyStatus":"Microsoft.NetApp.PolicyStatus","com.azure.resourcemanager.netapp.models.PoolChangeRequest":"Microsoft.NetApp.PoolChangeRequest","com.azure.resourcemanager.netapp.models.ProtocolTypes":"Microsoft.NetApp.ProtocolTypes","com.azure.resourcemanager.netapp.models.ProvisioningState":"Microsoft.NetApp.NetAppProvisioningState","com.azure.resourcemanager.netapp.models.QosType":"Microsoft.NetApp.QosType","com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest":"Microsoft.NetApp.QueryNetworkSiblingSetRequest","com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest":"Microsoft.NetApp.QuotaAvailabilityRequest","com.azure.resourcemanager.netapp.models.QuotaReport":"Microsoft.NetApp.QuotaReport","com.azure.resourcemanager.netapp.models.RansomwareProtectionPatchSettings":"Microsoft.NetApp.RansomwareProtectionPatchSettings","com.azure.resourcemanager.netapp.models.RansomwareProtectionSettings":"Microsoft.NetApp.RansomwareProtectionSettings","com.azure.resourcemanager.netapp.models.RansomwareReportProperties":"Microsoft.NetApp.RansomwareReportProperties","com.azure.resourcemanager.netapp.models.RansomwareReportSeverity":"Microsoft.NetApp.RansomwareReportSeverity","com.azure.resourcemanager.netapp.models.RansomwareReportState":"Microsoft.NetApp.RansomwareReportState","com.azure.resourcemanager.netapp.models.RansomwareSuspectResolution":"Microsoft.NetApp.RansomwareSuspectResolution","com.azure.resourcemanager.netapp.models.RansomwareSuspects":"Microsoft.NetApp.RansomwareSuspects","com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest":"Microsoft.NetApp.RansomwareSuspectsClearRequest","com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest":"Microsoft.NetApp.ReestablishReplicationRequest","com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem":"Microsoft.NetApp.RegionInfoAvailabilityZoneMappingsItem","com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity":"Microsoft.NetApp.RegionStorageToNetworkProximity","com.azure.resourcemanager.netapp.models.RelocateVolumeRequest":"Microsoft.NetApp.RelocateVolumeRequest","com.azure.resourcemanager.netapp.models.RemotePath":"Microsoft.NetApp.RemotePath","com.azure.resourcemanager.netapp.models.ReplicationMirrorState":"Microsoft.NetApp.ReplicationMirrorState","com.azure.resourcemanager.netapp.models.ReplicationObject":"Microsoft.NetApp.ReplicationObject","com.azure.resourcemanager.netapp.models.ReplicationSchedule":"Microsoft.NetApp.ReplicationSchedule","com.azure.resourcemanager.netapp.models.ReplicationType":"Microsoft.NetApp.ReplicationType","com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest":"Microsoft.NetApp.ResourceNameAvailabilityRequest","com.azure.resourcemanager.netapp.models.SecretPassword":"Microsoft.NetApp.SecretPassword","com.azure.resourcemanager.netapp.models.SecretPasswordIdentity":"Microsoft.NetApp.SecretPasswordIdentity","com.azure.resourcemanager.netapp.models.SecretPasswordKeyVaultProperties":"Microsoft.NetApp.SecretPasswordKeyVaultProperties","com.azure.resourcemanager.netapp.models.SecurityStyle":"Microsoft.NetApp.SecurityStyle","com.azure.resourcemanager.netapp.models.ServiceLevel":"Microsoft.NetApp.ServiceLevel","com.azure.resourcemanager.netapp.models.ServiceSpecification":"Microsoft.NetApp.ServiceSpecification","com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration":"Microsoft.NetApp.SmbAccessBasedEnumeration","com.azure.resourcemanager.netapp.models.SmbEncryptionState":"Microsoft.NetApp.SmbEncryptionState","com.azure.resourcemanager.netapp.models.SmbNonBrowsable":"Microsoft.NetApp.SmbNonBrowsable","com.azure.resourcemanager.netapp.models.SmbSettings":"Microsoft.NetApp.SmbSettings","com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility":"Microsoft.NetApp.SnapshotDirectoryVisibility","com.azure.resourcemanager.netapp.models.SnapshotPolicyPatch":"Microsoft.NetApp.SnapshotPolicyPatch","com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles":"Microsoft.NetApp.SnapshotRestoreFiles","com.azure.resourcemanager.netapp.models.SnapshotUsage":"Microsoft.NetApp.SnapshotUsage","com.azure.resourcemanager.netapp.models.SubvolumePatchRequest":"Microsoft.NetApp.SubvolumePatchRequest","com.azure.resourcemanager.netapp.models.SuspectFile":"Microsoft.NetApp.SuspectFile","com.azure.resourcemanager.netapp.models.Type":"Microsoft.NetApp.Type","com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest":"Microsoft.NetApp.UpdateNetworkSiblingSetRequest","com.azure.resourcemanager.netapp.models.UsageName":"Microsoft.NetApp.UsageName","com.azure.resourcemanager.netapp.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.netapp.models.VolumeBackupProperties":"Microsoft.NetApp.VolumeBackupProperties","com.azure.resourcemanager.netapp.models.VolumeBackupRelationshipStatus":"Microsoft.NetApp.VolumeBackupRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeBackups":"Microsoft.NetApp.VolumeBackups","com.azure.resourcemanager.netapp.models.VolumeGroupMetadata":"Microsoft.NetApp.VolumeGroupMetaData","com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties":"Microsoft.NetApp.VolumeGroupVolumeProperties","com.azure.resourcemanager.netapp.models.VolumeLanguage":"Microsoft.NetApp.VolumeLanguage","com.azure.resourcemanager.netapp.models.VolumePatch":"Microsoft.NetApp.VolumePatch","com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection":"Microsoft.NetApp.VolumePatchPropertiesDataProtection","com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy":"Microsoft.NetApp.VolumePatchPropertiesExportPolicy","com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection":"Microsoft.NetApp.VolumePropertiesDataProtection","com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy":"Microsoft.NetApp.VolumePropertiesExportPolicy","com.azure.resourcemanager.netapp.models.VolumeQuotaRulePatch":"Microsoft.NetApp.VolumeQuotaRulePatch","com.azure.resourcemanager.netapp.models.VolumeRelocationProperties":"Microsoft.NetApp.VolumeRelocationProperties","com.azure.resourcemanager.netapp.models.VolumeReplicationRelationshipStatus":"Microsoft.NetApp.VolumeReplicationRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeRestoreRelationshipStatus":"Microsoft.NetApp.VolumeRestoreRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeRevert":"Microsoft.NetApp.VolumeRevert","com.azure.resourcemanager.netapp.models.VolumeSize":"Microsoft.NetApp.VolumeSize","com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties":"Microsoft.NetApp.VolumeSnapshotProperties","com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity":"Microsoft.NetApp.VolumeStorageToNetworkProximity","com.azure.resourcemanager.netapp.models.WeeklySchedule":"Microsoft.NetApp.WeeklySchedule"},"generatedFiles":["src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java","src/main/java/com/azure/resourcemanager/netapp/fluent/AccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ActiveDirectoryConfigsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderBackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderVolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BucketsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticCapacityPoolsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticVolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceRegionInfosClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceUsagesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourcesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/PoolsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/RansomwareReportsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SubvolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeGroupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeQuotaRulesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ActiveDirectoryConfigInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketGenerateCredentialsInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CacheInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckAvailabilityResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckElasticResourceAvailabilityResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ClusterPeerCommandResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticAccountInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupVaultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticCapacityPoolInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticVolumeInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetGroupIdListForLdapUserResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetKeyVaultStatusResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetKeyVaultStatusResponseProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ListQuotaReportResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetworkSiblingSetInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PeeringPassphrasesInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/QuotaItemProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RansomwareReportInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeInfoInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumePatchParams.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SvmPeerCommandResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/UsageProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/UsageResultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRuleInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRulesProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/netapp/fluent/package-info.java","src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketGenerateCredentialsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CheckAvailabilityResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CheckElasticResourceAvailabilityResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeerCommandResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumeImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/GetGroupIdListForLdapUserResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/GetKeyVaultStatusResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ListQuotaReportResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceUsagesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceUsagesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetworkSiblingSetImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PeeringPassphrasesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoResourceImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RestoreStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyVolumeListImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubscriptionQuotaItemImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeInfoImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeModelImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeerCommandResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/UsageResultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupDetailsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRuleImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ActiveDirectoryConfigListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupPoliciesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupVaultsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BucketList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/CacheList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/CapacityPoolList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticAccountListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupPolicyListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupVaultListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticCapacityPoolListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyVolumeList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticVolumeListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ListReplications.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/NetAppAccountList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/QuotaItemList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/RansomwareReportsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/RegionInfosList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SnapshotPoliciesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SnapshotsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SubvolumesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/UsagesListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeGroupList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeQuotaRulesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/package-info.java","src/main/java/com/azure/resourcemanager/netapp/models/AcceptGrowCapacityPoolForShortTermCloneSplit.java","src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.java","src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfig.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigs.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ActualRansomwareProtectionState.java","src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java","src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java","src/main/java/com/azure/resourcemanager/netapp/models/Backup.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVault.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/Backups.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderBackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderVolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakFileLocksRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakthroughMode.java","src/main/java/com/azure/resourcemanager/netapp/models/Bucket.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketCredentialsExpiry.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketGenerateCredentials.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPatchPermissions.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPermissions.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketServerPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketServerProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/Buckets.java","src/main/java/com/azure/resourcemanager/netapp/models/Cache.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheLifeCycleState.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheMountTargetProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/CachePropertiesExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/Caches.java","src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java","src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/ChangeKeyVault.java","src/main/java/com/azure/resourcemanager/netapp/models/ChangeZoneRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckAvailabilityResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityReason.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticVolumeFilePathAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java","src/main/java/com/azure/resourcemanager/netapp/models/CifsChangeNotifyState.java","src/main/java/com/azure/resourcemanager/netapp/models/CifsUser.java","src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerCommandResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessRetrievalPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessTieringPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/CredentialsStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/DayOfWeek.java","src/main/java/com/azure/resourcemanager/netapp/models/DesiredRansomwareProtectionState.java","src/main/java/com/azure/resourcemanager/netapp/models/DestinationReplication.java","src/main/java/com/azure/resourcemanager/netapp/models/Dimension.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccount.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackup.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyState.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupType.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVault.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackups.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPool.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPools.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryption.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionConfiguration.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicyRule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticMountTargetProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv3Access.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv4Access.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticPoolEncryptionKeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticProtocolType.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticResourceAvailabilityStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticRootAccess.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticServiceLevel.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbEncryption.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshot.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyDailySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyHourlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyMonthlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyWeeklySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshots.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticUnixAccessRule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolume.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeBackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumePolicyEnforcement.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRestorationState.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRevert.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeSnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/EnableSubvolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/EnableWriteBackState.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionKeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionState.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionTransitionRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java","src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java","src/main/java/com/azure/resourcemanager/netapp/models/Exclude.java","src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalReplicationSetupStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/FileAccessLogs.java","src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/FileSystemUser.java","src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/GetKeyVaultStatusResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/GlobalFileLockingState.java","src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java","src/main/java/com/azure/resourcemanager/netapp/models/KerberosState.java","src/main/java/com/azure/resourcemanager/netapp/models/KeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultPrivateEndpoint.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/LargeVolumeType.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapConfiguration.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapSearchScopeOpt.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapServerType.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapState.java","src/main/java/com/azure/resourcemanager/netapp/models/ListQuotaReportResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/ListReplicationsRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/netapp/models/MetricAggregationType.java","src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java","src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/MountTargetProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/MultiAdStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceQuotaLimits.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceQuotaLimitsAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceRegionInfos.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceUsages.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResources.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSet.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSetProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/NfsUser.java","src/main/java/com/azure/resourcemanager/netapp/models/NicInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/Operation.java","src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/netapp/models/Operations.java","src/main/java/com/azure/resourcemanager/netapp/models/OriginClusterInformation.java","src/main/java/com/azure/resourcemanager/netapp/models/PeerClusterForVolumeMigrationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/PeeringPassphrases.java","src/main/java/com/azure/resourcemanager/netapp/models/PlacementKeyValuePairs.java","src/main/java/com/azure/resourcemanager/netapp/models/PolicyStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/PoolChangeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/Pools.java","src/main/java/com/azure/resourcemanager/netapp/models/ProtocolTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/QosType.java","src/main/java/com/azure/resourcemanager/netapp/models/QueryNetworkSiblingSetRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/QuotaReport.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionPatchSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReport.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportSeverity.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportState.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReports.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectResolution.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspects.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectsClearRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/ReestablishReplicationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoAvailabilityZoneMappingsItem.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionStorageToNetworkProximity.java","src/main/java/com/azure/resourcemanager/netapp/models/RelocateVolumeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RemotePath.java","src/main/java/com/azure/resourcemanager/netapp/models/Replication.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationMirrorState.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationType.java","src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RestoreStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/SecretPassword.java","src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordKeyVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java","src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java","src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbAccessBasedEnumeration.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbEncryptionState.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbNonBrowsable.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/Snapshot.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotDirectoryVisibility.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyVolumeList.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotRestoreFiles.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotUsage.java","src/main/java/com/azure/resourcemanager/netapp/models/Snapshots.java","src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItem.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeModel.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumePatchRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/Subvolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/SuspectFile.java","src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerCommandResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/Type.java","src/main/java/com/azure/resourcemanager/netapp/models/UpdateNetworkSiblingSetRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/UsageName.java","src/main/java/com/azure/resourcemanager/netapp/models/UsageResult.java","src/main/java/com/azure/resourcemanager/netapp/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/Volume.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroup.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupDetails.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroups.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeLanguage.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRule.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulePatch.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRules.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRelocationProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeReplicationRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRestoreRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeSize.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java","src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java","src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/package-info.java","src/main/java/com/azure/resourcemanager/netapp/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesUpdateSamples.java index 2e39e35273ec..b50607616f4f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesUpdateSamples.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.netapp.generated; -import com.azure.resourcemanager.netapp.models.CacheUpdate; +import com.azure.resourcemanager.netapp.models.Cache; import com.azure.resourcemanager.netapp.models.CacheUpdateProperties; /** @@ -20,9 +20,9 @@ public final class CachesUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void cachesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.caches() - .update("myRG", "account1", "pool1", "cache1", - new CacheUpdate().withProperties(new CacheUpdateProperties().withSize(214748364800L)), - com.azure.core.util.Context.NONE); + Cache resource = manager.caches() + .getWithResponse("myRG", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withProperties(new CacheUpdateProperties().withSize(214748364800L)).apply(); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java index f2eb88d5a40f..1164298cbb2b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java @@ -27,7 +27,7 @@ public void testRenewCredentials() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.accounts().renewCredentials("dcvxodkrvfsxxby", "e", com.azure.core.util.Context.NONE); + manager.accounts().renewCredentials("qubfajcyw", "jqwmchq", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java index f6bf726f53d7..0ad883300a88 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java @@ -23,7 +23,7 @@ public final class BackupPoliciesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"backupPolicyId\":\"fqiu\",\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":1863022211,\"weeklyBackupsToKeep\":1535738796,\"monthlyBackupsToKeep\":94242644,\"volumesAssigned\":1681361815,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"jboq\",\"volumeResourceId\":\"mtqjkqevadrmm\",\"backupsCount\":7044640,\"policyEnabled\":false},{\"volumeName\":\"c\",\"volumeResourceId\":\"z\",\"backupsCount\":2142539902,\"policyEnabled\":true}]},\"etag\":\"scz\",\"location\":\"oswoqiqazugamx\",\"tags\":{\"amnppcce\":\"rcoiis\",\"tdsbezax\":\"u\"},\"id\":\"f\",\"name\":\"kzxuiz\",\"type\":\"y\"}"; + = "{\"properties\":{\"backupPolicyId\":\"umoqodkad\",\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":775084498,\"weeklyBackupsToKeep\":647013015,\"monthlyBackupsToKeep\":1662063978,\"volumesAssigned\":377688377,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"uyem\",\"volumeResourceId\":\"wuowhlxlnwy\",\"backupsCount\":1884184924,\"policyEnabled\":true},{\"volumeName\":\"lgmokzkl\",\"volumeResourceId\":\"fowtdvrfmvlihcvj\",\"backupsCount\":875354827,\"policyEnabled\":true},{\"volumeName\":\"idhftu\",\"volumeResourceId\":\"hdxlw\",\"backupsCount\":1689412377,\"policyEnabled\":false},{\"volumeName\":\"zd\",\"volumeResourceId\":\"njyixh\",\"backupsCount\":290921266,\"policyEnabled\":false}]},\"etag\":\"xmbjroum\",\"location\":\"n\",\"tags\":{\"pusllywpv\":\"qjrhuzgfxonj\"},\"id\":\"iotzbpdbollgryfq\",\"name\":\"uasigr\",\"type\":\"wsocnequygdjbo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,22 +33,22 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupPolicy response = manager.backupPolicies() - .define("qladywrxwhydtlu") - .withRegion("h") - .withExistingNetAppAccount("eumoqod", "adppyibn") - .withTags(mapOf("lwyojbfqzdkfnj", "kvhd", "fratqxmbjroumzz", "ixh")) - .withDailyBackupsToKeep(658051997) - .withWeeklyBackupsToKeep(1037982388) - .withMonthlyBackupsToKeep(547930832) - .withEnabled(false) + .define("iqswbqer") + .withRegion("aiuf") + .withExistingNetAppAccount("tssruqnmdvhazc", "jy") + .withTags(mapOf("qfrojsydgrhyd", "aybfu", "skieca", "ygywe", "ixqcahyhxalybxaw", "ygzmxieqvdsmak")) + .withDailyBackupsToKeep(2035415732) + .withWeeklyBackupsToKeep(218117716) + .withMonthlyBackupsToKeep(1079594168) + .withEnabled(true) .create(); - Assertions.assertEquals("oswoqiqazugamx", response.location()); - Assertions.assertEquals("rcoiis", response.tags().get("amnppcce")); - Assertions.assertEquals(1863022211, response.dailyBackupsToKeep()); - Assertions.assertEquals(1535738796, response.weeklyBackupsToKeep()); - Assertions.assertEquals(94242644, response.monthlyBackupsToKeep()); - Assertions.assertTrue(response.enabled()); + Assertions.assertEquals("n", response.location()); + Assertions.assertEquals("qjrhuzgfxonj", response.tags().get("pusllywpv")); + Assertions.assertEquals(775084498, response.dailyBackupsToKeep()); + Assertions.assertEquals(647013015, response.weeklyBackupsToKeep()); + Assertions.assertEquals(1662063978, response.monthlyBackupsToKeep()); + Assertions.assertFalse(response.enabled()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java index f72227c2ba7e..2a593671114f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java @@ -27,7 +27,8 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.backupPolicies().delete("saeuzanhsfnhsenw", "hpzfngqj", "lidftujwjj", com.azure.core.util.Context.NONE); + manager.backupPolicies() + .delete("pirykycndzfqiv", "reuykbbmnwagl", "bxoeeonql", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java index 8253a7676606..ad8ac00d7fe2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class BackupPoliciesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"backupPolicyId\":\"ixldzyyfy\",\"provisioningState\":\"qsix\",\"dailyBackupsToKeep\":104830049,\"weeklyBackupsToKeep\":1092655779,\"monthlyBackupsToKeep\":1776640366,\"volumesAssigned\":1424381442,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"vsmb\",\"volumeResourceId\":\"lzoy\",\"backupsCount\":1157061379,\"policyEnabled\":true},{\"volumeName\":\"pqvyb\",\"volumeResourceId\":\"gvmxnok\",\"backupsCount\":199139815,\"policyEnabled\":true},{\"volumeName\":\"seskvcuar\",\"volumeResourceId\":\"hunlpirykycnd\",\"backupsCount\":355546006,\"policyEnabled\":true},{\"volumeName\":\"reuykbbmnwagl\",\"volumeResourceId\":\"xoe\",\"backupsCount\":1187567269,\"policyEnabled\":false}]},\"etag\":\"fwmyymv\",\"location\":\"bpbhfckdvezcrcss\",\"tags\":{\"hpavawu\":\"ddubbnqfblhkal\",\"ctteajohi\":\"iqjtiogqgdmin\",\"tp\":\"gspnbonhpczykm\"},\"id\":\"wxqcsehchkhufmpq\",\"name\":\"mqyjgy\",\"type\":\"zulo\"}"; + = "{\"properties\":{\"backupPolicyId\":\"nrlyxnuc\",\"provisioningState\":\"p\",\"dailyBackupsToKeep\":1027334570,\"weeklyBackupsToKeep\":1167538005,\"monthlyBackupsToKeep\":624713993,\"volumesAssigned\":319278857,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"tcjb\",\"volumeResourceId\":\"vivuzqymtuowo\",\"backupsCount\":1369163262,\"policyEnabled\":true},{\"volumeName\":\"qhzvb\",\"volumeResourceId\":\"cdb\",\"backupsCount\":1466901647,\"policyEnabled\":true},{\"volumeName\":\"scxmxeat\",\"volumeResourceId\":\"bmwnrdjyibqb\",\"backupsCount\":287826060,\"policyEnabled\":true},{\"volumeName\":\"rmkuh\",\"volumeResourceId\":\"xljalfihc\",\"backupsCount\":1191020740,\"policyEnabled\":false}]},\"etag\":\"nc\",\"location\":\"xxqcwgaxf\",\"tags\":{\"jzrltixldzy\":\"knokzw\",\"yqlkju\":\"fytpqsixymmpuji\",\"vwzdbpqvyb\":\"smbmslzoy\"},\"id\":\"fgvmx\",\"name\":\"okcvtlubses\",\"type\":\"vcuartrhun\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupPolicy response = manager.backupPolicies() - .getWithResponse("xxqcwgaxf", "vaknokzwjj", "r", com.azure.core.util.Context.NONE) + .getWithResponse("nhq", "skndnelqkaadlknw", "oanniyopetxi", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("bpbhfckdvezcrcss", response.location()); - Assertions.assertEquals("ddubbnqfblhkal", response.tags().get("hpavawu")); - Assertions.assertEquals(104830049, response.dailyBackupsToKeep()); - Assertions.assertEquals(1092655779, response.weeklyBackupsToKeep()); - Assertions.assertEquals(1776640366, response.monthlyBackupsToKeep()); + Assertions.assertEquals("xxqcwgaxf", response.location()); + Assertions.assertEquals("knokzw", response.tags().get("jzrltixldzy")); + Assertions.assertEquals(1027334570, response.dailyBackupsToKeep()); + Assertions.assertEquals(1167538005, response.weeklyBackupsToKeep()); + Assertions.assertEquals(624713993, response.monthlyBackupsToKeep()); Assertions.assertTrue(response.enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java index de641a9a266d..93d923b6dba7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java @@ -22,7 +22,7 @@ public final class BackupPoliciesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"backupPolicyId\":\"iqswbqer\",\"provisioningState\":\"xiytxtdgukvl\",\"dailyBackupsToKeep\":795825658,\"weeklyBackupsToKeep\":201041686,\"monthlyBackupsToKeep\":1426032563,\"volumesAssigned\":8081594,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"ewres\",\"volumeResourceId\":\"owegmmutey\",\"backupsCount\":1286022280,\"policyEnabled\":false},{\"volumeName\":\"igijiitnspxlz\",\"volumeResourceId\":\"sygrijwa\",\"backupsCount\":76122921,\"policyEnabled\":false},{\"volumeName\":\"aybfu\",\"volumeResourceId\":\"frojsydgr\",\"backupsCount\":641548413,\"policyEnabled\":false}]},\"etag\":\"ywezskiecafyg\",\"location\":\"xieqv\",\"tags\":{\"lixqcah\":\"a\",\"jpodtbl\":\"hxalybxawo\"},\"id\":\"pkkwj\",\"name\":\"jodqhykincn\",\"type\":\"emehllizh\"}]}"; + = "{\"value\":[{\"properties\":{\"backupPolicyId\":\"ckdvez\",\"provisioningState\":\"cssbzhddu\",\"dailyBackupsToKeep\":1739256719,\"weeklyBackupsToKeep\":328799752,\"monthlyBackupsToKeep\":1720447278,\"volumesAssigned\":1580430866,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"avawugiqj\",\"volumeResourceId\":\"ogqgdminict\",\"backupsCount\":494288557,\"policyEnabled\":false},{\"volumeName\":\"iygspnbonhpczyk\",\"volumeResourceId\":\"tp\",\"backupsCount\":2044699844,\"policyEnabled\":true}]},\"etag\":\"ehchk\",\"location\":\"fmpqumqyjg\",\"tags\":{\"enwphpzfngq\":\"ulodsaeuzanhsfnh\"},\"id\":\"clid\",\"name\":\"tujwjju\",\"type\":\"wbeqrkuor\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<BackupPolicy> response - = manager.backupPolicies().list("fwbeqrkuorh", "ssruqnmdvhazcvj", com.azure.core.util.Context.NONE); + = manager.backupPolicies().list("fwmyymv", "dbpb", com.azure.core.util.Context.NONE); - Assertions.assertEquals("xieqv", response.iterator().next().location()); - Assertions.assertEquals("a", response.iterator().next().tags().get("lixqcah")); - Assertions.assertEquals(795825658, response.iterator().next().dailyBackupsToKeep()); - Assertions.assertEquals(201041686, response.iterator().next().weeklyBackupsToKeep()); - Assertions.assertEquals(1426032563, response.iterator().next().monthlyBackupsToKeep()); + Assertions.assertEquals("fmpqumqyjg", response.iterator().next().location()); + Assertions.assertEquals("ulodsaeuzanhsfnh", response.iterator().next().tags().get("enwphpzfngq")); + Assertions.assertEquals(1739256719, response.iterator().next().dailyBackupsToKeep()); + Assertions.assertEquals(328799752, response.iterator().next().weeklyBackupsToKeep()); + Assertions.assertEquals(1720447278, response.iterator().next().monthlyBackupsToKeep()); Assertions.assertTrue(response.iterator().next().enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupRestoreFilesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupRestoreFilesTests.java index 7a89b77d124d..e2a32271a39d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupRestoreFilesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupRestoreFilesTests.java @@ -13,22 +13,21 @@ public final class BackupRestoreFilesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupRestoreFiles model = BinaryData.fromString( - "{\"fileList\":[\"klelssxb\",\"ycsxzu\",\"ksrl\",\"mdesqp\"],\"restoreFilePath\":\"vmjcdoewb\",\"destinationVolumeId\":\"dyvt\"}") + "{\"fileList\":[\"xetlgydlhqv\",\"n\",\"pxy\"],\"restoreFilePath\":\"fiqgeaar\",\"destinationVolumeId\":\"gjekglklby\"}") .toObject(BackupRestoreFiles.class); - Assertions.assertEquals("klelssxb", model.fileList().get(0)); - Assertions.assertEquals("vmjcdoewb", model.restoreFilePath()); - Assertions.assertEquals("dyvt", model.destinationVolumeId()); + Assertions.assertEquals("xetlgydlhqv", model.fileList().get(0)); + Assertions.assertEquals("fiqgeaar", model.restoreFilePath()); + Assertions.assertEquals("gjekglklby", model.destinationVolumeId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupRestoreFiles model - = new BackupRestoreFiles().withFileList(Arrays.asList("klelssxb", "ycsxzu", "ksrl", "mdesqp")) - .withRestoreFilePath("vmjcdoewb") - .withDestinationVolumeId("dyvt"); + BackupRestoreFiles model = new BackupRestoreFiles().withFileList(Arrays.asList("xetlgydlhqv", "n", "pxy")) + .withRestoreFilePath("fiqgeaar") + .withDestinationVolumeId("gjekglklby"); model = BinaryData.fromObject(model).toObject(BackupRestoreFiles.class); - Assertions.assertEquals("klelssxb", model.fileList().get(0)); - Assertions.assertEquals("vmjcdoewb", model.restoreFilePath()); - Assertions.assertEquals("dyvt", model.destinationVolumeId()); + Assertions.assertEquals("xetlgydlhqv", model.fileList().get(0)); + Assertions.assertEquals("fiqgeaar", model.restoreFilePath()); + Assertions.assertEquals("gjekglklby", model.destinationVolumeId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateMockTests.java index 4a0d0457b293..ba673b8e0067 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateMockTests.java @@ -23,7 +23,7 @@ public final class BackupVaultsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"location\":\"qi\",\"tags\":{\"qdcadwvps\":\"xlhdj\",\"ybmrzoepnxwd\":\"zjiihjr\",\"xaurs\":\"wnjkgvfn\",\"pnqn\":\"ftibtyibuyvpirfq\"},\"id\":\"owsbedenrexkxbh\",\"name\":\"vucnulgmnh\",\"type\":\"evdyz\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"location\":\"zxomeikjclwz\",\"tags\":{\"qtaazyqbxy\":\"mwpfs\",\"iqezxlhdj\":\"oyfpuq\"},\"id\":\"qdcadwvps\",\"name\":\"zjiihjr\",\"type\":\"ybmrzoepnxwd\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,14 +33,14 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupVault response = manager.backupVaults() - .define("g") - .withRegion("czjnc") - .withExistingNetAppAccount("pezkis", "qjm") - .withTags(mapOf("daswvpp", "yqv", "rr", "sqqzlgcndhz", "uww", "cfsrhkhgsn")) + .define("pezkis") + .withRegion("fptb") + .withExistingNetAppAccount("bdsuifr", "vka") + .withTags(mapOf("qvldaswvppisqqzl", "jnciui")) .create(); - Assertions.assertEquals("qi", response.location()); - Assertions.assertEquals("xlhdj", response.tags().get("qdcadwvps")); + Assertions.assertEquals("zxomeikjclwz", response.location()); + Assertions.assertEquals("mwpfs", response.tags().get("qtaazyqbxy")); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetWithResponseMockTests.java index e6138d789f1d..ee247da06610 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class BackupVaultsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"qqbtny\"},\"location\":\"ylxd\",\"tags\":{\"kottlwuhvajmailf\":\"abmvmsxbaevwjc\"},\"id\":\"mjjz\",\"name\":\"kzwjiqullq\",\"type\":\"bdmvrscmqerndbr\"}"; + = "{\"properties\":{\"provisioningState\":\"lsumywzashx\"},\"location\":\"noy\",\"tags\":{\"ebgvo\":\"ipubyznclkfk\",\"tuoqujlyegqavni\":\"e\"},\"id\":\"flqqbtnyjpylxd\",\"name\":\"fvabmvmsxba\",\"type\":\"vwjcnkottlwuh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupVault response = manager.backupVaults() - .getWithResponse("ebgvo", "e", "tuoqujlyegqavni", com.azure.core.util.Context.NONE) + .getWithResponse("qg", "hlusrvxisi", "jceagb", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ylxd", response.location()); - Assertions.assertEquals("abmvmsxbaevwjc", response.tags().get("kottlwuhvajmailf")); + Assertions.assertEquals("noy", response.location()); + Assertions.assertEquals("ipubyznclkfk", response.tags().get("ebgvo")); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountMockTests.java index c622972921e9..79b996dcf85c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountMockTests.java @@ -22,7 +22,7 @@ public final class BackupVaultsListByNetAppAccountMockTests { @Test public void testListByNetAppAccount() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"iii\"},\"location\":\"pfoh\",\"tags\":{\"zbeewoiymrvzbju\":\"kxbbcbrwjiutgnj\"},\"id\":\"rsrziuctix\",\"name\":\"bdsuifr\",\"type\":\"vka\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"mvrscmqerndbrny\"},\"location\":\"fltfnnxr\",\"tags\":{\"ohykfkxbbcbrw\":\"jfynnfmuiiirip\"},\"id\":\"iutgnjizbeewoiy\",\"name\":\"rvzb\",\"type\":\"uyrsrziuctix\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testListByNetAppAccount() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<BackupVault> response - = manager.backupVaults().listByNetAppAccount("yeofltfnnxrkad", "fynn", com.azure.core.util.Context.NONE); + PagedIterable<BackupVault> response = manager.backupVaults() + .listByNetAppAccount("ajmailfemjjza", "zwjiqullq", com.azure.core.util.Context.NONE); - Assertions.assertEquals("pfoh", response.iterator().next().location()); - Assertions.assertEquals("kxbbcbrwjiutgnj", response.iterator().next().tags().get("zbeewoiymrvzbju")); + Assertions.assertEquals("fltfnnxr", response.iterator().next().location()); + Assertions.assertEquals("jfynnfmuiiirip", response.iterator().next().tags().get("ohykfkxbbcbrw")); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsCreateMockTests.java index 75aa775bfcaf..ed2619703703 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsCreateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsCreateMockTests.java @@ -21,7 +21,7 @@ public final class BackupsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"backupId\":\"d\",\"creationDate\":\"2021-05-07T12:56:20Z\",\"snapshotCreationDate\":\"2021-02-04T21:16:01Z\",\"completionDate\":\"2021-08-05T12:55:53Z\",\"provisioningState\":\"Succeeded\",\"size\":7367059070988318333,\"label\":\"nkyhf\",\"backupType\":\"Scheduled\",\"failureReason\":\"qxfx\",\"volumeResourceId\":\"elgcmpzqjhhhqx\",\"useExistingSnapshot\":false,\"snapshotName\":\"cacoyvivbsiz\",\"backupPolicyResourceId\":\"jszlb\",\"isLargeVolume\":true},\"id\":\"lzijiufehgmvflnw\",\"name\":\"v\",\"type\":\"kxrerlniylylyfwx\"}"; + = "{\"properties\":{\"backupId\":\"xxahmrnadzyqegxy\",\"creationDate\":\"2020-12-20T08:05:47Z\",\"snapshotCreationDate\":\"2021-09-16T09:52:30Z\",\"completionDate\":\"2021-09-05T12:14:31Z\",\"provisioningState\":\"Succeeded\",\"size\":350233654264973502,\"label\":\"keznjaujvaa\",\"backupType\":\"Scheduled\",\"failureReason\":\"iycwkdta\",\"volumeResourceId\":\"wxwfekaumrr\",\"useExistingSnapshot\":true,\"snapshotName\":\"mqkra\",\"backupPolicyResourceId\":\"nxwbjsidbirkfp\",\"isLargeVolume\":false},\"id\":\"dgo\",\"name\":\"ewijymrhbguz\",\"type\":\"zkye\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,17 +31,17 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Backup response = manager.backups() - .define("mqkra") - .withExistingBackupVault("ujvaannggi", "cwkdtaaw", "wfekaumrrqmb") - .withVolumeResourceId("jkutycyarnr") - .withLabel("wnf") + .define("mrdixtreki") + .withExistingBackupVault("kpoldtvevboc", "zhzjknyuxg", "ttxpnrupza") + .withVolumeResourceId("an") + .withLabel("u") .withUseExistingSnapshot(true) - .withSnapshotName("uabzoghkt") + .withSnapshotName("mbltoo") .create(); - Assertions.assertEquals("nkyhf", response.label()); - Assertions.assertEquals("elgcmpzqjhhhqx", response.volumeResourceId()); - Assertions.assertFalse(response.useExistingSnapshot()); - Assertions.assertEquals("cacoyvivbsiz", response.snapshotName()); + Assertions.assertEquals("keznjaujvaa", response.label()); + Assertions.assertEquals("wxwfekaumrr", response.volumeResourceId()); + Assertions.assertTrue(response.useExistingSnapshot()); + Assertions.assertEquals("mqkra", response.snapshotName()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusWithResponseMockTests.java index 5f9ee67150bd..b8721e5be028 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class BackupsGetLatestStatusWithResponseMockTests { @Test public void testGetLatestStatusWithResponse() throws Exception { String responseStr - = "{\"healthy\":false,\"relationshipStatus\":\"Failed\",\"mirrorState\":\"Broken\",\"unhealthyReason\":\"lxhrp\",\"errorMessage\":\"vmblcouqe\",\"lastTransferSize\":673107149709372039,\"lastTransferType\":\"dsz\",\"totalTransferBytes\":1740614878460579593,\"transferProgressBytes\":2829669234757088902}"; + = "{\"healthy\":true,\"relationshipStatus\":\"Unknown\",\"mirrorState\":\"Uninitialized\",\"unhealthyReason\":\"wbmqjchntas\",\"errorMessage\":\"ymxbulpzealb\",\"lastTransferSize\":880328364765018669,\"lastTransferType\":\"jwy\",\"totalTransferBytes\":81564205942427337,\"transferProgressBytes\":2743088131386651750}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetLatestStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupStatus response = manager.backups() - .getLatestStatusWithResponse("nrup", "a", "mrdixtreki", "swyskbruffg", com.azure.core.util.Context.NONE) + .getLatestStatusWithResponse("cdixmx", "f", "sryjqgdkfno", "oeoq", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusWithResponseMockTests.java index 0fd681839434..f92e0b236629 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class BackupsGetVolumeLatestRestoreStatusWithResponseMockTests { @Test public void testGetVolumeLatestRestoreStatusWithResponse() throws Exception { String responseStr - = "{\"healthy\":false,\"relationshipStatus\":\"Failed\",\"mirrorState\":\"Mirrored\",\"unhealthyReason\":\"gxyivpinbmh\",\"errorMessage\":\"jijkgqxnhmbke\",\"totalTransferBytes\":4322750869756620511}"; + = "{\"healthy\":true,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Uninitialized\",\"unhealthyReason\":\"muabwibvjogjonmc\",\"errorMessage\":\"foyzbamwineof\",\"totalTransferBytes\":2978710069312659584}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetVolumeLatestRestoreStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RestoreStatus response = manager.backups() - .getVolumeLatestRestoreStatusWithResponse("oypmbltoorm", "fqlwxldykalsy", "aolnjpnnbmjk", "ibjgsjjxxahm", + .getVolumeLatestRestoreStatusWithResponse("uahxs", "xjcmmzrrsc", "biwsd", "npxqwodi", com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetWithResponseMockTests.java index 4240478bcd17..7dc125c6d98c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class BackupsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"backupId\":\"qllizstac\",\"creationDate\":\"2021-11-02T08:18:23Z\",\"snapshotCreationDate\":\"2021-06-17T05:46:19Z\",\"completionDate\":\"2021-10-11T09:49:30Z\",\"provisioningState\":\"tk\",\"size\":5869518151221469081,\"label\":\"mvss\",\"backupType\":\"Scheduled\",\"failureReason\":\"pwamcxtczhupeuk\",\"volumeResourceId\":\"ijdu\",\"useExistingSnapshot\":false,\"snapshotName\":\"pydjfboc\",\"backupPolicyResourceId\":\"hhulrtywikdm\",\"isLargeVolume\":true},\"id\":\"uflgbhgauacdixm\",\"name\":\"ufr\",\"type\":\"ryjqgdkf\"}"; + = "{\"properties\":{\"backupId\":\"wdogiyetesyp\",\"creationDate\":\"2021-10-20T02:22:42Z\",\"snapshotCreationDate\":\"2021-07-21T20:44:49Z\",\"completionDate\":\"2021-08-24T04:40:21Z\",\"provisioningState\":\"qtfbovn\",\"size\":6924178400170757257,\"label\":\"etnjuhpsprkz\",\"backupType\":\"Manual\",\"failureReason\":\"ia\",\"volumeResourceId\":\"cxnafbwqrooh\",\"useExistingSnapshot\":true,\"snapshotName\":\"maonurj\",\"backupPolicyResourceId\":\"mghihp\",\"isLargeVolume\":true},\"id\":\"slclblyjxltbsju\",\"name\":\"c\",\"type\":\"sfxigctmgx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,12 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Backup response = manager.backups() - .getWithResponse("ukdqkkyihztg", "qm", "qzgwldoychil", "cecfehuwaoaguh", com.azure.core.util.Context.NONE) + .getWithResponse("ygzyvneezaifght", "oqqtl", "fhzbkr", "jjjavfqnvhnq", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("mvss", response.label()); - Assertions.assertEquals("ijdu", response.volumeResourceId()); - Assertions.assertFalse(response.useExistingSnapshot()); - Assertions.assertEquals("pydjfboc", response.snapshotName()); + Assertions.assertEquals("etnjuhpsprkz", response.label()); + Assertions.assertEquals("cxnafbwqrooh", response.volumeResourceId()); + Assertions.assertTrue(response.useExistingSnapshot()); + Assertions.assertEquals("maonurj", response.snapshotName()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultMockTests.java index 9ad82f142740..e2cb67a3819e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultMockTests.java @@ -22,7 +22,7 @@ public final class BackupsListByVaultMockTests { @Test public void testListByVault() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"backupId\":\"kyojwyvfk\",\"creationDate\":\"2021-05-05T00:51:27Z\",\"snapshotCreationDate\":\"2021-06-23T13:57:06Z\",\"completionDate\":\"2021-08-25T01:06:04Z\",\"provisioningState\":\"sgxjc\",\"size\":7154860054764368087,\"label\":\"scubiwsdrnpxqwod\",\"backupType\":\"Scheduled\",\"failureReason\":\"xcjr\",\"volumeResourceId\":\"muabwibvjogjonmc\",\"useExistingSnapshot\":true,\"snapshotName\":\"y\",\"backupPolicyResourceId\":\"amwineofvfkakp\",\"isLargeVolume\":false},\"id\":\"vevboclzh\",\"name\":\"jknyu\",\"type\":\"gvttx\"}]}"; + = "{\"value\":[{\"properties\":{\"backupId\":\"zgwldoychillcec\",\"creationDate\":\"2021-03-16T05:59:46Z\",\"snapshotCreationDate\":\"2021-06-11T01:25:36Z\",\"completionDate\":\"2021-02-23T12:52:34Z\",\"provisioningState\":\"guh\",\"size\":54160127149122492,\"label\":\"izs\",\"backupType\":\"Scheduled\",\"failureReason\":\"jvhrweft\",\"volumeResourceId\":\"wqejpmvsse\",\"useExistingSnapshot\":true,\"snapshotName\":\"wamcxtczhup\",\"backupPolicyResourceId\":\"knijduyyes\",\"isLargeVolume\":false},\"id\":\"fbocyvhh\",\"name\":\"lrtywikdmhlakuf\",\"type\":\"gbhgau\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,12 @@ public void testListByVault() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<Backup> response = manager.backups() - .listByVault("ozo", "oqbvjhvefgwbmqj", "hntasfaymx", "ulpzealb", com.azure.core.util.Context.NONE); + PagedIterable<Backup> response + = manager.backups().listByVault("upbezqccydrt", "eukdqkkyih", "tg", "qm", com.azure.core.util.Context.NONE); - Assertions.assertEquals("scubiwsdrnpxqwod", response.iterator().next().label()); - Assertions.assertEquals("muabwibvjogjonmc", response.iterator().next().volumeResourceId()); + Assertions.assertEquals("izs", response.iterator().next().label()); + Assertions.assertEquals("wqejpmvsse", response.iterator().next().volumeResourceId()); Assertions.assertTrue(response.iterator().next().useExistingSnapshot()); - Assertions.assertEquals("y", response.iterator().next().snapshotName()); + Assertions.assertEquals("wamcxtczhup", response.iterator().next().snapshotName()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsMigrationRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsMigrationRequestTests.java index 223ff00ef96f..eda41a96d6ee 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsMigrationRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsMigrationRequestTests.java @@ -12,14 +12,14 @@ public final class BackupsMigrationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupsMigrationRequest model - = BinaryData.fromString("{\"backupVaultId\":\"mzlanru\"}").toObject(BackupsMigrationRequest.class); - Assertions.assertEquals("mzlanru", model.backupVaultId()); + = BinaryData.fromString("{\"backupVaultId\":\"kjxnqpvwgfstmhq\"}").toObject(BackupsMigrationRequest.class); + Assertions.assertEquals("kjxnqpvwgfstmhq", model.backupVaultId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupsMigrationRequest model = new BackupsMigrationRequest().withBackupVaultId("mzlanru"); + BackupsMigrationRequest model = new BackupsMigrationRequest().withBackupVaultId("kjxnqpvwgfstmhq"); model = BinaryData.fromObject(model).toObject(BackupsMigrationRequest.class); - Assertions.assertEquals("mzlanru", model.backupVaultId()); + Assertions.assertEquals("kjxnqpvwgfstmhq", model.backupVaultId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateMockTests.java index 510d1c5eda2d..290b8d3ee947 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateMockTests.java @@ -26,7 +26,7 @@ public final class BucketsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"path\":\"foxcx\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":1543708796177391402,\"groupId\":1623834803788196043},\"cifsUser\":{\"username\":\"krmukmyjmkxett\"}},\"provisioningState\":\"Succeeded\",\"status\":\"CredentialsExpired\",\"server\":{\"fqdn\":\"qid\",\"certificateCommonName\":\"toqxjh\",\"certificateExpiryDate\":\"2021-08-12T22:31:31Z\",\"ipAddress\":\"qhtkbt\",\"certificateObject\":\"l\"},\"permissions\":\"ReadWrite\"},\"id\":\"dmbi\",\"name\":\"psnaww\",\"type\":\"qkzn\"}"; + = "{\"properties\":{\"path\":\"etaoutnpdc\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":2588760613186424450,\"groupId\":4863686099381323726},\"cifsUser\":{\"username\":\"duyeuyl\"}},\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"server\":{\"fqdn\":\"kcgsuthhl\",\"certificateCommonName\":\"mwynefxexlfciatx\",\"certificateExpiryDate\":\"2021-05-27T00:45:49Z\",\"ipAddress\":\"lkmdskjh\",\"certificateObject\":\"dl\"},\"permissions\":\"ReadOnly\"},\"id\":\"xcxscvslxlh\",\"name\":\"a\",\"type\":\"krmukmyjmkxett\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,22 +36,22 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Bucket response = manager.buckets() - .define("yutrymd") - .withExistingVolume("pjptn", "wjhrsidqpxlbtpa", "f", "ngatwmy") - .withPath("jhp") + .define("kgf") + .withExistingVolume("fgybpmfbf", "nunmpzkrv", "yifkdschlzvf", "ctnkjjwgcwnph") + .withPath("ogmhmjpj") .withFileSystemUser(new FileSystemUser() - .withNfsUser(new NfsUser().withUserId(1031808729537103141L).withGroupId(6740048000390481231L)) - .withCifsUser(new CifsUser().withUsername("pldrlefgnaavuag"))) - .withServer(new BucketServerProperties().withFqdn("tnpdctuhspfefy").withCertificateObject("h")) + .withNfsUser(new NfsUser().withUserId(5998485205199829502L).withGroupId(4170299053453455281L)) + .withCifsUser(new CifsUser().withUsername("ev"))) + .withServer(new BucketServerProperties().withFqdn("rxifvqnrx").withCertificateObject("pakftngatwm")) .withPermissions(BucketPermissions.READ_ONLY) .create(); - Assertions.assertEquals("foxcx", response.path()); - Assertions.assertEquals(1543708796177391402L, response.fileSystemUser().nfsUser().userId()); - Assertions.assertEquals(1623834803788196043L, response.fileSystemUser().nfsUser().groupId()); - Assertions.assertEquals("krmukmyjmkxett", response.fileSystemUser().cifsUser().username()); - Assertions.assertEquals("qid", response.server().fqdn()); - Assertions.assertEquals("l", response.server().certificateObject()); - Assertions.assertEquals(BucketPermissions.READ_WRITE, response.permissions()); + Assertions.assertEquals("etaoutnpdc", response.path()); + Assertions.assertEquals(2588760613186424450L, response.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(4863686099381323726L, response.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("duyeuyl", response.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("kcgsuthhl", response.server().fqdn()); + Assertions.assertEquals("dl", response.server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_ONLY, response.permissions()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsGetWithResponseMockTests.java index 735f48c12216..0e7d6fcd6c9e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class BucketsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"path\":\"vuqbozoo\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":8547000283721640460,\"groupId\":8793158195572566388},\"cifsUser\":{\"username\":\"bc\"}},\"provisioningState\":\"Succeeded\",\"status\":\"CredentialsExpired\",\"server\":{\"fqdn\":\"awqytllhdyzm\",\"certificateCommonName\":\"kzexnx\",\"certificateExpiryDate\":\"2021-06-14T23:11:42Z\",\"ipAddress\":\"ywymxgaabj\",\"certificateObject\":\"tfohf\"},\"permissions\":\"ReadWrite\"},\"id\":\"vkiwrsiwdyjqu\",\"name\":\"ykcrraue\",\"type\":\"kcsueho\"}"; + = "{\"properties\":{\"path\":\"cnulgmnhjevdy\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":7743082681184560174,\"groupId\":8672179791701967060},\"cifsUser\":{\"username\":\"qozzkivyhjrliizj\"}},\"provisioningState\":\"Moving\",\"status\":\"Active\",\"server\":{\"fqdn\":\"fkwa\",\"certificateCommonName\":\"olro\",\"certificateExpiryDate\":\"2021-02-20T19:57:08Z\",\"ipAddress\":\"mgnlqxsjxtel\",\"certificateObject\":\"hvuqbo\"},\"permissions\":\"ReadOnly\"},\"id\":\"zqocarku\",\"name\":\"lbcnndt\",\"type\":\"nx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +32,16 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Bucket response = manager.buckets() - .getWithResponse("fajs", "kskmqozzkivyhjrl", "izjixlq", "hefkwabsolronqq", "mgnlqxsjxtel", + .getWithResponse("wnjkgvfn", "xaurs", "ftibtyibuyvpirfq", "pnqn", "owsbedenrexkxbh", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("vuqbozoo", response.path()); - Assertions.assertEquals(8547000283721640460L, response.fileSystemUser().nfsUser().userId()); - Assertions.assertEquals(8793158195572566388L, response.fileSystemUser().nfsUser().groupId()); - Assertions.assertEquals("bc", response.fileSystemUser().cifsUser().username()); - Assertions.assertEquals("awqytllhdyzm", response.server().fqdn()); - Assertions.assertEquals("tfohf", response.server().certificateObject()); - Assertions.assertEquals(BucketPermissions.READ_WRITE, response.permissions()); + Assertions.assertEquals("cnulgmnhjevdy", response.path()); + Assertions.assertEquals(7743082681184560174L, response.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(8672179791701967060L, response.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("qozzkivyhjrliizj", response.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("fkwa", response.server().fqdn()); + Assertions.assertEquals("hvuqbo", response.server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_ONLY, response.permissions()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsListMockTests.java index fb0cae573ce9..61cb3cc7aa3f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsListMockTests.java @@ -23,7 +23,7 @@ public final class BucketsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"path\":\"bnfddep\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":8132115358222180607,\"groupId\":361997812372554358},\"cifsUser\":{\"username\":\"leexahvmywh\"}},\"provisioningState\":\"Deleting\",\"status\":\"CredentialsExpired\",\"server\":{\"fqdn\":\"csjjzyvoaqajuve\",\"certificateCommonName\":\"ptdmkrrbhmpful\",\"certificateExpiryDate\":\"2020-12-21T15:41:53Z\",\"ipAddress\":\"gybpmfb\",\"certificateObject\":\"nunmpzkrv\"},\"permissions\":\"ReadWrite\"},\"id\":\"kdschlzvfictnkjj\",\"name\":\"gcwn\",\"type\":\"hbkgfyrt\"}]}"; + = "{\"value\":[{\"properties\":{\"path\":\"gaabjkdtf\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":5326834635368118681,\"groupId\":5659515679437313606},\"cifsUser\":{\"username\":\"rsiwdyjqur\"}},\"provisioningState\":\"Moving\",\"status\":\"Active\",\"server\":{\"fqdn\":\"eek\",\"certificateCommonName\":\"uehogdd\",\"certificateExpiryDate\":\"2021-05-05T02:12:20Z\",\"ipAddress\":\"bgydlqidywm\",\"certificateObject\":\"ptyrilkfbnrqqxv\"},\"permissions\":\"ReadOnly\"},\"id\":\"nfnqtxjtomals\",\"name\":\"bnfddep\",\"type\":\"dwq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,15 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<Bucket> response = manager.buckets() - .list("ddacbcbgydlqidy", "mhmpty", "ilkfbnrqqxv", "tpbnfnqtxjtoma", com.azure.core.util.Context.NONE); + PagedIterable<Bucket> response + = manager.buckets().list("wqy", "llhdyzm", "ckze", "nxakckyw", com.azure.core.util.Context.NONE); - Assertions.assertEquals("bnfddep", response.iterator().next().path()); - Assertions.assertEquals(8132115358222180607L, response.iterator().next().fileSystemUser().nfsUser().userId()); - Assertions.assertEquals(361997812372554358L, response.iterator().next().fileSystemUser().nfsUser().groupId()); - Assertions.assertEquals("leexahvmywh", response.iterator().next().fileSystemUser().cifsUser().username()); - Assertions.assertEquals("csjjzyvoaqajuve", response.iterator().next().server().fqdn()); - Assertions.assertEquals("nunmpzkrv", response.iterator().next().server().certificateObject()); - Assertions.assertEquals(BucketPermissions.READ_WRITE, response.iterator().next().permissions()); + Assertions.assertEquals("gaabjkdtf", response.iterator().next().path()); + Assertions.assertEquals(5326834635368118681L, response.iterator().next().fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(5659515679437313606L, response.iterator().next().fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("rsiwdyjqur", response.iterator().next().fileSystemUser().cifsUser().username()); + Assertions.assertEquals("eek", response.iterator().next().server().fqdn()); + Assertions.assertEquals("ptyrilkfbnrqqxv", response.iterator().next().server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_ONLY, response.iterator().next().permissions()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CacheMountTargetPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CacheMountTargetPropertiesTests.java index d532b4fcf6a4..9dd8c7f7d485 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CacheMountTargetPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CacheMountTargetPropertiesTests.java @@ -11,7 +11,7 @@ public final class CacheMountTargetPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CacheMountTargetProperties model = BinaryData - .fromString("{\"mountTargetId\":\"jlfrq\",\"ipAddress\":\"bajlka\",\"smbServerFqdn\":\"wxyiopidkqq\"}") + .fromString("{\"mountTargetId\":\"q\",\"ipAddress\":\"rnxrxcpj\",\"smbServerFqdn\":\"savokqdzf\"}") .toObject(CacheMountTargetProperties.class); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachePropertiesExportPolicyTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachePropertiesExportPolicyTests.java new file mode 100644 index 000000000000..c2e17b77a9c7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachePropertiesExportPolicyTests.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.CachePropertiesExportPolicy; +import com.azure.resourcemanager.netapp.models.ChownMode; +import com.azure.resourcemanager.netapp.models.ExportPolicyRule; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class CachePropertiesExportPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CachePropertiesExportPolicy model = BinaryData.fromString( + "{\"rules\":[{\"ruleIndex\":1622525022,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"actxtgzukxitm\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"}]}") + .toObject(CachePropertiesExportPolicy.class); + Assertions.assertEquals(1622525022, model.rules().get(0).ruleIndex()); + Assertions.assertTrue(model.rules().get(0).unixReadOnly()); + Assertions.assertFalse(model.rules().get(0).unixReadWrite()); + Assertions.assertFalse(model.rules().get(0).kerberos5ReadOnly()); + Assertions.assertTrue(model.rules().get(0).kerberos5ReadWrite()); + Assertions.assertTrue(model.rules().get(0).kerberos5IReadOnly()); + Assertions.assertTrue(model.rules().get(0).kerberos5IReadWrite()); + Assertions.assertTrue(model.rules().get(0).kerberos5PReadOnly()); + Assertions.assertFalse(model.rules().get(0).kerberos5PReadWrite()); + Assertions.assertFalse(model.rules().get(0).cifs()); + Assertions.assertTrue(model.rules().get(0).nfsv3()); + Assertions.assertTrue(model.rules().get(0).nfsv41()); + Assertions.assertEquals("actxtgzukxitm", model.rules().get(0).allowedClients()); + Assertions.assertFalse(model.rules().get(0).hasRootAccess()); + Assertions.assertEquals(ChownMode.UNRESTRICTED, model.rules().get(0).chownMode()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CachePropertiesExportPolicy model + = new CachePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1622525022) + .withUnixReadOnly(true) + .withUnixReadWrite(false) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(true) + .withKerberos5IReadOnly(true) + .withKerberos5IReadWrite(true) + .withKerberos5PReadOnly(true) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(true) + .withNfsv41(true) + .withAllowedClients("actxtgzukxitm") + .withHasRootAccess(false) + .withChownMode(ChownMode.UNRESTRICTED))); + model = BinaryData.fromObject(model).toObject(CachePropertiesExportPolicy.class); + Assertions.assertEquals(1622525022, model.rules().get(0).ruleIndex()); + Assertions.assertTrue(model.rules().get(0).unixReadOnly()); + Assertions.assertFalse(model.rules().get(0).unixReadWrite()); + Assertions.assertFalse(model.rules().get(0).kerberos5ReadOnly()); + Assertions.assertTrue(model.rules().get(0).kerberos5ReadWrite()); + Assertions.assertTrue(model.rules().get(0).kerberos5IReadOnly()); + Assertions.assertTrue(model.rules().get(0).kerberos5IReadWrite()); + Assertions.assertTrue(model.rules().get(0).kerberos5PReadOnly()); + Assertions.assertFalse(model.rules().get(0).kerberos5PReadWrite()); + Assertions.assertFalse(model.rules().get(0).cifs()); + Assertions.assertTrue(model.rules().get(0).nfsv3()); + Assertions.assertTrue(model.rules().get(0).nfsv41()); + Assertions.assertEquals("actxtgzukxitm", model.rules().get(0).allowedClients()); + Assertions.assertFalse(model.rules().get(0).hasRootAccess()); + Assertions.assertEquals(ChownMode.UNRESTRICTED, model.rules().get(0).chownMode()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java index deadd16cbfab..3734e814238e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class CachesListPeeringPassphrasesWithResponseMockTests { @Test public void testListPeeringPassphrasesWithResponse() throws Exception { String responseStr - = "{\"clusterPeeringCommand\":\"yrfwbivq\",\"clusterPeeringPassphrase\":\"ogfuyzwvbhlim\",\"vserverPeeringCommand\":\"yqe\"}"; + = "{\"clusterPeeringCommand\":\"iv\",\"clusterPeeringPassphrase\":\"kwwwnckn\",\"vserverPeeringCommand\":\"zdajlskzptjxu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,12 @@ public void testListPeeringPassphrasesWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PeeringPassphrases response = manager.caches() - .listPeeringPassphrasesWithResponse("ziuswsw", "rk", "qsj", "btqqvyfs", com.azure.core.util.Context.NONE) + .listPeeringPassphrasesWithResponse("gbkkqvjcteoed", "rslskkzp", "vjnzdpvocojhpcna", "xzfsnggytexvzilm", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("yrfwbivq", response.clusterPeeringCommand()); - Assertions.assertEquals("ogfuyzwvbhlim", response.clusterPeeringPassphrase()); - Assertions.assertEquals("yqe", response.vserverPeeringCommand()); + Assertions.assertEquals("iv", response.clusterPeeringCommand()); + Assertions.assertEquals("kwwwnckn", response.clusterPeeringPassphrase()); + Assertions.assertEquals("zdajlskzptjxu", response.vserverPeeringCommand()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesPoolChangeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesPoolChangeMockTests.java index a616b2f870f1..e0fda4969b8b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesPoolChangeMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesPoolChangeMockTests.java @@ -29,8 +29,8 @@ public void testPoolChange() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.caches() - .poolChange("r", "odlikcdrdaasax", "obsmf", "wiyjvzuko", new PoolChangeRequest().withNewPoolResourceId("r"), - com.azure.core.util.Context.NONE); + .poolChange("weucyrth", "qlehmcgcjeinu", "hokamvfej", "qnttmbq", + new PoolChangeRequest().withNewPoolResourceId("abzfivf"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java index a2f60451d0b9..ce254fa4cb02 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java @@ -17,37 +17,36 @@ public final class CapacityPoolInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapacityPoolInner model = BinaryData.fromString( - "{\"properties\":{\"poolId\":\"wvnph\",\"size\":5544744614322869903,\"serviceLevel\":\"Flexible\",\"provisioningState\":\"pjhmqrhvthl\",\"totalThroughputMibps\":63.386166,\"utilizedThroughputMibps\":5.9982357,\"customThroughputMibps\":1795425186,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"etag\":\"txetlgydl\",\"location\":\"vlnnpx\",\"tags\":{\"gjekglklby\":\"fiqgeaar\",\"hj\":\"lidwcwvmzegjon\",\"zhzmtksjci\":\"rwgdnqzbrfks\",\"plkeuachtomflryt\":\"digsxcdgl\"},\"id\":\"wfpfmdgycx\",\"name\":\"mskwhqjjysl\",\"type\":\"rlpshhkv\"}") + "{\"properties\":{\"poolId\":\"izmdksa\",\"size\":5433983987550738037,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"uqvoxmycjimryv\",\"totalThroughputMibps\":23.499817,\"utilizedThroughputMibps\":97.91679,\"customThroughputMibps\":1784375715,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"etag\":\"dsxwefoh\",\"location\":\"bvopwndyqle\",\"tags\":{\"pvbrdfjmzsyz\":\"klmtkhlowkx\",\"pjrtws\":\"hotlhikcyychunsj\",\"uic\":\"hv\"},\"id\":\"hvtrrmhwrbfdpyf\",\"name\":\"ubhvj\",\"type\":\"lrocuyzlwh\"}") .toObject(CapacityPoolInner.class); - Assertions.assertEquals("vlnnpx", model.location()); - Assertions.assertEquals("fiqgeaar", model.tags().get("gjekglklby")); - Assertions.assertEquals(5544744614322869903L, model.size()); - Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.serviceLevel()); - Assertions.assertEquals(1795425186, model.customThroughputMibps()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals("bvopwndyqle", model.location()); + Assertions.assertEquals("klmtkhlowkx", model.tags().get("pvbrdfjmzsyz")); + Assertions.assertEquals(5433983987550738037L, model.size()); + Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); + Assertions.assertEquals(1784375715, model.customThroughputMibps()); + Assertions.assertEquals(QosType.AUTO, model.qosType()); + Assertions.assertFalse(model.coolAccess()); Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CapacityPoolInner model = new CapacityPoolInner().withLocation("vlnnpx") - .withTags(mapOf("gjekglklby", "fiqgeaar", "hj", "lidwcwvmzegjon", "zhzmtksjci", "rwgdnqzbrfks", - "plkeuachtomflryt", "digsxcdgl")) - .withSize(5544744614322869903L) - .withServiceLevel(ServiceLevel.FLEXIBLE) - .withCustomThroughputMibps(1795425186) - .withQosType(QosType.MANUAL) - .withCoolAccess(true) + CapacityPoolInner model = new CapacityPoolInner().withLocation("bvopwndyqle") + .withTags(mapOf("pvbrdfjmzsyz", "klmtkhlowkx", "pjrtws", "hotlhikcyychunsj", "uic", "hv")) + .withSize(5433983987550738037L) + .withServiceLevel(ServiceLevel.ULTRA) + .withCustomThroughputMibps(1784375715) + .withQosType(QosType.AUTO) + .withCoolAccess(false) .withEncryptionType(EncryptionType.DOUBLE); model = BinaryData.fromObject(model).toObject(CapacityPoolInner.class); - Assertions.assertEquals("vlnnpx", model.location()); - Assertions.assertEquals("fiqgeaar", model.tags().get("gjekglklby")); - Assertions.assertEquals(5544744614322869903L, model.size()); - Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.serviceLevel()); - Assertions.assertEquals(1795425186, model.customThroughputMibps()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals("bvopwndyqle", model.location()); + Assertions.assertEquals("klmtkhlowkx", model.tags().get("pvbrdfjmzsyz")); + Assertions.assertEquals(5433983987550738037L, model.size()); + Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); + Assertions.assertEquals(1784375715, model.customThroughputMibps()); + Assertions.assertEquals(QosType.AUTO, model.qosType()); + Assertions.assertFalse(model.coolAccess()); Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java index 95bc679477e5..227257b074e1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java @@ -15,16 +15,16 @@ public final class CapacityPoolListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapacityPoolList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"poolId\":\"ui\",\"size\":7795929404530107867,\"serviceLevel\":\"Standard\",\"provisioningState\":\"aztb\",\"totalThroughputMibps\":15.64473,\"utilizedThroughputMibps\":45.797707,\"customThroughputMibps\":2137351817,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"etag\":\"kytwvcz\",\"location\":\"wka\",\"tags\":{\"b\":\"jyfdvlv\",\"th\":\"rnfxtgddp\",\"naoyank\":\"hn\",\"swankltytmh\":\"oe\"},\"id\":\"roznnhdrlktgj\",\"name\":\"sggux\",\"type\":\"eml\"}],\"nextLink\":\"waeeczgfb\"}") + "{\"value\":[{\"properties\":{\"poolId\":\"vkmjcwmjvlgf\",\"size\":9062717151719933853,\"serviceLevel\":\"Standard\",\"provisioningState\":\"yylizrz\",\"totalThroughputMibps\":34.000515,\"utilizedThroughputMibps\":73.243675,\"customThroughputMibps\":516157430,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"etag\":\"mvagbwidqlvhuko\",\"location\":\"ofizrvjfnmjmvlwy\",\"tags\":{\"uyjucejikzo\":\"blkujrllfojuidjp\",\"ikyju\":\"ovvtzejetjkln\"},\"id\":\"k\",\"name\":\"bqzolxr\",\"type\":\"vhqjwtrhtgvg\"},{\"properties\":{\"poolId\":\"c\",\"size\":8464117007895528462,\"serviceLevel\":\"Premium\",\"provisioningState\":\"awjmjsmw\",\"totalThroughputMibps\":55.66293,\"utilizedThroughputMibps\":67.56904,\"customThroughputMibps\":1397501063,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"fitlhguynuchl\",\"location\":\"ltxdwhmozu\",\"tags\":{\"pafolp\":\"vlnsnnjz\",\"vdulajv\":\"mwamxqzragpgdph\",\"nmzlanru\":\"ejchcsrlz\"},\"id\":\"dwv\",\"name\":\"phcnzqtpj\",\"type\":\"mqrhvthl\"}],\"nextLink\":\"wdcxsmlzzhz\"}") .toObject(CapacityPoolList.class); - Assertions.assertEquals("wka", model.value().get(0).location()); - Assertions.assertEquals("jyfdvlv", model.value().get(0).tags().get("b")); - Assertions.assertEquals(7795929404530107867L, model.value().get(0).size()); + Assertions.assertEquals("ofizrvjfnmjmvlwy", model.value().get(0).location()); + Assertions.assertEquals("blkujrllfojuidjp", model.value().get(0).tags().get("uyjucejikzo")); + Assertions.assertEquals(9062717151719933853L, model.value().get(0).size()); Assertions.assertEquals(ServiceLevel.STANDARD, model.value().get(0).serviceLevel()); - Assertions.assertEquals(2137351817, model.value().get(0).customThroughputMibps()); - Assertions.assertEquals(QosType.AUTO, model.value().get(0).qosType()); + Assertions.assertEquals(516157430, model.value().get(0).customThroughputMibps()); + Assertions.assertEquals(QosType.MANUAL, model.value().get(0).qosType()); Assertions.assertFalse(model.value().get(0).coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, model.value().get(0).encryptionType()); - Assertions.assertEquals("waeeczgfb", model.nextLink()); + Assertions.assertEquals(EncryptionType.SINGLE, model.value().get(0).encryptionType()); + Assertions.assertEquals("wdcxsmlzzhz", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java index 3efbf3e27df7..9334d41597f5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java @@ -15,31 +15,31 @@ public final class CapacityPoolPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapacityPoolPatch model = BinaryData.fromString( - "{\"location\":\"inuqtljq\",\"id\":\"bpihehcecybmrqbr\",\"name\":\"bmpxdlvykfrexc\",\"type\":\"eqwjksgh\",\"tags\":{\"jkxibda\":\"zhxogjggsvo\",\"y\":\"hrkmdyomkxfbvfbh\"},\"properties\":{\"size\":8832488206346498330,\"qosType\":\"Auto\",\"coolAccess\":true,\"customThroughputMibps\":395369320}}") + "{\"location\":\"rryejylmbkzudnig\",\"id\":\"ihotjewlpxuzzjg\",\"name\":\"efqyhqotoihiqaky\",\"type\":\"wf\",\"tags\":{\"aqa\":\"wpzdqtvhcspo\",\"tgbebj\":\"sipi\",\"fpubntnbatz\":\"ulbmoichdlp\"},\"properties\":{\"size\":9088266027491450812,\"qosType\":\"Auto\",\"coolAccess\":false,\"customThroughputMibps\":655174268}}") .toObject(CapacityPoolPatch.class); - Assertions.assertEquals("inuqtljq", model.location()); - Assertions.assertEquals("zhxogjggsvo", model.tags().get("jkxibda")); - Assertions.assertEquals(8832488206346498330L, model.size()); + Assertions.assertEquals("rryejylmbkzudnig", model.location()); + Assertions.assertEquals("wpzdqtvhcspo", model.tags().get("aqa")); + Assertions.assertEquals(9088266027491450812L, model.size()); Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertTrue(model.coolAccess()); - Assertions.assertEquals(395369320, model.customThroughputMibps()); + Assertions.assertFalse(model.coolAccess()); + Assertions.assertEquals(655174268, model.customThroughputMibps()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CapacityPoolPatch model = new CapacityPoolPatch().withLocation("inuqtljq") - .withTags(mapOf("jkxibda", "zhxogjggsvo", "y", "hrkmdyomkxfbvfbh")) - .withSize(8832488206346498330L) + CapacityPoolPatch model = new CapacityPoolPatch().withLocation("rryejylmbkzudnig") + .withTags(mapOf("aqa", "wpzdqtvhcspo", "tgbebj", "sipi", "fpubntnbatz", "ulbmoichdlp")) + .withSize(9088266027491450812L) .withQosType(QosType.AUTO) - .withCoolAccess(true) - .withCustomThroughputMibps(395369320); + .withCoolAccess(false) + .withCustomThroughputMibps(655174268); model = BinaryData.fromObject(model).toObject(CapacityPoolPatch.class); - Assertions.assertEquals("inuqtljq", model.location()); - Assertions.assertEquals("zhxogjggsvo", model.tags().get("jkxibda")); - Assertions.assertEquals(8832488206346498330L, model.size()); + Assertions.assertEquals("rryejylmbkzudnig", model.location()); + Assertions.assertEquals("wpzdqtvhcspo", model.tags().get("aqa")); + Assertions.assertEquals(9088266027491450812L, model.size()); Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertTrue(model.coolAccess()); - Assertions.assertEquals(395369320, model.customThroughputMibps()); + Assertions.assertFalse(model.coolAccess()); + Assertions.assertEquals(655174268, model.customThroughputMibps()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ChangeZoneRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ChangeZoneRequestTests.java index a236323849df..696a38bcd992 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ChangeZoneRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ChangeZoneRequestTests.java @@ -11,14 +11,14 @@ public final class ChangeZoneRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ChangeZoneRequest model = BinaryData.fromString("{\"newZone\":\"jnaeois\"}").toObject(ChangeZoneRequest.class); - Assertions.assertEquals("jnaeois", model.newZone()); + ChangeZoneRequest model = BinaryData.fromString("{\"newZone\":\"ysdzhez\"}").toObject(ChangeZoneRequest.class); + Assertions.assertEquals("ysdzhez", model.newZone()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChangeZoneRequest model = new ChangeZoneRequest().withNewZone("jnaeois"); + ChangeZoneRequest model = new ChangeZoneRequest().withNewZone("ysdzhez"); model = BinaryData.fromObject(model).toObject(ChangeZoneRequest.class); - Assertions.assertEquals("jnaeois", model.newZone()); + Assertions.assertEquals("ysdzhez", model.newZone()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java index 4eb1bfd5c6b8..5e366f6c643f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java @@ -12,11 +12,11 @@ public final class CheckAvailabilityResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CheckAvailabilityResponseInner model = BinaryData - .fromString("{\"isAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"xnqmhrpqpdfwm\"}") - .toObject(CheckAvailabilityResponseInner.class); - Assertions.assertFalse(model.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("xnqmhrpqpdfwm", model.message()); + CheckAvailabilityResponseInner model + = BinaryData.fromString("{\"isAvailable\":true,\"reason\":\"Invalid\",\"message\":\"esqplp\"}") + .toObject(CheckAvailabilityResponseInner.class); + Assertions.assertTrue(model.isAvailable()); + Assertions.assertEquals(InAvailabilityReasonType.INVALID, model.reason()); + Assertions.assertEquals("esqplp", model.message()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticResourceAvailabilityResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticResourceAvailabilityResponseInnerTests.java index c514a8e334e8..c3d5b1138635 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticResourceAvailabilityResponseInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticResourceAvailabilityResponseInnerTests.java @@ -14,10 +14,10 @@ public final class CheckElasticResourceAvailabilityResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CheckElasticResourceAvailabilityResponseInner model = BinaryData - .fromString("{\"isAvailable\":\"True\",\"reason\":\"AlreadyExists\",\"message\":\"wplefaxvxil\"}") + .fromString("{\"isAvailable\":\"False\",\"reason\":\"Invalid\",\"message\":\"fonkphhqyikvyla\"}") .toObject(CheckElasticResourceAvailabilityResponseInner.class); - Assertions.assertEquals(CheckElasticResourceAvailabilityStatus.TRUE, model.isAvailable()); - Assertions.assertEquals(CheckElasticResourceAvailabilityReason.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("wplefaxvxil", model.message()); + Assertions.assertEquals(CheckElasticResourceAvailabilityStatus.FALSE, model.isAvailable()); + Assertions.assertEquals(CheckElasticResourceAvailabilityReason.INVALID, model.reason()); + Assertions.assertEquals("fonkphhqyikvyla", model.message()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticVolumeFilePathAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticVolumeFilePathAvailabilityRequestTests.java index deb3a1aca95c..0d26e68c8e0c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticVolumeFilePathAvailabilityRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticVolumeFilePathAvailabilityRequestTests.java @@ -11,16 +11,16 @@ public final class CheckElasticVolumeFilePathAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CheckElasticVolumeFilePathAvailabilityRequest model = BinaryData.fromString("{\"filePath\":\"vhmgorffukis\"}") + CheckElasticVolumeFilePathAvailabilityRequest model = BinaryData.fromString("{\"filePath\":\"wva\"}") .toObject(CheckElasticVolumeFilePathAvailabilityRequest.class); - Assertions.assertEquals("vhmgorffukis", model.filePath()); + Assertions.assertEquals("wva", model.filePath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CheckElasticVolumeFilePathAvailabilityRequest model - = new CheckElasticVolumeFilePathAvailabilityRequest().withFilePath("vhmgorffukis"); + = new CheckElasticVolumeFilePathAvailabilityRequest().withFilePath("wva"); model = BinaryData.fromObject(model).toObject(CheckElasticVolumeFilePathAvailabilityRequest.class); - Assertions.assertEquals("vhmgorffukis", model.filePath()); + Assertions.assertEquals("wva", model.filePath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupInnerTests.java index b0c76daa86d1..0469fdbaeeca 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupInnerTests.java @@ -14,25 +14,25 @@ public final class ElasticBackupInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticBackupInner model = BinaryData.fromString( - "{\"properties\":{\"creationDate\":\"2021-05-15T07:09:59Z\",\"snapshotCreationDate\":\"2021-07-06T22:18:04Z\",\"completionDate\":\"2021-02-19T02:47:18Z\",\"provisioningState\":\"Accepted\",\"size\":5615391531066608905,\"label\":\"mzvupor\",\"backupType\":\"Manual\",\"failureReason\":\"uydzvk\",\"elasticVolumeResourceId\":\"vxcnqmxqps\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"vkhlggdhbemz\",\"elasticBackupPolicyResourceId\":\"zszuwiwtglxx\",\"volumeSize\":\"Regular\"},\"id\":\"pg\",\"name\":\"icrmnzh\",\"type\":\"gmqgjs\"}") + "{\"properties\":{\"creationDate\":\"2021-10-20T08:33:54Z\",\"snapshotCreationDate\":\"2021-10-09T17:52:20Z\",\"completionDate\":\"2021-08-28T13:03:11Z\",\"provisioningState\":\"Patching\",\"size\":3257059886756944333,\"label\":\"nbtgfebwl\",\"backupType\":\"Scheduled\",\"failureReason\":\"yreeudz\",\"elasticVolumeResourceId\":\"av\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"mjxlyyzglgouw\",\"elasticBackupPolicyResourceId\":\"mjjyuojq\",\"volumeSize\":\"Large\"},\"id\":\"xkjeytunlbfj\",\"name\":\"wrus\",\"type\":\"kqbh\"}") .toObject(ElasticBackupInner.class); - Assertions.assertEquals("mzvupor", model.properties().label()); - Assertions.assertEquals("vxcnqmxqps", model.properties().elasticVolumeResourceId()); + Assertions.assertEquals("nbtgfebwl", model.properties().label()); + Assertions.assertEquals("av", model.properties().elasticVolumeResourceId()); Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, model.properties().snapshotUsage()); - Assertions.assertEquals("vkhlggdhbemz", model.properties().elasticSnapshotResourceId()); + Assertions.assertEquals("mjxlyyzglgouw", model.properties().elasticSnapshotResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ElasticBackupInner model - = new ElasticBackupInner().withProperties(new ElasticBackupProperties().withLabel("mzvupor") - .withElasticVolumeResourceId("vxcnqmxqps") + = new ElasticBackupInner().withProperties(new ElasticBackupProperties().withLabel("nbtgfebwl") + .withElasticVolumeResourceId("av") .withSnapshotUsage(SnapshotUsage.USE_EXISTING_SNAPSHOT) - .withElasticSnapshotResourceId("vkhlggdhbemz")); + .withElasticSnapshotResourceId("mjxlyyzglgouw")); model = BinaryData.fromObject(model).toObject(ElasticBackupInner.class); - Assertions.assertEquals("mzvupor", model.properties().label()); - Assertions.assertEquals("vxcnqmxqps", model.properties().elasticVolumeResourceId()); + Assertions.assertEquals("nbtgfebwl", model.properties().label()); + Assertions.assertEquals("av", model.properties().elasticVolumeResourceId()); Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, model.properties().snapshotUsage()); - Assertions.assertEquals("vkhlggdhbemz", model.properties().elasticSnapshotResourceId()); + Assertions.assertEquals("mjxlyyzglgouw", model.properties().elasticSnapshotResourceId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupListResultTests.java index c11fadf2b93c..b3dadf2ebaf5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupListResultTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupListResultTests.java @@ -13,12 +13,12 @@ public final class ElasticBackupListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticBackupListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"creationDate\":\"2021-06-24T14:54:49Z\",\"snapshotCreationDate\":\"2021-10-04T06:14:32Z\",\"completionDate\":\"2021-10-24T12:56:34Z\",\"provisioningState\":\"Accepted\",\"size\":935725663715355560,\"label\":\"nykzcugswvxwlm\",\"backupType\":\"Manual\",\"failureReason\":\"vtxnjmxmcuqud\",\"elasticVolumeResourceId\":\"cvclxynpdk\",\"snapshotUsage\":\"CreateNewSnapshot\",\"elasticSnapshotResourceId\":\"buiyji\",\"elasticBackupPolicyResourceId\":\"zphdugneiknp\",\"volumeSize\":\"Large\"},\"id\":\"jiuqhibtozi\",\"name\":\"qw\",\"type\":\"edmurrxxge\"},{\"properties\":{\"creationDate\":\"2021-06-22T20:24:57Z\",\"snapshotCreationDate\":\"2021-05-29T11:10:18Z\",\"completionDate\":\"2021-03-16T06:40:41Z\",\"provisioningState\":\"Succeeded\",\"size\":3020055328504927259,\"label\":\"hlfbcgwgc\",\"backupType\":\"Manual\",\"failureReason\":\"ebqinjipnw\",\"elasticVolumeResourceId\":\"fujqlafcba\",\"snapshotUsage\":\"CreateNewSnapshot\",\"elasticSnapshotResourceId\":\"pofoi\",\"elasticBackupPolicyResourceId\":\"w\",\"volumeSize\":\"Large\"},\"id\":\"kmkkholvdnd\",\"name\":\"iauogphuartv\",\"type\":\"iukyefchnmna\"},{\"properties\":{\"creationDate\":\"2021-09-13T15:02:21Z\",\"snapshotCreationDate\":\"2020-12-28T05:33:43Z\",\"completionDate\":\"2021-01-28T01:51:57Z\",\"provisioningState\":\"Patching\",\"size\":6542563185953297376,\"label\":\"eooxffifh\",\"backupType\":\"Scheduled\",\"failureReason\":\"newmozqvb\",\"elasticVolumeResourceId\":\"bqmamhsycxhxzgaz\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"o\",\"elasticBackupPolicyResourceId\":\"vmfqhppubo\",\"volumeSize\":\"Regular\"},\"id\":\"dfgkmtdh\",\"name\":\"rngbtcjuahokqtob\",\"type\":\"auxofshfph\"},{\"properties\":{\"creationDate\":\"2021-04-27T16:43:49Z\",\"snapshotCreationDate\":\"2021-02-08T14:31:19Z\",\"completionDate\":\"2021-11-07T16:30:06Z\",\"provisioningState\":\"Deleting\",\"size\":1933668171444781550,\"label\":\"hs\",\"backupType\":\"Manual\",\"failureReason\":\"jpllndnpdwrpq\",\"elasticVolumeResourceId\":\"fgf\",\"snapshotUsage\":\"CreateNewSnapshot\",\"elasticSnapshotResourceId\":\"n\",\"elasticBackupPolicyResourceId\":\"yetefyp\",\"volumeSize\":\"Regular\"},\"id\":\"tfjgt\",\"name\":\"xrjvzuyturmlm\",\"type\":\"owolbaui\"}],\"nextLink\":\"p\"}") + "{\"value\":[{\"properties\":{\"creationDate\":\"2021-11-16T03:55Z\",\"snapshotCreationDate\":\"2020-12-29T21:58:50Z\",\"completionDate\":\"2021-08-02T11:55:53Z\",\"provisioningState\":\"Succeeded\",\"size\":1447562918838442967,\"label\":\"iirhgfgrwsd\",\"backupType\":\"Manual\",\"failureReason\":\"t\",\"elasticVolumeResourceId\":\"vzbglbyvi\",\"snapshotUsage\":\"CreateNewSnapshot\",\"elasticSnapshotResourceId\":\"brxkjzwr\",\"elasticBackupPolicyResourceId\":\"ffm\",\"volumeSize\":\"Large\"},\"id\":\"fbkgozxwopdby\",\"name\":\"p\",\"type\":\"zqaclna\"},{\"properties\":{\"creationDate\":\"2021-10-06T23:20:34Z\",\"snapshotCreationDate\":\"2020-12-25T22:51:58Z\",\"completionDate\":\"2021-08-27T14:09:40Z\",\"provisioningState\":\"Succeeded\",\"size\":5251325077784054834,\"label\":\"fcttuxuuyilfl\",\"backupType\":\"Manual\",\"failureReason\":\"uvr\",\"elasticVolumeResourceId\":\"hmrnjhvsuj\",\"snapshotUsage\":\"CreateNewSnapshot\",\"elasticSnapshotResourceId\":\"ytqj\",\"elasticBackupPolicyResourceId\":\"h\",\"volumeSize\":\"Regular\"},\"id\":\"fprnjl\",\"name\":\"tlxs\",\"type\":\"rpddouifamo\"},{\"properties\":{\"creationDate\":\"2021-06-03T09:57:31Z\",\"snapshotCreationDate\":\"2021-11-29T08:31:04Z\",\"completionDate\":\"2021-04-04T17:04:10Z\",\"provisioningState\":\"Moving\",\"size\":6803616450546512715,\"label\":\"piwhxqs\",\"backupType\":\"Manual\",\"failureReason\":\"aajquhuxylrj\",\"elasticVolumeResourceId\":\"m\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"bmzyospsps\",\"elasticBackupPolicyResourceId\":\"kfkyjp\",\"volumeSize\":\"Regular\"},\"id\":\"pssdfppyogtie\",\"name\":\"ujtv\",\"type\":\"zkc\"}],\"nextLink\":\"xrx\"}") .toObject(ElasticBackupListResult.class); - Assertions.assertEquals("nykzcugswvxwlm", model.value().get(0).properties().label()); - Assertions.assertEquals("cvclxynpdk", model.value().get(0).properties().elasticVolumeResourceId()); + Assertions.assertEquals("iirhgfgrwsd", model.value().get(0).properties().label()); + Assertions.assertEquals("vzbglbyvi", model.value().get(0).properties().elasticVolumeResourceId()); Assertions.assertEquals(SnapshotUsage.CREATE_NEW_SNAPSHOT, model.value().get(0).properties().snapshotUsage()); - Assertions.assertEquals("buiyji", model.value().get(0).properties().elasticSnapshotResourceId()); - Assertions.assertEquals("p", model.nextLink()); + Assertions.assertEquals("brxkjzwr", model.value().get(0).properties().elasticSnapshotResourceId()); + Assertions.assertEquals("xrx", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateMockTests.java index b4b6b01617e7..8920e419bbe0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateMockTests.java @@ -25,7 +25,7 @@ public final class ElasticBackupPoliciesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":1902620686,\"weeklyBackupsToKeep\":2022478169,\"monthlyBackupsToKeep\":182145934,\"assignedVolumesCount\":1776924821,\"policyState\":\"Disabled\"},\"eTag\":\"ejbsvsiaies\",\"location\":\"ddzydisnu\",\"tags\":{\"nldpxottd\":\"wyj\",\"ocqibz\":\"i\",\"ph\":\"ihweeb\"},\"id\":\"yv\",\"name\":\"jw\",\"type\":\"w\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":1909500161,\"weeklyBackupsToKeep\":86594429,\"monthlyBackupsToKeep\":216995249,\"assignedVolumesCount\":201365036,\"policyState\":\"Enabled\"},\"eTag\":\"micbigwcdgzseznu\",\"location\":\"euairaabmdlqjb\",\"tags\":{\"xlhupmomihzbdnp\":\"f\",\"cghf\":\"pkcdpreyxely\",\"sfxrkbhammgm\":\"rufssjyg\"},\"id\":\"fm\",\"name\":\"fgvqcpdw\",\"type\":\"gquxweysland\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,22 +35,22 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ElasticBackupPolicy response = manager.elasticBackupPolicies() - .define("okjxebjvb") - .withRegion("ehaqidoyzltgio") - .withExistingElasticAccount("xstcyilbvzm", "xcjzlquze") - .withTags(mapOf("aeapfsergd", "qpep")) - .withProperties(new ElasticBackupPolicyProperties().withDailyBackupsToKeep(716967552) - .withWeeklyBackupsToKeep(1595582968) - .withMonthlyBackupsToKeep(1539684502) + .define("yxhighc") + .withRegion("jei") + .withExistingElasticAccount("iyrgkoek", "zwx") + .withTags(mapOf("msgycqs", "gqaboohx", "gejkbvhh", "rmdvewuyqaeohpj")) + .withProperties(new ElasticBackupPolicyProperties().withDailyBackupsToKeep(1400257872) + .withWeeklyBackupsToKeep(631913462) + .withMonthlyBackupsToKeep(1299436949) .withPolicyState(ElasticBackupPolicyState.ENABLED)) .create(); - Assertions.assertEquals("ddzydisnu", response.location()); - Assertions.assertEquals("wyj", response.tags().get("nldpxottd")); - Assertions.assertEquals(1902620686, response.properties().dailyBackupsToKeep()); - Assertions.assertEquals(2022478169, response.properties().weeklyBackupsToKeep()); - Assertions.assertEquals(182145934, response.properties().monthlyBackupsToKeep()); - Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, response.properties().policyState()); + Assertions.assertEquals("euairaabmdlqjb", response.location()); + Assertions.assertEquals("f", response.tags().get("xlhupmomihzbdnp")); + Assertions.assertEquals(1909500161, response.properties().dailyBackupsToKeep()); + Assertions.assertEquals(86594429, response.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(216995249, response.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, response.properties().policyState()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetWithResponseMockTests.java index 0b1394f17252..b1e63031f94f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class ElasticBackupPoliciesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Updating\",\"dailyBackupsToKeep\":1772784576,\"weeklyBackupsToKeep\":395179970,\"monthlyBackupsToKeep\":1664350014,\"assignedVolumesCount\":253438393,\"policyState\":\"Disabled\"},\"eTag\":\"sx\",\"location\":\"d\",\"tags\":{\"gejkbvhh\":\"uyqaeohpj\",\"xb\":\"aurghooxa\"},\"id\":\"hxjxjoezlqxrkdkn\",\"name\":\"obektmbozo\",\"type\":\"tzamicbig\"}"; + = "{\"properties\":{\"provisioningState\":\"Deleting\",\"dailyBackupsToKeep\":1835487153,\"weeklyBackupsToKeep\":1263927918,\"monthlyBackupsToKeep\":70558661,\"assignedVolumesCount\":1582366777,\"policyState\":\"Disabled\"},\"eTag\":\"arogatmolji\",\"location\":\"mpinmzvfkneerzzt\",\"tags\":{\"lugdybnhrxlelf\":\"sj\",\"htdm\":\"hkeizcp\",\"c\":\"wjekptycaydbj\"},\"id\":\"ymlcfnzhmhsurlg\",\"name\":\"qkpmmzpstau\",\"type\":\"lawiubmomsgvvjhv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ElasticBackupPolicy response = manager.elasticBackupPolicies() - .getWithResponse("xmolpcqydeyk", "skiczd", "rjeizik", com.azure.core.util.Context.NONE) + .getWithResponse("zbnobr", "lpbcjtrpz", "yudivbxnhsqeaeo", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("d", response.location()); - Assertions.assertEquals("uyqaeohpj", response.tags().get("gejkbvhh")); - Assertions.assertEquals(1772784576, response.properties().dailyBackupsToKeep()); - Assertions.assertEquals(395179970, response.properties().weeklyBackupsToKeep()); - Assertions.assertEquals(1664350014, response.properties().monthlyBackupsToKeep()); + Assertions.assertEquals("mpinmzvfkneerzzt", response.location()); + Assertions.assertEquals("sj", response.tags().get("lugdybnhrxlelf")); + Assertions.assertEquals(1835487153, response.properties().dailyBackupsToKeep()); + Assertions.assertEquals(1263927918, response.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(70558661, response.properties().monthlyBackupsToKeep()); Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, response.properties().policyState()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountMockTests.java index 6100b905eef7..556c796f9af2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountMockTests.java @@ -23,7 +23,7 @@ public final class ElasticBackupPoliciesListByElasticAccountMockTests { @Test public void testListByElasticAccount() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"dailyBackupsToKeep\":1759829804,\"weeklyBackupsToKeep\":587215355,\"monthlyBackupsToKeep\":1644042909,\"assignedVolumesCount\":1570012392,\"policyState\":\"Disabled\"},\"eTag\":\"z\",\"location\":\"npx\",\"tags\":{\"yxelyicghflr\":\"dpr\",\"yghsf\":\"fss\",\"fgvqcpdw\":\"rkbhammgmqfm\",\"dcdjhunh\":\"gquxweysland\"},\"id\":\"hcgawn\",\"name\":\"rnquoxso\",\"type\":\"ireimseobf\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"dailyBackupsToKeep\":1827914680,\"weeklyBackupsToKeep\":1301081297,\"monthlyBackupsToKeep\":556522065,\"assignedVolumesCount\":1964735926,\"policyState\":\"Disabled\"},\"eTag\":\"oshohtotrye\",\"location\":\"khxrmexznlwkbf\",\"tags\":{\"erufgjblcdrmy\":\"khup\",\"ekdfqnhttwd\":\"cemftzgyykyalu\",\"mhmnulwemp\":\"wrczfjjnnuxxrk\"},\"id\":\"cifrhjulrsulwzpf\",\"name\":\"usnaw\",\"type\":\"hhgzotf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,13 @@ public void testListByElasticAccount() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ElasticBackupPolicy> response = manager.elasticBackupPolicies() - .listByElasticAccount("cdgzseznux", "euairaabmdlqjb", com.azure.core.util.Context.NONE); + .listByElasticAccount("lrlohewjjmajnkdf", "q", com.azure.core.util.Context.NONE); - Assertions.assertEquals("npx", response.iterator().next().location()); - Assertions.assertEquals("dpr", response.iterator().next().tags().get("yxelyicghflr")); - Assertions.assertEquals(1759829804, response.iterator().next().properties().dailyBackupsToKeep()); - Assertions.assertEquals(587215355, response.iterator().next().properties().weeklyBackupsToKeep()); - Assertions.assertEquals(1644042909, response.iterator().next().properties().monthlyBackupsToKeep()); + Assertions.assertEquals("khxrmexznlwkbf", response.iterator().next().location()); + Assertions.assertEquals("khup", response.iterator().next().tags().get("erufgjblcdrmy")); + Assertions.assertEquals(1827914680, response.iterator().next().properties().dailyBackupsToKeep()); + Assertions.assertEquals(1301081297, response.iterator().next().properties().weeklyBackupsToKeep()); + Assertions.assertEquals(556522065, response.iterator().next().properties().monthlyBackupsToKeep()); Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, response.iterator().next().properties().policyState()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyInnerTests.java index 3ab9e5b440fd..4c6fa90bb9cf 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyInnerTests.java @@ -16,30 +16,30 @@ public final class ElasticBackupPolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticBackupPolicyInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"dailyBackupsToKeep\":728305495,\"weeklyBackupsToKeep\":649066801,\"monthlyBackupsToKeep\":619019093,\"assignedVolumesCount\":2058612555,\"policyState\":\"Disabled\"},\"eTag\":\"mxqhndvnoamldse\",\"location\":\"ohdjhhflzok\",\"tags\":{\"atftgzpnpbsw\":\"xpelnjetagltsx\"},\"id\":\"e\",\"name\":\"loccsrmozihm\",\"type\":\"pgawtxxpkyjcxcjx\"}") + "{\"properties\":{\"provisioningState\":\"Accepted\",\"dailyBackupsToKeep\":723884538,\"weeklyBackupsToKeep\":840919331,\"monthlyBackupsToKeep\":726767515,\"assignedVolumesCount\":981780547,\"policyState\":\"Disabled\"},\"eTag\":\"vnlvxbcuiiznktwf\",\"location\":\"snvpdibmi\",\"tags\":{\"yls\":\"tbzbkiwbuqnyophz\"},\"id\":\"crpfbcunez\",\"name\":\"cez\",\"type\":\"lfwyfwlwxjwetn\"}") .toObject(ElasticBackupPolicyInner.class); - Assertions.assertEquals("ohdjhhflzok", model.location()); - Assertions.assertEquals("xpelnjetagltsx", model.tags().get("atftgzpnpbsw")); - Assertions.assertEquals(728305495, model.properties().dailyBackupsToKeep()); - Assertions.assertEquals(649066801, model.properties().weeklyBackupsToKeep()); - Assertions.assertEquals(619019093, model.properties().monthlyBackupsToKeep()); + Assertions.assertEquals("snvpdibmi", model.location()); + Assertions.assertEquals("tbzbkiwbuqnyophz", model.tags().get("yls")); + Assertions.assertEquals(723884538, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(840919331, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(726767515, model.properties().monthlyBackupsToKeep()); Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.properties().policyState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ElasticBackupPolicyInner model = new ElasticBackupPolicyInner().withLocation("ohdjhhflzok") - .withTags(mapOf("atftgzpnpbsw", "xpelnjetagltsx")) - .withProperties(new ElasticBackupPolicyProperties().withDailyBackupsToKeep(728305495) - .withWeeklyBackupsToKeep(649066801) - .withMonthlyBackupsToKeep(619019093) + ElasticBackupPolicyInner model = new ElasticBackupPolicyInner().withLocation("snvpdibmi") + .withTags(mapOf("yls", "tbzbkiwbuqnyophz")) + .withProperties(new ElasticBackupPolicyProperties().withDailyBackupsToKeep(723884538) + .withWeeklyBackupsToKeep(840919331) + .withMonthlyBackupsToKeep(726767515) .withPolicyState(ElasticBackupPolicyState.DISABLED)); model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyInner.class); - Assertions.assertEquals("ohdjhhflzok", model.location()); - Assertions.assertEquals("xpelnjetagltsx", model.tags().get("atftgzpnpbsw")); - Assertions.assertEquals(728305495, model.properties().dailyBackupsToKeep()); - Assertions.assertEquals(649066801, model.properties().weeklyBackupsToKeep()); - Assertions.assertEquals(619019093, model.properties().monthlyBackupsToKeep()); + Assertions.assertEquals("snvpdibmi", model.location()); + Assertions.assertEquals("tbzbkiwbuqnyophz", model.tags().get("yls")); + Assertions.assertEquals(723884538, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(840919331, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(726767515, model.properties().monthlyBackupsToKeep()); Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.properties().policyState()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyListResultTests.java index ce82b10d9f6a..af9fd54a5e5d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyListResultTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyListResultTests.java @@ -13,14 +13,14 @@ public final class ElasticBackupPolicyListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticBackupPolicyListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"dailyBackupsToKeep\":1330760213,\"weeklyBackupsToKeep\":542903246,\"monthlyBackupsToKeep\":1903197758,\"assignedVolumesCount\":185276287,\"policyState\":\"Disabled\"},\"eTag\":\"oqeq\",\"location\":\"arvlagunbt\",\"tags\":{\"mhyreeudz\":\"bwln\",\"pdqmjxlyyzglgouw\":\"av\",\"qtobaxkjeyt\":\"lmjjyuo\",\"jkwrusnkq\":\"nlb\"},\"id\":\"hsyrqunj\",\"name\":\"hdenxaulk\",\"type\":\"akdkifmjnnawtqab\"},{\"properties\":{\"provisioningState\":\"Failed\",\"dailyBackupsToKeep\":241203841,\"weeklyBackupsToKeep\":1455274641,\"monthlyBackupsToKeep\":644079964,\"assignedVolumesCount\":806366464,\"policyState\":\"Enabled\"},\"eTag\":\"dhlisngwflqqmpi\",\"location\":\"uwnpqxpxiwfcng\",\"tags\":{\"xtmkzjvkviir\":\"asi\"},\"id\":\"gfgrwsdp\",\"name\":\"ra\",\"type\":\"zvzbglbyv\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":2047549854,\"weeklyBackupsToKeep\":547924946,\"monthlyBackupsToKeep\":223173205,\"assignedVolumesCount\":2103940566,\"policyState\":\"Disabled\"},\"eTag\":\"ffm\",\"location\":\"kwfbkgo\",\"tags\":{\"napxbiygnug\":\"opdbydpizqac\",\"lq\":\"knfsmfcttuxuuyil\",\"njhvsujztc\":\"iquvrehm\"},\"id\":\"ytqj\",\"name\":\"w\",\"type\":\"auunfprnjletlx\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":436134303,\"weeklyBackupsToKeep\":2070557844,\"monthlyBackupsToKeep\":453207888,\"assignedVolumesCount\":2066157212,\"policyState\":\"Enabled\"},\"eTag\":\"z\",\"location\":\"nknlqwzdvpi\",\"tags\":{\"jvmtygjbmz\":\"qszdtmaajquhuxyl\",\"yjpmspbpssdfppyo\":\"ospspshckf\",\"rxmunjdxvgln\":\"tieyujtvczkcny\",\"aglqivbgkcvkh\":\"vxlx\"},\"id\":\"zvuqdflvon\",\"name\":\"yp\",\"type\":\"pubcpzgpxtivhjk\"}],\"nextLink\":\"dibgqjxgpnrhgov\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"dailyBackupsToKeep\":150522691,\"weeklyBackupsToKeep\":497291047,\"monthlyBackupsToKeep\":2043467280,\"assignedVolumesCount\":420950795,\"policyState\":\"Disabled\"},\"eTag\":\"gicgaaoepttaq\",\"location\":\"dewemxswv\",\"tags\":{\"jgehkf\":\"nz\",\"xokffqyin\":\"imrt\",\"monstshiyxgve\":\"jqepqwhi\"},\"id\":\"fclduccbirdsv\",\"name\":\"wcobie\",\"type\":\"stmninwjizcilng\"},{\"properties\":{\"provisioningState\":\"Accepted\",\"dailyBackupsToKeep\":1726574705,\"weeklyBackupsToKeep\":847572746,\"monthlyBackupsToKeep\":1249750583,\"assignedVolumesCount\":1767531721,\"policyState\":\"Disabled\"},\"eTag\":\"xlxqzvn\",\"location\":\"sbycucrwnamikz\",\"tags\":{\"ziqgfuh\":\"qbsms\",\"hczznvf\":\"kzruswh\",\"wwixzvumw\":\"ycjsx\"},\"id\":\"xqhndvnoamlds\",\"name\":\"haohdjhhflzokxc\",\"type\":\"xpelnjetagltsx\"},{\"properties\":{\"provisioningState\":\"Creating\",\"dailyBackupsToKeep\":184618447,\"weeklyBackupsToKeep\":1097989023,\"monthlyBackupsToKeep\":1425632159,\"assignedVolumesCount\":1570561230,\"policyState\":\"Disabled\"},\"eTag\":\"floccsrmozih\",\"location\":\"pgawtxxpkyjcxcjx\",\"tags\":{\"gnoxuztrksx\":\"tfmpcycilrmcayk\",\"jtwkjaos\":\"pndfcpfnznt\"},\"id\":\"xuzvoamktcqi\",\"name\":\"smgbzahgxqdl\",\"type\":\"rtltla\"}],\"nextLink\":\"ltzkatbhjmznnb\"}") .toObject(ElasticBackupPolicyListResult.class); - Assertions.assertEquals("arvlagunbt", model.value().get(0).location()); - Assertions.assertEquals("bwln", model.value().get(0).tags().get("mhyreeudz")); - Assertions.assertEquals(1330760213, model.value().get(0).properties().dailyBackupsToKeep()); - Assertions.assertEquals(542903246, model.value().get(0).properties().weeklyBackupsToKeep()); - Assertions.assertEquals(1903197758, model.value().get(0).properties().monthlyBackupsToKeep()); + Assertions.assertEquals("dewemxswv", model.value().get(0).location()); + Assertions.assertEquals("nz", model.value().get(0).tags().get("jgehkf")); + Assertions.assertEquals(150522691, model.value().get(0).properties().dailyBackupsToKeep()); + Assertions.assertEquals(497291047, model.value().get(0).properties().weeklyBackupsToKeep()); + Assertions.assertEquals(2043467280, model.value().get(0).properties().monthlyBackupsToKeep()); Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.value().get(0).properties().policyState()); - Assertions.assertEquals("dibgqjxgpnrhgov", model.nextLink()); + Assertions.assertEquals("ltzkatbhjmznnb", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyPropertiesTests.java index 717410ced817..3ea0d19d1d17 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyPropertiesTests.java @@ -13,24 +13,24 @@ public final class ElasticBackupPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticBackupPolicyProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Patching\",\"dailyBackupsToKeep\":938836666,\"weeklyBackupsToKeep\":1090450036,\"monthlyBackupsToKeep\":1667275200,\"assignedVolumesCount\":1141313452,\"policyState\":\"Enabled\"}") + "{\"provisioningState\":\"Updating\",\"dailyBackupsToKeep\":720310283,\"weeklyBackupsToKeep\":568275135,\"monthlyBackupsToKeep\":1004847883,\"assignedVolumesCount\":1039630790,\"policyState\":\"Enabled\"}") .toObject(ElasticBackupPolicyProperties.class); - Assertions.assertEquals(938836666, model.dailyBackupsToKeep()); - Assertions.assertEquals(1090450036, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1667275200, model.monthlyBackupsToKeep()); + Assertions.assertEquals(720310283, model.dailyBackupsToKeep()); + Assertions.assertEquals(568275135, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1004847883, model.monthlyBackupsToKeep()); Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.policyState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ElasticBackupPolicyProperties model = new ElasticBackupPolicyProperties().withDailyBackupsToKeep(938836666) - .withWeeklyBackupsToKeep(1090450036) - .withMonthlyBackupsToKeep(1667275200) + ElasticBackupPolicyProperties model = new ElasticBackupPolicyProperties().withDailyBackupsToKeep(720310283) + .withWeeklyBackupsToKeep(568275135) + .withMonthlyBackupsToKeep(1004847883) .withPolicyState(ElasticBackupPolicyState.ENABLED); model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyProperties.class); - Assertions.assertEquals(938836666, model.dailyBackupsToKeep()); - Assertions.assertEquals(1090450036, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1667275200, model.monthlyBackupsToKeep()); + Assertions.assertEquals(720310283, model.dailyBackupsToKeep()); + Assertions.assertEquals(568275135, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1004847883, model.monthlyBackupsToKeep()); Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.policyState()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdatePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdatePropertiesTests.java index 2666bfd6b07a..35a1977af3a8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdatePropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdatePropertiesTests.java @@ -13,25 +13,25 @@ public final class ElasticBackupPolicyUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticBackupPolicyUpdateProperties model = BinaryData.fromString( - "{\"dailyBackupsToKeep\":587777042,\"weeklyBackupsToKeep\":1059642687,\"monthlyBackupsToKeep\":422722790,\"policyState\":\"Disabled\"}") + "{\"dailyBackupsToKeep\":1533765363,\"weeklyBackupsToKeep\":1109570414,\"monthlyBackupsToKeep\":1864709283,\"policyState\":\"Enabled\"}") .toObject(ElasticBackupPolicyUpdateProperties.class); - Assertions.assertEquals(587777042, model.dailyBackupsToKeep()); - Assertions.assertEquals(1059642687, model.weeklyBackupsToKeep()); - Assertions.assertEquals(422722790, model.monthlyBackupsToKeep()); - Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.policyState()); + Assertions.assertEquals(1533765363, model.dailyBackupsToKeep()); + Assertions.assertEquals(1109570414, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1864709283, model.monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.policyState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ElasticBackupPolicyUpdateProperties model - = new ElasticBackupPolicyUpdateProperties().withDailyBackupsToKeep(587777042) - .withWeeklyBackupsToKeep(1059642687) - .withMonthlyBackupsToKeep(422722790) - .withPolicyState(ElasticBackupPolicyState.DISABLED); + = new ElasticBackupPolicyUpdateProperties().withDailyBackupsToKeep(1533765363) + .withWeeklyBackupsToKeep(1109570414) + .withMonthlyBackupsToKeep(1864709283) + .withPolicyState(ElasticBackupPolicyState.ENABLED); model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyUpdateProperties.class); - Assertions.assertEquals(587777042, model.dailyBackupsToKeep()); - Assertions.assertEquals(1059642687, model.weeklyBackupsToKeep()); - Assertions.assertEquals(422722790, model.monthlyBackupsToKeep()); - Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.policyState()); + Assertions.assertEquals(1533765363, model.dailyBackupsToKeep()); + Assertions.assertEquals(1109570414, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1864709283, model.monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.policyState()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdateTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdateTests.java index c97efe52efe0..e993e3ea0f1b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdateTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdateTests.java @@ -16,28 +16,28 @@ public final class ElasticBackupPolicyUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticBackupPolicyUpdate model = BinaryData.fromString( - "{\"tags\":{\"t\":\"aykggnoxu\",\"cpfnznthjtwkja\":\"ksxwpnd\",\"tcqiosmg\":\"srxuzvoam\"},\"properties\":{\"dailyBackupsToKeep\":10270964,\"weeklyBackupsToKeep\":1221237045,\"monthlyBackupsToKeep\":348009513,\"policyState\":\"Disabled\"}}") + "{\"tags\":{\"qkc\":\"rsqqwztcm\",\"kjexfdeqvhp\":\"cxwaxfewz\"},\"properties\":{\"dailyBackupsToKeep\":242017566,\"weeklyBackupsToKeep\":635621916,\"monthlyBackupsToKeep\":2045415438,\"policyState\":\"Disabled\"}}") .toObject(ElasticBackupPolicyUpdate.class); - Assertions.assertEquals("aykggnoxu", model.tags().get("t")); - Assertions.assertEquals(10270964, model.properties().dailyBackupsToKeep()); - Assertions.assertEquals(1221237045, model.properties().weeklyBackupsToKeep()); - Assertions.assertEquals(348009513, model.properties().monthlyBackupsToKeep()); + Assertions.assertEquals("rsqqwztcm", model.tags().get("qkc")); + Assertions.assertEquals(242017566, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(635621916, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(2045415438, model.properties().monthlyBackupsToKeep()); Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.properties().policyState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ElasticBackupPolicyUpdate model = new ElasticBackupPolicyUpdate() - .withTags(mapOf("t", "aykggnoxu", "cpfnznthjtwkja", "ksxwpnd", "tcqiosmg", "srxuzvoam")) - .withProperties(new ElasticBackupPolicyUpdateProperties().withDailyBackupsToKeep(10270964) - .withWeeklyBackupsToKeep(1221237045) - .withMonthlyBackupsToKeep(348009513) - .withPolicyState(ElasticBackupPolicyState.DISABLED)); + ElasticBackupPolicyUpdate model + = new ElasticBackupPolicyUpdate().withTags(mapOf("qkc", "rsqqwztcm", "kjexfdeqvhp", "cxwaxfewz")) + .withProperties(new ElasticBackupPolicyUpdateProperties().withDailyBackupsToKeep(242017566) + .withWeeklyBackupsToKeep(635621916) + .withMonthlyBackupsToKeep(2045415438) + .withPolicyState(ElasticBackupPolicyState.DISABLED)); model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyUpdate.class); - Assertions.assertEquals("aykggnoxu", model.tags().get("t")); - Assertions.assertEquals(10270964, model.properties().dailyBackupsToKeep()); - Assertions.assertEquals(1221237045, model.properties().weeklyBackupsToKeep()); - Assertions.assertEquals(348009513, model.properties().monthlyBackupsToKeep()); + Assertions.assertEquals("rsqqwztcm", model.tags().get("qkc")); + Assertions.assertEquals(242017566, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(635621916, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(2045415438, model.properties().monthlyBackupsToKeep()); Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.properties().policyState()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPropertiesTests.java index 0f9744cc07a5..8c9279acf373 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPropertiesTests.java @@ -13,24 +13,24 @@ public final class ElasticBackupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticBackupProperties model = BinaryData.fromString( - "{\"creationDate\":\"2021-08-31T09:53:45Z\",\"snapshotCreationDate\":\"2021-03-17T18:09:46Z\",\"completionDate\":\"2021-04-24T23:59:25Z\",\"provisioningState\":\"Failed\",\"size\":3982074763372331569,\"label\":\"hsqqgvriibakcl\",\"backupType\":\"Scheduled\",\"failureReason\":\"rnxousxauzlwvsg\",\"elasticVolumeResourceId\":\"wohqfzizvu\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"jsvthnwpzteko\",\"elasticBackupPolicyResourceId\":\"ribi\",\"volumeSize\":\"Regular\"}") + "{\"creationDate\":\"2021-11-28T23:19:16Z\",\"snapshotCreationDate\":\"2021-10-30T08:45:06Z\",\"completionDate\":\"2021-12-08T12:55:11Z\",\"provisioningState\":\"Deleting\",\"size\":3083692456009895216,\"label\":\"aulk\",\"backupType\":\"Manual\",\"failureReason\":\"kifmjn\",\"elasticVolumeResourceId\":\"awtqabpxuckpgg\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"yirdhlisngwflqq\",\"elasticBackupPolicyResourceId\":\"izruwnpqxpxiwfc\",\"volumeSize\":\"Large\"}") .toObject(ElasticBackupProperties.class); - Assertions.assertEquals("hsqqgvriibakcl", model.label()); - Assertions.assertEquals("wohqfzizvu", model.elasticVolumeResourceId()); + Assertions.assertEquals("aulk", model.label()); + Assertions.assertEquals("awtqabpxuckpgg", model.elasticVolumeResourceId()); Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, model.snapshotUsage()); - Assertions.assertEquals("jsvthnwpzteko", model.elasticSnapshotResourceId()); + Assertions.assertEquals("yirdhlisngwflqq", model.elasticSnapshotResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ElasticBackupProperties model = new ElasticBackupProperties().withLabel("hsqqgvriibakcl") - .withElasticVolumeResourceId("wohqfzizvu") + ElasticBackupProperties model = new ElasticBackupProperties().withLabel("aulk") + .withElasticVolumeResourceId("awtqabpxuckpgg") .withSnapshotUsage(SnapshotUsage.USE_EXISTING_SNAPSHOT) - .withElasticSnapshotResourceId("jsvthnwpzteko"); + .withElasticSnapshotResourceId("yirdhlisngwflqq"); model = BinaryData.fromObject(model).toObject(ElasticBackupProperties.class); - Assertions.assertEquals("hsqqgvriibakcl", model.label()); - Assertions.assertEquals("wohqfzizvu", model.elasticVolumeResourceId()); + Assertions.assertEquals("aulk", model.label()); + Assertions.assertEquals("awtqabpxuckpgg", model.elasticVolumeResourceId()); Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, model.snapshotUsage()); - Assertions.assertEquals("jsvthnwpzteko", model.elasticSnapshotResourceId()); + Assertions.assertEquals("yirdhlisngwflqq", model.elasticSnapshotResourceId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultInnerTests.java index 640a372745e0..a5cd83926a61 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultInnerTests.java @@ -15,20 +15,20 @@ public final class ElasticBackupVaultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticBackupVaultInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\"},\"eTag\":\"fy\",\"location\":\"gcrpfbcun\",\"tags\":{\"lfwyfwlwxjwetn\":\"cez\",\"rsqqwztcm\":\"sihclafzvaylp\",\"cxwaxfewz\":\"qkc\"},\"id\":\"kjexfdeqvhp\",\"name\":\"ylkkshkbffmbm\",\"type\":\"zjrgyww\"}") + "{\"properties\":{\"provisioningState\":\"Deleting\"},\"eTag\":\"ixynllxecwcrojp\",\"location\":\"lhc\",\"tags\":{\"i\":\"u\",\"tzh\":\"dwfmvigorqjb\",\"juj\":\"aglkafhon\",\"cpopmxel\":\"ickpz\"},\"id\":\"wcltyjede\",\"name\":\"xm\",\"type\":\"f\"}") .toObject(ElasticBackupVaultInner.class); - Assertions.assertEquals("gcrpfbcun", model.location()); - Assertions.assertEquals("cez", model.tags().get("lfwyfwlwxjwetn")); + Assertions.assertEquals("lhc", model.location()); + Assertions.assertEquals("u", model.tags().get("i")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ElasticBackupVaultInner model = new ElasticBackupVaultInner().withLocation("gcrpfbcun") - .withTags(mapOf("lfwyfwlwxjwetn", "cez", "rsqqwztcm", "sihclafzvaylp", "cxwaxfewz", "qkc")) + ElasticBackupVaultInner model = new ElasticBackupVaultInner().withLocation("lhc") + .withTags(mapOf("i", "u", "tzh", "dwfmvigorqjb", "juj", "aglkafhon", "cpopmxel", "ickpz")) .withProperties(new ElasticBackupVaultProperties()); model = BinaryData.fromObject(model).toObject(ElasticBackupVaultInner.class); - Assertions.assertEquals("gcrpfbcun", model.location()); - Assertions.assertEquals("cez", model.tags().get("lfwyfwlwxjwetn")); + Assertions.assertEquals("lhc", model.location()); + Assertions.assertEquals("u", model.tags().get("i")); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultListResultTests.java index 2e7e65a0c34f..08e44f1f3f26 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultListResultTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultListResultTests.java @@ -12,10 +12,10 @@ public final class ElasticBackupVaultListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticBackupVaultListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Patching\"},\"eTag\":\"elfclducc\",\"location\":\"rds\",\"tags\":{\"i\":\"cobiegstmninwjiz\",\"tbxqmuluxlxq\":\"nghgshej\"},\"id\":\"vnersbycucrw\",\"name\":\"amikzebrqbsm\",\"type\":\"wziqgfuhokzr\"}],\"nextLink\":\"whvhczznvfb\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\"},\"eTag\":\"xyasflvgsgzw\",\"location\":\"akoi\",\"tags\":{\"otqyry\":\"smjblmljhlnym\",\"tayx\":\"zcbmqqvxmvwf\"},\"id\":\"nsup\",\"name\":\"ujlzqnhcvsqltn\",\"type\":\"oibgsxg\"},{\"properties\":{\"provisioningState\":\"Creating\"},\"eTag\":\"onmpqoxwdof\",\"location\":\"xiqxeiiqbimh\",\"tags\":{\"vwbcblembnkbwv\":\"winhehfqpo\",\"uwfmduragegizvc\":\"vxkdivqihebwtswb\"},\"id\":\"felisdjub\",\"name\":\"gbqi\",\"type\":\"kxkbsazgakgacyr\"}],\"nextLink\":\"jdmspofapvuhryln\"}") .toObject(ElasticBackupVaultListResult.class); - Assertions.assertEquals("rds", model.value().get(0).location()); - Assertions.assertEquals("cobiegstmninwjiz", model.value().get(0).tags().get("i")); - Assertions.assertEquals("whvhczznvfb", model.nextLink()); + Assertions.assertEquals("akoi", model.value().get(0).location()); + Assertions.assertEquals("smjblmljhlnym", model.value().get(0).tags().get("otqyry")); + Assertions.assertEquals("jdmspofapvuhryln", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultPropertiesTests.java index 151d2f1fa6cf..5a48b8924484 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultPropertiesTests.java @@ -10,8 +10,8 @@ public final class ElasticBackupVaultPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ElasticBackupVaultProperties model = BinaryData.fromString("{\"provisioningState\":\"Accepted\"}") - .toObject(ElasticBackupVaultProperties.class); + ElasticBackupVaultProperties model + = BinaryData.fromString("{\"provisioningState\":\"Moving\"}").toObject(ElasticBackupVaultProperties.class); } @org.junit.jupiter.api.Test diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultUpdateTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultUpdateTests.java index 99fb21f92b10..1918fb936b69 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultUpdateTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultUpdateTests.java @@ -13,18 +13,18 @@ public final class ElasticBackupVaultUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ElasticBackupVaultUpdate model = BinaryData.fromString( - "{\"tags\":{\"gaao\":\"nptfujgi\",\"wemxswvruunzz\":\"pttaqutd\",\"yinljqe\":\"gehkfkimrtixokff\",\"onsts\":\"qwhix\"}}") - .toObject(ElasticBackupVaultUpdate.class); - Assertions.assertEquals("nptfujgi", model.tags().get("gaao")); + ElasticBackupVaultUpdate model + = BinaryData.fromString("{\"tags\":{\"z\":\"azuawx\",\"xcushs\":\"puamwabzxr\"}}") + .toObject(ElasticBackupVaultUpdate.class); + Assertions.assertEquals("azuawx", model.tags().get("z")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ElasticBackupVaultUpdate model = new ElasticBackupVaultUpdate().withTags( - mapOf("gaao", "nptfujgi", "wemxswvruunzz", "pttaqutd", "yinljqe", "gehkfkimrtixokff", "onsts", "qwhix")); + ElasticBackupVaultUpdate model + = new ElasticBackupVaultUpdate().withTags(mapOf("z", "azuawx", "xcushs", "puamwabzxr")); model = BinaryData.fromObject(model).toObject(ElasticBackupVaultUpdate.class); - Assertions.assertEquals("nptfujgi", model.tags().get("gaao")); + Assertions.assertEquals("azuawx", model.tags().get("z")); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateMockTests.java index 5c0bb5d9e1d5..900bc0f2b57f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateMockTests.java @@ -24,7 +24,7 @@ public final class ElasticBackupVaultsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"eTag\":\"fgjblcd\",\"location\":\"yfcemftz\",\"tags\":{\"ugekdfqn\":\"kya\",\"owrczfjjnnuxxr\":\"ttw\",\"frhjulrsulwzp\":\"kmhmnulwempdc\"},\"id\":\"lusnawmhhgzotfr\",\"name\":\"yrgkoekv\",\"type\":\"wxxyxhighctx\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"eTag\":\"khcqtwmlmhj\",\"location\":\"tqeahje\",\"tags\":{\"hhkvguavtptbk\":\"agpokddxe\"},\"id\":\"wkqyns\",\"name\":\"gbvoffbkk\",\"type\":\"vdxaexqokmyrljia\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,15 +34,15 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ElasticBackupVault response = manager.elasticBackupVaults() - .define("mhsurlgwqkpmm") - .withRegion("awi") - .withExistingElasticAccount("pihtdmiwjekpt", "caydbjzcqymlcfnz") - .withTags(mapOf("vvjhvvlrlohewjj", "oms", "kzfzqxjosho", "ajnkdflqionswae")) + .define("clibbfqpsp") + .withRegion("exzgpmnmabedd") + .withExistingElasticAccount("mvpsimioyo", "glkmiqwnnr") + .withTags(mapOf("fpfqf", "wg", "xbsmtbljje", "cvstclgqrvwerf", "kwdvbtb", "hci", "htfpwpqb", "ekqhs")) .withProperties(new ElasticBackupVaultProperties()) .create(); - Assertions.assertEquals("yfcemftz", response.location()); - Assertions.assertEquals("kya", response.tags().get("ugekdfqn")); + Assertions.assertEquals("tqeahje", response.location()); + Assertions.assertEquals("agpokddxe", response.tags().get("hhkvguavtptbk")); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetWithResponseMockTests.java index acb5a7cf6358..89c978ed0431 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class ElasticBackupVaultsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"eTag\":\"khnjcmrnkfm\",\"location\":\"cqtwmlmhjnqtq\",\"tags\":{\"dvragpokddxejhh\":\"j\"},\"id\":\"vgua\",\"name\":\"tpt\",\"type\":\"k\"}"; + = "{\"properties\":{\"provisioningState\":\"Patching\"},\"eTag\":\"oxinh\",\"location\":\"eoh\",\"tags\":{\"nzangprbfaxy\":\"lpuzjpcee\"},\"id\":\"zlbciphmse\",\"name\":\"roqr\",\"type\":\"dktxfv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ElasticBackupVault response = manager.elasticBackupVaults() - .getWithResponse("htfpwpqb", "ejuwyqwdqigmghgi", "z", com.azure.core.util.Context.NONE) + .getWithResponse("mhzcgkrepdqh", "yhwqw", "mvxqab", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("cqtwmlmhjnqtq", response.location()); - Assertions.assertEquals("j", response.tags().get("dvragpokddxejhh")); + Assertions.assertEquals("eoh", response.location()); + Assertions.assertEquals("lpuzjpcee", response.tags().get("nzangprbfaxy")); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountMockTests.java index a08da1a65b11..bf94c9df8be0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountMockTests.java @@ -22,7 +22,7 @@ public final class ElasticBackupVaultsListByElasticAccountMockTests { @Test public void testListByElasticAccount() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\"},\"eTag\":\"exqokmy\",\"location\":\"jialz\",\"tags\":{\"yudivbxnhsqeaeo\":\"brqlpbcjtrpz\",\"ogatmoljiy\":\"qelwgdhuruzytza\"},\"id\":\"mpinmzvfkneerzzt\",\"name\":\"knsjulugd\",\"type\":\"bnhrxlelfjhkeiz\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Patching\"},\"eTag\":\"xx\",\"location\":\"wzkyf\",\"tags\":{\"eiicrmpepkl\":\"piw\",\"acwras\":\"maxxijvskwsdgkjg\",\"o\":\"kwefc\",\"qicladv\":\"nwoqartwy\"},\"id\":\"tdavuqmcbymsfobj\",\"name\":\"quvjez\",\"type\":\"j\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testListByElasticAccount() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<ElasticBackupVault> response = manager.elasticBackupVaults() - .listByElasticAccount("wkqyns", "gbvoffbkk", com.azure.core.util.Context.NONE); + PagedIterable<ElasticBackupVault> response + = manager.elasticBackupVaults().listByElasticAccount("nfee", "gpkrie", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jialz", response.iterator().next().location()); - Assertions.assertEquals("brqlpbcjtrpz", response.iterator().next().tags().get("yudivbxnhsqeaeo")); + Assertions.assertEquals("wzkyf", response.iterator().next().location()); + Assertions.assertEquals("piw", response.iterator().next().tags().get("eiicrmpepkl")); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateMockTests.java index 8550450fbb06..1bd88b290a42 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateMockTests.java @@ -23,7 +23,7 @@ public final class ElasticBackupsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"creationDate\":\"2021-01-04T21:22:26Z\",\"snapshotCreationDate\":\"2021-01-11T03:04:48Z\",\"completionDate\":\"2021-10-01T19:18:10Z\",\"provisioningState\":\"Succeeded\",\"size\":8249667917791476999,\"label\":\"gyb\",\"backupType\":\"Scheduled\",\"failureReason\":\"ok\",\"elasticVolumeResourceId\":\"cvgllixdg\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"wewqkj\",\"elasticBackupPolicyResourceId\":\"prwpxsoohu\",\"volumeSize\":\"Large\"},\"id\":\"skl\",\"name\":\"e\",\"type\":\"uugggzlfbgrd\"}"; + = "{\"properties\":{\"creationDate\":\"2021-01-12T00:46:39Z\",\"snapshotCreationDate\":\"2021-04-20T08:36:26Z\",\"completionDate\":\"2021-06-30T23:29:01Z\",\"provisioningState\":\"Succeeded\",\"size\":2475720744236639475,\"label\":\"vrdnyeitaneq\",\"backupType\":\"Manual\",\"failureReason\":\"zjahwriuomz\",\"elasticVolumeResourceId\":\"zfkiceevsaaxwsp\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"khfjqebglcxkx\",\"elasticBackupPolicyResourceId\":\"zromvygys\",\"volumeSize\":\"Large\"},\"id\":\"esrfsvpinkzpatq\",\"name\":\"diswxspvckojazb\",\"type\":\"gspftesu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,17 +33,17 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ElasticBackup response = manager.elasticBackups() - .define("rf") - .withExistingElasticBackupVault("zbbgspftesubzpvp", "dylytcovq", "eu") - .withProperties(new ElasticBackupProperties().withLabel("oswkjmdihdcyyyzl") - .withElasticVolumeResourceId("dq") + .define("ijmri") + .withExistingElasticBackupVault("gv", "ukhsusmmorf", "zhwilzzh") + .withProperties(new ElasticBackupProperties().withLabel("ivcbkutpumltwj") + .withElasticVolumeResourceId("njc") .withSnapshotUsage(SnapshotUsage.USE_EXISTING_SNAPSHOT) - .withElasticSnapshotResourceId("zrtftedzuubjt")) + .withElasticSnapshotResourceId("cg")) .create(); - Assertions.assertEquals("gyb", response.properties().label()); - Assertions.assertEquals("cvgllixdg", response.properties().elasticVolumeResourceId()); + Assertions.assertEquals("vrdnyeitaneq", response.properties().label()); + Assertions.assertEquals("zfkiceevsaaxwsp", response.properties().elasticVolumeResourceId()); Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, response.properties().snapshotUsage()); - Assertions.assertEquals("wewqkj", response.properties().elasticSnapshotResourceId()); + Assertions.assertEquals("khfjqebglcxkx", response.properties().elasticSnapshotResourceId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetWithResponseMockTests.java index 793f353074e3..f29db0fcd269 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class ElasticBackupsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"creationDate\":\"2021-07-26T03:35:57Z\",\"snapshotCreationDate\":\"2021-10-31T04:55:48Z\",\"completionDate\":\"2021-02-16T19:10:49Z\",\"provisioningState\":\"Failed\",\"size\":8652575046836549967,\"label\":\"iprlkdneyttlrcxi\",\"backupType\":\"Manual\",\"failureReason\":\"utpum\",\"elasticVolumeResourceId\":\"twjfluxynbp\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"ywauyqnjckhm\",\"elasticBackupPolicyResourceId\":\"gjs\",\"volumeSize\":\"Regular\"},\"id\":\"a\",\"name\":\"hwvixqqggljkybsj\",\"type\":\"clrvtzqnrbctbh\"}"; + = "{\"properties\":{\"creationDate\":\"2021-08-25T05:18:22Z\",\"snapshotCreationDate\":\"2021-05-11T11:28:26Z\",\"completionDate\":\"2021-05-16T10:37:18Z\",\"provisioningState\":\"Creating\",\"size\":972369389840653357,\"label\":\"cjzlquzexokjxebj\",\"backupType\":\"Scheduled\",\"failureReason\":\"n\",\"elasticVolumeResourceId\":\"abwmvogljsv\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"dnw\",\"elasticBackupPolicyResourceId\":\"haqidoyzltgiomqo\",\"volumeSize\":\"Regular\"},\"id\":\"iaeapfs\",\"name\":\"rgdtpeqnacyheqw\",\"type\":\"pqqncju\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ElasticBackup response = manager.elasticBackups() - .getWithResponse("qsratjhd", "zybspijhfrzgdkk", "gv", "ukhsusmmorf", com.azure.core.util.Context.NONE) + .getWithResponse("dcdjhunh", "hcgawn", "rnquoxso", "ireimseobf", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("iprlkdneyttlrcxi", response.properties().label()); - Assertions.assertEquals("twjfluxynbp", response.properties().elasticVolumeResourceId()); + Assertions.assertEquals("cjzlquzexokjxebj", response.properties().label()); + Assertions.assertEquals("abwmvogljsv", response.properties().elasticVolumeResourceId()); Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, response.properties().snapshotUsage()); - Assertions.assertEquals("ywauyqnjckhm", response.properties().elasticSnapshotResourceId()); + Assertions.assertEquals("dnw", response.properties().elasticSnapshotResourceId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultMockTests.java index d9f9f3e160e9..d0e0d885a5c6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultMockTests.java @@ -23,7 +23,7 @@ public final class ElasticBackupsListByVaultMockTests { @Test public void testListByVault() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"creationDate\":\"2021-01-18T17:27Z\",\"snapshotCreationDate\":\"2021-06-09T13:57:22Z\",\"completionDate\":\"2021-08-06T05:27:22Z\",\"provisioningState\":\"Failed\",\"size\":6729774136192573822,\"label\":\"iuomzczfkiceevs\",\"backupType\":\"Scheduled\",\"failureReason\":\"spcaxi\",\"elasticVolumeResourceId\":\"hfjqebglcxkxgz\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"vygys\",\"elasticBackupPolicyResourceId\":\"tme\",\"volumeSize\":\"Large\"},\"id\":\"vpinkzpatqt\",\"name\":\"iswxspv\",\"type\":\"koj\"}]}"; + = "{\"value\":[{\"properties\":{\"creationDate\":\"2021-07-31T02:13:17Z\",\"snapshotCreationDate\":\"2021-10-14T02:29:27Z\",\"completionDate\":\"2021-10-28T03:44:44Z\",\"provisioningState\":\"Accepted\",\"size\":7631833992222466193,\"label\":\"sejb\",\"backupType\":\"Manual\",\"failureReason\":\"aieswhddzy\",\"elasticVolumeResourceId\":\"isnuepywyjln\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"ottdiiaocqibzj\",\"elasticBackupPolicyResourceId\":\"weebiphryv\",\"volumeSize\":\"Regular\"},\"id\":\"w\",\"name\":\"qsratjhd\",\"type\":\"zybspijhfrzgdkk\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,12 +33,12 @@ public void testListByVault() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ElasticBackup> response - = manager.elasticBackups().listByVault("jhxpcvrd", "y", "it", com.azure.core.util.Context.NONE); + = manager.elasticBackups().listByVault("khjoz", "ymc", "m", com.azure.core.util.Context.NONE); - Assertions.assertEquals("iuomzczfkiceevs", response.iterator().next().properties().label()); - Assertions.assertEquals("hfjqebglcxkxgz", response.iterator().next().properties().elasticVolumeResourceId()); + Assertions.assertEquals("sejb", response.iterator().next().properties().label()); + Assertions.assertEquals("isnuepywyjln", response.iterator().next().properties().elasticVolumeResourceId()); Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, response.iterator().next().properties().snapshotUsage()); - Assertions.assertEquals("vygys", response.iterator().next().properties().elasticSnapshotResourceId()); + Assertions.assertEquals("ottdiiaocqibzj", response.iterator().next().properties().elasticSnapshotResourceId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilityWithResponseMockTests.java index 17c02d59d8e0..0aaf60b1ffe6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilityWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilityWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class ElasticCapacityPoolsCheckVolumeFilePathAvailabilityWithResponseMockTests { @Test public void testCheckVolumeFilePathAvailabilityWithResponse() throws Exception { - String responseStr = "{\"isAvailable\":\"False\",\"reason\":\"Invalid\",\"message\":\"kdidjc\"}"; + String responseStr = "{\"isAvailable\":\"False\",\"reason\":\"Invalid\",\"message\":\"wuzowpuoh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,13 @@ public void testCheckVolumeFilePathAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CheckElasticResourceAvailabilityResponse response = manager.elasticCapacityPools() - .checkVolumeFilePathAvailabilityWithResponse("rt", "zkg", "eboywhczzqrhm", - new CheckElasticVolumeFilePathAvailabilityRequest().withFilePath("gqbedygi"), + .checkVolumeFilePathAvailabilityWithResponse("q", "ibmq", "miymqruqguhfupet", + new CheckElasticVolumeFilePathAvailabilityRequest().withFilePath("svvoqsbpkflanfk"), com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(CheckElasticResourceAvailabilityStatus.FALSE, response.isAvailable()); Assertions.assertEquals(CheckElasticResourceAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("kdidjc", response.message()); + Assertions.assertEquals("wuzowpuoh", response.message()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticEncryptionIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticEncryptionIdentityTests.java index c339e6cb3a45..2aab62408289 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticEncryptionIdentityTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticEncryptionIdentityTests.java @@ -12,15 +12,15 @@ public final class ElasticEncryptionIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticEncryptionIdentity model - = BinaryData.fromString("{\"principalId\":\"p\",\"userAssignedIdentity\":\"qyikvy\"}") + = BinaryData.fromString("{\"principalId\":\"jbkkdmflvestmjl\",\"userAssignedIdentity\":\"ril\"}") .toObject(ElasticEncryptionIdentity.class); - Assertions.assertEquals("qyikvy", model.userAssignedIdentity()); + Assertions.assertEquals("ril", model.userAssignedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ElasticEncryptionIdentity model = new ElasticEncryptionIdentity().withUserAssignedIdentity("qyikvy"); + ElasticEncryptionIdentity model = new ElasticEncryptionIdentity().withUserAssignedIdentity("ril"); model = BinaryData.fromObject(model).toObject(ElasticEncryptionIdentity.class); - Assertions.assertEquals("qyikvy", model.userAssignedIdentity()); + Assertions.assertEquals("ril", model.userAssignedIdentity()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyRuleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyRuleTests.java index cc4c731727c0..7ac71738e0a7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyRuleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyRuleTests.java @@ -17,30 +17,30 @@ public final class ElasticExportPolicyRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticExportPolicyRule model = BinaryData.fromString( - "{\"ruleIndex\":2065118929,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"un\",\"ixxrtikvcpw\"],\"rootAccess\":\"Disabled\"}") + "{\"ruleIndex\":541453589,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"h\",\"hujswtwkozzwcul\",\"bawpfajnjwltlwt\",\"j\"],\"rootAccess\":\"Disabled\"}") .toObject(ElasticExportPolicyRule.class); - Assertions.assertEquals(2065118929, model.ruleIndex()); - Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, model.unixAccessRule()); - Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.nfsv3()); + Assertions.assertEquals(541453589, model.ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, model.unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.nfsv3()); Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.nfsv4()); - Assertions.assertEquals("un", model.allowedClients().get(0)); + Assertions.assertEquals("h", model.allowedClients().get(0)); Assertions.assertEquals(ElasticRootAccess.DISABLED, model.rootAccess()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ElasticExportPolicyRule model = new ElasticExportPolicyRule().withRuleIndex(2065118929) - .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) - .withNfsv3(ElasticNfsv3Access.DISABLED) + ElasticExportPolicyRule model = new ElasticExportPolicyRule().withRuleIndex(541453589) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.ENABLED) .withNfsv4(ElasticNfsv4Access.DISABLED) - .withAllowedClients(Arrays.asList("un", "ixxrtikvcpw")) + .withAllowedClients(Arrays.asList("h", "hujswtwkozzwcul", "bawpfajnjwltlwt", "j")) .withRootAccess(ElasticRootAccess.DISABLED); model = BinaryData.fromObject(model).toObject(ElasticExportPolicyRule.class); - Assertions.assertEquals(2065118929, model.ruleIndex()); - Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, model.unixAccessRule()); - Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.nfsv3()); + Assertions.assertEquals(541453589, model.ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, model.unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.nfsv3()); Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.nfsv4()); - Assertions.assertEquals("un", model.allowedClients().get(0)); + Assertions.assertEquals("h", model.allowedClients().get(0)); Assertions.assertEquals(ElasticRootAccess.DISABLED, model.rootAccess()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyTests.java index 31a85bd3b57c..febfd5a9c9d8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyTests.java @@ -18,49 +18,31 @@ public final class ElasticExportPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticExportPolicy model = BinaryData.fromString( - "{\"rules\":[{\"ruleIndex\":184744012,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"k\",\"xukuqgsj\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1638200879,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"hzjhf\",\"mhv\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":1913497059,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"vmhfbuz\",\"yihsasbhudypohyu\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":900133726,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"obrltt\",\"msjnygqdnfw\",\"zdzgtilaxhnfhqly\"],\"rootAccess\":\"Enabled\"}]}") + "{\"rules\":[{\"ruleIndex\":564299595,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"ztmoobklftidg\",\"cwq\"],\"rootAccess\":\"Enabled\"}]}") .toObject(ElasticExportPolicy.class); - Assertions.assertEquals(184744012, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(564299595, model.rules().get(0).ruleIndex()); Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, model.rules().get(0).unixAccessRule()); Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.rules().get(0).nfsv3()); Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.rules().get(0).nfsv4()); - Assertions.assertEquals("k", model.rules().get(0).allowedClients().get(0)); - Assertions.assertEquals(ElasticRootAccess.DISABLED, model.rules().get(0).rootAccess()); + Assertions.assertEquals("ztmoobklftidg", model.rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.rules().get(0).rootAccess()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ElasticExportPolicy model = new ElasticExportPolicy().withRules(Arrays.asList( - new ElasticExportPolicyRule().withRuleIndex(184744012) + ElasticExportPolicy model + = new ElasticExportPolicy().withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(564299595) .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) .withNfsv3(ElasticNfsv3Access.ENABLED) .withNfsv4(ElasticNfsv4Access.DISABLED) - .withAllowedClients(Arrays.asList("k", "xukuqgsj")) - .withRootAccess(ElasticRootAccess.DISABLED), - new ElasticExportPolicyRule().withRuleIndex(1638200879) - .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) - .withNfsv3(ElasticNfsv3Access.ENABLED) - .withNfsv4(ElasticNfsv4Access.DISABLED) - .withAllowedClients(Arrays.asList("hzjhf", "mhv")) - .withRootAccess(ElasticRootAccess.ENABLED), - new ElasticExportPolicyRule().withRuleIndex(1913497059) - .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) - .withNfsv3(ElasticNfsv3Access.ENABLED) - .withNfsv4(ElasticNfsv4Access.ENABLED) - .withAllowedClients(Arrays.asList("vmhfbuz", "yihsasbhudypohyu")) - .withRootAccess(ElasticRootAccess.DISABLED), - new ElasticExportPolicyRule().withRuleIndex(900133726) - .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) - .withNfsv3(ElasticNfsv3Access.DISABLED) - .withNfsv4(ElasticNfsv4Access.ENABLED) - .withAllowedClients(Arrays.asList("obrltt", "msjnygqdnfw", "zdzgtilaxhnfhqly")) + .withAllowedClients(Arrays.asList("ztmoobklftidg", "cwq")) .withRootAccess(ElasticRootAccess.ENABLED))); model = BinaryData.fromObject(model).toObject(ElasticExportPolicy.class); - Assertions.assertEquals(184744012, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(564299595, model.rules().get(0).ruleIndex()); Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, model.rules().get(0).unixAccessRule()); Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.rules().get(0).nfsv3()); Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.rules().get(0).nfsv4()); - Assertions.assertEquals("k", model.rules().get(0).allowedClients().get(0)); - Assertions.assertEquals(ElasticRootAccess.DISABLED, model.rules().get(0).rootAccess()); + Assertions.assertEquals("ztmoobklftidg", model.rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.rules().get(0).rootAccess()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticMountTargetPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticMountTargetPropertiesTests.java index 91ad6b2c125d..f82cd50d461c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticMountTargetPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticMountTargetPropertiesTests.java @@ -10,7 +10,8 @@ public final class ElasticMountTargetPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ElasticMountTargetProperties model = BinaryData.fromString("{\"ipAddress\":\"rc\",\"smbServerFqdn\":\"tso\"}") - .toObject(ElasticMountTargetProperties.class); + ElasticMountTargetProperties model + = BinaryData.fromString("{\"ipAddress\":\"alhsnvkc\",\"smbServerFqdn\":\"xzrpo\"}") + .toObject(ElasticMountTargetProperties.class); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotInnerTests.java index 24201c4efd6d..6c2527b1c503 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotInnerTests.java @@ -12,7 +12,7 @@ public final class ElasticSnapshotInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticSnapshotInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Deleting\"},\"id\":\"sjuivfcdisyir\",\"name\":\"xzhczexrxz\",\"type\":\"ujrtrhqvwr\"}") + "{\"properties\":{\"provisioningState\":\"Patching\"},\"id\":\"zakakankjpdn\",\"name\":\"zhajoylhjlmuo\",\"type\":\"xprimrsop\"}") .toObject(ElasticSnapshotInner.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotListResultTests.java index 17a8af09f16e..f2fedee4111b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotListResultTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotListResultTests.java @@ -12,8 +12,8 @@ public final class ElasticSnapshotListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticSnapshotListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\"},\"id\":\"zonzlrpiqywnc\",\"name\":\"jtszcof\",\"type\":\"zehtdhgb\"}],\"nextLink\":\"vreljea\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\"},\"id\":\"slstvasy\",\"name\":\"wxdzaumweoohgu\",\"type\":\"fuzboyjathwtzolb\"},{\"properties\":{\"provisioningState\":\"Accepted\"},\"id\":\"dxmeb\",\"name\":\"jscjpahl\",\"type\":\"veabfqxnmwmqtib\"},{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"dt\",\"name\":\"qcttadijaeukmrsi\",\"type\":\"ekpndzaapmudq\"},{\"properties\":{\"provisioningState\":\"Creating\"},\"id\":\"gp\",\"name\":\"bu\",\"type\":\"qwyxebeybpm\"}],\"nextLink\":\"nrtffyaqi\"}") .toObject(ElasticSnapshotListResult.class); - Assertions.assertEquals("vreljea", model.nextLink()); + Assertions.assertEquals("nrtffyaqi", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateMockTests.java index 068db793f0b0..274be85636e3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateMockTests.java @@ -31,7 +31,7 @@ public final class ElasticSnapshotPoliciesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":2011594703,\"minute\":1431475477},\"dailySchedule\":{\"snapshotsToKeep\":872769595,\"hour\":220731180,\"minute\":1646358527},\"weeklySchedule\":{\"snapshotsToKeep\":123451644,\"days\":[\"Wednesday\",\"Wednesday\",\"Friday\"],\"hour\":2017295107,\"minute\":24417526},\"monthlySchedule\":{\"snapshotsToKeep\":1828081112,\"daysOfMonth\":[618494992,1405140229,1291070676],\"hour\":1441331556,\"minute\":1322278146},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"zcjumvpsimioyoig\",\"location\":\"miqwnnrac\",\"tags\":{\"nhautwukexzgpmnm\":\"bfqpspkladyd\",\"dqilwgdfpf\":\"be\",\"xbsmtbljje\":\"fpcvstclgqrvwerf\"},\"id\":\"hci\",\"name\":\"kwdvbtb\",\"type\":\"ekqhs\"}"; + = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":51854067,\"minute\":1911144734},\"dailySchedule\":{\"snapshotsToKeep\":417743478,\"hour\":139402226,\"minute\":1136445930},\"weeklySchedule\":{\"snapshotsToKeep\":118570909,\"days\":[\"Wednesday\",\"Tuesday\"],\"hour\":910659268,\"minute\":483104060},\"monthlySchedule\":{\"snapshotsToKeep\":1598637943,\"daysOfMonth\":[417627544,1799176002,1634264020,1009194901],\"hour\":1559128353,\"minute\":821311195},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"otvmrxk\",\"location\":\"obvvjbhvh\",\"tags\":{\"dtelvhyibdrqrs\":\"ayfluiyuosnu\",\"owtjo\":\"hbuubpy\"},\"id\":\"ztfwfqchvcz\",\"name\":\"vjnn\",\"type\":\"tagfyvrtpqp\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -41,43 +41,44 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ElasticSnapshotPolicy response = manager.elasticSnapshotPolicies() - .define("yhwqw") - .withRegion("exroqrndkt") - .withExistingElasticAccount("tagfyvrtpqp", "mhzcgkrepdqh") - .withTags(mapOf("rietbg", "onfeeqgp", "wwzkyf", "ixx", "e", "nwpiwxeiicrm")) + .define("ezoell") + .withRegion("qk") + .withExistingElasticAccount("sdzhgbdgzpagsec", "adbuwqrgxfllmqiy") + .withTags(mapOf("epdxcltuubwyvpj", "mxkqvf", "fbwljavhuerkjdd", "owcpjqduqgixexky", "liegftcvbi", "r")) .withProperties(new ElasticSnapshotPolicyProperties() .withHourlySchedule( - new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(916773179).withMinute(1291774565)) - .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(608262144) - .withHour(119882855) - .withMinute(579634773)) - .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1218068854) - .withDays(Arrays.asList(DayOfWeek.TUESDAY)) - .withHour(249447669) - .withMinute(1337837190)) - .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(727753958) - .withDaysOfMonth(Arrays.asList(442922870, 1490108927)) - .withHour(1011125497) - .withMinute(1186722301)) + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(1642549940).withMinute(149979045)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(2076652434) + .withHour(1064637705) + .withMinute(1645220231)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1911691167) + .withDays( + Arrays.asList(DayOfWeek.WEDNESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.MONDAY)) + .withHour(1849251777) + .withMinute(159124168)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(458062227) + .withDaysOfMonth(Arrays.asList(788439044, 975112999, 870184100, 893601413)) + .withHour(1369135142) + .withMinute(807351833)) .withPolicyStatus(PolicyStatus.DISABLED)) .create(); - Assertions.assertEquals("miqwnnrac", response.location()); - Assertions.assertEquals("bfqpspkladyd", response.tags().get("nhautwukexzgpmnm")); - Assertions.assertEquals(2011594703, response.properties().hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1431475477, response.properties().hourlySchedule().minute()); - Assertions.assertEquals(872769595, response.properties().dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(220731180, response.properties().dailySchedule().hour()); - Assertions.assertEquals(1646358527, response.properties().dailySchedule().minute()); - Assertions.assertEquals(123451644, response.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("obvvjbhvh", response.location()); + Assertions.assertEquals("ayfluiyuosnu", response.tags().get("dtelvhyibdrqrs")); + Assertions.assertEquals(51854067, response.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1911144734, response.properties().hourlySchedule().minute()); + Assertions.assertEquals(417743478, response.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(139402226, response.properties().dailySchedule().hour()); + Assertions.assertEquals(1136445930, response.properties().dailySchedule().minute()); + Assertions.assertEquals(118570909, response.properties().weeklySchedule().snapshotsToKeep()); Assertions.assertEquals(DayOfWeek.WEDNESDAY, response.properties().weeklySchedule().days().get(0)); - Assertions.assertEquals(2017295107, response.properties().weeklySchedule().hour()); - Assertions.assertEquals(24417526, response.properties().weeklySchedule().minute()); - Assertions.assertEquals(1828081112, response.properties().monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals(618494992, response.properties().monthlySchedule().daysOfMonth().get(0)); - Assertions.assertEquals(1441331556, response.properties().monthlySchedule().hour()); - Assertions.assertEquals(1322278146, response.properties().monthlySchedule().minute()); - Assertions.assertEquals(PolicyStatus.DISABLED, response.properties().policyStatus()); + Assertions.assertEquals(910659268, response.properties().weeklySchedule().hour()); + Assertions.assertEquals(483104060, response.properties().weeklySchedule().minute()); + Assertions.assertEquals(1598637943, response.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(417627544, response.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1559128353, response.properties().monthlySchedule().hour()); + Assertions.assertEquals(821311195, response.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, response.properties().policyStatus()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetWithResponseMockTests.java index bf3234fd70fc..b6b942e18837 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class ElasticSnapshotPoliciesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1796310561,\"minute\":1167474668},\"dailySchedule\":{\"snapshotsToKeep\":917160525,\"hour\":2008202977,\"minute\":534942759},\"weeklySchedule\":{\"snapshotsToKeep\":385248466,\"days\":[\"Friday\",\"Friday\",\"Thursday\"],\"hour\":1891390759,\"minute\":1073689854},\"monthlySchedule\":{\"snapshotsToKeep\":805396639,\"daysOfMonth\":[456970353],\"hour\":1625333661,\"minute\":2097746238},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Moving\"},\"eTag\":\"kl\",\"location\":\"etatlakf\",\"tags\":{\"bvtooxrpogwp\":\"xwgiks\",\"bfntumeezbxvq\":\"chgjtnhtukfacih\",\"sgomtmjz\":\"bnuvwcg\",\"mkkhtgfredml\":\"xuqgovsxpwwztj\"},\"id\":\"cgrllc\",\"name\":\"na\",\"type\":\"vjowazhpabac\"}"; + = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1132932297,\"minute\":606699153},\"dailySchedule\":{\"snapshotsToKeep\":365963820,\"hour\":1138228089,\"minute\":1712906594},\"weeklySchedule\":{\"snapshotsToKeep\":631387902,\"days\":[\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\"],\"hour\":1535593960,\"minute\":58502725},\"monthlySchedule\":{\"snapshotsToKeep\":1965722229,\"daysOfMonth\":[1685076909,1078093477,613008462,1521221311],\"hour\":1466557095,\"minute\":225171898},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Deleting\"},\"eTag\":\"rklzmijajwolxfs\",\"location\":\"ghmp\",\"tags\":{\"bxqla\":\"lslrcigtzjc\"},\"id\":\"snsso\",\"name\":\"yxpavidnie\",\"type\":\"wffcvvye\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,24 +33,24 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ElasticSnapshotPolicy response = manager.elasticSnapshotPolicies() - .getWithResponse("qhnmhk", "ezsdsuxheq", "gcruxspinym", com.azure.core.util.Context.NONE) + .getWithResponse("fa", "zwjcaye", "zrransyb", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("etatlakf", response.location()); - Assertions.assertEquals("xwgiks", response.tags().get("bvtooxrpogwp")); - Assertions.assertEquals(1796310561, response.properties().hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1167474668, response.properties().hourlySchedule().minute()); - Assertions.assertEquals(917160525, response.properties().dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(2008202977, response.properties().dailySchedule().hour()); - Assertions.assertEquals(534942759, response.properties().dailySchedule().minute()); - Assertions.assertEquals(385248466, response.properties().weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals(DayOfWeek.FRIDAY, response.properties().weeklySchedule().days().get(0)); - Assertions.assertEquals(1891390759, response.properties().weeklySchedule().hour()); - Assertions.assertEquals(1073689854, response.properties().weeklySchedule().minute()); - Assertions.assertEquals(805396639, response.properties().monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals(456970353, response.properties().monthlySchedule().daysOfMonth().get(0)); - Assertions.assertEquals(1625333661, response.properties().monthlySchedule().hour()); - Assertions.assertEquals(2097746238, response.properties().monthlySchedule().minute()); - Assertions.assertEquals(PolicyStatus.DISABLED, response.properties().policyStatus()); + Assertions.assertEquals("ghmp", response.location()); + Assertions.assertEquals("lslrcigtzjc", response.tags().get("bxqla")); + Assertions.assertEquals(1132932297, response.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(606699153, response.properties().hourlySchedule().minute()); + Assertions.assertEquals(365963820, response.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1138228089, response.properties().dailySchedule().hour()); + Assertions.assertEquals(1712906594, response.properties().dailySchedule().minute()); + Assertions.assertEquals(631387902, response.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.MONDAY, response.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1535593960, response.properties().weeklySchedule().hour()); + Assertions.assertEquals(58502725, response.properties().weeklySchedule().minute()); + Assertions.assertEquals(1965722229, response.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1685076909, response.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1466557095, response.properties().monthlySchedule().hour()); + Assertions.assertEquals(225171898, response.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, response.properties().policyStatus()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountMockTests.java index 9ce25b7ec16d..83efdc22f20a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountMockTests.java @@ -24,7 +24,7 @@ public final class ElasticSnapshotPoliciesListByElasticAccountMockTests { @Test public void testListByElasticAccount() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":290457934,\"minute\":86259723},\"dailySchedule\":{\"snapshotsToKeep\":1218418711,\"hour\":362918541,\"minute\":327282787},\"weeklySchedule\":{\"snapshotsToKeep\":1520987150,\"days\":[\"Friday\"],\"hour\":1643092004,\"minute\":75882074},\"monthlySchedule\":{\"snapshotsToKeep\":1416822258,\"daysOfMonth\":[1096639551],\"hour\":1262066997,\"minute\":1678159895},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Updating\"},\"eTag\":\"vvxwjong\",\"location\":\"ehqqrsilcchs\",\"tags\":{\"jrulfucte\":\"kansbvriaqgvt\"},\"id\":\"rthcfjzh\",\"name\":\"lyubqjrostvrjeq\",\"type\":\"tzzbeq\"}]}"; + = "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1495037279,\"minute\":891433638},\"dailySchedule\":{\"snapshotsToKeep\":1718788001,\"hour\":159653844,\"minute\":582469208},\"weeklySchedule\":{\"snapshotsToKeep\":494308387,\"days\":[\"Wednesday\"],\"hour\":953919104,\"minute\":758738595},\"monthlySchedule\":{\"snapshotsToKeep\":874783304,\"daysOfMonth\":[1921763582],\"hour\":1969772389,\"minute\":1889962798},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Accepted\"},\"eTag\":\"giudjpxpq\",\"location\":\"t\",\"tags\":{\"ezsdsuxheq\":\"mhk\",\"qgwokmikp\":\"gcruxspinym\",\"ipfdvhaxdvwzaehp\":\"zfbmjxuv\"},\"id\":\"hthdklmvetatlakf\",\"name\":\"oixwgiksb\",\"type\":\"vtooxrpo\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,26 +34,25 @@ public void testListByElasticAccount() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ElasticSnapshotPolicy> response = manager.elasticSnapshotPolicies() - .listByElasticAccount("mlyotg", "wsxnsrqor", com.azure.core.util.Context.NONE); + .listByElasticAccount("slpuxgcbdsva", "pnptw", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ehqqrsilcchs", response.iterator().next().location()); - Assertions.assertEquals("kansbvriaqgvt", response.iterator().next().tags().get("jrulfucte")); - Assertions.assertEquals(290457934, response.iterator().next().properties().hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(86259723, response.iterator().next().properties().hourlySchedule().minute()); - Assertions.assertEquals(1218418711, response.iterator().next().properties().dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(362918541, response.iterator().next().properties().dailySchedule().hour()); - Assertions.assertEquals(327282787, response.iterator().next().properties().dailySchedule().minute()); - Assertions.assertEquals(1520987150, response.iterator().next().properties().weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals(DayOfWeek.FRIDAY, + Assertions.assertEquals("t", response.iterator().next().location()); + Assertions.assertEquals("mhk", response.iterator().next().tags().get("ezsdsuxheq")); + Assertions.assertEquals(1495037279, response.iterator().next().properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(891433638, response.iterator().next().properties().hourlySchedule().minute()); + Assertions.assertEquals(1718788001, response.iterator().next().properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(159653844, response.iterator().next().properties().dailySchedule().hour()); + Assertions.assertEquals(582469208, response.iterator().next().properties().dailySchedule().minute()); + Assertions.assertEquals(494308387, response.iterator().next().properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.WEDNESDAY, response.iterator().next().properties().weeklySchedule().days().get(0)); - Assertions.assertEquals(1643092004, response.iterator().next().properties().weeklySchedule().hour()); - Assertions.assertEquals(75882074, response.iterator().next().properties().weeklySchedule().minute()); - Assertions.assertEquals(1416822258, - response.iterator().next().properties().monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1096639551, + Assertions.assertEquals(953919104, response.iterator().next().properties().weeklySchedule().hour()); + Assertions.assertEquals(758738595, response.iterator().next().properties().weeklySchedule().minute()); + Assertions.assertEquals(874783304, response.iterator().next().properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1921763582, response.iterator().next().properties().monthlySchedule().daysOfMonth().get(0)); - Assertions.assertEquals(1262066997, response.iterator().next().properties().monthlySchedule().hour()); - Assertions.assertEquals(1678159895, response.iterator().next().properties().monthlySchedule().minute()); + Assertions.assertEquals(1969772389, response.iterator().next().properties().monthlySchedule().hour()); + Assertions.assertEquals(1889962798, response.iterator().next().properties().monthlySchedule().minute()); Assertions.assertEquals(PolicyStatus.DISABLED, response.iterator().next().properties().policyStatus()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesMockTests.java index 7b3ced605f4b..564a65487549 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesMockTests.java @@ -30,7 +30,7 @@ public final class ElasticSnapshotPoliciesListElasticVolumesMockTests { @Test public void testListElasticVolumes() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"filePath\":\"bsrwrsnrhpqat\",\"size\":2117102872399772953,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":651849981,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"svuv\",\"jkqxetqmmli\",\"rj\",\"xnwxdch\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":502816571,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"quwzp\",\"iibelwcerw\",\"w\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1712959814,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"bxxn\",\"uisdzhgbdgz\",\"agsecnadbuw\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv4\",\"NFSv4\",\"NFSv4\"],\"provisioningState\":\"Patching\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"ezoell\",\"mountTargets\":[{\"ipAddress\":\"iwvmtumxpymdjfu\",\"smbServerFqdn\":\"roqvqpilrgu\"},{\"ipAddress\":\"anlduwzorxsb\",\"smbServerFqdn\":\"aqklxy\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"vfqepd\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"tuubwyvpjb\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"jqduqgixe\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"lj\",\"restorationState\":\"Failed\"},\"eTag\":\"erkjddv\",\"zones\":[\"iegftc\",\"biiftksdwgdnk\",\"fgmwd\"],\"location\":\"eb\",\"tags\":{\"ekaj\":\"zldbglzoutbaaqg\",\"jgmn\":\"lyzgsnor\",\"bvvjbhvhdiq\":\"jotvmrxkhl\",\"vhyibdrqrsw\":\"yfluiyuosnuudte\"},\"id\":\"buubpyrowt\",\"name\":\"oxztfwfqch\",\"type\":\"czevjnn\"}]}"; + = "{\"value\":[{\"properties\":{\"filePath\":\"nuvwcgasgomtmjzw\",\"size\":7119928825383481224,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1558900912,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"kkhtgfredmlscgrl\",\"ccnaov\",\"owazhpabacom\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"SMB\"],\"provisioningState\":\"Deleting\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"srqorcgenmvceb\",\"mountTargets\":[{\"ipAddress\":\"qu\",\"smbServerFqdn\":\"cxxqndc\"},{\"ipAddress\":\"kedwqurcgojmrv\",\"smbServerFqdn\":\"wjongzs\"},{\"ipAddress\":\"qqrsil\",\"smbServerFqdn\":\"hskxx\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"bvriaqgvtojrulfu\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"jrthcfjzhx\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"qjros\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"tzzbeq\",\"restorationState\":\"Restoring\"},\"eTag\":\"x\",\"zones\":[\"rdhabsr\"],\"location\":\"sn\",\"tags\":{\"ems\":\"qatiwkkvyanxkvvc\",\"livrjjxnwx\":\"uvdjkqxetqm\",\"jxlehzlx\":\"chp\",\"w\":\"gfquwz\"},\"id\":\"ibelwcerwkw\",\"name\":\"pjxljtxb\",\"type\":\"sqtbxxniu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -39,41 +39,41 @@ public void testListElasticVolumes() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<ElasticVolume> response - = manager.elasticSnapshotPolicies().listElasticVolumes("ztr", "alx", "d", com.azure.core.util.Context.NONE); + PagedIterable<ElasticVolume> response = manager.elasticSnapshotPolicies() + .listElasticVolumes("wp", "chgjtnhtukfacih", "bfntumeezbxvq", com.azure.core.util.Context.NONE); - Assertions.assertEquals("eb", response.iterator().next().location()); - Assertions.assertEquals("zldbglzoutbaaqg", response.iterator().next().tags().get("ekaj")); - Assertions.assertEquals("bsrwrsnrhpqat", response.iterator().next().properties().filePath()); - Assertions.assertEquals(2117102872399772953L, response.iterator().next().properties().size()); - Assertions.assertEquals(651849981, + Assertions.assertEquals("sn", response.iterator().next().location()); + Assertions.assertEquals("qatiwkkvyanxkvvc", response.iterator().next().tags().get("ems")); + Assertions.assertEquals("nuvwcgasgomtmjzw", response.iterator().next().properties().filePath()); + Assertions.assertEquals(7119928825383481224L, response.iterator().next().properties().size()); + Assertions.assertEquals(1558900912, response.iterator().next().properties().exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, response.iterator().next().properties().exportPolicy().rules().get(0).unixAccessRule()); - Assertions.assertEquals(ElasticNfsv3Access.DISABLED, + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, response.iterator().next().properties().exportPolicy().rules().get(0).nfsv3()); Assertions.assertEquals(ElasticNfsv4Access.ENABLED, response.iterator().next().properties().exportPolicy().rules().get(0).nfsv4()); - Assertions.assertEquals("svuv", + Assertions.assertEquals("kkhtgfredmlscgrl", response.iterator().next().properties().exportPolicy().rules().get(0).allowedClients().get(0)); - Assertions.assertEquals(ElasticRootAccess.ENABLED, + Assertions.assertEquals(ElasticRootAccess.DISABLED, response.iterator().next().properties().exportPolicy().rules().get(0).rootAccess()); - Assertions.assertEquals(ElasticProtocolType.NFSV4, + Assertions.assertEquals(ElasticProtocolType.SMB, response.iterator().next().properties().protocolTypes().get(0)); - Assertions.assertEquals("ezoell", response.iterator().next().properties().snapshotResourceId()); - Assertions.assertEquals("vfqepd", + Assertions.assertEquals("srqorcgenmvceb", response.iterator().next().properties().snapshotResourceId()); + Assertions.assertEquals("bvriaqgvtojrulfu", response.iterator().next().properties().dataProtection().snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("tuubwyvpjb", + Assertions.assertEquals("jrthcfjzhx", response.iterator().next().properties().dataProtection().backup().elasticBackupPolicyResourceId()); Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, response.iterator().next().properties().dataProtection().backup().policyEnforcement()); - Assertions.assertEquals("jqduqgixe", + Assertions.assertEquals("qjros", response.iterator().next().properties().dataProtection().backup().elasticBackupVaultResourceId()); - Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, response.iterator().next().properties().snapshotDirectoryVisibility()); - Assertions.assertEquals(ElasticSmbEncryption.DISABLED, + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, response.iterator().next().properties().smbProperties().smbEncryption()); - Assertions.assertEquals("lj", response.iterator().next().properties().backupResourceId()); - Assertions.assertEquals("iegftc", response.iterator().next().zones().get(0)); + Assertions.assertEquals("tzzbeq", response.iterator().next().properties().backupResourceId()); + Assertions.assertEquals("rdhabsr", response.iterator().next().zones().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyDailyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyDailyScheduleTests.java index 58633cb44d37..7f1864a8fbd7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyDailyScheduleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyDailyScheduleTests.java @@ -12,22 +12,22 @@ public final class ElasticSnapshotPolicyDailyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticSnapshotPolicyDailySchedule model - = BinaryData.fromString("{\"snapshotsToKeep\":1269982634,\"hour\":1477203796,\"minute\":116262403}") + = BinaryData.fromString("{\"snapshotsToKeep\":1798680046,\"hour\":1231214883,\"minute\":1577867001}") .toObject(ElasticSnapshotPolicyDailySchedule.class); - Assertions.assertEquals(1269982634, model.snapshotsToKeep()); - Assertions.assertEquals(1477203796, model.hour()); - Assertions.assertEquals(116262403, model.minute()); + Assertions.assertEquals(1798680046, model.snapshotsToKeep()); + Assertions.assertEquals(1231214883, model.hour()); + Assertions.assertEquals(1577867001, model.minute()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ElasticSnapshotPolicyDailySchedule model - = new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(1269982634) - .withHour(1477203796) - .withMinute(116262403); + = new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(1798680046) + .withHour(1231214883) + .withMinute(1577867001); model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyDailySchedule.class); - Assertions.assertEquals(1269982634, model.snapshotsToKeep()); - Assertions.assertEquals(1477203796, model.hour()); - Assertions.assertEquals(116262403, model.minute()); + Assertions.assertEquals(1798680046, model.snapshotsToKeep()); + Assertions.assertEquals(1231214883, model.hour()); + Assertions.assertEquals(1577867001, model.minute()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyHourlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyHourlyScheduleTests.java index 01667080e100..541c278e7218 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyHourlyScheduleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyHourlyScheduleTests.java @@ -12,18 +12,18 @@ public final class ElasticSnapshotPolicyHourlyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticSnapshotPolicyHourlySchedule model - = BinaryData.fromString("{\"snapshotsToKeep\":1291593702,\"minute\":555944790}") + = BinaryData.fromString("{\"snapshotsToKeep\":36862007,\"minute\":740306752}") .toObject(ElasticSnapshotPolicyHourlySchedule.class); - Assertions.assertEquals(1291593702, model.snapshotsToKeep()); - Assertions.assertEquals(555944790, model.minute()); + Assertions.assertEquals(36862007, model.snapshotsToKeep()); + Assertions.assertEquals(740306752, model.minute()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ElasticSnapshotPolicyHourlySchedule model - = new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(1291593702).withMinute(555944790); + = new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(36862007).withMinute(740306752); model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyHourlySchedule.class); - Assertions.assertEquals(1291593702, model.snapshotsToKeep()); - Assertions.assertEquals(555944790, model.minute()); + Assertions.assertEquals(36862007, model.snapshotsToKeep()); + Assertions.assertEquals(740306752, model.minute()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyInnerTests.java index 748d5f8a81d9..99cf40fa12a3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyInnerTests.java @@ -22,62 +22,62 @@ public final class ElasticSnapshotPolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticSnapshotPolicyInner model = BinaryData.fromString( - "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":601956231,\"minute\":1863397561},\"dailySchedule\":{\"snapshotsToKeep\":378498503,\"hour\":2073795724,\"minute\":1291910908},\"weeklySchedule\":{\"snapshotsToKeep\":842063408,\"days\":[\"Sunday\",\"Saturday\",\"Sunday\",\"Friday\"],\"hour\":513286022,\"minute\":1754763241},\"monthlySchedule\":{\"snapshotsToKeep\":1646833466,\"daysOfMonth\":[2095946053,101589203],\"hour\":2083883646,\"minute\":1027236790},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Updating\"},\"eTag\":\"on\",\"location\":\"gnwncypuuwwlt\",\"tags\":{\"zzhmkd\":\"jctzenkei\",\"gsrboldforobw\":\"svflyhbxcudch\",\"hfovvacqpbtu\":\"lvizb\"},\"id\":\"dxe\",\"name\":\"zab\",\"type\":\"elawumu\"}") + "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":528448638,\"minute\":915873133},\"dailySchedule\":{\"snapshotsToKeep\":267258136,\"hour\":170135486,\"minute\":1760541497},\"weeklySchedule\":{\"snapshotsToKeep\":2047907639,\"days\":[\"Monday\",\"Tuesday\",\"Saturday\"],\"hour\":451431639,\"minute\":801625089},\"monthlySchedule\":{\"snapshotsToKeep\":840764859,\"daysOfMonth\":[1744561376,951420549,2043816183],\"hour\":1103748423,\"minute\":1089629771},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Failed\"},\"eTag\":\"hiosrsjuiv\",\"location\":\"disyirnxz\",\"tags\":{\"wrevkhgnlnzon\":\"exrxzbujrtrhq\",\"jtszcof\":\"lrpiqywnc\",\"k\":\"zehtdhgb\"},\"id\":\"reljeamur\",\"name\":\"zmlovuanash\",\"type\":\"xlpm\"}") .toObject(ElasticSnapshotPolicyInner.class); - Assertions.assertEquals("gnwncypuuwwlt", model.location()); - Assertions.assertEquals("jctzenkei", model.tags().get("zzhmkd")); - Assertions.assertEquals(601956231, model.properties().hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1863397561, model.properties().hourlySchedule().minute()); - Assertions.assertEquals(378498503, model.properties().dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(2073795724, model.properties().dailySchedule().hour()); - Assertions.assertEquals(1291910908, model.properties().dailySchedule().minute()); - Assertions.assertEquals(842063408, model.properties().weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals(DayOfWeek.SUNDAY, model.properties().weeklySchedule().days().get(0)); - Assertions.assertEquals(513286022, model.properties().weeklySchedule().hour()); - Assertions.assertEquals(1754763241, model.properties().weeklySchedule().minute()); - Assertions.assertEquals(1646833466, model.properties().monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals(2095946053, model.properties().monthlySchedule().daysOfMonth().get(0)); - Assertions.assertEquals(2083883646, model.properties().monthlySchedule().hour()); - Assertions.assertEquals(1027236790, model.properties().monthlySchedule().minute()); - Assertions.assertEquals(PolicyStatus.DISABLED, model.properties().policyStatus()); + Assertions.assertEquals("disyirnxz", model.location()); + Assertions.assertEquals("exrxzbujrtrhq", model.tags().get("wrevkhgnlnzon")); + Assertions.assertEquals(528448638, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(915873133, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(267258136, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(170135486, model.properties().dailySchedule().hour()); + Assertions.assertEquals(1760541497, model.properties().dailySchedule().minute()); + Assertions.assertEquals(2047907639, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.MONDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(451431639, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(801625089, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(840764859, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1744561376, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1103748423, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(1089629771, model.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.properties().policyStatus()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ElasticSnapshotPolicyInner model = new ElasticSnapshotPolicyInner().withLocation("gnwncypuuwwlt") - .withTags(mapOf("zzhmkd", "jctzenkei", "gsrboldforobw", "svflyhbxcudch", "hfovvacqpbtu", "lvizb")) + ElasticSnapshotPolicyInner model = new ElasticSnapshotPolicyInner().withLocation("disyirnxz") + .withTags(mapOf("wrevkhgnlnzon", "exrxzbujrtrhq", "jtszcof", "lrpiqywnc", "k", "zehtdhgb")) .withProperties(new ElasticSnapshotPolicyProperties() .withHourlySchedule( - new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(601956231).withMinute(1863397561)) - .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(378498503) - .withHour(2073795724) - .withMinute(1291910908)) - .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(842063408) - .withDays(Arrays.asList(DayOfWeek.SUNDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY, DayOfWeek.FRIDAY)) - .withHour(513286022) - .withMinute(1754763241)) - .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(1646833466) - .withDaysOfMonth(Arrays.asList(2095946053, 101589203)) - .withHour(2083883646) - .withMinute(1027236790)) - .withPolicyStatus(PolicyStatus.DISABLED)); + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(528448638).withMinute(915873133)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(267258136) + .withHour(170135486) + .withMinute(1760541497)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(2047907639) + .withDays(Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.SATURDAY)) + .withHour(451431639) + .withMinute(801625089)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(840764859) + .withDaysOfMonth(Arrays.asList(1744561376, 951420549, 2043816183)) + .withHour(1103748423) + .withMinute(1089629771)) + .withPolicyStatus(PolicyStatus.ENABLED)); model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyInner.class); - Assertions.assertEquals("gnwncypuuwwlt", model.location()); - Assertions.assertEquals("jctzenkei", model.tags().get("zzhmkd")); - Assertions.assertEquals(601956231, model.properties().hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1863397561, model.properties().hourlySchedule().minute()); - Assertions.assertEquals(378498503, model.properties().dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(2073795724, model.properties().dailySchedule().hour()); - Assertions.assertEquals(1291910908, model.properties().dailySchedule().minute()); - Assertions.assertEquals(842063408, model.properties().weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals(DayOfWeek.SUNDAY, model.properties().weeklySchedule().days().get(0)); - Assertions.assertEquals(513286022, model.properties().weeklySchedule().hour()); - Assertions.assertEquals(1754763241, model.properties().weeklySchedule().minute()); - Assertions.assertEquals(1646833466, model.properties().monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals(2095946053, model.properties().monthlySchedule().daysOfMonth().get(0)); - Assertions.assertEquals(2083883646, model.properties().monthlySchedule().hour()); - Assertions.assertEquals(1027236790, model.properties().monthlySchedule().minute()); - Assertions.assertEquals(PolicyStatus.DISABLED, model.properties().policyStatus()); + Assertions.assertEquals("disyirnxz", model.location()); + Assertions.assertEquals("exrxzbujrtrhq", model.tags().get("wrevkhgnlnzon")); + Assertions.assertEquals(528448638, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(915873133, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(267258136, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(170135486, model.properties().dailySchedule().hour()); + Assertions.assertEquals(1760541497, model.properties().dailySchedule().minute()); + Assertions.assertEquals(2047907639, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.MONDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(451431639, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(801625089, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(840764859, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1744561376, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1103748423, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(1089629771, model.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.properties().policyStatus()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyListResultTests.java index 6fc9a7a9f6df..d5ac31117ee8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyListResultTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyListResultTests.java @@ -14,24 +14,24 @@ public final class ElasticSnapshotPolicyListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticSnapshotPolicyListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1832381587,\"minute\":2079611289},\"dailySchedule\":{\"snapshotsToKeep\":1073196572,\"hour\":1101777200,\"minute\":843913557},\"weeklySchedule\":{\"snapshotsToKeep\":396602814,\"days\":[\"Monday\"],\"hour\":1508462488,\"minute\":1365525358},\"monthlySchedule\":{\"snapshotsToKeep\":1218728383,\"daysOfMonth\":[1702747573,6794810,465765494],\"hour\":1541278105,\"minute\":1492295803},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Accepted\"},\"eTag\":\"z\",\"location\":\"sccbiuimzd\",\"tags\":{\"fdvruz\":\"dfqwmkyoq\",\"hpc\":\"lzo\",\"fdgugeyzi\":\"fnmdxotn\",\"jee\":\"grkyuizabsnmfpph\"},\"id\":\"yhyhsgzfczb\",\"name\":\"omfgbeglqgleohib\",\"type\":\"tnluankrr\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":2031410613,\"minute\":955300686},\"dailySchedule\":{\"snapshotsToKeep\":187590799,\"hour\":1847279460,\"minute\":1686206255},\"weeklySchedule\":{\"snapshotsToKeep\":192666481,\"days\":[\"Friday\",\"Thursday\"],\"hour\":498607950,\"minute\":2093325150},\"monthlySchedule\":{\"snapshotsToKeep\":1379865960,\"daysOfMonth\":[960314765,648300753,1206650787,197015788],\"hour\":2063483518,\"minute\":1137200728},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Patching\"},\"eTag\":\"aoqltfaey\",\"location\":\"nm\",\"tags\":{\"oqeyhlqhykprl\":\"xirpghriy\",\"mexiitdfuxt\":\"yznuciqd\",\"nlj\":\"asiibmiybnnust\"},\"id\":\"nmgixh\",\"name\":\"mavmq\",\"type\":\"oudorhcgyyp\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":812539177,\"minute\":1374628714},\"dailySchedule\":{\"snapshotsToKeep\":915134983,\"hour\":1400929714,\"minute\":1099905966},\"weeklySchedule\":{\"snapshotsToKeep\":1120408256,\"days\":[\"Tuesday\"],\"hour\":1134791831,\"minute\":493820197},\"monthlySchedule\":{\"snapshotsToKeep\":1939328666,\"daysOfMonth\":[1135735210],\"hour\":1138245525,\"minute\":1503356934},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Patching\"},\"eTag\":\"vnzcyjto\",\"location\":\"vopvp\",\"tags\":{\"qqihedsvqwthmk\":\"zq\",\"dhohsdtmcdzsuf\":\"ibcysihsgqc\"},\"id\":\"ohdxbzlmcmu\",\"name\":\"pcvhdbevwqqxeys\",\"type\":\"onqzinkfkbgbzbow\"}],\"nextLink\":\"qocl\"}") + "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":496912008,\"minute\":1231024606},\"dailySchedule\":{\"snapshotsToKeep\":1230489128,\"hour\":402556977,\"minute\":130119392},\"weeklySchedule\":{\"snapshotsToKeep\":451814884,\"days\":[\"Sunday\"],\"hour\":1162689425,\"minute\":432418961},\"monthlySchedule\":{\"snapshotsToKeep\":892310228,\"daysOfMonth\":[344020638,1784206051,1409257587,1980287093],\"hour\":1365011291,\"minute\":1078377836},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Creating\"},\"eTag\":\"pchrqbn\",\"location\":\"rcgegydcwboxjum\",\"tags\":{\"ouau\":\"olihrra\"},\"id\":\"rjtloq\",\"name\":\"fuojrngif\",\"type\":\"rzpasccbiuimzdly\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1861727617,\"minute\":2059037629},\"dailySchedule\":{\"snapshotsToKeep\":1584212400,\"hour\":1601928317,\"minute\":2136104967},\"weeklySchedule\":{\"snapshotsToKeep\":1951333112,\"days\":[\"Tuesday\"],\"hour\":15628056,\"minute\":942842279},\"monthlySchedule\":{\"snapshotsToKeep\":2030904290,\"daysOfMonth\":[1500212037,585208607,1889500647],\"hour\":2130318282,\"minute\":120965041},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Failed\"},\"eTag\":\"yzihgrkyuizabsn\",\"location\":\"pphoj\",\"tags\":{\"omfgbeglqgleohib\":\"yhyhsgzfczb\",\"xeeebtijvacvbmqz\":\"tnluankrr\",\"wxacevehj\":\"qqxlajr\"},\"id\":\"uyxoaf\",\"name\":\"aoqltfaey\",\"type\":\"inmfgvxirp\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":814102500,\"minute\":1251385570},\"dailySchedule\":{\"snapshotsToKeep\":1656883941,\"hour\":677707515,\"minute\":98815164},\"weeklySchedule\":{\"snapshotsToKeep\":1212152728,\"days\":[\"Sunday\",\"Wednesday\",\"Thursday\",\"Monday\"],\"hour\":1860731641,\"minute\":184808617},\"monthlySchedule\":{\"snapshotsToKeep\":593641633,\"daysOfMonth\":[1994491974,1077355180,1547806900],\"hour\":2006875191,\"minute\":1014008544},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"ibmi\",\"location\":\"nnust\",\"tags\":{\"mgixhcmavmqfou\":\"jh\",\"cgyypro\":\"or\",\"undmbx\":\"wy\",\"ftpmdtzfjltfv\":\"ugcmjkavlgorb\"},\"id\":\"zcyjtot\",\"name\":\"vopvp\",\"type\":\"dbzqgqqihed\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1816280745,\"minute\":1013499255},\"dailySchedule\":{\"snapshotsToKeep\":649222469,\"hour\":1456487398,\"minute\":1374749557},\"weeklySchedule\":{\"snapshotsToKeep\":2139436014,\"days\":[\"Sunday\",\"Wednesday\"],\"hour\":1276799323,\"minute\":1463060952},\"monthlySchedule\":{\"snapshotsToKeep\":1060245922,\"daysOfMonth\":[1603035621,582075475],\"hour\":223413800,\"minute\":1084867898},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Patching\"},\"eTag\":\"zlmcmuapcvhdb\",\"location\":\"wqqxeysko\",\"tags\":{\"owxeqocljmy\":\"inkfkbgbz\",\"jeokbzefezrxccz\":\"vkzqk\",\"pqxbkwvzgnzvdf\":\"rtle\",\"mqpnoda\":\"zdix\"},\"id\":\"opqhewjptmc\",\"name\":\"sbostzel\",\"type\":\"dlat\"}],\"nextLink\":\"mzlbiojlvfhrb\"}") .toObject(ElasticSnapshotPolicyListResult.class); - Assertions.assertEquals("sccbiuimzd", model.value().get(0).location()); - Assertions.assertEquals("dfqwmkyoq", model.value().get(0).tags().get("fdvruz")); - Assertions.assertEquals(1832381587, model.value().get(0).properties().hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(2079611289, model.value().get(0).properties().hourlySchedule().minute()); - Assertions.assertEquals(1073196572, model.value().get(0).properties().dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1101777200, model.value().get(0).properties().dailySchedule().hour()); - Assertions.assertEquals(843913557, model.value().get(0).properties().dailySchedule().minute()); - Assertions.assertEquals(396602814, model.value().get(0).properties().weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals(DayOfWeek.MONDAY, model.value().get(0).properties().weeklySchedule().days().get(0)); - Assertions.assertEquals(1508462488, model.value().get(0).properties().weeklySchedule().hour()); - Assertions.assertEquals(1365525358, model.value().get(0).properties().weeklySchedule().minute()); - Assertions.assertEquals(1218728383, model.value().get(0).properties().monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1702747573, model.value().get(0).properties().monthlySchedule().daysOfMonth().get(0)); - Assertions.assertEquals(1541278105, model.value().get(0).properties().monthlySchedule().hour()); - Assertions.assertEquals(1492295803, model.value().get(0).properties().monthlySchedule().minute()); - Assertions.assertEquals(PolicyStatus.DISABLED, model.value().get(0).properties().policyStatus()); - Assertions.assertEquals("qocl", model.nextLink()); + Assertions.assertEquals("rcgegydcwboxjum", model.value().get(0).location()); + Assertions.assertEquals("olihrra", model.value().get(0).tags().get("ouau")); + Assertions.assertEquals(496912008, model.value().get(0).properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1231024606, model.value().get(0).properties().hourlySchedule().minute()); + Assertions.assertEquals(1230489128, model.value().get(0).properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(402556977, model.value().get(0).properties().dailySchedule().hour()); + Assertions.assertEquals(130119392, model.value().get(0).properties().dailySchedule().minute()); + Assertions.assertEquals(451814884, model.value().get(0).properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.SUNDAY, model.value().get(0).properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1162689425, model.value().get(0).properties().weeklySchedule().hour()); + Assertions.assertEquals(432418961, model.value().get(0).properties().weeklySchedule().minute()); + Assertions.assertEquals(892310228, model.value().get(0).properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(344020638, model.value().get(0).properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1365011291, model.value().get(0).properties().monthlySchedule().hour()); + Assertions.assertEquals(1078377836, model.value().get(0).properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.value().get(0).properties().policyStatus()); + Assertions.assertEquals("mzlbiojlvfhrb", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyMonthlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyMonthlyScheduleTests.java index 4394a84ad2d0..16e411d9c0ab 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyMonthlyScheduleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyMonthlyScheduleTests.java @@ -12,26 +12,27 @@ public final class ElasticSnapshotPolicyMonthlyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ElasticSnapshotPolicyMonthlySchedule model = BinaryData.fromString( - "{\"snapshotsToKeep\":1567146664,\"daysOfMonth\":[255810244,1460319466],\"hour\":993307689,\"minute\":1202587998}") + ElasticSnapshotPolicyMonthlySchedule model = BinaryData + .fromString( + "{\"snapshotsToKeep\":149120205,\"daysOfMonth\":[921297518],\"hour\":1940706470,\"minute\":432756215}") .toObject(ElasticSnapshotPolicyMonthlySchedule.class); - Assertions.assertEquals(1567146664, model.snapshotsToKeep()); - Assertions.assertEquals(255810244, model.daysOfMonth().get(0)); - Assertions.assertEquals(993307689, model.hour()); - Assertions.assertEquals(1202587998, model.minute()); + Assertions.assertEquals(149120205, model.snapshotsToKeep()); + Assertions.assertEquals(921297518, model.daysOfMonth().get(0)); + Assertions.assertEquals(1940706470, model.hour()); + Assertions.assertEquals(432756215, model.minute()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ElasticSnapshotPolicyMonthlySchedule model - = new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(1567146664) - .withDaysOfMonth(Arrays.asList(255810244, 1460319466)) - .withHour(993307689) - .withMinute(1202587998); + = new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(149120205) + .withDaysOfMonth(Arrays.asList(921297518)) + .withHour(1940706470) + .withMinute(432756215); model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyMonthlySchedule.class); - Assertions.assertEquals(1567146664, model.snapshotsToKeep()); - Assertions.assertEquals(255810244, model.daysOfMonth().get(0)); - Assertions.assertEquals(993307689, model.hour()); - Assertions.assertEquals(1202587998, model.minute()); + Assertions.assertEquals(149120205, model.snapshotsToKeep()); + Assertions.assertEquals(921297518, model.daysOfMonth().get(0)); + Assertions.assertEquals(1940706470, model.hour()); + Assertions.assertEquals(432756215, model.minute()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyPropertiesTests.java index bd696700fc4e..54cb85819070 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyPropertiesTests.java @@ -19,21 +19,21 @@ public final class ElasticSnapshotPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticSnapshotPolicyProperties model = BinaryData.fromString( - "{\"hourlySchedule\":{\"snapshotsToKeep\":46527363,\"minute\":665685017},\"dailySchedule\":{\"snapshotsToKeep\":755872582,\"hour\":2024604117,\"minute\":562241712},\"weeklySchedule\":{\"snapshotsToKeep\":745271232,\"days\":[\"Thursday\",\"Sunday\",\"Saturday\",\"Sunday\"],\"hour\":161517252,\"minute\":673323258},\"monthlySchedule\":{\"snapshotsToKeep\":298891105,\"daysOfMonth\":[1735351807,1524678464,643812278,2025319282],\"hour\":2057925756,\"minute\":1610831264},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Patching\"}") + "{\"hourlySchedule\":{\"snapshotsToKeep\":654993570,\"minute\":1098245078},\"dailySchedule\":{\"snapshotsToKeep\":394123494,\"hour\":402062508,\"minute\":2095946053},\"weeklySchedule\":{\"snapshotsToKeep\":2083883646,\"days\":[\"Sunday\",\"Tuesday\",\"Sunday\"],\"hour\":1920486563,\"minute\":1331407717},\"monthlySchedule\":{\"snapshotsToKeep\":1268563330,\"daysOfMonth\":[258073184],\"hour\":2083395580,\"minute\":1666658010},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Creating\"}") .toObject(ElasticSnapshotPolicyProperties.class); - Assertions.assertEquals(46527363, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(665685017, model.hourlySchedule().minute()); - Assertions.assertEquals(755872582, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(2024604117, model.dailySchedule().hour()); - Assertions.assertEquals(562241712, model.dailySchedule().minute()); - Assertions.assertEquals(745271232, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals(DayOfWeek.THURSDAY, model.weeklySchedule().days().get(0)); - Assertions.assertEquals(161517252, model.weeklySchedule().hour()); - Assertions.assertEquals(673323258, model.weeklySchedule().minute()); - Assertions.assertEquals(298891105, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1735351807, model.monthlySchedule().daysOfMonth().get(0)); - Assertions.assertEquals(2057925756, model.monthlySchedule().hour()); - Assertions.assertEquals(1610831264, model.monthlySchedule().minute()); + Assertions.assertEquals(654993570, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1098245078, model.hourlySchedule().minute()); + Assertions.assertEquals(394123494, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(402062508, model.dailySchedule().hour()); + Assertions.assertEquals(2095946053, model.dailySchedule().minute()); + Assertions.assertEquals(2083883646, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.SUNDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(1920486563, model.weeklySchedule().hour()); + Assertions.assertEquals(1331407717, model.weeklySchedule().minute()); + Assertions.assertEquals(1268563330, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(258073184, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(2083395580, model.monthlySchedule().hour()); + Assertions.assertEquals(1666658010, model.monthlySchedule().minute()); Assertions.assertEquals(PolicyStatus.ENABLED, model.policyStatus()); } @@ -41,33 +41,33 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { ElasticSnapshotPolicyProperties model = new ElasticSnapshotPolicyProperties() .withHourlySchedule( - new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(46527363).withMinute(665685017)) - .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(755872582) - .withHour(2024604117) - .withMinute(562241712)) - .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(745271232) - .withDays(Arrays.asList(DayOfWeek.THURSDAY, DayOfWeek.SUNDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY)) - .withHour(161517252) - .withMinute(673323258)) - .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(298891105) - .withDaysOfMonth(Arrays.asList(1735351807, 1524678464, 643812278, 2025319282)) - .withHour(2057925756) - .withMinute(1610831264)) + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(654993570).withMinute(1098245078)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(394123494) + .withHour(402062508) + .withMinute(2095946053)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(2083883646) + .withDays(Arrays.asList(DayOfWeek.SUNDAY, DayOfWeek.TUESDAY, DayOfWeek.SUNDAY)) + .withHour(1920486563) + .withMinute(1331407717)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(1268563330) + .withDaysOfMonth(Arrays.asList(258073184)) + .withHour(2083395580) + .withMinute(1666658010)) .withPolicyStatus(PolicyStatus.ENABLED); model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyProperties.class); - Assertions.assertEquals(46527363, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(665685017, model.hourlySchedule().minute()); - Assertions.assertEquals(755872582, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(2024604117, model.dailySchedule().hour()); - Assertions.assertEquals(562241712, model.dailySchedule().minute()); - Assertions.assertEquals(745271232, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals(DayOfWeek.THURSDAY, model.weeklySchedule().days().get(0)); - Assertions.assertEquals(161517252, model.weeklySchedule().hour()); - Assertions.assertEquals(673323258, model.weeklySchedule().minute()); - Assertions.assertEquals(298891105, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1735351807, model.monthlySchedule().daysOfMonth().get(0)); - Assertions.assertEquals(2057925756, model.monthlySchedule().hour()); - Assertions.assertEquals(1610831264, model.monthlySchedule().minute()); + Assertions.assertEquals(654993570, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1098245078, model.hourlySchedule().minute()); + Assertions.assertEquals(394123494, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(402062508, model.dailySchedule().hour()); + Assertions.assertEquals(2095946053, model.dailySchedule().minute()); + Assertions.assertEquals(2083883646, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.SUNDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(1920486563, model.weeklySchedule().hour()); + Assertions.assertEquals(1331407717, model.weeklySchedule().minute()); + Assertions.assertEquals(1268563330, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(258073184, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(2083395580, model.monthlySchedule().hour()); + Assertions.assertEquals(1666658010, model.monthlySchedule().minute()); Assertions.assertEquals(PolicyStatus.ENABLED, model.policyStatus()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdatePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdatePropertiesTests.java index 3c27e37a3f9a..25bf85301ff8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdatePropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdatePropertiesTests.java @@ -19,55 +19,55 @@ public final class ElasticSnapshotPolicyUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticSnapshotPolicyUpdateProperties model = BinaryData.fromString( - "{\"hourlySchedule\":{\"snapshotsToKeep\":109210510,\"minute\":892310228},\"dailySchedule\":{\"snapshotsToKeep\":344020638,\"hour\":1409257587,\"minute\":153753066},\"weeklySchedule\":{\"snapshotsToKeep\":1078377836,\"days\":[\"Saturday\"],\"hour\":981773620,\"minute\":1212474723},\"monthlySchedule\":{\"snapshotsToKeep\":821588698,\"daysOfMonth\":[494278046,1026325475,1719259510,479383954],\"hour\":797085028,\"minute\":628277509},\"policyStatus\":\"Enabled\"}") + "{\"hourlySchedule\":{\"snapshotsToKeep\":1437214498,\"minute\":1984466292},\"dailySchedule\":{\"snapshotsToKeep\":1537129543,\"hour\":1929531496,\"minute\":2002873882},\"weeklySchedule\":{\"snapshotsToKeep\":330254773,\"days\":[\"Tuesday\",\"Tuesday\",\"Monday\",\"Friday\"],\"hour\":928926099,\"minute\":1250131057},\"monthlySchedule\":{\"snapshotsToKeep\":1550616862,\"daysOfMonth\":[1773751874],\"hour\":134024740,\"minute\":1177215499},\"policyStatus\":\"Disabled\"}") .toObject(ElasticSnapshotPolicyUpdateProperties.class); - Assertions.assertEquals(109210510, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(892310228, model.hourlySchedule().minute()); - Assertions.assertEquals(344020638, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1409257587, model.dailySchedule().hour()); - Assertions.assertEquals(153753066, model.dailySchedule().minute()); - Assertions.assertEquals(1078377836, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals(DayOfWeek.SATURDAY, model.weeklySchedule().days().get(0)); - Assertions.assertEquals(981773620, model.weeklySchedule().hour()); - Assertions.assertEquals(1212474723, model.weeklySchedule().minute()); - Assertions.assertEquals(821588698, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals(494278046, model.monthlySchedule().daysOfMonth().get(0)); - Assertions.assertEquals(797085028, model.monthlySchedule().hour()); - Assertions.assertEquals(628277509, model.monthlySchedule().minute()); - Assertions.assertEquals(PolicyStatus.ENABLED, model.policyStatus()); + Assertions.assertEquals(1437214498, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1984466292, model.hourlySchedule().minute()); + Assertions.assertEquals(1537129543, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1929531496, model.dailySchedule().hour()); + Assertions.assertEquals(2002873882, model.dailySchedule().minute()); + Assertions.assertEquals(330254773, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.TUESDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(928926099, model.weeklySchedule().hour()); + Assertions.assertEquals(1250131057, model.weeklySchedule().minute()); + Assertions.assertEquals(1550616862, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1773751874, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(134024740, model.monthlySchedule().hour()); + Assertions.assertEquals(1177215499, model.monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.policyStatus()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ElasticSnapshotPolicyUpdateProperties model = new ElasticSnapshotPolicyUpdateProperties() .withHourlySchedule( - new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(109210510).withMinute(892310228)) - .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(344020638) - .withHour(1409257587) - .withMinute(153753066)) - .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1078377836) - .withDays(Arrays.asList(DayOfWeek.SATURDAY)) - .withHour(981773620) - .withMinute(1212474723)) - .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(821588698) - .withDaysOfMonth(Arrays.asList(494278046, 1026325475, 1719259510, 479383954)) - .withHour(797085028) - .withMinute(628277509)) - .withPolicyStatus(PolicyStatus.ENABLED); + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(1437214498).withMinute(1984466292)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(1537129543) + .withHour(1929531496) + .withMinute(2002873882)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(330254773) + .withDays(Arrays.asList(DayOfWeek.TUESDAY, DayOfWeek.TUESDAY, DayOfWeek.MONDAY, DayOfWeek.FRIDAY)) + .withHour(928926099) + .withMinute(1250131057)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(1550616862) + .withDaysOfMonth(Arrays.asList(1773751874)) + .withHour(134024740) + .withMinute(1177215499)) + .withPolicyStatus(PolicyStatus.DISABLED); model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyUpdateProperties.class); - Assertions.assertEquals(109210510, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(892310228, model.hourlySchedule().minute()); - Assertions.assertEquals(344020638, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1409257587, model.dailySchedule().hour()); - Assertions.assertEquals(153753066, model.dailySchedule().minute()); - Assertions.assertEquals(1078377836, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals(DayOfWeek.SATURDAY, model.weeklySchedule().days().get(0)); - Assertions.assertEquals(981773620, model.weeklySchedule().hour()); - Assertions.assertEquals(1212474723, model.weeklySchedule().minute()); - Assertions.assertEquals(821588698, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals(494278046, model.monthlySchedule().daysOfMonth().get(0)); - Assertions.assertEquals(797085028, model.monthlySchedule().hour()); - Assertions.assertEquals(628277509, model.monthlySchedule().minute()); - Assertions.assertEquals(PolicyStatus.ENABLED, model.policyStatus()); + Assertions.assertEquals(1437214498, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1984466292, model.hourlySchedule().minute()); + Assertions.assertEquals(1537129543, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1929531496, model.dailySchedule().hour()); + Assertions.assertEquals(2002873882, model.dailySchedule().minute()); + Assertions.assertEquals(330254773, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.TUESDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(928926099, model.weeklySchedule().hour()); + Assertions.assertEquals(1250131057, model.weeklySchedule().minute()); + Assertions.assertEquals(1550616862, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1773751874, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(134024740, model.monthlySchedule().hour()); + Assertions.assertEquals(1177215499, model.monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.policyStatus()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdateTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdateTests.java index 3556750a87c8..f009dc16071c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdateTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdateTests.java @@ -22,59 +22,61 @@ public final class ElasticSnapshotPolicyUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticSnapshotPolicyUpdate model = BinaryData.fromString( - "{\"tags\":{\"mysu\":\"lixqnrkcxkjibn\"},\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":188509576,\"minute\":1550616862},\"dailySchedule\":{\"snapshotsToKeep\":1773751874,\"hour\":134024740,\"minute\":1177215499},\"weeklySchedule\":{\"snapshotsToKeep\":1185844831,\"days\":[\"Thursday\"],\"hour\":382801077,\"minute\":1761852553},\"monthlySchedule\":{\"snapshotsToKeep\":2114285001,\"daysOfMonth\":[130119392,1094217479,1093515731],\"hour\":1692036191,\"minute\":858280893},\"policyStatus\":\"Disabled\"}}") + "{\"tags\":{\"boldforobwj\":\"chxgs\",\"vacqpbtuodxesz\":\"vizbfhfo\",\"rrwoycqucwyhahn\":\"bbelawumuaslzk\",\"ywuhpsvfuur\":\"mdr\"},\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1783251204,\"minute\":1618607662},\"dailySchedule\":{\"snapshotsToKeep\":555944790,\"hour\":1269982634,\"minute\":1477203796},\"weeklySchedule\":{\"snapshotsToKeep\":1419028287,\"days\":[\"Sunday\",\"Tuesday\"],\"hour\":1540877996,\"minute\":347492661},\"monthlySchedule\":{\"snapshotsToKeep\":808258027,\"daysOfMonth\":[883576169,1790855590],\"hour\":1460319466,\"minute\":993307689},\"policyStatus\":\"Enabled\"}}") .toObject(ElasticSnapshotPolicyUpdate.class); - Assertions.assertEquals("lixqnrkcxkjibn", model.tags().get("mysu")); - Assertions.assertEquals(188509576, model.properties().hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1550616862, model.properties().hourlySchedule().minute()); - Assertions.assertEquals(1773751874, model.properties().dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(134024740, model.properties().dailySchedule().hour()); - Assertions.assertEquals(1177215499, model.properties().dailySchedule().minute()); - Assertions.assertEquals(1185844831, model.properties().weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals(DayOfWeek.THURSDAY, model.properties().weeklySchedule().days().get(0)); - Assertions.assertEquals(382801077, model.properties().weeklySchedule().hour()); - Assertions.assertEquals(1761852553, model.properties().weeklySchedule().minute()); - Assertions.assertEquals(2114285001, model.properties().monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals(130119392, model.properties().monthlySchedule().daysOfMonth().get(0)); - Assertions.assertEquals(1692036191, model.properties().monthlySchedule().hour()); - Assertions.assertEquals(858280893, model.properties().monthlySchedule().minute()); - Assertions.assertEquals(PolicyStatus.DISABLED, model.properties().policyStatus()); + Assertions.assertEquals("chxgs", model.tags().get("boldforobwj")); + Assertions.assertEquals(1783251204, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1618607662, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(555944790, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1269982634, model.properties().dailySchedule().hour()); + Assertions.assertEquals(1477203796, model.properties().dailySchedule().minute()); + Assertions.assertEquals(1419028287, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.SUNDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1540877996, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(347492661, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(808258027, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(883576169, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1460319466, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(993307689, model.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.properties().policyStatus()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ElasticSnapshotPolicyUpdate model = new ElasticSnapshotPolicyUpdate().withTags(mapOf("mysu", "lixqnrkcxkjibn")) + ElasticSnapshotPolicyUpdate model = new ElasticSnapshotPolicyUpdate() + .withTags(mapOf("boldforobwj", "chxgs", "vacqpbtuodxesz", "vizbfhfo", "rrwoycqucwyhahn", "bbelawumuaslzk", + "ywuhpsvfuur", "mdr")) .withProperties(new ElasticSnapshotPolicyUpdateProperties() .withHourlySchedule( - new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(188509576).withMinute(1550616862)) - .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(1773751874) - .withHour(134024740) - .withMinute(1177215499)) - .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1185844831) - .withDays(Arrays.asList(DayOfWeek.THURSDAY)) - .withHour(382801077) - .withMinute(1761852553)) - .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(2114285001) - .withDaysOfMonth(Arrays.asList(130119392, 1094217479, 1093515731)) - .withHour(1692036191) - .withMinute(858280893)) - .withPolicyStatus(PolicyStatus.DISABLED)); + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(1783251204).withMinute(1618607662)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(555944790) + .withHour(1269982634) + .withMinute(1477203796)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1419028287) + .withDays(Arrays.asList(DayOfWeek.SUNDAY, DayOfWeek.TUESDAY)) + .withHour(1540877996) + .withMinute(347492661)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(808258027) + .withDaysOfMonth(Arrays.asList(883576169, 1790855590)) + .withHour(1460319466) + .withMinute(993307689)) + .withPolicyStatus(PolicyStatus.ENABLED)); model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyUpdate.class); - Assertions.assertEquals("lixqnrkcxkjibn", model.tags().get("mysu")); - Assertions.assertEquals(188509576, model.properties().hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1550616862, model.properties().hourlySchedule().minute()); - Assertions.assertEquals(1773751874, model.properties().dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(134024740, model.properties().dailySchedule().hour()); - Assertions.assertEquals(1177215499, model.properties().dailySchedule().minute()); - Assertions.assertEquals(1185844831, model.properties().weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals(DayOfWeek.THURSDAY, model.properties().weeklySchedule().days().get(0)); - Assertions.assertEquals(382801077, model.properties().weeklySchedule().hour()); - Assertions.assertEquals(1761852553, model.properties().weeklySchedule().minute()); - Assertions.assertEquals(2114285001, model.properties().monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals(130119392, model.properties().monthlySchedule().daysOfMonth().get(0)); - Assertions.assertEquals(1692036191, model.properties().monthlySchedule().hour()); - Assertions.assertEquals(858280893, model.properties().monthlySchedule().minute()); - Assertions.assertEquals(PolicyStatus.DISABLED, model.properties().policyStatus()); + Assertions.assertEquals("chxgs", model.tags().get("boldforobwj")); + Assertions.assertEquals(1783251204, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1618607662, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(555944790, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1269982634, model.properties().dailySchedule().hour()); + Assertions.assertEquals(1477203796, model.properties().dailySchedule().minute()); + Assertions.assertEquals(1419028287, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.SUNDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1540877996, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(347492661, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(808258027, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(883576169, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1460319466, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(993307689, model.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.properties().policyStatus()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyVolumeListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyVolumeListTests.java index 50dbea33484d..7caed983da11 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyVolumeListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyVolumeListTests.java @@ -16,28 +16,28 @@ public final class ElasticSnapshotPolicyVolumeListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticSnapshotPolicyVolumeList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"filePath\":\"gvkzqkjjeokbze\",\"size\":8683941760335562724,\"exportPolicy\":{\"rules\":[{},{},{}]},\"protocolTypes\":[\"NFSv3\",\"NFSv3\"],\"provisioningState\":\"Deleting\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"pqxbkwvzgnzvdf\",\"mountTargets\":[{\"ipAddress\":\"xzmqpnodawop\",\"smbServerFqdn\":\"ewjptmcg\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"t\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"ndlatutmzlbi\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"fhrbbpneqvcw\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"chpp\",\"restorationState\":\"Restored\"},\"eTag\":\"nmokayzejnhlbk\",\"zones\":[\"pcpil\"],\"location\":\"a\",\"tags\":{\"wiuub\":\"echndbnwieholew\",\"x\":\"efqsfapaqtferrqw\",\"pjwogqqno\":\"kmfx\",\"dabtqwp\":\"pud\"},\"id\":\"yawbzasqbu\",\"name\":\"ljgkyex\",\"type\":\"oguyaip\"},{\"properties\":{\"filePath\":\"sdaultxij\",\"size\":1316152777168081705,\"exportPolicy\":{\"rules\":[{}]},\"protocolTypes\":[\"NFSv4\",\"NFSv4\",\"SMB\",\"SMB\"],\"provisioningState\":\"Creating\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"gzqdqxtbjwgn\",\"mountTargets\":[{\"ipAddress\":\"fzsvtuikzh\",\"smbServerFqdn\":\"qglcfhmlrqryxynq\"},{\"ipAddress\":\"rd\",\"smbServerFqdn\":\"ovw\"},{\"ipAddress\":\"nptgoeiybba\",\"smbServerFqdn\":\"fhvfsl\"},{\"ipAddress\":\"ntjlr\",\"smbServerFqdn\":\"jkskyr\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"zid\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"aabzmif\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"nmmaxrizkzob\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"lnelxieixynl\",\"restorationState\":\"Restoring\"},\"eTag\":\"wcrojphslhcaw\",\"zones\":[\"i\",\"dwfmvigorqjb\",\"tzh\"],\"location\":\"glka\",\"tags\":{\"juj\":\"n\",\"cpopmxel\":\"ickpz\",\"xm\":\"wcltyjede\",\"kqscazuawxtzx\":\"f\"},\"id\":\"uamwabzxrvxc\",\"name\":\"s\",\"type\":\"sphaivmxyasflvg\"},{\"properties\":{\"filePath\":\"zwywako\",\"size\":8766984881915713078,\"exportPolicy\":{\"rules\":[{},{},{}]},\"protocolTypes\":[\"NFSv4\",\"NFSv4\",\"NFSv4\"],\"provisioningState\":\"Failed\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"ymzotqyryuzcbmq\",\"mountTargets\":[{\"ipAddress\":\"vwf\",\"smbServerFqdn\":\"ayxonsupeujl\"},{\"ipAddress\":\"nh\",\"smbServerFqdn\":\"sqltnzo\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"xgnxfyqonmpqoxwd\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"bxiqxeiiqbimht\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"nhe\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"wbcb\",\"restorationState\":\"Failed\"},\"eTag\":\"nkbwvqv\",\"zones\":[\"ivqiheb\",\"tswbzuwfmd\"],\"location\":\"agegiz\",\"tags\":{\"gbqi\":\"felisdjub\",\"m\":\"kxkbsazgakgacyr\",\"pv\":\"dmspof\",\"iofrzgbzjedmstk\":\"hryl\"},\"id\":\"nlvxbcuii\",\"name\":\"nktwfansnvpdibmi\",\"type\":\"ostbzbkiwb\"}],\"nextLink\":\"n\"}") + "{\"value\":[{\"properties\":{\"filePath\":\"eqvcwwyyurmoch\",\"size\":3217967457297888054,\"exportPolicy\":{\"rules\":[{},{},{}]},\"protocolTypes\":[\"NFSv4\",\"NFSv3\",\"NFSv3\",\"NFSv4\"],\"provisioningState\":\"Patching\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"hlb\",\"mountTargets\":[{\"ipAddress\":\"pcpil\",\"smbServerFqdn\":\"a\"},{\"ipAddress\":\"vechndbnwiehole\",\"smbServerFqdn\":\"wiuub\"},{\"ipAddress\":\"fqsfa\",\"smbServerFqdn\":\"qtferrqwexjkmf\"},{\"ipAddress\":\"pjwogqqno\",\"smbServerFqdn\":\"udcdabtqwpwyawb\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"bucljgkyexaogu\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"p\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"ault\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"qwazlnqnmcjngzq\",\"restorationState\":\"Restoring\"},\"eTag\":\"bjwgnyfus\",\"zones\":[\"vtuikzhajq\",\"lcfhmlrqryxy\"],\"location\":\"nzrdpsovwxz\",\"tags\":{\"vntjlrigjk\":\"goeiybbabpfhvfsl\"},\"id\":\"kyrioovzid\",\"name\":\"xwaabzmifrygznmm\",\"type\":\"xrizkzobgop\"}],\"nextLink\":\"hsln\"}") .toObject(ElasticSnapshotPolicyVolumeList.class); - Assertions.assertEquals("a", model.value().get(0).location()); - Assertions.assertEquals("echndbnwieholew", model.value().get(0).tags().get("wiuub")); - Assertions.assertEquals("gvkzqkjjeokbze", model.value().get(0).properties().filePath()); - Assertions.assertEquals(8683941760335562724L, model.value().get(0).properties().size()); - Assertions.assertEquals(ElasticProtocolType.NFSV3, model.value().get(0).properties().protocolTypes().get(0)); - Assertions.assertEquals("pqxbkwvzgnzvdf", model.value().get(0).properties().snapshotResourceId()); - Assertions.assertEquals("t", + Assertions.assertEquals("nzrdpsovwxz", model.value().get(0).location()); + Assertions.assertEquals("goeiybbabpfhvfsl", model.value().get(0).tags().get("vntjlrigjk")); + Assertions.assertEquals("eqvcwwyyurmoch", model.value().get(0).properties().filePath()); + Assertions.assertEquals(3217967457297888054L, model.value().get(0).properties().size()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, model.value().get(0).properties().protocolTypes().get(0)); + Assertions.assertEquals("hlb", model.value().get(0).properties().snapshotResourceId()); + Assertions.assertEquals("bucljgkyexaogu", model.value().get(0).properties().dataProtection().snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("ndlatutmzlbi", + Assertions.assertEquals("p", model.value().get(0).properties().dataProtection().backup().elasticBackupPolicyResourceId()); - Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, model.value().get(0).properties().dataProtection().backup().policyEnforcement()); - Assertions.assertEquals("fhrbbpneqvcw", + Assertions.assertEquals("ault", model.value().get(0).properties().dataProtection().backup().elasticBackupVaultResourceId()); - Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.value().get(0).properties().snapshotDirectoryVisibility()); - Assertions.assertEquals(ElasticSmbEncryption.DISABLED, + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.value().get(0).properties().smbProperties().smbEncryption()); - Assertions.assertEquals("chpp", model.value().get(0).properties().backupResourceId()); - Assertions.assertEquals("pcpil", model.value().get(0).zones().get(0)); - Assertions.assertEquals("n", model.nextLink()); + Assertions.assertEquals("qwazlnqnmcjngzq", model.value().get(0).properties().backupResourceId()); + Assertions.assertEquals("vtuikzhajq", model.value().get(0).zones().get(0)); + Assertions.assertEquals("hsln", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyWeeklyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyWeeklyScheduleTests.java index aeba93e54762..186fdd06e0de 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyWeeklyScheduleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyWeeklyScheduleTests.java @@ -14,25 +14,25 @@ public final class ElasticSnapshotPolicyWeeklyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticSnapshotPolicyWeeklySchedule model = BinaryData.fromString( - "{\"snapshotsToKeep\":1599319524,\"days\":[\"Tuesday\",\"Sunday\",\"Sunday\",\"Monday\"],\"hour\":325946802,\"minute\":808258027}") + "{\"snapshotsToKeep\":2021110592,\"days\":[\"Thursday\",\"Wednesday\",\"Thursday\"],\"hour\":2067869753,\"minute\":454202274}") .toObject(ElasticSnapshotPolicyWeeklySchedule.class); - Assertions.assertEquals(1599319524, model.snapshotsToKeep()); - Assertions.assertEquals(DayOfWeek.TUESDAY, model.days().get(0)); - Assertions.assertEquals(325946802, model.hour()); - Assertions.assertEquals(808258027, model.minute()); + Assertions.assertEquals(2021110592, model.snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.days().get(0)); + Assertions.assertEquals(2067869753, model.hour()); + Assertions.assertEquals(454202274, model.minute()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ElasticSnapshotPolicyWeeklySchedule model - = new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1599319524) - .withDays(Arrays.asList(DayOfWeek.TUESDAY, DayOfWeek.SUNDAY, DayOfWeek.SUNDAY, DayOfWeek.MONDAY)) - .withHour(325946802) - .withMinute(808258027); + = new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(2021110592) + .withDays(Arrays.asList(DayOfWeek.THURSDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY)) + .withHour(2067869753) + .withMinute(454202274); model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyWeeklySchedule.class); - Assertions.assertEquals(1599319524, model.snapshotsToKeep()); - Assertions.assertEquals(DayOfWeek.TUESDAY, model.days().get(0)); - Assertions.assertEquals(325946802, model.hour()); - Assertions.assertEquals(808258027, model.minute()); + Assertions.assertEquals(2021110592, model.snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.days().get(0)); + Assertions.assertEquals(2067869753, model.hour()); + Assertions.assertEquals(454202274, model.minute()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateMockTests.java index 651088795093..25e20f42663a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateMockTests.java @@ -21,7 +21,7 @@ public final class ElasticSnapshotsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"obfelhldiuhz\",\"name\":\"gqlmfaewzgi\",\"type\":\"djpxpqht\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"hvrztnvg\",\"name\":\"shqrdgrt\",\"type\":\"mewjzlpyk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,8 +31,8 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ElasticSnapshot response = manager.elasticSnapshots() - .define("wffcvvye") - .withExistingElasticVolume("ghmp", "nwlslrcigtzjcvbx", "lapsnsso", "yxpavidnie") + .define("hpriylfm") + .withExistingElasticVolume("emmjauwcg", "efnoh", "itranizerwguda", "mxubvfbngfcoce") .withProperties(new ElasticSnapshotProperties()) .create(); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetWithResponseMockTests.java index aeb7201958dd..1e67f1b3b356 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class ElasticSnapshotsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"pqtmojhvrztnvgys\",\"name\":\"qrdgrtw\",\"type\":\"ewjzl\"}"; + = "{\"properties\":{\"provisioningState\":\"Patching\"},\"id\":\"ewqcfu\",\"name\":\"mdpv\",\"type\":\"zgl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ElasticSnapshot response = manager.elasticSnapshots() - .getWithResponse("anizerwgudasmxub", "fbngfcocef", "priylfmp", "trauds", "hlcdc", - com.azure.core.util.Context.NONE) + .getWithResponse("jwzzqseuzu", "kykcyqhyqqzz", "c", "keys", "ewfopazdazg", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeMockTests.java index d04f82ffd210..689d85dfed11 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeMockTests.java @@ -21,7 +21,7 @@ public final class ElasticSnapshotsListByElasticVolumeMockTests { @Test public void testListByElasticVolume() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\"},\"id\":\"wtltngvmreuptrk\",\"name\":\"zmijajwo\",\"type\":\"xfsv\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\"},\"id\":\"ruw\",\"name\":\"udrbcpftxudqyem\",\"type\":\"bunaucmcirtn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,8 +31,7 @@ public void testListByElasticVolume() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ElasticSnapshot> response = manager.elasticSnapshots() - .listByElasticVolume("ykcfazz", "jcayerzrransyby", "polwzrghsrlei", "kfscjfncjwv", - com.azure.core.util.Context.NONE); + .listByElasticVolume("jbkn", "zcl", "tzeyowmndcovd", "zqauxzan", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeBackupPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeBackupPropertiesTests.java index f46ce8c18c51..a8274a05d602 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeBackupPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeBackupPropertiesTests.java @@ -13,22 +13,22 @@ public final class ElasticVolumeBackupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticVolumeBackupProperties model = BinaryData.fromString( - "{\"elasticBackupPolicyResourceId\":\"gnitgvkxlzyq\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"gcealzxwh\"}") + "{\"elasticBackupPolicyResourceId\":\"cxy\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"jhlimmbcxfhbcpo\"}") .toObject(ElasticVolumeBackupProperties.class); - Assertions.assertEquals("gnitgvkxlzyq", model.elasticBackupPolicyResourceId()); - Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.policyEnforcement()); - Assertions.assertEquals("gcealzxwh", model.elasticBackupVaultResourceId()); + Assertions.assertEquals("cxy", model.elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, model.policyEnforcement()); + Assertions.assertEquals("jhlimmbcxfhbcpo", model.elasticBackupVaultResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ElasticVolumeBackupProperties model - = new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("gnitgvkxlzyq") - .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) - .withElasticBackupVaultResourceId("gcealzxwh"); + = new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("cxy") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) + .withElasticBackupVaultResourceId("jhlimmbcxfhbcpo"); model = BinaryData.fromObject(model).toObject(ElasticVolumeBackupProperties.class); - Assertions.assertEquals("gnitgvkxlzyq", model.elasticBackupPolicyResourceId()); - Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.policyEnforcement()); - Assertions.assertEquals("gcealzxwh", model.elasticBackupVaultResourceId()); + Assertions.assertEquals("cxy", model.elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, model.policyEnforcement()); + Assertions.assertEquals("jhlimmbcxfhbcpo", model.elasticBackupVaultResourceId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPatchPropertiesTests.java index 7aac9f380be9..cabe5f8411d2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPatchPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPatchPropertiesTests.java @@ -15,25 +15,25 @@ public final class ElasticVolumeDataProtectionPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticVolumeDataProtectionPatchProperties model = BinaryData.fromString( - "{\"snapshot\":{\"snapshotPolicyResourceId\":\"tgsfja\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"lhhxudbxvodhtnsi\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"z\"}}") + "{\"snapshot\":{\"snapshotPolicyResourceId\":\"gcealzxwh\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"symoyq\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"gdivbkbxg\"}}") .toObject(ElasticVolumeDataProtectionPatchProperties.class); - Assertions.assertEquals("tgsfja", model.snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("lhhxudbxvodhtnsi", model.backup().elasticBackupPolicyResourceId()); - Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, model.backup().policyEnforcement()); - Assertions.assertEquals("z", model.backup().elasticBackupVaultResourceId()); + Assertions.assertEquals("gcealzxwh", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("symoyq", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("gdivbkbxg", model.backup().elasticBackupVaultResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ElasticVolumeDataProtectionPatchProperties model = new ElasticVolumeDataProtectionPatchProperties() - .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("tgsfja")) - .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("lhhxudbxvodhtnsi") - .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) - .withElasticBackupVaultResourceId("z")); + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("gcealzxwh")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("symoyq") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("gdivbkbxg")); model = BinaryData.fromObject(model).toObject(ElasticVolumeDataProtectionPatchProperties.class); - Assertions.assertEquals("tgsfja", model.snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("lhhxudbxvodhtnsi", model.backup().elasticBackupPolicyResourceId()); - Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, model.backup().policyEnforcement()); - Assertions.assertEquals("z", model.backup().elasticBackupVaultResourceId()); + Assertions.assertEquals("gcealzxwh", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("symoyq", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("gdivbkbxg", model.backup().elasticBackupVaultResourceId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPropertiesTests.java index 1d8c7975384c..49e4e9a887ff 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPropertiesTests.java @@ -15,25 +15,25 @@ public final class ElasticVolumeDataProtectionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticVolumeDataProtectionProperties model = BinaryData.fromString( - "{\"snapshot\":{\"snapshotPolicyResourceId\":\"kenx\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"yefrpmpdnqqska\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"vmm\"}}") + "{\"snapshot\":{\"snapshotPolicyResourceId\":\"lnwiaaomylwe\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"lcsethwwnpj\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"swpchwahfbousn\"}}") .toObject(ElasticVolumeDataProtectionProperties.class); - Assertions.assertEquals("kenx", model.snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("yefrpmpdnqqska", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals("lnwiaaomylwe", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("lcsethwwnpj", model.backup().elasticBackupPolicyResourceId()); Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.backup().policyEnforcement()); - Assertions.assertEquals("vmm", model.backup().elasticBackupVaultResourceId()); + Assertions.assertEquals("swpchwahfbousn", model.backup().elasticBackupVaultResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ElasticVolumeDataProtectionProperties model = new ElasticVolumeDataProtectionProperties() - .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("kenx")) - .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("yefrpmpdnqqska") + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("lnwiaaomylwe")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("lcsethwwnpj") .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) - .withElasticBackupVaultResourceId("vmm")); + .withElasticBackupVaultResourceId("swpchwahfbousn")); model = BinaryData.fromObject(model).toObject(ElasticVolumeDataProtectionProperties.class); - Assertions.assertEquals("kenx", model.snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("yefrpmpdnqqska", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals("lnwiaaomylwe", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("lcsethwwnpj", model.backup().elasticBackupPolicyResourceId()); Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.backup().policyEnforcement()); - Assertions.assertEquals("vmm", model.backup().elasticBackupVaultResourceId()); + Assertions.assertEquals("swpchwahfbousn", model.backup().elasticBackupVaultResourceId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeInnerTests.java index 248b85ab2f26..17dc9320ad4a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeInnerTests.java @@ -30,109 +30,87 @@ public final class ElasticVolumeInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticVolumeInner model = BinaryData.fromString( - "{\"properties\":{\"filePath\":\"tg\",\"size\":3849034252951154606,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1521773196,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"hycav\",\"dggxdbeesmi\",\"knlrariaawiuagy\",\"wqfbylyrfgiagt\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1650535228,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"vusfzld\",\"ozuxylfsbtkadpys\",\"wn\",\"tgkbugrjqctojc\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":2091790952,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"yqdhcuplcplcw\"],\"rootAccess\":\"Enabled\"}]},\"protocolTypes\":[\"NFSv4\",\"NFSv3\",\"SMB\",\"NFSv4\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"zbsrgnowcj\",\"mountTargets\":[{\"ipAddress\":\"vecactx\",\"smbServerFqdn\":\"oteyowc\"},{\"ipAddress\":\"qovekqvgqou\",\"smbServerFqdn\":\"fzmpjwyivq\"},{\"ipAddress\":\"f\",\"smbServerFqdn\":\"vhrfsphuagrt\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"eusqczkvyklxu\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"affmmfblcqc\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"qibrtalme\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"lqxihhrmooiz\",\"restorationState\":\"Failed\"},\"eTag\":\"pxiutc\",\"zones\":[\"zhyrpeto\",\"e\"],\"location\":\"oxslh\",\"tags\":{\"aehvvibrxjjstoq\":\"labrqnkkzjcjbtr\",\"bklftidgfcwqmpim\":\"eitpkxztmo\"},\"id\":\"qxzhem\",\"name\":\"yhohujswtwkozzwc\",\"type\":\"lkb\"}") + "{\"properties\":{\"filePath\":\"avluwmncs\",\"size\":8101730530692599570,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":671639646,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"gbdhuzqgnjdg\",\"ynscl\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"SMB\",\"NFSv4\"],\"provisioningState\":\"Accepted\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"tkubotppn\",\"mountTargets\":[{\"ipAddress\":\"xhihfrbbcevqagtl\",\"smbServerFqdn\":\"hlfkqojpy\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"rdcnifmzzsdy\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"nysuxmprafwgckh\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"d\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"roud\",\"restorationState\":\"Failed\"},\"eTag\":\"vehhrvkbunzozu\",\"zones\":[\"xg\",\"moy\",\"cdyuibhmfdnbzyd\",\"f\"],\"location\":\"cjnaeoisrvhmgor\",\"tags\":{\"faxvxil\":\"kiscvwmzhwpl\",\"nzeyqxtjj\":\"btgn\",\"vodggxdbee\":\"zqlqhyc\"},\"id\":\"mieknlraria\",\"name\":\"wiuagydwqf\",\"type\":\"ylyrfgiagtco\"}") .toObject(ElasticVolumeInner.class); - Assertions.assertEquals("oxslh", model.location()); - Assertions.assertEquals("labrqnkkzjcjbtr", model.tags().get("aehvvibrxjjstoq")); - Assertions.assertEquals("tg", model.properties().filePath()); - Assertions.assertEquals(3849034252951154606L, model.properties().size()); - Assertions.assertEquals(1521773196, model.properties().exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, + Assertions.assertEquals("cjnaeoisrvhmgor", model.location()); + Assertions.assertEquals("kiscvwmzhwpl", model.tags().get("faxvxil")); + Assertions.assertEquals("avluwmncs", model.properties().filePath()); + Assertions.assertEquals(8101730530692599570L, model.properties().size()); + Assertions.assertEquals(671639646, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, model.properties().exportPolicy().rules().get(0).unixAccessRule()); - Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); - Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); - Assertions.assertEquals("hycav", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("gbdhuzqgnjdg", + model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); Assertions.assertEquals(ElasticRootAccess.DISABLED, model.properties().exportPolicy().rules().get(0).rootAccess()); - Assertions.assertEquals(ElasticProtocolType.NFSV4, model.properties().protocolTypes().get(0)); - Assertions.assertEquals("zbsrgnowcj", model.properties().snapshotResourceId()); - Assertions.assertEquals("eusqczkvyklxu", + Assertions.assertEquals(ElasticProtocolType.SMB, model.properties().protocolTypes().get(0)); + Assertions.assertEquals("tkubotppn", model.properties().snapshotResourceId()); + Assertions.assertEquals("rdcnifmzzsdy", model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("affmmfblcqc", + Assertions.assertEquals("nysuxmprafwgckh", model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.properties().dataProtection().backup().policyEnforcement()); - Assertions.assertEquals("qibrtalme", - model.properties().dataProtection().backup().elasticBackupVaultResourceId()); - Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.properties().snapshotDirectoryVisibility()); - Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.properties().smbProperties().smbEncryption()); - Assertions.assertEquals("lqxihhrmooiz", model.properties().backupResourceId()); - Assertions.assertEquals("zhyrpeto", model.zones().get(0)); + Assertions.assertEquals("d", model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("roud", model.properties().backupResourceId()); + Assertions.assertEquals("xg", model.zones().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ElasticVolumeInner model - = new ElasticVolumeInner().withLocation("oxslh") - .withTags(mapOf("aehvvibrxjjstoq", "labrqnkkzjcjbtr", "bklftidgfcwqmpim", "eitpkxztmo")) - .withProperties( - new ElasticVolumeProperties().withFilePath("tg") - .withSize(3849034252951154606L) - .withExportPolicy( - new ElasticExportPolicy() - .withRules( - Arrays.asList( - new ElasticExportPolicyRule().withRuleIndex(1521773196) - .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) - .withNfsv3(ElasticNfsv3Access.DISABLED) - .withNfsv4(ElasticNfsv4Access.DISABLED) - .withAllowedClients(Arrays.asList("hycav", "dggxdbeesmi", "knlrariaawiuagy", - "wqfbylyrfgiagt")) - .withRootAccess(ElasticRootAccess.DISABLED), - new ElasticExportPolicyRule().withRuleIndex(1650535228) - .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) - .withNfsv3(ElasticNfsv3Access.ENABLED) - .withNfsv4(ElasticNfsv4Access.DISABLED) - .withAllowedClients( - Arrays.asList("vusfzld", "ozuxylfsbtkadpys", "wn", "tgkbugrjqctojc")) - .withRootAccess(ElasticRootAccess.DISABLED), - new ElasticExportPolicyRule().withRuleIndex(2091790952) - .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) - .withNfsv3(ElasticNfsv3Access.ENABLED) - .withNfsv4(ElasticNfsv4Access.ENABLED) - .withAllowedClients(Arrays.asList("yqdhcuplcplcw")) - .withRootAccess(ElasticRootAccess.ENABLED)))) - .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV4, ElasticProtocolType.NFSV3, - ElasticProtocolType.SMB, ElasticProtocolType.NFSV4)) - .withSnapshotResourceId("zbsrgnowcj") - .withDataProtection(new ElasticVolumeDataProtectionProperties() - .withSnapshot( - new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("eusqczkvyklxu")) - .withBackup( - new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("affmmfblcqc") - .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) - .withElasticBackupVaultResourceId("qibrtalme"))) - .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) - .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED)) - .withBackupResourceId("lqxihhrmooiz")) - .withZones(Arrays.asList("zhyrpeto", "e")); + ElasticVolumeInner model = new ElasticVolumeInner().withLocation("cjnaeoisrvhmgor") + .withTags(mapOf("faxvxil", "kiscvwmzhwpl", "nzeyqxtjj", "btgn", "vodggxdbee", "zqlqhyc")) + .withProperties(new ElasticVolumeProperties().withFilePath("avluwmncs") + .withSize(8101730530692599570L) + .withExportPolicy(new ElasticExportPolicy() + .withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(671639646) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("gbdhuzqgnjdg", "ynscl")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.SMB, ElasticProtocolType.NFSV4)) + .withSnapshotResourceId("tkubotppn") + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("rdcnifmzzsdy")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("nysuxmprafwgckh") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("d"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.VISIBLE) + .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED)) + .withBackupResourceId("roud")) + .withZones(Arrays.asList("xg", "moy", "cdyuibhmfdnbzyd", "f")); model = BinaryData.fromObject(model).toObject(ElasticVolumeInner.class); - Assertions.assertEquals("oxslh", model.location()); - Assertions.assertEquals("labrqnkkzjcjbtr", model.tags().get("aehvvibrxjjstoq")); - Assertions.assertEquals("tg", model.properties().filePath()); - Assertions.assertEquals(3849034252951154606L, model.properties().size()); - Assertions.assertEquals(1521773196, model.properties().exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, + Assertions.assertEquals("cjnaeoisrvhmgor", model.location()); + Assertions.assertEquals("kiscvwmzhwpl", model.tags().get("faxvxil")); + Assertions.assertEquals("avluwmncs", model.properties().filePath()); + Assertions.assertEquals(8101730530692599570L, model.properties().size()); + Assertions.assertEquals(671639646, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, model.properties().exportPolicy().rules().get(0).unixAccessRule()); - Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); - Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); - Assertions.assertEquals("hycav", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("gbdhuzqgnjdg", + model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); Assertions.assertEquals(ElasticRootAccess.DISABLED, model.properties().exportPolicy().rules().get(0).rootAccess()); - Assertions.assertEquals(ElasticProtocolType.NFSV4, model.properties().protocolTypes().get(0)); - Assertions.assertEquals("zbsrgnowcj", model.properties().snapshotResourceId()); - Assertions.assertEquals("eusqczkvyklxu", + Assertions.assertEquals(ElasticProtocolType.SMB, model.properties().protocolTypes().get(0)); + Assertions.assertEquals("tkubotppn", model.properties().snapshotResourceId()); + Assertions.assertEquals("rdcnifmzzsdy", model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("affmmfblcqc", + Assertions.assertEquals("nysuxmprafwgckh", model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.properties().dataProtection().backup().policyEnforcement()); - Assertions.assertEquals("qibrtalme", - model.properties().dataProtection().backup().elasticBackupVaultResourceId()); - Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.properties().snapshotDirectoryVisibility()); - Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.properties().smbProperties().smbEncryption()); - Assertions.assertEquals("lqxihhrmooiz", model.properties().backupResourceId()); - Assertions.assertEquals("zhyrpeto", model.zones().get(0)); + Assertions.assertEquals("d", model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("roud", model.properties().backupResourceId()); + Assertions.assertEquals("xg", model.zones().get(0)); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeListResultTests.java index 3048895df312..8876ffaf1cb8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeListResultTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeListResultTests.java @@ -16,28 +16,28 @@ public final class ElasticVolumeListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticVolumeListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"filePath\":\"kdlpa\",\"size\":8631416850120033003,\"exportPolicy\":{\"rules\":[{},{}]},\"protocolTypes\":[\"SMB\"],\"provisioningState\":\"Deleting\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"m\",\"mountTargets\":[{\"ipAddress\":\"dfgsftufqobrj\",\"smbServerFqdn\":\"acgcckknhx\"},{\"ipAddress\":\"zvytnrzvuljraaer\",\"smbServerFqdn\":\"okqgukkjq\"},{\"ipAddress\":\"broyla\",\"smbServerFqdn\":\"ulcdisdosf\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"vgjrwhr\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"cytdclxgccknfnwm\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"pdvjdhttzaefedx\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"k\",\"restorationState\":\"Restoring\"},\"eTag\":\"dqns\",\"zones\":[\"pbgtgkylkdghrj\",\"uutlwxezwzhok\",\"bwnhhtql\"],\"location\":\"hgppipifhpfeoa\",\"tags\":{\"heafidlt\":\"cxtxjc\",\"oiftxfkfwegprh\":\"gsresmkssj\"},\"id\":\"tillucbiqtg\",\"name\":\"q\",\"type\":\"hm\"},{\"properties\":{\"filePath\":\"sldrizetpwbral\",\"size\":4960885543522270739,\"exportPolicy\":{\"rules\":[{},{},{},{}]},\"protocolTypes\":[\"NFSv3\",\"NFSv4\",\"NFSv3\"],\"provisioningState\":\"Moving\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"kan\",\"mountTargets\":[{\"ipAddress\":\"n\",\"smbServerFqdn\":\"ha\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"hjlmu\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"primr\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"eecjmeis\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"lwxdzaum\",\"restorationState\":\"Failed\"},\"eTag\":\"hguuf\",\"zones\":[\"oyjathwtzol\",\"a\",\"mwmdxmebwjscjpa\"],\"location\":\"xveabf\",\"tags\":{\"ijddtvqc\":\"mwmqtibx\",\"jaeukmrsieekpn\":\"tad\",\"pibudqwyxebeybpm\":\"zaapmudqmeqwi\"},\"id\":\"znrtffyaqit\",\"name\":\"hheioqaqhvseuf\",\"type\":\"qyrxp\"}],\"nextLink\":\"cgq\"}") + "{\"value\":[{\"properties\":{\"filePath\":\"uwasqvd\",\"size\":160464775696634400,\"exportPolicy\":{\"rules\":[{},{},{},{}]},\"protocolTypes\":[\"NFSv4\",\"SMB\",\"NFSv4\"],\"provisioningState\":\"Failed\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"bezkgimsidxasic\",\"mountTargets\":[{\"ipAddress\":\"vjskgfmoc\",\"smbServerFqdn\":\"hpqgatjeaahhvj\"},{\"ipAddress\":\"na\",\"smbServerFqdn\":\"ybbjjidjksyx\"},{\"ipAddress\":\"xvxevblbjednljla\",\"smbServerFqdn\":\"uaulxunsm\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"ppxynenls\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"izzgwkln\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"feycxcktp\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"eammxqiekkkzddr\",\"restorationState\":\"Restored\"},\"eTag\":\"ojbmxv\",\"zones\":[\"efdeesve\",\"uij\"],\"location\":\"txsu\",\"tags\":{\"ibabxvititvtzeex\":\"tujwsawdd\",\"tfgle\":\"vo\",\"pypqtgsfj\":\"dmdqb\",\"db\":\"cbslhhx\"},\"id\":\"vodhtn\",\"name\":\"irudh\",\"type\":\"m\"},{\"properties\":{\"filePath\":\"sckdlp\",\"size\":9125844466274989029,\"exportPolicy\":{\"rules\":[{}]},\"protocolTypes\":[\"SMB\",\"SMB\"],\"provisioningState\":\"Deleting\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"m\",\"mountTargets\":[{\"ipAddress\":\"dfgsftufqobrj\",\"smbServerFqdn\":\"acgcckknhx\"},{\"ipAddress\":\"zvytnrzvuljraaer\",\"smbServerFqdn\":\"okqgukkjq\"},{\"ipAddress\":\"broyla\",\"smbServerFqdn\":\"ulcdisdosf\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"vgjrwhr\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"cytdclxgccknfnwm\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"pdvjdhttzaefedx\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"k\",\"restorationState\":\"Restoring\"},\"eTag\":\"dqns\",\"zones\":[\"pbgtgkylkdghrj\",\"uutlwxezwzhok\",\"bwnhhtql\"],\"location\":\"hgppipifhpfeoa\",\"tags\":{\"heafidlt\":\"cxtxjc\",\"oiftxfkfwegprh\":\"gsresmkssj\"},\"id\":\"tillucbiqtg\",\"name\":\"q\",\"type\":\"hm\"}],\"nextLink\":\"sldrizetpwbral\"}") .toObject(ElasticVolumeListResult.class); - Assertions.assertEquals("hgppipifhpfeoa", model.value().get(0).location()); - Assertions.assertEquals("cxtxjc", model.value().get(0).tags().get("heafidlt")); - Assertions.assertEquals("kdlpa", model.value().get(0).properties().filePath()); - Assertions.assertEquals(8631416850120033003L, model.value().get(0).properties().size()); - Assertions.assertEquals(ElasticProtocolType.SMB, model.value().get(0).properties().protocolTypes().get(0)); - Assertions.assertEquals("m", model.value().get(0).properties().snapshotResourceId()); - Assertions.assertEquals("vgjrwhr", + Assertions.assertEquals("txsu", model.value().get(0).location()); + Assertions.assertEquals("tujwsawdd", model.value().get(0).tags().get("ibabxvititvtzeex")); + Assertions.assertEquals("uwasqvd", model.value().get(0).properties().filePath()); + Assertions.assertEquals(160464775696634400L, model.value().get(0).properties().size()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, model.value().get(0).properties().protocolTypes().get(0)); + Assertions.assertEquals("bezkgimsidxasic", model.value().get(0).properties().snapshotResourceId()); + Assertions.assertEquals("ppxynenls", model.value().get(0).properties().dataProtection().snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("cytdclxgccknfnwm", + Assertions.assertEquals("izzgwkln", model.value().get(0).properties().dataProtection().backup().elasticBackupPolicyResourceId()); Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, model.value().get(0).properties().dataProtection().backup().policyEnforcement()); - Assertions.assertEquals("pdvjdhttzaefedx", + Assertions.assertEquals("feycxcktp", model.value().get(0).properties().dataProtection().backup().elasticBackupVaultResourceId()); - Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, model.value().get(0).properties().snapshotDirectoryVisibility()); Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.value().get(0).properties().smbProperties().smbEncryption()); - Assertions.assertEquals("k", model.value().get(0).properties().backupResourceId()); - Assertions.assertEquals("pbgtgkylkdghrj", model.value().get(0).zones().get(0)); - Assertions.assertEquals("cgq", model.nextLink()); + Assertions.assertEquals("eammxqiekkkzddr", model.value().get(0).properties().backupResourceId()); + Assertions.assertEquals("efdeesve", model.value().get(0).zones().get(0)); + Assertions.assertEquals("sldrizetpwbral", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumePropertiesTests.java index 054dfb13efc2..89c9fea16423 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumePropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumePropertiesTests.java @@ -27,79 +27,86 @@ public final class ElasticVolumePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticVolumeProperties model = BinaryData.fromString( - "{\"filePath\":\"wpfaj\",\"size\":2813139304371547019,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1722549420,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"hsnvkcdmxzrp\",\"aimlnwiaaom\",\"l\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":835106090,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"npjhlfzswpchwahf\",\"ousnfepgfewe\",\"wlyxgncxyk\",\"hdjhlimmbcx\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":331049008,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"hqizxfpxtgqscj\",\"vftjuhd\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv4\"],\"provisioningState\":\"Accepted\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"pijrajcivmmghf\",\"mountTargets\":[{\"ipAddress\":\"rxgkne\",\"smbServerFqdn\":\"yinzqodfvpgs\"},{\"ipAddress\":\"xgsg\",\"smbServerFqdn\":\"fgzdjtxvz\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"v\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"vl\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"qusrdvetnws\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"duy\",\"restorationState\":\"Restoring\"}") + "{\"filePath\":\"ocqwogfnzjvus\",\"size\":943763718706426490,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1190667114,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"adpysownbt\",\"kb\",\"grjqctojcmi\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":525772305,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"dh\",\"u\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":967461151,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"lhzdsqtzb\",\"rgnowcjhfgm\",\"ecactx\",\"wotey\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1671078862,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"qo\",\"wifzmp\",\"wyivqikf\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv3\",\"SMB\",\"SMB\",\"NFSv3\"],\"provisioningState\":\"Failed\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"ttikteusqczkvykl\",\"mountTargets\":[{\"ipAddress\":\"jaffmmfblcqcuu\",\"smbServerFqdn\":\"qibrtalme\"},{\"ipAddress\":\"t\",\"smbServerFqdn\":\"dslqxihhrmooizqs\"},{\"ipAddress\":\"pxiutc\",\"smbServerFqdn\":\"pzhyr\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"g\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"oxslh\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"abrqnkkzj\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"ehvvib\",\"restorationState\":\"Failed\"}") .toObject(ElasticVolumeProperties.class); - Assertions.assertEquals("wpfaj", model.filePath()); - Assertions.assertEquals(2813139304371547019L, model.size()); - Assertions.assertEquals(1722549420, model.exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, model.exportPolicy().rules().get(0).unixAccessRule()); - Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals("ocqwogfnzjvus", model.filePath()); + Assertions.assertEquals(943763718706426490L, model.size()); + Assertions.assertEquals(1190667114, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, model.exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.exportPolicy().rules().get(0).nfsv3()); Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.exportPolicy().rules().get(0).nfsv4()); - Assertions.assertEquals("hsnvkcdmxzrp", model.exportPolicy().rules().get(0).allowedClients().get(0)); - Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); - Assertions.assertEquals(ElasticProtocolType.NFSV4, model.protocolTypes().get(0)); - Assertions.assertEquals("pijrajcivmmghf", model.snapshotResourceId()); - Assertions.assertEquals("v", model.dataProtection().snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("vl", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals("adpysownbt", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV3, model.protocolTypes().get(0)); + Assertions.assertEquals("ttikteusqczkvykl", model.snapshotResourceId()); + Assertions.assertEquals("g", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("oxslh", model.dataProtection().backup().elasticBackupPolicyResourceId()); Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.dataProtection().backup().policyEnforcement()); - Assertions.assertEquals("qusrdvetnws", model.dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals("abrqnkkzj", model.dataProtection().backup().elasticBackupVaultResourceId()); Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.snapshotDirectoryVisibility()); - Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbProperties().smbEncryption()); - Assertions.assertEquals("duy", model.backupResourceId()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.smbProperties().smbEncryption()); + Assertions.assertEquals("ehvvib", model.backupResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ElasticVolumeProperties model = new ElasticVolumeProperties().withFilePath("wpfaj") - .withSize(2813139304371547019L) + ElasticVolumeProperties model = new ElasticVolumeProperties().withFilePath("ocqwogfnzjvus") + .withSize(943763718706426490L) .withExportPolicy(new ElasticExportPolicy().withRules(Arrays.asList( - new ElasticExportPolicyRule().withRuleIndex(1722549420) - .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) - .withNfsv3(ElasticNfsv3Access.DISABLED) + new ElasticExportPolicyRule().withRuleIndex(1190667114) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.ENABLED) .withNfsv4(ElasticNfsv4Access.DISABLED) - .withAllowedClients(Arrays.asList("hsnvkcdmxzrp", "aimlnwiaaom", "l")) + .withAllowedClients(Arrays.asList("adpysownbt", "kb", "grjqctojcmi")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(525772305) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("dh", "u")) .withRootAccess(ElasticRootAccess.ENABLED), - new ElasticExportPolicyRule().withRuleIndex(835106090) - .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + new ElasticExportPolicyRule().withRuleIndex(967461151) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) .withNfsv3(ElasticNfsv3Access.DISABLED) - .withNfsv4(ElasticNfsv4Access.ENABLED) - .withAllowedClients(Arrays.asList("npjhlfzswpchwahf", "ousnfepgfewe", "wlyxgncxyk", "hdjhlimmbcx")) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("lhzdsqtzb", "rgnowcjhfgm", "ecactx", "wotey")) .withRootAccess(ElasticRootAccess.DISABLED), - new ElasticExportPolicyRule().withRuleIndex(331049008) - .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + new ElasticExportPolicyRule().withRuleIndex(1671078862) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) .withNfsv3(ElasticNfsv3Access.DISABLED) .withNfsv4(ElasticNfsv4Access.ENABLED) - .withAllowedClients(Arrays.asList("hqizxfpxtgqscj", "vftjuhd")) + .withAllowedClients(Arrays.asList("qo", "wifzmp", "wyivqikf")) .withRootAccess(ElasticRootAccess.DISABLED)))) - .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV4)) - .withSnapshotResourceId("pijrajcivmmghf") + .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV3, ElasticProtocolType.SMB, + ElasticProtocolType.SMB, ElasticProtocolType.NFSV3)) + .withSnapshotResourceId("ttikteusqczkvykl") .withDataProtection(new ElasticVolumeDataProtectionProperties() - .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("v")) - .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("vl") + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("g")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("oxslh") .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) - .withElasticBackupVaultResourceId("qusrdvetnws"))) + .withElasticBackupVaultResourceId("abrqnkkzj"))) .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) - .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED)) - .withBackupResourceId("duy"); + .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED)) + .withBackupResourceId("ehvvib"); model = BinaryData.fromObject(model).toObject(ElasticVolumeProperties.class); - Assertions.assertEquals("wpfaj", model.filePath()); - Assertions.assertEquals(2813139304371547019L, model.size()); - Assertions.assertEquals(1722549420, model.exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, model.exportPolicy().rules().get(0).unixAccessRule()); - Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals("ocqwogfnzjvus", model.filePath()); + Assertions.assertEquals(943763718706426490L, model.size()); + Assertions.assertEquals(1190667114, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, model.exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.exportPolicy().rules().get(0).nfsv3()); Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.exportPolicy().rules().get(0).nfsv4()); - Assertions.assertEquals("hsnvkcdmxzrp", model.exportPolicy().rules().get(0).allowedClients().get(0)); - Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); - Assertions.assertEquals(ElasticProtocolType.NFSV4, model.protocolTypes().get(0)); - Assertions.assertEquals("pijrajcivmmghf", model.snapshotResourceId()); - Assertions.assertEquals("v", model.dataProtection().snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("vl", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals("adpysownbt", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV3, model.protocolTypes().get(0)); + Assertions.assertEquals("ttikteusqczkvykl", model.snapshotResourceId()); + Assertions.assertEquals("g", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("oxslh", model.dataProtection().backup().elasticBackupPolicyResourceId()); Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.dataProtection().backup().policyEnforcement()); - Assertions.assertEquals("qusrdvetnws", model.dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals("abrqnkkzj", model.dataProtection().backup().elasticBackupVaultResourceId()); Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.snapshotDirectoryVisibility()); - Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbProperties().smbEncryption()); - Assertions.assertEquals("duy", model.backupResourceId()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.smbProperties().smbEncryption()); + Assertions.assertEquals("ehvvib", model.backupResourceId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeRevertTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeRevertTests.java index 1b21fdb4f24b..ba820881bd81 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeRevertTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeRevertTests.java @@ -12,14 +12,14 @@ public final class ElasticVolumeRevertTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticVolumeRevert model - = BinaryData.fromString("{\"snapshotResourceId\":\"ismjqfrddgamqu\"}").toObject(ElasticVolumeRevert.class); - Assertions.assertEquals("ismjqfrddgamqu", model.snapshotResourceId()); + = BinaryData.fromString("{\"snapshotResourceId\":\"ibph\"}").toObject(ElasticVolumeRevert.class); + Assertions.assertEquals("ibph", model.snapshotResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ElasticVolumeRevert model = new ElasticVolumeRevert().withSnapshotResourceId("ismjqfrddgamqu"); + ElasticVolumeRevert model = new ElasticVolumeRevert().withSnapshotResourceId("ibph"); model = BinaryData.fromObject(model).toObject(ElasticVolumeRevert.class); - Assertions.assertEquals("ismjqfrddgamqu", model.snapshotResourceId()); + Assertions.assertEquals("ibph", model.snapshotResourceId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeSnapshotPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeSnapshotPropertiesTests.java index db68300f214e..45c90fbb0d3b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeSnapshotPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeSnapshotPropertiesTests.java @@ -11,16 +11,16 @@ public final class ElasticVolumeSnapshotPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ElasticVolumeSnapshotProperties model = BinaryData.fromString("{\"snapshotPolicyResourceId\":\"pqfrtqlkz\"}") + ElasticVolumeSnapshotProperties model = BinaryData.fromString("{\"snapshotPolicyResourceId\":\"pgfewetwlyx\"}") .toObject(ElasticVolumeSnapshotProperties.class); - Assertions.assertEquals("pqfrtqlkz", model.snapshotPolicyResourceId()); + Assertions.assertEquals("pgfewetwlyx", model.snapshotPolicyResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ElasticVolumeSnapshotProperties model - = new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("pqfrtqlkz"); + = new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("pgfewetwlyx"); model = BinaryData.fromObject(model).toObject(ElasticVolumeSnapshotProperties.class); - Assertions.assertEquals("pqfrtqlkz", model.snapshotPolicyResourceId()); + Assertions.assertEquals("pgfewetwlyx", model.snapshotPolicyResourceId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdatePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdatePropertiesTests.java index 180342ed5f25..5a6dba867908 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdatePropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdatePropertiesTests.java @@ -26,67 +26,61 @@ public final class ElasticVolumeUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticVolumeUpdateProperties model = BinaryData.fromString( - "{\"size\":6340644129016563843,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1430018563,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"klnsrmffey\",\"xcktpiymerteeamm\",\"qiekkkzddrt\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":221974172,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"fdeesvecuijpxtx\",\"uwprtujwsawd\"],\"rootAccess\":\"Disabled\"}]},\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"xvititvtz\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"avoxtfg\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"m\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"}}") + "{\"size\":5868166807959460587,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1411302775,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"hqlyvijo\",\"wivkxo\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":1386333494,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"cpwpg\",\"lrcivtsoxfrke\",\"xpmyyefrpmpdnq\"],\"rootAccess\":\"Enabled\"}]},\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"oqvm\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"pqfrtqlkz\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"itgvkx\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"}}") .toObject(ElasticVolumeUpdateProperties.class); - Assertions.assertEquals(6340644129016563843L, model.size()); - Assertions.assertEquals(1430018563, model.exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, model.exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(5868166807959460587L, model.size()); + Assertions.assertEquals(1411302775, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, model.exportPolicy().rules().get(0).unixAccessRule()); Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.exportPolicy().rules().get(0).nfsv3()); - Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.exportPolicy().rules().get(0).nfsv4()); - Assertions.assertEquals("klnsrmffey", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("hqlyvijo", model.exportPolicy().rules().get(0).allowedClients().get(0)); Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); - Assertions.assertEquals("xvititvtz", model.dataProtection().snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("avoxtfg", model.dataProtection().backup().elasticBackupPolicyResourceId()); - Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + Assertions.assertEquals("oqvm", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("pqfrtqlkz", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, model.dataProtection().backup().policyEnforcement()); - Assertions.assertEquals("m", model.dataProtection().backup().elasticBackupVaultResourceId()); - Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, model.snapshotDirectoryVisibility()); + Assertions.assertEquals("itgvkx", model.dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.snapshotDirectoryVisibility()); Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbProperties().smbEncryption()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ElasticVolumeUpdateProperties model - = new ElasticVolumeUpdateProperties().withSize(6340644129016563843L) - .withExportPolicy( - new ElasticExportPolicy() - .withRules( - Arrays - .asList( - new ElasticExportPolicyRule().withRuleIndex(1430018563) - .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) - .withNfsv3(ElasticNfsv3Access.ENABLED) - .withNfsv4(ElasticNfsv4Access.ENABLED) - .withAllowedClients( - Arrays.asList("klnsrmffey", "xcktpiymerteeamm", "qiekkkzddrt")) - .withRootAccess(ElasticRootAccess.ENABLED), - new ElasticExportPolicyRule().withRuleIndex(221974172) - .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) - .withNfsv3(ElasticNfsv3Access.DISABLED) - .withNfsv4(ElasticNfsv4Access.DISABLED) - .withAllowedClients(Arrays.asList("fdeesvecuijpxtx", "uwprtujwsawd")) - .withRootAccess(ElasticRootAccess.DISABLED)))) - .withDataProtection(new ElasticVolumeDataProtectionPatchProperties() - .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("xvititvtz")) - .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("avoxtfg") - .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) - .withElasticBackupVaultResourceId("m"))) - .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.VISIBLE) - .withSmbProperties(new ElasticSmbPatchProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED)); + ElasticVolumeUpdateProperties model = new ElasticVolumeUpdateProperties().withSize(5868166807959460587L) + .withExportPolicy(new ElasticExportPolicy().withRules(Arrays.asList( + new ElasticExportPolicyRule().withRuleIndex(1411302775) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("hqlyvijo", "wivkxo")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(1386333494) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("cpwpg", "lrcivtsoxfrke", "xpmyyefrpmpdnq")) + .withRootAccess(ElasticRootAccess.ENABLED)))) + .withDataProtection(new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("oqvm")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("pqfrtqlkz") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) + .withElasticBackupVaultResourceId("itgvkx"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) + .withSmbProperties(new ElasticSmbPatchProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED)); model = BinaryData.fromObject(model).toObject(ElasticVolumeUpdateProperties.class); - Assertions.assertEquals(6340644129016563843L, model.size()); - Assertions.assertEquals(1430018563, model.exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, model.exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(5868166807959460587L, model.size()); + Assertions.assertEquals(1411302775, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, model.exportPolicy().rules().get(0).unixAccessRule()); Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.exportPolicy().rules().get(0).nfsv3()); - Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.exportPolicy().rules().get(0).nfsv4()); - Assertions.assertEquals("klnsrmffey", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("hqlyvijo", model.exportPolicy().rules().get(0).allowedClients().get(0)); Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); - Assertions.assertEquals("xvititvtz", model.dataProtection().snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("avoxtfg", model.dataProtection().backup().elasticBackupPolicyResourceId()); - Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + Assertions.assertEquals("oqvm", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("pqfrtqlkz", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, model.dataProtection().backup().policyEnforcement()); - Assertions.assertEquals("m", model.dataProtection().backup().elasticBackupVaultResourceId()); - Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, model.snapshotDirectoryVisibility()); + Assertions.assertEquals("itgvkx", model.dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.snapshotDirectoryVisibility()); Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbProperties().smbEncryption()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdateTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdateTests.java index e6fa38ff186b..cd6017eb3875 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdateTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdateTests.java @@ -29,74 +29,95 @@ public final class ElasticVolumeUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ElasticVolumeUpdate model = BinaryData.fromString( - "{\"tags\":{\"hlwigdivbkbxg\":\"moy\"},\"properties\":{\"size\":6821670520079081021,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1690246024,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"xakjsqzhzb\",\"zkgimsid\",\"asi\",\"ddyvvjskgfmo\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":540587127,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"hhvjhh\",\"akz\",\"bbjjidjksyxk\"],\"rootAccess\":\"Enabled\"}]},\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"blbjedn\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"age\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"xuns\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"}}}") + "{\"tags\":{\"izxfpxt\":\"jzh\",\"qaz\":\"qscjavftjuh\"},\"properties\":{\"size\":1324563341134275021,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1904332888,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"ghfcfiwrxgkneuvy\",\"nzqodfvpg\",\"hoxgsgbpf\",\"zdjtxvzflbqv\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":887715159,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"dvetnws\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":2027553854,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"zhyrmewipmve\",\"dxukuqgsjjxundxg\",\"etw\",\"hhzjhfj\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":1263612367,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"qsxvmhf\"],\"rootAccess\":\"Enabled\"}]},\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"hsasbhu\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"ohyuemslynsq\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"oobrlttyms\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"}}}") .toObject(ElasticVolumeUpdate.class); - Assertions.assertEquals("moy", model.tags().get("hlwigdivbkbxg")); - Assertions.assertEquals(6821670520079081021L, model.properties().size()); - Assertions.assertEquals(1690246024, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals("jzh", model.tags().get("izxfpxt")); + Assertions.assertEquals(1324563341134275021L, model.properties().size()); + Assertions.assertEquals(1904332888, model.properties().exportPolicy().rules().get(0).ruleIndex()); Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, model.properties().exportPolicy().rules().get(0).unixAccessRule()); Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); - Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); - Assertions.assertEquals("xakjsqzhzb", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); - Assertions.assertEquals(ElasticRootAccess.ENABLED, + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("ghfcfiwrxgkneuvy", + model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, model.properties().exportPolicy().rules().get(0).rootAccess()); - Assertions.assertEquals("blbjedn", model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("age", model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); - Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + Assertions.assertEquals("hsasbhu", model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("ohyuemslynsq", + model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.properties().dataProtection().backup().policyEnforcement()); - Assertions.assertEquals("xuns", model.properties().dataProtection().backup().elasticBackupVaultResourceId()); - Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals("oobrlttyms", + model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, model.properties().snapshotDirectoryVisibility()); Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.properties().smbProperties().smbEncryption()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ElasticVolumeUpdate model - = new ElasticVolumeUpdate().withTags(mapOf("hlwigdivbkbxg", "moy")) + = new ElasticVolumeUpdate().withTags(mapOf("izxfpxt", "jzh", "qaz", "qscjavftjuh")) .withProperties( - new ElasticVolumeUpdateProperties().withSize(6821670520079081021L) + new ElasticVolumeUpdateProperties().withSize(1324563341134275021L) .withExportPolicy( new ElasticExportPolicy() - .withRules(Arrays.asList( - new ElasticExportPolicyRule().withRuleIndex(1690246024) - .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) - .withNfsv3(ElasticNfsv3Access.ENABLED) - .withNfsv4(ElasticNfsv4Access.ENABLED) - .withAllowedClients( - Arrays.asList("xakjsqzhzb", "zkgimsid", "asi", "ddyvvjskgfmo")) - .withRootAccess(ElasticRootAccess.ENABLED), - new ElasticExportPolicyRule().withRuleIndex(540587127) - .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) - .withNfsv3(ElasticNfsv3Access.DISABLED) - .withNfsv4(ElasticNfsv4Access.DISABLED) - .withAllowedClients(Arrays.asList("hhvjhh", "akz", "bbjjidjksyxk")) - .withRootAccess(ElasticRootAccess.ENABLED)))) + .withRules( + Arrays.asList( + new ElasticExportPolicyRule().withRuleIndex(1904332888) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("ghfcfiwrxgkneuvy", "nzqodfvpg", + "hoxgsgbpf", "zdjtxvzflbqv")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(887715159) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("dvetnws")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(2027553854) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients( + Arrays.asList("zhyrmewipmve", "dxukuqgsjjxundxg", "etw", "hhzjhfj")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(1263612367) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("qsxvmhf")) + .withRootAccess(ElasticRootAccess.ENABLED)))) .withDataProtection(new ElasticVolumeDataProtectionPatchProperties() - .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("blbjedn")) - .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("age") - .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) - .withElasticBackupVaultResourceId("xuns"))) - .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("hsasbhu")) + .withBackup( + new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("ohyuemslynsq") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("oobrlttyms"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.VISIBLE) .withSmbProperties( new ElasticSmbPatchProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED))); model = BinaryData.fromObject(model).toObject(ElasticVolumeUpdate.class); - Assertions.assertEquals("moy", model.tags().get("hlwigdivbkbxg")); - Assertions.assertEquals(6821670520079081021L, model.properties().size()); - Assertions.assertEquals(1690246024, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals("jzh", model.tags().get("izxfpxt")); + Assertions.assertEquals(1324563341134275021L, model.properties().size()); + Assertions.assertEquals(1904332888, model.properties().exportPolicy().rules().get(0).ruleIndex()); Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, model.properties().exportPolicy().rules().get(0).unixAccessRule()); Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); - Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); - Assertions.assertEquals("xakjsqzhzb", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); - Assertions.assertEquals(ElasticRootAccess.ENABLED, + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("ghfcfiwrxgkneuvy", + model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, model.properties().exportPolicy().rules().get(0).rootAccess()); - Assertions.assertEquals("blbjedn", model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("age", model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); - Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + Assertions.assertEquals("hsasbhu", model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("ohyuemslynsq", + model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.properties().dataProtection().backup().policyEnforcement()); - Assertions.assertEquals("xuns", model.properties().dataProtection().backup().elasticBackupVaultResourceId()); - Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals("oobrlttyms", + model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, model.properties().snapshotDirectoryVisibility()); Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.properties().smbProperties().smbEncryption()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateMockTests.java index a29ccf174df4..0f30ebed1692 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateMockTests.java @@ -39,7 +39,7 @@ public final class ElasticVolumesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"filePath\":\"za\",\"size\":6760924228094510861,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1535281676,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"taznkcqwwxwjyof\",\"whnkbtl\",\"ljssm\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":638318099,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"s\",\"bxbteogfgfiijry\",\"wlefksxqceazfpxg\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":1146170186,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"ossscyva\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1599548007,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"psfx\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv4\",\"NFSv4\",\"NFSv4\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"yqfttehdpboujst\",\"mountTargets\":[{\"ipAddress\":\"dshx\",\"smbServerFqdn\":\"edsuenygnxcgj\"},{\"ipAddress\":\"rnquktrf\",\"smbServerFqdn\":\"lnlrxsmy\"},{\"ipAddress\":\"rwntfm\",\"smbServerFqdn\":\"g\"},{\"ipAddress\":\"dxwnazkurrd\",\"smbServerFqdn\":\"yzjwhsetwwjwzzq\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"uukykcyqh\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"zzdcykeys\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"opazdazgbs\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"fut\",\"restorationState\":\"Failed\"},\"eTag\":\"ozglq\",\"zones\":[\"nlzclctz\"],\"location\":\"owmnd\",\"tags\":{\"wkudrbcpf\":\"dwzqauxzanhmkvfr\"},\"id\":\"xudqyemebunaucmc\",\"name\":\"rtneemmja\",\"type\":\"wcgxefnohait\"}"; + = "{\"properties\":{\"filePath\":\"tkgsuxunrswgkpj\",\"size\":3416288776095873183,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1130996784,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"lokhueoijyzcqyp\",\"qzufgsyfejyvdwt\",\"xptpqaya\",\"k\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":937498756,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"uullojkp\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":512871881,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"ljzgdy\",\"cvuq\",\"sgzlrqhb\"],\"rootAccess\":\"Enabled\"}]},\"protocolTypes\":[\"NFSv3\",\"SMB\",\"SMB\",\"SMB\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"xxtjlflecomi\",\"mountTargets\":[{\"ipAddress\":\"jluxxdhi\",\"smbServerFqdn\":\"zd\"},{\"ipAddress\":\"qjm\",\"smbServerFqdn\":\"za\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"ibqlotokhtvwtaz\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"qww\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"ofgwh\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"jssmctsnldkpwo\",\"restorationState\":\"Restored\"},\"eTag\":\"ubxbteogfgfiijr\",\"zones\":[\"lefksxq\",\"eazfpxgnmqvzvlu\",\"q\",\"aiossscyvaifp\"],\"location\":\"acvfyeowps\",\"tags\":{\"hpvtyqftteh\":\"jdhsoy\",\"kfvvdshxcde\":\"pboujs\",\"xcgjtf\":\"suenyg\",\"ylt\":\"nquktrfnslnlrxs\"},\"id\":\"wntfmtbgwjdxwna\",\"name\":\"kurrdreyzjwh\",\"type\":\"etw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -48,83 +48,62 @@ public void testCreateOrUpdate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ElasticVolume response - = manager.elasticVolumes() - .define("admskx") - .withRegion("llojkpoyhgwwdj") - .withExistingElasticCapacityPool("bi", "dfsbwceivb", "zipbwxgoooxzp") - .withTags(mapOf("zgdyrcvuqbs", "bdl", "bsfp", "zlrqhbjnqogdx")) - .withProperties( - new ElasticVolumeProperties().withFilePath("pdgzigjsugswhg") - .withSize(4512170267931436352L) - .withExportPolicy( - new ElasticExportPolicy() - .withRules( - Arrays - .asList( - new ElasticExportPolicyRule().withRuleIndex(1892682448) - .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) - .withNfsv3(ElasticNfsv3Access.ENABLED) - .withNfsv4(ElasticNfsv4Access.ENABLED) - .withAllowedClients( - Arrays.asList("zhaquvwsxb", "nvkervq", "hoadhrsxqvzv")) - .withRootAccess(ElasticRootAccess.ENABLED), - new ElasticExportPolicyRule().withRuleIndex(1911808291) - .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) - .withNfsv3(ElasticNfsv3Access.DISABLED) - .withNfsv4(ElasticNfsv4Access.DISABLED) - .withAllowedClients(Arrays.asList("zrsubklrxhjnltce", "jdvqy")) - .withRootAccess(ElasticRootAccess.ENABLED), - new ElasticExportPolicyRule().withRuleIndex(2064386356) - .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) - .withNfsv3(ElasticNfsv3Access.DISABLED) - .withNfsv4(ElasticNfsv4Access.DISABLED) - .withAllowedClients(Arrays.asList("vqzxoebwg")) - .withRootAccess(ElasticRootAccess.ENABLED)))) - .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV4, ElasticProtocolType.SMB)) - .withSnapshotResourceId("wtzvpakloz") - .withDataProtection(new ElasticVolumeDataProtectionProperties() - .withSnapshot( - new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("rswgkpjhboyikeb")) - .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("ksl") - .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) - .withElasticBackupVaultResourceId("kh"))) - .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) - .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED)) - .withBackupResourceId("cqypz")) - .withZones(Arrays.asList("tpq", "yamkncfgybm", "snxoc")) - .create(); + ElasticVolume response = manager.elasticVolumes() + .define("rmmttjxop") + .withRegion("dvqydie") + .withExistingElasticCapacityPool("sqwudohzilfmnli", "psimsf", "ypofqpmbhyqgs") + .withTags(mapOf("uwdxvqzxoebwgj", "wa")) + .withProperties(new ElasticVolumeProperties().withFilePath("erhsmvgohtw") + .withSize(8236972094838011328L) + .withExportPolicy(new ElasticExportPolicy() + .withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(314236952) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("y", "wwmhkruwae")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.SMB, ElasticProtocolType.SMB)) + .withSnapshotResourceId("hzdue") + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("admskx")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("dgzigjsugswhgs") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("wwnbafoctohz"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.VISIBLE) + .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED)) + .withBackupResourceId("xbg")) + .withZones(Arrays.asList("bdsrgfajglzrsu", "klrxhjnltce")) + .create(); - Assertions.assertEquals("owmnd", response.location()); - Assertions.assertEquals("dwzqauxzanhmkvfr", response.tags().get("wkudrbcpf")); - Assertions.assertEquals("za", response.properties().filePath()); - Assertions.assertEquals(6760924228094510861L, response.properties().size()); - Assertions.assertEquals(1535281676, response.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals("acvfyeowps", response.location()); + Assertions.assertEquals("jdhsoy", response.tags().get("hpvtyqftteh")); + Assertions.assertEquals("tkgsuxunrswgkpj", response.properties().filePath()); + Assertions.assertEquals(3416288776095873183L, response.properties().size()); + Assertions.assertEquals(1130996784, response.properties().exportPolicy().rules().get(0).ruleIndex()); Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, response.properties().exportPolicy().rules().get(0).unixAccessRule()); - Assertions.assertEquals(ElasticNfsv3Access.DISABLED, + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, response.properties().exportPolicy().rules().get(0).nfsv3()); Assertions.assertEquals(ElasticNfsv4Access.ENABLED, response.properties().exportPolicy().rules().get(0).nfsv4()); - Assertions.assertEquals("taznkcqwwxwjyof", + Assertions.assertEquals("lokhueoijyzcqyp", response.properties().exportPolicy().rules().get(0).allowedClients().get(0)); Assertions.assertEquals(ElasticRootAccess.ENABLED, response.properties().exportPolicy().rules().get(0).rootAccess()); - Assertions.assertEquals(ElasticProtocolType.NFSV4, response.properties().protocolTypes().get(0)); - Assertions.assertEquals("yqfttehdpboujst", response.properties().snapshotResourceId()); - Assertions.assertEquals("uukykcyqh", + Assertions.assertEquals(ElasticProtocolType.NFSV3, response.properties().protocolTypes().get(0)); + Assertions.assertEquals("xxtjlflecomi", response.properties().snapshotResourceId()); + Assertions.assertEquals("ibqlotokhtvwtaz", response.properties().dataProtection().snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("zzdcykeys", - response.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals("qww", response.properties().dataProtection().backup().elasticBackupPolicyResourceId()); Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, response.properties().dataProtection().backup().policyEnforcement()); - Assertions.assertEquals("opazdazgbs", + Assertions.assertEquals("ofgwh", response.properties().dataProtection().backup().elasticBackupVaultResourceId()); - Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, response.properties().snapshotDirectoryVisibility()); Assertions.assertEquals(ElasticSmbEncryption.ENABLED, response.properties().smbProperties().smbEncryption()); - Assertions.assertEquals("fut", response.properties().backupResourceId()); - Assertions.assertEquals("nlzclctz", response.zones().get(0)); + Assertions.assertEquals("jssmctsnldkpwo", response.properties().backupResourceId()); + Assertions.assertEquals("lefksxq", response.zones().get(0)); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetWithResponseMockTests.java index 17a343d73c58..46f3aec144cd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetWithResponseMockTests.java @@ -29,7 +29,7 @@ public final class ElasticVolumesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"filePath\":\"hvmaxgnuyeamcmhu\",\"size\":7145608410541121603,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":147732303,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"oesqrggvrbnyruko\",\"laciduwjleipj\",\"h\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"SMB\"],\"provisioningState\":\"Failed\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"hqkkwhbgxvellvul\",\"mountTargets\":[{\"ipAddress\":\"nitmujdtvmclyymf\",\"smbServerFqdn\":\"mjpddnyxf\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"zmzqmzjqrb\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"nmdyfoebo\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"pglaoh\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"qjilaywkdcwmqsyr\",\"restorationState\":\"Failed\"},\"eTag\":\"xdqaolfylnkkb\",\"zones\":[\"vlywlt\",\"fwobb\"],\"location\":\"hlwyjfnqzocrd\",\"tags\":{\"xdncaqtt\":\"zeunt\",\"gyrihlgm\":\"ekoifuvnyttzgi\"},\"id\":\"behlqtxnr\",\"name\":\"lkndrndpgfjodh\",\"type\":\"aqotwfhipxwgsabv\"}"; + = "{\"properties\":{\"filePath\":\"xqggvqr\",\"size\":2107579220934559275,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":255707197,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"bxrqrkijp\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":2007887595,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"wmwwmjswen\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":535686320,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"lndh\",\"yoeojhtollhs\",\"idmytzln\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":803016351,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"cswqa\",\"ywv\",\"xigvjrktpgaeuk\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv3\",\"NFSv3\"],\"provisioningState\":\"Accepted\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"u\",\"mountTargets\":[{\"ipAddress\":\"hsidsjtdlpbnin\",\"smbServerFqdn\":\"azlsvbzfcpuo\"},{\"ipAddress\":\"dwjcciklhs\",\"smbServerFqdn\":\"krdre\"},{\"ipAddress\":\"olr\",\"smbServerFqdn\":\"ehqbeivdlhydwbdb\"},{\"ipAddress\":\"rlpunytjlkesmmpa\",\"smbServerFqdn\":\"ubt\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"an\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"llbvgwzsfftedous\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"tgravaqogf\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"lqbtxxwpfhnjzudr\",\"restorationState\":\"Failed\"},\"eTag\":\"gmeboywhczz\",\"zones\":[\"mngqbe\",\"ygisrz\"],\"location\":\"ykdidj\",\"tags\":{\"eacdhztx\":\"rmpwctofld\",\"ewhfjsrwqrxetf\":\"brfgdrwji\",\"r\":\"cwv\",\"ax\":\"dqntycnawthv\"},\"id\":\"nuyeamcmhud\",\"name\":\"jecehokwc\",\"type\":\"qtwloes\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -39,38 +39,37 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ElasticVolume response = manager.elasticVolumes() - .getWithResponse("fj", "rwq", "xet", "gcwvrrmdqntycna", com.azure.core.util.Context.NONE) + .getWithResponse("hiucnmfbcpaq", "tk", "umzued", "yzbfvxovqkx", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hlwyjfnqzocrd", response.location()); - Assertions.assertEquals("zeunt", response.tags().get("xdncaqtt")); - Assertions.assertEquals("hvmaxgnuyeamcmhu", response.properties().filePath()); - Assertions.assertEquals(7145608410541121603L, response.properties().size()); - Assertions.assertEquals(147732303, response.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals("ykdidj", response.location()); + Assertions.assertEquals("rmpwctofld", response.tags().get("eacdhztx")); + Assertions.assertEquals("xqggvqr", response.properties().filePath()); + Assertions.assertEquals(2107579220934559275L, response.properties().size()); + Assertions.assertEquals(255707197, response.properties().exportPolicy().rules().get(0).ruleIndex()); Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, response.properties().exportPolicy().rules().get(0).unixAccessRule()); - Assertions.assertEquals(ElasticNfsv3Access.DISABLED, + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, response.properties().exportPolicy().rules().get(0).nfsv3()); Assertions.assertEquals(ElasticNfsv4Access.ENABLED, response.properties().exportPolicy().rules().get(0).nfsv4()); - Assertions.assertEquals("oesqrggvrbnyruko", + Assertions.assertEquals("bxrqrkijp", response.properties().exportPolicy().rules().get(0).allowedClients().get(0)); Assertions.assertEquals(ElasticRootAccess.DISABLED, response.properties().exportPolicy().rules().get(0).rootAccess()); - Assertions.assertEquals(ElasticProtocolType.SMB, response.properties().protocolTypes().get(0)); - Assertions.assertEquals("hqkkwhbgxvellvul", response.properties().snapshotResourceId()); - Assertions.assertEquals("zmzqmzjqrb", - response.properties().dataProtection().snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("nmdyfoebo", + Assertions.assertEquals(ElasticProtocolType.NFSV3, response.properties().protocolTypes().get(0)); + Assertions.assertEquals("u", response.properties().snapshotResourceId()); + Assertions.assertEquals("an", response.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("llbvgwzsfftedous", response.properties().dataProtection().backup().elasticBackupPolicyResourceId()); - Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, response.properties().dataProtection().backup().policyEnforcement()); - Assertions.assertEquals("pglaoh", + Assertions.assertEquals("tgravaqogf", response.properties().dataProtection().backup().elasticBackupVaultResourceId()); Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, response.properties().snapshotDirectoryVisibility()); - Assertions.assertEquals(ElasticSmbEncryption.ENABLED, response.properties().smbProperties().smbEncryption()); - Assertions.assertEquals("qjilaywkdcwmqsyr", response.properties().backupResourceId()); - Assertions.assertEquals("vlywlt", response.zones().get(0)); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, response.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("lqbtxxwpfhnjzudr", response.properties().backupResourceId()); + Assertions.assertEquals("mngqbe", response.zones().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolMockTests.java index 2f22c1d599c4..954cb6d48ab5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolMockTests.java @@ -30,7 +30,7 @@ public final class ElasticVolumesListByElasticPoolMockTests { @Test public void testListByElasticPool() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"filePath\":\"ei\",\"size\":4552090543693283985,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":635282226,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"ju\",\"xxbxqvm\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv3\",\"SMB\",\"SMB\",\"NFSv3\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"bwpntghy\",\"mountTargets\":[{\"ipAddress\":\"cdrnxsl\",\"smbServerFqdn\":\"lzladltxkpbqh\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"qjwkrhwz\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"ojisg\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"okatu\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"pvbkaehxsmzyg\",\"restorationState\":\"Restored\"},\"eTag\":\"kwseivmakxhyso\",\"zones\":[\"ux\",\"kb\",\"ctvtf\",\"mskdch\"],\"location\":\"iubavlzwpvgm\",\"tags\":{\"gokedgjqafkm\":\"kzaz\",\"tvaoznqn\":\"rokzrthqetwpq\",\"ugedh\":\"xiezeagmceit\"},\"id\":\"pj\",\"name\":\"tlzm\",\"type\":\"lsyj\"}]}"; + = "{\"value\":[{\"properties\":{\"filePath\":\"jlhwyxpzruzyt\",\"size\":7796990355130350629,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1628496274,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"nxdmnitmujdtv\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1161212440,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"dnyxfzuvrz\",\"z\",\"mzjqrbr\",\"vnmdyfoeboj\"],\"rootAccess\":\"Enabled\"}]},\"protocolTypes\":[\"SMB\",\"NFSv3\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"kpjtnqjilaywk\",\"mountTargets\":[{\"ipAddress\":\"qsyrilmhxdqao\",\"smbServerFqdn\":\"ylnkkbjpjvlywltm\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"bjwhlwyjfnqzocr\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"czeuntgx\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"q\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"fuvnyttzgixgyri\",\"restorationState\":\"Failed\"},\"eTag\":\"gbehlqtxnr\",\"zones\":[\"ndrndpgf\",\"odhda\",\"otwfhipxwgsab\"],\"location\":\"ipowza\",\"tags\":{\"veitit\":\"uumljcirvpefyc\"},\"id\":\"nsxzajlns\",\"name\":\"hwjuyxxbxqvmvua\",\"type\":\"tuadxkxeqb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -40,40 +40,40 @@ public void testListByElasticPool() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ElasticVolume> response = manager.elasticVolumes() - .listByElasticPool("ipowza", "czuumljcir", "pefyc", com.azure.core.util.Context.NONE); + .listByElasticPool("rg", "vrbnyrukoil", "ciduwjle", com.azure.core.util.Context.NONE); - Assertions.assertEquals("iubavlzwpvgm", response.iterator().next().location()); - Assertions.assertEquals("kzaz", response.iterator().next().tags().get("gokedgjqafkm")); - Assertions.assertEquals("ei", response.iterator().next().properties().filePath()); - Assertions.assertEquals(4552090543693283985L, response.iterator().next().properties().size()); - Assertions.assertEquals(635282226, + Assertions.assertEquals("ipowza", response.iterator().next().location()); + Assertions.assertEquals("uumljcirvpefyc", response.iterator().next().tags().get("veitit")); + Assertions.assertEquals("jlhwyxpzruzyt", response.iterator().next().properties().filePath()); + Assertions.assertEquals(7796990355130350629L, response.iterator().next().properties().size()); + Assertions.assertEquals(1628496274, response.iterator().next().properties().exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, response.iterator().next().properties().exportPolicy().rules().get(0).unixAccessRule()); - Assertions.assertEquals(ElasticNfsv3Access.DISABLED, + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, response.iterator().next().properties().exportPolicy().rules().get(0).nfsv3()); Assertions.assertEquals(ElasticNfsv4Access.ENABLED, response.iterator().next().properties().exportPolicy().rules().get(0).nfsv4()); - Assertions.assertEquals("ju", + Assertions.assertEquals("nxdmnitmujdtv", response.iterator().next().properties().exportPolicy().rules().get(0).allowedClients().get(0)); Assertions.assertEquals(ElasticRootAccess.DISABLED, response.iterator().next().properties().exportPolicy().rules().get(0).rootAccess()); - Assertions.assertEquals(ElasticProtocolType.NFSV3, + Assertions.assertEquals(ElasticProtocolType.SMB, response.iterator().next().properties().protocolTypes().get(0)); - Assertions.assertEquals("bwpntghy", response.iterator().next().properties().snapshotResourceId()); - Assertions.assertEquals("qjwkrhwz", + Assertions.assertEquals("kpjtnqjilaywk", response.iterator().next().properties().snapshotResourceId()); + Assertions.assertEquals("bjwhlwyjfnqzocr", response.iterator().next().properties().dataProtection().snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("ojisg", + Assertions.assertEquals("czeuntgx", response.iterator().next().properties().dataProtection().backup().elasticBackupPolicyResourceId()); Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, response.iterator().next().properties().dataProtection().backup().policyEnforcement()); - Assertions.assertEquals("okatu", + Assertions.assertEquals("q", response.iterator().next().properties().dataProtection().backup().elasticBackupVaultResourceId()); - Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, response.iterator().next().properties().snapshotDirectoryVisibility()); Assertions.assertEquals(ElasticSmbEncryption.DISABLED, response.iterator().next().properties().smbProperties().smbEncryption()); - Assertions.assertEquals("pvbkaehxsmzyg", response.iterator().next().properties().backupResourceId()); - Assertions.assertEquals("ux", response.iterator().next().zones().get(0)); + Assertions.assertEquals("fuvnyttzgixgyri", response.iterator().next().properties().backupResourceId()); + Assertions.assertEquals("ndrndpgf", response.iterator().next().zones().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertMockTests.java index e98e2c81bf9e..9a06e89052d9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertMockTests.java @@ -30,7 +30,7 @@ public final class ElasticVolumesRevertMockTests { @Test public void testRevert() throws Exception { String responseStr - = "{\"properties\":{\"filePath\":\"yfjlpzeqto\",\"size\":3006316405676166806,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":418707975,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"vh\",\"mfowgwbtmkek\",\"pkzwa\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv4\",\"NFSv4\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"bplvfidu\",\"mountTargets\":[{\"ipAddress\":\"kxbyjg\",\"smbServerFqdn\":\"fepxyihpqadag\"},{\"ipAddress\":\"rdi\",\"smbServerFqdn\":\"dw\"},{\"ipAddress\":\"fowxwyovcxjsgbi\",\"smbServerFqdn\":\"ukdveksbuhoduc\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"crdpibfdyjduss\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"zekbhwlkaagg\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"bfrnuybffljfii\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"qtaadusrexxfavsq\",\"restorationState\":\"Restoring\"},\"eTag\":\"hzilfmn\",\"zones\":[\"psimsf\",\"ypofqpmbhyqgs\",\"rmmttjxop\",\"gerhsmvg\"],\"location\":\"twzmqilrixysfnim\",\"tags\":{\"mlqoinhzduew\":\"wwwmhkruwaedrym\"},\"id\":\"hapfjiik\",\"name\":\"jdiq\",\"type\":\"liejhpc\"}"; + = "{\"properties\":{\"filePath\":\"atuztjct\",\"size\":7834682716691474423,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1849034333,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"fwakw\",\"eivmak\",\"hysowljuxlkbect\",\"tfjmskdchmaiub\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":395061991,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"zazmg\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":1184594147,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"okzrthq\",\"twpqrtva\",\"znq\",\"ixiezeag\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv4\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"hfpjstlzmbls\",\"mountTargets\":[{\"ipAddress\":\"olctae\",\"smbServerFqdn\":\"syrled\"},{\"ipAddress\":\"ustbvtqigdx\",\"smbServerFqdn\":\"sgeafgfosehx\"},{\"ipAddress\":\"sxezppkkwaa\",\"smbServerFqdn\":\"k\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"pze\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"yrplix\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"llpquevhamfo\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"ekxpkzwaqxofqo\",\"restorationState\":\"Restored\"},\"eTag\":\"qbplvfiduszte\",\"zones\":[\"yj\",\"msfe\",\"x\"],\"location\":\"hpqadagrhrdicxdw\",\"tags\":{\"ukdveksbuhoduc\":\"owxwyovcxjsgbip\",\"scrdp\":\"v\",\"yszekbhwlka\":\"bfdyjduss\",\"n\":\"ggkrehbf\"},\"id\":\"ybff\",\"name\":\"jfiimreoa\",\"type\":\"sqtaadusrexxfa\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -40,37 +40,36 @@ public void testRevert() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ElasticVolume response = manager.elasticVolumes() - .revert("eolctaebf", "yrle", "jcustbvtq", "gdxzvsgeafgfoseh", - new ElasticVolumeRevert().withSnapshotResourceId("zsxezppkkwaae"), com.azure.core.util.Context.NONE); + .revert("pntghyks", "rcdrnxsluvlzlad", "t", "kpbqhvfdqqjw", + new ElasticVolumeRevert().withSnapshotResourceId("hwzdanojisgglmv"), com.azure.core.util.Context.NONE); - Assertions.assertEquals("twzmqilrixysfnim", response.location()); - Assertions.assertEquals("wwwmhkruwaedrym", response.tags().get("mlqoinhzduew")); - Assertions.assertEquals("yfjlpzeqto", response.properties().filePath()); - Assertions.assertEquals(3006316405676166806L, response.properties().size()); - Assertions.assertEquals(418707975, response.properties().exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, + Assertions.assertEquals("hpqadagrhrdicxdw", response.location()); + Assertions.assertEquals("owxwyovcxjsgbip", response.tags().get("ukdveksbuhoduc")); + Assertions.assertEquals("atuztjct", response.properties().filePath()); + Assertions.assertEquals(7834682716691474423L, response.properties().size()); + Assertions.assertEquals(1849034333, response.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, response.properties().exportPolicy().rules().get(0).unixAccessRule()); - Assertions.assertEquals(ElasticNfsv3Access.DISABLED, + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, response.properties().exportPolicy().rules().get(0).nfsv3()); - Assertions.assertEquals(ElasticNfsv4Access.ENABLED, + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, response.properties().exportPolicy().rules().get(0).nfsv4()); - Assertions.assertEquals("vh", response.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals("fwakw", response.properties().exportPolicy().rules().get(0).allowedClients().get(0)); Assertions.assertEquals(ElasticRootAccess.DISABLED, response.properties().exportPolicy().rules().get(0).rootAccess()); Assertions.assertEquals(ElasticProtocolType.NFSV4, response.properties().protocolTypes().get(0)); - Assertions.assertEquals("bplvfidu", response.properties().snapshotResourceId()); - Assertions.assertEquals("crdpibfdyjduss", - response.properties().dataProtection().snapshot().snapshotPolicyResourceId()); - Assertions.assertEquals("zekbhwlkaagg", + Assertions.assertEquals("hfpjstlzmbls", response.properties().snapshotResourceId()); + Assertions.assertEquals("pze", response.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("yrplix", response.properties().dataProtection().backup().elasticBackupPolicyResourceId()); Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, response.properties().dataProtection().backup().policyEnforcement()); - Assertions.assertEquals("bfrnuybffljfii", + Assertions.assertEquals("llpquevhamfo", response.properties().dataProtection().backup().elasticBackupVaultResourceId()); Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, response.properties().snapshotDirectoryVisibility()); - Assertions.assertEquals(ElasticSmbEncryption.ENABLED, response.properties().smbProperties().smbEncryption()); - Assertions.assertEquals("qtaadusrexxfavsq", response.properties().backupResourceId()); - Assertions.assertEquals("psimsf", response.zones().get(0)); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, response.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("ekxpkzwaqxofqo", response.properties().backupResourceId()); + Assertions.assertEquals("yj", response.zones().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java index 2a0022e075a7..f28f1b078d80 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java @@ -12,18 +12,18 @@ public final class EncryptionIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EncryptionIdentity model = BinaryData.fromString( - "{\"principalId\":\"hcspo\",\"userAssignedIdentity\":\"qaxsipietgbebjf\",\"federatedClientId\":\"bmoichd\"}") + "{\"principalId\":\"lyokrrrou\",\"userAssignedIdentity\":\"vnsasbcrymodi\",\"federatedClientId\":\"xkl\"}") .toObject(EncryptionIdentity.class); - Assertions.assertEquals("qaxsipietgbebjf", model.userAssignedIdentity()); - Assertions.assertEquals("bmoichd", model.federatedClientId()); + Assertions.assertEquals("vnsasbcrymodi", model.userAssignedIdentity()); + Assertions.assertEquals("xkl", model.federatedClientId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EncryptionIdentity model - = new EncryptionIdentity().withUserAssignedIdentity("qaxsipietgbebjf").withFederatedClientId("bmoichd"); + = new EncryptionIdentity().withUserAssignedIdentity("vnsasbcrymodi").withFederatedClientId("xkl"); model = BinaryData.fromObject(model).toObject(EncryptionIdentity.class); - Assertions.assertEquals("qaxsipietgbebjf", model.userAssignedIdentity()); - Assertions.assertEquals("bmoichd", model.federatedClientId()); + Assertions.assertEquals("vnsasbcrymodi", model.userAssignedIdentity()); + Assertions.assertEquals("xkl", model.federatedClientId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionTransitionRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionTransitionRequestTests.java index 83213dc3eb1b..ffeb570cbc0a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionTransitionRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionTransitionRequestTests.java @@ -11,19 +11,19 @@ public final class EncryptionTransitionRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EncryptionTransitionRequest model = BinaryData - .fromString("{\"virtualNetworkId\":\"xfzzzwyjafitlhgu\",\"privateEndpointId\":\"nuchlgmltxdwhmo\"}") - .toObject(EncryptionTransitionRequest.class); - Assertions.assertEquals("xfzzzwyjafitlhgu", model.virtualNetworkId()); - Assertions.assertEquals("nuchlgmltxdwhmo", model.privateEndpointId()); + EncryptionTransitionRequest model + = BinaryData.fromString("{\"virtualNetworkId\":\"whoqhnlbqnbldxe\",\"privateEndpointId\":\"clgsc\"}") + .toObject(EncryptionTransitionRequest.class); + Assertions.assertEquals("whoqhnlbqnbldxe", model.virtualNetworkId()); + Assertions.assertEquals("clgsc", model.privateEndpointId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EncryptionTransitionRequest model = new EncryptionTransitionRequest().withVirtualNetworkId("xfzzzwyjafitlhgu") - .withPrivateEndpointId("nuchlgmltxdwhmo"); + EncryptionTransitionRequest model + = new EncryptionTransitionRequest().withVirtualNetworkId("whoqhnlbqnbldxe").withPrivateEndpointId("clgsc"); model = BinaryData.fromObject(model).toObject(EncryptionTransitionRequest.class); - Assertions.assertEquals("xfzzzwyjafitlhgu", model.virtualNetworkId()); - Assertions.assertEquals("nuchlgmltxdwhmo", model.privateEndpointId()); + Assertions.assertEquals("whoqhnlbqnbldxe", model.virtualNetworkId()); + Assertions.assertEquals("clgsc", model.privateEndpointId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java index c73c4765e79c..795b7ed6cbeb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java @@ -12,20 +12,20 @@ public final class FilePathAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FilePathAvailabilityRequest model - = BinaryData.fromString("{\"name\":\"oi\",\"subnetId\":\"qc\",\"availabilityZone\":\"f\"}") + = BinaryData.fromString("{\"name\":\"mjc\",\"subnetId\":\"oewbid\",\"availabilityZone\":\"t\"}") .toObject(FilePathAvailabilityRequest.class); - Assertions.assertEquals("oi", model.name()); - Assertions.assertEquals("qc", model.subnetId()); - Assertions.assertEquals("f", model.availabilityZone()); + Assertions.assertEquals("mjc", model.name()); + Assertions.assertEquals("oewbid", model.subnetId()); + Assertions.assertEquals("t", model.availabilityZone()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FilePathAvailabilityRequest model - = new FilePathAvailabilityRequest().withName("oi").withSubnetId("qc").withAvailabilityZone("f"); + = new FilePathAvailabilityRequest().withName("mjc").withSubnetId("oewbid").withAvailabilityZone("t"); model = BinaryData.fromObject(model).toObject(FilePathAvailabilityRequest.class); - Assertions.assertEquals("oi", model.name()); - Assertions.assertEquals("qc", model.subnetId()); - Assertions.assertEquals("f", model.availabilityZone()); + Assertions.assertEquals("mjc", model.name()); + Assertions.assertEquals("oewbid", model.subnetId()); + Assertions.assertEquals("t", model.availabilityZone()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/KeyVaultPrivateEndpointTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/KeyVaultPrivateEndpointTests.java index c7a4b7fd6a58..d9a5c0919e96 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/KeyVaultPrivateEndpointTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/KeyVaultPrivateEndpointTests.java @@ -12,18 +12,18 @@ public final class KeyVaultPrivateEndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { KeyVaultPrivateEndpoint model - = BinaryData.fromString("{\"virtualNetworkId\":\"agpgdph\",\"privateEndpointId\":\"dulajvlejchcs\"}") + = BinaryData.fromString("{\"virtualNetworkId\":\"beolh\",\"privateEndpointId\":\"lvbmxuqibsxtkcu\"}") .toObject(KeyVaultPrivateEndpoint.class); - Assertions.assertEquals("agpgdph", model.virtualNetworkId()); - Assertions.assertEquals("dulajvlejchcs", model.privateEndpointId()); + Assertions.assertEquals("beolh", model.virtualNetworkId()); + Assertions.assertEquals("lvbmxuqibsxtkcu", model.privateEndpointId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { KeyVaultPrivateEndpoint model - = new KeyVaultPrivateEndpoint().withVirtualNetworkId("agpgdph").withPrivateEndpointId("dulajvlejchcs"); + = new KeyVaultPrivateEndpoint().withVirtualNetworkId("beolh").withPrivateEndpointId("lvbmxuqibsxtkcu"); model = BinaryData.fromObject(model).toObject(KeyVaultPrivateEndpoint.class); - Assertions.assertEquals("agpgdph", model.virtualNetworkId()); - Assertions.assertEquals("dulajvlejchcs", model.privateEndpointId()); + Assertions.assertEquals("beolh", model.virtualNetworkId()); + Assertions.assertEquals("lvbmxuqibsxtkcu", model.privateEndpointId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapConfigurationTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapConfigurationTests.java index c14a17de428d..2e6654fa15a0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapConfigurationTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapConfigurationTests.java @@ -13,27 +13,27 @@ public final class LdapConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LdapConfiguration model = BinaryData.fromString( - "{\"domain\":\"nfpubntnbatz\",\"ldapServers\":[\"sowsaael\"],\"ldapOverTLS\":true,\"serverCACertificate\":\"cjuhplrvkm\",\"certificateCNHost\":\"wmj\"}") + "{\"domain\":\"d\",\"ldapServers\":[\"zpmkmlmvev\",\"xzopjhbzxl\",\"ohrdddt\"],\"ldapOverTLS\":false,\"serverCACertificate\":\"ba\",\"certificateCNHost\":\"cbb\"}") .toObject(LdapConfiguration.class); - Assertions.assertEquals("nfpubntnbatz", model.domain()); - Assertions.assertEquals("sowsaael", model.ldapServers().get(0)); - Assertions.assertTrue(model.ldapOverTLS()); - Assertions.assertEquals("cjuhplrvkm", model.serverCACertificate()); - Assertions.assertEquals("wmj", model.certificateCNHost()); + Assertions.assertEquals("d", model.domain()); + Assertions.assertEquals("zpmkmlmvev", model.ldapServers().get(0)); + Assertions.assertFalse(model.ldapOverTLS()); + Assertions.assertEquals("ba", model.serverCACertificate()); + Assertions.assertEquals("cbb", model.certificateCNHost()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LdapConfiguration model = new LdapConfiguration().withDomain("nfpubntnbatz") - .withLdapServers(Arrays.asList("sowsaael")) - .withLdapOverTLS(true) - .withServerCACertificate("cjuhplrvkm") - .withCertificateCNHost("wmj"); + LdapConfiguration model = new LdapConfiguration().withDomain("d") + .withLdapServers(Arrays.asList("zpmkmlmvev", "xzopjhbzxl", "ohrdddt")) + .withLdapOverTLS(false) + .withServerCACertificate("ba") + .withCertificateCNHost("cbb"); model = BinaryData.fromObject(model).toObject(LdapConfiguration.class); - Assertions.assertEquals("nfpubntnbatz", model.domain()); - Assertions.assertEquals("sowsaael", model.ldapServers().get(0)); - Assertions.assertTrue(model.ldapOverTLS()); - Assertions.assertEquals("cjuhplrvkm", model.serverCACertificate()); - Assertions.assertEquals("wmj", model.certificateCNHost()); + Assertions.assertEquals("d", model.domain()); + Assertions.assertEquals("zpmkmlmvev", model.ldapServers().get(0)); + Assertions.assertFalse(model.ldapOverTLS()); + Assertions.assertEquals("ba", model.serverCACertificate()); + Assertions.assertEquals("cbb", model.certificateCNHost()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java index 656bc9fb4208..50b78f8b90c9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java @@ -11,22 +11,22 @@ public final class LdapSearchScopeOptTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LdapSearchScopeOpt model = BinaryData.fromString( - "{\"userDN\":\"igrfihotjewl\",\"groupDN\":\"uzzjgnrefq\",\"groupMembershipFilter\":\"qotoihiqakydiwfb\"}") + LdapSearchScopeOpt model = BinaryData + .fromString("{\"userDN\":\"tmxxdtddmflhuy\",\"groupDN\":\"zv\",\"groupMembershipFilter\":\"napxbannovv\"}") .toObject(LdapSearchScopeOpt.class); - Assertions.assertEquals("igrfihotjewl", model.userDN()); - Assertions.assertEquals("uzzjgnrefq", model.groupDN()); - Assertions.assertEquals("qotoihiqakydiwfb", model.groupMembershipFilter()); + Assertions.assertEquals("tmxxdtddmflhuy", model.userDN()); + Assertions.assertEquals("zv", model.groupDN()); + Assertions.assertEquals("napxbannovv", model.groupMembershipFilter()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LdapSearchScopeOpt model = new LdapSearchScopeOpt().withUserDN("igrfihotjewl") - .withGroupDN("uzzjgnrefq") - .withGroupMembershipFilter("qotoihiqakydiwfb"); + LdapSearchScopeOpt model = new LdapSearchScopeOpt().withUserDN("tmxxdtddmflhuy") + .withGroupDN("zv") + .withGroupMembershipFilter("napxbannovv"); model = BinaryData.fromObject(model).toObject(LdapSearchScopeOpt.class); - Assertions.assertEquals("igrfihotjewl", model.userDN()); - Assertions.assertEquals("uzzjgnrefq", model.groupDN()); - Assertions.assertEquals("qotoihiqakydiwfb", model.groupMembershipFilter()); + Assertions.assertEquals("tmxxdtddmflhuy", model.userDN()); + Assertions.assertEquals("zv", model.groupDN()); + Assertions.assertEquals("napxbannovv", model.groupMembershipFilter()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java index f98717261664..b64ec5f72d0b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java @@ -16,7 +16,7 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"14327628-3cb7-44c5-8ebf-281279a7795b\",\"tenantId\":\"a1e05bd5-2b9f-411b-a83b-2414638ccfb4\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"wmn\":{\"principalId\":\"db1afe1a-6475-4f1e-92ba-09660a59ed2b\",\"clientId\":\"64236551-a6d8-4825-9556-71a3ae3828ce\"},\"tijfybvp\":{\"principalId\":\"837667f2-f348-4365-bb3b-8a8db0ff73d0\",\"clientId\":\"490395e5-b324-4280-a808-38bfcc725c3a\"},\"rsg\":{\"principalId\":\"b1d1b3b2-49ef-4517-8db3-53309da920ae\",\"clientId\":\"2fa4adde-f592-4020-a1fe-2f88b2f21a93\"}}}") + "{\"principalId\":\"1721271e-77e1-4cc6-93ee-13f891258d93\",\"tenantId\":\"87132471-872d-4fde-b7f9-d51276712561\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"hpxlktwkuziycs\":{\"principalId\":\"01ac5518-17a0-43bf-8d47-8ae69787adc2\",\"clientId\":\"a27d2c63-8340-4988-872b-0f4fea3eeeba\"},\"ufuztcktyhjtq\":{\"principalId\":\"8cae1dd4-8050-463d-a25d-53e348075807\",\"clientId\":\"12a8ff2a-f040-4fd9-a9e1-397f6fe24a21\"},\"gzulwmmrqzzr\":{\"principalId\":\"657d1f4a-dadf-4345-91b4-a60a3f1d85f5\",\"clientId\":\"a8bbc206-4ec3-42cc-b3ee-d2741f4adc36\"}}}") .toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); } @@ -24,8 +24,8 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("wmn", new UserAssignedIdentity(), "tijfybvp", new UserAssignedIdentity(), - "rsg", new UserAssignedIdentity())); + .withUserAssignedIdentities(mapOf("hpxlktwkuziycs", new UserAssignedIdentity(), "ufuztcktyhjtq", + new UserAssignedIdentity(), "gzulwmmrqzzr", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsGetWithResponseMockTests.java index 37b0e4e08f27..94ccdcbacffc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class NetAppResourceQuotaLimitsAccountsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"current\":757946426,\"default\":1006803160,\"usage\":505649327},\"id\":\"uuzivensrpmeyyvp\",\"name\":\"patlbijp\",\"type\":\"gsksrfhf\"}"; + = "{\"properties\":{\"current\":1644605139,\"default\":1263578872,\"usage\":400790615},\"id\":\"tod\",\"name\":\"fpyapucygvoavyu\",\"type\":\"ssxlghieegjlg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubscriptionQuotaItem response = manager.netAppResourceQuotaLimitsAccounts() - .getWithResponse("fkoxmlghktuidvr", "azlp", "wwexymzvlazipbh", com.azure.core.util.Context.NONE) + .getWithResponse("cnjrohmbpyryxame", "l", "dyvkfkmr", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsListMockTests.java index f55ca87bf44b..35083910d2f1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsListMockTests.java @@ -21,7 +21,7 @@ public final class NetAppResourceQuotaLimitsAccountsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"current\":406069948,\"default\":2037491254,\"usage\":421608055},\"id\":\"wzfgbrttuiaclkie\",\"name\":\"hajlfn\",\"type\":\"hiqfyuttdiy\"}]}"; + = "{\"value\":[{\"properties\":{\"current\":986571803,\"default\":1818026917,\"usage\":1941567020},\"id\":\"pmjnlexwhcb\",\"name\":\"pibkephuu\",\"type\":\"erctatoyin\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,8 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<SubscriptionQuotaItem> response - = manager.netAppResourceQuotaLimitsAccounts().list("olmk", "bnxwc", com.azure.core.util.Context.NONE); + PagedIterable<SubscriptionQuotaItem> response = manager.netAppResourceQuotaLimitsAccounts() + .list("vpaseksgbu", "antuygdhgaqipirp", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java index 1e68fb5f37ee..68c7be1b343f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class NetAppResourceQuotaLimitsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"current\":962255720,\"default\":576069827,\"usage\":1195801008},\"id\":\"kjguwrjmwvvbtuq\",\"name\":\"xximwgxq\",\"type\":\"dekotjgxieqfkyf\"}"; + = "{\"properties\":{\"current\":833282883,\"default\":1088510786,\"usage\":967504624},\"id\":\"hmxvvl\",\"name\":\"rskapbxwieexu\",\"type\":\"aderltfokyk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubscriptionQuotaItem response = manager.netAppResourceQuotaLimits() - .getWithResponse("imyc", "grvkcxzznnuif", com.azure.core.util.Context.NONE) + .getWithResponse("dmcvhtbbz", "hfvhuwzbxpcqz", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java index e43539885dfb..78b9a611e7e4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java @@ -21,7 +21,7 @@ public final class NetAppResourceQuotaLimitsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"current\":1874096637,\"default\":1667611376,\"usage\":883857471},\"id\":\"eumexmjbxc\",\"name\":\"ccwkqmtx\",\"type\":\"p\"}]}"; + = "{\"value\":[{\"properties\":{\"current\":1617701046,\"default\":836004235,\"usage\":229729592},\"id\":\"ersejeg\",\"name\":\"rkjguwrjmwvvbt\",\"type\":\"qkxximwgxql\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<SubscriptionQuotaItem> response - = manager.netAppResourceQuotaLimits().list("iwvjaqupbyyn", com.azure.core.util.Context.NONE); + = manager.netAppResourceQuotaLimits().list("yimyccgrvk", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetWithResponseMockTests.java index 9fdcd41f0343..7bc3df2ae7f1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class NetAppResourceRegionInfosGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"storageToNetworkProximity\":\"T1\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"trqrejda\",\"isAvailable\":true},{\"availabilityZone\":\"imldahlfxlmu\",\"isAvailable\":true},{\"availabilityZone\":\"adj\",\"isAvailable\":false},{\"availabilityZone\":\"cskiioshjgc\",\"isAvailable\":true}]},\"id\":\"bnxgzt\",\"name\":\"cg\",\"type\":\"tjchfjvmy\"}"; + = "{\"properties\":{\"storageToNetworkProximity\":\"T1\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"iwvjaqupbyyn\",\"isAvailable\":true}]},\"id\":\"a\",\"name\":\"bmgeumexmjbxcbc\",\"type\":\"wkqm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,12 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - RegionInfoResource response - = manager.netAppResourceRegionInfos().getWithResponse("qis", com.azure.core.util.Context.NONE).getValue(); + RegionInfoResource response = manager.netAppResourceRegionInfos() + .getWithResponse("ekotjgxi", com.azure.core.util.Context.NONE) + .getValue(); Assertions.assertEquals(RegionStorageToNetworkProximity.T1, response.storageToNetworkProximity()); - Assertions.assertEquals("trqrejda", response.availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertEquals("iwvjaqupbyyn", response.availabilityZoneMappings().get(0).availabilityZone()); Assertions.assertTrue(response.availabilityZoneMappings().get(0).isAvailable()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListMockTests.java index 3ce2ff35bf17..4299273c03c8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListMockTests.java @@ -23,7 +23,7 @@ public final class NetAppResourceRegionInfosListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"T1\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"lbefvwc\",\"isAvailable\":true},{\"availabilityZone\":\"pylrwoxzgwpsy\",\"isAvailable\":true},{\"availabilityZone\":\"eypdvrbk\",\"isAvailable\":true}]},\"id\":\"dkgaw\",\"name\":\"wjxildfkcefeyg\",\"type\":\"q\"}]}"; + = "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"AcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"ejdaahuqimld\",\"isAvailable\":true},{\"availabilityZone\":\"xlm\",\"isAvailable\":false}]},\"id\":\"uadjnfs\",\"name\":\"cskiioshjgc\",\"type\":\"etybnxgzt\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,11 +33,11 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<RegionInfoResource> response - = manager.netAppResourceRegionInfos().list("j", com.azure.core.util.Context.NONE); + = manager.netAppResourceRegionInfos().list("xapeqiscrpi", com.azure.core.util.Context.NONE); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1, + Assertions.assertEquals(RegionStorageToNetworkProximity.ACROSS_T2, response.iterator().next().storageToNetworkProximity()); - Assertions.assertEquals("lbefvwc", + Assertions.assertEquals("ejdaahuqimld", response.iterator().next().availabilityZoneMappings().get(0).availabilityZone()); Assertions.assertTrue(response.iterator().next().availabilityZoneMappings().get(0).isAvailable()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetWithResponseMockTests.java index a2339c5c47a9..e64e3f91730b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class NetAppResourceUsagesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"id\":\"mdmuqoh\",\"name\":{\"value\":\"raxq\",\"localizedValue\":\"drwjcljbrhlh\"},\"properties\":{\"currentValue\":1266501182,\"limit\":495666062,\"unit\":\"enninafhxrzfrm\"}}"; + = "{\"id\":\"uddrwjc\",\"name\":{\"value\":\"rhlhpvzadbwenni\",\"localizedValue\":\"fhxrzfr\"},\"properties\":{\"currentValue\":1573816814,\"limit\":1661855773,\"unit\":\"wviq\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); UsageResult response = manager.netAppResourceUsages() - .getWithResponse("i", "kkcxwnujvqynvav", com.azure.core.util.Context.NONE) + .getWithResponse("jvqynvavitmdm", "qohhihra", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListMockTests.java index 77d8d78498df..3b4e51eb81e9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListMockTests.java @@ -21,7 +21,7 @@ public final class NetAppResourceUsagesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"id\":\"jlvzklk\",\"name\":{\"value\":\"ikyjtkakvlb\",\"localizedValue\":\"hjvpzaptu\"},\"properties\":{\"currentValue\":1787762673,\"limit\":425882032,\"unit\":\"jixwfgc\"}}]}"; + = "{\"value\":[{\"id\":\"gikyjtkak\",\"name\":{\"value\":\"ishj\",\"localizedValue\":\"zaptuosk\"},\"properties\":{\"currentValue\":1001240129,\"limit\":1965915191,\"unit\":\"wfgcdiykkcxwn\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<UsageResult> response - = manager.netAppResourceUsages().list("wgofmhx", com.azure.core.util.Context.NONE); + = manager.netAppResourceUsages().list("jlvzklk", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java index 1384d947cef1..f1012a2ba0a1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests { @Test public void testCheckFilePathAvailabilityWithResponse() throws Exception { - String responseStr = "{\"isAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"tvdxxhe\"}"; + String responseStr = "{\"isAvailable\":false,\"reason\":\"Invalid\",\"message\":\"kwztsdetj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testCheckFilePathAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CheckAvailabilityResponse response = manager.netAppResources() - .checkFilePathAvailabilityWithResponse("detjygowi", - new FilePathAvailabilityRequest().withName("cq").withSubnetId("olzkgys").withAvailabilityZone("zyybzo"), + .checkFilePathAvailabilityWithResponse("fxfmyrqsdb", + new FilePathAvailabilityRequest().withName("oksz").withSubnetId("nm").withAvailabilityZone("gpterdiu"), com.azure.core.util.Context.NONE) .getValue(); Assertions.assertFalse(response.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("tvdxxhe", response.message()); + Assertions.assertEquals(InAvailabilityReasonType.INVALID, response.reason()); + Assertions.assertEquals("kwztsdetj", response.message()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java index a6605e485ef1..2b7574cc5b3f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class NetAppResourcesCheckNameAvailabilityWithResponseMockTests { @Test public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"isAvailable\":true,\"reason\":\"Invalid\",\"message\":\"wzt\"}"; + String responseStr = "{\"isAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"ypzkg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,15 @@ public void testCheckNameAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CheckAvailabilityResponse response = manager.netAppResources() - .checkNameAvailabilityWithResponse("iflikyypzkgxfx", - new ResourceNameAvailabilityRequest().withName("myrqsdbpokszan") - .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES) - .withResourceGroup("wgpterdiuw"), + .checkNameAvailabilityWithResponse("blaxpegj", + new ResourceNameAvailabilityRequest().withName("dabalfdxaglzfytl") + .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS) + .withResourceGroup("lqhopxouvmrs"), com.azure.core.util.Context.NONE) .getValue(); Assertions.assertTrue(response.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.INVALID, response.reason()); - Assertions.assertEquals("wzt", response.message()); + Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, response.reason()); + Assertions.assertEquals("ypzkg", response.message()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java index 47aa9c082934..13c49f6691d3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests { @Test public void testCheckQuotaAvailabilityWithResponse() throws Exception { - String responseStr = "{\"isAvailable\":false,\"reason\":\"Invalid\",\"message\":\"neychbjizq\"}"; + String responseStr = "{\"isAvailable\":true,\"reason\":\"Invalid\",\"message\":\"xxheigmlilwzghjh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,15 @@ public void testCheckQuotaAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CheckAvailabilityResponse response = manager.netAppResources() - .checkQuotaAvailabilityWithResponse("gmlilwzghjhjvmab", - new QuotaAvailabilityRequest().withName("zbwaybfmdafbgym") - .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS) - .withResourceGroup("napreojxrjnbsco"), + .checkQuotaAvailabilityWithResponse("go", + new QuotaAvailabilityRequest().withName("ifcqp") + .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_BACKUP_VAULTS_BACKUPS) + .withResourceGroup("zkgysdgzyybzoxlv"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertFalse(response.isAvailable()); + Assertions.assertTrue(response.isAvailable()); Assertions.assertEquals(InAvailabilityReasonType.INVALID, response.reason()); - Assertions.assertEquals("neychbjizq", response.message()); + Assertions.assertEquals("xxheigmlilwzghjh", response.message()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java index 485138b3dac8..8f739fa0ae40 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests { @Test public void testQueryNetworkSiblingSetWithResponse() throws Exception { String responseStr - = "{\"networkSiblingSetId\":\"qbtimpk\",\"subnetId\":\"lornsihqh\",\"networkSiblingSetStateId\":\"smusuaawj\",\"networkFeatures\":\"Standard\",\"provisioningState\":\"Canceled\",\"nicInfoList\":[{\"ipAddress\":\"z\",\"volumeResourceIds\":[\"iixyxvqbanosj\"]},{\"ipAddress\":\"irnb\",\"volumeResourceIds\":[\"m\"]}]}"; + = "{\"networkSiblingSetId\":\"ipmlnfyzavf\",\"subnetId\":\"ypi\",\"networkSiblingSetStateId\":\"bkpdjtaqhsmq\",\"networkFeatures\":\"Basic_Standard\",\"provisioningState\":\"Updating\",\"nicInfoList\":[{\"ipAddress\":\"h\",\"volumeResourceIds\":[\"thmgpczqulp\"]}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,18 +32,16 @@ public void testQueryNetworkSiblingSetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - NetworkSiblingSet response - = manager.netAppResources() - .queryNetworkSiblingSetWithResponse("h", - new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("shthmgpczqu") - .withSubnetId("ptkbvcpxtzhi"), - com.azure.core.util.Context.NONE) - .getValue(); + NetworkSiblingSet response = manager.netAppResources() + .queryNetworkSiblingSetWithResponse("izqfsgnwdxz", + new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("dpq").withSubnetId("rfbo"), + com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals("qbtimpk", response.networkSiblingSetId()); - Assertions.assertEquals("lornsihqh", response.subnetId()); - Assertions.assertEquals("smusuaawj", response.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.STANDARD, response.networkFeatures()); - Assertions.assertEquals("iixyxvqbanosj", response.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("ipmlnfyzavf", response.networkSiblingSetId()); + Assertions.assertEquals("ypi", response.subnetId()); + Assertions.assertEquals("bkpdjtaqhsmq", response.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, response.networkFeatures()); + Assertions.assertEquals("thmgpczqulp", response.nicInfoList().get(0).volumeResourceIds().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java index 52fb3b1744df..9d25c2708648 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class NetAppResourcesQueryRegionInfoWithResponseMockTests { @Test public void testQueryRegionInfoWithResponse() throws Exception { String responseStr - = "{\"storageToNetworkProximity\":\"Default\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"xi\",\"isAvailable\":false},{\"availabilityZone\":\"fyzavfrbypicdb\",\"isAvailable\":false},{\"availabilityZone\":\"taq\",\"isAvailable\":true},{\"availabilityZone\":\"azpdg\",\"isAvailable\":false}]}"; + = "{\"storageToNetworkProximity\":\"Default\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"mqtnap\",\"isAvailable\":true},{\"availabilityZone\":\"xrjnbsconxav\",\"isAvailable\":true},{\"availabilityZone\":\"yc\",\"isAvailable\":false}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,11 @@ public void testQueryRegionInfoWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RegionInfo response = manager.netAppResources() - .queryRegionInfoWithResponse("sgnwdxzedpq", com.azure.core.util.Context.NONE) + .queryRegionInfoWithResponse("vmabzzbwaybfm", com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(RegionStorageToNetworkProximity.DEFAULT, response.storageToNetworkProximity()); - Assertions.assertEquals("xi", response.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertFalse(response.availabilityZoneMappings().get(0).isAvailable()); + Assertions.assertEquals("mqtnap", response.availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertTrue(response.availabilityZoneMappings().get(0).isAvailable()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java index b6846c9f7130..d2835016cb11 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java @@ -23,7 +23,7 @@ public final class NetAppResourcesUpdateNetworkSiblingSetMockTests { @Test public void testUpdateNetworkSiblingSet() throws Exception { String responseStr - = "{\"networkSiblingSetId\":\"lkpzwbhnrecchd\",\"subnetId\":\"rmuhkahmjedbiucv\",\"networkSiblingSetStateId\":\"hwmjpjbweunxc\",\"networkFeatures\":\"Standard_Basic\",\"provisioningState\":\"Succeeded\",\"nicInfoList\":[{\"ipAddress\":\"ihppiyb\",\"volumeResourceIds\":[\"nzuz\",\"bgk\",\"cscpiuzvkunh\",\"i\"]},{\"ipAddress\":\"uktirzkaugpu\",\"volumeResourceIds\":[\"cfqp\"]}]}"; + = "{\"networkSiblingSetId\":\"fczmnn\",\"subnetId\":\"xyxvqban\",\"networkSiblingSetStateId\":\"jtgirnb\",\"networkFeatures\":\"Basic\",\"provisioningState\":\"Updating\",\"nicInfoList\":[{\"ipAddress\":\"gm\",\"volumeResourceIds\":[\"twmp\",\"tmfoeajogsyxwet\",\"mfd\"]},{\"ipAddress\":\"vlkpzwb\",\"volumeResourceIds\":[\"ecchdidrmuhkahm\",\"edbiucvkhhwmjpjb\",\"eunxcqrrihufoi\"]},{\"ipAddress\":\"piybxvgnzuzpbg\",\"volumeResourceIds\":[\"scpiuz\",\"kunhdimjuk\",\"irzkaugpucdo\"]},{\"ipAddress\":\"qplwg\",\"volumeResourceIds\":[\"hxw\"]}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,17 +33,17 @@ public void testUpdateNetworkSiblingSet() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkSiblingSet response = manager.netAppResources() - .updateNetworkSiblingSet("dorgmynltw", - new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("p") - .withSubnetId("tmfoeajogsyxwet") - .withNetworkSiblingSetStateId("mfd") - .withNetworkFeatures(NetworkFeatures.STANDARD_BASIC), + .updateNetworkSiblingSet("kbvcpxtzhigqqbti", + new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("pkjblornsih") + .withSubnetId("hudsmusuaa") + .withNetworkSiblingSetStateId("jakx") + .withNetworkFeatures(NetworkFeatures.BASIC_STANDARD), com.azure.core.util.Context.NONE); - Assertions.assertEquals("lkpzwbhnrecchd", response.networkSiblingSetId()); - Assertions.assertEquals("rmuhkahmjedbiucv", response.subnetId()); - Assertions.assertEquals("hwmjpjbweunxc", response.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, response.networkFeatures()); - Assertions.assertEquals("nzuz", response.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("fczmnn", response.networkSiblingSetId()); + Assertions.assertEquals("xyxvqban", response.subnetId()); + Assertions.assertEquals("jtgirnb", response.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.BASIC, response.networkFeatures()); + Assertions.assertEquals("twmp", response.nicInfoList().get(0).volumeResourceIds().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java index f25b16bf8b0e..906192b217fb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java @@ -13,12 +13,12 @@ public final class NetworkSiblingSetInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSiblingSetInner model = BinaryData.fromString( - "{\"networkSiblingSetId\":\"ci\",\"subnetId\":\"defxrdc\",\"networkSiblingSetStateId\":\"nbkkjanurnnq\",\"networkFeatures\":\"Basic\",\"provisioningState\":\"Updating\",\"nicInfoList\":[{\"ipAddress\":\"qltgrd\",\"volumeResourceIds\":[\"pxrxvbfihwu\",\"vctafsrb\"]},{\"ipAddress\":\"blml\",\"volumeResourceIds\":[\"xihspnxwq\",\"gnepz\"]},{\"ipAddress\":\"klsbsbqqqagw\",\"volumeResourceIds\":[\"ao\",\"zisglrrczezkhh\",\"tnjadhq\"]},{\"ipAddress\":\"wjqo\",\"volumeResourceIds\":[\"ayfbpcm\",\"plby\",\"rueqthwm\"]}]}") + "{\"networkSiblingSetId\":\"jdjltymkmvgui\",\"subnetId\":\"wartspphkixkykxd\",\"networkSiblingSetStateId\":\"j\",\"networkFeatures\":\"Basic\",\"provisioningState\":\"Succeeded\",\"nicInfoList\":[{\"ipAddress\":\"hikkflrmy\",\"volumeResourceIds\":[\"nc\",\"lhrisw\",\"lmiiiovg\"]},{\"ipAddress\":\"gxuugqkctotio\",\"volumeResourceIds\":[\"teqdptj\",\"wdtgukranblw\",\"hqlkccuzgygqwaho\",\"ulwgniiprglvawuw\"]},{\"ipAddress\":\"ufypiv\",\"volumeResourceIds\":[\"bjpmcubk\",\"ifoxxkubvphav\",\"mhbrbqgvg\"]},{\"ipAddress\":\"pbbttefjoknss\",\"volumeResourceIds\":[\"qedikdfrd\",\"iqmrjgeihfqlggw\",\"iwzcxmjpbyeph\"]}]}") .toObject(NetworkSiblingSetInner.class); - Assertions.assertEquals("ci", model.networkSiblingSetId()); - Assertions.assertEquals("defxrdc", model.subnetId()); - Assertions.assertEquals("nbkkjanurnnq", model.networkSiblingSetStateId()); + Assertions.assertEquals("jdjltymkmvgui", model.networkSiblingSetId()); + Assertions.assertEquals("wartspphkixkykxd", model.subnetId()); + Assertions.assertEquals("j", model.networkSiblingSetStateId()); Assertions.assertEquals(NetworkFeatures.BASIC, model.networkFeatures()); - Assertions.assertEquals("pxrxvbfihwu", model.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("nc", model.nicInfoList().get(0).volumeResourceIds().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java index 45e488c1c2de..f4a1b7067810 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java @@ -11,10 +11,8 @@ public final class NicInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NicInfo model = BinaryData - .fromString( - "{\"ipAddress\":\"mbscbbx\",\"volumeResourceIds\":[\"hxiidlopedb\",\"dpyqyybxubmd\",\"afcbqw\",\"e\"]}") + NicInfo model = BinaryData.fromString("{\"ipAddress\":\"t\",\"volumeResourceIds\":[\"vrcmyfqipgxhnpo\"]}") .toObject(NicInfo.class); - Assertions.assertEquals("hxiidlopedb", model.volumeResourceIds().get(0)); + Assertions.assertEquals("vrcmyfqipgxhnpo", model.volumeResourceIds().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java index de94209bc098..9f89e08d38f4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java @@ -23,7 +23,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"gbgatzuuvbxn\",\"display\":{\"provider\":\"bwggahtt\",\"resource\":\"swvajqfu\",\"operation\":\"x\",\"description\":\"qzasunwqrjzfrgqh\"},\"origin\":\"hcmbuocnjrohmbp\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"eblydyv\",\"displayName\":\"kmrocxne\",\"displayDescription\":\"sm\",\"unit\":\"dlfp\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"avyunssxlg\",\"ieegjl\"],\"internalMetricName\":\"vpaseksgbu\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"uygdhgaqipirp\",\"sourceMdmNamespace\":\"rqofulopmjnlexwh\",\"dimensions\":[{}],\"aggregationType\":\"ibkeph\",\"fillGapWithZero\":false,\"category\":\"rctat\",\"resourceIdDimensionNameOverride\":\"intqpbrlcyr\",\"isInternal\":true}],\"logSpecifications\":[{\"name\":\"ofxyfsrucvcrrpc\",\"displayName\":\"tbstvjeaqnrmv\"}]}}}]}"; + = "{\"value\":[{\"name\":\"xihspnxwq\",\"display\":{\"provider\":\"epzwaklsbsbqq\",\"resource\":\"gwwrxaomzis\",\"operation\":\"rrczezkhhltnj\",\"description\":\"hqo\"},\"origin\":\"jqoyueayfbpcm\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"rueqthwm\",\"displayName\":\"mbscbbx\",\"displayDescription\":\"dhxiidlopedbwd\",\"unit\":\"qyybxubmdnafcbq\",\"supportedAggregationTypes\":[\"Average\"],\"supportedTimeGrainTypes\":[\"laqacigele\"],\"internalMetricName\":\"d\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"wzkjopwbeonrlkw\",\"sourceMdmNamespace\":\"qybxceakxcp\",\"dimensions\":[{},{},{}],\"aggregationType\":\"fyiaseqch\",\"fillGapWithZero\":true,\"category\":\"zrazisgyk\",\"resourceIdDimensionNameOverride\":\"emv\",\"isInternal\":true},{\"name\":\"zohmnrxxbs\",\"displayName\":\"klinhmdptysprq\",\"displayDescription\":\"nzxojpslsvjgpli\",\"unit\":\"iqwoyxqvapcoh\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"xcxzrzdcgdzben\"],\"internalMetricName\":\"bcawetz\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"jwfljhznamtua\",\"sourceMdmNamespace\":\"zwcjjncqtj\",\"dimensions\":[{}],\"aggregationType\":\"vgbgatzuuvbxng\",\"fillGapWithZero\":false,\"category\":\"ggahtt\",\"resourceIdDimensionNameOverride\":\"swvajqfu\",\"isInternal\":false}],\"logSpecifications\":[{\"name\":\"zasunwqrjzfrgq\",\"displayName\":\"ohcmbu\"}]}}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,19 +34,19 @@ public void testList() throws Exception { PagedIterable<Operation> response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("gbgatzuuvbxn", response.iterator().next().name()); - Assertions.assertEquals("bwggahtt", response.iterator().next().display().provider()); - Assertions.assertEquals("swvajqfu", response.iterator().next().display().resource()); - Assertions.assertEquals("x", response.iterator().next().display().operation()); - Assertions.assertEquals("qzasunwqrjzfrgqh", response.iterator().next().display().description()); - Assertions.assertEquals("hcmbuocnjrohmbp", response.iterator().next().origin()); - Assertions.assertEquals("eblydyv", + Assertions.assertEquals("xihspnxwq", response.iterator().next().name()); + Assertions.assertEquals("epzwaklsbsbqq", response.iterator().next().display().provider()); + Assertions.assertEquals("gwwrxaomzis", response.iterator().next().display().resource()); + Assertions.assertEquals("rrczezkhhltnj", response.iterator().next().display().operation()); + Assertions.assertEquals("hqo", response.iterator().next().display().description()); + Assertions.assertEquals("jqoyueayfbpcm", response.iterator().next().origin()); + Assertions.assertEquals("rueqthwm", response.iterator().next().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("kmrocxne", + Assertions.assertEquals("mbscbbx", response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("sm", + Assertions.assertEquals("dhxiidlopedbwd", response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("dlfp", + Assertions.assertEquals("qyybxubmdnafcbq", response.iterator().next().serviceSpecification().metricSpecifications().get(0).unit()); Assertions.assertEquals(MetricAggregationType.AVERAGE, response.iterator() @@ -56,7 +56,7 @@ public void testList() throws Exception { .get(0) .supportedAggregationTypes() .get(0)); - Assertions.assertEquals("avyunssxlg", + Assertions.assertEquals("laqacigele", response.iterator() .next() .serviceSpecification() @@ -64,21 +64,21 @@ public void testList() throws Exception { .get(0) .supportedTimeGrainTypes() .get(0)); - Assertions.assertEquals("vpaseksgbu", + Assertions.assertEquals("d", response.iterator().next().serviceSpecification().metricSpecifications().get(0).internalMetricName()); Assertions.assertTrue( response.iterator().next().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("uygdhgaqipirp", + Assertions.assertEquals("wzkjopwbeonrlkw", response.iterator().next().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("rqofulopmjnlexwh", + Assertions.assertEquals("qybxceakxcp", response.iterator().next().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("ibkeph", + Assertions.assertEquals("fyiaseqch", response.iterator().next().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertFalse( + Assertions.assertTrue( response.iterator().next().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("rctat", + Assertions.assertEquals("zrazisgyk", response.iterator().next().serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("intqpbrlcyr", + Assertions.assertEquals("emv", response.iterator() .next() .serviceSpecification() @@ -87,9 +87,9 @@ public void testList() throws Exception { .resourceIdDimensionNameOverride()); Assertions .assertTrue(response.iterator().next().serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("ofxyfsrucvcrrpc", + Assertions.assertEquals("zasunwqrjzfrgq", response.iterator().next().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("tbstvjeaqnrmv", + Assertions.assertEquals("ohcmbu", response.iterator().next().serviceSpecification().logSpecifications().get(0).displayName()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OriginClusterInformationTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OriginClusterInformationTests.java index 34d42875e068..d0c163aa8676 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OriginClusterInformationTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OriginClusterInformationTests.java @@ -13,24 +13,24 @@ public final class OriginClusterInformationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OriginClusterInformation model = BinaryData.fromString( - "{\"peerClusterName\":\"kdmligovi\",\"peerAddresses\":[\"xk\",\"mloazuru\",\"cbgoor\",\"te\"],\"peerVserverName\":\"ybfhjxa\",\"peerVolumeName\":\"vvjgslor\"}") + "{\"peerClusterName\":\"frqttbajlkatnw\",\"peerAddresses\":[\"iopid\",\"qqfkuv\"],\"peerVserverName\":\"cxkdmligovi\",\"peerVolumeName\":\"rxkpmloazuruoc\"}") .toObject(OriginClusterInformation.class); - Assertions.assertEquals("kdmligovi", model.peerClusterName()); - Assertions.assertEquals("xk", model.peerAddresses().get(0)); - Assertions.assertEquals("ybfhjxa", model.peerVserverName()); - Assertions.assertEquals("vvjgslor", model.peerVolumeName()); + Assertions.assertEquals("frqttbajlkatnw", model.peerClusterName()); + Assertions.assertEquals("iopid", model.peerAddresses().get(0)); + Assertions.assertEquals("cxkdmligovi", model.peerVserverName()); + Assertions.assertEquals("rxkpmloazuruoc", model.peerVolumeName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OriginClusterInformation model = new OriginClusterInformation().withPeerClusterName("kdmligovi") - .withPeerAddresses(Arrays.asList("xk", "mloazuru", "cbgoor", "te")) - .withPeerVserverName("ybfhjxa") - .withPeerVolumeName("vvjgslor"); + OriginClusterInformation model = new OriginClusterInformation().withPeerClusterName("frqttbajlkatnw") + .withPeerAddresses(Arrays.asList("iopid", "qqfkuv")) + .withPeerVserverName("cxkdmligovi") + .withPeerVolumeName("rxkpmloazuruoc"); model = BinaryData.fromObject(model).toObject(OriginClusterInformation.class); - Assertions.assertEquals("kdmligovi", model.peerClusterName()); - Assertions.assertEquals("xk", model.peerAddresses().get(0)); - Assertions.assertEquals("ybfhjxa", model.peerVserverName()); - Assertions.assertEquals("vvjgslor", model.peerVolumeName()); + Assertions.assertEquals("frqttbajlkatnw", model.peerClusterName()); + Assertions.assertEquals("iopid", model.peerAddresses().get(0)); + Assertions.assertEquals("cxkdmligovi", model.peerVserverName()); + Assertions.assertEquals("rxkpmloazuruoc", model.peerVolumeName()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeeringPassphrasesInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeeringPassphrasesInnerTests.java index 057defd13094..7ef97a2f999e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeeringPassphrasesInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeeringPassphrasesInnerTests.java @@ -12,10 +12,10 @@ public final class PeeringPassphrasesInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PeeringPassphrasesInner model = BinaryData.fromString( - "{\"clusterPeeringCommand\":\"kjlmx\",\"clusterPeeringPassphrase\":\"omdynhdwdigum\",\"vserverPeeringCommand\":\"nraauzz\"}") + "{\"clusterPeeringCommand\":\"fcibyfmowuxrkj\",\"clusterPeeringPassphrase\":\"vdwxfzwi\",\"vserverPeeringCommand\":\"vwzjbhyz\"}") .toObject(PeeringPassphrasesInner.class); - Assertions.assertEquals("kjlmx", model.clusterPeeringCommand()); - Assertions.assertEquals("omdynhdwdigum", model.clusterPeeringPassphrase()); - Assertions.assertEquals("nraauzz", model.vserverPeeringCommand()); + Assertions.assertEquals("fcibyfmowuxrkj", model.clusterPeeringCommand()); + Assertions.assertEquals("vdwxfzwi", model.clusterPeeringPassphrase()); + Assertions.assertEquals("vwzjbhyz", model.vserverPeeringCommand()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java index d522f5176b13..78cad385bf57 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java @@ -13,24 +13,24 @@ public final class PoolPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PoolPatchProperties model = BinaryData.fromString( - "{\"size\":9024669297571471912,\"qosType\":\"Auto\",\"coolAccess\":true,\"customThroughputMibps\":729860608}") + "{\"size\":5938651610318870648,\"qosType\":\"Manual\",\"coolAccess\":true,\"customThroughputMibps\":1455417694}") .toObject(PoolPatchProperties.class); - Assertions.assertEquals(9024669297571471912L, model.size()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); + Assertions.assertEquals(5938651610318870648L, model.size()); + Assertions.assertEquals(QosType.MANUAL, model.qosType()); Assertions.assertTrue(model.coolAccess()); - Assertions.assertEquals(729860608, model.customThroughputMibps()); + Assertions.assertEquals(1455417694, model.customThroughputMibps()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PoolPatchProperties model = new PoolPatchProperties().withSize(9024669297571471912L) - .withQosType(QosType.AUTO) + PoolPatchProperties model = new PoolPatchProperties().withSize(5938651610318870648L) + .withQosType(QosType.MANUAL) .withCoolAccess(true) - .withCustomThroughputMibps(729860608); + .withCustomThroughputMibps(1455417694); model = BinaryData.fromObject(model).toObject(PoolPatchProperties.class); - Assertions.assertEquals(9024669297571471912L, model.size()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); + Assertions.assertEquals(5938651610318870648L, model.size()); + Assertions.assertEquals(QosType.MANUAL, model.qosType()); Assertions.assertTrue(model.coolAccess()); - Assertions.assertEquals(729860608, model.customThroughputMibps()); + Assertions.assertEquals(1455417694, model.customThroughputMibps()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java index 6a85ff108086..68160fdc7212 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java @@ -15,30 +15,30 @@ public final class PoolPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PoolProperties model = BinaryData.fromString( - "{\"poolId\":\"dwqslsrhmpqvw\",\"size\":3475044640487676472,\"serviceLevel\":\"Flexible\",\"provisioningState\":\"dcbrwimuvq\",\"totalThroughputMibps\":82.95491,\"utilizedThroughputMibps\":75.11184,\"customThroughputMibps\":1299562334,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Single\"}") + "{\"poolId\":\"emhooclutnpq\",\"size\":3028887990431623493,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"jk\",\"totalThroughputMibps\":48.612667,\"utilizedThroughputMibps\":79.15836,\"customThroughputMibps\":1879965141,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Double\"}") .toObject(PoolProperties.class); - Assertions.assertEquals(3475044640487676472L, model.size()); - Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.serviceLevel()); - Assertions.assertEquals(1299562334, model.customThroughputMibps()); + Assertions.assertEquals(3028887990431623493L, model.size()); + Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); + Assertions.assertEquals(1879965141, model.customThroughputMibps()); Assertions.assertEquals(QosType.AUTO, model.qosType()); Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(EncryptionType.SINGLE, model.encryptionType()); + Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PoolProperties model = new PoolProperties().withSize(3475044640487676472L) - .withServiceLevel(ServiceLevel.FLEXIBLE) - .withCustomThroughputMibps(1299562334) + PoolProperties model = new PoolProperties().withSize(3028887990431623493L) + .withServiceLevel(ServiceLevel.ULTRA) + .withCustomThroughputMibps(1879965141) .withQosType(QosType.AUTO) .withCoolAccess(false) - .withEncryptionType(EncryptionType.SINGLE); + .withEncryptionType(EncryptionType.DOUBLE); model = BinaryData.fromObject(model).toObject(PoolProperties.class); - Assertions.assertEquals(3475044640487676472L, model.size()); - Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.serviceLevel()); - Assertions.assertEquals(1299562334, model.customThroughputMibps()); + Assertions.assertEquals(3028887990431623493L, model.size()); + Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); + Assertions.assertEquals(1879965141, model.customThroughputMibps()); Assertions.assertEquals(QosType.AUTO, model.qosType()); Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(EncryptionType.SINGLE, model.encryptionType()); + Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java index 8fad4640b017..cb99b3ed030a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java @@ -26,7 +26,7 @@ public final class PoolsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"poolId\":\"hkkyowltjouw\",\"size\":6146334947352208507,\"serviceLevel\":\"Standard\",\"provisioningState\":\"Succeeded\",\"totalThroughputMibps\":24.41163,\"utilizedThroughputMibps\":95.237206,\"customThroughputMibps\":1416952757,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"itbfjtdy\",\"location\":\"nplfac\",\"tags\":{\"wetjtdrhutf\":\"cqrq\",\"gssz\":\"oadtxopgehpadkmd\",\"harls\":\"vctkbbx\"},\"id\":\"rncclabv\",\"name\":\"yngsuxxcz\",\"type\":\"myqjog\"}"; + = "{\"properties\":{\"poolId\":\"o\",\"size\":6896727080859319312,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"Succeeded\",\"totalThroughputMibps\":37.849075,\"utilizedThroughputMibps\":11.784178,\"customThroughputMibps\":2071007426,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"xqnwhscoz\",\"location\":\"mvgxsmpknpwir\",\"tags\":{\"dnmckap\":\"fewxqouox\",\"cdgmoqu\":\"hknqiijge\",\"kyow\":\"qih\"},\"id\":\"tjouwhldxwhi\",\"name\":\"proqk\",\"type\":\"mfxm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,23 +36,23 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CapacityPool response = manager.pools() - .define("atuwqkokbc") - .withRegion("khgvoogxkfnao") - .withExistingNetAppAccount("tvsnvl", "qdnzyza") - .withSize(3190234716778410225L) - .withServiceLevel(ServiceLevel.PREMIUM) - .withTags(mapOf("nskby", "mhcctopuowy", "jpxecxqnwhsco", "quhczygxvh", "pknpwirfljfewxq", "awmvgxs")) - .withCustomThroughputMibps(1519260317) + .define("jawh") + .withRegion("gwi") + .withExistingNetAppAccount("sjmrkkhm", "dmdlgyqixokw") + .withSize(6816602850420484237L) + .withServiceLevel(ServiceLevel.FLEXIBLE) + .withTags(mapOf("mhobcyan", "neakh")) + .withCustomThroughputMibps(528226837) .withQosType(QosType.AUTO) - .withCoolAccess(false) + .withCoolAccess(true) .withEncryptionType(EncryptionType.DOUBLE) .create(); - Assertions.assertEquals("nplfac", response.location()); - Assertions.assertEquals("cqrq", response.tags().get("wetjtdrhutf")); - Assertions.assertEquals(6146334947352208507L, response.size()); - Assertions.assertEquals(ServiceLevel.STANDARD, response.serviceLevel()); - Assertions.assertEquals(1416952757, response.customThroughputMibps()); + Assertions.assertEquals("mvgxsmpknpwir", response.location()); + Assertions.assertEquals("fewxqouox", response.tags().get("dnmckap")); + Assertions.assertEquals(6896727080859319312L, response.size()); + Assertions.assertEquals(ServiceLevel.ULTRA, response.serviceLevel()); + Assertions.assertEquals(2071007426, response.customThroughputMibps()); Assertions.assertEquals(QosType.MANUAL, response.qosType()); Assertions.assertTrue(response.coolAccess()); Assertions.assertEquals(EncryptionType.SINGLE, response.encryptionType()); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java index 8df8b27e8210..94faf1ebc6b4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class PoolsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"poolId\":\"yytfvpct\",\"size\":6192810519203521270,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"ff\",\"totalThroughputMibps\":79.60702,\"utilizedThroughputMibps\":72.03645,\"customThroughputMibps\":1341232178,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"etag\":\"kke\",\"location\":\"kj\",\"tags\":{\"zmxjqif\":\"wg\",\"cmlzaahz\":\"ujjs\",\"oolkolirhhm\":\"hu\"},\"id\":\"jusuzgfjzc\",\"name\":\"aaxoialahfxwcc\",\"type\":\"kdxkuk\"}"; + = "{\"properties\":{\"poolId\":\"xv\",\"size\":6874264411354040379,\"serviceLevel\":\"Premium\",\"provisioningState\":\"ucsa\",\"totalThroughputMibps\":39.066177,\"utilizedThroughputMibps\":9.276128,\"customThroughputMibps\":490473916,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"etag\":\"gmat\",\"location\":\"zpducdaak\",\"tags\":{\"oimyfpqd\":\"ktz\",\"tfjikffffgkuh\":\"wkppnwyytfvp\",\"jigawgaz\":\"nwhvuldbkkejj\"},\"id\":\"xjqifhujjsbc\",\"name\":\"lzaahzbhuroolk\",\"type\":\"lirh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,16 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - CapacityPool response - = manager.pools().getWithResponse("ujktzb", "imyfpqdo", "kpp", com.azure.core.util.Context.NONE).getValue(); + CapacityPool response = manager.pools() + .getWithResponse("vgecpwgoljtzx", "mxsdobygoog", "qa", com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals("kj", response.location()); - Assertions.assertEquals("wg", response.tags().get("zmxjqif")); - Assertions.assertEquals(6192810519203521270L, response.size()); - Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, response.serviceLevel()); - Assertions.assertEquals(1341232178, response.customThroughputMibps()); - Assertions.assertEquals(QosType.AUTO, response.qosType()); + Assertions.assertEquals("zpducdaak", response.location()); + Assertions.assertEquals("ktz", response.tags().get("oimyfpqd")); + Assertions.assertEquals(6874264411354040379L, response.size()); + Assertions.assertEquals(ServiceLevel.PREMIUM, response.serviceLevel()); + Assertions.assertEquals(490473916, response.customThroughputMibps()); + Assertions.assertEquals(QosType.MANUAL, response.qosType()); Assertions.assertFalse(response.coolAccess()); Assertions.assertEquals(EncryptionType.DOUBLE, response.encryptionType()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java index 38b974eab454..9d257344df3f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java @@ -25,7 +25,7 @@ public final class PoolsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"poolId\":\"k\",\"size\":6606387189353667472,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"lnthbbnkgzukwdrn\",\"totalThroughputMibps\":60.380737,\"utilizedThroughputMibps\":59.94145,\"customThroughputMibps\":1591848139,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"etag\":\"lfuyfjbpfiddhlr\",\"location\":\"zcqy\",\"tags\":{\"k\":\"rfuiocusel\",\"sjmrkkhm\":\"sazrhxuddqmdtff\",\"jawh\":\"dmdlgyqixokw\"},\"id\":\"ag\",\"name\":\"qfqqdlcvmyolc\",\"type\":\"ymjc\"}]}"; + = "{\"value\":[{\"properties\":{\"poolId\":\"axoialahfxwccokd\",\"size\":3437791026976854233,\"serviceLevel\":\"Premium\",\"provisioningState\":\"kczynuhhoqeqsh\",\"totalThroughputMibps\":92.77746,\"utilizedThroughputMibps\":5.901271,\"customThroughputMibps\":1319117769,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"etag\":\"hbbnkgzuk\",\"location\":\"r\",\"tags\":{\"mlfuyfjbp\":\"jthfceyjnc\",\"yjmqrf\":\"iddhlrufzc\"},\"id\":\"iocuselqkr\",\"name\":\"azrhxudd\",\"type\":\"mdtff\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,15 +35,15 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<CapacityPool> response - = manager.pools().list("kczynuhhoqeqsh", "vl", com.azure.core.util.Context.NONE); + = manager.pools().list("mojusuz", "fjzc", com.azure.core.util.Context.NONE); - Assertions.assertEquals("zcqy", response.iterator().next().location()); - Assertions.assertEquals("rfuiocusel", response.iterator().next().tags().get("k")); - Assertions.assertEquals(6606387189353667472L, response.iterator().next().size()); - Assertions.assertEquals(ServiceLevel.ULTRA, response.iterator().next().serviceLevel()); - Assertions.assertEquals(1591848139, response.iterator().next().customThroughputMibps()); - Assertions.assertEquals(QosType.AUTO, response.iterator().next().qosType()); - Assertions.assertTrue(response.iterator().next().coolAccess()); + Assertions.assertEquals("r", response.iterator().next().location()); + Assertions.assertEquals("jthfceyjnc", response.iterator().next().tags().get("mlfuyfjbp")); + Assertions.assertEquals(3437791026976854233L, response.iterator().next().size()); + Assertions.assertEquals(ServiceLevel.PREMIUM, response.iterator().next().serviceLevel()); + Assertions.assertEquals(1319117769, response.iterator().next().customThroughputMibps()); + Assertions.assertEquals(QosType.MANUAL, response.iterator().next().qosType()); + Assertions.assertFalse(response.iterator().next().coolAccess()); Assertions.assertEquals(EncryptionType.DOUBLE, response.iterator().next().encryptionType()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java index b9d8728fde63..521ca56f7cad 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java @@ -12,18 +12,18 @@ public final class QueryNetworkSiblingSetRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QueryNetworkSiblingSetRequest model - = BinaryData.fromString("{\"networkSiblingSetId\":\"czzydmxzjij\",\"subnetId\":\"vuaurk\"}") + = BinaryData.fromString("{\"networkSiblingSetId\":\"wkufykhvuhxepm\",\"subnetId\":\"utznabaobns\"}") .toObject(QueryNetworkSiblingSetRequest.class); - Assertions.assertEquals("czzydmxzjij", model.networkSiblingSetId()); - Assertions.assertEquals("vuaurk", model.subnetId()); + Assertions.assertEquals("wkufykhvuhxepm", model.networkSiblingSetId()); + Assertions.assertEquals("utznabaobns", model.subnetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { QueryNetworkSiblingSetRequest model - = new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("czzydmxzjij").withSubnetId("vuaurk"); + = new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("wkufykhvuhxepm").withSubnetId("utznabaobns"); model = BinaryData.fromObject(model).toObject(QueryNetworkSiblingSetRequest.class); - Assertions.assertEquals("czzydmxzjij", model.networkSiblingSetId()); - Assertions.assertEquals("vuaurk", model.subnetId()); + Assertions.assertEquals("wkufykhvuhxepm", model.networkSiblingSetId()); + Assertions.assertEquals("utznabaobns", model.subnetId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java index cfa0dbdb0a5a..637027e62e69 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java @@ -13,25 +13,25 @@ public final class QuotaAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QuotaAvailabilityRequest model = BinaryData.fromString( - "{\"name\":\"xuifmcsypobkdqz\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots\",\"resourceGroup\":\"zsylollgt\"}") + "{\"name\":\"owx\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups\",\"resourceGroup\":\"piudeugfsxzecpa\"}") .toObject(QuotaAvailabilityRequest.class); - Assertions.assertEquals("xuifmcsypobkdqz", model.name()); + Assertions.assertEquals("owx", model.name()); Assertions.assertEquals( - CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS, + CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS, model.type()); - Assertions.assertEquals("zsylollgt", model.resourceGroup()); + Assertions.assertEquals("piudeugfsxzecpa", model.resourceGroup()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - QuotaAvailabilityRequest model = new QuotaAvailabilityRequest().withName("xuifmcsypobkdqz") - .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS) - .withResourceGroup("zsylollgt"); + QuotaAvailabilityRequest model = new QuotaAvailabilityRequest().withName("owx") + .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS) + .withResourceGroup("piudeugfsxzecpa"); model = BinaryData.fromObject(model).toObject(QuotaAvailabilityRequest.class); - Assertions.assertEquals("xuifmcsypobkdqz", model.name()); + Assertions.assertEquals("owx", model.name()); Assertions.assertEquals( - CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS, + CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS, model.type()); - Assertions.assertEquals("zsylollgt", model.resourceGroup()); + Assertions.assertEquals("piudeugfsxzecpa", model.resourceGroup()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetWithResponseMockTests.java index 4b40bbb33ad1..6b29b32ceace 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class RansomwareReportsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"eventTime\":\"2021-09-27T22:08:27Z\",\"state\":\"Active\",\"severity\":\"Low\",\"clearedCount\":1684475673,\"reportedCount\":1140842141,\"suspects\":[{\"extension\":\"tlgflwfgz\",\"resolution\":\"PotentialThreat\",\"fileCount\":1455150949,\"suspectFiles\":[{},{},{},{}]},{\"extension\":\"eatlijjjrtvamcas\",\"resolution\":\"FalsePositive\",\"fileCount\":1639548790,\"suspectFiles\":[{},{},{}]}],\"provisioningState\":\"xetyvku\"},\"id\":\"ignohi\",\"name\":\"kgqogjw\",\"type\":\"indedvabbx\"}"; + = "{\"properties\":{\"eventTime\":\"2021-09-27T06:46:36Z\",\"state\":\"Resolved\",\"severity\":\"Moderate\",\"clearedCount\":67838372,\"reportedCount\":928179611,\"suspects\":[{\"extension\":\"cdsiwdfmmpzhzzwv\",\"resolution\":\"FalsePositive\",\"fileCount\":1475743348,\"suspectFiles\":[{},{},{},{}]},{\"extension\":\"dgrpx\",\"resolution\":\"PotentialThreat\",\"fileCount\":938896992,\"suspectFiles\":[{},{},{},{}]},{\"extension\":\"ndjrkclamggl\",\"resolution\":\"FalsePositive\",\"fileCount\":125559187,\"suspectFiles\":[{},{}]},{\"extension\":\"qey\",\"resolution\":\"FalsePositive\",\"fileCount\":528509838,\"suspectFiles\":[{}]}],\"provisioningState\":\"qfgqkayejsxtlg\"},\"id\":\"wf\",\"name\":\"ziiucij\",\"type\":\"ceatlijjjrtvamca\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RansomwareReport response = manager.ransomwareReports() - .getWithResponse("wdfmmpzhzzwvywr", "yngydgrpxncaki", "aondjrkclamgg", "vlmfej", "oqeykglt", + .getWithResponse("cduwjoedx", "gucaif", "aurwwgilfjq", "a", "dmkxwxdcvjwcy", com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListMockTests.java index 4f5158773803..5fa9a557a5fd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListMockTests.java @@ -21,7 +21,7 @@ public final class RansomwareReportsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"eventTime\":\"2021-08-20T16:05:59Z\",\"state\":\"Active\",\"severity\":\"High\",\"clearedCount\":842328747,\"reportedCount\":766137540,\"suspects\":[{\"extension\":\"a\",\"resolution\":\"FalsePositive\",\"fileCount\":1448262455,\"suspectFiles\":[{},{},{},{}]},{\"extension\":\"mfczl\",\"resolution\":\"PotentialThreat\",\"fileCount\":1837335612,\"suspectFiles\":[{}]},{\"extension\":\"zgowox\",\"resolution\":\"PotentialThreat\",\"fileCount\":642254793,\"suspectFiles\":[{}]},{\"extension\":\"nyq\",\"resolution\":\"FalsePositive\",\"fileCount\":1232055835,\"suspectFiles\":[{},{},{},{}]}],\"provisioningState\":\"xisimjceagbj\"},\"id\":\"lsumywzashx\",\"name\":\"onoyjf\",\"type\":\"ipubyznclkfk\"}]}"; + = "{\"value\":[{\"properties\":{\"eventTime\":\"2021-04-10T09:41:57Z\",\"state\":\"Active\",\"severity\":\"None\",\"clearedCount\":785027108,\"reportedCount\":332997027,\"suspects\":[{\"extension\":\"fcfxzirzzihvwy\",\"resolution\":\"PotentialThreat\",\"fileCount\":367979473,\"suspectFiles\":[{},{},{},{}]},{\"extension\":\"czwciidjsllfryvd\",\"resolution\":\"PotentialThreat\",\"fileCount\":1693179101,\"suspectFiles\":[{},{}]}],\"provisioningState\":\"frgnawbabgfbktyj\"},\"id\":\"czlfsy\",\"name\":\"kfrbzgowoxqmjea\",\"type\":\"cxn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<RansomwareReport> response = manager.ransomwareReports() - .list("hmedeilbjywfcfxz", "rzzihvwypus", "vjslczwcii", "jsllfryvd", com.azure.core.util.Context.NONE); + .list("zknxkv", "cxetyvkunmignoh", "k", "gqogjwpindedva", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java index 7cbf4f9d6d98..9dcd9e38107a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java @@ -12,9 +12,9 @@ public final class RegionInfoAvailabilityZoneMappingsItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegionInfoAvailabilityZoneMappingsItem model - = BinaryData.fromString("{\"availabilityZone\":\"cpugm\",\"isAvailable\":true}") + = BinaryData.fromString("{\"availabilityZone\":\"agfl\",\"isAvailable\":false}") .toObject(RegionInfoAvailabilityZoneMappingsItem.class); - Assertions.assertEquals("cpugm", model.availabilityZone()); - Assertions.assertTrue(model.isAvailable()); + Assertions.assertEquals("agfl", model.availabilityZone()); + Assertions.assertFalse(model.isAvailable()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java index 4ef490791180..30ef547d6277 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java @@ -13,11 +13,10 @@ public final class RegionInfoInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegionInfoInner model = BinaryData.fromString( - "{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"wnupgahxku\",\"isAvailable\":true},{\"availabilityZone\":\"caac\",\"isAvailable\":false}]}") + "{\"storageToNetworkProximity\":\"T1AndT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"rsxypruuu\",\"isAvailable\":true},{\"availabilityZone\":\"hrszi\",\"isAvailable\":false},{\"availabilityZone\":\"elyetndnbf\",\"isAvailable\":false}]}") .toObject(RegionInfoInner.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, - model.storageToNetworkProximity()); - Assertions.assertEquals("wnupgahxku", model.availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2, model.storageToNetworkProximity()); + Assertions.assertEquals("rsxypruuu", model.availabilityZoneMappings().get(0).availabilityZone()); Assertions.assertTrue(model.availabilityZoneMappings().get(0).isAvailable()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoResourceInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoResourceInnerTests.java index 2d1b36c93752..abdc6a321c6c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoResourceInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoResourceInnerTests.java @@ -13,10 +13,11 @@ public final class RegionInfoResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegionInfoResourceInner model = BinaryData.fromString( - "{\"properties\":{\"storageToNetworkProximity\":\"T1\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"bdvibidmhmwffpl\",\"isAvailable\":false},{\"availabilityZone\":\"apckccrrvw\",\"isAvailable\":false},{\"availabilityZone\":\"oy\",\"isAvailable\":false},{\"availabilityZone\":\"haim\",\"isAvailable\":false}]},\"id\":\"oqboshbragapyyr\",\"name\":\"fsv\",\"type\":\"pavbo\"}") + "{\"properties\":{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"vnqvcd\",\"isAvailable\":false},{\"availabilityZone\":\"ucmfdj\",\"isAvailable\":false},{\"availabilityZone\":\"xpunjqi\",\"isAvailable\":true}]},\"id\":\"vitac\",\"name\":\"xmfcsserxhtv\",\"type\":\"oxhlw\"}") .toObject(RegionInfoResourceInner.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1, model.storageToNetworkProximity()); - Assertions.assertEquals("bdvibidmhmwffpl", model.availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, + model.storageToNetworkProximity()); + Assertions.assertEquals("vnqvcd", model.availabilityZoneMappings().get(0).availabilityZone()); Assertions.assertFalse(model.availabilityZoneMappings().get(0).isAvailable()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfosListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfosListTests.java index 12c399150439..10f9d2574936 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfosListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfosListTests.java @@ -13,12 +13,12 @@ public final class RegionInfosListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegionInfosList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"Default\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"zeh\",\"isAvailable\":false},{\"availabilityZone\":\"qhnlbqnbld\",\"isAvailable\":true},{\"availabilityZone\":\"lgsc\",\"isAvailable\":false}]},\"id\":\"mkrsrrmoucsofl\",\"name\":\"puviyfcaabe\",\"type\":\"lhbhl\"},{\"properties\":{\"storageToNetworkProximity\":\"T2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"bsxtkcudfbsfarfs\",\"isAvailable\":false}]},\"id\":\"kjxnqpvwgfstmhq\",\"name\":\"kizmdksaoafclu\",\"type\":\"v\"},{\"properties\":{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"mr\",\"isAvailable\":true},{\"availabilityZone\":\"cwwp\",\"isAvailable\":false},{\"availabilityZone\":\"w\",\"isAvailable\":false},{\"availabilityZone\":\"sxwef\",\"isAvailable\":false}]},\"id\":\"bvopwndyqle\",\"name\":\"llklmtk\",\"type\":\"lowkxxpvb\"}],\"nextLink\":\"fjmzsyzfho\"}") + "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"T2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"jmucftby\",\"isAvailable\":false},{\"availabilityZone\":\"ohkpigqfu\",\"isAvailable\":true},{\"availabilityZone\":\"zmkw\",\"isAvailable\":true}]},\"id\":\"oxaxm\",\"name\":\"e\",\"type\":\"alhhjnhgwydyynfs\"},{\"properties\":{\"storageToNetworkProximity\":\"T1\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"ta\",\"isAvailable\":false},{\"availabilityZone\":\"dlpukhpyrne\",\"isAvailable\":true},{\"availabilityZone\":\"pe\",\"isAvailable\":true},{\"availabilityZone\":\"nmg\",\"isAvailable\":true}]},\"id\":\"xddbhfhpfpaz\",\"name\":\"zoyw\",\"type\":\"xhpdulontacnpqwt\"}],\"nextLink\":\"tuevrh\"}") .toObject(RegionInfosList.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.DEFAULT, + Assertions.assertEquals(RegionStorageToNetworkProximity.T2AND_ACROSS_T2, model.value().get(0).storageToNetworkProximity()); - Assertions.assertEquals("zeh", model.value().get(0).availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertEquals("jmucftby", model.value().get(0).availabilityZoneMappings().get(0).availabilityZone()); Assertions.assertFalse(model.value().get(0).availabilityZoneMappings().get(0).isAvailable()); - Assertions.assertEquals("fjmzsyzfho", model.nextLink()); + Assertions.assertEquals("tuevrh", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java index db18cc621f69..a2760c353c7d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java @@ -13,23 +13,21 @@ public final class ResourceNameAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceNameAvailabilityRequest model = BinaryData.fromString( - "{\"name\":\"kgmnsghpxyc\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups\",\"resourceGroup\":\"drwjjkhvyom\"}") + "{\"name\":\"eeczgfbu\",\"type\":\"Microsoft.NetApp/netAppAccounts\",\"resourceGroup\":\"lelssxblycsxzujk\"}") .toObject(ResourceNameAvailabilityRequest.class); - Assertions.assertEquals("kgmnsghpxyc", model.name()); - Assertions.assertEquals( - CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS, model.type()); - Assertions.assertEquals("drwjjkhvyom", model.resourceGroup()); + Assertions.assertEquals("eeczgfbu", model.name()); + Assertions.assertEquals(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS, model.type()); + Assertions.assertEquals("lelssxblycsxzujk", model.resourceGroup()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceNameAvailabilityRequest model = new ResourceNameAvailabilityRequest().withName("kgmnsghpxyc") - .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS) - .withResourceGroup("drwjjkhvyom"); + ResourceNameAvailabilityRequest model = new ResourceNameAvailabilityRequest().withName("eeczgfbu") + .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS) + .withResourceGroup("lelssxblycsxzujk"); model = BinaryData.fromObject(model).toObject(ResourceNameAvailabilityRequest.class); - Assertions.assertEquals("kgmnsghpxyc", model.name()); - Assertions.assertEquals( - CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS, model.type()); - Assertions.assertEquals("drwjjkhvyom", model.resourceGroup()); + Assertions.assertEquals("eeczgfbu", model.name()); + Assertions.assertEquals(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS, model.type()); + Assertions.assertEquals("lelssxblycsxzujk", model.resourceGroup()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SecretPasswordIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SecretPasswordIdentityTests.java index 21e474f2472e..dc03adb98cba 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SecretPasswordIdentityTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SecretPasswordIdentityTests.java @@ -12,15 +12,15 @@ public final class SecretPasswordIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SecretPasswordIdentity model - = BinaryData.fromString("{\"principalId\":\"uwkffdjktsysid\",\"userAssignedIdentity\":\"c\"}") + = BinaryData.fromString("{\"principalId\":\"olvdnd\",\"userAssignedIdentity\":\"auo\"}") .toObject(SecretPasswordIdentity.class); - Assertions.assertEquals("c", model.userAssignedIdentity()); + Assertions.assertEquals("auo", model.userAssignedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SecretPasswordIdentity model = new SecretPasswordIdentity().withUserAssignedIdentity("c"); + SecretPasswordIdentity model = new SecretPasswordIdentity().withUserAssignedIdentity("auo"); model = BinaryData.fromObject(model).toObject(SecretPasswordIdentity.class); - Assertions.assertEquals("c", model.userAssignedIdentity()); + Assertions.assertEquals("auo", model.userAssignedIdentity()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SmbSettingsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SmbSettingsTests.java index c37aeca37e64..17c8aa9c9352 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SmbSettingsTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SmbSettingsTests.java @@ -15,20 +15,20 @@ public final class SmbSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SmbSettings model = BinaryData.fromString( - "{\"smbEncryption\":\"Enabled\",\"smbAccessBasedEnumerations\":\"Disabled\",\"smbNonBrowsable\":\"Disabled\"}") + "{\"smbEncryption\":\"Disabled\",\"smbAccessBasedEnumerations\":\"Disabled\",\"smbNonBrowsable\":\"Disabled\"}") .toObject(SmbSettings.class); - Assertions.assertEquals(SmbEncryptionState.ENABLED, model.smbEncryption()); + Assertions.assertEquals(SmbEncryptionState.DISABLED, model.smbEncryption()); Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumerations()); Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SmbSettings model = new SmbSettings().withSmbEncryption(SmbEncryptionState.ENABLED) + SmbSettings model = new SmbSettings().withSmbEncryption(SmbEncryptionState.DISABLED) .withSmbAccessBasedEnumerations(SmbAccessBasedEnumeration.DISABLED) .withSmbNonBrowsable(SmbNonBrowsable.DISABLED); model = BinaryData.fromObject(model).toObject(SmbSettings.class); - Assertions.assertEquals(SmbEncryptionState.ENABLED, model.smbEncryption()); + Assertions.assertEquals(SmbEncryptionState.DISABLED, model.smbEncryption()); Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumerations()); Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java index d42ad893093f..b297f984c887 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java @@ -27,7 +27,7 @@ public final class SnapshotPoliciesCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":714277208,\"minute\":622272508,\"usedBytes\":2403994955777432154},\"dailySchedule\":{\"snapshotsToKeep\":564386734,\"hour\":1267237600,\"minute\":1625638430,\"usedBytes\":207550429091909014},\"weeklySchedule\":{\"snapshotsToKeep\":24741758,\"day\":\"elqkaadlkn\",\"hour\":1051135474,\"minute\":367362868,\"usedBytes\":3729881925907988469},\"monthlySchedule\":{\"snapshotsToKeep\":1473891126,\"daysOfMonth\":\"xivcnrlyxnu\",\"hour\":1798343745,\"minute\":1007156651,\"usedBytes\":4412368381761510262},\"enabled\":false,\"provisioningState\":\"atv\"},\"etag\":\"sdtcjbctvivuzqym\",\"location\":\"owog\",\"tags\":{\"zndscxmxeatkdbmw\":\"tsqhzvbrzcdban\"},\"id\":\"rdjyibqb\",\"name\":\"aomhjrmkuhmaxl\",\"type\":\"alfihcjmobcancd\"}"; + = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1772721279,\"minute\":1386848574,\"usedBytes\":5489116524158771379},\"dailySchedule\":{\"snapshotsToKeep\":1584331771,\"hour\":1038228201,\"minute\":525386717,\"usedBytes\":9057457804706621531},\"weeklySchedule\":{\"snapshotsToKeep\":588449852,\"day\":\"xrfdsajre\",\"hour\":372541939,\"minute\":341978908,\"usedBytes\":8162861344959597142},\"monthlySchedule\":{\"snapshotsToKeep\":736699412,\"daysOfMonth\":\"evuafpwzyifrk\",\"hour\":1842303000,\"minute\":1552798454,\"usedBytes\":3569985601491408880},\"enabled\":true,\"provisioningState\":\"zdyi\"},\"etag\":\"fayorpravkjoges\",\"location\":\"bnsmjkwynqxaek\",\"tags\":{\"tjcrspxklurccl\":\"kvwjtqpkevmy\",\"gpxvkqmaupxvpi\":\"gxannnoytzposewx\",\"ds\":\"dfaifyzyzeyuube\",\"ytoithgygvfl\":\"l\"},\"id\":\"gvdihoynkrxwetwk\",\"name\":\"rcyrucpcunnu\",\"type\":\"dqumoenodnai\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,50 +37,51 @@ public void testCreateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SnapshotPolicy response = manager.snapshotPolicies() - .define("pxgzdyimsfayor") - .withRegion("maupxvpi") - .withExistingNetAppAccount("mevuafpwzy", "frkgwltxeq") - .withTags(mapOf("l", "aifyzyzeyuubeids")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(450350421) - .withMinute(2060156121) - .withUsedBytes(1995086181838707776L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1435976070) - .withHour(1686367778) - .withMinute(1716765996) - .withUsedBytes(290033450377892729L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(513653819) - .withDay("aekqsykvwj") - .withHour(2097396893) - .withMinute(1546006196) - .withUsedBytes(5248553620424406152L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1972305206) - .withDaysOfMonth("rspxklur") - .withHour(617853812) - .withMinute(1958943934) - .withUsedBytes(6367262895956775037L)) + .define("jeaoqaqbz") + .withRegion("vsknxrwzawnv") + .withExistingNetAppAccount("tgjcy", "yzjdnrqjbt") + .withTags( + mapOf("nvhycvdimwrz", "fhzag", "zgyufutrwp", "e", "yos", "eryekzkdhmeottaw", "pmil", "wwhnhjtfvpn")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1136237015) + .withMinute(854856644) + .withUsedBytes(7487371903139013200L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(594203198) + .withHour(450731923) + .withMinute(442901344) + .withUsedBytes(152388130923651753L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(235713184) + .withDay("lpkcvmwfauxxep") + .withHour(83403240) + .withMinute(2057984243) + .withUsedBytes(2938297005497406157L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1395383808) + .withDaysOfMonth("iijq") + .withHour(1266067525) + .withMinute(382149754) + .withUsedBytes(1611139504738174431L)) .withEnabled(true) .create(); - Assertions.assertEquals("owog", response.location()); - Assertions.assertEquals("tsqhzvbrzcdban", response.tags().get("zndscxmxeatkdbmw")); - Assertions.assertEquals(714277208, response.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(622272508, response.hourlySchedule().minute()); - Assertions.assertEquals(2403994955777432154L, response.hourlySchedule().usedBytes()); - Assertions.assertEquals(564386734, response.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1267237600, response.dailySchedule().hour()); - Assertions.assertEquals(1625638430, response.dailySchedule().minute()); - Assertions.assertEquals(207550429091909014L, response.dailySchedule().usedBytes()); - Assertions.assertEquals(24741758, response.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("elqkaadlkn", response.weeklySchedule().day()); - Assertions.assertEquals(1051135474, response.weeklySchedule().hour()); - Assertions.assertEquals(367362868, response.weeklySchedule().minute()); - Assertions.assertEquals(3729881925907988469L, response.weeklySchedule().usedBytes()); - Assertions.assertEquals(1473891126, response.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("xivcnrlyxnu", response.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1798343745, response.monthlySchedule().hour()); - Assertions.assertEquals(1007156651, response.monthlySchedule().minute()); - Assertions.assertEquals(4412368381761510262L, response.monthlySchedule().usedBytes()); - Assertions.assertFalse(response.enabled()); + Assertions.assertEquals("bnsmjkwynqxaek", response.location()); + Assertions.assertEquals("kvwjtqpkevmy", response.tags().get("tjcrspxklurccl")); + Assertions.assertEquals(1772721279, response.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1386848574, response.hourlySchedule().minute()); + Assertions.assertEquals(5489116524158771379L, response.hourlySchedule().usedBytes()); + Assertions.assertEquals(1584331771, response.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1038228201, response.dailySchedule().hour()); + Assertions.assertEquals(525386717, response.dailySchedule().minute()); + Assertions.assertEquals(9057457804706621531L, response.dailySchedule().usedBytes()); + Assertions.assertEquals(588449852, response.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("xrfdsajre", response.weeklySchedule().day()); + Assertions.assertEquals(372541939, response.weeklySchedule().hour()); + Assertions.assertEquals(341978908, response.weeklySchedule().minute()); + Assertions.assertEquals(8162861344959597142L, response.weeklySchedule().usedBytes()); + Assertions.assertEquals(736699412, response.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("evuafpwzyifrk", response.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1842303000, response.monthlySchedule().hour()); + Assertions.assertEquals(1552798454, response.monthlySchedule().minute()); + Assertions.assertEquals(3569985601491408880L, response.monthlySchedule().usedBytes()); + Assertions.assertTrue(response.enabled()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java index 3123f44cfeb5..736cd2cd1a86 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.snapshotPolicies().delete("jb", "xjeaoqaqbzgyh", "w", com.azure.core.util.Context.NONE); + manager.snapshotPolicies().delete("rtudawlpjfel", "erppt", "bgqnz", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java index 5b6bbc82c4ce..e3b77dbc7bef 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class SnapshotPoliciesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1672875845,\"minute\":1764547970,\"usedBytes\":4382532019057936776},\"dailySchedule\":{\"snapshotsToKeep\":1188527137,\"hour\":915705696,\"minute\":206743911,\"usedBytes\":8062040036037126303},\"weeklySchedule\":{\"snapshotsToKeep\":222537578,\"day\":\"syhzlwx\",\"hour\":1732227521,\"minute\":1277865813,\"usedBytes\":399098464049615690},\"monthlySchedule\":{\"snapshotsToKeep\":1504170570,\"daysOfMonth\":\"sbdweaderzmwnt\",\"hour\":1329621883,\"minute\":2094320372,\"usedBytes\":6613131527266315501},\"enabled\":true,\"provisioningState\":\"goaqylkjztj\"},\"etag\":\"azjcgmxitpfin\",\"location\":\"pdltkrlg\",\"tags\":{\"vcqguefzh\":\"bd\",\"lyujlfyoump\":\"mpheqdur\",\"brzmqxucycijoclx\":\"kyeclcdigpta\"},\"id\":\"utgjcyz\",\"name\":\"zjd\",\"type\":\"r\"}"; + = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1456340145,\"minute\":1689930384,\"usedBytes\":8927379792167675185},\"dailySchedule\":{\"snapshotsToKeep\":26308391,\"hour\":1121017868,\"minute\":1886264089,\"usedBytes\":1247014791354790301},\"weeklySchedule\":{\"snapshotsToKeep\":1118320263,\"day\":\"goadyedmzr\",\"hour\":667032439,\"minute\":41358152,\"usedBytes\":3257862909969904224},\"monthlySchedule\":{\"snapshotsToKeep\":618181984,\"daysOfMonth\":\"pkpztrg\",\"hour\":264899453,\"minute\":1339773074,\"usedBytes\":8449675372732471977},\"enabled\":false,\"provisioningState\":\"ugyxpqit\"},\"etag\":\"ialwv\",\"location\":\"buhzacaq\",\"tags\":{\"cujp\":\"tco\",\"bizt\":\"sxzakuejkm\"},\"id\":\"ofqcvovjufycsjm\",\"name\":\"bemyeji\",\"type\":\"iuxegth\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,28 +31,28 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SnapshotPolicy response = manager.snapshotPolicies() - .getWithResponse("urnpnuhzafccnuh", "i", "byl", com.azure.core.util.Context.NONE) + .getWithResponse("khyxvrqtvbcz", "ulmdgglm", "pjpfseykgs", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("pdltkrlg", response.location()); - Assertions.assertEquals("bd", response.tags().get("vcqguefzh")); - Assertions.assertEquals(1672875845, response.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1764547970, response.hourlySchedule().minute()); - Assertions.assertEquals(4382532019057936776L, response.hourlySchedule().usedBytes()); - Assertions.assertEquals(1188527137, response.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(915705696, response.dailySchedule().hour()); - Assertions.assertEquals(206743911, response.dailySchedule().minute()); - Assertions.assertEquals(8062040036037126303L, response.dailySchedule().usedBytes()); - Assertions.assertEquals(222537578, response.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("syhzlwx", response.weeklySchedule().day()); - Assertions.assertEquals(1732227521, response.weeklySchedule().hour()); - Assertions.assertEquals(1277865813, response.weeklySchedule().minute()); - Assertions.assertEquals(399098464049615690L, response.weeklySchedule().usedBytes()); - Assertions.assertEquals(1504170570, response.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("sbdweaderzmwnt", response.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1329621883, response.monthlySchedule().hour()); - Assertions.assertEquals(2094320372, response.monthlySchedule().minute()); - Assertions.assertEquals(6613131527266315501L, response.monthlySchedule().usedBytes()); - Assertions.assertTrue(response.enabled()); + Assertions.assertEquals("buhzacaq", response.location()); + Assertions.assertEquals("tco", response.tags().get("cujp")); + Assertions.assertEquals(1456340145, response.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1689930384, response.hourlySchedule().minute()); + Assertions.assertEquals(8927379792167675185L, response.hourlySchedule().usedBytes()); + Assertions.assertEquals(26308391, response.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1121017868, response.dailySchedule().hour()); + Assertions.assertEquals(1886264089, response.dailySchedule().minute()); + Assertions.assertEquals(1247014791354790301L, response.dailySchedule().usedBytes()); + Assertions.assertEquals(1118320263, response.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("goadyedmzr", response.weeklySchedule().day()); + Assertions.assertEquals(667032439, response.weeklySchedule().hour()); + Assertions.assertEquals(41358152, response.weeklySchedule().minute()); + Assertions.assertEquals(3257862909969904224L, response.weeklySchedule().usedBytes()); + Assertions.assertEquals(618181984, response.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("pkpztrg", response.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(264899453, response.monthlySchedule().hour()); + Assertions.assertEquals(1339773074, response.monthlySchedule().minute()); + Assertions.assertEquals(8449675372732471977L, response.monthlySchedule().usedBytes()); + Assertions.assertFalse(response.enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java index 99011eb4802e..f543572703c0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java @@ -22,7 +22,7 @@ public final class SnapshotPoliciesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":869743096,\"minute\":235713184,\"usedBytes\":5798834273726815282},\"dailySchedule\":{\"snapshotsToKeep\":501482624,\"hour\":23215841,\"minute\":1419691,\"usedBytes\":2849565274995751402},\"weeklySchedule\":{\"snapshotsToKeep\":601850943,\"day\":\"wbormcqmi\",\"hour\":1617268424,\"minute\":1772197279,\"usedBytes\":6303018001687291973},\"monthlySchedule\":{\"snapshotsToKeep\":1276736582,\"daysOfMonth\":\"xjmcsmyqwixvcpw\",\"hour\":517976128,\"minute\":1321154301,\"usedBytes\":6290615994078463009},\"enabled\":true,\"provisioningState\":\"ickduoiqta\"},\"etag\":\"yvsk\",\"location\":\"rwzawnvs\",\"tags\":{\"zregzgyufutrwpw\":\"hzagxnvhycvdimw\",\"meottawj\":\"ryekzkd\"},\"id\":\"osxw\",\"name\":\"hnhjtfvpndpmi\",\"type\":\"jpnwynudql\"}]}"; + = "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1507260148,\"minute\":178602039,\"usedBytes\":4126219884806928829},\"dailySchedule\":{\"snapshotsToKeep\":1483149095,\"hour\":218245335,\"minute\":1968192672,\"usedBytes\":293640513671842161},\"weeklySchedule\":{\"snapshotsToKeep\":168956539,\"day\":\"sgftipwc\",\"hour\":1912841634,\"minute\":299790545,\"usedBytes\":3808916284603368696},\"monthlySchedule\":{\"snapshotsToKeep\":1038921387,\"daysOfMonth\":\"rnpnuhzafccnuh\",\"hour\":1907122793,\"minute\":336660638,\"usedBytes\":2437579960294431174},\"enabled\":false,\"provisioningState\":\"xvatvcr\"},\"etag\":\"lbnb\",\"location\":\"vhcs\",\"tags\":{\"ndsbdw\":\"lwxaeaovurex\",\"t\":\"aderzmw\",\"tmvmmagoaqylkjz\":\"pag\"},\"id\":\"jiuazjc\",\"name\":\"mxitpfinzcpd\",\"type\":\"tkrlgjmtbd\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,27 +32,27 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<SnapshotPolicy> response - = manager.snapshotPolicies().list("v", "atbwbqam", com.azure.core.util.Context.NONE); + = manager.snapshotPolicies().list("nhii", "ialwc", com.azure.core.util.Context.NONE); - Assertions.assertEquals("rwzawnvs", response.iterator().next().location()); - Assertions.assertEquals("hzagxnvhycvdimw", response.iterator().next().tags().get("zregzgyufutrwpw")); - Assertions.assertEquals(869743096, response.iterator().next().hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(235713184, response.iterator().next().hourlySchedule().minute()); - Assertions.assertEquals(5798834273726815282L, response.iterator().next().hourlySchedule().usedBytes()); - Assertions.assertEquals(501482624, response.iterator().next().dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(23215841, response.iterator().next().dailySchedule().hour()); - Assertions.assertEquals(1419691, response.iterator().next().dailySchedule().minute()); - Assertions.assertEquals(2849565274995751402L, response.iterator().next().dailySchedule().usedBytes()); - Assertions.assertEquals(601850943, response.iterator().next().weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("wbormcqmi", response.iterator().next().weeklySchedule().day()); - Assertions.assertEquals(1617268424, response.iterator().next().weeklySchedule().hour()); - Assertions.assertEquals(1772197279, response.iterator().next().weeklySchedule().minute()); - Assertions.assertEquals(6303018001687291973L, response.iterator().next().weeklySchedule().usedBytes()); - Assertions.assertEquals(1276736582, response.iterator().next().monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("xjmcsmyqwixvcpw", response.iterator().next().monthlySchedule().daysOfMonth()); - Assertions.assertEquals(517976128, response.iterator().next().monthlySchedule().hour()); - Assertions.assertEquals(1321154301, response.iterator().next().monthlySchedule().minute()); - Assertions.assertEquals(6290615994078463009L, response.iterator().next().monthlySchedule().usedBytes()); - Assertions.assertTrue(response.iterator().next().enabled()); + Assertions.assertEquals("vhcs", response.iterator().next().location()); + Assertions.assertEquals("lwxaeaovurex", response.iterator().next().tags().get("ndsbdw")); + Assertions.assertEquals(1507260148, response.iterator().next().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(178602039, response.iterator().next().hourlySchedule().minute()); + Assertions.assertEquals(4126219884806928829L, response.iterator().next().hourlySchedule().usedBytes()); + Assertions.assertEquals(1483149095, response.iterator().next().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(218245335, response.iterator().next().dailySchedule().hour()); + Assertions.assertEquals(1968192672, response.iterator().next().dailySchedule().minute()); + Assertions.assertEquals(293640513671842161L, response.iterator().next().dailySchedule().usedBytes()); + Assertions.assertEquals(168956539, response.iterator().next().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("sgftipwc", response.iterator().next().weeklySchedule().day()); + Assertions.assertEquals(1912841634, response.iterator().next().weeklySchedule().hour()); + Assertions.assertEquals(299790545, response.iterator().next().weeklySchedule().minute()); + Assertions.assertEquals(3808916284603368696L, response.iterator().next().weeklySchedule().usedBytes()); + Assertions.assertEquals(1038921387, response.iterator().next().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("rnpnuhzafccnuh", response.iterator().next().monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1907122793, response.iterator().next().monthlySchedule().hour()); + Assertions.assertEquals(336660638, response.iterator().next().monthlySchedule().minute()); + Assertions.assertEquals(2437579960294431174L, response.iterator().next().monthlySchedule().usedBytes()); + Assertions.assertFalse(response.iterator().next().enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java index 2b3f5532ed5a..5dfbd60dd336 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java @@ -28,8 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.snapshots() - .delete("ykgsangpszng", "fpgylkve", "jujcngoad", "edmzrgjfoknub", "oitpkpztrgdgx", - com.azure.core.util.Context.NONE); + .delete("az", "umtggmuwdchozfn", "fexl", "xn", "akizvoaikna", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java index 92de3bea4c1a..b6f1cc2c5053 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class SnapshotsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"snapshotId\":\"rftb\",\"created\":\"2021-09-19T09:08:43Z\",\"provisioningState\":\"reuquowtljvf\"},\"location\":\"hreagk\",\"id\":\"xv\",\"name\":\"qtvbczsu\",\"type\":\"mdgglmepjpfs\"}"; + = "{\"properties\":{\"snapshotId\":\"td\",\"created\":\"2021-08-06T06:41:02Z\",\"provisioningState\":\"rrhvhfnracwnpq\"},\"location\":\"g\",\"id\":\"ujwouhdawsi\",\"name\":\"rb\",\"type\":\"bxsjybvitvqkj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Snapshot response = manager.snapshots() - .getWithResponse("mgzvyfi", "dkz", "qnwsithuqolyah", "uqwqulsutrjbhxyk", "hyqezvqq", + .getWithResponse("uwfbzkkdtnhqsy", "ljselp", "pbafvafhlbylc", "bevxrhyzd", "wrso", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hreagk", response.location()); + Assertions.assertEquals("g", response.location()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java index e455bd08c57d..960651976389 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java @@ -22,7 +22,7 @@ public final class SnapshotsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"snapshotId\":\"wvskbuhzacaqtylt\",\"created\":\"2021-11-08T08:38:48Z\",\"provisioningState\":\"ujpdsxzak\"},\"location\":\"ejkm\",\"id\":\"iztjof\",\"name\":\"cvovjufyc\",\"type\":\"jmlbemyejiriux\"}]}"; + = "{\"value\":[{\"properties\":{\"snapshotId\":\"aonwivkcqhrxh\",\"created\":\"2021-09-27T05:10:50Z\",\"provisioningState\":\"ccrmmk\"},\"location\":\"upijubyqjfkakfq\",\"id\":\"kemyil\",\"name\":\"udxjascowv\",\"type\":\"djkpdxph\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<Snapshot> response - = manager.snapshots().list("coqra", "wugyx", "qi", "we", com.azure.core.util.Context.NONE); + = manager.snapshots().list("lnuwiguy", "lykwphvxz", "wxh", "pejtl", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ejkm", response.iterator().next().location()); + Assertions.assertEquals("upijubyqjfkakfq", response.iterator().next().location()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java index 14c7c4ad3f8e..dc018cf390cb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java @@ -30,9 +30,9 @@ public void testRestoreFiles() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.snapshots() - .restoreFiles("gthortudaw", "pjfe", "qerpptcbgqnzm", "h", "ilialwcjgc", - new SnapshotRestoreFiles().withFilePaths(Arrays.asList("bcccgzpra", "xnyuffatsgftipwc")) - .withDestinationPath("yubhiqdx"), + .restoreFiles("kk", "nmgzvyfijdkzuqnw", "it", "uqoly", "hluqwquls", + new SnapshotRestoreFiles().withFilePaths(Arrays.asList("rjb", "xykfhyq", "zvqqugdrftbcvexr")) + .withDestinationPath("quowtljvfwhrea"), com.azure.core.util.Context.NONE); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java index 7554e9fd6dfe..0f280b8f2417 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java @@ -12,20 +12,20 @@ public final class SubvolumeInfoInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeInfoInner model = BinaryData.fromString( - "{\"properties\":{\"path\":\"xvgpiude\",\"size\":7118323422467212243,\"parentPath\":\"zec\",\"provisioningState\":\"xw\"},\"id\":\"fykhvuhxepmru\",\"name\":\"znabaobns\",\"type\":\"ujdjltymkmvg\"}") + "{\"properties\":{\"path\":\"dw\",\"size\":6748034020525761831,\"parentPath\":\"eg\",\"provisioningState\":\"nfhjirwgdnqzbr\"},\"id\":\"spzhzmtksjc\",\"name\":\"tdigsxcdglj\",\"type\":\"lkeuac\"}") .toObject(SubvolumeInfoInner.class); - Assertions.assertEquals("xvgpiude", model.path()); - Assertions.assertEquals(7118323422467212243L, model.size()); - Assertions.assertEquals("zec", model.parentPath()); + Assertions.assertEquals("dw", model.path()); + Assertions.assertEquals(6748034020525761831L, model.size()); + Assertions.assertEquals("eg", model.parentPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SubvolumeInfoInner model - = new SubvolumeInfoInner().withPath("xvgpiude").withSize(7118323422467212243L).withParentPath("zec"); + = new SubvolumeInfoInner().withPath("dw").withSize(6748034020525761831L).withParentPath("eg"); model = BinaryData.fromObject(model).toObject(SubvolumeInfoInner.class); - Assertions.assertEquals("xvgpiude", model.path()); - Assertions.assertEquals(7118323422467212243L, model.size()); - Assertions.assertEquals("zec", model.parentPath()); + Assertions.assertEquals("dw", model.path()); + Assertions.assertEquals(6748034020525761831L, model.size()); + Assertions.assertEquals("eg", model.parentPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java index 268fb898e91b..9e747af27a74 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java @@ -13,17 +13,17 @@ public final class SubvolumeModelInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeModelInner model = BinaryData.fromString( - "{\"id\":\"qwcabvnui\",\"name\":\"ey\",\"type\":\"wlpaugmrmfjlrxwt\",\"properties\":{\"path\":\"khfkvcisi\",\"parentPath\":\"oaedsxjwuivedwcg\",\"size\":1315574857206700916,\"bytesUsed\":1846640547424370909,\"permissions\":\"bp\",\"creationTimeStamp\":\"2021-08-02T13:45:24Z\",\"accessedTimeStamp\":\"2021-11-26T04:59:44Z\",\"modifiedTimeStamp\":\"2021-02-13T11:33:46Z\",\"changedTimeStamp\":\"2021-11-14T16:38:14Z\",\"provisioningState\":\"jdlrgmsplzgaufc\"}}") + "{\"id\":\"hpwpgddeimawzovg\",\"name\":\"um\",\"type\":\"kjcjcaztbwsnsqow\",\"properties\":{\"path\":\"omlik\",\"parentPath\":\"wvczcswkacve\",\"size\":3392545158748808427,\"bytesUsed\":8513219755133813830,\"permissions\":\"b\",\"creationTimeStamp\":\"2021-09-23T01:57:15Z\",\"accessedTimeStamp\":\"2021-07-08T00:02:29Z\",\"modifiedTimeStamp\":\"2021-08-22T01:15:59Z\",\"changedTimeStamp\":\"2021-07-12T03:57:31Z\",\"provisioningState\":\"qthe\"}}") .toObject(SubvolumeModelInner.class); - Assertions.assertEquals("khfkvcisi", model.path()); - Assertions.assertEquals("oaedsxjwuivedwcg", model.parentPath()); - Assertions.assertEquals(1315574857206700916L, model.size()); - Assertions.assertEquals(1846640547424370909L, model.bytesUsed()); - Assertions.assertEquals("bp", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-02T13:45:24Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-26T04:59:44Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-13T11:33:46Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-14T16:38:14Z"), model.changedTimestamp()); - Assertions.assertEquals("jdlrgmsplzgaufc", model.provisioningState()); + Assertions.assertEquals("omlik", model.path()); + Assertions.assertEquals("wvczcswkacve", model.parentPath()); + Assertions.assertEquals(3392545158748808427L, model.size()); + Assertions.assertEquals(8513219755133813830L, model.bytesUsed()); + Assertions.assertEquals("b", model.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T01:57:15Z"), model.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-08T00:02:29Z"), model.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-22T01:15:59Z"), model.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-12T03:57:31Z"), model.changedTimestamp()); + Assertions.assertEquals("qthe", model.provisioningState()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java index e61536b5b4c7..982ebf49aaa9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java @@ -13,17 +13,17 @@ public final class SubvolumeModelPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeModelProperties model = BinaryData.fromString( - "{\"path\":\"hvn\",\"parentPath\":\"gnxkympqan\",\"size\":2106740942363678235,\"bytesUsed\":6324383483233283447,\"permissions\":\"bta\",\"creationTimeStamp\":\"2021-01-08T15:47:12Z\",\"accessedTimeStamp\":\"2021-03-10T10:02:03Z\",\"modifiedTimeStamp\":\"2021-08-21T15:38:38Z\",\"changedTimeStamp\":\"2021-01-25T20:15:02Z\",\"provisioningState\":\"cyl\"}") + "{\"path\":\"mnaoy\",\"parentPath\":\"kcoeqswank\",\"size\":8917726159881573369,\"bytesUsed\":8775897009506694047,\"permissions\":\"oznnhdrlktgj\",\"creationTimeStamp\":\"2021-11-15T20:11:36Z\",\"accessedTimeStamp\":\"2021-10-29T05:50:42Z\",\"modifiedTimeStamp\":\"2021-07-28T03:25:09Z\",\"changedTimeStamp\":\"2021-06-30T04:38:56Z\",\"provisioningState\":\"wyw\"}") .toObject(SubvolumeModelProperties.class); - Assertions.assertEquals("hvn", model.path()); - Assertions.assertEquals("gnxkympqan", model.parentPath()); - Assertions.assertEquals(2106740942363678235L, model.size()); - Assertions.assertEquals(6324383483233283447L, model.bytesUsed()); - Assertions.assertEquals("bta", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-08T15:47:12Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-10T10:02:03Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-21T15:38:38Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-25T20:15:02Z"), model.changedTimestamp()); - Assertions.assertEquals("cyl", model.provisioningState()); + Assertions.assertEquals("mnaoy", model.path()); + Assertions.assertEquals("kcoeqswank", model.parentPath()); + Assertions.assertEquals(8917726159881573369L, model.size()); + Assertions.assertEquals(8775897009506694047L, model.bytesUsed()); + Assertions.assertEquals("oznnhdrlktgj", model.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-15T20:11:36Z"), model.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-29T05:50:42Z"), model.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-28T03:25:09Z"), model.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-30T04:38:56Z"), model.changedTimestamp()); + Assertions.assertEquals("wyw", model.provisioningState()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java index b8cf4ca730dc..4e72bad33d1b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java @@ -11,17 +11,18 @@ public final class SubvolumePatchParamsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SubvolumePatchParams model = BinaryData.fromString("{\"size\":7464315318202646424,\"path\":\"xuugqkc\"}") + SubvolumePatchParams model = BinaryData.fromString("{\"size\":1764750126112918392,\"path\":\"yrrleaesinuqt\"}") .toObject(SubvolumePatchParams.class); - Assertions.assertEquals(7464315318202646424L, model.size()); - Assertions.assertEquals("xuugqkc", model.path()); + Assertions.assertEquals(1764750126112918392L, model.size()); + Assertions.assertEquals("yrrleaesinuqt", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumePatchParams model = new SubvolumePatchParams().withSize(7464315318202646424L).withPath("xuugqkc"); + SubvolumePatchParams model + = new SubvolumePatchParams().withSize(1764750126112918392L).withPath("yrrleaesinuqt"); model = BinaryData.fromObject(model).toObject(SubvolumePatchParams.class); - Assertions.assertEquals(7464315318202646424L, model.size()); - Assertions.assertEquals("xuugqkc", model.path()); + Assertions.assertEquals(1764750126112918392L, model.size()); + Assertions.assertEquals("yrrleaesinuqt", model.path()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java index c6f43fd90188..85fd3daf7903 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java @@ -12,18 +12,18 @@ public final class SubvolumePatchRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumePatchRequest model - = BinaryData.fromString("{\"properties\":{\"size\":5842475212910239296,\"path\":\"riswslmiiio\"}}") + = BinaryData.fromString("{\"properties\":{\"size\":7770719688230411189,\"path\":\"wskondcbrwimuvqe\"}}") .toObject(SubvolumePatchRequest.class); - Assertions.assertEquals(5842475212910239296L, model.size()); - Assertions.assertEquals("riswslmiiio", model.path()); + Assertions.assertEquals(7770719688230411189L, model.size()); + Assertions.assertEquals("wskondcbrwimuvqe", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SubvolumePatchRequest model - = new SubvolumePatchRequest().withSize(5842475212910239296L).withPath("riswslmiiio"); + = new SubvolumePatchRequest().withSize(7770719688230411189L).withPath("wskondcbrwimuvqe"); model = BinaryData.fromObject(model).toObject(SubvolumePatchRequest.class); - Assertions.assertEquals(5842475212910239296L, model.size()); - Assertions.assertEquals("riswslmiiio", model.path()); + Assertions.assertEquals(7770719688230411189L, model.size()); + Assertions.assertEquals("wskondcbrwimuvqe", model.path()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java index d728c8fd6ec5..be59075e7f51 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java @@ -12,21 +12,21 @@ public final class SubvolumePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeProperties model = BinaryData.fromString( - "{\"path\":\"hywartspph\",\"size\":1820358533637729770,\"parentPath\":\"kxdssjpemmucfxh\",\"provisioningState\":\"kflrmymy\"}") + "{\"path\":\"omflrytswfp\",\"size\":7106258411472210858,\"parentPath\":\"cxnmskwhqjjyslu\",\"provisioningState\":\"pshhkvpedwqslsr\"}") .toObject(SubvolumeProperties.class); - Assertions.assertEquals("hywartspph", model.path()); - Assertions.assertEquals(1820358533637729770L, model.size()); - Assertions.assertEquals("kxdssjpemmucfxh", model.parentPath()); + Assertions.assertEquals("omflrytswfp", model.path()); + Assertions.assertEquals(7106258411472210858L, model.size()); + Assertions.assertEquals("cxnmskwhqjjyslu", model.parentPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumeProperties model = new SubvolumeProperties().withPath("hywartspph") - .withSize(1820358533637729770L) - .withParentPath("kxdssjpemmucfxh"); + SubvolumeProperties model = new SubvolumeProperties().withPath("omflrytswfp") + .withSize(7106258411472210858L) + .withParentPath("cxnmskwhqjjyslu"); model = BinaryData.fromObject(model).toObject(SubvolumeProperties.class); - Assertions.assertEquals("hywartspph", model.path()); - Assertions.assertEquals(1820358533637729770L, model.size()); - Assertions.assertEquals("kxdssjpemmucfxh", model.parentPath()); + Assertions.assertEquals("omflrytswfp", model.path()); + Assertions.assertEquals(7106258411472210858L, model.size()); + Assertions.assertEquals("cxnmskwhqjjyslu", model.parentPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java index a8c134f29fb7..84a41c655847 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java @@ -21,7 +21,7 @@ public final class SubvolumesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"path\":\"azz\",\"size\":612372614461236984,\"parentPath\":\"ydjufbnklbl\",\"provisioningState\":\"Succeeded\"},\"id\":\"dabalfdxaglzfytl\",\"name\":\"tlqh\",\"type\":\"pxouvmr\"}"; + = "{\"properties\":{\"path\":\"xhaclcdosqkptjq\",\"size\":582854429322658985,\"parentPath\":\"mainwhed\",\"provisioningState\":\"Succeeded\"},\"id\":\"azz\",\"name\":\"lw\",\"type\":\"vydjufbnk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,15 +31,15 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubvolumeInfo response = manager.subvolumes() - .define("sy") - .withExistingVolume("gcwx", "ec", "bwjtrdx", "izagbbgiar") - .withPath("dqxwabzrwiqrxhac") - .withSize(2095551908307218647L) - .withParentPath("qkp") + .define("dfb") + .withExistingVolume("sqtnqsktxqfpjbq", "gweeiwd", "dmncgbf", "uscstunmlh") + .withPath("iichgjsysmvxodgw") + .withSize(659198567974528945L) + .withParentPath("ifc") .create(); - Assertions.assertEquals("azz", response.path()); - Assertions.assertEquals(612372614461236984L, response.size()); - Assertions.assertEquals("ydjufbnklbl", response.parentPath()); + Assertions.assertEquals("xhaclcdosqkptjq", response.path()); + Assertions.assertEquals(582854429322658985L, response.size()); + Assertions.assertEquals("mainwhed", response.parentPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java index ca86feab92df..45e193d22c2d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java @@ -27,7 +27,8 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.subvolumes().delete("qwm", "q", "moxsa", "uxejgwecywnfyszz", "czs", com.azure.core.util.Context.NONE); + manager.subvolumes() + .delete("myqjog", "dsaidjanormovdxx", "rntu", "moil", "nwemhdeeljslkyo", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java index be25808a2afb..cb7c3f0ac77f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java @@ -21,7 +21,7 @@ public final class SubvolumesGetMetadataMockTests { @Test public void testGetMetadata() throws Exception { String responseStr - = "{\"id\":\"p\",\"name\":\"qggweeiwdh\",\"type\":\"n\",\"properties\":{\"path\":\"fzuscstun\",\"parentPath\":\"hxdfbkl\",\"size\":2959052302255831085,\"bytesUsed\":8359403093552012112,\"permissions\":\"ysmvxodgwxf\",\"creationTimeStamp\":\"2021-01-18T02:37:15Z\",\"accessedTimeStamp\":\"2021-05-31T12:02:06Z\",\"modifiedTimeStamp\":\"2021-07-21T22:05Z\",\"changedTimeStamp\":\"2021-01-26T12:06:53Z\",\"provisioningState\":\"Succeeded\"}}"; + = "{\"id\":\"rfgxkyd\",\"name\":\"yp\",\"type\":\"qvmtywhlakx\",\"properties\":{\"path\":\"pewpyj\",\"parentPath\":\"xampqcr\",\"size\":4390890768569409164,\"bytesUsed\":6349530997487415939,\"permissions\":\"iatwfaujegqdtadr\",\"creationTimeStamp\":\"2021-10-11T00:31:24Z\",\"accessedTimeStamp\":\"2021-10-15T09:11:57Z\",\"modifiedTimeStamp\":\"2021-11-26T23:11:17Z\",\"changedTimeStamp\":\"2021-10-12T17:44:39Z\",\"provisioningState\":\"Succeeded\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,17 +31,17 @@ public void testGetMetadata() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubvolumeModel response = manager.subvolumes() - .getMetadata("b", "iatwfaujegqdtadr", "kgd", "hjkrukizyhgs", "tnqsktx", com.azure.core.util.Context.NONE); + .getMetadata("ozsyvrm", "jmyitrchwudl", "eeih", "pmnoejhqlf", "sibz", com.azure.core.util.Context.NONE); - Assertions.assertEquals("fzuscstun", response.path()); - Assertions.assertEquals("hxdfbkl", response.parentPath()); - Assertions.assertEquals(2959052302255831085L, response.size()); - Assertions.assertEquals(8359403093552012112L, response.bytesUsed()); - Assertions.assertEquals("ysmvxodgwxf", response.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T02:37:15Z"), response.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-31T12:02:06Z"), response.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T22:05Z"), response.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-26T12:06:53Z"), response.changedTimestamp()); + Assertions.assertEquals("pewpyj", response.path()); + Assertions.assertEquals("xampqcr", response.parentPath()); + Assertions.assertEquals(4390890768569409164L, response.size()); + Assertions.assertEquals(6349530997487415939L, response.bytesUsed()); + Assertions.assertEquals("iatwfaujegqdtadr", response.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-11T00:31:24Z"), response.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-15T09:11:57Z"), response.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-26T23:11:17Z"), response.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-12T17:44:39Z"), response.changedTimestamp()); Assertions.assertEquals("Succeeded", response.provisioningState()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java index 19ee3cf10a4e..06f3130af0cf 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class SubvolumesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"path\":\"jue\",\"size\":1238922014101083662,\"parentPath\":\"tsl\",\"provisioningState\":\"tv\"},\"id\":\"nxvgjb\",\"name\":\"iobpnjodf\",\"type\":\"bj\"}"; + = "{\"properties\":{\"path\":\"tjtdrhutfd\",\"size\":8538875012541259199,\"parentPath\":\"op\",\"provisioningState\":\"hpadkmdzg\"},\"id\":\"zxvctkbbxuharls\",\"name\":\"rncclabv\",\"type\":\"yngsuxxcz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,11 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubvolumeInfo response = manager.subvolumes() - .getWithResponse("dsaidjanormovdxx", "rntu", "moil", "nwemhdeeljslkyo", "d", - com.azure.core.util.Context.NONE) + .getWithResponse("vprstv", "itbfjtdy", "tnp", "facqo", "cqrq", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("jue", response.path()); - Assertions.assertEquals(1238922014101083662L, response.size()); - Assertions.assertEquals("tsl", response.parentPath()); + Assertions.assertEquals("tjtdrhutfd", response.path()); + Assertions.assertEquals(8538875012541259199L, response.size()); + Assertions.assertEquals("op", response.parentPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java index 21d561f36a13..68c294ffddc5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java @@ -22,7 +22,7 @@ public final class SubvolumesListByVolumeMockTests { @Test public void testListByVolume() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"path\":\"pmnoejhqlf\",\"size\":2361912450250234564,\"parentPath\":\"oyrfgxk\",\"provisioningState\":\"pmypgfq\"},\"id\":\"tyw\",\"name\":\"lakxpejpewp\",\"type\":\"jlfxampqcrzgeuq\"}]}"; + = "{\"value\":[{\"properties\":{\"path\":\"gj\",\"size\":796368710467321281,\"parentPath\":\"pn\",\"provisioningState\":\"dfcbjqqwmtqs\"},\"id\":\"xsazuxejgw\",\"name\":\"cywnfyszza\",\"type\":\"zsinqbdnddb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testListByVolume() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<SubvolumeInfo> response = manager.subvolumes() - .listByVolume("nqbdnddbboz", "yvrmkjm", "it", "chwudlxee", com.azure.core.util.Context.NONE); + PagedIterable<SubvolumeInfo> response + = manager.subvolumes().listByVolume("d", "fzjuegrhrhtsl", "jtv", "j", com.azure.core.util.Context.NONE); - Assertions.assertEquals("pmnoejhqlf", response.iterator().next().path()); - Assertions.assertEquals(2361912450250234564L, response.iterator().next().size()); - Assertions.assertEquals("oyrfgxk", response.iterator().next().parentPath()); + Assertions.assertEquals("gj", response.iterator().next().path()); + Assertions.assertEquals(796368710467321281L, response.iterator().next().size()); + Assertions.assertEquals("pn", response.iterator().next().parentPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java index 49d4896a668c..56813a5e0464 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java @@ -12,11 +12,11 @@ public final class SubvolumesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"path\":\"owlxte\",\"size\":8012734549357722139,\"parentPath\":\"gwdtgukran\",\"provisioningState\":\"wphqlkccuzgygqw\"},\"id\":\"oiulwgniipr\",\"name\":\"lvawuwzdufypivls\",\"type\":\"bjpmcubk\"},{\"properties\":{\"path\":\"oxxkubvp\",\"size\":868428421844201391,\"parentPath\":\"h\",\"provisioningState\":\"bqgvgovpbbtte\"},\"id\":\"oknssqyzqedikdf\",\"name\":\"db\",\"type\":\"qmrjg\"},{\"properties\":{\"path\":\"fqlggw\",\"size\":7547159227117863936,\"parentPath\":\"xmjpbyep\",\"provisioningState\":\"gt\"},\"id\":\"j\",\"name\":\"rc\",\"type\":\"yfqi\"}],\"nextLink\":\"xhnpo\"}") + "{\"value\":[{\"properties\":{\"path\":\"bbpihehcecy\",\"size\":7250788889653826955,\"parentPath\":\"rjb\",\"provisioningState\":\"pxdlv\"},\"id\":\"frexcrseqw\",\"name\":\"ksghudgzhxogjgg\",\"type\":\"voujkxibdafhrk\"}],\"nextLink\":\"yomkxfbvfbhdy\"}") .toObject(SubvolumesList.class); - Assertions.assertEquals("owlxte", model.value().get(0).path()); - Assertions.assertEquals(8012734549357722139L, model.value().get(0).size()); - Assertions.assertEquals("gwdtgukran", model.value().get(0).parentPath()); - Assertions.assertEquals("xhnpo", model.nextLink()); + Assertions.assertEquals("bbpihehcecy", model.value().get(0).path()); + Assertions.assertEquals(7250788889653826955L, model.value().get(0).size()); + Assertions.assertEquals("rjb", model.value().get(0).parentPath()); + Assertions.assertEquals("yomkxfbvfbhdy", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java index fb238ecda0d9..7a47e81ecd42 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java @@ -13,25 +13,25 @@ public final class UpdateNetworkSiblingSetRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateNetworkSiblingSetRequest model = BinaryData.fromString( - "{\"networkSiblingSetId\":\"jelaqacigele\",\"subnetId\":\"hdbvqvwzkjop\",\"networkSiblingSetStateId\":\"beonrlkwzdq\",\"networkFeatures\":\"Standard\"}") + "{\"networkSiblingSetId\":\"yqwcabvnuil\",\"subnetId\":\"ey\",\"networkSiblingSetStateId\":\"swlpaugmrmfj\",\"networkFeatures\":\"Standard_Basic\"}") .toObject(UpdateNetworkSiblingSetRequest.class); - Assertions.assertEquals("jelaqacigele", model.networkSiblingSetId()); - Assertions.assertEquals("hdbvqvwzkjop", model.subnetId()); - Assertions.assertEquals("beonrlkwzdq", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.STANDARD, model.networkFeatures()); + Assertions.assertEquals("yqwcabvnuil", model.networkSiblingSetId()); + Assertions.assertEquals("ey", model.subnetId()); + Assertions.assertEquals("swlpaugmrmfj", model.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, model.networkFeatures()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { UpdateNetworkSiblingSetRequest model - = new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("jelaqacigele") - .withSubnetId("hdbvqvwzkjop") - .withNetworkSiblingSetStateId("beonrlkwzdq") - .withNetworkFeatures(NetworkFeatures.STANDARD); + = new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("yqwcabvnuil") + .withSubnetId("ey") + .withNetworkSiblingSetStateId("swlpaugmrmfj") + .withNetworkFeatures(NetworkFeatures.STANDARD_BASIC); model = BinaryData.fromObject(model).toObject(UpdateNetworkSiblingSetRequest.class); - Assertions.assertEquals("jelaqacigele", model.networkSiblingSetId()); - Assertions.assertEquals("hdbvqvwzkjop", model.subnetId()); - Assertions.assertEquals("beonrlkwzdq", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.STANDARD, model.networkFeatures()); + Assertions.assertEquals("yqwcabvnuil", model.networkSiblingSetId()); + Assertions.assertEquals("ey", model.subnetId()); + Assertions.assertEquals("swlpaugmrmfj", model.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, model.networkFeatures()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageNameTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageNameTests.java index 9708a6f18a28..3038b86d5cdb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageNameTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageNameTests.java @@ -11,9 +11,9 @@ public final class UsageNameTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UsageName model = BinaryData.fromString("{\"value\":\"cawetzqddt\",\"localizedValue\":\"fljhznamtua\"}") + UsageName model = BinaryData.fromString("{\"value\":\"zxqltgrdogypx\",\"localizedValue\":\"vbfihwuhvctafsr\"}") .toObject(UsageName.class); - Assertions.assertEquals("cawetzqddt", model.value()); - Assertions.assertEquals("fljhznamtua", model.localizedValue()); + Assertions.assertEquals("zxqltgrdogypx", model.value()); + Assertions.assertEquals("vbfihwuhvctafsr", model.localizedValue()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagePropertiesTests.java index b471fe40deb3..bd5473f52c06 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagePropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagePropertiesTests.java @@ -11,7 +11,7 @@ public final class UsagePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UsageProperties model - = BinaryData.fromString("{\"currentValue\":510933333,\"limit\":1222277856,\"unit\":\"jncqtjzmi\"}") + = BinaryData.fromString("{\"currentValue\":1470565403,\"limit\":1897800975,\"unit\":\"li\"}") .toObject(UsageProperties.class); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageResultInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageResultInnerTests.java index 2e185a89c038..6ea8b7518fa4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageResultInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageResultInnerTests.java @@ -11,7 +11,7 @@ public final class UsageResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UsageResultInner model = BinaryData.fromString( - "{\"id\":\"nzxojpslsvjgpli\",\"name\":{\"value\":\"qwoyxqvapco\",\"localizedValue\":\"oucqpqojx\"},\"properties\":{\"currentValue\":2079376859,\"limit\":1211058395,\"unit\":\"gdzbenr\"}}") + "{\"id\":\"lgtrczzy\",\"name\":{\"value\":\"zjijpvuaurkihcir\",\"localizedValue\":\"efxrdcoxnbk\"},\"properties\":{\"currentValue\":1350087649,\"limit\":1329333033,\"unit\":\"nqbnqb\"}}") .toObject(UsageResultInner.class); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagesListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagesListResultTests.java index fcfcc88e5740..0c7fe38e3adc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagesListResultTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagesListResultTests.java @@ -12,8 +12,8 @@ public final class UsagesListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UsagesListResult model = BinaryData.fromString( - "{\"value\":[{\"id\":\"eakxcptsoqfyi\",\"name\":{\"value\":\"qc\",\"localizedValue\":\"rttzrazisgykiu\"},\"properties\":{\"currentValue\":1740485415,\"limit\":920951306,\"unit\":\"zohmnrxxbs\"}}],\"nextLink\":\"klinhmdptysprq\"}") + "{\"value\":[{\"id\":\"toaukhfkvcisiz\",\"name\":{\"value\":\"eds\",\"localizedValue\":\"wuived\"},\"properties\":{\"currentValue\":877522372,\"limit\":306306141,\"unit\":\"xeiqbpsmg\"}},{\"id\":\"guamlj\",\"name\":{\"value\":\"gmsplzgaufcshhv\",\"localizedValue\":\"wgnxkympqanxrj\"},\"properties\":{\"currentValue\":494382455,\"limit\":781825712,\"unit\":\"aoypny\"}},{\"id\":\"shxcylhkg\",\"name\":{\"value\":\"ghpxycphdr\",\"localizedValue\":\"jkhvyomacluzvxnq\"},\"properties\":{\"currentValue\":1304447311,\"limit\":444210553,\"unit\":\"fwmkoisqcssffxui\"}}],\"nextLink\":\"csypobkdqzrdzsyl\"}") .toObject(UsagesListResult.class); - Assertions.assertEquals("klinhmdptysprq", model.nextLink()); + Assertions.assertEquals("csypobkdqzrdzsyl", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java index 9f8fee886f7e..5ca836ac02cd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java @@ -11,7 +11,7 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"d1190002-a806-459d-9cfd-bd99a8e32b9d\",\"clientId\":\"27e171c3-68d5-4c6b-955b-3260363fbd45\"}") + "{\"principalId\":\"19fe9cd8-bfc1-4427-a771-bef692a040bc\",\"clientId\":\"c5970202-a578-4d5d-ab6e-9e6b25f308d2\"}") .toObject(UserAssignedIdentity.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java index 37c44d915f6f..af165f7f8fcb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.volumeGroups().delete("ewdogiyetesy", "vidbztjhqtfb", "vnynkb", com.azure.core.util.Context.NONE); + manager.volumeGroups().delete("ziven", "rpmey", "vpkpatlb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java index 19c956035325..6f27f2fd3cd4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java @@ -24,7 +24,7 @@ public final class VolumeQuotaRulesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":8594198007990007248,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"nrzorpd\"},\"location\":\"bqc\",\"tags\":{\"xsaetg\":\"fg\",\"aqqilzdcduwjoed\":\"dgvpyig\",\"ilfjqqacdmk\":\"ngucaifpaurww\"},\"id\":\"wxdcvjwcyz\",\"name\":\"akeciqchx\",\"type\":\"tuicds\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":5182119444318213276,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"zevxoqein\"},\"location\":\"waljglzoblqwaaf\",\"tags\":{\"yqbhd\":\"lhm\",\"xwmzwdfkbnrz\":\"afjrqpjiyrqjcrg\"},\"id\":\"rpdltbq\",\"name\":\"tqjfgxxsaet\",\"type\":\"zdgvpyigdaqqilz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,20 +34,21 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VolumeQuotaRule response = manager.volumeQuotaRules() - .define("chygtvxbyjane") - .withRegion("od") - .withExistingVolume("rhcekxgnly", "mxcpwzvmdoks", "dt", "wlwxlboncqbazqic") - .withTags(mapOf("aifmcwnosbzlehgc", "ohkxdxuw", "knjolgjyyxpve", "kb", "txwaljglzo", "szerqzevxoqei")) - .withQuotaSizeInKiBs(6162098462394021932L) + .define("ji") + .withRegion("hcekxgnlykm") + .withExistingVolume("rclsso", "jomevtfycnlb", "gjco", "kk") + .withTags(mapOf("iw", "wzvmdoksqd", "hygtv", "wxlboncqbazqicq", "bdpkxyqvgx", "byjanep", "hkxdxuwsaifmc", + "aodetv")) + .withQuotaSizeInKiBs(7098796391697197693L) .withQuotaType(Type.DEFAULT_USER_QUOTA) - .withQuotaTarget("gx") + .withQuotaTarget("cufqbvntnrgmqs") .create(); - Assertions.assertEquals("bqc", response.location()); - Assertions.assertEquals("fg", response.tags().get("xsaetg")); - Assertions.assertEquals(8594198007990007248L, response.quotaSizeInKiBs()); - Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, response.quotaType()); - Assertions.assertEquals("nrzorpd", response.quotaTarget()); + Assertions.assertEquals("waljglzoblqwaaf", response.location()); + Assertions.assertEquals("lhm", response.tags().get("yqbhd")); + Assertions.assertEquals(5182119444318213276L, response.quotaSizeInKiBs()); + Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, response.quotaType()); + Assertions.assertEquals("zevxoqein", response.quotaTarget()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java index c042dcdd9b02..640148aa2439 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java @@ -28,7 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumeQuotaRules() - .delete("z", "vxhmtfhocnxzcmj", "ngxno", "rxtd", "sn", com.azure.core.util.Context.NONE); + .delete("quwusq", "utrpbr", "uyu", "atvlmbjwcolbm", "lbnwtpcpahp", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java index 89ac506b15ee..0fbd0383b9ea 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class VolumeQuotaRulesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Updating\",\"quotaSizeInKiBs\":5819505142190116276,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"fmhklbnld\"},\"location\":\"cbhhez\",\"tags\":{\"trpb\":\"wusqx\"},\"id\":\"r\",\"name\":\"yuuatvlmbjwcolbm\",\"type\":\"lbnwtpcpahp\"}"; + = "{\"properties\":{\"provisioningState\":\"Creating\",\"quotaSizeInKiBs\":1045274576601110352,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"ppc\"},\"location\":\"kuztdsbezaxyfu\",\"tags\":{\"hnepkpeti\":\"uizh\",\"iubxdukec\":\"rx\",\"hctmmkosz\":\"xdazv\",\"aqkiofkb\":\"dblnsntrp\"},\"id\":\"fmhklbnld\",\"name\":\"vcb\",\"type\":\"hez\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VolumeQuotaRule response = manager.volumeQuotaRules() - .getWithResponse("nepk", "etiarxqiubxdukec", "xdazv", "hctmmkosz", "dblnsntrp", + .getWithResponse("grmtqjk", "evadrmmwiu", "wvcmj", "kxiidisczskoswo", "iqazugamxzkr", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("cbhhez", response.location()); - Assertions.assertEquals("wusqx", response.tags().get("trpb")); - Assertions.assertEquals(5819505142190116276L, response.quotaSizeInKiBs()); - Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, response.quotaType()); - Assertions.assertEquals("fmhklbnld", response.quotaTarget()); + Assertions.assertEquals("kuztdsbezaxyfu", response.location()); + Assertions.assertEquals("uizh", response.tags().get("hnepkpeti")); + Assertions.assertEquals(1045274576601110352L, response.quotaSizeInKiBs()); + Assertions.assertEquals(Type.INDIVIDUAL_USER_QUOTA, response.quotaType()); + Assertions.assertEquals("ppc", response.quotaTarget()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java index 3f5b75b10d5e..960ccdcc43fe 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java @@ -23,7 +23,7 @@ public final class VolumeQuotaRulesListByVolumeMockTests { @Test public void testListByVolume() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"quotaSizeInKiBs\":7254215540772664714,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"njzrbhtmeplvu\"},\"location\":\"obrl\",\"tags\":{\"muowakywalhjy\":\"snbagnchjhg\",\"jomevtfycnlb\":\"xcgqtagdrclsso\",\"kk\":\"gjco\"},\"id\":\"ji\",\"name\":\"ytssikiz\",\"type\":\"cufqbvntnrgmqs\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Moving\",\"quotaSizeInKiBs\":3645768848659109810,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"ydidwhepfwwtjf\"},\"location\":\"esxxhmwcdbckyoi\",\"tags\":{\"gknjzr\":\"xhn\",\"me\":\"h\",\"gsnbagnchjh\":\"lvukaobrlb\"},\"id\":\"emuowakyw\",\"name\":\"lhjym\",\"type\":\"cgqtag\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,12 +33,12 @@ public void testListByVolume() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<VolumeQuotaRule> response = manager.volumeQuotaRules() - .listByVolume("evhdlmydid", "hepfwwtjfdoes", "xhmw", "dbckyo", com.azure.core.util.Context.NONE); + .listByVolume("z", "vxhmtfhocnxzcmj", "ngxno", "rxtd", com.azure.core.util.Context.NONE); - Assertions.assertEquals("obrl", response.iterator().next().location()); - Assertions.assertEquals("snbagnchjhg", response.iterator().next().tags().get("muowakywalhjy")); - Assertions.assertEquals(7254215540772664714L, response.iterator().next().quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, response.iterator().next().quotaType()); - Assertions.assertEquals("njzrbhtmeplvu", response.iterator().next().quotaTarget()); + Assertions.assertEquals("esxxhmwcdbckyoi", response.iterator().next().location()); + Assertions.assertEquals("xhn", response.iterator().next().tags().get("gknjzr")); + Assertions.assertEquals(3645768848659109810L, response.iterator().next().quotaSizeInKiBs()); + Assertions.assertEquals(Type.INDIVIDUAL_USER_QUOTA, response.iterator().next().quotaType()); + Assertions.assertEquals("ydidwhepfwwtjf", response.iterator().next().quotaTarget()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationMockTests.java index e8840844c547..03dc7b560591 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationMockTests.java @@ -20,7 +20,7 @@ public final class VolumesAuthorizeExternalReplicationMockTests { @Test public void testAuthorizeExternalReplication() throws Exception { - String responseStr = "{\"svmPeeringCommand\":\"vkjzwfbcyaykm\"}"; + String responseStr = "{\"svmPeeringCommand\":\"vusxiv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,9 +30,8 @@ public void testAuthorizeExternalReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SvmPeerCommandResponse response = manager.volumes() - .authorizeExternalReplication("nsxfwu", "hcdpkupnqrmgj", "bpkuwxeoio", "fiz", - com.azure.core.util.Context.NONE); + .authorizeExternalReplication("ctekval", "l", "tjqvqyvweht", "emxhzzy", com.azure.core.util.Context.NONE); - Assertions.assertEquals("vkjzwfbcyaykm", response.svmPeeringCommand()); + Assertions.assertEquals("vusxiv", response.svmPeeringCommand()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java index 398364aa4672..8071d2f1fc85 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java @@ -29,9 +29,8 @@ public void testAuthorizeReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .authorizeReplication("syeipqd", "mjtgrqg", "gkkileplkcsmkn", "wtbbaedorvvmqf", - new AuthorizeRequest().withRemoteVolumeResourceId("ygbdgwumgxdgdhpa"), - com.azure.core.util.Context.NONE); + .authorizeReplication("dljdjuskb", "req", "n", "ceysfaqeg", + new AuthorizeRequest().withRemoteVolumeResourceId("wryshwd"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java index b601d648b171..dec50b9411df 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java @@ -29,8 +29,8 @@ public void testBreakFileLocks() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .breakFileLocks("ujyxkyxlzgsj", "kzzltafhbzf", "ovwmbjlzqsczpgvd", "napfdqwowftpt", - new BreakFileLocksRequest().withClientIp("wjtkschgcgqyhl").withConfirmRunningDisruptiveOperation(false), + .breakFileLocks("talvnbwgp", "emeluclv", "jjukyrdnqodxah", "xhqf", + new BreakFileLocksRequest().withClientIp("nvzoqgyipemch").withConfirmRunningDisruptiveOperation(false), com.azure.core.util.Context.NONE); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java index 6193bfb57acb..dd03740f6706 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java @@ -29,8 +29,8 @@ public void testBreakReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .breakReplication("zcbyfq", "kfaoytehq", "uvjmv", "mtdwcky", - new BreakReplicationRequest().withForceBreakReplication(true), com.azure.core.util.Context.NONE); + .breakReplication("lehu", "qlrqffaweyurk", "hy", "dxravj", + new BreakReplicationRequest().withForceBreakReplication(false), com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java index 34bc3580f355..60018d6d4e42 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java @@ -27,9 +27,7 @@ public void testDeleteReplication() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.volumes() - .deleteReplication("mxhzzysevus", "ivzrrryveimipsk", "yzatvfuzkaft", "vvruxwi", - com.azure.core.util.Context.NONE); + manager.volumes().deleteReplication("oytehqpuvjm", "qm", "dwckygroe", "n", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java index 3b76e042a4a9..3bdd1ec706c7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java @@ -28,7 +28,7 @@ public void testFinalizeRelocation() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .finalizeRelocation("no", "pziuwfbzkkdtnh", "sycljsel", "kpbafvafhl", com.azure.core.util.Context.NONE); + .finalizeRelocation("sxap", "efh", "xcgjokjljnhvlq", "bekpeeksnbksdqhj", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java index 63d35b9531ca..8a339486149e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java @@ -21,7 +21,7 @@ public final class VolumesListGetGroupIdListForLdapUserMockTests { @Test public void testListGetGroupIdListForLdapUser() throws Exception { - String responseStr = "{\"groupIdsForLdapUser\":[\"fkndl\",\"vtwknvgmmbugt\",\"watmqa\",\"kueatgroeshoy\"]}"; + String responseStr = "{\"groupIdsForLdapUser\":[\"odrrslblxyd\",\"xrx\",\"vbxiwkgfbqlj\",\"qkhychocok\"]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testListGetGroupIdListForLdapUser() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); GetGroupIdListForLdapUserResponse response = manager.volumes() - .listGetGroupIdListForLdapUser("yqrhvyeld", "tj", "dkwisw", "kukjtasb", - new GetGroupIdListForLdapUserRequest().withUsername("wispkxk"), com.azure.core.util.Context.NONE); + .listGetGroupIdListForLdapUser("sczuejdtxptlghwz", "omew", "j", "tl", + new GetGroupIdListForLdapUserRequest().withUsername("uhqawmoaianc"), com.azure.core.util.Context.NONE); - Assertions.assertEquals("fkndl", response.groupIdsForLdapUser().get(0)); + Assertions.assertEquals("odrrslblxyd", response.groupIdsForLdapUser().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportMockTests.java index 1aff1c358161..fb06a4e8d146 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportMockTests.java @@ -22,7 +22,7 @@ public final class VolumesListQuotaReportMockTests { @Test public void testListQuotaReport() throws Exception { String responseStr - = "{\"value\":[{\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"wdchozfn\",\"quotaLimitUsedInKiBs\":3168660078499570789,\"quotaLimitTotalInKiBs\":700271083328715030,\"percentageUsed\":53.10744,\"isDerivedQuota\":false},{\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"oaiknaqlnuwig\",\"quotaLimitUsedInKiBs\":2329438320518189311,\"quotaLimitTotalInKiBs\":4465981831282505024,\"percentageUsed\":61.86658,\"isDerivedQuota\":true},{\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"xhmpejtlkex\",\"quotaLimitUsedInKiBs\":3352897062376386518,\"quotaLimitTotalInKiBs\":6028048177476509003,\"percentageUsed\":16.300827,\"isDerivedQuota\":false}]}"; + = "{\"value\":[{\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"pn\",\"quotaLimitUsedInKiBs\":6778968687143087952,\"quotaLimitTotalInKiBs\":6043835963839531254,\"percentageUsed\":95.03275,\"isDerivedQuota\":true},{\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"iojfizfavkjzwfbc\",\"quotaLimitUsedInKiBs\":771809816865473045,\"quotaLimitTotalInKiBs\":6742885989723726573,\"percentageUsed\":33.00543,\"isDerivedQuota\":true},{\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"zxmdew\",\"quotaLimitUsedInKiBs\":5897750454813877665,\"quotaLimitTotalInKiBs\":5107103454123535123,\"percentageUsed\":63.061417,\"isDerivedQuota\":false}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testListQuotaReport() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ListQuotaReportResponse response = manager.volumes() - .listQuotaReport("pqigtuujwouhd", "wsigrbjbxsj", "bvitvqkjya", "nu", com.azure.core.util.Context.NONE); + .listQuotaReport("ejjjkxybwfdb", "jbzten", "vkzykjtjknsxf", "us", com.azure.core.util.Context.NONE); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, response.value().get(0).quotaType()); - Assertions.assertEquals("wdchozfn", response.value().get(0).quotaTarget()); - Assertions.assertEquals(3168660078499570789L, response.value().get(0).quotaLimitUsedInKiBs()); - Assertions.assertEquals(700271083328715030L, response.value().get(0).quotaLimitTotalInKiBs()); - Assertions.assertEquals(53.10744F, response.value().get(0).percentageUsed()); - Assertions.assertFalse(response.value().get(0).isDerivedQuota()); + Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, response.value().get(0).quotaType()); + Assertions.assertEquals("pn", response.value().get(0).quotaTarget()); + Assertions.assertEquals(6778968687143087952L, response.value().get(0).quotaLimitUsedInKiBs()); + Assertions.assertEquals(6043835963839531254L, response.value().get(0).quotaLimitTotalInKiBs()); + Assertions.assertEquals(95.03275F, response.value().get(0).percentageUsed()); + Assertions.assertTrue(response.value().get(0).isDerivedQuota()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java index bf33fe665bc1..6bcb018c22ac 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java @@ -26,7 +26,7 @@ public final class VolumesListReplicationsMockTests { @Test public void testListReplications() throws Exception { String responseStr - = "{\"value\":[{\"replicationId\":\"kdnwqapfgsdpcve\",\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"h\",\"remoteVolumeRegion\":\"uipldqq\",\"mirrorState\":\"Mirrored\",\"replicationCreationTime\":\"2021-03-03T11:50:40Z\",\"replicationDeletionTime\":\"2021-11-28T20:48:06Z\"}]}"; + = "{\"value\":[{\"replicationId\":\"leseyqrhvyeldo\",\"endpointType\":\"src\",\"replicationSchedule\":\"hourly\",\"remoteVolumeResourceId\":\"wiswskukjtasbvw\",\"remoteVolumeRegion\":\"pkxkdtxfk\",\"mirrorState\":\"Uninitialized\",\"replicationCreationTime\":\"2021-10-14T18:08:14Z\",\"replicationDeletionTime\":\"2021-08-28T00:30:53Z\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,12 +36,12 @@ public void testListReplications() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<Replication> response = manager.volumes() - .listReplications("sybwptdaca", "vvlfntymtp", "iwenazero", "zrsq", - new ListReplicationsRequest().withExclude(Exclude.DELETED), com.azure.core.util.Context.NONE); + .listReplications("zffovwmbjl", "qsczpgvdwnapfdqw", "wf", "ptnuwjtkschgc", + new ListReplicationsRequest().withExclude(Exclude.NONE), com.azure.core.util.Context.NONE); - Assertions.assertEquals(EndpointType.DST, response.iterator().next().endpointType()); - Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, response.iterator().next().replicationSchedule()); - Assertions.assertEquals("h", response.iterator().next().remoteVolumeResourceId()); - Assertions.assertEquals("uipldqq", response.iterator().next().remoteVolumeRegion()); + Assertions.assertEquals(EndpointType.SRC, response.iterator().next().endpointType()); + Assertions.assertEquals(ReplicationSchedule.HOURLY, response.iterator().next().replicationSchedule()); + Assertions.assertEquals("wiswskukjtasbvw", response.iterator().next().remoteVolumeResourceId()); + Assertions.assertEquals("pkxkdtxfk", response.iterator().next().remoteVolumeRegion()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterMockTests.java index c34e0055ab3f..83f623c51b03 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterMockTests.java @@ -22,7 +22,7 @@ public final class VolumesPeerExternalClusterMockTests { @Test public void testPeerExternalCluster() throws Exception { - String responseStr = "{\"peerAcceptCommand\":\"bztensvkzykjtj\"}"; + String responseStr = "{\"peerAcceptCommand\":\"q\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,11 @@ public void testPeerExternalCluster() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ClusterPeerCommandResponse response - = manager.volumes() - .peerExternalCluster( - "ljnhvlqj", "ek", "eeksnbksdqhjvyk", "xeslkhhustcpoqm", new PeerClusterForVolumeMigrationRequest() - .withPeerIpAddresses(Arrays.asList("nwqjwgokn", "ejjjkxybwfdb")), - com.azure.core.util.Context.NONE); + ClusterPeerCommandResponse response = manager.volumes() + .peerExternalCluster("mt", "oiwenazerohzrsq", "lsxkd", "wqapfgsdp", + new PeerClusterForVolumeMigrationRequest().withPeerIpAddresses(Arrays.asList("essmzhhku", "ip")), + com.azure.core.util.Context.NONE); - Assertions.assertEquals("bztensvkzykjtj", response.peerAcceptCommand()); + Assertions.assertEquals("q", response.peerAcceptCommand()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java index 9b8b87629c14..eadbc657432c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java @@ -29,8 +29,8 @@ public void testPoolChange() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .poolChange("fz", "bfw", "rzx", "dew", new PoolChangeRequest().withNewPoolResourceId("rsxkr"), - com.azure.core.util.Context.NONE); + .poolChange("rrryveimips", "dyzatvfuzka", "tjvv", "uxwigsyeipqdsm", + new PoolChangeRequest().withNewPoolResourceId("tgrqgdgkkile"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java index 83a1561a30e3..0208c8c5323d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java @@ -28,8 +28,7 @@ public void testReInitializeReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .reInitializeReplication("gdexjd", "vjsaqwotm", "wllcolsr", "xaptefhexcgjok", - com.azure.core.util.Context.NONE); + .reInitializeReplication("kvb", "gkqu", "ybwptda", "arvvlfnt", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java index b6866dc9b370..f0e1b1f5d08c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class VolumesReplicationStatusWithResponseMockTests { @Test public void testReplicationStatusWithResponse() throws Exception { String responseStr - = "{\"healthy\":true,\"relationshipStatus\":\"Idle\",\"mirrorState\":\"Mirrored\",\"totalProgress\":\"egplwr\",\"errorMessage\":\"hwddkvbxgkq\"}"; + = "{\"healthy\":false,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Mirrored\",\"totalProgress\":\"kyxl\",\"errorMessage\":\"sjgkzzltafh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,14 @@ public void testReplicationStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ReplicationStatus response = manager.volumes() - .replicationStatusWithResponse("ejnndljdju", "kb", "req", "n", com.azure.core.util.Context.NONE) + .replicationStatusWithResponse("brxmrgch", "apx", "iyfjjkbajbuscg", "uusioycblev", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertTrue(response.healthy()); - Assertions.assertEquals(VolumeReplicationRelationshipStatus.IDLE, response.relationshipStatus()); + Assertions.assertFalse(response.healthy()); + Assertions.assertEquals(VolumeReplicationRelationshipStatus.TRANSFERRING, response.relationshipStatus()); Assertions.assertEquals(MirrorState.MIRRORED, response.mirrorState()); - Assertions.assertEquals("egplwr", response.totalProgress()); - Assertions.assertEquals("hwddkvbxgkq", response.errorMessage()); + Assertions.assertEquals("kyxl", response.totalProgress()); + Assertions.assertEquals("sjgkzzltafh", response.errorMessage()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java index 7d6b9855dbf1..af6ffe16e8c9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java @@ -27,7 +27,8 @@ public void testResyncReplication() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.volumes().resyncReplication("blhtjq", "qyv", "eh", "a", com.azure.core.util.Context.NONE); + manager.volumes() + .resyncReplication("knvgmmbugtywat", "qaqkuea", "groeshoyg", "cbyfqxkf", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java index 7ef55ebd970a..ae2a05117c3b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java @@ -29,8 +29,8 @@ public void testRevert() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .revert("cz", "vodrrslblxydkxr", "vvbxiwkgfbqljnq", "hychocokuleh", - new VolumeRevert().withSnapshotId("qlrqffaweyurk"), com.azure.core.util.Context.NONE); + .revert("uwyvcacoyvi", "bsizus", "szlbscm", "lzijiufehgmvflnw", + new VolumeRevert().withSnapshotId("qkxrerl"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java index eba515b53b76..a3235d71c312 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java @@ -27,8 +27,7 @@ public void testRevertRelocation() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.volumes() - .revertRelocation("ylcc", "evxrhyz", "fwrsofpltdbmair", "hvhfnracw", com.azure.core.util.Context.NONE); + manager.volumes().revertRelocation("yklxe", "lkhhu", "tcpoqma", "nwqjwgokn", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/tsp-location.yaml b/sdk/netapp/azure-resourcemanager-netapp/tsp-location.yaml index bc6824670f83..57a1524029f9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/tsp-location.yaml +++ b/sdk/netapp/azure-resourcemanager-netapp/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/netapp/resource-manager/Microsoft.NetApp/NetApp -commit: 97241c594f16e0915407b7dc85377e4e3b26b0b9 +commit: 29c080bf3c463cb98a563e959cacf6d7f128fcad repo: Azure/azure-rest-api-specs additionalDirectories: From f1e3d9f306174bf7e923e13ccfbd32b41fa4429c Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 4 Dec 2025 11:30:17 -0800 Subject: [PATCH 100/186] Sync eng/common directory with azure-sdk-tools for PR 13142 (#47436) * quotes * generalize * cant use trigger as a job * Update eng/common/pipelines/templates/jobs/ai-eval-job.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * target repo name fix * compile time expression * compile time expression * show params for pipeline * fix the pipeline variables * another fix * fix variables --------- Co-authored-by: Juan Ospina <70209456+jeo02@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- eng/common/pipelines/ai-evals-tests.yml | 97 +++++------------ .../pipelines/templates/jobs/ai-eval-job.yml | 100 ++++++++++++++++++ 2 files changed, 124 insertions(+), 73 deletions(-) create mode 100644 eng/common/pipelines/templates/jobs/ai-eval-job.yml diff --git a/eng/common/pipelines/ai-evals-tests.yml b/eng/common/pipelines/ai-evals-tests.yml index 170d47e86deb..4e7baa287e49 100644 --- a/eng/common/pipelines/ai-evals-tests.yml +++ b/eng/common/pipelines/ai-evals-tests.yml @@ -15,83 +15,34 @@ parameters: default: 'tools/azsdk-cli/Azure.Sdk.Tools.Cli.Evaluations' - name: OpenAIEndPoint type: string - default: 'https://ai-prmarottai3149546654251245.openai.azure.com/' + default: 'https://openai-shared.openai.azure.com/' - name: Model type: string default: 'gpt-5' - - name: ToolsRepoName + - name: EvalRepoOwner + type: string + default: 'Azure' + - name: EvalRepoName type: string default: 'azure-sdk-tools' - - name: ToolsRepoOwner + - name: EvalRepoCommit type: string - default: 'Azure' - -jobs: - - job: Run_Eval - variables: - - template: /eng/pipelines/templates/variables/globals.yml - - template: /eng/pipelines/templates/variables/image.yml - displayName: 'Run AI Eval' - pool: - name: $(LINUXPOOL) - image: $(LINUXVMIMAGE) - os: linux - - steps: - - task: UseDotNet@2 - displayName: "Use .NET SDK 9.0.x" - retryCountOnTaskFailure: 3 - inputs: - packageType: sdk - version: 9.0.x - performMultiLevelLookup: true - - - task: UseDotNet@2 - displayName: "Use .NET SDK 8.0.x" - retryCountOnTaskFailure: 3 - inputs: - packageType: sdk - version: 8.0.x - performMultiLevelLookup: true - - - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml - parameters: - SkipCheckoutNone: true - Repositories: - - Name: $(Build.Repository.Name) - Commitish: $(Build.SourceVersion) - WorkingDirectory: $(System.DefaultWorkingDirectory)/$(Build.Repository.Name) - - Name: ${{ parameters.ToolsRepoOwner }}/${{ parameters.ToolsRepoName }} - WorkingDirectory: $(System.DefaultWorkingDirectory)/${{ parameters.ToolsRepoName }} - Paths: - - 'tools/**' - - eng/common/** - - .github/copilot-instructions.md - - - task: AzureCLI@2 - displayName: 'Run eval' - inputs: - azureSubscription: opensource-api-connection - scriptType: 'bash' - scriptLocation: 'inlineScript' - workingDirectory: '${{ parameters.ToolsRepoName }}/${{ parameters.EvalProject }}' - inlineScript: | - echo "Logged in to Azure" - echo "Running eval in project ${{ parameters.ToolsRepoName }}/${{ parameters.EvalProject }}" - dotnet test /p:ArtifactsPackagesDir=$(Build.ArtifactStagingDirectory) --logger trx - env: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - DOTNET_MULTILEVEL_LOOKUP: 0 - AZURE_OPENAI_MODEL_DEPLOYMENT_NAME: ${{ parameters.Model }} - AZURE_OPENAI_ENDPOINT: ${{ parameters.OpenAIEndPoint }} - REPOSITORY_NAME: $(Build.Repository.Name) - COPILOT_INSTRUCTIONS_PATH_MCP_EVALS: $(System.DefaultWorkingDirectory)/$(Build.Repository.Name)/.github/copilot-instructions.md + default: 'main' - - task: PublishTestResults@2 - condition: succeededOrFailed() - inputs: - testResultsFiles: '**/*.trx' - testRunTitle: $(System.JobDisplayName) - testResultsFormat: 'VSTest' - mergeTestResults: true \ No newline at end of file +variables: + TargetRepoOwner: ${{ split(variables['Build.Repository.Name'], '/')[0] }} + TargetRepoName: ${{ split(variables['Build.Repository.Name'], '/')[1] }} + TargetRepoCommit: ${{ variables['Build.SourceVersion'] }} + +extends: + template: /eng/common/pipelines/templates/jobs/ai-eval-job.yml + parameters: + EvalProject: ${{ parameters.EvalProject }} + OpenAIEndPoint: ${{ parameters.OpenAIEndPoint }} + Model: ${{ parameters.Model }} + EvalRepoOwner: ${{ parameters.EvalRepoOwner }} + EvalRepoName: ${{ parameters.EvalRepoName }} + EvalRepoCommit: ${{ parameters.EvalRepoCommit }} + TargetRepoOwner: $(TargetRepoOwner) + TargetRepoName: $(TargetRepoName) + TargetRepoCommit: $(TargetRepoCommit) \ No newline at end of file diff --git a/eng/common/pipelines/templates/jobs/ai-eval-job.yml b/eng/common/pipelines/templates/jobs/ai-eval-job.yml new file mode 100644 index 000000000000..61e971ddcf31 --- /dev/null +++ b/eng/common/pipelines/templates/jobs/ai-eval-job.yml @@ -0,0 +1,100 @@ +parameters: + - name: EvalProject + type: string + default: 'tools/azsdk-cli/Azure.Sdk.Tools.Cli.Evaluations' + - name: OpenAIEndPoint + type: string + default: 'https://openai-shared.openai.azure.com/' + - name: Model + type: string + default: 'gpt-5' +# Repository where evals are located + - name: EvalRepoOwner + type: string + default: 'Azure' + - name: EvalRepoName + type: string + default: 'azure-sdk-tools' + - name: EvalRepoCommit + type: string + default: 'main' +# Target repository for copilot instructions + - name: TargetRepoOwner + type: string + - name: TargetRepoName + type: string + - name: TargetRepoCommit + type: string + +jobs: + - job: Run_Eval + variables: + - template: /eng/pipelines/templates/variables/globals.yml + - template: /eng/pipelines/templates/variables/image.yml + displayName: 'Run AI Eval' + pool: + name: $(LINUXPOOL) + image: $(LINUXVMIMAGE) + os: linux + + steps: + - checkout: none + - task: UseDotNet@2 + displayName: "Use .NET SDK 9.0.x" + retryCountOnTaskFailure: 3 + inputs: + packageType: sdk + version: 9.0.x + performMultiLevelLookup: true + + - task: UseDotNet@2 + displayName: "Use .NET SDK 8.0.x" + retryCountOnTaskFailure: 3 + inputs: + packageType: sdk + version: 8.0.x + performMultiLevelLookup: true + + - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml + parameters: + SkipCheckoutNone: true + Repositories: + - Name: ${{ parameters.EvalRepoOwner }}/${{ parameters.EvalRepoName }} + Commitish: ${{ parameters.EvalRepoCommit }} + WorkingDirectory: $(System.DefaultWorkingDirectory)/${{ parameters.EvalRepoName }} + - Name: ${{ parameters.TargetRepoOwner }}/${{ parameters.TargetRepoName }} + Commitish: ${{ parameters.TargetRepoCommit }} + WorkingDirectory: $(System.DefaultWorkingDirectory)/${{ parameters.TargetRepoName }} + Paths: + - 'tools/**' + - 'eng/common/**' + - '.github/copilot-instructions.md' + + - task: AzureCLI@2 + displayName: 'Run eval' + condition: and(succeeded(), ne(variables['Skip.Eval'], 'true')) + inputs: + azureSubscription: opensource-api-connection + scriptType: 'bash' + scriptLocation: 'inlineScript' + workingDirectory: '$(System.DefaultWorkingDirectory)/${{ parameters.EvalRepoName }}/${{ parameters.EvalProject }}' + inlineScript: | + echo "Logged in to Azure" + echo "Running eval" + dotnet test --logger trx + env: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_MULTILEVEL_LOOKUP: 0 + AZURE_OPENAI_MODEL_DEPLOYMENT_NAME: ${{ parameters.Model }} + AZURE_OPENAI_ENDPOINT: ${{ parameters.OpenAIEndPoint }} + REPOSITORY_NAME: ${{ parameters.TargetRepoName }} + COPILOT_INSTRUCTIONS_PATH_MCP_EVALS: $(System.DefaultWorkingDirectory)/${{ parameters.TargetRepoName }}/.github/copilot-instructions.md + + - task: PublishTestResults@2 + condition: succeededOrFailed() + inputs: + testResultsFiles: '**/*.trx' + testRunTitle: $(System.JobDisplayName) + testResultsFormat: 'VSTest' + mergeTestResults: true From b78d64ebb140d6804be836b46deb99900f601041 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 4 Dec 2025 11:41:15 -0800 Subject: [PATCH 101/186] Increment package versions for ai releases (#47443) --- eng/versioning/version_client.txt | 2 +- sdk/ai/azure-ai-voicelive/CHANGELOG.md | 10 ++++++++++ sdk/ai/azure-ai-voicelive/pom.xml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index e053f4f6c2a7..f86de730d1eb 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -58,7 +58,7 @@ com.azure:azure-ai-textanalytics-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-ai-translation-text;1.1.7;1.2.0-beta.1 com.azure:azure-ai-translation-document;1.0.6;1.1.0-beta.1 com.azure:azure-ai-vision-face;1.0.0-beta.2;1.0.0-beta.3 -com.azure:azure-ai-voicelive;1.0.0-beta.2;1.0.0-beta.3 +com.azure:azure-ai-voicelive;1.0.0-beta.3;1.0.0-beta.4 com.azure:azure-analytics-defender-easm;1.0.0-beta.1;1.0.0-beta.2 com.azure:azure-analytics-purview-datamap;1.0.0-beta.2;1.0.0-beta.3 com.azure:azure-analytics-onlineexperimentation;1.0.0-beta.1;1.0.0-beta.2 diff --git a/sdk/ai/azure-ai-voicelive/CHANGELOG.md b/sdk/ai/azure-ai-voicelive/CHANGELOG.md index dfaefa1198e4..1fae3f3b5120 100644 --- a/sdk/ai/azure-ai-voicelive/CHANGELOG.md +++ b/sdk/ai/azure-ai-voicelive/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.0.0-beta.4 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.0.0-beta.3 (2025-12-03) ### Features Added diff --git a/sdk/ai/azure-ai-voicelive/pom.xml b/sdk/ai/azure-ai-voicelive/pom.xml index 6cb79e2f868f..798fbf648666 100644 --- a/sdk/ai/azure-ai-voicelive/pom.xml +++ b/sdk/ai/azure-ai-voicelive/pom.xml @@ -14,7 +14,7 @@ Code generated by Microsoft (R) TypeSpec Code Generator. <groupId>com.azure</groupId> <artifactId>azure-ai-voicelive</artifactId> - <version>1.0.0-beta.3</version> <!-- {x-version-update;com.azure:azure-ai-voicelive;current} --> + <version>1.0.0-beta.4</version> <!-- {x-version-update;com.azure:azure-ai-voicelive;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for VoiceLive</name> From f4a24aae253a865893dfcd59e9845c41fc3f7ea1 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 4 Dec 2025 12:10:16 -0800 Subject: [PATCH 102/186] Fix unhelpful error when no stress packages are found (#47053) Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com> --- .../scripts/stress-testing/find-all-stress-packages.ps1 | 6 ++++-- .../scripts/stress-testing/stress-test-deployment-lib.ps1 | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 b/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 index 64df21a3a826..f595f8e7fd47 100644 --- a/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 +++ b/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 @@ -31,8 +31,10 @@ function FindStressPackages( $filters['stressTest'] = 'true' $packages = @() $chartFiles = Get-ChildItem -Recurse -Filter 'Chart.yaml' $directory - Write-Host "Found chart files:" - Write-Host ($chartFiles -join "`n") + if ($chartFiles) { + Write-Host "Found chart files:" + Write-Host ($chartFiles -join "`n") + } if (!$MatrixFileName) { $MatrixFileName = 'scenarios-matrix.yaml' diff --git a/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 b/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 index a2ec15999ad2..a9f45a0a9a00 100644 --- a/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 +++ b/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 @@ -172,6 +172,10 @@ function DeployStressTests( -MatrixFilters $MatrixFilters ` -MatrixReplace $MatrixReplace ` -MatrixNonSparseParameters $MatrixNonSparseParameters) + if (!$pkgs -or !$pkgs.Length) { + Write-Warning "No stress test packages found in $searchDirectory" + exit 0 + } Write-Host "" "Found $($pkgs.Length) stress test packages:" Write-Host $pkgs.Directory "" foreach ($pkg in $pkgs) { From 4aeaa80ebe1f2a64ed7e32e13453da0536deb333 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 4 Dec 2025 13:29:48 -0800 Subject: [PATCH 103/186] Bump cspell from 9.3.2 to 9.4.0 in /eng/common/spelling (#47458) Bumps [cspell](https://github.com/streetsidesoftware/cspell/tree/HEAD/packages/cspell) from 9.3.2 to 9.4.0. - [Release notes](https://github.com/streetsidesoftware/cspell/releases) - [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell/commits/v9.4.0/packages/cspell) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- eng/common/spelling/package-lock.json | 549 +++++++++++++------------- eng/common/spelling/package.json | 2 +- 2 files changed, 286 insertions(+), 265 deletions(-) diff --git a/eng/common/spelling/package-lock.json b/eng/common/spelling/package-lock.json index d8c4a8faaa92..1a0980c4bd0a 100644 --- a/eng/common/spelling/package-lock.json +++ b/eng/common/spelling/package-lock.json @@ -8,25 +8,25 @@ "name": "cspell-version-pin", "version": "1.0.0", "dependencies": { - "cspell": "^9.3.2" + "cspell": "^9.4.0" } }, "node_modules/@cspell/cspell-bundled-dicts": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-9.3.2.tgz", - "integrity": "sha512-OmKzq/0FATHU671GKMzBrTyLdm25Wnziva7h4ylumVn1wnwWsXGef5bgXD7iuApqfqH9SzxsU0NtTB8m8vwEHQ==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-9.4.0.tgz", + "integrity": "sha512-Hm2gpMg/lRv4fKtiO2NfBiaJdFZVVb1V1a+IVhlD9qCuObLhCt60Oze2kD1dQzhbaIX756cs/eyxa5bQ5jihhQ==", "dependencies": { "@cspell/dict-ada": "^4.1.1", "@cspell/dict-al": "^1.1.1", "@cspell/dict-aws": "^4.0.16", "@cspell/dict-bash": "^4.2.2", "@cspell/dict-companies": "^3.2.7", - "@cspell/dict-cpp": "^6.0.14", + "@cspell/dict-cpp": "^6.0.15", "@cspell/dict-cryptocurrencies": "^5.0.5", "@cspell/dict-csharp": "^4.0.7", "@cspell/dict-css": "^4.0.18", "@cspell/dict-dart": "^2.3.1", - "@cspell/dict-data-science": "^2.0.11", + "@cspell/dict-data-science": "^2.0.12", "@cspell/dict-django": "^4.1.5", "@cspell/dict-docker": "^1.1.16", "@cspell/dict-dotnet": "^5.0.10", @@ -44,7 +44,7 @@ "@cspell/dict-golang": "^6.0.24", "@cspell/dict-google": "^1.0.9", "@cspell/dict-haskell": "^4.0.6", - "@cspell/dict-html": "^4.0.12", + "@cspell/dict-html": "^4.0.13", "@cspell/dict-html-symbol-entities": "^4.0.4", "@cspell/dict-java": "^5.0.12", "@cspell/dict-julia": "^1.1.1", @@ -54,20 +54,20 @@ "@cspell/dict-lorem-ipsum": "^4.0.5", "@cspell/dict-lua": "^4.0.8", "@cspell/dict-makefile": "^1.0.5", - "@cspell/dict-markdown": "^2.0.12", + "@cspell/dict-markdown": "^2.0.13", "@cspell/dict-monkeyc": "^1.0.11", "@cspell/dict-node": "^5.0.8", - "@cspell/dict-npm": "^5.2.22", + "@cspell/dict-npm": "^5.2.25", "@cspell/dict-php": "^4.1.0", "@cspell/dict-powershell": "^5.0.15", "@cspell/dict-public-licenses": "^2.0.15", - "@cspell/dict-python": "^4.2.21", + "@cspell/dict-python": "^4.2.23", "@cspell/dict-r": "^2.1.1", "@cspell/dict-ruby": "^5.0.9", "@cspell/dict-rust": "^4.0.12", "@cspell/dict-scala": "^5.0.8", "@cspell/dict-shell": "^1.1.2", - "@cspell/dict-software-terms": "^5.1.13", + "@cspell/dict-software-terms": "^5.1.15", "@cspell/dict-sql": "^2.2.1", "@cspell/dict-svelte": "^1.0.7", "@cspell/dict-swift": "^2.0.6", @@ -81,28 +81,28 @@ } }, "node_modules/@cspell/cspell-json-reporter": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-json-reporter/-/cspell-json-reporter-9.3.2.tgz", - "integrity": "sha512-YRgpeHN9uY8kUlIw9q+8zJ0tRTAJMbfBTGzCq9Puah09NeMWlRMFPUkXVrkdic6NA7etboZ+zEdoZwRO9EmhiA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-json-reporter/-/cspell-json-reporter-9.4.0.tgz", + "integrity": "sha512-TpHY7t13xNhcZF9bwOfgVIhcyPDamMnxU/TBYhf4mPtXPLrZ5gBTg3UZh0/9Zn3naMjmJtngdsLvB2wai9xBlQ==", "dependencies": { - "@cspell/cspell-types": "9.3.2" + "@cspell/cspell-types": "9.4.0" }, "engines": { "node": ">=20" } }, "node_modules/@cspell/cspell-pipe": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-9.3.2.tgz", - "integrity": "sha512-REF7ibG79WLEynIMUss/IRDCdYEb1nlE1rj/gt2CbPFzLa6t5MRwW2lajEvXS6/WgbMtsTVHAWi3ALqJzCwxng==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-9.4.0.tgz", + "integrity": "sha512-cI0sUe7SB99hJB1T6PhH/MpSrnml1kOekTCE+VH3Eb7zkVP5/mwJXs8BlufdvwBona+Cgkx6jeWlhFpxLc39Yg==", "engines": { "node": ">=20" } }, "node_modules/@cspell/cspell-resolver": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-9.3.2.tgz", - "integrity": "sha512-jLN2Aa/vxm8+IBvTd884SwPEfjxnDwIEPBT3hmqgLlKuUHQ3FMG27lsM4Ik9L2KWBXMgV/wGz4BaxfhKI41Ttw==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-9.4.0.tgz", + "integrity": "sha512-o9gbbdXlhxG2rqtGqQ7xZ8MGDDsPLbskBnTeuA++ix4Ch/HdjrBNmKReIGAEqJPfP+JGgoEKqFISHUDKAJ/ygQ==", "dependencies": { "global-directory": "^4.0.1" }, @@ -111,17 +111,17 @@ } }, "node_modules/@cspell/cspell-service-bus": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-9.3.2.tgz", - "integrity": "sha512-/rB8LazM0JzKL+AvZa5fEpLutmwy5QFMpzw8HJd+rDGkzb5r79hURWSRo84QArgaskUqA9XlOHSieDE9pt+WAA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-9.4.0.tgz", + "integrity": "sha512-UottRlFPN6FGUfojx5HtUPZTeYXg2rf2HvO/HLh0KicirVYO16vFxTevg9MyOvw1EXSsDRz8ECANjiE7fnzBCQ==", "engines": { "node": ">=20" } }, "node_modules/@cspell/cspell-types": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-9.3.2.tgz", - "integrity": "sha512-l4H8bMAmdzCbXHO8y1JZiAKszrPEiuLFKWrbhCacHF0iP+PIc/yuQp7cO70m0p70vArRfih6kgGyHFaCy47CfA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-9.4.0.tgz", + "integrity": "sha512-vSpd50OfmthBH0aRFRLA2zJFtwli3ntHA0WAOJ8tIMLUCJgF3udooRXFeX3wR8ri69C9mc3864LC4inyRC/E9w==", "engines": { "node": ">=20" } @@ -155,9 +155,9 @@ "integrity": "sha512-fEyr3LmpFKTaD0LcRhB4lfW1AmULYBqzg4gWAV0dQCv06l+TsA+JQ+3pZJbUcoaZirtgsgT3dL3RUjmGPhUH0A==" }, "node_modules/@cspell/dict-cpp": { - "version": "6.0.14", - "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-6.0.14.tgz", - "integrity": "sha512-dkmpSwvVfVdtoZ4mW/CK2Ep1v8mJlp6uiKpMNbSMOdJl4kq28nQS4vKNIX3B2bJa0Ha5iHHu+1mNjiLeO3g7Xg==" + "version": "6.0.15", + "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-6.0.15.tgz", + "integrity": "sha512-N7MKK3llRNoBncygvrnLaGvmjo4xzVr5FbtAc9+MFGHK6/LeSySBupr1FM72XDaVSIsmBEe7sDYCHHwlI9Jb2w==" }, "node_modules/@cspell/dict-cryptocurrencies": { "version": "5.0.5", @@ -180,9 +180,9 @@ "integrity": "sha512-xoiGnULEcWdodXI6EwVyqpZmpOoh8RA2Xk9BNdR7DLamV/QMvEYn8KJ7NlRiTSauJKPNkHHQ5EVHRM6sTS7jdg==" }, "node_modules/@cspell/dict-data-science": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@cspell/dict-data-science/-/dict-data-science-2.0.11.tgz", - "integrity": "sha512-Dt+83nVCcF+dQyvFSaZjCKt1H5KbsVJFtH2X7VUfmIzQu8xCnV1fUmkhBzGJ+NiFs99Oy9JA6I9EjeqExzXk7g==" + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@cspell/dict-data-science/-/dict-data-science-2.0.12.tgz", + "integrity": "sha512-vI/mg6cI28IkFcpeINS7cm5M9HWemmXSTnxJiu3nmc4VAGx35SXIEyuLGBcsVzySvDablFYf4hsEpmg1XpVsUQ==" }, "node_modules/@cspell/dict-django": { "version": "4.1.5", @@ -270,9 +270,9 @@ "integrity": "sha512-ib8SA5qgftExpYNjWhpYIgvDsZ/0wvKKxSP+kuSkkak520iPvTJumEpIE+qPcmJQo4NzdKMN8nEfaeci4OcFAQ==" }, "node_modules/@cspell/dict-html": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-4.0.12.tgz", - "integrity": "sha512-JFffQ1dDVEyJq6tCDWv0r/RqkdSnV43P2F/3jJ9rwLgdsOIXwQbXrz6QDlvQLVvNSnORH9KjDtenFTGDyzfCaA==" + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-4.0.13.tgz", + "integrity": "sha512-vHzk2xfqQYPvoXtQtywa6ekIonPrUEwe2uftjry3UNRNl89TtzLJVSkiymKJ3WMb+W/DwKXKIb1tKzcIS8ccIg==" }, "node_modules/@cspell/dict-html-symbol-entities": { "version": "4.0.4", @@ -320,12 +320,12 @@ "integrity": "sha512-4vrVt7bGiK8Rx98tfRbYo42Xo2IstJkAF4tLLDMNQLkQ86msDlYSKG1ZCk8Abg+EdNcFAjNhXIiNO+w4KflGAQ==" }, "node_modules/@cspell/dict-markdown": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/@cspell/dict-markdown/-/dict-markdown-2.0.12.tgz", - "integrity": "sha512-ufwoliPijAgWkD/ivAMC+A9QD895xKiJRF/fwwknQb7kt7NozTLKFAOBtXGPJAB4UjhGBpYEJVo2elQ0FCAH9A==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@cspell/dict-markdown/-/dict-markdown-2.0.13.tgz", + "integrity": "sha512-rFeGikf+lVlywEp7giATUfi8myFeee6jqgbUgtdIdl/OBmRBPe5m7mKNk7yMItMZe8ICrwMxFwJy5OeTnrr6QA==", "peerDependencies": { "@cspell/dict-css": "^4.0.18", - "@cspell/dict-html": "^4.0.12", + "@cspell/dict-html": "^4.0.13", "@cspell/dict-html-symbol-entities": "^4.0.4", "@cspell/dict-typescript": "^3.2.3" } @@ -341,9 +341,9 @@ "integrity": "sha512-AirZcN2i84ynev3p2/1NCPEhnNsHKMz9zciTngGoqpdItUb2bDt1nJBjwlsrFI78GZRph/VaqTVFwYikmncpXg==" }, "node_modules/@cspell/dict-npm": { - "version": "5.2.22", - "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.2.22.tgz", - "integrity": "sha512-bepGmmRv7KmxULqfw88G9wxkpIAQA96YyrfKpfg4RHnQLxpmzoRnZGtK5S9JH7Hlf5LEd1gkOF7dtCE6cek67w==" + "version": "5.2.25", + "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.2.25.tgz", + "integrity": "sha512-jxhVxM3+ilxbum/N2ejAvVuvet1OrGeW1fD7GagAkHU/2zlzINZkJLDtXk6v1WHUjigfhiAsois3puobv/2A1A==" }, "node_modules/@cspell/dict-php": { "version": "4.1.0", @@ -361,11 +361,11 @@ "integrity": "sha512-cJEOs901H13Pfy0fl4dCD1U+xpWIMaEPq8MeYU83FfDZvellAuSo4GqWCripfIqlhns/L6+UZEIJSOZnjgy7Wg==" }, "node_modules/@cspell/dict-python": { - "version": "4.2.21", - "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.2.21.tgz", - "integrity": "sha512-M9OgwXWhpZqEZqKU2psB2DFsT8q5SwEahkQeIpNIRWIErjwG7I9yYhhfvPz6s5gMCMhhb3hqcPJTnmdgqGrQyg==", + "version": "4.2.23", + "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.2.23.tgz", + "integrity": "sha512-c0C//tmG4PZWeONtTBPXa6q0ylfz3/BgEcHAR1L0BPWjNUIzTyx9J+hEIUCPYf7eAPeYjaDuTvYlg11igXXE4Q==", "dependencies": { - "@cspell/dict-data-science": "^2.0.11" + "@cspell/dict-data-science": "^2.0.12" } }, "node_modules/@cspell/dict-r": { @@ -394,9 +394,9 @@ "integrity": "sha512-WqOUvnwcHK1X61wAfwyXq04cn7KYyskg90j4lLg3sGGKMW9Sq13hs91pqrjC44Q+lQLgCobrTkMDw9Wyl9nRFA==" }, "node_modules/@cspell/dict-software-terms": { - "version": "5.1.13", - "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-5.1.13.tgz", - "integrity": "sha512-bmWMOpqzCmmKFHM9hFC6o+GP20t2+uTuwksR3a6crHQqvNv3revzwQHorsWvSYx75xsdcvRYrAz7PqPEV/FG1g==" + "version": "5.1.15", + "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-5.1.15.tgz", + "integrity": "sha512-93VqazVvVtHuKY7seGxbfdtrnPBgZ/hZ/NmFFkBRhkRL6NavaQ6U2QsHpnlVEZN5km3DmaQy1X4ZcvNoSTK/ZQ==" }, "node_modules/@cspell/dict-sql": { "version": "2.2.1", @@ -434,11 +434,11 @@ "integrity": "sha512-XibBIxBlVosU06+M6uHWkFeT0/pW5WajDRYdXG2CgHnq85b0TI/Ks0FuBJykmsgi2CAD3Qtx8UHFEtl/DSFnAQ==" }, "node_modules/@cspell/dynamic-import": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-9.3.2.tgz", - "integrity": "sha512-au7FyuIHUNI2r9sO3pUBKVTeD/v7c9x/nPUStaAK1bG4rdKt4w+/jUY2IaldAraW5w29z528BboXbiV87SM1kw==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-9.4.0.tgz", + "integrity": "sha512-d2fjLjzrKGUIn5hWK8gMuyAh2pqXSxBqOHpU1jR3jxbrO3MilunKNijaSstv7CZn067Jpc36VfaKQodaXNZzUA==", "dependencies": { - "@cspell/url": "9.3.2", + "@cspell/url": "9.4.0", "import-meta-resolve": "^4.2.0" }, "engines": { @@ -446,29 +446,40 @@ } }, "node_modules/@cspell/filetypes": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-9.3.2.tgz", - "integrity": "sha512-0bUxQlmJPRHZrRQD7adbc4lFizO8tGD/6+1cBgU3kV3+NVrpr12y4jU8twCSChhYibZyPr7bnvhkM3cQgb8RzA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-9.4.0.tgz", + "integrity": "sha512-RMrYHkvPF0tHVFM+T4voEhX9sfYQrd/mnNbf6+O4CWUyLCz4NQ5H9yOgEIJwEcLu4y3NESGXFef/Jn5xo0CUfg==", "engines": { "node": ">=20" } }, "node_modules/@cspell/strong-weak-map": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-9.3.2.tgz", - "integrity": "sha512-pFcmOTWCoFMRETb9PCkCmaiZiLb5i2qOZmGH/p/tFEH8kIYhMGfhaulnXwKwS+Ke6PKceQd2YL98bGmo8hL4aQ==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-9.4.0.tgz", + "integrity": "sha512-ui7mlXYmqElS/SmRubPBNWdkQVWgWbB6rjCurc+0owYXlnweItAMHTxC8mCWM/Au22SF1dB/JR8QBELFXLkTjQ==", "engines": { "node": ">=20" } }, "node_modules/@cspell/url": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/url/-/url-9.3.2.tgz", - "integrity": "sha512-TobUlZl7Z7VehhNOMNAg1ABuGizieseftlG94OZJ934JptOhK8TC/1o2ldKrbDH50jyt6E7rPTMV2BW/vWuTzQ==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/url/-/url-9.4.0.tgz", + "integrity": "sha512-nt88P6m20AaVbqMxsyPf8KqyWPaFEW2UANi0ijBxc2xTkD2KiUovxfZUYW6NMU9XBYZlovT5LztkEhst2yBcSA==", "engines": { "node": ">=20" } }, + "node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, "node_modules/array-timsort": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/array-timsort/-/array-timsort-1.0.3.tgz", @@ -551,24 +562,25 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/cspell": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell/-/cspell-9.3.2.tgz", - "integrity": "sha512-3xFyVSTYrYa/QJzLfzsCRMkMXqOsytP8E26DuGrVMJQoLPFmbOXNNtnMu4wrtr17QVloxpvutW77U4vb2L/LDQ==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell/-/cspell-9.4.0.tgz", + "integrity": "sha512-ZvXO+EY/G0/msu7jwRiVk0sXL/zB7DMJLBvjSUrK82uVbDoDxHwXxUuOz2UVnk2+J61//ldIZrjxVK8KMvaJlg==", "dependencies": { - "@cspell/cspell-json-reporter": "9.3.2", - "@cspell/cspell-pipe": "9.3.2", - "@cspell/cspell-types": "9.3.2", - "@cspell/dynamic-import": "9.3.2", - "@cspell/url": "9.3.2", + "@cspell/cspell-json-reporter": "9.4.0", + "@cspell/cspell-pipe": "9.4.0", + "@cspell/cspell-types": "9.4.0", + "@cspell/dynamic-import": "9.4.0", + "@cspell/url": "9.4.0", + "ansi-regex": "^6.2.2", "chalk": "^5.6.2", "chalk-template": "^1.1.2", "commander": "^14.0.2", - "cspell-config-lib": "9.3.2", - "cspell-dictionary": "9.3.2", - "cspell-gitignore": "9.3.2", - "cspell-glob": "9.3.2", - "cspell-io": "9.3.2", - "cspell-lib": "9.3.2", + "cspell-config-lib": "9.4.0", + "cspell-dictionary": "9.4.0", + "cspell-gitignore": "9.4.0", + "cspell-glob": "9.4.0", + "cspell-io": "9.4.0", + "cspell-lib": "9.4.0", "fast-json-stable-stringify": "^2.1.0", "flatted": "^3.3.3", "semver": "^7.7.3", @@ -586,27 +598,27 @@ } }, "node_modules/cspell-config-lib": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-9.3.2.tgz", - "integrity": "sha512-zXhmA4rqgWQRTVijI+g/mgiep76TvTO4d+P3CHwcqLG57BKVzoW+jkO4qDLC+Neh4b8+CcNWEIr3w16BfuEJAA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-9.4.0.tgz", + "integrity": "sha512-CvQKSmK/DRIf3LpNx2sZth65pHW2AHngZqLkH3DTwnAPbiCAsE0XvCrVhvDfCNu/6uJIaa+NVHSs8GOf//DHBQ==", "dependencies": { - "@cspell/cspell-types": "9.3.2", + "@cspell/cspell-types": "9.4.0", "comment-json": "^4.4.1", "smol-toml": "^1.5.2", - "yaml": "^2.8.1" + "yaml": "^2.8.2" }, "engines": { "node": ">=20" } }, "node_modules/cspell-dictionary": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-9.3.2.tgz", - "integrity": "sha512-E3YhOhZzZt1a+AEbFV2B3THCyZ576PDg0mDNUDrU1Y65SyIhf4DC6itfPoAb6R3FI/DI218RqWZg/FTT8lJ2gA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-9.4.0.tgz", + "integrity": "sha512-c2qscanRZChoHZFYI7KpvBMdy8i6wNwl2EflcNRrFiFOq67t9CgxLe54PafaqhrHGpBc8nElaZKciLvjj6Uscw==", "dependencies": { - "@cspell/cspell-pipe": "9.3.2", - "@cspell/cspell-types": "9.3.2", - "cspell-trie-lib": "9.3.2", + "@cspell/cspell-pipe": "9.4.0", + "@cspell/cspell-types": "9.4.0", + "cspell-trie-lib": "9.4.0", "fast-equals": "^5.3.3" }, "engines": { @@ -614,13 +626,13 @@ } }, "node_modules/cspell-gitignore": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-9.3.2.tgz", - "integrity": "sha512-G2bLR+Dfb9GX4Sdm75GfCCa9V/sQYkRbLckuCuVmJxvcDB0xfczAtb6TfAXIziF3oUI6cOB1g+PoNLWBelcK5w==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-9.4.0.tgz", + "integrity": "sha512-HMrzLmJBUMSpaMMkltlTAz/aVOrHxixyhKfg5WbFCJ5JYZO6Qu3/JU3wRoOFoud9449wRjLkvrGmbbL2+vO6Lw==", "dependencies": { - "@cspell/url": "9.3.2", - "cspell-glob": "9.3.2", - "cspell-io": "9.3.2" + "@cspell/url": "9.4.0", + "cspell-glob": "9.4.0", + "cspell-io": "9.4.0" }, "bin": { "cspell-gitignore": "bin.mjs" @@ -630,11 +642,11 @@ } }, "node_modules/cspell-glob": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-9.3.2.tgz", - "integrity": "sha512-TuSupENEKyOCupOUZ3vnPxaTOghxY/rD1JIkb8e5kjzRprYVilO/rYqEk/52iLwJVd+4Npe8fNhR3KhU7u/UUg==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-9.4.0.tgz", + "integrity": "sha512-Q87Suj9oXrhoKck15qWorCizBjMNxG/k3NjnhKIAMrF+PdUa1Mpl0MOD+hqV1Wvwh1UHcIMYCP3bR3XpBbNx+Q==", "dependencies": { - "@cspell/url": "9.3.2", + "@cspell/url": "9.4.0", "picomatch": "^4.0.3" }, "engines": { @@ -642,12 +654,12 @@ } }, "node_modules/cspell-grammar": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-9.3.2.tgz", - "integrity": "sha512-ysonrFu9vJvF/derDlEjUfmvLeCfNOWPh00t6Yh093AKrJFoWQiyaS/5bEN/uB5/n1sa4k3ItnWvuTp3+YuZsA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-9.4.0.tgz", + "integrity": "sha512-ie7OQ4Neflo+61bMzoLR7GtlZfMBAm2KL1U4iNqh15wUE5fDbvXeN15H5lu+gcO8BwYvC5wxZknw1x62/J8+3Q==", "dependencies": { - "@cspell/cspell-pipe": "9.3.2", - "@cspell/cspell-types": "9.3.2" + "@cspell/cspell-pipe": "9.4.0", + "@cspell/cspell-types": "9.4.0" }, "bin": { "cspell-grammar": "bin.mjs" @@ -657,37 +669,37 @@ } }, "node_modules/cspell-io": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-9.3.2.tgz", - "integrity": "sha512-ahoULCp0j12TyXXmIcdO/7x65A/2mzUQO1IkOC65OXEbNT+evt0yswSO5Nr1F6kCHDuEKc46EZWwsYAzj78pMg==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-9.4.0.tgz", + "integrity": "sha512-8w30dqlO54H9w6WGlvZhHI5kytVbF3bYPqKJAZLWKEO36L2mdpf6/abx/FA4yVLJ56wmH1x0N0ZK32wNRl5C6A==", "dependencies": { - "@cspell/cspell-service-bus": "9.3.2", - "@cspell/url": "9.3.2" + "@cspell/cspell-service-bus": "9.4.0", + "@cspell/url": "9.4.0" }, "engines": { "node": ">=20" } }, "node_modules/cspell-lib": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-9.3.2.tgz", - "integrity": "sha512-kdk11kib68zNANNICuOA8h4oA9kENQUAdeX/uvT4+7eHbHHV8WSgjXm4k4o/pRIbg164UJTX/XxKb/65ftn5jw==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-9.4.0.tgz", + "integrity": "sha512-ajjioE59IEDNUPawfaBpiMfGC32iKPkuYd4T9ftguuef8VvyKRifniiUi1nxwGgAhzSfxHvWs7qdT+29Pp5TMQ==", "dependencies": { - "@cspell/cspell-bundled-dicts": "9.3.2", - "@cspell/cspell-pipe": "9.3.2", - "@cspell/cspell-resolver": "9.3.2", - "@cspell/cspell-types": "9.3.2", - "@cspell/dynamic-import": "9.3.2", - "@cspell/filetypes": "9.3.2", - "@cspell/strong-weak-map": "9.3.2", - "@cspell/url": "9.3.2", + "@cspell/cspell-bundled-dicts": "9.4.0", + "@cspell/cspell-pipe": "9.4.0", + "@cspell/cspell-resolver": "9.4.0", + "@cspell/cspell-types": "9.4.0", + "@cspell/dynamic-import": "9.4.0", + "@cspell/filetypes": "9.4.0", + "@cspell/strong-weak-map": "9.4.0", + "@cspell/url": "9.4.0", "clear-module": "^4.1.2", - "cspell-config-lib": "9.3.2", - "cspell-dictionary": "9.3.2", - "cspell-glob": "9.3.2", - "cspell-grammar": "9.3.2", - "cspell-io": "9.3.2", - "cspell-trie-lib": "9.3.2", + "cspell-config-lib": "9.4.0", + "cspell-dictionary": "9.4.0", + "cspell-glob": "9.4.0", + "cspell-grammar": "9.4.0", + "cspell-io": "9.4.0", + "cspell-trie-lib": "9.4.0", "env-paths": "^3.0.0", "gensequence": "^8.0.8", "import-fresh": "^3.3.1", @@ -701,12 +713,12 @@ } }, "node_modules/cspell-trie-lib": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-9.3.2.tgz", - "integrity": "sha512-1Af7Mq9jIccFQyJl/ZCcqQbtJwuDqpQVkk8xfs/92x4OI6gW1iTVRMtsrh0RTw1HZoR8aQD7tRRCiLPf/D+UiQ==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-9.4.0.tgz", + "integrity": "sha512-bySJTm8XDiJAoC1MDo4lE/KpSNxydo13ZETC8TF7Hb3rbWI1c6o5eZ4+i/tkG3M94OvKV91+MeAvoMCe7GGgAw==", "dependencies": { - "@cspell/cspell-pipe": "9.3.2", - "@cspell/cspell-types": "9.3.2", + "@cspell/cspell-pipe": "9.4.0", + "@cspell/cspell-types": "9.4.0", "gensequence": "^8.0.8" }, "engines": { @@ -937,34 +949,37 @@ } }, "node_modules/yaml": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", - "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz", + "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==", "bin": { "yaml": "bin.mjs" }, "engines": { "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" } } }, "dependencies": { "@cspell/cspell-bundled-dicts": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-9.3.2.tgz", - "integrity": "sha512-OmKzq/0FATHU671GKMzBrTyLdm25Wnziva7h4ylumVn1wnwWsXGef5bgXD7iuApqfqH9SzxsU0NtTB8m8vwEHQ==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-9.4.0.tgz", + "integrity": "sha512-Hm2gpMg/lRv4fKtiO2NfBiaJdFZVVb1V1a+IVhlD9qCuObLhCt60Oze2kD1dQzhbaIX756cs/eyxa5bQ5jihhQ==", "requires": { "@cspell/dict-ada": "^4.1.1", "@cspell/dict-al": "^1.1.1", "@cspell/dict-aws": "^4.0.16", "@cspell/dict-bash": "^4.2.2", "@cspell/dict-companies": "^3.2.7", - "@cspell/dict-cpp": "^6.0.14", + "@cspell/dict-cpp": "^6.0.15", "@cspell/dict-cryptocurrencies": "^5.0.5", "@cspell/dict-csharp": "^4.0.7", "@cspell/dict-css": "^4.0.18", "@cspell/dict-dart": "^2.3.1", - "@cspell/dict-data-science": "^2.0.11", + "@cspell/dict-data-science": "^2.0.12", "@cspell/dict-django": "^4.1.5", "@cspell/dict-docker": "^1.1.16", "@cspell/dict-dotnet": "^5.0.10", @@ -982,7 +997,7 @@ "@cspell/dict-golang": "^6.0.24", "@cspell/dict-google": "^1.0.9", "@cspell/dict-haskell": "^4.0.6", - "@cspell/dict-html": "^4.0.12", + "@cspell/dict-html": "^4.0.13", "@cspell/dict-html-symbol-entities": "^4.0.4", "@cspell/dict-java": "^5.0.12", "@cspell/dict-julia": "^1.1.1", @@ -992,20 +1007,20 @@ "@cspell/dict-lorem-ipsum": "^4.0.5", "@cspell/dict-lua": "^4.0.8", "@cspell/dict-makefile": "^1.0.5", - "@cspell/dict-markdown": "^2.0.12", + "@cspell/dict-markdown": "^2.0.13", "@cspell/dict-monkeyc": "^1.0.11", "@cspell/dict-node": "^5.0.8", - "@cspell/dict-npm": "^5.2.22", + "@cspell/dict-npm": "^5.2.25", "@cspell/dict-php": "^4.1.0", "@cspell/dict-powershell": "^5.0.15", "@cspell/dict-public-licenses": "^2.0.15", - "@cspell/dict-python": "^4.2.21", + "@cspell/dict-python": "^4.2.23", "@cspell/dict-r": "^2.1.1", "@cspell/dict-ruby": "^5.0.9", "@cspell/dict-rust": "^4.0.12", "@cspell/dict-scala": "^5.0.8", "@cspell/dict-shell": "^1.1.2", - "@cspell/dict-software-terms": "^5.1.13", + "@cspell/dict-software-terms": "^5.1.15", "@cspell/dict-sql": "^2.2.1", "@cspell/dict-svelte": "^1.0.7", "@cspell/dict-swift": "^2.0.6", @@ -1016,35 +1031,35 @@ } }, "@cspell/cspell-json-reporter": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-json-reporter/-/cspell-json-reporter-9.3.2.tgz", - "integrity": "sha512-YRgpeHN9uY8kUlIw9q+8zJ0tRTAJMbfBTGzCq9Puah09NeMWlRMFPUkXVrkdic6NA7etboZ+zEdoZwRO9EmhiA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-json-reporter/-/cspell-json-reporter-9.4.0.tgz", + "integrity": "sha512-TpHY7t13xNhcZF9bwOfgVIhcyPDamMnxU/TBYhf4mPtXPLrZ5gBTg3UZh0/9Zn3naMjmJtngdsLvB2wai9xBlQ==", "requires": { - "@cspell/cspell-types": "9.3.2" + "@cspell/cspell-types": "9.4.0" } }, "@cspell/cspell-pipe": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-9.3.2.tgz", - "integrity": "sha512-REF7ibG79WLEynIMUss/IRDCdYEb1nlE1rj/gt2CbPFzLa6t5MRwW2lajEvXS6/WgbMtsTVHAWi3ALqJzCwxng==" + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-9.4.0.tgz", + "integrity": "sha512-cI0sUe7SB99hJB1T6PhH/MpSrnml1kOekTCE+VH3Eb7zkVP5/mwJXs8BlufdvwBona+Cgkx6jeWlhFpxLc39Yg==" }, "@cspell/cspell-resolver": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-9.3.2.tgz", - "integrity": "sha512-jLN2Aa/vxm8+IBvTd884SwPEfjxnDwIEPBT3hmqgLlKuUHQ3FMG27lsM4Ik9L2KWBXMgV/wGz4BaxfhKI41Ttw==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-9.4.0.tgz", + "integrity": "sha512-o9gbbdXlhxG2rqtGqQ7xZ8MGDDsPLbskBnTeuA++ix4Ch/HdjrBNmKReIGAEqJPfP+JGgoEKqFISHUDKAJ/ygQ==", "requires": { "global-directory": "^4.0.1" } }, "@cspell/cspell-service-bus": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-9.3.2.tgz", - "integrity": "sha512-/rB8LazM0JzKL+AvZa5fEpLutmwy5QFMpzw8HJd+rDGkzb5r79hURWSRo84QArgaskUqA9XlOHSieDE9pt+WAA==" + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-9.4.0.tgz", + "integrity": "sha512-UottRlFPN6FGUfojx5HtUPZTeYXg2rf2HvO/HLh0KicirVYO16vFxTevg9MyOvw1EXSsDRz8ECANjiE7fnzBCQ==" }, "@cspell/cspell-types": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-9.3.2.tgz", - "integrity": "sha512-l4H8bMAmdzCbXHO8y1JZiAKszrPEiuLFKWrbhCacHF0iP+PIc/yuQp7cO70m0p70vArRfih6kgGyHFaCy47CfA==" + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-9.4.0.tgz", + "integrity": "sha512-vSpd50OfmthBH0aRFRLA2zJFtwli3ntHA0WAOJ8tIMLUCJgF3udooRXFeX3wR8ri69C9mc3864LC4inyRC/E9w==" }, "@cspell/dict-ada": { "version": "4.1.1", @@ -1075,9 +1090,9 @@ "integrity": "sha512-fEyr3LmpFKTaD0LcRhB4lfW1AmULYBqzg4gWAV0dQCv06l+TsA+JQ+3pZJbUcoaZirtgsgT3dL3RUjmGPhUH0A==" }, "@cspell/dict-cpp": { - "version": "6.0.14", - "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-6.0.14.tgz", - "integrity": "sha512-dkmpSwvVfVdtoZ4mW/CK2Ep1v8mJlp6uiKpMNbSMOdJl4kq28nQS4vKNIX3B2bJa0Ha5iHHu+1mNjiLeO3g7Xg==" + "version": "6.0.15", + "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-6.0.15.tgz", + "integrity": "sha512-N7MKK3llRNoBncygvrnLaGvmjo4xzVr5FbtAc9+MFGHK6/LeSySBupr1FM72XDaVSIsmBEe7sDYCHHwlI9Jb2w==" }, "@cspell/dict-cryptocurrencies": { "version": "5.0.5", @@ -1100,9 +1115,9 @@ "integrity": "sha512-xoiGnULEcWdodXI6EwVyqpZmpOoh8RA2Xk9BNdR7DLamV/QMvEYn8KJ7NlRiTSauJKPNkHHQ5EVHRM6sTS7jdg==" }, "@cspell/dict-data-science": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@cspell/dict-data-science/-/dict-data-science-2.0.11.tgz", - "integrity": "sha512-Dt+83nVCcF+dQyvFSaZjCKt1H5KbsVJFtH2X7VUfmIzQu8xCnV1fUmkhBzGJ+NiFs99Oy9JA6I9EjeqExzXk7g==" + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@cspell/dict-data-science/-/dict-data-science-2.0.12.tgz", + "integrity": "sha512-vI/mg6cI28IkFcpeINS7cm5M9HWemmXSTnxJiu3nmc4VAGx35SXIEyuLGBcsVzySvDablFYf4hsEpmg1XpVsUQ==" }, "@cspell/dict-django": { "version": "4.1.5", @@ -1190,9 +1205,9 @@ "integrity": "sha512-ib8SA5qgftExpYNjWhpYIgvDsZ/0wvKKxSP+kuSkkak520iPvTJumEpIE+qPcmJQo4NzdKMN8nEfaeci4OcFAQ==" }, "@cspell/dict-html": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-4.0.12.tgz", - "integrity": "sha512-JFffQ1dDVEyJq6tCDWv0r/RqkdSnV43P2F/3jJ9rwLgdsOIXwQbXrz6QDlvQLVvNSnORH9KjDtenFTGDyzfCaA==" + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-4.0.13.tgz", + "integrity": "sha512-vHzk2xfqQYPvoXtQtywa6ekIonPrUEwe2uftjry3UNRNl89TtzLJVSkiymKJ3WMb+W/DwKXKIb1tKzcIS8ccIg==" }, "@cspell/dict-html-symbol-entities": { "version": "4.0.4", @@ -1240,9 +1255,9 @@ "integrity": "sha512-4vrVt7bGiK8Rx98tfRbYo42Xo2IstJkAF4tLLDMNQLkQ86msDlYSKG1ZCk8Abg+EdNcFAjNhXIiNO+w4KflGAQ==" }, "@cspell/dict-markdown": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/@cspell/dict-markdown/-/dict-markdown-2.0.12.tgz", - "integrity": "sha512-ufwoliPijAgWkD/ivAMC+A9QD895xKiJRF/fwwknQb7kt7NozTLKFAOBtXGPJAB4UjhGBpYEJVo2elQ0FCAH9A==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@cspell/dict-markdown/-/dict-markdown-2.0.13.tgz", + "integrity": "sha512-rFeGikf+lVlywEp7giATUfi8myFeee6jqgbUgtdIdl/OBmRBPe5m7mKNk7yMItMZe8ICrwMxFwJy5OeTnrr6QA==", "requires": {} }, "@cspell/dict-monkeyc": { @@ -1256,9 +1271,9 @@ "integrity": "sha512-AirZcN2i84ynev3p2/1NCPEhnNsHKMz9zciTngGoqpdItUb2bDt1nJBjwlsrFI78GZRph/VaqTVFwYikmncpXg==" }, "@cspell/dict-npm": { - "version": "5.2.22", - "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.2.22.tgz", - "integrity": "sha512-bepGmmRv7KmxULqfw88G9wxkpIAQA96YyrfKpfg4RHnQLxpmzoRnZGtK5S9JH7Hlf5LEd1gkOF7dtCE6cek67w==" + "version": "5.2.25", + "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.2.25.tgz", + "integrity": "sha512-jxhVxM3+ilxbum/N2ejAvVuvet1OrGeW1fD7GagAkHU/2zlzINZkJLDtXk6v1WHUjigfhiAsois3puobv/2A1A==" }, "@cspell/dict-php": { "version": "4.1.0", @@ -1276,11 +1291,11 @@ "integrity": "sha512-cJEOs901H13Pfy0fl4dCD1U+xpWIMaEPq8MeYU83FfDZvellAuSo4GqWCripfIqlhns/L6+UZEIJSOZnjgy7Wg==" }, "@cspell/dict-python": { - "version": "4.2.21", - "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.2.21.tgz", - "integrity": "sha512-M9OgwXWhpZqEZqKU2psB2DFsT8q5SwEahkQeIpNIRWIErjwG7I9yYhhfvPz6s5gMCMhhb3hqcPJTnmdgqGrQyg==", + "version": "4.2.23", + "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.2.23.tgz", + "integrity": "sha512-c0C//tmG4PZWeONtTBPXa6q0ylfz3/BgEcHAR1L0BPWjNUIzTyx9J+hEIUCPYf7eAPeYjaDuTvYlg11igXXE4Q==", "requires": { - "@cspell/dict-data-science": "^2.0.11" + "@cspell/dict-data-science": "^2.0.12" } }, "@cspell/dict-r": { @@ -1309,9 +1324,9 @@ "integrity": "sha512-WqOUvnwcHK1X61wAfwyXq04cn7KYyskg90j4lLg3sGGKMW9Sq13hs91pqrjC44Q+lQLgCobrTkMDw9Wyl9nRFA==" }, "@cspell/dict-software-terms": { - "version": "5.1.13", - "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-5.1.13.tgz", - "integrity": "sha512-bmWMOpqzCmmKFHM9hFC6o+GP20t2+uTuwksR3a6crHQqvNv3revzwQHorsWvSYx75xsdcvRYrAz7PqPEV/FG1g==" + "version": "5.1.15", + "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-5.1.15.tgz", + "integrity": "sha512-93VqazVvVtHuKY7seGxbfdtrnPBgZ/hZ/NmFFkBRhkRL6NavaQ6U2QsHpnlVEZN5km3DmaQy1X4ZcvNoSTK/ZQ==" }, "@cspell/dict-sql": { "version": "2.2.1", @@ -1349,28 +1364,33 @@ "integrity": "sha512-XibBIxBlVosU06+M6uHWkFeT0/pW5WajDRYdXG2CgHnq85b0TI/Ks0FuBJykmsgi2CAD3Qtx8UHFEtl/DSFnAQ==" }, "@cspell/dynamic-import": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-9.3.2.tgz", - "integrity": "sha512-au7FyuIHUNI2r9sO3pUBKVTeD/v7c9x/nPUStaAK1bG4rdKt4w+/jUY2IaldAraW5w29z528BboXbiV87SM1kw==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-9.4.0.tgz", + "integrity": "sha512-d2fjLjzrKGUIn5hWK8gMuyAh2pqXSxBqOHpU1jR3jxbrO3MilunKNijaSstv7CZn067Jpc36VfaKQodaXNZzUA==", "requires": { - "@cspell/url": "9.3.2", + "@cspell/url": "9.4.0", "import-meta-resolve": "^4.2.0" } }, "@cspell/filetypes": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-9.3.2.tgz", - "integrity": "sha512-0bUxQlmJPRHZrRQD7adbc4lFizO8tGD/6+1cBgU3kV3+NVrpr12y4jU8twCSChhYibZyPr7bnvhkM3cQgb8RzA==" + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-9.4.0.tgz", + "integrity": "sha512-RMrYHkvPF0tHVFM+T4voEhX9sfYQrd/mnNbf6+O4CWUyLCz4NQ5H9yOgEIJwEcLu4y3NESGXFef/Jn5xo0CUfg==" }, "@cspell/strong-weak-map": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-9.3.2.tgz", - "integrity": "sha512-pFcmOTWCoFMRETb9PCkCmaiZiLb5i2qOZmGH/p/tFEH8kIYhMGfhaulnXwKwS+Ke6PKceQd2YL98bGmo8hL4aQ==" + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-9.4.0.tgz", + "integrity": "sha512-ui7mlXYmqElS/SmRubPBNWdkQVWgWbB6rjCurc+0owYXlnweItAMHTxC8mCWM/Au22SF1dB/JR8QBELFXLkTjQ==" }, "@cspell/url": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@cspell/url/-/url-9.3.2.tgz", - "integrity": "sha512-TobUlZl7Z7VehhNOMNAg1ABuGizieseftlG94OZJ934JptOhK8TC/1o2ldKrbDH50jyt6E7rPTMV2BW/vWuTzQ==" + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/url/-/url-9.4.0.tgz", + "integrity": "sha512-nt88P6m20AaVbqMxsyPf8KqyWPaFEW2UANi0ijBxc2xTkD2KiUovxfZUYW6NMU9XBYZlovT5LztkEhst2yBcSA==" + }, + "ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==" }, "array-timsort": { "version": "1.0.3", @@ -1425,24 +1445,25 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "cspell": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell/-/cspell-9.3.2.tgz", - "integrity": "sha512-3xFyVSTYrYa/QJzLfzsCRMkMXqOsytP8E26DuGrVMJQoLPFmbOXNNtnMu4wrtr17QVloxpvutW77U4vb2L/LDQ==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell/-/cspell-9.4.0.tgz", + "integrity": "sha512-ZvXO+EY/G0/msu7jwRiVk0sXL/zB7DMJLBvjSUrK82uVbDoDxHwXxUuOz2UVnk2+J61//ldIZrjxVK8KMvaJlg==", "requires": { - "@cspell/cspell-json-reporter": "9.3.2", - "@cspell/cspell-pipe": "9.3.2", - "@cspell/cspell-types": "9.3.2", - "@cspell/dynamic-import": "9.3.2", - "@cspell/url": "9.3.2", + "@cspell/cspell-json-reporter": "9.4.0", + "@cspell/cspell-pipe": "9.4.0", + "@cspell/cspell-types": "9.4.0", + "@cspell/dynamic-import": "9.4.0", + "@cspell/url": "9.4.0", + "ansi-regex": "^6.2.2", "chalk": "^5.6.2", "chalk-template": "^1.1.2", "commander": "^14.0.2", - "cspell-config-lib": "9.3.2", - "cspell-dictionary": "9.3.2", - "cspell-gitignore": "9.3.2", - "cspell-glob": "9.3.2", - "cspell-io": "9.3.2", - "cspell-lib": "9.3.2", + "cspell-config-lib": "9.4.0", + "cspell-dictionary": "9.4.0", + "cspell-gitignore": "9.4.0", + "cspell-glob": "9.4.0", + "cspell-io": "9.4.0", + "cspell-lib": "9.4.0", "fast-json-stable-stringify": "^2.1.0", "flatted": "^3.3.3", "semver": "^7.7.3", @@ -1450,84 +1471,84 @@ } }, "cspell-config-lib": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-9.3.2.tgz", - "integrity": "sha512-zXhmA4rqgWQRTVijI+g/mgiep76TvTO4d+P3CHwcqLG57BKVzoW+jkO4qDLC+Neh4b8+CcNWEIr3w16BfuEJAA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-9.4.0.tgz", + "integrity": "sha512-CvQKSmK/DRIf3LpNx2sZth65pHW2AHngZqLkH3DTwnAPbiCAsE0XvCrVhvDfCNu/6uJIaa+NVHSs8GOf//DHBQ==", "requires": { - "@cspell/cspell-types": "9.3.2", + "@cspell/cspell-types": "9.4.0", "comment-json": "^4.4.1", "smol-toml": "^1.5.2", - "yaml": "^2.8.1" + "yaml": "^2.8.2" } }, "cspell-dictionary": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-9.3.2.tgz", - "integrity": "sha512-E3YhOhZzZt1a+AEbFV2B3THCyZ576PDg0mDNUDrU1Y65SyIhf4DC6itfPoAb6R3FI/DI218RqWZg/FTT8lJ2gA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-9.4.0.tgz", + "integrity": "sha512-c2qscanRZChoHZFYI7KpvBMdy8i6wNwl2EflcNRrFiFOq67t9CgxLe54PafaqhrHGpBc8nElaZKciLvjj6Uscw==", "requires": { - "@cspell/cspell-pipe": "9.3.2", - "@cspell/cspell-types": "9.3.2", - "cspell-trie-lib": "9.3.2", + "@cspell/cspell-pipe": "9.4.0", + "@cspell/cspell-types": "9.4.0", + "cspell-trie-lib": "9.4.0", "fast-equals": "^5.3.3" } }, "cspell-gitignore": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-9.3.2.tgz", - "integrity": "sha512-G2bLR+Dfb9GX4Sdm75GfCCa9V/sQYkRbLckuCuVmJxvcDB0xfczAtb6TfAXIziF3oUI6cOB1g+PoNLWBelcK5w==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-9.4.0.tgz", + "integrity": "sha512-HMrzLmJBUMSpaMMkltlTAz/aVOrHxixyhKfg5WbFCJ5JYZO6Qu3/JU3wRoOFoud9449wRjLkvrGmbbL2+vO6Lw==", "requires": { - "@cspell/url": "9.3.2", - "cspell-glob": "9.3.2", - "cspell-io": "9.3.2" + "@cspell/url": "9.4.0", + "cspell-glob": "9.4.0", + "cspell-io": "9.4.0" } }, "cspell-glob": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-9.3.2.tgz", - "integrity": "sha512-TuSupENEKyOCupOUZ3vnPxaTOghxY/rD1JIkb8e5kjzRprYVilO/rYqEk/52iLwJVd+4Npe8fNhR3KhU7u/UUg==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-9.4.0.tgz", + "integrity": "sha512-Q87Suj9oXrhoKck15qWorCizBjMNxG/k3NjnhKIAMrF+PdUa1Mpl0MOD+hqV1Wvwh1UHcIMYCP3bR3XpBbNx+Q==", "requires": { - "@cspell/url": "9.3.2", + "@cspell/url": "9.4.0", "picomatch": "^4.0.3" } }, "cspell-grammar": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-9.3.2.tgz", - "integrity": "sha512-ysonrFu9vJvF/derDlEjUfmvLeCfNOWPh00t6Yh093AKrJFoWQiyaS/5bEN/uB5/n1sa4k3ItnWvuTp3+YuZsA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-9.4.0.tgz", + "integrity": "sha512-ie7OQ4Neflo+61bMzoLR7GtlZfMBAm2KL1U4iNqh15wUE5fDbvXeN15H5lu+gcO8BwYvC5wxZknw1x62/J8+3Q==", "requires": { - "@cspell/cspell-pipe": "9.3.2", - "@cspell/cspell-types": "9.3.2" + "@cspell/cspell-pipe": "9.4.0", + "@cspell/cspell-types": "9.4.0" } }, "cspell-io": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-9.3.2.tgz", - "integrity": "sha512-ahoULCp0j12TyXXmIcdO/7x65A/2mzUQO1IkOC65OXEbNT+evt0yswSO5Nr1F6kCHDuEKc46EZWwsYAzj78pMg==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-9.4.0.tgz", + "integrity": "sha512-8w30dqlO54H9w6WGlvZhHI5kytVbF3bYPqKJAZLWKEO36L2mdpf6/abx/FA4yVLJ56wmH1x0N0ZK32wNRl5C6A==", "requires": { - "@cspell/cspell-service-bus": "9.3.2", - "@cspell/url": "9.3.2" + "@cspell/cspell-service-bus": "9.4.0", + "@cspell/url": "9.4.0" } }, "cspell-lib": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-9.3.2.tgz", - "integrity": "sha512-kdk11kib68zNANNICuOA8h4oA9kENQUAdeX/uvT4+7eHbHHV8WSgjXm4k4o/pRIbg164UJTX/XxKb/65ftn5jw==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-9.4.0.tgz", + "integrity": "sha512-ajjioE59IEDNUPawfaBpiMfGC32iKPkuYd4T9ftguuef8VvyKRifniiUi1nxwGgAhzSfxHvWs7qdT+29Pp5TMQ==", "requires": { - "@cspell/cspell-bundled-dicts": "9.3.2", - "@cspell/cspell-pipe": "9.3.2", - "@cspell/cspell-resolver": "9.3.2", - "@cspell/cspell-types": "9.3.2", - "@cspell/dynamic-import": "9.3.2", - "@cspell/filetypes": "9.3.2", - "@cspell/strong-weak-map": "9.3.2", - "@cspell/url": "9.3.2", + "@cspell/cspell-bundled-dicts": "9.4.0", + "@cspell/cspell-pipe": "9.4.0", + "@cspell/cspell-resolver": "9.4.0", + "@cspell/cspell-types": "9.4.0", + "@cspell/dynamic-import": "9.4.0", + "@cspell/filetypes": "9.4.0", + "@cspell/strong-weak-map": "9.4.0", + "@cspell/url": "9.4.0", "clear-module": "^4.1.2", - "cspell-config-lib": "9.3.2", - "cspell-dictionary": "9.3.2", - "cspell-glob": "9.3.2", - "cspell-grammar": "9.3.2", - "cspell-io": "9.3.2", - "cspell-trie-lib": "9.3.2", + "cspell-config-lib": "9.4.0", + "cspell-dictionary": "9.4.0", + "cspell-glob": "9.4.0", + "cspell-grammar": "9.4.0", + "cspell-io": "9.4.0", + "cspell-trie-lib": "9.4.0", "env-paths": "^3.0.0", "gensequence": "^8.0.8", "import-fresh": "^3.3.1", @@ -1538,12 +1559,12 @@ } }, "cspell-trie-lib": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-9.3.2.tgz", - "integrity": "sha512-1Af7Mq9jIccFQyJl/ZCcqQbtJwuDqpQVkk8xfs/92x4OI6gW1iTVRMtsrh0RTw1HZoR8aQD7tRRCiLPf/D+UiQ==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-9.4.0.tgz", + "integrity": "sha512-bySJTm8XDiJAoC1MDo4lE/KpSNxydo13ZETC8TF7Hb3rbWI1c6o5eZ4+i/tkG3M94OvKV91+MeAvoMCe7GGgAw==", "requires": { - "@cspell/cspell-pipe": "9.3.2", - "@cspell/cspell-types": "9.3.2", + "@cspell/cspell-pipe": "9.4.0", + "@cspell/cspell-types": "9.4.0", "gensequence": "^8.0.8" } }, @@ -1678,9 +1699,9 @@ "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==" }, "yaml": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", - "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==" + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz", + "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==" } } } diff --git a/eng/common/spelling/package.json b/eng/common/spelling/package.json index 5e906545311f..f341adf529b1 100644 --- a/eng/common/spelling/package.json +++ b/eng/common/spelling/package.json @@ -2,6 +2,6 @@ "name": "cspell-version-pin", "version": "1.0.0", "dependencies": { - "cspell": "^9.3.2" + "cspell": "^9.4.0" } } From 4f1f24488da6441d85bc2744846883a04025095e Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 4 Dec 2025 15:47:02 -0800 Subject: [PATCH 104/186] Sync eng/common directory with azure-sdk-tools for PR 13202 (#47465) * Added optional artifact list to filter the package info to be returned * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * return full package info if the input artifact list is empty * Fixed hashset issue * Added artifacts parameter --------- Co-authored-by: ray chen <raychen@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../steps/daily-dev-build-variable.yml | 2 + .../scripts/Save-Package-Properties.ps1 | 41 ++++++++++++++++++- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/eng/common/pipelines/templates/steps/daily-dev-build-variable.yml b/eng/common/pipelines/templates/steps/daily-dev-build-variable.yml index 37efd0bd0312..3191a4928a27 100644 --- a/eng/common/pipelines/templates/steps/daily-dev-build-variable.yml +++ b/eng/common/pipelines/templates/steps/daily-dev-build-variable.yml @@ -2,6 +2,7 @@ # is used when this pipeline is going to be generating and publishing daily dev builds. parameters: ServiceDirectory: '' + Artifacts: [] Condition: succeeded() steps: - ${{if ne(parameters.ServiceDirectory, '')}}: @@ -11,6 +12,7 @@ steps: arguments: > -ServiceDirectory ${{parameters.ServiceDirectory}} -OutDirectory $(Build.ArtifactStagingDirectory)/PackageInfo + -artifactList @('${{ replace(convertToJson(parameters.Artifacts), '''', '`''') }}' | ConvertFrom-Json | Select-Object -ExpandProperty name) pwsh: true workingDirectory: $(Pipeline.Workspace) displayName: Dump Package properties diff --git a/eng/common/scripts/Save-Package-Properties.ps1 b/eng/common/scripts/Save-Package-Properties.ps1 index 7734f9ec3cba..deccaa553c0e 100644 --- a/eng/common/scripts/Save-Package-Properties.ps1 +++ b/eng/common/scripts/Save-Package-Properties.ps1 @@ -30,7 +30,11 @@ package properties JSON file. If the package properties JSON file already exists, read the Version property from the existing package properties JSON file and set that as the Version property for the new output. This has the effect of "adding" a DevVersion property to the file which could be different from the -Verison property in that file. +Version property in that file. + +.PARAMETER artifactList +Optional array of artifact names to filter the package properties. Only packages +with artifact names matching entries in this list will be processed. #> [CmdletBinding()] @@ -39,7 +43,8 @@ Param ( [Parameter(Mandatory = $True)] [string] $outDirectory, [string] $prDiff, - [switch] $addDevVersion + [switch] $addDevVersion, + [array] $artifactList ) . (Join-Path $PSScriptRoot common.ps1) @@ -132,6 +137,38 @@ if (-not (Test-Path -Path $outDirectory)) New-Item -ItemType Directory -Force -Path $outDirectory | Out-Null } +if ($artifactList) +{ + # Filter out null, empty, or whitespace-only entries + $filteredArtifacts = @($artifactList | Where-Object { -not [string]::IsNullOrWhiteSpace($_) }) + + if ($filteredArtifacts.Count -eq 0) + { + Write-Warning "Artifact list contains no valid entries" + } + else + { + Write-Host "Filtering package properties to match artifact list: $($filteredArtifacts -join ', ')" + $artifactSet = New-Object 'System.Collections.Generic.HashSet[string]' ([System.StringComparer]::OrdinalIgnoreCase) + foreach ($artifact in $filteredArtifacts) { + $artifactSet.Add($artifact) | Out-Null + } + + # Warn about packages missing ArtifactName property + $missingArtifactName = $allPackageProperties | Where-Object { $_.PSObject.Properties.Name -notcontains 'ArtifactName' } + foreach ($pkg in $missingArtifactName) { + Write-Warning "Package '$($pkg.PackageName)' does not have an 'ArtifactName' property and will be excluded from artifact filtering." + } + $allPackageProperties = $allPackageProperties | Where-Object { $_.ArtifactName -and $artifactSet.Contains($_.ArtifactName) } + + if (!$allPackageProperties) + { + Write-Error "No packages found matching the provided artifact list" + exit 1 + } + } +} + foreach ($pkg in $allPackageProperties) { if ($pkg.Name) From 7a1fa56b0a8bb0f17b82b148c48cde72d19885a2 Mon Sep 17 00:00:00 2001 From: Ray Chen <raychen@microsoft.com> Date: Thu, 4 Dec 2025 15:47:28 -0800 Subject: [PATCH 105/186] Create package info only for the selected release artifacts (#47460) * Filter packages when create package info * added common script change for testing * Added package filter to dump package property step * Use release artifact input in the validating package step * Reverted change on common script * Reverted change to common template --- eng/pipelines/templates/jobs/ci.yml | 4 +++- .../templates/stages/archetype-sdk-client-patch.yml | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/templates/jobs/ci.yml b/eng/pipelines/templates/jobs/ci.yml index 81a0c1cc6ca8..a44742b8a082 100644 --- a/eng/pipelines/templates/jobs/ci.yml +++ b/eng/pipelines/templates/jobs/ci.yml @@ -159,6 +159,7 @@ jobs: - template: /eng/common/pipelines/templates/steps/daily-dev-build-variable.yml parameters: ServiceDirectory: ${{parameters.ServiceDirectory}} + Artifacts: ${{parameters.ReleaseArtifacts}} - task: PowerShell@2 displayName: Setup Dev versioning @@ -179,6 +180,7 @@ jobs: -ServiceDirectory ${{parameters.ServiceDirectory}} -OutDirectory $(Build.ArtifactStagingDirectory)/PackageInfo -AddDevVersion + -artifactList @('${{ replace(convertToJson(parameters.ReleaseArtifacts), '''', '`''') }}' | ConvertFrom-Json | Select-Object -ExpandProperty name) pwsh: true workingDirectory: $(Pipeline.Workspace) displayName: Update package properties with dev version @@ -274,7 +276,7 @@ jobs: - template: /eng/common/pipelines/templates/steps/validate-all-packages.yml parameters: PackageInfoFiles: - - ${{ each artifact in parameters.Artifacts }}: + - ${{ each artifact in parameters.ReleaseArtifacts }}: - $(Build.ArtifactStagingDirectory)/PackageInfo/${{artifact.name}}.json - template: /eng/pipelines/templates/steps/post-job-cleanup.yml diff --git a/eng/pipelines/templates/stages/archetype-sdk-client-patch.yml b/eng/pipelines/templates/stages/archetype-sdk-client-patch.yml index fef0435d4538..571e5fbb6e56 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client-patch.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client-patch.yml @@ -104,8 +104,14 @@ extends: # generate_from_source_pom script above. - pwsh: | $ServiceDirs = '$(ServiceDirectories)' + $ArtifactList = @('${{ replace(convertToJson(parameters.Artifacts), '''', '`''') }}' ` + | ConvertFrom-Json ` + | Select-Object -ExpandProperty name) foreach($ServiceDir in $ServiceDirs.Split(',')) { - $(Build.SourcesDirectory)/eng/common/scripts/Save-Package-Properties.ps1 -ServiceDirectory $ServiceDir -OutDirectory $(Build.ArtifactStagingDirectory)/PackageInfo + $(Build.SourcesDirectory)/eng/common/scripts/Save-Package-Properties.ps1 ` + -ServiceDirectory $ServiceDir ` + -OutDirectory $(Build.ArtifactStagingDirectory)/PackageInfo ` + -artifactList $ArtifactList } workingDirectory: $(Pipeline.Workspace) displayName: "Save Package Properties" From 353481dead202d0cdba6706f25a6b57f7f870e51 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Fri, 5 Dec 2025 10:36:59 +0800 Subject: [PATCH 106/186] fix --- eng/versioning/external_dependencies.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index f1635ed7d56f..e8991c438080 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -8,7 +8,7 @@ # Format; # groupId:artifactId;dependency-version ch.qos.logback:logback-classic;1.3.14 -com.azure:azure-servicebus-jms;2.1.0 +com.azure:azure-servicebus-jms;2.0.0 com.azure.tools:azure-autorest-customization;1.0.0-beta.11 com.fasterxml:aalto-xml;1.3.3 com.fasterxml.jackson.core:jackson-annotations;2.18.4 From 77268f01996b844f20a532f75c2ee070e60c19ab Mon Sep 17 00:00:00 2001 From: Copilot <198982749+copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:51:41 +0800 Subject: [PATCH 107/186] fix --- eng/versioning/external_dependencies.txt | 2 +- sdk/spring/spring-cloud-azure-autoconfigure/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index e8991c438080..f1635ed7d56f 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -8,7 +8,7 @@ # Format; # groupId:artifactId;dependency-version ch.qos.logback:logback-classic;1.3.14 -com.azure:azure-servicebus-jms;2.0.0 +com.azure:azure-servicebus-jms;2.1.0 com.azure.tools:azure-autorest-customization;1.0.0-beta.11 com.fasterxml:aalto-xml;1.3.3 com.fasterxml.jackson.core:jackson-annotations;2.18.4 diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index 2c9bbd2838dc..bc50d277728b 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -547,7 +547,7 @@ <rules> <bannedDependencies> <includes> - <include>com.azure:azure-servicebus-jms:[2.0.0]</include> <!-- {x-include-update;com.azure:azure-servicebus-jms;external_dependency} --> + <include>com.azure:azure-servicebus-jms:[2.1.0]</include> <!-- {x-include-update;com.azure:azure-servicebus-jms;external_dependency} --> <include>com.mysql:mysql-connector-j:[9.5.0]</include> <!-- {x-include-update;springboot4_com.mysql:mysql-connector-j;external_dependency} --> <include>com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.20.1]</include> <!-- {x-include-update;springboot4_com.fasterxml.jackson.datatype:jackson-datatype-jsr310;external_dependency} --> <include>io.lettuce:lettuce-core:[6.8.1.RELEASE]</include> <!-- {x-include-update;springboot4_io.lettuce:lettuce-core;external_dependency} --> From c2a446fd0974ef6800eb61a56c35b047810b31fd Mon Sep 17 00:00:00 2001 From: Weidong Xu <weidxu@microsoft.com> Date: Fri, 5 Dec 2025 10:50:36 +0800 Subject: [PATCH 108/186] eng, automation, autorest.java 4.1.62 (#47466) --- eng/automation/parameters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/automation/parameters.py b/eng/automation/parameters.py index a3b139c1ddd0..3f74af4f9194 100755 --- a/eng/automation/parameters.py +++ b/eng/automation/parameters.py @@ -17,7 +17,7 @@ SDK_ROOT = "../../" # related to file dir AUTOREST_CORE_VERSION = "3.9.7" -AUTOREST_JAVA = "@autorest/java@4.1.60" +AUTOREST_JAVA = "@autorest/java@4.1.62" DEFAULT_VERSION = "1.0.0-beta.1" GROUP_ID = "com.azure.resourcemanager" API_SPECS_FILE = "api-specs.yaml" From 10051b52e0665a4765febad8db5bd290149d2a40 Mon Sep 17 00:00:00 2001 From: Weidong Xu <weidxu@microsoft.com> Date: Fri, 5 Dec 2025 10:50:53 +0800 Subject: [PATCH 109/186] eng, remove the mitigation after emitter fix (#47456) --- eng/scripts/Compare-CurrentToCodegeneration.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eng/scripts/Compare-CurrentToCodegeneration.ps1 b/eng/scripts/Compare-CurrentToCodegeneration.ps1 index 777d01d640e5..b4893bb8745f 100644 --- a/eng/scripts/Compare-CurrentToCodegeneration.ps1 +++ b/eng/scripts/Compare-CurrentToCodegeneration.ps1 @@ -181,8 +181,7 @@ $generateScript = { } # Update code snippets before comparing the diff - # TODO: remove spotless:apply when issue fixed in emitter - $mvnOutput = (& mvn --no-transfer-progress codesnippet:update-codesnippet spotless:apply 2>&1) + $mvnOutput = (& mvn --no-transfer-progress codesnippet:update-codesnippet 2>&1) if ($LastExitCode -ne 0) { Write-Host "$separatorBar`nError updating TypeSpec codesnippets in directory $directory`n$([String]::Join("`n", $mvnOutput))`n$separatorBar" throw From f3b6d02fdf82edb546d3c9be5ef26aa6459dfb5c Mon Sep 17 00:00:00 2001 From: v-huizhu2 <v-huizhu2@microsoft.com> Date: Fri, 5 Dec 2025 13:42:26 +0800 Subject: [PATCH 110/186] mgmt monitor , fix live test failures (#47427) * test(monitor): update test configurations and add VM size specifications - Updated region from US_WEST to US_WEST2 in multiple test files - Added disableSharedKeyAccess() to various resource creations - Specified VirtualMachineSizeTypes.STANDARD_A1_V2 for VM instances - Imported VirtualMachineSizeTypes in relevant test classes * test(monitor): update autoscale tests to reflect email notification changes - Removed admin and co-admin email notifications from autoscale settings - Updated assertions to check for disabled email notifications - Adjusted test cases to align with new autoscale profile configurations - Verified autoscale enabled/disabled states in multiple scenarios - Ensured custom email notifications remain functional after updates - Cleaned up redundant autoscale profile removal logic * test(monitor): update tests for Azure Monitor management changes - Add ZoneOffset import for UTC time handling in AlertsTests - Remove deprecated admin/co-admin email notification assertions in AutoscaleTests - Comment out unsupported EventHub namespace creation in DiagnosticSettingsTests - Update subscription ID format with leading slash in DiagnosticSettingsTests - Set retention days to 0 for diagnostic settings due to policy changes - Disable test requiring Microsoft Entra-only authentication for Azure SQL Server * fix(monitor): update diagnostic settings test with correct retention days - Change retention days from 7 to 0 in logs and metrics configuration - Comment out invalid update operation that removes all data sinks - Remove assertion for storage account ID null check - Update test logic to align with diagnostic settings requirements * test(monitor): disable flaky test due to Azure SQL Server authentication requirement - Added @Disabled annotation to canListEventsAndMetricsWithWhiteSpaceInResourceId test - Included explanatory message about Microsoft Entra-only authentication requirement - Preserved existing @DoNotRecord annotation behavior - Test will be re-enabled once Azure SQL Server supports proper authentication during creation * fix(monitor): prevent deletion error when resource group not found - Add check to verify resource group existence before deletion - Prevent IllegalArgumentException when resource group does not exist - Improve cleanup method reliability in ActionGroupsTests * chore(assets): update tag reference for azure-resourcemanager-monitor - Updated tag from fb1a47b010 to 28c5828c2d - Maintains consistency with latest asset changes * fix(tests): improve resource cleanup and add documentation link - Update resource group deletion logic to check existence before attempting removal - Add Microsoft documentation link for diagnostic settings storage lifecycle policy - Prevent potential errors during test cleanup phase - Clarify comments for better maintainability * test(monitor): remove unused event hubs imports in diagnostic settings tests - Removed unused EventHubNamespace import - Removed unused EventHubNamespaceAuthorizationRule import - Clean up import statements for better code readability * test(monitor): update autoscale tests to remove co-admin email notification assertions - Removed assertions for co-admin email notification being disabled - Commented out failing assertion lines in autoscale test cases - Maintained existing test structure and other assertion logic * fix(tests): update diagnostic settings test to assert storage account ID - Uncomment and update assertion to verify storage account ID matches expected value - Ensure storage account ID is correctly set in diagnostic settings configuration - Maintain existing assertions for other diagnostic settings properties * test(monitor): update region to US_WEST3 in diagnostic settings tests - Changed region from US_WEST2 to US_WEST3 in DiagnosticSettingsTests - Updated region configuration in MonitorActivityAndMetricsTests - Ensured consistency across monitor-related test cases --- .../azure-resourcemanager-monitor/assets.json | 2 +- .../monitor/ActionGroupsTests.java | 5 +- .../resourcemanager/monitor/AlertsTests.java | 9 ++- .../monitor/AutoscaleTests.java | 24 ++++---- .../monitor/DiagnosticSettingsTests.java | 58 +++++++++++-------- .../MonitorActivityAndMetricsTests.java | 4 +- .../monitor/MonitorManagementTest.java | 2 + 7 files changed, 66 insertions(+), 38 deletions(-) diff --git a/sdk/monitor/azure-resourcemanager-monitor/assets.json b/sdk/monitor/azure-resourcemanager-monitor/assets.json index 6ff5d11b5c66..3cdfd2739b4e 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/assets.json +++ b/sdk/monitor/azure-resourcemanager-monitor/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/monitor/azure-resourcemanager-monitor", - "Tag": "java/monitor/azure-resourcemanager-monitor_fb1a47b010" + "Tag": "java/monitor/azure-resourcemanager-monitor_28c5828c2d" } diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/ActionGroupsTests.java b/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/ActionGroupsTests.java index fdad49f5f570..53048dea9781 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/ActionGroupsTests.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/ActionGroupsTests.java @@ -25,7 +25,10 @@ protected void initializeClients(HttpPipeline httpPipeline, AzureProfile profile @Override protected void cleanUpResources() { - resourceManager.resourceGroups().beginDeleteByName(rgName); + // Check if resource group exists before deletion to avoid errors. + if (resourceManager.resourceGroups().contain(rgName)) { + resourceManager.resourceGroups().beginDeleteByName(rgName); + } } @Test diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AlertsTests.java b/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AlertsTests.java index 88e6aa73efac..cbae41b98367 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AlertsTests.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AlertsTests.java @@ -9,6 +9,7 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.compute.models.KnownLinuxVirtualMachineImage; import com.azure.resourcemanager.compute.models.VirtualMachine; +import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; import com.azure.resourcemanager.monitor.models.ActionGroup; import com.azure.resourcemanager.monitor.models.ActivityLogAlert; import com.azure.resourcemanager.monitor.models.DynamicThresholdFailingPeriods; @@ -27,6 +28,7 @@ import java.time.Duration; import java.time.OffsetDateTime; +import java.time.ZoneOffset; import java.util.Arrays; import java.util.Iterator; @@ -56,6 +58,7 @@ public void canCRUDMetricAlerts() throws Exception { .withRegion(Region.US_EAST2) .withNewResourceGroup(rgName) .withOnlyHttpsTraffic() + .disableSharedKeyAccess() .create(); ActionGroup ag = monitorManager.actionGroups() @@ -338,6 +341,7 @@ public void canCRUDMultipleResourceMetricAlerts() throws Exception { .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_16_04_LTS) .withRootUsername(userName) .withSsh(sshPublicKey()) + .withSize(VirtualMachineSizeTypes.STANDARD_A1_V2) .create(); VirtualMachine vm2 = computeManager.virtualMachines() @@ -350,6 +354,7 @@ public void canCRUDMultipleResourceMetricAlerts() throws Exception { .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_16_04_LTS) .withRootUsername(userName) .withSsh(sshPublicKey()) + .withSize(VirtualMachineSizeTypes.STANDARD_A1_V2) .create(); MetricAlert ma = monitorManager.alertRules() @@ -378,7 +383,9 @@ public void canCRUDMultipleResourceMetricAlerts() throws Exception { Assertions.assertEquals(0, ma.dynamicAlertCriterias().size()); Assertions.assertEquals("Percentage CPU", ma.alertCriterias().get("Metric1").metricName()); - OffsetDateTime time30MinBefore = OffsetDateTime.now().minusMinutes(30); + // The date and time format should be: yyyy-dd-MMTHH:mm:ss.ffZ. For example: 2021-31-12T11:00:00.00Z. + OffsetDateTime time30MinBefore = OffsetDateTime.now(ZoneOffset.UTC).minusMinutes(30).withNano(0); + ma.update() .withDescription("This alert rule is for U3 - Multiple resource, dynamic criteria") .withoutAlertCriteria("Metric1") diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AutoscaleTests.java b/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AutoscaleTests.java index 89a5d501d733..527f2453bedc 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AutoscaleTests.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/AutoscaleTests.java @@ -95,8 +95,9 @@ public void canCRUDAutoscale() throws Exception { .attach() .withRecurrentSchedule("UTC", "12:13", DayOfWeek.FRIDAY) .attach() - .withAdminEmailNotification() - .withCoAdminEmailNotification() + // Sending email notifications to subscription administrator and coadministrators is not supported after April 3, 2024 due to Azure classic administrator retirement. + //.withAdminEmailNotification() + //.withCoAdminEmailNotification() .withCustomEmailsNotification("me@mycorp.com", "you@mycorp.com", "him@mycorp.com") .withAutoscaleDisabled() .create(); @@ -104,8 +105,8 @@ public void canCRUDAutoscale() throws Exception { Assertions.assertNotNull(setting); Assertions.assertEquals("somesettingZ", setting.name()); assertResourceIdEquals(servicePlan.id(), setting.targetResourceId()); - Assertions.assertTrue(setting.adminEmailNotificationEnabled()); - Assertions.assertTrue(setting.coAdminEmailNotificationEnabled()); + //Assertions.assertTrue(setting.adminEmailNotificationEnabled()); + //Assertions.assertTrue(setting.coAdminEmailNotificationEnabled()); Assertions.assertFalse(setting.autoscaleEnabled()); Assertions.assertEquals(3, setting.customEmailsNotification().size()); Assertions.assertEquals("me@mycorp.com", setting.customEmailsNotification().get(0)); @@ -206,8 +207,8 @@ public void canCRUDAutoscale() throws Exception { Assertions.assertNotNull(settingFromGet); Assertions.assertEquals("somesettingZ", settingFromGet.name()); assertResourceIdEquals(servicePlan.id(), settingFromGet.targetResourceId()); - Assertions.assertTrue(settingFromGet.adminEmailNotificationEnabled()); - Assertions.assertTrue(settingFromGet.coAdminEmailNotificationEnabled()); + //Assertions.assertTrue(settingFromGet.adminEmailNotificationEnabled()); + //Assertions.assertTrue(settingFromGet.coAdminEmailNotificationEnabled()); Assertions.assertFalse(settingFromGet.autoscaleEnabled()); Assertions.assertEquals(3, settingFromGet.customEmailsNotification().size()); Assertions.assertEquals("me@mycorp.com", settingFromGet.customEmailsNotification().get(0)); @@ -337,14 +338,15 @@ public void canCRUDAutoscale() throws Exception { .parent() .withoutAutoscaleProfile("AutoScaleProfile1") .withAutoscaleEnabled() - .withoutCoAdminEmailNotification() + // Sending email notifications to subscription administrator and coadministrators is not supported after April 3, 2024 due to Azure classic administrator retirement. + //.withoutCoAdminEmailNotification() .apply(); Assertions.assertNotNull(setting); Assertions.assertEquals("somesettingZ", setting.name()); assertResourceIdEquals(servicePlan.id(), setting.targetResourceId()); - Assertions.assertTrue(setting.adminEmailNotificationEnabled()); - Assertions.assertFalse(setting.coAdminEmailNotificationEnabled()); + //Assertions.assertTrue(setting.adminEmailNotificationEnabled()); + //Assertions.assertFalse(setting.coAdminEmailNotificationEnabled()); Assertions.assertTrue(setting.autoscaleEnabled()); Assertions.assertEquals(3, setting.customEmailsNotification().size()); Assertions.assertEquals("me@mycorp.com", setting.customEmailsNotification().get(0)); @@ -454,8 +456,8 @@ public void canCRUDAutoscale() throws Exception { Assertions.assertNotNull(settingFromGet); Assertions.assertEquals("somesettingZ", settingFromGet.name()); assertResourceIdEquals(servicePlan.id(), settingFromGet.targetResourceId()); - Assertions.assertTrue(settingFromGet.adminEmailNotificationEnabled()); - Assertions.assertFalse(settingFromGet.coAdminEmailNotificationEnabled()); + //Assertions.assertTrue(settingFromGet.adminEmailNotificationEnabled()); + //Assertions.assertFalse(settingFromGet.coAdminEmailNotificationEnabled()); Assertions.assertTrue(settingFromGet.autoscaleEnabled()); Assertions.assertEquals(3, settingFromGet.customEmailsNotification().size()); Assertions.assertEquals("me@mycorp.com", settingFromGet.customEmailsNotification().get(0)); diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/DiagnosticSettingsTests.java b/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/DiagnosticSettingsTests.java index bbbf351e1b6b..9943bd94267e 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/DiagnosticSettingsTests.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/DiagnosticSettingsTests.java @@ -8,8 +8,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.compute.models.VirtualMachine; -import com.azure.resourcemanager.eventhubs.models.EventHubNamespace; -import com.azure.resourcemanager.eventhubs.models.EventHubNamespaceAuthorizationRule; import com.azure.resourcemanager.keyvault.models.Vault; import com.azure.resourcemanager.monitor.fluent.models.DiagnosticSettingsResourceInner; import com.azure.resourcemanager.monitor.models.DiagnosticSetting; @@ -23,6 +21,7 @@ import com.azure.resourcemanager.sql.models.SqlElasticPool; import com.azure.resourcemanager.storage.models.StorageAccount; import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import java.time.Duration; @@ -55,7 +54,7 @@ protected void cleanUpResources() { public void canCRUDDiagnosticSettings() { // make sure there exists a VM - Region region = Region.US_WEST; + Region region = Region.US_WEST3; ResourceGroup resourceGroup = resourceManager.resourceGroups().define(rgName).withRegion(region).create(); String vmName = generateRandomResourceName("jMonitorVm_", 18); VirtualMachine vm = ensureVM(region, resourceGroup, vmName, "10.0.0.0/28"); @@ -73,18 +72,21 @@ public void canCRUDDiagnosticSettings() { .withRegion(vm.region()) .withNewResourceGroup(rgName) .withTag("tag1", "value1") + .disableSharedKeyAccess() .create(); - EventHubNamespace namespace = eventHubManager.namespaces() - .define(ehName) - // EventHub should be in the same region as resource - .withRegion(vm.region()) - .withNewResourceGroup(rgName) - .withNewManageRule("mngRule1") - .withNewSendRule("sndRule1") - .create(); + // TODO(v-huizhu2): This request was denied due to internal policy. Local authentication methods are not allowed + // Will add back when local authentication is supported. + // EventHubNamespace namespace = eventHubManager.namespaces() + // .define(ehName) + // // EventHub should be in the same region as resource + // .withRegion(vm.region()) + // .withNewResourceGroup(rgName) + // .withNewManageRule("mngRule1") + // .withNewSendRule("sndRule1") + // .create(); - EventHubNamespaceAuthorizationRule evenHubNsRule = namespace.listAuthorizationRules().iterator().next(); + // EventHubNamespaceAuthorizationRule evenHubNsRule = namespace.listAuthorizationRules().iterator().next(); List<DiagnosticSettingsCategory> categories = monitorManager.diagnosticSettings().listCategoriesByResource(vm.id()); @@ -96,23 +98,25 @@ public void canCRUDDiagnosticSettings() { .define(dsName) .withResource(vm.id()) .withStorageAccount(sa.id()) - .withEventHub(evenHubNsRule.id()) - .withLogsAndMetrics(categories, Duration.ofMinutes(5), 7) + // .withEventHub(evenHubNsRule.id()) + .withLogsAndMetrics(categories, Duration.ofMinutes(5), 0) .create(); assertResourceIdEquals(vm.id(), setting.resourceId()); assertResourceIdEquals(sa.id(), setting.storageAccountId()); - assertResourceIdEquals(evenHubNsRule.id(), setting.eventHubAuthorizationRuleId()); + // assertResourceIdEquals(evenHubNsRule.id(), setting.eventHubAuthorizationRuleId()); Assertions.assertNull(setting.eventHubName()); Assertions.assertNull(setting.workspaceId()); Assertions.assertTrue(setting.logs().isEmpty()); Assertions.assertFalse(setting.metrics().isEmpty()); - setting.update().withoutStorageAccount().withoutLogs().apply(); + // At least one data sink needs to be specified. + // setting.update().withoutStorageAccount().withoutLogs().apply(); + setting.update().withoutLogs().apply(); assertResourceIdEquals(vm.id(), setting.resourceId()); - assertResourceIdEquals(evenHubNsRule.id(), setting.eventHubAuthorizationRuleId()); - Assertions.assertNull(setting.storageAccountId()); + // assertResourceIdEquals(evenHubNsRule.id(), setting.eventHubAuthorizationRuleId()); + assertResourceIdEquals(sa.id(), setting.storageAccountId()); Assertions.assertNull(setting.eventHubName()); Assertions.assertNull(setting.workspaceId()); Assertions.assertTrue(setting.logs().isEmpty()); @@ -145,9 +149,10 @@ public void canCRUDDiagnosticSettingsForSubscription() { .withRegion(region) .withNewResourceGroup(rgName) .withTag("tag1", "value1") + .disableSharedKeyAccess() .create(); - String resourceId = "subscriptions/" + monitorManager.subscriptionId(); + String resourceId = "/subscriptions/" + monitorManager.subscriptionId(); DiagnosticSetting setting = monitorManager.diagnosticSettings() .define(dsName) @@ -205,6 +210,7 @@ public void canCRUDDiagnosticSettingsForVault() { .withRegion(region) .withNewResourceGroup(rgName) .withTag("tag1", "value1") + .disableSharedKeyAccess() .create(); Vault vault = ensureVault(region, rgName); @@ -226,7 +232,9 @@ public void canCRUDDiagnosticSettingsForVault() { .define(dsName) .withResource(vault.id()) .withStorageAccount(sa.id()) - .withLogsAndMetrics(categories, Duration.ofMinutes(5), 7) + // Diagnostic settings does not support retention for new diagnostic settings. + // https://learn.microsoft.com/azure/azure-monitor/platform/migrate-to-azure-storage-lifecycle-policy?tabs=cli + .withLogsAndMetrics(categories, Duration.ofMinutes(5), 0) .create(); Assertions.assertTrue(vault.id().equalsIgnoreCase(setting.resourceId())); @@ -273,7 +281,7 @@ public void canCRUDDiagnosticSettingsForVault() { // verify category logs and category group logs can both be present during update // issue: https://github.com/Azure/azure-sdk-for-java/issues/35425 // mixture of category group and category logs aren't supported - Assertions.assertThrows(ManagementException.class, () -> setting.update().withLog("AuditEvent", 7).apply()); + Assertions.assertThrows(ManagementException.class, () -> setting.update().withLog("AuditEvent", 0).apply()); setting.refresh(); @@ -316,6 +324,7 @@ public void canCRUDDiagnosticSettingsLogsCategoryGroup() { .withRegion(region) .withExistingResourceGroup(rgName) .withTag("tag1", "value1") + .disableSharedKeyAccess() .create(); // diagnostic setting @@ -323,7 +332,8 @@ public void canCRUDDiagnosticSettingsLogsCategoryGroup() { .define(dsName) .withResource(wpsResource.id()) .withStorageAccount(sa.id()) - .withLog("MessagingLogs", 7) + // Diagnostic settings does not support retention for new diagnostic settings. + .withLog("MessagingLogs", 0) .create(); // add category group "audit" to log settings @@ -342,7 +352,7 @@ public void canCRUDDiagnosticSettingsLogsCategoryGroup() { Assertions.assertTrue(setting.logs().stream().anyMatch(ls -> "audit".equals(ls.categoryGroup()))); // update to add metric - setting.update().withMetric("AllMetrics", Duration.ofMinutes(5), 7).apply(); + setting.update().withMetric("AllMetrics", Duration.ofMinutes(5), 0).apply(); // verify category group "audit" setting = monitorManager.diagnosticSettings().listByResource(wpsResource.id()).iterator().next(); @@ -352,6 +362,7 @@ public void canCRUDDiagnosticSettingsLogsCategoryGroup() { } @Test + @Disabled("Azure SQL Server should have Microsoft Entra-only authentication enabled during creation.") public void canCRUDDiagnosticSettingsWithResourceIdWhiteSpace() { Region region = Region.US_EAST; @@ -360,6 +371,7 @@ public void canCRUDDiagnosticSettingsWithResourceIdWhiteSpace() { .withRegion(region) .withNewResourceGroup(rgName) .withTag("tag1", "value1") + .disableSharedKeyAccess() .create(); SqlElasticPool sqlElasticPool = ensureElasticPoolWithWhiteSpace(region, rgName); diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorActivityAndMetricsTests.java b/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorActivityAndMetricsTests.java index e177c610c447..6870b4632288 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorActivityAndMetricsTests.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorActivityAndMetricsTests.java @@ -21,6 +21,7 @@ import com.azure.resourcemanager.sql.models.SqlElasticPool; import com.azure.resourcemanager.test.utils.TestUtilities; import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import java.time.OffsetDateTime; @@ -46,7 +47,7 @@ protected void cleanUpResources() { @DoNotRecord(skipInPlayback = true) public void canListEventsAndMetrics() { // make sure there exists a VM - Region region = Region.US_WEST; + Region region = Region.US_WEST3; String vmName = generateRandomResourceName("jMonitorVm_", 18); VirtualMachine vm = ensureVM(region, resourceManager.resourceGroups().define(rgName).withRegion(region).create(), vmName, "10.0.0.0/28"); @@ -130,6 +131,7 @@ public void canListEventsAndMetrics() { @Test @DoNotRecord(skipInPlayback = true) + @Disabled("Azure SQL Server should have Microsoft Entra-only authentication enabled during creation.") public void canListEventsAndMetricsWithWhiteSpaceInResourceId() { Region region = Region.US_EAST; SqlElasticPool pool = ensureElasticPoolWithWhiteSpace(region, rgName); diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorManagementTest.java b/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorManagementTest.java index 573382048e3f..0970870d79ee 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorManagementTest.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/MonitorManagementTest.java @@ -15,6 +15,7 @@ import com.azure.resourcemanager.compute.ComputeManager; import com.azure.resourcemanager.compute.models.KnownLinuxVirtualMachineImage; import com.azure.resourcemanager.compute.models.VirtualMachine; +import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; import com.azure.resourcemanager.eventhubs.EventHubsManager; import com.azure.resourcemanager.keyvault.KeyVaultManager; import com.azure.resourcemanager.keyvault.models.Vault; @@ -82,6 +83,7 @@ protected VirtualMachine ensureVM(Region region, ResourceGroup resourceGroup, St .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_16_04_LTS) .withRootUsername("Foo12") .withSsh(sshPublicKey()) + .withSize(VirtualMachineSizeTypes.STANDARD_A1_V2) .create(); } From 7b3bd9e0403cc6dadbf75678d4f0fe027c840e36 Mon Sep 17 00:00:00 2001 From: Rujun Chen <rujche@microsoft.com> Date: Fri, 5 Dec 2025 07:01:19 +0000 Subject: [PATCH 111/186] Fix build failure by updating sdk/spring/ci.yml (#47448) --- sdk/spring/ci.yml | 106 +++++++++++++++++++++++----------------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/sdk/spring/ci.yml b/sdk/spring/ci.yml index 0fdab4736a25..b91fedb2a87a 100644 --- a/sdk/spring/ci.yml +++ b/sdk/spring/ci.yml @@ -263,352 +263,352 @@ extends: groupId: com.azure.spring safeName: springcloudazurecore skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurecore }} - name: spring-cloud-azure-docker-compose groupId: com.azure.spring safeName: springcloudazuredockercompose skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazuredockercompose }} - name: spring-cloud-azure-service groupId: com.azure.spring safeName: springcloudazureservice skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazureservice }} - name: spring-cloud-azure-resourcemanager groupId: com.azure.spring safeName: springcloudazureresourcemanager skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazureresourcemanager }} - name: spring-messaging-azure groupId: com.azure.spring safeName: springmessagingazure skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springmessagingazure }} - name: spring-messaging-azure-eventhubs groupId: com.azure.spring safeName: springmessagingazureeventhubs skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springmessagingazureeventhubs }} - name: spring-messaging-azure-servicebus groupId: com.azure.spring safeName: springmessagingazureservicebus skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springmessagingazureservicebus }} - name: spring-messaging-azure-storage-queue groupId: com.azure.spring safeName: springmessagingazurestoragequeue skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springmessagingazurestoragequeue }} - name: spring-integration-azure-core groupId: com.azure.spring safeName: springintegrationazurecore skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springintegrationazurecore }} - name: spring-integration-azure-eventhubs groupId: com.azure.spring safeName: springintegrationazureeventhubs skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springintegrationazureeventhubs }} - name: spring-integration-azure-servicebus groupId: com.azure.spring safeName: springintegrationazureservicebus skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springintegrationazureservicebus }} - name: spring-integration-azure-storage-queue groupId: com.azure.spring safeName: springintegrationazurestoragequeue skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springintegrationazurestoragequeue }} - name: spring-cloud-azure-autoconfigure groupId: com.azure.spring safeName: springcloudazureautoconfigure skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazureautoconfigure }} - name: spring-cloud-azure-actuator groupId: com.azure.spring safeName: springcloudazureactuator skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazureactuator }} - name: spring-cloud-azure-actuator-autoconfigure groupId: com.azure.spring safeName: springcloudazureactuatorautoconfigure skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazureactuatorautoconfigure }} - name: spring-cloud-azure-starter groupId: com.azure.spring safeName: springcloudazurestarter skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarter }} - name: spring-cloud-azure-starter-actuator groupId: com.azure.spring safeName: springcloudazurestarteractuator skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarteractuator }} - name: spring-cloud-azure-starter-active-directory groupId: com.azure.spring safeName: springcloudazurestarteractivedirectory skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarteractivedirectory }} - name: spring-cloud-azure-starter-active-directory-b2c groupId: com.azure.spring safeName: springcloudazurestarteractivedirectoryb2c skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarteractivedirectoryb2c }} - name: spring-cloud-azure-starter-appconfiguration groupId: com.azure.spring safeName: springcloudazurestarterappconfiguration skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterappconfiguration }} - name: spring-cloud-azure-starter-cosmos groupId: com.azure.spring safeName: springcloudazurestartercosmos skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestartercosmos }} - name: spring-cloud-azure-starter-data-cosmos groupId: com.azure.spring safeName: springcloudazurestarterdatacosmos skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterdatacosmos }} - name: spring-cloud-azure-starter-data-redis-lettuce groupId: com.azure.spring safeName: springcloudazurestarterdataredislettuce skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterdataredislettuce }} - name: spring-cloud-azure-starter-eventhubs groupId: com.azure.spring safeName: springcloudazurestartereventhubs skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestartereventhubs }} - name: spring-cloud-azure-starter-eventgrid groupId: com.azure.spring safeName: springcloudazurestartereventgrid skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestartereventgrid }} - name: spring-cloud-azure-starter-keyvault groupId: com.azure.spring safeName: springcloudazurestarterkeyvault skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterkeyvault }} - name: spring-cloud-azure-starter-keyvault-certificates groupId: com.azure.spring safeName: springcloudazurestarterkeyvaultcertificates skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterkeyvaultcertificates }} - name: spring-cloud-azure-starter-keyvault-jca groupId: com.azure.spring safeName: springcloudazurestarterkeyvaultjca skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterkeyvaultjca }} - name: spring-cloud-azure-starter-keyvault-secrets groupId: com.azure.spring safeName: springcloudazurestarterkeyvaultsecrets skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterkeyvaultsecrets }} - name: spring-cloud-azure-starter-servicebus groupId: com.azure.spring safeName: springcloudazurestarterservicebus skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterservicebus }} - name: spring-cloud-azure-starter-servicebus-jms groupId: com.azure.spring safeName: springcloudazurestarterservicebusjms skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterservicebusjms }} - name: spring-cloud-azure-starter-storage groupId: com.azure.spring safeName: springcloudazurestarterstorage skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterstorage }} - name: spring-cloud-azure-starter-storage-blob groupId: com.azure.spring safeName: springcloudazurestarterstorageblob skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterstorageblob }} - name: spring-cloud-azure-starter-storage-file-share groupId: com.azure.spring safeName: springcloudazurestarterstoragefileshare skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterstoragefileshare }} - name: spring-cloud-azure-starter-storage-queue groupId: com.azure.spring safeName: springcloudazurestarterstoragequeue skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterstoragequeue }} - name: spring-cloud-azure-starter-integration-eventhubs groupId: com.azure.spring safeName: springcloudazurestarterintegrationeventhubs skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterintegrationeventhubs }} - name: spring-cloud-azure-starter-integration-servicebus groupId: com.azure.spring safeName: springcloudazurestarterintegrationservicebus skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterintegrationservicebus }} - name: spring-cloud-azure-starter-integration-storage-queue groupId: com.azure.spring safeName: springcloudazurestarterintegrationstoragequeue skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterintegrationstoragequeue }} - name: spring-cloud-azure-stream-binder-servicebus-core groupId: com.azure.spring safeName: springcloudazurestreambinderservicebuscore skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestreambinderservicebuscore }} - name: spring-cloud-azure-stream-binder-servicebus groupId: com.azure.spring safeName: springcloudazurestreambinderservicebus skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestreambinderservicebus }} - name: spring-cloud-azure-stream-binder-eventhubs groupId: com.azure.spring safeName: springcloudazurestreambindereventhubs skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestreambindereventhubs }} - name: spring-cloud-azure-stream-binder-eventhubs-core groupId: com.azure.spring safeName: springcloudazurestreambindereventhubscore skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestreambindereventhubscore }} - name: spring-cloud-azure-starter-stream-eventhubs groupId: com.azure.spring safeName: springcloudazurestarterstreameventhubs skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterstreameventhubs }} - name: spring-cloud-azure-starter-stream-servicebus groupId: com.azure.spring safeName: springcloudazurestarterstreamservicebus skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterstreamservicebus }} - name: spring-cloud-azure-starter-jdbc-mysql groupId: com.azure.spring safeName: springcloudazurestarterjdbcmysql skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterjdbcmysql }} - name: spring-cloud-azure-starter-jdbc-postgresql groupId: com.azure.spring safeName: springcloudazurestarterjdbcpostgresql skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterjdbcpostgresql }} - name: spring-cloud-azure-testcontainers groupId: com.azure.spring safeName: springcloudazuretestcontainers skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazuretestcontainers }} - name: spring-cloud-azure-appconfiguration-config groupId: com.azure.spring safeName: springcloudazureappconfigurationconfig skipPublishDocGithubIo: false skipPublishDocMs: false - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazureappconfigurationconfig }} - name: spring-cloud-azure-appconfiguration-config-web groupId: com.azure.spring safeName: springcloudazureappconfigurationconfigweb skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazureappconfigurationconfigweb }} - name: spring-cloud-azure-feature-management groupId: com.azure.spring safeName: springcloudazurefeaturemanagement skipPublishDocGithubIo: false skipPublishDocMs: false - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurefeaturemanagement }} - name: spring-cloud-azure-feature-management-web groupId: com.azure.spring safeName: springcloudazurefeaturemanagementweb skipPublishDocGithubIo: false skipPublishDocMs: false - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurefeaturemanagementweb }} - name: spring-cloud-azure-starter-appconfiguration-config groupId: com.azure.spring safeName: springcloudazurestarterappconfigurationconfig skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterappconfigurationconfig }} - name: spring-cloud-azure-starter-monitor groupId: com.azure.spring safeName: springcloudazurestartermonitor skipPublishDocGithubIo: true skipPublishDocMs: true - skipVerifyChangelog: true + skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestartermonitor }} MatrixFilters: - JavaTestVersion=^(?!1.8|1.11).* From 16fc7250a1960951876380403be804dad562fede Mon Sep 17 00:00:00 2001 From: v-huizhu2 <v-huizhu2@microsoft.com> Date: Fri, 5 Dec 2025 16:00:09 +0800 Subject: [PATCH 112/186] mgmt, increment version after container registry release (#47471) * chore(release): update containerregistry beta version to 2.55.0-beta.2 - Incremented version in version_client.txt - Updated CHANGELOG.md with new beta version - Changed pom.xml version to 2.5.0-beta.2 * chore(deps): update azure-resourcemanager-containerregistry to 2.55.0-beta.2 - Updated version in azure-containers-containerregistry-perf/pom.xml - Updated version in azure-containers-containerregistry/pom.xml - Changed from 2.55.0-beta.1 to 2.55.0-beta.2 - Updated dependency for both main and perf modules - Maintained existing scope and configuration settings - Kept x-version-update markers intact --- eng/versioning/version_client.txt | 2 +- .../azure-containers-containerregistry-perf/pom.xml | 2 +- .../azure-containers-containerregistry/pom.xml | 2 +- .../CHANGELOG.md | 10 +++++++++- .../azure-resourcemanager-containerregistry/pom.xml | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index f86de730d1eb..52eb64fc45de 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -277,7 +277,7 @@ com.azure.resourcemanager:azure-resourcemanager-authorization;2.53.6;2.54.0-beta com.azure.resourcemanager:azure-resourcemanager-cdn;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-compute;2.55.1;2.56.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.53.6;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.54.1;2.55.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.54.1;2.55.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-containerservice;2.56.1;2.57.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-cosmos;2.54.0;2.55.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-dns;2.53.5;2.54.0-beta.1 diff --git a/sdk/containerregistry/azure-containers-containerregistry-perf/pom.xml b/sdk/containerregistry/azure-containers-containerregistry-perf/pom.xml index dc738b262f5c..70cab3d39b27 100644 --- a/sdk/containerregistry/azure-containers-containerregistry-perf/pom.xml +++ b/sdk/containerregistry/azure-containers-containerregistry-perf/pom.xml @@ -53,7 +53,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerregistry</artifactId> - <version>2.55.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerregistry;current} --> + <version>2.55.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerregistry;current} --> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/containerregistry/azure-containers-containerregistry/pom.xml b/sdk/containerregistry/azure-containers-containerregistry/pom.xml index f063ddbf25ce..a5efec5b3a22 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/pom.xml +++ b/sdk/containerregistry/azure-containers-containerregistry/pom.xml @@ -69,7 +69,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerregistry</artifactId> - <version>2.55.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerregistry;current} --> + <version>2.55.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerregistry;current} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md index 8cffc1811c50..517e6d80f52c 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.55.0-beta.1 (Unreleased) +## 2.55.0-beta.2 (Unreleased) ### Features Added @@ -10,6 +10,14 @@ ### Other Changes +## 2.55.0-beta.1 (2025-12-04) + +### Other Changes + +#### Dependency Updates + +- Updated `RegistryTasks` to `2025-03-01-preview`. + ## 2.54.1 (2025-11-24) ### Other Changes diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/pom.xml b/sdk/containerregistry/azure-resourcemanager-containerregistry/pom.xml index 2a8750b25247..221df8a5e2f8 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/pom.xml +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/pom.xml @@ -10,7 +10,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerregistry</artifactId> - <version>2.55.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerregistry;current} --> + <version>2.55.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerregistry;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for Container Registry Management</name> From 3733b4bc3c174a728079baf3336a0d1fbad0c59e Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 5 Dec 2025 01:29:10 -0800 Subject: [PATCH 113/186] Increment package versions for netapp releases (#47457) --- eng/versioning/version_client.txt | 2 +- sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md | 10 ++++++++++ sdk/netapp/azure-resourcemanager-netapp/pom.xml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 52eb64fc45de..2ae15904a3a1 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -311,7 +311,7 @@ com.azure.resourcemanager:azure-resourcemanager-eventgrid;1.2.0;1.3.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-healthbot;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-confluent;1.2.0;1.3.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-digitaltwins;1.3.0;1.4.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-netapp;2.0.0;2.1.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-netapp;2.0.0;2.1.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-storagecache;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-redisenterprise;2.1.0;2.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-hybridkubernetes;1.0.0;1.1.0-beta.2 diff --git a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md index 763b0c962817..1949af2ffd12 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md +++ b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 2.1.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 2.1.0-beta.1 (2025-12-04) - Azure Resource Manager NetAppFiles client library for Java. This package contains Microsoft Azure SDK for NetAppFiles Management SDK. Microsoft NetApp Files Azure Resource Provider specification. Package api-version 2025-09-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/netapp/azure-resourcemanager-netapp/pom.xml b/sdk/netapp/azure-resourcemanager-netapp/pom.xml index fbc8f73dfe8e..c034d14805f9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/pom.xml +++ b/sdk/netapp/azure-resourcemanager-netapp/pom.xml @@ -14,7 +14,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-netapp</artifactId> - <version>2.1.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-netapp;current} --> + <version>2.1.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-netapp;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for NetAppFiles Management</name> From 38e062e009f95a936da37351a844385caa46eea7 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 5 Dec 2025 08:43:50 -0800 Subject: [PATCH 114/186] Bump @azure-tools/typespec-client-generator-cli (#47384) Bumps [@azure-tools/typespec-client-generator-cli](https://github.com/Azure/azure-sdk-tools) from 0.30.0 to 0.31.0. - [Release notes](https://github.com/Azure/azure-sdk-tools/releases) - [Commits](https://github.com/Azure/azure-sdk-tools/commits) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- eng/common/tsp-client/package-lock.json | 120 ++++-------------------- eng/common/tsp-client/package.json | 2 +- 2 files changed, 17 insertions(+), 105 deletions(-) diff --git a/eng/common/tsp-client/package-lock.json b/eng/common/tsp-client/package-lock.json index 3051f0413c68..2f8ccd4ab07e 100644 --- a/eng/common/tsp-client/package-lock.json +++ b/eng/common/tsp-client/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-client-generator-cli": "0.30.0" + "@azure-tools/typespec-client-generator-cli": "0.31.0" } }, "node_modules/@autorest/codemodel": { @@ -189,9 +189,9 @@ } }, "node_modules/@azure-tools/typespec-client-generator-cli": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-cli/-/typespec-client-generator-cli-0.30.0.tgz", - "integrity": "sha512-UmVypW8o0PtgydCpAdoByWPSNAf0kgGSE4WjyGyFSYJZIfwrQ6Nvv1LuFAYZQxaM6ZYRNZKB92QmpXiNnWKxoA==", + "version": "0.31.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-cli/-/typespec-client-generator-cli-0.31.0.tgz", + "integrity": "sha512-ukz9IROlYhr0TAXeVLT6oHb/SbZyDFp+rTKYw5XblNBJChLiq+PDalrjyWXsSF8J15TfKS4vixEOc+LZUQQb0A==", "license": "MIT", "dependencies": { "@autorest/core": "^3.10.2", @@ -332,7 +332,6 @@ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "license": "MIT", - "peer": true, "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", @@ -347,7 +346,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "license": "MIT", - "peer": true, "engines": { "node": ">=6.9.0" } @@ -357,7 +355,6 @@ "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.2.2.tgz", "integrity": "sha512-E+KExNurKcUJJdxmjglTl141EwxWyAHplvsYJQgSwXf8qiNWkTxTuCCqmhFEmbIXd4zLaGMfQFJ6WrZ7fSeV3g==", "license": "MIT", - "peer": true, "dependencies": { "@inquirer/core": "^10.2.0", "@inquirer/figures": "^1.0.13", @@ -382,7 +379,6 @@ "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.16.tgz", "integrity": "sha512-j1a5VstaK5KQy8Mu8cHmuQvN1Zc62TbLhjJxwHvKPPKEoowSF6h/0UdOpA9DNdWZ+9Inq73+puRq1df6OJ8Sag==", "license": "MIT", - "peer": true, "dependencies": { "@inquirer/core": "^10.2.0", "@inquirer/type": "^3.0.8" @@ -404,7 +400,6 @@ "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.2.0.tgz", "integrity": "sha512-NyDSjPqhSvpZEMZrLCYUquWNl+XC/moEcVFqS55IEYIYsY0a1cUCevSqk7ctOlnm/RaSBU5psFryNlxcmGrjaA==", "license": "MIT", - "peer": true, "dependencies": { "@inquirer/figures": "^1.0.13", "@inquirer/type": "^3.0.8", @@ -432,7 +427,6 @@ "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.18.tgz", "integrity": "sha512-yeQN3AXjCm7+Hmq5L6Dm2wEDeBRdAZuyZ4I7tWSSanbxDzqM0KqzoDbKM7p4ebllAYdoQuPJS6N71/3L281i6w==", "license": "MIT", - "peer": true, "dependencies": { "@inquirer/core": "^10.2.0", "@inquirer/external-editor": "^1.0.1", @@ -455,7 +449,6 @@ "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.18.tgz", "integrity": "sha512-xUjteYtavH7HwDMzq4Cn2X4Qsh5NozoDHCJTdoXg9HfZ4w3R6mxV1B9tL7DGJX2eq/zqtsFjhm0/RJIMGlh3ag==", "license": "MIT", - "peer": true, "dependencies": { "@inquirer/core": "^10.2.0", "@inquirer/type": "^3.0.8", @@ -478,7 +471,6 @@ "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.1.tgz", "integrity": "sha512-Oau4yL24d2B5IL4ma4UpbQigkVhzPDXLoqy1ggK4gnHg/stmkffJE4oOXHXF3uz0UEpywG68KcyXsyYpA1Re/Q==", "license": "MIT", - "peer": true, "dependencies": { "chardet": "^2.1.0", "iconv-lite": "^0.6.3" @@ -500,7 +492,6 @@ "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.13.tgz", "integrity": "sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw==", "license": "MIT", - "peer": true, "engines": { "node": ">=18" } @@ -510,7 +501,6 @@ "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.2.2.tgz", "integrity": "sha512-hqOvBZj/MhQCpHUuD3MVq18SSoDNHy7wEnQ8mtvs71K8OPZVXJinOzcvQna33dNYLYE4LkA9BlhAhK6MJcsVbw==", "license": "MIT", - "peer": true, "dependencies": { "@inquirer/core": "^10.2.0", "@inquirer/type": "^3.0.8" @@ -532,7 +522,6 @@ "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.18.tgz", "integrity": "sha512-7exgBm52WXZRczsydCVftozFTrrwbG5ySE0GqUd2zLNSBXyIucs2Wnm7ZKLe/aUu6NUg9dg7Q80QIHCdZJiY4A==", "license": "MIT", - "peer": true, "dependencies": { "@inquirer/core": "^10.2.0", "@inquirer/type": "^3.0.8" @@ -554,7 +543,6 @@ "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.18.tgz", "integrity": "sha512-zXvzAGxPQTNk/SbT3carAD4Iqi6A2JS2qtcqQjsL22uvD+JfQzUrDEtPjLL7PLn8zlSNyPdY02IiQjzoL9TStA==", "license": "MIT", - "peer": true, "dependencies": { "@inquirer/core": "^10.2.0", "@inquirer/type": "^3.0.8", @@ -577,7 +565,6 @@ "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.8.4.tgz", "integrity": "sha512-MuxVZ1en1g5oGamXV3DWP89GEkdD54alcfhHd7InUW5BifAdKQEK9SLFa/5hlWbvuhMPlobF0WAx7Okq988Jxg==", "license": "MIT", - "peer": true, "dependencies": { "@inquirer/checkbox": "^4.2.2", "@inquirer/confirm": "^5.1.16", @@ -607,7 +594,6 @@ "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.6.tgz", "integrity": "sha512-KOZqa3QNr3f0pMnufzL7K+nweFFCCBs6LCXZzXDrVGTyssjLeudn5ySktZYv1XiSqobyHRYYK0c6QsOxJEhXKA==", "license": "MIT", - "peer": true, "dependencies": { "@inquirer/core": "^10.2.0", "@inquirer/type": "^3.0.8", @@ -630,7 +616,6 @@ "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.1.1.tgz", "integrity": "sha512-TkMUY+A2p2EYVY3GCTItYGvqT6LiLzHBnqsU1rJbrpXUijFfM6zvUx0R4civofVwFCmJZcKqOVwwWAjplKkhxA==", "license": "MIT", - "peer": true, "dependencies": { "@inquirer/core": "^10.2.0", "@inquirer/figures": "^1.0.13", @@ -654,7 +639,6 @@ "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.3.2.tgz", "integrity": "sha512-nwous24r31M+WyDEHV+qckXkepvihxhnyIaod2MG7eCE6G0Zm/HUF6jgN8GXgf4U7AU6SLseKdanY195cwvU6w==", "license": "MIT", - "peer": true, "dependencies": { "@inquirer/core": "^10.2.0", "@inquirer/figures": "^1.0.13", @@ -679,7 +663,6 @@ "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.8.tgz", "integrity": "sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw==", "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, @@ -697,7 +680,6 @@ "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", "license": "ISC", - "peer": true, "dependencies": { "minipass": "^7.0.4" }, @@ -725,7 +707,6 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "license": "MIT", - "peer": true, "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -739,7 +720,6 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "license": "MIT", - "peer": true, "engines": { "node": ">= 8" } @@ -749,7 +729,6 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "license": "MIT", - "peer": true, "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -763,7 +742,6 @@ "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, @@ -824,7 +802,6 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -837,7 +814,6 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -850,7 +826,6 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", "license": "ISC", - "peer": true, "dependencies": { "string-width": "^7.2.0", "strip-ansi": "^7.1.0", @@ -864,15 +839,13 @@ "version": "10.5.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.5.0.tgz", "integrity": "sha512-lb49vf1Xzfx080OKA0o6l8DQQpV+6Vg95zyCJX9VB/BqKYlhG7N4wgROUUHRA+ZPUefLnteQOad7z1kT2bV7bg==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@typespec/compiler/node_modules/prettier": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "license": "MIT", - "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -888,7 +861,6 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "license": "MIT", - "peer": true, "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", @@ -906,7 +878,6 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "license": "MIT", - "peer": true, "dependencies": { "ansi-regex": "^6.0.1" }, @@ -922,7 +893,6 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", "license": "MIT", - "peer": true, "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", @@ -940,7 +910,6 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", "license": "MIT", - "peer": true, "dependencies": { "cliui": "^9.0.1", "escalade": "^3.1.1", @@ -958,7 +927,6 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", "license": "ISC", - "peer": true, "engines": { "node": "^20.19.0 || ^22.12.0 || >=23" } @@ -1130,7 +1098,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -1147,7 +1114,6 @@ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "license": "MIT", - "peer": true, "dependencies": { "type-fest": "^0.21.3" }, @@ -1206,7 +1172,6 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "license": "MIT", - "peer": true, "dependencies": { "fill-range": "^7.1.1" }, @@ -1248,15 +1213,13 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.0.tgz", "integrity": "sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/chownr": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", "license": "BlueOak-1.0.0", - "peer": true, "engines": { "node": ">=18" } @@ -1266,7 +1229,6 @@ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", "license": "ISC", - "peer": true, "engines": { "node": ">= 12" } @@ -1381,7 +1343,6 @@ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz", "integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==", "license": "MIT", - "peer": true, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -1402,15 +1363,13 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/fast-glob": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "license": "MIT", - "peer": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -1436,15 +1395,13 @@ "url": "https://opencollective.com/fastify" } ], - "license": "BSD-3-Clause", - "peer": true + "license": "BSD-3-Clause" }, "node_modules/fastq": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", "license": "ISC", - "peer": true, "dependencies": { "reusify": "^1.0.4" } @@ -1454,7 +1411,6 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "license": "MIT", - "peer": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -1476,7 +1432,6 @@ "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, @@ -1489,7 +1444,6 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "license": "ISC", - "peer": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -1502,7 +1456,6 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-14.1.0.tgz", "integrity": "sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==", "license": "MIT", - "peer": true, "dependencies": { "@sindresorhus/merge-streams": "^2.1.0", "fast-glob": "^3.3.3", @@ -1555,7 +1508,6 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "license": "MIT", - "peer": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -1568,7 +1520,6 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "license": "MIT", - "peer": true, "engines": { "node": ">= 4" } @@ -1578,7 +1529,6 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -1597,7 +1547,6 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "license": "MIT", - "peer": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -1610,7 +1559,6 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.12.0" } @@ -1620,7 +1568,6 @@ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, @@ -1632,8 +1579,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/js-yaml": { "version": "4.1.1", @@ -1651,8 +1597,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/lodash": { "version": "4.17.21", @@ -1665,7 +1610,6 @@ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "license": "MIT", - "peer": true, "engines": { "node": ">= 8" } @@ -1675,7 +1619,6 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "license": "MIT", - "peer": true, "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -1689,7 +1632,6 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "license": "ISC", - "peer": true, "engines": { "node": ">=16 || 14 >=14.17" } @@ -1699,7 +1641,6 @@ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.2.tgz", "integrity": "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==", "license": "MIT", - "peer": true, "dependencies": { "minipass": "^7.1.2" }, @@ -1712,7 +1653,6 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", "license": "MIT", - "peer": true, "bin": { "mkdirp": "dist/cjs/src/bin.js" }, @@ -1734,7 +1674,6 @@ "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", "license": "MIT", - "peer": true, "bin": { "mustache": "bin/mustache" } @@ -1744,7 +1683,6 @@ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", "license": "ISC", - "peer": true, "engines": { "node": "^18.17.0 || >=20.5.0" } @@ -1754,7 +1692,6 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-6.0.0.tgz", "integrity": "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, @@ -1766,15 +1703,13 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "license": "ISC", - "peer": true + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "license": "MIT", - "peer": true, "engines": { "node": ">=8.6" }, @@ -1846,8 +1781,7 @@ "url": "https://feross.org/support" } ], - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/require-directory": { "version": "2.1.1", @@ -1863,7 +1797,6 @@ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -1882,7 +1815,6 @@ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "license": "MIT", - "peer": true, "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -1907,7 +1839,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "queue-microtask": "^1.2.2" } @@ -1916,8 +1847,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/semver": { "version": "7.7.2", @@ -1936,7 +1866,6 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "license": "ISC", - "peer": true, "engines": { "node": ">=14" }, @@ -1964,7 +1893,6 @@ "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", "license": "MIT", - "peer": true, "engines": { "node": ">=14.16" }, @@ -2036,7 +1964,6 @@ "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", "license": "ISC", - "peer": true, "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", @@ -2054,7 +1981,6 @@ "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.3.0.tgz", "integrity": "sha512-qNsTkX9K8hi+FHDfHmf22e/OGuXmfBm9RqNismxBrnSmZVJKegQ+HYYXT+R7Ha8F/YSm2Y34vmzD4cxMu2u95g==", "license": "MIT", - "peer": true, "dependencies": { "temporal-spec": "0.3.0" } @@ -2063,8 +1989,7 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.3.0.tgz", "integrity": "sha512-n+noVpIqz4hYgFSMOSiINNOUOMFtV5cZQNCmmszA6GiVFVRt3G7AqVyhXjhCSmowvQn+NsGn+jMDMKJYHd3bSQ==", - "license": "ISC", - "peer": true + "license": "ISC" }, "node_modules/title-case": { "version": "3.0.3", @@ -2080,7 +2005,6 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "license": "MIT", - "peer": true, "dependencies": { "is-number": "^7.0.0" }, @@ -2099,7 +2023,6 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "license": "(MIT OR CC0-1.0)", - "peer": true, "engines": { "node": ">=10" }, @@ -2112,7 +2035,6 @@ "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, @@ -2134,7 +2056,6 @@ "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", "license": "MIT", - "peer": true, "dependencies": { "vscode-languageserver-protocol": "3.17.5" }, @@ -2147,7 +2068,6 @@ "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", "license": "MIT", - "peer": true, "dependencies": { "vscode-jsonrpc": "8.2.0", "vscode-languageserver-types": "3.17.5" @@ -2158,7 +2078,6 @@ "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", "license": "MIT", - "peer": true, "engines": { "node": ">=14.0.0" } @@ -2167,22 +2086,19 @@ "version": "1.0.12", "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/vscode-languageserver-types": { "version": "3.17.5", "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "license": "MIT", - "peer": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -2197,7 +2113,6 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=8" } @@ -2207,7 +2122,6 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "license": "MIT", - "peer": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -2229,7 +2143,6 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", "license": "BlueOak-1.0.0", - "peer": true, "engines": { "node": ">=18" } @@ -2278,7 +2191,6 @@ "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz", "integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==", "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, diff --git a/eng/common/tsp-client/package.json b/eng/common/tsp-client/package.json index b66c149420bc..290f69672cf1 100644 --- a/eng/common/tsp-client/package.json +++ b/eng/common/tsp-client/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "@azure-tools/typespec-client-generator-cli": "0.30.0" + "@azure-tools/typespec-client-generator-cli": "0.31.0" } } From f390890cb1cad3c0829f714c2e3b08d2e381276f Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Mon, 8 Dec 2025 08:45:38 +0800 Subject: [PATCH 115/186] replace with jackson2 --- eng/versioning/external_dependencies.txt | 2 +- .../spring-cloud-azure-autoconfigure/pom.xml | 14 +++----------- ...reEventHubsMessagingAutoConfigurationTests.java | 14 +++++++++----- ...eServiceBusMessagingAutoConfigurationTests.java | 14 +++++++++----- ...torageQueueMessagingAutoConfigurationTests.java | 14 +++++++++----- 5 files changed, 31 insertions(+), 27 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index f1635ed7d56f..abc4f83cea04 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -352,7 +352,7 @@ springboot4_org.springframework.boot:spring-boot-data-redis;4.0.0 springboot4_org.springframework.boot:spring-boot-docker-compose;4.0.0 springboot4_org.springframework.boot:spring-boot-health;4.0.0 springboot4_org.springframework.boot:spring-boot-http-converter;4.0.0 -springboot4_org.springframework.boot:spring-boot-jackson;4.0.0 +springboot4_org.springframework.boot:spring-boot-jackson2;4.0.0 springboot4_org.springframework.boot:spring-boot-jdbc;4.0.0 springboot4_org.springframework.boot:spring-boot-jms;4.0.0 springboot4_org.springframework.boot:spring-boot-kafka;4.0.0 diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index bc50d277728b..39e0fb18d748 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -181,15 +181,8 @@ <!--Jackson--> <dependency> <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-jackson</artifactId> - <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-jackson;external_dependency} --> - <optional>true</optional> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.datatype</groupId> - <artifactId>jackson-datatype-jsr310</artifactId> - <version>2.20.1</version> <!-- {x-version-update;springboot4_com.fasterxml.jackson.datatype:jackson-datatype-jsr310;external_dependency} --> - <optional>true</optional> + <artifactId>spring-boot-jackson2</artifactId> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-jackson2;external_dependency} --> </dependency> <!-- Azure SDKs--> @@ -549,7 +542,6 @@ <includes> <include>com.azure:azure-servicebus-jms:[2.1.0]</include> <!-- {x-include-update;com.azure:azure-servicebus-jms;external_dependency} --> <include>com.mysql:mysql-connector-j:[9.5.0]</include> <!-- {x-include-update;springboot4_com.mysql:mysql-connector-j;external_dependency} --> - <include>com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.20.1]</include> <!-- {x-include-update;springboot4_com.fasterxml.jackson.datatype:jackson-datatype-jsr310;external_dependency} --> <include>io.lettuce:lettuce-core:[6.8.1.RELEASE]</include> <!-- {x-include-update;springboot4_io.lettuce:lettuce-core;external_dependency} --> <include>jakarta.servlet:jakarta.servlet-api:[6.1.0]</include> <!-- {x-include-update;springboot4_jakarta.servlet:jakarta.servlet-api;external_dependency} --> <include>jakarta.validation:jakarta.validation-api:[3.1.1]</include> <!-- {x-include-update;springboot4_jakarta.validation:jakarta.validation-api;external_dependency} --> @@ -562,7 +554,7 @@ <include>org.springframework.boot:spring-boot-data-redis:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-data-redis;external_dependency} --> <include>org.springframework.boot:spring-boot-http-converter:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-http-converter;external_dependency} --> <include>org.springframework.boot:spring-boot-kafka:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-kafka;external_dependency} --> - <include>org.springframework.boot:spring-boot-jackson:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-jackson;external_dependency} --> + <include>org.springframework.boot:spring-boot-jackson2:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-jackson2;external_dependency} --> <include>org.springframework.boot:spring-boot-jdbc:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-jdbc;external_dependency} --> <include>org.springframework.boot:spring-boot-jms:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-jms;external_dependency} --> <include>org.springframework.boot:spring-boot-restclient:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-restclient;external_dependency} --> diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfigurationTests.java index 6dc0da517750..9f83e87f095f 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfigurationTests.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; +import org.springframework.boot.jackson2.autoconfigure.Jackson2AutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.ApplicationContextRunner; @@ -77,10 +77,11 @@ void connectionInfoAndCheckpointStoreProvidedShouldConfigure() { } @Test + @SuppressWarnings("removal") void withoutObjectMapperShouldNotConfigure() { this.contextRunner .withClassLoader(new FilteredClassLoader(ObjectMapper.class)) - .withConfiguration(AutoConfigurations.of(JacksonAutoConfiguration.class)) + .withConfiguration(AutoConfigurations.of(Jackson2AutoConfiguration.class)) .withPropertyValues( "spring.cloud.azure.eventhubs.connection-string=" + String.format(CONNECTION_STRING_FORMAT, "test-namespace") ) @@ -89,11 +90,12 @@ void withoutObjectMapperShouldNotConfigure() { } @Test + @SuppressWarnings("removal") void withIsolatedObjectMapper() { this.contextRunner .withPropertyValues("spring.cloud.azure.eventhubs.connection-string=" + String.format(CONNECTION_STRING_FORMAT, "test-namespace")) .withUserConfiguration(AzureEventHubsPropertiesTestConfiguration.class) - .withConfiguration(AutoConfigurations.of(JacksonAutoConfiguration.class)) + .withConfiguration(AutoConfigurations.of(Jackson2AutoConfiguration.class)) .run(context -> { assertThat(context).hasBean("defaultEventHubsMessageConverter"); assertThat(context).hasSingleBean(EventHubsMessageConverter.class); @@ -102,12 +104,13 @@ void withIsolatedObjectMapper() { } @Test + @SuppressWarnings("removal") void withNonIsolatedObjectMapper() { this.contextRunner .withPropertyValues("spring.cloud.azure.eventhubs.connection-string=" + String.format(CONNECTION_STRING_FORMAT, "test-namespace"), "spring.cloud.azure.message-converter.isolated-object-mapper=false") .withUserConfiguration(AzureEventHubsPropertiesTestConfiguration.class) - .withConfiguration(AutoConfigurations.of(JacksonAutoConfiguration.class)) + .withConfiguration(AutoConfigurations.of(Jackson2AutoConfiguration.class)) .run(context -> { assertThat(context).hasBean("eventHubsMessageConverter"); assertThat(context).hasSingleBean(EventHubsMessageConverter.class); @@ -116,13 +119,14 @@ void withNonIsolatedObjectMapper() { } @Test + @SuppressWarnings("removal") void withUserProvidedObjectMapper() { this.contextRunner .withPropertyValues("spring.cloud.azure.eventhubs.connection-string=" + String.format(CONNECTION_STRING_FORMAT, "test-namespace"), "spring.cloud.azure.message-converter.isolated-object-mapper=false") .withUserConfiguration(AzureEventHubsPropertiesTestConfiguration.class) .withBean("userObjectMapper", ObjectMapper.class, () -> new ObjectMapper()) - .withConfiguration(AutoConfigurations.of(JacksonAutoConfiguration.class)) + .withConfiguration(AutoConfigurations.of(Jackson2AutoConfiguration.class)) .run(context -> { assertThat(context).hasBean("userObjectMapper"); assertThat(context).hasSingleBean(ObjectMapper.class); diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfigurationTests.java index 35c89584c37e..6995f5d7ce6c 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfigurationTests.java @@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; +import org.springframework.boot.jackson2.autoconfigure.Jackson2AutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.ApplicationContextRunner; @@ -73,23 +73,25 @@ void connectionInfoProvidedShouldConfigure() { } @Test + @SuppressWarnings("removal") void withoutObjectMapperShouldNotConfigure() { this.contextRunner .withClassLoader(new FilteredClassLoader(ObjectMapper.class)) .withPropertyValues( "spring.cloud.azure.servicebus.connection-string=" + String.format(CONNECTION_STRING_FORMAT, "test-namespace") ) - .withConfiguration(AutoConfigurations.of(JacksonAutoConfiguration.class)) + .withConfiguration(AutoConfigurations.of(Jackson2AutoConfiguration.class)) .withUserConfiguration(AzureServiceBusPropertiesTestConfiguration.class) .run(context -> assertThatIllegalStateException()); } @Test + @SuppressWarnings("removal") void withIsolatedObjectMapper() { this.contextRunner .withPropertyValues("spring.cloud.azure.servicebus.connection-string=" + String.format(CONNECTION_STRING_FORMAT, "test-namespace")) .withUserConfiguration(AzureServiceBusPropertiesTestConfiguration.class) - .withConfiguration(AutoConfigurations.of(JacksonAutoConfiguration.class)) + .withConfiguration(AutoConfigurations.of(Jackson2AutoConfiguration.class)) .run(context -> { assertThat(context).hasBean("defaultServiceBusMessageConverter"); assertThat(context).hasSingleBean(ServiceBusMessageConverter.class); @@ -98,12 +100,13 @@ void withIsolatedObjectMapper() { } @Test + @SuppressWarnings("removal") void withNonIsolatedObjectMapper() { this.contextRunner .withPropertyValues("spring.cloud.azure.servicebus.connection-string=" + String.format(CONNECTION_STRING_FORMAT, "test-namespace"), "spring.cloud.azure.message-converter.isolated-object-mapper=false") .withUserConfiguration(AzureServiceBusPropertiesTestConfiguration.class) - .withConfiguration(AutoConfigurations.of(JacksonAutoConfiguration.class)) + .withConfiguration(AutoConfigurations.of(Jackson2AutoConfiguration.class)) .run(context -> { assertThat(context).hasBean("serviceBusMessageConverter"); assertThat(context).hasSingleBean(ServiceBusMessageConverter.class); @@ -112,13 +115,14 @@ void withNonIsolatedObjectMapper() { } @Test + @SuppressWarnings("removal") void withUserProvidedObjectMapper() { this.contextRunner .withPropertyValues("spring.cloud.azure.servicebus.connection-string=" + String.format(CONNECTION_STRING_FORMAT, "test-namespace"), "spring.cloud.azure.message-converter.isolated-object-mapper=false") .withUserConfiguration(AzureServiceBusPropertiesTestConfiguration.class) .withBean("userObjectMapper", ObjectMapper.class, () -> new ObjectMapper()) - .withConfiguration(AutoConfigurations.of(JacksonAutoConfiguration.class)) + .withConfiguration(AutoConfigurations.of(Jackson2AutoConfiguration.class)) .run(context -> { assertThat(context).hasBean("userObjectMapper"); assertThat(context).hasSingleBean(ObjectMapper.class); diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/storage/AzureStorageQueueMessagingAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/storage/AzureStorageQueueMessagingAutoConfigurationTests.java index 46fe552e1d0e..8e350f23b9d2 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/storage/AzureStorageQueueMessagingAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/storage/AzureStorageQueueMessagingAutoConfigurationTests.java @@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; +import org.springframework.boot.jackson2.autoconfigure.Jackson2AutoConfiguration; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.ApplicationContextRunner; @@ -25,20 +25,22 @@ public class AzureStorageQueueMessagingAutoConfigurationTests { .withConfiguration(AutoConfigurations.of(AzureStorageQueueMessagingAutoConfiguration.class)); @Test + @SuppressWarnings("removal") void withoutObjectMapperShouldNotConfigure() { this.contextRunner .withClassLoader(new FilteredClassLoader(ObjectMapper.class)) - .withConfiguration(AutoConfigurations.of(JacksonAutoConfiguration.class)) + .withConfiguration(AutoConfigurations.of(Jackson2AutoConfiguration.class)) .withPropertyValues("spring.cloud.azure.storage.queue.enabled=true") .withUserConfiguration(AzureStorageQueuePropertiesTestConfiguration.class) .run(context -> assertThatIllegalStateException()); } @Test + @SuppressWarnings("removal") void withIsolatedObjectMapper() { this.contextRunner .withPropertyValues("spring.cloud.azure.storage.queue.enabled=true") - .withConfiguration(AutoConfigurations.of(JacksonAutoConfiguration.class)) + .withConfiguration(AutoConfigurations.of(Jackson2AutoConfiguration.class)) .withUserConfiguration(AzureStorageQueuePropertiesTestConfiguration.class) .run(context -> { assertThat(context).hasBean("defaultStorageQueueMessageConverter"); @@ -48,11 +50,12 @@ void withIsolatedObjectMapper() { } @Test + @SuppressWarnings("removal") void withNonIsolatedObjectMapper() { this.contextRunner .withPropertyValues("spring.cloud.azure.storage.queue.enabled=true", "spring.cloud.azure.message-converter.isolated-object-mapper=false") - .withConfiguration(AutoConfigurations.of(JacksonAutoConfiguration.class)) + .withConfiguration(AutoConfigurations.of(Jackson2AutoConfiguration.class)) .withUserConfiguration(AzureStorageQueuePropertiesTestConfiguration.class) .run(context -> { assertThat(context).hasBean("storageQueueMessageConverter"); @@ -62,11 +65,12 @@ void withNonIsolatedObjectMapper() { } @Test + @SuppressWarnings("removal") void withUserProvidedObjectMapper() { this.contextRunner .withPropertyValues("spring.cloud.azure.storage.queue.enabled=true", "spring.cloud.azure.message-converter.isolated-object-mapper=false") - .withConfiguration(AutoConfigurations.of(JacksonAutoConfiguration.class)) + .withConfiguration(AutoConfigurations.of(Jackson2AutoConfiguration.class)) .withUserConfiguration(AzureStorageQueuePropertiesTestConfiguration.class) .withBean("userObjectMapper", ObjectMapper.class, () -> new ObjectMapper()) .run(context -> { From 652e9673f997009d3b84227c20125e15de174288 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Mon, 8 Dec 2025 09:39:12 +0800 Subject: [PATCH 116/186] replace spring.jms.listener.concurrency with spring.jms.listener.minConcurrency --- .../jms/ServiceBusJmsAutoConfigurationTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsAutoConfigurationTests.java index 5a238e70c5a4..6c4c362497f3 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsAutoConfigurationTests.java @@ -234,7 +234,7 @@ void jmsPropertiesConfiguredCorrectly(String pricingTier) { "spring.jms.servicebus.pricing-tier=" + pricingTier, "spring.jms.listener.autoStartup=false", "spring.jms.listener.session.acknowledge-mode=client", - "spring.jms.listener.concurrency=2", + "spring.jms.listener.minConcurrency=2", "spring.jms.listener.receiveTimeout=2s", "spring.jms.listener.maxConcurrency=10", "spring.jms.servicebus.connection-string=" + CONNECTION_STRING @@ -275,7 +275,7 @@ void jmsListenerContainerFactoryConfiguredCorrectly(String pricingTier) { "spring.jms.servicebus.pricing-tier=" + pricingTier, "spring.jms.listener.autoStartup=false", "spring.jms.listener.session.acknowledge-mode=client", - "spring.jms.listener.concurrency=2", + "spring.jms.listener.minConcurrency=2", "spring.jms.listener.receiveTimeout=2s", "spring.jms.listener.maxConcurrency=10", "spring.jms.servicebus.connection-string=" + CONNECTION_STRING, From 808de61f1fb5b8a760751adff4a55f1154d96e96 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Mon, 8 Dec 2025 11:16:28 +0800 Subject: [PATCH 117/186] Fix --- eng/versioning/external_dependencies.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index abc4f83cea04..9d69ec5aaf40 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -302,7 +302,6 @@ springboot4_com.diffplug.spotless:spotless-maven-plugin;2.30.0 springboot4_com.fasterxml.jackson.core:jackson-annotations;2.20 springboot4_com.fasterxml.jackson.core:jackson-databind;2.20.1 springboot4_com.fasterxml.jackson.datatype:jackson-datatype-jdk8;2.20.1 -springboot4_com.fasterxml.jackson.datatype:jackson-datatype-jsr310;2.20.1 springboot4_com.fasterxml.jackson.module:jackson-module-parameter-names;2.20.1 springboot4_com.github.spotbugs:spotbugs-maven-plugin;4.8.2.0 springboot4_com.google.code.findbugs:jsr305;3.0.2 From 0ad7863ef37b9e4586c649239966d4d65f257d6a Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Mon, 8 Dec 2025 12:46:09 +0800 Subject: [PATCH 118/186] Update compatibility --- .../AzureSpringBootVersionVerifier.java | 17 ++++---------- .../AzureCompatibilityVerifierProperties.java | 2 +- .../AzureSpringBootVersionVerifierTest.java | 22 +++++++++---------- 3 files changed, 16 insertions(+), 25 deletions(-) diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/compatibility/AzureSpringBootVersionVerifier.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/compatibility/AzureSpringBootVersionVerifier.java index 7a9eedd74ec5..acdcd0857c37 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/compatibility/AzureSpringBootVersionVerifier.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/compatibility/AzureSpringBootVersionVerifier.java @@ -18,14 +18,10 @@ public class AzureSpringBootVersionVerifier { private static final Logger LOGGER = LoggerFactory.getLogger(AzureSpringBootVersionVerifier.class); - static final String SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_0 = "org.springframework.boot.autoconfigure.validation.ValidationConfigurationCustomizer"; - static final String SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_1 = "org.springframework.boot.autoconfigure.validation.ValidationConfigurationCustomizer.ValidationConfigurationCustomizer,setIgnoreRegistrationFailure,"; - static final String SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_2 = "org.springframework.boot.autoconfigure.web.client.RestClientSsl"; - static final String SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_3 = "org.springframework.boot.autoconfigure.ldap.PropertiesLdapConnectionDetails"; - static final String SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_4 = "org.springframework.boot.autoconfigure.http.client.HttpClientProperties"; - static final String SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_5 = "org.springframework.boot.autoconfigure.http.codec.HttpCodecsProperties"; + static final String SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_4_0 = "org.springframework.boot.autoconfigure.preinitialize.BackgroundPreinitializer"; + /** - * Versions supported by Spring Cloud Azure, for present is [3.0, 3.1, 3.2, 3.3, 3.4, 3.5]. Update this value if needed. + * Versions supported by Spring Cloud Azure, for present is [4.0]. Update this value if needed. */ private final Map<String, String> supportedVersions = new HashMap<>(); @@ -47,12 +43,7 @@ public AzureSpringBootVersionVerifier(List<String> acceptedVersions, ClassNameRe * Init default supported Spring Boot Version compatibility check meta data. */ private void initDefaultSupportedBootVersionCheckMeta() { - supportedVersions.put("3.0", SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_0); - supportedVersions.put("3.1", SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_1); - supportedVersions.put("3.2", SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_2); - supportedVersions.put("3.3", SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_3); - supportedVersions.put("3.4", SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_4); - supportedVersions.put("3.5", SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_5); + supportedVersions.put("4.0", SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_4_0); } /** diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/compatibility/properties/AzureCompatibilityVerifierProperties.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/compatibility/properties/AzureCompatibilityVerifierProperties.java index 6b5d92fa3381..bf80ec79cc08 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/compatibility/properties/AzureCompatibilityVerifierProperties.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/compatibility/properties/AzureCompatibilityVerifierProperties.java @@ -18,7 +18,7 @@ public class AzureCompatibilityVerifierProperties { /** * Comma-delimited list of Spring Boot versions that are compatible with current Spring Cloud Azure's version. */ - private List<String> compatibleBootVersions = Arrays.asList("3.0.x", "3.1.x", "3.2.x", "3.3.x", "3.4.x", "3.5.x"); + private List<String> compatibleBootVersions = Arrays.asList("4.0.x"); public boolean isEnabled() { return this.enabled; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/compatibility/AzureSpringBootVersionVerifierTest.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/compatibility/AzureSpringBootVersionVerifierTest.java index eee0c8cb66be..7c174f17e3e1 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/compatibility/AzureSpringBootVersionVerifierTest.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/compatibility/AzureSpringBootVersionVerifierTest.java @@ -15,7 +15,7 @@ import java.util.Collections; import java.util.List; -import static com.azure.spring.cloud.autoconfigure.implementation.compatibility.AzureSpringBootVersionVerifier.SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_0; +import static com.azure.spring.cloud.autoconfigure.implementation.compatibility.AzureSpringBootVersionVerifier.SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_4_0; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -60,11 +60,11 @@ String getVersionFromManifest() { @ParameterizedTest - @ValueSource(strings = { "3.0", "3.0.x" }) + @ValueSource(strings = { "4.0", "4.0.x" }) void shouldMatchWhenManifestNumberNotPresentAndAcceptedNumberSpecifiedCase1(String acceptedVersion) { List<String> acceptedVersions = Collections.singletonList(acceptedVersion); ClassNameResolverPredicate mockResolver = mock(ClassNameResolverPredicate.class); - when(mockResolver.resolve(SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_0)).thenReturn(true); + when(mockResolver.resolve(SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_4_0)).thenReturn(true); AzureSpringBootVersionVerifier versionVerifier = new AzureSpringBootVersionVerifier(acceptedVersions, mockResolver) { @@ -81,11 +81,11 @@ String getVersionFromManifest() { @ParameterizedTest - @ValueSource(strings = { "3.1", "3.1.x" }) + @ValueSource(strings = { "4.1", "4.1.x" }) void shouldNotMatchWhenManifestNumberNotPresentAndAcceptedNumberSpecifiedCase1(String acceptedVersion) { List<String> acceptedVersions = Collections.singletonList(acceptedVersion); ClassNameResolverPredicate mockResolver = mock(ClassNameResolverPredicate.class); - when(mockResolver.resolve(SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_0)).thenReturn(true); + when(mockResolver.resolve(SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_4_0)).thenReturn(true); AzureSpringBootVersionVerifier versionVerifier = new AzureSpringBootVersionVerifier(acceptedVersions, mockResolver) { @@ -98,11 +98,11 @@ String getVersionFromManifest() { } @ParameterizedTest - @ValueSource(strings = { "3.0.0-M3" }) + @ValueSource(strings = { "4.0.0-M3" }) void shouldNotMatchWhenManifestNumberNotPresentAndAcceptedNumberSpecifiedCase2(String acceptedVersion) { List<String> acceptedVersions = Collections.singletonList(acceptedVersion); ClassNameResolverPredicate mockResolver = mock(ClassNameResolverPredicate.class); - when(mockResolver.resolve(SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_0)).thenReturn(true); + when(mockResolver.resolve(SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_4_0)).thenReturn(true); AzureSpringBootVersionVerifier versionVerifier = new AzureSpringBootVersionVerifier(acceptedVersions, mockResolver) { @@ -115,11 +115,11 @@ String getVersionFromManifest() { } @ParameterizedTest - @ValueSource(strings = { "3.0.0-M4" }) + @ValueSource(strings = { "4.0.0-M4" }) void shouldNotMatchWhenManifestNumberNotPresentAndAcceptedNumberSpecifiedCase3(String acceptedVersion) { List<String> acceptedVersions = Collections.singletonList(acceptedVersion); ClassNameResolverPredicate mockResolver = mock(ClassNameResolverPredicate.class); - when(mockResolver.resolve(SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_0)).thenReturn(true); + when(mockResolver.resolve(SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_4_0)).thenReturn(true); AzureSpringBootVersionVerifier versionVerifier = new AzureSpringBootVersionVerifier(acceptedVersions, mockResolver) { @@ -133,11 +133,11 @@ String getVersionFromManifest() { @ParameterizedTest - @ValueSource(strings = { "3.0", "3.0.x" }) + @ValueSource(strings = { "4.0", "4.0.x" }) void shouldNotMatchWhenManifestNumberNotPresentAndAcceptedNumberSpecifiedCase4(String acceptedVersion) { List<String> acceptedVersions = Collections.singletonList(acceptedVersion); ClassNameResolverPredicate mockResolver = mock(ClassNameResolverPredicate.class); - when(mockResolver.resolve(SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_3_0)).thenReturn(false); + when(mockResolver.resolve(SPRINGBOOT_CONDITIONAL_CLASS_NAME_OF_4_0)).thenReturn(false); AzureSpringBootVersionVerifier versionVerifier = new AzureSpringBootVersionVerifier(acceptedVersions, mockResolver) { From e910378cdda545abddfc99576b6c335f18933fa1 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Mon, 8 Dec 2025 12:55:42 +0800 Subject: [PATCH 119/186] Update compatibility --- .../pipeline/spring-cloud-azure-supported-spring.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json b/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json index 1f8e747b1507..b30e58ee8902 100644 --- a/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json +++ b/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json @@ -4,6 +4,14 @@ "releaseStatus" : "GENERAL_AVAILABILITY", "snapshot" : false, "supportStatus" : "SUPPORTED", + "spring-boot-version" : "4.0.0", + "spring-cloud-version" : "2025.1.0" + }, + { + "current" : true, + "releaseStatus" : "GENERAL_AVAILABILITY", + "snapshot" : false, + "supportStatus" : "END_OF_LIFE", "spring-boot-version" : "3.5.7", "spring-cloud-version" : "2025.0.0" }, From 42c43f4290876eb15a7c16cb86fb21140876f50e Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Mon, 8 Dec 2025 14:44:48 +0800 Subject: [PATCH 120/186] Add jackson-databind --- sdk/spring/spring-cloud-azure-docker-compose/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdk/spring/spring-cloud-azure-docker-compose/pom.xml b/sdk/spring/spring-cloud-azure-docker-compose/pom.xml index b514c2dfa6e6..644dbe79eac2 100644 --- a/sdk/spring/spring-cloud-azure-docker-compose/pom.xml +++ b/sdk/spring/spring-cloud-azure-docker-compose/pom.xml @@ -83,6 +83,11 @@ <artifactId>spring-boot-docker-compose</artifactId> <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-docker-compose;external_dependency} --> </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>2.20.1</version> <!-- {x-version-update;springboot4_com.fasterxml.jackson.core:jackson-databind;external_dependency} --> + </dependency> <!-- Added this dependency to include necessary annotations used by reactor core. Without this dependency, javadoc throws a warning as it cannot find enum When.MAYBE which is used in @Nullable annotation in reactor core classes --> From 21c680a167f99e072cc42081397b73c792cc8c48 Mon Sep 17 00:00:00 2001 From: Rujun Chen <rujche@microsoft.com> Date: Mon, 8 Dec 2025 07:58:21 +0000 Subject: [PATCH 121/186] Fix bugs about `token-credential-bean-name` property (#47470) --- sdk/spring/CHANGELOG.md | 10 +++ ...reEventHubsMessagingAutoConfiguration.java | 25 +++++-- ...eServiceBusMessagingAutoConfiguration.java | 8 ++- ...ntHubsMessagingAutoConfigurationTests.java | 70 +++++++++++++++++- ...iceBusMessagingAutoConfigurationTests.java | 72 ++++++++++++++++++- 5 files changed, 175 insertions(+), 10 deletions(-) diff --git a/sdk/spring/CHANGELOG.md b/sdk/spring/CHANGELOG.md index 725fce466446..68c4ca2bd311 100644 --- a/sdk/spring/CHANGELOG.md +++ b/sdk/spring/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 6.1.0 (Not released) + +### Spring Cloud Azure Autoconfigure +This section includes changes in `spring-cloud-azure-autoconfigure` module. + +#### Bugs Fixed + +- 2 `TokenCredential` bean found in AzureServiceBusMessagingAutoConfiguration. [#47470](https://github.com/Azure/azure-sdk-for-java/pull/47470) +- `spring.cloud.azure.eventhubs.credential.token-credential-bean-name` not take effect in AzureEventHubsMessagingAutoConfiguration. [#47470](https://github.com/Azure/azure-sdk-for-java/pull/47470) + ## 6.0.0 (2025-09-22) - This release is compatible with Spring Boot 3.5.0-3.5.5. (Note: 3.5.x (x>5) should be supported, but they aren't tested with this release.) - This release is compatible with Spring Cloud 2025.0.0. (Note: 2025.0.x(x>0) should be supported, but they aren't tested with this release.) diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfiguration.java index 690d5c158937..5526f7e995a8 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfiguration.java @@ -3,10 +3,12 @@ package com.azure.spring.cloud.autoconfigure.implementation.eventhubs; +import com.azure.core.credential.TokenCredential; import com.azure.messaging.eventhubs.CheckpointStore; import com.azure.messaging.eventhubs.EventData; import com.azure.spring.cloud.autoconfigure.implementation.condition.ConditionalOnAnyProperty; import com.azure.spring.cloud.autoconfigure.implementation.eventhubs.properties.AzureEventHubsProperties; +import com.azure.spring.cloud.core.implementation.credential.resolver.AzureTokenCredentialResolver; import com.azure.spring.cloud.core.provider.connectionstring.ServiceConnectionStringProvider; import com.azure.spring.cloud.core.service.AzureServiceType; import com.azure.spring.messaging.ConsumerIdentifier; @@ -27,6 +29,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.ObjectProvider; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; @@ -37,6 +40,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; +import static com.azure.spring.cloud.autoconfigure.implementation.context.AzureContextUtils.DEFAULT_TOKEN_CREDENTIAL_BEAN_NAME; import static com.azure.spring.cloud.core.implementation.util.AzurePropertiesUtils.copyAzureCommonProperties; /** @@ -83,10 +87,16 @@ static class ProcessorContainerConfiguration { @Bean @ConditionalOnMissingBean EventHubsProcessorFactory defaultEventHubsNamespaceProcessorFactory( - NamespaceProperties properties, CheckpointStore checkpointStore, - ObjectProvider<PropertiesSupplier<ConsumerIdentifier, ProcessorProperties>> suppliers) { - return new DefaultEventHubsNamespaceProcessorFactory(checkpointStore, properties, + NamespaceProperties properties, + CheckpointStore checkpointStore, + ObjectProvider<PropertiesSupplier<ConsumerIdentifier, ProcessorProperties>> suppliers, + ObjectProvider<AzureTokenCredentialResolver> tokenCredentialResolvers, + @Qualifier(DEFAULT_TOKEN_CREDENTIAL_BEAN_NAME) ObjectProvider<TokenCredential> defaultTokenCredentials) { + DefaultEventHubsNamespaceProcessorFactory factory = new DefaultEventHubsNamespaceProcessorFactory(checkpointStore, properties, suppliers.getIfAvailable()); + factory.setDefaultCredential(defaultTokenCredentials.getIfAvailable()); + factory.setTokenCredentialResolver(tokenCredentialResolvers.getIfAvailable()); + return factory; } } @@ -98,8 +108,13 @@ static class EventHubsTemplateConfiguration { @ConditionalOnMissingBean EventHubsProducerFactory defaultEventHubsNamespaceProducerFactory( NamespaceProperties properties, - ObjectProvider<PropertiesSupplier<String, ProducerProperties>> suppliers) { - return new DefaultEventHubsNamespaceProducerFactory(properties, suppliers.getIfAvailable()); + ObjectProvider<PropertiesSupplier<String, ProducerProperties>> suppliers, + ObjectProvider<AzureTokenCredentialResolver> tokenCredentialResolvers, + @Qualifier(DEFAULT_TOKEN_CREDENTIAL_BEAN_NAME) ObjectProvider<TokenCredential> defaultTokenCredentials) { + DefaultEventHubsNamespaceProducerFactory factory = new DefaultEventHubsNamespaceProducerFactory(properties, suppliers.getIfAvailable()); + factory.setDefaultCredential(defaultTokenCredentials.getIfAvailable()); + factory.setTokenCredentialResolver(tokenCredentialResolvers.getIfAvailable()); + return factory; } @Bean diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfiguration.java index 102386fa6bd7..6a410336a85b 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfiguration.java @@ -34,6 +34,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.ObjectProvider; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; @@ -44,6 +45,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; +import static com.azure.spring.cloud.autoconfigure.implementation.context.AzureContextUtils.DEFAULT_TOKEN_CREDENTIAL_BEAN_NAME; import static com.azure.spring.cloud.core.implementation.util.AzurePropertiesUtils.copyAzureCommonProperties; @@ -92,7 +94,7 @@ ServiceBusProcessorFactory defaultServiceBusNamespaceProcessorFactory( NamespaceProperties properties, ObjectProvider<PropertiesSupplier<ConsumerIdentifier, ProcessorProperties>> suppliers, ObjectProvider<AzureTokenCredentialResolver> tokenCredentialResolvers, - ObjectProvider<TokenCredential> defaultTokenCredentials, + @Qualifier(DEFAULT_TOKEN_CREDENTIAL_BEAN_NAME) ObjectProvider<TokenCredential> defaultTokenCredentials, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder>> clientBuilderCustomizers, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusProcessorClientBuilder>> processorClientBuilderCustomizers, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusSessionProcessorClientBuilder>> sessionProcessorClientBuilderCustomizers) { @@ -115,7 +117,7 @@ ServiceBusConsumerFactory defaultServiceBusNamespaceConsumerFactory( NamespaceProperties properties, ObjectProvider<PropertiesSupplier<ConsumerIdentifier, ConsumerProperties>> suppliers, ObjectProvider<AzureTokenCredentialResolver> tokenCredentialResolvers, - ObjectProvider<TokenCredential> defaultTokenCredentials, + @Qualifier(DEFAULT_TOKEN_CREDENTIAL_BEAN_NAME) ObjectProvider<TokenCredential> defaultTokenCredentials, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder>> customizers, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusSessionReceiverClientBuilder>> sessionReceiverCustomizers) { DefaultServiceBusNamespaceConsumerFactory factory = new DefaultServiceBusNamespaceConsumerFactory(properties, suppliers.getIfAvailable()); @@ -136,7 +138,7 @@ ServiceBusProducerFactory defaultServiceBusNamespaceProducerFactory( NamespaceProperties properties, ObjectProvider<PropertiesSupplier<String, ProducerProperties>> suppliers, ObjectProvider<AzureTokenCredentialResolver> tokenCredentialResolvers, - ObjectProvider<TokenCredential> defaultTokenCredentials, + @Qualifier(DEFAULT_TOKEN_CREDENTIAL_BEAN_NAME) ObjectProvider<TokenCredential> defaultTokenCredentials, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder>> clientBuilderCustomizers, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusSenderClientBuilder>> senderClientBuilderCustomizers) { DefaultServiceBusNamespaceProducerFactory factory = new DefaultServiceBusNamespaceProducerFactory(properties, suppliers.getIfAvailable()); diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfigurationTests.java index eea8bec890b2..87daf3997d50 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfigurationTests.java @@ -3,9 +3,15 @@ package com.azure.spring.cloud.autoconfigure.implementation.eventhubs; +import com.azure.core.credential.TokenCredential; import com.azure.messaging.eventhubs.CheckpointStore; +import com.azure.spring.cloud.autoconfigure.implementation.context.AzureGlobalPropertiesAutoConfiguration; +import com.azure.spring.cloud.autoconfigure.implementation.context.AzureTokenCredentialAutoConfiguration; import com.azure.spring.cloud.autoconfigure.implementation.eventhubs.configuration.TestCheckpointStore; +import com.azure.spring.cloud.autoconfigure.implementation.eventhubs.properties.AzureEventHubsProperties; +import com.azure.spring.cloud.core.credential.AzureCredentialResolver; import com.azure.spring.messaging.eventhubs.core.EventHubsProcessorFactory; +import com.azure.spring.messaging.eventhubs.core.EventHubsProducerFactory; import com.azure.spring.messaging.eventhubs.core.EventHubsTemplate; import com.azure.spring.messaging.eventhubs.implementation.support.converter.EventHubsMessageConverter; import com.fasterxml.jackson.databind.ObjectMapper; @@ -14,10 +20,15 @@ import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.ApplicationContextRunner; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.lang.reflect.Field; import static com.azure.spring.cloud.autoconfigure.implementation.eventhubs.EventHubsTestUtils.CONNECTION_STRING_FORMAT; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; +import static org.mockito.Mockito.mock; class AzureEventHubsMessagingAutoConfigurationTests { @@ -121,7 +132,7 @@ void withUserProvidedObjectMapper() { .withPropertyValues("spring.cloud.azure.eventhubs.connection-string=" + String.format(CONNECTION_STRING_FORMAT, "test-namespace"), "spring.cloud.azure.message-converter.isolated-object-mapper=false") .withUserConfiguration(AzureEventHubsPropertiesTestConfiguration.class) - .withBean("userObjectMapper", ObjectMapper.class, () -> new ObjectMapper()) + .withBean("userObjectMapper", ObjectMapper.class, ObjectMapper::new) .withConfiguration(AutoConfigurations.of(JacksonAutoConfiguration.class)) .run(context -> { assertThat(context).hasBean("userObjectMapper"); @@ -130,4 +141,61 @@ void withUserProvidedObjectMapper() { }); } + @Test + void testCustomTokenCredentialConfiguration() { + this.contextRunner + .withConfiguration(AutoConfigurations.of(CustomTokenCredentialConfiguration.class, + AzureTokenCredentialAutoConfiguration.class, + AzureGlobalPropertiesAutoConfiguration.class)) + .withBean(EventHubsMessageConverter.class, EventHubsMessageConverter::new) + .withPropertyValues( + "spring.cloud.azure.eventhubs.connection-string=" + String.format(CONNECTION_STRING_FORMAT, "test-namespace"), + "spring.cloud.azure.eventhubs.credential.token-credential-bean-name=customTokenCredential" + ) + .withUserConfiguration(AzureEventHubsPropertiesTestConfiguration.class) + .run(context -> { + + // Verify that the properties contain the correct credential bean name + AzureEventHubsProperties eventHubsProperties = context.getBean(AzureEventHubsProperties.class); + assertThat(eventHubsProperties).isNotNull(); + assertThat(eventHubsProperties.getCredential()).isNotNull(); + assertThat(eventHubsProperties.getCredential().getTokenCredentialBeanName()) + .as("The token-credential-bean-name property should be set to customTokenCredential") + .isEqualTo("customTokenCredential"); + + // Verify that the custom token credential bean exists + assertThat(context).hasBean("customTokenCredential"); + TokenCredential customCredential = context.getBean("customTokenCredential", TokenCredential.class); + assertThat(customCredential).isNotNull(); + + // Verify the EventHubsProducerFactory has the tokenCredentialResolver configured + assertThat(context).hasSingleBean(EventHubsProducerFactory.class); + EventHubsProducerFactory producerFactory = context.getBean(EventHubsProducerFactory.class); + assertThat(producerFactory).isNotNull(); + + // Verify tokenCredentialResolver resolves to the custom credential + Field tokenCredentialResolverField = producerFactory.getClass().getDeclaredField("tokenCredentialResolver"); + tokenCredentialResolverField.setAccessible(true); + Object tokenCredentialResolver = tokenCredentialResolverField.get(producerFactory); + assertThat(tokenCredentialResolver).as("TokenCredentialResolver should be configured").isNotNull(); + + // Cast to AzureCredentialResolver and invoke resolve() to verify it returns customTokenCredential + @SuppressWarnings("unchecked") + AzureCredentialResolver<TokenCredential> resolver = + (AzureCredentialResolver<TokenCredential>) tokenCredentialResolver; + TokenCredential resolvedCredential = resolver.resolve(eventHubsProperties); + assertThat(resolvedCredential) + .as("The resolved credential should be the customTokenCredential bean") + .isSameAs(customCredential); + }); + } + + @Configuration + public static class CustomTokenCredentialConfiguration { + @Bean + public TokenCredential customTokenCredential() { + return mock(TokenCredential.class); + } + } + } diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfigurationTests.java index e1622836b4ad..0e60e03432c1 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfigurationTests.java @@ -3,7 +3,13 @@ package com.azure.spring.cloud.autoconfigure.implementation.servicebus; +import com.azure.core.credential.TokenCredential; +import com.azure.spring.cloud.autoconfigure.implementation.context.AzureGlobalPropertiesAutoConfiguration; +import com.azure.spring.cloud.autoconfigure.implementation.context.AzureTokenCredentialAutoConfiguration; +import com.azure.spring.cloud.autoconfigure.implementation.servicebus.properties.AzureServiceBusProperties; +import com.azure.spring.cloud.core.credential.AzureCredentialResolver; import com.azure.spring.messaging.servicebus.core.ServiceBusProcessorFactory; +import com.azure.spring.messaging.servicebus.core.ServiceBusProducerFactory; import com.azure.spring.messaging.servicebus.core.ServiceBusTemplate; import com.azure.spring.messaging.servicebus.implementation.support.converter.ServiceBusMessageConverter; import com.fasterxml.jackson.databind.ObjectMapper; @@ -12,10 +18,15 @@ import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.ApplicationContextRunner; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.lang.reflect.Field; import static com.azure.spring.cloud.autoconfigure.implementation.util.TestServiceBusUtils.CONNECTION_STRING_FORMAT; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; +import static org.mockito.Mockito.mock; class AzureServiceBusMessagingAutoConfigurationTests { @@ -117,7 +128,7 @@ void withUserProvidedObjectMapper() { .withPropertyValues("spring.cloud.azure.servicebus.connection-string=" + String.format(CONNECTION_STRING_FORMAT, "test-namespace"), "spring.cloud.azure.message-converter.isolated-object-mapper=false") .withUserConfiguration(AzureServiceBusPropertiesTestConfiguration.class) - .withBean("userObjectMapper", ObjectMapper.class, () -> new ObjectMapper()) + .withBean("userObjectMapper", ObjectMapper.class, ObjectMapper::new) .withConfiguration(AutoConfigurations.of(JacksonAutoConfiguration.class)) .run(context -> { assertThat(context).hasBean("userObjectMapper"); @@ -126,4 +137,63 @@ void withUserProvidedObjectMapper() { }); } + @Test + void testCustomTokenCredentialConfiguration() { + this.contextRunner + .withConfiguration(AutoConfigurations.of(CustomTokenCredentialConfiguration.class, + AzureTokenCredentialAutoConfiguration.class, + AzureGlobalPropertiesAutoConfiguration.class)) + .withBean(ServiceBusMessageConverter.class, () -> mock(ServiceBusMessageConverter.class)) + .withPropertyValues( + "spring.cloud.azure.servicebus.connection-string=" + String.format(CONNECTION_STRING_FORMAT, "test-namespace"), + "spring.cloud.azure.servicebus.credential.token-credential-bean-name=customTokenCredential" + ) + .withUserConfiguration(AzureServiceBusPropertiesTestConfiguration.class) + .run(context -> { + + // Verify that the properties contain the correct credential bean name + AzureServiceBusProperties serviceBusProperties = context.getBean(AzureServiceBusProperties.class); + assertThat(serviceBusProperties).isNotNull(); + assertThat(serviceBusProperties.getCredential()).isNotNull(); + assertThat(serviceBusProperties.getCredential().getTokenCredentialBeanName()) + .as("The token-credential-bean-name property should be set to customTokenCredential") + .isEqualTo("customTokenCredential"); + + // Verify that the custom token credential bean exists + assertThat(context).hasBean("customTokenCredential"); + TokenCredential customCredential = context.getBean("customTokenCredential", TokenCredential.class); + assertThat(customCredential).isNotNull(); + + // Verify the ServiceBusProducerFactory has the tokenCredentialResolver configured + assertThat(context).hasSingleBean(ServiceBusProducerFactory.class); + ServiceBusProducerFactory producerFactory = context.getBean(ServiceBusProducerFactory.class); + assertThat(producerFactory).isNotNull(); + + // Verify tokenCredentialResolver resolves to the custom credential + Field tokenCredentialResolverField = + producerFactory.getClass().getDeclaredField("tokenCredentialResolver"); + tokenCredentialResolverField.setAccessible(true); + Object tokenCredentialResolver = tokenCredentialResolverField.get(producerFactory); + assertThat(tokenCredentialResolver) + .as("TokenCredentialResolver should be configured").isNotNull(); + + // Cast to AzureCredentialResolver and invoke resolve() to verify it returns customTokenCredential + @SuppressWarnings("unchecked") + AzureCredentialResolver<TokenCredential> resolver = + (AzureCredentialResolver<TokenCredential>) tokenCredentialResolver; + TokenCredential resolvedCredential = resolver.resolve(serviceBusProperties); + assertThat(resolvedCredential) + .as("The resolved credential should be the customTokenCredential bean") + .isSameAs(customCredential); + }); + } + + @Configuration + public static class CustomTokenCredentialConfiguration { + @Bean + public TokenCredential customTokenCredential() { + return mock(TokenCredential.class); + } + } + } From b4be9cf7ecc3f1290f23d09db7ec4ac374d8a54c Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Mon, 8 Dec 2025 10:51:43 -0500 Subject: [PATCH 122/186] Remove commons-io dependency from Azure Cosmos Spark (#47367) --- sdk/cosmos/azure-cosmos-spark_3/pom.xml | 7 ------ .../spark/ChangeFeedInitialOffsetWriter.scala | 24 +++++++++++++++++-- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-spark_3/pom.xml b/sdk/cosmos/azure-cosmos-spark_3/pom.xml index e620df1b0373..f01429ebb7a1 100644 --- a/sdk/cosmos/azure-cosmos-spark_3/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_3/pom.xml @@ -55,12 +55,6 @@ <version>2.12.19</version> <!-- {x-version-update;cosmos_org.scala-lang:scala-library;external_dependency} --> <scope>provided</scope> </dependency> - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>2.4</version> <!-- {x-version-update;cosmos_commons-io:commons-io;external_dependency} --> - <scope>provided</scope> - </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> @@ -288,7 +282,6 @@ <include>org.apache.spark:spark-sql_2.12:[3.3.0]</include> <!-- {x-include-update;cosmos-spark_3-3_org.apache.spark:spark-sql_2.12;external_dependency} --> <include>org.apache.spark:spark-sql_2.12:[3.4.0]</include> <!-- {x-include-update;cosmos-spark_3-4_org.apache.spark:spark-sql_2.12;external_dependency} --> <include>org.apache.spark:spark-sql_2.12:[3.5.0]</include> <!-- {x-include-update;cosmos-spark_3-5_org.apache.spark:spark-sql_2.12;external_dependency} --> - <include>commons-io:commons-io:[2.4]</include> <!-- {x-include-update;cosmos_commons-io:commons-io;external_dependency} --> <include>org.scala-lang:scala-library:[2.12.19]</include> <!-- {x-include-update;cosmos_org.scala-lang:scala-library;external_dependency} --> <include>org.scala-lang.modules:scala-java8-compat_2.12:[0.8.0]</include> <!-- {x-include-update;cosmos_org.scala-lang.modules:scala-java8-compat_2.12;external_dependency} --> <include>io.projectreactor:reactor-scala-extensions_2.12:[0.8.0]</include> <!-- {x-include-update;cosmos_io.projectreactor:reactor-scala-extensions_2.12;external_dependency} --> diff --git a/sdk/cosmos/azure-cosmos-spark_3/src/main/scala/com/azure/cosmos/spark/ChangeFeedInitialOffsetWriter.scala b/sdk/cosmos/azure-cosmos-spark_3/src/main/scala/com/azure/cosmos/spark/ChangeFeedInitialOffsetWriter.scala index 141c8b431f77..8f22181a4fab 100644 --- a/sdk/cosmos/azure-cosmos-spark_3/src/main/scala/com/azure/cosmos/spark/ChangeFeedInitialOffsetWriter.scala +++ b/sdk/cosmos/azure-cosmos-spark_3/src/main/scala/com/azure/cosmos/spark/ChangeFeedInitialOffsetWriter.scala @@ -2,7 +2,6 @@ // Licensed under the MIT License. package com.azure.cosmos.spark -import org.apache.commons.io.IOUtils import org.apache.spark.sql.SparkSession import org.apache.spark.sql.execution.streaming.{HDFSMetadataLog, MetadataVersionUtil} @@ -25,7 +24,7 @@ private class ChangeFeedInitialOffsetWriter } override def deserialize(in: InputStream): String = { - val content = IOUtils.toString(new InputStreamReader(in, StandardCharsets.UTF_8)) + val content = readerToString(new InputStreamReader(in, StandardCharsets.UTF_8)) // HDFSMetadataLog would never create a partial file. require(content.nonEmpty) val indexOfNewLine = content.indexOf("\n") @@ -37,4 +36,25 @@ private class ChangeFeedInitialOffsetWriter MetadataVersionUtil.validateVersion(content.substring(0, indexOfNewLine), VERSION) content.substring(indexOfNewLine + 1) } + + private def readerToString(reader: java.io.Reader): String = { + val writer = new StringBuilderWriter + val buffer = new Array[Char](4096) + Stream.continually(reader.read(buffer)).takeWhile(_ != -1).foreach(writer.write(buffer, 0, _)) + writer.toString + } + + private class StringBuilderWriter extends java.io.Writer { + private val stringBuilder = new StringBuilder + + override def write(cbuf: Array[Char], off: Int, len: Int): Unit = { + stringBuilder.appendAll(cbuf, off, len) + } + + override def flush(): Unit = {} + + override def close(): Unit = {} + + override def toString: String = stringBuilder.toString() + } } From 074e3aaee05f73ba1c4f341fc951aaaa816f05ff Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 8 Dec 2025 17:40:14 -0800 Subject: [PATCH 123/186] Sync eng/common directory with azure-sdk-tools for PR 13267 (#47499) * Updated artifactJson input to artifacts input * Prioritized service directory from artifact object over the parameter input * Returned error when service directory is not provided for the old usage * Removed redudant line * Initilized the variable in a loop --------- Co-authored-by: ray chen <raychen@microsoft.com> --- .../steps/set-test-pipeline-version.yml | 8 +- eng/common/scripts/SetTestPipelineVersion.ps1 | 97 ++++++++++++------- 2 files changed, 67 insertions(+), 38 deletions(-) diff --git a/eng/common/pipelines/templates/steps/set-test-pipeline-version.yml b/eng/common/pipelines/templates/steps/set-test-pipeline-version.yml index cb4d8ff33334..1e54d16834ba 100644 --- a/eng/common/pipelines/templates/steps/set-test-pipeline-version.yml +++ b/eng/common/pipelines/templates/steps/set-test-pipeline-version.yml @@ -14,9 +14,9 @@ parameters: - name: TestPipeline type: boolean default: false -- name: ArtifactsJson - type: string - default: '' +- name: Artifacts + type: object + default: [] steps: - ${{ if eq(parameters.TestPipeline, true) }}: @@ -31,5 +31,5 @@ steps: -PackageNames '${{ coalesce(parameters.PackageName, parameters.PackageNames) }}' -ServiceDirectory '${{ parameters.ServiceDirectory }}' -TagSeparator '${{ parameters.TagSeparator }}' - -ArtifactsJson '${{ parameters.ArtifactsJson }}' + -Artifacts @('${{ replace(convertToJson(parameters.Artifacts), '''', '`''') }}' | ConvertFrom-Json) pwsh: true diff --git a/eng/common/scripts/SetTestPipelineVersion.ps1 b/eng/common/scripts/SetTestPipelineVersion.ps1 index dea5496874e8..17177a32b573 100644 --- a/eng/common/scripts/SetTestPipelineVersion.ps1 +++ b/eng/common/scripts/SetTestPipelineVersion.ps1 @@ -5,63 +5,83 @@ param ( [string]$BuildID, [Parameter(mandatory = $false)] [string]$PackageNames = "", - [Parameter(mandatory = $true)] + [Parameter(mandatory = $false)] + # ServiceDirectory is required when using PackageNames, + # or when Artifacts do not include their own ServiceDirectory property. [string]$ServiceDirectory, [Parameter(mandatory = $false)] [string]$TagSeparator = "_", [Parameter(mandatory = $false)] - [string]$ArtifactsJson = "" + [object[]]$Artifacts = @() ) . (Join-Path $PSScriptRoot common.ps1) +# Ensure Artifacts is always an array +$Artifacts = @($Artifacts) + Write-Host "PackageNames: $PackageNames" Write-Host "ServiceDirectory: $ServiceDirectory" Write-Host "BuildID: $BuildID" -Write-Host "ArtifactsJson: $ArtifactsJson" +Write-Host "Artifacts count: $($Artifacts.Count)" -$packageNamesArray = @() -$artifacts = $null - -# If ArtifactsJson is provided, extract package names from it -if (![String]::IsNullOrWhiteSpace($ArtifactsJson)) { - Write-Host "Using ArtifactsJson to determine package names" +if ($Artifacts -and $Artifacts.Count -gt 0) { + # When using Artifacts, process each artifact with its name and groupId (if applicable) try { - $artifacts = $ArtifactsJson | ConvertFrom-Json - $packageNamesArray = $artifacts | ForEach-Object { $_.name } - Write-Host "Extracted package names from ArtifactsJson: $($packageNamesArray -join ', ')" - } - catch { - LogError "Failed to parse ArtifactsJson: $($_.Exception.Message)" - exit 1 - } -} -elseif (![String]::IsNullOrWhiteSpace($PackageNames)) { - $packageNamesArray = $PackageNames.Split(',') -} -else { - LogError "Either PackageNames or ArtifactsJson must be provided." - exit 1 -} + foreach ($artifact in $Artifacts) { + # Validate required properties + if (-not (Get-Member -InputObject $artifact -Name 'name' -MemberType Properties)) { + LogError "Artifact is missing required 'name' property." + exit 1 + } -if ($artifacts) { - # When using ArtifactsJson, process each artifact with its name and groupId (if applicable) - try { - foreach ($artifact in $artifacts) { $packageName = $artifact.name + if ([String]::IsNullOrWhiteSpace($packageName)) { + LogError "Artifact 'name' property is null or empty." + exit 1 + } + + $artifactServiceDirectory = $null + # Check for ServiceDirectory property + if (Get-Member -InputObject $artifact -Name 'ServiceDirectory' -MemberType Properties) { + if (![String]::IsNullOrWhiteSpace($artifact.ServiceDirectory)) { + $artifactServiceDirectory = $artifact.ServiceDirectory + } + } + + if ([String]::IsNullOrWhiteSpace($artifactServiceDirectory)) { + $artifactServiceDirectory = $ServiceDirectory + } + + # Validate ServiceDirectory is available + if ([String]::IsNullOrWhiteSpace($artifactServiceDirectory)) { + LogError "ServiceDirectory is required but not provided for artifact '$packageName'. Provide it via script parameter or artifact property." + exit 1 + } + $newVersion = [AzureEngSemanticVersion]::new("1.0.0") $prefix = "$packageName$TagSeparator" if ($Language -eq "java") { + # Check for groupId property + if (-not (Get-Member -InputObject $artifact -Name 'groupId' -MemberType Properties)) { + LogError "Artifact '$packageName' is missing required 'groupId' property for Java language." + exit 1 + } + $groupId = $artifact.groupId - Write-Host "Processing $packageName with groupId $groupId" if ([String]::IsNullOrWhiteSpace($groupId)) { LogError "GroupId is missing for package $packageName." exit 1 } + + Write-Host "Processing $packageName with groupId $groupId" # Use groupId+artifactName format for tag prefix (e.g., "com.azure.v2+azure-sdk-template_") $prefix = "$groupId+$packageName$TagSeparator" } + else { + Write-Host "Processing $packageName" + } Write-Host "Get Latest Tag : git tag -l $prefix*" $latestTags = git tag -l "$prefix*" @@ -87,21 +107,27 @@ if ($artifacts) { if ($Language -ne "java") { SetPackageVersion -PackageName $packageName ` -Version $newVersion.ToString() ` - -ServiceDirectory $ServiceDirectory + -ServiceDirectory $artifactServiceDirectory } else { SetPackageVersion -PackageName $packageName ` -Version $newVersion.ToString() ` - -ServiceDirectory $ServiceDirectory ` + -ServiceDirectory $artifactServiceDirectory ` -GroupId $groupId } } } catch { - LogError "Failed to process ArtifactsJson: $ArtifactsJson, exception: $($_.Exception.Message)" + LogError "Failed to process Artifacts: exception: $($_.Exception.Message)" exit 1 } -} else { +} elseif (![String]::IsNullOrWhiteSpace($PackageNames)) { # Fallback to original logic when using PackageNames string + if ([String]::IsNullOrWhiteSpace($ServiceDirectory)) { + LogError "ServiceDirectory is required when using PackageNames." + exit 1 + } + + $packageNamesArray = $PackageNames.Split(',') foreach ($packageName in $packageNamesArray) { Write-Host "Processing $packageName" $newVersion = [AzureEngSemanticVersion]::new("1.0.0") @@ -131,4 +157,7 @@ if ($artifacts) { -Version $newVersion.ToString() ` -ServiceDirectory $ServiceDirectory } +} else { + LogError "Either PackageNames or Artifacts must be provided." + exit 1 } From 143ba3ac56265b1eb3e2ed3ee7bdedebf16d28b1 Mon Sep 17 00:00:00 2001 From: Muyao Feng <92105726+Netyyyy@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:59:49 +0800 Subject: [PATCH 124/186] Merge 5.24 CHANGELOG (#47497) --- sdk/spring/CHANGELOG.md | 13 +++++++++++++ sdk/spring/azure-spring-data-cosmos/CHANGELOG.md | 5 +++++ 2 files changed, 18 insertions(+) diff --git a/sdk/spring/CHANGELOG.md b/sdk/spring/CHANGELOG.md index 68c4ca2bd311..4447d6f30c75 100644 --- a/sdk/spring/CHANGELOG.md +++ b/sdk/spring/CHANGELOG.md @@ -10,6 +10,19 @@ This section includes changes in `spring-cloud-azure-autoconfigure` module. - 2 `TokenCredential` bean found in AzureServiceBusMessagingAutoConfiguration. [#47470](https://github.com/Azure/azure-sdk-for-java/pull/47470) - `spring.cloud.azure.eventhubs.credential.token-credential-bean-name` not take effect in AzureEventHubsMessagingAutoConfiguration. [#47470](https://github.com/Azure/azure-sdk-for-java/pull/47470) +## 5.24.0 (2025-12-04) +- This release is compatible with Spring Boot 3.5.0-3.5.8, 3.4.0-3.4.12, 3.3.0-3.3.13, 3.2.0-3.2.12, 3.1.0-3.1.12, 3.0.0-3.0.13. (Note: 3.5.x (x>8) and 3.4.y (y>12) should be supported, but they aren't tested with this release.) +- This release is compatible with Spring Cloud 2025.0.0, 2024.0.0-2024.0.2, 2023.0.0-2023.0.5, 2022.0.0-2022.0.5. (Note: 2025.0.x(x>0) and 2024.0.y (y>2) should be supported, but they aren't tested with this release.) + +### Spring Cloud Azure Dependencies (BOM) + +#### Dependency Updates +- Upgrade `azure-servicebus-jms` to 2.1.0. + +### Azure Spring Data Cosmos +This section includes changes in `azure-spring-data-cosmos` module. +Please refer to [azure-spring-data-cosmos/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/azure-spring-data-cosmos/CHANGELOG.md#5240-2025-12-04) for more details. + ## 6.0.0 (2025-09-22) - This release is compatible with Spring Boot 3.5.0-3.5.5. (Note: 3.5.x (x>5) should be supported, but they aren't tested with this release.) - This release is compatible with Spring Cloud 2025.0.0. (Note: 2025.0.x(x>0) should be supported, but they aren't tested with this release.) diff --git a/sdk/spring/azure-spring-data-cosmos/CHANGELOG.md b/sdk/spring/azure-spring-data-cosmos/CHANGELOG.md index bd35d355db4c..c9dce30f8b3b 100644 --- a/sdk/spring/azure-spring-data-cosmos/CHANGELOG.md +++ b/sdk/spring/azure-spring-data-cosmos/CHANGELOG.md @@ -10,6 +10,11 @@ #### Other Changes +### 5.24.0 (2025-12-04) + +#### Other Changes +* regular release + ### 6.0.0 (2025-09-22) #### Other Changes From 272013b92fbeba21bcb733961382f75df578af37 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 8 Dec 2025 23:41:09 -0800 Subject: [PATCH 125/186] LogGroupStart should have local build output (#47506) Co-authored-by: Patrick Hallisey <pahallis@microsoft.com> --- eng/common/scripts/logging.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eng/common/scripts/logging.ps1 b/eng/common/scripts/logging.ps1 index c57bd0a51972..ae0c85438659 100644 --- a/eng/common/scripts/logging.ps1 +++ b/eng/common/scripts/logging.ps1 @@ -94,6 +94,9 @@ function LogGroupStart() { elseif (Test-SupportsGitHubLogging) { Write-Host "::group::$args" } + else { + Write-Host "> $args" + } } function LogGroupEnd() { From 01f43022fa3b1d502a4cde94c97cc8f106388f8c Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Tue, 9 Dec 2025 16:45:29 +0800 Subject: [PATCH 126/186] fix --- sdk/spring/spring-cloud-azure-docker-compose/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/spring/spring-cloud-azure-docker-compose/pom.xml b/sdk/spring/spring-cloud-azure-docker-compose/pom.xml index 644dbe79eac2..63e07dc556fb 100644 --- a/sdk/spring/spring-cloud-azure-docker-compose/pom.xml +++ b/sdk/spring/spring-cloud-azure-docker-compose/pom.xml @@ -165,6 +165,7 @@ <rules> <bannedDependencies> <includes> + <include>com.fasterxml.jackson.core:jackson-databind:[2.20.1]</include> <!-- {x-include-update;springboot4_com.fasterxml.jackson.core:jackson-databind;external_dependency} --> <include>org.springframework.boot:spring-boot-docker-compose:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-docker-compose;external_dependency} --> </includes> </bannedDependencies> From 72f01aa62e084ee6f276d8fb7e50994ec5d17ad8 Mon Sep 17 00:00:00 2001 From: Muyao Feng <92105726+Netyyyy@users.noreply.github.com> Date: Tue, 9 Dec 2025 17:01:57 +0800 Subject: [PATCH 127/186] Update Spring Boot and Spring Cloud versions for the Spring compatibility tests. (#47486) This commit is created by GitHub Action: https://github.com/Azure/spring-cloud-azure-tools/actions/runs/20019763336 Co-authored-by: github-actions <github-actions@github.com> --- .../spring-cloud-azure-supported-spring.json | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json b/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json index 1f8e747b1507..3f39532fb660 100644 --- a/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json +++ b/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json @@ -1,9 +1,25 @@ [ { - "current" : true, + "current" : false, + "releaseStatus" : "SNAPSHOT", + "snapshot" : true, + "supportStatus" : "TODO", + "spring-boot-version" : "3.5.9-SNAPSHOT", + "spring-cloud-version" : "2025.0.0" + }, + { + "current" : false, "releaseStatus" : "GENERAL_AVAILABILITY", "snapshot" : false, "supportStatus" : "SUPPORTED", + "spring-boot-version" : "3.5.8", + "spring-cloud-version" : "2025.0.0" + }, + { + "current" : false, + "releaseStatus" : "GENERAL_AVAILABILITY", + "snapshot" : false, + "supportStatus" : "END_OF_LIFE", "spring-boot-version" : "3.5.7", "spring-cloud-version" : "2025.0.0" }, @@ -1075,7 +1091,7 @@ "current" : false, "releaseStatus" : "GENERAL_AVAILABILITY", "snapshot" : false, - "supportStatus" : "SUPPORTED", + "supportStatus" : "END_OF_LIFE", "spring-boot-version" : "2.6.15", "spring-cloud-version" : "2021.0.7" }, @@ -1187,7 +1203,7 @@ "current" : false, "releaseStatus" : "GENERAL_AVAILABILITY", "snapshot" : false, - "supportStatus" : "SUPPORTED", + "supportStatus" : "END_OF_LIFE", "spring-boot-version" : "2.5.15", "spring-cloud-version" : "2020.0.6" }, From 7f833595f4e27fafde5ec7e71af60abb522c860a Mon Sep 17 00:00:00 2001 From: Fabian Meiswinkel <fabianm@microsoft.com> Date: Tue, 9 Dec 2025 17:18:49 +0000 Subject: [PATCH 128/186] Cosmos release 2025-12-09 (#47495) --- eng/versioning/version_client.txt | 12 ++++++------ sdk/cosmos/azure-cosmos-benchmark/pom.xml | 4 ++-- sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md | 9 ++------- sdk/cosmos/azure-cosmos-encryption/README.md | 2 +- sdk/cosmos/azure-cosmos-encryption/pom.xml | 4 ++-- sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md | 8 +------- sdk/cosmos/azure-cosmos-kafka-connect/pom.xml | 4 ++-- .../pom.xml | 4 ++-- sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md | 8 +------- sdk/cosmos/azure-cosmos-spark_3-3_2-12/README.md | 7 +++++-- sdk/cosmos/azure-cosmos-spark_3-3_2-12/pom.xml | 2 +- sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md | 8 +------- sdk/cosmos/azure-cosmos-spark_3-4_2-12/README.md | 7 +++++-- sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml | 2 +- sdk/cosmos/azure-cosmos-spark_3-5_2-12/CHANGELOG.md | 8 +------- sdk/cosmos/azure-cosmos-spark_3-5_2-12/README.md | 7 +++++-- sdk/cosmos/azure-cosmos-spark_3-5_2-12/pom.xml | 2 +- sdk/cosmos/azure-cosmos-spark_3/docs/quick-start.md | 6 +++--- sdk/cosmos/azure-cosmos-spark_3/pom.xml | 2 +- sdk/cosmos/azure-cosmos-test/CHANGELOG.md | 8 +++----- sdk/cosmos/azure-cosmos-test/README.md | 2 +- sdk/cosmos/azure-cosmos-test/pom.xml | 2 +- sdk/cosmos/azure-cosmos-tests/pom.xml | 2 +- sdk/cosmos/azure-cosmos/CHANGELOG.md | 6 +----- sdk/cosmos/azure-cosmos/pom.xml | 2 +- sdk/cosmos/fabric-cosmos-spark-auth_3/pom.xml | 4 ++-- 26 files changed, 53 insertions(+), 79 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 2ae15904a3a1..552488a5703b 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -104,20 +104,20 @@ com.azure:azure-core-test;1.27.0-beta.13;1.27.0-beta.14 com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.61;1.0.0-beta.62 com.azure:azure-core-tracing-opentelemetry-samples;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-core-version-tests;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-cosmos;4.75.0;4.76.0-beta.1 +com.azure:azure-cosmos;4.75.0;4.76.0 com.azure:azure-cosmos-benchmark;4.0.1-beta.1;4.0.1-beta.1 com.azure.cosmos.spark:azure-cosmos-spark_3;0.0.1-beta.1;0.0.1-beta.1 com.azure.cosmos.spark:azure-cosmos-spark_3-5;0.0.1-beta.1;0.0.1-beta.1 -com.azure:azure-cosmos-encryption;2.24.0;2.25.0-beta.1 +com.azure:azure-cosmos-encryption;2.24.0;2.25.0 com.azure.cosmos.spark:azure-cosmos-spark-account-data-resolver-sample;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-cosmos-test;1.0.0-beta.15;1.0.0-beta.16 -com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12;4.41.0;4.42.0-beta.1 -com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12;4.41.0;4.42.0-beta.1 -com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;4.41.0;4.42.0-beta.1 +com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12;4.41.0;4.42.0 +com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12;4.41.0;4.42.0 +com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;4.41.0;4.42.0 com.azure.cosmos.spark:fabric-cosmos-spark-auth_3;1.1.0;1.2.0-beta.1 com.azure:azure-cosmos-tests;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-data-appconfiguration;1.8.5;1.9.0-beta.1 -com.azure.cosmos.kafka:azure-cosmos-kafka-connect;2.6.1;2.7.0-beta.1 +com.azure.cosmos.kafka:azure-cosmos-kafka-connect;2.6.1;2.7.0 com.azure:azure-data-appconfiguration-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-data-schemaregistry;1.5.9;1.6.0-beta.1 com.azure:azure-data-schemaregistry-apacheavro;1.1.30;1.2.0-beta.3 diff --git a/sdk/cosmos/azure-cosmos-benchmark/pom.xml b/sdk/cosmos/azure-cosmos-benchmark/pom.xml index d865417c6dca..ee6a3ab1f2b1 100644 --- a/sdk/cosmos/azure-cosmos-benchmark/pom.xml +++ b/sdk/cosmos/azure-cosmos-benchmark/pom.xml @@ -52,13 +52,13 @@ Licensed under the MIT License. <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.76.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> + <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos-encryption</artifactId> - <version>2.25.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos-encryption;current} --> + <version>2.25.0</version> <!-- {x-version-update;com.azure:azure-cosmos-encryption;current} --> </dependency> <dependency> diff --git a/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md b/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md index a7cc8f227e3b..2f1827c9242a 100644 --- a/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md @@ -1,15 +1,10 @@ ## Release History -### 2.25.0-beta.1 (Unreleased) - -#### Features Added - -#### Breaking Changes - -#### Bugs Fixed +### 2.25.0 (2025-12-09) #### Other Changes * Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) +* Updated `azure-cosmos` to version `4.76.0`. ### 2.24.0 (2025-10-21) #### Other Changes diff --git a/sdk/cosmos/azure-cosmos-encryption/README.md b/sdk/cosmos/azure-cosmos-encryption/README.md index d460dca455f1..1a79332f7457 100644 --- a/sdk/cosmos/azure-cosmos-encryption/README.md +++ b/sdk/cosmos/azure-cosmos-encryption/README.md @@ -12,7 +12,7 @@ The Azure Cosmos Encryption Plugin is used for encrypting data with a user-provi <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos-encryption</artifactId> - <version>2.25.0-beta.1</version> + <version>2.25.0</version> </dependency> ``` [//]: # ({x-version-update-end}) diff --git a/sdk/cosmos/azure-cosmos-encryption/pom.xml b/sdk/cosmos/azure-cosmos-encryption/pom.xml index 1a2eeb22d564..2ec6e7beb33e 100644 --- a/sdk/cosmos/azure-cosmos-encryption/pom.xml +++ b/sdk/cosmos/azure-cosmos-encryption/pom.xml @@ -13,7 +13,7 @@ Licensed under the MIT License. <groupId>com.azure</groupId> <artifactId>azure-cosmos-encryption</artifactId> - <version>2.25.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos-encryption;current} --> + <version>2.25.0</version> <!-- {x-version-update;com.azure:azure-cosmos-encryption;current} --> <name>Encryption Plugin for Azure Cosmos DB SDK</name> <description>This Package contains Encryption Plugin for Microsoft Azure Cosmos SDK</description> <packaging>jar</packaging> @@ -61,7 +61,7 @@ Licensed under the MIT License. <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.76.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> + <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> </dependency> <dependency> diff --git a/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md b/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md index 0fec6fe0780b..6649ce12fbaa 100644 --- a/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md @@ -1,12 +1,6 @@ ## Release History -### 2.7.0-beta.1 (Unreleased) - -#### Features Added - -#### Breaking Changes - -#### Bugs Fixed +### 2.7.0 (2025-12-09) #### Other Changes * Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) diff --git a/sdk/cosmos/azure-cosmos-kafka-connect/pom.xml b/sdk/cosmos/azure-cosmos-kafka-connect/pom.xml index 8c667bf4db24..5590ebb9ff63 100644 --- a/sdk/cosmos/azure-cosmos-kafka-connect/pom.xml +++ b/sdk/cosmos/azure-cosmos-kafka-connect/pom.xml @@ -13,7 +13,7 @@ Licensed under the MIT License. <groupId>com.azure.cosmos.kafka</groupId> <artifactId>azure-cosmos-kafka-connect</artifactId> - <version>2.7.0-beta.1</version> <!-- {x-version-update;com.azure.cosmos.kafka:azure-cosmos-kafka-connect;current} --> + <version>2.7.0</version> <!-- {x-version-update;com.azure.cosmos.kafka:azure-cosmos-kafka-connect;current} --> <name>Apache Kafka Connect connector for Azure Cosmos DB</name> <description>This Package contains an Apache Kafka Connect source and sink connector for Azure Cosmos DB</description> <packaging>jar</packaging> @@ -92,7 +92,7 @@ Licensed under the MIT License. <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.76.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> + <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> </dependency> <!-- Added this provided dependency to include necessary annotations used by "reactor-core". diff --git a/sdk/cosmos/azure-cosmos-spark-account-data-resolver-sample/pom.xml b/sdk/cosmos/azure-cosmos-spark-account-data-resolver-sample/pom.xml index 725aa4898852..f96927a93261 100644 --- a/sdk/cosmos/azure-cosmos-spark-account-data-resolver-sample/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark-account-data-resolver-sample/pom.xml @@ -97,7 +97,7 @@ <dependency> <groupId>com.azure.cosmos.spark</groupId> <artifactId>azure-cosmos-spark_3-5_2-12</artifactId> - <version>4.42.0-beta.1</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> + <version>4.42.0</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> <scope>provided</scope> </dependency> <dependency> @@ -292,7 +292,7 @@ <include>com.fasterxml.jackson.core:jackson-databind:[2.15.2]</include> <!-- {x-include-update;cosmos_com.fasterxml.jackson.core:jackson-databind;external_dependency} --> <include>com.fasterxml.jackson.module:jackson-module-scala_2.12:[2.15.2]</include> <!-- {x-include-update;cosmos_com.fasterxml.jackson.module:jackson-module-scala_2.12;external_dependency} --> <include>com.globalmentor:hadoop-bare-naked-local-fs:[0.1.0]</include> <!-- {x-include-update;cosmos_com.globalmentor:hadoop-bare-naked-local-fs;external_dependency} --> - <include>com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12:[4.42.0-beta.1]</include> <!-- {x-include-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> + <include>com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12:[4.42.0]</include> <!-- {x-include-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> </includes> </bannedDependencies> </rules> diff --git a/sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md b/sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md index 6191c9707903..e9d916e21278 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md @@ -1,12 +1,6 @@ ## Release History -### 4.42.0-beta.1 (Unreleased) - -#### Features Added - -#### Breaking Changes - -#### Bugs Fixed +### 4.42.0 (2025-12-09) #### Other Changes * Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) diff --git a/sdk/cosmos/azure-cosmos-spark_3-3_2-12/README.md b/sdk/cosmos/azure-cosmos-spark_3-3_2-12/README.md index 053d8392eca9..0505e35766ca 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-3_2-12/README.md +++ b/sdk/cosmos/azure-cosmos-spark_3-3_2-12/README.md @@ -28,6 +28,7 @@ https://github.com/Azure/azure-sdk-for-java/issues/new #### azure-cosmos-spark_3-3_2-12 | Connector | Supported Spark Versions | Supported JVM Versions | Supported Scala Versions | Supported Databricks Runtimes | |-----------|--------------------------|------------------------|--------------------------|-------------------------------| +| 4.42.0 | 3.3.0 - 3.3.2 | [8, 11] | 2.12 | 11.\*, 12.\* | | 4.41.0 | 3.3.0 - 3.3.2 | [8, 11] | 2.12 | 11.\*, 12.\* | | 4.40.0 | 3.3.0 - 3.3.2 | [8, 11] | 2.12 | 11.\*, 12.\* | | 4.39.0 | 3.3.0 - 3.3.2 | [8, 11] | 2.12 | 11.\*, 12.\* | @@ -76,6 +77,7 @@ https://github.com/Azure/azure-sdk-for-java/issues/new #### azure-cosmos-spark_3-4_2-12 | Connector | Supported Spark Versions | Supported JVM Versions | Supported Scala Versions | Supported Databricks Runtimes | Supported Fabric Runtimes | |-----------|--------------------------|------------------------|--------------------------|-------------------------------|---------------------------| +| 4.42.0 | 3.4.0 - 3.4.1 | [8, 11] | 2.12 | 13.\* | | | 4.41.0 | 3.4.0 - 3.4.1 | [8, 11] | 2.12 | 13.\* | | | 4.40.0 | 3.4.0 - 3.4.1 | [8, 11] | 2.12 | 13.\* | | | 4.39.0 | 3.4.0 - 3.4.1 | [8, 11] | 2.12 | 13.\* | | @@ -115,6 +117,7 @@ https://github.com/Azure/azure-sdk-for-java/issues/new #### azure-cosmos-spark_3-5_2-12 | Connector | Supported Spark Versions | Minimum Java Version | Supported Scala Versions | Supported Databricks Runtimes | Supported Fabric Runtimes | |-----------|--------------------------|----------------------|----------------------------|-------------------------------|------------------------------| +| 4.42.0 | 3.5.0 | [8, 11] | 2.12 | 14.*, 15.\*, 16.4 LTS | 1.3.\* | | 4.41.0 | 3.5.0 | [8, 11] | 2.12 | 14.*, 15.\*, 16.4 LTS | 1.3.\* | | 4.40.0 | 3.5.0 | [8, 11] | 2.12 | 14.*, 15.\* | | | 4.39.0 | 3.5.0 | [8, 11] | 2.12 | 14.*, 15.\* | | @@ -140,11 +143,11 @@ to use the same version of Scala that Spark was compiled for. ### Download You can use the maven coordinate of the jar to auto install the Spark Connector to your Databricks Runtime from Maven: -`com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12:4.41.0` +`com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12:4.42.0` You can also integrate against Cosmos DB Spark Connector in your SBT project: ```scala -libraryDependencies += "com.azure.cosmos.spark" % "azure-cosmos-spark_3-3_2-12" % "4.41.0" +libraryDependencies += "com.azure.cosmos.spark" % "azure-cosmos-spark_3-3_2-12" % "4.42.0" ``` Cosmos DB Spark Connector is available on [Maven Central Repo](https://central.sonatype.com/search?namespace=com.azure.cosmos.spark). diff --git a/sdk/cosmos/azure-cosmos-spark_3-3_2-12/pom.xml b/sdk/cosmos/azure-cosmos-spark_3-3_2-12/pom.xml index 315bc2259f92..1a47781a1995 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-3_2-12/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_3-3_2-12/pom.xml @@ -11,7 +11,7 @@ </parent> <groupId>com.azure.cosmos.spark</groupId> <artifactId>azure-cosmos-spark_3-3_2-12</artifactId> - <version>4.42.0-beta.1</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12;current} --> + <version>4.42.0</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12;current} --> <packaging>jar</packaging> <url>https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/cosmos/azure-cosmos-spark_3-3_2-12</url> <name>OLTP Spark 3.3 Connector for Azure Cosmos DB SQL API</name> diff --git a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md index d685256cc544..d622f4e51c74 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md @@ -1,12 +1,6 @@ ## Release History -### 4.42.0-beta.1 (Unreleased) - -#### Features Added - -#### Breaking Changes - -#### Bugs Fixed +### 4.42.0 (2025-12-09) #### Other Changes * Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) diff --git a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/README.md b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/README.md index c0d946a96911..d551e14f9324 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/README.md +++ b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/README.md @@ -28,6 +28,7 @@ https://github.com/Azure/azure-sdk-for-java/issues/new #### azure-cosmos-spark_3-4_2-12 | Connector | Supported Spark Versions | Supported JVM Versions | Supported Scala Versions | Supported Databricks Runtimes | Supported Fabric Runtimes | |-----------|--------------------------|------------------------|--------------------------|-------------------------------|---------------------------| +| 4.42.0 | 3.4.0 - 3.4.1 | [8, 11] | 2.12 | 13.\* | | | 4.41.0 | 3.4.0 - 3.4.1 | [8, 11] | 2.12 | 13.\* | | | 4.40.0 | 3.4.0 - 3.4.1 | [8, 11] | 2.12 | 13.\* | | | 4.39.0 | 3.4.0 - 3.4.1 | [8, 11] | 2.12 | 13.\* | | @@ -67,6 +68,7 @@ https://github.com/Azure/azure-sdk-for-java/issues/new #### azure-cosmos-spark_3-3_2-12 | Connector | Supported Spark Versions | Supported JVM Versions | Supported Scala Versions | Supported Databricks Runtimes | |-----------|--------------------------|------------------------|--------------------------|-------------------------------| +| 4.42.0 | 3.3.0 - 3.3.2 | [8, 11] | 2.12 | 11.\*, 12.\* | | 4.41.0 | 3.3.0 - 3.3.2 | [8, 11] | 2.12 | 11.\*, 12.\* | | 4.40.0 | 3.3.0 - 3.3.2 | [8, 11] | 2.12 | 11.\*, 12.\* | | 4.39.0 | 3.3.0 - 3.3.2 | [8, 11] | 2.12 | 11.\*, 12.\* | @@ -115,6 +117,7 @@ https://github.com/Azure/azure-sdk-for-java/issues/new #### azure-cosmos-spark_3-5_2-12 | Connector | Supported Spark Versions | Minimum Java Version | Supported Scala Versions | Supported Databricks Runtimes | Supported Fabric Runtimes | |-----------|--------------------------|----------------------|--------------------------|-------------------------------|---------------------------| +| 4.42.0 | 3.5.0 | [8, 11] | 2.12 | 14.*, 15.\*, 16.4 LTS | 1.3.\* | | 4.41.0 | 3.5.0 | [8, 11] | 2.12 | 14.*, 15.\*, 16.4 LTS | 1.3.\* | | 4.40.0 | 3.5.0 | [8, 11] | 2.12 | 14.*, 15.\* | | | 4.39.0 | 3.5.0 | [8, 11] | 2.12 | 14.*, 15.\* | | @@ -140,11 +143,11 @@ to use the same version of Scala that Spark was compiled for. ### Download You can use the maven coordinate of the jar to auto install the Spark Connector to your Databricks Runtime from Maven: -`com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12:4.41.0` +`com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12:4.42.0` You can also integrate against Cosmos DB Spark Connector in your SBT project: ```scala -libraryDependencies += "com.azure.cosmos.spark" % "azure-cosmos-spark_3-4_2-12" % "4.41.0" +libraryDependencies += "com.azure.cosmos.spark" % "azure-cosmos-spark_3-4_2-12" % "4.42.0" ``` Cosmos DB Spark Connector is available on [Maven Central Repo](https://central.sonatype.com/search?namespace=com.azure.cosmos.spark). diff --git a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml index 0ec4dd9d214a..90f9b182a9e7 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml @@ -11,7 +11,7 @@ </parent> <groupId>com.azure.cosmos.spark</groupId> <artifactId>azure-cosmos-spark_3-4_2-12</artifactId> - <version>4.42.0-beta.1</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12;current} --> + <version>4.42.0</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12;current} --> <packaging>jar</packaging> <url>https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/cosmos/azure-cosmos-spark_3-4_2-12</url> <name>OLTP Spark 3.4 Connector for Azure Cosmos DB SQL API</name> diff --git a/sdk/cosmos/azure-cosmos-spark_3-5_2-12/CHANGELOG.md b/sdk/cosmos/azure-cosmos-spark_3-5_2-12/CHANGELOG.md index aa37319a326e..1ff935c9bbbe 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-5_2-12/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-spark_3-5_2-12/CHANGELOG.md @@ -1,12 +1,6 @@ ## Release History -### 4.42.0-beta.1 (Unreleased) - -#### Features Added - -#### Breaking Changes - -#### Bugs Fixed +### 4.42.0 (2025-12-09) #### Other Changes * Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) diff --git a/sdk/cosmos/azure-cosmos-spark_3-5_2-12/README.md b/sdk/cosmos/azure-cosmos-spark_3-5_2-12/README.md index 250fba8bb05e..66133ef0ebf3 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-5_2-12/README.md +++ b/sdk/cosmos/azure-cosmos-spark_3-5_2-12/README.md @@ -28,6 +28,7 @@ https://github.com/Azure/azure-sdk-for-java/issues/new #### azure-cosmos-spark_3-5_2-12 | Connector | Supported Spark Versions | Minimum Java Version | Supported Scala Versions | Supported Databricks Runtimes | Supported Fabric Runtimes | |-----------|--------------------------|-----------------------|---------------------------|-------------------------------|---------------------------| +| 4.42.0 | 3.5.0 | [8, 11] | 2.12 | 14.\*, 15.\*, 16.4 LTS | 1.3.\* | | 4.41.0 | 3.5.0 | [8, 11] | 2.12 | 14.\*, 15.\*, 16.4 LTS | 1.3.\* | | 4.40.0 | 3.5.0 | [8, 11] | 2.12 | 14.\*, 15.\* | | | 4.39.0 | 3.5.0 | [8, 11] | 2.12 | 14.\*, 15.\* | | @@ -53,6 +54,7 @@ to use the same version of Scala that Spark was compiled for. #### azure-cosmos-spark_3-4_2-12 | Connector | Supported Spark Versions | Supported JVM Versions | Supported Scala Versions | Supported Databricks Runtimes | Supported Fabric Runtimes | |-----------|--------------------------|------------------------|--------------------------|-------------------------------|---------------------------| +| 4.42.0 | 3.4.0 - 3.4.1 | [8, 11] | 2.12 | 13.\* | | | 4.41.0 | 3.4.0 - 3.4.1 | [8, 11] | 2.12 | 13.\* | | | 4.40.0 | 3.4.0 - 3.4.1 | [8, 11] | 2.12 | 13.\* | | | 4.39.0 | 3.4.0 - 3.4.1 | [8, 11] | 2.12 | 13.\* | | @@ -92,6 +94,7 @@ to use the same version of Scala that Spark was compiled for. #### azure-cosmos-spark_3-3_2-12 | Connector | Supported Spark Versions | Supported JVM Versions | Supported Scala Versions | Supported Databricks Runtimes | |-----------|--------------------------|------------------------|--------------------------|-------------------------------| +| 4.42.0 | 3.3.0 - 3.3.2 | [8, 11] | 2.12 | 11.\*, 12.\* | | 4.41.0 | 3.3.0 - 3.3.2 | [8, 11] | 2.12 | 11.\*, 12.\* | | 4.40.0 | 3.3.0 - 3.3.2 | [8, 11] | 2.12 | 11.\*, 12.\* | | 4.39.0 | 3.3.0 - 3.3.2 | [8, 11] | 2.12 | 11.\*, 12.\* | @@ -140,11 +143,11 @@ to use the same version of Scala that Spark was compiled for. ### Download You can use the maven coordinate of the jar to auto install the Spark Connector to your Databricks Runtime from Maven: -`com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12:4.41.0` +`com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12:4.42.0` You can also integrate against Cosmos DB Spark Connector in your SBT project: ```scala -libraryDependencies += "com.azure.cosmos.spark" % "azure-cosmos-spark_3-5_2-12" % "4.41.0" +libraryDependencies += "com.azure.cosmos.spark" % "azure-cosmos-spark_3-5_2-12" % "4.42.0" ``` Cosmos DB Spark Connector is available on [Maven Central Repo](https://central.sonatype.com/search?namespace=com.azure.cosmos.spark). diff --git a/sdk/cosmos/azure-cosmos-spark_3-5_2-12/pom.xml b/sdk/cosmos/azure-cosmos-spark_3-5_2-12/pom.xml index 11f0ab4f685a..d5871f8baef6 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-5_2-12/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_3-5_2-12/pom.xml @@ -11,7 +11,7 @@ </parent> <groupId>com.azure.cosmos.spark</groupId> <artifactId>azure-cosmos-spark_3-5_2-12</artifactId> - <version>4.42.0-beta.1</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> + <version>4.42.0</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> <packaging>jar</packaging> <url>https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/cosmos/azure-cosmos-spark_3-5_2-12</url> <name>OLTP Spark 3.5 Connector for Azure Cosmos DB SQL API</name> diff --git a/sdk/cosmos/azure-cosmos-spark_3/docs/quick-start.md b/sdk/cosmos/azure-cosmos-spark_3/docs/quick-start.md index ca4c67e9a197..b335f91f470c 100644 --- a/sdk/cosmos/azure-cosmos-spark_3/docs/quick-start.md +++ b/sdk/cosmos/azure-cosmos-spark_3/docs/quick-start.md @@ -25,13 +25,13 @@ You can use any other Spark 3.5 spark offering as well, also you should be able SLF4J is only needed if you plan to use logging, please also download an SLF4J binding which will link the SLF4J API with the logging implementation of your choice. See the [SLF4J user manual](https://www.slf4j.org/manual.html) for more information. For Spark 3.3: -- Install Cosmos DB Spark Connector, in your spark Cluster [com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12:4.41.0](https://search.maven.org/artifact/com.azure.cosmos.spark/azure-cosmos-spark_3-3_2-12/4.41.0/jar) +- Install Cosmos DB Spark Connector, in your spark Cluster [com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12:4.42.0](https://search.maven.org/artifact/com.azure.cosmos.spark/azure-cosmos-spark_3-3_2-12/4.42.0/jar) For Spark 3.4: -- Install Cosmos DB Spark Connector, in your spark Cluster [com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12:4.41.0](https://search.maven.org/artifact/com.azure.cosmos.spark/azure-cosmos-spark_3-4_2-12/4.41.0/jar) +- Install Cosmos DB Spark Connector, in your spark Cluster [com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12:4.42.0](https://search.maven.org/artifact/com.azure.cosmos.spark/azure-cosmos-spark_3-4_2-12/4.42.0/jar) For Spark 3.5: -- Install Cosmos DB Spark Connector, in your spark Cluster [com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12:4.41.0](https://search.maven.org/artifact/com.azure.cosmos.spark/azure-cosmos-spark_3-5_2-12/4.41.0/jar) +- Install Cosmos DB Spark Connector, in your spark Cluster [com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12:4.42.0](https://search.maven.org/artifact/com.azure.cosmos.spark/azure-cosmos-spark_3-5_2-12/4.42.0/jar) The getting started guide is based on PySpark however you can use the equivalent scala version as well, and you can run the following code snippet in an Azure Databricks PySpark notebook. diff --git a/sdk/cosmos/azure-cosmos-spark_3/pom.xml b/sdk/cosmos/azure-cosmos-spark_3/pom.xml index f01429ebb7a1..612967d22177 100644 --- a/sdk/cosmos/azure-cosmos-spark_3/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_3/pom.xml @@ -58,7 +58,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.76.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> + <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> <exclusions> <exclusion> <groupId>org.slf4j</groupId> diff --git a/sdk/cosmos/azure-cosmos-test/CHANGELOG.md b/sdk/cosmos/azure-cosmos-test/CHANGELOG.md index a2e41ee8b5a1..3b135b2f16d2 100644 --- a/sdk/cosmos/azure-cosmos-test/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-test/CHANGELOG.md @@ -1,16 +1,14 @@ ## Release History -### 1.0.0-beta.16 (Unreleased) +### 1.0.0-beta.16 (2025-12-09) #### Features Added * Added support for `FaultInjectionOperationType.HEAD_COLLECTION` - See [PR 47231](https://github.com/Azure/azure-sdk-for-java/pull/47231) -#### Breaking Changes - -#### Bugs Fixed - #### Other Changes * Added support for `CosmosTransportClientInterceptor` which allow to modify the store response on direct layer. - See [PR 47231](https://github.com/Azure/azure-sdk-for-java/pull/47231) +* Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) +* Updated `azure-cosmos` to version `4.76.0`. ### 1.0.0-beta.15 (2025-10-21) diff --git a/sdk/cosmos/azure-cosmos-test/README.md b/sdk/cosmos/azure-cosmos-test/README.md index d5f68ae64bc4..4f003eb3c4be 100644 --- a/sdk/cosmos/azure-cosmos-test/README.md +++ b/sdk/cosmos/azure-cosmos-test/README.md @@ -9,7 +9,7 @@ Library containing core fault injection classes used to test Azure Cosmos DB SDK <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos-test</artifactId> - <version>1.0.0-beta.15</version> + <version>1.0.0-beta.16</version> </dependency> ``` [//]: # ({x-version-update-end}) diff --git a/sdk/cosmos/azure-cosmos-test/pom.xml b/sdk/cosmos/azure-cosmos-test/pom.xml index 7ef7ada263d7..db566dd3bdc2 100644 --- a/sdk/cosmos/azure-cosmos-test/pom.xml +++ b/sdk/cosmos/azure-cosmos-test/pom.xml @@ -59,7 +59,7 @@ Licensed under the MIT License. <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.76.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> + <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> </dependency> <dependency> diff --git a/sdk/cosmos/azure-cosmos-tests/pom.xml b/sdk/cosmos/azure-cosmos-tests/pom.xml index 939815cdbc54..cf7a2c8cb5e3 100644 --- a/sdk/cosmos/azure-cosmos-tests/pom.xml +++ b/sdk/cosmos/azure-cosmos-tests/pom.xml @@ -100,7 +100,7 @@ Licensed under the MIT License. <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.76.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> + <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/cosmos/azure-cosmos/CHANGELOG.md b/sdk/cosmos/azure-cosmos/CHANGELOG.md index 9cd92218979e..c76189f5b3dd 100644 --- a/sdk/cosmos/azure-cosmos/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos/CHANGELOG.md @@ -1,10 +1,6 @@ ## Release History -### 4.76.0-beta.1 (Unreleased) - -#### Features Added - -#### Breaking Changes +### 4.76.0 (2025-12-09) #### Bugs Fixed * Fixed a possible memory leak (Netty buffers) in Gateway mode caused by a race condition when timeouts are happening. - [47228](https://github.com/Azure/azure-sdk-for-java/pull/47228) and [47251](https://github.com/Azure/azure-sdk-for-java/pull/47251) diff --git a/sdk/cosmos/azure-cosmos/pom.xml b/sdk/cosmos/azure-cosmos/pom.xml index ef7d198e3dde..2fd9dc103215 100644 --- a/sdk/cosmos/azure-cosmos/pom.xml +++ b/sdk/cosmos/azure-cosmos/pom.xml @@ -13,7 +13,7 @@ Licensed under the MIT License. <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.76.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> + <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> <name>Microsoft Azure SDK for SQL API of Azure Cosmos DB Service</name> <description>This Package contains Microsoft Azure Cosmos SDK (with Reactive Extension Reactor support) for Azure Cosmos DB SQL API</description> <packaging>jar</packaging> diff --git a/sdk/cosmos/fabric-cosmos-spark-auth_3/pom.xml b/sdk/cosmos/fabric-cosmos-spark-auth_3/pom.xml index bfd53130788c..8af90cd9943d 100644 --- a/sdk/cosmos/fabric-cosmos-spark-auth_3/pom.xml +++ b/sdk/cosmos/fabric-cosmos-spark-auth_3/pom.xml @@ -100,7 +100,7 @@ <dependency> <groupId>com.azure.cosmos.spark</groupId> <artifactId>azure-cosmos-spark_3-5_2-12</artifactId> - <version>4.42.0-beta.1</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> + <version>4.42.0</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> <scope>provided</scope> </dependency> <dependency> @@ -185,7 +185,7 @@ <include>com.fasterxml.jackson.module:jackson-module-scala_2.12:[2.18.4]</include> <!-- {x-include-update;com.fasterxml.jackson.module:jackson-module-scala_2.12;external_dependency} --> <include>com.fasterxml.jackson.core:jackson-databind:[2.15.2]</include> <!-- {x-include-update;cosmos_com.fasterxml.jackson.core:jackson-databind;external_dependency} --> <include>com.fasterxml.jackson.module:jackson-module-scala_2.12:[2.15.2]</include> <!-- {x-include-update;cosmos_com.fasterxml.jackson.module:jackson-module-scala_2.12;external_dependency} --> - <include>com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12:[4.42.0-beta.1]</include> <!-- {x-include-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> + <include>com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12:[4.42.0]</include> <!-- {x-include-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> <include>com.microsoft.azure.synapse:synapseutils_2.12:[1.5.4]</include> <!-- {x-include-update;cosmos_com.microsoft.azure.synapse:synapseutils_2.12;external_dependency} --> </includes> </bannedDependencies> From 9388993ef322bf1d218803e6738ec352b4ee79c1 Mon Sep 17 00:00:00 2001 From: Ray Chen <raychen@microsoft.com> Date: Tue, 9 Dec 2025 11:15:53 -0800 Subject: [PATCH 129/186] Made pipeline work for template-v2 projects (#47476) * Made pipeline work for template-v2 projects * Filtered on the template packages * Fixed pipeline compile error * Fixed condition check * Iterate artifact list to filter on the test pkgs * Reverted the change of removing the service directory when calling set-test-pipeline-version.yml --- eng/pipelines/templates/jobs/ci.yml | 28 ++++++++++++------- .../stages/archetype-java-release-batch.yml | 14 ++++++---- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/eng/pipelines/templates/jobs/ci.yml b/eng/pipelines/templates/jobs/ci.yml index a44742b8a082..6af7b0c042c0 100644 --- a/eng/pipelines/templates/jobs/ci.yml +++ b/eng/pipelines/templates/jobs/ci.yml @@ -146,11 +146,15 @@ jobs: displayName: 'Tag scheduled builds' condition: and(succeeded(), eq(variables['Build.SourceBranchName'],'main'),eq(variables['Build.Reason'],'Schedule')) - - template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml - parameters: - PackageNames: "azure-sdk-template,azure-sdk-template-two,azure-sdk-template-three" - ServiceDirectory: "template" - TestPipeline: ${{ parameters.TestPipeline }} + - ${{ if eq(parameters.TestPipeline, true) }}: + - template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml + parameters: + Artifacts: + - ${{ each artifact in parameters.ReleaseArtifacts }}: + - ${{ if contains(artifact.name, 'azure-sdk-template') }}: + - ${{ artifact }} + ServiceDirectory: ${{ parameters.ServiceDirectory }} + TestPipeline: ${{ parameters.TestPipeline }} # The daily dev build variable isn't used for the PullRequests pipeline but is currently used # to save off the packageInfo files for all ci pipeline. This needs to be skipped for the @@ -349,11 +353,15 @@ jobs: CspellConfigPath: .vscode/cspell.json ContinueOnError: false - - template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml - parameters: - PackageNames: "azure-sdk-template,azure-sdk-template-two,azure-sdk-template-three" - ServiceDirectory: "template" - TestPipeline: ${{ parameters.TestPipeline }} + - ${{ if eq(parameters.TestPipeline, true) }}: + - template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml + parameters: + Artifacts: + - ${{ each artifact in parameters.ReleaseArtifacts }}: + - ${{ if contains(artifact.name, 'azure-sdk-template') }}: + - ${{ artifact }} + ServiceDirectory: ${{ parameters.ServiceDirectory }} + TestPipeline: ${{ parameters.TestPipeline }} - template: /eng/common/pipelines/templates/steps/verify-links.yml parameters: diff --git a/eng/pipelines/templates/stages/archetype-java-release-batch.yml b/eng/pipelines/templates/stages/archetype-java-release-batch.yml index f50b06a2839a..ab627758dc59 100644 --- a/eng/pipelines/templates/stages/archetype-java-release-batch.yml +++ b/eng/pipelines/templates/stages/archetype-java-release-batch.yml @@ -125,11 +125,15 @@ stages: inputs: versionSpec: $(PythonVersion) - - template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml - parameters: - PackageNames: "azure-sdk-template,azure-sdk-template-two,azure-sdk-template-three" - ServiceDirectory: "template" - TestPipeline: ${{ parameters.TestPipeline }} + - ${{ if eq(parameters.TestPipeline, true) }}: + - template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml + parameters: + Artifacts: + - ${{ each artifact in parameters.Artifacts }}: + - ${{ if contains(artifact.name, 'azure-sdk-template') }}: + - ${{ artifact }} + ServiceDirectory: ${{ parameters.ServiceDirectory }} + TestPipeline: ${{ parameters.TestPipeline }} # Do all the verifications for all the artifacts after the sparse-checkout - pwsh: | From 44e1e6aeef9bf7327c05576745ce7a3c1c8e2d3e Mon Sep 17 00:00:00 2001 From: Ray Chen <raychen@microsoft.com> Date: Tue, 9 Dec 2025 12:21:48 -0800 Subject: [PATCH 130/186] Enabled set test pipeline version for template-v2 projects (#47509) --- eng/pipelines/patch-release.yml | 15 +++++++++++++++ .../stages/archetype-sdk-client-patch.yml | 12 ++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/patch-release.yml b/eng/pipelines/patch-release.yml index f7c486ea04b0..36c1de66addb 100644 --- a/eng/pipelines/patch-release.yml +++ b/eng/pipelines/patch-release.yml @@ -27,4 +27,19 @@ extends: safeName: azuresdktemplatethree skipPublishDocMs: true ServiceDirectory: template + - name: azure-sdk-template + groupId: com.azure.v2 + safeName: azuresdktemplate + skipPublishDocMs: true + ServiceDirectory: template-v2 + - name: azure-sdk-template-two + groupId: com.azure.v2 + safeName: azuresdktemplatetwo + skipPublishDocMs: true + ServiceDirectory: template-v2 + - name: azure-sdk-template-three + groupId: com.azure.v2 + safeName: azuresdktemplatethree + skipPublishDocMs: true + ServiceDirectory: template-v2 diff --git a/eng/pipelines/templates/stages/archetype-sdk-client-patch.yml b/eng/pipelines/templates/stages/archetype-sdk-client-patch.yml index 571e5fbb6e56..d22601358369 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client-patch.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client-patch.yml @@ -61,8 +61,10 @@ extends: - template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml parameters: - PackageNames: "azure-sdk-template,azure-sdk-template-two,azure-sdk-template-three" - ServiceDirectory: "template" + Artifacts: + - ${{ each artifact in parameters.Artifacts }}: + - ${{ if contains(artifact.name, 'azure-sdk-template') }}: + - ${{ artifact }} TestPipeline: ${{parameters.TestPipeline}} - task: UsePythonVersion@0 @@ -215,8 +217,10 @@ extends: - template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml parameters: - PackageNames: "azure-sdk-template,azure-sdk-template-two,azure-sdk-template-three" - ServiceDirectory: "template" + Artifacts: + - ${{ each artifact in parameters.Artifacts }}: + - ${{ if contains(artifact.name, 'azure-sdk-template') }}: + - ${{ artifact }} TestPipeline: ${{parameters.TestPipeline}} - task: PythonScript@0 From 57c2f31c2d3f802cd7e7ea7fa6e0c4d3f07d1570 Mon Sep 17 00:00:00 2001 From: Ray Chen <raychen@microsoft.com> Date: Tue, 9 Dec 2025 15:07:29 -0800 Subject: [PATCH 131/186] Query api view artifact by package info in language-settings script (#47510) * Query api view artifact by package info * Removed redundant code --- eng/scripts/Language-Settings.ps1 | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index 4068c4719be4..60f80d5c05a6 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -484,8 +484,17 @@ function Get-java-GithubIoDocIndex() } # function is used to filter packages to submit to API view tool -function Find-java-Artifacts-For-Apireview($artifactDir, $pkgName) +# Function pointer name: FindArtifactForApiReviewFn +function Find-java-Artifacts-For-Apireview($artifactDir, $packageInfo) { + # Check if packageInfo is null first + if (!$packageInfo) { + Write-Host "Package info is null, skipping API review artifact search" + return $null + } + + $pkgName = $packageInfo.ArtifactName ?? $packageInfo.Name + # skip spark packages if ($pkgName.Contains("-spark")) { return $null @@ -495,15 +504,9 @@ function Find-java-Artifacts-For-Apireview($artifactDir, $pkgName) return $null } - # Find all source jar files in given artifact directory - # Filter for package in "com.azure*" groupId. - $artifactPath = Join-Path $artifactDir "com.azure*" $pkgName - Write-Host "Checking for source jar in artifact path $($artifactPath)" - $files = @(Get-ChildItem -Recurse "${artifactPath}" | Where-Object -FilterScript {$_.Name.EndsWith("sources.jar")}) - # And filter for packages in "io.clientcore*" groupId. - # (Is there a way to pass more information here to know the explicit groupId?) - $artifactPath = Join-Path $artifactDir "io.clientcore*" $pkgName - $files += @(Get-ChildItem -Recurse "${artifactPath}" | Where-Object -FilterScript {$_.Name.EndsWith("sources.jar")}) + $artifactPath = Join-Path $artifactDir $packageInfo.Group $pkgName + $files = @(Get-ChildItem "${artifactPath}" | Where-Object -FilterScript {$_.Name.EndsWith("sources.jar")}) + if (!$files) { Write-Host "$($artifactPath) does not have any package" @@ -643,6 +646,7 @@ function Update-java-GeneratedSdks([string]$PackageDirectoriesFile) { } } +# Function pointer: IsApiviewStatusCheckRequiredFn function Get-java-ApiviewStatusCheckRequirement($packageInfo) { if ($packageInfo.IsNewSdk -and ($packageInfo.SdkType -eq "client" -or $packageInfo.SdkType -eq "spring")) { return $true From 5cd16e7d62a5f1b677b06cd5a847bc266326bc5c Mon Sep 17 00:00:00 2001 From: Muyao Feng <92105726+Netyyyy@users.noreply.github.com> Date: Wed, 10 Dec 2025 10:04:38 +0800 Subject: [PATCH 132/186] Merge 5.24.1 CHANGELOG (#47520) --- sdk/spring/CHANGELOG.md | 18 +++++++++++++++++- .../azure-spring-data-cosmos/CHANGELOG.md | 5 +++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/sdk/spring/CHANGELOG.md b/sdk/spring/CHANGELOG.md index 4447d6f30c75..c6b9bdfce69f 100644 --- a/sdk/spring/CHANGELOG.md +++ b/sdk/spring/CHANGELOG.md @@ -10,6 +10,22 @@ This section includes changes in `spring-cloud-azure-autoconfigure` module. - 2 `TokenCredential` bean found in AzureServiceBusMessagingAutoConfiguration. [#47470](https://github.com/Azure/azure-sdk-for-java/pull/47470) - `spring.cloud.azure.eventhubs.credential.token-credential-bean-name` not take effect in AzureEventHubsMessagingAutoConfiguration. [#47470](https://github.com/Azure/azure-sdk-for-java/pull/47470) +## 5.24.1 (2025-12-09) +- This release is compatible with Spring Boot 3.5.0-3.5.8, 3.4.0-3.4.12, 3.3.0-3.3.13, 3.2.0-3.2.12, 3.1.0-3.1.12, 3.0.0-3.0.13. (Note: 3.5.x (x>8) and 3.4.y (y>12) should be supported, but they aren't tested with this release.) +- This release is compatible with Spring Cloud 2025.0.0, 2024.0.0-2024.0.2, 2023.0.0-2023.0.5, 2022.0.0-2022.0.5. (Note: 2025.0.x(x>0) and 2024.0.y (y>2) should be supported, but they aren't tested with this release.) + +### Spring Cloud Azure Autoconfigure +This section includes changes in `spring-cloud-azure-autoconfigure` module. + +#### Bugs Fixed + +- 2 `TokenCredential` bean found in AzureServiceBusMessagingAutoConfiguration. [#47470](https://github.com/Azure/azure-sdk-for-java/pull/47470) +- `spring.cloud.azure.eventhubs.credential.token-credential-bean-name` not take effect in AzureEventHubsMessagingAutoConfiguration. [#47470](https://github.com/Azure/azure-sdk-for-java/pull/47470) + +### Azure Spring Data Cosmos +This section includes changes in `azure-spring-data-cosmos` module. +Please refer to [azure-spring-data-cosmos/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/azure-spring-data-cosmos/CHANGELOG.md#5241-2025-12-09) for more details. + ## 5.24.0 (2025-12-04) - This release is compatible with Spring Boot 3.5.0-3.5.8, 3.4.0-3.4.12, 3.3.0-3.3.13, 3.2.0-3.2.12, 3.1.0-3.1.12, 3.0.0-3.0.13. (Note: 3.5.x (x>8) and 3.4.y (y>12) should be supported, but they aren't tested with this release.) - This release is compatible with Spring Cloud 2025.0.0, 2024.0.0-2024.0.2, 2023.0.0-2023.0.5, 2022.0.0-2022.0.5. (Note: 2025.0.x(x>0) and 2024.0.y (y>2) should be supported, but they aren't tested with this release.) @@ -80,7 +96,7 @@ This section includes changes in the `spring-messaging-azure-servicebus` module. ### Azure Spring Data Cosmos This section includes changes in `azure-spring-data-cosmos` module. -Please refer to [azure-spring-data-cosmos/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/azure-spring-data-cosmos/CHANGELOG.md#5230-08-05) for more details. +Please refer to [azure-spring-data-cosmos/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/azure-spring-data-cosmos/CHANGELOG.md#5230-2025-08-05) for more details. ## 5.22.0 (2025-04-08) - This release is compatible with Spring Boot 3.4.0-3.4.4, 3.3.0-3.3.10, 3.2.0-3.2.12, 3.1.0-3.1.12, 3.0.0-3.0.13. (Note: 3.4.x (x>4), 3.3.y (y>10) and 3.2.z (z>12) should be supported, but they aren't tested with this release.) diff --git a/sdk/spring/azure-spring-data-cosmos/CHANGELOG.md b/sdk/spring/azure-spring-data-cosmos/CHANGELOG.md index c9dce30f8b3b..2ad70c47631e 100644 --- a/sdk/spring/azure-spring-data-cosmos/CHANGELOG.md +++ b/sdk/spring/azure-spring-data-cosmos/CHANGELOG.md @@ -10,6 +10,11 @@ #### Other Changes +### 5.24.1 (2025-12-09) + +#### Other Changes +* regular release + ### 5.24.0 (2025-12-04) #### Other Changes From 52d913367931247ea6d5ebfabf001961d9c94d47 Mon Sep 17 00:00:00 2001 From: xitzhang <zhangxiting.zxt@gmail.com> Date: Tue, 9 Dec 2025 23:06:30 -0800 Subject: [PATCH 133/186] [VoiceLive] Add sample of function calling (#47516) * [VoiceLive] Add sample of function calling * update --------- Co-authored-by: Xiting Zhang <xitzhang@microsoft.com> --- sdk/ai/azure-ai-voicelive/README.md | 73 +- .../ai/voicelive/FunctionCallingSample.java | 628 ++++++++++++++++++ .../com/azure/ai/voicelive/ReadmeSamples.java | 80 +++ 3 files changed, 779 insertions(+), 2 deletions(-) create mode 100644 sdk/ai/azure-ai-voicelive/src/samples/java/com/azure/ai/voicelive/FunctionCallingSample.java diff --git a/sdk/ai/azure-ai-voicelive/README.md b/sdk/ai/azure-ai-voicelive/README.md index 95a3ff8ff1b6..a57e3e5cb387 100644 --- a/sdk/ai/azure-ai-voicelive/README.md +++ b/sdk/ai/azure-ai-voicelive/README.md @@ -125,6 +125,7 @@ The following sections provide code snippets for common scenarios: * [Send audio input](#send-audio-input) * [Handle event types](#handle-event-types) * [Voice configuration](#voice-configuration) +* [Function calling](#function-calling) * [Complete voice assistant with microphone](#complete-voice-assistant-with-microphone) ### Focused Sample Files @@ -158,9 +159,16 @@ For easier learning, explore these focused samples in order: - Noise reduction and echo cancellation - Multi-threaded audio processing -> **Note:** To run audio samples (AudioPlaybackSample, MicrophoneInputSample, VoiceAssistantSample): +6. **FunctionCallingSample.java** - Voice assistant with custom function tools + - Define function tools with parameters + - Register functions with the VoiceLive session + - Handle function call requests from the AI model + - Execute functions locally and return results + - Continue conversation with function results + +> **Note:** To run audio samples (AudioPlaybackSample, MicrophoneInputSample, VoiceAssistantSample, FunctionCallingSample): > ```bash -> mvn exec:java -Dexec.mainClass=com.azure.ai.voicelive.AudioPlaybackSample -Dexec.classpathScope=test +> mvn exec:java -Dexec.mainClass=com.azure.ai.voicelive.FunctionCallingSample -Dexec.classpathScope=test > ``` > These samples use `javax.sound.sampled` for audio I/O. @@ -328,6 +336,67 @@ VoiceLiveSessionOptions options3 = new VoiceLiveSessionOptions() new AzurePersonalVoice("speakerProfileId", PersonalVoiceModels.PHOENIX_LATEST_NEURAL))); ``` +### Function calling + +Enable your voice assistant to call custom functions during conversations. This allows the AI to request information or perform actions by executing your code: + +```java com.azure.ai.voicelive.functioncalling +// 1. Define function tool with parameters +VoiceLiveFunctionDefinition getWeatherFunction = new VoiceLiveFunctionDefinition("get_current_weather") + .setDescription("Get the current weather in a given location") + .setParameters(BinaryData.fromObject(parametersSchema)); // JSON schema + +// 2. Configure session with tools +VoiceLiveSessionOptions options = new VoiceLiveSessionOptions() + .setTools(Arrays.asList(getWeatherFunction)) + .setInstructions("You have access to weather information. Use get_current_weather when asked about weather."); + +// 3. Handle function call events +client.startSession("gpt-4o-realtime-preview") + .flatMap(session -> { + session.receiveEvents() + .subscribe(event -> { + if (event instanceof SessionUpdateConversationItemCreated) { + SessionUpdateConversationItemCreated itemCreated = (SessionUpdateConversationItemCreated) event; + if (itemCreated.getItem().getType() == ItemType.FUNCTION_CALL) { + ResponseFunctionCallItem functionCall = (ResponseFunctionCallItem) itemCreated.getItem(); + + // Wait for arguments + String callId = functionCall.getCallId(); + String arguments = waitForArguments(session, callId); // Helper method + + // Execute function + try { + Map<String, Object> result = getCurrentWeather(arguments); + String resultJson = new ObjectMapper().writeValueAsString(result); + + // Return result + FunctionCallOutputItem output = new FunctionCallOutputItem(callId, resultJson); + ClientEventConversationItemCreate createItem = new ClientEventConversationItemCreate() + .setItem(output) + .setPreviousItemId(functionCall.getId()); + + session.sendEvent(createItem).subscribe(); + session.sendEvent(new ClientEventResponseCreate()).subscribe(); + } catch (Exception e) { + System.err.println("Error executing function: " + e.getMessage()); + } + } + } + }); + + return Mono.just(session); + }) + .block(); +``` + +**Key points:** +* Define function tools with JSON schemas describing parameters +* The AI decides when to call functions based on conversation context +* Your code executes the function and returns results +* Results are sent back to continue the conversation +* See `FunctionCallingSample.java` for a complete working example + ### Complete voice assistant with microphone A full example demonstrating real-time microphone input and audio playback: diff --git a/sdk/ai/azure-ai-voicelive/src/samples/java/com/azure/ai/voicelive/FunctionCallingSample.java b/sdk/ai/azure-ai-voicelive/src/samples/java/com/azure/ai/voicelive/FunctionCallingSample.java new file mode 100644 index 000000000000..b2b264c7112d --- /dev/null +++ b/sdk/ai/azure-ai-voicelive/src/samples/java/com/azure/ai/voicelive/FunctionCallingSample.java @@ -0,0 +1,628 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.voicelive; + +import com.azure.ai.voicelive.models.AudioEchoCancellation; +import com.azure.ai.voicelive.models.AudioInputTranscriptionOptions; +import com.azure.ai.voicelive.models.AudioInputTranscriptionOptionsModel; +import com.azure.ai.voicelive.models.ClientEventConversationItemCreate; +import com.azure.ai.voicelive.models.ClientEventResponseCreate; +import com.azure.ai.voicelive.models.ClientEventSessionUpdate; +import com.azure.ai.voicelive.models.FunctionCallOutputItem; +import com.azure.ai.voicelive.models.VoiceLiveFunctionDefinition; +import com.azure.ai.voicelive.models.InputAudioFormat; +import com.azure.ai.voicelive.models.InteractionModality; +import com.azure.ai.voicelive.models.ItemType; +import com.azure.ai.voicelive.models.OpenAIVoice; +import com.azure.ai.voicelive.models.OpenAIVoiceName; +import com.azure.ai.voicelive.models.OutputAudioFormat; +import com.azure.ai.voicelive.models.ResponseFunctionCallItem; +import com.azure.ai.voicelive.models.SessionUpdateConversationItemCreated; +import com.azure.ai.voicelive.models.SessionUpdateResponseFunctionCallArgumentsDone; +import com.azure.ai.voicelive.models.ServerEventType; +import com.azure.ai.voicelive.models.ServerVadTurnDetection; +import com.azure.ai.voicelive.models.SessionUpdate; +import com.azure.ai.voicelive.models.SessionUpdateResponseAudioDelta; +import com.azure.ai.voicelive.models.SessionUpdateResponseOutputItemDone; +import com.azure.ai.voicelive.models.SessionUpdateSessionUpdated; +import com.azure.ai.voicelive.models.VoiceLiveSessionOptions; +import com.azure.ai.voicelive.models.VoiceLiveToolDefinition; +import com.azure.core.credential.KeyCredential; +import com.azure.core.util.BinaryData; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; +import reactor.core.publisher.Mono; +import reactor.core.scheduler.Schedulers; + +import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.DataLine; +import javax.sound.sampled.LineUnavailableException; +import javax.sound.sampled.SourceDataLine; +import javax.sound.sampled.TargetDataLine; +import java.time.Duration; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; + +/** + * Function calling sample demonstrating how to use VoiceLive with custom function tools. + * + * <p>This sample shows how to:</p> + * <ul> + * <li>Define function tools with parameters</li> + * <li>Register functions with the VoiceLive session</li> + * <li>Handle function call requests from the AI model</li> + * <li>Return function results back to the conversation</li> + * <li>Process the AI's response after function execution</li> + * </ul> + * + * <p><strong>Environment Variables Required:</strong></p> + * <ul> + * <li>AZURE_VOICELIVE_ENDPOINT - The VoiceLive service endpoint URL</li> + * <li>AZURE_VOICELIVE_API_KEY - The API key for authentication</li> + * </ul> + * + * <p><strong>How to Run:</strong></p> + * <pre>{@code + * mvn exec:java -Dexec.mainClass="com.azure.ai.voicelive.FunctionCallingSample" -Dexec.classpathScope=test + * }</pre> + * + * <p><strong>Try asking:</strong></p> + * <ul> + * <li>"What's the current time?"</li> + * <li>"What's the weather in Seattle?"</li> + * <li>"What time is it in UTC?"</li> + * </ul> + */ +public final class FunctionCallingSample { + + // Service configuration + private static final String DEFAULT_API_VERSION = "2025-10-01"; + private static final String DEFAULT_MODEL = "gpt-4o-realtime-preview"; + private static final String ENV_ENDPOINT = "AZURE_VOICELIVE_ENDPOINT"; + private static final String ENV_API_KEY = "AZURE_VOICELIVE_API_KEY"; + + // Audio format constants + private static final int SAMPLE_RATE = 24000; + private static final int CHANNELS = 1; + private static final int SAMPLE_SIZE_BITS = 16; + private static final int CHUNK_SIZE = 1200; + + private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + + // Private constructor to prevent instantiation + private FunctionCallingSample() { + throw new UnsupportedOperationException("Utility class cannot be instantiated"); + } + + /** + * Main entry point for the function calling sample. + */ + public static void main(String[] args) { + // Load configuration + String endpoint = System.getenv(ENV_ENDPOINT); + String apiKey = System.getenv(ENV_API_KEY); + + if (endpoint == null || endpoint.isEmpty()) { + System.err.println("Error: AZURE_VOICELIVE_ENDPOINT environment variable is not set."); + System.exit(1); + } + + if (apiKey == null || apiKey.isEmpty()) { + System.err.println("Error: AZURE_VOICELIVE_API_KEY environment variable is not set."); + System.exit(1); + } + + String separator = new String(new char[70]).replace("\0", "="); + System.out.println(separator); + System.out.println("🎤️ Voice Assistant with Function Calling - Azure VoiceLive SDK"); + System.out.println(separator); + + // Create client + KeyCredential credential = new KeyCredential(apiKey); + VoiceLiveAsyncClient client = new VoiceLiveClientBuilder() + .endpoint(endpoint) + .credential(credential) + .serviceVersion(VoiceLiveServiceVersion.V2025_10_01) + .buildAsyncClient(); + + try { + runFunctionCallingSession(client); + } catch (Exception e) { + System.err.println("Error running function calling sample: " + e.getMessage()); + e.printStackTrace(); + System.exit(1); + } + } + + /** + * Runs the function calling session with audio input/output. + */ + private static void runFunctionCallingSession(VoiceLiveAsyncClient client) throws Exception { + System.out.println("Connecting to VoiceLive service..."); + + AtomicReference<AudioProcessor> audioProcessorRef = new AtomicReference<>(); + AtomicBoolean running = new AtomicBoolean(true); + AtomicReference<String> activeFunctionCallId = new AtomicReference<>(); + + // Start session + client.startSession(DEFAULT_MODEL) + .flatMap(session -> { + System.out.println("✓ Session started successfully"); + + // Create audio processor + AudioProcessor audioProcessor = new AudioProcessor(session); + audioProcessorRef.set(audioProcessor); + + // Subscribe to receive server events + session.receiveEvents() + .subscribe( + event -> handleServerEvent(session, event, audioProcessor, activeFunctionCallId), + error -> { + System.err.println("Error processing events: " + error.getMessage()); + running.set(false); + }, + () -> System.out.println("✓ Event stream completed") + ); + + // Send session configuration with function tools + System.out.println("📤 Sending session configuration with function tools..."); + ClientEventSessionUpdate sessionConfig = createSessionConfigWithFunctions(); + session.sendEvent(sessionConfig) + .doOnSuccess(v -> System.out.println("✓ Session configured with function tools")) + .doOnError(error -> System.err.println("❌ Failed to send session.update: " + error.getMessage())) + .subscribe(); + + // Start audio playback + audioProcessor.startPlayback(); + + String separator = new String(new char[70]).replace("\0", "="); + System.out.println("\n" + separator); + System.out.println("🎤 VOICE ASSISTANT WITH FUNCTION CALLING READY"); + System.out.println("Try saying:"); + System.out.println(" • 'What's the current time?'"); + System.out.println(" • 'What's the weather in Seattle?'"); + System.out.println(" • 'What time is it in UTC?'"); + System.out.println("Press Ctrl+C to exit"); + System.out.println(separator + "\n"); + + // Add shutdown hook + Runtime.getRuntime().addShutdownHook(new Thread(() -> { + System.out.println("\n👋 Shutting down voice assistant..."); + running.set(false); + audioProcessor.cleanup(); + })); + + // Keep the reactive chain alive + return Mono.never(); + }) + .doOnError(error -> System.err.println("❌ Error: " + error.getMessage())) + .doFinally(signalType -> { + AudioProcessor audioProcessor = audioProcessorRef.get(); + if (audioProcessor != null) { + audioProcessor.cleanup(); + } + }) + .block(); + } + + /** + * Create session configuration with function tools. + */ + private static ClientEventSessionUpdate createSessionConfigWithFunctions() { + // Define function tools + List<VoiceLiveToolDefinition> functionTools = Arrays.asList( + createGetCurrentTimeFunction(), + createGetCurrentWeatherFunction() + ); + + // Create session options + VoiceLiveSessionOptions sessionOptions = new VoiceLiveSessionOptions() + .setInstructions( + "You are a helpful voice assistant with access to function tools. " + + "When asked about the time, use the get_current_time function. " + + "When asked about weather, use the get_current_weather function. " + + "Acknowledge when you're calling a function and present the results naturally in your response." + ) + .setVoice(BinaryData.fromObject(new OpenAIVoice(OpenAIVoiceName.ALLOY))) + .setModalities(Arrays.asList(InteractionModality.TEXT, InteractionModality.AUDIO)) + .setInputAudioFormat(InputAudioFormat.PCM16) + .setOutputAudioFormat(OutputAudioFormat.PCM16) + .setInputAudioSamplingRate(SAMPLE_RATE) + .setInputAudioEchoCancellation(new AudioEchoCancellation()) + .setTurnDetection(new ServerVadTurnDetection() + .setThreshold(0.5) + .setPrefixPaddingMs(300) + .setSilenceDurationMs(500) + .setInterruptResponse(true) + .setAutoTruncate(true) + .setCreateResponse(true)) + .setTools(functionTools) + .setInputAudioTranscription( + new AudioInputTranscriptionOptions(AudioInputTranscriptionOptionsModel.WHISPER_1) + ); + + return new ClientEventSessionUpdate(sessionOptions); + } + + /** + * Create the get_current_time function tool. + */ + private static VoiceLiveFunctionDefinition createGetCurrentTimeFunction() { + ObjectNode parametersSchema = OBJECT_MAPPER.createObjectNode(); + parametersSchema.put("type", "object"); + + ObjectNode properties = parametersSchema.putObject("properties"); + ObjectNode timezoneProperty = properties.putObject("timezone"); + timezoneProperty.put("type", "string"); + timezoneProperty.put("description", "The timezone to get the current time for, e.g., 'UTC', 'local'"); + + return new VoiceLiveFunctionDefinition("get_current_time") + .setDescription("Get the current time") + .setParameters(BinaryData.fromObject(parametersSchema)); + } + + /** + * Create the get_current_weather function tool. + */ + private static VoiceLiveFunctionDefinition createGetCurrentWeatherFunction() { + ObjectNode parametersSchema = OBJECT_MAPPER.createObjectNode(); + parametersSchema.put("type", "object"); + + ObjectNode properties = parametersSchema.putObject("properties"); + + ObjectNode locationProperty = properties.putObject("location"); + locationProperty.put("type", "string"); + locationProperty.put("description", "The city and state, e.g., 'San Francisco, CA'"); + + ObjectNode unitProperty = properties.putObject("unit"); + unitProperty.put("type", "string"); + unitProperty.set("enum", OBJECT_MAPPER.createArrayNode().add("celsius").add("fahrenheit")); + unitProperty.put("description", "The unit of temperature to use (celsius or fahrenheit)"); + + parametersSchema.set("required", OBJECT_MAPPER.createArrayNode().add("location")); + + return new VoiceLiveFunctionDefinition("get_current_weather") + .setDescription("Get the current weather in a given location") + .setParameters(BinaryData.fromObject(parametersSchema)); + } + + /** + * Handle server events. + */ + private static void handleServerEvent( + VoiceLiveSessionAsyncClient session, + SessionUpdate event, + AudioProcessor audioProcessor, + AtomicReference<String> activeFunctionCallId + ) { + ServerEventType eventType = event.getType(); + + if (event instanceof SessionUpdateSessionUpdated) { + SessionUpdateSessionUpdated sessionUpdated = (SessionUpdateSessionUpdated) event; + + // Print the full event details + System.out.println("📄 SessionUpdateSessionUpdated Event:"); + System.out.println(BinaryData.fromObject(sessionUpdated).toString()); + System.out.println(); + + System.out.println("✅ Session ready"); + audioProcessor.startCapture(); + System.out.println("🎤 Start speaking. Say 'What's the time?' or 'What's the weather in Seattle?'"); + + } else if (eventType == ServerEventType.INPUT_AUDIO_BUFFER_SPEECH_STARTED) { + System.out.println("🎤 Listening..."); + audioProcessor.skipPendingAudio(); + + } else if (eventType == ServerEventType.INPUT_AUDIO_BUFFER_SPEECH_STOPPED) { + System.out.println("🤔 Processing..."); + + } else if (event instanceof SessionUpdateResponseAudioDelta) { + SessionUpdateResponseAudioDelta audioDelta = (SessionUpdateResponseAudioDelta) event; + byte[] audioData = audioDelta.getDelta(); + if (audioData != null && audioData.length > 0) { + audioProcessor.queueAudio(audioData); + } + + } else if (event instanceof SessionUpdateConversationItemCreated) { + SessionUpdateConversationItemCreated itemCreated = (SessionUpdateConversationItemCreated) event; + if (itemCreated.getItem() != null && itemCreated.getItem().getType() == ItemType.FUNCTION_CALL) { + ResponseFunctionCallItem functionCallItem = (ResponseFunctionCallItem) itemCreated.getItem(); + String functionName = functionCallItem.getName(); + String callId = functionCallItem.getCallId(); + String previousItemId = functionCallItem.getId(); + + System.out.println("🔧 Calling function: " + functionName); + activeFunctionCallId.set(callId); + + // Handle function call asynchronously + handleFunctionCall(session, callId, previousItemId, functionName, activeFunctionCallId) + .subscribeOn(Schedulers.boundedElastic()) + .subscribe( + v -> {}, + error -> System.err.println("Error handling function call: " + error.getMessage()) + ); + } + } + } + + /** + * Handle function call execution. + */ + private static Mono<Void> handleFunctionCall( + VoiceLiveSessionAsyncClient session, + String callId, + String previousItemId, + String functionName, + AtomicReference<String> activeFunctionCallId + ) { + return waitForFunctionArguments(session, callId) + .flatMap(arguments -> { + System.out.println("📋 Function arguments: " + arguments); + + // Execute the function + Map<String, Object> result = executeFunction(functionName, arguments); + System.out.println("✅ Function result: " + result); + + // Create function output item + String resultJson; + try { + resultJson = OBJECT_MAPPER.writeValueAsString(result); + } catch (Exception e) { + resultJson = "{\"error\": \"Failed to serialize result\"}"; + } + + FunctionCallOutputItem functionOutput = new FunctionCallOutputItem(callId, resultJson); + + // Send the result back via ClientEventConversationItemCreate + ClientEventConversationItemCreate createItem = new ClientEventConversationItemCreate() + .setItem(functionOutput) + .setPreviousItemId(previousItemId); + + return session.sendEvent(createItem) + .then(session.sendEvent(new ClientEventResponseCreate())) + .then(waitForResponseComplete(session, previousItemId)) + .doFinally(signal -> activeFunctionCallId.set(null)); + }) + .onErrorResume(error -> { + System.err.println("Error in function call: " + error.getMessage()); + activeFunctionCallId.set(null); + return Mono.empty(); + }); + } + + /** + * Wait for function arguments to be complete. + */ + private static Mono<String> waitForFunctionArguments(VoiceLiveSessionAsyncClient session, String callId) { + return session.receiveEvents() + .filter(event -> event instanceof SessionUpdateResponseFunctionCallArgumentsDone) + .map(event -> (SessionUpdateResponseFunctionCallArgumentsDone) event) + .filter(event -> callId.equals(event.getCallId())) + .map(SessionUpdateResponseFunctionCallArgumentsDone::getArguments) + .next() + .timeout(Duration.ofSeconds(10)); + } + + /** + * Wait for response to complete after function call. + */ + private static Mono<Void> waitForResponseComplete(VoiceLiveSessionAsyncClient session, String previousItemId) { + return session.receiveEvents() + .filter(event -> event.getType() == ServerEventType.RESPONSE_DONE) + .next() + .then( + session.receiveEvents() + .filter(event -> event instanceof SessionUpdateResponseOutputItemDone) + .map(event -> (SessionUpdateResponseOutputItemDone) event) + .filter(event -> event.getItem() != null && !previousItemId.equals(event.getItem().getId())) + .next() + .doOnNext(event -> System.out.println("🤖 Assistant responded with function result")) + .then() + ) + .timeout(Duration.ofSeconds(10)); + } + + /** + * Execute the requested function. + */ + private static Map<String, Object> executeFunction(String functionName, String argumentsJson) { + try { + JsonNode arguments = OBJECT_MAPPER.readTree(argumentsJson); + + switch (functionName) { + case "get_current_time": + return getCurrentTime(arguments); + case "get_current_weather": + return getCurrentWeather(arguments); + default: + Map<String, Object> error = new HashMap<>(); + error.put("error", "Unknown function: " + functionName); + return error; + } + } catch (Exception e) { + Map<String, Object> error = new HashMap<>(); + error.put("error", "Failed to parse arguments: " + e.getMessage()); + return error; + } + } + + /** + * Get current time function implementation. + */ + private static Map<String, Object> getCurrentTime(JsonNode arguments) { + String timezone = arguments.has("timezone") ? arguments.get("timezone").asText() : "local"; + + LocalDateTime now; + String timezoneName; + + if ("UTC".equalsIgnoreCase(timezone)) { + now = LocalDateTime.now(ZoneId.of("UTC")); + timezoneName = "UTC"; + } else { + now = LocalDateTime.now(); + timezoneName = "local"; + } + + DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern("hh:mm:ss a"); + DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("EEEE, MMMM dd, yyyy"); + + Map<String, Object> result = new HashMap<>(); + result.put("time", now.format(timeFormatter)); + result.put("date", now.format(dateFormatter)); + result.put("timezone", timezoneName); + + return result; + } + + /** + * Get current weather function implementation. + */ + private static Map<String, Object> getCurrentWeather(JsonNode arguments) { + if (!arguments.has("location")) { + Map<String, Object> error = new HashMap<>(); + error.put("error", "Location parameter is required"); + return error; + } + + String location = arguments.get("location").asText(); + String unit = arguments.has("unit") ? arguments.get("unit").asText() : "celsius"; + + // Simulated weather data + Map<String, Object> result = new HashMap<>(); + result.put("location", location); + result.put("temperature", unit.equals("celsius") ? 22 : 72); + result.put("unit", unit); + result.put("forecast", "Partly cloudy"); + result.put("humidity", 65); + result.put("wind_speed", 15); + + return result; + } + + /** + * Manages audio capture and playback. + */ + private static class AudioProcessor { + private final VoiceLiveSessionAsyncClient session; + private final AudioFormat audioFormat; + + private TargetDataLine microphone; + private final AtomicBoolean isCapturing = new AtomicBoolean(false); + + private SourceDataLine speaker; + private final BlockingQueue<byte[]> playbackQueue = new LinkedBlockingQueue<>(); + private final AtomicBoolean isPlaying = new AtomicBoolean(false); + + AudioProcessor(VoiceLiveSessionAsyncClient session) { + this.session = session; + this.audioFormat = new AudioFormat(SAMPLE_RATE, SAMPLE_SIZE_BITS, CHANNELS, true, false); + } + + void startCapture() { + if (isCapturing.get()) { + return; + } + + try { + DataLine.Info micInfo = new DataLine.Info(TargetDataLine.class, audioFormat); + microphone = (TargetDataLine) AudioSystem.getLine(micInfo); + microphone.open(audioFormat, CHUNK_SIZE * 4); + microphone.start(); + isCapturing.set(true); + + // Start capture thread + new Thread(() -> { + byte[] buffer = new byte[CHUNK_SIZE]; + while (isCapturing.get()) { + int bytesRead = microphone.read(buffer, 0, buffer.length); + if (bytesRead > 0) { + byte[] audioData = Arrays.copyOf(buffer, bytesRead); + session.sendInputAudio(BinaryData.fromBytes(audioData)).subscribe(); + } + } + }, "AudioCapture").start(); + + System.out.println("✅ Audio capture started"); + } catch (LineUnavailableException e) { + System.err.println("Failed to start audio capture: " + e.getMessage()); + isCapturing.set(false); + } + } + + void startPlayback() { + if (isPlaying.get()) { + return; + } + + try { + DataLine.Info speakerInfo = new DataLine.Info(SourceDataLine.class, audioFormat); + speaker = (SourceDataLine) AudioSystem.getLine(speakerInfo); + speaker.open(audioFormat, CHUNK_SIZE * 4); + speaker.start(); + isPlaying.set(true); + + // Start playback thread + new Thread(() -> { + while (isPlaying.get()) { + try { + byte[] audioData = playbackQueue.poll(); + if (audioData != null) { + speaker.write(audioData, 0, audioData.length); + } else { + Thread.sleep(10); + } + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + break; + } + } + }, "AudioPlayback").start(); + + System.out.println("✅ Audio playback started"); + } catch (LineUnavailableException e) { + System.err.println("Failed to start audio playback: " + e.getMessage()); + isPlaying.set(false); + } + } + + void skipPendingAudio() { + playbackQueue.clear(); + } + + void queueAudio(byte[] audioData) { + if (isPlaying.get()) { + playbackQueue.offer(audioData); + } + } + + void cleanup() { + isCapturing.set(false); + isPlaying.set(false); + + if (microphone != null) { + microphone.stop(); + microphone.close(); + } + + if (speaker != null) { + speaker.drain(); + speaker.stop(); + speaker.close(); + } + + playbackQueue.clear(); + } + } +} diff --git a/sdk/ai/azure-ai-voicelive/src/samples/java/com/azure/ai/voicelive/ReadmeSamples.java b/sdk/ai/azure-ai-voicelive/src/samples/java/com/azure/ai/voicelive/ReadmeSamples.java index 08bb781b1d3f..b006cc42c402 100644 --- a/sdk/ai/azure-ai-voicelive/src/samples/java/com/azure/ai/voicelive/ReadmeSamples.java +++ b/sdk/ai/azure-ai-voicelive/src/samples/java/com/azure/ai/voicelive/ReadmeSamples.java @@ -9,6 +9,13 @@ import com.azure.ai.voicelive.models.AudioNoiseReduction; import com.azure.ai.voicelive.models.AudioNoiseReductionType; import com.azure.ai.voicelive.models.AzureCustomVoice; +import com.azure.ai.voicelive.models.ClientEventConversationItemCreate; +import com.azure.ai.voicelive.models.ClientEventResponseCreate; +import com.azure.ai.voicelive.models.FunctionCallOutputItem; +import com.azure.ai.voicelive.models.ItemType; +import com.azure.ai.voicelive.models.ResponseFunctionCallItem; +import com.azure.ai.voicelive.models.SessionUpdateConversationItemCreated; +import com.azure.ai.voicelive.models.VoiceLiveFunctionDefinition; import com.azure.ai.voicelive.models.AzurePersonalVoice; import com.azure.ai.voicelive.models.AzureStandardVoice; import com.azure.ai.voicelive.models.ClientEventSessionUpdate; @@ -30,9 +37,12 @@ import com.azure.core.util.BinaryData; import com.azure.identity.AzureCliCredentialBuilder; import com.azure.identity.DefaultAzureCredentialBuilder; +import com.fasterxml.jackson.databind.ObjectMapper; import reactor.core.publisher.Mono; import java.io.IOException; +import java.util.HashMap; +import java.util.Map; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -332,7 +342,77 @@ public void voiceConfigurationAzure() { // END: com.azure.ai.voicelive.voice.azure } + /** + * Sample for function calling + */ + public void functionCalling() { + VoiceLiveAsyncClient client = new VoiceLiveClientBuilder() + .endpoint(endpoint) + .credential(new AzureKeyCredential(apiKey)) + .buildAsyncClient(); + + // BEGIN: com.azure.ai.voicelive.functioncalling + // 1. Define function tool with parameters + VoiceLiveFunctionDefinition getWeatherFunction = new VoiceLiveFunctionDefinition("get_current_weather") + .setDescription("Get the current weather in a given location") + .setParameters(BinaryData.fromObject(parametersSchema)); // JSON schema + + // 2. Configure session with tools + VoiceLiveSessionOptions options = new VoiceLiveSessionOptions() + .setTools(Arrays.asList(getWeatherFunction)) + .setInstructions("You have access to weather information. Use get_current_weather when asked about weather."); + + // 3. Handle function call events + client.startSession("gpt-4o-realtime-preview") + .flatMap(session -> { + session.receiveEvents() + .subscribe(event -> { + if (event instanceof SessionUpdateConversationItemCreated) { + SessionUpdateConversationItemCreated itemCreated = (SessionUpdateConversationItemCreated) event; + if (itemCreated.getItem().getType() == ItemType.FUNCTION_CALL) { + ResponseFunctionCallItem functionCall = (ResponseFunctionCallItem) itemCreated.getItem(); + + // Wait for arguments + String callId = functionCall.getCallId(); + String arguments = waitForArguments(session, callId); // Helper method + + // Execute function + try { + Map<String, Object> result = getCurrentWeather(arguments); + String resultJson = new ObjectMapper().writeValueAsString(result); + + // Return result + FunctionCallOutputItem output = new FunctionCallOutputItem(callId, resultJson); + ClientEventConversationItemCreate createItem = new ClientEventConversationItemCreate() + .setItem(output) + .setPreviousItemId(functionCall.getId()); + + session.sendEvent(createItem).subscribe(); + session.sendEvent(new ClientEventResponseCreate()).subscribe(); + } catch (Exception e) { + System.err.println("Error executing function: " + e.getMessage()); + } + } + } + }); + + return Mono.just(session); + }) + .block(); + // END: com.azure.ai.voicelive.functioncalling + } + // Helper methods + private Object parametersSchema = new Object(); + + private String waitForArguments(VoiceLiveSessionAsyncClient session, String callId) { + return "{}"; + } + + private Map<String, Object> getCurrentWeather(String arguments) { + return new HashMap<>(); + } + private byte[] readAudioChunk() { return new byte[0]; } From 4f751cdaac926d54da7490f7e25d2161a886e8ac Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Wed, 10 Dec 2025 15:30:10 +0800 Subject: [PATCH 134/186] fix binder tests --- .../spring-cloud-azure-stream-binder-eventhubs-core/pom.xml | 4 ++++ .../implementation/EventHubsHealthIndicatorTests.java | 1 + .../implementation/EventHubsMessageChannelBinderTests.java | 4 +++- .../implementation/ServiceBusHealthIndicatorTests.java | 6 ++++++ .../implementation/ServiceBusMessageChannelBinderTest.java | 1 + 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/pom.xml b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/pom.xml index 2e09532d69d7..8716a8a731ed 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/pom.xml +++ b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/pom.xml @@ -46,6 +46,10 @@ <groupId>org.springframework.integration</groupId> <artifactId>spring-integration-core</artifactId> </exclusion> + <exclusion> + <groupId>io.projectreactor</groupId> + <artifactId>reactor-core</artifactId> + </exclusion> </exclusions> <version>5.0.0</version> <!-- {x-version-update;springboot4_org.springframework.cloud:spring-cloud-stream;external_dependency} --> </dependency> diff --git a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/test/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/EventHubsHealthIndicatorTests.java b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/test/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/EventHubsHealthIndicatorTests.java index 280f02623e77..9f13966f25ac 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/test/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/EventHubsHealthIndicatorTests.java +++ b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/test/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/EventHubsHealthIndicatorTests.java @@ -78,6 +78,7 @@ public class EventHubsHealthIndicatorTests { public void init() { MockitoAnnotations.openMocks(this); GenericApplicationContext context = new GenericApplicationContext(); + context.refresh(); binder.setApplicationContext(context); healthIndicator = new EventHubsHealthIndicator(binder); } diff --git a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/test/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/EventHubsMessageChannelBinderTests.java b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/test/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/EventHubsMessageChannelBinderTests.java index 066e030c936b..e86f04fe63e5 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/test/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/EventHubsMessageChannelBinderTests.java +++ b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/test/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/EventHubsMessageChannelBinderTests.java @@ -42,7 +42,9 @@ class EventHubsMessageChannelBinderTests { void init() { MockitoAnnotations.openMocks(this); when(producerDestination.getName()).thenReturn("producer-test"); - binder.setApplicationContext(new GenericApplicationContext()); + GenericApplicationContext context = new GenericApplicationContext(); + context.refresh(); + binder.setApplicationContext(context); } @Test diff --git a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/test/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/ServiceBusHealthIndicatorTests.java b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/test/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/ServiceBusHealthIndicatorTests.java index a42412dfb815..e44123f5b039 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/test/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/ServiceBusHealthIndicatorTests.java +++ b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/test/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/ServiceBusHealthIndicatorTests.java @@ -28,6 +28,8 @@ import org.springframework.cloud.stream.provisioning.ConsumerDestination; import org.springframework.cloud.stream.provisioning.ProducerDestination; import org.springframework.context.support.GenericApplicationContext; +import org.springframework.expression.spel.support.StandardEvaluationContext; +import org.springframework.integration.context.IntegrationContextUtils; import org.springframework.integration.support.MessageBuilder; import org.springframework.messaging.MessageChannel; import org.springframework.test.util.ReflectionTestUtils; @@ -74,6 +76,10 @@ class ServiceBusHealthIndicatorTests { void init() { MockitoAnnotations.openMocks(this); GenericApplicationContext context = new GenericApplicationContext(); + StandardEvaluationContext sec = new StandardEvaluationContext(); + when(beanFactory.containsBean(IntegrationContextUtils.INTEGRATION_EVALUATION_CONTEXT_BEAN_NAME)).thenReturn(true); + when(beanFactory.getBean(IntegrationContextUtils.INTEGRATION_EVALUATION_CONTEXT_BEAN_NAME, StandardEvaluationContext.class)).thenReturn(sec); + context.refresh(); binder.setApplicationContext(context); serviceBusHealthIndicator = new ServiceBusHealthIndicator(binder); } diff --git a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/test/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/ServiceBusMessageChannelBinderTest.java b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/test/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/ServiceBusMessageChannelBinderTest.java index 75e3b905ccd0..749e16e2329b 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/test/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/ServiceBusMessageChannelBinderTest.java +++ b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/test/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/ServiceBusMessageChannelBinderTest.java @@ -64,6 +64,7 @@ class ServiceBusMessageChannelBinderTest { void init() { MockitoAnnotations.openMocks(this); GenericApplicationContext context = new GenericApplicationContext(); + context.refresh(); binder.setApplicationContext(context); } From 298fd62316443740511883e0765ab2710590abff Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 10 Dec 2025 11:28:34 -0800 Subject: [PATCH 135/186] Sync eng/common directory with azure-sdk-tools for PR 13134 (#47463) * instruction fix * description + instructions --------- Co-authored-by: Juan Ospina <70209456+jeo02@users.noreply.github.com> --- .../azsdk-tools/check-package-readiness.instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/instructions/azsdk-tools/check-package-readiness.instructions.md b/eng/common/instructions/azsdk-tools/check-package-readiness.instructions.md index bb4334dc586f..486d59436bee 100644 --- a/eng/common/instructions/azsdk-tools/check-package-readiness.instructions.md +++ b/eng/common/instructions/azsdk-tools/check-package-readiness.instructions.md @@ -15,7 +15,7 @@ Check the release readiness of an SDK package by collecting the required informa - Go 2. **Execute Readiness Check**: - - Use the `azsdk_check_package_release_readiness` tool with the provided package name and selected language + - Use the `azsdk_release_sdk` tool with the provided package name, selected language, and set checkReady to true. - Do not check for existing pull requests to run this step. - Do not ask the user to create a release plan to run this step. From 89e3941b52916c159cf8f6e79324ea9c7f74cf7b Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 10 Dec 2025 12:47:13 -0800 Subject: [PATCH 136/186] Increment package versions for cosmos releases (#47517) --- eng/versioning/version_client.txt | 14 +++++++------- sdk/cosmos/azure-cosmos-benchmark/pom.xml | 4 ++-- sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md | 10 ++++++++++ sdk/cosmos/azure-cosmos-encryption/pom.xml | 4 ++-- sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md | 10 ++++++++++ sdk/cosmos/azure-cosmos-kafka-connect/pom.xml | 6 +++--- .../pom.xml | 4 ++-- .../azure-cosmos-spark_3-3_2-12/CHANGELOG.md | 10 ++++++++++ sdk/cosmos/azure-cosmos-spark_3-3_2-12/pom.xml | 2 +- .../azure-cosmos-spark_3-4_2-12/CHANGELOG.md | 10 ++++++++++ sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml | 2 +- .../azure-cosmos-spark_3-5_2-12/CHANGELOG.md | 10 ++++++++++ sdk/cosmos/azure-cosmos-spark_3-5_2-12/pom.xml | 2 +- sdk/cosmos/azure-cosmos-spark_3/pom.xml | 4 ++-- sdk/cosmos/azure-cosmos-test/CHANGELOG.md | 10 ++++++++++ sdk/cosmos/azure-cosmos-test/pom.xml | 4 ++-- sdk/cosmos/azure-cosmos-tests/pom.xml | 4 ++-- sdk/cosmos/azure-cosmos/CHANGELOG.md | 10 ++++++++++ sdk/cosmos/azure-cosmos/pom.xml | 2 +- sdk/cosmos/fabric-cosmos-spark-auth_3/pom.xml | 4 ++-- .../azure-resourcemanager-samples/pom.xml | 2 +- sdk/spring/azure-spring-data-cosmos/pom.xml | 2 +- .../pom.xml | 2 +- sdk/spring/spring-cloud-azure-actuator/pom.xml | 2 +- .../spring-cloud-azure-autoconfigure/pom.xml | 2 +- sdk/spring/spring-cloud-azure-service/pom.xml | 2 +- .../spring-cloud-azure-starter-cosmos/pom.xml | 2 +- 27 files changed, 105 insertions(+), 35 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 552488a5703b..befc2c3e70be 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -104,20 +104,20 @@ com.azure:azure-core-test;1.27.0-beta.13;1.27.0-beta.14 com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.61;1.0.0-beta.62 com.azure:azure-core-tracing-opentelemetry-samples;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-core-version-tests;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-cosmos;4.75.0;4.76.0 +com.azure:azure-cosmos;4.76.0;4.77.0-beta.1 com.azure:azure-cosmos-benchmark;4.0.1-beta.1;4.0.1-beta.1 com.azure.cosmos.spark:azure-cosmos-spark_3;0.0.1-beta.1;0.0.1-beta.1 com.azure.cosmos.spark:azure-cosmos-spark_3-5;0.0.1-beta.1;0.0.1-beta.1 -com.azure:azure-cosmos-encryption;2.24.0;2.25.0 +com.azure:azure-cosmos-encryption;2.25.0;2.26.0-beta.1 com.azure.cosmos.spark:azure-cosmos-spark-account-data-resolver-sample;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-cosmos-test;1.0.0-beta.15;1.0.0-beta.16 -com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12;4.41.0;4.42.0 -com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12;4.41.0;4.42.0 -com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;4.41.0;4.42.0 +com.azure:azure-cosmos-test;1.0.0-beta.16;1.0.0-beta.17 +com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12;4.42.0;4.43.0-beta.1 +com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12;4.42.0;4.43.0-beta.1 +com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;4.42.0;4.43.0-beta.1 com.azure.cosmos.spark:fabric-cosmos-spark-auth_3;1.1.0;1.2.0-beta.1 com.azure:azure-cosmos-tests;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-data-appconfiguration;1.8.5;1.9.0-beta.1 -com.azure.cosmos.kafka:azure-cosmos-kafka-connect;2.6.1;2.7.0 +com.azure.cosmos.kafka:azure-cosmos-kafka-connect;2.7.0;2.8.0-beta.1 com.azure:azure-data-appconfiguration-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-data-schemaregistry;1.5.9;1.6.0-beta.1 com.azure:azure-data-schemaregistry-apacheavro;1.1.30;1.2.0-beta.3 diff --git a/sdk/cosmos/azure-cosmos-benchmark/pom.xml b/sdk/cosmos/azure-cosmos-benchmark/pom.xml index ee6a3ab1f2b1..be3ab8f66015 100644 --- a/sdk/cosmos/azure-cosmos-benchmark/pom.xml +++ b/sdk/cosmos/azure-cosmos-benchmark/pom.xml @@ -52,13 +52,13 @@ Licensed under the MIT License. <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> + <version>4.77.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos-encryption</artifactId> - <version>2.25.0</version> <!-- {x-version-update;com.azure:azure-cosmos-encryption;current} --> + <version>2.26.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos-encryption;current} --> </dependency> <dependency> diff --git a/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md b/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md index 2f1827c9242a..d89ae63b81d7 100644 --- a/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md @@ -1,5 +1,15 @@ ## Release History +### 2.26.0-beta.1 (Unreleased) + +#### Features Added + +#### Breaking Changes + +#### Bugs Fixed + +#### Other Changes + ### 2.25.0 (2025-12-09) #### Other Changes diff --git a/sdk/cosmos/azure-cosmos-encryption/pom.xml b/sdk/cosmos/azure-cosmos-encryption/pom.xml index 2ec6e7beb33e..e258ab9555dc 100644 --- a/sdk/cosmos/azure-cosmos-encryption/pom.xml +++ b/sdk/cosmos/azure-cosmos-encryption/pom.xml @@ -13,7 +13,7 @@ Licensed under the MIT License. <groupId>com.azure</groupId> <artifactId>azure-cosmos-encryption</artifactId> - <version>2.25.0</version> <!-- {x-version-update;com.azure:azure-cosmos-encryption;current} --> + <version>2.26.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos-encryption;current} --> <name>Encryption Plugin for Azure Cosmos DB SDK</name> <description>This Package contains Encryption Plugin for Microsoft Azure Cosmos SDK</description> <packaging>jar</packaging> @@ -61,7 +61,7 @@ Licensed under the MIT License. <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> + <version>4.77.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> </dependency> <dependency> diff --git a/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md b/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md index 6649ce12fbaa..40d044cf49ec 100644 --- a/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md @@ -1,5 +1,15 @@ ## Release History +### 2.8.0-beta.1 (Unreleased) + +#### Features Added + +#### Breaking Changes + +#### Bugs Fixed + +#### Other Changes + ### 2.7.0 (2025-12-09) #### Other Changes diff --git a/sdk/cosmos/azure-cosmos-kafka-connect/pom.xml b/sdk/cosmos/azure-cosmos-kafka-connect/pom.xml index 5590ebb9ff63..2dd69b9a7091 100644 --- a/sdk/cosmos/azure-cosmos-kafka-connect/pom.xml +++ b/sdk/cosmos/azure-cosmos-kafka-connect/pom.xml @@ -13,7 +13,7 @@ Licensed under the MIT License. <groupId>com.azure.cosmos.kafka</groupId> <artifactId>azure-cosmos-kafka-connect</artifactId> - <version>2.7.0</version> <!-- {x-version-update;com.azure.cosmos.kafka:azure-cosmos-kafka-connect;current} --> + <version>2.8.0-beta.1</version> <!-- {x-version-update;com.azure.cosmos.kafka:azure-cosmos-kafka-connect;current} --> <name>Apache Kafka Connect connector for Azure Cosmos DB</name> <description>This Package contains an Apache Kafka Connect source and sink connector for Azure Cosmos DB</description> <packaging>jar</packaging> @@ -92,7 +92,7 @@ Licensed under the MIT License. <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> + <version>4.77.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> </dependency> <!-- Added this provided dependency to include necessary annotations used by "reactor-core". @@ -111,7 +111,7 @@ Licensed under the MIT License. <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos-test</artifactId> - <version>1.0.0-beta.16</version> <!-- {x-version-update;com.azure:azure-cosmos-test;current} --> + <version>1.0.0-beta.17</version> <!-- {x-version-update;com.azure:azure-cosmos-test;current} --> <scope>test</scope> </dependency> diff --git a/sdk/cosmos/azure-cosmos-spark-account-data-resolver-sample/pom.xml b/sdk/cosmos/azure-cosmos-spark-account-data-resolver-sample/pom.xml index f96927a93261..5f8aa27d8f28 100644 --- a/sdk/cosmos/azure-cosmos-spark-account-data-resolver-sample/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark-account-data-resolver-sample/pom.xml @@ -97,7 +97,7 @@ <dependency> <groupId>com.azure.cosmos.spark</groupId> <artifactId>azure-cosmos-spark_3-5_2-12</artifactId> - <version>4.42.0</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> + <version>4.43.0-beta.1</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> <scope>provided</scope> </dependency> <dependency> @@ -292,7 +292,7 @@ <include>com.fasterxml.jackson.core:jackson-databind:[2.15.2]</include> <!-- {x-include-update;cosmos_com.fasterxml.jackson.core:jackson-databind;external_dependency} --> <include>com.fasterxml.jackson.module:jackson-module-scala_2.12:[2.15.2]</include> <!-- {x-include-update;cosmos_com.fasterxml.jackson.module:jackson-module-scala_2.12;external_dependency} --> <include>com.globalmentor:hadoop-bare-naked-local-fs:[0.1.0]</include> <!-- {x-include-update;cosmos_com.globalmentor:hadoop-bare-naked-local-fs;external_dependency} --> - <include>com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12:[4.42.0]</include> <!-- {x-include-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> + <include>com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12:[4.43.0-beta.1]</include> <!-- {x-include-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> </includes> </bannedDependencies> </rules> diff --git a/sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md b/sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md index e9d916e21278..25099808acbb 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md @@ -1,5 +1,15 @@ ## Release History +### 4.43.0-beta.1 (Unreleased) + +#### Features Added + +#### Breaking Changes + +#### Bugs Fixed + +#### Other Changes + ### 4.42.0 (2025-12-09) #### Other Changes diff --git a/sdk/cosmos/azure-cosmos-spark_3-3_2-12/pom.xml b/sdk/cosmos/azure-cosmos-spark_3-3_2-12/pom.xml index 1a47781a1995..5683d8b2b058 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-3_2-12/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_3-3_2-12/pom.xml @@ -11,7 +11,7 @@ </parent> <groupId>com.azure.cosmos.spark</groupId> <artifactId>azure-cosmos-spark_3-3_2-12</artifactId> - <version>4.42.0</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12;current} --> + <version>4.43.0-beta.1</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12;current} --> <packaging>jar</packaging> <url>https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/cosmos/azure-cosmos-spark_3-3_2-12</url> <name>OLTP Spark 3.3 Connector for Azure Cosmos DB SQL API</name> diff --git a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md index d622f4e51c74..e21f09f6eb24 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md @@ -1,5 +1,15 @@ ## Release History +### 4.43.0-beta.1 (Unreleased) + +#### Features Added + +#### Breaking Changes + +#### Bugs Fixed + +#### Other Changes + ### 4.42.0 (2025-12-09) #### Other Changes diff --git a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml index 90f9b182a9e7..44a83888e577 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml @@ -11,7 +11,7 @@ </parent> <groupId>com.azure.cosmos.spark</groupId> <artifactId>azure-cosmos-spark_3-4_2-12</artifactId> - <version>4.42.0</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12;current} --> + <version>4.43.0-beta.1</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12;current} --> <packaging>jar</packaging> <url>https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/cosmos/azure-cosmos-spark_3-4_2-12</url> <name>OLTP Spark 3.4 Connector for Azure Cosmos DB SQL API</name> diff --git a/sdk/cosmos/azure-cosmos-spark_3-5_2-12/CHANGELOG.md b/sdk/cosmos/azure-cosmos-spark_3-5_2-12/CHANGELOG.md index 1ff935c9bbbe..44ace00f837d 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-5_2-12/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-spark_3-5_2-12/CHANGELOG.md @@ -1,5 +1,15 @@ ## Release History +### 4.43.0-beta.1 (Unreleased) + +#### Features Added + +#### Breaking Changes + +#### Bugs Fixed + +#### Other Changes + ### 4.42.0 (2025-12-09) #### Other Changes diff --git a/sdk/cosmos/azure-cosmos-spark_3-5_2-12/pom.xml b/sdk/cosmos/azure-cosmos-spark_3-5_2-12/pom.xml index d5871f8baef6..22434193aeae 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-5_2-12/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_3-5_2-12/pom.xml @@ -11,7 +11,7 @@ </parent> <groupId>com.azure.cosmos.spark</groupId> <artifactId>azure-cosmos-spark_3-5_2-12</artifactId> - <version>4.42.0</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> + <version>4.43.0-beta.1</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> <packaging>jar</packaging> <url>https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/cosmos/azure-cosmos-spark_3-5_2-12</url> <name>OLTP Spark 3.5 Connector for Azure Cosmos DB SQL API</name> diff --git a/sdk/cosmos/azure-cosmos-spark_3/pom.xml b/sdk/cosmos/azure-cosmos-spark_3/pom.xml index 612967d22177..e7b846207ee5 100644 --- a/sdk/cosmos/azure-cosmos-spark_3/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_3/pom.xml @@ -58,7 +58,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> + <version>4.77.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> <exclusions> <exclusion> <groupId>org.slf4j</groupId> @@ -195,7 +195,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos-test</artifactId> - <version>1.0.0-beta.16</version> <!-- {x-version-update;com.azure:azure-cosmos-test;current} --> + <version>1.0.0-beta.17</version> <!-- {x-version-update;com.azure:azure-cosmos-test;current} --> <scope>test</scope> </dependency> diff --git a/sdk/cosmos/azure-cosmos-test/CHANGELOG.md b/sdk/cosmos/azure-cosmos-test/CHANGELOG.md index 3b135b2f16d2..2fda33707b8d 100644 --- a/sdk/cosmos/azure-cosmos-test/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-test/CHANGELOG.md @@ -1,5 +1,15 @@ ## Release History +### 1.0.0-beta.17 (Unreleased) + +#### Features Added + +#### Breaking Changes + +#### Bugs Fixed + +#### Other Changes + ### 1.0.0-beta.16 (2025-12-09) #### Features Added diff --git a/sdk/cosmos/azure-cosmos-test/pom.xml b/sdk/cosmos/azure-cosmos-test/pom.xml index db566dd3bdc2..25aa2b924227 100644 --- a/sdk/cosmos/azure-cosmos-test/pom.xml +++ b/sdk/cosmos/azure-cosmos-test/pom.xml @@ -13,7 +13,7 @@ Licensed under the MIT License. <groupId>com.azure</groupId> <artifactId>azure-cosmos-test</artifactId> - <version>1.0.0-beta.16</version> <!-- {x-version-update;com.azure:azure-cosmos-test;current} --> + <version>1.0.0-beta.17</version> <!-- {x-version-update;com.azure:azure-cosmos-test;current} --> <name>Microsoft Azure Java Cosmos Test Library</name> <description>This package contains core fault injection types for Azure Java Cosmos client.</description> <packaging>jar</packaging> @@ -59,7 +59,7 @@ Licensed under the MIT License. <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> + <version>4.77.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> </dependency> <dependency> diff --git a/sdk/cosmos/azure-cosmos-tests/pom.xml b/sdk/cosmos/azure-cosmos-tests/pom.xml index cf7a2c8cb5e3..bdb946b8bd03 100644 --- a/sdk/cosmos/azure-cosmos-tests/pom.xml +++ b/sdk/cosmos/azure-cosmos-tests/pom.xml @@ -100,12 +100,12 @@ Licensed under the MIT License. <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> + <version>4.77.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos-test</artifactId> - <version>1.0.0-beta.16</version> <!-- {x-version-update;com.azure:azure-cosmos-test;current} --> + <version>1.0.0-beta.17</version> <!-- {x-version-update;com.azure:azure-cosmos-test;current} --> </dependency> <dependency> <groupId>commons-io</groupId> diff --git a/sdk/cosmos/azure-cosmos/CHANGELOG.md b/sdk/cosmos/azure-cosmos/CHANGELOG.md index c76189f5b3dd..ce3b76a5d722 100644 --- a/sdk/cosmos/azure-cosmos/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos/CHANGELOG.md @@ -1,5 +1,15 @@ ## Release History +### 4.77.0-beta.1 (Unreleased) + +#### Features Added + +#### Breaking Changes + +#### Bugs Fixed + +#### Other Changes + ### 4.76.0 (2025-12-09) #### Bugs Fixed diff --git a/sdk/cosmos/azure-cosmos/pom.xml b/sdk/cosmos/azure-cosmos/pom.xml index 2fd9dc103215..b5e14c3c52a8 100644 --- a/sdk/cosmos/azure-cosmos/pom.xml +++ b/sdk/cosmos/azure-cosmos/pom.xml @@ -13,7 +13,7 @@ Licensed under the MIT License. <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> + <version>4.77.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} --> <name>Microsoft Azure SDK for SQL API of Azure Cosmos DB Service</name> <description>This Package contains Microsoft Azure Cosmos SDK (with Reactive Extension Reactor support) for Azure Cosmos DB SQL API</description> <packaging>jar</packaging> diff --git a/sdk/cosmos/fabric-cosmos-spark-auth_3/pom.xml b/sdk/cosmos/fabric-cosmos-spark-auth_3/pom.xml index 8af90cd9943d..94d7f17c86ad 100644 --- a/sdk/cosmos/fabric-cosmos-spark-auth_3/pom.xml +++ b/sdk/cosmos/fabric-cosmos-spark-auth_3/pom.xml @@ -100,7 +100,7 @@ <dependency> <groupId>com.azure.cosmos.spark</groupId> <artifactId>azure-cosmos-spark_3-5_2-12</artifactId> - <version>4.42.0</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> + <version>4.43.0-beta.1</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> <scope>provided</scope> </dependency> <dependency> @@ -185,7 +185,7 @@ <include>com.fasterxml.jackson.module:jackson-module-scala_2.12:[2.18.4]</include> <!-- {x-include-update;com.fasterxml.jackson.module:jackson-module-scala_2.12;external_dependency} --> <include>com.fasterxml.jackson.core:jackson-databind:[2.15.2]</include> <!-- {x-include-update;cosmos_com.fasterxml.jackson.core:jackson-databind;external_dependency} --> <include>com.fasterxml.jackson.module:jackson-module-scala_2.12:[2.15.2]</include> <!-- {x-include-update;cosmos_com.fasterxml.jackson.module:jackson-module-scala_2.12;external_dependency} --> - <include>com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12:[4.42.0]</include> <!-- {x-include-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> + <include>com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12:[4.43.0-beta.1]</include> <!-- {x-include-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} --> <include>com.microsoft.azure.synapse:synapseutils_2.12:[1.5.4]</include> <!-- {x-include-update;cosmos_com.microsoft.azure.synapse:synapseutils_2.12;external_dependency} --> </includes> </bannedDependencies> diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml index 60dd74c01d58..5d303163e374 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml @@ -114,7 +114,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.75.0</version> <!-- {x-version-update;com.azure:azure-cosmos;dependency} --> + <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;dependency} --> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/spring/azure-spring-data-cosmos/pom.xml b/sdk/spring/azure-spring-data-cosmos/pom.xml index 67b68bf41a42..5d22330df9a0 100644 --- a/sdk/spring/azure-spring-data-cosmos/pom.xml +++ b/sdk/spring/azure-spring-data-cosmos/pom.xml @@ -100,7 +100,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.75.0</version> <!-- {x-version-update;com.azure:azure-cosmos;dependency} --> + <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;dependency} --> </dependency> <dependency> <groupId>com.fasterxml.jackson.module</groupId> diff --git a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml index 526df4456a29..2af86656a78c 100644 --- a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml @@ -78,7 +78,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.75.0</version> <!-- {x-version-update;com.azure:azure-cosmos;dependency} --> + <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;dependency} --> <optional>true</optional> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-actuator/pom.xml b/sdk/spring/spring-cloud-azure-actuator/pom.xml index c97735c55a04..5e48264f96a0 100644 --- a/sdk/spring/spring-cloud-azure-actuator/pom.xml +++ b/sdk/spring/spring-cloud-azure-actuator/pom.xml @@ -61,7 +61,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.75.0</version> <!-- {x-version-update;com.azure:azure-cosmos;dependency} --> + <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;dependency} --> <optional>true</optional> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index d9a5de8fe98d..e788542ddce3 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -202,7 +202,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.75.0</version> <!-- {x-version-update;com.azure:azure-cosmos;dependency} --> + <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;dependency} --> <optional>true</optional> <exclusions> <exclusion> diff --git a/sdk/spring/spring-cloud-azure-service/pom.xml b/sdk/spring/spring-cloud-azure-service/pom.xml index ee1629b16f3c..33ab542dc1f8 100644 --- a/sdk/spring/spring-cloud-azure-service/pom.xml +++ b/sdk/spring/spring-cloud-azure-service/pom.xml @@ -54,7 +54,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.75.0</version> <!-- {x-version-update;com.azure:azure-cosmos;dependency} --> + <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;dependency} --> <optional>true</optional> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-starter-cosmos/pom.xml b/sdk/spring/spring-cloud-azure-starter-cosmos/pom.xml index 0e8bc48c4684..4da8aa6f1df7 100644 --- a/sdk/spring/spring-cloud-azure-starter-cosmos/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-cosmos/pom.xml @@ -94,7 +94,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> - <version>4.75.0</version> <!-- {x-version-update;com.azure:azure-cosmos;dependency} --> + <version>4.76.0</version> <!-- {x-version-update;com.azure:azure-cosmos;dependency} --> </dependency> </dependencies> From 951d5db0f190a780a5b9d0a183127cf6cffb8de5 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 10 Dec 2025 12:47:36 -0800 Subject: [PATCH 137/186] Sync eng/common directory with azure-sdk-tools for PR 13281 (#47515) * Fix link checks to npm for packages * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestion from @weshaggard --------- Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com> Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- eng/common/scripts/Verify-Links.ps1 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/eng/common/scripts/Verify-Links.ps1 b/eng/common/scripts/Verify-Links.ps1 index fe04a9b1db2a..d0ac61d79542 100644 --- a/eng/common/scripts/Verify-Links.ps1 +++ b/eng/common/scripts/Verify-Links.ps1 @@ -120,6 +120,9 @@ function ProcessLink([System.Uri]$linkUri) { # See comment in function below for details. return ProcessCratesIoLink $linkUri $matches['path'] } + elseif ($linkUri -match '^https?://(www\.)?npmjs\.com/package/.+') { + return ProcessNpmLink $linkUri + } else { return ProcessStandardLink $linkUri } @@ -157,6 +160,14 @@ function ProcessCratesIoLink([System.Uri]$linkUri, $path) { return $true } +function ProcessNpmLink([System.Uri]$linkUri) { + # npmjs.com started using Cloudflare which returns 403 and we need to instead check the registry api for existence checks + # https://github.com/orgs/community/discussions/174098#discussioncomment-14461226 + $apiUrl = $linkUri.ToString() -replace '^https?://(?:www\.)?npmjs\.com/package/(.*)/v', 'https://registry.npmjs.org/$1' + + return ProcessStandardLink ([System.Uri]$apiUrl) +} + function ProcessStandardLink([System.Uri]$linkUri) { $headRequestSucceeded = $true try { From f30c0c9883d78e35bd88ecb3cf485cd52ffc083f Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 10 Dec 2025 12:59:47 -0800 Subject: [PATCH 138/186] Sync eng/common directory with azure-sdk-tools for PR 13076 (#47534) * Used full pkg name in release work items * Used full pkg name for dev ops work item * Added test * Pass in package info file path * Reverted changes to verify-changelog.yml and script * Updated script to process groupId in work items * Renamed new property to GroupId * Removed the condition check for Group * Build hash key with non-null arguments * Used the original BuildHashKey to return hash from non-null args --------- Co-authored-by: ray chen <raychen@microsoft.com> --- .../Helpers/DevOps-WorkItem-Helpers.ps1 | 35 ++++++++++---- eng/common/scripts/Package-Properties.ps1 | 47 +++++++++++++++++-- eng/common/scripts/Prepare-Release.ps1 | 28 +++++++++-- eng/common/scripts/Update-ChangeLog.ps1 | 6 ++- eng/common/scripts/Validate-All-Packages.ps1 | 28 +++++------ 5 files changed, 110 insertions(+), 34 deletions(-) diff --git a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 index 2e7521fb8b93..7ec0de578382 100644 --- a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 +++ b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 @@ -215,16 +215,17 @@ function FindParentWorkItem($serviceName, $packageDisplayName, $outputCommand = $packageWorkItems = @{} $packageWorkItemWithoutKeyFields = @{} -function FindLatestPackageWorkItem($lang, $packageName, $outputCommand = $true, $ignoreReleasePlannerTests = $true, $tag = $null) +function FindLatestPackageWorkItem($lang, $packageName, $groupId = $null, $outputCommand = $true, $ignoreReleasePlannerTests = $true, $tag = $null) { # Cache all the versions of this package and language work items - $null = FindPackageWorkItem $lang $packageName -includeClosed $true -outputCommand $outputCommand -ignoreReleasePlannerTests $ignoreReleasePlannerTests -tag $tag + $null = FindPackageWorkItem $lang $packageName -includeClosed $true -outputCommand $outputCommand -ignoreReleasePlannerTests $ignoreReleasePlannerTests -tag $tag -groupId $groupId $latestWI = $null foreach ($wi in $packageWorkItems.Values) { if ($wi.fields["Custom.Language"] -ne $lang) { continue } if ($wi.fields["Custom.Package"] -ne $packageName) { continue } + if ($groupId -and $wi.fields["Custom.GroupId"] -ne $groupId) { continue } if (!$latestWI) { $latestWI = $wi @@ -238,9 +239,9 @@ function FindLatestPackageWorkItem($lang, $packageName, $outputCommand = $true, return $latestWI } -function FindPackageWorkItem($lang, $packageName, $version, $outputCommand = $true, $includeClosed = $false, $ignoreReleasePlannerTests = $true, $tag = $null) +function FindPackageWorkItem($lang, $packageName, $version, $groupId = $null, $outputCommand = $true, $includeClosed = $false, $ignoreReleasePlannerTests = $true, $tag = $null) { - $key = BuildHashKeyNoNull $lang $packageName $version + $key = BuildHashKey $lang $packageName $version $groupId if ($key -and $packageWorkItems.ContainsKey($key)) { return $packageWorkItems[$key] } @@ -253,6 +254,7 @@ function FindPackageWorkItem($lang, $packageName, $version, $outputCommand = $tr $fields += "System.Tags" $fields += "Custom.Language" $fields += "Custom.Package" + $fields += "Custom.GroupId" $fields += "Custom.PackageDisplayName" $fields += "System.Title" $fields += "Custom.PackageType" @@ -282,6 +284,9 @@ function FindPackageWorkItem($lang, $packageName, $version, $outputCommand = $tr if ($packageName) { $query += " AND [Package] = '${packageName}'" } + if ($groupId) { + $query += " AND [GroupId] = '${groupId}'" + } if ($version) { $query += " AND [PackageVersionMajorMinor] = '${version}'" } @@ -295,7 +300,7 @@ function FindPackageWorkItem($lang, $packageName, $version, $outputCommand = $tr foreach ($wi in $workItems) { - $localKey = BuildHashKeyNoNull $wi.fields["Custom.Language"] $wi.fields["Custom.Package"] $wi.fields["Custom.PackageVersionMajorMinor"] + $localKey = BuildHashKey $wi.fields["Custom.Language"] $wi.fields["Custom.Package"] $wi.fields["Custom.PackageVersionMajorMinor"] $wi.fields["Custom.GroupId"] if (!$localKey) { $packageWorkItemWithoutKeyFields[$wi.id] = $wi Write-Host "Skipping package [$($wi.id)]$($wi.fields['System.Title']) which is missing required fields language, package, or version." @@ -461,10 +466,10 @@ function UpdatePackageWorkItemReleaseState($id, $state, $releaseType, $outputCom function FindOrCreateClonePackageWorkItem($lang, $pkg, $verMajorMinor, $allowPrompt = $false, $outputCommand = $false, $relatedId = $null, $tag= $null, $ignoreReleasePlannerTests = $true) { - $workItem = FindPackageWorkItem -lang $lang -packageName $pkg.Package -version $verMajorMinor -includeClosed $true -outputCommand $outputCommand -tag $tag -ignoreReleasePlannerTests $ignoreReleasePlannerTests + $workItem = FindPackageWorkItem -lang $lang -packageName $pkg.Package -version $verMajorMinor -includeClosed $true -outputCommand $outputCommand -tag $tag -ignoreReleasePlannerTests $ignoreReleasePlannerTests -groupId $pkg.GroupId if (!$workItem) { - $latestVersionItem = FindLatestPackageWorkItem -lang $lang -packageName $pkg.Package -outputCommand $outputCommand -tag $tag -ignoreReleasePlannerTests $ignoreReleasePlannerTests + $latestVersionItem = FindLatestPackageWorkItem -lang $lang -packageName $pkg.Package -outputCommand $outputCommand -tag $tag -ignoreReleasePlannerTests $ignoreReleasePlannerTests -groupId $pkg.GroupId $assignedTo = "me" $extraFields = @() if ($latestVersionItem) { @@ -512,6 +517,13 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte Write-Host "Cannot create or update because one of lang, pkg or verMajorMinor aren't set. [$lang|$($pkg.Package)|$verMajorMinor]" return } + + # PackageProp object uses Group, while other places use GroupId, such as in work item fields and package csv files. + $pkgGroupId = if ($pkg.PSObject.Properties.Name -contains "GroupId") { + $pkg.GroupId + } else { + $null + } $pkgName = $pkg.Package $pkgDisplayName = $pkg.DisplayName $pkgType = $pkg.Type @@ -523,6 +535,7 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte $fields = @() $fields += "`"Language=${lang}`"" $fields += "`"Package=${pkgName}`"" + $fields += "`"GroupId=${pkgGroupId}`"" $fields += "`"PackageDisplayName=${pkgDisplayName}`"" $fields += "`"PackageType=${pkgType}`"" $fields += "`"PackageTypeNewLibrary=${pkgNewLibrary}`"" @@ -540,6 +553,7 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte if ($lang -ne $existingItem.fields["Custom.Language"]) { $changedField = "Custom.Language" } if ($pkgName -ne $existingItem.fields["Custom.Package"]) { $changedField = "Custom.Package" } + if ($pkgGroupId -ne $existingItem.fields["Custom.GroupId"]) { $changedField = "Custom.GroupId" } if ($verMajorMinor -ne $existingItem.fields["Custom.PackageVersionMajorMinor"]) { $changedField = "Custom.PackageVersionMajorMinor" } if ($pkgDisplayName -ne $existingItem.fields["Custom.PackageDisplayName"]) { $changedField = "Custom.PackageDisplayName" } if ($pkgType -ne [string]$existingItem.fields["Custom.PackageType"]) { $changedField = "Custom.PackageType" } @@ -1029,15 +1043,16 @@ function UpdatePackageVersions($pkgWorkItem, $plannedVersions, $shippedVersions) function UpdateValidationStatus($pkgvalidationDetails, $BuildDefinition, $PipelineUrl) { $pkgName = $pkgValidationDetails.Name + $groupId = $pkgValidationDetails.GroupId $versionString = $pkgValidationDetails.Version $parsedNewVersion = [AzureEngSemanticVersion]::new($versionString) $versionMajorMinor = "" + $parsedNewVersion.Major + "." + $parsedNewVersion.Minor - $workItem = FindPackageWorkItem -lang $LanguageDisplayName -packageName $pkgName -version $versionMajorMinor -includeClosed $true -outputCommand $false + $workItem = FindPackageWorkItem -lang $LanguageDisplayName -packageName $pkgName -groupId $groupId -version $versionMajorMinor -includeClosed $true -outputCommand $false if (!$workItem) { - Write-Host"No work item found for package [$pkgName]." + Write-Host "No work item found for package [$pkgName] with groupId [$groupId]." return $false } @@ -1250,6 +1265,7 @@ function Update-DevOpsReleaseWorkItem { [Parameter(Mandatory=$true)] [string]$version, [string]$plannedDate, + [string]$groupId = $null, [string]$serviceName = $null, [string]$packageDisplayName = $null, [string]$packageRepoPath = "NA", @@ -1277,6 +1293,7 @@ function Update-DevOpsReleaseWorkItem { $packageInfo = [PSCustomObject][ordered]@{ Package = $packageName + GroupId = $groupId DisplayName = $packageDisplayName ServiceName = $serviceName RepoPath = $packageRepoPath diff --git a/eng/common/scripts/Package-Properties.ps1 b/eng/common/scripts/Package-Properties.ps1 index 930602444fdb..7704bd04cea2 100644 --- a/eng/common/scripts/Package-Properties.ps1 +++ b/eng/common/scripts/Package-Properties.ps1 @@ -230,16 +230,30 @@ class PackageProps { # Returns important properties of the package relative to the language repo # Returns a PS Object with properties @ { pkgName, pkgVersion, pkgDirectoryPath, pkgReadMePath, pkgChangeLogPath } # Note: python is required for parsing python package properties. +# GroupId is optional and is used to filter packages for languages that support group identifiers (e.g., Java). +# When GroupId is provided, the function will match both the package name and the group ID. function Get-PkgProperties { Param ( [Parameter(Mandatory = $true)] [string]$PackageName, - [string]$ServiceDirectory + [string]$ServiceDirectory, + [string]$GroupId ) + Write-Host "Get-PkgProperties called with PackageName: [$PackageName], ServiceDirectory: [$ServiceDirectory], GroupId: [$GroupId]" + $allPkgProps = Get-AllPkgProperties -ServiceDirectory $ServiceDirectory - $pkgProps = $allPkgProps.Where({ $_.Name -eq $PackageName -or $_.ArtifactName -eq $PackageName }); + + if ([string]::IsNullOrEmpty($GroupId)) { + $pkgProps = $allPkgProps.Where({ $_.Name -eq $PackageName -or $_.ArtifactName -eq $PackageName }); + } + else { + $pkgProps = $allPkgProps.Where({ + ($_.Name -eq $PackageName -or $_.ArtifactName -eq $PackageName) -and + ($_.PSObject.Properties.Name -contains "Group" -and $_.Group -eq $GroupId) + }); + } if ($pkgProps.Count -ge 1) { if ($pkgProps.Count -gt 1) { @@ -248,7 +262,12 @@ function Get-PkgProperties { return $pkgProps[0] } - LogError "Failed to retrieve Properties for [$PackageName]" + if ([string]::IsNullOrEmpty($GroupId)) { + LogError "Failed to retrieve Properties for [$PackageName]" + } + else { + LogError "Failed to retrieve Properties for [$PackageName] with GroupId [$GroupId]. Ensure the package has a Group property matching the specified GroupId." + } return $null } @@ -568,3 +587,25 @@ function Get-PkgPropsForEntireService ($serviceDirectoryPath) { return $projectProps } + +# Get the full package name based on packageInfo properties +# Returns Group+ArtifactName if Group exists and has a value, otherwise returns Name +# If UseColonSeparator switch is enabled, returns Group:ArtifactName format (colon separator) +function Get-FullPackageName { + param ( + [Parameter(Mandatory=$true)] + [PSCustomObject]$PackageInfo, + [switch]$UseColonSeparator + ) + + if ($PackageInfo.PSObject.Members.Name -contains "Group") { + $groupId = $PackageInfo.Group + if ($groupId) { + if ($UseColonSeparator) { + return "${groupId}:$($PackageInfo.Name)" + } + return "${groupId}+$($PackageInfo.Name)" + } + } + return $PackageInfo.Name +} diff --git a/eng/common/scripts/Prepare-Release.ps1 b/eng/common/scripts/Prepare-Release.ps1 index 415831e32300..6d57acf6d601 100755 --- a/eng/common/scripts/Prepare-Release.ps1 +++ b/eng/common/scripts/Prepare-Release.ps1 @@ -30,6 +30,9 @@ If one isn't provided, then it will compute the next ship date or today's date i .PARAMETER ReleaseTrackingOnly Optional: If this switch is passed then the script will only update the release work items and not update the versions in the local repo or validate the changelog. +.PARAMETER GroupId +Optional: The group ID for the package. For Java packages, if not provided, the script will prompt for input with 'com.azure' as the default. + .EXAMPLE PS> ./eng/common/scripts/Prepare-Release.ps1 <PackageName> @@ -49,7 +52,8 @@ param( [string]$PackageName, [string]$ServiceDirectory, [string]$ReleaseDate, # Pass Date in the form MM/dd/yyyy" - [switch]$ReleaseTrackingOnly = $false + [switch]$ReleaseTrackingOnly = $false, + [string]$GroupId ) Set-StrictMode -Version 3 @@ -57,6 +61,18 @@ Set-StrictMode -Version 3 . ${PSScriptRoot}\Helpers\ApiView-Helpers.ps1 . ${PSScriptRoot}\Helpers\DevOps-WorkItem-Helpers.ps1 +# Prompt for GroupId if language is Java and GroupId is not provided +if ($Language -eq 'java' -and [string]::IsNullOrEmpty($GroupId)) { + $userInput = Read-Host "Input the group id, or press Enter to use 'com.azure' as the group id" + if ([string]::IsNullOrWhiteSpace($userInput)) { + $GroupId = "com.azure" + } + else { + $GroupId = $userInput.Trim() + } + Write-Host "Using GroupId: $GroupId" -ForegroundColor Green +} + function Get-ReleaseDay($baseDate) { # Find first friday @@ -74,7 +90,7 @@ function Get-ReleaseDay($baseDate) $ErrorPreference = 'Stop' $packageProperties = $null -$packageProperties = Get-PkgProperties -PackageName $PackageName -ServiceDirectory $ServiceDirectory +$packageProperties = Get-PkgProperties -PackageName $PackageName -ServiceDirectory $ServiceDirectory -GroupId $GroupId if (!$packageProperties) { @@ -128,7 +144,7 @@ if (Test-Path "Function:GetExistingPackageVersions") } $currentProjectVersion = $packageProperties.Version -$newVersion = Read-Host -Prompt "Input the new version, or press Enter to use use current project version '$currentProjectVersion'" +$newVersion = Read-Host -Prompt "Input the new version, or press Enter to use current project version '$currentProjectVersion'" if (!$newVersion) { @@ -144,6 +160,7 @@ if ($null -eq $newVersionParsed) $result = Update-DevOpsReleaseWorkItem -language $LanguageDisplayName ` -packageName $packageProperties.Name ` + -groupId $packageProperties.Group ` -version $newVersion ` -plannedDate $releaseDateString ` -packageRepoPath $packageProperties.serviceDirectory ` @@ -166,7 +183,8 @@ try } $url = az keyvault secret show --name "APIURL" --vault-name "AzureSDKPrepRelease-KV" --query "value" --output "tsv" $apiKey = az keyvault secret show --name "APIKEY" --vault-name "AzureSDKPrepRelease-KV" --query "value" --output "tsv" - Check-ApiReviewStatus -PackageName $packageProperties.Name -packageVersion $newVersion -Language $LanguageDisplayName -url $url -apiKey $apiKey + $fullPackageNameInApiView = Get-FullPackageName -PackageInfo $packageProperties -UseColonSeparator + Check-ApiReviewStatus -PackageName $fullPackageNameInApiView -packageVersion $newVersion -Language $LanguageDisplayName -url $url -apiKey $apiKey } catch { @@ -194,7 +212,7 @@ if (Test-Path "Function:SetPackageVersion") } SetPackageVersion -PackageName $packageProperties.Name -Version $newVersion ` -ServiceDirectory $packageProperties.ServiceDirectory -ReleaseDate $releaseDateString ` - -PackageProperties $packageProperties -ReplaceLatestEntryTitle $replaceLatestEntryTitle + -PackageProperties $packageProperties -ReplaceLatestEntryTitle $replaceLatestEntryTitle -GroupId $packageProperties.Group } else { diff --git a/eng/common/scripts/Update-ChangeLog.ps1 b/eng/common/scripts/Update-ChangeLog.ps1 index 3541cd489403..3059002f3511 100644 --- a/eng/common/scripts/Update-ChangeLog.ps1 +++ b/eng/common/scripts/Update-ChangeLog.ps1 @@ -4,6 +4,7 @@ # Version : Version to add or replace in change log # Unreleased: Default is true. If it is set to false, then today's date will be set in verion title. If it is True then title will show "Unreleased" # ReplaceLatestEntryTitle: Replaces the latest changelog entry title. +# GroupId: Optional. The group ID for the package. Used for filtering packages in languages that support group identifiers (e.g., Java). [CmdletBinding()] param ( @@ -14,7 +15,8 @@ param ( [Boolean]$Unreleased = $true, [Boolean]$ReplaceLatestEntryTitle = $false, [String]$ChangelogPath, - [String]$ReleaseDate + [String]$ReleaseDate, + [String]$GroupId ) Set-StrictMode -Version 3 @@ -59,7 +61,7 @@ if ($null -eq [AzureEngSemanticVersion]::ParseVersionString($Version)) if ([string]::IsNullOrEmpty($ChangelogPath)) { - $pkgProperties = Get-PkgProperties -PackageName $PackageName -ServiceDirectory $ServiceDirectory + $pkgProperties = Get-PkgProperties -PackageName $PackageName -ServiceDirectory $ServiceDirectory -GroupId $GroupId $ChangelogPath = $pkgProperties.ChangeLogPath } diff --git a/eng/common/scripts/Validate-All-Packages.ps1 b/eng/common/scripts/Validate-All-Packages.ps1 index a247ec3b5110..b92e912601b0 100644 --- a/eng/common/scripts/Validate-All-Packages.ps1 +++ b/eng/common/scripts/Validate-All-Packages.ps1 @@ -111,13 +111,13 @@ function VerifyAPIReview($packageName, $packageVersion, $language) } -function IsVersionShipped($packageName, $packageVersion) +function IsVersionShipped($packageName, $packageVersion, $groupId = $null) { # This function will decide if a package version is already shipped or not Write-Host "Checking if a version is already shipped for package $packageName with version $packageVersion." $parsedNewVersion = [AzureEngSemanticVersion]::new($packageVersion) $versionMajorMinor = "" + $parsedNewVersion.Major + "." + $parsedNewVersion.Minor - $workItem = FindPackageWorkItem -lang $LanguageDisplayName -packageName $packageName -version $versionMajorMinor -includeClosed $true -outputCommand $false + $workItem = FindPackageWorkItem -lang $LanguageDisplayName -packageName $packageName -groupId $groupId -version $versionMajorMinor -includeClosed $true -outputCommand $false if ($workItem) { # Check if the package version is already shipped @@ -127,7 +127,7 @@ function IsVersionShipped($packageName, $packageVersion) } } else { - Write-Host "No work item found for package [$packageName]. Creating new work item for package." + Write-Host "No work item found for package [$packageName], group [$groupId]. Creating new work item for package." } return $false } @@ -148,6 +148,7 @@ function CreateUpdatePackageWorkItem($pkgInfo) # Create or update package work item $result = Update-DevOpsReleaseWorkItem -language $LanguageDisplayName ` -packageName $packageName ` + -groupId $pkgInfo.Group ` -version $versionString ` -plannedDate $plannedDate ` -packageRepoPath $pkgInfo.serviceDirectory ` @@ -175,15 +176,14 @@ function ProcessPackage($packageInfo) $pkgName = $packageInfo.Name $changeLogPath = $packageInfo.ChangeLogPath $versionString = $packageInfo.Version - Write-Host "Checking if we need to create or update work item for package $pkgName with version $versionString." - $isShipped = IsVersionShipped $pkgName $versionString + Write-Host "Checking if we need to create or update work item for package $pkgName and groupId $packageInfo.Group with version $versionString." + Write-Host "Package name before checking groupId: $pkgName" + $isShipped = IsVersionShipped $pkgName $versionString $packageInfo.Group if ($isShipped) { Write-Host "Package work item already exists for version [$versionString] that is marked as shipped. Skipping the update of package work item." return } - Write-Host "Validating package $pkgName with version $versionString." - # Change log validation $changeLogStatus = [PSCustomObject]@{ Name = "Change Log Validation" @@ -197,19 +197,16 @@ function ProcessPackage($packageInfo) # If there's a groupId that means this is Java and pkgName = GroupId+ArtifactName # but the VerifyAPIReview requires GroupId:ArtifactName - Write-Host "Package name before checking groupId: $fullPackageName" - if ($packageInfo.PSObject.Members.Name -contains "Group") { - $groupId = $packageInfo.Group - if ($groupId){ - $fullPackageName = "${groupId}:$($packageInfo.ArtifactName)" - } - } - + # Technically we can use groupId+artifactName format in api view, + # however it will need to migrate the existing data and Java parser also needs the change. + $fullPackageName = Get-FullPackageName -PackageInfo $packageInfo -UseColonSeparator Write-Host "Checking API review status for package $fullPackageName" $apireviewDetails = VerifyAPIReview $fullPackageName $packageInfo.Version $Language + # The following object will be used to update package work item, the name should be package name only without groupId $pkgValidationDetails= [PSCustomObject]@{ Name = $pkgName + GroupId = $packageInfo.Group Version = $packageInfo.Version ChangeLogValidation = $changeLogStatus APIReviewValidation = $apireviewDetails.ApiviewApproval @@ -220,6 +217,7 @@ function ProcessPackage($packageInfo) Write-Host "Output: $($output)" # Create json token file in artifact path + # Does the following validation file name also need to use full package name with groupId? $tokenFile = Join-Path $ArtifactPath "$($packageInfo.ArtifactName)-Validation.json" $output | Out-File -FilePath $tokenFile -Encoding utf8 From c780145293350f13303cb0ebfbf3514747cffb93 Mon Sep 17 00:00:00 2001 From: Ray Chen <raychen@microsoft.com> Date: Wed, 10 Dec 2025 13:26:59 -0800 Subject: [PATCH 139/186] Switched package release tag to use the groupId plus the packageName (#47512) * Fetched package properties by groupId and pkgName * Updated release tag for patch release and bom release * Falled back to fetch the old tag format --- eng/scripts/Generate-Patch.ps1 | 23 ++++++++++++++++------- eng/scripts/Language-Settings.ps1 | 4 ++-- eng/scripts/bomhelpers.ps1 | 18 ++++++++++++++---- eng/scripts/patchhelpers.ps1 | 4 ++-- 4 files changed, 34 insertions(+), 15 deletions(-) diff --git a/eng/scripts/Generate-Patch.ps1 b/eng/scripts/Generate-Patch.ps1 index 76590366af35..d5eae21e087b 100644 --- a/eng/scripts/Generate-Patch.ps1 +++ b/eng/scripts/Generate-Patch.ps1 @@ -82,8 +82,8 @@ function GetRemoteName($MainRemoteUrl) { return $null } -function ResetSourcesToReleaseTag($ArtifactName, $ServiceDirectoryName, $ReleaseVersion, $RepoRoot, $RemoteName) { - $ReleaseTag = "${ArtifactName}_${ReleaseVersion}" +function ResetSourcesToReleaseTag($ArtifactName, $ServiceDirectoryName, $ReleaseVersion, $RepoRoot, $RemoteName, $GroupId = "com.azure") { + $ReleaseTag = "${GroupId}+${ArtifactName}_${ReleaseVersion}" Write-Information "Resetting the $ArtifactName sources to the release $ReleaseTag." $SdkDirPath = Join-Path $RepoRoot "sdk" @@ -92,7 +92,7 @@ function ResetSourcesToReleaseTag($ArtifactName, $ServiceDirectoryName, $Release $ArtifactDirPath = Join-Path $ServiceDirPath $ArtifactName TestPathThrow -Path $ArtifactDirPath -PathName 'ArtifactDirPath' - $pkgProperties = Get-PkgProperties -PackageName $ArtifactName -ServiceDirectory $ServiceDirectoryName + $pkgProperties = Get-PkgProperties -PackageName $ArtifactName -ServiceDirectory $ServiceDirectoryName -GroupId $GroupId $currentPackageVersion = $pkgProperties.Version if($currentPackageVersion -eq $ReleaseVersion) { Write-Information "We do not have to reset the sources." @@ -108,8 +108,17 @@ function ResetSourcesToReleaseTag($ArtifactName, $ServiceDirectoryName, $Release Write-Information "Fetching all the tags from $RemoteName" $CmdOutput = git fetch $RemoteName $ReleaseTag if($LASTEXITCODE -ne 0) { - LogError "Could not restore the tags for release tag $ReleaseTag" - exit 1 + # Fall back to old tag format: <artifactName>_<version> + $OldReleaseTag = "${ArtifactName}_${ReleaseVersion}" + Write-Information "Failed to fetch new tag format. Trying old tag format: $OldReleaseTag" + $CmdOutput = git fetch $RemoteName $OldReleaseTag + + if($LASTEXITCODE -ne 0) { + LogError "Could not restore the tags for release tag $ReleaseTag or $OldReleaseTag" + exit 1 + } + + $ReleaseTag = $OldReleaseTag } $cmdOutput = git restore --source $ReleaseTag -W -S $ArtifactDirPath @@ -162,7 +171,7 @@ function CreatePatchRelease($ArtifactName, $ServiceDirectoryName, $PatchVersion, $EngVersioningDir = Join-Path $EngDir "versioning" $SetVersionFilePath = Join-Path $EngVersioningDir "set_versions.py" $UpdateVersionFilePath = Join-Path $EngVersioningDir "update_versions.py" - $pkgProperties = Get-PkgProperties -PackageName $ArtifactName -ServiceDirectory $ServiceDirectoryName + $pkgProperties = Get-PkgProperties -PackageName $ArtifactName -ServiceDirectory $ServiceDirectoryName -GroupId $GroupId $ChangelogPath = $pkgProperties.ChangeLogPath $PomFilePath = Join-Path $pkgProperties.DirectoryPath "pom.xml" @@ -264,7 +273,7 @@ try { ## Hard resetting it to the contents of the release tag. ## Fetching all the tags from the remote branch - ResetSourcesToReleaseTag -ArtifactName $ArtifactName -ServiceDirectoryName $ServiceDirectoryName -ReleaseVersion $ReleaseVersion -RepoRoot $RepoRoot -RemoteName $RemoteName + ResetSourcesToReleaseTag -ArtifactName $ArtifactName -ServiceDirectoryName $ServiceDirectoryName -ReleaseVersion $ReleaseVersion -RepoRoot $RepoRoot -RemoteName $RemoteName -GroupId $GroupId CreatePatchRelease -ArtifactName $ArtifactName -ServiceDirectoryName $ServiceDirectoryName -PatchVersion $PatchVersion -RepoRoot $RepoRoot $cmdOutput = git add $RepoRoot if($LASTEXITCODE -ne 0) { diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index 60f80d5c05a6..66e25b387c7a 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -350,7 +350,7 @@ function Get-java-PackageInfoFromPackageFile ($pkg, $workingDirectory) PackageId = $pkgId GroupId = $groupId PackageVersion = $pkgVersion - ReleaseTag = "$($pkgId)_$($pkgVersion)" + ReleaseTag = "$($groupId)+$($pkgId)_$($pkgVersion)" Deployable = $forceCreate -or !(IsMavenPackageVersionPublished -pkgId $pkgId -pkgVersion $pkgVersion -groupId $groupId.Replace(".", "/")) ReleaseNotes = $releaseNotes ReadmeContent = $readmeContent @@ -551,7 +551,7 @@ function SetPackageVersion ($PackageName, $Version, $ServiceDirectory, $ReleaseD # -ll option says "only update README and CHANGELOG entries for libraries that are on the list" python "$EngDir/versioning/update_versions.py" --library-list $fullLibraryName & "$EngCommonScriptsDir/Update-ChangeLog.ps1" -Version $Version -ServiceDirectory $ServiceDirectory -PackageName $PackageName ` - -Unreleased $False -ReplaceLatestEntryTitle $ReplaceLatestEntryTitle -ReleaseDate $ReleaseDate + -Unreleased $False -ReplaceLatestEntryTitle $ReplaceLatestEntryTitle -ReleaseDate $ReleaseDate -GroupId $GroupId } function GetExistingPackageVersions ($PackageName, $GroupId=$null) diff --git a/eng/scripts/bomhelpers.ps1 b/eng/scripts/bomhelpers.ps1 index e9e4d46ab3bc..56a86cdd1b18 100644 --- a/eng/scripts/bomhelpers.ps1 +++ b/eng/scripts/bomhelpers.ps1 @@ -303,9 +303,9 @@ function GeneratePatch($PatchInfo, [string]$BranchName, [string]$RemoteName, [st Write-Output "PatchVersion is: $patchVersion" } - $releaseTag = "$($artifactId)_$($releaseVersion)" + $releaseTag = "$($GroupId)+$($artifactId)_$($releaseVersion)" if (!$currentPomFileVersion -or !$artifactDirPath -or !$changelogPath) { - $pkgProperties = [PackageProps](Get-PkgProperties -PackageName $artifactId -ServiceDirectory $serviceDirectoryName) + $pkgProperties = [PackageProps](Get-PkgProperties -PackageName $artifactId -ServiceDirectory $serviceDirectoryName -GroupId $GroupId) $artifactDirPath = $pkgProperties.DirectoryPath $currentPomFileVersion = $pkgProperties.Version $changelogPath = $pkgProperties.ChangeLogPath @@ -323,8 +323,18 @@ function GeneratePatch($PatchInfo, [string]$BranchName, [string]$RemoteName, [st $cmdOutput = git fetch $RemoteName $releaseTag if ($LASTEXITCODE -ne 0) { - LogError "Could not restore the tags for release tag $releaseTag" - exit $LASTEXITCODE + # Fall back to old tag format: <artifactId>_<version> + $oldReleaseTag = "$($artifactId)_$($releaseVersion)" + Write-Output "Failed to fetch new tag format. Trying old tag format: $oldReleaseTag" + Write-Host "git fetch $RemoteName $oldReleaseTag" + $cmdOutput = git fetch $RemoteName $oldReleaseTag + + if ($LASTEXITCODE -ne 0) { + LogError "Could not restore the tags for release tag $releaseTag or $oldReleaseTag" + exit $LASTEXITCODE + } + + $releaseTag = $oldReleaseTag } Write-Host "git restore --source $releaseTag -W -S $artifactDirPath" diff --git a/eng/scripts/patchhelpers.ps1 b/eng/scripts/patchhelpers.ps1 index 0d7af4035f9f..4682298462de 100644 --- a/eng/scripts/patchhelpers.ps1 +++ b/eng/scripts/patchhelpers.ps1 @@ -89,7 +89,7 @@ function UpdateCIInformation($ArtifactInfos) { $serviceDirectory = $arInfo.ServiceDirectoryName if (!$serviceDirectory) { - $pkgProperties = [PackageProps](Get-PkgProperties -PackageName $artifactId -ServiceDirectory $serviceDirectory) + $pkgProperties = [PackageProps](Get-PkgProperties -PackageName $artifactId -ServiceDirectory $serviceDirectory -GroupId $arInfo.GroupId) $arInfo.ServiceDirectoryName = $pkgProperties.ServiceDirectory $arInfo.ArtifactDirPath = $pkgProperties.DirectoryPath $arInfo.CurrentPomFileVersion = $pkgProperties.Version @@ -188,7 +188,7 @@ function UpdateDependenciesInVersionClient([hashtable]$ArtifactInfos) { # Get the release version for the next bom artifact. function GetNextBomVersion() { - $pkgProperties = [PackageProps](Get-PkgProperties -PackageName "azure-sdk-bom") + $pkgProperties = [PackageProps](Get-PkgProperties -PackageName "azure-sdk-bom" -GroupId "com.azure") $currentVersion = $pkgProperties.Version $patchVersion = GetPatchVersion -ReleaseVersion $currentVersion From 8f5e34d93f4ee58adcf3e1107c33a4d8b219b209 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 10 Dec 2025 13:38:24 -0800 Subject: [PATCH 140/186] Add #Requires statement to common.ps1 (#47533) Co-authored-by: Patrick Hallisey <pahallis@microsoft.com> --- eng/common/scripts/common.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/common/scripts/common.ps1 b/eng/common/scripts/common.ps1 index 6bef283e449c..f9411ccc13f4 100644 --- a/eng/common/scripts/common.ps1 +++ b/eng/common/scripts/common.ps1 @@ -1,3 +1,4 @@ +#Requires -Version 7.0 # cSpell:ignore Apireview # cSpell:ignore Onboarded $RepoRoot = Resolve-Path (Join-Path $PSScriptRoot .. .. ..) From d1c11b9a8d7a3a35df8e39ce1eb19fd474107615 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 10 Dec 2025 14:11:50 -0800 Subject: [PATCH 141/186] Configurations: 'specification/containerservice/Fleet.Management/tspconfig.yaml', API Version: 2025-08-01-preview, SDK Release Type: beta, and CommitSHA: 'd0cd556bd91d2dda700e983c0d253fa025b324c0' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5634441 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. (#47442) Co-authored-by: Ryan Zhang <yangzhangrice@hotmail.com> --- .../CHANGELOG.md | 218 ++- .../README.md | 4 +- .../SAMPLE.md | 375 ++++- .../pom.xml | 2 +- .../ContainerServiceFleetManager.java | 17 + ...ContainerServiceFleetManagementClient.java | 7 + .../fluent/FleetManagedNamespacesClient.java | 278 ++++ .../models/FleetManagedNamespaceInner.java | 320 +++++ .../FleetManagedNamespaceProperties.java | 233 ++++ ...ainerServiceFleetManagementClientImpl.java | 18 +- .../FleetManagedNamespaceImpl.java | 258 ++++ .../FleetManagedNamespacesClientImpl.java | 1225 +++++++++++++++++ .../FleetManagedNamespacesImpl.java | 161 +++ .../FleetManagedNamespaceListResult.java | 97 ++ .../models/AdoptionPolicy.java | 56 + .../models/Affinity.java | 87 ++ .../models/ClusterAffinity.java | 98 ++ .../models/ClusterResourcePlacementSpec.java | 88 ++ .../models/ClusterSelector.java | 92 ++ .../models/ClusterSelectorTerm.java | 130 ++ .../models/DeletePolicy.java | 51 + .../models/FleetManagedNamespace.java | 389 ++++++ .../models/FleetManagedNamespacePatch.java | 87 ++ ...leetManagedNamespaceProvisioningState.java | 72 + .../models/FleetManagedNamespaceStatus.java | 90 ++ .../models/FleetManagedNamespaces.java | 147 ++ .../models/LabelSelector.java | 128 ++ .../models/LabelSelectorOperator.java | 61 + .../models/LabelSelectorRequirement.java | 155 +++ .../models/ManagedNamespaceProperties.java | 172 +++ .../models/NetworkPolicy.java | 113 ++ .../models/PlacementPolicy.java | 183 +++ .../models/PlacementProfile.java | 87 ++ .../models/PlacementType.java | 51 + .../models/PolicyRule.java | 56 + .../models/PropagationPolicy.java | 114 ++ .../models/PropagationType.java | 46 + .../models/PropertySelector.java | 92 ++ .../models/PropertySelectorOperator.java | 77 ++ .../models/PropertySelectorRequirement.java | 162 +++ .../models/ResourceQuota.java | 181 +++ .../models/TaintEffect.java | 48 + .../models/Toleration.java | 185 +++ .../models/TolerationOperator.java | 51 + ...tainerservicefleet_apiview_properties.json | 41 + ...anager-containerservicefleet_metadata.json | 2 +- .../proxy-config.json | 2 +- ...ileOperationsGenerateUpdateRunSamples.java | 2 +- ...oUpgradeProfilesCreateOrUpdateSamples.java | 4 +- .../AutoUpgradeProfilesDeleteSamples.java | 4 +- .../AutoUpgradeProfilesGetSamples.java | 4 +- ...AutoUpgradeProfilesListByFleetSamples.java | 4 +- ...anagedNamespacesCreateOrUpdateSamples.java | 107 ++ .../FleetManagedNamespacesDeleteSamples.java | 24 + .../FleetManagedNamespacesGetSamples.java | 24 + ...etManagedNamespacesListByFleetSamples.java | 23 + .../FleetManagedNamespacesUpdateSamples.java | 28 + .../generated/FleetMembersCreateSamples.java | 4 +- .../generated/FleetMembersDeleteSamples.java | 4 +- .../generated/FleetMembersGetSamples.java | 4 +- .../FleetMembersListByFleetSamples.java | 4 +- .../FleetMembersUpdateAsyncSamples.java | 4 +- ...UpdateStrategiesCreateOrUpdateSamples.java | 4 +- .../FleetUpdateStrategiesDeleteSamples.java | 4 +- .../FleetUpdateStrategiesGetSamples.java | 4 +- ...eetUpdateStrategiesListByFleetSamples.java | 4 +- .../generated/FleetsCreateSamples.java | 4 +- .../generated/FleetsDeleteSamples.java | 4 +- .../FleetsGetByResourceGroupSamples.java | 4 +- .../FleetsListByResourceGroupSamples.java | 4 +- .../FleetsListCredentialsSamples.java | 4 +- .../generated/FleetsListSamples.java | 4 +- .../generated/FleetsUpdateAsyncSamples.java | 4 +- .../generated/GatesGetSamples.java | 17 +- .../generated/GatesListByFleetSamples.java | 15 +- .../generated/GatesUpdateSamples.java | 18 +- .../generated/OperationsListSamples.java | 6 +- .../UpdateRunsCreateOrUpdateSamples.java | 4 +- .../generated/UpdateRunsDeleteSamples.java | 4 +- .../generated/UpdateRunsGetSamples.java | 4 +- .../UpdateRunsListByFleetSamples.java | 4 +- .../generated/UpdateRunsSkipSamples.java | 4 +- .../generated/UpdateRunsStartSamples.java | 4 +- .../generated/UpdateRunsStopSamples.java | 4 +- .../AutoUpgradeNodeImageSelectionTests.java | 8 +- ...eOperationsGenerateUpdateRunMockTests.java | 4 +- .../FleetManagedNamespacePatchTests.java | 40 + .../FleetMembersDeleteMockTests.java | 2 +- ...dateStrategiesCreateOrUpdateMockTests.java | 53 +- .../FleetUpdateStrategiesDeleteMockTests.java | 2 +- ...ateStrategiesGetWithResponseMockTests.java | 10 +- ...tUpdateStrategiesListByFleetMockTests.java | 12 +- .../FleetUpdateStrategyInnerTests.java | 62 +- .../FleetUpdateStrategyListResultTests.java | 6 +- .../FleetUpdateStrategyPropertiesTests.java | 147 +- .../generated/FleetsDeleteMockTests.java | 2 +- ...sListCredentialsWithResponseMockTests.java | 5 +- .../generated/GateConfigurationTests.java | 8 +- .../generated/GateInnerTests.java | 8 +- .../generated/GateListResultTests.java | 10 +- .../generated/GatePropertiesTests.java | 8 +- .../generated/GateTargetTests.java | 6 +- .../GatesGetWithResponseMockTests.java | 13 +- .../generated/GatesListByFleetMockTests.java | 13 +- .../generated/GatesUpdateMockTests.java | 12 +- .../generated/GenerateResponseInnerTests.java | 3 +- .../generated/ManagedClusterUpdateTests.java | 20 +- .../ManagedClusterUpgradeSpecTests.java | 14 +- .../ManagedNamespacePropertiesTests.java | 66 + .../generated/NetworkPolicyTests.java | 29 + .../NodeImageSelectionStatusTests.java | 4 +- .../generated/NodeImageSelectionTests.java | 15 +- .../generated/NodeImageVersionTests.java | 2 +- .../generated/OperationsListMockTests.java | 2 +- .../PropertySelectorRequirementTests.java | 35 + .../generated/PropertySelectorTests.java | 45 + .../generated/ResourceQuotaTests.java | 35 + .../generated/SkipPropertiesTests.java | 15 +- .../generated/SkipTargetTests.java | 12 +- .../generated/UpdateGroupTests.java | 26 +- .../UpdateRunGateTargetPropertiesTests.java | 9 +- .../generated/UpdateRunListResultTests.java | 13 +- .../generated/UpdateRunStrategyTests.java | 101 +- .../generated/UpdateRunsDeleteMockTests.java | 3 +- .../generated/UpdateStageTests.java | 70 +- .../tsp-location.yaml | 2 +- 126 files changed, 7410 insertions(+), 521 deletions(-) create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetManagedNamespacesClient.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetManagedNamespaceInner.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetManagedNamespaceProperties.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetManagedNamespaceImpl.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetManagedNamespacesClientImpl.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetManagedNamespacesImpl.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetManagedNamespaceListResult.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AdoptionPolicy.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Affinity.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterAffinity.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterResourcePlacementSpec.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterSelector.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterSelectorTerm.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/DeletePolicy.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespace.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespacePatch.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespaceProvisioningState.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespaceStatus.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespaces.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/LabelSelector.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/LabelSelectorOperator.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/LabelSelectorRequirement.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedNamespaceProperties.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NetworkPolicy.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PlacementPolicy.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PlacementProfile.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PlacementType.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PolicyRule.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropagationPolicy.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropagationType.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropertySelector.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropertySelectorOperator.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropertySelectorRequirement.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ResourceQuota.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/TaintEffect.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Toleration.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/TolerationOperator.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesCreateOrUpdateSamples.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesDeleteSamples.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesGetSamples.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesListByFleetSamples.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesUpdateSamples.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacePatchTests.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedNamespacePropertiesTests.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NetworkPolicyTests.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/PropertySelectorRequirementTests.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/PropertySelectorTests.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ResourceQuotaTests.java diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md index c27784a662bf..1dfa13352fd2 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md @@ -1,14 +1,224 @@ # Release History -## 1.3.0-beta.2 (Unreleased) +## 1.3.0-beta.2 (2025-12-03) -### Features Added +- Azure Resource Manager Container Service Fleet client library for Java. This package contains Microsoft Azure SDK for Container Service Fleet Management SDK. Azure Kubernetes Fleet Manager api client. Package api-version 2025-08-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.ApiServerAccessProfile` was modified + +* `validate()` was removed + +#### `models.UserAssignedIdentity` was modified + +* `validate()` was removed + +#### `models.AgentProfile` was modified + +* `validate()` was removed + +#### `models.FleetStatus` was modified + +* `validate()` was removed + +#### `models.UpdateStageStatus` was modified + +* `validate()` was removed + +#### `models.ManagedServiceIdentity` was modified + +* `validate()` was removed + +#### `models.UpdateGroupStatus` was modified + +* `validate()` was removed + +#### `models.UpdateRunStrategy` was modified + +* `validate()` was removed + +#### `models.NodeImageSelectionStatus` was modified + +* `validate()` was removed + +#### `models.FleetMemberUpdate` was modified + +* `validate()` was removed + +#### `models.FleetPatch` was modified + +* `validate()` was removed + +#### `models.UpdateGroup` was modified + +* `validate()` was removed + +#### `models.SkipProperties` was modified + +* `validate()` was removed + +#### `models.MemberUpdateStatus` was modified + +* `validate()` was removed + +#### `models.FleetCredentialResult` was modified + +* `validate()` was removed + +#### `models.SkipTarget` was modified + +* `validate()` was removed + +#### `models.UpdateRunStatus` was modified + +* `validate()` was removed + +#### `models.GateConfiguration` was modified + +* `validate()` was removed + +#### `models.WaitStatus` was modified + +* `validate()` was removed + +#### `models.FleetHubProfile` was modified + +* `validate()` was removed + +#### `models.UpdateRunGateStatus` was modified + +* `validate()` was removed + +#### `models.NodeImageSelection` was modified + +* `validate()` was removed + +#### `models.FleetMemberStatus` was modified + +* `validate()` was removed + +#### `models.GatePatch` was modified + +* `validate()` was removed + +#### `models.UpdateStatus` was modified + +* `validate()` was removed + +#### `models.AutoUpgradeNodeImageSelection` was modified + +* `validate()` was removed + +#### `models.GatePatchProperties` was modified + +* `validate()` was removed + +#### `models.ManagedClusterUpgradeSpec` was modified + +* `validate()` was removed + +#### `models.UpdateStage` was modified + +* `validate()` was removed + +#### `models.UpdateRunGateTargetProperties` was modified + +* `validate()` was removed + +#### `models.GateTarget` was modified + +* `validate()` was removed + +#### `models.OperationDisplay` was modified + +* `validate()` was removed + +#### `models.ManagedClusterUpdate` was modified + +* `validate()` was removed + +#### `models.NodeImageVersion` was modified + +* `validate()` was removed + +#### `models.AutoUpgradeProfileStatus` was modified + +* `validate()` was removed + +### Features Added + +* `models.LabelSelector` was added + +* `models.AdoptionPolicy` was added + +* `models.FleetManagedNamespace$DefinitionStages` was added + +* `models.PropagationType` was added + +* `models.FleetManagedNamespaces` was added + +* `models.NetworkPolicy` was added + +* `models.DeletePolicy` was added + +* `models.LabelSelectorRequirement` was added + +* `models.FleetManagedNamespace` was added + +* `models.TolerationOperator` was added + +* `models.FleetManagedNamespaceProvisioningState` was added + +* `models.PlacementType` was added + +* `models.PolicyRule` was added + +* `models.Toleration` was added + +* `models.ClusterSelectorTerm` was added + +* `models.FleetManagedNamespace$UpdateStages` was added + +* `models.LabelSelectorOperator` was added + +* `models.ClusterResourcePlacementSpec` was added + +* `models.PropertySelectorRequirement` was added + +* `models.PlacementProfile` was added + +* `models.FleetManagedNamespace$Definition` was added + +* `models.ManagedNamespaceProperties` was added + +* `models.PropertySelector` was added + +* `models.ClusterAffinity` was added + +* `models.TaintEffect` was added + +* `models.FleetManagedNamespaceStatus` was added + +* `models.FleetManagedNamespacePatch` was added + +* `models.ClusterSelector` was added + +* `models.PropagationPolicy` was added + +* `models.ResourceQuota` was added + +* `models.PropertySelectorOperator` was added + +* `models.PlacementPolicy` was added + +* `models.FleetManagedNamespace$Update` was added + +* `models.Affinity` was added + +#### `ContainerServiceFleetManager` was modified -### Other Changes +* `fleetManagedNamespaces()` was added ## 1.3.0-beta.1 (2025-08-07) diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/README.md b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/README.md index a455248e6434..84ad07adbe11 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/README.md +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Container Service Fleet client library for Java. -This package contains Microsoft Azure SDK for Container Service Fleet Management SDK. Azure Kubernetes Fleet Manager api client. Package api-version 2025-04-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Container Service Fleet Management SDK. Azure Kubernetes Fleet Manager api client. Package api-version 2025-08-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerservicefleet</artifactId> - <version>1.3.0-beta.1</version> + <version>1.3.0-beta.2</version> </dependency> ``` [//]: # ({x-version-update-end}) diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md index 14ebad0df2ac..f36b61b434f5 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md @@ -12,6 +12,14 @@ - [Get](#autoupgradeprofiles_get) - [ListByFleet](#autoupgradeprofiles_listbyfleet) +## FleetManagedNamespaces + +- [CreateOrUpdate](#fleetmanagednamespaces_createorupdate) +- [Delete](#fleetmanagednamespaces_delete) +- [Get](#fleetmanagednamespaces_get) +- [ListByFleet](#fleetmanagednamespaces_listbyfleet) +- [Update](#fleetmanagednamespaces_update) + ## FleetMembers - [Create](#fleetmembers_create) @@ -64,7 +72,7 @@ */ public final class AutoUpgradeProfileOperationsGenerateUpdateRunSamples { /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfileOperations_GenerateUpdateRun_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfileOperations_GenerateUpdateRun_MaximumSet_Gen.json */ /** * Sample code: AutoUpgradeProfileOperations_GenerateUpdateRun_MaximumSet. @@ -91,7 +99,7 @@ import com.azure.resourcemanager.containerservicefleet.models.UpgradeChannel; */ public final class AutoUpgradeProfilesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfiles_CreateOrUpdate.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfiles_CreateOrUpdate.json */ /** * Sample code: Create an AutoUpgradeProfile. @@ -110,7 +118,7 @@ public final class AutoUpgradeProfilesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfiles_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfiles_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: Create an AutoUpgradeProfile. - generated by [MaximumSet] rule. @@ -143,7 +151,7 @@ public final class AutoUpgradeProfilesCreateOrUpdateSamples { */ public final class AutoUpgradeProfilesDeleteSamples { /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfiles_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfiles_Delete_MaximumSet_Gen.json */ /** * Sample code: Delete an AutoUpgradeProfile resource. - generated by [MaximumSet] rule. @@ -157,7 +165,7 @@ public final class AutoUpgradeProfilesDeleteSamples { } /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfiles_Delete.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfiles_Delete.json */ /** * Sample code: Delete an AutoUpgradeProfile resource. @@ -180,7 +188,7 @@ public final class AutoUpgradeProfilesDeleteSamples { */ public final class AutoUpgradeProfilesGetSamples { /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfiles_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfiles_Get_MaximumSet_Gen.json */ /** * Sample code: Gets an AutoUpgradeProfile resource. - generated by [MaximumSet] rule. @@ -194,7 +202,7 @@ public final class AutoUpgradeProfilesGetSamples { } /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfiles_Get.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfiles_Get.json */ /** * Sample code: Gets an AutoUpgradeProfile resource. @@ -217,7 +225,7 @@ public final class AutoUpgradeProfilesGetSamples { */ public final class AutoUpgradeProfilesListByFleetSamples { /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfiles_ListByFleet.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfiles_ListByFleet.json */ /** * Sample code: Lists the AutoUpgradeProfile resources by fleet. @@ -230,7 +238,7 @@ public final class AutoUpgradeProfilesListByFleetSamples { } /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfiles_ListByFleet_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfiles_ListByFleet_MaximumSet_Gen.json */ /** * Sample code: Lists the AutoUpgradeProfile resources by fleet. - generated by [MaximumSet] rule. @@ -244,6 +252,207 @@ public final class AutoUpgradeProfilesListByFleetSamples { } ``` +### FleetManagedNamespaces_CreateOrUpdate + +```java +import com.azure.resourcemanager.containerservicefleet.models.AdoptionPolicy; +import com.azure.resourcemanager.containerservicefleet.models.Affinity; +import com.azure.resourcemanager.containerservicefleet.models.ClusterAffinity; +import com.azure.resourcemanager.containerservicefleet.models.ClusterResourcePlacementSpec; +import com.azure.resourcemanager.containerservicefleet.models.ClusterSelector; +import com.azure.resourcemanager.containerservicefleet.models.ClusterSelectorTerm; +import com.azure.resourcemanager.containerservicefleet.models.DeletePolicy; +import com.azure.resourcemanager.containerservicefleet.models.LabelSelector; +import com.azure.resourcemanager.containerservicefleet.models.LabelSelectorOperator; +import com.azure.resourcemanager.containerservicefleet.models.LabelSelectorRequirement; +import com.azure.resourcemanager.containerservicefleet.models.ManagedNamespaceProperties; +import com.azure.resourcemanager.containerservicefleet.models.NetworkPolicy; +import com.azure.resourcemanager.containerservicefleet.models.PlacementPolicy; +import com.azure.resourcemanager.containerservicefleet.models.PlacementProfile; +import com.azure.resourcemanager.containerservicefleet.models.PlacementType; +import com.azure.resourcemanager.containerservicefleet.models.PolicyRule; +import com.azure.resourcemanager.containerservicefleet.models.PropagationPolicy; +import com.azure.resourcemanager.containerservicefleet.models.PropagationType; +import com.azure.resourcemanager.containerservicefleet.models.PropertySelector; +import com.azure.resourcemanager.containerservicefleet.models.PropertySelectorOperator; +import com.azure.resourcemanager.containerservicefleet.models.PropertySelectorRequirement; +import com.azure.resourcemanager.containerservicefleet.models.ResourceQuota; +import com.azure.resourcemanager.containerservicefleet.models.TaintEffect; +import com.azure.resourcemanager.containerservicefleet.models.Toleration; +import com.azure.resourcemanager.containerservicefleet.models.TolerationOperator; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for FleetManagedNamespaces CreateOrUpdate. + */ +public final class FleetManagedNamespacesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-08-01-preview/FleetManagedNamespaces_CreateOrUpdate.json + */ + /** + * Sample code: FleetManagedNamespaces_CreateOrUpdate. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void fleetManagedNamespacesCreateOrUpdate( + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.fleetManagedNamespaces() + .define("namespace1") + .withRegion("eastus") + .withExistingFleet("rgfleets", "fleet1") + .withManagedNamespaceProperties(new ManagedNamespaceProperties() + .withLabels(mapOf("key1", "fakeTokenPlaceholder")) + .withAnnotations(mapOf("key2", "fakeTokenPlaceholder")) + .withDefaultResourceQuota(new ResourceQuota().withCpuRequest("1") + .withCpuLimit("1") + .withMemoryRequest("10Gi") + .withMemoryLimit("32Gi")) + .withDefaultNetworkPolicy( + new NetworkPolicy().withIngress(PolicyRule.ALLOW_SAME_NAMESPACE).withEgress(PolicyRule.ALLOW_ALL))) + .withAdoptionPolicy(AdoptionPolicy.NEVER) + .withDeletePolicy(DeletePolicy.KEEP) + .withPropagationPolicy( + new PropagationPolicy().withType(PropagationType.PLACEMENT) + .withPlacementProfile( + new PlacementProfile() + .withDefaultClusterResourcePlacement( + new ClusterResourcePlacementSpec() + .withPolicy(new PlacementPolicy().withPlacementType(PlacementType.PICK_ALL) + .withAffinity(new Affinity().withClusterAffinity( + new ClusterAffinity().withRequiredDuringSchedulingIgnoredDuringExecution( + new ClusterSelector() + .withClusterSelectorTerms(Arrays.asList(new ClusterSelectorTerm() + .withLabelSelector( + new LabelSelector().withMatchLabels(mapOf("gpu", "true")) + .withMatchExpressions( + Arrays.asList(new LabelSelectorRequirement() + .withKey("fakeTokenPlaceholder") + .withOperator(LabelSelectorOperator.IN) + .withValues(Arrays.asList("production1", + "production2"))))) + .withPropertySelector( + new PropertySelector().withMatchExpressions(Arrays.asList( + new PropertySelectorRequirement().withName("zones") + .withOperator(PropertySelectorOperator.GT) + .withValues(Arrays.asList("1")))))))))) + .withTolerations(Arrays.asList(new Toleration().withKey("fakeTokenPlaceholder") + .withOperator(TolerationOperator.EXISTS) + .withValue("true") + .withEffect(TaintEffect.NO_SCHEDULE))))))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### FleetManagedNamespaces_Delete + +```java +/** + * Samples for FleetManagedNamespaces Delete. + */ +public final class FleetManagedNamespacesDeleteSamples { + /* + * x-ms-original-file: 2025-08-01-preview/FleetManagedNamespaces_Delete.json + */ + /** + * Sample code: FleetManagedNamespaces_Delete. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void fleetManagedNamespacesDelete( + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.fleetManagedNamespaces() + .delete("rgfleets", "fleet1", "namespace1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### FleetManagedNamespaces_Get + +```java +/** + * Samples for FleetManagedNamespaces Get. + */ +public final class FleetManagedNamespacesGetSamples { + /* + * x-ms-original-file: 2025-08-01-preview/FleetManagedNamespaces_Get.json + */ + /** + * Sample code: FleetManagedNamespaces_Get. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void fleetManagedNamespacesGet( + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.fleetManagedNamespaces() + .getWithResponse("rgfleets", "fleet1", "namespace1", com.azure.core.util.Context.NONE); + } +} +``` + +### FleetManagedNamespaces_ListByFleet + +```java +/** + * Samples for FleetManagedNamespaces ListByFleet. + */ +public final class FleetManagedNamespacesListByFleetSamples { + /* + * x-ms-original-file: 2025-08-01-preview/FleetManagedNamespaces_ListByFleet.json + */ + /** + * Sample code: FleetManagedNamespaces_ListByFleet. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void fleetManagedNamespacesListByFleet( + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.fleetManagedNamespaces().listByFleet("rgfleets", "fleet1", com.azure.core.util.Context.NONE); + } +} +``` + +### FleetManagedNamespaces_Update + +```java +import com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespace; + +/** + * Samples for FleetManagedNamespaces Update. + */ +public final class FleetManagedNamespacesUpdateSamples { + /* + * x-ms-original-file: 2025-08-01-preview/FleetManagedNamespaces_Update.json + */ + /** + * Sample code: FleetManagedNamespaces_Update. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void fleetManagedNamespacesUpdate( + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + FleetManagedNamespace resource = manager.fleetManagedNamespaces() + .getWithResponse("rgfleets", "fleet1", "namespace1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + ### FleetMembers_Create ```java @@ -252,7 +461,7 @@ public final class AutoUpgradeProfilesListByFleetSamples { */ public final class FleetMembersCreateSamples { /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_Create.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_Create.json */ /** * Sample code: Creates a FleetMember resource with a long running operation. @@ -270,7 +479,7 @@ public final class FleetMembersCreateSamples { } /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_Create_MaximumSet_Gen.json */ /** * Sample code: Creates a FleetMember resource with a long running operation. - generated by [MaximumSet] rule. @@ -300,7 +509,7 @@ public final class FleetMembersCreateSamples { */ public final class FleetMembersDeleteSamples { /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_Delete_MaximumSet_Gen.json */ /** * Sample code: Deletes a FleetMember resource asynchronously with a long running operation. - generated by @@ -314,7 +523,7 @@ public final class FleetMembersDeleteSamples { } /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_Delete.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_Delete.json */ /** * Sample code: Deletes a FleetMember resource asynchronously with a long running operation. @@ -336,7 +545,7 @@ public final class FleetMembersDeleteSamples { */ public final class FleetMembersGetSamples { /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_Get.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_Get.json */ /** * Sample code: Gets a FleetMember resource. @@ -349,7 +558,7 @@ public final class FleetMembersGetSamples { } /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_Get_MaximumSet_Gen.json */ /** * Sample code: Gets a FleetMember resource. - generated by [MaximumSet] rule. @@ -371,7 +580,7 @@ public final class FleetMembersGetSamples { */ public final class FleetMembersListByFleetSamples { /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_ListByFleet_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_ListByFleet_MaximumSet_Gen.json */ /** * Sample code: Lists the members of a Fleet. - generated by [MaximumSet] rule. @@ -384,7 +593,7 @@ public final class FleetMembersListByFleetSamples { } /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_ListByFleet.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_ListByFleet.json */ /** * Sample code: Lists the members of a Fleet. @@ -408,7 +617,7 @@ import com.azure.resourcemanager.containerservicefleet.models.FleetMember; */ public final class FleetMembersUpdateAsyncSamples { /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_Update_MaximumSet_Gen.json */ /** * Sample code: Updates a FleetMember resource synchronously. - generated by [MaximumSet] rule. @@ -424,7 +633,7 @@ public final class FleetMembersUpdateAsyncSamples { } /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_Update.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_Update.json */ /** * Sample code: Updates a FleetMember resource synchronously. @@ -456,7 +665,7 @@ import java.util.Arrays; */ public final class FleetUpdateStrategiesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-04-01-preview/FleetUpdateStrategies_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetUpdateStrategies_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: Create a FleetUpdateStrategy. - generated by [MaximumSet] rule. @@ -477,7 +686,7 @@ public final class FleetUpdateStrategiesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-04-01-preview/UpdateStrategies_CreateOrUpdate.json + * x-ms-original-file: 2025-08-01-preview/UpdateStrategies_CreateOrUpdate.json */ /** * Sample code: Create a FleetUpdateStrategy. @@ -513,7 +722,7 @@ public final class FleetUpdateStrategiesCreateOrUpdateSamples { */ public final class FleetUpdateStrategiesDeleteSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateStrategies_Delete.json + * x-ms-original-file: 2025-08-01-preview/UpdateStrategies_Delete.json */ /** * Sample code: Delete a FleetUpdateStrategy resource. @@ -526,7 +735,7 @@ public final class FleetUpdateStrategiesDeleteSamples { } /* - * x-ms-original-file: 2025-04-01-preview/FleetUpdateStrategies_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetUpdateStrategies_Delete_MaximumSet_Gen.json */ /** * Sample code: Delete a FleetUpdateStrategy resource. - generated by [MaximumSet] rule. @@ -549,7 +758,7 @@ public final class FleetUpdateStrategiesDeleteSamples { */ public final class FleetUpdateStrategiesGetSamples { /* - * x-ms-original-file: 2025-04-01-preview/FleetUpdateStrategies_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetUpdateStrategies_Get_MaximumSet_Gen.json */ /** * Sample code: Get a FleetUpdateStrategy resource. - generated by [MaximumSet] rule. @@ -563,7 +772,7 @@ public final class FleetUpdateStrategiesGetSamples { } /* - * x-ms-original-file: 2025-04-01-preview/UpdateStrategies_Get.json + * x-ms-original-file: 2025-08-01-preview/UpdateStrategies_Get.json */ /** * Sample code: Get a FleetUpdateStrategy resource. @@ -585,7 +794,7 @@ public final class FleetUpdateStrategiesGetSamples { */ public final class FleetUpdateStrategiesListByFleetSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateStrategies_ListByFleet.json + * x-ms-original-file: 2025-08-01-preview/UpdateStrategies_ListByFleet.json */ /** * Sample code: List the FleetUpdateStrategy resources by fleet. @@ -598,7 +807,7 @@ public final class FleetUpdateStrategiesListByFleetSamples { } /* - * x-ms-original-file: 2025-04-01-preview/FleetUpdateStrategies_ListByFleet_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetUpdateStrategies_ListByFleet_MaximumSet_Gen.json */ /** * Sample code: List the FleetUpdateStrategy resources by fleet. - generated by [MaximumSet] rule. @@ -629,7 +838,7 @@ import java.util.Map; */ public final class FleetsCreateSamples { /* - * x-ms-original-file: 2025-04-01-preview/Fleets_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Fleets_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: Creates a Fleet resource with a long running operation. - generated by [MaximumSet] rule. @@ -659,7 +868,7 @@ public final class FleetsCreateSamples { } /* - * x-ms-original-file: 2025-04-01-preview/Fleets_CreateOrUpdate.json + * x-ms-original-file: 2025-08-01-preview/Fleets_CreateOrUpdate.json */ /** * Sample code: Creates a Fleet resource with a long running operation. @@ -700,7 +909,7 @@ public final class FleetsCreateSamples { */ public final class FleetsDeleteSamples { /* - * x-ms-original-file: 2025-04-01-preview/Fleets_Delete.json + * x-ms-original-file: 2025-08-01-preview/Fleets_Delete.json */ /** * Sample code: Deletes a Fleet resource asynchronously with a long running operation. @@ -713,7 +922,7 @@ public final class FleetsDeleteSamples { } /* - * x-ms-original-file: 2025-04-01-preview/Fleets_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Fleets_Delete_MaximumSet_Gen.json */ /** * Sample code: Deletes a Fleet resource asynchronously with a long running operation. - generated by [MaximumSet] @@ -737,7 +946,7 @@ public final class FleetsDeleteSamples { */ public final class FleetsGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-04-01-preview/Fleets_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Fleets_Get_MaximumSet_Gen.json */ /** * Sample code: Gets a Fleet resource. - generated by [MaximumSet] rule. @@ -750,7 +959,7 @@ public final class FleetsGetByResourceGroupSamples { } /* - * x-ms-original-file: 2025-04-01-preview/Fleets_Get.json + * x-ms-original-file: 2025-08-01-preview/Fleets_Get.json */ /** * Sample code: Gets a Fleet resource. @@ -772,7 +981,7 @@ public final class FleetsGetByResourceGroupSamples { */ public final class FleetsListSamples { /* - * x-ms-original-file: 2025-04-01-preview/Fleets_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Fleets_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: Lists the Fleet resources in a subscription. - generated by [MaximumSet] rule. @@ -785,7 +994,7 @@ public final class FleetsListSamples { } /* - * x-ms-original-file: 2025-04-01-preview/Fleets_ListBySub.json + * x-ms-original-file: 2025-08-01-preview/Fleets_ListBySub.json */ /** * Sample code: Lists the Fleet resources in a subscription. @@ -807,7 +1016,7 @@ public final class FleetsListSamples { */ public final class FleetsListByResourceGroupSamples { /* - * x-ms-original-file: 2025-04-01-preview/Fleets_ListByResourceGroup.json + * x-ms-original-file: 2025-08-01-preview/Fleets_ListByResourceGroup.json */ /** * Sample code: Lists the Fleet resources in a resource group. @@ -820,7 +1029,7 @@ public final class FleetsListByResourceGroupSamples { } /* - * x-ms-original-file: 2025-04-01-preview/Fleets_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Fleets_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: Lists the Fleet resources in a resource group. - generated by [MaximumSet] rule. @@ -842,7 +1051,7 @@ public final class FleetsListByResourceGroupSamples { */ public final class FleetsListCredentialsSamples { /* - * x-ms-original-file: 2025-04-01-preview/Fleets_ListCredentials_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Fleets_ListCredentials_MaximumSet_Gen.json */ /** * Sample code: Lists the user credentials of a Fleet. - generated by [MaximumSet] rule. @@ -855,7 +1064,7 @@ public final class FleetsListCredentialsSamples { } /* - * x-ms-original-file: 2025-04-01-preview/Fleets_ListCredentialsResult.json + * x-ms-original-file: 2025-08-01-preview/Fleets_ListCredentialsResult.json */ /** * Sample code: Lists the user credentials of a Fleet. @@ -884,7 +1093,7 @@ import java.util.Map; */ public final class FleetsUpdateAsyncSamples { /* - * x-ms-original-file: 2025-04-01-preview/Fleets_PatchTags.json + * x-ms-original-file: 2025-08-01-preview/Fleets_PatchTags.json */ /** * Sample code: Update a Fleet. @@ -900,7 +1109,7 @@ public final class FleetsUpdateAsyncSamples { } /* - * x-ms-original-file: 2025-04-01-preview/Fleets_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Fleets_Update_MaximumSet_Gen.json */ /** * Sample code: Update a Fleet. - generated by [MaximumSet] rule. @@ -942,7 +1151,7 @@ public final class FleetsUpdateAsyncSamples { */ public final class GatesGetSamples { /* - * x-ms-original-file: 2025-04-01-preview/Gates_Get.json + * x-ms-original-file: 2025-08-01-preview/Gates_Get.json */ /** * Sample code: Gets a Gate resource. @@ -954,6 +1163,21 @@ public final class GatesGetSamples { manager.gates() .getWithResponse("rg1", "fleet1", "12345678-910a-bcde-f000-000000000000", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2025-08-01-preview/Gates_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Gates_Get_MaximumSet. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void + gatesGetMaximumSet(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.gates() + .getWithResponse("rgfleets", "fleet-1", "12345678-910a-bcde-f000-000000000000", + com.azure.core.util.Context.NONE); + } } ``` @@ -965,7 +1189,7 @@ public final class GatesGetSamples { */ public final class GatesListByFleetSamples { /* - * x-ms-original-file: 2025-04-01-preview/Gates_ListByFleet.json + * x-ms-original-file: 2025-08-01-preview/Gates_ListByFleet.json */ /** * Sample code: Lists the Gates of a Fleet. @@ -976,6 +1200,19 @@ public final class GatesListByFleetSamples { listsTheGatesOfAFleet(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.gates().listByFleet("rg1", "fleet1", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2025-08-01-preview/Gates_ListByFleet_MaximumSet_Gen.json + */ + /** + * Sample code: Gates_ListByFleet_MaximumSet. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void gatesListByFleetMaximumSet( + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.gates().listByFleet("rgfleets", "fleet-1", com.azure.core.util.Context.NONE); + } } ``` @@ -991,7 +1228,23 @@ import com.azure.resourcemanager.containerservicefleet.models.GateState; */ public final class GatesUpdateSamples { /* - * x-ms-original-file: 2025-04-01-preview/Gates_Update.json + * x-ms-original-file: 2025-08-01-preview/Gates_Update_MaximumSet_Gen.json + */ + /** + * Sample code: Gates_Update_MaximumSet. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void + gatesUpdateMaximumSet(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.gates() + .update("rgfleets", "fleet-1", "12345678-910a-bcde-f000-000000000000", + new GatePatch().withProperties(new GatePatchProperties().withState(GateState.PENDING)), + "jqongzwjguenncptggiqzxxycakgrj", "fsyp", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-08-01-preview/Gates_Update.json */ /** * Sample code: Updates a Gate resource. @@ -1016,7 +1269,7 @@ public final class GatesUpdateSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: 2025-04-01-preview/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Operations_List_MinimumSet_Gen.json */ /** * Sample code: List the operations for the provider. - generated by [MinimumSet] rule. @@ -1029,7 +1282,7 @@ public final class OperationsListSamples { } /* - * x-ms-original-file: 2025-04-01-preview/Operations_List.json + * x-ms-original-file: 2025-08-01-preview/Operations_List.json */ /** * Sample code: List the operations for the provider. @@ -1042,7 +1295,7 @@ public final class OperationsListSamples { } /* - * x-ms-original-file: 2025-04-01-preview/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Operations_List_MaximumSet_Gen.json */ /** * Sample code: List the operations for the provider. - generated by [MaximumSet] rule. @@ -1077,7 +1330,7 @@ import java.util.Arrays; */ public final class UpdateRunsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: Create an UpdateRun. - generated by [MaximumSet] rule. @@ -1105,7 +1358,7 @@ public final class UpdateRunsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_CreateOrUpdate.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_CreateOrUpdate.json */ /** * Sample code: Create an UpdateRun. @@ -1147,7 +1400,7 @@ public final class UpdateRunsCreateOrUpdateSamples { */ public final class UpdateRunsDeleteSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Delete_MaximumSet_Gen.json */ /** * Sample code: Delete an updateRun resource. - generated by [MaximumSet] rule. @@ -1161,7 +1414,7 @@ public final class UpdateRunsDeleteSamples { } /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Delete.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Delete.json */ /** * Sample code: Delete an updateRun resource. @@ -1183,7 +1436,7 @@ public final class UpdateRunsDeleteSamples { */ public final class UpdateRunsGetSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Get_MaximumSet_Gen.json */ /** * Sample code: Gets an UpdateRun resource. - generated by [MaximumSet] rule. @@ -1196,7 +1449,7 @@ public final class UpdateRunsGetSamples { } /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Get.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Get.json */ /** * Sample code: Gets an UpdateRun resource. @@ -1218,7 +1471,7 @@ public final class UpdateRunsGetSamples { */ public final class UpdateRunsListByFleetSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_ListByFleet.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_ListByFleet.json */ /** * Sample code: Lists the UpdateRun resources by fleet. @@ -1231,7 +1484,7 @@ public final class UpdateRunsListByFleetSamples { } /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_ListByFleet_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_ListByFleet_MaximumSet_Gen.json */ /** * Sample code: Lists the UpdateRun resources by fleet. - generated by [MaximumSet] rule. @@ -1258,7 +1511,7 @@ import java.util.Arrays; */ public final class UpdateRunsSkipSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Skip_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Skip_MaximumSet_Gen.json */ /** * Sample code: Skips one or more member/group/stage/afterStageWait(s) of an UpdateRun. - generated by [MaximumSet] @@ -1277,7 +1530,7 @@ public final class UpdateRunsSkipSamples { } /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Skip.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Skip.json */ /** * Sample code: Skips one or more member/group/stage/afterStageWait(s) of an UpdateRun. @@ -1304,7 +1557,7 @@ public final class UpdateRunsSkipSamples { */ public final class UpdateRunsStartSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Start_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Start_MaximumSet_Gen.json */ /** * Sample code: Starts an UpdateRun. - generated by [MaximumSet] rule. @@ -1318,7 +1571,7 @@ public final class UpdateRunsStartSamples { } /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Start.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Start.json */ /** * Sample code: Starts an UpdateRun. @@ -1340,7 +1593,7 @@ public final class UpdateRunsStartSamples { */ public final class UpdateRunsStopSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Stop_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Stop_MaximumSet_Gen.json */ /** * Sample code: Stops an UpdateRun. - generated by [MaximumSet] rule. @@ -1353,7 +1606,7 @@ public final class UpdateRunsStopSamples { } /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Stop.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Stop.json */ /** * Sample code: Stops an UpdateRun. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/pom.xml b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/pom.xml index fe30ca91ce38..3a7fca1b426d 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/pom.xml +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/pom.xml @@ -18,7 +18,7 @@ <packaging>jar</packaging> <name>Microsoft Azure SDK for Container Service Fleet Management</name> - <description>This package contains Microsoft Azure SDK for Container Service Fleet Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Kubernetes Fleet Manager api client. Package api-version 2025-04-01-preview.</description> + <description>This package contains Microsoft Azure SDK for Container Service Fleet Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Kubernetes Fleet Manager api client. Package api-version 2025-08-01-preview.</description> <url>https://github.com/Azure/azure-sdk-for-java</url> <licenses> diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/ContainerServiceFleetManager.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/ContainerServiceFleetManager.java index 8183bce6af98..b3798e3a02e1 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/ContainerServiceFleetManager.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/ContainerServiceFleetManager.java @@ -28,6 +28,7 @@ import com.azure.resourcemanager.containerservicefleet.implementation.AutoUpgradeProfileOperationsImpl; import com.azure.resourcemanager.containerservicefleet.implementation.AutoUpgradeProfilesImpl; import com.azure.resourcemanager.containerservicefleet.implementation.ContainerServiceFleetManagementClientBuilder; +import com.azure.resourcemanager.containerservicefleet.implementation.FleetManagedNamespacesImpl; import com.azure.resourcemanager.containerservicefleet.implementation.FleetMembersImpl; import com.azure.resourcemanager.containerservicefleet.implementation.FleetUpdateStrategiesImpl; import com.azure.resourcemanager.containerservicefleet.implementation.FleetsImpl; @@ -36,6 +37,7 @@ import com.azure.resourcemanager.containerservicefleet.implementation.UpdateRunsImpl; import com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeProfileOperations; import com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeProfiles; +import com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespaces; import com.azure.resourcemanager.containerservicefleet.models.FleetMembers; import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategies; import com.azure.resourcemanager.containerservicefleet.models.Fleets; @@ -61,6 +63,8 @@ public final class ContainerServiceFleetManager { private FleetMembers fleetMembers; + private FleetManagedNamespaces fleetManagedNamespaces; + private Gates gates; private UpdateRuns updateRuns; @@ -323,6 +327,19 @@ public FleetMembers fleetMembers() { return fleetMembers; } + /** + * Gets the resource collection API of FleetManagedNamespaces. It manages FleetManagedNamespace. + * + * @return Resource collection API of FleetManagedNamespaces. + */ + public FleetManagedNamespaces fleetManagedNamespaces() { + if (this.fleetManagedNamespaces == null) { + this.fleetManagedNamespaces + = new FleetManagedNamespacesImpl(clientObject.getFleetManagedNamespaces(), this); + } + return fleetManagedNamespaces; + } + /** * Gets the resource collection API of Gates. * diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/ContainerServiceFleetManagementClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/ContainerServiceFleetManagementClient.java index 60b4a9256b76..2b21a1d60ccb 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/ContainerServiceFleetManagementClient.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/ContainerServiceFleetManagementClient.java @@ -67,6 +67,13 @@ public interface ContainerServiceFleetManagementClient { */ FleetMembersClient getFleetMembers(); + /** + * Gets the FleetManagedNamespacesClient object to access its operations. + * + * @return the FleetManagedNamespacesClient object. + */ + FleetManagedNamespacesClient getFleetManagedNamespaces(); + /** * Gets the GatesClient object to access its operations. * diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetManagedNamespacesClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetManagedNamespacesClient.java new file mode 100644 index 000000000000..fee7febc254b --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetManagedNamespacesClient.java @@ -0,0 +1,278 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.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.containerservicefleet.fluent.models.FleetManagedNamespaceInner; +import com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespacePatch; + +/** + * An instance of this class provides access to all the operations defined in FleetManagedNamespacesClient. + */ +public interface FleetManagedNamespacesClient { + /** + * Get a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 FleetManagedNamespace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<FleetManagedNamespaceInner> getWithResponse(String resourceGroupName, String fleetName, + String managedNamespaceName, Context context); + + /** + * Get a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 FleetManagedNamespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FleetManagedNamespaceInner get(String resourceGroupName, String fleetName, String managedNamespaceName); + + /** + * Create a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<FleetManagedNamespaceInner>, FleetManagedNamespaceInner> beginCreateOrUpdate( + String resourceGroupName, String fleetName, String managedNamespaceName, FleetManagedNamespaceInner resource); + + /** + * Create a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param resource Resource create parameters. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<FleetManagedNamespaceInner>, FleetManagedNamespaceInner> beginCreateOrUpdate( + String resourceGroupName, String fleetName, String managedNamespaceName, FleetManagedNamespaceInner resource, + String ifMatch, String ifNoneMatch, Context context); + + /** + * Create a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FleetManagedNamespaceInner createOrUpdate(String resourceGroupName, String fleetName, String managedNamespaceName, + FleetManagedNamespaceInner resource); + + /** + * Create a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param resource Resource create parameters. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FleetManagedNamespaceInner createOrUpdate(String resourceGroupName, String fleetName, String managedNamespaceName, + FleetManagedNamespaceInner resource, String ifMatch, String ifNoneMatch, Context context); + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String fleetName, + String managedNamespaceName); + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String fleetName, + String managedNamespaceName, String ifMatch, Context context); + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 fleetName, String managedNamespaceName); + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String fleetName, String managedNamespaceName, String ifMatch, + Context context); + + /** + * List FleetManagedNamespace resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet 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 FleetManagedNamespace list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<FleetManagedNamespaceInner> listByFleet(String resourceGroupName, String fleetName); + + /** + * List FleetManagedNamespace resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet 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 FleetManagedNamespace list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<FleetManagedNamespaceInner> listByFleet(String resourceGroupName, String fleetName, Context context); + + /** + * Update a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 the {@link SyncPoller} for polling of a fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<FleetManagedNamespaceInner>, FleetManagedNamespaceInner> beginUpdate(String resourceGroupName, + String fleetName, String managedNamespaceName, FleetManagedNamespacePatch properties); + + /** + * Update a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param properties The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<FleetManagedNamespaceInner>, FleetManagedNamespaceInner> beginUpdate(String resourceGroupName, + String fleetName, String managedNamespaceName, FleetManagedNamespacePatch properties, String ifMatch, + Context context); + + /** + * Update a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FleetManagedNamespaceInner update(String resourceGroupName, String fleetName, String managedNamespaceName, + FleetManagedNamespacePatch properties); + + /** + * Update a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param properties The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FleetManagedNamespaceInner update(String resourceGroupName, String fleetName, String managedNamespaceName, + FleetManagedNamespacePatch properties, String ifMatch, Context context); +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetManagedNamespaceInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetManagedNamespaceInner.java new file mode 100644 index 000000000000..b464b8e03b70 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetManagedNamespaceInner.java @@ -0,0 +1,320 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservicefleet.models.AdoptionPolicy; +import com.azure.resourcemanager.containerservicefleet.models.DeletePolicy; +import com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespaceProvisioningState; +import com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespaceStatus; +import com.azure.resourcemanager.containerservicefleet.models.ManagedNamespaceProperties; +import com.azure.resourcemanager.containerservicefleet.models.PropagationPolicy; +import java.io.IOException; +import java.util.Map; + +/** + * A fleet managed namespace. + */ +@Fluent +public final class FleetManagedNamespaceInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private FleetManagedNamespaceProperties innerProperties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String etag; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of FleetManagedNamespaceInner class. + */ + public FleetManagedNamespaceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private FleetManagedNamespaceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public FleetManagedNamespaceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FleetManagedNamespaceInner withTags(Map<String, String> tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public FleetManagedNamespaceProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the managedNamespaceProperties property: The namespace properties for the fleet managed namespace. + * + * @return the managedNamespaceProperties value. + */ + public ManagedNamespaceProperties managedNamespaceProperties() { + return this.innerProperties() == null ? null : this.innerProperties().managedNamespaceProperties(); + } + + /** + * Set the managedNamespaceProperties property: The namespace properties for the fleet managed namespace. + * + * @param managedNamespaceProperties the managedNamespaceProperties value to set. + * @return the FleetManagedNamespaceInner object itself. + */ + public FleetManagedNamespaceInner + withManagedNamespaceProperties(ManagedNamespaceProperties managedNamespaceProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new FleetManagedNamespaceProperties(); + } + this.innerProperties().withManagedNamespaceProperties(managedNamespaceProperties); + return this; + } + + /** + * Get the adoptionPolicy property: Action if the managed namespace with the same name already exists. Default is + * Never. + * + * @return the adoptionPolicy value. + */ + public AdoptionPolicy adoptionPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().adoptionPolicy(); + } + + /** + * Set the adoptionPolicy property: Action if the managed namespace with the same name already exists. Default is + * Never. + * + * @param adoptionPolicy the adoptionPolicy value to set. + * @return the FleetManagedNamespaceInner object itself. + */ + public FleetManagedNamespaceInner withAdoptionPolicy(AdoptionPolicy adoptionPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new FleetManagedNamespaceProperties(); + } + this.innerProperties().withAdoptionPolicy(adoptionPolicy); + return this; + } + + /** + * Get the deletePolicy property: Delete options of a fleet managed namespace. Default is Keep. + * + * @return the deletePolicy value. + */ + public DeletePolicy deletePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().deletePolicy(); + } + + /** + * Set the deletePolicy property: Delete options of a fleet managed namespace. Default is Keep. + * + * @param deletePolicy the deletePolicy value to set. + * @return the FleetManagedNamespaceInner object itself. + */ + public FleetManagedNamespaceInner withDeletePolicy(DeletePolicy deletePolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new FleetManagedNamespaceProperties(); + } + this.innerProperties().withDeletePolicy(deletePolicy); + return this; + } + + /** + * Get the propagationPolicy property: The profile of the propagation to create the namespace. + * + * @return the propagationPolicy value. + */ + public PropagationPolicy propagationPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().propagationPolicy(); + } + + /** + * Set the propagationPolicy property: The profile of the propagation to create the namespace. + * + * @param propagationPolicy the propagationPolicy value to set. + * @return the FleetManagedNamespaceInner object itself. + */ + public FleetManagedNamespaceInner withPropagationPolicy(PropagationPolicy propagationPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new FleetManagedNamespaceProperties(); + } + this.innerProperties().withPropagationPolicy(propagationPolicy); + return this; + } + + /** + * Get the status property: Status information of the last operation for fleet managed namespace. + * + * @return the status value. + */ + public FleetManagedNamespaceStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the portalFqdn property: The Azure Portal FQDN of the Fleet hub. + * + * @return the portalFqdn value. + */ + public String portalFqdn() { + return this.innerProperties() == null ? null : this.innerProperties().portalFqdn(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FleetManagedNamespaceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FleetManagedNamespaceInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FleetManagedNamespaceInner. + */ + public static FleetManagedNamespaceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FleetManagedNamespaceInner deserializedFleetManagedNamespaceInner = new FleetManagedNamespaceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedFleetManagedNamespaceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedFleetManagedNamespaceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedFleetManagedNamespaceInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedFleetManagedNamespaceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFleetManagedNamespaceInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedFleetManagedNamespaceInner.innerProperties + = FleetManagedNamespaceProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedFleetManagedNamespaceInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedFleetManagedNamespaceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFleetManagedNamespaceInner; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetManagedNamespaceProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetManagedNamespaceProperties.java new file mode 100644 index 000000000000..7215221aac59 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetManagedNamespaceProperties.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservicefleet.models.AdoptionPolicy; +import com.azure.resourcemanager.containerservicefleet.models.DeletePolicy; +import com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespaceProvisioningState; +import com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespaceStatus; +import com.azure.resourcemanager.containerservicefleet.models.ManagedNamespaceProperties; +import com.azure.resourcemanager.containerservicefleet.models.PropagationPolicy; +import java.io.IOException; + +/** + * The properties of a fleet managed namespace. + */ +@Fluent +public final class FleetManagedNamespaceProperties implements JsonSerializable<FleetManagedNamespaceProperties> { + /* + * The status of the last operation. + */ + private FleetManagedNamespaceProvisioningState provisioningState; + + /* + * The namespace properties for the fleet managed namespace. + */ + private ManagedNamespaceProperties managedNamespaceProperties; + + /* + * Action if the managed namespace with the same name already exists. Default is Never. + */ + private AdoptionPolicy adoptionPolicy; + + /* + * Delete options of a fleet managed namespace. Default is Keep. + */ + private DeletePolicy deletePolicy; + + /* + * The profile of the propagation to create the namespace. + */ + private PropagationPolicy propagationPolicy; + + /* + * Status information of the last operation for fleet managed namespace. + */ + private FleetManagedNamespaceStatus status; + + /* + * The Azure Portal FQDN of the Fleet hub. + */ + private String portalFqdn; + + /** + * Creates an instance of FleetManagedNamespaceProperties class. + */ + public FleetManagedNamespaceProperties() { + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public FleetManagedNamespaceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the managedNamespaceProperties property: The namespace properties for the fleet managed namespace. + * + * @return the managedNamespaceProperties value. + */ + public ManagedNamespaceProperties managedNamespaceProperties() { + return this.managedNamespaceProperties; + } + + /** + * Set the managedNamespaceProperties property: The namespace properties for the fleet managed namespace. + * + * @param managedNamespaceProperties the managedNamespaceProperties value to set. + * @return the FleetManagedNamespaceProperties object itself. + */ + public FleetManagedNamespaceProperties + withManagedNamespaceProperties(ManagedNamespaceProperties managedNamespaceProperties) { + this.managedNamespaceProperties = managedNamespaceProperties; + return this; + } + + /** + * Get the adoptionPolicy property: Action if the managed namespace with the same name already exists. Default is + * Never. + * + * @return the adoptionPolicy value. + */ + public AdoptionPolicy adoptionPolicy() { + return this.adoptionPolicy; + } + + /** + * Set the adoptionPolicy property: Action if the managed namespace with the same name already exists. Default is + * Never. + * + * @param adoptionPolicy the adoptionPolicy value to set. + * @return the FleetManagedNamespaceProperties object itself. + */ + public FleetManagedNamespaceProperties withAdoptionPolicy(AdoptionPolicy adoptionPolicy) { + this.adoptionPolicy = adoptionPolicy; + return this; + } + + /** + * Get the deletePolicy property: Delete options of a fleet managed namespace. Default is Keep. + * + * @return the deletePolicy value. + */ + public DeletePolicy deletePolicy() { + return this.deletePolicy; + } + + /** + * Set the deletePolicy property: Delete options of a fleet managed namespace. Default is Keep. + * + * @param deletePolicy the deletePolicy value to set. + * @return the FleetManagedNamespaceProperties object itself. + */ + public FleetManagedNamespaceProperties withDeletePolicy(DeletePolicy deletePolicy) { + this.deletePolicy = deletePolicy; + return this; + } + + /** + * Get the propagationPolicy property: The profile of the propagation to create the namespace. + * + * @return the propagationPolicy value. + */ + public PropagationPolicy propagationPolicy() { + return this.propagationPolicy; + } + + /** + * Set the propagationPolicy property: The profile of the propagation to create the namespace. + * + * @param propagationPolicy the propagationPolicy value to set. + * @return the FleetManagedNamespaceProperties object itself. + */ + public FleetManagedNamespaceProperties withPropagationPolicy(PropagationPolicy propagationPolicy) { + this.propagationPolicy = propagationPolicy; + return this; + } + + /** + * Get the status property: Status information of the last operation for fleet managed namespace. + * + * @return the status value. + */ + public FleetManagedNamespaceStatus status() { + return this.status; + } + + /** + * Get the portalFqdn property: The Azure Portal FQDN of the Fleet hub. + * + * @return the portalFqdn value. + */ + public String portalFqdn() { + return this.portalFqdn; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("adoptionPolicy", + this.adoptionPolicy == null ? null : this.adoptionPolicy.toString()); + jsonWriter.writeStringField("deletePolicy", this.deletePolicy == null ? null : this.deletePolicy.toString()); + jsonWriter.writeJsonField("managedNamespaceProperties", this.managedNamespaceProperties); + jsonWriter.writeJsonField("propagationPolicy", this.propagationPolicy); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FleetManagedNamespaceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FleetManagedNamespaceProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FleetManagedNamespaceProperties. + */ + public static FleetManagedNamespaceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FleetManagedNamespaceProperties deserializedFleetManagedNamespaceProperties + = new FleetManagedNamespaceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("adoptionPolicy".equals(fieldName)) { + deserializedFleetManagedNamespaceProperties.adoptionPolicy + = AdoptionPolicy.fromString(reader.getString()); + } else if ("deletePolicy".equals(fieldName)) { + deserializedFleetManagedNamespaceProperties.deletePolicy + = DeletePolicy.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedFleetManagedNamespaceProperties.provisioningState + = FleetManagedNamespaceProvisioningState.fromString(reader.getString()); + } else if ("managedNamespaceProperties".equals(fieldName)) { + deserializedFleetManagedNamespaceProperties.managedNamespaceProperties + = ManagedNamespaceProperties.fromJson(reader); + } else if ("propagationPolicy".equals(fieldName)) { + deserializedFleetManagedNamespaceProperties.propagationPolicy = PropagationPolicy.fromJson(reader); + } else if ("status".equals(fieldName)) { + deserializedFleetManagedNamespaceProperties.status = FleetManagedNamespaceStatus.fromJson(reader); + } else if ("portalFqdn".equals(fieldName)) { + deserializedFleetManagedNamespaceProperties.portalFqdn = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFleetManagedNamespaceProperties; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java index 8780a37a5b32..83a1f814da90 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java @@ -29,6 +29,7 @@ import com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfileOperationsClient; import com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient; import com.azure.resourcemanager.containerservicefleet.fluent.ContainerServiceFleetManagementClient; +import com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient; import com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient; import com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient; import com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient; @@ -175,6 +176,20 @@ public FleetMembersClient getFleetMembers() { return this.fleetMembers; } + /** + * The FleetManagedNamespacesClient object to access its operations. + */ + private final FleetManagedNamespacesClient fleetManagedNamespaces; + + /** + * Gets the FleetManagedNamespacesClient object to access its operations. + * + * @return the FleetManagedNamespacesClient object. + */ + public FleetManagedNamespacesClient getFleetManagedNamespaces() { + return this.fleetManagedNamespaces; + } + /** * The GatesClient object to access its operations. */ @@ -262,10 +277,11 @@ public AutoUpgradeProfileOperationsClient getAutoUpgradeProfileOperations() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2025-04-01-preview"; + this.apiVersion = "2025-08-01-preview"; this.operations = new OperationsClientImpl(this); this.fleets = new FleetsClientImpl(this); this.fleetMembers = new FleetMembersClientImpl(this); + this.fleetManagedNamespaces = new FleetManagedNamespacesClientImpl(this); this.gates = new GatesClientImpl(this); this.updateRuns = new UpdateRunsClientImpl(this); this.fleetUpdateStrategies = new FleetUpdateStrategiesClientImpl(this); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetManagedNamespaceImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetManagedNamespaceImpl.java new file mode 100644 index 000000000000..797b7e9a6e4f --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetManagedNamespaceImpl.java @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetManagedNamespaceInner; +import com.azure.resourcemanager.containerservicefleet.models.AdoptionPolicy; +import com.azure.resourcemanager.containerservicefleet.models.DeletePolicy; +import com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespace; +import com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespacePatch; +import com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespaceProvisioningState; +import com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespaceStatus; +import com.azure.resourcemanager.containerservicefleet.models.ManagedNamespaceProperties; +import com.azure.resourcemanager.containerservicefleet.models.PropagationPolicy; +import java.util.Collections; +import java.util.Map; + +public final class FleetManagedNamespaceImpl + implements FleetManagedNamespace, FleetManagedNamespace.Definition, FleetManagedNamespace.Update { + private FleetManagedNamespaceInner innerObject; + + private final com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map<String, String> tags() { + Map<String, String> inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String etag() { + return this.innerModel().etag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public FleetManagedNamespaceProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public ManagedNamespaceProperties managedNamespaceProperties() { + return this.innerModel().managedNamespaceProperties(); + } + + public AdoptionPolicy adoptionPolicy() { + return this.innerModel().adoptionPolicy(); + } + + public DeletePolicy deletePolicy() { + return this.innerModel().deletePolicy(); + } + + public PropagationPolicy propagationPolicy() { + return this.innerModel().propagationPolicy(); + } + + public FleetManagedNamespaceStatus status() { + return this.innerModel().status(); + } + + public String portalFqdn() { + return this.innerModel().portalFqdn(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public FleetManagedNamespaceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String fleetName; + + private String managedNamespaceName; + + private String createIfMatch; + + private String createIfNoneMatch; + + private String updateIfMatch; + + private FleetManagedNamespacePatch updateProperties; + + public FleetManagedNamespaceImpl withExistingFleet(String resourceGroupName, String fleetName) { + this.resourceGroupName = resourceGroupName; + this.fleetName = fleetName; + return this; + } + + public FleetManagedNamespace create() { + this.innerObject = serviceManager.serviceClient() + .getFleetManagedNamespaces() + .createOrUpdate(resourceGroupName, fleetName, managedNamespaceName, this.innerModel(), createIfMatch, + createIfNoneMatch, Context.NONE); + return this; + } + + public FleetManagedNamespace create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getFleetManagedNamespaces() + .createOrUpdate(resourceGroupName, fleetName, managedNamespaceName, this.innerModel(), createIfMatch, + createIfNoneMatch, context); + return this; + } + + FleetManagedNamespaceImpl(String name, + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { + this.innerObject = new FleetManagedNamespaceInner(); + this.serviceManager = serviceManager; + this.managedNamespaceName = name; + this.createIfMatch = null; + this.createIfNoneMatch = null; + } + + public FleetManagedNamespaceImpl update() { + this.updateIfMatch = null; + this.updateProperties = new FleetManagedNamespacePatch(); + return this; + } + + public FleetManagedNamespace apply() { + this.innerObject = serviceManager.serviceClient() + .getFleetManagedNamespaces() + .update(resourceGroupName, fleetName, managedNamespaceName, updateProperties, updateIfMatch, Context.NONE); + return this; + } + + public FleetManagedNamespace apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getFleetManagedNamespaces() + .update(resourceGroupName, fleetName, managedNamespaceName, updateProperties, updateIfMatch, context); + return this; + } + + FleetManagedNamespaceImpl(FleetManagedNamespaceInner innerObject, + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.fleetName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "fleets"); + this.managedNamespaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedNamespaces"); + } + + public FleetManagedNamespace refresh() { + this.innerObject = serviceManager.serviceClient() + .getFleetManagedNamespaces() + .getWithResponse(resourceGroupName, fleetName, managedNamespaceName, Context.NONE) + .getValue(); + return this; + } + + public FleetManagedNamespace refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getFleetManagedNamespaces() + .getWithResponse(resourceGroupName, fleetName, managedNamespaceName, context) + .getValue(); + return this; + } + + public FleetManagedNamespaceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public FleetManagedNamespaceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public FleetManagedNamespaceImpl withTags(Map<String, String> tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public FleetManagedNamespaceImpl + withManagedNamespaceProperties(ManagedNamespaceProperties managedNamespaceProperties) { + this.innerModel().withManagedNamespaceProperties(managedNamespaceProperties); + return this; + } + + public FleetManagedNamespaceImpl withAdoptionPolicy(AdoptionPolicy adoptionPolicy) { + this.innerModel().withAdoptionPolicy(adoptionPolicy); + return this; + } + + public FleetManagedNamespaceImpl withDeletePolicy(DeletePolicy deletePolicy) { + this.innerModel().withDeletePolicy(deletePolicy); + return this; + } + + public FleetManagedNamespaceImpl withPropagationPolicy(PropagationPolicy propagationPolicy) { + this.innerModel().withPropagationPolicy(propagationPolicy); + return this; + } + + public FleetManagedNamespaceImpl withIfMatch(String ifMatch) { + if (isInCreateMode()) { + this.createIfMatch = ifMatch; + return this; + } else { + this.updateIfMatch = ifMatch; + return this; + } + } + + public FleetManagedNamespaceImpl withIfNoneMatch(String ifNoneMatch) { + this.createIfNoneMatch = ifNoneMatch; + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetManagedNamespacesClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetManagedNamespacesClientImpl.java new file mode 100644 index 000000000000..9d94e9823c3c --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetManagedNamespacesClientImpl.java @@ -0,0 +1,1225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient; +import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetManagedNamespaceInner; +import com.azure.resourcemanager.containerservicefleet.implementation.models.FleetManagedNamespaceListResult; +import com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespacePatch; +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 FleetManagedNamespacesClient. + */ +public final class FleetManagedNamespacesClientImpl implements FleetManagedNamespacesClient { + /** + * The proxy service used to perform REST calls. + */ + private final FleetManagedNamespacesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceFleetManagementClientImpl client; + + /** + * Initializes an instance of FleetManagedNamespacesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FleetManagedNamespacesClientImpl(ContainerServiceFleetManagementClientImpl client) { + this.service = RestProxy.create(FleetManagedNamespacesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceFleetManagementClientFleetManagedNamespaces to be + * used by the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerServiceFleetManagementClientFleetManagedNamespaces") + public interface FleetManagedNamespacesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/managedNamespaces/{managedNamespaceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<FleetManagedNamespaceInner>> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, + @PathParam("managedNamespaceName") String managedNamespaceName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/managedNamespaces/{managedNamespaceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<FleetManagedNamespaceInner> getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, + @PathParam("managedNamespaceName") String managedNamespaceName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/managedNamespaces/{managedNamespaceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @PathParam("fleetName") String fleetName, + @PathParam("managedNamespaceName") String managedNamespaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FleetManagedNamespaceInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/managedNamespaces/{managedNamespaceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @PathParam("fleetName") String fleetName, + @PathParam("managedNamespaceName") String managedNamespaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FleetManagedNamespaceInner resource, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/managedNamespaces/{managedNamespaceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @PathParam("fleetName") String fleetName, @PathParam("managedNamespaceName") String managedNamespaceName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/managedNamespaces/{managedNamespaceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @PathParam("fleetName") String fleetName, @PathParam("managedNamespaceName") String managedNamespaceName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/managedNamespaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<FleetManagedNamespaceListResult>> listByFleet(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/managedNamespaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<FleetManagedNamespaceListResult> listByFleetSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, + @HeaderParam("Accept") String accept, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/managedNamespaces/{managedNamespaceName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @PathParam("fleetName") String fleetName, @PathParam("managedNamespaceName") String managedNamespaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FleetManagedNamespacePatch properties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/managedNamespaces/{managedNamespaceName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @PathParam("fleetName") String fleetName, @PathParam("managedNamespaceName") String managedNamespaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FleetManagedNamespacePatch properties, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<FleetManagedNamespaceListResult>> listByFleetNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<FleetManagedNamespaceListResult> listByFleetNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 FleetManagedNamespace along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<FleetManagedNamespaceInner>> getWithResponseAsync(String resourceGroupName, String fleetName, + String managedNamespaceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, managedNamespaceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 FleetManagedNamespace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<FleetManagedNamespaceInner> getAsync(String resourceGroupName, String fleetName, + String managedNamespaceName) { + return getWithResponseAsync(resourceGroupName, fleetName, managedNamespaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 FleetManagedNamespace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<FleetManagedNamespaceInner> getWithResponse(String resourceGroupName, String fleetName, + String managedNamespaceName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, fleetName, managedNamespaceName, accept, context); + } + + /** + * Get a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 FleetManagedNamespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FleetManagedNamespaceInner get(String resourceGroupName, String fleetName, String managedNamespaceName) { + return getWithResponse(resourceGroupName, fleetName, managedNamespaceName, Context.NONE).getValue(); + } + + /** + * Create a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param resource Resource create parameters. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a fleet managed namespace along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String fleetName, + String managedNamespaceName, FleetManagedNamespaceInner resource, String ifMatch, String ifNoneMatch) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, + managedNamespaceName, contentType, accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param resource Resource create parameters. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a fleet managed namespace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String fleetName, + String managedNamespaceName, FleetManagedNamespaceInner resource, String ifMatch, String ifNoneMatch) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, managedNamespaceName, + contentType, accept, resource, Context.NONE); + } + + /** + * Create a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param resource Resource create parameters. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a fleet managed namespace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String fleetName, + String managedNamespaceName, FleetManagedNamespaceInner resource, String ifMatch, String ifNoneMatch, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, managedNamespaceName, + contentType, accept, resource, context); + } + + /** + * Create a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param resource Resource create parameters. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<FleetManagedNamespaceInner>, FleetManagedNamespaceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String fleetName, String managedNamespaceName, FleetManagedNamespaceInner resource, + String ifMatch, String ifNoneMatch) { + Mono<Response<Flux<ByteBuffer>>> mono = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, + managedNamespaceName, resource, ifMatch, ifNoneMatch); + return this.client.<FleetManagedNamespaceInner, FleetManagedNamespaceInner>getLroResult(mono, + this.client.getHttpPipeline(), FleetManagedNamespaceInner.class, FleetManagedNamespaceInner.class, + this.client.getContext()); + } + + /** + * Create a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<FleetManagedNamespaceInner>, FleetManagedNamespaceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String fleetName, String managedNamespaceName, FleetManagedNamespaceInner resource) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono<Response<Flux<ByteBuffer>>> mono = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, + managedNamespaceName, resource, ifMatch, ifNoneMatch); + return this.client.<FleetManagedNamespaceInner, FleetManagedNamespaceInner>getLroResult(mono, + this.client.getHttpPipeline(), FleetManagedNamespaceInner.class, FleetManagedNamespaceInner.class, + this.client.getContext()); + } + + /** + * Create a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param resource Resource create parameters. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<FleetManagedNamespaceInner>, FleetManagedNamespaceInner> beginCreateOrUpdate( + String resourceGroupName, String fleetName, String managedNamespaceName, FleetManagedNamespaceInner resource, + String ifMatch, String ifNoneMatch) { + Response<BinaryData> response = createOrUpdateWithResponse(resourceGroupName, fleetName, managedNamespaceName, + resource, ifMatch, ifNoneMatch); + return this.client.<FleetManagedNamespaceInner, FleetManagedNamespaceInner>getLroResult(response, + FleetManagedNamespaceInner.class, FleetManagedNamespaceInner.class, Context.NONE); + } + + /** + * Create a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<FleetManagedNamespaceInner>, FleetManagedNamespaceInner> beginCreateOrUpdate( + String resourceGroupName, String fleetName, String managedNamespaceName, FleetManagedNamespaceInner resource) { + final String ifMatch = null; + final String ifNoneMatch = null; + Response<BinaryData> response = createOrUpdateWithResponse(resourceGroupName, fleetName, managedNamespaceName, + resource, ifMatch, ifNoneMatch); + return this.client.<FleetManagedNamespaceInner, FleetManagedNamespaceInner>getLroResult(response, + FleetManagedNamespaceInner.class, FleetManagedNamespaceInner.class, Context.NONE); + } + + /** + * Create a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param resource Resource create parameters. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<FleetManagedNamespaceInner>, FleetManagedNamespaceInner> beginCreateOrUpdate( + String resourceGroupName, String fleetName, String managedNamespaceName, FleetManagedNamespaceInner resource, + String ifMatch, String ifNoneMatch, Context context) { + Response<BinaryData> response = createOrUpdateWithResponse(resourceGroupName, fleetName, managedNamespaceName, + resource, ifMatch, ifNoneMatch, context); + return this.client.<FleetManagedNamespaceInner, FleetManagedNamespaceInner>getLroResult(response, + FleetManagedNamespaceInner.class, FleetManagedNamespaceInner.class, context); + } + + /** + * Create a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param resource Resource create parameters. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a fleet managed namespace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<FleetManagedNamespaceInner> createOrUpdateAsync(String resourceGroupName, String fleetName, + String managedNamespaceName, FleetManagedNamespaceInner resource, String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, fleetName, managedNamespaceName, resource, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 fleet managed namespace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<FleetManagedNamespaceInner> createOrUpdateAsync(String resourceGroupName, String fleetName, + String managedNamespaceName, FleetManagedNamespaceInner resource) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync(resourceGroupName, fleetName, managedNamespaceName, resource, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FleetManagedNamespaceInner createOrUpdate(String resourceGroupName, String fleetName, + String managedNamespaceName, FleetManagedNamespaceInner resource) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdate(resourceGroupName, fleetName, managedNamespaceName, resource, ifMatch, ifNoneMatch) + .getFinalResult(); + } + + /** + * Create a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param resource Resource create parameters. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FleetManagedNamespaceInner createOrUpdate(String resourceGroupName, String fleetName, + String managedNamespaceName, FleetManagedNamespaceInner resource, String ifMatch, String ifNoneMatch, + Context context) { + return beginCreateOrUpdate(resourceGroupName, fleetName, managedNamespaceName, resource, ifMatch, ifNoneMatch, + context).getFinalResult(); + } + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String fleetName, + String managedNamespaceName, String ifMatch) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, managedNamespaceName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String fleetName, + String managedNamespaceName, String ifMatch) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, managedNamespaceName, Context.NONE); + } + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String fleetName, + String managedNamespaceName, String ifMatch, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, managedNamespaceName, context); + } + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String fleetName, + String managedNamespaceName, String ifMatch) { + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, fleetName, managedNamespaceName, ifMatch); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String fleetName, + String managedNamespaceName) { + final String ifMatch = null; + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, fleetName, managedNamespaceName, ifMatch); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String fleetName, + String managedNamespaceName, String ifMatch) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, fleetName, managedNamespaceName, ifMatch); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String fleetName, + String managedNamespaceName) { + final String ifMatch = null; + Response<BinaryData> response = deleteWithResponse(resourceGroupName, fleetName, managedNamespaceName, ifMatch); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String fleetName, + String managedNamespaceName, String ifMatch, Context context) { + Response<BinaryData> response + = deleteWithResponse(resourceGroupName, fleetName, managedNamespaceName, ifMatch, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Void> deleteAsync(String resourceGroupName, String fleetName, String managedNamespaceName, + String ifMatch) { + return beginDeleteAsync(resourceGroupName, fleetName, managedNamespaceName, ifMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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<Void> deleteAsync(String resourceGroupName, String fleetName, String managedNamespaceName) { + final String ifMatch = null; + return beginDeleteAsync(resourceGroupName, fleetName, managedNamespaceName, ifMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 fleetName, String managedNamespaceName) { + final String ifMatch = null; + beginDelete(resourceGroupName, fleetName, managedNamespaceName, ifMatch).getFinalResult(); + } + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String fleetName, String managedNamespaceName, String ifMatch, + Context context) { + beginDelete(resourceGroupName, fleetName, managedNamespaceName, ifMatch, context).getFinalResult(); + } + + /** + * List FleetManagedNamespace resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetManagedNamespace list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<FleetManagedNamespaceInner>> listByFleetSinglePageAsync(String resourceGroupName, + String fleetName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context)) + .<PagedResponse<FleetManagedNamespaceInner>>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 FleetManagedNamespace resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetManagedNamespace list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<FleetManagedNamespaceInner> listByFleetAsync(String resourceGroupName, String fleetName) { + return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName), + nextLink -> listByFleetNextSinglePageAsync(nextLink)); + } + + /** + * List FleetManagedNamespace resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetManagedNamespace list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<FleetManagedNamespaceInner> listByFleetSinglePage(String resourceGroupName, + String fleetName) { + final String accept = "application/json"; + Response<FleetManagedNamespaceListResult> res + = service.listByFleetSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List FleetManagedNamespace resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetManagedNamespace list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<FleetManagedNamespaceInner> listByFleetSinglePage(String resourceGroupName, String fleetName, + Context context) { + final String accept = "application/json"; + Response<FleetManagedNamespaceListResult> res + = service.listByFleetSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List FleetManagedNamespace resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetManagedNamespace list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<FleetManagedNamespaceInner> listByFleet(String resourceGroupName, String fleetName) { + return new PagedIterable<>(() -> listByFleetSinglePage(resourceGroupName, fleetName), + nextLink -> listByFleetNextSinglePage(nextLink)); + } + + /** + * List FleetManagedNamespace resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetManagedNamespace list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<FleetManagedNamespaceInner> listByFleet(String resourceGroupName, String fleetName, + Context context) { + return new PagedIterable<>(() -> listByFleetSinglePage(resourceGroupName, fleetName, context), + nextLink -> listByFleetNextSinglePage(nextLink, context)); + } + + /** + * Update a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param properties The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a fleet managed namespace along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, String fleetName, + String managedNamespaceName, FleetManagedNamespacePatch properties, String ifMatch) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, managedNamespaceName, + contentType, accept, properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param properties The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a fleet managed namespace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String fleetName, + String managedNamespaceName, FleetManagedNamespacePatch properties, String ifMatch) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, managedNamespaceName, contentType, + accept, properties, Context.NONE); + } + + /** + * Update a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param properties The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a fleet managed namespace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateWithResponse(String resourceGroupName, String fleetName, + String managedNamespaceName, FleetManagedNamespacePatch properties, String ifMatch, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, managedNamespaceName, contentType, + accept, properties, context); + } + + /** + * Update a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param properties The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<FleetManagedNamespaceInner>, FleetManagedNamespaceInner> beginUpdateAsync( + String resourceGroupName, String fleetName, String managedNamespaceName, FleetManagedNamespacePatch properties, + String ifMatch) { + Mono<Response<Flux<ByteBuffer>>> mono + = updateWithResponseAsync(resourceGroupName, fleetName, managedNamespaceName, properties, ifMatch); + return this.client.<FleetManagedNamespaceInner, FleetManagedNamespaceInner>getLroResult(mono, + this.client.getHttpPipeline(), FleetManagedNamespaceInner.class, FleetManagedNamespaceInner.class, + this.client.getContext()); + } + + /** + * Update a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 the {@link PollerFlux} for polling of a fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<FleetManagedNamespaceInner>, FleetManagedNamespaceInner> beginUpdateAsync( + String resourceGroupName, String fleetName, String managedNamespaceName, + FleetManagedNamespacePatch properties) { + final String ifMatch = null; + Mono<Response<Flux<ByteBuffer>>> mono + = updateWithResponseAsync(resourceGroupName, fleetName, managedNamespaceName, properties, ifMatch); + return this.client.<FleetManagedNamespaceInner, FleetManagedNamespaceInner>getLroResult(mono, + this.client.getHttpPipeline(), FleetManagedNamespaceInner.class, FleetManagedNamespaceInner.class, + this.client.getContext()); + } + + /** + * Update a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param properties The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<FleetManagedNamespaceInner>, FleetManagedNamespaceInner> beginUpdate( + String resourceGroupName, String fleetName, String managedNamespaceName, FleetManagedNamespacePatch properties, + String ifMatch) { + Response<BinaryData> response + = updateWithResponse(resourceGroupName, fleetName, managedNamespaceName, properties, ifMatch); + return this.client.<FleetManagedNamespaceInner, FleetManagedNamespaceInner>getLroResult(response, + FleetManagedNamespaceInner.class, FleetManagedNamespaceInner.class, Context.NONE); + } + + /** + * Update a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 the {@link SyncPoller} for polling of a fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<FleetManagedNamespaceInner>, FleetManagedNamespaceInner> beginUpdate( + String resourceGroupName, String fleetName, String managedNamespaceName, + FleetManagedNamespacePatch properties) { + final String ifMatch = null; + Response<BinaryData> response + = updateWithResponse(resourceGroupName, fleetName, managedNamespaceName, properties, ifMatch); + return this.client.<FleetManagedNamespaceInner, FleetManagedNamespaceInner>getLroResult(response, + FleetManagedNamespaceInner.class, FleetManagedNamespaceInner.class, Context.NONE); + } + + /** + * Update a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param properties The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<FleetManagedNamespaceInner>, FleetManagedNamespaceInner> beginUpdate( + String resourceGroupName, String fleetName, String managedNamespaceName, FleetManagedNamespacePatch properties, + String ifMatch, Context context) { + Response<BinaryData> response + = updateWithResponse(resourceGroupName, fleetName, managedNamespaceName, properties, ifMatch, context); + return this.client.<FleetManagedNamespaceInner, FleetManagedNamespaceInner>getLroResult(response, + FleetManagedNamespaceInner.class, FleetManagedNamespaceInner.class, context); + } + + /** + * Update a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param properties The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a fleet managed namespace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<FleetManagedNamespaceInner> updateAsync(String resourceGroupName, String fleetName, + String managedNamespaceName, FleetManagedNamespacePatch properties, String ifMatch) { + return beginUpdateAsync(resourceGroupName, fleetName, managedNamespaceName, properties, ifMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 fleet managed namespace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<FleetManagedNamespaceInner> updateAsync(String resourceGroupName, String fleetName, + String managedNamespaceName, FleetManagedNamespacePatch properties) { + final String ifMatch = null; + return beginUpdateAsync(resourceGroupName, fleetName, managedNamespaceName, properties, ifMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FleetManagedNamespaceInner update(String resourceGroupName, String fleetName, String managedNamespaceName, + FleetManagedNamespacePatch properties) { + final String ifMatch = null; + return beginUpdate(resourceGroupName, fleetName, managedNamespaceName, properties, ifMatch).getFinalResult(); + } + + /** + * Update a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param properties The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a fleet managed namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FleetManagedNamespaceInner update(String resourceGroupName, String fleetName, String managedNamespaceName, + FleetManagedNamespacePatch properties, String ifMatch, Context context) { + return beginUpdate(resourceGroupName, fleetName, managedNamespaceName, properties, ifMatch, context) + .getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetManagedNamespace list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<FleetManagedNamespaceInner>> listByFleetNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByFleetNext(nextLink, this.client.getEndpoint(), accept, context)) + .<PagedResponse<FleetManagedNamespaceInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetManagedNamespace list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<FleetManagedNamespaceInner> listByFleetNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response<FleetManagedNamespaceListResult> res + = service.listByFleetNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetManagedNamespace list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<FleetManagedNamespaceInner> listByFleetNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response<FleetManagedNamespaceListResult> res + = service.listByFleetNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetManagedNamespacesImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetManagedNamespacesImpl.java new file mode 100644 index 000000000000..a9b9085b9ead --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetManagedNamespacesImpl.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient; +import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetManagedNamespaceInner; +import com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespace; +import com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespaces; + +public final class FleetManagedNamespacesImpl implements FleetManagedNamespaces { + private static final ClientLogger LOGGER = new ClientLogger(FleetManagedNamespacesImpl.class); + + private final FleetManagedNamespacesClient innerClient; + + private final com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager; + + public FleetManagedNamespacesImpl(FleetManagedNamespacesClient innerClient, + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response<FleetManagedNamespace> getWithResponse(String resourceGroupName, String fleetName, + String managedNamespaceName, Context context) { + Response<FleetManagedNamespaceInner> inner + = this.serviceClient().getWithResponse(resourceGroupName, fleetName, managedNamespaceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new FleetManagedNamespaceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public FleetManagedNamespace get(String resourceGroupName, String fleetName, String managedNamespaceName) { + FleetManagedNamespaceInner inner = this.serviceClient().get(resourceGroupName, fleetName, managedNamespaceName); + if (inner != null) { + return new FleetManagedNamespaceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String fleetName, String managedNamespaceName) { + this.serviceClient().delete(resourceGroupName, fleetName, managedNamespaceName); + } + + public void delete(String resourceGroupName, String fleetName, String managedNamespaceName, String ifMatch, + Context context) { + this.serviceClient().delete(resourceGroupName, fleetName, managedNamespaceName, ifMatch, context); + } + + public PagedIterable<FleetManagedNamespace> listByFleet(String resourceGroupName, String fleetName) { + PagedIterable<FleetManagedNamespaceInner> inner + = this.serviceClient().listByFleet(resourceGroupName, fleetName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetManagedNamespaceImpl(inner1, this.manager())); + } + + public PagedIterable<FleetManagedNamespace> listByFleet(String resourceGroupName, String fleetName, + Context context) { + PagedIterable<FleetManagedNamespaceInner> inner + = this.serviceClient().listByFleet(resourceGroupName, fleetName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetManagedNamespaceImpl(inner1, this.manager())); + } + + public FleetManagedNamespace getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String fleetName = ResourceManagerUtils.getValueFromIdByName(id, "fleets"); + if (fleetName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + } + String managedNamespaceName = ResourceManagerUtils.getValueFromIdByName(id, "managedNamespaces"); + if (managedNamespaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedNamespaces'.", id))); + } + return this.getWithResponse(resourceGroupName, fleetName, managedNamespaceName, Context.NONE).getValue(); + } + + public Response<FleetManagedNamespace> getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String fleetName = ResourceManagerUtils.getValueFromIdByName(id, "fleets"); + if (fleetName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + } + String managedNamespaceName = ResourceManagerUtils.getValueFromIdByName(id, "managedNamespaces"); + if (managedNamespaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedNamespaces'.", id))); + } + return this.getWithResponse(resourceGroupName, fleetName, managedNamespaceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String fleetName = ResourceManagerUtils.getValueFromIdByName(id, "fleets"); + if (fleetName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + } + String managedNamespaceName = ResourceManagerUtils.getValueFromIdByName(id, "managedNamespaces"); + if (managedNamespaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedNamespaces'.", id))); + } + String localIfMatch = null; + this.delete(resourceGroupName, fleetName, managedNamespaceName, localIfMatch, Context.NONE); + } + + public void deleteByIdWithResponse(String id, String ifMatch, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String fleetName = ResourceManagerUtils.getValueFromIdByName(id, "fleets"); + if (fleetName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + } + String managedNamespaceName = ResourceManagerUtils.getValueFromIdByName(id, "managedNamespaces"); + if (managedNamespaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedNamespaces'.", id))); + } + this.delete(resourceGroupName, fleetName, managedNamespaceName, ifMatch, context); + } + + private FleetManagedNamespacesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager() { + return this.serviceManager; + } + + public FleetManagedNamespaceImpl define(String name) { + return new FleetManagedNamespaceImpl(name, this.manager()); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetManagedNamespaceListResult.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetManagedNamespaceListResult.java new file mode 100644 index 000000000000..8382f486896e --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetManagedNamespaceListResult.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetManagedNamespaceInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a FleetManagedNamespace list operation. + */ +@Immutable +public final class FleetManagedNamespaceListResult implements JsonSerializable<FleetManagedNamespaceListResult> { + /* + * The FleetManagedNamespace items on this page + */ + private List<FleetManagedNamespaceInner> value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of FleetManagedNamespaceListResult class. + */ + private FleetManagedNamespaceListResult() { + } + + /** + * Get the value property: The FleetManagedNamespace items on this page. + * + * @return the value value. + */ + public List<FleetManagedNamespaceInner> value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FleetManagedNamespaceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FleetManagedNamespaceListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FleetManagedNamespaceListResult. + */ + public static FleetManagedNamespaceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FleetManagedNamespaceListResult deserializedFleetManagedNamespaceListResult + = new FleetManagedNamespaceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<FleetManagedNamespaceInner> value + = reader.readArray(reader1 -> FleetManagedNamespaceInner.fromJson(reader1)); + deserializedFleetManagedNamespaceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedFleetManagedNamespaceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFleetManagedNamespaceListResult; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AdoptionPolicy.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AdoptionPolicy.java new file mode 100644 index 000000000000..b9914a131908 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AdoptionPolicy.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Action if the Namespace with the same name already exists. + */ +public final class AdoptionPolicy extends ExpandableStringEnum<AdoptionPolicy> { + /** + * If the Namespace already exists, do not take over the existing Namespace to be managed by ARM. + */ + public static final AdoptionPolicy NEVER = fromString("Never"); + + /** + * If there is an identical Namespace, take over the existing Namespace to be managed by ARM. + */ + public static final AdoptionPolicy IF_IDENTICAL = fromString("IfIdentical"); + + /** + * Always take over the existing Namespace to be managed by ARM, even if it is not identical. + */ + public static final AdoptionPolicy ALWAYS = fromString("Always"); + + /** + * Creates a new instance of AdoptionPolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AdoptionPolicy() { + } + + /** + * Creates or finds a AdoptionPolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding AdoptionPolicy. + */ + public static AdoptionPolicy fromString(String name) { + return fromString(name, AdoptionPolicy.class); + } + + /** + * Gets known AdoptionPolicy values. + * + * @return known AdoptionPolicy values. + */ + public static Collection<AdoptionPolicy> values() { + return values(AdoptionPolicy.class); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Affinity.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Affinity.java new file mode 100644 index 000000000000..7623a11f3119 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Affinity.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Affinity is a group of cluster affinity scheduling rules. More to be added. + */ +@Fluent +public final class Affinity implements JsonSerializable<Affinity> { + /* + * ClusterAffinity contains cluster affinity scheduling rules for the selected resources. + */ + private ClusterAffinity clusterAffinity; + + /** + * Creates an instance of Affinity class. + */ + public Affinity() { + } + + /** + * Get the clusterAffinity property: ClusterAffinity contains cluster affinity scheduling rules for the selected + * resources. + * + * @return the clusterAffinity value. + */ + public ClusterAffinity clusterAffinity() { + return this.clusterAffinity; + } + + /** + * Set the clusterAffinity property: ClusterAffinity contains cluster affinity scheduling rules for the selected + * resources. + * + * @param clusterAffinity the clusterAffinity value to set. + * @return the Affinity object itself. + */ + public Affinity withClusterAffinity(ClusterAffinity clusterAffinity) { + this.clusterAffinity = clusterAffinity; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("clusterAffinity", this.clusterAffinity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Affinity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Affinity if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the Affinity. + */ + public static Affinity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Affinity deserializedAffinity = new Affinity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("clusterAffinity".equals(fieldName)) { + deserializedAffinity.clusterAffinity = ClusterAffinity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAffinity; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterAffinity.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterAffinity.java new file mode 100644 index 000000000000..2edd0cde415a --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterAffinity.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * ClusterAffinity contains cluster affinity scheduling rules for the selected resources. + */ +@Fluent +public final class ClusterAffinity implements JsonSerializable<ClusterAffinity> { + /* + * If the affinity requirements specified by this field are not met at scheduling time, the resource will not be + * scheduled onto the cluster. If the affinity requirements specified by this field cease to be met at some point + * after the placement (e.g. due to an update), the system may or may not try to eventually remove the resource from + * the cluster. + */ + private ClusterSelector requiredDuringSchedulingIgnoredDuringExecution; + + /** + * Creates an instance of ClusterAffinity class. + */ + public ClusterAffinity() { + } + + /** + * Get the requiredDuringSchedulingIgnoredDuringExecution property: If the affinity requirements specified by this + * field are not met at scheduling time, the resource will not be scheduled onto the cluster. If the affinity + * requirements specified by this field cease to be met at some point after the placement (e.g. due to an update), + * the system may or may not try to eventually remove the resource from the cluster. + * + * @return the requiredDuringSchedulingIgnoredDuringExecution value. + */ + public ClusterSelector requiredDuringSchedulingIgnoredDuringExecution() { + return this.requiredDuringSchedulingIgnoredDuringExecution; + } + + /** + * Set the requiredDuringSchedulingIgnoredDuringExecution property: If the affinity requirements specified by this + * field are not met at scheduling time, the resource will not be scheduled onto the cluster. If the affinity + * requirements specified by this field cease to be met at some point after the placement (e.g. due to an update), + * the system may or may not try to eventually remove the resource from the cluster. + * + * @param requiredDuringSchedulingIgnoredDuringExecution the requiredDuringSchedulingIgnoredDuringExecution value to + * set. + * @return the ClusterAffinity object itself. + */ + public ClusterAffinity withRequiredDuringSchedulingIgnoredDuringExecution( + ClusterSelector requiredDuringSchedulingIgnoredDuringExecution) { + this.requiredDuringSchedulingIgnoredDuringExecution = requiredDuringSchedulingIgnoredDuringExecution; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("requiredDuringSchedulingIgnoredDuringExecution", + this.requiredDuringSchedulingIgnoredDuringExecution); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterAffinity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterAffinity if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ClusterAffinity. + */ + public static ClusterAffinity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterAffinity deserializedClusterAffinity = new ClusterAffinity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("requiredDuringSchedulingIgnoredDuringExecution".equals(fieldName)) { + deserializedClusterAffinity.requiredDuringSchedulingIgnoredDuringExecution + = ClusterSelector.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterAffinity; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterResourcePlacementSpec.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterResourcePlacementSpec.java new file mode 100644 index 000000000000..2fcb4fb9542f --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterResourcePlacementSpec.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * ClusterResourcePlacementSpec defines the desired state of ClusterResourcePlacement. + */ +@Fluent +public final class ClusterResourcePlacementSpec implements JsonSerializable<ClusterResourcePlacementSpec> { + /* + * Policy defines how to select member clusters to place the selected resources. If unspecified, all the joined + * member clusters are selected. + */ + private PlacementPolicy policy; + + /** + * Creates an instance of ClusterResourcePlacementSpec class. + */ + public ClusterResourcePlacementSpec() { + } + + /** + * Get the policy property: Policy defines how to select member clusters to place the selected resources. If + * unspecified, all the joined member clusters are selected. + * + * @return the policy value. + */ + public PlacementPolicy policy() { + return this.policy; + } + + /** + * Set the policy property: Policy defines how to select member clusters to place the selected resources. If + * unspecified, all the joined member clusters are selected. + * + * @param policy the policy value to set. + * @return the ClusterResourcePlacementSpec object itself. + */ + public ClusterResourcePlacementSpec withPolicy(PlacementPolicy policy) { + this.policy = policy; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("policy", this.policy); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterResourcePlacementSpec from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterResourcePlacementSpec if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ClusterResourcePlacementSpec. + */ + public static ClusterResourcePlacementSpec fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterResourcePlacementSpec deserializedClusterResourcePlacementSpec = new ClusterResourcePlacementSpec(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("policy".equals(fieldName)) { + deserializedClusterResourcePlacementSpec.policy = PlacementPolicy.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterResourcePlacementSpec; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterSelector.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterSelector.java new file mode 100644 index 000000000000..5c12eb70870c --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterSelector.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * ClusterSelector. + */ +@Fluent +public final class ClusterSelector implements JsonSerializable<ClusterSelector> { + /* + * ClusterSelectorTerms is a list of cluster selector terms. The terms are `ORed`. + */ + private List<ClusterSelectorTerm> clusterSelectorTerms; + + /** + * Creates an instance of ClusterSelector class. + */ + public ClusterSelector() { + } + + /** + * Get the clusterSelectorTerms property: ClusterSelectorTerms is a list of cluster selector terms. The terms are + * `ORed`. + * + * @return the clusterSelectorTerms value. + */ + public List<ClusterSelectorTerm> clusterSelectorTerms() { + return this.clusterSelectorTerms; + } + + /** + * Set the clusterSelectorTerms property: ClusterSelectorTerms is a list of cluster selector terms. The terms are + * `ORed`. + * + * @param clusterSelectorTerms the clusterSelectorTerms value to set. + * @return the ClusterSelector object itself. + */ + public ClusterSelector withClusterSelectorTerms(List<ClusterSelectorTerm> clusterSelectorTerms) { + this.clusterSelectorTerms = clusterSelectorTerms; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("clusterSelectorTerms", this.clusterSelectorTerms, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterSelector from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterSelector if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ClusterSelector. + */ + public static ClusterSelector fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterSelector deserializedClusterSelector = new ClusterSelector(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("clusterSelectorTerms".equals(fieldName)) { + List<ClusterSelectorTerm> clusterSelectorTerms + = reader.readArray(reader1 -> ClusterSelectorTerm.fromJson(reader1)); + deserializedClusterSelector.clusterSelectorTerms = clusterSelectorTerms; + } else { + reader.skipChildren(); + } + } + + return deserializedClusterSelector; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterSelectorTerm.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterSelectorTerm.java new file mode 100644 index 000000000000..e9962a7e1923 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterSelectorTerm.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * ClusterSelectorTerm. + */ +@Fluent +public final class ClusterSelectorTerm implements JsonSerializable<ClusterSelectorTerm> { + /* + * LabelSelector is a label query over all the joined member clusters. Clusters matching the query are selected. If + * you specify both label and property selectors in the same term, the results are AND'd. + */ + private LabelSelector labelSelector; + + /* + * PropertySelector is a property query over all joined member clusters. Clusters matching the query are selected. + * If you specify both label and property selectors in the same term, the results are AND'd. At this moment, + * PropertySelector can only be used with `RequiredDuringSchedulingIgnoredDuringExecution` affinity terms. This + * field is beta-level; it is for the property-based scheduling feature and is only functional when a property + * provider is enabled in the deployment. + */ + private PropertySelector propertySelector; + + /** + * Creates an instance of ClusterSelectorTerm class. + */ + public ClusterSelectorTerm() { + } + + /** + * Get the labelSelector property: LabelSelector is a label query over all the joined member clusters. Clusters + * matching the query are selected. If you specify both label and property selectors in the same term, the results + * are AND'd. + * + * @return the labelSelector value. + */ + public LabelSelector labelSelector() { + return this.labelSelector; + } + + /** + * Set the labelSelector property: LabelSelector is a label query over all the joined member clusters. Clusters + * matching the query are selected. If you specify both label and property selectors in the same term, the results + * are AND'd. + * + * @param labelSelector the labelSelector value to set. + * @return the ClusterSelectorTerm object itself. + */ + public ClusterSelectorTerm withLabelSelector(LabelSelector labelSelector) { + this.labelSelector = labelSelector; + return this; + } + + /** + * Get the propertySelector property: PropertySelector is a property query over all joined member clusters. Clusters + * matching the query are selected. If you specify both label and property selectors in the same term, the results + * are AND'd. At this moment, PropertySelector can only be used with + * `RequiredDuringSchedulingIgnoredDuringExecution` affinity terms. This field is beta-level; it is for the + * property-based scheduling feature and is only functional when a property provider is enabled in the deployment. + * + * @return the propertySelector value. + */ + public PropertySelector propertySelector() { + return this.propertySelector; + } + + /** + * Set the propertySelector property: PropertySelector is a property query over all joined member clusters. Clusters + * matching the query are selected. If you specify both label and property selectors in the same term, the results + * are AND'd. At this moment, PropertySelector can only be used with + * `RequiredDuringSchedulingIgnoredDuringExecution` affinity terms. This field is beta-level; it is for the + * property-based scheduling feature and is only functional when a property provider is enabled in the deployment. + * + * @param propertySelector the propertySelector value to set. + * @return the ClusterSelectorTerm object itself. + */ + public ClusterSelectorTerm withPropertySelector(PropertySelector propertySelector) { + this.propertySelector = propertySelector; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("labelSelector", this.labelSelector); + jsonWriter.writeJsonField("propertySelector", this.propertySelector); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterSelectorTerm from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterSelectorTerm if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ClusterSelectorTerm. + */ + public static ClusterSelectorTerm fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterSelectorTerm deserializedClusterSelectorTerm = new ClusterSelectorTerm(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("labelSelector".equals(fieldName)) { + deserializedClusterSelectorTerm.labelSelector = LabelSelector.fromJson(reader); + } else if ("propertySelector".equals(fieldName)) { + deserializedClusterSelectorTerm.propertySelector = PropertySelector.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterSelectorTerm; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/DeletePolicy.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/DeletePolicy.java new file mode 100644 index 000000000000..ec8d10c073fc --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/DeletePolicy.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Delete options for the ARM managed namespace. + */ +public final class DeletePolicy extends ExpandableStringEnum<DeletePolicy> { + /** + * Delete the ARM resource but keep the Namespace. + */ + public static final DeletePolicy KEEP = fromString("Keep"); + + /** + * Delete both ARM resource and Namespace. + */ + public static final DeletePolicy DELETE = fromString("Delete"); + + /** + * Creates a new instance of DeletePolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeletePolicy() { + } + + /** + * Creates or finds a DeletePolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeletePolicy. + */ + public static DeletePolicy fromString(String name) { + return fromString(name, DeletePolicy.class); + } + + /** + * Gets known DeletePolicy values. + * + * @return known DeletePolicy values. + */ + public static Collection<DeletePolicy> values() { + return values(DeletePolicy.class); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespace.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespace.java new file mode 100644 index 000000000000..ac1beed83ef2 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespace.java @@ -0,0 +1,389 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetManagedNamespaceInner; +import java.util.Map; + +/** + * An immutable client-side representation of FleetManagedNamespace. + */ +public interface FleetManagedNamespace { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map<String, String> tags(); + + /** + * Gets the etag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + FleetManagedNamespaceProvisioningState provisioningState(); + + /** + * Gets the managedNamespaceProperties property: The namespace properties for the fleet managed namespace. + * + * @return the managedNamespaceProperties value. + */ + ManagedNamespaceProperties managedNamespaceProperties(); + + /** + * Gets the adoptionPolicy property: Action if the managed namespace with the same name already exists. Default is + * Never. + * + * @return the adoptionPolicy value. + */ + AdoptionPolicy adoptionPolicy(); + + /** + * Gets the deletePolicy property: Delete options of a fleet managed namespace. Default is Keep. + * + * @return the deletePolicy value. + */ + DeletePolicy deletePolicy(); + + /** + * Gets the propagationPolicy property: The profile of the propagation to create the namespace. + * + * @return the propagationPolicy value. + */ + PropagationPolicy propagationPolicy(); + + /** + * Gets the status property: Status information of the last operation for fleet managed namespace. + * + * @return the status value. + */ + FleetManagedNamespaceStatus status(); + + /** + * Gets the portalFqdn property: The Azure Portal FQDN of the Fleet hub. + * + * @return the portalFqdn value. + */ + String portalFqdn(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.containerservicefleet.fluent.models.FleetManagedNamespaceInner object. + * + * @return the inner object. + */ + FleetManagedNamespaceInner innerModel(); + + /** + * The entirety of the FleetManagedNamespace definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The FleetManagedNamespace definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the FleetManagedNamespace definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the FleetManagedNamespace definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the FleetManagedNamespace definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, fleetName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @return the next definition stage. + */ + WithCreate withExistingFleet(String resourceGroupName, String fleetName); + } + + /** + * The stage of the FleetManagedNamespace definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithManagedNamespaceProperties, + DefinitionStages.WithAdoptionPolicy, DefinitionStages.WithDeletePolicy, + DefinitionStages.WithPropagationPolicy, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { + /** + * Executes the create request. + * + * @return the created resource. + */ + FleetManagedNamespace create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + FleetManagedNamespace create(Context context); + } + + /** + * The stage of the FleetManagedNamespace definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map<String, String> tags); + } + + /** + * The stage of the FleetManagedNamespace definition allowing to specify managedNamespaceProperties. + */ + interface WithManagedNamespaceProperties { + /** + * Specifies the managedNamespaceProperties property: The namespace properties for the fleet managed + * namespace.. + * + * @param managedNamespaceProperties The namespace properties for the fleet managed namespace. + * @return the next definition stage. + */ + WithCreate withManagedNamespaceProperties(ManagedNamespaceProperties managedNamespaceProperties); + } + + /** + * The stage of the FleetManagedNamespace definition allowing to specify adoptionPolicy. + */ + interface WithAdoptionPolicy { + /** + * Specifies the adoptionPolicy property: Action if the managed namespace with the same name already exists. + * Default is Never.. + * + * @param adoptionPolicy Action if the managed namespace with the same name already exists. Default is + * Never. + * @return the next definition stage. + */ + WithCreate withAdoptionPolicy(AdoptionPolicy adoptionPolicy); + } + + /** + * The stage of the FleetManagedNamespace definition allowing to specify deletePolicy. + */ + interface WithDeletePolicy { + /** + * Specifies the deletePolicy property: Delete options of a fleet managed namespace. Default is Keep.. + * + * @param deletePolicy Delete options of a fleet managed namespace. Default is Keep. + * @return the next definition stage. + */ + WithCreate withDeletePolicy(DeletePolicy deletePolicy); + } + + /** + * The stage of the FleetManagedNamespace definition allowing to specify propagationPolicy. + */ + interface WithPropagationPolicy { + /** + * Specifies the propagationPolicy property: The profile of the propagation to create the namespace.. + * + * @param propagationPolicy The profile of the propagation to create the namespace. + * @return the next definition stage. + */ + WithCreate withPropagationPolicy(PropagationPolicy propagationPolicy); + } + + /** + * The stage of the FleetManagedNamespace definition allowing to specify ifMatch. + */ + interface WithIfMatch { + /** + * Specifies the ifMatch property: The request should only proceed if an entity matches this string.. + * + * @param ifMatch The request should only proceed if an entity matches this string. + * @return the next definition stage. + */ + WithCreate withIfMatch(String ifMatch); + } + + /** + * The stage of the FleetManagedNamespace definition allowing to specify ifNoneMatch. + */ + interface WithIfNoneMatch { + /** + * Specifies the ifNoneMatch property: The request should only proceed if no entity matches this string.. + * + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @return the next definition stage. + */ + WithCreate withIfNoneMatch(String ifNoneMatch); + } + } + + /** + * Begins update for the FleetManagedNamespace resource. + * + * @return the stage of resource update. + */ + FleetManagedNamespace.Update update(); + + /** + * The template for FleetManagedNamespace update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIfMatch { + /** + * Executes the update request. + * + * @return the updated resource. + */ + FleetManagedNamespace apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + FleetManagedNamespace apply(Context context); + } + + /** + * The FleetManagedNamespace update stages. + */ + interface UpdateStages { + /** + * The stage of the FleetManagedNamespace update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map<String, String> tags); + } + + /** + * The stage of the FleetManagedNamespace update allowing to specify ifMatch. + */ + interface WithIfMatch { + /** + * Specifies the ifMatch property: The request should only proceed if an entity matches this string.. + * + * @param ifMatch The request should only proceed if an entity matches this string. + * @return the next definition stage. + */ + Update withIfMatch(String ifMatch); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + FleetManagedNamespace refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + FleetManagedNamespace refresh(Context context); +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespacePatch.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespacePatch.java new file mode 100644 index 000000000000..59d6278dc2f0 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespacePatch.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The properties of a fleet managed namespace that can be patched. + */ +@Fluent +public final class FleetManagedNamespacePatch implements JsonSerializable<FleetManagedNamespacePatch> { + /* + * Resource tags. + */ + private Map<String, String> tags; + + /** + * Creates an instance of FleetManagedNamespacePatch class. + */ + public FleetManagedNamespacePatch() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map<String, String> tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the FleetManagedNamespacePatch object itself. + */ + public FleetManagedNamespacePatch withTags(Map<String, String> tags) { + this.tags = tags; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FleetManagedNamespacePatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FleetManagedNamespacePatch if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the FleetManagedNamespacePatch. + */ + public static FleetManagedNamespacePatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FleetManagedNamespacePatch deserializedFleetManagedNamespacePatch = new FleetManagedNamespacePatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFleetManagedNamespacePatch.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedFleetManagedNamespacePatch; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespaceProvisioningState.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespaceProvisioningState.java new file mode 100644 index 000000000000..24aafa81e6ce --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespaceProvisioningState.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The provisioning state of the fleet managed namespace resource. + */ +public final class FleetManagedNamespaceProvisioningState + extends ExpandableStringEnum<FleetManagedNamespaceProvisioningState> { + /** + * Resource has been created. + */ + public static final FleetManagedNamespaceProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Resource creation failed. + */ + public static final FleetManagedNamespaceProvisioningState FAILED = fromString("Failed"); + + /** + * Resource creation was canceled. + */ + public static final FleetManagedNamespaceProvisioningState CANCELED = fromString("Canceled"); + + /** + * The provisioning state of a fleet managed namespace being created. + */ + public static final FleetManagedNamespaceProvisioningState CREATING = fromString("Creating"); + + /** + * The provisioning state of a fleet managed namespace being updated. + */ + public static final FleetManagedNamespaceProvisioningState UPDATING = fromString("Updating"); + + /** + * The provisioning state of a fleet managed namespace being deleted. + */ + public static final FleetManagedNamespaceProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of FleetManagedNamespaceProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FleetManagedNamespaceProvisioningState() { + } + + /** + * Creates or finds a FleetManagedNamespaceProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding FleetManagedNamespaceProvisioningState. + */ + public static FleetManagedNamespaceProvisioningState fromString(String name) { + return fromString(name, FleetManagedNamespaceProvisioningState.class); + } + + /** + * Gets known FleetManagedNamespaceProvisioningState values. + * + * @return known FleetManagedNamespaceProvisioningState values. + */ + public static Collection<FleetManagedNamespaceProvisioningState> values() { + return values(FleetManagedNamespaceProvisioningState.class); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespaceStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespaceStatus.java new file mode 100644 index 000000000000..02fe3d36f2ef --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespaceStatus.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Status information for the fleet managed namespace. + */ +@Immutable +public final class FleetManagedNamespaceStatus implements JsonSerializable<FleetManagedNamespaceStatus> { + /* + * The last operation ID for the fleet managed namespace + */ + private String lastOperationId; + + /* + * The last operation error of the fleet managed namespace + */ + private ManagementError lastOperationError; + + /** + * Creates an instance of FleetManagedNamespaceStatus class. + */ + private FleetManagedNamespaceStatus() { + } + + /** + * Get the lastOperationId property: The last operation ID for the fleet managed namespace. + * + * @return the lastOperationId value. + */ + public String lastOperationId() { + return this.lastOperationId; + } + + /** + * Get the lastOperationError property: The last operation error of the fleet managed namespace. + * + * @return the lastOperationError value. + */ + public ManagementError lastOperationError() { + return this.lastOperationError; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FleetManagedNamespaceStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FleetManagedNamespaceStatus if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the FleetManagedNamespaceStatus. + */ + public static FleetManagedNamespaceStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FleetManagedNamespaceStatus deserializedFleetManagedNamespaceStatus = new FleetManagedNamespaceStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("lastOperationId".equals(fieldName)) { + deserializedFleetManagedNamespaceStatus.lastOperationId = reader.getString(); + } else if ("lastOperationError".equals(fieldName)) { + deserializedFleetManagedNamespaceStatus.lastOperationError = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFleetManagedNamespaceStatus; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespaces.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespaces.java new file mode 100644 index 000000000000..a4a8220f08e4 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespaces.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of FleetManagedNamespaces. + */ +public interface FleetManagedNamespaces { + /** + * Get a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 FleetManagedNamespace along with {@link Response}. + */ + Response<FleetManagedNamespace> getWithResponse(String resourceGroupName, String fleetName, + String managedNamespaceName, Context context); + + /** + * Get a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace 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 FleetManagedNamespace. + */ + FleetManagedNamespace get(String resourceGroupName, String fleetName, String managedNamespaceName); + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String fleetName, String managedNamespaceName); + + /** + * Delete a FleetManagedNamespace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param managedNamespaceName The name of the fleet managed namespace resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String fleetName, String managedNamespaceName, String ifMatch, + Context context); + + /** + * List FleetManagedNamespace resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet 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 FleetManagedNamespace list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<FleetManagedNamespace> listByFleet(String resourceGroupName, String fleetName); + + /** + * List FleetManagedNamespace resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet 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 FleetManagedNamespace list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<FleetManagedNamespace> listByFleet(String resourceGroupName, String fleetName, Context context); + + /** + * Get a FleetManagedNamespace. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a FleetManagedNamespace along with {@link Response}. + */ + FleetManagedNamespace getById(String id); + + /** + * Get a FleetManagedNamespace. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a FleetManagedNamespace along with {@link Response}. + */ + Response<FleetManagedNamespace> getByIdWithResponse(String id, Context context); + + /** + * Delete a FleetManagedNamespace. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a FleetManagedNamespace. + * + * @param id the resource ID. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, String ifMatch, Context context); + + /** + * Begins definition for a new FleetManagedNamespace resource. + * + * @param name resource name. + * @return the first stage of the new FleetManagedNamespace definition. + */ + FleetManagedNamespace.DefinitionStages.Blank define(String name); +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/LabelSelector.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/LabelSelector.java new file mode 100644 index 000000000000..dc0e4e594178 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/LabelSelector.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. + * An empty label selector matches all objects. A null label selector matches no objects. + */ +@Fluent +public final class LabelSelector implements JsonSerializable<LabelSelector> { + /* + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an + * element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only + * "value". The requirements are ANDed. + */ + private Map<String, String> matchLabels; + + /* + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + private List<LabelSelectorRequirement> matchExpressions; + + /** + * Creates an instance of LabelSelector class. + */ + public LabelSelector() { + } + + /** + * Get the matchLabels property: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the + * values array contains only "value". The requirements are ANDed. + * + * @return the matchLabels value. + */ + public Map<String, String> matchLabels() { + return this.matchLabels; + } + + /** + * Set the matchLabels property: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the + * values array contains only "value". The requirements are ANDed. + * + * @param matchLabels the matchLabels value to set. + * @return the LabelSelector object itself. + */ + public LabelSelector withMatchLabels(Map<String, String> matchLabels) { + this.matchLabels = matchLabels; + return this; + } + + /** + * Get the matchExpressions property: matchExpressions is a list of label selector requirements. The requirements + * are ANDed. + * + * @return the matchExpressions value. + */ + public List<LabelSelectorRequirement> matchExpressions() { + return this.matchExpressions; + } + + /** + * Set the matchExpressions property: matchExpressions is a list of label selector requirements. The requirements + * are ANDed. + * + * @param matchExpressions the matchExpressions value to set. + * @return the LabelSelector object itself. + */ + public LabelSelector withMatchExpressions(List<LabelSelectorRequirement> matchExpressions) { + this.matchExpressions = matchExpressions; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("matchLabels", this.matchLabels, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("matchExpressions", this.matchExpressions, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LabelSelector from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LabelSelector if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the LabelSelector. + */ + public static LabelSelector fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LabelSelector deserializedLabelSelector = new LabelSelector(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("matchLabels".equals(fieldName)) { + Map<String, String> matchLabels = reader.readMap(reader1 -> reader1.getString()); + deserializedLabelSelector.matchLabels = matchLabels; + } else if ("matchExpressions".equals(fieldName)) { + List<LabelSelectorRequirement> matchExpressions + = reader.readArray(reader1 -> LabelSelectorRequirement.fromJson(reader1)); + deserializedLabelSelector.matchExpressions = matchExpressions; + } else { + reader.skipChildren(); + } + } + + return deserializedLabelSelector; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/LabelSelectorOperator.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/LabelSelectorOperator.java new file mode 100644 index 000000000000..63fe025003d3 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/LabelSelectorOperator.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * A label selector operator is the set of operators that can be used in a selector requirement. + */ +public final class LabelSelectorOperator extends ExpandableStringEnum<LabelSelectorOperator> { + /** + * Label Selector Operator In. + */ + public static final LabelSelectorOperator IN = fromString("In"); + + /** + * Label Selector Operator NotIn. + */ + public static final LabelSelectorOperator NOT_IN = fromString("NotIn"); + + /** + * Label Selector Operator Exists. + */ + public static final LabelSelectorOperator EXISTS = fromString("Exists"); + + /** + * Label Selector Operator DoesNotExist. + */ + public static final LabelSelectorOperator DOES_NOT_EXIST = fromString("DoesNotExist"); + + /** + * Creates a new instance of LabelSelectorOperator value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LabelSelectorOperator() { + } + + /** + * Creates or finds a LabelSelectorOperator from its string representation. + * + * @param name a name to look for. + * @return the corresponding LabelSelectorOperator. + */ + public static LabelSelectorOperator fromString(String name) { + return fromString(name, LabelSelectorOperator.class); + } + + /** + * Gets known LabelSelectorOperator values. + * + * @return known LabelSelectorOperator values. + */ + public static Collection<LabelSelectorOperator> values() { + return values(LabelSelectorOperator.class); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/LabelSelectorRequirement.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/LabelSelectorRequirement.java new file mode 100644 index 000000000000..c54b9c17ff44 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/LabelSelectorRequirement.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A label selector requirement is a selector that contains values, a key, and an operator that relates the key and + * values. + */ +@Fluent +public final class LabelSelectorRequirement implements JsonSerializable<LabelSelectorRequirement> { + /* + * key is the label key that the selector applies to. + */ + private String key; + + /* + * operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and + * DoesNotExist. + */ + private LabelSelectorOperator operator; + + /* + * values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the + * operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + private List<String> values; + + /** + * Creates an instance of LabelSelectorRequirement class. + */ + public LabelSelectorRequirement() { + } + + /** + * Get the key property: key is the label key that the selector applies to. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: key is the label key that the selector applies to. + * + * @param key the key value to set. + * @return the LabelSelectorRequirement object itself. + */ + public LabelSelectorRequirement withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the operator property: operator represents a key's relationship to a set of values. Valid operators are In, + * NotIn, Exists and DoesNotExist. + * + * @return the operator value. + */ + public LabelSelectorOperator operator() { + return this.operator; + } + + /** + * Set the operator property: operator represents a key's relationship to a set of values. Valid operators are In, + * NotIn, Exists and DoesNotExist. + * + * @param operator the operator value to set. + * @return the LabelSelectorRequirement object itself. + */ + public LabelSelectorRequirement withOperator(LabelSelectorOperator operator) { + this.operator = operator; + return this; + } + + /** + * Get the values property: values is an array of string values. If the operator is In or NotIn, the values array + * must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is + * replaced during a strategic merge patch. + * + * @return the values value. + */ + public List<String> values() { + return this.values; + } + + /** + * Set the values property: values is an array of string values. If the operator is In or NotIn, the values array + * must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is + * replaced during a strategic merge patch. + * + * @param values the values value to set. + * @return the LabelSelectorRequirement object itself. + */ + public LabelSelectorRequirement withValues(List<String> values) { + this.values = values; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", this.key); + jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LabelSelectorRequirement from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LabelSelectorRequirement if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LabelSelectorRequirement. + */ + public static LabelSelectorRequirement fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LabelSelectorRequirement deserializedLabelSelectorRequirement = new LabelSelectorRequirement(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedLabelSelectorRequirement.key = reader.getString(); + } else if ("operator".equals(fieldName)) { + deserializedLabelSelectorRequirement.operator + = LabelSelectorOperator.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List<String> values = reader.readArray(reader1 -> reader1.getString()); + deserializedLabelSelectorRequirement.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedLabelSelectorRequirement; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedNamespaceProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedNamespaceProperties.java new file mode 100644 index 000000000000..a3a97f319da2 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedNamespaceProperties.java @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The namespace properties for the fleet managed namespace. + */ +@Fluent +public final class ManagedNamespaceProperties implements JsonSerializable<ManagedNamespaceProperties> { + /* + * The labels for the fleet managed namespace. + */ + private Map<String, String> labels; + + /* + * The annotations for the fleet managed namespace. + */ + private Map<String, String> annotations; + + /* + * The default resource quota for the fleet managed namespace. + */ + private ResourceQuota defaultResourceQuota; + + /* + * The default network policy for the fleet managed namespace. + */ + private NetworkPolicy defaultNetworkPolicy; + + /** + * Creates an instance of ManagedNamespaceProperties class. + */ + public ManagedNamespaceProperties() { + } + + /** + * Get the labels property: The labels for the fleet managed namespace. + * + * @return the labels value. + */ + public Map<String, String> labels() { + return this.labels; + } + + /** + * Set the labels property: The labels for the fleet managed namespace. + * + * @param labels the labels value to set. + * @return the ManagedNamespaceProperties object itself. + */ + public ManagedNamespaceProperties withLabels(Map<String, String> labels) { + this.labels = labels; + return this; + } + + /** + * Get the annotations property: The annotations for the fleet managed namespace. + * + * @return the annotations value. + */ + public Map<String, String> annotations() { + return this.annotations; + } + + /** + * Set the annotations property: The annotations for the fleet managed namespace. + * + * @param annotations the annotations value to set. + * @return the ManagedNamespaceProperties object itself. + */ + public ManagedNamespaceProperties withAnnotations(Map<String, String> annotations) { + this.annotations = annotations; + return this; + } + + /** + * Get the defaultResourceQuota property: The default resource quota for the fleet managed namespace. + * + * @return the defaultResourceQuota value. + */ + public ResourceQuota defaultResourceQuota() { + return this.defaultResourceQuota; + } + + /** + * Set the defaultResourceQuota property: The default resource quota for the fleet managed namespace. + * + * @param defaultResourceQuota the defaultResourceQuota value to set. + * @return the ManagedNamespaceProperties object itself. + */ + public ManagedNamespaceProperties withDefaultResourceQuota(ResourceQuota defaultResourceQuota) { + this.defaultResourceQuota = defaultResourceQuota; + return this; + } + + /** + * Get the defaultNetworkPolicy property: The default network policy for the fleet managed namespace. + * + * @return the defaultNetworkPolicy value. + */ + public NetworkPolicy defaultNetworkPolicy() { + return this.defaultNetworkPolicy; + } + + /** + * Set the defaultNetworkPolicy property: The default network policy for the fleet managed namespace. + * + * @param defaultNetworkPolicy the defaultNetworkPolicy value to set. + * @return the ManagedNamespaceProperties object itself. + */ + public ManagedNamespaceProperties withDefaultNetworkPolicy(NetworkPolicy defaultNetworkPolicy) { + this.defaultNetworkPolicy = defaultNetworkPolicy; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("labels", this.labels, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("annotations", this.annotations, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("defaultResourceQuota", this.defaultResourceQuota); + jsonWriter.writeJsonField("defaultNetworkPolicy", this.defaultNetworkPolicy); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedNamespaceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedNamespaceProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedNamespaceProperties. + */ + public static ManagedNamespaceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedNamespaceProperties deserializedManagedNamespaceProperties = new ManagedNamespaceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("labels".equals(fieldName)) { + Map<String, String> labels = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedNamespaceProperties.labels = labels; + } else if ("annotations".equals(fieldName)) { + Map<String, String> annotations = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedNamespaceProperties.annotations = annotations; + } else if ("defaultResourceQuota".equals(fieldName)) { + deserializedManagedNamespaceProperties.defaultResourceQuota = ResourceQuota.fromJson(reader); + } else if ("defaultNetworkPolicy".equals(fieldName)) { + deserializedManagedNamespaceProperties.defaultNetworkPolicy = NetworkPolicy.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedNamespaceProperties; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NetworkPolicy.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NetworkPolicy.java new file mode 100644 index 000000000000..4ef72b2a9741 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NetworkPolicy.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The network policy for the managed namespace. + */ +@Fluent +public final class NetworkPolicy implements JsonSerializable<NetworkPolicy> { + /* + * The ingress policy for the managed namespace. + */ + private PolicyRule ingress; + + /* + * The egress policy for the managed namespace. + */ + private PolicyRule egress; + + /** + * Creates an instance of NetworkPolicy class. + */ + public NetworkPolicy() { + } + + /** + * Get the ingress property: The ingress policy for the managed namespace. + * + * @return the ingress value. + */ + public PolicyRule ingress() { + return this.ingress; + } + + /** + * Set the ingress property: The ingress policy for the managed namespace. + * + * @param ingress the ingress value to set. + * @return the NetworkPolicy object itself. + */ + public NetworkPolicy withIngress(PolicyRule ingress) { + this.ingress = ingress; + return this; + } + + /** + * Get the egress property: The egress policy for the managed namespace. + * + * @return the egress value. + */ + public PolicyRule egress() { + return this.egress; + } + + /** + * Set the egress property: The egress policy for the managed namespace. + * + * @param egress the egress value to set. + * @return the NetworkPolicy object itself. + */ + public NetworkPolicy withEgress(PolicyRule egress) { + this.egress = egress; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ingress", this.ingress == null ? null : this.ingress.toString()); + jsonWriter.writeStringField("egress", this.egress == null ? null : this.egress.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkPolicy if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkPolicy. + */ + public static NetworkPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkPolicy deserializedNetworkPolicy = new NetworkPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ingress".equals(fieldName)) { + deserializedNetworkPolicy.ingress = PolicyRule.fromString(reader.getString()); + } else if ("egress".equals(fieldName)) { + deserializedNetworkPolicy.egress = PolicyRule.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkPolicy; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PlacementPolicy.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PlacementPolicy.java new file mode 100644 index 000000000000..e6ebef3bb750 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PlacementPolicy.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * PlacementPolicy contains the rules to select target member clusters to place the selected resources. Note that only + * clusters that are both joined and satisfying the rules will be selected. You can only specify at most one of the two + * fields: ClusterNames and Affinity. If none is specified, all the joined clusters are selected. + */ +@Fluent +public final class PlacementPolicy implements JsonSerializable<PlacementPolicy> { + /* + * Type of placement. Can be "PickAll", "PickN" or "PickFixed". Default is PickAll. + */ + private PlacementType placementType; + + /* + * ClusterNames contains a list of names of MemberCluster to place the selected resources. Only valid if the + * placement type is "PickFixed" + */ + private List<String> clusterNames; + + /* + * Affinity contains cluster affinity scheduling rules. Defines which member clusters to place the selected + * resources. Only valid if the placement type is "PickAll" or "PickN". + */ + private Affinity affinity; + + /* + * If specified, the ClusterResourcePlacement's Tolerations. Tolerations cannot be updated or deleted. This field is + * beta-level and is for the taints and tolerations feature. + */ + private List<Toleration> tolerations; + + /** + * Creates an instance of PlacementPolicy class. + */ + public PlacementPolicy() { + } + + /** + * Get the placementType property: Type of placement. Can be "PickAll", "PickN" or "PickFixed". Default is PickAll. + * + * @return the placementType value. + */ + public PlacementType placementType() { + return this.placementType; + } + + /** + * Set the placementType property: Type of placement. Can be "PickAll", "PickN" or "PickFixed". Default is PickAll. + * + * @param placementType the placementType value to set. + * @return the PlacementPolicy object itself. + */ + public PlacementPolicy withPlacementType(PlacementType placementType) { + this.placementType = placementType; + return this; + } + + /** + * Get the clusterNames property: ClusterNames contains a list of names of MemberCluster to place the selected + * resources. Only valid if the placement type is "PickFixed". + * + * @return the clusterNames value. + */ + public List<String> clusterNames() { + return this.clusterNames; + } + + /** + * Set the clusterNames property: ClusterNames contains a list of names of MemberCluster to place the selected + * resources. Only valid if the placement type is "PickFixed". + * + * @param clusterNames the clusterNames value to set. + * @return the PlacementPolicy object itself. + */ + public PlacementPolicy withClusterNames(List<String> clusterNames) { + this.clusterNames = clusterNames; + return this; + } + + /** + * Get the affinity property: Affinity contains cluster affinity scheduling rules. Defines which member clusters to + * place the selected resources. Only valid if the placement type is "PickAll" or "PickN". + * + * @return the affinity value. + */ + public Affinity affinity() { + return this.affinity; + } + + /** + * Set the affinity property: Affinity contains cluster affinity scheduling rules. Defines which member clusters to + * place the selected resources. Only valid if the placement type is "PickAll" or "PickN". + * + * @param affinity the affinity value to set. + * @return the PlacementPolicy object itself. + */ + public PlacementPolicy withAffinity(Affinity affinity) { + this.affinity = affinity; + return this; + } + + /** + * Get the tolerations property: If specified, the ClusterResourcePlacement's Tolerations. Tolerations cannot be + * updated or deleted. This field is beta-level and is for the taints and tolerations feature. + * + * @return the tolerations value. + */ + public List<Toleration> tolerations() { + return this.tolerations; + } + + /** + * Set the tolerations property: If specified, the ClusterResourcePlacement's Tolerations. Tolerations cannot be + * updated or deleted. This field is beta-level and is for the taints and tolerations feature. + * + * @param tolerations the tolerations value to set. + * @return the PlacementPolicy object itself. + */ + public PlacementPolicy withTolerations(List<Toleration> tolerations) { + this.tolerations = tolerations; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("placementType", this.placementType == null ? null : this.placementType.toString()); + jsonWriter.writeArrayField("clusterNames", this.clusterNames, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("affinity", this.affinity); + jsonWriter.writeArrayField("tolerations", this.tolerations, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlacementPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlacementPolicy if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PlacementPolicy. + */ + public static PlacementPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlacementPolicy deserializedPlacementPolicy = new PlacementPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("placementType".equals(fieldName)) { + deserializedPlacementPolicy.placementType = PlacementType.fromString(reader.getString()); + } else if ("clusterNames".equals(fieldName)) { + List<String> clusterNames = reader.readArray(reader1 -> reader1.getString()); + deserializedPlacementPolicy.clusterNames = clusterNames; + } else if ("affinity".equals(fieldName)) { + deserializedPlacementPolicy.affinity = Affinity.fromJson(reader); + } else if ("tolerations".equals(fieldName)) { + List<Toleration> tolerations = reader.readArray(reader1 -> Toleration.fromJson(reader1)); + deserializedPlacementPolicy.tolerations = tolerations; + } else { + reader.skipChildren(); + } + } + + return deserializedPlacementPolicy; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PlacementProfile.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PlacementProfile.java new file mode 100644 index 000000000000..89c57beb30a3 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PlacementProfile.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The configuration profile for default ClusterResourcePlacement for placement. + */ +@Fluent +public final class PlacementProfile implements JsonSerializable<PlacementProfile> { + /* + * The default ClusterResourcePlacement policy configuration. + */ + private ClusterResourcePlacementSpec defaultClusterResourcePlacement; + + /** + * Creates an instance of PlacementProfile class. + */ + public PlacementProfile() { + } + + /** + * Get the defaultClusterResourcePlacement property: The default ClusterResourcePlacement policy configuration. + * + * @return the defaultClusterResourcePlacement value. + */ + public ClusterResourcePlacementSpec defaultClusterResourcePlacement() { + return this.defaultClusterResourcePlacement; + } + + /** + * Set the defaultClusterResourcePlacement property: The default ClusterResourcePlacement policy configuration. + * + * @param defaultClusterResourcePlacement the defaultClusterResourcePlacement value to set. + * @return the PlacementProfile object itself. + */ + public PlacementProfile + withDefaultClusterResourcePlacement(ClusterResourcePlacementSpec defaultClusterResourcePlacement) { + this.defaultClusterResourcePlacement = defaultClusterResourcePlacement; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("defaultClusterResourcePlacement", this.defaultClusterResourcePlacement); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlacementProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlacementProfile if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PlacementProfile. + */ + public static PlacementProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlacementProfile deserializedPlacementProfile = new PlacementProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("defaultClusterResourcePlacement".equals(fieldName)) { + deserializedPlacementProfile.defaultClusterResourcePlacement + = ClusterResourcePlacementSpec.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPlacementProfile; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PlacementType.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PlacementType.java new file mode 100644 index 000000000000..fc20fa6890be --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PlacementType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * PlacementType identifies the type of placement. + */ +public final class PlacementType extends ExpandableStringEnum<PlacementType> { + /** + * PickAll picks all clusters that satisfy the rules. + */ + public static final PlacementType PICK_ALL = fromString("PickAll"); + + /** + * PickFixed picks a fixed set of clusters. + */ + public static final PlacementType PICK_FIXED = fromString("PickFixed"); + + /** + * Creates a new instance of PlacementType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PlacementType() { + } + + /** + * Creates or finds a PlacementType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PlacementType. + */ + public static PlacementType fromString(String name) { + return fromString(name, PlacementType.class); + } + + /** + * Gets known PlacementType values. + * + * @return known PlacementType values. + */ + public static Collection<PlacementType> values() { + return values(PlacementType.class); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PolicyRule.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PolicyRule.java new file mode 100644 index 000000000000..5792c1f9ef5f --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PolicyRule.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The possible values representing different network policy rules. + */ +public final class PolicyRule extends ExpandableStringEnum<PolicyRule> { + /** + * Allow all network traffic. + */ + public static final PolicyRule ALLOW_ALL = fromString("AllowAll"); + + /** + * Deny all network traffic. + */ + public static final PolicyRule DENY_ALL = fromString("DenyAll"); + + /** + * Allow traffic within the same namespace. + */ + public static final PolicyRule ALLOW_SAME_NAMESPACE = fromString("AllowSameNamespace"); + + /** + * Creates a new instance of PolicyRule value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PolicyRule() { + } + + /** + * Creates or finds a PolicyRule from its string representation. + * + * @param name a name to look for. + * @return the corresponding PolicyRule. + */ + public static PolicyRule fromString(String name) { + return fromString(name, PolicyRule.class); + } + + /** + * Gets known PolicyRule values. + * + * @return known PolicyRule values. + */ + public static Collection<PolicyRule> values() { + return values(PolicyRule.class); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropagationPolicy.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropagationPolicy.java new file mode 100644 index 000000000000..3f31032a2b9c --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropagationPolicy.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The propagation to be used for provisioning the namespace among the fleet. + */ +@Fluent +public final class PropagationPolicy implements JsonSerializable<PropagationPolicy> { + /* + * The type of the policy to be used. Default is Placement. + */ + private PropagationType type; + + /* + * The profile to be used for propagation via placement. + */ + private PlacementProfile placementProfile; + + /** + * Creates an instance of PropagationPolicy class. + */ + public PropagationPolicy() { + } + + /** + * Get the type property: The type of the policy to be used. Default is Placement. + * + * @return the type value. + */ + public PropagationType type() { + return this.type; + } + + /** + * Set the type property: The type of the policy to be used. Default is Placement. + * + * @param type the type value to set. + * @return the PropagationPolicy object itself. + */ + public PropagationPolicy withType(PropagationType type) { + this.type = type; + return this; + } + + /** + * Get the placementProfile property: The profile to be used for propagation via placement. + * + * @return the placementProfile value. + */ + public PlacementProfile placementProfile() { + return this.placementProfile; + } + + /** + * Set the placementProfile property: The profile to be used for propagation via placement. + * + * @param placementProfile the placementProfile value to set. + * @return the PropagationPolicy object itself. + */ + public PropagationPolicy withPlacementProfile(PlacementProfile placementProfile) { + this.placementProfile = placementProfile; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeJsonField("placementProfile", this.placementProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PropagationPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PropagationPolicy if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PropagationPolicy. + */ + public static PropagationPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PropagationPolicy deserializedPropagationPolicy = new PropagationPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedPropagationPolicy.type = PropagationType.fromString(reader.getString()); + } else if ("placementProfile".equals(fieldName)) { + deserializedPropagationPolicy.placementProfile = PlacementProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPropagationPolicy; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropagationType.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropagationType.java new file mode 100644 index 000000000000..5cde7616ca7d --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropagationType.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * How the namespace will be provisioned among the fleet members. + */ +public final class PropagationType extends ExpandableStringEnum<PropagationType> { + /** + * Using ClusterResourcePlacement. + */ + public static final PropagationType PLACEMENT = fromString("Placement"); + + /** + * Creates a new instance of PropagationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PropagationType() { + } + + /** + * Creates or finds a PropagationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PropagationType. + */ + public static PropagationType fromString(String name) { + return fromString(name, PropagationType.class); + } + + /** + * Gets known PropagationType values. + * + * @return known PropagationType values. + */ + public static Collection<PropagationType> values() { + return values(PropagationType.class); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropertySelector.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropertySelector.java new file mode 100644 index 000000000000..d776b05c532d --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropertySelector.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * PropertySelector helps user specify property requirements when picking clusters for resource placement. + */ +@Fluent +public final class PropertySelector implements JsonSerializable<PropertySelector> { + /* + * MatchExpressions is an array of PropertySelectorRequirements. The requirements are AND'd. + */ + private List<PropertySelectorRequirement> matchExpressions; + + /** + * Creates an instance of PropertySelector class. + */ + public PropertySelector() { + } + + /** + * Get the matchExpressions property: MatchExpressions is an array of PropertySelectorRequirements. The requirements + * are AND'd. + * + * @return the matchExpressions value. + */ + public List<PropertySelectorRequirement> matchExpressions() { + return this.matchExpressions; + } + + /** + * Set the matchExpressions property: MatchExpressions is an array of PropertySelectorRequirements. The requirements + * are AND'd. + * + * @param matchExpressions the matchExpressions value to set. + * @return the PropertySelector object itself. + */ + public PropertySelector withMatchExpressions(List<PropertySelectorRequirement> matchExpressions) { + this.matchExpressions = matchExpressions; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("matchExpressions", this.matchExpressions, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PropertySelector from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PropertySelector if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PropertySelector. + */ + public static PropertySelector fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PropertySelector deserializedPropertySelector = new PropertySelector(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("matchExpressions".equals(fieldName)) { + List<PropertySelectorRequirement> matchExpressions + = reader.readArray(reader1 -> PropertySelectorRequirement.fromJson(reader1)); + deserializedPropertySelector.matchExpressions = matchExpressions; + } else { + reader.skipChildren(); + } + } + + return deserializedPropertySelector; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropertySelectorOperator.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropertySelectorOperator.java new file mode 100644 index 000000000000..bc71de811e8e --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropertySelectorOperator.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * PropertySelectorOperator is the operator that can be used with PropertySelectorRequirements. + */ +public final class PropertySelectorOperator extends ExpandableStringEnum<PropertySelectorOperator> { + /** + * Gt dictates Fleet to select cluster if its observed value of a given property is greater than the value specified + * in the requirement. + */ + public static final PropertySelectorOperator GT = fromString("Gt"); + + /** + * Ge dictates Fleet to select cluster if its observed value of a given property is greater than or equal to the + * value specified in the requirement. + */ + public static final PropertySelectorOperator GE = fromString("Ge"); + + /** + * Eq dictates Fleet to select cluster if its observed value of a given property is equal to the values specified in + * the requirement. + */ + public static final PropertySelectorOperator EQ = fromString("Eq"); + + /** + * Ne dictates Fleet to select cluster if its observed value of a given property is not equal to the values + * specified in the requirement. + */ + public static final PropertySelectorOperator NE = fromString("Ne"); + + /** + * Lt dictates Fleet to select cluster if its observed value of a given property is less than the value specified in + * the requirement. + */ + public static final PropertySelectorOperator LT = fromString("Lt"); + + /** + * Le dictates Fleet to select cluster if its observed value of a given property is less than or equal to the value + * specified in the requirement. + */ + public static final PropertySelectorOperator LE = fromString("Le"); + + /** + * Creates a new instance of PropertySelectorOperator value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PropertySelectorOperator() { + } + + /** + * Creates or finds a PropertySelectorOperator from its string representation. + * + * @param name a name to look for. + * @return the corresponding PropertySelectorOperator. + */ + public static PropertySelectorOperator fromString(String name) { + return fromString(name, PropertySelectorOperator.class); + } + + /** + * Gets known PropertySelectorOperator values. + * + * @return known PropertySelectorOperator values. + */ + public static Collection<PropertySelectorOperator> values() { + return values(PropertySelectorOperator.class); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropertySelectorRequirement.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropertySelectorRequirement.java new file mode 100644 index 000000000000..abc153c68b89 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropertySelectorRequirement.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * PropertySelectorRequirement is a specific property requirement when picking clusters for resource placement. + */ +@Fluent +public final class PropertySelectorRequirement implements JsonSerializable<PropertySelectorRequirement> { + /* + * Name is the name of the property; it should be a Kubernetes label name. + */ + private String name; + + /* + * Operator specifies the relationship between a cluster's observed value of the specified property and the values + * given in the requirement. + */ + private PropertySelectorOperator operator; + + /* + * Values are a list of values of the specified property which Fleet will compare against the observed values of + * individual member clusters in accordance with the given operator. At this moment, each value should be a + * Kubernetes quantity. For more information, see https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity. + * If the operator is Gt (greater than), Ge (greater than or equal to), Lt (less than), or `Le` (less than or equal + * to), Eq (equal to), or Ne (ne), exactly one value must be specified in the list. + */ + private List<String> values; + + /** + * Creates an instance of PropertySelectorRequirement class. + */ + public PropertySelectorRequirement() { + } + + /** + * Get the name property: Name is the name of the property; it should be a Kubernetes label name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name is the name of the property; it should be a Kubernetes label name. + * + * @param name the name value to set. + * @return the PropertySelectorRequirement object itself. + */ + public PropertySelectorRequirement withName(String name) { + this.name = name; + return this; + } + + /** + * Get the operator property: Operator specifies the relationship between a cluster's observed value of the + * specified property and the values given in the requirement. + * + * @return the operator value. + */ + public PropertySelectorOperator operator() { + return this.operator; + } + + /** + * Set the operator property: Operator specifies the relationship between a cluster's observed value of the + * specified property and the values given in the requirement. + * + * @param operator the operator value to set. + * @return the PropertySelectorRequirement object itself. + */ + public PropertySelectorRequirement withOperator(PropertySelectorOperator operator) { + this.operator = operator; + return this; + } + + /** + * Get the values property: Values are a list of values of the specified property which Fleet will compare against + * the observed values of individual member clusters in accordance with the given operator. At this moment, each + * value should be a Kubernetes quantity. For more information, see + * https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity. If the operator is Gt (greater than), Ge + * (greater than or equal to), Lt (less than), or `Le` (less than or equal to), Eq (equal to), or Ne (ne), exactly + * one value must be specified in the list. + * + * @return the values value. + */ + public List<String> values() { + return this.values; + } + + /** + * Set the values property: Values are a list of values of the specified property which Fleet will compare against + * the observed values of individual member clusters in accordance with the given operator. At this moment, each + * value should be a Kubernetes quantity. For more information, see + * https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity. If the operator is Gt (greater than), Ge + * (greater than or equal to), Lt (less than), or `Le` (less than or equal to), Eq (equal to), or Ne (ne), exactly + * one value must be specified in the list. + * + * @param values the values value to set. + * @return the PropertySelectorRequirement object itself. + */ + public PropertySelectorRequirement withValues(List<String> values) { + this.values = values; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PropertySelectorRequirement from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PropertySelectorRequirement if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PropertySelectorRequirement. + */ + public static PropertySelectorRequirement fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PropertySelectorRequirement deserializedPropertySelectorRequirement = new PropertySelectorRequirement(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedPropertySelectorRequirement.name = reader.getString(); + } else if ("operator".equals(fieldName)) { + deserializedPropertySelectorRequirement.operator + = PropertySelectorOperator.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List<String> values = reader.readArray(reader1 -> reader1.getString()); + deserializedPropertySelectorRequirement.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedPropertySelectorRequirement; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ResourceQuota.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ResourceQuota.java new file mode 100644 index 000000000000..34df14d55ec4 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ResourceQuota.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The resource quota for the managed namespace. + */ +@Fluent +public final class ResourceQuota implements JsonSerializable<ResourceQuota> { + /* + * The CPU request for the managed namespace. See more at + * https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu + */ + private String cpuRequest; + + /* + * The CPU limit for the managed namespace. See more at + * https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu + */ + private String cpuLimit; + + /* + * The memory request for the managed namespace. See more at + * https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory + */ + private String memoryRequest; + + /* + * The memory limit for the managed namespace. See more at + * https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory + */ + private String memoryLimit; + + /** + * Creates an instance of ResourceQuota class. + */ + public ResourceQuota() { + } + + /** + * Get the cpuRequest property: The CPU request for the managed namespace. See more at + * https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu. + * + * @return the cpuRequest value. + */ + public String cpuRequest() { + return this.cpuRequest; + } + + /** + * Set the cpuRequest property: The CPU request for the managed namespace. See more at + * https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu. + * + * @param cpuRequest the cpuRequest value to set. + * @return the ResourceQuota object itself. + */ + public ResourceQuota withCpuRequest(String cpuRequest) { + this.cpuRequest = cpuRequest; + return this; + } + + /** + * Get the cpuLimit property: The CPU limit for the managed namespace. See more at + * https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu. + * + * @return the cpuLimit value. + */ + public String cpuLimit() { + return this.cpuLimit; + } + + /** + * Set the cpuLimit property: The CPU limit for the managed namespace. See more at + * https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu. + * + * @param cpuLimit the cpuLimit value to set. + * @return the ResourceQuota object itself. + */ + public ResourceQuota withCpuLimit(String cpuLimit) { + this.cpuLimit = cpuLimit; + return this; + } + + /** + * Get the memoryRequest property: The memory request for the managed namespace. See more at + * https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory. + * + * @return the memoryRequest value. + */ + public String memoryRequest() { + return this.memoryRequest; + } + + /** + * Set the memoryRequest property: The memory request for the managed namespace. See more at + * https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory. + * + * @param memoryRequest the memoryRequest value to set. + * @return the ResourceQuota object itself. + */ + public ResourceQuota withMemoryRequest(String memoryRequest) { + this.memoryRequest = memoryRequest; + return this; + } + + /** + * Get the memoryLimit property: The memory limit for the managed namespace. See more at + * https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory. + * + * @return the memoryLimit value. + */ + public String memoryLimit() { + return this.memoryLimit; + } + + /** + * Set the memoryLimit property: The memory limit for the managed namespace. See more at + * https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory. + * + * @param memoryLimit the memoryLimit value to set. + * @return the ResourceQuota object itself. + */ + public ResourceQuota withMemoryLimit(String memoryLimit) { + this.memoryLimit = memoryLimit; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("cpuRequest", this.cpuRequest); + jsonWriter.writeStringField("cpuLimit", this.cpuLimit); + jsonWriter.writeStringField("memoryRequest", this.memoryRequest); + jsonWriter.writeStringField("memoryLimit", this.memoryLimit); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceQuota from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceQuota if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceQuota. + */ + public static ResourceQuota fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceQuota deserializedResourceQuota = new ResourceQuota(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("cpuRequest".equals(fieldName)) { + deserializedResourceQuota.cpuRequest = reader.getString(); + } else if ("cpuLimit".equals(fieldName)) { + deserializedResourceQuota.cpuLimit = reader.getString(); + } else if ("memoryRequest".equals(fieldName)) { + deserializedResourceQuota.memoryRequest = reader.getString(); + } else if ("memoryLimit".equals(fieldName)) { + deserializedResourceQuota.memoryLimit = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceQuota; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/TaintEffect.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/TaintEffect.java new file mode 100644 index 000000000000..323c7e63da86 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/TaintEffect.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * TaintEffect. + */ +public final class TaintEffect extends ExpandableStringEnum<TaintEffect> { + /** + * Do not allow new pods to schedule onto the node unless they tolerate the taint, but allow all pods submitted to + * Kubelet without going through the scheduler to start, and allow all already-running pods to continue running. + * Enforced by the scheduler. + */ + public static final TaintEffect NO_SCHEDULE = fromString("NoSchedule"); + + /** + * Creates a new instance of TaintEffect value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TaintEffect() { + } + + /** + * Creates or finds a TaintEffect from its string representation. + * + * @param name a name to look for. + * @return the corresponding TaintEffect. + */ + public static TaintEffect fromString(String name) { + return fromString(name, TaintEffect.class); + } + + /** + * Gets known TaintEffect values. + * + * @return known TaintEffect values. + */ + public static Collection<TaintEffect> values() { + return values(TaintEffect.class); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Toleration.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Toleration.java new file mode 100644 index 000000000000..bc590acacc27 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Toleration.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Toleration allows ClusterResourcePlacement to tolerate any taint that matches the triple <key,value,effect> + * using the matching operator <operator>. + */ +@Fluent +public final class Toleration implements JsonSerializable<Toleration> { + /* + * Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, + * operator must be Exists; this combination means to match all values and all keys. + */ + private String key; + + /* + * Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. + * Exists is equivalent to wildcard for value, so that a ClusterResourcePlacement can tolerate all taints of a + * particular category. + */ + private TolerationOperator operator; + + /* + * Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, + * otherwise just a regular string. + */ + private String value; + + /* + * Effect indicates the taint effect to match. Empty means match all taint effects. When specified, only allowed + * value is NoSchedule. + */ + private TaintEffect effect; + + /** + * Creates an instance of Toleration class. + */ + public Toleration() { + } + + /** + * Get the key property: Key is the taint key that the toleration applies to. Empty means match all taint keys. If + * the key is empty, operator must be Exists; this combination means to match all values and all keys. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: Key is the taint key that the toleration applies to. Empty means match all taint keys. If + * the key is empty, operator must be Exists; this combination means to match all values and all keys. + * + * @param key the key value to set. + * @return the Toleration object itself. + */ + public Toleration withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the operator property: Operator represents a key's relationship to the value. Valid operators are Exists and + * Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a ClusterResourcePlacement can + * tolerate all taints of a particular category. + * + * @return the operator value. + */ + public TolerationOperator operator() { + return this.operator; + } + + /** + * Set the operator property: Operator represents a key's relationship to the value. Valid operators are Exists and + * Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a ClusterResourcePlacement can + * tolerate all taints of a particular category. + * + * @param operator the operator value to set. + * @return the Toleration object itself. + */ + public Toleration withOperator(TolerationOperator operator) { + this.operator = operator; + return this; + } + + /** + * Get the value property: Value is the taint value the toleration matches to. If the operator is Exists, the value + * should be empty, otherwise just a regular string. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Value is the taint value the toleration matches to. If the operator is Exists, the value + * should be empty, otherwise just a regular string. + * + * @param value the value value to set. + * @return the Toleration object itself. + */ + public Toleration withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the effect property: Effect indicates the taint effect to match. Empty means match all taint effects. When + * specified, only allowed value is NoSchedule. + * + * @return the effect value. + */ + public TaintEffect effect() { + return this.effect; + } + + /** + * Set the effect property: Effect indicates the taint effect to match. Empty means match all taint effects. When + * specified, only allowed value is NoSchedule. + * + * @param effect the effect value to set. + * @return the Toleration object itself. + */ + public Toleration withEffect(TaintEffect effect) { + this.effect = effect; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", this.key); + jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("value", this.value); + jsonWriter.writeStringField("effect", this.effect == null ? null : this.effect.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Toleration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Toleration if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the Toleration. + */ + public static Toleration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Toleration deserializedToleration = new Toleration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedToleration.key = reader.getString(); + } else if ("operator".equals(fieldName)) { + deserializedToleration.operator = TolerationOperator.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedToleration.value = reader.getString(); + } else if ("effect".equals(fieldName)) { + deserializedToleration.effect = TaintEffect.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedToleration; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/TolerationOperator.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/TolerationOperator.java new file mode 100644 index 000000000000..2e8e03782f83 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/TolerationOperator.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * A toleration operator is the set of operators that can be used in a toleration. + */ +public final class TolerationOperator extends ExpandableStringEnum<TolerationOperator> { + /** + * Toleration Operator Exists. + */ + public static final TolerationOperator EXISTS = fromString("Exists"); + + /** + * Toleration Operator Equal. + */ + public static final TolerationOperator EQUAL = fromString("Equal"); + + /** + * Creates a new instance of TolerationOperator value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TolerationOperator() { + } + + /** + * Creates or finds a TolerationOperator from its string representation. + * + * @param name a name to look for. + * @return the corresponding TolerationOperator. + */ + public static TolerationOperator fromString(String name) { + return fromString(name, TolerationOperator.class); + } + + /** + * Gets known TolerationOperator values. + * + * @return known TolerationOperator values. + */ + public static Collection<TolerationOperator> values() { + return values(TolerationOperator.class); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/azure-resourcemanager-containerservicefleet_apiview_properties.json b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/azure-resourcemanager-containerservicefleet_apiview_properties.json index 406fa1fcdb9f..bf6b76d51cd4 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/azure-resourcemanager-containerservicefleet_apiview_properties.json +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/azure-resourcemanager-containerservicefleet_apiview_properties.json @@ -13,6 +13,16 @@ "com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient.getWithResponse": "Microsoft.ContainerService.AutoUpgradeProfiles.get", "com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient.listByFleet": "Microsoft.ContainerService.AutoUpgradeProfiles.listByFleet", "com.azure.resourcemanager.containerservicefleet.fluent.ContainerServiceFleetManagementClient": "Microsoft.ContainerService", + "com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient": "Microsoft.ContainerService.FleetManagedNamespaces", + "com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.beginCreateOrUpdate": "Microsoft.ContainerService.FleetManagedNamespaces.createOrUpdate", + "com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.beginDelete": "Microsoft.ContainerService.FleetManagedNamespaces.delete", + "com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.beginUpdate": "Microsoft.ContainerService.FleetManagedNamespaces.update", + "com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.createOrUpdate": "Microsoft.ContainerService.FleetManagedNamespaces.createOrUpdate", + "com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.delete": "Microsoft.ContainerService.FleetManagedNamespaces.delete", + "com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.get": "Microsoft.ContainerService.FleetManagedNamespaces.get", + "com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.getWithResponse": "Microsoft.ContainerService.FleetManagedNamespaces.get", + "com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.listByFleet": "Microsoft.ContainerService.FleetManagedNamespaces.listByFleet", + "com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.update": "Microsoft.ContainerService.FleetManagedNamespaces.update", "com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient": "Microsoft.ContainerService.FleetMembers", "com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.beginCreate": "Microsoft.ContainerService.FleetMembers.create", "com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.beginDelete": "Microsoft.ContainerService.FleetMembers.delete", @@ -70,6 +80,8 @@ "com.azure.resourcemanager.containerservicefleet.fluent.models.AutoUpgradeProfileProperties": "Microsoft.ContainerService.AutoUpgradeProfileProperties", "com.azure.resourcemanager.containerservicefleet.fluent.models.FleetCredentialResultsInner": "Microsoft.ContainerService.FleetCredentialResults", "com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner": "Microsoft.ContainerService.Fleet", + "com.azure.resourcemanager.containerservicefleet.fluent.models.FleetManagedNamespaceInner": "Microsoft.ContainerService.FleetManagedNamespace", + "com.azure.resourcemanager.containerservicefleet.fluent.models.FleetManagedNamespaceProperties": "Microsoft.ContainerService.FleetManagedNamespaceProperties", "com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberInner": "Microsoft.ContainerService.FleetMember", "com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberProperties": "Microsoft.ContainerService.FleetMemberProperties", "com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", @@ -85,12 +97,15 @@ "com.azure.resourcemanager.containerservicefleet.implementation.ContainerServiceFleetManagementClientBuilder": "Microsoft.ContainerService", "com.azure.resourcemanager.containerservicefleet.implementation.models.AutoUpgradeProfileListResult": "Azure.ResourceManager.ResourceListResult", "com.azure.resourcemanager.containerservicefleet.implementation.models.FleetListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.containerservicefleet.implementation.models.FleetManagedNamespaceListResult": "Azure.ResourceManager.ResourceListResult", "com.azure.resourcemanager.containerservicefleet.implementation.models.FleetMemberListResult": "Azure.ResourceManager.ResourceListResult", "com.azure.resourcemanager.containerservicefleet.implementation.models.FleetUpdateStrategyListResult": "Azure.ResourceManager.ResourceListResult", "com.azure.resourcemanager.containerservicefleet.implementation.models.GateListResult": "Azure.ResourceManager.ResourceListResult", "com.azure.resourcemanager.containerservicefleet.implementation.models.OperationListResult": "Azure.ResourceManager.CommonTypes.OperationListResult", "com.azure.resourcemanager.containerservicefleet.implementation.models.UpdateRunListResult": "Azure.ResourceManager.ResourceListResult", "com.azure.resourcemanager.containerservicefleet.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType", + "com.azure.resourcemanager.containerservicefleet.models.AdoptionPolicy": "Microsoft.ContainerService.AdoptionPolicy", + "com.azure.resourcemanager.containerservicefleet.models.Affinity": "Placement.V1.Affinity", "com.azure.resourcemanager.containerservicefleet.models.AgentProfile": "Microsoft.ContainerService.AgentProfile", "com.azure.resourcemanager.containerservicefleet.models.ApiServerAccessProfile": "Microsoft.ContainerService.APIServerAccessProfile", "com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeLastTriggerStatus": "Microsoft.ContainerService.AutoUpgradeLastTriggerStatus", @@ -98,8 +113,16 @@ "com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeNodeImageSelectionType": "Microsoft.ContainerService.AutoUpgradeNodeImageSelectionType", "com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeProfileProvisioningState": "Microsoft.ContainerService.AutoUpgradeProfileProvisioningState", "com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeProfileStatus": "Microsoft.ContainerService.AutoUpgradeProfileStatus", + "com.azure.resourcemanager.containerservicefleet.models.ClusterAffinity": "Placement.V1.ClusterAffinity", + "com.azure.resourcemanager.containerservicefleet.models.ClusterResourcePlacementSpec": "Placement.V1.ClusterResourcePlacementSpec", + "com.azure.resourcemanager.containerservicefleet.models.ClusterSelector": "Placement.V1.ClusterSelector", + "com.azure.resourcemanager.containerservicefleet.models.ClusterSelectorTerm": "Placement.V1.ClusterSelectorTerm", + "com.azure.resourcemanager.containerservicefleet.models.DeletePolicy": "Microsoft.ContainerService.DeletePolicy", "com.azure.resourcemanager.containerservicefleet.models.FleetCredentialResult": "Microsoft.ContainerService.FleetCredentialResult", "com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile": "Microsoft.ContainerService.FleetHubProfile", + "com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespacePatch": "Microsoft.ContainerService.FleetManagedNamespacePatch", + "com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespaceProvisioningState": "Microsoft.ContainerService.FleetManagedNamespaceProvisioningState", + "com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespaceStatus": "Microsoft.ContainerService.FleetManagedNamespaceStatus", "com.azure.resourcemanager.containerservicefleet.models.FleetMemberProvisioningState": "Microsoft.ContainerService.FleetMemberProvisioningState", "com.azure.resourcemanager.containerservicefleet.models.FleetMemberStatus": "Microsoft.ContainerService.FleetMemberStatus", "com.azure.resourcemanager.containerservicefleet.models.FleetMemberUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", @@ -114,22 +137,40 @@ "com.azure.resourcemanager.containerservicefleet.models.GateState": "Microsoft.ContainerService.GateState", "com.azure.resourcemanager.containerservicefleet.models.GateTarget": "Microsoft.ContainerService.GateTarget", "com.azure.resourcemanager.containerservicefleet.models.GateType": "Microsoft.ContainerService.GateType", + "com.azure.resourcemanager.containerservicefleet.models.LabelSelector": "Meta.V1.LabelSelector", + "com.azure.resourcemanager.containerservicefleet.models.LabelSelectorOperator": "Meta.V1.LabelSelectorOperator", + "com.azure.resourcemanager.containerservicefleet.models.LabelSelectorRequirement": "Meta.V1.LabelSelectorRequirement", "com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate": "Microsoft.ContainerService.ManagedClusterUpdate", "com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeSpec": "Microsoft.ContainerService.ManagedClusterUpgradeSpec", "com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType": "Microsoft.ContainerService.ManagedClusterUpgradeType", + "com.azure.resourcemanager.containerservicefleet.models.ManagedNamespaceProperties": "Microsoft.ContainerService.ManagedNamespaceProperties", "com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentity": "Azure.ResourceManager.Legacy.ManagedServiceIdentityV4", "com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType": "Azure.ResourceManager.Legacy.ManagedServiceIdentityType", "com.azure.resourcemanager.containerservicefleet.models.MemberUpdateStatus": "Microsoft.ContainerService.MemberUpdateStatus", + "com.azure.resourcemanager.containerservicefleet.models.NetworkPolicy": "Microsoft.ContainerService.NetworkPolicy", "com.azure.resourcemanager.containerservicefleet.models.NodeImageSelection": "Microsoft.ContainerService.NodeImageSelection", "com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionStatus": "Microsoft.ContainerService.NodeImageSelectionStatus", "com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType": "Microsoft.ContainerService.NodeImageSelectionType", "com.azure.resourcemanager.containerservicefleet.models.NodeImageVersion": "Microsoft.ContainerService.NodeImageVersion", "com.azure.resourcemanager.containerservicefleet.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay", "com.azure.resourcemanager.containerservicefleet.models.Origin": "Azure.ResourceManager.CommonTypes.Origin", + "com.azure.resourcemanager.containerservicefleet.models.PlacementPolicy": "Placement.V1.PlacementPolicy", + "com.azure.resourcemanager.containerservicefleet.models.PlacementProfile": "Microsoft.ContainerService.PlacementProfile", + "com.azure.resourcemanager.containerservicefleet.models.PlacementType": "Placement.V1.PlacementType", + "com.azure.resourcemanager.containerservicefleet.models.PolicyRule": "Microsoft.ContainerService.PolicyRule", + "com.azure.resourcemanager.containerservicefleet.models.PropagationPolicy": "Microsoft.ContainerService.PropagationPolicy", + "com.azure.resourcemanager.containerservicefleet.models.PropagationType": "Microsoft.ContainerService.PropagationType", + "com.azure.resourcemanager.containerservicefleet.models.PropertySelector": "Placement.V1.PropertySelector", + "com.azure.resourcemanager.containerservicefleet.models.PropertySelectorOperator": "Placement.V1.PropertySelectorOperator", + "com.azure.resourcemanager.containerservicefleet.models.PropertySelectorRequirement": "Placement.V1.PropertySelectorRequirement", + "com.azure.resourcemanager.containerservicefleet.models.ResourceQuota": "Microsoft.ContainerService.ResourceQuota", "com.azure.resourcemanager.containerservicefleet.models.SkipProperties": "Microsoft.ContainerService.SkipProperties", "com.azure.resourcemanager.containerservicefleet.models.SkipTarget": "Microsoft.ContainerService.SkipTarget", + "com.azure.resourcemanager.containerservicefleet.models.TaintEffect": "Core.V1.TaintEffect", "com.azure.resourcemanager.containerservicefleet.models.TargetType": "Microsoft.ContainerService.TargetType", "com.azure.resourcemanager.containerservicefleet.models.Timing": "Microsoft.ContainerService.Timing", + "com.azure.resourcemanager.containerservicefleet.models.Toleration": "Placement.V1.Toleration", + "com.azure.resourcemanager.containerservicefleet.models.TolerationOperator": "Core.V1.TolerationOperator", "com.azure.resourcemanager.containerservicefleet.models.UpdateGroup": "Microsoft.ContainerService.UpdateGroup", "com.azure.resourcemanager.containerservicefleet.models.UpdateGroupStatus": "Microsoft.ContainerService.UpdateGroupStatus", "com.azure.resourcemanager.containerservicefleet.models.UpdateRunGateStatus": "Microsoft.ContainerService.UpdateRunGateStatus", diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/azure-resourcemanager-containerservicefleet_metadata.json b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/azure-resourcemanager-containerservicefleet_metadata.json index 2febbab01bc6..bc5e437a199f 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/azure-resourcemanager-containerservicefleet_metadata.json +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/azure-resourcemanager-containerservicefleet_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersion":"2025-04-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfileOperationsClient":"Microsoft.ContainerService.AutoUpgradeProfileOperations","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfileOperationsClient.beginGenerateUpdateRun":"Microsoft.ContainerService.AutoUpgradeProfileOperations.generateUpdateRun","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfileOperationsClient.generateUpdateRun":"Microsoft.ContainerService.AutoUpgradeProfileOperations.generateUpdateRun","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient":"Microsoft.ContainerService.AutoUpgradeProfiles","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient.beginCreateOrUpdate":"Microsoft.ContainerService.AutoUpgradeProfiles.createOrUpdate","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient.beginDelete":"Microsoft.ContainerService.AutoUpgradeProfiles.delete","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient.createOrUpdate":"Microsoft.ContainerService.AutoUpgradeProfiles.createOrUpdate","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient.delete":"Microsoft.ContainerService.AutoUpgradeProfiles.delete","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient.get":"Microsoft.ContainerService.AutoUpgradeProfiles.get","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient.getWithResponse":"Microsoft.ContainerService.AutoUpgradeProfiles.get","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient.listByFleet":"Microsoft.ContainerService.AutoUpgradeProfiles.listByFleet","com.azure.resourcemanager.containerservicefleet.fluent.ContainerServiceFleetManagementClient":"Microsoft.ContainerService","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient":"Microsoft.ContainerService.FleetMembers","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.beginCreate":"Microsoft.ContainerService.FleetMembers.create","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.beginDelete":"Microsoft.ContainerService.FleetMembers.delete","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.beginUpdateAsync":"Microsoft.ContainerService.FleetMembers.updateAsync","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.create":"Microsoft.ContainerService.FleetMembers.create","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.delete":"Microsoft.ContainerService.FleetMembers.delete","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.get":"Microsoft.ContainerService.FleetMembers.get","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.getWithResponse":"Microsoft.ContainerService.FleetMembers.get","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.listByFleet":"Microsoft.ContainerService.FleetMembers.listByFleet","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.updateAsync":"Microsoft.ContainerService.FleetMembers.updateAsync","com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient":"Microsoft.ContainerService.FleetUpdateStrategies","com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient.beginCreateOrUpdate":"Microsoft.ContainerService.FleetUpdateStrategies.createOrUpdate","com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient.beginDelete":"Microsoft.ContainerService.FleetUpdateStrategies.delete","com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient.createOrUpdate":"Microsoft.ContainerService.FleetUpdateStrategies.createOrUpdate","com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient.delete":"Microsoft.ContainerService.FleetUpdateStrategies.delete","com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient.get":"Microsoft.ContainerService.FleetUpdateStrategies.get","com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient.getWithResponse":"Microsoft.ContainerService.FleetUpdateStrategies.get","com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient.listByFleet":"Microsoft.ContainerService.FleetUpdateStrategies.listByFleet","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient":"Microsoft.ContainerService.Fleets","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.beginCreate":"Microsoft.ContainerService.Fleets.create","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.beginDelete":"Microsoft.ContainerService.Fleets.delete","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.beginUpdateAsync":"Microsoft.ContainerService.Fleets.updateAsync","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.create":"Microsoft.ContainerService.Fleets.create","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.delete":"Microsoft.ContainerService.Fleets.delete","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.getByResourceGroup":"Microsoft.ContainerService.Fleets.get","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.getByResourceGroupWithResponse":"Microsoft.ContainerService.Fleets.get","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.list":"Microsoft.ContainerService.Fleets.listBySubscription","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.listByResourceGroup":"Microsoft.ContainerService.Fleets.listByResourceGroup","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.listCredentials":"Microsoft.ContainerService.Fleets.listCredentials","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.listCredentialsWithResponse":"Microsoft.ContainerService.Fleets.listCredentials","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.updateAsync":"Microsoft.ContainerService.Fleets.updateAsync","com.azure.resourcemanager.containerservicefleet.fluent.GatesClient":"Microsoft.ContainerService.Gates","com.azure.resourcemanager.containerservicefleet.fluent.GatesClient.beginUpdate":"Microsoft.ContainerService.Gates.update","com.azure.resourcemanager.containerservicefleet.fluent.GatesClient.get":"Microsoft.ContainerService.Gates.get","com.azure.resourcemanager.containerservicefleet.fluent.GatesClient.getWithResponse":"Microsoft.ContainerService.Gates.get","com.azure.resourcemanager.containerservicefleet.fluent.GatesClient.listByFleet":"Microsoft.ContainerService.Gates.listByFleet","com.azure.resourcemanager.containerservicefleet.fluent.GatesClient.update":"Microsoft.ContainerService.Gates.update","com.azure.resourcemanager.containerservicefleet.fluent.OperationsClient":"Microsoft.ContainerService.Operations","com.azure.resourcemanager.containerservicefleet.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient":"Microsoft.ContainerService.UpdateRuns","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.beginCreateOrUpdate":"Microsoft.ContainerService.UpdateRuns.createOrUpdate","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.beginDelete":"Microsoft.ContainerService.UpdateRuns.delete","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.beginSkip":"Microsoft.ContainerService.UpdateRuns.skip","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.beginStart":"Microsoft.ContainerService.UpdateRuns.start","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.beginStop":"Microsoft.ContainerService.UpdateRuns.stop","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.createOrUpdate":"Microsoft.ContainerService.UpdateRuns.createOrUpdate","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.delete":"Microsoft.ContainerService.UpdateRuns.delete","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.get":"Microsoft.ContainerService.UpdateRuns.get","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.getWithResponse":"Microsoft.ContainerService.UpdateRuns.get","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.listByFleet":"Microsoft.ContainerService.UpdateRuns.listByFleet","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.skip":"Microsoft.ContainerService.UpdateRuns.skip","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.start":"Microsoft.ContainerService.UpdateRuns.start","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.stop":"Microsoft.ContainerService.UpdateRuns.stop","com.azure.resourcemanager.containerservicefleet.fluent.models.AutoUpgradeProfileInner":"Microsoft.ContainerService.AutoUpgradeProfile","com.azure.resourcemanager.containerservicefleet.fluent.models.AutoUpgradeProfileProperties":"Microsoft.ContainerService.AutoUpgradeProfileProperties","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetCredentialResultsInner":"Microsoft.ContainerService.FleetCredentialResults","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner":"Microsoft.ContainerService.Fleet","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberInner":"Microsoft.ContainerService.FleetMember","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberProperties":"Microsoft.ContainerService.FleetMemberProperties","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetProperties":"Microsoft.ContainerService.FleetProperties","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyInner":"Microsoft.ContainerService.FleetUpdateStrategy","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyProperties":"Microsoft.ContainerService.FleetUpdateStrategyProperties","com.azure.resourcemanager.containerservicefleet.fluent.models.GateInner":"Microsoft.ContainerService.Gate","com.azure.resourcemanager.containerservicefleet.fluent.models.GateProperties":"Microsoft.ContainerService.GateProperties","com.azure.resourcemanager.containerservicefleet.fluent.models.GenerateResponseInner":"Microsoft.ContainerService.GenerateResponse","com.azure.resourcemanager.containerservicefleet.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner":"Microsoft.ContainerService.UpdateRun","com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunProperties":"Microsoft.ContainerService.UpdateRunProperties","com.azure.resourcemanager.containerservicefleet.implementation.ContainerServiceFleetManagementClientBuilder":"Microsoft.ContainerService","com.azure.resourcemanager.containerservicefleet.implementation.models.AutoUpgradeProfileListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.containerservicefleet.implementation.models.FleetListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.containerservicefleet.implementation.models.FleetMemberListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.containerservicefleet.implementation.models.FleetUpdateStrategyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.containerservicefleet.implementation.models.GateListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.containerservicefleet.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.containerservicefleet.implementation.models.UpdateRunListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.containerservicefleet.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.containerservicefleet.models.AgentProfile":"Microsoft.ContainerService.AgentProfile","com.azure.resourcemanager.containerservicefleet.models.ApiServerAccessProfile":"Microsoft.ContainerService.APIServerAccessProfile","com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeLastTriggerStatus":"Microsoft.ContainerService.AutoUpgradeLastTriggerStatus","com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeNodeImageSelection":"Microsoft.ContainerService.AutoUpgradeNodeImageSelection","com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeNodeImageSelectionType":"Microsoft.ContainerService.AutoUpgradeNodeImageSelectionType","com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeProfileProvisioningState":"Microsoft.ContainerService.AutoUpgradeProfileProvisioningState","com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeProfileStatus":"Microsoft.ContainerService.AutoUpgradeProfileStatus","com.azure.resourcemanager.containerservicefleet.models.FleetCredentialResult":"Microsoft.ContainerService.FleetCredentialResult","com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile":"Microsoft.ContainerService.FleetHubProfile","com.azure.resourcemanager.containerservicefleet.models.FleetMemberProvisioningState":"Microsoft.ContainerService.FleetMemberProvisioningState","com.azure.resourcemanager.containerservicefleet.models.FleetMemberStatus":"Microsoft.ContainerService.FleetMemberStatus","com.azure.resourcemanager.containerservicefleet.models.FleetMemberUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.containerservicefleet.models.FleetPatch":"Microsoft.ContainerService.FleetPatch","com.azure.resourcemanager.containerservicefleet.models.FleetProvisioningState":"Microsoft.ContainerService.FleetProvisioningState","com.azure.resourcemanager.containerservicefleet.models.FleetStatus":"Microsoft.ContainerService.FleetStatus","com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategyProvisioningState":"Microsoft.ContainerService.FleetUpdateStrategyProvisioningState","com.azure.resourcemanager.containerservicefleet.models.GateConfiguration":"Microsoft.ContainerService.GateConfiguration","com.azure.resourcemanager.containerservicefleet.models.GatePatch":"Microsoft.ContainerService.GatePatch","com.azure.resourcemanager.containerservicefleet.models.GatePatchProperties":"Microsoft.ContainerService.GatePatchProperties","com.azure.resourcemanager.containerservicefleet.models.GateProvisioningState":"Microsoft.ContainerService.GateProvisioningState","com.azure.resourcemanager.containerservicefleet.models.GateState":"Microsoft.ContainerService.GateState","com.azure.resourcemanager.containerservicefleet.models.GateTarget":"Microsoft.ContainerService.GateTarget","com.azure.resourcemanager.containerservicefleet.models.GateType":"Microsoft.ContainerService.GateType","com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate":"Microsoft.ContainerService.ManagedClusterUpdate","com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeSpec":"Microsoft.ContainerService.ManagedClusterUpgradeSpec","com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType":"Microsoft.ContainerService.ManagedClusterUpgradeType","com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentity":"Azure.ResourceManager.Legacy.ManagedServiceIdentityV4","com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType":"Azure.ResourceManager.Legacy.ManagedServiceIdentityType","com.azure.resourcemanager.containerservicefleet.models.MemberUpdateStatus":"Microsoft.ContainerService.MemberUpdateStatus","com.azure.resourcemanager.containerservicefleet.models.NodeImageSelection":"Microsoft.ContainerService.NodeImageSelection","com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionStatus":"Microsoft.ContainerService.NodeImageSelectionStatus","com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType":"Microsoft.ContainerService.NodeImageSelectionType","com.azure.resourcemanager.containerservicefleet.models.NodeImageVersion":"Microsoft.ContainerService.NodeImageVersion","com.azure.resourcemanager.containerservicefleet.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.containerservicefleet.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.containerservicefleet.models.SkipProperties":"Microsoft.ContainerService.SkipProperties","com.azure.resourcemanager.containerservicefleet.models.SkipTarget":"Microsoft.ContainerService.SkipTarget","com.azure.resourcemanager.containerservicefleet.models.TargetType":"Microsoft.ContainerService.TargetType","com.azure.resourcemanager.containerservicefleet.models.Timing":"Microsoft.ContainerService.Timing","com.azure.resourcemanager.containerservicefleet.models.UpdateGroup":"Microsoft.ContainerService.UpdateGroup","com.azure.resourcemanager.containerservicefleet.models.UpdateGroupStatus":"Microsoft.ContainerService.UpdateGroupStatus","com.azure.resourcemanager.containerservicefleet.models.UpdateRunGateStatus":"Microsoft.ContainerService.UpdateRunGateStatus","com.azure.resourcemanager.containerservicefleet.models.UpdateRunGateTargetProperties":"Microsoft.ContainerService.UpdateRunGateTargetProperties","com.azure.resourcemanager.containerservicefleet.models.UpdateRunProvisioningState":"Microsoft.ContainerService.UpdateRunProvisioningState","com.azure.resourcemanager.containerservicefleet.models.UpdateRunStatus":"Microsoft.ContainerService.UpdateRunStatus","com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy":"Microsoft.ContainerService.UpdateRunStrategy","com.azure.resourcemanager.containerservicefleet.models.UpdateStage":"Microsoft.ContainerService.UpdateStage","com.azure.resourcemanager.containerservicefleet.models.UpdateStageStatus":"Microsoft.ContainerService.UpdateStageStatus","com.azure.resourcemanager.containerservicefleet.models.UpdateState":"Microsoft.ContainerService.UpdateState","com.azure.resourcemanager.containerservicefleet.models.UpdateStatus":"Microsoft.ContainerService.UpdateStatus","com.azure.resourcemanager.containerservicefleet.models.UpgradeChannel":"Microsoft.ContainerService.UpgradeChannel","com.azure.resourcemanager.containerservicefleet.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.containerservicefleet.models.WaitStatus":"Microsoft.ContainerService.WaitStatus"},"generatedFiles":["src/main/java/com/azure/resourcemanager/containerservicefleet/ContainerServiceFleetManager.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/AutoUpgradeProfileOperationsClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/AutoUpgradeProfilesClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/ContainerServiceFleetManagementClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetMembersClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetUpdateStrategiesClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetsClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/GatesClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/UpdateRunsClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/AutoUpgradeProfileInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/AutoUpgradeProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetCredentialResultsInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/GateInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/GateProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/GenerateResponseInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/package-info.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfileImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfileOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfileOperationsImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfilesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfilesImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetCredentialResultsImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMemberImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategyImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/GateImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/GatesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/GatesImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/GenerateResponseImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/AutoUpgradeProfileListResult.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetListResult.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetMemberListResult.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetUpdateStrategyListResult.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/GateListResult.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/UpdateRunListResult.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/package-info.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ActionType.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AgentProfile.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ApiServerAccessProfile.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeLastTriggerStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeNodeImageSelection.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeNodeImageSelectionType.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfile.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfileOperations.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfileProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfileStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfiles.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleet.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetCredentialResult.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetCredentialResults.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetHubProfile.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMember.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberUpdate.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMembers.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetPatch.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategies.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategy.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleets.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Gate.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/GateConfiguration.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/GatePatch.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/GatePatchProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/GateProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/GateState.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/GateTarget.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/GateType.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Gates.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/GenerateResponse.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpdate.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeSpec.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeType.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/MemberUpdateStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelection.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionType.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageVersion.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Operation.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Operations.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Origin.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipTarget.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/TargetType.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Timing.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroup.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroupStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRun.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunGateStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunGateTargetProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStrategy.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRuns.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStage.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStageStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateState.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpgradeChannel.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/WaitStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/package-info.java","src/main/java/com/azure/resourcemanager/containerservicefleet/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersion":"2025-08-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfileOperationsClient":"Microsoft.ContainerService.AutoUpgradeProfileOperations","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfileOperationsClient.beginGenerateUpdateRun":"Microsoft.ContainerService.AutoUpgradeProfileOperations.generateUpdateRun","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfileOperationsClient.generateUpdateRun":"Microsoft.ContainerService.AutoUpgradeProfileOperations.generateUpdateRun","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient":"Microsoft.ContainerService.AutoUpgradeProfiles","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient.beginCreateOrUpdate":"Microsoft.ContainerService.AutoUpgradeProfiles.createOrUpdate","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient.beginDelete":"Microsoft.ContainerService.AutoUpgradeProfiles.delete","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient.createOrUpdate":"Microsoft.ContainerService.AutoUpgradeProfiles.createOrUpdate","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient.delete":"Microsoft.ContainerService.AutoUpgradeProfiles.delete","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient.get":"Microsoft.ContainerService.AutoUpgradeProfiles.get","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient.getWithResponse":"Microsoft.ContainerService.AutoUpgradeProfiles.get","com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient.listByFleet":"Microsoft.ContainerService.AutoUpgradeProfiles.listByFleet","com.azure.resourcemanager.containerservicefleet.fluent.ContainerServiceFleetManagementClient":"Microsoft.ContainerService","com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient":"Microsoft.ContainerService.FleetManagedNamespaces","com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.beginCreateOrUpdate":"Microsoft.ContainerService.FleetManagedNamespaces.createOrUpdate","com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.beginDelete":"Microsoft.ContainerService.FleetManagedNamespaces.delete","com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.beginUpdate":"Microsoft.ContainerService.FleetManagedNamespaces.update","com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.createOrUpdate":"Microsoft.ContainerService.FleetManagedNamespaces.createOrUpdate","com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.delete":"Microsoft.ContainerService.FleetManagedNamespaces.delete","com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.get":"Microsoft.ContainerService.FleetManagedNamespaces.get","com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.getWithResponse":"Microsoft.ContainerService.FleetManagedNamespaces.get","com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.listByFleet":"Microsoft.ContainerService.FleetManagedNamespaces.listByFleet","com.azure.resourcemanager.containerservicefleet.fluent.FleetManagedNamespacesClient.update":"Microsoft.ContainerService.FleetManagedNamespaces.update","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient":"Microsoft.ContainerService.FleetMembers","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.beginCreate":"Microsoft.ContainerService.FleetMembers.create","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.beginDelete":"Microsoft.ContainerService.FleetMembers.delete","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.beginUpdateAsync":"Microsoft.ContainerService.FleetMembers.updateAsync","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.create":"Microsoft.ContainerService.FleetMembers.create","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.delete":"Microsoft.ContainerService.FleetMembers.delete","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.get":"Microsoft.ContainerService.FleetMembers.get","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.getWithResponse":"Microsoft.ContainerService.FleetMembers.get","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.listByFleet":"Microsoft.ContainerService.FleetMembers.listByFleet","com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient.updateAsync":"Microsoft.ContainerService.FleetMembers.updateAsync","com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient":"Microsoft.ContainerService.FleetUpdateStrategies","com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient.beginCreateOrUpdate":"Microsoft.ContainerService.FleetUpdateStrategies.createOrUpdate","com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient.beginDelete":"Microsoft.ContainerService.FleetUpdateStrategies.delete","com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient.createOrUpdate":"Microsoft.ContainerService.FleetUpdateStrategies.createOrUpdate","com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient.delete":"Microsoft.ContainerService.FleetUpdateStrategies.delete","com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient.get":"Microsoft.ContainerService.FleetUpdateStrategies.get","com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient.getWithResponse":"Microsoft.ContainerService.FleetUpdateStrategies.get","com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient.listByFleet":"Microsoft.ContainerService.FleetUpdateStrategies.listByFleet","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient":"Microsoft.ContainerService.Fleets","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.beginCreate":"Microsoft.ContainerService.Fleets.create","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.beginDelete":"Microsoft.ContainerService.Fleets.delete","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.beginUpdateAsync":"Microsoft.ContainerService.Fleets.updateAsync","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.create":"Microsoft.ContainerService.Fleets.create","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.delete":"Microsoft.ContainerService.Fleets.delete","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.getByResourceGroup":"Microsoft.ContainerService.Fleets.get","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.getByResourceGroupWithResponse":"Microsoft.ContainerService.Fleets.get","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.list":"Microsoft.ContainerService.Fleets.listBySubscription","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.listByResourceGroup":"Microsoft.ContainerService.Fleets.listByResourceGroup","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.listCredentials":"Microsoft.ContainerService.Fleets.listCredentials","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.listCredentialsWithResponse":"Microsoft.ContainerService.Fleets.listCredentials","com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient.updateAsync":"Microsoft.ContainerService.Fleets.updateAsync","com.azure.resourcemanager.containerservicefleet.fluent.GatesClient":"Microsoft.ContainerService.Gates","com.azure.resourcemanager.containerservicefleet.fluent.GatesClient.beginUpdate":"Microsoft.ContainerService.Gates.update","com.azure.resourcemanager.containerservicefleet.fluent.GatesClient.get":"Microsoft.ContainerService.Gates.get","com.azure.resourcemanager.containerservicefleet.fluent.GatesClient.getWithResponse":"Microsoft.ContainerService.Gates.get","com.azure.resourcemanager.containerservicefleet.fluent.GatesClient.listByFleet":"Microsoft.ContainerService.Gates.listByFleet","com.azure.resourcemanager.containerservicefleet.fluent.GatesClient.update":"Microsoft.ContainerService.Gates.update","com.azure.resourcemanager.containerservicefleet.fluent.OperationsClient":"Microsoft.ContainerService.Operations","com.azure.resourcemanager.containerservicefleet.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient":"Microsoft.ContainerService.UpdateRuns","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.beginCreateOrUpdate":"Microsoft.ContainerService.UpdateRuns.createOrUpdate","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.beginDelete":"Microsoft.ContainerService.UpdateRuns.delete","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.beginSkip":"Microsoft.ContainerService.UpdateRuns.skip","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.beginStart":"Microsoft.ContainerService.UpdateRuns.start","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.beginStop":"Microsoft.ContainerService.UpdateRuns.stop","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.createOrUpdate":"Microsoft.ContainerService.UpdateRuns.createOrUpdate","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.delete":"Microsoft.ContainerService.UpdateRuns.delete","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.get":"Microsoft.ContainerService.UpdateRuns.get","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.getWithResponse":"Microsoft.ContainerService.UpdateRuns.get","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.listByFleet":"Microsoft.ContainerService.UpdateRuns.listByFleet","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.skip":"Microsoft.ContainerService.UpdateRuns.skip","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.start":"Microsoft.ContainerService.UpdateRuns.start","com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient.stop":"Microsoft.ContainerService.UpdateRuns.stop","com.azure.resourcemanager.containerservicefleet.fluent.models.AutoUpgradeProfileInner":"Microsoft.ContainerService.AutoUpgradeProfile","com.azure.resourcemanager.containerservicefleet.fluent.models.AutoUpgradeProfileProperties":"Microsoft.ContainerService.AutoUpgradeProfileProperties","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetCredentialResultsInner":"Microsoft.ContainerService.FleetCredentialResults","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner":"Microsoft.ContainerService.Fleet","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetManagedNamespaceInner":"Microsoft.ContainerService.FleetManagedNamespace","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetManagedNamespaceProperties":"Microsoft.ContainerService.FleetManagedNamespaceProperties","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberInner":"Microsoft.ContainerService.FleetMember","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberProperties":"Microsoft.ContainerService.FleetMemberProperties","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetProperties":"Microsoft.ContainerService.FleetProperties","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyInner":"Microsoft.ContainerService.FleetUpdateStrategy","com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyProperties":"Microsoft.ContainerService.FleetUpdateStrategyProperties","com.azure.resourcemanager.containerservicefleet.fluent.models.GateInner":"Microsoft.ContainerService.Gate","com.azure.resourcemanager.containerservicefleet.fluent.models.GateProperties":"Microsoft.ContainerService.GateProperties","com.azure.resourcemanager.containerservicefleet.fluent.models.GenerateResponseInner":"Microsoft.ContainerService.GenerateResponse","com.azure.resourcemanager.containerservicefleet.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner":"Microsoft.ContainerService.UpdateRun","com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunProperties":"Microsoft.ContainerService.UpdateRunProperties","com.azure.resourcemanager.containerservicefleet.implementation.ContainerServiceFleetManagementClientBuilder":"Microsoft.ContainerService","com.azure.resourcemanager.containerservicefleet.implementation.models.AutoUpgradeProfileListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.containerservicefleet.implementation.models.FleetListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.containerservicefleet.implementation.models.FleetManagedNamespaceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.containerservicefleet.implementation.models.FleetMemberListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.containerservicefleet.implementation.models.FleetUpdateStrategyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.containerservicefleet.implementation.models.GateListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.containerservicefleet.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.containerservicefleet.implementation.models.UpdateRunListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.containerservicefleet.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.containerservicefleet.models.AdoptionPolicy":"Microsoft.ContainerService.AdoptionPolicy","com.azure.resourcemanager.containerservicefleet.models.Affinity":"Placement.V1.Affinity","com.azure.resourcemanager.containerservicefleet.models.AgentProfile":"Microsoft.ContainerService.AgentProfile","com.azure.resourcemanager.containerservicefleet.models.ApiServerAccessProfile":"Microsoft.ContainerService.APIServerAccessProfile","com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeLastTriggerStatus":"Microsoft.ContainerService.AutoUpgradeLastTriggerStatus","com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeNodeImageSelection":"Microsoft.ContainerService.AutoUpgradeNodeImageSelection","com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeNodeImageSelectionType":"Microsoft.ContainerService.AutoUpgradeNodeImageSelectionType","com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeProfileProvisioningState":"Microsoft.ContainerService.AutoUpgradeProfileProvisioningState","com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeProfileStatus":"Microsoft.ContainerService.AutoUpgradeProfileStatus","com.azure.resourcemanager.containerservicefleet.models.ClusterAffinity":"Placement.V1.ClusterAffinity","com.azure.resourcemanager.containerservicefleet.models.ClusterResourcePlacementSpec":"Placement.V1.ClusterResourcePlacementSpec","com.azure.resourcemanager.containerservicefleet.models.ClusterSelector":"Placement.V1.ClusterSelector","com.azure.resourcemanager.containerservicefleet.models.ClusterSelectorTerm":"Placement.V1.ClusterSelectorTerm","com.azure.resourcemanager.containerservicefleet.models.DeletePolicy":"Microsoft.ContainerService.DeletePolicy","com.azure.resourcemanager.containerservicefleet.models.FleetCredentialResult":"Microsoft.ContainerService.FleetCredentialResult","com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile":"Microsoft.ContainerService.FleetHubProfile","com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespacePatch":"Microsoft.ContainerService.FleetManagedNamespacePatch","com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespaceProvisioningState":"Microsoft.ContainerService.FleetManagedNamespaceProvisioningState","com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespaceStatus":"Microsoft.ContainerService.FleetManagedNamespaceStatus","com.azure.resourcemanager.containerservicefleet.models.FleetMemberProvisioningState":"Microsoft.ContainerService.FleetMemberProvisioningState","com.azure.resourcemanager.containerservicefleet.models.FleetMemberStatus":"Microsoft.ContainerService.FleetMemberStatus","com.azure.resourcemanager.containerservicefleet.models.FleetMemberUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.containerservicefleet.models.FleetPatch":"Microsoft.ContainerService.FleetPatch","com.azure.resourcemanager.containerservicefleet.models.FleetProvisioningState":"Microsoft.ContainerService.FleetProvisioningState","com.azure.resourcemanager.containerservicefleet.models.FleetStatus":"Microsoft.ContainerService.FleetStatus","com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategyProvisioningState":"Microsoft.ContainerService.FleetUpdateStrategyProvisioningState","com.azure.resourcemanager.containerservicefleet.models.GateConfiguration":"Microsoft.ContainerService.GateConfiguration","com.azure.resourcemanager.containerservicefleet.models.GatePatch":"Microsoft.ContainerService.GatePatch","com.azure.resourcemanager.containerservicefleet.models.GatePatchProperties":"Microsoft.ContainerService.GatePatchProperties","com.azure.resourcemanager.containerservicefleet.models.GateProvisioningState":"Microsoft.ContainerService.GateProvisioningState","com.azure.resourcemanager.containerservicefleet.models.GateState":"Microsoft.ContainerService.GateState","com.azure.resourcemanager.containerservicefleet.models.GateTarget":"Microsoft.ContainerService.GateTarget","com.azure.resourcemanager.containerservicefleet.models.GateType":"Microsoft.ContainerService.GateType","com.azure.resourcemanager.containerservicefleet.models.LabelSelector":"Meta.V1.LabelSelector","com.azure.resourcemanager.containerservicefleet.models.LabelSelectorOperator":"Meta.V1.LabelSelectorOperator","com.azure.resourcemanager.containerservicefleet.models.LabelSelectorRequirement":"Meta.V1.LabelSelectorRequirement","com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate":"Microsoft.ContainerService.ManagedClusterUpdate","com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeSpec":"Microsoft.ContainerService.ManagedClusterUpgradeSpec","com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType":"Microsoft.ContainerService.ManagedClusterUpgradeType","com.azure.resourcemanager.containerservicefleet.models.ManagedNamespaceProperties":"Microsoft.ContainerService.ManagedNamespaceProperties","com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentity":"Azure.ResourceManager.Legacy.ManagedServiceIdentityV4","com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType":"Azure.ResourceManager.Legacy.ManagedServiceIdentityType","com.azure.resourcemanager.containerservicefleet.models.MemberUpdateStatus":"Microsoft.ContainerService.MemberUpdateStatus","com.azure.resourcemanager.containerservicefleet.models.NetworkPolicy":"Microsoft.ContainerService.NetworkPolicy","com.azure.resourcemanager.containerservicefleet.models.NodeImageSelection":"Microsoft.ContainerService.NodeImageSelection","com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionStatus":"Microsoft.ContainerService.NodeImageSelectionStatus","com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType":"Microsoft.ContainerService.NodeImageSelectionType","com.azure.resourcemanager.containerservicefleet.models.NodeImageVersion":"Microsoft.ContainerService.NodeImageVersion","com.azure.resourcemanager.containerservicefleet.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.containerservicefleet.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.containerservicefleet.models.PlacementPolicy":"Placement.V1.PlacementPolicy","com.azure.resourcemanager.containerservicefleet.models.PlacementProfile":"Microsoft.ContainerService.PlacementProfile","com.azure.resourcemanager.containerservicefleet.models.PlacementType":"Placement.V1.PlacementType","com.azure.resourcemanager.containerservicefleet.models.PolicyRule":"Microsoft.ContainerService.PolicyRule","com.azure.resourcemanager.containerservicefleet.models.PropagationPolicy":"Microsoft.ContainerService.PropagationPolicy","com.azure.resourcemanager.containerservicefleet.models.PropagationType":"Microsoft.ContainerService.PropagationType","com.azure.resourcemanager.containerservicefleet.models.PropertySelector":"Placement.V1.PropertySelector","com.azure.resourcemanager.containerservicefleet.models.PropertySelectorOperator":"Placement.V1.PropertySelectorOperator","com.azure.resourcemanager.containerservicefleet.models.PropertySelectorRequirement":"Placement.V1.PropertySelectorRequirement","com.azure.resourcemanager.containerservicefleet.models.ResourceQuota":"Microsoft.ContainerService.ResourceQuota","com.azure.resourcemanager.containerservicefleet.models.SkipProperties":"Microsoft.ContainerService.SkipProperties","com.azure.resourcemanager.containerservicefleet.models.SkipTarget":"Microsoft.ContainerService.SkipTarget","com.azure.resourcemanager.containerservicefleet.models.TaintEffect":"Core.V1.TaintEffect","com.azure.resourcemanager.containerservicefleet.models.TargetType":"Microsoft.ContainerService.TargetType","com.azure.resourcemanager.containerservicefleet.models.Timing":"Microsoft.ContainerService.Timing","com.azure.resourcemanager.containerservicefleet.models.Toleration":"Placement.V1.Toleration","com.azure.resourcemanager.containerservicefleet.models.TolerationOperator":"Core.V1.TolerationOperator","com.azure.resourcemanager.containerservicefleet.models.UpdateGroup":"Microsoft.ContainerService.UpdateGroup","com.azure.resourcemanager.containerservicefleet.models.UpdateGroupStatus":"Microsoft.ContainerService.UpdateGroupStatus","com.azure.resourcemanager.containerservicefleet.models.UpdateRunGateStatus":"Microsoft.ContainerService.UpdateRunGateStatus","com.azure.resourcemanager.containerservicefleet.models.UpdateRunGateTargetProperties":"Microsoft.ContainerService.UpdateRunGateTargetProperties","com.azure.resourcemanager.containerservicefleet.models.UpdateRunProvisioningState":"Microsoft.ContainerService.UpdateRunProvisioningState","com.azure.resourcemanager.containerservicefleet.models.UpdateRunStatus":"Microsoft.ContainerService.UpdateRunStatus","com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy":"Microsoft.ContainerService.UpdateRunStrategy","com.azure.resourcemanager.containerservicefleet.models.UpdateStage":"Microsoft.ContainerService.UpdateStage","com.azure.resourcemanager.containerservicefleet.models.UpdateStageStatus":"Microsoft.ContainerService.UpdateStageStatus","com.azure.resourcemanager.containerservicefleet.models.UpdateState":"Microsoft.ContainerService.UpdateState","com.azure.resourcemanager.containerservicefleet.models.UpdateStatus":"Microsoft.ContainerService.UpdateStatus","com.azure.resourcemanager.containerservicefleet.models.UpgradeChannel":"Microsoft.ContainerService.UpgradeChannel","com.azure.resourcemanager.containerservicefleet.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.containerservicefleet.models.WaitStatus":"Microsoft.ContainerService.WaitStatus"},"generatedFiles":["src/main/java/com/azure/resourcemanager/containerservicefleet/ContainerServiceFleetManager.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/AutoUpgradeProfileOperationsClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/AutoUpgradeProfilesClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/ContainerServiceFleetManagementClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetManagedNamespacesClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetMembersClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetUpdateStrategiesClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetsClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/GatesClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/UpdateRunsClient.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/AutoUpgradeProfileInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/AutoUpgradeProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetCredentialResultsInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetManagedNamespaceInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetManagedNamespaceProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/GateInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/GateProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/GenerateResponseInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunInner.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/package-info.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfileImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfileOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfileOperationsImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfilesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfilesImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetCredentialResultsImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetManagedNamespaceImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetManagedNamespacesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetManagedNamespacesImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMemberImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategyImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/GateImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/GatesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/GatesImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/GenerateResponseImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsImpl.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/AutoUpgradeProfileListResult.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetListResult.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetManagedNamespaceListResult.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetMemberListResult.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetUpdateStrategyListResult.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/GateListResult.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/UpdateRunListResult.java","src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/package-info.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ActionType.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AdoptionPolicy.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Affinity.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AgentProfile.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ApiServerAccessProfile.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeLastTriggerStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeNodeImageSelection.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeNodeImageSelectionType.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfile.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfileOperations.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfileProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfileStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfiles.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterAffinity.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterResourcePlacementSpec.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterSelector.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ClusterSelectorTerm.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/DeletePolicy.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleet.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetCredentialResult.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetCredentialResults.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetHubProfile.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespace.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespacePatch.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespaceProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespaceStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetManagedNamespaces.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMember.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberUpdate.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMembers.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetPatch.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategies.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategy.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleets.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Gate.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/GateConfiguration.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/GatePatch.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/GatePatchProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/GateProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/GateState.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/GateTarget.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/GateType.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Gates.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/GenerateResponse.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/LabelSelector.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/LabelSelectorOperator.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/LabelSelectorRequirement.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpdate.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeSpec.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeType.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedNamespaceProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/MemberUpdateStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/NetworkPolicy.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelection.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionType.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageVersion.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Operation.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Operations.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Origin.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/PlacementPolicy.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/PlacementProfile.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/PlacementType.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/PolicyRule.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropagationPolicy.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropagationType.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropertySelector.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropertySelectorOperator.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/PropertySelectorRequirement.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/ResourceQuota.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipTarget.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/TaintEffect.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/TargetType.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Timing.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/Toleration.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/TolerationOperator.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroup.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroupStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRun.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunGateStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunGateTargetProperties.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStrategy.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRuns.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStage.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStageStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateState.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpgradeChannel.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/WaitStatus.java","src/main/java/com/azure/resourcemanager/containerservicefleet/models/package-info.java","src/main/java/com/azure/resourcemanager/containerservicefleet/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicefleet/proxy-config.json b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicefleet/proxy-config.json index 0301fb5d89cf..7fe3eb3343a4 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicefleet/proxy-config.json +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicefleet/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.containerservicefleet.implementation.AutoUpgradeProfileOperationsClientImpl$AutoUpgradeProfileOperationsService"],["com.azure.resourcemanager.containerservicefleet.implementation.AutoUpgradeProfilesClientImpl$AutoUpgradeProfilesService"],["com.azure.resourcemanager.containerservicefleet.implementation.FleetMembersClientImpl$FleetMembersService"],["com.azure.resourcemanager.containerservicefleet.implementation.FleetUpdateStrategiesClientImpl$FleetUpdateStrategiesService"],["com.azure.resourcemanager.containerservicefleet.implementation.FleetsClientImpl$FleetsService"],["com.azure.resourcemanager.containerservicefleet.implementation.GatesClientImpl$GatesService"],["com.azure.resourcemanager.containerservicefleet.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerservicefleet.implementation.UpdateRunsClientImpl$UpdateRunsService"]] \ No newline at end of file +[["com.azure.resourcemanager.containerservicefleet.implementation.AutoUpgradeProfileOperationsClientImpl$AutoUpgradeProfileOperationsService"],["com.azure.resourcemanager.containerservicefleet.implementation.AutoUpgradeProfilesClientImpl$AutoUpgradeProfilesService"],["com.azure.resourcemanager.containerservicefleet.implementation.FleetManagedNamespacesClientImpl$FleetManagedNamespacesService"],["com.azure.resourcemanager.containerservicefleet.implementation.FleetMembersClientImpl$FleetMembersService"],["com.azure.resourcemanager.containerservicefleet.implementation.FleetUpdateStrategiesClientImpl$FleetUpdateStrategiesService"],["com.azure.resourcemanager.containerservicefleet.implementation.FleetsClientImpl$FleetsService"],["com.azure.resourcemanager.containerservicefleet.implementation.GatesClientImpl$GatesService"],["com.azure.resourcemanager.containerservicefleet.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerservicefleet.implementation.UpdateRunsClientImpl$UpdateRunsService"]] \ No newline at end of file diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfileOperationsGenerateUpdateRunSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfileOperationsGenerateUpdateRunSamples.java index 74ea4c1305ed..a3792ddd1ceb 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfileOperationsGenerateUpdateRunSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfileOperationsGenerateUpdateRunSamples.java @@ -9,7 +9,7 @@ */ public final class AutoUpgradeProfileOperationsGenerateUpdateRunSamples { /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfileOperations_GenerateUpdateRun_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfileOperations_GenerateUpdateRun_MaximumSet_Gen.json */ /** * Sample code: AutoUpgradeProfileOperations_GenerateUpdateRun_MaximumSet. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesCreateOrUpdateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesCreateOrUpdateSamples.java index d0c4484d8a70..aaec9b31af27 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesCreateOrUpdateSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class AutoUpgradeProfilesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfiles_CreateOrUpdate.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfiles_CreateOrUpdate.json */ /** * Sample code: Create an AutoUpgradeProfile. @@ -32,7 +32,7 @@ public static void createAnAutoUpgradeProfile( } /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfiles_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfiles_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: Create an AutoUpgradeProfile. - generated by [MaximumSet] rule. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesDeleteSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesDeleteSamples.java index 105cb67b9a1a..46845c619d9c 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesDeleteSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class AutoUpgradeProfilesDeleteSamples { /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfiles_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfiles_Delete_MaximumSet_Gen.json */ /** * Sample code: Delete an AutoUpgradeProfile resource. - generated by [MaximumSet] rule. @@ -23,7 +23,7 @@ public static void deleteAnAutoUpgradeProfileResourceGeneratedByMaximumSetRule( } /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfiles_Delete.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfiles_Delete.json */ /** * Sample code: Delete an AutoUpgradeProfile resource. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesGetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesGetSamples.java index 25df3085df78..37b194fc5118 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesGetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesGetSamples.java @@ -9,7 +9,7 @@ */ public final class AutoUpgradeProfilesGetSamples { /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfiles_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfiles_Get_MaximumSet_Gen.json */ /** * Sample code: Gets an AutoUpgradeProfile resource. - generated by [MaximumSet] rule. @@ -23,7 +23,7 @@ public static void getsAnAutoUpgradeProfileResourceGeneratedByMaximumSetRule( } /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfiles_Get.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfiles_Get.json */ /** * Sample code: Gets an AutoUpgradeProfile resource. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesListByFleetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesListByFleetSamples.java index d76a0169af74..30f81bb9483b 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesListByFleetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesListByFleetSamples.java @@ -9,7 +9,7 @@ */ public final class AutoUpgradeProfilesListByFleetSamples { /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfiles_ListByFleet.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfiles_ListByFleet.json */ /** * Sample code: Lists the AutoUpgradeProfile resources by fleet. @@ -22,7 +22,7 @@ public static void listsTheAutoUpgradeProfileResourcesByFleet( } /* - * x-ms-original-file: 2025-04-01-preview/AutoUpgradeProfiles_ListByFleet_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/AutoUpgradeProfiles_ListByFleet_MaximumSet_Gen.json */ /** * Sample code: Lists the AutoUpgradeProfile resources by fleet. - generated by [MaximumSet] rule. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesCreateOrUpdateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..0ec79893edaa --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesCreateOrUpdateSamples.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.generated; + +import com.azure.resourcemanager.containerservicefleet.models.AdoptionPolicy; +import com.azure.resourcemanager.containerservicefleet.models.Affinity; +import com.azure.resourcemanager.containerservicefleet.models.ClusterAffinity; +import com.azure.resourcemanager.containerservicefleet.models.ClusterResourcePlacementSpec; +import com.azure.resourcemanager.containerservicefleet.models.ClusterSelector; +import com.azure.resourcemanager.containerservicefleet.models.ClusterSelectorTerm; +import com.azure.resourcemanager.containerservicefleet.models.DeletePolicy; +import com.azure.resourcemanager.containerservicefleet.models.LabelSelector; +import com.azure.resourcemanager.containerservicefleet.models.LabelSelectorOperator; +import com.azure.resourcemanager.containerservicefleet.models.LabelSelectorRequirement; +import com.azure.resourcemanager.containerservicefleet.models.ManagedNamespaceProperties; +import com.azure.resourcemanager.containerservicefleet.models.NetworkPolicy; +import com.azure.resourcemanager.containerservicefleet.models.PlacementPolicy; +import com.azure.resourcemanager.containerservicefleet.models.PlacementProfile; +import com.azure.resourcemanager.containerservicefleet.models.PlacementType; +import com.azure.resourcemanager.containerservicefleet.models.PolicyRule; +import com.azure.resourcemanager.containerservicefleet.models.PropagationPolicy; +import com.azure.resourcemanager.containerservicefleet.models.PropagationType; +import com.azure.resourcemanager.containerservicefleet.models.PropertySelector; +import com.azure.resourcemanager.containerservicefleet.models.PropertySelectorOperator; +import com.azure.resourcemanager.containerservicefleet.models.PropertySelectorRequirement; +import com.azure.resourcemanager.containerservicefleet.models.ResourceQuota; +import com.azure.resourcemanager.containerservicefleet.models.TaintEffect; +import com.azure.resourcemanager.containerservicefleet.models.Toleration; +import com.azure.resourcemanager.containerservicefleet.models.TolerationOperator; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for FleetManagedNamespaces CreateOrUpdate. + */ +public final class FleetManagedNamespacesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-08-01-preview/FleetManagedNamespaces_CreateOrUpdate.json + */ + /** + * Sample code: FleetManagedNamespaces_CreateOrUpdate. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void fleetManagedNamespacesCreateOrUpdate( + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.fleetManagedNamespaces() + .define("namespace1") + .withRegion("eastus") + .withExistingFleet("rgfleets", "fleet1") + .withManagedNamespaceProperties(new ManagedNamespaceProperties() + .withLabels(mapOf("key1", "fakeTokenPlaceholder")) + .withAnnotations(mapOf("key2", "fakeTokenPlaceholder")) + .withDefaultResourceQuota(new ResourceQuota().withCpuRequest("1") + .withCpuLimit("1") + .withMemoryRequest("10Gi") + .withMemoryLimit("32Gi")) + .withDefaultNetworkPolicy( + new NetworkPolicy().withIngress(PolicyRule.ALLOW_SAME_NAMESPACE).withEgress(PolicyRule.ALLOW_ALL))) + .withAdoptionPolicy(AdoptionPolicy.NEVER) + .withDeletePolicy(DeletePolicy.KEEP) + .withPropagationPolicy( + new PropagationPolicy().withType(PropagationType.PLACEMENT) + .withPlacementProfile( + new PlacementProfile() + .withDefaultClusterResourcePlacement( + new ClusterResourcePlacementSpec() + .withPolicy(new PlacementPolicy().withPlacementType(PlacementType.PICK_ALL) + .withAffinity(new Affinity().withClusterAffinity( + new ClusterAffinity().withRequiredDuringSchedulingIgnoredDuringExecution( + new ClusterSelector() + .withClusterSelectorTerms(Arrays.asList(new ClusterSelectorTerm() + .withLabelSelector( + new LabelSelector().withMatchLabels(mapOf("gpu", "true")) + .withMatchExpressions( + Arrays.asList(new LabelSelectorRequirement() + .withKey("fakeTokenPlaceholder") + .withOperator(LabelSelectorOperator.IN) + .withValues(Arrays.asList("production1", + "production2"))))) + .withPropertySelector( + new PropertySelector().withMatchExpressions(Arrays.asList( + new PropertySelectorRequirement().withName("zones") + .withOperator(PropertySelectorOperator.GT) + .withValues(Arrays.asList("1")))))))))) + .withTolerations(Arrays.asList(new Toleration().withKey("fakeTokenPlaceholder") + .withOperator(TolerationOperator.EXISTS) + .withValue("true") + .withEffect(TaintEffect.NO_SCHEDULE))))))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesDeleteSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesDeleteSamples.java new file mode 100644 index 000000000000..ad4956740b70 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.generated; + +/** + * Samples for FleetManagedNamespaces Delete. + */ +public final class FleetManagedNamespacesDeleteSamples { + /* + * x-ms-original-file: 2025-08-01-preview/FleetManagedNamespaces_Delete.json + */ + /** + * Sample code: FleetManagedNamespaces_Delete. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void fleetManagedNamespacesDelete( + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.fleetManagedNamespaces() + .delete("rgfleets", "fleet1", "namespace1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesGetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesGetSamples.java new file mode 100644 index 000000000000..61dbcce22fc5 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.generated; + +/** + * Samples for FleetManagedNamespaces Get. + */ +public final class FleetManagedNamespacesGetSamples { + /* + * x-ms-original-file: 2025-08-01-preview/FleetManagedNamespaces_Get.json + */ + /** + * Sample code: FleetManagedNamespaces_Get. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void fleetManagedNamespacesGet( + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.fleetManagedNamespaces() + .getWithResponse("rgfleets", "fleet1", "namespace1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesListByFleetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesListByFleetSamples.java new file mode 100644 index 000000000000..49c15ab0c9fd --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesListByFleetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.generated; + +/** + * Samples for FleetManagedNamespaces ListByFleet. + */ +public final class FleetManagedNamespacesListByFleetSamples { + /* + * x-ms-original-file: 2025-08-01-preview/FleetManagedNamespaces_ListByFleet.json + */ + /** + * Sample code: FleetManagedNamespaces_ListByFleet. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void fleetManagedNamespacesListByFleet( + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.fleetManagedNamespaces().listByFleet("rgfleets", "fleet1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesUpdateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesUpdateSamples.java new file mode 100644 index 000000000000..3f88515c1cd6 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacesUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.generated; + +import com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespace; + +/** + * Samples for FleetManagedNamespaces Update. + */ +public final class FleetManagedNamespacesUpdateSamples { + /* + * x-ms-original-file: 2025-08-01-preview/FleetManagedNamespaces_Update.json + */ + /** + * Sample code: FleetManagedNamespaces_Update. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void fleetManagedNamespacesUpdate( + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + FleetManagedNamespace resource = manager.fleetManagedNamespaces() + .getWithResponse("rgfleets", "fleet1", "namespace1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateSamples.java index 995de82ea909..f34ea112c506 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateSamples.java @@ -9,7 +9,7 @@ */ public final class FleetMembersCreateSamples { /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_Create.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_Create.json */ /** * Sample code: Creates a FleetMember resource with a long running operation. @@ -27,7 +27,7 @@ public static void createsAFleetMemberResourceWithALongRunningOperation( } /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_Create_MaximumSet_Gen.json */ /** * Sample code: Creates a FleetMember resource with a long running operation. - generated by [MaximumSet] rule. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteSamples.java index 6403a01700a3..fd0c997d5835 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class FleetMembersDeleteSamples { /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_Delete_MaximumSet_Gen.json */ /** * Sample code: Deletes a FleetMember resource asynchronously with a long running operation. - generated by @@ -23,7 +23,7 @@ public static void deletesAFleetMemberResourceAsynchronouslyWithALongRunningOper } /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_Delete.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_Delete.json */ /** * Sample code: Deletes a FleetMember resource asynchronously with a long running operation. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetSamples.java index a58a32817835..aedacba70627 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetSamples.java @@ -9,7 +9,7 @@ */ public final class FleetMembersGetSamples { /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_Get.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_Get.json */ /** * Sample code: Gets a FleetMember resource. @@ -22,7 +22,7 @@ public final class FleetMembersGetSamples { } /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_Get_MaximumSet_Gen.json */ /** * Sample code: Gets a FleetMember resource. - generated by [MaximumSet] rule. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetSamples.java index 50fd104bee45..6920814ef09d 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetSamples.java @@ -9,7 +9,7 @@ */ public final class FleetMembersListByFleetSamples { /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_ListByFleet_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_ListByFleet_MaximumSet_Gen.json */ /** * Sample code: Lists the members of a Fleet. - generated by [MaximumSet] rule. @@ -22,7 +22,7 @@ public static void listsTheMembersOfAFleetGeneratedByMaximumSetRule( } /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_ListByFleet.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_ListByFleet.json */ /** * Sample code: Lists the members of a Fleet. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersUpdateAsyncSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersUpdateAsyncSamples.java index 464b958f8eaf..51bba243e4f2 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersUpdateAsyncSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersUpdateAsyncSamples.java @@ -11,7 +11,7 @@ */ public final class FleetMembersUpdateAsyncSamples { /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_Update_MaximumSet_Gen.json */ /** * Sample code: Updates a FleetMember resource synchronously. - generated by [MaximumSet] rule. @@ -27,7 +27,7 @@ public static void updatesAFleetMemberResourceSynchronouslyGeneratedByMaximumSet } /* - * x-ms-original-file: 2025-04-01-preview/FleetMembers_Update.json + * x-ms-original-file: 2025-08-01-preview/FleetMembers_Update.json */ /** * Sample code: Updates a FleetMember resource synchronously. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateSamples.java index 878a32e32c34..a7aece0ff0a3 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ */ public final class FleetUpdateStrategiesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-04-01-preview/FleetUpdateStrategies_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetUpdateStrategies_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: Create a FleetUpdateStrategy. - generated by [MaximumSet] rule. @@ -37,7 +37,7 @@ public static void createAFleetUpdateStrategyGeneratedByMaximumSetRule( } /* - * x-ms-original-file: 2025-04-01-preview/UpdateStrategies_CreateOrUpdate.json + * x-ms-original-file: 2025-08-01-preview/UpdateStrategies_CreateOrUpdate.json */ /** * Sample code: Create a FleetUpdateStrategy. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteSamples.java index f474fbf89c23..7d16790bf33b 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class FleetUpdateStrategiesDeleteSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateStrategies_Delete.json + * x-ms-original-file: 2025-08-01-preview/UpdateStrategies_Delete.json */ /** * Sample code: Delete a FleetUpdateStrategy resource. @@ -22,7 +22,7 @@ public static void deleteAFleetUpdateStrategyResource( } /* - * x-ms-original-file: 2025-04-01-preview/FleetUpdateStrategies_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetUpdateStrategies_Delete_MaximumSet_Gen.json */ /** * Sample code: Delete a FleetUpdateStrategy resource. - generated by [MaximumSet] rule. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetSamples.java index c0936a19a620..f6aacd1179c3 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetSamples.java @@ -9,7 +9,7 @@ */ public final class FleetUpdateStrategiesGetSamples { /* - * x-ms-original-file: 2025-04-01-preview/FleetUpdateStrategies_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetUpdateStrategies_Get_MaximumSet_Gen.json */ /** * Sample code: Get a FleetUpdateStrategy resource. - generated by [MaximumSet] rule. @@ -23,7 +23,7 @@ public static void getAFleetUpdateStrategyResourceGeneratedByMaximumSetRule( } /* - * x-ms-original-file: 2025-04-01-preview/UpdateStrategies_Get.json + * x-ms-original-file: 2025-08-01-preview/UpdateStrategies_Get.json */ /** * Sample code: Get a FleetUpdateStrategy resource. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetSamples.java index 482feff77b78..0149cc2653e5 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetSamples.java @@ -9,7 +9,7 @@ */ public final class FleetUpdateStrategiesListByFleetSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateStrategies_ListByFleet.json + * x-ms-original-file: 2025-08-01-preview/UpdateStrategies_ListByFleet.json */ /** * Sample code: List the FleetUpdateStrategy resources by fleet. @@ -22,7 +22,7 @@ public static void listTheFleetUpdateStrategyResourcesByFleet( } /* - * x-ms-original-file: 2025-04-01-preview/FleetUpdateStrategies_ListByFleet_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/FleetUpdateStrategies_ListByFleet_MaximumSet_Gen.json */ /** * Sample code: List the FleetUpdateStrategy resources by fleet. - generated by [MaximumSet] rule. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateSamples.java index 5b87820ffa19..e83aab8a275c 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateSamples.java @@ -18,7 +18,7 @@ */ public final class FleetsCreateSamples { /* - * x-ms-original-file: 2025-04-01-preview/Fleets_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Fleets_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: Creates a Fleet resource with a long running operation. - generated by [MaximumSet] rule. @@ -48,7 +48,7 @@ public static void createsAFleetResourceWithALongRunningOperationGeneratedByMaxi } /* - * x-ms-original-file: 2025-04-01-preview/Fleets_CreateOrUpdate.json + * x-ms-original-file: 2025-08-01-preview/Fleets_CreateOrUpdate.json */ /** * Sample code: Creates a Fleet resource with a long running operation. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteSamples.java index ef60c928ed29..143798f6f62a 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class FleetsDeleteSamples { /* - * x-ms-original-file: 2025-04-01-preview/Fleets_Delete.json + * x-ms-original-file: 2025-08-01-preview/Fleets_Delete.json */ /** * Sample code: Deletes a Fleet resource asynchronously with a long running operation. @@ -22,7 +22,7 @@ public static void deletesAFleetResourceAsynchronouslyWithALongRunningOperation( } /* - * x-ms-original-file: 2025-04-01-preview/Fleets_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Fleets_Delete_MaximumSet_Gen.json */ /** * Sample code: Deletes a Fleet resource asynchronously with a long running operation. - generated by [MaximumSet] diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupSamples.java index 063471a09971..bd6768bf7466 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class FleetsGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-04-01-preview/Fleets_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Fleets_Get_MaximumSet_Gen.json */ /** * Sample code: Gets a Fleet resource. - generated by [MaximumSet] rule. @@ -22,7 +22,7 @@ public static void getsAFleetResourceGeneratedByMaximumSetRule( } /* - * x-ms-original-file: 2025-04-01-preview/Fleets_Get.json + * x-ms-original-file: 2025-08-01-preview/Fleets_Get.json */ /** * Sample code: Gets a Fleet resource. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupSamples.java index 9920cb950796..d4d03dd77d69 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class FleetsListByResourceGroupSamples { /* - * x-ms-original-file: 2025-04-01-preview/Fleets_ListByResourceGroup.json + * x-ms-original-file: 2025-08-01-preview/Fleets_ListByResourceGroup.json */ /** * Sample code: Lists the Fleet resources in a resource group. @@ -22,7 +22,7 @@ public static void listsTheFleetResourcesInAResourceGroup( } /* - * x-ms-original-file: 2025-04-01-preview/Fleets_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Fleets_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: Lists the Fleet resources in a resource group. - generated by [MaximumSet] rule. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsSamples.java index 3ef1466532f8..8fc552f558c7 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsSamples.java @@ -9,7 +9,7 @@ */ public final class FleetsListCredentialsSamples { /* - * x-ms-original-file: 2025-04-01-preview/Fleets_ListCredentials_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Fleets_ListCredentials_MaximumSet_Gen.json */ /** * Sample code: Lists the user credentials of a Fleet. - generated by [MaximumSet] rule. @@ -22,7 +22,7 @@ public static void listsTheUserCredentialsOfAFleetGeneratedByMaximumSetRule( } /* - * x-ms-original-file: 2025-04-01-preview/Fleets_ListCredentialsResult.json + * x-ms-original-file: 2025-08-01-preview/Fleets_ListCredentialsResult.json */ /** * Sample code: Lists the user credentials of a Fleet. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListSamples.java index 5eba7abe64b4..5f485623b95f 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListSamples.java @@ -9,7 +9,7 @@ */ public final class FleetsListSamples { /* - * x-ms-original-file: 2025-04-01-preview/Fleets_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Fleets_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: Lists the Fleet resources in a subscription. - generated by [MaximumSet] rule. @@ -22,7 +22,7 @@ public static void listsTheFleetResourcesInASubscriptionGeneratedByMaximumSetRul } /* - * x-ms-original-file: 2025-04-01-preview/Fleets_ListBySub.json + * x-ms-original-file: 2025-08-01-preview/Fleets_ListBySub.json */ /** * Sample code: Lists the Fleet resources in a subscription. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsUpdateAsyncSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsUpdateAsyncSamples.java index 030bb1dcb628..1d465cb8b72c 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsUpdateAsyncSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsUpdateAsyncSamples.java @@ -16,7 +16,7 @@ */ public final class FleetsUpdateAsyncSamples { /* - * x-ms-original-file: 2025-04-01-preview/Fleets_PatchTags.json + * x-ms-original-file: 2025-08-01-preview/Fleets_PatchTags.json */ /** * Sample code: Update a Fleet. @@ -32,7 +32,7 @@ public final class FleetsUpdateAsyncSamples { } /* - * x-ms-original-file: 2025-04-01-preview/Fleets_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Fleets_Update_MaximumSet_Gen.json */ /** * Sample code: Update a Fleet. - generated by [MaximumSet] rule. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/GatesGetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/GatesGetSamples.java index c2c307cc03d9..b0cbbce564c7 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/GatesGetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/GatesGetSamples.java @@ -9,7 +9,7 @@ */ public final class GatesGetSamples { /* - * x-ms-original-file: 2025-04-01-preview/Gates_Get.json + * x-ms-original-file: 2025-08-01-preview/Gates_Get.json */ /** * Sample code: Gets a Gate resource. @@ -21,4 +21,19 @@ public final class GatesGetSamples { manager.gates() .getWithResponse("rg1", "fleet1", "12345678-910a-bcde-f000-000000000000", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2025-08-01-preview/Gates_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Gates_Get_MaximumSet. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void + gatesGetMaximumSet(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.gates() + .getWithResponse("rgfleets", "fleet-1", "12345678-910a-bcde-f000-000000000000", + com.azure.core.util.Context.NONE); + } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/GatesListByFleetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/GatesListByFleetSamples.java index 8fbe65d1990d..029aa771d415 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/GatesListByFleetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/GatesListByFleetSamples.java @@ -9,7 +9,7 @@ */ public final class GatesListByFleetSamples { /* - * x-ms-original-file: 2025-04-01-preview/Gates_ListByFleet.json + * x-ms-original-file: 2025-08-01-preview/Gates_ListByFleet.json */ /** * Sample code: Lists the Gates of a Fleet. @@ -20,4 +20,17 @@ public final class GatesListByFleetSamples { listsTheGatesOfAFleet(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.gates().listByFleet("rg1", "fleet1", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2025-08-01-preview/Gates_ListByFleet_MaximumSet_Gen.json + */ + /** + * Sample code: Gates_ListByFleet_MaximumSet. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void gatesListByFleetMaximumSet( + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.gates().listByFleet("rgfleets", "fleet-1", com.azure.core.util.Context.NONE); + } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/GatesUpdateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/GatesUpdateSamples.java index dfbd89afe476..361b4a6d33a0 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/GatesUpdateSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/GatesUpdateSamples.java @@ -13,7 +13,23 @@ */ public final class GatesUpdateSamples { /* - * x-ms-original-file: 2025-04-01-preview/Gates_Update.json + * x-ms-original-file: 2025-08-01-preview/Gates_Update_MaximumSet_Gen.json + */ + /** + * Sample code: Gates_Update_MaximumSet. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void + gatesUpdateMaximumSet(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.gates() + .update("rgfleets", "fleet-1", "12345678-910a-bcde-f000-000000000000", + new GatePatch().withProperties(new GatePatchProperties().withState(GateState.PENDING)), + "jqongzwjguenncptggiqzxxycakgrj", "fsyp", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-08-01-preview/Gates_Update.json */ /** * Sample code: Updates a Gate resource. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListSamples.java index cf508d7963b1..ef0a63a40913 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2025-04-01-preview/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Operations_List_MinimumSet_Gen.json */ /** * Sample code: List the operations for the provider. - generated by [MinimumSet] rule. @@ -22,7 +22,7 @@ public static void listTheOperationsForTheProviderGeneratedByMinimumSetRule( } /* - * x-ms-original-file: 2025-04-01-preview/Operations_List.json + * x-ms-original-file: 2025-08-01-preview/Operations_List.json */ /** * Sample code: List the operations for the provider. @@ -35,7 +35,7 @@ public static void listTheOperationsForTheProvider( } /* - * x-ms-original-file: 2025-04-01-preview/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/Operations_List_MaximumSet_Gen.json */ /** * Sample code: List the operations for the provider. - generated by [MaximumSet] rule. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsCreateOrUpdateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsCreateOrUpdateSamples.java index 5cd07cb96b85..e4dfea97d1e2 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsCreateOrUpdateSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsCreateOrUpdateSamples.java @@ -22,7 +22,7 @@ */ public final class UpdateRunsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: Create an UpdateRun. - generated by [MaximumSet] rule. @@ -50,7 +50,7 @@ public static void createAnUpdateRunGeneratedByMaximumSetRule( } /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_CreateOrUpdate.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_CreateOrUpdate.json */ /** * Sample code: Create an UpdateRun. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteSamples.java index 1841938de3d4..d0b8b64481b7 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class UpdateRunsDeleteSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Delete_MaximumSet_Gen.json */ /** * Sample code: Delete an updateRun resource. - generated by [MaximumSet] rule. @@ -23,7 +23,7 @@ public static void deleteAnUpdateRunResourceGeneratedByMaximumSetRule( } /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Delete.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Delete.json */ /** * Sample code: Delete an updateRun resource. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsGetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsGetSamples.java index 19e3d9702300..8d80697929d8 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsGetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsGetSamples.java @@ -9,7 +9,7 @@ */ public final class UpdateRunsGetSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Get_MaximumSet_Gen.json */ /** * Sample code: Gets an UpdateRun resource. - generated by [MaximumSet] rule. @@ -22,7 +22,7 @@ public static void getsAnUpdateRunResourceGeneratedByMaximumSetRule( } /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Get.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Get.json */ /** * Sample code: Gets an UpdateRun resource. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsListByFleetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsListByFleetSamples.java index 051b13cffb28..b1d8dac7f41a 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsListByFleetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsListByFleetSamples.java @@ -9,7 +9,7 @@ */ public final class UpdateRunsListByFleetSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_ListByFleet.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_ListByFleet.json */ /** * Sample code: Lists the UpdateRun resources by fleet. @@ -22,7 +22,7 @@ public static void listsTheUpdateRunResourcesByFleet( } /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_ListByFleet_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_ListByFleet_MaximumSet_Gen.json */ /** * Sample code: Lists the UpdateRun resources by fleet. - generated by [MaximumSet] rule. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsSkipSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsSkipSamples.java index 2af82455fd10..2c7436e2a435 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsSkipSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsSkipSamples.java @@ -14,7 +14,7 @@ */ public final class UpdateRunsSkipSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Skip_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Skip_MaximumSet_Gen.json */ /** * Sample code: Skips one or more member/group/stage/afterStageWait(s) of an UpdateRun. - generated by [MaximumSet] @@ -33,7 +33,7 @@ public static void skipsOneOrMoreMemberGroupStageAfterStageWaitSOfAnUpdateRunGen } /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Skip.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Skip.json */ /** * Sample code: Skips one or more member/group/stage/afterStageWait(s) of an UpdateRun. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStartSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStartSamples.java index 4b97f6f2901c..50bce441284a 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStartSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStartSamples.java @@ -9,7 +9,7 @@ */ public final class UpdateRunsStartSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Start_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Start_MaximumSet_Gen.json */ /** * Sample code: Starts an UpdateRun. - generated by [MaximumSet] rule. @@ -23,7 +23,7 @@ public static void startsAnUpdateRunGeneratedByMaximumSetRule( } /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Start.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Start.json */ /** * Sample code: Starts an UpdateRun. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStopSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStopSamples.java index 15d2e6aee6b9..5892435a4440 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStopSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStopSamples.java @@ -9,7 +9,7 @@ */ public final class UpdateRunsStopSamples { /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Stop_MaximumSet_Gen.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Stop_MaximumSet_Gen.json */ /** * Sample code: Stops an UpdateRun. - generated by [MaximumSet] rule. @@ -22,7 +22,7 @@ public static void stopsAnUpdateRunGeneratedByMaximumSetRule( } /* - * x-ms-original-file: 2025-04-01-preview/UpdateRuns_Stop.json + * x-ms-original-file: 2025-08-01-preview/UpdateRuns_Stop.json */ /** * Sample code: Stops an UpdateRun. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeNodeImageSelectionTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeNodeImageSelectionTests.java index 11807d450bb1..81fe1429b136 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeNodeImageSelectionTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeNodeImageSelectionTests.java @@ -13,15 +13,15 @@ public final class AutoUpgradeNodeImageSelectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AutoUpgradeNodeImageSelection model - = BinaryData.fromString("{\"type\":\"Consistent\"}").toObject(AutoUpgradeNodeImageSelection.class); - Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.CONSISTENT, model.type()); + = BinaryData.fromString("{\"type\":\"Latest\"}").toObject(AutoUpgradeNodeImageSelection.class); + Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.LATEST, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AutoUpgradeNodeImageSelection model - = new AutoUpgradeNodeImageSelection().withType(AutoUpgradeNodeImageSelectionType.CONSISTENT); + = new AutoUpgradeNodeImageSelection().withType(AutoUpgradeNodeImageSelectionType.LATEST); model = BinaryData.fromObject(model).toObject(AutoUpgradeNodeImageSelection.class); - Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.CONSISTENT, model.type()); + Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.LATEST, model.type()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfileOperationsGenerateUpdateRunMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfileOperationsGenerateUpdateRunMockTests.java index f568c7ca47ee..a42f6d1e68fd 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfileOperationsGenerateUpdateRunMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfileOperationsGenerateUpdateRunMockTests.java @@ -19,7 +19,7 @@ public final class AutoUpgradeProfileOperationsGenerateUpdateRunMockTests { @Test public void testGenerateUpdateRun() throws Exception { - String responseStr = "{\"id\":\"v\"}"; + String responseStr = "{\"id\":\"rkambt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -29,7 +29,7 @@ public void testGenerateUpdateRun() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); GenerateResponse response = manager.autoUpgradeProfileOperations() - .generateUpdateRun("vgoup", "fiibfggjioolvr", "x", com.azure.core.util.Context.NONE); + .generateUpdateRun("uxrkjp", "dwxf", "wiivwzjbhyzsx", com.azure.core.util.Context.NONE); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacePatchTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacePatchTests.java new file mode 100644 index 000000000000..e3c639b7f8cd --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetManagedNamespacePatchTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerservicefleet.models.FleetManagedNamespacePatch; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class FleetManagedNamespacePatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FleetManagedNamespacePatch model = BinaryData.fromString("{\"tags\":{\"yxczfclh\":\"xywnytnrsynlqidy\"}}") + .toObject(FleetManagedNamespacePatch.class); + Assertions.assertEquals("xywnytnrsynlqidy", model.tags().get("yxczfclh")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FleetManagedNamespacePatch model + = new FleetManagedNamespacePatch().withTags(mapOf("yxczfclh", "xywnytnrsynlqidy")); + model = BinaryData.fromObject(model).toObject(FleetManagedNamespacePatch.class); + Assertions.assertEquals("xywnytnrsynlqidy", model.tags().get("yxczfclh")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteMockTests.java index ca564d7e495a..1159d7096f92 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteMockTests.java @@ -28,7 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.fleetMembers() - .delete("dsotbobzd", "pcjwv", "hdldwmgxcxrsl", "mutwuoe", com.azure.core.util.Context.NONE); + .delete("oxciqopidoamcio", "hkh", "zxkhnzbonlwnto", "gokdwbwhks", com.azure.core.util.Context.NONE); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateMockTests.java index ce5fef7428df..698e33d9690b 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateMockTests.java @@ -27,7 +27,7 @@ public final class FleetUpdateStrategiesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"eljag\",\"groups\":[{\"name\":\"qhl\"},{\"name\":\"vriiio\"},{\"name\":\"nalghfkvtvsexso\"}],\"afterStageWaitInSeconds\":434184024,\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]},{\"name\":\"rhmzkwpj\",\"groups\":[{\"name\":\"spughftqsxhq\"},{\"name\":\"ujxukndxd\"},{\"name\":\"grjguufzd\"},{\"name\":\"syqtfi\"}],\"afterStageWaitInSeconds\":1852140441,\"beforeGates\":[{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}]},{\"name\":\"amvpphoszqzudph\",\"groups\":[{\"name\":\"vdkfwynwcvtbvk\"}],\"afterStageWaitInSeconds\":1479821561,\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]}]}},\"eTag\":\"wp\",\"id\":\"p\",\"name\":\"zcjaesgvvsccy\",\"type\":\"jguq\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"yvudtjuewbci\",\"groups\":[{\"name\":\"uwhcjyxccybv\"},{\"name\":\"ayakkudzpx\"},{\"name\":\"wjplma\"}],\"afterStageWaitInSeconds\":625665728,\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]},{\"name\":\"dg\",\"groups\":[{\"name\":\"sjkmnwqj\"}],\"afterStageWaitInSeconds\":1313812453,\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"}]},{\"name\":\"iacegfnmn\",\"groups\":[{\"name\":\"mvmemfnczd\"},{\"name\":\"vvbalx\"},{\"name\":\"l\"},{\"name\":\"chp\"}],\"afterStageWaitInSeconds\":1628077523,\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"}]}]}},\"eTag\":\"ukuv\",\"id\":\"cswsmystul\",\"name\":\"qypfcv\",\"type\":\"er\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,23 +36,42 @@ public void testCreateOrUpdate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - FleetUpdateStrategy response = manager.fleetUpdateStrategies() - .define("ytisibir") - .withExistingFleet("smwutwbdsrezpd", "hneuyowqkd") - .withStrategy(new UpdateRunStrategy().withStages(Arrays.asList(new UpdateStage().withName("pzimejzanlfzxi") - .withGroups(Arrays.asList(new UpdateGroup().withName("mbzonokix"), new UpdateGroup().withName("jq"))) - .withAfterStageWaitInSeconds(749799353) - .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL)))))) - .withIfMatch("lsj") - .withIfNoneMatch("dhszfjv") - .create(); + FleetUpdateStrategy response + = manager.fleetUpdateStrategies() + .define("vutpthjoxo") + .withExistingFleet("wb", "lgy") + .withStrategy(new UpdateRunStrategy().withStages(Arrays.asList( + new UpdateStage().withName("sbpimlq") + .withGroups(Arrays.asList(new UpdateGroup().withName("xkcgxxlxsffgcvi"), + new UpdateGroup().withName("qzdwlvwlyoup"), new UpdateGroup().withName("gfbkjubdyh"))) + .withAfterStageWaitInSeconds(373887537) + .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL))) + .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL))), + new UpdateStage().withName("wzf") + .withGroups(Arrays.asList(new UpdateGroup().withName("ttktlahbq"), + new UpdateGroup().withName("ctxtgzukxi"), new UpdateGroup().withName("mmqtgqqqxhr"))) + .withAfterStageWaitInSeconds(734515726) + .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), + new GateConfiguration().withType(GateType.APPROVAL))) + .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), + new GateConfiguration().withType(GateType.APPROVAL))), + new UpdateStage().withName("vokqdzfv") + .withGroups(Arrays.asList(new UpdateGroup().withName("vjlfrqtt"), + new UpdateGroup().withName("ajlkatnw"), new UpdateGroup().withName("yiopi"), + new UpdateGroup().withName("kqqfk"))) + .withAfterStageWaitInSeconds(113648851) + .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), + new GateConfiguration().withType(GateType.APPROVAL))) + .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), + new GateConfiguration().withType(GateType.APPROVAL), + new GateConfiguration().withType(GateType.APPROVAL)))))) + .withIfMatch("eoybfhjxakvvjgs") + .withIfNoneMatch("ordilmywwtkgkxny") + .create(); - Assertions.assertEquals("eljag", response.strategy().stages().get(0).name()); - Assertions.assertEquals("qhl", response.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(434184024, response.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("yvudtjuewbci", response.strategy().stages().get(0).name()); + Assertions.assertEquals("uwhcjyxccybv", response.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(625665728, response.strategy().stages().get(0).afterStageWaitInSeconds()); Assertions.assertEquals(GateType.APPROVAL, response.strategy().stages().get(0).beforeGates().get(0).type()); Assertions.assertEquals(GateType.APPROVAL, response.strategy().stages().get(0).afterGates().get(0).type()); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteMockTests.java index c2dba63e5ccb..529a36b1ab38 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteMockTests.java @@ -28,7 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.fleetUpdateStrategies() - .delete("pjorwkqnyhg", "ij", "jivfxzsjabib", "ystawfsdjpvkvp", com.azure.core.util.Context.NONE); + .delete("ygdxpgpqchis", "epn", "bjcrxgibbdaxco", "fozauorsuk", com.azure.core.util.Context.NONE); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetWithResponseMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetWithResponseMockTests.java index 373cc6e322d7..73cf2b9636f3 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetWithResponseMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class FleetUpdateStrategiesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"kyhejhzisxgf\",\"groups\":[{\"name\":\"olppvksrpqvujz\"}],\"afterStageWaitInSeconds\":126730684,\"beforeGates\":[{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"}]},{\"name\":\"ftswibyrcdlbhsh\",\"groups\":[{\"name\":\"racstwity\"}],\"afterStageWaitInSeconds\":56359046,\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]},{\"name\":\"odn\",\"groups\":[{\"name\":\"ltjcvnhltiugcxna\"},{\"name\":\"vwxqibyqunyo\"},{\"name\":\"xwlmdjr\"}],\"afterStageWaitInSeconds\":425671915,\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]}]}},\"eTag\":\"izsjqlhkrr\",\"id\":\"deibqip\",\"name\":\"kghv\",\"type\":\"ndzwmkrefa\"}"; + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"yvnqqybaryeuay\",\"groups\":[{\"name\":\"abqgzslesjcbh\"},{\"name\":\"rnntiewdjcv\"},{\"name\":\"quwrbehwag\"},{\"name\":\"hbuffkmrq\"}],\"afterStageWaitInSeconds\":226189444,\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"}]},{\"name\":\"jfutacoebj\",\"groups\":[{\"name\":\"zcjznmwcpmgua\"},{\"name\":\"draufactkah\"},{\"name\":\"ovajjziuxxps\"},{\"name\":\"neekulfg\"}],\"afterStageWaitInSeconds\":1157333655,\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"}]}]}},\"eTag\":\"d\",\"id\":\"tujbazpju\",\"name\":\"hminyflnorwmduv\",\"type\":\"pklvxw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FleetUpdateStrategy response = manager.fleetUpdateStrategies() - .getWithResponse("ttlstvlzywemhz", "ncsdtclusiyp", "sfgytguslfead", com.azure.core.util.Context.NONE) + .getWithResponse("hubskhudygooo", "kqfqjbvl", "orfmluiqt", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("kyhejhzisxgf", response.strategy().stages().get(0).name()); - Assertions.assertEquals("olppvksrpqvujz", response.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(126730684, response.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("yvnqqybaryeuay", response.strategy().stages().get(0).name()); + Assertions.assertEquals("abqgzslesjcbh", response.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(226189444, response.strategy().stages().get(0).afterStageWaitInSeconds()); Assertions.assertEquals(GateType.APPROVAL, response.strategy().stages().get(0).beforeGates().get(0).type()); Assertions.assertEquals(GateType.APPROVAL, response.strategy().stages().get(0).afterGates().get(0).type()); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetMockTests.java index 582987e3746e..4e2778544ef0 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetMockTests.java @@ -23,7 +23,7 @@ public final class FleetUpdateStrategiesListByFleetMockTests { @Test public void testListByFleet() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"klff\",\"groups\":[{\"name\":\"uwqlgzrfzeey\"}],\"afterStageWaitInSeconds\":32622439,\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]}]}},\"eTag\":\"ybbqwrv\",\"id\":\"dgmfpgvmpipasl\",\"name\":\"haq\",\"type\":\"x\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"strategy\":{\"stages\":[{\"name\":\"wey\",\"groups\":[{\"name\":\"unvmnnr\"},{\"name\":\"rbior\"},{\"name\":\"talywjhhgdnhxms\"},{\"name\":\"v\"}],\"afterStageWaitInSeconds\":2010806413,\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}]},{\"name\":\"iqndieuzaofj\",\"groups\":[{\"name\":\"cyyysfgdot\"}],\"afterStageWaitInSeconds\":1822085864,\"beforeGates\":[{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]},{\"name\":\"onmacjekniz\",\"groups\":[{\"name\":\"vcimpev\"}],\"afterStageWaitInSeconds\":716188449,\"beforeGates\":[{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]}]}},\"eTag\":\"dxsm\",\"id\":\"cwrwfs\",\"name\":\"jfnynszqujizdvoq\",\"type\":\"tiby\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testListByFleet() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<FleetUpdateStrategy> response = manager.fleetUpdateStrategies() - .listByFleet("jxbkzbzkdvn", "jabudurgkakmo", com.azure.core.util.Context.NONE); + PagedIterable<FleetUpdateStrategy> response + = manager.fleetUpdateStrategies().listByFleet("kwbqplhlvnuu", "pzlrphw", com.azure.core.util.Context.NONE); - Assertions.assertEquals("klff", response.iterator().next().strategy().stages().get(0).name()); - Assertions.assertEquals("uwqlgzrfzeey", + Assertions.assertEquals("wey", response.iterator().next().strategy().stages().get(0).name()); + Assertions.assertEquals("unvmnnr", response.iterator().next().strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(32622439, + Assertions.assertEquals(2010806413, response.iterator().next().strategy().stages().get(0).afterStageWaitInSeconds()); Assertions.assertEquals(GateType.APPROVAL, response.iterator().next().strategy().stages().get(0).beforeGates().get(0).type()); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyInnerTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyInnerTests.java index fc917ae23a7e..7c9e346339b3 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyInnerTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyInnerTests.java @@ -18,11 +18,11 @@ public final class FleetUpdateStrategyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FleetUpdateStrategyInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"strategy\":{\"stages\":[{\"name\":\"mclfplphoxuscr\",\"groups\":[{\"name\":\"gyepsbjt\"},{\"name\":\"zq\"}],\"afterStageWaitInSeconds\":2003590668,\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"}]},{\"name\":\"fjz\",\"groups\":[{\"name\":\"kqujidsuyono\"},{\"name\":\"glaocq\"},{\"name\":\"tcc\"}],\"afterStageWaitInSeconds\":528280521,\"beforeGates\":[{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}]},{\"name\":\"oyrxvwfudwpzntxh\",\"groups\":[{\"name\":\"lrqjbhckfr\"}],\"afterStageWaitInSeconds\":2044526914,\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]}]}},\"eTag\":\"bpzkafkuwbc\",\"id\":\"wbme\",\"name\":\"hseyvju\",\"type\":\"rts\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"mkcxozapvh\",\"groups\":[{\"name\":\"prglya\"},{\"name\":\"dd\"},{\"name\":\"kcbcue\"}],\"afterStageWaitInSeconds\":465544934,\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]},{\"name\":\"osx\",\"groups\":[{\"name\":\"rhzo\"},{\"name\":\"m\"},{\"name\":\"bmrqyibahwfl\"},{\"name\":\"szdtmhrkwof\"}],\"afterStageWaitInSeconds\":1026914225,\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]}]}},\"eTag\":\"tg\",\"id\":\"bwoenwashrt\",\"name\":\"tkcnqxwb\",\"type\":\"okulpiujwa\"}") .toObject(FleetUpdateStrategyInner.class); - Assertions.assertEquals("mclfplphoxuscr", model.strategy().stages().get(0).name()); - Assertions.assertEquals("gyepsbjt", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(2003590668, model.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("mkcxozapvh", model.strategy().stages().get(0).name()); + Assertions.assertEquals("prglya", model.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(465544934, model.strategy().stages().get(0).afterStageWaitInSeconds()); Assertions.assertEquals(GateType.APPROVAL, model.strategy().stages().get(0).beforeGates().get(0).type()); Assertions.assertEquals(GateType.APPROVAL, model.strategy().stages().get(0).afterGates().get(0).type()); } @@ -30,39 +30,29 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FleetUpdateStrategyInner model - = new FleetUpdateStrategyInner() - .withStrategy( - new UpdateRunStrategy() - .withStages(Arrays.asList( - new UpdateStage().withName("mclfplphoxuscr") - .withGroups(Arrays.asList(new UpdateGroup().withName("gyepsbjt"), - new UpdateGroup().withName("zq"))) - .withAfterStageWaitInSeconds(2003590668) - .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL))), - new UpdateStage().withName("fjz") - .withGroups(Arrays.asList(new UpdateGroup().withName("kqujidsuyono"), - new UpdateGroup().withName("glaocq"), new UpdateGroup().withName("tcc"))) - .withAfterStageWaitInSeconds(528280521) - .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))), - new UpdateStage().withName("oyrxvwfudwpzntxh") - .withGroups(Arrays.asList(new UpdateGroup().withName("lrqjbhckfr"))) - .withAfterStageWaitInSeconds(2044526914) - .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL)))))); + = new FleetUpdateStrategyInner().withStrategy(new UpdateRunStrategy().withStages(Arrays.asList( + new UpdateStage().withName("mkcxozapvh") + .withGroups(Arrays.asList(new UpdateGroup().withName("prglya"), new UpdateGroup().withName("dd"), + new UpdateGroup().withName("kcbcue"))) + .withAfterStageWaitInSeconds(465544934) + .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), + new GateConfiguration().withType(GateType.APPROVAL))) + .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), + new GateConfiguration().withType(GateType.APPROVAL), + new GateConfiguration().withType(GateType.APPROVAL))), + new UpdateStage().withName("osx") + .withGroups(Arrays.asList(new UpdateGroup().withName("rhzo"), new UpdateGroup().withName("m"), + new UpdateGroup().withName("bmrqyibahwfl"), new UpdateGroup().withName("szdtmhrkwof"))) + .withAfterStageWaitInSeconds(1026914225) + .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), + new GateConfiguration().withType(GateType.APPROVAL))) + .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), + new GateConfiguration().withType(GateType.APPROVAL), + new GateConfiguration().withType(GateType.APPROVAL)))))); model = BinaryData.fromObject(model).toObject(FleetUpdateStrategyInner.class); - Assertions.assertEquals("mclfplphoxuscr", model.strategy().stages().get(0).name()); - Assertions.assertEquals("gyepsbjt", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(2003590668, model.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("mkcxozapvh", model.strategy().stages().get(0).name()); + Assertions.assertEquals("prglya", model.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(465544934, model.strategy().stages().get(0).afterStageWaitInSeconds()); Assertions.assertEquals(GateType.APPROVAL, model.strategy().stages().get(0).beforeGates().get(0).type()); Assertions.assertEquals(GateType.APPROVAL, model.strategy().stages().get(0).afterGates().get(0).type()); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyListResultTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyListResultTests.java index ee0df58fcabb..0d2b80000bf1 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyListResultTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyListResultTests.java @@ -12,9 +12,9 @@ public final class FleetUpdateStrategyListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FleetUpdateStrategyListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"yjsflhhcaalnji\"},{\"name\":\"isxyawjoyaqcslyj\"},{\"name\":\"kiidzyex\"},{\"name\":\"nelixhnrztfo\"}]}},\"eTag\":\"bnxknalaulppg\",\"id\":\"tpnapnyiropuhpig\",\"name\":\"pgylg\",\"type\":\"git\"}],\"nextLink\":\"edjvcslynqw\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"y\"},{\"name\":\"cogjltdtbn\"},{\"name\":\"hadoocrk\"},{\"name\":\"cikhnv\"}]}},\"eTag\":\"mqg\",\"id\":\"queziky\",\"name\":\"ggxkallatmelwuip\",\"type\":\"ccjzkzivgvv\"}],\"nextLink\":\"ayrhyrnx\"}") .toObject(FleetUpdateStrategyListResult.class); - Assertions.assertEquals("yjsflhhcaalnji", model.value().get(0).strategy().stages().get(0).name()); - Assertions.assertEquals("edjvcslynqw", model.nextLink()); + Assertions.assertEquals("y", model.value().get(0).strategy().stages().get(0).name()); + Assertions.assertEquals("ayrhyrnx", model.nextLink()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyPropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyPropertiesTests.java index a049c6eaa01e..ecd831ff7ceb 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyPropertiesTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyPropertiesTests.java @@ -18,18 +18,18 @@ public final class FleetUpdateStrategyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FleetUpdateStrategyProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"kdeemaofmxagkvtm\",\"groups\":[{\"name\":\"qkrhahvljua\",\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}]},{\"name\":\"ualaexqpvfadmw\",\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"}]},{\"name\":\"gomz\",\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"}]},{\"name\":\"nbbelda\",\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]}],\"afterStageWaitInSeconds\":1578257059,\"beforeGates\":[{\"displayName\":\"hashsfwxosow\",\"type\":\"Approval\"},{\"displayName\":\"ugicjooxdjebw\",\"type\":\"Approval\"},{\"displayName\":\"wwfvov\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"ecivyh\",\"type\":\"Approval\"},{\"displayName\":\"uojgj\",\"type\":\"Approval\"},{\"displayName\":\"ueiotwmcdyt\",\"type\":\"Approval\"},{\"displayName\":\"it\",\"type\":\"Approval\"}]},{\"name\":\"rjaw\",\"groups\":[{\"name\":\"gxhnisk\",\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"}]},{\"name\":\"klwndnhjdauwhv\",\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]}],\"afterStageWaitInSeconds\":1267034334,\"beforeGates\":[{\"displayName\":\"pow\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"qlveualupjmkh\",\"type\":\"Approval\"},{\"displayName\":\"bbcswsrtjri\",\"type\":\"Approval\"}]},{\"name\":\"rbpbewtghfgblcg\",\"groups\":[{\"name\":\"vlvqhjkbegi\",\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]},{\"name\":\"ayqcgw\",\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}]},{\"name\":\"zmh\",\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"}]},{\"name\":\"avjcbpwx\",\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]}],\"afterStageWaitInSeconds\":1607260782,\"beforeGates\":[{\"displayName\":\"rwmdyvxqtay\",\"type\":\"Approval\"},{\"displayName\":\"wroyqbexrmcq\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"ojvknmefqsgzvaha\",\"type\":\"Approval\"},{\"displayName\":\"zhpvgqzcjrvxd\",\"type\":\"Approval\"},{\"displayName\":\"mwlxk\",\"type\":\"Approval\"},{\"displayName\":\"fhzovawjvzunluth\",\"type\":\"Approval\"}]},{\"name\":\"prnxipeil\",\"groups\":[{\"name\":\"uaejxdultsk\",\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"}]},{\"name\":\"e\",\"beforeGates\":[{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}]}],\"afterStageWaitInSeconds\":1290652027,\"beforeGates\":[{\"displayName\":\"sjyofdx\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"ttouwaboekqvkel\",\"type\":\"Approval\"}]}]}}") + "{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"qiiobyuqer\",\"groups\":[{\"name\":\"pqwcciuqgbdbutau\",\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]}],\"afterStageWaitInSeconds\":1745648414,\"beforeGates\":[{\"displayName\":\"oxafn\",\"type\":\"Approval\"},{\"displayName\":\"pichkoymkcdy\",\"type\":\"Approval\"},{\"displayName\":\"kkpwdreqnovvq\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"xywsuws\",\"type\":\"Approval\"},{\"displayName\":\"ndsytgadg\",\"type\":\"Approval\"}]},{\"name\":\"aeaeneqnzarrw\",\"groups\":[{\"name\":\"uijfqk\",\"beforeGates\":[{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}]}],\"afterStageWaitInSeconds\":1821555350,\"beforeGates\":[{\"displayName\":\"bwwift\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"puvks\",\"type\":\"Approval\"},{\"displayName\":\"saknynfsyn\",\"type\":\"Approval\"},{\"displayName\":\"huopxodlqiynto\",\"type\":\"Approval\"},{\"displayName\":\"hleosjsw\",\"type\":\"Approval\"}]},{\"name\":\"mslyzrpzbchckqqz\",\"groups\":[{\"name\":\"xiy\",\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]}],\"afterStageWaitInSeconds\":1415235910,\"beforeGates\":[{\"displayName\":\"mibzyhwitsmypyyn\",\"type\":\"Approval\"},{\"displayName\":\"pumnz\",\"type\":\"Approval\"},{\"displayName\":\"z\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"knso\",\"type\":\"Approval\"},{\"displayName\":\"hxbld\",\"type\":\"Approval\"},{\"displayName\":\"wrlkdmtn\",\"type\":\"Approval\"},{\"displayName\":\"kotl\",\"type\":\"Approval\"}]}]}}") .toObject(FleetUpdateStrategyProperties.class); - Assertions.assertEquals("kdeemaofmxagkvtm", model.strategy().stages().get(0).name()); - Assertions.assertEquals("qkrhahvljua", model.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals("qiiobyuqer", model.strategy().stages().get(0).name()); + Assertions.assertEquals("pqwcciuqgbdbutau", model.strategy().stages().get(0).groups().get(0).name()); Assertions.assertEquals(GateType.APPROVAL, model.strategy().stages().get(0).groups().get(0).beforeGates().get(0).type()); Assertions.assertEquals(GateType.APPROVAL, model.strategy().stages().get(0).groups().get(0).afterGates().get(0).type()); - Assertions.assertEquals(1578257059, model.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions.assertEquals("hashsfwxosow", model.strategy().stages().get(0).beforeGates().get(0).displayName()); + Assertions.assertEquals(1745648414, model.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("oxafn", model.strategy().stages().get(0).beforeGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.strategy().stages().get(0).beforeGates().get(0).type()); - Assertions.assertEquals("ecivyh", model.strategy().stages().get(0).afterGates().get(0).displayName()); + Assertions.assertEquals("xywsuws", model.strategy().stages().get(0).afterGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.strategy().stages().get(0).afterGates().get(0).type()); } @@ -37,62 +37,38 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { FleetUpdateStrategyProperties model = new FleetUpdateStrategyProperties() - .withStrategy(new UpdateRunStrategy().withStages(Arrays.asList( - new UpdateStage().withName("kdeemaofmxagkvtm") - .withGroups(Arrays.asList( - new UpdateGroup().withName("qkrhahvljua") + .withStrategy( + new UpdateRunStrategy().withStages(Arrays.asList( + new UpdateStage().withName("qiiobyuqer") + .withGroups(Arrays.asList(new UpdateGroup().withName("pqwcciuqgbdbutau") .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))), - new UpdateGroup().withName("ualaexqpvfadmw") - .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL))), - new UpdateGroup().withName("gomz") - .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL))), - new UpdateGroup().withName("nbbelda") - .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL), new GateConfiguration().withType(GateType.APPROVAL))) .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), new GateConfiguration().withType(GateType.APPROVAL), new GateConfiguration().withType(GateType.APPROVAL))))) - .withAfterStageWaitInSeconds(1578257059) - .withBeforeGates(Arrays.asList( - new GateConfiguration().withDisplayName("hashsfwxosow").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("ugicjooxdjebw").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("wwfvov").withType(GateType.APPROVAL))) - .withAfterGates( - Arrays.asList(new GateConfiguration().withDisplayName("ecivyh").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("uojgj").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("ueiotwmcdyt").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("it").withType(GateType.APPROVAL))), - new UpdateStage().withName("rjaw") - .withGroups(Arrays.asList( - new UpdateGroup().withName("gxhnisk") - .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL))), - new UpdateGroup().withName("klwndnhjdauwhv") - .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))) + .withAfterStageWaitInSeconds(1745648414) + .withBeforeGates(Arrays.asList( + new GateConfiguration().withDisplayName("oxafn").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("pichkoymkcdy").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("kkpwdreqnovvq").withType(GateType.APPROVAL))) + .withAfterGates(Arrays.asList( + new GateConfiguration().withDisplayName("xywsuws").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("ndsytgadg").withType(GateType.APPROVAL))), + new UpdateStage().withName("aeaeneqnzarrw") + .withGroups(Arrays.asList(new UpdateGroup().withName("uijfqk") + .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL))) .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL), new GateConfiguration().withType(GateType.APPROVAL))))) - .withAfterStageWaitInSeconds(1267034334) - .withBeforeGates( - Arrays.asList(new GateConfiguration().withDisplayName("pow").withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList( - new GateConfiguration().withDisplayName("qlveualupjmkh").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("bbcswsrtjri").withType(GateType.APPROVAL))), - new UpdateStage().withName("rbpbewtghfgblcg") - .withGroups(Arrays.asList( - new UpdateGroup().withName("vlvqhjkbegi") + .withAfterStageWaitInSeconds(1821555350) + .withBeforeGates(Arrays + .asList(new GateConfiguration().withDisplayName("bwwift").withType(GateType.APPROVAL))) + .withAfterGates(Arrays.asList( + new GateConfiguration().withDisplayName("puvks").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("saknynfsyn").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("huopxodlqiynto").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("hleosjsw").withType(GateType.APPROVAL))), + new UpdateStage().withName("mslyzrpzbchckqqz") + .withGroups(Arrays.asList(new UpdateGroup().withName("xiy") .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), new GateConfiguration().withType(GateType.APPROVAL), new GateConfiguration().withType(GateType.APPROVAL), @@ -100,59 +76,28 @@ public void testSerialize() throws Exception { .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), new GateConfiguration().withType(GateType.APPROVAL), new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))), - new UpdateGroup().withName("ayqcgw") - .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))), - new UpdateGroup().withName("zmh") - .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL))), - new UpdateGroup().withName("avjcbpwx") - .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))))) - .withAfterStageWaitInSeconds(1607260782) - .withBeforeGates(Arrays.asList( - new GateConfiguration().withDisplayName("rwmdyvxqtay").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("wroyqbexrmcq").withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList( - new GateConfiguration().withDisplayName("ojvknmefqsgzvaha").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("zhpvgqzcjrvxd").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("mwlxk").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("fhzovawjvzunluth").withType(GateType.APPROVAL))), - new UpdateStage().withName("prnxipeil") - .withGroups(Arrays.asList( - new UpdateGroup().withName("uaejxdultsk") - .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL))), - new UpdateGroup().withName("e") - .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), new GateConfiguration().withType(GateType.APPROVAL))))) - .withAfterStageWaitInSeconds(1290652027) - .withBeforeGates(Arrays - .asList(new GateConfiguration().withDisplayName("sjyofdx").withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList( - new GateConfiguration().withDisplayName("ttouwaboekqvkel").withType(GateType.APPROVAL)))))); + .withAfterStageWaitInSeconds(1415235910) + .withBeforeGates(Arrays.asList( + new GateConfiguration().withDisplayName("mibzyhwitsmypyyn").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("pumnz").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("z").withType(GateType.APPROVAL))) + .withAfterGates(Arrays.asList( + new GateConfiguration().withDisplayName("knso").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("hxbld").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("wrlkdmtn").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("kotl").withType(GateType.APPROVAL)))))); model = BinaryData.fromObject(model).toObject(FleetUpdateStrategyProperties.class); - Assertions.assertEquals("kdeemaofmxagkvtm", model.strategy().stages().get(0).name()); - Assertions.assertEquals("qkrhahvljua", model.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals("qiiobyuqer", model.strategy().stages().get(0).name()); + Assertions.assertEquals("pqwcciuqgbdbutau", model.strategy().stages().get(0).groups().get(0).name()); Assertions.assertEquals(GateType.APPROVAL, model.strategy().stages().get(0).groups().get(0).beforeGates().get(0).type()); Assertions.assertEquals(GateType.APPROVAL, model.strategy().stages().get(0).groups().get(0).afterGates().get(0).type()); - Assertions.assertEquals(1578257059, model.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions.assertEquals("hashsfwxosow", model.strategy().stages().get(0).beforeGates().get(0).displayName()); + Assertions.assertEquals(1745648414, model.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("oxafn", model.strategy().stages().get(0).beforeGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.strategy().stages().get(0).beforeGates().get(0).type()); - Assertions.assertEquals("ecivyh", model.strategy().stages().get(0).afterGates().get(0).displayName()); + Assertions.assertEquals("xywsuws", model.strategy().stages().get(0).afterGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.strategy().stages().get(0).afterGates().get(0).type()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteMockTests.java index 53e86ffc4e7f..f9d5190bcc01 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.fleets().delete("wgdrjervnaenqp", "hin", "oygmift", com.azure.core.util.Context.NONE); + manager.fleets().delete("mzqa", "krmnjijpxacqqud", "nbyxbaaabjyv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsWithResponseMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsWithResponseMockTests.java index 489e0e7ee408..1db5a369f986 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsWithResponseMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsWithResponseMockTests.java @@ -19,8 +19,7 @@ public final class FleetsListCredentialsWithResponseMockTests { @Test public void testListCredentialsWithResponse() throws Exception { - String responseStr - = "{\"kubeconfigs\":[{\"name\":\"gxtibqdxbxw\"},{\"name\":\"ogqxndlkzgxhuri\"},{\"name\":\"podxunkb\"}]}"; + String responseStr = "{\"kubeconfigs\":[{\"name\":\"ckw\"},{\"name\":\"qwhxxbuyqaxzfeqz\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +29,7 @@ public void testListCredentialsWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FleetCredentialResults response = manager.fleets() - .listCredentialsWithResponse("nsikvmkqzeqqkdl", "fzxmhhvhgureodkw", com.azure.core.util.Context.NONE) + .listCredentialsWithResponse("dxrbuukzcle", "yhmlwpaztzp", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GateConfigurationTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GateConfigurationTests.java index ad73f1312f27..9c6435fd61b8 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GateConfigurationTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GateConfigurationTests.java @@ -12,17 +12,17 @@ public final class GateConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - GateConfiguration model = BinaryData.fromString("{\"displayName\":\"koklya\",\"type\":\"Approval\"}") + GateConfiguration model = BinaryData.fromString("{\"displayName\":\"bxvwv\",\"type\":\"Approval\"}") .toObject(GateConfiguration.class); - Assertions.assertEquals("koklya", model.displayName()); + Assertions.assertEquals("bxvwv", model.displayName()); Assertions.assertEquals(GateType.APPROVAL, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - GateConfiguration model = new GateConfiguration().withDisplayName("koklya").withType(GateType.APPROVAL); + GateConfiguration model = new GateConfiguration().withDisplayName("bxvwv").withType(GateType.APPROVAL); model = BinaryData.fromObject(model).toObject(GateConfiguration.class); - Assertions.assertEquals("koklya", model.displayName()); + Assertions.assertEquals("bxvwv", model.displayName()); Assertions.assertEquals(GateType.APPROVAL, model.type()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GateInnerTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GateInnerTests.java index 879cd8269076..c6256022230d 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GateInnerTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GateInnerTests.java @@ -15,12 +15,12 @@ public final class GateInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GateInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"maajrmvdjwzrlo\",\"gateType\":\"Approval\",\"target\":{\"id\":\"clwhijcoejctbz\",\"updateRunProperties\":{\"name\":\"s\",\"stage\":\"y\",\"group\":\"kbfkg\",\"timing\":\"Before\"}},\"state\":\"Pending\"},\"eTag\":\"exxppofmxaxcfjp\",\"id\":\"dtocj\",\"name\":\"xhvpmoue\",\"type\":\"hd\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"abphlw\",\"gateType\":\"Approval\",\"target\":{\"id\":\"lfktsths\",\"updateRunProperties\":{\"name\":\"ocmnyyazttbtwwrq\",\"stage\":\"edckzywbiexzfey\",\"group\":\"axibxujw\",\"timing\":\"Before\"}},\"state\":\"Completed\"},\"eTag\":\"almuzyoxaepdkzja\",\"id\":\"ux\",\"name\":\"hdwbavxbniwdjs\",\"type\":\"zt\"}") .toObject(GateInner.class); - Assertions.assertEquals("maajrmvdjwzrlo", model.displayName()); + Assertions.assertEquals("abphlw", model.displayName()); Assertions.assertEquals(GateType.APPROVAL, model.gateType()); - Assertions.assertEquals("clwhijcoejctbz", model.target().id()); + Assertions.assertEquals("lfktsths", model.target().id()); Assertions.assertEquals(Timing.BEFORE, model.target().updateRunProperties().timing()); - Assertions.assertEquals(GateState.PENDING, model.state()); + Assertions.assertEquals(GateState.COMPLETED, model.state()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GateListResultTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GateListResultTests.java index 77a162ee1d60..d10eb7617615 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GateListResultTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GateListResultTests.java @@ -15,13 +15,13 @@ public final class GateListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GateListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"kftutqxlngxlefg\",\"gateType\":\"Approval\",\"target\":{\"id\":\"nxkrx\",\"updateRunProperties\":{\"name\":\"mi\",\"stage\":\"thz\",\"group\":\"qdrabhjybigehoqf\",\"timing\":\"After\"}},\"state\":\"Skipped\"},\"eTag\":\"kanyktzlcuiywg\",\"id\":\"wgndrvynhzgpp\",\"name\":\"rcgyn\",\"type\":\"ocpecfvmmco\"}],\"nextLink\":\"sxlzevgbmqj\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"kyzxuutk\",\"gateType\":\"Approval\",\"target\":{\"id\":\"ws\",\"updateRunProperties\":{\"name\":\"svlxotogtwrup\",\"stage\":\"xvnmicykvceov\",\"group\":\"lo\",\"timing\":\"After\"}},\"state\":\"Pending\"},\"eTag\":\"yfjfcnjbkcn\",\"id\":\"hbttkphyw\",\"name\":\"nv\",\"type\":\"t\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"mclfplphoxuscr\",\"gateType\":\"Approval\",\"target\":{\"id\":\"bgyepsbj\",\"updateRunProperties\":{\"name\":\"zq\",\"stage\":\"xywpmueefjzwfqkq\",\"group\":\"ids\",\"timing\":\"Before\"}},\"state\":\"Completed\"},\"eTag\":\"obglaocqxtcc\",\"id\":\"yudxytlmoy\",\"name\":\"xv\",\"type\":\"fudwpznt\"}],\"nextLink\":\"dzhlrq\"}") .toObject(GateListResult.class); - Assertions.assertEquals("kftutqxlngxlefg", model.value().get(0).displayName()); + Assertions.assertEquals("kyzxuutk", model.value().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.value().get(0).gateType()); - Assertions.assertEquals("nxkrx", model.value().get(0).target().id()); + Assertions.assertEquals("ws", model.value().get(0).target().id()); Assertions.assertEquals(Timing.AFTER, model.value().get(0).target().updateRunProperties().timing()); - Assertions.assertEquals(GateState.SKIPPED, model.value().get(0).state()); - Assertions.assertEquals("sxlzevgbmqj", model.nextLink()); + Assertions.assertEquals(GateState.PENDING, model.value().get(0).state()); + Assertions.assertEquals("dzhlrq", model.nextLink()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GatePropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GatePropertiesTests.java index 1a3eeda05181..68be76f3e6f1 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GatePropertiesTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GatePropertiesTests.java @@ -15,12 +15,12 @@ public final class GatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GateProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Canceled\",\"displayName\":\"qeojnxqbzvddntw\",\"gateType\":\"Approval\",\"target\":{\"id\":\"eic\",\"updateRunProperties\":{\"name\":\"w\",\"stage\":\"zao\",\"group\":\"uhrhcffcyddgl\",\"timing\":\"After\"}},\"state\":\"Skipped\"}") + "{\"provisioningState\":\"Succeeded\",\"displayName\":\"gnxytxhpzxbz\",\"gateType\":\"Approval\",\"target\":{\"id\":\"zabglcuhxwt\",\"updateRunProperties\":{\"name\":\"yqiklbbovplwzb\",\"stage\":\"gy\",\"group\":\"uosvmkfssxqukk\",\"timing\":\"After\"}},\"state\":\"Pending\"}") .toObject(GateProperties.class); - Assertions.assertEquals("qeojnxqbzvddntw", model.displayName()); + Assertions.assertEquals("gnxytxhpzxbz", model.displayName()); Assertions.assertEquals(GateType.APPROVAL, model.gateType()); - Assertions.assertEquals("eic", model.target().id()); + Assertions.assertEquals("zabglcuhxwt", model.target().id()); Assertions.assertEquals(Timing.AFTER, model.target().updateRunProperties().timing()); - Assertions.assertEquals(GateState.SKIPPED, model.state()); + Assertions.assertEquals(GateState.PENDING, model.state()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GateTargetTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GateTargetTests.java index 3e3f223e1e7f..86e1f8c65aa0 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GateTargetTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GateTargetTests.java @@ -13,9 +13,9 @@ public final class GateTargetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GateTarget model = BinaryData.fromString( - "{\"id\":\"hjq\",\"updateRunProperties\":{\"name\":\"pyeicxm\",\"stage\":\"iwqvhkh\",\"group\":\"uigdtopbobjog\",\"timing\":\"Before\"}}") + "{\"id\":\"gmgsxnkjzkde\",\"updateRunProperties\":{\"name\":\"pvlopwiyighxpkd\",\"stage\":\"baiuebbaumny\",\"group\":\"ped\",\"timing\":\"After\"}}") .toObject(GateTarget.class); - Assertions.assertEquals("hjq", model.id()); - Assertions.assertEquals(Timing.BEFORE, model.updateRunProperties().timing()); + Assertions.assertEquals("gmgsxnkjzkde", model.id()); + Assertions.assertEquals(Timing.AFTER, model.updateRunProperties().timing()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GatesGetWithResponseMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GatesGetWithResponseMockTests.java index 008e853f3002..39ff2a6b1c53 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GatesGetWithResponseMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GatesGetWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class GatesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"kcdyhbpk\",\"gateType\":\"Approval\",\"target\":{\"id\":\"wdreqnovvqfovl\",\"updateRunProperties\":{\"name\":\"ywsuwsy\",\"stage\":\"ndsytgadg\",\"group\":\"aeaeneqnzarrw\",\"timing\":\"Before\"}},\"state\":\"Completed\"},\"eTag\":\"ijfqkacewiipfp\",\"id\":\"ji\",\"name\":\"wwiftohqkvpuv\",\"type\":\"sgplsakn\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"zqzudph\",\"gateType\":\"Approval\",\"target\":{\"id\":\"mvdk\",\"updateRunProperties\":{\"name\":\"ynwcvtbv\",\"stage\":\"yhmtnvyqiat\",\"group\":\"wp\",\"timing\":\"After\"}},\"state\":\"Completed\"},\"eTag\":\"zcjaesgvvsccy\",\"id\":\"g\",\"name\":\"qfhwyg\",\"type\":\"lvdnkfx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,14 +33,13 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - Gate response = manager.gates() - .getWithResponse("erpqlpqwcciuqg", "dbutauvfbtkuwhh", "hykojoxafnndlpic", com.azure.core.util.Context.NONE) - .getValue(); + Gate response + = manager.gates().getWithResponse("yqtfihwh", "otzi", "gamv", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("kcdyhbpk", response.displayName()); + Assertions.assertEquals("zqzudph", response.displayName()); Assertions.assertEquals(GateType.APPROVAL, response.gateType()); - Assertions.assertEquals("wdreqnovvqfovl", response.target().id()); - Assertions.assertEquals(Timing.BEFORE, response.target().updateRunProperties().timing()); + Assertions.assertEquals("mvdk", response.target().id()); + Assertions.assertEquals(Timing.AFTER, response.target().updateRunProperties().timing()); Assertions.assertEquals(GateState.COMPLETED, response.state()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GatesListByFleetMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GatesListByFleetMockTests.java index 5dce35aa368d..fbca1b8f7298 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GatesListByFleetMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GatesListByFleetMockTests.java @@ -25,7 +25,7 @@ public final class GatesListByFleetMockTests { @Test public void testListByFleet() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"khnvpam\",\"gateType\":\"Approval\",\"target\":{\"id\":\"x\",\"updateRunProperties\":{\"name\":\"u\",\"stage\":\"ik\",\"group\":\"ggxkallatmelwuip\",\"timing\":\"After\"}},\"state\":\"Skipped\"},\"eTag\":\"zkzivgvvcnay\",\"id\":\"yrnxxmueedn\",\"name\":\"rdvstkwqqtch\",\"type\":\"alm\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"gllqwjy\",\"gateType\":\"Approval\",\"target\":{\"id\":\"jayvblmhv\",\"updateRunProperties\":{\"name\":\"uhbxvvy\",\"stage\":\"s\",\"group\":\"byrqufeg\",\"timing\":\"Before\"}},\"state\":\"Pending\"},\"eTag\":\"zfbn\",\"id\":\"mctlpdngitv\",\"name\":\"bmhrixkwmyijejv\",\"type\":\"grhbpn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,13 +34,12 @@ public void testListByFleet() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<Gate> response - = manager.gates().listByFleet("gsyocogj", "tdtbnnhadooc", com.azure.core.util.Context.NONE); + PagedIterable<Gate> response = manager.gates().listByFleet("ggjioolvr", "x", com.azure.core.util.Context.NONE); - Assertions.assertEquals("khnvpam", response.iterator().next().displayName()); + Assertions.assertEquals("gllqwjy", response.iterator().next().displayName()); Assertions.assertEquals(GateType.APPROVAL, response.iterator().next().gateType()); - Assertions.assertEquals("x", response.iterator().next().target().id()); - Assertions.assertEquals(Timing.AFTER, response.iterator().next().target().updateRunProperties().timing()); - Assertions.assertEquals(GateState.SKIPPED, response.iterator().next().state()); + Assertions.assertEquals("jayvblmhv", response.iterator().next().target().id()); + Assertions.assertEquals(Timing.BEFORE, response.iterator().next().target().updateRunProperties().timing()); + Assertions.assertEquals(GateState.PENDING, response.iterator().next().state()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GatesUpdateMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GatesUpdateMockTests.java index 1362bbc67f83..1a4acf4bbc80 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GatesUpdateMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GatesUpdateMockTests.java @@ -26,7 +26,7 @@ public final class GatesUpdateMockTests { @Test public void testUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"ox\",\"gateType\":\"Approval\",\"target\":{\"id\":\"suiizynkedyat\",\"updateRunProperties\":{\"name\":\"yhqmibzyhwi\",\"stage\":\"mypyynpcdpu\",\"group\":\"zgmwznmabikns\",\"timing\":\"Before\"}},\"state\":\"Pending\"},\"eTag\":\"hxbld\",\"id\":\"wwrlkdmtncv\",\"name\":\"kotl\",\"type\":\"xdy\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"wkyhkobopgxe\",\"gateType\":\"Approval\",\"target\":{\"id\":\"owepbqpcrfkb\",\"updateRunProperties\":{\"name\":\"csnjvcdwxlpqekft\",\"stage\":\"htjsying\",\"group\":\"qatmtdhtmdvy\",\"timing\":\"Before\"}},\"state\":\"Pending\"},\"eTag\":\"dgszywkbirryuzh\",\"id\":\"kj\",\"name\":\"qrvqq\",\"type\":\"atjinrvgoupmfiib\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,13 +36,13 @@ public void testUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Gate response = manager.gates() - .update("n", "synljphuopxodl", "iyntorzihle", - new GatePatch().withProperties(new GatePatchProperties().withState(GateState.PENDING)), "jswsrmslyz", - "pzbchck", com.azure.core.util.Context.NONE); + .update("semdwzrmu", "apfcqdpsq", "qvpsvuoymg", + new GatePatch().withProperties(new GatePatchProperties().withState(GateState.PENDING)), "elvezrypq", + "mfe", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ox", response.displayName()); + Assertions.assertEquals("wkyhkobopgxe", response.displayName()); Assertions.assertEquals(GateType.APPROVAL, response.gateType()); - Assertions.assertEquals("suiizynkedyat", response.target().id()); + Assertions.assertEquals("owepbqpcrfkb", response.target().id()); Assertions.assertEquals(Timing.BEFORE, response.target().updateRunProperties().timing()); Assertions.assertEquals(GateState.PENDING, response.state()); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GenerateResponseInnerTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GenerateResponseInnerTests.java index bfb79827f404..d11e2251df94 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GenerateResponseInnerTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/GenerateResponseInnerTests.java @@ -10,7 +10,6 @@ public final class GenerateResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - GenerateResponseInner model - = BinaryData.fromString("{\"id\":\"jhxxjyn\"}").toObject(GenerateResponseInner.class); + GenerateResponseInner model = BinaryData.fromString("{\"id\":\"c\"}").toObject(GenerateResponseInner.class); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpdateTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpdateTests.java index 49c82990fc3a..edd0f21dbb1d 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpdateTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpdateTests.java @@ -18,24 +18,24 @@ public final class ManagedClusterUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedClusterUpdate model = BinaryData.fromString( - "{\"upgrade\":{\"type\":\"ControlPlaneOnly\",\"kubernetesVersion\":\"nuqszfkbey\"},\"nodeImageSelection\":{\"type\":\"Latest\",\"customNodeImageVersions\":[{\"version\":\"mwvvjektcxsenhw\"},{\"version\":\"s\"},{\"version\":\"rzpwvlqdqgbiq\"}]}}") + "{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"qbhsfxobl\"},\"nodeImageSelection\":{\"type\":\"Custom\",\"customNodeImageVersions\":[{\"version\":\"pe\"},{\"version\":\"wfbkrvrns\"},{\"version\":\"hqjohxcrsbfova\"}]}}") .toObject(ManagedClusterUpdate.class); - Assertions.assertEquals(ManagedClusterUpgradeType.CONTROL_PLANE_ONLY, model.upgrade().type()); - Assertions.assertEquals("nuqszfkbey", model.upgrade().kubernetesVersion()); - Assertions.assertEquals(NodeImageSelectionType.LATEST, model.nodeImageSelection().type()); + Assertions.assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.upgrade().type()); + Assertions.assertEquals("qbhsfxobl", model.upgrade().kubernetesVersion()); + Assertions.assertEquals(NodeImageSelectionType.CUSTOM, model.nodeImageSelection().type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedClusterUpdate model = new ManagedClusterUpdate() - .withUpgrade(new ManagedClusterUpgradeSpec().withType(ManagedClusterUpgradeType.CONTROL_PLANE_ONLY) - .withKubernetesVersion("nuqszfkbey")) - .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.LATEST) + .withUpgrade(new ManagedClusterUpgradeSpec().withType(ManagedClusterUpgradeType.NODE_IMAGE_ONLY) + .withKubernetesVersion("qbhsfxobl")) + .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.CUSTOM) .withCustomNodeImageVersions( Arrays.asList(new NodeImageVersion(), new NodeImageVersion(), new NodeImageVersion()))); model = BinaryData.fromObject(model).toObject(ManagedClusterUpdate.class); - Assertions.assertEquals(ManagedClusterUpgradeType.CONTROL_PLANE_ONLY, model.upgrade().type()); - Assertions.assertEquals("nuqszfkbey", model.upgrade().kubernetesVersion()); - Assertions.assertEquals(NodeImageSelectionType.LATEST, model.nodeImageSelection().type()); + Assertions.assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.upgrade().type()); + Assertions.assertEquals("qbhsfxobl", model.upgrade().kubernetesVersion()); + Assertions.assertEquals(NodeImageSelectionType.CUSTOM, model.nodeImageSelection().type()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpgradeSpecTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpgradeSpecTests.java index fb940053cbb0..168286fa0438 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpgradeSpecTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpgradeSpecTests.java @@ -13,19 +13,19 @@ public final class ManagedClusterUpgradeSpecTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedClusterUpgradeSpec model - = BinaryData.fromString("{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"hkaetcktvfc\"}") + = BinaryData.fromString("{\"type\":\"ControlPlaneOnly\",\"kubernetesVersion\":\"uvwbhsqfs\"}") .toObject(ManagedClusterUpgradeSpec.class); - Assertions.assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.type()); - Assertions.assertEquals("hkaetcktvfc", model.kubernetesVersion()); + Assertions.assertEquals(ManagedClusterUpgradeType.CONTROL_PLANE_ONLY, model.type()); + Assertions.assertEquals("uvwbhsqfs", model.kubernetesVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedClusterUpgradeSpec model - = new ManagedClusterUpgradeSpec().withType(ManagedClusterUpgradeType.NODE_IMAGE_ONLY) - .withKubernetesVersion("hkaetcktvfc"); + = new ManagedClusterUpgradeSpec().withType(ManagedClusterUpgradeType.CONTROL_PLANE_ONLY) + .withKubernetesVersion("uvwbhsqfs"); model = BinaryData.fromObject(model).toObject(ManagedClusterUpgradeSpec.class); - Assertions.assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.type()); - Assertions.assertEquals("hkaetcktvfc", model.kubernetesVersion()); + Assertions.assertEquals(ManagedClusterUpgradeType.CONTROL_PLANE_ONLY, model.type()); + Assertions.assertEquals("uvwbhsqfs", model.kubernetesVersion()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedNamespacePropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedNamespacePropertiesTests.java new file mode 100644 index 000000000000..c06098f1ecea --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedNamespacePropertiesTests.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerservicefleet.models.ManagedNamespaceProperties; +import com.azure.resourcemanager.containerservicefleet.models.NetworkPolicy; +import com.azure.resourcemanager.containerservicefleet.models.PolicyRule; +import com.azure.resourcemanager.containerservicefleet.models.ResourceQuota; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ManagedNamespacePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedNamespaceProperties model = BinaryData.fromString( + "{\"labels\":{\"njeaseipheofloke\":\"hcbonqvpkvlr\",\"enjbdlwtgrhp\":\"y\",\"umasxazjpq\":\"jp\",\"ualhbxxhejj\":\"e\"},\"annotations\":{\"mcy\":\"dudgwdslfhot\"},\"defaultResourceQuota\":{\"cpuRequest\":\"lbjnpgacftadehx\",\"cpuLimit\":\"tyfsoppusuesn\",\"memoryRequest\":\"dejbavo\",\"memoryLimit\":\"zdmohctbqvu\"},\"defaultNetworkPolicy\":{\"ingress\":\"AllowAll\",\"egress\":\"DenyAll\"}}") + .toObject(ManagedNamespaceProperties.class); + Assertions.assertEquals("hcbonqvpkvlr", model.labels().get("njeaseipheofloke")); + Assertions.assertEquals("dudgwdslfhot", model.annotations().get("mcy")); + Assertions.assertEquals("lbjnpgacftadehx", model.defaultResourceQuota().cpuRequest()); + Assertions.assertEquals("tyfsoppusuesn", model.defaultResourceQuota().cpuLimit()); + Assertions.assertEquals("dejbavo", model.defaultResourceQuota().memoryRequest()); + Assertions.assertEquals("zdmohctbqvu", model.defaultResourceQuota().memoryLimit()); + Assertions.assertEquals(PolicyRule.ALLOW_ALL, model.defaultNetworkPolicy().ingress()); + Assertions.assertEquals(PolicyRule.DENY_ALL, model.defaultNetworkPolicy().egress()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedNamespaceProperties model = new ManagedNamespaceProperties() + .withLabels( + mapOf("njeaseipheofloke", "hcbonqvpkvlr", "enjbdlwtgrhp", "y", "umasxazjpq", "jp", "ualhbxxhejj", "e")) + .withAnnotations(mapOf("mcy", "dudgwdslfhot")) + .withDefaultResourceQuota(new ResourceQuota().withCpuRequest("lbjnpgacftadehx") + .withCpuLimit("tyfsoppusuesn") + .withMemoryRequest("dejbavo") + .withMemoryLimit("zdmohctbqvu")) + .withDefaultNetworkPolicy( + new NetworkPolicy().withIngress(PolicyRule.ALLOW_ALL).withEgress(PolicyRule.DENY_ALL)); + model = BinaryData.fromObject(model).toObject(ManagedNamespaceProperties.class); + Assertions.assertEquals("hcbonqvpkvlr", model.labels().get("njeaseipheofloke")); + Assertions.assertEquals("dudgwdslfhot", model.annotations().get("mcy")); + Assertions.assertEquals("lbjnpgacftadehx", model.defaultResourceQuota().cpuRequest()); + Assertions.assertEquals("tyfsoppusuesn", model.defaultResourceQuota().cpuLimit()); + Assertions.assertEquals("dejbavo", model.defaultResourceQuota().memoryRequest()); + Assertions.assertEquals("zdmohctbqvu", model.defaultResourceQuota().memoryLimit()); + Assertions.assertEquals(PolicyRule.ALLOW_ALL, model.defaultNetworkPolicy().ingress()); + Assertions.assertEquals(PolicyRule.DENY_ALL, model.defaultNetworkPolicy().egress()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NetworkPolicyTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NetworkPolicyTests.java new file mode 100644 index 000000000000..0e7257d2879c --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NetworkPolicyTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerservicefleet.models.NetworkPolicy; +import com.azure.resourcemanager.containerservicefleet.models.PolicyRule; +import org.junit.jupiter.api.Assertions; + +public final class NetworkPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkPolicy model = BinaryData.fromString("{\"ingress\":\"AllowAll\",\"egress\":\"AllowSameNamespace\"}") + .toObject(NetworkPolicy.class); + Assertions.assertEquals(PolicyRule.ALLOW_ALL, model.ingress()); + Assertions.assertEquals(PolicyRule.ALLOW_SAME_NAMESPACE, model.egress()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkPolicy model + = new NetworkPolicy().withIngress(PolicyRule.ALLOW_ALL).withEgress(PolicyRule.ALLOW_SAME_NAMESPACE); + model = BinaryData.fromObject(model).toObject(NetworkPolicy.class); + Assertions.assertEquals(PolicyRule.ALLOW_ALL, model.ingress()); + Assertions.assertEquals(PolicyRule.ALLOW_SAME_NAMESPACE, model.egress()); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionStatusTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionStatusTests.java index 71e198f44482..56d823633138 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionStatusTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionStatusTests.java @@ -10,8 +10,8 @@ public final class NodeImageSelectionStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NodeImageSelectionStatus model = BinaryData - .fromString("{\"selectedNodeImageVersions\":[{\"version\":\"nmpxttdb\"},{\"version\":\"bnlankxmyskpb\"}]}") + NodeImageSelectionStatus model = BinaryData.fromString( + "{\"selectedNodeImageVersions\":[{\"version\":\"xzb\"},{\"version\":\"blylpstdbh\"},{\"version\":\"srzdzucerscdn\"},{\"version\":\"evfiwjmygt\"}]}") .toObject(NodeImageSelectionStatus.class); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionTests.java index 541a97faa3fb..d8bbc7be76c4 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionTests.java @@ -14,18 +14,17 @@ public final class NodeImageSelectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NodeImageSelection model = BinaryData.fromString( - "{\"type\":\"Latest\",\"customNodeImageVersions\":[{\"version\":\"kymuctqhjfbebr\"},{\"version\":\"xerf\"},{\"version\":\"utttxfvjrbirp\"}]}") - .toObject(NodeImageSelection.class); - Assertions.assertEquals(NodeImageSelectionType.LATEST, model.type()); + NodeImageSelection model + = BinaryData.fromString("{\"type\":\"Custom\",\"customNodeImageVersions\":[{\"version\":\"birx\"}]}") + .toObject(NodeImageSelection.class); + Assertions.assertEquals(NodeImageSelectionType.CUSTOM, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NodeImageSelection model = new NodeImageSelection().withType(NodeImageSelectionType.LATEST) - .withCustomNodeImageVersions( - Arrays.asList(new NodeImageVersion(), new NodeImageVersion(), new NodeImageVersion())); + NodeImageSelection model = new NodeImageSelection().withType(NodeImageSelectionType.CUSTOM) + .withCustomNodeImageVersions(Arrays.asList(new NodeImageVersion())); model = BinaryData.fromObject(model).toObject(NodeImageSelection.class); - Assertions.assertEquals(NodeImageSelectionType.LATEST, model.type()); + Assertions.assertEquals(NodeImageSelectionType.CUSTOM, model.type()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageVersionTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageVersionTests.java index 7fef5e7bbffe..3ceaf7291252 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageVersionTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageVersionTests.java @@ -11,7 +11,7 @@ public final class NodeImageVersionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NodeImageVersion model - = BinaryData.fromString("{\"version\":\"epcyvahfnlj\"}").toObject(NodeImageVersion.class); + = BinaryData.fromString("{\"version\":\"ybsrfbjfdtwss\"}").toObject(NodeImageVersion.class); } @org.junit.jupiter.api.Test diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListMockTests.java index cf321e9b8c50..381062e98991 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListMockTests.java @@ -21,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"divkrt\",\"isDataAction\":false,\"display\":{\"provider\":\"zvszj\",\"resource\":\"uvjfdxxive\",\"operation\":\"t\",\"description\":\"aqtdoqmcbx\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"elsfeaen\",\"isDataAction\":true,\"display\":{\"provider\":\"tkl\",\"resource\":\"xbjhwuaanozjosph\",\"operation\":\"ulpjr\",\"description\":\"ag\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/PropertySelectorRequirementTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/PropertySelectorRequirementTests.java new file mode 100644 index 000000000000..063f00e4aed2 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/PropertySelectorRequirementTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerservicefleet.models.PropertySelectorOperator; +import com.azure.resourcemanager.containerservicefleet.models.PropertySelectorRequirement; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PropertySelectorRequirementTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PropertySelectorRequirement model = BinaryData + .fromString( + "{\"name\":\"lihkaetcktvfc\",\"operator\":\"Gt\",\"values\":[\"snkymuctq\",\"jf\",\"ebrjcxe\"]}") + .toObject(PropertySelectorRequirement.class); + Assertions.assertEquals("lihkaetcktvfc", model.name()); + Assertions.assertEquals(PropertySelectorOperator.GT, model.operator()); + Assertions.assertEquals("snkymuctq", model.values().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PropertySelectorRequirement model = new PropertySelectorRequirement().withName("lihkaetcktvfc") + .withOperator(PropertySelectorOperator.GT) + .withValues(Arrays.asList("snkymuctq", "jf", "ebrjcxe")); + model = BinaryData.fromObject(model).toObject(PropertySelectorRequirement.class); + Assertions.assertEquals("lihkaetcktvfc", model.name()); + Assertions.assertEquals(PropertySelectorOperator.GT, model.operator()); + Assertions.assertEquals("snkymuctq", model.values().get(0)); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/PropertySelectorTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/PropertySelectorTests.java new file mode 100644 index 000000000000..287ea91295b6 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/PropertySelectorTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerservicefleet.models.PropertySelector; +import com.azure.resourcemanager.containerservicefleet.models.PropertySelectorOperator; +import com.azure.resourcemanager.containerservicefleet.models.PropertySelectorRequirement; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PropertySelectorTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PropertySelector model = BinaryData.fromString( + "{\"matchExpressions\":[{\"name\":\"lpbuxwgipwhonowk\",\"operator\":\"Lt\",\"values\":[\"wankixzbi\",\"jeputtmrywn\",\"zoqftiyqzrnkcqvy\",\"lwh\"]},{\"name\":\"lsicohoqqnwv\",\"operator\":\"Ne\",\"values\":[\"avwhheunm\"]},{\"name\":\"qhgyxzkonocukok\",\"operator\":\"Ne\",\"values\":[\"xuconu\",\"szfkbe\"]},{\"name\":\"pewr\",\"operator\":\"Eq\",\"values\":[\"wv\",\"jektcxsenh\",\"lrsf\",\"rzpwvlqdqgbiq\"]}]}") + .toObject(PropertySelector.class); + Assertions.assertEquals("lpbuxwgipwhonowk", model.matchExpressions().get(0).name()); + Assertions.assertEquals(PropertySelectorOperator.LT, model.matchExpressions().get(0).operator()); + Assertions.assertEquals("wankixzbi", model.matchExpressions().get(0).values().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PropertySelector model = new PropertySelector().withMatchExpressions(Arrays.asList( + new PropertySelectorRequirement().withName("lpbuxwgipwhonowk") + .withOperator(PropertySelectorOperator.LT) + .withValues(Arrays.asList("wankixzbi", "jeputtmrywn", "zoqftiyqzrnkcqvy", "lwh")), + new PropertySelectorRequirement().withName("lsicohoqqnwv") + .withOperator(PropertySelectorOperator.NE) + .withValues(Arrays.asList("avwhheunm")), + new PropertySelectorRequirement().withName("qhgyxzkonocukok") + .withOperator(PropertySelectorOperator.NE) + .withValues(Arrays.asList("xuconu", "szfkbe")), + new PropertySelectorRequirement().withName("pewr") + .withOperator(PropertySelectorOperator.EQ) + .withValues(Arrays.asList("wv", "jektcxsenh", "lrsf", "rzpwvlqdqgbiq")))); + model = BinaryData.fromObject(model).toObject(PropertySelector.class); + Assertions.assertEquals("lpbuxwgipwhonowk", model.matchExpressions().get(0).name()); + Assertions.assertEquals(PropertySelectorOperator.LT, model.matchExpressions().get(0).operator()); + Assertions.assertEquals("wankixzbi", model.matchExpressions().get(0).values().get(0)); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ResourceQuotaTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ResourceQuotaTests.java new file mode 100644 index 000000000000..0b08f281a82b --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ResourceQuotaTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerservicefleet.models.ResourceQuota; +import org.junit.jupiter.api.Assertions; + +public final class ResourceQuotaTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ResourceQuota model = BinaryData.fromString( + "{\"cpuRequest\":\"vo\",\"cpuLimit\":\"ujjugwdkcglh\",\"memoryRequest\":\"azjdyggd\",\"memoryLimit\":\"ixhbkuofqweykhm\"}") + .toObject(ResourceQuota.class); + Assertions.assertEquals("vo", model.cpuRequest()); + Assertions.assertEquals("ujjugwdkcglh", model.cpuLimit()); + Assertions.assertEquals("azjdyggd", model.memoryRequest()); + Assertions.assertEquals("ixhbkuofqweykhm", model.memoryLimit()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ResourceQuota model = new ResourceQuota().withCpuRequest("vo") + .withCpuLimit("ujjugwdkcglh") + .withMemoryRequest("azjdyggd") + .withMemoryLimit("ixhbkuofqweykhm"); + model = BinaryData.fromObject(model).toObject(ResourceQuota.class); + Assertions.assertEquals("vo", model.cpuRequest()); + Assertions.assertEquals("ujjugwdkcglh", model.cpuLimit()); + Assertions.assertEquals("azjdyggd", model.memoryRequest()); + Assertions.assertEquals("ixhbkuofqweykhm", model.memoryLimit()); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/SkipPropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/SkipPropertiesTests.java index 5cce243413bf..3120205a28bf 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/SkipPropertiesTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/SkipPropertiesTests.java @@ -14,18 +14,21 @@ public final class SkipPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SkipProperties model = BinaryData.fromString("{\"targets\":[{\"type\":\"Stage\",\"name\":\"bttk\"}]}") + SkipProperties model = BinaryData + .fromString( + "{\"targets\":[{\"type\":\"Group\",\"name\":\"mond\"},{\"type\":\"Group\",\"name\":\"quxvypomgkop\"}]}") .toObject(SkipProperties.class); - Assertions.assertEquals(TargetType.STAGE, model.targets().get(0).type()); - Assertions.assertEquals("bttk", model.targets().get(0).name()); + Assertions.assertEquals(TargetType.GROUP, model.targets().get(0).type()); + Assertions.assertEquals("mond", model.targets().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SkipProperties model = new SkipProperties() - .withTargets(Arrays.asList(new SkipTarget().withType(TargetType.STAGE).withName("bttk"))); + .withTargets(Arrays.asList(new SkipTarget().withType(TargetType.GROUP).withName("mond"), + new SkipTarget().withType(TargetType.GROUP).withName("quxvypomgkop"))); model = BinaryData.fromObject(model).toObject(SkipProperties.class); - Assertions.assertEquals(TargetType.STAGE, model.targets().get(0).type()); - Assertions.assertEquals("bttk", model.targets().get(0).name()); + Assertions.assertEquals(TargetType.GROUP, model.targets().get(0).type()); + Assertions.assertEquals("mond", model.targets().get(0).name()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/SkipTargetTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/SkipTargetTests.java index daac16cf8b48..902334842d18 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/SkipTargetTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/SkipTargetTests.java @@ -13,16 +13,16 @@ public final class SkipTargetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkipTarget model - = BinaryData.fromString("{\"type\":\"Member\",\"name\":\"ywpnvjt\"}").toObject(SkipTarget.class); - Assertions.assertEquals(TargetType.MEMBER, model.type()); - Assertions.assertEquals("ywpnvjt", model.name()); + = BinaryData.fromString("{\"type\":\"Group\",\"name\":\"hojvpajqgxysmocm\"}").toObject(SkipTarget.class); + Assertions.assertEquals(TargetType.GROUP, model.type()); + Assertions.assertEquals("hojvpajqgxysmocm", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SkipTarget model = new SkipTarget().withType(TargetType.MEMBER).withName("ywpnvjt"); + SkipTarget model = new SkipTarget().withType(TargetType.GROUP).withName("hojvpajqgxysmocm"); model = BinaryData.fromObject(model).toObject(SkipTarget.class); - Assertions.assertEquals(TargetType.MEMBER, model.type()); - Assertions.assertEquals("ywpnvjt", model.name()); + Assertions.assertEquals(TargetType.GROUP, model.type()); + Assertions.assertEquals("hojvpajqgxysmocm", model.name()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupTests.java index 2b66af25f2e7..30050229e673 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupTests.java @@ -15,29 +15,29 @@ public final class UpdateGroupTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateGroup model = BinaryData.fromString( - "{\"name\":\"mryw\",\"beforeGates\":[{\"displayName\":\"qftiy\",\"type\":\"Approval\"},{\"displayName\":\"n\",\"type\":\"Approval\"},{\"displayName\":\"vyxlwhzlsicohoqq\",\"type\":\"Approval\"},{\"displayName\":\"lryav\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"nmmqhgyxzkon\",\"type\":\"Approval\"}]}") + "{\"name\":\"nrmfqjhhk\",\"beforeGates\":[{\"displayName\":\"jy\",\"type\":\"Approval\"},{\"displayName\":\"xxjyngudivkrtsw\",\"type\":\"Approval\"},{\"displayName\":\"zvszj\",\"type\":\"Approval\"},{\"displayName\":\"vjfdx\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"vtcqaqtdo\",\"type\":\"Approval\"}]}") .toObject(UpdateGroup.class); - Assertions.assertEquals("mryw", model.name()); - Assertions.assertEquals("qftiy", model.beforeGates().get(0).displayName()); + Assertions.assertEquals("nrmfqjhhk", model.name()); + Assertions.assertEquals("jy", model.beforeGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.beforeGates().get(0).type()); - Assertions.assertEquals("nmmqhgyxzkon", model.afterGates().get(0).displayName()); + Assertions.assertEquals("vtcqaqtdo", model.afterGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.afterGates().get(0).type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateGroup model = new UpdateGroup().withName("mryw") - .withBeforeGates(Arrays.asList(new GateConfiguration().withDisplayName("qftiy").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("n").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("vyxlwhzlsicohoqq").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("lryav").withType(GateType.APPROVAL))) + UpdateGroup model = new UpdateGroup().withName("nrmfqjhhk") + .withBeforeGates(Arrays.asList(new GateConfiguration().withDisplayName("jy").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("xxjyngudivkrtsw").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("zvszj").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("vjfdx").withType(GateType.APPROVAL))) .withAfterGates( - Arrays.asList(new GateConfiguration().withDisplayName("nmmqhgyxzkon").withType(GateType.APPROVAL))); + Arrays.asList(new GateConfiguration().withDisplayName("vtcqaqtdo").withType(GateType.APPROVAL))); model = BinaryData.fromObject(model).toObject(UpdateGroup.class); - Assertions.assertEquals("mryw", model.name()); - Assertions.assertEquals("qftiy", model.beforeGates().get(0).displayName()); + Assertions.assertEquals("nrmfqjhhk", model.name()); + Assertions.assertEquals("jy", model.beforeGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.beforeGates().get(0).type()); - Assertions.assertEquals("nmmqhgyxzkon", model.afterGates().get(0).displayName()); + Assertions.assertEquals("vtcqaqtdo", model.afterGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.afterGates().get(0).type()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunGateTargetPropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunGateTargetPropertiesTests.java index 8e4b9eba1b7b..33a5bfd2695a 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunGateTargetPropertiesTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunGateTargetPropertiesTests.java @@ -12,9 +12,10 @@ public final class UpdateRunGateTargetPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UpdateRunGateTargetProperties model - = BinaryData.fromString("{\"name\":\"e\",\"stage\":\"a\",\"group\":\"uhrzayvvt\",\"timing\":\"After\"}") - .toObject(UpdateRunGateTargetProperties.class); - Assertions.assertEquals(Timing.AFTER, model.timing()); + UpdateRunGateTargetProperties model = BinaryData + .fromString( + "{\"name\":\"jn\",\"stage\":\"ckhsmtxpsieb\",\"group\":\"hvpesapskrdqm\",\"timing\":\"Before\"}") + .toObject(UpdateRunGateTargetProperties.class); + Assertions.assertEquals(Timing.BEFORE, model.timing()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunListResultTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunListResultTests.java index 7171000560f6..7b65e6aec5e1 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunListResultTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunListResultTests.java @@ -14,16 +14,15 @@ public final class UpdateRunListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateRunListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"cxy\",\"strategy\":{\"stages\":[{\"name\":\"tnrsyn\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"dybyxczfclhaa\"},\"nodeImageSelection\":{\"type\":\"Latest\",\"customNodeImageVersions\":[{}]}},\"status\":{\"status\":{\"startTime\":\"2021-10-01T07:26:45Z\",\"completedTime\":\"2021-02-16T08:29:45Z\",\"state\":\"Running\",\"error\":{}},\"stages\":[{},{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{},{},{}]}},\"autoUpgradeProfileId\":\"cocmnyyaztt\"},\"eTag\":\"wwrq\",\"id\":\"edckzywbiexzfey\",\"name\":\"eaxib\",\"type\":\"ujwb\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"muzyoxaepdk\",\"strategy\":{\"stages\":[{\"name\":\"ncuxrhdwb\"},{\"name\":\"v\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"iwdjswztsdbpgn\"},\"nodeImageSelection\":{\"type\":\"Consistent\",\"customNodeImageVersions\":[{},{},{}]}},\"status\":{\"status\":{\"startTime\":\"2021-04-28T02:43:47Z\",\"completedTime\":\"2021-03-08T11:52:03Z\",\"state\":\"Failed\",\"error\":{}},\"stages\":[{},{},{},{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{},{},{}]}},\"autoUpgradeProfileId\":\"xwtctyqiklbbovpl\"},\"eTag\":\"bhvgy\",\"id\":\"uosvmkfssxqukk\",\"name\":\"plgmgsxnk\",\"type\":\"zkd\"},{\"properties\":{\"provisioningState\":\"Failed\",\"updateStrategyId\":\"lopwiyig\",\"strategy\":{\"stages\":[{\"name\":\"kdwzbaiuebbaumny\"},{\"name\":\"upedeojnabckhs\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"psiebtfhvpes\"},\"nodeImageSelection\":{\"type\":\"Custom\",\"customNodeImageVersions\":[{},{},{},{}]}},\"status\":{\"status\":{\"startTime\":\"2021-05-04T20:04:22Z\",\"completedTime\":\"2021-01-31T10:46:35Z\",\"state\":\"Stopping\",\"error\":{}},\"stages\":[{},{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{},{}]}},\"autoUpgradeProfileId\":\"xuutkncwscwsv\"},\"eTag\":\"otogtwrupqs\",\"id\":\"nmic\",\"name\":\"kvceoveilovnotyf\",\"type\":\"fcnj\"}],\"nextLink\":\"cn\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"tmweriofzpyq\",\"strategy\":{\"stages\":[{\"name\":\"wab\"},{\"name\":\"ets\"},{\"name\":\"hszhedplvwiwu\"},{\"name\":\"mwmbes\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"k\"},\"nodeImageSelection\":{\"type\":\"Consistent\",\"customNodeImageVersions\":[{},{},{}]}},\"status\":{\"status\":{\"startTime\":\"2021-11-04T18:03:15Z\",\"completedTime\":\"2021-04-04T02:55:07Z\",\"state\":\"Failed\",\"error\":{}},\"stages\":[{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{}]}},\"autoUpgradeProfileId\":\"sikvmkqzeqqkdlt\"},\"eTag\":\"xmhhvhgureo\",\"id\":\"wobdagxtibqdx\",\"name\":\"xwak\",\"type\":\"ogqxndlkzgxhuri\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"dxunkbebxmubyyn\",\"strategy\":{\"stages\":[{\"name\":\"rbqtkoie\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"otgqrlltmu\"},\"nodeImageSelection\":{\"type\":\"Consistent\",\"customNodeImageVersions\":[{},{},{},{}]}},\"status\":{\"status\":{\"startTime\":\"2021-10-11T08:08:51Z\",\"completedTime\":\"2021-04-09T22:19:25Z\",\"state\":\"Running\",\"error\":{}},\"stages\":[{},{},{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{},{},{}]}},\"autoUpgradeProfileId\":\"uvpb\"},\"eTag\":\"d\",\"id\":\"orppxebmnzbtb\",\"name\":\"jpglkfgohdne\",\"type\":\"el\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"yhtozfikdowwqu\",\"strategy\":{\"stages\":[{\"name\":\"zx\"},{\"name\":\"lvithhqzonosgg\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"ohfwds\"},\"nodeImageSelection\":{\"type\":\"Custom\",\"customNodeImageVersions\":[{},{}]}},\"status\":{\"status\":{\"startTime\":\"2021-03-15T03:19:59Z\",\"completedTime\":\"2021-08-17T16:46:36Z\",\"state\":\"Completed\",\"error\":{}},\"stages\":[{},{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{}]}},\"autoUpgradeProfileId\":\"zewk\"},\"eTag\":\"hqcrailvpnpp\",\"id\":\"flrwd\",\"name\":\"hdlxyjrxsagafcn\",\"type\":\"hgw\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"dgfbcvkcvqvpke\",\"strategy\":{\"stages\":[{\"name\":\"vdrhvoo\"},{\"name\":\"sotbob\"},{\"name\":\"dopcjwvnh\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"wmgxcxrsl\"},\"nodeImageSelection\":{\"type\":\"Consistent\",\"customNodeImageVersions\":[{},{}]}},\"status\":{\"status\":{\"startTime\":\"2021-07-28T00:53:44Z\",\"completedTime\":\"2021-09-01T04:33:23Z\",\"state\":\"Failed\",\"error\":{}},\"stages\":[{},{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{}]}},\"autoUpgradeProfileId\":\"luicpdggkzzlvmbm\"},\"eTag\":\"xmodf\",\"id\":\"efyw\",\"name\":\"bpfvm\",\"type\":\"yhrfouyftaakcpw\"}],\"nextLink\":\"zvqtmnubexkp\"}") .toObject(UpdateRunListResult.class); - Assertions.assertEquals("cxy", model.value().get(0).updateStrategyId()); - Assertions.assertEquals("tnrsyn", model.value().get(0).strategy().stages().get(0).name()); + Assertions.assertEquals("tmweriofzpyq", model.value().get(0).updateStrategyId()); + Assertions.assertEquals("wab", model.value().get(0).strategy().stages().get(0).name()); Assertions.assertEquals(ManagedClusterUpgradeType.FULL, model.value().get(0).managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("dybyxczfclhaa", - model.value().get(0).managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions.assertEquals(NodeImageSelectionType.LATEST, + Assertions.assertEquals("k", model.value().get(0).managedClusterUpdate().upgrade().kubernetesVersion()); + Assertions.assertEquals(NodeImageSelectionType.CONSISTENT, model.value().get(0).managedClusterUpdate().nodeImageSelection().type()); - Assertions.assertEquals("cn", model.nextLink()); + Assertions.assertEquals("zvqtmnubexkp", model.nextLink()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStrategyTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStrategyTests.java index cc7f072d7ee2..803df90b1466 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStrategyTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStrategyTests.java @@ -17,81 +17,76 @@ public final class UpdateRunStrategyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateRunStrategy model = BinaryData.fromString( - "{\"stages\":[{\"name\":\"ypvhezrkg\",\"groups\":[{\"name\":\"jrefovgmkqsle\",\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"}]}],\"afterStageWaitInSeconds\":203599917,\"beforeGates\":[{\"displayName\":\"gjcrcczsqpjhvm\",\"type\":\"Approval\"},{\"displayName\":\"v\",\"type\":\"Approval\"},{\"displayName\":\"ounqecano\",\"type\":\"Approval\"},{\"displayName\":\"pfhyhl\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"pjmcmatuokthfuiu\",\"type\":\"Approval\"},{\"displayName\":\"sfcpkvxodpuozm\",\"type\":\"Approval\"}]},{\"name\":\"ydagfuaxbe\",\"groups\":[{\"name\":\"uokktwhrdxwz\",\"beforeGates\":[{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]}],\"afterStageWaitInSeconds\":760240945,\"beforeGates\":[{\"displayName\":\"ryocfsfksymdd\",\"type\":\"Approval\"},{\"displayName\":\"kiiuxhqyudxor\",\"type\":\"Approval\"},{\"displayName\":\"b\",\"type\":\"Approval\"},{\"displayName\":\"zvyifqrvkdvj\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"vvdfwatkpnpul\",\"type\":\"Approval\"}]},{\"name\":\"xbczwtruwiqz\",\"groups\":[{\"name\":\"vsovmyokac\",\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]}],\"afterStageWaitInSeconds\":432282678,\"beforeGates\":[{\"displayName\":\"bvvnchrkcciw\",\"type\":\"Approval\"},{\"displayName\":\"uqkhrsajiwku\",\"type\":\"Approval\"},{\"displayName\":\"skghsauuimj\",\"type\":\"Approval\"},{\"displayName\":\"ied\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"yjr\",\"type\":\"Approval\"},{\"displayName\":\"y\",\"type\":\"Approval\"},{\"displayName\":\"v\",\"type\":\"Approval\"},{\"displayName\":\"sonpclhocohs\",\"type\":\"Approval\"}]}]}") + "{\"stages\":[{\"name\":\"jyzhpvgq\",\"groups\":[{\"name\":\"rvxdjzlmw\",\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}]}],\"afterStageWaitInSeconds\":977455104,\"beforeGates\":[{\"displayName\":\"u\",\"type\":\"Approval\"},{\"displayName\":\"thnnpr\",\"type\":\"Approval\"},{\"displayName\":\"peilpjzuaejxdu\",\"type\":\"Approval\"},{\"displayName\":\"kzbbtd\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"ekg\",\"type\":\"Approval\"},{\"displayName\":\"zuhkfpbsjyof\",\"type\":\"Approval\"},{\"displayName\":\"uusdttouwa\",\"type\":\"Approval\"},{\"displayName\":\"kqvkelnsmvbxwyjs\",\"type\":\"Approval\"}]},{\"name\":\"hhcaal\",\"groups\":[{\"name\":\"xisxyawjoyaqcsl\",\"beforeGates\":[{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]},{\"name\":\"xznelixhnrztf\",\"beforeGates\":[{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}]},{\"name\":\"laulppg\",\"beforeGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"},{\"type\":\"Approval\"}],\"afterGates\":[{\"type\":\"Approval\"},{\"type\":\"Approval\"}]}],\"afterStageWaitInSeconds\":332175768,\"beforeGates\":[{\"displayName\":\"igvpgylg\",\"type\":\"Approval\"},{\"displayName\":\"txmedj\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"n\",\"type\":\"Approval\"},{\"displayName\":\"ncw\",\"type\":\"Approval\"},{\"displayName\":\"xgk\",\"type\":\"Approval\"}]}]}") .toObject(UpdateRunStrategy.class); - Assertions.assertEquals("ypvhezrkg", model.stages().get(0).name()); - Assertions.assertEquals("jrefovgmkqsle", model.stages().get(0).groups().get(0).name()); + Assertions.assertEquals("jyzhpvgq", model.stages().get(0).name()); + Assertions.assertEquals("rvxdjzlmw", model.stages().get(0).groups().get(0).name()); Assertions.assertEquals(GateType.APPROVAL, model.stages().get(0).groups().get(0).beforeGates().get(0).type()); Assertions.assertEquals(GateType.APPROVAL, model.stages().get(0).groups().get(0).afterGates().get(0).type()); - Assertions.assertEquals(203599917, model.stages().get(0).afterStageWaitInSeconds()); - Assertions.assertEquals("gjcrcczsqpjhvm", model.stages().get(0).beforeGates().get(0).displayName()); + Assertions.assertEquals(977455104, model.stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("u", model.stages().get(0).beforeGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.stages().get(0).beforeGates().get(0).type()); - Assertions.assertEquals("pjmcmatuokthfuiu", model.stages().get(0).afterGates().get(0).displayName()); + Assertions.assertEquals("ekg", model.stages().get(0).afterGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.stages().get(0).afterGates().get(0).type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateRunStrategy model - = new UpdateRunStrategy().withStages(Arrays.asList( - new UpdateStage().withName("ypvhezrkg") - .withGroups(Arrays.asList(new UpdateGroup().withName("jrefovgmkqsle") - .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), + UpdateRunStrategy model = new UpdateRunStrategy().withStages(Arrays.asList( + new UpdateStage().withName("jyzhpvgq") + .withGroups(Arrays.asList(new UpdateGroup().withName("rvxdjzlmw") + .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), + new GateConfiguration().withType(GateType.APPROVAL), + new GateConfiguration().withType(GateType.APPROVAL), + new GateConfiguration().withType(GateType.APPROVAL))) + .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), + new GateConfiguration().withType(GateType.APPROVAL))))) + .withAfterStageWaitInSeconds(977455104) + .withBeforeGates(Arrays.asList(new GateConfiguration().withDisplayName("u").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("thnnpr").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("peilpjzuaejxdu").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("kzbbtd").withType(GateType.APPROVAL))) + .withAfterGates( + Arrays.asList(new GateConfiguration().withDisplayName("ekg").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("zuhkfpbsjyof").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("uusdttouwa").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("kqvkelnsmvbxwyjs").withType(GateType.APPROVAL))), + new UpdateStage().withName("hhcaal") + .withGroups(Arrays.asList( + new UpdateGroup().withName("xisxyawjoyaqcsl") + .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL))) + .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), new GateConfiguration().withType(GateType.APPROVAL), new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL))))) - .withAfterStageWaitInSeconds(203599917) - .withBeforeGates(Arrays.asList( - new GateConfiguration().withDisplayName("gjcrcczsqpjhvm").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("v").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("ounqecano").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("pfhyhl").withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList( - new GateConfiguration().withDisplayName("pjmcmatuokthfuiu").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("sfcpkvxodpuozm").withType(GateType.APPROVAL))), - new UpdateStage().withName("ydagfuaxbe") - .withGroups(Arrays.asList(new UpdateGroup().withName("uokktwhrdxwz") + new GateConfiguration().withType(GateType.APPROVAL))), + new UpdateGroup().withName("xznelixhnrztf") .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL))) .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))))) - .withAfterStageWaitInSeconds(760240945) - .withBeforeGates(Arrays - .asList(new GateConfiguration().withDisplayName("ryocfsfksymdd").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("kiiuxhqyudxor").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("b").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("zvyifqrvkdvj").withType(GateType.APPROVAL))) - .withAfterGates(Arrays - .asList(new GateConfiguration().withDisplayName("vvdfwatkpnpul").withType(GateType.APPROVAL))), - new UpdateStage().withName("xbczwtruwiqz") - .withGroups(Arrays.asList(new UpdateGroup().withName("vsovmyokac") + new GateConfiguration().withType(GateType.APPROVAL))), + new UpdateGroup().withName("laulppg") .withBeforeGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), - new GateConfiguration().withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), new GateConfiguration().withType(GateType.APPROVAL), new GateConfiguration().withType(GateType.APPROVAL), + new GateConfiguration().withType(GateType.APPROVAL))) + .withAfterGates(Arrays.asList(new GateConfiguration().withType(GateType.APPROVAL), new GateConfiguration().withType(GateType.APPROVAL))))) - .withAfterStageWaitInSeconds(432282678) - .withBeforeGates(Arrays.asList( - new GateConfiguration().withDisplayName("bvvnchrkcciw").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("uqkhrsajiwku").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("skghsauuimj").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("ied").withType(GateType.APPROVAL))) - .withAfterGates( - Arrays.asList(new GateConfiguration().withDisplayName("yjr").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("y").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("v").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("sonpclhocohs").withType(GateType.APPROVAL))))); + .withAfterStageWaitInSeconds(332175768) + .withBeforeGates( + Arrays.asList(new GateConfiguration().withDisplayName("igvpgylg").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("txmedj").withType(GateType.APPROVAL))) + .withAfterGates(Arrays.asList(new GateConfiguration().withDisplayName("n").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("ncw").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("xgk").withType(GateType.APPROVAL))))); model = BinaryData.fromObject(model).toObject(UpdateRunStrategy.class); - Assertions.assertEquals("ypvhezrkg", model.stages().get(0).name()); - Assertions.assertEquals("jrefovgmkqsle", model.stages().get(0).groups().get(0).name()); + Assertions.assertEquals("jyzhpvgq", model.stages().get(0).name()); + Assertions.assertEquals("rvxdjzlmw", model.stages().get(0).groups().get(0).name()); Assertions.assertEquals(GateType.APPROVAL, model.stages().get(0).groups().get(0).beforeGates().get(0).type()); Assertions.assertEquals(GateType.APPROVAL, model.stages().get(0).groups().get(0).afterGates().get(0).type()); - Assertions.assertEquals(203599917, model.stages().get(0).afterStageWaitInSeconds()); - Assertions.assertEquals("gjcrcczsqpjhvm", model.stages().get(0).beforeGates().get(0).displayName()); + Assertions.assertEquals(977455104, model.stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("u", model.stages().get(0).beforeGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.stages().get(0).beforeGates().get(0).type()); - Assertions.assertEquals("pjmcmatuokthfuiu", model.stages().get(0).afterGates().get(0).displayName()); + Assertions.assertEquals("ekg", model.stages().get(0).afterGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.stages().get(0).afterGates().get(0).type()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteMockTests.java index cc402f9529aa..6be11245e511 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteMockTests.java @@ -27,8 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.updateRuns() - .delete("r", "lsfeaenwabfatkld", "xbjhwuaanozjosph", "oulpjrv", com.azure.core.util.Context.NONE); + manager.updateRuns().delete("lik", "xwslolbqpv", "zlmvfelfktgp", "crpw", com.azure.core.util.Context.NONE); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageTests.java index 1ab050053c88..bebf3b156d30 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageTests.java @@ -16,67 +16,45 @@ public final class UpdateStageTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateStage model = BinaryData.fromString( - "{\"name\":\"ev\",\"groups\":[{\"name\":\"gz\",\"beforeGates\":[{\"displayName\":\"fmvfaxkffeiit\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"zy\",\"type\":\"Approval\"}]},{\"name\":\"hxmzsbbzoggig\",\"beforeGates\":[{\"displayName\":\"ur\",\"type\":\"Approval\"},{\"displayName\":\"xjnspy\",\"type\":\"Approval\"},{\"displayName\":\"koen\",\"type\":\"Approval\"},{\"displayName\":\"knvudwtiukb\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"pocipazyxoegu\",\"type\":\"Approval\"},{\"displayName\":\"npiucgygevqznty\",\"type\":\"Approval\"},{\"displayName\":\"bpizcdrqjsdpydn\",\"type\":\"Approval\"},{\"displayName\":\"xdeoejzic\",\"type\":\"Approval\"}]}],\"afterStageWaitInSeconds\":764179455,\"beforeGates\":[{\"displayName\":\"gzfbishcbk\",\"type\":\"Approval\"},{\"displayName\":\"deyeamdphagalpbu\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"whonowk\",\"type\":\"Approval\"},{\"displayName\":\"wankixzbi\",\"type\":\"Approval\"},{\"displayName\":\"pu\",\"type\":\"Approval\"}]}") + "{\"name\":\"mgucna\",\"groups\":[{\"name\":\"eoellwptfdygp\",\"beforeGates\":[{\"displayName\":\"ac\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"qrhhu\",\"type\":\"Approval\"}]}],\"afterStageWaitInSeconds\":284689658,\"beforeGates\":[{\"displayName\":\"eqx\",\"type\":\"Approval\"}],\"afterGates\":[{\"displayName\":\"hzxct\",\"type\":\"Approval\"},{\"displayName\":\"bkdmo\",\"type\":\"Approval\"},{\"displayName\":\"ostmgrcf\",\"type\":\"Approval\"}]}") .toObject(UpdateStage.class); - Assertions.assertEquals("ev", model.name()); - Assertions.assertEquals("gz", model.groups().get(0).name()); - Assertions.assertEquals("fmvfaxkffeiit", model.groups().get(0).beforeGates().get(0).displayName()); + Assertions.assertEquals("mgucna", model.name()); + Assertions.assertEquals("eoellwptfdygp", model.groups().get(0).name()); + Assertions.assertEquals("ac", model.groups().get(0).beforeGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.groups().get(0).beforeGates().get(0).type()); - Assertions.assertEquals("zy", model.groups().get(0).afterGates().get(0).displayName()); + Assertions.assertEquals("qrhhu", model.groups().get(0).afterGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.groups().get(0).afterGates().get(0).type()); - Assertions.assertEquals(764179455, model.afterStageWaitInSeconds()); - Assertions.assertEquals("gzfbishcbk", model.beforeGates().get(0).displayName()); + Assertions.assertEquals(284689658, model.afterStageWaitInSeconds()); + Assertions.assertEquals("eqx", model.beforeGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.beforeGates().get(0).type()); - Assertions.assertEquals("whonowk", model.afterGates().get(0).displayName()); + Assertions.assertEquals("hzxct", model.afterGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.afterGates().get(0).type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateStage model - = new UpdateStage().withName("ev") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("gz") - .withBeforeGates(Arrays.asList(new GateConfiguration().withDisplayName("fmvfaxkffeiit") - .withType(GateType.APPROVAL))) - .withAfterGates(Arrays - .asList(new GateConfiguration().withDisplayName("zy").withType(GateType.APPROVAL))), - new UpdateGroup().withName("hxmzsbbzoggig") - .withBeforeGates(Arrays.asList( - new GateConfiguration().withDisplayName("ur").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("xjnspy").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("koen").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("knvudwtiukb").withType(GateType.APPROVAL))) - .withAfterGates(Arrays.asList(new GateConfiguration() - .withDisplayName("pocipazyxoegu") - .withType(GateType.APPROVAL), - new GateConfiguration() - .withDisplayName("npiucgygevqznty") - .withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("bpizcdrqjsdpydn") - .withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("xdeoejzic").withType(GateType.APPROVAL))))) - .withAfterStageWaitInSeconds(764179455) + UpdateStage model = new UpdateStage().withName("mgucna") + .withGroups(Arrays.asList(new UpdateGroup().withName("eoellwptfdygp") .withBeforeGates( - Arrays.asList(new GateConfiguration().withDisplayName("gzfbishcbk").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("deyeamdphagalpbu").withType(GateType.APPROVAL))) + Arrays.asList(new GateConfiguration().withDisplayName("ac").withType(GateType.APPROVAL))) .withAfterGates( - Arrays.asList(new GateConfiguration().withDisplayName("whonowk").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("wankixzbi").withType(GateType.APPROVAL), - new GateConfiguration().withDisplayName("pu").withType(GateType.APPROVAL))); + Arrays.asList(new GateConfiguration().withDisplayName("qrhhu").withType(GateType.APPROVAL))))) + .withAfterStageWaitInSeconds(284689658) + .withBeforeGates(Arrays.asList(new GateConfiguration().withDisplayName("eqx").withType(GateType.APPROVAL))) + .withAfterGates(Arrays.asList(new GateConfiguration().withDisplayName("hzxct").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("bkdmo").withType(GateType.APPROVAL), + new GateConfiguration().withDisplayName("ostmgrcf").withType(GateType.APPROVAL))); model = BinaryData.fromObject(model).toObject(UpdateStage.class); - Assertions.assertEquals("ev", model.name()); - Assertions.assertEquals("gz", model.groups().get(0).name()); - Assertions.assertEquals("fmvfaxkffeiit", model.groups().get(0).beforeGates().get(0).displayName()); + Assertions.assertEquals("mgucna", model.name()); + Assertions.assertEquals("eoellwptfdygp", model.groups().get(0).name()); + Assertions.assertEquals("ac", model.groups().get(0).beforeGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.groups().get(0).beforeGates().get(0).type()); - Assertions.assertEquals("zy", model.groups().get(0).afterGates().get(0).displayName()); + Assertions.assertEquals("qrhhu", model.groups().get(0).afterGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.groups().get(0).afterGates().get(0).type()); - Assertions.assertEquals(764179455, model.afterStageWaitInSeconds()); - Assertions.assertEquals("gzfbishcbk", model.beforeGates().get(0).displayName()); + Assertions.assertEquals(284689658, model.afterStageWaitInSeconds()); + Assertions.assertEquals("eqx", model.beforeGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.beforeGates().get(0).type()); - Assertions.assertEquals("whonowk", model.afterGates().get(0).displayName()); + Assertions.assertEquals("hzxct", model.afterGates().get(0).displayName()); Assertions.assertEquals(GateType.APPROVAL, model.afterGates().get(0).type()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/tsp-location.yaml b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/tsp-location.yaml index 1f2a13ead55a..e556ecdb5c14 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/tsp-location.yaml +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/containerservice/Fleet.Management -commit: 05584a1019e75159b0dc70a6751afaa2c77868e6 +commit: d0cd556bd91d2dda700e983c0d253fa025b324c0 repo: Azure/azure-rest-api-specs additionalDirectories: From 62cf67e6e672d18209e2b3c3f5c45635ffaa052d Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 10 Dec 2025 15:21:01 -0800 Subject: [PATCH 142/186] bump the targeted proxy version (#47519) Co-authored-by: Scott Beddall <scbedd@microsoft.com> --- eng/common/testproxy/target_version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/testproxy/target_version.txt b/eng/common/testproxy/target_version.txt index d649bab76c54..151749f5d2ae 100644 --- a/eng/common/testproxy/target_version.txt +++ b/eng/common/testproxy/target_version.txt @@ -1 +1 @@ -1.0.0-dev.20251022.1 +1.0.0-dev.20251209.1 From 4e0de66c734cab9adc55f22de55d63a54c7b4130 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 10 Dec 2025 16:18:45 -0800 Subject: [PATCH 143/186] Sync eng/common directory with azure-sdk-tools for PR 13100 (#47529) * prompt improvement * minor * test making copilot install for you * minor --------- Co-authored-by: jennypng <63012604+JennyPng@users.noreply.github.com> --- .../instructions/azsdk-tools/verify-setup.instructions.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eng/common/instructions/azsdk-tools/verify-setup.instructions.md b/eng/common/instructions/azsdk-tools/verify-setup.instructions.md index be401efcd406..54fc60f4ad52 100644 --- a/eng/common/instructions/azsdk-tools/verify-setup.instructions.md +++ b/eng/common/instructions/azsdk-tools/verify-setup.instructions.md @@ -5,7 +5,7 @@ description: 'Verify Setup' ## Goal This tool verifies the developer's environment for SDK development and release tasks. It returns what requirements are missing for the specified languages and repo, or success if all requirements are satisfied. -Your goal is to identify the project repo root, and pass in the `packagePath` to the Verify Setup tool. For a language repo, pass in the language of the repo. +Your goal is to identify the project repo root, and pass in the `packagePath` to the Verify Setup tool. For a language repo, pass in the language of the repo. ## Examples - in `azure-sdk-for-js`, run `azsdk_verify_setup` with `(langs=javascript, packagePath=<path>/azure-sdk-for-js)`. @@ -14,6 +14,8 @@ Your goal is to identify the project repo root, and pass in the `packagePath` to The user can specify multiple languages to check. If the user wants to check all languages, pass in ALL supported languages. Passing in no languages will only check the core requirements. ## Output -Display results in a user-friendly and concise format, highlighting any missing dependencies that need to be addressed and how to resolve them. +Display clear, step-by-step instructions on how to resolve any missing requirements identified. Explain why the requirement is necessary if it has a `reason` field. Organize requirements into categorical sections. + +Based on the user's shell environment, enhance the tool instructions with shell-specific commands for resolving missing dependencies. When Python tool requirements fail, inform the user about the `AZSDKTOOLS_PYTHON_VENV_PATH` environment variable if they have setup issues. The verify-setup tool can only check Python requirements within the virtual environment specified by this environment variable. From bc6b02699fa8f747856623231fff56468c54460f Mon Sep 17 00:00:00 2001 From: Srikanta <51379715+srnagar@users.noreply.github.com> Date: Wed, 10 Dec 2025 17:27:14 -0800 Subject: [PATCH 144/186] Update TextProxyPlaybackClient to propagate Context (#47536) --- .../core/test/http/TestProxyPlaybackClient.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/http/TestProxyPlaybackClient.java b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/http/TestProxyPlaybackClient.java index 5777b3a330c2..fb04b899b5f9 100644 --- a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/http/TestProxyPlaybackClient.java +++ b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/http/TestProxyPlaybackClient.java @@ -284,4 +284,18 @@ private boolean isPlayingBack() { public String getRecordingFileLocation() { return xRecordingFileLocation; } + + /** + * Redirects the provided {@link HttpRequest} to the test proxy to retrieve the playback response. + * This method is invoked during playback mode to simulate the expected response for a request. + * + * @param request The {@link HttpRequest} to be sent. + * @param context The {@link Context} associated with the operation. + * @return A {@link Mono} of {@link HttpResponse} containing the playback response. + */ + @Override + public Mono<HttpResponse> send(HttpRequest request, Context context) { + beforeSendingRequest(request); + return client.send(request, context).map(this::afterReceivedResponse); + } } From a7d6315a51679d9d25ff51623f8cbf1c3d589494 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 11 Dec 2025 11:00:53 -0800 Subject: [PATCH 145/186] Sync eng/common directory with azure-sdk-tools for PR 13218 (#47537) * Add script for tool description eval workflow * Fix param casing * respond to comments --------- Co-authored-by: Summer Warren <summerwarren@microsoft.com> --- .../Invoke-ToolDescriptionEvaluator.ps1 | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 eng/common/scripts/Invoke-ToolDescriptionEvaluator.ps1 diff --git a/eng/common/scripts/Invoke-ToolDescriptionEvaluator.ps1 b/eng/common/scripts/Invoke-ToolDescriptionEvaluator.ps1 new file mode 100644 index 000000000000..6029917adcfd --- /dev/null +++ b/eng/common/scripts/Invoke-ToolDescriptionEvaluator.ps1 @@ -0,0 +1,112 @@ +<# +.SYNOPSIS + Evaluates tool and prompt descriptions and produces a Markdown results report using Tool Description Evaluator from Mcp repo. + +.DESCRIPTION + This script builds and runs the ToolDescriptionEvaluator (.NET) against a set of tool and prompt definitions. + It restores and compiles the evaluator, executes it with the provided JSON inputs, and emits a `results.md` + report. The script supports configuration via parameters and environment variables for the embedding model + service used during evaluation. + +.LINK + https://github.com/microsoft/mcp/tree/main/eng/tools/ToolDescriptionEvaluator + +.PARAMETER EvaluatorPath + The path to the evaluator project root (or its `src` directory) that will be restored, built, and executed. + +.PARAMETER ToolsFilePath + The path to the JSON file containing tool definitions to be evaluated. + +.PARAMETER PromptsFilePath + The path to the JSON file containing prompt definitions to be evaluated. + +.PARAMETER OutputFilePath + The target file path where the generated `results.md` will be moved after the evaluator runs. + +.PARAMETER AoaiEndpoint + The full endpoint URL for the embedding model (e.g., Azure OpenAI embeddings) used by the evaluator. + +.PARAMETER TextEmbeddingApiKey + The API key used to authenticate with the embedding endpoint. Prefer providing this via a secure + secret store or environment variable rather than hard-coding. + +.NOTES + - The evaluator emits `results.md` in the evaluator folder; this script moves it to `OutputFilePath`. + - Requires .NET SDK available on PATH. + - Set-StrictMode is enabled. + +.EXAMPLE + .\Invoke-ToolDescriptionEvaluator.ps1 ` + -EvaluatorPath "C:\work\mcp\eng\tools\ToolDescriptionEvaluator\src" ` + -ToolsFilePath "C:\work\azure-sdk-tools\tools\azsdk-cli\azure-sdk-tools.json" ` + -PromptsFilePath "C:\work\azure-sdk-tools\tools\azsdk-cli\azure-sdk-prompts.json" ` + -OutputFilePath "C:\work\azure-sdk-tools\tools\azsdk-cli" ` + -AoaiEndpoint "https://<your-endpoint>/openai/deployments/text-embedding-3-large/embeddings?api-version=2023-05-15" ` + -TextEmbeddingApiKey (Get-Secret -Name 'TextEmbeddingApiKey') + + Runs the evaluator with the specified tools and prompts files, then moves the generated results to the output path. +#> +param ( + [Parameter(Mandatory = $true)] + [string] $EvaluatorPath, + + [Parameter(Mandatory = $true)] + [string] $ToolsFilePath, + + [Parameter(Mandatory = $true)] + [string] $PromptsFilePath, + + [Parameter(Mandatory = $true)] + [string] $OutputFilePath, + + # Environment Variables + [Parameter(Mandatory = $true)] + [string] $AoaiEndpoint, + + [Parameter(Mandatory = $true)] + [string] $TextEmbeddingApiKey +) + +Set-StrictMode -Version 3 + +# Validate input paths +$pathsToCheck = @{ + "EvaluatorPath" = $EvaluatorPath + "ToolsFilePath" = $ToolsFilePath + "PromptsFilePath" = $PromptsFilePath + "OutputFilePath" = $OutputFilePath +} + +foreach ($p in $pathsToCheck.GetEnumerator()) { + if (-not (Test-Path -Path $p.Value)) { + throw "Path does not exist for parameter '$($p.Key)': $($p.Value)" + } +} + +# Build & run the evaluator +Write-Host "Changing directory to evaluator: $EvaluatorPath" +Push-Location $EvaluatorPath +try { + $env:AOAI_ENDPOINT = $AoaiEndpoint + $env:TEXT_EMBEDDING_API_KEY = $TextEmbeddingApiKey + + Write-Host "Running Tool..." + dotnet run --configuration Release -- --tools-file "$ToolsFilePath" --prompts-file "$PromptsFilePath" +} +finally { + Pop-Location + Remove-Item Env:\AOAI_ENDPOINT -ErrorAction SilentlyContinue + Remove-Item Env:\TEXT_EMBEDDING_API_KEY -ErrorAction SilentlyContinue +} + +# The tool emits results.md in the evaluator folder +$generatedName = 'results.md' +$EvaluatorRoot = Split-Path $EvaluatorPath -Parent +$generatedPath = Join-Path -Path $EvaluatorRoot -ChildPath $generatedName +if (-not (Test-Path -Path $generatedPath -PathType Leaf)) { + throw "Expected output file not found: $generatedPath" +} + +Write-Host "Moving Results File: $generatedPath -> $OutputFilePath" +Move-Item -Path $generatedPath -Destination $OutputFilePath -Force +Write-Host "Successfully moved results file to $OutputFilePath" \ No newline at end of file From de9f0516efe66b3bff7500ccaecf5379a190f34f Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 11 Dec 2025 11:16:45 -0800 Subject: [PATCH 146/186] Sync eng/common directory with azure-sdk-tools for PR 13304 (#47542) * Update copilot instructions to support both local and pipeline based SDK genb.com> --- .../local-sdk-workflow.instructions.md | 33 +++++++++++++++++++ .../typespec-to-sdk.instructions.md | 27 +++++++++++++-- 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/eng/common/instructions/azsdk-tools/local-sdk-workflow.instructions.md b/eng/common/instructions/azsdk-tools/local-sdk-workflow.instructions.md index 0edadd191604..756c478f1282 100644 --- a/eng/common/instructions/azsdk-tools/local-sdk-workflow.instructions.md +++ b/eng/common/instructions/azsdk-tools/local-sdk-workflow.instructions.md @@ -5,6 +5,12 @@ description: "Guide the user to generate and build SDKs locally for a TypeSpec b # Goal Help the user generate and build SDKs locally from TypeSpec API specifications using the `azure-sdk-mcp` tools. +High level steps involved: +1. Generate SDK locally +2. Build / Compile SDK locally +3. Run package checks +4. Run package tests +5. Update change log, metadata and version --- @@ -65,6 +71,7 @@ Help the user generate and build SDKs locally from TypeSpec API specifications u - Check if the provided repository path exists and matches the selected SDK language repository. - If invalid → prompt user to re-enter a valid path. +- Verify setup to ensure all required tools are installed for the selected language. --- @@ -117,3 +124,29 @@ Help the user generate and build SDKs locally from TypeSpec API specifications u **Actions**: - Run `azsdk_package_build_code` MCP tool to compile the SDK in the identified project directory. + +--- + +### Step 3: Run package validation + +**Actions**: + +- Run `azsdk_package_run_check` MCP tool to validate the generated SDK package in the identified project directory. + +--- + +### Step 4: Run package tests + +**Actions**: + +- Run `azsdk_package_run_tests` MCP tool to run tests on the generated SDK package in the identified project directory. + +--- + +### Step 5: Update change log, metadata and version + +**Actions**: + +- Run `azsdk_package_update_metadata` MCP tool to update metadata in the identified project directory. +- Run `azsdk_package_update_changelog_content` MCP tool to update change log in the identified project directory. +- Run `azsdk_package_update_version` MCP tool to update version in the identified project directory. \ No newline at end of file diff --git a/eng/common/instructions/azsdk-tools/typespec-to-sdk.instructions.md b/eng/common/instructions/azsdk-tools/typespec-to-sdk.instructions.md index 042dd657a7d4..15d8b22acf06 100644 --- a/eng/common/instructions/azsdk-tools/typespec-to-sdk.instructions.md +++ b/eng/common/instructions/azsdk-tools/typespec-to-sdk.instructions.md @@ -17,8 +17,28 @@ Pre-requisites: # SDK generation steps ## Step: Generate SDKs -**Goal**: Generate SDKs -**Message to user**: "SDK generation will take approximately 15-20 minutes. Currently, SDKs are generated using the Azure DevOps pipeline. SDK generation is supported only from a merged API spec or from an API spec pull request in the https://github.com/Azure/azure-rest-api-specs repository." + +As a first step, you must prompt the user to understand the intention of SDK generation. Based on the user input, you can either run SDK generation locally or use SDK generation pipeline. + +Generate SDK locally in cases below: +- If the user wants to walk through each SDK generation step locally. This approach requires user to have the setup for each language to generate SDK locally. User can create a pull request for each language after completing all the steps in SDK generation successfully to get the generated SDK reviewed and merged. +- If SDK or client.tsp customizations are needed before creating a pull request. +- If the user wants to add tests, samples or any customization to the generated SDK. + +Generate SDK using pipeline: +- If the user wants to generate SDK and get a PR automatically created in Azure SDK language repositories. This approach can be followed if the user does not want to setup local environment for each language. + +### Generate SDK locally: + +**Condition**: If user chooses to generate SDK locally +**Message to user**: "Generating SDKs locally requires you to have the development environment set up for each language. Prompt the user to create a pull request for each language after completing the following steps successfully: generation, validation, build, test and update of metadata, change log, and version." +**Actions**: +Follow the steps in #file:local-sdk-workflow.instructions.md to generate and build SDKs locally from TypeSpec project. + +### Generate SDK using pipeline: + +**Condition**: If user chooses to generate the SDK using pipeline or when generating SDK by GitHub coding agent +**Message to user**: "SDK generation will take approximately 15-20 minutes. SDKs are generated using the Azure DevOps pipeline. SDK generation is supported only from a merged API spec or from an API spec pull request in the https://github.com/Azure/azure-rest-api-specs repository." **Actions**: 1. Identify whether TypeSpec is for Management Plane or Data Plane based on project structure and files. tspconfig.yaml file contains `resource-manager` for management plane and `data-plane` for data plane as resource provider. - Execute the SDK generation pipeline with the following required parameters for all languages: @@ -33,7 +53,8 @@ Pre-requisites: 2. Monitor pipeline status after 15 minutes and provide updates. If pipeline is in progress, inform user that it may take additional time and check the status later. 3. Display generated SDK PR links when available. If pipeline fails, inform user with error details and suggest to check pipeline logs for more information. 4. If SDK pull request is available for all languages, ask user to review generated SDK pull request and mark them as ready for review when they are ready to get them reviewed and merged. -5. If SDK pull request was created for test purposes, inform user to close the test SDK pull request. +5. Inform the user that they can checkout generated SDK pull request locally and add more tests, samples or code customizations if needed using local SDK generation tools. +6. If SDK pull request was created for test purposes, inform user to close the test SDK pull request. **Success Criteria**: SDK generation pipeline initiated and SDKs generated ## Step: SDK release plan From 2933ee1fd9da80c5c9569840cd18511463e34b00 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 11 Dec 2025 11:37:50 -0800 Subject: [PATCH 147/186] Fix GroupId property access (#47546) Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com> --- .../Helpers/DevOps-WorkItem-Helpers.ps1 | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 index 7ec0de578382..86dc46897c46 100644 --- a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 +++ b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 @@ -65,6 +65,14 @@ function CheckDevOpsAccess() } } +function GetGroupId($pkg) +{ + if ($pkg.PSObject.Properties.Name -contains "GroupId") { + return $pkg.GroupId + } + return $null +} + function Invoke-AzBoardsCmd($subCmd, $parameters, $output = $true) { $azCmdStr = "az boards ${subCmd} $($parameters -join ' ')" @@ -466,10 +474,11 @@ function UpdatePackageWorkItemReleaseState($id, $state, $releaseType, $outputCom function FindOrCreateClonePackageWorkItem($lang, $pkg, $verMajorMinor, $allowPrompt = $false, $outputCommand = $false, $relatedId = $null, $tag= $null, $ignoreReleasePlannerTests = $true) { - $workItem = FindPackageWorkItem -lang $lang -packageName $pkg.Package -version $verMajorMinor -includeClosed $true -outputCommand $outputCommand -tag $tag -ignoreReleasePlannerTests $ignoreReleasePlannerTests -groupId $pkg.GroupId + $groupId = GetGroupId $pkg + $workItem = FindPackageWorkItem -lang $lang -packageName $pkg.Package -version $verMajorMinor -includeClosed $true -outputCommand $outputCommand -tag $tag -ignoreReleasePlannerTests $ignoreReleasePlannerTests -groupId $groupId if (!$workItem) { - $latestVersionItem = FindLatestPackageWorkItem -lang $lang -packageName $pkg.Package -outputCommand $outputCommand -tag $tag -ignoreReleasePlannerTests $ignoreReleasePlannerTests -groupId $pkg.GroupId + $latestVersionItem = FindLatestPackageWorkItem -lang $lang -packageName $pkg.Package -outputCommand $outputCommand -tag $tag -ignoreReleasePlannerTests $ignoreReleasePlannerTests -groupId $groupId $assignedTo = "me" $extraFields = @() if ($latestVersionItem) { @@ -519,11 +528,7 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte } # PackageProp object uses Group, while other places use GroupId, such as in work item fields and package csv files. - $pkgGroupId = if ($pkg.PSObject.Properties.Name -contains "GroupId") { - $pkg.GroupId - } else { - $null - } + $pkgGroupId = GetGroupId $pkg $pkgName = $pkg.Package $pkgDisplayName = $pkg.DisplayName $pkgType = $pkg.Type @@ -1043,7 +1048,7 @@ function UpdatePackageVersions($pkgWorkItem, $plannedVersions, $shippedVersions) function UpdateValidationStatus($pkgvalidationDetails, $BuildDefinition, $PipelineUrl) { $pkgName = $pkgValidationDetails.Name - $groupId = $pkgValidationDetails.GroupId + $groupId = GetGroupId $pkgValidationDetails $versionString = $pkgValidationDetails.Version $parsedNewVersion = [AzureEngSemanticVersion]::new($versionString) From a5a2bb717783adca7ae9b5db42838e2e6f44f1c2 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 11 Dec 2025 11:43:44 -0800 Subject: [PATCH 148/186] Sync eng/common directory with azure-sdk-tools for PR 13235 (#47543) * Remove ApiKey usage * Add -TestAuth flag to verify Bearer token authentication * TEMP: Enable TestAuthOnly for pipeline testing * Remove testing logs * Additional clean up * Keep apikey fallback while migrating * Keep migration to new endpoint * Keep migration to new endpoint * Feedback --------- Co-authored-by: Alitzel Mendez <almend@microsoft.com> Co-authored-by: Alitzel Mendez <6895254+AlitzelMendez@users.noreply.github.com> --- .../templates/steps/create-apireview.yml | 9 ++-- eng/common/scripts/Create-APIReview.ps1 | 49 ++++++++++++++++--- 2 files changed, 46 insertions(+), 12 deletions(-) diff --git a/eng/common/pipelines/templates/steps/create-apireview.yml b/eng/common/pipelines/templates/steps/create-apireview.yml index e5deb551a382..85c4216ad761 100644 --- a/eng/common/pipelines/templates/steps/create-apireview.yml +++ b/eng/common/pipelines/templates/steps/create-apireview.yml @@ -37,16 +37,18 @@ steps: parameters: WorkingDirectory: ${{ parameters.SourceRootPath }} - - task: Powershell@2 + - task: AzureCLI@2 inputs: - filePath: ${{ parameters.SourceRootPath }}/eng/common/scripts/Create-APIReview.ps1 + azureSubscription: 'APIView prod deployment' + scriptType: pscore + scriptLocation: scriptPath + scriptPath: ${{ parameters.SourceRootPath }}/eng/common/scripts/Create-APIReview.ps1 # PackageInfoFiles example: @('a/file1.json','a/file2.json') arguments: > -PackageInfoFiles @('${{ join(''',''', parameters.PackageInfoFiles) }}') -ArtifactList ('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Select-Object Name) -ArtifactPath '${{parameters.ArtifactPath}}' -ArtifactName ${{ parameters.ArtifactName }} - -APIKey '$(azuresdk-apiview-apikey)' -PackageName '${{parameters.PackageName}}' -SourceBranch '$(Build.SourceBranchName)' -DefaultBranch '$(DefaultBranch)' @@ -54,7 +56,6 @@ steps: -BuildId '$(Build.BuildId)' -RepoName '$(Build.Repository.Name)' -MarkPackageAsShipped $${{parameters.MarkPackageAsShipped}} - pwsh: true displayName: Create API Review condition: >- and( diff --git a/eng/common/scripts/Create-APIReview.ps1 b/eng/common/scripts/Create-APIReview.ps1 index ec76326d9992..86b95ed0e552 100644 --- a/eng/common/scripts/Create-APIReview.ps1 +++ b/eng/common/scripts/Create-APIReview.ps1 @@ -4,15 +4,13 @@ Param ( [array] $ArtifactList, [Parameter(Mandatory=$True)] [string] $ArtifactPath, - [Parameter(Mandatory=$True)] - [string] $APIKey, [string] $SourceBranch, [string] $DefaultBranch, [string] $RepoName, [string] $BuildId, [string] $PackageName = "", [string] $ConfigFileDir = "", - [string] $APIViewUri = "https://apiview.dev/AutoReview", + [string] $APIViewUri = "https://apiview.dev/autoreview", [string] $ArtifactName = "packages", [bool] $MarkPackageAsShipped = $false, [Parameter(Mandatory=$False)] @@ -20,9 +18,28 @@ Param ( ) Set-StrictMode -Version 3 + . (Join-Path $PSScriptRoot common.ps1) . (Join-Path $PSScriptRoot Helpers ApiView-Helpers.ps1) +# Get Bearer token for APIView authentication +# In Azure DevOps, this uses the service connection's Managed Identity/Service Principal +function Get-ApiViewBearerToken() +{ + try { + $tokenResponse = az account get-access-token --resource "api://apiview" --output json 2>&1 + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to acquire access token: $tokenResponse" + return $null + } + return ($tokenResponse | ConvertFrom-Json).accessToken + } + catch { + Write-Error "Failed to acquire access token: $($_.Exception.Message)" + return $null + } +} + # Submit API review request and return status whether current revision is approved or pending or failed to create review function Upload-SourceArtifact($filePath, $apiLabel, $releaseStatus, $packageVersion, $packageType) { @@ -78,9 +95,17 @@ function Upload-SourceArtifact($filePath, $apiLabel, $releaseStatus, $packageVer Write-Host "Request param, compareAllRevisions: true" } - $uri = "${APIViewUri}/UploadAutoReview" + $uri = "${APIViewUri}/upload" + + # Get Bearer token for authentication + $bearerToken = Get-ApiViewBearerToken + if (-not $bearerToken) { + Write-Error "Failed to acquire Bearer token for APIView authentication." + return [System.Net.HttpStatusCode]::Unauthorized + } + $headers = @{ - "ApiKey" = $apiKey; + "Authorization" = "Bearer $bearerToken"; "content-type" = "multipart/form-data" } @@ -115,20 +140,28 @@ function Upload-ReviewTokenFile($packageName, $apiLabel, $releaseStatus, $review if($MarkPackageAsShipped) { $params += "&setReleaseTag=true" } - $uri = "${APIViewUri}/CreateApiReview?${params}" + $uri = "${APIViewUri}/create?${params}" if ($releaseStatus -and ($releaseStatus -ne "Unreleased")) { $uri += "&compareAllRevisions=true" } Write-Host "Request to APIView: $uri" + + # Get Bearer token for authentication + $bearerToken = Get-ApiViewBearerToken + if (-not $bearerToken) { + Write-Error "Failed to acquire Bearer token for APIView authentication." + return [System.Net.HttpStatusCode]::Unauthorized + } + $headers = @{ - "ApiKey" = $APIKey; + "Authorization" = "Bearer $bearerToken" } try { - $Response = Invoke-WebRequest -Method 'GET' -Uri $uri -Headers $headers + $Response = Invoke-WebRequest -Method 'POST' -Uri $uri -Headers $headers Write-Host "API review: $($Response.Content)" $StatusCode = $Response.StatusCode } From a52bef31ad838217218147989ff0afe1601e63bd Mon Sep 17 00:00:00 2001 From: Summer <summerwarren@microsoft.com> Date: Thu, 11 Dec 2025 12:26:46 -0800 Subject: [PATCH 149/186] Skip verify setup tool when running on coding agent (#47494) --- .github/copilot-instructions.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 0b5f79be156b..14d9d4576a6a 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -25,7 +25,10 @@ The Azure SDK for Java repository contains client libraries for Azure services, ### Prerequisites - To use Azure MCP tool calls, users must have PowerShell installed. Provide [PowerShell installation instructions](https://learn.microsoft.com/powershell/scripting/install/installing-powershell) if not installed, and recommend restarting the IDE to start the MCP server. -- Always run the [`azsdk_verify_setup`](../eng/common/instructions/azsdk-tools/verify-setup.instructions.md) tool to check the user's development environment setup for using SDK MCP tools. DO NOT PROCEED with running other tools before completing this step. Only skip for queries that don't need tools. +- When using Copilot from Visual Studio or VS Code (not applicable when using Coding Agent on Github.com): + - **Always run** the [`azsdk_verify_setup`](../eng/common/instructions/azsdk-tools/verify-setup.instructions.md) tool first to validate the user's development environment for SDK MCP tools. + - **Do not proceed** with any other tool execution until this step is complete. + - **Skip this check only** for queries that do not require tool execution. ## Behavior From 4ff07be70818b16476f021da9eddd6665a80a4ad Mon Sep 17 00:00:00 2001 From: Jiarui Guo <ryne.guo@gmail.com> Date: Thu, 11 Dec 2025 13:08:44 -0800 Subject: [PATCH 150/186] Update CODEOWNERS for translation text service (#47514) * Update CODEOWNERS for translation text service * Modify CODEOWNERS for Cognitive and Translator services Consolidate Translator owners --- .github/CODEOWNERS | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f3ebd8a34ff4..2ffd505394f5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -269,8 +269,11 @@ # AzureSdkOwners: @samvaity # ServiceOwners: @assafi +# PRLabel: %Cognitive - Translator +/sdk/translation/ @jrjrguo @SG-MS @Azure/azure-java-sdk + # ServiceLabel: %Cognitive - Translator -# ServiceOwners: @swmachan @MikeyMCZ +# ServiceOwners: @swmachan @jrjrguo @SG-MS # ServiceLabel: %Commerce # ServiceOwners: @ms-premp @qiaozha @@ -844,12 +847,6 @@ # AzureSdkOwners: @jairmyree # ServiceOwners: @klaaslanghout -# PRLabel: %Text Translation -/sdk/translation/azure-ai-translation-text/ @MikeyMCZ @Azure/azure-java-sdk - -# ServiceLabel: %Text Translation -# ServiceOwners: @MikeyMCZ - # ServiceLabel: %TimeseriesInsights # ServiceOwners: @Shipra1Mishra From 1fd42056a040de03e91c6b3ecd5092003efaa933 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 11 Dec 2025 13:57:08 -0800 Subject: [PATCH 151/186] Update trigger and PR settings in YAML pipeline (#47545) Co-authored-by: Juan Ospina <70209456+jeo02@users.noreply.github.com> --- eng/common/pipelines/ai-evals-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/common/pipelines/ai-evals-tests.yml b/eng/common/pipelines/ai-evals-tests.yml index 4e7baa287e49..43a7ae5926d6 100644 --- a/eng/common/pipelines/ai-evals-tests.yml +++ b/eng/common/pipelines/ai-evals-tests.yml @@ -1,6 +1,4 @@ -trigger: none - -pr: +trigger: branches: include: - main @@ -9,6 +7,8 @@ pr: - .github/copilot-instructions.md - eng/common/instructions/azsdk-tools/** +pr: none + parameters: - name: EvalProject type: string @@ -45,4 +45,4 @@ extends: EvalRepoCommit: ${{ parameters.EvalRepoCommit }} TargetRepoOwner: $(TargetRepoOwner) TargetRepoName: $(TargetRepoName) - TargetRepoCommit: $(TargetRepoCommit) \ No newline at end of file + TargetRepoCommit: $(TargetRepoCommit) From 9ec8b727f52610974b3df78759486e682fd1097c Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 11 Dec 2025 14:29:03 -0800 Subject: [PATCH 152/186] Sync eng/common directory with azure-sdk-tools for PR 13325 (#47549) * Refactor API Review task conditions in YAML * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../templates/steps/create-apireview.yml | 54 +++++++++---------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/eng/common/pipelines/templates/steps/create-apireview.yml b/eng/common/pipelines/templates/steps/create-apireview.yml index 85c4216ad761..a6f94c01a377 100644 --- a/eng/common/pipelines/templates/steps/create-apireview.yml +++ b/eng/common/pipelines/templates/steps/create-apireview.yml @@ -37,31 +37,29 @@ steps: parameters: WorkingDirectory: ${{ parameters.SourceRootPath }} - - task: AzureCLI@2 - inputs: - azureSubscription: 'APIView prod deployment' - scriptType: pscore - scriptLocation: scriptPath - scriptPath: ${{ parameters.SourceRootPath }}/eng/common/scripts/Create-APIReview.ps1 - # PackageInfoFiles example: @('a/file1.json','a/file2.json') - arguments: > - -PackageInfoFiles @('${{ join(''',''', parameters.PackageInfoFiles) }}') - -ArtifactList ('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Select-Object Name) - -ArtifactPath '${{parameters.ArtifactPath}}' - -ArtifactName ${{ parameters.ArtifactName }} - -PackageName '${{parameters.PackageName}}' - -SourceBranch '$(Build.SourceBranchName)' - -DefaultBranch '$(DefaultBranch)' - -ConfigFileDir '${{parameters.ConfigFileDir}}' - -BuildId '$(Build.BuildId)' - -RepoName '$(Build.Repository.Name)' - -MarkPackageAsShipped $${{parameters.MarkPackageAsShipped}} - displayName: Create API Review - condition: >- - and( - succeededOrFailed(), - ne(variables['Skip.CreateApiReview'], 'true'), - ne(variables['Build.Reason'],'PullRequest'), - eq(variables['System.TeamProject'], 'internal'), - not(endsWith(variables['Build.Repository.Name'], '-pr')) - ) + - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest'), not(endsWith(variables['Build.Repository.Name'], '-pr'))) }}: + - task: AzureCLI@2 + inputs: + azureSubscription: 'APIView prod deployment' + scriptType: pscore + scriptLocation: scriptPath + scriptPath: ${{ parameters.SourceRootPath }}/eng/common/scripts/Create-APIReview.ps1 + # PackageInfoFiles example: @('a/file1.json','a/file2.json') + arguments: > + -PackageInfoFiles @('${{ join(''',''', parameters.PackageInfoFiles) }}') + -ArtifactList ('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Select-Object Name) + -ArtifactPath '${{parameters.ArtifactPath}}' + -ArtifactName ${{ parameters.ArtifactName }} + -PackageName '${{parameters.PackageName}}' + -SourceBranch '$(Build.SourceBranchName)' + -DefaultBranch '$(DefaultBranch)' + -ConfigFileDir '${{parameters.ConfigFileDir}}' + -BuildId '$(Build.BuildId)' + -RepoName '$(Build.Repository.Name)' + -MarkPackageAsShipped $${{parameters.MarkPackageAsShipped}} + displayName: Create API Review + condition: >- + and( + succeededOrFailed(), + ne(variables['Skip.CreateApiReview'], 'true') + ) From 81a8e3bfe8a1b9a70a013908ed7a31dea33a10f4 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 11 Dec 2025 14:48:32 -0800 Subject: [PATCH 153/186] Sync eng/common directory with azure-sdk-tools for PR 13307 (#47548) * Fix npm URL replacement logic to handle versioned and non-versioned URLs Co-authored-by: weshaggard <9010698+weshaggard@users.noreply.github.com> * Simplify regex pattern as suggested by weshaggard Co-authored-by: weshaggard <9010698+weshaggard@users.noreply.github.com> * Fix regex to handle query params and fragments, add edge case tests Co-authored-by: weshaggard <9010698+weshaggard@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: weshaggard <9010698+weshaggard@users.noreply.github.com> Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> --- eng/common/scripts/Verify-Links.ps1 | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/eng/common/scripts/Verify-Links.ps1 b/eng/common/scripts/Verify-Links.ps1 index d0ac61d79542..0eb1798da6ca 100644 --- a/eng/common/scripts/Verify-Links.ps1 +++ b/eng/common/scripts/Verify-Links.ps1 @@ -163,7 +163,24 @@ function ProcessCratesIoLink([System.Uri]$linkUri, $path) { function ProcessNpmLink([System.Uri]$linkUri) { # npmjs.com started using Cloudflare which returns 403 and we need to instead check the registry api for existence checks # https://github.com/orgs/community/discussions/174098#discussioncomment-14461226 - $apiUrl = $linkUri.ToString() -replace '^https?://(?:www\.)?npmjs\.com/package/(.*)/v', 'https://registry.npmjs.org/$1' + + # Handle versioned URLs: https://www.npmjs.com/package/@azure/ai-agents/v/1.1.0 -> https://registry.npmjs.org/@azure/ai-agents/1.1.0 + # Handle non-versioned URLs: https://www.npmjs.com/package/@azure/ai-agents -> https://registry.npmjs.org/@azure/ai-agents + # The regex captures the package name (which may contain a slash for scoped packages) and optionally the version. + # Query parameters and URL fragments are excluded from the transformation. + $urlString = $linkUri.ToString() + if ($urlString -match '^https?://(?:www\.)?npmjs\.com/package/([^?#]+)/v/([^?#]+)') { + # Versioned URL: remove the /v/ segment but keep the version + $apiUrl = "https://registry.npmjs.org/$($matches[1])/$($matches[2])" + } + elseif ($urlString -match '^https?://(?:www\.)?npmjs\.com/package/([^?#]+)') { + # Non-versioned URL: just replace the domain + $apiUrl = "https://registry.npmjs.org/$($matches[1])" + } + else { + # Fallback: use the original URL if it doesn't match expected patterns + $apiUrl = $urlString + } return ProcessStandardLink ([System.Uri]$apiUrl) } From 854242443d2493f56f2fb6762137a3b7d1f4c625 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 12 Dec 2025 06:27:52 -0800 Subject: [PATCH 154/186] Add a step explicitly to verify setup (#47553) Co-authored-by: Praveen Kuttappan <praveen.kuttappan@gmail.com> --- .../local-sdk-workflow.instructions.md | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/eng/common/instructions/azsdk-tools/local-sdk-workflow.instructions.md b/eng/common/instructions/azsdk-tools/local-sdk-workflow.instructions.md index 756c478f1282..507e9a6cce4b 100644 --- a/eng/common/instructions/azsdk-tools/local-sdk-workflow.instructions.md +++ b/eng/common/instructions/azsdk-tools/local-sdk-workflow.instructions.md @@ -14,7 +14,7 @@ High level steps involved: --- -## Part A: Generate SDK Locally +## Generate SDK Locally ### Step 1: Outline workflow @@ -26,9 +26,10 @@ High level steps involved: 2. Verify SDK repository 3. Validate repository path 4. Identify path to configuration file - 5. Generate SDK using `azsdk_package_generate_code` MCP tool - 6. Identify SDK project path - 7. Build/Compile SDK using `azsdk_package_build_code` MCP tool + 5. Verify setup for the selected language + 6. Generate SDK using `azsdk_package_generate_code` MCP tool + 7. Identify SDK project path + 8. Build/Compile SDK using `azsdk_package_build_code` MCP tool - Ask the user to confirm readiness to proceed. --- @@ -71,7 +72,6 @@ High level steps involved: - Check if the provided repository path exists and matches the selected SDK language repository. - If invalid → prompt user to re-enter a valid path. -- Verify setup to ensure all required tools are installed for the selected language. --- @@ -96,15 +96,20 @@ High level steps involved: --- -### Step 6: Generate SDK - +### Step 6: Verify setup for selected language **Actions**: +- Run `azsdk_verify_setup` MCP tool to ensure the local environment is correctly configured for the selected SDK language. + +--- +### Step 7: Generate SDK + +**Actions**: - Run `azsdk_package_generate_code` MCP tool to generate the SDK locally. --- -## Part B: Build / Compile SDK Locally +## Build / Compile SDK Locally ### Step 1: Identify SDK project path From 70079af43fe81f6ebba9134e4248154805c2aa69 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 12 Dec 2025 13:16:45 -0800 Subject: [PATCH 155/186] Add 'APIView prod deployment' to internal service connections (#47555) Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> --- eng/common/pipelines/templates/jobs/prepare-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/pipelines/templates/jobs/prepare-pipelines.yml b/eng/common/pipelines/templates/jobs/prepare-pipelines.yml index 0e54b11a1e87..906a9bfcf1fe 100644 --- a/eng/common/pipelines/templates/jobs/prepare-pipelines.yml +++ b/eng/common/pipelines/templates/jobs/prepare-pipelines.yml @@ -82,7 +82,7 @@ jobs: $generateUnifiedWeekly = 'false' $testServiceConnections = '"Azure" "azure-sdk-tests" "azure-sdk-tests-preview" "azure-sdk-tests-public" "Azure SDK Test Resources - LiveTestSecrets"' - $internalServiceConnections = '"Azure" "Azure SDK Artifacts" "Azure SDK Engineering System" "opensource-api-connection" "AzureSDKEngKeyVault Secrets" "Azure SDK PME Managed Identity"' + $internalServiceConnections = '"Azure" "Azure SDK Artifacts" "Azure SDK Engineering System" "opensource-api-connection" "AzureSDKEngKeyVault Secrets" "Azure SDK PME Managed Identity" "APIView prod deployment"' # Map the language to the appropriate variable groups switch ($lang) From 96e2612e5dc747bcdc4cd4899e93ccfbd6cc0d1e Mon Sep 17 00:00:00 2001 From: Jose Alvarez <jpalvarezl@users.noreply.github.com> Date: Sat, 13 Dec 2025 08:48:35 +0100 Subject: [PATCH 156/186] OpenAI.HttpClient to Azure.HttpClient mapper for test instrumentation (#47416) * Porting over changes from private repo * formatting * Update sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/OpenAiRequestUrlBuilder.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/PolicyDecoratingHttpClient.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Formatting mismatch * Add async and error propagation test coverage for PolicyDecoratingHttpClient (#47429) * Initial plan * Add async and error propagation test coverage for PolicyDecoratingHttpClient Co-authored-by: jpalvarezl <11056031+jpalvarezl@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jpalvarezl <11056031+jpalvarezl@users.noreply.github.com> Co-authored-by: Jose Alvarez <jpalvarezl@users.noreply.github.com> * Add error handling tests for HttpClientHelper (#47428) * Initial plan * Add error handling tests for HttpClientHelper Added comprehensive error handling test cases including: - Null request body handling - IOException during body buffering - Malformed URLs - Async execution failures Co-authored-by: jpalvarezl <11056031+jpalvarezl@users.noreply.github.com> * Address code review feedback on error handling tests - Simplify FailingHttpRequestBody to directly throw UncheckedIOException - Improve assertion clarity in body buffering test - Remove fragile message checking in malformed URL test Co-authored-by: jpalvarezl <11056031+jpalvarezl@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jpalvarezl <11056031+jpalvarezl@users.noreply.github.com> Co-authored-by: Jose Alvarez <jpalvarezl@users.noreply.github.com> * Merged and improved assertions * More PR feedback * More PR feedback * More PR feedback * lazy mapping of types for the AzureHttpResponseAdapter * Simplified mapping * Always using default httpPipeline * Using bare minimum code * WIP: removing redundant code. Using default httpPipeline * fix async tests * Code style checks * Added recording for async test * Enabled sync tests and update assets * Updated test suite and restored value for context config * Using latest version of azure-core-test * Forwarding request timeout and adding more custom machters for tests * reassign addData result * WIP: timeout tests * Timeout tests are run only in Live test mode * Test asset update * Exceptions are allowed to propagate upwards * Error mapping in place * reformat * Format * Fixed timeout tests * PR feedback 1st round * PR feedback round 2: pom updates * dependency tag fixed and disabled test * Disabled flacky timeout tests * Disabled one more test --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: jpalvarezl <11056031+jpalvarezl@users.noreply.github.com> Co-authored-by: Srikanta <srnagar@microsoft.com> --- eng/versioning/version_client.txt | 1 + .../README.md | 5 +- sdk/ai/azure-ai-agents/assets.json | 2 +- sdk/ai/azure-ai-agents/pom.xml | 8 +- .../azure/ai/agents/AgentsClientBuilder.java | 38 +- .../http/AzureHttpResponseAdapter.java | 63 ++++ .../implementation/http/HttpClientHelper.java | 240 ++++++++++++ .../http/OpenAiRequestUrlBuilder.java | 138 +++++++ .../com/azure/ai/agents/ClientTestBase.java | 4 +- .../ai/agents/ConversationsAsyncTests.java | 23 +- .../azure/ai/agents/ConversationsTests.java | 19 +- .../http/HttpClientHelperTests.java | 342 ++++++++++++++++++ 12 files changed, 856 insertions(+), 27 deletions(-) create mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/AzureHttpResponseAdapter.java create mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/HttpClientHelper.java create mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/OpenAiRequestUrlBuilder.java create mode 100644 sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/http/HttpClientHelperTests.java diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index befc2c3e70be..f34850dd7462 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -547,6 +547,7 @@ io.clientcore:optional-dependency-tests;1.0.0-beta.1;1.0.0-beta.1 unreleased_com.azure:azure-data-appconfiguration;1.9.0-beta.1 unreleased_com.azure.v2:azure-core;2.0.0-beta.1 +unreleased_com.azure:azure-core-test;1.27.0-beta.14 unreleased_com.azure.v2:azure-identity;2.0.0-beta.1 unreleased_com.azure.v2:azure-data-appconfiguration;2.0.0-beta.1 unreleased_io.clientcore:http-netty4;1.0.0-beta.1 diff --git a/sdk/agrifood/azure-verticals-agrifood-farming/README.md b/sdk/agrifood/azure-verticals-agrifood-farming/README.md index c7986b0b630a..0e9da5017918 100644 --- a/sdk/agrifood/azure-verticals-agrifood-farming/README.md +++ b/sdk/agrifood/azure-verticals-agrifood-farming/README.md @@ -103,8 +103,9 @@ Farm hierarchy is a collection of below entities. ```java readme-sample-createFarmHierarchy // Create Party -JSONObject object = new JSONObject().appendField("name", "party1"); -BinaryData party = BinaryData.fromObject(object); +Map<String, String> partyData = new HashMap<>(); +partyData.put("name", "party1"); +BinaryData party = BinaryData.fromObject(partyData); partiesClient.createOrUpdateWithResponse("contoso-party", party, null).block(); // Get Party diff --git a/sdk/ai/azure-ai-agents/assets.json b/sdk/ai/azure-ai-agents/assets.json index fc849ff7d2b2..2b1a3831f771 100644 --- a/sdk/ai/azure-ai-agents/assets.json +++ b/sdk/ai/azure-ai-agents/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/ai/azure-ai-agents", - "Tag": "java/ai/azure-ai-agents_ca2ca780eb" + "Tag": "java/ai/azure-ai-agents_3f32cd8dff" } \ No newline at end of file diff --git a/sdk/ai/azure-ai-agents/pom.xml b/sdk/ai/azure-ai-agents/pom.xml index eb11edd2e282..378c86a00a9b 100644 --- a/sdk/ai/azure-ai-agents/pom.xml +++ b/sdk/ai/azure-ai-agents/pom.xml @@ -75,7 +75,13 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-core-test</artifactId> - <version>1.27.0-beta.13</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} --> + <version>1.27.0-beta.14</version> <!-- {x-version-update;unreleased_com.azure:azure-core-test;dependency} --> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.azure</groupId> + <artifactId>azure-core-http-okhttp</artifactId> + <version>1.13.2</version> <!-- {x-version-update;com.azure:azure-core-http-okhttp;dependency} --> <scope>test</scope> </dependency> diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsClientBuilder.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsClientBuilder.java index 3eb05608a18f..cd1e70bb3a1c 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsClientBuilder.java +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsClientBuilder.java @@ -5,6 +5,7 @@ import com.azure.ai.agents.implementation.AgentsClientImpl; import com.azure.ai.agents.implementation.TokenUtils; +import com.azure.ai.agents.implementation.http.HttpClientHelper; import com.azure.core.annotation.Generated; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.client.traits.ConfigurationTrait; @@ -32,7 +33,6 @@ import com.azure.core.util.ClientOptions; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; -import com.azure.core.util.UserAgentUtil; import com.azure.core.util.builder.ClientBuilderUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; @@ -41,7 +41,7 @@ import com.openai.client.okhttp.OpenAIOkHttpClient; import com.openai.client.okhttp.OpenAIOkHttpClientAsync; import com.openai.credential.BearerTokenCredential; -import java.time.Duration; + import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -328,7 +328,9 @@ private HttpPipeline createHttpPipeline() { * @return an instance of ConversationsAsyncClient. */ public ConversationsAsyncClient buildConversationsAsyncClient() { - return new ConversationsAsyncClient(getOpenAIAsyncClientBuilder().build()); + return new ConversationsAsyncClient(getOpenAIAsyncClientBuilder().build() + .withOptions(optionBuilder -> optionBuilder + .httpClient(HttpClientHelper.mapToOpenAIHttpClient(createHttpPipeline())))); } /** @@ -337,7 +339,9 @@ public ConversationsAsyncClient buildConversationsAsyncClient() { * @return an instance of ConversationsClient. */ public ConversationsClient buildConversationsClient() { - return new ConversationsClient(getOpenAIClientBuilder().build()); + return new ConversationsClient(getOpenAIClientBuilder().build() + .withOptions(optionBuilder -> optionBuilder + .httpClient(HttpClientHelper.mapToOpenAIHttpClient(createHttpPipeline())))); } /** @@ -346,8 +350,9 @@ public ConversationsClient buildConversationsClient() { * @return an instance of ResponsesClient */ public ResponsesClient buildResponsesClient() { - OpenAIOkHttpClient.Builder builder = getOpenAIClientBuilder(); - return new ResponsesClient(builder.build()); + return new ResponsesClient(getOpenAIClientBuilder().build() + .withOptions(optionBuilder -> optionBuilder + .httpClient(HttpClientHelper.mapToOpenAIHttpClient(createHttpPipeline())))); } /** @@ -356,7 +361,9 @@ public ResponsesClient buildResponsesClient() { * @return an instance of ResponsesAsyncClient */ public ResponsesAsyncClient buildResponsesAsyncClient() { - return new ResponsesAsyncClient(getOpenAIAsyncClientBuilder().build()); + return new ResponsesAsyncClient(getOpenAIAsyncClientBuilder().build() + .withOptions(optionBuilder -> optionBuilder + .httpClient(HttpClientHelper.mapToOpenAIHttpClient(createHttpPipeline())))); } private OpenAIOkHttpClient.Builder getOpenAIClientBuilder() { @@ -364,12 +371,12 @@ private OpenAIOkHttpClient.Builder getOpenAIClientBuilder() { .credential( BearerTokenCredential.create(TokenUtils.getBearerTokenSupplier(this.tokenCredential, DEFAULT_SCOPES))); builder.baseUrl(this.endpoint + (this.endpoint.endsWith("/") ? "openai" : "/openai")); - builder.replaceHeaders("User-Agent", getUserAgent()); if (this.serviceVersion != null) { builder.azureServiceVersion(AzureOpenAIServiceVersion.fromString(this.serviceVersion.getVersion())); builder.azureUrlPathMode(AzureUrlPathMode.UNIFIED); } - builder.timeout(Duration.ofSeconds(30)); + // We set the builder retries to 0 to avoid conflicts with the retry policy added through the HttpPipeline. + builder.maxRetries(0); return builder; } @@ -378,24 +385,15 @@ private OpenAIOkHttpClientAsync.Builder getOpenAIAsyncClientBuilder() { .credential( BearerTokenCredential.create(TokenUtils.getBearerTokenSupplier(this.tokenCredential, DEFAULT_SCOPES))); builder.baseUrl(this.endpoint + (this.endpoint.endsWith("/") ? "openai" : "/openai")); - builder.replaceHeaders("User-Agent", getUserAgent()); if (this.serviceVersion != null) { builder.azureServiceVersion(AzureOpenAIServiceVersion.fromString(this.serviceVersion.getVersion())); builder.azureUrlPath(AzureUrlPathMode.UNIFIED); } - builder.timeout(Duration.ofSeconds(30)); + // We set the builder retries to 0 to avoid conflicts with the retry policy added through the HttpPipeline. + builder.maxRetries(0); return builder; } - private String getUserAgent() { - HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; - ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; - String sdkName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); - String sdkVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); - String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); - return UserAgentUtil.toUserAgentString(applicationId, sdkName, sdkVersion, configuration); - } - private static final ClientLogger LOGGER = new ClientLogger(AgentsClientBuilder.class); /** diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/AzureHttpResponseAdapter.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/AzureHttpResponseAdapter.java new file mode 100644 index 000000000000..e299a62a1d48 --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/AzureHttpResponseAdapter.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents.implementation.http; + +import com.azure.core.http.HttpHeader; +import com.azure.core.http.HttpHeaders; +import com.azure.core.util.logging.ClientLogger; +import com.openai.core.http.Headers; +import com.openai.core.http.HttpResponse; + +import java.io.InputStream; + +/** + * Adapter that exposes an Azure {@link com.azure.core.http.HttpResponse} as an OpenAI {@link HttpResponse}. This keeps + * the translation logic encapsulated so response handling elsewhere can remain framework agnostic. + */ +final class AzureHttpResponseAdapter implements HttpResponse { + + private static final ClientLogger LOGGER = new ClientLogger(AzureHttpResponseAdapter.class); + + private final com.azure.core.http.HttpResponse azureResponse; + + /** + * Creates a new adapter instance for the provided Azure response. + * + * @param azureResponse Response returned by the Azure pipeline. + */ + AzureHttpResponseAdapter(com.azure.core.http.HttpResponse azureResponse) { + this.azureResponse = azureResponse; + } + + @Override + public int statusCode() { + return azureResponse.getStatusCode(); + } + + @Override + public Headers headers() { + return toOpenAiHeaders(azureResponse.getHeaders()); + } + + @Override + public InputStream body() { + return azureResponse.getBodyAsBinaryData().toStream(); + } + + @Override + public void close() { + azureResponse.close(); + } + + /** + * Copies headers from the Azure response into the immutable OpenAI {@link Headers} collection. + */ + private static Headers toOpenAiHeaders(HttpHeaders httpHeaders) { + Headers.Builder builder = Headers.builder(); + for (HttpHeader header : httpHeaders) { + builder.put(header.getName(), header.getValuesList()); + } + return builder.build(); + } +} diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/HttpClientHelper.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/HttpClientHelper.java new file mode 100644 index 000000000000..e7df9ee0c91f --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/HttpClientHelper.java @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents.implementation.http; + +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpMethod; +import com.azure.core.http.HttpPipeline; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.openai.core.RequestOptions; +import com.openai.core.Timeout; +import com.openai.core.http.Headers; +import com.openai.core.http.HttpClient; +import com.openai.core.http.HttpRequest; +import com.openai.core.http.HttpRequestBody; +import com.openai.core.http.HttpResponse; +import com.openai.errors.BadRequestException; +import com.openai.errors.InternalServerException; +import com.openai.errors.NotFoundException; +import com.openai.errors.OpenAIException; +import com.openai.errors.PermissionDeniedException; +import com.openai.errors.RateLimitException; +import com.openai.errors.UnauthorizedException; +import com.openai.errors.UnexpectedStatusCodeException; +import com.openai.errors.UnprocessableEntityException; + +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.Objects; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.TimeoutException; + +/** + * Utility entry point that adapts an Azure {@link com.azure.core.http.HttpClient} so it can be consumed by + * the OpenAI SDK generated clients. The helper performs request/response translation so that existing Azure + * pipelines, diagnostics, and retry policies can be reused without exposing the Azure HTTP primitives to + * callers that only understand the OpenAI surface area. + */ +public final class HttpClientHelper { + + private static final ClientLogger LOGGER = new ClientLogger(HttpClientHelper.class); + + private HttpClientHelper() { + } + + /** + * Implements the OpenAI {@link HttpClient} interface that sends the HTTP request through the Azure HTTP pipeline. + * All requests and responses are converted on the fly. + * + * @param httpPipeline The Azure HTTP pipeline that will execute HTTP requests. + * @return A bridge client that honors the OpenAI interface but delegates execution to the Azure pipeline. + */ + public static HttpClient mapToOpenAIHttpClient(HttpPipeline httpPipeline) { + return new HttpClientWrapper(httpPipeline); + } + + private static final class HttpClientWrapper implements HttpClient { + + private final HttpPipeline httpPipeline; + + private HttpClientWrapper(HttpPipeline httpPipeline) { + this.httpPipeline = Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + } + + @Override + public void close() { + // no-op + } + + @Override + public HttpResponse execute(HttpRequest request) { + return execute(request, RequestOptions.none()); + } + + @Override + public HttpResponse execute(HttpRequest request, RequestOptions requestOptions) { + Objects.requireNonNull(request, "request"); + Objects.requireNonNull(requestOptions, "requestOptions"); + + com.azure.core.http.HttpRequest azureRequest = buildAzureRequest(request); + + return new AzureHttpResponseAdapter( + this.httpPipeline.sendSync(azureRequest, buildRequestContext(requestOptions))); + } + + @Override + public CompletableFuture<HttpResponse> executeAsync(HttpRequest request) { + return executeAsync(request, RequestOptions.none()); + } + + @Override + public CompletableFuture<HttpResponse> executeAsync(HttpRequest request, RequestOptions requestOptions) { + Objects.requireNonNull(request, "request"); + Objects.requireNonNull(requestOptions, "requestOptions"); + + final com.azure.core.http.HttpRequest azureRequest = buildAzureRequest(request); + + return this.httpPipeline.send(azureRequest, buildRequestContext(requestOptions)) + .map(response -> (HttpResponse) new AzureHttpResponseAdapter(response)) + .onErrorMap(HttpClientWrapper::mapAzureExceptionToOpenAI) + .toFuture(); + } + + /** + * Maps Azure exceptions to their corresponding OpenAI exception types. + * + * @param throwable The Azure exception to map. + * @return The corresponding OpenAI exception. + */ + private static Throwable mapAzureExceptionToOpenAI(Throwable throwable) { + if (throwable instanceof HttpResponseException) { + HttpResponseException httpResponseException = (HttpResponseException) throwable; + int statusCode = httpResponseException.getResponse().getStatusCode(); + Headers headers = toOpenAIHeaders(httpResponseException.getResponse().getHeaders()); + + switch (statusCode) { + case 400: + return BadRequestException.builder().headers(headers).cause(httpResponseException).build(); + + case 401: + return UnauthorizedException.builder().headers(headers).cause(httpResponseException).build(); + + case 403: + return PermissionDeniedException.builder() + .headers(headers) + .cause(httpResponseException) + .build(); + + case 404: + return NotFoundException.builder().headers(headers).cause(httpResponseException).build(); + + case 422: + return UnprocessableEntityException.builder() + .headers(headers) + .cause(httpResponseException) + .build(); + + case 429: + return RateLimitException.builder().headers(headers).cause(httpResponseException).build(); + + case 500: + case 502: + case 503: + case 504: + return InternalServerException.builder() + .statusCode(statusCode) + .headers(headers) + .cause(httpResponseException) + .build(); + + default: + return UnexpectedStatusCodeException.builder() + .statusCode(statusCode) + .headers(headers) + .cause(httpResponseException) + .build(); + } + } else if (throwable instanceof TimeoutException) { + return throwable; + } else { + return new OpenAIException(throwable.getMessage(), throwable.getCause()); + } + } + + /** + * Converts Azure {@link HttpHeaders} to OpenAI {@link Headers}. + */ + private static Headers toOpenAIHeaders(HttpHeaders azureHeaders) { + Headers.Builder builder = Headers.builder(); + azureHeaders.forEach(header -> builder.put(header.getName(), header.getValue())); + return builder.build(); + } + + /** + * Converts the OpenAI request metadata and body into an Azure {@link com.azure.core.http.HttpRequest}. + */ + private static com.azure.core.http.HttpRequest buildAzureRequest(HttpRequest request) { + HttpRequestBody requestBody = request.body(); + String contentType = requestBody != null ? requestBody.contentType() : null; + BinaryData bodyData = null; + + if (requestBody != null && requestBody.contentLength() > 0) { + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + requestBody.writeTo(outputStream); + bodyData = BinaryData.fromBytes(outputStream.toByteArray()); + } + + HttpHeaders headers = toAzureHeaders(request.headers()); + if (!CoreUtils.isNullOrEmpty(contentType) && headers.getValue(HttpHeaderName.CONTENT_TYPE) == null) { + headers.set(HttpHeaderName.CONTENT_TYPE, contentType); + } + + com.azure.core.http.HttpRequest azureRequest = new com.azure.core.http.HttpRequest( + HttpMethod.valueOf(request.method().name()), OpenAiRequestUrlBuilder.buildUrl(request), headers); + + if (bodyData != null) { + azureRequest.setBody(bodyData); + } + + return azureRequest; + } + + /** + * Copies OpenAI headers into an {@link HttpHeaders} instance so the Azure pipeline can process them. + */ + private static HttpHeaders toAzureHeaders(Headers sourceHeaders) { + HttpHeaders target = new HttpHeaders(); + sourceHeaders.names().forEach(name -> { + List<String> values = sourceHeaders.values(name); + HttpHeaderName headerName = HttpHeaderName.fromString(name); + if (values.isEmpty()) { + target.set(headerName, ""); + } else { + target.set(headerName, values); + } + }); + return target; + } + + /** + * Builds the request context from the given request options. + * @param requestOptions OpenAI SDK request options + * @return Azure request {@link Context} + */ + private static Context buildRequestContext(RequestOptions requestOptions) { + Context context = new Context("azure-eagerly-read-response", true); + Timeout timeout = requestOptions.getTimeout(); + // we use "read" as it's the closes thing to the "response timeout" + if (timeout != null && !timeout.read().isZero() && !timeout.read().isNegative()) { + context = context.addData("azure-response-timeout", timeout.read()); + } + return context; + } + } +} diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/OpenAiRequestUrlBuilder.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/OpenAiRequestUrlBuilder.java new file mode 100644 index 000000000000..f4490f771020 --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/OpenAiRequestUrlBuilder.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents.implementation.http; + +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.openai.core.http.HttpRequest; +import com.openai.core.http.QueryParams; + +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.util.List; +import java.util.StringJoiner; + +/** + * Utility methods that reconstruct the absolute {@link URL} required by the Azure pipeline from the + * OpenAI request metadata. The builder keeps the low-level path/query handling isolated so that + * {@link HttpClientHelper} can focus on the higher-level request mapping logic. + * This class will be deprecated as soon as support is added in the OpenAI SDK as described in this issue: + * <a href="https://github.com/openai/openai-java/issues/660"/> + */ +public final class OpenAiRequestUrlBuilder { + + private static final ClientLogger LOGGER = new ClientLogger(OpenAiRequestUrlBuilder.class); + + private OpenAiRequestUrlBuilder() { + } + + /** + * Builds an absolute {@link URL} using the base URL, path segments, and query parameters that are stored in the + * OpenAI {@link HttpRequest} abstraction. + * This method will be deprecated as soon as support is added in the OpenAI SDK as described in this issue: + * <a href="https://github.com/openai/openai-java/issues/660"/> + * + * @param request Source request provided by the OpenAI client. + * @return Absolute URL that can be consumed by Azure HTTP components. + */ + static URL buildUrl(HttpRequest request) { + try { + URI baseUri = URI.create(request.baseUrl()); + URL baseUrl = baseUri.toURL(); + String path = buildPath(baseUrl.getPath(), request.pathSegments()); + String query = buildQueryString(request.queryParams()); + URI resolved = new URI(baseUrl.getProtocol(), baseUrl.getUserInfo(), baseUrl.getHost(), baseUrl.getPort(), + path, query, null); + return resolved.toURL(); + } catch (MalformedURLException | URISyntaxException ex) { + throw LOGGER.logThrowableAsWarning(new IllegalStateException( + "Failed to build Azure HTTP request URL from base: " + request.baseUrl(), ex)); + } + } + + /** + * Creates a normalized path that merges the OpenAI base path with the additional path segments present on the + * request. + */ + private static String buildPath(String basePath, List<String> pathSegments) { + StringBuilder builder = new StringBuilder(); + String normalizedBasePath = normalizeBasePath(basePath); + if (!CoreUtils.isNullOrEmpty(normalizedBasePath)) { + builder.append(normalizedBasePath); + } + + for (String segment : pathSegments) { + if (builder.length() == 0 || builder.charAt(builder.length() - 1) != '/') { + builder.append('/'); + } + if (segment != null) { + builder.append(segment); + } + } + + return builder.length() == 0 ? "/" : builder.toString(); + } + + /** + * Normalizes the base path ensuring trailing slashes are removed and {@code null} inputs result in an empty path. + */ + private static String normalizeBasePath(String basePath) { + if (CoreUtils.isNullOrEmpty(basePath)) { + return ""; + } + if ("/".equals(basePath)) { + return ""; + } + return trimTrailingSlash(basePath); + } + + /** + * Removes the final {@code '/'} character when present so that subsequent concatenation does not duplicate + * separators. + */ + private static String trimTrailingSlash(String value) { + if (value == null) { + return null; + } + int length = value.length(); + if (length == 0) { + return value; + } + return value.charAt(length - 1) == '/' ? value.substring(0, length - 1) : value; + } + + /** + * Converts OpenAI {@link QueryParams} into a flattened query string. Encoding is deferred to {@link URI} so we do + * not double-encode values already escaped by upstream layers. + */ + private static String buildQueryString(QueryParams queryParams) { + if (queryParams == null || queryParams.isEmpty()) { + return null; + } + + StringJoiner joiner = new StringJoiner("&"); + queryParams.keys().forEach(name -> { + List<String> values = queryParams.values(name); + if (values.isEmpty()) { + joiner.add(name); + } else { + values.forEach(value -> joiner.add(formatQueryComponent(name, value))); + } + }); + String query = joiner.toString(); + return query.isEmpty() ? null : query; + } + + /** + * Formats a single query component using {@code name=value} semantics, handling parameters that omit a value. + */ + private static String formatQueryComponent(String name, String value) { + if (value == null) { + return name; + } + return name + "=" + value; + } +} diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ClientTestBase.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ClientTestBase.java index fde11bc68459..e420342e5bb0 100644 --- a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ClientTestBase.java +++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ClientTestBase.java @@ -105,7 +105,9 @@ private void addTestRecordCustomSanitizers() { } private void addCustomMatchers() { - interceptorManager.addMatchers(new CustomMatcher().setExcludedHeaders(Arrays.asList("Cookie", "Set-Cookie"))); + interceptorManager.addMatchers(new CustomMatcher().setExcludedHeaders(Arrays.asList("Cookie", "Set-Cookie", + "X-Stainless-Arch", "X-Stainless-Lang", "X-Stainless-OS", "X-Stainless-OS-Version", + "X-Stainless-Package-Version", "X-Stainless-Runtime", "X-Stainless-Runtime-Version"))); } protected void sleep(long millis) { diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ConversationsAsyncTests.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ConversationsAsyncTests.java index 8045fa5cf987..7b3293ef4084 100644 --- a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ConversationsAsyncTests.java +++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ConversationsAsyncTests.java @@ -4,7 +4,11 @@ package com.azure.ai.agents; import com.azure.core.http.HttpClient; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.logging.LogLevel; import com.openai.core.JsonValue; +import com.openai.core.RequestOptions; +import com.openai.core.Timeout; import com.openai.models.conversations.Conversation; import com.openai.models.conversations.ConversationDeletedResource; import com.openai.models.conversations.ConversationUpdateParams; @@ -16,14 +20,17 @@ import org.junit.jupiter.params.provider.MethodSource; import org.junit.platform.commons.util.StringUtils; +import java.time.Duration; import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeoutException; import static com.azure.ai.agents.TestUtils.DISPLAY_NAME_WITH_ARGUMENTS; import static org.junit.jupiter.api.Assertions.*; -@Disabled("Disabled for lack of recordings. Needs to be enabled on the Public Preview release.") public class ConversationsAsyncTests extends ClientTestBase { + private final ClientLogger logger = new ClientLogger(ConversationsAsyncTests.class); + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.agents.TestUtils#getTestParameters") public void basicCRUDOperations(HttpClient httpClient, AgentsServiceVersion serviceVersion) @@ -35,6 +42,7 @@ public void basicCRUDOperations(HttpClient httpClient, AgentsServiceVersion serv String conversationId = createdConversation.id(); assertNotNull(conversationId); assertTrue(StringUtils.isNotBlank(conversationId)); + logger.log(LogLevel.INFORMATIONAL, () -> "Create completed"); // update ConversationUpdateParams.Metadata metadata = ConversationUpdateParams.Metadata.builder() @@ -129,4 +137,17 @@ public void basicItemCRUDOperations(HttpClient httpClient, AgentsServiceVersion assertEquals(conversationId, conversationWithDeletedItem.id()); } + + @Disabled("Flaky test") + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.agents.TestUtils#getTestParameters") + public void timeoutResponse(HttpClient httpClient, AgentsServiceVersion serviceVersion) { + ConversationsAsyncClient client = getConversationsAsyncClient(httpClient, serviceVersion); + RequestOptions requestOptions + = RequestOptions.builder().timeout(Timeout.builder().read(Duration.ofMillis(1)).build()).build(); + + ExecutionException thrown = assertThrows(ExecutionException.class, + () -> client.getConversationServiceAsync().create(requestOptions).get()); + assertInstanceOf(TimeoutException.class, thrown.getCause()); + } } diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ConversationsTests.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ConversationsTests.java index 5ac54380fd8e..c8f950410454 100644 --- a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ConversationsTests.java +++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ConversationsTests.java @@ -5,6 +5,8 @@ import com.azure.core.http.HttpClient; import com.openai.core.JsonValue; +import com.openai.core.RequestOptions; +import com.openai.core.Timeout; import com.openai.models.conversations.*; import com.openai.models.conversations.items.*; import com.openai.models.responses.EasyInputMessage; @@ -13,10 +15,12 @@ import org.junit.jupiter.params.provider.MethodSource; import org.junit.platform.commons.util.StringUtils; +import java.time.Duration; +import java.util.concurrent.TimeoutException; + import static com.azure.ai.agents.TestUtils.DISPLAY_NAME_WITH_ARGUMENTS; import static org.junit.jupiter.api.Assertions.*; -@Disabled("Disabled for lack of recordings. Needs to be enabled on the Public Preview release.") public class ConversationsTests extends ClientTestBase { @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @@ -116,4 +120,17 @@ public void basicItemCRUDOperations(HttpClient httpClient, AgentsServiceVersion assertNotNull(conversationWithDeletedItem); assertEquals(conversationId, conversationWithDeletedItem.id()); } + + @Disabled("Flaky test") + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.ai.agents.TestUtils#getTestParameters") + public void timeoutResponse(HttpClient httpClient, AgentsServiceVersion serviceVersion) { + ConversationsClient client = getConversationsSyncClient(httpClient, serviceVersion); + + RequestOptions requestOptions + = RequestOptions.builder().timeout(Timeout.builder().read(Duration.ofMillis(1)).build()).build(); + RuntimeException thrown + = assertThrows(RuntimeException.class, () -> client.getConversationService().create(requestOptions)); + assertInstanceOf(TimeoutException.class, thrown.getCause()); + } } diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/http/HttpClientHelperTests.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/http/HttpClientHelperTests.java new file mode 100644 index 000000000000..59ab92fb7cde --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/http/HttpClientHelperTests.java @@ -0,0 +1,342 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents.implementation.http; + +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpMethod; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.core.util.Context; +import com.openai.core.http.HttpRequestBody; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.UncheckedIOException; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + +class HttpClientHelperTests { + + private static final HttpHeaderName REQUEST_ID_HEADER = HttpHeaderName.fromString("x-request-id"); + private static final HttpHeaderName CUSTOM_HEADER_NAME = HttpHeaderName.fromString("custom-header"); + private static final HttpHeaderName X_TEST_HEADER = HttpHeaderName.fromString("X-Test"); + private static final HttpHeaderName X_MULTI_HEADER = HttpHeaderName.fromString("X-Multi"); + + @Test + void executeMapsRequestAndResponse() { + RecordingHttpClient recordingClient = new RecordingHttpClient(request -> createMockResponse(request, 201, + new HttpHeaders().set(REQUEST_ID_HEADER, "req-123").set(CUSTOM_HEADER_NAME, "custom-value"), "pong")); + com.openai.core.http.HttpClient openAiClient + = HttpClientHelper.mapToOpenAIHttpClient(new HttpPipelineBuilder().httpClient(recordingClient).build()); + + com.openai.core.http.HttpRequest openAiRequest = createOpenAiRequest(); + + try (com.openai.core.http.HttpResponse response = openAiClient.execute(openAiRequest)) { + HttpRequest sentRequest = recordingClient.getLastRequest(); + assertNotNull(sentRequest, "Azure HttpClient should receive a request"); + assertEquals(HttpMethod.POST, sentRequest.getHttpMethod()); + assertEquals("https://example.com/path/segment?q=a%20b", sentRequest.getUrl().toString()); + assertEquals("alpha", sentRequest.getHeaders().getValue(X_TEST_HEADER)); + assertArrayEquals(new String[] { "first", "second" }, sentRequest.getHeaders().getValues(X_MULTI_HEADER)); + assertEquals("text/plain", sentRequest.getHeaders().getValue(HttpHeaderName.CONTENT_TYPE)); + assertEquals("payload", new String(sentRequest.getBodyAsBinaryData().toBytes(), StandardCharsets.UTF_8)); + + assertEquals(201, response.statusCode()); + assertEquals("req-123", response.requestId().orElseThrow(() -> new AssertionError("Missing request id"))); + assertEquals("custom-value", response.headers().values("custom-header").get(0)); + assertEquals("pong", new String(readAllBytes(response.body()), StandardCharsets.UTF_8)); + } catch (Exception e) { + fail("Exception thrown while reading response", e); + } + } + + @Test + void executeAsyncCompletesSuccessfully() { + RecordingHttpClient recordingClient + = new RecordingHttpClient(request -> createMockResponse(request, 204, new HttpHeaders(), "")); + com.openai.core.http.HttpClient openAiClient + = HttpClientHelper.mapToOpenAIHttpClient(new HttpPipelineBuilder().httpClient(recordingClient).build()); + + com.openai.core.http.HttpRequest openAiRequest = createOpenAiRequest(); + + CompletableFuture<com.openai.core.http.HttpResponse> future = openAiClient.executeAsync(openAiRequest); + try (com.openai.core.http.HttpResponse response = future.join()) { + assertEquals(204, response.statusCode()); + } catch (Exception e) { + fail("Exception thrown while reading response", e); + } + assertEquals(1, recordingClient.getSendCount()); + } + + @Test + void executeWithNullRequestBodySucceeds() throws Exception { + RecordingHttpClient recordingClient = new RecordingHttpClient(request -> { + // Verify the request has no body (or empty body) + com.azure.core.util.BinaryData bodyData = request.getBodyAsBinaryData(); + if (bodyData != null) { + assertEquals(0, bodyData.toBytes().length); + } + return createMockResponse(request, 200, new HttpHeaders(), "success"); + }); + com.openai.core.http.HttpClient openAiClient + = HttpClientHelper.mapToOpenAIHttpClient(new HttpPipelineBuilder().httpClient(recordingClient).build()); + + com.openai.core.http.HttpRequest openAiRequest = com.openai.core.http.HttpRequest.builder() + .method(com.openai.core.http.HttpMethod.GET) + .baseUrl("https://example.com") + .addPathSegment("test") + .build(); + + try (com.openai.core.http.HttpResponse response = openAiClient.execute(openAiRequest)) { + assertEquals(200, response.statusCode()); + assertEquals("success", new String(readAllBytes(response.body()), StandardCharsets.UTF_8)); + } + } + + @Disabled("Body gets eagerly evaluated. Instrumentation could be wrong.") + @Test + void executeThrowsUncheckedIOExceptionOnBodyBufferingFailure() { + RecordingHttpClient recordingClient + = new RecordingHttpClient(request -> createMockResponse(request, 200, new HttpHeaders(), "")); + com.openai.core.http.HttpClient openAiClient + = HttpClientHelper.mapToOpenAIHttpClient(new HttpPipelineBuilder().httpClient(recordingClient).build()); + + com.openai.core.http.HttpRequest openAiRequest = com.openai.core.http.HttpRequest.builder() + .method(com.openai.core.http.HttpMethod.POST) + .baseUrl("https://example.com") + .body(new FailingHttpRequestBody()) + .build(); + + RuntimeException exception = assertThrows(RuntimeException.class, () -> { + openAiClient.execute(openAiRequest); + }); + // Verify the error is related to body buffering failure + boolean hasBufferMessage = exception.getMessage() != null && exception.getMessage().contains("buffer"); + boolean hasIOCause = exception.getCause() instanceof IOException; + assertTrue(hasBufferMessage || hasIOCause, "Expected error related to buffer failure, got: " + exception); + } + + @Test + void executeThrowsExceptionOnMalformedUrl() { + RecordingHttpClient recordingClient + = new RecordingHttpClient(request -> createMockResponse(request, 200, new HttpHeaders(), "")); + com.openai.core.http.HttpClient openAiClient + = HttpClientHelper.mapToOpenAIHttpClient(new HttpPipelineBuilder().httpClient(recordingClient).build()); + + com.openai.core.http.HttpRequest openAiRequest = com.openai.core.http.HttpRequest.builder() + .method(com.openai.core.http.HttpMethod.GET) + .baseUrl("not-a-valid-url") + .build(); + + // Malformed URLs should throw an exception (typically IllegalArgumentException or IllegalStateException) + assertThrows(RuntimeException.class, () -> { + openAiClient.execute(openAiRequest); + }); + } + + @Disabled("Body gets eagerly evaluated. Instrumentation could be wrong.") + @Test + void executeAsyncPropagatesRequestBuildingErrors() { + RecordingHttpClient recordingClient + = new RecordingHttpClient(request -> createMockResponse(request, 200, new HttpHeaders(), "")); + com.openai.core.http.HttpClient openAiClient + = HttpClientHelper.mapToOpenAIHttpClient(new HttpPipelineBuilder().httpClient(recordingClient).build()); + + com.openai.core.http.HttpRequest openAiRequest = com.openai.core.http.HttpRequest.builder() + .method(com.openai.core.http.HttpMethod.POST) + .baseUrl("https://example.com") + .body(new FailingHttpRequestBody()) + .build(); + + CompletableFuture<com.openai.core.http.HttpResponse> future = openAiClient.executeAsync(openAiRequest); + + Exception exception = assertThrows(Exception.class, future::join); + Throwable cause = exception.getCause(); + assertNotNull(cause, "Expected a cause for the exception"); + // The error should be related to request building/buffering failure + assertTrue(cause instanceof RuntimeException, "Expected RuntimeException, got: " + cause.getClass().getName()); + } + + @Test + void executeAsyncPropagatesHttpClientFailures() { + FailingHttpClient failingClient = new FailingHttpClient(new RuntimeException("Network error")); + com.openai.core.http.HttpClient openAiClient + = HttpClientHelper.mapToOpenAIHttpClient(new HttpPipelineBuilder().httpClient(failingClient).build()); + + com.openai.core.http.HttpRequest openAiRequest = com.openai.core.http.HttpRequest.builder() + .method(com.openai.core.http.HttpMethod.GET) + .baseUrl("https://example.com") + .build(); + + CompletableFuture<com.openai.core.http.HttpResponse> future = openAiClient.executeAsync(openAiRequest); + + Exception exception = assertThrows(Exception.class, future::join); + Throwable cause = exception.getCause(); + assertNotNull(cause); + assertTrue(cause instanceof RuntimeException); + assertEquals("Network error", cause.getMessage()); + } + + private static com.openai.core.http.HttpRequest createOpenAiRequest() { + return com.openai.core.http.HttpRequest.builder() + .method(com.openai.core.http.HttpMethod.POST) + .baseUrl("https://example.com") + .addPathSegment("path") + .addPathSegment("segment") + .putHeader("X-Test", "alpha") + .putHeaders("X-Multi", Arrays.asList("first", "second")) + .putQueryParam("q", "a b") + .body(new TestHttpRequestBody("payload", "text/plain")) + .build(); + } + + private static MockHttpResponse createMockResponse(HttpRequest request, int statusCode, HttpHeaders headers, + String body) { + byte[] bytes = body == null ? new byte[0] : body.getBytes(StandardCharsets.UTF_8); + return new MockHttpResponse(request, statusCode, headers, bytes); + } + + private static byte[] readAllBytes(InputStream stream) throws IOException { + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + byte[] chunk = new byte[4096]; + int read; + while ((read = stream.read(chunk)) != -1) { + buffer.write(chunk, 0, read); + } + return buffer.toByteArray(); + } + + private static final class RecordingHttpClient implements HttpClient { + private final Function<HttpRequest, HttpResponse> responseFactory; + private HttpRequest lastRequest; + private int sendCount; + + private RecordingHttpClient(Function<HttpRequest, HttpResponse> responseFactory) { + this.responseFactory = responseFactory; + } + + @Override + public Mono<HttpResponse> send(HttpRequest request) { + this.lastRequest = request; + this.sendCount++; + return Mono.just(responseFactory.apply(request)); + } + + @Override + public Mono<HttpResponse> send(HttpRequest request, Context context) { + return send(request); + } + + HttpRequest getLastRequest() { + return lastRequest; + } + + int getSendCount() { + return sendCount; + } + } + + private static final class TestHttpRequestBody implements HttpRequestBody { + private final byte[] content; + private final String contentType; + + private TestHttpRequestBody(String content, String contentType) { + this.content = content.getBytes(StandardCharsets.UTF_8); + this.contentType = contentType; + } + + @Override + public void writeTo(OutputStream outputStream) { + try { + outputStream.write(content); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + + @Override + public String contentType() { + return contentType; + } + + @Override + public long contentLength() { + return content.length; + } + + @Override + public boolean repeatable() { + return true; + } + + @Override + public void close() { + // no-op + } + } + + private static final class FailingHttpRequestBody implements HttpRequestBody { + @Override + public void writeTo(OutputStream outputStream) { + // Simulate an I/O failure during body write + throw new UncheckedIOException(new IOException("Simulated I/O failure during body write")); + } + + @Override + public String contentType() { + return "application/octet-stream"; + } + + @Override + public long contentLength() { + return -1; + } + + @Override + public boolean repeatable() { + return false; + } + + @Override + public void close() { + // no-op + } + } + + private static final class FailingHttpClient implements HttpClient { + private final RuntimeException error; + + private FailingHttpClient(RuntimeException error) { + this.error = error; + } + + @Override + public Mono<HttpResponse> send(HttpRequest request) { + return Mono.error(error); + } + + @Override + public Mono<HttpResponse> send(HttpRequest request, Context context) { + return send(request); + } + } +} From 36b5a7d08709f3600e109cef865e5c9055d188fe Mon Sep 17 00:00:00 2001 From: v-huizhu2 <v-huizhu2@microsoft.com> Date: Mon, 15 Dec 2025 13:11:01 +0800 Subject: [PATCH 157/186] mgmt servicebus , fix live test failures (#47522) * feat(servicebus): disable local authentication in namespace creation - Added disableLocalAuth() method call to ServiceBus namespace creation - Applied disableLocalAuth() to BASIC and STANDARD SKU configurations - Updated queue and topic creation tests with disableLocalAuth() - Ensured consistent security configuration across all namespace types * chore(assets): update tag version for azure-resourcemanager-servicebus - Updated tag from java/servicebus/azure-resourcemanager-servicebus_9d62dd8d9d to java/servicebus/azure-resourcemanager-servicebus_660023c6a4 --- .../azure-resourcemanager-servicebus/assets.json | 2 +- .../servicebus/ServiceBusOperationsTests.java | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sdk/servicebus/azure-resourcemanager-servicebus/assets.json b/sdk/servicebus/azure-resourcemanager-servicebus/assets.json index c759c342974a..61cd679a3af7 100644 --- a/sdk/servicebus/azure-resourcemanager-servicebus/assets.json +++ b/sdk/servicebus/azure-resourcemanager-servicebus/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/servicebus/azure-resourcemanager-servicebus", - "Tag": "java/servicebus/azure-resourcemanager-servicebus_9d62dd8d9d" + "Tag": "java/servicebus/azure-resourcemanager-servicebus_660023c6a4" } diff --git a/sdk/servicebus/azure-resourcemanager-servicebus/src/test/java/com/azure/resourcemanager/servicebus/ServiceBusOperationsTests.java b/sdk/servicebus/azure-resourcemanager-servicebus/src/test/java/com/azure/resourcemanager/servicebus/ServiceBusOperationsTests.java index 503f1e88a6ee..414d9b65cc2f 100644 --- a/sdk/servicebus/azure-resourcemanager-servicebus/src/test/java/com/azure/resourcemanager/servicebus/ServiceBusOperationsTests.java +++ b/sdk/servicebus/azure-resourcemanager-servicebus/src/test/java/com/azure/resourcemanager/servicebus/ServiceBusOperationsTests.java @@ -78,6 +78,7 @@ public void canCRUDOnSimpleNamespace() { .withRegion(region) .withNewResourceGroup(rgCreatable) .withSku(NamespaceSku.BASIC) + .disableLocalAuth() .create(); ServiceBusNamespace namespace = serviceBusManager.namespaces().getByResourceGroup(rgName, namespaceDNSLabel); @@ -137,6 +138,7 @@ public void canCreateNamespaceThenCRUDOnQueue() { .withRegion(region) .withNewResourceGroup(rgCreatable) .withSku(NamespaceSku.STANDARD) + .disableLocalAuth() .create(); Assertions.assertNotNull(namespace); Assertions.assertNotNull(namespace.innerModel()); @@ -209,6 +211,7 @@ public void canCreateDeleteQueueWithNamespace() { .withNewResourceGroup(rgCreatable) .withSku(NamespaceSku.STANDARD) .withNewQueue(queueName, 1024) + .disableLocalAuth() .create(); Assertions.assertNotNull(namespace); Assertions.assertNotNull(namespace.innerModel()); @@ -244,6 +247,7 @@ public void canCreateNamespaceThenCRUDOnTopic() { .withRegion(region) .withNewResourceGroup(rgCreatable) .withSku(NamespaceSku.STANDARD) + .disableLocalAuth() .create(); Assertions.assertNotNull(namespace); Assertions.assertNotNull(namespace.innerModel()); @@ -313,6 +317,7 @@ public void canCreateDeleteTopicWithNamespace() { .withNewResourceGroup(rgCreatable) .withSku(NamespaceSku.STANDARD) .withNewTopic(topicName, 1024) + .disableLocalAuth() .create(); Assertions.assertNotNull(namespace); Assertions.assertNotNull(namespace.innerModel()); @@ -476,6 +481,7 @@ public void canPerformCRUDOnSubscriptions() { .withNewResourceGroup(rgCreatable) .withSku(NamespaceSku.STANDARD) .withNewTopic(topicName, 1024) + .disableLocalAuth() .create(); // Create Topic subscriptions and list it // @@ -523,6 +529,7 @@ public void canCRUDQueryWithSlashInName() { .withRegion(region) .withNewResourceGroup(rgName) .withSku(NamespaceSku.BASIC) + .disableLocalAuth() .create(); Queue queue = serviceBusNamespace.queues().define(queueName).create(); From 8af6274f08eaf0c94ae5d518ad977858510823be Mon Sep 17 00:00:00 2001 From: Rujun Chen <rujche@microsoft.com> Date: Mon, 15 Dec 2025 05:19:10 +0000 Subject: [PATCH 158/186] Fix bug: 'token-credential-bean-name' not work in spring-cloud-azure-stream-binder (#47557) * Add unit test to confirm 'token-credential-bean-name' property work in spring-cloud-azure-stream-binder * Fix bug: 'token-credential-bean-name' not work in spring-cloud-azure-stream-binder * Fix unit test failure * Use another method to fix the test failure --- ...reEventHubsMessagingAutoConfiguration.java | 5 + ...eServiceBusMessagingAutoConfiguration.java | 7 ++ ...ntHubsMessagingAutoConfigurationTests.java | 50 +++++----- ...iceBusMessagingAutoConfigurationTests.java | 52 +++++----- ...ractServiceBusSubClientBuilderFactory.java | 46 ++++++--- ...erviceBusSubClientBuilderFactoryTests.java | 11 ++- ...BusProcessorClientBuilderFactoryTests.java | 3 +- ...eBusReceiverClientBuilderFactoryTests.java | 3 +- ...iceBusSenderClientBuilderFactoryTests.java | 3 +- ...ionProcessorClientBuilderFactoryTests.java | 3 +- ...sionReceiverClientBuilderFactoryTests.java | 3 +- .../config/EventHubsBinderConfiguration.java | 19 +++- .../EventHubsBinderConfigurationTests.java | 97 ++++++++++++++++++- .../config/ServiceBusBinderConfiguration.java | 19 +++- .../ServiceBusBinderConfigurationTests.java | 91 ++++++++++++++++- ...ultEventHubsNamespaceProcessorFactory.java | 11 +++ ...aultEventHubsNamespaceProducerFactory.java | 11 +++ ...ultServiceBusNamespaceConsumerFactory.java | 10 ++ ...ltServiceBusNamespaceProcessorFactory.java | 16 ++- ...ultServiceBusNamespaceProducerFactory.java | 10 ++ 20 files changed, 375 insertions(+), 95 deletions(-) diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfiguration.java index 5526f7e995a8..24e33d671c62 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfiguration.java @@ -36,6 +36,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -88,12 +89,14 @@ static class ProcessorContainerConfiguration { @ConditionalOnMissingBean EventHubsProcessorFactory defaultEventHubsNamespaceProcessorFactory( NamespaceProperties properties, + ApplicationContext applicationContext, CheckpointStore checkpointStore, ObjectProvider<PropertiesSupplier<ConsumerIdentifier, ProcessorProperties>> suppliers, ObjectProvider<AzureTokenCredentialResolver> tokenCredentialResolvers, @Qualifier(DEFAULT_TOKEN_CREDENTIAL_BEAN_NAME) ObjectProvider<TokenCredential> defaultTokenCredentials) { DefaultEventHubsNamespaceProcessorFactory factory = new DefaultEventHubsNamespaceProcessorFactory(checkpointStore, properties, suppliers.getIfAvailable()); + factory.setApplicationContext(applicationContext); factory.setDefaultCredential(defaultTokenCredentials.getIfAvailable()); factory.setTokenCredentialResolver(tokenCredentialResolvers.getIfAvailable()); return factory; @@ -108,10 +111,12 @@ static class EventHubsTemplateConfiguration { @ConditionalOnMissingBean EventHubsProducerFactory defaultEventHubsNamespaceProducerFactory( NamespaceProperties properties, + ApplicationContext applicationContext, ObjectProvider<PropertiesSupplier<String, ProducerProperties>> suppliers, ObjectProvider<AzureTokenCredentialResolver> tokenCredentialResolvers, @Qualifier(DEFAULT_TOKEN_CREDENTIAL_BEAN_NAME) ObjectProvider<TokenCredential> defaultTokenCredentials) { DefaultEventHubsNamespaceProducerFactory factory = new DefaultEventHubsNamespaceProducerFactory(properties, suppliers.getIfAvailable()); + factory.setApplicationContext(applicationContext); factory.setDefaultCredential(defaultTokenCredentials.getIfAvailable()); factory.setTokenCredentialResolver(tokenCredentialResolvers.getIfAvailable()); return factory; diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfiguration.java index 6a410336a85b..37de7a174347 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfiguration.java @@ -41,6 +41,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -92,6 +93,7 @@ static class ProcessorContainerConfiguration { @ConditionalOnMissingBean ServiceBusProcessorFactory defaultServiceBusNamespaceProcessorFactory( NamespaceProperties properties, + ApplicationContext applicationContext, ObjectProvider<PropertiesSupplier<ConsumerIdentifier, ProcessorProperties>> suppliers, ObjectProvider<AzureTokenCredentialResolver> tokenCredentialResolvers, @Qualifier(DEFAULT_TOKEN_CREDENTIAL_BEAN_NAME) ObjectProvider<TokenCredential> defaultTokenCredentials, @@ -99,6 +101,7 @@ ServiceBusProcessorFactory defaultServiceBusNamespaceProcessorFactory( ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusProcessorClientBuilder>> processorClientBuilderCustomizers, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusSessionProcessorClientBuilder>> sessionProcessorClientBuilderCustomizers) { DefaultServiceBusNamespaceProcessorFactory factory = new DefaultServiceBusNamespaceProcessorFactory(properties, suppliers.getIfAvailable()); + factory.setApplicationContext(applicationContext); factory.setDefaultCredential(defaultTokenCredentials.getIfAvailable()); factory.setTokenCredentialResolver(tokenCredentialResolvers.getIfAvailable()); clientBuilderCustomizers.orderedStream().forEach(factory::addServiceBusClientBuilderCustomizer); @@ -115,12 +118,14 @@ static class ConsumerContainerConfiguration { @ConditionalOnMissingBean ServiceBusConsumerFactory defaultServiceBusNamespaceConsumerFactory( NamespaceProperties properties, + ApplicationContext applicationContext, ObjectProvider<PropertiesSupplier<ConsumerIdentifier, ConsumerProperties>> suppliers, ObjectProvider<AzureTokenCredentialResolver> tokenCredentialResolvers, @Qualifier(DEFAULT_TOKEN_CREDENTIAL_BEAN_NAME) ObjectProvider<TokenCredential> defaultTokenCredentials, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder>> customizers, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusSessionReceiverClientBuilder>> sessionReceiverCustomizers) { DefaultServiceBusNamespaceConsumerFactory factory = new DefaultServiceBusNamespaceConsumerFactory(properties, suppliers.getIfAvailable()); + factory.setApplicationContext(applicationContext); factory.setDefaultCredential(defaultTokenCredentials.getIfAvailable()); factory.setTokenCredentialResolver(tokenCredentialResolvers.getIfAvailable()); customizers.orderedStream().forEach(factory::addServiceBusClientBuilderCustomizer); @@ -136,12 +141,14 @@ static class ServiceBusTemplateConfiguration { @ConditionalOnMissingBean ServiceBusProducerFactory defaultServiceBusNamespaceProducerFactory( NamespaceProperties properties, + ApplicationContext applicationContext, ObjectProvider<PropertiesSupplier<String, ProducerProperties>> suppliers, ObjectProvider<AzureTokenCredentialResolver> tokenCredentialResolvers, @Qualifier(DEFAULT_TOKEN_CREDENTIAL_BEAN_NAME) ObjectProvider<TokenCredential> defaultTokenCredentials, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder>> clientBuilderCustomizers, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusSenderClientBuilder>> senderClientBuilderCustomizers) { DefaultServiceBusNamespaceProducerFactory factory = new DefaultServiceBusNamespaceProducerFactory(properties, suppliers.getIfAvailable()); + factory.setApplicationContext(applicationContext); factory.setDefaultCredential(defaultTokenCredentials.getIfAvailable()); factory.setTokenCredentialResolver(tokenCredentialResolvers.getIfAvailable()); clientBuilderCustomizers.orderedStream().forEach(factory::addServiceBusClientBuilderCustomizer); diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfigurationTests.java index 87daf3997d50..24dbb96eb7e0 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/eventhubs/AzureEventHubsMessagingAutoConfigurationTests.java @@ -5,6 +5,7 @@ import com.azure.core.credential.TokenCredential; import com.azure.messaging.eventhubs.CheckpointStore; +import com.azure.messaging.eventhubs.EventHubProducerAsyncClient; import com.azure.spring.cloud.autoconfigure.implementation.context.AzureGlobalPropertiesAutoConfiguration; import com.azure.spring.cloud.autoconfigure.implementation.context.AzureTokenCredentialAutoConfiguration; import com.azure.spring.cloud.autoconfigure.implementation.eventhubs.configuration.TestCheckpointStore; @@ -148,48 +149,43 @@ void testCustomTokenCredentialConfiguration() { AzureTokenCredentialAutoConfiguration.class, AzureGlobalPropertiesAutoConfiguration.class)) .withBean(EventHubsMessageConverter.class, EventHubsMessageConverter::new) + .withBean(CheckpointStore.class, TestCheckpointStore::new) .withPropertyValues( "spring.cloud.azure.eventhubs.connection-string=" + String.format(CONNECTION_STRING_FORMAT, "test-namespace"), "spring.cloud.azure.eventhubs.credential.token-credential-bean-name=customTokenCredential" ) .withUserConfiguration(AzureEventHubsPropertiesTestConfiguration.class) .run(context -> { - - // Verify that the properties contain the correct credential bean name + TokenCredential customCredential = context.getBean("customTokenCredential", TokenCredential.class); AzureEventHubsProperties eventHubsProperties = context.getBean(AzureEventHubsProperties.class); - assertThat(eventHubsProperties).isNotNull(); - assertThat(eventHubsProperties.getCredential()).isNotNull(); + assertThat(eventHubsProperties.getCredential().getTokenCredentialBeanName()) - .as("The token-credential-bean-name property should be set to customTokenCredential") .isEqualTo("customTokenCredential"); - // Verify that the custom token credential bean exists - assertThat(context).hasBean("customTokenCredential"); - TokenCredential customCredential = context.getBean("customTokenCredential", TokenCredential.class); - assertThat(customCredential).isNotNull(); - - // Verify the EventHubsProducerFactory has the tokenCredentialResolver configured - assertThat(context).hasSingleBean(EventHubsProducerFactory.class); EventHubsProducerFactory producerFactory = context.getBean(EventHubsProducerFactory.class); - assertThat(producerFactory).isNotNull(); - - // Verify tokenCredentialResolver resolves to the custom credential - Field tokenCredentialResolverField = producerFactory.getClass().getDeclaredField("tokenCredentialResolver"); - tokenCredentialResolverField.setAccessible(true); - Object tokenCredentialResolver = tokenCredentialResolverField.get(producerFactory); - assertThat(tokenCredentialResolver).as("TokenCredentialResolver should be configured").isNotNull(); - - // Cast to AzureCredentialResolver and invoke resolve() to verify it returns customTokenCredential - @SuppressWarnings("unchecked") - AzureCredentialResolver<TokenCredential> resolver = - (AzureCredentialResolver<TokenCredential>) tokenCredentialResolver; - TokenCredential resolvedCredential = resolver.resolve(eventHubsProperties); - assertThat(resolvedCredential) - .as("The resolved credential should be the customTokenCredential bean") + EventHubsProcessorFactory processorFactory = context.getBean(EventHubsProcessorFactory.class); + + // Validate credential resolution - without ApplicationContext propagation fix, + // tokenCredentialBeanName would be silently ignored and connection string would be used + assertThat(resolveCredential(producerFactory, eventHubsProperties)) + .isSameAs(customCredential); + assertThat(resolveCredential(processorFactory, eventHubsProperties)) .isSameAs(customCredential); + + // Validate runtime producer creation + EventHubProducerAsyncClient producer = producerFactory.createProducer("test-eventhub"); + producer.close(); }); } + @SuppressWarnings("unchecked") + private TokenCredential resolveCredential(Object factory, AzureEventHubsProperties properties) throws Exception { + Field field = factory.getClass().getDeclaredField("tokenCredentialResolver"); + field.setAccessible(true); + AzureCredentialResolver<TokenCredential> resolver = (AzureCredentialResolver<TokenCredential>) field.get(factory); + return resolver.resolve(properties); + } + @Configuration public static class CustomTokenCredentialConfiguration { @Bean diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfigurationTests.java index 0e60e03432c1..18890bedfdda 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/servicebus/AzureServiceBusMessagingAutoConfigurationTests.java @@ -8,6 +8,8 @@ import com.azure.spring.cloud.autoconfigure.implementation.context.AzureTokenCredentialAutoConfiguration; import com.azure.spring.cloud.autoconfigure.implementation.servicebus.properties.AzureServiceBusProperties; import com.azure.spring.cloud.core.credential.AzureCredentialResolver; +import com.azure.spring.cloud.service.servicebus.properties.ServiceBusEntityType; +import com.azure.spring.messaging.servicebus.core.ServiceBusConsumerFactory; import com.azure.spring.messaging.servicebus.core.ServiceBusProcessorFactory; import com.azure.spring.messaging.servicebus.core.ServiceBusProducerFactory; import com.azure.spring.messaging.servicebus.core.ServiceBusTemplate; @@ -150,44 +152,36 @@ void testCustomTokenCredentialConfiguration() { ) .withUserConfiguration(AzureServiceBusPropertiesTestConfiguration.class) .run(context -> { - - // Verify that the properties contain the correct credential bean name + TokenCredential customCredential = context.getBean("customTokenCredential", TokenCredential.class); AzureServiceBusProperties serviceBusProperties = context.getBean(AzureServiceBusProperties.class); - assertThat(serviceBusProperties).isNotNull(); - assertThat(serviceBusProperties.getCredential()).isNotNull(); + assertThat(serviceBusProperties.getCredential().getTokenCredentialBeanName()) - .as("The token-credential-bean-name property should be set to customTokenCredential") .isEqualTo("customTokenCredential"); - // Verify that the custom token credential bean exists - assertThat(context).hasBean("customTokenCredential"); - TokenCredential customCredential = context.getBean("customTokenCredential", TokenCredential.class); - assertThat(customCredential).isNotNull(); - - // Verify the ServiceBusProducerFactory has the tokenCredentialResolver configured - assertThat(context).hasSingleBean(ServiceBusProducerFactory.class); ServiceBusProducerFactory producerFactory = context.getBean(ServiceBusProducerFactory.class); - assertThat(producerFactory).isNotNull(); - - // Verify tokenCredentialResolver resolves to the custom credential - Field tokenCredentialResolverField = - producerFactory.getClass().getDeclaredField("tokenCredentialResolver"); - tokenCredentialResolverField.setAccessible(true); - Object tokenCredentialResolver = tokenCredentialResolverField.get(producerFactory); - assertThat(tokenCredentialResolver) - .as("TokenCredentialResolver should be configured").isNotNull(); - - // Cast to AzureCredentialResolver and invoke resolve() to verify it returns customTokenCredential - @SuppressWarnings("unchecked") - AzureCredentialResolver<TokenCredential> resolver = - (AzureCredentialResolver<TokenCredential>) tokenCredentialResolver; - TokenCredential resolvedCredential = resolver.resolve(serviceBusProperties); - assertThat(resolvedCredential) - .as("The resolved credential should be the customTokenCredential bean") + ServiceBusProcessorFactory processorFactory = context.getBean(ServiceBusProcessorFactory.class); + ServiceBusConsumerFactory consumerFactory = context.getBean(ServiceBusConsumerFactory.class); + + assertThat(resolveCredential(producerFactory, serviceBusProperties)) .isSameAs(customCredential); + assertThat(resolveCredential(processorFactory, serviceBusProperties)) + .isSameAs(customCredential); + assertThat(resolveCredential(consumerFactory, serviceBusProperties)) + .isSameAs(customCredential); + + // Validate runtime producer creation + producerFactory.createProducer("test-queue", ServiceBusEntityType.QUEUE).close(); }); } + @SuppressWarnings("unchecked") + private TokenCredential resolveCredential(Object factory, AzureServiceBusProperties properties) throws Exception { + Field field = factory.getClass().getDeclaredField("tokenCredentialResolver"); + field.setAccessible(true); + AzureCredentialResolver<TokenCredential> resolver = (AzureCredentialResolver<TokenCredential>) field.get(factory); + return resolver.resolve(properties); + } + @Configuration public static class CustomTokenCredentialConfiguration { @Bean diff --git a/sdk/spring/spring-cloud-azure-service/src/main/java/com/azure/spring/cloud/service/implementation/servicebus/factory/AbstractServiceBusSubClientBuilderFactory.java b/sdk/spring/spring-cloud-azure-service/src/main/java/com/azure/spring/cloud/service/implementation/servicebus/factory/AbstractServiceBusSubClientBuilderFactory.java index e8177a24cdb2..060dfc07a26f 100644 --- a/sdk/spring/spring-cloud-azure-service/src/main/java/com/azure/spring/cloud/service/implementation/servicebus/factory/AbstractServiceBusSubClientBuilderFactory.java +++ b/sdk/spring/spring-cloud-azure-service/src/main/java/com/azure/spring/cloud/service/implementation/servicebus/factory/AbstractServiceBusSubClientBuilderFactory.java @@ -20,6 +20,8 @@ import com.azure.spring.cloud.service.implementation.servicebus.properties.ServiceBusClientCommonProperties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; import java.util.Arrays; import java.util.List; @@ -36,6 +38,7 @@ abstract class AbstractServiceBusSubClientBuilderFactory<T, P extends ServiceBus private ServiceBusClientBuilder serviceBusClientBuilder; private final boolean shareServiceBusClientBuilder; + private ServiceBusClientBuilderFactory serviceBusClientBuilderFactory; /** * Create a {@link AbstractServiceBusSubClientBuilderFactory} instance with the properties and the collection of @@ -66,16 +69,27 @@ protected AbstractServiceBusSubClientBuilderFactory(ServiceBusClientBuilder serv if (serviceBusClientBuilder != null) { this.serviceBusClientBuilder = serviceBusClientBuilder; this.shareServiceBusClientBuilder = true; + this.serviceBusClientBuilderFactory = null; } else { - ServiceBusClientBuilderFactory serviceBusClientBuilderFactory = new ServiceBusClientBuilderFactory(properties); + this.serviceBusClientBuilderFactory = new ServiceBusClientBuilderFactory(properties); if (serviceBusClientBuilderCustomizers != null) { - serviceBusClientBuilderCustomizers.forEach(serviceBusClientBuilderFactory::addBuilderCustomizer); + serviceBusClientBuilderCustomizers.forEach(this.serviceBusClientBuilderFactory::addBuilderCustomizer); } - this.serviceBusClientBuilder = serviceBusClientBuilderFactory.build(); + // Don't build yet - defer until first use when ApplicationContext is available + this.serviceBusClientBuilder = null; this.shareServiceBusClientBuilder = false; } } + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + super.setApplicationContext(applicationContext); + // Propagate ApplicationContext to the nested ServiceBusClientBuilderFactory + if (this.serviceBusClientBuilderFactory != null) { + this.serviceBusClientBuilderFactory.setApplicationContext(applicationContext); + } + } + @Override protected void configureCredential(T builder) { // skip to avoid overriding the parent builder's credentials. @@ -99,7 +113,7 @@ protected boolean isShareServiceBusClientBuilder() { protected BiConsumer<T, ProxyOptions> consumeProxyOptions() { return (builder, proxy) -> { if (!isShareServiceBusClientBuilder()) { - this.serviceBusClientBuilder.proxyOptions(proxy); + getServiceBusClientBuilder().proxyOptions(proxy); } }; } @@ -108,7 +122,7 @@ protected BiConsumer<T, ProxyOptions> consumeProxyOptions() { protected BiConsumer<T, AmqpTransportType> consumeAmqpTransportType() { return (builder, t) -> { if (!isShareServiceBusClientBuilder()) { - this.serviceBusClientBuilder.transportType(t); + getServiceBusClientBuilder().transportType(t); } }; } @@ -117,7 +131,7 @@ protected BiConsumer<T, AmqpTransportType> consumeAmqpTransportType() { protected BiConsumer<T, AmqpRetryOptions> consumeAmqpRetryOptions() { return (builder, retry) -> { if (!isShareServiceBusClientBuilder()) { - this.serviceBusClientBuilder.retryOptions(retry); + getServiceBusClientBuilder().retryOptions(retry); } }; } @@ -126,7 +140,7 @@ protected BiConsumer<T, AmqpRetryOptions> consumeAmqpRetryOptions() { protected BiConsumer<T, ClientOptions> consumeClientOptions() { return (builder, client) -> { if (!isShareServiceBusClientBuilder()) { - this.serviceBusClientBuilder.clientOptions(client); + getServiceBusClientBuilder().clientOptions(client); } }; } @@ -141,17 +155,17 @@ protected List<AuthenticationDescriptor<?>> getAuthenticationDescriptors(T build return Arrays.asList( new NamedKeyAuthenticationDescriptor(credential -> { if (!isShareServiceBusClientBuilder()) { - this.serviceBusClientBuilder.credential(credential); + getServiceBusClientBuilder().credential(credential); } }), new SasAuthenticationDescriptor(credential -> { if (!isShareServiceBusClientBuilder()) { - this.serviceBusClientBuilder.credential(credential); + getServiceBusClientBuilder().credential(credential); } }), new TokenAuthenticationDescriptor(this.tokenCredentialResolver, credential -> { if (!isShareServiceBusClientBuilder()) { - this.serviceBusClientBuilder.credential(credential); + getServiceBusClientBuilder().credential(credential); } }) ); @@ -161,7 +175,7 @@ protected List<AuthenticationDescriptor<?>> getAuthenticationDescriptors(T build protected BiConsumer<T, Configuration> consumeConfiguration() { return (builder, configuration) -> { if (!isShareServiceBusClientBuilder()) { - this.serviceBusClientBuilder.configuration(configuration); + getServiceBusClientBuilder().configuration(configuration); } }; } @@ -170,7 +184,7 @@ protected BiConsumer<T, Configuration> consumeConfiguration() { protected BiConsumer<T, TokenCredential> consumeDefaultTokenCredential() { return (builder, credential) -> { if (!isShareServiceBusClientBuilder()) { - this.serviceBusClientBuilder.credential(credential); + getServiceBusClientBuilder().credential(credential); } }; } @@ -179,7 +193,7 @@ protected BiConsumer<T, TokenCredential> consumeDefaultTokenCredential() { protected BiConsumer<T, String> consumeConnectionString() { return (builder, connectionString) -> { if (!isShareServiceBusClientBuilder()) { - this.serviceBusClientBuilder.connectionString(connectionString); + getServiceBusClientBuilder().connectionString(connectionString); } }; } @@ -187,11 +201,15 @@ protected BiConsumer<T, String> consumeConnectionString() { @Override protected void configureService(T builder) { if (!isShareServiceBusClientBuilder()) { - this.serviceBusClientBuilder.fullyQualifiedNamespace(properties.getFullyQualifiedNamespace()); + getServiceBusClientBuilder().fullyQualifiedNamespace(properties.getFullyQualifiedNamespace()); } } protected ServiceBusClientBuilder getServiceBusClientBuilder() { + // Lazy initialization: build only when first accessed, ensuring ApplicationContext is available + if (serviceBusClientBuilder == null && serviceBusClientBuilderFactory != null) { + serviceBusClientBuilder = serviceBusClientBuilderFactory.build(); + } return serviceBusClientBuilder; } } diff --git a/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/AbstractServiceBusSubClientBuilderFactoryTests.java b/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/AbstractServiceBusSubClientBuilderFactoryTests.java index 2d9905cc98ce..5be7bf0f0e83 100644 --- a/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/AbstractServiceBusSubClientBuilderFactoryTests.java +++ b/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/AbstractServiceBusSubClientBuilderFactoryTests.java @@ -23,6 +23,7 @@ import static com.azure.spring.cloud.service.implementation.servicebus.factory.ServiceBusClientBuilderFactoryTests.CONNECTION_STRING_FORMAT; import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; @@ -145,7 +146,7 @@ private void verifyFqdnConfigured(boolean isShareServiceClientBuilder) { buildClient(builder); verify(factory.getServiceBusClientBuilder(), - times(1)).fullyQualifiedNamespace(properties.getFullyQualifiedNamespace()); + atLeast(1)).fullyQualifiedNamespace(properties.getFullyQualifiedNamespace()); } private void verifyClientSecretTokenCredentialConfigured(boolean isShareServiceClientBuilder) { @@ -206,7 +207,7 @@ private void verifyProxyPropertiesConfigured(boolean isShareServiceClientBuilder B builder = factory.build(); buildClient(builder); - verify(factory.getServiceBusClientBuilder(), times(1)).proxyOptions(any(ProxyOptions.class)); + verify(factory.getServiceBusClientBuilder(), atLeast(1)).proxyOptions(any(ProxyOptions.class)); } private void verifyFixedRetryPropertiesConfigured(boolean isShareServiceClientBuilder) { @@ -221,7 +222,7 @@ private void verifyFixedRetryPropertiesConfigured(boolean isShareServiceClientBu B builder = factory.build(); buildClient(builder); - verify(factory.getServiceBusClientBuilder(), times(1)).retryOptions(any(AmqpRetryOptions.class)); + verify(factory.getServiceBusClientBuilder(), atLeast(1)).retryOptions(any(AmqpRetryOptions.class)); } private void exponentialRetryPropertiesConfigured(boolean isShareServiceClientBuilder) { @@ -238,7 +239,7 @@ private void exponentialRetryPropertiesConfigured(boolean isShareServiceClientBu B builder = factory.build(); buildClient(builder); - verify(factory.getServiceBusClientBuilder(), times(1)).retryOptions(any(AmqpRetryOptions.class)); + verify(factory.getServiceBusClientBuilder(), atLeast(1)).retryOptions(any(AmqpRetryOptions.class)); } private void verifyTransportTypeConfigured(boolean isShareServiceClientBuilder) { @@ -252,7 +253,7 @@ private void verifyTransportTypeConfigured(boolean isShareServiceClientBuilder) B builder = factory.build(); buildClient(builder); - verify(factory.getServiceBusClientBuilder(), times(1)).transportType(transportType); + verify(factory.getServiceBusClientBuilder(), atLeast(1)).transportType(transportType); } } diff --git a/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusProcessorClientBuilderFactoryTests.java b/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusProcessorClientBuilderFactoryTests.java index 74c2447732e1..8ffec8e890b9 100644 --- a/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusProcessorClientBuilderFactoryTests.java +++ b/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusProcessorClientBuilderFactoryTests.java @@ -17,6 +17,7 @@ import java.time.Duration; import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; @@ -121,7 +122,7 @@ void verifyServicePropertiesConfigured(boolean isShareServiceClientBuilder) { verify(builder, times(1)).disableAutoComplete(); verify(builder, times(1)).maxConcurrentCalls(10); - verify(factory.getServiceBusClientBuilder(), times(1)).fullyQualifiedNamespace(properties.getFullyQualifiedNamespace()); + verify(factory.getServiceBusClientBuilder(), atLeast(1)).fullyQualifiedNamespace(properties.getFullyQualifiedNamespace()); } private ServiceBusProcessorClientTestProperties getServiceBusProcessorClientTestProperties(boolean isShareServiceClientBuilder) { diff --git a/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusReceiverClientBuilderFactoryTests.java b/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusReceiverClientBuilderFactoryTests.java index 028516bf94c4..0095c9cddf59 100644 --- a/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusReceiverClientBuilderFactoryTests.java +++ b/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusReceiverClientBuilderFactoryTests.java @@ -13,6 +13,7 @@ import java.time.Duration; +import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; @@ -71,7 +72,7 @@ void verifyServicePropertiesConfigured(boolean isShareServiceClientBuilder) { verify(builder, times(1)).maxAutoLockRenewDuration(Duration.ofSeconds(5)); verify(builder, times(1)).disableAutoComplete(); - verify(factory.getServiceBusClientBuilder(), times(1)).fullyQualifiedNamespace(properties.getFullyQualifiedNamespace()); + verify(factory.getServiceBusClientBuilder(), atLeast(1)).fullyQualifiedNamespace(properties.getFullyQualifiedNamespace()); } private ServiceBusReceiverClientTestProperties getServiceBusReceiverClientTestProperties(boolean isShareServiceClientBuilder) { diff --git a/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusSenderClientBuilderFactoryTests.java b/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusSenderClientBuilderFactoryTests.java index 45e9d979358c..06dd1c00391e 100644 --- a/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusSenderClientBuilderFactoryTests.java +++ b/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusSenderClientBuilderFactoryTests.java @@ -8,6 +8,7 @@ import com.azure.spring.cloud.service.servicebus.properties.ServiceBusEntityType; import org.junit.jupiter.api.Test; +import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; @@ -65,7 +66,7 @@ void verifyServicePropertiesConfigured(boolean isShareServiceClientBuilder) { verify(factory.getServiceBusClientBuilder(), times(1)).customEndpointAddress(customEndpoint); verify(builder, times(1)).topicName("test-topic"); - verify(factory.getServiceBusClientBuilder(), times(1)).fullyQualifiedNamespace(properties.getFullyQualifiedNamespace()); + verify(factory.getServiceBusClientBuilder(), atLeast(1)).fullyQualifiedNamespace(properties.getFullyQualifiedNamespace()); } @Override diff --git a/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusSessionProcessorClientBuilderFactoryTests.java b/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusSessionProcessorClientBuilderFactoryTests.java index a0bcdbd2bb3f..f4ebdedb9a20 100644 --- a/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusSessionProcessorClientBuilderFactoryTests.java +++ b/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusSessionProcessorClientBuilderFactoryTests.java @@ -19,6 +19,7 @@ import java.util.Map; import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; @@ -136,7 +137,7 @@ void verifyServicePropertiesConfigured(boolean isShareServiceClientBuilder) { verify(builder, times(1)).maxConcurrentCalls(10); verify(builder, times(1)).maxConcurrentSessions(20); - verify(factory.getServiceBusClientBuilder(), times(1)).fullyQualifiedNamespace(properties.getFullyQualifiedNamespace()); + verify(factory.getServiceBusClientBuilder(), atLeast(1)).fullyQualifiedNamespace(properties.getFullyQualifiedNamespace()); } private ServiceBusProcessorClientTestProperties getServiceBusProcessorClientTestProperties(boolean isShareServiceClientBuilder) { diff --git a/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusSessionReceiverClientBuilderFactoryTests.java b/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusSessionReceiverClientBuilderFactoryTests.java index 7bf0532e45eb..1371833ef52a 100644 --- a/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusSessionReceiverClientBuilderFactoryTests.java +++ b/sdk/spring/spring-cloud-azure-service/src/test/java/com/azure/spring/cloud/service/implementation/servicebus/factory/ServiceBusSessionReceiverClientBuilderFactoryTests.java @@ -13,6 +13,7 @@ import java.time.Duration; +import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; @@ -72,7 +73,7 @@ void verifyServicePropertiesConfigured(boolean isShareServiceClientBuilder) { verify(builder, times(1)).maxAutoLockRenewDuration(Duration.ofSeconds(5)); verify(builder, times(1)).disableAutoComplete(); - verify(factory.getServiceBusClientBuilder(), times(1)).fullyQualifiedNamespace(properties.getFullyQualifiedNamespace()); + verify(factory.getServiceBusClientBuilder(), atLeast(1)).fullyQualifiedNamespace(properties.getFullyQualifiedNamespace()); } private ServiceBusReceiverClientTestProperties getServiceBusReceiverClientTestProperties(boolean isShareServiceClientBuilder) { diff --git a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/main/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/config/EventHubsBinderConfiguration.java b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/main/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/config/EventHubsBinderConfiguration.java index 5c8773fc0f53..27345f9917ed 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/main/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/config/EventHubsBinderConfiguration.java +++ b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/main/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/config/EventHubsBinderConfiguration.java @@ -34,6 +34,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.cloud.stream.binder.Binder; +import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -118,21 +119,23 @@ EventHubsMessageChannelBinder eventHubBinder(EventHubsChannelProvisioner channel @Bean @ConditionalOnMissingBean EventHubsProducerFactoryCustomizer defaultEventHubsProducerFactoryCustomizer( + ApplicationContext applicationContext, AzureTokenCredentialResolver azureTokenCredentialResolver, @Qualifier(DEFAULT_TOKEN_CREDENTIAL_BEAN_NAME) TokenCredential defaultAzureCredential, ObjectProvider<AzureServiceClientBuilderCustomizer<EventHubClientBuilder>> clientBuilderCustomizers) { - return new DefaultProducerFactoryCustomizer(defaultAzureCredential, azureTokenCredentialResolver, clientBuilderCustomizers); + return new DefaultProducerFactoryCustomizer(applicationContext, defaultAzureCredential, azureTokenCredentialResolver, clientBuilderCustomizers); } @Bean @ConditionalOnMissingBean EventHubsProcessorFactoryCustomizer defaultEventHubsProcessorFactoryCustomizer( + ApplicationContext applicationContext, AzureTokenCredentialResolver azureTokenCredentialResolver, @Qualifier(DEFAULT_TOKEN_CREDENTIAL_BEAN_NAME) TokenCredential defaultCredential, ObjectProvider<AzureServiceClientBuilderCustomizer<EventProcessorClientBuilder>> processorClientBuilderCustomizers) { - return new DefaultProcessorFactoryCustomizer(defaultCredential, azureTokenCredentialResolver, processorClientBuilderCustomizers); + return new DefaultProcessorFactoryCustomizer(applicationContext, defaultCredential, azureTokenCredentialResolver, processorClientBuilderCustomizers); } /** @@ -140,13 +143,16 @@ EventHubsProcessorFactoryCustomizer defaultEventHubsProcessorFactoryCustomizer( */ static class DefaultProducerFactoryCustomizer implements EventHubsProducerFactoryCustomizer { + private final ApplicationContext applicationContext; private final TokenCredential defaultCredential; private final AzureTokenCredentialResolver tokenCredentialResolver; private final ObjectProvider<AzureServiceClientBuilderCustomizer<EventHubClientBuilder>> clientBuilderCustomizers; - DefaultProducerFactoryCustomizer(TokenCredential defaultCredential, + DefaultProducerFactoryCustomizer(ApplicationContext applicationContext, + TokenCredential defaultCredential, AzureTokenCredentialResolver azureTokenCredentialResolver, ObjectProvider<AzureServiceClientBuilderCustomizer<EventHubClientBuilder>> clientBuilderCustomizers) { + this.applicationContext = applicationContext; this.defaultCredential = defaultCredential; this.tokenCredentialResolver = azureTokenCredentialResolver; this.clientBuilderCustomizers = clientBuilderCustomizers; @@ -158,6 +164,7 @@ public void customize(EventHubsProducerFactory factory) { DefaultEventHubsNamespaceProducerFactory defaultFactory = (DefaultEventHubsNamespaceProducerFactory) factory; + defaultFactory.setApplicationContext(applicationContext); defaultFactory.setDefaultCredential(defaultCredential); defaultFactory.setTokenCredentialResolver(tokenCredentialResolver); clientBuilderCustomizers.orderedStream().forEach(defaultFactory::addBuilderCustomizer); @@ -174,13 +181,16 @@ ObjectProvider<AzureServiceClientBuilderCustomizer<EventHubClientBuilder>> getCl */ static class DefaultProcessorFactoryCustomizer implements EventHubsProcessorFactoryCustomizer { + private final ApplicationContext applicationContext; private final TokenCredential defaultCredential; private final AzureTokenCredentialResolver tokenCredentialResolver; private final ObjectProvider<AzureServiceClientBuilderCustomizer<EventProcessorClientBuilder>> processorClientBuilderCustomizers; - DefaultProcessorFactoryCustomizer(TokenCredential defaultCredential, + DefaultProcessorFactoryCustomizer(ApplicationContext applicationContext, + TokenCredential defaultCredential, AzureTokenCredentialResolver azureTokenCredentialResolver, ObjectProvider<AzureServiceClientBuilderCustomizer<EventProcessorClientBuilder>> processorClientBuilderCustomizers) { + this.applicationContext = applicationContext; this.defaultCredential = defaultCredential; this.tokenCredentialResolver = azureTokenCredentialResolver; this.processorClientBuilderCustomizers = processorClientBuilderCustomizers; @@ -192,6 +202,7 @@ public void customize(EventHubsProcessorFactory factory) { DefaultEventHubsNamespaceProcessorFactory defaultFactory = (DefaultEventHubsNamespaceProcessorFactory) factory; + defaultFactory.setApplicationContext(applicationContext); defaultFactory.setDefaultCredential(defaultCredential); defaultFactory.setTokenCredentialResolver(tokenCredentialResolver); processorClientBuilderCustomizers.orderedStream().forEach(defaultFactory::addBuilderCustomizer); diff --git a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/test/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/config/EventHubsBinderConfigurationTests.java b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/test/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/config/EventHubsBinderConfigurationTests.java index cc620a3b5de6..2d801815e159 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/test/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/config/EventHubsBinderConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/src/test/java/com/azure/spring/cloud/stream/binder/eventhubs/implementation/config/EventHubsBinderConfigurationTests.java @@ -3,10 +3,13 @@ package com.azure.spring.cloud.stream.binder.eventhubs.implementation.config; +import com.azure.core.credential.TokenCredential; import com.azure.messaging.eventhubs.CheckpointStore; import com.azure.messaging.eventhubs.EventHubClientBuilder; +import com.azure.messaging.eventhubs.EventHubProducerAsyncClient; import com.azure.messaging.eventhubs.EventProcessorClientBuilder; import com.azure.spring.cloud.autoconfigure.implementation.eventhubs.properties.AzureEventHubsProperties; +import com.azure.spring.cloud.core.credential.AzureCredentialResolver; import com.azure.spring.cloud.core.customizer.AzureServiceClientBuilderCustomizer; import com.azure.spring.cloud.resourcemanager.implementation.provisioning.EventHubsProvisioner; import com.azure.spring.cloud.stream.binder.eventhubs.config.EventHubsProcessorFactoryCustomizer; @@ -19,6 +22,8 @@ import com.azure.spring.cloud.stream.binder.eventhubs.core.implementation.provisioning.EventHubsChannelProvisioner; import com.azure.spring.cloud.stream.binder.eventhubs.implementation.provisioning.EventHubsChannelResourceManagerProvisioner; import com.azure.spring.integration.eventhubs.inbound.EventHubsInboundChannelAdapter; +import com.azure.spring.messaging.eventhubs.core.DefaultEventHubsNamespaceProducerFactory; +import com.azure.spring.messaging.eventhubs.core.EventHubsTemplate; import com.azure.spring.messaging.eventhubs.core.checkpoint.CheckpointMode; import com.azure.spring.messaging.eventhubs.core.listener.EventHubsMessageListenerContainer; import com.azure.spring.messaging.eventhubs.core.properties.EventHubsContainerProperties; @@ -32,6 +37,7 @@ import org.springframework.cloud.stream.binder.Binder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.test.util.ReflectionTestUtils; import java.time.Duration; import java.time.Instant; @@ -93,9 +99,6 @@ void shouldConfigureArmChannelProvisionerWhenResourceManagerProvided() { }); } - // conniey: Remove warning suppression when azure-messaging-eventhubs is updated to 5.21.0. - // https://github.com/Azure/azure-sdk-for-java/issues/46359 - @SuppressWarnings("deprecation") @Test void testExtendedBindingPropertiesShouldBind() { String producerConnectionString = String.format(CONNECTION_STRING_FORMAT, "fake-producer-namespace"); @@ -281,4 +284,92 @@ public void customize(Object builder) { } } + @Test + void testCustomTokenCredentialConfiguration() { + String connectionString = String.format(CONNECTION_STRING_FORMAT, "test-namespace"); + + this.contextRunner + .withConfiguration(AutoConfigurations.of(CustomTokenCredentialConfiguration.class)) + .withPropertyValues( + "spring.cloud.azure.eventhubs.connection-string=" + connectionString, + "spring.cloud.azure.eventhubs.credential.token-credential-bean-name=customTokenCredential" + ) + .run(context -> { + TokenCredential customCredential = context.getBean("customTokenCredential", TokenCredential.class); + AzureEventHubsProperties props = context.getBean(AzureEventHubsProperties.class); + EventHubsProducerFactoryCustomizer customizer = context.getBean(EventHubsProducerFactoryCustomizer.class); + + // Create producer factory and apply customizer + DefaultEventHubsNamespaceProducerFactory producerFactory = new DefaultEventHubsNamespaceProducerFactory( + context.getBean(NamespaceProperties.class)); + customizer.customize(producerFactory); + + // Validate credential resolution - without ApplicationContext propagation fix, + // tokenCredentialBeanName would be silently ignored + assertThat(resolveCredential(producerFactory, props)) + .isSameAs(customCredential); + + // Validate runtime producer creation + EventHubProducerAsyncClient producer = producerFactory.createProducer("test-eventhub"); + producer.close(); + }); + } + + @Test + void testCustomTokenCredentialConfigurationWithBinder() { + String connectionString = String.format(CONNECTION_STRING_FORMAT, "test-namespace"); + + this.contextRunner + .withConfiguration(AutoConfigurations.of(CustomTokenCredentialConfiguration.class)) + .withBean(CheckpointStore.class, () -> mock(CheckpointStore.class)) + .withPropertyValues( + "spring.cloud.azure.eventhubs.connection-string=" + connectionString, + "spring.cloud.azure.eventhubs.credential.token-credential-bean-name=customTokenCredential", + "spring.cloud.azure.eventhubs.namespace=test-namespace" + ) + .run(context -> { + EventHubsMessageChannelBinder binder = context.getBean(EventHubsMessageChannelBinder.class); + TokenCredential customCredential = context.getBean("customTokenCredential", TokenCredential.class); + AzureEventHubsProperties props = context.getBean(AzureEventHubsProperties.class); + + // Get producer factory from binder + EventHubsTemplate eventHubsTemplate = ReflectionTestUtils.invokeMethod(binder, "getEventHubTemplate"); + DefaultEventHubsNamespaceProducerFactory producerFactory = + (DefaultEventHubsNamespaceProducerFactory) ReflectionTestUtils.getField(eventHubsTemplate, "producerFactory"); + + // Get processor factory from binder + Object processorFactory = ReflectionTestUtils.invokeMethod(binder, "getProcessorFactory"); + + // Validate credential resolution for both factories + assertThat(resolveCredential(producerFactory, props)) + .isSameAs(customCredential); + assertThat(resolveCredential(processorFactory, props)) + .isSameAs(customCredential); + + // Validate runtime producer creation + EventHubProducerAsyncClient producer = producerFactory.createProducer("test-eventhub"); + producer.close(); + }); + } + + @SuppressWarnings("unchecked") + private TokenCredential resolveCredential(Object factory, AzureEventHubsProperties properties) { + try { + java.lang.reflect.Field field = factory.getClass().getDeclaredField("tokenCredentialResolver"); + field.setAccessible(true); + AzureCredentialResolver<TokenCredential> resolver = (AzureCredentialResolver<TokenCredential>) field.get(factory); + return resolver.resolve(properties); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + @Configuration + public static class CustomTokenCredentialConfiguration { + @Bean + public TokenCredential customTokenCredential() { + return mock(TokenCredential.class); + } + } + } diff --git a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/main/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/config/ServiceBusBinderConfiguration.java b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/main/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/config/ServiceBusBinderConfiguration.java index 4e26622665ae..015d30383c1d 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/main/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/config/ServiceBusBinderConfiguration.java +++ b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/main/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/config/ServiceBusBinderConfiguration.java @@ -33,6 +33,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.cloud.stream.binder.Binder; +import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -119,12 +120,13 @@ ServiceBusMessageChannelBinder serviceBusBinder(ServiceBusChannelProvisioner cha @Bean @ConditionalOnMissingBean ServiceBusProducerFactoryCustomizer defaultServiceBusProducerFactoryCustomizer( + ApplicationContext applicationContext, AzureTokenCredentialResolver azureTokenCredentialResolver, @Qualifier(DEFAULT_TOKEN_CREDENTIAL_BEAN_NAME) TokenCredential defaultAzureCredential, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder>> clientBuilderCustomizers, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusSenderClientBuilder>> senderClientBuilderCustomizers) { - return new DefaultProducerFactoryCustomizer(defaultAzureCredential, azureTokenCredentialResolver, + return new DefaultProducerFactoryCustomizer(applicationContext, defaultAzureCredential, azureTokenCredentialResolver, clientBuilderCustomizers, senderClientBuilderCustomizers); } @@ -132,13 +134,14 @@ ServiceBusProducerFactoryCustomizer defaultServiceBusProducerFactoryCustomizer( @Bean @ConditionalOnMissingBean ServiceBusProcessorFactoryCustomizer defaultServiceBusProcessorFactoryCustomizer( + ApplicationContext applicationContext, AzureTokenCredentialResolver azureTokenCredentialResolver, @Qualifier(DEFAULT_TOKEN_CREDENTIAL_BEAN_NAME) TokenCredential defaultAzureCredential, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder>> clientBuilderCustomizers, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusProcessorClientBuilder>> processorClientBuilderCustomizers, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusSessionProcessorClientBuilder>> sessionProcessorClientBuilderCustomizers) { - return new DefaultProcessorFactoryCustomizer(defaultAzureCredential, azureTokenCredentialResolver, + return new DefaultProcessorFactoryCustomizer(applicationContext, defaultAzureCredential, azureTokenCredentialResolver, clientBuilderCustomizers, processorClientBuilderCustomizers, sessionProcessorClientBuilderCustomizers); @@ -149,15 +152,18 @@ ServiceBusProcessorFactoryCustomizer defaultServiceBusProcessorFactoryCustomizer */ static class DefaultProducerFactoryCustomizer implements ServiceBusProducerFactoryCustomizer { + private final ApplicationContext applicationContext; private final TokenCredential defaultCredential; private final AzureTokenCredentialResolver tokenCredentialResolver; private final ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder>> clientBuilderCustomizers; private final ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusSenderClientBuilder>> senderClientBuilderCustomizers; - DefaultProducerFactoryCustomizer(TokenCredential defaultCredential, + DefaultProducerFactoryCustomizer(ApplicationContext applicationContext, + TokenCredential defaultCredential, AzureTokenCredentialResolver azureTokenCredentialResolver, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder>> clientBuilderCustomizers, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusSenderClientBuilder>> senderClientBuilderCustomizers) { + this.applicationContext = applicationContext; this.defaultCredential = defaultCredential; this.tokenCredentialResolver = azureTokenCredentialResolver; this.clientBuilderCustomizers = clientBuilderCustomizers; @@ -170,6 +176,7 @@ public void customize(ServiceBusProducerFactory factory) { DefaultServiceBusNamespaceProducerFactory defaultFactory = (DefaultServiceBusNamespaceProducerFactory) factory; + defaultFactory.setApplicationContext(applicationContext); defaultFactory.setDefaultCredential(defaultCredential); defaultFactory.setTokenCredentialResolver(tokenCredentialResolver); clientBuilderCustomizers.orderedStream().forEach(defaultFactory::addServiceBusClientBuilderCustomizer); @@ -192,17 +199,20 @@ ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.Servi */ static class DefaultProcessorFactoryCustomizer implements ServiceBusProcessorFactoryCustomizer { + private final ApplicationContext applicationContext; private final TokenCredential defaultCredential; private final AzureTokenCredentialResolver tokenCredentialResolver; private final ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder>> clientBuilderCustomizers; private final ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusProcessorClientBuilder>> processorClientBuilderCustomizers; private final ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusSessionProcessorClientBuilder>> sessionProcessorClientBuilderCustomizers; - DefaultProcessorFactoryCustomizer(TokenCredential defaultCredential, + DefaultProcessorFactoryCustomizer(ApplicationContext applicationContext, + TokenCredential defaultCredential, AzureTokenCredentialResolver azureTokenCredentialResolver, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder>> clientBuilderCustomizers, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusProcessorClientBuilder>> processorClientBuilderCustomizers, ObjectProvider<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusSessionProcessorClientBuilder>> sessionProcessorClientBuilderCustomizers) { + this.applicationContext = applicationContext; this.defaultCredential = defaultCredential; this.tokenCredentialResolver = azureTokenCredentialResolver; this.clientBuilderCustomizers = clientBuilderCustomizers; @@ -213,6 +223,7 @@ static class DefaultProcessorFactoryCustomizer implements ServiceBusProcessorFac @Override public void customize(ServiceBusProcessorFactory factory) { if (factory instanceof DefaultServiceBusNamespaceProcessorFactory defaultFactory) { + defaultFactory.setApplicationContext(applicationContext); defaultFactory.setDefaultCredential(defaultCredential); defaultFactory.setTokenCredentialResolver(tokenCredentialResolver); clientBuilderCustomizers.orderedStream().forEach(defaultFactory::addServiceBusClientBuilderCustomizer); diff --git a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/test/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/config/ServiceBusBinderConfigurationTests.java b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/test/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/config/ServiceBusBinderConfigurationTests.java index 1611bf16157a..1510974d625b 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/test/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/config/ServiceBusBinderConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/src/test/java/com/azure/spring/cloud/stream/binder/servicebus/implementation/config/ServiceBusBinderConfigurationTests.java @@ -3,26 +3,36 @@ package com.azure.spring.cloud.stream.binder.servicebus.implementation.config; +import com.azure.core.credential.TokenCredential; import com.azure.messaging.servicebus.ServiceBusClientBuilder; import com.azure.messaging.servicebus.models.ServiceBusReceiveMode; +import com.azure.spring.cloud.autoconfigure.implementation.servicebus.properties.AzureServiceBusProperties; +import com.azure.spring.cloud.core.credential.AzureCredentialResolver; import com.azure.spring.cloud.core.customizer.AzureServiceClientBuilderCustomizer; import com.azure.spring.cloud.resourcemanager.implementation.provisioning.ServiceBusProvisioner; import com.azure.spring.cloud.service.servicebus.properties.ServiceBusEntityType; import com.azure.spring.cloud.stream.binder.servicebus.config.ServiceBusProcessorFactoryCustomizer; import com.azure.spring.cloud.stream.binder.servicebus.config.ServiceBusProducerFactoryCustomizer; -import com.azure.spring.cloud.stream.binder.servicebus.implementation.ServiceBusMessageChannelBinder; +import com.azure.spring.cloud.stream.binder.servicebus.core.implementation.provisioning.ServiceBusChannelProvisioner; import com.azure.spring.cloud.stream.binder.servicebus.core.properties.ServiceBusConsumerProperties; import com.azure.spring.cloud.stream.binder.servicebus.core.properties.ServiceBusExtendedBindingProperties; import com.azure.spring.cloud.stream.binder.servicebus.core.properties.ServiceBusProducerProperties; -import com.azure.spring.cloud.stream.binder.servicebus.core.implementation.provisioning.ServiceBusChannelProvisioner; +import com.azure.spring.cloud.stream.binder.servicebus.implementation.ServiceBusMessageChannelBinder; import com.azure.spring.cloud.stream.binder.servicebus.implementation.provisioning.ServiceBusChannelResourceManagerProvisioner; +import com.azure.spring.messaging.servicebus.core.DefaultServiceBusNamespaceProducerFactory; +import com.azure.spring.messaging.servicebus.core.ServiceBusProducerFactory; +import com.azure.spring.messaging.servicebus.core.properties.NamespaceProperties; import com.azure.spring.messaging.servicebus.implementation.support.converter.ServiceBusMessageConverter; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.cloud.stream.binder.Binder; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; import org.springframework.test.util.ReflectionTestUtils; +import java.lang.reflect.Field; import java.time.Duration; import static com.azure.messaging.servicebus.models.SubQueue.DEAD_LETTER_QUEUE; @@ -255,4 +265,81 @@ public void customize(Object builder) { } } + @Test + void testCustomTokenCredentialConfiguration() { + String connectionString = String.format(CONNECTION_STRING_FORMAT, "test-namespace"); + + this.contextRunner + .withConfiguration(AutoConfigurations.of(CustomTokenCredentialConfiguration.class)) + .withPropertyValues( + "spring.cloud.azure.servicebus.connection-string=" + connectionString, + "spring.cloud.azure.servicebus.credential.token-credential-bean-name=customTokenCredential" + ) + .run(context -> { + TokenCredential customCredential = context.getBean("customTokenCredential", TokenCredential.class); + AzureServiceBusProperties serviceBusProperties = context.getBean(AzureServiceBusProperties.class); + + assertThat(serviceBusProperties.getCredential().getTokenCredentialBeanName()) + .isEqualTo("customTokenCredential"); + + ServiceBusProducerFactoryCustomizer customizer = context.getBean(ServiceBusProducerFactoryCustomizer.class); + DefaultServiceBusNamespaceProducerFactory producerFactory = + new DefaultServiceBusNamespaceProducerFactory(context.getBean(NamespaceProperties.class)); + customizer.customize(producerFactory); + + assertThat(resolveCredential(producerFactory, serviceBusProperties)) + .isSameAs(customCredential); + + producerFactory.createProducer("test-queue", ServiceBusEntityType.QUEUE).close(); + }); + } + + @Test + void testCustomTokenCredentialConfigurationWithBinder() { + String connectionString = String.format(CONNECTION_STRING_FORMAT, "test-namespace"); + + this.contextRunner + .withConfiguration(AutoConfigurations.of(CustomTokenCredentialConfiguration.class)) + .withPropertyValues( + "spring.cloud.azure.servicebus.connection-string=" + connectionString, + "spring.cloud.azure.servicebus.credential.token-credential-bean-name=customTokenCredential" + ) + .run(context -> { + TokenCredential customCredential = context.getBean("customTokenCredential", TokenCredential.class); + AzureServiceBusProperties serviceBusProperties = context.getBean(AzureServiceBusProperties.class); + ServiceBusMessageChannelBinder binder = context.getBean(ServiceBusMessageChannelBinder.class); + + Object serviceBusTemplate = ReflectionTestUtils.invokeMethod(binder, "getServiceBusTemplate"); + Field producerFactoryField = serviceBusTemplate.getClass().getDeclaredField("producerFactory"); + producerFactoryField.setAccessible(true); + Object producerFactory = producerFactoryField.get(serviceBusTemplate); + + Object processorFactory = ReflectionTestUtils.invokeMethod(binder, "getProcessorFactory"); + Assertions.assertNotNull(processorFactory); + + assertThat(resolveCredential(producerFactory, serviceBusProperties)) + .isSameAs(customCredential); + assertThat(resolveCredential(processorFactory, serviceBusProperties)) + .isSameAs(customCredential); + + ((ServiceBusProducerFactory) producerFactory).createProducer("test-queue", ServiceBusEntityType.QUEUE).close(); + }); + } + + @SuppressWarnings("unchecked") + private TokenCredential resolveCredential(Object factory, AzureServiceBusProperties properties) throws Exception { + Field field = factory.getClass().getDeclaredField("tokenCredentialResolver"); + field.setAccessible(true); + AzureCredentialResolver<TokenCredential> resolver = (AzureCredentialResolver<TokenCredential>) field.get(factory); + return resolver.resolve(properties); + } + + @Configuration + public static class CustomTokenCredentialConfiguration { + @Bean + public TokenCredential customTokenCredential() { + return mock(TokenCredential.class); + } + } + } diff --git a/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/core/DefaultEventHubsNamespaceProcessorFactory.java b/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/core/DefaultEventHubsNamespaceProcessorFactory.java index 6b63c9d0536b..5c9a3e4b7aba 100644 --- a/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/core/DefaultEventHubsNamespaceProcessorFactory.java +++ b/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/core/DefaultEventHubsNamespaceProcessorFactory.java @@ -25,6 +25,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.DisposableBean; +import org.springframework.context.ApplicationContext; import org.springframework.lang.NonNull; import org.springframework.lang.Nullable; import org.springframework.util.Assert; @@ -55,6 +56,7 @@ public final class DefaultEventHubsNamespaceProcessorFactory implements EventHub private static final Logger LOGGER = LoggerFactory.getLogger(DefaultEventHubsNamespaceProcessorFactory.class); private final List<Listener> listeners = new ArrayList<>(); + private ApplicationContext applicationContext; private final NamespaceProperties namespaceProperties; private final CheckpointStore checkpointStore; private final PropertiesSupplier<ConsumerIdentifier, ProcessorProperties> propertiesSupplier; @@ -167,6 +169,7 @@ private EventProcessorClient doCreateProcessor(@NonNull String eventHub, @NonNul factory.setDefaultTokenCredential(this.defaultCredential); factory.setTokenCredentialResolver(this.tokenCredentialResolver); + factory.setApplicationContext(this.applicationContext); factory.setSpringIdentifier(AzureSpringIdentifier.AZURE_SPRING_INTEGRATION_EVENT_HUBS); EventProcessorClientBuilder builder = factory.build(); @@ -246,4 +249,12 @@ private String getCustomizerKey(String eventHub, String consumerGroup) { return eventHub + "_" + consumerGroup; } + /** + * Set the application context. + * @param applicationContext the application context. + */ + public void setApplicationContext(ApplicationContext applicationContext) { + this.applicationContext = applicationContext; + } + } diff --git a/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/core/DefaultEventHubsNamespaceProducerFactory.java b/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/core/DefaultEventHubsNamespaceProducerFactory.java index bfc0635428e1..8cd6d5713b3f 100644 --- a/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/core/DefaultEventHubsNamespaceProducerFactory.java +++ b/sdk/spring/spring-messaging-azure-eventhubs/src/main/java/com/azure/spring/messaging/eventhubs/core/DefaultEventHubsNamespaceProducerFactory.java @@ -15,6 +15,7 @@ import com.azure.spring.messaging.eventhubs.core.properties.ProducerProperties; import com.azure.spring.messaging.eventhubs.implementation.properties.merger.ProducerPropertiesParentMerger; import org.springframework.beans.factory.DisposableBean; +import org.springframework.context.ApplicationContext; import org.springframework.lang.Nullable; import java.util.ArrayList; @@ -41,6 +42,7 @@ public final class DefaultEventHubsNamespaceProducerFactory implements EventHubsProducerFactory, DisposableBean { private final List<Listener> listeners = new ArrayList<>(); + private ApplicationContext applicationContext; private final NamespaceProperties namespaceProperties; private final PropertiesSupplier<String, ProducerProperties> propertiesSupplier; private final Map<String, EventHubProducerAsyncClient> clients = new ConcurrentHashMap<>(); @@ -82,6 +84,7 @@ private EventHubProducerAsyncClient doCreateProducer(String eventHub, @Nullable factory.setSpringIdentifier(AzureSpringIdentifier.AZURE_SPRING_INTEGRATION_EVENT_HUBS); factory.setTokenCredentialResolver(this.tokenCredentialResolver); factory.setDefaultTokenCredential(this.defaultCredential); + factory.setApplicationContext(this.applicationContext); EventHubClientBuilder builder = factory.build(); customizeBuilder(eventHub, builder); EventHubProducerAsyncClient producerClient = builder.buildAsyncProducerClient(); @@ -163,4 +166,12 @@ private void customizeBuilder(String eventHub, EventHubClientBuilder builder) { .forEach(customizer -> customizer.customize(builder)); } + /** + * Set the application context. + * @param applicationContext the application context. + */ + public void setApplicationContext(ApplicationContext applicationContext) { + this.applicationContext = applicationContext; + } + } diff --git a/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceConsumerFactory.java b/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceConsumerFactory.java index 1f907cae13f9..3d7802983cc1 100644 --- a/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceConsumerFactory.java +++ b/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceConsumerFactory.java @@ -20,6 +20,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.DisposableBean; +import org.springframework.context.ApplicationContext; import org.springframework.lang.Nullable; import java.util.ArrayList; @@ -42,6 +43,7 @@ public final class DefaultServiceBusNamespaceConsumerFactory implements ServiceBusConsumerFactory, DisposableBean { private static final Logger LOGGER = LoggerFactory.getLogger(DefaultServiceBusNamespaceConsumerFactory.class); private final List<Listener> listeners = new ArrayList<>(); + private ApplicationContext applicationContext; private final NamespaceProperties namespaceProperties; private final PropertiesSupplier<ConsumerIdentifier, ConsumerProperties> propertiesSupplier; private final Map<String, ServiceBusSessionReceiverClient> clients = new ConcurrentHashMap<>(); @@ -122,6 +124,7 @@ private ServiceBusSessionReceiverClient doCreateReceiver(String name, @Nullable factory.setDefaultTokenCredential(this.defaultCredential); factory.setTokenCredentialResolver(this.tokenCredentialResolver); factory.setSpringIdentifier(AzureSpringIdentifier.AZURE_SPRING_INTEGRATION_SERVICE_BUS); + factory.setApplicationContext(this.applicationContext); ServiceBusClientBuilder.ServiceBusSessionReceiverClientBuilder builder = factory.build(); @@ -214,4 +217,11 @@ private void customizeBuilder(String entityName, ServiceBusClientBuilder.Service .forEach(customizer -> customizer.customize(builder)); } + /** + * Set the application context. + * @param applicationContext the application context. + */ + public void setApplicationContext(ApplicationContext applicationContext) { + this.applicationContext = applicationContext; + } } diff --git a/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProcessorFactory.java b/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProcessorFactory.java index d0edbb3b874d..b59b5b90c960 100644 --- a/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProcessorFactory.java +++ b/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProcessorFactory.java @@ -25,6 +25,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.DisposableBean; +import org.springframework.context.ApplicationContext; import org.springframework.lang.NonNull; import org.springframework.lang.Nullable; import org.springframework.util.Assert; @@ -53,6 +54,7 @@ public final class DefaultServiceBusNamespaceProcessorFactory implements Service private static final Logger LOGGER = LoggerFactory.getLogger(DefaultServiceBusNamespaceProcessorFactory.class); private final Map<ConsumerIdentifier, ServiceBusProcessorClient> processorMap = new ConcurrentHashMap<>(); private final List<Listener> listeners = new ArrayList<>(); + private ApplicationContext applicationContext; private final NamespaceProperties namespaceProperties; private final PropertiesSupplier<ConsumerIdentifier, ProcessorProperties> propertiesSupplier; private final List<AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder>> serviceBusClientBuilderCustomizers = new ArrayList<>(); @@ -180,6 +182,7 @@ private ServiceBusProcessorClient doCreateProcessor(String name, factory.setDefaultTokenCredential(this.defaultCredential); factory.setTokenCredentialResolver(this.tokenCredentialResolver); factory.setSpringIdentifier(AzureSpringIdentifier.AZURE_SPRING_INTEGRATION_SERVICE_BUS); + factory.setApplicationContext(this.applicationContext); ServiceBusClientBuilder.ServiceBusSessionProcessorClientBuilder builder = factory.build(); customizeBuilder(name, subscription, builder); @@ -192,6 +195,7 @@ private ServiceBusProcessorClient doCreateProcessor(String name, factory.setDefaultTokenCredential(this.defaultCredential); factory.setTokenCredentialResolver(this.tokenCredentialResolver); factory.setSpringIdentifier(AzureSpringIdentifier.AZURE_SPRING_INTEGRATION_SERVICE_BUS); + factory.setApplicationContext(this.applicationContext); ServiceBusClientBuilder.ServiceBusProcessorClientBuilder builder = factory.build(); customizeBuilder(name, subscription, builder); @@ -259,7 +263,7 @@ public void addServiceBusClientBuilderCustomizer(AzureServiceClientBuilderCustom */ public void addBuilderCustomizer(AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusProcessorClientBuilder> customizer) { if (customizer == null) { - LOGGER.debug("The provided '{}' customizer is null, will ignore it.", + LOGGER.debug("The provided '{}' customizer is null, will ignore it.", ServiceBusClientBuilder.ServiceBusProcessorClientBuilder.class.getName()); } else { this.customizers.add(customizer); @@ -274,7 +278,7 @@ public void addBuilderCustomizer(AzureServiceClientBuilderCustomizer<ServiceBusC */ public void addSessionBuilderCustomizer(AzureServiceClientBuilderCustomizer<ServiceBusClientBuilder.ServiceBusSessionProcessorClientBuilder> customizer) { if (customizer == null) { - LOGGER.debug("The provided '{}' customizer is null, will ignore it.", + LOGGER.debug("The provided '{}' customizer is null, will ignore it.", ServiceBusClientBuilder.ServiceBusSessionProcessorClientBuilder.class.getName()); } else { this.sessionCustomizers.add(customizer); @@ -342,4 +346,12 @@ private String buildProcessorName(ConsumerIdentifier k) { return k.getDestination() + "/" + (group == null ? "" : group); } + /** + * Set the application context. + * @param applicationContext the application context. + */ + public void setApplicationContext(ApplicationContext applicationContext) { + this.applicationContext = applicationContext; + } + } diff --git a/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProducerFactory.java b/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProducerFactory.java index deb22a075610..af5926c76caf 100644 --- a/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProducerFactory.java +++ b/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProducerFactory.java @@ -16,6 +16,7 @@ import com.azure.spring.messaging.servicebus.core.properties.ProducerProperties; import com.azure.spring.messaging.servicebus.implementation.properties.merger.SenderPropertiesParentMerger; import org.springframework.beans.factory.DisposableBean; +import org.springframework.context.ApplicationContext; import org.springframework.lang.Nullable; import java.util.ArrayList; @@ -39,6 +40,7 @@ public final class DefaultServiceBusNamespaceProducerFactory implements ServiceBusProducerFactory, DisposableBean { private final List<Listener> listeners = new ArrayList<>(); + private ApplicationContext applicationContext; private final NamespaceProperties namespaceProperties; private final PropertiesSupplier<String, ProducerProperties> propertiesSupplier; private final Map<String, ServiceBusSenderAsyncClient> clients = new ConcurrentHashMap<>(); @@ -117,6 +119,7 @@ private ServiceBusSenderAsyncClient doCreateProducer(String name, @Nullable Prod factory.setDefaultTokenCredential(this.defaultCredential); factory.setTokenCredentialResolver(this.tokenCredentialResolver); factory.setSpringIdentifier(AzureSpringIdentifier.AZURE_SPRING_INTEGRATION_SERVICE_BUS); + factory.setApplicationContext(this.applicationContext); ServiceBusClientBuilder.ServiceBusSenderClientBuilder builder = factory.build(); customizeBuilder(name, builder); @@ -198,4 +201,11 @@ private void customizeBuilder(String entityName, ServiceBusClientBuilder.Service .forEach(customizer -> customizer.customize(builder)); } + /** + * Set the application context. + * @param applicationContext the application context. + */ + public void setApplicationContext(ApplicationContext applicationContext) { + this.applicationContext = applicationContext; + } } From 9c5473b367efc6d7cb3d03446d717d7aef25586b Mon Sep 17 00:00:00 2001 From: v-huizhu2 <v-huizhu2@microsoft.com> Date: Mon, 15 Dec 2025 13:23:37 +0800 Subject: [PATCH 159/186] mgmt containerservice, update api-version to 2025-10-01 (#47558) * build(sdk): update containerservice API spec tag to package-2025-10 - Changed the API specification tag from package-preview-2025-09 to package-2025-10 - Maintained existing modelerfour and rename-model configurations - Preserved ContainerServiceVMSizeTypes model settings - Kept sync stack disabled in generation args * gulp codegen * release(containerservice): update api-version to 2025-10-01 - Updated `api-version` to `2025-10-01` in containerservice changelog - Marked version 2.57.0 as released on 2025-12-15 - Removed beta status and unreleased tag for 2.57.0 - Moved dependency updates under Other Changes section - Updated azure-resourcemanager changelog to reflect containerservice changes * release(containerservice): promote azure-resourcemanager-containerservice to stable release - Updated version from 2.57.0-beta.2 to 2.57.0 in version client file - Removed beta designation from unreleased dependencies list - Updated POM version to stable release 2.57.0 - Updated dependency reference in azure-resourcemanager POM to use stable version * chore(deps): update azure-resourcemanager-containerservice version - Update dependency version from 2.56.0 to 2.57.0 in README.md * fix(containerservice): remove preview API fields from agent pool implementation - Removed nodeImageVersion field from agent pool inner model - Removed upgradeStrategy field from agent pool inner model - Cleaned up preview API version specific code - Ensured compatibility with stable API versions * test(aks): update Kubernetes version in integration tests - Upgrade initial cluster version from 1.31.8 to 1.32.4 - Add version upgrade test from 1.32.4 to 1.33.1 - Verify version assertions after cluster refresh operations - Ensure version update functionality works as expected * test(containerservice): update OS disk type to managed in Kubernetes cluster tests - Changed OS disk type from ephemeral to managed in agent pool configuration - Updated assertion to verify managed OS disk type - Added documentation reference for default OS disk sizing in AKS * chore(assets): update asset tag for containerservice sdk - Updated asset tag from c3a165c41a to 8849c3960f - Maintains consistency with latest azure-sdk-assets changes - No functional code modifications included * test(containerservice): update OS disk type to ephemeral in Kubernetes cluster tests - Changed OS disk type from MANAGED to EPHEMERAL in cluster configuration - Updated corresponding assertion to verify ephemeral disk type - Removed comment reference to Azure documentation for default OS disk sizing * chore(assets): update asset tag for container service - Updated asset tag from previous commit hash to new commit hash - Maintains consistency with latest changes in azure-sdk-assets repository --- eng/versioning/version_client.txt | 3 +- .../CHANGELOG.md | 10 +- .../README.md | 2 +- .../assets.json | 2 +- .../pom.xml | 2 +- .../fluent/AgentPoolsClient.java | 130 +- .../ContainerServiceManagementClient.java | 61 +- .../ContainerServiceOperationsClient.java | 66 - .../fluent/IdentityBindingsClient.java | 343 ---- .../fluent/JwtAuthenticatorsClient.java | 352 ---- .../fluent/LoadBalancersClient.java | 294 --- .../fluent/MachinesClient.java | 187 +- .../MaintenanceConfigurationsClient.java | 36 +- .../fluent/ManagedClusterSnapshotsClient.java | 327 --- .../fluent/ManagedClustersClient.java | 484 +---- .../fluent/MeshMembershipsClient.java | 345 ---- .../fluent/OperationStatusResultsClient.java | 186 -- .../fluent/models/AgentPoolInner.java | 255 +-- .../models/AgentPoolUpgradeProfileInner.java | 34 - .../AgentPoolUpgradeProfileProperties.java | 57 - .../GuardrailsAvailableVersionInner.java | 175 -- .../fluent/models/IdentityBindingInner.java | 186 -- .../fluent/models/JwtAuthenticatorInner.java | 185 -- .../fluent/models/LoadBalancerInner.java | 298 --- .../fluent/models/LoadBalancerProperties.java | 259 --- .../fluent/models/MachineInner.java | 28 +- ...agedClusterAgentPoolProfileProperties.java | 370 +--- .../fluent/models/ManagedClusterInner.java | 162 +- .../models/ManagedClusterProperties.java | 232 +-- .../models/ManagedClusterSnapshotInner.java | 240 --- .../ManagedClusterSnapshotProperties.java | 150 -- .../fluent/models/MeshMembershipInner.java | 220 --- .../fluent/models/NodeImageVersionInner.java | 179 -- .../models/OperationStatusResultInner.java | 329 ---- .../SafeguardsAvailableVersionInner.java | 175 -- .../fluent/models/SnapshotInner.java | 6 +- .../fluent/models/SnapshotProperties.java | 11 +- .../implementation/AgentPoolsClientImpl.java | 309 +-- .../ContainerServiceManagementClientImpl.java | 140 +- .../ContainerServiceOperationsClientImpl.java | 293 --- .../IdentityBindingsClientImpl.java | 947 --------- .../JwtAuthenticatorsClientImpl.java | 963 --------- .../KubernetesClusterAgentPoolImpl.java | 4 - .../LoadBalancersClientImpl.java | 842 -------- .../implementation/MachinesClientImpl.java | 393 +--- .../MaintenanceConfigurationsClientImpl.java | 61 +- .../ManagedClusterSnapshotsClientImpl.java | 1020 ---------- .../ManagedClustersClientImpl.java | 1751 ++++------------- .../ManagedNamespacesClientImpl.java | 24 +- .../MeshMembershipsClientImpl.java | 950 --------- .../OperationStatusResultsClientImpl.java | 587 ------ .../implementation/OperationsClientImpl.java | 4 +- .../PrivateEndpointConnectionsClientImpl.java | 16 +- .../PrivateLinkResourcesClientImpl.java | 4 +- ...esolvePrivateLinkServiceIdsClientImpl.java | 4 +- .../implementation/SnapshotsClientImpl.java | 24 +- .../TrustedAccessRoleBindingsClientImpl.java | 16 +- .../TrustedAccessRolesClientImpl.java | 4 +- .../models/AccelerationMode.java | 54 - .../models/AddonAutoscaling.java | 51 - .../models/AdvancedNetworking.java | 39 +- .../models/AdvancedNetworkingPerformance.java | 105 - .../models/AdvancedNetworkingSecurity.java | 50 +- ...edNetworkingSecurityTransitEncryption.java | 100 - .../AgentPoolArtifactStreamingProfile.java | 99 - .../AgentPoolBlueGreenUpgradeSettings.java | 210 -- .../models/AgentPoolMode.java | 10 - .../models/AgentPoolRecentlyUsedVersion.java | 154 -- .../models/AgentPoolSecurityProfile.java | 58 +- .../models/AgentPoolSshAccess.java | 5 - ...lUpgradeProfilePropertiesUpgradesItem.java | 29 - .../models/AgentPoolUpgradeSettings.java | 88 +- .../models/AutoScaleProfile.java | 152 -- ...terServiceLoadBalancerHealthProbeMode.java | 52 - .../containerservice/models/Component.java | 156 -- .../models/ComponentsByRelease.java | 126 -- .../ContainerServiceNetworkProfile.java | 150 +- ...rServiceNetworkProfileKubeProxyConfig.java | 166 -- ...tworkProfileKubeProxyConfigIpvsConfig.java | 193 -- .../containerservice/models/DriftAction.java | 52 - .../containerservice/models/DriverType.java | 53 - .../containerservice/models/GpuProfile.java | 38 +- .../GuardrailsAvailableVersionsList.java | 117 -- ...GuardrailsAvailableVersionsProperties.java | 101 - .../models/GuardrailsSupport.java | 51 - .../models/IdentityBindingListResult.java | 136 -- ...IdentityBindingManagedIdentityProfile.java | 152 -- .../IdentityBindingOidcIssuerProfile.java | 82 - .../models/IdentityBindingProperties.java | 142 -- .../IdentityBindingProvisioningState.java | 71 - .../models/InfrastructureEncryption.java | 52 - .../containerservice/models/IpFamily.java | 2 +- .../models/IpvsScheduler.java | 51 - .../models/IstioComponents.java | 30 - ...wtAuthenticatorClaimMappingExpression.java | 104 - .../models/JwtAuthenticatorClaimMappings.java | 213 -- ...henticatorExtraClaimMappingExpression.java | 137 -- .../models/JwtAuthenticatorIssuer.java | 142 -- .../models/JwtAuthenticatorListResult.java | 124 -- .../models/JwtAuthenticatorProperties.java | 238 --- .../JwtAuthenticatorProvisioningState.java | 71 - .../JwtAuthenticatorValidationRule.java | 131 -- .../models/KubeletConfig.java | 32 - ...rnetesResourceObjectEncryptionProfile.java | 104 - .../models/LabelSelector.java | 138 -- .../models/LabelSelectorRequirement.java | 154 -- .../models/LoadBalancerListResult.java | 115 -- .../models/MachineHardwareProfile.java | 162 -- .../models/MachineKubernetesProfile.java | 390 ---- .../models/MachineListResult.java | 32 +- .../models/MachineNetworkProperties.java | 183 +- .../models/MachineOSProfile.java | 285 --- .../models/MachineOSProfileLinuxProfile.java | 132 -- .../models/MachineProperties.java | 305 +-- .../models/MachineStatus.java | 155 -- .../ManagedClusterAgentPoolProfile.java | 151 +- .../ManagedClusterApiServerAccessProfile.java | 21 +- .../ManagedClusterAutoUpgradeProfile.java | 11 +- .../ManagedClusterAzureMonitorProfile.java | 89 +- ...usterAzureMonitorProfileAppMonitoring.java | 186 -- ...ofileAppMonitoringAutoInstrumentation.java | 100 - ...ProfileAppMonitoringOpenTelemetryLogs.java | 131 -- ...fileAppMonitoringOpenTelemetryMetrics.java | 131 -- ...rAzureMonitorProfileContainerInsights.java | 229 --- ...erAzureMonitorProfileKubeStateMetrics.java | 32 +- ...agedClusterAzureMonitorProfileMetrics.java | 27 +- .../ManagedClusterHostedSystemProfile.java | 94 - .../models/ManagedClusterHttpProxyConfig.java | 50 - ...gedClusterIngressDefaultDomainProfile.java | 114 -- .../models/ManagedClusterIngressProfile.java | 78 +- ...IngressProfileApplicationLoadBalancer.java | 119 -- ...terIngressProfileGatewayConfiguration.java | 99 - ...gedClusterIngressProfileWebAppRouting.java | 79 +- .../ManagedClusterLoadBalancerProfile.java | 35 - ...anagedClusterNodeResourceGroupProfile.java | 9 +- .../ManagedClusterPoolUpgradeProfile.java | 34 - ...ClusterPoolUpgradeProfileUpgradesItem.java | 29 - ...gedClusterPropertiesAutoScalerProfile.java | 15 +- .../ManagedClusterPropertiesForSnapshot.java | 175 -- .../models/ManagedClusterSecurityProfile.java | 115 -- ...ManagedClusterSecurityProfileDefender.java | 39 - ...SecurityProfileDefenderSecurityGating.java | 184 -- ...eDefenderSecurityGatingIdentitiesItem.java | 135 -- ...dClusterSecurityProfileImageIntegrity.java | 96 - ...ClusterSecurityProfileNodeRestriction.java | 96 - .../ManagedClusterSnapshotListResult.java | 117 -- ...gedClusterStorageProfileDiskCsiDriver.java | 28 - ...nagedClusterWorkloadAutoScalerProfile.java | 8 +- ...utoScalerProfileVerticalPodAutoscaler.java | 39 +- .../models/ManagedGatewayType.java | 52 - .../models/MeshMembershipProperties.java | 125 -- .../MeshMembershipProvisioningState.java | 71 - .../models/MeshMembershipsListResult.java | 116 -- .../containerservice/models/Mode.java | 56 - .../models/NetworkProfileForSnapshot.java | 209 -- .../models/NodeCustomizationProfile.java | 96 - .../models/NodeImageVersionsListResult.java | 116 -- .../models/NodeOSUpgradeChannel.java | 11 +- .../containerservice/models/OSSku.java | 24 +- .../models/OperationStatusResultList.java | 104 - .../containerservice/models/Operator.java | 61 - .../models/PodLinkLocalAccess.java | 52 - .../models/ProxyRedirectionMechanism.java | 51 - .../models/PublicNetworkAccess.java | 5 - .../RebalanceLoadBalancersRequestBody.java | 97 - .../models/RelativeMonthlySchedule.java | 8 +- .../models/RestrictionLevel.java | 2 +- .../SafeguardsAvailableVersionsList.java | 117 -- ...SafeguardsAvailableVersionsProperties.java | 101 - .../models/SafeguardsSupport.java | 51 - .../containerservice/models/ScaleProfile.java | 33 - .../models/SchedulerConfigMode.java | 51 - .../models/SchedulerInstanceProfile.java | 95 - .../models/SchedulerProfile.java | 98 - ...dulerProfileSchedulerInstanceProfiles.java | 99 - .../models/SeccompDefault.java | 52 - .../containerservice/models/SnapshotType.java | 5 - .../models/TransitEncryptionType.java | 52 - .../containerservice/models/Type.java | 2 +- .../models/UpgradeStrategy.java | 51 - .../containerservice/models/VmState.java | 51 - .../models/WorkloadRuntime.java | 5 - .../proxy-config.json | 2 +- .../KubernetesClustersTests.java | 10 +- sdk/resourcemanager/api-specs.json | 2 +- .../azure-resourcemanager/CHANGELOG.md | 8 +- .../azure-resourcemanager/pom.xml | 2 +- ...AgentPoolsAbortLatestOperationSamples.java | 2 +- .../AgentPoolsCreateOrUpdateSamples.java | 42 +- .../AgentPoolsDeleteMachinesSamples.java | 2 +- .../generated/AgentPoolsDeleteSamples.java | 2 +- ...sGetAvailableAgentPoolVersionsSamples.java | 2 +- .../generated/AgentPoolsGetSamples.java | 2 +- .../AgentPoolsGetUpgradeProfileSamples.java | 2 +- .../generated/AgentPoolsListSamples.java | 2 +- ...ntPoolsUpgradeNodeImageVersionSamples.java | 2 +- .../generated/MachinesGetSamples.java | 2 +- .../generated/MachinesListSamples.java | 2 +- ...ceConfigurationsCreateOrUpdateSamples.java | 2 +- ...aintenanceConfigurationsDeleteSamples.java | 2 +- .../MaintenanceConfigurationsGetSamples.java | 2 +- ...igurationsListByManagedClusterSamples.java | 2 +- ...edClustersAbortLatestOperationSamples.java | 2 +- .../ManagedClustersCreateOrUpdateSamples.java | 56 +- .../ManagedClustersDeleteSamples.java | 6 +- ...anagedClustersGetAccessProfileSamples.java | 2 +- ...agedClustersGetByResourceGroupSamples.java | 2 +- ...anagedClustersGetCommandResultSamples.java | 4 +- ...ClustersGetMeshRevisionProfileSamples.java | 2 +- ...dClustersGetMeshUpgradeProfileSamples.java | 2 +- ...nagedClustersGetUpgradeProfileSamples.java | 2 +- ...gedClustersListByResourceGroupSamples.java | 2 +- ...ersListClusterAdminCredentialsSamples.java | 2 +- ...usterMonitoringUserCredentialsSamples.java | 2 +- ...tersListClusterUserCredentialsSamples.java | 2 +- ...ClustersListKubernetesVersionsSamples.java | 2 +- ...ustersListMeshRevisionProfilesSamples.java | 2 +- ...lustersListMeshUpgradeProfilesSamples.java | 2 +- ...ndNetworkDependenciesEndpointsSamples.java | 2 +- .../generated/ManagedClustersListSamples.java | 2 +- ...ManagedClustersResetAadProfileSamples.java | 2 +- ...rsResetServicePrincipalProfileSamples.java | 2 +- ...stersRotateClusterCertificatesSamples.java | 2 +- ...otateServiceAccountSigningKeysSamples.java | 2 +- .../ManagedClustersRunCommandSamples.java | 2 +- .../ManagedClustersStartSamples.java | 2 +- .../generated/ManagedClustersStopSamples.java | 2 +- .../ManagedClustersUpdateTagsSamples.java | 2 +- ...anagedNamespacesCreateOrUpdateSamples.java | 2 +- .../ManagedNamespacesDeleteSamples.java | 2 +- .../ManagedNamespacesGetSamples.java | 2 +- ...NamespacesListByManagedClusterSamples.java | 2 +- ...anagedNamespacesListCredentialSamples.java | 2 +- .../ManagedNamespacesUpdateSamples.java | 2 +- .../generated/OperationsListSamples.java | 2 +- ...ivateEndpointConnectionsDeleteSamples.java | 2 +- .../PrivateEndpointConnectionsGetSamples.java | 2 +- ...PrivateEndpointConnectionsListSamples.java | 2 +- ...ivateEndpointConnectionsUpdateSamples.java | 2 +- .../PrivateLinkResourcesListSamples.java | 2 +- ...esolvePrivateLinkServiceIdPostSamples.java | 2 +- .../SnapshotsCreateOrUpdateSamples.java | 2 +- .../generated/SnapshotsDeleteSamples.java | 2 +- .../SnapshotsGetByResourceGroupSamples.java | 2 +- .../SnapshotsListByResourceGroupSamples.java | 2 +- .../generated/SnapshotsListSamples.java | 2 +- .../generated/SnapshotsUpdateTagsSamples.java | 2 +- ...cessRoleBindingsCreateOrUpdateSamples.java | 2 +- ...rustedAccessRoleBindingsDeleteSamples.java | 2 +- .../TrustedAccessRoleBindingsGetSamples.java | 2 +- .../TrustedAccessRoleBindingsListSamples.java | 2 +- .../TrustedAccessRolesListSamples.java | 2 +- 252 files changed, 1270 insertions(+), 25259 deletions(-) delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceOperationsClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/IdentityBindingsClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/JwtAuthenticatorsClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/LoadBalancersClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClusterSnapshotsClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MeshMembershipsClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationStatusResultsClient.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/GuardrailsAvailableVersionInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/JwtAuthenticatorInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshMembershipInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/NodeImageVersionInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationStatusResultInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SafeguardsAvailableVersionInner.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceOperationsClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/IdentityBindingsClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/JwtAuthenticatorsClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/LoadBalancersClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClusterSnapshotsClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MeshMembershipsClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationStatusResultsClientImpl.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AccelerationMode.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AddonAutoscaling.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingPerformance.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurityTransitEncryption.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolArtifactStreamingProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolBlueGreenUpgradeSettings.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolRecentlyUsedVersion.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AutoScaleProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterServiceLoadBalancerHealthProbeMode.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Component.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ComponentsByRelease.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfig.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriftAction.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriverType.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsList.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsSupport.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingListResult.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingManagedIdentityProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingOidcIssuerProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProvisioningState.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/InfrastructureEncryption.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpvsScheduler.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorClaimMappingExpression.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorClaimMappings.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorExtraClaimMappingExpression.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorIssuer.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorListResult.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorProvisioningState.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorValidationRule.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesResourceObjectEncryptionProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelector.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelectorRequirement.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerListResult.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineHardwareProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineKubernetesProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfileLinuxProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineStatus.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoring.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileContainerInsights.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHostedSystemProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressDefaultDomainProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileApplicationLoadBalancer.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileGatewayConfiguration.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesForSnapshot.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGating.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageIntegrity.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileNodeRestriction.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSnapshotListResult.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedGatewayType.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProvisioningState.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipsListResult.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Mode.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfileForSnapshot.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeCustomizationProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeImageVersionsListResult.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationStatusResultList.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Operator.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodLinkLocalAccess.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ProxyRedirectionMechanism.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RebalanceLoadBalancersRequestBody.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsList.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsProperties.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsSupport.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerConfigMode.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerInstanceProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfile.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfileSchedulerInstanceProfiles.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SeccompDefault.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeStrategy.java delete mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VmState.java diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index f34850dd7462..48697a856b51 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -278,7 +278,7 @@ com.azure.resourcemanager:azure-resourcemanager-cdn;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-compute;2.55.1;2.56.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.53.6;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.54.1;2.55.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-containerservice;2.56.1;2.57.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-containerservice;2.56.1;2.57.0 com.azure.resourcemanager:azure-resourcemanager-cosmos;2.54.0;2.55.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-dns;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.53.5;2.54.0-beta.1 @@ -551,6 +551,7 @@ unreleased_com.azure:azure-core-test;1.27.0-beta.14 unreleased_com.azure.v2:azure-identity;2.0.0-beta.1 unreleased_com.azure.v2:azure-data-appconfiguration;2.0.0-beta.1 unreleased_io.clientcore:http-netty4;1.0.0-beta.1 +unreleased_com.azure.resourcemanager:azure-resourcemanager-containerservice;2.57.0 # Released Beta dependencies: Copy the entry from above, prepend "beta_", remove the current # version and set the version to the released beta. Released beta dependencies are only valid diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md index f6b1e4646e4f..fc89e616f312 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md @@ -1,14 +1,12 @@ # Release History -## 2.57.0-beta.2 (Unreleased) +## 2.57.0 (2025-12-15) -### Features Added - -### Breaking Changes +### Other Changes -### Bugs Fixed +#### Dependency Updates -### Other Changes +- Updated `api-version` to `2025-10-01`. ## 2.57.0-beta.1 (2025-12-01) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/README.md b/sdk/containerservice/azure-resourcemanager-containerservice/README.md index cfe8c52c162f..0c44651d3ca8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/README.md +++ b/sdk/containerservice/azure-resourcemanager-containerservice/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerservice</artifactId> - <version>2.56.0</version> + <version>2.57.0</version> </dependency> ``` [//]: # ({x-version-update-end}) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/assets.json b/sdk/containerservice/azure-resourcemanager-containerservice/assets.json index 8457e7fc0469..9cdfac192547 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/assets.json +++ b/sdk/containerservice/azure-resourcemanager-containerservice/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/containerservice/azure-resourcemanager-containerservice", - "Tag": "java/containerservice/azure-resourcemanager-containerservice_c3a165c41a" + "Tag": "java/containerservice/azure-resourcemanager-containerservice_a6036916c8" } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml b/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml index 9bc81c06b4ab..d9f5bad88bb3 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml +++ b/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml @@ -10,7 +10,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerservice</artifactId> - <version>2.57.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerservice;current} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerservice;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for Container Service Management</name> diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java index d228cd8c62b4..f1ec76e42adb 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java @@ -30,7 +30,7 @@ public interface AgentPoolsClient { * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, an error is returned. + * take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -49,7 +49,7 @@ Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String re * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, an error is returned. + * take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -68,7 +68,7 @@ PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String resourc * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, an error is returned. + * take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -87,7 +87,7 @@ SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGrou * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, an error is returned. + * take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -107,7 +107,7 @@ SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGrou * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, an error is returned. + * take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -125,7 +125,7 @@ SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGrou * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, an error is returned. + * take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -142,7 +142,7 @@ SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGrou * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, an error is returned. + * take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -620,122 +620,6 @@ Response<AgentPoolUpgradeProfileInner> getUpgradeProfileWithResponse(String reso @ServiceMethod(returns = ReturnType.SINGLE) AgentPoolUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName, String agentPoolName); - /** - * Completes the upgrade of an agent pool. - * - * Completes the upgrade operation for the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<Flux<ByteBuffer>>> completeUpgradeWithResponseAsync(String resourceGroupName, String resourceName, - String agentPoolName); - - /** - * Completes the upgrade of an agent pool. - * - * Completes the upgrade operation for the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<Void>, Void> beginCompleteUpgradeAsync(String resourceGroupName, String resourceName, - String agentPoolName); - - /** - * Completes the upgrade of an agent pool. - * - * Completes the upgrade operation for the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginCompleteUpgrade(String resourceGroupName, String resourceName, - String agentPoolName); - - /** - * Completes the upgrade of an agent pool. - * - * Completes the upgrade operation for the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginCompleteUpgrade(String resourceGroupName, String resourceName, - String agentPoolName, Context context); - - /** - * Completes the upgrade of an agent pool. - * - * Completes the upgrade operation for the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Void> completeUpgradeAsync(String resourceGroupName, String resourceName, String agentPoolName); - - /** - * Completes the upgrade of an agent pool. - * - * Completes the upgrade operation for the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void completeUpgrade(String resourceGroupName, String resourceName, String agentPoolName); - - /** - * Completes the upgrade of an agent pool. - * - * Completes the upgrade operation for the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void completeUpgrade(String resourceGroupName, String resourceName, String agentPoolName, Context context); - /** * Deletes specific machines in an agent pool. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java index 3fd176dbe278..167e25fcae77 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java @@ -68,13 +68,6 @@ public interface ContainerServiceManagementClient { */ ManagedClustersClient getManagedClusters(); - /** - * Gets the ContainerServiceOperationsClient object to access its operations. - * - * @return the ContainerServiceOperationsClient object. - */ - ContainerServiceOperationsClient getContainerServiceOperations(); - /** * Gets the MaintenanceConfigurationsClient object to access its operations. * @@ -96,13 +89,6 @@ public interface ContainerServiceManagementClient { */ AgentPoolsClient getAgentPools(); - /** - * Gets the MachinesClient object to access its operations. - * - * @return the MachinesClient object. - */ - MachinesClient getMachines(); - /** * Gets the PrivateEndpointConnectionsClient object to access its operations. * @@ -124,13 +110,6 @@ public interface ContainerServiceManagementClient { */ ResolvePrivateLinkServiceIdsClient getResolvePrivateLinkServiceIds(); - /** - * Gets the OperationStatusResultsClient object to access its operations. - * - * @return the OperationStatusResultsClient object. - */ - OperationStatusResultsClient getOperationStatusResults(); - /** * Gets the SnapshotsClient object to access its operations. * @@ -138,20 +117,6 @@ public interface ContainerServiceManagementClient { */ SnapshotsClient getSnapshots(); - /** - * Gets the ManagedClusterSnapshotsClient object to access its operations. - * - * @return the ManagedClusterSnapshotsClient object. - */ - ManagedClusterSnapshotsClient getManagedClusterSnapshots(); - - /** - * Gets the TrustedAccessRolesClient object to access its operations. - * - * @return the TrustedAccessRolesClient object. - */ - TrustedAccessRolesClient getTrustedAccessRoles(); - /** * Gets the TrustedAccessRoleBindingsClient object to access its operations. * @@ -160,30 +125,16 @@ public interface ContainerServiceManagementClient { TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings(); /** - * Gets the LoadBalancersClient object to access its operations. - * - * @return the LoadBalancersClient object. - */ - LoadBalancersClient getLoadBalancers(); - - /** - * Gets the IdentityBindingsClient object to access its operations. - * - * @return the IdentityBindingsClient object. - */ - IdentityBindingsClient getIdentityBindings(); - - /** - * Gets the JwtAuthenticatorsClient object to access its operations. + * Gets the TrustedAccessRolesClient object to access its operations. * - * @return the JwtAuthenticatorsClient object. + * @return the TrustedAccessRolesClient object. */ - JwtAuthenticatorsClient getJwtAuthenticators(); + TrustedAccessRolesClient getTrustedAccessRoles(); /** - * Gets the MeshMembershipsClient object to access its operations. + * Gets the MachinesClient object to access its operations. * - * @return the MeshMembershipsClient object. + * @return the MachinesClient object. */ - MeshMembershipsClient getMeshMemberships(); + MachinesClient getMachines(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceOperationsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceOperationsClient.java deleted file mode 100644 index 07ef553d11c3..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceOperationsClient.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerservice.fluent.models.NodeImageVersionInner; - -/** - * An instance of this class provides access to all the operations defined in ContainerServiceOperationsClient. - */ -public interface ContainerServiceOperationsClient { - /** - * Gets a list of supported NodeImage versions in the specified subscription. - * - * Only returns the latest version of each node image. For example there may be an - * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this - * list. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array NodeImageVersions as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux<NodeImageVersionInner> listNodeImageVersionsAsync(String location); - - /** - * Gets a list of supported NodeImage versions in the specified subscription. - * - * Only returns the latest version of each node image. For example there may be an - * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this - * list. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array NodeImageVersions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<NodeImageVersionInner> listNodeImageVersions(String location); - - /** - * Gets a list of supported NodeImage versions in the specified subscription. - * - * Only returns the latest version of each node image. For example there may be an - * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this - * list. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array NodeImageVersions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<NodeImageVersionInner> listNodeImageVersions(String location, Context context); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/IdentityBindingsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/IdentityBindingsClient.java deleted file mode 100644 index 4fb01bb3c58a..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/IdentityBindingsClient.java +++ /dev/null @@ -1,343 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.models.IdentityBindingInner; -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 IdentityBindingsClient. - */ -public interface IdentityBindingsClient { - /** - * Gets a list of identity bindings in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of identity bindings in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux<IdentityBindingInner> listByManagedClusterAsync(String resourceGroupName, String resourceName); - - /** - * Gets a list of identity bindings in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of identity bindings in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<IdentityBindingInner> listByManagedCluster(String resourceGroupName, String resourceName); - - /** - * Gets a list of identity bindings in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of identity bindings in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<IdentityBindingInner> listByManagedCluster(String resourceGroupName, String resourceName, - Context context); - - /** - * Gets the specified Identity Binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Identity Binding along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<IdentityBindingInner>> getWithResponseAsync(String resourceGroupName, String resourceName, - String identityBindingName); - - /** - * Gets the specified Identity Binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Identity Binding on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<IdentityBindingInner> getAsync(String resourceGroupName, String resourceName, String identityBindingName); - - /** - * Gets the specified Identity Binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Identity Binding along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response<IdentityBindingInner> getWithResponse(String resourceGroupName, String resourceName, - String identityBindingName, Context context); - - /** - * Gets the specified Identity Binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Identity Binding. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IdentityBindingInner get(String resourceGroupName, String resourceName, String identityBindingName); - - /** - * Creates or updates an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param parameters The identity binding to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IdentityBinding resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, - String identityBindingName, IdentityBindingInner parameters); - - /** - * Creates or updates an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param parameters The identity binding to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IdentityBinding resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<IdentityBindingInner>, IdentityBindingInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, String identityBindingName, IdentityBindingInner parameters); - - /** - * Creates or updates an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param parameters The identity binding to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IdentityBinding resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<IdentityBindingInner>, IdentityBindingInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, String identityBindingName, IdentityBindingInner parameters); - - /** - * Creates or updates an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param parameters The identity binding to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IdentityBinding resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<IdentityBindingInner>, IdentityBindingInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, String identityBindingName, IdentityBindingInner parameters, Context context); - - /** - * Creates or updates an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param parameters The identity binding to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IdentityBinding resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<IdentityBindingInner> createOrUpdateAsync(String resourceGroupName, String resourceName, - String identityBindingName, IdentityBindingInner parameters); - - /** - * Creates or updates an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param parameters The identity binding to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IdentityBinding resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IdentityBindingInner createOrUpdate(String resourceGroupName, String resourceName, String identityBindingName, - IdentityBindingInner parameters); - - /** - * Creates or updates an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param parameters The identity binding to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IdentityBinding resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IdentityBindingInner createOrUpdate(String resourceGroupName, String resourceName, String identityBindingName, - IdentityBindingInner parameters, Context context); - - /** - * Deletes an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String identityBindingName); - - /** - * Deletes an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String identityBindingName); - - /** - * Deletes an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, - String identityBindingName); - - /** - * Deletes an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, - String identityBindingName, Context context); - - /** - * Deletes an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String identityBindingName); - - /** - * Deletes an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String identityBindingName); - - /** - * Deletes an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String identityBindingName, Context context); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/JwtAuthenticatorsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/JwtAuthenticatorsClient.java deleted file mode 100644 index 96e9f9eaad93..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/JwtAuthenticatorsClient.java +++ /dev/null @@ -1,352 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.models.JwtAuthenticatorInner; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in JwtAuthenticatorsClient. - */ -public interface JwtAuthenticatorsClient { - /** - * Gets a list of JWT authenticators in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of JWT authenticators in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux<JwtAuthenticatorInner> listByManagedClusterAsync(String resourceGroupName, String resourceName); - - /** - * Gets a list of JWT authenticators in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of JWT authenticators in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<JwtAuthenticatorInner> listByManagedCluster(String resourceGroupName, String resourceName); - - /** - * Gets a list of JWT authenticators in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of JWT authenticators in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<JwtAuthenticatorInner> listByManagedCluster(String resourceGroupName, String resourceName, - Context context); - - /** - * Gets the specified JWT authenticator of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified JWT authenticator of a managed cluster along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<JwtAuthenticatorInner>> getWithResponseAsync(String resourceGroupName, String resourceName, - String jwtAuthenticatorName); - - /** - * Gets the specified JWT authenticator of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified JWT authenticator of a managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<JwtAuthenticatorInner> getAsync(String resourceGroupName, String resourceName, String jwtAuthenticatorName); - - /** - * Gets the specified JWT authenticator of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified JWT authenticator of a managed cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response<JwtAuthenticatorInner> getWithResponse(String resourceGroupName, String resourceName, - String jwtAuthenticatorName, Context context); - - /** - * Gets the specified JWT authenticator of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified JWT authenticator of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JwtAuthenticatorInner get(String resourceGroupName, String resourceName, String jwtAuthenticatorName); - - /** - * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the - * settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param parameters The JWT authenticator to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration for JWT authenticator in the managed cluster along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, - String jwtAuthenticatorName, JwtAuthenticatorInner parameters); - - /** - * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the - * settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param parameters The JWT authenticator to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of configuration for JWT authenticator in the managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<JwtAuthenticatorInner>, JwtAuthenticatorInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters); - - /** - * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the - * settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param parameters The JWT authenticator to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of configuration for JWT authenticator in the managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<JwtAuthenticatorInner>, JwtAuthenticatorInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters); - - /** - * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the - * settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param parameters The JWT authenticator to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of configuration for JWT authenticator in the managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<JwtAuthenticatorInner>, JwtAuthenticatorInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters, Context context); - - /** - * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the - * settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param parameters The JWT authenticator to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration for JWT authenticator in the managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<JwtAuthenticatorInner> createOrUpdateAsync(String resourceGroupName, String resourceName, - String jwtAuthenticatorName, JwtAuthenticatorInner parameters); - - /** - * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the - * settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param parameters The JWT authenticator to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration for JWT authenticator in the managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JwtAuthenticatorInner createOrUpdate(String resourceGroupName, String resourceName, String jwtAuthenticatorName, - JwtAuthenticatorInner parameters); - - /** - * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the - * settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param parameters The JWT authenticator to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration for JWT authenticator in the managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JwtAuthenticatorInner createOrUpdate(String resourceGroupName, String resourceName, String jwtAuthenticatorName, - JwtAuthenticatorInner parameters, Context context); - - /** - * Deletes a JWT authenticator and updates the managed cluster to apply the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String jwtAuthenticatorName); - - /** - * Deletes a JWT authenticator and updates the managed cluster to apply the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String jwtAuthenticatorName); - - /** - * Deletes a JWT authenticator and updates the managed cluster to apply the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, - String jwtAuthenticatorName); - - /** - * Deletes a JWT authenticator and updates the managed cluster to apply the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, - String jwtAuthenticatorName, Context context); - - /** - * Deletes a JWT authenticator and updates the managed cluster to apply the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String jwtAuthenticatorName); - - /** - * Deletes a JWT authenticator and updates the managed cluster to apply the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String jwtAuthenticatorName); - - /** - * Deletes a JWT authenticator and updates the managed cluster to apply the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String jwtAuthenticatorName, Context context); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/LoadBalancersClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/LoadBalancersClient.java deleted file mode 100644 index 305de7605086..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/LoadBalancersClient.java +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.models.LoadBalancerInner; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in LoadBalancersClient. - */ -public interface LoadBalancersClient { - /** - * Gets a list of load balancers in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of load balancers in the specified managed cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux<LoadBalancerInner> listByManagedClusterAsync(String resourceGroupName, String resourceName); - - /** - * Gets a list of load balancers in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of load balancers in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<LoadBalancerInner> listByManagedCluster(String resourceGroupName, String resourceName); - - /** - * Gets a list of load balancers in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of load balancers in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<LoadBalancerInner> listByManagedCluster(String resourceGroupName, String resourceName, - Context context); - - /** - * Gets the specified load balancer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified load balancer along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<LoadBalancerInner>> getWithResponseAsync(String resourceGroupName, String resourceName, - String loadBalancerName); - - /** - * Gets the specified load balancer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified load balancer on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<LoadBalancerInner> getAsync(String resourceGroupName, String resourceName, String loadBalancerName); - - /** - * Gets the specified load balancer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified load balancer along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response<LoadBalancerInner> getWithResponse(String resourceGroupName, String resourceName, String loadBalancerName, - Context context); - - /** - * Gets the specified load balancer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified load balancer. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LoadBalancerInner get(String resourceGroupName, String resourceName, String loadBalancerName); - - /** - * Creates or updates a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param parameters The load balancer to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the configurations regarding multiple standard load balancers along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<LoadBalancerInner>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, - String loadBalancerName, LoadBalancerInner parameters); - - /** - * Creates or updates a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param parameters The load balancer to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the configurations regarding multiple standard load balancers on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<LoadBalancerInner> createOrUpdateAsync(String resourceGroupName, String resourceName, String loadBalancerName, - LoadBalancerInner parameters); - - /** - * Creates or updates a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param parameters The load balancer to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the configurations regarding multiple standard load balancers along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response<LoadBalancerInner> createOrUpdateWithResponse(String resourceGroupName, String resourceName, - String loadBalancerName, LoadBalancerInner parameters, Context context); - - /** - * Creates or updates a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param parameters The load balancer to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the configurations regarding multiple standard load balancers. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LoadBalancerInner createOrUpdate(String resourceGroupName, String resourceName, String loadBalancerName, - LoadBalancerInner parameters); - - /** - * Deletes a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String loadBalancerName); - - /** - * Deletes a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String loadBalancerName); - - /** - * Deletes a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, - String loadBalancerName); - - /** - * Deletes a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, - String loadBalancerName, Context context); - - /** - * Deletes a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String loadBalancerName); - - /** - * Deletes a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String loadBalancerName); - - /** - * Deletes a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String loadBalancerName, Context context); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java index 8f41b71734a9..57a92d2b1623 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java @@ -9,13 +9,8 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservice.fluent.models.MachineInner; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -72,7 +67,7 @@ PagedIterable<MachineInner> list(String resourceGroupName, String resourceName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. + * @param machineName host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -89,7 +84,7 @@ Mono<Response<MachineInner>> getWithResponseAsync(String resourceGroupName, Stri * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. + * @param machineName host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -105,7 +100,7 @@ Mono<MachineInner> getAsync(String resourceGroupName, String resourceName, Strin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. + * @param machineName host name of the machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -122,7 +117,7 @@ Response<MachineInner> getWithResponse(String resourceGroupName, String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. + * @param machineName host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -130,178 +125,4 @@ Response<MachineInner> getWithResponse(String resourceGroupName, String resource */ @ServiceMethod(returns = ReturnType.SINGLE) MachineInner get(String resourceGroupName, String resourceName, String agentPoolName, String machineName); - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a machine provides detailed information about its configuration and status along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, - String agentPoolName, String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch); - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a machine provides detailed information about its configuration and - * status. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<MachineInner>, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, - String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, - String ifNoneMatch); - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a machine provides detailed information about its configuration and - * status. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<MachineInner>, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, - String resourceName, String agentPoolName, String machineName, MachineInner parameters); - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a machine provides detailed information about its configuration and - * status. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<MachineInner>, MachineInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, String agentPoolName, String machineName, MachineInner parameters); - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a machine provides detailed information about its configuration and - * status. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<MachineInner>, MachineInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, - String ifNoneMatch, Context context); - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a machine provides detailed information about its configuration and status on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<MachineInner> createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, - String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch); - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a machine provides detailed information about its configuration and status on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<MachineInner> createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, - String machineName, MachineInner parameters); - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a machine provides detailed information about its configuration and status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MachineInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, String machineName, - MachineInner parameters); - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a machine provides detailed information about its configuration and status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MachineInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, String machineName, - MachineInner parameters, String ifMatch, String ifNoneMatch, Context context); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java index 1327574fbe2b..a044c35f527c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java @@ -66,7 +66,8 @@ PagedIterable<MaintenanceConfigurationInner> listByManagedCluster(String resourc * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -82,7 +83,8 @@ Mono<Response<MaintenanceConfigurationInner>> getWithResponseAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -96,7 +98,8 @@ Mono<Response<MaintenanceConfigurationInner>> getWithResponseAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -112,7 +115,8 @@ Response<MaintenanceConfigurationInner> getWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -126,7 +130,8 @@ Response<MaintenanceConfigurationInner> getWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @param parameters The maintenance configuration to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -143,7 +148,8 @@ Mono<Response<MaintenanceConfigurationInner>> createOrUpdateWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @param parameters The maintenance configuration to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -160,7 +166,8 @@ Mono<MaintenanceConfigurationInner> createOrUpdateAsync(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @param parameters The maintenance configuration to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -178,7 +185,8 @@ Response<MaintenanceConfigurationInner> createOrUpdateWithResponse(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @param parameters The maintenance configuration to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -194,7 +202,8 @@ MaintenanceConfigurationInner createOrUpdate(String resourceGroupName, String re * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -208,7 +217,8 @@ MaintenanceConfigurationInner createOrUpdate(String resourceGroupName, String re * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -222,7 +232,8 @@ MaintenanceConfigurationInner createOrUpdate(String resourceGroupName, String re * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -238,7 +249,8 @@ Response<Void> deleteWithResponse(String resourceGroupName, String resourceName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClusterSnapshotsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClusterSnapshotsClient.java deleted file mode 100644 index f2f1123351ba..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClusterSnapshotsClient.java +++ /dev/null @@ -1,327 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterSnapshotInner; -import com.azure.resourcemanager.containerservice.models.TagsObject; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ManagedClusterSnapshotsClient. - */ -public interface ManagedClusterSnapshotsClient extends InnerSupportsGet<ManagedClusterSnapshotInner>, - InnerSupportsListing<ManagedClusterSnapshotInner>, InnerSupportsDelete<Void> { - /** - * Gets a list of managed cluster snapshots in the specified subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed cluster snapshots in the specified subscription as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux<ManagedClusterSnapshotInner> listAsync(); - - /** - * Gets a list of managed cluster snapshots in the specified subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed cluster snapshots in the specified subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<ManagedClusterSnapshotInner> list(); - - /** - * Gets a list of managed cluster snapshots in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed cluster snapshots in the specified subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<ManagedClusterSnapshotInner> list(Context context); - - /** - * Lists managed cluster snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Managed Cluster Snapshots operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux<ManagedClusterSnapshotInner> listByResourceGroupAsync(String resourceGroupName); - - /** - * Lists managed cluster snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Managed Cluster Snapshots operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<ManagedClusterSnapshotInner> listByResourceGroup(String resourceGroupName); - - /** - * Lists managed cluster snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Managed Cluster Snapshots operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<ManagedClusterSnapshotInner> listByResourceGroup(String resourceGroupName, Context context); - - /** - * Gets a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<ManagedClusterSnapshotInner>> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName); - - /** - * Gets a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<ManagedClusterSnapshotInner> getByResourceGroupAsync(String resourceGroupName, String resourceName); - - /** - * Gets a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response<ManagedClusterSnapshotInner> getByResourceGroupWithResponse(String resourceGroupName, String resourceName, - Context context); - - /** - * Gets a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedClusterSnapshotInner getByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Creates or updates a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster snapshot to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<ManagedClusterSnapshotInner>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, ManagedClusterSnapshotInner parameters); - - /** - * Creates or updates a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster snapshot to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<ManagedClusterSnapshotInner> createOrUpdateAsync(String resourceGroupName, String resourceName, - ManagedClusterSnapshotInner parameters); - - /** - * Creates or updates a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster snapshot to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response<ManagedClusterSnapshotInner> createOrUpdateWithResponse(String resourceGroupName, String resourceName, - ManagedClusterSnapshotInner parameters, Context context); - - /** - * Creates or updates a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster snapshot to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedClusterSnapshotInner createOrUpdate(String resourceGroupName, String resourceName, - ManagedClusterSnapshotInner parameters); - - /** - * Updates tags on a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<ManagedClusterSnapshotInner>> updateTagsWithResponseAsync(String resourceGroupName, - String resourceName, TagsObject parameters); - - /** - * Updates tags on a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<ManagedClusterSnapshotInner> updateTagsAsync(String resourceGroupName, String resourceName, - TagsObject parameters); - - /** - * Updates tags on a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response<ManagedClusterSnapshotInner> updateTagsWithResponse(String resourceGroupName, String resourceName, - TagsObject parameters, Context context); - - /** - * Updates tags on a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedClusterSnapshotInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters); - - /** - * Deletes a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String resourceName); - - /** - * Deletes a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Void> deleteAsync(String resourceGroupName, String resourceName); - - /** - * Deletes a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response<Void> deleteWithResponse(String resourceGroupName, String resourceName, Context context); - - /** - * Deletes a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java index e97cea4abd7d..1e03332b8dff 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java @@ -14,7 +14,6 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner; -import com.azure.resourcemanager.containerservice.fluent.models.GuardrailsAvailableVersionInner; import com.azure.resourcemanager.containerservice.fluent.models.KubernetesVersionListResultInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterAccessProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; @@ -23,12 +22,10 @@ import com.azure.resourcemanager.containerservice.fluent.models.MeshUpgradeProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; import com.azure.resourcemanager.containerservice.fluent.models.RunCommandResultInner; -import com.azure.resourcemanager.containerservice.fluent.models.SafeguardsAvailableVersionInner; import com.azure.resourcemanager.containerservice.models.Format; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; import com.azure.resourcemanager.containerservice.models.ManagedClustersGetCommandResultResponse; -import com.azure.resourcemanager.containerservice.models.RebalanceLoadBalancersRequestBody; import com.azure.resourcemanager.containerservice.models.RunCommandRequest; import com.azure.resourcemanager.containerservice.models.TagsObject; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; @@ -841,8 +838,6 @@ ManagedClusterInner updateTags(String resourceGroupName, String resourceName, Ta * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -850,7 +845,7 @@ ManagedClusterInner updateTags(String resourceGroupName, String resourceName, Ta */ @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String ifMatch, Boolean ignorePodDisruptionBudget); + String ifMatch); /** * Deletes a managed cluster. @@ -858,16 +853,13 @@ Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, String ifMatch, - Boolean ignorePodDisruptionBudget); + PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, String ifMatch); /** * Deletes a managed cluster. @@ -901,8 +893,6 @@ PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, St * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -911,7 +901,7 @@ PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, String ifMatch, - Boolean ignorePodDisruptionBudget, Context context); + Context context); /** * Deletes a managed cluster. @@ -919,16 +909,13 @@ SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String ifMatch, - Boolean ignorePodDisruptionBudget); + Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String ifMatch); /** * Deletes a managed cluster. @@ -961,16 +948,13 @@ Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String ifM * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String ifMatch, Boolean ignorePodDisruptionBudget, - Context context); + void delete(String resourceGroupName, String resourceName, String ifMatch, Context context); /** * Reset the Service Principal Profile of a managed cluster. @@ -1216,11 +1200,10 @@ void resetAadProfile(String resourceGroupName, String resourceName, ManagedClust Context context); /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, an error is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1230,15 +1213,14 @@ void resetAadProfile(String resourceGroupName, String resourceName, ManagedClust * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String resourceGroupName, + Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, String resourceName); /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, an error is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1248,14 +1230,14 @@ Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String re * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String resourceGroupName, String resourceName); + PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, + String resourceName); /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, an error is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1265,14 +1247,13 @@ Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String re * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName); + SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName); /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, an error is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1283,15 +1264,14 @@ Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String re * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, + SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName, Context context); /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, an error is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1301,14 +1281,13 @@ SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGrou * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Void> abortLatestOperationAsync(String resourceGroupName, String resourceName); + Mono<Void> rotateClusterCertificatesAsync(String resourceGroupName, String resourceName); /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, an error is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1317,14 +1296,13 @@ SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGrou * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void abortLatestOperation(String resourceGroupName, String resourceName); + void rotateClusterCertificates(String resourceGroupName, String resourceName); /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, an error is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1334,13 +1312,14 @@ SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGrou * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void abortLatestOperation(String resourceGroupName, String resourceName, Context context); + void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1350,14 +1329,15 @@ SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGrou * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, + Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String resourceGroupName, String resourceName); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1367,14 +1347,14 @@ Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsync(Stri * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, - String resourceName); + PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String resourceGroupName, String resourceName); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1384,13 +1364,14 @@ PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(String re * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName); + SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1401,14 +1382,15 @@ PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(String re * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourceGroupName, String resourceName, + SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, Context context); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1418,13 +1400,14 @@ SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourc * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Void> rotateClusterCertificatesAsync(String resourceGroupName, String resourceName); + Mono<Void> abortLatestOperationAsync(String resourceGroupName, String resourceName); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1433,13 +1416,14 @@ SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourc * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void rotateClusterCertificates(String resourceGroupName, String resourceName); + void abortLatestOperation(String resourceGroupName, String resourceName); /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -1449,7 +1433,7 @@ SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourc * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context); + void abortLatestOperation(String resourceGroupName, String resourceName, Context context); /** * Rotates the service account signing keys of a managed cluster. @@ -2030,224 +2014,6 @@ PagedIterable<OutboundEnvironmentEndpointInner> listOutboundNetworkDependenciesE PagedIterable<OutboundEnvironmentEndpointInner> listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String resourceName, Context context); - /** - * Gets supported Guardrails version in the specified subscription and location. - * - * Contains Guardrails version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @param version Safeguards version. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Guardrails Version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<GuardrailsAvailableVersionInner>> getGuardrailsVersionsWithResponseAsync(String location, - String version); - - /** - * Gets supported Guardrails version in the specified subscription and location. - * - * Contains Guardrails version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @param version Safeguards version. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Guardrails Version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<GuardrailsAvailableVersionInner> getGuardrailsVersionsAsync(String location, String version); - - /** - * Gets supported Guardrails version in the specified subscription and location. - * - * Contains Guardrails version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @param version Safeguards version. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Guardrails Version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response<GuardrailsAvailableVersionInner> getGuardrailsVersionsWithResponse(String location, String version, - Context context); - - /** - * Gets supported Guardrails version in the specified subscription and location. - * - * Contains Guardrails version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @param version Safeguards version. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Guardrails Version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - GuardrailsAvailableVersionInner getGuardrailsVersions(String location, String version); - - /** - * Gets a list of supported Guardrails versions in the specified subscription and location. - * - * Contains list of Guardrails version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of GuardrailsVersions as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux<GuardrailsAvailableVersionInner> listGuardrailsVersionsAsync(String location); - - /** - * Gets a list of supported Guardrails versions in the specified subscription and location. - * - * Contains list of Guardrails version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of GuardrailsVersions as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<GuardrailsAvailableVersionInner> listGuardrailsVersions(String location); - - /** - * Gets a list of supported Guardrails versions in the specified subscription and location. - * - * Contains list of Guardrails version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of GuardrailsVersions as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<GuardrailsAvailableVersionInner> listGuardrailsVersions(String location, Context context); - - /** - * Gets supported Safeguards version in the specified subscription and location. - * - * Contains Safeguards version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @param version Safeguards version. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Safeguards Version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<SafeguardsAvailableVersionInner>> getSafeguardsVersionsWithResponseAsync(String location, - String version); - - /** - * Gets supported Safeguards version in the specified subscription and location. - * - * Contains Safeguards version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @param version Safeguards version. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Safeguards Version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<SafeguardsAvailableVersionInner> getSafeguardsVersionsAsync(String location, String version); - - /** - * Gets supported Safeguards version in the specified subscription and location. - * - * Contains Safeguards version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @param version Safeguards version. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Safeguards Version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response<SafeguardsAvailableVersionInner> getSafeguardsVersionsWithResponse(String location, String version, - Context context); - - /** - * Gets supported Safeguards version in the specified subscription and location. - * - * Contains Safeguards version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @param version Safeguards version. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Safeguards Version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SafeguardsAvailableVersionInner getSafeguardsVersions(String location, String version); - - /** - * Gets a list of supported Safeguards versions in the specified subscription and location. - * - * Contains list of Safeguards version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of SafeguardsVersions as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux<SafeguardsAvailableVersionInner> listSafeguardsVersionsAsync(String location); - - /** - * Gets a list of supported Safeguards versions in the specified subscription and location. - * - * Contains list of Safeguards version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of SafeguardsVersions as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<SafeguardsAvailableVersionInner> listSafeguardsVersions(String location); - - /** - * Gets a list of supported Safeguards versions in the specified subscription and location. - * - * Contains list of Safeguards version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of SafeguardsVersions as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<SafeguardsAvailableVersionInner> listSafeguardsVersions(String location, Context context); - /** * Lists mesh revision profiles for all meshes in the specified location. * @@ -2461,116 +2227,4 @@ Response<MeshUpgradeProfileInner> getMeshUpgradeProfileWithResponse(String resou */ @ServiceMethod(returns = ReturnType.SINGLE) MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode); - - /** - * Rebalance nodes across specific load balancers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be - * rebalanced. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<Flux<ByteBuffer>>> rebalanceLoadBalancersWithResponseAsync(String resourceGroupName, - String resourceName, RebalanceLoadBalancersRequestBody parameters); - - /** - * Rebalance nodes across specific load balancers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be - * rebalanced. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<Void>, Void> beginRebalanceLoadBalancersAsync(String resourceGroupName, String resourceName, - RebalanceLoadBalancersRequestBody parameters); - - /** - * Rebalance nodes across specific load balancers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be - * rebalanced. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginRebalanceLoadBalancers(String resourceGroupName, String resourceName, - RebalanceLoadBalancersRequestBody parameters); - - /** - * Rebalance nodes across specific load balancers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be - * rebalanced. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginRebalanceLoadBalancers(String resourceGroupName, String resourceName, - RebalanceLoadBalancersRequestBody parameters, Context context); - - /** - * Rebalance nodes across specific load balancers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be - * rebalanced. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Void> rebalanceLoadBalancersAsync(String resourceGroupName, String resourceName, - RebalanceLoadBalancersRequestBody parameters); - - /** - * Rebalance nodes across specific load balancers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be - * rebalanced. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void rebalanceLoadBalancers(String resourceGroupName, String resourceName, - RebalanceLoadBalancersRequestBody parameters); - - /** - * Rebalance nodes across specific load balancers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be - * rebalanced. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void rebalanceLoadBalancers(String resourceGroupName, String resourceName, - RebalanceLoadBalancersRequestBody parameters, Context context); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MeshMembershipsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MeshMembershipsClient.java deleted file mode 100644 index bf8ff69cb6ae..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MeshMembershipsClient.java +++ /dev/null @@ -1,345 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.models.MeshMembershipInner; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in MeshMembershipsClient. - */ -public interface MeshMembershipsClient { - /** - * Lists mesh memberships in a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list mesh memberships in a managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux<MeshMembershipInner> listByManagedClusterAsync(String resourceGroupName, String resourceName); - - /** - * Lists mesh memberships in a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list mesh memberships in a managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<MeshMembershipInner> listByManagedCluster(String resourceGroupName, String resourceName); - - /** - * Lists mesh memberships in a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list mesh memberships in a managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<MeshMembershipInner> listByManagedCluster(String resourceGroupName, String resourceName, - Context context); - - /** - * Gets the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the mesh membership of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<MeshMembershipInner>> getWithResponseAsync(String resourceGroupName, String resourceName, - String meshMembershipName); - - /** - * Gets the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the mesh membership of a managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<MeshMembershipInner> getAsync(String resourceGroupName, String resourceName, String meshMembershipName); - - /** - * Gets the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the mesh membership of a managed cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response<MeshMembershipInner> getWithResponse(String resourceGroupName, String resourceName, - String meshMembershipName, Context context); - - /** - * Gets the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the mesh membership of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MeshMembershipInner get(String resourceGroupName, String resourceName, String meshMembershipName); - - /** - * Creates or updates the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param parameters The mesh membership to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh membership of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, - String meshMembershipName, MeshMembershipInner parameters); - - /** - * Creates or updates the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param parameters The mesh membership to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of mesh membership of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<MeshMembershipInner>, MeshMembershipInner> beginCreateOrUpdateAsync(String resourceGroupName, - String resourceName, String meshMembershipName, MeshMembershipInner parameters); - - /** - * Creates or updates the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param parameters The mesh membership to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of mesh membership of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<MeshMembershipInner>, MeshMembershipInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, String meshMembershipName, MeshMembershipInner parameters); - - /** - * Creates or updates the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param parameters The mesh membership to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of mesh membership of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<MeshMembershipInner>, MeshMembershipInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, String meshMembershipName, MeshMembershipInner parameters, Context context); - - /** - * Creates or updates the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param parameters The mesh membership to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh membership of a managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<MeshMembershipInner> createOrUpdateAsync(String resourceGroupName, String resourceName, - String meshMembershipName, MeshMembershipInner parameters); - - /** - * Creates or updates the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param parameters The mesh membership to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh membership of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MeshMembershipInner createOrUpdate(String resourceGroupName, String resourceName, String meshMembershipName, - MeshMembershipInner parameters); - - /** - * Creates or updates the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param parameters The mesh membership to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh membership of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MeshMembershipInner createOrUpdate(String resourceGroupName, String resourceName, String meshMembershipName, - MeshMembershipInner parameters, Context context); - - /** - * Deletes the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String meshMembershipName); - - /** - * Deletes the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String meshMembershipName); - - /** - * Deletes the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, - String meshMembershipName); - - /** - * Deletes the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, - String meshMembershipName, Context context); - - /** - * Deletes the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String meshMembershipName); - - /** - * Deletes the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String meshMembershipName); - - /** - * Deletes the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String meshMembershipName, Context context); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationStatusResultsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationStatusResultsClient.java deleted file mode 100644 index b937300f2a7a..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationStatusResultsClient.java +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.containerservice.fluent.models.OperationStatusResultInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OperationStatusResultsClient. - */ -public interface OperationStatusResultsClient { - /** - * Gets a list of operations in the specified managedCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations in the specified managedCluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux<OperationStatusResultInner> listAsync(String resourceGroupName, String resourceName); - - /** - * Gets a list of operations in the specified managedCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations in the specified managedCluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<OperationStatusResultInner> list(String resourceGroupName, String resourceName); - - /** - * Gets a list of operations in the specified managedCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations in the specified managedCluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable<OperationStatusResultInner> list(String resourceGroupName, String resourceName, Context context); - - /** - * Get the status of a specific operation in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified managed cluster along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<OperationStatusResultInner>> getWithResponseAsync(String resourceGroupName, String resourceName, - String operationId); - - /** - * Get the status of a specific operation in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified managed cluster on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<OperationStatusResultInner> getAsync(String resourceGroupName, String resourceName, String operationId); - - /** - * Get the status of a specific operation in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param operationId The ID of an ongoing async operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified managed cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response<OperationStatusResultInner> getWithResponse(String resourceGroupName, String resourceName, - String operationId, Context context); - - /** - * Get the status of a specific operation in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner get(String resourceGroupName, String resourceName, String operationId); - - /** - * Get the status of a specific operation in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified agent pool along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<Response<OperationStatusResultInner>> getByAgentPoolWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName, String operationId); - - /** - * Get the status of a specific operation in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified agent pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono<OperationStatusResultInner> getByAgentPoolAsync(String resourceGroupName, String resourceName, - String agentPoolName, String operationId); - - /** - * Get the status of a specific operation in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param operationId The ID of an ongoing async operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified agent pool along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response<OperationStatusResultInner> getByAgentPoolWithResponse(String resourceGroupName, String resourceName, - String agentPoolName, String operationId, Context context); - - /** - * Get the status of a specific operation in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified agent pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner getByAgentPool(String resourceGroupName, String resourceName, String agentPoolName, - String operationId); -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java index 72c8f983ce8f..5f3f79c9daf8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java @@ -9,8 +9,6 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.AgentPoolArtifactStreamingProfile; -import com.azure.resourcemanager.containerservice.models.AgentPoolBlueGreenUpgradeSettings; import com.azure.resourcemanager.containerservice.models.AgentPoolGatewayProfile; import com.azure.resourcemanager.containerservice.models.AgentPoolMode; import com.azure.resourcemanager.containerservice.models.AgentPoolNetworkProfile; @@ -26,7 +24,6 @@ import com.azure.resourcemanager.containerservice.models.KubeletDiskType; import com.azure.resourcemanager.containerservice.models.LinuxOSConfig; import com.azure.resourcemanager.containerservice.models.LocalDnsProfile; -import com.azure.resourcemanager.containerservice.models.NodeCustomizationProfile; import com.azure.resourcemanager.containerservice.models.OSDiskType; import com.azure.resourcemanager.containerservice.models.OSSku; import com.azure.resourcemanager.containerservice.models.OSType; @@ -35,7 +32,6 @@ import com.azure.resourcemanager.containerservice.models.ScaleDownMode; import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy; import com.azure.resourcemanager.containerservice.models.ScaleSetPriority; -import com.azure.resourcemanager.containerservice.models.UpgradeStrategy; import com.azure.resourcemanager.containerservice.models.VirtualMachineNodes; import com.azure.resourcemanager.containerservice.models.VirtualMachinesProfile; import com.azure.resourcemanager.containerservice.models.WorkloadRuntime; @@ -430,9 +426,9 @@ public AgentPoolInner withOsType(OSType osType) { } /** - * Get the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if - * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after - * Windows2019 is deprecated. + * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. * * @return the osSku value. */ @@ -441,9 +437,9 @@ public OSSku osSku() { } /** - * Set the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if - * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after - * Windows2019 is deprecated. + * Set the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. * * @param osSku the osSku value to set. * @return the AgentPoolInner object itself. @@ -602,13 +598,13 @@ public AgentPoolInner withMode(AgentPoolMode mode) { /** * Get the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the - * latest supported patch version is chosen automatically. Updating the agent pool with the same <major.minor> - * once it has been created will not trigger an upgrade, even if a newer patch version is available. As a best - * practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool - * version must have the same major version as the control plane. The node pool minor version must be within two - * minor versions of the control plane version. The node pool version cannot be greater than the control plane - * version. For more information see [upgrading a node + * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When + * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the + * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an + * upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an + * AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control + * plane. The node pool minor version must be within two minor versions of the control plane version. The node pool + * version cannot be greater than the control plane version. For more information see [upgrading a node * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). * * @return the orchestratorVersion value. @@ -619,13 +615,13 @@ public String orchestratorVersion() { /** * Set the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the - * latest supported patch version is chosen automatically. Updating the agent pool with the same <major.minor> - * once it has been created will not trigger an upgrade, even if a newer patch version is available. As a best - * practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool - * version must have the same major version as the control plane. The node pool minor version must be within two - * minor versions of the control plane version. The node pool version cannot be greater than the control plane - * version. For more information see [upgrading a node + * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When + * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the + * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an + * upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an + * AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control + * plane. The node pool minor version must be within two minor versions of the control plane version. The node pool + * version cannot be greater than the control plane version. For more information see [upgrading a node * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). * * @param orchestratorVersion the orchestratorVersion value to set. @@ -640,9 +636,9 @@ public AgentPoolInner withOrchestratorVersion(String orchestratorVersion) { } /** - * Get the currentOrchestratorVersion property: The version of Kubernetes running on the Agent Pool. If - * orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to - * it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> + * Get the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. If + * orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> * version being used. * * @return the currentOrchestratorVersion value. @@ -661,45 +657,7 @@ public String nodeImageVersion() { } /** - * Set the nodeImageVersion property: The version of node image. - * - * @param nodeImageVersion the nodeImageVersion value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withNodeImageVersion(String nodeImageVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withNodeImageVersion(nodeImageVersion); - return this; - } - - /** - * Get the upgradeStrategy property: Defines the upgrade strategy for the agent pool. The default is Rolling. - * - * @return the upgradeStrategy value. - */ - public UpgradeStrategy upgradeStrategy() { - return this.innerProperties() == null ? null : this.innerProperties().upgradeStrategy(); - } - - /** - * Set the upgradeStrategy property: Defines the upgrade strategy for the agent pool. The default is Rolling. - * - * @param upgradeStrategy the upgradeStrategy value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withUpgradeStrategy(UpgradeStrategy upgradeStrategy) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withUpgradeStrategy(upgradeStrategy); - return this; - } - - /** - * Get the upgradeSettings property: Settings for upgrading the agentpool. Applies when upgrade strategy is set to - * Rolling. + * Get the upgradeSettings property: Settings for upgrading the agentpool. * * @return the upgradeSettings value. */ @@ -708,8 +666,7 @@ public AgentPoolUpgradeSettings upgradeSettings() { } /** - * Set the upgradeSettings property: Settings for upgrading the agentpool. Applies when upgrade strategy is set to - * Rolling. + * Set the upgradeSettings property: Settings for upgrading the agentpool. * * @param upgradeSettings the upgradeSettings value to set. * @return the AgentPoolInner object itself. @@ -722,31 +679,6 @@ public AgentPoolInner withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettin return this; } - /** - * Get the upgradeSettingsBlueGreen property: Settings for Blue-Green upgrade on the agentpool. Applies when upgrade - * strategy is set to BlueGreen. - * - * @return the upgradeSettingsBlueGreen value. - */ - public AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen() { - return this.innerProperties() == null ? null : this.innerProperties().upgradeSettingsBlueGreen(); - } - - /** - * Set the upgradeSettingsBlueGreen property: Settings for Blue-Green upgrade on the agentpool. Applies when upgrade - * strategy is set to BlueGreen. - * - * @param upgradeSettingsBlueGreen the upgradeSettingsBlueGreen value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withUpgradeSettingsBlueGreen(AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withUpgradeSettingsBlueGreen(upgradeSettingsBlueGreen); - return this; - } - /** * Get the provisioningState property: The current deployment or provisioning state. * @@ -1022,39 +954,6 @@ public AgentPoolInner withNodeTaints(List<String> nodeTaints) { return this; } - /** - * Get the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled - * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be - * modified after node pool is created, but nodes will not be recreated with new taints until another operation that - * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run - * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with - * `kubectl taint nodes node1 key1=value1:NoSchedule-`. - * - * @return the nodeInitializationTaints value. - */ - public List<String> nodeInitializationTaints() { - return this.innerProperties() == null ? null : this.innerProperties().nodeInitializationTaints(); - } - - /** - * Set the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled - * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be - * modified after node pool is created, but nodes will not be recreated with new taints until another operation that - * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run - * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with - * `kubectl taint nodes node1 key1=value1:NoSchedule-`. - * - * @param nodeInitializationTaints the nodeInitializationTaints value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withNodeInitializationTaints(List<String> nodeInitializationTaints) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withNodeInitializationTaints(nodeInitializationTaints); - return this; - } - /** * Get the proximityPlacementGroupId property: The ID for Proximity Placement Group. * @@ -1308,48 +1207,48 @@ public AgentPoolInner withHostGroupId(String hostGroupId) { } /** - * Get the windowsProfile property: The Windows agent pool's specific profile. + * Get the networkProfile property: Network-related settings of an agent pool. * - * @return the windowsProfile value. + * @return the networkProfile value. */ - public AgentPoolWindowsProfile windowsProfile() { - return this.innerProperties() == null ? null : this.innerProperties().windowsProfile(); + public AgentPoolNetworkProfile networkProfile() { + return this.innerProperties() == null ? null : this.innerProperties().networkProfile(); } /** - * Set the windowsProfile property: The Windows agent pool's specific profile. + * Set the networkProfile property: Network-related settings of an agent pool. * - * @param windowsProfile the windowsProfile value to set. + * @param networkProfile the networkProfile value to set. * @return the AgentPoolInner object itself. */ - public AgentPoolInner withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { + public AgentPoolInner withNetworkProfile(AgentPoolNetworkProfile networkProfile) { if (this.innerProperties() == null) { this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); } - this.innerProperties().withWindowsProfile(windowsProfile); + this.innerProperties().withNetworkProfile(networkProfile); return this; } /** - * Get the networkProfile property: Network-related settings of an agent pool. + * Get the windowsProfile property: The Windows agent pool's specific profile. * - * @return the networkProfile value. + * @return the windowsProfile value. */ - public AgentPoolNetworkProfile networkProfile() { - return this.innerProperties() == null ? null : this.innerProperties().networkProfile(); + public AgentPoolWindowsProfile windowsProfile() { + return this.innerProperties() == null ? null : this.innerProperties().windowsProfile(); } /** - * Set the networkProfile property: Network-related settings of an agent pool. + * Set the windowsProfile property: The Windows agent pool's specific profile. * - * @param networkProfile the networkProfile value to set. + * @param windowsProfile the windowsProfile value to set. * @return the AgentPoolInner object itself. */ - public AgentPoolInner withNetworkProfile(AgentPoolNetworkProfile networkProfile) { + public AgentPoolInner withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { if (this.innerProperties() == null) { this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); } - this.innerProperties().withNetworkProfile(networkProfile); + this.innerProperties().withWindowsProfile(windowsProfile); return this; } @@ -1377,7 +1276,7 @@ public AgentPoolInner withSecurityProfile(AgentPoolSecurityProfile securityProfi } /** - * Get the gpuProfile property: The GPU settings of an agent pool. + * Get the gpuProfile property: GPU settings for the Agent Pool. * * @return the gpuProfile value. */ @@ -1386,7 +1285,7 @@ public GpuProfile gpuProfile() { } /** - * Set the gpuProfile property: The GPU settings of an agent pool. + * Set the gpuProfile property: GPU settings for the Agent Pool. * * @param gpuProfile the gpuProfile value to set. * @return the AgentPoolInner object itself. @@ -1400,25 +1299,27 @@ public AgentPoolInner withGpuProfile(GpuProfile gpuProfile) { } /** - * Get the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * Get the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be + * set if agent pool mode is not Gateway. * - * @return the artifactStreamingProfile value. + * @return the gatewayProfile value. */ - public AgentPoolArtifactStreamingProfile artifactStreamingProfile() { - return this.innerProperties() == null ? null : this.innerProperties().artifactStreamingProfile(); + public AgentPoolGatewayProfile gatewayProfile() { + return this.innerProperties() == null ? null : this.innerProperties().gatewayProfile(); } /** - * Set the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * Set the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be + * set if agent pool mode is not Gateway. * - * @param artifactStreamingProfile the artifactStreamingProfile value to set. + * @param gatewayProfile the gatewayProfile value to set. * @return the AgentPoolInner object itself. */ - public AgentPoolInner withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile) { + public AgentPoolInner withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { if (this.innerProperties() == null) { this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); } - this.innerProperties().withArtifactStreamingProfile(artifactStreamingProfile); + this.innerProperties().withGatewayProfile(gatewayProfile); return this; } @@ -1468,31 +1369,6 @@ public AgentPoolInner withVirtualMachineNodesStatus(List<VirtualMachineNodes> vi return this; } - /** - * Get the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be - * set if agent pool mode is not Gateway. - * - * @return the gatewayProfile value. - */ - public AgentPoolGatewayProfile gatewayProfile() { - return this.innerProperties() == null ? null : this.innerProperties().gatewayProfile(); - } - - /** - * Set the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be - * set if agent pool mode is not Gateway. - * - * @param gatewayProfile the gatewayProfile value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withGatewayProfile(gatewayProfile); - return this; - } - /** * Get the status property: Contains read-only information about the Agent Pool. * @@ -1543,31 +1419,6 @@ public AgentPoolInner withLocalDnsProfile(LocalDnsProfile localDnsProfile) { return this; } - /** - * Get the nodeCustomizationProfile property: Settings to determine the node customization used to provision nodes - * in a pool. - * - * @return the nodeCustomizationProfile value. - */ - public NodeCustomizationProfile nodeCustomizationProfile() { - return this.innerProperties() == null ? null : this.innerProperties().nodeCustomizationProfile(); - } - - /** - * Set the nodeCustomizationProfile property: Settings to determine the node customization used to provision nodes - * in a pool. - * - * @param nodeCustomizationProfile the nodeCustomizationProfile value to set. - * @return the AgentPoolInner object itself. - */ - public AgentPoolInner withNodeCustomizationProfile(NodeCustomizationProfile nodeCustomizationProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); - } - this.innerProperties().withNodeCustomizationProfile(nodeCustomizationProfile); - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java index c1c9ff4eea55..79cc3cd76425 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java @@ -10,9 +10,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.AgentPoolRecentlyUsedVersion; import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; -import com.azure.resourcemanager.containerservice.models.ComponentsByRelease; import com.azure.resourcemanager.containerservice.models.OSType; import java.io.IOException; import java.util.List; @@ -153,38 +151,6 @@ public AgentPoolUpgradeProfileInner withUpgrades(List<AgentPoolUpgradeProfilePro return this; } - /** - * Get the componentsByReleases property: List of components grouped by kubernetes major.minor version. - * - * @return the componentsByReleases value. - */ - public List<ComponentsByRelease> componentsByReleases() { - return this.innerProperties() == null ? null : this.innerProperties().componentsByReleases(); - } - - /** - * Set the componentsByReleases property: List of components grouped by kubernetes major.minor version. - * - * @param componentsByReleases the componentsByReleases value to set. - * @return the AgentPoolUpgradeProfileInner object itself. - */ - public AgentPoolUpgradeProfileInner withComponentsByReleases(List<ComponentsByRelease> componentsByReleases) { - if (this.innerProperties() == null) { - this.innerProperties = new AgentPoolUpgradeProfileProperties(); - } - this.innerProperties().withComponentsByReleases(componentsByReleases); - return this; - } - - /** - * Get the recentlyUsedVersions property: List of historical good versions for rollback operations. - * - * @return the recentlyUsedVersions value. - */ - public List<AgentPoolRecentlyUsedVersion> recentlyUsedVersions() { - return this.innerProperties() == null ? null : this.innerProperties().recentlyUsedVersions(); - } - /** * Get the latestNodeImageVersion property: The latest AKS supported node image version. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java index 231732f5543f..98880ef60067 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java @@ -10,9 +10,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.AgentPoolRecentlyUsedVersion; import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; -import com.azure.resourcemanager.containerservice.models.ComponentsByRelease; import com.azure.resourcemanager.containerservice.models.OSType; import java.io.IOException; import java.util.List; @@ -37,16 +35,6 @@ public final class AgentPoolUpgradeProfileProperties implements JsonSerializable */ private List<AgentPoolUpgradeProfilePropertiesUpgradesItem> upgrades; - /* - * List of components grouped by kubernetes major.minor version. - */ - private List<ComponentsByRelease> componentsByReleases; - - /* - * List of historical good versions for rollback operations. - */ - private List<AgentPoolRecentlyUsedVersion> recentlyUsedVersions; - /* * The latest AKS supported node image version. */ @@ -119,35 +107,6 @@ public List<AgentPoolUpgradeProfilePropertiesUpgradesItem> upgrades() { return this; } - /** - * Get the componentsByReleases property: List of components grouped by kubernetes major.minor version. - * - * @return the componentsByReleases value. - */ - public List<ComponentsByRelease> componentsByReleases() { - return this.componentsByReleases; - } - - /** - * Set the componentsByReleases property: List of components grouped by kubernetes major.minor version. - * - * @param componentsByReleases the componentsByReleases value to set. - * @return the AgentPoolUpgradeProfileProperties object itself. - */ - public AgentPoolUpgradeProfileProperties withComponentsByReleases(List<ComponentsByRelease> componentsByReleases) { - this.componentsByReleases = componentsByReleases; - return this; - } - - /** - * Get the recentlyUsedVersions property: List of historical good versions for rollback operations. - * - * @return the recentlyUsedVersions value. - */ - public List<AgentPoolRecentlyUsedVersion> recentlyUsedVersions() { - return this.recentlyUsedVersions; - } - /** * Get the latestNodeImageVersion property: The latest AKS supported node image version. * @@ -187,12 +146,6 @@ public void validate() { if (upgrades() != null) { upgrades().forEach(e -> e.validate()); } - if (componentsByReleases() != null) { - componentsByReleases().forEach(e -> e.validate()); - } - if (recentlyUsedVersions() != null) { - recentlyUsedVersions().forEach(e -> e.validate()); - } } private static final ClientLogger LOGGER = new ClientLogger(AgentPoolUpgradeProfileProperties.class); @@ -206,8 +159,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("componentsByReleases", this.componentsByReleases, - (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("latestNodeImageVersion", this.latestNodeImageVersion); return jsonWriter.writeEndObject(); } @@ -237,14 +188,6 @@ public static AgentPoolUpgradeProfileProperties fromJson(JsonReader jsonReader) List<AgentPoolUpgradeProfilePropertiesUpgradesItem> upgrades = reader.readArray(reader1 -> AgentPoolUpgradeProfilePropertiesUpgradesItem.fromJson(reader1)); deserializedAgentPoolUpgradeProfileProperties.upgrades = upgrades; - } else if ("componentsByReleases".equals(fieldName)) { - List<ComponentsByRelease> componentsByReleases - = reader.readArray(reader1 -> ComponentsByRelease.fromJson(reader1)); - deserializedAgentPoolUpgradeProfileProperties.componentsByReleases = componentsByReleases; - } else if ("recentlyUsedVersions".equals(fieldName)) { - List<AgentPoolRecentlyUsedVersion> recentlyUsedVersions - = reader.readArray(reader1 -> AgentPoolRecentlyUsedVersion.fromJson(reader1)); - deserializedAgentPoolUpgradeProfileProperties.recentlyUsedVersions = recentlyUsedVersions; } else if ("latestNodeImageVersion".equals(fieldName)) { deserializedAgentPoolUpgradeProfileProperties.latestNodeImageVersion = reader.getString(); } else { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/GuardrailsAvailableVersionInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/GuardrailsAvailableVersionInner.java deleted file mode 100644 index 79aaab7e8e08..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/GuardrailsAvailableVersionInner.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.GuardrailsAvailableVersionsProperties; -import java.io.IOException; - -/** - * Available Guardrails Version. - */ -@Fluent -public final class GuardrailsAvailableVersionInner extends ProxyResource { - /* - * Whether the version is default or not and support info. - */ - private GuardrailsAvailableVersionsProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of GuardrailsAvailableVersionInner class. - */ - public GuardrailsAvailableVersionInner() { - } - - /** - * Get the properties property: Whether the version is default or not and support info. - * - * @return the properties value. - */ - public GuardrailsAvailableVersionsProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Whether the version is default or not and support info. - * - * @param properties the properties value to set. - * @return the GuardrailsAvailableVersionInner object itself. - */ - public GuardrailsAvailableVersionInner withProperties(GuardrailsAvailableVersionsProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model GuardrailsAvailableVersionInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(GuardrailsAvailableVersionInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GuardrailsAvailableVersionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GuardrailsAvailableVersionInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the GuardrailsAvailableVersionInner. - */ - public static GuardrailsAvailableVersionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GuardrailsAvailableVersionInner deserializedGuardrailsAvailableVersionInner - = new GuardrailsAvailableVersionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedGuardrailsAvailableVersionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedGuardrailsAvailableVersionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedGuardrailsAvailableVersionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedGuardrailsAvailableVersionInner.properties - = GuardrailsAvailableVersionsProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedGuardrailsAvailableVersionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedGuardrailsAvailableVersionInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java deleted file mode 100644 index 5b53f9fe6097..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.IdentityBindingProperties; -import java.io.IOException; - -/** - * The IdentityBinding resource. - */ -@Fluent -public final class IdentityBindingInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private IdentityBindingProperties properties; - - /* - * Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is - * updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable - * optimistic concurrency per the normal eTag convention. - */ - private String etag; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of IdentityBindingInner class. - */ - public IdentityBindingInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public IdentityBindingProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the IdentityBindingInner object itself. - */ - public IdentityBindingInner withProperties(IdentityBindingProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will - * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a - * subsequent request to enable optimistic concurrency per the normal eTag convention. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IdentityBindingInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IdentityBindingInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IdentityBindingInner. - */ - public static IdentityBindingInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IdentityBindingInner deserializedIdentityBindingInner = new IdentityBindingInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedIdentityBindingInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedIdentityBindingInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedIdentityBindingInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedIdentityBindingInner.properties = IdentityBindingProperties.fromJson(reader); - } else if ("eTag".equals(fieldName)) { - deserializedIdentityBindingInner.etag = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedIdentityBindingInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedIdentityBindingInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/JwtAuthenticatorInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/JwtAuthenticatorInner.java deleted file mode 100644 index 9b4df46d0e88..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/JwtAuthenticatorInner.java +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.JwtAuthenticatorProperties; -import java.io.IOException; - -/** - * Configuration for JWT authenticator in the managed cluster. - */ -@Fluent -public final class JwtAuthenticatorInner extends ProxyResource { - /* - * The properties of JWTAuthenticator. For details on how to configure the properties of a JWT authenticator, please - * refer to the Kubernetes documentation: - * https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. - * Please note that not all fields available in the Kubernetes documentation are supported by AKS. For - * troubleshooting, please see https://aka.ms/aks-external-issuers-docs. - */ - private JwtAuthenticatorProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of JwtAuthenticatorInner class. - */ - public JwtAuthenticatorInner() { - } - - /** - * Get the properties property: The properties of JWTAuthenticator. For details on how to configure the properties - * of a JWT authenticator, please refer to the Kubernetes documentation: - * https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. - * Please note that not all fields available in the Kubernetes documentation are supported by AKS. For - * troubleshooting, please see https://aka.ms/aks-external-issuers-docs. - * - * @return the properties value. - */ - public JwtAuthenticatorProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties of JWTAuthenticator. For details on how to configure the properties - * of a JWT authenticator, please refer to the Kubernetes documentation: - * https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. - * Please note that not all fields available in the Kubernetes documentation are supported by AKS. For - * troubleshooting, please see https://aka.ms/aks-external-issuers-docs. - * - * @param properties the properties value to set. - * @return the JwtAuthenticatorInner object itself. - */ - public JwtAuthenticatorInner withProperties(JwtAuthenticatorProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model JwtAuthenticatorInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JwtAuthenticatorInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JwtAuthenticatorInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JwtAuthenticatorInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JwtAuthenticatorInner. - */ - public static JwtAuthenticatorInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JwtAuthenticatorInner deserializedJwtAuthenticatorInner = new JwtAuthenticatorInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedJwtAuthenticatorInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedJwtAuthenticatorInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedJwtAuthenticatorInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedJwtAuthenticatorInner.properties = JwtAuthenticatorProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedJwtAuthenticatorInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedJwtAuthenticatorInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerInner.java deleted file mode 100644 index 090dfb7eef8c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerInner.java +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.LabelSelector; -import java.io.IOException; - -/** - * The configurations regarding multiple standard load balancers. If not supplied, single load balancer mode will be - * used. Multiple standard load balancers mode will be used if at lease one configuration is supplied. There has to be a - * configuration named `kubernetes`. The name field will be the name of the corresponding public load balancer. There - * will be an internal load balancer created if needed, and the name will be `<name>-internal`. The internal lb - * shares the same configurations as the external one. The internal lbs are not needed to be included in LoadBalancer - * list. - */ -@Fluent -public final class LoadBalancerInner extends ProxyResource { - /* - * The properties of the load balancer. - */ - private LoadBalancerProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of LoadBalancerInner class. - */ - public LoadBalancerInner() { - } - - /** - * Get the innerProperties property: The properties of the load balancer. - * - * @return the innerProperties value. - */ - private LoadBalancerProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the primaryAgentPoolName property: Required field. A string value that must specify the ID of an existing - * agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at - * least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a - * single load balancer. - * - * @return the primaryAgentPoolName value. - */ - public String primaryAgentPoolName() { - return this.innerProperties() == null ? null : this.innerProperties().primaryAgentPoolName(); - } - - /** - * Set the primaryAgentPoolName property: Required field. A string value that must specify the ID of an existing - * agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at - * least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a - * single load balancer. - * - * @param primaryAgentPoolName the primaryAgentPoolName value to set. - * @return the LoadBalancerInner object itself. - */ - public LoadBalancerInner withPrimaryAgentPoolName(String primaryAgentPoolName) { - if (this.innerProperties() == null) { - this.innerProperties = new LoadBalancerProperties(); - } - this.innerProperties().withPrimaryAgentPoolName(primaryAgentPoolName); - return this; - } - - /** - * Get the allowServicePlacement property: Whether to automatically place services on the load balancer. If not - * supplied, the default value is true. If set to false manually, both of the external and the internal load - * balancer will not be selected for services unless they explicitly target it. - * - * @return the allowServicePlacement value. - */ - public Boolean allowServicePlacement() { - return this.innerProperties() == null ? null : this.innerProperties().allowServicePlacement(); - } - - /** - * Set the allowServicePlacement property: Whether to automatically place services on the load balancer. If not - * supplied, the default value is true. If set to false manually, both of the external and the internal load - * balancer will not be selected for services unless they explicitly target it. - * - * @param allowServicePlacement the allowServicePlacement value to set. - * @return the LoadBalancerInner object itself. - */ - public LoadBalancerInner withAllowServicePlacement(Boolean allowServicePlacement) { - if (this.innerProperties() == null) { - this.innerProperties = new LoadBalancerProperties(); - } - this.innerProperties().withAllowServicePlacement(allowServicePlacement); - return this; - } - - /** - * Get the serviceLabelSelector property: Only services that must match this selector can be placed on this load - * balancer. - * - * @return the serviceLabelSelector value. - */ - public LabelSelector serviceLabelSelector() { - return this.innerProperties() == null ? null : this.innerProperties().serviceLabelSelector(); - } - - /** - * Set the serviceLabelSelector property: Only services that must match this selector can be placed on this load - * balancer. - * - * @param serviceLabelSelector the serviceLabelSelector value to set. - * @return the LoadBalancerInner object itself. - */ - public LoadBalancerInner withServiceLabelSelector(LabelSelector serviceLabelSelector) { - if (this.innerProperties() == null) { - this.innerProperties = new LoadBalancerProperties(); - } - this.innerProperties().withServiceLabelSelector(serviceLabelSelector); - return this; - } - - /** - * Get the serviceNamespaceSelector property: Services created in namespaces that match the selector can be placed - * on this load balancer. - * - * @return the serviceNamespaceSelector value. - */ - public LabelSelector serviceNamespaceSelector() { - return this.innerProperties() == null ? null : this.innerProperties().serviceNamespaceSelector(); - } - - /** - * Set the serviceNamespaceSelector property: Services created in namespaces that match the selector can be placed - * on this load balancer. - * - * @param serviceNamespaceSelector the serviceNamespaceSelector value to set. - * @return the LoadBalancerInner object itself. - */ - public LoadBalancerInner withServiceNamespaceSelector(LabelSelector serviceNamespaceSelector) { - if (this.innerProperties() == null) { - this.innerProperties = new LoadBalancerProperties(); - } - this.innerProperties().withServiceNamespaceSelector(serviceNamespaceSelector); - return this; - } - - /** - * Get the nodeSelector property: Nodes that match this selector will be possible members of this load balancer. - * - * @return the nodeSelector value. - */ - public LabelSelector nodeSelector() { - return this.innerProperties() == null ? null : this.innerProperties().nodeSelector(); - } - - /** - * Set the nodeSelector property: Nodes that match this selector will be possible members of this load balancer. - * - * @param nodeSelector the nodeSelector value to set. - * @return the LoadBalancerInner object itself. - */ - public LoadBalancerInner withNodeSelector(LabelSelector nodeSelector) { - if (this.innerProperties() == null) { - this.innerProperties = new LoadBalancerProperties(); - } - this.innerProperties().withNodeSelector(nodeSelector); - return this; - } - - /** - * Get the provisioningState property: The current provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LoadBalancerInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LoadBalancerInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LoadBalancerInner. - */ - public static LoadBalancerInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LoadBalancerInner deserializedLoadBalancerInner = new LoadBalancerInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedLoadBalancerInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedLoadBalancerInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedLoadBalancerInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedLoadBalancerInner.innerProperties = LoadBalancerProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedLoadBalancerInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedLoadBalancerInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerProperties.java deleted file mode 100644 index e6cd72bd6fc5..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerProperties.java +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.LabelSelector; -import java.io.IOException; - -/** - * The LoadBalancerProperties model. - */ -@Fluent -public final class LoadBalancerProperties implements JsonSerializable<LoadBalancerProperties> { - /* - * Required field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool - * will always be added to this load balancer. This agent pool must have at least one node and minCount>=1 for - * autoscaling operations. An agent pool can only be the primary pool for a single load balancer. - */ - private String primaryAgentPoolName; - - /* - * Whether to automatically place services on the load balancer. If not supplied, the default value is true. If set - * to false manually, both of the external and the internal load balancer will not be selected for services unless - * they explicitly target it. - */ - private Boolean allowServicePlacement; - - /* - * Only services that must match this selector can be placed on this load balancer. - */ - private LabelSelector serviceLabelSelector; - - /* - * Services created in namespaces that match the selector can be placed on this load balancer. - */ - private LabelSelector serviceNamespaceSelector; - - /* - * Nodes that match this selector will be possible members of this load balancer. - */ - private LabelSelector nodeSelector; - - /* - * The current provisioning state. - */ - private String provisioningState; - - /** - * Creates an instance of LoadBalancerProperties class. - */ - public LoadBalancerProperties() { - } - - /** - * Get the primaryAgentPoolName property: Required field. A string value that must specify the ID of an existing - * agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at - * least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a - * single load balancer. - * - * @return the primaryAgentPoolName value. - */ - public String primaryAgentPoolName() { - return this.primaryAgentPoolName; - } - - /** - * Set the primaryAgentPoolName property: Required field. A string value that must specify the ID of an existing - * agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at - * least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a - * single load balancer. - * - * @param primaryAgentPoolName the primaryAgentPoolName value to set. - * @return the LoadBalancerProperties object itself. - */ - public LoadBalancerProperties withPrimaryAgentPoolName(String primaryAgentPoolName) { - this.primaryAgentPoolName = primaryAgentPoolName; - return this; - } - - /** - * Get the allowServicePlacement property: Whether to automatically place services on the load balancer. If not - * supplied, the default value is true. If set to false manually, both of the external and the internal load - * balancer will not be selected for services unless they explicitly target it. - * - * @return the allowServicePlacement value. - */ - public Boolean allowServicePlacement() { - return this.allowServicePlacement; - } - - /** - * Set the allowServicePlacement property: Whether to automatically place services on the load balancer. If not - * supplied, the default value is true. If set to false manually, both of the external and the internal load - * balancer will not be selected for services unless they explicitly target it. - * - * @param allowServicePlacement the allowServicePlacement value to set. - * @return the LoadBalancerProperties object itself. - */ - public LoadBalancerProperties withAllowServicePlacement(Boolean allowServicePlacement) { - this.allowServicePlacement = allowServicePlacement; - return this; - } - - /** - * Get the serviceLabelSelector property: Only services that must match this selector can be placed on this load - * balancer. - * - * @return the serviceLabelSelector value. - */ - public LabelSelector serviceLabelSelector() { - return this.serviceLabelSelector; - } - - /** - * Set the serviceLabelSelector property: Only services that must match this selector can be placed on this load - * balancer. - * - * @param serviceLabelSelector the serviceLabelSelector value to set. - * @return the LoadBalancerProperties object itself. - */ - public LoadBalancerProperties withServiceLabelSelector(LabelSelector serviceLabelSelector) { - this.serviceLabelSelector = serviceLabelSelector; - return this; - } - - /** - * Get the serviceNamespaceSelector property: Services created in namespaces that match the selector can be placed - * on this load balancer. - * - * @return the serviceNamespaceSelector value. - */ - public LabelSelector serviceNamespaceSelector() { - return this.serviceNamespaceSelector; - } - - /** - * Set the serviceNamespaceSelector property: Services created in namespaces that match the selector can be placed - * on this load balancer. - * - * @param serviceNamespaceSelector the serviceNamespaceSelector value to set. - * @return the LoadBalancerProperties object itself. - */ - public LoadBalancerProperties withServiceNamespaceSelector(LabelSelector serviceNamespaceSelector) { - this.serviceNamespaceSelector = serviceNamespaceSelector; - return this; - } - - /** - * Get the nodeSelector property: Nodes that match this selector will be possible members of this load balancer. - * - * @return the nodeSelector value. - */ - public LabelSelector nodeSelector() { - return this.nodeSelector; - } - - /** - * Set the nodeSelector property: Nodes that match this selector will be possible members of this load balancer. - * - * @param nodeSelector the nodeSelector value to set. - * @return the LoadBalancerProperties object itself. - */ - public LoadBalancerProperties withNodeSelector(LabelSelector nodeSelector) { - this.nodeSelector = nodeSelector; - return this; - } - - /** - * Get the provisioningState property: The current provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (primaryAgentPoolName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property primaryAgentPoolName in model LoadBalancerProperties")); - } - if (serviceLabelSelector() != null) { - serviceLabelSelector().validate(); - } - if (serviceNamespaceSelector() != null) { - serviceNamespaceSelector().validate(); - } - if (nodeSelector() != null) { - nodeSelector().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(LoadBalancerProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("primaryAgentPoolName", this.primaryAgentPoolName); - jsonWriter.writeBooleanField("allowServicePlacement", this.allowServicePlacement); - jsonWriter.writeJsonField("serviceLabelSelector", this.serviceLabelSelector); - jsonWriter.writeJsonField("serviceNamespaceSelector", this.serviceNamespaceSelector); - jsonWriter.writeJsonField("nodeSelector", this.nodeSelector); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LoadBalancerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LoadBalancerProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LoadBalancerProperties. - */ - public static LoadBalancerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LoadBalancerProperties deserializedLoadBalancerProperties = new LoadBalancerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("primaryAgentPoolName".equals(fieldName)) { - deserializedLoadBalancerProperties.primaryAgentPoolName = reader.getString(); - } else if ("allowServicePlacement".equals(fieldName)) { - deserializedLoadBalancerProperties.allowServicePlacement - = reader.getNullable(JsonReader::getBoolean); - } else if ("serviceLabelSelector".equals(fieldName)) { - deserializedLoadBalancerProperties.serviceLabelSelector = LabelSelector.fromJson(reader); - } else if ("serviceNamespaceSelector".equals(fieldName)) { - deserializedLoadBalancerProperties.serviceNamespaceSelector = LabelSelector.fromJson(reader); - } else if ("nodeSelector".equals(fieldName)) { - deserializedLoadBalancerProperties.nodeSelector = LabelSelector.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedLoadBalancerProperties.provisioningState = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedLoadBalancerProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java index 747f7e188dbf..5bedf80fe172 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java @@ -14,8 +14,8 @@ import java.util.List; /** - * A machine provides detailed information about its configuration and status. A machine may be visible here but not in - * kubectl get nodes; if so, it may be because the machine has not been registered with the Kubernetes API Server yet. + * A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl + * get nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet. */ @Fluent public final class MachineInner extends SubResource { @@ -54,17 +54,6 @@ public List<String> zones() { return this.zones; } - /** - * Set the zones property: The Availability zone in which machine is located. - * - * @param zones the zones value to set. - * @return the MachineInner object itself. - */ - public MachineInner withZones(List<String> zones) { - this.zones = zones; - return this; - } - /** * Get the properties property: The properties of the machine. * @@ -74,17 +63,6 @@ public MachineProperties properties() { return this.properties; } - /** - * Set the properties property: The properties of the machine. - * - * @param properties the properties value to set. - * @return the MachineInner object itself. - */ - public MachineInner withProperties(MachineProperties properties) { - this.properties = properties; - return this; - } - /** * Get the name property: The name of the resource that is unique within a resource group. This name can be used to * access the resource. @@ -131,8 +109,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("id", id()); - jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java index 0cf5ed623b74..93d5bfd7120f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java @@ -9,8 +9,6 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.AgentPoolArtifactStreamingProfile; -import com.azure.resourcemanager.containerservice.models.AgentPoolBlueGreenUpgradeSettings; import com.azure.resourcemanager.containerservice.models.AgentPoolGatewayProfile; import com.azure.resourcemanager.containerservice.models.AgentPoolMode; import com.azure.resourcemanager.containerservice.models.AgentPoolNetworkProfile; @@ -26,7 +24,6 @@ import com.azure.resourcemanager.containerservice.models.KubeletDiskType; import com.azure.resourcemanager.containerservice.models.LinuxOSConfig; import com.azure.resourcemanager.containerservice.models.LocalDnsProfile; -import com.azure.resourcemanager.containerservice.models.NodeCustomizationProfile; import com.azure.resourcemanager.containerservice.models.OSDiskType; import com.azure.resourcemanager.containerservice.models.OSSku; import com.azure.resourcemanager.containerservice.models.OSType; @@ -35,7 +32,6 @@ import com.azure.resourcemanager.containerservice.models.ScaleDownMode; import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy; import com.azure.resourcemanager.containerservice.models.ScaleSetPriority; -import com.azure.resourcemanager.containerservice.models.UpgradeStrategy; import com.azure.resourcemanager.containerservice.models.VirtualMachineNodes; import com.azure.resourcemanager.containerservice.models.VirtualMachinesProfile; import com.azure.resourcemanager.containerservice.models.WorkloadRuntime; @@ -134,9 +130,8 @@ public class ManagedClusterAgentPoolProfileProperties private OSType osType; /* - * Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or - * Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is - * deprecated. + * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 + * when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. */ private OSSku osSku; @@ -174,20 +169,20 @@ public class ManagedClusterAgentPoolProfileProperties private AgentPoolMode mode; /* - * The version of Kubernetes specified by the user. Both patch version <major.minor.patch> and <major.minor> are - * supported. When <major.minor> is specified, the latest supported patch version is chosen automatically. Updating - * the agent pool with the same <major.minor> once it has been created will not trigger an upgrade, even if a newer - * patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same - * Kubernetes version. The node pool version must have the same major version as the control plane. The node pool - * minor version must be within two minor versions of the control plane version. The node pool version cannot be - * greater than the control plane version. For more information see [upgrading a node - * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + * The version of Kubernetes specified by the user. Both patch version <major.minor.patch> (e.g. 1.20.13) and + * <major.minor> (e.g. 1.20) are supported. When <major.minor> is specified, the latest supported GA patch version + * is chosen automatically. Updating the cluster with the same <major.minor> once it has been created (e.g. 1.14.x + * -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should + * upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same + * major version as the control plane. The node pool minor version must be within two minor versions of the control + * plane version. The node pool version cannot be greater than the control plane version. For more information see + * [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). */ private String orchestratorVersion; /* - * The version of Kubernetes running on the Agent Pool. If orchestratorVersion was a fully specified version - * <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion was <major.minor>, this field + * The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version + * <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion is <major.minor>, this field * will contain the full <major.minor.patch> version being used. */ private String currentOrchestratorVersion; @@ -198,20 +193,10 @@ public class ManagedClusterAgentPoolProfileProperties private String nodeImageVersion; /* - * Defines the upgrade strategy for the agent pool. The default is Rolling. - */ - private UpgradeStrategy upgradeStrategy; - - /* - * Settings for upgrading the agentpool. Applies when upgrade strategy is set to Rolling. + * Settings for upgrading the agentpool */ private AgentPoolUpgradeSettings upgradeSettings; - /* - * Settings for Blue-Green upgrade on the agentpool. Applies when upgrade strategy is set to BlueGreen. - */ - private AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen; - /* * The current deployment or provisioning state. */ @@ -281,16 +266,6 @@ public class ManagedClusterAgentPoolProfileProperties */ private List<String> nodeTaints; - /* - * Taints added on the nodes during creation that will not be reconciled by AKS. These taints will not be reconciled - * by AKS and can be removed with a kubectl call. This field can be modified after node pool is created, but nodes - * will not be recreated with new taints until another operation that requires recreation (e.g. node image upgrade) - * happens. These taints allow for required configuration to run before the node is ready to accept workloads, for - * example 'key1=value1:NoSchedule' that then can be removed with `kubectl taint nodes node1 - * key1=value1:NoSchedule-` - */ - private List<String> nodeInitializationTaints; - /* * The ID for Proximity Placement Group. */ @@ -350,14 +325,14 @@ public class ManagedClusterAgentPoolProfileProperties private String hostGroupId; /* - * The Windows agent pool's specific profile. + * Network-related settings of an agent pool. */ - private AgentPoolWindowsProfile windowsProfile; + private AgentPoolNetworkProfile networkProfile; /* - * Network-related settings of an agent pool. + * The Windows agent pool's specific profile. */ - private AgentPoolNetworkProfile networkProfile; + private AgentPoolWindowsProfile windowsProfile; /* * The security settings of an agent pool. @@ -365,14 +340,15 @@ public class ManagedClusterAgentPoolProfileProperties private AgentPoolSecurityProfile securityProfile; /* - * The GPU settings of an agent pool. + * GPU settings for the Agent Pool. */ private GpuProfile gpuProfile; /* - * Configuration for using artifact streaming on AKS. + * Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not + * Gateway. */ - private AgentPoolArtifactStreamingProfile artifactStreamingProfile; + private AgentPoolGatewayProfile gatewayProfile; /* * Specifications on VirtualMachines agent pool. @@ -384,12 +360,6 @@ public class ManagedClusterAgentPoolProfileProperties */ private List<VirtualMachineNodes> virtualMachineNodesStatus; - /* - * Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not - * Gateway. - */ - private AgentPoolGatewayProfile gatewayProfile; - /* * Contains read-only information about the Agent Pool. */ @@ -401,11 +371,6 @@ public class ManagedClusterAgentPoolProfileProperties */ private LocalDnsProfile localDnsProfile; - /* - * Settings to determine the node customization used to provision nodes in a pool. - */ - private NodeCustomizationProfile nodeCustomizationProfile; - /** * Creates an instance of ManagedClusterAgentPoolProfileProperties class. */ @@ -713,9 +678,9 @@ public ManagedClusterAgentPoolProfileProperties withOsType(OSType osType) { } /** - * Get the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if - * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after - * Windows2019 is deprecated. + * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. * * @return the osSku value. */ @@ -724,9 +689,9 @@ public OSSku osSku() { } /** - * Set the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if - * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after - * Windows2019 is deprecated. + * Set the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. * * @param osSku the osSku value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. @@ -864,13 +829,13 @@ public ManagedClusterAgentPoolProfileProperties withMode(AgentPoolMode mode) { /** * Get the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the - * latest supported patch version is chosen automatically. Updating the agent pool with the same <major.minor> - * once it has been created will not trigger an upgrade, even if a newer patch version is available. As a best - * practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool - * version must have the same major version as the control plane. The node pool minor version must be within two - * minor versions of the control plane version. The node pool version cannot be greater than the control plane - * version. For more information see [upgrading a node + * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When + * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the + * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an + * upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an + * AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control + * plane. The node pool minor version must be within two minor versions of the control plane version. The node pool + * version cannot be greater than the control plane version. For more information see [upgrading a node * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). * * @return the orchestratorVersion value. @@ -881,13 +846,13 @@ public String orchestratorVersion() { /** * Set the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the - * latest supported patch version is chosen automatically. Updating the agent pool with the same <major.minor> - * once it has been created will not trigger an upgrade, even if a newer patch version is available. As a best - * practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool - * version must have the same major version as the control plane. The node pool minor version must be within two - * minor versions of the control plane version. The node pool version cannot be greater than the control plane - * version. For more information see [upgrading a node + * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When + * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the + * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an + * upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an + * AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control + * plane. The node pool minor version must be within two minor versions of the control plane version. The node pool + * version cannot be greater than the control plane version. For more information see [upgrading a node * pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). * * @param orchestratorVersion the orchestratorVersion value to set. @@ -899,9 +864,9 @@ public ManagedClusterAgentPoolProfileProperties withOrchestratorVersion(String o } /** - * Get the currentOrchestratorVersion property: The version of Kubernetes running on the Agent Pool. If - * orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to - * it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> + * Get the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. If + * orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> * version being used. * * @return the currentOrchestratorVersion value. @@ -911,9 +876,9 @@ public String currentOrchestratorVersion() { } /** - * Set the currentOrchestratorVersion property: The version of Kubernetes running on the Agent Pool. If - * orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to - * it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> + * Set the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. If + * orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> * version being used. * * @param currentOrchestratorVersion the currentOrchestratorVersion value to set. @@ -939,34 +904,13 @@ public String nodeImageVersion() { * @param nodeImageVersion the nodeImageVersion value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. */ - public ManagedClusterAgentPoolProfileProperties withNodeImageVersion(String nodeImageVersion) { + ManagedClusterAgentPoolProfileProperties withNodeImageVersion(String nodeImageVersion) { this.nodeImageVersion = nodeImageVersion; return this; } /** - * Get the upgradeStrategy property: Defines the upgrade strategy for the agent pool. The default is Rolling. - * - * @return the upgradeStrategy value. - */ - public UpgradeStrategy upgradeStrategy() { - return this.upgradeStrategy; - } - - /** - * Set the upgradeStrategy property: Defines the upgrade strategy for the agent pool. The default is Rolling. - * - * @param upgradeStrategy the upgradeStrategy value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withUpgradeStrategy(UpgradeStrategy upgradeStrategy) { - this.upgradeStrategy = upgradeStrategy; - return this; - } - - /** - * Get the upgradeSettings property: Settings for upgrading the agentpool. Applies when upgrade strategy is set to - * Rolling. + * Get the upgradeSettings property: Settings for upgrading the agentpool. * * @return the upgradeSettings value. */ @@ -975,8 +919,7 @@ public AgentPoolUpgradeSettings upgradeSettings() { } /** - * Set the upgradeSettings property: Settings for upgrading the agentpool. Applies when upgrade strategy is set to - * Rolling. + * Set the upgradeSettings property: Settings for upgrading the agentpool. * * @param upgradeSettings the upgradeSettings value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. @@ -986,29 +929,6 @@ public ManagedClusterAgentPoolProfileProperties withUpgradeSettings(AgentPoolUpg return this; } - /** - * Get the upgradeSettingsBlueGreen property: Settings for Blue-Green upgrade on the agentpool. Applies when upgrade - * strategy is set to BlueGreen. - * - * @return the upgradeSettingsBlueGreen value. - */ - public AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen() { - return this.upgradeSettingsBlueGreen; - } - - /** - * Set the upgradeSettingsBlueGreen property: Settings for Blue-Green upgrade on the agentpool. Applies when upgrade - * strategy is set to BlueGreen. - * - * @param upgradeSettingsBlueGreen the upgradeSettingsBlueGreen value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties - withUpgradeSettingsBlueGreen(AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen) { - this.upgradeSettingsBlueGreen = upgradeSettingsBlueGreen; - return this; - } - /** * Get the provisioningState property: The current deployment or provisioning state. * @@ -1266,37 +1186,6 @@ public ManagedClusterAgentPoolProfileProperties withNodeTaints(List<String> node return this; } - /** - * Get the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled - * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be - * modified after node pool is created, but nodes will not be recreated with new taints until another operation that - * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run - * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with - * `kubectl taint nodes node1 key1=value1:NoSchedule-`. - * - * @return the nodeInitializationTaints value. - */ - public List<String> nodeInitializationTaints() { - return this.nodeInitializationTaints; - } - - /** - * Set the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled - * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be - * modified after node pool is created, but nodes will not be recreated with new taints until another operation that - * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run - * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with - * `kubectl taint nodes node1 key1=value1:NoSchedule-`. - * - * @param nodeInitializationTaints the nodeInitializationTaints value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties - withNodeInitializationTaints(List<String> nodeInitializationTaints) { - this.nodeInitializationTaints = nodeInitializationTaints; - return this; - } - /** * Get the proximityPlacementGroupId property: The ID for Proximity Placement Group. * @@ -1520,42 +1409,42 @@ public ManagedClusterAgentPoolProfileProperties withHostGroupId(String hostGroup } /** - * Get the windowsProfile property: The Windows agent pool's specific profile. + * Get the networkProfile property: Network-related settings of an agent pool. * - * @return the windowsProfile value. + * @return the networkProfile value. */ - public AgentPoolWindowsProfile windowsProfile() { - return this.windowsProfile; + public AgentPoolNetworkProfile networkProfile() { + return this.networkProfile; } /** - * Set the windowsProfile property: The Windows agent pool's specific profile. + * Set the networkProfile property: Network-related settings of an agent pool. * - * @param windowsProfile the windowsProfile value to set. + * @param networkProfile the networkProfile value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. */ - public ManagedClusterAgentPoolProfileProperties withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { - this.windowsProfile = windowsProfile; + public ManagedClusterAgentPoolProfileProperties withNetworkProfile(AgentPoolNetworkProfile networkProfile) { + this.networkProfile = networkProfile; return this; } /** - * Get the networkProfile property: Network-related settings of an agent pool. + * Get the windowsProfile property: The Windows agent pool's specific profile. * - * @return the networkProfile value. + * @return the windowsProfile value. */ - public AgentPoolNetworkProfile networkProfile() { - return this.networkProfile; + public AgentPoolWindowsProfile windowsProfile() { + return this.windowsProfile; } /** - * Set the networkProfile property: Network-related settings of an agent pool. + * Set the windowsProfile property: The Windows agent pool's specific profile. * - * @param networkProfile the networkProfile value to set. + * @param windowsProfile the windowsProfile value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. */ - public ManagedClusterAgentPoolProfileProperties withNetworkProfile(AgentPoolNetworkProfile networkProfile) { - this.networkProfile = networkProfile; + public ManagedClusterAgentPoolProfileProperties withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { + this.windowsProfile = windowsProfile; return this; } @@ -1580,7 +1469,7 @@ public ManagedClusterAgentPoolProfileProperties withSecurityProfile(AgentPoolSec } /** - * Get the gpuProfile property: The GPU settings of an agent pool. + * Get the gpuProfile property: GPU settings for the Agent Pool. * * @return the gpuProfile value. */ @@ -1589,7 +1478,7 @@ public GpuProfile gpuProfile() { } /** - * Set the gpuProfile property: The GPU settings of an agent pool. + * Set the gpuProfile property: GPU settings for the Agent Pool. * * @param gpuProfile the gpuProfile value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. @@ -1600,23 +1489,24 @@ public ManagedClusterAgentPoolProfileProperties withGpuProfile(GpuProfile gpuPro } /** - * Get the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * Get the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be + * set if agent pool mode is not Gateway. * - * @return the artifactStreamingProfile value. + * @return the gatewayProfile value. */ - public AgentPoolArtifactStreamingProfile artifactStreamingProfile() { - return this.artifactStreamingProfile; + public AgentPoolGatewayProfile gatewayProfile() { + return this.gatewayProfile; } /** - * Set the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * Set the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be + * set if agent pool mode is not Gateway. * - * @param artifactStreamingProfile the artifactStreamingProfile value to set. + * @param gatewayProfile the gatewayProfile value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. */ - public ManagedClusterAgentPoolProfileProperties - withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile) { - this.artifactStreamingProfile = artifactStreamingProfile; + public ManagedClusterAgentPoolProfileProperties withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { + this.gatewayProfile = gatewayProfile; return this; } @@ -1662,28 +1552,6 @@ public List<VirtualMachineNodes> virtualMachineNodesStatus() { return this; } - /** - * Get the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be - * set if agent pool mode is not Gateway. - * - * @return the gatewayProfile value. - */ - public AgentPoolGatewayProfile gatewayProfile() { - return this.gatewayProfile; - } - - /** - * Set the gatewayProfile property: Profile specific to a managed agent pool in Gateway mode. This field cannot be - * set if agent pool mode is not Gateway. - * - * @param gatewayProfile the gatewayProfile value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { - this.gatewayProfile = gatewayProfile; - return this; - } - /** * Get the status property: Contains read-only information about the Agent Pool. * @@ -1728,29 +1596,6 @@ public ManagedClusterAgentPoolProfileProperties withLocalDnsProfile(LocalDnsProf return this; } - /** - * Get the nodeCustomizationProfile property: Settings to determine the node customization used to provision nodes - * in a pool. - * - * @return the nodeCustomizationProfile value. - */ - public NodeCustomizationProfile nodeCustomizationProfile() { - return this.nodeCustomizationProfile; - } - - /** - * Set the nodeCustomizationProfile property: Settings to determine the node customization used to provision nodes - * in a pool. - * - * @param nodeCustomizationProfile the nodeCustomizationProfile value to set. - * @return the ManagedClusterAgentPoolProfileProperties object itself. - */ - public ManagedClusterAgentPoolProfileProperties - withNodeCustomizationProfile(NodeCustomizationProfile nodeCustomizationProfile) { - this.nodeCustomizationProfile = nodeCustomizationProfile; - return this; - } - /** * Validates the instance. * @@ -1760,9 +1605,6 @@ public void validate() { if (upgradeSettings() != null) { upgradeSettings().validate(); } - if (upgradeSettingsBlueGreen() != null) { - upgradeSettingsBlueGreen().validate(); - } if (powerState() != null) { powerState().validate(); } @@ -1775,20 +1617,20 @@ public void validate() { if (creationData() != null) { creationData().validate(); } - if (windowsProfile() != null) { - windowsProfile().validate(); - } if (networkProfile() != null) { networkProfile().validate(); } + if (windowsProfile() != null) { + windowsProfile().validate(); + } if (securityProfile() != null) { securityProfile().validate(); } if (gpuProfile() != null) { gpuProfile().validate(); } - if (artifactStreamingProfile() != null) { - artifactStreamingProfile().validate(); + if (gatewayProfile() != null) { + gatewayProfile().validate(); } if (virtualMachinesProfile() != null) { virtualMachinesProfile().validate(); @@ -1796,18 +1638,12 @@ public void validate() { if (virtualMachineNodesStatus() != null) { virtualMachineNodesStatus().forEach(e -> e.validate()); } - if (gatewayProfile() != null) { - gatewayProfile().validate(); - } if (status() != null) { status().validate(); } if (localDnsProfile() != null) { localDnsProfile().validate(); } - if (nodeCustomizationProfile() != null) { - nodeCustomizationProfile().validate(); - } } /** @@ -1839,11 +1675,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); jsonWriter.writeStringField("orchestratorVersion", this.orchestratorVersion); - jsonWriter.writeStringField("nodeImageVersion", this.nodeImageVersion); - jsonWriter.writeStringField("upgradeStrategy", - this.upgradeStrategy == null ? null : this.upgradeStrategy.toString()); jsonWriter.writeJsonField("upgradeSettings", this.upgradeSettings); - jsonWriter.writeJsonField("upgradeSettingsBlueGreen", this.upgradeSettingsBlueGreen); jsonWriter.writeJsonField("powerState", this.powerState); jsonWriter.writeArrayField("availabilityZones", this.availabilityZones, (writer, element) -> writer.writeString(element)); @@ -1857,8 +1689,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("nodeLabels", this.nodeLabels, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("nodeTaints", this.nodeTaints, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("nodeInitializationTaints", this.nodeInitializationTaints, - (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("proximityPlacementGroupID", this.proximityPlacementGroupId); jsonWriter.writeJsonField("kubeletConfig", this.kubeletConfig); jsonWriter.writeJsonField("linuxOSConfig", this.linuxOSConfig); @@ -1870,18 +1700,16 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("creationData", this.creationData); jsonWriter.writeStringField("capacityReservationGroupID", this.capacityReservationGroupId); jsonWriter.writeStringField("hostGroupID", this.hostGroupId); - jsonWriter.writeJsonField("windowsProfile", this.windowsProfile); jsonWriter.writeJsonField("networkProfile", this.networkProfile); + jsonWriter.writeJsonField("windowsProfile", this.windowsProfile); jsonWriter.writeJsonField("securityProfile", this.securityProfile); jsonWriter.writeJsonField("gpuProfile", this.gpuProfile); - jsonWriter.writeJsonField("artifactStreamingProfile", this.artifactStreamingProfile); + jsonWriter.writeJsonField("gatewayProfile", this.gatewayProfile); jsonWriter.writeJsonField("virtualMachinesProfile", this.virtualMachinesProfile); jsonWriter.writeArrayField("virtualMachineNodesStatus", this.virtualMachineNodesStatus, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("gatewayProfile", this.gatewayProfile); jsonWriter.writeJsonField("status", this.status); jsonWriter.writeJsonField("localDNSProfile", this.localDnsProfile); - jsonWriter.writeJsonField("nodeCustomizationProfile", this.nodeCustomizationProfile); return jsonWriter.writeEndObject(); } @@ -1960,15 +1788,9 @@ public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonR = reader.getString(); } else if ("nodeImageVersion".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.nodeImageVersion = reader.getString(); - } else if ("upgradeStrategy".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.upgradeStrategy - = UpgradeStrategy.fromString(reader.getString()); } else if ("upgradeSettings".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.upgradeSettings = AgentPoolUpgradeSettings.fromJson(reader); - } else if ("upgradeSettingsBlueGreen".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.upgradeSettingsBlueGreen - = AgentPoolBlueGreenUpgradeSettings.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.provisioningState = reader.getString(); } else if ("powerState".equals(fieldName)) { @@ -1999,10 +1821,6 @@ public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonR } else if ("nodeTaints".equals(fieldName)) { List<String> nodeTaints = reader.readArray(reader1 -> reader1.getString()); deserializedManagedClusterAgentPoolProfileProperties.nodeTaints = nodeTaints; - } else if ("nodeInitializationTaints".equals(fieldName)) { - List<String> nodeInitializationTaints = reader.readArray(reader1 -> reader1.getString()); - deserializedManagedClusterAgentPoolProfileProperties.nodeInitializationTaints - = nodeInitializationTaints; } else if ("proximityPlacementGroupID".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.proximityPlacementGroupId = reader.getString(); } else if ("kubeletConfig".equals(fieldName)) { @@ -2028,20 +1846,20 @@ public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonR = reader.getString(); } else if ("hostGroupID".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.hostGroupId = reader.getString(); - } else if ("windowsProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.windowsProfile - = AgentPoolWindowsProfile.fromJson(reader); } else if ("networkProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.networkProfile = AgentPoolNetworkProfile.fromJson(reader); + } else if ("windowsProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.windowsProfile + = AgentPoolWindowsProfile.fromJson(reader); } else if ("securityProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.securityProfile = AgentPoolSecurityProfile.fromJson(reader); } else if ("gpuProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.gpuProfile = GpuProfile.fromJson(reader); - } else if ("artifactStreamingProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.artifactStreamingProfile - = AgentPoolArtifactStreamingProfile.fromJson(reader); + } else if ("gatewayProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.gatewayProfile + = AgentPoolGatewayProfile.fromJson(reader); } else if ("virtualMachinesProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.virtualMachinesProfile = VirtualMachinesProfile.fromJson(reader); @@ -2050,17 +1868,11 @@ public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonR = reader.readArray(reader1 -> VirtualMachineNodes.fromJson(reader1)); deserializedManagedClusterAgentPoolProfileProperties.virtualMachineNodesStatus = virtualMachineNodesStatus; - } else if ("gatewayProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.gatewayProfile - = AgentPoolGatewayProfile.fromJson(reader); } else if ("status".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.status = AgentPoolStatus.fromJson(reader); } else if ("localDNSProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.localDnsProfile = LocalDnsProfile.fromJson(reader); - } else if ("nodeCustomizationProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfileProperties.nodeCustomizationProfile - = NodeCustomizationProfile.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java index ab8f77b4ba2f..8a1a490a1922 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java @@ -13,7 +13,6 @@ import com.azure.resourcemanager.containerservice.models.ClusterUpgradeSettings; import com.azure.resourcemanager.containerservice.models.ContainerServiceLinuxProfile; import com.azure.resourcemanager.containerservice.models.ContainerServiceNetworkProfile; -import com.azure.resourcemanager.containerservice.models.CreationData; import com.azure.resourcemanager.containerservice.models.ExtendedLocation; import com.azure.resourcemanager.containerservice.models.KubernetesSupportPlan; import com.azure.resourcemanager.containerservice.models.ManagedClusterAIToolchainOperatorProfile; @@ -24,7 +23,6 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterAutoUpgradeProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAzureMonitorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterBootstrapProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterHostedSystemProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterHttpProxyConfig; import com.azure.resourcemanager.containerservice.models.ManagedClusterIdentity; import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfile; @@ -43,7 +41,6 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterWorkloadAutoScalerProfile; import com.azure.resourcemanager.containerservice.models.PowerState; import com.azure.resourcemanager.containerservice.models.PublicNetworkAccess; -import com.azure.resourcemanager.containerservice.models.SchedulerProfile; import com.azure.resourcemanager.containerservice.models.ServiceMeshProfile; import com.azure.resourcemanager.containerservice.models.UserAssignedIdentity; import java.io.IOException; @@ -290,31 +287,6 @@ public PowerState powerState() { return this.innerProperties() == null ? null : this.innerProperties().powerState(); } - /** - * Get the creationData property: CreationData to be used to specify the source Snapshot ID if the cluster will be - * created/upgraded using a snapshot. - * - * @return the creationData value. - */ - public CreationData creationData() { - return this.innerProperties() == null ? null : this.innerProperties().creationData(); - } - - /** - * Set the creationData property: CreationData to be used to specify the source Snapshot ID if the cluster will be - * created/upgraded using a snapshot. - * - * @param creationData the creationData value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withCreationData(CreationData creationData) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withCreationData(creationData); - return this; - } - /** * Get the maxAgentPools property: The max number of agent pools for the managed cluster. * @@ -325,11 +297,14 @@ public Integer maxAgentPools() { } /** - * Get the kubernetesVersion property: The version of Kubernetes the Managed Cluster is requested to run. When you - * upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed - * sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x - * are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS - * cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. + * Get the kubernetesVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When + * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the + * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an + * upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor + * versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, + * upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not + * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. * * @return the kubernetesVersion value. */ @@ -338,11 +313,14 @@ public String kubernetesVersion() { } /** - * Set the kubernetesVersion property: The version of Kubernetes the Managed Cluster is requested to run. When you - * upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed - * sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x - * are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS - * cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. + * Set the kubernetesVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When + * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the + * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an + * upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor + * versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, + * upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not + * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. * * @param kubernetesVersion the kubernetesVersion value to set. * @return the ManagedClusterInner object itself. @@ -356,7 +334,10 @@ public ManagedClusterInner withKubernetesVersion(String kubernetesVersion) { } /** - * Get the currentKubernetesVersion property: The version of Kubernetes the Managed Cluster is running. + * Get the currentKubernetesVersion property: The version of Kubernetes the Managed Cluster is running. If + * kubernetesVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If kubernetesVersion was <major.minor>, this field will contain the full <major.minor.patch> + * version being used. * * @return the currentKubernetesVersion value. */ @@ -636,7 +617,7 @@ public ManagedClusterInner withNodeResourceGroup(String nodeResourceGroup) { } /** - * Get the nodeResourceGroupProfile property: The node resource group configuration profile. + * Get the nodeResourceGroupProfile property: Profile of the node resource group configuration. * * @return the nodeResourceGroupProfile value. */ @@ -645,7 +626,7 @@ public ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile() { } /** - * Set the nodeResourceGroupProfile property: The node resource group configuration profile. + * Set the nodeResourceGroupProfile property: Profile of the node resource group configuration. * * @param nodeResourceGroupProfile the nodeResourceGroupProfile value to set. * @return the ManagedClusterInner object itself. @@ -707,35 +688,6 @@ public ManagedClusterInner withSupportPlan(KubernetesSupportPlan supportPlan) { return this; } - /** - * Get the enableNamespaceResources property: Enable namespace as Azure resource. The default value is false. It can - * be enabled/disabled on creation and updating of the managed cluster. See - * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM - * Resource. - * - * @return the enableNamespaceResources value. - */ - public Boolean enableNamespaceResources() { - return this.innerProperties() == null ? null : this.innerProperties().enableNamespaceResources(); - } - - /** - * Set the enableNamespaceResources property: Enable namespace as Azure resource. The default value is false. It can - * be enabled/disabled on creation and updating of the managed cluster. See - * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM - * Resource. - * - * @param enableNamespaceResources the enableNamespaceResources value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withEnableNamespaceResources(Boolean enableNamespaceResources) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withEnableNamespaceResources(enableNamespaceResources); - return this; - } - /** * Get the networkProfile property: The network configuration profile. * @@ -1124,7 +1076,7 @@ public ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile() { } /** - * Get the azureMonitorProfile property: Prometheus addon profile for the container service cluster. + * Get the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. * * @return the azureMonitorProfile value. */ @@ -1133,7 +1085,7 @@ public ManagedClusterAzureMonitorProfile azureMonitorProfile() { } /** - * Set the azureMonitorProfile property: Prometheus addon profile for the container service cluster. + * Set the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. * * @param azureMonitorProfile the azureMonitorProfile value to set. * @return the ManagedClusterInner object itself. @@ -1202,30 +1154,6 @@ public ManagedClusterInner withMetricsProfile(ManagedClusterMetricsProfile metri return this; } - /** - * Get the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. - * - * @return the aiToolchainOperatorProfile value. - */ - public ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile() { - return this.innerProperties() == null ? null : this.innerProperties().aiToolchainOperatorProfile(); - } - - /** - * Set the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. - * - * @param aiToolchainOperatorProfile the aiToolchainOperatorProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner - withAiToolchainOperatorProfile(ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withAiToolchainOperatorProfile(aiToolchainOperatorProfile); - return this; - } - /** * Get the nodeProvisioningProfile property: Node provisioning settings that apply to the whole cluster. * @@ -1274,50 +1202,26 @@ public ManagedClusterInner withBootstrapProfile(ManagedClusterBootstrapProfile b } /** - * Get the schedulerProfile property: Profile of the pod scheduler configuration. - * - * @return the schedulerProfile value. - */ - public SchedulerProfile schedulerProfile() { - return this.innerProperties() == null ? null : this.innerProperties().schedulerProfile(); - } - - /** - * Set the schedulerProfile property: Profile of the pod scheduler configuration. - * - * @param schedulerProfile the schedulerProfile value to set. - * @return the ManagedClusterInner object itself. - */ - public ManagedClusterInner withSchedulerProfile(SchedulerProfile schedulerProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterProperties(); - } - this.innerProperties().withSchedulerProfile(schedulerProfile); - return this; - } - - /** - * Get the hostedSystemProfile property: Settings for hosted system addons. For more information, see - * https://aka.ms/aks/automatic/systemcomponents. + * Get the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. * - * @return the hostedSystemProfile value. + * @return the aiToolchainOperatorProfile value. */ - public ManagedClusterHostedSystemProfile hostedSystemProfile() { - return this.innerProperties() == null ? null : this.innerProperties().hostedSystemProfile(); + public ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile() { + return this.innerProperties() == null ? null : this.innerProperties().aiToolchainOperatorProfile(); } /** - * Set the hostedSystemProfile property: Settings for hosted system addons. For more information, see - * https://aka.ms/aks/automatic/systemcomponents. + * Set the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. * - * @param hostedSystemProfile the hostedSystemProfile value to set. + * @param aiToolchainOperatorProfile the aiToolchainOperatorProfile value to set. * @return the ManagedClusterInner object itself. */ - public ManagedClusterInner withHostedSystemProfile(ManagedClusterHostedSystemProfile hostedSystemProfile) { + public ManagedClusterInner + withAiToolchainOperatorProfile(ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile) { if (this.innerProperties() == null) { this.innerProperties = new ManagedClusterProperties(); } - this.innerProperties().withHostedSystemProfile(hostedSystemProfile); + this.innerProperties().withAiToolchainOperatorProfile(aiToolchainOperatorProfile); return this; } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java index cef395af214b..2d3a5904c461 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java @@ -12,7 +12,6 @@ import com.azure.resourcemanager.containerservice.models.ClusterUpgradeSettings; import com.azure.resourcemanager.containerservice.models.ContainerServiceLinuxProfile; import com.azure.resourcemanager.containerservice.models.ContainerServiceNetworkProfile; -import com.azure.resourcemanager.containerservice.models.CreationData; import com.azure.resourcemanager.containerservice.models.KubernetesSupportPlan; import com.azure.resourcemanager.containerservice.models.ManagedClusterAIToolchainOperatorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; @@ -22,7 +21,6 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterAutoUpgradeProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAzureMonitorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterBootstrapProfile; -import com.azure.resourcemanager.containerservice.models.ManagedClusterHostedSystemProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterHttpProxyConfig; import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterMetricsProfile; @@ -39,7 +37,6 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterWorkloadAutoScalerProfile; import com.azure.resourcemanager.containerservice.models.PowerState; import com.azure.resourcemanager.containerservice.models.PublicNetworkAccess; -import com.azure.resourcemanager.containerservice.models.SchedulerProfile; import com.azure.resourcemanager.containerservice.models.ServiceMeshProfile; import com.azure.resourcemanager.containerservice.models.UserAssignedIdentity; import java.io.IOException; @@ -61,27 +58,27 @@ public final class ManagedClusterProperties implements JsonSerializable<ManagedC */ private PowerState powerState; - /* - * CreationData to be used to specify the source Snapshot ID if the cluster will be created/upgraded using a - * snapshot. - */ - private CreationData creationData; - /* * The max number of agent pools for the managed cluster. */ private Integer maxAgentPools; /* - * The version of Kubernetes the Managed Cluster is requested to run. When you upgrade a supported AKS cluster, - * Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. - * For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not - * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. + * The version of Kubernetes specified by the user. Both patch version <major.minor.patch> (e.g. 1.20.13) and + * <major.minor> (e.g. 1.20) are supported. When <major.minor> is specified, the latest supported GA patch version + * is chosen automatically. Updating the cluster with the same <major.minor> once it has been created (e.g. 1.14.x + * -> 1.14) will not trigger an upgrade, even if a newer patch version is available. When you upgrade a supported + * AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major + * version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> + * 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for + * more details. */ private String kubernetesVersion; /* - * The version of Kubernetes the Managed Cluster is running. + * The version of Kubernetes the Managed Cluster is running. If kubernetesVersion was a fully specified version + * <major.minor.patch>, this field will be exactly equal to it. If kubernetesVersion was <major.minor>, this field + * will contain the full <major.minor.patch> version being used. */ private String currentKubernetesVersion; @@ -157,7 +154,7 @@ public final class ManagedClusterProperties implements JsonSerializable<ManagedC private String nodeResourceGroup; /* - * The node resource group configuration profile. + * Profile of the node resource group configuration. */ private ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile; @@ -171,13 +168,6 @@ public final class ManagedClusterProperties implements JsonSerializable<ManagedC */ private KubernetesSupportPlan supportPlan; - /* - * Enable namespace as Azure resource. The default value is false. It can be enabled/disabled on creation and - * updating of the managed cluster. See [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) - * for more details on Namespace as a ARM Resource. - */ - private Boolean enableNamespaceResources; - /* * The network configuration profile. */ @@ -265,7 +255,7 @@ public final class ManagedClusterProperties implements JsonSerializable<ManagedC private ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile; /* - * Prometheus addon profile for the container service cluster + * Azure Monitor addon profiles for monitoring the managed cluster. */ private ManagedClusterAzureMonitorProfile azureMonitorProfile; @@ -285,11 +275,6 @@ public final class ManagedClusterProperties implements JsonSerializable<ManagedC */ private ManagedClusterMetricsProfile metricsProfile; - /* - * AI toolchain operator settings that apply to the whole cluster. - */ - private ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile; - /* * Node provisioning settings that apply to the whole cluster. */ @@ -301,14 +286,9 @@ public final class ManagedClusterProperties implements JsonSerializable<ManagedC private ManagedClusterBootstrapProfile bootstrapProfile; /* - * Profile of the pod scheduler configuration. - */ - private SchedulerProfile schedulerProfile; - - /* - * Settings for hosted system addons. For more information, see https://aka.ms/aks/automatic/systemcomponents. + * AI toolchain operator settings that apply to the whole cluster. */ - private ManagedClusterHostedSystemProfile hostedSystemProfile; + private ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile; /* * Contains read-only information about the Managed Cluster. @@ -339,28 +319,6 @@ public PowerState powerState() { return this.powerState; } - /** - * Get the creationData property: CreationData to be used to specify the source Snapshot ID if the cluster will be - * created/upgraded using a snapshot. - * - * @return the creationData value. - */ - public CreationData creationData() { - return this.creationData; - } - - /** - * Set the creationData property: CreationData to be used to specify the source Snapshot ID if the cluster will be - * created/upgraded using a snapshot. - * - * @param creationData the creationData value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withCreationData(CreationData creationData) { - this.creationData = creationData; - return this; - } - /** * Get the maxAgentPools property: The max number of agent pools for the managed cluster. * @@ -371,11 +329,14 @@ public Integer maxAgentPools() { } /** - * Get the kubernetesVersion property: The version of Kubernetes the Managed Cluster is requested to run. When you - * upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed - * sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x - * are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS - * cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. + * Get the kubernetesVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When + * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the + * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an + * upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor + * versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, + * upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not + * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. * * @return the kubernetesVersion value. */ @@ -384,11 +345,14 @@ public String kubernetesVersion() { } /** - * Set the kubernetesVersion property: The version of Kubernetes the Managed Cluster is requested to run. When you - * upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed - * sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x - * are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS - * cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. + * Set the kubernetesVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When + * <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the + * cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an + * upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor + * versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, + * upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not + * allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. * * @param kubernetesVersion the kubernetesVersion value to set. * @return the ManagedClusterProperties object itself. @@ -399,7 +363,10 @@ public ManagedClusterProperties withKubernetesVersion(String kubernetesVersion) } /** - * Get the currentKubernetesVersion property: The version of Kubernetes the Managed Cluster is running. + * Get the currentKubernetesVersion property: The version of Kubernetes the Managed Cluster is running. If + * kubernetesVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If kubernetesVersion was <major.minor>, this field will contain the full <major.minor.patch> + * version being used. * * @return the currentKubernetesVersion value. */ @@ -649,7 +616,7 @@ public ManagedClusterProperties withNodeResourceGroup(String nodeResourceGroup) } /** - * Get the nodeResourceGroupProfile property: The node resource group configuration profile. + * Get the nodeResourceGroupProfile property: Profile of the node resource group configuration. * * @return the nodeResourceGroupProfile value. */ @@ -658,7 +625,7 @@ public ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile() { } /** - * Set the nodeResourceGroupProfile property: The node resource group configuration profile. + * Set the nodeResourceGroupProfile property: Profile of the node resource group configuration. * * @param nodeResourceGroupProfile the nodeResourceGroupProfile value to set. * @return the ManagedClusterProperties object itself. @@ -711,32 +678,6 @@ public ManagedClusterProperties withSupportPlan(KubernetesSupportPlan supportPla return this; } - /** - * Get the enableNamespaceResources property: Enable namespace as Azure resource. The default value is false. It can - * be enabled/disabled on creation and updating of the managed cluster. See - * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM - * Resource. - * - * @return the enableNamespaceResources value. - */ - public Boolean enableNamespaceResources() { - return this.enableNamespaceResources; - } - - /** - * Set the enableNamespaceResources property: Enable namespace as Azure resource. The default value is false. It can - * be enabled/disabled on creation and updating of the managed cluster. See - * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM - * Resource. - * - * @param enableNamespaceResources the enableNamespaceResources value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withEnableNamespaceResources(Boolean enableNamespaceResources) { - this.enableNamespaceResources = enableNamespaceResources; - return this; - } - /** * Get the networkProfile property: The network configuration profile. * @@ -1078,7 +1019,7 @@ public ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile() { } /** - * Get the azureMonitorProfile property: Prometheus addon profile for the container service cluster. + * Get the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. * * @return the azureMonitorProfile value. */ @@ -1087,7 +1028,7 @@ public ManagedClusterAzureMonitorProfile azureMonitorProfile() { } /** - * Set the azureMonitorProfile property: Prometheus addon profile for the container service cluster. + * Set the azureMonitorProfile property: Azure Monitor addon profiles for monitoring the managed cluster. * * @param azureMonitorProfile the azureMonitorProfile value to set. * @return the ManagedClusterProperties object itself. @@ -1147,27 +1088,6 @@ public ManagedClusterProperties withMetricsProfile(ManagedClusterMetricsProfile return this; } - /** - * Get the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. - * - * @return the aiToolchainOperatorProfile value. - */ - public ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile() { - return this.aiToolchainOperatorProfile; - } - - /** - * Set the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. - * - * @param aiToolchainOperatorProfile the aiToolchainOperatorProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties - withAiToolchainOperatorProfile(ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile) { - this.aiToolchainOperatorProfile = aiToolchainOperatorProfile; - return this; - } - /** * Get the nodeProvisioningProfile property: Node provisioning settings that apply to the whole cluster. * @@ -1210,44 +1130,23 @@ public ManagedClusterProperties withBootstrapProfile(ManagedClusterBootstrapProf } /** - * Get the schedulerProfile property: Profile of the pod scheduler configuration. - * - * @return the schedulerProfile value. - */ - public SchedulerProfile schedulerProfile() { - return this.schedulerProfile; - } - - /** - * Set the schedulerProfile property: Profile of the pod scheduler configuration. - * - * @param schedulerProfile the schedulerProfile value to set. - * @return the ManagedClusterProperties object itself. - */ - public ManagedClusterProperties withSchedulerProfile(SchedulerProfile schedulerProfile) { - this.schedulerProfile = schedulerProfile; - return this; - } - - /** - * Get the hostedSystemProfile property: Settings for hosted system addons. For more information, see - * https://aka.ms/aks/automatic/systemcomponents. + * Get the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. * - * @return the hostedSystemProfile value. + * @return the aiToolchainOperatorProfile value. */ - public ManagedClusterHostedSystemProfile hostedSystemProfile() { - return this.hostedSystemProfile; + public ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile() { + return this.aiToolchainOperatorProfile; } /** - * Set the hostedSystemProfile property: Settings for hosted system addons. For more information, see - * https://aka.ms/aks/automatic/systemcomponents. + * Set the aiToolchainOperatorProfile property: AI toolchain operator settings that apply to the whole cluster. * - * @param hostedSystemProfile the hostedSystemProfile value to set. + * @param aiToolchainOperatorProfile the aiToolchainOperatorProfile value to set. * @return the ManagedClusterProperties object itself. */ - public ManagedClusterProperties withHostedSystemProfile(ManagedClusterHostedSystemProfile hostedSystemProfile) { - this.hostedSystemProfile = hostedSystemProfile; + public ManagedClusterProperties + withAiToolchainOperatorProfile(ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile) { + this.aiToolchainOperatorProfile = aiToolchainOperatorProfile; return this; } @@ -1280,9 +1179,6 @@ public void validate() { if (powerState() != null) { powerState().validate(); } - if (creationData() != null) { - creationData().validate(); - } if (agentPoolProfiles() != null) { agentPoolProfiles().forEach(e -> e.validate()); } @@ -1363,20 +1259,14 @@ public void validate() { if (metricsProfile() != null) { metricsProfile().validate(); } - if (aiToolchainOperatorProfile() != null) { - aiToolchainOperatorProfile().validate(); - } if (nodeProvisioningProfile() != null) { nodeProvisioningProfile().validate(); } if (bootstrapProfile() != null) { bootstrapProfile().validate(); } - if (schedulerProfile() != null) { - schedulerProfile().validate(); - } - if (hostedSystemProfile() != null) { - hostedSystemProfile().validate(); + if (aiToolchainOperatorProfile() != null) { + aiToolchainOperatorProfile().validate(); } if (status() != null) { status().validate(); @@ -1389,7 +1279,6 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("creationData", this.creationData); jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); jsonWriter.writeStringField("dnsPrefix", this.dnsPrefix); jsonWriter.writeStringField("fqdnSubdomain", this.fqdnSubdomain); @@ -1405,7 +1294,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("nodeResourceGroupProfile", this.nodeResourceGroupProfile); jsonWriter.writeBooleanField("enableRBAC", this.enableRbac); jsonWriter.writeStringField("supportPlan", this.supportPlan == null ? null : this.supportPlan.toString()); - jsonWriter.writeBooleanField("enableNamespaceResources", this.enableNamespaceResources); jsonWriter.writeJsonField("networkProfile", this.networkProfile); jsonWriter.writeJsonField("aadProfile", this.aadProfile); jsonWriter.writeJsonField("autoUpgradeProfile", this.autoUpgradeProfile); @@ -1428,11 +1316,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("azureMonitorProfile", this.azureMonitorProfile); jsonWriter.writeJsonField("serviceMeshProfile", this.serviceMeshProfile); jsonWriter.writeJsonField("metricsProfile", this.metricsProfile); - jsonWriter.writeJsonField("aiToolchainOperatorProfile", this.aiToolchainOperatorProfile); jsonWriter.writeJsonField("nodeProvisioningProfile", this.nodeProvisioningProfile); jsonWriter.writeJsonField("bootstrapProfile", this.bootstrapProfile); - jsonWriter.writeJsonField("schedulerProfile", this.schedulerProfile); - jsonWriter.writeJsonField("hostedSystemProfile", this.hostedSystemProfile); + jsonWriter.writeJsonField("aiToolchainOperatorProfile", this.aiToolchainOperatorProfile); jsonWriter.writeJsonField("status", this.status); return jsonWriter.writeEndObject(); } @@ -1456,8 +1342,6 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO deserializedManagedClusterProperties.provisioningState = reader.getString(); } else if ("powerState".equals(fieldName)) { deserializedManagedClusterProperties.powerState = PowerState.fromJson(reader); - } else if ("creationData".equals(fieldName)) { - deserializedManagedClusterProperties.creationData = CreationData.fromJson(reader); } else if ("maxAgentPools".equals(fieldName)) { deserializedManagedClusterProperties.maxAgentPools = reader.getNullable(JsonReader::getInt); } else if ("kubernetesVersion".equals(fieldName)) { @@ -1505,9 +1389,6 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO } else if ("supportPlan".equals(fieldName)) { deserializedManagedClusterProperties.supportPlan = KubernetesSupportPlan.fromString(reader.getString()); - } else if ("enableNamespaceResources".equals(fieldName)) { - deserializedManagedClusterProperties.enableNamespaceResources - = reader.getNullable(JsonReader::getBoolean); } else if ("networkProfile".equals(fieldName)) { deserializedManagedClusterProperties.networkProfile = ContainerServiceNetworkProfile.fromJson(reader); @@ -1562,20 +1443,15 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO deserializedManagedClusterProperties.resourceUid = reader.getString(); } else if ("metricsProfile".equals(fieldName)) { deserializedManagedClusterProperties.metricsProfile = ManagedClusterMetricsProfile.fromJson(reader); - } else if ("aiToolchainOperatorProfile".equals(fieldName)) { - deserializedManagedClusterProperties.aiToolchainOperatorProfile - = ManagedClusterAIToolchainOperatorProfile.fromJson(reader); } else if ("nodeProvisioningProfile".equals(fieldName)) { deserializedManagedClusterProperties.nodeProvisioningProfile = ManagedClusterNodeProvisioningProfile.fromJson(reader); } else if ("bootstrapProfile".equals(fieldName)) { deserializedManagedClusterProperties.bootstrapProfile = ManagedClusterBootstrapProfile.fromJson(reader); - } else if ("schedulerProfile".equals(fieldName)) { - deserializedManagedClusterProperties.schedulerProfile = SchedulerProfile.fromJson(reader); - } else if ("hostedSystemProfile".equals(fieldName)) { - deserializedManagedClusterProperties.hostedSystemProfile - = ManagedClusterHostedSystemProfile.fromJson(reader); + } else if ("aiToolchainOperatorProfile".equals(fieldName)) { + deserializedManagedClusterProperties.aiToolchainOperatorProfile + = ManagedClusterAIToolchainOperatorProfile.fromJson(reader); } else if ("status".equals(fieldName)) { deserializedManagedClusterProperties.status = ManagedClusterStatus.fromJson(reader); } else { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotInner.java deleted file mode 100644 index fd06a6dfebc5..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotInner.java +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.CreationData; -import com.azure.resourcemanager.containerservice.models.ManagedClusterPropertiesForSnapshot; -import com.azure.resourcemanager.containerservice.models.SnapshotType; -import java.io.IOException; -import java.util.Map; - -/** - * A managed cluster snapshot resource. - */ -@Fluent -public final class ManagedClusterSnapshotInner extends Resource { - /* - * Properties of a managed cluster snapshot. - */ - private ManagedClusterSnapshotProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ManagedClusterSnapshotInner class. - */ - public ManagedClusterSnapshotInner() { - } - - /** - * Get the innerProperties property: Properties of a managed cluster snapshot. - * - * @return the innerProperties value. - */ - private ManagedClusterSnapshotProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterSnapshotInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterSnapshotInner withTags(Map<String, String> tags) { - super.withTags(tags); - return this; - } - - /** - * Get the creationData property: CreationData to be used to specify the source resource ID to create this snapshot. - * - * @return the creationData value. - */ - public CreationData creationData() { - return this.innerProperties() == null ? null : this.innerProperties().creationData(); - } - - /** - * Set the creationData property: CreationData to be used to specify the source resource ID to create this snapshot. - * - * @param creationData the creationData value to set. - * @return the ManagedClusterSnapshotInner object itself. - */ - public ManagedClusterSnapshotInner withCreationData(CreationData creationData) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterSnapshotProperties(); - } - this.innerProperties().withCreationData(creationData); - return this; - } - - /** - * Get the snapshotType property: The type of a snapshot. The default is NodePool. - * - * @return the snapshotType value. - */ - public SnapshotType snapshotType() { - return this.innerProperties() == null ? null : this.innerProperties().snapshotType(); - } - - /** - * Set the snapshotType property: The type of a snapshot. The default is NodePool. - * - * @param snapshotType the snapshotType value to set. - * @return the ManagedClusterSnapshotInner object itself. - */ - public ManagedClusterSnapshotInner withSnapshotType(SnapshotType snapshotType) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterSnapshotProperties(); - } - this.innerProperties().withSnapshotType(snapshotType); - return this; - } - - /** - * Get the managedClusterPropertiesReadOnly property: What the properties will be showed when getting managed - * cluster snapshot. Those properties are read-only. - * - * @return the managedClusterPropertiesReadOnly value. - */ - public ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly() { - return this.innerProperties() == null ? null : this.innerProperties().managedClusterPropertiesReadOnly(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterSnapshotInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterSnapshotInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedClusterSnapshotInner. - */ - public static ManagedClusterSnapshotInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterSnapshotInner deserializedManagedClusterSnapshotInner = new ManagedClusterSnapshotInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedManagedClusterSnapshotInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedManagedClusterSnapshotInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedManagedClusterSnapshotInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedManagedClusterSnapshotInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedClusterSnapshotInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedManagedClusterSnapshotInner.innerProperties - = ManagedClusterSnapshotProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedClusterSnapshotInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterSnapshotInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotProperties.java deleted file mode 100644 index d977923de150..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotProperties.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.CreationData; -import com.azure.resourcemanager.containerservice.models.ManagedClusterPropertiesForSnapshot; -import com.azure.resourcemanager.containerservice.models.SnapshotType; -import java.io.IOException; - -/** - * Properties for a managed cluster snapshot. - */ -@Fluent -public final class ManagedClusterSnapshotProperties implements JsonSerializable<ManagedClusterSnapshotProperties> { - /* - * CreationData to be used to specify the source resource ID to create this snapshot. - */ - private CreationData creationData; - - /* - * The type of a snapshot. The default is NodePool. - */ - private SnapshotType snapshotType; - - /* - * What the properties will be showed when getting managed cluster snapshot. Those properties are read-only. - */ - private ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly; - - /** - * Creates an instance of ManagedClusterSnapshotProperties class. - */ - public ManagedClusterSnapshotProperties() { - } - - /** - * Get the creationData property: CreationData to be used to specify the source resource ID to create this snapshot. - * - * @return the creationData value. - */ - public CreationData creationData() { - return this.creationData; - } - - /** - * Set the creationData property: CreationData to be used to specify the source resource ID to create this snapshot. - * - * @param creationData the creationData value to set. - * @return the ManagedClusterSnapshotProperties object itself. - */ - public ManagedClusterSnapshotProperties withCreationData(CreationData creationData) { - this.creationData = creationData; - return this; - } - - /** - * Get the snapshotType property: The type of a snapshot. The default is NodePool. - * - * @return the snapshotType value. - */ - public SnapshotType snapshotType() { - return this.snapshotType; - } - - /** - * Set the snapshotType property: The type of a snapshot. The default is NodePool. - * - * @param snapshotType the snapshotType value to set. - * @return the ManagedClusterSnapshotProperties object itself. - */ - public ManagedClusterSnapshotProperties withSnapshotType(SnapshotType snapshotType) { - this.snapshotType = snapshotType; - return this; - } - - /** - * Get the managedClusterPropertiesReadOnly property: What the properties will be showed when getting managed - * cluster snapshot. Those properties are read-only. - * - * @return the managedClusterPropertiesReadOnly value. - */ - public ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly() { - return this.managedClusterPropertiesReadOnly; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (creationData() != null) { - creationData().validate(); - } - if (managedClusterPropertiesReadOnly() != null) { - managedClusterPropertiesReadOnly().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("creationData", this.creationData); - jsonWriter.writeStringField("snapshotType", this.snapshotType == null ? null : this.snapshotType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterSnapshotProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterSnapshotProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedClusterSnapshotProperties. - */ - public static ManagedClusterSnapshotProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterSnapshotProperties deserializedManagedClusterSnapshotProperties - = new ManagedClusterSnapshotProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("creationData".equals(fieldName)) { - deserializedManagedClusterSnapshotProperties.creationData = CreationData.fromJson(reader); - } else if ("snapshotType".equals(fieldName)) { - deserializedManagedClusterSnapshotProperties.snapshotType - = SnapshotType.fromString(reader.getString()); - } else if ("managedClusterPropertiesReadOnly".equals(fieldName)) { - deserializedManagedClusterSnapshotProperties.managedClusterPropertiesReadOnly - = ManagedClusterPropertiesForSnapshot.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterSnapshotProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshMembershipInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshMembershipInner.java deleted file mode 100644 index 051c41567de4..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshMembershipInner.java +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.MeshMembershipProperties; -import java.io.IOException; - -/** - * Mesh membership of a managed cluster. - */ -@Fluent -public final class MeshMembershipInner extends ProxyResource { - /* - * The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed - * by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is - * removed from the template since it is managed by another resource. - */ - private String managedBy; - - /* - * Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is - * updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable - * optimistic concurrency per the normal eTag convention. - */ - private String etag; - - /* - * Mesh membership properties of a managed cluster. - */ - private MeshMembershipProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of MeshMembershipInner class. - */ - public MeshMembershipInner() { - } - - /** - * Get the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates - * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not - * delete the resource if it is removed from the template since it is managed by another resource. - * - * @return the managedBy value. - */ - public String managedBy() { - return this.managedBy; - } - - /** - * Set the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates - * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not - * delete the resource if it is removed from the template since it is managed by another resource. - * - * @param managedBy the managedBy value to set. - * @return the MeshMembershipInner object itself. - */ - public MeshMembershipInner withManagedBy(String managedBy) { - this.managedBy = managedBy; - return this; - } - - /** - * Get the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will - * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a - * subsequent request to enable optimistic concurrency per the normal eTag convention. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the properties property: Mesh membership properties of a managed cluster. - * - * @return the properties value. - */ - public MeshMembershipProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Mesh membership properties of a managed cluster. - * - * @param properties the properties value to set. - * @return the MeshMembershipInner object itself. - */ - public MeshMembershipInner withProperties(MeshMembershipProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("managedBy", this.managedBy); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MeshMembershipInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MeshMembershipInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MeshMembershipInner. - */ - public static MeshMembershipInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MeshMembershipInner deserializedMeshMembershipInner = new MeshMembershipInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedMeshMembershipInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedMeshMembershipInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedMeshMembershipInner.type = reader.getString(); - } else if ("managedBy".equals(fieldName)) { - deserializedMeshMembershipInner.managedBy = reader.getString(); - } else if ("eTag".equals(fieldName)) { - deserializedMeshMembershipInner.etag = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedMeshMembershipInner.properties = MeshMembershipProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedMeshMembershipInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMeshMembershipInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/NodeImageVersionInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/NodeImageVersionInner.java deleted file mode 100644 index 2b958e625f33..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/NodeImageVersionInner.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * node image version profile for given major.minor.patch release. - */ -@Fluent -public final class NodeImageVersionInner implements JsonSerializable<NodeImageVersionInner> { - /* - * The operating system of the node image. Example: AKSUbuntu - */ - private String os; - - /* - * The SKU or flavor of the node image. Example: 2004gen2containerd - */ - private String sku; - - /* - * major.minor.patch version of the node image version release. Example: 2024.02.02 - */ - private String version; - - /* - * The OS + SKU + version of the node image. Example: AKSUbuntu-1804gen2containerd-2024.02.02 - */ - private String fullName; - - /** - * Creates an instance of NodeImageVersionInner class. - */ - public NodeImageVersionInner() { - } - - /** - * Get the os property: The operating system of the node image. Example: AKSUbuntu. - * - * @return the os value. - */ - public String os() { - return this.os; - } - - /** - * Set the os property: The operating system of the node image. Example: AKSUbuntu. - * - * @param os the os value to set. - * @return the NodeImageVersionInner object itself. - */ - public NodeImageVersionInner withOs(String os) { - this.os = os; - return this; - } - - /** - * Get the sku property: The SKU or flavor of the node image. Example: 2004gen2containerd. - * - * @return the sku value. - */ - public String sku() { - return this.sku; - } - - /** - * Set the sku property: The SKU or flavor of the node image. Example: 2004gen2containerd. - * - * @param sku the sku value to set. - * @return the NodeImageVersionInner object itself. - */ - public NodeImageVersionInner withSku(String sku) { - this.sku = sku; - return this; - } - - /** - * Get the version property: major.minor.patch version of the node image version release. Example: 2024.02.02. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: major.minor.patch version of the node image version release. Example: 2024.02.02. - * - * @param version the version value to set. - * @return the NodeImageVersionInner object itself. - */ - public NodeImageVersionInner withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the fullName property: The OS + SKU + version of the node image. Example: - * AKSUbuntu-1804gen2containerd-2024.02.02. - * - * @return the fullName value. - */ - public String fullName() { - return this.fullName; - } - - /** - * Set the fullName property: The OS + SKU + version of the node image. Example: - * AKSUbuntu-1804gen2containerd-2024.02.02. - * - * @param fullName the fullName value to set. - * @return the NodeImageVersionInner object itself. - */ - public NodeImageVersionInner withFullName(String fullName) { - this.fullName = fullName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("os", this.os); - jsonWriter.writeStringField("sku", this.sku); - jsonWriter.writeStringField("version", this.version); - jsonWriter.writeStringField("fullName", this.fullName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NodeImageVersionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NodeImageVersionInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the NodeImageVersionInner. - */ - public static NodeImageVersionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NodeImageVersionInner deserializedNodeImageVersionInner = new NodeImageVersionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("os".equals(fieldName)) { - deserializedNodeImageVersionInner.os = reader.getString(); - } else if ("sku".equals(fieldName)) { - deserializedNodeImageVersionInner.sku = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedNodeImageVersionInner.version = reader.getString(); - } else if ("fullName".equals(fieldName)) { - deserializedNodeImageVersionInner.fullName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNodeImageVersionInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationStatusResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationStatusResultInner.java deleted file mode 100644 index 60efc41645de..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationStatusResultInner.java +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; - -/** - * The current status of an async operation. - */ -@Fluent -public final class OperationStatusResultInner implements JsonSerializable<OperationStatusResultInner> { - /* - * Fully qualified ID for the async operation. - */ - private String id; - - /* - * Fully qualified ID of the resource against which the original async operation was started. - */ - private String resourceId; - - /* - * Name of the async operation. - */ - private String name; - - /* - * Operation status. - */ - private String status; - - /* - * Percent of the operation that is complete. - */ - private Float percentComplete; - - /* - * The start time of the operation. - */ - private OffsetDateTime startTime; - - /* - * The end time of the operation. - */ - private OffsetDateTime endTime; - - /* - * The operations list. - */ - private List<OperationStatusResultInner> operations; - - /* - * If present, details of the operation error. - */ - private ManagementError error; - - /** - * Creates an instance of OperationStatusResultInner class. - */ - public OperationStatusResultInner() { - } - - /** - * Get the id property: Fully qualified ID for the async operation. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Fully qualified ID for the async operation. - * - * @param id the id value to set. - * @return the OperationStatusResultInner object itself. - */ - public OperationStatusResultInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was - * started. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Get the name property: Name of the async operation. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the async operation. - * - * @param name the name value to set. - * @return the OperationStatusResultInner object itself. - */ - public OperationStatusResultInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the status property: Operation status. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Set the status property: Operation status. - * - * @param status the status value to set. - * @return the OperationStatusResultInner object itself. - */ - public OperationStatusResultInner withStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the percentComplete property: Percent of the operation that is complete. - * - * @return the percentComplete value. - */ - public Float percentComplete() { - return this.percentComplete; - } - - /** - * Set the percentComplete property: Percent of the operation that is complete. - * - * @param percentComplete the percentComplete value to set. - * @return the OperationStatusResultInner object itself. - */ - public OperationStatusResultInner withPercentComplete(Float percentComplete) { - this.percentComplete = percentComplete; - return this; - } - - /** - * Get the startTime property: The start time of the operation. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: The start time of the operation. - * - * @param startTime the startTime value to set. - * @return the OperationStatusResultInner object itself. - */ - public OperationStatusResultInner withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime property: The end time of the operation. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: The end time of the operation. - * - * @param endTime the endTime value to set. - * @return the OperationStatusResultInner object itself. - */ - public OperationStatusResultInner withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the operations property: The operations list. - * - * @return the operations value. - */ - public List<OperationStatusResultInner> operations() { - return this.operations; - } - - /** - * Set the operations property: The operations list. - * - * @param operations the operations value to set. - * @return the OperationStatusResultInner object itself. - */ - public OperationStatusResultInner withOperations(List<OperationStatusResultInner> operations) { - this.operations = operations; - return this; - } - - /** - * Get the error property: If present, details of the operation error. - * - * @return the error value. - */ - public ManagementError error() { - return this.error; - } - - /** - * Set the error property: If present, details of the operation error. - * - * @param error the error value to set. - * @return the OperationStatusResultInner object itself. - */ - public OperationStatusResultInner withError(ManagementError error) { - this.error = error; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (status() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property status in model OperationStatusResultInner")); - } - if (operations() != null) { - operations().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OperationStatusResultInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeNumberField("percentComplete", this.percentComplete); - jsonWriter.writeStringField("startTime", - this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); - jsonWriter.writeStringField("endTime", - this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); - jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("error", this.error); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationStatusResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationStatusResultInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OperationStatusResultInner. - */ - public static OperationStatusResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationStatusResultInner deserializedOperationStatusResultInner = new OperationStatusResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedOperationStatusResultInner.status = reader.getString(); - } else if ("id".equals(fieldName)) { - deserializedOperationStatusResultInner.id = reader.getString(); - } else if ("resourceId".equals(fieldName)) { - deserializedOperationStatusResultInner.resourceId = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedOperationStatusResultInner.name = reader.getString(); - } else if ("percentComplete".equals(fieldName)) { - deserializedOperationStatusResultInner.percentComplete = reader.getNullable(JsonReader::getFloat); - } else if ("startTime".equals(fieldName)) { - deserializedOperationStatusResultInner.startTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("endTime".equals(fieldName)) { - deserializedOperationStatusResultInner.endTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("operations".equals(fieldName)) { - List<OperationStatusResultInner> operations - = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); - deserializedOperationStatusResultInner.operations = operations; - } else if ("error".equals(fieldName)) { - deserializedOperationStatusResultInner.error = ManagementError.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationStatusResultInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SafeguardsAvailableVersionInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SafeguardsAvailableVersionInner.java deleted file mode 100644 index a2de612e5b19..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SafeguardsAvailableVersionInner.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.models.SafeguardsAvailableVersionsProperties; -import java.io.IOException; - -/** - * Available Safeguards Version. - */ -@Fluent -public final class SafeguardsAvailableVersionInner extends ProxyResource { - /* - * Whether the version is default or not and support info. - */ - private SafeguardsAvailableVersionsProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of SafeguardsAvailableVersionInner class. - */ - public SafeguardsAvailableVersionInner() { - } - - /** - * Get the properties property: Whether the version is default or not and support info. - * - * @return the properties value. - */ - public SafeguardsAvailableVersionsProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Whether the version is default or not and support info. - * - * @param properties the properties value to set. - * @return the SafeguardsAvailableVersionInner object itself. - */ - public SafeguardsAvailableVersionInner withProperties(SafeguardsAvailableVersionsProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model SafeguardsAvailableVersionInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SafeguardsAvailableVersionInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SafeguardsAvailableVersionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SafeguardsAvailableVersionInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SafeguardsAvailableVersionInner. - */ - public static SafeguardsAvailableVersionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SafeguardsAvailableVersionInner deserializedSafeguardsAvailableVersionInner - = new SafeguardsAvailableVersionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedSafeguardsAvailableVersionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedSafeguardsAvailableVersionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedSafeguardsAvailableVersionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedSafeguardsAvailableVersionInner.properties - = SafeguardsAvailableVersionsProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedSafeguardsAvailableVersionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSafeguardsAvailableVersionInner; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java index da39cf8be25d..70b300a40509 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java @@ -195,9 +195,9 @@ public OSType osType() { } /** - * Get the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if - * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after - * Windows2019 is deprecated. + * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. * * @return the osSku value. */ diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java index ebeef6c8b15a..dc9593d1697f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java @@ -46,9 +46,8 @@ public final class SnapshotProperties implements JsonSerializable<SnapshotProper private OSType osType; /* - * Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or - * Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is - * deprecated. + * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 + * when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. */ private OSSku osSku; @@ -138,9 +137,9 @@ public OSType osType() { } /** - * Get the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if - * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after - * Windows2019 is deprecated. + * Get the osSku property: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. + * The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is + * Windows. * * @return the osSku value. */ diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java index f05fb442e38a..04eb32db2c35 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java @@ -132,15 +132,6 @@ Mono<Response<AgentPoolUpgradeProfileInner>> getUpgradeProfile(@HostParam("$host @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/completeUpgrade") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<Flux<ByteBuffer>>> completeUpgrade(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines") @ExpectedResponses({ 202 }) @@ -184,7 +175,7 @@ Mono<Response<AgentPoolListResult>> listNext(@PathParam(value = "nextLink", enco * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, an error is returned. + * take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -215,7 +206,7 @@ public Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(St if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.abortLatestOperation(this.client.getEndpoint(), apiVersion, @@ -228,7 +219,7 @@ public Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(St * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, an error is returned. + * take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -260,7 +251,7 @@ private Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(S if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.abortLatestOperation(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -272,7 +263,7 @@ private Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(S * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, an error is returned. + * take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -296,7 +287,7 @@ public PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, an error is returned. + * take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -322,7 +313,7 @@ private PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, an error is returned. + * take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -343,7 +334,7 @@ public SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resou * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, an error is returned. + * take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -366,7 +357,7 @@ public SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resou * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, an error is returned. + * take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -387,7 +378,7 @@ public Mono<Void> abortLatestOperationAsync(String resourceGroupName, String res * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, an error is returned. + * take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -410,7 +401,7 @@ private Mono<Void> abortLatestOperationAsync(String resourceGroupName, String re * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, an error is returned. + * take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -429,7 +420,7 @@ public void abortLatestOperation(String resourceGroupName, String resourceName, * * Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and * eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can - * take place, an error is returned. + * take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -473,7 +464,7 @@ private Mono<PagedResponse<AgentPoolInner>> listSinglePageAsync(String resourceG if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -513,7 +504,7 @@ private Mono<PagedResponse<AgentPoolInner>> listSinglePageAsync(String resourceG if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -620,7 +611,7 @@ public Mono<Response<AgentPoolInner>> getWithResponseAsync(String resourceGroupN if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -662,7 +653,7 @@ private Mono<Response<AgentPoolInner>> getWithResponseAsync(String resourceGroup if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -760,7 +751,7 @@ public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -811,7 +802,7 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1079,7 +1070,7 @@ public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceG if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, @@ -1124,7 +1115,7 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -1380,7 +1371,7 @@ public Mono<Response<AgentPoolUpgradeProfileInner>> getUpgradeProfileWithRespons if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getUpgradeProfile(this.client.getEndpoint(), apiVersion, @@ -1422,7 +1413,7 @@ private Mono<Response<AgentPoolUpgradeProfileInner>> getUpgradeProfileWithRespon if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getUpgradeProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1482,250 +1473,6 @@ public AgentPoolUpgradeProfileInner getUpgradeProfile(String resourceGroupName, return getUpgradeProfileWithResponse(resourceGroupName, resourceName, agentPoolName, Context.NONE).getValue(); } - /** - * Completes the upgrade of an agent pool. - * - * Completes the upgrade operation for the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<Flux<ByteBuffer>>> completeUpgradeWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.completeUpgrade(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Completes the upgrade of an agent pool. - * - * Completes the upgrade operation for the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<Flux<ByteBuffer>>> completeUpgradeWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.completeUpgrade(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, agentPoolName, accept, context); - } - - /** - * Completes the upgrade of an agent pool. - * - * Completes the upgrade operation for the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux<PollResult<Void>, Void> beginCompleteUpgradeAsync(String resourceGroupName, String resourceName, - String agentPoolName) { - Mono<Response<Flux<ByteBuffer>>> mono - = completeUpgradeWithResponseAsync(resourceGroupName, resourceName, agentPoolName); - return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Completes the upgrade of an agent pool. - * - * Completes the upgrade operation for the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<Void>, Void> beginCompleteUpgradeAsync(String resourceGroupName, String resourceName, - String agentPoolName, Context context) { - context = this.client.mergeContext(context); - Mono<Response<Flux<ByteBuffer>>> mono - = completeUpgradeWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context); - return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Completes the upgrade of an agent pool. - * - * Completes the upgrade operation for the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginCompleteUpgrade(String resourceGroupName, String resourceName, - String agentPoolName) { - return this.beginCompleteUpgradeAsync(resourceGroupName, resourceName, agentPoolName).getSyncPoller(); - } - - /** - * Completes the upgrade of an agent pool. - * - * Completes the upgrade operation for the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginCompleteUpgrade(String resourceGroupName, String resourceName, - String agentPoolName, Context context) { - return this.beginCompleteUpgradeAsync(resourceGroupName, resourceName, agentPoolName, context).getSyncPoller(); - } - - /** - * Completes the upgrade of an agent pool. - * - * Completes the upgrade operation for the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Void> completeUpgradeAsync(String resourceGroupName, String resourceName, String agentPoolName) { - return beginCompleteUpgradeAsync(resourceGroupName, resourceName, agentPoolName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Completes the upgrade of an agent pool. - * - * Completes the upgrade operation for the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Void> completeUpgradeAsync(String resourceGroupName, String resourceName, String agentPoolName, - Context context) { - return beginCompleteUpgradeAsync(resourceGroupName, resourceName, agentPoolName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Completes the upgrade of an agent pool. - * - * Completes the upgrade operation for the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void completeUpgrade(String resourceGroupName, String resourceName, String agentPoolName) { - completeUpgradeAsync(resourceGroupName, resourceName, agentPoolName).block(); - } - - /** - * Completes the upgrade of an agent pool. - * - * Completes the upgrade operation for the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void completeUpgrade(String resourceGroupName, String resourceName, String agentPoolName, Context context) { - completeUpgradeAsync(resourceGroupName, resourceName, agentPoolName, context).block(); - } - /** * Deletes specific machines in an agent pool. * @@ -1764,7 +1511,7 @@ public Mono<Response<Flux<ByteBuffer>>> deleteMachinesWithResponseAsync(String r } else { machines.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.deleteMachines(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, machines, accept, context)) @@ -1810,7 +1557,7 @@ private Mono<Response<Flux<ByteBuffer>>> deleteMachinesWithResponseAsync(String } else { machines.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.deleteMachines(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -2005,7 +1752,7 @@ public void deleteMachines(String resourceGroupName, String resourceName, String if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getAvailableAgentPoolVersions(this.client.getEndpoint(), apiVersion, @@ -2046,7 +1793,7 @@ public void deleteMachines(String resourceGroupName, String resourceName, String if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getAvailableAgentPoolVersions(this.client.getEndpoint(), apiVersion, @@ -2148,7 +1895,7 @@ public Mono<Response<Flux<ByteBuffer>>> upgradeNodeImageVersionWithResponseAsync if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.upgradeNodeImageVersion(this.client.getEndpoint(), apiVersion, @@ -2193,7 +1940,7 @@ private Mono<Response<Flux<ByteBuffer>>> upgradeNodeImageVersionWithResponseAsyn if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.upgradeNodeImageVersion(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java index 98cc29cbc0e8..11eb021db617 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java @@ -10,19 +10,12 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.resourcemanager.containerservice.fluent.AgentPoolsClient; import com.azure.resourcemanager.containerservice.fluent.ContainerServiceManagementClient; -import com.azure.resourcemanager.containerservice.fluent.ContainerServiceOperationsClient; import com.azure.resourcemanager.containerservice.fluent.ContainerServicesClient; -import com.azure.resourcemanager.containerservice.fluent.IdentityBindingsClient; -import com.azure.resourcemanager.containerservice.fluent.JwtAuthenticatorsClient; -import com.azure.resourcemanager.containerservice.fluent.LoadBalancersClient; import com.azure.resourcemanager.containerservice.fluent.MachinesClient; import com.azure.resourcemanager.containerservice.fluent.MaintenanceConfigurationsClient; -import com.azure.resourcemanager.containerservice.fluent.ManagedClusterSnapshotsClient; import com.azure.resourcemanager.containerservice.fluent.ManagedClustersClient; import com.azure.resourcemanager.containerservice.fluent.ManagedNamespacesClient; -import com.azure.resourcemanager.containerservice.fluent.MeshMembershipsClient; import com.azure.resourcemanager.containerservice.fluent.OpenShiftManagedClustersClient; -import com.azure.resourcemanager.containerservice.fluent.OperationStatusResultsClient; import com.azure.resourcemanager.containerservice.fluent.OperationsClient; import com.azure.resourcemanager.containerservice.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.containerservice.fluent.PrivateLinkResourcesClient; @@ -167,20 +160,6 @@ public ManagedClustersClient getManagedClusters() { return this.managedClusters; } - /** - * The ContainerServiceOperationsClient object to access its operations. - */ - private final ContainerServiceOperationsClient containerServiceOperations; - - /** - * Gets the ContainerServiceOperationsClient object to access its operations. - * - * @return the ContainerServiceOperationsClient object. - */ - public ContainerServiceOperationsClient getContainerServiceOperations() { - return this.containerServiceOperations; - } - /** * The MaintenanceConfigurationsClient object to access its operations. */ @@ -223,20 +202,6 @@ public AgentPoolsClient getAgentPools() { return this.agentPools; } - /** - * The MachinesClient object to access its operations. - */ - private final MachinesClient machines; - - /** - * Gets the MachinesClient object to access its operations. - * - * @return the MachinesClient object. - */ - public MachinesClient getMachines() { - return this.machines; - } - /** * The PrivateEndpointConnectionsClient object to access its operations. */ @@ -279,20 +244,6 @@ public ResolvePrivateLinkServiceIdsClient getResolvePrivateLinkServiceIds() { return this.resolvePrivateLinkServiceIds; } - /** - * The OperationStatusResultsClient object to access its operations. - */ - private final OperationStatusResultsClient operationStatusResults; - - /** - * Gets the OperationStatusResultsClient object to access its operations. - * - * @return the OperationStatusResultsClient object. - */ - public OperationStatusResultsClient getOperationStatusResults() { - return this.operationStatusResults; - } - /** * The SnapshotsClient object to access its operations. */ @@ -307,34 +258,6 @@ public SnapshotsClient getSnapshots() { return this.snapshots; } - /** - * The ManagedClusterSnapshotsClient object to access its operations. - */ - private final ManagedClusterSnapshotsClient managedClusterSnapshots; - - /** - * Gets the ManagedClusterSnapshotsClient object to access its operations. - * - * @return the ManagedClusterSnapshotsClient object. - */ - public ManagedClusterSnapshotsClient getManagedClusterSnapshots() { - return this.managedClusterSnapshots; - } - - /** - * The TrustedAccessRolesClient object to access its operations. - */ - private final TrustedAccessRolesClient trustedAccessRoles; - - /** - * Gets the TrustedAccessRolesClient object to access its operations. - * - * @return the TrustedAccessRolesClient object. - */ - public TrustedAccessRolesClient getTrustedAccessRoles() { - return this.trustedAccessRoles; - } - /** * The TrustedAccessRoleBindingsClient object to access its operations. */ @@ -350,59 +273,31 @@ public TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings() { } /** - * The LoadBalancersClient object to access its operations. - */ - private final LoadBalancersClient loadBalancers; - - /** - * Gets the LoadBalancersClient object to access its operations. - * - * @return the LoadBalancersClient object. - */ - public LoadBalancersClient getLoadBalancers() { - return this.loadBalancers; - } - - /** - * The IdentityBindingsClient object to access its operations. - */ - private final IdentityBindingsClient identityBindings; - - /** - * Gets the IdentityBindingsClient object to access its operations. - * - * @return the IdentityBindingsClient object. - */ - public IdentityBindingsClient getIdentityBindings() { - return this.identityBindings; - } - - /** - * The JwtAuthenticatorsClient object to access its operations. + * The TrustedAccessRolesClient object to access its operations. */ - private final JwtAuthenticatorsClient jwtAuthenticators; + private final TrustedAccessRolesClient trustedAccessRoles; /** - * Gets the JwtAuthenticatorsClient object to access its operations. + * Gets the TrustedAccessRolesClient object to access its operations. * - * @return the JwtAuthenticatorsClient object. + * @return the TrustedAccessRolesClient object. */ - public JwtAuthenticatorsClient getJwtAuthenticators() { - return this.jwtAuthenticators; + public TrustedAccessRolesClient getTrustedAccessRoles() { + return this.trustedAccessRoles; } /** - * The MeshMembershipsClient object to access its operations. + * The MachinesClient object to access its operations. */ - private final MeshMembershipsClient meshMemberships; + private final MachinesClient machines; /** - * Gets the MeshMembershipsClient object to access its operations. + * Gets the MachinesClient object to access its operations. * - * @return the MeshMembershipsClient object. + * @return the MachinesClient object. */ - public MeshMembershipsClient getMeshMemberships() { - return this.meshMemberships; + public MachinesClient getMachines() { + return this.machines; } /** @@ -428,22 +323,15 @@ public MeshMembershipsClient getMeshMemberships() { this.containerServices = new ContainerServicesClientImpl(this); this.operations = new OperationsClientImpl(this); this.managedClusters = new ManagedClustersClientImpl(this); - this.containerServiceOperations = new ContainerServiceOperationsClientImpl(this); this.maintenanceConfigurations = new MaintenanceConfigurationsClientImpl(this); this.managedNamespaces = new ManagedNamespacesClientImpl(this); this.agentPools = new AgentPoolsClientImpl(this); - this.machines = new MachinesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.resolvePrivateLinkServiceIds = new ResolvePrivateLinkServiceIdsClientImpl(this); - this.operationStatusResults = new OperationStatusResultsClientImpl(this); this.snapshots = new SnapshotsClientImpl(this); - this.managedClusterSnapshots = new ManagedClusterSnapshotsClientImpl(this); - this.trustedAccessRoles = new TrustedAccessRolesClientImpl(this); this.trustedAccessRoleBindings = new TrustedAccessRoleBindingsClientImpl(this); - this.loadBalancers = new LoadBalancersClientImpl(this); - this.identityBindings = new IdentityBindingsClientImpl(this); - this.jwtAuthenticators = new JwtAuthenticatorsClientImpl(this); - this.meshMemberships = new MeshMembershipsClientImpl(this); + this.trustedAccessRoles = new TrustedAccessRolesClientImpl(this); + this.machines = new MachinesClientImpl(this); } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceOperationsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceOperationsClientImpl.java deleted file mode 100644 index 5cac22ca505e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceOperationsClientImpl.java +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.containerservice.fluent.ContainerServiceOperationsClient; -import com.azure.resourcemanager.containerservice.fluent.models.NodeImageVersionInner; -import com.azure.resourcemanager.containerservice.models.NodeImageVersionsListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ContainerServiceOperationsClient. - */ -public final class ContainerServiceOperationsClientImpl implements ContainerServiceOperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ContainerServiceOperationsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of ContainerServiceOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerServiceOperationsClientImpl(ContainerServiceManagementClientImpl client) { - this.service = RestProxy.create(ContainerServiceOperationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientContainerServiceOperations to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientContainerServiceOperations") - public interface ContainerServiceOperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/nodeImageVersions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<NodeImageVersionsListResult>> listNodeImageVersions(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<NodeImageVersionsListResult>> listNodeImageVersionsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of supported NodeImage versions in the specified subscription. - * - * Only returns the latest version of each node image. For example there may be an - * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this - * list. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array NodeImageVersions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<NodeImageVersionInner>> listNodeImageVersionsSinglePageAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNodeImageVersions(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), location, accept, context)) - .<PagedResponse<NodeImageVersionInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of supported NodeImage versions in the specified subscription. - * - * Only returns the latest version of each node image. For example there may be an - * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this - * list. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array NodeImageVersions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<NodeImageVersionInner>> listNodeImageVersionsSinglePageAsync(String location, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNodeImageVersions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of supported NodeImage versions in the specified subscription. - * - * Only returns the latest version of each node image. For example there may be an - * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this - * list. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array NodeImageVersions as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux<NodeImageVersionInner> listNodeImageVersionsAsync(String location) { - return new PagedFlux<>(() -> listNodeImageVersionsSinglePageAsync(location), - nextLink -> listNodeImageVersionsNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of supported NodeImage versions in the specified subscription. - * - * Only returns the latest version of each node image. For example there may be an - * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this - * list. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array NodeImageVersions as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux<NodeImageVersionInner> listNodeImageVersionsAsync(String location, Context context) { - return new PagedFlux<>(() -> listNodeImageVersionsSinglePageAsync(location, context), - nextLink -> listNodeImageVersionsNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of supported NodeImage versions in the specified subscription. - * - * Only returns the latest version of each node image. For example there may be an - * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this - * list. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array NodeImageVersions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<NodeImageVersionInner> listNodeImageVersions(String location) { - return new PagedIterable<>(listNodeImageVersionsAsync(location)); - } - - /** - * Gets a list of supported NodeImage versions in the specified subscription. - * - * Only returns the latest version of each node image. For example there may be an - * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this - * list. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array NodeImageVersions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<NodeImageVersionInner> listNodeImageVersions(String location, Context context) { - return new PagedIterable<>(listNodeImageVersionsAsync(location, context)); - } - - /** - * Gets a list of supported NodeImage versions in the specified subscription. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array NodeImageVersions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<NodeImageVersionInner>> listNodeImageVersionsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listNodeImageVersionsNext(nextLink, this.client.getEndpoint(), accept, context)) - .<PagedResponse<NodeImageVersionInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of supported NodeImage versions in the specified subscription. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array NodeImageVersions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<NodeImageVersionInner>> listNodeImageVersionsNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNodeImageVersionsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/IdentityBindingsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/IdentityBindingsClientImpl.java deleted file mode 100644 index e51259e5ab81..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/IdentityBindingsClientImpl.java +++ /dev/null @@ -1,947 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.IdentityBindingsClient; -import com.azure.resourcemanager.containerservice.fluent.models.IdentityBindingInner; -import com.azure.resourcemanager.containerservice.models.IdentityBindingListResult; -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 IdentityBindingsClient. - */ -public final class IdentityBindingsClientImpl implements IdentityBindingsClient { - /** - * The proxy service used to perform REST calls. - */ - private final IdentityBindingsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of IdentityBindingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - IdentityBindingsClientImpl(ContainerServiceManagementClientImpl client) { - this.service - = RestProxy.create(IdentityBindingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientIdentityBindings to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientIdentityBindings") - public interface IdentityBindingsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<IdentityBindingListResult>> listByManagedCluster(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<IdentityBindingInner>> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("identityBindingName") String identityBindingName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("identityBindingName") String identityBindingName, - @BodyParam("application/json") IdentityBindingInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("identityBindingName") String identityBindingName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<IdentityBindingListResult>> listByManagedClusterNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of identity bindings in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of identity bindings in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<IdentityBindingInner>> listByManagedClusterSinglePageAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .<PagedResponse<IdentityBindingInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of identity bindings in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of identity bindings in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<IdentityBindingInner>> listByManagedClusterSinglePageAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByManagedCluster(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of identity bindings in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of identity bindings in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux<IdentityBindingInner> listByManagedClusterAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of identity bindings in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of identity bindings in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux<IdentityBindingInner> listByManagedClusterAsync(String resourceGroupName, String resourceName, - Context context) { - return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of identity bindings in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of identity bindings in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<IdentityBindingInner> listByManagedCluster(String resourceGroupName, String resourceName) { - return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); - } - - /** - * Gets a list of identity bindings in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of identity bindings in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<IdentityBindingInner> listByManagedCluster(String resourceGroupName, String resourceName, - Context context) { - return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); - } - - /** - * Gets the specified Identity Binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Identity Binding along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<IdentityBindingInner>> getWithResponseAsync(String resourceGroupName, String resourceName, - String identityBindingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (identityBindingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, identityBindingName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the specified Identity Binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Identity Binding along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<IdentityBindingInner>> getWithResponseAsync(String resourceGroupName, String resourceName, - String identityBindingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (identityBindingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, identityBindingName, accept, context); - } - - /** - * Gets the specified Identity Binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Identity Binding on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<IdentityBindingInner> getAsync(String resourceGroupName, String resourceName, - String identityBindingName) { - return getWithResponseAsync(resourceGroupName, resourceName, identityBindingName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the specified Identity Binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Identity Binding along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<IdentityBindingInner> getWithResponse(String resourceGroupName, String resourceName, - String identityBindingName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, identityBindingName, context).block(); - } - - /** - * Gets the specified Identity Binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Identity Binding. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IdentityBindingInner get(String resourceGroupName, String resourceName, String identityBindingName) { - return getWithResponse(resourceGroupName, resourceName, identityBindingName, Context.NONE).getValue(); - } - - /** - * Creates or updates an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param parameters The identity binding to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IdentityBinding resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String identityBindingName, IdentityBindingInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (identityBindingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, identityBindingName, parameters, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param parameters The identity binding to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IdentityBinding resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String identityBindingName, IdentityBindingInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (identityBindingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, identityBindingName, parameters, accept, context); - } - - /** - * Creates or updates an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param parameters The identity binding to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IdentityBinding resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux<PollResult<IdentityBindingInner>, IdentityBindingInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, String identityBindingName, IdentityBindingInner parameters) { - Mono<Response<Flux<ByteBuffer>>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, identityBindingName, parameters); - return this.client.<IdentityBindingInner, IdentityBindingInner>getLroResult(mono, this.client.getHttpPipeline(), - IdentityBindingInner.class, IdentityBindingInner.class, this.client.getContext()); - } - - /** - * Creates or updates an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param parameters The identity binding to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IdentityBinding resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<IdentityBindingInner>, IdentityBindingInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, String identityBindingName, IdentityBindingInner parameters, - Context context) { - context = this.client.mergeContext(context); - Mono<Response<Flux<ByteBuffer>>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, - identityBindingName, parameters, context); - return this.client.<IdentityBindingInner, IdentityBindingInner>getLroResult(mono, this.client.getHttpPipeline(), - IdentityBindingInner.class, IdentityBindingInner.class, context); - } - - /** - * Creates or updates an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param parameters The identity binding to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IdentityBinding resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<IdentityBindingInner>, IdentityBindingInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, String identityBindingName, IdentityBindingInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters) - .getSyncPoller(); - } - - /** - * Creates or updates an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param parameters The identity binding to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IdentityBinding resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<IdentityBindingInner>, IdentityBindingInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, String identityBindingName, IdentityBindingInner parameters, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters, context) - .getSyncPoller(); - } - - /** - * Creates or updates an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param parameters The identity binding to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IdentityBinding resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<IdentityBindingInner> createOrUpdateAsync(String resourceGroupName, String resourceName, - String identityBindingName, IdentityBindingInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param parameters The identity binding to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IdentityBinding resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<IdentityBindingInner> createOrUpdateAsync(String resourceGroupName, String resourceName, - String identityBindingName, IdentityBindingInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param parameters The identity binding to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IdentityBinding resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IdentityBindingInner createOrUpdate(String resourceGroupName, String resourceName, - String identityBindingName, IdentityBindingInner parameters) { - return createOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters).block(); - } - - /** - * Creates or updates an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param parameters The identity binding to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IdentityBinding resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IdentityBindingInner createOrUpdate(String resourceGroupName, String resourceName, - String identityBindingName, IdentityBindingInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters, context).block(); - } - - /** - * Deletes an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String identityBindingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (identityBindingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, identityBindingName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String identityBindingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (identityBindingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, identityBindingName, accept, context); - } - - /** - * Deletes an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String identityBindingName) { - Mono<Response<Flux<ByteBuffer>>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, identityBindingName); - return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String identityBindingName, Context context) { - context = this.client.mergeContext(context); - Mono<Response<Flux<ByteBuffer>>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, identityBindingName, context); - return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, - String identityBindingName) { - return this.beginDeleteAsync(resourceGroupName, resourceName, identityBindingName).getSyncPoller(); - } - - /** - * Deletes an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, - String identityBindingName, Context context) { - return this.beginDeleteAsync(resourceGroupName, resourceName, identityBindingName, context).getSyncPoller(); - } - - /** - * Deletes an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String identityBindingName) { - return beginDeleteAsync(resourceGroupName, resourceName, identityBindingName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String identityBindingName, - Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, identityBindingName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String identityBindingName) { - deleteAsync(resourceGroupName, resourceName, identityBindingName).block(); - } - - /** - * Deletes an identity binding in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param identityBindingName The name of the identity binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String identityBindingName, Context context) { - deleteAsync(resourceGroupName, resourceName, identityBindingName, context).block(); - } - - /** - * Gets a list of identity bindings in the specified managed cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of identity bindings in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<IdentityBindingInner>> listByManagedClusterNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) - .<PagedResponse<IdentityBindingInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of identity bindings in the specified managed cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of identity bindings in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<IdentityBindingInner>> listByManagedClusterNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/JwtAuthenticatorsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/JwtAuthenticatorsClientImpl.java deleted file mode 100644 index 1379b5a678f6..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/JwtAuthenticatorsClientImpl.java +++ /dev/null @@ -1,963 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.JwtAuthenticatorsClient; -import com.azure.resourcemanager.containerservice.fluent.models.JwtAuthenticatorInner; -import com.azure.resourcemanager.containerservice.models.JwtAuthenticatorListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in JwtAuthenticatorsClient. - */ -public final class JwtAuthenticatorsClientImpl implements JwtAuthenticatorsClient { - /** - * The proxy service used to perform REST calls. - */ - private final JwtAuthenticatorsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of JwtAuthenticatorsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - JwtAuthenticatorsClientImpl(ContainerServiceManagementClientImpl client) { - this.service - = RestProxy.create(JwtAuthenticatorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientJwtAuthenticators to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientJwtAuthenticators") - public interface JwtAuthenticatorsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<JwtAuthenticatorListResult>> listByManagedCluster(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<JwtAuthenticatorInner>> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("jwtAuthenticatorName") String jwtAuthenticatorName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("jwtAuthenticatorName") String jwtAuthenticatorName, - @BodyParam("application/json") JwtAuthenticatorInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("jwtAuthenticatorName") String jwtAuthenticatorName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<JwtAuthenticatorListResult>> listByManagedClusterNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of JWT authenticators in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of JWT authenticators in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<JwtAuthenticatorInner>> listByManagedClusterSinglePageAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .<PagedResponse<JwtAuthenticatorInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of JWT authenticators in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of JWT authenticators in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<JwtAuthenticatorInner>> listByManagedClusterSinglePageAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByManagedCluster(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of JWT authenticators in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of JWT authenticators in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux<JwtAuthenticatorInner> listByManagedClusterAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of JWT authenticators in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of JWT authenticators in the specified managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux<JwtAuthenticatorInner> listByManagedClusterAsync(String resourceGroupName, String resourceName, - Context context) { - return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of JWT authenticators in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of JWT authenticators in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<JwtAuthenticatorInner> listByManagedCluster(String resourceGroupName, String resourceName) { - return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); - } - - /** - * Gets a list of JWT authenticators in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of JWT authenticators in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<JwtAuthenticatorInner> listByManagedCluster(String resourceGroupName, String resourceName, - Context context) { - return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); - } - - /** - * Gets the specified JWT authenticator of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified JWT authenticator of a managed cluster along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<JwtAuthenticatorInner>> getWithResponseAsync(String resourceGroupName, String resourceName, - String jwtAuthenticatorName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (jwtAuthenticatorName == null) { - return Mono - .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, jwtAuthenticatorName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the specified JWT authenticator of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified JWT authenticator of a managed cluster along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<JwtAuthenticatorInner>> getWithResponseAsync(String resourceGroupName, String resourceName, - String jwtAuthenticatorName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (jwtAuthenticatorName == null) { - return Mono - .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, jwtAuthenticatorName, accept, context); - } - - /** - * Gets the specified JWT authenticator of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified JWT authenticator of a managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<JwtAuthenticatorInner> getAsync(String resourceGroupName, String resourceName, - String jwtAuthenticatorName) { - return getWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the specified JWT authenticator of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified JWT authenticator of a managed cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<JwtAuthenticatorInner> getWithResponse(String resourceGroupName, String resourceName, - String jwtAuthenticatorName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context).block(); - } - - /** - * Gets the specified JWT authenticator of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified JWT authenticator of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JwtAuthenticatorInner get(String resourceGroupName, String resourceName, String jwtAuthenticatorName) { - return getWithResponse(resourceGroupName, resourceName, jwtAuthenticatorName, Context.NONE).getValue(); - } - - /** - * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the - * settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param parameters The JWT authenticator to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration for JWT authenticator in the managed cluster along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (jwtAuthenticatorName == null) { - return Mono - .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, jwtAuthenticatorName, parameters, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the - * settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param parameters The JWT authenticator to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration for JWT authenticator in the managed cluster along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (jwtAuthenticatorName == null) { - return Mono - .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, jwtAuthenticatorName, parameters, accept, context); - } - - /** - * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the - * settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param parameters The JWT authenticator to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of configuration for JWT authenticator in the managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux<PollResult<JwtAuthenticatorInner>, JwtAuthenticatorInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters) { - Mono<Response<Flux<ByteBuffer>>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters); - return this.client.<JwtAuthenticatorInner, JwtAuthenticatorInner>getLroResult(mono, - this.client.getHttpPipeline(), JwtAuthenticatorInner.class, JwtAuthenticatorInner.class, - this.client.getContext()); - } - - /** - * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the - * settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param parameters The JWT authenticator to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of configuration for JWT authenticator in the managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<JwtAuthenticatorInner>, JwtAuthenticatorInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters, - Context context) { - context = this.client.mergeContext(context); - Mono<Response<Flux<ByteBuffer>>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, - jwtAuthenticatorName, parameters, context); - return this.client.<JwtAuthenticatorInner, JwtAuthenticatorInner>getLroResult(mono, - this.client.getHttpPipeline(), JwtAuthenticatorInner.class, JwtAuthenticatorInner.class, context); - } - - /** - * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the - * settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param parameters The JWT authenticator to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of configuration for JWT authenticator in the managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<JwtAuthenticatorInner>, JwtAuthenticatorInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters) - .getSyncPoller(); - } - - /** - * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the - * settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param parameters The JWT authenticator to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of configuration for JWT authenticator in the managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<JwtAuthenticatorInner>, JwtAuthenticatorInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, String jwtAuthenticatorName, JwtAuthenticatorInner parameters, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters, context) - .getSyncPoller(); - } - - /** - * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the - * settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param parameters The JWT authenticator to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration for JWT authenticator in the managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<JwtAuthenticatorInner> createOrUpdateAsync(String resourceGroupName, String resourceName, - String jwtAuthenticatorName, JwtAuthenticatorInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the - * settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param parameters The JWT authenticator to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration for JWT authenticator in the managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<JwtAuthenticatorInner> createOrUpdateAsync(String resourceGroupName, String resourceName, - String jwtAuthenticatorName, JwtAuthenticatorInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the - * settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param parameters The JWT authenticator to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration for JWT authenticator in the managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JwtAuthenticatorInner createOrUpdate(String resourceGroupName, String resourceName, - String jwtAuthenticatorName, JwtAuthenticatorInner parameters) { - return createOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters).block(); - } - - /** - * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the - * settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param parameters The JWT authenticator to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration for JWT authenticator in the managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JwtAuthenticatorInner createOrUpdate(String resourceGroupName, String resourceName, - String jwtAuthenticatorName, JwtAuthenticatorInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters, context).block(); - } - - /** - * Deletes a JWT authenticator and updates the managed cluster to apply the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String jwtAuthenticatorName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (jwtAuthenticatorName == null) { - return Mono - .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, jwtAuthenticatorName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a JWT authenticator and updates the managed cluster to apply the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String jwtAuthenticatorName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (jwtAuthenticatorName == null) { - return Mono - .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, jwtAuthenticatorName, accept, context); - } - - /** - * Deletes a JWT authenticator and updates the managed cluster to apply the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String jwtAuthenticatorName) { - Mono<Response<Flux<ByteBuffer>>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName); - return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a JWT authenticator and updates the managed cluster to apply the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String jwtAuthenticatorName, Context context) { - context = this.client.mergeContext(context); - Mono<Response<Flux<ByteBuffer>>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context); - return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a JWT authenticator and updates the managed cluster to apply the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, - String jwtAuthenticatorName) { - return this.beginDeleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName).getSyncPoller(); - } - - /** - * Deletes a JWT authenticator and updates the managed cluster to apply the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, - String jwtAuthenticatorName, Context context) { - return this.beginDeleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context).getSyncPoller(); - } - - /** - * Deletes a JWT authenticator and updates the managed cluster to apply the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String jwtAuthenticatorName) { - return beginDeleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a JWT authenticator and updates the managed cluster to apply the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String jwtAuthenticatorName, - Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a JWT authenticator and updates the managed cluster to apply the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String jwtAuthenticatorName) { - deleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName).block(); - } - - /** - * Deletes a JWT authenticator and updates the managed cluster to apply the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param jwtAuthenticatorName The name of the JWT authenticator. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String jwtAuthenticatorName, Context context) { - deleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context).block(); - } - - /** - * Gets a list of JWT authenticators in the specified managed cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of JWT authenticators in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<JwtAuthenticatorInner>> listByManagedClusterNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) - .<PagedResponse<JwtAuthenticatorInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of JWT authenticators in the specified managed cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of JWT authenticators in the specified managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<JwtAuthenticatorInner>> listByManagedClusterNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterAgentPoolImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterAgentPoolImpl.java index 454642777e59..98f4dba163a5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterAgentPoolImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterAgentPoolImpl.java @@ -325,10 +325,6 @@ AgentPoolInner getAgentPoolInner() { agentPoolInner.withVirtualMachineNodesStatus(innerModel().virtualMachineNodesStatus()); agentPoolInner.withStatus(innerModel().status()); - // available only in preview api-version - agentPoolInner.withNodeImageVersion(innerModel().nodeImageVersion()); - agentPoolInner.withUpgradeStrategy(innerModel().upgradeStrategy()); - return agentPoolInner; } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/LoadBalancersClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/LoadBalancersClientImpl.java deleted file mode 100644 index e6451577cbcb..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/LoadBalancersClientImpl.java +++ /dev/null @@ -1,842 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.LoadBalancersClient; -import com.azure.resourcemanager.containerservice.fluent.models.LoadBalancerInner; -import com.azure.resourcemanager.containerservice.models.LoadBalancerListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in LoadBalancersClient. - */ -public final class LoadBalancersClientImpl implements LoadBalancersClient { - /** - * The proxy service used to perform REST calls. - */ - private final LoadBalancersService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of LoadBalancersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - LoadBalancersClientImpl(ContainerServiceManagementClientImpl client) { - this.service - = RestProxy.create(LoadBalancersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientLoadBalancers to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientLoadBalancers") - public interface LoadBalancersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<LoadBalancerListResult>> listByManagedCluster(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<LoadBalancerInner>> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("loadBalancerName") String loadBalancerName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<LoadBalancerInner>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("loadBalancerName") String loadBalancerName, - @BodyParam("application/json") LoadBalancerInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("loadBalancerName") String loadBalancerName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<LoadBalancerListResult>> listByManagedClusterNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of load balancers in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of load balancers in the specified managed cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<LoadBalancerInner>> listByManagedClusterSinglePageAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .<PagedResponse<LoadBalancerInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of load balancers in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of load balancers in the specified managed cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<LoadBalancerInner>> listByManagedClusterSinglePageAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByManagedCluster(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of load balancers in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of load balancers in the specified managed cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux<LoadBalancerInner> listByManagedClusterAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of load balancers in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of load balancers in the specified managed cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux<LoadBalancerInner> listByManagedClusterAsync(String resourceGroupName, String resourceName, - Context context) { - return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of load balancers in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of load balancers in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<LoadBalancerInner> listByManagedCluster(String resourceGroupName, String resourceName) { - return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); - } - - /** - * Gets a list of load balancers in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of load balancers in the specified managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<LoadBalancerInner> listByManagedCluster(String resourceGroupName, String resourceName, - Context context) { - return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); - } - - /** - * Gets the specified load balancer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified load balancer along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<LoadBalancerInner>> getWithResponseAsync(String resourceGroupName, String resourceName, - String loadBalancerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (loadBalancerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, loadBalancerName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the specified load balancer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified load balancer along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<LoadBalancerInner>> getWithResponseAsync(String resourceGroupName, String resourceName, - String loadBalancerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (loadBalancerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, loadBalancerName, accept, context); - } - - /** - * Gets the specified load balancer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified load balancer on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<LoadBalancerInner> getAsync(String resourceGroupName, String resourceName, String loadBalancerName) { - return getWithResponseAsync(resourceGroupName, resourceName, loadBalancerName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the specified load balancer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified load balancer along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<LoadBalancerInner> getWithResponse(String resourceGroupName, String resourceName, - String loadBalancerName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, loadBalancerName, context).block(); - } - - /** - * Gets the specified load balancer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified load balancer. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LoadBalancerInner get(String resourceGroupName, String resourceName, String loadBalancerName) { - return getWithResponse(resourceGroupName, resourceName, loadBalancerName, Context.NONE).getValue(); - } - - /** - * Creates or updates a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param parameters The load balancer to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the configurations regarding multiple standard load balancers along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<LoadBalancerInner>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String loadBalancerName, LoadBalancerInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (loadBalancerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, loadBalancerName, parameters, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param parameters The load balancer to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the configurations regarding multiple standard load balancers along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<LoadBalancerInner>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String loadBalancerName, LoadBalancerInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (loadBalancerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, loadBalancerName, parameters, accept, context); - } - - /** - * Creates or updates a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param parameters The load balancer to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the configurations regarding multiple standard load balancers on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<LoadBalancerInner> createOrUpdateAsync(String resourceGroupName, String resourceName, - String loadBalancerName, LoadBalancerInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, loadBalancerName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param parameters The load balancer to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the configurations regarding multiple standard load balancers along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<LoadBalancerInner> createOrUpdateWithResponse(String resourceGroupName, String resourceName, - String loadBalancerName, LoadBalancerInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, loadBalancerName, parameters, context) - .block(); - } - - /** - * Creates or updates a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param parameters The load balancer to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the configurations regarding multiple standard load balancers. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LoadBalancerInner createOrUpdate(String resourceGroupName, String resourceName, String loadBalancerName, - LoadBalancerInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, resourceName, loadBalancerName, parameters, Context.NONE) - .getValue(); - } - - /** - * Deletes a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String loadBalancerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (loadBalancerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, loadBalancerName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String loadBalancerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (loadBalancerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, loadBalancerName, accept, context); - } - - /** - * Deletes a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String loadBalancerName) { - Mono<Response<Flux<ByteBuffer>>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, loadBalancerName); - return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String loadBalancerName, Context context) { - context = this.client.mergeContext(context); - Mono<Response<Flux<ByteBuffer>>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, loadBalancerName, context); - return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, - String loadBalancerName) { - return this.beginDeleteAsync(resourceGroupName, resourceName, loadBalancerName).getSyncPoller(); - } - - /** - * Deletes a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, - String loadBalancerName, Context context) { - return this.beginDeleteAsync(resourceGroupName, resourceName, loadBalancerName, context).getSyncPoller(); - } - - /** - * Deletes a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String loadBalancerName) { - return beginDeleteAsync(resourceGroupName, resourceName, loadBalancerName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String loadBalancerName, - Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, loadBalancerName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String loadBalancerName) { - deleteAsync(resourceGroupName, resourceName, loadBalancerName).block(); - } - - /** - * Deletes a load balancer in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param loadBalancerName The name of the load balancer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String loadBalancerName, Context context) { - deleteAsync(resourceGroupName, resourceName, loadBalancerName, context).block(); - } - - /** - * Gets a list of load balancers in the specified managed cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of load balancers in the specified managed cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<LoadBalancerInner>> listByManagedClusterNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) - .<PagedResponse<LoadBalancerInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of load balancers in the specified managed cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of load balancers in the specified managed cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<LoadBalancerInner>> listByManagedClusterNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java index 49638472da4a..b88059d28c0c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.containerservice.implementation; -import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; import com.azure.core.annotation.HeaderParam; @@ -12,7 +11,6 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -25,16 +23,11 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservice.fluent.MachinesClient; import com.azure.resourcemanager.containerservice.fluent.models.MachineInner; import com.azure.resourcemanager.containerservice.models.MachineListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -87,18 +80,6 @@ Mono<Response<MachineInner>> get(@HostParam("$host") String endpoint, @PathParam("agentPoolName") String agentPoolName, @PathParam("machineName") String machineName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("agentPoolName") String agentPoolName, @PathParam("machineName") String machineName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") MachineInner parameters, @HeaderParam("Accept") String accept, - Context context); - @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -140,7 +121,7 @@ private Mono<PagedResponse<MachineInner>> listSinglePageAsync(String resourceGro if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -184,7 +165,7 @@ private Mono<PagedResponse<MachineInner>> listSinglePageAsync(String resourceGro if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -270,7 +251,7 @@ public PagedIterable<MachineInner> list(String resourceGroupName, String resourc * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. + * @param machineName host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -301,7 +282,7 @@ public Mono<Response<MachineInner>> getWithResponseAsync(String resourceGroupNam if (machineName == null) { return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -315,7 +296,7 @@ public Mono<Response<MachineInner>> getWithResponseAsync(String resourceGroupNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. + * @param machineName host name of the machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -347,7 +328,7 @@ private Mono<Response<MachineInner>> getWithResponseAsync(String resourceGroupNa if (machineName == null) { return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -360,7 +341,7 @@ private Mono<Response<MachineInner>> getWithResponseAsync(String resourceGroupNa * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. + * @param machineName host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -379,7 +360,7 @@ public Mono<MachineInner> getAsync(String resourceGroupName, String resourceName * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. + * @param machineName host name of the machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -398,7 +379,7 @@ public Response<MachineInner> getWithResponse(String resourceGroupName, String r * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. + * @param machineName host name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -409,362 +390,6 @@ public MachineInner get(String resourceGroupName, String resourceName, String ag return getWithResponse(resourceGroupName, resourceName, agentPoolName, machineName, Context.NONE).getValue(); } - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a machine provides detailed information about its configuration and status along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, - String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - if (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, machineName, ifMatch, - ifNoneMatch, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a machine provides detailed information about its configuration and status along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, - String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - if (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, agentPoolName, machineName, ifMatch, ifNoneMatch, parameters, accept, - context); - } - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a machine provides detailed information about its configuration and - * status. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux<PollResult<MachineInner>, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, - String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, - String ifNoneMatch) { - Mono<Response<Flux<ByteBuffer>>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, - agentPoolName, machineName, parameters, ifMatch, ifNoneMatch); - return this.client.<MachineInner, MachineInner>getLroResult(mono, this.client.getHttpPipeline(), - MachineInner.class, MachineInner.class, this.client.getContext()); - } - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a machine provides detailed information about its configuration and - * status. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux<PollResult<MachineInner>, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, - String resourceName, String agentPoolName, String machineName, MachineInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - Mono<Response<Flux<ByteBuffer>>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, - agentPoolName, machineName, parameters, ifMatch, ifNoneMatch); - return this.client.<MachineInner, MachineInner>getLroResult(mono, this.client.getHttpPipeline(), - MachineInner.class, MachineInner.class, this.client.getContext()); - } - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a machine provides detailed information about its configuration and - * status. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<MachineInner>, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, - String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, - String ifNoneMatch, Context context) { - context = this.client.mergeContext(context); - Mono<Response<Flux<ByteBuffer>>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, - agentPoolName, machineName, parameters, ifMatch, ifNoneMatch, context); - return this.client.<MachineInner, MachineInner>getLroResult(mono, this.client.getHttpPipeline(), - MachineInner.class, MachineInner.class, context); - } - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a machine provides detailed information about its configuration and - * status. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<MachineInner>, MachineInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, String agentPoolName, String machineName, MachineInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return this - .beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, ifMatch, - ifNoneMatch) - .getSyncPoller(); - } - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a machine provides detailed information about its configuration and - * status. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<MachineInner>, MachineInner> beginCreateOrUpdate(String resourceGroupName, - String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, - String ifNoneMatch, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, ifMatch, - ifNoneMatch, context) - .getSyncPoller(); - } - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a machine provides detailed information about its configuration and status on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<MachineInner> createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, - String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, - ifMatch, ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a machine provides detailed information about its configuration and status on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<MachineInner> createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, - String machineName, MachineInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, - ifMatch, ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a machine provides detailed information about its configuration and status on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<MachineInner> createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, - String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, - ifMatch, ifNoneMatch, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a machine provides detailed information about its configuration and status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MachineInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, - String machineName, MachineInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, ifMatch, - ifNoneMatch).block(); - } - - /** - * Creates or updates a machine in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param machineName Host name of the machine. - * @param parameters The machine to create or update. - * @param ifMatch The request should only proceed if an entity matches this string. - * @param ifNoneMatch The request should only proceed if no entity matches this string. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a machine provides detailed information about its configuration and status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MachineInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, - String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch, Context context) { - return createOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, ifMatch, - ifNoneMatch, context).block(); - } - /** * Gets a list of machines in the specified agent pool. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java index bb4c262beb79..c4e206da5913 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java @@ -141,7 +141,7 @@ Mono<Response<MaintenanceConfigurationListResult>> listByManagedClusterNext( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), apiVersion, @@ -181,7 +181,7 @@ Mono<Response<MaintenanceConfigurationListResult>> listByManagedClusterNext( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -268,7 +268,8 @@ public PagedIterable<MaintenanceConfigurationInner> listByManagedCluster(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -296,7 +297,7 @@ public Mono<Response<MaintenanceConfigurationInner>> getWithResponseAsync(String if (configName == null) { return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -309,7 +310,8 @@ public Mono<Response<MaintenanceConfigurationInner>> getWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -338,7 +340,7 @@ private Mono<Response<MaintenanceConfigurationInner>> getWithResponseAsync(Strin if (configName == null) { return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -350,7 +352,8 @@ private Mono<Response<MaintenanceConfigurationInner>> getWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -368,7 +371,8 @@ public Mono<MaintenanceConfigurationInner> getAsync(String resourceGroupName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -386,7 +390,8 @@ public Response<MaintenanceConfigurationInner> getWithResponse(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -402,7 +407,8 @@ public MaintenanceConfigurationInner get(String resourceGroupName, String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @param parameters The maintenance configuration to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -436,7 +442,7 @@ public Mono<Response<MaintenanceConfigurationInner>> createOrUpdateWithResponseA } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, configName, parameters, accept, context)) @@ -448,7 +454,8 @@ public Mono<Response<MaintenanceConfigurationInner>> createOrUpdateWithResponseA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @param parameters The maintenance configuration to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -483,7 +490,7 @@ private Mono<Response<MaintenanceConfigurationInner>> createOrUpdateWithResponse } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -495,7 +502,8 @@ private Mono<Response<MaintenanceConfigurationInner>> createOrUpdateWithResponse * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @param parameters The maintenance configuration to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -515,7 +523,8 @@ public Mono<MaintenanceConfigurationInner> createOrUpdateAsync(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @param parameters The maintenance configuration to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -536,7 +545,8 @@ public Response<MaintenanceConfigurationInner> createOrUpdateWithResponse(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @param parameters The maintenance configuration to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -555,7 +565,8 @@ public MaintenanceConfigurationInner createOrUpdate(String resourceGroupName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -582,7 +593,7 @@ public Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, St if (configName == null) { return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, @@ -595,7 +606,8 @@ public Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -623,7 +635,7 @@ private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, S if (configName == null) { return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -635,7 +647,8 @@ private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, S * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -651,7 +664,8 @@ public Mono<Void> deleteAsync(String resourceGroupName, String resourceName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -669,7 +683,8 @@ public Response<Void> deleteWithResponse(String resourceGroupName, String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param configName The name of the maintenance configuration. + * @param configName The name of the maintenance configuration. Supported values are 'default', + * 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClusterSnapshotsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClusterSnapshotsClientImpl.java deleted file mode 100644 index 7a11708c645d..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClusterSnapshotsClientImpl.java +++ /dev/null @@ -1,1020 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.containerservice.fluent.ManagedClusterSnapshotsClient; -import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterSnapshotInner; -import com.azure.resourcemanager.containerservice.models.ManagedClusterSnapshotListResult; -import com.azure.resourcemanager.containerservice.models.TagsObject; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ManagedClusterSnapshotsClient. - */ -public final class ManagedClusterSnapshotsClientImpl implements InnerSupportsGet<ManagedClusterSnapshotInner>, - InnerSupportsListing<ManagedClusterSnapshotInner>, InnerSupportsDelete<Void>, ManagedClusterSnapshotsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedClusterSnapshotsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of ManagedClusterSnapshotsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedClusterSnapshotsClientImpl(ContainerServiceManagementClientImpl client) { - this.service = RestProxy.create(ManagedClusterSnapshotsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientManagedClusterSnapshots to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientManagedClusterSnapshots") - public interface ManagedClusterSnapshotsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<ManagedClusterSnapshotListResult>> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<ManagedClusterSnapshotListResult>> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<ManagedClusterSnapshotInner>> getByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<ManagedClusterSnapshotInner>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ManagedClusterSnapshotInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<ManagedClusterSnapshotInner>> updateTags(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") TagsObject parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<Void>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<ManagedClusterSnapshotListResult>> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<ManagedClusterSnapshotListResult>> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of managed cluster snapshots in the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed cluster snapshots in the specified subscription along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<ManagedClusterSnapshotInner>> 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 apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - accept, context)) - .<PagedResponse<ManagedClusterSnapshotInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of managed cluster snapshots in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed cluster snapshots in the specified subscription along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<ManagedClusterSnapshotInner>> 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 apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of managed cluster snapshots in the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed cluster snapshots in the specified subscription as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux<ManagedClusterSnapshotInner> listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of managed cluster snapshots in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed cluster snapshots in the specified subscription as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux<ManagedClusterSnapshotInner> listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of managed cluster snapshots in the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed cluster snapshots in the specified subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<ManagedClusterSnapshotInner> list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Gets a list of managed cluster snapshots in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed cluster snapshots in the specified subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<ManagedClusterSnapshotInner> list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Lists managed cluster snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Managed Cluster Snapshots operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<ManagedClusterSnapshotInner>> - 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 apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .<PagedResponse<ManagedClusterSnapshotInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists managed cluster snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Managed Cluster Snapshots operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<ManagedClusterSnapshotInner>> - 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 apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists managed cluster snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Managed Cluster Snapshots operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux<ManagedClusterSnapshotInner> listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists managed cluster snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Managed Cluster Snapshots operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux<ManagedClusterSnapshotInner> listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists managed cluster snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Managed Cluster Snapshots operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<ManagedClusterSnapshotInner> listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Lists managed cluster snapshots in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Managed Cluster Snapshots operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<ManagedClusterSnapshotInner> listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Gets a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<ManagedClusterSnapshotInner>> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<ManagedClusterSnapshotInner>> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context); - } - - /** - * Gets a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<ManagedClusterSnapshotInner> getByResourceGroupAsync(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<ManagedClusterSnapshotInner> getByResourceGroupWithResponse(String resourceGroupName, - String resourceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Gets a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterSnapshotInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); - } - - /** - * Creates or updates a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster snapshot to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<ManagedClusterSnapshotInner>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, ManagedClusterSnapshotInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster snapshot to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<ManagedClusterSnapshotInner>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, ManagedClusterSnapshotInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, parameters, accept, context); - } - - /** - * Creates or updates a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster snapshot to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<ManagedClusterSnapshotInner> createOrUpdateAsync(String resourceGroupName, String resourceName, - ManagedClusterSnapshotInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster snapshot to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<ManagedClusterSnapshotInner> createOrUpdateWithResponse(String resourceGroupName, - String resourceName, ManagedClusterSnapshotInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); - } - - /** - * Creates or updates a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster snapshot to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterSnapshotInner createOrUpdate(String resourceGroupName, String resourceName, - ManagedClusterSnapshotInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); - } - - /** - * Updates tags on a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<ManagedClusterSnapshotInner>> updateTagsWithResponseAsync(String resourceGroupName, - String resourceName, TagsObject parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.updateTags(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates tags on a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<ManagedClusterSnapshotInner>> updateTagsWithResponseAsync(String resourceGroupName, - String resourceName, TagsObject parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateTags(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, parameters, accept, context); - } - - /** - * Updates tags on a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<ManagedClusterSnapshotInner> updateTagsAsync(String resourceGroupName, String resourceName, - TagsObject parameters) { - return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Updates tags on a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<ManagedClusterSnapshotInner> updateTagsWithResponse(String resourceGroupName, String resourceName, - TagsObject parameters, Context context) { - return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); - } - - /** - * Updates tags on a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed cluster snapshot resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterSnapshotInner updateTags(String resourceGroupName, String resourceName, - TagsObject parameters) { - return updateTagsWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); - } - - /** - * Deletes a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, accept, context); - } - - /** - * Deletes a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Void> deleteAsync(String resourceGroupName, String resourceName) { - return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<Void> deleteWithResponse(String resourceGroupName, String resourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Deletes a managed cluster snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName) { - deleteWithResponse(resourceGroupName, resourceName, Context.NONE); - } - - /** - * Gets a list of managed cluster snapshots in the specified subscription. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed cluster snapshots in the specified subscription along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<ManagedClusterSnapshotInner>> 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)) - .<PagedResponse<ManagedClusterSnapshotInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of managed cluster snapshots in the specified subscription. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed cluster snapshots in the specified subscription along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<ManagedClusterSnapshotInner>> 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)); - } - - /** - * Lists managed cluster snapshots in the specified subscription and resource group. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Managed Cluster Snapshots operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<ManagedClusterSnapshotInner>> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .<PagedResponse<ManagedClusterSnapshotInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists managed cluster snapshots in the specified subscription and resource group. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Managed Cluster Snapshots operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<ManagedClusterSnapshotInner>> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java index 9ec10e410a57..039c84a87d5b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java @@ -35,7 +35,6 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservice.fluent.ManagedClustersClient; import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner; -import com.azure.resourcemanager.containerservice.fluent.models.GuardrailsAvailableVersionInner; import com.azure.resourcemanager.containerservice.fluent.models.KubernetesVersionListResultInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterAccessProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; @@ -44,9 +43,7 @@ import com.azure.resourcemanager.containerservice.fluent.models.MeshUpgradeProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; import com.azure.resourcemanager.containerservice.fluent.models.RunCommandResultInner; -import com.azure.resourcemanager.containerservice.fluent.models.SafeguardsAvailableVersionInner; import com.azure.resourcemanager.containerservice.models.Format; -import com.azure.resourcemanager.containerservice.models.GuardrailsAvailableVersionsList; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterListResult; import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; @@ -54,9 +51,7 @@ import com.azure.resourcemanager.containerservice.models.MeshRevisionProfileList; import com.azure.resourcemanager.containerservice.models.MeshUpgradeProfileList; import com.azure.resourcemanager.containerservice.models.OutboundEnvironmentEndpointCollection; -import com.azure.resourcemanager.containerservice.models.RebalanceLoadBalancersRequestBody; import com.azure.resourcemanager.containerservice.models.RunCommandRequest; -import com.azure.resourcemanager.containerservice.models.SafeguardsAvailableVersionsList; import com.azure.resourcemanager.containerservice.models.TagsObject; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; @@ -206,9 +201,7 @@ Mono<Response<Flux<ByteBuffer>>> updateTags(@HostParam("$host") String endpoint, Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("If-Match") String ifMatch, - @QueryParam("ignore-pod-disruption-budget") Boolean ignorePodDisruptionBudget, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-Match") String ifMatch, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile") @@ -231,19 +224,19 @@ Mono<Response<Flux<ByteBuffer>>> resetAadProfile(@HostParam("$host") String endp Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<Flux<ByteBuffer>>> abortLatestOperation(@HostParam("$host") String endpoint, + Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificates(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificates(@HostParam("$host") String endpoint, + Mono<Response<Flux<ByteBuffer>>> abortLatestOperation(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); @@ -304,40 +297,6 @@ Mono<Response<OutboundEnvironmentEndpointCollection>> listOutboundNetworkDepende @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<GuardrailsAvailableVersionInner>> getGuardrailsVersions(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @PathParam("version") String version, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<GuardrailsAvailableVersionsList>> listGuardrailsVersions(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions/{version}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<SafeguardsAvailableVersionInner>> getSafeguardsVersions(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @PathParam("version") String version, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<SafeguardsAvailableVersionsList>> listSafeguardsVersions(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles") @ExpectedResponses({ 200 }) @@ -373,16 +332,6 @@ Mono<Response<MeshUpgradeProfileInner>> getMeshUpgradeProfile(@HostParam("$host" @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("mode") String mode, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rebalanceLoadBalancers") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<Flux<ByteBuffer>>> rebalanceLoadBalancers(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") RebalanceLoadBalancersRequestBody parameters, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -407,22 +356,6 @@ Mono<Response<OutboundEnvironmentEndpointCollection>> listOutboundNetworkDepende @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<Response<GuardrailsAvailableVersionsList>> listGuardrailsVersionsNext( - @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<Response<SafeguardsAvailableVersionsList>> listSafeguardsVersionsNext( - @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 }) @@ -466,7 +399,7 @@ public Mono<Response<KubernetesVersionListResultInner>> listKubernetesVersionsWi if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listKubernetesVersions(this.client.getEndpoint(), apiVersion, @@ -502,7 +435,7 @@ private Mono<Response<KubernetesVersionListResultInner>> listKubernetesVersionsW if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listKubernetesVersions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -580,7 +513,7 @@ private Mono<PagedResponse<ManagedClusterInner>> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -610,7 +543,7 @@ private Mono<PagedResponse<ManagedClusterInner>> listSinglePageAsync(Context con return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -697,7 +630,7 @@ private Mono<PagedResponse<ManagedClusterInner>> listByResourceGroupSinglePageAs return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, @@ -733,7 +666,7 @@ private Mono<PagedResponse<ManagedClusterInner>> listByResourceGroupSinglePageAs return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -832,7 +765,7 @@ public PagedIterable<ManagedClusterInner> listByResourceGroup(String resourceGro if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getUpgradeProfile(this.client.getEndpoint(), apiVersion, @@ -870,7 +803,7 @@ public PagedIterable<ManagedClusterInner> listByResourceGroup(String resourceGro if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getUpgradeProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -964,7 +897,7 @@ public Mono<Response<ManagedClusterAccessProfileInner>> getAccessProfileWithResp if (roleName == null) { return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getAccessProfile(this.client.getEndpoint(), apiVersion, @@ -1011,7 +944,7 @@ private Mono<Response<ManagedClusterAccessProfileInner>> getAccessProfileWithRes if (roleName == null) { return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getAccessProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1118,7 +1051,7 @@ public Mono<Response<CredentialResultsInner>> listClusterAdminCredentialsWithRes if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listClusterAdminCredentials(this.client.getEndpoint(), apiVersion, @@ -1156,7 +1089,7 @@ private Mono<Response<CredentialResultsInner>> listClusterAdminCredentialsWithRe if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listClusterAdminCredentials(this.client.getEndpoint(), apiVersion, @@ -1249,7 +1182,7 @@ public Mono<Response<CredentialResultsInner>> listClusterUserCredentialsWithResp if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listClusterUserCredentials(this.client.getEndpoint(), apiVersion, @@ -1290,7 +1223,7 @@ private Mono<Response<CredentialResultsInner>> listClusterUserCredentialsWithRes if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listClusterUserCredentials(this.client.getEndpoint(), apiVersion, @@ -1384,7 +1317,7 @@ public Mono<Response<CredentialResultsInner>> listClusterMonitoringUserCredentia if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listClusterMonitoringUserCredentials(this.client.getEndpoint(), apiVersion, @@ -1422,7 +1355,7 @@ private Mono<Response<CredentialResultsInner>> listClusterMonitoringUserCredenti if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listClusterMonitoringUserCredentials(this.client.getEndpoint(), apiVersion, @@ -1511,7 +1444,7 @@ public Mono<Response<ManagedClusterInner>> getByResourceGroupWithResponseAsync(S if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, @@ -1548,7 +1481,7 @@ private Mono<Response<ManagedClusterInner>> getByResourceGroupWithResponseAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1639,7 +1572,7 @@ public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -1685,7 +1618,7 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1940,7 +1873,7 @@ public Mono<Response<Flux<ByteBuffer>>> updateTagsWithResponseAsync(String resou } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), apiVersion, @@ -1984,7 +1917,7 @@ private Mono<Response<Flux<ByteBuffer>>> updateTagsWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -2193,8 +2126,6 @@ public ManagedClusterInner updateTags(String resourceGroupName, String resourceN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2202,7 +2133,7 @@ public ManagedClusterInner updateTags(String resourceGroupName, String resourceN */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String ifMatch, Boolean ignorePodDisruptionBudget) { + String ifMatch) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2218,12 +2149,11 @@ public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceG if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -2233,8 +2163,6 @@ public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceG * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2243,7 +2171,7 @@ public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String ifMatch, Boolean ignorePodDisruptionBudget, Context context) { + String ifMatch, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2259,11 +2187,11 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, ifMatch, ignorePodDisruptionBudget, accept, context); + resourceName, ifMatch, accept, context); } /** @@ -2272,8 +2200,6 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2281,9 +2207,8 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String ifMatch, Boolean ignorePodDisruptionBudget) { - Mono<Response<Flux<ByteBuffer>>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget); + String ifMatch) { + Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch); return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -2301,9 +2226,7 @@ public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupN @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName) { final String ifMatch = null; - final Boolean ignorePodDisruptionBudget = null; - Mono<Response<Flux<ByteBuffer>>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget); + Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch); return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -2314,8 +2237,6 @@ public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2324,10 +2245,10 @@ public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupN */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String ifMatch, Boolean ignorePodDisruptionBudget, Context context) { + String ifMatch, Context context) { context = this.client.mergeContext(context); Mono<Response<Flux<ByteBuffer>>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context); + = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, context); return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } @@ -2345,9 +2266,7 @@ private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName) { final String ifMatch = null; - final Boolean ignorePodDisruptionBudget = null; - return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget) - .getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch).getSyncPoller(); } /** @@ -2356,8 +2275,6 @@ public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2366,9 +2283,8 @@ public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, String ifMatch, - Boolean ignorePodDisruptionBudget, Context context) { - return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context) - .getSyncPoller(); + Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch, context).getSyncPoller(); } /** @@ -2377,17 +2293,14 @@ public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String ifMatch, - Boolean ignorePodDisruptionBudget) { - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget).last() + public Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String ifMatch) { + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2404,8 +2317,7 @@ public Mono<Void> deleteAsync(String resourceGroupName, String resourceName, Str @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Void> deleteAsync(String resourceGroupName, String resourceName) { final String ifMatch = null; - final Boolean ignorePodDisruptionBudget = null; - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget).last() + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2415,8 +2327,6 @@ public Mono<Void> deleteAsync(String resourceGroupName, String resourceName) { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2424,9 +2334,8 @@ public Mono<Void> deleteAsync(String resourceGroupName, String resourceName) { * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String ifMatch, - Boolean ignorePodDisruptionBudget, Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context).last() + private Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String ifMatch, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2442,8 +2351,7 @@ private Mono<Void> deleteAsync(String resourceGroupName, String resourceName, St @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String resourceName) { final String ifMatch = null; - final Boolean ignorePodDisruptionBudget = null; - deleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget).block(); + deleteAsync(resourceGroupName, resourceName, ifMatch).block(); } /** @@ -2452,17 +2360,14 @@ public void delete(String resourceGroupName, String resourceName) { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. - * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without - * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String ifMatch, Boolean ignorePodDisruptionBudget, - Context context) { - deleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context).block(); + public void delete(String resourceGroupName, String resourceName, String ifMatch, Context context) { + deleteAsync(resourceGroupName, resourceName, ifMatch, context).block(); } /** @@ -2501,7 +2406,7 @@ public Mono<Response<Flux<ByteBuffer>>> resetServicePrincipalProfileWithResponse } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.resetServicePrincipalProfile(this.client.getEndpoint(), apiVersion, @@ -2546,7 +2451,7 @@ private Mono<Response<Flux<ByteBuffer>>> resetServicePrincipalProfileWithRespons } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.resetServicePrincipalProfile(this.client.getEndpoint(), apiVersion, @@ -2754,7 +2659,7 @@ public Mono<Response<Flux<ByteBuffer>>> resetAadProfileWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.resetAadProfile(this.client.getEndpoint(), apiVersion, @@ -2800,7 +2705,7 @@ private Mono<Response<Flux<ByteBuffer>>> resetAadProfileWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.resetAadProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -2978,11 +2883,10 @@ public void resetAadProfile(String resourceGroupName, String resourceName, Manag } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, an error is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -2992,7 +2896,7 @@ public void resetAadProfile(String resourceGroupName, String resourceName, Manag * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String resourceGroupName, + public Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -3009,20 +2913,19 @@ public Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(St if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.abortLatestOperation(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.rotateClusterCertificates(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, an error is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3033,7 +2936,7 @@ public Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(St * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String resourceGroupName, + private Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, String resourceName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -3050,19 +2953,18 @@ private Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(S if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.abortLatestOperation(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + return service.rotateClusterCertificates(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, an error is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3072,19 +2974,19 @@ private Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(S * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String resourceGroupName, + public PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, String resourceName) { - Mono<Response<Flux<ByteBuffer>>> mono = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName); + Mono<Response<Flux<ByteBuffer>>> mono + = rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName); return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, an error is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3095,21 +2997,20 @@ public PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String resourceGroupName, + private PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, String resourceName, Context context) { context = this.client.mergeContext(context); Mono<Response<Flux<ByteBuffer>>> mono - = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName, context); + = rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName, context); return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, an error is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3119,16 +3020,16 @@ private PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName) { - return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName).getSyncPoller(); + public SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourceGroupName, + String resourceName) { + return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).getSyncPoller(); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, an error is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3139,17 +3040,16 @@ public SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resou * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, - Context context) { - return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName, context).getSyncPoller(); + public SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourceGroupName, + String resourceName, Context context) { + return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).getSyncPoller(); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, an error is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3159,17 +3059,16 @@ public SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resou * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Void> abortLatestOperationAsync(String resourceGroupName, String resourceName) { - return beginAbortLatestOperationAsync(resourceGroupName, resourceName).last() + public Mono<Void> rotateClusterCertificatesAsync(String resourceGroupName, String resourceName) { + return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, an error is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3180,17 +3079,16 @@ public Mono<Void> abortLatestOperationAsync(String resourceGroupName, String res * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Void> abortLatestOperationAsync(String resourceGroupName, String resourceName, Context context) { - return beginAbortLatestOperationAsync(resourceGroupName, resourceName, context).last() + private Mono<Void> rotateClusterCertificatesAsync(String resourceGroupName, String resourceName, Context context) { + return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, an error is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3199,16 +3097,15 @@ private Mono<Void> abortLatestOperationAsync(String resourceGroupName, String re * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void abortLatestOperation(String resourceGroupName, String resourceName) { - abortLatestOperationAsync(resourceGroupName, resourceName).block(); + public void rotateClusterCertificates(String resourceGroupName, String resourceName) { + rotateClusterCertificatesAsync(resourceGroupName, resourceName).block(); } /** - * Aborts last operation running on managed cluster. + * Rotates the certificates of a managed cluster. * - * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling - * state and eventually to a Canceled state when cancellation finishes. If the operation completes before - * cancellation can take place, an error is returned. + * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about + * rotating managed cluster certificates. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3218,15 +3115,16 @@ public void abortLatestOperation(String resourceGroupName, String resourceName) * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void abortLatestOperation(String resourceGroupName, String resourceName, Context context) { - abortLatestOperationAsync(resourceGroupName, resourceName, context).block(); + public void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context) { + rotateClusterCertificatesAsync(resourceGroupName, resourceName, context).block(); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3236,7 +3134,7 @@ public void abortLatestOperation(String resourceGroupName, String resourceName, * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, + public Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -3253,19 +3151,20 @@ public Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsy if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.rotateClusterCertificates(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.abortLatestOperation(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3276,7 +3175,7 @@ public Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsy * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, + private Mono<Response<Flux<ByteBuffer>>> abortLatestOperationWithResponseAsync(String resourceGroupName, String resourceName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -3293,18 +3192,19 @@ private Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAs if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.rotateClusterCertificates(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + return service.abortLatestOperation(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3314,19 +3214,19 @@ private Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAs * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, + public PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String resourceGroupName, String resourceName) { - Mono<Response<Flux<ByteBuffer>>> mono - = rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName); + Mono<Response<Flux<ByteBuffer>>> mono = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName); return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3337,20 +3237,21 @@ public PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(St * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(String resourceGroupName, + private PollerFlux<PollResult<Void>, Void> beginAbortLatestOperationAsync(String resourceGroupName, String resourceName, Context context) { context = this.client.mergeContext(context); Mono<Response<Flux<ByteBuffer>>> mono - = rotateClusterCertificatesWithResponseAsync(resourceGroupName, resourceName, context); + = abortLatestOperationWithResponseAsync(resourceGroupName, resourceName, context); return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3360,16 +3261,16 @@ private PollerFlux<PollResult<Void>, Void> beginRotateClusterCertificatesAsync(S * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourceGroupName, - String resourceName) { - return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).getSyncPoller(); + public SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName) { + return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName).getSyncPoller(); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3380,16 +3281,17 @@ public SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String resourceGroupName, - String resourceName, Context context) { - return this.beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).getSyncPoller(); + public SyncPoller<PollResult<Void>, Void> beginAbortLatestOperation(String resourceGroupName, String resourceName, + Context context) { + return this.beginAbortLatestOperationAsync(resourceGroupName, resourceName, context).getSyncPoller(); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3399,16 +3301,17 @@ public SyncPoller<PollResult<Void>, Void> beginRotateClusterCertificates(String * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Void> rotateClusterCertificatesAsync(String resourceGroupName, String resourceName) { - return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName).last() + public Mono<Void> abortLatestOperationAsync(String resourceGroupName, String resourceName) { + return beginAbortLatestOperationAsync(resourceGroupName, resourceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3419,16 +3322,17 @@ public Mono<Void> rotateClusterCertificatesAsync(String resourceGroupName, Strin * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Void> rotateClusterCertificatesAsync(String resourceGroupName, String resourceName, Context context) { - return beginRotateClusterCertificatesAsync(resourceGroupName, resourceName, context).last() + private Mono<Void> abortLatestOperationAsync(String resourceGroupName, String resourceName, Context context) { + return beginAbortLatestOperationAsync(resourceGroupName, resourceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3437,15 +3341,16 @@ private Mono<Void> rotateClusterCertificatesAsync(String resourceGroupName, Stri * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void rotateClusterCertificates(String resourceGroupName, String resourceName) { - rotateClusterCertificatesAsync(resourceGroupName, resourceName).block(); + public void abortLatestOperation(String resourceGroupName, String resourceName) { + abortLatestOperationAsync(resourceGroupName, resourceName).block(); } /** - * Rotates the certificates of a managed cluster. + * Aborts last operation running on managed cluster. * - * See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about - * rotating managed cluster certificates. + * Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling + * state and eventually to a Canceled state when cancellation finishes. If the operation completes before + * cancellation can take place, a 409 error code is returned. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. @@ -3455,8 +3360,8 @@ public void rotateClusterCertificates(String resourceGroupName, String resourceN * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void rotateClusterCertificates(String resourceGroupName, String resourceName, Context context) { - rotateClusterCertificatesAsync(resourceGroupName, resourceName, context).block(); + public void abortLatestOperation(String resourceGroupName, String resourceName, Context context) { + abortLatestOperationAsync(resourceGroupName, resourceName, context).block(); } /** @@ -3487,7 +3392,7 @@ public Mono<Response<Flux<ByteBuffer>>> rotateServiceAccountSigningKeysWithRespo if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.rotateServiceAccountSigningKeys(this.client.getEndpoint(), apiVersion, @@ -3524,7 +3429,7 @@ private Mono<Response<Flux<ByteBuffer>>> rotateServiceAccountSigningKeysWithResp if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.rotateServiceAccountSigningKeys(this.client.getEndpoint(), apiVersion, @@ -3699,7 +3604,7 @@ public Mono<Response<Flux<ByteBuffer>>> stopWithResponseAsync(String resourceGro if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.stop(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -3741,7 +3646,7 @@ private Mono<Response<Flux<ByteBuffer>>> stopWithResponseAsync(String resourceGr if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.stop(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -3948,7 +3853,7 @@ public Mono<Response<Flux<ByteBuffer>>> startWithResponseAsync(String resourceGr if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.start(this.client.getEndpoint(), apiVersion, @@ -3988,7 +3893,7 @@ private Mono<Response<Flux<ByteBuffer>>> startWithResponseAsync(String resourceG if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.start(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -4186,7 +4091,7 @@ public Mono<Response<Flux<ByteBuffer>>> runCommandWithResponseAsync(String resou } else { requestPayload.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.runCommand(this.client.getEndpoint(), apiVersion, @@ -4232,7 +4137,7 @@ private Mono<Response<Flux<ByteBuffer>>> runCommandWithResponseAsync(String reso } else { requestPayload.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.runCommand(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -4446,7 +4351,7 @@ public Mono<ManagedClustersGetCommandResultResponse> getCommandResultWithRespons if (commandId == null) { return Mono.error(new IllegalArgumentException("Parameter commandId is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getCommandResult(this.client.getEndpoint(), apiVersion, @@ -4488,7 +4393,7 @@ private Mono<ManagedClustersGetCommandResultResponse> getCommandResultWithRespon if (commandId == null) { return Mono.error(new IllegalArgumentException("Parameter commandId is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getCommandResult(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -4581,7 +4486,7 @@ public RunCommandResultInner getCommandResult(String resourceGroupName, String r if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), @@ -4626,7 +4531,7 @@ public RunCommandResultInner getCommandResult(String resourceGroupName, String r if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -4728,148 +4633,20 @@ public RunCommandResultInner getCommandResult(String resourceGroupName, String r } /** - * Gets supported Guardrails version in the specified subscription and location. - * - * Contains Guardrails version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @param version Safeguards version. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Guardrails Version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<GuardrailsAvailableVersionInner>> getGuardrailsVersionsWithResponseAsync(String location, - String version) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getGuardrailsVersions(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), location, version, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets supported Guardrails version in the specified subscription and location. - * - * Contains Guardrails version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @param version Safeguards version. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Guardrails Version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<GuardrailsAvailableVersionInner>> getGuardrailsVersionsWithResponseAsync(String location, - String version, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getGuardrailsVersions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - location, version, accept, context); - } - - /** - * Gets supported Guardrails version in the specified subscription and location. - * - * Contains Guardrails version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @param version Safeguards version. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Guardrails Version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<GuardrailsAvailableVersionInner> getGuardrailsVersionsAsync(String location, String version) { - return getGuardrailsVersionsWithResponseAsync(location, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets supported Guardrails version in the specified subscription and location. - * - * Contains Guardrails version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @param version Safeguards version. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Guardrails Version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<GuardrailsAvailableVersionInner> getGuardrailsVersionsWithResponse(String location, String version, - Context context) { - return getGuardrailsVersionsWithResponseAsync(location, version, context).block(); - } - - /** - * Gets supported Guardrails version in the specified subscription and location. - * - * Contains Guardrails version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @param version Safeguards version. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Guardrails Version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GuardrailsAvailableVersionInner getGuardrailsVersions(String location, String version) { - return getGuardrailsVersionsWithResponse(location, version, Context.NONE).getValue(); - } - - /** - * Gets a list of supported Guardrails versions in the specified subscription and location. + * Lists mesh revision profiles for all meshes in the specified location. * - * Contains list of Guardrails version along with its support info and whether it is a default version. + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of GuardrailsVersions along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<GuardrailsAvailableVersionInner>> - listGuardrailsVersionsSinglePageAsync(String location) { + private Mono<PagedResponse<MeshRevisionProfileInner>> listMeshRevisionProfilesSinglePageAsync(String location) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4881,31 +4658,32 @@ public GuardrailsAvailableVersionInner getGuardrailsVersions(String location, St if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listGuardrailsVersions(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.listMeshRevisionProfiles(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, accept, context)) - .<PagedResponse<GuardrailsAvailableVersionInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + .<PagedResponse<MeshRevisionProfileInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of supported Guardrails versions in the specified subscription and location. + * Lists mesh revision profiles for all meshes in the specified location. * - * Contains list of Guardrails version along with its support info and whether it is a default version. + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of GuardrailsVersions along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<GuardrailsAvailableVersionInner>> listGuardrailsVersionsSinglePageAsync(String location, + private Mono<PagedResponse<MeshRevisionProfileInner>> listMeshRevisionProfilesSinglePageAsync(String location, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -4918,103 +4696,104 @@ private Mono<PagedResponse<GuardrailsAvailableVersionInner>> listGuardrailsVersi if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listGuardrailsVersions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, + .listMeshRevisionProfiles(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a list of supported Guardrails versions in the specified subscription and location. + * Lists mesh revision profiles for all meshes in the specified location. * - * Contains list of Guardrails version along with its support info and whether it is a default version. + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of GuardrailsVersions as paginated response with - * {@link PagedFlux}. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux<GuardrailsAvailableVersionInner> listGuardrailsVersionsAsync(String location) { - return new PagedFlux<>(() -> listGuardrailsVersionsSinglePageAsync(location), - nextLink -> listGuardrailsVersionsNextSinglePageAsync(nextLink)); + public PagedFlux<MeshRevisionProfileInner> listMeshRevisionProfilesAsync(String location) { + return new PagedFlux<>(() -> listMeshRevisionProfilesSinglePageAsync(location), + nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink)); } /** - * Gets a list of supported Guardrails versions in the specified subscription and location. + * Lists mesh revision profiles for all meshes in the specified location. * - * Contains list of Guardrails version along with its support info and whether it is a default version. + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of GuardrailsVersions as paginated response with - * {@link PagedFlux}. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux<GuardrailsAvailableVersionInner> listGuardrailsVersionsAsync(String location, Context context) { - return new PagedFlux<>(() -> listGuardrailsVersionsSinglePageAsync(location, context), - nextLink -> listGuardrailsVersionsNextSinglePageAsync(nextLink, context)); + private PagedFlux<MeshRevisionProfileInner> listMeshRevisionProfilesAsync(String location, Context context) { + return new PagedFlux<>(() -> listMeshRevisionProfilesSinglePageAsync(location, context), + nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink, context)); } /** - * Gets a list of supported Guardrails versions in the specified subscription and location. + * Lists mesh revision profiles for all meshes in the specified location. * - * Contains list of Guardrails version along with its support info and whether it is a default version. + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of GuardrailsVersions as paginated response with - * {@link PagedIterable}. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<GuardrailsAvailableVersionInner> listGuardrailsVersions(String location) { - return new PagedIterable<>(listGuardrailsVersionsAsync(location)); + public PagedIterable<MeshRevisionProfileInner> listMeshRevisionProfiles(String location) { + return new PagedIterable<>(listMeshRevisionProfilesAsync(location)); } /** - * Gets a list of supported Guardrails versions in the specified subscription and location. + * Lists mesh revision profiles for all meshes in the specified location. * - * Contains list of Guardrails version along with its support info and whether it is a default version. + * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available + * upgrades. * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of GuardrailsVersions as paginated response with - * {@link PagedIterable}. + * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<GuardrailsAvailableVersionInner> listGuardrailsVersions(String location, Context context) { - return new PagedIterable<>(listGuardrailsVersionsAsync(location, context)); + public PagedIterable<MeshRevisionProfileInner> listMeshRevisionProfiles(String location, Context context) { + return new PagedIterable<>(listMeshRevisionProfilesAsync(location, context)); } /** - * Gets supported Safeguards version in the specified subscription and location. + * Gets a mesh revision profile for a specified mesh in the specified location. * - * Contains Safeguards version along with its support info and whether it is a default version. + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. * * @param location The name of the Azure region. - * @param version Safeguards version. + * @param mode The mode of the mesh. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Safeguards Version along with {@link Response} on successful completion of {@link Mono}. + * @return mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<SafeguardsAvailableVersionInner>> getSafeguardsVersionsWithResponseAsync(String location, - String version) { + public Mono<Response<MeshRevisionProfileInner>> getMeshRevisionProfileWithResponseAsync(String location, + String mode) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5026,33 +4805,34 @@ public Mono<Response<SafeguardsAvailableVersionInner>> getSafeguardsVersionsWith if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getSafeguardsVersions(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), location, version, accept, context)) + .withContext(context -> service.getMeshRevisionProfile(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), location, mode, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets supported Safeguards version in the specified subscription and location. + * Gets a mesh revision profile for a specified mesh in the specified location. * - * Contains Safeguards version along with its support info and whether it is a default version. + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. * * @param location The name of the Azure region. - * @param version Safeguards version. + * @param mode The mode of the mesh. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Safeguards Version along with {@link Response} on successful completion of {@link Mono}. + * @return mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<SafeguardsAvailableVersionInner>> getSafeguardsVersionsWithResponseAsync(String location, - String version, Context context) { + private Mono<Response<MeshRevisionProfileInner>> getMeshRevisionProfileWithResponseAsync(String location, + String mode, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5064,85 +4844,86 @@ private Mono<Response<SafeguardsAvailableVersionInner>> getSafeguardsVersionsWit if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getSafeguardsVersions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - location, version, accept, context); + return service.getMeshRevisionProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + location, mode, accept, context); } /** - * Gets supported Safeguards version in the specified subscription and location. + * Gets a mesh revision profile for a specified mesh in the specified location. * - * Contains Safeguards version along with its support info and whether it is a default version. + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. * * @param location The name of the Azure region. - * @param version Safeguards version. + * @param mode The mode of the mesh. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Safeguards Version on successful completion of {@link Mono}. + * @return mesh revision profile for a mesh on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<SafeguardsAvailableVersionInner> getSafeguardsVersionsAsync(String location, String version) { - return getSafeguardsVersionsWithResponseAsync(location, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono<MeshRevisionProfileInner> getMeshRevisionProfileAsync(String location, String mode) { + return getMeshRevisionProfileWithResponseAsync(location, mode).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets supported Safeguards version in the specified subscription and location. + * Gets a mesh revision profile for a specified mesh in the specified location. * - * Contains Safeguards version along with its support info and whether it is a default version. + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. * * @param location The name of the Azure region. - * @param version Safeguards version. + * @param mode The mode of the mesh. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Safeguards Version along with {@link Response}. + * @return mesh revision profile for a mesh along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response<SafeguardsAvailableVersionInner> getSafeguardsVersionsWithResponse(String location, String version, + public Response<MeshRevisionProfileInner> getMeshRevisionProfileWithResponse(String location, String mode, Context context) { - return getSafeguardsVersionsWithResponseAsync(location, version, context).block(); + return getMeshRevisionProfileWithResponseAsync(location, mode, context).block(); } /** - * Gets supported Safeguards version in the specified subscription and location. + * Gets a mesh revision profile for a specified mesh in the specified location. * - * Contains Safeguards version along with its support info and whether it is a default version. + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. * * @param location The name of the Azure region. - * @param version Safeguards version. + * @param mode The mode of the mesh. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available Safeguards Version. + * @return mesh revision profile for a mesh. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SafeguardsAvailableVersionInner getSafeguardsVersions(String location, String version) { - return getSafeguardsVersionsWithResponse(location, version, Context.NONE).getValue(); + public MeshRevisionProfileInner getMeshRevisionProfile(String location, String mode) { + return getMeshRevisionProfileWithResponse(location, mode, Context.NONE).getValue(); } /** - * Gets a list of supported Safeguards versions in the specified subscription and location. - * - * Contains list of Safeguards version along with its support info and whether it is a default version. + * Lists available upgrades for all service meshes in a specific cluster. * - * @param location The name of the Azure region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of SafeguardsVersions along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<SafeguardsAvailableVersionInner>> - listSafeguardsVersionsSinglePageAsync(String location) { + private Mono<PagedResponse<MeshUpgradeProfileInner>> + listMeshUpgradeProfilesSinglePageAsync(String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5151,35 +4932,38 @@ public SafeguardsAvailableVersionInner getSafeguardsVersions(String location, St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listSafeguardsVersions(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), location, accept, context)) - .<PagedResponse<SafeguardsAvailableVersionInner>>map(res -> new PagedResponseBase<>(res.getRequest(), + .withContext(context -> service.listMeshUpgradeProfiles(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .<PagedResponse<MeshUpgradeProfileInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of supported Safeguards versions in the specified subscription and location. - * - * Contains list of Safeguards version along with its support info and whether it is a default version. + * Lists available upgrades for all service meshes in a specific cluster. * - * @param location The name of the Azure region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of SafeguardsVersions along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<SafeguardsAvailableVersionInner>> listSafeguardsVersionsSinglePageAsync(String location, - Context context) { + private Mono<PagedResponse<MeshUpgradeProfileInner>> + listMeshUpgradeProfilesSinglePageAsync(String resourceGroupName, String resourceName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5188,632 +4972,89 @@ private Mono<PagedResponse<SafeguardsAvailableVersionInner>> listSafeguardsVersi return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listSafeguardsVersions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, - accept, context) + .listMeshUpgradeProfiles(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a list of supported Safeguards versions in the specified subscription and location. - * - * Contains list of Safeguards version along with its support info and whether it is a default version. + * Lists available upgrades for all service meshes in a specific cluster. * - * @param location The name of the Azure region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of SafeguardsVersions as paginated response with - * {@link PagedFlux}. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux<SafeguardsAvailableVersionInner> listSafeguardsVersionsAsync(String location) { - return new PagedFlux<>(() -> listSafeguardsVersionsSinglePageAsync(location), - nextLink -> listSafeguardsVersionsNextSinglePageAsync(nextLink)); + public PagedFlux<MeshUpgradeProfileInner> listMeshUpgradeProfilesAsync(String resourceGroupName, + String resourceName) { + return new PagedFlux<>(() -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink)); } /** - * Gets a list of supported Safeguards versions in the specified subscription and location. - * - * Contains list of Safeguards version along with its support info and whether it is a default version. + * Lists available upgrades for all service meshes in a specific cluster. * - * @param location The name of the Azure region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of SafeguardsVersions as paginated response with - * {@link PagedFlux}. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux<SafeguardsAvailableVersionInner> listSafeguardsVersionsAsync(String location, Context context) { - return new PagedFlux<>(() -> listSafeguardsVersionsSinglePageAsync(location, context), - nextLink -> listSafeguardsVersionsNextSinglePageAsync(nextLink, context)); + private PagedFlux<MeshUpgradeProfileInner> listMeshUpgradeProfilesAsync(String resourceGroupName, + String resourceName, Context context) { + return new PagedFlux<>(() -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink, context)); } /** - * Gets a list of supported Safeguards versions in the specified subscription and location. - * - * Contains list of Safeguards version along with its support info and whether it is a default version. + * Lists available upgrades for all service meshes in a specific cluster. * - * @param location The name of the Azure region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of SafeguardsVersions as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<SafeguardsAvailableVersionInner> listSafeguardsVersions(String location) { - return new PagedIterable<>(listSafeguardsVersionsAsync(location)); - } - - /** - * Gets a list of supported Safeguards versions in the specified subscription and location. - * - * Contains list of Safeguards version along with its support info and whether it is a default version. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of SafeguardsVersions as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<SafeguardsAvailableVersionInner> listSafeguardsVersions(String location, Context context) { - return new PagedIterable<>(listSafeguardsVersionsAsync(location, context)); - } - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<MeshRevisionProfileInner>> listMeshRevisionProfilesSinglePageAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listMeshRevisionProfiles(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), location, accept, context)) - .<PagedResponse<MeshRevisionProfileInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshRevisionsProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<MeshRevisionProfileInner>> listMeshRevisionProfilesSinglePageAsync(String location, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listMeshRevisionProfiles(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), location, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux<MeshRevisionProfileInner> listMeshRevisionProfilesAsync(String location) { - return new PagedFlux<>(() -> listMeshRevisionProfilesSinglePageAsync(location), - nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink)); - } - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux<MeshRevisionProfileInner> listMeshRevisionProfilesAsync(String location, Context context) { - return new PagedFlux<>(() -> listMeshRevisionProfilesSinglePageAsync(location, context), - nextLink -> listMeshRevisionProfilesNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<MeshRevisionProfileInner> listMeshRevisionProfiles(String location) { - return new PagedIterable<>(listMeshRevisionProfilesAsync(location)); - } - - /** - * Lists mesh revision profiles for all meshes in the specified location. - * - * Contains extra metadata on each revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshRevisionsProfiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<MeshRevisionProfileInner> listMeshRevisionProfiles(String location, Context context) { - return new PagedIterable<>(listMeshRevisionProfilesAsync(location, context)); - } - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<MeshRevisionProfileInner>> getMeshRevisionProfileWithResponseAsync(String location, - String mode) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getMeshRevisionProfile(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), location, mode, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh revision profile for a mesh along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<MeshRevisionProfileInner>> getMeshRevisionProfileWithResponseAsync(String location, - String mode, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getMeshRevisionProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - location, mode, accept, context); - } - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh revision profile for a mesh on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<MeshRevisionProfileInner> getMeshRevisionProfileAsync(String location, String mode) { - return getMeshRevisionProfileWithResponseAsync(location, mode).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh revision profile for a mesh along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<MeshRevisionProfileInner> getMeshRevisionProfileWithResponse(String location, String mode, - Context context) { - return getMeshRevisionProfileWithResponseAsync(location, mode, context).block(); - } - - /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. - * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh revision profile for a mesh. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MeshRevisionProfileInner getMeshRevisionProfile(String location, String mode) { - return getMeshRevisionProfileWithResponse(location, mode, Context.NONE).getValue(); - } - - /** - * Lists available upgrades for all service meshes in a specific cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<MeshUpgradeProfileInner>> - listMeshUpgradeProfilesSinglePageAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listMeshUpgradeProfiles(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .<PagedResponse<MeshUpgradeProfileInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists available upgrades for all service meshes in a specific cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<MeshUpgradeProfileInner>> - listMeshUpgradeProfilesSinglePageAsync(String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listMeshUpgradeProfiles(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists available upgrades for all service meshes in a specific cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux<MeshUpgradeProfileInner> listMeshUpgradeProfilesAsync(String resourceGroupName, - String resourceName) { - return new PagedFlux<>(() -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink)); - } - - /** - * Lists available upgrades for all service meshes in a specific cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux<MeshUpgradeProfileInner> listMeshUpgradeProfilesAsync(String resourceGroupName, - String resourceName, Context context) { - return new PagedFlux<>(() -> listMeshUpgradeProfilesSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listMeshUpgradeProfilesNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists available upgrades for all service meshes in a specific cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<MeshUpgradeProfileInner> listMeshUpgradeProfiles(String resourceGroupName, - String resourceName) { - return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName)); - } - - /** - * Lists available upgrades for all service meshes in a specific cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<MeshUpgradeProfileInner> listMeshUpgradeProfiles(String resourceGroupName, String resourceName, - Context context) { - return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName, context)); - } - - /** - * Gets available upgrades for a service mesh in a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available upgrades for a service mesh in a cluster along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<MeshUpgradeProfileInner>> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName, String mode) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getMeshUpgradeProfile(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, mode, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets available upgrades for a service mesh in a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available upgrades for a service mesh in a cluster along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<MeshUpgradeProfileInner>> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, - String resourceName, String mode, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getMeshUpgradeProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, mode, accept, context); - } - - /** - * Gets available upgrades for a service mesh in a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available upgrades for a service mesh in a cluster on successful completion of {@link Mono}. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<MeshUpgradeProfileInner> getMeshUpgradeProfileAsync(String resourceGroupName, String resourceName, - String mode) { - return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<MeshUpgradeProfileInner> listMeshUpgradeProfiles(String resourceGroupName, + String resourceName) { + return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName)); } /** - * Gets available upgrades for a service mesh in a cluster. + * Lists available upgrades for all service meshes in a specific cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param mode The mode of the mesh. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available upgrades for a service mesh in a cluster along with {@link Response}. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<MeshUpgradeProfileInner> getMeshUpgradeProfileWithResponse(String resourceGroupName, - String resourceName, String mode, Context context) { - return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<MeshUpgradeProfileInner> listMeshUpgradeProfiles(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName, context)); } /** @@ -5825,28 +5066,12 @@ public Response<MeshUpgradeProfileInner> getMeshUpgradeProfileWithResponse(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available upgrades for a service mesh in a cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode) { - return getMeshUpgradeProfileWithResponse(resourceGroupName, resourceName, mode, Context.NONE).getValue(); - } - - /** - * Rebalance nodes across specific load balancers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be - * rebalanced. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return available upgrades for a service mesh in a cluster along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<Flux<ByteBuffer>>> rebalanceLoadBalancersWithResponseAsync(String resourceGroupName, - String resourceName, RebalanceLoadBalancersRequestBody parameters) { + public Mono<Response<MeshUpgradeProfileInner>> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName, String mode) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5862,35 +5087,33 @@ public Mono<Response<Flux<ByteBuffer>>> rebalanceLoadBalancersWithResponseAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.rebalanceLoadBalancers(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) + .withContext(context -> service.getMeshUpgradeProfile(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, resourceName, mode, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Rebalance nodes across specific load balancers. + * Gets available upgrades for a service mesh in a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be - * rebalanced. + * @param mode The mode of the mesh. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return available upgrades for a service mesh in a cluster along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<Flux<ByteBuffer>>> rebalanceLoadBalancersWithResponseAsync(String resourceGroupName, - String resourceName, RebalanceLoadBalancersRequestBody parameters, Context context) { + private Mono<Response<MeshUpgradeProfileInner>> getMeshUpgradeProfileWithResponseAsync(String resourceGroupName, + String resourceName, String mode, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5906,172 +5129,66 @@ private Mono<Response<Flux<ByteBuffer>>> rebalanceLoadBalancersWithResponseAsync if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.rebalanceLoadBalancers(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, parameters, accept, context); - } - - /** - * Rebalance nodes across specific load balancers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be - * rebalanced. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux<PollResult<Void>, Void> beginRebalanceLoadBalancersAsync(String resourceGroupName, - String resourceName, RebalanceLoadBalancersRequestBody parameters) { - Mono<Response<Flux<ByteBuffer>>> mono - = rebalanceLoadBalancersWithResponseAsync(resourceGroupName, resourceName, parameters); - return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Rebalance nodes across specific load balancers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be - * rebalanced. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<Void>, Void> beginRebalanceLoadBalancersAsync(String resourceGroupName, - String resourceName, RebalanceLoadBalancersRequestBody parameters, Context context) { - context = this.client.mergeContext(context); - Mono<Response<Flux<ByteBuffer>>> mono - = rebalanceLoadBalancersWithResponseAsync(resourceGroupName, resourceName, parameters, context); - return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Rebalance nodes across specific load balancers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be - * rebalanced. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginRebalanceLoadBalancers(String resourceGroupName, String resourceName, - RebalanceLoadBalancersRequestBody parameters) { - return this.beginRebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); - } - - /** - * Rebalance nodes across specific load balancers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be - * rebalanced. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginRebalanceLoadBalancers(String resourceGroupName, String resourceName, - RebalanceLoadBalancersRequestBody parameters, Context context) { - return this.beginRebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters, context) - .getSyncPoller(); + return service.getMeshUpgradeProfile(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, mode, accept, context); } /** - * Rebalance nodes across specific load balancers. + * Gets available upgrades for a service mesh in a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be - * rebalanced. + * @param mode The mode of the mesh. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return available upgrades for a service mesh in a cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Void> rebalanceLoadBalancersAsync(String resourceGroupName, String resourceName, - RebalanceLoadBalancersRequestBody parameters) { - return beginRebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono<MeshUpgradeProfileInner> getMeshUpgradeProfileAsync(String resourceGroupName, String resourceName, + String mode) { + return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Rebalance nodes across specific load balancers. + * Gets available upgrades for a service mesh in a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be - * rebalanced. + * @param mode The mode of the mesh. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Void> rebalanceLoadBalancersAsync(String resourceGroupName, String resourceName, - RebalanceLoadBalancersRequestBody parameters, Context context) { - return beginRebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Rebalance nodes across specific load balancers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be - * rebalanced. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available upgrades for a service mesh in a cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void rebalanceLoadBalancers(String resourceGroupName, String resourceName, - RebalanceLoadBalancersRequestBody parameters) { - rebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters).block(); + public Response<MeshUpgradeProfileInner> getMeshUpgradeProfileWithResponse(String resourceGroupName, + String resourceName, String mode, Context context) { + return getMeshUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, mode, context).block(); } /** - * Rebalance nodes across specific load balancers. + * Gets available upgrades for a service mesh in a cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. - * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be - * rebalanced. - * @param context The context to associate with this operation. + * @param mode The mode of the mesh. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available upgrades for a service mesh in a cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void rebalanceLoadBalancers(String resourceGroupName, String resourceName, - RebalanceLoadBalancersRequestBody parameters, Context context) { - rebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters, context).block(); + public MeshUpgradeProfileInner getMeshUpgradeProfile(String resourceGroupName, String resourceName, String mode) { + return getMeshUpgradeProfileWithResponse(resourceGroupName, resourceName, mode, Context.NONE).getValue(); } /** @@ -6255,128 +5372,6 @@ private Mono<PagedResponse<ManagedClusterInner>> listByResourceGroupNextSinglePa res.getValue().value(), res.getValue().nextLink(), null)); } - /** - * Gets a list of supported Guardrails versions in the specified subscription and location. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of GuardrailsVersions along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<GuardrailsAvailableVersionInner>> - listGuardrailsVersionsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listGuardrailsVersionsNext(nextLink, this.client.getEndpoint(), accept, context)) - .<PagedResponse<GuardrailsAvailableVersionInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of supported Guardrails versions in the specified subscription and location. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of GuardrailsVersions along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<GuardrailsAvailableVersionInner>> - listGuardrailsVersionsNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listGuardrailsVersionsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of supported Safeguards versions in the specified subscription and location. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of SafeguardsVersions along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<SafeguardsAvailableVersionInner>> - listSafeguardsVersionsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listSafeguardsVersionsNext(nextLink, this.client.getEndpoint(), accept, context)) - .<PagedResponse<SafeguardsAvailableVersionInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of supported Safeguards versions in the specified subscription and location. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hold values properties, which is array of SafeguardsVersions along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<SafeguardsAvailableVersionInner>> - listSafeguardsVersionsNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listSafeguardsVersionsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - /** * Lists mesh revision profiles for all meshes in the specified location. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java index 8aef735958bd..29edf395b2ab 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java @@ -173,7 +173,7 @@ private Mono<PagedResponse<ManagedNamespaceInner>> listByManagedClusterSinglePag if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), apiVersion, @@ -213,7 +213,7 @@ private Mono<PagedResponse<ManagedNamespaceInner>> listByManagedClusterSinglePag if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -327,7 +327,7 @@ public Mono<Response<ManagedNamespaceInner>> getWithResponseAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -370,7 +370,7 @@ private Mono<Response<ManagedNamespaceInner>> getWithResponseAsync(String resour return Mono .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -469,7 +469,7 @@ public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -519,7 +519,7 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -730,7 +730,7 @@ public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -773,7 +773,7 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -963,7 +963,7 @@ public Mono<Response<ManagedNamespaceInner>> updateWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1012,7 +1012,7 @@ private Mono<Response<ManagedNamespaceInner>> updateWithResponseAsync(String res } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -1110,7 +1110,7 @@ public Mono<Response<CredentialResultsInner>> listCredentialWithResponseAsync(St return Mono .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.listCredential(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, managedNamespaceName, accept, context)) @@ -1151,7 +1151,7 @@ private Mono<Response<CredentialResultsInner>> listCredentialWithResponseAsync(S return Mono .error(new IllegalArgumentException("Parameter managedNamespaceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listCredential(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MeshMembershipsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MeshMembershipsClientImpl.java deleted file mode 100644 index d858ab8734c6..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MeshMembershipsClientImpl.java +++ /dev/null @@ -1,950 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerservice.fluent.MeshMembershipsClient; -import com.azure.resourcemanager.containerservice.fluent.models.MeshMembershipInner; -import com.azure.resourcemanager.containerservice.models.MeshMembershipsListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in MeshMembershipsClient. - */ -public final class MeshMembershipsClientImpl implements MeshMembershipsClient { - /** - * The proxy service used to perform REST calls. - */ - private final MeshMembershipsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of MeshMembershipsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - MeshMembershipsClientImpl(ContainerServiceManagementClientImpl client) { - this.service - = RestProxy.create(MeshMembershipsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientMeshMemberships to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientMeshMemberships") - public interface MeshMembershipsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<MeshMembershipsListResult>> listByManagedCluster(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<MeshMembershipInner>> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("meshMembershipName") String meshMembershipName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("meshMembershipName") String meshMembershipName, - @BodyParam("application/json") MeshMembershipInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("meshMembershipName") String meshMembershipName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<MeshMembershipsListResult>> listByManagedClusterNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists mesh memberships in a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list mesh memberships in a managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<MeshMembershipInner>> listByManagedClusterSinglePageAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .<PagedResponse<MeshMembershipInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists mesh memberships in a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list mesh memberships in a managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<MeshMembershipInner>> listByManagedClusterSinglePageAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByManagedCluster(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists mesh memberships in a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list mesh memberships in a managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux<MeshMembershipInner> listByManagedClusterAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); - } - - /** - * Lists mesh memberships in a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list mesh memberships in a managed cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux<MeshMembershipInner> listByManagedClusterAsync(String resourceGroupName, String resourceName, - Context context) { - return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists mesh memberships in a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list mesh memberships in a managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<MeshMembershipInner> listByManagedCluster(String resourceGroupName, String resourceName) { - return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); - } - - /** - * Lists mesh memberships in a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list mesh memberships in a managed cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<MeshMembershipInner> listByManagedCluster(String resourceGroupName, String resourceName, - Context context) { - return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); - } - - /** - * Gets the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the mesh membership of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<MeshMembershipInner>> getWithResponseAsync(String resourceGroupName, String resourceName, - String meshMembershipName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (meshMembershipName == null) { - return Mono - .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, meshMembershipName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the mesh membership of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<MeshMembershipInner>> getWithResponseAsync(String resourceGroupName, String resourceName, - String meshMembershipName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (meshMembershipName == null) { - return Mono - .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, meshMembershipName, accept, context); - } - - /** - * Gets the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the mesh membership of a managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<MeshMembershipInner> getAsync(String resourceGroupName, String resourceName, - String meshMembershipName) { - return getWithResponseAsync(resourceGroupName, resourceName, meshMembershipName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the mesh membership of a managed cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<MeshMembershipInner> getWithResponse(String resourceGroupName, String resourceName, - String meshMembershipName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, meshMembershipName, context).block(); - } - - /** - * Gets the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the mesh membership of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MeshMembershipInner get(String resourceGroupName, String resourceName, String meshMembershipName) { - return getWithResponse(resourceGroupName, resourceName, meshMembershipName, Context.NONE).getValue(); - } - - /** - * Creates or updates the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param parameters The mesh membership to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh membership of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String meshMembershipName, MeshMembershipInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (meshMembershipName == null) { - return Mono - .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, meshMembershipName, parameters, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param parameters The mesh membership to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh membership of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, String meshMembershipName, MeshMembershipInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (meshMembershipName == null) { - return Mono - .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, meshMembershipName, parameters, accept, context); - } - - /** - * Creates or updates the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param parameters The mesh membership to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of mesh membership of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux<PollResult<MeshMembershipInner>, MeshMembershipInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, String meshMembershipName, MeshMembershipInner parameters) { - Mono<Response<Flux<ByteBuffer>>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, meshMembershipName, parameters); - return this.client.<MeshMembershipInner, MeshMembershipInner>getLroResult(mono, this.client.getHttpPipeline(), - MeshMembershipInner.class, MeshMembershipInner.class, this.client.getContext()); - } - - /** - * Creates or updates the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param parameters The mesh membership to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of mesh membership of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<MeshMembershipInner>, MeshMembershipInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, String meshMembershipName, MeshMembershipInner parameters, - Context context) { - context = this.client.mergeContext(context); - Mono<Response<Flux<ByteBuffer>>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, meshMembershipName, parameters, context); - return this.client.<MeshMembershipInner, MeshMembershipInner>getLroResult(mono, this.client.getHttpPipeline(), - MeshMembershipInner.class, MeshMembershipInner.class, context); - } - - /** - * Creates or updates the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param parameters The mesh membership to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of mesh membership of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<MeshMembershipInner>, MeshMembershipInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, String meshMembershipName, MeshMembershipInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters) - .getSyncPoller(); - } - - /** - * Creates or updates the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param parameters The mesh membership to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of mesh membership of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<MeshMembershipInner>, MeshMembershipInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, String meshMembershipName, MeshMembershipInner parameters, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters, context) - .getSyncPoller(); - } - - /** - * Creates or updates the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param parameters The mesh membership to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh membership of a managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<MeshMembershipInner> createOrUpdateAsync(String resourceGroupName, String resourceName, - String meshMembershipName, MeshMembershipInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param parameters The mesh membership to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh membership of a managed cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<MeshMembershipInner> createOrUpdateAsync(String resourceGroupName, String resourceName, - String meshMembershipName, MeshMembershipInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param parameters The mesh membership to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh membership of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MeshMembershipInner createOrUpdate(String resourceGroupName, String resourceName, String meshMembershipName, - MeshMembershipInner parameters) { - return createOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters).block(); - } - - /** - * Creates or updates the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param parameters The mesh membership to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return mesh membership of a managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MeshMembershipInner createOrUpdate(String resourceGroupName, String resourceName, String meshMembershipName, - MeshMembershipInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters, context).block(); - } - - /** - * Deletes the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String meshMembershipName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (meshMembershipName == null) { - return Mono - .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, meshMembershipName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String meshMembershipName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (meshMembershipName == null) { - return Mono - .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, meshMembershipName, accept, context); - } - - /** - * Deletes the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String meshMembershipName) { - Mono<Response<Flux<ByteBuffer>>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, meshMembershipName); - return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String meshMembershipName, Context context) { - context = this.client.mergeContext(context); - Mono<Response<Flux<ByteBuffer>>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, meshMembershipName, context); - return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, - String meshMembershipName) { - return this.beginDeleteAsync(resourceGroupName, resourceName, meshMembershipName).getSyncPoller(); - } - - /** - * Deletes the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String resourceName, - String meshMembershipName, Context context) { - return this.beginDeleteAsync(resourceGroupName, resourceName, meshMembershipName, context).getSyncPoller(); - } - - /** - * Deletes the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String meshMembershipName) { - return beginDeleteAsync(resourceGroupName, resourceName, meshMembershipName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Void> deleteAsync(String resourceGroupName, String resourceName, String meshMembershipName, - Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, meshMembershipName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String meshMembershipName) { - deleteAsync(resourceGroupName, resourceName, meshMembershipName).block(); - } - - /** - * Deletes the mesh membership of a managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param meshMembershipName The name of the mesh membership. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String meshMembershipName, Context context) { - deleteAsync(resourceGroupName, resourceName, meshMembershipName, context).block(); - } - - /** - * Lists mesh memberships in a managed cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list mesh memberships in a managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<MeshMembershipInner>> listByManagedClusterNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) - .<PagedResponse<MeshMembershipInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists mesh memberships in a managed cluster. - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list mesh memberships in a managed cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<MeshMembershipInner>> listByManagedClusterNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationStatusResultsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationStatusResultsClientImpl.java deleted file mode 100644 index 6b8001f31a78..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationStatusResultsClientImpl.java +++ /dev/null @@ -1,587 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.containerservice.fluent.OperationStatusResultsClient; -import com.azure.resourcemanager.containerservice.fluent.models.OperationStatusResultInner; -import com.azure.resourcemanager.containerservice.models.OperationStatusResultList; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OperationStatusResultsClient. - */ -public final class OperationStatusResultsClientImpl implements OperationStatusResultsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OperationStatusResultsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerServiceManagementClientImpl client; - - /** - * Initializes an instance of OperationStatusResultsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationStatusResultsClientImpl(ContainerServiceManagementClientImpl client) { - this.service = RestProxy.create(OperationStatusResultsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerServiceManagementClientOperationStatusResults to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerServiceManagementClientOperationStatusResults") - public interface OperationStatusResultsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<OperationStatusResultList>> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations/{operationId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<OperationStatusResultInner>> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/operations/{operationId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<OperationStatusResultInner>> getByAgentPool(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("agentPoolName") String agentPoolName, @PathParam("operationId") String operationId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<OperationStatusResultList>> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of operations in the specified managedCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations in the specified managedCluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<OperationStatusResultInner>> listSinglePageAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context)) - .<PagedResponse<OperationStatusResultInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of operations in the specified managedCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations in the specified managedCluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<OperationStatusResultInner>> listSinglePageAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of operations in the specified managedCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations in the specified managedCluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux<OperationStatusResultInner> listAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of operations in the specified managedCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations in the specified managedCluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux<OperationStatusResultInner> listAsync(String resourceGroupName, String resourceName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of operations in the specified managedCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations in the specified managedCluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<OperationStatusResultInner> list(String resourceGroupName, String resourceName) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); - } - - /** - * Gets a list of operations in the specified managedCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations in the specified managedCluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable<OperationStatusResultInner> list(String resourceGroupName, String resourceName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); - } - - /** - * Get the status of a specific operation in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified managed cluster along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<OperationStatusResultInner>> getWithResponseAsync(String resourceGroupName, - String resourceName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, operationId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the status of a specific operation in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param operationId The ID of an ongoing async operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified managed cluster along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<OperationStatusResultInner>> getWithResponseAsync(String resourceGroupName, - String resourceName, String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - resourceName, operationId, accept, context); - } - - /** - * Get the status of a specific operation in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified managed cluster on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<OperationStatusResultInner> getAsync(String resourceGroupName, String resourceName, - String operationId) { - return getWithResponseAsync(resourceGroupName, resourceName, operationId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the status of a specific operation in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param operationId The ID of an ongoing async operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified managed cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<OperationStatusResultInner> getWithResponse(String resourceGroupName, String resourceName, - String operationId, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, operationId, context).block(); - } - - /** - * Get the status of a specific operation in the specified managed cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified managed cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner get(String resourceGroupName, String resourceName, String operationId) { - return getWithResponse(resourceGroupName, resourceName, operationId, Context.NONE).getValue(); - } - - /** - * Get the status of a specific operation in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified agent pool along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<OperationStatusResultInner>> getByAgentPoolWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByAgentPool(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, operationId, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the status of a specific operation in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param operationId The ID of an ongoing async operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified agent pool along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<OperationStatusResultInner>> getByAgentPoolWithResponseAsync(String resourceGroupName, - String resourceName, String agentPoolName, String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String apiVersion = "2025-09-02-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByAgentPool(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, resourceName, agentPoolName, operationId, accept, context); - } - - /** - * Get the status of a specific operation in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified agent pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<OperationStatusResultInner> getByAgentPoolAsync(String resourceGroupName, String resourceName, - String agentPoolName, String operationId) { - return getByAgentPoolWithResponseAsync(resourceGroupName, resourceName, agentPoolName, operationId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the status of a specific operation in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param operationId The ID of an ongoing async operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified agent pool along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<OperationStatusResultInner> getByAgentPoolWithResponse(String resourceGroupName, - String resourceName, String agentPoolName, String operationId, Context context) { - return getByAgentPoolWithResponseAsync(resourceGroupName, resourceName, agentPoolName, operationId, context) - .block(); - } - - /** - * Get the status of a specific operation in the specified agent pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param agentPoolName The name of the agent pool. - * @param operationId The ID of an ongoing async operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a specific operation in the specified agent pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner getByAgentPool(String resourceGroupName, String resourceName, - String agentPoolName, String operationId) { - return getByAgentPoolWithResponse(resourceGroupName, resourceName, agentPoolName, operationId, Context.NONE) - .getValue(); - } - - /** - * Gets a list of operations in the specified managedCluster - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations in the specified managedCluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<OperationStatusResultInner>> 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)) - .<PagedResponse<OperationStatusResultInner>>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of operations in the specified managedCluster - * - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of operations in the specified managedCluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<PagedResponse<OperationStatusResultInner>> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java index 10872033d4f9..263920fbe400 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java @@ -82,7 +82,7 @@ private Mono<PagedResponse<OperationValueInner>> listSinglePageAsync() { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) .<PagedResponse<OperationValueInner>>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -105,7 +105,7 @@ private Mono<PagedResponse<OperationValueInner>> listSinglePageAsync(Context con return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, accept, context) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java index 04a0025f82e8..d5a5145c61c0 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java @@ -138,7 +138,7 @@ public Mono<Response<PrivateEndpointConnectionListResultInner>> listWithResponse if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -178,7 +178,7 @@ private Mono<Response<PrivateEndpointConnectionListResultInner>> listWithRespons if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -273,7 +273,7 @@ public Mono<Response<PrivateEndpointConnectionInner>> getWithResponseAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -317,7 +317,7 @@ private Mono<Response<PrivateEndpointConnectionInner>> getWithResponseAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -422,7 +422,7 @@ public Mono<Response<PrivateEndpointConnectionInner>> updateWithResponseAsync(St } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -472,7 +472,7 @@ private Mono<Response<PrivateEndpointConnectionInner>> updateWithResponseAsync(S } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -570,7 +570,7 @@ public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -613,7 +613,7 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java index 664be149f623..eba8732b418b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java @@ -97,7 +97,7 @@ public Mono<Response<PrivateLinkResourcesListResultInner>> listWithResponseAsync if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -136,7 +136,7 @@ private Mono<Response<PrivateLinkResourcesListResultInner>> listWithResponseAsyn if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java index d1cd22b9ade5..d6b0cdc04983 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java @@ -104,7 +104,7 @@ public Mono<Response<PrivateLinkResourceInner>> postWithResponseAsync(String res } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.post(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -148,7 +148,7 @@ private Mono<Response<PrivateLinkResourceInner>> postWithResponseAsync(String re } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.post(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java index e25dfc633b7a..b9a0da4dc241 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java @@ -160,7 +160,7 @@ private Mono<PagedResponse<SnapshotInner>> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -190,7 +190,7 @@ private Mono<PagedResponse<SnapshotInner>> listSinglePageAsync(Context context) return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -275,7 +275,7 @@ private Mono<PagedResponse<SnapshotInner>> listByResourceGroupSinglePageAsync(St return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, @@ -311,7 +311,7 @@ private Mono<PagedResponse<SnapshotInner>> listByResourceGroupSinglePageAsync(St return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -409,7 +409,7 @@ public Mono<Response<SnapshotInner>> getByResourceGroupWithResponseAsync(String if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, @@ -446,7 +446,7 @@ private Mono<Response<SnapshotInner>> getByResourceGroupWithResponseAsync(String if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -535,7 +535,7 @@ public Mono<Response<SnapshotInner>> createOrUpdateWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -578,7 +578,7 @@ private Mono<Response<SnapshotInner>> createOrUpdateWithResponseAsync(String res } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -671,7 +671,7 @@ public Mono<Response<SnapshotInner>> updateTagsWithResponseAsync(String resource } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), apiVersion, @@ -714,7 +714,7 @@ private Mono<Response<SnapshotInner>> updateTagsWithResponseAsync(String resourc } else { parameters.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -799,7 +799,7 @@ public Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, St if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, @@ -836,7 +836,7 @@ private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, S if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java index 1d289676569c..f572b456aa31 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java @@ -148,7 +148,7 @@ private Mono<PagedResponse<TrustedAccessRoleBindingInner>> listSinglePageAsync(S if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -188,7 +188,7 @@ private Mono<PagedResponse<TrustedAccessRoleBindingInner>> listSinglePageAsync(S if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -297,7 +297,7 @@ public Mono<Response<TrustedAccessRoleBindingInner>> getWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -339,7 +339,7 @@ private Mono<Response<TrustedAccessRoleBindingInner>> getWithResponseAsync(Strin return Mono.error( new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -441,7 +441,7 @@ public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String r } else { trustedAccessRoleBinding.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -493,7 +493,7 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String } else { trustedAccessRoleBinding.validate(); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -704,7 +704,7 @@ public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceG return Mono.error( new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -747,7 +747,7 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter trustedAccessRoleBindingName is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java index 3c5a35122796..63fffbc49034 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java @@ -101,7 +101,7 @@ private Mono<PagedResponse<TrustedAccessRoleInner>> listSinglePageAsync(String l if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -134,7 +134,7 @@ private Mono<PagedResponse<TrustedAccessRoleInner>> listSinglePageAsync(String l if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-09-02-preview"; + final String apiVersion = "2025-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AccelerationMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AccelerationMode.java deleted file mode 100644 index 117724b51d09..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AccelerationMode.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enable advanced network acceleration options. This allows users to configure acceleration using BPF host routing. - * This can be enabled only with Cilium dataplane. If not specified, the default value is None (no acceleration). The - * acceleration mode can be changed on a pre-existing cluster. See https://aka.ms/acnsperformance for a detailed - * explanation. - */ -public final class AccelerationMode extends ExpandableStringEnum<AccelerationMode> { - /** - * Static value BpfVeth for AccelerationMode. - */ - public static final AccelerationMode BPF_VETH = fromString("BpfVeth"); - - /** - * Static value None for AccelerationMode. - */ - public static final AccelerationMode NONE = fromString("None"); - - /** - * Creates a new instance of AccelerationMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AccelerationMode() { - } - - /** - * Creates or finds a AccelerationMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding AccelerationMode. - */ - public static AccelerationMode fromString(String name) { - return fromString(name, AccelerationMode.class); - } - - /** - * Gets known AccelerationMode values. - * - * @return known AccelerationMode values. - */ - public static Collection<AccelerationMode> values() { - return values(AccelerationMode.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AddonAutoscaling.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AddonAutoscaling.java deleted file mode 100644 index 003a808b9fe7..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AddonAutoscaling.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. - */ -public final class AddonAutoscaling extends ExpandableStringEnum<AddonAutoscaling> { - /** - * Static value Enabled for AddonAutoscaling. - */ - public static final AddonAutoscaling ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for AddonAutoscaling. - */ - public static final AddonAutoscaling DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of AddonAutoscaling value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AddonAutoscaling() { - } - - /** - * Creates or finds a AddonAutoscaling from its string representation. - * - * @param name a name to look for. - * @return the corresponding AddonAutoscaling. - */ - public static AddonAutoscaling fromString(String name) { - return fromString(name, AddonAutoscaling.class); - } - - /** - * Gets known AddonAutoscaling values. - * - * @return known AddonAutoscaling values. - */ - public static Collection<AddonAutoscaling> values() { - return values(AddonAutoscaling.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java index 5ec409247047..6132ead8e9b4 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java @@ -30,15 +30,10 @@ public final class AdvancedNetworking implements JsonSerializable<AdvancedNetwor private AdvancedNetworkingObservability observability; /* - * Security profile to enable security features on cilium-based cluster. + * Security profile to enable security features on cilium based cluster. */ private AdvancedNetworkingSecurity security; - /* - * Profile to enable performance-enhancing features on clusters that use Azure CNI powered by Cilium. - */ - private AdvancedNetworkingPerformance performance; - /** * Creates an instance of AdvancedNetworking class. */ @@ -92,7 +87,7 @@ public AdvancedNetworking withObservability(AdvancedNetworkingObservability obse } /** - * Get the security property: Security profile to enable security features on cilium-based cluster. + * Get the security property: Security profile to enable security features on cilium based cluster. * * @return the security value. */ @@ -101,7 +96,7 @@ public AdvancedNetworkingSecurity security() { } /** - * Set the security property: Security profile to enable security features on cilium-based cluster. + * Set the security property: Security profile to enable security features on cilium based cluster. * * @param security the security value to set. * @return the AdvancedNetworking object itself. @@ -111,28 +106,6 @@ public AdvancedNetworking withSecurity(AdvancedNetworkingSecurity security) { return this; } - /** - * Get the performance property: Profile to enable performance-enhancing features on clusters that use Azure CNI - * powered by Cilium. - * - * @return the performance value. - */ - public AdvancedNetworkingPerformance performance() { - return this.performance; - } - - /** - * Set the performance property: Profile to enable performance-enhancing features on clusters that use Azure CNI - * powered by Cilium. - * - * @param performance the performance value to set. - * @return the AdvancedNetworking object itself. - */ - public AdvancedNetworking withPerformance(AdvancedNetworkingPerformance performance) { - this.performance = performance; - return this; - } - /** * Validates the instance. * @@ -145,9 +118,6 @@ public void validate() { if (security() != null) { security().validate(); } - if (performance() != null) { - performance().validate(); - } } /** @@ -159,7 +129,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("enabled", this.enabled); jsonWriter.writeJsonField("observability", this.observability); jsonWriter.writeJsonField("security", this.security); - jsonWriter.writeJsonField("performance", this.performance); return jsonWriter.writeEndObject(); } @@ -184,8 +153,6 @@ public static AdvancedNetworking fromJson(JsonReader jsonReader) throws IOExcept deserializedAdvancedNetworking.observability = AdvancedNetworkingObservability.fromJson(reader); } else if ("security".equals(fieldName)) { deserializedAdvancedNetworking.security = AdvancedNetworkingSecurity.fromJson(reader); - } else if ("performance".equals(fieldName)) { - deserializedAdvancedNetworking.performance = AdvancedNetworkingPerformance.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingPerformance.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingPerformance.java deleted file mode 100644 index f90a67176e6f..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingPerformance.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Profile to enable performance-enhancing features on clusters that use Azure CNI powered by Cilium. - */ -@Fluent -public final class AdvancedNetworkingPerformance implements JsonSerializable<AdvancedNetworkingPerformance> { - /* - * Enable advanced network acceleration options. This allows users to configure acceleration using BPF host routing. - * This can be enabled only with Cilium dataplane. If not specified, the default value is None (no acceleration). - * The acceleration mode can be changed on a pre-existing cluster. See https://aka.ms/acnsperformance for a detailed - * explanation - */ - private AccelerationMode accelerationMode; - - /** - * Creates an instance of AdvancedNetworkingPerformance class. - */ - public AdvancedNetworkingPerformance() { - } - - /** - * Get the accelerationMode property: Enable advanced network acceleration options. This allows users to configure - * acceleration using BPF host routing. This can be enabled only with Cilium dataplane. If not specified, the - * default value is None (no acceleration). The acceleration mode can be changed on a pre-existing cluster. See - * https://aka.ms/acnsperformance for a detailed explanation. - * - * @return the accelerationMode value. - */ - public AccelerationMode accelerationMode() { - return this.accelerationMode; - } - - /** - * Set the accelerationMode property: Enable advanced network acceleration options. This allows users to configure - * acceleration using BPF host routing. This can be enabled only with Cilium dataplane. If not specified, the - * default value is None (no acceleration). The acceleration mode can be changed on a pre-existing cluster. See - * https://aka.ms/acnsperformance for a detailed explanation. - * - * @param accelerationMode the accelerationMode value to set. - * @return the AdvancedNetworkingPerformance object itself. - */ - public AdvancedNetworkingPerformance withAccelerationMode(AccelerationMode accelerationMode) { - this.accelerationMode = accelerationMode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("accelerationMode", - this.accelerationMode == null ? null : this.accelerationMode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AdvancedNetworkingPerformance from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AdvancedNetworkingPerformance if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AdvancedNetworkingPerformance. - */ - public static AdvancedNetworkingPerformance fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AdvancedNetworkingPerformance deserializedAdvancedNetworkingPerformance - = new AdvancedNetworkingPerformance(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("accelerationMode".equals(fieldName)) { - deserializedAdvancedNetworkingPerformance.accelerationMode - = AccelerationMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAdvancedNetworkingPerformance; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java index 42fd5406cb01..58d38fe29209 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java @@ -12,13 +12,13 @@ import java.io.IOException; /** - * Security profile to enable security features on cilium-based cluster. + * Security profile to enable security features on cilium based cluster. */ @Fluent public final class AdvancedNetworkingSecurity implements JsonSerializable<AdvancedNetworkingSecurity> { /* - * Configure Advanced Networking Security features on Cilium clusters. See individual fields for their default - * values. + * This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium + * based clusters. If not specified, the default is false. */ private Boolean enabled; @@ -30,12 +30,6 @@ public final class AdvancedNetworkingSecurity implements JsonSerializable<Advanc */ private AdvancedNetworkPolicies advancedNetworkPolicies; - /* - * Encryption configuration for Cilium-based clusters. Once enabled all traffic between Cilium managed pods will be - * encrypted when it leaves the node boundary. - */ - private AdvancedNetworkingSecurityTransitEncryption transitEncryption; - /** * Creates an instance of AdvancedNetworkingSecurity class. */ @@ -43,8 +37,8 @@ public AdvancedNetworkingSecurity() { } /** - * Get the enabled property: Configure Advanced Networking Security features on Cilium clusters. See individual - * fields for their default values. + * Get the enabled property: This feature allows user to configure network policy based on DNS (FQDN) names. It can + * be enabled only on cilium based clusters. If not specified, the default is false. * * @return the enabled value. */ @@ -53,8 +47,8 @@ public Boolean enabled() { } /** - * Set the enabled property: Configure Advanced Networking Security features on Cilium clusters. See individual - * fields for their default values. + * Set the enabled property: This feature allows user to configure network policy based on DNS (FQDN) names. It can + * be enabled only on cilium based clusters. If not specified, the default is false. * * @param enabled the enabled value to set. * @return the AdvancedNetworkingSecurity object itself. @@ -90,38 +84,12 @@ public AdvancedNetworkingSecurity withAdvancedNetworkPolicies(AdvancedNetworkPol return this; } - /** - * Get the transitEncryption property: Encryption configuration for Cilium-based clusters. Once enabled all traffic - * between Cilium managed pods will be encrypted when it leaves the node boundary. - * - * @return the transitEncryption value. - */ - public AdvancedNetworkingSecurityTransitEncryption transitEncryption() { - return this.transitEncryption; - } - - /** - * Set the transitEncryption property: Encryption configuration for Cilium-based clusters. Once enabled all traffic - * between Cilium managed pods will be encrypted when it leaves the node boundary. - * - * @param transitEncryption the transitEncryption value to set. - * @return the AdvancedNetworkingSecurity object itself. - */ - public AdvancedNetworkingSecurity - withTransitEncryption(AdvancedNetworkingSecurityTransitEncryption transitEncryption) { - this.transitEncryption = transitEncryption; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (transitEncryption() != null) { - transitEncryption().validate(); - } } /** @@ -133,7 +101,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("enabled", this.enabled); jsonWriter.writeStringField("advancedNetworkPolicies", this.advancedNetworkPolicies == null ? null : this.advancedNetworkPolicies.toString()); - jsonWriter.writeJsonField("transitEncryption", this.transitEncryption); return jsonWriter.writeEndObject(); } @@ -157,9 +124,6 @@ public static AdvancedNetworkingSecurity fromJson(JsonReader jsonReader) throws } else if ("advancedNetworkPolicies".equals(fieldName)) { deserializedAdvancedNetworkingSecurity.advancedNetworkPolicies = AdvancedNetworkPolicies.fromString(reader.getString()); - } else if ("transitEncryption".equals(fieldName)) { - deserializedAdvancedNetworkingSecurity.transitEncryption - = AdvancedNetworkingSecurityTransitEncryption.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurityTransitEncryption.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurityTransitEncryption.java deleted file mode 100644 index 4698fbbbee15..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurityTransitEncryption.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Encryption configuration for Cilium-based clusters. Once enabled all traffic between Cilium managed pods will be - * encrypted when it leaves the node boundary. - */ -@Fluent -public final class AdvancedNetworkingSecurityTransitEncryption - implements JsonSerializable<AdvancedNetworkingSecurityTransitEncryption> { - /* - * Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If not specified, the - * default value is None. - */ - private TransitEncryptionType type; - - /** - * Creates an instance of AdvancedNetworkingSecurityTransitEncryption class. - */ - public AdvancedNetworkingSecurityTransitEncryption() { - } - - /** - * Get the type property: Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If - * not specified, the default value is None. - * - * @return the type value. - */ - public TransitEncryptionType type() { - return this.type; - } - - /** - * Set the type property: Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If - * not specified, the default value is None. - * - * @param type the type value to set. - * @return the AdvancedNetworkingSecurityTransitEncryption object itself. - */ - public AdvancedNetworkingSecurityTransitEncryption withType(TransitEncryptionType type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AdvancedNetworkingSecurityTransitEncryption from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AdvancedNetworkingSecurityTransitEncryption if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AdvancedNetworkingSecurityTransitEncryption. - */ - public static AdvancedNetworkingSecurityTransitEncryption fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AdvancedNetworkingSecurityTransitEncryption deserializedAdvancedNetworkingSecurityTransitEncryption - = new AdvancedNetworkingSecurityTransitEncryption(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedAdvancedNetworkingSecurityTransitEncryption.type - = TransitEncryptionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAdvancedNetworkingSecurityTransitEncryption; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolArtifactStreamingProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolArtifactStreamingProfile.java deleted file mode 100644 index 1032690e0cee..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolArtifactStreamingProfile.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The AgentPoolArtifactStreamingProfile model. - */ -@Fluent -public final class AgentPoolArtifactStreamingProfile implements JsonSerializable<AgentPoolArtifactStreamingProfile> { - /* - * Artifact streaming speeds up the cold-start of containers on a node through on-demand image loading. To use this - * feature, container images must also enable artifact streaming on ACR. If not specified, the default is false. - */ - private Boolean enabled; - - /** - * Creates an instance of AgentPoolArtifactStreamingProfile class. - */ - public AgentPoolArtifactStreamingProfile() { - } - - /** - * Get the enabled property: Artifact streaming speeds up the cold-start of containers on a node through on-demand - * image loading. To use this feature, container images must also enable artifact streaming on ACR. If not - * specified, the default is false. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Artifact streaming speeds up the cold-start of containers on a node through on-demand - * image loading. To use this feature, container images must also enable artifact streaming on ACR. If not - * specified, the default is false. - * - * @param enabled the enabled value to set. - * @return the AgentPoolArtifactStreamingProfile object itself. - */ - public AgentPoolArtifactStreamingProfile withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolArtifactStreamingProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolArtifactStreamingProfile if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AgentPoolArtifactStreamingProfile. - */ - public static AgentPoolArtifactStreamingProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolArtifactStreamingProfile deserializedAgentPoolArtifactStreamingProfile - = new AgentPoolArtifactStreamingProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedAgentPoolArtifactStreamingProfile.enabled = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolArtifactStreamingProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolBlueGreenUpgradeSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolBlueGreenUpgradeSettings.java deleted file mode 100644 index 51259791e0db..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolBlueGreenUpgradeSettings.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Settings for blue-green upgrade on an agentpool. - */ -@Fluent -public final class AgentPoolBlueGreenUpgradeSettings implements JsonSerializable<AgentPoolBlueGreenUpgradeSettings> { - /* - * The number or percentage of nodes to drain in batch during blue-green upgrade. Must be a non-zero number. This - * can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the - * percentage of the total number of blue nodes of the initial upgrade operation. For percentages, fractional nodes - * are rounded up. If not specified, the default is 10%. For more information, including best practices, see: - * https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster - */ - private String drainBatchSize; - - /* - * The drain timeout for a node, i.e., the amount of time (in minutes) to wait on eviction of pods and graceful - * termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, - * the upgrade fails. If not specified, the default is 30 minutes. - */ - private Integer drainTimeoutInMinutes; - - /* - * The soak duration after draining a batch of nodes, i.e., the amount of time (in minutes) to wait after draining a - * batch of nodes before moving on the next batch. If not specified, the default is 15 minutes. - */ - private Integer batchSoakDurationInMinutes; - - /* - * The soak duration for a node pool, i.e., the amount of time (in minutes) to wait after all old nodes are drained - * before we remove the old nodes. If not specified, the default is 60 minutes. Only applicable for blue-green - * upgrade strategy. - */ - private Integer finalSoakDurationInMinutes; - - /** - * Creates an instance of AgentPoolBlueGreenUpgradeSettings class. - */ - public AgentPoolBlueGreenUpgradeSettings() { - } - - /** - * Get the drainBatchSize property: The number or percentage of nodes to drain in batch during blue-green upgrade. - * Must be a non-zero number. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a - * percentage is specified, it is the percentage of the total number of blue nodes of the initial upgrade operation. - * For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, - * including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. - * - * @return the drainBatchSize value. - */ - public String drainBatchSize() { - return this.drainBatchSize; - } - - /** - * Set the drainBatchSize property: The number or percentage of nodes to drain in batch during blue-green upgrade. - * Must be a non-zero number. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a - * percentage is specified, it is the percentage of the total number of blue nodes of the initial upgrade operation. - * For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, - * including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. - * - * @param drainBatchSize the drainBatchSize value to set. - * @return the AgentPoolBlueGreenUpgradeSettings object itself. - */ - public AgentPoolBlueGreenUpgradeSettings withDrainBatchSize(String drainBatchSize) { - this.drainBatchSize = drainBatchSize; - return this; - } - - /** - * Get the drainTimeoutInMinutes property: The drain timeout for a node, i.e., the amount of time (in minutes) to - * wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod - * disruption budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes. - * - * @return the drainTimeoutInMinutes value. - */ - public Integer drainTimeoutInMinutes() { - return this.drainTimeoutInMinutes; - } - - /** - * Set the drainTimeoutInMinutes property: The drain timeout for a node, i.e., the amount of time (in minutes) to - * wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod - * disruption budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes. - * - * @param drainTimeoutInMinutes the drainTimeoutInMinutes value to set. - * @return the AgentPoolBlueGreenUpgradeSettings object itself. - */ - public AgentPoolBlueGreenUpgradeSettings withDrainTimeoutInMinutes(Integer drainTimeoutInMinutes) { - this.drainTimeoutInMinutes = drainTimeoutInMinutes; - return this; - } - - /** - * Get the batchSoakDurationInMinutes property: The soak duration after draining a batch of nodes, i.e., the amount - * of time (in minutes) to wait after draining a batch of nodes before moving on the next batch. If not specified, - * the default is 15 minutes. - * - * @return the batchSoakDurationInMinutes value. - */ - public Integer batchSoakDurationInMinutes() { - return this.batchSoakDurationInMinutes; - } - - /** - * Set the batchSoakDurationInMinutes property: The soak duration after draining a batch of nodes, i.e., the amount - * of time (in minutes) to wait after draining a batch of nodes before moving on the next batch. If not specified, - * the default is 15 minutes. - * - * @param batchSoakDurationInMinutes the batchSoakDurationInMinutes value to set. - * @return the AgentPoolBlueGreenUpgradeSettings object itself. - */ - public AgentPoolBlueGreenUpgradeSettings withBatchSoakDurationInMinutes(Integer batchSoakDurationInMinutes) { - this.batchSoakDurationInMinutes = batchSoakDurationInMinutes; - return this; - } - - /** - * Get the finalSoakDurationInMinutes property: The soak duration for a node pool, i.e., the amount of time (in - * minutes) to wait after all old nodes are drained before we remove the old nodes. If not specified, the default is - * 60 minutes. Only applicable for blue-green upgrade strategy. - * - * @return the finalSoakDurationInMinutes value. - */ - public Integer finalSoakDurationInMinutes() { - return this.finalSoakDurationInMinutes; - } - - /** - * Set the finalSoakDurationInMinutes property: The soak duration for a node pool, i.e., the amount of time (in - * minutes) to wait after all old nodes are drained before we remove the old nodes. If not specified, the default is - * 60 minutes. Only applicable for blue-green upgrade strategy. - * - * @param finalSoakDurationInMinutes the finalSoakDurationInMinutes value to set. - * @return the AgentPoolBlueGreenUpgradeSettings object itself. - */ - public AgentPoolBlueGreenUpgradeSettings withFinalSoakDurationInMinutes(Integer finalSoakDurationInMinutes) { - this.finalSoakDurationInMinutes = finalSoakDurationInMinutes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("drainBatchSize", this.drainBatchSize); - jsonWriter.writeNumberField("drainTimeoutInMinutes", this.drainTimeoutInMinutes); - jsonWriter.writeNumberField("batchSoakDurationInMinutes", this.batchSoakDurationInMinutes); - jsonWriter.writeNumberField("finalSoakDurationInMinutes", this.finalSoakDurationInMinutes); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolBlueGreenUpgradeSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolBlueGreenUpgradeSettings if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AgentPoolBlueGreenUpgradeSettings. - */ - public static AgentPoolBlueGreenUpgradeSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolBlueGreenUpgradeSettings deserializedAgentPoolBlueGreenUpgradeSettings - = new AgentPoolBlueGreenUpgradeSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("drainBatchSize".equals(fieldName)) { - deserializedAgentPoolBlueGreenUpgradeSettings.drainBatchSize = reader.getString(); - } else if ("drainTimeoutInMinutes".equals(fieldName)) { - deserializedAgentPoolBlueGreenUpgradeSettings.drainTimeoutInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("batchSoakDurationInMinutes".equals(fieldName)) { - deserializedAgentPoolBlueGreenUpgradeSettings.batchSoakDurationInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("finalSoakDurationInMinutes".equals(fieldName)) { - deserializedAgentPoolBlueGreenUpgradeSettings.finalSoakDurationInMinutes - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolBlueGreenUpgradeSettings; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java index 60058561ab80..a44247f5ca08 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java @@ -28,16 +28,6 @@ public final class AgentPoolMode extends ExpandableStringEnum<AgentPoolMode> { */ public static final AgentPoolMode GATEWAY = fromString("Gateway"); - /** - * Static value ManagedSystem for AgentPoolMode. - */ - public static final AgentPoolMode MANAGED_SYSTEM = fromString("ManagedSystem"); - - /** - * Static value Machines for AgentPoolMode. - */ - public static final AgentPoolMode MACHINES = fromString("Machines"); - /** * Creates a new instance of AgentPoolMode value. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolRecentlyUsedVersion.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolRecentlyUsedVersion.java deleted file mode 100644 index 7ee6aef647c1..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolRecentlyUsedVersion.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * A historical version that can be used for rollback operations. - */ -@Fluent -public final class AgentPoolRecentlyUsedVersion implements JsonSerializable<AgentPoolRecentlyUsedVersion> { - /* - * The Kubernetes version (major.minor.patch) available for rollback. - */ - private String orchestratorVersion; - - /* - * The node image version available for rollback. - */ - private String nodeImageVersion; - - /* - * The timestamp when this version was last used. - */ - private OffsetDateTime timestamp; - - /** - * Creates an instance of AgentPoolRecentlyUsedVersion class. - */ - public AgentPoolRecentlyUsedVersion() { - } - - /** - * Get the orchestratorVersion property: The Kubernetes version (major.minor.patch) available for rollback. - * - * @return the orchestratorVersion value. - */ - public String orchestratorVersion() { - return this.orchestratorVersion; - } - - /** - * Set the orchestratorVersion property: The Kubernetes version (major.minor.patch) available for rollback. - * - * @param orchestratorVersion the orchestratorVersion value to set. - * @return the AgentPoolRecentlyUsedVersion object itself. - */ - public AgentPoolRecentlyUsedVersion withOrchestratorVersion(String orchestratorVersion) { - this.orchestratorVersion = orchestratorVersion; - return this; - } - - /** - * Get the nodeImageVersion property: The node image version available for rollback. - * - * @return the nodeImageVersion value. - */ - public String nodeImageVersion() { - return this.nodeImageVersion; - } - - /** - * Set the nodeImageVersion property: The node image version available for rollback. - * - * @param nodeImageVersion the nodeImageVersion value to set. - * @return the AgentPoolRecentlyUsedVersion object itself. - */ - public AgentPoolRecentlyUsedVersion withNodeImageVersion(String nodeImageVersion) { - this.nodeImageVersion = nodeImageVersion; - return this; - } - - /** - * Get the timestamp property: The timestamp when this version was last used. - * - * @return the timestamp value. - */ - public OffsetDateTime timestamp() { - return this.timestamp; - } - - /** - * Set the timestamp property: The timestamp when this version was last used. - * - * @param timestamp the timestamp value to set. - * @return the AgentPoolRecentlyUsedVersion object itself. - */ - public AgentPoolRecentlyUsedVersion withTimestamp(OffsetDateTime timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("orchestratorVersion", this.orchestratorVersion); - jsonWriter.writeStringField("nodeImageVersion", this.nodeImageVersion); - jsonWriter.writeStringField("timestamp", - this.timestamp == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.timestamp)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentPoolRecentlyUsedVersion from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentPoolRecentlyUsedVersion if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AgentPoolRecentlyUsedVersion. - */ - public static AgentPoolRecentlyUsedVersion fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentPoolRecentlyUsedVersion deserializedAgentPoolRecentlyUsedVersion = new AgentPoolRecentlyUsedVersion(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("orchestratorVersion".equals(fieldName)) { - deserializedAgentPoolRecentlyUsedVersion.orchestratorVersion = reader.getString(); - } else if ("nodeImageVersion".equals(fieldName)) { - deserializedAgentPoolRecentlyUsedVersion.nodeImageVersion = reader.getString(); - } else if ("timestamp".equals(fieldName)) { - deserializedAgentPoolRecentlyUsedVersion.timestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedAgentPoolRecentlyUsedVersion; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java index c4d2b0cfeb13..1402defe71c1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java @@ -16,11 +16,6 @@ */ @Fluent public final class AgentPoolSecurityProfile implements JsonSerializable<AgentPoolSecurityProfile> { - /* - * SSH access method of an agent pool. - */ - private AgentPoolSshAccess sshAccess; - /* * vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally * on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. @@ -33,30 +28,15 @@ public final class AgentPoolSecurityProfile implements JsonSerializable<AgentPoo */ private Boolean enableSecureBoot; - /** - * Creates an instance of AgentPoolSecurityProfile class. - */ - public AgentPoolSecurityProfile() { - } - - /** - * Get the sshAccess property: SSH access method of an agent pool. - * - * @return the sshAccess value. + /* + * SSH access method of an agent pool. */ - public AgentPoolSshAccess sshAccess() { - return this.sshAccess; - } + private AgentPoolSshAccess sshAccess; /** - * Set the sshAccess property: SSH access method of an agent pool. - * - * @param sshAccess the sshAccess value to set. - * @return the AgentPoolSecurityProfile object itself. + * Creates an instance of AgentPoolSecurityProfile class. */ - public AgentPoolSecurityProfile withSshAccess(AgentPoolSshAccess sshAccess) { - this.sshAccess = sshAccess; - return this; + public AgentPoolSecurityProfile() { } /** @@ -107,6 +87,26 @@ public AgentPoolSecurityProfile withEnableSecureBoot(Boolean enableSecureBoot) { return this; } + /** + * Get the sshAccess property: SSH access method of an agent pool. + * + * @return the sshAccess value. + */ + public AgentPoolSshAccess sshAccess() { + return this.sshAccess; + } + + /** + * Set the sshAccess property: SSH access method of an agent pool. + * + * @param sshAccess the sshAccess value to set. + * @return the AgentPoolSecurityProfile object itself. + */ + public AgentPoolSecurityProfile withSshAccess(AgentPoolSshAccess sshAccess) { + this.sshAccess = sshAccess; + return this; + } + /** * Validates the instance. * @@ -121,9 +121,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sshAccess", this.sshAccess == null ? null : this.sshAccess.toString()); jsonWriter.writeBooleanField("enableVTPM", this.enableVtpm); jsonWriter.writeBooleanField("enableSecureBoot", this.enableSecureBoot); + jsonWriter.writeStringField("sshAccess", this.sshAccess == null ? null : this.sshAccess.toString()); return jsonWriter.writeEndObject(); } @@ -142,12 +142,12 @@ public static AgentPoolSecurityProfile fromJson(JsonReader jsonReader) throws IO String fieldName = reader.getFieldName(); reader.nextToken(); - if ("sshAccess".equals(fieldName)) { - deserializedAgentPoolSecurityProfile.sshAccess = AgentPoolSshAccess.fromString(reader.getString()); - } else if ("enableVTPM".equals(fieldName)) { + if ("enableVTPM".equals(fieldName)) { deserializedAgentPoolSecurityProfile.enableVtpm = reader.getNullable(JsonReader::getBoolean); } else if ("enableSecureBoot".equals(fieldName)) { deserializedAgentPoolSecurityProfile.enableSecureBoot = reader.getNullable(JsonReader::getBoolean); + } else if ("sshAccess".equals(fieldName)) { + deserializedAgentPoolSecurityProfile.sshAccess = AgentPoolSshAccess.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java index 185e09138b60..0a92ae4a7d03 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java @@ -21,11 +21,6 @@ public final class AgentPoolSshAccess extends ExpandableStringEnum<AgentPoolSshA */ public static final AgentPoolSshAccess DISABLED = fromString("Disabled"); - /** - * Static value EntraId for AgentPoolSshAccess. - */ - public static final AgentPoolSshAccess ENTRA_ID = fromString("EntraId"); - /** * Creates a new instance of AgentPoolSshAccess value. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java index 21dbdb159988..c3644b0dd650 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java @@ -27,11 +27,6 @@ public final class AgentPoolUpgradeProfilePropertiesUpgradesItem */ private Boolean isPreview; - /* - * Whether the Kubernetes version is out of support. - */ - private Boolean isOutOfSupport; - /** * Creates an instance of AgentPoolUpgradeProfilePropertiesUpgradesItem class. */ @@ -78,26 +73,6 @@ public AgentPoolUpgradeProfilePropertiesUpgradesItem withIsPreview(Boolean isPre return this; } - /** - * Get the isOutOfSupport property: Whether the Kubernetes version is out of support. - * - * @return the isOutOfSupport value. - */ - public Boolean isOutOfSupport() { - return this.isOutOfSupport; - } - - /** - * Set the isOutOfSupport property: Whether the Kubernetes version is out of support. - * - * @param isOutOfSupport the isOutOfSupport value to set. - * @return the AgentPoolUpgradeProfilePropertiesUpgradesItem object itself. - */ - public AgentPoolUpgradeProfilePropertiesUpgradesItem withIsOutOfSupport(Boolean isOutOfSupport) { - this.isOutOfSupport = isOutOfSupport; - return this; - } - /** * Validates the instance. * @@ -114,7 +89,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); jsonWriter.writeBooleanField("isPreview", this.isPreview); - jsonWriter.writeBooleanField("isOutOfSupport", this.isOutOfSupport); return jsonWriter.writeEndObject(); } @@ -139,9 +113,6 @@ public static AgentPoolUpgradeProfilePropertiesUpgradesItem fromJson(JsonReader } else if ("isPreview".equals(fieldName)) { deserializedAgentPoolUpgradeProfilePropertiesUpgradesItem.isPreview = reader.getNullable(JsonReader::getBoolean); - } else if ("isOutOfSupport".equals(fieldName)) { - deserializedAgentPoolUpgradeProfilePropertiesUpgradesItem.isOutOfSupport - = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java index c9fc0c033246..4fe15df7ade6 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Settings for rolling upgrade on an agentpool. + * Settings for upgrading an agentpool. */ @Fluent public final class AgentPoolUpgradeSettings implements JsonSerializable<AgentPoolUpgradeSettings> { @@ -25,16 +25,6 @@ public final class AgentPoolUpgradeSettings implements JsonSerializable<AgentPoo */ private String maxSurge; - /* - * This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is - * the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are - * rounded up. If node capacity constraints prevent full surging, AKS would attempt a slower upgrade with fewer - * surge nodes. The upgrade will proceed only if the available surge capacity meets or exceeds minSurge. If minSurge - * not specified, the default is 50% of the maxSurge, for example, if maxSurge = 10%, the default is 5%, if maxSurge - * = 10, the default is 5. - */ - private String minSurge; - /* * The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either * be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage @@ -44,16 +34,6 @@ public final class AgentPoolUpgradeSettings implements JsonSerializable<AgentPoo */ private String maxUnavailable; - /* - * The maximum number or percentage of extra nodes that are allowed to be blocked in the agent pool during an - * upgrade when undrainable node behavior is Cordon. This can either be set to an integer (e.g. '5') or a percentage - * (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the - * upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is maxSurge. This must - * always be greater than or equal to maxSurge. For more information, including best practices, see: - * https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster - */ - private String maxBlockedNodes; - /* * The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful * termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, @@ -108,36 +88,6 @@ public AgentPoolUpgradeSettings withMaxSurge(String maxSurge) { return this; } - /** - * Get the minSurge property: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a - * percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For - * percentages, fractional nodes are rounded up. If node capacity constraints prevent full surging, AKS would - * attempt a slower upgrade with fewer surge nodes. The upgrade will proceed only if the available surge capacity - * meets or exceeds minSurge. If minSurge not specified, the default is 50% of the maxSurge, for example, if - * maxSurge = 10%, the default is 5%, if maxSurge = 10, the default is 5. - * - * @return the minSurge value. - */ - public String minSurge() { - return this.minSurge; - } - - /** - * Set the minSurge property: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a - * percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For - * percentages, fractional nodes are rounded up. If node capacity constraints prevent full surging, AKS would - * attempt a slower upgrade with fewer surge nodes. The upgrade will proceed only if the available surge capacity - * meets or exceeds minSurge. If minSurge not specified, the default is 50% of the maxSurge, for example, if - * maxSurge = 10%, the default is 5%, if maxSurge = 10, the default is 5. - * - * @param minSurge the minSurge value to set. - * @return the AgentPoolUpgradeSettings object itself. - */ - public AgentPoolUpgradeSettings withMinSurge(String minSurge) { - this.minSurge = minSurge; - return this; - } - /** * Get the maxUnavailable property: The maximum number or percentage of nodes that can be simultaneously unavailable * during upgrade. This can either be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is @@ -166,36 +116,6 @@ public AgentPoolUpgradeSettings withMaxUnavailable(String maxUnavailable) { return this; } - /** - * Get the maxBlockedNodes property: The maximum number or percentage of extra nodes that are allowed to be blocked - * in the agent pool during an upgrade when undrainable node behavior is Cordon. This can either be set to an - * integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total - * agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, - * the default is maxSurge. This must always be greater than or equal to maxSurge. For more information, including - * best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. - * - * @return the maxBlockedNodes value. - */ - public String maxBlockedNodes() { - return this.maxBlockedNodes; - } - - /** - * Set the maxBlockedNodes property: The maximum number or percentage of extra nodes that are allowed to be blocked - * in the agent pool during an upgrade when undrainable node behavior is Cordon. This can either be set to an - * integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total - * agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, - * the default is maxSurge. This must always be greater than or equal to maxSurge. For more information, including - * best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. - * - * @param maxBlockedNodes the maxBlockedNodes value to set. - * @return the AgentPoolUpgradeSettings object itself. - */ - public AgentPoolUpgradeSettings withMaxBlockedNodes(String maxBlockedNodes) { - this.maxBlockedNodes = maxBlockedNodes; - return this; - } - /** * Get the drainTimeoutInMinutes property: The drain timeout for a node. The amount of time (in minutes) to wait on * eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption @@ -285,9 +205,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("maxSurge", this.maxSurge); - jsonWriter.writeStringField("minSurge", this.minSurge); jsonWriter.writeStringField("maxUnavailable", this.maxUnavailable); - jsonWriter.writeStringField("maxBlockedNodes", this.maxBlockedNodes); jsonWriter.writeNumberField("drainTimeoutInMinutes", this.drainTimeoutInMinutes); jsonWriter.writeNumberField("nodeSoakDurationInMinutes", this.nodeSoakDurationInMinutes); jsonWriter.writeStringField("undrainableNodeBehavior", @@ -312,12 +230,8 @@ public static AgentPoolUpgradeSettings fromJson(JsonReader jsonReader) throws IO if ("maxSurge".equals(fieldName)) { deserializedAgentPoolUpgradeSettings.maxSurge = reader.getString(); - } else if ("minSurge".equals(fieldName)) { - deserializedAgentPoolUpgradeSettings.minSurge = reader.getString(); } else if ("maxUnavailable".equals(fieldName)) { deserializedAgentPoolUpgradeSettings.maxUnavailable = reader.getString(); - } else if ("maxBlockedNodes".equals(fieldName)) { - deserializedAgentPoolUpgradeSettings.maxBlockedNodes = reader.getString(); } else if ("drainTimeoutInMinutes".equals(fieldName)) { deserializedAgentPoolUpgradeSettings.drainTimeoutInMinutes = reader.getNullable(JsonReader::getInt); } else if ("nodeSoakDurationInMinutes".equals(fieldName)) { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AutoScaleProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AutoScaleProfile.java deleted file mode 100644 index bb1452b65b68..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AutoScaleProfile.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifications on auto-scaling. - */ -@Fluent -public final class AutoScaleProfile implements JsonSerializable<AutoScaleProfile> { - /* - * VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' or - * 'Standard_D16s_v5'. - */ - private String size; - - /* - * The minimum number of nodes of the specified sizes. - */ - private Integer minCount; - - /* - * The maximum number of nodes of the specified sizes. - */ - private Integer maxCount; - - /** - * Creates an instance of AutoScaleProfile class. - */ - public AutoScaleProfile() { - } - - /** - * Get the size property: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', - * 'Standard_E16s_v3' or 'Standard_D16s_v5'. - * - * @return the size value. - */ - public String size() { - return this.size; - } - - /** - * Set the size property: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', - * 'Standard_E16s_v3' or 'Standard_D16s_v5'. - * - * @param size the size value to set. - * @return the AutoScaleProfile object itself. - */ - public AutoScaleProfile withSize(String size) { - this.size = size; - return this; - } - - /** - * Get the minCount property: The minimum number of nodes of the specified sizes. - * - * @return the minCount value. - */ - public Integer minCount() { - return this.minCount; - } - - /** - * Set the minCount property: The minimum number of nodes of the specified sizes. - * - * @param minCount the minCount value to set. - * @return the AutoScaleProfile object itself. - */ - public AutoScaleProfile withMinCount(Integer minCount) { - this.minCount = minCount; - return this; - } - - /** - * Get the maxCount property: The maximum number of nodes of the specified sizes. - * - * @return the maxCount value. - */ - public Integer maxCount() { - return this.maxCount; - } - - /** - * Set the maxCount property: The maximum number of nodes of the specified sizes. - * - * @param maxCount the maxCount value to set. - * @return the AutoScaleProfile object itself. - */ - public AutoScaleProfile withMaxCount(Integer maxCount) { - this.maxCount = maxCount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("size", this.size); - jsonWriter.writeNumberField("minCount", this.minCount); - jsonWriter.writeNumberField("maxCount", this.maxCount); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AutoScaleProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AutoScaleProfile if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AutoScaleProfile. - */ - public static AutoScaleProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AutoScaleProfile deserializedAutoScaleProfile = new AutoScaleProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("size".equals(fieldName)) { - deserializedAutoScaleProfile.size = reader.getString(); - } else if ("minCount".equals(fieldName)) { - deserializedAutoScaleProfile.minCount = reader.getNullable(JsonReader::getInt); - } else if ("maxCount".equals(fieldName)) { - deserializedAutoScaleProfile.maxCount = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedAutoScaleProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterServiceLoadBalancerHealthProbeMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterServiceLoadBalancerHealthProbeMode.java deleted file mode 100644 index 876040ab659a..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterServiceLoadBalancerHealthProbeMode.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The health probing behavior for External Traffic Policy Cluster services. - */ -public final class ClusterServiceLoadBalancerHealthProbeMode - extends ExpandableStringEnum<ClusterServiceLoadBalancerHealthProbeMode> { - /** - * Static value ServiceNodePort for ClusterServiceLoadBalancerHealthProbeMode. - */ - public static final ClusterServiceLoadBalancerHealthProbeMode SERVICE_NODE_PORT = fromString("ServiceNodePort"); - - /** - * Static value Shared for ClusterServiceLoadBalancerHealthProbeMode. - */ - public static final ClusterServiceLoadBalancerHealthProbeMode SHARED = fromString("Shared"); - - /** - * Creates a new instance of ClusterServiceLoadBalancerHealthProbeMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClusterServiceLoadBalancerHealthProbeMode() { - } - - /** - * Creates or finds a ClusterServiceLoadBalancerHealthProbeMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClusterServiceLoadBalancerHealthProbeMode. - */ - public static ClusterServiceLoadBalancerHealthProbeMode fromString(String name) { - return fromString(name, ClusterServiceLoadBalancerHealthProbeMode.class); - } - - /** - * Gets known ClusterServiceLoadBalancerHealthProbeMode values. - * - * @return known ClusterServiceLoadBalancerHealthProbeMode values. - */ - public static Collection<ClusterServiceLoadBalancerHealthProbeMode> values() { - return values(ClusterServiceLoadBalancerHealthProbeMode.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Component.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Component.java deleted file mode 100644 index 377392c379b5..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Component.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The Component model. - */ -@Fluent -public final class Component implements JsonSerializable<Component> { - /* - * Component name. - */ - private String name; - - /* - * Component version. - */ - private String version; - - /* - * If upgraded component version contains breaking changes from the current version. To see a detailed description - * of what the breaking changes are, visit - * https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking- - * changes-by-version. - */ - private Boolean hasBreakingChanges; - - /** - * Creates an instance of Component class. - */ - public Component() { - } - - /** - * Get the name property: Component name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Component name. - * - * @param name the name value to set. - * @return the Component object itself. - */ - public Component withName(String name) { - this.name = name; - return this; - } - - /** - * Get the version property: Component version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Component version. - * - * @param version the version value to set. - * @return the Component object itself. - */ - public Component withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the hasBreakingChanges property: If upgraded component version contains breaking changes from the current - * version. To see a detailed description of what the breaking changes are, visit - * https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking-changes-by-version. - * - * @return the hasBreakingChanges value. - */ - public Boolean hasBreakingChanges() { - return this.hasBreakingChanges; - } - - /** - * Set the hasBreakingChanges property: If upgraded component version contains breaking changes from the current - * version. To see a detailed description of what the breaking changes are, visit - * https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking-changes-by-version. - * - * @param hasBreakingChanges the hasBreakingChanges value to set. - * @return the Component object itself. - */ - public Component withHasBreakingChanges(Boolean hasBreakingChanges) { - this.hasBreakingChanges = hasBreakingChanges; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("version", this.version); - jsonWriter.writeBooleanField("hasBreakingChanges", this.hasBreakingChanges); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Component from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Component if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the Component. - */ - public static Component fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Component deserializedComponent = new Component(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedComponent.name = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedComponent.version = reader.getString(); - } else if ("hasBreakingChanges".equals(fieldName)) { - deserializedComponent.hasBreakingChanges = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedComponent; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ComponentsByRelease.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ComponentsByRelease.java deleted file mode 100644 index 2c734e4fc3d2..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ComponentsByRelease.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * components of given Kubernetes version. - */ -@Fluent -public final class ComponentsByRelease implements JsonSerializable<ComponentsByRelease> { - /* - * The Kubernetes version (major.minor). - */ - private String kubernetesVersion; - - /* - * components of current or upgraded Kubernetes version in the cluster. - */ - private List<Component> components; - - /** - * Creates an instance of ComponentsByRelease class. - */ - public ComponentsByRelease() { - } - - /** - * Get the kubernetesVersion property: The Kubernetes version (major.minor). - * - * @return the kubernetesVersion value. - */ - public String kubernetesVersion() { - return this.kubernetesVersion; - } - - /** - * Set the kubernetesVersion property: The Kubernetes version (major.minor). - * - * @param kubernetesVersion the kubernetesVersion value to set. - * @return the ComponentsByRelease object itself. - */ - public ComponentsByRelease withKubernetesVersion(String kubernetesVersion) { - this.kubernetesVersion = kubernetesVersion; - return this; - } - - /** - * Get the components property: components of current or upgraded Kubernetes version in the cluster. - * - * @return the components value. - */ - public List<Component> components() { - return this.components; - } - - /** - * Set the components property: components of current or upgraded Kubernetes version in the cluster. - * - * @param components the components value to set. - * @return the ComponentsByRelease object itself. - */ - public ComponentsByRelease withComponents(List<Component> components) { - this.components = components; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (components() != null) { - components().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); - jsonWriter.writeArrayField("components", this.components, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComponentsByRelease from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComponentsByRelease if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ComponentsByRelease. - */ - public static ComponentsByRelease fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComponentsByRelease deserializedComponentsByRelease = new ComponentsByRelease(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("kubernetesVersion".equals(fieldName)) { - deserializedComponentsByRelease.kubernetesVersion = reader.getString(); - } else if ("components".equals(fieldName)) { - List<Component> components = reader.readArray(reader1 -> Component.fromJson(reader1)); - deserializedComponentsByRelease.components = components; - } else { - reader.skipChildren(); - } - } - - return deserializedComponentsByRelease; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java index b9b13331df23..333f0bcc9ba8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java @@ -23,7 +23,7 @@ public final class ContainerServiceNetworkProfile implements JsonSerializable<Co private NetworkPlugin networkPlugin; /* - * Network plugin mode used for building the Kubernetes network. + * The mode the network plugin should use. */ private NetworkPluginMode networkPluginMode; @@ -43,6 +43,12 @@ public final class ContainerServiceNetworkProfile implements JsonSerializable<Co */ private NetworkDataplane networkDataplane; + /* + * Advanced Networking profile for enabling observability and security feature suite on a cluster. For more + * information see aka.ms/aksadvancednetworking. + */ + private AdvancedNetworking advancedNetworking; + /* * A CIDR notation IP range from which to assign pod IPs when kubenet is used. */ @@ -108,25 +114,6 @@ public final class ContainerServiceNetworkProfile implements JsonSerializable<Co */ private List<IpFamily> ipFamilies; - /* - * Defines access to special link local addresses (Azure Instance Metadata Service, aka IMDS) for pods with - * hostNetwork=false. if not specified, the default is 'IMDS'. - */ - private PodLinkLocalAccess podLinkLocalAccess; - - /* - * Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting - * behavior. See https://v<version>.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where - * <version> is represented by a <major version>-<minor version> string. Kubernetes version 1.23 would be '1-23'. - */ - private ContainerServiceNetworkProfileKubeProxyConfig kubeProxyConfig; - - /* - * Advanced Networking profile for enabling observability and security feature suite on a cluster. For more - * information see aka.ms/aksadvancednetworking. - */ - private AdvancedNetworking advancedNetworking; - /** * Creates an instance of ContainerServiceNetworkProfile class. */ @@ -154,7 +141,7 @@ public ContainerServiceNetworkProfile withNetworkPlugin(NetworkPlugin networkPlu } /** - * Get the networkPluginMode property: Network plugin mode used for building the Kubernetes network. + * Get the networkPluginMode property: The mode the network plugin should use. * * @return the networkPluginMode value. */ @@ -163,7 +150,7 @@ public NetworkPluginMode networkPluginMode() { } /** - * Set the networkPluginMode property: Network plugin mode used for building the Kubernetes network. + * Set the networkPluginMode property: The mode the network plugin should use. * * @param networkPluginMode the networkPluginMode value to set. * @return the ContainerServiceNetworkProfile object itself. @@ -235,6 +222,28 @@ public ContainerServiceNetworkProfile withNetworkDataplane(NetworkDataplane netw return this; } + /** + * Get the advancedNetworking property: Advanced Networking profile for enabling observability and security feature + * suite on a cluster. For more information see aka.ms/aksadvancednetworking. + * + * @return the advancedNetworking value. + */ + public AdvancedNetworking advancedNetworking() { + return this.advancedNetworking; + } + + /** + * Set the advancedNetworking property: Advanced Networking profile for enabling observability and security feature + * suite on a cluster. For more information see aka.ms/aksadvancednetworking. + * + * @param advancedNetworking the advancedNetworking value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withAdvancedNetworking(AdvancedNetworking advancedNetworking) { + this.advancedNetworking = advancedNetworking; + return this; + } + /** * Get the podCidr property: A CIDR notation IP range from which to assign pod IPs when kubenet is used. * @@ -483,85 +492,15 @@ public ContainerServiceNetworkProfile withIpFamilies(List<IpFamily> ipFamilies) return this; } - /** - * Get the podLinkLocalAccess property: Defines access to special link local addresses (Azure Instance Metadata - * Service, aka IMDS) for pods with hostNetwork=false. if not specified, the default is 'IMDS'. - * - * @return the podLinkLocalAccess value. - */ - public PodLinkLocalAccess podLinkLocalAccess() { - return this.podLinkLocalAccess; - } - - /** - * Set the podLinkLocalAccess property: Defines access to special link local addresses (Azure Instance Metadata - * Service, aka IMDS) for pods with hostNetwork=false. if not specified, the default is 'IMDS'. - * - * @param podLinkLocalAccess the podLinkLocalAccess value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withPodLinkLocalAccess(PodLinkLocalAccess podLinkLocalAccess) { - this.podLinkLocalAccess = podLinkLocalAccess; - return this; - } - - /** - * Get the kubeProxyConfig property: Holds configuration customizations for kube-proxy. Any values not defined will - * use the kube-proxy defaulting behavior. See - * https://v<version>.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where - * <version> is represented by a <major version>-<minor version> string. Kubernetes version 1.23 - * would be '1-23'. - * - * @return the kubeProxyConfig value. - */ - public ContainerServiceNetworkProfileKubeProxyConfig kubeProxyConfig() { - return this.kubeProxyConfig; - } - - /** - * Set the kubeProxyConfig property: Holds configuration customizations for kube-proxy. Any values not defined will - * use the kube-proxy defaulting behavior. See - * https://v<version>.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where - * <version> is represented by a <major version>-<minor version> string. Kubernetes version 1.23 - * would be '1-23'. - * - * @param kubeProxyConfig the kubeProxyConfig value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile - withKubeProxyConfig(ContainerServiceNetworkProfileKubeProxyConfig kubeProxyConfig) { - this.kubeProxyConfig = kubeProxyConfig; - return this; - } - - /** - * Get the advancedNetworking property: Advanced Networking profile for enabling observability and security feature - * suite on a cluster. For more information see aka.ms/aksadvancednetworking. - * - * @return the advancedNetworking value. - */ - public AdvancedNetworking advancedNetworking() { - return this.advancedNetworking; - } - - /** - * Set the advancedNetworking property: Advanced Networking profile for enabling observability and security feature - * suite on a cluster. For more information see aka.ms/aksadvancednetworking. - * - * @param advancedNetworking the advancedNetworking value to set. - * @return the ContainerServiceNetworkProfile object itself. - */ - public ContainerServiceNetworkProfile withAdvancedNetworking(AdvancedNetworking advancedNetworking) { - this.advancedNetworking = advancedNetworking; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (advancedNetworking() != null) { + advancedNetworking().validate(); + } if (loadBalancerProfile() != null) { loadBalancerProfile().validate(); } @@ -571,12 +510,6 @@ public void validate() { if (staticEgressGatewayProfile() != null) { staticEgressGatewayProfile().validate(); } - if (kubeProxyConfig() != null) { - kubeProxyConfig().validate(); - } - if (advancedNetworking() != null) { - advancedNetworking().validate(); - } } /** @@ -592,6 +525,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("networkMode", this.networkMode == null ? null : this.networkMode.toString()); jsonWriter.writeStringField("networkDataplane", this.networkDataplane == null ? null : this.networkDataplane.toString()); + jsonWriter.writeJsonField("advancedNetworking", this.advancedNetworking); jsonWriter.writeStringField("podCidr", this.podCidr); jsonWriter.writeStringField("serviceCidr", this.serviceCidr); jsonWriter.writeStringField("dnsServiceIP", this.dnsServiceIp); @@ -605,10 +539,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("serviceCidrs", this.serviceCidrs, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("ipFamilies", this.ipFamilies, (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeStringField("podLinkLocalAccess", - this.podLinkLocalAccess == null ? null : this.podLinkLocalAccess.toString()); - jsonWriter.writeJsonField("kubeProxyConfig", this.kubeProxyConfig); - jsonWriter.writeJsonField("advancedNetworking", this.advancedNetworking); return jsonWriter.writeEndObject(); } @@ -642,6 +572,8 @@ public static ContainerServiceNetworkProfile fromJson(JsonReader jsonReader) thr } else if ("networkDataplane".equals(fieldName)) { deserializedContainerServiceNetworkProfile.networkDataplane = NetworkDataplane.fromString(reader.getString()); + } else if ("advancedNetworking".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.advancedNetworking = AdvancedNetworking.fromJson(reader); } else if ("podCidr".equals(fieldName)) { deserializedContainerServiceNetworkProfile.podCidr = reader.getString(); } else if ("serviceCidr".equals(fieldName)) { @@ -672,14 +604,6 @@ public static ContainerServiceNetworkProfile fromJson(JsonReader jsonReader) thr } else if ("ipFamilies".equals(fieldName)) { List<IpFamily> ipFamilies = reader.readArray(reader1 -> IpFamily.fromString(reader1.getString())); deserializedContainerServiceNetworkProfile.ipFamilies = ipFamilies; - } else if ("podLinkLocalAccess".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.podLinkLocalAccess - = PodLinkLocalAccess.fromString(reader.getString()); - } else if ("kubeProxyConfig".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.kubeProxyConfig - = ContainerServiceNetworkProfileKubeProxyConfig.fromJson(reader); - } else if ("advancedNetworking".equals(fieldName)) { - deserializedContainerServiceNetworkProfile.advancedNetworking = AdvancedNetworking.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfig.java deleted file mode 100644 index 17febf1880ab..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfig.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting - * behavior. See https://v<version>.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ - * where <version> is represented by a <major version>-<minor version> string. Kubernetes version 1.23 - * would be '1-23'. - */ -@Fluent -public final class ContainerServiceNetworkProfileKubeProxyConfig - implements JsonSerializable<ContainerServiceNetworkProfileKubeProxyConfig> { - /* - * Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by - * default without these customizations). - */ - private Boolean enabled; - - /* - * Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES') - */ - private Mode mode; - - /* - * Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. - */ - private ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig ipvsConfig; - - /** - * Creates an instance of ContainerServiceNetworkProfileKubeProxyConfig class. - */ - public ContainerServiceNetworkProfileKubeProxyConfig() { - } - - /** - * Get the enabled property: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, - * kube-proxy is enabled in AKS by default without these customizations). - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, - * kube-proxy is enabled in AKS by default without these customizations). - * - * @param enabled the enabled value to set. - * @return the ContainerServiceNetworkProfileKubeProxyConfig object itself. - */ - public ContainerServiceNetworkProfileKubeProxyConfig withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the mode property: Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). - * - * @return the mode value. - */ - public Mode mode() { - return this.mode; - } - - /** - * Set the mode property: Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). - * - * @param mode the mode value to set. - * @return the ContainerServiceNetworkProfileKubeProxyConfig object itself. - */ - public ContainerServiceNetworkProfileKubeProxyConfig withMode(Mode mode) { - this.mode = mode; - return this; - } - - /** - * Get the ipvsConfig property: Holds configuration customizations for IPVS. May only be specified if 'mode' is set - * to 'IPVS'. - * - * @return the ipvsConfig value. - */ - public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig ipvsConfig() { - return this.ipvsConfig; - } - - /** - * Set the ipvsConfig property: Holds configuration customizations for IPVS. May only be specified if 'mode' is set - * to 'IPVS'. - * - * @param ipvsConfig the ipvsConfig value to set. - * @return the ContainerServiceNetworkProfileKubeProxyConfig object itself. - */ - public ContainerServiceNetworkProfileKubeProxyConfig - withIpvsConfig(ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig ipvsConfig) { - this.ipvsConfig = ipvsConfig; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipvsConfig() != null) { - ipvsConfig().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - jsonWriter.writeJsonField("ipvsConfig", this.ipvsConfig); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerServiceNetworkProfileKubeProxyConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerServiceNetworkProfileKubeProxyConfig if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ContainerServiceNetworkProfileKubeProxyConfig. - */ - public static ContainerServiceNetworkProfileKubeProxyConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerServiceNetworkProfileKubeProxyConfig deserializedContainerServiceNetworkProfileKubeProxyConfig - = new ContainerServiceNetworkProfileKubeProxyConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedContainerServiceNetworkProfileKubeProxyConfig.enabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("mode".equals(fieldName)) { - deserializedContainerServiceNetworkProfileKubeProxyConfig.mode - = Mode.fromString(reader.getString()); - } else if ("ipvsConfig".equals(fieldName)) { - deserializedContainerServiceNetworkProfileKubeProxyConfig.ipvsConfig - = ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerServiceNetworkProfileKubeProxyConfig; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java deleted file mode 100644 index 6a626ffea889..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. - */ -@Fluent -public final class ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig - implements JsonSerializable<ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig> { - /* - * IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. - */ - private IpvsScheduler scheduler; - - /* - * The timeout value used for idle IPVS TCP sessions in seconds. Must be a positive integer value. - */ - private Integer tcpTimeoutSeconds; - - /* - * The timeout value used for IPVS TCP sessions after receiving a FIN in seconds. Must be a positive integer value. - */ - private Integer tcpFinTimeoutSeconds; - - /* - * The timeout value used for IPVS UDP packets in seconds. Must be a positive integer value. - */ - private Integer udpTimeoutSeconds; - - /** - * Creates an instance of ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig class. - */ - public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig() { - } - - /** - * Get the scheduler property: IPVS scheduler, for more information please see - * http://www.linuxvirtualserver.org/docs/scheduling.html. - * - * @return the scheduler value. - */ - public IpvsScheduler scheduler() { - return this.scheduler; - } - - /** - * Set the scheduler property: IPVS scheduler, for more information please see - * http://www.linuxvirtualserver.org/docs/scheduling.html. - * - * @param scheduler the scheduler value to set. - * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. - */ - public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig withScheduler(IpvsScheduler scheduler) { - this.scheduler = scheduler; - return this; - } - - /** - * Get the tcpTimeoutSeconds property: The timeout value used for idle IPVS TCP sessions in seconds. Must be a - * positive integer value. - * - * @return the tcpTimeoutSeconds value. - */ - public Integer tcpTimeoutSeconds() { - return this.tcpTimeoutSeconds; - } - - /** - * Set the tcpTimeoutSeconds property: The timeout value used for idle IPVS TCP sessions in seconds. Must be a - * positive integer value. - * - * @param tcpTimeoutSeconds the tcpTimeoutSeconds value to set. - * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. - */ - public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig withTcpTimeoutSeconds(Integer tcpTimeoutSeconds) { - this.tcpTimeoutSeconds = tcpTimeoutSeconds; - return this; - } - - /** - * Get the tcpFinTimeoutSeconds property: The timeout value used for IPVS TCP sessions after receiving a FIN in - * seconds. Must be a positive integer value. - * - * @return the tcpFinTimeoutSeconds value. - */ - public Integer tcpFinTimeoutSeconds() { - return this.tcpFinTimeoutSeconds; - } - - /** - * Set the tcpFinTimeoutSeconds property: The timeout value used for IPVS TCP sessions after receiving a FIN in - * seconds. Must be a positive integer value. - * - * @param tcpFinTimeoutSeconds the tcpFinTimeoutSeconds value to set. - * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. - */ - public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig - withTcpFinTimeoutSeconds(Integer tcpFinTimeoutSeconds) { - this.tcpFinTimeoutSeconds = tcpFinTimeoutSeconds; - return this; - } - - /** - * Get the udpTimeoutSeconds property: The timeout value used for IPVS UDP packets in seconds. Must be a positive - * integer value. - * - * @return the udpTimeoutSeconds value. - */ - public Integer udpTimeoutSeconds() { - return this.udpTimeoutSeconds; - } - - /** - * Set the udpTimeoutSeconds property: The timeout value used for IPVS UDP packets in seconds. Must be a positive - * integer value. - * - * @param udpTimeoutSeconds the udpTimeoutSeconds value to set. - * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. - */ - public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig withUdpTimeoutSeconds(Integer udpTimeoutSeconds) { - this.udpTimeoutSeconds = udpTimeoutSeconds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("scheduler", this.scheduler == null ? null : this.scheduler.toString()); - jsonWriter.writeNumberField("tcpTimeoutSeconds", this.tcpTimeoutSeconds); - jsonWriter.writeNumberField("tcpFinTimeoutSeconds", this.tcpFinTimeoutSeconds); - jsonWriter.writeNumberField("udpTimeoutSeconds", this.udpTimeoutSeconds); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig if the JsonReader was pointing to - * an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig. - */ - public static ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig - = new ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scheduler".equals(fieldName)) { - deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.scheduler - = IpvsScheduler.fromString(reader.getString()); - } else if ("tcpTimeoutSeconds".equals(fieldName)) { - deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.tcpTimeoutSeconds - = reader.getNullable(JsonReader::getInt); - } else if ("tcpFinTimeoutSeconds".equals(fieldName)) { - deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.tcpFinTimeoutSeconds - = reader.getNullable(JsonReader::getInt); - } else if ("udpTimeoutSeconds".equals(fieldName)) { - deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.udpTimeoutSeconds - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriftAction.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriftAction.java deleted file mode 100644 index 19e1aa682e34..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriftAction.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The drift action of the machine. Indicates whether a machine has deviated from its expected state due to changes in - * managed cluster properties, requiring corrective action. - */ -public final class DriftAction extends ExpandableStringEnum<DriftAction> { - /** - * Static value Synced for DriftAction. - */ - public static final DriftAction SYNCED = fromString("Synced"); - - /** - * Static value Recreate for DriftAction. - */ - public static final DriftAction RECREATE = fromString("Recreate"); - - /** - * Creates a new instance of DriftAction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DriftAction() { - } - - /** - * Creates or finds a DriftAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding DriftAction. - */ - public static DriftAction fromString(String name) { - return fromString(name, DriftAction.class); - } - - /** - * Gets known DriftAction values. - * - * @return known DriftAction values. - */ - public static Collection<DriftAction> values() { - return values(DriftAction.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriverType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriverType.java deleted file mode 100644 index 0ab2856f2d4c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriverType.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specify the type of GPU driver to install when creating Windows agent pools. If not provided, AKS selects the driver - * based on system compatibility. This cannot be changed once the AgentPool has been created. This cannot be set on - * Linux AgentPools. For Linux AgentPools, the driver is selected based on system compatibility. - */ -public final class DriverType extends ExpandableStringEnum<DriverType> { - /** - * Static value GRID for DriverType. - */ - public static final DriverType GRID = fromString("GRID"); - - /** - * Static value CUDA for DriverType. - */ - public static final DriverType CUDA = fromString("CUDA"); - - /** - * Creates a new instance of DriverType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DriverType() { - } - - /** - * Creates or finds a DriverType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DriverType. - */ - public static DriverType fromString(String name) { - return fromString(name, DriverType.class); - } - - /** - * Gets known DriverType values. - * - * @return known DriverType values. - */ - public static Collection<DriverType> values() { - return values(DriverType.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java index 0c2abaef4d28..83dd030aabe6 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The GpuProfile model. + * GPU settings for the Agent Pool. */ @Fluent public final class GpuProfile implements JsonSerializable<GpuProfile> { @@ -21,13 +21,6 @@ public final class GpuProfile implements JsonSerializable<GpuProfile> { */ private GpuDriver driver; - /* - * Specify the type of GPU driver to install when creating Windows agent pools. If not provided, AKS selects the - * driver based on system compatibility. This cannot be changed once the AgentPool has been created. This cannot be - * set on Linux AgentPools. For Linux AgentPools, the driver is selected based on system compatibility. - */ - private DriverType driverType; - /** * Creates an instance of GpuProfile class. */ @@ -54,32 +47,6 @@ public GpuProfile withDriver(GpuDriver driver) { return this; } - /** - * Get the driverType property: Specify the type of GPU driver to install when creating Windows agent pools. If not - * provided, AKS selects the driver based on system compatibility. This cannot be changed once the AgentPool has - * been created. This cannot be set on Linux AgentPools. For Linux AgentPools, the driver is selected based on - * system compatibility. - * - * @return the driverType value. - */ - public DriverType driverType() { - return this.driverType; - } - - /** - * Set the driverType property: Specify the type of GPU driver to install when creating Windows agent pools. If not - * provided, AKS selects the driver based on system compatibility. This cannot be changed once the AgentPool has - * been created. This cannot be set on Linux AgentPools. For Linux AgentPools, the driver is selected based on - * system compatibility. - * - * @param driverType the driverType value to set. - * @return the GpuProfile object itself. - */ - public GpuProfile withDriverType(DriverType driverType) { - this.driverType = driverType; - return this; - } - /** * Validates the instance. * @@ -95,7 +62,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("driver", this.driver == null ? null : this.driver.toString()); - jsonWriter.writeStringField("driverType", this.driverType == null ? null : this.driverType.toString()); return jsonWriter.writeEndObject(); } @@ -116,8 +82,6 @@ public static GpuProfile fromJson(JsonReader jsonReader) throws IOException { if ("driver".equals(fieldName)) { deserializedGpuProfile.driver = GpuDriver.fromString(reader.getString()); - } else if ("driverType".equals(fieldName)) { - deserializedGpuProfile.driverType = DriverType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsList.java deleted file mode 100644 index d1aa02d9846b..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsList.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.fluent.models.GuardrailsAvailableVersionInner; -import java.io.IOException; -import java.util.List; - -/** - * Hold values properties, which is array of GuardrailsVersions. - */ -@Fluent -public final class GuardrailsAvailableVersionsList implements JsonSerializable<GuardrailsAvailableVersionsList> { - /* - * Array of AKS supported Guardrails versions. - */ - private List<GuardrailsAvailableVersionInner> value; - - /* - * The URL to get the next Guardrails available version. - */ - private String nextLink; - - /** - * Creates an instance of GuardrailsAvailableVersionsList class. - */ - public GuardrailsAvailableVersionsList() { - } - - /** - * Get the value property: Array of AKS supported Guardrails versions. - * - * @return the value value. - */ - public List<GuardrailsAvailableVersionInner> value() { - return this.value; - } - - /** - * Set the value property: Array of AKS supported Guardrails versions. - * - * @param value the value value to set. - * @return the GuardrailsAvailableVersionsList object itself. - */ - public GuardrailsAvailableVersionsList withValue(List<GuardrailsAvailableVersionInner> value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next Guardrails available version. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GuardrailsAvailableVersionsList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GuardrailsAvailableVersionsList if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the GuardrailsAvailableVersionsList. - */ - public static GuardrailsAvailableVersionsList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GuardrailsAvailableVersionsList deserializedGuardrailsAvailableVersionsList - = new GuardrailsAvailableVersionsList(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List<GuardrailsAvailableVersionInner> value - = reader.readArray(reader1 -> GuardrailsAvailableVersionInner.fromJson(reader1)); - deserializedGuardrailsAvailableVersionsList.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedGuardrailsAvailableVersionsList.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedGuardrailsAvailableVersionsList; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsProperties.java deleted file mode 100644 index 11df96a784bb..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsProperties.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Whether the version is default or not and support info. - */ -@Immutable -public final class GuardrailsAvailableVersionsProperties - implements JsonSerializable<GuardrailsAvailableVersionsProperties> { - /* - * The isDefaultVersion property. - */ - private Boolean isDefaultVersion; - - /* - * Whether the version is preview or stable. - */ - private GuardrailsSupport support; - - /** - * Creates an instance of GuardrailsAvailableVersionsProperties class. - */ - public GuardrailsAvailableVersionsProperties() { - } - - /** - * Get the isDefaultVersion property: The isDefaultVersion property. - * - * @return the isDefaultVersion value. - */ - public Boolean isDefaultVersion() { - return this.isDefaultVersion; - } - - /** - * Get the support property: Whether the version is preview or stable. - * - * @return the support value. - */ - public GuardrailsSupport support() { - return this.support; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GuardrailsAvailableVersionsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GuardrailsAvailableVersionsProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the GuardrailsAvailableVersionsProperties. - */ - public static GuardrailsAvailableVersionsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GuardrailsAvailableVersionsProperties deserializedGuardrailsAvailableVersionsProperties - = new GuardrailsAvailableVersionsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("isDefaultVersion".equals(fieldName)) { - deserializedGuardrailsAvailableVersionsProperties.isDefaultVersion - = reader.getNullable(JsonReader::getBoolean); - } else if ("support".equals(fieldName)) { - deserializedGuardrailsAvailableVersionsProperties.support - = GuardrailsSupport.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedGuardrailsAvailableVersionsProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsSupport.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsSupport.java deleted file mode 100644 index bdd969c4bfc0..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsSupport.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Whether the version is preview or stable. - */ -public final class GuardrailsSupport extends ExpandableStringEnum<GuardrailsSupport> { - /** - * Static value Preview for GuardrailsSupport. - */ - public static final GuardrailsSupport PREVIEW = fromString("Preview"); - - /** - * Static value Stable for GuardrailsSupport. - */ - public static final GuardrailsSupport STABLE = fromString("Stable"); - - /** - * Creates a new instance of GuardrailsSupport value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public GuardrailsSupport() { - } - - /** - * Creates or finds a GuardrailsSupport from its string representation. - * - * @param name a name to look for. - * @return the corresponding GuardrailsSupport. - */ - public static GuardrailsSupport fromString(String name) { - return fromString(name, GuardrailsSupport.class); - } - - /** - * Gets known GuardrailsSupport values. - * - * @return known GuardrailsSupport values. - */ - public static Collection<GuardrailsSupport> values() { - return values(GuardrailsSupport.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingListResult.java deleted file mode 100644 index 974a7b23f9ad..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingListResult.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.fluent.models.IdentityBindingInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a IdentityBinding list operation. - */ -@Fluent -public final class IdentityBindingListResult implements JsonSerializable<IdentityBindingListResult> { - /* - * The IdentityBinding items on this page - */ - private List<IdentityBindingInner> value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of IdentityBindingListResult class. - */ - public IdentityBindingListResult() { - } - - /** - * Get the value property: The IdentityBinding items on this page. - * - * @return the value value. - */ - public List<IdentityBindingInner> value() { - return this.value; - } - - /** - * Set the value property: The IdentityBinding items on this page. - * - * @param value the value value to set. - * @return the IdentityBindingListResult object itself. - */ - public IdentityBindingListResult withValue(List<IdentityBindingInner> value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the IdentityBindingListResult object itself. - */ - public IdentityBindingListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property value in model IdentityBindingListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IdentityBindingListResult.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IdentityBindingListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IdentityBindingListResult if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IdentityBindingListResult. - */ - public static IdentityBindingListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IdentityBindingListResult deserializedIdentityBindingListResult = new IdentityBindingListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List<IdentityBindingInner> value - = reader.readArray(reader1 -> IdentityBindingInner.fromJson(reader1)); - deserializedIdentityBindingListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedIdentityBindingListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIdentityBindingListResult; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingManagedIdentityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingManagedIdentityProfile.java deleted file mode 100644 index 5171bc2b615f..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingManagedIdentityProfile.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Managed identity profile for the identity binding. - */ -@Fluent -public final class IdentityBindingManagedIdentityProfile - implements JsonSerializable<IdentityBindingManagedIdentityProfile> { - /* - * The resource ID of the managed identity. - */ - private String resourceId; - - /* - * The object ID of the managed identity. - */ - private String objectId; - - /* - * The client ID of the managed identity. - */ - private String clientId; - - /* - * The tenant ID of the managed identity. - */ - private String tenantId; - - /** - * Creates an instance of IdentityBindingManagedIdentityProfile class. - */ - public IdentityBindingManagedIdentityProfile() { - } - - /** - * Get the resourceId property: The resource ID of the managed identity. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: The resource ID of the managed identity. - * - * @param resourceId the resourceId value to set. - * @return the IdentityBindingManagedIdentityProfile object itself. - */ - public IdentityBindingManagedIdentityProfile withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the objectId property: The object ID of the managed identity. - * - * @return the objectId value. - */ - public String objectId() { - return this.objectId; - } - - /** - * Get the clientId property: The client ID of the managed identity. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Get the tenantId property: The tenant ID of the managed identity. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (resourceId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property resourceId in model IdentityBindingManagedIdentityProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IdentityBindingManagedIdentityProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceId", this.resourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IdentityBindingManagedIdentityProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IdentityBindingManagedIdentityProfile if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IdentityBindingManagedIdentityProfile. - */ - public static IdentityBindingManagedIdentityProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IdentityBindingManagedIdentityProfile deserializedIdentityBindingManagedIdentityProfile - = new IdentityBindingManagedIdentityProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceId".equals(fieldName)) { - deserializedIdentityBindingManagedIdentityProfile.resourceId = reader.getString(); - } else if ("objectId".equals(fieldName)) { - deserializedIdentityBindingManagedIdentityProfile.objectId = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedIdentityBindingManagedIdentityProfile.clientId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedIdentityBindingManagedIdentityProfile.tenantId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIdentityBindingManagedIdentityProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingOidcIssuerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingOidcIssuerProfile.java deleted file mode 100644 index 12ad4215b8f6..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingOidcIssuerProfile.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * IdentityBinding OIDC issuer profile. - */ -@Immutable -public final class IdentityBindingOidcIssuerProfile implements JsonSerializable<IdentityBindingOidcIssuerProfile> { - /* - * The OIDC issuer URL of the IdentityBinding. - */ - private String oidcIssuerUrl; - - /** - * Creates an instance of IdentityBindingOidcIssuerProfile class. - */ - public IdentityBindingOidcIssuerProfile() { - } - - /** - * Get the oidcIssuerUrl property: The OIDC issuer URL of the IdentityBinding. - * - * @return the oidcIssuerUrl value. - */ - public String oidcIssuerUrl() { - return this.oidcIssuerUrl; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IdentityBindingOidcIssuerProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IdentityBindingOidcIssuerProfile if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IdentityBindingOidcIssuerProfile. - */ - public static IdentityBindingOidcIssuerProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IdentityBindingOidcIssuerProfile deserializedIdentityBindingOidcIssuerProfile - = new IdentityBindingOidcIssuerProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("oidcIssuerUrl".equals(fieldName)) { - deserializedIdentityBindingOidcIssuerProfile.oidcIssuerUrl = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIdentityBindingOidcIssuerProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java deleted file mode 100644 index e10fa1bce2cc..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * IdentityBinding properties. - */ -@Fluent -public final class IdentityBindingProperties implements JsonSerializable<IdentityBindingProperties> { - /* - * Managed identity profile for the identity binding. - */ - private IdentityBindingManagedIdentityProfile managedIdentity; - - /* - * The OIDC issuer URL of the IdentityBinding. - */ - private IdentityBindingOidcIssuerProfile oidcIssuer; - - /* - * The status of the last operation. - */ - private IdentityBindingProvisioningState provisioningState; - - /** - * Creates an instance of IdentityBindingProperties class. - */ - public IdentityBindingProperties() { - } - - /** - * Get the managedIdentity property: Managed identity profile for the identity binding. - * - * @return the managedIdentity value. - */ - public IdentityBindingManagedIdentityProfile managedIdentity() { - return this.managedIdentity; - } - - /** - * Set the managedIdentity property: Managed identity profile for the identity binding. - * - * @param managedIdentity the managedIdentity value to set. - * @return the IdentityBindingProperties object itself. - */ - public IdentityBindingProperties withManagedIdentity(IdentityBindingManagedIdentityProfile managedIdentity) { - this.managedIdentity = managedIdentity; - return this; - } - - /** - * Get the oidcIssuer property: The OIDC issuer URL of the IdentityBinding. - * - * @return the oidcIssuer value. - */ - public IdentityBindingOidcIssuerProfile oidcIssuer() { - return this.oidcIssuer; - } - - /** - * Get the provisioningState property: The status of the last operation. - * - * @return the provisioningState value. - */ - public IdentityBindingProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (managedIdentity() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property managedIdentity in model IdentityBindingProperties")); - } else { - managedIdentity().validate(); - } - if (oidcIssuer() != null) { - oidcIssuer().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IdentityBindingProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("managedIdentity", this.managedIdentity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IdentityBindingProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IdentityBindingProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IdentityBindingProperties. - */ - public static IdentityBindingProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IdentityBindingProperties deserializedIdentityBindingProperties = new IdentityBindingProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("managedIdentity".equals(fieldName)) { - deserializedIdentityBindingProperties.managedIdentity - = IdentityBindingManagedIdentityProfile.fromJson(reader); - } else if ("oidcIssuer".equals(fieldName)) { - deserializedIdentityBindingProperties.oidcIssuer - = IdentityBindingOidcIssuerProfile.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedIdentityBindingProperties.provisioningState - = IdentityBindingProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedIdentityBindingProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProvisioningState.java deleted file mode 100644 index 5f5494ac523c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProvisioningState.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The provisioning state of the last accepted operation. - */ -public final class IdentityBindingProvisioningState extends ExpandableStringEnum<IdentityBindingProvisioningState> { - /** - * Static value Succeeded for IdentityBindingProvisioningState. - */ - public static final IdentityBindingProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for IdentityBindingProvisioningState. - */ - public static final IdentityBindingProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for IdentityBindingProvisioningState. - */ - public static final IdentityBindingProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Creating for IdentityBindingProvisioningState. - */ - public static final IdentityBindingProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Updating for IdentityBindingProvisioningState. - */ - public static final IdentityBindingProvisioningState UPDATING = fromString("Updating"); - - /** - * Static value Deleting for IdentityBindingProvisioningState. - */ - public static final IdentityBindingProvisioningState DELETING = fromString("Deleting"); - - /** - * Creates a new instance of IdentityBindingProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IdentityBindingProvisioningState() { - } - - /** - * Creates or finds a IdentityBindingProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding IdentityBindingProvisioningState. - */ - public static IdentityBindingProvisioningState fromString(String name) { - return fromString(name, IdentityBindingProvisioningState.class); - } - - /** - * Gets known IdentityBindingProvisioningState values. - * - * @return known IdentityBindingProvisioningState values. - */ - public static Collection<IdentityBindingProvisioningState> values() { - return values(IdentityBindingProvisioningState.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/InfrastructureEncryption.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/InfrastructureEncryption.java deleted file mode 100644 index c92e56b6341e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/InfrastructureEncryption.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Whether to enable encryption at rest of Kubernetes resource objects using service-managed keys. More information on - * this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. - */ -public final class InfrastructureEncryption extends ExpandableStringEnum<InfrastructureEncryption> { - /** - * Static value Enabled for InfrastructureEncryption. - */ - public static final InfrastructureEncryption ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for InfrastructureEncryption. - */ - public static final InfrastructureEncryption DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of InfrastructureEncryption value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public InfrastructureEncryption() { - } - - /** - * Creates or finds a InfrastructureEncryption from its string representation. - * - * @param name a name to look for. - * @return the corresponding InfrastructureEncryption. - */ - public static InfrastructureEncryption fromString(String name) { - return fromString(name, InfrastructureEncryption.class); - } - - /** - * Gets known InfrastructureEncryption values. - * - * @return known InfrastructureEncryption values. - */ - public static Collection<InfrastructureEncryption> values() { - return values(InfrastructureEncryption.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java index e780c371e177..60e8215db582 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * To determine if address belongs IPv4 or IPv6 family. + * The IP version to use for cluster networking and IP assignment. */ public final class IpFamily extends ExpandableStringEnum<IpFamily> { /** diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpvsScheduler.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpvsScheduler.java deleted file mode 100644 index 34ecb3f572ba..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpvsScheduler.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. - */ -public final class IpvsScheduler extends ExpandableStringEnum<IpvsScheduler> { - /** - * Static value RoundRobin for IpvsScheduler. - */ - public static final IpvsScheduler ROUND_ROBIN = fromString("RoundRobin"); - - /** - * Static value LeastConnection for IpvsScheduler. - */ - public static final IpvsScheduler LEAST_CONNECTION = fromString("LeastConnection"); - - /** - * Creates a new instance of IpvsScheduler value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IpvsScheduler() { - } - - /** - * Creates or finds a IpvsScheduler from its string representation. - * - * @param name a name to look for. - * @return the corresponding IpvsScheduler. - */ - public static IpvsScheduler fromString(String name) { - return fromString(name, IpvsScheduler.class); - } - - /** - * Gets known IpvsScheduler values. - * - * @return known IpvsScheduler values. - */ - public static Collection<IpvsScheduler> values() { - return values(IpvsScheduler.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java index d43de4400145..0dc7eb7ddb66 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java @@ -27,11 +27,6 @@ public final class IstioComponents implements JsonSerializable<IstioComponents> */ private List<IstioEgressGateway> egressGateways; - /* - * Mode of traffic redirection. - */ - private ProxyRedirectionMechanism proxyRedirectionMechanism; - /** * Creates an instance of IstioComponents class. */ @@ -78,26 +73,6 @@ public IstioComponents withEgressGateways(List<IstioEgressGateway> egressGateway return this; } - /** - * Get the proxyRedirectionMechanism property: Mode of traffic redirection. - * - * @return the proxyRedirectionMechanism value. - */ - public ProxyRedirectionMechanism proxyRedirectionMechanism() { - return this.proxyRedirectionMechanism; - } - - /** - * Set the proxyRedirectionMechanism property: Mode of traffic redirection. - * - * @param proxyRedirectionMechanism the proxyRedirectionMechanism value to set. - * @return the IstioComponents object itself. - */ - public IstioComponents withProxyRedirectionMechanism(ProxyRedirectionMechanism proxyRedirectionMechanism) { - this.proxyRedirectionMechanism = proxyRedirectionMechanism; - return this; - } - /** * Validates the instance. * @@ -122,8 +97,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("egressGateways", this.egressGateways, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("proxyRedirectionMechanism", - this.proxyRedirectionMechanism == null ? null : this.proxyRedirectionMechanism.toString()); return jsonWriter.writeEndObject(); } @@ -150,9 +123,6 @@ public static IstioComponents fromJson(JsonReader jsonReader) throws IOException List<IstioEgressGateway> egressGateways = reader.readArray(reader1 -> IstioEgressGateway.fromJson(reader1)); deserializedIstioComponents.egressGateways = egressGateways; - } else if ("proxyRedirectionMechanism".equals(fieldName)) { - deserializedIstioComponents.proxyRedirectionMechanism - = ProxyRedirectionMechanism.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorClaimMappingExpression.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorClaimMappingExpression.java deleted file mode 100644 index e4d10995f864..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorClaimMappingExpression.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The claim mapping expression for JWTAuthenticator. - */ -@Fluent -public final class JwtAuthenticatorClaimMappingExpression - implements JsonSerializable<JwtAuthenticatorClaimMappingExpression> { - /* - * The CEL expression used to access token claims. - */ - private String expression; - - /** - * Creates an instance of JwtAuthenticatorClaimMappingExpression class. - */ - public JwtAuthenticatorClaimMappingExpression() { - } - - /** - * Get the expression property: The CEL expression used to access token claims. - * - * @return the expression value. - */ - public String expression() { - return this.expression; - } - - /** - * Set the expression property: The CEL expression used to access token claims. - * - * @param expression the expression value to set. - * @return the JwtAuthenticatorClaimMappingExpression object itself. - */ - public JwtAuthenticatorClaimMappingExpression withExpression(String expression) { - this.expression = expression; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (expression() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property expression in model JwtAuthenticatorClaimMappingExpression")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JwtAuthenticatorClaimMappingExpression.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("expression", this.expression); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JwtAuthenticatorClaimMappingExpression from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JwtAuthenticatorClaimMappingExpression if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JwtAuthenticatorClaimMappingExpression. - */ - public static JwtAuthenticatorClaimMappingExpression fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JwtAuthenticatorClaimMappingExpression deserializedJwtAuthenticatorClaimMappingExpression - = new JwtAuthenticatorClaimMappingExpression(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("expression".equals(fieldName)) { - deserializedJwtAuthenticatorClaimMappingExpression.expression = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJwtAuthenticatorClaimMappingExpression; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorClaimMappings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorClaimMappings.java deleted file mode 100644 index b1239568bd8c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorClaimMappings.java +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The claim mappings for JWTAuthenticator. - */ -@Fluent -public final class JwtAuthenticatorClaimMappings implements JsonSerializable<JwtAuthenticatorClaimMappings> { - /* - * The expression to extract username attribute from the token claims. - */ - private JwtAuthenticatorClaimMappingExpression username; - - /* - * The expression to extract groups attribute from the token claims. When not provided, no groups are extracted from - * the token claims. - */ - private JwtAuthenticatorClaimMappingExpression groups; - - /* - * The expression to extract uid attribute from the token claims. When not provided, no uid is extracted from the - * token claims. - */ - private JwtAuthenticatorClaimMappingExpression uid; - - /* - * The expression to extract extra attribute from the token claims. When not provided, no extra attributes are - * extracted from the token claims. - */ - private List<JwtAuthenticatorExtraClaimMappingExpression> extra; - - /** - * Creates an instance of JwtAuthenticatorClaimMappings class. - */ - public JwtAuthenticatorClaimMappings() { - } - - /** - * Get the username property: The expression to extract username attribute from the token claims. - * - * @return the username value. - */ - public JwtAuthenticatorClaimMappingExpression username() { - return this.username; - } - - /** - * Set the username property: The expression to extract username attribute from the token claims. - * - * @param username the username value to set. - * @return the JwtAuthenticatorClaimMappings object itself. - */ - public JwtAuthenticatorClaimMappings withUsername(JwtAuthenticatorClaimMappingExpression username) { - this.username = username; - return this; - } - - /** - * Get the groups property: The expression to extract groups attribute from the token claims. When not provided, no - * groups are extracted from the token claims. - * - * @return the groups value. - */ - public JwtAuthenticatorClaimMappingExpression groups() { - return this.groups; - } - - /** - * Set the groups property: The expression to extract groups attribute from the token claims. When not provided, no - * groups are extracted from the token claims. - * - * @param groups the groups value to set. - * @return the JwtAuthenticatorClaimMappings object itself. - */ - public JwtAuthenticatorClaimMappings withGroups(JwtAuthenticatorClaimMappingExpression groups) { - this.groups = groups; - return this; - } - - /** - * Get the uid property: The expression to extract uid attribute from the token claims. When not provided, no uid is - * extracted from the token claims. - * - * @return the uid value. - */ - public JwtAuthenticatorClaimMappingExpression uid() { - return this.uid; - } - - /** - * Set the uid property: The expression to extract uid attribute from the token claims. When not provided, no uid is - * extracted from the token claims. - * - * @param uid the uid value to set. - * @return the JwtAuthenticatorClaimMappings object itself. - */ - public JwtAuthenticatorClaimMappings withUid(JwtAuthenticatorClaimMappingExpression uid) { - this.uid = uid; - return this; - } - - /** - * Get the extra property: The expression to extract extra attribute from the token claims. When not provided, no - * extra attributes are extracted from the token claims. - * - * @return the extra value. - */ - public List<JwtAuthenticatorExtraClaimMappingExpression> extra() { - return this.extra; - } - - /** - * Set the extra property: The expression to extract extra attribute from the token claims. When not provided, no - * extra attributes are extracted from the token claims. - * - * @param extra the extra value to set. - * @return the JwtAuthenticatorClaimMappings object itself. - */ - public JwtAuthenticatorClaimMappings withExtra(List<JwtAuthenticatorExtraClaimMappingExpression> extra) { - this.extra = extra; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (username() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property username in model JwtAuthenticatorClaimMappings")); - } else { - username().validate(); - } - if (groups() != null) { - groups().validate(); - } - if (uid() != null) { - uid().validate(); - } - if (extra() != null) { - extra().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JwtAuthenticatorClaimMappings.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("username", this.username); - jsonWriter.writeJsonField("groups", this.groups); - jsonWriter.writeJsonField("uid", this.uid); - jsonWriter.writeArrayField("extra", this.extra, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JwtAuthenticatorClaimMappings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JwtAuthenticatorClaimMappings if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JwtAuthenticatorClaimMappings. - */ - public static JwtAuthenticatorClaimMappings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JwtAuthenticatorClaimMappings deserializedJwtAuthenticatorClaimMappings - = new JwtAuthenticatorClaimMappings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("username".equals(fieldName)) { - deserializedJwtAuthenticatorClaimMappings.username - = JwtAuthenticatorClaimMappingExpression.fromJson(reader); - } else if ("groups".equals(fieldName)) { - deserializedJwtAuthenticatorClaimMappings.groups - = JwtAuthenticatorClaimMappingExpression.fromJson(reader); - } else if ("uid".equals(fieldName)) { - deserializedJwtAuthenticatorClaimMappings.uid - = JwtAuthenticatorClaimMappingExpression.fromJson(reader); - } else if ("extra".equals(fieldName)) { - List<JwtAuthenticatorExtraClaimMappingExpression> extra - = reader.readArray(reader1 -> JwtAuthenticatorExtraClaimMappingExpression.fromJson(reader1)); - deserializedJwtAuthenticatorClaimMappings.extra = extra; - } else { - reader.skipChildren(); - } - } - - return deserializedJwtAuthenticatorClaimMappings; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorExtraClaimMappingExpression.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorExtraClaimMappingExpression.java deleted file mode 100644 index bdccfe69d44b..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorExtraClaimMappingExpression.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The extra claim mapping expression for JWTAuthenticator. - */ -@Fluent -public final class JwtAuthenticatorExtraClaimMappingExpression - implements JsonSerializable<JwtAuthenticatorExtraClaimMappingExpression> { - /* - * The key of the extra attribute. - */ - private String key; - - /* - * The CEL expression used to extract the value of the extra attribute. - */ - private String valueExpression; - - /** - * Creates an instance of JwtAuthenticatorExtraClaimMappingExpression class. - */ - public JwtAuthenticatorExtraClaimMappingExpression() { - } - - /** - * Get the key property: The key of the extra attribute. - * - * @return the key value. - */ - public String key() { - return this.key; - } - - /** - * Set the key property: The key of the extra attribute. - * - * @param key the key value to set. - * @return the JwtAuthenticatorExtraClaimMappingExpression object itself. - */ - public JwtAuthenticatorExtraClaimMappingExpression withKey(String key) { - this.key = key; - return this; - } - - /** - * Get the valueExpression property: The CEL expression used to extract the value of the extra attribute. - * - * @return the valueExpression value. - */ - public String valueExpression() { - return this.valueExpression; - } - - /** - * Set the valueExpression property: The CEL expression used to extract the value of the extra attribute. - * - * @param valueExpression the valueExpression value to set. - * @return the JwtAuthenticatorExtraClaimMappingExpression object itself. - */ - public JwtAuthenticatorExtraClaimMappingExpression withValueExpression(String valueExpression) { - this.valueExpression = valueExpression; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (key() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property key in model JwtAuthenticatorExtraClaimMappingExpression")); - } - if (valueExpression() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property valueExpression in model JwtAuthenticatorExtraClaimMappingExpression")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JwtAuthenticatorExtraClaimMappingExpression.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("key", this.key); - jsonWriter.writeStringField("valueExpression", this.valueExpression); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JwtAuthenticatorExtraClaimMappingExpression from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JwtAuthenticatorExtraClaimMappingExpression if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JwtAuthenticatorExtraClaimMappingExpression. - */ - public static JwtAuthenticatorExtraClaimMappingExpression fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JwtAuthenticatorExtraClaimMappingExpression deserializedJwtAuthenticatorExtraClaimMappingExpression - = new JwtAuthenticatorExtraClaimMappingExpression(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("key".equals(fieldName)) { - deserializedJwtAuthenticatorExtraClaimMappingExpression.key = reader.getString(); - } else if ("valueExpression".equals(fieldName)) { - deserializedJwtAuthenticatorExtraClaimMappingExpression.valueExpression = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJwtAuthenticatorExtraClaimMappingExpression; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorIssuer.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorIssuer.java deleted file mode 100644 index eb38b0dd43e9..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorIssuer.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The OIDC issuer details for JWTAuthenticator. - */ -@Fluent -public final class JwtAuthenticatorIssuer implements JsonSerializable<JwtAuthenticatorIssuer> { - /* - * The issuer URL. The URL must begin with the scheme https and cannot contain a query string or fragment. This must - * match the "iss" claim in the presented JWT, and the issuer returned from discovery. - */ - private String url; - - /* - * The set of acceptable audiences the JWT must be issued to. At least one is required. When multiple is set, - * AudienceMatchPolicy is used in API Server configuration. - */ - private List<String> audiences; - - /** - * Creates an instance of JwtAuthenticatorIssuer class. - */ - public JwtAuthenticatorIssuer() { - } - - /** - * Get the url property: The issuer URL. The URL must begin with the scheme https and cannot contain a query string - * or fragment. This must match the "iss" claim in the presented JWT, and the issuer returned from discovery. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: The issuer URL. The URL must begin with the scheme https and cannot contain a query string - * or fragment. This must match the "iss" claim in the presented JWT, and the issuer returned from discovery. - * - * @param url the url value to set. - * @return the JwtAuthenticatorIssuer object itself. - */ - public JwtAuthenticatorIssuer withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the audiences property: The set of acceptable audiences the JWT must be issued to. At least one is required. - * When multiple is set, AudienceMatchPolicy is used in API Server configuration. - * - * @return the audiences value. - */ - public List<String> audiences() { - return this.audiences; - } - - /** - * Set the audiences property: The set of acceptable audiences the JWT must be issued to. At least one is required. - * When multiple is set, AudienceMatchPolicy is used in API Server configuration. - * - * @param audiences the audiences value to set. - * @return the JwtAuthenticatorIssuer object itself. - */ - public JwtAuthenticatorIssuer withAudiences(List<String> audiences) { - this.audiences = audiences; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (url() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property url in model JwtAuthenticatorIssuer")); - } - if (audiences() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property audiences in model JwtAuthenticatorIssuer")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JwtAuthenticatorIssuer.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("url", this.url); - jsonWriter.writeArrayField("audiences", this.audiences, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JwtAuthenticatorIssuer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JwtAuthenticatorIssuer if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JwtAuthenticatorIssuer. - */ - public static JwtAuthenticatorIssuer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JwtAuthenticatorIssuer deserializedJwtAuthenticatorIssuer = new JwtAuthenticatorIssuer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("url".equals(fieldName)) { - deserializedJwtAuthenticatorIssuer.url = reader.getString(); - } else if ("audiences".equals(fieldName)) { - List<String> audiences = reader.readArray(reader1 -> reader1.getString()); - deserializedJwtAuthenticatorIssuer.audiences = audiences; - } else { - reader.skipChildren(); - } - } - - return deserializedJwtAuthenticatorIssuer; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorListResult.java deleted file mode 100644 index 2a5077ab9566..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorListResult.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.fluent.models.JwtAuthenticatorInner; -import java.io.IOException; -import java.util.List; - -/** - * The response from the List JWT authenticator operation. - */ -@Fluent -public final class JwtAuthenticatorListResult implements JsonSerializable<JwtAuthenticatorListResult> { - /* - * The list of JWT authenticators. - */ - private List<JwtAuthenticatorInner> value; - - /* - * The URL to get the next set of JWT authenticator results. - */ - private String nextLink; - - /** - * Creates an instance of JwtAuthenticatorListResult class. - */ - public JwtAuthenticatorListResult() { - } - - /** - * Get the value property: The list of JWT authenticators. - * - * @return the value value. - */ - public List<JwtAuthenticatorInner> value() { - return this.value; - } - - /** - * Set the value property: The list of JWT authenticators. - * - * @param value the value value to set. - * @return the JwtAuthenticatorListResult object itself. - */ - public JwtAuthenticatorListResult withValue(List<JwtAuthenticatorInner> value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of JWT authenticator results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model JwtAuthenticatorListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JwtAuthenticatorListResult.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JwtAuthenticatorListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JwtAuthenticatorListResult if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JwtAuthenticatorListResult. - */ - public static JwtAuthenticatorListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JwtAuthenticatorListResult deserializedJwtAuthenticatorListResult = new JwtAuthenticatorListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List<JwtAuthenticatorInner> value - = reader.readArray(reader1 -> JwtAuthenticatorInner.fromJson(reader1)); - deserializedJwtAuthenticatorListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedJwtAuthenticatorListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJwtAuthenticatorListResult; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorProperties.java deleted file mode 100644 index 7d36f2acf2c4..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorProperties.java +++ /dev/null @@ -1,238 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The properties of JWTAuthenticator. For details on how to configure the properties of a JWT authenticator, please - * refer to the Kubernetes documentation: - * https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. Please - * note that not all fields available in the Kubernetes documentation are supported by AKS. For troubleshooting, please - * see https://aka.ms/aks-external-issuers-docs. - */ -@Fluent -public final class JwtAuthenticatorProperties implements JsonSerializable<JwtAuthenticatorProperties> { - /* - * The current provisioning state of the JWT authenticator. - */ - private JwtAuthenticatorProvisioningState provisioningState; - - /* - * The JWT OIDC issuer details. - */ - private JwtAuthenticatorIssuer issuer; - - /* - * The rules that are applied to validate token claims to authenticate users. All the expressions must evaluate to - * true for validation to succeed. - */ - private List<JwtAuthenticatorValidationRule> claimValidationRules; - - /* - * The mappings that define how user attributes are extracted from the token claims. - */ - private JwtAuthenticatorClaimMappings claimMappings; - - /* - * The rules that are applied to the mapped user before completing authentication. All the expressions must evaluate - * to true for validation to succeed. - */ - private List<JwtAuthenticatorValidationRule> userValidationRules; - - /** - * Creates an instance of JwtAuthenticatorProperties class. - */ - public JwtAuthenticatorProperties() { - } - - /** - * Get the provisioningState property: The current provisioning state of the JWT authenticator. - * - * @return the provisioningState value. - */ - public JwtAuthenticatorProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the issuer property: The JWT OIDC issuer details. - * - * @return the issuer value. - */ - public JwtAuthenticatorIssuer issuer() { - return this.issuer; - } - - /** - * Set the issuer property: The JWT OIDC issuer details. - * - * @param issuer the issuer value to set. - * @return the JwtAuthenticatorProperties object itself. - */ - public JwtAuthenticatorProperties withIssuer(JwtAuthenticatorIssuer issuer) { - this.issuer = issuer; - return this; - } - - /** - * Get the claimValidationRules property: The rules that are applied to validate token claims to authenticate users. - * All the expressions must evaluate to true for validation to succeed. - * - * @return the claimValidationRules value. - */ - public List<JwtAuthenticatorValidationRule> claimValidationRules() { - return this.claimValidationRules; - } - - /** - * Set the claimValidationRules property: The rules that are applied to validate token claims to authenticate users. - * All the expressions must evaluate to true for validation to succeed. - * - * @param claimValidationRules the claimValidationRules value to set. - * @return the JwtAuthenticatorProperties object itself. - */ - public JwtAuthenticatorProperties - withClaimValidationRules(List<JwtAuthenticatorValidationRule> claimValidationRules) { - this.claimValidationRules = claimValidationRules; - return this; - } - - /** - * Get the claimMappings property: The mappings that define how user attributes are extracted from the token claims. - * - * @return the claimMappings value. - */ - public JwtAuthenticatorClaimMappings claimMappings() { - return this.claimMappings; - } - - /** - * Set the claimMappings property: The mappings that define how user attributes are extracted from the token claims. - * - * @param claimMappings the claimMappings value to set. - * @return the JwtAuthenticatorProperties object itself. - */ - public JwtAuthenticatorProperties withClaimMappings(JwtAuthenticatorClaimMappings claimMappings) { - this.claimMappings = claimMappings; - return this; - } - - /** - * Get the userValidationRules property: The rules that are applied to the mapped user before completing - * authentication. All the expressions must evaluate to true for validation to succeed. - * - * @return the userValidationRules value. - */ - public List<JwtAuthenticatorValidationRule> userValidationRules() { - return this.userValidationRules; - } - - /** - * Set the userValidationRules property: The rules that are applied to the mapped user before completing - * authentication. All the expressions must evaluate to true for validation to succeed. - * - * @param userValidationRules the userValidationRules value to set. - * @return the JwtAuthenticatorProperties object itself. - */ - public JwtAuthenticatorProperties - withUserValidationRules(List<JwtAuthenticatorValidationRule> userValidationRules) { - this.userValidationRules = userValidationRules; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (issuer() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property issuer in model JwtAuthenticatorProperties")); - } else { - issuer().validate(); - } - if (claimValidationRules() != null) { - claimValidationRules().forEach(e -> e.validate()); - } - if (claimMappings() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property claimMappings in model JwtAuthenticatorProperties")); - } else { - claimMappings().validate(); - } - if (userValidationRules() != null) { - userValidationRules().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JwtAuthenticatorProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("issuer", this.issuer); - jsonWriter.writeJsonField("claimMappings", this.claimMappings); - jsonWriter.writeArrayField("claimValidationRules", this.claimValidationRules, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("userValidationRules", this.userValidationRules, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JwtAuthenticatorProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JwtAuthenticatorProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JwtAuthenticatorProperties. - */ - public static JwtAuthenticatorProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JwtAuthenticatorProperties deserializedJwtAuthenticatorProperties = new JwtAuthenticatorProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("issuer".equals(fieldName)) { - deserializedJwtAuthenticatorProperties.issuer = JwtAuthenticatorIssuer.fromJson(reader); - } else if ("claimMappings".equals(fieldName)) { - deserializedJwtAuthenticatorProperties.claimMappings - = JwtAuthenticatorClaimMappings.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedJwtAuthenticatorProperties.provisioningState - = JwtAuthenticatorProvisioningState.fromString(reader.getString()); - } else if ("claimValidationRules".equals(fieldName)) { - List<JwtAuthenticatorValidationRule> claimValidationRules - = reader.readArray(reader1 -> JwtAuthenticatorValidationRule.fromJson(reader1)); - deserializedJwtAuthenticatorProperties.claimValidationRules = claimValidationRules; - } else if ("userValidationRules".equals(fieldName)) { - List<JwtAuthenticatorValidationRule> userValidationRules - = reader.readArray(reader1 -> JwtAuthenticatorValidationRule.fromJson(reader1)); - deserializedJwtAuthenticatorProperties.userValidationRules = userValidationRules; - } else { - reader.skipChildren(); - } - } - - return deserializedJwtAuthenticatorProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorProvisioningState.java deleted file mode 100644 index fa06b1956c99..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorProvisioningState.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The provisioning state of the last accepted operation. - */ -public final class JwtAuthenticatorProvisioningState extends ExpandableStringEnum<JwtAuthenticatorProvisioningState> { - /** - * Static value Succeeded for JwtAuthenticatorProvisioningState. - */ - public static final JwtAuthenticatorProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for JwtAuthenticatorProvisioningState. - */ - public static final JwtAuthenticatorProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for JwtAuthenticatorProvisioningState. - */ - public static final JwtAuthenticatorProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Creating for JwtAuthenticatorProvisioningState. - */ - public static final JwtAuthenticatorProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Updating for JwtAuthenticatorProvisioningState. - */ - public static final JwtAuthenticatorProvisioningState UPDATING = fromString("Updating"); - - /** - * Static value Deleting for JwtAuthenticatorProvisioningState. - */ - public static final JwtAuthenticatorProvisioningState DELETING = fromString("Deleting"); - - /** - * Creates a new instance of JwtAuthenticatorProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JwtAuthenticatorProvisioningState() { - } - - /** - * Creates or finds a JwtAuthenticatorProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding JwtAuthenticatorProvisioningState. - */ - public static JwtAuthenticatorProvisioningState fromString(String name) { - return fromString(name, JwtAuthenticatorProvisioningState.class); - } - - /** - * Gets known JwtAuthenticatorProvisioningState values. - * - * @return known JwtAuthenticatorProvisioningState values. - */ - public static Collection<JwtAuthenticatorProvisioningState> values() { - return values(JwtAuthenticatorProvisioningState.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorValidationRule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorValidationRule.java deleted file mode 100644 index c470baf052ee..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JwtAuthenticatorValidationRule.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The validation rule for JWTAuthenticator. - */ -@Fluent -public final class JwtAuthenticatorValidationRule implements JsonSerializable<JwtAuthenticatorValidationRule> { - /* - * The CEL expression used to validate the claim or attribute. - */ - private String expression; - - /* - * The validation error message. - */ - private String message; - - /** - * Creates an instance of JwtAuthenticatorValidationRule class. - */ - public JwtAuthenticatorValidationRule() { - } - - /** - * Get the expression property: The CEL expression used to validate the claim or attribute. - * - * @return the expression value. - */ - public String expression() { - return this.expression; - } - - /** - * Set the expression property: The CEL expression used to validate the claim or attribute. - * - * @param expression the expression value to set. - * @return the JwtAuthenticatorValidationRule object itself. - */ - public JwtAuthenticatorValidationRule withExpression(String expression) { - this.expression = expression; - return this; - } - - /** - * Get the message property: The validation error message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: The validation error message. - * - * @param message the message value to set. - * @return the JwtAuthenticatorValidationRule object itself. - */ - public JwtAuthenticatorValidationRule withMessage(String message) { - this.message = message; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (expression() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property expression in model JwtAuthenticatorValidationRule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JwtAuthenticatorValidationRule.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("expression", this.expression); - jsonWriter.writeStringField("message", this.message); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JwtAuthenticatorValidationRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JwtAuthenticatorValidationRule if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JwtAuthenticatorValidationRule. - */ - public static JwtAuthenticatorValidationRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JwtAuthenticatorValidationRule deserializedJwtAuthenticatorValidationRule - = new JwtAuthenticatorValidationRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("expression".equals(fieldName)) { - deserializedJwtAuthenticatorValidationRule.expression = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedJwtAuthenticatorValidationRule.message = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJwtAuthenticatorValidationRule; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java index c06b22dd47ea..a14c1ea5937b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java @@ -81,12 +81,6 @@ public final class KubeletConfig implements JsonSerializable<KubeletConfig> { */ private Integer podMaxPids; - /* - * Specifies the default seccomp profile applied to all workloads. If not specified, 'Unconfined' will be used by - * default. - */ - private SeccompDefault seccompDefault; - /** * Creates an instance of KubeletConfig class. */ @@ -337,28 +331,6 @@ public KubeletConfig withPodMaxPids(Integer podMaxPids) { return this; } - /** - * Get the seccompDefault property: Specifies the default seccomp profile applied to all workloads. If not - * specified, 'Unconfined' will be used by default. - * - * @return the seccompDefault value. - */ - public SeccompDefault seccompDefault() { - return this.seccompDefault; - } - - /** - * Set the seccompDefault property: Specifies the default seccomp profile applied to all workloads. If not - * specified, 'Unconfined' will be used by default. - * - * @param seccompDefault the seccompDefault value to set. - * @return the KubeletConfig object itself. - */ - public KubeletConfig withSeccompDefault(SeccompDefault seccompDefault) { - this.seccompDefault = seccompDefault; - return this; - } - /** * Validates the instance. * @@ -385,8 +357,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeNumberField("containerLogMaxSizeMB", this.containerLogMaxSizeMB); jsonWriter.writeNumberField("containerLogMaxFiles", this.containerLogMaxFiles); jsonWriter.writeNumberField("podMaxPids", this.podMaxPids); - jsonWriter.writeStringField("seccompDefault", - this.seccompDefault == null ? null : this.seccompDefault.toString()); return jsonWriter.writeEndObject(); } @@ -428,8 +398,6 @@ public static KubeletConfig fromJson(JsonReader jsonReader) throws IOException { deserializedKubeletConfig.containerLogMaxFiles = reader.getNullable(JsonReader::getInt); } else if ("podMaxPids".equals(fieldName)) { deserializedKubeletConfig.podMaxPids = reader.getNullable(JsonReader::getInt); - } else if ("seccompDefault".equals(fieldName)) { - deserializedKubeletConfig.seccompDefault = SeccompDefault.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesResourceObjectEncryptionProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesResourceObjectEncryptionProfile.java deleted file mode 100644 index 32f5ad6a3c47..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesResourceObjectEncryptionProfile.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Encryption at rest of Kubernetes resource objects using service-managed keys. More information on this can be found - * under https://aka.ms/aks/kubernetesResourceObjectEncryption. - */ -@Fluent -public final class KubernetesResourceObjectEncryptionProfile - implements JsonSerializable<KubernetesResourceObjectEncryptionProfile> { - /* - * Whether to enable encryption at rest of Kubernetes resource objects using service-managed keys. More information - * on this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. - */ - private InfrastructureEncryption infrastructureEncryption; - - /** - * Creates an instance of KubernetesResourceObjectEncryptionProfile class. - */ - public KubernetesResourceObjectEncryptionProfile() { - } - - /** - * Get the infrastructureEncryption property: Whether to enable encryption at rest of Kubernetes resource objects - * using service-managed keys. More information on this can be found under - * https://aka.ms/aks/kubernetesResourceObjectEncryption. - * - * @return the infrastructureEncryption value. - */ - public InfrastructureEncryption infrastructureEncryption() { - return this.infrastructureEncryption; - } - - /** - * Set the infrastructureEncryption property: Whether to enable encryption at rest of Kubernetes resource objects - * using service-managed keys. More information on this can be found under - * https://aka.ms/aks/kubernetesResourceObjectEncryption. - * - * @param infrastructureEncryption the infrastructureEncryption value to set. - * @return the KubernetesResourceObjectEncryptionProfile object itself. - */ - public KubernetesResourceObjectEncryptionProfile - withInfrastructureEncryption(InfrastructureEncryption infrastructureEncryption) { - this.infrastructureEncryption = infrastructureEncryption; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("infrastructureEncryption", - this.infrastructureEncryption == null ? null : this.infrastructureEncryption.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of KubernetesResourceObjectEncryptionProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of KubernetesResourceObjectEncryptionProfile if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the KubernetesResourceObjectEncryptionProfile. - */ - public static KubernetesResourceObjectEncryptionProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - KubernetesResourceObjectEncryptionProfile deserializedKubernetesResourceObjectEncryptionProfile - = new KubernetesResourceObjectEncryptionProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("infrastructureEncryption".equals(fieldName)) { - deserializedKubernetesResourceObjectEncryptionProfile.infrastructureEncryption - = InfrastructureEncryption.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedKubernetesResourceObjectEncryptionProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelector.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelector.java deleted file mode 100644 index 687fc5c092d1..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelector.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. - * An empty label selector matches all objects. A null label selector matches no objects. - */ -@Fluent -public final class LabelSelector implements JsonSerializable<LabelSelector> { - /* - * matchLabels is an array of {key=value} pairs. A single {key=value} in the matchLabels map is equivalent to an - * element of matchExpressions, whose key field is `key`, the operator is `In`, and the values array contains only - * `value`. The requirements are ANDed. - */ - private List<String> matchLabels; - - /* - * matchExpressions is a list of label selector requirements. The requirements are ANDed. - */ - private List<LabelSelectorRequirement> matchExpressions; - - /** - * Creates an instance of LabelSelector class. - */ - public LabelSelector() { - } - - /** - * Get the matchLabels property: matchLabels is an array of {key=value} pairs. A single {key=value} in the - * matchLabels map is equivalent to an element of matchExpressions, whose key field is `key`, the operator is `In`, - * and the values array contains only `value`. The requirements are ANDed. - * - * @return the matchLabels value. - */ - public List<String> matchLabels() { - return this.matchLabels; - } - - /** - * Set the matchLabels property: matchLabels is an array of {key=value} pairs. A single {key=value} in the - * matchLabels map is equivalent to an element of matchExpressions, whose key field is `key`, the operator is `In`, - * and the values array contains only `value`. The requirements are ANDed. - * - * @param matchLabels the matchLabels value to set. - * @return the LabelSelector object itself. - */ - public LabelSelector withMatchLabels(List<String> matchLabels) { - this.matchLabels = matchLabels; - return this; - } - - /** - * Get the matchExpressions property: matchExpressions is a list of label selector requirements. The requirements - * are ANDed. - * - * @return the matchExpressions value. - */ - public List<LabelSelectorRequirement> matchExpressions() { - return this.matchExpressions; - } - - /** - * Set the matchExpressions property: matchExpressions is a list of label selector requirements. The requirements - * are ANDed. - * - * @param matchExpressions the matchExpressions value to set. - * @return the LabelSelector object itself. - */ - public LabelSelector withMatchExpressions(List<LabelSelectorRequirement> matchExpressions) { - this.matchExpressions = matchExpressions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (matchExpressions() != null) { - matchExpressions().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("matchLabels", this.matchLabels, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("matchExpressions", this.matchExpressions, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LabelSelector from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LabelSelector if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the LabelSelector. - */ - public static LabelSelector fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LabelSelector deserializedLabelSelector = new LabelSelector(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("matchLabels".equals(fieldName)) { - List<String> matchLabels = reader.readArray(reader1 -> reader1.getString()); - deserializedLabelSelector.matchLabels = matchLabels; - } else if ("matchExpressions".equals(fieldName)) { - List<LabelSelectorRequirement> matchExpressions - = reader.readArray(reader1 -> LabelSelectorRequirement.fromJson(reader1)); - deserializedLabelSelector.matchExpressions = matchExpressions; - } else { - reader.skipChildren(); - } - } - - return deserializedLabelSelector; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelectorRequirement.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelectorRequirement.java deleted file mode 100644 index 02ccd0525bdb..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelectorRequirement.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A label selector requirement is a selector that contains values, a key, and an operator that relates the key and - * values. - */ -@Fluent -public final class LabelSelectorRequirement implements JsonSerializable<LabelSelectorRequirement> { - /* - * key is the label key that the selector applies to. - */ - private String key; - - /* - * operator represents a key's relationship to a set of values. Valid operators are In and NotIn - */ - private Operator operator; - - /* - * values is an array of string values, the values array must be non-empty. - */ - private List<String> values; - - /** - * Creates an instance of LabelSelectorRequirement class. - */ - public LabelSelectorRequirement() { - } - - /** - * Get the key property: key is the label key that the selector applies to. - * - * @return the key value. - */ - public String key() { - return this.key; - } - - /** - * Set the key property: key is the label key that the selector applies to. - * - * @param key the key value to set. - * @return the LabelSelectorRequirement object itself. - */ - public LabelSelectorRequirement withKey(String key) { - this.key = key; - return this; - } - - /** - * Get the operator property: operator represents a key's relationship to a set of values. Valid operators are In - * and NotIn. - * - * @return the operator value. - */ - public Operator operator() { - return this.operator; - } - - /** - * Set the operator property: operator represents a key's relationship to a set of values. Valid operators are In - * and NotIn. - * - * @param operator the operator value to set. - * @return the LabelSelectorRequirement object itself. - */ - public LabelSelectorRequirement withOperator(Operator operator) { - this.operator = operator; - return this; - } - - /** - * Get the values property: values is an array of string values, the values array must be non-empty. - * - * @return the values value. - */ - public List<String> values() { - return this.values; - } - - /** - * Set the values property: values is an array of string values, the values array must be non-empty. - * - * @param values the values value to set. - * @return the LabelSelectorRequirement object itself. - */ - public LabelSelectorRequirement withValues(List<String> values) { - this.values = values; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("key", this.key); - jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); - jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LabelSelectorRequirement from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LabelSelectorRequirement if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the LabelSelectorRequirement. - */ - public static LabelSelectorRequirement fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LabelSelectorRequirement deserializedLabelSelectorRequirement = new LabelSelectorRequirement(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("key".equals(fieldName)) { - deserializedLabelSelectorRequirement.key = reader.getString(); - } else if ("operator".equals(fieldName)) { - deserializedLabelSelectorRequirement.operator = Operator.fromString(reader.getString()); - } else if ("values".equals(fieldName)) { - List<String> values = reader.readArray(reader1 -> reader1.getString()); - deserializedLabelSelectorRequirement.values = values; - } else { - reader.skipChildren(); - } - } - - return deserializedLabelSelectorRequirement; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerListResult.java deleted file mode 100644 index 6314fdcd178a..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerListResult.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.fluent.models.LoadBalancerInner; -import java.io.IOException; -import java.util.List; - -/** - * The response from the List Load Balancers operation. - */ -@Fluent -public final class LoadBalancerListResult implements JsonSerializable<LoadBalancerListResult> { - /* - * The list of Load Balancers. - */ - private List<LoadBalancerInner> value; - - /* - * The URL to get the next set of load balancer results. - */ - private String nextLink; - - /** - * Creates an instance of LoadBalancerListResult class. - */ - public LoadBalancerListResult() { - } - - /** - * Get the value property: The list of Load Balancers. - * - * @return the value value. - */ - public List<LoadBalancerInner> value() { - return this.value; - } - - /** - * Set the value property: The list of Load Balancers. - * - * @param value the value value to set. - * @return the LoadBalancerListResult object itself. - */ - public LoadBalancerListResult withValue(List<LoadBalancerInner> value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of load balancer results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LoadBalancerListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LoadBalancerListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the LoadBalancerListResult. - */ - public static LoadBalancerListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LoadBalancerListResult deserializedLoadBalancerListResult = new LoadBalancerListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List<LoadBalancerInner> value = reader.readArray(reader1 -> LoadBalancerInner.fromJson(reader1)); - deserializedLoadBalancerListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedLoadBalancerListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedLoadBalancerListResult; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineHardwareProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineHardwareProfile.java deleted file mode 100644 index 5f2ac475ad1a..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineHardwareProfile.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The hardware and GPU settings of the machine. - */ -@Fluent -public final class MachineHardwareProfile implements JsonSerializable<MachineHardwareProfile> { - /* - * The size of the VM. VM size availability varies by region. If a node contains insufficient compute resources - * (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: - * https://docs.microsoft.com/azure/aks/quotas-skus-regions - */ - private String vmSize; - - /* - * GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. - */ - private GpuInstanceProfile gpuInstanceProfile; - - /* - * The GPU settings of the machine. - */ - private GpuProfile gpuProfile; - - /** - * Creates an instance of MachineHardwareProfile class. - */ - public MachineHardwareProfile() { - } - - /** - * Get the vmSize property: The size of the VM. VM size availability varies by region. If a node contains - * insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on - * restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: The size of the VM. VM size availability varies by region. If a node contains - * insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on - * restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. - * - * @param vmSize the vmSize value to set. - * @return the MachineHardwareProfile object itself. - */ - public MachineHardwareProfile withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for - * supported GPU VM SKU. - * - * @return the gpuInstanceProfile value. - */ - public GpuInstanceProfile gpuInstanceProfile() { - return this.gpuInstanceProfile; - } - - /** - * Set the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for - * supported GPU VM SKU. - * - * @param gpuInstanceProfile the gpuInstanceProfile value to set. - * @return the MachineHardwareProfile object itself. - */ - public MachineHardwareProfile withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { - this.gpuInstanceProfile = gpuInstanceProfile; - return this; - } - - /** - * Get the gpuProfile property: The GPU settings of the machine. - * - * @return the gpuProfile value. - */ - public GpuProfile gpuProfile() { - return this.gpuProfile; - } - - /** - * Set the gpuProfile property: The GPU settings of the machine. - * - * @param gpuProfile the gpuProfile value to set. - * @return the MachineHardwareProfile object itself. - */ - public MachineHardwareProfile withGpuProfile(GpuProfile gpuProfile) { - this.gpuProfile = gpuProfile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (gpuProfile() != null) { - gpuProfile().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("vmSize", this.vmSize); - jsonWriter.writeStringField("gpuInstanceProfile", - this.gpuInstanceProfile == null ? null : this.gpuInstanceProfile.toString()); - jsonWriter.writeJsonField("gpuProfile", this.gpuProfile); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MachineHardwareProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MachineHardwareProfile if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the MachineHardwareProfile. - */ - public static MachineHardwareProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MachineHardwareProfile deserializedMachineHardwareProfile = new MachineHardwareProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("vmSize".equals(fieldName)) { - deserializedMachineHardwareProfile.vmSize = reader.getString(); - } else if ("gpuInstanceProfile".equals(fieldName)) { - deserializedMachineHardwareProfile.gpuInstanceProfile - = GpuInstanceProfile.fromString(reader.getString()); - } else if ("gpuProfile".equals(fieldName)) { - deserializedMachineHardwareProfile.gpuProfile = GpuProfile.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMachineHardwareProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineKubernetesProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineKubernetesProfile.java deleted file mode 100644 index 77af2b6e776f..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineKubernetesProfile.java +++ /dev/null @@ -1,390 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * The Kubernetes configurations used by the machine. - */ -@Fluent -public final class MachineKubernetesProfile implements JsonSerializable<MachineKubernetesProfile> { - /* - * The node labels on the machine. - */ - private Map<String, String> nodeLabels; - - /* - * The version of Kubernetes specified by the user. Both patch version <major.minor.patch> and <major.minor> are - * supported. When <major.minor> is specified, the latest supported patch version is chosen automatically. - */ - private String orchestratorVersion; - - /* - * The version of Kubernetes running on the machine. If orchestratorVersion was a fully specified version - * <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion was <major.minor>, this field - * will contain the full <major.minor.patch> version being used. - */ - private String currentOrchestratorVersion; - - /* - * Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. - */ - private KubeletDiskType kubeletDiskType; - - /* - * The Kubelet configuration on the machine. - */ - private KubeletConfig kubeletConfig; - - /* - * Taints added on the node during creation that will not be reconciled by AKS. These taints will not be reconciled - * by AKS and can be removed with a kubectl call. These taints allow for required configuration to run before the - * node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with `kubectl - * taint nodes node1 key1=value1:NoSchedule-` - */ - private List<String> nodeInitializationTaints; - - /* - * The taints added to new node during machine create. For example, key=value:NoSchedule. - */ - private List<String> nodeTaints; - - /* - * The maximum number of pods that can run on a node. - */ - private Integer maxPods; - - /* - * The node name in the Kubernetes cluster. - */ - private String nodeName; - - /* - * Determines the type of workload a node can run. - */ - private WorkloadRuntime workloadRuntime; - - /* - * Configuration for using artifact streaming on AKS. - */ - private AgentPoolArtifactStreamingProfile artifactStreamingProfile; - - /** - * Creates an instance of MachineKubernetesProfile class. - */ - public MachineKubernetesProfile() { - } - - /** - * Get the nodeLabels property: The node labels on the machine. - * - * @return the nodeLabels value. - */ - public Map<String, String> nodeLabels() { - return this.nodeLabels; - } - - /** - * Set the nodeLabels property: The node labels on the machine. - * - * @param nodeLabels the nodeLabels value to set. - * @return the MachineKubernetesProfile object itself. - */ - public MachineKubernetesProfile withNodeLabels(Map<String, String> nodeLabels) { - this.nodeLabels = nodeLabels; - return this; - } - - /** - * Get the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the - * latest supported patch version is chosen automatically. - * - * @return the orchestratorVersion value. - */ - public String orchestratorVersion() { - return this.orchestratorVersion; - } - - /** - * Set the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version - * <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the - * latest supported patch version is chosen automatically. - * - * @param orchestratorVersion the orchestratorVersion value to set. - * @return the MachineKubernetesProfile object itself. - */ - public MachineKubernetesProfile withOrchestratorVersion(String orchestratorVersion) { - this.orchestratorVersion = orchestratorVersion; - return this; - } - - /** - * Get the currentOrchestratorVersion property: The version of Kubernetes running on the machine. If - * orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to - * it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> - * version being used. - * - * @return the currentOrchestratorVersion value. - */ - public String currentOrchestratorVersion() { - return this.currentOrchestratorVersion; - } - - /** - * Get the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and - * Kubelet ephemeral storage. - * - * @return the kubeletDiskType value. - */ - public KubeletDiskType kubeletDiskType() { - return this.kubeletDiskType; - } - - /** - * Set the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and - * Kubelet ephemeral storage. - * - * @param kubeletDiskType the kubeletDiskType value to set. - * @return the MachineKubernetesProfile object itself. - */ - public MachineKubernetesProfile withKubeletDiskType(KubeletDiskType kubeletDiskType) { - this.kubeletDiskType = kubeletDiskType; - return this; - } - - /** - * Get the kubeletConfig property: The Kubelet configuration on the machine. - * - * @return the kubeletConfig value. - */ - public KubeletConfig kubeletConfig() { - return this.kubeletConfig; - } - - /** - * Set the kubeletConfig property: The Kubelet configuration on the machine. - * - * @param kubeletConfig the kubeletConfig value to set. - * @return the MachineKubernetesProfile object itself. - */ - public MachineKubernetesProfile withKubeletConfig(KubeletConfig kubeletConfig) { - this.kubeletConfig = kubeletConfig; - return this; - } - - /** - * Get the nodeInitializationTaints property: Taints added on the node during creation that will not be reconciled - * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. These taints allow for - * required configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' - * that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-`. - * - * @return the nodeInitializationTaints value. - */ - public List<String> nodeInitializationTaints() { - return this.nodeInitializationTaints; - } - - /** - * Set the nodeInitializationTaints property: Taints added on the node during creation that will not be reconciled - * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. These taints allow for - * required configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' - * that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-`. - * - * @param nodeInitializationTaints the nodeInitializationTaints value to set. - * @return the MachineKubernetesProfile object itself. - */ - public MachineKubernetesProfile withNodeInitializationTaints(List<String> nodeInitializationTaints) { - this.nodeInitializationTaints = nodeInitializationTaints; - return this; - } - - /** - * Get the nodeTaints property: The taints added to new node during machine create. For example, - * key=value:NoSchedule. - * - * @return the nodeTaints value. - */ - public List<String> nodeTaints() { - return this.nodeTaints; - } - - /** - * Set the nodeTaints property: The taints added to new node during machine create. For example, - * key=value:NoSchedule. - * - * @param nodeTaints the nodeTaints value to set. - * @return the MachineKubernetesProfile object itself. - */ - public MachineKubernetesProfile withNodeTaints(List<String> nodeTaints) { - this.nodeTaints = nodeTaints; - return this; - } - - /** - * Get the maxPods property: The maximum number of pods that can run on a node. - * - * @return the maxPods value. - */ - public Integer maxPods() { - return this.maxPods; - } - - /** - * Set the maxPods property: The maximum number of pods that can run on a node. - * - * @param maxPods the maxPods value to set. - * @return the MachineKubernetesProfile object itself. - */ - public MachineKubernetesProfile withMaxPods(Integer maxPods) { - this.maxPods = maxPods; - return this; - } - - /** - * Get the nodeName property: The node name in the Kubernetes cluster. - * - * @return the nodeName value. - */ - public String nodeName() { - return this.nodeName; - } - - /** - * Get the workloadRuntime property: Determines the type of workload a node can run. - * - * @return the workloadRuntime value. - */ - public WorkloadRuntime workloadRuntime() { - return this.workloadRuntime; - } - - /** - * Set the workloadRuntime property: Determines the type of workload a node can run. - * - * @param workloadRuntime the workloadRuntime value to set. - * @return the MachineKubernetesProfile object itself. - */ - public MachineKubernetesProfile withWorkloadRuntime(WorkloadRuntime workloadRuntime) { - this.workloadRuntime = workloadRuntime; - return this; - } - - /** - * Get the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. - * - * @return the artifactStreamingProfile value. - */ - public AgentPoolArtifactStreamingProfile artifactStreamingProfile() { - return this.artifactStreamingProfile; - } - - /** - * Set the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. - * - * @param artifactStreamingProfile the artifactStreamingProfile value to set. - * @return the MachineKubernetesProfile object itself. - */ - public MachineKubernetesProfile - withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile) { - this.artifactStreamingProfile = artifactStreamingProfile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (kubeletConfig() != null) { - kubeletConfig().validate(); - } - if (artifactStreamingProfile() != null) { - artifactStreamingProfile().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("nodeLabels", this.nodeLabels, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("orchestratorVersion", this.orchestratorVersion); - jsonWriter.writeStringField("kubeletDiskType", - this.kubeletDiskType == null ? null : this.kubeletDiskType.toString()); - jsonWriter.writeJsonField("kubeletConfig", this.kubeletConfig); - jsonWriter.writeArrayField("nodeInitializationTaints", this.nodeInitializationTaints, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("nodeTaints", this.nodeTaints, (writer, element) -> writer.writeString(element)); - jsonWriter.writeNumberField("maxPods", this.maxPods); - jsonWriter.writeStringField("workloadRuntime", - this.workloadRuntime == null ? null : this.workloadRuntime.toString()); - jsonWriter.writeJsonField("artifactStreamingProfile", this.artifactStreamingProfile); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MachineKubernetesProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MachineKubernetesProfile if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MachineKubernetesProfile. - */ - public static MachineKubernetesProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MachineKubernetesProfile deserializedMachineKubernetesProfile = new MachineKubernetesProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nodeLabels".equals(fieldName)) { - Map<String, String> nodeLabels = reader.readMap(reader1 -> reader1.getString()); - deserializedMachineKubernetesProfile.nodeLabels = nodeLabels; - } else if ("orchestratorVersion".equals(fieldName)) { - deserializedMachineKubernetesProfile.orchestratorVersion = reader.getString(); - } else if ("currentOrchestratorVersion".equals(fieldName)) { - deserializedMachineKubernetesProfile.currentOrchestratorVersion = reader.getString(); - } else if ("kubeletDiskType".equals(fieldName)) { - deserializedMachineKubernetesProfile.kubeletDiskType - = KubeletDiskType.fromString(reader.getString()); - } else if ("kubeletConfig".equals(fieldName)) { - deserializedMachineKubernetesProfile.kubeletConfig = KubeletConfig.fromJson(reader); - } else if ("nodeInitializationTaints".equals(fieldName)) { - List<String> nodeInitializationTaints = reader.readArray(reader1 -> reader1.getString()); - deserializedMachineKubernetesProfile.nodeInitializationTaints = nodeInitializationTaints; - } else if ("nodeTaints".equals(fieldName)) { - List<String> nodeTaints = reader.readArray(reader1 -> reader1.getString()); - deserializedMachineKubernetesProfile.nodeTaints = nodeTaints; - } else if ("maxPods".equals(fieldName)) { - deserializedMachineKubernetesProfile.maxPods = reader.getNullable(JsonReader::getInt); - } else if ("nodeName".equals(fieldName)) { - deserializedMachineKubernetesProfile.nodeName = reader.getString(); - } else if ("workloadRuntime".equals(fieldName)) { - deserializedMachineKubernetesProfile.workloadRuntime - = WorkloadRuntime.fromString(reader.getString()); - } else if ("artifactStreamingProfile".equals(fieldName)) { - deserializedMachineKubernetesProfile.artifactStreamingProfile - = AgentPoolArtifactStreamingProfile.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMachineKubernetesProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java index 6425faad04a1..b81e97eb41a2 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineListResult.java @@ -19,14 +19,14 @@ @Fluent public final class MachineListResult implements JsonSerializable<MachineListResult> { /* - * The list of Machines in cluster. + * The URL to get the next set of machine results. */ - private List<MachineInner> value; + private String nextLink; /* - * The URL to get the next set of machine results. + * The list of Machines in cluster. */ - private String nextLink; + private List<MachineInner> value; /** * Creates an instance of MachineListResult class. @@ -34,6 +34,15 @@ public final class MachineListResult implements JsonSerializable<MachineListResu public MachineListResult() { } + /** + * Get the nextLink property: The URL to get the next set of machine results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + /** * Get the value property: The list of Machines in cluster. * @@ -54,15 +63,6 @@ public MachineListResult withValue(List<MachineInner> value) { return this; } - /** - * Get the nextLink property: The URL to get the next set of machine results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - /** * Validates the instance. * @@ -99,11 +99,11 @@ public static MachineListResult fromJson(JsonReader jsonReader) throws IOExcepti String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedMachineListResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List<MachineInner> value = reader.readArray(reader1 -> MachineInner.fromJson(reader1)); deserializedMachineListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedMachineListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java index 0997fe247d0a..5a3c9f305386 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -13,51 +13,15 @@ import java.util.List; /** - * The network properties of the machine. + * network properties of the machine. */ -@Fluent +@Immutable public final class MachineNetworkProperties implements JsonSerializable<MachineNetworkProperties> { /* * IPv4, IPv6 addresses of the machine */ private List<MachineIpAddress> ipAddresses; - /* - * The ID of the subnet which node and optionally pods will join on startup. If this is not specified, a VNET and - * subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it - * applies to just nodes. This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{ - * virtualNetworkName}/subnets/{subnetName} - */ - private String vnetSubnetId; - - /* - * The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically assigned on the node - * subnet (see vnetSubnetID for more details). This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{ - * virtualNetworkName}/subnets/{subnetName} - */ - private String podSubnetId; - - /* - * Whether the machine is allocated its own public IP. Some scenarios may require the machine to receive their own - * dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct - * connection to a cloud virtual machine to minimize hops. The default is false. - */ - private Boolean enableNodePublicIp; - - /* - * The public IP prefix ID which VM node should use IPs from. This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{ - * publicIPPrefixName} - */ - private String nodePublicIpPrefixId; - - /* - * IPTags of instance-level public IPs. - */ - private List<IpTag> nodePublicIpTags; - /** * Creates an instance of MachineNetworkProperties class. */ @@ -73,126 +37,6 @@ public List<MachineIpAddress> ipAddresses() { return this.ipAddresses; } - /** - * Get the vnetSubnetId property: The ID of the subnet which node and optionally pods will join on startup. If this - * is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to - * nodes and pods, otherwise it applies to just nodes. This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. - * - * @return the vnetSubnetId value. - */ - public String vnetSubnetId() { - return this.vnetSubnetId; - } - - /** - * Set the vnetSubnetId property: The ID of the subnet which node and optionally pods will join on startup. If this - * is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to - * nodes and pods, otherwise it applies to just nodes. This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. - * - * @param vnetSubnetId the vnetSubnetId value to set. - * @return the MachineNetworkProperties object itself. - */ - public MachineNetworkProperties withVnetSubnetId(String vnetSubnetId) { - this.vnetSubnetId = vnetSubnetId; - return this; - } - - /** - * Get the podSubnetId property: The ID of the subnet which pods will join when launched. If omitted, pod IPs are - * statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. - * - * @return the podSubnetId value. - */ - public String podSubnetId() { - return this.podSubnetId; - } - - /** - * Set the podSubnetId property: The ID of the subnet which pods will join when launched. If omitted, pod IPs are - * statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. - * - * @param podSubnetId the podSubnetId value to set. - * @return the MachineNetworkProperties object itself. - */ - public MachineNetworkProperties withPodSubnetId(String podSubnetId) { - this.podSubnetId = podSubnetId; - return this; - } - - /** - * Get the enableNodePublicIp property: Whether the machine is allocated its own public IP. Some scenarios may - * require the machine to receive their own dedicated public IP addresses. A common scenario is for gaming - * workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. The - * default is false. - * - * @return the enableNodePublicIp value. - */ - public Boolean enableNodePublicIp() { - return this.enableNodePublicIp; - } - - /** - * Set the enableNodePublicIp property: Whether the machine is allocated its own public IP. Some scenarios may - * require the machine to receive their own dedicated public IP addresses. A common scenario is for gaming - * workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. The - * default is false. - * - * @param enableNodePublicIp the enableNodePublicIp value to set. - * @return the MachineNetworkProperties object itself. - */ - public MachineNetworkProperties withEnableNodePublicIp(Boolean enableNodePublicIp) { - this.enableNodePublicIp = enableNodePublicIp; - return this; - } - - /** - * Get the nodePublicIpPrefixId property: The public IP prefix ID which VM node should use IPs from. This is of the - * form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. - * - * @return the nodePublicIpPrefixId value. - */ - public String nodePublicIpPrefixId() { - return this.nodePublicIpPrefixId; - } - - /** - * Set the nodePublicIpPrefixId property: The public IP prefix ID which VM node should use IPs from. This is of the - * form: - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. - * - * @param nodePublicIpPrefixId the nodePublicIpPrefixId value to set. - * @return the MachineNetworkProperties object itself. - */ - public MachineNetworkProperties withNodePublicIpPrefixId(String nodePublicIpPrefixId) { - this.nodePublicIpPrefixId = nodePublicIpPrefixId; - return this; - } - - /** - * Get the nodePublicIpTags property: IPTags of instance-level public IPs. - * - * @return the nodePublicIpTags value. - */ - public List<IpTag> nodePublicIpTags() { - return this.nodePublicIpTags; - } - - /** - * Set the nodePublicIpTags property: IPTags of instance-level public IPs. - * - * @param nodePublicIpTags the nodePublicIpTags value to set. - * @return the MachineNetworkProperties object itself. - */ - public MachineNetworkProperties withNodePublicIpTags(List<IpTag> nodePublicIpTags) { - this.nodePublicIpTags = nodePublicIpTags; - return this; - } - /** * Validates the instance. * @@ -202,9 +46,6 @@ public void validate() { if (ipAddresses() != null) { ipAddresses().forEach(e -> e.validate()); } - if (nodePublicIpTags() != null) { - nodePublicIpTags().forEach(e -> e.validate()); - } } /** @@ -213,12 +54,6 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("vnetSubnetID", this.vnetSubnetId); - jsonWriter.writeStringField("podSubnetID", this.podSubnetId); - jsonWriter.writeBooleanField("enableNodePublicIP", this.enableNodePublicIp); - jsonWriter.writeStringField("nodePublicIPPrefixID", this.nodePublicIpPrefixId); - jsonWriter.writeArrayField("nodePublicIPTags", this.nodePublicIpTags, - (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -241,18 +76,6 @@ public static MachineNetworkProperties fromJson(JsonReader jsonReader) throws IO List<MachineIpAddress> ipAddresses = reader.readArray(reader1 -> MachineIpAddress.fromJson(reader1)); deserializedMachineNetworkProperties.ipAddresses = ipAddresses; - } else if ("vnetSubnetID".equals(fieldName)) { - deserializedMachineNetworkProperties.vnetSubnetId = reader.getString(); - } else if ("podSubnetID".equals(fieldName)) { - deserializedMachineNetworkProperties.podSubnetId = reader.getString(); - } else if ("enableNodePublicIP".equals(fieldName)) { - deserializedMachineNetworkProperties.enableNodePublicIp - = reader.getNullable(JsonReader::getBoolean); - } else if ("nodePublicIPPrefixID".equals(fieldName)) { - deserializedMachineNetworkProperties.nodePublicIpPrefixId = reader.getString(); - } else if ("nodePublicIPTags".equals(fieldName)) { - List<IpTag> nodePublicIpTags = reader.readArray(reader1 -> IpTag.fromJson(reader1)); - deserializedMachineNetworkProperties.nodePublicIpTags = nodePublicIpTags; } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfile.java deleted file mode 100644 index 57d9a30b45a9..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfile.java +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The operating system and disk used by the machine. - */ -@Fluent -public final class MachineOSProfile implements JsonSerializable<MachineOSProfile> { - /* - * OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - */ - private OSType osType; - - /* - * Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or - * Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is - * deprecated. - */ - private OSSku osSku; - - /* - * OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify - * 0, it will apply the default osDisk size according to the vmSize specified. - */ - private Integer osDiskSizeGB; - - /* - * The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and - * has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed - * after creation. For more information see [Ephemeral - * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). - */ - private OSDiskType osDiskType; - - /* - * Whether to use a FIPS-enabled OS. - */ - private Boolean enableFips; - - /* - * The Linux machine's specific profile. - */ - private MachineOSProfileLinuxProfile linuxProfile; - - /* - * The Windows machine's specific profile. - */ - private AgentPoolWindowsProfile windowsProfile; - - /** - * Creates an instance of MachineOSProfile class. - */ - public MachineOSProfile() { - } - - /** - * Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - * - * @return the osType value. - */ - public OSType osType() { - return this.osType; - } - - /** - * Set the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - * - * @param osType the osType value to set. - * @return the MachineOSProfile object itself. - */ - public MachineOSProfile withOsType(OSType osType) { - this.osType = osType; - return this; - } - - /** - * Get the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if - * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after - * Windows2019 is deprecated. - * - * @return the osSku value. - */ - public OSSku osSku() { - return this.osSku; - } - - /** - * Set the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if - * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after - * Windows2019 is deprecated. - * - * @param osSku the osSku value to set. - * @return the MachineOSProfile object itself. - */ - public MachineOSProfile withOsSku(OSSku osSku) { - this.osSku = osSku; - return this; - } - - /** - * Get the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the - * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. - * - * @return the osDiskSizeGB value. - */ - public Integer osDiskSizeGB() { - return this.osDiskSizeGB; - } - - /** - * Set the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the - * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. - * - * @param osDiskSizeGB the osDiskSizeGB value to set. - * @return the MachineOSProfile object itself. - */ - public MachineOSProfile withOsDiskSizeGB(Integer osDiskSizeGB) { - this.osDiskSizeGB = osDiskSizeGB; - return this; - } - - /** - * Get the osDiskType property: The OS disk type to be used for machines in the agent pool. The default is - * 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, - * defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral - * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). - * - * @return the osDiskType value. - */ - public OSDiskType osDiskType() { - return this.osDiskType; - } - - /** - * Set the osDiskType property: The OS disk type to be used for machines in the agent pool. The default is - * 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, - * defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral - * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). - * - * @param osDiskType the osDiskType value to set. - * @return the MachineOSProfile object itself. - */ - public MachineOSProfile withOsDiskType(OSDiskType osDiskType) { - this.osDiskType = osDiskType; - return this; - } - - /** - * Get the enableFips property: Whether to use a FIPS-enabled OS. - * - * @return the enableFips value. - */ - public Boolean enableFips() { - return this.enableFips; - } - - /** - * Set the enableFips property: Whether to use a FIPS-enabled OS. - * - * @param enableFips the enableFips value to set. - * @return the MachineOSProfile object itself. - */ - public MachineOSProfile withEnableFips(Boolean enableFips) { - this.enableFips = enableFips; - return this; - } - - /** - * Get the linuxProfile property: The Linux machine's specific profile. - * - * @return the linuxProfile value. - */ - public MachineOSProfileLinuxProfile linuxProfile() { - return this.linuxProfile; - } - - /** - * Set the linuxProfile property: The Linux machine's specific profile. - * - * @param linuxProfile the linuxProfile value to set. - * @return the MachineOSProfile object itself. - */ - public MachineOSProfile withLinuxProfile(MachineOSProfileLinuxProfile linuxProfile) { - this.linuxProfile = linuxProfile; - return this; - } - - /** - * Get the windowsProfile property: The Windows machine's specific profile. - * - * @return the windowsProfile value. - */ - public AgentPoolWindowsProfile windowsProfile() { - return this.windowsProfile; - } - - /** - * Set the windowsProfile property: The Windows machine's specific profile. - * - * @param windowsProfile the windowsProfile value to set. - * @return the MachineOSProfile object itself. - */ - public MachineOSProfile withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { - this.windowsProfile = windowsProfile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (linuxProfile() != null) { - linuxProfile().validate(); - } - if (windowsProfile() != null) { - windowsProfile().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); - jsonWriter.writeStringField("osSKU", this.osSku == null ? null : this.osSku.toString()); - jsonWriter.writeNumberField("osDiskSizeGB", this.osDiskSizeGB); - jsonWriter.writeStringField("osDiskType", this.osDiskType == null ? null : this.osDiskType.toString()); - jsonWriter.writeBooleanField("enableFIPS", this.enableFips); - jsonWriter.writeJsonField("linuxProfile", this.linuxProfile); - jsonWriter.writeJsonField("windowsProfile", this.windowsProfile); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MachineOSProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MachineOSProfile if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the MachineOSProfile. - */ - public static MachineOSProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MachineOSProfile deserializedMachineOSProfile = new MachineOSProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("osType".equals(fieldName)) { - deserializedMachineOSProfile.osType = OSType.fromString(reader.getString()); - } else if ("osSKU".equals(fieldName)) { - deserializedMachineOSProfile.osSku = OSSku.fromString(reader.getString()); - } else if ("osDiskSizeGB".equals(fieldName)) { - deserializedMachineOSProfile.osDiskSizeGB = reader.getNullable(JsonReader::getInt); - } else if ("osDiskType".equals(fieldName)) { - deserializedMachineOSProfile.osDiskType = OSDiskType.fromString(reader.getString()); - } else if ("enableFIPS".equals(fieldName)) { - deserializedMachineOSProfile.enableFips = reader.getNullable(JsonReader::getBoolean); - } else if ("linuxProfile".equals(fieldName)) { - deserializedMachineOSProfile.linuxProfile = MachineOSProfileLinuxProfile.fromJson(reader); - } else if ("windowsProfile".equals(fieldName)) { - deserializedMachineOSProfile.windowsProfile = AgentPoolWindowsProfile.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMachineOSProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfileLinuxProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfileLinuxProfile.java deleted file mode 100644 index ef7ad45400b8..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfileLinuxProfile.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The Linux machine's specific profile. - */ -@Fluent -public final class MachineOSProfileLinuxProfile implements JsonSerializable<MachineOSProfileLinuxProfile> { - /* - * The OS configuration of Linux machine. - */ - private LinuxOSConfig linuxOSConfig; - - /* - * Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd - * after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for - * Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script). - */ - private String messageOfTheDay; - - /** - * Creates an instance of MachineOSProfileLinuxProfile class. - */ - public MachineOSProfileLinuxProfile() { - } - - /** - * Get the linuxOSConfig property: The OS configuration of Linux machine. - * - * @return the linuxOSConfig value. - */ - public LinuxOSConfig linuxOSConfig() { - return this.linuxOSConfig; - } - - /** - * Set the linuxOSConfig property: The OS configuration of Linux machine. - * - * @param linuxOSConfig the linuxOSConfig value to set. - * @return the MachineOSProfileLinuxProfile object itself. - */ - public MachineOSProfileLinuxProfile withLinuxOSConfig(LinuxOSConfig linuxOSConfig) { - this.linuxOSConfig = linuxOSConfig; - return this; - } - - /** - * Get the messageOfTheDay property: Message of the day for Linux nodes, base64-encoded. A base64-encoded string - * which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux - * nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not - * be executed as a script). - * - * @return the messageOfTheDay value. - */ - public String messageOfTheDay() { - return this.messageOfTheDay; - } - - /** - * Set the messageOfTheDay property: Message of the day for Linux nodes, base64-encoded. A base64-encoded string - * which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux - * nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not - * be executed as a script). - * - * @param messageOfTheDay the messageOfTheDay value to set. - * @return the MachineOSProfileLinuxProfile object itself. - */ - public MachineOSProfileLinuxProfile withMessageOfTheDay(String messageOfTheDay) { - this.messageOfTheDay = messageOfTheDay; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (linuxOSConfig() != null) { - linuxOSConfig().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("linuxOSConfig", this.linuxOSConfig); - jsonWriter.writeStringField("messageOfTheDay", this.messageOfTheDay); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MachineOSProfileLinuxProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MachineOSProfileLinuxProfile if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MachineOSProfileLinuxProfile. - */ - public static MachineOSProfileLinuxProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MachineOSProfileLinuxProfile deserializedMachineOSProfileLinuxProfile = new MachineOSProfileLinuxProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("linuxOSConfig".equals(fieldName)) { - deserializedMachineOSProfileLinuxProfile.linuxOSConfig = LinuxOSConfig.fromJson(reader); - } else if ("messageOfTheDay".equals(fieldName)) { - deserializedMachineOSProfileLinuxProfile.messageOfTheDay = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMachineOSProfileLinuxProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java index 2fa217d81c35..2f167587df26 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java @@ -4,86 +4,28 @@ package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.Map; /** * The properties of the machine. */ -@Fluent +@Immutable public final class MachineProperties implements JsonSerializable<MachineProperties> { /* - * The network properties of the machine + * network properties of the machine */ private MachineNetworkProperties network; /* - * Arm resource id of the machine. It can be used to GET underlying VM Instance + * Azure resource id of the machine. It can be used to GET underlying VM Instance */ private String resourceId; - /* - * The hardware and GPU settings of the machine. - */ - private MachineHardwareProfile hardware; - - /* - * The operating system and disk used by the machine. - */ - private MachineOSProfile operatingSystem; - - /* - * The Kubernetes configurations used by the machine. - */ - private MachineKubernetesProfile kubernetes; - - /* - * Machine only allows 'System' and 'User' mode. - */ - private AgentPoolMode mode; - - /* - * The security settings of the machine. - */ - private AgentPoolSecurityProfile security; - - /* - * The priority for the machine. If not specified, the default is 'Regular'. - */ - private ScaleSetPriority priority; - - /* - * The version of node image. - */ - private String nodeImageVersion; - - /* - * The current deployment or provisioning state. - */ - private String provisioningState; - - /* - * The tags to be persisted on the machine. - */ - private Map<String, String> tags; - - /* - * Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is - * updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable - * optimistic concurrency per the normal eTag convention. - */ - private String etag; - - /* - * Contains read-only information about the machine. - */ - private MachineStatus status; - /** * Creates an instance of MachineProperties class. */ @@ -91,7 +33,7 @@ public MachineProperties() { } /** - * Get the network property: The network properties of the machine. + * Get the network property: network properties of the machine. * * @return the network value. */ @@ -100,18 +42,7 @@ public MachineNetworkProperties network() { } /** - * Set the network property: The network properties of the machine. - * - * @param network the network value to set. - * @return the MachineProperties object itself. - */ - public MachineProperties withNetwork(MachineNetworkProperties network) { - this.network = network; - return this; - } - - /** - * Get the resourceId property: Arm resource id of the machine. It can be used to GET underlying VM Instance. + * Get the resourceId property: Azure resource id of the machine. It can be used to GET underlying VM Instance. * * @return the resourceId value. */ @@ -119,184 +50,6 @@ public String resourceId() { return this.resourceId; } - /** - * Get the hardware property: The hardware and GPU settings of the machine. - * - * @return the hardware value. - */ - public MachineHardwareProfile hardware() { - return this.hardware; - } - - /** - * Set the hardware property: The hardware and GPU settings of the machine. - * - * @param hardware the hardware value to set. - * @return the MachineProperties object itself. - */ - public MachineProperties withHardware(MachineHardwareProfile hardware) { - this.hardware = hardware; - return this; - } - - /** - * Get the operatingSystem property: The operating system and disk used by the machine. - * - * @return the operatingSystem value. - */ - public MachineOSProfile operatingSystem() { - return this.operatingSystem; - } - - /** - * Set the operatingSystem property: The operating system and disk used by the machine. - * - * @param operatingSystem the operatingSystem value to set. - * @return the MachineProperties object itself. - */ - public MachineProperties withOperatingSystem(MachineOSProfile operatingSystem) { - this.operatingSystem = operatingSystem; - return this; - } - - /** - * Get the kubernetes property: The Kubernetes configurations used by the machine. - * - * @return the kubernetes value. - */ - public MachineKubernetesProfile kubernetes() { - return this.kubernetes; - } - - /** - * Set the kubernetes property: The Kubernetes configurations used by the machine. - * - * @param kubernetes the kubernetes value to set. - * @return the MachineProperties object itself. - */ - public MachineProperties withKubernetes(MachineKubernetesProfile kubernetes) { - this.kubernetes = kubernetes; - return this; - } - - /** - * Get the mode property: Machine only allows 'System' and 'User' mode. - * - * @return the mode value. - */ - public AgentPoolMode mode() { - return this.mode; - } - - /** - * Set the mode property: Machine only allows 'System' and 'User' mode. - * - * @param mode the mode value to set. - * @return the MachineProperties object itself. - */ - public MachineProperties withMode(AgentPoolMode mode) { - this.mode = mode; - return this; - } - - /** - * Get the security property: The security settings of the machine. - * - * @return the security value. - */ - public AgentPoolSecurityProfile security() { - return this.security; - } - - /** - * Set the security property: The security settings of the machine. - * - * @param security the security value to set. - * @return the MachineProperties object itself. - */ - public MachineProperties withSecurity(AgentPoolSecurityProfile security) { - this.security = security; - return this; - } - - /** - * Get the priority property: The priority for the machine. If not specified, the default is 'Regular'. - * - * @return the priority value. - */ - public ScaleSetPriority priority() { - return this.priority; - } - - /** - * Set the priority property: The priority for the machine. If not specified, the default is 'Regular'. - * - * @param priority the priority value to set. - * @return the MachineProperties object itself. - */ - public MachineProperties withPriority(ScaleSetPriority priority) { - this.priority = priority; - return this; - } - - /** - * Get the nodeImageVersion property: The version of node image. - * - * @return the nodeImageVersion value. - */ - public String nodeImageVersion() { - return this.nodeImageVersion; - } - - /** - * Get the provisioningState property: The current deployment or provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the tags property: The tags to be persisted on the machine. - * - * @return the tags value. - */ - public Map<String, String> tags() { - return this.tags; - } - - /** - * Set the tags property: The tags to be persisted on the machine. - * - * @param tags the tags value to set. - * @return the MachineProperties object itself. - */ - public MachineProperties withTags(Map<String, String> tags) { - this.tags = tags; - return this; - } - - /** - * Get the etag property: Unique read-only string used to implement optimistic concurrency. The eTag value will - * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a - * subsequent request to enable optimistic concurrency per the normal eTag convention. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the status property: Contains read-only information about the machine. - * - * @return the status value. - */ - public MachineStatus status() { - return this.status; - } - /** * Validates the instance. * @@ -306,21 +59,6 @@ public void validate() { if (network() != null) { network().validate(); } - if (hardware() != null) { - hardware().validate(); - } - if (operatingSystem() != null) { - operatingSystem().validate(); - } - if (kubernetes() != null) { - kubernetes().validate(); - } - if (security() != null) { - security().validate(); - } - if (status() != null) { - status().validate(); - } } /** @@ -329,14 +67,6 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("network", this.network); - jsonWriter.writeJsonField("hardware", this.hardware); - jsonWriter.writeJsonField("operatingSystem", this.operatingSystem); - jsonWriter.writeJsonField("kubernetes", this.kubernetes); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - jsonWriter.writeJsonField("security", this.security); - jsonWriter.writeStringField("priority", this.priority == null ? null : this.priority.toString()); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -359,29 +89,6 @@ public static MachineProperties fromJson(JsonReader jsonReader) throws IOExcepti deserializedMachineProperties.network = MachineNetworkProperties.fromJson(reader); } else if ("resourceId".equals(fieldName)) { deserializedMachineProperties.resourceId = reader.getString(); - } else if ("hardware".equals(fieldName)) { - deserializedMachineProperties.hardware = MachineHardwareProfile.fromJson(reader); - } else if ("operatingSystem".equals(fieldName)) { - deserializedMachineProperties.operatingSystem = MachineOSProfile.fromJson(reader); - } else if ("kubernetes".equals(fieldName)) { - deserializedMachineProperties.kubernetes = MachineKubernetesProfile.fromJson(reader); - } else if ("mode".equals(fieldName)) { - deserializedMachineProperties.mode = AgentPoolMode.fromString(reader.getString()); - } else if ("security".equals(fieldName)) { - deserializedMachineProperties.security = AgentPoolSecurityProfile.fromJson(reader); - } else if ("priority".equals(fieldName)) { - deserializedMachineProperties.priority = ScaleSetPriority.fromString(reader.getString()); - } else if ("nodeImageVersion".equals(fieldName)) { - deserializedMachineProperties.nodeImageVersion = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedMachineProperties.provisioningState = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); - deserializedMachineProperties.tags = tags; - } else if ("eTag".equals(fieldName)) { - deserializedMachineProperties.etag = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedMachineProperties.status = MachineStatus.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineStatus.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineStatus.java deleted file mode 100644 index 5f0bfabe70fa..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineStatus.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Contains read-only information about the machine. - */ -@Immutable -public final class MachineStatus implements JsonSerializable<MachineStatus> { - /* - * The error details information of the machine. Preserves the detailed info of failure. If there was no error, this - * field is omitted. - */ - private ManagementError provisioningError; - - /* - * Specifies the time at which the machine was created. - */ - private OffsetDateTime creationTimestamp; - - /* - * The drift action of the machine. Indicates whether a machine has deviated from its expected state due to changes - * in managed cluster properties, requiring corrective action. - */ - private DriftAction driftAction; - - /* - * Reason for machine drift. Provides detailed information on why the machine has drifted. This field is omitted if - * the machine is up to date. - */ - private String driftReason; - - /* - * Virtual machine state. Indicates the current state of the underlying virtual machine. - */ - private VmState vmState; - - /** - * Creates an instance of MachineStatus class. - */ - public MachineStatus() { - } - - /** - * Get the provisioningError property: The error details information of the machine. Preserves the detailed info of - * failure. If there was no error, this field is omitted. - * - * @return the provisioningError value. - */ - public ManagementError provisioningError() { - return this.provisioningError; - } - - /** - * Get the creationTimestamp property: Specifies the time at which the machine was created. - * - * @return the creationTimestamp value. - */ - public OffsetDateTime creationTimestamp() { - return this.creationTimestamp; - } - - /** - * Get the driftAction property: The drift action of the machine. Indicates whether a machine has deviated from its - * expected state due to changes in managed cluster properties, requiring corrective action. - * - * @return the driftAction value. - */ - public DriftAction driftAction() { - return this.driftAction; - } - - /** - * Get the driftReason property: Reason for machine drift. Provides detailed information on why the machine has - * drifted. This field is omitted if the machine is up to date. - * - * @return the driftReason value. - */ - public String driftReason() { - return this.driftReason; - } - - /** - * Get the vmState property: Virtual machine state. Indicates the current state of the underlying virtual machine. - * - * @return the vmState value. - */ - public VmState vmState() { - return this.vmState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MachineStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MachineStatus if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the MachineStatus. - */ - public static MachineStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MachineStatus deserializedMachineStatus = new MachineStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningError".equals(fieldName)) { - deserializedMachineStatus.provisioningError = ManagementError.fromJson(reader); - } else if ("creationTimestamp".equals(fieldName)) { - deserializedMachineStatus.creationTimestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("driftAction".equals(fieldName)) { - deserializedMachineStatus.driftAction = DriftAction.fromString(reader.getString()); - } else if ("driftReason".equals(fieldName)) { - deserializedMachineStatus.driftReason = reader.getString(); - } else if ("vmState".equals(fieldName)) { - deserializedMachineStatus.vmState = VmState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMachineStatus; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java index 55c754ef20ea..b5b236a5b5cc 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java @@ -31,8 +31,13 @@ public final class ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoo private String provisioningState; /* - * The version of Kubernetes running on the Agent Pool. If orchestratorVersion was a fully specified version - * <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion was <major.minor>, this field + * The version of node image + */ + private String nodeImageVersion; + + /* + * The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version + * <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion is <major.minor>, this field * will contain the full <major.minor.patch> version being used. */ private String currentOrchestratorVersion; @@ -83,9 +88,19 @@ public String provisioningState() { } /** - * Get the currentOrchestratorVersion property: The version of Kubernetes running on the Agent Pool. If - * orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to - * it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> + * Get the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + @Override + public String nodeImageVersion() { + return this.nodeImageVersion; + } + + /** + * Get the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. If + * orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> * version being used. * * @return the currentOrchestratorVersion value. @@ -287,24 +302,6 @@ public ManagedClusterAgentPoolProfile withOrchestratorVersion(String orchestrato return this; } - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withNodeImageVersion(String nodeImageVersion) { - super.withNodeImageVersion(nodeImageVersion); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withUpgradeStrategy(UpgradeStrategy upgradeStrategy) { - super.withUpgradeStrategy(upgradeStrategy); - return this; - } - /** * {@inheritDoc} */ @@ -314,16 +311,6 @@ public ManagedClusterAgentPoolProfile withUpgradeSettings(AgentPoolUpgradeSettin return this; } - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile - withUpgradeSettingsBlueGreen(AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen) { - super.withUpgradeSettingsBlueGreen(upgradeSettingsBlueGreen); - return this; - } - /** * {@inheritDoc} */ @@ -414,15 +401,6 @@ public ManagedClusterAgentPoolProfile withNodeTaints(List<String> nodeTaints) { return this; } - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withNodeInitializationTaints(List<String> nodeInitializationTaints) { - super.withNodeInitializationTaints(nodeInitializationTaints); - return this; - } - /** * {@inheritDoc} */ @@ -517,8 +495,8 @@ public ManagedClusterAgentPoolProfile withHostGroupId(String hostGroupId) { * {@inheritDoc} */ @Override - public ManagedClusterAgentPoolProfile withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { - super.withWindowsProfile(windowsProfile); + public ManagedClusterAgentPoolProfile withNetworkProfile(AgentPoolNetworkProfile networkProfile) { + super.withNetworkProfile(networkProfile); return this; } @@ -526,8 +504,8 @@ public ManagedClusterAgentPoolProfile withWindowsProfile(AgentPoolWindowsProfile * {@inheritDoc} */ @Override - public ManagedClusterAgentPoolProfile withNetworkProfile(AgentPoolNetworkProfile networkProfile) { - super.withNetworkProfile(networkProfile); + public ManagedClusterAgentPoolProfile withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { + super.withWindowsProfile(windowsProfile); return this; } @@ -553,9 +531,8 @@ public ManagedClusterAgentPoolProfile withGpuProfile(GpuProfile gpuProfile) { * {@inheritDoc} */ @Override - public ManagedClusterAgentPoolProfile - withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile) { - super.withArtifactStreamingProfile(artifactStreamingProfile); + public ManagedClusterAgentPoolProfile withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { + super.withGatewayProfile(gatewayProfile); return this; } @@ -578,15 +555,6 @@ public ManagedClusterAgentPoolProfile withVirtualMachinesProfile(VirtualMachines return this; } - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) { - super.withGatewayProfile(gatewayProfile); - return this; - } - /** * {@inheritDoc} */ @@ -605,16 +573,6 @@ public ManagedClusterAgentPoolProfile withLocalDnsProfile(LocalDnsProfile localD return this; } - /** - * {@inheritDoc} - */ - @Override - public ManagedClusterAgentPoolProfile - withNodeCustomizationProfile(NodeCustomizationProfile nodeCustomizationProfile) { - super.withNodeCustomizationProfile(nodeCustomizationProfile); - return this; - } - /** * Validates the instance. * @@ -630,9 +588,6 @@ public void validate() { if (upgradeSettings() != null) { upgradeSettings().validate(); } - if (upgradeSettingsBlueGreen() != null) { - upgradeSettingsBlueGreen().validate(); - } if (powerState() != null) { powerState().validate(); } @@ -645,20 +600,20 @@ public void validate() { if (creationData() != null) { creationData().validate(); } - if (windowsProfile() != null) { - windowsProfile().validate(); - } if (networkProfile() != null) { networkProfile().validate(); } + if (windowsProfile() != null) { + windowsProfile().validate(); + } if (securityProfile() != null) { securityProfile().validate(); } if (gpuProfile() != null) { gpuProfile().validate(); } - if (artifactStreamingProfile() != null) { - artifactStreamingProfile().validate(); + if (gatewayProfile() != null) { + gatewayProfile().validate(); } if (virtualMachinesProfile() != null) { virtualMachinesProfile().validate(); @@ -666,18 +621,12 @@ public void validate() { if (virtualMachineNodesStatus() != null) { virtualMachineNodesStatus().forEach(e -> e.validate()); } - if (gatewayProfile() != null) { - gatewayProfile().validate(); - } if (status() != null) { status().validate(); } if (localDnsProfile() != null) { localDnsProfile().validate(); } - if (nodeCustomizationProfile() != null) { - nodeCustomizationProfile().validate(); - } } private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterAgentPoolProfile.class); @@ -709,10 +658,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("type", type() == null ? null : type().toString()); jsonWriter.writeStringField("mode", mode() == null ? null : mode().toString()); jsonWriter.writeStringField("orchestratorVersion", orchestratorVersion()); - jsonWriter.writeStringField("nodeImageVersion", nodeImageVersion()); - jsonWriter.writeStringField("upgradeStrategy", upgradeStrategy() == null ? null : upgradeStrategy().toString()); jsonWriter.writeJsonField("upgradeSettings", upgradeSettings()); - jsonWriter.writeJsonField("upgradeSettingsBlueGreen", upgradeSettingsBlueGreen()); jsonWriter.writeJsonField("powerState", powerState()); jsonWriter.writeArrayField("availabilityZones", availabilityZones(), (writer, element) -> writer.writeString(element)); @@ -726,8 +672,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("nodeLabels", nodeLabels(), (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("nodeTaints", nodeTaints(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("nodeInitializationTaints", nodeInitializationTaints(), - (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("proximityPlacementGroupID", proximityPlacementGroupId()); jsonWriter.writeJsonField("kubeletConfig", kubeletConfig()); jsonWriter.writeJsonField("linuxOSConfig", linuxOSConfig()); @@ -739,18 +683,16 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("creationData", creationData()); jsonWriter.writeStringField("capacityReservationGroupID", capacityReservationGroupId()); jsonWriter.writeStringField("hostGroupID", hostGroupId()); - jsonWriter.writeJsonField("windowsProfile", windowsProfile()); jsonWriter.writeJsonField("networkProfile", networkProfile()); + jsonWriter.writeJsonField("windowsProfile", windowsProfile()); jsonWriter.writeJsonField("securityProfile", securityProfile()); jsonWriter.writeJsonField("gpuProfile", gpuProfile()); - jsonWriter.writeJsonField("artifactStreamingProfile", artifactStreamingProfile()); + jsonWriter.writeJsonField("gatewayProfile", gatewayProfile()); jsonWriter.writeJsonField("virtualMachinesProfile", virtualMachinesProfile()); jsonWriter.writeArrayField("virtualMachineNodesStatus", virtualMachineNodesStatus(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("gatewayProfile", gatewayProfile()); jsonWriter.writeJsonField("status", status()); jsonWriter.writeJsonField("localDNSProfile", localDnsProfile()); - jsonWriter.writeJsonField("nodeCustomizationProfile", nodeCustomizationProfile()); jsonWriter.writeStringField("name", this.name); return jsonWriter.writeEndObject(); } @@ -823,16 +765,10 @@ public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) thr } else if ("currentOrchestratorVersion".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.currentOrchestratorVersion = reader.getString(); } else if ("nodeImageVersion".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.withNodeImageVersion(reader.getString()); - } else if ("upgradeStrategy".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withUpgradeStrategy(UpgradeStrategy.fromString(reader.getString())); + deserializedManagedClusterAgentPoolProfile.nodeImageVersion = reader.getString(); } else if ("upgradeSettings".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile .withUpgradeSettings(AgentPoolUpgradeSettings.fromJson(reader)); - } else if ("upgradeSettingsBlueGreen".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withUpgradeSettingsBlueGreen(AgentPoolBlueGreenUpgradeSettings.fromJson(reader)); } else if ("provisioningState".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.provisioningState = reader.getString(); } else if ("powerState".equals(fieldName)) { @@ -863,9 +799,6 @@ public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) thr } else if ("nodeTaints".equals(fieldName)) { List<String> nodeTaints = reader.readArray(reader1 -> reader1.getString()); deserializedManagedClusterAgentPoolProfile.withNodeTaints(nodeTaints); - } else if ("nodeInitializationTaints".equals(fieldName)) { - List<String> nodeInitializationTaints = reader.readArray(reader1 -> reader1.getString()); - deserializedManagedClusterAgentPoolProfile.withNodeInitializationTaints(nodeInitializationTaints); } else if ("proximityPlacementGroupID".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.withProximityPlacementGroupId(reader.getString()); } else if ("kubeletConfig".equals(fieldName)) { @@ -890,20 +823,20 @@ public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) thr deserializedManagedClusterAgentPoolProfile.withCapacityReservationGroupId(reader.getString()); } else if ("hostGroupID".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.withHostGroupId(reader.getString()); - } else if ("windowsProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withWindowsProfile(AgentPoolWindowsProfile.fromJson(reader)); } else if ("networkProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile .withNetworkProfile(AgentPoolNetworkProfile.fromJson(reader)); + } else if ("windowsProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withWindowsProfile(AgentPoolWindowsProfile.fromJson(reader)); } else if ("securityProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile .withSecurityProfile(AgentPoolSecurityProfile.fromJson(reader)); } else if ("gpuProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.withGpuProfile(GpuProfile.fromJson(reader)); - } else if ("artifactStreamingProfile".equals(fieldName)) { + } else if ("gatewayProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile - .withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile.fromJson(reader)); + .withGatewayProfile(AgentPoolGatewayProfile.fromJson(reader)); } else if ("virtualMachinesProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile .withVirtualMachinesProfile(VirtualMachinesProfile.fromJson(reader)); @@ -911,16 +844,10 @@ public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) thr List<VirtualMachineNodes> virtualMachineNodesStatus = reader.readArray(reader1 -> VirtualMachineNodes.fromJson(reader1)); deserializedManagedClusterAgentPoolProfile.withVirtualMachineNodesStatus(virtualMachineNodesStatus); - } else if ("gatewayProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withGatewayProfile(AgentPoolGatewayProfile.fromJson(reader)); } else if ("status".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.withStatus(AgentPoolStatus.fromJson(reader)); } else if ("localDNSProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.withLocalDnsProfile(LocalDnsProfile.fromJson(reader)); - } else if ("nodeCustomizationProfile".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile - .withNodeCustomizationProfile(NodeCustomizationProfile.fromJson(reader)); } else if ("name".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.name = reader.getString(); } else { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java index d069c9903b07..b1ba9d300a4e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java @@ -50,13 +50,14 @@ public final class ManagedClusterApiServerAccessProfile private Boolean disableRunCommand; /* - * Whether to enable apiserver vnet integration for the cluster or not. + * Whether to enable apiserver vnet integration for the cluster or not. See aka.ms/AksVnetIntegration for more + * details. */ private Boolean enableVnetIntegration; /* - * The subnet to be used when apiserver vnet integration is enabled. It is required when: 1. creating a new cluster - * with BYO Vnet; 2. updating an existing cluster to enable apiserver vnet integration. + * The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new cluster with + * BYO Vnet, or when updating an existing cluster to enable apiserver vnet integration. */ private String subnetId; @@ -184,7 +185,8 @@ public ManagedClusterApiServerAccessProfile withDisableRunCommand(Boolean disabl } /** - * Get the enableVnetIntegration property: Whether to enable apiserver vnet integration for the cluster or not. + * Get the enableVnetIntegration property: Whether to enable apiserver vnet integration for the cluster or not. See + * aka.ms/AksVnetIntegration for more details. * * @return the enableVnetIntegration value. */ @@ -193,7 +195,8 @@ public Boolean enableVnetIntegration() { } /** - * Set the enableVnetIntegration property: Whether to enable apiserver vnet integration for the cluster or not. + * Set the enableVnetIntegration property: Whether to enable apiserver vnet integration for the cluster or not. See + * aka.ms/AksVnetIntegration for more details. * * @param enableVnetIntegration the enableVnetIntegration value to set. * @return the ManagedClusterApiServerAccessProfile object itself. @@ -204,8 +207,8 @@ public ManagedClusterApiServerAccessProfile withEnableVnetIntegration(Boolean en } /** - * Get the subnetId property: The subnet to be used when apiserver vnet integration is enabled. It is required when: - * 1. creating a new cluster with BYO Vnet; 2. updating an existing cluster to enable apiserver vnet integration. + * Get the subnetId property: The subnet to be used when apiserver vnet integration is enabled. It is required when + * creating a new cluster with BYO Vnet, or when updating an existing cluster to enable apiserver vnet integration. * * @return the subnetId value. */ @@ -214,8 +217,8 @@ public String subnetId() { } /** - * Set the subnetId property: The subnet to be used when apiserver vnet integration is enabled. It is required when: - * 1. creating a new cluster with BYO Vnet; 2. updating an existing cluster to enable apiserver vnet integration. + * Set the subnetId property: The subnet to be used when apiserver vnet integration is enabled. It is required when + * creating a new cluster with BYO Vnet, or when updating an existing cluster to enable apiserver vnet integration. * * @param subnetId the subnetId value to set. * @return the ManagedClusterApiServerAccessProfile object itself. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java index d7546883b228..cf6a236cb42e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java @@ -23,8 +23,7 @@ public final class ManagedClusterAutoUpgradeProfile implements JsonSerializable< private UpgradeChannel upgradeChannel; /* - * Manner in which the OS on your nodes is updated. The default is Unmanaged, but may change to either NodeImage or - * SecurityPatch at GA. + * Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. */ private NodeOSUpgradeChannel nodeOSUpgradeChannel; @@ -59,8 +58,8 @@ public ManagedClusterAutoUpgradeProfile withUpgradeChannel(UpgradeChannel upgrad } /** - * Get the nodeOSUpgradeChannel property: Manner in which the OS on your nodes is updated. The default is Unmanaged, - * but may change to either NodeImage or SecurityPatch at GA. + * Get the nodeOSUpgradeChannel property: Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. + * The default is NodeImage. * * @return the nodeOSUpgradeChannel value. */ @@ -69,8 +68,8 @@ public NodeOSUpgradeChannel nodeOSUpgradeChannel() { } /** - * Set the nodeOSUpgradeChannel property: Manner in which the OS on your nodes is updated. The default is Unmanaged, - * but may change to either NodeImage or SecurityPatch at GA. + * Set the nodeOSUpgradeChannel property: Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. + * The default is NodeImage. * * @param nodeOSUpgradeChannel the nodeOSUpgradeChannel value to set. * @return the ManagedClusterAutoUpgradeProfile object itself. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java index 43d1c487b0df..929046a73d98 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java @@ -12,28 +12,17 @@ import java.io.IOException; /** - * Prometheus addon profile for the container service cluster. + * Azure Monitor addon profiles for monitoring the managed cluster. */ @Fluent public final class ManagedClusterAzureMonitorProfile implements JsonSerializable<ManagedClusterAzureMonitorProfile> { /* - * Metrics profile for the prometheus service addon + * Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes + * infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom + * targets. See aka.ms/AzureManagedPrometheus for an overview. */ private ManagedClusterAzureMonitorProfileMetrics metrics; - /* - * Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and Container stdout & stderr logs etc. - * See aka.ms/AzureMonitorContainerInsights for an overview. - */ - private ManagedClusterAzureMonitorProfileContainerInsights containerInsights; - - /* - * Application Monitoring Profile for Kubernetes Application Container. Collects application logs, metrics and - * traces through auto-instrumentation of the application using Azure Monitor OpenTelemetry based SDKs. See - * aka.ms/AzureMonitorApplicationMonitoring for an overview. - */ - private ManagedClusterAzureMonitorProfileAppMonitoring appMonitoring; - /** * Creates an instance of ManagedClusterAzureMonitorProfile class. */ @@ -41,7 +30,9 @@ public ManagedClusterAzureMonitorProfile() { } /** - * Get the metrics property: Metrics profile for the prometheus service addon. + * Get the metrics property: Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect + * out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional + * scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. * * @return the metrics value. */ @@ -50,7 +41,9 @@ public ManagedClusterAzureMonitorProfileMetrics metrics() { } /** - * Set the metrics property: Metrics profile for the prometheus service addon. + * Set the metrics property: Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect + * out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional + * scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. * * @param metrics the metrics value to set. * @return the ManagedClusterAzureMonitorProfile object itself. @@ -60,54 +53,6 @@ public ManagedClusterAzureMonitorProfile withMetrics(ManagedClusterAzureMonitorP return this; } - /** - * Get the containerInsights property: Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and - * Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. - * - * @return the containerInsights value. - */ - public ManagedClusterAzureMonitorProfileContainerInsights containerInsights() { - return this.containerInsights; - } - - /** - * Set the containerInsights property: Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and - * Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. - * - * @param containerInsights the containerInsights value to set. - * @return the ManagedClusterAzureMonitorProfile object itself. - */ - public ManagedClusterAzureMonitorProfile - withContainerInsights(ManagedClusterAzureMonitorProfileContainerInsights containerInsights) { - this.containerInsights = containerInsights; - return this; - } - - /** - * Get the appMonitoring property: Application Monitoring Profile for Kubernetes Application Container. Collects - * application logs, metrics and traces through auto-instrumentation of the application using Azure Monitor - * OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. - * - * @return the appMonitoring value. - */ - public ManagedClusterAzureMonitorProfileAppMonitoring appMonitoring() { - return this.appMonitoring; - } - - /** - * Set the appMonitoring property: Application Monitoring Profile for Kubernetes Application Container. Collects - * application logs, metrics and traces through auto-instrumentation of the application using Azure Monitor - * OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. - * - * @param appMonitoring the appMonitoring value to set. - * @return the ManagedClusterAzureMonitorProfile object itself. - */ - public ManagedClusterAzureMonitorProfile - withAppMonitoring(ManagedClusterAzureMonitorProfileAppMonitoring appMonitoring) { - this.appMonitoring = appMonitoring; - return this; - } - /** * Validates the instance. * @@ -117,12 +62,6 @@ public void validate() { if (metrics() != null) { metrics().validate(); } - if (containerInsights() != null) { - containerInsights().validate(); - } - if (appMonitoring() != null) { - appMonitoring().validate(); - } } /** @@ -132,8 +71,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("metrics", this.metrics); - jsonWriter.writeJsonField("containerInsights", this.containerInsights); - jsonWriter.writeJsonField("appMonitoring", this.appMonitoring); return jsonWriter.writeEndObject(); } @@ -156,12 +93,6 @@ public static ManagedClusterAzureMonitorProfile fromJson(JsonReader jsonReader) if ("metrics".equals(fieldName)) { deserializedManagedClusterAzureMonitorProfile.metrics = ManagedClusterAzureMonitorProfileMetrics.fromJson(reader); - } else if ("containerInsights".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfile.containerInsights - = ManagedClusterAzureMonitorProfileContainerInsights.fromJson(reader); - } else if ("appMonitoring".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfile.appMonitoring - = ManagedClusterAzureMonitorProfileAppMonitoring.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoring.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoring.java deleted file mode 100644 index 2d0b6ad861c8..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoring.java +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Application Monitoring Profile for Kubernetes Application Container. Collects application logs, metrics and traces - * through auto-instrumentation of the application using Azure Monitor OpenTelemetry based SDKs. See - * aka.ms/AzureMonitorApplicationMonitoring for an overview. - */ -@Fluent -public final class ManagedClusterAzureMonitorProfileAppMonitoring - implements JsonSerializable<ManagedClusterAzureMonitorProfileAppMonitoring> { - /* - * Application Monitoring Auto Instrumentation for Kubernetes Application Container. Deploys web hook to - * auto-instrument Azure Monitor OpenTelemetry based SDKs to collect OpenTelemetry metrics, logs and traces of the - * application. See aka.ms/AzureMonitorApplicationMonitoring for an overview. - */ - private ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation autoInstrumentation; - - /* - * Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Metrics. Collects - * OpenTelemetry metrics of the application using Azure Monitor OpenTelemetry based SDKs. See - * aka.ms/AzureMonitorApplicationMonitoring for an overview. - */ - private ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics openTelemetryMetrics; - - /* - * Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Logs and Traces. - * Collects OpenTelemetry logs and traces of the application using Azure Monitor OpenTelemetry based SDKs. See - * aka.ms/AzureMonitorApplicationMonitoring for an overview. - */ - private ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs openTelemetryLogs; - - /** - * Creates an instance of ManagedClusterAzureMonitorProfileAppMonitoring class. - */ - public ManagedClusterAzureMonitorProfileAppMonitoring() { - } - - /** - * Get the autoInstrumentation property: Application Monitoring Auto Instrumentation for Kubernetes Application - * Container. Deploys web hook to auto-instrument Azure Monitor OpenTelemetry based SDKs to collect OpenTelemetry - * metrics, logs and traces of the application. See aka.ms/AzureMonitorApplicationMonitoring for an overview. - * - * @return the autoInstrumentation value. - */ - public ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation autoInstrumentation() { - return this.autoInstrumentation; - } - - /** - * Set the autoInstrumentation property: Application Monitoring Auto Instrumentation for Kubernetes Application - * Container. Deploys web hook to auto-instrument Azure Monitor OpenTelemetry based SDKs to collect OpenTelemetry - * metrics, logs and traces of the application. See aka.ms/AzureMonitorApplicationMonitoring for an overview. - * - * @param autoInstrumentation the autoInstrumentation value to set. - * @return the ManagedClusterAzureMonitorProfileAppMonitoring object itself. - */ - public ManagedClusterAzureMonitorProfileAppMonitoring - withAutoInstrumentation(ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation autoInstrumentation) { - this.autoInstrumentation = autoInstrumentation; - return this; - } - - /** - * Get the openTelemetryMetrics property: Application Monitoring Open Telemetry Metrics Profile for Kubernetes - * Application Container Metrics. Collects OpenTelemetry metrics of the application using Azure Monitor - * OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. - * - * @return the openTelemetryMetrics value. - */ - public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics openTelemetryMetrics() { - return this.openTelemetryMetrics; - } - - /** - * Set the openTelemetryMetrics property: Application Monitoring Open Telemetry Metrics Profile for Kubernetes - * Application Container Metrics. Collects OpenTelemetry metrics of the application using Azure Monitor - * OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. - * - * @param openTelemetryMetrics the openTelemetryMetrics value to set. - * @return the ManagedClusterAzureMonitorProfileAppMonitoring object itself. - */ - public ManagedClusterAzureMonitorProfileAppMonitoring withOpenTelemetryMetrics( - ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics openTelemetryMetrics) { - this.openTelemetryMetrics = openTelemetryMetrics; - return this; - } - - /** - * Get the openTelemetryLogs property: Application Monitoring Open Telemetry Metrics Profile for Kubernetes - * Application Container Logs and Traces. Collects OpenTelemetry logs and traces of the application using Azure - * Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. - * - * @return the openTelemetryLogs value. - */ - public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs openTelemetryLogs() { - return this.openTelemetryLogs; - } - - /** - * Set the openTelemetryLogs property: Application Monitoring Open Telemetry Metrics Profile for Kubernetes - * Application Container Logs and Traces. Collects OpenTelemetry logs and traces of the application using Azure - * Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. - * - * @param openTelemetryLogs the openTelemetryLogs value to set. - * @return the ManagedClusterAzureMonitorProfileAppMonitoring object itself. - */ - public ManagedClusterAzureMonitorProfileAppMonitoring - withOpenTelemetryLogs(ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs openTelemetryLogs) { - this.openTelemetryLogs = openTelemetryLogs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (autoInstrumentation() != null) { - autoInstrumentation().validate(); - } - if (openTelemetryMetrics() != null) { - openTelemetryMetrics().validate(); - } - if (openTelemetryLogs() != null) { - openTelemetryLogs().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("autoInstrumentation", this.autoInstrumentation); - jsonWriter.writeJsonField("openTelemetryMetrics", this.openTelemetryMetrics); - jsonWriter.writeJsonField("openTelemetryLogs", this.openTelemetryLogs); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterAzureMonitorProfileAppMonitoring from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterAzureMonitorProfileAppMonitoring if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedClusterAzureMonitorProfileAppMonitoring. - */ - public static ManagedClusterAzureMonitorProfileAppMonitoring fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterAzureMonitorProfileAppMonitoring deserializedManagedClusterAzureMonitorProfileAppMonitoring - = new ManagedClusterAzureMonitorProfileAppMonitoring(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("autoInstrumentation".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfileAppMonitoring.autoInstrumentation - = ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation.fromJson(reader); - } else if ("openTelemetryMetrics".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfileAppMonitoring.openTelemetryMetrics - = ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.fromJson(reader); - } else if ("openTelemetryLogs".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfileAppMonitoring.openTelemetryLogs - = ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterAzureMonitorProfileAppMonitoring; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation.java deleted file mode 100644 index cc7353d304d3..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Application Monitoring Auto Instrumentation for Kubernetes Application Container. Deploys web hook to auto-instrument - * Azure Monitor OpenTelemetry based SDKs to collect OpenTelemetry metrics, logs and traces of the application. See - * aka.ms/AzureMonitorApplicationMonitoring for an overview. - */ -@Fluent -public final class ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation - implements JsonSerializable<ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation> { - /* - * Indicates if Application Monitoring Auto Instrumentation is enabled or not. - */ - private Boolean enabled; - - /** - * Creates an instance of ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation class. - */ - public ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation() { - } - - /** - * Get the enabled property: Indicates if Application Monitoring Auto Instrumentation is enabled or not. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Indicates if Application Monitoring Auto Instrumentation is enabled or not. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation object itself. - */ - public ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation if the JsonReader was - * pointing to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation. - */ - public static ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation deserializedManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation - = new ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation.enabled - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs.java deleted file mode 100644 index fedaf77910f4..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Logs and Traces. Collects - * OpenTelemetry logs and traces of the application using Azure Monitor OpenTelemetry based SDKs. See - * aka.ms/AzureMonitorApplicationMonitoring for an overview. - */ -@Fluent -public final class ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs - implements JsonSerializable<ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs> { - /* - * Indicates if Application Monitoring Open Telemetry Logs and traces is enabled or not. - */ - private Boolean enabled; - - /* - * The Open Telemetry host port for Open Telemetry logs and traces. If not specified, the default port is 28331. - */ - private Long port; - - /** - * Creates an instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs class. - */ - public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs() { - } - - /** - * Get the enabled property: Indicates if Application Monitoring Open Telemetry Logs and traces is enabled or not. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Indicates if Application Monitoring Open Telemetry Logs and traces is enabled or not. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs object itself. - */ - public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the port property: The Open Telemetry host port for Open Telemetry logs and traces. If not specified, the - * default port is 28331. - * - * @return the port value. - */ - public Long port() { - return this.port; - } - - /** - * Set the port property: The Open Telemetry host port for Open Telemetry logs and traces. If not specified, the - * default port is 28331. - * - * @param port the port value to set. - * @return the ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs object itself. - */ - public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs withPort(Long port) { - this.port = port; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeNumberField("port", this.port); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs if the JsonReader was - * pointing to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs. - */ - public static ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs - = new ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs.enabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("port".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs.port - = reader.getNullable(JsonReader::getLong); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.java deleted file mode 100644 index 8c942507ff7d..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Metrics. Collects - * OpenTelemetry metrics of the application using Azure Monitor OpenTelemetry based SDKs. See - * aka.ms/AzureMonitorApplicationMonitoring for an overview. - */ -@Fluent -public final class ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics - implements JsonSerializable<ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics> { - /* - * Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. - */ - private Boolean enabled; - - /* - * The Open Telemetry host port for Open Telemetry metrics. If not specified, the default port is 28333. - */ - private Long port; - - /** - * Creates an instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics class. - */ - public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics() { - } - - /** - * Get the enabled property: Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics object itself. - */ - public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the port property: The Open Telemetry host port for Open Telemetry metrics. If not specified, the default - * port is 28333. - * - * @return the port value. - */ - public Long port() { - return this.port; - } - - /** - * Set the port property: The Open Telemetry host port for Open Telemetry metrics. If not specified, the default - * port is 28333. - * - * @param port the port value to set. - * @return the ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics object itself. - */ - public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics withPort(Long port) { - this.port = port; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeNumberField("port", this.port); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics if the JsonReader was - * pointing to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics. - */ - public static ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics - = new ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.enabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("port".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.port - = reader.getNullable(JsonReader::getLong); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileContainerInsights.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileContainerInsights.java deleted file mode 100644 index 66c81f746a55..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileContainerInsights.java +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and Container stdout & stderr logs etc. - * See aka.ms/AzureMonitorContainerInsights for an overview. - */ -@Fluent -public final class ManagedClusterAzureMonitorProfileContainerInsights - implements JsonSerializable<ManagedClusterAzureMonitorProfileContainerInsights> { - /* - * Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. - */ - private Boolean enabled; - - /* - * Fully Qualified ARM Resource Id of Azure Log Analytics Workspace for storing Azure Monitor Container Insights - * Logs. - */ - private String logAnalyticsWorkspaceResourceId; - - /* - * The syslog host port. If not specified, the default port is 28330. - */ - private Long syslogPort; - - /* - * Indicates whether custom metrics collection has to be disabled or not. If not specified the default is false. No - * custom metrics will be emitted if this field is false but the container insights enabled field is false - */ - private Boolean disableCustomMetrics; - - /* - * Indicates whether prometheus metrics scraping is disabled or not. If not specified the default is false. No - * prometheus metrics will be emitted if this field is false but the container insights enabled field is false - */ - private Boolean disablePrometheusMetricsScraping; - - /** - * Creates an instance of ManagedClusterAzureMonitorProfileContainerInsights class. - */ - public ManagedClusterAzureMonitorProfileContainerInsights() { - } - - /** - * Get the enabled property: Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. - */ - public ManagedClusterAzureMonitorProfileContainerInsights withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the logAnalyticsWorkspaceResourceId property: Fully Qualified ARM Resource Id of Azure Log Analytics - * Workspace for storing Azure Monitor Container Insights Logs. - * - * @return the logAnalyticsWorkspaceResourceId value. - */ - public String logAnalyticsWorkspaceResourceId() { - return this.logAnalyticsWorkspaceResourceId; - } - - /** - * Set the logAnalyticsWorkspaceResourceId property: Fully Qualified ARM Resource Id of Azure Log Analytics - * Workspace for storing Azure Monitor Container Insights Logs. - * - * @param logAnalyticsWorkspaceResourceId the logAnalyticsWorkspaceResourceId value to set. - * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. - */ - public ManagedClusterAzureMonitorProfileContainerInsights - withLogAnalyticsWorkspaceResourceId(String logAnalyticsWorkspaceResourceId) { - this.logAnalyticsWorkspaceResourceId = logAnalyticsWorkspaceResourceId; - return this; - } - - /** - * Get the syslogPort property: The syslog host port. If not specified, the default port is 28330. - * - * @return the syslogPort value. - */ - public Long syslogPort() { - return this.syslogPort; - } - - /** - * Set the syslogPort property: The syslog host port. If not specified, the default port is 28330. - * - * @param syslogPort the syslogPort value to set. - * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. - */ - public ManagedClusterAzureMonitorProfileContainerInsights withSyslogPort(Long syslogPort) { - this.syslogPort = syslogPort; - return this; - } - - /** - * Get the disableCustomMetrics property: Indicates whether custom metrics collection has to be disabled or not. If - * not specified the default is false. No custom metrics will be emitted if this field is false but the container - * insights enabled field is false. - * - * @return the disableCustomMetrics value. - */ - public Boolean disableCustomMetrics() { - return this.disableCustomMetrics; - } - - /** - * Set the disableCustomMetrics property: Indicates whether custom metrics collection has to be disabled or not. If - * not specified the default is false. No custom metrics will be emitted if this field is false but the container - * insights enabled field is false. - * - * @param disableCustomMetrics the disableCustomMetrics value to set. - * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. - */ - public ManagedClusterAzureMonitorProfileContainerInsights withDisableCustomMetrics(Boolean disableCustomMetrics) { - this.disableCustomMetrics = disableCustomMetrics; - return this; - } - - /** - * Get the disablePrometheusMetricsScraping property: Indicates whether prometheus metrics scraping is disabled or - * not. If not specified the default is false. No prometheus metrics will be emitted if this field is false but the - * container insights enabled field is false. - * - * @return the disablePrometheusMetricsScraping value. - */ - public Boolean disablePrometheusMetricsScraping() { - return this.disablePrometheusMetricsScraping; - } - - /** - * Set the disablePrometheusMetricsScraping property: Indicates whether prometheus metrics scraping is disabled or - * not. If not specified the default is false. No prometheus metrics will be emitted if this field is false but the - * container insights enabled field is false. - * - * @param disablePrometheusMetricsScraping the disablePrometheusMetricsScraping value to set. - * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. - */ - public ManagedClusterAzureMonitorProfileContainerInsights - withDisablePrometheusMetricsScraping(Boolean disablePrometheusMetricsScraping) { - this.disablePrometheusMetricsScraping = disablePrometheusMetricsScraping; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeStringField("logAnalyticsWorkspaceResourceId", this.logAnalyticsWorkspaceResourceId); - jsonWriter.writeNumberField("syslogPort", this.syslogPort); - jsonWriter.writeBooleanField("disableCustomMetrics", this.disableCustomMetrics); - jsonWriter.writeBooleanField("disablePrometheusMetricsScraping", this.disablePrometheusMetricsScraping); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterAzureMonitorProfileContainerInsights from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterAzureMonitorProfileContainerInsights if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedClusterAzureMonitorProfileContainerInsights. - */ - public static ManagedClusterAzureMonitorProfileContainerInsights fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterAzureMonitorProfileContainerInsights deserializedManagedClusterAzureMonitorProfileContainerInsights - = new ManagedClusterAzureMonitorProfileContainerInsights(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfileContainerInsights.enabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("logAnalyticsWorkspaceResourceId".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfileContainerInsights.logAnalyticsWorkspaceResourceId - = reader.getString(); - } else if ("syslogPort".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfileContainerInsights.syslogPort - = reader.getNullable(JsonReader::getLong); - } else if ("disableCustomMetrics".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfileContainerInsights.disableCustomMetrics - = reader.getNullable(JsonReader::getBoolean); - } else if ("disablePrometheusMetricsScraping".equals(fieldName)) { - deserializedManagedClusterAzureMonitorProfileContainerInsights.disablePrometheusMetricsScraping - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterAzureMonitorProfileContainerInsights; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java index 4112892296bf..c6fd51a2703f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java @@ -12,18 +12,24 @@ import java.io.IOException; /** - * Kube State Metrics for prometheus addon profile for the container service cluster. + * Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the + * kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for + * details. */ @Fluent public final class ManagedClusterAzureMonitorProfileKubeStateMetrics implements JsonSerializable<ManagedClusterAzureMonitorProfileKubeStateMetrics> { /* - * Comma-separated list of Kubernetes annotations keys that will be used in the resource's labels metric. + * Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric + * (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only + * resource name and namespace labels. */ private String metricLabelsAllowlist; /* - * Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric. + * Comma-separated list of Kubernetes annotation keys that will be used in the resource's labels metric (Example: + * 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). By default the metric contains only + * resource name and namespace labels. */ private String metricAnnotationsAllowList; @@ -34,8 +40,9 @@ public ManagedClusterAzureMonitorProfileKubeStateMetrics() { } /** - * Get the metricLabelsAllowlist property: Comma-separated list of Kubernetes annotations keys that will be used in - * the resource's labels metric. + * Get the metricLabelsAllowlist property: Comma-separated list of additional Kubernetes label keys that will be + * used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By + * default the metric contains only resource name and namespace labels. * * @return the metricLabelsAllowlist value. */ @@ -44,8 +51,9 @@ public String metricLabelsAllowlist() { } /** - * Set the metricLabelsAllowlist property: Comma-separated list of Kubernetes annotations keys that will be used in - * the resource's labels metric. + * Set the metricLabelsAllowlist property: Comma-separated list of additional Kubernetes label keys that will be + * used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By + * default the metric contains only resource name and namespace labels. * * @param metricLabelsAllowlist the metricLabelsAllowlist value to set. * @return the ManagedClusterAzureMonitorProfileKubeStateMetrics object itself. @@ -56,8 +64,9 @@ public ManagedClusterAzureMonitorProfileKubeStateMetrics withMetricLabelsAllowli } /** - * Get the metricAnnotationsAllowList property: Comma-separated list of additional Kubernetes label keys that will - * be used in the resource's labels metric. + * Get the metricAnnotationsAllowList property: Comma-separated list of Kubernetes annotation keys that will be used + * in the resource's labels metric (Example: 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). + * By default the metric contains only resource name and namespace labels. * * @return the metricAnnotationsAllowList value. */ @@ -66,8 +75,9 @@ public String metricAnnotationsAllowList() { } /** - * Set the metricAnnotationsAllowList property: Comma-separated list of additional Kubernetes label keys that will - * be used in the resource's labels metric. + * Set the metricAnnotationsAllowList property: Comma-separated list of Kubernetes annotation keys that will be used + * in the resource's labels metric (Example: 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). + * By default the metric contains only resource name and namespace labels. * * @param metricAnnotationsAllowList the metricAnnotationsAllowList value to set. * @return the ManagedClusterAzureMonitorProfileKubeStateMetrics object itself. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java index 1192651a08dc..c429294b7ad5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java @@ -12,18 +12,23 @@ import java.io.IOException; /** - * Metrics profile for the prometheus service addon. + * Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes + * infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. + * See aka.ms/AzureManagedPrometheus for an overview. */ @Fluent public final class ManagedClusterAzureMonitorProfileMetrics implements JsonSerializable<ManagedClusterAzureMonitorProfileMetrics> { /* - * Whether to enable the Prometheus collector + * Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See + * aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. */ private boolean enabled; /* - * Kube State Metrics for prometheus addon profile for the container service cluster + * Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the + * kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for + * details. */ private ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics; @@ -34,7 +39,8 @@ public ManagedClusterAzureMonitorProfileMetrics() { } /** - * Get the enabled property: Whether to enable the Prometheus collector. + * Get the enabled property: Whether to enable or disable the Azure Managed Prometheus addon for Prometheus + * monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. * * @return the enabled value. */ @@ -43,7 +49,8 @@ public boolean enabled() { } /** - * Set the enabled property: Whether to enable the Prometheus collector. + * Set the enabled property: Whether to enable or disable the Azure Managed Prometheus addon for Prometheus + * monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. * * @param enabled the enabled value to set. * @return the ManagedClusterAzureMonitorProfileMetrics object itself. @@ -54,8 +61,9 @@ public ManagedClusterAzureMonitorProfileMetrics withEnabled(boolean enabled) { } /** - * Get the kubeStateMetrics property: Kube State Metrics for prometheus addon profile for the container service - * cluster. + * Get the kubeStateMetrics property: Kube State Metrics profile for the Azure Managed Prometheus addon. These + * optional settings are for the kube-state-metrics pod that is deployed with the addon. See + * aka.ms/AzureManagedPrometheus-optional-parameters for details. * * @return the kubeStateMetrics value. */ @@ -64,8 +72,9 @@ public ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics() { } /** - * Set the kubeStateMetrics property: Kube State Metrics for prometheus addon profile for the container service - * cluster. + * Set the kubeStateMetrics property: Kube State Metrics profile for the Azure Managed Prometheus addon. These + * optional settings are for the kube-state-metrics pod that is deployed with the addon. See + * aka.ms/AzureManagedPrometheus-optional-parameters for details. * * @param kubeStateMetrics the kubeStateMetrics value to set. * @return the ManagedClusterAzureMonitorProfileMetrics object itself. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHostedSystemProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHostedSystemProfile.java deleted file mode 100644 index 10238c97d81f..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHostedSystemProfile.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Settings for hosted system addons. - */ -@Fluent -public final class ManagedClusterHostedSystemProfile implements JsonSerializable<ManagedClusterHostedSystemProfile> { - /* - * Whether to enable hosted system addons for the cluster. - */ - private Boolean enabled; - - /** - * Creates an instance of ManagedClusterHostedSystemProfile class. - */ - public ManagedClusterHostedSystemProfile() { - } - - /** - * Get the enabled property: Whether to enable hosted system addons for the cluster. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable hosted system addons for the cluster. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterHostedSystemProfile object itself. - */ - public ManagedClusterHostedSystemProfile withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterHostedSystemProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterHostedSystemProfile if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedClusterHostedSystemProfile. - */ - public static ManagedClusterHostedSystemProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterHostedSystemProfile deserializedManagedClusterHostedSystemProfile - = new ManagedClusterHostedSystemProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterHostedSystemProfile.enabled = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterHostedSystemProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java index 92ebe06e2255..24bb81b69756 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java @@ -32,23 +32,11 @@ public final class ManagedClusterHttpProxyConfig implements JsonSerializable<Man */ private List<String> noProxy; - /* - * A read-only list of all endpoints for which traffic should not be sent to the proxy. This list is a superset of - * noProxy and values injected by AKS. - */ - private List<String> effectiveNoProxy; - /* * Alternative CA cert to use for connecting to proxy servers. */ private String trustedCa; - /* - * Whether to enable HTTP proxy. When disabled, the specified proxy configuration will be not be set on pods and - * nodes. - */ - private Boolean enabled; - /** * Creates an instance of ManagedClusterHttpProxyConfig class. */ @@ -115,16 +103,6 @@ public ManagedClusterHttpProxyConfig withNoProxy(List<String> noProxy) { return this; } - /** - * Get the effectiveNoProxy property: A read-only list of all endpoints for which traffic should not be sent to the - * proxy. This list is a superset of noProxy and values injected by AKS. - * - * @return the effectiveNoProxy value. - */ - public List<String> effectiveNoProxy() { - return this.effectiveNoProxy; - } - /** * Get the trustedCa property: Alternative CA cert to use for connecting to proxy servers. * @@ -145,28 +123,6 @@ public ManagedClusterHttpProxyConfig withTrustedCa(String trustedCa) { return this; } - /** - * Get the enabled property: Whether to enable HTTP proxy. When disabled, the specified proxy configuration will be - * not be set on pods and nodes. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable HTTP proxy. When disabled, the specified proxy configuration will be - * not be set on pods and nodes. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterHttpProxyConfig object itself. - */ - public ManagedClusterHttpProxyConfig withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - /** * Validates the instance. * @@ -185,7 +141,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("httpsProxy", this.httpsProxy); jsonWriter.writeArrayField("noProxy", this.noProxy, (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("trustedCa", this.trustedCa); - jsonWriter.writeBooleanField("enabled", this.enabled); return jsonWriter.writeEndObject(); } @@ -212,13 +167,8 @@ public static ManagedClusterHttpProxyConfig fromJson(JsonReader jsonReader) thro } else if ("noProxy".equals(fieldName)) { List<String> noProxy = reader.readArray(reader1 -> reader1.getString()); deserializedManagedClusterHttpProxyConfig.noProxy = noProxy; - } else if ("effectiveNoProxy".equals(fieldName)) { - List<String> effectiveNoProxy = reader.readArray(reader1 -> reader1.getString()); - deserializedManagedClusterHttpProxyConfig.effectiveNoProxy = effectiveNoProxy; } else if ("trustedCa".equals(fieldName)) { deserializedManagedClusterHttpProxyConfig.trustedCa = reader.getString(); - } else if ("enabled".equals(fieldName)) { - deserializedManagedClusterHttpProxyConfig.enabled = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressDefaultDomainProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressDefaultDomainProfile.java deleted file mode 100644 index eba21319e109..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressDefaultDomainProfile.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ManagedClusterIngressDefaultDomainProfile model. - */ -@Fluent -public final class ManagedClusterIngressDefaultDomainProfile - implements JsonSerializable<ManagedClusterIngressDefaultDomainProfile> { - /* - * Whether to enable Default Domain. - */ - private Boolean enabled; - - /* - * The unique fully qualified domain name assigned to the cluster. This will not change even if disabled then - * reenabled. - */ - private String domainName; - - /** - * Creates an instance of ManagedClusterIngressDefaultDomainProfile class. - */ - public ManagedClusterIngressDefaultDomainProfile() { - } - - /** - * Get the enabled property: Whether to enable Default Domain. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable Default Domain. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterIngressDefaultDomainProfile object itself. - */ - public ManagedClusterIngressDefaultDomainProfile withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the domainName property: The unique fully qualified domain name assigned to the cluster. This will not change - * even if disabled then reenabled. - * - * @return the domainName value. - */ - public String domainName() { - return this.domainName; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterIngressDefaultDomainProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterIngressDefaultDomainProfile if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedClusterIngressDefaultDomainProfile. - */ - public static ManagedClusterIngressDefaultDomainProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterIngressDefaultDomainProfile deserializedManagedClusterIngressDefaultDomainProfile - = new ManagedClusterIngressDefaultDomainProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterIngressDefaultDomainProfile.enabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("domainName".equals(fieldName)) { - deserializedManagedClusterIngressDefaultDomainProfile.domainName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterIngressDefaultDomainProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java index 520a17b83eab..ce50126d08fe 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java @@ -17,20 +17,11 @@ @Fluent public final class ManagedClusterIngressProfile implements JsonSerializable<ManagedClusterIngressProfile> { /* - * Settings for the managed Gateway API installation - */ - private ManagedClusterIngressProfileGatewayConfiguration gatewayApi; - - /* - * Web App Routing settings for the ingress profile. + * App Routing settings for the ingress profile. You can find an overview and onboarding guide for this feature at + * https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. */ private ManagedClusterIngressProfileWebAppRouting webAppRouting; - /* - * Settings for the managed Application Load Balancer installation - */ - private ManagedClusterIngressProfileApplicationLoadBalancer applicationLoadBalancer; - /** * Creates an instance of ManagedClusterIngressProfile class. */ @@ -38,27 +29,9 @@ public ManagedClusterIngressProfile() { } /** - * Get the gatewayApi property: Settings for the managed Gateway API installation. - * - * @return the gatewayApi value. - */ - public ManagedClusterIngressProfileGatewayConfiguration gatewayApi() { - return this.gatewayApi; - } - - /** - * Set the gatewayApi property: Settings for the managed Gateway API installation. - * - * @param gatewayApi the gatewayApi value to set. - * @return the ManagedClusterIngressProfile object itself. - */ - public ManagedClusterIngressProfile withGatewayApi(ManagedClusterIngressProfileGatewayConfiguration gatewayApi) { - this.gatewayApi = gatewayApi; - return this; - } - - /** - * Get the webAppRouting property: Web App Routing settings for the ingress profile. + * Get the webAppRouting property: App Routing settings for the ingress profile. You can find an overview and + * onboarding guide for this feature at + * https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. * * @return the webAppRouting value. */ @@ -67,7 +40,9 @@ public ManagedClusterIngressProfileWebAppRouting webAppRouting() { } /** - * Set the webAppRouting property: Web App Routing settings for the ingress profile. + * Set the webAppRouting property: App Routing settings for the ingress profile. You can find an overview and + * onboarding guide for this feature at + * https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. * * @param webAppRouting the webAppRouting value to set. * @return the ManagedClusterIngressProfile object itself. @@ -77,42 +52,15 @@ public ManagedClusterIngressProfile withWebAppRouting(ManagedClusterIngressProfi return this; } - /** - * Get the applicationLoadBalancer property: Settings for the managed Application Load Balancer installation. - * - * @return the applicationLoadBalancer value. - */ - public ManagedClusterIngressProfileApplicationLoadBalancer applicationLoadBalancer() { - return this.applicationLoadBalancer; - } - - /** - * Set the applicationLoadBalancer property: Settings for the managed Application Load Balancer installation. - * - * @param applicationLoadBalancer the applicationLoadBalancer value to set. - * @return the ManagedClusterIngressProfile object itself. - */ - public ManagedClusterIngressProfile - withApplicationLoadBalancer(ManagedClusterIngressProfileApplicationLoadBalancer applicationLoadBalancer) { - this.applicationLoadBalancer = applicationLoadBalancer; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (gatewayApi() != null) { - gatewayApi().validate(); - } if (webAppRouting() != null) { webAppRouting().validate(); } - if (applicationLoadBalancer() != null) { - applicationLoadBalancer().validate(); - } } /** @@ -121,9 +69,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("gatewayAPI", this.gatewayApi); jsonWriter.writeJsonField("webAppRouting", this.webAppRouting); - jsonWriter.writeJsonField("applicationLoadBalancer", this.applicationLoadBalancer); return jsonWriter.writeEndObject(); } @@ -142,15 +88,9 @@ public static ManagedClusterIngressProfile fromJson(JsonReader jsonReader) throw String fieldName = reader.getFieldName(); reader.nextToken(); - if ("gatewayAPI".equals(fieldName)) { - deserializedManagedClusterIngressProfile.gatewayApi - = ManagedClusterIngressProfileGatewayConfiguration.fromJson(reader); - } else if ("webAppRouting".equals(fieldName)) { + if ("webAppRouting".equals(fieldName)) { deserializedManagedClusterIngressProfile.webAppRouting = ManagedClusterIngressProfileWebAppRouting.fromJson(reader); - } else if ("applicationLoadBalancer".equals(fieldName)) { - deserializedManagedClusterIngressProfile.applicationLoadBalancer - = ManagedClusterIngressProfileApplicationLoadBalancer.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileApplicationLoadBalancer.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileApplicationLoadBalancer.java deleted file mode 100644 index a39ec9318922..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileApplicationLoadBalancer.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Application Load Balancer settings for the ingress profile. - */ -@Fluent -public final class ManagedClusterIngressProfileApplicationLoadBalancer - implements JsonSerializable<ManagedClusterIngressProfileApplicationLoadBalancer> { - /* - * Whether to enable Application Load Balancer. - */ - private Boolean enabled; - - /* - * Managed identity of the Application Load Balancer add-on. This is the identity that should be granted permissions - * to manage the associated Application Gateway for Containers resource. - */ - private UserAssignedIdentity identity; - - /** - * Creates an instance of ManagedClusterIngressProfileApplicationLoadBalancer class. - */ - public ManagedClusterIngressProfileApplicationLoadBalancer() { - } - - /** - * Get the enabled property: Whether to enable Application Load Balancer. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable Application Load Balancer. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterIngressProfileApplicationLoadBalancer object itself. - */ - public ManagedClusterIngressProfileApplicationLoadBalancer withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the identity property: Managed identity of the Application Load Balancer add-on. This is the identity that - * should be granted permissions to manage the associated Application Gateway for Containers resource. - * - * @return the identity value. - */ - public UserAssignedIdentity identity() { - return this.identity; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterIngressProfileApplicationLoadBalancer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterIngressProfileApplicationLoadBalancer if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedClusterIngressProfileApplicationLoadBalancer. - */ - public static ManagedClusterIngressProfileApplicationLoadBalancer fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterIngressProfileApplicationLoadBalancer deserializedManagedClusterIngressProfileApplicationLoadBalancer - = new ManagedClusterIngressProfileApplicationLoadBalancer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterIngressProfileApplicationLoadBalancer.enabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("identity".equals(fieldName)) { - deserializedManagedClusterIngressProfileApplicationLoadBalancer.identity - = UserAssignedIdentity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterIngressProfileApplicationLoadBalancer; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileGatewayConfiguration.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileGatewayConfiguration.java deleted file mode 100644 index d76887801802..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileGatewayConfiguration.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ManagedClusterIngressProfileGatewayConfiguration model. - */ -@Fluent -public final class ManagedClusterIngressProfileGatewayConfiguration - implements JsonSerializable<ManagedClusterIngressProfileGatewayConfiguration> { - /* - * Configuration for the managed Gateway API installation. If not specified, the default is 'Disabled'. See - * https://aka.ms/k8s-gateway-api for more details. - */ - private ManagedGatewayType installation; - - /** - * Creates an instance of ManagedClusterIngressProfileGatewayConfiguration class. - */ - public ManagedClusterIngressProfileGatewayConfiguration() { - } - - /** - * Get the installation property: Configuration for the managed Gateway API installation. If not specified, the - * default is 'Disabled'. See https://aka.ms/k8s-gateway-api for more details. - * - * @return the installation value. - */ - public ManagedGatewayType installation() { - return this.installation; - } - - /** - * Set the installation property: Configuration for the managed Gateway API installation. If not specified, the - * default is 'Disabled'. See https://aka.ms/k8s-gateway-api for more details. - * - * @param installation the installation value to set. - * @return the ManagedClusterIngressProfileGatewayConfiguration object itself. - */ - public ManagedClusterIngressProfileGatewayConfiguration withInstallation(ManagedGatewayType installation) { - this.installation = installation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("installation", this.installation == null ? null : this.installation.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterIngressProfileGatewayConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterIngressProfileGatewayConfiguration if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedClusterIngressProfileGatewayConfiguration. - */ - public static ManagedClusterIngressProfileGatewayConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterIngressProfileGatewayConfiguration deserializedManagedClusterIngressProfileGatewayConfiguration - = new ManagedClusterIngressProfileGatewayConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("installation".equals(fieldName)) { - deserializedManagedClusterIngressProfileGatewayConfiguration.installation - = ManagedGatewayType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterIngressProfileGatewayConfiguration; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java index 26711124b9ab..7c7ac44b3702 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java @@ -13,20 +13,20 @@ import java.util.List; /** - * Web App Routing settings for the ingress profile. + * Application Routing add-on settings for the ingress profile. */ @Fluent public final class ManagedClusterIngressProfileWebAppRouting implements JsonSerializable<ManagedClusterIngressProfileWebAppRouting> { /* - * Whether to enable Web App Routing. + * Whether to enable the Application Routing add-on. */ private Boolean enabled; /* - * Resource IDs of the DNS zones to be associated with the Web App Routing add-on. Used only when Web App Routing is - * enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be in - * the same resource group and all private DNS zones must be in the same resource group. + * Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application + * Routing add-on is enabled. Public and private DNS zones can be in different resource groups, but all public DNS + * zones must be in the same resource group and all private DNS zones must be in the same resource group. */ private List<String> dnsZoneResourceIds; @@ -37,15 +37,8 @@ public final class ManagedClusterIngressProfileWebAppRouting private ManagedClusterIngressProfileNginx nginx; /* - * Configuration for the Default Domain. This is a unique, autogenerated domain that comes with a signed TLS - * Certificate allowing for secure HTTPS. See [the Default Domain documentation](https://aka.ms/aks/defaultdomain) - * for more instructions. - */ - private ManagedClusterIngressDefaultDomainProfile defaultDomain; - - /* - * Managed identity of the Web Application Routing add-on. This is the identity that should be granted permissions, - * for example, to manage the associated Azure DNS resource and get certificates from Azure Key Vault. See [this + * Managed identity of the Application Routing add-on. This is the identity that should be granted permissions, for + * example, to manage the associated Azure DNS resource and get certificates from Azure Key Vault. See [this * overview of the add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) for more * instructions. */ @@ -58,7 +51,7 @@ public ManagedClusterIngressProfileWebAppRouting() { } /** - * Get the enabled property: Whether to enable Web App Routing. + * Get the enabled property: Whether to enable the Application Routing add-on. * * @return the enabled value. */ @@ -67,7 +60,7 @@ public Boolean enabled() { } /** - * Set the enabled property: Whether to enable Web App Routing. + * Set the enabled property: Whether to enable the Application Routing add-on. * * @param enabled the enabled value to set. * @return the ManagedClusterIngressProfileWebAppRouting object itself. @@ -78,10 +71,10 @@ public ManagedClusterIngressProfileWebAppRouting withEnabled(Boolean enabled) { } /** - * Get the dnsZoneResourceIds property: Resource IDs of the DNS zones to be associated with the Web App Routing - * add-on. Used only when Web App Routing is enabled. Public and private DNS zones can be in different resource - * groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in the same - * resource group. + * Get the dnsZoneResourceIds property: Resource IDs of the DNS zones to be associated with the Application Routing + * add-on. Used only when Application Routing add-on is enabled. Public and private DNS zones can be in different + * resource groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in + * the same resource group. * * @return the dnsZoneResourceIds value. */ @@ -90,10 +83,10 @@ public List<String> dnsZoneResourceIds() { } /** - * Set the dnsZoneResourceIds property: Resource IDs of the DNS zones to be associated with the Web App Routing - * add-on. Used only when Web App Routing is enabled. Public and private DNS zones can be in different resource - * groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in the same - * resource group. + * Set the dnsZoneResourceIds property: Resource IDs of the DNS zones to be associated with the Application Routing + * add-on. Used only when Application Routing add-on is enabled. Public and private DNS zones can be in different + * resource groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in + * the same resource group. * * @param dnsZoneResourceIds the dnsZoneResourceIds value to set. * @return the ManagedClusterIngressProfileWebAppRouting object itself. @@ -126,34 +119,9 @@ public ManagedClusterIngressProfileWebAppRouting withNginx(ManagedClusterIngress } /** - * Get the defaultDomain property: Configuration for the Default Domain. This is a unique, autogenerated domain that - * comes with a signed TLS Certificate allowing for secure HTTPS. See [the Default Domain - * documentation](https://aka.ms/aks/defaultdomain) for more instructions. - * - * @return the defaultDomain value. - */ - public ManagedClusterIngressDefaultDomainProfile defaultDomain() { - return this.defaultDomain; - } - - /** - * Set the defaultDomain property: Configuration for the Default Domain. This is a unique, autogenerated domain that - * comes with a signed TLS Certificate allowing for secure HTTPS. See [the Default Domain - * documentation](https://aka.ms/aks/defaultdomain) for more instructions. - * - * @param defaultDomain the defaultDomain value to set. - * @return the ManagedClusterIngressProfileWebAppRouting object itself. - */ - public ManagedClusterIngressProfileWebAppRouting - withDefaultDomain(ManagedClusterIngressDefaultDomainProfile defaultDomain) { - this.defaultDomain = defaultDomain; - return this; - } - - /** - * Get the identity property: Managed identity of the Web Application Routing add-on. This is the identity that - * should be granted permissions, for example, to manage the associated Azure DNS resource and get certificates from - * Azure Key Vault. See [this overview of the + * Get the identity property: Managed identity of the Application Routing add-on. This is the identity that should + * be granted permissions, for example, to manage the associated Azure DNS resource and get certificates from Azure + * Key Vault. See [this overview of the * add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) for more instructions. * * @return the identity value. @@ -171,9 +139,6 @@ public void validate() { if (nginx() != null) { nginx().validate(); } - if (defaultDomain() != null) { - defaultDomain().validate(); - } if (identity() != null) { identity().validate(); } @@ -189,7 +154,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("dnsZoneResourceIds", this.dnsZoneResourceIds, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("nginx", this.nginx); - jsonWriter.writeJsonField("defaultDomain", this.defaultDomain); return jsonWriter.writeEndObject(); } @@ -218,9 +182,6 @@ public static ManagedClusterIngressProfileWebAppRouting fromJson(JsonReader json } else if ("nginx".equals(fieldName)) { deserializedManagedClusterIngressProfileWebAppRouting.nginx = ManagedClusterIngressProfileNginx.fromJson(reader); - } else if ("defaultDomain".equals(fieldName)) { - deserializedManagedClusterIngressProfileWebAppRouting.defaultDomain - = ManagedClusterIngressDefaultDomainProfile.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedManagedClusterIngressProfileWebAppRouting.identity = UserAssignedIdentity.fromJson(reader); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java index baf286e7877c..b01a7427e97b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java @@ -59,11 +59,6 @@ public final class ManagedClusterLoadBalancerProfile implements JsonSerializable */ private BackendPoolType backendPoolType; - /* - * The health probing behavior for External Traffic Policy Cluster services. - */ - private ClusterServiceLoadBalancerHealthProbeMode clusterServiceLoadBalancerHealthProbeMode; - /** * Creates an instance of ManagedClusterLoadBalancerProfile class. */ @@ -228,29 +223,6 @@ public ManagedClusterLoadBalancerProfile withBackendPoolType(BackendPoolType bac return this; } - /** - * Get the clusterServiceLoadBalancerHealthProbeMode property: The health probing behavior for External Traffic - * Policy Cluster services. - * - * @return the clusterServiceLoadBalancerHealthProbeMode value. - */ - public ClusterServiceLoadBalancerHealthProbeMode clusterServiceLoadBalancerHealthProbeMode() { - return this.clusterServiceLoadBalancerHealthProbeMode; - } - - /** - * Set the clusterServiceLoadBalancerHealthProbeMode property: The health probing behavior for External Traffic - * Policy Cluster services. - * - * @param clusterServiceLoadBalancerHealthProbeMode the clusterServiceLoadBalancerHealthProbeMode value to set. - * @return the ManagedClusterLoadBalancerProfile object itself. - */ - public ManagedClusterLoadBalancerProfile withClusterServiceLoadBalancerHealthProbeMode( - ClusterServiceLoadBalancerHealthProbeMode clusterServiceLoadBalancerHealthProbeMode) { - this.clusterServiceLoadBalancerHealthProbeMode = clusterServiceLoadBalancerHealthProbeMode; - return this; - } - /** * Validates the instance. * @@ -285,10 +257,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("enableMultipleStandardLoadBalancers", this.enableMultipleStandardLoadBalancers); jsonWriter.writeStringField("backendPoolType", this.backendPoolType == null ? null : this.backendPoolType.toString()); - jsonWriter.writeStringField("clusterServiceLoadBalancerHealthProbeMode", - this.clusterServiceLoadBalancerHealthProbeMode == null - ? null - : this.clusterServiceLoadBalancerHealthProbeMode.toString()); return jsonWriter.writeEndObject(); } @@ -333,9 +301,6 @@ public static ManagedClusterLoadBalancerProfile fromJson(JsonReader jsonReader) } else if ("backendPoolType".equals(fieldName)) { deserializedManagedClusterLoadBalancerProfile.backendPoolType = BackendPoolType.fromString(reader.getString()); - } else if ("clusterServiceLoadBalancerHealthProbeMode".equals(fieldName)) { - deserializedManagedClusterLoadBalancerProfile.clusterServiceLoadBalancerHealthProbeMode - = ClusterServiceLoadBalancerHealthProbeMode.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java index f2f87355b2c3..e3485eccdee3 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java @@ -18,7 +18,8 @@ public final class ManagedClusterNodeResourceGroupProfile implements JsonSerializable<ManagedClusterNodeResourceGroupProfile> { /* - * The restriction level applied to the cluster's node resource group + * The restriction level applied to the cluster's node resource group. If not specified, the default is + * 'Unrestricted' */ private RestrictionLevel restrictionLevel; @@ -29,7 +30,8 @@ public ManagedClusterNodeResourceGroupProfile() { } /** - * Get the restrictionLevel property: The restriction level applied to the cluster's node resource group. + * Get the restrictionLevel property: The restriction level applied to the cluster's node resource group. If not + * specified, the default is 'Unrestricted'. * * @return the restrictionLevel value. */ @@ -38,7 +40,8 @@ public RestrictionLevel restrictionLevel() { } /** - * Set the restrictionLevel property: The restriction level applied to the cluster's node resource group. + * Set the restrictionLevel property: The restriction level applied to the cluster's node resource group. If not + * specified, the default is 'Unrestricted'. * * @param restrictionLevel the restrictionLevel value to set. * @return the ManagedClusterNodeResourceGroupProfile object itself. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java index eae4c357b603..433b50af7fe1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java @@ -38,11 +38,6 @@ public final class ManagedClusterPoolUpgradeProfile implements JsonSerializable< */ private List<ManagedClusterPoolUpgradeProfileUpgradesItem> upgrades; - /* - * List of components grouped by kubernetes major.minor version. - */ - private List<ComponentsByRelease> componentsByReleases; - /** * Creates an instance of ManagedClusterPoolUpgradeProfile class. */ @@ -129,26 +124,6 @@ public ManagedClusterPoolUpgradeProfile withUpgrades(List<ManagedClusterPoolUpgr return this; } - /** - * Get the componentsByReleases property: List of components grouped by kubernetes major.minor version. - * - * @return the componentsByReleases value. - */ - public List<ComponentsByRelease> componentsByReleases() { - return this.componentsByReleases; - } - - /** - * Set the componentsByReleases property: List of components grouped by kubernetes major.minor version. - * - * @param componentsByReleases the componentsByReleases value to set. - * @return the ManagedClusterPoolUpgradeProfile object itself. - */ - public ManagedClusterPoolUpgradeProfile withComponentsByReleases(List<ComponentsByRelease> componentsByReleases) { - this.componentsByReleases = componentsByReleases; - return this; - } - /** * Validates the instance. * @@ -168,9 +143,6 @@ public void validate() { if (upgrades() != null) { upgrades().forEach(e -> e.validate()); } - if (componentsByReleases() != null) { - componentsByReleases().forEach(e -> e.validate()); - } } private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterPoolUpgradeProfile.class); @@ -185,8 +157,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); jsonWriter.writeStringField("name", this.name); jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("componentsByReleases", this.componentsByReleases, - (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -217,10 +187,6 @@ public static ManagedClusterPoolUpgradeProfile fromJson(JsonReader jsonReader) t List<ManagedClusterPoolUpgradeProfileUpgradesItem> upgrades = reader.readArray(reader1 -> ManagedClusterPoolUpgradeProfileUpgradesItem.fromJson(reader1)); deserializedManagedClusterPoolUpgradeProfile.upgrades = upgrades; - } else if ("componentsByReleases".equals(fieldName)) { - List<ComponentsByRelease> componentsByReleases - = reader.readArray(reader1 -> ComponentsByRelease.fromJson(reader1)); - deserializedManagedClusterPoolUpgradeProfile.componentsByReleases = componentsByReleases; } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java index 4d37910b753d..57acd9ecdb9e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java @@ -27,11 +27,6 @@ public final class ManagedClusterPoolUpgradeProfileUpgradesItem */ private Boolean isPreview; - /* - * Whether the Kubernetes version is out of support. - */ - private Boolean isOutOfSupport; - /** * Creates an instance of ManagedClusterPoolUpgradeProfileUpgradesItem class. */ @@ -78,26 +73,6 @@ public ManagedClusterPoolUpgradeProfileUpgradesItem withIsPreview(Boolean isPrev return this; } - /** - * Get the isOutOfSupport property: Whether the Kubernetes version is out of support. - * - * @return the isOutOfSupport value. - */ - public Boolean isOutOfSupport() { - return this.isOutOfSupport; - } - - /** - * Set the isOutOfSupport property: Whether the Kubernetes version is out of support. - * - * @param isOutOfSupport the isOutOfSupport value to set. - * @return the ManagedClusterPoolUpgradeProfileUpgradesItem object itself. - */ - public ManagedClusterPoolUpgradeProfileUpgradesItem withIsOutOfSupport(Boolean isOutOfSupport) { - this.isOutOfSupport = isOutOfSupport; - return this; - } - /** * Validates the instance. * @@ -114,7 +89,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); jsonWriter.writeBooleanField("isPreview", this.isPreview); - jsonWriter.writeBooleanField("isOutOfSupport", this.isOutOfSupport); return jsonWriter.writeEndObject(); } @@ -139,9 +113,6 @@ public static ManagedClusterPoolUpgradeProfileUpgradesItem fromJson(JsonReader j } else if ("isPreview".equals(fieldName)) { deserializedManagedClusterPoolUpgradeProfileUpgradesItem.isPreview = reader.getNullable(JsonReader::getBoolean); - } else if ("isOutOfSupport".equals(fieldName)) { - deserializedManagedClusterPoolUpgradeProfileUpgradesItem.isOutOfSupport - = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java index a5efa904d57b..b4e194a1ef21 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java @@ -45,8 +45,9 @@ public final class ManagedClusterPropertiesAutoScalerProfile private Boolean ignoreDaemonsetsUtilization; /* - * Type of node group expander to be used in scale up. Set to be deprecated, please use 'expanders' flag in the - * future. Available values are: 'least-waste', 'most-pods', 'priority', 'random'. + * The expander to use when scaling up. If not specified, the default is 'random'. See + * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + * for more information. */ private Expander expander; @@ -250,8 +251,9 @@ public Boolean ignoreDaemonsetsUtilization() { } /** - * Get the expander property: Type of node group expander to be used in scale up. Set to be deprecated, please use - * 'expanders' flag in the future. Available values are: 'least-waste', 'most-pods', 'priority', 'random'. + * Get the expander property: The expander to use when scaling up. If not specified, the default is 'random'. See + * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + * for more information. * * @return the expander value. */ @@ -260,8 +262,9 @@ public Expander expander() { } /** - * Set the expander property: Type of node group expander to be used in scale up. Set to be deprecated, please use - * 'expanders' flag in the future. Available values are: 'least-waste', 'most-pods', 'priority', 'random'. + * Set the expander property: The expander to use when scaling up. If not specified, the default is 'random'. See + * [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + * for more information. * * @param expander the expander value to set. * @return the ManagedClusterPropertiesAutoScalerProfile object itself. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesForSnapshot.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesForSnapshot.java deleted file mode 100644 index f9398bd28eb3..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesForSnapshot.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * managed cluster properties for snapshot, these properties are read only. - */ -@Fluent -public final class ManagedClusterPropertiesForSnapshot - implements JsonSerializable<ManagedClusterPropertiesForSnapshot> { - /* - * The current kubernetes version. - */ - private String kubernetesVersion; - - /* - * The current managed cluster sku. - */ - private ManagedClusterSku sku; - - /* - * Whether the cluster has enabled Kubernetes Role-Based Access Control or not. - */ - private Boolean enableRbac; - - /* - * The current network profile. - */ - private NetworkProfileForSnapshot networkProfile; - - /** - * Creates an instance of ManagedClusterPropertiesForSnapshot class. - */ - public ManagedClusterPropertiesForSnapshot() { - } - - /** - * Get the kubernetesVersion property: The current kubernetes version. - * - * @return the kubernetesVersion value. - */ - public String kubernetesVersion() { - return this.kubernetesVersion; - } - - /** - * Set the kubernetesVersion property: The current kubernetes version. - * - * @param kubernetesVersion the kubernetesVersion value to set. - * @return the ManagedClusterPropertiesForSnapshot object itself. - */ - public ManagedClusterPropertiesForSnapshot withKubernetesVersion(String kubernetesVersion) { - this.kubernetesVersion = kubernetesVersion; - return this; - } - - /** - * Get the sku property: The current managed cluster sku. - * - * @return the sku value. - */ - public ManagedClusterSku sku() { - return this.sku; - } - - /** - * Set the sku property: The current managed cluster sku. - * - * @param sku the sku value to set. - * @return the ManagedClusterPropertiesForSnapshot object itself. - */ - public ManagedClusterPropertiesForSnapshot withSku(ManagedClusterSku sku) { - this.sku = sku; - return this; - } - - /** - * Get the enableRbac property: Whether the cluster has enabled Kubernetes Role-Based Access Control or not. - * - * @return the enableRbac value. - */ - public Boolean enableRbac() { - return this.enableRbac; - } - - /** - * Set the enableRbac property: Whether the cluster has enabled Kubernetes Role-Based Access Control or not. - * - * @param enableRbac the enableRbac value to set. - * @return the ManagedClusterPropertiesForSnapshot object itself. - */ - public ManagedClusterPropertiesForSnapshot withEnableRbac(Boolean enableRbac) { - this.enableRbac = enableRbac; - return this; - } - - /** - * Get the networkProfile property: The current network profile. - * - * @return the networkProfile value. - */ - public NetworkProfileForSnapshot networkProfile() { - return this.networkProfile; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() != null) { - sku().validate(); - } - if (networkProfile() != null) { - networkProfile().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); - jsonWriter.writeJsonField("sku", this.sku); - jsonWriter.writeBooleanField("enableRbac", this.enableRbac); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterPropertiesForSnapshot from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterPropertiesForSnapshot if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedClusterPropertiesForSnapshot. - */ - public static ManagedClusterPropertiesForSnapshot fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterPropertiesForSnapshot deserializedManagedClusterPropertiesForSnapshot - = new ManagedClusterPropertiesForSnapshot(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("kubernetesVersion".equals(fieldName)) { - deserializedManagedClusterPropertiesForSnapshot.kubernetesVersion = reader.getString(); - } else if ("sku".equals(fieldName)) { - deserializedManagedClusterPropertiesForSnapshot.sku = ManagedClusterSku.fromJson(reader); - } else if ("enableRbac".equals(fieldName)) { - deserializedManagedClusterPropertiesForSnapshot.enableRbac - = reader.getNullable(JsonReader::getBoolean); - } else if ("networkProfile".equals(fieldName)) { - deserializedManagedClusterPropertiesForSnapshot.networkProfile - = NetworkProfileForSnapshot.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterPropertiesForSnapshot; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java index ab06dd7b7009..014323f743dc 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java @@ -28,12 +28,6 @@ public final class ManagedClusterSecurityProfile implements JsonSerializable<Man */ private AzureKeyVaultKms azureKeyVaultKms; - /* - * Encryption at rest of Kubernetes resource objects. More information on this can be found under - * https://aka.ms/aks/kubernetesResourceObjectEncryption - */ - private KubernetesResourceObjectEncryptionProfile kubernetesResourceObjectEncryptionProfile; - /* * Workload identity settings for the security profile. Workload identity enables Kubernetes applications to access * Azure cloud resources securely with Azure AD. See https://aka.ms/aks/wi for more details. @@ -45,20 +39,6 @@ public final class ManagedClusterSecurityProfile implements JsonSerializable<Man */ private ManagedClusterSecurityProfileImageCleaner imageCleaner; - /* - * Image integrity is a feature that works with Azure Policy to verify image integrity by signature. This will not - * have any effect unless Azure Policy is applied to enforce image signatures. See - * https://aka.ms/aks/image-integrity for how to use this feature via policy. - */ - private ManagedClusterSecurityProfileImageIntegrity imageIntegrity; - - /* - * [Node - * Restriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) - * settings for the security profile. - */ - private ManagedClusterSecurityProfileNodeRestriction nodeRestriction; - /* * A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more * information see [Custom CA Trust @@ -114,29 +94,6 @@ public ManagedClusterSecurityProfile withAzureKeyVaultKms(AzureKeyVaultKms azure return this; } - /** - * Get the kubernetesResourceObjectEncryptionProfile property: Encryption at rest of Kubernetes resource objects. - * More information on this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. - * - * @return the kubernetesResourceObjectEncryptionProfile value. - */ - public KubernetesResourceObjectEncryptionProfile kubernetesResourceObjectEncryptionProfile() { - return this.kubernetesResourceObjectEncryptionProfile; - } - - /** - * Set the kubernetesResourceObjectEncryptionProfile property: Encryption at rest of Kubernetes resource objects. - * More information on this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. - * - * @param kubernetesResourceObjectEncryptionProfile the kubernetesResourceObjectEncryptionProfile value to set. - * @return the ManagedClusterSecurityProfile object itself. - */ - public ManagedClusterSecurityProfile withKubernetesResourceObjectEncryptionProfile( - KubernetesResourceObjectEncryptionProfile kubernetesResourceObjectEncryptionProfile) { - this.kubernetesResourceObjectEncryptionProfile = kubernetesResourceObjectEncryptionProfile; - return this; - } - /** * Get the workloadIdentity property: Workload identity settings for the security profile. Workload identity enables * Kubernetes applications to access Azure cloud resources securely with Azure AD. See https://aka.ms/aks/wi for @@ -182,56 +139,6 @@ public ManagedClusterSecurityProfile withImageCleaner(ManagedClusterSecurityProf return this; } - /** - * Get the imageIntegrity property: Image integrity is a feature that works with Azure Policy to verify image - * integrity by signature. This will not have any effect unless Azure Policy is applied to enforce image signatures. - * See https://aka.ms/aks/image-integrity for how to use this feature via policy. - * - * @return the imageIntegrity value. - */ - public ManagedClusterSecurityProfileImageIntegrity imageIntegrity() { - return this.imageIntegrity; - } - - /** - * Set the imageIntegrity property: Image integrity is a feature that works with Azure Policy to verify image - * integrity by signature. This will not have any effect unless Azure Policy is applied to enforce image signatures. - * See https://aka.ms/aks/image-integrity for how to use this feature via policy. - * - * @param imageIntegrity the imageIntegrity value to set. - * @return the ManagedClusterSecurityProfile object itself. - */ - public ManagedClusterSecurityProfile - withImageIntegrity(ManagedClusterSecurityProfileImageIntegrity imageIntegrity) { - this.imageIntegrity = imageIntegrity; - return this; - } - - /** - * Get the nodeRestriction property: [Node - * Restriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) - * settings for the security profile. - * - * @return the nodeRestriction value. - */ - public ManagedClusterSecurityProfileNodeRestriction nodeRestriction() { - return this.nodeRestriction; - } - - /** - * Set the nodeRestriction property: [Node - * Restriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) - * settings for the security profile. - * - * @param nodeRestriction the nodeRestriction value to set. - * @return the ManagedClusterSecurityProfile object itself. - */ - public ManagedClusterSecurityProfile - withNodeRestriction(ManagedClusterSecurityProfileNodeRestriction nodeRestriction) { - this.nodeRestriction = nodeRestriction; - return this; - } - /** * Get the customCATrustCertificates property: A list of up to 10 base64 encoded CAs that will be added to the trust * store on all nodes in the cluster. For more information see [Custom CA Trust @@ -268,21 +175,12 @@ public void validate() { if (azureKeyVaultKms() != null) { azureKeyVaultKms().validate(); } - if (kubernetesResourceObjectEncryptionProfile() != null) { - kubernetesResourceObjectEncryptionProfile().validate(); - } if (workloadIdentity() != null) { workloadIdentity().validate(); } if (imageCleaner() != null) { imageCleaner().validate(); } - if (imageIntegrity() != null) { - imageIntegrity().validate(); - } - if (nodeRestriction() != null) { - nodeRestriction().validate(); - } } /** @@ -293,12 +191,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("defender", this.defender); jsonWriter.writeJsonField("azureKeyVaultKms", this.azureKeyVaultKms); - jsonWriter.writeJsonField("kubernetesResourceObjectEncryptionProfile", - this.kubernetesResourceObjectEncryptionProfile); jsonWriter.writeJsonField("workloadIdentity", this.workloadIdentity); jsonWriter.writeJsonField("imageCleaner", this.imageCleaner); - jsonWriter.writeJsonField("imageIntegrity", this.imageIntegrity); - jsonWriter.writeJsonField("nodeRestriction", this.nodeRestriction); jsonWriter.writeArrayField("customCATrustCertificates", this.customCATrustCertificates, (writer, element) -> writer.writeBinary(element)); return jsonWriter.writeEndObject(); @@ -325,21 +219,12 @@ public static ManagedClusterSecurityProfile fromJson(JsonReader jsonReader) thro = ManagedClusterSecurityProfileDefender.fromJson(reader); } else if ("azureKeyVaultKms".equals(fieldName)) { deserializedManagedClusterSecurityProfile.azureKeyVaultKms = AzureKeyVaultKms.fromJson(reader); - } else if ("kubernetesResourceObjectEncryptionProfile".equals(fieldName)) { - deserializedManagedClusterSecurityProfile.kubernetesResourceObjectEncryptionProfile - = KubernetesResourceObjectEncryptionProfile.fromJson(reader); } else if ("workloadIdentity".equals(fieldName)) { deserializedManagedClusterSecurityProfile.workloadIdentity = ManagedClusterSecurityProfileWorkloadIdentity.fromJson(reader); } else if ("imageCleaner".equals(fieldName)) { deserializedManagedClusterSecurityProfile.imageCleaner = ManagedClusterSecurityProfileImageCleaner.fromJson(reader); - } else if ("imageIntegrity".equals(fieldName)) { - deserializedManagedClusterSecurityProfile.imageIntegrity - = ManagedClusterSecurityProfileImageIntegrity.fromJson(reader); - } else if ("nodeRestriction".equals(fieldName)) { - deserializedManagedClusterSecurityProfile.nodeRestriction - = ManagedClusterSecurityProfileNodeRestriction.fromJson(reader); } else if ("customCATrustCertificates".equals(fieldName)) { List<byte[]> customCATrustCertificates = reader.readArray(reader1 -> reader1.getBinary()); deserializedManagedClusterSecurityProfile.customCATrustCertificates = customCATrustCertificates; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java index ad3b2f80545c..78e8613b9bdb 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java @@ -29,13 +29,6 @@ public final class ManagedClusterSecurityProfileDefender */ private ManagedClusterSecurityProfileDefenderSecurityMonitoring securityMonitoring; - /* - * Microsoft Defender settings for security gating, validates container images eligibility for deployment based on - * Defender for Containers security findings. Using Admission Controller, it either audits or prevents the - * deployment of images that do not meet security standards. - */ - private ManagedClusterSecurityProfileDefenderSecurityGating securityGating; - /** * Creates an instance of ManagedClusterSecurityProfileDefender class. */ @@ -90,31 +83,6 @@ public ManagedClusterSecurityProfileDefenderSecurityMonitoring securityMonitorin return this; } - /** - * Get the securityGating property: Microsoft Defender settings for security gating, validates container images - * eligibility for deployment based on Defender for Containers security findings. Using Admission Controller, it - * either audits or prevents the deployment of images that do not meet security standards. - * - * @return the securityGating value. - */ - public ManagedClusterSecurityProfileDefenderSecurityGating securityGating() { - return this.securityGating; - } - - /** - * Set the securityGating property: Microsoft Defender settings for security gating, validates container images - * eligibility for deployment based on Defender for Containers security findings. Using Admission Controller, it - * either audits or prevents the deployment of images that do not meet security standards. - * - * @param securityGating the securityGating value to set. - * @return the ManagedClusterSecurityProfileDefender object itself. - */ - public ManagedClusterSecurityProfileDefender - withSecurityGating(ManagedClusterSecurityProfileDefenderSecurityGating securityGating) { - this.securityGating = securityGating; - return this; - } - /** * Validates the instance. * @@ -124,9 +92,6 @@ public void validate() { if (securityMonitoring() != null) { securityMonitoring().validate(); } - if (securityGating() != null) { - securityGating().validate(); - } } /** @@ -137,7 +102,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("logAnalyticsWorkspaceResourceId", this.logAnalyticsWorkspaceResourceId); jsonWriter.writeJsonField("securityMonitoring", this.securityMonitoring); - jsonWriter.writeJsonField("securityGating", this.securityGating); return jsonWriter.writeEndObject(); } @@ -163,9 +127,6 @@ public static ManagedClusterSecurityProfileDefender fromJson(JsonReader jsonRead } else if ("securityMonitoring".equals(fieldName)) { deserializedManagedClusterSecurityProfileDefender.securityMonitoring = ManagedClusterSecurityProfileDefenderSecurityMonitoring.fromJson(reader); - } else if ("securityGating".equals(fieldName)) { - deserializedManagedClusterSecurityProfileDefender.securityGating - = ManagedClusterSecurityProfileDefenderSecurityGating.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGating.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGating.java deleted file mode 100644 index 92847ad182fb..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGating.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Microsoft Defender settings for security gating, validates container images eligibility for deployment based on - * Defender for Containers security findings. Using Admission Controller, it either audits or prevents the deployment of - * images that do not meet security standards. - */ -@Fluent -public final class ManagedClusterSecurityProfileDefenderSecurityGating - implements JsonSerializable<ManagedClusterSecurityProfileDefenderSecurityGating> { - /* - * Whether to enable Defender security gating. When enabled, the gating feature will scan container images and audit - * or block the deployment of images that do not meet security standards according to the configured security rules. - */ - private Boolean enabled; - - /* - * List of identities that the admission controller will make use of in order to pull security artifacts from the - * registry. These are the same identities used by the cluster to pull container images. Each identity provided - * should have federated identity credential attached to it. - */ - private List<ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem> identities; - - /* - * In use only while registry access granted by secret rather than managed identity. Set whether to grant the - * Defender gating agent access to the cluster's secrets for pulling images from registries. If secret access is - * denied and the registry requires pull secrets, the add-on will not perform any image validation. Default value is - * false. - */ - private Boolean allowSecretAccess; - - /** - * Creates an instance of ManagedClusterSecurityProfileDefenderSecurityGating class. - */ - public ManagedClusterSecurityProfileDefenderSecurityGating() { - } - - /** - * Get the enabled property: Whether to enable Defender security gating. When enabled, the gating feature will scan - * container images and audit or block the deployment of images that do not meet security standards according to the - * configured security rules. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable Defender security gating. When enabled, the gating feature will scan - * container images and audit or block the deployment of images that do not meet security standards according to the - * configured security rules. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterSecurityProfileDefenderSecurityGating object itself. - */ - public ManagedClusterSecurityProfileDefenderSecurityGating withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the identities property: List of identities that the admission controller will make use of in order to pull - * security artifacts from the registry. These are the same identities used by the cluster to pull container images. - * Each identity provided should have federated identity credential attached to it. - * - * @return the identities value. - */ - public List<ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem> identities() { - return this.identities; - } - - /** - * Set the identities property: List of identities that the admission controller will make use of in order to pull - * security artifacts from the registry. These are the same identities used by the cluster to pull container images. - * Each identity provided should have federated identity credential attached to it. - * - * @param identities the identities value to set. - * @return the ManagedClusterSecurityProfileDefenderSecurityGating object itself. - */ - public ManagedClusterSecurityProfileDefenderSecurityGating - withIdentities(List<ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem> identities) { - this.identities = identities; - return this; - } - - /** - * Get the allowSecretAccess property: In use only while registry access granted by secret rather than managed - * identity. Set whether to grant the Defender gating agent access to the cluster's secrets for pulling images from - * registries. If secret access is denied and the registry requires pull secrets, the add-on will not perform any - * image validation. Default value is false. - * - * @return the allowSecretAccess value. - */ - public Boolean allowSecretAccess() { - return this.allowSecretAccess; - } - - /** - * Set the allowSecretAccess property: In use only while registry access granted by secret rather than managed - * identity. Set whether to grant the Defender gating agent access to the cluster's secrets for pulling images from - * registries. If secret access is denied and the registry requires pull secrets, the add-on will not perform any - * image validation. Default value is false. - * - * @param allowSecretAccess the allowSecretAccess value to set. - * @return the ManagedClusterSecurityProfileDefenderSecurityGating object itself. - */ - public ManagedClusterSecurityProfileDefenderSecurityGating withAllowSecretAccess(Boolean allowSecretAccess) { - this.allowSecretAccess = allowSecretAccess; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identities() != null) { - identities().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeArrayField("identities", this.identities, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeBooleanField("allowSecretAccess", this.allowSecretAccess); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterSecurityProfileDefenderSecurityGating from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterSecurityProfileDefenderSecurityGating if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedClusterSecurityProfileDefenderSecurityGating. - */ - public static ManagedClusterSecurityProfileDefenderSecurityGating fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterSecurityProfileDefenderSecurityGating deserializedManagedClusterSecurityProfileDefenderSecurityGating - = new ManagedClusterSecurityProfileDefenderSecurityGating(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterSecurityProfileDefenderSecurityGating.enabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("identities".equals(fieldName)) { - List<ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem> identities - = reader.readArray(reader1 -> ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem - .fromJson(reader1)); - deserializedManagedClusterSecurityProfileDefenderSecurityGating.identities = identities; - } else if ("allowSecretAccess".equals(fieldName)) { - deserializedManagedClusterSecurityProfileDefenderSecurityGating.allowSecretAccess - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterSecurityProfileDefenderSecurityGating; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.java deleted file mode 100644 index 1029c3faa92c..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem model. - */ -@Fluent -public final class ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem - implements JsonSerializable<ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem> { - /* - * The container registry for which the identity will be used; the identity specified here should have a federated - * identity credential attached to it. - */ - private String azureContainerRegistry; - - /* - * The identity object used to access the registry - */ - private UserAssignedIdentity identity; - - /** - * Creates an instance of ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem class. - */ - public ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem() { - } - - /** - * Get the azureContainerRegistry property: The container registry for which the identity will be used; the identity - * specified here should have a federated identity credential attached to it. - * - * @return the azureContainerRegistry value. - */ - public String azureContainerRegistry() { - return this.azureContainerRegistry; - } - - /** - * Set the azureContainerRegistry property: The container registry for which the identity will be used; the identity - * specified here should have a federated identity credential attached to it. - * - * @param azureContainerRegistry the azureContainerRegistry value to set. - * @return the ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem object itself. - */ - public ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem - withAzureContainerRegistry(String azureContainerRegistry) { - this.azureContainerRegistry = azureContainerRegistry; - return this; - } - - /** - * Get the identity property: The identity object used to access the registry. - * - * @return the identity value. - */ - public UserAssignedIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity object used to access the registry. - * - * @param identity the identity value to set. - * @return the ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem object itself. - */ - public ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem - withIdentity(UserAssignedIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("azureContainerRegistry", this.azureContainerRegistry); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem if the JsonReader was - * pointing to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem. - */ - public static ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem deserializedManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem - = new ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("azureContainerRegistry".equals(fieldName)) { - deserializedManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.azureContainerRegistry - = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.identity - = UserAssignedIdentity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageIntegrity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageIntegrity.java deleted file mode 100644 index 65ce8f74d785..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageIntegrity.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Image integrity related settings for the security profile. - */ -@Fluent -public final class ManagedClusterSecurityProfileImageIntegrity - implements JsonSerializable<ManagedClusterSecurityProfileImageIntegrity> { - /* - * Whether to enable image integrity. The default value is false. - */ - private Boolean enabled; - - /** - * Creates an instance of ManagedClusterSecurityProfileImageIntegrity class. - */ - public ManagedClusterSecurityProfileImageIntegrity() { - } - - /** - * Get the enabled property: Whether to enable image integrity. The default value is false. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable image integrity. The default value is false. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterSecurityProfileImageIntegrity object itself. - */ - public ManagedClusterSecurityProfileImageIntegrity withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterSecurityProfileImageIntegrity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterSecurityProfileImageIntegrity if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedClusterSecurityProfileImageIntegrity. - */ - public static ManagedClusterSecurityProfileImageIntegrity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterSecurityProfileImageIntegrity deserializedManagedClusterSecurityProfileImageIntegrity - = new ManagedClusterSecurityProfileImageIntegrity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterSecurityProfileImageIntegrity.enabled - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterSecurityProfileImageIntegrity; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileNodeRestriction.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileNodeRestriction.java deleted file mode 100644 index ae296c00861b..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileNodeRestriction.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Node Restriction settings for the security profile. - */ -@Fluent -public final class ManagedClusterSecurityProfileNodeRestriction - implements JsonSerializable<ManagedClusterSecurityProfileNodeRestriction> { - /* - * Whether to enable Node Restriction - */ - private Boolean enabled; - - /** - * Creates an instance of ManagedClusterSecurityProfileNodeRestriction class. - */ - public ManagedClusterSecurityProfileNodeRestriction() { - } - - /** - * Get the enabled property: Whether to enable Node Restriction. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether to enable Node Restriction. - * - * @param enabled the enabled value to set. - * @return the ManagedClusterSecurityProfileNodeRestriction object itself. - */ - public ManagedClusterSecurityProfileNodeRestriction withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterSecurityProfileNodeRestriction from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterSecurityProfileNodeRestriction if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedClusterSecurityProfileNodeRestriction. - */ - public static ManagedClusterSecurityProfileNodeRestriction fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterSecurityProfileNodeRestriction deserializedManagedClusterSecurityProfileNodeRestriction - = new ManagedClusterSecurityProfileNodeRestriction(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedClusterSecurityProfileNodeRestriction.enabled - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterSecurityProfileNodeRestriction; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSnapshotListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSnapshotListResult.java deleted file mode 100644 index c424e9052a9e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSnapshotListResult.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterSnapshotInner; -import java.io.IOException; -import java.util.List; - -/** - * The response from the List Managed Cluster Snapshots operation. - */ -@Fluent -public final class ManagedClusterSnapshotListResult implements JsonSerializable<ManagedClusterSnapshotListResult> { - /* - * The list of managed cluster snapshots. - */ - private List<ManagedClusterSnapshotInner> value; - - /* - * The URL to get the next set of managed cluster snapshot results. - */ - private String nextLink; - - /** - * Creates an instance of ManagedClusterSnapshotListResult class. - */ - public ManagedClusterSnapshotListResult() { - } - - /** - * Get the value property: The list of managed cluster snapshots. - * - * @return the value value. - */ - public List<ManagedClusterSnapshotInner> value() { - return this.value; - } - - /** - * Set the value property: The list of managed cluster snapshots. - * - * @param value the value value to set. - * @return the ManagedClusterSnapshotListResult object itself. - */ - public ManagedClusterSnapshotListResult withValue(List<ManagedClusterSnapshotInner> value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of managed cluster snapshot results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedClusterSnapshotListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedClusterSnapshotListResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedClusterSnapshotListResult. - */ - public static ManagedClusterSnapshotListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedClusterSnapshotListResult deserializedManagedClusterSnapshotListResult - = new ManagedClusterSnapshotListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List<ManagedClusterSnapshotInner> value - = reader.readArray(reader1 -> ManagedClusterSnapshotInner.fromJson(reader1)); - deserializedManagedClusterSnapshotListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedManagedClusterSnapshotListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedClusterSnapshotListResult; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java index ccb43c95014c..7a94fabab0c8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java @@ -22,11 +22,6 @@ public final class ManagedClusterStorageProfileDiskCsiDriver */ private Boolean enabled; - /* - * The version of AzureDisk CSI Driver. The default value is v1. - */ - private String version; - /** * Creates an instance of ManagedClusterStorageProfileDiskCsiDriver class. */ @@ -53,26 +48,6 @@ public ManagedClusterStorageProfileDiskCsiDriver withEnabled(Boolean enabled) { return this; } - /** - * Get the version property: The version of AzureDisk CSI Driver. The default value is v1. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: The version of AzureDisk CSI Driver. The default value is v1. - * - * @param version the version value to set. - * @return the ManagedClusterStorageProfileDiskCsiDriver object itself. - */ - public ManagedClusterStorageProfileDiskCsiDriver withVersion(String version) { - this.version = version; - return this; - } - /** * Validates the instance. * @@ -88,7 +63,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeStringField("version", this.version); return jsonWriter.writeEndObject(); } @@ -111,8 +85,6 @@ public static ManagedClusterStorageProfileDiskCsiDriver fromJson(JsonReader json if ("enabled".equals(fieldName)) { deserializedManagedClusterStorageProfileDiskCsiDriver.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("version".equals(fieldName)) { - deserializedManagedClusterStorageProfileDiskCsiDriver.version = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java index b1d3f03a048c..c8824d320110 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java @@ -23,7 +23,7 @@ public final class ManagedClusterWorkloadAutoScalerProfile private ManagedClusterWorkloadAutoScalerProfileKeda keda; /* - * The verticalPodAutoscaler property. + * VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. */ private ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler verticalPodAutoscaler; @@ -54,7 +54,8 @@ public ManagedClusterWorkloadAutoScalerProfile withKeda(ManagedClusterWorkloadAu } /** - * Get the verticalPodAutoscaler property: The verticalPodAutoscaler property. + * Get the verticalPodAutoscaler property: VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler + * profile. * * @return the verticalPodAutoscaler value. */ @@ -63,7 +64,8 @@ public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler verticalPodA } /** - * Set the verticalPodAutoscaler property: The verticalPodAutoscaler property. + * Set the verticalPodAutoscaler property: VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler + * profile. * * @param verticalPodAutoscaler the verticalPodAutoscaler value to set. * @return the ManagedClusterWorkloadAutoScalerProfile object itself. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java index 01c22f2e3d84..391810a872f1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java @@ -12,21 +12,16 @@ import java.io.IOException; /** - * The ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler model. + * VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. */ @Fluent public final class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler implements JsonSerializable<ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler> { /* - * Whether to enable VPA add-on in cluster. Default value is false. + * Whether to enable VPA. Default value is false. */ private boolean enabled; - /* - * Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. - */ - private AddonAutoscaling addonAutoscaling; - /** * Creates an instance of ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler class. */ @@ -34,7 +29,7 @@ public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler() { } /** - * Get the enabled property: Whether to enable VPA add-on in cluster. Default value is false. + * Get the enabled property: Whether to enable VPA. Default value is false. * * @return the enabled value. */ @@ -43,7 +38,7 @@ public boolean enabled() { } /** - * Set the enabled property: Whether to enable VPA add-on in cluster. Default value is false. + * Set the enabled property: Whether to enable VPA. Default value is false. * * @param enabled the enabled value to set. * @return the ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler object itself. @@ -53,27 +48,6 @@ public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler withEnabled( return this; } - /** - * Get the addonAutoscaling property: Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. - * - * @return the addonAutoscaling value. - */ - public AddonAutoscaling addonAutoscaling() { - return this.addonAutoscaling; - } - - /** - * Set the addonAutoscaling property: Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. - * - * @param addonAutoscaling the addonAutoscaling value to set. - * @return the ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler object itself. - */ - public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler - withAddonAutoscaling(AddonAutoscaling addonAutoscaling) { - this.addonAutoscaling = addonAutoscaling; - return this; - } - /** * Validates the instance. * @@ -89,8 +63,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeStringField("addonAutoscaling", - this.addonAutoscaling == null ? null : this.addonAutoscaling.toString()); return jsonWriter.writeEndObject(); } @@ -116,9 +88,6 @@ public static ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler fromJ if ("enabled".equals(fieldName)) { deserializedManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.enabled = reader.getBoolean(); - } else if ("addonAutoscaling".equals(fieldName)) { - deserializedManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.addonAutoscaling - = AddonAutoscaling.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedGatewayType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedGatewayType.java deleted file mode 100644 index f12707fc5b6b..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedGatewayType.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Configuration for the managed Gateway API installation. If not specified, the default is 'Disabled'. See - * https://aka.ms/k8s-gateway-api for more details. - */ -public final class ManagedGatewayType extends ExpandableStringEnum<ManagedGatewayType> { - /** - * Static value Disabled for ManagedGatewayType. - */ - public static final ManagedGatewayType DISABLED = fromString("Disabled"); - - /** - * Static value Standard for ManagedGatewayType. - */ - public static final ManagedGatewayType STANDARD = fromString("Standard"); - - /** - * Creates a new instance of ManagedGatewayType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedGatewayType() { - } - - /** - * Creates or finds a ManagedGatewayType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedGatewayType. - */ - public static ManagedGatewayType fromString(String name) { - return fromString(name, ManagedGatewayType.class); - } - - /** - * Gets known ManagedGatewayType values. - * - * @return known ManagedGatewayType values. - */ - public static Collection<ManagedGatewayType> values() { - return values(ManagedGatewayType.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProperties.java deleted file mode 100644 index dc08ab89ace1..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProperties.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Mesh membership properties of a managed cluster. - */ -@Fluent -public final class MeshMembershipProperties implements JsonSerializable<MeshMembershipProperties> { - /* - * The current provisioning state of the Mesh Membership. - */ - private MeshMembershipProvisioningState provisioningState; - - /* - * The ARM resource id for the managed mesh member. This is of the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{ - * appLinkName}/appLinkMembers/{appLinkMemberName}'. Visit https://aka.ms/applink for more information. - */ - private String managedMeshId; - - /** - * Creates an instance of MeshMembershipProperties class. - */ - public MeshMembershipProperties() { - } - - /** - * Get the provisioningState property: The current provisioning state of the Mesh Membership. - * - * @return the provisioningState value. - */ - public MeshMembershipProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the managedMeshId property: The ARM resource id for the managed mesh member. This is of the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{appLinkName}/appLinkMembers/{appLinkMemberName}'. - * Visit https://aka.ms/applink for more information. - * - * @return the managedMeshId value. - */ - public String managedMeshId() { - return this.managedMeshId; - } - - /** - * Set the managedMeshId property: The ARM resource id for the managed mesh member. This is of the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{appLinkName}/appLinkMembers/{appLinkMemberName}'. - * Visit https://aka.ms/applink for more information. - * - * @param managedMeshId the managedMeshId value to set. - * @return the MeshMembershipProperties object itself. - */ - public MeshMembershipProperties withManagedMeshId(String managedMeshId) { - this.managedMeshId = managedMeshId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (managedMeshId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property managedMeshId in model MeshMembershipProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MeshMembershipProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("managedMeshID", this.managedMeshId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MeshMembershipProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MeshMembershipProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MeshMembershipProperties. - */ - public static MeshMembershipProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MeshMembershipProperties deserializedMeshMembershipProperties = new MeshMembershipProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("managedMeshID".equals(fieldName)) { - deserializedMeshMembershipProperties.managedMeshId = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedMeshMembershipProperties.provisioningState - = MeshMembershipProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMeshMembershipProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProvisioningState.java deleted file mode 100644 index ab03b199aed9..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProvisioningState.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The provisioning state of the last accepted operation. - */ -public final class MeshMembershipProvisioningState extends ExpandableStringEnum<MeshMembershipProvisioningState> { - /** - * Static value Canceled for MeshMembershipProvisioningState. - */ - public static final MeshMembershipProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Creating for MeshMembershipProvisioningState. - */ - public static final MeshMembershipProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Deleting for MeshMembershipProvisioningState. - */ - public static final MeshMembershipProvisioningState DELETING = fromString("Deleting"); - - /** - * Static value Failed for MeshMembershipProvisioningState. - */ - public static final MeshMembershipProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Succeeded for MeshMembershipProvisioningState. - */ - public static final MeshMembershipProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Updating for MeshMembershipProvisioningState. - */ - public static final MeshMembershipProvisioningState UPDATING = fromString("Updating"); - - /** - * Creates a new instance of MeshMembershipProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MeshMembershipProvisioningState() { - } - - /** - * Creates or finds a MeshMembershipProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding MeshMembershipProvisioningState. - */ - public static MeshMembershipProvisioningState fromString(String name) { - return fromString(name, MeshMembershipProvisioningState.class); - } - - /** - * Gets known MeshMembershipProvisioningState values. - * - * @return known MeshMembershipProvisioningState values. - */ - public static Collection<MeshMembershipProvisioningState> values() { - return values(MeshMembershipProvisioningState.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipsListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipsListResult.java deleted file mode 100644 index 8702c4098ab1..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipsListResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.fluent.models.MeshMembershipInner; -import java.io.IOException; -import java.util.List; - -/** - * The result of a request to list mesh memberships in a managed cluster. - */ -@Fluent -public final class MeshMembershipsListResult implements JsonSerializable<MeshMembershipsListResult> { - /* - * The list of mesh memberships. - */ - private List<MeshMembershipInner> value; - - /* - * The URL to get the next set of mesh membership results. - */ - private String nextLink; - - /** - * Creates an instance of MeshMembershipsListResult class. - */ - public MeshMembershipsListResult() { - } - - /** - * Get the value property: The list of mesh memberships. - * - * @return the value value. - */ - public List<MeshMembershipInner> value() { - return this.value; - } - - /** - * Set the value property: The list of mesh memberships. - * - * @param value the value value to set. - * @return the MeshMembershipsListResult object itself. - */ - public MeshMembershipsListResult withValue(List<MeshMembershipInner> value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of mesh membership results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MeshMembershipsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MeshMembershipsListResult if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MeshMembershipsListResult. - */ - public static MeshMembershipsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MeshMembershipsListResult deserializedMeshMembershipsListResult = new MeshMembershipsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List<MeshMembershipInner> value - = reader.readArray(reader1 -> MeshMembershipInner.fromJson(reader1)); - deserializedMeshMembershipsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedMeshMembershipsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMeshMembershipsListResult; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Mode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Mode.java deleted file mode 100644 index 89f007301d6e..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Mode.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). - */ -public final class Mode extends ExpandableStringEnum<Mode> { - /** - * Static value IPTABLES for Mode. - */ - public static final Mode IPTABLES = fromString("IPTABLES"); - - /** - * Static value IPVS for Mode. - */ - public static final Mode IPVS = fromString("IPVS"); - - /** - * Static value NFTABLES for Mode. - */ - public static final Mode NFTABLES = fromString("NFTABLES"); - - /** - * Creates a new instance of Mode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Mode() { - } - - /** - * Creates or finds a Mode from its string representation. - * - * @param name a name to look for. - * @return the corresponding Mode. - */ - public static Mode fromString(String name) { - return fromString(name, Mode.class); - } - - /** - * Gets known Mode values. - * - * @return known Mode values. - */ - public static Collection<Mode> values() { - return values(Mode.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfileForSnapshot.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfileForSnapshot.java deleted file mode 100644 index df9b9e8601f6..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfileForSnapshot.java +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * network profile for managed cluster snapshot, these properties are read only. - */ -@Fluent -public final class NetworkProfileForSnapshot implements JsonSerializable<NetworkProfileForSnapshot> { - /* - * networkPlugin for managed cluster snapshot. - */ - private NetworkPlugin networkPlugin; - - /* - * NetworkPluginMode for managed cluster snapshot. - */ - private NetworkPluginMode networkPluginMode; - - /* - * networkPolicy for managed cluster snapshot. - */ - private NetworkPolicy networkPolicy; - - /* - * networkMode for managed cluster snapshot. - */ - private NetworkMode networkMode; - - /* - * loadBalancerSku for managed cluster snapshot. - */ - private LoadBalancerSku loadBalancerSku; - - /** - * Creates an instance of NetworkProfileForSnapshot class. - */ - public NetworkProfileForSnapshot() { - } - - /** - * Get the networkPlugin property: networkPlugin for managed cluster snapshot. - * - * @return the networkPlugin value. - */ - public NetworkPlugin networkPlugin() { - return this.networkPlugin; - } - - /** - * Set the networkPlugin property: networkPlugin for managed cluster snapshot. - * - * @param networkPlugin the networkPlugin value to set. - * @return the NetworkProfileForSnapshot object itself. - */ - public NetworkProfileForSnapshot withNetworkPlugin(NetworkPlugin networkPlugin) { - this.networkPlugin = networkPlugin; - return this; - } - - /** - * Get the networkPluginMode property: NetworkPluginMode for managed cluster snapshot. - * - * @return the networkPluginMode value. - */ - public NetworkPluginMode networkPluginMode() { - return this.networkPluginMode; - } - - /** - * Set the networkPluginMode property: NetworkPluginMode for managed cluster snapshot. - * - * @param networkPluginMode the networkPluginMode value to set. - * @return the NetworkProfileForSnapshot object itself. - */ - public NetworkProfileForSnapshot withNetworkPluginMode(NetworkPluginMode networkPluginMode) { - this.networkPluginMode = networkPluginMode; - return this; - } - - /** - * Get the networkPolicy property: networkPolicy for managed cluster snapshot. - * - * @return the networkPolicy value. - */ - public NetworkPolicy networkPolicy() { - return this.networkPolicy; - } - - /** - * Set the networkPolicy property: networkPolicy for managed cluster snapshot. - * - * @param networkPolicy the networkPolicy value to set. - * @return the NetworkProfileForSnapshot object itself. - */ - public NetworkProfileForSnapshot withNetworkPolicy(NetworkPolicy networkPolicy) { - this.networkPolicy = networkPolicy; - return this; - } - - /** - * Get the networkMode property: networkMode for managed cluster snapshot. - * - * @return the networkMode value. - */ - public NetworkMode networkMode() { - return this.networkMode; - } - - /** - * Set the networkMode property: networkMode for managed cluster snapshot. - * - * @param networkMode the networkMode value to set. - * @return the NetworkProfileForSnapshot object itself. - */ - public NetworkProfileForSnapshot withNetworkMode(NetworkMode networkMode) { - this.networkMode = networkMode; - return this; - } - - /** - * Get the loadBalancerSku property: loadBalancerSku for managed cluster snapshot. - * - * @return the loadBalancerSku value. - */ - public LoadBalancerSku loadBalancerSku() { - return this.loadBalancerSku; - } - - /** - * Set the loadBalancerSku property: loadBalancerSku for managed cluster snapshot. - * - * @param loadBalancerSku the loadBalancerSku value to set. - * @return the NetworkProfileForSnapshot object itself. - */ - public NetworkProfileForSnapshot withLoadBalancerSku(LoadBalancerSku loadBalancerSku) { - this.loadBalancerSku = loadBalancerSku; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("networkPlugin", this.networkPlugin == null ? null : this.networkPlugin.toString()); - jsonWriter.writeStringField("networkPluginMode", - this.networkPluginMode == null ? null : this.networkPluginMode.toString()); - jsonWriter.writeStringField("networkPolicy", this.networkPolicy == null ? null : this.networkPolicy.toString()); - jsonWriter.writeStringField("networkMode", this.networkMode == null ? null : this.networkMode.toString()); - jsonWriter.writeStringField("loadBalancerSku", - this.loadBalancerSku == null ? null : this.loadBalancerSku.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkProfileForSnapshot from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkProfileForSnapshot if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkProfileForSnapshot. - */ - public static NetworkProfileForSnapshot fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkProfileForSnapshot deserializedNetworkProfileForSnapshot = new NetworkProfileForSnapshot(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("networkPlugin".equals(fieldName)) { - deserializedNetworkProfileForSnapshot.networkPlugin = NetworkPlugin.fromString(reader.getString()); - } else if ("networkPluginMode".equals(fieldName)) { - deserializedNetworkProfileForSnapshot.networkPluginMode - = NetworkPluginMode.fromString(reader.getString()); - } else if ("networkPolicy".equals(fieldName)) { - deserializedNetworkProfileForSnapshot.networkPolicy = NetworkPolicy.fromString(reader.getString()); - } else if ("networkMode".equals(fieldName)) { - deserializedNetworkProfileForSnapshot.networkMode = NetworkMode.fromString(reader.getString()); - } else if ("loadBalancerSku".equals(fieldName)) { - deserializedNetworkProfileForSnapshot.loadBalancerSku - = LoadBalancerSku.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkProfileForSnapshot; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeCustomizationProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeCustomizationProfile.java deleted file mode 100644 index 67592d6f63a9..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeCustomizationProfile.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Settings to determine the node customization used to provision nodes in a pool. - */ -@Fluent -public final class NodeCustomizationProfile implements JsonSerializable<NodeCustomizationProfile> { - /* - * The resource ID of the node customization resource to use. This can be a version. Omitting the version will use - * the latest version of the node customization. - */ - private String nodeCustomizationId; - - /** - * Creates an instance of NodeCustomizationProfile class. - */ - public NodeCustomizationProfile() { - } - - /** - * Get the nodeCustomizationId property: The resource ID of the node customization resource to use. This can be a - * version. Omitting the version will use the latest version of the node customization. - * - * @return the nodeCustomizationId value. - */ - public String nodeCustomizationId() { - return this.nodeCustomizationId; - } - - /** - * Set the nodeCustomizationId property: The resource ID of the node customization resource to use. This can be a - * version. Omitting the version will use the latest version of the node customization. - * - * @param nodeCustomizationId the nodeCustomizationId value to set. - * @return the NodeCustomizationProfile object itself. - */ - public NodeCustomizationProfile withNodeCustomizationId(String nodeCustomizationId) { - this.nodeCustomizationId = nodeCustomizationId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nodeCustomizationId", this.nodeCustomizationId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NodeCustomizationProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NodeCustomizationProfile if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NodeCustomizationProfile. - */ - public static NodeCustomizationProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NodeCustomizationProfile deserializedNodeCustomizationProfile = new NodeCustomizationProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nodeCustomizationId".equals(fieldName)) { - deserializedNodeCustomizationProfile.nodeCustomizationId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNodeCustomizationProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeImageVersionsListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeImageVersionsListResult.java deleted file mode 100644 index bd57042c4fe0..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeImageVersionsListResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.fluent.models.NodeImageVersionInner; -import java.io.IOException; -import java.util.List; - -/** - * Holds an array NodeImageVersions. - */ -@Fluent -public final class NodeImageVersionsListResult implements JsonSerializable<NodeImageVersionsListResult> { - /* - * Array of AKS Node Image versions. - */ - private List<NodeImageVersionInner> value; - - /* - * The URL to get the next set of machine results. - */ - private String nextLink; - - /** - * Creates an instance of NodeImageVersionsListResult class. - */ - public NodeImageVersionsListResult() { - } - - /** - * Get the value property: Array of AKS Node Image versions. - * - * @return the value value. - */ - public List<NodeImageVersionInner> value() { - return this.value; - } - - /** - * Set the value property: Array of AKS Node Image versions. - * - * @param value the value value to set. - * @return the NodeImageVersionsListResult object itself. - */ - public NodeImageVersionsListResult withValue(List<NodeImageVersionInner> value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of machine results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NodeImageVersionsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NodeImageVersionsListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NodeImageVersionsListResult. - */ - public static NodeImageVersionsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NodeImageVersionsListResult deserializedNodeImageVersionsListResult = new NodeImageVersionsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List<NodeImageVersionInner> value - = reader.readArray(reader1 -> NodeImageVersionInner.fromJson(reader1)); - deserializedNodeImageVersionsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNodeImageVersionsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNodeImageVersionsListResult; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java index 8c741e7ae4c4..8f9de197ee22 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java @@ -8,8 +8,7 @@ import java.util.Collection; /** - * Manner in which the OS on your nodes is updated. The default is Unmanaged, but may change to either NodeImage or - * SecurityPatch at GA. + * Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. */ public final class NodeOSUpgradeChannel extends ExpandableStringEnum<NodeOSUpgradeChannel> { /** @@ -23,14 +22,14 @@ public final class NodeOSUpgradeChannel extends ExpandableStringEnum<NodeOSUpgra public static final NodeOSUpgradeChannel UNMANAGED = fromString("Unmanaged"); /** - * Static value SecurityPatch for NodeOSUpgradeChannel. + * Static value NodeImage for NodeOSUpgradeChannel. */ - public static final NodeOSUpgradeChannel SECURITY_PATCH = fromString("SecurityPatch"); + public static final NodeOSUpgradeChannel NODE_IMAGE = fromString("NodeImage"); /** - * Static value NodeImage for NodeOSUpgradeChannel. + * Static value SecurityPatch for NodeOSUpgradeChannel. */ - public static final NodeOSUpgradeChannel NODE_IMAGE = fromString("NodeImage"); + public static final NodeOSUpgradeChannel SECURITY_PATCH = fromString("SecurityPatch"); /** * Creates a new instance of NodeOSUpgradeChannel value. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java index 6d32b394ca4a..988675bd21e2 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java @@ -8,8 +8,8 @@ import java.util.Collection; /** - * Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 - * if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. + * Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 + * when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. */ public final class OSSku extends ExpandableStringEnum<OSSku> { /** @@ -17,11 +17,6 @@ public final class OSSku extends ExpandableStringEnum<OSSku> { */ public static final OSSku UBUNTU = fromString("Ubuntu"); - /** - * Static value Mariner for OSSku. - */ - public static final OSSku MARINER = fromString("Mariner"); - /** * Static value AzureLinux for OSSku. */ @@ -32,11 +27,6 @@ public final class OSSku extends ExpandableStringEnum<OSSku> { */ public static final OSSku AZURE_LINUX3 = fromString("AzureLinux3"); - /** - * Static value Flatcar for OSSku. - */ - public static final OSSku FLATCAR = fromString("Flatcar"); - /** * Static value CBLMariner for OSSku. */ @@ -52,16 +42,6 @@ public final class OSSku extends ExpandableStringEnum<OSSku> { */ public static final OSSku WINDOWS2022 = fromString("Windows2022"); - /** - * Static value Windows2025 for OSSku. - */ - public static final OSSku WINDOWS2025 = fromString("Windows2025"); - - /** - * Static value WindowsAnnual for OSSku. - */ - public static final OSSku WINDOWS_ANNUAL = fromString("WindowsAnnual"); - /** * Static value Ubuntu2204 for OSSku. */ diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationStatusResultList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationStatusResultList.java deleted file mode 100644 index 6ee5edce05c9..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OperationStatusResultList.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.fluent.models.OperationStatusResultInner; -import java.io.IOException; -import java.util.List; - -/** - * The operations list. It contains an URL link to get the next set of results. - */ -@Immutable -public final class OperationStatusResultList implements JsonSerializable<OperationStatusResultList> { - /* - * List of operations - */ - private List<OperationStatusResultInner> value; - - /* - * URL to get the next set of operation list results (if there are any). - */ - private String nextLink; - - /** - * Creates an instance of OperationStatusResultList class. - */ - public OperationStatusResultList() { - } - - /** - * Get the value property: List of operations. - * - * @return the value value. - */ - public List<OperationStatusResultInner> value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next set of operation list results (if there are any). - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationStatusResultList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationStatusResultList if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationStatusResultList. - */ - public static OperationStatusResultList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationStatusResultList deserializedOperationStatusResultList = new OperationStatusResultList(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List<OperationStatusResultInner> value - = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); - deserializedOperationStatusResultList.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOperationStatusResultList.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationStatusResultList; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Operator.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Operator.java deleted file mode 100644 index 27748a54944a..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Operator.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * operator represents a key's relationship to a set of values. Valid operators are In and NotIn. - */ -public final class Operator extends ExpandableStringEnum<Operator> { - /** - * Static value In for Operator. - */ - public static final Operator IN = fromString("In"); - - /** - * Static value NotIn for Operator. - */ - public static final Operator NOT_IN = fromString("NotIn"); - - /** - * Static value Exists for Operator. - */ - public static final Operator EXISTS = fromString("Exists"); - - /** - * Static value DoesNotExist for Operator. - */ - public static final Operator DOES_NOT_EXIST = fromString("DoesNotExist"); - - /** - * Creates a new instance of Operator value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Operator() { - } - - /** - * Creates or finds a Operator from its string representation. - * - * @param name a name to look for. - * @return the corresponding Operator. - */ - public static Operator fromString(String name) { - return fromString(name, Operator.class); - } - - /** - * Gets known Operator values. - * - * @return known Operator values. - */ - public static Collection<Operator> values() { - return values(Operator.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodLinkLocalAccess.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodLinkLocalAccess.java deleted file mode 100644 index cef2262fdc22..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodLinkLocalAccess.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines access to special link local addresses (Azure Instance Metadata Service, aka IMDS) for pods with - * hostNetwork=false. If not specified, the default is 'IMDS'. - */ -public final class PodLinkLocalAccess extends ExpandableStringEnum<PodLinkLocalAccess> { - /** - * Static value IMDS for PodLinkLocalAccess. - */ - public static final PodLinkLocalAccess IMDS = fromString("IMDS"); - - /** - * Static value None for PodLinkLocalAccess. - */ - public static final PodLinkLocalAccess NONE = fromString("None"); - - /** - * Creates a new instance of PodLinkLocalAccess value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PodLinkLocalAccess() { - } - - /** - * Creates or finds a PodLinkLocalAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding PodLinkLocalAccess. - */ - public static PodLinkLocalAccess fromString(String name) { - return fromString(name, PodLinkLocalAccess.class); - } - - /** - * Gets known PodLinkLocalAccess values. - * - * @return known PodLinkLocalAccess values. - */ - public static Collection<PodLinkLocalAccess> values() { - return values(PodLinkLocalAccess.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ProxyRedirectionMechanism.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ProxyRedirectionMechanism.java deleted file mode 100644 index 24299d253630..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ProxyRedirectionMechanism.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Mode of traffic redirection. - */ -public final class ProxyRedirectionMechanism extends ExpandableStringEnum<ProxyRedirectionMechanism> { - /** - * Static value InitContainers for ProxyRedirectionMechanism. - */ - public static final ProxyRedirectionMechanism INIT_CONTAINERS = fromString("InitContainers"); - - /** - * Static value CNIChaining for ProxyRedirectionMechanism. - */ - public static final ProxyRedirectionMechanism CNICHAINING = fromString("CNIChaining"); - - /** - * Creates a new instance of ProxyRedirectionMechanism value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ProxyRedirectionMechanism() { - } - - /** - * Creates or finds a ProxyRedirectionMechanism from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProxyRedirectionMechanism. - */ - public static ProxyRedirectionMechanism fromString(String name) { - return fromString(name, ProxyRedirectionMechanism.class); - } - - /** - * Gets known ProxyRedirectionMechanism values. - * - * @return known ProxyRedirectionMechanism values. - */ - public static Collection<ProxyRedirectionMechanism> values() { - return values(ProxyRedirectionMechanism.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java index 2402a0e06db8..fbe44e756c02 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java @@ -21,11 +21,6 @@ public final class PublicNetworkAccess extends ExpandableStringEnum<PublicNetwor */ public static final PublicNetworkAccess DISABLED = fromString("Disabled"); - /** - * Static value SecuredByPerimeter for PublicNetworkAccess. - */ - public static final PublicNetworkAccess SECURED_BY_PERIMETER = fromString("SecuredByPerimeter"); - /** * Creates a new instance of PublicNetworkAccess value. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RebalanceLoadBalancersRequestBody.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RebalanceLoadBalancersRequestBody.java deleted file mode 100644 index 85d3aa6fe597..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RebalanceLoadBalancersRequestBody.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The names of the load balancers to rebalance. If set to empty, all load balancers will be rebalanced. - */ -@Fluent -public final class RebalanceLoadBalancersRequestBody implements JsonSerializable<RebalanceLoadBalancersRequestBody> { - /* - * The load balancer names list. - */ - private List<String> loadBalancerNames; - - /** - * Creates an instance of RebalanceLoadBalancersRequestBody class. - */ - public RebalanceLoadBalancersRequestBody() { - } - - /** - * Get the loadBalancerNames property: The load balancer names list. - * - * @return the loadBalancerNames value. - */ - public List<String> loadBalancerNames() { - return this.loadBalancerNames; - } - - /** - * Set the loadBalancerNames property: The load balancer names list. - * - * @param loadBalancerNames the loadBalancerNames value to set. - * @return the RebalanceLoadBalancersRequestBody object itself. - */ - public RebalanceLoadBalancersRequestBody withLoadBalancerNames(List<String> loadBalancerNames) { - this.loadBalancerNames = loadBalancerNames; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("loadBalancerNames", this.loadBalancerNames, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RebalanceLoadBalancersRequestBody from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RebalanceLoadBalancersRequestBody if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RebalanceLoadBalancersRequestBody. - */ - public static RebalanceLoadBalancersRequestBody fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RebalanceLoadBalancersRequestBody deserializedRebalanceLoadBalancersRequestBody - = new RebalanceLoadBalancersRequestBody(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("loadBalancerNames".equals(fieldName)) { - List<String> loadBalancerNames = reader.readArray(reader1 -> reader1.getString()); - deserializedRebalanceLoadBalancersRequestBody.loadBalancerNames = loadBalancerNames; - } else { - reader.skipChildren(); - } - } - - return deserializedRebalanceLoadBalancersRequestBody; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java index c97ef4a7fdbd..aa8addd1d0cf 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java @@ -23,7 +23,7 @@ public final class RelativeMonthlySchedule implements JsonSerializable<RelativeM private int intervalMonths; /* - * The week index. Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs. + * The week index. Specifies on which week of the month the dayOfWeek applies. */ private Type weekIndex; @@ -59,8 +59,7 @@ public RelativeMonthlySchedule withIntervalMonths(int intervalMonths) { } /** - * Get the weekIndex property: The week index. Specifies on which instance of the allowed days specified in - * daysOfWeek the maintenance occurs. + * Get the weekIndex property: The week index. Specifies on which week of the month the dayOfWeek applies. * * @return the weekIndex value. */ @@ -69,8 +68,7 @@ public Type weekIndex() { } /** - * Set the weekIndex property: The week index. Specifies on which instance of the allowed days specified in - * daysOfWeek the maintenance occurs. + * Set the weekIndex property: The week index. Specifies on which week of the month the dayOfWeek applies. * * @param weekIndex the weekIndex value to set. * @return the RelativeMonthlySchedule object itself. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java index 34833ca6a3e0..70664c2e4cac 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The restriction level applied to the cluster's node resource group. + * The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted'. */ public final class RestrictionLevel extends ExpandableStringEnum<RestrictionLevel> { /** diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsList.java deleted file mode 100644 index d806f3572976..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsList.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerservice.fluent.models.SafeguardsAvailableVersionInner; -import java.io.IOException; -import java.util.List; - -/** - * Hold values properties, which is array of SafeguardsVersions. - */ -@Fluent -public final class SafeguardsAvailableVersionsList implements JsonSerializable<SafeguardsAvailableVersionsList> { - /* - * Array of AKS supported Safeguards versions. - */ - private List<SafeguardsAvailableVersionInner> value; - - /* - * The URL to get the next Safeguards available version. - */ - private String nextLink; - - /** - * Creates an instance of SafeguardsAvailableVersionsList class. - */ - public SafeguardsAvailableVersionsList() { - } - - /** - * Get the value property: Array of AKS supported Safeguards versions. - * - * @return the value value. - */ - public List<SafeguardsAvailableVersionInner> value() { - return this.value; - } - - /** - * Set the value property: Array of AKS supported Safeguards versions. - * - * @param value the value value to set. - * @return the SafeguardsAvailableVersionsList object itself. - */ - public SafeguardsAvailableVersionsList withValue(List<SafeguardsAvailableVersionInner> value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next Safeguards available version. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SafeguardsAvailableVersionsList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SafeguardsAvailableVersionsList if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SafeguardsAvailableVersionsList. - */ - public static SafeguardsAvailableVersionsList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SafeguardsAvailableVersionsList deserializedSafeguardsAvailableVersionsList - = new SafeguardsAvailableVersionsList(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List<SafeguardsAvailableVersionInner> value - = reader.readArray(reader1 -> SafeguardsAvailableVersionInner.fromJson(reader1)); - deserializedSafeguardsAvailableVersionsList.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedSafeguardsAvailableVersionsList.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSafeguardsAvailableVersionsList; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsProperties.java deleted file mode 100644 index 8e3f29bd512f..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsProperties.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Whether the version is default or not and support info. - */ -@Immutable -public final class SafeguardsAvailableVersionsProperties - implements JsonSerializable<SafeguardsAvailableVersionsProperties> { - /* - * The isDefaultVersion property. - */ - private Boolean isDefaultVersion; - - /* - * Whether the version is preview or stable. - */ - private SafeguardsSupport support; - - /** - * Creates an instance of SafeguardsAvailableVersionsProperties class. - */ - public SafeguardsAvailableVersionsProperties() { - } - - /** - * Get the isDefaultVersion property: The isDefaultVersion property. - * - * @return the isDefaultVersion value. - */ - public Boolean isDefaultVersion() { - return this.isDefaultVersion; - } - - /** - * Get the support property: Whether the version is preview or stable. - * - * @return the support value. - */ - public SafeguardsSupport support() { - return this.support; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SafeguardsAvailableVersionsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SafeguardsAvailableVersionsProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SafeguardsAvailableVersionsProperties. - */ - public static SafeguardsAvailableVersionsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SafeguardsAvailableVersionsProperties deserializedSafeguardsAvailableVersionsProperties - = new SafeguardsAvailableVersionsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("isDefaultVersion".equals(fieldName)) { - deserializedSafeguardsAvailableVersionsProperties.isDefaultVersion - = reader.getNullable(JsonReader::getBoolean); - } else if ("support".equals(fieldName)) { - deserializedSafeguardsAvailableVersionsProperties.support - = SafeguardsSupport.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSafeguardsAvailableVersionsProperties; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsSupport.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsSupport.java deleted file mode 100644 index 797c2c7c429a..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsSupport.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Whether the version is preview or stable. - */ -public final class SafeguardsSupport extends ExpandableStringEnum<SafeguardsSupport> { - /** - * Static value Preview for SafeguardsSupport. - */ - public static final SafeguardsSupport PREVIEW = fromString("Preview"); - - /** - * Static value Stable for SafeguardsSupport. - */ - public static final SafeguardsSupport STABLE = fromString("Stable"); - - /** - * Creates a new instance of SafeguardsSupport value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SafeguardsSupport() { - } - - /** - * Creates or finds a SafeguardsSupport from its string representation. - * - * @param name a name to look for. - * @return the corresponding SafeguardsSupport. - */ - public static SafeguardsSupport fromString(String name) { - return fromString(name, SafeguardsSupport.class); - } - - /** - * Gets known SafeguardsSupport values. - * - * @return known SafeguardsSupport values. - */ - public static Collection<SafeguardsSupport> values() { - return values(SafeguardsSupport.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java index ecb2a1b91692..1796156c2698 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java @@ -22,11 +22,6 @@ public final class ScaleProfile implements JsonSerializable<ScaleProfile> { */ private List<ManualScaleProfile> manual; - /* - * Specifications on how to auto-scale the VirtualMachines agent pool within a predefined size range. - */ - private AutoScaleProfile autoscale; - /** * Creates an instance of ScaleProfile class. */ @@ -53,28 +48,6 @@ public ScaleProfile withManual(List<ManualScaleProfile> manual) { return this; } - /** - * Get the autoscale property: Specifications on how to auto-scale the VirtualMachines agent pool within a - * predefined size range. - * - * @return the autoscale value. - */ - public AutoScaleProfile autoscale() { - return this.autoscale; - } - - /** - * Set the autoscale property: Specifications on how to auto-scale the VirtualMachines agent pool within a - * predefined size range. - * - * @param autoscale the autoscale value to set. - * @return the ScaleProfile object itself. - */ - public ScaleProfile withAutoscale(AutoScaleProfile autoscale) { - this.autoscale = autoscale; - return this; - } - /** * Validates the instance. * @@ -84,9 +57,6 @@ public void validate() { if (manual() != null) { manual().forEach(e -> e.validate()); } - if (autoscale() != null) { - autoscale().validate(); - } } /** @@ -96,7 +66,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("manual", this.manual, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("autoscale", this.autoscale); return jsonWriter.writeEndObject(); } @@ -118,8 +87,6 @@ public static ScaleProfile fromJson(JsonReader jsonReader) throws IOException { if ("manual".equals(fieldName)) { List<ManualScaleProfile> manual = reader.readArray(reader1 -> ManualScaleProfile.fromJson(reader1)); deserializedScaleProfile.manual = manual; - } else if ("autoscale".equals(fieldName)) { - deserializedScaleProfile.autoscale = AutoScaleProfile.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerConfigMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerConfigMode.java deleted file mode 100644 index 9a803d31eb10..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerConfigMode.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The config customization mode for this scheduler instance. - */ -public final class SchedulerConfigMode extends ExpandableStringEnum<SchedulerConfigMode> { - /** - * Static value Default for SchedulerConfigMode. - */ - public static final SchedulerConfigMode DEFAULT = fromString("Default"); - - /** - * Static value ManagedByCRD for SchedulerConfigMode. - */ - public static final SchedulerConfigMode MANAGED_BY_CRD = fromString("ManagedByCRD"); - - /** - * Creates a new instance of SchedulerConfigMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SchedulerConfigMode() { - } - - /** - * Creates or finds a SchedulerConfigMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding SchedulerConfigMode. - */ - public static SchedulerConfigMode fromString(String name) { - return fromString(name, SchedulerConfigMode.class); - } - - /** - * Gets known SchedulerConfigMode values. - * - * @return known SchedulerConfigMode values. - */ - public static Collection<SchedulerConfigMode> values() { - return values(SchedulerConfigMode.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerInstanceProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerInstanceProfile.java deleted file mode 100644 index e76e78219620..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerInstanceProfile.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The scheduler profile for a single scheduler instance. - */ -@Fluent -public final class SchedulerInstanceProfile implements JsonSerializable<SchedulerInstanceProfile> { - /* - * The config customization mode for this scheduler instance. - */ - private SchedulerConfigMode schedulerConfigMode; - - /** - * Creates an instance of SchedulerInstanceProfile class. - */ - public SchedulerInstanceProfile() { - } - - /** - * Get the schedulerConfigMode property: The config customization mode for this scheduler instance. - * - * @return the schedulerConfigMode value. - */ - public SchedulerConfigMode schedulerConfigMode() { - return this.schedulerConfigMode; - } - - /** - * Set the schedulerConfigMode property: The config customization mode for this scheduler instance. - * - * @param schedulerConfigMode the schedulerConfigMode value to set. - * @return the SchedulerInstanceProfile object itself. - */ - public SchedulerInstanceProfile withSchedulerConfigMode(SchedulerConfigMode schedulerConfigMode) { - this.schedulerConfigMode = schedulerConfigMode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("schedulerConfigMode", - this.schedulerConfigMode == null ? null : this.schedulerConfigMode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SchedulerInstanceProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SchedulerInstanceProfile if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SchedulerInstanceProfile. - */ - public static SchedulerInstanceProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SchedulerInstanceProfile deserializedSchedulerInstanceProfile = new SchedulerInstanceProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("schedulerConfigMode".equals(fieldName)) { - deserializedSchedulerInstanceProfile.schedulerConfigMode - = SchedulerConfigMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSchedulerInstanceProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfile.java deleted file mode 100644 index 8ec16cb1c505..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfile.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The pod scheduler profile for the cluster. - */ -@Fluent -public final class SchedulerProfile implements JsonSerializable<SchedulerProfile> { - /* - * Mapping of each scheduler instance to its profile. - */ - private SchedulerProfileSchedulerInstanceProfiles schedulerInstanceProfiles; - - /** - * Creates an instance of SchedulerProfile class. - */ - public SchedulerProfile() { - } - - /** - * Get the schedulerInstanceProfiles property: Mapping of each scheduler instance to its profile. - * - * @return the schedulerInstanceProfiles value. - */ - public SchedulerProfileSchedulerInstanceProfiles schedulerInstanceProfiles() { - return this.schedulerInstanceProfiles; - } - - /** - * Set the schedulerInstanceProfiles property: Mapping of each scheduler instance to its profile. - * - * @param schedulerInstanceProfiles the schedulerInstanceProfiles value to set. - * @return the SchedulerProfile object itself. - */ - public SchedulerProfile - withSchedulerInstanceProfiles(SchedulerProfileSchedulerInstanceProfiles schedulerInstanceProfiles) { - this.schedulerInstanceProfiles = schedulerInstanceProfiles; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (schedulerInstanceProfiles() != null) { - schedulerInstanceProfiles().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("schedulerInstanceProfiles", this.schedulerInstanceProfiles); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SchedulerProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SchedulerProfile if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SchedulerProfile. - */ - public static SchedulerProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SchedulerProfile deserializedSchedulerProfile = new SchedulerProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("schedulerInstanceProfiles".equals(fieldName)) { - deserializedSchedulerProfile.schedulerInstanceProfiles - = SchedulerProfileSchedulerInstanceProfiles.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSchedulerProfile; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfileSchedulerInstanceProfiles.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfileSchedulerInstanceProfiles.java deleted file mode 100644 index 7ea490b5f166..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfileSchedulerInstanceProfiles.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Mapping of each scheduler instance to its profile. - */ -@Fluent -public final class SchedulerProfileSchedulerInstanceProfiles - implements JsonSerializable<SchedulerProfileSchedulerInstanceProfiles> { - /* - * The scheduler profile for the upstream scheduler instance. - */ - private SchedulerInstanceProfile upstream; - - /** - * Creates an instance of SchedulerProfileSchedulerInstanceProfiles class. - */ - public SchedulerProfileSchedulerInstanceProfiles() { - } - - /** - * Get the upstream property: The scheduler profile for the upstream scheduler instance. - * - * @return the upstream value. - */ - public SchedulerInstanceProfile upstream() { - return this.upstream; - } - - /** - * Set the upstream property: The scheduler profile for the upstream scheduler instance. - * - * @param upstream the upstream value to set. - * @return the SchedulerProfileSchedulerInstanceProfiles object itself. - */ - public SchedulerProfileSchedulerInstanceProfiles withUpstream(SchedulerInstanceProfile upstream) { - this.upstream = upstream; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (upstream() != null) { - upstream().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("upstream", this.upstream); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SchedulerProfileSchedulerInstanceProfiles from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SchedulerProfileSchedulerInstanceProfiles if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SchedulerProfileSchedulerInstanceProfiles. - */ - public static SchedulerProfileSchedulerInstanceProfiles fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SchedulerProfileSchedulerInstanceProfiles deserializedSchedulerProfileSchedulerInstanceProfiles - = new SchedulerProfileSchedulerInstanceProfiles(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("upstream".equals(fieldName)) { - deserializedSchedulerProfileSchedulerInstanceProfiles.upstream - = SchedulerInstanceProfile.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSchedulerProfileSchedulerInstanceProfiles; - }); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SeccompDefault.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SeccompDefault.java deleted file mode 100644 index 2ff28552ffe6..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SeccompDefault.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the default seccomp profile applied to all workloads. If not specified, 'Unconfined' will be used by - * default. - */ -public final class SeccompDefault extends ExpandableStringEnum<SeccompDefault> { - /** - * Static value Unconfined for SeccompDefault. - */ - public static final SeccompDefault UNCONFINED = fromString("Unconfined"); - - /** - * Static value RuntimeDefault for SeccompDefault. - */ - public static final SeccompDefault RUNTIME_DEFAULT = fromString("RuntimeDefault"); - - /** - * Creates a new instance of SeccompDefault value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SeccompDefault() { - } - - /** - * Creates or finds a SeccompDefault from its string representation. - * - * @param name a name to look for. - * @return the corresponding SeccompDefault. - */ - public static SeccompDefault fromString(String name) { - return fromString(name, SeccompDefault.class); - } - - /** - * Gets known SeccompDefault values. - * - * @return known SeccompDefault values. - */ - public static Collection<SeccompDefault> values() { - return values(SeccompDefault.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java index 959836b50d8f..f538d165b648 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java @@ -16,11 +16,6 @@ public final class SnapshotType extends ExpandableStringEnum<SnapshotType> { */ public static final SnapshotType NODE_POOL = fromString("NodePool"); - /** - * Static value ManagedCluster for SnapshotType. - */ - public static final SnapshotType MANAGED_CLUSTER = fromString("ManagedCluster"); - /** * Creates a new instance of SnapshotType value. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java deleted file mode 100644 index 3b5668d9e0ec..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If not specified, the default - * value is None. - */ -public final class TransitEncryptionType extends ExpandableStringEnum<TransitEncryptionType> { - /** - * Static value WireGuard for TransitEncryptionType. - */ - public static final TransitEncryptionType WIRE_GUARD = fromString("WireGuard"); - - /** - * Static value None for TransitEncryptionType. - */ - public static final TransitEncryptionType NONE = fromString("None"); - - /** - * Creates a new instance of TransitEncryptionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TransitEncryptionType() { - } - - /** - * Creates or finds a TransitEncryptionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding TransitEncryptionType. - */ - public static TransitEncryptionType fromString(String name) { - return fromString(name, TransitEncryptionType.class); - } - - /** - * Gets known TransitEncryptionType values. - * - * @return known TransitEncryptionType values. - */ - public static Collection<TransitEncryptionType> values() { - return values(TransitEncryptionType.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Type.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Type.java index f3baff01d585..04ff14100e65 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Type.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Type.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The week index. Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs. + * The week index. Specifies on which week of the month the dayOfWeek applies. */ public final class Type extends ExpandableStringEnum<Type> { /** diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeStrategy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeStrategy.java deleted file mode 100644 index 3f79d70807ce..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeStrategy.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines the upgrade strategy for the agent pool. The default is Rolling. - */ -public final class UpgradeStrategy extends ExpandableStringEnum<UpgradeStrategy> { - /** - * Static value Rolling for UpgradeStrategy. - */ - public static final UpgradeStrategy ROLLING = fromString("Rolling"); - - /** - * Static value BlueGreen for UpgradeStrategy. - */ - public static final UpgradeStrategy BLUE_GREEN = fromString("BlueGreen"); - - /** - * Creates a new instance of UpgradeStrategy value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public UpgradeStrategy() { - } - - /** - * Creates or finds a UpgradeStrategy from its string representation. - * - * @param name a name to look for. - * @return the corresponding UpgradeStrategy. - */ - public static UpgradeStrategy fromString(String name) { - return fromString(name, UpgradeStrategy.class); - } - - /** - * Gets known UpgradeStrategy values. - * - * @return known UpgradeStrategy values. - */ - public static Collection<UpgradeStrategy> values() { - return values(UpgradeStrategy.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VmState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VmState.java deleted file mode 100644 index ef08b1fdaaa1..000000000000 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VmState.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservice.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Virtual machine state. Indicates the current state of the underlying virtual machine. - */ -public final class VmState extends ExpandableStringEnum<VmState> { - /** - * Static value Running for VmState. - */ - public static final VmState RUNNING = fromString("Running"); - - /** - * Static value Deleted for VmState. - */ - public static final VmState DELETED = fromString("Deleted"); - - /** - * Creates a new instance of VmState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public VmState() { - } - - /** - * Creates or finds a VmState from its string representation. - * - * @param name a name to look for. - * @return the corresponding VmState. - */ - public static VmState fromString(String name) { - return fromString(name, VmState.class); - } - - /** - * Gets known VmState values. - * - * @return known VmState values. - */ - public static Collection<VmState> values() { - return values(VmState.class); - } -} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java index 8fdfcc9db767..c87728fe2b08 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java @@ -21,11 +21,6 @@ public final class WorkloadRuntime extends ExpandableStringEnum<WorkloadRuntime> */ public static final WorkloadRuntime WASM_WASI = fromString("WasmWasi"); - /** - * Static value KataMshvVmIsolation for WorkloadRuntime. - */ - public static final WorkloadRuntime KATA_MSHV_VM_ISOLATION = fromString("KataMshvVmIsolation"); - /** * Static value KataVmIsolation for WorkloadRuntime. */ diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json index 65e1768573ab..7d7de0a58bda 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.containerservice.implementation.AgentPoolsClientImpl$AgentPoolsService"],["com.azure.resourcemanager.containerservice.implementation.ContainerServiceOperationsClientImpl$ContainerServiceOperationsService"],["com.azure.resourcemanager.containerservice.implementation.ContainerServicesClientImpl$ContainerServicesService"],["com.azure.resourcemanager.containerservice.implementation.IdentityBindingsClientImpl$IdentityBindingsService"],["com.azure.resourcemanager.containerservice.implementation.JwtAuthenticatorsClientImpl$JwtAuthenticatorsService"],["com.azure.resourcemanager.containerservice.implementation.LoadBalancersClientImpl$LoadBalancersService"],["com.azure.resourcemanager.containerservice.implementation.MachinesClientImpl$MachinesService"],["com.azure.resourcemanager.containerservice.implementation.MaintenanceConfigurationsClientImpl$MaintenanceConfigurationsService"],["com.azure.resourcemanager.containerservice.implementation.ManagedClusterSnapshotsClientImpl$ManagedClusterSnapshotsService"],["com.azure.resourcemanager.containerservice.implementation.ManagedClustersClientImpl$ManagedClustersService"],["com.azure.resourcemanager.containerservice.implementation.ManagedNamespacesClientImpl$ManagedNamespacesService"],["com.azure.resourcemanager.containerservice.implementation.MeshMembershipsClientImpl$MeshMembershipsService"],["com.azure.resourcemanager.containerservice.implementation.OpenShiftManagedClustersClientImpl$OpenShiftManagedClustersService"],["com.azure.resourcemanager.containerservice.implementation.OperationStatusResultsClientImpl$OperationStatusResultsService"],["com.azure.resourcemanager.containerservice.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.containerservice.implementation.ResolvePrivateLinkServiceIdsClientImpl$ResolvePrivateLinkServiceIdsService"],["com.azure.resourcemanager.containerservice.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRoleBindingsClientImpl$TrustedAccessRoleBindingsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRolesClientImpl$TrustedAccessRolesService"]] \ No newline at end of file +[["com.azure.resourcemanager.containerservice.implementation.AgentPoolsClientImpl$AgentPoolsService"],["com.azure.resourcemanager.containerservice.implementation.ContainerServicesClientImpl$ContainerServicesService"],["com.azure.resourcemanager.containerservice.implementation.MachinesClientImpl$MachinesService"],["com.azure.resourcemanager.containerservice.implementation.MaintenanceConfigurationsClientImpl$MaintenanceConfigurationsService"],["com.azure.resourcemanager.containerservice.implementation.ManagedClustersClientImpl$ManagedClustersService"],["com.azure.resourcemanager.containerservice.implementation.ManagedNamespacesClientImpl$ManagedNamespacesService"],["com.azure.resourcemanager.containerservice.implementation.OpenShiftManagedClustersClientImpl$OpenShiftManagedClustersService"],["com.azure.resourcemanager.containerservice.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.containerservice.implementation.ResolvePrivateLinkServiceIdsClientImpl$ResolvePrivateLinkServiceIdsService"],["com.azure.resourcemanager.containerservice.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRoleBindingsClientImpl$TrustedAccessRoleBindingsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRolesClientImpl$TrustedAccessRolesService"]] \ No newline at end of file diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/KubernetesClustersTests.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/KubernetesClustersTests.java index 55e053af91f5..baa73acd0602 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/KubernetesClustersTests.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/KubernetesClustersTests.java @@ -564,7 +564,7 @@ public void testUpdateKubernetesVersion() { .define(generateRandomResourceName("aks", 15)) .withRegion(Region.US_WEST2) .withExistingResourceGroup(rgName) - .withVersion("1.31.8") + .withVersion("1.32.4") .withRootUsername("testaks") .withSshKey(SSH_KEY) .withSystemAssignedManagedServiceIdentity() @@ -578,11 +578,11 @@ public void testUpdateKubernetesVersion() { .create(); kubernetesCluster.refresh(); - Assertions.assertEquals("1.31.8", kubernetesCluster.version()); + Assertions.assertEquals("1.32.4", kubernetesCluster.version()); - kubernetesCluster.update().withVersion("1.32.4").apply(); + kubernetesCluster.update().withVersion("1.33.1").apply(); kubernetesCluster.refresh(); - Assertions.assertEquals("1.32.4", kubernetesCluster.version()); + Assertions.assertEquals("1.33.1", kubernetesCluster.version()); } @Test @@ -593,7 +593,7 @@ public void testUpdateManagedClusterSkuAndKubernetesSupportPlan() { .define(aksName) .withRegion(Region.US_WEST3) .withExistingResourceGroup(rgName) - .withVersion("1.31.8") + .withVersion("1.32.4") .withRootUsername("testaks") .withSshKey(SSH_KEY) .withSystemAssignedManagedServiceIdentity() diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index 6c52fec3b71a..a8cf8499f518 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -70,7 +70,7 @@ "dir": "../containerservice/azure-resourcemanager-containerservice", "source": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md", "package": "com.azure.resourcemanager.containerservice", - "args": "--tag=package-preview-2025-09 --modelerfour.lenient-model-deduplication --preserve-model=ContainerServiceVMSizeTypes --rename-model=Ossku:OSSku --enable-sync-stack=false" + "args": "--tag=package-2025-10 --modelerfour.lenient-model-deduplication --preserve-model=ContainerServiceVMSizeTypes --rename-model=Ossku:OSSku --enable-sync-stack=false" }, "containerservice-hybrid": { "dir": "../resourcemanagerhybrid/azure-resourcemanager-containerservice", diff --git a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md index b1e987a8ac56..7f96bdbf5635 100644 --- a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md @@ -2,13 +2,11 @@ ## 2.58.0-beta.1 (Unreleased) -### Features Added - -### Breaking Changes +### azure-resourcemanager-containerservice -### Bugs Fixed +#### Dependency Updates -### Other Changes +- Updated `api-version` to `2025-10-01`. ## 2.57.0 (2025-11-25) diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index 8bb051c44566..bfe8b27ed9d3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -142,7 +142,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerservice</artifactId> - <version>2.56.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerservice;dependency} --> + <version>2.57.0</version> <!-- {x-version-update;unreleased_com.azure.resourcemanager:azure-resourcemanager-containerservice;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java index 60574887a2d5..38791c473f94 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java @@ -10,7 +10,7 @@ public final class AgentPoolsAbortLatestOperationSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsAbortOperation.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java index 6a730abbc43a..dd55ef9dff92 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java @@ -34,7 +34,7 @@ public final class AgentPoolsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_EnableFIPS.json */ /** @@ -58,7 +58,7 @@ public static void createAgentPoolWithFIPSEnabledOS(com.azure.resourcemanager.Az /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPools_Update.json */ /** @@ -87,7 +87,7 @@ public static void updateAgentPool(com.azure.resourcemanager.AzureResourceManage /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_GPUMIG.json */ /** @@ -127,7 +127,7 @@ public static void createAgentPoolWithGPUMIG(com.azure.resourcemanager.AzureReso /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_WindowsOSSKU.json */ /** @@ -151,7 +151,7 @@ public static void createAgentPoolWithWindowsOSSKU(com.azure.resourcemanager.Azu /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_DedicatedHostGroup.json */ /** @@ -175,7 +175,7 @@ public static void createAgentPoolWithDedicatedHostGroup(com.azure.resourcemanag /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_Update.json */ /** @@ -204,7 +204,7 @@ public static void createUpdateAgentPool(com.azure.resourcemanager.AzureResource /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_WindowsDisableOutboundNAT.json */ /** @@ -230,7 +230,7 @@ public static void createUpdateAgentPool(com.azure.resourcemanager.AzureResource /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPools_Start.json */ /** @@ -250,7 +250,7 @@ public static void startAgentPool(com.azure.resourcemanager.AzureResourceManager /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_Spot.json */ /** @@ -278,7 +278,7 @@ public static void createSpotAgentPool(com.azure.resourcemanager.AzureResourceMa /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_Ephemeral.json */ /** @@ -303,7 +303,7 @@ public static void createAgentPoolWithEphemeralOSDisk(com.azure.resourcemanager. /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_EnableEncryptionAtHost.json */ /** @@ -328,7 +328,7 @@ public static void createAgentPoolWithEphemeralOSDisk(com.azure.resourcemanager. /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_EnableUltraSSD.json */ /** @@ -352,7 +352,7 @@ public static void createAgentPoolWithUltraSSDEnabled(com.azure.resourcemanager. /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_WasmWasi.json */ /** @@ -379,7 +379,7 @@ public static void createAgentPoolWithUltraSSDEnabled(com.azure.resourcemanager. /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_Snapshot.json */ /** @@ -404,7 +404,7 @@ public static void createAgentPoolUsingAnAgentPoolSnapshot(com.azure.resourceman /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_PPG.json */ /** @@ -428,7 +428,7 @@ public static void createAgentPoolWithPPG(com.azure.resourcemanager.AzureResourc /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_CustomNodeConfig.json */ /** @@ -468,7 +468,7 @@ public static void createAgentPoolWithPPG(com.azure.resourcemanager.AzureResourc /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPools_Stop.json */ /** @@ -488,7 +488,7 @@ public static void stopAgentPool(com.azure.resourcemanager.AzureResourceManager /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_MessageOfTheDay.json */ /** @@ -514,7 +514,7 @@ public static void createAgentPoolWithMessageOfTheDay(com.azure.resourcemanager. /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_CRG.json */ /** @@ -539,7 +539,7 @@ public static void createAgentPoolWithMessageOfTheDay(com.azure.resourcemanager. /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_OSSKU.json */ /** @@ -579,7 +579,7 @@ public static void createAgentPoolWithOSSKU(com.azure.resourcemanager.AzureResou /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsCreate_TypeVirtualMachines.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java index f50c59e6e7a3..d439b2c1092c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java @@ -13,7 +13,7 @@ public final class AgentPoolsDeleteMachinesSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsDeleteMachines.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java index a4d54b83cff4..e6b7c2bf803f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java @@ -10,7 +10,7 @@ public final class AgentPoolsDeleteSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java index 5de428a08639..e1eeddf3619c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java @@ -10,7 +10,7 @@ public final class AgentPoolsGetAvailableAgentPoolVersionsSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsGetAgentPoolAvailableVersions.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java index 1eb79f2c7d24..3e5818ea5264 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java @@ -10,7 +10,7 @@ public final class AgentPoolsGetSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java index 04c1b59b87d2..899dff7eddca 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java @@ -10,7 +10,7 @@ public final class AgentPoolsGetUpgradeProfileSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsGetUpgradeProfile.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java index 3f61681f9c34..743a4d3675e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java @@ -10,7 +10,7 @@ public final class AgentPoolsListSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java index d801bfdf1cd2..b0331e8d75d6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java @@ -10,7 +10,7 @@ public final class AgentPoolsUpgradeNodeImageVersionSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * AgentPoolsUpgradeNodeImageVersion.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java index dffb06ec4b45..97a2c5274e1e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java @@ -10,7 +10,7 @@ public final class MachinesGetSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * MachineGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java index bc4a8ccc49cc..b45b6582f2bf 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java @@ -10,7 +10,7 @@ public final class MachinesListSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * MachineList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java index 3cc7c66488a8..fad2ad0616c4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java @@ -20,7 +20,7 @@ public final class MaintenanceConfigurationsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java index 50b7afaa93e6..e99ee5609f3e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java @@ -10,7 +10,7 @@ public final class MaintenanceConfigurationsDeleteSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * MaintenanceConfigurationsDelete_MaintenanceWindow.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java index b8debb01a1fb..4caac7964938 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java @@ -10,7 +10,7 @@ public final class MaintenanceConfigurationsGetSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * MaintenanceConfigurationsGet_MaintenanceWindow.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java index b45fbb872880..c6fec25f2e44 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java @@ -10,7 +10,7 @@ public final class MaintenanceConfigurationsListByManagedClusterSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * MaintenanceConfigurationsList_MaintenanceWindow.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java index 0e9c2c86b2d7..fc849ce29025 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersAbortLatestOperationSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersAbortOperation.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java index d7b229cf335b..67018d15e0ed 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java @@ -70,7 +70,7 @@ public final class ManagedClustersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_CRG.json */ /** @@ -121,7 +121,7 @@ public final class ManagedClustersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_CustomCATrustCertificates.json */ /** @@ -172,7 +172,7 @@ public final class ManagedClustersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_DualStackNetworking.json */ /** @@ -234,7 +234,7 @@ public final class ManagedClustersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_PodIdentity.json */ /** @@ -285,7 +285,7 @@ public final class ManagedClustersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_UserAssignedNATGateway.json */ /** @@ -333,7 +333,7 @@ public static void createManagedClusterWithUserAssignedNATGatewayAsOutboundType( /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_Update.json */ /** @@ -396,7 +396,7 @@ public static void createUpdateManagedCluster(com.azure.resourcemanager.AzureRes /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_PrivateClusterFQDNSubdomain.json */ /** @@ -447,7 +447,7 @@ public static void createUpdateManagedCluster(com.azure.resourcemanager.AzureRes /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_ManagedNATGateway.json */ /** @@ -497,7 +497,7 @@ public static void createManagedClusterWithAKSManagedNATGatewayAsOutboundType( /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_Premium.json */ /** @@ -546,7 +546,7 @@ public static void createManagedClusterWithLongTermSupport(com.azure.resourceman /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_NodePublicIPPrefix.json */ /** @@ -597,7 +597,7 @@ public static void createManagedClusterWithLongTermSupport(com.azure.resourceman /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_EnableEncryptionAtHost.json */ /** @@ -647,7 +647,7 @@ public static void createManagedClusterWithLongTermSupport(com.azure.resourceman /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_PrivateClusterPublicFQDN.json */ /** @@ -697,7 +697,7 @@ public static void createManagedClusterWithLongTermSupport(com.azure.resourceman /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_HTTPProxy.json */ /** @@ -750,7 +750,7 @@ public static void createManagedClusterWithLongTermSupport(com.azure.resourceman /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_DedicatedHostGroup.json */ /** @@ -800,7 +800,7 @@ public static void createManagedClusterWithLongTermSupport(com.azure.resourceman /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_EnabledFIPS.json */ /** @@ -849,7 +849,7 @@ public static void createManagedClusterWithFIPSEnabledOS(com.azure.resourcemanag /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_SecurityProfile.json */ /** @@ -894,7 +894,7 @@ public static void createManagedClusterWithFIPSEnabledOS(com.azure.resourcemanag /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_PPG.json */ /** @@ -944,7 +944,7 @@ public static void createManagedClusterWithPPG(com.azure.resourcemanager.AzureRe /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_IngressProfile_WebAppRouting.json */ /** @@ -987,7 +987,7 @@ public static void createManagedClusterWithWebAppRoutingIngressProfileConfigured /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_UpdateWithAHUB.json */ /** @@ -1041,7 +1041,7 @@ public static void createUpdateManagedClusterWithEnableAHUB(com.azure.resourcema /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_DisableRunCommand.json */ /** @@ -1090,7 +1090,7 @@ public static void createUpdateManagedClusterWithEnableAHUB(com.azure.resourcema /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_Snapshot.json */ /** @@ -1142,7 +1142,7 @@ public static void createUpdateManagedClusterWithEnableAHUB(com.azure.resourcema /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_AzureServiceMesh.json */ /** @@ -1213,7 +1213,7 @@ public static void createUpdateManagedClusterWithEnableAHUB(com.azure.resourcema /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_AzureKeyvaultSecretsProvider.json */ /** @@ -1269,7 +1269,7 @@ public static void createManagedClusterWithAzureKeyVaultSecretsProviderAddon( /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_OSSKU.json */ /** @@ -1322,7 +1322,7 @@ public static void createManagedClusterWithOSSKU(com.azure.resourcemanager.Azure /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_UpdateWithEnableAzureRBAC.json */ /** @@ -1373,7 +1373,7 @@ public static void createManagedClusterWithOSSKU(com.azure.resourcemanager.Azure /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_EnableUltraSSD.json */ /** @@ -1422,7 +1422,7 @@ public static void createManagedClusterWithUltraSSDEnabled(com.azure.resourceman /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_UpdateWindowsGmsa.json */ /** @@ -1477,7 +1477,7 @@ public static void createManagedClusterWithUltraSSDEnabled(com.azure.resourceman /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersCreate_GPUMIG.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java index d190fcf7221f..54cd0c5d7312 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java @@ -10,12 +10,12 @@ public final class ManagedClustersDeleteSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersDelete.json */ /** * Sample code: Delete Managed Cluster. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteManagedCluster(com.azure.resourcemanager.AzureResourceManager azure) { @@ -23,6 +23,6 @@ public static void deleteManagedCluster(com.azure.resourcemanager.AzureResourceM .manager() .serviceClient() .getManagedClusters() - .delete("rg1", "clustername1"); + .delete("rg1", "clustername1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java index 0c41552a57c0..b60b60f00cf7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersGetAccessProfileSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersGetAccessProfile.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java index 5beb0e5aca98..99e0d35ea65d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java index d3f5d35a89e2..884816360c5f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersGetCommandResultSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * RunCommandResultFailed.json */ /** @@ -29,7 +29,7 @@ public static void commandFailedResult(com.azure.resourcemanager.AzureResourceMa /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * RunCommandResultSucceed.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java index 56081d97666d..f53e2519761f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersGetMeshRevisionProfileSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersGet_MeshRevisionProfile.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java index 8d7943a58c93..7a76629d3c14 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersGetMeshUpgradeProfileSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersGet_MeshUpgradeProfile.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java index 02abeb21db76..e1ede1fbc543 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersGetUpgradeProfileSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersGetUpgradeProfile.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java index 78bf6135c17f..de539eb5e583 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java index db53ef6ca431..c028963e152e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersListClusterAdminCredentialsSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersListClusterAdminCredentials.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java index 3009a2651c2a..7616952af56d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersListClusterMonitoringUserCredentialsSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersListClusterMonitoringUserCredentials.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java index 13ebd237a858..46f5c8369a43 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersListClusterUserCredentialsSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersListClusterUserCredentials.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java index f6c9ce7f7bbb..61cd58c4b292 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersListKubernetesVersionsSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * KubernetesVersions_List.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java index c9a743f7c3fe..97516a8d87e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersListMeshRevisionProfilesSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersList_MeshRevisionProfiles.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java index 7e51c82dd821..c83615784f82 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersListMeshUpgradeProfilesSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersList_MeshUpgradeProfiles.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java index 6edddf390da3..e6fde6084d48 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersListOutboundNetworkDependenciesEndpointsSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * OutboundNetworkDependenciesEndpointsList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java index db4cddb9b5e8..553c6d0322eb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersListSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAadProfileSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAadProfileSamples.java index d1ac44cb7729..b4d485c97233 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAadProfileSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAadProfileSamples.java @@ -12,7 +12,7 @@ public final class ManagedClustersResetAadProfileSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersResetAADProfile.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java index 925d8ebccab9..2b0fe444434e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java @@ -12,7 +12,7 @@ public final class ManagedClustersResetServicePrincipalProfileSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersResetServicePrincipalProfile.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java index 5875071e538e..b2fb21f3b67b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersRotateClusterCertificatesSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersRotateClusterCertificates.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java index 69e4ef84ea6f..c6547c34200b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersRotateServiceAccountSigningKeysSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersRotateServiceAccountSigningKeys.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java index c3beacc797f3..1ce2a65d6470 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java @@ -12,7 +12,7 @@ public final class ManagedClustersRunCommandSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * RunCommandRequest.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java index d45bdba39157..3106c58fbdde 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersStartSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersStart.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java index 79c8135eac39..2e056a829c79 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java @@ -10,7 +10,7 @@ public final class ManagedClustersStopSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersStop.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java index be2862655a2c..3f619ef007cc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class ManagedClustersUpdateTagsSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedClustersUpdateTags.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java index 0bc5256dfa1f..c8d5a2d14066 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java @@ -20,7 +20,7 @@ public final class ManagedNamespacesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedNamespacesCreate_Update.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java index 6028be8f3ece..461b964c3702 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java @@ -10,7 +10,7 @@ public final class ManagedNamespacesDeleteSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedNamespacesDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java index a31976d80a12..13eb970a8e08 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java @@ -10,7 +10,7 @@ public final class ManagedNamespacesGetSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedNamespacesGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java index bb4cadbea7d4..ddd6d5e34832 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java @@ -10,7 +10,7 @@ public final class ManagedNamespacesListByManagedClusterSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedNamespacesList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java index ca40b53c5a0b..0ba4e66cc6e5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java @@ -10,7 +10,7 @@ public final class ManagedNamespacesListCredentialSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedNamespacesListCredentialResult.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java index 5c92979d0349..1f2a4bcc7274 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java @@ -14,7 +14,7 @@ public final class ManagedNamespacesUpdateSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ManagedNamespacesUpdateTags.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java index 517b4f5d5c32..183f7182d2e6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java @@ -10,7 +10,7 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * Operation_List.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java index 99a4e2b8dc45..ff10ac6ae6d5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -10,7 +10,7 @@ public final class PrivateEndpointConnectionsDeleteSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * PrivateEndpointConnectionsDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java index db38541696a8..67239e30e83f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java @@ -10,7 +10,7 @@ public final class PrivateEndpointConnectionsGetSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * PrivateEndpointConnectionsGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java index 4373ce3faac2..27910989b57b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java @@ -10,7 +10,7 @@ public final class PrivateEndpointConnectionsListSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * PrivateEndpointConnectionsList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java index 8426ae23f3cc..b5dce96c72c3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java @@ -14,7 +14,7 @@ public final class PrivateEndpointConnectionsUpdateSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * PrivateEndpointConnectionsUpdate.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java index d2c98fdc3905..6682677b4d13 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java @@ -10,7 +10,7 @@ public final class PrivateLinkResourcesListSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * PrivateLinkResourcesList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPostSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPostSamples.java index 60eda594f484..be9846b7f0a3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPostSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPostSamples.java @@ -12,7 +12,7 @@ public final class ResolvePrivateLinkServiceIdPostSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * ResolvePrivateLinkServiceId.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java index b74c04feb847..7aa2f385ab48 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ public final class SnapshotsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * SnapshotsCreate.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java index bc389997ac63..d0efc66df4ac 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java @@ -10,7 +10,7 @@ public final class SnapshotsDeleteSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * SnapshotsDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java index 2608467ea945..240191a2bc43 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class SnapshotsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * SnapshotsGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java index 818366fe63c5..801990d797ae 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class SnapshotsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * SnapshotsListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java index fe44bf1a9b78..2c0596fb6a79 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java @@ -10,7 +10,7 @@ public final class SnapshotsListSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * SnapshotsList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java index 0a9621a717d8..b25caa72f85d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class SnapshotsUpdateTagsSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * SnapshotsUpdateTags.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java index 3dda0864e4aa..ff9c2386232d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ public final class TrustedAccessRoleBindingsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * TrustedAccessRoleBindings_CreateOrUpdate.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java index e1d45264d78d..1e46a1bdf816 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java @@ -10,7 +10,7 @@ public final class TrustedAccessRoleBindingsDeleteSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * TrustedAccessRoleBindings_Delete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java index e2bd2dc699fb..b9174ed5caf6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java @@ -10,7 +10,7 @@ public final class TrustedAccessRoleBindingsGetSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * TrustedAccessRoleBindings_Get.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java index d32fba323123..47cd7f79a0cb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java @@ -10,7 +10,7 @@ public final class TrustedAccessRoleBindingsListSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * TrustedAccessRoleBindings_List.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java index 67ddefdaa5ce..59615813c968 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java @@ -10,7 +10,7 @@ public final class TrustedAccessRolesListSamples { /* * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-09-01/examples/ + * specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ * TrustedAccessRoles_List.json */ /** From feb963e0e97ce4f0f9c3e139966a81165c4cdf9c Mon Sep 17 00:00:00 2001 From: Rujun Chen <rujche@microsoft.com> Date: Mon, 15 Dec 2025 06:45:26 +0000 Subject: [PATCH 160/186] Change default connection factory of JMS listener container to native Service Bus connection factory (#47523) --- sdk/spring/CHANGELOG.md | 4 ++ ...eBusJmsConnectionFactoryConfiguration.java | 5 +- .../ServiceBusJmsAutoConfigurationTests.java | 69 +++++++++---------- ...msConnectionFactoryConfigurationTests.java | 49 ++++--------- 4 files changed, 50 insertions(+), 77 deletions(-) diff --git a/sdk/spring/CHANGELOG.md b/sdk/spring/CHANGELOG.md index c6b9bdfce69f..a2a6a09128fc 100644 --- a/sdk/spring/CHANGELOG.md +++ b/sdk/spring/CHANGELOG.md @@ -5,6 +5,10 @@ ### Spring Cloud Azure Autoconfigure This section includes changes in `spring-cloud-azure-autoconfigure` module. +#### Features Added + +- Change default connection factory of JMS listener container to native Service Bus connection factory. [#47413](https://github.com/Azure/azure-sdk-for-java/issues/47413) + #### Bugs Fixed - 2 `TokenCredential` bean found in AzureServiceBusMessagingAutoConfiguration. [#47470](https://github.com/Azure/azure-sdk-for-java/pull/47470) diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfiguration.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfiguration.java index 53e4b15b4f50..f1f26807d1fd 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfiguration.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfiguration.java @@ -61,13 +61,12 @@ public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BindResult<Boolean> poolEnabledResult = Binder.get(environment).bind("spring.jms.servicebus.pool.enabled", Boolean.class); BindResult<Boolean> cacheEnabledResult = Binder.get(environment).bind("spring.jms.cache.enabled", Boolean.class); - if (isPoolConnectionFactoryClassPresent() - && ((!cacheEnabledResult.isBound() && !poolEnabledResult.isBound()) || poolEnabledResult.orElseGet(() -> false))) { + if (isPoolConnectionFactoryClassPresent() && poolEnabledResult.orElseGet(() -> false)) { registerJmsPoolConnectionFactory(registry); return; } - if (isCacheConnectionFactoryClassPresent() && (!cacheEnabledResult.isBound() || cacheEnabledResult.orElseGet(() -> false))) { + if (isCacheConnectionFactoryClassPresent() && cacheEnabledResult.orElseGet(() -> false)) { registerJmsCachingConnectionFactory(registry); return; } diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsAutoConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsAutoConfigurationTests.java index 85d2cb7dda4c..ca0025ea6ed5 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsAutoConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsAutoConfigurationTests.java @@ -3,11 +3,11 @@ package com.azure.spring.cloud.autoconfigure.implementation.jms; +import com.azure.servicebus.jms.ServiceBusJmsConnectionFactory; import com.azure.spring.cloud.autoconfigure.implementation.context.properties.AzureGlobalProperties; import com.azure.spring.cloud.autoconfigure.implementation.jms.properties.AzureServiceBusJmsProperties; import com.azure.spring.cloud.core.provider.connectionstring.StaticConnectionStringProvider; import com.azure.spring.cloud.core.service.AzureServiceType; -import com.azure.servicebus.jms.ServiceBusJmsConnectionFactory; import jakarta.jms.ConnectionFactory; import jakarta.jms.Session; import org.apache.qpid.jms.JmsConnectionFactory; @@ -60,6 +60,7 @@ private void testQueueJmsListenerContainerFactoryWithCustomSettings(AssertableAp assertThat(container.getMaxConcurrentConsumers()).isEqualTo(10); assertThat(container).hasFieldOrPropertyWithValue("receiveTimeout", 2000L); assertThat(container.isReplyPubSubDomain()).isFalse(); + assertThat(container.getReplyQosSettings()).isNotNull(); assertThat(container.getReplyQosSettings().getPriority()).isEqualTo(1); assertThat(container.isSubscriptionDurable()).isFalse(); assertThat(container.isSubscriptionShared()).isFalse(); @@ -79,6 +80,7 @@ private void testTopicJmsListenerContainerFactoryWithCustomSettings(AssertableAp assertThat(container.getMaxConcurrentConsumers()).isEqualTo(10); assertThat(container).hasFieldOrPropertyWithValue("receiveTimeout", 2000L); assertThat(container.isReplyPubSubDomain()).isFalse(); + assertThat(container.getReplyQosSettings()).isNotNull(); assertThat(container.getReplyQosSettings().getPriority()).isEqualTo(1); assertThat(container.isSubscriptionDurable()).isTrue(); assertThat(container.isSubscriptionShared()).isFalse(); @@ -86,7 +88,7 @@ private void testTopicJmsListenerContainerFactoryWithCustomSettings(AssertableAp } @ParameterizedTest - @ValueSource(classes = { ConnectionFactory.class, JmsConnectionFactory.class, JmsTemplate.class }) + @ValueSource(classes = {ConnectionFactory.class, JmsConnectionFactory.class, JmsTemplate.class}) void autoconfigurationNotEnabled(Class<?> clz) { this.contextRunner .withClassLoader(new FilteredClassLoader(clz)) @@ -105,7 +107,7 @@ void contextFailedByConnectionStringNotConfigured() { } @ParameterizedTest - @ValueSource(strings = { "Ba", " ", "basic" }) + @ValueSource(strings = {"Ba", " ", "basic"}) void contextFailedByPricingTierNotCorrectlyConfigured(String pricingTier) { this.contextRunner .withPropertyValues( @@ -119,7 +121,7 @@ void contextFailedByPricingTierNotCorrectlyConfigured(String pricingTier) { } @ParameterizedTest - @ValueSource(strings = { "premium" }) + @ValueSource(strings = {"premium"}) void autoconfigurationEnabledAndContextSuccessWithPremiumTier(String pricingTier) { this.contextRunner .withPropertyValues( @@ -138,7 +140,7 @@ void autoconfigurationEnabledAndContextSuccessWithPremiumTier(String pricingTier } @ParameterizedTest - @ValueSource(strings = { "standard" }) + @ValueSource(strings = {"standard"}) void autoconfigurationEnabledAndContextSuccessWithStandardTier(String pricingTier) { this.contextRunner .withPropertyValues( @@ -157,16 +159,14 @@ void autoconfigurationEnabledAndContextSuccessWithStandardTier(String pricingTie } @ParameterizedTest - @ValueSource(strings = { "standard", "premium" }) + @ValueSource(strings = {"standard", "premium"}) void autoconfigurationDisabled(String pricingTier) { this.contextRunner .withPropertyValues( "spring.jms.servicebus.enabled=false", "spring.jms.servicebus.pricing-tier=" + pricingTier, "spring.jms.servicebus.connection-string=" + CONNECTION_STRING) - .run(context -> { - assertThat(context).doesNotHaveBean(AzureServiceBusJmsProperties.class); - }); + .run(context -> assertThat(context).doesNotHaveBean(AzureServiceBusJmsProperties.class)); } @Test @@ -174,25 +174,21 @@ void autoconfigurationDisabledCase2() { this.contextRunner .withPropertyValues( "spring.jms.servicebus.enabled=false") - .run(context -> { - assertThat(context).doesNotHaveBean(AzureServiceBusJmsProperties.class); - }); + .run(context -> assertThat(context).doesNotHaveBean(AzureServiceBusJmsProperties.class)); } @ParameterizedTest - @ValueSource(strings = { "standard", "premium" }) + @ValueSource(strings = {"standard", "premium"}) void doesNotHaveBeanOfAzureServiceBusJmsPropertiesBeanPostProcessor(String pricingTier) { this.contextRunner .withPropertyValues( "spring.jms.servicebus.pricing-tier=" + pricingTier, "spring.jms.servicebus.connection-string=" + CONNECTION_STRING) - .run(context -> { - assertThat(context).doesNotHaveBean(AzureServiceBusJmsPropertiesBeanPostProcessor.class); - }); + .run(context -> assertThat(context).doesNotHaveBean(AzureServiceBusJmsPropertiesBeanPostProcessor.class)); } @ParameterizedTest - @ValueSource(strings = { "standard", "premium" }) + @ValueSource(strings = {"standard", "premium"}) void doesHaveBeanOfAzureServiceBusJmsPropertiesBeanPostProcessor(String pricingTier) { this.contextRunner .withPropertyValues( @@ -214,7 +210,7 @@ StaticConnectionStringProvider<AzureServiceType.ServiceBus> connectionStringProv } @ParameterizedTest - @ValueSource(strings = { "standard", "premium" }) + @ValueSource(strings = {"standard", "premium"}) void connectionFactoryIsAutowiredIntoJmsTemplateBean(String pricingTier) { this.contextRunner .withPropertyValues( @@ -227,7 +223,7 @@ void connectionFactoryIsAutowiredIntoJmsTemplateBean(String pricingTier) { } @ParameterizedTest - @ValueSource(strings = { "standard", "premium" }) + @ValueSource(strings = {"standard", "premium"}) void jmsPropertiesConfiguredCorrectly(String pricingTier) { this.contextRunner .withPropertyValues( @@ -251,7 +247,7 @@ void jmsPropertiesConfiguredCorrectly(String pricingTier) { } @ParameterizedTest - @ValueSource(strings = { "standard", "premium" }) + @ValueSource(strings = {"standard", "premium"}) void jmsServiceBusPropertiesConfigured(String pricingTier) { this.contextRunner .withPropertyValues( @@ -268,7 +264,7 @@ void jmsServiceBusPropertiesConfigured(String pricingTier) { } @ParameterizedTest - @ValueSource(strings = { "standard", "premium" }) + @ValueSource(strings = {"standard", "premium"}) void jmsListenerContainerFactoryConfiguredCorrectly(String pricingTier) { this.contextRunner .withPropertyValues( @@ -289,23 +285,22 @@ void jmsListenerContainerFactoryConfiguredCorrectly(String pricingTier) { }); } - @ParameterizedTest - @ValueSource(strings = { "standard", "premium" }) - void jmsPoolConnectionFactoryBeanConfiguredAsDefault(String pricingTier) { + @ValueSource(strings = {"standard", "premium"}) + void nativeConnectionFactoryBeanConfiguredByDefaultInJmsListenerContainerFactory(String pricingTier) { this.contextRunner .withPropertyValues( "spring.jms.servicebus.pricing-tier=" + pricingTier, "spring.jms.servicebus.connection-string=" + CONNECTION_STRING) .run(context -> { - assertThat(context).hasSingleBean(JmsPoolConnectionFactory.class); - assertThat(context).doesNotHaveBean(ServiceBusJmsConnectionFactory.class); + assertThat(context).hasSingleBean(ServiceBusJmsConnectionFactory.class); assertThat(context).doesNotHaveBean(CachingConnectionFactory.class); + assertThat(context).doesNotHaveBean(JmsPoolConnectionFactory.class); }); } @ParameterizedTest - @ValueSource(strings = { "standard", "premium" }) + @ValueSource(strings = {"standard", "premium"}) void jmsPoolConnectionFactoryBeanConfiguredExplicitly(String pricingTier) { this.contextRunner .withPropertyValues( @@ -322,7 +317,7 @@ void jmsPoolConnectionFactoryBeanConfiguredExplicitly(String pricingTier) { } @ParameterizedTest - @ValueSource(strings = { "standard", "premium" }) + @ValueSource(strings = {"standard", "premium"}) void jmsPoolConnectionFactoryBeanConfiguredByPoolEnableCacheEnable(String pricingTier) { this.contextRunner .withPropertyValues( @@ -340,7 +335,7 @@ void jmsPoolConnectionFactoryBeanConfiguredByPoolEnableCacheEnable(String pricin } @ParameterizedTest - @ValueSource(strings = { "standard", "premium" }) + @ValueSource(strings = {"standard", "premium"}) void jmsPoolConnectionFactoryBeanConfiguredByPoolEnableCacheDisable(String pricingTier) { this.contextRunner .withPropertyValues( @@ -358,7 +353,7 @@ void jmsPoolConnectionFactoryBeanConfiguredByPoolEnableCacheDisable(String prici } @ParameterizedTest - @ValueSource(strings = { "standard", "premium" }) + @ValueSource(strings = {"standard", "premium"}) void cachingConnectionFactoryBeanConfiguredByCacheEnable(String pricingTier) { this.contextRunner .withPropertyValues( @@ -374,7 +369,7 @@ void cachingConnectionFactoryBeanConfiguredByCacheEnable(String pricingTier) { } @ParameterizedTest - @ValueSource(strings = { "standard", "premium" }) + @ValueSource(strings = {"standard", "premium"}) void cachingConnectionFactoryBeanConfiguredByPoolDisableCacheEnable(String pricingTier) { this.contextRunner .withPropertyValues( @@ -391,8 +386,8 @@ void cachingConnectionFactoryBeanConfiguredByPoolDisableCacheEnable(String prici } @ParameterizedTest - @ValueSource(strings = { "standard", "premium" }) - void cachingConnectionFactoryBeanConfiguredByPoolDisable(String pricingTier) { + @ValueSource(strings = {"standard", "premium"}) + void nativeConnectionFactoryBeanConfiguredByPoolDisable(String pricingTier) { this.contextRunner .withPropertyValues( "spring.jms.servicebus.pricing-tier=" + pricingTier, @@ -400,14 +395,14 @@ void cachingConnectionFactoryBeanConfiguredByPoolDisable(String pricingTier) { "spring.jms.servicebus.pool.enabled=false" ) .run(context -> { - assertThat(context).hasSingleBean(CachingConnectionFactory.class); - assertThat(context).doesNotHaveBean(ServiceBusJmsConnectionFactory.class); + assertThat(context).hasSingleBean(ServiceBusJmsConnectionFactory.class); + assertThat(context).doesNotHaveBean(CachingConnectionFactory.class); assertThat(context).doesNotHaveBean(JmsPoolConnectionFactory.class); }); } @ParameterizedTest - @ValueSource(strings = { "standard", "premium" }) + @ValueSource(strings = {"standard", "premium"}) void nativeConnectionFactoryBeanConfiguredByCacheDisable(String pricingTier) { this.contextRunner .withPropertyValues( @@ -424,7 +419,7 @@ void nativeConnectionFactoryBeanConfiguredByCacheDisable(String pricingTier) { } @ParameterizedTest - @ValueSource(strings = { "standard", "premium" }) + @ValueSource(strings = {"standard", "premium"}) void nativeConnectionFactoryBeanConfiguredByPoolDisableCacheDisable(String pricingTier) { this.contextRunner .withPropertyValues( diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfigurationTests.java b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfigurationTests.java index 1e58a992365c..2fe44abbb1ff 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfigurationTests.java +++ b/sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/jms/ServiceBusJmsConnectionFactoryConfigurationTests.java @@ -43,14 +43,12 @@ class ServiceBusJmsConnectionFactoryConfigurationTests { @ParameterizedTest @ValueSource(strings = { "standard", "premium" }) - void useDefaultPoolConnection(String pricingTier) { + void useDefaultNativeConnection(String pricingTier) { this.contextRunner .withPropertyValues( "spring.jms.servicebus.pricing-tier=" + pricingTier ) - .run(context -> { - assertThat(context).hasSingleBean(JmsPoolConnectionFactory.class); - }); + .run(context -> assertThat(context).hasSingleBean(ServiceBusJmsConnectionFactory.class)); } @ParameterizedTest @@ -61,36 +59,18 @@ void enablePoolConnection(String pricingTier) { "spring.jms.servicebus.pricing-tier=" + pricingTier, "spring.jms.servicebus.pool.enabled=true" ) - .run(context -> { - assertThat(context).hasSingleBean(JmsPoolConnectionFactory.class); - }); + .run(context -> assertThat(context).hasSingleBean(JmsPoolConnectionFactory.class)); } @ParameterizedTest @ValueSource(strings = { "org.messaginghub.pooled.jms.JmsPoolConnectionFactory", "org.apache.commons.pool2.PooledObject" }) - void poolEnabledButNoPoolClasses(String poolClass) { - this.contextRunner - .withClassLoader(new FilteredClassLoader(poolClass)) - .withPropertyValues( - "spring.jms.servicebus.pricing-tier=premium", - "spring.jms.servicebus.pool.enabled=true" - ) - .run(context -> { - assertThat(context).hasSingleBean(CachingConnectionFactory.class); - }); - } - - @ParameterizedTest - @ValueSource(strings = { "org.messaginghub.pooled.jms.JmsPoolConnectionFactory", "org.apache.commons.pool2.PooledObject" }) - void fallbackUseCachingConnectionDueNoPoolClasses(String poolClass) { + void fallbackDefaultJmsConnectionDueNoPoolClasses(String poolClass) { this.contextRunner .withClassLoader(new FilteredClassLoader(poolClass)) .withPropertyValues( "spring.jms.servicebus.pricing-tier=premium" ) - .run(context -> { - assertThat(context).hasSingleBean(CachingConnectionFactory.class); - }); + .run(context -> assertThat(context).hasSingleBean(ServiceBusJmsConnectionFactory.class)); } @ParameterizedTest @@ -99,11 +79,9 @@ void useCacheConnection(String pricingTier) { this.contextRunner .withPropertyValues( "spring.jms.servicebus.pricing-tier=" + pricingTier, - "spring.jms.servicebus.pool.enabled=false" + "spring.jms.cache.enabled=true" ) - .run(context -> { - assertThat(context).hasSingleBean(CachingConnectionFactory.class); - }); + .run(context -> assertThat(context).hasSingleBean(CachingConnectionFactory.class)); } @ParameterizedTest @@ -134,9 +112,7 @@ void useServiceBusJmsConnection(String pricingTier) { "spring.jms.servicebus.pool.enabled=false", "spring.jms.cache.enabled=false" ) - .run(context -> { - assertThat(context).hasSingleBean(ServiceBusJmsConnectionFactory.class); - }); + .run(context -> assertThat(context).hasSingleBean(ServiceBusJmsConnectionFactory.class)); } @ParameterizedTest @@ -145,11 +121,10 @@ void useCacheConnectionViaAdditionConfigurationFile(String pricingTier) { this.contextRunner .withConfiguration(AutoConfigurations.of(AdditionalPropertySourceConfiguration.class)) .withPropertyValues( - "spring.jms.servicebus.pricing-tier=" + pricingTier + "spring.jms.servicebus.pricing-tier=" + pricingTier, + "spring.jms.cache.enabled=true" ) - .run(context -> { - assertThat(context).hasSingleBean(CachingConnectionFactory.class); - }); + .run(context -> assertThat(context).hasSingleBean(CachingConnectionFactory.class)); } @Test @@ -232,7 +207,7 @@ void cachingConnectionFactoryReusesSameProducerForSameDestination() throws Excep // Cleanup connection.close(); } - + /** * Creates a ServiceBusJmsSession instance using reflection since the constructor is package-private. */ From 912b4312235a6b37ac8336496561d8818939153c Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Sun, 14 Dec 2025 23:40:34 -0800 Subject: [PATCH 161/186] Increment package versions for containerservice releases (#47561) Co-authored-by: v-huizhu2 <v-huizhu2@microsoft.com> --- eng/versioning/version_client.txt | 3 +-- .../CHANGELOG.md | 10 ++++++++++ .../azure-resourcemanager-containerservice/pom.xml | 2 +- sdk/resourcemanager/azure-resourcemanager/pom.xml | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 48697a856b51..1e6de92ac23f 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -278,7 +278,7 @@ com.azure.resourcemanager:azure-resourcemanager-cdn;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-compute;2.55.1;2.56.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.53.6;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.54.1;2.55.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-containerservice;2.56.1;2.57.0 +com.azure.resourcemanager:azure-resourcemanager-containerservice;2.57.0;2.58.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-cosmos;2.54.0;2.55.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-dns;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.53.5;2.54.0-beta.1 @@ -551,7 +551,6 @@ unreleased_com.azure:azure-core-test;1.27.0-beta.14 unreleased_com.azure.v2:azure-identity;2.0.0-beta.1 unreleased_com.azure.v2:azure-data-appconfiguration;2.0.0-beta.1 unreleased_io.clientcore:http-netty4;1.0.0-beta.1 -unreleased_com.azure.resourcemanager:azure-resourcemanager-containerservice;2.57.0 # Released Beta dependencies: Copy the entry from above, prepend "beta_", remove the current # version and set the version to the released beta. Released beta dependencies are only valid diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md index fc89e616f312..b98861f75c9c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 2.58.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 2.57.0 (2025-12-15) ### Other Changes diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml b/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml index d9f5bad88bb3..859698b81957 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml +++ b/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml @@ -10,7 +10,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerservice</artifactId> - <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerservice;current} --> + <version>2.58.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerservice;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for Container Service Management</name> diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index bfe8b27ed9d3..8f207f38ac62 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -142,7 +142,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerservice</artifactId> - <version>2.57.0</version> <!-- {x-version-update;unreleased_com.azure.resourcemanager:azure-resourcemanager-containerservice;dependency} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerservice;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> From e231454899c28f850395687e2832944968eeda30 Mon Sep 17 00:00:00 2001 From: Jean Bisutti <jean.bisutti@gmail.com> Date: Mon, 15 Dec 2025 19:28:21 +0100 Subject: [PATCH 162/186] Export database query parameters (#47526) --- .../autoconfigure/implementation/SpanDataMapper.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/src/main/java/com/azure/monitor/opentelemetry/autoconfigure/implementation/SpanDataMapper.java b/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/src/main/java/com/azure/monitor/opentelemetry/autoconfigure/implementation/SpanDataMapper.java index 9b9a446e0814..32654e868cd9 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/src/main/java/com/azure/monitor/opentelemetry/autoconfigure/implementation/SpanDataMapper.java +++ b/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/src/main/java/com/azure/monitor/opentelemetry/autoconfigure/implementation/SpanDataMapper.java @@ -103,6 +103,11 @@ public final class SpanDataMapper { if (value instanceof List) { telemetryBuilder.addProperty(key, Mappings.join((List<?>) value)); } + }) + .prefix("db.query.parameter.", (telemetryBuilder, key, value) -> { + if (value instanceof String) { + telemetryBuilder.addProperty(key, (String) value); + } }); applyCommonTags(mappingsBuilder); From 77c75263dabd4150ad053c0defc10fc5f5dcd2e7 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 15 Dec 2025 11:18:28 -0800 Subject: [PATCH 163/186] Update paths to include all files in .github directory for evals (#47564) Co-authored-by: Juan Ospina <70209456+jeo02@users.noreply.github.com> --- eng/common/pipelines/templates/jobs/ai-eval-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/pipelines/templates/jobs/ai-eval-job.yml b/eng/common/pipelines/templates/jobs/ai-eval-job.yml index 61e971ddcf31..b6e4ceeb7d1e 100644 --- a/eng/common/pipelines/templates/jobs/ai-eval-job.yml +++ b/eng/common/pipelines/templates/jobs/ai-eval-job.yml @@ -68,7 +68,7 @@ jobs: Paths: - 'tools/**' - 'eng/common/**' - - '.github/copilot-instructions.md' + - '.github/**' - task: AzureCLI@2 displayName: 'Run eval' From c26189d5d7509ee23e9dffca58953dcac80c34cd Mon Sep 17 00:00:00 2001 From: Jiarui Guo <ryne.guo@gmail.com> Date: Mon, 15 Dec 2025 20:56:17 -0800 Subject: [PATCH 164/186] Azure-AI-Translation-Text 2.0.0-beta.1 (#47412) * 10-01 api codegen * remove breaksentence & dictionary codes * update service methods in client * update tests * Update samples * Update test resources & add LLM test * docs, version & llm sample * update version_client * update test resources & recordings * update link * fix javadoc checks * fix typos * mark service methods * customization to remove V3_0 * avoid 'body' in params and classes * consistent fromScript/toScript naming * simplify convenience methods * fix return type per audit * clean up customization code * config to hide internal types * clean up TextTranslationClientBuilder * update docs * llm cspell fix --------- Co-authored-by: Jiarui Guo <jiarguo@microsoft.com> --- eng/versioning/version_client.txt | 2 +- .../azure-ai-translation-text/CHANGELOG.md | 11 +- .../azure-ai-translation-text/README.md | 112 +- .../azure-ai-translation-text/assets.json | 2 +- ...java => TextTranslationCustomization.java} | 28 +- .../azure-ai-translation-text/pom.xml | 2 +- .../text/TextTranslationAsyncClient.java | 1307 +++++----------- .../text/TextTranslationClient.java | 1315 +++++------------ .../text/TextTranslationClientBuilder.java | 10 +- .../text/TextTranslationServiceVersion.java | 10 +- .../TextTranslationClientImpl.java | 936 +++--------- .../models/InputTextItem.java | 4 +- .../implementation/models/TranslateBody.java | 84 ++ .../models/TranslationResult.java} | 47 +- .../models/TransliterateBody.java | 83 ++ .../models/TransliterateResult.java | 81 + .../implementation/models/package-info.java | 24 + .../text/models/BackTranslation.java | 170 --- .../text/models/BreakSentenceItem.java | 108 -- .../text/models/DetectedLanguage.java | 24 +- .../text/models/DictionaryExample.java | 208 --- .../text/models/DictionaryExampleItem.java | 133 -- .../models/DictionaryExampleTextItem.java | 92 -- .../text/models/DictionaryLookupItem.java | 136 -- .../text/models/DictionaryTranslation.java | 223 --- .../models/GetSupportedLanguagesResult.java | 44 +- .../text/models/LanguageScope.java | 4 +- .../text/models/ReferenceTextPair.java | 104 ++ .../text/models/SentenceBoundaries.java | 113 -- .../text/models/SourceDictionaryLanguage.java | 152 -- .../text/models/TargetDictionaryLanguage.java | 150 -- .../text/models/TranslateInputItem.java | 227 +++ .../text/models/TranslateOptions.java | 289 ---- .../text/models/TranslatedTextAlignment.java | 93 -- .../text/models/TranslatedTextItem.java | 46 +- .../text/models/TranslationLanguage.java | 25 +- .../text/models/TranslationTarget.java | 480 ++++++ .../text/models/TranslationText.java | 152 +- .../text/models/TransliterableScript.java | 47 +- .../text/models/TransliterationLanguage.java | 33 +- .../translation/text/models/package-info.java | 4 - .../src/main/java/module-info.java | 1 + ...i-translation-text_apiview_properties.json | 33 +- .../azure-ai-translation-text_metadata.json | 2 +- .../ai/translation/text/BreakSentence.java | 39 - .../translation/text/DictionaryExamples.java | 46 - .../ai/translation/text/DictionaryLookup.java | 40 - .../ai/translation/text/GetLanguages.java | 9 +- .../text/GetLanguagesAcceptLanguage.java | 9 +- .../translation/text/GetLanguagesScope.java | 2 +- .../azure/ai/translation/text/Translate.java | 16 +- .../translation/text/TranslateAlignments.java | 43 - .../ai/translation/text/TranslateCustom.java | 17 +- .../translation/text/TranslateDetection.java | 4 +- .../translation/text/TranslateDictionary.java | 46 - .../ai/translation/text/TranslateLlm.java | 59 + .../text/TranslateMultipleSources.java | 18 +- .../text/TranslateMultipleTargets.java | 20 +- .../text/TranslateNoTranslate.java | 17 +- .../translation/text/TranslateProfanity.java | 17 +- .../text/TranslateSentenceLength.java | 44 - .../translation/text/TranslateTextType.java | 19 +- .../text/TranslateWithTransliteration.java | 19 +- .../translation/text/BreakSentenceTests.java | 56 - .../text/DictionaryExamplesTest.java | 37 - .../text/DictionaryLookupTests.java | 31 - .../translation/text/GetLanguagesTests.java | 65 +- .../ai/translation/text/TranslateTests.java | 205 +-- .../tsp-location.yaml | 3 +- sdk/translation/test-resources.json | 92 +- 70 files changed, 2532 insertions(+), 5592 deletions(-) rename sdk/translation/azure-ai-translation-text/customization/src/main/java/{TextTranslationClientBuilderCustomization.java => TextTranslationCustomization.java} (53%) rename sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/{ => implementation}/models/InputTextItem.java (94%) create mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/TranslateBody.java rename sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/{models/SourceText.java => implementation/models/TranslationResult.java} (50%) create mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/TransliterateBody.java create mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/TransliterateResult.java create mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/package-info.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/BackTranslation.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/BreakSentenceItem.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryExample.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryExampleItem.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryExampleTextItem.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryLookupItem.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryTranslation.java create mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/ReferenceTextPair.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/SentenceBoundaries.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/SourceDictionaryLanguage.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TargetDictionaryLanguage.java create mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslateInputItem.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslateOptions.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslatedTextAlignment.java create mode 100644 sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslationTarget.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/BreakSentence.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/DictionaryExamples.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/DictionaryLookup.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateAlignments.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateDictionary.java create mode 100644 sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateLlm.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateSentenceLength.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/BreakSentenceTests.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/DictionaryExamplesTest.java delete mode 100644 sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/DictionaryLookupTests.java diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 1e6de92ac23f..47eae3a7c4fe 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -55,7 +55,7 @@ com.azure:azure-ai-personalizer;1.0.0-beta.1;1.0.0-beta.2 com.azure:azure-ai-projects;1.0.0-beta.3;1.0.0-beta.4 com.azure:azure-ai-textanalytics;5.5.11;5.6.0-beta.1 com.azure:azure-ai-textanalytics-perf;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-ai-translation-text;1.1.7;1.2.0-beta.1 +com.azure:azure-ai-translation-text;1.1.7;2.0.0-beta.1 com.azure:azure-ai-translation-document;1.0.6;1.1.0-beta.1 com.azure:azure-ai-vision-face;1.0.0-beta.2;1.0.0-beta.3 com.azure:azure-ai-voicelive;1.0.0-beta.3;1.0.0-beta.4 diff --git a/sdk/translation/azure-ai-translation-text/CHANGELOG.md b/sdk/translation/azure-ai-translation-text/CHANGELOG.md index 9d77a8ab502c..542660e33105 100644 --- a/sdk/translation/azure-ai-translation-text/CHANGELOG.md +++ b/sdk/translation/azure-ai-translation-text/CHANGELOG.md @@ -1,11 +1,20 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 2.0.0-beta.1 (Unreleased) ### Features Added +- Added support for the latest Azure AI Translator API, including translations using LLM models, adaptive custom translation, tone variant translations, and gender-specific translations. +- Added `TranslationTarget` class for configuring translation options. + ### Breaking Changes +- Added `Models` property to `GetSupportedLanguagesResult` to include the list of LLM models available for translations. +- Changed the name of `TargetLanguage` property to `Language` in `TranslationText`. +- Changed the name of `Confidence` property to `Score` in `DetectedLanguage`. +- Removed `SourceText` and `Transliteration` properties in translation responses. +- Dictionary, sentence boundaries and text alignments features have been deprecated and relevant classes and properties have been removed. + ### Bugs Fixed ### Other Changes diff --git a/sdk/translation/azure-ai-translation-text/README.md b/sdk/translation/azure-ai-translation-text/README.md index 2b1a507e6525..d955c4b3bb39 100644 --- a/sdk/translation/azure-ai-translation-text/README.md +++ b/sdk/translation/azure-ai-translation-text/README.md @@ -1,18 +1,16 @@ # Azure Text Translation client library for Java -Text translation is a cloud-based REST API feature of the Translator service that uses neural machine translation technology to enable quick and accurate source-to-target text translation in real time across all supported languages. +Azure text translation is a cloud-based REST API provided by the Azure Translator service. It utilizes neural machine translation technology to deliver precise, contextually relevant, and semantically accurate real-time text translations across all supported languages. Use the Text Translation client library for Java to: -* Return a list of languages supported by Translate, Transliterate, and Dictionary operations. +- Retrieve the list of languages supported for translation and transliteration operations, as well as LLM models available for translations. -* Render single source-language text to multiple target-language texts with a single request. +- Perform deterministic text translation from a specified source language to a target language, with configurable parameters to ensure precision and maintain contextual integrity. -* Convert text of a source language in letters of a different script. +- Execute transliteration by converting text from the original script to an alternative script representation. -* Return equivalent words for the source term in the target language. - -* Return grammatical structure and context examples for the source term and target term pair. +- Use LLM models to produce translation output variants that are tone-specific and gender-aware. ## Documentation @@ -36,7 +34,7 @@ Various documentation is available to help you get started <dependency> <groupId>com.azure</groupId> <artifactId>azure-ai-translation-text</artifactId> - <version>1.2.0-beta.1</version> + <version>2.0.0-beta.1</version> </dependency> ``` [//]: # ({x-version-update-end}) @@ -100,7 +98,7 @@ GetSupportedLanguagesResult languages = client.getSupportedLanguages(); System.out.println("Number of supported languages for translate operation: " + languages.getTranslation().size() + "."); System.out.println("Number of supported languages for transliterate operation: " + languages.getTransliteration().size() + "."); -System.out.println("Number of supported languages for dictionary operations: " + languages.getDictionary().size() + "."); +System.out.println("Number of supported models for translate operation: " + languages.getModels().size() + "."); System.out.println("Translation Languages:"); for (Map.Entry<String, TranslationLanguage> translationLanguage : languages.getTranslation().entrySet()) { @@ -112,9 +110,9 @@ for (Map.Entry<String, TransliterationLanguage> transliterationLanguage : langua System.out.println(transliterationLanguage.getKey() + " -- name: " + transliterationLanguage.getValue().getName() + ", supported script count: " + transliterationLanguage.getValue().getScripts().size()); } -System.out.println("Dictionary Languages:"); -for (Map.Entry<String, SourceDictionaryLanguage> dictionaryLanguage : languages.getDictionary().entrySet()) { - System.out.println(dictionaryLanguage.getKey() + " -- name: " + dictionaryLanguage.getValue().getName() + ", supported target languages count: " + dictionaryLanguage.getValue().getTranslations().size()); +System.out.println("Available models:"); +for (String model : languages.getModels()) { + System.out.println(model); } ``` @@ -125,14 +123,15 @@ Please refer to the service documentation for a conceptual discussion of [langua Renders single source-language text to multiple target-language texts with a single request. ```java getTextTranslationMultiple -TranslateOptions translateOptions = new TranslateOptions() - .setSourceLanguage("en") - .addTargetLanguage("es"); +TranslateInputItem input = new TranslateInputItem( + "This is a test.", + Arrays.asList(new TranslationTarget("es"), new TranslationTarget("fr"))); +input.setLanguage("en"); -TranslatedTextItem translation = client.translate("This is a test.", translateOptions); +TranslatedTextItem translation = client.translate(Arrays.asList(input)).get(0); for (TranslationText textTranslation : translation.getTranslations()) { - System.out.println("Text was translated to: '" + textTranslation.getTargetLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); + System.out.println("Text was translated to: '" + textTranslation.getLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); } ``` @@ -155,58 +154,6 @@ System.out.println("Input text was transliterated to '" + transliteration.getScr Please refer to the service documentation for a conceptual discussion of [transliterate][transliterate_doc]. -### Break Sentence - -Identifies the positioning of sentence boundaries in a piece of text. - -```java getTextTranslationSentenceBoundaries -String sourceLanguage = "zh-Hans"; -String sourceScript = "Latn"; -String content = "zhè shì gè cè shì。"; - -BreakSentenceItem breakSentence = client.findSentenceBoundaries(content, sourceLanguage, sourceScript); - -System.out.println("The detected sentence boundaries: " + breakSentence.getSentencesLengths()); -``` - -Please refer to the service documentation for a conceptual discussion of [break sentence][breaksentence_doc]. - -### Dictionary Lookup - -Returns equivalent words for the source term in the target language. - -```java getTextTranslationDictionaryLookup -String sourceLanguage = "en"; -String targetLanguage = "es"; -String content = "fly"; - -DictionaryLookupItem dictionaryEntry = client.lookupDictionaryEntries(sourceLanguage, targetLanguage, content); - -System.out.println("For the given input " + dictionaryEntry.getTranslations().size() + " entries were found in the dictionary."); -System.out.println("First entry: '" + dictionaryEntry.getTranslations().get(0).getDisplayTarget() + "', confidence: " + dictionaryEntry.getTranslations().get(0).getConfidence()); -``` - -Please refer to the service documentation for a conceptual discussion of [dictionary lookup][dictionarylookup_doc]. - -### Dictionary Examples - -Returns grammatical structure and context examples for the source term and target term pair. - -```java getTextTranslationDictionaryExamples -String sourceLanguage = "en"; -String targetLanguage = "es"; -List<DictionaryExampleTextItem> content = new ArrayList<>(); -content.add(new DictionaryExampleTextItem("fly", "volar")); - -List<DictionaryExampleItem> dictionaryEntries = client.lookupDictionaryExamples(sourceLanguage, targetLanguage, content); - -for (DictionaryExampleItem dictionaryEntry : dictionaryEntries) { - System.out.println("For the given input " + dictionaryEntry.getExamples().size() + " entries were found in the dictionary."); - System.out.println("Example: '" + dictionaryEntry.getExamples().get(0).getTargetPrefix() + dictionaryEntry.getExamples().get(0).getTargetTerm() + dictionaryEntry.getExamples().get(0).getTargetSuffix()); -} -``` - -Please refer to the service documentation for a conceptual discussion of [dictionary examples][dictionaryexamples_doc]. ## Troubleshooting @@ -225,19 +172,14 @@ Samples are provided for each main functional area, and for each area, samples a * [Translation to multiple languages][sample_translatetargets] * [Translation of multiple sources][sample_translatesources] * [Translation and Transliteration][sample_translatetransliteration] +* [Translation using LLM][sample_translatelargelanguagemodel] * [Using Custom Translation Model][sample_translatecustom] -* [Translation with Custom Dictionary][sample_translatedictionary] * [Translation with NoTranslate tag][sample_translatenotranslate] -* [Translation with Alignments][sample_translatealignments] -* [Translation with Sentence Boundaries][sample_translatesentencelength] * [Handling translation of HTML text][sample_translatetexttypes] * [Transliteration][sample_transliterate] * [Get Languages][sample_getlanguages] * [Get Localized Languages][sample_getlanguagesaccept] * [Get Scoped Languages][sample_getlanguagesscope] -* [Find Sentence Boundaries][sample_breaksentence] -* [Lookup Dictionary Examples][sample_dictionaryexamples] -* [Lookup Dictionary Entries][sample_dictionarylookup] ## Contributing @@ -250,7 +192,7 @@ For details on contributing to this repository, see the [contributing guide](htt 1. Create new Pull Request <!-- LINKS --> -[product_documentation]: https://learn.microsoft.com/azure/cognitive-services/translator/reference/v3-0-reference +[product_documentation]: https://learn.microsoft.com/azure/ai-services/translator/text-translation/preview/overview [docs]: https://azure.github.io/azure-sdk-for-java/ [jdk]: https://learn.microsoft.com/java/azure/jdk/ [azure_subscription]: https://azure.microsoft.com/free/ @@ -259,32 +201,24 @@ For details on contributing to this repository, see the [contributing guide](htt [azure_cli]: https://learn.microsoft.com/cli/azure [azure_portal]: https://portal.azure.com -[translator_auth]: https://learn.microsoft.com/azure/cognitive-services/translator/reference/v3-0-reference#authentication +[translator_auth]: https://learn.microsoft.com/azure/ai-services/translator/text-translation/reference/authentication [translator_limits]: https://learn.microsoft.com/azure/cognitive-services/translator/request-limits -[languages_doc]: https://learn.microsoft.com/azure/cognitive-services/translator/reference/v3-0-languages -[translate_doc]: https://learn.microsoft.com/azure/cognitive-services/translator/reference/v3-0-translate -[transliterate_doc]: https://learn.microsoft.com/azure/cognitive-services/translator/reference/v3-0-transliterate -[breaksentence_doc]: https://learn.microsoft.com/azure/cognitive-services/translator/reference/v3-0-break-sentence -[dictionarylookup_doc]: https://learn.microsoft.com/azure/cognitive-services/translator/reference/v3-0-dictionary-lookup -[dictionaryexamples_doc]: https://learn.microsoft.com/azure/cognitive-services/translator/reference/v3-0-dictionary-examples +[languages_doc]: https://learn.microsoft.com/azure/ai-services/translator/text-translation/preview/get-languages +[translate_doc]: https://learn.microsoft.com/azure/ai-services/translator/text-translation/preview/translate-api +[transliterate_doc]: https://learn.microsoft.com/azure/ai-services/translator/text-translation/preview/transliterate-api -[sample_breaksentence]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/BreakSentence.java -[sample_dictionaryexamples]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/DictionaryExamples.java -[sample_dictionarylookup]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/DictionaryLookup.java [sample_getlanguages]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/GetLanguages.java [sample_getlanguagesaccept]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/GetLanguagesAcceptLanguage.java [sample_getlanguagesscope]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/GetLanguagesScope.java [sample_translate]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/Translate.java -[sample_translatealignments]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateAlignments.java +[sample_translatelargelanguagemodel]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateLlm.java [sample_translatecustom]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateCustom.java [sample_translatedetection]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateDetection.java -[sample_translatedictionary]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateDictionary.java [sample_translatesources]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateMultipleSources.java [sample_translatetargets]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateMultipleTargets.java [sample_translatenotranslate]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateNoTranslate.java [sample_translateprofanity]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateProfanity.java -[sample_translatesentencelength]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateSentenceLength.java [sample_translatetexttypes]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateTextType.java [sample_translatetransliteration]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateWithTransliteration.java [sample_transliterate]: https://github.com/azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/Transliterate.java diff --git a/sdk/translation/azure-ai-translation-text/assets.json b/sdk/translation/azure-ai-translation-text/assets.json index 902a16a54e37..7e1e2965d2fd 100644 --- a/sdk/translation/azure-ai-translation-text/assets.json +++ b/sdk/translation/azure-ai-translation-text/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/translation/azure-ai-translation-text", - "Tag": "java/translation/azure-ai-translation-text_177e917101" + "Tag": "java/translation/azure-ai-translation-text_3fac03d964" } diff --git a/sdk/translation/azure-ai-translation-text/customization/src/main/java/TextTranslationClientBuilderCustomization.java b/sdk/translation/azure-ai-translation-text/customization/src/main/java/TextTranslationCustomization.java similarity index 53% rename from sdk/translation/azure-ai-translation-text/customization/src/main/java/TextTranslationClientBuilderCustomization.java rename to sdk/translation/azure-ai-translation-text/customization/src/main/java/TextTranslationCustomization.java index 7bbae771c4d5..6639e1f328f5 100644 --- a/sdk/translation/azure-ai-translation-text/customization/src/main/java/TextTranslationClientBuilderCustomization.java +++ b/sdk/translation/azure-ai-translation-text/customization/src/main/java/TextTranslationCustomization.java @@ -5,9 +5,9 @@ import org.slf4j.Logger; /** - * This class contains the customization code to customize the TypeSpec generated code for Text Translation Client Builder. + * This class contains the customization code to customize the TypeSpec generated code for Text Translation. */ -public class TextTranslationClientBuilderCustomization extends Customization { +public class TextTranslationCustomization extends Customization { @Override public void customize(LibraryCustomization customization, Logger logger) { @@ -36,5 +36,29 @@ public void customize(LibraryCustomization customization, Logger logger) { } }); }); + + logger.info("Customizing the TextTranslationServiceVersion enum - removing V3_0"); + customization.getClass("com.azure.ai.translation.text", "TextTranslationServiceVersion") + .customizeAst(ast -> ast.getEnumByName("TextTranslationServiceVersion") + .ifPresent(enumDeclaration -> { + enumDeclaration.getEntries().stream() + .filter(entry -> entry.getNameAsString().equals("V3_0")) + .findFirst() + .ifPresent(enumConstant -> enumConstant.remove()); + } + ) + ); + + logger.info("Customizing the client classes - public protocol methods"); + customization.getClass("com.azure.ai.translation.text", "TextTranslationClient").customizeAst(ast -> + ast.getClassByName("TextTranslationClient").ifPresent(clazz -> { + clazz.getMethodsByName("translateWithResponse").forEach(method -> method.setPublic(true)); + clazz.getMethodsByName("transliterateWithResponse").forEach(method -> method.setPublic(true)); + })); + customization.getClass("com.azure.ai.translation.text", "TextTranslationAsyncClient").customizeAst(ast -> + ast.getClassByName("TextTranslationAsyncClient").ifPresent(clazz -> { + clazz.getMethodsByName("translateWithResponse").forEach(method -> method.setPublic(true)); + clazz.getMethodsByName("transliterateWithResponse").forEach(method -> method.setPublic(true)); + })); } } diff --git a/sdk/translation/azure-ai-translation-text/pom.xml b/sdk/translation/azure-ai-translation-text/pom.xml index 37308ddbab4a..b1fb36e924a1 100644 --- a/sdk/translation/azure-ai-translation-text/pom.xml +++ b/sdk/translation/azure-ai-translation-text/pom.xml @@ -11,7 +11,7 @@ <groupId>com.azure</groupId> <artifactId>azure-ai-translation-text</artifactId> - <version>1.2.0-beta.1</version> <!-- {x-version-update;com.azure:azure-ai-translation-text;current} --> + <version>2.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-ai-translation-text;current} --> <name>Microsoft Azure client library for Text Translation</name> <description>This package contains Microsoft Azure Text Translation client library.</description> diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationAsyncClient.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationAsyncClient.java index d43270cc3354..e191d3be48b3 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationAsyncClient.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationAsyncClient.java @@ -4,18 +4,16 @@ package com.azure.ai.translation.text; import com.azure.ai.translation.text.implementation.TextTranslationClientImpl; -import com.azure.ai.translation.text.models.BreakSentenceItem; -import com.azure.ai.translation.text.models.DictionaryExampleItem; -import com.azure.ai.translation.text.models.DictionaryExampleTextItem; -import com.azure.ai.translation.text.models.DictionaryLookupItem; +import com.azure.ai.translation.text.implementation.models.InputTextItem; +import com.azure.ai.translation.text.implementation.models.TranslateBody; +import com.azure.ai.translation.text.implementation.models.TranslationResult; +import com.azure.ai.translation.text.implementation.models.TransliterateBody; +import com.azure.ai.translation.text.implementation.models.TransliterateResult; import com.azure.ai.translation.text.models.GetSupportedLanguagesResult; -import com.azure.ai.translation.text.models.InputTextItem; import com.azure.ai.translation.text.models.LanguageScope; -import com.azure.ai.translation.text.models.ProfanityAction; -import com.azure.ai.translation.text.models.ProfanityMarker; -import com.azure.ai.translation.text.models.TextType; -import com.azure.ai.translation.text.models.TranslateOptions; +import com.azure.ai.translation.text.models.TranslateInputItem; import com.azure.ai.translation.text.models.TranslatedTextItem; +import com.azure.ai.translation.text.models.TranslationTarget; import com.azure.ai.translation.text.models.TransliteratedText; import com.azure.core.annotation.Generated; import com.azure.core.annotation.ReturnType; @@ -30,7 +28,6 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.BinaryData; import com.azure.core.util.FluxUtil; -import com.azure.core.util.serializer.TypeReference; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -56,54 +53,17 @@ public final class TextTranslationAsyncClient { } /** - * Translate Text. + * Gets the set of languages currently supported by other operations of the Translator. * <p><strong>Query Parameters</strong></p> * <table border="1"> * <caption>Query Parameters</caption> * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>from</td><td>String</td><td>No</td><td>Specifies the language of the input text. Find which languages are - * available to translate from by - * looking up supported languages using the translation scope. If the from parameter isn't specified, - * automatic language detection is applied to determine the source language. - * - * You must use the from parameter rather than autodetection when using the dynamic dictionary feature. - * Note: the dynamic dictionary feature is case-sensitive.</td></tr> - * <tr><td>textType</td><td>String</td><td>No</td><td>Defines whether the text being translated is plain text or - * HTML text. Any HTML needs to be a well-formed, - * complete element. Possible values are: plain (default) or html. Allowed values: "Plain", "Html".</td></tr> - * <tr><td>category</td><td>String</td><td>No</td><td>A string specifying the category (domain) of the translation. - * This parameter is used to get translations - * from a customized system built with Custom Translator. Add the Category ID from your Custom Translator - * project details to this parameter to use your deployed customized system. Default value is: general.</td></tr> - * <tr><td>profanityAction</td><td>String</td><td>No</td><td>Specifies how profanities should be treated in - * translations. - * Possible values are: NoAction (default), Marked or Deleted. Allowed values: "NoAction", "Marked", - * "Deleted".</td></tr> - * <tr><td>profanityMarker</td><td>String</td><td>No</td><td>Specifies how profanities should be marked in - * translations. - * Possible values are: Asterisk (default) or Tag. . Allowed values: "Asterisk", "Tag".</td></tr> - * <tr><td>includeAlignment</td><td>Boolean</td><td>No</td><td>Specifies whether to include alignment projection - * from source text to translated text. - * Possible values are: true or false (default).</td></tr> - * <tr><td>includeSentenceLength</td><td>Boolean</td><td>No</td><td>Specifies whether to include sentence boundaries - * for the input text and the translated text. - * Possible values are: true or false (default).</td></tr> - * <tr><td>suggestedFrom</td><td>String</td><td>No</td><td>Specifies a fallback language if the language of the - * input text can't be identified. - * Language autodetection is applied when the from parameter is omitted. If detection fails, - * the suggestedFrom language will be assumed.</td></tr> - * <tr><td>fromScript</td><td>String</td><td>No</td><td>Specifies the script of the input text.</td></tr> - * <tr><td>toScript</td><td>String</td><td>No</td><td>Specifies the script of the translated text.</td></tr> - * <tr><td>allowFallback</td><td>Boolean</td><td>No</td><td>Specifies that the service is allowed to fall back to a - * general system when a custom system doesn't exist. - * Possible values are: true (default) or false. - * - * allowFallback=false specifies that the translation should only use systems trained for the category specified - * by the request. If a translation for language X to language Y requires chaining through a pivot language E, - * then all the systems in the chain (X → E and E → Y) will need to be custom and have the same category. - * If no system is found with the specific category, the request will return a 400 status code. allowFallback=true - * specifies that the service is allowed to fall back to a general system when a custom system doesn't - * exist.</td></tr> + * <tr><td>scope</td><td>String</td><td>No</td><td>A comma-separated list of names defining the group of languages + * to return. + * Allowed group names are: `translation`, `transliteration` and `dictionary`. + * If no scope is given, then all groups are returned, which is equivalent to passing + * `scope=translation,transliteration,dictionary`. To decide which set of supported languages + * is appropriate for your scenario, see the description of the [response object](#response-body).</td></tr> * </table> * You can add these to a request with {@link RequestOptions#addQueryParam} * <p><strong>Header Parameters</strong></p> @@ -112,278 +72,171 @@ public final class TextTranslationAsyncClient { * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> * <tr><td>X-ClientTraceId</td><td>String</td><td>No</td><td>A client-generated GUID to uniquely identify the * request.</td></tr> + * <tr><td>Accept-Language</td><td>String</td><td>No</td><td>The language to use for user interface strings. Some of + * the fields in the response are names of languages or + * names of regions. Use this parameter to define the language in which these names are returned. + * The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value `fr` + * to request names in French or use the value `zh-Hant` to request names in Chinese Traditional. + * Names are provided in the English language when a target language is not specified or when localization + * is not available.</td></tr> + * <tr><td>If-None-Match</td><td>String</td><td>No</td><td>Passing the value of the ETag response header in an + * If-None-Match field will allow the service to optimize the response. + * If the resource has not been modified, the service will return status code 304 and an empty response + * body.</td></tr> * </table> * You can add these to a request with {@link RequestOptions#addHeader} - * <p><strong>Request Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * text: String (Required) - * } - * ] - * } - * </pre> - * * <p><strong>Response Body Schema</strong></p> * * <pre> * {@code - * [ - * (Required){ - * detectedLanguage (Optional): { - * language: String (Required) - * score: double (Required) + * { + * translation (Optional): { + * String (Required): { + * name: String (Required) + * nativeName: String (Required) + * dir: String(ltr/rtl) (Required) + * models (Required): [ + * String (Required) + * ] * } - * translations (Required): [ - * (Required){ - * to: String (Required) - * text: String (Required) - * transliteration (Optional): { - * text: String (Required) - * script: String (Required) - * } - * alignment (Optional): { - * proj: String (Required) - * } - * sentLen (Optional): { - * srcSentLen (Required): [ - * int (Required) - * ] - * transSentLen (Required): [ - * int (Required) + * } + * transliteration (Optional): { + * String (Required): { + * name: String (Required) + * nativeName: String (Required) + * scripts (Required): [ + * (Required){ + * code: String (Required) + * name: String (Required) + * nativeName: String (Required) + * dir: String(ltr/rtl) (Required) + * toScripts (Required): [ + * (Required){ + * code: String (Required) + * name: String (Required) + * nativeName: String (Required) + * dir: String(ltr/rtl) (Required) + * } * ] * } - * } - * ] - * sourceText (Optional): { - * text: String (Required) + * ] * } * } - * ] + * models (Optional): [ + * String (Optional) + * ] + * } * } * </pre> * - * @param targetLanguages Specifies the language of the output text. The target language must be one of the - * supported languages included - * in the translation scope. For example, use to=de to translate to German. - * It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. - * For example, use to=de&to=it to translate to German and Italian. - * @param body Defines the content of the request. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return the set of languages currently supported by other operations of the Translator along with + * {@link Response} on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<BinaryData>> translateWithResponse(List<String> targetLanguages, BinaryData body, - RequestOptions requestOptions) { - return this.serviceClient.translateWithResponseAsync(targetLanguages, body, requestOptions); + public Mono<Response<BinaryData>> getSupportedLanguagesWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getSupportedLanguagesWithResponseAsync(requestOptions); } /** - * Transliterate Text. - * <p><strong>Header Parameters</strong></p> - * <table border="1"> - * <caption>Header Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>X-ClientTraceId</td><td>String</td><td>No</td><td>A client-generated GUID to uniquely identify the - * request.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addHeader} - * <p><strong>Request Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * text: String (Required) - * } - * ] - * } - * </pre> - * - * <p><strong>Response Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * text: String (Required) - * script: String (Required) - * } - * ] - * } - * </pre> + * Gets the set of languages currently supported by other operations of the Translator. * - * @param language Specifies the language of the text to convert from one script to another. - * Possible languages are listed in the transliteration scope obtained by querying the service - * for its supported languages. - * @param sourceLanguageScript Specifies the script used by the input text. Look up supported languages using the - * transliteration scope, - * to find input scripts available for the selected language. - * @param targetLanguageScript Specifies the output script. Look up supported languages using the transliteration - * scope, to find output - * scripts available for the selected combination of input language and input script. - * @param body Defines the content of the request. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the set of languages currently supported by other operations of the Translator on successful completion + * of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<BinaryData>> transliterateWithResponse(String language, String sourceLanguageScript, - String targetLanguageScript, BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.transliterateWithResponseAsync(language, sourceLanguageScript, targetLanguageScript, - body, requestOptions); + public Mono<GetSupportedLanguagesResult> getSupportedLanguages() { + // Generated convenience method for getSupportedLanguagesWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getSupportedLanguagesWithResponse(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(GetSupportedLanguagesResult.class)); } /** - * Find Sentence Boundaries. - * <p><strong>Query Parameters</strong></p> - * <table border="1"> - * <caption>Query Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>language</td><td>String</td><td>No</td><td>Language tag identifying the language of the input text. - * If a code isn't specified, automatic language detection will be applied.</td></tr> - * <tr><td>script</td><td>String</td><td>No</td><td>Script tag identifying the script used by the input text. - * If a script isn't specified, the default script of the language will be assumed.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addQueryParam} - * <p><strong>Header Parameters</strong></p> - * <table border="1"> - * <caption>Header Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>X-ClientTraceId</td><td>String</td><td>No</td><td>A client-generated GUID to uniquely identify the - * request.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addHeader} - * <p><strong>Request Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * text: String (Required) - * } - * ] - * } - * </pre> - * - * <p><strong>Response Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * detectedLanguage (Optional): { - * language: String (Required) - * score: double (Required) - * } - * sentLen (Required): [ - * int (Required) - * ] - * } - * ] - * } - * </pre> + * Gets the set of languages currently supported by other operations of the Translator. * - * @param body Defines the content of the request. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @param scope A comma-separated list of names defining the group of languages to return. + * Allowed group names are: `translation`, `transliteration` and `models`. + * If no scope is given, then all groups are returned, which is equivalent to passing + * `scope=translation,transliteration,models`. To decide which set of supported languages + * is appropriate for your scenario, see the description of the [response object](#response-body). + * @param acceptLanguage The language to use for user interface strings. Some of the fields in the response are + * names of languages or + * names of regions. Use this parameter to define the language in which these names are returned. + * The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value `fr` + * to request names in French or use the value `zh-Hant` to request names in Chinese Traditional. + * Names are provided in the English language when a target language is not specified or when localization + * is not available. + * @param ifNoneMatch Passing the value of the ETag response header in an If-None-Match field will allow the service + * to optimize the response. + * If the resource has not been modified, the service will return status code 304 and an empty response body. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the set of languages currently supported by other operations of the Translator on successful completion + * of {@link Mono}. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<BinaryData>> findSentenceBoundariesWithResponse(BinaryData body, - RequestOptions requestOptions) { - return this.serviceClient.findSentenceBoundariesWithResponseAsync(body, requestOptions); + private Mono<GetSupportedLanguagesResult> getSupportedLanguages(String scope, String acceptLanguage, + String ifNoneMatch) { + // Generated convenience method for getSupportedLanguagesWithResponse + RequestOptions requestOptions = new RequestOptions(); + if (scope != null) { + requestOptions.addQueryParam("scope", scope, false); + } + if (acceptLanguage != null) { + requestOptions.setHeader(HttpHeaderName.ACCEPT_LANGUAGE, acceptLanguage); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + return getSupportedLanguagesWithResponse(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(GetSupportedLanguagesResult.class)); } /** - * Lookup Dictionary Entries. - * <p><strong>Header Parameters</strong></p> - * <table border="1"> - * <caption>Header Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>X-ClientTraceId</td><td>String</td><td>No</td><td>A client-generated GUID to uniquely identify the - * request.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addHeader} - * <p><strong>Request Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * text: String (Required) - * } - * ] - * } - * </pre> - * - * <p><strong>Response Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * normalizedSource: String (Required) - * displaySource: String (Required) - * translations (Required): [ - * (Required){ - * normalizedTarget: String (Required) - * displayTarget: String (Required) - * posTag: String (Required) - * confidence: double (Required) - * prefixWord: String (Required) - * backTranslations (Required): [ - * (Required){ - * normalizedText: String (Required) - * displayText: String (Required) - * numExamples: int (Required) - * frequencyCount: int (Required) - * } - * ] - * } - * ] - * } - * ] - * } - * </pre> + * Gets the set of languages currently supported by other operations of the Translator. * - * @param sourceLanguage Specifies the language of the input text. - * The source language must be one of the supported languages included in the dictionary scope. - * @param targetLanguage Specifies the language of the output text. - * The target language must be one of the supported languages included in the dictionary scope. - * @param body Defines the content of the request. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @param scopes List of names defining the group of languages to return. + * @param acceptLanguage The language to use for user interface strings. Some of the fields in the response are + * names of languages or + * names of regions. Use this parameter to define the language in which these names are returned. + * The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value `fr` + * to request names in French or use the value `zh-Hant` to request names in Chinese Traditional. + * Names are provided in the English language when a target language is not specified or when localization + * is not available. + * @param ifNoneMatch Passing the value of the ETag response header in an If-None-Match field will allow the service + * to optimize the response. + * If the resource has not been modified, the service will return status code 304 and an empty response body. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the set of languages currently supported by other operations of the Translator. */ - @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<BinaryData>> lookupDictionaryEntriesWithResponse(String sourceLanguage, String targetLanguage, - BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.lookupDictionaryEntriesWithResponseAsync(sourceLanguage, targetLanguage, body, - requestOptions); + public Mono<GetSupportedLanguagesResult> getSupportedLanguages(List<LanguageScope> scopes, String acceptLanguage, + String ifNoneMatch) { + return getSupportedLanguages(convertToScopesString(scopes), acceptLanguage, ifNoneMatch); } /** - * Lookup Dictionary Examples. + * Transliterate Text. * <p><strong>Header Parameters</strong></p> * <table border="1"> * <caption>Header Parameters</caption> @@ -396,12 +249,13 @@ public Mono<Response<BinaryData>> lookupDictionaryEntriesWithResponse(String sou * * <pre> * {@code - * [ - * (Required){ - * text: String (Required) - * translation: String (Required) - * } - * ] + * { + * inputs (Required): [ + * (Required){ + * text: String (Required) + * } + * ] + * } * } * </pre> * @@ -409,557 +263,127 @@ public Mono<Response<BinaryData>> lookupDictionaryEntriesWithResponse(String sou * * <pre> * {@code - * [ - * (Required){ - * normalizedSource: String (Required) - * normalizedTarget: String (Required) - * examples (Required): [ - * (Required){ - * sourcePrefix: String (Required) - * sourceTerm: String (Required) - * sourceSuffix: String (Required) - * targetPrefix: String (Required) - * targetTerm: String (Required) - * targetSuffix: String (Required) - * } - * ] - * } - * ] + * { + * value (Required): [ + * (Required){ + * text: String (Required) + * script: String (Required) + * } + * ] + * } * } * </pre> * - * @param sourceLanguage Specifies the language of the input text. - * The source language must be one of the supported languages included in the dictionary scope. - * @param targetLanguage Specifies the language of the output text. - * The target language must be one of the supported languages included in the dictionary scope. - * @param body Defines the content of the request. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<BinaryData>> lookupDictionaryExamplesWithResponse(String sourceLanguage, String targetLanguage, - BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.lookupDictionaryExamplesWithResponseAsync(sourceLanguage, targetLanguage, body, - requestOptions); - } - - /** - * Translate Text. - * - * @param targetLanguages Specifies the language of the output text. The target language must be one of the - * supported languages included - * in the translation scope. For example, use to=de to translate to German. - * It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. - * For example, use to=de&to=it to translate to German and Italian. - * @param body Defines the content of the request. - * @param clientTraceId A client-generated GUID to uniquely identify the request. - * @param sourceLanguage Specifies the language of the input text. Find which languages are available to translate - * from by - * looking up supported languages using the translation scope. If the from parameter isn't specified, - * automatic language detection is applied to determine the source language. - * - * You must use the from parameter rather than autodetection when using the dynamic dictionary feature. - * Note: the dynamic dictionary feature is case-sensitive. - * @param textType Defines whether the text being translated is plain text or HTML text. Any HTML needs to be a - * well-formed, - * complete element. Possible values are: plain (default) or html. - * @param category A string specifying the category (domain) of the translation. This parameter is used to get - * translations - * from a customized system built with Custom Translator. Add the Category ID from your Custom Translator - * project details to this parameter to use your deployed customized system. Default value is: general. - * @param profanityAction Specifies how profanities should be treated in translations. - * Possible values are: NoAction (default), Marked or Deleted. - * @param profanityMarker Specifies how profanities should be marked in translations. - * Possible values are: Asterisk (default) or Tag. - * @param includeAlignment Specifies whether to include alignment projection from source text to translated text. - * Possible values are: true or false (default). - * @param includeSentenceLength Specifies whether to include sentence boundaries for the input text and the - * translated text. - * Possible values are: true or false (default). - * @param suggestedSourceLanguage Specifies a fallback language if the language of the input text can't be - * identified. - * Language autodetection is applied when the from parameter is omitted. If detection fails, - * the suggestedFrom language will be assumed. - * @param sourceLanguageScript Specifies the script of the input text. - * @param targetLanguageScript Specifies the script of the translated text. - * @param allowFallback Specifies that the service is allowed to fall back to a general system when a custom system - * doesn't exist. - * Possible values are: true (default) or false. - * - * allowFallback=false specifies that the translation should only use systems trained for the category specified - * by the request. If a translation for language X to language Y requires chaining through a pivot language E, - * then all the systems in the chain (X → E and E → Y) will need to be custom and have the same category. - * If no system is found with the specific category, the request will return a 400 status code. allowFallback=true - * specifies that the service is allowed to fall back to a general system when a custom system doesn't exist. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - private Mono<List<TranslatedTextItem>> translate(List<String> targetLanguages, List<InputTextItem> body, - String clientTraceId, String sourceLanguage, TextType textType, String category, - ProfanityAction profanityAction, ProfanityMarker profanityMarker, Boolean includeAlignment, - Boolean includeSentenceLength, String suggestedSourceLanguage, String sourceLanguageScript, - String targetLanguageScript, Boolean allowFallback) { - // Generated convenience method for translateWithResponse - RequestOptions requestOptions = new RequestOptions(); - if (clientTraceId != null) { - requestOptions.setHeader(HttpHeaderName.fromString("X-ClientTraceId"), clientTraceId); - } - if (sourceLanguage != null) { - requestOptions.addQueryParam("from", sourceLanguage, false); - } - if (textType != null) { - requestOptions.addQueryParam("textType", textType.toString(), false); - } - if (category != null) { - requestOptions.addQueryParam("category", category, false); - } - if (profanityAction != null) { - requestOptions.addQueryParam("profanityAction", profanityAction.toString(), false); - } - if (profanityMarker != null) { - requestOptions.addQueryParam("profanityMarker", profanityMarker.toString(), false); - } - if (includeAlignment != null) { - requestOptions.addQueryParam("includeAlignment", String.valueOf(includeAlignment), false); - } - if (includeSentenceLength != null) { - requestOptions.addQueryParam("includeSentenceLength", String.valueOf(includeSentenceLength), false); - } - if (suggestedSourceLanguage != null) { - requestOptions.addQueryParam("suggestedFrom", suggestedSourceLanguage, false); - } - if (sourceLanguageScript != null) { - requestOptions.addQueryParam("fromScript", sourceLanguageScript, false); - } - if (targetLanguageScript != null) { - requestOptions.addQueryParam("toScript", targetLanguageScript, false); - } - if (allowFallback != null) { - requestOptions.addQueryParam("allowFallback", String.valueOf(allowFallback), false); - } - return translateWithResponse(targetLanguages, BinaryData.fromObject(body), requestOptions) - .flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_TRANSLATED_TEXT_ITEM)); - } - - /** - * Translate Text. - * - * @param targetLanguages Specifies the language of the output text. The target language must be one of the - * supported languages included - * in the translation scope. For example, use to=de to translate to German. - * It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. - * For example, use to=de&to=it to translate to German and Italian. - * @param body Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - private Mono<List<TranslatedTextItem>> translateInner(List<String> targetLanguages, List<InputTextItem> body) { - // Generated convenience method for translateWithResponse - RequestOptions requestOptions = new RequestOptions(); - return translateWithResponse(targetLanguages, BinaryData.fromObject(body), requestOptions) - .flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_TRANSLATED_TEXT_ITEM)); - } - - /** - * Translate Text. - * <p> - * This method is used when you have single target language and multiple texts to translate. - * </p> - * - * @param targetLanguage Specifies the language of the output text. The target language must be one of the - * supported languages included - * in the translation scope. For example, use to=de to translate to German. - * It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. - * For example, use to=de&to=it to translate to German and Italian. - * @param texts Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<List<TranslatedTextItem>> translate(String targetLanguage, List<String> texts) { - return translateInner(Arrays.asList(targetLanguage), convertTextToData(texts)); - } - - /** - * Translate Text. - * <p> - * This method is used when you have single target language and single text to translate. - * </p> - * - * @param targetLanguage Specifies the language of the output text. The target language must be one of the - * supported languages included - * in the translation scope. For example, use to=de to translate to German. - * It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. - * For example, use to=de&to=it to translate to German and Italian. - * @param text Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<TranslatedTextItem> translate(String targetLanguage, String text) { - return translate(targetLanguage, Arrays.asList(text)) - .map(translatedTextItems -> translatedTextItems.isEmpty() ? null : translatedTextItems.get(0)) - .defaultIfEmpty(null); - } - - /** - * Translate Text. - * <p> - * This method is used when you have one input text and the optional parameters are needed such as specification - * of a source language, profanity handling etc. - * </p> - * - * @param text Text to translate. - * @param translateOptions Translate Options. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<TranslatedTextItem> translate(String text, TranslateOptions translateOptions) { - return translate(Arrays.asList(text), translateOptions) - .map(translatedTextItems -> translatedTextItems.isEmpty() ? null : translatedTextItems.get(0)) - .defaultIfEmpty(null); - } - - /** - * Translate Text. - * <p> - * This method is used when you have multiple texts and the optional parameters are needed such as specification - * of a source language, profanity handling etc.. - * </p> - * - * @param texts List of text to translate. - * @param translateOptions Translate Options. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<List<TranslatedTextItem>> translate(List<String> texts, TranslateOptions translateOptions) { - List<InputTextItem> content = new ArrayList<>(); - for (String text : texts) { - content.add(new InputTextItem(text)); - } - return translate(translateOptions.getTargetLanguages(), content, translateOptions.getClientTraceId(), - translateOptions.getSourceLanguage(), translateOptions.getTextType(), translateOptions.getCategory(), - translateOptions.getProfanityAction(), translateOptions.getProfanityMarker(), - translateOptions.isIncludeAlignment(), translateOptions.isIncludeSentenceLength(), - translateOptions.getSuggestedSourceLanguage(), translateOptions.getSourceLanguageScript(), - translateOptions.getTargetLanguageScript(), translateOptions.isAllowFallback()); - } - - /** - * Transliterate Text. - * * @param language Specifies the language of the text to convert from one script to another. - * Possible languages are listed in the transliteration scope obtained by querying the service - * for its supported languages. - * @param sourceLanguageScript Specifies the script used by the input text. Look up supported languages using the - * transliteration scope, - * to find input scripts available for the selected language. - * @param targetLanguageScript Specifies the output script. Look up supported languages using the transliteration - * scope, to find output - * scripts available for the selected combination of input language and input script. - * @param body Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - private Mono<List<TransliteratedText>> transliterateInner(String language, String sourceLanguageScript, - String targetLanguageScript, List<InputTextItem> body) { - // Generated convenience method for transliterateWithResponse - RequestOptions requestOptions = new RequestOptions(); - return transliterateWithResponse(language, sourceLanguageScript, targetLanguageScript, - BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_TRANSLITERATED_TEXT)); - } - - /** - * Transliterate Text. - * <p> - * This method is used when you have multiple texts to transliterate and you want to provide client trace id. - * </p> - * - * @param language Specifies the language of the text to convert from one script to another. - * Possible languages are listed in the transliteration scope obtained by querying the service - * for its supported languages. - * @param sourceLanguageScript Specifies the script used by the input text. Look up supported languages using the - * transliteration scope, - * to find input scripts available for the selected language. - * @param targetLanguageScript Specifies the output script. Look up supported languages using the transliteration - * scope, to find output - * scripts available for the selected combination of input language and input script. - * @param body Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<List<TransliteratedText>> transliterate(String language, String sourceLanguageScript, - String targetLanguageScript, List<String> body) { - return transliterateInner(language, sourceLanguageScript, targetLanguageScript, convertTextToData(body)); - } - - /** - * Transliterate Text. - * <p> - * This method is used when you have single text to transliterate and you want to provide client trace id. - * </p> - * - * @param language Specifies the language of the text to convert from one script to another. - * Possible languages are listed in the transliteration scope obtained by querying the service - * for its supported languages. - * @param sourceLanguageScript Specifies the script used by the input text. Look up supported languages using the - * transliteration scope, - * to find input scripts available for the selected language. - * @param targetLanguageScript Specifies the output script. Look up supported languages using the transliteration - * scope, to find output - * scripts available for the selected combination of input language and input script. - * @param text Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<TransliteratedText> transliterate(String language, String sourceLanguageScript, - String targetLanguageScript, String text) { - return transliterate(language, sourceLanguageScript, targetLanguageScript, Arrays.asList(text)) - .map(translatedTextItems -> translatedTextItems.isEmpty() ? null : translatedTextItems.get(0)) - .defaultIfEmpty(null); - } - - /** - * Find Sentence Boundaries. - * - * @param body Defines the content of the request. - * @param language Language tag identifying the language of the input text. - * If a code isn't specified, automatic language detection will be applied. - * @param script Script tag identifying the script used by the input text. - * If a script isn't specified, the default script of the language will be assumed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - private Mono<List<BreakSentenceItem>> findSentenceBoundariesInner(List<InputTextItem> body, String language, - String script) { - // Generated convenience method for findSentenceBoundariesWithResponse - RequestOptions requestOptions = new RequestOptions(); - if (language != null) { - requestOptions.addQueryParam("language", language, false); - } - if (script != null) { - requestOptions.addQueryParam("script", script, false); - } - return findSentenceBoundariesWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_BREAK_SENTENCE_ITEM)); - } - - /** - * Find Sentence Boundaries. - * <p> - * This method is used when you have multiple texts for which you want to find sentence boundaries and you want to - * provide - * client trace id. - * </p> - * - * @param texts Defines the content of the request. - * @param language Language tag identifying the language of the input text. - * If a code isn't specified, automatic language detection will be applied. - * @param script Script tag identifying the script used by the input text. - * If a script isn't specified, the default script of the language will be assumed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<List<BreakSentenceItem>> findSentenceBoundaries(List<String> texts, String language, String script) { - return findSentenceBoundariesInner(convertTextToData(texts), language, script); - } - - /** - * Find Sentence Boundaries. - * <p> - * This method is used when you have single text for which you want to find sentence boundaries and you want to - * provide - * client trace id. - * </p> - * - * @param text Defines the content of the request. - * @param language Language tag identifying the language of the input text. - * If a code isn't specified, automatic language detection will be applied. - * @param script Script tag identifying the script used by the input text. - * If a script isn't specified, the default script of the language will be assumed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<BreakSentenceItem> findSentenceBoundaries(String text, String language, String script) { - return findSentenceBoundaries(Arrays.asList(text), language, script) - .map(translatedTextItems -> translatedTextItems.isEmpty() ? null : translatedTextItems.get(0)) - .defaultIfEmpty(null); - } - - /** - * Find Sentence Boundaries. - * - * @param body Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - private Mono<List<BreakSentenceItem>> findSentenceBoundariesInner(List<InputTextItem> body) { - // Generated convenience method for findSentenceBoundariesWithResponse - RequestOptions requestOptions = new RequestOptions(); - return findSentenceBoundariesWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_BREAK_SENTENCE_ITEM)); - } - - /** - * Find Sentence Boundaries. - * <p> - * This method is used when you have multiple texts for which you want to find sentence boundaries and you want - * the source language to be auto-detected by the service. - * </p> - * - * @param texts Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * Possible languages are listed in the transliteration scope obtained by querying the service + * for its supported languages. + * @param fromScript Specifies the script used by the input text. Look up supported languages using the + * transliteration scope, + * to find input scripts available for the selected language. + * @param toScript Specifies the output script. Look up supported languages using the transliteration scope, to find + * output + * scripts available for the selected combination of input language and input script. + * @param transliterateInput Defines the content of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return response for the transliteration API along with {@link Response} on successful completion of + * {@link Mono}. */ + @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<List<BreakSentenceItem>> findSentenceBoundaries(List<String> texts) { - return findSentenceBoundariesInner(convertTextToData(texts)); + public Mono<Response<BinaryData>> transliterateWithResponse(String language, String fromScript, String toScript, + BinaryData transliterateInput, RequestOptions requestOptions) { + return this.serviceClient.transliterateWithResponseAsync(language, fromScript, toScript, transliterateInput, + requestOptions); } /** - * Find Sentence Boundaries. - * <p> - * This method is used when you have single text for which you want to find sentence boundaries and you want - * the source language to be auto-detected by the service. - * </p> + * Transliterate Text. * - * @param text Defines the content of the request. + * @param language Specifies the language of the text to convert from one script to another. + * Possible languages are listed in the transliteration scope obtained by querying the service + * for its supported languages. + * @param fromScript Specifies the script used by the input text. Look up supported languages using the + * transliteration scope, + * to find input scripts available for the selected language. + * @param toScript Specifies the output script. Look up supported languages using the transliteration scope, to find + * output + * scripts available for the selected combination of input language and input script. + * @param transliterateInput Defines the content of the request. + * @param clientTraceId A client-generated GUID to uniquely identify the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return response for the transliteration API on successful completion of {@link Mono}. */ + @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<BreakSentenceItem> findSentenceBoundaries(String text) { - return findSentenceBoundaries(Arrays.asList(text)) - .map(translatedTextItems -> translatedTextItems.isEmpty() ? null : translatedTextItems.get(0)) - .defaultIfEmpty(null); + Mono<TransliterateResult> transliterate(String language, String fromScript, String toScript, + TransliterateBody transliterateInput, String clientTraceId) { + // Generated convenience method for transliterateWithResponse + RequestOptions requestOptions = new RequestOptions(); + if (clientTraceId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("X-ClientTraceId"), clientTraceId); + } + return transliterateWithResponse(language, fromScript, toScript, BinaryData.fromObject(transliterateInput), + requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(TransliterateResult.class)); } /** - * Lookup Dictionary Entries. + * Transliterate Text. * - * @param sourceLanguage Specifies the language of the input text. - * The source language must be one of the supported languages included in the dictionary scope. - * @param targetLanguage Specifies the language of the output text. - * The target language must be one of the supported languages included in the dictionary scope. - * @param body Defines the content of the request. + * @param language Specifies the language of the text to convert from one script to another. + * Possible languages are listed in the transliteration scope obtained by querying the service + * for its supported languages. + * @param fromScript Specifies the script used by the input text. Look up supported languages using the + * transliteration scope, + * to find input scripts available for the selected language. + * @param toScript Specifies the output script. Look up supported languages using the transliteration scope, to find + * output + * scripts available for the selected combination of input language and input script. + * @param transliterateInput Defines the content of the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return response for the transliteration API on successful completion of {@link Mono}. */ - private Mono<List<DictionaryLookupItem>> lookupDictionaryEntriesInner(String sourceLanguage, String targetLanguage, - List<InputTextItem> body) { - // Generated convenience method for lookupDictionaryEntriesWithResponse + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<TransliterateResult> transliterate(String language, String fromScript, String toScript, + TransliterateBody transliterateInput) { + // Generated convenience method for transliterateWithResponse RequestOptions requestOptions = new RequestOptions(); - return lookupDictionaryEntriesWithResponse(sourceLanguage, targetLanguage, BinaryData.fromObject(body), + return transliterateWithResponse(language, fromScript, toScript, BinaryData.fromObject(transliterateInput), requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_DICTIONARY_LOOKUP_ITEM)); + .map(protocolMethodData -> protocolMethodData.toObject(TransliterateResult.class)); } /** - * Lookup Dictionary Entries. + * Transliterate Text. * <p> - * This method is used when you want lookup multiple entries in the dictionary and you want to provide - * client trace id. + * This method is used when you have multiple texts to transliterate and you want to provide client trace id. * </p> * - * @param sourceLanguage Specifies the language of the input text. - * The source language must be one of the supported languages included in the dictionary scope. - * @param targetLanguage Specifies the language of the output text. - * The target language must be one of the supported languages included in the dictionary scope. - * @param texts Defines the content of the request. + * @param language Specifies the language of the text to convert from one script to another. + * Possible languages are listed in the transliteration scope obtained by querying the service + * for its supported languages. + * @param fromScript Specifies the script used by the input text. Look up supported languages using the + * transliteration scope, + * to find input scripts available for the selected language. + * @param toScript Specifies the output script. Look up supported languages using the transliteration + * scope, to find output + * scripts available for the selected combination of input language and input script. + * @param inputs Defines the text inputs to transliterate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -969,22 +393,27 @@ private Mono<List<DictionaryLookupItem>> lookupDictionaryEntriesInner(String sou * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<List<DictionaryLookupItem>> lookupDictionaryEntries(String sourceLanguage, String targetLanguage, - List<String> texts) { - return lookupDictionaryEntriesInner(sourceLanguage, targetLanguage, convertTextToData(texts)); + public Mono<List<TransliteratedText>> transliterate(String language, String fromScript, String toScript, + List<String> inputs) { + TransliterateBody transliterateBody = new TransliterateBody(convertTextsToInputTextItems(inputs)); + return transliterate(language, fromScript, toScript, transliterateBody).map(result -> result.getValue()); } /** - * Lookup Dictionary Entries. + * Transliterate Text. * <p> - * This method is used when you want lookup single entry in the dictionary and you want to provide - * client trace id. + * This method is used when you have single text to transliterate and you want to provide client trace id. * </p> * - * @param sourceLanguage Specifies the language of the input text. - * The source language must be one of the supported languages included in the dictionary scope. - * @param targetLanguage Specifies the language of the output text. - * The target language must be one of the supported languages included in the dictionary scope. + * @param language Specifies the language of the text to convert from one script to another. + * Possible languages are listed in the transliteration scope obtained by querying the service + * for its supported languages. + * @param fromScript Specifies the script used by the input text. Look up supported languages using the + * transliteration scope, + * to find input scripts available for the selected language. + * @param toScript Specifies the output script. Look up supported languages using the transliteration + * scope, to find output + * scripts available for the selected combination of input language and input script. * @param text Defines the content of the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -995,257 +424,195 @@ public Mono<List<DictionaryLookupItem>> lookupDictionaryEntries(String sourceLan * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<DictionaryLookupItem> lookupDictionaryEntries(String sourceLanguage, String targetLanguage, - String text) { - return lookupDictionaryEntries(sourceLanguage, targetLanguage, Arrays.asList(text)) + public Mono<TransliteratedText> transliterate(String language, String fromScript, String toScript, String text) { + return transliterate(language, fromScript, toScript, Arrays.asList(text)) .map(translatedTextItems -> translatedTextItems.isEmpty() ? null : translatedTextItems.get(0)) .defaultIfEmpty(null); } /** - * Lookup Dictionary Examples. - * - * @param sourceLanguage Specifies the language of the input text. - * The source language must be one of the supported languages included in the dictionary scope. - * @param targetLanguage Specifies the language of the output text. - * The target language must be one of the supported languages included in the dictionary scope. - * @param body Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<List<DictionaryExampleItem>> lookupDictionaryExamples(String sourceLanguage, String targetLanguage, - List<DictionaryExampleTextItem> body) { - // Generated convenience method for lookupDictionaryExamplesWithResponse - RequestOptions requestOptions = new RequestOptions(); - return lookupDictionaryExamplesWithResponse(sourceLanguage, targetLanguage, BinaryData.fromObject(body), - requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_DICTIONARY_EXAMPLE_ITEM)); - } - - @Generated - private static final TypeReference<List<TransliteratedText>> TYPE_REFERENCE_LIST_TRANSLITERATED_TEXT - = new TypeReference<List<TransliteratedText>>() { - }; - - @Generated - private static final TypeReference<List<BreakSentenceItem>> TYPE_REFERENCE_LIST_BREAK_SENTENCE_ITEM - = new TypeReference<List<BreakSentenceItem>>() { - }; - - @Generated - private static final TypeReference<List<DictionaryLookupItem>> TYPE_REFERENCE_LIST_DICTIONARY_LOOKUP_ITEM - = new TypeReference<List<DictionaryLookupItem>>() { - }; - - @Generated - private static final TypeReference<List<DictionaryExampleItem>> TYPE_REFERENCE_LIST_DICTIONARY_EXAMPLE_ITEM - = new TypeReference<List<DictionaryExampleItem>>() { - }; - - @Generated - private static final TypeReference<List<TranslatedTextItem>> TYPE_REFERENCE_LIST_TRANSLATED_TEXT_ITEM - = new TypeReference<List<TranslatedTextItem>>() { - }; - - /** - * Gets the set of languages currently supported by other operations of the Translator. - * <p><strong>Query Parameters</strong></p> - * <table border="1"> - * <caption>Query Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>scope</td><td>String</td><td>No</td><td>A comma-separated list of names defining the group of languages - * to return. - * Allowed group names are: `translation`, `transliteration` and `dictionary`. - * If no scope is given, then all groups are returned, which is equivalent to passing - * `scope=translation,transliteration,dictionary`. To decide which set of supported languages - * is appropriate for your scenario, see the description of the [response object](#response-body).</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addQueryParam} + * Translate Text. * <p><strong>Header Parameters</strong></p> * <table border="1"> * <caption>Header Parameters</caption> * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> * <tr><td>X-ClientTraceId</td><td>String</td><td>No</td><td>A client-generated GUID to uniquely identify the * request.</td></tr> - * <tr><td>Accept-Language</td><td>String</td><td>No</td><td>The language to use for user interface strings. Some of - * the fields in the response are names of languages or - * names of regions. Use this parameter to define the language in which these names are returned. - * The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value `fr` - * to request names in French or use the value `zh-Hant` to request names in Chinese Traditional. - * Names are provided in the English language when a target language is not specified or when localization - * is not available.</td></tr> - * <tr><td>If-None-Match</td><td>String</td><td>No</td><td>Passing the value of the ETag response header in an - * If-None-Match field will allow the service to optimize the response. - * If the resource has not been modified, the service will return status code 304 and an empty response - * body.</td></tr> * </table> * You can add these to a request with {@link RequestOptions#addHeader} - * <p><strong>Response Body Schema</strong></p> + * <p><strong>Request Body Schema</strong></p> * * <pre> * {@code * { - * translation (Optional): { - * String (Required): { - * name: String (Required) - * nativeName: String (Required) - * dir: String(ltr/rtl) (Required) - * } - * } - * transliteration (Optional): { - * String (Required): { - * name: String (Required) - * nativeName: String (Required) - * scripts (Required): [ + * inputs (Required): [ + * (Required){ + * text: String (Required) + * script: String (Optional) + * language: String (Optional) + * textType: String(Plain/Html) (Optional) + * targets (Required): [ * (Required){ - * code: String (Required) - * name: String (Required) - * nativeName: String (Required) - * dir: String(ltr/rtl) (Required) - * toScripts (Required): [ - * (Required){ - * code: String (Required) - * name: String (Required) - * nativeName: String (Required) - * dir: String(ltr/rtl) (Required) + * language: String (Required) + * script: String (Optional) + * profanityAction: String(NoAction/Marked/Deleted) (Optional) + * profanityMarker: String(Asterisk/Tag) (Optional) + * deploymentName: String (Optional) + * allowFallback: Boolean (Optional) + * grade: String (Optional) + * tone: String (Optional) + * gender: String (Optional) + * adaptiveDatasetId: String (Optional) + * referenceTextPairs (Optional): [ + * (Optional){ + * source: String (Required) + * target: String (Required) * } * ] * } * ] * } - * } - * dictionary (Optional): { - * String (Required): { - * name: String (Required) - * nativeName: String (Required) - * dir: String(ltr/rtl) (Required) + * ] + * } + * } + * </pre> + * + * <p><strong>Response Body Schema</strong></p> + * + * <pre> + * {@code + * { + * value (Required): [ + * (Required){ + * detectedLanguage (Optional): { + * language: String (Required) + * score: double (Required) + * } * translations (Required): [ * (Required){ - * name: String (Required) - * nativeName: String (Required) - * dir: String(ltr/rtl) (Required) - * code: String (Required) + * language: String (Required) + * sourceCharacters: Integer (Optional) + * instructionTokens: Integer (Optional) + * sourceTokens: Integer (Optional) + * responseTokens: Integer (Optional) + * targetTokens: Integer (Optional) + * text: String (Required) * } * ] * } - * } + * ] * } * } * </pre> * + * @param translateInput Defines the content of the request. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the set of languages currently supported by other operations of the Translator along with - * {@link Response} on successful completion of {@link Mono}. + * @return response for the translation API along with {@link Response} on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<BinaryData>> getSupportedLanguagesWithResponse(RequestOptions requestOptions) { - return this.serviceClient.getSupportedLanguagesWithResponseAsync(requestOptions); + public Mono<Response<BinaryData>> translateWithResponse(BinaryData translateInput, RequestOptions requestOptions) { + return this.serviceClient.translateWithResponseAsync(translateInput, requestOptions); } /** - * Gets the set of languages currently supported by other operations of the Translator. + * Translate Text. * - * @param scope A comma-separated list of names defining the group of languages to return. - * Allowed group names are: `translation`, `transliteration` and `dictionary`. - * If no scope is given, then all groups are returned, which is equivalent to passing - * `scope=translation,transliteration,dictionary`. To decide which set of supported languages - * is appropriate for your scenario, see the description of the [response object](#response-body). - * @param acceptLanguage The language to use for user interface strings. Some of the fields in the response are - * names of languages or - * names of regions. Use this parameter to define the language in which these names are returned. - * The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value `fr` - * to request names in French or use the value `zh-Hant` to request names in Chinese Traditional. - * Names are provided in the English language when a target language is not specified or when localization - * is not available. - * @param ifNoneMatch Passing the value of the ETag response header in an If-None-Match field will allow the service - * to optimize the response. - * If the resource has not been modified, the service will return status code 304 and an empty response body. + * @param translateInput Defines the content of the request. + * @param clientTraceId A client-generated GUID to uniquely identify the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the set of languages currently supported by other operations of the Translator on successful completion - * of {@link Mono}. + * @return response for the translation API on successful completion of {@link Mono}. */ - private Mono<GetSupportedLanguagesResult> getSupportedLanguages(String scope, String acceptLanguage, - String ifNoneMatch) { - // Generated convenience method for getSupportedLanguagesWithResponse + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono<TranslationResult> translate(TranslateBody translateInput, String clientTraceId) { + // Generated convenience method for translateWithResponse RequestOptions requestOptions = new RequestOptions(); - if (scope != null) { - requestOptions.addQueryParam("scope", scope, false); - } - if (acceptLanguage != null) { - requestOptions.setHeader(HttpHeaderName.ACCEPT_LANGUAGE, acceptLanguage); - } - if (ifNoneMatch != null) { - requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + if (clientTraceId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("X-ClientTraceId"), clientTraceId); } - return getSupportedLanguagesWithResponse(requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(GetSupportedLanguagesResult.class)); + return translateWithResponse(BinaryData.fromObject(translateInput), requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(TranslationResult.class)); } /** - * Gets the set of languages currently supported by other operations of the Translator. + * Translate Text. * - * @param scopes List of names defining the group of languages to return. - * @param acceptLanguage The language to use for user interface strings. Some of the fields in the response are - * names of languages or - * names of regions. Use this parameter to define the language in which these names are returned. - * The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value `fr` - * to request names in French or use the value `zh-Hant` to request names in Chinese Traditional. - * Names are provided in the English language when a target language is not specified or when localization - * is not available. - * @param ifNoneMatch Passing the value of the ETag response header in an If-None-Match field will allow the service - * to optimize the response. - * If the resource has not been modified, the service will return status code 304 and an empty response body. + * @param translateInput Defines the content of the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the set of languages currently supported by other operations of the Translator. + * @return response for the translation API on successful completion of {@link Mono}. */ + @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<GetSupportedLanguagesResult> getSupportedLanguages(List<LanguageScope> scopes, String acceptLanguage, - String ifNoneMatch) { - return getSupportedLanguages(convertToScopesString(scopes), acceptLanguage, ifNoneMatch); + Mono<TranslationResult> translate(TranslateBody translateInput) { + // Generated convenience method for translateWithResponse + RequestOptions requestOptions = new RequestOptions(); + return translateWithResponse(BinaryData.fromObject(translateInput), requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(TranslationResult.class)); } /** - * Gets the set of languages currently supported by other operations of the Translator. + * Translate Text. * + * @param inputs Defines the inputs to translate. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the set of languages currently supported by other operations of the Translator on successful completion - * of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ - @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<GetSupportedLanguagesResult> getSupportedLanguages() { - // Generated convenience method for getSupportedLanguagesWithResponse - RequestOptions requestOptions = new RequestOptions(); - return getSupportedLanguagesWithResponse(requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(GetSupportedLanguagesResult.class)); + public Mono<List<TranslatedTextItem>> translate(List<TranslateInputItem> inputs) { + TranslateBody translateBody = new TranslateBody(inputs); + return translate(translateBody).map(result -> result.getValue()); + } + + /** + * Translate Text. + * <p> + * This method is used when you have single target language and single text to translate. + * </p> + * + * @param targetLanguage Specifies the language of the output text. The target language must be one of the + * supported languages included + * in the translation scope. For example, use to=de to translate to German. + * It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. + * For example, use to=de&to=it to translate to German and Italian. + * @param text Defines the content of the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono<TranslatedTextItem> translate(String targetLanguage, String text) { + TranslateInputItem translateInputItem + = new TranslateInputItem(text, Arrays.asList(new TranslationTarget(targetLanguage))); + return translate(Arrays.asList(translateInputItem)) + .map(translatedTextItems -> translatedTextItems.isEmpty() ? null : translatedTextItems.get(0)) + .defaultIfEmpty(null); } - private List<InputTextItem> convertTextToData(List<String> texts) { + private List<InputTextItem> convertTextsToInputTextItems(List<String> texts) { List<InputTextItem> content = new ArrayList<>(); for (String text : texts) { content.add(new InputTextItem(text)); diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationClient.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationClient.java index 14d6e9528634..113088463ba7 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationClient.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationClient.java @@ -4,18 +4,16 @@ package com.azure.ai.translation.text; import com.azure.ai.translation.text.implementation.TextTranslationClientImpl; -import com.azure.ai.translation.text.models.BreakSentenceItem; -import com.azure.ai.translation.text.models.DictionaryExampleItem; -import com.azure.ai.translation.text.models.DictionaryExampleTextItem; -import com.azure.ai.translation.text.models.DictionaryLookupItem; +import com.azure.ai.translation.text.implementation.models.InputTextItem; +import com.azure.ai.translation.text.implementation.models.TranslateBody; +import com.azure.ai.translation.text.implementation.models.TranslationResult; +import com.azure.ai.translation.text.implementation.models.TransliterateBody; +import com.azure.ai.translation.text.implementation.models.TransliterateResult; import com.azure.ai.translation.text.models.GetSupportedLanguagesResult; -import com.azure.ai.translation.text.models.InputTextItem; import com.azure.ai.translation.text.models.LanguageScope; -import com.azure.ai.translation.text.models.ProfanityAction; -import com.azure.ai.translation.text.models.ProfanityMarker; -import com.azure.ai.translation.text.models.TextType; -import com.azure.ai.translation.text.models.TranslateOptions; +import com.azure.ai.translation.text.models.TranslateInputItem; import com.azure.ai.translation.text.models.TranslatedTextItem; +import com.azure.ai.translation.text.models.TranslationTarget; import com.azure.ai.translation.text.models.TransliteratedText; import com.azure.core.annotation.Generated; import com.azure.core.annotation.ReturnType; @@ -29,7 +27,6 @@ import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; import com.azure.core.util.BinaryData; -import com.azure.core.util.serializer.TypeReference; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -54,54 +51,17 @@ public final class TextTranslationClient { } /** - * Translate Text. + * Gets the set of languages currently supported by other operations of the Translator. * <p><strong>Query Parameters</strong></p> * <table border="1"> * <caption>Query Parameters</caption> * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>from</td><td>String</td><td>No</td><td>Specifies the language of the input text. Find which languages are - * available to translate from by - * looking up supported languages using the translation scope. If the from parameter isn't specified, - * automatic language detection is applied to determine the source language. - * - * You must use the from parameter rather than autodetection when using the dynamic dictionary feature. - * Note: the dynamic dictionary feature is case-sensitive.</td></tr> - * <tr><td>textType</td><td>String</td><td>No</td><td>Defines whether the text being translated is plain text or - * HTML text. Any HTML needs to be a well-formed, - * complete element. Possible values are: plain (default) or html. Allowed values: "Plain", "Html".</td></tr> - * <tr><td>category</td><td>String</td><td>No</td><td>A string specifying the category (domain) of the translation. - * This parameter is used to get translations - * from a customized system built with Custom Translator. Add the Category ID from your Custom Translator - * project details to this parameter to use your deployed customized system. Default value is: general.</td></tr> - * <tr><td>profanityAction</td><td>String</td><td>No</td><td>Specifies how profanities should be treated in - * translations. - * Possible values are: NoAction (default), Marked or Deleted. Allowed values: "NoAction", "Marked", - * "Deleted".</td></tr> - * <tr><td>profanityMarker</td><td>String</td><td>No</td><td>Specifies how profanities should be marked in - * translations. - * Possible values are: Asterisk (default) or Tag. . Allowed values: "Asterisk", "Tag".</td></tr> - * <tr><td>includeAlignment</td><td>Boolean</td><td>No</td><td>Specifies whether to include alignment projection - * from source text to translated text. - * Possible values are: true or false (default).</td></tr> - * <tr><td>includeSentenceLength</td><td>Boolean</td><td>No</td><td>Specifies whether to include sentence boundaries - * for the input text and the translated text. - * Possible values are: true or false (default).</td></tr> - * <tr><td>suggestedFrom</td><td>String</td><td>No</td><td>Specifies a fallback language if the language of the - * input text can't be identified. - * Language autodetection is applied when the from parameter is omitted. If detection fails, - * the suggestedFrom language will be assumed.</td></tr> - * <tr><td>fromScript</td><td>String</td><td>No</td><td>Specifies the script of the input text.</td></tr> - * <tr><td>toScript</td><td>String</td><td>No</td><td>Specifies the script of the translated text.</td></tr> - * <tr><td>allowFallback</td><td>Boolean</td><td>No</td><td>Specifies that the service is allowed to fall back to a - * general system when a custom system doesn't exist. - * Possible values are: true (default) or false. - * - * allowFallback=false specifies that the translation should only use systems trained for the category specified - * by the request. If a translation for language X to language Y requires chaining through a pivot language E, - * then all the systems in the chain (X → E and E → Y) will need to be custom and have the same category. - * If no system is found with the specific category, the request will return a 400 status code. allowFallback=true - * specifies that the service is allowed to fall back to a general system when a custom system doesn't - * exist.</td></tr> + * <tr><td>scope</td><td>String</td><td>No</td><td>A comma-separated list of names defining the group of languages + * to return. + * Allowed group names are: `translation`, `transliteration` and `dictionary`. + * If no scope is given, then all groups are returned, which is equivalent to passing + * `scope=translation,transliteration,dictionary`. To decide which set of supported languages + * is appropriate for your scenario, see the description of the [response object](#response-body).</td></tr> * </table> * You can add these to a request with {@link RequestOptions#addQueryParam} * <p><strong>Header Parameters</strong></p> @@ -110,277 +70,166 @@ public final class TextTranslationClient { * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> * <tr><td>X-ClientTraceId</td><td>String</td><td>No</td><td>A client-generated GUID to uniquely identify the * request.</td></tr> + * <tr><td>Accept-Language</td><td>String</td><td>No</td><td>The language to use for user interface strings. Some of + * the fields in the response are names of languages or + * names of regions. Use this parameter to define the language in which these names are returned. + * The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value `fr` + * to request names in French or use the value `zh-Hant` to request names in Chinese Traditional. + * Names are provided in the English language when a target language is not specified or when localization + * is not available.</td></tr> + * <tr><td>If-None-Match</td><td>String</td><td>No</td><td>Passing the value of the ETag response header in an + * If-None-Match field will allow the service to optimize the response. + * If the resource has not been modified, the service will return status code 304 and an empty response + * body.</td></tr> * </table> * You can add these to a request with {@link RequestOptions#addHeader} - * <p><strong>Request Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * text: String (Required) - * } - * ] - * } - * </pre> - * * <p><strong>Response Body Schema</strong></p> * * <pre> * {@code - * [ - * (Required){ - * detectedLanguage (Optional): { - * language: String (Required) - * score: double (Required) + * { + * translation (Optional): { + * String (Required): { + * name: String (Required) + * nativeName: String (Required) + * dir: String(ltr/rtl) (Required) + * models (Required): [ + * String (Required) + * ] * } - * translations (Required): [ - * (Required){ - * to: String (Required) - * text: String (Required) - * transliteration (Optional): { - * text: String (Required) - * script: String (Required) - * } - * alignment (Optional): { - * proj: String (Required) - * } - * sentLen (Optional): { - * srcSentLen (Required): [ - * int (Required) - * ] - * transSentLen (Required): [ - * int (Required) + * } + * transliteration (Optional): { + * String (Required): { + * name: String (Required) + * nativeName: String (Required) + * scripts (Required): [ + * (Required){ + * code: String (Required) + * name: String (Required) + * nativeName: String (Required) + * dir: String(ltr/rtl) (Required) + * toScripts (Required): [ + * (Required){ + * code: String (Required) + * name: String (Required) + * nativeName: String (Required) + * dir: String(ltr/rtl) (Required) + * } * ] * } - * } - * ] - * sourceText (Optional): { - * text: String (Required) + * ] * } * } - * ] + * models (Optional): [ + * String (Optional) + * ] + * } * } * </pre> * - * @param targetLanguages Specifies the language of the output text. The target language must be one of the - * supported languages included - * in the translation scope. For example, use to=de to translate to German. - * It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. - * For example, use to=de&to=it to translate to German and Italian. - * @param body Defines the content of the request. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response}. + * @return the set of languages currently supported by other operations of the Translator along with + * {@link Response}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response<BinaryData> translateWithResponse(List<String> targetLanguages, BinaryData body, - RequestOptions requestOptions) { - return this.serviceClient.translateWithResponse(targetLanguages, body, requestOptions); + public Response<BinaryData> getSupportedLanguagesWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getSupportedLanguagesWithResponse(requestOptions); } /** - * Transliterate Text. - * <p><strong>Header Parameters</strong></p> - * <table border="1"> - * <caption>Header Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>X-ClientTraceId</td><td>String</td><td>No</td><td>A client-generated GUID to uniquely identify the - * request.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addHeader} - * <p><strong>Request Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * text: String (Required) - * } - * ] - * } - * </pre> - * - * <p><strong>Response Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * text: String (Required) - * script: String (Required) - * } - * ] - * } - * </pre> + * Gets the set of languages currently supported by other operations of the Translator. * - * @param language Specifies the language of the text to convert from one script to another. - * Possible languages are listed in the transliteration scope obtained by querying the service - * for its supported languages. - * @param sourceLanguageScript Specifies the script used by the input text. Look up supported languages using the - * transliteration scope, - * to find input scripts available for the selected language. - * @param targetLanguageScript Specifies the output script. Look up supported languages using the transliteration - * scope, to find output - * scripts available for the selected combination of input language and input script. - * @param body Defines the content of the request. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response}. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the set of languages currently supported by other operations of the Translator. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response<BinaryData> transliterateWithResponse(String language, String sourceLanguageScript, - String targetLanguageScript, BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.transliterateWithResponse(language, sourceLanguageScript, targetLanguageScript, body, - requestOptions); + public GetSupportedLanguagesResult getSupportedLanguages() { + // Generated convenience method for getSupportedLanguagesWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getSupportedLanguagesWithResponse(requestOptions).getValue().toObject(GetSupportedLanguagesResult.class); } /** - * Find Sentence Boundaries. - * <p><strong>Query Parameters</strong></p> - * <table border="1"> - * <caption>Query Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>language</td><td>String</td><td>No</td><td>Language tag identifying the language of the input text. - * If a code isn't specified, automatic language detection will be applied.</td></tr> - * <tr><td>script</td><td>String</td><td>No</td><td>Script tag identifying the script used by the input text. - * If a script isn't specified, the default script of the language will be assumed.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addQueryParam} - * <p><strong>Header Parameters</strong></p> - * <table border="1"> - * <caption>Header Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>X-ClientTraceId</td><td>String</td><td>No</td><td>A client-generated GUID to uniquely identify the - * request.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addHeader} - * <p><strong>Request Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * text: String (Required) - * } - * ] - * } - * </pre> - * - * <p><strong>Response Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * detectedLanguage (Optional): { - * language: String (Required) - * score: double (Required) - * } - * sentLen (Required): [ - * int (Required) - * ] - * } - * ] - * } - * </pre> + * Gets the set of languages currently supported by other operations of the Translator. * - * @param body Defines the content of the request. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @param scope A comma-separated list of names defining the group of languages to return. + * Allowed group names are: `translation`, `transliteration` and `models`. + * If no scope is given, then all groups are returned, which is equivalent to passing + * `scope=translation,transliteration,models`. To decide which set of supported languages + * is appropriate for your scenario, see the description of the [response object](#response-body). + * @param acceptLanguage The language to use for user interface strings. Some of the fields in the response are + * names of languages or + * names of regions. Use this parameter to define the language in which these names are returned. + * The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value `fr` + * to request names in French or use the value `zh-Hant` to request names in Chinese Traditional. + * Names are provided in the English language when a target language is not specified or when localization + * is not available. + * @param ifNoneMatch Passing the value of the ETag response header in an If-None-Match field will allow the service + * to optimize the response. + * If the resource has not been modified, the service will return status code 304 and an empty response body. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response}. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the set of languages currently supported by other operations of the Translator. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<BinaryData> findSentenceBoundariesWithResponse(BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.findSentenceBoundariesWithResponse(body, requestOptions); + private GetSupportedLanguagesResult getSupportedLanguages(String scope, String acceptLanguage, String ifNoneMatch) { + // Generated convenience method for getSupportedLanguagesWithResponse + RequestOptions requestOptions = new RequestOptions(); + if (scope != null) { + requestOptions.addQueryParam("scope", scope, false); + } + if (acceptLanguage != null) { + requestOptions.setHeader(HttpHeaderName.ACCEPT_LANGUAGE, acceptLanguage); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + return getSupportedLanguagesWithResponse(requestOptions).getValue().toObject(GetSupportedLanguagesResult.class); } /** - * Lookup Dictionary Entries. - * <p><strong>Header Parameters</strong></p> - * <table border="1"> - * <caption>Header Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>X-ClientTraceId</td><td>String</td><td>No</td><td>A client-generated GUID to uniquely identify the - * request.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addHeader} - * <p><strong>Request Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * text: String (Required) - * } - * ] - * } - * </pre> - * - * <p><strong>Response Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * normalizedSource: String (Required) - * displaySource: String (Required) - * translations (Required): [ - * (Required){ - * normalizedTarget: String (Required) - * displayTarget: String (Required) - * posTag: String (Required) - * confidence: double (Required) - * prefixWord: String (Required) - * backTranslations (Required): [ - * (Required){ - * normalizedText: String (Required) - * displayText: String (Required) - * numExamples: int (Required) - * frequencyCount: int (Required) - * } - * ] - * } - * ] - * } - * ] - * } - * </pre> + * Gets the set of languages currently supported by other operations of the Translator. * - * @param sourceLanguage Specifies the language of the input text. - * The source language must be one of the supported languages included in the dictionary scope. - * @param targetLanguage Specifies the language of the output text. - * The target language must be one of the supported languages included in the dictionary scope. - * @param body Defines the content of the request. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @param scopes List of names defining the group of languages to return. + * @param acceptLanguage The language to use for user interface strings. Some of the fields in the response are + * names of languages or + * names of regions. Use this parameter to define the language in which these names are returned. + * The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value `fr` + * to request names in French or use the value `zh-Hant` to request names in Chinese Traditional. + * Names are provided in the English language when a target language is not specified or when localization + * is not available. + * @param ifNoneMatch Passing the value of the ETag response header in an If-None-Match field will allow the service + * to optimize the response. + * If the resource has not been modified, the service will return status code 304 and an empty response body. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response}. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the set of languages currently supported by other operations of the Translator. */ - @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response<BinaryData> lookupDictionaryEntriesWithResponse(String sourceLanguage, String targetLanguage, - BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.lookupDictionaryEntriesWithResponse(sourceLanguage, targetLanguage, body, - requestOptions); + public GetSupportedLanguagesResult getSupportedLanguages(List<LanguageScope> scopes, String acceptLanguage, + String ifNoneMatch) { + return getSupportedLanguages(convertToScopesString(scopes), acceptLanguage, ifNoneMatch); } /** - * Lookup Dictionary Examples. + * Transliterate Text. * <p><strong>Header Parameters</strong></p> * <table border="1"> * <caption>Header Parameters</caption> @@ -393,12 +242,13 @@ public Response<BinaryData> lookupDictionaryEntriesWithResponse(String sourceLan * * <pre> * {@code - * [ - * (Required){ - * text: String (Required) - * translation: String (Required) - * } - * ] + * { + * inputs (Required): [ + * (Required){ + * text: String (Required) + * } + * ] + * } * } * </pre> * @@ -406,569 +256,124 @@ public Response<BinaryData> lookupDictionaryEntriesWithResponse(String sourceLan * * <pre> * {@code - * [ - * (Required){ - * normalizedSource: String (Required) - * normalizedTarget: String (Required) - * examples (Required): [ - * (Required){ - * sourcePrefix: String (Required) - * sourceTerm: String (Required) - * sourceSuffix: String (Required) - * targetPrefix: String (Required) - * targetTerm: String (Required) - * targetSuffix: String (Required) - * } - * ] - * } - * ] + * { + * value (Required): [ + * (Required){ + * text: String (Required) + * script: String (Required) + * } + * ] + * } * } * </pre> * - * @param sourceLanguage Specifies the language of the input text. - * The source language must be one of the supported languages included in the dictionary scope. - * @param targetLanguage Specifies the language of the output text. - * The target language must be one of the supported languages included in the dictionary scope. - * @param body Defines the content of the request. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<BinaryData> lookupDictionaryExamplesWithResponse(String sourceLanguage, String targetLanguage, - BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.lookupDictionaryExamplesWithResponse(sourceLanguage, targetLanguage, body, - requestOptions); - } - - /** - * Translate Text. - * - * @param targetLanguages Specifies the language of the output text. The target language must be one of the - * supported languages included - * in the translation scope. For example, use to=de to translate to German. - * It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. - * For example, use to=de&to=it to translate to German and Italian. - * @param body Defines the content of the request. - * @param clientTraceId A client-generated GUID to uniquely identify the request. - * @param sourceLanguage Specifies the language of the input text. Find which languages are available to translate - * from by - * looking up supported languages using the translation scope. If the from parameter isn't specified, - * automatic language detection is applied to determine the source language. - * - * You must use the from parameter rather than autodetection when using the dynamic dictionary feature. - * Note: the dynamic dictionary feature is case-sensitive. - * @param textType Defines whether the text being translated is plain text or HTML text. Any HTML needs to be a - * well-formed, - * complete element. Possible values are: plain (default) or html. - * @param category A string specifying the category (domain) of the translation. This parameter is used to get - * translations - * from a customized system built with Custom Translator. Add the Category ID from your Custom Translator - * project details to this parameter to use your deployed customized system. Default value is: general. - * @param profanityAction Specifies how profanities should be treated in translations. - * Possible values are: NoAction (default), Marked or Deleted. - * @param profanityMarker Specifies how profanities should be marked in translations. - * Possible values are: Asterisk (default) or Tag. - * @param includeAlignment Specifies whether to include alignment projection from source text to translated text. - * Possible values are: true or false (default). - * @param includeSentenceLength Specifies whether to include sentence boundaries for the input text and the - * translated text. - * Possible values are: true or false (default). - * @param suggestedSourceLanguage Specifies a fallback language if the language of the input text can't be - * identified. - * Language autodetection is applied when the from parameter is omitted. If detection fails, - * the suggestedFrom language will be assumed. - * @param sourceLanguageScript Specifies the script of the input text. - * @param targetLanguageScript Specifies the script of the translated text. - * @param allowFallback Specifies that the service is allowed to fall back to a general system when a custom system - * doesn't exist. - * Possible values are: true (default) or false. - * - * allowFallback=false specifies that the translation should only use systems trained for the category specified - * by the request. If a translation for language X to language Y requires chaining through a pivot language E, - * then all the systems in the chain (X → E and E → Y) will need to be custom and have the same category. - * If no system is found with the specific category, the request will return a 400 status code. allowFallback=true - * specifies that the service is allowed to fall back to a general system when a custom system doesn't exist. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - private List<TranslatedTextItem> translate(List<String> targetLanguages, List<InputTextItem> body, - String clientTraceId, String sourceLanguage, TextType textType, String category, - ProfanityAction profanityAction, ProfanityMarker profanityMarker, Boolean includeAlignment, - Boolean includeSentenceLength, String suggestedSourceLanguage, String sourceLanguageScript, - String targetLanguageScript, Boolean allowFallback) { - // Generated convenience method for translateWithResponse - RequestOptions requestOptions = new RequestOptions(); - if (clientTraceId != null) { - requestOptions.setHeader(HttpHeaderName.fromString("X-ClientTraceId"), clientTraceId); - } - if (sourceLanguage != null) { - requestOptions.addQueryParam("from", sourceLanguage, false); - } - if (textType != null) { - requestOptions.addQueryParam("textType", textType.toString(), false); - } - if (category != null) { - requestOptions.addQueryParam("category", category, false); - } - if (profanityAction != null) { - requestOptions.addQueryParam("profanityAction", profanityAction.toString(), false); - } - if (profanityMarker != null) { - requestOptions.addQueryParam("profanityMarker", profanityMarker.toString(), false); - } - if (includeAlignment != null) { - requestOptions.addQueryParam("includeAlignment", String.valueOf(includeAlignment), false); - } - if (includeSentenceLength != null) { - requestOptions.addQueryParam("includeSentenceLength", String.valueOf(includeSentenceLength), false); - } - if (suggestedSourceLanguage != null) { - requestOptions.addQueryParam("suggestedFrom", suggestedSourceLanguage, false); - } - if (sourceLanguageScript != null) { - requestOptions.addQueryParam("fromScript", sourceLanguageScript, false); - } - if (targetLanguageScript != null) { - requestOptions.addQueryParam("toScript", targetLanguageScript, false); - } - if (allowFallback != null) { - requestOptions.addQueryParam("allowFallback", String.valueOf(allowFallback), false); - } - return translateWithResponse(targetLanguages, BinaryData.fromObject(body), requestOptions).getValue() - .toObject(TYPE_REFERENCE_LIST_TRANSLATED_TEXT_ITEM); - } - - /** - * Translate Text. - * - * @param targetLanguages Specifies the language of the output text. The target language must be one of the - * supported languages included - * in the translation scope. For example, use to=de to translate to German. - * It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. - * For example, use to=de&to=it to translate to German and Italian. - * @param body Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - private List<TranslatedTextItem> translateInner(List<String> targetLanguages, List<InputTextItem> body) { - // Generated convenience method for translateWithResponse - RequestOptions requestOptions = new RequestOptions(); - return translateWithResponse(targetLanguages, BinaryData.fromObject(body), requestOptions).getValue() - .toObject(TYPE_REFERENCE_LIST_TRANSLATED_TEXT_ITEM); - } - - /** - * Translate Text. - * <p> - * This method is used when you have single target language and multiple texts to translate. - * </p> - * - * @param targetLanguage Specifies the language of the output text. The target language must be one of the - * supported languages included - * in the translation scope. For example, use to=de to translate to German. - * It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. - * For example, use to=de&to=it to translate to German and Italian. - * @param texts Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List<TranslatedTextItem> translate(String targetLanguage, List<String> texts) { - return translateInner(Arrays.asList(targetLanguage), convertTextToData(texts)); - } - - /** - * Translate Text. - * <p> - * This method is used when you have single target language and single text to translate. - * </p> - * - * @param targetLanguage Specifies the language of the output text. The target language must be one of the - * supported languages included - * in the translation scope. For example, use to=de to translate to German. - * It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. - * For example, use to=de&to=it to translate to German and Italian. - * @param text Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TranslatedTextItem translate(String targetLanguage, String text) { - return translate(targetLanguage, Arrays.asList(text)).get(0); - } - - /** - * Translate Text. - * <p> - * This method is used when you have one input text and the optional parameters are needed such as specification - * of a source language, profanity handling etc. - * </p> - * - * @param text Text to translate. - * @param translateOptions Translate Options. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TranslatedTextItem translate(String text, TranslateOptions translateOptions) { - return translate(Arrays.asList(text), translateOptions).get(0); - } - - /** - * Translate Text. - * <p> - * This method is used when you have multiple texts and the optional parameters are needed such as specification - * of a source language, profanity handling etc.. - * </p> - * - * @param texts List of text to translate. - * @param translateOptions Translate Options. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List<TranslatedTextItem> translate(List<String> texts, TranslateOptions translateOptions) { - List<InputTextItem> content = new ArrayList<>(); - for (String text : texts) { - content.add(new InputTextItem(text)); - } - return translate(translateOptions.getTargetLanguages(), content, translateOptions.getClientTraceId(), - translateOptions.getSourceLanguage(), translateOptions.getTextType(), translateOptions.getCategory(), - translateOptions.getProfanityAction(), translateOptions.getProfanityMarker(), - translateOptions.isIncludeAlignment(), translateOptions.isIncludeSentenceLength(), - translateOptions.getSuggestedSourceLanguage(), translateOptions.getSourceLanguageScript(), - translateOptions.getTargetLanguageScript(), translateOptions.isAllowFallback()); - } - - /** - * Transliterate Text. - * - * @param language Specifies the language of the text to convert from one script to another. - * Possible languages are listed in the transliteration scope obtained by querying the service - * for its supported languages. - * @param sourceLanguageScript Specifies the script used by the input text. Look up supported languages using the - * transliteration scope, - * to find input scripts available for the selected language. - * @param targetLanguageScript Specifies the output script. Look up supported languages using the transliteration - * scope, to find output - * scripts available for the selected combination of input language and input script. - * @param body Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - private List<TransliteratedText> transliterateInner(String language, String sourceLanguageScript, - String targetLanguageScript, List<InputTextItem> body) { - // Generated convenience method for transliterateWithResponse - RequestOptions requestOptions = new RequestOptions(); - return transliterateWithResponse(language, sourceLanguageScript, targetLanguageScript, - BinaryData.fromObject(body), requestOptions).getValue().toObject(TYPE_REFERENCE_LIST_TRANSLITERATED_TEXT); - } - - /** - * Transliterate Text. - * <p> - * This method is used when you have multiple texts to transliterate and you want to provide client trace id. - * </p> - * - * @param language Specifies the language of the text to convert from one script to another. - * Possible languages are listed in the transliteration scope obtained by querying the service - * for its supported languages. - * @param sourceLanguageScript Specifies the script used by the input text. Look up supported languages using the - * transliteration scope, - * to find input scripts available for the selected language. - * @param targetLanguageScript Specifies the output script. Look up supported languages using the transliteration - * scope, to find output - * scripts available for the selected combination of input language and input script. - * @param body Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List<TransliteratedText> transliterate(String language, String sourceLanguageScript, - String targetLanguageScript, List<String> body) { - return transliterateInner(language, sourceLanguageScript, targetLanguageScript, convertTextToData(body)); - } - - /** - * Transliterate Text. - * <p> - * This method is used when you have single text to transliterate and you want to provide client trace id. - * </p> - * - * @param language Specifies the language of the text to convert from one script to another. - * Possible languages are listed in the transliteration scope obtained by querying the service - * for its supported languages. - * @param sourceLanguageScript Specifies the script used by the input text. Look up supported languages using the - * transliteration scope, - * to find input scripts available for the selected language. - * @param targetLanguageScript Specifies the output script. Look up supported languages using the transliteration - * scope, to find output - * scripts available for the selected combination of input language and input script. - * @param text Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TransliteratedText transliterate(String language, String sourceLanguageScript, String targetLanguageScript, - String text) { - return transliterate(language, sourceLanguageScript, targetLanguageScript, Arrays.asList(text)).get(0); - } - - /** - * Find Sentence Boundaries. - * - * @param body Defines the content of the request. - * @param language Language tag identifying the language of the input text. - * If a code isn't specified, automatic language detection will be applied. - * @param script Script tag identifying the script used by the input text. - * If a script isn't specified, the default script of the language will be assumed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - private List<BreakSentenceItem> findSentenceBoundariesInner(List<InputTextItem> body, String language, - String script) { - // Generated convenience method for findSentenceBoundariesWithResponse - RequestOptions requestOptions = new RequestOptions(); - if (language != null) { - requestOptions.addQueryParam("language", language, false); - } - if (script != null) { - requestOptions.addQueryParam("script", script, false); - } - return findSentenceBoundariesWithResponse(BinaryData.fromObject(body), requestOptions).getValue() - .toObject(TYPE_REFERENCE_LIST_BREAK_SENTENCE_ITEM); - } - - /** - * Find Sentence Boundaries. - * <p> - * This method is used when you have multiple texts for which you want to find sentence boundaries and you want to - * provide - * client trace id. - * </p> - * - * @param texts Defines the content of the request. - * @param language Language tag identifying the language of the input text. - * If a code isn't specified, automatic language detection will be applied. - * @param script Script tag identifying the script used by the input text. - * If a script isn't specified, the default script of the language will be assumed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List<BreakSentenceItem> findSentenceBoundaries(List<String> texts, String language, String script) { - return findSentenceBoundariesInner(convertTextToData(texts), language, script); - } - - /** - * Find Sentence Boundaries. - * <p> - * This method is used when you have single text for which you want to find sentence boundaries and you want to - * provide - * client trace id. - * </p> - * - * @param text Defines the content of the request. - * @param language Language tag identifying the language of the input text. - * If a code isn't specified, automatic language detection will be applied. - * @param script Script tag identifying the script used by the input text. - * If a script isn't specified, the default script of the language will be assumed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BreakSentenceItem findSentenceBoundaries(String text, String language, String script) { - return findSentenceBoundaries(Arrays.asList(text), language, script).get(0); - } - - /** - * Find Sentence Boundaries. - * - * @param body Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - private List<BreakSentenceItem> findSentenceBoundariesInner(List<InputTextItem> body) { - // Generated convenience method for findSentenceBoundariesWithResponse - RequestOptions requestOptions = new RequestOptions(); - return findSentenceBoundariesWithResponse(BinaryData.fromObject(body), requestOptions).getValue() - .toObject(TYPE_REFERENCE_LIST_BREAK_SENTENCE_ITEM); - } - - /** - * Find Sentence Boundaries. - * <p> - * This method is used when you have multiple texts for which you want to find sentence boundaries and you want - * the source language to be auto-detected by the service. - * </p> - * - * @param texts Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List<BreakSentenceItem> findSentenceBoundaries(List<String> texts) { - return findSentenceBoundariesInner(convertTextToData(texts)); - } - - /** - * Find Sentence Boundaries. - * <p> - * This method is used when you have single text for which you want to find sentence boundaries and you want - * the source language to be auto-detected by the service. - * </p> - * - * @param text Defines the content of the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * @param language Specifies the language of the text to convert from one script to another. + * Possible languages are listed in the transliteration scope obtained by querying the service + * for its supported languages. + * @param fromScript Specifies the script used by the input text. Look up supported languages using the + * transliteration scope, + * to find input scripts available for the selected language. + * @param toScript Specifies the output script. Look up supported languages using the transliteration scope, to find + * output + * scripts available for the selected combination of input language and input script. + * @param transliterateInput Defines the content of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return response for the transliteration API along with {@link Response}. */ + @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public BreakSentenceItem findSentenceBoundaries(String text) { - return findSentenceBoundaries(Arrays.asList(text)).get(0); + public Response<BinaryData> transliterateWithResponse(String language, String fromScript, String toScript, + BinaryData transliterateInput, RequestOptions requestOptions) { + return this.serviceClient.transliterateWithResponse(language, fromScript, toScript, transliterateInput, + requestOptions); } /** - * Lookup Dictionary Entries. + * Transliterate Text. * - * @param sourceLanguage Specifies the language of the input text. - * The source language must be one of the supported languages included in the dictionary scope. - * @param targetLanguage Specifies the language of the output text. - * The target language must be one of the supported languages included in the dictionary scope. - * @param body Defines the content of the request. + * @param language Specifies the language of the text to convert from one script to another. + * Possible languages are listed in the transliteration scope obtained by querying the service + * for its supported languages. + * @param fromScript Specifies the script used by the input text. Look up supported languages using the + * transliteration scope, + * to find input scripts available for the selected language. + * @param toScript Specifies the output script. Look up supported languages using the transliteration scope, to find + * output + * scripts available for the selected combination of input language and input script. + * @param transliterateInput Defines the content of the request. + * @param clientTraceId A client-generated GUID to uniquely identify the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return response for the transliteration API. */ - private List<DictionaryLookupItem> lookupDictionaryEntriesInner(String sourceLanguage, String targetLanguage, - List<InputTextItem> body) { - // Generated convenience method for lookupDictionaryEntriesWithResponse + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + TransliterateResult transliterate(String language, String fromScript, String toScript, + TransliterateBody transliterateInput, String clientTraceId) { + // Generated convenience method for transliterateWithResponse RequestOptions requestOptions = new RequestOptions(); - return lookupDictionaryEntriesWithResponse(sourceLanguage, targetLanguage, BinaryData.fromObject(body), - requestOptions).getValue().toObject(TYPE_REFERENCE_LIST_DICTIONARY_LOOKUP_ITEM); + if (clientTraceId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("X-ClientTraceId"), clientTraceId); + } + return transliterateWithResponse(language, fromScript, toScript, BinaryData.fromObject(transliterateInput), + requestOptions).getValue().toObject(TransliterateResult.class); } /** - * Lookup Dictionary Entries. - * <p> - * This method is used when you want lookup multiple entries in the dictionary and you want to provide - * client trace id. - * </p> + * Transliterate Text. * - * @param sourceLanguage Specifies the language of the input text. - * The source language must be one of the supported languages included in the dictionary scope. - * @param targetLanguage Specifies the language of the output text. - * The target language must be one of the supported languages included in the dictionary scope. - * @param texts Defines the content of the request. + * @param language Specifies the language of the text to convert from one script to another. + * Possible languages are listed in the transliteration scope obtained by querying the service + * for its supported languages. + * @param fromScript Specifies the script used by the input text. Look up supported languages using the + * transliteration scope, + * to find input scripts available for the selected language. + * @param toScript Specifies the output script. Look up supported languages using the transliteration scope, to find + * output + * scripts available for the selected combination of input language and input script. + * @param transliterateInput Defines the content of the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return response for the transliteration API. */ + @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public List<DictionaryLookupItem> lookupDictionaryEntries(String sourceLanguage, String targetLanguage, - List<String> texts) { - return lookupDictionaryEntriesInner(sourceLanguage, targetLanguage, convertTextToData(texts)); + TransliterateResult transliterate(String language, String fromScript, String toScript, + TransliterateBody transliterateInput) { + // Generated convenience method for transliterateWithResponse + RequestOptions requestOptions = new RequestOptions(); + return transliterateWithResponse(language, fromScript, toScript, BinaryData.fromObject(transliterateInput), + requestOptions).getValue().toObject(TransliterateResult.class); } /** - * Lookup Dictionary Entries. + * Transliterate Text. * <p> - * This method is used when you want lookup single entry in the dictionary and you want to provide - * client trace id. + * This method is used when you have multiple texts to transliterate and you want to provide client trace id. * </p> * - * @param sourceLanguage Specifies the language of the input text. - * The source language must be one of the supported languages included in the dictionary scope. - * @param targetLanguage Specifies the language of the output text. - * The target language must be one of the supported languages included in the dictionary scope. - * @param text Defines the content of the request. + * @param language Specifies the language of the text to convert from one script to another. + * Possible languages are listed in the transliteration scope obtained by querying the service + * for its supported languages. + * @param fromScript Specifies the script used by the input text. Look up supported languages using the + * transliteration scope, + * to find input scripts available for the selected language. + * @param toScript Specifies the output script. Look up supported languages using the transliteration + * scope, to find output + * scripts available for the selected combination of input language and input script. + * @param inputs Defines the text inputs to transliterate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -978,18 +383,28 @@ public List<DictionaryLookupItem> lookupDictionaryEntries(String sourceLanguage, * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DictionaryLookupItem lookupDictionaryEntries(String sourceLanguage, String targetLanguage, String text) { - return lookupDictionaryEntries(sourceLanguage, targetLanguage, Arrays.asList(text)).get(0); + public List<TransliteratedText> transliterate(String language, String fromScript, String toScript, + List<String> inputs) { + TransliterateBody transliterateBody = new TransliterateBody(convertTextsToInputTextItems(inputs)); + return transliterate(language, fromScript, toScript, transliterateBody).getValue(); } /** - * Lookup Dictionary Examples. + * Transliterate Text. + * <p> + * This method is used when you have single text to transliterate and you want to provide client trace id. + * </p> * - * @param sourceLanguage Specifies the language of the input text. - * The source language must be one of the supported languages included in the dictionary scope. - * @param targetLanguage Specifies the language of the output text. - * The target language must be one of the supported languages included in the dictionary scope. - * @param body Defines the content of the request. + * @param language Specifies the language of the text to convert from one script to another. + * Possible languages are listed in the transliteration scope obtained by querying the service + * for its supported languages. + * @param fromScript Specifies the script used by the input text. Look up supported languages using the + * transliteration scope, + * to find input scripts available for the selected language. + * @param toScript Specifies the output script. Look up supported languages using the transliteration + * scope, to find output + * scripts available for the selected combination of input language and input script. + * @param text Defines the content of the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -998,229 +413,193 @@ public DictionaryLookupItem lookupDictionaryEntries(String sourceLanguage, Strin * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public List<DictionaryExampleItem> lookupDictionaryExamples(String sourceLanguage, String targetLanguage, - List<DictionaryExampleTextItem> body) { - // Generated convenience method for lookupDictionaryExamplesWithResponse - RequestOptions requestOptions = new RequestOptions(); - return lookupDictionaryExamplesWithResponse(sourceLanguage, targetLanguage, BinaryData.fromObject(body), - requestOptions).getValue().toObject(TYPE_REFERENCE_LIST_DICTIONARY_EXAMPLE_ITEM); + public TransliteratedText transliterate(String language, String fromScript, String toScript, String text) { + return transliterate(language, fromScript, toScript, Arrays.asList(text)).get(0); } - @Generated - private static final TypeReference<List<TransliteratedText>> TYPE_REFERENCE_LIST_TRANSLITERATED_TEXT - = new TypeReference<List<TransliteratedText>>() { - }; - - @Generated - private static final TypeReference<List<BreakSentenceItem>> TYPE_REFERENCE_LIST_BREAK_SENTENCE_ITEM - = new TypeReference<List<BreakSentenceItem>>() { - }; - - @Generated - private static final TypeReference<List<DictionaryLookupItem>> TYPE_REFERENCE_LIST_DICTIONARY_LOOKUP_ITEM - = new TypeReference<List<DictionaryLookupItem>>() { - }; - - @Generated - private static final TypeReference<List<DictionaryExampleItem>> TYPE_REFERENCE_LIST_DICTIONARY_EXAMPLE_ITEM - = new TypeReference<List<DictionaryExampleItem>>() { - }; - - @Generated - private static final TypeReference<List<TranslatedTextItem>> TYPE_REFERENCE_LIST_TRANSLATED_TEXT_ITEM - = new TypeReference<List<TranslatedTextItem>>() { - }; - /** - * Gets the set of languages currently supported by other operations of the Translator. - * <p><strong>Query Parameters</strong></p> - * <table border="1"> - * <caption>Query Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>scope</td><td>String</td><td>No</td><td>A comma-separated list of names defining the group of languages - * to return. - * Allowed group names are: `translation`, `transliteration` and `dictionary`. - * If no scope is given, then all groups are returned, which is equivalent to passing - * `scope=translation,transliteration,dictionary`. To decide which set of supported languages - * is appropriate for your scenario, see the description of the [response object](#response-body).</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addQueryParam} + * Translate Text. * <p><strong>Header Parameters</strong></p> * <table border="1"> * <caption>Header Parameters</caption> * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> * <tr><td>X-ClientTraceId</td><td>String</td><td>No</td><td>A client-generated GUID to uniquely identify the * request.</td></tr> - * <tr><td>Accept-Language</td><td>String</td><td>No</td><td>The language to use for user interface strings. Some of - * the fields in the response are names of languages or - * names of regions. Use this parameter to define the language in which these names are returned. - * The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value `fr` - * to request names in French or use the value `zh-Hant` to request names in Chinese Traditional. - * Names are provided in the English language when a target language is not specified or when localization - * is not available.</td></tr> - * <tr><td>If-None-Match</td><td>String</td><td>No</td><td>Passing the value of the ETag response header in an - * If-None-Match field will allow the service to optimize the response. - * If the resource has not been modified, the service will return status code 304 and an empty response - * body.</td></tr> * </table> * You can add these to a request with {@link RequestOptions#addHeader} - * <p><strong>Response Body Schema</strong></p> + * <p><strong>Request Body Schema</strong></p> * * <pre> * {@code * { - * translation (Optional): { - * String (Required): { - * name: String (Required) - * nativeName: String (Required) - * dir: String(ltr/rtl) (Required) - * } - * } - * transliteration (Optional): { - * String (Required): { - * name: String (Required) - * nativeName: String (Required) - * scripts (Required): [ + * inputs (Required): [ + * (Required){ + * text: String (Required) + * script: String (Optional) + * language: String (Optional) + * textType: String(Plain/Html) (Optional) + * targets (Required): [ * (Required){ - * code: String (Required) - * name: String (Required) - * nativeName: String (Required) - * dir: String(ltr/rtl) (Required) - * toScripts (Required): [ - * (Required){ - * code: String (Required) - * name: String (Required) - * nativeName: String (Required) - * dir: String(ltr/rtl) (Required) + * language: String (Required) + * script: String (Optional) + * profanityAction: String(NoAction/Marked/Deleted) (Optional) + * profanityMarker: String(Asterisk/Tag) (Optional) + * deploymentName: String (Optional) + * allowFallback: Boolean (Optional) + * grade: String (Optional) + * tone: String (Optional) + * gender: String (Optional) + * adaptiveDatasetId: String (Optional) + * referenceTextPairs (Optional): [ + * (Optional){ + * source: String (Required) + * target: String (Required) * } * ] * } * ] * } - * } - * dictionary (Optional): { - * String (Required): { - * name: String (Required) - * nativeName: String (Required) - * dir: String(ltr/rtl) (Required) + * ] + * } + * } + * </pre> + * + * <p><strong>Response Body Schema</strong></p> + * + * <pre> + * {@code + * { + * value (Required): [ + * (Required){ + * detectedLanguage (Optional): { + * language: String (Required) + * score: double (Required) + * } * translations (Required): [ * (Required){ - * name: String (Required) - * nativeName: String (Required) - * dir: String(ltr/rtl) (Required) - * code: String (Required) + * language: String (Required) + * sourceCharacters: Integer (Optional) + * instructionTokens: Integer (Optional) + * sourceTokens: Integer (Optional) + * responseTokens: Integer (Optional) + * targetTokens: Integer (Optional) + * text: String (Required) * } * ] * } - * } + * ] * } * } * </pre> * + * @param translateInput Defines the content of the request. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the set of languages currently supported by other operations of the Translator along with - * {@link Response}. + * @return response for the translation API along with {@link Response}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response<BinaryData> getSupportedLanguagesWithResponse(RequestOptions requestOptions) { - return this.serviceClient.getSupportedLanguagesWithResponse(requestOptions); + public Response<BinaryData> translateWithResponse(BinaryData translateInput, RequestOptions requestOptions) { + return this.serviceClient.translateWithResponse(translateInput, requestOptions); } /** - * Gets the set of languages currently supported by other operations of the Translator. + * Translate Text. * - * @param scope A comma-separated list of names defining the group of languages to return. - * Allowed group names are: `translation`, `transliteration` and `dictionary`. - * If no scope is given, then all groups are returned, which is equivalent to passing - * `scope=translation,transliteration,dictionary`. To decide which set of supported languages - * is appropriate for your scenario, see the description of the [response object](#response-body). - * @param acceptLanguage The language to use for user interface strings. Some of the fields in the response are - * names of languages or - * names of regions. Use this parameter to define the language in which these names are returned. - * The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value `fr` - * to request names in French or use the value `zh-Hant` to request names in Chinese Traditional. - * Names are provided in the English language when a target language is not specified or when localization - * is not available. - * @param ifNoneMatch Passing the value of the ETag response header in an If-None-Match field will allow the service - * to optimize the response. - * If the resource has not been modified, the service will return status code 304 and an empty response body. + * @param translateInput Defines the content of the request. + * @param clientTraceId A client-generated GUID to uniquely identify the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the set of languages currently supported by other operations of the Translator. + * @return response for the translation API. */ - private GetSupportedLanguagesResult getSupportedLanguages(String scope, String acceptLanguage, String ifNoneMatch) { - // Generated convenience method for getSupportedLanguagesWithResponse + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + TranslationResult translate(TranslateBody translateInput, String clientTraceId) { + // Generated convenience method for translateWithResponse RequestOptions requestOptions = new RequestOptions(); - if (scope != null) { - requestOptions.addQueryParam("scope", scope, false); - } - if (acceptLanguage != null) { - requestOptions.setHeader(HttpHeaderName.ACCEPT_LANGUAGE, acceptLanguage); - } - if (ifNoneMatch != null) { - requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + if (clientTraceId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("X-ClientTraceId"), clientTraceId); } - return getSupportedLanguagesWithResponse(requestOptions).getValue().toObject(GetSupportedLanguagesResult.class); + return translateWithResponse(BinaryData.fromObject(translateInput), requestOptions).getValue() + .toObject(TranslationResult.class); } /** - * Gets the set of languages currently supported by other operations of the Translator. + * Translate Text. * - * @param scopes List of names defining the group of languages to return. - * @param acceptLanguage The language to use for user interface strings. Some of the fields in the response are - * names of languages or - * names of regions. Use this parameter to define the language in which these names are returned. - * The language is specified by providing a well-formed BCP 47 language tag. For instance, use the value `fr` - * to request names in French or use the value `zh-Hant` to request names in Chinese Traditional. - * Names are provided in the English language when a target language is not specified or when localization - * is not available. - * @param ifNoneMatch Passing the value of the ETag response header in an If-None-Match field will allow the service - * to optimize the response. - * If the resource has not been modified, the service will return status code 304 and an empty response body. + * @param translateInput Defines the content of the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the set of languages currently supported by other operations of the Translator. + * @return response for the translation API. */ + @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public GetSupportedLanguagesResult getSupportedLanguages(List<LanguageScope> scopes, String acceptLanguage, - String ifNoneMatch) { - return getSupportedLanguages(convertToScopesString(scopes), acceptLanguage, ifNoneMatch); + TranslationResult translate(TranslateBody translateInput) { + // Generated convenience method for translateWithResponse + RequestOptions requestOptions = new RequestOptions(); + return translateWithResponse(BinaryData.fromObject(translateInput), requestOptions).getValue() + .toObject(TranslationResult.class); } /** - * Gets the set of languages currently supported by other operations of the Translator. + * Translate Text. * + * @param inputs Defines the inputs to translate. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the set of languages currently supported by other operations of the Translator. + * @return the response. */ - @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public GetSupportedLanguagesResult getSupportedLanguages() { - // Generated convenience method for getSupportedLanguagesWithResponse - RequestOptions requestOptions = new RequestOptions(); - return getSupportedLanguagesWithResponse(requestOptions).getValue().toObject(GetSupportedLanguagesResult.class); + public List<TranslatedTextItem> translate(List<TranslateInputItem> inputs) { + TranslateBody translateBody = new TranslateBody(inputs); + TranslationResult result = translate(translateBody); + return result.getValue(); + } + + /** + * Translate Text. + * <p> + * This method is used when you have single target language and single text to translate. + * </p> + * + * @param targetLanguage Specifies the language of the output text. The target language must be one of the + * supported languages included + * in the translation scope. For example, use to=de to translate to German. + * It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. + * For example, use to=de&to=it to translate to German and Italian. + * @param text Defines the content of the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TranslatedTextItem translate(String targetLanguage, String text) { + TranslateInputItem translateInputItem + = new TranslateInputItem(text, Arrays.asList(new TranslationTarget(targetLanguage))); + return translate(Arrays.asList(translateInputItem)).get(0); } - private List<InputTextItem> convertTextToData(List<String> texts) { + private List<InputTextItem> convertTextsToInputTextItems(List<String> texts) { List<InputTextItem> content = new ArrayList<>(); for (String text : texts) { content.add(new InputTextItem(text)); @@ -1241,32 +620,4 @@ private String convertToScopesString(List<LanguageScope> scopes) { } return result.toString(); } - - /** - * Lookup Dictionary Examples. - * - * @param sourceLanguage Specifies the language of the input text. - * The source language must be one of the supported languages included in the dictionary scope. - * @param targetLanguage Specifies the language of the output text. - * The target language must be one of the supported languages included in the dictionary scope. - * @param body Defines the content of the request. - * @param clientTraceId A client-generated GUID to uniquely identify the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - private List<DictionaryExampleItem> lookupDictionaryExamples(String sourceLanguage, String targetLanguage, - List<DictionaryExampleTextItem> body, String clientTraceId) { - // Generated convenience method for lookupDictionaryExamplesWithResponse - RequestOptions requestOptions = new RequestOptions(); - if (clientTraceId != null) { - requestOptions.setHeader(HttpHeaderName.fromString("X-ClientTraceId"), clientTraceId); - } - return lookupDictionaryExamplesWithResponse(sourceLanguage, targetLanguage, BinaryData.fromObject(body), - requestOptions).getValue().toObject(TYPE_REFERENCE_LIST_DICTIONARY_EXAMPLE_ITEM); - } } diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationClientBuilder.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationClientBuilder.java index 30244e9974dd..f35204d41db1 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationClientBuilder.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationClientBuilder.java @@ -209,15 +209,13 @@ public TextTranslationClientBuilder configuration(Configuration configuration) { @Generated private String endpoint; - private Boolean isCustomEndpoint = false; - /** * {@inheritDoc}. */ + @Generated @Override public TextTranslationClientBuilder endpoint(String endpoint) { this.endpoint = endpoint; - this.isCustomEndpoint = CustomEndpointUtils.isPlatformHost(endpoint); return this; } @@ -264,6 +262,7 @@ public TextTranslationClientBuilder retryPolicy(RetryPolicy retryPolicy) { * @return The updated {@link TextTranslationClientBuilder} object. * @throws NullPointerException If {@code credential} is null. */ + @Override public TextTranslationClientBuilder credential(KeyCredential credential) { Objects.requireNonNull(credential, "'credential' cannot be null."); this.credential = credential; @@ -318,6 +317,7 @@ public TextTranslationClientBuilder audience(TextTranslationAudience audience) { * @return The updated {@link TextTranslationClientBuilder} object. * @throws NullPointerException If {@code tokenCredential} is null. */ + @Override public TextTranslationClientBuilder credential(TokenCredential tokenCredential) { Objects.requireNonNull(tokenCredential, "'tokenCredential' cannot be null."); this.tokenCredential = tokenCredential; @@ -336,7 +336,7 @@ private TextTranslationClientImpl buildInnerClient() { String serviceEndpoint; if (this.endpoint == null) { serviceEndpoint = "https://api.cognitive.microsofttranslator.com"; - } else if (this.isCustomEndpoint) { + } else if (CustomEndpointUtils.isPlatformHost(endpoint)) { try { URL hostUri = new URL(endpoint); URL fullUri = new URL(hostUri, "/translator/text/v" + localServiceVersion.getVersion()); @@ -345,7 +345,7 @@ private TextTranslationClientImpl buildInnerClient() { serviceEndpoint = endpoint; } } else { - serviceEndpoint = endpoint; + serviceEndpoint = this.endpoint; } if (tokenCredential != null && (this.region != null || this.resourceId != null)) { Objects.requireNonNull(this.region, "'region' cannot be null."); diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationServiceVersion.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationServiceVersion.java index 242d435b87d2..fd4bdc66a026 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationServiceVersion.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationServiceVersion.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.translation.text; import com.azure.core.util.ServiceVersion; @@ -10,10 +9,11 @@ * Service version of TextTranslationClient. */ public enum TextTranslationServiceVersion implements ServiceVersion { + /** - * Enum value 3.0. + * Enum value 2025-10-01-preview. */ - V3_0("3.0"); + V2025_10_01_PREVIEW("2025-10-01-preview"); private final String version; @@ -31,10 +31,10 @@ public String getVersion() { /** * Gets the latest service version supported by this client library. - * + * * @return The latest {@link TextTranslationServiceVersion}. */ public static TextTranslationServiceVersion getLatest() { - return V3_0; + return V2025_10_01_PREVIEW; } } diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/TextTranslationClientImpl.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/TextTranslationClientImpl.java index 18b1cb1dc711..19d878ece4fb 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/TextTranslationClientImpl.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/TextTranslationClientImpl.java @@ -33,9 +33,6 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; import reactor.core.publisher.Mono; /** @@ -183,9 +180,8 @@ Response<BinaryData> getSupportedLanguagesSync(@HostParam("Endpoint") String end @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono<Response<BinaryData>> translate(@HostParam("Endpoint") String endpoint, - @QueryParam(value = "to", multipleQueryParams = true) List<String> targetLanguages, @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData translateInput, RequestOptions requestOptions, Context context); @Post("/translate") @@ -195,9 +191,8 @@ Mono<Response<BinaryData>> translate(@HostParam("Endpoint") String endpoint, @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Response<BinaryData> translateSync(@HostParam("Endpoint") String endpoint, - @QueryParam(value = "to", multipleQueryParams = true) List<String> targetLanguages, @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData translateInput, RequestOptions requestOptions, Context context); @Post("/transliterate") @@ -207,10 +202,11 @@ Response<BinaryData> translateSync(@HostParam("Endpoint") String endpoint, @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono<Response<BinaryData>> transliterate(@HostParam("Endpoint") String endpoint, - @QueryParam("language") String language, @QueryParam("fromScript") String sourceLanguageScript, - @QueryParam("toScript") String targetLanguageScript, @QueryParam("api-version") String apiVersion, + @QueryParam("language") String language, @QueryParam("fromScript") String fromScript, + @QueryParam("toScript") String toScript, @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); + @BodyParam("application/json") BinaryData transliterateInput, RequestOptions requestOptions, + Context context); @Post("/transliterate") @ExpectedResponses({ 200 }) @@ -219,80 +215,11 @@ Mono<Response<BinaryData>> transliterate(@HostParam("Endpoint") String endpoint, @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Response<BinaryData> transliterateSync(@HostParam("Endpoint") String endpoint, - @QueryParam("language") String language, @QueryParam("fromScript") String sourceLanguageScript, - @QueryParam("toScript") String targetLanguageScript, @QueryParam("api-version") String apiVersion, + @QueryParam("language") String language, @QueryParam("fromScript") String fromScript, + @QueryParam("toScript") String toScript, @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); - - @Post("/breaksentence") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono<Response<BinaryData>> findSentenceBoundaries(@HostParam("Endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/breaksentence") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response<BinaryData> findSentenceBoundariesSync(@HostParam("Endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/dictionary/lookup") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono<Response<BinaryData>> lookupDictionaryEntries(@HostParam("Endpoint") String endpoint, - @QueryParam("from") String sourceLanguage, @QueryParam("to") String targetLanguage, - @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/dictionary/lookup") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response<BinaryData> lookupDictionaryEntriesSync(@HostParam("Endpoint") String endpoint, - @QueryParam("from") String sourceLanguage, @QueryParam("to") String targetLanguage, - @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/dictionary/examples") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono<Response<BinaryData>> lookupDictionaryExamples(@HostParam("Endpoint") String endpoint, - @QueryParam("from") String sourceLanguage, @QueryParam("to") String targetLanguage, - @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/dictionary/examples") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response<BinaryData> lookupDictionaryExamplesSync(@HostParam("Endpoint") String endpoint, - @QueryParam("from") String sourceLanguage, @QueryParam("to") String targetLanguage, - @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); + @BodyParam("application/json") BinaryData transliterateInput, RequestOptions requestOptions, + Context context); } /** @@ -338,6 +265,9 @@ Response<BinaryData> lookupDictionaryExamplesSync(@HostParam("Endpoint") String * name: String (Required) * nativeName: String (Required) * dir: String(ltr/rtl) (Required) + * models (Required): [ + * String (Required) + * ] * } * } * transliteration (Optional): { @@ -362,21 +292,9 @@ Response<BinaryData> lookupDictionaryExamplesSync(@HostParam("Endpoint") String * ] * } * } - * dictionary (Optional): { - * String (Required): { - * name: String (Required) - * nativeName: String (Required) - * dir: String(ltr/rtl) (Required) - * translations (Required): [ - * (Required){ - * name: String (Required) - * nativeName: String (Required) - * dir: String(ltr/rtl) (Required) - * code: String (Required) - * } - * ] - * } - * } + * models (Optional): [ + * String (Optional) + * ] * } * } * </pre> @@ -439,6 +357,9 @@ public Mono<Response<BinaryData>> getSupportedLanguagesWithResponseAsync(Request * name: String (Required) * nativeName: String (Required) * dir: String(ltr/rtl) (Required) + * models (Required): [ + * String (Required) + * ] * } * } * transliteration (Optional): { @@ -463,21 +384,9 @@ public Mono<Response<BinaryData>> getSupportedLanguagesWithResponseAsync(Request * ] * } * } - * dictionary (Optional): { - * String (Required): { - * name: String (Required) - * nativeName: String (Required) - * dir: String(ltr/rtl) (Required) - * translations (Required): [ - * (Required){ - * name: String (Required) - * nativeName: String (Required) - * dir: String(ltr/rtl) (Required) - * code: String (Required) - * } - * ] - * } - * } + * models (Optional): [ + * String (Optional) + * ] * } * } * </pre> @@ -499,55 +408,6 @@ public Response<BinaryData> getSupportedLanguagesWithResponse(RequestOptions req /** * Translate Text. - * <p><strong>Query Parameters</strong></p> - * <table border="1"> - * <caption>Query Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>from</td><td>String</td><td>No</td><td>Specifies the language of the input text. Find which languages are - * available to translate from by - * looking up supported languages using the translation scope. If the from parameter isn't specified, - * automatic language detection is applied to determine the source language. - * - * You must use the from parameter rather than autodetection when using the dynamic dictionary feature. - * Note: the dynamic dictionary feature is case-sensitive.</td></tr> - * <tr><td>textType</td><td>String</td><td>No</td><td>Defines whether the text being translated is plain text or - * HTML text. Any HTML needs to be a well-formed, - * complete element. Possible values are: plain (default) or html. Allowed values: "Plain", "Html".</td></tr> - * <tr><td>category</td><td>String</td><td>No</td><td>A string specifying the category (domain) of the translation. - * This parameter is used to get translations - * from a customized system built with Custom Translator. Add the Category ID from your Custom Translator - * project details to this parameter to use your deployed customized system. Default value is: general.</td></tr> - * <tr><td>profanityAction</td><td>String</td><td>No</td><td>Specifies how profanities should be treated in - * translations. - * Possible values are: NoAction (default), Marked or Deleted. Allowed values: "NoAction", "Marked", - * "Deleted".</td></tr> - * <tr><td>profanityMarker</td><td>String</td><td>No</td><td>Specifies how profanities should be marked in - * translations. - * Possible values are: Asterisk (default) or Tag. . Allowed values: "Asterisk", "Tag".</td></tr> - * <tr><td>includeAlignment</td><td>Boolean</td><td>No</td><td>Specifies whether to include alignment projection - * from source text to translated text. - * Possible values are: true or false (default).</td></tr> - * <tr><td>includeSentenceLength</td><td>Boolean</td><td>No</td><td>Specifies whether to include sentence boundaries - * for the input text and the translated text. - * Possible values are: true or false (default).</td></tr> - * <tr><td>suggestedFrom</td><td>String</td><td>No</td><td>Specifies a fallback language if the language of the - * input text can't be identified. - * Language autodetection is applied when the from parameter is omitted. If detection fails, - * the suggestedFrom language will be assumed.</td></tr> - * <tr><td>fromScript</td><td>String</td><td>No</td><td>Specifies the script of the input text.</td></tr> - * <tr><td>toScript</td><td>String</td><td>No</td><td>Specifies the script of the translated text.</td></tr> - * <tr><td>allowFallback</td><td>Boolean</td><td>No</td><td>Specifies that the service is allowed to fall back to a - * general system when a custom system doesn't exist. - * Possible values are: true (default) or false. - * - * allowFallback=false specifies that the translation should only use systems trained for the category specified - * by the request. If a translation for language X to language Y requires chaining through a pivot language E, - * then all the systems in the chain (X → E and E → Y) will need to be custom and have the same category. - * If no system is found with the specific category, the request will return a 400 status code. allowFallback=true - * specifies that the service is allowed to fall back to a general system when a custom system doesn't - * exist.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addQueryParam} * <p><strong>Header Parameters</strong></p> * <table border="1"> * <caption>Header Parameters</caption> @@ -560,11 +420,36 @@ public Response<BinaryData> getSupportedLanguagesWithResponse(RequestOptions req * * <pre> * {@code - * [ - * (Required){ - * text: String (Required) - * } - * ] + * { + * inputs (Required): [ + * (Required){ + * text: String (Required) + * script: String (Optional) + * language: String (Optional) + * textType: String(Plain/Html) (Optional) + * targets (Required): [ + * (Required){ + * language: String (Required) + * script: String (Optional) + * profanityAction: String(NoAction/Marked/Deleted) (Optional) + * profanityMarker: String(Asterisk/Tag) (Optional) + * deploymentName: String (Optional) + * allowFallback: Boolean (Optional) + * grade: String (Optional) + * tone: String (Optional) + * gender: String (Optional) + * adaptiveDatasetId: String (Optional) + * referenceTextPairs (Optional): [ + * (Optional){ + * source: String (Required) + * target: String (Required) + * } + * ] + * } + * ] + * } + * ] + * } * } * </pre> * @@ -572,116 +457,49 @@ public Response<BinaryData> getSupportedLanguagesWithResponse(RequestOptions req * * <pre> * {@code - * [ - * (Required){ - * detectedLanguage (Optional): { - * language: String (Required) - * score: double (Required) - * } - * translations (Required): [ - * (Required){ - * to: String (Required) - * text: String (Required) - * transliteration (Optional): { + * { + * value (Required): [ + * (Required){ + * detectedLanguage (Optional): { + * language: String (Required) + * score: double (Required) + * } + * translations (Required): [ + * (Required){ + * language: String (Required) + * sourceCharacters: Integer (Optional) + * instructionTokens: Integer (Optional) + * sourceTokens: Integer (Optional) + * responseTokens: Integer (Optional) + * targetTokens: Integer (Optional) * text: String (Required) - * script: String (Required) - * } - * alignment (Optional): { - * proj: String (Required) * } - * sentLen (Optional): { - * srcSentLen (Required): [ - * int (Required) - * ] - * transSentLen (Required): [ - * int (Required) - * ] - * } - * } - * ] - * sourceText (Optional): { - * text: String (Required) + * ] * } - * } - * ] + * ] + * } * } * </pre> * - * @param targetLanguages Specifies the language of the output text. The target language must be one of the - * supported languages included - * in the translation scope. For example, use to=de to translate to German. - * It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. - * For example, use to=de&to=it to translate to German and Italian. - * @param body Defines the content of the request. + * @param translateInput Defines the content of the request. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return response for the translation API along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<BinaryData>> translateWithResponseAsync(List<String> targetLanguages, BinaryData body, + public Mono<Response<BinaryData>> translateWithResponseAsync(BinaryData translateInput, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - List<String> targetLanguagesConverted - = targetLanguages.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - return FluxUtil.withContext(context -> service.translate(this.getEndpoint(), targetLanguagesConverted, - this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, context)); + return FluxUtil.withContext(context -> service.translate(this.getEndpoint(), + this.getServiceVersion().getVersion(), contentType, accept, translateInput, requestOptions, context)); } /** * Translate Text. - * <p><strong>Query Parameters</strong></p> - * <table border="1"> - * <caption>Query Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>from</td><td>String</td><td>No</td><td>Specifies the language of the input text. Find which languages are - * available to translate from by - * looking up supported languages using the translation scope. If the from parameter isn't specified, - * automatic language detection is applied to determine the source language. - * - * You must use the from parameter rather than autodetection when using the dynamic dictionary feature. - * Note: the dynamic dictionary feature is case-sensitive.</td></tr> - * <tr><td>textType</td><td>String</td><td>No</td><td>Defines whether the text being translated is plain text or - * HTML text. Any HTML needs to be a well-formed, - * complete element. Possible values are: plain (default) or html. Allowed values: "Plain", "Html".</td></tr> - * <tr><td>category</td><td>String</td><td>No</td><td>A string specifying the category (domain) of the translation. - * This parameter is used to get translations - * from a customized system built with Custom Translator. Add the Category ID from your Custom Translator - * project details to this parameter to use your deployed customized system. Default value is: general.</td></tr> - * <tr><td>profanityAction</td><td>String</td><td>No</td><td>Specifies how profanities should be treated in - * translations. - * Possible values are: NoAction (default), Marked or Deleted. Allowed values: "NoAction", "Marked", - * "Deleted".</td></tr> - * <tr><td>profanityMarker</td><td>String</td><td>No</td><td>Specifies how profanities should be marked in - * translations. - * Possible values are: Asterisk (default) or Tag. . Allowed values: "Asterisk", "Tag".</td></tr> - * <tr><td>includeAlignment</td><td>Boolean</td><td>No</td><td>Specifies whether to include alignment projection - * from source text to translated text. - * Possible values are: true or false (default).</td></tr> - * <tr><td>includeSentenceLength</td><td>Boolean</td><td>No</td><td>Specifies whether to include sentence boundaries - * for the input text and the translated text. - * Possible values are: true or false (default).</td></tr> - * <tr><td>suggestedFrom</td><td>String</td><td>No</td><td>Specifies a fallback language if the language of the - * input text can't be identified. - * Language autodetection is applied when the from parameter is omitted. If detection fails, - * the suggestedFrom language will be assumed.</td></tr> - * <tr><td>fromScript</td><td>String</td><td>No</td><td>Specifies the script of the input text.</td></tr> - * <tr><td>toScript</td><td>String</td><td>No</td><td>Specifies the script of the translated text.</td></tr> - * <tr><td>allowFallback</td><td>Boolean</td><td>No</td><td>Specifies that the service is allowed to fall back to a - * general system when a custom system doesn't exist. - * Possible values are: true (default) or false. - * - * allowFallback=false specifies that the translation should only use systems trained for the category specified - * by the request. If a translation for language X to language Y requires chaining through a pivot language E, - * then all the systems in the chain (X → E and E → Y) will need to be custom and have the same category. - * If no system is found with the specific category, the request will return a 400 status code. allowFallback=true - * specifies that the service is allowed to fall back to a general system when a custom system doesn't - * exist.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addQueryParam} * <p><strong>Header Parameters</strong></p> * <table border="1"> * <caption>Header Parameters</caption> @@ -694,11 +512,36 @@ public Mono<Response<BinaryData>> translateWithResponseAsync(List<String> target * * <pre> * {@code - * [ - * (Required){ - * text: String (Required) - * } - * ] + * { + * inputs (Required): [ + * (Required){ + * text: String (Required) + * script: String (Optional) + * language: String (Optional) + * textType: String(Plain/Html) (Optional) + * targets (Required): [ + * (Required){ + * language: String (Required) + * script: String (Optional) + * profanityAction: String(NoAction/Marked/Deleted) (Optional) + * profanityMarker: String(Asterisk/Tag) (Optional) + * deploymentName: String (Optional) + * allowFallback: Boolean (Optional) + * grade: String (Optional) + * tone: String (Optional) + * gender: String (Optional) + * adaptiveDatasetId: String (Optional) + * referenceTextPairs (Optional): [ + * (Optional){ + * source: String (Required) + * target: String (Required) + * } + * ] + * } + * ] + * } + * ] + * } * } * </pre> * @@ -706,63 +549,44 @@ public Mono<Response<BinaryData>> translateWithResponseAsync(List<String> target * * <pre> * {@code - * [ - * (Required){ - * detectedLanguage (Optional): { - * language: String (Required) - * score: double (Required) - * } - * translations (Required): [ - * (Required){ - * to: String (Required) - * text: String (Required) - * transliteration (Optional): { + * { + * value (Required): [ + * (Required){ + * detectedLanguage (Optional): { + * language: String (Required) + * score: double (Required) + * } + * translations (Required): [ + * (Required){ + * language: String (Required) + * sourceCharacters: Integer (Optional) + * instructionTokens: Integer (Optional) + * sourceTokens: Integer (Optional) + * responseTokens: Integer (Optional) + * targetTokens: Integer (Optional) * text: String (Required) - * script: String (Required) - * } - * alignment (Optional): { - * proj: String (Required) - * } - * sentLen (Optional): { - * srcSentLen (Required): [ - * int (Required) - * ] - * transSentLen (Required): [ - * int (Required) - * ] * } - * } - * ] - * sourceText (Optional): { - * text: String (Required) + * ] * } - * } - * ] + * ] + * } * } * </pre> * - * @param targetLanguages Specifies the language of the output text. The target language must be one of the - * supported languages included - * in the translation scope. For example, use to=de to translate to German. - * It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. - * For example, use to=de&to=it to translate to German and Italian. - * @param body Defines the content of the request. + * @param translateInput Defines the content of the request. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response}. + * @return response for the translation API along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response<BinaryData> translateWithResponse(List<String> targetLanguages, BinaryData body, - RequestOptions requestOptions) { + public Response<BinaryData> translateWithResponse(BinaryData translateInput, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - List<String> targetLanguagesConverted - = targetLanguages.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - return service.translateSync(this.getEndpoint(), targetLanguagesConverted, - this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, Context.NONE); + return service.translateSync(this.getEndpoint(), this.getServiceVersion().getVersion(), contentType, accept, + translateInput, requestOptions, Context.NONE); } /** @@ -779,11 +603,13 @@ public Response<BinaryData> translateWithResponse(List<String> targetLanguages, * * <pre> * {@code - * [ - * (Required){ - * text: String (Required) - * } - * ] + * { + * inputs (Required): [ + * (Required){ + * text: String (Required) + * } + * ] + * } * } * </pre> * @@ -791,40 +617,42 @@ public Response<BinaryData> translateWithResponse(List<String> targetLanguages, * * <pre> * {@code - * [ - * (Required){ - * text: String (Required) - * script: String (Required) - * } - * ] + * { + * value (Required): [ + * (Required){ + * text: String (Required) + * script: String (Required) + * } + * ] + * } * } * </pre> * * @param language Specifies the language of the text to convert from one script to another. * Possible languages are listed in the transliteration scope obtained by querying the service * for its supported languages. - * @param sourceLanguageScript Specifies the script used by the input text. Look up supported languages using the + * @param fromScript Specifies the script used by the input text. Look up supported languages using the * transliteration scope, * to find input scripts available for the selected language. - * @param targetLanguageScript Specifies the output script. Look up supported languages using the transliteration - * scope, to find output + * @param toScript Specifies the output script. Look up supported languages using the transliteration scope, to find + * output * scripts available for the selected combination of input language and input script. - * @param body Defines the content of the request. + * @param transliterateInput Defines the content of the request. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return response for the transliteration API along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<BinaryData>> transliterateWithResponseAsync(String language, String sourceLanguageScript, - String targetLanguageScript, BinaryData body, RequestOptions requestOptions) { + public Mono<Response<BinaryData>> transliterateWithResponseAsync(String language, String fromScript, + String toScript, BinaryData transliterateInput, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.transliterate(this.getEndpoint(), language, sourceLanguageScript, targetLanguageScript, - this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, context)); + return FluxUtil.withContext(context -> service.transliterate(this.getEndpoint(), language, fromScript, toScript, + this.getServiceVersion().getVersion(), contentType, accept, transliterateInput, requestOptions, context)); } /** @@ -841,11 +669,13 @@ public Mono<Response<BinaryData>> transliterateWithResponseAsync(String language * * <pre> * {@code - * [ - * (Required){ - * text: String (Required) - * } - * ] + * { + * inputs (Required): [ + * (Required){ + * text: String (Required) + * } + * ] + * } * } * </pre> * @@ -853,451 +683,41 @@ public Mono<Response<BinaryData>> transliterateWithResponseAsync(String language * * <pre> * {@code - * [ - * (Required){ - * text: String (Required) - * script: String (Required) - * } - * ] + * { + * value (Required): [ + * (Required){ + * text: String (Required) + * script: String (Required) + * } + * ] + * } * } * </pre> * * @param language Specifies the language of the text to convert from one script to another. * Possible languages are listed in the transliteration scope obtained by querying the service * for its supported languages. - * @param sourceLanguageScript Specifies the script used by the input text. Look up supported languages using the + * @param fromScript Specifies the script used by the input text. Look up supported languages using the * transliteration scope, * to find input scripts available for the selected language. - * @param targetLanguageScript Specifies the output script. Look up supported languages using the transliteration - * scope, to find output + * @param toScript Specifies the output script. Look up supported languages using the transliteration scope, to find + * output * scripts available for the selected combination of input language and input script. - * @param body Defines the content of the request. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<BinaryData> transliterateWithResponse(String language, String sourceLanguageScript, - String targetLanguageScript, BinaryData body, RequestOptions requestOptions) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.transliterateSync(this.getEndpoint(), language, sourceLanguageScript, targetLanguageScript, - this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, Context.NONE); - } - - /** - * Find Sentence Boundaries. - * <p><strong>Query Parameters</strong></p> - * <table border="1"> - * <caption>Query Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>language</td><td>String</td><td>No</td><td>Language tag identifying the language of the input text. - * If a code isn't specified, automatic language detection will be applied.</td></tr> - * <tr><td>script</td><td>String</td><td>No</td><td>Script tag identifying the script used by the input text. - * If a script isn't specified, the default script of the language will be assumed.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addQueryParam} - * <p><strong>Header Parameters</strong></p> - * <table border="1"> - * <caption>Header Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>X-ClientTraceId</td><td>String</td><td>No</td><td>A client-generated GUID to uniquely identify the - * request.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addHeader} - * <p><strong>Request Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * text: String (Required) - * } - * ] - * } - * </pre> - * - * <p><strong>Response Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * detectedLanguage (Optional): { - * language: String (Required) - * score: double (Required) - * } - * sentLen (Required): [ - * int (Required) - * ] - * } - * ] - * } - * </pre> - * - * @param body Defines the content of the request. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<BinaryData>> findSentenceBoundariesWithResponseAsync(BinaryData body, - RequestOptions requestOptions) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.findSentenceBoundaries(this.getEndpoint(), - this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, context)); - } - - /** - * Find Sentence Boundaries. - * <p><strong>Query Parameters</strong></p> - * <table border="1"> - * <caption>Query Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>language</td><td>String</td><td>No</td><td>Language tag identifying the language of the input text. - * If a code isn't specified, automatic language detection will be applied.</td></tr> - * <tr><td>script</td><td>String</td><td>No</td><td>Script tag identifying the script used by the input text. - * If a script isn't specified, the default script of the language will be assumed.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addQueryParam} - * <p><strong>Header Parameters</strong></p> - * <table border="1"> - * <caption>Header Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>X-ClientTraceId</td><td>String</td><td>No</td><td>A client-generated GUID to uniquely identify the - * request.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addHeader} - * <p><strong>Request Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * text: String (Required) - * } - * ] - * } - * </pre> - * - * <p><strong>Response Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * detectedLanguage (Optional): { - * language: String (Required) - * score: double (Required) - * } - * sentLen (Required): [ - * int (Required) - * ] - * } - * ] - * } - * </pre> - * - * @param body Defines the content of the request. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<BinaryData> findSentenceBoundariesWithResponse(BinaryData body, RequestOptions requestOptions) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.findSentenceBoundariesSync(this.getEndpoint(), this.getServiceVersion().getVersion(), - contentType, accept, body, requestOptions, Context.NONE); - } - - /** - * Lookup Dictionary Entries. - * <p><strong>Header Parameters</strong></p> - * <table border="1"> - * <caption>Header Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>X-ClientTraceId</td><td>String</td><td>No</td><td>A client-generated GUID to uniquely identify the - * request.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addHeader} - * <p><strong>Request Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * text: String (Required) - * } - * ] - * } - * </pre> - * - * <p><strong>Response Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * normalizedSource: String (Required) - * displaySource: String (Required) - * translations (Required): [ - * (Required){ - * normalizedTarget: String (Required) - * displayTarget: String (Required) - * posTag: String (Required) - * confidence: double (Required) - * prefixWord: String (Required) - * backTranslations (Required): [ - * (Required){ - * normalizedText: String (Required) - * displayText: String (Required) - * numExamples: int (Required) - * frequencyCount: int (Required) - * } - * ] - * } - * ] - * } - * ] - * } - * </pre> - * - * @param sourceLanguage Specifies the language of the input text. - * The source language must be one of the supported languages included in the dictionary scope. - * @param targetLanguage Specifies the language of the output text. - * The target language must be one of the supported languages included in the dictionary scope. - * @param body Defines the content of the request. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<BinaryData>> lookupDictionaryEntriesWithResponseAsync(String sourceLanguage, - String targetLanguage, BinaryData body, RequestOptions requestOptions) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.lookupDictionaryEntries(this.getEndpoint(), sourceLanguage, - targetLanguage, this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, context)); - } - - /** - * Lookup Dictionary Entries. - * <p><strong>Header Parameters</strong></p> - * <table border="1"> - * <caption>Header Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>X-ClientTraceId</td><td>String</td><td>No</td><td>A client-generated GUID to uniquely identify the - * request.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addHeader} - * <p><strong>Request Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * text: String (Required) - * } - * ] - * } - * </pre> - * - * <p><strong>Response Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * normalizedSource: String (Required) - * displaySource: String (Required) - * translations (Required): [ - * (Required){ - * normalizedTarget: String (Required) - * displayTarget: String (Required) - * posTag: String (Required) - * confidence: double (Required) - * prefixWord: String (Required) - * backTranslations (Required): [ - * (Required){ - * normalizedText: String (Required) - * displayText: String (Required) - * numExamples: int (Required) - * frequencyCount: int (Required) - * } - * ] - * } - * ] - * } - * ] - * } - * </pre> - * - * @param sourceLanguage Specifies the language of the input text. - * The source language must be one of the supported languages included in the dictionary scope. - * @param targetLanguage Specifies the language of the output text. - * The target language must be one of the supported languages included in the dictionary scope. - * @param body Defines the content of the request. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response<BinaryData> lookupDictionaryEntriesWithResponse(String sourceLanguage, String targetLanguage, - BinaryData body, RequestOptions requestOptions) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.lookupDictionaryEntriesSync(this.getEndpoint(), sourceLanguage, targetLanguage, - this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, Context.NONE); - } - - /** - * Lookup Dictionary Examples. - * <p><strong>Header Parameters</strong></p> - * <table border="1"> - * <caption>Header Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>X-ClientTraceId</td><td>String</td><td>No</td><td>A client-generated GUID to uniquely identify the - * request.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addHeader} - * <p><strong>Request Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * text: String (Required) - * translation: String (Required) - * } - * ] - * } - * </pre> - * - * <p><strong>Response Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * normalizedSource: String (Required) - * normalizedTarget: String (Required) - * examples (Required): [ - * (Required){ - * sourcePrefix: String (Required) - * sourceTerm: String (Required) - * sourceSuffix: String (Required) - * targetPrefix: String (Required) - * targetTerm: String (Required) - * targetSuffix: String (Required) - * } - * ] - * } - * ] - * } - * </pre> - * - * @param sourceLanguage Specifies the language of the input text. - * The source language must be one of the supported languages included in the dictionary scope. - * @param targetLanguage Specifies the language of the output text. - * The target language must be one of the supported languages included in the dictionary scope. - * @param body Defines the content of the request. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono<Response<BinaryData>> lookupDictionaryExamplesWithResponseAsync(String sourceLanguage, - String targetLanguage, BinaryData body, RequestOptions requestOptions) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.lookupDictionaryExamples(this.getEndpoint(), sourceLanguage, - targetLanguage, this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, context)); - } - - /** - * Lookup Dictionary Examples. - * <p><strong>Header Parameters</strong></p> - * <table border="1"> - * <caption>Header Parameters</caption> - * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> - * <tr><td>X-ClientTraceId</td><td>String</td><td>No</td><td>A client-generated GUID to uniquely identify the - * request.</td></tr> - * </table> - * You can add these to a request with {@link RequestOptions#addHeader} - * <p><strong>Request Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * text: String (Required) - * translation: String (Required) - * } - * ] - * } - * </pre> - * - * <p><strong>Response Body Schema</strong></p> - * - * <pre> - * {@code - * [ - * (Required){ - * normalizedSource: String (Required) - * normalizedTarget: String (Required) - * examples (Required): [ - * (Required){ - * sourcePrefix: String (Required) - * sourceTerm: String (Required) - * sourceSuffix: String (Required) - * targetPrefix: String (Required) - * targetTerm: String (Required) - * targetSuffix: String (Required) - * } - * ] - * } - * ] - * } - * </pre> - * - * @param sourceLanguage Specifies the language of the input text. - * The source language must be one of the supported languages included in the dictionary scope. - * @param targetLanguage Specifies the language of the output text. - * The target language must be one of the supported languages included in the dictionary scope. - * @param body Defines the content of the request. + * @param transliterateInput Defines the content of the request. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response body along with {@link Response}. + * @return response for the transliteration API along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response<BinaryData> lookupDictionaryExamplesWithResponse(String sourceLanguage, String targetLanguage, - BinaryData body, RequestOptions requestOptions) { + public Response<BinaryData> transliterateWithResponse(String language, String fromScript, String toScript, + BinaryData transliterateInput, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return service.lookupDictionaryExamplesSync(this.getEndpoint(), sourceLanguage, targetLanguage, - this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, Context.NONE); + return service.transliterateSync(this.getEndpoint(), language, fromScript, toScript, + this.getServiceVersion().getVersion(), contentType, accept, transliterateInput, requestOptions, + Context.NONE); } } diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/InputTextItem.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/InputTextItem.java similarity index 94% rename from sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/InputTextItem.java rename to sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/InputTextItem.java index 73e602ce5eeb..7e2e19fd3439 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/InputTextItem.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/InputTextItem.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.translation.text.models; +package com.azure.ai.translation.text.implementation.models; import com.azure.core.annotation.Generated; import com.azure.core.annotation.Immutable; @@ -15,7 +15,7 @@ * Element containing the text for translation. */ @Immutable -public class InputTextItem implements JsonSerializable<InputTextItem> { +public final class InputTextItem implements JsonSerializable<InputTextItem> { /* * Text to translate. diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/TranslateBody.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/TranslateBody.java new file mode 100644 index 000000000000..fdd43db1e6fb --- /dev/null +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/TranslateBody.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.translation.text.implementation.models; + +import com.azure.ai.translation.text.models.TranslateInputItem; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Request data for translate. + */ +@Immutable +public final class TranslateBody implements JsonSerializable<TranslateBody> { + + /* + * Array of the input text elements to translate. + */ + @Generated + private final List<TranslateInputItem> inputs; + + /** + * Creates an instance of TranslateBody class. + * + * @param inputs the inputs value to set. + */ + @Generated + public TranslateBody(List<TranslateInputItem> inputs) { + this.inputs = inputs; + } + + /** + * Get the inputs property: Array of the input text elements to translate. + * + * @return the inputs value. + */ + @Generated + public List<TranslateInputItem> getInputs() { + return this.inputs; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TranslateBody from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TranslateBody if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TranslateBody. + */ + @Generated + public static TranslateBody fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + List<TranslateInputItem> inputs = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("inputs".equals(fieldName)) { + inputs = reader.readArray(reader1 -> TranslateInputItem.fromJson(reader1)); + } else { + reader.skipChildren(); + } + } + return new TranslateBody(inputs); + }); + } +} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/SourceText.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/TranslationResult.java similarity index 50% rename from sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/SourceText.java rename to sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/TranslationResult.java index 7173b54098c1..22ce94e90140 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/SourceText.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/TranslationResult.java @@ -1,8 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.translation.text.models; +package com.azure.ai.translation.text.implementation.models; +import com.azure.ai.translation.text.models.TranslatedTextItem; import com.azure.core.annotation.Generated; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -10,37 +11,35 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** - * Input text in the default script of the source language. + * Response for the translation API. */ @Immutable -public final class SourceText implements JsonSerializable<SourceText> { +public final class TranslationResult implements JsonSerializable<TranslationResult> { /* - * Input text in the default script of the source language. + * Array of the translated text elements. */ @Generated - private final String text; + private List<TranslatedTextItem> value; /** - * Creates an instance of SourceText class. - * - * @param text the text value to set. + * Creates an instance of TranslationResult class. */ @Generated - private SourceText(String text) { - this.text = text; + private TranslationResult() { } /** - * Get the text property: Input text in the default script of the source language. + * Get the value property: Array of the translated text elements. * - * @return the text value. + * @return the value value. */ @Generated - public String getText() { - return this.text; + public List<TranslatedTextItem> getValue() { + return this.value; } /** @@ -50,33 +49,33 @@ public String getText() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("text", this.text); return jsonWriter.writeEndObject(); } /** - * Reads an instance of SourceText from the JsonReader. + * Reads an instance of TranslationResult from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of SourceText if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. + * @return An instance of TranslationResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SourceText. + * @throws IOException If an error occurs while reading the TranslationResult. */ @Generated - public static SourceText fromJson(JsonReader jsonReader) throws IOException { + public static TranslationResult fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - String text = null; + TranslationResult deserializedTranslationResult = new TranslationResult(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("text".equals(fieldName)) { - text = reader.getString(); + if ("value".equals(fieldName)) { + List<TranslatedTextItem> value = reader.readArray(reader1 -> TranslatedTextItem.fromJson(reader1)); + deserializedTranslationResult.value = value; } else { reader.skipChildren(); } } - return new SourceText(text); + return deserializedTranslationResult; }); } } diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/TransliterateBody.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/TransliterateBody.java new file mode 100644 index 000000000000..b0be4d15ed59 --- /dev/null +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/TransliterateBody.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.translation.text.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Request data for transliterate. + */ +@Immutable +public final class TransliterateBody implements JsonSerializable<TransliterateBody> { + + /* + * Array of the input text elements to transliterate. + */ + @Generated + private final List<InputTextItem> inputs; + + /** + * Creates an instance of TransliterateBody class. + * + * @param inputs the inputs value to set. + */ + @Generated + public TransliterateBody(List<InputTextItem> inputs) { + this.inputs = inputs; + } + + /** + * Get the inputs property: Array of the input text elements to transliterate. + * + * @return the inputs value. + */ + @Generated + public List<InputTextItem> getInputs() { + return this.inputs; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TransliterateBody from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TransliterateBody if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TransliterateBody. + */ + @Generated + public static TransliterateBody fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + List<InputTextItem> inputs = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("inputs".equals(fieldName)) { + inputs = reader.readArray(reader1 -> InputTextItem.fromJson(reader1)); + } else { + reader.skipChildren(); + } + } + return new TransliterateBody(inputs); + }); + } +} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/TransliterateResult.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/TransliterateResult.java new file mode 100644 index 000000000000..dc49172c777e --- /dev/null +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/TransliterateResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.translation.text.implementation.models; + +import com.azure.ai.translation.text.models.TransliteratedText; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Response for the transliteration API. + */ +@Immutable +public final class TransliterateResult implements JsonSerializable<TransliterateResult> { + + /* + * Array of transliterated texts + */ + @Generated + private List<TransliteratedText> value; + + /** + * Creates an instance of TransliterateResult class. + */ + @Generated + private TransliterateResult() { + } + + /** + * Get the value property: Array of transliterated texts. + * + * @return the value value. + */ + @Generated + public List<TransliteratedText> getValue() { + return this.value; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TransliterateResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TransliterateResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TransliterateResult. + */ + @Generated + public static TransliterateResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TransliterateResult deserializedTransliterateResult = new TransliterateResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("value".equals(fieldName)) { + List<TransliteratedText> value = reader.readArray(reader1 -> TransliteratedText.fromJson(reader1)); + deserializedTransliterateResult.value = value; + } else { + reader.skipChildren(); + } + } + return deserializedTransliterateResult; + }); + } +} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/package-info.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/package-info.java new file mode 100644 index 000000000000..f891bada5f9d --- /dev/null +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/implementation/models/package-info.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +/** + * <!-- start generated doc --> + * Package containing the data models for TextTranslation. + * Text translation is a cloud-based REST API feature of the Translator service that uses neural + * machine translation technology to enable quick and accurate source-to-target text translation + * in real time across all supported languages. + * + * The following methods are supported by the Text Translation feature: + * + * Languages. Returns a list of languages supported by Translate, Transliterate, and Dictionary Lookup operations. + * + * Translate. Renders single source-language text to multiple target-language texts with a single request. + * + * Transliterate. Converts characters or letters of a source language to the corresponding characters or letters of a + * target language. + * + * Detect. Returns the source code language code and a boolean variable denoting whether the detected language is + * supported for text translation and transliteration. + * <!-- end generated doc --> + */ +package com.azure.ai.translation.text.implementation.models; diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/BackTranslation.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/BackTranslation.java deleted file mode 100644 index 73ed1cdbcf4d..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/BackTranslation.java +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.translation.text.models; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Back Translation. - */ -@Immutable -public final class BackTranslation implements JsonSerializable<BackTranslation> { - - /* - * A string giving the normalized form of the source term that is a back-translation of the target. - * This value should be used as input to lookup examples. - */ - @Generated - private final String normalizedText; - - /* - * A string giving the source term that is a back-translation of the target in a form best - * suited for end-user display. - */ - @Generated - private final String displayText; - - /* - * An integer representing the number of examples that are available for this translation pair. - * Actual examples must be retrieved with a separate call to lookup examples. The number is mostly - * intended to facilitate display in a UX. For example, a user interface may add a hyperlink - * to the back-translation if the number of examples is greater than zero and show the back-translation - * as plain text if there are no examples. Note that the actual number of examples returned - * by a call to lookup examples may be less than numExamples, because additional filtering may be - * applied on the fly to remove "bad" examples. - */ - @Generated - private final int examplesCount; - - /* - * An integer representing the frequency of this translation pair in the data. The main purpose of this - * field is to provide a user interface with a means to sort back-translations so the most frequent terms are first. - */ - @Generated - private final int frequencyCount; - - /** - * Creates an instance of BackTranslation class. - * - * @param normalizedText the normalizedText value to set. - * @param displayText the displayText value to set. - * @param examplesCount the examplesCount value to set. - * @param frequencyCount the frequencyCount value to set. - */ - @Generated - private BackTranslation(String normalizedText, String displayText, int examplesCount, int frequencyCount) { - this.normalizedText = normalizedText; - this.displayText = displayText; - this.examplesCount = examplesCount; - this.frequencyCount = frequencyCount; - } - - /** - * Get the normalizedText property: A string giving the normalized form of the source term that is a - * back-translation of the target. - * This value should be used as input to lookup examples. - * - * @return the normalizedText value. - */ - @Generated - public String getNormalizedText() { - return this.normalizedText; - } - - /** - * Get the displayText property: A string giving the source term that is a back-translation of the target in a form - * best - * suited for end-user display. - * - * @return the displayText value. - */ - @Generated - public String getDisplayText() { - return this.displayText; - } - - /** - * Get the examplesCount property: An integer representing the number of examples that are available for this - * translation pair. - * Actual examples must be retrieved with a separate call to lookup examples. The number is mostly - * intended to facilitate display in a UX. For example, a user interface may add a hyperlink - * to the back-translation if the number of examples is greater than zero and show the back-translation - * as plain text if there are no examples. Note that the actual number of examples returned - * by a call to lookup examples may be less than numExamples, because additional filtering may be - * applied on the fly to remove "bad" examples. - * - * @return the examplesCount value. - */ - @Generated - public int getExamplesCount() { - return this.examplesCount; - } - - /** - * Get the frequencyCount property: An integer representing the frequency of this translation pair in the data. The - * main purpose of this - * field is to provide a user interface with a means to sort back-translations so the most frequent terms are first. - * - * @return the frequencyCount value. - */ - @Generated - public int getFrequencyCount() { - return this.frequencyCount; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("normalizedText", this.normalizedText); - jsonWriter.writeStringField("displayText", this.displayText); - jsonWriter.writeIntField("numExamples", this.examplesCount); - jsonWriter.writeIntField("frequencyCount", this.frequencyCount); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BackTranslation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BackTranslation if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BackTranslation. - */ - @Generated - public static BackTranslation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String normalizedText = null; - String displayText = null; - int examplesCount = 0; - int frequencyCount = 0; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("normalizedText".equals(fieldName)) { - normalizedText = reader.getString(); - } else if ("displayText".equals(fieldName)) { - displayText = reader.getString(); - } else if ("numExamples".equals(fieldName)) { - examplesCount = reader.getInt(); - } else if ("frequencyCount".equals(fieldName)) { - frequencyCount = reader.getInt(); - } else { - reader.skipChildren(); - } - } - return new BackTranslation(normalizedText, displayText, examplesCount, frequencyCount); - }); - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/BreakSentenceItem.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/BreakSentenceItem.java deleted file mode 100644 index 649f0c9a0dd7..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/BreakSentenceItem.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.translation.text.models; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Item containing break sentence result. - */ -@Immutable -public final class BreakSentenceItem implements JsonSerializable<BreakSentenceItem> { - - /* - * The detectedLanguage property is only present in the result object when language auto-detection is requested. - */ - @Generated - private DetectedLanguage detectedLanguage; - - /* - * An integer array representing the lengths of the sentences in the input text. - * The length of the array is the number of sentences, and the values are the length of each sentence. - */ - @Generated - private final List<Integer> sentencesLengths; - - /** - * Creates an instance of BreakSentenceItem class. - * - * @param sentencesLengths the sentencesLengths value to set. - */ - @Generated - private BreakSentenceItem(List<Integer> sentencesLengths) { - this.sentencesLengths = sentencesLengths; - } - - /** - * Get the detectedLanguage property: The detectedLanguage property is only present in the result object when - * language auto-detection is requested. - * - * @return the detectedLanguage value. - */ - @Generated - public DetectedLanguage getDetectedLanguage() { - return this.detectedLanguage; - } - - /** - * Get the sentencesLengths property: An integer array representing the lengths of the sentences in the input text. - * The length of the array is the number of sentences, and the values are the length of each sentence. - * - * @return the sentencesLengths value. - */ - @Generated - public List<Integer> getSentencesLengths() { - return this.sentencesLengths; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("sentLen", this.sentencesLengths, (writer, element) -> writer.writeInt(element)); - jsonWriter.writeJsonField("detectedLanguage", this.detectedLanguage); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BreakSentenceItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BreakSentenceItem if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BreakSentenceItem. - */ - @Generated - public static BreakSentenceItem fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - List<Integer> sentencesLengths = null; - DetectedLanguage detectedLanguage = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("sentLen".equals(fieldName)) { - sentencesLengths = reader.readArray(reader1 -> reader1.getInt()); - } else if ("detectedLanguage".equals(fieldName)) { - detectedLanguage = DetectedLanguage.fromJson(reader); - } else { - reader.skipChildren(); - } - } - BreakSentenceItem deserializedBreakSentenceItem = new BreakSentenceItem(sentencesLengths); - deserializedBreakSentenceItem.detectedLanguage = detectedLanguage; - return deserializedBreakSentenceItem; - }); - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DetectedLanguage.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DetectedLanguage.java index 4d519097e781..72b412a8774f 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DetectedLanguage.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DetectedLanguage.java @@ -28,18 +28,18 @@ public final class DetectedLanguage implements JsonSerializable<DetectedLanguage * The score is between zero and one and a low score indicates a low confidence. */ @Generated - private final double confidence; + private final double score; /** * Creates an instance of DetectedLanguage class. * * @param language the language value to set. - * @param confidence the confidence value to set. + * @param score the score value to set. */ @Generated - private DetectedLanguage(String language, double confidence) { + private DetectedLanguage(String language, double score) { this.language = language; - this.confidence = confidence; + this.score = score; } /** @@ -53,14 +53,14 @@ public String getLanguage() { } /** - * Get the confidence property: A float value indicating the confidence in the result. + * Get the score property: A float value indicating the confidence in the result. * The score is between zero and one and a low score indicates a low confidence. * - * @return the confidence value. + * @return the score value. */ @Generated - public double getConfidence() { - return this.confidence; + public double getScore() { + return this.score; } /** @@ -71,7 +71,7 @@ public double getConfidence() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("language", this.language); - jsonWriter.writeDoubleField("score", this.confidence); + jsonWriter.writeDoubleField("score", this.score); return jsonWriter.writeEndObject(); } @@ -88,19 +88,19 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { public static DetectedLanguage fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { String language = null; - double confidence = 0.0; + double score = 0.0; while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("language".equals(fieldName)) { language = reader.getString(); } else if ("score".equals(fieldName)) { - confidence = reader.getDouble(); + score = reader.getDouble(); } else { reader.skipChildren(); } } - return new DetectedLanguage(language, confidence); + return new DetectedLanguage(language, score); }); } } diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryExample.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryExample.java deleted file mode 100644 index c998adefbdb5..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryExample.java +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.translation.text.models; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Dictionary Example. - */ -@Immutable -public final class DictionaryExample implements JsonSerializable<DictionaryExample> { - - /* - * The string to concatenate before the value of sourceTerm to form a complete example. - * Do not add a space character, since it is already there when it should be. - * This value may be an empty string. - */ - @Generated - private final String sourcePrefix; - - /* - * A string equal to the actual term looked up. The string is added with sourcePrefix - * and sourceSuffix to form the complete example. Its value is separated so it can be - * marked in a user interface, e.g., by bolding it. - */ - @Generated - private final String sourceTerm; - - /* - * The string to concatenate after the value of sourceTerm to form a complete example. - * Do not add a space character, since it is already there when it should be. - * This value may be an empty string. - */ - @Generated - private final String sourceSuffix; - - /* - * A string similar to sourcePrefix but for the target. - */ - @Generated - private final String targetPrefix; - - /* - * A string similar to sourceTerm but for the target. - */ - @Generated - private final String targetTerm; - - /* - * A string similar to sourceSuffix but for the target. - */ - @Generated - private final String targetSuffix; - - /** - * Creates an instance of DictionaryExample class. - * - * @param sourcePrefix the sourcePrefix value to set. - * @param sourceTerm the sourceTerm value to set. - * @param sourceSuffix the sourceSuffix value to set. - * @param targetPrefix the targetPrefix value to set. - * @param targetTerm the targetTerm value to set. - * @param targetSuffix the targetSuffix value to set. - */ - @Generated - private DictionaryExample(String sourcePrefix, String sourceTerm, String sourceSuffix, String targetPrefix, - String targetTerm, String targetSuffix) { - this.sourcePrefix = sourcePrefix; - this.sourceTerm = sourceTerm; - this.sourceSuffix = sourceSuffix; - this.targetPrefix = targetPrefix; - this.targetTerm = targetTerm; - this.targetSuffix = targetSuffix; - } - - /** - * Get the sourcePrefix property: The string to concatenate before the value of sourceTerm to form a complete - * example. - * Do not add a space character, since it is already there when it should be. - * This value may be an empty string. - * - * @return the sourcePrefix value. - */ - @Generated - public String getSourcePrefix() { - return this.sourcePrefix; - } - - /** - * Get the sourceTerm property: A string equal to the actual term looked up. The string is added with sourcePrefix - * and sourceSuffix to form the complete example. Its value is separated so it can be - * marked in a user interface, e.g., by bolding it. - * - * @return the sourceTerm value. - */ - @Generated - public String getSourceTerm() { - return this.sourceTerm; - } - - /** - * Get the sourceSuffix property: The string to concatenate after the value of sourceTerm to form a complete - * example. - * Do not add a space character, since it is already there when it should be. - * This value may be an empty string. - * - * @return the sourceSuffix value. - */ - @Generated - public String getSourceSuffix() { - return this.sourceSuffix; - } - - /** - * Get the targetPrefix property: A string similar to sourcePrefix but for the target. - * - * @return the targetPrefix value. - */ - @Generated - public String getTargetPrefix() { - return this.targetPrefix; - } - - /** - * Get the targetTerm property: A string similar to sourceTerm but for the target. - * - * @return the targetTerm value. - */ - @Generated - public String getTargetTerm() { - return this.targetTerm; - } - - /** - * Get the targetSuffix property: A string similar to sourceSuffix but for the target. - * - * @return the targetSuffix value. - */ - @Generated - public String getTargetSuffix() { - return this.targetSuffix; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sourcePrefix", this.sourcePrefix); - jsonWriter.writeStringField("sourceTerm", this.sourceTerm); - jsonWriter.writeStringField("sourceSuffix", this.sourceSuffix); - jsonWriter.writeStringField("targetPrefix", this.targetPrefix); - jsonWriter.writeStringField("targetTerm", this.targetTerm); - jsonWriter.writeStringField("targetSuffix", this.targetSuffix); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DictionaryExample from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DictionaryExample if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DictionaryExample. - */ - @Generated - public static DictionaryExample fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String sourcePrefix = null; - String sourceTerm = null; - String sourceSuffix = null; - String targetPrefix = null; - String targetTerm = null; - String targetSuffix = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("sourcePrefix".equals(fieldName)) { - sourcePrefix = reader.getString(); - } else if ("sourceTerm".equals(fieldName)) { - sourceTerm = reader.getString(); - } else if ("sourceSuffix".equals(fieldName)) { - sourceSuffix = reader.getString(); - } else if ("targetPrefix".equals(fieldName)) { - targetPrefix = reader.getString(); - } else if ("targetTerm".equals(fieldName)) { - targetTerm = reader.getString(); - } else if ("targetSuffix".equals(fieldName)) { - targetSuffix = reader.getString(); - } else { - reader.skipChildren(); - } - } - return new DictionaryExample(sourcePrefix, sourceTerm, sourceSuffix, targetPrefix, targetTerm, - targetSuffix); - }); - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryExampleItem.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryExampleItem.java deleted file mode 100644 index 5ba37ece88d1..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryExampleItem.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.translation.text.models; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Dictionary Example element. - */ -@Immutable -public final class DictionaryExampleItem implements JsonSerializable<DictionaryExampleItem> { - - /* - * A string giving the normalized form of the source term. Generally, this should be identical - * to the value of the Text field at the matching list index in the body of the request. - */ - @Generated - private final String normalizedSource; - - /* - * A string giving the normalized form of the target term. Generally, this should be identical - * to the value of the Translation field at the matching list index in the body of the request. - */ - @Generated - private final String normalizedTarget; - - /* - * A list of examples for the (source term, target term) pair. - */ - @Generated - private final List<DictionaryExample> examples; - - /** - * Creates an instance of DictionaryExampleItem class. - * - * @param normalizedSource the normalizedSource value to set. - * @param normalizedTarget the normalizedTarget value to set. - * @param examples the examples value to set. - */ - @Generated - private DictionaryExampleItem(String normalizedSource, String normalizedTarget, List<DictionaryExample> examples) { - this.normalizedSource = normalizedSource; - this.normalizedTarget = normalizedTarget; - this.examples = examples; - } - - /** - * Get the normalizedSource property: A string giving the normalized form of the source term. Generally, this should - * be identical - * to the value of the Text field at the matching list index in the body of the request. - * - * @return the normalizedSource value. - */ - @Generated - public String getNormalizedSource() { - return this.normalizedSource; - } - - /** - * Get the normalizedTarget property: A string giving the normalized form of the target term. Generally, this should - * be identical - * to the value of the Translation field at the matching list index in the body of the request. - * - * @return the normalizedTarget value. - */ - @Generated - public String getNormalizedTarget() { - return this.normalizedTarget; - } - - /** - * Get the examples property: A list of examples for the (source term, target term) pair. - * - * @return the examples value. - */ - @Generated - public List<DictionaryExample> getExamples() { - return this.examples; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("normalizedSource", this.normalizedSource); - jsonWriter.writeStringField("normalizedTarget", this.normalizedTarget); - jsonWriter.writeArrayField("examples", this.examples, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DictionaryExampleItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DictionaryExampleItem if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DictionaryExampleItem. - */ - @Generated - public static DictionaryExampleItem fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String normalizedSource = null; - String normalizedTarget = null; - List<DictionaryExample> examples = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("normalizedSource".equals(fieldName)) { - normalizedSource = reader.getString(); - } else if ("normalizedTarget".equals(fieldName)) { - normalizedTarget = reader.getString(); - } else if ("examples".equals(fieldName)) { - examples = reader.readArray(reader1 -> DictionaryExample.fromJson(reader1)); - } else { - reader.skipChildren(); - } - } - return new DictionaryExampleItem(normalizedSource, normalizedTarget, examples); - }); - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryExampleTextItem.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryExampleTextItem.java deleted file mode 100644 index 312c6073c9cb..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryExampleTextItem.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.translation.text.models; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Element containing the text with translation. - */ -@Immutable -public final class DictionaryExampleTextItem extends InputTextItem { - - /* - * A string specifying the translated text previously returned by the Dictionary lookup operation. - * This should be the value from the normalizedTarget field in the translations list of the Dictionary - * lookup response. The service will return examples for the specific source-target word-pair. - */ - @Generated - private final String translation; - - /** - * Creates an instance of DictionaryExampleTextItem class. - * - * @param text the text value to set. - * @param translation the translation value to set. - */ - @Generated - public DictionaryExampleTextItem(String text, String translation) { - super(text); - this.translation = translation; - } - - /** - * Get the translation property: A string specifying the translated text previously returned by the Dictionary - * lookup operation. - * This should be the value from the normalizedTarget field in the translations list of the Dictionary - * lookup response. The service will return examples for the specific source-target word-pair. - * - * @return the translation value. - */ - @Generated - public String getTranslation() { - return this.translation; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("text", getText()); - jsonWriter.writeStringField("translation", this.translation); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DictionaryExampleTextItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DictionaryExampleTextItem if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DictionaryExampleTextItem. - */ - @Generated - public static DictionaryExampleTextItem fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String text = null; - String translation = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("text".equals(fieldName)) { - text = reader.getString(); - } else if ("translation".equals(fieldName)) { - translation = reader.getString(); - } else { - reader.skipChildren(); - } - } - return new DictionaryExampleTextItem(text, translation); - }); - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryLookupItem.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryLookupItem.java deleted file mode 100644 index 172ab52bba1b..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryLookupItem.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.translation.text.models; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Dictionary Lookup Element. - */ -@Immutable -public final class DictionaryLookupItem implements JsonSerializable<DictionaryLookupItem> { - - /* - * A string giving the normalized form of the source term. - * For example, if the request is "JOHN", the normalized form will be "john". - * The content of this field becomes the input to lookup examples. - */ - @Generated - private final String normalizedSource; - - /* - * A string giving the source term in a form best suited for end-user display. - * For example, if the input is "JOHN", the display form will reflect the usual - * spelling of the name: "John". - */ - @Generated - private final String displaySource; - - /* - * A list of translations for the source term. - */ - @Generated - private final List<DictionaryTranslation> translations; - - /** - * Creates an instance of DictionaryLookupItem class. - * - * @param normalizedSource the normalizedSource value to set. - * @param displaySource the displaySource value to set. - * @param translations the translations value to set. - */ - @Generated - private DictionaryLookupItem(String normalizedSource, String displaySource, - List<DictionaryTranslation> translations) { - this.normalizedSource = normalizedSource; - this.displaySource = displaySource; - this.translations = translations; - } - - /** - * Get the normalizedSource property: A string giving the normalized form of the source term. - * For example, if the request is "JOHN", the normalized form will be "john". - * The content of this field becomes the input to lookup examples. - * - * @return the normalizedSource value. - */ - @Generated - public String getNormalizedSource() { - return this.normalizedSource; - } - - /** - * Get the displaySource property: A string giving the source term in a form best suited for end-user display. - * For example, if the input is "JOHN", the display form will reflect the usual - * spelling of the name: "John". - * - * @return the displaySource value. - */ - @Generated - public String getDisplaySource() { - return this.displaySource; - } - - /** - * Get the translations property: A list of translations for the source term. - * - * @return the translations value. - */ - @Generated - public List<DictionaryTranslation> getTranslations() { - return this.translations; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("normalizedSource", this.normalizedSource); - jsonWriter.writeStringField("displaySource", this.displaySource); - jsonWriter.writeArrayField("translations", this.translations, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DictionaryLookupItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DictionaryLookupItem if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DictionaryLookupItem. - */ - @Generated - public static DictionaryLookupItem fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String normalizedSource = null; - String displaySource = null; - List<DictionaryTranslation> translations = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("normalizedSource".equals(fieldName)) { - normalizedSource = reader.getString(); - } else if ("displaySource".equals(fieldName)) { - displaySource = reader.getString(); - } else if ("translations".equals(fieldName)) { - translations = reader.readArray(reader1 -> DictionaryTranslation.fromJson(reader1)); - } else { - reader.skipChildren(); - } - } - return new DictionaryLookupItem(normalizedSource, displaySource, translations); - }); - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryTranslation.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryTranslation.java deleted file mode 100644 index 124f6555b1ae..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/DictionaryTranslation.java +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.translation.text.models; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Translation source term. - */ -@Immutable -public final class DictionaryTranslation implements JsonSerializable<DictionaryTranslation> { - - /* - * A string giving the normalized form of this term in the target language. - * This value should be used as input to lookup examples. - */ - @Generated - private final String normalizedTarget; - - /* - * A string giving the term in the target language and in a form best suited - * for end-user display. Generally, this will only differ from the normalizedTarget - * in terms of capitalization. For example, a proper noun like "Juan" will have - * normalizedTarget = "juan" and displayTarget = "Juan". - */ - @Generated - private final String displayTarget; - - /* - * A string associating this term with a part-of-speech tag. - */ - @Generated - private final String posTag; - - /* - * A value between 0.0 and 1.0 which represents the "confidence" - * (or perhaps more accurately, "probability in the training data") of that translation pair. - * The sum of confidence scores for one source word may or may not sum to 1.0. - */ - @Generated - private final double confidence; - - /* - * A string giving the word to display as a prefix of the translation. Currently, - * this is the gendered determiner of nouns, in languages that have gendered determiners. - * For example, the prefix of the Spanish word "mosca" is "la", since "mosca" is a feminine noun in Spanish. - * This is only dependent on the translation, and not on the source. - * If there is no prefix, it will be the empty string. - */ - @Generated - private final String prefixWord; - - /* - * A list of "back translations" of the target. For example, source words that the target can translate to. - * The list is guaranteed to contain the source word that was requested (e.g., if the source word being - * looked up is "fly", then it is guaranteed that "fly" will be in the backTranslations list). - * However, it is not guaranteed to be in the first position, and often will not be. - */ - @Generated - private final List<BackTranslation> backTranslations; - - /** - * Creates an instance of DictionaryTranslation class. - * - * @param normalizedTarget the normalizedTarget value to set. - * @param displayTarget the displayTarget value to set. - * @param posTag the posTag value to set. - * @param confidence the confidence value to set. - * @param prefixWord the prefixWord value to set. - * @param backTranslations the backTranslations value to set. - */ - @Generated - private DictionaryTranslation(String normalizedTarget, String displayTarget, String posTag, double confidence, - String prefixWord, List<BackTranslation> backTranslations) { - this.normalizedTarget = normalizedTarget; - this.displayTarget = displayTarget; - this.posTag = posTag; - this.confidence = confidence; - this.prefixWord = prefixWord; - this.backTranslations = backTranslations; - } - - /** - * Get the normalizedTarget property: A string giving the normalized form of this term in the target language. - * This value should be used as input to lookup examples. - * - * @return the normalizedTarget value. - */ - @Generated - public String getNormalizedTarget() { - return this.normalizedTarget; - } - - /** - * Get the displayTarget property: A string giving the term in the target language and in a form best suited - * for end-user display. Generally, this will only differ from the normalizedTarget - * in terms of capitalization. For example, a proper noun like "Juan" will have - * normalizedTarget = "juan" and displayTarget = "Juan". - * - * @return the displayTarget value. - */ - @Generated - public String getDisplayTarget() { - return this.displayTarget; - } - - /** - * Get the posTag property: A string associating this term with a part-of-speech tag. - * - * @return the posTag value. - */ - @Generated - public String getPosTag() { - return this.posTag; - } - - /** - * Get the confidence property: A value between 0.0 and 1.0 which represents the "confidence" - * (or perhaps more accurately, "probability in the training data") of that translation pair. - * The sum of confidence scores for one source word may or may not sum to 1.0. - * - * @return the confidence value. - */ - @Generated - public double getConfidence() { - return this.confidence; - } - - /** - * Get the prefixWord property: A string giving the word to display as a prefix of the translation. Currently, - * this is the gendered determiner of nouns, in languages that have gendered determiners. - * For example, the prefix of the Spanish word "mosca" is "la", since "mosca" is a feminine noun in Spanish. - * This is only dependent on the translation, and not on the source. - * If there is no prefix, it will be the empty string. - * - * @return the prefixWord value. - */ - @Generated - public String getPrefixWord() { - return this.prefixWord; - } - - /** - * Get the backTranslations property: A list of "back translations" of the target. For example, source words that - * the target can translate to. - * The list is guaranteed to contain the source word that was requested (e.g., if the source word being - * looked up is "fly", then it is guaranteed that "fly" will be in the backTranslations list). - * However, it is not guaranteed to be in the first position, and often will not be. - * - * @return the backTranslations value. - */ - @Generated - public List<BackTranslation> getBackTranslations() { - return this.backTranslations; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("normalizedTarget", this.normalizedTarget); - jsonWriter.writeStringField("displayTarget", this.displayTarget); - jsonWriter.writeStringField("posTag", this.posTag); - jsonWriter.writeDoubleField("confidence", this.confidence); - jsonWriter.writeStringField("prefixWord", this.prefixWord); - jsonWriter.writeArrayField("backTranslations", this.backTranslations, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DictionaryTranslation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DictionaryTranslation if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DictionaryTranslation. - */ - @Generated - public static DictionaryTranslation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String normalizedTarget = null; - String displayTarget = null; - String posTag = null; - double confidence = 0.0; - String prefixWord = null; - List<BackTranslation> backTranslations = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("normalizedTarget".equals(fieldName)) { - normalizedTarget = reader.getString(); - } else if ("displayTarget".equals(fieldName)) { - displayTarget = reader.getString(); - } else if ("posTag".equals(fieldName)) { - posTag = reader.getString(); - } else if ("confidence".equals(fieldName)) { - confidence = reader.getDouble(); - } else if ("prefixWord".equals(fieldName)) { - prefixWord = reader.getString(); - } else if ("backTranslations".equals(fieldName)) { - backTranslations = reader.readArray(reader1 -> BackTranslation.fromJson(reader1)); - } else { - reader.skipChildren(); - } - } - return new DictionaryTranslation(normalizedTarget, displayTarget, posTag, confidence, prefixWord, - backTranslations); - }); - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/GetSupportedLanguagesResult.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/GetSupportedLanguagesResult.java index b4e2db20f224..46fd90f39608 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/GetSupportedLanguagesResult.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/GetSupportedLanguagesResult.java @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; import java.util.Map; /** @@ -30,12 +31,6 @@ public final class GetSupportedLanguagesResult implements JsonSerializable<GetSu @Generated private Map<String, TransliterationLanguage> transliteration; - /* - * Languages that support dictionary API. - */ - @Generated - private Map<String, SourceDictionaryLanguage> dictionary; - /** * Creates an instance of GetSupportedLanguagesResult class. */ @@ -63,16 +58,6 @@ public Map<String, TransliterationLanguage> getTransliteration() { return this.transliteration; } - /** - * Get the dictionary property: Languages that support dictionary API. - * - * @return the dictionary value. - */ - @Generated - public Map<String, SourceDictionaryLanguage> getDictionary() { - return this.dictionary; - } - /** * {@inheritDoc} */ @@ -80,10 +65,6 @@ public Map<String, SourceDictionaryLanguage> getDictionary() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("translation", this.translation, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeMapField("transliteration", this.transliteration, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeMapField("dictionary", this.dictionary, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -110,10 +91,9 @@ public static GetSupportedLanguagesResult fromJson(JsonReader jsonReader) throws Map<String, TransliterationLanguage> transliteration = reader.readMap(reader1 -> TransliterationLanguage.fromJson(reader1)); deserializedGetSupportedLanguagesResult.transliteration = transliteration; - } else if ("dictionary".equals(fieldName)) { - Map<String, SourceDictionaryLanguage> dictionary - = reader.readMap(reader1 -> SourceDictionaryLanguage.fromJson(reader1)); - deserializedGetSupportedLanguagesResult.dictionary = dictionary; + } else if ("models".equals(fieldName)) { + List<String> models = reader.readArray(reader1 -> reader1.getString()); + deserializedGetSupportedLanguagesResult.models = models; } else { reader.skipChildren(); } @@ -121,4 +101,20 @@ public static GetSupportedLanguagesResult fromJson(JsonReader jsonReader) throws return deserializedGetSupportedLanguagesResult; }); } + + /* + * LLM models supported. + */ + @Generated + private List<String> models; + + /** + * Get the models property: LLM models supported. + * + * @return the models value. + */ + @Generated + public List<String> getModels() { + return this.models; + } } diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/LanguageScope.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/LanguageScope.java index 16d4791aced4..d51a76013b18 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/LanguageScope.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/LanguageScope.java @@ -23,9 +23,9 @@ public final class LanguageScope extends ExpandableStringEnum<LanguageScope> { public static final LanguageScope TRANSLITERATION = fromString("Transliteration"); /** - * Static value Dictionary for LanguageScope. + * Static value Models for LanguageScope. */ - public static final LanguageScope DICTIONARY = fromString("Dictionary"); + public static final LanguageScope MODELS = fromString("Models"); /** * Creates a new instance of LanguageScope value. diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/ReferenceTextPair.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/ReferenceTextPair.java new file mode 100644 index 000000000000..797fda6676b7 --- /dev/null +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/ReferenceTextPair.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.translation.text.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference text pair to generate adaptive customized translation. + */ +@Immutable +public final class ReferenceTextPair implements JsonSerializable<ReferenceTextPair> { + + /* + * Source reference sentence. + */ + @Generated + private final String source; + + /* + * Target reference sentence. + */ + @Generated + private final String target; + + /** + * Creates an instance of ReferenceTextPair class. + * + * @param source the source value to set. + * @param target the target value to set. + */ + @Generated + public ReferenceTextPair(String source, String target) { + this.source = source; + this.target = target; + } + + /** + * Get the source property: Source reference sentence. + * + * @return the source value. + */ + @Generated + public String getSource() { + return this.source; + } + + /** + * Get the target property: Target reference sentence. + * + * @return the target value. + */ + @Generated + public String getTarget() { + return this.target; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("source", this.source); + jsonWriter.writeStringField("target", this.target); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReferenceTextPair from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReferenceTextPair if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ReferenceTextPair. + */ + @Generated + public static ReferenceTextPair fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String source = null; + String target = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("source".equals(fieldName)) { + source = reader.getString(); + } else if ("target".equals(fieldName)) { + target = reader.getString(); + } else { + reader.skipChildren(); + } + } + return new ReferenceTextPair(source, target); + }); + } +} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/SentenceBoundaries.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/SentenceBoundaries.java deleted file mode 100644 index cd3749333639..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/SentenceBoundaries.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.translation.text.models; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * An object returning sentence boundaries in the input and output texts. - */ -@Immutable -public final class SentenceBoundaries implements JsonSerializable<SentenceBoundaries> { - - /* - * An integer array representing the lengths of the sentences in the input text. - * The length of the array is the number of sentences, and the values are the length of each sentence. - */ - @Generated - private final List<Integer> sourceSentencesLengths; - - /* - * An integer array representing the lengths of the sentences in the translated text. - * The length of the array is the number of sentences, and the values are the length of each sentence. - */ - @Generated - private final List<Integer> translatedSentencesLengths; - - /** - * Creates an instance of SentenceBoundaries class. - * - * @param sourceSentencesLengths the sourceSentencesLengths value to set. - * @param translatedSentencesLengths the translatedSentencesLengths value to set. - */ - @Generated - private SentenceBoundaries(List<Integer> sourceSentencesLengths, List<Integer> translatedSentencesLengths) { - this.sourceSentencesLengths = sourceSentencesLengths; - this.translatedSentencesLengths = translatedSentencesLengths; - } - - /** - * Get the sourceSentencesLengths property: An integer array representing the lengths of the sentences in the input - * text. - * The length of the array is the number of sentences, and the values are the length of each sentence. - * - * @return the sourceSentencesLengths value. - */ - @Generated - public List<Integer> getSourceSentencesLengths() { - return this.sourceSentencesLengths; - } - - /** - * Get the translatedSentencesLengths property: An integer array representing the lengths of the sentences in the - * translated text. - * The length of the array is the number of sentences, and the values are the length of each sentence. - * - * @return the translatedSentencesLengths value. - */ - @Generated - public List<Integer> getTranslatedSentencesLengths() { - return this.translatedSentencesLengths; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("srcSentLen", this.sourceSentencesLengths, - (writer, element) -> writer.writeInt(element)); - jsonWriter.writeArrayField("transSentLen", this.translatedSentencesLengths, - (writer, element) -> writer.writeInt(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SentenceBoundaries from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SentenceBoundaries if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SentenceBoundaries. - */ - @Generated - public static SentenceBoundaries fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - List<Integer> sourceSentencesLengths = null; - List<Integer> translatedSentencesLengths = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("srcSentLen".equals(fieldName)) { - sourceSentencesLengths = reader.readArray(reader1 -> reader1.getInt()); - } else if ("transSentLen".equals(fieldName)) { - translatedSentencesLengths = reader.readArray(reader1 -> reader1.getInt()); - } else { - reader.skipChildren(); - } - } - return new SentenceBoundaries(sourceSentencesLengths, translatedSentencesLengths); - }); - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/SourceDictionaryLanguage.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/SourceDictionaryLanguage.java deleted file mode 100644 index 49b777bf10ac..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/SourceDictionaryLanguage.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.translation.text.models; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Properties ot the source dictionary language. - */ -@Immutable -public final class SourceDictionaryLanguage implements JsonSerializable<SourceDictionaryLanguage> { - - /* - * Display name of the language in the locale requested via Accept-Language header. - */ - @Generated - private final String name; - - /* - * Display name of the language in the locale native for this language. - */ - @Generated - private final String nativeName; - - /* - * Directionality, which is rtl for right-to-left languages or ltr for left-to-right languages. - */ - @Generated - private final LanguageDirectionality directionality; - - /* - * List of languages with alterative translations and examples for the query expressed in the source language. - */ - @Generated - private final List<TargetDictionaryLanguage> translations; - - /** - * Creates an instance of SourceDictionaryLanguage class. - * - * @param name the name value to set. - * @param nativeName the nativeName value to set. - * @param directionality the directionality value to set. - * @param translations the translations value to set. - */ - @Generated - private SourceDictionaryLanguage(String name, String nativeName, LanguageDirectionality directionality, - List<TargetDictionaryLanguage> translations) { - this.name = name; - this.nativeName = nativeName; - this.directionality = directionality; - this.translations = translations; - } - - /** - * Get the name property: Display name of the language in the locale requested via Accept-Language header. - * - * @return the name value. - */ - @Generated - public String getName() { - return this.name; - } - - /** - * Get the nativeName property: Display name of the language in the locale native for this language. - * - * @return the nativeName value. - */ - @Generated - public String getNativeName() { - return this.nativeName; - } - - /** - * Get the directionality property: Directionality, which is rtl for right-to-left languages or ltr for - * left-to-right languages. - * - * @return the directionality value. - */ - @Generated - public LanguageDirectionality getDirectionality() { - return this.directionality; - } - - /** - * Get the translations property: List of languages with alterative translations and examples for the query - * expressed in the source language. - * - * @return the translations value. - */ - @Generated - public List<TargetDictionaryLanguage> getTranslations() { - return this.translations; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("nativeName", this.nativeName); - jsonWriter.writeStringField("dir", this.directionality == null ? null : this.directionality.toString()); - jsonWriter.writeArrayField("translations", this.translations, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SourceDictionaryLanguage from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SourceDictionaryLanguage if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SourceDictionaryLanguage. - */ - @Generated - public static SourceDictionaryLanguage fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String name = null; - String nativeName = null; - LanguageDirectionality directionality = null; - List<TargetDictionaryLanguage> translations = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("name".equals(fieldName)) { - name = reader.getString(); - } else if ("nativeName".equals(fieldName)) { - nativeName = reader.getString(); - } else if ("dir".equals(fieldName)) { - directionality = LanguageDirectionality.fromString(reader.getString()); - } else if ("translations".equals(fieldName)) { - translations = reader.readArray(reader1 -> TargetDictionaryLanguage.fromJson(reader1)); - } else { - reader.skipChildren(); - } - } - return new SourceDictionaryLanguage(name, nativeName, directionality, translations); - }); - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TargetDictionaryLanguage.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TargetDictionaryLanguage.java deleted file mode 100644 index 1bab0ee966e4..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TargetDictionaryLanguage.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.translation.text.models; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties of the target dictionary language. - */ -@Immutable -public final class TargetDictionaryLanguage implements JsonSerializable<TargetDictionaryLanguage> { - - /* - * Display name of the language in the locale requested via Accept-Language header. - */ - @Generated - private final String name; - - /* - * Display name of the language in the locale native for this language. - */ - @Generated - private final String nativeName; - - /* - * Directionality, which is rtl for right-to-left languages or ltr for left-to-right languages. - */ - @Generated - private final LanguageDirectionality directionality; - - /* - * Language code identifying the target language. - */ - @Generated - private final String code; - - /** - * Creates an instance of TargetDictionaryLanguage class. - * - * @param name the name value to set. - * @param nativeName the nativeName value to set. - * @param directionality the directionality value to set. - * @param code the code value to set. - */ - @Generated - private TargetDictionaryLanguage(String name, String nativeName, LanguageDirectionality directionality, - String code) { - this.name = name; - this.nativeName = nativeName; - this.directionality = directionality; - this.code = code; - } - - /** - * Get the name property: Display name of the language in the locale requested via Accept-Language header. - * - * @return the name value. - */ - @Generated - public String getName() { - return this.name; - } - - /** - * Get the nativeName property: Display name of the language in the locale native for this language. - * - * @return the nativeName value. - */ - @Generated - public String getNativeName() { - return this.nativeName; - } - - /** - * Get the directionality property: Directionality, which is rtl for right-to-left languages or ltr for - * left-to-right languages. - * - * @return the directionality value. - */ - @Generated - public LanguageDirectionality getDirectionality() { - return this.directionality; - } - - /** - * Get the code property: Language code identifying the target language. - * - * @return the code value. - */ - @Generated - public String getCode() { - return this.code; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("nativeName", this.nativeName); - jsonWriter.writeStringField("dir", this.directionality == null ? null : this.directionality.toString()); - jsonWriter.writeStringField("code", this.code); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TargetDictionaryLanguage from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TargetDictionaryLanguage if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TargetDictionaryLanguage. - */ - @Generated - public static TargetDictionaryLanguage fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String name = null; - String nativeName = null; - LanguageDirectionality directionality = null; - String code = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("name".equals(fieldName)) { - name = reader.getString(); - } else if ("nativeName".equals(fieldName)) { - nativeName = reader.getString(); - } else if ("dir".equals(fieldName)) { - directionality = LanguageDirectionality.fromString(reader.getString()); - } else if ("code".equals(fieldName)) { - code = reader.getString(); - } else { - reader.skipChildren(); - } - } - return new TargetDictionaryLanguage(name, nativeName, directionality, code); - }); - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslateInputItem.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslateInputItem.java new file mode 100644 index 000000000000..9a8102e61226 --- /dev/null +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslateInputItem.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.translation.text.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Element containing the text for translation. + */ +@Fluent +public final class TranslateInputItem implements JsonSerializable<TranslateInputItem> { + + /* + * Text to translate. + */ + @Generated + private final String text; + + /* + * Specifies the script of the input text. + */ + @Generated + private String script; + + /* + * Specifies the language of the input text. Find which languages are available to translate by + * looking up supported languages using the translation scope. If the language parameter isn't + * specified, automatic language detection is applied to determine the source language. + * + * You must use the language parameter rather than autodetection when using the dynamic dictionary feature. + * Note: the dynamic dictionary feature is case-sensitive. + */ + @Generated + private String language; + + /* + * Defines whether the text being translated is plain text or HTML text. Any HTML needs to be a well-formed, + * complete element. Possible values are: plain (default) or html. + */ + @Generated + private TextType textType; + + /* + * Translation target parameters. + */ + @Generated + private final List<TranslationTarget> translationTargets; + + /** + * Creates an instance of TranslateInputItem class. + * + * @param text the text value to set. + * @param translationTargets the translationTargets value to set. + */ + @Generated + public TranslateInputItem(String text, List<TranslationTarget> translationTargets) { + this.text = text; + this.translationTargets = translationTargets; + } + + /** + * Get the text property: Text to translate. + * + * @return the text value. + */ + @Generated + public String getText() { + return this.text; + } + + /** + * Get the script property: Specifies the script of the input text. + * + * @return the script value. + */ + @Generated + public String getScript() { + return this.script; + } + + /** + * Set the script property: Specifies the script of the input text. + * + * @param script the script value to set. + * @return the TranslateInputItem object itself. + */ + @Generated + public TranslateInputItem setScript(String script) { + this.script = script; + return this; + } + + /** + * Get the language property: Specifies the language of the input text. Find which languages are available to + * translate by + * looking up supported languages using the translation scope. If the language parameter isn't + * specified, automatic language detection is applied to determine the source language. + * + * You must use the language parameter rather than autodetection when using the dynamic dictionary feature. + * Note: the dynamic dictionary feature is case-sensitive. + * + * @return the language value. + */ + @Generated + public String getLanguage() { + return this.language; + } + + /** + * Set the language property: Specifies the language of the input text. Find which languages are available to + * translate by + * looking up supported languages using the translation scope. If the language parameter isn't + * specified, automatic language detection is applied to determine the source language. + * + * You must use the language parameter rather than autodetection when using the dynamic dictionary feature. + * Note: the dynamic dictionary feature is case-sensitive. + * + * @param language the language value to set. + * @return the TranslateInputItem object itself. + */ + @Generated + public TranslateInputItem setLanguage(String language) { + this.language = language; + return this; + } + + /** + * Get the textType property: Defines whether the text being translated is plain text or HTML text. Any HTML needs + * to be a well-formed, + * complete element. Possible values are: plain (default) or html. + * + * @return the textType value. + */ + @Generated + public TextType getTextType() { + return this.textType; + } + + /** + * Set the textType property: Defines whether the text being translated is plain text or HTML text. Any HTML needs + * to be a well-formed, + * complete element. Possible values are: plain (default) or html. + * + * @param textType the textType value to set. + * @return the TranslateInputItem object itself. + */ + @Generated + public TranslateInputItem setTextType(TextType textType) { + this.textType = textType; + return this; + } + + /** + * Get the translationTargets property: Translation target parameters. + * + * @return the translationTargets value. + */ + @Generated + public List<TranslationTarget> getTranslationTargets() { + return this.translationTargets; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("text", this.text); + jsonWriter.writeArrayField("targets", this.translationTargets, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("script", this.script); + jsonWriter.writeStringField("language", this.language); + jsonWriter.writeStringField("textType", this.textType == null ? null : this.textType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TranslateInputItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TranslateInputItem if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TranslateInputItem. + */ + @Generated + public static TranslateInputItem fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String text = null; + List<TranslationTarget> translationTargets = null; + String script = null; + String language = null; + TextType textType = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("text".equals(fieldName)) { + text = reader.getString(); + } else if ("targets".equals(fieldName)) { + translationTargets = reader.readArray(reader1 -> TranslationTarget.fromJson(reader1)); + } else if ("script".equals(fieldName)) { + script = reader.getString(); + } else if ("language".equals(fieldName)) { + language = reader.getString(); + } else if ("textType".equals(fieldName)) { + textType = TextType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + TranslateInputItem deserializedTranslateInputItem = new TranslateInputItem(text, translationTargets); + deserializedTranslateInputItem.script = script; + deserializedTranslateInputItem.language = language; + deserializedTranslateInputItem.textType = textType; + return deserializedTranslateInputItem; + }); + } +} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslateOptions.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslateOptions.java deleted file mode 100644 index 707af477adcf..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslateOptions.java +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.translation.text.models; - -import com.azure.core.annotation.Fluent; -import java.util.ArrayList; -import java.util.List; - -/** - * Options that may be passed when translating a text. - */ -@Fluent -public final class TranslateOptions { - private String sourceLanguage = null; - private List<String> targetLanguages = new ArrayList<String>(); - private String clientTraceId = null; - private TextType textType = TextType.PLAIN; - private String category = null; - private ProfanityAction profanityAction = ProfanityAction.NO_ACTION; - private ProfanityMarker profanityMarker = ProfanityMarker.ASTERISK; - private Boolean includeAlignment = false; - private Boolean includeSentenceLength = false; - private String suggestedSourceLanguage = null; - private String sourceLanguageScript = null; - private String targetLanguageScript = null; - private Boolean allowFallback = false; - - /** - * Creates a new instance of the TranslateOptions class. - */ - public TranslateOptions() { - - } - - /** - * Returns the list of target languages. - * @return the list of target languages. - */ - public List<String> getTargetLanguages() { - return targetLanguages; - } - - /** - * Sets the list of target languages. - * @param targetLanguages the list of target languages. - * @return The updated options. - */ - public TranslateOptions setTargetLanguages(List<String> targetLanguages) { - this.targetLanguages = targetLanguages; - return this; - } - - /** - * Adds a language to the list of target languages. - * - * @param targetLanguage language to add to the list of target languages. - * @return The updated options. - */ - public TranslateOptions addTargetLanguage(String targetLanguage) { - if (targetLanguages == null) { - targetLanguages = new ArrayList<String>(); - } - targetLanguages.add(targetLanguage); - return this; - } - - /** - * Returns the source language. - * - * @return Specifies the language of the input text. - */ - public String getSourceLanguage() { - return sourceLanguage; - } - - /** - * Sets the source language. - * - * @param sourceLanguage Specifies the language of the input text. - * @return The updated options. - */ - public TranslateOptions setSourceLanguage(String sourceLanguage) { - this.sourceLanguage = sourceLanguage; - return this; - } - - /** - * Returns the client-generated GUID to uniquely identify the request. - * - * @return client-generated GUID to uniquely identify the request. - */ - public String getClientTraceId() { - return clientTraceId; - } - - /** - * Sets the client-generated GUID to uniquely identify the request. - * @param clientTraceId client-generated GUID to uniquely identify the request. - * @return The updated options. - */ - public TranslateOptions setClientTraceId(String clientTraceId) { - this.clientTraceId = clientTraceId; - return this; - } - - /** - * Returns whether the text being translated is plain text or HTML text. - * @return specifies whether the text being translated is plain text or HTML text. - */ - public TextType getTextType() { - return textType; - } - - /** - * Sets whether the text being translated is plain text or HTML text. - * - * @param textType specifies whether the text being translated is plain text or HTML text. - * @return The updated options. - */ - public TranslateOptions setTextType(TextType textType) { - this.textType = textType; - return this; - } - - /** - * Returns the category (domain) of the translation. - * @return specifying the category (domain) of the translation. - */ - public String getCategory() { - return category; - } - - /** - * Sets the category (domain) of the translation. - * - * @param category specifying the category (domain) of the translation. - * @return The updated options. - */ - public TranslateOptions setCategory(String category) { - this.category = category; - return this; - } - - /** - * Returns how profanities should be treated in translations. - * @return specifies how profanities should be treated in translations. - */ - public ProfanityAction getProfanityAction() { - return profanityAction; - } - - /** - * Sets how profanities should be treated in translations. - * @param profanityAction specifies how profanities should be treated in translations. - * @return The updated options. - */ - public TranslateOptions setProfanityAction(ProfanityAction profanityAction) { - this.profanityAction = profanityAction; - return this; - } - - /** - * Returns how profanities should be marked in translations. - * @return specifies how profanities should be marked in translations. - */ - public ProfanityMarker getProfanityMarker() { - return profanityMarker; - } - - /** - * Sets how profanities should be marked in translations. - * @param profanityMarker specifies how profanities should be marked in translations. - * @return The updated options. - */ - public TranslateOptions setProfanityMarker(ProfanityMarker profanityMarker) { - this.profanityMarker = profanityMarker; - return this; - } - - /** - * Returns whether to include alignment projection from source text to translated text. - * @return Whether to include alignment projection from source text to translated text. - */ - public Boolean isIncludeAlignment() { - return includeAlignment; - } - - /** - * Sets whether to include alignment projection from source text to translated text. - * @param includeAlignment Whether to include alignment projection from source text to translated text. - * @return The updated options. - */ - public TranslateOptions setIncludeAlignment(Boolean includeAlignment) { - this.includeAlignment = includeAlignment; - return this; - } - - /** - * Returns whether to include sentence boundaries for the input text and the translated text. - * @return Whether to include sentence boundaries for the input text and the translated text. - */ - public Boolean isIncludeSentenceLength() { - return includeSentenceLength; - } - - /** - * Sets whether to include sentence boundaries for the input text and the translated text. - * @param includeSentenceLength Whether to include sentence boundaries for the input text and the translated text. - * @return The updated options. - */ - public TranslateOptions setIncludeSentenceLength(Boolean includeSentenceLength) { - this.includeSentenceLength = includeSentenceLength; - return this; - } - - /** - * Returns the fallback language if the language of the input text can't be identified. - * @return fallback language if the language of the input text can't be identified. - */ - public String getSuggestedSourceLanguage() { - return suggestedSourceLanguage; - } - - /** - * Sets the fallback language if the language of the input text can't be identified. - * @param suggestedSourceLanguage fallback language if the language of the input text can't be identified. - * @return The updated options. - */ - public TranslateOptions setSuggestedSourceLanguage(String suggestedSourceLanguage) { - this.suggestedSourceLanguage = suggestedSourceLanguage; - return this; - } - - /** - * Returns the script of the input text. - * @return the script of the input text. - */ - public String getSourceLanguageScript() { - return sourceLanguageScript; - } - - /** - * Sets the script of the input text. - * @param sourceLanguageScript the script of the input text. - * @return The updated options. - */ - public TranslateOptions setSourceLanguageScript(String sourceLanguageScript) { - this.sourceLanguageScript = sourceLanguageScript; - return this; - } - - /** - * Returns the script of the translated text. - * @return the script of the translated text. - */ - public String getTargetLanguageScript() { - return targetLanguageScript; - } - - /** - * Sets the script of the translated text. - * @param targetLanguageScript the script of the translated text. - * @return The updated options. - */ - public TranslateOptions setTargetLanguageScript(String targetLanguageScript) { - this.targetLanguageScript = targetLanguageScript; - return this; - } - - /** - * Returns whether the service allows fallback for Custom Translator requests. - * @return Whether the service allows fallback for Custom Translator requests. - */ - public Boolean isAllowFallback() { - return allowFallback; - } - - /** - * Sets whether the service allows fallback for Custom Translator requests. - * @param allowFallback Whether the service allows fallback for Custom Translator requests. - * @return The updated options. - */ - public TranslateOptions setAllowFallback(Boolean allowFallback) { - this.allowFallback = allowFallback; - return this; - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslatedTextAlignment.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslatedTextAlignment.java deleted file mode 100644 index 99894c25998d..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslatedTextAlignment.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.translation.text.models; - -import com.azure.core.annotation.Generated; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Alignment information object. - */ -@Immutable -public final class TranslatedTextAlignment implements JsonSerializable<TranslatedTextAlignment> { - - /* - * Maps input text to translated text. The alignment information is only provided when the request - * parameter includeAlignment is true. Alignment is returned as a string value of the following - * format: [[SourceTextStartIndex]:[SourceTextEndIndex]–[TgtTextStartIndex]:[TgtTextEndIndex]]. - * The colon separates start and end index, the dash separates the languages, and space separates the words. - * One word may align with zero, one, or multiple words in the other language, and the aligned words may - * be non-contiguous. When no alignment information is available, the alignment element will be empty. - */ - @Generated - private final String projections; - - /** - * Creates an instance of TranslatedTextAlignment class. - * - * @param projections the projections value to set. - */ - @Generated - private TranslatedTextAlignment(String projections) { - this.projections = projections; - } - - /** - * Get the projections property: Maps input text to translated text. The alignment information is only provided when - * the request - * parameter includeAlignment is true. Alignment is returned as a string value of the following - * format: [[SourceTextStartIndex]:[SourceTextEndIndex]–[TgtTextStartIndex]:[TgtTextEndIndex]]. - * The colon separates start and end index, the dash separates the languages, and space separates the words. - * One word may align with zero, one, or multiple words in the other language, and the aligned words may - * be non-contiguous. When no alignment information is available, the alignment element will be empty. - * - * @return the projections value. - */ - @Generated - public String getProjections() { - return this.projections; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("proj", this.projections); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TranslatedTextAlignment from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TranslatedTextAlignment if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TranslatedTextAlignment. - */ - @Generated - public static TranslatedTextAlignment fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String projections = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("proj".equals(fieldName)) { - projections = reader.getString(); - } else { - reader.skipChildren(); - } - } - return new TranslatedTextAlignment(projections); - }); - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslatedTextItem.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslatedTextItem.java index b8d8026cc01e..9c8d47b35ab0 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslatedTextItem.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslatedTextItem.java @@ -29,25 +29,13 @@ public final class TranslatedTextItem implements JsonSerializable<TranslatedText * languages specified through the to query parameter. */ @Generated - private final List<TranslationText> translations; - - /* - * Input text in the default script of the source language. sourceText property is present only when - * the input is expressed in a script that's not the usual script for the language. For example, - * if the input were Arabic written in Latin script, then sourceText.text would be the same Arabic text - * converted into Arab script. - */ - @Generated - private SourceText sourceText; + private List<TranslationText> translations; /** * Creates an instance of TranslatedTextItem class. - * - * @param translations the translations value to set. */ @Generated - private TranslatedTextItem(List<TranslationText> translations) { - this.translations = translations; + private TranslatedTextItem() { } /** @@ -73,20 +61,6 @@ public List<TranslationText> getTranslations() { return this.translations; } - /** - * Get the sourceText property: Input text in the default script of the source language. sourceText property is - * present only when - * the input is expressed in a script that's not the usual script for the language. For example, - * if the input were Arabic written in Latin script, then sourceText.text would be the same Arabic text - * converted into Arab script. - * - * @return the sourceText value. - */ - @Generated - public SourceText getSourceText() { - return this.sourceText; - } - /** * {@inheritDoc} */ @@ -94,9 +68,7 @@ public SourceText getSourceText() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("translations", this.translations, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("detectedLanguage", this.detectedLanguage); - jsonWriter.writeJsonField("sourceText", this.sourceText); return jsonWriter.writeEndObject(); } @@ -112,25 +84,19 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { @Generated public static TranslatedTextItem fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - List<TranslationText> translations = null; - DetectedLanguage detectedLanguage = null; - SourceText sourceText = null; + TranslatedTextItem deserializedTranslatedTextItem = new TranslatedTextItem(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("translations".equals(fieldName)) { - translations = reader.readArray(reader1 -> TranslationText.fromJson(reader1)); + List<TranslationText> translations = reader.readArray(reader1 -> TranslationText.fromJson(reader1)); + deserializedTranslatedTextItem.translations = translations; } else if ("detectedLanguage".equals(fieldName)) { - detectedLanguage = DetectedLanguage.fromJson(reader); - } else if ("sourceText".equals(fieldName)) { - sourceText = SourceText.fromJson(reader); + deserializedTranslatedTextItem.detectedLanguage = DetectedLanguage.fromJson(reader); } else { reader.skipChildren(); } } - TranslatedTextItem deserializedTranslatedTextItem = new TranslatedTextItem(translations); - deserializedTranslatedTextItem.detectedLanguage = detectedLanguage; - deserializedTranslatedTextItem.sourceText = sourceText; return deserializedTranslatedTextItem; }); } diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslationLanguage.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslationLanguage.java index 51a715a9ddd4..8fd4a2516f89 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslationLanguage.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslationLanguage.java @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * The value of the translation property is a dictionary of (key, value) pairs. Each key is a BCP 47 language tag. @@ -109,6 +110,7 @@ public static TranslationLanguage fromJson(JsonReader jsonReader) throws IOExcep String name = null; String nativeName = null; LanguageDirectionality directionality = null; + List<String> models = null; while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -118,11 +120,32 @@ public static TranslationLanguage fromJson(JsonReader jsonReader) throws IOExcep nativeName = reader.getString(); } else if ("dir".equals(fieldName)) { directionality = LanguageDirectionality.fromString(reader.getString()); + } else if ("models".equals(fieldName)) { + models = reader.readArray(reader1 -> reader1.getString()); } else { reader.skipChildren(); } } - return new TranslationLanguage(name, nativeName, directionality); + TranslationLanguage deserializedTranslationLanguage + = new TranslationLanguage(name, nativeName, directionality); + deserializedTranslationLanguage.models = models; + return deserializedTranslationLanguage; }); } + + /* + * LLM models supported for translation. + */ + @Generated + private List<String> models; + + /** + * Get the models property: LLM models supported for translation. + * + * @return the models value. + */ + @Generated + public List<String> getModels() { + return this.models; + } } diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslationTarget.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslationTarget.java new file mode 100644 index 000000000000..c36b55157a5b --- /dev/null +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslationTarget.java @@ -0,0 +1,480 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.translation.text.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Target language and translation configuration parameters. + */ +@Fluent +public final class TranslationTarget implements JsonSerializable<TranslationTarget> { + + /* + * Specifies the language of the output text. The target language must be one of the supported languages included + * in the translation scope. It's possible to translate to multiple languages simultaneously by including + * multiple string values in the targetsLanguage array. + */ + @Generated + private final String language; + + /* + * Specifies the script of the translated text. + */ + @Generated + private String script; + + /* + * Specifies how profanities should be treated in translations. + * Possible values are: NoAction (default), Marked or Deleted. + */ + @Generated + private ProfanityAction profanityAction; + + /* + * Specifies how profanities should be marked in translations. + * Possible values are: Asterisk (default) or Tag. + */ + @Generated + private ProfanityMarker profanityMarker; + + /* + * Default is 'general', which uses NMT system. + * 'abc-inc-gpt-4o', and 'abc-inc-gpt-4o-mini' are examples of deployment names which use GPT-4o uses or + * GPT-4o-mini model. 'gpt-4o' uses GPT-4o model. + * + * '<custom model id>' uses the custom NMT model tuned by customer. + * 'best' system determines which is the best model to use for the request. This intelligence could be introduced + * in future. Customer should have deployed it in their resource. + */ + @Generated + private String deploymentName; + + /* + * In the case where a custom system is being used, specifies that the service is allowed to fall back to a + * general system when a custom system doesn't exist. + * In the case where a Large Language Model is being used, specifies that the service is allowed to fall + * back to a Small Language Model if an error occurs. + * Possible values are: true (default) or false. + * + * allowFallback=false specifies that the translation should only use systems trained for the category specified + * by the request. If a translation for language X to language Y requires chaining through a pivot language E, + * then all the systems in the chain (X → E and E → Y) will need to be custom and have the same category. + * If no system is found with the specific category, the request will return a 400 status code. allowFallback=true + * specifies that the service is allowed to fall back to a general system when a custom system doesn't exist. + */ + @Generated + private Boolean allowFallback; + + /* + * Defines complexity of LLM prompts to provide high accuracy translation. + */ + @Generated + private String grade; + + /* + * Desired tone of target translation. + */ + @Generated + private String tone; + + /* + * Desired gender of target translation. + */ + @Generated + private String gender; + + /* + * Reference dataset ID having sentence pair to generate adaptive customized translation. + */ + @Generated + private String adaptiveDatasetId; + + /* + * Reference text pairs to generate adaptive customized translation. + */ + @Generated + private List<ReferenceTextPair> referenceTextPairs; + + /** + * Creates an instance of TranslationTarget class. + * + * @param language the language value to set. + */ + @Generated + public TranslationTarget(String language) { + this.language = language; + } + + /** + * Get the language property: Specifies the language of the output text. The target language must be one of the + * supported languages included + * in the translation scope. It's possible to translate to multiple languages simultaneously by including + * multiple string values in the targetsLanguage array. + * + * @return the language value. + */ + @Generated + public String getLanguage() { + return this.language; + } + + /** + * Get the script property: Specifies the script of the translated text. + * + * @return the script value. + */ + @Generated + public String getScript() { + return this.script; + } + + /** + * Set the script property: Specifies the script of the translated text. + * + * @param script the script value to set. + * @return the TranslationTarget object itself. + */ + @Generated + public TranslationTarget setScript(String script) { + this.script = script; + return this; + } + + /** + * Get the profanityAction property: Specifies how profanities should be treated in translations. + * Possible values are: NoAction (default), Marked or Deleted. + * + * @return the profanityAction value. + */ + @Generated + public ProfanityAction getProfanityAction() { + return this.profanityAction; + } + + /** + * Set the profanityAction property: Specifies how profanities should be treated in translations. + * Possible values are: NoAction (default), Marked or Deleted. + * + * @param profanityAction the profanityAction value to set. + * @return the TranslationTarget object itself. + */ + @Generated + public TranslationTarget setProfanityAction(ProfanityAction profanityAction) { + this.profanityAction = profanityAction; + return this; + } + + /** + * Get the profanityMarker property: Specifies how profanities should be marked in translations. + * Possible values are: Asterisk (default) or Tag. + * + * @return the profanityMarker value. + */ + @Generated + public ProfanityMarker getProfanityMarker() { + return this.profanityMarker; + } + + /** + * Set the profanityMarker property: Specifies how profanities should be marked in translations. + * Possible values are: Asterisk (default) or Tag. + * + * @param profanityMarker the profanityMarker value to set. + * @return the TranslationTarget object itself. + */ + @Generated + public TranslationTarget setProfanityMarker(ProfanityMarker profanityMarker) { + this.profanityMarker = profanityMarker; + return this; + } + + /** + * Get the deploymentName property: Default is 'general', which uses NMT system. + * 'abc-inc-gpt-4o', and 'abc-inc-gpt-4o-mini' are examples of deployment names which use GPT-4o uses or + * GPT-4o-mini model. 'gpt-4o' uses GPT-4o model. + * + * '<custom model id>' uses the custom NMT model tuned by customer. + * 'best' system determines which is the best model to use for the request. This intelligence could be introduced + * in future. Customer should have deployed it in their resource. + * + * @return the deploymentName value. + */ + @Generated + public String getDeploymentName() { + return this.deploymentName; + } + + /** + * Set the deploymentName property: Default is 'general', which uses NMT system. + * 'abc-inc-gpt-4o', and 'abc-inc-gpt-4o-mini' are examples of deployment names which use GPT-4o uses or + * GPT-4o-mini model. 'gpt-4o' uses GPT-4o model. + * + * '<custom model id>' uses the custom NMT model tuned by customer. + * 'best' system determines which is the best model to use for the request. This intelligence could be introduced + * in future. Customer should have deployed it in their resource. + * + * @param deploymentName the deploymentName value to set. + * @return the TranslationTarget object itself. + */ + @Generated + public TranslationTarget setDeploymentName(String deploymentName) { + this.deploymentName = deploymentName; + return this; + } + + /** + * Get the allowFallback property: In the case where a custom system is being used, specifies that the service is + * allowed to fall back to a + * general system when a custom system doesn't exist. + * In the case where a Large Language Model is being used, specifies that the service is allowed to fall + * back to a Small Language Model if an error occurs. + * Possible values are: true (default) or false. + * + * allowFallback=false specifies that the translation should only use systems trained for the category specified + * by the request. If a translation for language X to language Y requires chaining through a pivot language E, + * then all the systems in the chain (X → E and E → Y) will need to be custom and have the same category. + * If no system is found with the specific category, the request will return a 400 status code. allowFallback=true + * specifies that the service is allowed to fall back to a general system when a custom system doesn't exist. + * + * @return the allowFallback value. + */ + @Generated + public Boolean isAllowFallback() { + return this.allowFallback; + } + + /** + * Set the allowFallback property: In the case where a custom system is being used, specifies that the service is + * allowed to fall back to a + * general system when a custom system doesn't exist. + * In the case where a Large Language Model is being used, specifies that the service is allowed to fall + * back to a Small Language Model if an error occurs. + * Possible values are: true (default) or false. + * + * allowFallback=false specifies that the translation should only use systems trained for the category specified + * by the request. If a translation for language X to language Y requires chaining through a pivot language E, + * then all the systems in the chain (X → E and E → Y) will need to be custom and have the same category. + * If no system is found with the specific category, the request will return a 400 status code. allowFallback=true + * specifies that the service is allowed to fall back to a general system when a custom system doesn't exist. + * + * @param allowFallback the allowFallback value to set. + * @return the TranslationTarget object itself. + */ + @Generated + public TranslationTarget setAllowFallback(Boolean allowFallback) { + this.allowFallback = allowFallback; + return this; + } + + /** + * Get the grade property: Defines complexity of LLM prompts to provide high accuracy translation. + * + * @return the grade value. + */ + @Generated + public String getGrade() { + return this.grade; + } + + /** + * Set the grade property: Defines complexity of LLM prompts to provide high accuracy translation. + * + * @param grade the grade value to set. + * @return the TranslationTarget object itself. + */ + @Generated + public TranslationTarget setGrade(String grade) { + this.grade = grade; + return this; + } + + /** + * Get the tone property: Desired tone of target translation. + * + * @return the tone value. + */ + @Generated + public String getTone() { + return this.tone; + } + + /** + * Set the tone property: Desired tone of target translation. + * + * @param tone the tone value to set. + * @return the TranslationTarget object itself. + */ + @Generated + public TranslationTarget setTone(String tone) { + this.tone = tone; + return this; + } + + /** + * Get the gender property: Desired gender of target translation. + * + * @return the gender value. + */ + @Generated + public String getGender() { + return this.gender; + } + + /** + * Set the gender property: Desired gender of target translation. + * + * @param gender the gender value to set. + * @return the TranslationTarget object itself. + */ + @Generated + public TranslationTarget setGender(String gender) { + this.gender = gender; + return this; + } + + /** + * Get the adaptiveDatasetId property: Reference dataset ID having sentence pair to generate adaptive customized + * translation. + * + * @return the adaptiveDatasetId value. + */ + @Generated + public String getAdaptiveDatasetId() { + return this.adaptiveDatasetId; + } + + /** + * Set the adaptiveDatasetId property: Reference dataset ID having sentence pair to generate adaptive customized + * translation. + * + * @param adaptiveDatasetId the adaptiveDatasetId value to set. + * @return the TranslationTarget object itself. + */ + @Generated + public TranslationTarget setAdaptiveDatasetId(String adaptiveDatasetId) { + this.adaptiveDatasetId = adaptiveDatasetId; + return this; + } + + /** + * Get the referenceTextPairs property: Reference text pairs to generate adaptive customized translation. + * + * @return the referenceTextPairs value. + */ + @Generated + public List<ReferenceTextPair> getReferenceTextPairs() { + return this.referenceTextPairs; + } + + /** + * Set the referenceTextPairs property: Reference text pairs to generate adaptive customized translation. + * + * @param referenceTextPairs the referenceTextPairs value to set. + * @return the TranslationTarget object itself. + */ + @Generated + public TranslationTarget setReferenceTextPairs(List<ReferenceTextPair> referenceTextPairs) { + this.referenceTextPairs = referenceTextPairs; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("language", this.language); + jsonWriter.writeStringField("script", this.script); + jsonWriter.writeStringField("profanityAction", + this.profanityAction == null ? null : this.profanityAction.toString()); + jsonWriter.writeStringField("profanityMarker", + this.profanityMarker == null ? null : this.profanityMarker.toString()); + jsonWriter.writeStringField("deploymentName", this.deploymentName); + jsonWriter.writeBooleanField("allowFallback", this.allowFallback); + jsonWriter.writeStringField("grade", this.grade); + jsonWriter.writeStringField("tone", this.tone); + jsonWriter.writeStringField("gender", this.gender); + jsonWriter.writeStringField("adaptiveDatasetId", this.adaptiveDatasetId); + jsonWriter.writeArrayField("referenceTextPairs", this.referenceTextPairs, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TranslationTarget from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TranslationTarget if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TranslationTarget. + */ + @Generated + public static TranslationTarget fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String language = null; + String script = null; + ProfanityAction profanityAction = null; + ProfanityMarker profanityMarker = null; + String deploymentName = null; + Boolean allowFallback = null; + String grade = null; + String tone = null; + String gender = null; + String adaptiveDatasetId = null; + List<ReferenceTextPair> referenceTextPairs = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("language".equals(fieldName)) { + language = reader.getString(); + } else if ("script".equals(fieldName)) { + script = reader.getString(); + } else if ("profanityAction".equals(fieldName)) { + profanityAction = ProfanityAction.fromString(reader.getString()); + } else if ("profanityMarker".equals(fieldName)) { + profanityMarker = ProfanityMarker.fromString(reader.getString()); + } else if ("deploymentName".equals(fieldName)) { + deploymentName = reader.getString(); + } else if ("allowFallback".equals(fieldName)) { + allowFallback = reader.getNullable(JsonReader::getBoolean); + } else if ("grade".equals(fieldName)) { + grade = reader.getString(); + } else if ("tone".equals(fieldName)) { + tone = reader.getString(); + } else if ("gender".equals(fieldName)) { + gender = reader.getString(); + } else if ("adaptiveDatasetId".equals(fieldName)) { + adaptiveDatasetId = reader.getString(); + } else if ("referenceTextPairs".equals(fieldName)) { + referenceTextPairs = reader.readArray(reader1 -> ReferenceTextPair.fromJson(reader1)); + } else { + reader.skipChildren(); + } + } + TranslationTarget deserializedTranslationTarget = new TranslationTarget(language); + deserializedTranslationTarget.script = script; + deserializedTranslationTarget.profanityAction = profanityAction; + deserializedTranslationTarget.profanityMarker = profanityMarker; + deserializedTranslationTarget.deploymentName = deploymentName; + deserializedTranslationTarget.allowFallback = allowFallback; + deserializedTranslationTarget.grade = grade; + deserializedTranslationTarget.tone = tone; + deserializedTranslationTarget.gender = gender; + deserializedTranslationTarget.adaptiveDatasetId = adaptiveDatasetId; + deserializedTranslationTarget.referenceTextPairs = referenceTextPairs; + return deserializedTranslationTarget; + }); + } +} diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslationText.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslationText.java index 9c667b5a147f..1107ff837a68 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslationText.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TranslationText.java @@ -18,97 +18,129 @@ public final class TranslationText implements JsonSerializable<TranslationText> { /* - * A string giving the translated text. + * A string representing the language code of the target language. */ @Generated - private final String text; + private final String language; + + /* + * An integer indicating the number of characters in the source text string + */ + @Generated + private Integer sourceCharacters; + + /* + * An integer indicating the number of tokens used in generating the translated text + */ + @Generated + private Integer instructionTokens; /* - * An object giving the translated text in the script specified by the toScript parameter. + * An integer indicating the number of tokens used in the source sentence */ @Generated - private TransliteratedText transliteration; + private Integer sourceTokens; /* - * Alignment information. + * An integer indicating the number of tokens used in the translation response */ @Generated - private TranslatedTextAlignment alignment; + private Integer responseTokens; /* - * Sentence boundaries in the input and output texts. + * An integer indicating the number of tokens used in the target sentence */ @Generated - private SentenceBoundaries sentenceBoundaries; + private Integer targetTokens; + + /* + * A string giving the translated text. + */ + @Generated + private final String text; /** * Creates an instance of TranslationText class. * - * @param targetLanguage the targetLanguage value to set. + * @param language the language value to set. * @param text the text value to set. */ @Generated - private TranslationText(String targetLanguage, String text) { - this.targetLanguage = targetLanguage; + private TranslationText(String language, String text) { + this.language = language; this.text = text; } /** - * Get the targetLanguage property: A string representing the language code of the target language. + * Get the language property: A string representing the language code of the target language. * - * @return the targetLanguage value. + * @return the language value. */ @Generated - public String getTargetLanguage() { - return this.targetLanguage; + public String getLanguage() { + return this.language; } /** - * Get the text property: A string giving the translated text. + * Get the sourceCharacters property: An integer indicating the number of characters in the source text string. * - * @return the text value. + * @return the sourceCharacters value. */ @Generated - public String getText() { - return this.text; + public Integer getSourceCharacters() { + return this.sourceCharacters; } /** - * Get the transliteration property: An object giving the translated text in the script specified by the toScript - * parameter. + * Get the instructionTokens property: An integer indicating the number of tokens used in generating the translated + * text. * - * @return the transliteration value. + * @return the instructionTokens value. */ @Generated - public TransliteratedText getTransliteration() { - return this.transliteration; + public Integer getInstructionTokens() { + return this.instructionTokens; } /** - * Get the alignment property: Alignment information. + * Get the sourceTokens property: An integer indicating the number of tokens used in the source sentence. * - * @return the alignment value. + * @return the sourceTokens value. */ @Generated - public TranslatedTextAlignment getAlignment() { - return this.alignment; + public Integer getSourceTokens() { + return this.sourceTokens; } /** - * Get the sentenceBoundaries property: Sentence boundaries in the input and output texts. + * Get the responseTokens property: An integer indicating the number of tokens used in the translation response. * - * @return the sentenceBoundaries value. + * @return the responseTokens value. */ @Generated - public SentenceBoundaries getSentenceBoundaries() { - return this.sentenceBoundaries; + public Integer getResponseTokens() { + return this.responseTokens; } - /* - * A string representing the language code of the target language. + /** + * Get the targetTokens property: An integer indicating the number of tokens used in the target sentence. + * + * @return the targetTokens value. + */ + @Generated + public Integer getTargetTokens() { + return this.targetTokens; + } + + /** + * Get the text property: A string giving the translated text. + * + * @return the text value. */ @Generated - private final String targetLanguage; + public String getText() { + return this.text; + } /** * {@inheritDoc} @@ -117,11 +149,13 @@ public SentenceBoundaries getSentenceBoundaries() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("to", this.targetLanguage); + jsonWriter.writeStringField("language", this.language); jsonWriter.writeStringField("text", this.text); - jsonWriter.writeJsonField("transliteration", this.transliteration); - jsonWriter.writeJsonField("alignment", this.alignment); - jsonWriter.writeJsonField("sentLen", this.sentenceBoundaries); + jsonWriter.writeNumberField("sourceCharacters", this.sourceCharacters); + jsonWriter.writeNumberField("instructionTokens", this.instructionTokens); + jsonWriter.writeNumberField("sourceTokens", this.sourceTokens); + jsonWriter.writeNumberField("responseTokens", this.responseTokens); + jsonWriter.writeNumberField("targetTokens", this.targetTokens); return jsonWriter.writeEndObject(); } @@ -137,32 +171,40 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { @Generated public static TranslationText fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - String targetLanguage = null; + String language = null; String text = null; - TransliteratedText transliteration = null; - TranslatedTextAlignment alignment = null; - SentenceBoundaries sentenceBoundaries = null; + Integer sourceCharacters = null; + Integer instructionTokens = null; + Integer sourceTokens = null; + Integer responseTokens = null; + Integer targetTokens = null; while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("to".equals(fieldName)) { - targetLanguage = reader.getString(); + if ("language".equals(fieldName)) { + language = reader.getString(); } else if ("text".equals(fieldName)) { text = reader.getString(); - } else if ("transliteration".equals(fieldName)) { - transliteration = TransliteratedText.fromJson(reader); - } else if ("alignment".equals(fieldName)) { - alignment = TranslatedTextAlignment.fromJson(reader); - } else if ("sentLen".equals(fieldName)) { - sentenceBoundaries = SentenceBoundaries.fromJson(reader); + } else if ("sourceCharacters".equals(fieldName)) { + sourceCharacters = reader.getNullable(JsonReader::getInt); + } else if ("instructionTokens".equals(fieldName)) { + instructionTokens = reader.getNullable(JsonReader::getInt); + } else if ("sourceTokens".equals(fieldName)) { + sourceTokens = reader.getNullable(JsonReader::getInt); + } else if ("responseTokens".equals(fieldName)) { + responseTokens = reader.getNullable(JsonReader::getInt); + } else if ("targetTokens".equals(fieldName)) { + targetTokens = reader.getNullable(JsonReader::getInt); } else { reader.skipChildren(); } } - TranslationText deserializedTranslationText = new TranslationText(targetLanguage, text); - deserializedTranslationText.transliteration = transliteration; - deserializedTranslationText.alignment = alignment; - deserializedTranslationText.sentenceBoundaries = sentenceBoundaries; + TranslationText deserializedTranslationText = new TranslationText(language, text); + deserializedTranslationText.sourceCharacters = sourceCharacters; + deserializedTranslationText.instructionTokens = instructionTokens; + deserializedTranslationText.sourceTokens = sourceTokens; + deserializedTranslationText.responseTokens = responseTokens; + deserializedTranslationText.targetTokens = targetTokens; return deserializedTranslationText; }); } diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TransliterableScript.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TransliterableScript.java index 9b5e708e5091..d308563a5fcb 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TransliterableScript.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TransliterableScript.java @@ -24,31 +24,15 @@ public final class TransliterableScript extends LanguageScript { * @param name the name value to set. * @param nativeName the nativeName value to set. * @param directionality the directionality value to set. - * @param targetLanguageScripts the targetLanguageScripts value to set. + * @param toScripts the toScripts value to set. */ @Generated private TransliterableScript(String code, String name, String nativeName, LanguageDirectionality directionality, - List<LanguageScript> targetLanguageScripts) { + List<LanguageScript> toScripts) { super(code, name, nativeName, directionality); - this.targetLanguageScripts = targetLanguageScripts; + this.toScripts = toScripts; } - /** - * Get the targetLanguageScripts property: List of scripts available to convert text to. - * - * @return the targetLanguageScripts value. - */ - @Generated - public List<LanguageScript> getTargetLanguageScripts() { - return this.targetLanguageScripts; - } - - /* - * List of scripts available to convert text to. - */ - @Generated - private final List<LanguageScript> targetLanguageScripts; - /** * {@inheritDoc} */ @@ -60,8 +44,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("name", getName()); jsonWriter.writeStringField("nativeName", getNativeName()); jsonWriter.writeStringField("dir", getDirectionality() == null ? null : getDirectionality().toString()); - jsonWriter.writeArrayField("toScripts", this.targetLanguageScripts, - (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("toScripts", this.toScripts, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -81,7 +64,7 @@ public static TransliterableScript fromJson(JsonReader jsonReader) throws IOExce String name = null; String nativeName = null; LanguageDirectionality directionality = null; - List<LanguageScript> targetLanguageScripts = null; + List<LanguageScript> toScripts = null; while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -94,12 +77,28 @@ public static TransliterableScript fromJson(JsonReader jsonReader) throws IOExce } else if ("dir".equals(fieldName)) { directionality = LanguageDirectionality.fromString(reader.getString()); } else if ("toScripts".equals(fieldName)) { - targetLanguageScripts = reader.readArray(reader1 -> LanguageScript.fromJson(reader1)); + toScripts = reader.readArray(reader1 -> LanguageScript.fromJson(reader1)); } else { reader.skipChildren(); } } - return new TransliterableScript(code, name, nativeName, directionality, targetLanguageScripts); + return new TransliterableScript(code, name, nativeName, directionality, toScripts); }); } + + /* + * List of scripts available to convert text to. + */ + @Generated + private final List<LanguageScript> toScripts; + + /** + * Get the toScripts property: List of scripts available to convert text to. + * + * @return the toScripts value. + */ + @Generated + public List<LanguageScript> getToScripts() { + return this.toScripts; + } } diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TransliterationLanguage.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TransliterationLanguage.java index eddca15e4b28..66a8043d76e8 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TransliterationLanguage.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/TransliterationLanguage.java @@ -36,21 +36,7 @@ public final class TransliterationLanguage implements JsonSerializable<Translite * List of scripts to convert from. */ @Generated - private final List<TransliterableScript> scripts; - - /** - * Creates an instance of TransliterationLanguage class. - * - * @param name the name value to set. - * @param nativeName the nativeName value to set. - * @param scripts the scripts value to set. - */ - @Generated - private TransliterationLanguage(String name, String nativeName, List<TransliterableScript> scripts) { - this.name = name; - this.nativeName = nativeName; - this.scripts = scripts; - } + private List<TransliterableScript> scripts; /** * Get the name property: Display name of the language in the locale requested via Accept-Language header. @@ -91,7 +77,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("name", this.name); jsonWriter.writeStringField("nativeName", this.nativeName); - jsonWriter.writeArrayField("scripts", this.scripts, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -123,7 +108,21 @@ public static TransliterationLanguage fromJson(JsonReader jsonReader) throws IOE reader.skipChildren(); } } - return new TransliterationLanguage(name, nativeName, scripts); + TransliterationLanguage deserializedTransliterationLanguage = new TransliterationLanguage(name, nativeName); + deserializedTransliterationLanguage.scripts = scripts; + return deserializedTransliterationLanguage; }); } + + /** + * Creates an instance of TransliterationLanguage class. + * + * @param name the name value to set. + * @param nativeName the nativeName value to set. + */ + @Generated + private TransliterationLanguage(String name, String nativeName) { + this.name = name; + this.nativeName = nativeName; + } } diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/package-info.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/package-info.java index b1a9c262309d..7cd6ccf90652 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/package-info.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/models/package-info.java @@ -19,10 +19,6 @@ * * Detect. Returns the source code language code and a boolean variable denoting whether the detected language is * supported for text translation and transliteration. - * - * Dictionary lookup. Returns equivalent words for the source term in the target language. - * - * Dictionary example Returns grammatical structure and context examples for the source term and target term pair. * <!-- end generated doc --> */ package com.azure.ai.translation.text.models; diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/module-info.java b/sdk/translation/azure-ai-translation-text/src/main/java/module-info.java index 47c385dc744d..6665ac27f887 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/module-info.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/module-info.java @@ -8,5 +8,6 @@ exports com.azure.ai.translation.text; exports com.azure.ai.translation.text.models; + opens com.azure.ai.translation.text.implementation.models to com.azure.core; opens com.azure.ai.translation.text.models to com.azure.core; } diff --git a/sdk/translation/azure-ai-translation-text/src/main/resources/META-INF/azure-ai-translation-text_apiview_properties.json b/sdk/translation/azure-ai-translation-text/src/main/resources/META-INF/azure-ai-translation-text_apiview_properties.json index fb99b1295b77..aa96f026d135 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/resources/META-INF/azure-ai-translation-text_apiview_properties.json +++ b/sdk/translation/azure-ai-translation-text/src/main/resources/META-INF/azure-ai-translation-text_apiview_properties.json @@ -2,54 +2,37 @@ "flavor": "azure", "CrossLanguageDefinitionId": { "com.azure.ai.translation.text.TextTranslationAsyncClient": "TextTranslation", - "com.azure.ai.translation.text.TextTranslationAsyncClient.findSentenceBoundaries": "TextTranslation.findSentenceBoundaries", - "com.azure.ai.translation.text.TextTranslationAsyncClient.findSentenceBoundariesWithResponse": "TextTranslation.findSentenceBoundaries", "com.azure.ai.translation.text.TextTranslationAsyncClient.getSupportedLanguages": "TextTranslation.getSupportedLanguages", "com.azure.ai.translation.text.TextTranslationAsyncClient.getSupportedLanguagesWithResponse": "TextTranslation.getSupportedLanguages", - "com.azure.ai.translation.text.TextTranslationAsyncClient.lookupDictionaryEntries": "TextTranslation.lookupDictionaryEntries", - "com.azure.ai.translation.text.TextTranslationAsyncClient.lookupDictionaryEntriesWithResponse": "TextTranslation.lookupDictionaryEntries", - "com.azure.ai.translation.text.TextTranslationAsyncClient.lookupDictionaryExamples": "TextTranslation.lookupDictionaryExamples", - "com.azure.ai.translation.text.TextTranslationAsyncClient.lookupDictionaryExamplesWithResponse": "TextTranslation.lookupDictionaryExamples", "com.azure.ai.translation.text.TextTranslationAsyncClient.translate": "TextTranslation.translate", "com.azure.ai.translation.text.TextTranslationAsyncClient.translateWithResponse": "TextTranslation.translate", "com.azure.ai.translation.text.TextTranslationAsyncClient.transliterate": "TextTranslation.transliterate", "com.azure.ai.translation.text.TextTranslationAsyncClient.transliterateWithResponse": "TextTranslation.transliterate", "com.azure.ai.translation.text.TextTranslationClient": "TextTranslation", - "com.azure.ai.translation.text.TextTranslationClient.findSentenceBoundaries": "TextTranslation.findSentenceBoundaries", - "com.azure.ai.translation.text.TextTranslationClient.findSentenceBoundariesWithResponse": "TextTranslation.findSentenceBoundaries", "com.azure.ai.translation.text.TextTranslationClient.getSupportedLanguages": "TextTranslation.getSupportedLanguages", "com.azure.ai.translation.text.TextTranslationClient.getSupportedLanguagesWithResponse": "TextTranslation.getSupportedLanguages", - "com.azure.ai.translation.text.TextTranslationClient.lookupDictionaryEntries": "TextTranslation.lookupDictionaryEntries", - "com.azure.ai.translation.text.TextTranslationClient.lookupDictionaryEntriesWithResponse": "TextTranslation.lookupDictionaryEntries", - "com.azure.ai.translation.text.TextTranslationClient.lookupDictionaryExamples": "TextTranslation.lookupDictionaryExamples", - "com.azure.ai.translation.text.TextTranslationClient.lookupDictionaryExamplesWithResponse": "TextTranslation.lookupDictionaryExamples", "com.azure.ai.translation.text.TextTranslationClient.translate": "TextTranslation.translate", "com.azure.ai.translation.text.TextTranslationClient.translateWithResponse": "TextTranslation.translate", "com.azure.ai.translation.text.TextTranslationClient.transliterate": "TextTranslation.transliterate", "com.azure.ai.translation.text.TextTranslationClient.transliterateWithResponse": "TextTranslation.transliterate", "com.azure.ai.translation.text.TextTranslationClientBuilder": "TextTranslation", - "com.azure.ai.translation.text.models.BackTranslation": "TextTranslation.BackTranslation", - "com.azure.ai.translation.text.models.BreakSentenceItem": "TextTranslation.BreakSentenceItem", + "com.azure.ai.translation.text.implementation.models.InputTextItem": "TextTranslation.InputTextItem", + "com.azure.ai.translation.text.implementation.models.TranslateBody": "TextTranslation.TranslateBody", + "com.azure.ai.translation.text.implementation.models.TranslationResult": "TextTranslation.TranslationResult", + "com.azure.ai.translation.text.implementation.models.TransliterateBody": "TextTranslation.TransliterateBody", + "com.azure.ai.translation.text.implementation.models.TransliterateResult": "TextTranslation.TransliterateResult", "com.azure.ai.translation.text.models.DetectedLanguage": "TextTranslation.DetectedLanguage", - "com.azure.ai.translation.text.models.DictionaryExample": "TextTranslation.DictionaryExample", - "com.azure.ai.translation.text.models.DictionaryExampleItem": "TextTranslation.DictionaryExampleItem", - "com.azure.ai.translation.text.models.DictionaryExampleTextItem": "TextTranslation.DictionaryExampleTextItem", - "com.azure.ai.translation.text.models.DictionaryLookupItem": "TextTranslation.DictionaryLookupItem", - "com.azure.ai.translation.text.models.DictionaryTranslation": "TextTranslation.DictionaryTranslation", "com.azure.ai.translation.text.models.GetSupportedLanguagesResult": "TextTranslation.GetSupportedLanguagesResult", - "com.azure.ai.translation.text.models.InputTextItem": "TextTranslation.InputTextItem", "com.azure.ai.translation.text.models.LanguageDirectionality": "TextTranslation.LanguageDirectionality", "com.azure.ai.translation.text.models.LanguageScript": "TextTranslation.LanguageScript", "com.azure.ai.translation.text.models.ProfanityAction": "TextTranslation.ProfanityAction", "com.azure.ai.translation.text.models.ProfanityMarker": "TextTranslation.ProfanityMarker", - "com.azure.ai.translation.text.models.SentenceBoundaries": "TextTranslation.SentenceBoundaries", - "com.azure.ai.translation.text.models.SourceDictionaryLanguage": "TextTranslation.SourceDictionaryLanguage", - "com.azure.ai.translation.text.models.SourceText": "TextTranslation.SourceText", - "com.azure.ai.translation.text.models.TargetDictionaryLanguage": "TextTranslation.TargetDictionaryLanguage", + "com.azure.ai.translation.text.models.ReferenceTextPair": "TextTranslation.ReferenceTextPair", "com.azure.ai.translation.text.models.TextType": "TextTranslation.TextType", - "com.azure.ai.translation.text.models.TranslatedTextAlignment": "TextTranslation.TranslatedTextAlignment", + "com.azure.ai.translation.text.models.TranslateInputItem": "TextTranslation.TranslateInputItem", "com.azure.ai.translation.text.models.TranslatedTextItem": "TextTranslation.TranslatedTextItem", "com.azure.ai.translation.text.models.TranslationLanguage": "TextTranslation.TranslationLanguage", + "com.azure.ai.translation.text.models.TranslationTarget": "TextTranslation.TranslationTarget", "com.azure.ai.translation.text.models.TranslationText": "TextTranslation.TranslationText", "com.azure.ai.translation.text.models.TransliterableScript": "TextTranslation.TransliterableScript", "com.azure.ai.translation.text.models.TransliteratedText": "TextTranslation.TransliteratedText", diff --git a/sdk/translation/azure-ai-translation-text/src/main/resources/META-INF/azure-ai-translation-text_metadata.json b/sdk/translation/azure-ai-translation-text/src/main/resources/META-INF/azure-ai-translation-text_metadata.json index 39074129fc9e..221e3c83efb2 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/resources/META-INF/azure-ai-translation-text_metadata.json +++ b/sdk/translation/azure-ai-translation-text/src/main/resources/META-INF/azure-ai-translation-text_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersion":"3.0","crossLanguageDefinitions":{"com.azure.ai.translation.text.TextTranslationAsyncClient":"TextTranslation","com.azure.ai.translation.text.TextTranslationAsyncClient.findSentenceBoundaries":"TextTranslation.findSentenceBoundaries","com.azure.ai.translation.text.TextTranslationAsyncClient.findSentenceBoundariesWithResponse":"TextTranslation.findSentenceBoundaries","com.azure.ai.translation.text.TextTranslationAsyncClient.getSupportedLanguages":"TextTranslation.getSupportedLanguages","com.azure.ai.translation.text.TextTranslationAsyncClient.getSupportedLanguagesWithResponse":"TextTranslation.getSupportedLanguages","com.azure.ai.translation.text.TextTranslationAsyncClient.lookupDictionaryEntries":"TextTranslation.lookupDictionaryEntries","com.azure.ai.translation.text.TextTranslationAsyncClient.lookupDictionaryEntriesWithResponse":"TextTranslation.lookupDictionaryEntries","com.azure.ai.translation.text.TextTranslationAsyncClient.lookupDictionaryExamples":"TextTranslation.lookupDictionaryExamples","com.azure.ai.translation.text.TextTranslationAsyncClient.lookupDictionaryExamplesWithResponse":"TextTranslation.lookupDictionaryExamples","com.azure.ai.translation.text.TextTranslationAsyncClient.translate":"TextTranslation.translate","com.azure.ai.translation.text.TextTranslationAsyncClient.translateWithResponse":"TextTranslation.translate","com.azure.ai.translation.text.TextTranslationAsyncClient.transliterate":"TextTranslation.transliterate","com.azure.ai.translation.text.TextTranslationAsyncClient.transliterateWithResponse":"TextTranslation.transliterate","com.azure.ai.translation.text.TextTranslationClient":"TextTranslation","com.azure.ai.translation.text.TextTranslationClient.findSentenceBoundaries":"TextTranslation.findSentenceBoundaries","com.azure.ai.translation.text.TextTranslationClient.findSentenceBoundariesWithResponse":"TextTranslation.findSentenceBoundaries","com.azure.ai.translation.text.TextTranslationClient.getSupportedLanguages":"TextTranslation.getSupportedLanguages","com.azure.ai.translation.text.TextTranslationClient.getSupportedLanguagesWithResponse":"TextTranslation.getSupportedLanguages","com.azure.ai.translation.text.TextTranslationClient.lookupDictionaryEntries":"TextTranslation.lookupDictionaryEntries","com.azure.ai.translation.text.TextTranslationClient.lookupDictionaryEntriesWithResponse":"TextTranslation.lookupDictionaryEntries","com.azure.ai.translation.text.TextTranslationClient.lookupDictionaryExamples":"TextTranslation.lookupDictionaryExamples","com.azure.ai.translation.text.TextTranslationClient.lookupDictionaryExamplesWithResponse":"TextTranslation.lookupDictionaryExamples","com.azure.ai.translation.text.TextTranslationClient.translate":"TextTranslation.translate","com.azure.ai.translation.text.TextTranslationClient.translateWithResponse":"TextTranslation.translate","com.azure.ai.translation.text.TextTranslationClient.transliterate":"TextTranslation.transliterate","com.azure.ai.translation.text.TextTranslationClient.transliterateWithResponse":"TextTranslation.transliterate","com.azure.ai.translation.text.TextTranslationClientBuilder":"TextTranslation","com.azure.ai.translation.text.models.BackTranslation":"TextTranslation.BackTranslation","com.azure.ai.translation.text.models.BreakSentenceItem":"TextTranslation.BreakSentenceItem","com.azure.ai.translation.text.models.DetectedLanguage":"TextTranslation.DetectedLanguage","com.azure.ai.translation.text.models.DictionaryExample":"TextTranslation.DictionaryExample","com.azure.ai.translation.text.models.DictionaryExampleItem":"TextTranslation.DictionaryExampleItem","com.azure.ai.translation.text.models.DictionaryExampleTextItem":"TextTranslation.DictionaryExampleTextItem","com.azure.ai.translation.text.models.DictionaryLookupItem":"TextTranslation.DictionaryLookupItem","com.azure.ai.translation.text.models.DictionaryTranslation":"TextTranslation.DictionaryTranslation","com.azure.ai.translation.text.models.GetSupportedLanguagesResult":"TextTranslation.GetSupportedLanguagesResult","com.azure.ai.translation.text.models.InputTextItem":"TextTranslation.InputTextItem","com.azure.ai.translation.text.models.LanguageDirectionality":"TextTranslation.LanguageDirectionality","com.azure.ai.translation.text.models.LanguageScript":"TextTranslation.LanguageScript","com.azure.ai.translation.text.models.ProfanityAction":"TextTranslation.ProfanityAction","com.azure.ai.translation.text.models.ProfanityMarker":"TextTranslation.ProfanityMarker","com.azure.ai.translation.text.models.SentenceBoundaries":"TextTranslation.SentenceBoundaries","com.azure.ai.translation.text.models.SourceDictionaryLanguage":"TextTranslation.SourceDictionaryLanguage","com.azure.ai.translation.text.models.SourceText":"TextTranslation.SourceText","com.azure.ai.translation.text.models.TargetDictionaryLanguage":"TextTranslation.TargetDictionaryLanguage","com.azure.ai.translation.text.models.TextType":"TextTranslation.TextType","com.azure.ai.translation.text.models.TranslatedTextAlignment":"TextTranslation.TranslatedTextAlignment","com.azure.ai.translation.text.models.TranslatedTextItem":"TextTranslation.TranslatedTextItem","com.azure.ai.translation.text.models.TranslationLanguage":"TextTranslation.TranslationLanguage","com.azure.ai.translation.text.models.TranslationText":"TextTranslation.TranslationText","com.azure.ai.translation.text.models.TransliterableScript":"TextTranslation.TransliterableScript","com.azure.ai.translation.text.models.TransliteratedText":"TextTranslation.TransliteratedText","com.azure.ai.translation.text.models.TransliterationLanguage":"TextTranslation.TransliterationLanguage"},"generatedFiles":["src/main/java/com/azure/ai/translation/text/TextTranslationAsyncClient.java","src/main/java/com/azure/ai/translation/text/TextTranslationClient.java","src/main/java/com/azure/ai/translation/text/TextTranslationClientBuilder.java","src/main/java/com/azure/ai/translation/text/TextTranslationServiceVersion.java","src/main/java/com/azure/ai/translation/text/implementation/TextTranslationClientImpl.java","src/main/java/com/azure/ai/translation/text/implementation/package-info.java","src/main/java/com/azure/ai/translation/text/models/BackTranslation.java","src/main/java/com/azure/ai/translation/text/models/BreakSentenceItem.java","src/main/java/com/azure/ai/translation/text/models/DetectedLanguage.java","src/main/java/com/azure/ai/translation/text/models/DictionaryExample.java","src/main/java/com/azure/ai/translation/text/models/DictionaryExampleItem.java","src/main/java/com/azure/ai/translation/text/models/DictionaryExampleTextItem.java","src/main/java/com/azure/ai/translation/text/models/DictionaryLookupItem.java","src/main/java/com/azure/ai/translation/text/models/DictionaryTranslation.java","src/main/java/com/azure/ai/translation/text/models/GetSupportedLanguagesResult.java","src/main/java/com/azure/ai/translation/text/models/InputTextItem.java","src/main/java/com/azure/ai/translation/text/models/LanguageDirectionality.java","src/main/java/com/azure/ai/translation/text/models/LanguageScript.java","src/main/java/com/azure/ai/translation/text/models/ProfanityAction.java","src/main/java/com/azure/ai/translation/text/models/ProfanityMarker.java","src/main/java/com/azure/ai/translation/text/models/SentenceBoundaries.java","src/main/java/com/azure/ai/translation/text/models/SourceDictionaryLanguage.java","src/main/java/com/azure/ai/translation/text/models/SourceText.java","src/main/java/com/azure/ai/translation/text/models/TargetDictionaryLanguage.java","src/main/java/com/azure/ai/translation/text/models/TextType.java","src/main/java/com/azure/ai/translation/text/models/TranslatedTextAlignment.java","src/main/java/com/azure/ai/translation/text/models/TranslatedTextItem.java","src/main/java/com/azure/ai/translation/text/models/TranslationLanguage.java","src/main/java/com/azure/ai/translation/text/models/TranslationText.java","src/main/java/com/azure/ai/translation/text/models/TransliterableScript.java","src/main/java/com/azure/ai/translation/text/models/TransliteratedText.java","src/main/java/com/azure/ai/translation/text/models/TransliterationLanguage.java","src/main/java/com/azure/ai/translation/text/models/package-info.java","src/main/java/com/azure/ai/translation/text/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersion":"2025-10-01-preview","crossLanguageDefinitions":{"com.azure.ai.translation.text.TextTranslationAsyncClient":"TextTranslation","com.azure.ai.translation.text.TextTranslationAsyncClient.getSupportedLanguages":"TextTranslation.getSupportedLanguages","com.azure.ai.translation.text.TextTranslationAsyncClient.getSupportedLanguagesWithResponse":"TextTranslation.getSupportedLanguages","com.azure.ai.translation.text.TextTranslationAsyncClient.translate":"TextTranslation.translate","com.azure.ai.translation.text.TextTranslationAsyncClient.translateWithResponse":"TextTranslation.translate","com.azure.ai.translation.text.TextTranslationAsyncClient.transliterate":"TextTranslation.transliterate","com.azure.ai.translation.text.TextTranslationAsyncClient.transliterateWithResponse":"TextTranslation.transliterate","com.azure.ai.translation.text.TextTranslationClient":"TextTranslation","com.azure.ai.translation.text.TextTranslationClient.getSupportedLanguages":"TextTranslation.getSupportedLanguages","com.azure.ai.translation.text.TextTranslationClient.getSupportedLanguagesWithResponse":"TextTranslation.getSupportedLanguages","com.azure.ai.translation.text.TextTranslationClient.translate":"TextTranslation.translate","com.azure.ai.translation.text.TextTranslationClient.translateWithResponse":"TextTranslation.translate","com.azure.ai.translation.text.TextTranslationClient.transliterate":"TextTranslation.transliterate","com.azure.ai.translation.text.TextTranslationClient.transliterateWithResponse":"TextTranslation.transliterate","com.azure.ai.translation.text.TextTranslationClientBuilder":"TextTranslation","com.azure.ai.translation.text.implementation.models.InputTextItem":"TextTranslation.InputTextItem","com.azure.ai.translation.text.implementation.models.TranslateBody":"TextTranslation.TranslateBody","com.azure.ai.translation.text.implementation.models.TranslationResult":"TextTranslation.TranslationResult","com.azure.ai.translation.text.implementation.models.TransliterateBody":"TextTranslation.TransliterateBody","com.azure.ai.translation.text.implementation.models.TransliterateResult":"TextTranslation.TransliterateResult","com.azure.ai.translation.text.models.DetectedLanguage":"TextTranslation.DetectedLanguage","com.azure.ai.translation.text.models.GetSupportedLanguagesResult":"TextTranslation.GetSupportedLanguagesResult","com.azure.ai.translation.text.models.LanguageDirectionality":"TextTranslation.LanguageDirectionality","com.azure.ai.translation.text.models.LanguageScript":"TextTranslation.LanguageScript","com.azure.ai.translation.text.models.ProfanityAction":"TextTranslation.ProfanityAction","com.azure.ai.translation.text.models.ProfanityMarker":"TextTranslation.ProfanityMarker","com.azure.ai.translation.text.models.ReferenceTextPair":"TextTranslation.ReferenceTextPair","com.azure.ai.translation.text.models.TextType":"TextTranslation.TextType","com.azure.ai.translation.text.models.TranslateInputItem":"TextTranslation.TranslateInputItem","com.azure.ai.translation.text.models.TranslatedTextItem":"TextTranslation.TranslatedTextItem","com.azure.ai.translation.text.models.TranslationLanguage":"TextTranslation.TranslationLanguage","com.azure.ai.translation.text.models.TranslationTarget":"TextTranslation.TranslationTarget","com.azure.ai.translation.text.models.TranslationText":"TextTranslation.TranslationText","com.azure.ai.translation.text.models.TransliterableScript":"TextTranslation.TransliterableScript","com.azure.ai.translation.text.models.TransliteratedText":"TextTranslation.TransliteratedText","com.azure.ai.translation.text.models.TransliterationLanguage":"TextTranslation.TransliterationLanguage"},"generatedFiles":["src/main/java/com/azure/ai/translation/text/TextTranslationAsyncClient.java","src/main/java/com/azure/ai/translation/text/TextTranslationClient.java","src/main/java/com/azure/ai/translation/text/TextTranslationClientBuilder.java","src/main/java/com/azure/ai/translation/text/TextTranslationServiceVersion.java","src/main/java/com/azure/ai/translation/text/implementation/TextTranslationClientImpl.java","src/main/java/com/azure/ai/translation/text/implementation/models/InputTextItem.java","src/main/java/com/azure/ai/translation/text/implementation/models/TranslateBody.java","src/main/java/com/azure/ai/translation/text/implementation/models/TranslationResult.java","src/main/java/com/azure/ai/translation/text/implementation/models/TransliterateBody.java","src/main/java/com/azure/ai/translation/text/implementation/models/TransliterateResult.java","src/main/java/com/azure/ai/translation/text/implementation/models/package-info.java","src/main/java/com/azure/ai/translation/text/implementation/package-info.java","src/main/java/com/azure/ai/translation/text/models/DetectedLanguage.java","src/main/java/com/azure/ai/translation/text/models/GetSupportedLanguagesResult.java","src/main/java/com/azure/ai/translation/text/models/LanguageDirectionality.java","src/main/java/com/azure/ai/translation/text/models/LanguageScript.java","src/main/java/com/azure/ai/translation/text/models/ProfanityAction.java","src/main/java/com/azure/ai/translation/text/models/ProfanityMarker.java","src/main/java/com/azure/ai/translation/text/models/ReferenceTextPair.java","src/main/java/com/azure/ai/translation/text/models/TextType.java","src/main/java/com/azure/ai/translation/text/models/TranslateInputItem.java","src/main/java/com/azure/ai/translation/text/models/TranslatedTextItem.java","src/main/java/com/azure/ai/translation/text/models/TranslationLanguage.java","src/main/java/com/azure/ai/translation/text/models/TranslationTarget.java","src/main/java/com/azure/ai/translation/text/models/TranslationText.java","src/main/java/com/azure/ai/translation/text/models/TransliterableScript.java","src/main/java/com/azure/ai/translation/text/models/TransliteratedText.java","src/main/java/com/azure/ai/translation/text/models/TransliterationLanguage.java","src/main/java/com/azure/ai/translation/text/models/package-info.java","src/main/java/com/azure/ai/translation/text/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/BreakSentence.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/BreakSentence.java deleted file mode 100644 index 390b7a350137..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/BreakSentence.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.ai.translation.text; - -import com.azure.ai.translation.text.models.BreakSentenceItem; -import com.azure.core.credential.AzureKeyCredential; - -/** - * Break Sentence API call. - */ -public class BreakSentence { - /** - * Main method to invoke this demo. - * - * @param args Unused arguments to the program. - */ - public static void main(final String[] args) { - String apiKey = System.getenv("TEXT_TRANSLATOR_API_KEY"); - String region = System.getenv("TEXT_TRANSLATOR_API_REGION"); - AzureKeyCredential credential = new AzureKeyCredential(apiKey); - - TextTranslationClient client = new TextTranslationClientBuilder() - .credential(credential) - .region(region) - .endpoint("https://api.cognitive.microsofttranslator.com") - .buildClient(); - - // BEGIN: getTextTranslationSentenceBoundaries - String sourceLanguage = "zh-Hans"; - String sourceScript = "Latn"; - String content = "zhè shì gè cè shì。"; - - BreakSentenceItem breakSentence = client.findSentenceBoundaries(content, sourceLanguage, sourceScript); - - System.out.println("The detected sentence boundaries: " + breakSentence.getSentencesLengths()); - // END: getTextTranslationSentenceBoundaries - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/DictionaryExamples.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/DictionaryExamples.java deleted file mode 100644 index f1660ff1fe1b..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/DictionaryExamples.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.ai.translation.text; - -import java.util.List; -import java.util.ArrayList; -import com.azure.core.credential.AzureKeyCredential; -import com.azure.ai.translation.text.models.DictionaryExampleItem; -import com.azure.ai.translation.text.models.DictionaryExampleTextItem; - -/** - * Returns grammatical structure and context examples for the source term and target term pair. - */ -public class DictionaryExamples { - /** - * Main method to invoke this demo. - * - * @param args Unused arguments to the program. - */ - public static void main(final String[] args) { - String apiKey = System.getenv("TEXT_TRANSLATOR_API_KEY"); - String region = System.getenv("TEXT_TRANSLATOR_API_REGION"); - AzureKeyCredential credential = new AzureKeyCredential(apiKey); - - TextTranslationClient client = new TextTranslationClientBuilder() - .credential(credential) - .region(region) - .endpoint("https://api.cognitive.microsofttranslator.com") - .buildClient(); - - // BEGIN: getTextTranslationDictionaryExamples - String sourceLanguage = "en"; - String targetLanguage = "es"; - List<DictionaryExampleTextItem> content = new ArrayList<>(); - content.add(new DictionaryExampleTextItem("fly", "volar")); - - List<DictionaryExampleItem> dictionaryEntries = client.lookupDictionaryExamples(sourceLanguage, targetLanguage, content); - - for (DictionaryExampleItem dictionaryEntry : dictionaryEntries) { - System.out.println("For the given input " + dictionaryEntry.getExamples().size() + " entries were found in the dictionary."); - System.out.println("Example: '" + dictionaryEntry.getExamples().get(0).getTargetPrefix() + dictionaryEntry.getExamples().get(0).getTargetTerm() + dictionaryEntry.getExamples().get(0).getTargetSuffix()); - } - // END: getTextTranslationDictionaryExamples - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/DictionaryLookup.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/DictionaryLookup.java deleted file mode 100644 index 181559167d4c..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/DictionaryLookup.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.ai.translation.text; - -import com.azure.ai.translation.text.models.DictionaryLookupItem; -import com.azure.core.credential.AzureKeyCredential; - -/** - * Returns equivalent words for the source term in the target language. - */ -public class DictionaryLookup { - /** - * Main method to invoke this demo. - * - * @param args Unused arguments to the program. - */ - public static void main(final String[] args) { - String apiKey = System.getenv("TEXT_TRANSLATOR_API_KEY"); - String region = System.getenv("TEXT_TRANSLATOR_API_REGION"); - AzureKeyCredential credential = new AzureKeyCredential(apiKey); - - TextTranslationClient client = new TextTranslationClientBuilder() - .credential(credential) - .region(region) - .endpoint("https://api.cognitive.microsofttranslator.com") - .buildClient(); - - // BEGIN: getTextTranslationDictionaryLookup - String sourceLanguage = "en"; - String targetLanguage = "es"; - String content = "fly"; - - DictionaryLookupItem dictionaryEntry = client.lookupDictionaryEntries(sourceLanguage, targetLanguage, content); - - System.out.println("For the given input " + dictionaryEntry.getTranslations().size() + " entries were found in the dictionary."); - System.out.println("First entry: '" + dictionaryEntry.getTranslations().get(0).getDisplayTarget() + "', confidence: " + dictionaryEntry.getTranslations().get(0).getConfidence()); - // END: getTextTranslationDictionaryLookup - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/GetLanguages.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/GetLanguages.java index cb7a9b43e32c..e3ea56fdfa38 100644 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/GetLanguages.java +++ b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/GetLanguages.java @@ -5,7 +5,6 @@ import java.util.Map; import com.azure.ai.translation.text.models.GetSupportedLanguagesResult; -import com.azure.ai.translation.text.models.SourceDictionaryLanguage; import com.azure.ai.translation.text.models.TranslationLanguage; import com.azure.ai.translation.text.models.TransliterationLanguage; @@ -28,7 +27,7 @@ public static void main(final String[] args) { System.out.println("Number of supported languages for translate operation: " + languages.getTranslation().size() + "."); System.out.println("Number of supported languages for transliterate operation: " + languages.getTransliteration().size() + "."); - System.out.println("Number of supported languages for dictionary operations: " + languages.getDictionary().size() + "."); + System.out.println("Number of supported models for translate operation: " + languages.getModels().size() + "."); System.out.println("Translation Languages:"); for (Map.Entry<String, TranslationLanguage> translationLanguage : languages.getTranslation().entrySet()) { @@ -40,9 +39,9 @@ public static void main(final String[] args) { System.out.println(transliterationLanguage.getKey() + " -- name: " + transliterationLanguage.getValue().getName() + ", supported script count: " + transliterationLanguage.getValue().getScripts().size()); } - System.out.println("Dictionary Languages:"); - for (Map.Entry<String, SourceDictionaryLanguage> dictionaryLanguage : languages.getDictionary().entrySet()) { - System.out.println(dictionaryLanguage.getKey() + " -- name: " + dictionaryLanguage.getValue().getName() + ", supported target languages count: " + dictionaryLanguage.getValue().getTranslations().size()); + System.out.println("Available models:"); + for (String model : languages.getModels()) { + System.out.println(model); } // END: getTextTranslationLanguages } diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/GetLanguagesAcceptLanguage.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/GetLanguagesAcceptLanguage.java index d3693a61b70f..0ad1985da32a 100644 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/GetLanguagesAcceptLanguage.java +++ b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/GetLanguagesAcceptLanguage.java @@ -5,7 +5,6 @@ import java.util.Map; import com.azure.ai.translation.text.models.GetSupportedLanguagesResult; -import com.azure.ai.translation.text.models.SourceDictionaryLanguage; import com.azure.ai.translation.text.models.TranslationLanguage; import com.azure.ai.translation.text.models.TransliterationLanguage; @@ -33,7 +32,7 @@ public static void main(final String[] args) { System.out.println("Number of supported languages for translate operation: " + languages.getTranslation().size() + "."); System.out.println("Number of supported languages for transliterate operation: " + languages.getTransliteration().size() + "."); - System.out.println("Number of supported languages for dictionary operations: " + languages.getDictionary().size() + "."); + System.out.println("Number of supported models for translate operation: " + languages.getModels().size() + "."); System.out.println("Translation Languages:"); for (Map.Entry<String, TranslationLanguage> translationLanguage : languages.getTranslation().entrySet()) { @@ -45,9 +44,9 @@ public static void main(final String[] args) { System.out.println(transliterationLanguage.getKey() + " -- name: " + transliterationLanguage.getValue().getName() + ", supported script count: " + transliterationLanguage.getValue().getScripts().size()); } - System.out.println("Dictionary Languages:"); - for (Map.Entry<String, SourceDictionaryLanguage> dictionaryLanguage : languages.getDictionary().entrySet()) { - System.out.println(dictionaryLanguage.getKey() + " -- name: " + dictionaryLanguage.getValue().getName() + ", supported target languages count: " + dictionaryLanguage.getValue().getTranslations().size()); + System.out.println("Available models:"); + for (String model : languages.getModels()) { + System.out.println(model); } } } diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/GetLanguagesScope.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/GetLanguagesScope.java index bfc2137424c7..a21a480289b9 100644 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/GetLanguagesScope.java +++ b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/GetLanguagesScope.java @@ -33,7 +33,7 @@ public static void main(final String[] args) { System.out.println("Number of supported languages for translate operation: " + languages.getTranslation().size() + "."); System.out.println("Number of supported languages for transliterate operation: " + (languages.getTransliteration() == null ? 0 : languages.getTransliteration().size()) + "."); - System.out.println("Number of supported languages for dictionary operations: " + (languages.getDictionary() == null ? 0 : languages.getDictionary().size()) + "."); + System.out.println("Number of supported models for translate operation: " + languages.getModels().size() + "."); System.out.println("Translation Languages:"); diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/Translate.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/Translate.java index 45a225e27ad2..7809e87c4014 100644 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/Translate.java +++ b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/Translate.java @@ -3,8 +3,11 @@ package com.azure.ai.translation.text; -import com.azure.ai.translation.text.models.TranslateOptions; +import java.util.Arrays; + +import com.azure.ai.translation.text.models.TranslateInputItem; import com.azure.ai.translation.text.models.TranslatedTextItem; +import com.azure.ai.translation.text.models.TranslationTarget; import com.azure.ai.translation.text.models.TranslationText; import com.azure.core.credential.AzureKeyCredential; @@ -29,14 +32,15 @@ public static void main(final String[] args) { .buildClient(); // BEGIN: getTextTranslationMultiple - TranslateOptions translateOptions = new TranslateOptions() - .setSourceLanguage("en") - .addTargetLanguage("es"); + TranslateInputItem input = new TranslateInputItem( + "This is a test.", + Arrays.asList(new TranslationTarget("es"), new TranslationTarget("fr"))); + input.setLanguage("en"); - TranslatedTextItem translation = client.translate("This is a test.", translateOptions); + TranslatedTextItem translation = client.translate(Arrays.asList(input)).get(0); for (TranslationText textTranslation : translation.getTranslations()) { - System.out.println("Text was translated to: '" + textTranslation.getTargetLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); + System.out.println("Text was translated to: '" + textTranslation.getLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); } // END: getTextTranslationMultiple } diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateAlignments.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateAlignments.java deleted file mode 100644 index 259ae06de4aa..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateAlignments.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.ai.translation.text; - -import com.azure.ai.translation.text.models.TranslateOptions; -import com.azure.ai.translation.text.models.TranslatedTextItem; -import com.azure.ai.translation.text.models.TranslationText; -import com.azure.core.credential.AzureKeyCredential; - -/** - * You can ask translation service to include alignment projection from source text to translated text. - */ -public class TranslateAlignments { - /** - * Main method to invoke this demo. - * - * @param args Unused arguments to the program. - */ - public static void main(final String[] args) { - String apiKey = System.getenv("TEXT_TRANSLATOR_API_KEY"); - String region = System.getenv("TEXT_TRANSLATOR_API_REGION"); - AzureKeyCredential credential = new AzureKeyCredential(apiKey); - - TextTranslationClient client = new TextTranslationClientBuilder() - .credential(credential) - .region(region) - .endpoint("https://api.cognitive.microsofttranslator.com") - .buildClient(); - - TranslateOptions translateOptions = new TranslateOptions() - .setSourceLanguage("en") - .addTargetLanguage("cs") - .setIncludeAlignment(true); - - TranslatedTextItem translation = client.translate("The answer lies in machine translation.", translateOptions); - - for (TranslationText textTranslation : translation.getTranslations()) { - System.out.println("Text was translated to: '" + textTranslation.getTargetLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); - System.out.println("Alignments: " + textTranslation.getAlignment().getProjections()); - } - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateCustom.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateCustom.java index 1a529f84fc41..533b4054c4dd 100644 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateCustom.java +++ b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateCustom.java @@ -3,8 +3,11 @@ package com.azure.ai.translation.text; -import com.azure.ai.translation.text.models.TranslateOptions; +import java.util.Arrays; + +import com.azure.ai.translation.text.models.TranslateInputItem; import com.azure.ai.translation.text.models.TranslatedTextItem; +import com.azure.ai.translation.text.models.TranslationTarget; import com.azure.ai.translation.text.models.TranslationText; import com.azure.core.credential.AzureKeyCredential; @@ -42,15 +45,15 @@ public static void main(final String[] args) { .endpoint("https://api.cognitive.microsofttranslator.com") .buildClient(); - TranslateOptions translateOptions = new TranslateOptions() - .setSourceLanguage("en") - .addTargetLanguage("cs") - .setCategory("<<Category ID>>"); + TranslationTarget target = + new TranslationTarget("cs").setDeploymentName("<<Category ID>>"); + TranslateInputItem input = + new TranslateInputItem("This is a test.", Arrays.asList(target)).setLanguage("en"); - TranslatedTextItem translation = client.translate("This is a test.", translateOptions); + TranslatedTextItem translation = client.translate(Arrays.asList(input)).get(0); for (TranslationText textTranslation : translation.getTranslations()) { - System.out.println("Text was translated to: '" + textTranslation.getTargetLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); + System.out.println("Text was translated to: '" + textTranslation.getLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); } } } diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateDetection.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateDetection.java index 7c295b56f5d4..79524de1a280 100644 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateDetection.java +++ b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateDetection.java @@ -39,11 +39,11 @@ public static void main(final String[] args) { if (translation.getDetectedLanguage() != null) { DetectedLanguage detectedLanguage = translation.getDetectedLanguage(); - System.out.println("Detected languages of the input text: " + detectedLanguage.getLanguage() + " with score: " + detectedLanguage.getConfidence() + "."); + System.out.println("Detected languages of the input text: " + detectedLanguage.getLanguage() + " with score: " + detectedLanguage.getScore() + "."); } for (TranslationText textTranslation : translation.getTranslations()) { - System.out.println("Text was translated to: '" + textTranslation.getTargetLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); + System.out.println("Text was translated to: '" + textTranslation.getLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); } } } diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateDictionary.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateDictionary.java deleted file mode 100644 index 141e2a2c3d38..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateDictionary.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.ai.translation.text; - -import com.azure.ai.translation.text.models.TranslateOptions; -import com.azure.ai.translation.text.models.TranslatedTextItem; -import com.azure.ai.translation.text.models.TranslationText; -import com.azure.core.credential.AzureKeyCredential; - -/** - * If you already know the translation you want to apply to a word or a phrase, you can supply - * it as markup within the request. The dynamic dictionary is safe only for compound nouns - * like proper names and product names. - * - * > Note You must include the From parameter in your API translation request instead of using - * the autodetect feature. - */ -public class TranslateDictionary { - /** - * Main method to invoke this demo. - * - * @param args Unused arguments to the program. - */ - public static void main(final String[] args) { - String apiKey = System.getenv("TEXT_TRANSLATOR_API_KEY"); - String region = System.getenv("TEXT_TRANSLATOR_API_REGION"); - AzureKeyCredential credential = new AzureKeyCredential(apiKey); - - TextTranslationClient client = new TextTranslationClientBuilder() - .credential(credential) - .region(region) - .endpoint("https://api.cognitive.microsofttranslator.com") - .buildClient(); - - TranslateOptions translateOptions = new TranslateOptions() - .setSourceLanguage("en") - .addTargetLanguage("cs"); - - TranslatedTextItem translation = client.translate("The word < mstrans:dictionary translation =\"wordomatic\">wordomatic</mstrans:dictionary> is a dictionary entry.", translateOptions); - - for (TranslationText textTranslation : translation.getTranslations()) { - System.out.println("Text was translated to: '" + textTranslation.getTargetLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); - } - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateLlm.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateLlm.java new file mode 100644 index 000000000000..5d68a8e9ba12 --- /dev/null +++ b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateLlm.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.translation.text; + +import java.util.Arrays; + +import com.azure.ai.translation.text.models.TranslateInputItem; +import com.azure.ai.translation.text.models.TranslatedTextItem; +import com.azure.ai.translation.text.models.TranslationTarget; +import com.azure.ai.translation.text.models.TranslationText; +import com.azure.core.credential.AzureKeyCredential; + +/** + * By default, Azure Translator uses neural Machine Translation (NMT) technology. With the newest preview + * release, you now can optionally select either the standard NMT translation or Large Language Model (LLM) + * models — GPT-4o-mini or GPT-4o. You can choose a large language model for translation based on factors such + * as quality, cost, and other considerations. However, using an LLM model requires you to have a [Microsoft + * Foundry resource]. + * + * https://learn.microsoft.com/azure/ai-services/translator/how-to/create-translator-resource?tabs=foundry + * + * To use an LLM model for translation, set the `deploymentName` property in the `TranslationTarget` object to the + * name of your Foundry resource deployment, e.g., `gpt-4o-mini` or `gpt-4o`. You can also configure the tone and + * gender of the translation by setting the `tone` and `gender` properties. + * + */ +public class TranslateLlm { + /** + * Main method to invoke this demo. + * + * @param args Unused arguments to the program. + */ + public static void main(final String[] args) { + String apiKey = System.getenv("TEXT_TRANSLATOR_API_KEY"); + String region = System.getenv("TEXT_TRANSLATOR_API_REGION"); + AzureKeyCredential credential = new AzureKeyCredential(apiKey); + + TextTranslationClient client = new TextTranslationClientBuilder() + .credential(credential) + .region(region) + .endpoint("https://api.cognitive.microsofttranslator.com") + .buildClient(); + + TranslationTarget target = new TranslationTarget("es") + .setDeploymentName("gpt-4o-mini") + .setTone("formal") + .setGender("female"); + TranslateInputItem input = new TranslateInputItem( + "Doctor is available next Monday. Do you want to schedule an appointment?", + Arrays.asList(target)); + + TranslatedTextItem translation = client.translate(Arrays.asList(input)).get(0); + + for (TranslationText textTranslation : translation.getTranslations()) { + System.out.println("Text was translated to: '" + textTranslation.getLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); + } + } +} diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateMultipleSources.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateMultipleSources.java index 3a1506b2f2b3..9bbaf82ceb7b 100644 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateMultipleSources.java +++ b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateMultipleSources.java @@ -4,11 +4,13 @@ package com.azure.ai.translation.text; import com.azure.ai.translation.text.models.DetectedLanguage; +import com.azure.ai.translation.text.models.TranslateInputItem; import com.azure.ai.translation.text.models.TranslatedTextItem; +import com.azure.ai.translation.text.models.TranslationTarget; import com.azure.ai.translation.text.models.TranslationText; import com.azure.core.credential.AzureKeyCredential; -import java.util.ArrayList; +import java.util.Arrays; import java.util.List; /** @@ -34,21 +36,21 @@ public static void main(final String[] args) { .endpoint("https://api.cognitive.microsofttranslator.com") .buildClient(); - List<String> content = new ArrayList<>(); - content.add("This is a test."); - content.add("Esto es una prueba."); - content.add("Dies ist ein Test."); + List<TranslateInputItem> inputs = Arrays.asList( + new TranslateInputItem("This is a test.", Arrays.asList(new TranslationTarget("cs"))), + new TranslateInputItem("Esto es una prueba.", Arrays.asList(new TranslationTarget("cs"))), + new TranslateInputItem("Dies ist ein Test.", Arrays.asList(new TranslationTarget("cs")))); - List<TranslatedTextItem> translations = client.translate("cs", content); + List<TranslatedTextItem> translations = client.translate(inputs); for (TranslatedTextItem translation : translations) { if (translation.getDetectedLanguage() != null) { DetectedLanguage detectedLanguage = translation.getDetectedLanguage(); - System.out.println("Detected languages of the input text: " + detectedLanguage.getLanguage() + " with score: " + detectedLanguage.getConfidence() + "."); + System.out.println("Detected languages of the input text: " + detectedLanguage.getLanguage() + " with score: " + detectedLanguage.getScore() + "."); } for (TranslationText textTranslation : translation.getTranslations()) { - System.out.println("Text was translated to: '" + textTranslation.getTargetLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); + System.out.println("Text was translated to: '" + textTranslation.getLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); } } } diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateMultipleTargets.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateMultipleTargets.java index 36de71b20a63..1cb2acbb3660 100644 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateMultipleTargets.java +++ b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateMultipleTargets.java @@ -3,8 +3,12 @@ package com.azure.ai.translation.text; -import com.azure.ai.translation.text.models.TranslateOptions; +import java.util.Arrays; +import java.util.List; + +import com.azure.ai.translation.text.models.TranslateInputItem; import com.azure.ai.translation.text.models.TranslatedTextItem; +import com.azure.ai.translation.text.models.TranslationTarget; import com.azure.ai.translation.text.models.TranslationText; import com.azure.core.credential.AzureKeyCredential; @@ -29,16 +33,16 @@ public static void main(final String[] args) { .endpoint("https://api.cognitive.microsofttranslator.com") .buildClient(); - TranslateOptions translateOptions = new TranslateOptions() - .setSourceLanguage("en") - .addTargetLanguage("cs") - .addTargetLanguage("es") - .addTargetLanguage("de"); + List<TranslationTarget> targets = Arrays.asList( + new TranslationTarget("cs"), + new TranslationTarget("es"), + new TranslationTarget("de")); + TranslateInputItem input = new TranslateInputItem("This is a test.", targets).setLanguage("en"); - TranslatedTextItem translation = client.translate("This is a test.", translateOptions); + TranslatedTextItem translation = client.translate(Arrays.asList(input)).get(0); for (TranslationText textTranslation : translation.getTranslations()) { - System.out.println("Text was translated to: '" + textTranslation.getTargetLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); + System.out.println("Text was translated to: '" + textTranslation.getLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); } } } diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateNoTranslate.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateNoTranslate.java index 1d1455a37ed4..9ff2c0b48d7c 100644 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateNoTranslate.java +++ b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateNoTranslate.java @@ -3,9 +3,12 @@ package com.azure.ai.translation.text; +import java.util.Arrays; + import com.azure.ai.translation.text.models.TextType; -import com.azure.ai.translation.text.models.TranslateOptions; +import com.azure.ai.translation.text.models.TranslateInputItem; import com.azure.ai.translation.text.models.TranslatedTextItem; +import com.azure.ai.translation.text.models.TranslationTarget; import com.azure.ai.translation.text.models.TranslationText; import com.azure.core.credential.AzureKeyCredential; @@ -32,15 +35,15 @@ public static void main(final String[] args) { .endpoint("https://api.cognitive.microsofttranslator.com") .buildClient(); - TranslateOptions translateOptions = new TranslateOptions() - .addTargetLanguage("en") - .setSourceLanguage("cs") - .setTextType(TextType.HTML); + TranslateInputItem input = new TranslateInputItem( + "<div class=\"notranslate\">This will not be translated.</div><div>This will be translated. </div>", + Arrays.asList(new TranslationTarget("en")) + ).setLanguage("cs").setTextType(TextType.HTML); - TranslatedTextItem translation = client.translate("<div class=\"notranslate\">This will not be translated.</div><div>This will be translated. </div>", translateOptions); + TranslatedTextItem translation = client.translate(Arrays.asList(input)).get(0); for (TranslationText textTranslation : translation.getTranslations()) { - System.out.println("Text was translated to: '" + textTranslation.getTargetLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); + System.out.println("Text was translated to: '" + textTranslation.getLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); } } } diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateProfanity.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateProfanity.java index 58868ef5085e..2a5871782094 100644 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateProfanity.java +++ b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateProfanity.java @@ -3,15 +3,18 @@ package com.azure.ai.translation.text; +import java.util.Arrays; + import com.azure.ai.translation.text.models.ProfanityAction; import com.azure.ai.translation.text.models.ProfanityMarker; -import com.azure.ai.translation.text.models.TranslateOptions; +import com.azure.ai.translation.text.models.TranslateInputItem; import com.azure.ai.translation.text.models.TranslatedTextItem; +import com.azure.ai.translation.text.models.TranslationTarget; import com.azure.ai.translation.text.models.TranslationText; import com.azure.core.credential.AzureKeyCredential; /** - * Profanity handling: https://learn.microsoft.com/en-us/azure/cognitive-services/translator/reference/v3-0-translate#handle-profanity + * Profanity handling: * * Normally the Translator service will retain profanity that is present in the source in the translation. * The degree of profanity and the context that makes words profane differ between cultures, and as a result @@ -40,16 +43,16 @@ public static void main(final String[] args) { .endpoint("https://api.cognitive.microsofttranslator.com") .buildClient(); - TranslateOptions translateOptions = new TranslateOptions() - .setSourceLanguage("en") - .addTargetLanguage("cs") + TranslationTarget target = new TranslationTarget("cs") .setProfanityAction(ProfanityAction.MARKED) .setProfanityMarker(ProfanityMarker.ASTERISK); + TranslateInputItem input = new TranslateInputItem("This is ***.", Arrays.asList(target)) + .setLanguage("en"); - TranslatedTextItem translation = client.translate("This is ***.", translateOptions); + TranslatedTextItem translation = client.translate(Arrays.asList(input)).get(0); for (TranslationText textTranslation : translation.getTranslations()) { - System.out.println("Text was translated to: '" + textTranslation.getTargetLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); + System.out.println("Text was translated to: '" + textTranslation.getLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); } } } diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateSentenceLength.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateSentenceLength.java deleted file mode 100644 index 76efc45c60c4..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateSentenceLength.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.ai.translation.text; - -import com.azure.ai.translation.text.models.TranslateOptions; -import com.azure.ai.translation.text.models.TranslatedTextItem; -import com.azure.ai.translation.text.models.TranslationText; -import com.azure.core.credential.AzureKeyCredential; - -/** - * You can ask translator service to include sentence boundaries for the input text and the translated text. - */ -public class TranslateSentenceLength { - /** - * Main method to invoke this demo. - * - * @param args Unused arguments to the program. - */ - public static void main(final String[] args) { - String apiKey = System.getenv("TEXT_TRANSLATOR_API_KEY"); - String region = System.getenv("TEXT_TRANSLATOR_API_REGION"); - AzureKeyCredential credential = new AzureKeyCredential(apiKey); - - TextTranslationClient client = new TextTranslationClientBuilder() - .credential(credential) - .region(region) - .endpoint("https://api.cognitive.microsofttranslator.com") - .buildClient(); - - TranslateOptions translateOptions = new TranslateOptions() - .setSourceLanguage("en") - .addTargetLanguage("cs") - .setIncludeSentenceLength(true); - - TranslatedTextItem translation = client.translate("The answer lies in machine translation. This is a test.", translateOptions); - - for (TranslationText textTranslation : translation.getTranslations()) { - System.out.println("Text was translated to: '" + textTranslation.getTargetLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); - System.out.println("Source Sentence length: " + textTranslation.getSentenceBoundaries().getSourceSentencesLengths()); - System.out.println("Translated Sentence length: " + textTranslation.getSentenceBoundaries().getTranslatedSentencesLengths()); - } - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateTextType.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateTextType.java index 066090bcd37e..2b9737df398f 100644 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateTextType.java +++ b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateTextType.java @@ -3,9 +3,12 @@ package com.azure.ai.translation.text; +import java.util.Arrays; + import com.azure.ai.translation.text.models.TextType; -import com.azure.ai.translation.text.models.TranslateOptions; +import com.azure.ai.translation.text.models.TranslateInputItem; import com.azure.ai.translation.text.models.TranslatedTextItem; +import com.azure.ai.translation.text.models.TranslationTarget; import com.azure.ai.translation.text.models.TranslationText; import com.azure.core.credential.AzureKeyCredential; @@ -29,16 +32,16 @@ public static void main(final String[] args) { .region(region) .endpoint("https://api.cognitive.microsofttranslator.com") .buildClient(); + + TranslateInputItem input = new TranslateInputItem( + "<html><body>This <b>is</b> a test.</body></html>", + Arrays.asList(new TranslationTarget("en")) + ).setLanguage("cs").setTextType(TextType.HTML); - TranslateOptions translateOptions = new TranslateOptions() - .addTargetLanguage("en") - .setSourceLanguage("cs") - .setTextType(TextType.HTML); - - TranslatedTextItem translation = client.translate("<html><body>This <b>is</b> a test.</body></html>", translateOptions); + TranslatedTextItem translation = client.translate(Arrays.asList(input)).get(0); for (TranslationText textTranslation : translation.getTranslations()) { - System.out.println("Text was translated to: '" + textTranslation.getTargetLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); + System.out.println("Text was translated to: '" + textTranslation.getLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); } } } diff --git a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateWithTransliteration.java b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateWithTransliteration.java index cb30c33bf85f..444459702f5c 100644 --- a/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateWithTransliteration.java +++ b/sdk/translation/azure-ai-translation-text/src/samples/java/com/azure/ai/translation/text/TranslateWithTransliteration.java @@ -3,8 +3,11 @@ package com.azure.ai.translation.text; -import com.azure.ai.translation.text.models.TranslateOptions; +import java.util.Arrays; + +import com.azure.ai.translation.text.models.TranslateInputItem; import com.azure.ai.translation.text.models.TranslatedTextItem; +import com.azure.ai.translation.text.models.TranslationTarget; import com.azure.ai.translation.text.models.TranslationText; import com.azure.core.credential.AzureKeyCredential; @@ -28,18 +31,14 @@ public static void main(final String[] args) { .endpoint("https://api.cognitive.microsofttranslator.com") .buildClient(); - TranslateOptions translateOptions = new TranslateOptions() - .addTargetLanguage("zh-Hans") - .setSourceLanguage("ar") - .setSourceLanguageScript("Latn") - .setTargetLanguageScript("Latn"); + TranslationTarget target = new TranslationTarget("zh-Hans").setScript("Latn"); + TranslateInputItem input = new TranslateInputItem("hudha akhtabar.", Arrays.asList(target)) + .setLanguage("ar").setScript("Latn"); - TranslatedTextItem translation = client.translate("hudha akhtabar.", translateOptions); + TranslatedTextItem translation = client.translate(Arrays.asList(input)).get(0); - System.out.println("Source Text: " + translation.getSourceText().getText()); for (TranslationText textTranslation : translation.getTranslations()) { - System.out.println("Text was translated to: '" + textTranslation.getTargetLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); - System.out.println("Transliterated text (" + textTranslation.getTransliteration().getScript() + "): " + textTranslation.getTransliteration().getText()); + System.out.println("Text was translated to: '" + textTranslation.getLanguage() + "' and the result is: '" + textTranslation.getText() + "'."); } } } diff --git a/sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/BreakSentenceTests.java b/sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/BreakSentenceTests.java deleted file mode 100644 index 42d8633c172f..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/BreakSentenceTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.ai.translation.text; - -import org.junit.jupiter.api.Test; -import com.azure.ai.translation.text.models.BreakSentenceItem; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - -import java.util.ArrayList; -import java.util.List; - -public class BreakSentenceTests extends TextTranslationClientBase { - - @Test - public void breakSentenceWithAutoDetect() { - BreakSentenceItem response = getTranslationClient().findSentenceBoundaries("hello world"); - assertEquals("en", response.getDetectedLanguage().getLanguage()); - assertTrue(response.getDetectedLanguage().getConfidence() > 0.8); - assertEquals(11, response.getSentencesLengths().get(0)); - } - - @Test - public void breakSentenceWithLanguage() { - String content - = "Mi familia es muy muy bonita. no padre .mi madre es bonita y muy bajo . mi hermano es alto. Me gusta mi familia."; - - BreakSentenceItem response = getTranslationClient().findSentenceBoundaries(content, "es", null); - int[] expectedLengths = new int[] { 30, 42, 20, 20 }; - for (int i = 0; i < expectedLengths.length; i++) { - assertEquals(expectedLengths[i], response.getSentencesLengths().get(i)); - } - } - - @Test - public void breakSentenceWithLanguageAndScript() { - BreakSentenceItem response - = getTranslationClient().findSentenceBoundaries("zhè shì gè cè shì。", "zh-Hans", "Latn"); - assertEquals(18, response.getSentencesLengths().get(0)); - } - - @Test - public void breakSentenceWithMultipleLanguages() { - ArrayList<String> content = new ArrayList<>(); - content.add("hello world"); - content.add("العالم هو مكان مثير جدا للاهتمام"); - - List<BreakSentenceItem> response = getTranslationClient().findSentenceBoundaries(content); - assertEquals("en", response.get(0).getDetectedLanguage().getLanguage()); - assertEquals("ar", response.get(1).getDetectedLanguage().getLanguage()); - assertEquals(11, response.get(0).getSentencesLengths().get(0)); - assertEquals(32, response.get(1).getSentencesLengths().get(0)); - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/DictionaryExamplesTest.java b/sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/DictionaryExamplesTest.java deleted file mode 100644 index 5f17827c6647..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/DictionaryExamplesTest.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.ai.translation.text; - -import com.azure.ai.translation.text.models.DictionaryExampleItem; -import com.azure.ai.translation.text.models.DictionaryExampleTextItem; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class DictionaryExamplesTest extends TextTranslationClientBase { - @Test - public void singleInputItem() { - - ArrayList<DictionaryExampleTextItem> content = new ArrayList<>(); - content.add(new DictionaryExampleTextItem("fly", "volar")); - - List<DictionaryExampleItem> response = getTranslationClient().lookupDictionaryExamples("en", "es", content); - - assertEquals("fly", response.get(0).getNormalizedSource()); - assertEquals("volar", response.get(0).getNormalizedTarget()); - } - - @Test - public void multipleInputItems() { - - ArrayList<DictionaryExampleTextItem> content = new ArrayList<>(); - content.add(new DictionaryExampleTextItem("fly", "volar")); - content.add(new DictionaryExampleTextItem("beef", "came")); - - List<DictionaryExampleItem> response = getTranslationClient().lookupDictionaryExamples("en", "es", content); - assertEquals(2, response.size()); - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/DictionaryLookupTests.java b/sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/DictionaryLookupTests.java deleted file mode 100644 index bd9bbda02b3e..000000000000 --- a/sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/DictionaryLookupTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.ai.translation.text; - -import com.azure.ai.translation.text.models.DictionaryLookupItem; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class DictionaryLookupTests extends TextTranslationClientBase { - @Test - public void singleInputItem() { - DictionaryLookupItem response = getTranslationClient().lookupDictionaryEntries("en", "es", "fly"); - - assertEquals("fly", response.getNormalizedSource()); - assertEquals("fly", response.getDisplaySource()); - } - - @Test - public void multipleInputItems() { - ArrayList<String> content = new ArrayList<>(); - content.add("fly"); - content.add("fox"); - - List<DictionaryLookupItem> response = getTranslationClient().lookupDictionaryEntries("en", "es", content); - assertEquals(2, response.size()); - } -} diff --git a/sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/GetLanguagesTests.java b/sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/GetLanguagesTests.java index 2a0f3e500e2b..0f5fc8d727e3 100644 --- a/sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/GetLanguagesTests.java +++ b/sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/GetLanguagesTests.java @@ -18,7 +18,7 @@ public class GetLanguagesTests extends TextTranslationClientBase { public void getSupportedLanguagesAllScopes() { GetSupportedLanguagesResult response = getTranslationClient().getSupportedLanguages(); assertFalse(response.getTranslation().isEmpty()); - assertFalse(response.getDictionary().isEmpty()); + assertFalse(response.getModels().isEmpty()); assertFalse(response.getTransliteration().isEmpty()); } @@ -50,26 +50,14 @@ public void getSupportedLanguagesTransliterationScope() { assertNotNull(response.getTransliteration().get("be").getScripts().get(0).getDirectionality()); assertNotNull(response.getTransliteration().get("be").getScripts().get(0).getName()); assertNotNull(response.getTransliteration().get("be").getScripts().get(0).getNativeName()); - assertNotNull(response.getTransliteration().get("be").getScripts().get(0).getTargetLanguageScripts()); + assertNotNull(response.getTransliteration().get("be").getScripts().get(0).getToScripts()); + assertNotNull(response.getTransliteration().get("be").getScripts().get(0).getToScripts().get(0).getCode()); assertNotNull( - response.getTransliteration().get("be").getScripts().get(0).getTargetLanguageScripts().get(0).getCode()); - assertNotNull(response.getTransliteration() - .get("be") - .getScripts() - .get(0) - .getTargetLanguageScripts() - .get(0) - .getDirectionality()); + response.getTransliteration().get("be").getScripts().get(0).getToScripts().get(0).getDirectionality()); + assertNotNull(response.getTransliteration().get("be").getScripts().get(0).getToScripts().get(0).getName()); assertNotNull( - response.getTransliteration().get("be").getScripts().get(0).getTargetLanguageScripts().get(0).getName()); - assertNotNull(response.getTransliteration() - .get("be") - .getScripts() - .get(0) - .getTargetLanguageScripts() - .get(0) - .getNativeName()); + response.getTransliteration().get("be").getScripts().get(0).getToScripts().get(0).getNativeName()); } @Test @@ -84,43 +72,8 @@ public void getSupportedLanguagesTransliterationScopeMultipleScripts() { assertNotNull(response.getTransliteration().get("zh-Hant").getNativeName()); assertNotNull(response.getTransliteration().get("zh-Hant").getScripts()); - assertTrue( - response.getTransliteration().get("zh-Hant").getScripts().get(0).getTargetLanguageScripts().size() > 1); - assertTrue( - response.getTransliteration().get("zh-Hant").getScripts().get(1).getTargetLanguageScripts().size() > 1); - } - - @Test - public void getSupportedLanguagesDictionaryScope() { - ArrayList<LanguageScope> scopes = new ArrayList<>(); - scopes.add(LanguageScope.DICTIONARY); - GetSupportedLanguagesResult response = getTranslationClient().getSupportedLanguages(scopes, null, null); - assertFalse(response.getDictionary().isEmpty()); - assertTrue(response.getDictionary().containsKey("de")); - - assertNotNull(response.getDictionary().get("de").getName()); - assertNotNull(response.getDictionary().get("de").getNativeName()); - assertNotNull(response.getDictionary().get("de").getDirectionality()); - - assertNotNull(response.getDictionary().get("de").getTranslations().get(0).getCode()); - assertNotNull(response.getDictionary().get("de").getTranslations().get(0).getDirectionality()); - assertNotNull(response.getDictionary().get("de").getTranslations().get(0).getName()); - assertNotNull(response.getDictionary().get("de").getTranslations().get(0).getNativeName()); - } - - @Test - public void getSupportedLanguagesDictionaryScopeMultipleTranslations() { - ArrayList<LanguageScope> scopes = new ArrayList<>(); - scopes.add(LanguageScope.DICTIONARY); - GetSupportedLanguagesResult response = getTranslationClient().getSupportedLanguages(scopes, null, null); - assertFalse(response.getDictionary().isEmpty()); - assertTrue(response.getDictionary().containsKey("en")); - - assertNotNull(response.getDictionary().get("en").getName()); - assertNotNull(response.getDictionary().get("en").getNativeName()); - assertNotNull(response.getDictionary().get("en").getDirectionality()); - - assertTrue(response.getDictionary().get("en").getTranslations().size() > 1); + assertTrue(response.getTransliteration().get("zh-Hant").getScripts().get(0).getToScripts().size() > 1); + assertTrue(response.getTransliteration().get("zh-Hant").getScripts().get(1).getToScripts().size() > 1); } @Test @@ -128,7 +81,7 @@ public void getSupportedLanguagesWithCulture() { GetSupportedLanguagesResult response = getTranslationClient().getSupportedLanguages(null, "es", null); assertFalse(response.getTransliteration().isEmpty()); assertFalse(response.getTranslation().isEmpty()); - assertFalse(response.getDictionary().isEmpty()); + assertFalse(response.getModels().isEmpty()); assertNotNull(response.getTranslation().get("en").getDirectionality()); assertNotNull(response.getTranslation().get("en").getName()); diff --git a/sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/TranslateTests.java b/sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/TranslateTests.java index 51fb8587cd57..bd9c9940af48 100644 --- a/sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/TranslateTests.java +++ b/sdk/translation/azure-ai-translation-text/src/test/java/com/azure/ai/translation/text/TranslateTests.java @@ -3,17 +3,16 @@ package com.azure.ai.translation.text; -import com.azure.core.test.annotation.LiveOnly; - import com.azure.ai.translation.text.models.ProfanityAction; import com.azure.ai.translation.text.models.ProfanityMarker; import com.azure.ai.translation.text.models.TextType; +import com.azure.ai.translation.text.models.TranslateInputItem; import com.azure.ai.translation.text.models.TranslatedTextItem; -import com.azure.ai.translation.text.models.TranslateOptions; +import com.azure.ai.translation.text.models.TranslationTarget; + import org.junit.jupiter.api.Test; -import com.azure.core.test.annotation.PlaybackOnly; -import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -23,131 +22,88 @@ public class TranslateTests extends TextTranslationClientBase { @Test - @LiveOnly public void translateBasic() { TranslatedTextItem response = getTranslationClient().translate("cs", "Hola mundo"); assertEquals(1, response.getTranslations().size()); - assertEquals("cs", response.getTranslations().get(0).getTargetLanguage()); + assertEquals("cs", response.getTranslations().get(0).getLanguage()); assertNotNull(response.getTranslations().get(0).getText()); } @Test - @LiveOnly - public void translateOneItemWithOptions() { - TranslateOptions translateOptions = new TranslateOptions().addTargetLanguage("cs"); - - TranslatedTextItem response = getTranslationClient().translate("Hola mundo", translateOptions); - - assertEquals(1, response.getTranslations().size()); - assertEquals("cs", response.getTranslations().get(0).getTargetLanguage()); - assertNotNull(response.getTranslations().get(0).getText()); - } - - @Test - @LiveOnly - public void translateMultipleItemsWithOptions() { - ArrayList<String> content = new ArrayList<>(); - content.add("This is a test."); - content.add("This is a test sentence two."); - content.add("This is another test."); - - TranslateOptions translateOptions = new TranslateOptions().addTargetLanguage("cs"); - - List<TranslatedTextItem> response = getTranslationClient().translate(content, translateOptions); - - assertEquals(1, response.get(0).getTranslations().size()); - assertEquals("cs", response.get(0).getTranslations().get(0).getTargetLanguage()); - assertNotNull(response.get(0).getTranslations().get(0).getText()); - } - - @Test - @LiveOnly public void translateWithAutoDetect() { - TranslateOptions translateOptions = new TranslateOptions().addTargetLanguage("cs"); - - TranslatedTextItem response = getTranslationClient().translate("This is a test.", translateOptions); + TranslatedTextItem response = getTranslationClient().translate("cs", "This is a test."); assertEquals("en", response.getDetectedLanguage().getLanguage()); assertEquals(1, response.getTranslations().size()); - assertEquals("cs", response.getTranslations().get(0).getTargetLanguage()); + assertEquals("cs", response.getTranslations().get(0).getLanguage()); assertNotNull(response.getTranslations().get(0).getText()); } @Test - @LiveOnly public void translateWithNoTranslateTag() { - TranslateOptions translateOptions - = new TranslateOptions().addTargetLanguage("en").setSourceLanguage("zh-Hans").setTextType(TextType.HTML); - - TranslatedTextItem response - = getTranslationClient().translate("<span class=notranslate>今天是怎么回事是</span>非常可怕的", translateOptions); + TranslateInputItem input = new TranslateInputItem("<span class=notranslate>今天是怎么回事是</span>非常可怕的", + Arrays.asList(new TranslationTarget("en"))); + input.setLanguage("zh-Hans"); + input.setTextType(TextType.HTML); + TranslatedTextItem response = getTranslationClient().translate(Arrays.asList(input)).get(0); assertEquals(1, response.getTranslations().size()); assertTrue(response.getTranslations().get(0).getText().contains("今天是怎么回事是")); } @Test - @LiveOnly public void translateWithDictionaryTag() { - TranslateOptions translateOptions = new TranslateOptions().setSourceLanguage("en").addTargetLanguage("es"); - - TranslatedTextItem response = getTranslationClient().translate( + TranslateInputItem input = new TranslateInputItem( "The word < mstrans:dictionary translation =\"wordomatic\">wordomatic</mstrans:dictionary> is a dictionary entry.", - translateOptions); + Arrays.asList(new TranslationTarget("es"))); + input.setLanguage("en"); + input.setTextType(TextType.HTML); + TranslatedTextItem response = getTranslationClient().translate(Arrays.asList(input)).get(0); assertEquals(1, response.getTranslations().size()); - assertEquals("es", response.getTranslations().get(0).getTargetLanguage()); + assertEquals("es", response.getTranslations().get(0).getLanguage()); assertTrue(response.getTranslations().get(0).getText().contains("wordomatic")); } @Test - @LiveOnly public void translateWithTransliteration() { - TranslateOptions translateOptions = new TranslateOptions().addTargetLanguage("zh-Hans") - .setSourceLanguage("ar") - .setSourceLanguageScript("Latn") - .setTargetLanguageScript("Latn"); + TranslateInputItem input = new TranslateInputItem("hudha akhtabar.", + Arrays.asList(new TranslationTarget("zh-Hans").setScript("Latn"))).setLanguage("ar").setScript("Latn"); + TranslatedTextItem response = getTranslationClient().translate(Arrays.asList(input)).get(0); - TranslatedTextItem response = getTranslationClient().translate("hudha akhtabar.", translateOptions); - - assertNotNull(response.getSourceText().getText()); - assertEquals("zh-Hans", response.getTranslations().get(0).getTargetLanguage()); + assertEquals("zh-Hans", response.getTranslations().get(0).getLanguage()); assertNotNull(response.getTranslations().get(0).getText()); } @Test public void translateFromLatinToLatinScript() { - TranslateOptions translateOptions = new TranslateOptions().addTargetLanguage("ta") - .setSourceLanguage("hi") - .setSourceLanguageScript("Latn") - .setTargetLanguageScript("Latn"); - - TranslatedTextItem response = getTranslationClient().translate("ap kaise ho", translateOptions); + TranslateInputItem input + = new TranslateInputItem("ap kaise ho", Arrays.asList(new TranslationTarget("ta").setScript("Latn"))) + .setLanguage("hi") + .setScript("Latn"); + TranslatedTextItem response = getTranslationClient().translate(Arrays.asList(input)).get(0); - assertNotNull(response.getTranslations().get(0).getTransliteration().getScript()); - assertEquals("eppadi irukkiraai?", response.getTranslations().get(0).getTransliteration().getText()); + assertEquals("eppadi irukkiraai?", response.getTranslations().get(0).getText()); } @Test public void translateWithMultipleInputTexts() { - ArrayList<String> content = new ArrayList<>(); - content.add("This is a test."); - content.add("Esto es una prueba."); - content.add("Dies ist ein Test."); - - TranslateOptions translateOptions = new TranslateOptions().addTargetLanguage("cs"); + List<TranslateInputItem> inputs + = Arrays.asList(new TranslateInputItem("This is a test.", Arrays.asList(new TranslationTarget("cs"))), + new TranslateInputItem("Esto es una prueba.", Arrays.asList(new TranslationTarget("cs"))), + new TranslateInputItem("Dies ist ein Test.", Arrays.asList(new TranslationTarget("cs")))); - List<TranslatedTextItem> response = getTranslationClient().translate(content, translateOptions); + List<TranslatedTextItem> response = getTranslationClient().translate(inputs); assertEquals(3, response.size()); assertEquals("en", response.get(0).getDetectedLanguage().getLanguage()); assertEquals("es", response.get(1).getDetectedLanguage().getLanguage()); assertEquals("de", response.get(2).getDetectedLanguage().getLanguage()); - assertEquals(1, response.get(0).getDetectedLanguage().getConfidence()); - assertEquals(1, response.get(1).getDetectedLanguage().getConfidence()); - assertEquals(1, response.get(2).getDetectedLanguage().getConfidence()); + assertEquals(1, response.get(0).getDetectedLanguage().getScore()); + assertEquals(1, response.get(1).getDetectedLanguage().getScore()); + assertEquals(1, response.get(2).getDetectedLanguage().getScore()); assertNotNull(response.get(0).getTranslations().get(0).getText()); assertNotNull(response.get(1).getTranslations().get(0).getText()); @@ -156,111 +112,74 @@ public void translateWithMultipleInputTexts() { @Test public void translateMultipleTargetLanguages() { - TranslateOptions translateOptions - = new TranslateOptions().addTargetLanguage("cs").addTargetLanguage("es").addTargetLanguage("de"); + TranslateInputItem input = new TranslateInputItem("This is a test.", + Arrays.asList(new TranslationTarget("cs"), new TranslationTarget("es"), new TranslationTarget("de"))); - TranslatedTextItem response = getTranslationClient().translate("This is a test.", translateOptions); + TranslatedTextItem response = getTranslationClient().translate(Arrays.asList(input)).get(0); assertEquals(3, response.getTranslations().size()); assertEquals("en", response.getDetectedLanguage().getLanguage()); - assertEquals(1, response.getDetectedLanguage().getConfidence()); + assertEquals(1, response.getDetectedLanguage().getScore()); assertNotNull(response.getTranslations().get(0).getText()); assertNotNull(response.getTranslations().get(1).getText()); assertNotNull(response.getTranslations().get(2).getText()); } @Test - public void translateDifferentTextTypes() { - TranslateOptions translateOptions = new TranslateOptions().addTargetLanguage("cs").setTextType(TextType.HTML); - - TranslatedTextItem response - = getTranslationClient().translate("<html><body>This <b>is</b> a test.</body></html>", translateOptions); + public void translateWithLlm() { + TranslationTarget target = new TranslationTarget("cs").setDeploymentName("gpt-4o-mini"); + TranslateInputItem input = new TranslateInputItem("This is a test", Arrays.asList(target)); + TranslatedTextItem response = getTranslationClient().translate(Arrays.asList(input)).get(0); assertEquals(1, response.getTranslations().size()); assertEquals("en", response.getDetectedLanguage().getLanguage()); - assertEquals(1, response.getDetectedLanguage().getConfidence()); - } - - @Test - public void translateWithProfanity() { - TranslateOptions translateOptions = new TranslateOptions().addTargetLanguage("zh-Hans") - .setProfanityAction(ProfanityAction.MARKED) - .setProfanityMarker(ProfanityMarker.ASTERISK); - - TranslatedTextItem response - = getTranslationClient().translate("shit this is fucking crazy shit fuck", translateOptions); - - assertEquals(1, response.getTranslations().size()); - assertEquals("en", response.getDetectedLanguage().getLanguage()); - assertEquals(1, response.getDetectedLanguage().getConfidence()); - assertTrue(response.getTranslations().get(0).getText().contains("***")); + assertNotNull(response.getTranslations().get(0).getText()); } @Test - public void translateWithAlignment() { - TranslateOptions translateOptions = new TranslateOptions().addTargetLanguage("cs").setIncludeAlignment(true); - - TranslatedTextItem response = getTranslationClient().translate("It is a beautiful morning", translateOptions); + public void translateDifferentTextTypes() { + TranslateInputItem input = new TranslateInputItem("<html><body>This <b>is</b> a test.</body></html>", + Arrays.asList(new TranslationTarget("cs"))).setTextType(TextType.HTML); + TranslatedTextItem response = getTranslationClient().translate(Arrays.asList(input)).get(0); assertEquals(1, response.getTranslations().size()); assertEquals("en", response.getDetectedLanguage().getLanguage()); - assertEquals(1, response.getDetectedLanguage().getConfidence()); - assertNotNull(response.getTranslations().get(0).getAlignment().getProjections()); + assertEquals(1, response.getDetectedLanguage().getScore()); } @Test - public void translateWithIncludeSentenceLength() { - TranslateOptions translateOptions - = new TranslateOptions().addTargetLanguage("fr").setIncludeSentenceLength(true); + public void translateWithProfanity() { + TranslationTarget target = new TranslationTarget("zh-Hans").setProfanityAction(ProfanityAction.MARKED) + .setProfanityMarker(ProfanityMarker.ASTERISK); + TranslateInputItem input + = new TranslateInputItem("shit this is fucking crazy shit fuck", Arrays.asList(target)); - TranslatedTextItem response = getTranslationClient().translate( - "La réponse se trouve dans la traduction automatique. La meilleure technologie de traduction automatique ne peut pas toujours fournir des traductions adaptées à un site ou des utilisateurs comme un être humain. Il suffit de copier et coller un extrait de code n'importe où.", - translateOptions); + TranslatedTextItem response = getTranslationClient().translate(Arrays.asList(input)).get(0); - assertEquals("fr", response.getDetectedLanguage().getLanguage()); - assertEquals(1, response.getDetectedLanguage().getConfidence()); assertEquals(1, response.getTranslations().size()); - assertEquals(3, response.getTranslations().get(0).getSentenceBoundaries().getSourceSentencesLengths().size()); - assertEquals(3, - response.getTranslations().get(0).getSentenceBoundaries().getTranslatedSentencesLengths().size()); - } - - @Test - public void translateWithCustomEndpoint() { - TranslateOptions translateOptions = new TranslateOptions().addTargetLanguage("cs"); - - TranslatedTextItem response - = getTranslationClientWithCustomEndpoint().translate("It is a beautiful morning", translateOptions); - assertEquals("en", response.getDetectedLanguage().getLanguage()); - assertEquals(1, response.getDetectedLanguage().getConfidence()); - assertEquals(1, response.getTranslations().size()); - assertNotNull(response.getTranslations().get(0).getText()); + assertTrue(response.getDetectedLanguage().getScore() > 0.5); + assertTrue(response.getTranslations().get(0).getText().contains("***")); } @Test public void translateWithToken() throws Exception { - TranslateOptions translateOptions = new TranslateOptions().addTargetLanguage("cs"); - - TranslatedTextItem response = getTranslationClientWithToken().translate("This is a test.", translateOptions); + TranslatedTextItem response = getTranslationClientWithToken().translate("cs", "This is a test."); assertNotNull(response.getTranslations().get(0).getText()); assertEquals("en", response.getDetectedLanguage().getLanguage()); - assertEquals(1, response.getDetectedLanguage().getConfidence()); + assertEquals(1, response.getDetectedLanguage().getScore()); assertEquals(1, response.getTranslations().size()); assertNotNull(response.getTranslations().get(0).getText()); } @Test - @PlaybackOnly public void translateWithAad() throws Exception { - TranslateOptions translateOptions = new TranslateOptions().addTargetLanguage("cs"); - - TranslatedTextItem response = getTranslationClientWithAadAuth().translate("This is a test.", translateOptions); + TranslatedTextItem response = getTranslationClientWithAadAuth().translate("cs", "This is a test."); assertNotNull(response.getTranslations().get(0).getText()); assertEquals("en", response.getDetectedLanguage().getLanguage()); - assertEquals(1, response.getDetectedLanguage().getConfidence()); + assertEquals(1, response.getDetectedLanguage().getScore()); assertEquals(1, response.getTranslations().size()); assertNotNull(response.getTranslations().get(0).getText()); } diff --git a/sdk/translation/azure-ai-translation-text/tsp-location.yaml b/sdk/translation/azure-ai-translation-text/tsp-location.yaml index ce9ae8318b49..3f1727870ec7 100644 --- a/sdk/translation/azure-ai-translation-text/tsp-location.yaml +++ b/sdk/translation/azure-ai-translation-text/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/translation/data-plane/TextTranslation -commit: 6267b64842af3d744c5b092a3f3beef49729ad6d +commit: 90d45385f572aaf6354fa8b18b0125e7b99d6785 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/translation/test-resources.json b/sdk/translation/test-resources.json index 09527df9c73a..c9896504ddac 100644 --- a/sdk/translation/test-resources.json +++ b/sdk/translation/test-resources.json @@ -82,7 +82,7 @@ }, "kind": "TextTranslation", "identity": { - "type": "SystemAssigned" + "type": "SystemAssigned" }, "properties": { "customSubDomainName": "[variables('uniqueSubDomainName')]" @@ -99,7 +99,7 @@ }, { "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "2022-05-01", + "apiVersion": "2019-04-01", "name": "[variables('storageAccountName')]", "location": "[parameters('location')]", "sku": { @@ -112,8 +112,7 @@ "supportsHttpsTrafficOnly": true, "allowSharedKeyAccess": false, "encryption": "[variables('encryption')]", - "accessTier": "Hot", - "minimumTlsVersion": "TLS1_2" + "accessTier": "Hot" } }, { @@ -133,50 +132,97 @@ }, { "type": "Microsoft.CognitiveServices/accounts", - "apiVersion": "2017-04-18", + "apiVersion": "2023-05-01", "name": "[variables('txtUniqueSubDomainName')]", "location": "[parameters('location')]", "sku": { - "name": "S1" + "name": "S0" + }, + "kind": "AIServices", + "identity": { + "type": "SystemAssigned" }, - "kind": "TextTranslation", "properties": { - "customSubDomainName": "[variables('txtUniqueSubDomainName')]" - } + "customSubDomainName": "[variables('txtUniqueSubDomainName')]", + "publicNetworkAccess": "Enabled" + }, + "resources": [ + { + "type": "deployments", + "apiVersion": "2023-05-01", + "name": "gpt-4o-mini", + "dependsOn": [ + "[resourceId('Microsoft.CognitiveServices/accounts', variables('txtUniqueSubDomainName'))]" + ], + "sku": { + "name": "Standard", + "capacity": 10 + }, + "properties": { + "model": { + "format": "OpenAI", + "name": "gpt-4o-mini", + "version": "2024-07-18" + }, + "versionUpgradeOption": "OnceNewDefaultVersionAvailable" + } + } + ] + }, + { + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "2018-09-01-preview", + "name": "[guid(concat('foundryUserRoleId', resourceGroup().id))]", + "properties": { + "roleDefinitionId": "[variables('roleDefinitionId')]", + "principalId": "[reference(resourceId('Microsoft.CognitiveServices/accounts', variables('txtUniqueSubDomainName')), '2023-05-01', 'full').identity.principalId]", + "principalType": "ServicePrincipal" + }, + "dependsOn": [ + "[resourceId('Microsoft.CognitiveServices/accounts', variables('txtUniqueSubDomainName'))]" + ] } ], "outputs": { - "DOCUMENT_TRANSLATION_API_KEY": { + "TEXT_TRANSLATION_ENDPOINT": { "type": "string", - "value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('uniqueSubDomainName')), '2017-04-18').key1]" + "value": "[variables('txtEndpointValue')]" }, - "DOCUMENT_TRANSLATION_ENDPOINT": { + "TEXT_TRANSLATION_API_KEY": { "type": "string", - "value": "[variables('endpointValue')]" + "value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('txtUniqueSubDomainName')), '2023-05-01').key1]" }, - "DOCUMENT_TRANSLATION_STORAGE_NAME": { + "TEXT_TRANSLATION_CUSTOM_ENDPOINT": { "type": "string", - "value": "[variables('storageAccountName')]" + "value": "[variables('txtCustomEndpointValue')]" }, - "TEXT_TRANSLATION_API_KEY": { + "TEXT_TRANSLATION_REGION": { "type": "string", - "value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('txtUniqueSubDomainName')), '2017-04-18').key1]" + "value": "[variables('txtRegionValue')]" }, - "TEXT_TRANSLATION_ENDPOINT": { + "DOCUMENT_TRANSLATION_ENDPOINT": { "type": "string", - "value": "[variables('txtEndpointValue')]" + "value": "[variables('endpointValue')]" }, - "TEXT_TRANSLATION_CUSTOM_ENDPOINT": { + "DOCUMENT_TRANSLATION_API_KEY": { "type": "string", - "value": "[variables('txtCustomEndpointValue')]" + "value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('uniqueSubDomainName')), '2017-04-18').key1]" }, - "TEXT_TRANSLATION_REGION": { + "DOCUMENT_TRANSLATION_STORAGE_NAME": { "type": "string", - "value": "[variables('txtRegionValue')]" + "value": "[variables('storageAccountName')]" }, "TEXT_TRANSLATION_TOKEN_URL": { "type": "string", "value": "[variables('tokenURLValue')]" + }, + "TEXT_TRANSLATION_AAD_REGION": { + "type": "string", + "value": "[variables('txtRegionValue')]" + }, + "TEXT_TRANSLATION_AAD_RESOURCE_ID": { + "type": "string", + "value": "[resourceId('Microsoft.CognitiveServices/accounts', variables('txtUniqueSubDomainName'))]" } } } From fc8b7ca6f5830fec422330256e49027b39ecd6d2 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Tue, 16 Dec 2025 13:29:46 +0800 Subject: [PATCH 165/186] Fix scripts --- .../compatibility_update_supported_version_matrix_json.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/spring/scripts/compatibility_update_supported_version_matrix_json.py b/sdk/spring/scripts/compatibility_update_supported_version_matrix_json.py index 10db8da158c5..5cd577479ff0 100644 --- a/sdk/spring/scripts/compatibility_update_supported_version_matrix_json.py +++ b/sdk/spring/scripts/compatibility_update_supported_version_matrix_json.py @@ -15,7 +15,7 @@ import argparse from compatibility_get_spring_cloud_version import get_spring_cloud_version -from _constants import SPRING_BOOT_MAJOR_2_VERSION_NAME, SPRING_BOOT_MAJOR_3_VERSION_NAME +from _constants import SPRING_BOOT_MAJOR_2_VERSION_NAME, SPRING_BOOT_MAJOR_3_VERSION_NAME, SPRING_BOOT_MAJOR_4_VERSION_NAME def get_args(): @@ -26,9 +26,9 @@ def get_args(): '-sbmvn', '--spring-boot-major-version-number', type=str, - choices=[SPRING_BOOT_MAJOR_2_VERSION_NAME, SPRING_BOOT_MAJOR_3_VERSION_NAME], - default=SPRING_BOOT_MAJOR_3_VERSION_NAME, - help='Which major version of Spring Boot to use. The default is ' + SPRING_BOOT_MAJOR_3_VERSION_NAME + '.' + choices=[SPRING_BOOT_MAJOR_2_VERSION_NAME, SPRING_BOOT_MAJOR_3_VERSION_NAME, SPRING_BOOT_MAJOR_4_VERSION_NAME], + default=SPRING_BOOT_MAJOR_4_VERSION_NAME, + help='Which major version of Spring Boot to use. The default is ' + SPRING_BOOT_MAJOR_4_VERSION_NAME + '.' ) parser.add_argument('-mcp', '--matrix-config-path', type=str, default='sdk/spring/pipeline/supported-version-matrix.json') parser.add_argument( From a573fd4cb645c892b41ce9654891b29e6d1ca423 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Wed, 17 Dec 2025 10:58:24 +0800 Subject: [PATCH 166/186] Fix JMS IT --- .../tests/servicebus/jms/ServiceBusJmsConnectionStringIT.java | 4 ++-- .../application-servicebus-jms-passwordless-caching.yml | 3 +++ .../application-servicebus-jms-passwordless-pool.yml | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sdk/spring/spring-cloud-azure-integration-tests/src/test/java/com/azure/spring/cloud/integration/tests/servicebus/jms/ServiceBusJmsConnectionStringIT.java b/sdk/spring/spring-cloud-azure-integration-tests/src/test/java/com/azure/spring/cloud/integration/tests/servicebus/jms/ServiceBusJmsConnectionStringIT.java index bfafe08d71dc..2a97d3844206 100644 --- a/sdk/spring/spring-cloud-azure-integration-tests/src/test/java/com/azure/spring/cloud/integration/tests/servicebus/jms/ServiceBusJmsConnectionStringIT.java +++ b/sdk/spring/spring-cloud-azure-integration-tests/src/test/java/com/azure/spring/cloud/integration/tests/servicebus/jms/ServiceBusJmsConnectionStringIT.java @@ -2,11 +2,11 @@ // Licensed under the MIT License. package com.azure.spring.cloud.integration.tests.servicebus.jms; +import com.azure.servicebus.jms.ServiceBusJmsConnectionFactory; import jakarta.jms.ConnectionFactory; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Timeout; -import org.messaginghub.pooled.jms.JmsPoolConnectionFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -36,7 +36,7 @@ public ServiceBusJmsConnectionStringIT() { @Test @Timeout(70) void testJmsOperationViaConnStringAndCachingConnection() throws InterruptedException { - Assertions.assertSame(JmsPoolConnectionFactory.class, connectionFactory.getClass()); + Assertions.assertSame(ServiceBusJmsConnectionFactory.class, connectionFactory.getClass()); LOGGER.info("ServiceBusJmsConnectionStringIT begin."); this.exchangeMessage(jmsTemplate, CONNECTION_STRING_POOL_API_QUEUE_NAME); LOGGER.info("ServiceBusJmsConnectionStringIT end."); diff --git a/sdk/spring/spring-cloud-azure-integration-tests/src/test/resources/application-servicebus-jms-passwordless-caching.yml b/sdk/spring/spring-cloud-azure-integration-tests/src/test/resources/application-servicebus-jms-passwordless-caching.yml index 8e63cf1e26b8..2b8ca5c54cf1 100644 --- a/sdk/spring/spring-cloud-azure-integration-tests/src/test/resources/application-servicebus-jms-passwordless-caching.yml +++ b/sdk/spring/spring-cloud-azure-integration-tests/src/test/resources/application-servicebus-jms-passwordless-caching.yml @@ -4,6 +4,9 @@ spring: credential: token-credential-bean-name: integrationTestTokenCredential jms: + cache: + enabled: + true servicebus: pool: enabled: false diff --git a/sdk/spring/spring-cloud-azure-integration-tests/src/test/resources/application-servicebus-jms-passwordless-pool.yml b/sdk/spring/spring-cloud-azure-integration-tests/src/test/resources/application-servicebus-jms-passwordless-pool.yml index 4154ed97a9a5..70fbf7b20195 100644 --- a/sdk/spring/spring-cloud-azure-integration-tests/src/test/resources/application-servicebus-jms-passwordless-pool.yml +++ b/sdk/spring/spring-cloud-azure-integration-tests/src/test/resources/application-servicebus-jms-passwordless-pool.yml @@ -9,3 +9,5 @@ spring: pricing-tier: standard passwordless-enabled: true namespace: ${AZURE_SERVICE_BUS_NAMESPACE} + pool: + enabled: true From 23ca1160274c15c0ed3ca40a0a7167bf1f001390 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 16 Dec 2025 21:58:06 -0800 Subject: [PATCH 167/186] [Automation] Generate SDK based on TypeSpec 0.37.3 (#47551) --- eng/emitter-package-lock.json | 745 +-- eng/emitter-package.json | 24 +- .../tsp-location.yaml | 2 +- .../models/NamespaceMigrateResponseInner.java | 79 - .../NamespaceMigrateResponseImpl.java | 40 - .../deviceregistry/models/Error.java | 109 - .../deviceregistry/models/MigrateResult.java | 108 - .../models/MigrateResultType.java | 51 - .../models/NamespaceMigrateResponse.java | 27 - ...ger-deviceregistry_apiview_properties.json | 4 - ...sourcemanager-deviceregistry_metadata.json | 2 +- .../tsp-location.yaml | 2 +- ...perties.java => AadProfileProperties.java} | 22 +- .../models/IngressProfileProperties.java | 6 +- ...hybridconnectivity_apiview_properties.json | 2 +- ...cemanager-hybridconnectivity_metadata.json | 2 +- ...ts.java => AadProfilePropertiesTests.java} | 8 +- .../tsp-location.yaml | 2 +- .../SAMPLE.md | 5143 ++++++++++++++--- .../tsp-location.yaml | 2 +- 20 files changed, 4682 insertions(+), 1698 deletions(-) delete mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/NamespaceMigrateResponseInner.java delete mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceMigrateResponseImpl.java delete mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/Error.java delete mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/MigrateResult.java delete mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/MigrateResultType.java delete mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceMigrateResponse.java rename sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/{AADProfileProperties.java => AadProfileProperties.java} (76%) rename sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/{AADProfilePropertiesTests.java => AadProfilePropertiesTests.java} (77%) diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index 7de7856193fe..947829669c3d 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,21 +5,21 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-java": "0.37.2" + "@azure-tools/typespec-java": "0.37.3" }, "devDependencies": { - "@azure-tools/typespec-autorest": "0.62.0", - "@azure-tools/typespec-azure-core": "0.62.0", - "@azure-tools/typespec-azure-resource-manager": "0.62.1", - "@azure-tools/typespec-azure-rulesets": "0.62.0", - "@azure-tools/typespec-client-generator-core": "0.62.0", + "@azure-tools/typespec-autorest": "0.63.0", + "@azure-tools/typespec-azure-core": "0.63.0", + "@azure-tools/typespec-azure-resource-manager": "0.63.0", + "@azure-tools/typespec-azure-rulesets": "0.63.0", + "@azure-tools/typespec-client-generator-core": "0.63.0", "@azure-tools/typespec-liftr-base": "0.11.0", - "@typespec/compiler": "1.6.0", - "@typespec/http": "1.6.0", - "@typespec/openapi": "1.6.0", - "@typespec/rest": "0.76.0", - "@typespec/versioning": "0.76.0", - "@typespec/xml": "0.76.0" + "@typespec/compiler": "1.7.0", + "@typespec/http": "1.7.0", + "@typespec/openapi": "1.7.0", + "@typespec/rest": "0.77.0", + "@typespec/versioning": "0.77.0", + "@typespec/xml": "0.77.0" } }, "node_modules/@autorest/codemodel": { @@ -72,23 +72,23 @@ } }, "node_modules/@azure-tools/typespec-autorest": { - "version": "0.62.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.62.0.tgz", - "integrity": "sha512-XftwipfGGMk9e3qGzbRMBvVpfIqLMJKc8H+XlPHFymnCfexBniZn4Qu2t8nzOVM9fgOoFDjNDzk8W5lf59U5Dg==", + "version": "0.63.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.63.0.tgz", + "integrity": "sha512-E04eX5axqua+bVs8QH1z74Wrq+XjO6tInq6d6EhjBNQAcRyFCJNxJHqcJkzMWNy1ID/iIGNXyRG/elK2AdegZg==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.62.0", - "@azure-tools/typespec-azure-resource-manager": "^0.62.0", - "@azure-tools/typespec-client-generator-core": "^0.62.0", - "@typespec/compiler": "^1.6.0", - "@typespec/http": "^1.6.0", - "@typespec/openapi": "^1.6.0", - "@typespec/rest": "^0.76.0", - "@typespec/versioning": "^0.76.0", - "@typespec/xml": "^0.76.0" + "@azure-tools/typespec-azure-core": "^0.63.0", + "@azure-tools/typespec-azure-resource-manager": "^0.63.0", + "@azure-tools/typespec-client-generator-core": "^0.63.0", + "@typespec/compiler": "^1.7.0", + "@typespec/http": "^1.7.0", + "@typespec/openapi": "^1.7.0", + "@typespec/rest": "^0.77.0", + "@typespec/versioning": "^0.77.0", + "@typespec/xml": "^0.77.0" }, "peerDependenciesMeta": { "@typespec/xml": { @@ -97,23 +97,23 @@ } }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.62.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.62.0.tgz", - "integrity": "sha512-4LIFqNHhKO1/jiCH0U2rfI+yH7vkWcFuwpjNyRTWXw/YghAI2d+aIEwtT4oM8jWeYR3KUQfA6AqGPRCm90AXYA==", + "version": "0.63.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.63.0.tgz", + "integrity": "sha512-FbEmpZSQENzBt/Y8qSF1b98T8CqT3bV7IRV8AGGm/73NQZiWQCm2LvQzR0/lbqGntS2EnSBrt394Kt69wM4ifA==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.6.0", - "@typespec/http": "^1.6.0", - "@typespec/rest": "^0.76.0" + "@typespec/compiler": "^1.7.0", + "@typespec/http": "^1.7.0", + "@typespec/rest": "^0.77.0" } }, "node_modules/@azure-tools/typespec-azure-resource-manager": { - "version": "0.62.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.62.1.tgz", - "integrity": "sha512-sbCwg5Auvm2/fYUWbx3RlQyZGlMoAmhtRjrurgwWzZIBxBJ7sVqgUQktl3WGHAoeJ3qYa2gAIL4j8/xSPwt5kw==", + "version": "0.63.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.63.0.tgz", + "integrity": "sha512-QXHryXgV9Rh7lBW9hrehjdGVM/W8eBN6wnfRRZtAAyfTc1AkRGDKOMFBtRtfbEkQpur16mgQTd7EyH2tpqfuSw==", "license": "MIT", "dependencies": { "change-case": "~5.4.4", @@ -123,33 +123,33 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.62.0", - "@typespec/compiler": "^1.6.0", - "@typespec/http": "^1.6.0", - "@typespec/openapi": "^1.6.0", - "@typespec/rest": "^0.76.0", - "@typespec/versioning": "^0.76.0" + "@azure-tools/typespec-azure-core": "^0.63.0", + "@typespec/compiler": "^1.7.0", + "@typespec/http": "^1.7.0", + "@typespec/openapi": "^1.7.0", + "@typespec/rest": "^0.77.0", + "@typespec/versioning": "^0.77.0" } }, "node_modules/@azure-tools/typespec-azure-rulesets": { - "version": "0.62.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.62.0.tgz", - "integrity": "sha512-jEsR9ogSYkYxcOc5biEKbwbYS77ffD8avjT8Sbf5r+8VMPZj46uK3V0FaySbtPh+EEgoBrVj2jcbGGKDFrse1A==", + "version": "0.63.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.63.0.tgz", + "integrity": "sha512-oZSderD/MVnPH+W8hh3rsta1uF9xVLp9b2jjyhiHL9lqYGnHUYk8sDti5PUk/LXIz8QAsBMSbXJMDgxTeND8Kg==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.62.0", - "@azure-tools/typespec-azure-resource-manager": "^0.62.0", - "@azure-tools/typespec-client-generator-core": "^0.62.0", - "@typespec/compiler": "^1.6.0" + "@azure-tools/typespec-azure-core": "^0.63.0", + "@azure-tools/typespec-azure-resource-manager": "^0.63.0", + "@azure-tools/typespec-client-generator-core": "^0.63.0", + "@typespec/compiler": "^1.7.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.62.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.62.0.tgz", - "integrity": "sha512-fZilNfvqIW6Jzb97SuM5f+i9p5b0261InQRbQcTbeuYGtb5z5M0v8tuGglE4adU8NqQ1OmEv/oRjQjSeSjlxwA==", + "version": "0.63.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.63.0.tgz", + "integrity": "sha512-zpvFvjCjNW+GWzHBV7vJ2E1PKXrmyNqp7FQiYo/D7PJBVTXNtOyIKqqo043ktAaWihbr8cl5QguuNSoBAKL0+Q==", "license": "MIT", "dependencies": { "change-case": "~5.4.4", @@ -160,22 +160,22 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.62.0", - "@typespec/compiler": "^1.6.0", - "@typespec/events": "^0.76.0", - "@typespec/http": "^1.6.0", - "@typespec/openapi": "^1.6.0", - "@typespec/rest": "^0.76.0", - "@typespec/sse": "^0.76.0", - "@typespec/streams": "^0.76.0", - "@typespec/versioning": "^0.76.0", - "@typespec/xml": "^0.76.0" + "@azure-tools/typespec-azure-core": "^0.63.0", + "@typespec/compiler": "^1.7.0", + "@typespec/events": "^0.77.0", + "@typespec/http": "^1.7.0", + "@typespec/openapi": "^1.7.0", + "@typespec/rest": "^0.77.0", + "@typespec/sse": "^0.77.0", + "@typespec/streams": "^0.77.0", + "@typespec/versioning": "^0.77.0", + "@typespec/xml": "^0.77.0" } }, "node_modules/@azure-tools/typespec-java": { - "version": "0.37.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-java/-/typespec-java-0.37.2.tgz", - "integrity": "sha512-JIMD4ZLdX5fZPxUtEDtxLyyKewXhZlJZQFgov/ce2WOaTz2RSTnDh5o9S3U+Xvpk98Wl1PPHWQASlOhjECkv/g==", + "version": "0.37.3", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-java/-/typespec-java-0.37.3.tgz", + "integrity": "sha512-YWnf3kQL0qm+5ajGp2fXyv1mG26l63A8QQfm25wklgyRnLACbCdNqSyneOUsbcvIAh7D5/l1Q/Vg6kABZDTBiQ==", "license": "MIT", "dependencies": { "@autorest/codemodel": "~4.20.1", @@ -186,18 +186,18 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-autorest": ">=0.62.0 <1.0.0", - "@azure-tools/typespec-azure-core": ">=0.62.0 <1.0.0", - "@azure-tools/typespec-azure-resource-manager": ">=0.62.1 <1.0.0", - "@azure-tools/typespec-azure-rulesets": ">=0.62.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.62.0 <1.0.0", + "@azure-tools/typespec-autorest": ">=0.63.0 <1.0.0", + "@azure-tools/typespec-azure-core": ">=0.63.0 <1.0.0", + "@azure-tools/typespec-azure-resource-manager": ">=0.63.0 <1.0.0", + "@azure-tools/typespec-azure-rulesets": ">=0.63.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.63.0 <1.0.0", "@azure-tools/typespec-liftr-base": ">=0.11.0 <1.0.0", - "@typespec/compiler": "^1.6.0", - "@typespec/http": "^1.6.0", - "@typespec/openapi": "^1.6.0", - "@typespec/rest": ">=0.76.0 <1.0.0", - "@typespec/versioning": ">=0.76.0 <1.0.0", - "@typespec/xml": ">=0.76.0 <1.0.0" + "@typespec/compiler": "^1.7.0", + "@typespec/http": "^1.7.0", + "@typespec/openapi": "^1.7.0", + "@typespec/rest": ">=0.77.0 <1.0.0", + "@typespec/versioning": ">=0.77.0 <1.0.0", + "@typespec/xml": ">=0.77.0 <1.0.0" } }, "node_modules/@azure-tools/typespec-liftr-base": { @@ -229,28 +229,27 @@ } }, "node_modules/@inquirer/ansi": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-1.0.2.tgz", - "integrity": "sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-2.0.2.tgz", + "integrity": "sha512-SYLX05PwJVnW+WVegZt1T4Ip1qba1ik+pNJPDiqvk6zS5Y/i8PhRzLpGEtVd7sW0G8cMtkD8t4AZYhQwm8vnww==", "license": "MIT", "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" } }, "node_modules/@inquirer/checkbox": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.3.2.tgz", - "integrity": "sha512-VXukHf0RR1doGe6Sm4F0Em7SWYLTHSsbGfJdS9Ja2bX5/D5uwVOEjr07cncLROdBvmnvCATYEWlHqYmXv2IlQA==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-5.0.2.tgz", + "integrity": "sha512-iTPV4tMMct7iOpwer5qmTP7gjnk1VQJjsNfAaC2b8Q3qiuHM3K2yjjDr5u1MKfkrvp2JD4Flf8sIPpF21pmZmw==", "license": "MIT", "dependencies": { - "@inquirer/ansi": "^1.0.2", - "@inquirer/core": "^10.3.2", - "@inquirer/figures": "^1.0.15", - "@inquirer/type": "^3.0.10", - "yoctocolors-cjs": "^2.1.3" + "@inquirer/ansi": "^2.0.2", + "@inquirer/core": "^11.0.2", + "@inquirer/figures": "^2.0.2", + "@inquirer/type": "^4.0.2" }, "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { "@types/node": ">=18" @@ -262,16 +261,16 @@ } }, "node_modules/@inquirer/confirm": { - "version": "5.1.21", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.21.tgz", - "integrity": "sha512-KR8edRkIsUayMXV+o3Gv+q4jlhENF9nMYUZs9PA2HzrXeHI8M5uDag70U7RJn9yyiMZSbtF5/UexBtAVtZGSbQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-6.0.2.tgz", + "integrity": "sha512-A0/13Wyi+8iFeNDX6D4zZYKPoBLIEbE4K/219qHcnpXMer2weWvaTo63+2c7mQPPA206DEMSYVOPnEw3meOlCw==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.3.2", - "@inquirer/type": "^3.0.10" + "@inquirer/core": "^11.0.2", + "@inquirer/type": "^4.0.2" }, "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { "@types/node": ">=18" @@ -283,22 +282,21 @@ } }, "node_modules/@inquirer/core": { - "version": "10.3.2", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.3.2.tgz", - "integrity": "sha512-43RTuEbfP8MbKzedNqBrlhhNKVwoK//vUFNW3Q3vZ88BLcrs4kYpGg+B2mm5p2K/HfygoCxuKwJJiv8PbGmE0A==", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-11.0.2.tgz", + "integrity": "sha512-lgMRx/n02ciiNELBvFLHtmcjbV5tf5D/I0UYfCg2YbTZWmBZ10/niLd3IjWBxz8LtM27xP+4oLEa06Slmb7p7A==", "license": "MIT", "dependencies": { - "@inquirer/ansi": "^1.0.2", - "@inquirer/figures": "^1.0.15", - "@inquirer/type": "^3.0.10", + "@inquirer/ansi": "^2.0.2", + "@inquirer/figures": "^2.0.2", + "@inquirer/type": "^4.0.2", "cli-width": "^4.1.0", - "mute-stream": "^2.0.0", + "mute-stream": "^3.0.0", "signal-exit": "^4.1.0", - "wrap-ansi": "^6.2.0", - "yoctocolors-cjs": "^2.1.3" + "wrap-ansi": "^9.0.2" }, "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { "@types/node": ">=18" @@ -310,17 +308,17 @@ } }, "node_modules/@inquirer/editor": { - "version": "4.2.23", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.23.tgz", - "integrity": "sha512-aLSROkEwirotxZ1pBaP8tugXRFCxW94gwrQLxXfrZsKkfjOYC1aRvAZuhpJOb5cu4IBTJdsCigUlf2iCOu4ZDQ==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-5.0.2.tgz", + "integrity": "sha512-pXQ4Nf0qmFcJuYB6NlcIIxH6l6zKOwNg1Jh/ZRdKd2dTqBB4OXKUFbFwR2K4LVXVtq15ZFFatBVT+rerYR8hWQ==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.3.2", - "@inquirer/external-editor": "^1.0.3", - "@inquirer/type": "^3.0.10" + "@inquirer/core": "^11.0.2", + "@inquirer/external-editor": "^2.0.2", + "@inquirer/type": "^4.0.2" }, "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { "@types/node": ">=18" @@ -332,17 +330,16 @@ } }, "node_modules/@inquirer/expand": { - "version": "4.0.23", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.23.tgz", - "integrity": "sha512-nRzdOyFYnpeYTTR2qFwEVmIWypzdAx/sIkCMeTNTcflFOovfqUk+HcFhQQVBftAh9gmGrpFj6QcGEqrDMDOiew==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-5.0.2.tgz", + "integrity": "sha512-siFG1swxfjFIOxIcehtZkh+KUNB/YCpyfHNEGu+nC/SBXIbgUWibvThLn/WesSxLRGOeSKdNKoTm+GQCKFm6Ww==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.3.2", - "@inquirer/type": "^3.0.10", - "yoctocolors-cjs": "^2.1.3" + "@inquirer/core": "^11.0.2", + "@inquirer/type": "^4.0.2" }, "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { "@types/node": ">=18" @@ -354,16 +351,16 @@ } }, "node_modules/@inquirer/external-editor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.3.tgz", - "integrity": "sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-2.0.2.tgz", + "integrity": "sha512-X/fMXK7vXomRWEex1j8mnj7s1mpnTeP4CO/h2gysJhHLT2WjBnLv4ZQEGpm/kcYI8QfLZ2fgW+9kTKD+jeopLg==", "license": "MIT", "dependencies": { "chardet": "^2.1.1", "iconv-lite": "^0.7.0" }, "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { "@types/node": ">=18" @@ -375,25 +372,25 @@ } }, "node_modules/@inquirer/figures": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.15.tgz", - "integrity": "sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-2.0.2.tgz", + "integrity": "sha512-qXm6EVvQx/FmnSrCWCIGtMHwqeLgxABP8XgcaAoywsL0NFga9gD5kfG0gXiv80GjK9Hsoz4pgGwF/+CjygyV9A==", "license": "MIT", "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" } }, "node_modules/@inquirer/input": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.3.1.tgz", - "integrity": "sha512-kN0pAM4yPrLjJ1XJBjDxyfDduXOuQHrBB8aLDMueuwUGn+vNpF7Gq7TvyVxx8u4SHlFFj4trmj+a2cbpG4Jn1g==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-5.0.2.tgz", + "integrity": "sha512-hN2YRo1QiEc9lD3mK+CPnTS4TK2RhCMmMmP4nCWwTkmQL2vx9jPJWYk+rbUZpwR1D583ZJk1FI3i9JZXIpi/qg==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.3.2", - "@inquirer/type": "^3.0.10" + "@inquirer/core": "^11.0.2", + "@inquirer/type": "^4.0.2" }, "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { "@types/node": ">=18" @@ -405,16 +402,16 @@ } }, "node_modules/@inquirer/number": { - "version": "3.0.23", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.23.tgz", - "integrity": "sha512-5Smv0OK7K0KUzUfYUXDXQc9jrf8OHo4ktlEayFlelCjwMXz0299Y8OrI+lj7i4gCBY15UObk76q0QtxjzFcFcg==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-4.0.2.tgz", + "integrity": "sha512-4McnjTSYrlthNW1ojkkmP75WLRYhQs7GXm6pDDoIrHqJuV5uUYwfdbB0geHdaKMarAqJQgoOVjzIT0jdWCsKew==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.3.2", - "@inquirer/type": "^3.0.10" + "@inquirer/core": "^11.0.2", + "@inquirer/type": "^4.0.2" }, "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { "@types/node": ">=18" @@ -426,17 +423,17 @@ } }, "node_modules/@inquirer/password": { - "version": "4.0.23", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.23.tgz", - "integrity": "sha512-zREJHjhT5vJBMZX/IUbyI9zVtVfOLiTO66MrF/3GFZYZ7T4YILW5MSkEYHceSii/KtRk+4i3RE7E1CUXA2jHcA==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-5.0.2.tgz", + "integrity": "sha512-oSDziMKiw4G2e4zS+0JRfxuPFFGh6N/9yUaluMgEHp2/Yyj2JGwfDO7XbwtOrxVrz+XsP/iaGyWXdQb9d8A0+g==", "license": "MIT", "dependencies": { - "@inquirer/ansi": "^1.0.2", - "@inquirer/core": "^10.3.2", - "@inquirer/type": "^3.0.10" + "@inquirer/ansi": "^2.0.2", + "@inquirer/core": "^11.0.2", + "@inquirer/type": "^4.0.2" }, "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { "@types/node": ">=18" @@ -448,24 +445,24 @@ } }, "node_modules/@inquirer/prompts": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.10.1.tgz", - "integrity": "sha512-Dx/y9bCQcXLI5ooQ5KyvA4FTgeo2jYj/7plWfV5Ak5wDPKQZgudKez2ixyfz7tKXzcJciTxqLeK7R9HItwiByg==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-8.0.2.tgz", + "integrity": "sha512-2zK5zY48fZcl6+gG4eqOC/UzZsJckHCRvjXoLuW4D8LKOCVGdcJiSKkLnumSZjR/6PXPINDGOrGHqNxb+sxJDg==", "license": "MIT", "dependencies": { - "@inquirer/checkbox": "^4.3.2", - "@inquirer/confirm": "^5.1.21", - "@inquirer/editor": "^4.2.23", - "@inquirer/expand": "^4.0.23", - "@inquirer/input": "^4.3.1", - "@inquirer/number": "^3.0.23", - "@inquirer/password": "^4.0.23", - "@inquirer/rawlist": "^4.1.11", - "@inquirer/search": "^3.2.2", - "@inquirer/select": "^4.4.2" + "@inquirer/checkbox": "^5.0.2", + "@inquirer/confirm": "^6.0.2", + "@inquirer/editor": "^5.0.2", + "@inquirer/expand": "^5.0.2", + "@inquirer/input": "^5.0.2", + "@inquirer/number": "^4.0.2", + "@inquirer/password": "^5.0.2", + "@inquirer/rawlist": "^5.0.2", + "@inquirer/search": "^4.0.2", + "@inquirer/select": "^5.0.2" }, "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { "@types/node": ">=18" @@ -477,17 +474,16 @@ } }, "node_modules/@inquirer/rawlist": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.11.tgz", - "integrity": "sha512-+LLQB8XGr3I5LZN/GuAHo+GpDJegQwuPARLChlMICNdwW7OwV2izlCSCxN6cqpL0sMXmbKbFcItJgdQq5EBXTw==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-5.0.2.tgz", + "integrity": "sha512-AcNALEdQKUQDeJcpC1a3YC53m1MLv+sMUS+vRZ8Qigs1Yg3Dcdtmi82rscJplogKOY8CXkKW4wvVwHS2ZjCIBQ==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.3.2", - "@inquirer/type": "^3.0.10", - "yoctocolors-cjs": "^2.1.3" + "@inquirer/core": "^11.0.2", + "@inquirer/type": "^4.0.2" }, "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { "@types/node": ">=18" @@ -499,18 +495,17 @@ } }, "node_modules/@inquirer/search": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.2.2.tgz", - "integrity": "sha512-p2bvRfENXCZdWF/U2BXvnSI9h+tuA8iNqtUKb9UWbmLYCRQxd8WkvwWvYn+3NgYaNwdUkHytJMGG4MMLucI1kA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-4.0.2.tgz", + "integrity": "sha512-hg63w5toohdzE65S3LiGhdfIL0kT+yisbZARf7zw65PvyMUTutTN3eMAvD/B6y/25z88vTrB7kSB45Vz5CbrXg==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.3.2", - "@inquirer/figures": "^1.0.15", - "@inquirer/type": "^3.0.10", - "yoctocolors-cjs": "^2.1.3" + "@inquirer/core": "^11.0.2", + "@inquirer/figures": "^2.0.2", + "@inquirer/type": "^4.0.2" }, "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { "@types/node": ">=18" @@ -522,19 +517,18 @@ } }, "node_modules/@inquirer/select": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.4.2.tgz", - "integrity": "sha512-l4xMuJo55MAe+N7Qr4rX90vypFwCajSakx59qe/tMaC1aEHWLyw68wF4o0A4SLAY4E0nd+Vt+EyskeDIqu1M6w==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-5.0.2.tgz", + "integrity": "sha512-JygTohvQxSNnvt7IKANVlg/eds+yN5sLRilYeGc4ri/9Aqi/2QPoXBMV5Cz/L1VtQv63SnTbPXJZeCK2pSwsOA==", "license": "MIT", "dependencies": { - "@inquirer/ansi": "^1.0.2", - "@inquirer/core": "^10.3.2", - "@inquirer/figures": "^1.0.15", - "@inquirer/type": "^3.0.10", - "yoctocolors-cjs": "^2.1.3" + "@inquirer/ansi": "^2.0.2", + "@inquirer/core": "^11.0.2", + "@inquirer/figures": "^2.0.2", + "@inquirer/type": "^4.0.2" }, "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { "@types/node": ">=18" @@ -546,12 +540,12 @@ } }, "node_modules/@inquirer/type": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.10.tgz", - "integrity": "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-4.0.2.tgz", + "integrity": "sha512-cae7mzluplsjSdgFA6ACLygb5jC8alO0UUnFPyu0E7tNRPrL+q/f8VcSXp+cjZQ7l5CMpDpi2G1+IQvkOiL1Lw==", "license": "MIT", "engines": { - "node": ">=18" + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" }, "peerDependencies": { "@types/node": ">=18" @@ -622,17 +616,17 @@ } }, "node_modules/@typespec/compiler": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.6.0.tgz", - "integrity": "sha512-yxyV+ch8tnqiuU2gClv/mQEESoFwpkjo6177UkYfV0nVA9PzTg4zVVc7+WIMZk04wiLRRT3H1uc11FB1cwLY3g==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.7.0.tgz", + "integrity": "sha512-KE2t5I7u/33M/nsIxdng06FUPrqaGSbMsSEsv51eMwYnj3v1+Z3qTTX/dxHAXRXHcfadNlX/NtyAKju+pkMTFQ==", "license": "MIT", "dependencies": { "@babel/code-frame": "~7.27.1", - "@inquirer/prompts": "^7.4.0", + "@inquirer/prompts": "^8.0.1", "ajv": "~8.17.1", "change-case": "~5.4.4", "env-paths": "^3.0.0", - "globby": "~15.0.0", + "globby": "~16.0.0", "is-unicode-supported": "^2.1.0", "mustache": "~4.2.0", "picocolors": "~1.1.1", @@ -654,29 +648,29 @@ } }, "node_modules/@typespec/events": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.76.0.tgz", - "integrity": "sha512-mdjYQ5HA3Y4ZeyAEmiIDdRa9hbc/5qey5hU9UCA0gL+YWVYgoqLPbZQQTwqq3smM35+5cWp9GTGPyNHcOoRwOA==", + "version": "0.77.0", + "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.77.0.tgz", + "integrity": "sha512-NbOzi7axEt/xGgXaLjcGGV2HjQKNFjbvsQpCeDA6loUghZDK5+5ik/jwMumeUDunoBsAKF78ZxVF5qhQh56dGA==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.6.0" + "@typespec/compiler": "^1.7.0" } }, "node_modules/@typespec/http": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.6.0.tgz", - "integrity": "sha512-q/JwVw21CF4buE3ZS+xSoy2TKAOwyhZ7g3kdNqCgm69BI5p5GGu+3ZlUA+4Blk8hkt0G8XcIN8fhJP+a4O6KAw==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.7.0.tgz", + "integrity": "sha512-4cGkcMiob3bedWbFkRcq614TDH7WPEI3YMgrg44mBarj903arpEniAESIhNUbLQzQFFc5rOJagexQDl4agVDyA==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.6.0", - "@typespec/streams": "^0.76.0" + "@typespec/compiler": "^1.7.0", + "@typespec/streams": "^0.77.0" }, "peerDependenciesMeta": { "@typespec/streams": { @@ -685,82 +679,82 @@ } }, "node_modules/@typespec/openapi": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.6.0.tgz", - "integrity": "sha512-KuxYAzfP5ljM0PUhSGclNZgTG0H+kyTQcwn6cf4TKhO72R2QMQmiMtN2plqvzsfkL+TLwad1iZhMWTCAMFAQ4w==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.7.0.tgz", + "integrity": "sha512-tEAIgGnjLvOjbGAoCfkBudvpe/tXaOXkzy5nVFXs4921/jAaMTwzcJIt0bTXZpp5cExdlL7w9ZrnehARHiposQ==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.6.0", - "@typespec/http": "^1.6.0" + "@typespec/compiler": "^1.7.0", + "@typespec/http": "^1.7.0" } }, "node_modules/@typespec/rest": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.76.0.tgz", - "integrity": "sha512-6jtQWdcmuKyG9cmqWsJjaq64f6N5B/1DS4X3ZoTNgYhHA27Hnsxo1HZWXcpv7Wl+MxLAZM6kgpML0ugDEZcrYQ==", + "version": "0.77.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.77.0.tgz", + "integrity": "sha512-DEUMD9zYqUVUhKCGktV7Z+sFkzj+bcSpJRhEXxOrJxupWM4I3N4deMop+ulxezxlLxIRUz7ELc+6WucYXgOnAA==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.6.0", - "@typespec/http": "^1.6.0" + "@typespec/compiler": "^1.7.0", + "@typespec/http": "^1.7.0" } }, "node_modules/@typespec/sse": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.76.0.tgz", - "integrity": "sha512-mCd4oAXr0Tt990T2PDjx+6H0jmPHINyCH0XRU2HrWtGW5lG/NQVIs5oOxElc7NGg629HrolfLTw0oW8hdMD7Eg==", + "version": "0.77.0", + "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.77.0.tgz", + "integrity": "sha512-rVML/sPNj+MomKXftko/eUNM5OhHlIevoit3Dbtaf1aWS5pcJ5jKX05Prz53VIyeUP7ra5ocmPE/iIEPb8ZbCA==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.6.0", - "@typespec/events": "^0.76.0", - "@typespec/http": "^1.6.0", - "@typespec/streams": "^0.76.0" + "@typespec/compiler": "^1.7.0", + "@typespec/events": "^0.77.0", + "@typespec/http": "^1.7.0", + "@typespec/streams": "^0.77.0" } }, "node_modules/@typespec/streams": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.76.0.tgz", - "integrity": "sha512-7gQPtsokyn0Mjr43MAik6ZkQt1PZjseU+KcBE2iGT9P6oWYYTH3K1C4LLGXHZAbgEtBvFn4S+U8HPbDhj4nEhw==", + "version": "0.77.0", + "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.77.0.tgz", + "integrity": "sha512-qqfJW4n19Jgi5FxQhsEgoIc5zD9o47AAoZxLKUX91z6aB/YWrLSTrrrIAvhNCESXuB89zlJPwlZ/j4YmpxZ/jw==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.6.0" + "@typespec/compiler": "^1.7.0" } }, "node_modules/@typespec/versioning": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.76.0.tgz", - "integrity": "sha512-dguO/B+mwlCyenWGG+M+16cMQuGHSTJbU5Z0pyUou1uyWrB1px//s4pW7PKD14S+fPutJE0wTMQm+CctOq6quA==", + "version": "0.77.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.77.0.tgz", + "integrity": "sha512-eAInPZYPkxpBUS8IKQfNZ5eZsLfkWqEX0d6YM/AfooGYbxcKdHQBfYOWBvRC4NkKEMub4ROaD5GcPLYTyWQIWw==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.6.0" + "@typespec/compiler": "^1.7.0" } }, "node_modules/@typespec/xml": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.76.0.tgz", - "integrity": "sha512-+I7hdWZDO3qBfzRT3St+1Dg/NQAMNLz8w1OydutSnVMx0G3KWg/ESonaByszBUfdq6Z5iTtls3gvj4wgrw80gA==", + "version": "0.77.0", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.77.0.tgz", + "integrity": "sha512-DNVAOMaRUPGpLEsqf3sn7UAWuAE1rs8Jf1FIAU7DF/sVmzeXs4OBanxSSsVmbcdfPRHPbjPuRnW6e+QS2Sjk3Q==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.6.0" + "@typespec/compiler": "^1.7.0" } }, "node_modules/ajv": { @@ -780,24 +774,24 @@ } }, "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, "engines": { - "node": ">=8" + "node": ">=12" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" @@ -865,109 +859,12 @@ "node": ">=20" } }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/cliui/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cliui/node_modules/emoji-regex": { + "node_modules/emoji-regex": { "version": "10.6.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", "license": "MIT" }, - "node_modules/cliui/node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", - "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, "node_modules/env-paths": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz", @@ -1082,17 +979,17 @@ } }, "node_modules/globby": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-15.0.0.tgz", - "integrity": "sha512-oB4vkQGqlMl682wL1IlWd02tXCbquGWM4voPEI85QmNKCaw8zGTm1f1rubFgkg3Eli2PtKlFgrnmUqasbQWlkw==", + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-16.0.0.tgz", + "integrity": "sha512-ejy4TJFga99yW6Q0uhM3pFawKWZmtZzZD/v/GwI5+9bCV5Ew+D2pSND6W7fUes5UykqSsJkUfxFVdRh7Q1+P3Q==", "license": "MIT", "dependencies": { "@sindresorhus/merge-streams": "^4.0.0", "fast-glob": "^3.3.3", "ignore": "^7.0.5", - "path-type": "^6.0.0", + "is-path-inside": "^4.0.0", "slash": "^5.1.0", - "unicorn-magic": "^0.3.0" + "unicorn-magic": "^0.4.0" }, "engines": { "node": ">=20" @@ -1108,9 +1005,9 @@ "license": "ISC" }, "node_modules/iconv-lite": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", - "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.1.tgz", + "integrity": "sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw==", "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -1141,15 +1038,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -1171,6 +1059,18 @@ "node": ">=0.12.0" } }, + "node_modules/is-path-inside": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", + "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-unicode-supported": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", @@ -1266,24 +1166,12 @@ } }, "node_modules/mute-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", - "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-3.0.0.tgz", + "integrity": "sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw==", "license": "ISC", "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/path-type": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-6.0.0.tgz", - "integrity": "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "^20.17.0 || >=22.9.0" } }, "node_modules/picocolors": { @@ -1455,29 +1343,35 @@ } }, "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "license": "MIT", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "license": "MIT", "dependencies": { - "ansi-regex": "^5.0.1" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/tar": { @@ -1524,12 +1418,12 @@ } }, "node_modules/unicorn-magic": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", - "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.4.0.tgz", + "integrity": "sha512-wH590V9VNgYH9g3lH9wWjTrUoKsjLF6sGLjhR4sH1LWpLmCOH0Zf7PukhDA8BiS7KHe4oPNkcTHqYkj7SOGUOw==", "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -1579,17 +1473,20 @@ "license": "MIT" }, "node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", "license": "MIT", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/y18n": { @@ -1650,68 +1547,6 @@ "engines": { "node": "^20.19.0 || ^22.12.0 || >=23" } - }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", - "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", - "license": "MIT" - }, - "node_modules/yargs/node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/yoctocolors-cjs": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz", - "integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } } } } diff --git a/eng/emitter-package.json b/eng/emitter-package.json index 49dd4225f929..5acfee2a87a1 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,20 +1,20 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-java": "0.37.2" + "@azure-tools/typespec-java": "0.37.3" }, "devDependencies": { - "@azure-tools/typespec-autorest": "0.62.0", - "@azure-tools/typespec-azure-core": "0.62.0", - "@azure-tools/typespec-azure-resource-manager": "0.62.1", - "@azure-tools/typespec-azure-rulesets": "0.62.0", - "@azure-tools/typespec-client-generator-core": "0.62.0", + "@azure-tools/typespec-autorest": "0.63.0", + "@azure-tools/typespec-azure-core": "0.63.0", + "@azure-tools/typespec-azure-resource-manager": "0.63.0", + "@azure-tools/typespec-azure-rulesets": "0.63.0", + "@azure-tools/typespec-client-generator-core": "0.63.0", "@azure-tools/typespec-liftr-base": "0.11.0", - "@typespec/compiler": "1.6.0", - "@typespec/http": "1.6.0", - "@typespec/openapi": "1.6.0", - "@typespec/rest": "0.76.0", - "@typespec/versioning": "0.76.0", - "@typespec/xml": "0.76.0" + "@typespec/compiler": "1.7.0", + "@typespec/http": "1.7.0", + "@typespec/openapi": "1.7.0", + "@typespec/rest": "0.77.0", + "@typespec/versioning": "0.77.0", + "@typespec/xml": "0.77.0" } } \ No newline at end of file diff --git a/sdk/chaos/azure-resourcemanager-chaos/tsp-location.yaml b/sdk/chaos/azure-resourcemanager-chaos/tsp-location.yaml index 809fdbd43816..c9ac7f6a502d 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/tsp-location.yaml +++ b/sdk/chaos/azure-resourcemanager-chaos/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/chaos/resource-manager/Microsoft.Chaos/Chaos -commit: 05584a1019e75159b0dc70a6751afaa2c77868e6 +commit: efa49a123da7ce3ffe093a13832258305f529711 repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/NamespaceMigrateResponseInner.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/NamespaceMigrateResponseInner.java deleted file mode 100644 index 28eda51d229c..000000000000 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/NamespaceMigrateResponseInner.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.deviceregistry.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.deviceregistry.models.MigrateResult; -import java.io.IOException; -import java.util.List; - -/** - * Response for the migrate asset resources operation into Namespace resource. - */ -@Immutable -public final class NamespaceMigrateResponseInner implements JsonSerializable<NamespaceMigrateResponseInner> { - /* - * List of migrate results containing result of each asset migrate operation. - */ - private List<MigrateResult> migrateResults; - - /** - * Creates an instance of NamespaceMigrateResponseInner class. - */ - private NamespaceMigrateResponseInner() { - } - - /** - * Get the migrateResults property: List of migrate results containing result of each asset migrate operation. - * - * @return the migrateResults value. - */ - public List<MigrateResult> migrateResults() { - return this.migrateResults; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("migrateResults", this.migrateResults, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NamespaceMigrateResponseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NamespaceMigrateResponseInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NamespaceMigrateResponseInner. - */ - public static NamespaceMigrateResponseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NamespaceMigrateResponseInner deserializedNamespaceMigrateResponseInner - = new NamespaceMigrateResponseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("migrateResults".equals(fieldName)) { - List<MigrateResult> migrateResults = reader.readArray(reader1 -> MigrateResult.fromJson(reader1)); - deserializedNamespaceMigrateResponseInner.migrateResults = migrateResults; - } else { - reader.skipChildren(); - } - } - - return deserializedNamespaceMigrateResponseInner; - }); - } -} diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceMigrateResponseImpl.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceMigrateResponseImpl.java deleted file mode 100644 index 4c46146ea523..000000000000 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceMigrateResponseImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.deviceregistry.implementation; - -import com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceMigrateResponseInner; -import com.azure.resourcemanager.deviceregistry.models.MigrateResult; -import com.azure.resourcemanager.deviceregistry.models.NamespaceMigrateResponse; -import java.util.Collections; -import java.util.List; - -public final class NamespaceMigrateResponseImpl implements NamespaceMigrateResponse { - private NamespaceMigrateResponseInner innerObject; - - private final com.azure.resourcemanager.deviceregistry.DeviceRegistryManager serviceManager; - - NamespaceMigrateResponseImpl(NamespaceMigrateResponseInner innerObject, - com.azure.resourcemanager.deviceregistry.DeviceRegistryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List<MigrateResult> migrateResults() { - List<MigrateResult> inner = this.innerModel().migrateResults(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public NamespaceMigrateResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/Error.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/Error.java deleted file mode 100644 index c6a70d9127e0..000000000000 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/Error.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.deviceregistry.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Defines the error object with properties. - */ -@Immutable -public final class Error implements JsonSerializable<Error> { - /* - * Error code for classification of errors (ex: '400', '404', '500', etc.). - */ - private String code; - - /* - * Human-readable helpful error message to provide additional context for error (e.g.,: “Capability ID 'foo' does - * not exist”). - */ - private String message; - - /* - * Array of error details that describe the status of each error. - */ - private List<ErrorDetails> details; - - /** - * Creates an instance of Error class. - */ - private Error() { - } - - /** - * Get the code property: Error code for classification of errors (ex: '400', '404', '500', etc.). - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Get the message property: Human-readable helpful error message to provide additional context for error (e.g.,: - * “Capability ID 'foo' does not exist”). - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Get the details property: Array of error details that describe the status of each error. - * - * @return the details value. - */ - public List<ErrorDetails> details() { - return this.details; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Error from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Error if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Error. - */ - public static Error fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Error deserializedError = new Error(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("code".equals(fieldName)) { - deserializedError.code = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedError.message = reader.getString(); - } else if ("details".equals(fieldName)) { - List<ErrorDetails> details = reader.readArray(reader1 -> ErrorDetails.fromJson(reader1)); - deserializedError.details = details; - } else { - reader.skipChildren(); - } - } - - return deserializedError; - }); - } -} diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/MigrateResult.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/MigrateResult.java deleted file mode 100644 index 65413ba45220..000000000000 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/MigrateResult.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.deviceregistry.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Result of Migrate operation of asset resource into Namespace resource. - */ -@Immutable -public final class MigrateResult implements JsonSerializable<MigrateResult> { - /* - * The resource Id of the asset resource. - */ - private String resourceId; - - /* - * The result of the migrate operation. - */ - private MigrateResultType result; - - /* - * The error if the migrate operation is not successful. - */ - private Error error; - - /** - * Creates an instance of MigrateResult class. - */ - private MigrateResult() { - } - - /** - * Get the resourceId property: The resource Id of the asset resource. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Get the result property: The result of the migrate operation. - * - * @return the result value. - */ - public MigrateResultType result() { - return this.result; - } - - /** - * Get the error property: The error if the migrate operation is not successful. - * - * @return the error value. - */ - public Error error() { - return this.error; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceId", this.resourceId); - jsonWriter.writeStringField("result", this.result == null ? null : this.result.toString()); - jsonWriter.writeJsonField("error", this.error); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MigrateResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MigrateResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the MigrateResult. - */ - public static MigrateResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MigrateResult deserializedMigrateResult = new MigrateResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceId".equals(fieldName)) { - deserializedMigrateResult.resourceId = reader.getString(); - } else if ("result".equals(fieldName)) { - deserializedMigrateResult.result = MigrateResultType.fromString(reader.getString()); - } else if ("error".equals(fieldName)) { - deserializedMigrateResult.error = Error.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMigrateResult; - }); - } -} diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/MigrateResultType.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/MigrateResultType.java deleted file mode 100644 index f9b343352365..000000000000 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/MigrateResultType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.deviceregistry.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Result Type of Migrate Operation. - */ -public final class MigrateResultType extends ExpandableStringEnum<MigrateResultType> { - /** - * Resource Migrate operation is successful. - */ - public static final MigrateResultType SUCCEEDED = fromString("Succeeded"); - - /** - * Resource Migrate operation is not successful. - */ - public static final MigrateResultType FAILED = fromString("Failed"); - - /** - * Creates a new instance of MigrateResultType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MigrateResultType() { - } - - /** - * Creates or finds a MigrateResultType from its string representation. - * - * @param name a name to look for. - * @return the corresponding MigrateResultType. - */ - public static MigrateResultType fromString(String name) { - return fromString(name, MigrateResultType.class); - } - - /** - * Gets known MigrateResultType values. - * - * @return known MigrateResultType values. - */ - public static Collection<MigrateResultType> values() { - return values(MigrateResultType.class); - } -} diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceMigrateResponse.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceMigrateResponse.java deleted file mode 100644 index 27527ac7021a..000000000000 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceMigrateResponse.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.deviceregistry.models; - -import com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceMigrateResponseInner; -import java.util.List; - -/** - * An immutable client-side representation of NamespaceMigrateResponse. - */ -public interface NamespaceMigrateResponse { - /** - * Gets the migrateResults property: List of migrate results containing result of each asset migrate operation. - * - * @return the migrateResults value. - */ - List<MigrateResult> migrateResults(); - - /** - * Gets the inner com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceMigrateResponseInner object. - * - * @return the inner object. - */ - NamespaceMigrateResponseInner innerModel(); -} diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/resources/META-INF/azure-resourcemanager-deviceregistry_apiview_properties.json b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/resources/META-INF/azure-resourcemanager-deviceregistry_apiview_properties.json index ccd77ec33d54..380f77f732b6 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/resources/META-INF/azure-resourcemanager-deviceregistry_apiview_properties.json +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/resources/META-INF/azure-resourcemanager-deviceregistry_apiview_properties.json @@ -144,7 +144,6 @@ "com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceDiscoveredAssetInner": "Microsoft.DeviceRegistry.NamespaceDiscoveredAsset", "com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceDiscoveredDeviceInner": "Microsoft.DeviceRegistry.NamespaceDiscoveredDevice", "com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceInner": "Microsoft.DeviceRegistry.Namespace", - "com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceMigrateResponseInner": "Microsoft.DeviceRegistry.NamespaceMigrateResponse", "com.azure.resourcemanager.deviceregistry.fluent.models.OperationInner": "Azure.ResourceManager.CommonTypes.Operation", "com.azure.resourcemanager.deviceregistry.fluent.models.OperationStatusResultInner": "Azure.ResourceManager.CommonTypes.OperationStatusResult", "com.azure.resourcemanager.deviceregistry.fluent.models.PolicyInner": "Microsoft.DeviceRegistry.Policy", @@ -205,7 +204,6 @@ "com.azure.resourcemanager.deviceregistry.models.DiscoveredInboundEndpoints": "Microsoft.DeviceRegistry.DiscoveredInboundEndpoints", "com.azure.resourcemanager.deviceregistry.models.DiscoveredMessagingEndpoints": "Microsoft.DeviceRegistry.DiscoveredMessagingEndpoints", "com.azure.resourcemanager.deviceregistry.models.DiscoveredOutboundEndpoints": "Microsoft.DeviceRegistry.DiscoveredOutboundEndpoints", - "com.azure.resourcemanager.deviceregistry.models.Error": "Microsoft.DeviceRegistry.Error", "com.azure.resourcemanager.deviceregistry.models.ErrorDetails": "Microsoft.DeviceRegistry.ErrorDetails", "com.azure.resourcemanager.deviceregistry.models.Event": "Microsoft.DeviceRegistry.Event", "com.azure.resourcemanager.deviceregistry.models.EventBase": "Microsoft.DeviceRegistry.EventBase", @@ -226,8 +224,6 @@ "com.azure.resourcemanager.deviceregistry.models.Messaging": "Microsoft.DeviceRegistry.Messaging", "com.azure.resourcemanager.deviceregistry.models.MessagingEndpoint": "Microsoft.DeviceRegistry.MessagingEndpoint", "com.azure.resourcemanager.deviceregistry.models.MessagingEndpoints": "Microsoft.DeviceRegistry.MessagingEndpoints", - "com.azure.resourcemanager.deviceregistry.models.MigrateResult": "Microsoft.DeviceRegistry.MigrateResult", - "com.azure.resourcemanager.deviceregistry.models.MigrateResultType": "Microsoft.DeviceRegistry.MigrateResultType", "com.azure.resourcemanager.deviceregistry.models.MqttDestinationConfiguration": "Microsoft.DeviceRegistry.MqttDestinationConfiguration", "com.azure.resourcemanager.deviceregistry.models.MqttDestinationQos": "Microsoft.DeviceRegistry.MqttDestinationQos", "com.azure.resourcemanager.deviceregistry.models.NamespaceAssetProperties": "Microsoft.DeviceRegistry.NamespaceAssetProperties", diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/resources/META-INF/azure-resourcemanager-deviceregistry_metadata.json b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/resources/META-INF/azure-resourcemanager-deviceregistry_metadata.json index dd5e3d1b9652..5c77cb059cf3 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/resources/META-INF/azure-resourcemanager-deviceregistry_metadata.json +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/resources/META-INF/azure-resourcemanager-deviceregistry_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersion":"2025-11-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient":"Microsoft.DeviceRegistry.AssetEndpointProfiles","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.beginCreateOrReplace":"Microsoft.DeviceRegistry.AssetEndpointProfiles.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.beginDelete":"Microsoft.DeviceRegistry.AssetEndpointProfiles.delete","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.beginUpdate":"Microsoft.DeviceRegistry.AssetEndpointProfiles.update","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.createOrReplace":"Microsoft.DeviceRegistry.AssetEndpointProfiles.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.delete":"Microsoft.DeviceRegistry.AssetEndpointProfiles.delete","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.getByResourceGroup":"Microsoft.DeviceRegistry.AssetEndpointProfiles.get","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.getByResourceGroupWithResponse":"Microsoft.DeviceRegistry.AssetEndpointProfiles.get","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.list":"Microsoft.DeviceRegistry.AssetEndpointProfiles.listBySubscription","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.listByResourceGroup":"Microsoft.DeviceRegistry.AssetEndpointProfiles.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.update":"Microsoft.DeviceRegistry.AssetEndpointProfiles.update","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient":"Microsoft.DeviceRegistry.Assets","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.beginCreateOrReplace":"Microsoft.DeviceRegistry.Assets.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.beginDelete":"Microsoft.DeviceRegistry.Assets.delete","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.beginUpdate":"Microsoft.DeviceRegistry.Assets.update","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.createOrReplace":"Microsoft.DeviceRegistry.Assets.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.delete":"Microsoft.DeviceRegistry.Assets.delete","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.getByResourceGroup":"Microsoft.DeviceRegistry.Assets.get","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.getByResourceGroupWithResponse":"Microsoft.DeviceRegistry.Assets.get","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.list":"Microsoft.DeviceRegistry.Assets.listBySubscription","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.listByResourceGroup":"Microsoft.DeviceRegistry.Assets.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.update":"Microsoft.DeviceRegistry.Assets.update","com.azure.resourcemanager.deviceregistry.fluent.BillingContainersClient":"Microsoft.DeviceRegistry.BillingContainers","com.azure.resourcemanager.deviceregistry.fluent.BillingContainersClient.get":"Microsoft.DeviceRegistry.BillingContainers.get","com.azure.resourcemanager.deviceregistry.fluent.BillingContainersClient.getWithResponse":"Microsoft.DeviceRegistry.BillingContainers.get","com.azure.resourcemanager.deviceregistry.fluent.BillingContainersClient.list":"Microsoft.DeviceRegistry.BillingContainers.listBySubscription","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient":"Microsoft.DeviceRegistry.Credentials","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.beginCreateOrUpdate":"Microsoft.DeviceRegistry.Credentials.createOrUpdate","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.beginDelete":"Microsoft.DeviceRegistry.Credentials.delete","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.beginSynchronize":"Microsoft.DeviceRegistry.Credentials.synchronize","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.beginUpdate":"Microsoft.DeviceRegistry.Credentials.update","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.createOrUpdate":"Microsoft.DeviceRegistry.Credentials.createOrUpdate","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.delete":"Microsoft.DeviceRegistry.Credentials.delete","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.get":"Microsoft.DeviceRegistry.Credentials.get","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.getWithResponse":"Microsoft.DeviceRegistry.Credentials.get","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.listByResourceGroup":"Microsoft.DeviceRegistry.Credentials.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.synchronize":"Microsoft.DeviceRegistry.Credentials.synchronize","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.update":"Microsoft.DeviceRegistry.Credentials.update","com.azure.resourcemanager.deviceregistry.fluent.DeviceRegistryManagementClient":"Microsoft.DeviceRegistry","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient":"Microsoft.DeviceRegistry.NamespaceAssets","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.beginCreateOrReplace":"Microsoft.DeviceRegistry.NamespaceAssets.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.beginDelete":"Microsoft.DeviceRegistry.NamespaceAssets.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.beginUpdate":"Microsoft.DeviceRegistry.NamespaceAssets.update","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.createOrReplace":"Microsoft.DeviceRegistry.NamespaceAssets.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.delete":"Microsoft.DeviceRegistry.NamespaceAssets.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.get":"Microsoft.DeviceRegistry.NamespaceAssets.get","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.getWithResponse":"Microsoft.DeviceRegistry.NamespaceAssets.get","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.listByResourceGroup":"Microsoft.DeviceRegistry.NamespaceAssets.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.update":"Microsoft.DeviceRegistry.NamespaceAssets.update","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient":"Microsoft.DeviceRegistry.NamespaceDevices","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.beginCreateOrReplace":"Microsoft.DeviceRegistry.NamespaceDevices.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.beginDelete":"Microsoft.DeviceRegistry.NamespaceDevices.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.beginUpdate":"Microsoft.DeviceRegistry.NamespaceDevices.update","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.createOrReplace":"Microsoft.DeviceRegistry.NamespaceDevices.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.delete":"Microsoft.DeviceRegistry.NamespaceDevices.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.get":"Microsoft.DeviceRegistry.NamespaceDevices.get","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.getWithResponse":"Microsoft.DeviceRegistry.NamespaceDevices.get","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.listByResourceGroup":"Microsoft.DeviceRegistry.NamespaceDevices.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.update":"Microsoft.DeviceRegistry.NamespaceDevices.update","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.beginCreateOrReplace":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.beginDelete":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.beginUpdate":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.update","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.createOrReplace":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.delete":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.get":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.get","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.getWithResponse":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.get","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.listByResourceGroup":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.update":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.update","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.beginCreateOrReplace":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.beginDelete":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.beginUpdate":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.update","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.createOrReplace":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.delete":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.get":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.get","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.getWithResponse":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.get","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.listByResourceGroup":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.update":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.update","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient":"Microsoft.DeviceRegistry.Namespaces","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.beginCreateOrReplace":"Microsoft.DeviceRegistry.Namespaces.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.beginDelete":"Microsoft.DeviceRegistry.Namespaces.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.beginMigrate":"Microsoft.DeviceRegistry.Namespaces.migrate","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.beginUpdate":"Microsoft.DeviceRegistry.Namespaces.update","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.createOrReplace":"Microsoft.DeviceRegistry.Namespaces.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.delete":"Microsoft.DeviceRegistry.Namespaces.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.getByResourceGroup":"Microsoft.DeviceRegistry.Namespaces.get","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.getByResourceGroupWithResponse":"Microsoft.DeviceRegistry.Namespaces.get","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.list":"Microsoft.DeviceRegistry.Namespaces.listBySubscription","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.listByResourceGroup":"Microsoft.DeviceRegistry.Namespaces.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.migrate":"Microsoft.DeviceRegistry.Namespaces.migrate","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.update":"Microsoft.DeviceRegistry.Namespaces.update","com.azure.resourcemanager.deviceregistry.fluent.OperationStatusClient":"Microsoft.DeviceRegistry.OperationStatus","com.azure.resourcemanager.deviceregistry.fluent.OperationStatusClient.get":"Microsoft.DeviceRegistry.OperationStatus.get","com.azure.resourcemanager.deviceregistry.fluent.OperationStatusClient.getWithResponse":"Microsoft.DeviceRegistry.OperationStatus.get","com.azure.resourcemanager.deviceregistry.fluent.OperationsClient":"Microsoft.DeviceRegistry.Operations","com.azure.resourcemanager.deviceregistry.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient":"Microsoft.DeviceRegistry.Policies","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.beginCreateOrUpdate":"Microsoft.DeviceRegistry.Policies.createOrUpdate","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.beginDelete":"Microsoft.DeviceRegistry.Policies.delete","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.beginUpdate":"Microsoft.DeviceRegistry.Policies.update","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.createOrUpdate":"Microsoft.DeviceRegistry.Policies.createOrUpdate","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.delete":"Microsoft.DeviceRegistry.Policies.delete","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.get":"Microsoft.DeviceRegistry.Policies.get","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.getWithResponse":"Microsoft.DeviceRegistry.Policies.get","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.listByResourceGroup":"Microsoft.DeviceRegistry.Policies.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.update":"Microsoft.DeviceRegistry.Policies.update","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient":"Microsoft.DeviceRegistry.SchemaRegistries","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.beginCreateOrReplace":"Microsoft.DeviceRegistry.SchemaRegistries.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.beginDelete":"Microsoft.DeviceRegistry.SchemaRegistries.delete","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.beginUpdate":"Microsoft.DeviceRegistry.SchemaRegistries.update","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.createOrReplace":"Microsoft.DeviceRegistry.SchemaRegistries.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.delete":"Microsoft.DeviceRegistry.SchemaRegistries.delete","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.getByResourceGroup":"Microsoft.DeviceRegistry.SchemaRegistries.get","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.getByResourceGroupWithResponse":"Microsoft.DeviceRegistry.SchemaRegistries.get","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.list":"Microsoft.DeviceRegistry.SchemaRegistries.listBySubscription","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.listByResourceGroup":"Microsoft.DeviceRegistry.SchemaRegistries.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.update":"Microsoft.DeviceRegistry.SchemaRegistries.update","com.azure.resourcemanager.deviceregistry.fluent.SchemaVersionsClient":"Microsoft.DeviceRegistry.SchemaVersions","com.azure.resourcemanager.deviceregistry.fluent.SchemaVersionsClient.beginDelete":"Microsoft.DeviceRegistry.SchemaVersions.delete","com.azure.resourcemanager.deviceregistry.fluent.SchemaVersionsClient.createOrReplace":"Microsoft.DeviceRegistry.SchemaVersions.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.SchemaVersionsClient.createOrReplaceWithResponse":"Microsoft.DeviceRegistry.SchemaVersions.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.SchemaVersionsClient.delete":"Microsoft.DeviceRegistry.SchemaVersions.delete","com.azure.resourcemanager.deviceregistry.fluent.SchemaVersionsClient.get":"Microsoft.DeviceRegistry.SchemaVersions.get","com.azure.resourcemanager.deviceregistry.fluent.SchemaVersionsClient.getWithResponse":"Microsoft.DeviceRegistry.SchemaVersions.get","com.azure.resourcemanager.deviceregistry.fluent.SchemaVersionsClient.listBySchema":"Microsoft.DeviceRegistry.SchemaVersions.listBySchema","com.azure.resourcemanager.deviceregistry.fluent.SchemasClient":"Microsoft.DeviceRegistry.Schemas","com.azure.resourcemanager.deviceregistry.fluent.SchemasClient.beginDelete":"Microsoft.DeviceRegistry.Schemas.delete","com.azure.resourcemanager.deviceregistry.fluent.SchemasClient.createOrReplace":"Microsoft.DeviceRegistry.Schemas.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.SchemasClient.createOrReplaceWithResponse":"Microsoft.DeviceRegistry.Schemas.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.SchemasClient.delete":"Microsoft.DeviceRegistry.Schemas.delete","com.azure.resourcemanager.deviceregistry.fluent.SchemasClient.get":"Microsoft.DeviceRegistry.Schemas.get","com.azure.resourcemanager.deviceregistry.fluent.SchemasClient.getWithResponse":"Microsoft.DeviceRegistry.Schemas.get","com.azure.resourcemanager.deviceregistry.fluent.SchemasClient.listBySchemaRegistry":"Microsoft.DeviceRegistry.Schemas.listBySchemaRegistry","com.azure.resourcemanager.deviceregistry.fluent.models.AssetEndpointProfileInner":"Microsoft.DeviceRegistry.AssetEndpointProfile","com.azure.resourcemanager.deviceregistry.fluent.models.AssetInner":"Microsoft.DeviceRegistry.Asset","com.azure.resourcemanager.deviceregistry.fluent.models.BillingContainerInner":"Microsoft.DeviceRegistry.BillingContainer","com.azure.resourcemanager.deviceregistry.fluent.models.CredentialInner":"Microsoft.DeviceRegistry.Credential","com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceAssetInner":"Microsoft.DeviceRegistry.NamespaceAsset","com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceDeviceInner":"Microsoft.DeviceRegistry.NamespaceDevice","com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceDiscoveredAssetInner":"Microsoft.DeviceRegistry.NamespaceDiscoveredAsset","com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceDiscoveredDeviceInner":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevice","com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceInner":"Microsoft.DeviceRegistry.Namespace","com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceMigrateResponseInner":"Microsoft.DeviceRegistry.NamespaceMigrateResponse","com.azure.resourcemanager.deviceregistry.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.deviceregistry.fluent.models.OperationStatusResultInner":"Azure.ResourceManager.CommonTypes.OperationStatusResult","com.azure.resourcemanager.deviceregistry.fluent.models.PolicyInner":"Microsoft.DeviceRegistry.Policy","com.azure.resourcemanager.deviceregistry.fluent.models.SchemaInner":"Microsoft.DeviceRegistry.Schema","com.azure.resourcemanager.deviceregistry.fluent.models.SchemaRegistryInner":"Microsoft.DeviceRegistry.SchemaRegistry","com.azure.resourcemanager.deviceregistry.fluent.models.SchemaVersionInner":"Microsoft.DeviceRegistry.SchemaVersion","com.azure.resourcemanager.deviceregistry.implementation.DeviceRegistryManagementClientBuilder":"Microsoft.DeviceRegistry","com.azure.resourcemanager.deviceregistry.implementation.models.AssetEndpointProfileListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.AssetListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.BillingContainerListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.CredentialListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.NamespaceAssetListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.NamespaceDeviceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.NamespaceDiscoveredAssetListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.NamespaceDiscoveredDeviceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.NamespaceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.deviceregistry.implementation.models.PolicyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.SchemaListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.SchemaRegistryListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.SchemaVersionListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.deviceregistry.models.AssetEndpointProfileProperties":"Microsoft.DeviceRegistry.AssetEndpointProfileProperties","com.azure.resourcemanager.deviceregistry.models.AssetEndpointProfileStatus":"Microsoft.DeviceRegistry.AssetEndpointProfileStatus","com.azure.resourcemanager.deviceregistry.models.AssetEndpointProfileStatusError":"Microsoft.DeviceRegistry.AssetEndpointProfileStatusError","com.azure.resourcemanager.deviceregistry.models.AssetEndpointProfileUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.AssetEndpointProfileUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.AssetProperties":"Microsoft.DeviceRegistry.AssetProperties","com.azure.resourcemanager.deviceregistry.models.AssetStatus":"Microsoft.DeviceRegistry.AssetStatus","com.azure.resourcemanager.deviceregistry.models.AssetStatusDataset":"Microsoft.DeviceRegistry.AssetStatusDataset","com.azure.resourcemanager.deviceregistry.models.AssetStatusError":"Microsoft.DeviceRegistry.AssetStatusError","com.azure.resourcemanager.deviceregistry.models.AssetStatusEvent":"Microsoft.DeviceRegistry.AssetStatusEvent","com.azure.resourcemanager.deviceregistry.models.AssetUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.AssetUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.Authentication":"Microsoft.DeviceRegistry.Authentication","com.azure.resourcemanager.deviceregistry.models.AuthenticationMethod":"Microsoft.DeviceRegistry.AuthenticationMethod","com.azure.resourcemanager.deviceregistry.models.BillingContainerProperties":"Microsoft.DeviceRegistry.BillingContainerProperties","com.azure.resourcemanager.deviceregistry.models.BrokerStateStoreDestinationConfiguration":"Microsoft.DeviceRegistry.BrokerStateStoreDestinationConfiguration","com.azure.resourcemanager.deviceregistry.models.CertificateAuthorityConfiguration":"Microsoft.DeviceRegistry.CertificateAuthorityConfiguration","com.azure.resourcemanager.deviceregistry.models.CertificateConfiguration":"Microsoft.DeviceRegistry.CertificateConfiguration","com.azure.resourcemanager.deviceregistry.models.CredentialProperties":"Microsoft.DeviceRegistry.CredentialProperties","com.azure.resourcemanager.deviceregistry.models.CredentialUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.DataPoint":"Microsoft.DeviceRegistry.DataPoint","com.azure.resourcemanager.deviceregistry.models.DataPointBase":"Microsoft.DeviceRegistry.DataPointBase","com.azure.resourcemanager.deviceregistry.models.DataPointObservabilityMode":"Microsoft.DeviceRegistry.DataPointObservabilityMode","com.azure.resourcemanager.deviceregistry.models.Dataset":"Microsoft.DeviceRegistry.Dataset","com.azure.resourcemanager.deviceregistry.models.DatasetBrokerStateStoreDestination":"Microsoft.DeviceRegistry.DatasetBrokerStateStoreDestination","com.azure.resourcemanager.deviceregistry.models.DatasetDestination":"Microsoft.DeviceRegistry.DatasetDestination","com.azure.resourcemanager.deviceregistry.models.DatasetDestinationTarget":"Microsoft.DeviceRegistry.DatasetDestinationTarget","com.azure.resourcemanager.deviceregistry.models.DatasetMqttDestination":"Microsoft.DeviceRegistry.DatasetMqttDestination","com.azure.resourcemanager.deviceregistry.models.DatasetStorageDestination":"Microsoft.DeviceRegistry.DatasetStorageDestination","com.azure.resourcemanager.deviceregistry.models.DeviceCredentialPolicy":"Microsoft.DeviceRegistry.DeviceCredentialPolicy","com.azure.resourcemanager.deviceregistry.models.DeviceMessagingEndpoint":"Microsoft.DeviceRegistry.DeviceMessagingEndpoint","com.azure.resourcemanager.deviceregistry.models.DeviceRef":"Microsoft.DeviceRegistry.DeviceRef","com.azure.resourcemanager.deviceregistry.models.DeviceStatus":"Microsoft.DeviceRegistry.DeviceStatus","com.azure.resourcemanager.deviceregistry.models.DeviceStatusEndpoint":"Microsoft.DeviceRegistry.DeviceStatusEndpoint","com.azure.resourcemanager.deviceregistry.models.DeviceStatusEndpoints":"Microsoft.DeviceRegistry.DeviceStatusEndpoints","com.azure.resourcemanager.deviceregistry.models.DiscoveredInboundEndpoints":"Microsoft.DeviceRegistry.DiscoveredInboundEndpoints","com.azure.resourcemanager.deviceregistry.models.DiscoveredMessagingEndpoints":"Microsoft.DeviceRegistry.DiscoveredMessagingEndpoints","com.azure.resourcemanager.deviceregistry.models.DiscoveredOutboundEndpoints":"Microsoft.DeviceRegistry.DiscoveredOutboundEndpoints","com.azure.resourcemanager.deviceregistry.models.Error":"Microsoft.DeviceRegistry.Error","com.azure.resourcemanager.deviceregistry.models.ErrorDetails":"Microsoft.DeviceRegistry.ErrorDetails","com.azure.resourcemanager.deviceregistry.models.Event":"Microsoft.DeviceRegistry.Event","com.azure.resourcemanager.deviceregistry.models.EventBase":"Microsoft.DeviceRegistry.EventBase","com.azure.resourcemanager.deviceregistry.models.EventDestination":"Microsoft.DeviceRegistry.EventDestination","com.azure.resourcemanager.deviceregistry.models.EventDestinationTarget":"Microsoft.DeviceRegistry.EventDestinationTarget","com.azure.resourcemanager.deviceregistry.models.EventMqttDestination":"Microsoft.DeviceRegistry.EventMqttDestination","com.azure.resourcemanager.deviceregistry.models.EventObservabilityMode":"Microsoft.DeviceRegistry.EventObservabilityMode","com.azure.resourcemanager.deviceregistry.models.EventStorageDestination":"Microsoft.DeviceRegistry.EventStorageDestination","com.azure.resourcemanager.deviceregistry.models.ExtendedLocation":"Microsoft.DeviceRegistry.ExtendedLocation","com.azure.resourcemanager.deviceregistry.models.Format":"Microsoft.DeviceRegistry.Format","com.azure.resourcemanager.deviceregistry.models.HostAuthentication":"Microsoft.DeviceRegistry.HostAuthentication","com.azure.resourcemanager.deviceregistry.models.InboundEndpoints":"Microsoft.DeviceRegistry.InboundEndpoints","com.azure.resourcemanager.deviceregistry.models.LeafCertificateConfiguration":"Microsoft.DeviceRegistry.LeafCertificateConfiguration","com.azure.resourcemanager.deviceregistry.models.ManagementAction":"Microsoft.DeviceRegistry.ManagementAction","com.azure.resourcemanager.deviceregistry.models.ManagementActionType":"Microsoft.DeviceRegistry.ManagementActionType","com.azure.resourcemanager.deviceregistry.models.ManagementGroup":"Microsoft.DeviceRegistry.ManagementGroup","com.azure.resourcemanager.deviceregistry.models.MessageSchemaReference":"Microsoft.DeviceRegistry.MessageSchemaReference","com.azure.resourcemanager.deviceregistry.models.Messaging":"Microsoft.DeviceRegistry.Messaging","com.azure.resourcemanager.deviceregistry.models.MessagingEndpoint":"Microsoft.DeviceRegistry.MessagingEndpoint","com.azure.resourcemanager.deviceregistry.models.MessagingEndpoints":"Microsoft.DeviceRegistry.MessagingEndpoints","com.azure.resourcemanager.deviceregistry.models.MigrateResult":"Microsoft.DeviceRegistry.MigrateResult","com.azure.resourcemanager.deviceregistry.models.MigrateResultType":"Microsoft.DeviceRegistry.MigrateResultType","com.azure.resourcemanager.deviceregistry.models.MqttDestinationConfiguration":"Microsoft.DeviceRegistry.MqttDestinationConfiguration","com.azure.resourcemanager.deviceregistry.models.MqttDestinationQos":"Microsoft.DeviceRegistry.MqttDestinationQos","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetProperties":"Microsoft.DeviceRegistry.NamespaceAssetProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetStatus":"Microsoft.DeviceRegistry.NamespaceAssetStatus","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetStatusDataset":"Microsoft.DeviceRegistry.NamespaceAssetStatusDataset","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetStatusEvent":"Microsoft.DeviceRegistry.NamespaceAssetStatusEvent","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetStatusEventGroup":"Microsoft.DeviceRegistry.NamespaceAssetStatusEventGroup","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetStatusManagementAction":"Microsoft.DeviceRegistry.NamespaceAssetStatusManagementAction","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetStatusManagementGroup":"Microsoft.DeviceRegistry.NamespaceAssetStatusManagementGroup","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetStatusStream":"Microsoft.DeviceRegistry.NamespaceAssetStatusStream","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceDataset":"Microsoft.DeviceRegistry.NamespaceDataset","com.azure.resourcemanager.deviceregistry.models.NamespaceDatasetDataPoint":"Microsoft.DeviceRegistry.NamespaceDatasetDataPoint","com.azure.resourcemanager.deviceregistry.models.NamespaceDeviceProperties":"Microsoft.DeviceRegistry.NamespaceDeviceProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceDeviceUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.NamespaceDeviceUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredAssetProperties":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssetProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredAssetUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredAssetUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredDataset":"Microsoft.DeviceRegistry.NamespaceDiscoveredDataset","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredDatasetDataPoint":"Microsoft.DeviceRegistry.NamespaceDiscoveredDatasetDataPoint","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredDeviceProperties":"Microsoft.DeviceRegistry.NamespaceDiscoveredDeviceProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredDeviceUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredDeviceUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredEvent":"Microsoft.DeviceRegistry.NamespaceDiscoveredEvent","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredEventGroup":"Microsoft.DeviceRegistry.NamespaceDiscoveredEventGroup","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredManagementAction":"Microsoft.DeviceRegistry.NamespaceDiscoveredManagementAction","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredManagementActionType":"Microsoft.DeviceRegistry.NamespaceDiscoveredManagementActionType","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredManagementGroup":"Microsoft.DeviceRegistry.NamespaceDiscoveredManagementGroup","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredStream":"Microsoft.DeviceRegistry.NamespaceDiscoveredStream","com.azure.resourcemanager.deviceregistry.models.NamespaceEvent":"Microsoft.DeviceRegistry.NamespaceEvent","com.azure.resourcemanager.deviceregistry.models.NamespaceEventGroup":"Microsoft.DeviceRegistry.NamespaceEventGroup","com.azure.resourcemanager.deviceregistry.models.NamespaceMessageSchemaReference":"Microsoft.DeviceRegistry.NamespaceMessageSchemaReference","com.azure.resourcemanager.deviceregistry.models.NamespaceMigrateRequest":"Microsoft.DeviceRegistry.NamespaceMigrateRequest","com.azure.resourcemanager.deviceregistry.models.NamespaceProperties":"Microsoft.DeviceRegistry.NamespaceProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceStream":"Microsoft.DeviceRegistry.NamespaceStream","com.azure.resourcemanager.deviceregistry.models.NamespaceUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.NamespaceUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.deviceregistry.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.deviceregistry.models.OutboundEndpoints":"Microsoft.DeviceRegistry.OutboundEndpoints","com.azure.resourcemanager.deviceregistry.models.PolicyProperties":"Microsoft.DeviceRegistry.PolicyProperties","com.azure.resourcemanager.deviceregistry.models.PolicyUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.PolicyUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.ProvisioningState":"Microsoft.DeviceRegistry.ProvisioningState","com.azure.resourcemanager.deviceregistry.models.SchemaProperties":"Microsoft.DeviceRegistry.SchemaProperties","com.azure.resourcemanager.deviceregistry.models.SchemaRegistryProperties":"Microsoft.DeviceRegistry.SchemaRegistryProperties","com.azure.resourcemanager.deviceregistry.models.SchemaRegistryUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.SchemaRegistryUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.SchemaType":"Microsoft.DeviceRegistry.SchemaType","com.azure.resourcemanager.deviceregistry.models.SchemaVersionProperties":"Microsoft.DeviceRegistry.SchemaVersionProperties","com.azure.resourcemanager.deviceregistry.models.Scope":"Microsoft.DeviceRegistry.Scope","com.azure.resourcemanager.deviceregistry.models.StatusConfig":"Microsoft.DeviceRegistry.StatusConfig","com.azure.resourcemanager.deviceregistry.models.StatusError":"Microsoft.DeviceRegistry.StatusError","com.azure.resourcemanager.deviceregistry.models.StorageDestinationConfiguration":"Microsoft.DeviceRegistry.StorageDestinationConfiguration","com.azure.resourcemanager.deviceregistry.models.StreamDestination":"Microsoft.DeviceRegistry.StreamDestination","com.azure.resourcemanager.deviceregistry.models.StreamDestinationTarget":"Microsoft.DeviceRegistry.StreamDestinationTarget","com.azure.resourcemanager.deviceregistry.models.StreamMqttDestination":"Microsoft.DeviceRegistry.StreamMqttDestination","com.azure.resourcemanager.deviceregistry.models.StreamStorageDestination":"Microsoft.DeviceRegistry.StreamStorageDestination","com.azure.resourcemanager.deviceregistry.models.SupportedKeyType":"Microsoft.DeviceRegistry.SupportedKeyType","com.azure.resourcemanager.deviceregistry.models.SystemAssignedServiceIdentity":"Azure.ResourceManager.CommonTypes.SystemAssignedServiceIdentity","com.azure.resourcemanager.deviceregistry.models.SystemAssignedServiceIdentityType":"Azure.ResourceManager.CommonTypes.SystemAssignedServiceIdentityType","com.azure.resourcemanager.deviceregistry.models.Topic":"Microsoft.DeviceRegistry.Topic","com.azure.resourcemanager.deviceregistry.models.TopicRetainType":"Microsoft.DeviceRegistry.TopicRetainType","com.azure.resourcemanager.deviceregistry.models.TrustSettings":"Microsoft.DeviceRegistry.TrustSettings","com.azure.resourcemanager.deviceregistry.models.UsernamePasswordCredentials":"Microsoft.DeviceRegistry.UsernamePasswordCredentials","com.azure.resourcemanager.deviceregistry.models.X509CertificateCredentials":"Microsoft.DeviceRegistry.X509CertificateCredentials","com.azure.resourcemanager.deviceregistry.models.X509Credentials":"Microsoft.DeviceRegistry.X509Credentials"},"generatedFiles":["src/main/java/com/azure/resourcemanager/deviceregistry/DeviceRegistryManager.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/AssetEndpointProfilesClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/AssetsClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/BillingContainersClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/CredentialsClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/DeviceRegistryManagementClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/NamespaceAssetsClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/NamespaceDevicesClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/NamespaceDiscoveredAssetsClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/NamespaceDiscoveredDevicesClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/NamespacesClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/OperationStatusClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/PoliciesClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemaRegistriesClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemaVersionsClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemasClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/AssetEndpointProfileInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/AssetInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/BillingContainerInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/CredentialInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/NamespaceAssetInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/NamespaceDeviceInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/NamespaceDiscoveredAssetInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/NamespaceDiscoveredDeviceInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/NamespaceInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/NamespaceMigrateResponseInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/OperationStatusResultInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/PolicyInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/SchemaInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/SchemaRegistryInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/SchemaVersionInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/package-info.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetEndpointProfileImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetEndpointProfilesClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetEndpointProfilesImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetsClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetsImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainerImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainersClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainersImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/CredentialImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/CredentialsClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/CredentialsImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DeviceRegistryManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DeviceRegistryManagementClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceAssetImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceAssetsClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceAssetsImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDeviceImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDevicesClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDevicesImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDiscoveredAssetImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDiscoveredAssetsClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDiscoveredAssetsImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDiscoveredDeviceImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDiscoveredDevicesClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDiscoveredDevicesImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceMigrateResponseImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespacesClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespacesImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/OperationStatusClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/OperationStatusImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/OperationStatusResultImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/PoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/PoliciesImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/PolicyImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaRegistriesClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaRegistriesImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaRegistryImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaVersionImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaVersionsImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemasClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemasImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/AssetEndpointProfileListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/AssetListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/BillingContainerListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/CredentialListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/NamespaceAssetListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/NamespaceDeviceListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/NamespaceDiscoveredAssetListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/NamespaceDiscoveredDeviceListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/NamespaceListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/PolicyListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/SchemaListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/SchemaRegistryListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/SchemaVersionListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/package-info.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/ActionType.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Asset.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetEndpointProfile.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetEndpointProfileProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetEndpointProfileStatus.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetEndpointProfileStatusError.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetEndpointProfileUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetEndpointProfileUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetEndpointProfiles.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetStatus.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetStatusDataset.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetStatusError.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetStatusEvent.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Assets.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Authentication.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AuthenticationMethod.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/BillingContainer.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/BillingContainerProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/BillingContainers.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/BrokerStateStoreDestinationConfiguration.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/CertificateAuthorityConfiguration.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/CertificateConfiguration.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Credential.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/CredentialProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/CredentialUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Credentials.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DataPoint.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DataPointBase.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DataPointObservabilityMode.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Dataset.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DatasetBrokerStateStoreDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DatasetDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DatasetDestinationTarget.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DatasetMqttDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DatasetStorageDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DeviceCredentialPolicy.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DeviceMessagingEndpoint.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DeviceRef.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DeviceStatus.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DeviceStatusEndpoint.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DeviceStatusEndpoints.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredInboundEndpoints.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredMessagingEndpoints.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredOutboundEndpoints.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Error.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/ErrorDetails.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Event.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/EventBase.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/EventDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/EventDestinationTarget.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/EventMqttDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/EventObservabilityMode.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/EventStorageDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Format.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/HostAuthentication.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/InboundEndpoints.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/LeafCertificateConfiguration.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/ManagementAction.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/ManagementActionType.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/ManagementGroup.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/MessageSchemaReference.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Messaging.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/MessagingEndpoint.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/MessagingEndpoints.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/MigrateResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/MigrateResultType.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/MqttDestinationConfiguration.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/MqttDestinationQos.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Namespace.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAsset.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetStatus.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetStatusDataset.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetStatusEvent.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetStatusEventGroup.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetStatusManagementAction.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetStatusManagementGroup.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetStatusStream.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssets.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDataset.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDatasetDataPoint.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDevice.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDeviceProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDeviceUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDeviceUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDevices.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredAsset.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredAssetProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredAssetUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredAssetUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredAssets.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredDataset.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredDatasetDataPoint.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredDevice.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredDeviceProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredDeviceUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredDeviceUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredDevices.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredEvent.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredEventGroup.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredManagementAction.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredManagementActionType.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredManagementGroup.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredStream.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceEvent.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceEventGroup.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceMessageSchemaReference.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceMigrateRequest.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceMigrateResponse.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceStream.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Namespaces.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Operation.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/OperationStatus.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/OperationStatusResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Operations.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Origin.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/OutboundEndpoints.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Policies.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Policy.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/PolicyProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/PolicyUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/PolicyUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Schema.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaRegistries.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaRegistry.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaRegistryProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaRegistryUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaRegistryUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaType.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaVersion.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaVersionProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaVersions.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Schemas.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Scope.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/StatusConfig.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/StatusError.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/StorageDestinationConfiguration.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/StreamDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/StreamDestinationTarget.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/StreamMqttDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/StreamStorageDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SupportedKeyType.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SystemAssignedServiceIdentity.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SystemAssignedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Topic.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/TopicRetainType.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/TrustSettings.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/UsernamePasswordCredentials.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/X509CertificateCredentials.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/X509Credentials.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/package-info.java","src/main/java/com/azure/resourcemanager/deviceregistry/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersion":"2025-11-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient":"Microsoft.DeviceRegistry.AssetEndpointProfiles","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.beginCreateOrReplace":"Microsoft.DeviceRegistry.AssetEndpointProfiles.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.beginDelete":"Microsoft.DeviceRegistry.AssetEndpointProfiles.delete","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.beginUpdate":"Microsoft.DeviceRegistry.AssetEndpointProfiles.update","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.createOrReplace":"Microsoft.DeviceRegistry.AssetEndpointProfiles.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.delete":"Microsoft.DeviceRegistry.AssetEndpointProfiles.delete","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.getByResourceGroup":"Microsoft.DeviceRegistry.AssetEndpointProfiles.get","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.getByResourceGroupWithResponse":"Microsoft.DeviceRegistry.AssetEndpointProfiles.get","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.list":"Microsoft.DeviceRegistry.AssetEndpointProfiles.listBySubscription","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.listByResourceGroup":"Microsoft.DeviceRegistry.AssetEndpointProfiles.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient.update":"Microsoft.DeviceRegistry.AssetEndpointProfiles.update","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient":"Microsoft.DeviceRegistry.Assets","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.beginCreateOrReplace":"Microsoft.DeviceRegistry.Assets.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.beginDelete":"Microsoft.DeviceRegistry.Assets.delete","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.beginUpdate":"Microsoft.DeviceRegistry.Assets.update","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.createOrReplace":"Microsoft.DeviceRegistry.Assets.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.delete":"Microsoft.DeviceRegistry.Assets.delete","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.getByResourceGroup":"Microsoft.DeviceRegistry.Assets.get","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.getByResourceGroupWithResponse":"Microsoft.DeviceRegistry.Assets.get","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.list":"Microsoft.DeviceRegistry.Assets.listBySubscription","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.listByResourceGroup":"Microsoft.DeviceRegistry.Assets.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.AssetsClient.update":"Microsoft.DeviceRegistry.Assets.update","com.azure.resourcemanager.deviceregistry.fluent.BillingContainersClient":"Microsoft.DeviceRegistry.BillingContainers","com.azure.resourcemanager.deviceregistry.fluent.BillingContainersClient.get":"Microsoft.DeviceRegistry.BillingContainers.get","com.azure.resourcemanager.deviceregistry.fluent.BillingContainersClient.getWithResponse":"Microsoft.DeviceRegistry.BillingContainers.get","com.azure.resourcemanager.deviceregistry.fluent.BillingContainersClient.list":"Microsoft.DeviceRegistry.BillingContainers.listBySubscription","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient":"Microsoft.DeviceRegistry.Credentials","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.beginCreateOrUpdate":"Microsoft.DeviceRegistry.Credentials.createOrUpdate","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.beginDelete":"Microsoft.DeviceRegistry.Credentials.delete","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.beginSynchronize":"Microsoft.DeviceRegistry.Credentials.synchronize","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.beginUpdate":"Microsoft.DeviceRegistry.Credentials.update","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.createOrUpdate":"Microsoft.DeviceRegistry.Credentials.createOrUpdate","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.delete":"Microsoft.DeviceRegistry.Credentials.delete","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.get":"Microsoft.DeviceRegistry.Credentials.get","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.getWithResponse":"Microsoft.DeviceRegistry.Credentials.get","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.listByResourceGroup":"Microsoft.DeviceRegistry.Credentials.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.synchronize":"Microsoft.DeviceRegistry.Credentials.synchronize","com.azure.resourcemanager.deviceregistry.fluent.CredentialsClient.update":"Microsoft.DeviceRegistry.Credentials.update","com.azure.resourcemanager.deviceregistry.fluent.DeviceRegistryManagementClient":"Microsoft.DeviceRegistry","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient":"Microsoft.DeviceRegistry.NamespaceAssets","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.beginCreateOrReplace":"Microsoft.DeviceRegistry.NamespaceAssets.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.beginDelete":"Microsoft.DeviceRegistry.NamespaceAssets.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.beginUpdate":"Microsoft.DeviceRegistry.NamespaceAssets.update","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.createOrReplace":"Microsoft.DeviceRegistry.NamespaceAssets.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.delete":"Microsoft.DeviceRegistry.NamespaceAssets.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.get":"Microsoft.DeviceRegistry.NamespaceAssets.get","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.getWithResponse":"Microsoft.DeviceRegistry.NamespaceAssets.get","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.listByResourceGroup":"Microsoft.DeviceRegistry.NamespaceAssets.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.NamespaceAssetsClient.update":"Microsoft.DeviceRegistry.NamespaceAssets.update","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient":"Microsoft.DeviceRegistry.NamespaceDevices","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.beginCreateOrReplace":"Microsoft.DeviceRegistry.NamespaceDevices.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.beginDelete":"Microsoft.DeviceRegistry.NamespaceDevices.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.beginUpdate":"Microsoft.DeviceRegistry.NamespaceDevices.update","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.createOrReplace":"Microsoft.DeviceRegistry.NamespaceDevices.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.delete":"Microsoft.DeviceRegistry.NamespaceDevices.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.get":"Microsoft.DeviceRegistry.NamespaceDevices.get","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.getWithResponse":"Microsoft.DeviceRegistry.NamespaceDevices.get","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.listByResourceGroup":"Microsoft.DeviceRegistry.NamespaceDevices.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDevicesClient.update":"Microsoft.DeviceRegistry.NamespaceDevices.update","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.beginCreateOrReplace":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.beginDelete":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.beginUpdate":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.update","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.createOrReplace":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.delete":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.get":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.get","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.getWithResponse":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.get","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.listByResourceGroup":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredAssetsClient.update":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssets.update","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.beginCreateOrReplace":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.beginDelete":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.beginUpdate":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.update","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.createOrReplace":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.delete":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.get":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.get","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.getWithResponse":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.get","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.listByResourceGroup":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.NamespaceDiscoveredDevicesClient.update":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevices.update","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient":"Microsoft.DeviceRegistry.Namespaces","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.beginCreateOrReplace":"Microsoft.DeviceRegistry.Namespaces.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.beginDelete":"Microsoft.DeviceRegistry.Namespaces.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.beginMigrate":"Microsoft.DeviceRegistry.Namespaces.migrate","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.beginUpdate":"Microsoft.DeviceRegistry.Namespaces.update","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.createOrReplace":"Microsoft.DeviceRegistry.Namespaces.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.delete":"Microsoft.DeviceRegistry.Namespaces.delete","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.getByResourceGroup":"Microsoft.DeviceRegistry.Namespaces.get","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.getByResourceGroupWithResponse":"Microsoft.DeviceRegistry.Namespaces.get","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.list":"Microsoft.DeviceRegistry.Namespaces.listBySubscription","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.listByResourceGroup":"Microsoft.DeviceRegistry.Namespaces.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.migrate":"Microsoft.DeviceRegistry.Namespaces.migrate","com.azure.resourcemanager.deviceregistry.fluent.NamespacesClient.update":"Microsoft.DeviceRegistry.Namespaces.update","com.azure.resourcemanager.deviceregistry.fluent.OperationStatusClient":"Microsoft.DeviceRegistry.OperationStatus","com.azure.resourcemanager.deviceregistry.fluent.OperationStatusClient.get":"Microsoft.DeviceRegistry.OperationStatus.get","com.azure.resourcemanager.deviceregistry.fluent.OperationStatusClient.getWithResponse":"Microsoft.DeviceRegistry.OperationStatus.get","com.azure.resourcemanager.deviceregistry.fluent.OperationsClient":"Microsoft.DeviceRegistry.Operations","com.azure.resourcemanager.deviceregistry.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient":"Microsoft.DeviceRegistry.Policies","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.beginCreateOrUpdate":"Microsoft.DeviceRegistry.Policies.createOrUpdate","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.beginDelete":"Microsoft.DeviceRegistry.Policies.delete","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.beginUpdate":"Microsoft.DeviceRegistry.Policies.update","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.createOrUpdate":"Microsoft.DeviceRegistry.Policies.createOrUpdate","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.delete":"Microsoft.DeviceRegistry.Policies.delete","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.get":"Microsoft.DeviceRegistry.Policies.get","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.getWithResponse":"Microsoft.DeviceRegistry.Policies.get","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.listByResourceGroup":"Microsoft.DeviceRegistry.Policies.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.PoliciesClient.update":"Microsoft.DeviceRegistry.Policies.update","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient":"Microsoft.DeviceRegistry.SchemaRegistries","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.beginCreateOrReplace":"Microsoft.DeviceRegistry.SchemaRegistries.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.beginDelete":"Microsoft.DeviceRegistry.SchemaRegistries.delete","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.beginUpdate":"Microsoft.DeviceRegistry.SchemaRegistries.update","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.createOrReplace":"Microsoft.DeviceRegistry.SchemaRegistries.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.delete":"Microsoft.DeviceRegistry.SchemaRegistries.delete","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.getByResourceGroup":"Microsoft.DeviceRegistry.SchemaRegistries.get","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.getByResourceGroupWithResponse":"Microsoft.DeviceRegistry.SchemaRegistries.get","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.list":"Microsoft.DeviceRegistry.SchemaRegistries.listBySubscription","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.listByResourceGroup":"Microsoft.DeviceRegistry.SchemaRegistries.listByResourceGroup","com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient.update":"Microsoft.DeviceRegistry.SchemaRegistries.update","com.azure.resourcemanager.deviceregistry.fluent.SchemaVersionsClient":"Microsoft.DeviceRegistry.SchemaVersions","com.azure.resourcemanager.deviceregistry.fluent.SchemaVersionsClient.beginDelete":"Microsoft.DeviceRegistry.SchemaVersions.delete","com.azure.resourcemanager.deviceregistry.fluent.SchemaVersionsClient.createOrReplace":"Microsoft.DeviceRegistry.SchemaVersions.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.SchemaVersionsClient.createOrReplaceWithResponse":"Microsoft.DeviceRegistry.SchemaVersions.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.SchemaVersionsClient.delete":"Microsoft.DeviceRegistry.SchemaVersions.delete","com.azure.resourcemanager.deviceregistry.fluent.SchemaVersionsClient.get":"Microsoft.DeviceRegistry.SchemaVersions.get","com.azure.resourcemanager.deviceregistry.fluent.SchemaVersionsClient.getWithResponse":"Microsoft.DeviceRegistry.SchemaVersions.get","com.azure.resourcemanager.deviceregistry.fluent.SchemaVersionsClient.listBySchema":"Microsoft.DeviceRegistry.SchemaVersions.listBySchema","com.azure.resourcemanager.deviceregistry.fluent.SchemasClient":"Microsoft.DeviceRegistry.Schemas","com.azure.resourcemanager.deviceregistry.fluent.SchemasClient.beginDelete":"Microsoft.DeviceRegistry.Schemas.delete","com.azure.resourcemanager.deviceregistry.fluent.SchemasClient.createOrReplace":"Microsoft.DeviceRegistry.Schemas.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.SchemasClient.createOrReplaceWithResponse":"Microsoft.DeviceRegistry.Schemas.createOrReplace","com.azure.resourcemanager.deviceregistry.fluent.SchemasClient.delete":"Microsoft.DeviceRegistry.Schemas.delete","com.azure.resourcemanager.deviceregistry.fluent.SchemasClient.get":"Microsoft.DeviceRegistry.Schemas.get","com.azure.resourcemanager.deviceregistry.fluent.SchemasClient.getWithResponse":"Microsoft.DeviceRegistry.Schemas.get","com.azure.resourcemanager.deviceregistry.fluent.SchemasClient.listBySchemaRegistry":"Microsoft.DeviceRegistry.Schemas.listBySchemaRegistry","com.azure.resourcemanager.deviceregistry.fluent.models.AssetEndpointProfileInner":"Microsoft.DeviceRegistry.AssetEndpointProfile","com.azure.resourcemanager.deviceregistry.fluent.models.AssetInner":"Microsoft.DeviceRegistry.Asset","com.azure.resourcemanager.deviceregistry.fluent.models.BillingContainerInner":"Microsoft.DeviceRegistry.BillingContainer","com.azure.resourcemanager.deviceregistry.fluent.models.CredentialInner":"Microsoft.DeviceRegistry.Credential","com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceAssetInner":"Microsoft.DeviceRegistry.NamespaceAsset","com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceDeviceInner":"Microsoft.DeviceRegistry.NamespaceDevice","com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceDiscoveredAssetInner":"Microsoft.DeviceRegistry.NamespaceDiscoveredAsset","com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceDiscoveredDeviceInner":"Microsoft.DeviceRegistry.NamespaceDiscoveredDevice","com.azure.resourcemanager.deviceregistry.fluent.models.NamespaceInner":"Microsoft.DeviceRegistry.Namespace","com.azure.resourcemanager.deviceregistry.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.deviceregistry.fluent.models.OperationStatusResultInner":"Azure.ResourceManager.CommonTypes.OperationStatusResult","com.azure.resourcemanager.deviceregistry.fluent.models.PolicyInner":"Microsoft.DeviceRegistry.Policy","com.azure.resourcemanager.deviceregistry.fluent.models.SchemaInner":"Microsoft.DeviceRegistry.Schema","com.azure.resourcemanager.deviceregistry.fluent.models.SchemaRegistryInner":"Microsoft.DeviceRegistry.SchemaRegistry","com.azure.resourcemanager.deviceregistry.fluent.models.SchemaVersionInner":"Microsoft.DeviceRegistry.SchemaVersion","com.azure.resourcemanager.deviceregistry.implementation.DeviceRegistryManagementClientBuilder":"Microsoft.DeviceRegistry","com.azure.resourcemanager.deviceregistry.implementation.models.AssetEndpointProfileListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.AssetListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.BillingContainerListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.CredentialListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.NamespaceAssetListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.NamespaceDeviceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.NamespaceDiscoveredAssetListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.NamespaceDiscoveredDeviceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.NamespaceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.deviceregistry.implementation.models.PolicyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.SchemaListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.SchemaRegistryListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.implementation.models.SchemaVersionListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.deviceregistry.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.deviceregistry.models.AssetEndpointProfileProperties":"Microsoft.DeviceRegistry.AssetEndpointProfileProperties","com.azure.resourcemanager.deviceregistry.models.AssetEndpointProfileStatus":"Microsoft.DeviceRegistry.AssetEndpointProfileStatus","com.azure.resourcemanager.deviceregistry.models.AssetEndpointProfileStatusError":"Microsoft.DeviceRegistry.AssetEndpointProfileStatusError","com.azure.resourcemanager.deviceregistry.models.AssetEndpointProfileUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.AssetEndpointProfileUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.AssetProperties":"Microsoft.DeviceRegistry.AssetProperties","com.azure.resourcemanager.deviceregistry.models.AssetStatus":"Microsoft.DeviceRegistry.AssetStatus","com.azure.resourcemanager.deviceregistry.models.AssetStatusDataset":"Microsoft.DeviceRegistry.AssetStatusDataset","com.azure.resourcemanager.deviceregistry.models.AssetStatusError":"Microsoft.DeviceRegistry.AssetStatusError","com.azure.resourcemanager.deviceregistry.models.AssetStatusEvent":"Microsoft.DeviceRegistry.AssetStatusEvent","com.azure.resourcemanager.deviceregistry.models.AssetUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.AssetUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.Authentication":"Microsoft.DeviceRegistry.Authentication","com.azure.resourcemanager.deviceregistry.models.AuthenticationMethod":"Microsoft.DeviceRegistry.AuthenticationMethod","com.azure.resourcemanager.deviceregistry.models.BillingContainerProperties":"Microsoft.DeviceRegistry.BillingContainerProperties","com.azure.resourcemanager.deviceregistry.models.BrokerStateStoreDestinationConfiguration":"Microsoft.DeviceRegistry.BrokerStateStoreDestinationConfiguration","com.azure.resourcemanager.deviceregistry.models.CertificateAuthorityConfiguration":"Microsoft.DeviceRegistry.CertificateAuthorityConfiguration","com.azure.resourcemanager.deviceregistry.models.CertificateConfiguration":"Microsoft.DeviceRegistry.CertificateConfiguration","com.azure.resourcemanager.deviceregistry.models.CredentialProperties":"Microsoft.DeviceRegistry.CredentialProperties","com.azure.resourcemanager.deviceregistry.models.CredentialUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.DataPoint":"Microsoft.DeviceRegistry.DataPoint","com.azure.resourcemanager.deviceregistry.models.DataPointBase":"Microsoft.DeviceRegistry.DataPointBase","com.azure.resourcemanager.deviceregistry.models.DataPointObservabilityMode":"Microsoft.DeviceRegistry.DataPointObservabilityMode","com.azure.resourcemanager.deviceregistry.models.Dataset":"Microsoft.DeviceRegistry.Dataset","com.azure.resourcemanager.deviceregistry.models.DatasetBrokerStateStoreDestination":"Microsoft.DeviceRegistry.DatasetBrokerStateStoreDestination","com.azure.resourcemanager.deviceregistry.models.DatasetDestination":"Microsoft.DeviceRegistry.DatasetDestination","com.azure.resourcemanager.deviceregistry.models.DatasetDestinationTarget":"Microsoft.DeviceRegistry.DatasetDestinationTarget","com.azure.resourcemanager.deviceregistry.models.DatasetMqttDestination":"Microsoft.DeviceRegistry.DatasetMqttDestination","com.azure.resourcemanager.deviceregistry.models.DatasetStorageDestination":"Microsoft.DeviceRegistry.DatasetStorageDestination","com.azure.resourcemanager.deviceregistry.models.DeviceCredentialPolicy":"Microsoft.DeviceRegistry.DeviceCredentialPolicy","com.azure.resourcemanager.deviceregistry.models.DeviceMessagingEndpoint":"Microsoft.DeviceRegistry.DeviceMessagingEndpoint","com.azure.resourcemanager.deviceregistry.models.DeviceRef":"Microsoft.DeviceRegistry.DeviceRef","com.azure.resourcemanager.deviceregistry.models.DeviceStatus":"Microsoft.DeviceRegistry.DeviceStatus","com.azure.resourcemanager.deviceregistry.models.DeviceStatusEndpoint":"Microsoft.DeviceRegistry.DeviceStatusEndpoint","com.azure.resourcemanager.deviceregistry.models.DeviceStatusEndpoints":"Microsoft.DeviceRegistry.DeviceStatusEndpoints","com.azure.resourcemanager.deviceregistry.models.DiscoveredInboundEndpoints":"Microsoft.DeviceRegistry.DiscoveredInboundEndpoints","com.azure.resourcemanager.deviceregistry.models.DiscoveredMessagingEndpoints":"Microsoft.DeviceRegistry.DiscoveredMessagingEndpoints","com.azure.resourcemanager.deviceregistry.models.DiscoveredOutboundEndpoints":"Microsoft.DeviceRegistry.DiscoveredOutboundEndpoints","com.azure.resourcemanager.deviceregistry.models.ErrorDetails":"Microsoft.DeviceRegistry.ErrorDetails","com.azure.resourcemanager.deviceregistry.models.Event":"Microsoft.DeviceRegistry.Event","com.azure.resourcemanager.deviceregistry.models.EventBase":"Microsoft.DeviceRegistry.EventBase","com.azure.resourcemanager.deviceregistry.models.EventDestination":"Microsoft.DeviceRegistry.EventDestination","com.azure.resourcemanager.deviceregistry.models.EventDestinationTarget":"Microsoft.DeviceRegistry.EventDestinationTarget","com.azure.resourcemanager.deviceregistry.models.EventMqttDestination":"Microsoft.DeviceRegistry.EventMqttDestination","com.azure.resourcemanager.deviceregistry.models.EventObservabilityMode":"Microsoft.DeviceRegistry.EventObservabilityMode","com.azure.resourcemanager.deviceregistry.models.EventStorageDestination":"Microsoft.DeviceRegistry.EventStorageDestination","com.azure.resourcemanager.deviceregistry.models.ExtendedLocation":"Microsoft.DeviceRegistry.ExtendedLocation","com.azure.resourcemanager.deviceregistry.models.Format":"Microsoft.DeviceRegistry.Format","com.azure.resourcemanager.deviceregistry.models.HostAuthentication":"Microsoft.DeviceRegistry.HostAuthentication","com.azure.resourcemanager.deviceregistry.models.InboundEndpoints":"Microsoft.DeviceRegistry.InboundEndpoints","com.azure.resourcemanager.deviceregistry.models.LeafCertificateConfiguration":"Microsoft.DeviceRegistry.LeafCertificateConfiguration","com.azure.resourcemanager.deviceregistry.models.ManagementAction":"Microsoft.DeviceRegistry.ManagementAction","com.azure.resourcemanager.deviceregistry.models.ManagementActionType":"Microsoft.DeviceRegistry.ManagementActionType","com.azure.resourcemanager.deviceregistry.models.ManagementGroup":"Microsoft.DeviceRegistry.ManagementGroup","com.azure.resourcemanager.deviceregistry.models.MessageSchemaReference":"Microsoft.DeviceRegistry.MessageSchemaReference","com.azure.resourcemanager.deviceregistry.models.Messaging":"Microsoft.DeviceRegistry.Messaging","com.azure.resourcemanager.deviceregistry.models.MessagingEndpoint":"Microsoft.DeviceRegistry.MessagingEndpoint","com.azure.resourcemanager.deviceregistry.models.MessagingEndpoints":"Microsoft.DeviceRegistry.MessagingEndpoints","com.azure.resourcemanager.deviceregistry.models.MqttDestinationConfiguration":"Microsoft.DeviceRegistry.MqttDestinationConfiguration","com.azure.resourcemanager.deviceregistry.models.MqttDestinationQos":"Microsoft.DeviceRegistry.MqttDestinationQos","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetProperties":"Microsoft.DeviceRegistry.NamespaceAssetProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetStatus":"Microsoft.DeviceRegistry.NamespaceAssetStatus","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetStatusDataset":"Microsoft.DeviceRegistry.NamespaceAssetStatusDataset","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetStatusEvent":"Microsoft.DeviceRegistry.NamespaceAssetStatusEvent","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetStatusEventGroup":"Microsoft.DeviceRegistry.NamespaceAssetStatusEventGroup","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetStatusManagementAction":"Microsoft.DeviceRegistry.NamespaceAssetStatusManagementAction","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetStatusManagementGroup":"Microsoft.DeviceRegistry.NamespaceAssetStatusManagementGroup","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetStatusStream":"Microsoft.DeviceRegistry.NamespaceAssetStatusStream","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.NamespaceAssetUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceDataset":"Microsoft.DeviceRegistry.NamespaceDataset","com.azure.resourcemanager.deviceregistry.models.NamespaceDatasetDataPoint":"Microsoft.DeviceRegistry.NamespaceDatasetDataPoint","com.azure.resourcemanager.deviceregistry.models.NamespaceDeviceProperties":"Microsoft.DeviceRegistry.NamespaceDeviceProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceDeviceUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.NamespaceDeviceUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredAssetProperties":"Microsoft.DeviceRegistry.NamespaceDiscoveredAssetProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredAssetUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredAssetUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredDataset":"Microsoft.DeviceRegistry.NamespaceDiscoveredDataset","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredDatasetDataPoint":"Microsoft.DeviceRegistry.NamespaceDiscoveredDatasetDataPoint","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredDeviceProperties":"Microsoft.DeviceRegistry.NamespaceDiscoveredDeviceProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredDeviceUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredDeviceUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredEvent":"Microsoft.DeviceRegistry.NamespaceDiscoveredEvent","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredEventGroup":"Microsoft.DeviceRegistry.NamespaceDiscoveredEventGroup","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredManagementAction":"Microsoft.DeviceRegistry.NamespaceDiscoveredManagementAction","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredManagementActionType":"Microsoft.DeviceRegistry.NamespaceDiscoveredManagementActionType","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredManagementGroup":"Microsoft.DeviceRegistry.NamespaceDiscoveredManagementGroup","com.azure.resourcemanager.deviceregistry.models.NamespaceDiscoveredStream":"Microsoft.DeviceRegistry.NamespaceDiscoveredStream","com.azure.resourcemanager.deviceregistry.models.NamespaceEvent":"Microsoft.DeviceRegistry.NamespaceEvent","com.azure.resourcemanager.deviceregistry.models.NamespaceEventGroup":"Microsoft.DeviceRegistry.NamespaceEventGroup","com.azure.resourcemanager.deviceregistry.models.NamespaceMessageSchemaReference":"Microsoft.DeviceRegistry.NamespaceMessageSchemaReference","com.azure.resourcemanager.deviceregistry.models.NamespaceMigrateRequest":"Microsoft.DeviceRegistry.NamespaceMigrateRequest","com.azure.resourcemanager.deviceregistry.models.NamespaceProperties":"Microsoft.DeviceRegistry.NamespaceProperties","com.azure.resourcemanager.deviceregistry.models.NamespaceStream":"Microsoft.DeviceRegistry.NamespaceStream","com.azure.resourcemanager.deviceregistry.models.NamespaceUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.NamespaceUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.deviceregistry.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.deviceregistry.models.OutboundEndpoints":"Microsoft.DeviceRegistry.OutboundEndpoints","com.azure.resourcemanager.deviceregistry.models.PolicyProperties":"Microsoft.DeviceRegistry.PolicyProperties","com.azure.resourcemanager.deviceregistry.models.PolicyUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.PolicyUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.ProvisioningState":"Microsoft.DeviceRegistry.ProvisioningState","com.azure.resourcemanager.deviceregistry.models.SchemaProperties":"Microsoft.DeviceRegistry.SchemaProperties","com.azure.resourcemanager.deviceregistry.models.SchemaRegistryProperties":"Microsoft.DeviceRegistry.SchemaRegistryProperties","com.azure.resourcemanager.deviceregistry.models.SchemaRegistryUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.deviceregistry.models.SchemaRegistryUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.deviceregistry.models.SchemaType":"Microsoft.DeviceRegistry.SchemaType","com.azure.resourcemanager.deviceregistry.models.SchemaVersionProperties":"Microsoft.DeviceRegistry.SchemaVersionProperties","com.azure.resourcemanager.deviceregistry.models.Scope":"Microsoft.DeviceRegistry.Scope","com.azure.resourcemanager.deviceregistry.models.StatusConfig":"Microsoft.DeviceRegistry.StatusConfig","com.azure.resourcemanager.deviceregistry.models.StatusError":"Microsoft.DeviceRegistry.StatusError","com.azure.resourcemanager.deviceregistry.models.StorageDestinationConfiguration":"Microsoft.DeviceRegistry.StorageDestinationConfiguration","com.azure.resourcemanager.deviceregistry.models.StreamDestination":"Microsoft.DeviceRegistry.StreamDestination","com.azure.resourcemanager.deviceregistry.models.StreamDestinationTarget":"Microsoft.DeviceRegistry.StreamDestinationTarget","com.azure.resourcemanager.deviceregistry.models.StreamMqttDestination":"Microsoft.DeviceRegistry.StreamMqttDestination","com.azure.resourcemanager.deviceregistry.models.StreamStorageDestination":"Microsoft.DeviceRegistry.StreamStorageDestination","com.azure.resourcemanager.deviceregistry.models.SupportedKeyType":"Microsoft.DeviceRegistry.SupportedKeyType","com.azure.resourcemanager.deviceregistry.models.SystemAssignedServiceIdentity":"Azure.ResourceManager.CommonTypes.SystemAssignedServiceIdentity","com.azure.resourcemanager.deviceregistry.models.SystemAssignedServiceIdentityType":"Azure.ResourceManager.CommonTypes.SystemAssignedServiceIdentityType","com.azure.resourcemanager.deviceregistry.models.Topic":"Microsoft.DeviceRegistry.Topic","com.azure.resourcemanager.deviceregistry.models.TopicRetainType":"Microsoft.DeviceRegistry.TopicRetainType","com.azure.resourcemanager.deviceregistry.models.TrustSettings":"Microsoft.DeviceRegistry.TrustSettings","com.azure.resourcemanager.deviceregistry.models.UsernamePasswordCredentials":"Microsoft.DeviceRegistry.UsernamePasswordCredentials","com.azure.resourcemanager.deviceregistry.models.X509CertificateCredentials":"Microsoft.DeviceRegistry.X509CertificateCredentials","com.azure.resourcemanager.deviceregistry.models.X509Credentials":"Microsoft.DeviceRegistry.X509Credentials"},"generatedFiles":["src/main/java/com/azure/resourcemanager/deviceregistry/DeviceRegistryManager.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/AssetEndpointProfilesClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/AssetsClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/BillingContainersClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/CredentialsClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/DeviceRegistryManagementClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/NamespaceAssetsClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/NamespaceDevicesClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/NamespaceDiscoveredAssetsClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/NamespaceDiscoveredDevicesClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/NamespacesClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/OperationStatusClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/PoliciesClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemaRegistriesClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemaVersionsClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemasClient.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/AssetEndpointProfileInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/AssetInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/BillingContainerInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/CredentialInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/NamespaceAssetInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/NamespaceDeviceInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/NamespaceDiscoveredAssetInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/NamespaceDiscoveredDeviceInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/NamespaceInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/OperationStatusResultInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/PolicyInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/SchemaInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/SchemaRegistryInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/SchemaVersionInner.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/deviceregistry/fluent/package-info.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetEndpointProfileImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetEndpointProfilesClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetEndpointProfilesImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetsClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetsImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainerImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainersClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainersImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/CredentialImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/CredentialsClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/CredentialsImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DeviceRegistryManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DeviceRegistryManagementClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceAssetImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceAssetsClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceAssetsImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDeviceImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDevicesClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDevicesImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDiscoveredAssetImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDiscoveredAssetsClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDiscoveredAssetsImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDiscoveredDeviceImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDiscoveredDevicesClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceDiscoveredDevicesImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespaceImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespacesClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/NamespacesImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/OperationStatusClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/OperationStatusImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/OperationStatusResultImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/PoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/PoliciesImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/PolicyImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaRegistriesClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaRegistriesImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaRegistryImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaVersionImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaVersionsImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemasClientImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemasImpl.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/AssetEndpointProfileListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/AssetListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/BillingContainerListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/CredentialListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/NamespaceAssetListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/NamespaceDeviceListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/NamespaceDiscoveredAssetListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/NamespaceDiscoveredDeviceListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/NamespaceListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/PolicyListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/SchemaListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/SchemaRegistryListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/SchemaVersionListResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/implementation/package-info.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/ActionType.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Asset.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetEndpointProfile.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetEndpointProfileProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetEndpointProfileStatus.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetEndpointProfileStatusError.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetEndpointProfileUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetEndpointProfileUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetEndpointProfiles.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetStatus.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetStatusDataset.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetStatusError.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetStatusEvent.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Assets.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Authentication.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/AuthenticationMethod.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/BillingContainer.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/BillingContainerProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/BillingContainers.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/BrokerStateStoreDestinationConfiguration.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/CertificateAuthorityConfiguration.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/CertificateConfiguration.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Credential.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/CredentialProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/CredentialUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Credentials.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DataPoint.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DataPointBase.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DataPointObservabilityMode.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Dataset.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DatasetBrokerStateStoreDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DatasetDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DatasetDestinationTarget.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DatasetMqttDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DatasetStorageDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DeviceCredentialPolicy.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DeviceMessagingEndpoint.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DeviceRef.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DeviceStatus.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DeviceStatusEndpoint.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DeviceStatusEndpoints.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredInboundEndpoints.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredMessagingEndpoints.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredOutboundEndpoints.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/ErrorDetails.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Event.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/EventBase.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/EventDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/EventDestinationTarget.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/EventMqttDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/EventObservabilityMode.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/EventStorageDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Format.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/HostAuthentication.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/InboundEndpoints.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/LeafCertificateConfiguration.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/ManagementAction.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/ManagementActionType.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/ManagementGroup.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/MessageSchemaReference.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Messaging.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/MessagingEndpoint.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/MessagingEndpoints.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/MqttDestinationConfiguration.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/MqttDestinationQos.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Namespace.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAsset.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetStatus.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetStatusDataset.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetStatusEvent.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetStatusEventGroup.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetStatusManagementAction.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetStatusManagementGroup.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetStatusStream.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssetUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceAssets.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDataset.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDatasetDataPoint.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDevice.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDeviceProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDeviceUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDeviceUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDevices.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredAsset.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredAssetProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredAssetUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredAssetUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredAssets.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredDataset.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredDatasetDataPoint.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredDevice.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredDeviceProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredDeviceUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredDeviceUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredDevices.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredEvent.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredEventGroup.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredManagementAction.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredManagementActionType.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredManagementGroup.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceDiscoveredStream.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceEvent.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceEventGroup.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceMessageSchemaReference.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceMigrateRequest.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceStream.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/NamespaceUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Namespaces.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Operation.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/OperationStatus.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/OperationStatusResult.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Operations.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Origin.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/OutboundEndpoints.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Policies.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Policy.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/PolicyProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/PolicyUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/PolicyUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Schema.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaRegistries.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaRegistry.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaRegistryProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaRegistryUpdate.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaRegistryUpdateProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaType.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaVersion.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaVersionProperties.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaVersions.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Schemas.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Scope.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/StatusConfig.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/StatusError.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/StorageDestinationConfiguration.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/StreamDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/StreamDestinationTarget.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/StreamMqttDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/StreamStorageDestination.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SupportedKeyType.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SystemAssignedServiceIdentity.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/SystemAssignedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/Topic.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/TopicRetainType.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/TrustSettings.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/UsernamePasswordCredentials.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/X509CertificateCredentials.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/X509Credentials.java","src/main/java/com/azure/resourcemanager/deviceregistry/models/package-info.java","src/main/java/com/azure/resourcemanager/deviceregistry/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/tsp-location.yaml b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/tsp-location.yaml index e96ff17ee7d4..887c7243ea1a 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/tsp-location.yaml +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/dnsresolver/resource-manager/Microsoft.Network/DnsResolver -commit: 3ec630fc62ebc03e9adf238cb2fb0b538d93ead4 +commit: efa49a123da7ce3ffe093a13832258305f529711 repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/AADProfileProperties.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/AadProfileProperties.java similarity index 76% rename from sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/AADProfileProperties.java rename to sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/AadProfileProperties.java index 1bff722eecc4..743ed66fc03b 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/AADProfileProperties.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/AadProfileProperties.java @@ -15,7 +15,7 @@ * The AAD Profile. */ @Immutable -public final class AADProfileProperties implements JsonSerializable<AADProfileProperties> { +public final class AadProfileProperties implements JsonSerializable<AadProfileProperties> { /* * The arc ingress gateway server app id. */ @@ -27,9 +27,9 @@ public final class AADProfileProperties implements JsonSerializable<AADProfilePr private String tenantId; /** - * Creates an instance of AADProfileProperties class. + * Creates an instance of AadProfileProperties class. */ - private AADProfileProperties() { + private AadProfileProperties() { } /** @@ -62,31 +62,31 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of AADProfileProperties from the JsonReader. + * Reads an instance of AadProfileProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of AADProfileProperties if the JsonReader was pointing to an instance of it, or null if it + * @return An instance of AadProfileProperties if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AADProfileProperties. + * @throws IOException If an error occurs while reading the AadProfileProperties. */ - public static AADProfileProperties fromJson(JsonReader jsonReader) throws IOException { + public static AadProfileProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - AADProfileProperties deserializedAADProfileProperties = new AADProfileProperties(); + AadProfileProperties deserializedAadProfileProperties = new AadProfileProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("serverId".equals(fieldName)) { - deserializedAADProfileProperties.serverId = reader.getString(); + deserializedAadProfileProperties.serverId = reader.getString(); } else if ("tenantId".equals(fieldName)) { - deserializedAADProfileProperties.tenantId = reader.getString(); + deserializedAadProfileProperties.tenantId = reader.getString(); } else { reader.skipChildren(); } } - return deserializedAADProfileProperties; + return deserializedAadProfileProperties; }); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/IngressProfileProperties.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/IngressProfileProperties.java index f99bfce7f02b..cbf76e267770 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/IngressProfileProperties.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/IngressProfileProperties.java @@ -24,7 +24,7 @@ public final class IngressProfileProperties implements JsonSerializable<IngressP /* * The AAD Profile */ - private AADProfileProperties innerAadProfile; + private AadProfileProperties innerAadProfile; /** * Creates an instance of IngressProfileProperties class. @@ -46,7 +46,7 @@ public String hostname() { * * @return the innerAadProfile value. */ - private AADProfileProperties innerAadProfile() { + private AadProfileProperties innerAadProfile() { return this.innerAadProfile; } @@ -98,7 +98,7 @@ public static IngressProfileProperties fromJson(JsonReader jsonReader) throws IO if ("hostname".equals(fieldName)) { deserializedIngressProfileProperties.hostname = reader.getString(); } else if ("aadProfile".equals(fieldName)) { - deserializedIngressProfileProperties.innerAadProfile = AADProfileProperties.fromJson(reader); + deserializedIngressProfileProperties.innerAadProfile = AadProfileProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/resources/META-INF/azure-resourcemanager-hybridconnectivity_apiview_properties.json b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/resources/META-INF/azure-resourcemanager-hybridconnectivity_apiview_properties.json index 4fcaed5dc2d0..44c23c530167 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/resources/META-INF/azure-resourcemanager-hybridconnectivity_apiview_properties.json +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/resources/META-INF/azure-resourcemanager-hybridconnectivity_apiview_properties.json @@ -67,7 +67,7 @@ "com.azure.resourcemanager.hybridconnectivity.fluent.SolutionTypesClient.getByResourceGroupWithResponse": "Microsoft.HybridConnectivity.SolutionTypes.get", "com.azure.resourcemanager.hybridconnectivity.fluent.SolutionTypesClient.list": "Microsoft.HybridConnectivity.SolutionTypes.listBySubscription", "com.azure.resourcemanager.hybridconnectivity.fluent.SolutionTypesClient.listByResourceGroup": "Microsoft.HybridConnectivity.SolutionTypes.listByResourceGroup", - "com.azure.resourcemanager.hybridconnectivity.fluent.models.AADProfileProperties": "Microsoft.HybridConnectivity.AADProfileProperties", + "com.azure.resourcemanager.hybridconnectivity.fluent.models.AadProfileProperties": "Microsoft.HybridConnectivity.AADProfileProperties", "com.azure.resourcemanager.hybridconnectivity.fluent.models.EndpointAccessResourceInner": "Microsoft.HybridConnectivity.EndpointAccessResource", "com.azure.resourcemanager.hybridconnectivity.fluent.models.EndpointResourceInner": "Microsoft.HybridConnectivity.EndpointResource", "com.azure.resourcemanager.hybridconnectivity.fluent.models.GenerateAwsTemplateResponseInner": "Microsoft.HybridConnectivity.GenerateAwsTemplateResponse", diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/resources/META-INF/azure-resourcemanager-hybridconnectivity_metadata.json b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/resources/META-INF/azure-resourcemanager-hybridconnectivity_metadata.json index 3c1599449e08..bc8f7da8ddf4 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/resources/META-INF/azure-resourcemanager-hybridconnectivity_metadata.json +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/resources/META-INF/azure-resourcemanager-hybridconnectivity_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersion":"2024-12-01","crossLanguageDefinitions":{"com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient":"Microsoft.HybridConnectivity.EndpointResources","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.createOrUpdate":"Microsoft.HybridConnectivity.EndpointResources.createOrUpdate","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.createOrUpdateWithResponse":"Microsoft.HybridConnectivity.EndpointResources.createOrUpdate","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.delete":"Microsoft.HybridConnectivity.EndpointResources.delete","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.deleteWithResponse":"Microsoft.HybridConnectivity.EndpointResources.delete","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.get":"Microsoft.HybridConnectivity.EndpointResources.get","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.getWithResponse":"Microsoft.HybridConnectivity.EndpointResources.get","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.list":"Microsoft.HybridConnectivity.EndpointResources.list","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.listCredentials":"Microsoft.HybridConnectivity.EndpointResources.listCredentials","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.listCredentialsWithResponse":"Microsoft.HybridConnectivity.EndpointResources.listCredentials","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.listIngressGatewayCredentials":"Microsoft.HybridConnectivity.EndpointResources.listIngressGatewayCredentials","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.listIngressGatewayCredentialsWithResponse":"Microsoft.HybridConnectivity.EndpointResources.listIngressGatewayCredentials","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.listManagedProxyDetails":"Microsoft.HybridConnectivity.EndpointResources.listManagedProxyDetails","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.listManagedProxyDetailsWithResponse":"Microsoft.HybridConnectivity.EndpointResources.listManagedProxyDetails","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.update":"Microsoft.HybridConnectivity.EndpointResources.update","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.updateWithResponse":"Microsoft.HybridConnectivity.EndpointResources.update","com.azure.resourcemanager.hybridconnectivity.fluent.GenerateAwsTemplatesClient":"Microsoft.HybridConnectivity.GenerateAwsTemplate","com.azure.resourcemanager.hybridconnectivity.fluent.GenerateAwsTemplatesClient.post":"Microsoft.HybridConnectivity.GenerateAwsTemplate.post","com.azure.resourcemanager.hybridconnectivity.fluent.GenerateAwsTemplatesClient.postWithResponse":"Microsoft.HybridConnectivity.GenerateAwsTemplate.post","com.azure.resourcemanager.hybridconnectivity.fluent.HybridConnectivityMgmtClient":"Microsoft.HybridConnectivity","com.azure.resourcemanager.hybridconnectivity.fluent.InventoriesClient":"Microsoft.HybridConnectivity.Inventory","com.azure.resourcemanager.hybridconnectivity.fluent.InventoriesClient.get":"Microsoft.HybridConnectivity.Inventory.get","com.azure.resourcemanager.hybridconnectivity.fluent.InventoriesClient.getWithResponse":"Microsoft.HybridConnectivity.Inventory.get","com.azure.resourcemanager.hybridconnectivity.fluent.InventoriesClient.listBySolutionConfiguration":"Microsoft.HybridConnectivity.Inventory.listBySolutionConfiguration","com.azure.resourcemanager.hybridconnectivity.fluent.OperationsClient":"Microsoft.HybridConnectivity.Operations","com.azure.resourcemanager.hybridconnectivity.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient":"Microsoft.HybridConnectivity.PublicCloudConnectors","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.beginCreateOrUpdate":"Microsoft.HybridConnectivity.PublicCloudConnectors.createOrUpdate","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.beginTestPermissions":"Microsoft.HybridConnectivity.PublicCloudConnectors.testPermissions","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.createOrUpdate":"Microsoft.HybridConnectivity.PublicCloudConnectors.createOrUpdate","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.delete":"Microsoft.HybridConnectivity.PublicCloudConnectors.delete","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.deleteWithResponse":"Microsoft.HybridConnectivity.PublicCloudConnectors.delete","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.getByResourceGroup":"Microsoft.HybridConnectivity.PublicCloudConnectors.get","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.getByResourceGroupWithResponse":"Microsoft.HybridConnectivity.PublicCloudConnectors.get","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.list":"Microsoft.HybridConnectivity.PublicCloudConnectors.listBySubscription","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.listByResourceGroup":"Microsoft.HybridConnectivity.PublicCloudConnectors.listByResourceGroup","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.testPermissions":"Microsoft.HybridConnectivity.PublicCloudConnectors.testPermissions","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.update":"Microsoft.HybridConnectivity.PublicCloudConnectors.update","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.updateWithResponse":"Microsoft.HybridConnectivity.PublicCloudConnectors.update","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient":"Microsoft.HybridConnectivity.ServiceConfigurationResources","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.createOrupdate":"Microsoft.HybridConnectivity.ServiceConfigurationResources.createOrupdate","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.createOrupdateWithResponse":"Microsoft.HybridConnectivity.ServiceConfigurationResources.createOrupdate","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.delete":"Microsoft.HybridConnectivity.ServiceConfigurationResources.delete","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.deleteWithResponse":"Microsoft.HybridConnectivity.ServiceConfigurationResources.delete","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.get":"Microsoft.HybridConnectivity.ServiceConfigurationResources.get","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.getWithResponse":"Microsoft.HybridConnectivity.ServiceConfigurationResources.get","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.listByEndpointResource":"Microsoft.HybridConnectivity.ServiceConfigurationResources.listByEndpointResource","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.update":"Microsoft.HybridConnectivity.ServiceConfigurationResources.update","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.updateWithResponse":"Microsoft.HybridConnectivity.ServiceConfigurationResources.update","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient":"Microsoft.HybridConnectivity.SolutionConfigurations","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.beginSyncNow":"Microsoft.HybridConnectivity.SolutionConfigurations.syncNow","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.createOrUpdate":"Microsoft.HybridConnectivity.SolutionConfigurations.createOrUpdate","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.createOrUpdateWithResponse":"Microsoft.HybridConnectivity.SolutionConfigurations.createOrUpdate","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.delete":"Microsoft.HybridConnectivity.SolutionConfigurations.delete","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.deleteWithResponse":"Microsoft.HybridConnectivity.SolutionConfigurations.delete","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.get":"Microsoft.HybridConnectivity.SolutionConfigurations.get","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.getWithResponse":"Microsoft.HybridConnectivity.SolutionConfigurations.get","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.list":"Microsoft.HybridConnectivity.SolutionConfigurations.list","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.syncNow":"Microsoft.HybridConnectivity.SolutionConfigurations.syncNow","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.update":"Microsoft.HybridConnectivity.SolutionConfigurations.update","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.updateWithResponse":"Microsoft.HybridConnectivity.SolutionConfigurations.update","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionTypesClient":"Microsoft.HybridConnectivity.SolutionTypes","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionTypesClient.getByResourceGroup":"Microsoft.HybridConnectivity.SolutionTypes.get","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionTypesClient.getByResourceGroupWithResponse":"Microsoft.HybridConnectivity.SolutionTypes.get","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionTypesClient.list":"Microsoft.HybridConnectivity.SolutionTypes.listBySubscription","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionTypesClient.listByResourceGroup":"Microsoft.HybridConnectivity.SolutionTypes.listByResourceGroup","com.azure.resourcemanager.hybridconnectivity.fluent.models.AADProfileProperties":"Microsoft.HybridConnectivity.AADProfileProperties","com.azure.resourcemanager.hybridconnectivity.fluent.models.EndpointAccessResourceInner":"Microsoft.HybridConnectivity.EndpointAccessResource","com.azure.resourcemanager.hybridconnectivity.fluent.models.EndpointResourceInner":"Microsoft.HybridConnectivity.EndpointResource","com.azure.resourcemanager.hybridconnectivity.fluent.models.GenerateAwsTemplateResponseInner":"Microsoft.HybridConnectivity.GenerateAwsTemplateResponse","com.azure.resourcemanager.hybridconnectivity.fluent.models.IngressGatewayResourceInner":"Microsoft.HybridConnectivity.IngressGatewayResource","com.azure.resourcemanager.hybridconnectivity.fluent.models.IngressProfileProperties":"Microsoft.HybridConnectivity.IngressProfileProperties","com.azure.resourcemanager.hybridconnectivity.fluent.models.InventoryResourceInner":"Microsoft.HybridConnectivity.InventoryResource","com.azure.resourcemanager.hybridconnectivity.fluent.models.ManagedProxyResourceInner":"Microsoft.HybridConnectivity.ManagedProxyResource","com.azure.resourcemanager.hybridconnectivity.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.hybridconnectivity.fluent.models.OperationStatusResultInner":"Azure.ResourceManager.CommonTypes.OperationStatusResult","com.azure.resourcemanager.hybridconnectivity.fluent.models.PublicCloudConnectorInner":"Microsoft.HybridConnectivity.PublicCloudConnector","com.azure.resourcemanager.hybridconnectivity.fluent.models.RelayNamespaceAccessProperties":"Microsoft.HybridConnectivity.RelayNamespaceAccessProperties","com.azure.resourcemanager.hybridconnectivity.fluent.models.ServiceConfigurationProperties":"Microsoft.HybridConnectivity.ServiceConfigurationProperties","com.azure.resourcemanager.hybridconnectivity.fluent.models.ServiceConfigurationPropertiesPatch":"Microsoft.HybridConnectivity.ServiceConfigurationPropertiesPatch","com.azure.resourcemanager.hybridconnectivity.fluent.models.ServiceConfigurationResourceInner":"Microsoft.HybridConnectivity.ServiceConfigurationResource","com.azure.resourcemanager.hybridconnectivity.fluent.models.SolutionConfigurationInner":"Microsoft.HybridConnectivity.SolutionConfiguration","com.azure.resourcemanager.hybridconnectivity.fluent.models.SolutionTypeResourceInner":"Microsoft.HybridConnectivity.SolutionTypeResource","com.azure.resourcemanager.hybridconnectivity.implementation.HybridConnectivityMgmtClientBuilder":"Microsoft.HybridConnectivity","com.azure.resourcemanager.hybridconnectivity.implementation.models.EndpointsList":"Microsoft.HybridConnectivity.EndpointsList","com.azure.resourcemanager.hybridconnectivity.implementation.models.InventoryResourceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.hybridconnectivity.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.hybridconnectivity.implementation.models.PublicCloudConnectorListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.hybridconnectivity.implementation.models.ServiceConfigurationList":"Microsoft.HybridConnectivity.ServiceConfigurationList","com.azure.resourcemanager.hybridconnectivity.implementation.models.SolutionConfigurationListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.hybridconnectivity.implementation.models.SolutionTypeResourceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.hybridconnectivity.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.hybridconnectivity.models.AwsCloudProfile":"Microsoft.HybridConnectivity.AwsCloudProfile","com.azure.resourcemanager.hybridconnectivity.models.AwsCloudProfileUpdate":"Microsoft.HybridConnectivity.AwsCloudProfileUpdate","com.azure.resourcemanager.hybridconnectivity.models.CloudNativeType":"Microsoft.HybridConnectivity.CloudNativeType","com.azure.resourcemanager.hybridconnectivity.models.EndpointProperties":"Microsoft.HybridConnectivity.EndpointProperties","com.azure.resourcemanager.hybridconnectivity.models.GenerateAwsTemplateRequest":"Microsoft.HybridConnectivity.GenerateAwsTemplateRequest","com.azure.resourcemanager.hybridconnectivity.models.HostType":"Microsoft.HybridConnectivity.HostType","com.azure.resourcemanager.hybridconnectivity.models.InventoryProperties":"Microsoft.HybridConnectivity.InventoryProperties","com.azure.resourcemanager.hybridconnectivity.models.ListCredentialsRequest":"Microsoft.HybridConnectivity.ListCredentialsRequest","com.azure.resourcemanager.hybridconnectivity.models.ListIngressGatewayCredentialsRequest":"Microsoft.HybridConnectivity.ListIngressGatewayCredentialsRequest","com.azure.resourcemanager.hybridconnectivity.models.ManagedProxyRequest":"Microsoft.HybridConnectivity.ManagedProxyRequest","com.azure.resourcemanager.hybridconnectivity.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.hybridconnectivity.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.hybridconnectivity.models.ProvisioningState":"Microsoft.HybridConnectivity.ProvisioningState","com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorProperties":"Microsoft.HybridConnectivity.PublicCloudConnectorProperties","com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorPropertiesUpdate":"Microsoft.HybridConnectivity.PublicCloudConnectorPropertiesUpdate","com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorUpdate":"Microsoft.HybridConnectivity.PublicCloudConnectorUpdate","com.azure.resourcemanager.hybridconnectivity.models.ResourceProvisioningState":"Azure.ResourceManager.ResourceProvisioningState","com.azure.resourcemanager.hybridconnectivity.models.ServiceConfigurationResourcePatch":"Microsoft.HybridConnectivity.ServiceConfigurationResourcePatch","com.azure.resourcemanager.hybridconnectivity.models.ServiceName":"Microsoft.HybridConnectivity.ServiceName","com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationProperties":"Microsoft.HybridConnectivity.SolutionConfigurationProperties","com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationPropertiesUpdate":"Microsoft.HybridConnectivity.SolutionConfigurationPropertiesUpdate","com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationStatus":"Microsoft.HybridConnectivity.SolutionConfigurationStatus","com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationUpdate":"Microsoft.HybridConnectivity.SolutionConfigurationUpdate","com.azure.resourcemanager.hybridconnectivity.models.SolutionSettings":"Microsoft.HybridConnectivity.SolutionSettings","com.azure.resourcemanager.hybridconnectivity.models.SolutionTypeProperties":"Microsoft.HybridConnectivity.SolutionTypeProperties","com.azure.resourcemanager.hybridconnectivity.models.SolutionTypeSettings":"Microsoft.HybridConnectivity.SolutionTypeSettings","com.azure.resourcemanager.hybridconnectivity.models.SolutionTypeSettingsProperties":"Microsoft.HybridConnectivity.SolutionTypeSettingsProperties","com.azure.resourcemanager.hybridconnectivity.models.TrackedResourceUpdate":"Microsoft.HybridConnectivity.TrackedResourceUpdate","com.azure.resourcemanager.hybridconnectivity.models.Type":"Microsoft.HybridConnectivity.Type"},"generatedFiles":["src/main/java/com/azure/resourcemanager/hybridconnectivity/HybridConnectivityManager.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/EndpointsClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/GenerateAwsTemplatesClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/HybridConnectivityMgmtClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/InventoriesClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/PublicCloudConnectorsClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/ServiceConfigurationsClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/SolutionConfigurationsClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/SolutionTypesClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/AADProfileProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/EndpointAccessResourceInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/EndpointResourceInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/GenerateAwsTemplateResponseInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/IngressGatewayResourceInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/IngressProfileProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/InventoryResourceInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/ManagedProxyResourceInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/OperationStatusResultInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/PublicCloudConnectorInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/RelayNamespaceAccessProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/ServiceConfigurationProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/ServiceConfigurationPropertiesPatch.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/ServiceConfigurationResourceInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/SolutionConfigurationInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/SolutionTypeResourceInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/package-info.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointAccessResourceImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointResourceImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointsImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/GenerateAwsTemplateResponseImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/GenerateAwsTemplatesClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/GenerateAwsTemplatesImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/HybridConnectivityMgmtClientBuilder.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/HybridConnectivityMgmtClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/IngressGatewayResourceImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/InventoriesClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/InventoriesImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/InventoryResourceImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/ManagedProxyResourceImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/OperationStatusResultImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/PublicCloudConnectorImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/PublicCloudConnectorsClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/PublicCloudConnectorsImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/ServiceConfigurationResourceImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/ServiceConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/ServiceConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionConfigurationImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionTypeResourceImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionTypesClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionTypesImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/models/EndpointsList.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/models/InventoryResourceListResult.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/models/PublicCloudConnectorListResult.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/models/ServiceConfigurationList.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/models/SolutionConfigurationListResult.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/models/SolutionTypeResourceListResult.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/package-info.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ActionType.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/AwsCloudProfile.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/AwsCloudProfileUpdate.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/CloudNativeType.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/EndpointAccessResource.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/EndpointProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/EndpointResource.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/Endpoints.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/GenerateAwsTemplateRequest.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/GenerateAwsTemplateResponse.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/GenerateAwsTemplates.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/HostType.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/IngressGatewayResource.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/Inventories.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/InventoryProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/InventoryResource.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ListCredentialsRequest.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ListIngressGatewayCredentialsRequest.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ManagedProxyRequest.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ManagedProxyResource.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/Operation.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/OperationStatusResult.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/Operations.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/Origin.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnector.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnectorProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnectorPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnectorUpdate.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnectors.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ServiceConfigurationResource.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ServiceConfigurationResourcePatch.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ServiceConfigurations.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ServiceName.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfiguration.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfigurationProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfigurationPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfigurationStatus.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfigurationUpdate.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfigurations.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionSettings.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionTypeProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionTypeResource.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionTypeSettings.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionTypeSettingsProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionTypes.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/TrackedResourceUpdate.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/Type.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/package-info.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersion":"2024-12-01","crossLanguageDefinitions":{"com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient":"Microsoft.HybridConnectivity.EndpointResources","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.createOrUpdate":"Microsoft.HybridConnectivity.EndpointResources.createOrUpdate","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.createOrUpdateWithResponse":"Microsoft.HybridConnectivity.EndpointResources.createOrUpdate","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.delete":"Microsoft.HybridConnectivity.EndpointResources.delete","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.deleteWithResponse":"Microsoft.HybridConnectivity.EndpointResources.delete","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.get":"Microsoft.HybridConnectivity.EndpointResources.get","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.getWithResponse":"Microsoft.HybridConnectivity.EndpointResources.get","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.list":"Microsoft.HybridConnectivity.EndpointResources.list","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.listCredentials":"Microsoft.HybridConnectivity.EndpointResources.listCredentials","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.listCredentialsWithResponse":"Microsoft.HybridConnectivity.EndpointResources.listCredentials","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.listIngressGatewayCredentials":"Microsoft.HybridConnectivity.EndpointResources.listIngressGatewayCredentials","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.listIngressGatewayCredentialsWithResponse":"Microsoft.HybridConnectivity.EndpointResources.listIngressGatewayCredentials","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.listManagedProxyDetails":"Microsoft.HybridConnectivity.EndpointResources.listManagedProxyDetails","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.listManagedProxyDetailsWithResponse":"Microsoft.HybridConnectivity.EndpointResources.listManagedProxyDetails","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.update":"Microsoft.HybridConnectivity.EndpointResources.update","com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient.updateWithResponse":"Microsoft.HybridConnectivity.EndpointResources.update","com.azure.resourcemanager.hybridconnectivity.fluent.GenerateAwsTemplatesClient":"Microsoft.HybridConnectivity.GenerateAwsTemplate","com.azure.resourcemanager.hybridconnectivity.fluent.GenerateAwsTemplatesClient.post":"Microsoft.HybridConnectivity.GenerateAwsTemplate.post","com.azure.resourcemanager.hybridconnectivity.fluent.GenerateAwsTemplatesClient.postWithResponse":"Microsoft.HybridConnectivity.GenerateAwsTemplate.post","com.azure.resourcemanager.hybridconnectivity.fluent.HybridConnectivityMgmtClient":"Microsoft.HybridConnectivity","com.azure.resourcemanager.hybridconnectivity.fluent.InventoriesClient":"Microsoft.HybridConnectivity.Inventory","com.azure.resourcemanager.hybridconnectivity.fluent.InventoriesClient.get":"Microsoft.HybridConnectivity.Inventory.get","com.azure.resourcemanager.hybridconnectivity.fluent.InventoriesClient.getWithResponse":"Microsoft.HybridConnectivity.Inventory.get","com.azure.resourcemanager.hybridconnectivity.fluent.InventoriesClient.listBySolutionConfiguration":"Microsoft.HybridConnectivity.Inventory.listBySolutionConfiguration","com.azure.resourcemanager.hybridconnectivity.fluent.OperationsClient":"Microsoft.HybridConnectivity.Operations","com.azure.resourcemanager.hybridconnectivity.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient":"Microsoft.HybridConnectivity.PublicCloudConnectors","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.beginCreateOrUpdate":"Microsoft.HybridConnectivity.PublicCloudConnectors.createOrUpdate","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.beginTestPermissions":"Microsoft.HybridConnectivity.PublicCloudConnectors.testPermissions","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.createOrUpdate":"Microsoft.HybridConnectivity.PublicCloudConnectors.createOrUpdate","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.delete":"Microsoft.HybridConnectivity.PublicCloudConnectors.delete","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.deleteWithResponse":"Microsoft.HybridConnectivity.PublicCloudConnectors.delete","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.getByResourceGroup":"Microsoft.HybridConnectivity.PublicCloudConnectors.get","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.getByResourceGroupWithResponse":"Microsoft.HybridConnectivity.PublicCloudConnectors.get","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.list":"Microsoft.HybridConnectivity.PublicCloudConnectors.listBySubscription","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.listByResourceGroup":"Microsoft.HybridConnectivity.PublicCloudConnectors.listByResourceGroup","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.testPermissions":"Microsoft.HybridConnectivity.PublicCloudConnectors.testPermissions","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.update":"Microsoft.HybridConnectivity.PublicCloudConnectors.update","com.azure.resourcemanager.hybridconnectivity.fluent.PublicCloudConnectorsClient.updateWithResponse":"Microsoft.HybridConnectivity.PublicCloudConnectors.update","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient":"Microsoft.HybridConnectivity.ServiceConfigurationResources","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.createOrupdate":"Microsoft.HybridConnectivity.ServiceConfigurationResources.createOrupdate","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.createOrupdateWithResponse":"Microsoft.HybridConnectivity.ServiceConfigurationResources.createOrupdate","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.delete":"Microsoft.HybridConnectivity.ServiceConfigurationResources.delete","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.deleteWithResponse":"Microsoft.HybridConnectivity.ServiceConfigurationResources.delete","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.get":"Microsoft.HybridConnectivity.ServiceConfigurationResources.get","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.getWithResponse":"Microsoft.HybridConnectivity.ServiceConfigurationResources.get","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.listByEndpointResource":"Microsoft.HybridConnectivity.ServiceConfigurationResources.listByEndpointResource","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.update":"Microsoft.HybridConnectivity.ServiceConfigurationResources.update","com.azure.resourcemanager.hybridconnectivity.fluent.ServiceConfigurationsClient.updateWithResponse":"Microsoft.HybridConnectivity.ServiceConfigurationResources.update","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient":"Microsoft.HybridConnectivity.SolutionConfigurations","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.beginSyncNow":"Microsoft.HybridConnectivity.SolutionConfigurations.syncNow","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.createOrUpdate":"Microsoft.HybridConnectivity.SolutionConfigurations.createOrUpdate","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.createOrUpdateWithResponse":"Microsoft.HybridConnectivity.SolutionConfigurations.createOrUpdate","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.delete":"Microsoft.HybridConnectivity.SolutionConfigurations.delete","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.deleteWithResponse":"Microsoft.HybridConnectivity.SolutionConfigurations.delete","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.get":"Microsoft.HybridConnectivity.SolutionConfigurations.get","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.getWithResponse":"Microsoft.HybridConnectivity.SolutionConfigurations.get","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.list":"Microsoft.HybridConnectivity.SolutionConfigurations.list","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.syncNow":"Microsoft.HybridConnectivity.SolutionConfigurations.syncNow","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.update":"Microsoft.HybridConnectivity.SolutionConfigurations.update","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionConfigurationsClient.updateWithResponse":"Microsoft.HybridConnectivity.SolutionConfigurations.update","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionTypesClient":"Microsoft.HybridConnectivity.SolutionTypes","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionTypesClient.getByResourceGroup":"Microsoft.HybridConnectivity.SolutionTypes.get","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionTypesClient.getByResourceGroupWithResponse":"Microsoft.HybridConnectivity.SolutionTypes.get","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionTypesClient.list":"Microsoft.HybridConnectivity.SolutionTypes.listBySubscription","com.azure.resourcemanager.hybridconnectivity.fluent.SolutionTypesClient.listByResourceGroup":"Microsoft.HybridConnectivity.SolutionTypes.listByResourceGroup","com.azure.resourcemanager.hybridconnectivity.fluent.models.AadProfileProperties":"Microsoft.HybridConnectivity.AADProfileProperties","com.azure.resourcemanager.hybridconnectivity.fluent.models.EndpointAccessResourceInner":"Microsoft.HybridConnectivity.EndpointAccessResource","com.azure.resourcemanager.hybridconnectivity.fluent.models.EndpointResourceInner":"Microsoft.HybridConnectivity.EndpointResource","com.azure.resourcemanager.hybridconnectivity.fluent.models.GenerateAwsTemplateResponseInner":"Microsoft.HybridConnectivity.GenerateAwsTemplateResponse","com.azure.resourcemanager.hybridconnectivity.fluent.models.IngressGatewayResourceInner":"Microsoft.HybridConnectivity.IngressGatewayResource","com.azure.resourcemanager.hybridconnectivity.fluent.models.IngressProfileProperties":"Microsoft.HybridConnectivity.IngressProfileProperties","com.azure.resourcemanager.hybridconnectivity.fluent.models.InventoryResourceInner":"Microsoft.HybridConnectivity.InventoryResource","com.azure.resourcemanager.hybridconnectivity.fluent.models.ManagedProxyResourceInner":"Microsoft.HybridConnectivity.ManagedProxyResource","com.azure.resourcemanager.hybridconnectivity.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.hybridconnectivity.fluent.models.OperationStatusResultInner":"Azure.ResourceManager.CommonTypes.OperationStatusResult","com.azure.resourcemanager.hybridconnectivity.fluent.models.PublicCloudConnectorInner":"Microsoft.HybridConnectivity.PublicCloudConnector","com.azure.resourcemanager.hybridconnectivity.fluent.models.RelayNamespaceAccessProperties":"Microsoft.HybridConnectivity.RelayNamespaceAccessProperties","com.azure.resourcemanager.hybridconnectivity.fluent.models.ServiceConfigurationProperties":"Microsoft.HybridConnectivity.ServiceConfigurationProperties","com.azure.resourcemanager.hybridconnectivity.fluent.models.ServiceConfigurationPropertiesPatch":"Microsoft.HybridConnectivity.ServiceConfigurationPropertiesPatch","com.azure.resourcemanager.hybridconnectivity.fluent.models.ServiceConfigurationResourceInner":"Microsoft.HybridConnectivity.ServiceConfigurationResource","com.azure.resourcemanager.hybridconnectivity.fluent.models.SolutionConfigurationInner":"Microsoft.HybridConnectivity.SolutionConfiguration","com.azure.resourcemanager.hybridconnectivity.fluent.models.SolutionTypeResourceInner":"Microsoft.HybridConnectivity.SolutionTypeResource","com.azure.resourcemanager.hybridconnectivity.implementation.HybridConnectivityMgmtClientBuilder":"Microsoft.HybridConnectivity","com.azure.resourcemanager.hybridconnectivity.implementation.models.EndpointsList":"Microsoft.HybridConnectivity.EndpointsList","com.azure.resourcemanager.hybridconnectivity.implementation.models.InventoryResourceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.hybridconnectivity.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.hybridconnectivity.implementation.models.PublicCloudConnectorListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.hybridconnectivity.implementation.models.ServiceConfigurationList":"Microsoft.HybridConnectivity.ServiceConfigurationList","com.azure.resourcemanager.hybridconnectivity.implementation.models.SolutionConfigurationListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.hybridconnectivity.implementation.models.SolutionTypeResourceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.hybridconnectivity.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.hybridconnectivity.models.AwsCloudProfile":"Microsoft.HybridConnectivity.AwsCloudProfile","com.azure.resourcemanager.hybridconnectivity.models.AwsCloudProfileUpdate":"Microsoft.HybridConnectivity.AwsCloudProfileUpdate","com.azure.resourcemanager.hybridconnectivity.models.CloudNativeType":"Microsoft.HybridConnectivity.CloudNativeType","com.azure.resourcemanager.hybridconnectivity.models.EndpointProperties":"Microsoft.HybridConnectivity.EndpointProperties","com.azure.resourcemanager.hybridconnectivity.models.GenerateAwsTemplateRequest":"Microsoft.HybridConnectivity.GenerateAwsTemplateRequest","com.azure.resourcemanager.hybridconnectivity.models.HostType":"Microsoft.HybridConnectivity.HostType","com.azure.resourcemanager.hybridconnectivity.models.InventoryProperties":"Microsoft.HybridConnectivity.InventoryProperties","com.azure.resourcemanager.hybridconnectivity.models.ListCredentialsRequest":"Microsoft.HybridConnectivity.ListCredentialsRequest","com.azure.resourcemanager.hybridconnectivity.models.ListIngressGatewayCredentialsRequest":"Microsoft.HybridConnectivity.ListIngressGatewayCredentialsRequest","com.azure.resourcemanager.hybridconnectivity.models.ManagedProxyRequest":"Microsoft.HybridConnectivity.ManagedProxyRequest","com.azure.resourcemanager.hybridconnectivity.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.hybridconnectivity.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.hybridconnectivity.models.ProvisioningState":"Microsoft.HybridConnectivity.ProvisioningState","com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorProperties":"Microsoft.HybridConnectivity.PublicCloudConnectorProperties","com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorPropertiesUpdate":"Microsoft.HybridConnectivity.PublicCloudConnectorPropertiesUpdate","com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorUpdate":"Microsoft.HybridConnectivity.PublicCloudConnectorUpdate","com.azure.resourcemanager.hybridconnectivity.models.ResourceProvisioningState":"Azure.ResourceManager.ResourceProvisioningState","com.azure.resourcemanager.hybridconnectivity.models.ServiceConfigurationResourcePatch":"Microsoft.HybridConnectivity.ServiceConfigurationResourcePatch","com.azure.resourcemanager.hybridconnectivity.models.ServiceName":"Microsoft.HybridConnectivity.ServiceName","com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationProperties":"Microsoft.HybridConnectivity.SolutionConfigurationProperties","com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationPropertiesUpdate":"Microsoft.HybridConnectivity.SolutionConfigurationPropertiesUpdate","com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationStatus":"Microsoft.HybridConnectivity.SolutionConfigurationStatus","com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationUpdate":"Microsoft.HybridConnectivity.SolutionConfigurationUpdate","com.azure.resourcemanager.hybridconnectivity.models.SolutionSettings":"Microsoft.HybridConnectivity.SolutionSettings","com.azure.resourcemanager.hybridconnectivity.models.SolutionTypeProperties":"Microsoft.HybridConnectivity.SolutionTypeProperties","com.azure.resourcemanager.hybridconnectivity.models.SolutionTypeSettings":"Microsoft.HybridConnectivity.SolutionTypeSettings","com.azure.resourcemanager.hybridconnectivity.models.SolutionTypeSettingsProperties":"Microsoft.HybridConnectivity.SolutionTypeSettingsProperties","com.azure.resourcemanager.hybridconnectivity.models.TrackedResourceUpdate":"Microsoft.HybridConnectivity.TrackedResourceUpdate","com.azure.resourcemanager.hybridconnectivity.models.Type":"Microsoft.HybridConnectivity.Type"},"generatedFiles":["src/main/java/com/azure/resourcemanager/hybridconnectivity/HybridConnectivityManager.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/EndpointsClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/GenerateAwsTemplatesClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/HybridConnectivityMgmtClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/InventoriesClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/PublicCloudConnectorsClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/ServiceConfigurationsClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/SolutionConfigurationsClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/SolutionTypesClient.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/AadProfileProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/EndpointAccessResourceInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/EndpointResourceInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/GenerateAwsTemplateResponseInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/IngressGatewayResourceInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/IngressProfileProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/InventoryResourceInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/ManagedProxyResourceInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/OperationStatusResultInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/PublicCloudConnectorInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/RelayNamespaceAccessProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/ServiceConfigurationProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/ServiceConfigurationPropertiesPatch.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/ServiceConfigurationResourceInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/SolutionConfigurationInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/SolutionTypeResourceInner.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/package-info.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointAccessResourceImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointResourceImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointsImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/GenerateAwsTemplateResponseImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/GenerateAwsTemplatesClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/GenerateAwsTemplatesImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/HybridConnectivityMgmtClientBuilder.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/HybridConnectivityMgmtClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/IngressGatewayResourceImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/InventoriesClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/InventoriesImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/InventoryResourceImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/ManagedProxyResourceImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/OperationStatusResultImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/PublicCloudConnectorImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/PublicCloudConnectorsClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/PublicCloudConnectorsImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/ServiceConfigurationResourceImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/ServiceConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/ServiceConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionConfigurationImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionTypeResourceImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionTypesClientImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionTypesImpl.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/models/EndpointsList.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/models/InventoryResourceListResult.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/models/PublicCloudConnectorListResult.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/models/ServiceConfigurationList.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/models/SolutionConfigurationListResult.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/models/SolutionTypeResourceListResult.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/package-info.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ActionType.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/AwsCloudProfile.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/AwsCloudProfileUpdate.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/CloudNativeType.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/EndpointAccessResource.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/EndpointProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/EndpointResource.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/Endpoints.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/GenerateAwsTemplateRequest.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/GenerateAwsTemplateResponse.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/GenerateAwsTemplates.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/HostType.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/IngressGatewayResource.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/Inventories.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/InventoryProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/InventoryResource.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ListCredentialsRequest.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ListIngressGatewayCredentialsRequest.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ManagedProxyRequest.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ManagedProxyResource.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/Operation.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/OperationStatusResult.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/Operations.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/Origin.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnector.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnectorProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnectorPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnectorUpdate.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnectors.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ServiceConfigurationResource.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ServiceConfigurationResourcePatch.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ServiceConfigurations.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/ServiceName.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfiguration.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfigurationProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfigurationPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfigurationStatus.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfigurationUpdate.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfigurations.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionSettings.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionTypeProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionTypeResource.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionTypeSettings.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionTypeSettingsProperties.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionTypes.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/TrackedResourceUpdate.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/Type.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/models/package-info.java","src/main/java/com/azure/resourcemanager/hybridconnectivity/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/AADProfilePropertiesTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/AadProfilePropertiesTests.java similarity index 77% rename from sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/AADProfilePropertiesTests.java rename to sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/AadProfilePropertiesTests.java index b774e10940fa..82d5c63dc1be 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/AADProfilePropertiesTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/AadProfilePropertiesTests.java @@ -5,14 +5,14 @@ package com.azure.resourcemanager.hybridconnectivity.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridconnectivity.fluent.models.AADProfileProperties; +import com.azure.resourcemanager.hybridconnectivity.fluent.models.AadProfileProperties; import org.junit.jupiter.api.Assertions; -public final class AADProfilePropertiesTests { +public final class AadProfilePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AADProfileProperties model = BinaryData.fromString("{\"serverId\":\"qtrgqjbpfzfsinzg\",\"tenantId\":\"f\"}") - .toObject(AADProfileProperties.class); + AadProfileProperties model = BinaryData.fromString("{\"serverId\":\"qtrgqjbpfzfsinzg\",\"tenantId\":\"f\"}") + .toObject(AadProfileProperties.class); Assertions.assertEquals("qtrgqjbpfzfsinzg", model.serverId()); Assertions.assertEquals("f", model.tenantId()); } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/tsp-location.yaml b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/tsp-location.yaml index 51846c246c96..744404752096 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/tsp-location.yaml +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/hybridconnectivity/HybridConnectivity.Management -commit: 05584a1019e75159b0dc70a6751afaa2c77868e6 +commit: e9b44e3aefed8010c02f030abab631b55a8d29de repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/SAMPLE.md b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/SAMPLE.md index f0c26cb7af91..98c0ec84d8c1 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/SAMPLE.md +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/SAMPLE.md @@ -3,15 +3,37 @@ ## AutonomousDatabaseBackups +- [CreateOrUpdate](#autonomousdatabasebackups_createorupdate) +- [Delete](#autonomousdatabasebackups_delete) +- [Get](#autonomousdatabasebackups_get) - [ListByAutonomousDatabase](#autonomousdatabasebackups_listbyautonomousdatabase) - [Update](#autonomousdatabasebackups_update) +## AutonomousDatabaseCharacterSets + +- [Get](#autonomousdatabasecharactersets_get) +- [ListByLocation](#autonomousdatabasecharactersets_listbylocation) + +## AutonomousDatabaseNationalCharacterSets + +- [Get](#autonomousdatabasenationalcharactersets_get) +- [ListByLocation](#autonomousdatabasenationalcharactersets_listbylocation) + +## AutonomousDatabaseVersions + +- [Get](#autonomousdatabaseversions_get) +- [ListByLocation](#autonomousdatabaseversions_listbylocation) + ## AutonomousDatabases - [Action](#autonomousdatabases_action) - [ChangeDisasterRecoveryConfiguration](#autonomousdatabases_changedisasterrecoveryconfiguration) +- [CreateOrUpdate](#autonomousdatabases_createorupdate) +- [Delete](#autonomousdatabases_delete) - [Failover](#autonomousdatabases_failover) - [GenerateWallet](#autonomousdatabases_generatewallet) +- [GetByResourceGroup](#autonomousdatabases_getbyresourcegroup) +- [List](#autonomousdatabases_list) - [ListByResourceGroup](#autonomousdatabases_listbyresourcegroup) - [Restore](#autonomousdatabases_restore) - [Shrink](#autonomousdatabases_shrink) @@ -22,37 +44,79 @@ - [AddStorageCapacity](#cloudexadatainfrastructures_addstoragecapacity) - [ConfigureExascale](#cloudexadatainfrastructures_configureexascale) +- [CreateOrUpdate](#cloudexadatainfrastructures_createorupdate) +- [Delete](#cloudexadatainfrastructures_delete) +- [GetByResourceGroup](#cloudexadatainfrastructures_getbyresourcegroup) +- [List](#cloudexadatainfrastructures_list) +- [ListByResourceGroup](#cloudexadatainfrastructures_listbyresourcegroup) +- [Update](#cloudexadatainfrastructures_update) ## CloudVmClusters - [AddVms](#cloudvmclusters_addvms) +- [CreateOrUpdate](#cloudvmclusters_createorupdate) +- [Delete](#cloudvmclusters_delete) +- [GetByResourceGroup](#cloudvmclusters_getbyresourcegroup) +- [List](#cloudvmclusters_list) +- [ListByResourceGroup](#cloudvmclusters_listbyresourcegroup) - [ListPrivateIpAddresses](#cloudvmclusters_listprivateipaddresses) - [RemoveVms](#cloudvmclusters_removevms) +- [Update](#cloudvmclusters_update) ## DbNodes - [Action](#dbnodes_action) +- [Get](#dbnodes_get) - [ListByCloudVmCluster](#dbnodes_listbycloudvmcluster) ## DbServers +- [Get](#dbservers_get) - [ListByCloudExadataInfrastructure](#dbservers_listbycloudexadatainfrastructure) ## DbSystemShapes +- [Get](#dbsystemshapes_get) - [ListByLocation](#dbsystemshapes_listbylocation) +## DbSystems + +- [CreateOrUpdate](#dbsystems_createorupdate) +- [Delete](#dbsystems_delete) +- [GetByResourceGroup](#dbsystems_getbyresourcegroup) +- [List](#dbsystems_list) +- [ListByResourceGroup](#dbsystems_listbyresourcegroup) +- [Update](#dbsystems_update) + ## DbVersions +- [Get](#dbversions_get) - [ListByLocation](#dbversions_listbylocation) +## DnsPrivateViews + +- [Get](#dnsprivateviews_get) +- [ListByLocation](#dnsprivateviews_listbylocation) + +## DnsPrivateZones + +- [Get](#dnsprivatezones_get) +- [ListByLocation](#dnsprivatezones_listbylocation) + ## ExadbVmClusters +- [CreateOrUpdate](#exadbvmclusters_createorupdate) +- [Delete](#exadbvmclusters_delete) +- [GetByResourceGroup](#exadbvmclusters_getbyresourcegroup) +- [List](#exadbvmclusters_list) +- [ListByResourceGroup](#exadbvmclusters_listbyresourcegroup) - [RemoveVms](#exadbvmclusters_removevms) +- [Update](#exadbvmclusters_update) ## ExascaleDbNodes - [Action](#exascaledbnodes_action) +- [Get](#exascaledbnodes_get) - [ListByParent](#exascaledbnodes_listbyparent) ## ExascaleDbStorageVaults @@ -76,8 +140,18 @@ ## GiVersions +- [Get](#giversions_get) - [ListByLocation](#giversions_listbylocation) +## NetworkAnchors + +- [CreateOrUpdate](#networkanchors_createorupdate) +- [Delete](#networkanchors_delete) +- [GetByResourceGroup](#networkanchors_getbyresourcegroup) +- [List](#networkanchors_list) +- [ListByResourceGroup](#networkanchors_listbyresourcegroup) +- [Update](#networkanchors_update) + ## Operations - [List](#operations_list) @@ -85,14 +159,156 @@ ## OracleSubscriptions - [AddAzureSubscriptions](#oraclesubscriptions_addazuresubscriptions) +- [CreateOrUpdate](#oraclesubscriptions_createorupdate) +- [Delete](#oraclesubscriptions_delete) +- [Get](#oraclesubscriptions_get) +- [List](#oraclesubscriptions_list) - [ListActivationLinks](#oraclesubscriptions_listactivationlinks) - [ListCloudAccountDetails](#oraclesubscriptions_listcloudaccountdetails) - [ListSaasSubscriptionDetails](#oraclesubscriptions_listsaassubscriptiondetails) - [Update](#oraclesubscriptions_update) +## ResourceAnchors + +- [CreateOrUpdate](#resourceanchors_createorupdate) +- [Delete](#resourceanchors_delete) +- [GetByResourceGroup](#resourceanchors_getbyresourcegroup) +- [List](#resourceanchors_list) +- [ListByResourceGroup](#resourceanchors_listbyresourcegroup) +- [Update](#resourceanchors_update) + +## SystemVersions + +- [Get](#systemversions_get) +- [ListByLocation](#systemversions_listbylocation) + ## VirtualNetworkAddresses +- [CreateOrUpdate](#virtualnetworkaddresses_createorupdate) +- [Delete](#virtualnetworkaddresses_delete) +- [Get](#virtualnetworkaddresses_get) - [ListByCloudVmCluster](#virtualnetworkaddresses_listbycloudvmcluster) +### AutonomousDatabaseBackups_CreateOrUpdate + +```java +import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupProperties; + +/** + * Samples for AutonomousDatabaseBackups CreateOrUpdate. + */ +public final class AutonomousDatabaseBackupsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01/AutonomousDatabaseBackups_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: Create Autonomous Database Backup. - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void createAutonomousDatabaseBackupGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseBackups() + .define("1711644130") + .withExistingAutonomousDatabase("rgopenapi", "databasedb1") + .withProperties(new AutonomousDatabaseBackupProperties().withDisplayName("Nightly Backup") + .withRetentionPeriodInDays(365)) + .create(); + } + + /* + * x-ms-original-file: 2025-09-01/autonomousDatabaseBackup_create.json + */ + /** + * Sample code: AutonomousDatabaseBackups_CreateOrUpdate. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void autonomousDatabaseBackupsCreateOrUpdate( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseBackups() + .define("1711644130") + .withExistingAutonomousDatabase("rg000", "databasedb1") + .withProperties(new AutonomousDatabaseBackupProperties().withDisplayName("Nightly Backup") + .withRetentionPeriodInDays(365)) + .create(); + } +} +``` + +### AutonomousDatabaseBackups_Delete + +```java +/** + * Samples for AutonomousDatabaseBackups Delete. + */ +public final class AutonomousDatabaseBackupsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01/autonomousDatabaseBackup_delete.json + */ + /** + * Sample code: AutonomousDatabaseBackups_Delete. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + autonomousDatabaseBackupsDelete(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseBackups() + .delete("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/AutonomousDatabaseBackups_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: Delete Autonomous Database Backup. - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void deleteAutonomousDatabaseBackupGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseBackups() + .delete("rgopenapi", "databasedb1", "1711644130", com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabaseBackups_Get + +```java +/** + * Samples for AutonomousDatabaseBackups Get. + */ +public final class AutonomousDatabaseBackupsGetSamples { + /* + * x-ms-original-file: 2025-09-01/AutonomousDatabaseBackups_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Get Autonomous Database Backup. - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getAutonomousDatabaseBackupGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseBackups() + .getWithResponse("rgopenapi", "databasedb1", "1711644130", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/autonomousDatabaseBackup_get.json + */ + /** + * Sample code: AutonomousDatabaseBackups_Get. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + autonomousDatabaseBackupsGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseBackups() + .getWithResponse("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE); + } +} +``` + ### AutonomousDatabaseBackups_ListByAutonomousDatabase ```java @@ -162,423 +378,539 @@ public final class AutonomousDatabaseBackupsUpdateSamples { } ``` -### AutonomousDatabases_Action +### AutonomousDatabaseCharacterSets_Get ```java -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseLifecycleAction; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseLifecycleActionEnum; - /** - * Samples for AutonomousDatabases Action. + * Samples for AutonomousDatabaseCharacterSets Get. */ -public final class AutonomousDatabasesActionSamples { +public final class AutonomousDatabaseCharacterSetsGetSamples { /* - * x-ms-original-file: 2025-09-01/AutonomousDatabases_Action_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/AutonomousDatabaseCharacterSets_Get_MinimumSet_Gen.json */ /** - * Sample code: AutonomousDatabases_Action_MaximumSet. + * Sample code: Get autonomous db character set - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - autonomousDatabasesActionMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .action("rgopenapi", "databasedb1", - new AutonomousDatabaseLifecycleAction().withAction(AutonomousDatabaseLifecycleActionEnum.START), + public static void getAutonomousDbCharacterSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseCharacterSets() + .getWithResponse("eastus", "Replace this value with a string matching RegExp .*", com.azure.core.util.Context.NONE); } -} -``` - -### AutonomousDatabases_ChangeDisasterRecoveryConfiguration - -```java -import com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryConfigurationDetails; -import com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryType; -import java.time.OffsetDateTime; -/** - * Samples for AutonomousDatabases ChangeDisasterRecoveryConfiguration. - */ -public final class AutonomousDatabasesChangeDisasterRecoveryConfigurationSamples { /* - * x-ms-original-file: 2025-09-01/AutonomousDatabases_ChangeDisasterRecoveryConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/autonomousDatabaseCharacterSet_get.json */ /** - * Sample code: Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database - generated by - * [MaximumSet] rule. + * Sample code: AutonomousDatabaseCharacterSets_get. * * @param manager Entry point to OracleDatabaseManager. */ - public static void performChangeDisasterRecoveryConfigurationActionOnAutonomousDatabaseGeneratedByMaximumSetRule( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .changeDisasterRecoveryConfiguration("rgopenapi", "databasedb1", - new DisasterRecoveryConfigurationDetails().withDisasterRecoveryType(DisasterRecoveryType.ADG) - .withTimeSnapshotStandbyEnabledTill(OffsetDateTime.parse("2025-08-01T04:32:58.725Z")) - .withIsSnapshotStandby(true) - .withIsReplicateAutomaticBackups(true), - com.azure.core.util.Context.NONE); + public static void + autonomousDatabaseCharacterSetsGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseCharacterSets() + .getWithResponse("eastus", "DATABASE", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/autonomousDatabase_changeDisasterRecoveryConfiguration.json + * x-ms-original-file: 2025-09-01/AutonomousDatabaseCharacterSets_Get_MaximumSet_Gen.json */ /** - * Sample code: AutonomousDatabases_ChangeDisasterRecoveryConfiguration. + * Sample code: Get autonomous db character set - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void autonomousDatabasesChangeDisasterRecoveryConfiguration( + public static void getAutonomousDbCharacterSetGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .changeDisasterRecoveryConfiguration("rg000", "databasedb1", - new DisasterRecoveryConfigurationDetails().withDisasterRecoveryType(DisasterRecoveryType.ADG) - .withIsReplicateAutomaticBackups(false), + manager.autonomousDatabaseCharacterSets() + .getWithResponse("eastus", "Replace this value with a string matching RegExp .*", com.azure.core.util.Context.NONE); } } ``` -### AutonomousDatabases_Failover +### AutonomousDatabaseCharacterSets_ListByLocation ```java -import com.azure.resourcemanager.oracledatabase.models.PeerDbDetails; - /** - * Samples for AutonomousDatabases Failover. + * Samples for AutonomousDatabaseCharacterSets ListByLocation. */ -public final class AutonomousDatabasesFailoverSamples { +public final class AutonomousDatabaseCharacterSetsListByLocationSamples { /* - * x-ms-original-file: 2025-09-01/autonomousDatabase_failover.json + * x-ms-original-file: 2025-09-01/AutonomousDatabaseCharacterSets_ListByLocation_MaximumSet_Gen.json */ /** - * Sample code: AutonomousDatabases_Failover. + * Sample code: List autonomous db character sets by location - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - autonomousDatabasesFailover(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .failover("rg000", "databasedb1", new PeerDbDetails().withPeerDbId("peerDbId"), - com.azure.core.util.Context.NONE); + public static void listAutonomousDbCharacterSetsByLocationGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseCharacterSets().listByLocation("eastus", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/AutonomousDatabases_Failover_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/AutonomousDatabaseCharacterSets_ListByLocation_MinimumSet_Gen.json */ /** - * Sample code: Perform failover action on Autonomous Database - generated by [MaximumSet] rule. + * Sample code: List autonomous db character sets by location - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void performFailoverActionOnAutonomousDatabaseGeneratedByMaximumSetRule( + public static void listAutonomousDbCharacterSetsByLocationGeneratedByMinimumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .failover("rgopenapi", "databasedb1*", - new PeerDbDetails().withPeerDbId("peerDbId") - .withPeerDbOcid("yozpqyefqhirkybmzwgoidyl") - .withPeerDbLocation("cxlzbzbfzi"), - com.azure.core.util.Context.NONE); + manager.autonomousDatabaseCharacterSets().listByLocation("eastus", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/autonomousDatabaseCharacterSet_listByLocation.json + */ + /** + * Sample code: AutonomousDatabaseCharacterSets_listByLocation. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void autonomousDatabaseCharacterSetsListByLocation( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseCharacterSets().listByLocation("eastus", com.azure.core.util.Context.NONE); } } ``` -### AutonomousDatabases_GenerateWallet +### AutonomousDatabaseNationalCharacterSets_Get ```java -import com.azure.resourcemanager.oracledatabase.models.GenerateAutonomousDatabaseWalletDetails; -import com.azure.resourcemanager.oracledatabase.models.GenerateType; - /** - * Samples for AutonomousDatabases GenerateWallet. + * Samples for AutonomousDatabaseNationalCharacterSets Get. */ -public final class AutonomousDatabasesGenerateWalletSamples { +public final class AutonomousDatabaseNationalCharacterSetsGetSamples { /* - * x-ms-original-file: 2025-09-01/AutonomousDatabases_GenerateWallet_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/AutonomousDatabaseNationalCharacterSets_Get_MinimumSet_Gen.json */ /** - * Sample code: Generate wallet action on Autonomous Database - generated by [MaximumSet] rule. + * Sample code: Get autonomous db national character set - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void generateWalletActionOnAutonomousDatabaseGeneratedByMaximumSetRule( + public static void getAutonomousDbNationalCharacterSetGeneratedByMinimumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .generateWalletWithResponse("rgopenapi", "databasedb1", - new GenerateAutonomousDatabaseWalletDetails().withGenerateType(GenerateType.SINGLE) - .withIsRegional(true) - .withPassword("fakeTokenPlaceholder"), + manager.autonomousDatabaseNationalCharacterSets() + .getWithResponse("eastus", "Replace this value with a string matching RegExp .*", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/autonomousDatabase_generateWallet.json + * x-ms-original-file: 2025-09-01/autonomousDatabaseNationalCharacterSet_get.json */ /** - * Sample code: AutonomousDatabases_generateWallet. + * Sample code: AutonomousDatabaseNationalCharacterSets_get. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - autonomousDatabasesGenerateWallet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .generateWalletWithResponse("rg000", "databasedb1", - new GenerateAutonomousDatabaseWalletDetails().withGenerateType(GenerateType.SINGLE) - .withIsRegional(false) - .withPassword("fakeTokenPlaceholder"), + public static void autonomousDatabaseNationalCharacterSetsGet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseNationalCharacterSets() + .getWithResponse("eastus", "NATIONAL", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/AutonomousDatabaseNationalCharacterSets_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Get autonomous db national character set - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getAutonomousDbNationalCharacterSetGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseNationalCharacterSets() + .getWithResponse("eastus", "Replace this value with a string matching RegExp .*", com.azure.core.util.Context.NONE); } } ``` -### AutonomousDatabases_ListByResourceGroup +### AutonomousDatabaseNationalCharacterSets_ListByLocation ```java /** - * Samples for AutonomousDatabases ListByResourceGroup. + * Samples for AutonomousDatabaseNationalCharacterSets ListByLocation. */ -public final class AutonomousDatabasesListByResourceGroupSamples { +public final class AutonomousDatabaseNationalCharacterSetsListByLocationSamples { /* - * x-ms-original-file: 2025-09-01/autonomousDatabase_listByResourceGroup.json + * x-ms-original-file: 2025-09-01/autonomousDatabaseNationalCharacterSet_listByLocation.json */ /** - * Sample code: AutonomousDatabases_listByResourceGroup. + * Sample code: AutonomousDatabaseNationalCharacterSets_listByLocation. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - autonomousDatabasesListByResourceGroup(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases().listByResourceGroup("rg000", com.azure.core.util.Context.NONE); + public static void autonomousDatabaseNationalCharacterSetsListByLocation( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseNationalCharacterSets().listByLocation("eastus", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/AutonomousDatabases_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/AutonomousDatabaseNationalCharacterSets_ListByLocation_MaximumSet_Gen.json */ /** - * Sample code: List Autonomous Database by resource group - generated by [MaximumSet] rule. + * Sample code: List autonomous db national character sets by location - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listAutonomousDatabaseByResourceGroupGeneratedByMaximumSetRule( + public static void listAutonomousDbNationalCharacterSetsByLocationGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + manager.autonomousDatabaseNationalCharacterSets().listByLocation("eastus", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/AutonomousDatabases_ListByResourceGroup_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/AutonomousDatabaseNationalCharacterSets_ListByLocation_MinimumSet_Gen.json */ /** - * Sample code: List Autonomous Database by resource group - generated by [MinimumSet] rule. + * Sample code: List autonomous db national character sets by location - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listAutonomousDatabaseByResourceGroupGeneratedByMinimumSetRule( + public static void listAutonomousDbNationalCharacterSetsByLocationGeneratedByMinimumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + manager.autonomousDatabaseNationalCharacterSets().listByLocation("eastus", com.azure.core.util.Context.NONE); } } ``` -### AutonomousDatabases_Restore +### AutonomousDatabaseVersions_Get ```java -import com.azure.resourcemanager.oracledatabase.models.RestoreAutonomousDatabaseDetails; -import java.time.OffsetDateTime; - /** - * Samples for AutonomousDatabases Restore. + * Samples for AutonomousDatabaseVersions Get. */ -public final class AutonomousDatabasesRestoreSamples { +public final class AutonomousDatabaseVersionsGetSamples { /* - * x-ms-original-file: 2025-09-01/autonomousDatabase_restore.json + * x-ms-original-file: 2025-09-01/autonomousDatabaseVersion_get.json */ /** - * Sample code: AutonomousDatabases_Restore. + * Sample code: AutonomousDatabaseVersions_get. * * @param manager Entry point to OracleDatabaseManager. */ public static void - autonomousDatabasesRestore(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .restore("rg000", "databasedb1", - new RestoreAutonomousDatabaseDetails().withTimestamp(OffsetDateTime.parse("2024-04-23T00:00:00.000Z")), + autonomousDatabaseVersionsGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseVersions().getWithResponse("eastus", "18.4.0.0", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/AutonomousDatabaseVersions_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Get an autonomous version - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getAnAutonomousVersionGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseVersions() + .getWithResponse("eastus", "Replace this value with a string matching RegExp .*", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/AutonomousDatabases_Restore_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/AutonomousDatabaseVersions_Get_MinimumSet_Gen.json */ /** - * Sample code: Perform restore action on Autonomous Database - generated by [MaximumSet] rule. + * Sample code: Get an autonomous version - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void performRestoreActionOnAutonomousDatabaseGeneratedByMaximumSetRule( + public static void getAnAutonomousVersionGeneratedByMinimumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .restore("rgopenapi", "database1", - new RestoreAutonomousDatabaseDetails().withTimestamp(OffsetDateTime.parse("2024-04-23T00:00:00.000Z")), + manager.autonomousDatabaseVersions() + .getWithResponse("eastus", "Replace this value with a string matching RegExp .*", com.azure.core.util.Context.NONE); } } ``` -### AutonomousDatabases_Shrink +### AutonomousDatabaseVersions_ListByLocation ```java /** - * Samples for AutonomousDatabases Shrink. + * Samples for AutonomousDatabaseVersions ListByLocation. */ -public final class AutonomousDatabasesShrinkSamples { +public final class AutonomousDatabaseVersionsListByLocationSamples { /* - * x-ms-original-file: 2025-09-01/AutonomousDatabases_Shrink_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/autonomousDatabaseVersion_listByLocation.json */ /** - * Sample code: Perform shrink action on Autonomous Database - generated by [MaximumSet] rule. + * Sample code: AutonomousDatabaseVersions_listByLocation. * * @param manager Entry point to OracleDatabaseManager. */ - public static void performShrinkActionOnAutonomousDatabaseGeneratedByMaximumSetRule( + public static void autonomousDatabaseVersionsListByLocation( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases().shrink("rgopenapi", "database1", com.azure.core.util.Context.NONE); + manager.autonomousDatabaseVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/AutonomousDatabaseVersions_ListByLocation_MinimumSet_Gen.json + */ + /** + * Sample code: List an autonomous versions by location - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listAnAutonomousVersionsByLocationGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/AutonomousDatabaseVersions_ListByLocation_MaximumSet_Gen.json + */ + /** + * Sample code: List an autonomous versions by location - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listAnAutonomousVersionsByLocationGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); } } ``` -### AutonomousDatabases_Switchover +### AutonomousDatabases_Action ```java -import com.azure.resourcemanager.oracledatabase.models.PeerDbDetails; +import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseLifecycleAction; +import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseLifecycleActionEnum; /** - * Samples for AutonomousDatabases Switchover. + * Samples for AutonomousDatabases Action. */ -public final class AutonomousDatabasesSwitchoverSamples { +public final class AutonomousDatabasesActionSamples { /* - * x-ms-original-file: 2025-09-01/AutonomousDatabases_Switchover_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/AutonomousDatabases_Action_MaximumSet_Gen.json */ /** - * Sample code: Perform switchover action on Autonomous Database - generated by [MaximumSet] rule. + * Sample code: AutonomousDatabases_Action_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void performSwitchoverActionOnAutonomousDatabaseGeneratedByMaximumSetRule( + public static void + autonomousDatabasesActionMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .action("rgopenapi", "databasedb1", + new AutonomousDatabaseLifecycleAction().withAction(AutonomousDatabaseLifecycleActionEnum.START), + com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabases_ChangeDisasterRecoveryConfiguration + +```java +import com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryConfigurationDetails; +import com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryType; +import java.time.OffsetDateTime; + +/** + * Samples for AutonomousDatabases ChangeDisasterRecoveryConfiguration. + */ +public final class AutonomousDatabasesChangeDisasterRecoveryConfigurationSamples { + /* + * x-ms-original-file: 2025-09-01/AutonomousDatabases_ChangeDisasterRecoveryConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database - generated by + * [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void performChangeDisasterRecoveryConfigurationActionOnAutonomousDatabaseGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.autonomousDatabases() - .switchover("rgopenapi", "databasedb1", - new PeerDbDetails().withPeerDbId("peerDbId") - .withPeerDbOcid("yozpqyefqhirkybmzwgoidyl") - .withPeerDbLocation("cxlzbzbfzi"), + .changeDisasterRecoveryConfiguration("rgopenapi", "databasedb1", + new DisasterRecoveryConfigurationDetails().withDisasterRecoveryType(DisasterRecoveryType.ADG) + .withTimeSnapshotStandbyEnabledTill(OffsetDateTime.parse("2025-08-01T04:32:58.725Z")) + .withIsSnapshotStandby(true) + .withIsReplicateAutomaticBackups(true), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/autonomousDatabase_switchover.json + * x-ms-original-file: 2025-09-01/autonomousDatabase_changeDisasterRecoveryConfiguration.json */ /** - * Sample code: AutonomousDatabases_Switchover. + * Sample code: AutonomousDatabases_ChangeDisasterRecoveryConfiguration. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - autonomousDatabasesSwitchover(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + public static void autonomousDatabasesChangeDisasterRecoveryConfiguration( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.autonomousDatabases() - .switchover("rg000", "databasedb1", new PeerDbDetails().withPeerDbId("peerDbId"), + .changeDisasterRecoveryConfiguration("rg000", "databasedb1", + new DisasterRecoveryConfigurationDetails().withDisasterRecoveryType(DisasterRecoveryType.ADG) + .withIsReplicateAutomaticBackups(false), com.azure.core.util.Context.NONE); } } ``` -### AutonomousDatabases_Update +### AutonomousDatabases_CreateOrUpdate ```java -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabase; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseUpdateProperties; +import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCloneProperties; +import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseProperties; import com.azure.resourcemanager.oracledatabase.models.AutonomousMaintenanceScheduleType; +import com.azure.resourcemanager.oracledatabase.models.CloneType; +import com.azure.resourcemanager.oracledatabase.models.ComputeModel; import com.azure.resourcemanager.oracledatabase.models.CustomerContact; import com.azure.resourcemanager.oracledatabase.models.DatabaseEditionType; +import com.azure.resourcemanager.oracledatabase.models.DayOfWeek; import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeekUpdate; import com.azure.resourcemanager.oracledatabase.models.LicenseModel; import com.azure.resourcemanager.oracledatabase.models.LongTermBackUpScheduleDetails; import com.azure.resourcemanager.oracledatabase.models.OpenModeType; import com.azure.resourcemanager.oracledatabase.models.PermissionLevelType; import com.azure.resourcemanager.oracledatabase.models.RepeatCadenceType; import com.azure.resourcemanager.oracledatabase.models.RoleType; -import com.azure.resourcemanager.oracledatabase.models.ScheduledOperationsTypeUpdate; +import com.azure.resourcemanager.oracledatabase.models.ScheduledOperationsType; +import com.azure.resourcemanager.oracledatabase.models.WorkloadType; import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** - * Samples for AutonomousDatabases Update. + * Samples for AutonomousDatabases CreateOrUpdate. */ -public final class AutonomousDatabasesUpdateSamples { +public final class AutonomousDatabasesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/autonomousDatabase_patch.json - */ - /** - * Sample code: AutonomousDatabases_update. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - autonomousDatabasesUpdate(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - AutonomousDatabase resource = manager.autonomousDatabases() - .getByResourceGroupWithResponse("rg000", "databasedb1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } - - /* - * x-ms-original-file: 2025-09-01/AutonomousDatabases_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/AutonomousDatabases_CreateOrUpdate_MaximumSet_Gen.json */ /** - * Sample code: Patch Autonomous Database - generated by [MaximumSet] rule. + * Sample code: Create Autonomous Database - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void patchAutonomousDatabaseGeneratedByMaximumSetRule( + public static void createAutonomousDatabaseGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - AutonomousDatabase resource = manager.autonomousDatabases() - .getByResourceGroupWithResponse("rgopenapi", "databasedb1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("key9827", "fakeTokenPlaceholder")) - .withProperties(new AutonomousDatabaseUpdateProperties().withAdminPassword("fakeTokenPlaceholder") - .withAutonomousMaintenanceScheduleType(AutonomousMaintenanceScheduleType.EARLY) - .withComputeCount(56.1D) - .withCpuCoreCount(45) - .withCustomerContacts(Arrays.asList(new CustomerContact().withEmail("dummyemail@microsoft.com"))) - .withDataStorageSizeInTbs(133) - .withDataStorageSizeInGbs(175271) - .withDisplayName("lrdrjpyyvufnxdzpwvlkmfukpstrjftdxcejcxtnqhxqbhvtzeiokllnspotsqeggddxkjjtf") + manager.autonomousDatabases() + .define("databasedb1") + .withRegion("eastus") + .withExistingResourceGroup("rgopenapi") + .withTags(mapOf()) + .withProperties(new AutonomousDatabaseProperties().withAdminPassword("fakeTokenPlaceholder") + .withAutonomousMaintenanceScheduleType(AutonomousMaintenanceScheduleType.REGULAR) + .withCharacterSet("AL32UTF8") + .withComputeCount(2.0D) + .withComputeModel(ComputeModel.ECPU) + .withCpuCoreCount(1) + .withCustomerContacts(Arrays.asList(new CustomerContact().withEmail( + "agyiqecugrloatgwpvmilmvutcnyjpxzhbilhhqfvqqblfgursqelzjjnwnmpfstitmcgkovzxnstiqqwjnhwwaufbnkebpqxlqwmfnmtlkgkoxcnjwcnfqbdtokhjalagxphkuiwxtxrzuipokiuczmuwoqoebkjvhytlhtxzshwsdoywluoggznuyuozqibiwdgwqbgnyogysdjpvlowmvuvq"))) + .withDataStorageSizeInTbs(1) + .withDataStorageSizeInGbs(1024) + .withDbVersion("18.4.0.0") + .withDbWorkload(WorkloadType.OLTP) + .withDisplayName("example_autonomous_databasedb1") .withIsAutoScalingEnabled(true) .withIsAutoScalingForStorageEnabled(true) - .withPeerDbId("qmpfwtvpfvbgmulethqznsyyjlpxmyfqfanrymzqsgraavtmlqqbexpzguyqybngoupbshlzpxv") + .withPeerDbId( + "jghxnzevghltfytskymsxgyrugfedzchifwoezwbcwzzvpikoqqjcdiesbidbeqkmncodchlmktetjlgjgbaofwpwmpvckmusaunrzdrctypasgcabyjwxwzkodwugdpeprikvxygxyb") .withIsLocalDataGuardEnabled(true) .withIsMtlsConnectionRequired(true) - .withLicenseModel(LicenseModel.LICENSE_INCLUDED) - .withScheduledOperationsList(Arrays.asList(new ScheduledOperationsTypeUpdate() - .withDayOfWeek(new DayOfWeekUpdate().withName(DayOfWeekName.MONDAY)) - .withScheduledStartTime("lwwvkazgmfremfwhckfb") - .withScheduledStopTime("hjwagzxijpiaogulmnmbuqakpqxhkjvaypjqnvbvtjddc"))) - .withDatabaseEdition(DatabaseEditionType.STANDARD_EDITION) + .withIsPreviewVersionWithServiceTermsAccepted(true) + .withLicenseModel(LicenseModel.BRING_YOUR_OWN_LICENSE) + .withNcharacterSet("AL16UTF16") + .withScheduledOperationsList(Arrays + .asList(new ScheduledOperationsType().withDayOfWeek(new DayOfWeek().withName(DayOfWeekName.MONDAY)) + .withScheduledStartTime("lwwvkazgmfremfwhckfb") + .withScheduledStopTime("hjwagzxijpiaogulmnmbuqakpqxhkjvaypjqnvbvtjddc"))) + .withPrivateEndpointIp("rdlbhw") + .withPrivateEndpointLabel("worwqllbglhyakksevparfuaivc") + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withVnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1") + .withDatabaseEdition(DatabaseEditionType.ENTERPRISE_EDITION) + .withAutonomousDatabaseId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/autonomousDatabases/databasedb1") .withLongTermBackupSchedule( new LongTermBackUpScheduleDetails().withRepeatCadence(RepeatCadenceType.ONE_TIME) .withTimeOfBackup(OffsetDateTime.parse("2025-08-01T04:32:58.715Z")) .withRetentionPeriodInDays(188) .withIsDisabled(true)) - .withLocalAdgAutoFailoverMaxDataLossLimit(212) + .withLocalAdgAutoFailoverMaxDataLossLimit(1759) .withOpenMode(OpenModeType.READ_ONLY) .withPermissionLevel(PermissionLevelType.RESTRICTED) .withRole(RoleType.PRIMARY) - .withBackupRetentionPeriodInDays(12) - .withWhitelistedIps(Arrays.asList( - "kfierlppwurtqrhfxwgfgrnqtmvraignzwsddwmpdijeveuevuoejfmbjvpnlrmmdflilxcwkkzvdofctsdjfxrrrwctihhnchtrouauesqbmlcqhzwnppnhrtitecenlfyshassvajukbwxudhlwixkvkgsessvshcwmleoqujeemwenhwlsccbcjnnviugzgylsxkssalqoicatcvkahogdvweymhdxboyqwhaxuzlmrdbvgbnnetobkbwygcsflzanwknlybvvzgjzjirpfrksbxwgllgfxwdflcisvxpkjecpgdaxccqkzxofedkrawvhzeabmunpykwd"))) - .apply(); + .withBackupRetentionPeriodInDays(1) + .withWhitelistedIps(Arrays.asList("1.1.1.1", "1.1.1.0/24", "1.1.2.25"))) + .create(); + } + + /* + * x-ms-original-file: 2025-09-01/autonomousDatabase_create.json + */ + /** + * Sample code: AutonomousDatabases_CreateOrUpdate. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + autonomousDatabasesCreateOrUpdate(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .define("databasedb1") + .withRegion("eastus") + .withExistingResourceGroup("rg000") + .withTags(mapOf("tagK1", "tagV1")) + .withProperties(new AutonomousDatabaseProperties().withAdminPassword("fakeTokenPlaceholder") + .withCharacterSet("AL32UTF8") + .withComputeCount(2.0D) + .withComputeModel(ComputeModel.ECPU) + .withDataStorageSizeInTbs(1) + .withDbVersion("18.4.0.0") + .withDisplayName("example_autonomous_databasedb1") + .withNcharacterSet("AL16UTF16") + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withVnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1")) + .create(); + } + + /* + * x-ms-original-file: 2025-09-01/autonomousDatabaseClone_create.json + */ + /** + * Sample code: AutonomousDatabases_CreateOrUpdate_clone. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + autonomousDatabasesCreateOrUpdateClone(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .define("databasedb1") + .withRegion("eastus") + .withExistingResourceGroup("rg000") + .withTags(mapOf("tagK1", "tagV1")) + .withProperties(new AutonomousDatabaseCloneProperties().withAdminPassword("fakeTokenPlaceholder") + .withCharacterSet("AL32UTF8") + .withComputeCount(2.0D) + .withComputeModel(ComputeModel.ECPU) + .withDataStorageSizeInTbs(1) + .withDisplayName("example_autonomous_databasedb1_clone") + .withNcharacterSet("AL16UTF16") + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withVnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1") + .withSourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/autonomousDatabases/databasedb1") + .withCloneType(CloneType.FULL)) + .create(); } // Use "Map.of" if available @@ -595,832 +927,4112 @@ public final class AutonomousDatabasesUpdateSamples { } ``` -### CloudExadataInfrastructures_AddStorageCapacity +### AutonomousDatabases_Delete ```java /** - * Samples for CloudExadataInfrastructures AddStorageCapacity. + * Samples for AutonomousDatabases Delete. */ -public final class CloudExadataInfrastructuresAddStorageCapacitySamples { - /* - * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_AddStorageCapacity_MaximumSet_Gen.json - */ - /** - * Sample code: Perform add storage capacity on exadata infra - generated by [MaximumSet] rule. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void performAddStorageCapacityOnExadataInfraGeneratedByMaximumSetRule( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudExadataInfrastructures() - .addStorageCapacity("rgopenapi", "Replace this value with a string matching RegExp .*", - com.azure.core.util.Context.NONE); - } - +public final class AutonomousDatabasesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_AddStorageCapacity_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/AutonomousDatabases_Delete_MaximumSet_Gen.json */ /** - * Sample code: Perform add storage capacity on exadata infra - generated by [MinimumSet] rule. + * Sample code: Delete Autonomous Database - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void performAddStorageCapacityOnExadataInfraGeneratedByMinimumSetRule( + public static void deleteAutonomousDatabaseGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudExadataInfrastructures() - .addStorageCapacity("rgopenapi", "Replace this value with a string matching RegExp .*", - com.azure.core.util.Context.NONE); + manager.autonomousDatabases().delete("rgopenapi", "databasedb1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/exaInfra_addStorageCapacity.json + * x-ms-original-file: 2025-09-01/autonomousDatabase_delete.json */ /** - * Sample code: CloudExadataInfrastructures_addStorageCapacity. + * Sample code: AutonomousDatabases_delete. * * @param manager Entry point to OracleDatabaseManager. */ - public static void cloudExadataInfrastructuresAddStorageCapacity( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudExadataInfrastructures().addStorageCapacity("rg000", "infra1", com.azure.core.util.Context.NONE); + public static void + autonomousDatabasesDelete(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases().delete("rg000", "databasedb1", com.azure.core.util.Context.NONE); } } ``` -### CloudExadataInfrastructures_ConfigureExascale +### AutonomousDatabases_Failover ```java -import com.azure.resourcemanager.oracledatabase.models.ConfigureExascaleCloudExadataInfrastructureDetails; +import com.azure.resourcemanager.oracledatabase.models.PeerDbDetails; /** - * Samples for CloudExadataInfrastructures ConfigureExascale. + * Samples for AutonomousDatabases Failover. */ -public final class CloudExadataInfrastructuresConfigureExascaleSamples { +public final class AutonomousDatabasesFailoverSamples { /* - * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_ConfigureExascale_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/autonomousDatabase_failover.json */ /** - * Sample code: CloudExadataInfrastructures_ConfigureExascale_MaximumSet_Gen - generated by [MaximumSet] rule. + * Sample code: AutonomousDatabases_Failover. * * @param manager Entry point to OracleDatabaseManager. */ - public static void cloudExadataInfrastructuresConfigureExascaleMaximumSetGenGeneratedByMaximumSetRule( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudExadataInfrastructures() - .configureExascale("rgopenapi", "Replace this value with a string matching RegExp .*", - new ConfigureExascaleCloudExadataInfrastructureDetails().withTotalStorageInGbs(19), + public static void + autonomousDatabasesFailover(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .failover("rg000", "databasedb1", new PeerDbDetails().withPeerDbId("peerDbId"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_ConfigureExascale_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/AutonomousDatabases_Failover_MaximumSet_Gen.json */ /** - * Sample code: CloudExadataInfrastructures_ConfigureExascale_MaximumSet_Gen - generated by [MinimumSet] rule. + * Sample code: Perform failover action on Autonomous Database - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void cloudExadataInfrastructuresConfigureExascaleMaximumSetGenGeneratedByMinimumSetRule( + public static void performFailoverActionOnAutonomousDatabaseGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudExadataInfrastructures() - .configureExascale("rgopenapi", "Replace this value with a string matching RegExp .*", - new ConfigureExascaleCloudExadataInfrastructureDetails().withTotalStorageInGbs(19), + manager.autonomousDatabases() + .failover("rgopenapi", "databasedb1*", + new PeerDbDetails().withPeerDbId("peerDbId") + .withPeerDbOcid("yozpqyefqhirkybmzwgoidyl") + .withPeerDbLocation("cxlzbzbfzi"), com.azure.core.util.Context.NONE); } } ``` -### CloudVmClusters_AddVms +### AutonomousDatabases_GenerateWallet ```java -import com.azure.resourcemanager.oracledatabase.models.AddRemoveDbNode; -import java.util.Arrays; +import com.azure.resourcemanager.oracledatabase.models.GenerateAutonomousDatabaseWalletDetails; +import com.azure.resourcemanager.oracledatabase.models.GenerateType; /** - * Samples for CloudVmClusters AddVms. + * Samples for AutonomousDatabases GenerateWallet. */ -public final class CloudVmClustersAddVmsSamples { +public final class AutonomousDatabasesGenerateWalletSamples { /* - * x-ms-original-file: 2025-09-01/CloudVmClusters_AddVms_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/AutonomousDatabases_GenerateWallet_MaximumSet_Gen.json */ /** - * Sample code: Add VMs to VM Cluster - generated by [MaximumSet] rule. + * Sample code: Generate wallet action on Autonomous Database - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void addVMsToVMClusterGeneratedByMaximumSetRule( + public static void generateWalletActionOnAutonomousDatabaseGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters() - .addVms("rgopenapi", "cloudvmcluster1", - new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa", "ocid1..aaaaaa")), + manager.autonomousDatabases() + .generateWalletWithResponse("rgopenapi", "databasedb1", + new GenerateAutonomousDatabaseWalletDetails().withGenerateType(GenerateType.SINGLE) + .withIsRegional(true) + .withPassword("fakeTokenPlaceholder"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/vmClusters_addVms.json + * x-ms-original-file: 2025-09-01/autonomousDatabase_generateWallet.json */ /** - * Sample code: CloudVmClusters_addVms. + * Sample code: AutonomousDatabases_generateWallet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void cloudVmClustersAddVms(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters() - .addVms("rg000", "cluster1", - new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa", "ocid1..aaaaaa")), + public static void + autonomousDatabasesGenerateWallet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .generateWalletWithResponse("rg000", "databasedb1", + new GenerateAutonomousDatabaseWalletDetails().withGenerateType(GenerateType.SINGLE) + .withIsRegional(false) + .withPassword("fakeTokenPlaceholder"), com.azure.core.util.Context.NONE); } +} +``` + +### AutonomousDatabases_GetByResourceGroup +```java +/** + * Samples for AutonomousDatabases GetByResourceGroup. + */ +public final class AutonomousDatabasesGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-01/CloudVmClusters_AddVms_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/AutonomousDatabases_Get_MaximumSet_Gen.json */ /** - * Sample code: Add VMs to VM Cluster - generated by [MinimumSet] rule. + * Sample code: Get Autonomous Database - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void addVMsToVMClusterGeneratedByMinimumSetRule( + public static void getAutonomousDatabaseGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters() - .addVms("rgopenapi", "cloudvmcluster1", - new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa", "ocid1..aaaaaa")), - com.azure.core.util.Context.NONE); + manager.autonomousDatabases() + .getByResourceGroupWithResponse("rgopenapi", "database1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/autonomousDatabase_get.json + */ + /** + * Sample code: AutonomousDatabases_Get. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void autonomousDatabasesGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .getByResourceGroupWithResponse("rg000", "databasedb1", com.azure.core.util.Context.NONE); } } ``` -### CloudVmClusters_ListPrivateIpAddresses +### AutonomousDatabases_List ```java -import com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressesFilter; +/** + * Samples for AutonomousDatabases List. + */ +public final class AutonomousDatabasesListSamples { + /* + * x-ms-original-file: 2025-09-01/autonomousDatabase_listBySubscription.json + */ + /** + * Sample code: AutonomousDatabases_listBySubscription. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + autonomousDatabasesListBySubscription(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/AutonomousDatabases_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: List Autonomous Database by subscription - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listAutonomousDatabaseBySubscriptionGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/AutonomousDatabases_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: List Autonomous Database by subscription - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listAutonomousDatabaseBySubscriptionGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases().list(com.azure.core.util.Context.NONE); + } +} +``` +### AutonomousDatabases_ListByResourceGroup + +```java /** - * Samples for CloudVmClusters ListPrivateIpAddresses. + * Samples for AutonomousDatabases ListByResourceGroup. */ -public final class CloudVmClustersListPrivateIpAddressesSamples { +public final class AutonomousDatabasesListByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-01/vmClusters_listPrivateIpAddresses.json + * x-ms-original-file: 2025-09-01/autonomousDatabase_listByResourceGroup.json */ /** - * Sample code: CloudVmClusters_listPrivateIpAddresses. + * Sample code: AutonomousDatabases_listByResourceGroup. * * @param manager Entry point to OracleDatabaseManager. */ public static void - cloudVmClustersListPrivateIpAddresses(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters() - .listPrivateIpAddressesWithResponse("rg000", "cluster1", - new PrivateIpAddressesFilter().withSubnetId("ocid1..aaaaaa").withVnicId("ocid1..aaaaa"), + autonomousDatabasesListByResourceGroup(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases().listByResourceGroup("rg000", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/AutonomousDatabases_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: List Autonomous Database by resource group - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listAutonomousDatabaseByResourceGroupGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/AutonomousDatabases_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: List Autonomous Database by resource group - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listAutonomousDatabaseByResourceGroupGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabases_Restore + +```java +import com.azure.resourcemanager.oracledatabase.models.RestoreAutonomousDatabaseDetails; +import java.time.OffsetDateTime; + +/** + * Samples for AutonomousDatabases Restore. + */ +public final class AutonomousDatabasesRestoreSamples { + /* + * x-ms-original-file: 2025-09-01/autonomousDatabase_restore.json + */ + /** + * Sample code: AutonomousDatabases_Restore. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + autonomousDatabasesRestore(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .restore("rg000", "databasedb1", + new RestoreAutonomousDatabaseDetails().withTimestamp(OffsetDateTime.parse("2024-04-23T00:00:00.000Z")), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/CloudVmClusters_ListPrivateIpAddresses_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/AutonomousDatabases_Restore_MaximumSet_Gen.json */ /** - * Sample code: List Private IP Addresses for VM Cluster - generated by [MinimumSet] rule. + * Sample code: Perform restore action on Autonomous Database - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listPrivateIPAddressesForVMClusterGeneratedByMinimumSetRule( + public static void performRestoreActionOnAutonomousDatabaseGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters() - .listPrivateIpAddressesWithResponse("rgopenapi", "cloudvmcluster1", - new PrivateIpAddressesFilter().withSubnetId("ocid1..aaaaaa").withVnicId("ocid1..aaaaa"), + manager.autonomousDatabases() + .restore("rgopenapi", "database1", + new RestoreAutonomousDatabaseDetails().withTimestamp(OffsetDateTime.parse("2024-04-23T00:00:00.000Z")), + com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabases_Shrink + +```java +/** + * Samples for AutonomousDatabases Shrink. + */ +public final class AutonomousDatabasesShrinkSamples { + /* + * x-ms-original-file: 2025-09-01/AutonomousDatabases_Shrink_MaximumSet_Gen.json + */ + /** + * Sample code: Perform shrink action on Autonomous Database - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void performShrinkActionOnAutonomousDatabaseGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases().shrink("rgopenapi", "database1", com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabases_Switchover + +```java +import com.azure.resourcemanager.oracledatabase.models.PeerDbDetails; + +/** + * Samples for AutonomousDatabases Switchover. + */ +public final class AutonomousDatabasesSwitchoverSamples { + /* + * x-ms-original-file: 2025-09-01/AutonomousDatabases_Switchover_MaximumSet_Gen.json + */ + /** + * Sample code: Perform switchover action on Autonomous Database - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void performSwitchoverActionOnAutonomousDatabaseGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .switchover("rgopenapi", "databasedb1", + new PeerDbDetails().withPeerDbId("peerDbId") + .withPeerDbOcid("yozpqyefqhirkybmzwgoidyl") + .withPeerDbLocation("cxlzbzbfzi"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/autonomousDatabase_switchover.json + */ + /** + * Sample code: AutonomousDatabases_Switchover. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + autonomousDatabasesSwitchover(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .switchover("rg000", "databasedb1", new PeerDbDetails().withPeerDbId("peerDbId"), com.azure.core.util.Context.NONE); } +} +``` + +### AutonomousDatabases_Update + +```java +import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabase; +import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseUpdateProperties; +import com.azure.resourcemanager.oracledatabase.models.AutonomousMaintenanceScheduleType; +import com.azure.resourcemanager.oracledatabase.models.CustomerContact; +import com.azure.resourcemanager.oracledatabase.models.DatabaseEditionType; +import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; +import com.azure.resourcemanager.oracledatabase.models.DayOfWeekUpdate; +import com.azure.resourcemanager.oracledatabase.models.LicenseModel; +import com.azure.resourcemanager.oracledatabase.models.LongTermBackUpScheduleDetails; +import com.azure.resourcemanager.oracledatabase.models.OpenModeType; +import com.azure.resourcemanager.oracledatabase.models.PermissionLevelType; +import com.azure.resourcemanager.oracledatabase.models.RepeatCadenceType; +import com.azure.resourcemanager.oracledatabase.models.RoleType; +import com.azure.resourcemanager.oracledatabase.models.ScheduledOperationsTypeUpdate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for AutonomousDatabases Update. + */ +public final class AutonomousDatabasesUpdateSamples { + /* + * x-ms-original-file: 2025-09-01/autonomousDatabase_patch.json + */ + /** + * Sample code: AutonomousDatabases_update. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + autonomousDatabasesUpdate(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + AutonomousDatabase resource = manager.autonomousDatabases() + .getByResourceGroupWithResponse("rg000", "databasedb1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } + + /* + * x-ms-original-file: 2025-09-01/AutonomousDatabases_Update_MaximumSet_Gen.json + */ + /** + * Sample code: Patch Autonomous Database - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void patchAutonomousDatabaseGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + AutonomousDatabase resource = manager.autonomousDatabases() + .getByResourceGroupWithResponse("rgopenapi", "databasedb1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key9827", "fakeTokenPlaceholder")) + .withProperties(new AutonomousDatabaseUpdateProperties().withAdminPassword("fakeTokenPlaceholder") + .withAutonomousMaintenanceScheduleType(AutonomousMaintenanceScheduleType.EARLY) + .withComputeCount(56.1D) + .withCpuCoreCount(45) + .withCustomerContacts(Arrays.asList(new CustomerContact().withEmail("dummyemail@microsoft.com"))) + .withDataStorageSizeInTbs(133) + .withDataStorageSizeInGbs(175271) + .withDisplayName("lrdrjpyyvufnxdzpwvlkmfukpstrjftdxcejcxtnqhxqbhvtzeiokllnspotsqeggddxkjjtf") + .withIsAutoScalingEnabled(true) + .withIsAutoScalingForStorageEnabled(true) + .withPeerDbId("qmpfwtvpfvbgmulethqznsyyjlpxmyfqfanrymzqsgraavtmlqqbexpzguyqybngoupbshlzpxv") + .withIsLocalDataGuardEnabled(true) + .withIsMtlsConnectionRequired(true) + .withLicenseModel(LicenseModel.LICENSE_INCLUDED) + .withScheduledOperationsList(Arrays.asList(new ScheduledOperationsTypeUpdate() + .withDayOfWeek(new DayOfWeekUpdate().withName(DayOfWeekName.MONDAY)) + .withScheduledStartTime("lwwvkazgmfremfwhckfb") + .withScheduledStopTime("hjwagzxijpiaogulmnmbuqakpqxhkjvaypjqnvbvtjddc"))) + .withDatabaseEdition(DatabaseEditionType.STANDARD_EDITION) + .withLongTermBackupSchedule( + new LongTermBackUpScheduleDetails().withRepeatCadence(RepeatCadenceType.ONE_TIME) + .withTimeOfBackup(OffsetDateTime.parse("2025-08-01T04:32:58.715Z")) + .withRetentionPeriodInDays(188) + .withIsDisabled(true)) + .withLocalAdgAutoFailoverMaxDataLossLimit(212) + .withOpenMode(OpenModeType.READ_ONLY) + .withPermissionLevel(PermissionLevelType.RESTRICTED) + .withRole(RoleType.PRIMARY) + .withBackupRetentionPeriodInDays(12) + .withWhitelistedIps(Arrays.asList( + "kfierlppwurtqrhfxwgfgrnqtmvraignzwsddwmpdijeveuevuoejfmbjvpnlrmmdflilxcwkkzvdofctsdjfxrrrwctihhnchtrouauesqbmlcqhzwnppnhrtitecenlfyshassvajukbwxudhlwixkvkgsessvshcwmleoqujeemwenhwlsccbcjnnviugzgylsxkssalqoicatcvkahogdvweymhdxboyqwhaxuzlmrdbvgbnnetobkbwygcsflzanwknlybvvzgjzjirpfrksbxwgllgfxwdflcisvxpkjecpgdaxccqkzxofedkrawvhzeabmunpykwd"))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### CloudExadataInfrastructures_AddStorageCapacity + +```java +/** + * Samples for CloudExadataInfrastructures AddStorageCapacity. + */ +public final class CloudExadataInfrastructuresAddStorageCapacitySamples { + /* + * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_AddStorageCapacity_MaximumSet_Gen.json + */ + /** + * Sample code: Perform add storage capacity on exadata infra - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void performAddStorageCapacityOnExadataInfraGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures() + .addStorageCapacity("rgopenapi", "Replace this value with a string matching RegExp .*", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_AddStorageCapacity_MinimumSet_Gen.json + */ + /** + * Sample code: Perform add storage capacity on exadata infra - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void performAddStorageCapacityOnExadataInfraGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures() + .addStorageCapacity("rgopenapi", "Replace this value with a string matching RegExp .*", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/exaInfra_addStorageCapacity.json + */ + /** + * Sample code: CloudExadataInfrastructures_addStorageCapacity. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void cloudExadataInfrastructuresAddStorageCapacity( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures().addStorageCapacity("rg000", "infra1", com.azure.core.util.Context.NONE); + } +} +``` + +### CloudExadataInfrastructures_ConfigureExascale + +```java +import com.azure.resourcemanager.oracledatabase.models.ConfigureExascaleCloudExadataInfrastructureDetails; + +/** + * Samples for CloudExadataInfrastructures ConfigureExascale. + */ +public final class CloudExadataInfrastructuresConfigureExascaleSamples { + /* + * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_ConfigureExascale_MaximumSet_Gen.json + */ + /** + * Sample code: CloudExadataInfrastructures_ConfigureExascale_MaximumSet_Gen - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void cloudExadataInfrastructuresConfigureExascaleMaximumSetGenGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures() + .configureExascale("rgopenapi", "Replace this value with a string matching RegExp .*", + new ConfigureExascaleCloudExadataInfrastructureDetails().withTotalStorageInGbs(19), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_ConfigureExascale_MinimumSet_Gen.json + */ + /** + * Sample code: CloudExadataInfrastructures_ConfigureExascale_MaximumSet_Gen - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void cloudExadataInfrastructuresConfigureExascaleMaximumSetGenGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures() + .configureExascale("rgopenapi", "Replace this value with a string matching RegExp .*", + new ConfigureExascaleCloudExadataInfrastructureDetails().withTotalStorageInGbs(19), + com.azure.core.util.Context.NONE); + } +} +``` + +### CloudExadataInfrastructures_CreateOrUpdate + +```java +import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureProperties; +import com.azure.resourcemanager.oracledatabase.models.CustomerContact; +import com.azure.resourcemanager.oracledatabase.models.DayOfWeek; +import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; +import com.azure.resourcemanager.oracledatabase.models.MaintenanceWindow; +import com.azure.resourcemanager.oracledatabase.models.Month; +import com.azure.resourcemanager.oracledatabase.models.MonthName; +import com.azure.resourcemanager.oracledatabase.models.PatchingMode; +import com.azure.resourcemanager.oracledatabase.models.Preference; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for CloudExadataInfrastructures CreateOrUpdate. + */ +public final class CloudExadataInfrastructuresCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01/exaInfra_create.json + */ + /** + * Sample code: CloudExadataInfrastructures_createOrUpdate. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void cloudExadataInfrastructuresCreateOrUpdate( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures() + .define("infra1") + .withRegion("eastus") + .withExistingResourceGroup("rg000") + .withZones(Arrays.asList("1")) + .withTags(mapOf("tagK1", "tagV1")) + .withProperties(new CloudExadataInfrastructureProperties().withComputeCount(100) + .withStorageCount(10) + .withShape("EXADATA.X9M") + .withDisplayName("infra 1")) + .create(); + } + + /* + * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: Create Exadata Infrastructure - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void createExadataInfrastructureGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures() + .define("Replace this value with a string matching RegExp .*") + .withRegion("eastus") + .withExistingResourceGroup("rgopenapi") + .withZones(Arrays.asList("1")) + .withTags(mapOf()) + .withProperties(new CloudExadataInfrastructureProperties().withComputeCount(100) + .withStorageCount(10) + .withMaintenanceWindow(new MaintenanceWindow().withPreference(Preference.NO_PREFERENCE) + .withMonths(Arrays.asList(new Month().withName(MonthName.JANUARY))) + .withWeeksOfMonth(Arrays.asList(0)) + .withDaysOfWeek(Arrays.asList(new DayOfWeek().withName(DayOfWeekName.MONDAY))) + .withHoursOfDay(Arrays.asList(0)) + .withLeadTimeInWeeks(10) + .withPatchingMode(PatchingMode.ROLLING) + .withCustomActionTimeoutInMins(120) + .withIsCustomActionTimeoutEnabled(true) + .withIsMonthlyPatchingEnabled(true)) + .withCustomerContacts(Arrays.asList(new CustomerContact().withEmail("noreply@oracle.com"))) + .withShape("EXADATA.X9M") + .withDisplayName("infra 1") + .withDatabaseServerType( + "ghnehafjgxkfpirwkmrgzphwhnftkktamoawnawztevnhbszjgkyvqvtxrnmbjqvfsthaptqbjtozuwdswkgrhmifljzjruvedeshwfdyrbzgapyyhkgxrulpttbarqsbgzoigggrsdjjlfmazpinyzmtcpugkgaiitvccklieodrscikvitdfdwczpko") + .withStorageServerType( + "ikmrpsmpkbrnxpaaemmljvtvyxbtcjijsowrpislrwkgjhucszljohrnvfotgbiknehciipnkfcqkrqseqz")) + .create(); + } + + /* + * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: Create Exadata Infrastructure - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void createExadataInfrastructureGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures() + .define("Replace this value with a string matching RegExp .*") + .withRegion("eastus") + .withExistingResourceGroup("rgopenapi") + .withZones(Arrays.asList("1")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### CloudExadataInfrastructures_Delete + +```java +/** + * Samples for CloudExadataInfrastructures Delete. + */ +public final class CloudExadataInfrastructuresDeleteSamples { + /* + * x-ms-original-file: 2025-09-01/exaInfra_delete.json + */ + /** + * Sample code: CloudExadataInfrastructures_delete. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + cloudExadataInfrastructuresDelete(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures().delete("rg000", "infra1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: Delete Exadata Infrastructure - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void deleteExadataInfrastructureGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures() + .delete("rgopenapi", "Replace this value with a string matching RegExp .*", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: Delete Exadata Infrastructure - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void deleteExadataInfrastructureGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures() + .delete("rgopenapi", "Replace this value with a string matching RegExp .*", + com.azure.core.util.Context.NONE); + } +} +``` + +### CloudExadataInfrastructures_GetByResourceGroup + +```java +/** + * Samples for CloudExadataInfrastructures GetByResourceGroup. + */ +public final class CloudExadataInfrastructuresGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_Get_MinimumSet_Gen.json + */ + /** + * Sample code: Get Exadata Infrastructure - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getExadataInfrastructureGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures() + .getByResourceGroupWithResponse("rgopenapi", "Replace this value with a string matching RegExp .*", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/exaInfra_get.json + */ + /** + * Sample code: CloudExadataInfrastructures_get. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + cloudExadataInfrastructuresGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures() + .getByResourceGroupWithResponse("rg000", "infra1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Get Exadata Infrastructure - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getExadataInfrastructureGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures() + .getByResourceGroupWithResponse("rgopenapi", "Replace this value with a string matching RegExp .*", + com.azure.core.util.Context.NONE); + } +} +``` + +### CloudExadataInfrastructures_List + +```java +/** + * Samples for CloudExadataInfrastructures List. + */ +public final class CloudExadataInfrastructuresListSamples { + /* + * x-ms-original-file: 2025-09-01/exaInfra_listBySubscription.json + */ + /** + * Sample code: CloudExadataInfrastructures_listBySubscription. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void cloudExadataInfrastructuresListBySubscription( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: List Exadata Infrastructure by subscription - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listExadataInfrastructureBySubscriptionGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: List Exadata Infrastructure by subscription - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listExadataInfrastructureBySubscriptionGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures().list(com.azure.core.util.Context.NONE); + } +} +``` + +### CloudExadataInfrastructures_ListByResourceGroup + +```java +/** + * Samples for CloudExadataInfrastructures ListByResourceGroup. + */ +public final class CloudExadataInfrastructuresListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: List Exadata Infrastructure by resource group - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listExadataInfrastructureByResourceGroupGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/exaInfra_listByResourceGroup.json + */ + /** + * Sample code: CloudExadataInfrastructures_listByResourceGroup. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void cloudExadataInfrastructuresListByResourceGroup( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures().listByResourceGroup("rg000", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: List Exadata Infrastructure by resource group - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listExadataInfrastructureByResourceGroupGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudExadataInfrastructures().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } +} +``` + +### CloudExadataInfrastructures_Update + +```java +import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructure; +import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureUpdateProperties; +import com.azure.resourcemanager.oracledatabase.models.CustomerContact; +import com.azure.resourcemanager.oracledatabase.models.DayOfWeek; +import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; +import com.azure.resourcemanager.oracledatabase.models.MaintenanceWindow; +import com.azure.resourcemanager.oracledatabase.models.Month; +import com.azure.resourcemanager.oracledatabase.models.MonthName; +import com.azure.resourcemanager.oracledatabase.models.PatchingMode; +import com.azure.resourcemanager.oracledatabase.models.Preference; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for CloudExadataInfrastructures Update. + */ +public final class CloudExadataInfrastructuresUpdateSamples { + /* + * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_Update_MaximumSet_Gen.json + */ + /** + * Sample code: Patch Exadata Infrastructure - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void patchExadataInfrastructureGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + CloudExadataInfrastructure resource = manager.cloudExadataInfrastructures() + .getByResourceGroupWithResponse("rgopenapi", "cloudexaInfra1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key831", "fakeTokenPlaceholder")) + .withZones(Arrays.asList("wl")) + .withProperties(new CloudExadataInfrastructureUpdateProperties().withComputeCount(9) + .withStorageCount(4) + .withMaintenanceWindow(new MaintenanceWindow().withPreference(Preference.NO_PREFERENCE) + .withMonths(Arrays.asList(new Month().withName(MonthName.JANUARY))) + .withWeeksOfMonth(Arrays.asList(0)) + .withDaysOfWeek(Arrays.asList(new DayOfWeek().withName(DayOfWeekName.MONDAY))) + .withHoursOfDay(Arrays.asList(0)) + .withLeadTimeInWeeks(10) + .withPatchingMode(PatchingMode.ROLLING) + .withCustomActionTimeoutInMins(120) + .withIsCustomActionTimeoutEnabled(true) + .withIsMonthlyPatchingEnabled(true)) + .withCustomerContacts(Arrays.asList(new CustomerContact().withEmail("dummyemail@microsoft.com"))) + .withDisplayName("displayName")) + .apply(); + } + + /* + * x-ms-original-file: 2025-09-01/CloudExadataInfrastructures_Update_MinimumSet_Gen.json + */ + /** + * Sample code: Patch Exadata Infrastructure - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void patchExadataInfrastructureGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + CloudExadataInfrastructure resource = manager.cloudExadataInfrastructures() + .getByResourceGroupWithResponse("rgopenapi", "cloudexainfra1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } + + /* + * x-ms-original-file: 2025-09-01/exaInfra_patch.json + */ + /** + * Sample code: CloudExadataInfrastructures_update. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + cloudExadataInfrastructuresUpdate(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + CloudExadataInfrastructure resource = manager.cloudExadataInfrastructures() + .getByResourceGroupWithResponse("rg000", "infra1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### CloudVmClusters_AddVms + +```java +import com.azure.resourcemanager.oracledatabase.models.AddRemoveDbNode; +import java.util.Arrays; + +/** + * Samples for CloudVmClusters AddVms. + */ +public final class CloudVmClustersAddVmsSamples { + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_AddVms_MaximumSet_Gen.json + */ + /** + * Sample code: Add VMs to VM Cluster - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void addVMsToVMClusterGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters() + .addVms("rgopenapi", "cloudvmcluster1", + new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa", "ocid1..aaaaaa")), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/vmClusters_addVms.json + */ + /** + * Sample code: CloudVmClusters_addVms. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void cloudVmClustersAddVms(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters() + .addVms("rg000", "cluster1", + new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa", "ocid1..aaaaaa")), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_AddVms_MinimumSet_Gen.json + */ + /** + * Sample code: Add VMs to VM Cluster - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void addVMsToVMClusterGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters() + .addVms("rgopenapi", "cloudvmcluster1", + new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa", "ocid1..aaaaaa")), + com.azure.core.util.Context.NONE); + } +} +``` + +### CloudVmClusters_CreateOrUpdate + +```java +import com.azure.resourcemanager.oracledatabase.models.CloudVmClusterProperties; +import com.azure.resourcemanager.oracledatabase.models.DataCollectionOptions; +import com.azure.resourcemanager.oracledatabase.models.FileSystemConfigurationDetails; +import com.azure.resourcemanager.oracledatabase.models.LicenseModel; +import com.azure.resourcemanager.oracledatabase.models.NsgCidr; +import com.azure.resourcemanager.oracledatabase.models.PortRange; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for CloudVmClusters CreateOrUpdate. + */ +public final class CloudVmClustersCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: Create VM Cluster - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void createVMClusterGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters() + .define("cloudvmcluster1") + .withRegion("eastus") + .withExistingResourceGroup("rgopenapi") + .withTags(mapOf()) + .withProperties(new CloudVmClusterProperties().withStorageSizeInGbs(1000) + .withFileSystemConfigurationDetails(Arrays.asList( + new FileSystemConfigurationDetails().withMountPoint("gukfhjlmkqfqdgb").withFileSystemSizeGb(20))) + .withDataStorageSizeInTbs(1000.0D) + .withDbNodeStorageSizeInGbs(1000) + .withMemorySizeInGbs(1000) + .withTimeZone("UTC") + .withZoneId("ocid1..aaaa") + .withHostname("hostname1") + .withDomain("domain1") + .withCpuCoreCount(2) + .withOcpuCount(3.0D) + .withClusterName("cluster1") + .withDataStoragePercentage(100) + .withIsLocalBackupEnabled(true) + .withCloudExadataInfrastructureId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/cloudExadataInfrastructures/infra1") + .withIsSparseDiskgroupEnabled(true) + .withSystemVersion("v1") + .withSshPublicKeys(Arrays.asList("ssh-key 1")) + .withLicenseModel(LicenseModel.LICENSE_INCLUDED) + .withScanListenerPortTcp(1050) + .withScanListenerPortTcpSsl(1025) + .withVnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1") + .withGiVersion("19.0.0.0") + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withBackupSubnetCidr("172.17.5.0/24") + .withNsgCidrs(Arrays.asList( + new NsgCidr().withSource("10.0.0.0/16") + .withDestinationPortRange(new PortRange().withMin(1520).withMax(1522)), + new NsgCidr().withSource("10.10.0.0/24") + .withDestinationPortRange(new PortRange().withMin(9434).withMax(11996)))) + .withDataCollectionOptions(new DataCollectionOptions().withIsDiagnosticsEventsEnabled(true) + .withIsHealthMonitoringEnabled(true) + .withIsIncidentLogsEnabled(true)) + .withDisplayName("cluster 1") + .withComputeNodes(Arrays.asList("ggficcnjgibtuqgdbbrzyckmtlhddecfcvjurboqfufqchgpvwmlcdcyyxnjivpkvsvr")) + .withDbServers(Arrays.asList("ocid1..aaaa"))) + .create(); + } + + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: Create VM Cluster - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void createVMClusterGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters() + .define("cloudvmcluster1") + .withRegion("eastus") + .withExistingResourceGroup("rgopenapi") + .create(); + } + + /* + * x-ms-original-file: 2025-09-01/vmClusters_create.json + */ + /** + * Sample code: CloudVmClusters_createOrUpdate. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + cloudVmClustersCreateOrUpdate(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters() + .define("cluster1") + .withRegion("eastus") + .withExistingResourceGroup("rg000") + .withTags(mapOf("tagK1", "tagV1")) + .withProperties(new CloudVmClusterProperties().withDataStorageSizeInTbs(1000.0D) + .withDbNodeStorageSizeInGbs(1000) + .withMemorySizeInGbs(1000) + .withTimeZone("UTC") + .withHostname("hostname1") + .withDomain("domain1") + .withCpuCoreCount(2) + .withOcpuCount(3.0D) + .withClusterName("cluster1") + .withDataStoragePercentage(100) + .withIsLocalBackupEnabled(false) + .withCloudExadataInfrastructureId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/cloudExadataInfrastructures/infra1") + .withIsSparseDiskgroupEnabled(false) + .withSshPublicKeys(Arrays.asList("ssh-key 1")) + .withLicenseModel(LicenseModel.LICENSE_INCLUDED) + .withScanListenerPortTcp(1050) + .withScanListenerPortTcpSsl(1025) + .withVnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1") + .withGiVersion("19.0.0.0") + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withBackupSubnetCidr("172.17.5.0/24") + .withNsgCidrs(Arrays.asList( + new NsgCidr().withSource("10.0.0.0/16") + .withDestinationPortRange(new PortRange().withMin(1520).withMax(1522)), + new NsgCidr().withSource("10.10.0.0/24"))) + .withDataCollectionOptions(new DataCollectionOptions().withIsDiagnosticsEventsEnabled(false) + .withIsHealthMonitoringEnabled(false) + .withIsIncidentLogsEnabled(false)) + .withDisplayName("cluster 1") + .withDbServers(Arrays.asList("ocid1..aaaa"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### CloudVmClusters_Delete + +```java +/** + * Samples for CloudVmClusters Delete. + */ +public final class CloudVmClustersDeleteSamples { + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: Delete VM Cluster - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void deleteVMClusterGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters().delete("rgopenapi", "cloudvmcluster1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: Delete VM Cluster - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void deleteVMClusterGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters().delete("rgopenapi", "cloudvmcluster1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/vmClusters_delete.json + */ + /** + * Sample code: CloudVmClusters_delete. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void cloudVmClustersDelete(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters().delete("rg000", "cluster1", com.azure.core.util.Context.NONE); + } +} +``` + +### CloudVmClusters_GetByResourceGroup + +```java +/** + * Samples for CloudVmClusters GetByResourceGroup. + */ +public final class CloudVmClustersGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_Get_MinimumSet_Gen.json + */ + /** + * Sample code: Get VM Cluster - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + getVMClusterGeneratedByMinimumSetRule(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters() + .getByResourceGroupWithResponse("rgopenapi", "cloudvmcluster1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/vmClusters_get.json + */ + /** + * Sample code: CloudVmClusters_get. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void cloudVmClustersGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters().getByResourceGroupWithResponse("rg000", "cluster1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Get VM Cluster - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + getVMClusterGeneratedByMaximumSetRule(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters() + .getByResourceGroupWithResponse("rgopenapi", "cloudvmcluster1", com.azure.core.util.Context.NONE); + } +} +``` + +### CloudVmClusters_List + +```java +/** + * Samples for CloudVmClusters List. + */ +public final class CloudVmClustersListSamples { + /* + * x-ms-original-file: 2025-09-01/vmClusters_listBySubscription.json + */ + /** + * Sample code: CloudVmClusters_listBySubscription. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + cloudVmClustersListBySubscription(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: List VM Clusters by subscription - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listVMClustersBySubscriptionGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: List VM Clusters by subscription - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listVMClustersBySubscriptionGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters().list(com.azure.core.util.Context.NONE); + } +} +``` + +### CloudVmClusters_ListByResourceGroup + +```java +/** + * Samples for CloudVmClusters ListByResourceGroup. + */ +public final class CloudVmClustersListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: List VM Clusters by resource group - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listVMClustersByResourceGroupGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/vmClusters_listByResourceGroup.json + */ + /** + * Sample code: CloudVmClusters_listByResourceGroup. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + cloudVmClustersListByResourceGroup(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters().listByResourceGroup("rg000", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: List VM Clusters by resource group - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listVMClustersByResourceGroupGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } +} +``` + +### CloudVmClusters_ListPrivateIpAddresses + +```java +import com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressesFilter; + +/** + * Samples for CloudVmClusters ListPrivateIpAddresses. + */ +public final class CloudVmClustersListPrivateIpAddressesSamples { + /* + * x-ms-original-file: 2025-09-01/vmClusters_listPrivateIpAddresses.json + */ + /** + * Sample code: CloudVmClusters_listPrivateIpAddresses. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + cloudVmClustersListPrivateIpAddresses(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters() + .listPrivateIpAddressesWithResponse("rg000", "cluster1", + new PrivateIpAddressesFilter().withSubnetId("ocid1..aaaaaa").withVnicId("ocid1..aaaaa"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_ListPrivateIpAddresses_MinimumSet_Gen.json + */ + /** + * Sample code: List Private IP Addresses for VM Cluster - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listPrivateIPAddressesForVMClusterGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters() + .listPrivateIpAddressesWithResponse("rgopenapi", "cloudvmcluster1", + new PrivateIpAddressesFilter().withSubnetId("ocid1..aaaaaa").withVnicId("ocid1..aaaaa"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_ListPrivateIpAddresses_MaximumSet_Gen.json + */ + /** + * Sample code: List Private IP Addresses for VM Cluster - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listPrivateIPAddressesForVMClusterGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters() + .listPrivateIpAddressesWithResponse("rgopenapi", "cloudvmcluster1", + new PrivateIpAddressesFilter().withSubnetId("ocid1..aaaaaa").withVnicId("ocid1..aaaaa"), + com.azure.core.util.Context.NONE); + } +} +``` + +### CloudVmClusters_RemoveVms + +```java +import com.azure.resourcemanager.oracledatabase.models.AddRemoveDbNode; +import java.util.Arrays; + +/** + * Samples for CloudVmClusters RemoveVms. + */ +public final class CloudVmClustersRemoveVmsSamples { + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_RemoveVms_MaximumSet_Gen.json + */ + /** + * Sample code: Remove VMs from VM Cluster - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void removeVMsFromVMClusterGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters() + .removeVms("rgopenapi", "cloudvmcluster1", + new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa", "ocid1..aaaaaa")), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_RemoveVms_MinimumSet_Gen.json + */ + /** + * Sample code: Remove VMs from VM Cluster - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void removeVMsFromVMClusterGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters() + .removeVms("rgopenapi", "cloudvmcluster1", + new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa", "ocid1..aaaaaa")), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/vmClusters_removeVms.json + */ + /** + * Sample code: CloudVmClusters_removeVms. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + cloudVmClustersRemoveVms(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters() + .removeVms("rg000", "cluster1", new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa")), + com.azure.core.util.Context.NONE); + } +} +``` + +### CloudVmClusters_Update + +```java +import com.azure.resourcemanager.oracledatabase.models.CloudVmCluster; +import com.azure.resourcemanager.oracledatabase.models.CloudVmClusterUpdateProperties; +import com.azure.resourcemanager.oracledatabase.models.DataCollectionOptions; +import com.azure.resourcemanager.oracledatabase.models.FileSystemConfigurationDetails; +import com.azure.resourcemanager.oracledatabase.models.LicenseModel; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for CloudVmClusters Update. + */ +public final class CloudVmClustersUpdateSamples { + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_Update_MaximumSet_Gen.json + */ + /** + * Sample code: Patch VM Cluster - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void patchVMClusterGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + CloudVmCluster resource = manager.cloudVmClusters() + .getByResourceGroupWithResponse("rgopenapi", "cloudvmcluster1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key4668", "fakeTokenPlaceholder")) + .withProperties(new CloudVmClusterUpdateProperties().withStorageSizeInGbs(17) + .withFileSystemConfigurationDetails(Arrays.asList( + new FileSystemConfigurationDetails().withMountPoint("gukfhjlmkqfqdgb").withFileSystemSizeGb(20))) + .withDataStorageSizeInTbs(29.0D) + .withDbNodeStorageSizeInGbs(24) + .withMemorySizeInGbs(9) + .withCpuCoreCount(18) + .withOcpuCount(7.0D) + .withSshPublicKeys(Arrays.asList("hazhcc")) + .withLicenseModel(LicenseModel.LICENSE_INCLUDED) + .withDataCollectionOptions(new DataCollectionOptions().withIsDiagnosticsEventsEnabled(true) + .withIsHealthMonitoringEnabled(true) + .withIsIncidentLogsEnabled(true)) + .withDisplayName("hvdyewkjqjxwzinkqnnsqxbmccteohzumz") + .withComputeNodes( + Arrays.asList("ggficcnjgibtuqgdbbrzyckmtlhddecfcvjurboqfufqchgpvwmlcdcyyxnjivpkvsvr"))) + .apply(); + } + + /* + * x-ms-original-file: 2025-09-01/vmClusters_patch.json + */ + /** + * Sample code: CloudVmClusters_update. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void cloudVmClustersUpdate(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + CloudVmCluster resource = manager.cloudVmClusters() + .getByResourceGroupWithResponse("rg000", "cluster1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } + + /* + * x-ms-original-file: 2025-09-01/CloudVmClusters_Update_MinimumSet_Gen.json + */ + /** + * Sample code: Patch VM Cluster - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void patchVMClusterGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + CloudVmCluster resource = manager.cloudVmClusters() + .getByResourceGroupWithResponse("rgopenapi", "cloudvmcluster1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### DbNodes_Action + +```java +import com.azure.resourcemanager.oracledatabase.models.DbNodeAction; +import com.azure.resourcemanager.oracledatabase.models.DbNodeActionEnum; + +/** + * Samples for DbNodes Action. + */ +public final class DbNodesActionSamples { + /* + * x-ms-original-file: 2025-09-01/DbNodes_Action_MinimumSet_Gen.json + */ + /** + * Sample code: VM actions on DbNodes of VM Cluster - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void vmActionsOnDbNodesOfVMClusterGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbNodes() + .action("rgopenapi", "cloudvmcluster1", "adfedefeewwevkieviect", + new DbNodeAction().withAction(DbNodeActionEnum.START), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/dbNodes_action.json + */ + /** + * Sample code: DbNodes_Action. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void dbNodesAction(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbNodes() + .action("rg000", "cluster1", "ocid1....aaaaaa", new DbNodeAction().withAction(DbNodeActionEnum.START), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/DbNodes_Action_MaximumSet_Gen.json + */ + /** + * Sample code: VM actions on DbNodes of VM Cluster - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void vmActionsOnDbNodesOfVMClusterGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbNodes() + .action("rgopenapi", "cloudvmcluster1", "abciderewdidsereq", + new DbNodeAction().withAction(DbNodeActionEnum.START), com.azure.core.util.Context.NONE); + } +} +``` + +### DbNodes_Get + +```java +/** + * Samples for DbNodes Get. + */ +public final class DbNodesGetSamples { + /* + * x-ms-original-file: 2025-09-01/DbNodes_Get_MinimumSet_Gen.json + */ + /** + * Sample code: Get DbNode - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + getDbNodeGeneratedByMinimumSetRule(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbNodes() + .getWithResponse("rgopenapi", "Replace this value with a string matching RegExp .*", + "Replace this value with a string matching RegExp .*", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/dbNodes_get.json + */ + /** + * Sample code: DbNodes_get. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void dbNodesGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbNodes().getWithResponse("rg000", "cluster1", "ocid1....aaaaaa", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/DbNodes_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Get DbNode - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + getDbNodeGeneratedByMaximumSetRule(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbNodes() + .getWithResponse("rgopenapi", "cloudvmcluster1", "weraeefrwlkjejfiepwcd", com.azure.core.util.Context.NONE); + } +} +``` + +### DbNodes_ListByCloudVmCluster + +```java +/** + * Samples for DbNodes ListByCloudVmCluster. + */ +public final class DbNodesListByCloudVmClusterSamples { + /* + * x-ms-original-file: 2025-09-01/dbNodes_listByParent.json + */ + /** + * Sample code: DbNodes_listByCloudVmCluster. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + dbNodesListByCloudVmCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbNodes().listByCloudVmCluster("rg000", "cluster1", com.azure.core.util.Context.NONE); + } +} +``` + +### DbServers_Get + +```java +/** + * Samples for DbServers Get. + */ +public final class DbServersGetSamples { + /* + * x-ms-original-file: 2025-09-01/DbServers_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Get DbServer by parent - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getDbServerByParentGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbServers() + .getWithResponse("rgopenapi", "Replace this value with a string matching RegExp .*", + "Replace this value with a string matching RegExp .*", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/dbServers_get.json + */ + /** + * Sample code: DbServers_get. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void dbServersGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbServers().getWithResponse("rg000", "infra1", "ocid1....aaaaaa", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/DbServers_Get_MinimumSet_Gen.json + */ + /** + * Sample code: Get DbServer by parent - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getDbServerByParentGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbServers() + .getWithResponse("rgopenapi", "Replace this value with a string matching RegExp .*", + "Replace this value with a string matching RegExp .*", com.azure.core.util.Context.NONE); + } +} +``` + +### DbServers_ListByCloudExadataInfrastructure + +```java +/** + * Samples for DbServers ListByCloudExadataInfrastructure. + */ +public final class DbServersListByCloudExadataInfrastructureSamples { + /* + * x-ms-original-file: 2025-09-01/dbServers_listByParent.json + */ + /** + * Sample code: DbServers_listByCloudExadataInfrastructure. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void dbServersListByCloudExadataInfrastructure( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbServers().listByCloudExadataInfrastructure("rg000", "infra1", com.azure.core.util.Context.NONE); + } +} +``` + +### DbSystemShapes_Get + +```java +/** + * Samples for DbSystemShapes Get. + */ +public final class DbSystemShapesGetSamples { + /* + * x-ms-original-file: 2025-09-01/DbSystemShapes_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Get a DbSystemShape by name - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getADbSystemShapeByNameGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbSystemShapes().getWithResponse("eastus", "dbsystemshape1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/DbSystemShapes_Get_MinimumSet_Gen.json + */ + /** + * Sample code: Get a DbSystemShape by name - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getADbSystemShapeByNameGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbSystemShapes() + .getWithResponse("eastus", "Replace this value with a string matching RegExp .*", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/dbSystemShapes_get.json + */ + /** + * Sample code: DbSystemShapes_get. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void dbSystemShapesGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbSystemShapes().getWithResponse("eastus", "EXADATA.X9M", com.azure.core.util.Context.NONE); + } +} +``` + +### DbSystemShapes_ListByLocation + +```java +/** + * Samples for DbSystemShapes ListByLocation. + */ +public final class DbSystemShapesListByLocationSamples { + /* + * x-ms-original-file: 2025-09-01/DbSystemShapes_ListByLocation_MinimumSet_Gen.json + */ + /** + * Sample code: List DbSystemShapes by location - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listDbSystemShapesByLocationGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbSystemShapes().listByLocation("eastus", null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/DbSystemShapes_ListByLocation_MaximumSet_Gen.json + */ + /** + * Sample code: List DbSystemShapes by location - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listDbSystemShapesByLocationGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbSystemShapes().listByLocation("eastus", "ymedsvqavemtixp", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/dbSystemShapes_listByLocation.json + */ + /** + * Sample code: DbSystemShapes_listByLocation. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + dbSystemShapesListByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbSystemShapes().listByLocation("eastus", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### DbSystems_CreateOrUpdate + +```java +import com.azure.resourcemanager.oracledatabase.models.ComputeModel; +import com.azure.resourcemanager.oracledatabase.models.DbSystemDatabaseEditionType; +import com.azure.resourcemanager.oracledatabase.models.DbSystemOptions; +import com.azure.resourcemanager.oracledatabase.models.DbSystemProperties; +import com.azure.resourcemanager.oracledatabase.models.DiskRedundancyType; +import com.azure.resourcemanager.oracledatabase.models.StorageManagementType; +import com.azure.resourcemanager.oracledatabase.models.StorageVolumePerformanceMode; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DbSystems CreateOrUpdate. + */ +public final class DbSystemsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01/DbSystems_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: DbSystems_CreateOrUpdate_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + dbSystemsCreateOrUpdateMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbSystems() + .define("dbsystem1") + .withRegion("uuh") + .withExistingResourceGroup("rgopenapi") + .withTags(mapOf("key2549", "fakeTokenPlaceholder")) + .withProperties(new DbSystemProperties().withResourceAnchorId( + "/subscriptions/00000000-0000-4025-0000-000000000000/resourceGroups/rg001/providers/Oracle.Database/resourceAnchors/resourceanchor1") + .withNetworkAnchorId( + "/subscriptions/00000000-0000-4025-0000-000000000000/resourceGroups/rg001/providers/Oracle.Database/networkAnchors/networkanchor1") + .withClusterName("icshqxm") + .withDisplayName( + "cpvibowyttzngughrisxfglqnffhtbjacuskwmixpczatxyrmrrgjsokonbolesdufrvuganmokwjkziisezqbvhmxtftldjulyixvmrcpmtlhynhbdlufcjdmmlbvcjdwbumjzdgwrxthntbbzscyrgmcfmkkowpujydlofklcrhdhoefeyl") + .withInitialDataStorageSizeInGb(19) + .withDbSystemOptions(new DbSystemOptions().withStorageManagement(StorageManagementType.LVM)) + .withDiskRedundancy(DiskRedundancyType.HIGH) + .withHostname("krixp") + .withNodeCount(24) + .withShape( + "kcknzpixkpolhxpcvpzwhjjvyafciktxguoljnixmztvkfryxaqogtrefbjbibzlbojjnuhrrxninevocnigpzenshgqozclxyhzwkavncfvekfpmbxhinwqvupoacgascnmqvplqckjrqbxsejzprsvgvmvkbuvncffjv") + .withSshPublicKeys(Arrays.asList("qtozhgwrjzkmwvdsggbivnbcwgykjnuvugqwmzompvbyfi")) + .withStorageVolumePerformanceMode(StorageVolumePerformanceMode.BALANCED) + .withTimeZone("gyrlmvdtseawpykcpwlgexrcffciyavsshsekacwcfkubcqdbrliy") + .withComputeModel(ComputeModel.ECPU) + .withComputeCount(28) + .withDatabaseEdition(DbSystemDatabaseEditionType.STANDARD_EDITION) + .withAdminPassword("fakeTokenPlaceholder") + .withDbVersion("nuzcyzulicdscaxxleansibdtqxhf")) + .withZones(Arrays.asList("pstozrrpkhlaffxt")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### DbSystems_Delete + +```java +/** + * Samples for DbSystems Delete. + */ +public final class DbSystemsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01/DbSystems_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: DbSystems_Delete_MinimumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + dbSystemsDeleteMinimumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbSystems().delete("rgopenapi", "dbsystem1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/DbSystems_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: DbSystems_Delete_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + dbSystemsDeleteMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbSystems().delete("rgopenapi", "dbsystem1", com.azure.core.util.Context.NONE); + } +} +``` + +### DbSystems_GetByResourceGroup + +```java +/** + * Samples for DbSystems GetByResourceGroup. + */ +public final class DbSystemsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01/DbSystems_Get_MaximumSet_Gen.json + */ + /** + * Sample code: DbSystems_Get_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void dbSystemsGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbSystems().getByResourceGroupWithResponse("rgopenapi", "dbsystem1", com.azure.core.util.Context.NONE); + } +} +``` + +### DbSystems_List + +```java +/** + * Samples for DbSystems List. + */ +public final class DbSystemsListSamples { + /* + * x-ms-original-file: 2025-09-01/DbSystems_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: DbSystems_ListBySubscription - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void dbSystemsListBySubscriptionGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbSystems().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/DbSystems_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: DbSystems_ListBySubscription_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + dbSystemsListBySubscriptionMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbSystems().list(com.azure.core.util.Context.NONE); + } +} +``` + +### DbSystems_ListByResourceGroup + +```java +/** + * Samples for DbSystems ListByResourceGroup. + */ +public final class DbSystemsListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01/DbSystems_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: DbSystems_ListByResourceGroup_MaximumSet_Gen - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void dbSystemsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbSystems().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/DbSystems_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: DbSystems_ListByResourceGroup_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + dbSystemsListByResourceGroupMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbSystems().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } +} +``` + +### DbSystems_Update + +```java +import com.azure.resourcemanager.oracledatabase.models.DbSystem; +import com.azure.resourcemanager.oracledatabase.models.DbSystemSourceType; +import com.azure.resourcemanager.oracledatabase.models.DbSystemUpdateProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DbSystems Update. + */ +public final class DbSystemsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01/DbSystems_Update_MaximumSet_Gen.json + */ + /** + * Sample code: DbSystems_Update_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + dbSystemsUpdateMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + DbSystem resource = manager.dbSystems() + .getByResourceGroupWithResponse("rgopenapi", "dbsystem1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key5457", "fakeTokenPlaceholder")) + .withZones(Arrays.asList("zone1")) + .withProperties(new DbSystemUpdateProperties().withSource(DbSystemSourceType.NONE)) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### DbVersions_Get + +```java +/** + * Samples for DbVersions Get. + */ +public final class DbVersionsGetSamples { + /* + * x-ms-original-file: 2025-09-01/DbVersions_Get_MaximumSet_Gen.json + */ + /** + * Sample code: DbVersions_Get_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void dbVersionsGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbVersions().getWithResponse("eastus", "23.0.0.0.0", com.azure.core.util.Context.NONE); + } +} +``` + +### DbVersions_ListByLocation + +```java +import com.azure.resourcemanager.oracledatabase.models.BaseDbSystemShapes; +import com.azure.resourcemanager.oracledatabase.models.ShapeFamilyType; +import com.azure.resourcemanager.oracledatabase.models.StorageManagementType; + +/** + * Samples for DbVersions ListByLocation. + */ +public final class DbVersionsListByLocationSamples { + /* + * x-ms-original-file: 2025-09-01/DbVersions_ListByLocation_MaximumSet_Gen.json + */ + /** + * Sample code: DbVersions_ListByLocation_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + dbVersionsListByLocationMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbVersions() + .listByLocation("eastus", BaseDbSystemShapes.VMSTANDARD_X86, + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Oracle.Database/dbSystems/dbsystem1", + StorageManagementType.LVM, true, true, ShapeFamilyType.VIRTUAL_MACHINE, + com.azure.core.util.Context.NONE); + } +} +``` + +### DnsPrivateViews_Get + +```java +/** + * Samples for DnsPrivateViews Get. + */ +public final class DnsPrivateViewsGetSamples { + /* + * x-ms-original-file: 2025-09-01/DnsPrivateViews_Get_MinimumSet_Gen.json + */ + /** + * Sample code: Get a DnsPrivateView by name - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getADnsPrivateViewByNameGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dnsPrivateViews() + .getWithResponse("eastus", "Replace this value with a string matching RegExp .*", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/dnsPrivateViews_get.json + */ + /** + * Sample code: DnsPrivateViews_get. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void dnsPrivateViewsGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dnsPrivateViews().getWithResponse("eastus", "ocid1....aaaaaa", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/DnsPrivateViews_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Get a DnsPrivateView by name - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getADnsPrivateViewByNameGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dnsPrivateViews() + .getWithResponse("eastus", "weasefewawelkrlweircicceiwpdic", com.azure.core.util.Context.NONE); + } +} +``` + +### DnsPrivateViews_ListByLocation + +```java +/** + * Samples for DnsPrivateViews ListByLocation. + */ +public final class DnsPrivateViewsListByLocationSamples { + /* + * x-ms-original-file: 2025-09-01/DnsPrivateViews_ListByLocation_MaximumSet_Gen.json + */ + /** + * Sample code: List DnsPrivateViews by location - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listDnsPrivateViewsByLocationGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dnsPrivateViews().listByLocation("eastus", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/DnsPrivateViews_ListByLocation_MinimumSet_Gen.json + */ + /** + * Sample code: List DnsPrivateViews by location - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listDnsPrivateViewsByLocationGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dnsPrivateViews().listByLocation("eastus", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/dnsPrivateViews_listByLocation.json + */ + /** + * Sample code: DnsPrivateViews_listByLocation. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + dnsPrivateViewsListByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dnsPrivateViews().listByLocation("eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### DnsPrivateZones_Get + +```java +/** + * Samples for DnsPrivateZones Get. + */ +public final class DnsPrivateZonesGetSamples { + /* + * x-ms-original-file: 2025-09-01/DnsPrivateZones_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Get a DnsPrivateZone by name - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getADnsPrivateZoneByNameGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dnsPrivateZones().getWithResponse("eastus", "dnsprivatezone1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/DnsPrivateZones_Get_MinimumSet_Gen.json + */ + /** + * Sample code: Get a DnsPrivateZone by name - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getADnsPrivateZoneByNameGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dnsPrivateZones().getWithResponse("eastus", "dnsprivatezone1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/dnsPrivateZones_get.json + */ + /** + * Sample code: DnsPrivateZones_get. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void dnsPrivateZonesGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dnsPrivateZones() + .getWithResponse("eastus", "example-dns-private-zone", com.azure.core.util.Context.NONE); + } +} +``` + +### DnsPrivateZones_ListByLocation + +```java +/** + * Samples for DnsPrivateZones ListByLocation. + */ +public final class DnsPrivateZonesListByLocationSamples { + /* + * x-ms-original-file: 2025-09-01/DnsPrivateZones_ListByLocation_MinimumSet_Gen.json + */ + /** + * Sample code: List DnsPrivateZones by location - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listDnsPrivateZonesByLocationGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dnsPrivateZones().listByLocation("eastus", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/DnsPrivateZones_ListByLocation_MaximumSet_Gen.json + */ + /** + * Sample code: List DnsPrivateZones by location - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listDnsPrivateZonesByLocationGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dnsPrivateZones().listByLocation("eastus", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/dnsPrivateZones_listByLocation.json + */ + /** + * Sample code: DnsPrivateZones_listByLocation. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + dnsPrivateZonesListByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dnsPrivateZones().listByLocation("eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### ExadbVmClusters_CreateOrUpdate + +```java +import com.azure.resourcemanager.oracledatabase.models.DataCollectionOptions; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterProperties; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterStorageDetails; +import com.azure.resourcemanager.oracledatabase.models.LicenseModel; +import com.azure.resourcemanager.oracledatabase.models.NsgCidr; +import com.azure.resourcemanager.oracledatabase.models.PortRange; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ExadbVmClusters CreateOrUpdate. + */ +public final class ExadbVmClustersCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01/ExadbVmClusters_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_CreateOrUpdate_MaximumSet - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exadbVmClustersCreateOrUpdateMaximumSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters() + .define("exadbVmClusterName1") + .withRegion("eastus") + .withExistingResourceGroup("rgopenapi") + .create(); + } + + /* + * x-ms-original-file: 2025-09-01/ExadbVmClusters_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_CreateOrUpdate_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exadbVmClustersCreateOrUpdateMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters() + .define("vmcluster1") + .withRegion("dsmvbplxdvesmvsgdvorgxalwpqxwt") + .withExistingResourceGroup("rgopenapi") + .withTags(mapOf("key8577", "fakeTokenPlaceholder")) + .withProperties(new ExadbVmClusterProperties().withClusterName("p") + .withBackupSubnetCidr("ca") + .withVnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1") + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withDataCollectionOptions(new DataCollectionOptions().withIsDiagnosticsEventsEnabled(true) + .withIsHealthMonitoringEnabled(true) + .withIsIncidentLogsEnabled(true)) + .withDisplayName( + "zvnuzwcpevcsnhaheojscyiytcgxvtsuownoyrjddolqzpaalbyrgqgactzrafocjglzjzosrqewmsvdovubrczmlrjoahwgckbbhvimqfhmnrpuszndasfutdyyrvszdawdxvyfpgtoaemjvqpavsfsedbdhbqmqqtxxjthmjbswjbaymibfpbpzuy") + .withDomain("akltvmctvumwfuqi") + .withEnabledEcpuCount(0) + .withExascaleDbStorageVaultId( + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/exascaleDbStorageVaults/storageVaultName") + .withGridImageOcid("ocid1.autonomousdatabase.oc1..aaaaa3klq") + .withHostname("uwrzwwhrr") + .withLicenseModel(LicenseModel.LICENSE_INCLUDED) + .withNodeCount(30) + .withNsgCidrs(Arrays.asList(new NsgCidr().withSource("10.0.0.0/16") + .withDestinationPortRange(new PortRange().withMin(1520).withMax(1522)))) + .withPrivateZoneOcid("ocid1.autonomousdatabase.oc1..aaaaa3klq") + .withScanListenerPortTcp(30) + .withScanListenerPortTcpSsl(14) + .withShape("pzfyfjznebdsakeira") + .withSshPublicKeys(Arrays.asList("wzzayf")) + .withSystemVersion("ssqzevdtjtcnxpdspcyqzgdtmonqjj") + .withTimeZone( + "lkqvpvoczhoytxmeukzepgqgpdvdnigwxfojzfanqhracxsvgchwahzcifrkxlknixdrsopatguwccnejgyehnwfrvfedlefgneiudaqxbqnjkjedmcjocfvjdabwlyridcjvhzmlomgotwvnqqsrdjufsmebedckwwurmdoddknnfsm") + .withTotalEcpuCount(10) + .withVmFileSystemStorage(new ExadbVmClusterStorageDetails().withTotalSizeInGbs(18))) + .withZones(Arrays.asList("ozwhowofqaq")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### ExadbVmClusters_Delete + +```java +/** + * Samples for ExadbVmClusters Delete. + */ +public final class ExadbVmClustersDeleteSamples { + /* + * x-ms-original-file: 2025-09-01/ExadbVmClusters_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_Delete_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exadbVmClustersDeleteMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters().delete("rgopenapi", "exadaVmClusterName1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/ExadbVmClusters_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_Delete_MinimumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exadbVmClustersDeleteMinimumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters().delete("rgopenapi", "exadaVmClusterName1", com.azure.core.util.Context.NONE); + } +} +``` + +### ExadbVmClusters_GetByResourceGroup + +```java +/** + * Samples for ExadbVmClusters GetByResourceGroup. + */ +public final class ExadbVmClustersGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01/ExadbVmClusters_Get_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_Get_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exadbVmClustersGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters() + .getByResourceGroupWithResponse("rgopenapi", "exadbVmClusterName1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/ExadbVmClusters_Get_MinimumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_Get_MaximumSet - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exadbVmClustersGetMaximumSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters() + .getByResourceGroupWithResponse("rgopenapi", "exadbVmClusterName1*", com.azure.core.util.Context.NONE); + } +} +``` + +### ExadbVmClusters_List + +```java +/** + * Samples for ExadbVmClusters List. + */ +public final class ExadbVmClustersListSamples { + /* + * x-ms-original-file: 2025-09-01/ExadbVmClusters_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_ListBySubscription_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exadbVmClustersListBySubscriptionMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/ExadbVmClusters_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_ListBySubscription_MaximumSet - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exadbVmClustersListBySubscriptionMaximumSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters().list(com.azure.core.util.Context.NONE); + } +} +``` + +### ExadbVmClusters_ListByResourceGroup + +```java +/** + * Samples for ExadbVmClusters ListByResourceGroup. + */ +public final class ExadbVmClustersListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01/ExadbVmClusters_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_ListByResourceGroup_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exadbVmClustersListByResourceGroupMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/ExadbVmClusters_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_ListByResourceGroup_MaximumSet - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exadbVmClustersListByResourceGroupMaximumSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } +} +``` + +### ExadbVmClusters_RemoveVms + +```java +import com.azure.resourcemanager.oracledatabase.models.DbNodeDetails; +import com.azure.resourcemanager.oracledatabase.models.RemoveVirtualMachineFromExadbVmClusterDetails; +import java.util.Arrays; + +/** + * Samples for ExadbVmClusters RemoveVms. + */ +public final class ExadbVmClustersRemoveVmsSamples { + /* + * x-ms-original-file: 2025-09-01/ExadbVmClusters_RemoveVms_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_RemoveVms_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exadbVmClustersRemoveVmsMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters() + .removeVms("rgopenapi", "exadbVmClusterName1", new RemoveVirtualMachineFromExadbVmClusterDetails() + .withDbNodes(Arrays.asList(new DbNodeDetails().withDbNodeId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Oracle.Database/exadbVmClusters/vmCluster/dbNodes/dbNodeName"))), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/ExadbVmClusters_RemoveVms_MinimumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_RemoveVms_MaximumSet - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exadbVmClustersRemoveVmsMaximumSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters() + .removeVms("rgopenapi", "vmCluster1", new RemoveVirtualMachineFromExadbVmClusterDetails() + .withDbNodes(Arrays.asList(new DbNodeDetails().withDbNodeId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Oracle.Database/exadbVmClusters/vmCluster/dbNodes/dbNodeName"))), + com.azure.core.util.Context.NONE); + } +} +``` + +### ExadbVmClusters_Update + +```java +import com.azure.resourcemanager.oracledatabase.models.ExadbVmCluster; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterUpdateProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ExadbVmClusters Update. + */ +public final class ExadbVmClustersUpdateSamples { + /* + * x-ms-original-file: 2025-09-01/ExadbVmClusters_Update_MinimumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_Update_MaximumSet - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exadbVmClustersUpdateMaximumSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + ExadbVmCluster resource = manager.exadbVmClusters() + .getByResourceGroupWithResponse("rgopenapi", "exadbvmclusterq", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } + + /* + * x-ms-original-file: 2025-09-01/ExadbVmClusters_Update_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_Update_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exadbVmClustersUpdateMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + ExadbVmCluster resource = manager.exadbVmClusters() + .getByResourceGroupWithResponse("rgopenapi", "exadbvmcluster1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key4195", "fakeTokenPlaceholder")) + .withZones(Arrays.asList("yd")) + .withProperties(new ExadbVmClusterUpdateProperties().withNodeCount(17)) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### ExascaleDbNodes_Action + +```java +import com.azure.resourcemanager.oracledatabase.models.DbNodeAction; +import com.azure.resourcemanager.oracledatabase.models.DbNodeActionEnum; + +/** + * Samples for ExascaleDbNodes Action. + */ +public final class ExascaleDbNodesActionSamples { + /* + * x-ms-original-file: 2025-09-01/ExascaleDbNodes_Action_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbNodes_Action_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exascaleDbNodesActionMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbNodes() + .action("rgopenapi", "exadbvmcluster1", "exascaledbnode1", + new DbNodeAction().withAction(DbNodeActionEnum.START), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/ExascaleDbNodes_Action_MinimumSet_Gen.json + */ + /** + * Sample code: ExascaleDbNodes_Action_MinimumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exascaleDbNodesActionMinimumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbNodes() + .action("rgopenapi", "exadbvmcluster1", "exascaledbnode1", + new DbNodeAction().withAction(DbNodeActionEnum.START), com.azure.core.util.Context.NONE); + } +} +``` + +### ExascaleDbNodes_Get + +```java +/** + * Samples for ExascaleDbNodes Get. + */ +public final class ExascaleDbNodesGetSamples { + /* + * x-ms-original-file: 2025-09-01/ExascaleDbNodes_Get_MinimumSet_Gen.json + */ + /** + * Sample code: ExascaleDbNodes_Get_MaximumSet - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbNodesGetMaximumSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbNodes() + .getWithResponse("rgopenapi", "vmcluster", "exascaledbnode1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/ExascaleDbNodes_Get_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbNodes_Get_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exascaleDbNodesGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbNodes() + .getWithResponse("rgopenapi", "exadbvmcluster1", "exascaledbnode1", com.azure.core.util.Context.NONE); + } +} +``` + +### ExascaleDbNodes_ListByParent + +```java +/** + * Samples for ExascaleDbNodes ListByParent. + */ +public final class ExascaleDbNodesListByParentSamples { + /* + * x-ms-original-file: 2025-09-01/ExascaleDbNodes_ListByParent_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbNodes_ListByParent_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exascaleDbNodesListByParentMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbNodes().listByParent("rgopenapi", "vmcluster", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/ExascaleDbNodes_ListByParent_MinimumSet_Gen.json + */ + /** + * Sample code: ExascaleDbNodes_ListByParent_MaximumSet - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbNodesListByParentMaximumSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbNodes().listByParent("rgopenapi", "vmcluster", com.azure.core.util.Context.NONE); + } +} +``` + +### ExascaleDbStorageVaults_Create + +```java +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageInputDetails; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaultProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ExascaleDbStorageVaults Create. + */ +public final class ExascaleDbStorageVaultsCreateSamples { + /* + * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_Create_MinimumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_Create_MaximumSet - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbStorageVaultsCreateMaximumSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults() + .define("storagevault1") + .withRegion("odxgtv") + .withExistingResourceGroup("rgopenapi") + .create(); + } + + /* + * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_Create_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_Create_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbStorageVaultsCreateMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults() + .define("storagevault1") + .withRegion("zuoudqbvlxerpjtlfooyqlb") + .withExistingResourceGroup("rgopenapi") + .withTags(mapOf("key4521", "fakeTokenPlaceholder")) + .withProperties(new ExascaleDbStorageVaultProperties().withAdditionalFlashCacheInPercent(0) + .withDescription( + "kgqvxvtegzwyppegpvqxnlslvetbjlgveofcpjddenhbpocyzwtswaeaetqkipcxyhedsymuljalirryldlbviuvidhssyiwodacajjnbpkbvbvzwzsjctsidchalyjkievnivikwnnypaojcvhmokddstxwiqxmbfmbvglfimseguwyvibwzllggjtwejdfgezoeuvjjbsyfozswihydzuscjrqnklewongumiljeordhqlsclwlmftzdoey") + .withDisplayName("storagevault1") + .withHighCapacityDatabaseStorageInput(new ExascaleDbStorageInputDetails().withTotalSizeInGbs(1)) + .withTimeZone("hyjcftlal")) + .withZones(Arrays.asList("npqjhyekyumfybqas")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### ExascaleDbStorageVaults_Delete + +```java +/** + * Samples for ExascaleDbStorageVaults Delete. + */ +public final class ExascaleDbStorageVaultsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_Delete_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbStorageVaultsDeleteMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults().delete("rgopenapi", "storagevault1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_Delete_MinimumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbStorageVaultsDeleteMinimumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults().delete("rgopenapi", "storagevault1", com.azure.core.util.Context.NONE); + } +} +``` + +### ExascaleDbStorageVaults_GetByResourceGroup + +```java +/** + * Samples for ExascaleDbStorageVaults GetByResourceGroup. + */ +public final class ExascaleDbStorageVaultsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_Get_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_Get_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exascaleDbStorageVaultsGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults() + .getByResourceGroupWithResponse("rgopenapi", "storagevault1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_Get_MinimumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_Get_MaximumSet - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbStorageVaultsGetMaximumSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults() + .getByResourceGroupWithResponse("rgopenapi", "storagevault1", com.azure.core.util.Context.NONE); + } +} +``` + +### ExascaleDbStorageVaults_List + +```java +/** + * Samples for ExascaleDbStorageVaults List. + */ +public final class ExascaleDbStorageVaultsListSamples { + /* + * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_ListBySubscription_MaximumSet - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbStorageVaultsListBySubscriptionMaximumSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_ListBySubscription_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbStorageVaultsListBySubscriptionMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults().list(com.azure.core.util.Context.NONE); + } +} +``` + +### ExascaleDbStorageVaults_ListByResourceGroup + +```java +/** + * Samples for ExascaleDbStorageVaults ListByResourceGroup. + */ +public final class ExascaleDbStorageVaultsListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_ListByResourceGroup_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbStorageVaultsListByResourceGroupMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_ListByResourceGroup_MaximumSet - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbStorageVaultsListByResourceGroupMaximumSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } +} +``` + +### ExascaleDbStorageVaults_Update + +```java +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVault; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ExascaleDbStorageVaults Update. + */ +public final class ExascaleDbStorageVaultsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_Update_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_Update_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbStorageVaultsUpdateMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + ExascaleDbStorageVault resource = manager.exascaleDbStorageVaults() + .getByResourceGroupWithResponse("rgopenapi", "storagevault1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key6486", "fakeTokenPlaceholder")).apply(); + } + + /* + * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_Update_MinimumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_Update_MaximumSet - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbStorageVaultsUpdateMaximumSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + ExascaleDbStorageVault resource = manager.exascaleDbStorageVaults() + .getByResourceGroupWithResponse("rgopenapi", "storagevault1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### FlexComponents_Get + +```java +/** + * Samples for FlexComponents Get. + */ +public final class FlexComponentsGetSamples { + /* + * x-ms-original-file: 2025-09-01/FlexComponents_Get_MaximumSet_Gen.json + */ + /** + * Sample code: FlexComponents_Get_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + flexComponentsGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.flexComponents().getWithResponse("eastus", "flexname1", com.azure.core.util.Context.NONE); + } +} +``` + +### FlexComponents_ListByParent + +```java +import com.azure.resourcemanager.oracledatabase.models.SystemShapes; + +/** + * Samples for FlexComponents ListByParent. + */ +public final class FlexComponentsListByParentSamples { + /* + * x-ms-original-file: 2025-09-01/FlexComponents_ListByParent_MaximumSet_Gen.json + */ + /** + * Sample code: FlexComponents_ListByParent_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + flexComponentsListByParentMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.flexComponents().listByParent("eastus", SystemShapes.EXADATA_X9M, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/FlexComponents_ListByParent_MinimumSet_Gen.json + */ + /** + * Sample code: FlexComponents_ListByParent_MaximumSet - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void flexComponentsListByParentMaximumSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.flexComponents().listByParent("eastus", null, com.azure.core.util.Context.NONE); + } +} +``` + +### GiMinorVersions_Get + +```java +/** + * Samples for GiMinorVersions Get. + */ +public final class GiMinorVersionsGetSamples { + /* + * x-ms-original-file: 2025-09-01/GiMinorVersions_Get_MaximumSet_Gen.json + */ + /** + * Sample code: GiMinorVersions_Get_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + giMinorVersionsGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giMinorVersions() + .getWithResponse("eastus", "19.0.0.0", "minorversion", com.azure.core.util.Context.NONE); + } +} +``` + +### GiMinorVersions_ListByParent + +```java +import com.azure.resourcemanager.oracledatabase.models.ShapeFamily; + +/** + * Samples for GiMinorVersions ListByParent. + */ +public final class GiMinorVersionsListByParentSamples { + /* + * x-ms-original-file: 2025-09-01/GiMinorVersions_ListByParent_MaximumSet_Gen.json + */ + /** + * Sample code: GiMinorVersions_ListByParent_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + giMinorVersionsListByParentMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giMinorVersions() + .listByParent("eastus", "name1", ShapeFamily.EXADATA, "zone1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/GiMinorVersions_ListByParent_MinimumSet_Gen.json + */ + /** + * Sample code: GiMinorVersions_ListByParent_MaximumSet - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void giMinorVersionsListByParentMaximumSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giMinorVersions() + .listByParent("eastus", "giMinorVersionName", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### GiVersions_Get + +```java +/** + * Samples for GiVersions Get. + */ +public final class GiVersionsGetSamples { + /* + * x-ms-original-file: 2025-09-01/GiVersions_Get_MinimumSet_Gen.json + */ + /** + * Sample code: Get a GiVersion by name - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getAGiVersionByNameGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giVersions() + .getWithResponse("eastus", "Replace this value with a string matching RegExp .*", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/giVersions_get.json + */ + /** + * Sample code: GiVersions_get. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void giVersionsGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giVersions().getWithResponse("eastus", "19.0.0.0", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/GiVersions_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Get a GiVersion by name - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getAGiVersionByNameGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giVersions().getWithResponse("eastus", "giversion1", com.azure.core.util.Context.NONE); + } +} +``` + +### GiVersions_ListByLocation + +```java +import com.azure.resourcemanager.oracledatabase.models.SystemShapes; + +/** + * Samples for GiVersions ListByLocation. + */ +public final class GiVersionsListByLocationSamples { + /* + * x-ms-original-file: 2025-09-01/GiVersions_ListByLocation_MinimumSet_Gen.json + */ + /** + * Sample code: GiVersions_ListByLocation_MinimumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + giVersionsListByLocationMinimumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giVersions().listByLocation("eastus", null, null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/GiVersions_ListByLocation_MaximumSet_Gen.json + */ + /** + * Sample code: GiVersions_ListByLocation_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + giVersionsListByLocationMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giVersions() + .listByLocation("eastus", SystemShapes.EXADATA_X9M, "hpzuyaemum", null, com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkAnchors_CreateOrUpdate + +```java +import com.azure.resourcemanager.oracledatabase.models.DnsForwardingRule; +import com.azure.resourcemanager.oracledatabase.models.NetworkAnchorProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NetworkAnchors CreateOrUpdate. + */ +public final class NetworkAnchorsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01/NetworkAnchors_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkAnchors_CreateOrUpdate_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + networkAnchorsCreateOrUpdateMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.networkAnchors() + .define("networkAnchor1") + .withRegion("igamtwfkkmjnkcceh") + .withExistingResourceGroup("rgopenapi") + .withTags(mapOf("key4863", "fakeTokenPlaceholder")) + .withProperties(new NetworkAnchorProperties().withResourceAnchorId("ivxnsdkelptazxrbzzrs") + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withOciVcnDnsLabel("taqimtjhlsshwakiaocbsrewvkq") + .withOciBackupCidrBlock("i") + .withIsOracleToAzureDnsZoneSyncEnabled(true) + .withIsOracleDnsListeningEndpointEnabled(true) + .withIsOracleDnsForwardingEndpointEnabled(true) + .withDnsForwardingRules(Arrays + .asList(new DnsForwardingRule().withDomainNames("domain1, domain2").withForwardingIpAddress("qe")))) + .withZones(Arrays.asList("qwrgwcmycokwbhdafhoheaxzoxx")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; + } +} +``` + +### NetworkAnchors_Delete +```java +/** + * Samples for NetworkAnchors Delete. + */ +public final class NetworkAnchorsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/CloudVmClusters_ListPrivateIpAddresses_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/NetworkAnchors_Delete_MaximumSet_Gen.json */ /** - * Sample code: List Private IP Addresses for VM Cluster - generated by [MaximumSet] rule. + * Sample code: NetworkAnchors_Delete_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listPrivateIPAddressesForVMClusterGeneratedByMaximumSetRule( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters() - .listPrivateIpAddressesWithResponse("rgopenapi", "cloudvmcluster1", - new PrivateIpAddressesFilter().withSubnetId("ocid1..aaaaaa").withVnicId("ocid1..aaaaa"), - com.azure.core.util.Context.NONE); + public static void + networkAnchorsDeleteMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.networkAnchors().delete("rgopenapi", "networkAnchor1", com.azure.core.util.Context.NONE); } } ``` -### CloudVmClusters_RemoveVms +### NetworkAnchors_GetByResourceGroup ```java -import com.azure.resourcemanager.oracledatabase.models.AddRemoveDbNode; -import java.util.Arrays; - /** - * Samples for CloudVmClusters RemoveVms. + * Samples for NetworkAnchors GetByResourceGroup. */ -public final class CloudVmClustersRemoveVmsSamples { +public final class NetworkAnchorsGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-01/CloudVmClusters_RemoveVms_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/NetworkAnchors_Get_MaximumSet_Gen.json */ /** - * Sample code: Remove VMs from VM Cluster - generated by [MaximumSet] rule. + * Sample code: NetworkAnchors_Get_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void removeVMsFromVMClusterGeneratedByMaximumSetRule( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters() - .removeVms("rgopenapi", "cloudvmcluster1", - new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa", "ocid1..aaaaaa")), - com.azure.core.util.Context.NONE); + public static void + networkAnchorsGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.networkAnchors() + .getByResourceGroupWithResponse("rgopenapi", "networkanchor1", com.azure.core.util.Context.NONE); } +} +``` + +### NetworkAnchors_List +```java +/** + * Samples for NetworkAnchors List. + */ +public final class NetworkAnchorsListSamples { /* - * x-ms-original-file: 2025-09-01/CloudVmClusters_RemoveVms_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/NetworkAnchors_ListBySubscription_MinimumSet_Gen.json */ /** - * Sample code: Remove VMs from VM Cluster - generated by [MinimumSet] rule. + * Sample code: NetworkAnchors_ListBySubscription_MaximumSet - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void removeVMsFromVMClusterGeneratedByMinimumSetRule( + public static void networkAnchorsListBySubscriptionMaximumSetGeneratedByMinimumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters() - .removeVms("rgopenapi", "cloudvmcluster1", - new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa", "ocid1..aaaaaa")), - com.azure.core.util.Context.NONE); + manager.networkAnchors().list(com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/vmClusters_removeVms.json + * x-ms-original-file: 2025-09-01/NetworkAnchors_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: CloudVmClusters_removeVms. + * Sample code: NetworkAnchors_ListBySubscription_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - cloudVmClustersRemoveVms(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters() - .removeVms("rg000", "cluster1", new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa")), - com.azure.core.util.Context.NONE); + public static void networkAnchorsListBySubscriptionMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.networkAnchors().list(com.azure.core.util.Context.NONE); } } ``` -### DbNodes_Action +### NetworkAnchors_ListByResourceGroup ```java -import com.azure.resourcemanager.oracledatabase.models.DbNodeAction; -import com.azure.resourcemanager.oracledatabase.models.DbNodeActionEnum; - /** - * Samples for DbNodes Action. + * Samples for NetworkAnchors ListByResourceGroup. */ -public final class DbNodesActionSamples { +public final class NetworkAnchorsListByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-01/DbNodes_Action_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/NetworkAnchors_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: VM actions on DbNodes of VM Cluster - generated by [MinimumSet] rule. + * Sample code: NetworkAnchors_ListByResourceGroup_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void vmActionsOnDbNodesOfVMClusterGeneratedByMinimumSetRule( + public static void networkAnchorsListByResourceGroupMaximumSet( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbNodes() - .action("rgopenapi", "cloudvmcluster1", "adfedefeewwevkieviect", - new DbNodeAction().withAction(DbNodeActionEnum.START), com.azure.core.util.Context.NONE); + manager.networkAnchors().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/dbNodes_action.json + * x-ms-original-file: 2025-09-01/NetworkAnchors_ListByResourceGroup_MinimumSet_Gen.json */ /** - * Sample code: DbNodes_Action. + * Sample code: NetworkAnchors_ListByResourceGroup_MaximumSet - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void dbNodesAction(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbNodes() - .action("rg000", "cluster1", "ocid1....aaaaaa", new DbNodeAction().withAction(DbNodeActionEnum.START), - com.azure.core.util.Context.NONE); + public static void networkAnchorsListByResourceGroupMaximumSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.networkAnchors().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); } +} +``` + +### NetworkAnchors_Update +```java +import com.azure.resourcemanager.oracledatabase.models.NetworkAnchor; +import com.azure.resourcemanager.oracledatabase.models.NetworkAnchorUpdateProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NetworkAnchors Update. + */ +public final class NetworkAnchorsUpdateSamples { /* - * x-ms-original-file: 2025-09-01/DbNodes_Action_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/NetworkAnchors_Update_MaximumSet_Gen.json */ /** - * Sample code: VM actions on DbNodes of VM Cluster - generated by [MaximumSet] rule. + * Sample code: NetworkAnchors_Update_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void vmActionsOnDbNodesOfVMClusterGeneratedByMaximumSetRule( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbNodes() - .action("rgopenapi", "cloudvmcluster1", "abciderewdidsereq", - new DbNodeAction().withAction(DbNodeActionEnum.START), com.azure.core.util.Context.NONE); + public static void + networkAnchorsUpdateMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + NetworkAnchor resource = manager.networkAnchors() + .getByResourceGroupWithResponse("rgopenapi", "networkanchor1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key8038", "fakeTokenPlaceholder")) + .withZones(Arrays.asList("zone1")) + .withProperties(new NetworkAnchorUpdateProperties().withOciBackupCidrBlock("waoztwkdpplgjtkiwkfnnohu") + .withIsOracleToAzureDnsZoneSyncEnabled(true) + .withIsOracleDnsListeningEndpointEnabled(true) + .withIsOracleDnsForwardingEndpointEnabled(true)) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; } } ``` -### DbNodes_ListByCloudVmCluster +### Operations_List ```java /** - * Samples for DbNodes ListByCloudVmCluster. + * Samples for Operations List. */ -public final class DbNodesListByCloudVmClusterSamples { +public final class OperationsListSamples { /* - * x-ms-original-file: 2025-09-01/dbNodes_listByParent.json + * x-ms-original-file: 2025-09-01/Operations_List_MaximumSet_Gen.json */ /** - * Sample code: DbNodes_listByCloudVmCluster. + * Sample code: List Operations - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - dbNodesListByCloudVmCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbNodes().listByCloudVmCluster("rg000", "cluster1", com.azure.core.util.Context.NONE); + public static void listOperationsGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); } -} -``` -### DbServers_ListByCloudExadataInfrastructure + /* + * x-ms-original-file: 2025-09-01/operations_list.json + */ + /** + * Sample code: Operations_list. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void operationsList(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } -```java -/** - * Samples for DbServers ListByCloudExadataInfrastructure. - */ -public final class DbServersListByCloudExadataInfrastructureSamples { /* - * x-ms-original-file: 2025-09-01/dbServers_listByParent.json + * x-ms-original-file: 2025-09-01/Operations_List_MinimumSet_Gen.json */ /** - * Sample code: DbServers_listByCloudExadataInfrastructure. + * Sample code: List Operations - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void dbServersListByCloudExadataInfrastructure( + public static void listOperationsGeneratedByMinimumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbServers().listByCloudExadataInfrastructure("rg000", "infra1", com.azure.core.util.Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` -### DbSystemShapes_ListByLocation +### OracleSubscriptions_AddAzureSubscriptions ```java +import com.azure.resourcemanager.oracledatabase.models.AzureSubscriptions; +import java.util.Arrays; + /** - * Samples for DbSystemShapes ListByLocation. + * Samples for OracleSubscriptions AddAzureSubscriptions. */ -public final class DbSystemShapesListByLocationSamples { +public final class OracleSubscriptionsAddAzureSubscriptionsSamples { /* - * x-ms-original-file: 2025-09-01/DbSystemShapes_ListByLocation_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/oracleSubscriptions_addAzureSubscriptions.json */ /** - * Sample code: List DbSystemShapes by location - generated by [MinimumSet] rule. + * Sample code: OracleSubscriptions_addAzureSubscriptions. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listDbSystemShapesByLocationGeneratedByMinimumSetRule( + public static void oracleSubscriptionsAddAzureSubscriptions( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbSystemShapes().listByLocation("eastus", null, null, com.azure.core.util.Context.NONE); + manager.oracleSubscriptions() + .addAzureSubscriptions(new AzureSubscriptions().withAzureSubscriptionIds( + Arrays.asList("00000000-0000-0000-0000-000000000001")), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/DbSystemShapes_ListByLocation_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/OracleSubscriptions_AddAzureSubscriptions_MaximumSet_Gen.json */ /** - * Sample code: List DbSystemShapes by location - generated by [MaximumSet] rule. + * Sample code: Add Azure Subscriptions to the OracleSubscription - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listDbSystemShapesByLocationGeneratedByMaximumSetRule( + public static void addAzureSubscriptionsToTheOracleSubscriptionGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbSystemShapes().listByLocation("eastus", "ymedsvqavemtixp", null, com.azure.core.util.Context.NONE); + manager.oracleSubscriptions() + .addAzureSubscriptions(new AzureSubscriptions().withAzureSubscriptionIds( + Arrays.asList("00000000-0000-0000-0000-000000000001")), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/dbSystemShapes_listByLocation.json + * x-ms-original-file: 2025-09-01/OracleSubscriptions_AddAzureSubscriptions_MinimumSet_Gen.json */ /** - * Sample code: DbSystemShapes_listByLocation. + * Sample code: Add Azure Subscriptions to the OracleSubscription - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - dbSystemShapesListByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbSystemShapes().listByLocation("eastus", null, null, com.azure.core.util.Context.NONE); + public static void addAzureSubscriptionsToTheOracleSubscriptionGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions() + .addAzureSubscriptions(new AzureSubscriptions().withAzureSubscriptionIds( + Arrays.asList("00000000-0000-0000-0000-000000000001")), com.azure.core.util.Context.NONE); } } ``` -### DbVersions_ListByLocation +### OracleSubscriptions_CreateOrUpdate ```java -import com.azure.resourcemanager.oracledatabase.models.BaseDbSystemShapes; -import com.azure.resourcemanager.oracledatabase.models.ShapeFamilyType; -import com.azure.resourcemanager.oracledatabase.models.StorageManagementType; +import com.azure.resourcemanager.oracledatabase.fluent.models.OracleSubscriptionInner; +import com.azure.resourcemanager.oracledatabase.models.Intent; +import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionProperties; +import com.azure.resourcemanager.oracledatabase.models.Plan; /** - * Samples for DbVersions ListByLocation. + * Samples for OracleSubscriptions CreateOrUpdate. */ -public final class DbVersionsListByLocationSamples { +public final class OracleSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/DbVersions_ListByLocation_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/OracleSubscriptions_CreateOrUpdate_MinimumSet_Gen.json */ /** - * Sample code: DbVersions_ListByLocation_MaximumSet. + * Sample code: Create or Update Oracle Subscription - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - dbVersionsListByLocationMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbVersions() - .listByLocation("eastus", BaseDbSystemShapes.VMSTANDARD_X86, - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Oracle.Database/dbSystems/dbsystem1", - StorageManagementType.LVM, true, true, ShapeFamilyType.VIRTUAL_MACHINE, - com.azure.core.util.Context.NONE); + public static void createOrUpdateOracleSubscriptionGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions().createOrUpdate(new OracleSubscriptionInner(), com.azure.core.util.Context.NONE); } -} -``` - -### ExadbVmClusters_RemoveVms - -```java -import com.azure.resourcemanager.oracledatabase.models.DbNodeDetails; -import com.azure.resourcemanager.oracledatabase.models.RemoveVirtualMachineFromExadbVmClusterDetails; -import java.util.Arrays; -/** - * Samples for ExadbVmClusters RemoveVms. - */ -public final class ExadbVmClustersRemoveVmsSamples { /* - * x-ms-original-file: 2025-09-01/ExadbVmClusters_RemoveVms_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/oracleSubscriptions_create.json */ /** - * Sample code: ExadbVmClusters_RemoveVms_MaximumSet. + * Sample code: OracleSubscriptions_createOrUpdate. * * @param manager Entry point to OracleDatabaseManager. */ public static void - exadbVmClustersRemoveVmsMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.exadbVmClusters() - .removeVms("rgopenapi", "exadbVmClusterName1", new RemoveVirtualMachineFromExadbVmClusterDetails() - .withDbNodes(Arrays.asList(new DbNodeDetails().withDbNodeId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Oracle.Database/exadbVmClusters/vmCluster/dbNodes/dbNodeName"))), + oracleSubscriptionsCreateOrUpdate(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions() + .createOrUpdate(new OracleSubscriptionInner().withProperties(new OracleSubscriptionProperties()) + .withPlan(new Plan().withName("plan1") + .withPublisher("publisher1") + .withProduct("product1") + .withPromotionCode("fakeTokenPlaceholder") + .withVersion("alpha")), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/ExadbVmClusters_RemoveVms_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/OracleSubscriptions_CreateOrUpdate_MaximumSet_Gen.json */ /** - * Sample code: ExadbVmClusters_RemoveVms_MaximumSet - generated by [MinimumSet] rule. + * Sample code: Create or Update Oracle Subscription - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void exadbVmClustersRemoveVmsMaximumSetGeneratedByMinimumSetRule( + public static void createOrUpdateOracleSubscriptionGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.exadbVmClusters() - .removeVms("rgopenapi", "vmCluster1", new RemoveVirtualMachineFromExadbVmClusterDetails() - .withDbNodes(Arrays.asList(new DbNodeDetails().withDbNodeId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Oracle.Database/exadbVmClusters/vmCluster/dbNodes/dbNodeName"))), + manager.oracleSubscriptions() + .createOrUpdate(new OracleSubscriptionInner() + .withProperties(new OracleSubscriptionProperties().withTermUnit("akzq") + .withProductCode("fakeTokenPlaceholder") + .withIntent(Intent.RETAIN)) + .withPlan(new Plan().withName("plan1") + .withPublisher("publisher1") + .withProduct("product1") + .withPromotionCode("fakeTokenPlaceholder") + .withVersion("alpha")), com.azure.core.util.Context.NONE); } } ``` -### ExascaleDbNodes_Action +### OracleSubscriptions_Delete ```java -import com.azure.resourcemanager.oracledatabase.models.DbNodeAction; -import com.azure.resourcemanager.oracledatabase.models.DbNodeActionEnum; - /** - * Samples for ExascaleDbNodes Action. + * Samples for OracleSubscriptions Delete. */ -public final class ExascaleDbNodesActionSamples { +public final class OracleSubscriptionsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/ExascaleDbNodes_Action_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/OracleSubscriptions_Delete_MaximumSet_Gen.json */ /** - * Sample code: ExascaleDbNodes_Action_MaximumSet. + * Sample code: Delete Oracle Subscription - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - exascaleDbNodesActionMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.exascaleDbNodes() - .action("rgopenapi", "exadbvmcluster1", "exascaledbnode1", - new DbNodeAction().withAction(DbNodeActionEnum.START), com.azure.core.util.Context.NONE); + public static void deleteOracleSubscriptionGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions().delete(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/OracleSubscriptions_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: Delete Oracle Subscription - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void deleteOracleSubscriptionGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions().delete(com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/ExascaleDbNodes_Action_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/oracleSubscriptions_delete.json */ /** - * Sample code: ExascaleDbNodes_Action_MinimumSet. + * Sample code: OracleSubscriptions_delete. * * @param manager Entry point to OracleDatabaseManager. */ public static void - exascaleDbNodesActionMinimumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.exascaleDbNodes() - .action("rgopenapi", "exadbvmcluster1", "exascaledbnode1", - new DbNodeAction().withAction(DbNodeActionEnum.START), com.azure.core.util.Context.NONE); + oracleSubscriptionsDelete(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions().delete(com.azure.core.util.Context.NONE); } } ``` -### ExascaleDbNodes_ListByParent +### OracleSubscriptions_Get ```java /** - * Samples for ExascaleDbNodes ListByParent. + * Samples for OracleSubscriptions Get. */ -public final class ExascaleDbNodesListByParentSamples { +public final class OracleSubscriptionsGetSamples { /* - * x-ms-original-file: 2025-09-01/ExascaleDbNodes_ListByParent_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/OracleSubscriptions_Get_MinimumSet_Gen.json */ /** - * Sample code: ExascaleDbNodes_ListByParent_MaximumSet. + * Sample code: Get Oracle Subscription - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - exascaleDbNodesListByParentMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.exascaleDbNodes().listByParent("rgopenapi", "vmcluster", com.azure.core.util.Context.NONE); + public static void getOracleSubscriptionGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions().getWithResponse(com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/ExascaleDbNodes_ListByParent_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/OracleSubscriptions_Get_MaximumSet_Gen.json */ /** - * Sample code: ExascaleDbNodes_ListByParent_MaximumSet - generated by [MinimumSet] rule. + * Sample code: Get Oracle Subscription - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void exascaleDbNodesListByParentMaximumSetGeneratedByMinimumSetRule( + public static void getOracleSubscriptionGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.exascaleDbNodes().listByParent("rgopenapi", "vmcluster", com.azure.core.util.Context.NONE); + manager.oracleSubscriptions().getWithResponse(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/oracleSubscriptions_get.json + */ + /** + * Sample code: OracleSubscriptions_get. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void oracleSubscriptionsGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions().getWithResponse(com.azure.core.util.Context.NONE); } } ``` -### ExascaleDbStorageVaults_Create +### OracleSubscriptions_List ```java -import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageInputDetails; -import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaultProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for ExascaleDbStorageVaults Create. + * Samples for OracleSubscriptions List. */ -public final class ExascaleDbStorageVaultsCreateSamples { +public final class OracleSubscriptionsListSamples { /* - * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_Create_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/OracleSubscriptions_ListBySubscription_MinimumSet_Gen.json */ /** - * Sample code: ExascaleDbStorageVaults_Create_MaximumSet - generated by [MinimumSet] rule. + * Sample code: List Oracle Subscriptions by subscription - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void exascaleDbStorageVaultsCreateMaximumSetGeneratedByMinimumSetRule( + public static void listOracleSubscriptionsBySubscriptionGeneratedByMinimumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.exascaleDbStorageVaults() - .define("storagevault1") - .withRegion("odxgtv") - .withExistingResourceGroup("rgopenapi") - .create(); + manager.oracleSubscriptions().list(com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_Create_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/OracleSubscriptions_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: ExascaleDbStorageVaults_Create_MaximumSet. + * Sample code: List Oracle Subscriptions by subscription - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void exascaleDbStorageVaultsCreateMaximumSet( + public static void listOracleSubscriptionsBySubscriptionGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.exascaleDbStorageVaults() - .define("storagevault1") - .withRegion("zuoudqbvlxerpjtlfooyqlb") - .withExistingResourceGroup("rgopenapi") - .withTags(mapOf("key4521", "fakeTokenPlaceholder")) - .withProperties(new ExascaleDbStorageVaultProperties().withAdditionalFlashCacheInPercent(0) - .withDescription( - "kgqvxvtegzwyppegpvqxnlslvetbjlgveofcpjddenhbpocyzwtswaeaetqkipcxyhedsymuljalirryldlbviuvidhssyiwodacajjnbpkbvbvzwzsjctsidchalyjkievnivikwnnypaojcvhmokddstxwiqxmbfmbvglfimseguwyvibwzllggjtwejdfgezoeuvjjbsyfozswihydzuscjrqnklewongumiljeordhqlsclwlmftzdoey") - .withDisplayName("storagevault1") - .withHighCapacityDatabaseStorageInput(new ExascaleDbStorageInputDetails().withTotalSizeInGbs(1)) - .withTimeZone("hyjcftlal")) - .withZones(Arrays.asList("npqjhyekyumfybqas")) - .create(); + manager.oracleSubscriptions().list(com.azure.core.util.Context.NONE); } - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static <T> Map<String, T> mapOf(Object... inputs) { - Map<String, T> 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; + /* + * x-ms-original-file: 2025-09-01/oracleSubscriptions_listBySubscription.json + */ + /** + * Sample code: OracleSubscriptions_listBySubscription. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + oracleSubscriptionsListBySubscription(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions().list(com.azure.core.util.Context.NONE); } } ``` -### ExascaleDbStorageVaults_Delete +### OracleSubscriptions_ListActivationLinks ```java /** - * Samples for ExascaleDbStorageVaults Delete. + * Samples for OracleSubscriptions ListActivationLinks. */ -public final class ExascaleDbStorageVaultsDeleteSamples { +public final class OracleSubscriptionsListActivationLinksSamples { /* - * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/OracleSubscriptions_ListActivationLinks_MaximumSet_Gen.json */ /** - * Sample code: ExascaleDbStorageVaults_Delete_MaximumSet. + * Sample code: List Activation Links for the Oracle Subscription - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void exascaleDbStorageVaultsDeleteMaximumSet( + public static void listActivationLinksForTheOracleSubscriptionGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.exascaleDbStorageVaults().delete("rgopenapi", "storagevault1", com.azure.core.util.Context.NONE); + manager.oracleSubscriptions().listActivationLinks(com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_Delete_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/OracleSubscriptions_ListActivationLinks_MinimumSet_Gen.json */ /** - * Sample code: ExascaleDbStorageVaults_Delete_MinimumSet. + * Sample code: List Activation Links for the Oracle Subscription - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void exascaleDbStorageVaultsDeleteMinimumSet( + public static void listActivationLinksForTheOracleSubscriptionGeneratedByMinimumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.exascaleDbStorageVaults().delete("rgopenapi", "storagevault1", com.azure.core.util.Context.NONE); + manager.oracleSubscriptions().listActivationLinks(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/oracleSubscriptions_listActivationLinks.json + */ + /** + * Sample code: OracleSubscriptions_listActivationLinks. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + oracleSubscriptionsListActivationLinks(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions().listActivationLinks(com.azure.core.util.Context.NONE); } } ``` -### ExascaleDbStorageVaults_GetByResourceGroup +### OracleSubscriptions_ListCloudAccountDetails ```java /** - * Samples for ExascaleDbStorageVaults GetByResourceGroup. + * Samples for OracleSubscriptions ListCloudAccountDetails. */ -public final class ExascaleDbStorageVaultsGetByResourceGroupSamples { +public final class OracleSubscriptionsListCloudAccountDetailsSamples { /* - * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/oracleSubscriptions_listCloudAccountDetails.json */ /** - * Sample code: ExascaleDbStorageVaults_Get_MaximumSet. + * Sample code: OracleSubscriptions_listCloudAccountDetails. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - exascaleDbStorageVaultsGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.exascaleDbStorageVaults() - .getByResourceGroupWithResponse("rgopenapi", "storagevault1", com.azure.core.util.Context.NONE); + public static void oracleSubscriptionsListCloudAccountDetails( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions().listCloudAccountDetails(com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_Get_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/OracleSubscriptions_ListCloudAccountDetails_MaximumSet_Gen.json */ /** - * Sample code: ExascaleDbStorageVaults_Get_MaximumSet - generated by [MinimumSet] rule. + * Sample code: List Cloud Account details for the Oracle Subscription - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void exascaleDbStorageVaultsGetMaximumSetGeneratedByMinimumSetRule( + public static void listCloudAccountDetailsForTheOracleSubscriptionGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.exascaleDbStorageVaults() - .getByResourceGroupWithResponse("rgopenapi", "storagevault1", com.azure.core.util.Context.NONE); + manager.oracleSubscriptions().listCloudAccountDetails(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/OracleSubscriptions_ListCloudAccountDetails_MinimumSet_Gen.json + */ + /** + * Sample code: List Cloud Account details for the Oracle Subscription - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listCloudAccountDetailsForTheOracleSubscriptionGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions().listCloudAccountDetails(com.azure.core.util.Context.NONE); } } ``` -### ExascaleDbStorageVaults_List +### OracleSubscriptions_ListSaasSubscriptionDetails ```java /** - * Samples for ExascaleDbStorageVaults List. + * Samples for OracleSubscriptions ListSaasSubscriptionDetails. */ -public final class ExascaleDbStorageVaultsListSamples { +public final class OracleSubscriptionsListSaasSubscriptionDetailsSamples { /* - * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_ListBySubscription_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/oracleSubscriptions_listSaasSubscriptionDetails.json */ /** - * Sample code: ExascaleDbStorageVaults_ListBySubscription_MaximumSet - generated by [MinimumSet] rule. + * Sample code: OracleSubscriptions_listSaasSubscriptionDetails. * * @param manager Entry point to OracleDatabaseManager. */ - public static void exascaleDbStorageVaultsListBySubscriptionMaximumSetGeneratedByMinimumSetRule( + public static void oracleSubscriptionsListSaasSubscriptionDetails( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.exascaleDbStorageVaults().list(com.azure.core.util.Context.NONE); + manager.oracleSubscriptions().listSaasSubscriptionDetails(com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/OracleSubscriptions_ListSaasSubscriptionDetails_MaximumSet_Gen.json */ /** - * Sample code: ExascaleDbStorageVaults_ListBySubscription_MaximumSet. + * Sample code: List Saas Subscription details for the Oracle Subscription - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void exascaleDbStorageVaultsListBySubscriptionMaximumSet( + public static void listSaasSubscriptionDetailsForTheOracleSubscriptionGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.exascaleDbStorageVaults().list(com.azure.core.util.Context.NONE); + manager.oracleSubscriptions().listSaasSubscriptionDetails(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/OracleSubscriptions_ListSaasSubscriptionDetails_MinimumSet_Gen.json + */ + /** + * Sample code: List Saas Subscription details for the Oracle Subscription - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listSaasSubscriptionDetailsForTheOracleSubscriptionGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions().listSaasSubscriptionDetails(com.azure.core.util.Context.NONE); } } ``` -### ExascaleDbStorageVaults_ListByResourceGroup +### OracleSubscriptions_Update ```java +import com.azure.resourcemanager.oracledatabase.models.Intent; +import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionUpdate; +import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionUpdateProperties; +import com.azure.resourcemanager.oracledatabase.models.PlanUpdate; + /** - * Samples for ExascaleDbStorageVaults ListByResourceGroup. + * Samples for OracleSubscriptions Update. */ -public final class ExascaleDbStorageVaultsListByResourceGroupSamples { +public final class OracleSubscriptionsUpdateSamples { /* - * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/oracleSubscriptions_patch.json */ /** - * Sample code: ExascaleDbStorageVaults_ListByResourceGroup_MaximumSet. + * Sample code: OracleSubscriptions_update. * * @param manager Entry point to OracleDatabaseManager. */ - public static void exascaleDbStorageVaultsListByResourceGroupMaximumSet( + public static void + oracleSubscriptionsUpdate(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions().update(new OracleSubscriptionUpdate(), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01/OracleSubscriptions_Update_MinimumSet_Gen.json + */ + /** + * Sample code: Patch Oracle Subscription - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void patchOracleSubscriptionGeneratedByMinimumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.exascaleDbStorageVaults().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + manager.oracleSubscriptions().update(new OracleSubscriptionUpdate(), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_ListByResourceGroup_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/OracleSubscriptions_Update_MaximumSet_Gen.json */ /** - * Sample code: ExascaleDbStorageVaults_ListByResourceGroup_MaximumSet - generated by [MinimumSet] rule. + * Sample code: Patch Oracle Subscription - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void exascaleDbStorageVaultsListByResourceGroupMaximumSetGeneratedByMinimumSetRule( + public static void patchOracleSubscriptionGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.exascaleDbStorageVaults().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + manager.oracleSubscriptions() + .update(new OracleSubscriptionUpdate() + .withPlan(new PlanUpdate().withName("klnnbggrxhvvaiajvjx") + .withPublisher("xvsarzadrjqergudsohjk") + .withProduct("hivkczjyrimjilbmqj") + .withPromotionCode("fakeTokenPlaceholder") + .withVersion("ueudckjmuqpjvsmmenzyflgpa")) + .withProperties(new OracleSubscriptionUpdateProperties().withProductCode("fakeTokenPlaceholder") + .withIntent(Intent.RETAIN)), + com.azure.core.util.Context.NONE); } } ``` -### ExascaleDbStorageVaults_Update +### ResourceAnchors_CreateOrUpdate ```java -import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVault; +import com.azure.resourcemanager.oracledatabase.models.ResourceAnchorProperties; import java.util.HashMap; import java.util.Map; /** - * Samples for ExascaleDbStorageVaults Update. + * Samples for ResourceAnchors CreateOrUpdate. */ -public final class ExascaleDbStorageVaultsUpdateSamples { - /* - * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_Update_MaximumSet_Gen.json - */ - /** - * Sample code: ExascaleDbStorageVaults_Update_MaximumSet. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void exascaleDbStorageVaultsUpdateMaximumSet( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - ExascaleDbStorageVault resource = manager.exascaleDbStorageVaults() - .getByResourceGroupWithResponse("rgopenapi", "storagevault1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("key6486", "fakeTokenPlaceholder")).apply(); - } - +public final class ResourceAnchorsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/ExascaleDbStorageVaults_Update_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/ResourceAnchors_CreateOrUpdate_MaximumSet_Gen.json */ /** - * Sample code: ExascaleDbStorageVaults_Update_MaximumSet - generated by [MinimumSet] rule. + * Sample code: ResourceAnchors_CreateOrUpdate_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void exascaleDbStorageVaultsUpdateMaximumSetGeneratedByMinimumSetRule( + public static void resourceAnchorsCreateOrUpdateMaximumSet( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - ExascaleDbStorageVault resource = manager.exascaleDbStorageVaults() - .getByResourceGroupWithResponse("rgopenapi", "storagevault1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); + manager.resourceAnchors() + .define("resourceanchor1") + .withRegion("at") + .withExistingResourceGroup("rgopenapi") + .withTags(mapOf("key236", "fakeTokenPlaceholder")) + .withProperties(new ResourceAnchorProperties()) + .create(); } // Use "Map.of" if available @@ -1437,471 +5049,426 @@ public final class ExascaleDbStorageVaultsUpdateSamples { } ``` -### FlexComponents_Get - -```java -/** - * Samples for FlexComponents Get. - */ -public final class FlexComponentsGetSamples { - /* - * x-ms-original-file: 2025-09-01/FlexComponents_Get_MaximumSet_Gen.json - */ - /** - * Sample code: FlexComponents_Get_MaximumSet. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - flexComponentsGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.flexComponents().getWithResponse("eastus", "flexname1", com.azure.core.util.Context.NONE); - } -} -``` - -### FlexComponents_ListByParent +### ResourceAnchors_Delete ```java -import com.azure.resourcemanager.oracledatabase.models.SystemShapes; - /** - * Samples for FlexComponents ListByParent. + * Samples for ResourceAnchors Delete. */ -public final class FlexComponentsListByParentSamples { +public final class ResourceAnchorsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/FlexComponents_ListByParent_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/ResourceAnchors_Delete_MaximumSet_Gen.json */ /** - * Sample code: FlexComponents_ListByParent_MaximumSet. + * Sample code: ResourceAnchors_Delete_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ public static void - flexComponentsListByParentMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.flexComponents().listByParent("eastus", SystemShapes.EXADATA_X9M, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-09-01/FlexComponents_ListByParent_MinimumSet_Gen.json - */ - /** - * Sample code: FlexComponents_ListByParent_MaximumSet - generated by [MinimumSet] rule. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void flexComponentsListByParentMaximumSetGeneratedByMinimumSetRule( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.flexComponents().listByParent("eastus", null, com.azure.core.util.Context.NONE); + resourceAnchorsDeleteMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.resourceAnchors().delete("rgopenapi", "resourceanchor1", com.azure.core.util.Context.NONE); } } ``` -### GiMinorVersions_Get +### ResourceAnchors_GetByResourceGroup ```java /** - * Samples for GiMinorVersions Get. + * Samples for ResourceAnchors GetByResourceGroup. */ -public final class GiMinorVersionsGetSamples { +public final class ResourceAnchorsGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-01/GiMinorVersions_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/ResourceAnchors_Get_MaximumSet_Gen.json */ /** - * Sample code: GiMinorVersions_Get_MaximumSet. + * Sample code: ResourceAnchors_Get_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ public static void - giMinorVersionsGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.giMinorVersions() - .getWithResponse("eastus", "19.0.0.0", "minorversion", com.azure.core.util.Context.NONE); + resourceAnchorsGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.resourceAnchors() + .getByResourceGroupWithResponse("rgopenapi", "resourceanchor1", com.azure.core.util.Context.NONE); } } ``` -### GiMinorVersions_ListByParent +### ResourceAnchors_List ```java -import com.azure.resourcemanager.oracledatabase.models.ShapeFamily; - /** - * Samples for GiMinorVersions ListByParent. + * Samples for ResourceAnchors List. */ -public final class GiMinorVersionsListByParentSamples { +public final class ResourceAnchorsListSamples { /* - * x-ms-original-file: 2025-09-01/GiMinorVersions_ListByParent_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/ResourceAnchors_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: GiMinorVersions_ListByParent_MaximumSet. + * Sample code: ResourceAnchors_ListBySubscription_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - giMinorVersionsListByParentMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.giMinorVersions() - .listByParent("eastus", "name1", ShapeFamily.EXADATA, "zone1", com.azure.core.util.Context.NONE); + public static void resourceAnchorsListBySubscriptionMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.resourceAnchors().list(com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/GiMinorVersions_ListByParent_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/ResourceAnchors_ListBySubscription_MinimumSet_Gen.json */ /** - * Sample code: GiMinorVersions_ListByParent_MaximumSet - generated by [MinimumSet] rule. + * Sample code: ResourceAnchors_ListBySubscription_MaximumSet - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void giMinorVersionsListByParentMaximumSetGeneratedByMinimumSetRule( + public static void resourceAnchorsListBySubscriptionMaximumSetGeneratedByMinimumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.giMinorVersions() - .listByParent("eastus", "giMinorVersionName", null, null, com.azure.core.util.Context.NONE); + manager.resourceAnchors().list(com.azure.core.util.Context.NONE); } } ``` -### GiVersions_ListByLocation +### ResourceAnchors_ListByResourceGroup ```java -import com.azure.resourcemanager.oracledatabase.models.SystemShapes; - /** - * Samples for GiVersions ListByLocation. + * Samples for ResourceAnchors ListByResourceGroup. */ -public final class GiVersionsListByLocationSamples { +public final class ResourceAnchorsListByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-01/GiVersions_ListByLocation_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/ResourceAnchors_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: GiVersions_ListByLocation_MinimumSet. + * Sample code: ResourceAnchors_ListByResourceGroup_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - giVersionsListByLocationMinimumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.giVersions().listByLocation("eastus", null, null, null, com.azure.core.util.Context.NONE); + public static void resourceAnchorsListByResourceGroupMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.resourceAnchors().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/GiVersions_ListByLocation_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/ResourceAnchors_ListByResourceGroup_MinimumSet_Gen.json */ /** - * Sample code: GiVersions_ListByLocation_MaximumSet. + * Sample code: ResourceAnchors_ListByResourceGroup_MaximumSet - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - giVersionsListByLocationMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.giVersions() - .listByLocation("eastus", SystemShapes.EXADATA_X9M, "hpzuyaemum", null, com.azure.core.util.Context.NONE); + public static void resourceAnchorsListByResourceGroupMaximumSetGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.resourceAnchors().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); } } ``` -### Operations_List +### ResourceAnchors_Update ```java +import com.azure.resourcemanager.oracledatabase.models.ResourceAnchor; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for Operations List. + * Samples for ResourceAnchors Update. */ -public final class OperationsListSamples { - /* - * x-ms-original-file: 2025-09-01/Operations_List_MaximumSet_Gen.json - */ - /** - * Sample code: List Operations - generated by [MaximumSet] rule. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void listOperationsGeneratedByMaximumSetRule( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } - +public final class ResourceAnchorsUpdateSamples { /* - * x-ms-original-file: 2025-09-01/operations_list.json + * x-ms-original-file: 2025-09-01/ResourceAnchors_Update_MaximumSet_Gen.json */ /** - * Sample code: Operations_list. + * Sample code: ResourceAnchors_Update_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void operationsList(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + public static void + resourceAnchorsUpdateMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + ResourceAnchor resource = manager.resourceAnchors() + .getByResourceGroupWithResponse("rgopenapi", "resourceanchor1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key3998", "fakeTokenPlaceholder")).apply(); } - /* - * x-ms-original-file: 2025-09-01/Operations_List_MinimumSet_Gen.json - */ - /** - * Sample code: List Operations - generated by [MinimumSet] rule. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void listOperationsGeneratedByMinimumSetRule( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> 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; } } ``` -### OracleSubscriptions_AddAzureSubscriptions +### SystemVersions_Get ```java -import com.azure.resourcemanager.oracledatabase.models.AzureSubscriptions; -import java.util.Arrays; - /** - * Samples for OracleSubscriptions AddAzureSubscriptions. + * Samples for SystemVersions Get. */ -public final class OracleSubscriptionsAddAzureSubscriptionsSamples { +public final class SystemVersionsGetSamples { /* - * x-ms-original-file: 2025-09-01/oracleSubscriptions_addAzureSubscriptions.json + * x-ms-original-file: 2025-09-01/systemVersions_get.json */ /** - * Sample code: OracleSubscriptions_addAzureSubscriptions. + * Sample code: systemVersions_listSystemVersions. * * @param manager Entry point to OracleDatabaseManager. */ - public static void oracleSubscriptionsAddAzureSubscriptions( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions() - .addAzureSubscriptions(new AzureSubscriptions().withAzureSubscriptionIds( - Arrays.asList("00000000-0000-0000-0000-000000000001")), com.azure.core.util.Context.NONE); + public static void + systemVersionsListSystemVersions(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.systemVersions().getWithResponse("eastus", "22.x", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/OracleSubscriptions_AddAzureSubscriptions_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/SystemVersions_Get_MaximumSet_Gen.json */ /** - * Sample code: Add Azure Subscriptions to the OracleSubscription - generated by [MaximumSet] rule. + * Sample code: Get Exadata System Version - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void addAzureSubscriptionsToTheOracleSubscriptionGeneratedByMaximumSetRule( + public static void getExadataSystemVersionGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions() - .addAzureSubscriptions(new AzureSubscriptions().withAzureSubscriptionIds( - Arrays.asList("00000000-0000-0000-0000-000000000001")), com.azure.core.util.Context.NONE); + manager.systemVersions() + .getWithResponse("eastus", "Replace this value with a string matching RegExp .*", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/OracleSubscriptions_AddAzureSubscriptions_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/SystemVersions_Get_MinimumSet_Gen.json */ /** - * Sample code: Add Azure Subscriptions to the OracleSubscription - generated by [MinimumSet] rule. + * Sample code: Get Exadata System Version - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void addAzureSubscriptionsToTheOracleSubscriptionGeneratedByMinimumSetRule( + public static void getExadataSystemVersionGeneratedByMinimumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions() - .addAzureSubscriptions(new AzureSubscriptions().withAzureSubscriptionIds( - Arrays.asList("00000000-0000-0000-0000-000000000001")), com.azure.core.util.Context.NONE); + manager.systemVersions() + .getWithResponse("eastus", "Replace this value with a string matching RegExp .*", + com.azure.core.util.Context.NONE); } } ``` -### OracleSubscriptions_ListActivationLinks +### SystemVersions_ListByLocation ```java /** - * Samples for OracleSubscriptions ListActivationLinks. + * Samples for SystemVersions ListByLocation. */ -public final class OracleSubscriptionsListActivationLinksSamples { +public final class SystemVersionsListByLocationSamples { /* - * x-ms-original-file: 2025-09-01/OracleSubscriptions_ListActivationLinks_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/systemVersions_listByLocation.json */ /** - * Sample code: List Activation Links for the Oracle Subscription - generated by [MaximumSet] rule. + * Sample code: systemVersions_listByLocation. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listActivationLinksForTheOracleSubscriptionGeneratedByMaximumSetRule( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().listActivationLinks(com.azure.core.util.Context.NONE); + public static void + systemVersionsListByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.systemVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/OracleSubscriptions_ListActivationLinks_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/SystemVersions_ListByLocation_MaximumSet_Gen.json */ /** - * Sample code: List Activation Links for the Oracle Subscription - generated by [MinimumSet] rule. + * Sample code: List Exadata System Versions by the provided filter - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listActivationLinksForTheOracleSubscriptionGeneratedByMinimumSetRule( + public static void listExadataSystemVersionsByTheProvidedFilterGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().listActivationLinks(com.azure.core.util.Context.NONE); + manager.systemVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/oracleSubscriptions_listActivationLinks.json + * x-ms-original-file: 2025-09-01/SystemVersions_ListByLocation_MinimumSet_Gen.json */ /** - * Sample code: OracleSubscriptions_listActivationLinks. + * Sample code: List Exadata System Versions by the provided filter - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - oracleSubscriptionsListActivationLinks(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().listActivationLinks(com.azure.core.util.Context.NONE); + public static void listExadataSystemVersionsByTheProvidedFilterGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.systemVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); } } ``` -### OracleSubscriptions_ListCloudAccountDetails +### VirtualNetworkAddresses_CreateOrUpdate ```java +import com.azure.resourcemanager.oracledatabase.models.VirtualNetworkAddressProperties; + /** - * Samples for OracleSubscriptions ListCloudAccountDetails. + * Samples for VirtualNetworkAddresses CreateOrUpdate. */ -public final class OracleSubscriptionsListCloudAccountDetailsSamples { +public final class VirtualNetworkAddressesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/oracleSubscriptions_listCloudAccountDetails.json + * x-ms-original-file: 2025-09-01/virtualNetworkAddresses_create.json */ /** - * Sample code: OracleSubscriptions_listCloudAccountDetails. + * Sample code: VirtualNetworkAddresses_createOrUpdate. * * @param manager Entry point to OracleDatabaseManager. */ - public static void oracleSubscriptionsListCloudAccountDetails( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().listCloudAccountDetails(com.azure.core.util.Context.NONE); + public static void + virtualNetworkAddressesCreateOrUpdate(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.virtualNetworkAddresses() + .define("hostname1") + .withExistingCloudVmCluster("rg000", "cluster1") + .withProperties( + new VirtualNetworkAddressProperties().withIpAddress("192.168.0.1").withVmOcid("ocid1..aaaa")) + .create(); } /* - * x-ms-original-file: 2025-09-01/OracleSubscriptions_ListCloudAccountDetails_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/VirtualNetworkAddresses_CreateOrUpdate_MaximumSet_Gen.json */ /** - * Sample code: List Cloud Account details for the Oracle Subscription - generated by [MaximumSet] rule. + * Sample code: Create Virtual Network Address - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listCloudAccountDetailsForTheOracleSubscriptionGeneratedByMaximumSetRule( + public static void createVirtualNetworkAddressGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().listCloudAccountDetails(com.azure.core.util.Context.NONE); + manager.virtualNetworkAddresses() + .define("Replace this value with a string matching RegExp .*") + .withExistingCloudVmCluster("rgopenapi", "Replace this value with a string matching RegExp .*") + .withProperties( + new VirtualNetworkAddressProperties().withIpAddress("192.168.0.1").withVmOcid("ocid1..aaaa")) + .create(); } /* - * x-ms-original-file: 2025-09-01/OracleSubscriptions_ListCloudAccountDetails_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/VirtualNetworkAddresses_CreateOrUpdate_MinimumSet_Gen.json */ /** - * Sample code: List Cloud Account details for the Oracle Subscription - generated by [MinimumSet] rule. + * Sample code: Create Virtual Network Address - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listCloudAccountDetailsForTheOracleSubscriptionGeneratedByMinimumSetRule( + public static void createVirtualNetworkAddressGeneratedByMinimumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().listCloudAccountDetails(com.azure.core.util.Context.NONE); + manager.virtualNetworkAddresses() + .define("Replace this value with a string matching RegExp .*") + .withExistingCloudVmCluster("rgopenapi", "Replace this value with a string matching RegExp .*") + .create(); } } ``` -### OracleSubscriptions_ListSaasSubscriptionDetails +### VirtualNetworkAddresses_Delete ```java /** - * Samples for OracleSubscriptions ListSaasSubscriptionDetails. + * Samples for VirtualNetworkAddresses Delete. */ -public final class OracleSubscriptionsListSaasSubscriptionDetailsSamples { +public final class VirtualNetworkAddressesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/oracleSubscriptions_listSaasSubscriptionDetails.json + * x-ms-original-file: 2025-09-01/VirtualNetworkAddresses_Delete_MinimumSet_Gen.json */ /** - * Sample code: OracleSubscriptions_listSaasSubscriptionDetails. + * Sample code: Delete Virtual Network Address - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void oracleSubscriptionsListSaasSubscriptionDetails( + public static void deleteVirtualNetworkAddressGeneratedByMinimumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().listSaasSubscriptionDetails(com.azure.core.util.Context.NONE); + manager.virtualNetworkAddresses() + .delete("rgopenapi", "Replace this value with a string matching RegExp .*", + "Replace this value with a string matching RegExp .*", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/OracleSubscriptions_ListSaasSubscriptionDetails_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/virtualNetworkAddresses_delete.json */ /** - * Sample code: List Saas Subscription details for the Oracle Subscription - generated by [MaximumSet] rule. + * Sample code: VirtualNetworkAddresses_delete. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listSaasSubscriptionDetailsForTheOracleSubscriptionGeneratedByMaximumSetRule( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().listSaasSubscriptionDetails(com.azure.core.util.Context.NONE); + public static void + virtualNetworkAddressesDelete(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.virtualNetworkAddresses().delete("rg000", "cluster1", "hostname1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/OracleSubscriptions_ListSaasSubscriptionDetails_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/VirtualNetworkAddresses_Delete_MaximumSet_Gen.json */ /** - * Sample code: List Saas Subscription details for the Oracle Subscription - generated by [MinimumSet] rule. + * Sample code: Delete Virtual Network Address - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listSaasSubscriptionDetailsForTheOracleSubscriptionGeneratedByMinimumSetRule( + public static void deleteVirtualNetworkAddressGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().listSaasSubscriptionDetails(com.azure.core.util.Context.NONE); + manager.virtualNetworkAddresses() + .delete("rgopenapi", "Replace this value with a string matching RegExp .*", + "Replace this value with a string matching RegExp .*", com.azure.core.util.Context.NONE); } } ``` -### OracleSubscriptions_Update +### VirtualNetworkAddresses_Get ```java -import com.azure.resourcemanager.oracledatabase.models.Intent; -import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionUpdate; -import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionUpdateProperties; -import com.azure.resourcemanager.oracledatabase.models.PlanUpdate; - /** - * Samples for OracleSubscriptions Update. + * Samples for VirtualNetworkAddresses Get. */ -public final class OracleSubscriptionsUpdateSamples { +public final class VirtualNetworkAddressesGetSamples { /* - * x-ms-original-file: 2025-09-01/oracleSubscriptions_patch.json + * x-ms-original-file: 2025-09-01/virtualNetworkAddresses_get.json */ /** - * Sample code: OracleSubscriptions_update. + * Sample code: VirtualNetworkAddresses_get. * * @param manager Entry point to OracleDatabaseManager. */ public static void - oracleSubscriptionsUpdate(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().update(new OracleSubscriptionUpdate(), com.azure.core.util.Context.NONE); + virtualNetworkAddressesGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.virtualNetworkAddresses() + .getWithResponse("rg000", "cluster1", "hostname1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/OracleSubscriptions_Update_MinimumSet_Gen.json + * x-ms-original-file: 2025-09-01/VirtualNetworkAddresses_Get_MinimumSet_Gen.json */ /** - * Sample code: Patch Oracle Subscription - generated by [MinimumSet] rule. + * Sample code: Get Virtual Network Address - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void patchOracleSubscriptionGeneratedByMinimumSetRule( + public static void getVirtualNetworkAddressGeneratedByMinimumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().update(new OracleSubscriptionUpdate(), com.azure.core.util.Context.NONE); + manager.virtualNetworkAddresses() + .getWithResponse("rgopenapi", "Replace this value with a string matching RegExp .*", + "Replace this value with a string matching RegExp .*", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2025-09-01/OracleSubscriptions_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-09-01/VirtualNetworkAddresses_Get_MaximumSet_Gen.json */ /** - * Sample code: Patch Oracle Subscription - generated by [MaximumSet] rule. + * Sample code: Get Virtual Network Address - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void patchOracleSubscriptionGeneratedByMaximumSetRule( + public static void getVirtualNetworkAddressGeneratedByMaximumSetRule( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions() - .update(new OracleSubscriptionUpdate() - .withPlan(new PlanUpdate().withName("klnnbggrxhvvaiajvjx") - .withPublisher("xvsarzadrjqergudsohjk") - .withProduct("hivkczjyrimjilbmqj") - .withPromotionCode("fakeTokenPlaceholder") - .withVersion("ueudckjmuqpjvsmmenzyflgpa")) - .withProperties(new OracleSubscriptionUpdateProperties().withProductCode("fakeTokenPlaceholder") - .withIntent(Intent.RETAIN)), - com.azure.core.util.Context.NONE); + manager.virtualNetworkAddresses() + .getWithResponse("rgopenapi", "Replace this value with a string matching RegExp .*", + "Replace this value with a string matching RegExp .*", com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/tsp-location.yaml b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/tsp-location.yaml index beacaf6bd311..0775ee9b0d56 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/tsp-location.yaml +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/oracle/Oracle.Database.Management -commit: 817d1dd38cab5e7fb8445624ecdf82a4d192b73b +commit: e9b44e3aefed8010c02f030abab631b55a8d29de repo: Azure/azure-rest-api-specs additionalDirectories: - specification/oracle/Oracle.Database.Management/models From dca95fe8248bf235da01cced6213bc5c332710e3 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 16 Dec 2025 21:58:19 -0800 Subject: [PATCH 168/186] [Automation] Generate Fluent Lite from Swagger networkcloud#package-2025-09-01 (#47571) --- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 307 +++++++++++++++- .../README.md | 4 +- .../SAMPLE.md | 338 +++++++++--------- .../pom.xml | 4 +- .../fluent/BareMetalMachinesClient.java | 32 +- .../networkcloud/fluent/RacksClient.java | 32 +- .../fluent/StorageAppliancesClient.java | 32 +- .../BareMetalMachinePatchProperties.java | 12 +- .../models/CloudServicesNetworkInner.java | 8 +- .../fluent/models/ClusterInner.java | 8 +- .../fluent/models/ClusterPatchProperties.java | 16 +- .../fluent/models/ClusterProperties.java | 16 +- .../fluent/models/L3NetworkInner.java | 12 +- .../fluent/models/L3NetworkProperties.java | 18 +- .../fluent/models/VirtualMachineInner.java | 16 +- .../models/VirtualMachineProperties.java | 22 +- .../BareMetalMachinesClientImpl.java | 96 ++--- .../implementation/NetworkCloudImpl.java | 2 +- .../implementation/RacksClientImpl.java | 96 ++--- .../StorageAppliancesClientImpl.java | 96 ++--- .../networkcloud/models/BareMetalMachine.java | 7 +- .../BareMetalMachineConfigurationData.java | 4 +- .../BareMetalMachinePatchParameters.java | 8 +- .../BareMetalMachineRunCommandParameters.java | 18 +- ...MetalMachineRunDataExtractsParameters.java | 18 +- ...MetalMachineRunReadCommandsParameters.java | 18 +- .../models/BareMetalMachines.java | 16 +- .../networkcloud/models/Cluster.java | 26 +- .../models/ClusterPatchParameters.java | 8 +- .../models/ClusterUpdateStrategy.java | 8 +- .../models/CommandOutputType.java | 6 + .../networkcloud/models/DefaultGateway.java | 5 +- .../networkcloud/models/L3Network.java | 18 +- .../models/NetworkAttachment.java | 150 +++----- .../networkcloud/models/Racks.java | 16 +- .../models/StorageAppliances.java | 16 +- .../networkcloud/models/VirtualMachine.java | 20 +- .../VirtualMachineIpAllocationMethod.java | 5 +- .../AgentPoolsCreateOrUpdateSamples.java | 4 +- .../generated/AgentPoolsDeleteSamples.java | 4 +- .../generated/AgentPoolsGetSamples.java | 3 +- ...ntPoolsListByKubernetesClusterSamples.java | 2 +- .../generated/AgentPoolsUpdateSamples.java | 4 +- ...alMachineKeySetsCreateOrUpdateSamples.java | 2 +- .../BareMetalMachineKeySetsDeleteSamples.java | 2 +- .../BareMetalMachineKeySetsGetSamples.java | 2 +- ...talMachineKeySetsListByClusterSamples.java | 2 +- .../BareMetalMachineKeySetsUpdateSamples.java | 2 +- .../BareMetalMachinesCordonSamples.java | 2 +- ...areMetalMachinesCreateOrUpdateSamples.java | 2 +- .../BareMetalMachinesDeleteSamples.java | 2 +- ...etalMachinesGetByResourceGroupSamples.java | 2 +- ...talMachinesListByResourceGroupSamples.java | 2 +- .../BareMetalMachinesListSamples.java | 2 +- .../BareMetalMachinesPowerOffSamples.java | 2 +- .../BareMetalMachinesReimageSamples.java | 2 +- .../BareMetalMachinesReplaceSamples.java | 2 +- .../BareMetalMachinesRestartSamples.java | 2 +- .../BareMetalMachinesRunCommandSamples.java | 2 +- ...hinesRunDataExtractsRestrictedSamples.java | 2 +- ...reMetalMachinesRunDataExtractsSamples.java | 2 +- ...reMetalMachinesRunReadCommandsSamples.java | 4 +- .../BareMetalMachinesStartSamples.java | 2 +- .../BareMetalMachinesUncordonSamples.java | 2 +- .../BareMetalMachinesUpdateSamples.java | 2 +- .../BmcKeySetsCreateOrUpdateSamples.java | 4 +- .../generated/BmcKeySetsDeleteSamples.java | 4 +- .../generated/BmcKeySetsGetSamples.java | 3 +- .../BmcKeySetsListByClusterSamples.java | 2 +- .../generated/BmcKeySetsUpdateSamples.java | 4 +- ...ServicesNetworksCreateOrUpdateSamples.java | 2 +- .../CloudServicesNetworksDeleteSamples.java | 2 +- ...icesNetworksGetByResourceGroupSamples.java | 2 +- ...cesNetworksListByResourceGroupSamples.java | 2 +- .../CloudServicesNetworksListSamples.java | 2 +- .../CloudServicesNetworksUpdateSamples.java | 2 +- .../ClusterManagersCreateOrUpdateSamples.java | 4 +- .../ClusterManagersDeleteSamples.java | 2 +- ...sterManagersGetByResourceGroupSamples.java | 4 +- ...terManagersListByResourceGroupSamples.java | 2 +- .../generated/ClusterManagersListSamples.java | 2 +- .../ClusterManagersUpdateSamples.java | 2 +- .../ClustersContinueUpdateVersionSamples.java | 2 +- .../ClustersCreateOrUpdateSamples.java | 4 +- .../generated/ClustersDeleteSamples.java | 4 +- .../generated/ClustersDeploySamples.java | 6 +- .../ClustersGetByResourceGroupSamples.java | 3 +- .../ClustersListByResourceGroupSamples.java | 2 +- .../generated/ClustersListSamples.java | 2 +- .../generated/ClustersScanRuntimeSamples.java | 2 +- .../generated/ClustersUpdateSamples.java | 16 +- .../ClustersUpdateVersionSamples.java | 2 +- .../ConsolesCreateOrUpdateSamples.java | 4 +- .../generated/ConsolesDeleteSamples.java | 4 +- .../generated/ConsolesGetSamples.java | 3 +- .../ConsolesListByVirtualMachineSamples.java | 2 +- .../generated/ConsolesUpdateSamples.java | 3 +- ...sClusterFeaturesCreateOrUpdateSamples.java | 2 +- ...ubernetesClusterFeaturesDeleteSamples.java | 2 +- .../KubernetesClusterFeaturesGetSamples.java | 2 +- ...eaturesListByKubernetesClusterSamples.java | 2 +- ...ubernetesClusterFeaturesUpdateSamples.java | 2 +- ...bernetesClustersCreateOrUpdateSamples.java | 4 +- .../KubernetesClustersDeleteSamples.java | 2 +- ...etesClustersGetByResourceGroupSamples.java | 2 +- ...tesClustersListByResourceGroupSamples.java | 2 +- .../KubernetesClustersListSamples.java | 2 +- .../KubernetesClustersRestartNodeSamples.java | 2 +- .../KubernetesClustersUpdateSamples.java | 2 +- .../L2NetworksCreateOrUpdateSamples.java | 4 +- .../generated/L2NetworksDeleteSamples.java | 4 +- .../L2NetworksGetByResourceGroupSamples.java | 3 +- .../L2NetworksListByResourceGroupSamples.java | 2 +- .../generated/L2NetworksListSamples.java | 2 +- .../generated/L2NetworksUpdateSamples.java | 4 +- .../L3NetworksCreateOrUpdateSamples.java | 4 +- .../generated/L3NetworksDeleteSamples.java | 4 +- .../L3NetworksGetByResourceGroupSamples.java | 3 +- .../L3NetworksListByResourceGroupSamples.java | 2 +- .../generated/L3NetworksListSamples.java | 2 +- .../generated/L3NetworksUpdateSamples.java | 4 +- ...csConfigurationsCreateOrUpdateSamples.java | 2 +- .../MetricsConfigurationsDeleteSamples.java | 2 +- .../MetricsConfigurationsGetSamples.java | 2 +- ...icsConfigurationsListByClusterSamples.java | 2 +- .../MetricsConfigurationsUpdateSamples.java | 2 +- .../generated/OperationsListSamples.java | 4 +- .../generated/RackSkusGetSamples.java | 3 +- .../generated/RackSkusListSamples.java | 2 +- .../generated/RacksCreateOrUpdateSamples.java | 3 +- .../generated/RacksDeleteSamples.java | 3 +- .../RacksGetByResourceGroupSamples.java | 3 +- .../RacksListByResourceGroupSamples.java | 2 +- .../generated/RacksListSamples.java | 2 +- .../generated/RacksUpdateSamples.java | 3 +- ...torageAppliancesCreateOrUpdateSamples.java | 2 +- .../StorageAppliancesDeleteSamples.java | 2 +- ...sDisableRemoteVendorManagementSamples.java | 2 +- ...esEnableRemoteVendorManagementSamples.java | 2 +- ...geAppliancesGetByResourceGroupSamples.java | 2 +- ...eAppliancesListByResourceGroupSamples.java | 2 +- .../StorageAppliancesListSamples.java | 2 +- ...orageAppliancesRunReadCommandsSamples.java | 2 +- .../StorageAppliancesUpdateSamples.java | 2 +- .../TrunkedNetworksCreateOrUpdateSamples.java | 2 +- .../TrunkedNetworksDeleteSamples.java | 2 +- ...nkedNetworksGetByResourceGroupSamples.java | 4 +- ...kedNetworksListByResourceGroupSamples.java | 2 +- .../generated/TrunkedNetworksListSamples.java | 2 +- .../TrunkedNetworksUpdateSamples.java | 2 +- .../VirtualMachinesAssignRelaySamples.java | 2 +- .../VirtualMachinesCreateOrUpdateSamples.java | 2 +- .../VirtualMachinesDeleteSamples.java | 2 +- ...tualMachinesGetByResourceGroupSamples.java | 4 +- ...ualMachinesListByResourceGroupSamples.java | 2 +- .../generated/VirtualMachinesListSamples.java | 2 +- .../VirtualMachinesPowerOffSamples.java | 2 +- .../VirtualMachinesReimageSamples.java | 2 +- .../VirtualMachinesRestartSamples.java | 2 +- .../VirtualMachinesStartSamples.java | 2 +- .../VirtualMachinesUpdateSamples.java | 2 +- .../VolumesCreateOrUpdateSamples.java | 3 +- .../generated/VolumesDeleteSamples.java | 3 +- .../VolumesGetByResourceGroupSamples.java | 3 +- .../VolumesListByResourceGroupSamples.java | 2 +- .../generated/VolumesListSamples.java | 2 +- .../generated/VolumesUpdateSamples.java | 3 +- .../generated/ClusterManagerInnerTests.java | 2 +- .../generated/ClusterManagerListTests.java | 2 +- .../ClusterManagerPatchParametersTests.java | 2 +- ...lusterManagersCreateOrUpdateMockTests.java | 2 +- ...tByResourceGroupWithResponseMockTests.java | 2 +- ...rManagersListByResourceGroupMockTests.java | 2 +- .../ClusterManagersListMockTests.java | 2 +- .../generated/CommandOutputOverrideTests.java | 10 +- .../generated/CommandOutputSettingsTests.java | 4 +- .../ManagedServiceIdentityTests.java | 2 +- .../generated/UserAssignedIdentityTests.java | 2 +- 179 files changed, 1061 insertions(+), 845 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 47eae3a7c4fe..7d38760ce3c0 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -440,7 +440,7 @@ com.azure.resourcemanager:azure-resourcemanager-paloaltonetworks-ngfw;1.3.0;1.4. com.azure.resourcemanager:azure-resourcemanager-newrelicobservability;1.2.0;1.3.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-qumulo;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-selfhelp;1.0.0;1.1.0-beta.6 -com.azure.resourcemanager:azure-resourcemanager-networkcloud;2.0.0;2.1.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-networkcloud;2.0.0;2.1.0 com.azure.resourcemanager:azure-resourcemanager-cosmosdbforpostgresql;1.0.0;1.1.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-managementgroups;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-managednetworkfabric;1.1.0;1.2.0-beta.1 diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/CHANGELOG.md b/sdk/networkcloud/azure-resourcemanager-networkcloud/CHANGELOG.md index 026000cba567..3611781ba80a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/CHANGELOG.md +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/CHANGELOG.md @@ -1,14 +1,313 @@ # Release History -## 2.1.0-beta.2 (Unreleased) +## 2.1.0 (2025-12-17) -### Features Added +- Azure Resource Manager NetworkCloud client library for Java. This package contains Microsoft Azure SDK for NetworkCloud Management SDK. The Network Cloud APIs provide management of the Azure Operator Nexus compute resources such as on-premises clusters, hardware resources, and workload infrastructure resources. Package tag package-2025-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.BareMetalMachineKeySets` was modified + +* `listByCluster(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.Racks` was modified + +* `listByResourceGroup(java.lang.String,com.azure.core.util.Context)` was removed +* `list(com.azure.core.util.Context)` was removed + +#### `models.StorageAppliances` was modified + +* `listByResourceGroup(java.lang.String,com.azure.core.util.Context)` was removed +* `list(com.azure.core.util.Context)` was removed + +#### `models.Clusters` was modified + +* `listByResourceGroup(java.lang.String,com.azure.core.util.Context)` was removed +* `list(com.azure.core.util.Context)` was removed + +#### `models.MetricsConfigurations` was modified + +* `listByCluster(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.Volumes` was modified + +* `list(com.azure.core.util.Context)` was removed +* `listByResourceGroup(java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.KubernetesClusters` was modified + +* `list(com.azure.core.util.Context)` was removed +* `listByResourceGroup(java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.KubernetesClusterFeatures` was modified + +* `listByKubernetesCluster(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.Consoles` was modified + +* `listByVirtualMachine(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.L3Networks` was modified + +* `listByResourceGroup(java.lang.String,com.azure.core.util.Context)` was removed +* `list(com.azure.core.util.Context)` was removed + +#### `models.CloudServicesNetworks` was modified + +* `listByResourceGroup(java.lang.String,com.azure.core.util.Context)` was removed +* `list(com.azure.core.util.Context)` was removed + +#### `models.ClusterManagers` was modified + +* `listByResourceGroup(java.lang.String,com.azure.core.util.Context)` was removed +* `list(com.azure.core.util.Context)` was removed + +#### `models.AgentPools` was modified + +* `listByKubernetesCluster(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.BmcKeySets` was modified + +* `listByCluster(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.BareMetalMachines` was modified + +* `listByResourceGroup(java.lang.String,com.azure.core.util.Context)` was removed +* `list(com.azure.core.util.Context)` was removed + +#### `models.VirtualMachines` was modified + +* `list(com.azure.core.util.Context)` was removed +* `listByResourceGroup(java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.TrunkedNetworks` was modified + +* `list(com.azure.core.util.Context)` was removed +* `listByResourceGroup(java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.L2Networks` was modified + +* `listByResourceGroup(java.lang.String,com.azure.core.util.Context)` was removed +* `list(com.azure.core.util.Context)` was removed + +### Features Added + +* `models.VirtualMachineAssignRelayParameters` was added + +* `models.CloudServicesNetworkStorageStatus` was added + +* `models.ActionStateStatus` was added + +* `models.CommandOutputType` was added + +* `models.StepStateStatus` was added + +* `models.RelayType` was added + +* `models.CloudServicesNetworkStorageOptionsPatch` was added + +* `models.ActionState` was added + +* `models.CommandOutputOverride` was added + +* `models.CloudServicesNetworkStorageStatusStatus` was added + +* `models.BareMetalMachineReplaceSafeguardMode` was added + +* `models.StepState` was added + +* `models.BareMetalMachineReplaceStoragePolicy` was added + +* `models.StorageApplianceRunReadCommandsParameters` was added + +* `models.CertificateInfo` was added + +* `models.CloudServicesNetworkStorageMode` was added + +* `models.StorageApplianceCommandSpecification` was added + +* `models.CloudServicesNetworkStorageOptions` was added + +#### `models.VirtualMachinePatchParameters` was modified + +* `withIdentity(models.ManagedServiceIdentity)` was added +* `identity()` was added + +#### `models.BareMetalMachine` was modified + +* `runDataExtractsRestricted(models.BareMetalMachineRunDataExtractsParameters,com.azure.core.util.Context)` was added +* `actionStates()` was added +* `caCertificate()` was added +* `runDataExtractsRestricted(models.BareMetalMachineRunDataExtractsParameters)` was added + +#### `models.BareMetalMachineKeySets` was modified + +* `listByCluster(java.lang.String,java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.Racks` was modified + +* `list(java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added +* `listByResourceGroup(java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.StorageAppliances` was modified + +* `runReadCommands(java.lang.String,java.lang.String,models.StorageApplianceRunReadCommandsParameters)` was added +* `listByResourceGroup(java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added +* `runReadCommands(java.lang.String,java.lang.String,models.StorageApplianceRunReadCommandsParameters,com.azure.core.util.Context)` was added +* `list(java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.Cluster` was modified + +* `actionStates()` was added + +#### `models.Clusters` was modified + +* `list(java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added +* `listByResourceGroup(java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.BareMetalMachineKeySet$Definition` was modified + +* `withPrivilegeLevelName(java.lang.String)` was added + +#### `models.Volume` was modified + +* `allocatedSizeMiB()` was added +* `storageApplianceId()` was added + +#### `models.BareMetalMachineReplaceParameters` was modified + +* `withSafeguardMode(models.BareMetalMachineReplaceSafeguardMode)` was added +* `safeguardMode()` was added +* `storagePolicy()` was added +* `withStoragePolicy(models.BareMetalMachineReplaceStoragePolicy)` was added + +#### `models.StorageAppliance` was modified + +* `runReadCommands(models.StorageApplianceRunReadCommandsParameters,com.azure.core.util.Context)` was added +* `runReadCommands(models.StorageApplianceRunReadCommandsParameters)` was added +* `caCertificate()` was added + +#### `models.Volume$Definition` was modified + +* `withStorageApplianceId(java.lang.String)` was added + +#### `models.CloudServicesNetworkPatchParameters` was modified + +* `withStorageOptions(models.CloudServicesNetworkStorageOptionsPatch)` was added +* `storageOptions()` was added + +#### `models.MetricsConfigurations` was modified + +* `listByCluster(java.lang.String,java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.Volumes` was modified + +* `listByResourceGroup(java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added +* `list(java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.KubernetesClusters` was modified + +* `listByResourceGroup(java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added +* `list(java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.KubernetesClusterFeatures` was modified + +* `listByKubernetesCluster(java.lang.String,java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added -### Other Changes +#### `models.Consoles` was modified + +* `listByVirtualMachine(java.lang.String,java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.CloudServicesNetwork` was modified + +* `storageOptions()` was added +* `storageStatus()` was added + +#### `models.L3Networks` was modified + +* `listByResourceGroup(java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added +* `list(java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.VirtualMachine$Definition` was modified + +* `withNetworkDataContent(java.lang.String)` was added +* `withUserDataContent(java.lang.String)` was added +* `withIdentity(models.ManagedServiceIdentity)` was added + +#### `models.VirtualMachine$Update` was modified + +* `withIdentity(models.ManagedServiceIdentity)` was added + +#### `models.CloudServicesNetworks` was modified + +* `list(java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added +* `listByResourceGroup(java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.ClusterManagers` was modified + +* `listByResourceGroup(java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added +* `list(java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.AgentPools` was modified + +* `listByKubernetesCluster(java.lang.String,java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.VirtualMachine` was modified + +* `assignRelay()` was added +* `userDataContent()` was added +* `networkDataContent()` was added +* `assignRelay(models.VirtualMachineAssignRelayParameters,com.azure.core.util.Context)` was added +* `identity()` was added + +#### `models.SecretArchiveReference` was modified + +* `keyVaultUri()` was added + +#### `models.CommandOutputSettings` was modified + +* `withOverrides(java.util.List)` was added +* `overrides()` was added + +#### `models.CloudServicesNetwork$Definition` was modified + +* `withStorageOptions(models.CloudServicesNetworkStorageOptions)` was added + +#### `models.BmcKeySets` was modified + +* `listByCluster(java.lang.String,java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.BareMetalMachines` was modified + +* `runDataExtractsRestricted(java.lang.String,java.lang.String,models.BareMetalMachineRunDataExtractsParameters)` was added +* `runDataExtractsRestricted(java.lang.String,java.lang.String,models.BareMetalMachineRunDataExtractsParameters,com.azure.core.util.Context)` was added +* `list(java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added +* `listByResourceGroup(java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.VirtualMachines` was modified + +* `assignRelay(java.lang.String,java.lang.String)` was added +* `list(java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added +* `listByResourceGroup(java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added +* `assignRelay(java.lang.String,java.lang.String,models.VirtualMachineAssignRelayParameters,com.azure.core.util.Context)` was added + +#### `models.BareMetalMachineKeySet` was modified + +* `privilegeLevelName()` was added + +#### `models.TrunkedNetworks` was modified + +* `listByResourceGroup(java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added +* `list(java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.CloudServicesNetwork$Update` was modified + +* `withStorageOptions(models.CloudServicesNetworkStorageOptionsPatch)` was added + +#### `models.L2Networks` was modified + +* `listByResourceGroup(java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added +* `list(java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added ## 2.1.0-beta.1 (2025-11-18) diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/README.md b/sdk/networkcloud/azure-resourcemanager-networkcloud/README.md index d5dd927e887d..b7eb6d80708b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/README.md +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/README.md @@ -2,7 +2,7 @@ Azure Resource Manager NetworkCloud client library for Java. -This package contains Microsoft Azure SDK for NetworkCloud Management SDK. The Network Cloud APIs provide management of the Azure Operator Nexus compute resources such as on-premises clusters, hardware resources, and workload infrastructure resources. Package tag package-2025-07-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for NetworkCloud Management SDK. The Network Cloud APIs provide management of the Azure Operator Nexus compute resources such as on-premises clusters, hardware resources, and workload infrastructure resources. Package tag package-2025-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-networkcloud</artifactId> - <version>2.1.0-beta.1</version> + <version>2.1.0</version> </dependency> ``` [//]: # ({x-version-update-end}) diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/SAMPLE.md b/sdk/networkcloud/azure-resourcemanager-networkcloud/SAMPLE.md index 571c1e2fcbb9..09025d09eddb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/SAMPLE.md +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/SAMPLE.md @@ -216,8 +216,8 @@ import java.util.Map; public final class AgentPoolsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * AgentPools_Create.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Create. + * json */ /** * Sample code: Create or update Kubernetes cluster agent pool. @@ -283,8 +283,8 @@ public final class AgentPoolsCreateOrUpdateSamples { public final class AgentPoolsDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * AgentPools_Delete.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Delete. + * json */ /** * Sample code: Delete Kubernetes cluster agent pool. @@ -309,8 +309,7 @@ public final class AgentPoolsDeleteSamples { public final class AgentPoolsGetSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * AgentPools_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Get.json */ /** * Sample code: Get Kubernetes cluster agent pool. @@ -335,7 +334,7 @@ public final class AgentPoolsGetSamples { public final class AgentPoolsListByKubernetesClusterSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * AgentPools_ListByKubernetesCluster.json */ /** @@ -369,8 +368,8 @@ import java.util.Map; public final class AgentPoolsUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * AgentPools_Patch.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Patch. + * json */ /** * Sample code: Patch Kubernetes cluster agent pool. @@ -425,7 +424,7 @@ import java.util.Map; public final class BareMetalMachineKeySetsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachineKeySets_Create.json */ /** @@ -484,7 +483,7 @@ public final class BareMetalMachineKeySetsCreateOrUpdateSamples { public final class BareMetalMachineKeySetsDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachineKeySets_Delete.json */ /** @@ -510,7 +509,7 @@ public final class BareMetalMachineKeySetsDeleteSamples { public final class BareMetalMachineKeySetsGetSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachineKeySets_Get.json */ /** @@ -536,7 +535,7 @@ public final class BareMetalMachineKeySetsGetSamples { public final class BareMetalMachineKeySetsListByClusterSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachineKeySets_ListByCluster.json */ /** @@ -569,7 +568,7 @@ import java.util.Map; public final class BareMetalMachineKeySetsUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachineKeySets_Patch.json */ /** @@ -625,7 +624,7 @@ import com.azure.resourcemanager.networkcloud.models.BareMetalMachineEvacuate; public final class BareMetalMachinesCordonSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Cordon.json */ /** @@ -656,7 +655,7 @@ import java.util.Map; public final class BareMetalMachinesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Create.json */ /** @@ -712,7 +711,7 @@ public final class BareMetalMachinesCreateOrUpdateSamples { public final class BareMetalMachinesDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Delete.json */ /** @@ -736,7 +735,7 @@ public final class BareMetalMachinesDeleteSamples { public final class BareMetalMachinesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Get.json */ /** @@ -761,7 +760,7 @@ public final class BareMetalMachinesGetByResourceGroupSamples { public final class BareMetalMachinesListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_ListBySubscription.json */ /** @@ -785,7 +784,7 @@ public final class BareMetalMachinesListSamples { public final class BareMetalMachinesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_ListByResourceGroup.json */ /** @@ -813,7 +812,7 @@ import com.azure.resourcemanager.networkcloud.models.BareMetalMachineSkipShutdow public final class BareMetalMachinesPowerOffSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_PowerOff.json */ /** @@ -839,7 +838,7 @@ public final class BareMetalMachinesPowerOffSamples { public final class BareMetalMachinesReimageSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Reimage.json */ /** @@ -868,7 +867,7 @@ import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReplaceStor public final class BareMetalMachinesReplaceSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Replace.json */ /** @@ -902,7 +901,7 @@ public final class BareMetalMachinesReplaceSamples { public final class BareMetalMachinesRestartSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Restart.json */ /** @@ -929,7 +928,7 @@ import java.util.Arrays; public final class BareMetalMachinesRunCommandSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_RunCommand.json */ /** @@ -962,7 +961,7 @@ import java.util.Arrays; public final class BareMetalMachinesRunDataExtractsSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_RunDataExtracts.json */ /** @@ -996,7 +995,7 @@ import java.util.Arrays; public final class BareMetalMachinesRunDataExtractsRestrictedSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_RunDataExtractsRestricted.json */ /** @@ -1030,7 +1029,7 @@ import java.util.Arrays; public final class BareMetalMachinesRunReadCommandsSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_RunReadCommands_Hostname.json */ /** @@ -1050,7 +1049,7 @@ public final class BareMetalMachinesRunReadCommandsSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_RunReadCommands_Multiple.json */ /** @@ -1082,7 +1081,7 @@ public final class BareMetalMachinesRunReadCommandsSamples { public final class BareMetalMachinesStartSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Start.json */ /** @@ -1106,7 +1105,7 @@ public final class BareMetalMachinesStartSamples { public final class BareMetalMachinesUncordonSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Uncordon.json */ /** @@ -1134,7 +1133,7 @@ import java.util.Map; public final class BareMetalMachinesUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Patch.json */ /** @@ -1185,8 +1184,8 @@ import java.util.Map; public final class BmcKeySetsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * BmcKeySets_Create.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Create. + * json */ /** * Sample code: Create or update baseboard management controller key set of cluster. @@ -1241,8 +1240,8 @@ public final class BmcKeySetsCreateOrUpdateSamples { public final class BmcKeySetsDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * BmcKeySets_Delete.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Delete. + * json */ /** * Sample code: Delete baseboard management controller key set of cluster. @@ -1266,8 +1265,7 @@ public final class BmcKeySetsDeleteSamples { public final class BmcKeySetsGetSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * BmcKeySets_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Get.json */ /** * Sample code: Get baseboard management controller key set of cluster. @@ -1291,7 +1289,7 @@ public final class BmcKeySetsGetSamples { public final class BmcKeySetsListByClusterSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BmcKeySets_ListByCluster.json */ /** @@ -1324,8 +1322,8 @@ import java.util.Map; public final class BmcKeySetsUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * BmcKeySets_Patch.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Patch. + * json */ /** * Sample code: Patch baseboard management controller key set of cluster. @@ -1385,7 +1383,7 @@ import java.util.Map; public final class CloudServicesNetworksCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * CloudServicesNetworks_Create.json */ /** @@ -1438,7 +1436,7 @@ public final class CloudServicesNetworksCreateOrUpdateSamples { public final class CloudServicesNetworksDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * CloudServicesNetworks_Delete.json */ /** @@ -1462,7 +1460,7 @@ public final class CloudServicesNetworksDeleteSamples { public final class CloudServicesNetworksGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * CloudServicesNetworks_Get.json */ /** @@ -1487,7 +1485,7 @@ public final class CloudServicesNetworksGetByResourceGroupSamples { public final class CloudServicesNetworksListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * CloudServicesNetworks_ListBySubscription.json */ /** @@ -1511,7 +1509,7 @@ public final class CloudServicesNetworksListSamples { public final class CloudServicesNetworksListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * CloudServicesNetworks_ListByResourceGroup.json */ /** @@ -1546,7 +1544,7 @@ import java.util.Map; public final class CloudServicesNetworksUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * CloudServicesNetworks_Patch.json */ /** @@ -1603,7 +1601,7 @@ import java.util.Map; public final class ClusterManagersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterManagers_Create.json */ /** @@ -1630,7 +1628,7 @@ public final class ClusterManagersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterManagers_Create_Uami.json */ /** @@ -1681,7 +1679,7 @@ public final class ClusterManagersCreateOrUpdateSamples { public final class ClusterManagersDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterManagers_Delete.json */ /** @@ -1705,8 +1703,8 @@ public final class ClusterManagersDeleteSamples { public final class ClusterManagersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * ClusterManagers_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Get + * .json */ /** * Sample code: Get cluster manager. @@ -1730,7 +1728,7 @@ public final class ClusterManagersGetByResourceGroupSamples { public final class ClusterManagersListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterManagers_ListBySubscription.json */ /** @@ -1754,7 +1752,7 @@ public final class ClusterManagersListSamples { public final class ClusterManagersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterManagers_ListByResourceGroup.json */ /** @@ -1786,7 +1784,7 @@ import java.util.Map; public final class ClusterManagersUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterManagers_Patch.json */ /** @@ -1835,7 +1833,7 @@ import com.azure.resourcemanager.networkcloud.models.ClusterContinueUpdateVersio public final class ClustersContinueUpdateVersionSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_ContinueUpdateVersion.json */ /** @@ -1893,8 +1891,8 @@ import java.util.Map; public final class ClustersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Clusters_Create.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Create. + * json */ /** * Sample code: Create or update cluster. @@ -2045,8 +2043,8 @@ public final class ClustersCreateOrUpdateSamples { public final class ClustersDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Clusters_Delete.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Delete. + * json */ /** * Sample code: Delete cluster. @@ -2071,8 +2069,8 @@ import java.util.Arrays; public final class ClustersDeploySamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Clusters_Deploy.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Deploy. + * json */ /** * Sample code: Deploy cluster. @@ -2087,7 +2085,7 @@ public final class ClustersDeploySamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Deploy_SkipValidation.json */ /** @@ -2114,8 +2112,7 @@ public final class ClustersDeploySamples { public final class ClustersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Clusters_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Get.json */ /** * Sample code: Get cluster. @@ -2138,7 +2135,7 @@ public final class ClustersGetByResourceGroupSamples { public final class ClustersListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_ListBySubscription.json */ /** @@ -2161,7 +2158,7 @@ public final class ClustersListSamples { public final class ClustersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_ListByResourceGroup.json */ /** @@ -2188,7 +2185,7 @@ import com.azure.resourcemanager.networkcloud.models.ClusterScanRuntimeParameter public final class ClustersScanRuntimeSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_ScanRuntime.json */ /** @@ -2243,7 +2240,7 @@ import java.util.Map; public final class ClustersUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Patch_UpdateStrategy.json */ /** @@ -2267,7 +2264,7 @@ public final class ClustersUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Patch_VulnerabilityScanning.json */ /** @@ -2288,7 +2285,7 @@ public final class ClustersUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Patch_Location.json */ /** @@ -2308,7 +2305,7 @@ public final class ClustersUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Patch_AggregatorOrSingleRackDefinition.json */ /** @@ -2367,7 +2364,7 @@ public final class ClustersUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Patch_CommandOutput.json */ /** @@ -2403,7 +2400,7 @@ public final class ClustersUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Patch_RuntimeProtectionConfiguration.json */ /** @@ -2425,7 +2422,7 @@ public final class ClustersUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Patch_SecretArchive.json */ /** @@ -2449,7 +2446,7 @@ public final class ClustersUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Patch_AnalyticsOutput.json */ /** @@ -2503,7 +2500,7 @@ import com.azure.resourcemanager.networkcloud.models.ClusterUpdateVersionParamet public final class ClustersUpdateVersionSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_UpdateVersion.json */ /** @@ -2535,8 +2532,8 @@ import java.util.Map; public final class ConsolesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Consoles_Create.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Create. + * json */ /** * Sample code: Create or update virtual machine console. @@ -2582,8 +2579,8 @@ public final class ConsolesCreateOrUpdateSamples { public final class ConsolesDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Consoles_Delete.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Delete. + * json */ /** * Sample code: Delete virtual machine console. @@ -2606,8 +2603,7 @@ public final class ConsolesDeleteSamples { public final class ConsolesGetSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Consoles_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Get.json */ /** * Sample code: Get virtual machine console. @@ -2630,7 +2626,7 @@ public final class ConsolesGetSamples { public final class ConsolesListByVirtualMachineSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Consoles_ListByVirtualMachine.json */ /** @@ -2663,8 +2659,7 @@ import java.util.Map; public final class ConsolesUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Consoles_Patch.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Patch.json */ /** * Sample code: Patch virtual machine console. @@ -2711,7 +2706,7 @@ import java.util.Map; public final class KubernetesClusterFeaturesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusterFeatures_Create.json */ /** @@ -2754,7 +2749,7 @@ public final class KubernetesClusterFeaturesCreateOrUpdateSamples { public final class KubernetesClusterFeaturesDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusterFeatures_Delete.json */ /** @@ -2780,7 +2775,7 @@ public final class KubernetesClusterFeaturesDeleteSamples { public final class KubernetesClusterFeaturesGetSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusterFeatures_Get.json */ /** @@ -2805,7 +2800,7 @@ public final class KubernetesClusterFeaturesGetSamples { public final class KubernetesClusterFeaturesListByKubernetesClusterSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusterFeatures_ListByKubernetesCluster.json */ /** @@ -2837,7 +2832,7 @@ import java.util.Map; public final class KubernetesClusterFeaturesUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusterFeatures_Patch.json */ /** @@ -2913,7 +2908,7 @@ import java.util.Map; public final class KubernetesClustersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusters_Create.json */ /** @@ -3015,7 +3010,7 @@ public final class KubernetesClustersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusters_L2LoadBalancer_Create.json */ /** @@ -3121,7 +3116,7 @@ public final class KubernetesClustersCreateOrUpdateSamples { public final class KubernetesClustersDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusters_Delete.json */ /** @@ -3145,7 +3140,7 @@ public final class KubernetesClustersDeleteSamples { public final class KubernetesClustersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusters_Get.json */ /** @@ -3170,7 +3165,7 @@ public final class KubernetesClustersGetByResourceGroupSamples { public final class KubernetesClustersListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusters_ListBySubscription.json */ /** @@ -3194,7 +3189,7 @@ public final class KubernetesClustersListSamples { public final class KubernetesClustersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusters_ListByResourceGroup.json */ /** @@ -3221,7 +3216,7 @@ import com.azure.resourcemanager.networkcloud.models.KubernetesClusterRestartNod public final class KubernetesClustersRestartNodeSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusters_RestartNode.json */ /** @@ -3256,7 +3251,7 @@ import java.util.Map; public final class KubernetesClustersUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusters_Patch.json */ /** @@ -3309,8 +3304,8 @@ import java.util.Map; public final class L2NetworksCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * L2Networks_Create.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Create. + * json */ /** * Sample code: Create or update L2 network. @@ -3356,8 +3351,8 @@ public final class L2NetworksCreateOrUpdateSamples { public final class L2NetworksDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * L2Networks_Delete.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Delete. + * json */ /** * Sample code: Delete L2 network. @@ -3379,8 +3374,7 @@ public final class L2NetworksDeleteSamples { public final class L2NetworksGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * L2Networks_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Get.json */ /** * Sample code: Get L2 network. @@ -3403,7 +3397,7 @@ public final class L2NetworksGetByResourceGroupSamples { public final class L2NetworksListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * L2Networks_ListBySubscription.json */ /** @@ -3427,7 +3421,7 @@ public final class L2NetworksListSamples { public final class L2NetworksListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * L2Networks_ListByResourceGroup.json */ /** @@ -3455,8 +3449,8 @@ import java.util.Map; public final class L2NetworksUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * L2Networks_Patch.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Patch. + * json */ /** * Sample code: Patch L2 network. @@ -3498,8 +3492,8 @@ import java.util.Map; public final class L3NetworksCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * L3Networks_Create.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Create. + * json */ /** * Sample code: Create or update L3 network. @@ -3548,8 +3542,8 @@ public final class L3NetworksCreateOrUpdateSamples { public final class L3NetworksDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * L3Networks_Delete.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Delete. + * json */ /** * Sample code: Delete L3 network. @@ -3571,8 +3565,7 @@ public final class L3NetworksDeleteSamples { public final class L3NetworksGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * L3Networks_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Get.json */ /** * Sample code: Get L3network. @@ -3595,7 +3588,7 @@ public final class L3NetworksGetByResourceGroupSamples { public final class L3NetworksListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * L3Networks_ListBySubscription.json */ /** @@ -3619,7 +3612,7 @@ public final class L3NetworksListSamples { public final class L3NetworksListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * L3Networks_ListByResourceGroup.json */ /** @@ -3647,8 +3640,8 @@ import java.util.Map; public final class L3NetworksUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * L3Networks_Patch.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Patch. + * json */ /** * Sample code: Patch L3 network. @@ -3690,7 +3683,7 @@ import java.util.Map; public final class MetricsConfigurationsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterMetricsConfigurations_Create.json */ /** @@ -3736,7 +3729,7 @@ public final class MetricsConfigurationsCreateOrUpdateSamples { public final class MetricsConfigurationsDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterMetricsConfigurations_Delete.json */ /** @@ -3761,7 +3754,7 @@ public final class MetricsConfigurationsDeleteSamples { public final class MetricsConfigurationsGetSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterMetricsConfigurations_Get.json */ /** @@ -3786,7 +3779,7 @@ public final class MetricsConfigurationsGetSamples { public final class MetricsConfigurationsListByClusterSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterMetricsConfigurations_ListByCluster.json */ /** @@ -3816,7 +3809,7 @@ import java.util.Map; public final class MetricsConfigurationsUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterMetricsConfigurations_Patch.json */ /** @@ -3859,8 +3852,8 @@ public final class MetricsConfigurationsUpdateSamples { public final class OperationsListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Operations_List.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Operations_List. + * json */ /** * Sample code: List resource provider operations. @@ -3883,8 +3876,7 @@ public final class OperationsListSamples { public final class RackSkusGetSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * RackSkus_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/RackSkus_Get.json */ /** * Sample code: Get rack SKU resource. @@ -3906,7 +3898,7 @@ public final class RackSkusGetSamples { public final class RackSkusListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * RackSkus_ListBySubscription.json */ /** @@ -3933,8 +3925,7 @@ import java.util.Map; public final class RacksCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Racks_Create.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Create.json */ /** * Sample code: Create or update rack. @@ -3981,8 +3972,7 @@ public final class RacksCreateOrUpdateSamples { public final class RacksDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Racks_Delete.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Delete.json */ /** * Sample code: Delete rack. @@ -4004,8 +3994,7 @@ public final class RacksDeleteSamples { public final class RacksGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/Racks_Get. - * json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Get.json */ /** * Sample code: Get rack. @@ -4028,7 +4017,7 @@ public final class RacksGetByResourceGroupSamples { public final class RacksListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Racks_ListBySubscription.json */ /** @@ -4051,7 +4040,7 @@ public final class RacksListSamples { public final class RacksListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Racks_ListByResourceGroup.json */ /** @@ -4078,8 +4067,7 @@ import java.util.Map; public final class RacksUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Racks_Patch.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Patch.json */ /** * Sample code: Patch rack. @@ -4125,7 +4113,7 @@ import java.util.Map; public final class StorageAppliancesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_Create.json */ /** @@ -4176,7 +4164,7 @@ public final class StorageAppliancesCreateOrUpdateSamples { public final class StorageAppliancesDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_Delete.json */ /** @@ -4200,7 +4188,7 @@ public final class StorageAppliancesDeleteSamples { public final class StorageAppliancesDisableRemoteVendorManagementSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_DisableRemoteVendorManagement.json */ /** @@ -4229,7 +4217,7 @@ import java.util.Arrays; public final class StorageAppliancesEnableRemoteVendorManagementSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_EnableRemoteVendorManagement.json */ /** @@ -4257,7 +4245,7 @@ public final class StorageAppliancesEnableRemoteVendorManagementSamples { public final class StorageAppliancesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_Get.json */ /** @@ -4282,7 +4270,7 @@ public final class StorageAppliancesGetByResourceGroupSamples { public final class StorageAppliancesListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_ListBySubscription.json */ /** @@ -4306,7 +4294,7 @@ public final class StorageAppliancesListSamples { public final class StorageAppliancesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_ListByResourceGroup.json */ /** @@ -4335,7 +4323,7 @@ import java.util.Arrays; public final class StorageAppliancesRunReadCommandsSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_RunReadCommands.json */ /** @@ -4370,7 +4358,7 @@ import java.util.Map; public final class StorageAppliancesUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_Patch.json */ /** @@ -4417,7 +4405,7 @@ import java.util.Map; public final class TrunkedNetworksCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * TrunkedNetworks_Create.json */ /** @@ -4466,7 +4454,7 @@ public final class TrunkedNetworksCreateOrUpdateSamples { public final class TrunkedNetworksDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * TrunkedNetworks_Delete.json */ /** @@ -4490,8 +4478,8 @@ public final class TrunkedNetworksDeleteSamples { public final class TrunkedNetworksGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * TrunkedNetworks_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Get + * .json */ /** * Sample code: Get Trunked network. @@ -4515,7 +4503,7 @@ public final class TrunkedNetworksGetByResourceGroupSamples { public final class TrunkedNetworksListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * TrunkedNetworks_ListBySubscription.json */ /** @@ -4539,7 +4527,7 @@ public final class TrunkedNetworksListSamples { public final class TrunkedNetworksListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * TrunkedNetworks_ListByResourceGroup.json */ /** @@ -4568,7 +4556,7 @@ import java.util.Map; public final class TrunkedNetworksUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * TrunkedNetworks_Patch.json */ /** @@ -4609,7 +4597,7 @@ import com.azure.resourcemanager.networkcloud.models.VirtualMachineAssignRelayPa public final class VirtualMachinesAssignRelaySamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_AssignRelay.json */ /** @@ -4661,7 +4649,7 @@ import java.util.Map; public final class VirtualMachinesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_Create.json */ /** @@ -4743,7 +4731,7 @@ public final class VirtualMachinesCreateOrUpdateSamples { public final class VirtualMachinesDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_Delete.json */ /** @@ -4767,8 +4755,8 @@ public final class VirtualMachinesDeleteSamples { public final class VirtualMachinesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * VirtualMachines_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Get + * .json */ /** * Sample code: Get virtual machine. @@ -4792,7 +4780,7 @@ public final class VirtualMachinesGetByResourceGroupSamples { public final class VirtualMachinesListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_ListBySubscription.json */ /** @@ -4816,7 +4804,7 @@ public final class VirtualMachinesListSamples { public final class VirtualMachinesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_ListByResourceGroup.json */ /** @@ -4844,7 +4832,7 @@ import com.azure.resourcemanager.networkcloud.models.VirtualMachinePowerOffParam public final class VirtualMachinesPowerOffSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_PowerOff.json */ /** @@ -4870,7 +4858,7 @@ public final class VirtualMachinesPowerOffSamples { public final class VirtualMachinesReimageSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_Reimage.json */ /** @@ -4893,7 +4881,7 @@ public final class VirtualMachinesReimageSamples { public final class VirtualMachinesRestartSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_Restart.json */ /** @@ -4916,7 +4904,7 @@ public final class VirtualMachinesRestartSamples { public final class VirtualMachinesStartSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_Start.json */ /** @@ -4947,7 +4935,7 @@ import java.util.Map; public final class VirtualMachinesUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_Patch.json */ /** @@ -4998,8 +4986,7 @@ import java.util.Map; public final class VolumesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Volumes_Create.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Create.json */ /** * Sample code: Create or update volume. @@ -5044,8 +5031,7 @@ public final class VolumesCreateOrUpdateSamples { public final class VolumesDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Volumes_Delete.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Delete.json */ /** * Sample code: Delete volume. @@ -5067,8 +5053,7 @@ public final class VolumesDeleteSamples { public final class VolumesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Volumes_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Get.json */ /** * Sample code: Get volume. @@ -5091,7 +5076,7 @@ public final class VolumesGetByResourceGroupSamples { public final class VolumesListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Volumes_ListBySubscription.json */ /** @@ -5114,7 +5099,7 @@ public final class VolumesListSamples { public final class VolumesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Volumes_ListByResourceGroup.json */ /** @@ -5141,8 +5126,7 @@ import java.util.Map; public final class VolumesUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Volumes_Patch.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Patch.json */ /** * Sample code: Patch volume. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/pom.xml b/sdk/networkcloud/azure-resourcemanager-networkcloud/pom.xml index 31a8dafc10a9..b1c32dd8004d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/pom.xml +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/pom.xml @@ -14,11 +14,11 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-networkcloud</artifactId> - <version>2.1.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-networkcloud;current} --> + <version>2.1.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-networkcloud;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for NetworkCloud Management</name> - <description>This package contains Microsoft Azure SDK for NetworkCloud Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Network Cloud APIs provide management of the Azure Operator Nexus compute resources such as on-premises clusters, hardware resources, and workload infrastructure resources. Package tag package-2025-07-01-preview.</description> + <description>This package contains Microsoft Azure SDK for NetworkCloud Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Network Cloud APIs provide management of the Azure Operator Nexus compute resources such as on-premises clusters, hardware resources, and workload infrastructure resources. Package tag package-2025-09-01.</description> <url>https://github.com/Azure/azure-sdk-for-java</url> <licenses> diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/BareMetalMachinesClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/BareMetalMachinesClient.java index 4ff262081ca3..ebd0d648a03b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/BareMetalMachinesClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/BareMetalMachinesClient.java @@ -126,8 +126,8 @@ Response<BareMetalMachineInner> getByResourceGroupWithResponse(String resourceGr /** * Create or update the bare metal machine. * - * Create a new bare metal machine or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -144,8 +144,8 @@ SyncPoller<PollResult<BareMetalMachineInner>, BareMetalMachineInner> beginCreate /** * Create or update the bare metal machine. * - * Create a new bare metal machine or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -168,8 +168,8 @@ SyncPoller<PollResult<BareMetalMachineInner>, BareMetalMachineInner> beginCreate /** * Create or update the bare metal machine. * - * Create a new bare metal machine or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -186,8 +186,8 @@ BareMetalMachineInner createOrUpdate(String resourceGroupName, String bareMetalM /** * Create or update the bare metal machine. * - * Create a new bare metal machine or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -209,8 +209,8 @@ BareMetalMachineInner createOrUpdate(String resourceGroupName, String bareMetalM /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -226,8 +226,8 @@ SyncPoller<PollResult<OperationStatusResultInner>, OperationStatusResultInner> b /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -248,8 +248,8 @@ SyncPoller<PollResult<OperationStatusResultInner>, OperationStatusResultInner> b /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -264,8 +264,8 @@ SyncPoller<PollResult<OperationStatusResultInner>, OperationStatusResultInner> b /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/RacksClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/RacksClient.java index 8e32b52a54cf..fbc6b780460d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/RacksClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/RacksClient.java @@ -115,8 +115,8 @@ PagedIterable<RackInner> listByResourceGroup(String resourceGroupName, Integer t /** * Create or update the rack. * - * Create a new rack or update properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -134,8 +134,8 @@ SyncPoller<PollResult<RackInner>, RackInner> beginCreateOrUpdate(String resource /** * Create or update the rack. * - * Create a new rack or update properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -158,8 +158,8 @@ SyncPoller<PollResult<RackInner>, RackInner> beginCreateOrUpdate(String resource /** * Create or update the rack. * - * Create a new rack or update properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -175,8 +175,8 @@ SyncPoller<PollResult<RackInner>, RackInner> beginCreateOrUpdate(String resource /** * Create or update the rack. * - * Create a new rack or update properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -198,8 +198,8 @@ RackInner createOrUpdate(String resourceGroupName, String rackName, RackInner ra /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -215,8 +215,8 @@ SyncPoller<PollResult<OperationStatusResultInner>, OperationStatusResultInner> b /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -237,8 +237,8 @@ SyncPoller<PollResult<OperationStatusResultInner>, OperationStatusResultInner> b /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -253,8 +253,8 @@ SyncPoller<PollResult<OperationStatusResultInner>, OperationStatusResultInner> b /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/StorageAppliancesClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/StorageAppliancesClient.java index be48cec20c48..faa15e823c64 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/StorageAppliancesClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/StorageAppliancesClient.java @@ -122,8 +122,8 @@ Response<StorageApplianceInner> getByResourceGroupWithResponse(String resourceGr /** * Create or update the storage appliance. * - * Create a new storage appliance or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -141,8 +141,8 @@ SyncPoller<PollResult<StorageApplianceInner>, StorageApplianceInner> beginCreate /** * Create or update the storage appliance. * - * Create a new storage appliance or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -166,8 +166,8 @@ SyncPoller<PollResult<StorageApplianceInner>, StorageApplianceInner> beginCreate /** * Create or update the storage appliance. * - * Create a new storage appliance or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -184,8 +184,8 @@ StorageApplianceInner createOrUpdate(String resourceGroupName, String storageApp /** * Create or update the storage appliance. * - * Create a new storage appliance or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -207,8 +207,8 @@ StorageApplianceInner createOrUpdate(String resourceGroupName, String storageApp /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -224,8 +224,8 @@ SyncPoller<PollResult<OperationStatusResultInner>, OperationStatusResultInner> b /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -246,8 +246,8 @@ SyncPoller<PollResult<OperationStatusResultInner>, OperationStatusResultInner> b /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -262,8 +262,8 @@ SyncPoller<PollResult<OperationStatusResultInner>, OperationStatusResultInner> b /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachinePatchProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachinePatchProperties.java index a6ec9b8920d9..512ab64310cb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachinePatchProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachinePatchProperties.java @@ -17,8 +17,8 @@ @Fluent public final class BareMetalMachinePatchProperties implements JsonSerializable<BareMetalMachinePatchProperties> { /* - * The details provided by the customer during the creation of rack manifests - * that allows for custom data to be associated with this machine. + * The details provided by the customer during the creation of rack manifests that allows for custom data to be + * associated with this machine. */ private String machineDetails; @@ -29,8 +29,8 @@ public BareMetalMachinePatchProperties() { } /** - * Get the machineDetails property: The details provided by the customer during the creation of rack manifests - * that allows for custom data to be associated with this machine. + * Get the machineDetails property: The details provided by the customer during the creation of rack manifests that + * allows for custom data to be associated with this machine. * * @return the machineDetails value. */ @@ -39,8 +39,8 @@ public String machineDetails() { } /** - * Set the machineDetails property: The details provided by the customer during the creation of rack manifests - * that allows for custom data to be associated with this machine. + * Set the machineDetails property: The details provided by the customer during the creation of rack manifests that + * allows for custom data to be associated with this machine. * * @param machineDetails the machineDetails value to set. * @return the BareMetalMachinePatchProperties object itself. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkInner.java index e251e025f6a9..4c96f2b1e82e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkInner.java @@ -26,10 +26,10 @@ * CloudServicesNetwork represents additional egress information that will be used by associated virtual machines or * hybrid AKS clusters. * - * Upon creation, the additional services that are provided by the platform will be allocated and - * represented in the status of this resource. All resources associated with this cloud services network will be part - * of the same layer 2 (L2) isolation domain. At least one service network must be created but may be reused across many - * virtual machines and/or Hybrid AKS clusters. + * Upon creation, the additional services that are provided by the platform will be allocated and represented in the + * status of this resource. All resources associated with this cloud services network will be part of the same layer 2 + * (L2) isolation domain. At least one service network must be created but may be reused across many virtual machines + * and/or Hybrid AKS clusters. */ @Fluent public final class CloudServicesNetworkInner extends Resource { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterInner.java index a91cf299fcca..47bd22131f87 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterInner.java @@ -373,8 +373,8 @@ public String clusterManagerId() { } /** - * Get the clusterServicePrincipal property: Deprecated: Use managed identity to provide cluster privileges. The - * service principal to be used by the cluster during Arc Appliance installation. + * Get the clusterServicePrincipal property: Field Deprecated: Use managed identity to provide cluster privileges. + * The service principal to be used by the cluster during Arc Appliance installation. * * @return the clusterServicePrincipal value. */ @@ -383,8 +383,8 @@ public ServicePrincipalInformation clusterServicePrincipal() { } /** - * Set the clusterServicePrincipal property: Deprecated: Use managed identity to provide cluster privileges. The - * service principal to be used by the cluster during Arc Appliance installation. + * Set the clusterServicePrincipal property: Field Deprecated: Use managed identity to provide cluster privileges. + * The service principal to be used by the cluster during Arc Appliance installation. * * @param clusterServicePrincipal the clusterServicePrincipal value to set. * @return the ClusterInner object itself. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterPatchProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterPatchProperties.java index 3fde7b1145a4..f4c531eaff42 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterPatchProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterPatchProperties.java @@ -44,8 +44,8 @@ public final class ClusterPatchProperties implements JsonSerializable<ClusterPat private String clusterLocation; /* - * Deprecated: Use managed identity to provide cluster privileges. The service principal to be used by the cluster - * during Arc Appliance installation. + * Field Deprecated: Use managed identity to provide cluster privileges. The service principal to be used by the + * cluster during Arc Appliance installation. */ private ServicePrincipalInformation clusterServicePrincipal; @@ -62,8 +62,8 @@ public final class ClusterPatchProperties implements JsonSerializable<ClusterPat private ValidationThreshold computeDeploymentThreshold; /* - * The list of rack definitions for the compute racks in a multi-rack - * cluster, or an empty list in a single-rack cluster. + * The list of rack definitions for the compute racks in a multi-rack cluster, or an empty list in a single-rack + * cluster. */ private List<RackDefinition> computeRackDefinitions; @@ -166,8 +166,8 @@ public ClusterPatchProperties withClusterLocation(String clusterLocation) { } /** - * Get the clusterServicePrincipal property: Deprecated: Use managed identity to provide cluster privileges. The - * service principal to be used by the cluster during Arc Appliance installation. + * Get the clusterServicePrincipal property: Field Deprecated: Use managed identity to provide cluster privileges. + * The service principal to be used by the cluster during Arc Appliance installation. * * @return the clusterServicePrincipal value. */ @@ -176,8 +176,8 @@ public ServicePrincipalInformation clusterServicePrincipal() { } /** - * Set the clusterServicePrincipal property: Deprecated: Use managed identity to provide cluster privileges. The - * service principal to be used by the cluster during Arc Appliance installation. + * Set the clusterServicePrincipal property: Field Deprecated: Use managed identity to provide cluster privileges. + * The service principal to be used by the cluster during Arc Appliance installation. * * @param clusterServicePrincipal the clusterServicePrincipal value to set. * @return the ClusterPatchProperties object itself. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterProperties.java index c58081b1cd5c..1a5783ec6dce 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterProperties.java @@ -98,8 +98,8 @@ public final class ClusterProperties implements JsonSerializable<ClusterProperti private String clusterManagerId; /* - * Deprecated: Use managed identity to provide cluster privileges. The service principal to be used by the cluster - * during Arc Appliance installation. + * Field Deprecated: Use managed identity to provide cluster privileges. The service principal to be used by the + * cluster during Arc Appliance installation. */ private ServicePrincipalInformation clusterServicePrincipal; @@ -126,8 +126,8 @@ public final class ClusterProperties implements JsonSerializable<ClusterProperti private ValidationThreshold computeDeploymentThreshold; /* - * The list of rack definitions for the compute racks in a multi-rack - * cluster, or an empty list in a single-rack cluster. + * The list of rack definitions for the compute racks in a multi-rack cluster, or an empty list in a single-rack + * cluster. */ private List<RackDefinition> computeRackDefinitions; @@ -368,8 +368,8 @@ public String clusterManagerId() { } /** - * Get the clusterServicePrincipal property: Deprecated: Use managed identity to provide cluster privileges. The - * service principal to be used by the cluster during Arc Appliance installation. + * Get the clusterServicePrincipal property: Field Deprecated: Use managed identity to provide cluster privileges. + * The service principal to be used by the cluster during Arc Appliance installation. * * @return the clusterServicePrincipal value. */ @@ -378,8 +378,8 @@ public ServicePrincipalInformation clusterServicePrincipal() { } /** - * Set the clusterServicePrincipal property: Deprecated: Use managed identity to provide cluster privileges. The - * service principal to be used by the cluster during Arc Appliance installation. + * Set the clusterServicePrincipal property: Field Deprecated: Use managed identity to provide cluster privileges. + * The service principal to be used by the cluster during Arc Appliance installation. * * @param clusterServicePrincipal the clusterServicePrincipal value to set. * @return the ClusterProperties object itself. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkInner.java index abab9b4dfc8c..f06f6312cb4a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkInner.java @@ -311,8 +311,7 @@ public L3NetworkInner withIpAllocationType(IpAllocationType ipAllocationType) { /** * Get the ipv4ConnectedPrefix property: The IPV4 prefix (CIDR) assigned to this L3 network. Required when the IP - * allocation type - * is IPV4 or DualStack. + * allocation type is IPV4 or DualStack. * * @return the ipv4ConnectedPrefix value. */ @@ -322,8 +321,7 @@ public String ipv4ConnectedPrefix() { /** * Set the ipv4ConnectedPrefix property: The IPV4 prefix (CIDR) assigned to this L3 network. Required when the IP - * allocation type - * is IPV4 or DualStack. + * allocation type is IPV4 or DualStack. * * @param ipv4ConnectedPrefix the ipv4ConnectedPrefix value to set. * @return the L3NetworkInner object itself. @@ -338,8 +336,7 @@ public L3NetworkInner withIpv4ConnectedPrefix(String ipv4ConnectedPrefix) { /** * Get the ipv6ConnectedPrefix property: The IPV6 prefix (CIDR) assigned to this L3 network. Required when the IP - * allocation type - * is IPV6 or DualStack. + * allocation type is IPV6 or DualStack. * * @return the ipv6ConnectedPrefix value. */ @@ -349,8 +346,7 @@ public String ipv6ConnectedPrefix() { /** * Set the ipv6ConnectedPrefix property: The IPV6 prefix (CIDR) assigned to this L3 network. Required when the IP - * allocation type - * is IPV6 or DualStack. + * allocation type is IPV6 or DualStack. * * @param ipv6ConnectedPrefix the ipv6ConnectedPrefix value to set. * @return the L3NetworkInner object itself. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkProperties.java index 775f4d278438..fe4936e93e4e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkProperties.java @@ -74,14 +74,12 @@ public final class L3NetworkProperties implements JsonSerializable<L3NetworkProp private IpAllocationType ipAllocationType; /* - * The IPV4 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type - * is IPV4 or DualStack. + * The IPV4 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type is IPV4 or DualStack. */ private String ipv4ConnectedPrefix; /* - * The IPV6 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type - * is IPV6 or DualStack. + * The IPV6 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type is IPV6 or DualStack. */ private String ipv6ConnectedPrefix; @@ -249,8 +247,7 @@ public L3NetworkProperties withIpAllocationType(IpAllocationType ipAllocationTyp /** * Get the ipv4ConnectedPrefix property: The IPV4 prefix (CIDR) assigned to this L3 network. Required when the IP - * allocation type - * is IPV4 or DualStack. + * allocation type is IPV4 or DualStack. * * @return the ipv4ConnectedPrefix value. */ @@ -260,8 +257,7 @@ public String ipv4ConnectedPrefix() { /** * Set the ipv4ConnectedPrefix property: The IPV4 prefix (CIDR) assigned to this L3 network. Required when the IP - * allocation type - * is IPV4 or DualStack. + * allocation type is IPV4 or DualStack. * * @param ipv4ConnectedPrefix the ipv4ConnectedPrefix value to set. * @return the L3NetworkProperties object itself. @@ -273,8 +269,7 @@ public L3NetworkProperties withIpv4ConnectedPrefix(String ipv4ConnectedPrefix) { /** * Get the ipv6ConnectedPrefix property: The IPV6 prefix (CIDR) assigned to this L3 network. Required when the IP - * allocation type - * is IPV6 or DualStack. + * allocation type is IPV6 or DualStack. * * @return the ipv6ConnectedPrefix value. */ @@ -284,8 +279,7 @@ public String ipv6ConnectedPrefix() { /** * Set the ipv6ConnectedPrefix property: The IPV6 prefix (CIDR) assigned to this L3 network. Required when the IP - * allocation type - * is IPV6 or DualStack. + * allocation type is IPV6 or DualStack. * * @param ipv6ConnectedPrefix the ipv6ConnectedPrefix value to set. * @return the L3NetworkProperties object itself. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineInner.java index a3c2b445f16c..946c04ddddc2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineInner.java @@ -431,8 +431,8 @@ public VirtualMachineInner withNetworkAttachments(List<NetworkAttachment> networ } /** - * Get the networkData property: Deprecated: The Base64 encoded cloud-init network data. The networkDataContent - * property will be used in preference to this property. + * Get the networkData property: Field Deprecated: The Base64 encoded cloud-init network data. The + * networkDataContent property will be used in preference to this property. * * @return the networkData value. */ @@ -441,8 +441,8 @@ public String networkData() { } /** - * Set the networkData property: Deprecated: The Base64 encoded cloud-init network data. The networkDataContent - * property will be used in preference to this property. + * Set the networkData property: Field Deprecated: The Base64 encoded cloud-init network data. The + * networkDataContent property will be used in preference to this property. * * @param networkData the networkData value to set. * @return the VirtualMachineInner object itself. @@ -570,8 +570,8 @@ public VirtualMachineInner withStorageProfile(StorageProfile storageProfile) { } /** - * Get the userData property: Deprecated: The Base64 encoded cloud-init user data. The userDataContent property will - * be used in preference to this property. + * Get the userData property: Field Deprecated: The Base64 encoded cloud-init user data. The userDataContent + * property will be used in preference to this property. * * @return the userData value. */ @@ -580,8 +580,8 @@ public String userData() { } /** - * Set the userData property: Deprecated: The Base64 encoded cloud-init user data. The userDataContent property will - * be used in preference to this property. + * Set the userData property: Field Deprecated: The Base64 encoded cloud-init user data. The userDataContent + * property will be used in preference to this property. * * @param userData the userData value to set. * @return the VirtualMachineInner object itself. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineProperties.java index 250e90174768..300a055b4dd7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineProperties.java @@ -98,7 +98,7 @@ public final class VirtualMachineProperties implements JsonSerializable<VirtualM private List<NetworkAttachment> networkAttachments; /* - * Deprecated: The Base64 encoded cloud-init network data. The networkDataContent property will be used in + * Field Deprecated: The Base64 encoded cloud-init network data. The networkDataContent property will be used in * preference to this property. */ private String networkData; @@ -135,8 +135,8 @@ public final class VirtualMachineProperties implements JsonSerializable<VirtualM private StorageProfile storageProfile; /* - * Deprecated: The Base64 encoded cloud-init user data. The userDataContent property will be used in preference to - * this property. + * Field Deprecated: The Base64 encoded cloud-init user data. The userDataContent property will be used in + * preference to this property. */ private String userData; @@ -391,8 +391,8 @@ public VirtualMachineProperties withNetworkAttachments(List<NetworkAttachment> n } /** - * Get the networkData property: Deprecated: The Base64 encoded cloud-init network data. The networkDataContent - * property will be used in preference to this property. + * Get the networkData property: Field Deprecated: The Base64 encoded cloud-init network data. The + * networkDataContent property will be used in preference to this property. * * @return the networkData value. */ @@ -401,8 +401,8 @@ public String networkData() { } /** - * Set the networkData property: Deprecated: The Base64 encoded cloud-init network data. The networkDataContent - * property will be used in preference to this property. + * Set the networkData property: Field Deprecated: The Base64 encoded cloud-init network data. The + * networkDataContent property will be used in preference to this property. * * @param networkData the networkData value to set. * @return the VirtualMachineProperties object itself. @@ -515,8 +515,8 @@ public VirtualMachineProperties withStorageProfile(StorageProfile storageProfile } /** - * Get the userData property: Deprecated: The Base64 encoded cloud-init user data. The userDataContent property will - * be used in preference to this property. + * Get the userData property: Field Deprecated: The Base64 encoded cloud-init user data. The userDataContent + * property will be used in preference to this property. * * @return the userData value. */ @@ -525,8 +525,8 @@ public String userData() { } /** - * Set the userData property: Deprecated: The Base64 encoded cloud-init user data. The userDataContent property will - * be used in preference to this property. + * Set the userData property: Field Deprecated: The Base64 encoded cloud-init user data. The userDataContent + * property will be used in preference to this property. * * @param userData the userData value to set. * @return the VirtualMachineProperties object itself. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachinesClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachinesClientImpl.java index cdc90cc54c6a..0819bf3d4240 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachinesClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachinesClientImpl.java @@ -965,8 +965,8 @@ public BareMetalMachineInner getByResourceGroup(String resourceGroupName, String /** * Create or update the bare metal machine. * - * Create a new bare metal machine or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1018,8 +1018,8 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String /** * Create or update the bare metal machine. * - * Create a new bare metal machine or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1070,8 +1070,8 @@ private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName /** * Create or update the bare metal machine. * - * Create a new bare metal machine or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1123,8 +1123,8 @@ private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName /** * Create or update the bare metal machine. * - * Create a new bare metal machine or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1152,8 +1152,8 @@ private PollerFlux<PollResult<BareMetalMachineInner>, BareMetalMachineInner> beg /** * Create or update the bare metal machine. * - * Create a new bare metal machine or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1178,8 +1178,8 @@ private PollerFlux<PollResult<BareMetalMachineInner>, BareMetalMachineInner> beg /** * Create or update the bare metal machine. * - * Create a new bare metal machine or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1206,8 +1206,8 @@ public SyncPoller<PollResult<BareMetalMachineInner>, BareMetalMachineInner> begi /** * Create or update the bare metal machine. * - * Create a new bare metal machine or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1231,8 +1231,8 @@ public SyncPoller<PollResult<BareMetalMachineInner>, BareMetalMachineInner> begi /** * Create or update the bare metal machine. * - * Create a new bare metal machine or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1260,8 +1260,8 @@ public SyncPoller<PollResult<BareMetalMachineInner>, BareMetalMachineInner> begi /** * Create or update the bare metal machine. * - * Create a new bare metal machine or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1285,8 +1285,8 @@ private Mono<BareMetalMachineInner> createOrUpdateAsync(String resourceGroupName /** * Create or update the bare metal machine. * - * Create a new bare metal machine or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1308,8 +1308,8 @@ private Mono<BareMetalMachineInner> createOrUpdateAsync(String resourceGroupName /** * Create or update the bare metal machine. * - * Create a new bare metal machine or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1331,8 +1331,8 @@ public BareMetalMachineInner createOrUpdate(String resourceGroupName, String bar /** * Create or update the bare metal machine. * - * Create a new bare metal machine or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1357,8 +1357,8 @@ public BareMetalMachineInner createOrUpdate(String resourceGroupName, String bar /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1402,8 +1402,8 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1446,8 +1446,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1491,8 +1491,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1518,8 +1518,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1543,8 +1543,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1569,8 +1569,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1593,8 +1593,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1620,8 +1620,8 @@ public SyncPoller<PollResult<OperationStatusResultInner>, OperationStatusResultI /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1644,8 +1644,8 @@ private Mono<OperationStatusResultInner> deleteAsync(String resourceGroupName, S /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1665,8 +1665,8 @@ private Mono<OperationStatusResultInner> deleteAsync(String resourceGroupName, S /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -1685,8 +1685,8 @@ public OperationStatusResultInner delete(String resourceGroupName, String bareMe /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudImpl.java index 126b94526775..558d849c0045 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudImpl.java @@ -442,7 +442,7 @@ public ConsolesClient getConsoles() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2025-07-01-preview"; + this.apiVersion = "2025-09-01"; this.operations = new OperationsClientImpl(this); this.bareMetalMachines = new BareMetalMachinesClientImpl(this); this.cloudServicesNetworks = new CloudServicesNetworksClientImpl(this); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RacksClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RacksClientImpl.java index fa772e2d7191..90ff55a4dc85 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RacksClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RacksClientImpl.java @@ -699,8 +699,8 @@ public RackInner getByResourceGroup(String resourceGroupName, String rackName) { /** * Create or update the rack. * - * Create a new rack or update properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -749,8 +749,8 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String /** * Create or update the rack. * - * Create a new rack or update properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -801,8 +801,8 @@ private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName /** * Create or update the rack. * - * Create a new rack or update properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -854,8 +854,8 @@ private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName /** * Create or update the rack. * - * Create a new rack or update properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -882,8 +882,8 @@ private PollerFlux<PollResult<RackInner>, RackInner> beginCreateOrUpdateAsync(St /** * Create or update the rack. * - * Create a new rack or update properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -908,8 +908,8 @@ private PollerFlux<PollResult<RackInner>, RackInner> beginCreateOrUpdateAsync(St /** * Create or update the rack. * - * Create a new rack or update properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -935,8 +935,8 @@ public SyncPoller<PollResult<RackInner>, RackInner> beginCreateOrUpdate(String r /** * Create or update the rack. * - * Create a new rack or update properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -960,8 +960,8 @@ public SyncPoller<PollResult<RackInner>, RackInner> beginCreateOrUpdate(String r /** * Create or update the rack. * - * Create a new rack or update properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -988,8 +988,8 @@ public SyncPoller<PollResult<RackInner>, RackInner> beginCreateOrUpdate(String r /** * Create or update the rack. * - * Create a new rack or update properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -1014,8 +1014,8 @@ private Mono<RackInner> createOrUpdateAsync(String resourceGroupName, String rac /** * Create or update the rack. * - * Create a new rack or update properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -1037,8 +1037,8 @@ private Mono<RackInner> createOrUpdateAsync(String resourceGroupName, String rac /** * Create or update the rack. * - * Create a new rack or update properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -1058,8 +1058,8 @@ public RackInner createOrUpdate(String resourceGroupName, String rackName, RackI /** * Create or update the rack. * - * Create a new rack or update properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -1084,8 +1084,8 @@ public RackInner createOrUpdate(String resourceGroupName, String rackName, RackI /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -1127,8 +1127,8 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -1170,8 +1170,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -1214,8 +1214,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -1241,8 +1241,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -1266,8 +1266,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -1291,8 +1291,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -1314,8 +1314,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -1340,8 +1340,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -1364,8 +1364,8 @@ private Mono<OperationStatusResultInner> deleteAsync(String resourceGroupName, S /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -1385,8 +1385,8 @@ private Mono<OperationStatusResultInner> deleteAsync(String resourceGroupName, S /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -1405,8 +1405,8 @@ public OperationStatusResultInner delete(String resourceGroupName, String rackNa /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageAppliancesClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageAppliancesClientImpl.java index e7ec1c04f0bb..51c6fa861cb3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageAppliancesClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageAppliancesClientImpl.java @@ -789,8 +789,8 @@ public StorageApplianceInner getByResourceGroup(String resourceGroupName, String /** * Create or update the storage appliance. * - * Create a new storage appliance or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -842,8 +842,8 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String /** * Create or update the storage appliance. * - * Create a new storage appliance or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -894,8 +894,8 @@ private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName /** * Create or update the storage appliance. * - * Create a new storage appliance or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -947,8 +947,8 @@ private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName /** * Create or update the storage appliance. * - * Create a new storage appliance or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -977,8 +977,8 @@ private PollerFlux<PollResult<StorageApplianceInner>, StorageApplianceInner> beg /** * Create or update the storage appliance. * - * Create a new storage appliance or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1004,8 +1004,8 @@ private PollerFlux<PollResult<StorageApplianceInner>, StorageApplianceInner> beg /** * Create or update the storage appliance. * - * Create a new storage appliance or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1033,8 +1033,8 @@ public SyncPoller<PollResult<StorageApplianceInner>, StorageApplianceInner> begi /** * Create or update the storage appliance. * - * Create a new storage appliance or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1059,8 +1059,8 @@ public SyncPoller<PollResult<StorageApplianceInner>, StorageApplianceInner> begi /** * Create or update the storage appliance. * - * Create a new storage appliance or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1089,8 +1089,8 @@ public SyncPoller<PollResult<StorageApplianceInner>, StorageApplianceInner> begi /** * Create or update the storage appliance. * - * Create a new storage appliance or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1115,8 +1115,8 @@ private Mono<StorageApplianceInner> createOrUpdateAsync(String resourceGroupName /** * Create or update the storage appliance. * - * Create a new storage appliance or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1139,8 +1139,8 @@ private Mono<StorageApplianceInner> createOrUpdateAsync(String resourceGroupName /** * Create or update the storage appliance. * - * Create a new storage appliance or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1162,8 +1162,8 @@ public StorageApplianceInner createOrUpdate(String resourceGroupName, String sto /** * Create or update the storage appliance. * - * Create a new storage appliance or update the properties of the existing one. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1188,8 +1188,8 @@ public StorageApplianceInner createOrUpdate(String resourceGroupName, String sto /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1233,8 +1233,8 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1277,8 +1277,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1322,8 +1322,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1349,8 +1349,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1374,8 +1374,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1400,8 +1400,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1424,8 +1424,8 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1451,8 +1451,8 @@ public SyncPoller<PollResult<OperationStatusResultInner>, OperationStatusResultI /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1475,8 +1475,8 @@ private Mono<OperationStatusResultInner> deleteAsync(String resourceGroupName, S /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1496,8 +1496,8 @@ private Mono<OperationStatusResultInner> deleteAsync(String resourceGroupName, S /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -1516,8 +1516,8 @@ public OperationStatusResultInner delete(String resourceGroupName, String storag /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachine.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachine.java index da83d23cc258..d808434a5209 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachine.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachine.java @@ -689,11 +689,10 @@ interface WithTags { interface WithMachineDetails { /** * Specifies the machineDetails property: The details provided by the customer during the creation of rack - * manifests - * that allows for custom data to be associated with this machine.. + * manifests that allows for custom data to be associated with this machine.. * - * @param machineDetails The details provided by the customer during the creation of rack manifests - * that allows for custom data to be associated with this machine. + * @param machineDetails The details provided by the customer during the creation of rack manifests that + * allows for custom data to be associated with this machine. * @return the next definition stage. */ Update withMachineDetails(String machineDetails); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineConfigurationData.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineConfigurationData.java index 77f2f7f0b593..ae537ebba8ab 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineConfigurationData.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineConfigurationData.java @@ -45,8 +45,8 @@ public final class BareMetalMachineConfigurationData implements JsonSerializable private String machineDetails; /* - * The user-provided name for the bare metal machine created from this specification. - * If not provided, the machine name will be generated programmatically. + * The user-provided name for the bare metal machine created from this specification. If not provided, the machine + * name will be generated programmatically. */ private String machineName; diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePatchParameters.java index 03d2a0733589..e46ad3ac5134 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePatchParameters.java @@ -64,8 +64,8 @@ public BareMetalMachinePatchParameters withTags(Map<String, String> tags) { } /** - * Get the machineDetails property: The details provided by the customer during the creation of rack manifests - * that allows for custom data to be associated with this machine. + * Get the machineDetails property: The details provided by the customer during the creation of rack manifests that + * allows for custom data to be associated with this machine. * * @return the machineDetails value. */ @@ -74,8 +74,8 @@ public String machineDetails() { } /** - * Set the machineDetails property: The details provided by the customer during the creation of rack manifests - * that allows for custom data to be associated with this machine. + * Set the machineDetails property: The details provided by the customer during the creation of rack manifests that + * allows for custom data to be associated with this machine. * * @param machineDetails the machineDetails value to set. * @return the BareMetalMachinePatchParameters object itself. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunCommandParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunCommandParameters.java index a88976c2f472..ca94bc0574ba 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunCommandParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunCommandParameters.java @@ -26,9 +26,9 @@ public final class BareMetalMachineRunCommandParameters private List<String> arguments; /* - * The maximum time the script is allowed to run. - * If the execution time exceeds the maximum, the script will be stopped, any output produced until then will be - * captured, and the exit code matching a timeout will be returned (252). + * The maximum time the script is allowed to run. If the execution time exceeds the maximum, the script will be + * stopped, any output produced until then will be captured, and the exit code matching a timeout will be returned + * (252). */ private long limitTimeSeconds; @@ -66,9 +66,9 @@ public BareMetalMachineRunCommandParameters withArguments(List<String> arguments } /** - * Get the limitTimeSeconds property: The maximum time the script is allowed to run. - * If the execution time exceeds the maximum, the script will be stopped, any output produced until then will be - * captured, and the exit code matching a timeout will be returned (252). + * Get the limitTimeSeconds property: The maximum time the script is allowed to run. If the execution time exceeds + * the maximum, the script will be stopped, any output produced until then will be captured, and the exit code + * matching a timeout will be returned (252). * * @return the limitTimeSeconds value. */ @@ -77,9 +77,9 @@ public long limitTimeSeconds() { } /** - * Set the limitTimeSeconds property: The maximum time the script is allowed to run. - * If the execution time exceeds the maximum, the script will be stopped, any output produced until then will be - * captured, and the exit code matching a timeout will be returned (252). + * Set the limitTimeSeconds property: The maximum time the script is allowed to run. If the execution time exceeds + * the maximum, the script will be stopped, any output produced until then will be captured, and the exit code + * matching a timeout will be returned (252). * * @param limitTimeSeconds the limitTimeSeconds value to set. * @return the BareMetalMachineRunCommandParameters object itself. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunDataExtractsParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunDataExtractsParameters.java index f50305d2b655..9180229f4057 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunDataExtractsParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunDataExtractsParameters.java @@ -26,9 +26,9 @@ public final class BareMetalMachineRunDataExtractsParameters private List<BareMetalMachineCommandSpecification> commands; /* - * The maximum time the commands are allowed to run. - * If the execution time exceeds the maximum, the script will be stopped, any output produced until then will be - * captured, and the exit code matching a timeout will be returned (252). + * The maximum time the commands are allowed to run. If the execution time exceeds the maximum, the script will be + * stopped, any output produced until then will be captured, and the exit code matching a timeout will be returned + * (252). */ private long limitTimeSeconds; @@ -61,9 +61,9 @@ public BareMetalMachineRunDataExtractsParameters withCommands(List<BareMetalMach } /** - * Get the limitTimeSeconds property: The maximum time the commands are allowed to run. - * If the execution time exceeds the maximum, the script will be stopped, any output produced until then will be - * captured, and the exit code matching a timeout will be returned (252). + * Get the limitTimeSeconds property: The maximum time the commands are allowed to run. If the execution time + * exceeds the maximum, the script will be stopped, any output produced until then will be captured, and the exit + * code matching a timeout will be returned (252). * * @return the limitTimeSeconds value. */ @@ -72,9 +72,9 @@ public long limitTimeSeconds() { } /** - * Set the limitTimeSeconds property: The maximum time the commands are allowed to run. - * If the execution time exceeds the maximum, the script will be stopped, any output produced until then will be - * captured, and the exit code matching a timeout will be returned (252). + * Set the limitTimeSeconds property: The maximum time the commands are allowed to run. If the execution time + * exceeds the maximum, the script will be stopped, any output produced until then will be captured, and the exit + * code matching a timeout will be returned (252). * * @param limitTimeSeconds the limitTimeSeconds value to set. * @return the BareMetalMachineRunDataExtractsParameters object itself. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunReadCommandsParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunReadCommandsParameters.java index 48aaaf30fb1f..631f01283d65 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunReadCommandsParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunReadCommandsParameters.java @@ -26,9 +26,9 @@ public final class BareMetalMachineRunReadCommandsParameters private List<BareMetalMachineCommandSpecification> commands; /* - * The maximum time the commands are allowed to run. - * If the execution time exceeds the maximum, the script will be stopped, any output produced until then will be - * captured, and the exit code matching a timeout will be returned (252). + * The maximum time the commands are allowed to run. If the execution time exceeds the maximum, the script will be + * stopped, any output produced until then will be captured, and the exit code matching a timeout will be returned + * (252). */ private long limitTimeSeconds; @@ -59,9 +59,9 @@ public BareMetalMachineRunReadCommandsParameters withCommands(List<BareMetalMach } /** - * Get the limitTimeSeconds property: The maximum time the commands are allowed to run. - * If the execution time exceeds the maximum, the script will be stopped, any output produced until then will be - * captured, and the exit code matching a timeout will be returned (252). + * Get the limitTimeSeconds property: The maximum time the commands are allowed to run. If the execution time + * exceeds the maximum, the script will be stopped, any output produced until then will be captured, and the exit + * code matching a timeout will be returned (252). * * @return the limitTimeSeconds value. */ @@ -70,9 +70,9 @@ public long limitTimeSeconds() { } /** - * Set the limitTimeSeconds property: The maximum time the commands are allowed to run. - * If the execution time exceeds the maximum, the script will be stopped, any output produced until then will be - * captured, and the exit code matching a timeout will be returned (252). + * Set the limitTimeSeconds property: The maximum time the commands are allowed to run. If the execution time + * exceeds the maximum, the script will be stopped, any output produced until then will be captured, and the exit + * code matching a timeout will be returned (252). * * @param limitTimeSeconds the limitTimeSeconds value to set. * @return the BareMetalMachineRunReadCommandsParameters object itself. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachines.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachines.java index d4ff7ed5cd86..fecd1aca011d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachines.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachines.java @@ -107,8 +107,8 @@ Response<BareMetalMachine> getByResourceGroupWithResponse(String resourceGroupNa /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -122,8 +122,8 @@ Response<BareMetalMachine> getByResourceGroupWithResponse(String resourceGroupNa /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -523,8 +523,8 @@ OperationStatusResult runReadCommands(String resourceGroupName, String bareMetal /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -537,8 +537,8 @@ OperationStatusResult runReadCommands(String resourceGroupName, String bareMetal /** * Delete the bare metal machine. * - * Delete the provided bare metal machine. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param id the resource ID. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Cluster.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Cluster.java index 03ef614cab6e..e493d65812cb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Cluster.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Cluster.java @@ -167,8 +167,8 @@ public interface Cluster { String clusterManagerId(); /** - * Gets the clusterServicePrincipal property: Deprecated: Use managed identity to provide cluster privileges. The - * service principal to be used by the cluster during Arc Appliance installation. + * Gets the clusterServicePrincipal property: Field Deprecated: Use managed identity to provide cluster privileges. + * The service principal to be used by the cluster during Arc Appliance installation. * * @return the clusterServicePrincipal value. */ @@ -570,10 +570,10 @@ interface WithClusterLocation { */ interface WithClusterServicePrincipal { /** - * Specifies the clusterServicePrincipal property: Deprecated: Use managed identity to provide cluster + * Specifies the clusterServicePrincipal property: Field Deprecated: Use managed identity to provide cluster * privileges. The service principal to be used by the cluster during Arc Appliance installation.. * - * @param clusterServicePrincipal Deprecated: Use managed identity to provide cluster privileges. The + * @param clusterServicePrincipal Field Deprecated: Use managed identity to provide cluster privileges. The * service principal to be used by the cluster during Arc Appliance installation. * @return the next definition stage. */ @@ -616,11 +616,10 @@ interface WithComputeDeploymentThreshold { interface WithComputeRackDefinitions { /** * Specifies the computeRackDefinitions property: The list of rack definitions for the compute racks in a - * multi-rack - * cluster, or an empty list in a single-rack cluster.. + * multi-rack cluster, or an empty list in a single-rack cluster.. * - * @param computeRackDefinitions The list of rack definitions for the compute racks in a multi-rack - * cluster, or an empty list in a single-rack cluster. + * @param computeRackDefinitions The list of rack definitions for the compute racks in a multi-rack cluster, + * or an empty list in a single-rack cluster. * @return the next definition stage. */ WithCreate withComputeRackDefinitions(List<RackDefinition> computeRackDefinitions); @@ -858,10 +857,10 @@ interface WithClusterLocation { */ interface WithClusterServicePrincipal { /** - * Specifies the clusterServicePrincipal property: Deprecated: Use managed identity to provide cluster + * Specifies the clusterServicePrincipal property: Field Deprecated: Use managed identity to provide cluster * privileges. The service principal to be used by the cluster during Arc Appliance installation.. * - * @param clusterServicePrincipal Deprecated: Use managed identity to provide cluster privileges. The + * @param clusterServicePrincipal Field Deprecated: Use managed identity to provide cluster privileges. The * service principal to be used by the cluster during Arc Appliance installation. * @return the next definition stage. */ @@ -904,11 +903,10 @@ interface WithComputeDeploymentThreshold { interface WithComputeRackDefinitions { /** * Specifies the computeRackDefinitions property: The list of rack definitions for the compute racks in a - * multi-rack - * cluster, or an empty list in a single-rack cluster.. + * multi-rack cluster, or an empty list in a single-rack cluster.. * - * @param computeRackDefinitions The list of rack definitions for the compute racks in a multi-rack - * cluster, or an empty list in a single-rack cluster. + * @param computeRackDefinitions The list of rack definitions for the compute racks in a multi-rack cluster, + * or an empty list in a single-rack cluster. * @return the next definition stage. */ Update withComputeRackDefinitions(List<RackDefinition> computeRackDefinitions); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterPatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterPatchParameters.java index 459cc50e0890..0d2d5cd25cbe 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterPatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterPatchParameters.java @@ -166,8 +166,8 @@ public ClusterPatchParameters withClusterLocation(String clusterLocation) { } /** - * Get the clusterServicePrincipal property: Deprecated: Use managed identity to provide cluster privileges. The - * service principal to be used by the cluster during Arc Appliance installation. + * Get the clusterServicePrincipal property: Field Deprecated: Use managed identity to provide cluster privileges. + * The service principal to be used by the cluster during Arc Appliance installation. * * @return the clusterServicePrincipal value. */ @@ -176,8 +176,8 @@ public ServicePrincipalInformation clusterServicePrincipal() { } /** - * Set the clusterServicePrincipal property: Deprecated: Use managed identity to provide cluster privileges. The - * service principal to be used by the cluster during Arc Appliance installation. + * Set the clusterServicePrincipal property: Field Deprecated: Use managed identity to provide cluster privileges. + * The service principal to be used by the cluster during Arc Appliance installation. * * @param clusterServicePrincipal the clusterServicePrincipal value to set. * @return the ClusterPatchParameters object itself. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateStrategy.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateStrategy.java index d1a6f1ac4f33..5ee400264a93 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateStrategy.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateStrategy.java @@ -51,8 +51,8 @@ public ClusterUpdateStrategy() { /** * Get the maxUnavailable property: The maximum number of worker nodes that can be offline within the increment of - * update, e.g., rack-by-rack. - * Limited by the maximum number of machines in the increment. Defaults to the whole increment size. + * update, e.g., rack-by-rack. Limited by the maximum number of machines in the increment. Defaults to the whole + * increment size. * * @return the maxUnavailable value. */ @@ -62,8 +62,8 @@ public Long maxUnavailable() { /** * Set the maxUnavailable property: The maximum number of worker nodes that can be offline within the increment of - * update, e.g., rack-by-rack. - * Limited by the maximum number of machines in the increment. Defaults to the whole increment size. + * update, e.g., rack-by-rack. Limited by the maximum number of machines in the increment. Defaults to the whole + * increment size. * * @param maxUnavailable the maxUnavailable value to set. * @return the ClusterUpdateStrategy object itself. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputType.java index 2b429dc1b041..3e1f2dac2280 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputType.java @@ -33,6 +33,12 @@ public final class CommandOutputType extends ExpandableStringEnum<CommandOutputT */ public static final CommandOutputType STORAGE_RUN_READ_COMMANDS = fromString("StorageRunReadCommands"); + /** + * Static value BareMetalMachineRunDataExtractsRestricted for CommandOutputType. + */ + public static final CommandOutputType BARE_METAL_MACHINE_RUN_DATA_EXTRACTS_RESTRICTED + = fromString("BareMetalMachineRunDataExtractsRestricted"); + /** * Creates a new instance of CommandOutputType value. * diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DefaultGateway.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DefaultGateway.java index fa8f92efb45b..c0aafcedda68 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DefaultGateway.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DefaultGateway.java @@ -8,9 +8,8 @@ import java.util.Collection; /** - * The indicator of whether this is the default gateway. - * Only one of the attached networks (including the CloudServicesNetwork attachment) for a single machine may be - * specified as True. + * The indicator of whether this is the default gateway. Only one of the attached networks (including the + * CloudServicesNetwork attachment) for a single machine may be specified as True. */ public final class DefaultGateway extends ExpandableStringEnum<DefaultGateway> { /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3Network.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3Network.java index 138c59d299b1..be121b151ab4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3Network.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3Network.java @@ -142,8 +142,7 @@ public interface L3Network { /** * Gets the ipv4ConnectedPrefix property: The IPV4 prefix (CIDR) assigned to this L3 network. Required when the IP - * allocation type - * is IPV4 or DualStack. + * allocation type is IPV4 or DualStack. * * @return the ipv4ConnectedPrefix value. */ @@ -151,8 +150,7 @@ public interface L3Network { /** * Gets the ipv6ConnectedPrefix property: The IPV6 prefix (CIDR) assigned to this L3 network. Required when the IP - * allocation type - * is IPV6 or DualStack. + * allocation type is IPV6 or DualStack. * * @return the ipv6ConnectedPrefix value. */ @@ -413,12 +411,10 @@ interface WithIpAllocationType { interface WithIpv4ConnectedPrefix { /** * Specifies the ipv4ConnectedPrefix property: The IPV4 prefix (CIDR) assigned to this L3 network. Required - * when the IP allocation type - * is IPV4 or DualStack.. + * when the IP allocation type is IPV4 or DualStack.. * * @param ipv4ConnectedPrefix The IPV4 prefix (CIDR) assigned to this L3 network. Required when the IP - * allocation type - * is IPV4 or DualStack. + * allocation type is IPV4 or DualStack. * @return the next definition stage. */ WithCreate withIpv4ConnectedPrefix(String ipv4ConnectedPrefix); @@ -430,12 +426,10 @@ interface WithIpv4ConnectedPrefix { interface WithIpv6ConnectedPrefix { /** * Specifies the ipv6ConnectedPrefix property: The IPV6 prefix (CIDR) assigned to this L3 network. Required - * when the IP allocation type - * is IPV6 or DualStack.. + * when the IP allocation type is IPV6 or DualStack.. * * @param ipv6ConnectedPrefix The IPV6 prefix (CIDR) assigned to this L3 network. Required when the IP - * allocation type - * is IPV6 or DualStack. + * allocation type is IPV6 or DualStack. * @return the next definition stage. */ WithCreate withIpv6ConnectedPrefix(String ipv6ConnectedPrefix); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkAttachment.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkAttachment.java index 8184d2325dd0..ba5cd757d3d7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkAttachment.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkAttachment.java @@ -18,49 +18,36 @@ @Fluent public final class NetworkAttachment implements JsonSerializable<NetworkAttachment> { /* - * The resource ID of the associated network attached to the virtual machine. - * It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources. + * The resource ID of the associated network attached to the virtual machine. It can be one of cloudServicesNetwork, + * l3Network, l2Network or trunkedNetwork resources. */ private String attachedNetworkId; /* - * The indicator of whether this is the default gateway. - * Only one of the attached networks (including the CloudServicesNetwork attachment) for a single machine may be - * specified as True. + * The indicator of whether this is the default gateway. Only one of the attached networks (including the + * CloudServicesNetwork attachment) for a single machine may be specified as True. */ private DefaultGateway defaultGateway; /* - * The IP allocation mechanism for the virtual machine. - * Dynamic and Static are only valid for l3Network which may also specify Disabled. - * Otherwise, Disabled is the only permitted value. + * The IP allocation mechanism for the virtual machine. Dynamic and Static are only valid for l3Network which may + * also specify Disabled. Otherwise, Disabled is the only permitted value. */ private VirtualMachineIpAllocationMethod ipAllocationMethod; /* - * The IPv4 address of the virtual machine. - * - * This field is used only if the attached network has IPAllocationType of IPV4 or DualStack. - * - * If IPAllocationMethod is: - * Static - this field must contain a user specified IPv4 address from within the subnet specified in the attached - * network. - * Dynamic - this field is read-only, but will be populated with an address from within the subnet specified in the - * attached network. - * Disabled - this field will be empty. + * The IPv4 address of the virtual machine. This field is used only if the attached network has IPAllocationType of + * IPV4 or DualStack. If IPAllocationMethod is: Static - this field must contain a user specified IPv4 address from + * within the subnet specified in the attached network. Dynamic - this field is read-only, but will be populated + * with an address from within the subnet specified in the attached network. Disabled - this field will be empty. */ private String ipv4Address; /* - * The IPv6 address of the virtual machine. - * - * This field is used only if the attached network has IPAllocationType of IPV6 or DualStack. - * - * If IPAllocationMethod is: - * Static - this field must contain an IPv6 address range from within the range specified in the attached network. - * Dynamic - this field is read-only, but will be populated with an range from within the subnet specified in the - * attached network. - * Disabled - this field will be empty. + * The IPv6 address of the virtual machine. This field is used only if the attached network has IPAllocationType of + * IPV6 or DualStack. If IPAllocationMethod is: Static - this field must contain an IPv6 address range from within + * the range specified in the attached network. Dynamic - this field is read-only, but will be populated with an + * range from within the subnet specified in the attached network. Disabled - this field will be empty. */ private String ipv6Address; @@ -70,11 +57,10 @@ public final class NetworkAttachment implements JsonSerializable<NetworkAttachme private String macAddress; /* - * The associated network's interface name. - * If specified, the network attachment name has a maximum length of 15 characters and must be unique to this - * virtual machine. - * If the user doesn’t specify this value, the default interface name of the network resource will be used. - * For a CloudServicesNetwork resource, this name will be ignored. + * The associated network's interface name. If specified, the network attachment name has a maximum length of 15 + * characters and must be unique to this virtual machine. If the user doesn’t specify this value, the default + * interface name of the network resource will be used. For a CloudServicesNetwork resource, this name will be + * ignored. */ private String networkAttachmentName; @@ -85,8 +71,8 @@ public NetworkAttachment() { } /** - * Get the attachedNetworkId property: The resource ID of the associated network attached to the virtual machine. - * It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources. + * Get the attachedNetworkId property: The resource ID of the associated network attached to the virtual machine. It + * can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources. * * @return the attachedNetworkId value. */ @@ -95,8 +81,8 @@ public String attachedNetworkId() { } /** - * Set the attachedNetworkId property: The resource ID of the associated network attached to the virtual machine. - * It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources. + * Set the attachedNetworkId property: The resource ID of the associated network attached to the virtual machine. It + * can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources. * * @param attachedNetworkId the attachedNetworkId value to set. * @return the NetworkAttachment object itself. @@ -107,9 +93,8 @@ public NetworkAttachment withAttachedNetworkId(String attachedNetworkId) { } /** - * Get the defaultGateway property: The indicator of whether this is the default gateway. - * Only one of the attached networks (including the CloudServicesNetwork attachment) for a single machine may be - * specified as True. + * Get the defaultGateway property: The indicator of whether this is the default gateway. Only one of the attached + * networks (including the CloudServicesNetwork attachment) for a single machine may be specified as True. * * @return the defaultGateway value. */ @@ -118,9 +103,8 @@ public DefaultGateway defaultGateway() { } /** - * Set the defaultGateway property: The indicator of whether this is the default gateway. - * Only one of the attached networks (including the CloudServicesNetwork attachment) for a single machine may be - * specified as True. + * Set the defaultGateway property: The indicator of whether this is the default gateway. Only one of the attached + * networks (including the CloudServicesNetwork attachment) for a single machine may be specified as True. * * @param defaultGateway the defaultGateway value to set. * @return the NetworkAttachment object itself. @@ -131,9 +115,8 @@ public NetworkAttachment withDefaultGateway(DefaultGateway defaultGateway) { } /** - * Get the ipAllocationMethod property: The IP allocation mechanism for the virtual machine. - * Dynamic and Static are only valid for l3Network which may also specify Disabled. - * Otherwise, Disabled is the only permitted value. + * Get the ipAllocationMethod property: The IP allocation mechanism for the virtual machine. Dynamic and Static are + * only valid for l3Network which may also specify Disabled. Otherwise, Disabled is the only permitted value. * * @return the ipAllocationMethod value. */ @@ -142,9 +125,8 @@ public VirtualMachineIpAllocationMethod ipAllocationMethod() { } /** - * Set the ipAllocationMethod property: The IP allocation mechanism for the virtual machine. - * Dynamic and Static are only valid for l3Network which may also specify Disabled. - * Otherwise, Disabled is the only permitted value. + * Set the ipAllocationMethod property: The IP allocation mechanism for the virtual machine. Dynamic and Static are + * only valid for l3Network which may also specify Disabled. Otherwise, Disabled is the only permitted value. * * @param ipAllocationMethod the ipAllocationMethod value to set. * @return the NetworkAttachment object itself. @@ -155,15 +137,10 @@ public NetworkAttachment withIpAllocationMethod(VirtualMachineIpAllocationMethod } /** - * Get the ipv4Address property: The IPv4 address of the virtual machine. - * - * This field is used only if the attached network has IPAllocationType of IPV4 or DualStack. - * - * If IPAllocationMethod is: - * Static - this field must contain a user specified IPv4 address from within the subnet specified in the attached - * network. - * Dynamic - this field is read-only, but will be populated with an address from within the subnet specified in the - * attached network. + * Get the ipv4Address property: The IPv4 address of the virtual machine. This field is used only if the attached + * network has IPAllocationType of IPV4 or DualStack. If IPAllocationMethod is: Static - this field must contain a + * user specified IPv4 address from within the subnet specified in the attached network. Dynamic - this field is + * read-only, but will be populated with an address from within the subnet specified in the attached network. * Disabled - this field will be empty. * * @return the ipv4Address value. @@ -173,15 +150,10 @@ public String ipv4Address() { } /** - * Set the ipv4Address property: The IPv4 address of the virtual machine. - * - * This field is used only if the attached network has IPAllocationType of IPV4 or DualStack. - * - * If IPAllocationMethod is: - * Static - this field must contain a user specified IPv4 address from within the subnet specified in the attached - * network. - * Dynamic - this field is read-only, but will be populated with an address from within the subnet specified in the - * attached network. + * Set the ipv4Address property: The IPv4 address of the virtual machine. This field is used only if the attached + * network has IPAllocationType of IPV4 or DualStack. If IPAllocationMethod is: Static - this field must contain a + * user specified IPv4 address from within the subnet specified in the attached network. Dynamic - this field is + * read-only, but will be populated with an address from within the subnet specified in the attached network. * Disabled - this field will be empty. * * @param ipv4Address the ipv4Address value to set. @@ -193,15 +165,11 @@ public NetworkAttachment withIpv4Address(String ipv4Address) { } /** - * Get the ipv6Address property: The IPv6 address of the virtual machine. - * - * This field is used only if the attached network has IPAllocationType of IPV6 or DualStack. - * - * If IPAllocationMethod is: - * Static - this field must contain an IPv6 address range from within the range specified in the attached network. - * Dynamic - this field is read-only, but will be populated with an range from within the subnet specified in the - * attached network. - * Disabled - this field will be empty. + * Get the ipv6Address property: The IPv6 address of the virtual machine. This field is used only if the attached + * network has IPAllocationType of IPV6 or DualStack. If IPAllocationMethod is: Static - this field must contain an + * IPv6 address range from within the range specified in the attached network. Dynamic - this field is read-only, + * but will be populated with an range from within the subnet specified in the attached network. Disabled - this + * field will be empty. * * @return the ipv6Address value. */ @@ -210,15 +178,11 @@ public String ipv6Address() { } /** - * Set the ipv6Address property: The IPv6 address of the virtual machine. - * - * This field is used only if the attached network has IPAllocationType of IPV6 or DualStack. - * - * If IPAllocationMethod is: - * Static - this field must contain an IPv6 address range from within the range specified in the attached network. - * Dynamic - this field is read-only, but will be populated with an range from within the subnet specified in the - * attached network. - * Disabled - this field will be empty. + * Set the ipv6Address property: The IPv6 address of the virtual machine. This field is used only if the attached + * network has IPAllocationType of IPV6 or DualStack. If IPAllocationMethod is: Static - this field must contain an + * IPv6 address range from within the range specified in the attached network. Dynamic - this field is read-only, + * but will be populated with an range from within the subnet specified in the attached network. Disabled - this + * field will be empty. * * @param ipv6Address the ipv6Address value to set. * @return the NetworkAttachment object itself. @@ -239,11 +203,10 @@ public String macAddress() { } /** - * Get the networkAttachmentName property: The associated network's interface name. - * If specified, the network attachment name has a maximum length of 15 characters and must be unique to this - * virtual machine. - * If the user doesn’t specify this value, the default interface name of the network resource will be used. - * For a CloudServicesNetwork resource, this name will be ignored. + * Get the networkAttachmentName property: The associated network's interface name. If specified, the network + * attachment name has a maximum length of 15 characters and must be unique to this virtual machine. If the user + * doesn’t specify this value, the default interface name of the network resource will be used. For a + * CloudServicesNetwork resource, this name will be ignored. * * @return the networkAttachmentName value. */ @@ -252,11 +215,10 @@ public String networkAttachmentName() { } /** - * Set the networkAttachmentName property: The associated network's interface name. - * If specified, the network attachment name has a maximum length of 15 characters and must be unique to this - * virtual machine. - * If the user doesn’t specify this value, the default interface name of the network resource will be used. - * For a CloudServicesNetwork resource, this name will be ignored. + * Set the networkAttachmentName property: The associated network's interface name. If specified, the network + * attachment name has a maximum length of 15 characters and must be unique to this virtual machine. If the user + * doesn’t specify this value, the default interface name of the network resource will be used. For a + * CloudServicesNetwork resource, this name will be ignored. * * @param networkAttachmentName the networkAttachmentName value to set. * @return the NetworkAttachment object itself. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Racks.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Racks.java index 623bfcc677d9..1242e0ccf7ad 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Racks.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Racks.java @@ -101,8 +101,8 @@ public interface Racks { /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -116,8 +116,8 @@ public interface Racks { /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -164,8 +164,8 @@ OperationStatusResult delete(String resourceGroupName, String rackName, String i /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -178,8 +178,8 @@ OperationStatusResult delete(String resourceGroupName, String rackName, String i /** * Delete the rack. * - * Delete the provided rack. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param id the resource ID. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageAppliances.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageAppliances.java index dffb0cc74edb..4a92ce9f620d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageAppliances.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageAppliances.java @@ -107,8 +107,8 @@ Response<StorageAppliance> getByResourceGroupWithResponse(String resourceGroupNa /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -122,8 +122,8 @@ Response<StorageAppliance> getByResourceGroupWithResponse(String resourceGroupNa /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -265,8 +265,8 @@ OperationStatusResult runReadCommands(String resourceGroupName, String storageAp /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -279,8 +279,8 @@ OperationStatusResult runReadCommands(String resourceGroupName, String storageAp /** * Delete the storage appliance. * - * Delete the provided storage appliance. - * All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param id the resource ID. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachine.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachine.java index 9c885eedda66..d5399bef8f4d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachine.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachine.java @@ -173,8 +173,8 @@ public interface VirtualMachine { List<NetworkAttachment> networkAttachments(); /** - * Gets the networkData property: Deprecated: The Base64 encoded cloud-init network data. The networkDataContent - * property will be used in preference to this property. + * Gets the networkData property: Field Deprecated: The Base64 encoded cloud-init network data. The + * networkDataContent property will be used in preference to this property. * * @return the networkData value. */ @@ -225,8 +225,8 @@ public interface VirtualMachine { StorageProfile storageProfile(); /** - * Gets the userData property: Deprecated: The Base64 encoded cloud-init user data. The userDataContent property - * will be used in preference to this property. + * Gets the userData property: Field Deprecated: The Base64 encoded cloud-init user data. The userDataContent + * property will be used in preference to this property. * * @return the userData value. */ @@ -575,10 +575,10 @@ interface WithNetworkAttachments { */ interface WithNetworkData { /** - * Specifies the networkData property: Deprecated: The Base64 encoded cloud-init network data. The + * Specifies the networkData property: Field Deprecated: The Base64 encoded cloud-init network data. The * networkDataContent property will be used in preference to this property.. * - * @param networkData Deprecated: The Base64 encoded cloud-init network data. The networkDataContent + * @param networkData Field Deprecated: The Base64 encoded cloud-init network data. The networkDataContent * property will be used in preference to this property. * @return the next definition stage. */ @@ -631,11 +631,11 @@ interface WithSshPublicKeys { */ interface WithUserData { /** - * Specifies the userData property: Deprecated: The Base64 encoded cloud-init user data. The userDataContent - * property will be used in preference to this property.. + * Specifies the userData property: Field Deprecated: The Base64 encoded cloud-init user data. The + * userDataContent property will be used in preference to this property.. * - * @param userData Deprecated: The Base64 encoded cloud-init user data. The userDataContent property will be - * used in preference to this property. + * @param userData Field Deprecated: The Base64 encoded cloud-init user data. The userDataContent property + * will be used in preference to this property. * @return the next definition stage. */ WithCreate withUserData(String userData); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineIpAllocationMethod.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineIpAllocationMethod.java index 1248dcd33285..8eba9ca8a35f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineIpAllocationMethod.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineIpAllocationMethod.java @@ -8,9 +8,8 @@ import java.util.Collection; /** - * The IP allocation mechanism for the virtual machine. - * Dynamic and Static are only valid for l3Network which may also specify Disabled. - * Otherwise, Disabled is the only permitted value. + * The IP allocation mechanism for the virtual machine. Dynamic and Static are only valid for l3Network which may also + * specify Disabled. Otherwise, Disabled is the only permitted value. */ public final class VirtualMachineIpAllocationMethod extends ExpandableStringEnum<VirtualMachineIpAllocationMethod> { /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsCreateOrUpdateSamples.java index d1a3ba7b2f35..d1d667efac17 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsCreateOrUpdateSamples.java @@ -28,8 +28,8 @@ public final class AgentPoolsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * AgentPools_Create.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Create. + * json */ /** * Sample code: Create or update Kubernetes cluster agent pool. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsDeleteSamples.java index 2036ac86df8f..f1ef9def29c3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsDeleteSamples.java @@ -10,8 +10,8 @@ public final class AgentPoolsDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * AgentPools_Delete.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Delete. + * json */ /** * Sample code: Delete Kubernetes cluster agent pool. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsGetSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsGetSamples.java index 168d5527a0d1..fb98527ade53 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsGetSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsGetSamples.java @@ -10,8 +10,7 @@ public final class AgentPoolsGetSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * AgentPools_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Get.json */ /** * Sample code: Get Kubernetes cluster agent pool. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsListByKubernetesClusterSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsListByKubernetesClusterSamples.java index 728ab7b66eae..344a484900ce 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsListByKubernetesClusterSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsListByKubernetesClusterSamples.java @@ -10,7 +10,7 @@ public final class AgentPoolsListByKubernetesClusterSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * AgentPools_ListByKubernetesCluster.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsUpdateSamples.java index 87df846dd441..a2ac10145b24 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsUpdateSamples.java @@ -18,8 +18,8 @@ public final class AgentPoolsUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * AgentPools_Patch.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Patch. + * json */ /** * Sample code: Patch Kubernetes cluster agent pool. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsCreateOrUpdateSamples.java index 4ff3ccbba915..13ae5b5611f4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsCreateOrUpdateSamples.java @@ -19,7 +19,7 @@ public final class BareMetalMachineKeySetsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachineKeySets_Create.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsDeleteSamples.java index c57cf8dcd05c..38b952c43da8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsDeleteSamples.java @@ -10,7 +10,7 @@ public final class BareMetalMachineKeySetsDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachineKeySets_Delete.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsGetSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsGetSamples.java index afb68431b326..19e5b70a05da 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsGetSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsGetSamples.java @@ -10,7 +10,7 @@ public final class BareMetalMachineKeySetsGetSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachineKeySets_Get.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsListByClusterSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsListByClusterSamples.java index bf2b9c08c46c..1bd24f9fc0dc 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsListByClusterSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsListByClusterSamples.java @@ -10,7 +10,7 @@ public final class BareMetalMachineKeySetsListByClusterSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachineKeySets_ListByCluster.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsUpdateSamples.java index 0079daa82771..e46bd184e110 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsUpdateSamples.java @@ -18,7 +18,7 @@ public final class BareMetalMachineKeySetsUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachineKeySets_Patch.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesCordonSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesCordonSamples.java index 4873feb9a70f..477ed4c154c3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesCordonSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesCordonSamples.java @@ -13,7 +13,7 @@ public final class BareMetalMachinesCordonSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Cordon.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesCreateOrUpdateSamples.java index 43abc78ae5ca..1ff09840703b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ public final class BareMetalMachinesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Create.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesDeleteSamples.java index ac82749e74dd..3c576b40265b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesDeleteSamples.java @@ -10,7 +10,7 @@ public final class BareMetalMachinesDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Delete.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesGetByResourceGroupSamples.java index dc7f55922c8a..fa01fe0092ac 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class BareMetalMachinesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Get.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesListByResourceGroupSamples.java index d1a57dc12509..ed48a193e590 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class BareMetalMachinesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_ListByResourceGroup.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesListSamples.java index 8fe401c679b1..2f1f608c212c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesListSamples.java @@ -10,7 +10,7 @@ public final class BareMetalMachinesListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_ListBySubscription.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesPowerOffSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesPowerOffSamples.java index 29a7b9e129e1..c4cc1a115b24 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesPowerOffSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesPowerOffSamples.java @@ -13,7 +13,7 @@ public final class BareMetalMachinesPowerOffSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_PowerOff.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesReimageSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesReimageSamples.java index e760a75dc6aa..47162ed962eb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesReimageSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesReimageSamples.java @@ -10,7 +10,7 @@ public final class BareMetalMachinesReimageSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Reimage.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesReplaceSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesReplaceSamples.java index e297f894dd44..2d9a5414bfab 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesReplaceSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesReplaceSamples.java @@ -15,7 +15,7 @@ public final class BareMetalMachinesReplaceSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Replace.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRestartSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRestartSamples.java index ce5fbacc8128..60fa5862721c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRestartSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRestartSamples.java @@ -10,7 +10,7 @@ public final class BareMetalMachinesRestartSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Restart.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunCommandSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunCommandSamples.java index 1c48ca721627..d5efe0977d52 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunCommandSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunCommandSamples.java @@ -13,7 +13,7 @@ public final class BareMetalMachinesRunCommandSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_RunCommand.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunDataExtractsRestrictedSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunDataExtractsRestrictedSamples.java index 1e88a2c268df..dae9fd483af7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunDataExtractsRestrictedSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunDataExtractsRestrictedSamples.java @@ -14,7 +14,7 @@ public final class BareMetalMachinesRunDataExtractsRestrictedSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_RunDataExtractsRestricted.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunDataExtractsSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunDataExtractsSamples.java index d8d2a078c277..65eb28b0d0ba 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunDataExtractsSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunDataExtractsSamples.java @@ -14,7 +14,7 @@ public final class BareMetalMachinesRunDataExtractsSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_RunDataExtracts.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunReadCommandsSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunReadCommandsSamples.java index c0f1af7a9cad..b5a944d8de99 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunReadCommandsSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunReadCommandsSamples.java @@ -14,7 +14,7 @@ public final class BareMetalMachinesRunReadCommandsSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_RunReadCommands_Hostname.json */ /** @@ -34,7 +34,7 @@ public static void runAndRetrieveOutputFromASingleReadOnlyCommandOnBareMetalMach /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_RunReadCommands_Multiple.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesStartSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesStartSamples.java index 858703a4ece2..aeb937e8003e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesStartSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesStartSamples.java @@ -10,7 +10,7 @@ public final class BareMetalMachinesStartSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Start.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesUncordonSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesUncordonSamples.java index 084307cbab0a..c70045a471a1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesUncordonSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesUncordonSamples.java @@ -10,7 +10,7 @@ public final class BareMetalMachinesUncordonSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Uncordon.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesUpdateSamples.java index ddc97d1884cf..24fa957e129b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesUpdateSamples.java @@ -14,7 +14,7 @@ public final class BareMetalMachinesUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BareMetalMachines_Patch.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsCreateOrUpdateSamples.java index 2fc960c3d77d..187041ad82d9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsCreateOrUpdateSamples.java @@ -19,8 +19,8 @@ public final class BmcKeySetsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * BmcKeySets_Create.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Create. + * json */ /** * Sample code: Create or update baseboard management controller key set of cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsDeleteSamples.java index e0d0f3868522..d0041cf7822e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsDeleteSamples.java @@ -10,8 +10,8 @@ public final class BmcKeySetsDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * BmcKeySets_Delete.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Delete. + * json */ /** * Sample code: Delete baseboard management controller key set of cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsGetSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsGetSamples.java index 26c65ef00a81..7f5d49f3e608 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsGetSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsGetSamples.java @@ -10,8 +10,7 @@ public final class BmcKeySetsGetSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * BmcKeySets_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Get.json */ /** * Sample code: Get baseboard management controller key set of cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsListByClusterSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsListByClusterSamples.java index 611694a4c2b6..68fbf2083a93 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsListByClusterSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsListByClusterSamples.java @@ -10,7 +10,7 @@ public final class BmcKeySetsListByClusterSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * BmcKeySets_ListByCluster.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsUpdateSamples.java index 99de7ccff1cd..60e8614d2cbc 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsUpdateSamples.java @@ -18,8 +18,8 @@ public final class BmcKeySetsUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * BmcKeySets_Patch.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Patch. + * json */ /** * Sample code: Patch baseboard management controller key set of cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksCreateOrUpdateSamples.java index 9c469510d149..a4ebd34815f3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksCreateOrUpdateSamples.java @@ -20,7 +20,7 @@ public final class CloudServicesNetworksCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * CloudServicesNetworks_Create.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksDeleteSamples.java index 8c1bf533f3cc..4e6b32edbbba 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksDeleteSamples.java @@ -10,7 +10,7 @@ public final class CloudServicesNetworksDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * CloudServicesNetworks_Delete.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksGetByResourceGroupSamples.java index f0678ea6770e..22527e99c5d4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class CloudServicesNetworksGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * CloudServicesNetworks_Get.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListByResourceGroupSamples.java index 2563ba09f88f..84e4ac60ba1a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class CloudServicesNetworksListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * CloudServicesNetworks_ListByResourceGroup.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListSamples.java index db400aff9d70..90247e4d991d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListSamples.java @@ -10,7 +10,7 @@ public final class CloudServicesNetworksListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * CloudServicesNetworks_ListBySubscription.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksUpdateSamples.java index 8ee4d9e37b09..b76ab2ca7a1f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksUpdateSamples.java @@ -20,7 +20,7 @@ public final class CloudServicesNetworksUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * CloudServicesNetworks_Patch.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersCreateOrUpdateSamples.java index 4dc2e459b546..42daef5d57d0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersCreateOrUpdateSamples.java @@ -17,7 +17,7 @@ public final class ClusterManagersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterManagers_Create.json */ /** @@ -44,7 +44,7 @@ public final class ClusterManagersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterManagers_Create_Uami.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersDeleteSamples.java index c0a30e77f002..69e6f6c53fa2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersDeleteSamples.java @@ -10,7 +10,7 @@ public final class ClusterManagersDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterManagers_Delete.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersGetByResourceGroupSamples.java index ed86d6dd21d9..b76f5b1305eb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersGetByResourceGroupSamples.java @@ -10,8 +10,8 @@ public final class ClusterManagersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * ClusterManagers_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Get + * .json */ /** * Sample code: Get cluster manager. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListByResourceGroupSamples.java index a676dba97ea8..359719ce9f2c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ClusterManagersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterManagers_ListByResourceGroup.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListSamples.java index 69f8ed2ea907..859ca579b1ca 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListSamples.java @@ -10,7 +10,7 @@ public final class ClusterManagersListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterManagers_ListBySubscription.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersUpdateSamples.java index bd154ca2c948..0c9f9904fd0a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersUpdateSamples.java @@ -17,7 +17,7 @@ public final class ClusterManagersUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterManagers_Patch.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersContinueUpdateVersionSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersContinueUpdateVersionSamples.java index aaa3e5e0f62c..29ef7cf93e6f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersContinueUpdateVersionSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersContinueUpdateVersionSamples.java @@ -13,7 +13,7 @@ public final class ClustersContinueUpdateVersionSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_ContinueUpdateVersion.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersCreateOrUpdateSamples.java index b3297321ff91..c7b6cb0e9b32 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersCreateOrUpdateSamples.java @@ -40,8 +40,8 @@ public final class ClustersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Clusters_Create.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Create. + * json */ /** * Sample code: Create or update cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersDeleteSamples.java index 1fa1f713ae55..332118bb4a0f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersDeleteSamples.java @@ -10,8 +10,8 @@ public final class ClustersDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Clusters_Delete.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Delete. + * json */ /** * Sample code: Delete cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersDeploySamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersDeploySamples.java index 90af4d79e9f1..094261aa0fd0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersDeploySamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersDeploySamples.java @@ -13,8 +13,8 @@ public final class ClustersDeploySamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Clusters_Deploy.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Deploy. + * json */ /** * Sample code: Deploy cluster. @@ -29,7 +29,7 @@ public static void deployCluster(com.azure.resourcemanager.networkcloud.NetworkC /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Deploy_SkipValidation.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersGetByResourceGroupSamples.java index 19176c8db6bf..992467693853 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersGetByResourceGroupSamples.java @@ -10,8 +10,7 @@ public final class ClustersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Clusters_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Get.json */ /** * Sample code: Get cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersListByResourceGroupSamples.java index ede8e64a693c..318fb5faae5d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ClustersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_ListByResourceGroup.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersListSamples.java index 1318c4afe0d2..c7ee47502b78 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersListSamples.java @@ -10,7 +10,7 @@ public final class ClustersListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_ListBySubscription.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersScanRuntimeSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersScanRuntimeSamples.java index c012d7de7bce..11f395ea9223 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersScanRuntimeSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersScanRuntimeSamples.java @@ -13,7 +13,7 @@ public final class ClustersScanRuntimeSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_ScanRuntime.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersUpdateSamples.java index d5b825ef71f4..4fa9ed86dee8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersUpdateSamples.java @@ -38,7 +38,7 @@ public final class ClustersUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Patch_UpdateStrategy.json */ /** @@ -62,7 +62,7 @@ public static void patchUpdateStrategy(com.azure.resourcemanager.networkcloud.Ne /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Patch_VulnerabilityScanning.json */ /** @@ -83,7 +83,7 @@ public static void patchVulnerabilityScanning(com.azure.resourcemanager.networkc /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Patch_Location.json */ /** @@ -103,7 +103,7 @@ public static void patchClusterLocation(com.azure.resourcemanager.networkcloud.N /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Patch_AggregatorOrSingleRackDefinition.json */ /** @@ -162,7 +162,7 @@ public static void patchClusterAggregatorOrSingleRackDefinition( /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Patch_CommandOutput.json */ /** @@ -198,7 +198,7 @@ public static void patchClusterCommandOutput(com.azure.resourcemanager.networkcl /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Patch_RuntimeProtectionConfiguration.json */ /** @@ -220,7 +220,7 @@ public static void patchClusterCommandOutput(com.azure.resourcemanager.networkcl /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Patch_SecretArchive.json */ /** @@ -244,7 +244,7 @@ public static void patchSecretArchive(com.azure.resourcemanager.networkcloud.Net /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_Patch_AnalyticsOutput.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersUpdateVersionSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersUpdateVersionSamples.java index 0db9a1102f4f..77040a2cdf23 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersUpdateVersionSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersUpdateVersionSamples.java @@ -12,7 +12,7 @@ public final class ClustersUpdateVersionSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Clusters_UpdateVersion.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesCreateOrUpdateSamples.java index e799f594e85c..c5ee2e94507f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesCreateOrUpdateSamples.java @@ -17,8 +17,8 @@ public final class ConsolesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Consoles_Create.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Create. + * json */ /** * Sample code: Create or update virtual machine console. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesDeleteSamples.java index 96ed3dfbd4fc..12de1267b979 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesDeleteSamples.java @@ -10,8 +10,8 @@ public final class ConsolesDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Consoles_Delete.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Delete. + * json */ /** * Sample code: Delete virtual machine console. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesGetSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesGetSamples.java index 0ba865a5e6ac..b7c45749cb69 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesGetSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesGetSamples.java @@ -10,8 +10,7 @@ public final class ConsolesGetSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Consoles_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Get.json */ /** * Sample code: Get virtual machine console. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesListByVirtualMachineSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesListByVirtualMachineSamples.java index 9f358c203e47..77273cf7ed69 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesListByVirtualMachineSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesListByVirtualMachineSamples.java @@ -10,7 +10,7 @@ public final class ConsolesListByVirtualMachineSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Consoles_ListByVirtualMachine.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesUpdateSamples.java index 54ff0b13fad7..f2a0915a0b1d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesUpdateSamples.java @@ -17,8 +17,7 @@ public final class ConsolesUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Consoles_Patch.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Patch.json */ /** * Sample code: Patch virtual machine console. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesCreateOrUpdateSamples.java index 86a72af03b21..3990b1fff92f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ public final class KubernetesClusterFeaturesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusterFeatures_Create.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesDeleteSamples.java index 32beaac50542..077cdb8d0dee 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesDeleteSamples.java @@ -10,7 +10,7 @@ public final class KubernetesClusterFeaturesDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusterFeatures_Delete.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesGetSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesGetSamples.java index a6608b9f5e6e..11f868597f3d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesGetSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesGetSamples.java @@ -10,7 +10,7 @@ public final class KubernetesClusterFeaturesGetSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusterFeatures_Get.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesListByKubernetesClusterSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesListByKubernetesClusterSamples.java index 1bde5c054cec..eb7bd77ebf60 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesListByKubernetesClusterSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesListByKubernetesClusterSamples.java @@ -10,7 +10,7 @@ public final class KubernetesClusterFeaturesListByKubernetesClusterSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusterFeatures_ListByKubernetesCluster.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesUpdateSamples.java index 4932a4834f88..23cd5f8a8a9c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesUpdateSamples.java @@ -16,7 +16,7 @@ public final class KubernetesClusterFeaturesUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusterFeatures_Patch.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersCreateOrUpdateSamples.java index de7a5a524682..736ff1f806fc 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersCreateOrUpdateSamples.java @@ -42,7 +42,7 @@ public final class KubernetesClustersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusters_Create.json */ /** @@ -144,7 +144,7 @@ public final class KubernetesClustersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusters_L2LoadBalancer_Create.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersDeleteSamples.java index 5e293f8c037a..700b249bd101 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersDeleteSamples.java @@ -10,7 +10,7 @@ public final class KubernetesClustersDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusters_Delete.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersGetByResourceGroupSamples.java index 8da1e66f9d00..0abd6a8786e1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class KubernetesClustersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusters_Get.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersListByResourceGroupSamples.java index ea699094afbf..28313cde7d9d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class KubernetesClustersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusters_ListByResourceGroup.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersListSamples.java index 8ce106395820..0012d38d054d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersListSamples.java @@ -10,7 +10,7 @@ public final class KubernetesClustersListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusters_ListBySubscription.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersRestartNodeSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersRestartNodeSamples.java index 032775b22f90..e13e13c6bf3a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersRestartNodeSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersRestartNodeSamples.java @@ -12,7 +12,7 @@ public final class KubernetesClustersRestartNodeSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusters_RestartNode.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersUpdateSamples.java index ff86d9d17b83..bdcf1878d756 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersUpdateSamples.java @@ -18,7 +18,7 @@ public final class KubernetesClustersUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * KubernetesClusters_Patch.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksCreateOrUpdateSamples.java index 24c11d9d2f05..0ca6b7db400d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksCreateOrUpdateSamples.java @@ -15,8 +15,8 @@ public final class L2NetworksCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * L2Networks_Create.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Create. + * json */ /** * Sample code: Create or update L2 network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksDeleteSamples.java index fa02465335f7..238a414a31dd 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksDeleteSamples.java @@ -10,8 +10,8 @@ public final class L2NetworksDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * L2Networks_Delete.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Delete. + * json */ /** * Sample code: Delete L2 network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksGetByResourceGroupSamples.java index 3601e2bc18c9..9e0b58f45db6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksGetByResourceGroupSamples.java @@ -10,8 +10,7 @@ public final class L2NetworksGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * L2Networks_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Get.json */ /** * Sample code: Get L2 network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListByResourceGroupSamples.java index 7ae0fd6dd366..7a9a129c5f6c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class L2NetworksListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * L2Networks_ListByResourceGroup.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListSamples.java index c98416140f32..c9cfcdb9b96d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListSamples.java @@ -10,7 +10,7 @@ public final class L2NetworksListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * L2Networks_ListBySubscription.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksUpdateSamples.java index 51306766e66d..5d0c241f3cb6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksUpdateSamples.java @@ -14,8 +14,8 @@ public final class L2NetworksUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * L2Networks_Patch.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Patch. + * json */ /** * Sample code: Patch L2 network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksCreateOrUpdateSamples.java index 81c298aa9d34..6efd6cc51059 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksCreateOrUpdateSamples.java @@ -15,8 +15,8 @@ public final class L3NetworksCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * L3Networks_Create.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Create. + * json */ /** * Sample code: Create or update L3 network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksDeleteSamples.java index de3a651832b8..e2a06de7c686 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksDeleteSamples.java @@ -10,8 +10,8 @@ public final class L3NetworksDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * L3Networks_Delete.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Delete. + * json */ /** * Sample code: Delete L3 network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksGetByResourceGroupSamples.java index 479be47f03cb..8daf1c5ef09b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksGetByResourceGroupSamples.java @@ -10,8 +10,7 @@ public final class L3NetworksGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * L3Networks_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Get.json */ /** * Sample code: Get L3network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListByResourceGroupSamples.java index e5c33956e566..cfbc26d3eef3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class L3NetworksListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * L3Networks_ListByResourceGroup.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListSamples.java index 36438f4c62c0..84e2e5b8e03e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListSamples.java @@ -10,7 +10,7 @@ public final class L3NetworksListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * L3Networks_ListBySubscription.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksUpdateSamples.java index 632f2fe87333..cd6454860630 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksUpdateSamples.java @@ -14,8 +14,8 @@ public final class L3NetworksUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * L3Networks_Patch.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Patch. + * json */ /** * Sample code: Patch L3 network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsCreateOrUpdateSamples.java index c67d7018f2f8..9c96d170f738 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ public final class MetricsConfigurationsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterMetricsConfigurations_Create.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsDeleteSamples.java index 4598a2783547..f477ced31d2e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsDeleteSamples.java @@ -10,7 +10,7 @@ public final class MetricsConfigurationsDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterMetricsConfigurations_Delete.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsGetSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsGetSamples.java index 65c20d9aad91..1f7cb24341b7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsGetSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsGetSamples.java @@ -10,7 +10,7 @@ public final class MetricsConfigurationsGetSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterMetricsConfigurations_Get.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsListByClusterSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsListByClusterSamples.java index b9bfc4eabc41..8d6a1b2312d3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsListByClusterSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsListByClusterSamples.java @@ -10,7 +10,7 @@ public final class MetricsConfigurationsListByClusterSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterMetricsConfigurations_ListByCluster.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsUpdateSamples.java index 2f0514a9edd9..c8eee198ca0e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsUpdateSamples.java @@ -15,7 +15,7 @@ public final class MetricsConfigurationsUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * ClusterMetricsConfigurations_Patch.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/OperationsListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/OperationsListSamples.java index 2421fe20b1d8..50cddf702809 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/OperationsListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/OperationsListSamples.java @@ -10,8 +10,8 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Operations_List.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Operations_List. + * json */ /** * Sample code: List resource provider operations. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RackSkusGetSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RackSkusGetSamples.java index 4aef648957db..5c6aa37a7543 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RackSkusGetSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RackSkusGetSamples.java @@ -10,8 +10,7 @@ public final class RackSkusGetSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * RackSkus_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/RackSkus_Get.json */ /** * Sample code: Get rack SKU resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RackSkusListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RackSkusListSamples.java index d1bab0ee9aac..9ccd7efa539f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RackSkusListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RackSkusListSamples.java @@ -10,7 +10,7 @@ public final class RackSkusListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * RackSkus_ListBySubscription.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksCreateOrUpdateSamples.java index e889c440978a..270c988b9763 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksCreateOrUpdateSamples.java @@ -14,8 +14,7 @@ public final class RacksCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Racks_Create.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Create.json */ /** * Sample code: Create or update rack. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksDeleteSamples.java index 77b683842a3e..856d5912f9fa 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksDeleteSamples.java @@ -10,8 +10,7 @@ public final class RacksDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Racks_Delete.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Delete.json */ /** * Sample code: Delete rack. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksGetByResourceGroupSamples.java index e97b5bbec2e8..d3d89332c8e7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksGetByResourceGroupSamples.java @@ -10,8 +10,7 @@ public final class RacksGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/Racks_Get. - * json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Get.json */ /** * Sample code: Get rack. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksListByResourceGroupSamples.java index 1e62cf1fd75b..9287f1f58266 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class RacksListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Racks_ListByResourceGroup.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksListSamples.java index 6087f2013280..9936a2ab8d9e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksListSamples.java @@ -10,7 +10,7 @@ public final class RacksListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Racks_ListBySubscription.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksUpdateSamples.java index fa903d0a9538..2055cd5b9812 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksUpdateSamples.java @@ -14,8 +14,7 @@ public final class RacksUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Racks_Patch.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Patch.json */ /** * Sample code: Patch rack. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesCreateOrUpdateSamples.java index 757c1e902d39..e1ce11a60c78 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ public final class StorageAppliancesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_Create.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesDeleteSamples.java index aff05e5c8bcf..3755b2d36d9f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesDeleteSamples.java @@ -10,7 +10,7 @@ public final class StorageAppliancesDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_Delete.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesDisableRemoteVendorManagementSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesDisableRemoteVendorManagementSamples.java index c70b44b33e7a..72fffd728071 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesDisableRemoteVendorManagementSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesDisableRemoteVendorManagementSamples.java @@ -10,7 +10,7 @@ public final class StorageAppliancesDisableRemoteVendorManagementSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_DisableRemoteVendorManagement.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesEnableRemoteVendorManagementSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesEnableRemoteVendorManagementSamples.java index 2ebdcc49b9e6..1c3dd15c1878 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesEnableRemoteVendorManagementSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesEnableRemoteVendorManagementSamples.java @@ -13,7 +13,7 @@ public final class StorageAppliancesEnableRemoteVendorManagementSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_EnableRemoteVendorManagement.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesGetByResourceGroupSamples.java index 0d82ca59d1a1..89c668eb63f0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class StorageAppliancesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_Get.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesListByResourceGroupSamples.java index 7456f9ab5797..f662766099a9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class StorageAppliancesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_ListByResourceGroup.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesListSamples.java index 279de881899e..7608faf99711 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesListSamples.java @@ -10,7 +10,7 @@ public final class StorageAppliancesListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_ListBySubscription.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesRunReadCommandsSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesRunReadCommandsSamples.java index 497aa03612c2..a279ca27c122 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesRunReadCommandsSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesRunReadCommandsSamples.java @@ -14,7 +14,7 @@ public final class StorageAppliancesRunReadCommandsSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_RunReadCommands.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesUpdateSamples.java index ed377814912b..8a05feb2bb99 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesUpdateSamples.java @@ -14,7 +14,7 @@ public final class StorageAppliancesUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * StorageAppliances_Patch.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksCreateOrUpdateSamples.java index 4134389bb433..23827e013786 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ public final class TrunkedNetworksCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * TrunkedNetworks_Create.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksDeleteSamples.java index f1c1e8aa51a6..c5c99abf1518 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksDeleteSamples.java @@ -10,7 +10,7 @@ public final class TrunkedNetworksDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * TrunkedNetworks_Delete.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksGetByResourceGroupSamples.java index 7aaa167ef5e5..c9c578ee1dfd 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksGetByResourceGroupSamples.java @@ -10,8 +10,8 @@ public final class TrunkedNetworksGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * TrunkedNetworks_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Get + * .json */ /** * Sample code: Get Trunked network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListByResourceGroupSamples.java index 6aef04a27b42..0372f64ea7a8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class TrunkedNetworksListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * TrunkedNetworks_ListByResourceGroup.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListSamples.java index ccff0f52fe23..0a40c08bda09 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListSamples.java @@ -10,7 +10,7 @@ public final class TrunkedNetworksListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * TrunkedNetworks_ListBySubscription.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksUpdateSamples.java index 7c3edd91155b..f7951c2226ff 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksUpdateSamples.java @@ -14,7 +14,7 @@ public final class TrunkedNetworksUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * TrunkedNetworks_Patch.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesAssignRelaySamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesAssignRelaySamples.java index c99204a08aed..56797535b797 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesAssignRelaySamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesAssignRelaySamples.java @@ -13,7 +13,7 @@ public final class VirtualMachinesAssignRelaySamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_AssignRelay.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesCreateOrUpdateSamples.java index 26649bafc907..5744b52cc5a9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesCreateOrUpdateSamples.java @@ -33,7 +33,7 @@ public final class VirtualMachinesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_Create.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesDeleteSamples.java index d7906de55b76..c38e462a91bc 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesDeleteSamples.java @@ -10,7 +10,7 @@ public final class VirtualMachinesDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_Delete.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesGetByResourceGroupSamples.java index e7f1aea12880..809ed93b2ca3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesGetByResourceGroupSamples.java @@ -10,8 +10,8 @@ public final class VirtualMachinesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * VirtualMachines_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Get + * .json */ /** * Sample code: Get virtual machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesListByResourceGroupSamples.java index 7188321f7e4b..f81ed79e9684 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VirtualMachinesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_ListByResourceGroup.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesListSamples.java index 5b699a7fb58a..abe7effa8eb8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesListSamples.java @@ -10,7 +10,7 @@ public final class VirtualMachinesListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_ListBySubscription.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesPowerOffSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesPowerOffSamples.java index 491631f564b5..ba50bebabb3e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesPowerOffSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesPowerOffSamples.java @@ -13,7 +13,7 @@ public final class VirtualMachinesPowerOffSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_PowerOff.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesReimageSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesReimageSamples.java index eb8b1eadf29c..b98368881891 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesReimageSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesReimageSamples.java @@ -10,7 +10,7 @@ public final class VirtualMachinesReimageSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_Reimage.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesRestartSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesRestartSamples.java index e5481fff7090..ac37e016ec74 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesRestartSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesRestartSamples.java @@ -10,7 +10,7 @@ public final class VirtualMachinesRestartSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_Restart.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesStartSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesStartSamples.java index 4fbc4a672656..b07faa397a88 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesStartSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesStartSamples.java @@ -10,7 +10,7 @@ public final class VirtualMachinesStartSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_Start.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesUpdateSamples.java index fc67d1f47597..ea2376f448ee 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesUpdateSamples.java @@ -18,7 +18,7 @@ public final class VirtualMachinesUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * VirtualMachines_Patch.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesCreateOrUpdateSamples.java index d41c4dd140c3..7860aa9354fa 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesCreateOrUpdateSamples.java @@ -14,8 +14,7 @@ public final class VolumesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Volumes_Create.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Create.json */ /** * Sample code: Create or update volume. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesDeleteSamples.java index d068c04005fe..560eec215480 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesDeleteSamples.java @@ -10,8 +10,7 @@ public final class VolumesDeleteSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Volumes_Delete.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Delete.json */ /** * Sample code: Delete volume. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesGetByResourceGroupSamples.java index dbb59f5a1a7d..f87751168899 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesGetByResourceGroupSamples.java @@ -10,8 +10,7 @@ public final class VolumesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Volumes_Get.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Get.json */ /** * Sample code: Get volume. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesListByResourceGroupSamples.java index 5991e2e645e5..0e349bc6e6ac 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VolumesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Volumes_ListByResourceGroup.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesListSamples.java index 0dfa53a0d6ec..88513c4a7e5a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesListSamples.java @@ -10,7 +10,7 @@ public final class VolumesListSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ * Volumes_ListBySubscription.json */ /** diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesUpdateSamples.java index 57004c5c80fa..920917da1a1b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesUpdateSamples.java @@ -14,8 +14,7 @@ public final class VolumesUpdateSamples { /* * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2025-07-01-preview/examples/ - * Volumes_Patch.json + * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Patch.json */ /** * Sample code: Patch volume. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerInnerTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerInnerTests.java index fc99201e7c42..9fa963453214 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerInnerTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerInnerTests.java @@ -19,7 +19,7 @@ public final class ClusterManagerInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterManagerInner model = BinaryData.fromString( - "{\"etag\":\"dmhdlxyjr\",\"identity\":{\"principalId\":\"ac88f69d-057f-4dd6-be7e-4e635117a02e\",\"tenantId\":\"cbce75bb-f79f-467e-8897-4d22f7f58f24\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"hgw\":{\"principalId\":\"59ae1edf-6c97-4e9e-b945-b1724478c79d\",\"clientId\":\"86031f6a-0e8c-420c-a7ee-76b045c3249d\"},\"nedgfbc\":{\"principalId\":\"ea25b0ee-26d9-4052-b906-03629ba291aa\",\"clientId\":\"b39a1981-feca-49e5-925f-0636d60465bc\"},\"vq\":{\"principalId\":\"4c9b6fe8-417c-40a0-8a92-0a90fbf04659\",\"clientId\":\"888bfc55-ac53-4f67-92e0-31342c3f7910\"},\"eqdcv\":{\"principalId\":\"9f12f2b0-193f-4c6b-af09-1dc3e8bc80b7\",\"clientId\":\"6e7e45c4-2bc5-46ad-bde2-cec050a7509a\"}}},\"properties\":{\"analyticsWorkspaceId\":\"hvoodsotbobzd\",\"availabilityZones\":[\"j\",\"vnhdldwmgxcxr\"],\"clusterVersions\":[{\"supportExpiryDate\":\"utwu\",\"targetClusterVersion\":\"grpkhjwniyqs\"},{\"supportExpiryDate\":\"i\",\"targetClusterVersion\":\"dggkzzlvmbmpa\"}],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"fv\",\"fabricControllerId\":\"efyw\",\"managedResourceGroupConfiguration\":{\"location\":\"fvmwy\",\"name\":\"fouyf\"},\"managerExtendedLocation\":{\"name\":\"akcp\",\"type\":\"iyzvqtmnub\"},\"provisioningState\":\"Failed\",\"vmSize\":\"zksmondj\"},\"location\":\"uxvypomgkopkwh\",\"tags\":{\"cmbqfqvmk\":\"pajqgxysm\"},\"id\":\"xozap\",\"name\":\"helxprglya\",\"type\":\"dd\"}") + "{\"etag\":\"dmhdlxyjr\",\"identity\":{\"principalId\":\"336d209f-33d0-4c8f-b546-973d0a4bd9ae\",\"tenantId\":\"c955d6f2-a4c1-4201-942d-c7c6d9c56e9e\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"hgw\":{\"principalId\":\"c80e4133-0e19-48ee-ba2d-61052c1f51c7\",\"clientId\":\"203a8fb5-5d65-4b92-a81c-62dd718f8285\"},\"nedgfbc\":{\"principalId\":\"f353d525-4348-42d5-bd02-e05f05b4f470\",\"clientId\":\"35438b58-665d-4fe8-b6d4-eb9cbc0ff976\"},\"vq\":{\"principalId\":\"e4c6854a-031a-487c-82c4-b688bb029210\",\"clientId\":\"822e6098-b6d7-4bde-af39-131f22f2286c\"},\"eqdcv\":{\"principalId\":\"472c6b35-3812-4928-b34b-c7188ca188bf\",\"clientId\":\"f9fc7cda-9642-4a91-8542-5ea42304baba\"}}},\"properties\":{\"analyticsWorkspaceId\":\"hvoodsotbobzd\",\"availabilityZones\":[\"j\",\"vnhdldwmgxcxr\"],\"clusterVersions\":[{\"supportExpiryDate\":\"utwu\",\"targetClusterVersion\":\"grpkhjwniyqs\"},{\"supportExpiryDate\":\"i\",\"targetClusterVersion\":\"dggkzzlvmbmpa\"}],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"fv\",\"fabricControllerId\":\"efyw\",\"managedResourceGroupConfiguration\":{\"location\":\"fvmwy\",\"name\":\"fouyf\"},\"managerExtendedLocation\":{\"name\":\"akcp\",\"type\":\"iyzvqtmnub\"},\"provisioningState\":\"Failed\",\"vmSize\":\"zksmondj\"},\"location\":\"uxvypomgkopkwh\",\"tags\":{\"cmbqfqvmk\":\"pajqgxysm\"},\"id\":\"xozap\",\"name\":\"helxprglya\",\"type\":\"dd\"}") .toObject(ClusterManagerInner.class); Assertions.assertEquals("uxvypomgkopkwh", model.location()); Assertions.assertEquals("pajqgxysm", model.tags().get("cmbqfqvmk")); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerListTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerListTests.java index 8930d27e29aa..9698c106389e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerListTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerListTests.java @@ -20,7 +20,7 @@ public final class ClusterManagerListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterManagerList model = BinaryData.fromString( - "{\"nextLink\":\"ooxdjebwpuc\",\"value\":[{\"etag\":\"ovbvmeueciv\",\"identity\":{\"principalId\":\"c380abc9-2add-41fb-8703-fc6e87984f4a\",\"tenantId\":\"02f22de0-7475-40e9-9bf0-affce37cc1a5\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"jrwjueiotwm\":{\"principalId\":\"81f54b9f-ae9b-43d1-ab31-c29469e14e59\",\"clientId\":\"b6acfb3c-185d-4337-ad14-540a38b96b2a\"},\"tdx\":{\"principalId\":\"b931a627-a757-4b02-bd9f-b44e2e5b8a38\",\"clientId\":\"1afc0687-e195-49d1-acd5-5cbf20221ad6\"},\"xnrj\":{\"principalId\":\"b393d8a0-4303-4555-9bc0-9e82b0b2f567\",\"clientId\":\"61340a14-b386-4565-8bf3-27a9f5868a6e\"},\"qwgxhniskx\":{\"principalId\":\"67728e61-fcf5-4a28-bc0a-3eeb09add6d6\",\"clientId\":\"35cefadd-1243-495a-8bd8-5efa0738d07e\"}}},\"properties\":{\"analyticsWorkspaceId\":\"kpycgklwndnhjd\",\"availabilityZones\":[\"hvylwzbt\",\"h\"],\"clusterVersions\":[{\"supportExpiryDate\":\"nbmpowuwprzq\",\"targetClusterVersion\":\"eualupjmkhf\"}],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"cswsrtjri\",\"fabricControllerId\":\"lrbpbewtghfgbl\",\"managedResourceGroupConfiguration\":{\"location\":\"xzvlvqhjkbegib\",\"name\":\"mxiebw\"},\"managerExtendedLocation\":{\"name\":\"loayqcgw\",\"type\":\"tzjuzgwyzmhtxo\"},\"provisioningState\":\"Accepted\",\"vmSize\":\"savjcbpwxqps\"},\"location\":\"nftguvriuhpr\",\"tags\":{\"bexrmcq\":\"yvxqtayriwwroy\",\"e\":\"bycnojvkn\",\"zhpvgqzcjrvxd\":\"qsgzvahapj\"},\"id\":\"zlmwlxkvugfhz\",\"name\":\"vawjvzunlu\",\"type\":\"hnnpr\"},{\"etag\":\"i\",\"identity\":{\"principalId\":\"fcc15040-8417-4d5b-b9bc-293b6a87fef4\",\"tenantId\":\"aa374d4a-d401-409f-b7d9-bfc813bf753a\",\"type\":\"None\",\"userAssignedIdentities\":{\"e\":{\"principalId\":\"df80fd2c-19ef-4a0c-b0a4-f5dd1f5becc2\",\"clientId\":\"d1323abf-60d3-4bb4-bc68-736a524321ed\"},\"ultskzbbtdz\":{\"principalId\":\"21dd4b54-58d7-482d-a624-2bd11ee5f19e\",\"clientId\":\"05490237-ac0d-481d-922c-26255a35bc27\"}}},\"properties\":{\"analyticsWorkspaceId\":\"veekgpwozuhkfp\",\"availabilityZones\":[\"yofd\",\"luu\",\"dttouwaboekqvkel\",\"smv\"],\"clusterVersions\":[{\"supportExpiryDate\":\"jsflhhcaalnjix\",\"targetClusterVersion\":\"xyawj\"},{\"supportExpiryDate\":\"aq\",\"targetClusterVersion\":\"lyjpk\"},{\"supportExpiryDate\":\"dzyexznelixh\",\"targetClusterVersion\":\"ztfolhbnxk\"},{\"supportExpiryDate\":\"laulppg\",\"targetClusterVersion\":\"tpnapnyiropuhpig\"}],\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"lgqg\",\"fabricControllerId\":\"txmedj\",\"managedResourceGroupConfiguration\":{\"location\":\"lynqwwncwzzh\",\"name\":\"ktrmgucnapkt\"},\"managerExtendedLocation\":{\"name\":\"ellwptfdy\",\"type\":\"pfqbuaceopzf\"},\"provisioningState\":\"Provisioning\",\"vmSize\":\"uaopppcqeq\"},\"location\":\"lzdahzxctobgbkdm\",\"tags\":{\"qjhhkxbpv\":\"postmgrcfbunrm\",\"swbxqz\":\"ymjhxxjyngudivkr\",\"t\":\"szjfauvjfdxxivet\"},\"id\":\"qaqtdoqmcbxvwvxy\",\"name\":\"lqbhsf\",\"type\":\"obl\"},{\"etag\":\"k\",\"identity\":{\"principalId\":\"93deecb1-56eb-4ce6-9d0c-7dadbe26b7b1\",\"tenantId\":\"5f939f52-dc22-49ae-b317-f77970b5564c\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"bkrvrnsvshqj\":{\"principalId\":\"3ab6b5e1-0555-471c-8c3c-7c62b73dbfb2\",\"clientId\":\"91ddf6f1-7c12-4f3d-a2d9-77f51a428019\"},\"crsbfovasr\":{\"principalId\":\"5b71fdf1-94c1-4777-a8ea-6522d569e514\",\"clientId\":\"b04334d5-4482-48ce-aa3f-c74c9ef04f14\"},\"wbhsqfsub\":{\"principalId\":\"974c2ae0-5416-4e9b-9c4d-c74d1d1a6742\",\"clientId\":\"af9d5532-436d-44be-b620-54be0be93d15\"},\"birx\":{\"principalId\":\"bcb33d11-773c-4d91-a3a8-accbde757d33\",\"clientId\":\"5982fcff-b404-4895-a811-7a4a9a182788\"}}},\"properties\":{\"analyticsWorkspaceId\":\"ybsrfbjfdtwss\",\"availabilityZones\":[\"tpvjzbexilzznfqq\",\"vwpm\",\"taruoujmkcj\"],\"clusterVersions\":[{\"supportExpiryDate\":\"tjrybnwjewgdr\",\"targetClusterVersion\":\"rvnaenqpeh\"},{\"supportExpiryDate\":\"doy\",\"targetClusterVersion\":\"ifthnz\"},{\"supportExpiryDate\":\"dslgnayqigynduh\",\"targetClusterVersion\":\"hqlkthumaqo\"},{\"supportExpiryDate\":\"gycdu\",\"targetClusterVersion\":\"r\"}],\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"y\",\"fabricControllerId\":\"vaolpsslqlf\",\"managedResourceGroupConfiguration\":{\"location\":\"n\",\"name\":\"glzpswiydm\"},\"managerExtendedLocation\":{\"name\":\"yhz\",\"type\":\"xssadbzmnvdf\"},\"provisioningState\":\"Provisioning\",\"vmSize\":\"ao\"},\"location\":\"xzb\",\"tags\":{\"hxsrzdzucersc\":\"lylpstdb\",\"iwjmygtdssls\":\"ntnev\",\"emwabnet\":\"tmweriofzpyq\"},\"id\":\"hhszh\",\"name\":\"d\",\"type\":\"lvwiwubmwmbesl\"},{\"etag\":\"k\",\"identity\":{\"principalId\":\"97b1c3d9-d620-435f-8281-9d8c8f2a36a9\",\"tenantId\":\"5e31c1cf-5137-4ce0-9e0a-d564614dab3b\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"xogaokonzmnsikv\":{\"principalId\":\"213b37ea-e6c7-41e9-8668-0db13a8c4943\",\"clientId\":\"2ad46da1-a2c1-4ab2-8868-a4afd532d956\"},\"ze\":{\"principalId\":\"a3232e1b-545f-430d-8c4a-cca4f4497793\",\"clientId\":\"4eabe0f2-7054-4a94-a79f-7e377c267895\"}}},\"properties\":{\"analyticsWorkspaceId\":\"kdltfzxmhhvhg\",\"availabilityZones\":[\"odkwobd\",\"gxtibqdxbxw\",\"kbogqxndlkzgx\"],\"clusterVersions\":[{\"supportExpiryDate\":\"plbpodxun\",\"targetClusterVersion\":\"ebxmubyynt\"}],\"detailedStatus\":\"UpdateFailed\",\"detailedStatusMessage\":\"qtkoievs\",\"fabricControllerId\":\"otgqrlltmu\",\"managedResourceGroupConfiguration\":{\"location\":\"uwz\",\"name\":\"xbmp\"},\"managerExtendedLocation\":{\"name\":\"jefuzmuvpbttdumo\",\"type\":\"p\"},\"provisioningState\":\"Updating\",\"vmSize\":\"mnzb\"},\"location\":\"hjpglkf\",\"tags\":{\"lfphsdyhtozfikd\":\"dneu\",\"zonosgg\":\"wwquuvxzxclvithh\",\"ljuti\":\"hcohfwdsjnk\"},\"id\":\"swacffgdkzz\",\"name\":\"wkfvhqcrailvp\",\"type\":\"ppfufl\"}]}") + "{\"nextLink\":\"ooxdjebwpuc\",\"value\":[{\"etag\":\"ovbvmeueciv\",\"identity\":{\"principalId\":\"22be1758-9e0e-46a0-9911-a74067087a8e\",\"tenantId\":\"fc341620-7bc9-44f9-b3ab-0ae4156c3a36\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"jrwjueiotwm\":{\"principalId\":\"a5777140-424b-40b2-ad23-adecceaf3830\",\"clientId\":\"55746705-f03e-45c1-98e0-e26c1e0c58ca\"},\"tdx\":{\"principalId\":\"a810830e-3998-4063-83f2-b2e53c45ba91\",\"clientId\":\"4f8b8879-ec83-4526-85f7-8b43905d1699\"},\"xnrj\":{\"principalId\":\"3f81c812-d2b9-410a-9451-66f3bd76b8d2\",\"clientId\":\"6ab2e5fd-d47e-40fa-900a-fb1a17f69e34\"},\"qwgxhniskx\":{\"principalId\":\"8be3dbcd-20c7-4a33-9cc2-27677d6e1340\",\"clientId\":\"187839ee-f11f-4824-9931-f3af0ab56b37\"}}},\"properties\":{\"analyticsWorkspaceId\":\"kpycgklwndnhjd\",\"availabilityZones\":[\"hvylwzbt\",\"h\"],\"clusterVersions\":[{\"supportExpiryDate\":\"nbmpowuwprzq\",\"targetClusterVersion\":\"eualupjmkhf\"}],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"cswsrtjri\",\"fabricControllerId\":\"lrbpbewtghfgbl\",\"managedResourceGroupConfiguration\":{\"location\":\"xzvlvqhjkbegib\",\"name\":\"mxiebw\"},\"managerExtendedLocation\":{\"name\":\"loayqcgw\",\"type\":\"tzjuzgwyzmhtxo\"},\"provisioningState\":\"Accepted\",\"vmSize\":\"savjcbpwxqps\"},\"location\":\"nftguvriuhpr\",\"tags\":{\"bexrmcq\":\"yvxqtayriwwroy\",\"e\":\"bycnojvkn\",\"zhpvgqzcjrvxd\":\"qsgzvahapj\"},\"id\":\"zlmwlxkvugfhz\",\"name\":\"vawjvzunlu\",\"type\":\"hnnpr\"},{\"etag\":\"i\",\"identity\":{\"principalId\":\"0593d887-b7ab-4bbc-a778-a86f0d857d88\",\"tenantId\":\"c75df036-bf27-44a3-8043-cad63ae6b5cf\",\"type\":\"None\",\"userAssignedIdentities\":{\"e\":{\"principalId\":\"7b9b7058-1f81-4b89-8350-5b8210b6c8df\",\"clientId\":\"3567814c-2f3d-40eb-ab3e-3c3711617966\"},\"ultskzbbtdz\":{\"principalId\":\"c09a932e-2f54-40cf-829d-664df135cc44\",\"clientId\":\"dca72e7a-2c05-49b5-9df3-258d8ff1bddb\"}}},\"properties\":{\"analyticsWorkspaceId\":\"veekgpwozuhkfp\",\"availabilityZones\":[\"yofd\",\"luu\",\"dttouwaboekqvkel\",\"smv\"],\"clusterVersions\":[{\"supportExpiryDate\":\"jsflhhcaalnjix\",\"targetClusterVersion\":\"xyawj\"},{\"supportExpiryDate\":\"aq\",\"targetClusterVersion\":\"lyjpk\"},{\"supportExpiryDate\":\"dzyexznelixh\",\"targetClusterVersion\":\"ztfolhbnxk\"},{\"supportExpiryDate\":\"laulppg\",\"targetClusterVersion\":\"tpnapnyiropuhpig\"}],\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"lgqg\",\"fabricControllerId\":\"txmedj\",\"managedResourceGroupConfiguration\":{\"location\":\"lynqwwncwzzh\",\"name\":\"ktrmgucnapkt\"},\"managerExtendedLocation\":{\"name\":\"ellwptfdy\",\"type\":\"pfqbuaceopzf\"},\"provisioningState\":\"Provisioning\",\"vmSize\":\"uaopppcqeq\"},\"location\":\"lzdahzxctobgbkdm\",\"tags\":{\"qjhhkxbpv\":\"postmgrcfbunrm\",\"swbxqz\":\"ymjhxxjyngudivkr\",\"t\":\"szjfauvjfdxxivet\"},\"id\":\"qaqtdoqmcbxvwvxy\",\"name\":\"lqbhsf\",\"type\":\"obl\"},{\"etag\":\"k\",\"identity\":{\"principalId\":\"f278d887-03bd-41f4-bc3a-c75b0a0e1143\",\"tenantId\":\"5052e3a7-b9e1-4b9a-86c8-54201a56442f\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"bkrvrnsvshqj\":{\"principalId\":\"5b879c77-113f-4220-85b1-dc96ed336a73\",\"clientId\":\"d704cd1f-5621-4084-af26-3115098a52ea\"},\"crsbfovasr\":{\"principalId\":\"61c5373a-b84a-426f-9d95-6119b01b15c9\",\"clientId\":\"08f43fe9-48c5-4605-975e-73726a3c053f\"},\"wbhsqfsub\":{\"principalId\":\"f3c429f2-f094-4098-8eb2-58740a0f9bd2\",\"clientId\":\"494efc68-9400-4b43-abc6-ddafc35728a9\"},\"birx\":{\"principalId\":\"bfbe2f64-cdd1-4d77-a6a5-faef9ce76315\",\"clientId\":\"6849cbdf-4057-4387-822b-8008473fc186\"}}},\"properties\":{\"analyticsWorkspaceId\":\"ybsrfbjfdtwss\",\"availabilityZones\":[\"tpvjzbexilzznfqq\",\"vwpm\",\"taruoujmkcj\"],\"clusterVersions\":[{\"supportExpiryDate\":\"tjrybnwjewgdr\",\"targetClusterVersion\":\"rvnaenqpeh\"},{\"supportExpiryDate\":\"doy\",\"targetClusterVersion\":\"ifthnz\"},{\"supportExpiryDate\":\"dslgnayqigynduh\",\"targetClusterVersion\":\"hqlkthumaqo\"},{\"supportExpiryDate\":\"gycdu\",\"targetClusterVersion\":\"r\"}],\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"y\",\"fabricControllerId\":\"vaolpsslqlf\",\"managedResourceGroupConfiguration\":{\"location\":\"n\",\"name\":\"glzpswiydm\"},\"managerExtendedLocation\":{\"name\":\"yhz\",\"type\":\"xssadbzmnvdf\"},\"provisioningState\":\"Provisioning\",\"vmSize\":\"ao\"},\"location\":\"xzb\",\"tags\":{\"hxsrzdzucersc\":\"lylpstdb\",\"iwjmygtdssls\":\"ntnev\",\"emwabnet\":\"tmweriofzpyq\"},\"id\":\"hhszh\",\"name\":\"d\",\"type\":\"lvwiwubmwmbesl\"},{\"etag\":\"k\",\"identity\":{\"principalId\":\"5f3e3218-2c9d-4cf3-ba73-134e66b020d7\",\"tenantId\":\"45819e42-96e3-4ad6-8076-f84617b0506a\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"xogaokonzmnsikv\":{\"principalId\":\"b2e30f8f-9349-48f7-8d1d-21f56a4ccc5a\",\"clientId\":\"b290967e-faa9-42d8-82b0-3dd09aee805b\"},\"ze\":{\"principalId\":\"ee9c8ed0-3c9f-4275-a3c8-b7bae6c51ad7\",\"clientId\":\"7892966c-9c5b-4a40-9b14-9cc403e12e56\"}}},\"properties\":{\"analyticsWorkspaceId\":\"kdltfzxmhhvhg\",\"availabilityZones\":[\"odkwobd\",\"gxtibqdxbxw\",\"kbogqxndlkzgx\"],\"clusterVersions\":[{\"supportExpiryDate\":\"plbpodxun\",\"targetClusterVersion\":\"ebxmubyynt\"}],\"detailedStatus\":\"UpdateFailed\",\"detailedStatusMessage\":\"qtkoievs\",\"fabricControllerId\":\"otgqrlltmu\",\"managedResourceGroupConfiguration\":{\"location\":\"uwz\",\"name\":\"xbmp\"},\"managerExtendedLocation\":{\"name\":\"jefuzmuvpbttdumo\",\"type\":\"p\"},\"provisioningState\":\"Updating\",\"vmSize\":\"mnzb\"},\"location\":\"hjpglkf\",\"tags\":{\"lfphsdyhtozfikd\":\"dneu\",\"zonosgg\":\"wwquuvxzxclvithh\",\"ljuti\":\"hcohfwdsjnk\"},\"id\":\"swacffgdkzz\",\"name\":\"wkfvhqcrailvp\",\"type\":\"ppfufl\"}]}") .toObject(ClusterManagerList.class); Assertions.assertEquals("ooxdjebwpuc", model.nextLink()); Assertions.assertEquals("nftguvriuhpr", model.value().get(0).location()); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerPatchParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerPatchParametersTests.java index c1a3be759c26..d1aca835c81b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerPatchParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerPatchParametersTests.java @@ -17,7 +17,7 @@ public final class ClusterManagerPatchParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterManagerPatchParameters model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"2d949141-43f1-4f72-adb4-ad01a1261abf\",\"tenantId\":\"35f5490c-0b66-40a4-acce-f6f98a415c98\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"owxwcomli\":{\"principalId\":\"097825b1-8f97-456c-96f6-4df251eda453\",\"clientId\":\"9553b9d2-124e-4e87-bdb6-aa82eace3e9b\"}}},\"tags\":{\"yfdvlvhbwrnfxtgd\":\"wvczcswkacve\"}}") + "{\"identity\":{\"principalId\":\"9f83432b-3baf-4421-9892-eb01530118af\",\"tenantId\":\"f5b47c06-63a3-4b79-ab45-f1976ba25ab7\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"owxwcomli\":{\"principalId\":\"54f461e1-6499-4c3f-b38a-0aef8d5f2e38\",\"clientId\":\"bacf6124-9455-44f4-a608-c74ddd77ed00\"}}},\"tags\":{\"yfdvlvhbwrnfxtgd\":\"wvczcswkacve\"}}") .toObject(ClusterManagerPatchParameters.class); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); Assertions.assertEquals("wvczcswkacve", model.tags().get("yfdvlvhbwrnfxtgd")); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersCreateOrUpdateMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersCreateOrUpdateMockTests.java index 44579b1eee33..5e5018440796 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersCreateOrUpdateMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersCreateOrUpdateMockTests.java @@ -28,7 +28,7 @@ public final class ClusterManagersCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"jzudrtpzk\",\"identity\":{\"principalId\":\"9ca08c3f-1950-485a-bc3a-7b5094aa79ee\",\"tenantId\":\"5640896e-3e8d-4578-9581-964c8cc01a5d\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"zzqrhmngqbedy\":{\"principalId\":\"e97ff86b-dd51-4ca9-9ef2-7a1d39ccc2ce\",\"clientId\":\"2ef5d3b6-d432-41a1-a991-8e621376e4f1\"},\"rzwnyk\":{\"principalId\":\"0e3b012d-a3e0-4605-8259-0c42e5a50ad9\",\"clientId\":\"843c497b-dc0c-45f2-80da-28b3fc100f7f\"},\"jch\":{\"principalId\":\"aece1e43-80fa-4d2f-a2d5-99e86fe03110\",\"clientId\":\"f3177c6d-3b28-40eb-bdb4-28d4dee79f29\"}}},\"properties\":{\"analyticsWorkspaceId\":\"mpwctoflds\",\"availabilityZones\":[\"dhztxkbr\"],\"clusterVersions\":[{\"supportExpiryDate\":\"wjiyewhfjsrwq\",\"targetClusterVersion\":\"etfgcwvrrmdqntyc\"},{\"supportExpiryDate\":\"wthv\",\"targetClusterVersion\":\"xgnuyeamcmhu\"}],\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"cehokw\",\"fabricControllerId\":\"pqtwloesqrggvrb\",\"managedResourceGroupConfiguration\":{\"location\":\"ukoila\",\"name\":\"duwjleipjlhwy\"},\"managerExtendedLocation\":{\"name\":\"zr\",\"type\":\"z\"},\"provisioningState\":\"Succeeded\",\"vmSize\":\"kkwhbgxvellvulnx\"},\"location\":\"nitmujdtvmclyymf\",\"tags\":{\"xfzuvrzmzqmzj\":\"jpddn\",\"pv\":\"rb\",\"pglaoh\":\"mdyfoebojtj\"},\"id\":\"qk\",\"name\":\"jtnqjil\",\"type\":\"ywkdcwmqsy\"}"; + = "{\"etag\":\"jzudrtpzk\",\"identity\":{\"principalId\":\"19c209e9-2462-4760-8fcf-146cae39fbf6\",\"tenantId\":\"acdb03ff-10f1-4595-a7a8-ec545fc29e30\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"zzqrhmngqbedy\":{\"principalId\":\"c828392d-3a1a-42c3-b786-83ca1ad92cd5\",\"clientId\":\"cc6d702b-ad32-423c-bfb1-802d174e1a19\"},\"rzwnyk\":{\"principalId\":\"b02a034a-4cb1-4b5f-b67f-6786b63622ae\",\"clientId\":\"43bde164-3d4c-4738-8d89-bf0701473625\"},\"jch\":{\"principalId\":\"b5e23b4a-ece9-45f5-926a-99abde2da6b1\",\"clientId\":\"cddfa36b-fd4f-4f3d-b9b7-43aa816a2a63\"}}},\"properties\":{\"analyticsWorkspaceId\":\"mpwctoflds\",\"availabilityZones\":[\"dhztxkbr\"],\"clusterVersions\":[{\"supportExpiryDate\":\"wjiyewhfjsrwq\",\"targetClusterVersion\":\"etfgcwvrrmdqntyc\"},{\"supportExpiryDate\":\"wthv\",\"targetClusterVersion\":\"xgnuyeamcmhu\"}],\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"cehokw\",\"fabricControllerId\":\"pqtwloesqrggvrb\",\"managedResourceGroupConfiguration\":{\"location\":\"ukoila\",\"name\":\"duwjleipjlhwy\"},\"managerExtendedLocation\":{\"name\":\"zr\",\"type\":\"z\"},\"provisioningState\":\"Succeeded\",\"vmSize\":\"kkwhbgxvellvulnx\"},\"location\":\"nitmujdtvmclyymf\",\"tags\":{\"xfzuvrzmzqmzj\":\"jpddn\",\"pv\":\"rb\",\"pglaoh\":\"mdyfoebojtj\"},\"id\":\"qk\",\"name\":\"jtnqjil\",\"type\":\"ywkdcwmqsy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersGetByResourceGroupWithResponseMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersGetByResourceGroupWithResponseMockTests.java index fbbd777ac5b5..8585db54ea57 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersGetByResourceGroupWithResponseMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersGetByResourceGroupWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class ClusterManagersGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"etag\":\"mwbzxpdc\",\"identity\":{\"principalId\":\"78f83374-d45d-452a-b799-8290f9499cec\",\"tenantId\":\"5f79b1cd-b9f0-4705-965c-64520b8ce174\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"laimouxwk\":{\"principalId\":\"f67fbfa3-d769-4b5c-9554-094f149a26ea\",\"clientId\":\"bab7b878-eea0-4783-a1b5-092ea1a18dd0\"}}},\"properties\":{\"analyticsWorkspaceId\":\"mud\",\"availabilityZones\":[\"oibi\",\"ziuswsw\",\"rk\",\"qsj\"],\"clusterVersions\":[{\"supportExpiryDate\":\"q\",\"targetClusterVersion\":\"fs\"},{\"supportExpiryDate\":\"rfwb\",\"targetClusterVersion\":\"qvogfuyz\"}],\"detailedStatus\":\"ProvisioningFailed\",\"detailedStatusMessage\":\"limbyqecroodlik\",\"fabricControllerId\":\"drdaasa\",\"managedResourceGroupConfiguration\":{\"location\":\"bsmfkwiyjvz\",\"name\":\"osrnawnvzmlnkoy\"},\"managerExtendedLocation\":{\"name\":\"xvjabjq\",\"type\":\"axuyvymcnud\"},\"provisioningState\":\"Provisioning\",\"vmSize\":\"bhjxwxqweuipmpv\"},\"location\":\"m\",\"tags\":{\"fhyrfrakk\":\"sqxtltclkrdpq\",\"rcwfcmfcnrjajq\":\"d\"},\"id\":\"atxjtiel\",\"name\":\"zqgxx\",\"type\":\"fbbmtlp\"}"; + = "{\"etag\":\"mwbzxpdc\",\"identity\":{\"principalId\":\"3a7b76e2-78ed-4a07-904c-15e6c89dd903\",\"tenantId\":\"27614d8b-0e0b-441d-bae5-ff1701ee9548\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"laimouxwk\":{\"principalId\":\"3fb28c05-8d2c-48f8-99e3-e63bf57b3366\",\"clientId\":\"bfd51f42-01f7-4780-a99a-b03a5af93005\"}}},\"properties\":{\"analyticsWorkspaceId\":\"mud\",\"availabilityZones\":[\"oibi\",\"ziuswsw\",\"rk\",\"qsj\"],\"clusterVersions\":[{\"supportExpiryDate\":\"q\",\"targetClusterVersion\":\"fs\"},{\"supportExpiryDate\":\"rfwb\",\"targetClusterVersion\":\"qvogfuyz\"}],\"detailedStatus\":\"ProvisioningFailed\",\"detailedStatusMessage\":\"limbyqecroodlik\",\"fabricControllerId\":\"drdaasa\",\"managedResourceGroupConfiguration\":{\"location\":\"bsmfkwiyjvz\",\"name\":\"osrnawnvzmlnkoy\"},\"managerExtendedLocation\":{\"name\":\"xvjabjq\",\"type\":\"axuyvymcnud\"},\"provisioningState\":\"Provisioning\",\"vmSize\":\"bhjxwxqweuipmpv\"},\"location\":\"m\",\"tags\":{\"fhyrfrakk\":\"sqxtltclkrdpq\",\"rcwfcmfcnrjajq\":\"d\"},\"id\":\"atxjtiel\",\"name\":\"zqgxx\",\"type\":\"fbbmtlp\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListByResourceGroupMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListByResourceGroupMockTests.java index 509638b12236..1c108ccf1066 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListByResourceGroupMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListByResourceGroupMockTests.java @@ -23,7 +23,7 @@ public final class ClusterManagersListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"ubtlmjtg\",\"identity\":{\"principalId\":\"aafe2364-df15-4e95-9ae4-ed6e5e71e467\",\"tenantId\":\"04d6d76d-65f0-4c30-91d3-82e3f0e012ef\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"kmfd\":{\"principalId\":\"fde6266c-aa74-4183-87d7-5b341a6061d4\",\"clientId\":\"8377aba2-6ace-4bbe-850f-1fe36c5bef64\"},\"xgbkkqvjcteo\":{\"principalId\":\"1ee43e40-4ae0-4dcc-89ed-9c49adae5eb9\",\"clientId\":\"6e248b0b-7728-48ec-93a0-c448edcfe00a\"},\"rslskkzp\":{\"principalId\":\"19d2d8dc-c932-4eff-98c7-8e13535c4a25\",\"clientId\":\"0402a5a6-e26f-438c-bdb4-4aaa47c5a8aa\"},\"nzdpvoco\":{\"principalId\":\"330c67bd-25cf-4b37-a0ff-9f259815fa37\",\"clientId\":\"89cc80b6-647c-42de-9fd0-5fe21cd814b4\"}}},\"properties\":{\"analyticsWorkspaceId\":\"pcnab\",\"availabilityZones\":[\"snggytexvzilmhiv\",\"kwwwnckn\",\"zdajlskzptjxu\",\"weucyrth\"],\"clusterVersions\":[{\"supportExpiryDate\":\"h\",\"targetClusterVersion\":\"gcj\"},{\"supportExpiryDate\":\"n\",\"targetClusterVersion\":\"hokamvfej\"},{\"supportExpiryDate\":\"nttmbq\",\"targetClusterVersion\":\"bzfivfok\"},{\"supportExpiryDate\":\"sthhzagjfwy\",\"targetClusterVersion\":\"lhgenuzejgvkv\"}],\"detailedStatus\":\"UpdateFailed\",\"detailedStatusMessage\":\"szllrzlsmmdqgmi\",\"fabricControllerId\":\"zpimcqrhn\",\"managedResourceGroupConfiguration\":{\"location\":\"inklogxs\",\"name\":\"zarhzvqnsqktcmbj\"},\"managerExtendedLocation\":{\"name\":\"zoslpkybtgl\",\"type\":\"kzpgaj\"},\"provisioningState\":\"Succeeded\",\"vmSize\":\"emqbmfuvqarwzxuq\"},\"location\":\"bluimmbw\",\"tags\":{\"kraokq\":\"gtdmbvx\",\"aokbavlyttaaknwf\":\"budbt\"},\"id\":\"ke\",\"name\":\"sm\",\"type\":\"p\"}]}"; + = "{\"value\":[{\"etag\":\"ubtlmjtg\",\"identity\":{\"principalId\":\"ef734fe1-0ead-46b3-b9f4-00689c2ec19e\",\"tenantId\":\"62a37feb-7db1-4240-9e96-dc716543bedc\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"kmfd\":{\"principalId\":\"648e932f-03cd-4984-a43d-cdf585d45a56\",\"clientId\":\"df332ecf-287b-4324-82c7-e0bc4e5ea1aa\"},\"xgbkkqvjcteo\":{\"principalId\":\"4096a918-3bdb-4aad-8030-9b598b0f7aa9\",\"clientId\":\"d6e25a60-9e60-443b-87d9-ee08f203a6d3\"},\"rslskkzp\":{\"principalId\":\"a806e390-dc43-422d-b01b-131c81f65639\",\"clientId\":\"d2662aa6-ca85-4633-9735-a9678ec404e1\"},\"nzdpvoco\":{\"principalId\":\"c5c3f6db-110c-4b54-91a3-3907b7efdaac\",\"clientId\":\"b29ae816-237a-4ad9-b275-293673b72cc1\"}}},\"properties\":{\"analyticsWorkspaceId\":\"pcnab\",\"availabilityZones\":[\"snggytexvzilmhiv\",\"kwwwnckn\",\"zdajlskzptjxu\",\"weucyrth\"],\"clusterVersions\":[{\"supportExpiryDate\":\"h\",\"targetClusterVersion\":\"gcj\"},{\"supportExpiryDate\":\"n\",\"targetClusterVersion\":\"hokamvfej\"},{\"supportExpiryDate\":\"nttmbq\",\"targetClusterVersion\":\"bzfivfok\"},{\"supportExpiryDate\":\"sthhzagjfwy\",\"targetClusterVersion\":\"lhgenuzejgvkv\"}],\"detailedStatus\":\"UpdateFailed\",\"detailedStatusMessage\":\"szllrzlsmmdqgmi\",\"fabricControllerId\":\"zpimcqrhn\",\"managedResourceGroupConfiguration\":{\"location\":\"inklogxs\",\"name\":\"zarhzvqnsqktcmbj\"},\"managerExtendedLocation\":{\"name\":\"zoslpkybtgl\",\"type\":\"kzpgaj\"},\"provisioningState\":\"Succeeded\",\"vmSize\":\"emqbmfuvqarwzxuq\"},\"location\":\"bluimmbw\",\"tags\":{\"kraokq\":\"gtdmbvx\",\"aokbavlyttaaknwf\":\"budbt\"},\"id\":\"ke\",\"name\":\"sm\",\"type\":\"p\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListMockTests.java index dbc4d49929a7..7231355723eb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListMockTests.java @@ -23,7 +23,7 @@ public final class ClusterManagersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"sghpbcbcpzarpze\",\"identity\":{\"principalId\":\"c3b31af6-9f17-4427-8a7d-3e430a6467d4\",\"tenantId\":\"53c7d6b8-21e8-4ac9-86d4-dcdabb90fe81\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"pypefcpczshnuq\":{\"principalId\":\"e4448a2e-078c-4c50-a6e5-1191c0c87b46\",\"clientId\":\"c0231ce8-e4e6-4b13-b319-e7898007d783\"}}},\"properties\":{\"analyticsWorkspaceId\":\"aizu\",\"availabilityZones\":[\"huytuszx\"],\"clusterVersions\":[{\"supportExpiryDate\":\"tvegwqiukvzwy\",\"targetClusterVersion\":\"tthaokgkskj\"}],\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"shajqf\",\"fabricControllerId\":\"kpeexpgeumilh\",\"managedResourceGroupConfiguration\":{\"location\":\"trdexyionofnin\",\"name\":\"bzsx\"},\"managerExtendedLocation\":{\"name\":\"qqrsmpcbbprtugav\",\"type\":\"zbcyksiv\"},\"provisioningState\":\"Updating\",\"vmSize\":\"dr\"},\"location\":\"fcmkr\",\"tags\":{\"xkecifhocj\":\"jcwjjxsgmbawvif\",\"txvcm\":\"wkloozr\",\"yeyng\":\"funlcpxxvi\",\"rquv\":\"g\"},\"id\":\"ygg\",\"name\":\"pmcrdcuelj\",\"type\":\"iahxmfqryarvs\"}]}"; + = "{\"value\":[{\"etag\":\"sghpbcbcpzarpze\",\"identity\":{\"principalId\":\"8194bb0c-7549-438c-8016-fe282c17775e\",\"tenantId\":\"4419b758-7a33-479f-a73a-a5d53f87bbb6\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"pypefcpczshnuq\":{\"principalId\":\"26b9328a-794f-4385-a13c-5595d864b151\",\"clientId\":\"87ea4b3c-7120-4e54-a4fb-30f6522cbac6\"}}},\"properties\":{\"analyticsWorkspaceId\":\"aizu\",\"availabilityZones\":[\"huytuszx\"],\"clusterVersions\":[{\"supportExpiryDate\":\"tvegwqiukvzwy\",\"targetClusterVersion\":\"tthaokgkskj\"}],\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"shajqf\",\"fabricControllerId\":\"kpeexpgeumilh\",\"managedResourceGroupConfiguration\":{\"location\":\"trdexyionofnin\",\"name\":\"bzsx\"},\"managerExtendedLocation\":{\"name\":\"qqrsmpcbbprtugav\",\"type\":\"zbcyksiv\"},\"provisioningState\":\"Updating\",\"vmSize\":\"dr\"},\"location\":\"fcmkr\",\"tags\":{\"xkecifhocj\":\"jcwjjxsgmbawvif\",\"txvcm\":\"wkloozr\",\"yeyng\":\"funlcpxxvi\",\"rquv\":\"g\"},\"id\":\"ygg\",\"name\":\"pmcrdcuelj\",\"type\":\"iahxmfqryarvs\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CommandOutputOverrideTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CommandOutputOverrideTests.java index 83669e8a0b6c..ca082a429502 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CommandOutputOverrideTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CommandOutputOverrideTests.java @@ -15,12 +15,13 @@ public final class CommandOutputOverrideTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CommandOutputOverride model = BinaryData.fromString( - "{\"associatedIdentity\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"ftwwaezkojvdc\"},\"commandOutputType\":\"BareMetalMachineRunReadCommands\",\"containerUrl\":\"qouicybxarzgsz\"}") + "{\"associatedIdentity\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"ftwwaezkojvdc\"},\"commandOutputType\":\"BareMetalMachineRunDataExtractsRestricted\",\"containerUrl\":\"qouicybxarzgsz\"}") .toObject(CommandOutputOverride.class); Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, model.associatedIdentity().identityType()); Assertions.assertEquals("ftwwaezkojvdc", model.associatedIdentity().userAssignedIdentityResourceId()); - Assertions.assertEquals(CommandOutputType.BARE_METAL_MACHINE_RUN_READ_COMMANDS, model.commandOutputType()); + Assertions.assertEquals(CommandOutputType.BARE_METAL_MACHINE_RUN_DATA_EXTRACTS_RESTRICTED, + model.commandOutputType()); Assertions.assertEquals("qouicybxarzgsz", model.containerUrl()); } @@ -30,13 +31,14 @@ public void testSerialize() throws Exception { .withAssociatedIdentity( new IdentitySelector().withIdentityType(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY) .withUserAssignedIdentityResourceId("ftwwaezkojvdc")) - .withCommandOutputType(CommandOutputType.BARE_METAL_MACHINE_RUN_READ_COMMANDS) + .withCommandOutputType(CommandOutputType.BARE_METAL_MACHINE_RUN_DATA_EXTRACTS_RESTRICTED) .withContainerUrl("qouicybxarzgsz"); model = BinaryData.fromObject(model).toObject(CommandOutputOverride.class); Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, model.associatedIdentity().identityType()); Assertions.assertEquals("ftwwaezkojvdc", model.associatedIdentity().userAssignedIdentityResourceId()); - Assertions.assertEquals(CommandOutputType.BARE_METAL_MACHINE_RUN_READ_COMMANDS, model.commandOutputType()); + Assertions.assertEquals(CommandOutputType.BARE_METAL_MACHINE_RUN_DATA_EXTRACTS_RESTRICTED, + model.commandOutputType()); Assertions.assertEquals("qouicybxarzgsz", model.containerUrl()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CommandOutputSettingsTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CommandOutputSettingsTests.java index a40463bb1be6..484057cdcca7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CommandOutputSettingsTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CommandOutputSettingsTests.java @@ -17,7 +17,7 @@ public final class CommandOutputSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CommandOutputSettings model = BinaryData.fromString( - "{\"associatedIdentity\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"etaebu\"},\"containerUrl\":\"vdmovsmzlxwabm\",\"overrides\":[{\"associatedIdentity\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"rvtp\"},\"commandOutputType\":\"StorageRunReadCommands\",\"containerUrl\":\"mqlgk\"},{\"associatedIdentity\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"oaongbjc\"},\"commandOutputType\":\"BareMetalMachineRunReadCommands\",\"containerUrl\":\"i\"}]}") + "{\"associatedIdentity\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"etaebu\"},\"containerUrl\":\"vdmovsmzlxwabm\",\"overrides\":[{\"associatedIdentity\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"rvtp\"},\"commandOutputType\":\"StorageRunReadCommands\",\"containerUrl\":\"mqlgk\"},{\"associatedIdentity\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"oaongbjc\"},\"commandOutputType\":\"BareMetalMachineRunDataExtractsRestricted\",\"containerUrl\":\"i\"}]}") .toObject(CommandOutputSettings.class); Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, model.associatedIdentity().identityType()); @@ -49,7 +49,7 @@ public void testSerialize() throws Exception { .withAssociatedIdentity(new IdentitySelector() .withIdentityType(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY) .withUserAssignedIdentityResourceId("oaongbjc")) - .withCommandOutputType(CommandOutputType.BARE_METAL_MACHINE_RUN_READ_COMMANDS) + .withCommandOutputType(CommandOutputType.BARE_METAL_MACHINE_RUN_DATA_EXTRACTS_RESTRICTED) .withContainerUrl("i"))); model = BinaryData.fromObject(model).toObject(CommandOutputSettings.class); Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ManagedServiceIdentityTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ManagedServiceIdentityTests.java index cc329d9e13a3..16ed484438f0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ManagedServiceIdentityTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ManagedServiceIdentityTests.java @@ -16,7 +16,7 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"d85877f6-3da4-49a1-bc36-6abdb28bd1d5\",\"tenantId\":\"50215f84-f0df-45d8-8fd3-cca4d7d25498\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"rjxgciqib\":{\"principalId\":\"e01ffa55-7c5d-4c64-83f7-923bcc440ede\",\"clientId\":\"733e849f-7e73-4e11-9d6a-d2daab0edfc9\"},\"sxsdqrhzoymibm\":{\"principalId\":\"d338c106-40f4-4312-b665-6ce26aa28138\",\"clientId\":\"1a6aaf4d-a6d7-4ab9-bd1a-56345b7b7456\"}}}") + "{\"principalId\":\"3a2f607e-234e-49e7-bee5-ff900641e417\",\"tenantId\":\"5e2702a7-4043-450a-93a2-8b87c6c4a0d6\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"rjxgciqib\":{\"principalId\":\"fe67100b-50d6-4c4c-8811-978beaadcc05\",\"clientId\":\"1107ecf2-5f68-4d9b-b133-b85117ef8d9f\"},\"sxsdqrhzoymibm\":{\"principalId\":\"f88cf1d1-a868-4372-8974-206ba050da4e\",\"clientId\":\"0c2ab54c-1e9e-4505-9880-fb00b0aecb16\"}}}") .toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/UserAssignedIdentityTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/UserAssignedIdentityTests.java index 4a71d2691b95..0e7669bdff83 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/UserAssignedIdentityTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/UserAssignedIdentityTests.java @@ -11,7 +11,7 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"62856e64-cb67-4e43-b5f2-5d2f42d94f99\",\"clientId\":\"151287c7-4792-43fb-bb91-c3e60d230ba2\"}") + "{\"principalId\":\"2351a4e7-de83-494f-a937-b54d02ca59e2\",\"clientId\":\"91a543c1-0729-469c-ab85-527eb1696545\"}") .toObject(UserAssignedIdentity.class); } From 3e2b2f6b6c0d99c5d6da1e9717d53471379f0e6d Mon Sep 17 00:00:00 2001 From: Tarun Khattar <114153772+khattartarun@users.noreply.github.com> Date: Wed, 17 Dec 2025 11:44:06 +0530 Subject: [PATCH 169/186] Deperecate Mobilenetwork package (#47568) --- eng/versioning/version_client.txt | 2 +- .../azure-resourcemanager-mobilenetwork/CHANGELOG.md | 10 ++++------ .../azure-resourcemanager-mobilenetwork/README.md | 2 ++ .../azure-resourcemanager-mobilenetwork/pom.xml | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 7d38760ce3c0..663137c7ddbf 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -400,7 +400,7 @@ com.azure.resourcemanager:azure-resourcemanager-edgeorder;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-securityinsights;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-oep;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-dnsresolver;1.1.0;1.2.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-mobilenetwork;1.3.0;1.4.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-mobilenetwork;1.3.0;1.3.1 com.azure.resourcemanager:azure-resourcemanager-azureadexternalidentities;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-dashboard;1.2.0;1.3.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-servicelinker;1.0.0;1.1.0-beta.1 diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md index 43fb9ad2085f..b7e8a5d888b0 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md @@ -1,15 +1,13 @@ # Release History -## 1.4.0-beta.1 (Unreleased) +## 1.3.1 (2025-12-16) -### Features Added - -### Breaking Changes - -### Bugs Fixed +- Please note, this package has been deprecated and will no longer be maintained after 09-30-2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. ### Other Changes +- Please note, this package has been deprecated and will no longer be maintained after 09-30-2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. + ## 1.3.0 (2024-12-23) - Azure Resource Manager MobileNetwork client library for Java. This package contains Microsoft Azure SDK for MobileNetwork Management SDK. The resources in this API specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance. Package tag package-2024-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/README.md b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/README.md index f74dfd75bac5..e33bccebeb55 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/README.md +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/README.md @@ -1,5 +1,7 @@ # Azure Resource Manager MobileNetwork client library for Java +Please note, this package has been deprecated and will no longer be maintained after 09-30-2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. + Azure Resource Manager MobileNetwork client library for Java. This package contains Microsoft Azure SDK for MobileNetwork Management SDK. The resources in this API specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance. Package tag package-2024-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml index ce4128b6d76b..80d74e858b2e 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml @@ -14,11 +14,11 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-mobilenetwork</artifactId> - <version>1.4.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-mobilenetwork;current} --> + <version>1.3.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-mobilenetwork;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for MobileNetwork Management</name> - <description>This package contains Microsoft Azure SDK for MobileNetwork Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The resources in this API specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance. Package tag package-2024-04.</description> + <description>Please note, this package has been deprecated and will no longer be maintained after 09-30-2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details.</description> <url>https://github.com/Azure/azure-sdk-for-java</url> <licenses> From 854e44d3c403019f87da06efcec4e5ad5c3a7e4b Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 16 Dec 2025 23:18:29 -0800 Subject: [PATCH 170/186] Increment package versions for networkcloud releases (#47572) --- eng/versioning/version_client.txt | 2 +- .../azure-resourcemanager-networkcloud/CHANGELOG.md | 10 ++++++++++ .../azure-resourcemanager-networkcloud/pom.xml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 663137c7ddbf..0ccfe826cfc9 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -440,7 +440,7 @@ com.azure.resourcemanager:azure-resourcemanager-paloaltonetworks-ngfw;1.3.0;1.4. com.azure.resourcemanager:azure-resourcemanager-newrelicobservability;1.2.0;1.3.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-qumulo;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-selfhelp;1.0.0;1.1.0-beta.6 -com.azure.resourcemanager:azure-resourcemanager-networkcloud;2.0.0;2.1.0 +com.azure.resourcemanager:azure-resourcemanager-networkcloud;2.1.0;2.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-cosmosdbforpostgresql;1.0.0;1.1.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-managementgroups;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-managednetworkfabric;1.1.0;1.2.0-beta.1 diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/CHANGELOG.md b/sdk/networkcloud/azure-resourcemanager-networkcloud/CHANGELOG.md index 3611781ba80a..9f30d53b8ab6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/CHANGELOG.md +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 2.2.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 2.1.0 (2025-12-17) - Azure Resource Manager NetworkCloud client library for Java. This package contains Microsoft Azure SDK for NetworkCloud Management SDK. The Network Cloud APIs provide management of the Azure Operator Nexus compute resources such as on-premises clusters, hardware resources, and workload infrastructure resources. Package tag package-2025-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/pom.xml b/sdk/networkcloud/azure-resourcemanager-networkcloud/pom.xml index b1c32dd8004d..ef569c6d8c32 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/pom.xml +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/pom.xml @@ -14,7 +14,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-networkcloud</artifactId> - <version>2.1.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-networkcloud;current} --> + <version>2.2.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-networkcloud;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for NetworkCloud Management</name> From c27de97b4b4198f03cb79b0bb867a5da6bb04c92 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 17 Dec 2025 00:43:08 -0800 Subject: [PATCH 171/186] Increment package versions for mobilenetwork releases (#47573) --- eng/versioning/version_client.txt | 2 +- .../azure-resourcemanager-mobilenetwork/CHANGELOG.md | 10 ++++++++++ .../azure-resourcemanager-mobilenetwork/pom.xml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 0ccfe826cfc9..2828d7c96894 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -400,7 +400,7 @@ com.azure.resourcemanager:azure-resourcemanager-edgeorder;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-securityinsights;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-oep;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-dnsresolver;1.1.0;1.2.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-mobilenetwork;1.3.0;1.3.1 +com.azure.resourcemanager:azure-resourcemanager-mobilenetwork;1.3.1;1.4.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-azureadexternalidentities;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-dashboard;1.2.0;1.3.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-servicelinker;1.0.0;1.1.0-beta.1 diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md index b7e8a5d888b0..689067b40a1d 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.4.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.3.1 (2025-12-16) - Please note, this package has been deprecated and will no longer be maintained after 09-30-2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml index 80d74e858b2e..7ddf8e883572 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml @@ -14,7 +14,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-mobilenetwork</artifactId> - <version>1.3.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-mobilenetwork;current} --> + <version>1.4.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-mobilenetwork;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for MobileNetwork Management</name> From 8f35cac18a5b9b5cff1986d3ff740bb63132fcaa Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Dec 2025 12:04:45 -0800 Subject: [PATCH 172/186] Fix confusing disableAutoComplete() examples in Service Bus documentation (#47274) --- sdk/servicebus/azure-messaging-servicebus/README.md | 4 ---- .../azure/messaging/servicebus/ServiceBusClientBuilder.java | 4 ---- .../azure/messaging/servicebus/ServiceBusProcessorClient.java | 3 --- .../java/com/azure/messaging/servicebus/package-info.java | 1 - .../ServiceBusProcessorClientJavaDocCodeSamples.java | 3 --- .../ServiceBusReceiverClientJavaDocCodeSamples.java | 1 - 6 files changed, 16 deletions(-) diff --git a/sdk/servicebus/azure-messaging-servicebus/README.md b/sdk/servicebus/azure-messaging-servicebus/README.md index 2ca83c02e404..d47c8124f670 100644 --- a/sdk/servicebus/azure-messaging-servicebus/README.md +++ b/sdk/servicebus/azure-messaging-servicebus/README.md @@ -265,7 +265,6 @@ ServiceBusProcessorClient processorClient = new ServiceBusClientBuilder() .disableAutoComplete() // Make sure to explicitly opt in to manual settlement (e.g. complete, abandon). .processMessage(processMessage) .processError(processError) - .disableAutoComplete() .buildProcessorClient(); // Starts the processor in the background. Control returns immediately. @@ -302,7 +301,6 @@ TokenCredential tokenCredential = new DefaultAzureCredentialBuilder().build(); // Create the processor client via the builder and its sub-builder // 'fullyQualifiedNamespace' will look similar to "{your-namespace}.servicebus.windows.net" -// 'disableAutoComplete()' will opt in to manual settlement (e.g. complete, abandon). ServiceBusProcessorClient processorClient = new ServiceBusClientBuilder() .credential(fullyQualifiedNamespace, tokenCredential) .processor() @@ -310,7 +308,6 @@ ServiceBusProcessorClient processorClient = new ServiceBusClientBuilder() .receiveMode(ServiceBusReceiveMode.RECEIVE_AND_DELETE) .processMessage(processMessage) .processError(processError) - .disableAutoComplete() .buildProcessorClient(); // Starts the processor in the background. Control returns immediately. @@ -385,7 +382,6 @@ created the same way as shown below. Learn more about dead-letter queue [here][d TokenCredential credential = new DefaultAzureCredentialBuilder().build(); // 'fullyQualifiedNamespace' will look similar to "{your-namespace}.servicebus.windows.net" -// 'disableAutoComplete' indicates that users will explicitly settle their message. ServiceBusReceiverClient receiver = new ServiceBusClientBuilder() .credential(fullyQualifiedNamespace, credential) .receiver() // Use this for session or non-session enabled queue or topic/subscriptions diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusClientBuilder.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusClientBuilder.java index 089f87a89b99..c4f868e13124 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusClientBuilder.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusClientBuilder.java @@ -254,7 +254,6 @@ * .disableAutoComplete() // Make sure to explicitly opt in to manual settlement (e.g. complete, abandon). * .processMessage(processMessage) * .processError(processError) - * .disableAutoComplete() * .buildProcessorClient(); * * // Starts the processor in the background. Control returns immediately. @@ -2333,7 +2332,6 @@ private ServiceBusSessionReceiverAsyncClient buildAsyncClient(boolean isForSyncM * .disableAutoComplete() // Make sure to explicitly opt in to manual settlement (e.g. complete, abandon). * .processMessage(processMessage) * .processError(processError) - * .disableAutoComplete() * .buildProcessorClient(); * * // Starts the processor in the background. Control returns immediately. @@ -2370,7 +2368,6 @@ private ServiceBusSessionReceiverAsyncClient buildAsyncClient(boolean isForSyncM * * // Create the processor client via the builder and its sub-builder * // 'fullyQualifiedNamespace' will look similar to "{your-namespace}.servicebus.windows.net" - * // 'disableAutoComplete()' will opt in to manual settlement (e.g. complete, abandon). * ServiceBusProcessorClient processorClient = new ServiceBusClientBuilder() * .credential(fullyQualifiedNamespace, tokenCredential) * .processor() @@ -2378,7 +2375,6 @@ private ServiceBusSessionReceiverAsyncClient buildAsyncClient(boolean isForSyncM * .receiveMode(ServiceBusReceiveMode.RECEIVE_AND_DELETE) * .processMessage(processMessage) * .processError(processError) - * .disableAutoComplete() * .buildProcessorClient(); * * // Starts the processor in the background. Control returns immediately. diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusProcessorClient.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusProcessorClient.java index 1087db0d8230..508b0e2c6b2e 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusProcessorClient.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusProcessorClient.java @@ -79,7 +79,6 @@ * .disableAutoComplete() // Make sure to explicitly opt in to manual settlement (e.g. complete, abandon). * .processMessage(processMessage) * .processError(processError) - * .disableAutoComplete() * .buildProcessorClient(); * * // Starts the processor in the background. Control returns immediately. @@ -116,7 +115,6 @@ * * // Create the processor client via the builder and its sub-builder * // 'fullyQualifiedNamespace' will look similar to "{your-namespace}.servicebus.windows.net" - * // 'disableAutoComplete()' will opt in to manual settlement (e.g. complete, abandon). * ServiceBusProcessorClient processorClient = new ServiceBusClientBuilder() * .credential(fullyQualifiedNamespace, tokenCredential) * .processor() @@ -124,7 +122,6 @@ * .receiveMode(ServiceBusReceiveMode.RECEIVE_AND_DELETE) * .processMessage(processMessage) * .processError(processError) - * .disableAutoComplete() * .buildProcessorClient(); * * // Starts the processor in the background. Control returns immediately. diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/package-info.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/package-info.java index 3208dab01980..857f9c0c9ab6 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/package-info.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/package-info.java @@ -184,7 +184,6 @@ * .disableAutoComplete() // Make sure to explicitly opt in to manual settlement (e.g. complete, abandon). * .processMessage(processMessage) * .processError(processError) - * .disableAutoComplete() * .buildProcessorClient(); * * // Starts the processor in the background. Control returns immediately. diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusProcessorClientJavaDocCodeSamples.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusProcessorClientJavaDocCodeSamples.java index fe33b2485269..f2637cec7244 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusProcessorClientJavaDocCodeSamples.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusProcessorClientJavaDocCodeSamples.java @@ -84,7 +84,6 @@ public void createServiceBusProcessorClientInPeekLockMode() { .disableAutoComplete() // Make sure to explicitly opt in to manual settlement (e.g. complete, abandon). .processMessage(processMessage) .processError(processError) - .disableAutoComplete() .buildProcessorClient(); // Starts the processor in the background. Control returns immediately. @@ -125,7 +124,6 @@ public void createServiceBusProcessorClientInReceiveAndDeleteMode() { // Create the processor client via the builder and its sub-builder // 'fullyQualifiedNamespace' will look similar to "{your-namespace}.servicebus.windows.net" - // 'disableAutoComplete()' will opt in to manual settlement (e.g. complete, abandon). ServiceBusProcessorClient processorClient = new ServiceBusClientBuilder() .credential(fullyQualifiedNamespace, tokenCredential) .processor() @@ -133,7 +131,6 @@ public void createServiceBusProcessorClientInReceiveAndDeleteMode() { .receiveMode(ServiceBusReceiveMode.RECEIVE_AND_DELETE) .processMessage(processMessage) .processError(processError) - .disableAutoComplete() .buildProcessorClient(); // Starts the processor in the background. Control returns immediately. diff --git a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusReceiverClientJavaDocCodeSamples.java b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusReceiverClientJavaDocCodeSamples.java index 382e50bef798..d5a1a2ee300f 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusReceiverClientJavaDocCodeSamples.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/ServiceBusReceiverClientJavaDocCodeSamples.java @@ -114,7 +114,6 @@ public void instantiateDeadLetterQueue() { TokenCredential credential = new DefaultAzureCredentialBuilder().build(); // 'fullyQualifiedNamespace' will look similar to "{your-namespace}.servicebus.windows.net" - // 'disableAutoComplete' indicates that users will explicitly settle their message. ServiceBusReceiverClient receiver = new ServiceBusClientBuilder() .credential(fullyQualifiedNamespace, credential) .receiver() // Use this for session or non-session enabled queue or topic/subscriptions From 520270d10fca623b59cd4f83ee349f07588b3e22 Mon Sep 17 00:00:00 2001 From: Sameeksha Vaity <savaity@microsoft.com> Date: Wed, 17 Dec 2025 12:04:52 -0800 Subject: [PATCH 173/186] Update copilot instructions to include azure-sdk-mcp config info (#47535) --- .github/copilot-instructions.md | 41 ++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 14d9d4576a6a..ce5b56587f72 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -25,11 +25,50 @@ The Azure SDK for Java repository contains client libraries for Azure services, ### Prerequisites - To use Azure MCP tool calls, users must have PowerShell installed. Provide [PowerShell installation instructions](https://learn.microsoft.com/powershell/scripting/install/installing-powershell) if not installed, and recommend restarting the IDE to start the MCP server. -- When using Copilot from Visual Studio or VS Code (not applicable when using Coding Agent on Github.com): +- See the next section for how to set up the Azure SDK MCP server in your IDE for advanced Copilot features. +- When using Copilot from IntelliJ, Visual Studio, VS Code (not applicable when using Coding Agent on Github.com): - **Always run** the [`azsdk_verify_setup`](../eng/common/instructions/azsdk-tools/verify-setup.instructions.md) tool first to validate the user's development environment for SDK MCP tools. - **Do not proceed** with any other tool execution until this step is complete. - **Skip this check only** for queries that do not require tool execution. +## Azure SDK MCP Server: Quick Start + +The Azure SDK MCP server enables advanced Copilot-powered automation, validation, and Azure-specific guidance in your IDE. + +| IDE | Config File Location | What to Do | +|----------|------------------------------------|---------------------------| +| IntelliJ | `github-copilot/intellij/mcp.json` | Add the JSON config below | + +### Configuration Example + +#### IntelliJ (`github-copilot/intellij/mcp.json`) +```json +{ + "servers": { + "azure-sdk-mcp": { + "type": "stdio", + "command": "pwsh", + "args": [ + "<Path to azure-sdk-for-java repo>/eng/common/mcp/azure-sdk-mcp.ps1", + "-Run" + ] + } + } +} +``` + +- Make sure PowerShell is installed and available in your system PATH. +- Replace `<Path to azure-sdk-for-java repo>` with the absolute path to your local clone of the Azure SDK for Java repository. + +### Troubleshooting + +- If IntelliJ does not detect the MCP server, double-check the path and file name. +- Start the server manually with: + ```powershell + eng/common/mcp/azure-sdk-mcp.ps1 -Run + ``` +- For more help, see [eng/common/mcp/README.md](../eng/common/mcp/README.md) or open an issue. + ## Behavior - Always ensure your solutions prioritize clarity, maintainability, and testability. From da9a9aaf5ce8b93c4da60479eb2cf061a788f5fd Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 17 Dec 2025 14:36:34 -0800 Subject: [PATCH 174/186] Remove Invoke-ToolDescriptionEvaluator script (#47575) Co-authored-by: Summer Warren <summerwarren@microsoft.com> --- .../Invoke-ToolDescriptionEvaluator.ps1 | 112 ------------------ 1 file changed, 112 deletions(-) delete mode 100644 eng/common/scripts/Invoke-ToolDescriptionEvaluator.ps1 diff --git a/eng/common/scripts/Invoke-ToolDescriptionEvaluator.ps1 b/eng/common/scripts/Invoke-ToolDescriptionEvaluator.ps1 deleted file mode 100644 index 6029917adcfd..000000000000 --- a/eng/common/scripts/Invoke-ToolDescriptionEvaluator.ps1 +++ /dev/null @@ -1,112 +0,0 @@ -<# -.SYNOPSIS - Evaluates tool and prompt descriptions and produces a Markdown results report using Tool Description Evaluator from Mcp repo. - -.DESCRIPTION - This script builds and runs the ToolDescriptionEvaluator (.NET) against a set of tool and prompt definitions. - It restores and compiles the evaluator, executes it with the provided JSON inputs, and emits a `results.md` - report. The script supports configuration via parameters and environment variables for the embedding model - service used during evaluation. - -.LINK - https://github.com/microsoft/mcp/tree/main/eng/tools/ToolDescriptionEvaluator - -.PARAMETER EvaluatorPath - The path to the evaluator project root (or its `src` directory) that will be restored, built, and executed. - -.PARAMETER ToolsFilePath - The path to the JSON file containing tool definitions to be evaluated. - -.PARAMETER PromptsFilePath - The path to the JSON file containing prompt definitions to be evaluated. - -.PARAMETER OutputFilePath - The target file path where the generated `results.md` will be moved after the evaluator runs. - -.PARAMETER AoaiEndpoint - The full endpoint URL for the embedding model (e.g., Azure OpenAI embeddings) used by the evaluator. - -.PARAMETER TextEmbeddingApiKey - The API key used to authenticate with the embedding endpoint. Prefer providing this via a secure - secret store or environment variable rather than hard-coding. - -.NOTES - - The evaluator emits `results.md` in the evaluator folder; this script moves it to `OutputFilePath`. - - Requires .NET SDK available on PATH. - - Set-StrictMode is enabled. - -.EXAMPLE - .\Invoke-ToolDescriptionEvaluator.ps1 ` - -EvaluatorPath "C:\work\mcp\eng\tools\ToolDescriptionEvaluator\src" ` - -ToolsFilePath "C:\work\azure-sdk-tools\tools\azsdk-cli\azure-sdk-tools.json" ` - -PromptsFilePath "C:\work\azure-sdk-tools\tools\azsdk-cli\azure-sdk-prompts.json" ` - -OutputFilePath "C:\work\azure-sdk-tools\tools\azsdk-cli" ` - -AoaiEndpoint "https://<your-endpoint>/openai/deployments/text-embedding-3-large/embeddings?api-version=2023-05-15" ` - -TextEmbeddingApiKey (Get-Secret -Name 'TextEmbeddingApiKey') - - Runs the evaluator with the specified tools and prompts files, then moves the generated results to the output path. -#> -param ( - [Parameter(Mandatory = $true)] - [string] $EvaluatorPath, - - [Parameter(Mandatory = $true)] - [string] $ToolsFilePath, - - [Parameter(Mandatory = $true)] - [string] $PromptsFilePath, - - [Parameter(Mandatory = $true)] - [string] $OutputFilePath, - - # Environment Variables - [Parameter(Mandatory = $true)] - [string] $AoaiEndpoint, - - [Parameter(Mandatory = $true)] - [string] $TextEmbeddingApiKey -) - -Set-StrictMode -Version 3 - -# Validate input paths -$pathsToCheck = @{ - "EvaluatorPath" = $EvaluatorPath - "ToolsFilePath" = $ToolsFilePath - "PromptsFilePath" = $PromptsFilePath - "OutputFilePath" = $OutputFilePath -} - -foreach ($p in $pathsToCheck.GetEnumerator()) { - if (-not (Test-Path -Path $p.Value)) { - throw "Path does not exist for parameter '$($p.Key)': $($p.Value)" - } -} - -# Build & run the evaluator -Write-Host "Changing directory to evaluator: $EvaluatorPath" -Push-Location $EvaluatorPath -try { - $env:AOAI_ENDPOINT = $AoaiEndpoint - $env:TEXT_EMBEDDING_API_KEY = $TextEmbeddingApiKey - - Write-Host "Running Tool..." - dotnet run --configuration Release -- --tools-file "$ToolsFilePath" --prompts-file "$PromptsFilePath" -} -finally { - Pop-Location - Remove-Item Env:\AOAI_ENDPOINT -ErrorAction SilentlyContinue - Remove-Item Env:\TEXT_EMBEDDING_API_KEY -ErrorAction SilentlyContinue -} - -# The tool emits results.md in the evaluator folder -$generatedName = 'results.md' -$EvaluatorRoot = Split-Path $EvaluatorPath -Parent -$generatedPath = Join-Path -Path $EvaluatorRoot -ChildPath $generatedName -if (-not (Test-Path -Path $generatedPath -PathType Leaf)) { - throw "Expected output file not found: $generatedPath" -} - -Write-Host "Moving Results File: $generatedPath -> $OutputFilePath" -Move-Item -Path $generatedPath -Destination $OutputFilePath -Force -Write-Host "Successfully moved results file to $OutputFilePath" \ No newline at end of file From 1d7fe82da339bad067c6302fdee1c4e8bcd88be1 Mon Sep 17 00:00:00 2001 From: Allen Kim <allenkim0129@gmail.com> Date: Wed, 17 Dec 2025 15:54:35 -0800 Subject: [PATCH 175/186] Add test for float16 type (#47570) --- .../com/azure/cosmos/rx/VectorIndexTest.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/VectorIndexTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/VectorIndexTest.java index 6390f8ba2df0..60429a598b1a 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/VectorIndexTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/VectorIndexTest.java @@ -336,7 +336,13 @@ private List<CosmosVectorIndexSpec> populateVectorIndexes() { cosmosVectorIndexSpec3.setIndexingSearchListSize(30); cosmosVectorIndexSpec3.setVectorIndexShardKeys(Arrays.asList("/country/city")); - return Arrays.asList(cosmosVectorIndexSpec1, cosmosVectorIndexSpec2, cosmosVectorIndexSpec3); + CosmosVectorIndexSpec cosmosVectorIndexSpec4 = new CosmosVectorIndexSpec(); + cosmosVectorIndexSpec4.setPath("/vector4"); + cosmosVectorIndexSpec4.setType(CosmosVectorIndexType.QUANTIZED_FLAT.toString()); + cosmosVectorIndexSpec4.setQuantizationSizeInBytes(2); + cosmosVectorIndexSpec4.setVectorIndexShardKeys(Arrays.asList("/zipCode")); + + return Arrays.asList(cosmosVectorIndexSpec1, cosmosVectorIndexSpec2, cosmosVectorIndexSpec3, cosmosVectorIndexSpec4); } private List<CosmosVectorEmbedding> populateEmbeddings() { @@ -357,14 +363,21 @@ private List<CosmosVectorEmbedding> populateEmbeddings() { embedding3.setDataType(CosmosVectorDataType.UINT8); embedding3.setEmbeddingDimensions(3); embedding3.setDistanceFunction(CosmosVectorDistanceFunction.EUCLIDEAN); - return Arrays.asList(embedding1, embedding2, embedding3); + + CosmosVectorEmbedding embedding4 = new CosmosVectorEmbedding(); + embedding4.setPath("/vector4"); + embedding4.setDataType(CosmosVectorDataType.FLOAT16); + embedding4.setEmbeddingDimensions(3); + embedding4.setDistanceFunction(CosmosVectorDistanceFunction.DOT_PRODUCT); + return Arrays.asList(embedding1, embedding2, embedding3, embedding4); } private String getVectorEmbeddingPolicyAsString() { return "{\"vectorEmbeddings\":[" + "{\"path\":\"/vector1\",\"dataType\":\"int8\",\"dimensions\":3,\"distanceFunction\":\"cosine\"}," + "{\"path\":\"/vector2\",\"dataType\":\"float32\",\"dimensions\":3,\"distanceFunction\":\"dotproduct\"}," + - "{\"path\":\"/vector3\",\"dataType\":\"uint8\",\"dimensions\":3,\"distanceFunction\":\"euclidean\"}" + + "{\"path\":\"/vector3\",\"dataType\":\"uint8\",\"dimensions\":3,\"distanceFunction\":\"euclidean\"}," + + "{\"path\":\"/vector4\",\"dataType\":\"float16\",\"dimensions\":3,\"distanceFunction\":\"dotproduct\"}" + "]}"; } } From 60c98002759a67e6b3ca0601c3d6b42c3c646090 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 17 Dec 2025 17:57:38 -0800 Subject: [PATCH 176/186] Configurations: 'specification/vmware/resource-manager/Microsoft.AVS/AVS/tspconfig.yaml', API Version: 2025-09-01, SDK Release Type: stable, and CommitSHA: '8ddf0b8379d711e33e9881f8e5cc0beb044c5b42' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5665551 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. (#47556) --- eng/versioning/version_client.txt | 2 +- .../azure-resourcemanager-avs/CHANGELOG.md | 122 +- sdk/avs/azure-resourcemanager-avs/README.md | 4 +- sdk/avs/azure-resourcemanager-avs/SAMPLE.md | 555 +++- sdk/avs/azure-resourcemanager-avs/pom.xml | 5 +- .../azure/resourcemanager/avs/AvsManager.java | 32 + .../resourcemanager/avs/fluent/AvsClient.java | 14 + .../avs/fluent/LicensesClient.java | 232 ++ .../avs/fluent/MaintenancesClient.java | 181 ++ .../avs/fluent/PrivateCloudsClient.java | 29 + .../avs/fluent/models/AddonInner.java | 11 + .../fluent/models/AdminCredentialsInner.java | 8 + .../avs/fluent/models/CloudLinkInner.java | 11 + .../fluent/models/CloudLinkProperties.java | 8 + .../avs/fluent/models/ClusterInner.java | 20 + .../avs/fluent/models/ClusterProperties.java | 8 + .../models/ClusterUpdateProperties.java | 8 + .../fluent/models/ClusterZoneListInner.java | 11 + .../avs/fluent/models/DatastoreInner.java | 11 + .../fluent/models/DatastoreProperties.java | 20 + .../ExpressRouteAuthorizationInner.java | 11 + .../ExpressRouteAuthorizationProperties.java | 8 + .../models/GlobalReachConnectionInner.java | 11 + .../GlobalReachConnectionProperties.java | 8 + .../fluent/models/HcxEnterpriseSiteInner.java | 11 + .../models/HcxEnterpriseSiteProperties.java | 8 + .../avs/fluent/models/HostModelInner.java | 14 + .../avs/fluent/models/IscsiPathInner.java | 11 + .../fluent/models/IscsiPathProperties.java | 16 + .../avs/fluent/models/LicenseInner.java | 165 + .../fluent/models/LicensePropertiesInner.java | 138 + .../avs/fluent/models/MaintenanceInner.java | 155 + .../avs/fluent/models/OperationInner.java | 11 + .../fluent/models/PlacementPolicyInner.java | 11 + .../PlacementPolicyUpdateProperties.java | 8 + .../avs/fluent/models/PrivateCloudInner.java | 78 +- ....java => PrivateCloudPropertiesInner.java} | 188 +- .../models/PrivateCloudUpdateProperties.java | 20 + .../models/ProvisionedNetworkInner.java | 11 + .../fluent/models/PureStoragePolicyInner.java | 11 + .../avs/fluent/models/QuotaInner.java | 8 + .../avs/fluent/models/ResourceSkuInner.java | 38 + .../avs/fluent/models/ScriptCmdletInner.java | 11 + .../fluent/models/ScriptCmdletProperties.java | 11 + .../fluent/models/ScriptExecutionInner.java | 11 + .../models/ScriptExecutionProperties.java | 22 + .../avs/fluent/models/ScriptPackageInner.java | 11 + .../models/ScriptPackageProperties.java | 8 + .../avs/fluent/models/TrialInner.java | 8 + .../avs/fluent/models/VcfLicenseInner.java | 138 + .../fluent/models/VirtualMachineInner.java | 11 + .../models/VirtualMachineProperties.java | 8 + .../models/WorkloadNetworkDhcpInner.java | 11 + .../WorkloadNetworkDnsServiceInner.java | 11 + .../WorkloadNetworkDnsServiceProperties.java | 8 + .../models/WorkloadNetworkDnsZoneInner.java | 11 + .../WorkloadNetworkDnsZoneProperties.java | 8 + .../models/WorkloadNetworkGatewayInner.java | 11 + .../WorkloadNetworkGatewayProperties.java | 8 + .../fluent/models/WorkloadNetworkInner.java | 11 + .../WorkloadNetworkPortMirroringInner.java | 11 + ...orkloadNetworkPortMirroringProperties.java | 8 + .../models/WorkloadNetworkProperties.java | 8 + .../models/WorkloadNetworkPublicIpInner.java | 11 + .../WorkloadNetworkPublicIpProperties.java | 8 + .../models/WorkloadNetworkSegmentInner.java | 11 + .../WorkloadNetworkSegmentProperties.java | 14 + .../models/WorkloadNetworkVMGroupInner.java | 11 + .../WorkloadNetworkVMGroupProperties.java | 8 + .../WorkloadNetworkVirtualMachineInner.java | 11 + ...rkloadNetworkVirtualMachineProperties.java | 8 + .../avs/implementation/AddonsClientImpl.java | 262 ++ .../AuthorizationsClientImpl.java | 267 ++ .../avs/implementation/AvsClientImpl.java | 34 +- .../implementation/CloudLinksClientImpl.java | 264 ++ .../implementation/ClustersClientImpl.java | 385 +++ .../implementation/DatastoresClientImpl.java | 304 ++ .../GlobalReachConnectionsClientImpl.java | 273 ++ .../HcxEnterpriseSitesClientImpl.java | 218 ++ .../avs/implementation/HostsClientImpl.java | 139 + .../implementation/IscsiPathsClientImpl.java | 235 ++ .../avs/implementation/LicenseImpl.java | 146 + .../implementation/LicensePropertiesImpl.java | 37 + .../implementation/LicensesClientImpl.java | 1163 +++++++ .../avs/implementation/LicensesImpl.java | 184 ++ .../implementation/LocationsClientImpl.java | 59 + .../avs/implementation/MaintenanceImpl.java | 49 + .../MaintenancesClientImpl.java | 1010 +++++++ .../avs/implementation/MaintenancesImpl.java | 143 + .../implementation/OperationsClientImpl.java | 42 + .../PlacementPoliciesClientImpl.java | 401 +++ .../avs/implementation/PrivateCloudImpl.java | 24 + .../PrivateCloudPropertiesImpl.java | 154 + .../PrivateCloudsClientImpl.java | 609 ++++ .../avs/implementation/PrivateCloudsImpl.java | 23 + .../ProvisionedNetworksClientImpl.java | 122 + .../PureStoragePoliciesClientImpl.java | 267 ++ .../ScriptCmdletsClientImpl.java | 142 + .../ScriptExecutionsClientImpl.java | 310 ++ .../ScriptPackagesClientImpl.java | 122 + .../avs/implementation/SkusClientImpl.java | 56 + .../avs/implementation/VcfLicenseImpl.java | 37 + .../VirtualMachinesClientImpl.java | 233 ++ .../WorkloadNetworksClientImpl.java | 2683 +++++++++++++++++ .../avs/implementation/models/AddonList.java | 17 + .../implementation/models/CloudLinkList.java | 17 + .../implementation/models/ClusterList.java | 17 + .../implementation/models/DatastoreList.java | 17 + .../models/ExpressRouteAuthorizationList.java | 18 + .../models/GlobalReachConnectionList.java | 18 + .../models/HcxEnterpriseSiteList.java | 17 + .../implementation/models/HostListResult.java | 17 + .../models/IscsiPathListResult.java | 17 + .../models/LicenseListResult.java | 112 + .../models/MaintenanceListResult.java | 112 + .../models/OperationListResult.java | 17 + .../models/PagedResourceSku.java | 17 + .../models/PlacementPoliciesList.java | 17 + .../models/PrivateCloudList.java | 17 + .../models/ProvisionedNetworkListResult.java | 18 + .../models/PureStoragePolicyListResult.java | 18 + .../models/ScriptCmdletsList.java | 17 + .../models/ScriptExecutionsList.java | 17 + .../models/ScriptPackagesList.java | 17 + .../models/VirtualMachinesList.java | 17 + .../models/WorkloadNetworkDhcpList.java | 17 + .../WorkloadNetworkDnsServicesList.java | 18 + .../models/WorkloadNetworkDnsZonesList.java | 18 + .../models/WorkloadNetworkGatewayList.java | 18 + .../models/WorkloadNetworkList.java | 17 + .../WorkloadNetworkPortMirroringList.java | 18 + .../models/WorkloadNetworkPublicIPsList.java | 18 + .../models/WorkloadNetworkSegmentsList.java | 18 + .../models/WorkloadNetworkVMGroupsList.java | 18 + .../WorkloadNetworkVirtualMachinesList.java | 18 + .../avs/models/AddonArcProperties.java | 9 + .../avs/models/AddonHcxProperties.java | 16 + .../avs/models/AddonProperties.java | 8 + .../avs/models/AddonSrmProperties.java | 9 + .../avs/models/AddonVrProperties.java | 9 + .../avs/models/AvailabilityProperties.java | 8 + ...orMaintenanceWhileRescheduleOperation.java | 124 + ...wForMaintenanceWhileScheduleOperation.java | 124 + .../BlockedDatesConstraintCategory.java | 56 + .../BlockedDatesConstraintTimeRange.java | 119 + .../BlockedWhileRescheduleOperation.java | 126 + .../models/BlockedWhileScheduleOperation.java | 125 + .../resourcemanager/avs/models/Circuit.java | 8 + .../avs/models/ClusterUpdate.java | 14 + .../avs/models/ClusterZone.java | 8 + .../avs/models/DiskPoolVolume.java | 19 + .../avs/models/ElasticSanVolume.java | 15 + .../avs/models/Encryption.java | 11 + .../models/EncryptionKeyVaultProperties.java | 8 + .../resourcemanager/avs/models/Endpoints.java | 8 + .../avs/models/GeneralHostProperties.java | 9 + .../avs/models/HostProperties.java | 8 + .../avs/models/IdentitySource.java | 8 + .../models/ImpactedMaintenanceResource.java | 103 + .../ImpactedMaintenanceResourceError.java | 149 + .../resourcemanager/avs/models/Label.java | 131 + .../resourcemanager/avs/models/License.java | 211 ++ .../avs/models/LicenseKind.java | 46 + .../avs/models/LicenseName.java | 46 + .../avs/models/LicenseProperties.java | 33 + .../avs/models/LicenseProvisioningState.java | 56 + .../resourcemanager/avs/models/Licenses.java | 172 ++ .../avs/models/Maintenance.java | 55 + .../avs/models/MaintenanceCheckType.java | 51 + .../avs/models/MaintenanceFailedCheck.java | 103 + .../MaintenanceManagementOperation.java | 114 + .../MaintenanceManagementOperationKind.java | 57 + .../avs/models/MaintenanceProperties.java | 275 ++ .../models/MaintenanceProvisioningState.java | 61 + .../avs/models/MaintenanceReadiness.java | 155 + .../MaintenanceReadinessRefreshOperation.java | 168 ++ ...enanceReadinessRefreshOperationStatus.java | 62 + .../models/MaintenanceReadinessStatus.java | 61 + .../avs/models/MaintenanceReschedule.java | 126 + .../avs/models/MaintenanceSchedule.java | 126 + .../avs/models/MaintenanceState.java | 140 + .../avs/models/MaintenanceStateName.java | 71 + .../avs/models/MaintenanceStatusFilter.java | 51 + .../avs/models/MaintenanceType.java | 56 + .../avs/models/Maintenances.java | 163 + .../avs/models/ManagementCluster.java | 8 + .../avs/models/NetAppVolume.java | 15 + .../avs/models/OperationDisplay.java | 8 + .../PSCredentialExecutionParameter.java | 17 + .../avs/models/PlacementPolicyProperties.java | 8 + .../avs/models/PlacementPolicyUpdate.java | 11 + .../avs/models/PrivateCloud.java | 43 +- .../avs/models/PrivateCloudIdentity.java | 15 + .../avs/models/PrivateCloudProperties.java | 190 ++ .../avs/models/PrivateCloudUpdate.java | 17 + .../avs/models/PrivateClouds.java | 25 + .../models/ProvisionedNetworkProperties.java | 8 + .../models/PureStoragePolicyProperties.java | 21 + .../avs/models/PureStorageVolume.java | 16 + .../avs/models/RescheduleOperation.java | 138 + .../models/RescheduleOperationConstraint.java | 112 + .../RescheduleOperationConstraintKind.java | 52 + .../avs/models/ResourceSkuCapabilities.java | 19 + .../avs/models/ResourceSkuLocationInfo.java | 27 + .../models/ResourceSkuRestrictionInfo.java | 8 + .../avs/models/ResourceSkuRestrictions.java | 22 + .../avs/models/ResourceSkuZoneDetails.java | 22 + .../avs/models/ScheduleOperation.java | 138 + .../models/ScheduleOperationConstraint.java | 113 + .../ScheduleOperationConstraintKind.java | 57 + .../avs/models/SchedulingWindow.java | 120 + .../avs/models/ScriptExecutionParameter.java | 15 + .../avs/models/ScriptParameter.java | 8 + .../ScriptSecureStringExecutionParameter.java | 17 + .../ScriptStringExecutionParameter.java | 17 + .../azure/resourcemanager/avs/models/Sku.java | 14 + .../avs/models/SpecializedHostProperties.java | 9 + .../avs/models/Vcf5License.java | 287 ++ .../avs/models/VcfLicense.java | 33 + .../avs/models/VcfLicenseKind.java | 46 + .../VirtualMachineRestrictMovement.java | 8 + .../VmHostPlacementPolicyProperties.java | 27 + .../models/VmPlacementPolicyProperties.java | 22 + .../VmwareFirewallLicenseProperties.java | 290 ++ .../avs/models/WorkloadNetworkDhcpEntity.java | 8 + .../avs/models/WorkloadNetworkDhcpRelay.java | 9 + .../avs/models/WorkloadNetworkDhcpServer.java | 9 + .../models/WorkloadNetworkSegmentPortVif.java | 8 + .../models/WorkloadNetworkSegmentSubnet.java | 8 + ...esourcemanager-avs_apiview_properties.json | 68 +- .../azure-resourcemanager-avs_metadata.json | 2 +- .../proxy-config.json | 2 +- .../AddonsCreateOrUpdateSamples.java | 10 +- .../avs/generated/AddonsDeleteSamples.java | 2 +- .../avs/generated/AddonsGetSamples.java | 10 +- .../avs/generated/AddonsListSamples.java | 2 +- .../AuthorizationsCreateOrUpdateSamples.java | 2 +- .../AuthorizationsDeleteSamples.java | 2 +- .../generated/AuthorizationsGetSamples.java | 2 +- .../generated/AuthorizationsListSamples.java | 2 +- .../CloudLinksCreateOrUpdateSamples.java | 2 +- .../generated/CloudLinksDeleteSamples.java | 2 +- .../avs/generated/CloudLinksGetSamples.java | 2 +- .../avs/generated/CloudLinksListSamples.java | 2 +- .../ClustersCreateOrUpdateSamples.java | 2 +- .../avs/generated/ClustersDeleteSamples.java | 2 +- .../avs/generated/ClustersGetSamples.java | 2 +- .../avs/generated/ClustersListSamples.java | 2 +- .../generated/ClustersListZonesSamples.java | 4 +- .../avs/generated/ClustersUpdateSamples.java | 2 +- .../DatastoresCreateOrUpdateSamples.java | 2 +- .../generated/DatastoresDeleteSamples.java | 2 +- .../avs/generated/DatastoresGetSamples.java | 2 +- .../avs/generated/DatastoresListSamples.java | 2 +- ...ReachConnectionsCreateOrUpdateSamples.java | 2 +- .../GlobalReachConnectionsDeleteSamples.java | 2 +- .../GlobalReachConnectionsGetSamples.java | 2 +- .../GlobalReachConnectionsListSamples.java | 2 +- ...xEnterpriseSitesCreateOrUpdateSamples.java | 2 +- .../HcxEnterpriseSitesDeleteSamples.java | 2 +- .../HcxEnterpriseSitesGetSamples.java | 2 +- .../HcxEnterpriseSitesListSamples.java | 2 +- .../avs/generated/HostsGetSamples.java | 2 +- .../avs/generated/HostsListSamples.java | 2 +- .../IscsiPathsCreateOrUpdateSamples.java | 2 +- .../generated/IscsiPathsDeleteSamples.java | 2 +- .../avs/generated/IscsiPathsGetSamples.java | 2 +- .../IscsiPathsListByPrivateCloudSamples.java | 2 +- .../LicensesCreateOrUpdateSamples.java | 24 + .../avs/generated/LicensesDeleteSamples.java | 24 + .../LicensesGetPropertiesSamples.java | 26 + .../avs/generated/LicensesGetSamples.java | 25 + .../avs/generated/LicensesListSamples.java | 22 + ...ocationsCheckQuotaAvailabilitySamples.java | 2 +- ...ocationsCheckTrialAvailabilitySamples.java | 4 +- .../avs/generated/MaintenancesGetSamples.java | 22 + .../MaintenancesInitiateChecksSamples.java | 23 + .../generated/MaintenancesListSamples.java | 22 + .../MaintenancesRescheduleSamples.java | 29 + .../MaintenancesScheduleSamples.java | 29 + .../avs/generated/OperationsListSamples.java | 2 +- ...lacementPoliciesCreateOrUpdateSamples.java | 2 +- .../PlacementPoliciesDeleteSamples.java | 2 +- .../PlacementPoliciesGetSamples.java | 2 +- .../PlacementPoliciesListSamples.java | 2 +- .../PlacementPoliciesUpdateSamples.java | 2 +- .../PrivateCloudsCreateOrUpdateSamples.java | 30 +- .../generated/PrivateCloudsDeleteSamples.java | 2 +- ...rivateCloudsGetByResourceGroupSamples.java | 4 +- .../PrivateCloudsGetVcfLicenseSamples.java | 22 + ...vateCloudsListAdminCredentialsSamples.java | 2 +- ...ivateCloudsListByResourceGroupSamples.java | 4 +- .../generated/PrivateCloudsListSamples.java | 4 +- ...rivateCloudsRotateNsxtPasswordSamples.java | 2 +- ...ateCloudsRotateVcenterPasswordSamples.java | 2 +- .../generated/PrivateCloudsUpdateSamples.java | 4 +- .../ProvisionedNetworksGetSamples.java | 2 +- .../ProvisionedNetworksListSamples.java | 2 +- ...eStoragePoliciesCreateOrUpdateSamples.java | 2 +- .../PureStoragePoliciesDeleteSamples.java | 2 +- .../PureStoragePoliciesGetSamples.java | 2 +- .../PureStoragePoliciesListSamples.java | 2 +- .../generated/ScriptCmdletsGetSamples.java | 2 +- .../generated/ScriptCmdletsListSamples.java | 2 +- ...ScriptExecutionsCreateOrUpdateSamples.java | 2 +- .../ScriptExecutionsDeleteSamples.java | 2 +- ...riptExecutionsGetExecutionLogsSamples.java | 2 +- .../generated/ScriptExecutionsGetSamples.java | 2 +- .../ScriptExecutionsListSamples.java | 2 +- .../generated/ScriptPackagesGetSamples.java | 2 +- .../generated/ScriptPackagesListSamples.java | 2 +- .../avs/generated/SkusListSamples.java | 2 +- .../generated/VirtualMachinesGetSamples.java | 2 +- .../generated/VirtualMachinesListSamples.java | 2 +- ...irtualMachinesRestrictMovementSamples.java | 2 +- .../WorkloadNetworksCreateDhcpSamples.java | 2 +- ...rkloadNetworksCreateDnsServiceSamples.java | 2 +- .../WorkloadNetworksCreateDnsZoneSamples.java | 2 +- ...oadNetworksCreatePortMirroringSamples.java | 2 +- ...WorkloadNetworksCreatePublicIpSamples.java | 2 +- ...WorkloadNetworksCreateSegmentsSamples.java | 2 +- .../WorkloadNetworksCreateVMGroupSamples.java | 2 +- .../WorkloadNetworksDeleteDhcpSamples.java | 2 +- ...rkloadNetworksDeleteDnsServiceSamples.java | 2 +- .../WorkloadNetworksDeleteDnsZoneSamples.java | 2 +- ...oadNetworksDeletePortMirroringSamples.java | 2 +- ...WorkloadNetworksDeletePublicIpSamples.java | 2 +- .../WorkloadNetworksDeleteSegmentSamples.java | 2 +- .../WorkloadNetworksDeleteVMGroupSamples.java | 2 +- .../WorkloadNetworksGetDhcpSamples.java | 2 +- .../WorkloadNetworksGetDnsServiceSamples.java | 2 +- .../WorkloadNetworksGetDnsZoneSamples.java | 2 +- .../WorkloadNetworksGetGatewaySamples.java | 2 +- ...rkloadNetworksGetPortMirroringSamples.java | 2 +- .../WorkloadNetworksGetPublicIpSamples.java | 2 +- .../generated/WorkloadNetworksGetSamples.java | 2 +- .../WorkloadNetworksGetSegmentSamples.java | 2 +- .../WorkloadNetworksGetVMGroupSamples.java | 2 +- ...kloadNetworksGetVirtualMachineSamples.java | 2 +- .../WorkloadNetworksListDhcpSamples.java | 2 +- ...orkloadNetworksListDnsServicesSamples.java | 2 +- .../WorkloadNetworksListDnsZonesSamples.java | 2 +- .../WorkloadNetworksListGatewaysSamples.java | 2 +- ...kloadNetworksListPortMirroringSamples.java | 2 +- .../WorkloadNetworksListPublicIPsSamples.java | 2 +- .../WorkloadNetworksListSamples.java | 2 +- .../WorkloadNetworksListSegmentsSamples.java | 2 +- .../WorkloadNetworksListVMGroupsSamples.java | 2 +- ...oadNetworksListVirtualMachinesSamples.java | 2 +- .../WorkloadNetworksUpdateDhcpSamples.java | 2 +- ...rkloadNetworksUpdateDnsServiceSamples.java | 2 +- .../WorkloadNetworksUpdateDnsZoneSamples.java | 2 +- ...oadNetworksUpdatePortMirroringSamples.java | 2 +- ...WorkloadNetworksUpdateSegmentsSamples.java | 2 +- .../WorkloadNetworksUpdateVMGroupSamples.java | 2 +- .../AddonsCreateOrUpdateMockTests.java | 6 +- .../avs/generated/AddonsDeleteMockTests.java | 2 +- .../AddonsGetWithResponseMockTests.java | 4 +- .../avs/generated/AddonsListMockTests.java | 5 +- .../AuthorizationsDeleteMockTests.java | 2 +- .../AvailabilityPropertiesTests.java | 20 +- ...ntenanceWhileRescheduleOperationTests.java | 17 + ...aintenanceWhileScheduleOperationTests.java | 17 + .../BlockedDatesConstraintTimeRangeTests.java | 18 + .../BlockedWhileRescheduleOperationTests.java | 17 + .../BlockedWhileScheduleOperationTests.java | 17 + .../avs/generated/CircuitTests.java | 2 +- .../CloudLinksCreateOrUpdateMockTests.java | 10 +- .../generated/CloudLinksDeleteMockTests.java | 2 +- .../CloudLinksGetWithResponseMockTests.java | 6 +- .../generated/CloudLinksListMockTests.java | 6 +- .../ClustersCreateOrUpdateMockTests.java | 38 +- .../generated/ClustersDeleteMockTests.java | 2 +- .../ClustersGetWithResponseMockTests.java | 20 +- .../avs/generated/ClustersListMockTests.java | 20 +- ...lustersListZonesWithResponseMockTests.java | 4 +- .../DatastoresCreateOrUpdateMockTests.java | 30 +- .../generated/DatastoresDeleteMockTests.java | 2 +- .../DatastoresGetWithResponseMockTests.java | 16 +- .../generated/DatastoresListMockTests.java | 16 +- .../avs/generated/EndpointsTests.java | 2 +- ...GlobalReachConnectionsDeleteMockTests.java | 2 +- ...priseSitesDeleteWithResponseMockTests.java | 2 +- .../HostsGetWithResponseMockTests.java | 18 +- .../avs/generated/HostsListMockTests.java | 18 +- .../IscsiPathsCreateOrUpdateMockTests.java | 6 +- .../generated/IscsiPathsDeleteMockTests.java | 2 +- .../IscsiPathsGetWithResponseMockTests.java | 6 +- ...IscsiPathsListByPrivateCloudMockTests.java | 6 +- .../avs/generated/LicenseInnerTests.java | 24 + .../avs/generated/LicenseListResultTests.java | 19 + .../LicensePropertiesInnerTests.java | 23 + .../LicensesCreateOrUpdateMockTests.java | 41 + ...sesGetPropertiesWithResponseMockTests.java | 37 + .../LicensesGetWithResponseMockTests.java | 38 + .../avs/generated/LicensesListMockTests.java | 37 + ...uotaAvailabilityWithResponseMockTests.java | 4 +- ...rialAvailabilityWithResponseMockTests.java | 12 +- .../avs/generated/MaintenanceInnerTests.java | 17 + .../generated/MaintenanceListResultTests.java | 19 + .../MaintenanceManagementOperationTests.java | 16 + .../generated/MaintenancePropertiesTests.java | 17 + ...tenanceReadinessRefreshOperationTests.java | 17 + .../generated/MaintenanceReadinessTests.java | 17 + .../generated/MaintenanceRescheduleTests.java | 31 + .../generated/MaintenanceScheduleTests.java | 31 + .../avs/generated/MaintenanceStateTests.java | 24 + .../MaintenancesGetWithResponseMockTests.java | 37 + ...esInitiateChecksWithResponseMockTests.java | 37 + .../generated/MaintenancesListMockTests.java | 41 + ...nancesRescheduleWithResponseMockTests.java | 41 + ...tenancesScheduleWithResponseMockTests.java | 41 + .../avs/generated/ManagementClusterTests.java | 20 +- .../generated/OperationsListMockTests.java | 2 +- ...cementPoliciesCreateOrUpdateMockTests.java | 12 +- .../PlacementPoliciesDeleteMockTests.java | 2 +- ...ementPoliciesGetWithResponseMockTests.java | 6 +- .../PlacementPoliciesListMockTests.java | 10 +- .../generated/PlacementPoliciesListTests.java | 6 +- .../generated/PlacementPolicyInnerTests.java | 15 +- .../PlacementPolicyPropertiesTests.java | 12 +- .../PlacementPolicyUpdatePropertiesTests.java | 20 +- .../generated/PlacementPolicyUpdateTests.java | 26 +- .../generated/PrivateCloudIdentityTests.java | 6 +- .../PrivateCloudsDeleteMockTests.java | 2 +- ...udsGetVcfLicenseWithResponseMockTests.java | 36 + .../ProvisionedNetworkInnerTests.java | 2 +- .../ProvisionedNetworkListResultTests.java | 4 +- .../ProvisionedNetworkPropertiesTests.java | 2 +- ...ionedNetworksGetWithResponseMockTests.java | 4 +- .../ProvisionedNetworksListMockTests.java | 4 +- ...toragePoliciesCreateOrUpdateMockTests.java | 14 +- ...oragePoliciesGetWithResponseMockTests.java | 8 +- .../PureStoragePoliciesListMockTests.java | 8 +- .../PureStoragePolicyInnerTests.java | 12 +- .../PureStoragePolicyListResultTests.java | 8 +- .../PureStoragePolicyPropertiesTests.java | 12 +- .../avs/generated/QuotaInnerTests.java | 6 +- .../RescheduleOperationConstraintTests.java | 16 + .../generated/RescheduleOperationTests.java | 17 + .../ResourceSkuCapabilitiesTests.java | 6 +- .../ResourceSkuLocationInfoTests.java | 12 +- .../ResourceSkuRestrictionInfoTests.java | 6 +- .../ResourceSkuZoneDetailsTests.java | 11 +- .../ScheduleOperationConstraintTests.java | 16 + .../avs/generated/ScheduleOperationTests.java | 17 + .../avs/generated/SchedulingWindowTests.java | 17 + .../avs/generated/ScriptCmdletInnerTests.java | 2 +- .../ScriptCmdletPropertiesTests.java | 2 +- ...ScriptCmdletsGetWithResponseMockTests.java | 4 +- .../generated/ScriptCmdletsListMockTests.java | 4 +- .../avs/generated/ScriptCmdletsListTests.java | 4 +- .../generated/ScriptExecutionInnerTests.java | 53 +- .../ScriptExecutionParameterTests.java | 8 +- .../ScriptExecutionPropertiesTests.java | 53 +- ...riptExecutionsCreateOrUpdateMockTests.java | 44 +- .../ScriptExecutionsDeleteMockTests.java | 2 +- ...GetExecutionLogsWithResponseMockTests.java | 22 +- ...iptExecutionsGetWithResponseMockTests.java | 18 +- .../ScriptExecutionsListMockTests.java | 18 +- .../generated/ScriptExecutionsListTests.java | 18 +- .../generated/ScriptPackageInnerTests.java | 2 +- .../ScriptPackagePropertiesTests.java | 2 +- ...criptPackagesGetWithResponseMockTests.java | 4 +- .../ScriptPackagesListMockTests.java | 4 +- .../generated/ScriptPackagesListTests.java | 4 +- .../avs/generated/ScriptParameterTests.java | 4 +- ...ptSecureStringExecutionParameterTests.java | 16 +- .../ScriptStringExecutionParameterTests.java | 12 +- .../avs/generated/TrialInnerTests.java | 2 +- .../avs/generated/VcfLicenseInnerTests.java | 22 + .../generated/VirtualMachineInnerTests.java | 2 +- .../VirtualMachinePropertiesTests.java | 2 +- .../VirtualMachineRestrictMovementTests.java | 8 +- ...rtualMachinesGetWithResponseMockTests.java | 4 +- .../VirtualMachinesListMockTests.java | 4 +- .../generated/VirtualMachinesListTests.java | 4 +- .../VmHostPlacementPolicyPropertiesTests.java | 32 +- .../VmPlacementPolicyPropertiesTests.java | 26 +- .../WorkloadNetworkDhcpEntityTests.java | 12 +- .../WorkloadNetworkDhcpInnerTests.java | 12 +- .../WorkloadNetworkDhcpListTests.java | 8 +- .../WorkloadNetworkDhcpRelayTests.java | 20 +- .../WorkloadNetworkDhcpServerTests.java | 26 +- .../WorkloadNetworkDnsServiceInnerTests.java | 32 +- ...kloadNetworkDnsServicePropertiesTests.java | 39 +- .../WorkloadNetworkDnsServicesListTests.java | 14 +- .../WorkloadNetworkDnsZoneInnerTests.java | 38 +- ...WorkloadNetworkDnsZonePropertiesTests.java | 39 +- .../WorkloadNetworkDnsZonesListTests.java | 16 +- .../WorkloadNetworkGatewayInnerTests.java | 4 +- .../WorkloadNetworkGatewayListTests.java | 6 +- ...WorkloadNetworkGatewayPropertiesTests.java | 9 +- .../generated/WorkloadNetworkInnerTests.java | 2 +- .../generated/WorkloadNetworkListTests.java | 4 +- ...orkloadNetworkPortMirroringInnerTests.java | 32 +- ...WorkloadNetworkPortMirroringListTests.java | 14 +- ...adNetworkPortMirroringPropertiesTests.java | 26 +- .../WorkloadNetworkPropertiesTests.java | 2 +- .../WorkloadNetworkPublicIPsListTests.java | 8 +- .../WorkloadNetworkPublicIpInnerTests.java | 14 +- ...orkloadNetworkPublicIpPropertiesTests.java | 13 +- .../WorkloadNetworkSegmentInnerTests.java | 33 +- .../WorkloadNetworkSegmentPortVifTests.java | 4 +- ...WorkloadNetworkSegmentPropertiesTests.java | 33 +- .../WorkloadNetworkSegmentSubnetTests.java | 21 +- .../WorkloadNetworkSegmentsListTests.java | 14 +- .../WorkloadNetworkVMGroupInnerTests.java | 20 +- ...WorkloadNetworkVMGroupPropertiesTests.java | 20 +- .../WorkloadNetworkVMGroupsListTests.java | 10 +- ...rkloadNetworkVirtualMachineInnerTests.java | 4 +- ...dNetworkVirtualMachinePropertiesTests.java | 5 +- ...rkloadNetworkVirtualMachinesListTests.java | 6 +- .../WorkloadNetworksCreateDhcpMockTests.java | 13 +- ...loadNetworksCreateDnsServiceMockTests.java | 30 +- ...orkloadNetworksCreateDnsZoneMockTests.java | 30 +- ...dNetworksCreatePortMirroringMockTests.java | 26 +- ...rkloadNetworksCreatePublicIpMockTests.java | 14 +- ...rkloadNetworksCreateSegmentsMockTests.java | 26 +- ...orkloadNetworksCreateVMGroupMockTests.java | 18 +- .../WorkloadNetworksDeleteDhcpMockTests.java | 3 +- ...loadNetworksDeleteDnsServiceMockTests.java | 2 +- ...orkloadNetworksDeleteDnsZoneMockTests.java | 2 +- ...dNetworksDeletePortMirroringMockTests.java | 3 +- ...rkloadNetworksDeletePublicIpMockTests.java | 3 +- ...orkloadNetworksDeleteSegmentMockTests.java | 2 +- ...orkloadNetworksDeleteVMGroupMockTests.java | 3 +- ...dNetworksGetDhcpWithResponseMockTests.java | 8 +- ...rksGetDnsServiceWithResponseMockTests.java | 16 +- ...tworksGetDnsZoneWithResponseMockTests.java | 16 +- ...tworksGetGatewayWithResponseMockTests.java | 6 +- ...GetPortMirroringWithResponseMockTests.java | 12 +- ...worksGetPublicIpWithResponseMockTests.java | 8 +- ...tworksGetSegmentWithResponseMockTests.java | 14 +- ...tworksGetVMGroupWithResponseMockTests.java | 10 +- ...etVirtualMachineWithResponseMockTests.java | 6 +- ...kloadNetworksGetWithResponseMockTests.java | 4 +- .../WorkloadNetworksListDhcpMockTests.java | 8 +- ...kloadNetworksListDnsServicesMockTests.java | 16 +- ...WorkloadNetworksListDnsZonesMockTests.java | 18 +- ...WorkloadNetworksListGatewaysMockTests.java | 6 +- .../WorkloadNetworksListMockTests.java | 4 +- ...oadNetworksListPortMirroringMockTests.java | 14 +- ...orkloadNetworksListPublicIPsMockTests.java | 8 +- ...WorkloadNetworksListSegmentsMockTests.java | 16 +- ...WorkloadNetworksListVMGroupsMockTests.java | 10 +- ...dNetworksListVirtualMachinesMockTests.java | 6 +- .../tsp-location.yaml | 2 +- 548 files changed, 21586 insertions(+), 1283 deletions(-) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/LicensesClient.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/MaintenancesClient.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/LicenseInner.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/LicensePropertiesInner.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/MaintenanceInner.java rename sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/{PrivateCloudProperties.java => PrivateCloudPropertiesInner.java} (70%) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VcfLicenseInner.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicenseImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensePropertiesImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensesClientImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensesImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenanceImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenancesClientImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenancesImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudPropertiesImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VcfLicenseImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/LicenseListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/MaintenanceListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileRescheduleOperation.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileScheduleOperation.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintCategory.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintTimeRange.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileRescheduleOperation.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileScheduleOperation.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResource.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResourceError.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Label.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/License.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseKind.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseName.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseProperties.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseProvisioningState.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Licenses.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Maintenance.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceCheckType.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceFailedCheck.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceManagementOperation.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceManagementOperationKind.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceProperties.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceProvisioningState.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadiness.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessRefreshOperation.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessRefreshOperationStatus.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessStatus.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReschedule.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceSchedule.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceState.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceStateName.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceStatusFilter.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceType.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Maintenances.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProperties.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperation.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperationConstraint.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperationConstraintKind.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperation.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperationConstraint.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperationConstraintKind.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SchedulingWindow.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Vcf5License.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VcfLicense.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VcfLicenseKind.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmwareFirewallLicenseProperties.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesCreateOrUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesDeleteSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesGetPropertiesSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesInitiateChecksSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesRescheduleSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesScheduleSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetVcfLicenseSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailableWindowForMaintenanceWhileRescheduleOperationTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailableWindowForMaintenanceWhileScheduleOperationTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/BlockedDatesConstraintTimeRangeTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/BlockedWhileRescheduleOperationTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/BlockedWhileScheduleOperationTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicenseInnerTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicenseListResultTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensePropertiesInnerTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesCreateOrUpdateMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesGetPropertiesWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesListMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceInnerTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceListResultTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceManagementOperationTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancePropertiesTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceReadinessRefreshOperationTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceReadinessTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceRescheduleTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceScheduleTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceStateTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesInitiateChecksWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesListMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesRescheduleWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesScheduleWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetVcfLicenseWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/RescheduleOperationConstraintTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/RescheduleOperationTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScheduleOperationConstraintTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScheduleOperationTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/SchedulingWindowTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VcfLicenseInnerTests.java diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 2828d7c96894..7bc84f8581ce 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -337,7 +337,7 @@ com.azure.resourcemanager:azure-resourcemanager-appconfiguration;1.1.0;1.2.0-bet com.azure.resourcemanager:azure-resourcemanager-attestation;1.0.0-beta.3;1.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-azurestack;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-azurestackhci;1.0.0-beta.5;1.0.0-beta.6 -com.azure.resourcemanager:azure-resourcemanager-avs;1.3.0;1.4.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-avs;1.3.0;1.4.0 com.azure.resourcemanager:azure-resourcemanager-consumption;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-commerce;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-billing;1.0.0;1.1.0-beta.1 diff --git a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md index 6465dbbd20e4..a65d5ddbfa1c 100644 --- a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md +++ b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md @@ -1,14 +1,128 @@ # Release History -## 1.4.0-beta.1 (Unreleased) +## 1.4.0 (2025-12-12) + +- Azure Resource Manager Avs client library for Java. This package contains Microsoft Azure SDK for Avs Management SDK. Azure VMware Solution API. Package api-version 2025-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +* `models.ImpactedMaintenanceResource` was added + +* `models.License` was added + +* `models.AvailableWindowForMaintenanceWhileScheduleOperation` was added + +* `models.MaintenanceStateName` was added + +* `models.MaintenanceSchedule` was added + +* `models.MaintenanceReadinessStatus` was added + +* `models.License$Update` was added + +* `models.BlockedDatesConstraintCategory` was added + +* `models.MaintenanceState` was added + +* `models.License$UpdateStages` was added + +* `models.SchedulingWindow` was added + +* `models.Licenses` was added + +* `models.MaintenanceType` was added + +* `models.LicenseKind` was added + +* `models.RescheduleOperationConstraint` was added + +* `models.MaintenanceProvisioningState` was added + +* `models.BlockedDatesConstraintTimeRange` was added + +* `models.RescheduleOperationConstraintKind` was added + +* `models.Vcf5License` was added + +* `models.MaintenanceReadinessRefreshOperationStatus` was added + +* `models.Maintenances` was added + +* `models.VmwareFirewallLicenseProperties` was added + +* `models.ScheduleOperationConstraintKind` was added + +* `models.ScheduleOperation` was added + +* `models.RescheduleOperation` was added + +* `models.VcfLicenseKind` was added + +* `models.LicenseName` was added + +* `models.License$DefinitionStages` was added + +* `models.Maintenance` was added -### Bugs Fixed +* `models.MaintenanceCheckType` was added + +* `models.PrivateCloudProperties` was added + +* `models.MaintenanceReschedule` was added + +* `models.License$Definition` was added + +* `models.MaintenanceManagementOperationKind` was added + +* `models.BlockedWhileScheduleOperation` was added + +* `models.Label` was added + +* `models.MaintenanceManagementOperation` was added + +* `models.ScheduleOperationConstraint` was added + +* `models.VcfLicense` was added + +* `models.AvailableWindowForMaintenanceWhileRescheduleOperation` was added + +* `models.BlockedWhileRescheduleOperation` was added + +* `models.LicenseProperties` was added + +* `models.MaintenanceProperties` was added + +* `models.LicenseProvisioningState` was added + +* `models.MaintenanceReadinessRefreshOperation` was added + +* `models.MaintenanceStatusFilter` was added + +* `models.MaintenanceReadiness` was added + +* `models.MaintenanceFailedCheck` was added + +* `models.ImpactedMaintenanceResourceError` was added + +#### `models.PrivateClouds` was modified + +* `getVcfLicense(java.lang.String,java.lang.String)` was added +* `getVcfLicenseWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `AvsManager` was modified + +* `maintenances()` was added +* `licenses()` was added + +#### `models.PrivateCloud$Definition` was modified + +* `withVcfLicense(fluent.models.VcfLicenseInner)` was added + +#### `models.PrivateCloud` was modified -### Other Changes +* `getVcfLicenseWithResponse(com.azure.core.util.Context)` was added +* `getVcfLicense()` was added +* `vcfLicense()` was added ## 1.3.0 (2025-07-08) diff --git a/sdk/avs/azure-resourcemanager-avs/README.md b/sdk/avs/azure-resourcemanager-avs/README.md index 70caabe6fb0e..bc30048fa05a 100644 --- a/sdk/avs/azure-resourcemanager-avs/README.md +++ b/sdk/avs/azure-resourcemanager-avs/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Avs client library for Java. -This package contains Microsoft Azure SDK for Avs Management SDK. Azure VMware Solution API. Package api-version 2024-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Avs Management SDK. Azure VMware Solution API. Package api-version 2025-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-avs</artifactId> - <version>1.3.0</version> + <version>1.4.0</version> </dependency> ``` [//]: # ({x-version-update-end}) diff --git a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md index 35a74f3adff2..72018aa5ded0 100644 --- a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md +++ b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md @@ -64,11 +64,27 @@ - [Get](#iscsipaths_get) - [ListByPrivateCloud](#iscsipaths_listbyprivatecloud) +## Licenses + +- [CreateOrUpdate](#licenses_createorupdate) +- [Delete](#licenses_delete) +- [Get](#licenses_get) +- [GetProperties](#licenses_getproperties) +- [List](#licenses_list) + ## Locations - [CheckQuotaAvailability](#locations_checkquotaavailability) - [CheckTrialAvailability](#locations_checktrialavailability) +## Maintenances + +- [Get](#maintenances_get) +- [InitiateChecks](#maintenances_initiatechecks) +- [List](#maintenances_list) +- [Reschedule](#maintenances_reschedule) +- [Schedule](#maintenances_schedule) + ## Operations - [List](#operations_list) @@ -86,6 +102,7 @@ - [CreateOrUpdate](#privateclouds_createorupdate) - [Delete](#privateclouds_delete) - [GetByResourceGroup](#privateclouds_getbyresourcegroup) +- [GetVcfLicense](#privateclouds_getvcflicense) - [List](#privateclouds_list) - [ListAdminCredentials](#privateclouds_listadmincredentials) - [ListByResourceGroup](#privateclouds_listbyresourcegroup) @@ -188,7 +205,7 @@ import com.azure.resourcemanager.avs.models.AddonVrProperties; */ public final class AddonsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_HCX.json + * x-ms-original-file: 2025-09-01/Addons_CreateOrUpdate_HCX.json */ /** * Sample code: Addons_CreateOrUpdate_HCX. @@ -204,7 +221,7 @@ public final class AddonsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_SRM.json + * x-ms-original-file: 2025-09-01/Addons_CreateOrUpdate_SRM.json */ /** * Sample code: Addons_CreateOrUpdate_SRM. @@ -220,7 +237,7 @@ public final class AddonsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_HCX_With_Networks.json + * x-ms-original-file: 2025-09-01/Addons_CreateOrUpdate_HCX_With_Networks.json */ /** * Sample code: Addons_CreateOrUpdate_HCX_With_Networks. @@ -238,7 +255,7 @@ public final class AddonsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_ArcReg.json + * x-ms-original-file: 2025-09-01/Addons_CreateOrUpdate_ArcReg.json */ /** * Sample code: Addons_CreateOrUpdate_ArcReg. @@ -255,7 +272,7 @@ public final class AddonsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_VR.json + * x-ms-original-file: 2025-09-01/Addons_CreateOrUpdate_VR.json */ /** * Sample code: Addons_CreateOrUpdate_VR. @@ -280,7 +297,7 @@ public final class AddonsCreateOrUpdateSamples { */ public final class AddonsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/Addons_Delete.json + * x-ms-original-file: 2025-09-01/Addons_Delete.json */ /** * Sample code: Addons_Delete. @@ -301,7 +318,7 @@ public final class AddonsDeleteSamples { */ public final class AddonsGetSamples { /* - * x-ms-original-file: 2024-09-01/Addons_Get_HCX_With_Networks.json + * x-ms-original-file: 2025-09-01/Addons_Get_HCX_With_Networks.json */ /** * Sample code: Addons_Get_HCX_With_Networks. @@ -313,7 +330,7 @@ public final class AddonsGetSamples { } /* - * x-ms-original-file: 2024-09-01/Addons_Get_SRM.json + * x-ms-original-file: 2025-09-01/Addons_Get_SRM.json */ /** * Sample code: Addons_Get_SRM. @@ -325,7 +342,7 @@ public final class AddonsGetSamples { } /* - * x-ms-original-file: 2024-09-01/Addons_Get_VR.json + * x-ms-original-file: 2025-09-01/Addons_Get_VR.json */ /** * Sample code: Addons_Get_VR. @@ -337,7 +354,7 @@ public final class AddonsGetSamples { } /* - * x-ms-original-file: 2024-09-01/Addons_Get_HCX.json + * x-ms-original-file: 2025-09-01/Addons_Get_HCX.json */ /** * Sample code: Addons_Get_HCX. @@ -349,7 +366,7 @@ public final class AddonsGetSamples { } /* - * x-ms-original-file: 2024-09-01/Addons_Get_ArcReg.json + * x-ms-original-file: 2025-09-01/Addons_Get_ArcReg.json */ /** * Sample code: Addons_Get_ArcReg. @@ -370,7 +387,7 @@ public final class AddonsGetSamples { */ public final class AddonsListSamples { /* - * x-ms-original-file: 2024-09-01/Addons_List.json + * x-ms-original-file: 2025-09-01/Addons_List.json */ /** * Sample code: Addons_List. @@ -391,7 +408,7 @@ public final class AddonsListSamples { */ public final class AuthorizationsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/Authorizations_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/Authorizations_CreateOrUpdate.json */ /** * Sample code: Authorizations_CreateOrUpdate. @@ -412,7 +429,7 @@ public final class AuthorizationsCreateOrUpdateSamples { */ public final class AuthorizationsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/Authorizations_Delete.json + * x-ms-original-file: 2025-09-01/Authorizations_Delete.json */ /** * Sample code: Authorizations_Delete. @@ -433,7 +450,7 @@ public final class AuthorizationsDeleteSamples { */ public final class AuthorizationsGetSamples { /* - * x-ms-original-file: 2024-09-01/Authorizations_Get.json + * x-ms-original-file: 2025-09-01/Authorizations_Get.json */ /** * Sample code: Authorizations_Get. @@ -455,7 +472,7 @@ public final class AuthorizationsGetSamples { */ public final class AuthorizationsListSamples { /* - * x-ms-original-file: 2024-09-01/Authorizations_List.json + * x-ms-original-file: 2025-09-01/Authorizations_List.json */ /** * Sample code: Authorizations_List. @@ -476,7 +493,7 @@ public final class AuthorizationsListSamples { */ public final class CloudLinksCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/CloudLinks_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/CloudLinks_CreateOrUpdate.json */ /** * Sample code: CloudLinks_CreateOrUpdate. @@ -502,7 +519,7 @@ public final class CloudLinksCreateOrUpdateSamples { */ public final class CloudLinksDeleteSamples { /* - * x-ms-original-file: 2024-09-01/CloudLinks_Delete.json + * x-ms-original-file: 2025-09-01/CloudLinks_Delete.json */ /** * Sample code: CloudLinks_Delete. @@ -523,7 +540,7 @@ public final class CloudLinksDeleteSamples { */ public final class CloudLinksGetSamples { /* - * x-ms-original-file: 2024-09-01/CloudLinks_Get.json + * x-ms-original-file: 2025-09-01/CloudLinks_Get.json */ /** * Sample code: CloudLinks_Get. @@ -544,7 +561,7 @@ public final class CloudLinksGetSamples { */ public final class CloudLinksListSamples { /* - * x-ms-original-file: 2024-09-01/CloudLinks_List.json + * x-ms-original-file: 2025-09-01/CloudLinks_List.json */ /** * Sample code: CloudLinks_List. @@ -567,7 +584,7 @@ import com.azure.resourcemanager.avs.models.Sku; */ public final class ClustersCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/Clusters_CreateOrUpdate.json */ /** * Sample code: Clusters_CreateOrUpdate. @@ -593,7 +610,7 @@ public final class ClustersCreateOrUpdateSamples { */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_Delete.json + * x-ms-original-file: 2025-09-01/Clusters_Delete.json */ /** * Sample code: Clusters_Delete. @@ -614,7 +631,7 @@ public final class ClustersDeleteSamples { */ public final class ClustersGetSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_Get.json + * x-ms-original-file: 2025-09-01/Clusters_Get.json */ /** * Sample code: Clusters_Get. @@ -635,7 +652,7 @@ public final class ClustersGetSamples { */ public final class ClustersListSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_List.json + * x-ms-original-file: 2025-09-01/Clusters_List.json */ /** * Sample code: Clusters_List. @@ -656,7 +673,7 @@ public final class ClustersListSamples { */ public final class ClustersListZonesSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_ListZones.json + * x-ms-original-file: 2025-09-01/Clusters_ListZones.json */ /** * Sample code: Clusters_ListZones. @@ -668,7 +685,7 @@ public final class ClustersListZonesSamples { } /* - * x-ms-original-file: 2024-09-01/Clusters_ListZones_Stretched.json + * x-ms-original-file: 2025-09-01/Clusters_ListZones_Stretched.json */ /** * Sample code: Clusters_ListZones_Stretched. @@ -691,7 +708,7 @@ import com.azure.resourcemanager.avs.models.Cluster; */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_Update.json + * x-ms-original-file: 2025-09-01/Clusters_Update.json */ /** * Sample code: Clusters_Update. @@ -717,7 +734,7 @@ import com.azure.resourcemanager.avs.models.NetAppVolume; */ public final class DatastoresCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/Datastores_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/Datastores_CreateOrUpdate.json */ /** * Sample code: Datastores_CreateOrUpdate. @@ -743,7 +760,7 @@ public final class DatastoresCreateOrUpdateSamples { */ public final class DatastoresDeleteSamples { /* - * x-ms-original-file: 2024-09-01/Datastores_Delete.json + * x-ms-original-file: 2025-09-01/Datastores_Delete.json */ /** * Sample code: Datastores_Delete. @@ -764,7 +781,7 @@ public final class DatastoresDeleteSamples { */ public final class DatastoresGetSamples { /* - * x-ms-original-file: 2024-09-01/Datastores_Get.json + * x-ms-original-file: 2025-09-01/Datastores_Get.json */ /** * Sample code: Datastores_Get. @@ -786,7 +803,7 @@ public final class DatastoresGetSamples { */ public final class DatastoresListSamples { /* - * x-ms-original-file: 2024-09-01/Datastores_List.json + * x-ms-original-file: 2025-09-01/Datastores_List.json */ /** * Sample code: Datastores_List. @@ -807,7 +824,7 @@ public final class DatastoresListSamples { */ public final class GlobalReachConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/GlobalReachConnections_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/GlobalReachConnections_CreateOrUpdate.json */ /** * Sample code: GlobalReachConnections_CreateOrUpdate. @@ -834,7 +851,7 @@ public final class GlobalReachConnectionsCreateOrUpdateSamples { */ public final class GlobalReachConnectionsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/GlobalReachConnections_Delete.json + * x-ms-original-file: 2025-09-01/GlobalReachConnections_Delete.json */ /** * Sample code: GlobalReachConnections_Delete. @@ -855,7 +872,7 @@ public final class GlobalReachConnectionsDeleteSamples { */ public final class GlobalReachConnectionsGetSamples { /* - * x-ms-original-file: 2024-09-01/GlobalReachConnections_Get.json + * x-ms-original-file: 2025-09-01/GlobalReachConnections_Get.json */ /** * Sample code: GlobalReachConnections_Get. @@ -877,7 +894,7 @@ public final class GlobalReachConnectionsGetSamples { */ public final class GlobalReachConnectionsListSamples { /* - * x-ms-original-file: 2024-09-01/GlobalReachConnections_List.json + * x-ms-original-file: 2025-09-01/GlobalReachConnections_List.json */ /** * Sample code: GlobalReachConnections_List. @@ -898,7 +915,7 @@ public final class GlobalReachConnectionsListSamples { */ public final class HcxEnterpriseSitesCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/HcxEnterpriseSites_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/HcxEnterpriseSites_CreateOrUpdate.json */ /** * Sample code: HcxEnterpriseSites_CreateOrUpdate. @@ -919,7 +936,7 @@ public final class HcxEnterpriseSitesCreateOrUpdateSamples { */ public final class HcxEnterpriseSitesDeleteSamples { /* - * x-ms-original-file: 2024-09-01/HcxEnterpriseSites_Delete.json + * x-ms-original-file: 2025-09-01/HcxEnterpriseSites_Delete.json */ /** * Sample code: HcxEnterpriseSites_Delete. @@ -940,7 +957,7 @@ public final class HcxEnterpriseSitesDeleteSamples { */ public final class HcxEnterpriseSitesGetSamples { /* - * x-ms-original-file: 2024-09-01/HcxEnterpriseSites_Get.json + * x-ms-original-file: 2025-09-01/HcxEnterpriseSites_Get.json */ /** * Sample code: HcxEnterpriseSites_Get. @@ -961,7 +978,7 @@ public final class HcxEnterpriseSitesGetSamples { */ public final class HcxEnterpriseSitesListSamples { /* - * x-ms-original-file: 2024-09-01/HcxEnterpriseSites_List.json + * x-ms-original-file: 2025-09-01/HcxEnterpriseSites_List.json */ /** * Sample code: HcxEnterpriseSites_List. @@ -982,7 +999,7 @@ public final class HcxEnterpriseSitesListSamples { */ public final class HostsGetSamples { /* - * x-ms-original-file: 2024-09-01/Hosts_Get.json + * x-ms-original-file: 2025-09-01/Hosts_Get.json */ /** * Sample code: Hosts_Get. @@ -1005,7 +1022,7 @@ public final class HostsGetSamples { */ public final class HostsListSamples { /* - * x-ms-original-file: 2024-09-01/Hosts_List.json + * x-ms-original-file: 2025-09-01/Hosts_List.json */ /** * Sample code: Hosts_List. @@ -1028,7 +1045,7 @@ import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; */ public final class IscsiPathsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/IscsiPaths_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/IscsiPaths_CreateOrUpdate.json */ /** * Sample code: IscsiPaths_CreateOrUpdate. @@ -1051,7 +1068,7 @@ public final class IscsiPathsCreateOrUpdateSamples { */ public final class IscsiPathsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/IscsiPaths_Delete.json + * x-ms-original-file: 2025-09-01/IscsiPaths_Delete.json */ /** * Sample code: IscsiPaths_Delete. @@ -1072,7 +1089,7 @@ public final class IscsiPathsDeleteSamples { */ public final class IscsiPathsGetSamples { /* - * x-ms-original-file: 2024-09-01/IscsiPaths_Get.json + * x-ms-original-file: 2025-09-01/IscsiPaths_Get.json */ /** * Sample code: IscsiPaths_Get. @@ -1093,7 +1110,7 @@ public final class IscsiPathsGetSamples { */ public final class IscsiPathsListByPrivateCloudSamples { /* - * x-ms-original-file: 2024-09-01/IscsiPaths_List.json + * x-ms-original-file: 2025-09-01/IscsiPaths_List.json */ /** * Sample code: IscsiPaths_ListByPrivateCloud. @@ -1106,6 +1123,122 @@ public final class IscsiPathsListByPrivateCloudSamples { } ``` +### Licenses_CreateOrUpdate + +```java +import com.azure.resourcemanager.avs.models.LicenseName; + +/** + * Samples for Licenses CreateOrUpdate. + */ +public final class LicensesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01/Licenses_CreateOrUpdate.json + */ + /** + * Sample code: Licenses_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void licensesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.licenses().define(LicenseName.VMWARE_FIREWALL).withExistingPrivateCloud("group1", "cloud1").create(); + } +} +``` + +### Licenses_Delete + +```java +import com.azure.resourcemanager.avs.models.LicenseName; + +/** + * Samples for Licenses Delete. + */ +public final class LicensesDeleteSamples { + /* + * x-ms-original-file: 2025-09-01/Licenses_Delete.json + */ + /** + * Sample code: Licenses_Delete. + * + * @param manager Entry point to AvsManager. + */ + public static void licensesDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.licenses().delete("group1", "cloud1", LicenseName.VMWARE_FIREWALL, com.azure.core.util.Context.NONE); + } +} +``` + +### Licenses_Get + +```java +import com.azure.resourcemanager.avs.models.LicenseName; + +/** + * Samples for Licenses Get. + */ +public final class LicensesGetSamples { + /* + * x-ms-original-file: 2025-09-01/Licenses_Get.json + */ + /** + * Sample code: Licenses_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void licensesGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.licenses() + .getWithResponse("group1", "cloud1", LicenseName.VMWARE_FIREWALL, com.azure.core.util.Context.NONE); + } +} +``` + +### Licenses_GetProperties + +```java +import com.azure.resourcemanager.avs.models.LicenseName; + +/** + * Samples for Licenses GetProperties. + */ +public final class LicensesGetPropertiesSamples { + /* + * x-ms-original-file: 2025-09-01/Licenses_GetProperties.json + */ + /** + * Sample code: Licenses_GetProperties. + * + * @param manager Entry point to AvsManager. + */ + public static void licensesGetProperties(com.azure.resourcemanager.avs.AvsManager manager) { + manager.licenses() + .getPropertiesWithResponse("group1", "cloud1", LicenseName.VMWARE_FIREWALL, + com.azure.core.util.Context.NONE); + } +} +``` + +### Licenses_List + +```java +/** + * Samples for Licenses List. + */ +public final class LicensesListSamples { + /* + * x-ms-original-file: 2025-09-01/Licenses_List.json + */ + /** + * Sample code: Licenses_List. + * + * @param manager Entry point to AvsManager. + */ + public static void licensesList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.licenses().list("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} +``` + ### Locations_CheckQuotaAvailability ```java @@ -1114,7 +1247,7 @@ public final class IscsiPathsListByPrivateCloudSamples { */ public final class LocationsCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: 2024-09-01/Locations_CheckQuotaAvailability.json + * x-ms-original-file: 2025-09-01/Locations_CheckQuotaAvailability.json */ /** * Sample code: Locations_CheckQuotaAvailability. @@ -1137,7 +1270,7 @@ import com.azure.resourcemanager.avs.models.Sku; */ public final class LocationsCheckTrialAvailabilitySamples { /* - * x-ms-original-file: 2024-09-01/Locations_CheckTrialAvailability.json + * x-ms-original-file: 2025-09-01/Locations_CheckTrialAvailability.json */ /** * Sample code: Locations_CheckTrialAvailability. @@ -1149,7 +1282,7 @@ public final class LocationsCheckTrialAvailabilitySamples { } /* - * x-ms-original-file: 2024-09-01/Locations_CheckTrialAvailabilityWithSku.json + * x-ms-original-file: 2025-09-01/Locations_CheckTrialAvailabilityWithSku.json */ /** * Sample code: Locations_CheckTrialAvailabilityWithSku. @@ -1164,6 +1297,127 @@ public final class LocationsCheckTrialAvailabilitySamples { } ``` +### Maintenances_Get + +```java +/** + * Samples for Maintenances Get. + */ +public final class MaintenancesGetSamples { + /* + * x-ms-original-file: 2025-09-01/Maintenances_Get.json + */ + /** + * Sample code: Maintenances_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void maintenancesGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.maintenances().getWithResponse("group1", "cloud1", "maintenance1", com.azure.core.util.Context.NONE); + } +} +``` + +### Maintenances_InitiateChecks + +```java +/** + * Samples for Maintenances InitiateChecks. + */ +public final class MaintenancesInitiateChecksSamples { + /* + * x-ms-original-file: 2025-09-01/Maintenances_InitiateChecks.json + */ + /** + * Sample code: Maintenances_InitiateChecks. + * + * @param manager Entry point to AvsManager. + */ + public static void maintenancesInitiateChecks(com.azure.resourcemanager.avs.AvsManager manager) { + manager.maintenances() + .initiateChecksWithResponse("group1", "cloud1", "maintenance1", com.azure.core.util.Context.NONE); + } +} +``` + +### Maintenances_List + +```java + +/** + * Samples for Maintenances List. + */ +public final class MaintenancesListSamples { + /* + * x-ms-original-file: 2025-09-01/Maintenances_List.json + */ + /** + * Sample code: Maintenances_List. + * + * @param manager Entry point to AvsManager. + */ + public static void maintenancesList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.maintenances().list("group1", "cloud1", null, null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### Maintenances_Reschedule + +```java +import com.azure.resourcemanager.avs.models.MaintenanceReschedule; +import java.time.OffsetDateTime; + +/** + * Samples for Maintenances Reschedule. + */ +public final class MaintenancesRescheduleSamples { + /* + * x-ms-original-file: 2025-09-01/Maintenances_Reschedule.json + */ + /** + * Sample code: Maintenances_Reschedule. + * + * @param manager Entry point to AvsManager. + */ + public static void maintenancesReschedule(com.azure.resourcemanager.avs.AvsManager manager) { + manager.maintenances() + .rescheduleWithResponse("group1", "cloud1", "maintenance1", + new MaintenanceReschedule().withRescheduleTime(OffsetDateTime.parse("2023-01-12T16:17:55.237Z")) + .withMessage("Rescheduled due to xyz"), + com.azure.core.util.Context.NONE); + } +} +``` + +### Maintenances_Schedule + +```java +import com.azure.resourcemanager.avs.models.MaintenanceSchedule; +import java.time.OffsetDateTime; + +/** + * Samples for Maintenances Schedule. + */ +public final class MaintenancesScheduleSamples { + /* + * x-ms-original-file: 2025-09-01/Maintenances_Schedule.json + */ + /** + * Sample code: Maintenances_Schedule. + * + * @param manager Entry point to AvsManager. + */ + public static void maintenancesSchedule(com.azure.resourcemanager.avs.AvsManager manager) { + manager.maintenances() + .scheduleWithResponse("group1", "cloud1", "maintenance1", + new MaintenanceSchedule().withScheduleTime(OffsetDateTime.parse("2025-09-12T16:17:55.237Z")) + .withMessage("scheduled due to xyz"), + com.azure.core.util.Context.NONE); + } +} +``` + ### Operations_List ```java @@ -1172,7 +1426,7 @@ public final class LocationsCheckTrialAvailabilitySamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: 2024-09-01/Operations_List.json + * x-ms-original-file: 2025-09-01/Operations_List.json */ /** * Sample code: Operations_List. @@ -1199,7 +1453,7 @@ import java.util.Arrays; */ public final class PlacementPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/PlacementPolicies_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/PlacementPolicies_CreateOrUpdate.json */ /** * Sample code: PlacementPolicies_CreateOrUpdate. @@ -1231,7 +1485,7 @@ public final class PlacementPoliciesCreateOrUpdateSamples { */ public final class PlacementPoliciesDeleteSamples { /* - * x-ms-original-file: 2024-09-01/PlacementPolicies_Delete.json + * x-ms-original-file: 2025-09-01/PlacementPolicies_Delete.json */ /** * Sample code: PlacementPolicies_Delete. @@ -1252,7 +1506,7 @@ public final class PlacementPoliciesDeleteSamples { */ public final class PlacementPoliciesGetSamples { /* - * x-ms-original-file: 2024-09-01/PlacementPolicies_Get.json + * x-ms-original-file: 2025-09-01/PlacementPolicies_Get.json */ /** * Sample code: PlacementPolicies_Get. @@ -1274,7 +1528,7 @@ public final class PlacementPoliciesGetSamples { */ public final class PlacementPoliciesListSamples { /* - * x-ms-original-file: 2024-09-01/PlacementPolicies_List.json + * x-ms-original-file: 2025-09-01/PlacementPolicies_List.json */ /** * Sample code: PlacementPolicies_List. @@ -1301,7 +1555,7 @@ import java.util.Arrays; */ public final class PlacementPoliciesUpdateSamples { /* - * x-ms-original-file: 2024-09-01/PlacementPolicies_Update.json + * x-ms-original-file: 2025-09-01/PlacementPolicies_Update.json */ /** * Sample code: PlacementPolicies_Update. @@ -1336,6 +1590,8 @@ import com.azure.resourcemanager.avs.models.ManagementCluster; import com.azure.resourcemanager.avs.models.PrivateCloudIdentity; import com.azure.resourcemanager.avs.models.ResourceIdentityType; import com.azure.resourcemanager.avs.models.Sku; +import com.azure.resourcemanager.avs.models.Vcf5License; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -1345,7 +1601,7 @@ import java.util.Map; */ public final class PrivateCloudsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/PrivateClouds_CreateOrUpdate.json */ /** * Sample code: PrivateClouds_CreateOrUpdate. @@ -1362,11 +1618,16 @@ public final class PrivateCloudsCreateOrUpdateSamples { .withIdentity(new PrivateCloudIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) .withManagementCluster(new ManagementCluster().withClusterSize(4)) .withNetworkBlock("192.168.48.0/22") + .withVcfLicense(new Vcf5License().withLicenseKey("fakeTokenPlaceholder") + .withCores(16) + .withEndDate(OffsetDateTime.parse("2025-12-31T23:59:59Z")) + .withBroadcomSiteId("123456") + .withBroadcomContractNumber("123456")) .create(); } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_CreateOrUpdate_StretchedZones.json + * x-ms-original-file: 2025-09-01/PrivateClouds_CreateOrUpdate_StretchedZones.json */ /** * Sample code: PrivateClouds_CreateOrUpdate_StretchedZones. @@ -1383,11 +1644,16 @@ public final class PrivateCloudsCreateOrUpdateSamples { .withZones(Arrays.asList("1", "2")) .withManagementCluster(new ManagementCluster().withClusterSize(4)) .withNetworkBlock("192.168.48.0/22") + .withVcfLicense(new Vcf5License().withLicenseKey("fakeTokenPlaceholder") + .withCores(16) + .withEndDate(OffsetDateTime.parse("2025-12-31T23:59:59Z")) + .withBroadcomSiteId("123456") + .withBroadcomContractNumber("123456")) .create(); } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_CreateOrUpdate_FleetNative.json + * x-ms-original-file: 2025-09-01/PrivateClouds_CreateOrUpdate_FleetNative.json */ /** * Sample code: PrivateClouds_CreateOrUpdate_FleetNative. @@ -1406,11 +1672,16 @@ public final class PrivateCloudsCreateOrUpdateSamples { .withVirtualNetworkId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/vnet") .withDnsZoneType(DnsZoneType.PRIVATE) + .withVcfLicense(new Vcf5License().withLicenseKey("fakeTokenPlaceholder") + .withCores(16) + .withEndDate(OffsetDateTime.parse("2025-12-31T23:59:59Z")) + .withBroadcomSiteId("123456") + .withBroadcomContractNumber("123456")) .create(); } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_CreateOrUpdate_Stretched.json + * x-ms-original-file: 2025-09-01/PrivateClouds_CreateOrUpdate_Stretched.json */ /** * Sample code: PrivateClouds_CreateOrUpdate_Stretched. @@ -1429,6 +1700,11 @@ public final class PrivateCloudsCreateOrUpdateSamples { .withZone(1) .withSecondaryZone(2)) .withNetworkBlock("192.168.48.0/22") + .withVcfLicense(new Vcf5License().withLicenseKey("fakeTokenPlaceholder") + .withCores(16) + .withEndDate(OffsetDateTime.parse("2025-12-31T23:59:59Z")) + .withBroadcomSiteId("123456") + .withBroadcomContractNumber("123456")) .create(); } @@ -1454,7 +1730,7 @@ public final class PrivateCloudsCreateOrUpdateSamples { */ public final class PrivateCloudsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_Delete.json + * x-ms-original-file: 2025-09-01/PrivateClouds_Delete.json */ /** * Sample code: PrivateClouds_Delete. @@ -1475,7 +1751,7 @@ public final class PrivateCloudsDeleteSamples { */ public final class PrivateCloudsGetByResourceGroupSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_Get.json + * x-ms-original-file: 2025-09-01/PrivateClouds_Get.json */ /** * Sample code: PrivateClouds_Get. @@ -1487,7 +1763,7 @@ public final class PrivateCloudsGetByResourceGroupSamples { } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_Get_Stretched.json + * x-ms-original-file: 2025-09-01/PrivateClouds_Get_Stretched.json */ /** * Sample code: PrivateClouds_Get_Stretched. @@ -1500,6 +1776,27 @@ public final class PrivateCloudsGetByResourceGroupSamples { } ``` +### PrivateClouds_GetVcfLicense + +```java +/** + * Samples for PrivateClouds GetVcfLicense. + */ +public final class PrivateCloudsGetVcfLicenseSamples { + /* + * x-ms-original-file: 2025-09-01/PrivateClouds_GetVcfLicense.json + */ + /** + * Sample code: PrivateClouds_GetVcfLicense. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsGetVcfLicense(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().getVcfLicenseWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} +``` + ### PrivateClouds_List ```java @@ -1508,7 +1805,7 @@ public final class PrivateCloudsGetByResourceGroupSamples { */ public final class PrivateCloudsListSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_ListInSubscription.json + * x-ms-original-file: 2025-09-01/PrivateClouds_ListInSubscription.json */ /** * Sample code: PrivateClouds_ListInSubscription. @@ -1520,7 +1817,7 @@ public final class PrivateCloudsListSamples { } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_ListInSubscription_Stretched.json + * x-ms-original-file: 2025-09-01/PrivateClouds_ListInSubscription_Stretched.json */ /** * Sample code: PrivateClouds_ListInSubscription_Stretched. @@ -1541,7 +1838,7 @@ public final class PrivateCloudsListSamples { */ public final class PrivateCloudsListAdminCredentialsSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_ListAdminCredentials.json + * x-ms-original-file: 2025-09-01/PrivateClouds_ListAdminCredentials.json */ /** * Sample code: PrivateClouds_ListAdminCredentials. @@ -1562,7 +1859,7 @@ public final class PrivateCloudsListAdminCredentialsSamples { */ public final class PrivateCloudsListByResourceGroupSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_List.json + * x-ms-original-file: 2025-09-01/PrivateClouds_List.json */ /** * Sample code: PrivateClouds_List. @@ -1574,7 +1871,7 @@ public final class PrivateCloudsListByResourceGroupSamples { } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_List_Stretched.json + * x-ms-original-file: 2025-09-01/PrivateClouds_List_Stretched.json */ /** * Sample code: PrivateClouds_List_Stretched. @@ -1595,7 +1892,7 @@ public final class PrivateCloudsListByResourceGroupSamples { */ public final class PrivateCloudsRotateNsxtPasswordSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_RotateNsxtPassword.json + * x-ms-original-file: 2025-09-01/PrivateClouds_RotateNsxtPassword.json */ /** * Sample code: PrivateClouds_RotateNsxtPassword. @@ -1616,7 +1913,7 @@ public final class PrivateCloudsRotateNsxtPasswordSamples { */ public final class PrivateCloudsRotateVcenterPasswordSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_RotateVcenterPassword.json + * x-ms-original-file: 2025-09-01/PrivateClouds_RotateVcenterPassword.json */ /** * Sample code: PrivateClouds_RotateVcenterPassword. @@ -1645,7 +1942,7 @@ import com.azure.resourcemanager.avs.models.ResourceIdentityType; */ public final class PrivateCloudsUpdateSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_Update.json + * x-ms-original-file: 2025-09-01/PrivateClouds_Update.json */ /** * Sample code: PrivateClouds_Update. @@ -1667,7 +1964,7 @@ public final class PrivateCloudsUpdateSamples { } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_Update_Stretched.json + * x-ms-original-file: 2025-09-01/PrivateClouds_Update_Stretched.json */ /** * Sample code: PrivateClouds_Update_Stretched. @@ -1691,7 +1988,7 @@ public final class PrivateCloudsUpdateSamples { */ public final class ProvisionedNetworksGetSamples { /* - * x-ms-original-file: 2024-09-01/ProvisionedNetworks_Get.json + * x-ms-original-file: 2025-09-01/ProvisionedNetworks_Get.json */ /** * Sample code: ProvisionedNetworks_Get. @@ -1712,7 +2009,7 @@ public final class ProvisionedNetworksGetSamples { */ public final class ProvisionedNetworksListSamples { /* - * x-ms-original-file: 2024-09-01/ProvisionedNetworks_List.json + * x-ms-original-file: 2025-09-01/ProvisionedNetworks_List.json */ /** * Sample code: ProvisionedNetworks_List. @@ -1735,7 +2032,7 @@ import com.azure.resourcemanager.avs.models.PureStoragePolicyProperties; */ public final class PureStoragePoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/PureStoragePolicies_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/PureStoragePolicies_CreateOrUpdate.json */ /** * Sample code: PureStoragePolicies_CreateOrUpdate. @@ -1762,7 +2059,7 @@ public final class PureStoragePoliciesCreateOrUpdateSamples { */ public final class PureStoragePoliciesDeleteSamples { /* - * x-ms-original-file: 2024-09-01/PureStoragePolicies_Delete.json + * x-ms-original-file: 2025-09-01/PureStoragePolicies_Delete.json */ /** * Sample code: PureStoragePolicies_Delete. @@ -1783,7 +2080,7 @@ public final class PureStoragePoliciesDeleteSamples { */ public final class PureStoragePoliciesGetSamples { /* - * x-ms-original-file: 2024-09-01/PureStoragePolicies_Get.json + * x-ms-original-file: 2025-09-01/PureStoragePolicies_Get.json */ /** * Sample code: PureStoragePolicies_Get. @@ -1805,7 +2102,7 @@ public final class PureStoragePoliciesGetSamples { */ public final class PureStoragePoliciesListSamples { /* - * x-ms-original-file: 2024-09-01/PureStoragePolicies_List.json + * x-ms-original-file: 2025-09-01/PureStoragePolicies_List.json */ /** * Sample code: PureStoragePolicies_List. @@ -1826,7 +2123,7 @@ public final class PureStoragePoliciesListSamples { */ public final class ScriptCmdletsGetSamples { /* - * x-ms-original-file: 2024-09-01/ScriptCmdlets_Get.json + * x-ms-original-file: 2025-09-01/ScriptCmdlets_Get.json */ /** * Sample code: ScriptCmdlets_Get. @@ -1849,7 +2146,7 @@ public final class ScriptCmdletsGetSamples { */ public final class ScriptCmdletsListSamples { /* - * x-ms-original-file: 2024-09-01/ScriptCmdlets_List.json + * x-ms-original-file: 2025-09-01/ScriptCmdlets_List.json */ /** * Sample code: ScriptCmdlets_List. @@ -1874,7 +2171,7 @@ import java.util.Arrays; */ public final class ScriptExecutionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/ScriptExecutions_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/ScriptExecutions_CreateOrUpdate.json */ /** * Sample code: ScriptExecutions_CreateOrUpdate. @@ -1908,7 +2205,7 @@ public final class ScriptExecutionsCreateOrUpdateSamples { */ public final class ScriptExecutionsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/ScriptExecutions_Delete.json + * x-ms-original-file: 2025-09-01/ScriptExecutions_Delete.json */ /** * Sample code: ScriptExecutions_Delete. @@ -1929,7 +2226,7 @@ public final class ScriptExecutionsDeleteSamples { */ public final class ScriptExecutionsGetSamples { /* - * x-ms-original-file: 2024-09-01/ScriptExecutions_Get.json + * x-ms-original-file: 2025-09-01/ScriptExecutions_Get.json */ /** * Sample code: ScriptExecutions_Get. @@ -1954,7 +2251,7 @@ import java.util.Arrays; */ public final class ScriptExecutionsGetExecutionLogsSamples { /* - * x-ms-original-file: 2024-09-01/ScriptExecutions_GetExecutionLogs.json + * x-ms-original-file: 2025-09-01/ScriptExecutions_GetExecutionLogs.json */ /** * Sample code: ScriptExecutions_GetExecutionLogs. @@ -1979,7 +2276,7 @@ public final class ScriptExecutionsGetExecutionLogsSamples { */ public final class ScriptExecutionsListSamples { /* - * x-ms-original-file: 2024-09-01/ScriptExecutions_List.json + * x-ms-original-file: 2025-09-01/ScriptExecutions_List.json */ /** * Sample code: ScriptExecutions_List. @@ -2000,7 +2297,7 @@ public final class ScriptExecutionsListSamples { */ public final class ScriptPackagesGetSamples { /* - * x-ms-original-file: 2024-09-01/ScriptPackages_Get.json + * x-ms-original-file: 2025-09-01/ScriptPackages_Get.json */ /** * Sample code: ScriptPackages_Get. @@ -2022,7 +2319,7 @@ public final class ScriptPackagesGetSamples { */ public final class ScriptPackagesListSamples { /* - * x-ms-original-file: 2024-09-01/ScriptPackages_List.json + * x-ms-original-file: 2025-09-01/ScriptPackages_List.json */ /** * Sample code: ScriptPackages_List. @@ -2043,7 +2340,7 @@ public final class ScriptPackagesListSamples { */ public final class SkusListSamples { /* - * x-ms-original-file: 2024-09-01/Skus_List.json + * x-ms-original-file: 2025-09-01/Skus_List.json */ /** * Sample code: Skus_List. @@ -2064,7 +2361,7 @@ public final class SkusListSamples { */ public final class VirtualMachinesGetSamples { /* - * x-ms-original-file: 2024-09-01/VirtualMachines_Get.json + * x-ms-original-file: 2025-09-01/VirtualMachines_Get.json */ /** * Sample code: VirtualMachines_Get. @@ -2086,7 +2383,7 @@ public final class VirtualMachinesGetSamples { */ public final class VirtualMachinesListSamples { /* - * x-ms-original-file: 2024-09-01/VirtualMachines_List.json + * x-ms-original-file: 2025-09-01/VirtualMachines_List.json */ /** * Sample code: VirtualMachines_List. @@ -2110,7 +2407,7 @@ import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; */ public final class VirtualMachinesRestrictMovementSamples { /* - * x-ms-original-file: 2024-09-01/VirtualMachines_RestrictMovement.json + * x-ms-original-file: 2025-09-01/VirtualMachines_RestrictMovement.json */ /** * Sample code: VirtualMachines_RestrictMovement. @@ -2136,7 +2433,7 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; */ public final class WorkloadNetworksCreateDhcpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateDhcp.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreateDhcp.json */ /** * Sample code: WorkloadNetworks_CreateDhcp. @@ -2167,7 +2464,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksCreateDnsServiceSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateDnsService.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreateDnsService.json */ /** * Sample code: WorkloadNetworks_CreateDnsService. @@ -2199,7 +2496,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksCreateDnsZoneSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateDnsZone.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreateDnsZone.json */ /** * Sample code: WorkloadNetworks_CreateDnsZone. @@ -2230,7 +2527,7 @@ import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; */ public final class WorkloadNetworksCreatePortMirroringSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreatePortMirroring.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreatePortMirroring.json */ /** * Sample code: WorkloadNetworks_CreatePortMirroring. @@ -2259,7 +2556,7 @@ public final class WorkloadNetworksCreatePortMirroringSamples { */ public final class WorkloadNetworksCreatePublicIpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreatePublicIP.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreatePublicIP.json */ /** * Sample code: WorkloadNetworks_CreatePublicIP. @@ -2288,7 +2585,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksCreateSegmentsSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateSegments.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreateSegments.json */ /** * Sample code: WorkloadNetworks_CreateSegments. @@ -2319,7 +2616,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksCreateVMGroupSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateVMGroup.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreateVMGroup.json */ /** * Sample code: WorkloadNetworks_CreateVMGroup. @@ -2346,7 +2643,7 @@ public final class WorkloadNetworksCreateVMGroupSamples { */ public final class WorkloadNetworksDeleteDhcpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteDhcp.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeleteDhcp.json */ /** * Sample code: WorkloadNetworks_DeleteDhcp. @@ -2367,7 +2664,7 @@ public final class WorkloadNetworksDeleteDhcpSamples { */ public final class WorkloadNetworksDeleteDnsServiceSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteDnsService.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeleteDnsService.json */ /** * Sample code: WorkloadNetworks_DeleteDnsService. @@ -2389,7 +2686,7 @@ public final class WorkloadNetworksDeleteDnsServiceSamples { */ public final class WorkloadNetworksDeleteDnsZoneSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteDnsZone.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeleteDnsZone.json */ /** * Sample code: WorkloadNetworks_DeleteDnsZone. @@ -2410,7 +2707,7 @@ public final class WorkloadNetworksDeleteDnsZoneSamples { */ public final class WorkloadNetworksDeletePortMirroringSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeletePortMirroring.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeletePortMirroring.json */ /** * Sample code: WorkloadNetworks_DeletePortMirroring. @@ -2432,7 +2729,7 @@ public final class WorkloadNetworksDeletePortMirroringSamples { */ public final class WorkloadNetworksDeletePublicIpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeletePublicIP.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeletePublicIP.json */ /** * Sample code: WorkloadNetworks_DeletePublicIP. @@ -2453,7 +2750,7 @@ public final class WorkloadNetworksDeletePublicIpSamples { */ public final class WorkloadNetworksDeleteSegmentSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteSegment.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeleteSegment.json */ /** * Sample code: WorkloadNetworks_DeleteSegment. @@ -2474,7 +2771,7 @@ public final class WorkloadNetworksDeleteSegmentSamples { */ public final class WorkloadNetworksDeleteVMGroupSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteVMGroup.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeleteVMGroup.json */ /** * Sample code: WorkloadNetworks_DeleteVMGroup. @@ -2495,7 +2792,7 @@ public final class WorkloadNetworksDeleteVMGroupSamples { */ public final class WorkloadNetworksGetSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_Get.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_Get.json */ /** * Sample code: WorkloadNetworks_Get. @@ -2516,7 +2813,7 @@ public final class WorkloadNetworksGetSamples { */ public final class WorkloadNetworksGetDhcpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetDhcp.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetDhcp.json */ /** * Sample code: WorkloadNetworks_GetDhcp. @@ -2537,7 +2834,7 @@ public final class WorkloadNetworksGetDhcpSamples { */ public final class WorkloadNetworksGetDnsServiceSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetDnsService.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetDnsService.json */ /** * Sample code: WorkloadNetworks_GetDnsService. @@ -2559,7 +2856,7 @@ public final class WorkloadNetworksGetDnsServiceSamples { */ public final class WorkloadNetworksGetDnsZoneSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetDnsZone.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetDnsZone.json */ /** * Sample code: WorkloadNetworks_GetDnsZone. @@ -2581,7 +2878,7 @@ public final class WorkloadNetworksGetDnsZoneSamples { */ public final class WorkloadNetworksGetGatewaySamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetGateway.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetGateway.json */ /** * Sample code: WorkloadNetworks_GetGateway. @@ -2603,7 +2900,7 @@ public final class WorkloadNetworksGetGatewaySamples { */ public final class WorkloadNetworksGetPortMirroringSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetPortMirroring.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetPortMirroring.json */ /** * Sample code: WorkloadNetworks_GetPortMirroring. @@ -2625,7 +2922,7 @@ public final class WorkloadNetworksGetPortMirroringSamples { */ public final class WorkloadNetworksGetPublicIpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetPublicIP.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetPublicIP.json */ /** * Sample code: WorkloadNetworks_GetPublicIP. @@ -2647,7 +2944,7 @@ public final class WorkloadNetworksGetPublicIpSamples { */ public final class WorkloadNetworksGetSegmentSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetSegment.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetSegment.json */ /** * Sample code: WorkloadNetworks_GetSegment. @@ -2669,7 +2966,7 @@ public final class WorkloadNetworksGetSegmentSamples { */ public final class WorkloadNetworksGetVMGroupSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetVMGroup.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetVMGroup.json */ /** * Sample code: WorkloadNetworks_GetVMGroup. @@ -2691,7 +2988,7 @@ public final class WorkloadNetworksGetVMGroupSamples { */ public final class WorkloadNetworksGetVirtualMachineSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetVirtualMachine.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetVirtualMachine.json */ /** * Sample code: WorkloadNetworks_GetVirtualMachine. @@ -2713,7 +3010,7 @@ public final class WorkloadNetworksGetVirtualMachineSamples { */ public final class WorkloadNetworksListSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_List.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_List.json */ /** * Sample code: WorkloadNetworks_List. @@ -2734,7 +3031,7 @@ public final class WorkloadNetworksListSamples { */ public final class WorkloadNetworksListDhcpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListDhcp.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListDhcp.json */ /** * Sample code: WorkloadNetworks_ListDhcp. @@ -2755,7 +3052,7 @@ public final class WorkloadNetworksListDhcpSamples { */ public final class WorkloadNetworksListDnsServicesSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListDnsServices.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListDnsServices.json */ /** * Sample code: WorkloadNetworks_ListDnsServices. @@ -2776,7 +3073,7 @@ public final class WorkloadNetworksListDnsServicesSamples { */ public final class WorkloadNetworksListDnsZonesSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListDnsZones.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListDnsZones.json */ /** * Sample code: WorkloadNetworks_ListDnsZones. @@ -2797,7 +3094,7 @@ public final class WorkloadNetworksListDnsZonesSamples { */ public final class WorkloadNetworksListGatewaysSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListGateways.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListGateways.json */ /** * Sample code: WorkloadNetworks_ListGateways. @@ -2818,7 +3115,7 @@ public final class WorkloadNetworksListGatewaysSamples { */ public final class WorkloadNetworksListPortMirroringSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListPortMirroring.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListPortMirroring.json */ /** * Sample code: WorkloadNetworks_ListPortMirroring. @@ -2839,7 +3136,7 @@ public final class WorkloadNetworksListPortMirroringSamples { */ public final class WorkloadNetworksListPublicIPsSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListPublicIPs.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListPublicIPs.json */ /** * Sample code: WorkloadNetworks_ListPublicIPs. @@ -2860,7 +3157,7 @@ public final class WorkloadNetworksListPublicIPsSamples { */ public final class WorkloadNetworksListSegmentsSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListSegments.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListSegments.json */ /** * Sample code: WorkloadNetworks_ListSegments. @@ -2881,7 +3178,7 @@ public final class WorkloadNetworksListSegmentsSamples { */ public final class WorkloadNetworksListVMGroupsSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListVMGroups.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListVMGroups.json */ /** * Sample code: WorkloadNetworks_ListVMGroups. @@ -2902,7 +3199,7 @@ public final class WorkloadNetworksListVMGroupsSamples { */ public final class WorkloadNetworksListVirtualMachinesSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListVirtualMachines.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListVirtualMachines.json */ /** * Sample code: WorkloadNetworks_ListVirtualMachines. @@ -2926,7 +3223,7 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; */ public final class WorkloadNetworksUpdateDhcpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateDhcp.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdateDhcp.json */ /** * Sample code: WorkloadNetworks_UpdateDhcp. @@ -2957,7 +3254,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksUpdateDnsServiceSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateDnsService.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdateDnsService.json */ /** * Sample code: WorkloadNetworks_UpdateDnsService. @@ -2991,7 +3288,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksUpdateDnsZoneSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateDnsZone.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdateDnsZone.json */ /** * Sample code: WorkloadNetworks_UpdateDnsZone. @@ -3024,7 +3321,7 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; */ public final class WorkloadNetworksUpdatePortMirroringSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdatePortMirroring.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdatePortMirroring.json */ /** * Sample code: WorkloadNetworks_UpdatePortMirroring. @@ -3057,7 +3354,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksUpdateSegmentsSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateSegments.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdateSegments.json */ /** * Sample code: WorkloadNetworks_UpdateSegments. @@ -3089,7 +3386,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksUpdateVMGroupSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateVMGroup.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdateVMGroup.json */ /** * Sample code: WorkloadNetworks_UpdateVMGroup. diff --git a/sdk/avs/azure-resourcemanager-avs/pom.xml b/sdk/avs/azure-resourcemanager-avs/pom.xml index c526c9fc1ca6..3fe511a8775c 100644 --- a/sdk/avs/azure-resourcemanager-avs/pom.xml +++ b/sdk/avs/azure-resourcemanager-avs/pom.xml @@ -14,11 +14,11 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-avs</artifactId> - <version>1.4.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-avs;current} --> + <version>1.4.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-avs;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for Avs Management</name> - <description>This package contains Microsoft Azure SDK for Avs Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure VMware Solution API. Package api-version 2024-09-01.</description> + <description>This package contains Microsoft Azure SDK for Avs Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure VMware Solution API. Package api-version 2025-09-01.</description> <url>https://github.com/Azure/azure-sdk-for-java</url> <licenses> @@ -45,7 +45,6 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <jacoco.min.linecoverage>0</jacoco.min.linecoverage> <jacoco.min.branchcoverage>0</jacoco.min.branchcoverage> - <revapi.skip>true</revapi.skip> </properties> <dependencies> <dependency> diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/AvsManager.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/AvsManager.java index b54e622b6464..f014ebf508b7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/AvsManager.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/AvsManager.java @@ -35,7 +35,9 @@ import com.azure.resourcemanager.avs.implementation.HcxEnterpriseSitesImpl; import com.azure.resourcemanager.avs.implementation.HostsImpl; import com.azure.resourcemanager.avs.implementation.IscsiPathsImpl; +import com.azure.resourcemanager.avs.implementation.LicensesImpl; import com.azure.resourcemanager.avs.implementation.LocationsImpl; +import com.azure.resourcemanager.avs.implementation.MaintenancesImpl; import com.azure.resourcemanager.avs.implementation.OperationsImpl; import com.azure.resourcemanager.avs.implementation.PlacementPoliciesImpl; import com.azure.resourcemanager.avs.implementation.PrivateCloudsImpl; @@ -56,7 +58,9 @@ import com.azure.resourcemanager.avs.models.HcxEnterpriseSites; import com.azure.resourcemanager.avs.models.Hosts; import com.azure.resourcemanager.avs.models.IscsiPaths; +import com.azure.resourcemanager.avs.models.Licenses; import com.azure.resourcemanager.avs.models.Locations; +import com.azure.resourcemanager.avs.models.Maintenances; import com.azure.resourcemanager.avs.models.Operations; import com.azure.resourcemanager.avs.models.PlacementPolicies; import com.azure.resourcemanager.avs.models.PrivateClouds; @@ -101,8 +105,12 @@ public final class AvsManager { private IscsiPaths iscsiPaths; + private Licenses licenses; + private Locations locations; + private Maintenances maintenances; + private PlacementPolicies placementPolicies; private PrivateClouds privateClouds; @@ -459,6 +467,18 @@ public IscsiPaths iscsiPaths() { return iscsiPaths; } + /** + * Gets the resource collection API of Licenses. It manages License. + * + * @return Resource collection API of Licenses. + */ + public Licenses licenses() { + if (this.licenses == null) { + this.licenses = new LicensesImpl(clientObject.getLicenses(), this); + } + return licenses; + } + /** * Gets the resource collection API of Locations. * @@ -471,6 +491,18 @@ public Locations locations() { return locations; } + /** + * Gets the resource collection API of Maintenances. + * + * @return Resource collection API of Maintenances. + */ + public Maintenances maintenances() { + if (this.maintenances == null) { + this.maintenances = new MaintenancesImpl(clientObject.getMaintenances(), this); + } + return maintenances; + } + /** * Gets the resource collection API of PlacementPolicies. It manages PlacementPolicy. * diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AvsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AvsClient.java index 1e2b56a6186b..17f7d194c805 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AvsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AvsClient.java @@ -116,6 +116,13 @@ public interface AvsClient { */ IscsiPathsClient getIscsiPaths(); + /** + * Gets the LicensesClient object to access its operations. + * + * @return the LicensesClient object. + */ + LicensesClient getLicenses(); + /** * Gets the LocationsClient object to access its operations. * @@ -123,6 +130,13 @@ public interface AvsClient { */ LocationsClient getLocations(); + /** + * Gets the MaintenancesClient object to access its operations. + * + * @return the MaintenancesClient object. + */ + MaintenancesClient getMaintenances(); + /** * Gets the PlacementPoliciesClient object to access its operations. * diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/LicensesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/LicensesClient.java new file mode 100644 index 000000000000..b935976181bf --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/LicensesClient.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.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.avs.fluent.models.LicenseInner; +import com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner; +import com.azure.resourcemanager.avs.models.LicenseName; + +/** + * An instance of this class provides access to all the operations defined in LicensesClient. + */ +public interface LicensesClient { + /** + * List License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<LicenseInner> list(String resourceGroupName, String privateCloudName); + + /** + * List License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<LicenseInner> list(String resourceGroupName, String privateCloudName, Context context); + + /** + * Get a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a License along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<LicenseInner> getWithResponse(String resourceGroupName, String privateCloudName, LicenseName licenseName, + Context context); + + /** + * Get a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a License. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LicenseInner get(String resourceGroupName, String privateCloudName, LicenseName licenseName); + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @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 license resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<LicenseInner>, LicenseInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, LicenseName licenseName, LicenseInner resource); + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @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 license resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<LicenseInner>, LicenseInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, LicenseName licenseName, LicenseInner resource, Context context); + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @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 license resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LicenseInner createOrUpdate(String resourceGroupName, String privateCloudName, LicenseName licenseName, + LicenseInner resource); + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @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 license resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LicenseInner createOrUpdate(String resourceGroupName, String privateCloudName, LicenseName licenseName, + LicenseInner resource, Context context); + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String privateCloudName, + LicenseName licenseName); + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String privateCloudName, + LicenseName licenseName, Context context); + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 privateCloudName, LicenseName licenseName); + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 privateCloudName, LicenseName licenseName, Context context); + + /** + * Just like ArmResourceActionSync, but with no request body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a license along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<LicensePropertiesInner> getPropertiesWithResponse(String resourceGroupName, String privateCloudName, + LicenseName licenseName, Context context); + + /** + * Just like ArmResourceActionSync, but with no request body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a license. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LicensePropertiesInner getProperties(String resourceGroupName, String privateCloudName, LicenseName licenseName); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/MaintenancesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/MaintenancesClient.java new file mode 100644 index 000000000000..b50d464b59ba --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/MaintenancesClient.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.avs.fluent.models.MaintenanceInner; +import com.azure.resourcemanager.avs.models.MaintenanceReschedule; +import com.azure.resourcemanager.avs.models.MaintenanceSchedule; +import com.azure.resourcemanager.avs.models.MaintenanceStateName; +import com.azure.resourcemanager.avs.models.MaintenanceStatusFilter; +import java.time.OffsetDateTime; + +/** + * An instance of this class provides access to all the operations defined in MaintenancesClient. + */ +public interface MaintenancesClient { + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<MaintenanceInner> list(String resourceGroupName, String privateCloudName); + + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param stateName Filter maintenances based on state. + * @param status Filter active or inactive maintenances. + * @param from date from which result should be returned. ie. scheduledStartTime >= from. + * @param to date till which result should be returned. i.e. scheduledStartTime <= to. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable<MaintenanceInner> list(String resourceGroupName, String privateCloudName, + MaintenanceStateName stateName, MaintenanceStatusFilter status, OffsetDateTime from, OffsetDateTime to, + Context context); + + /** + * Get a Maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Maintenance along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<MaintenanceInner> getWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, Context context); + + /** + * Get a Maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Maintenance. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceInner get(String resourceGroupName, String privateCloudName, String maintenanceName); + + /** + * Reschedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<MaintenanceInner> rescheduleWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceReschedule body, Context context); + + /** + * Reschedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceInner reschedule(String resourceGroupName, String privateCloudName, String maintenanceName, + MaintenanceReschedule body); + + /** + * Schedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<MaintenanceInner> scheduleWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceSchedule body, Context context); + + /** + * Schedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceInner schedule(String resourceGroupName, String privateCloudName, String maintenanceName, + MaintenanceSchedule body); + + /** + * Initiate maintenance readiness checks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<MaintenanceInner> initiateChecksWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, Context context); + + /** + * Initiate maintenance readiness checks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceInner initiateChecks(String resourceGroupName, String privateCloudName, String maintenanceName); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PrivateCloudsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PrivateCloudsClient.java index dfcb28233ee6..675f2e7cf5f5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PrivateCloudsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PrivateCloudsClient.java @@ -13,6 +13,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; +import com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner; import com.azure.resourcemanager.avs.models.PrivateCloudUpdate; /** @@ -401,4 +402,32 @@ Response<AdminCredentialsInner> listAdminCredentialsWithResponse(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) AdminCredentialsInner listAdminCredentials(String resourceGroupName, String privateCloudName); + + /** + * Get the license for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the license for the private cloud along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response<VcfLicenseInner> getVcfLicenseWithResponse(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get the license for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the license for the private cloud. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VcfLicenseInner getVcfLicense(String resourceGroupName, String privateCloudName); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java index 74781b8b0826..b10182fc28ac 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java @@ -108,6 +108,17 @@ public String id() { return this.id; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java index 1a0a8942d7cf..900df918e115 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java @@ -78,6 +78,14 @@ public String vcenterPassword() { return this.vcenterPassword; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java index be2fb5a1d383..0e017ae37ee6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java @@ -139,6 +139,17 @@ public CloudLinkInner withLinkedCloud(String linkedCloud) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java index 1255888ad89b..b57cce1d3d57 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java @@ -77,6 +77,14 @@ public CloudLinkProperties withLinkedCloud(String linkedCloud) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java index df97b08ed62d..1c7054106756 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -211,6 +212,25 @@ public ClusterInner withVsanDatastoreName(String vsanDatastoreName) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + if (sku() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property sku in model ClusterInner")); + } else { + sku().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ClusterInner.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java index 27df4ba32c77..8131d8adcc2b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java @@ -127,6 +127,14 @@ public ClusterProperties withVsanDatastoreName(String vsanDatastoreName) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java index f083830a15a6..00e55c4b7689 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java @@ -73,6 +73,14 @@ public ClusterUpdateProperties withHosts(List<String> hosts) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java index 46bfb9037fbb..0177b66e5d7e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java @@ -38,6 +38,17 @@ public List<ClusterZone> zones() { return this.zones; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (zones() != null) { + zones().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreInner.java index f142ecef48f0..a7017e380ab9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreInner.java @@ -212,6 +212,17 @@ public DatastoreStatus status() { return this.innerProperties() == null ? null : this.innerProperties().status(); } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreProperties.java index b887daec70ab..5ef80578aae0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreProperties.java @@ -156,6 +156,26 @@ public DatastoreStatus status() { return this.status; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (netAppVolume() != null) { + netAppVolume().validate(); + } + if (diskPoolVolume() != null) { + diskPoolVolume().validate(); + } + if (elasticSanVolume() != null) { + elasticSanVolume().validate(); + } + if (pureStorageVolume() != null) { + pureStorageVolume().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java index 0a0f71d3ef78..0bd4d8fd831c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java @@ -147,6 +147,17 @@ public ExpressRouteAuthorizationInner withExpressRouteId(String expressRouteId) return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java index e2716dcb9bb5..0264950dcd01 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java @@ -91,6 +91,14 @@ public ExpressRouteAuthorizationProperties withExpressRouteId(String expressRout return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java index 11331d758b2e..bb9dd9b570e4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java @@ -201,6 +201,17 @@ public GlobalReachConnectionInner withExpressRouteId(String expressRouteId) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java index 9574ecdd9d1c..3d759a9817d2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java @@ -152,6 +152,14 @@ public GlobalReachConnectionProperties withExpressRouteId(String expressRouteId) return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java index 606ac851f931..983e7a7570c0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java @@ -125,6 +125,17 @@ public HcxEnterpriseSiteStatus status() { return this.innerProperties() == null ? null : this.innerProperties().status(); } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java index 1060670576a7..94feae234d74 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java @@ -66,6 +66,14 @@ public HcxEnterpriseSiteStatus status() { return this.status; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HostModelInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HostModelInner.java index e1a3b87b144a..7e96f5239b12 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HostModelInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HostModelInner.java @@ -127,6 +127,20 @@ public String id() { return this.id; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + if (sku() != null) { + sku().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java index dc793c1d5f2e..2f1c23cd338f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java @@ -129,6 +129,17 @@ public IscsiPathInner withNetworkBlock(String networkBlock) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathProperties.java index 0743fc6e723f..5f333c4f4f36 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -62,6 +63,21 @@ public IscsiPathProperties withNetworkBlock(String networkBlock) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (networkBlock() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property networkBlock in model IscsiPathProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IscsiPathProperties.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/LicenseInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/LicenseInner.java new file mode 100644 index 000000000000..e2c6d623577e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/LicenseInner.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A license resource. + */ +@Fluent +public final class LicenseInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private LicensePropertiesInner properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of LicenseInner class. + */ + public LicenseInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public LicensePropertiesInner properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the LicenseInner object itself. + */ + public LicenseInner withProperties(LicensePropertiesInner properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LicenseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LicenseInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LicenseInner. + */ + public static LicenseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LicenseInner deserializedLicenseInner = new LicenseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedLicenseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedLicenseInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedLicenseInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedLicenseInner.properties = LicensePropertiesInner.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedLicenseInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLicenseInner; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/LicensePropertiesInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/LicensePropertiesInner.java new file mode 100644 index 000000000000..0c49808259a9 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/LicensePropertiesInner.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.models.LicenseKind; +import com.azure.resourcemanager.avs.models.LicenseProvisioningState; +import com.azure.resourcemanager.avs.models.VmwareFirewallLicenseProperties; +import java.io.IOException; + +/** + * The properties of a license. + */ +@Immutable +public class LicensePropertiesInner implements JsonSerializable<LicensePropertiesInner> { + /* + * License kind + */ + private LicenseKind kind = LicenseKind.fromString("LicenseProperties"); + + /* + * The state of the license provisioning + */ + private LicenseProvisioningState provisioningState; + + /** + * Creates an instance of LicensePropertiesInner class. + */ + public LicensePropertiesInner() { + } + + /** + * Get the kind property: License kind. + * + * @return the kind value. + */ + public LicenseKind kind() { + return this.kind; + } + + /** + * Get the provisioningState property: The state of the license provisioning. + * + * @return the provisioningState value. + */ + public LicenseProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: The state of the license provisioning. + * + * @param provisioningState the provisioningState value to set. + * @return the LicensePropertiesInner object itself. + */ + LicensePropertiesInner withProvisioningState(LicenseProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LicensePropertiesInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LicensePropertiesInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the LicensePropertiesInner. + */ + public static LicensePropertiesInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("kind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("VmwareFirewall".equals(discriminatorValue)) { + return VmwareFirewallLicenseProperties.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static LicensePropertiesInner fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LicensePropertiesInner deserializedLicensePropertiesInner = new LicensePropertiesInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedLicensePropertiesInner.kind = LicenseKind.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedLicensePropertiesInner.provisioningState + = LicenseProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLicensePropertiesInner; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/MaintenanceInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/MaintenanceInner.java new file mode 100644 index 000000000000..36f2e59c0dc8 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/MaintenanceInner.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.models.MaintenanceProperties; +import java.io.IOException; + +/** + * A cluster resource. + */ +@Immutable +public final class MaintenanceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private MaintenanceProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of MaintenanceInner class. + */ + private MaintenanceInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public MaintenanceProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MaintenanceInner. + */ + public static MaintenanceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceInner deserializedMaintenanceInner = new MaintenanceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMaintenanceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMaintenanceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMaintenanceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedMaintenanceInner.properties = MaintenanceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedMaintenanceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceInner; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java index 739a16f91701..73d77a663a34 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java @@ -104,6 +104,17 @@ 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(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java index 7350f4311b0d..39f303d8b7a5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java @@ -108,6 +108,17 @@ public String id() { return this.id; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java index 49d20a419054..9e5937d64077 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java @@ -151,6 +151,14 @@ public PlacementPolicyUpdateProperties withAzureHybridBenefitType(AzureHybridBen return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudInner.java index 4811027999d4..23bedcc2ec01 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudInner.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -34,7 +35,7 @@ public final class PrivateCloudInner extends Resource { /* * The resource-specific properties for this resource. */ - private PrivateCloudProperties innerProperties; + private PrivateCloudPropertiesInner innerProperties; /* * The SKU (Stock Keeping Unit) assigned to this resource. @@ -82,7 +83,7 @@ public PrivateCloudInner() { * * @return the innerProperties value. */ - private PrivateCloudProperties innerProperties() { + private PrivateCloudPropertiesInner innerProperties() { return this.innerProperties; } @@ -220,7 +221,7 @@ public ManagementCluster managementCluster() { */ public PrivateCloudInner withManagementCluster(ManagementCluster managementCluster) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withManagementCluster(managementCluster); return this; @@ -243,7 +244,7 @@ public InternetEnum internet() { */ public PrivateCloudInner withInternet(InternetEnum internet) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withInternet(internet); return this; @@ -266,7 +267,7 @@ public List<IdentitySource> identitySources() { */ public PrivateCloudInner withIdentitySources(List<IdentitySource> identitySources) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withIdentitySources(identitySources); return this; @@ -289,7 +290,7 @@ public AvailabilityProperties availability() { */ public PrivateCloudInner withAvailability(AvailabilityProperties availability) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withAvailability(availability); return this; @@ -312,7 +313,7 @@ public Encryption encryption() { */ public PrivateCloudInner withEncryption(Encryption encryption) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withEncryption(encryption); return this; @@ -343,7 +344,7 @@ public List<String> extendedNetworkBlocks() { */ public PrivateCloudInner withExtendedNetworkBlocks(List<String> extendedNetworkBlocks) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withExtendedNetworkBlocks(extendedNetworkBlocks); return this; @@ -375,7 +376,7 @@ public Circuit circuit() { */ public PrivateCloudInner withCircuit(Circuit circuit) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withCircuit(circuit); return this; @@ -411,7 +412,7 @@ public String networkBlock() { */ public PrivateCloudInner withNetworkBlock(String networkBlock) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withNetworkBlock(networkBlock); return this; @@ -461,7 +462,7 @@ public String vcenterPassword() { */ public PrivateCloudInner withVcenterPassword(String vcenterPassword) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withVcenterPassword(vcenterPassword); return this; @@ -484,7 +485,7 @@ public String nsxtPassword() { */ public PrivateCloudInner withNsxtPassword(String nsxtPassword) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withNsxtPassword(nsxtPassword); return this; @@ -536,7 +537,7 @@ public Circuit secondaryCircuit() { */ public PrivateCloudInner withSecondaryCircuit(Circuit secondaryCircuit) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withSecondaryCircuit(secondaryCircuit); return this; @@ -570,7 +571,7 @@ public String virtualNetworkId() { */ public PrivateCloudInner withVirtualNetworkId(String virtualNetworkId) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withVirtualNetworkId(virtualNetworkId); return this; @@ -593,12 +594,57 @@ public DnsZoneType dnsZoneType() { */ public PrivateCloudInner withDnsZoneType(DnsZoneType dnsZoneType) { if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); + this.innerProperties = new PrivateCloudPropertiesInner(); } this.innerProperties().withDnsZoneType(dnsZoneType); return this; } + /** + * Get the vcfLicense property: The private cloud license. + * + * @return the vcfLicense value. + */ + public VcfLicenseInner vcfLicense() { + return this.innerProperties() == null ? null : this.innerProperties().vcfLicense(); + } + + /** + * Set the vcfLicense property: The private cloud license. + * + * @param vcfLicense the vcfLicense value to set. + * @return the PrivateCloudInner object itself. + */ + public PrivateCloudInner withVcfLicense(VcfLicenseInner vcfLicense) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudPropertiesInner(); + } + this.innerProperties().withVcfLicense(vcfLicense); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + if (sku() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property sku in model PrivateCloudInner")); + } else { + sku().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateCloudInner.class); + /** * {@inheritDoc} */ @@ -644,7 +690,7 @@ public static PrivateCloudInner fromJson(JsonReader jsonReader) throws IOExcepti } else if ("sku".equals(fieldName)) { deserializedPrivateCloudInner.sku = Sku.fromJson(reader); } else if ("properties".equals(fieldName)) { - deserializedPrivateCloudInner.innerProperties = PrivateCloudProperties.fromJson(reader); + deserializedPrivateCloudInner.innerProperties = PrivateCloudPropertiesInner.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedPrivateCloudInner.identity = PrivateCloudIdentity.fromJson(reader); } else if ("zones".equals(fieldName)) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudPropertiesInner.java similarity index 70% rename from sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java rename to sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudPropertiesInner.java index c640750b6654..c86f7de6a0b3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudPropertiesInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -26,7 +27,7 @@ * The properties of a private cloud resource. */ @Fluent -public final class PrivateCloudProperties implements JsonSerializable<PrivateCloudProperties> { +public final class PrivateCloudPropertiesInner implements JsonSerializable<PrivateCloudPropertiesInner> { /* * The default cluster used for management */ @@ -144,10 +145,15 @@ public final class PrivateCloudProperties implements JsonSerializable<PrivateClo */ private DnsZoneType dnsZoneType; + /* + * The private cloud license + */ + private VcfLicenseInner vcfLicense; + /** - * Creates an instance of PrivateCloudProperties class. + * Creates an instance of PrivateCloudPropertiesInner class. */ - public PrivateCloudProperties() { + public PrivateCloudPropertiesInner() { } /** @@ -163,9 +169,9 @@ public ManagementCluster managementCluster() { * Set the managementCluster property: The default cluster used for management. * * @param managementCluster the managementCluster value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withManagementCluster(ManagementCluster managementCluster) { + public PrivateCloudPropertiesInner withManagementCluster(ManagementCluster managementCluster) { this.managementCluster = managementCluster; return this; } @@ -183,9 +189,9 @@ public InternetEnum internet() { * Set the internet property: Connectivity to internet is enabled or disabled. * * @param internet the internet value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withInternet(InternetEnum internet) { + public PrivateCloudPropertiesInner withInternet(InternetEnum internet) { this.internet = internet; return this; } @@ -203,9 +209,9 @@ public List<IdentitySource> identitySources() { * Set the identitySources property: vCenter Single Sign On Identity Sources. * * @param identitySources the identitySources value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withIdentitySources(List<IdentitySource> identitySources) { + public PrivateCloudPropertiesInner withIdentitySources(List<IdentitySource> identitySources) { this.identitySources = identitySources; return this; } @@ -223,9 +229,9 @@ public AvailabilityProperties availability() { * Set the availability property: Properties describing how the cloud is distributed across availability zones. * * @param availability the availability value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withAvailability(AvailabilityProperties availability) { + public PrivateCloudPropertiesInner withAvailability(AvailabilityProperties availability) { this.availability = availability; return this; } @@ -243,9 +249,9 @@ public Encryption encryption() { * Set the encryption property: Customer managed key encryption, can be enabled or disabled. * * @param encryption the encryption value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withEncryption(Encryption encryption) { + public PrivateCloudPropertiesInner withEncryption(Encryption encryption) { this.encryption = encryption; return this; } @@ -271,9 +277,9 @@ public List<String> extendedNetworkBlocks() { * (A.B.C.D/X). * * @param extendedNetworkBlocks the extendedNetworkBlocks value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withExtendedNetworkBlocks(List<String> extendedNetworkBlocks) { + public PrivateCloudPropertiesInner withExtendedNetworkBlocks(List<String> extendedNetworkBlocks) { this.extendedNetworkBlocks = extendedNetworkBlocks; return this; } @@ -300,9 +306,9 @@ public Circuit circuit() { * Set the circuit property: An ExpressRoute Circuit. * * @param circuit the circuit value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withCircuit(Circuit circuit) { + public PrivateCloudPropertiesInner withCircuit(Circuit circuit) { this.circuit = circuit; return this; } @@ -333,9 +339,9 @@ public String networkBlock() { * A,B,C,D are between 0 and 255, and X is between 0 and 22. * * @param networkBlock the networkBlock value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withNetworkBlock(String networkBlock) { + public PrivateCloudPropertiesInner withNetworkBlock(String networkBlock) { this.networkBlock = networkBlock; return this; } @@ -380,9 +386,9 @@ public String vcenterPassword() { * Set the vcenterPassword property: Optionally, set the vCenter admin password when the private cloud is created. * * @param vcenterPassword the vcenterPassword value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withVcenterPassword(String vcenterPassword) { + public PrivateCloudPropertiesInner withVcenterPassword(String vcenterPassword) { this.vcenterPassword = vcenterPassword; return this; } @@ -400,9 +406,9 @@ public String nsxtPassword() { * Set the nsxtPassword property: Optionally, set the NSX-T Manager password when the private cloud is created. * * @param nsxtPassword the nsxtPassword value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withNsxtPassword(String nsxtPassword) { + public PrivateCloudPropertiesInner withNsxtPassword(String nsxtPassword) { this.nsxtPassword = nsxtPassword; return this; } @@ -449,9 +455,9 @@ public Circuit secondaryCircuit() { * stretched private cloud. * * @param secondaryCircuit the secondaryCircuit value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withSecondaryCircuit(Circuit secondaryCircuit) { + public PrivateCloudPropertiesInner withSecondaryCircuit(Circuit secondaryCircuit) { this.secondaryCircuit = secondaryCircuit; return this; } @@ -480,9 +486,9 @@ public String virtualNetworkId() { * Set the virtualNetworkId property: Azure resource ID of the virtual network. * * @param virtualNetworkId the virtualNetworkId value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withVirtualNetworkId(String virtualNetworkId) { + public PrivateCloudPropertiesInner withVirtualNetworkId(String virtualNetworkId) { this.virtualNetworkId = virtualNetworkId; return this; } @@ -500,13 +506,76 @@ public DnsZoneType dnsZoneType() { * Set the dnsZoneType property: The type of DNS zone to use. * * @param dnsZoneType the dnsZoneType value to set. - * @return the PrivateCloudProperties object itself. + * @return the PrivateCloudPropertiesInner object itself. */ - public PrivateCloudProperties withDnsZoneType(DnsZoneType dnsZoneType) { + public PrivateCloudPropertiesInner withDnsZoneType(DnsZoneType dnsZoneType) { this.dnsZoneType = dnsZoneType; return this; } + /** + * Get the vcfLicense property: The private cloud license. + * + * @return the vcfLicense value. + */ + public VcfLicenseInner vcfLicense() { + return this.vcfLicense; + } + + /** + * Set the vcfLicense property: The private cloud license. + * + * @param vcfLicense the vcfLicense value to set. + * @return the PrivateCloudPropertiesInner object itself. + */ + public PrivateCloudPropertiesInner withVcfLicense(VcfLicenseInner vcfLicense) { + this.vcfLicense = vcfLicense; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (managementCluster() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property managementCluster in model PrivateCloudPropertiesInner")); + } else { + managementCluster().validate(); + } + if (identitySources() != null) { + identitySources().forEach(e -> e.validate()); + } + if (availability() != null) { + availability().validate(); + } + if (encryption() != null) { + encryption().validate(); + } + if (circuit() != null) { + circuit().validate(); + } + if (endpoints() != null) { + endpoints().validate(); + } + if (networkBlock() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property networkBlock in model PrivateCloudPropertiesInner")); + } + if (secondaryCircuit() != null) { + secondaryCircuit().validate(); + } + if (vcfLicense() != null) { + vcfLicense().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateCloudPropertiesInner.class); + /** * {@inheritDoc} */ @@ -528,81 +597,84 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("secondaryCircuit", this.secondaryCircuit); jsonWriter.writeStringField("virtualNetworkId", this.virtualNetworkId); jsonWriter.writeStringField("dnsZoneType", this.dnsZoneType == null ? null : this.dnsZoneType.toString()); + jsonWriter.writeJsonField("vcfLicense", this.vcfLicense); return jsonWriter.writeEndObject(); } /** - * Reads an instance of PrivateCloudProperties from the JsonReader. + * Reads an instance of PrivateCloudPropertiesInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of PrivateCloudProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. + * @return An instance of PrivateCloudPropertiesInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateCloudProperties. + * @throws IOException If an error occurs while reading the PrivateCloudPropertiesInner. */ - public static PrivateCloudProperties fromJson(JsonReader jsonReader) throws IOException { + public static PrivateCloudPropertiesInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - PrivateCloudProperties deserializedPrivateCloudProperties = new PrivateCloudProperties(); + PrivateCloudPropertiesInner deserializedPrivateCloudPropertiesInner = new PrivateCloudPropertiesInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("managementCluster".equals(fieldName)) { - deserializedPrivateCloudProperties.managementCluster = ManagementCluster.fromJson(reader); + deserializedPrivateCloudPropertiesInner.managementCluster = ManagementCluster.fromJson(reader); } else if ("networkBlock".equals(fieldName)) { - deserializedPrivateCloudProperties.networkBlock = reader.getString(); + deserializedPrivateCloudPropertiesInner.networkBlock = reader.getString(); } else if ("internet".equals(fieldName)) { - deserializedPrivateCloudProperties.internet = InternetEnum.fromString(reader.getString()); + deserializedPrivateCloudPropertiesInner.internet = InternetEnum.fromString(reader.getString()); } else if ("identitySources".equals(fieldName)) { List<IdentitySource> identitySources = reader.readArray(reader1 -> IdentitySource.fromJson(reader1)); - deserializedPrivateCloudProperties.identitySources = identitySources; + deserializedPrivateCloudPropertiesInner.identitySources = identitySources; } else if ("availability".equals(fieldName)) { - deserializedPrivateCloudProperties.availability = AvailabilityProperties.fromJson(reader); + deserializedPrivateCloudPropertiesInner.availability = AvailabilityProperties.fromJson(reader); } else if ("encryption".equals(fieldName)) { - deserializedPrivateCloudProperties.encryption = Encryption.fromJson(reader); + deserializedPrivateCloudPropertiesInner.encryption = Encryption.fromJson(reader); } else if ("extendedNetworkBlocks".equals(fieldName)) { List<String> extendedNetworkBlocks = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateCloudProperties.extendedNetworkBlocks = extendedNetworkBlocks; + deserializedPrivateCloudPropertiesInner.extendedNetworkBlocks = extendedNetworkBlocks; } else if ("provisioningState".equals(fieldName)) { - deserializedPrivateCloudProperties.provisioningState + deserializedPrivateCloudPropertiesInner.provisioningState = PrivateCloudProvisioningState.fromString(reader.getString()); } else if ("circuit".equals(fieldName)) { - deserializedPrivateCloudProperties.circuit = Circuit.fromJson(reader); + deserializedPrivateCloudPropertiesInner.circuit = Circuit.fromJson(reader); } else if ("endpoints".equals(fieldName)) { - deserializedPrivateCloudProperties.endpoints = Endpoints.fromJson(reader); + deserializedPrivateCloudPropertiesInner.endpoints = Endpoints.fromJson(reader); } else if ("managementNetwork".equals(fieldName)) { - deserializedPrivateCloudProperties.managementNetwork = reader.getString(); + deserializedPrivateCloudPropertiesInner.managementNetwork = reader.getString(); } else if ("provisioningNetwork".equals(fieldName)) { - deserializedPrivateCloudProperties.provisioningNetwork = reader.getString(); + deserializedPrivateCloudPropertiesInner.provisioningNetwork = reader.getString(); } else if ("vmotionNetwork".equals(fieldName)) { - deserializedPrivateCloudProperties.vmotionNetwork = reader.getString(); + deserializedPrivateCloudPropertiesInner.vmotionNetwork = reader.getString(); } else if ("vcenterPassword".equals(fieldName)) { - deserializedPrivateCloudProperties.vcenterPassword = reader.getString(); + deserializedPrivateCloudPropertiesInner.vcenterPassword = reader.getString(); } else if ("nsxtPassword".equals(fieldName)) { - deserializedPrivateCloudProperties.nsxtPassword = reader.getString(); + deserializedPrivateCloudPropertiesInner.nsxtPassword = reader.getString(); } else if ("vcenterCertificateThumbprint".equals(fieldName)) { - deserializedPrivateCloudProperties.vcenterCertificateThumbprint = reader.getString(); + deserializedPrivateCloudPropertiesInner.vcenterCertificateThumbprint = reader.getString(); } else if ("nsxtCertificateThumbprint".equals(fieldName)) { - deserializedPrivateCloudProperties.nsxtCertificateThumbprint = reader.getString(); + deserializedPrivateCloudPropertiesInner.nsxtCertificateThumbprint = reader.getString(); } else if ("externalCloudLinks".equals(fieldName)) { List<String> externalCloudLinks = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateCloudProperties.externalCloudLinks = externalCloudLinks; + deserializedPrivateCloudPropertiesInner.externalCloudLinks = externalCloudLinks; } else if ("secondaryCircuit".equals(fieldName)) { - deserializedPrivateCloudProperties.secondaryCircuit = Circuit.fromJson(reader); + deserializedPrivateCloudPropertiesInner.secondaryCircuit = Circuit.fromJson(reader); } else if ("nsxPublicIpQuotaRaised".equals(fieldName)) { - deserializedPrivateCloudProperties.nsxPublicIpQuotaRaised + deserializedPrivateCloudPropertiesInner.nsxPublicIpQuotaRaised = NsxPublicIpQuotaRaisedEnum.fromString(reader.getString()); } else if ("virtualNetworkId".equals(fieldName)) { - deserializedPrivateCloudProperties.virtualNetworkId = reader.getString(); + deserializedPrivateCloudPropertiesInner.virtualNetworkId = reader.getString(); } else if ("dnsZoneType".equals(fieldName)) { - deserializedPrivateCloudProperties.dnsZoneType = DnsZoneType.fromString(reader.getString()); + deserializedPrivateCloudPropertiesInner.dnsZoneType = DnsZoneType.fromString(reader.getString()); + } else if ("vcfLicense".equals(fieldName)) { + deserializedPrivateCloudPropertiesInner.vcfLicense = VcfLicenseInner.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedPrivateCloudProperties; + return deserializedPrivateCloudPropertiesInner; }); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java index 7ec3d032a177..da1d4d2bbdbe 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java @@ -215,6 +215,26 @@ public PrivateCloudUpdateProperties withDnsZoneType(DnsZoneType dnsZoneType) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (managementCluster() != null) { + managementCluster().validate(); + } + if (identitySources() != null) { + identitySources().forEach(e -> e.validate()); + } + if (availability() != null) { + availability().validate(); + } + if (encryption() != null) { + encryption().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ProvisionedNetworkInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ProvisionedNetworkInner.java index e58df3ea5225..1877d7e8d82d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ProvisionedNetworkInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ProvisionedNetworkInner.java @@ -97,6 +97,17 @@ public String id() { return this.id; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PureStoragePolicyInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PureStoragePolicyInner.java index 6b584815c84f..df6cde2e5e59 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PureStoragePolicyInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PureStoragePolicyInner.java @@ -108,6 +108,17 @@ public String id() { return this.id; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java index 067fee79ab6f..3cb22332a58a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java @@ -52,6 +52,14 @@ public QuotaEnabled quotaEnabled() { return this.quotaEnabled; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ResourceSkuInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ResourceSkuInner.java index ece947e0bb91..78f24a16321e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ResourceSkuInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ResourceSkuInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -154,6 +155,43 @@ public List<ResourceSkuRestrictions> restrictions() { return this.restrictions; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resourceType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property resourceType in model ResourceSkuInner")); + } + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model ResourceSkuInner")); + } + if (locations() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property locations in model ResourceSkuInner")); + } + if (locationInfo() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property locationInfo in model ResourceSkuInner")); + } else { + locationInfo().forEach(e -> e.validate()); + } + if (capabilities() != null) { + capabilities().forEach(e -> e.validate()); + } + if (restrictions() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property restrictions in model ResourceSkuInner")); + } else { + restrictions().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceSkuInner.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java index d1e200f60f17..dfa4dcbf8866 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java @@ -146,6 +146,17 @@ public List<ScriptParameter> parameters() { return this.innerProperties() == null ? null : this.innerProperties().parameters(); } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java index 46ac56c3f1f1..64f1e523c7f6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java @@ -97,6 +97,17 @@ public List<ScriptParameter> parameters() { return this.parameters; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (parameters() != null) { + parameters().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java index e1a4317b5f4a..bb812745872f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java @@ -352,6 +352,17 @@ public List<String> errors() { return this.innerProperties() == null ? null : this.innerProperties().errors(); } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java index 79cf2900dcc2..161f8ead51bd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -332,6 +333,27 @@ public List<String> errors() { return this.errors; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (parameters() != null) { + parameters().forEach(e -> e.validate()); + } + if (hiddenParameters() != null) { + hiddenParameters().forEach(e -> e.validate()); + } + if (timeout() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property timeout in model ScriptExecutionProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionProperties.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java index 8533bc745477..8c28fd56d560 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java @@ -142,6 +142,17 @@ public String uri() { return this.innerProperties() == null ? null : this.innerProperties().uri(); } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java index 4767e9112643..2102134fa1d9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java @@ -93,6 +93,14 @@ public String uri() { return this.uri; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java index ba815e2b565e..82c6e9f8cd52 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java @@ -51,6 +51,14 @@ public Integer availableHosts() { return this.availableHosts; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VcfLicenseInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VcfLicenseInner.java new file mode 100644 index 000000000000..42d85974fe3d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VcfLicenseInner.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.models.LicenseProvisioningState; +import com.azure.resourcemanager.avs.models.Vcf5License; +import com.azure.resourcemanager.avs.models.VcfLicenseKind; +import java.io.IOException; + +/** + * A VMware Cloud Foundation license. + */ +@Immutable +public class VcfLicenseInner implements JsonSerializable<VcfLicenseInner> { + /* + * License kind + */ + private VcfLicenseKind kind = VcfLicenseKind.fromString("VcfLicense"); + + /* + * The state of the license provisioning + */ + private LicenseProvisioningState provisioningState; + + /** + * Creates an instance of VcfLicenseInner class. + */ + public VcfLicenseInner() { + } + + /** + * Get the kind property: License kind. + * + * @return the kind value. + */ + public VcfLicenseKind kind() { + return this.kind; + } + + /** + * Get the provisioningState property: The state of the license provisioning. + * + * @return the provisioningState value. + */ + public LicenseProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: The state of the license provisioning. + * + * @param provisioningState the provisioningState value to set. + * @return the VcfLicenseInner object itself. + */ + VcfLicenseInner withProvisioningState(LicenseProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VcfLicenseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VcfLicenseInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the VcfLicenseInner. + */ + public static VcfLicenseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("kind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("vcf5".equals(discriminatorValue)) { + return Vcf5License.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static VcfLicenseInner fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VcfLicenseInner deserializedVcfLicenseInner = new VcfLicenseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedVcfLicenseInner.kind = VcfLicenseKind.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedVcfLicenseInner.provisioningState + = LicenseProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVcfLicenseInner; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineInner.java index 766f5659639c..1bcdaa7797b7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineInner.java @@ -143,6 +143,17 @@ public VirtualMachineRestrictMovementState restrictMovement() { return this.innerProperties() == null ? null : this.innerProperties().restrictMovement(); } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineProperties.java index 4800f5a82709..12740fd6a631 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineProperties.java @@ -94,6 +94,14 @@ public VirtualMachineRestrictMovementState restrictMovement() { return this.restrictMovement; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java index caad54a86091..8c43aace77e2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java @@ -108,6 +108,17 @@ public String id() { return this.id; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java index 5b71ecc179b9..23f2cef38a46 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java @@ -256,6 +256,17 @@ public WorkloadNetworkDnsServiceInner withRevision(Long revision) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java index b73f32badc2d..160ab63b7b65 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java @@ -205,6 +205,14 @@ public WorkloadNetworkDnsServiceProperties withRevision(Long revision) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java index 87f53cd5fc9d..b93022ad1b33 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java @@ -245,6 +245,17 @@ public WorkloadNetworkDnsZoneInner withRevision(Long revision) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java index d85fb712b934..17638bf7fe08 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java @@ -188,6 +188,14 @@ public WorkloadNetworkDnsZoneProperties withRevision(Long revision) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java index 90ecb715a783..9f3f78dea743 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java @@ -124,6 +124,17 @@ public String path() { return this.innerProperties() == null ? null : this.innerProperties().path(); } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java index 9e53700656e0..a282c4036e03 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java @@ -65,6 +65,14 @@ public String path() { return this.path; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java index 216de1ac7d06..a78db495a5f0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java @@ -106,6 +106,17 @@ public WorkloadNetworkProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java index 8276882d9177..f97cfbf6bef9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java @@ -232,6 +232,17 @@ public WorkloadNetworkPortMirroringInner withRevision(Long revision) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java index a7a46e519fc1..2d6ebb2c99c0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java @@ -179,6 +179,14 @@ public WorkloadNetworkPortMirroringProperties withRevision(Long revision) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkProperties.java index b0c59738efa9..d05d7604eaee 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkProperties.java @@ -37,6 +37,14 @@ public WorkloadNetworkProvisioningState provisioningState() { return this.provisioningState; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java index ca37215370bb..afa4d42cc36c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java @@ -161,6 +161,17 @@ public WorkloadNetworkPublicIpProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java index ab3456f75321..eec42161c444 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java @@ -101,6 +101,14 @@ public WorkloadNetworkPublicIpProvisioningState provisioningState() { return this.provisioningState; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java index 5e47de0cb2a4..ca41cd2fa325 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java @@ -220,6 +220,17 @@ public WorkloadNetworkSegmentInner withRevision(Long revision) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java index eeaa084890e0..869f82bccc88 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java @@ -169,6 +169,20 @@ public WorkloadNetworkSegmentProperties withRevision(Long revision) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subnet() != null) { + subnet().validate(); + } + if (portVif() != null) { + portVif().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java index 5852e4c9fef6..e6a1780120f0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java @@ -186,6 +186,17 @@ public WorkloadNetworkVMGroupInner withRevision(Long revision) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java index a12ef28dffb7..139e14021333 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java @@ -128,6 +128,14 @@ public WorkloadNetworkVMGroupProperties withRevision(Long revision) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java index b77febbc7c5c..58c911905bc6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java @@ -125,6 +125,17 @@ public VMTypeEnum vmType() { return this.innerProperties() == null ? null : this.innerProperties().vmType(); } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java index aae6905d0058..4bd38e473af8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java @@ -67,6 +67,14 @@ public VMTypeEnum vmType() { return this.vmType; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java index d61064e58c32..b57b3924554f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java @@ -30,6 +30,7 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.AddonsClient; @@ -178,6 +179,22 @@ Response<AddonList> listNextSync(@PathParam(value = "nextLink", encoded = true) */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<AddonInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -215,6 +232,24 @@ private PagedFlux<AddonInner> listAsync(String resourceGroupName, String private */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<AddonInner> listSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<AddonList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, Context.NONE); @@ -236,6 +271,24 @@ private PagedResponse<AddonInner> listSinglePage(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<AddonInner> listSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<AddonList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); @@ -290,6 +343,25 @@ public PagedIterable<AddonInner> list(String resourceGroupName, String privateCl @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<AddonInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName, String addonName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (addonName == null) { + return Mono.error(new IllegalArgumentException("Parameter addonName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -329,6 +401,28 @@ private Mono<AddonInner> getAsync(String resourceGroupName, String privateCloudN @ServiceMethod(returns = ReturnType.SINGLE) public Response<AddonInner> getWithResponse(String resourceGroupName, String privateCloudName, String addonName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (addonName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter addonName is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, addonName, accept, context); @@ -365,6 +459,30 @@ public AddonInner get(String resourceGroupName, String privateCloudName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String privateCloudName, String addonName, AddonInner addon) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (addonName == null) { + return Mono.error(new IllegalArgumentException("Parameter addonName is required and cannot be null.")); + } + if (addon == null) { + return Mono.error(new IllegalArgumentException("Parameter addon is required and cannot be null.")); + } else { + addon.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -389,6 +507,33 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String addonName, AddonInner addon) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (addonName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter addonName is required and cannot be null.")); + } + if (addon == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter addon is required and cannot be null.")); + } else { + addon.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -412,6 +557,33 @@ private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String addonName, AddonInner addon, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (addonName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter addonName is required and cannot be null.")); + } + if (addon == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter addon is required and cannot be null.")); + } else { + addon.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -552,6 +724,25 @@ public AddonInner createOrUpdate(String resourceGroupName, String privateCloudNa @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, String addonName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (addonName == null) { + return Mono.error(new IllegalArgumentException("Parameter addonName is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, addonName, context)) @@ -572,6 +763,28 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String addonName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (addonName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter addonName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, addonName, Context.NONE); } @@ -591,6 +804,28 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String addonName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (addonName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter addonName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, addonName, context); } @@ -711,6 +946,13 @@ public void delete(String resourceGroupName, String privateCloudName, String add */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<AddonInner>> 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)) .<PagedResponse<AddonInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -729,6 +971,15 @@ private Mono<PagedResponse<AddonInner>> listNextSinglePageAsync(String nextLink) */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<AddonInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<AddonList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -747,9 +998,20 @@ private PagedResponse<AddonInner> listNextSinglePage(String nextLink) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<AddonInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<AddonList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(AddonsClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java index 2c99cad10d9c..522adf7045d9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java @@ -30,6 +30,7 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.AuthorizationsClient; @@ -186,6 +187,22 @@ Response<ExpressRouteAuthorizationList> listNextSync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ExpressRouteAuthorizationInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -224,6 +241,24 @@ private PagedFlux<ExpressRouteAuthorizationInner> listAsync(String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ExpressRouteAuthorizationInner> listSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<ExpressRouteAuthorizationList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), @@ -246,6 +281,24 @@ private PagedResponse<ExpressRouteAuthorizationInner> listSinglePage(String reso @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ExpressRouteAuthorizationInner> listSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<ExpressRouteAuthorizationList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), @@ -304,6 +357,26 @@ public PagedIterable<ExpressRouteAuthorizationInner> list(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<ExpressRouteAuthorizationInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName, String authorizationName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (authorizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, authorizationName, accept, context)) @@ -343,6 +416,28 @@ private Mono<ExpressRouteAuthorizationInner> getAsync(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) public Response<ExpressRouteAuthorizationInner> getWithResponse(String resourceGroupName, String privateCloudName, String authorizationName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (authorizationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter authorizationName is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, authorizationName, accept, context); @@ -380,6 +475,31 @@ public ExpressRouteAuthorizationInner get(String resourceGroupName, String priva @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String privateCloudName, String authorizationName, ExpressRouteAuthorizationInner authorization) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (authorizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationName is required and cannot be null.")); + } + if (authorization == null) { + return Mono.error(new IllegalArgumentException("Parameter authorization is required and cannot be null.")); + } else { + authorization.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -404,6 +524,34 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String authorizationName, ExpressRouteAuthorizationInner authorization) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (authorizationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter authorizationName is required and cannot be null.")); + } + if (authorization == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter authorization is required and cannot be null.")); + } else { + authorization.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -427,6 +575,34 @@ private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String authorizationName, ExpressRouteAuthorizationInner authorization, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (authorizationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter authorizationName is required and cannot be null.")); + } + if (authorization == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter authorization is required and cannot be null.")); + } else { + authorization.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -574,6 +750,26 @@ public ExpressRouteAuthorizationInner createOrUpdate(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, String authorizationName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (authorizationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationName is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, authorizationName, context)) @@ -594,6 +790,28 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String authorizationName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (authorizationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter authorizationName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, authorizationName, Context.NONE); } @@ -613,6 +831,28 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String authorizationName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (authorizationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter authorizationName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, authorizationName, context); } @@ -735,6 +975,13 @@ public void delete(String resourceGroupName, String privateCloudName, String aut */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ExpressRouteAuthorizationInner>> 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)) .<PagedResponse<ExpressRouteAuthorizationInner>>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -753,6 +1000,15 @@ private Mono<PagedResponse<ExpressRouteAuthorizationInner>> listNextSinglePageAs */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ExpressRouteAuthorizationInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<ExpressRouteAuthorizationList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -772,10 +1028,21 @@ private PagedResponse<ExpressRouteAuthorizationInner> listNextSinglePage(String */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ExpressRouteAuthorizationInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<ExpressRouteAuthorizationList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(AuthorizationsClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java index d079ff94279d..53cbca44836f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java @@ -36,7 +36,9 @@ import com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient; import com.azure.resourcemanager.avs.fluent.HostsClient; import com.azure.resourcemanager.avs.fluent.IscsiPathsClient; +import com.azure.resourcemanager.avs.fluent.LicensesClient; import com.azure.resourcemanager.avs.fluent.LocationsClient; +import com.azure.resourcemanager.avs.fluent.MaintenancesClient; import com.azure.resourcemanager.avs.fluent.OperationsClient; import com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient; import com.azure.resourcemanager.avs.fluent.PrivateCloudsClient; @@ -286,6 +288,20 @@ public IscsiPathsClient getIscsiPaths() { return this.iscsiPaths; } + /** + * The LicensesClient object to access its operations. + */ + private final LicensesClient licenses; + + /** + * Gets the LicensesClient object to access its operations. + * + * @return the LicensesClient object. + */ + public LicensesClient getLicenses() { + return this.licenses; + } + /** * The LocationsClient object to access its operations. */ @@ -300,6 +316,20 @@ public LocationsClient getLocations() { return this.locations; } + /** + * The MaintenancesClient object to access its operations. + */ + private final MaintenancesClient maintenances; + + /** + * Gets the MaintenancesClient object to access its operations. + * + * @return the MaintenancesClient object. + */ + public MaintenancesClient getMaintenances() { + return this.maintenances; + } + /** * The PlacementPoliciesClient object to access its operations. */ @@ -457,7 +487,7 @@ public WorkloadNetworksClient getWorkloadNetworks() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2024-09-01"; + this.apiVersion = "2025-09-01"; this.operations = new OperationsClientImpl(this); this.addons = new AddonsClientImpl(this); this.authorizations = new AuthorizationsClientImpl(this); @@ -468,7 +498,9 @@ public WorkloadNetworksClient getWorkloadNetworks() { this.hcxEnterpriseSites = new HcxEnterpriseSitesClientImpl(this); this.hosts = new HostsClientImpl(this); this.iscsiPaths = new IscsiPathsClientImpl(this); + this.licenses = new LicensesClientImpl(this); this.locations = new LocationsClientImpl(this); + this.maintenances = new MaintenancesClientImpl(this); this.placementPolicies = new PlacementPoliciesClientImpl(this); this.privateClouds = new PrivateCloudsClientImpl(this); this.provisionedNetworks = new ProvisionedNetworksClientImpl(this); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java index f94c6b4f7499..e517c5d04d7a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java @@ -30,6 +30,7 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.CloudLinksClient; @@ -179,6 +180,22 @@ Response<CloudLinkList> listNextSync(@PathParam(value = "nextLink", encoded = tr */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<CloudLinkInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -216,6 +233,24 @@ private PagedFlux<CloudLinkInner> listAsync(String resourceGroupName, String pri */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<CloudLinkInner> listSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<CloudLinkList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, Context.NONE); @@ -237,6 +272,24 @@ private PagedResponse<CloudLinkInner> listSinglePage(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<CloudLinkInner> listSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<CloudLinkList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); @@ -291,6 +344,25 @@ public PagedIterable<CloudLinkInner> list(String resourceGroupName, String priva @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<CloudLinkInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName, String cloudLinkName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (cloudLinkName == null) { + return Mono.error(new IllegalArgumentException("Parameter cloudLinkName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -330,6 +402,28 @@ private Mono<CloudLinkInner> getAsync(String resourceGroupName, String privateCl @ServiceMethod(returns = ReturnType.SINGLE) public Response<CloudLinkInner> getWithResponse(String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (cloudLinkName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudLinkName is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, cloudLinkName, accept, context); @@ -366,6 +460,30 @@ public CloudLinkInner get(String resourceGroupName, String privateCloudName, Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (cloudLinkName == null) { + return Mono.error(new IllegalArgumentException("Parameter cloudLinkName is required and cannot be null.")); + } + if (cloudLink == null) { + return Mono.error(new IllegalArgumentException("Parameter cloudLink is required and cannot be null.")); + } else { + cloudLink.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -390,6 +508,34 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (cloudLinkName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudLinkName is required and cannot be null.")); + } + if (cloudLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudLink is required and cannot be null.")); + } else { + cloudLink.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -413,6 +559,34 @@ private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (cloudLinkName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudLinkName is required and cannot be null.")); + } + if (cloudLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudLink is required and cannot be null.")); + } else { + cloudLink.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -555,6 +729,25 @@ public CloudLinkInner createOrUpdate(String resourceGroupName, String privateClo @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, String cloudLinkName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (cloudLinkName == null) { + return Mono.error(new IllegalArgumentException("Parameter cloudLinkName is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, cloudLinkName, context)) @@ -575,6 +768,28 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String cloudLinkName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (cloudLinkName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudLinkName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, cloudLinkName, Context.NONE); } @@ -594,6 +809,28 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (cloudLinkName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudLinkName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, cloudLinkName, context); } @@ -715,6 +952,13 @@ public void delete(String resourceGroupName, String privateCloudName, String clo */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<CloudLinkInner>> 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)) .<PagedResponse<CloudLinkInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -733,6 +977,15 @@ private Mono<PagedResponse<CloudLinkInner>> listNextSinglePageAsync(String nextL */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<CloudLinkInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<CloudLinkList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -751,9 +1004,20 @@ private PagedResponse<CloudLinkInner> listNextSinglePage(String nextLink) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<CloudLinkInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<CloudLinkList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(CloudLinksClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java index fae2de12a953..ea939fe645af 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java @@ -32,6 +32,7 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.ClustersClient; @@ -222,6 +223,22 @@ Response<ClusterList> listNextSync(@PathParam(value = "nextLink", encoded = true */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ClusterInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -259,6 +276,24 @@ private PagedFlux<ClusterInner> listAsync(String resourceGroupName, String priva */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ClusterInner> listSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<ClusterList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, Context.NONE); @@ -280,6 +315,24 @@ private PagedResponse<ClusterInner> listSinglePage(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ClusterInner> listSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<ClusterList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); @@ -334,6 +387,25 @@ public PagedIterable<ClusterInner> list(String resourceGroupName, String private @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<ClusterInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName, String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -373,6 +445,28 @@ private Mono<ClusterInner> getAsync(String resourceGroupName, String privateClou @ServiceMethod(returns = ReturnType.SINGLE) public Response<ClusterInner> getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, context); @@ -409,6 +503,30 @@ public ClusterInner get(String resourceGroupName, String privateCloudName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (cluster == null) { + return Mono.error(new IllegalArgumentException("Parameter cluster is required and cannot be null.")); + } else { + cluster.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -433,6 +551,34 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (cluster == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cluster is required and cannot be null.")); + } else { + cluster.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -456,6 +602,34 @@ private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (cluster == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cluster is required and cannot be null.")); + } else { + cluster.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -598,6 +772,30 @@ public ClusterInner createOrUpdate(String resourceGroupName, String privateCloud @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (clusterUpdate == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterUpdate is required and cannot be null.")); + } else { + clusterUpdate.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -622,6 +820,34 @@ private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updateWithResponse(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (clusterUpdate == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterUpdate is required and cannot be null.")); + } else { + clusterUpdate.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -645,6 +871,34 @@ private Response<BinaryData> updateWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updateWithResponse(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (clusterUpdate == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterUpdate is required and cannot be null.")); + } else { + clusterUpdate.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -786,6 +1040,25 @@ public ClusterInner update(String resourceGroupName, String privateCloudName, St @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, context)) @@ -806,6 +1079,28 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String clusterName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, Context.NONE); } @@ -825,6 +1120,28 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, context); } @@ -949,6 +1266,25 @@ public void delete(String resourceGroupName, String privateCloudName, String clu @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<ClusterZoneListInner>> listZonesWithResponseAsync(String resourceGroupName, String privateCloudName, String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listZones(this.client.getEndpoint(), this.client.getApiVersion(), @@ -989,6 +1325,28 @@ private Mono<ClusterZoneListInner> listZonesAsync(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) public Response<ClusterZoneListInner> listZonesWithResponse(String resourceGroupName, String privateCloudName, String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } final String accept = "application/json"; return service.listZonesSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, context); @@ -1022,6 +1380,13 @@ public ClusterZoneListInner listZones(String resourceGroupName, String privateCl */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ClusterInner>> 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)) .<PagedResponse<ClusterInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -1040,6 +1405,15 @@ private Mono<PagedResponse<ClusterInner>> listNextSinglePageAsync(String nextLin */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ClusterInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<ClusterList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -1058,9 +1432,20 @@ private PagedResponse<ClusterInner> listNextSinglePage(String nextLink) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ClusterInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<ClusterList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(ClustersClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java index 5512ec091ecd..25e61693a677 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java @@ -30,6 +30,7 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.DatastoresClient; @@ -183,6 +184,25 @@ Response<DatastoreList> listNextSync(@PathParam(value = "nextLink", encoded = tr @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<DatastoreInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName, String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -223,6 +243,28 @@ private PagedFlux<DatastoreInner> listAsync(String resourceGroupName, String pri @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<DatastoreInner> listSinglePage(String resourceGroupName, String privateCloudName, String clusterName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } final String accept = "application/json"; Response<DatastoreList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, Context.NONE); @@ -245,6 +287,28 @@ private PagedResponse<DatastoreInner> listSinglePage(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<DatastoreInner> listSinglePage(String resourceGroupName, String privateCloudName, String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } final String accept = "application/json"; Response<DatastoreList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, context); @@ -303,6 +367,28 @@ public PagedIterable<DatastoreInner> list(String resourceGroupName, String priva @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<DatastoreInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (datastoreName == null) { + return Mono.error(new IllegalArgumentException("Parameter datastoreName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -346,6 +432,32 @@ private Mono<DatastoreInner> getAsync(String resourceGroupName, String privateCl @ServiceMethod(returns = ReturnType.SINGLE) public Response<DatastoreInner> getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (datastoreName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter datastoreName is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, datastoreName, accept, context); @@ -386,6 +498,33 @@ public DatastoreInner get(String resourceGroupName, String privateCloudName, Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, DatastoreInner datastore) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (datastoreName == null) { + return Mono.error(new IllegalArgumentException("Parameter datastoreName is required and cannot be null.")); + } + if (datastore == null) { + return Mono.error(new IllegalArgumentException("Parameter datastore is required and cannot be null.")); + } else { + datastore.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -411,6 +550,38 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, DatastoreInner datastore) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (datastoreName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter datastoreName is required and cannot be null.")); + } + if (datastore == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter datastore is required and cannot be null.")); + } else { + datastore.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -435,6 +606,38 @@ private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, DatastoreInner datastore, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (datastoreName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter datastoreName is required and cannot be null.")); + } + if (datastore == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter datastore is required and cannot be null.")); + } else { + datastore.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -586,6 +789,28 @@ public DatastoreInner createOrUpdate(String resourceGroupName, String privateClo @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (datastoreName == null) { + return Mono.error(new IllegalArgumentException("Parameter datastoreName is required and cannot be null.")); + } return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, datastoreName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -606,6 +831,32 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (datastoreName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter datastoreName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, datastoreName, Context.NONE); @@ -627,6 +878,32 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (datastoreName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter datastoreName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, datastoreName, context); } @@ -758,6 +1035,13 @@ public void delete(String resourceGroupName, String privateCloudName, String clu */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<DatastoreInner>> 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)) .<PagedResponse<DatastoreInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -776,6 +1060,15 @@ private Mono<PagedResponse<DatastoreInner>> listNextSinglePageAsync(String nextL */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<DatastoreInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<DatastoreList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -794,9 +1087,20 @@ private PagedResponse<DatastoreInner> listNextSinglePage(String nextLink) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<DatastoreInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<DatastoreList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(DatastoresClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java index 12437e7fcf1c..45e487fb1177 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java @@ -30,6 +30,7 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient; @@ -185,6 +186,22 @@ Response<GlobalReachConnectionList> listNextSync(@PathParam(value = "nextLink", @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<GlobalReachConnectionInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -223,6 +240,24 @@ private PagedFlux<GlobalReachConnectionInner> listAsync(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<GlobalReachConnectionInner> listSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<GlobalReachConnectionList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), @@ -245,6 +280,24 @@ private PagedResponse<GlobalReachConnectionInner> listSinglePage(String resource @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<GlobalReachConnectionInner> listSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<GlobalReachConnectionList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), @@ -301,6 +354,26 @@ public PagedIterable<GlobalReachConnectionInner> list(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<GlobalReachConnectionInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (globalReachConnectionName == null) { + return Mono.error( + new IllegalArgumentException("Parameter globalReachConnectionName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -342,6 +415,29 @@ private Mono<GlobalReachConnectionInner> getAsync(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) public Response<GlobalReachConnectionInner> getWithResponse(String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (globalReachConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter globalReachConnectionName is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, globalReachConnectionName, accept, context); @@ -379,6 +475,32 @@ public GlobalReachConnectionInner get(String resourceGroupName, String privateCl @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnectionInner globalReachConnection) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (globalReachConnectionName == null) { + return Mono.error( + new IllegalArgumentException("Parameter globalReachConnectionName is required and cannot be null.")); + } + if (globalReachConnection == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalReachConnection is required and cannot be null.")); + } else { + globalReachConnection.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -403,6 +525,35 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnectionInner globalReachConnection) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (globalReachConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter globalReachConnectionName is required and cannot be null.")); + } + if (globalReachConnection == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter globalReachConnection is required and cannot be null.")); + } else { + globalReachConnection.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -426,6 +577,35 @@ private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnectionInner globalReachConnection, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (globalReachConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter globalReachConnectionName is required and cannot be null.")); + } + if (globalReachConnection == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter globalReachConnection is required and cannot be null.")); + } else { + globalReachConnection.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -573,6 +753,26 @@ public GlobalReachConnectionInner createOrUpdate(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (globalReachConnectionName == null) { + return Mono.error( + new IllegalArgumentException("Parameter globalReachConnectionName is required and cannot be null.")); + } return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, globalReachConnectionName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -592,6 +792,29 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String globalReachConnectionName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (globalReachConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter globalReachConnectionName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, globalReachConnectionName, Context.NONE); @@ -612,6 +835,29 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (globalReachConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter globalReachConnectionName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, globalReachConnectionName, context); } @@ -737,6 +983,13 @@ public void delete(String resourceGroupName, String privateCloudName, String glo */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<GlobalReachConnectionInner>> 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)) .<PagedResponse<GlobalReachConnectionInner>>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -755,6 +1008,15 @@ private Mono<PagedResponse<GlobalReachConnectionInner>> listNextSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<GlobalReachConnectionInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<GlobalReachConnectionList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -774,10 +1036,21 @@ private PagedResponse<GlobalReachConnectionInner> listNextSinglePage(String next */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<GlobalReachConnectionInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<GlobalReachConnectionList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(GlobalReachConnectionsClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java index ab41d5acc2dd..788bc3575985 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java @@ -28,6 +28,7 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient; import com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner; import com.azure.resourcemanager.avs.implementation.models.HcxEnterpriseSiteList; @@ -178,6 +179,22 @@ Response<HcxEnterpriseSiteList> listNextSync(@PathParam(value = "nextLink", enco @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<HcxEnterpriseSiteInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -215,6 +232,24 @@ private PagedFlux<HcxEnterpriseSiteInner> listAsync(String resourceGroupName, St */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<HcxEnterpriseSiteInner> listSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<HcxEnterpriseSiteList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, Context.NONE); @@ -236,6 +271,24 @@ private PagedResponse<HcxEnterpriseSiteInner> listSinglePage(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<HcxEnterpriseSiteInner> listSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<HcxEnterpriseSiteList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); @@ -291,6 +344,26 @@ public PagedIterable<HcxEnterpriseSiteInner> list(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<HcxEnterpriseSiteInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (hcxEnterpriseSiteName == null) { + return Mono + .error(new IllegalArgumentException("Parameter hcxEnterpriseSiteName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -332,6 +405,28 @@ private Mono<HcxEnterpriseSiteInner> getAsync(String resourceGroupName, String p @ServiceMethod(returns = ReturnType.SINGLE) public Response<HcxEnterpriseSiteInner> getWithResponse(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (hcxEnterpriseSiteName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter hcxEnterpriseSiteName is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, hcxEnterpriseSiteName, accept, context); @@ -368,6 +463,32 @@ public HcxEnterpriseSiteInner get(String resourceGroupName, String privateCloudN @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<HcxEnterpriseSiteInner>> createOrUpdateWithResponseAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, HcxEnterpriseSiteInner hcxEnterpriseSite) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (hcxEnterpriseSiteName == null) { + return Mono + .error(new IllegalArgumentException("Parameter hcxEnterpriseSiteName is required and cannot be null.")); + } + if (hcxEnterpriseSite == null) { + return Mono + .error(new IllegalArgumentException("Parameter hcxEnterpriseSite is required and cannot be null.")); + } else { + hcxEnterpriseSite.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -413,6 +534,34 @@ private Mono<HcxEnterpriseSiteInner> createOrUpdateAsync(String resourceGroupNam public Response<HcxEnterpriseSiteInner> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, HcxEnterpriseSiteInner hcxEnterpriseSite, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (hcxEnterpriseSiteName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter hcxEnterpriseSiteName is required and cannot be null.")); + } + if (hcxEnterpriseSite == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter hcxEnterpriseSite is required and cannot be null.")); + } else { + hcxEnterpriseSite.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -453,6 +602,26 @@ public HcxEnterpriseSiteInner createOrUpdate(String resourceGroupName, String pr @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (hcxEnterpriseSiteName == null) { + return Mono + .error(new IllegalArgumentException("Parameter hcxEnterpriseSiteName is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context)) @@ -491,6 +660,28 @@ private Mono<Void> deleteAsync(String resourceGroupName, String privateCloudName @ServiceMethod(returns = ReturnType.SINGLE) public Response<Void> deleteWithResponse(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (hcxEnterpriseSiteName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter hcxEnterpriseSiteName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context); } @@ -522,6 +713,13 @@ public void delete(String resourceGroupName, String privateCloudName, String hcx */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<HcxEnterpriseSiteInner>> 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)) .<PagedResponse<HcxEnterpriseSiteInner>>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -540,6 +738,15 @@ private Mono<PagedResponse<HcxEnterpriseSiteInner>> listNextSinglePageAsync(Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<HcxEnterpriseSiteInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<HcxEnterpriseSiteList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -559,10 +766,21 @@ private PagedResponse<HcxEnterpriseSiteInner> listNextSinglePage(String nextLink */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<HcxEnterpriseSiteInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<HcxEnterpriseSiteList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(HcxEnterpriseSitesClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HostsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HostsClientImpl.java index 770a1cc19c0d..8c45ac99ff07 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HostsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HostsClientImpl.java @@ -25,6 +25,7 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.HostsClient; import com.azure.resourcemanager.avs.fluent.models.HostModelInner; import com.azure.resourcemanager.avs.implementation.models.HostListResult; @@ -130,6 +131,25 @@ Response<HostListResult> listNextSync(@PathParam(value = "nextLink", encoded = t @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<HostModelInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName, String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -170,6 +190,28 @@ private PagedFlux<HostModelInner> listAsync(String resourceGroupName, String pri @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<HostModelInner> listSinglePage(String resourceGroupName, String privateCloudName, String clusterName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } final String accept = "application/json"; Response<HostListResult> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, Context.NONE); @@ -192,6 +234,28 @@ private PagedResponse<HostModelInner> listSinglePage(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<HostModelInner> listSinglePage(String resourceGroupName, String privateCloudName, String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } final String accept = "application/json"; Response<HostListResult> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, context); @@ -250,6 +314,28 @@ public PagedIterable<HostModelInner> list(String resourceGroupName, String priva @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<HostModelInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, String hostId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (hostId == null) { + return Mono.error(new IllegalArgumentException("Parameter hostId is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, hostId, accept, context)) @@ -291,6 +377,32 @@ private Mono<HostModelInner> getAsync(String resourceGroupName, String privateCl @ServiceMethod(returns = ReturnType.SINGLE) public Response<HostModelInner> getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, String hostId, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (hostId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter hostId is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, hostId, accept, context); @@ -325,6 +437,13 @@ public HostModelInner get(String resourceGroupName, String privateCloudName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<HostModelInner>> 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)) .<PagedResponse<HostModelInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -343,6 +462,15 @@ private Mono<PagedResponse<HostModelInner>> listNextSinglePageAsync(String nextL */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<HostModelInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<HostListResult> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -361,9 +489,20 @@ private PagedResponse<HostModelInner> listNextSinglePage(String nextLink) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<HostModelInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<HostListResult> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(HostsClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java index aaf598e40cb7..5fb7622b565f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java @@ -30,6 +30,7 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.IscsiPathsClient; @@ -180,6 +181,22 @@ Response<IscsiPathListResult> listByPrivateCloudNextSync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<IscsiPathInner>> listByPrivateCloudSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByPrivateCloud(this.client.getEndpoint(), this.client.getApiVersion(), @@ -218,6 +235,24 @@ private PagedFlux<IscsiPathInner> listByPrivateCloudAsync(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<IscsiPathInner> listByPrivateCloudSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<IscsiPathListResult> res = service.listByPrivateCloudSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -240,6 +275,24 @@ private PagedResponse<IscsiPathInner> listByPrivateCloudSinglePage(String resour @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<IscsiPathInner> listByPrivateCloudSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<IscsiPathListResult> res = service.listByPrivateCloudSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -294,6 +347,22 @@ public PagedIterable<IscsiPathInner> listByPrivateCloud(String resourceGroupName */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<IscsiPathInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -331,6 +400,24 @@ private Mono<IscsiPathInner> getAsync(String resourceGroupName, String privateCl @ServiceMethod(returns = ReturnType.SINGLE) public Response<IscsiPathInner> getWithResponse(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); @@ -365,6 +452,27 @@ public IscsiPathInner get(String resourceGroupName, String privateCloudName) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String privateCloudName, IscsiPathInner 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -388,6 +496,30 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, IscsiPathInner resource) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -410,6 +542,30 @@ private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, IscsiPathInner resource, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -542,6 +698,22 @@ public IscsiPathInner createOrUpdate(String resourceGroupName, String privateClo @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, context)) @@ -560,6 +732,24 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, Context.NONE); } @@ -578,6 +768,24 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, context); } @@ -690,6 +898,13 @@ public void delete(String resourceGroupName, String privateCloudName, Context co */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<IscsiPathInner>> listByPrivateCloudNextSinglePageAsync(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( @@ -710,6 +925,15 @@ private Mono<PagedResponse<IscsiPathInner>> listByPrivateCloudNextSinglePageAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<IscsiPathInner> listByPrivateCloudNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<IscsiPathListResult> res = service.listByPrivateCloudNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -729,10 +953,21 @@ private PagedResponse<IscsiPathInner> listByPrivateCloudNextSinglePage(String ne */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<IscsiPathInner> listByPrivateCloudNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<IscsiPathListResult> res = service.listByPrivateCloudNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(IscsiPathsClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicenseImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicenseImpl.java new file mode 100644 index 000000000000..844a37c5229a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicenseImpl.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.avs.fluent.models.LicenseInner; +import com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner; +import com.azure.resourcemanager.avs.models.License; +import com.azure.resourcemanager.avs.models.LicenseName; +import com.azure.resourcemanager.avs.models.LicenseProperties; + +public final class LicenseImpl implements License, License.Definition, License.Update { + private LicenseInner innerObject; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public LicenseProperties properties() { + LicensePropertiesInner inner = this.innerModel().properties(); + if (inner != null) { + return new LicensePropertiesImpl(inner, this.manager()); + } else { + return null; + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public LicenseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String privateCloudName; + + private LicenseName licenseName; + + public LicenseImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + this.resourceGroupName = resourceGroupName; + this.privateCloudName = privateCloudName; + return this; + } + + public License create() { + this.innerObject = serviceManager.serviceClient() + .getLicenses() + .createOrUpdate(resourceGroupName, privateCloudName, licenseName, this.innerModel(), Context.NONE); + return this; + } + + public License create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getLicenses() + .createOrUpdate(resourceGroupName, privateCloudName, licenseName, this.innerModel(), context); + return this; + } + + LicenseImpl(LicenseName name, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = new LicenseInner(); + this.serviceManager = serviceManager; + this.licenseName = name; + } + + public LicenseImpl update() { + return this; + } + + public License apply() { + this.innerObject = serviceManager.serviceClient() + .getLicenses() + .createOrUpdate(resourceGroupName, privateCloudName, licenseName, this.innerModel(), Context.NONE); + return this; + } + + public License apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getLicenses() + .createOrUpdate(resourceGroupName, privateCloudName, licenseName, this.innerModel(), context); + return this; + } + + LicenseImpl(LicenseInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.licenseName + = LicenseName.fromString(ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "licenses")); + } + + public License refresh() { + this.innerObject = serviceManager.serviceClient() + .getLicenses() + .getWithResponse(resourceGroupName, privateCloudName, licenseName, Context.NONE) + .getValue(); + return this; + } + + public License refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getLicenses() + .getWithResponse(resourceGroupName, privateCloudName, licenseName, context) + .getValue(); + return this; + } + + public Response<LicenseProperties> getPropertiesWithResponse(Context context) { + return serviceManager.licenses() + .getPropertiesWithResponse(resourceGroupName, privateCloudName, licenseName, context); + } + + public LicenseProperties getProperties() { + return serviceManager.licenses().getProperties(resourceGroupName, privateCloudName, licenseName); + } + + public LicenseImpl withProperties(LicensePropertiesInner properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensePropertiesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensePropertiesImpl.java new file mode 100644 index 000000000000..04978490b6ef --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensePropertiesImpl.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner; +import com.azure.resourcemanager.avs.models.LicenseKind; +import com.azure.resourcemanager.avs.models.LicenseProperties; +import com.azure.resourcemanager.avs.models.LicenseProvisioningState; + +public final class LicensePropertiesImpl implements LicenseProperties { + private LicensePropertiesInner innerObject; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + LicensePropertiesImpl(LicensePropertiesInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public LicenseKind kind() { + return this.innerModel().kind(); + } + + public LicenseProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public LicensePropertiesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensesClientImpl.java new file mode 100644 index 000000000000..add3db2b5f1e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensesClientImpl.java @@ -0,0 +1,1163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.avs.fluent.LicensesClient; +import com.azure.resourcemanager.avs.fluent.models.LicenseInner; +import com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner; +import com.azure.resourcemanager.avs.implementation.models.LicenseListResult; +import com.azure.resourcemanager.avs.models.LicenseName; +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 LicensesClient. + */ +public final class LicensesClientImpl implements LicensesClient { + /** + * The proxy service used to perform REST calls. + */ + private final LicensesService service; + + /** + * The service client containing this operation class. + */ + private final AvsClientImpl client; + + /** + * Initializes an instance of LicensesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LicensesClientImpl(AvsClientImpl client) { + this.service = RestProxy.create(LicensesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AvsClientLicenses to be used by the proxy service to perform REST + * calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AvsClientLicenses") + public interface LicensesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<LicenseListResult>> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<LicenseListResult> listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<LicenseInner>> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("licenseName") LicenseName licenseName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<LicenseInner> getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("licenseName") LicenseName licenseName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("licenseName") LicenseName licenseName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") LicenseInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("licenseName") LicenseName licenseName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") LicenseInner resource, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("licenseName") LicenseName licenseName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("licenseName") LicenseName licenseName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}/getProperties") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<LicensePropertiesInner>> getProperties(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("licenseName") LicenseName licenseName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}/getProperties") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<LicensePropertiesInner> getPropertiesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("licenseName") LicenseName licenseName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<LicenseListResult>> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<LicenseListResult> listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<LicenseInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + .<PagedResponse<LicenseInner>>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 License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<LicenseInner> listAsync(String resourceGroupName, String privateCloudName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<LicenseInner> listSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<LicenseListResult> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<LicenseInner> listSinglePage(String resourceGroupName, String privateCloudName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<LicenseListResult> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<LicenseInner> list(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, privateCloudName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<LicenseInner> list(String resourceGroupName, String privateCloudName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, privateCloudName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Get a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a License along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<LicenseInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName, + LicenseName licenseName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (licenseName == null) { + return Mono.error(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a License on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<LicenseInner> getAsync(String resourceGroupName, String privateCloudName, LicenseName licenseName) { + return getWithResponseAsync(resourceGroupName, privateCloudName, licenseName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a License along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<LicenseInner> getWithResponse(String resourceGroupName, String privateCloudName, + LicenseName licenseName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (licenseName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, licenseName, accept, context); + } + + /** + * Get a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a License. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LicenseInner get(String resourceGroupName, String privateCloudName, LicenseName licenseName) { + return getWithResponse(resourceGroupName, privateCloudName, licenseName, Context.NONE).getValue(); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @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 license resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, LicenseName licenseName, LicenseInner 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (licenseName == null) { + return Mono.error(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, contentType, accept, + resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @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 license resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, + LicenseName licenseName, LicenseInner resource) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (licenseName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, contentType, accept, + resource, Context.NONE); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @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 license resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, + LicenseName licenseName, LicenseInner resource, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (licenseName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, contentType, accept, + resource, context); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @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 license resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<LicenseInner>, LicenseInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, LicenseName licenseName, LicenseInner resource) { + Mono<Response<Flux<ByteBuffer>>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, licenseName, resource); + return this.client.<LicenseInner, LicenseInner>getLroResult(mono, this.client.getHttpPipeline(), + LicenseInner.class, LicenseInner.class, this.client.getContext()); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @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 license resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<LicenseInner>, LicenseInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, LicenseName licenseName, LicenseInner resource) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, privateCloudName, licenseName, resource); + return this.client.<LicenseInner, LicenseInner>getLroResult(response, LicenseInner.class, LicenseInner.class, + Context.NONE); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @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 license resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<LicenseInner>, LicenseInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, LicenseName licenseName, LicenseInner resource, Context context) { + Response<BinaryData> response + = createOrUpdateWithResponse(resourceGroupName, privateCloudName, licenseName, resource, context); + return this.client.<LicenseInner, LicenseInner>getLroResult(response, LicenseInner.class, LicenseInner.class, + context); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @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 license resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<LicenseInner> createOrUpdateAsync(String resourceGroupName, String privateCloudName, + LicenseName licenseName, LicenseInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, licenseName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @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 license resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LicenseInner createOrUpdate(String resourceGroupName, String privateCloudName, LicenseName licenseName, + LicenseInner resource) { + return beginCreateOrUpdate(resourceGroupName, privateCloudName, licenseName, resource).getFinalResult(); + } + + /** + * Create a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @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 license resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LicenseInner createOrUpdate(String resourceGroupName, String privateCloudName, LicenseName licenseName, + LicenseInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, privateCloudName, licenseName, resource, context) + .getFinalResult(); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + LicenseName licenseName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (licenseName == null) { + return Mono.error(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, + LicenseName licenseName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (licenseName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, Context.NONE); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, + LicenseName licenseName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (licenseName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, context); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + LicenseName licenseName) { + Mono<Response<Flux<ByteBuffer>>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, licenseName); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String privateCloudName, + LicenseName licenseName) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, privateCloudName, licenseName); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @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<PollResult<Void>, Void> beginDelete(String resourceGroupName, String privateCloudName, + LicenseName licenseName, Context context) { + Response<BinaryData> response = deleteWithResponse(resourceGroupName, privateCloudName, licenseName, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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<Void> deleteAsync(String resourceGroupName, String privateCloudName, LicenseName licenseName) { + return beginDeleteAsync(resourceGroupName, privateCloudName, licenseName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 privateCloudName, LicenseName licenseName) { + beginDelete(resourceGroupName, privateCloudName, licenseName).getFinalResult(); + } + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 privateCloudName, LicenseName licenseName, Context context) { + beginDelete(resourceGroupName, privateCloudName, licenseName, context).getFinalResult(); + } + + /** + * Just like ArmResourceActionSync, but with no request body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a license along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<LicensePropertiesInner>> getPropertiesWithResponseAsync(String resourceGroupName, + String privateCloudName, LicenseName licenseName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (licenseName == null) { + return Mono.error(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getProperties(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Just like ArmResourceActionSync, but with no request body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a license on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<LicensePropertiesInner> getPropertiesAsync(String resourceGroupName, String privateCloudName, + LicenseName licenseName) { + return getPropertiesWithResponseAsync(resourceGroupName, privateCloudName, licenseName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Just like ArmResourceActionSync, but with no request body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a license along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<LicensePropertiesInner> getPropertiesWithResponse(String resourceGroupName, String privateCloudName, + LicenseName licenseName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (licenseName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getPropertiesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, licenseName, accept, context); + } + + /** + * Just like ArmResourceActionSync, but with no request body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a license. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LicensePropertiesInner getProperties(String resourceGroupName, String privateCloudName, + LicenseName licenseName) { + return getPropertiesWithResponse(resourceGroupName, privateCloudName, licenseName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<LicenseInner>> 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)) + .<PagedResponse<LicenseInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<LicenseInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<LicenseListResult> res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<LicenseInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<LicenseListResult> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(LicensesClientImpl.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensesImpl.java new file mode 100644 index 000000000000..fce9a37039ee --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LicensesImpl.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.LicensesClient; +import com.azure.resourcemanager.avs.fluent.models.LicenseInner; +import com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner; +import com.azure.resourcemanager.avs.models.License; +import com.azure.resourcemanager.avs.models.LicenseName; +import com.azure.resourcemanager.avs.models.LicenseProperties; +import com.azure.resourcemanager.avs.models.Licenses; + +public final class LicensesImpl implements Licenses { + private static final ClientLogger LOGGER = new ClientLogger(LicensesImpl.class); + + private final LicensesClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public LicensesImpl(LicensesClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable<License> list(String resourceGroupName, String privateCloudName) { + PagedIterable<LicenseInner> inner = this.serviceClient().list(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LicenseImpl(inner1, this.manager())); + } + + public PagedIterable<License> list(String resourceGroupName, String privateCloudName, Context context) { + PagedIterable<LicenseInner> inner = this.serviceClient().list(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LicenseImpl(inner1, this.manager())); + } + + public Response<License> getWithResponse(String resourceGroupName, String privateCloudName, LicenseName licenseName, + Context context) { + Response<LicenseInner> inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, licenseName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LicenseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public License get(String resourceGroupName, String privateCloudName, LicenseName licenseName) { + LicenseInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, licenseName); + if (inner != null) { + return new LicenseImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String privateCloudName, LicenseName licenseName) { + this.serviceClient().delete(resourceGroupName, privateCloudName, licenseName); + } + + public void delete(String resourceGroupName, String privateCloudName, LicenseName licenseName, Context context) { + this.serviceClient().delete(resourceGroupName, privateCloudName, licenseName, context); + } + + public Response<LicenseProperties> getPropertiesWithResponse(String resourceGroupName, String privateCloudName, + LicenseName licenseName, Context context) { + Response<LicensePropertiesInner> inner + = this.serviceClient().getPropertiesWithResponse(resourceGroupName, privateCloudName, licenseName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LicensePropertiesImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public LicenseProperties getProperties(String resourceGroupName, String privateCloudName, LicenseName licenseName) { + LicensePropertiesInner inner + = this.serviceClient().getProperties(resourceGroupName, privateCloudName, licenseName); + if (inner != null) { + return new LicensePropertiesImpl(inner, this.manager()); + } else { + return null; + } + } + + public License getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + String licenseNameLocal = ResourceManagerUtils.getValueFromIdByName(id, "licenses"); + if (licenseNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'licenses'.", id))); + } + LicenseName licenseName = LicenseName.fromString(licenseNameLocal); + return this.getWithResponse(resourceGroupName, privateCloudName, licenseName, Context.NONE).getValue(); + } + + public Response<License> getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + String licenseNameLocal = ResourceManagerUtils.getValueFromIdByName(id, "licenses"); + if (licenseNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'licenses'.", id))); + } + LicenseName licenseName = LicenseName.fromString(licenseNameLocal); + return this.getWithResponse(resourceGroupName, privateCloudName, licenseName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + String licenseNameLocal = ResourceManagerUtils.getValueFromIdByName(id, "licenses"); + if (licenseNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'licenses'.", id))); + } + LicenseName licenseName = LicenseName.fromString(licenseNameLocal); + this.delete(resourceGroupName, privateCloudName, licenseName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + String licenseNameLocal = ResourceManagerUtils.getValueFromIdByName(id, "licenses"); + if (licenseNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'licenses'.", id))); + } + LicenseName licenseName = LicenseName.fromString(licenseNameLocal); + this.delete(resourceGroupName, privateCloudName, licenseName, context); + } + + private LicensesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } + + public LicenseImpl define(LicenseName name) { + return new LicenseImpl(name, this.manager()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java index a5252c941cc5..1c3eb41df0ce 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java @@ -22,6 +22,7 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.LocationsClient; import com.azure.resourcemanager.avs.fluent.models.QuotaInner; import com.azure.resourcemanager.avs.fluent.models.TrialInner; @@ -107,6 +108,20 @@ Response<QuotaInner> checkQuotaAvailabilitySync(@HostParam("endpoint") String en */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<TrialInner>> checkTrialAvailabilityWithResponseAsync(String location, Sku sku) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (sku != null) { + sku.validate(); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.checkTrialAvailability(this.client.getEndpoint(), @@ -142,6 +157,23 @@ private Mono<TrialInner> checkTrialAvailabilityAsync(String location) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response<TrialInner> checkTrialAvailabilityWithResponse(String location, Sku sku, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (sku != null) { + sku.validate(); + } final String accept = "application/json"; return service.checkTrialAvailabilitySync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, sku, context); @@ -173,6 +205,17 @@ public TrialInner checkTrialAvailability(String location) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<QuotaInner>> checkQuotaAvailabilityWithResponseAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.checkQuotaAvailability(this.client.getEndpoint(), @@ -206,6 +249,20 @@ private Mono<QuotaInner> checkQuotaAvailabilityAsync(String location) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response<QuotaInner> checkQuotaAvailabilityWithResponse(String location, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } final String accept = "application/json"; return service.checkQuotaAvailabilitySync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context); @@ -224,4 +281,6 @@ public Response<QuotaInner> checkQuotaAvailabilityWithResponse(String location, public QuotaInner checkQuotaAvailability(String location) { return checkQuotaAvailabilityWithResponse(location, Context.NONE).getValue(); } + + private static final ClientLogger LOGGER = new ClientLogger(LocationsClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenanceImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenanceImpl.java new file mode 100644 index 000000000000..f84c6f30c135 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenanceImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.fluent.models.MaintenanceInner; +import com.azure.resourcemanager.avs.models.Maintenance; +import com.azure.resourcemanager.avs.models.MaintenanceProperties; + +public final class MaintenanceImpl implements Maintenance { + private MaintenanceInner innerObject; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + MaintenanceImpl(MaintenanceInner innerObject, com.azure.resourcemanager.avs.AvsManager 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 MaintenanceProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public MaintenanceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenancesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenancesClientImpl.java new file mode 100644 index 000000000000..ee5287ca1fb3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenancesClientImpl.java @@ -0,0 +1,1010 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.MaintenancesClient; +import com.azure.resourcemanager.avs.fluent.models.MaintenanceInner; +import com.azure.resourcemanager.avs.implementation.models.MaintenanceListResult; +import com.azure.resourcemanager.avs.models.MaintenanceReschedule; +import com.azure.resourcemanager.avs.models.MaintenanceSchedule; +import com.azure.resourcemanager.avs.models.MaintenanceStateName; +import com.azure.resourcemanager.avs.models.MaintenanceStatusFilter; +import java.time.OffsetDateTime; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MaintenancesClient. + */ +public final class MaintenancesClientImpl implements MaintenancesClient { + /** + * The proxy service used to perform REST calls. + */ + private final MaintenancesService service; + + /** + * The service client containing this operation class. + */ + private final AvsClientImpl client; + + /** + * Initializes an instance of MaintenancesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MaintenancesClientImpl(AvsClientImpl client) { + this.service + = RestProxy.create(MaintenancesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AvsClientMaintenances to be used by the proxy service to perform REST + * calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AvsClientMaintenances") + public interface MaintenancesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<MaintenanceListResult>> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @QueryParam("stateName") MaintenanceStateName stateName, + @QueryParam("status") MaintenanceStatusFilter status, @QueryParam("from") OffsetDateTime from, + @QueryParam("to") OffsetDateTime to, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<MaintenanceListResult> listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @QueryParam("stateName") MaintenanceStateName stateName, + @QueryParam("status") MaintenanceStatusFilter status, @QueryParam("from") OffsetDateTime from, + @QueryParam("to") OffsetDateTime to, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<MaintenanceInner>> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("maintenanceName") String maintenanceName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<MaintenanceInner> getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("maintenanceName") String maintenanceName, @HeaderParam("Accept") String accept, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/reschedule") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<MaintenanceInner>> reschedule(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("maintenanceName") String maintenanceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") MaintenanceReschedule body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/reschedule") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<MaintenanceInner> rescheduleSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("maintenanceName") String maintenanceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") MaintenanceReschedule body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/schedule") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<MaintenanceInner>> schedule(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("maintenanceName") String maintenanceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") MaintenanceSchedule body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/schedule") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<MaintenanceInner> scheduleSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("maintenanceName") String maintenanceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") MaintenanceSchedule body, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/initiateChecks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<MaintenanceInner>> initiateChecks(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("maintenanceName") String maintenanceName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/initiateChecks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<MaintenanceInner> initiateChecksSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("maintenanceName") String maintenanceName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<MaintenanceListResult>> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<MaintenanceListResult> listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param stateName Filter maintenances based on state. + * @param status Filter active or inactive maintenances. + * @param from date from which result should be returned. ie. scheduledStartTime >= from. + * @param to date till which result should be returned. i.e. scheduledStartTime <= to. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<MaintenanceInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName, + MaintenanceStateName stateName, MaintenanceStatusFilter status, OffsetDateTime from, OffsetDateTime to) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, stateName, status, from, to, + accept, context)) + .<PagedResponse<MaintenanceInner>>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 Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param stateName Filter maintenances based on state. + * @param status Filter active or inactive maintenances. + * @param from date from which result should be returned. ie. scheduledStartTime >= from. + * @param to date till which result should be returned. i.e. scheduledStartTime <= to. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<MaintenanceInner> listAsync(String resourceGroupName, String privateCloudName, + MaintenanceStateName stateName, MaintenanceStatusFilter status, OffsetDateTime from, OffsetDateTime to) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, privateCloudName, stateName, status, from, to), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux<MaintenanceInner> listAsync(String resourceGroupName, String privateCloudName) { + final MaintenanceStateName stateName = null; + final MaintenanceStatusFilter status = null; + final OffsetDateTime from = null; + final OffsetDateTime to = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, privateCloudName, stateName, status, from, to), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param stateName Filter maintenances based on state. + * @param status Filter active or inactive maintenances. + * @param from date from which result should be returned. ie. scheduledStartTime >= from. + * @param to date till which result should be returned. i.e. scheduledStartTime <= to. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<MaintenanceInner> listSinglePage(String resourceGroupName, String privateCloudName, + MaintenanceStateName stateName, MaintenanceStatusFilter status, OffsetDateTime from, OffsetDateTime to) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<MaintenanceListResult> res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, stateName, status, from, to, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param stateName Filter maintenances based on state. + * @param status Filter active or inactive maintenances. + * @param from date from which result should be returned. ie. scheduledStartTime >= from. + * @param to date till which result should be returned. i.e. scheduledStartTime <= to. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<MaintenanceInner> listSinglePage(String resourceGroupName, String privateCloudName, + MaintenanceStateName stateName, MaintenanceStatusFilter status, OffsetDateTime from, OffsetDateTime to, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + Response<MaintenanceListResult> res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, stateName, status, from, to, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<MaintenanceInner> list(String resourceGroupName, String privateCloudName) { + final MaintenanceStateName stateName = null; + final MaintenanceStatusFilter status = null; + final OffsetDateTime from = null; + final OffsetDateTime to = null; + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, privateCloudName, stateName, status, from, to), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param stateName Filter maintenances based on state. + * @param status Filter active or inactive maintenances. + * @param from date from which result should be returned. ie. scheduledStartTime >= from. + * @param to date till which result should be returned. i.e. scheduledStartTime <= to. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable<MaintenanceInner> list(String resourceGroupName, String privateCloudName, + MaintenanceStateName stateName, MaintenanceStatusFilter status, OffsetDateTime from, OffsetDateTime to, + Context context) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, privateCloudName, stateName, status, from, to, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Get a Maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Maintenance along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<MaintenanceInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String maintenanceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (maintenanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter maintenanceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, maintenanceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a Maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Maintenance on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<MaintenanceInner> getAsync(String resourceGroupName, String privateCloudName, String maintenanceName) { + return getWithResponseAsync(resourceGroupName, privateCloudName, maintenanceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a Maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Maintenance along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<MaintenanceInner> getWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (maintenanceName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter maintenanceName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, maintenanceName, accept, context); + } + + /** + * Get a Maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Maintenance. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceInner get(String resourceGroupName, String privateCloudName, String maintenanceName) { + return getWithResponse(resourceGroupName, privateCloudName, maintenanceName, Context.NONE).getValue(); + } + + /** + * Reschedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<MaintenanceInner>> rescheduleWithResponseAsync(String resourceGroupName, + String privateCloudName, String maintenanceName, MaintenanceReschedule body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (maintenanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter maintenanceName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.reschedule(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, maintenanceName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Reschedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<MaintenanceInner> rescheduleAsync(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceReschedule body) { + return rescheduleWithResponseAsync(resourceGroupName, privateCloudName, maintenanceName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Reschedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<MaintenanceInner> rescheduleWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceReschedule body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (maintenanceName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter maintenanceName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.rescheduleSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, maintenanceName, contentType, accept, + body, context); + } + + /** + * Reschedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceInner reschedule(String resourceGroupName, String privateCloudName, String maintenanceName, + MaintenanceReschedule body) { + return rescheduleWithResponse(resourceGroupName, privateCloudName, maintenanceName, body, Context.NONE) + .getValue(); + } + + /** + * Schedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<MaintenanceInner>> scheduleWithResponseAsync(String resourceGroupName, + String privateCloudName, String maintenanceName, MaintenanceSchedule body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (maintenanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter maintenanceName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.schedule(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, maintenanceName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Schedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<MaintenanceInner> scheduleAsync(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceSchedule body) { + return scheduleWithResponseAsync(resourceGroupName, privateCloudName, maintenanceName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Schedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<MaintenanceInner> scheduleWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceSchedule body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (maintenanceName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter maintenanceName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.scheduleSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, maintenanceName, contentType, accept, + body, context); + } + + /** + * Schedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceInner schedule(String resourceGroupName, String privateCloudName, String maintenanceName, + MaintenanceSchedule body) { + return scheduleWithResponse(resourceGroupName, privateCloudName, maintenanceName, body, Context.NONE) + .getValue(); + } + + /** + * Initiate maintenance readiness checks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<MaintenanceInner>> initiateChecksWithResponseAsync(String resourceGroupName, + String privateCloudName, String maintenanceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (maintenanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter maintenanceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.initiateChecks(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, maintenanceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Initiate maintenance readiness checks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<MaintenanceInner> initiateChecksAsync(String resourceGroupName, String privateCloudName, + String maintenanceName) { + return initiateChecksWithResponseAsync(resourceGroupName, privateCloudName, maintenanceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Initiate maintenance readiness checks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<MaintenanceInner> initiateChecksWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (maintenanceName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter maintenanceName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.initiateChecksSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, maintenanceName, accept, context); + } + + /** + * Initiate maintenance readiness checks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceInner initiateChecks(String resourceGroupName, String privateCloudName, String maintenanceName) { + return initiateChecksWithResponse(resourceGroupName, privateCloudName, maintenanceName, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<PagedResponse<MaintenanceInner>> 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)) + .<PagedResponse<MaintenanceInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<MaintenanceInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<MaintenanceListResult> res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse<MaintenanceInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response<MaintenanceListResult> res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(MaintenancesClientImpl.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenancesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenancesImpl.java new file mode 100644 index 000000000000..7a535dbfe18d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/MaintenancesImpl.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.MaintenancesClient; +import com.azure.resourcemanager.avs.fluent.models.MaintenanceInner; +import com.azure.resourcemanager.avs.models.Maintenance; +import com.azure.resourcemanager.avs.models.MaintenanceReschedule; +import com.azure.resourcemanager.avs.models.MaintenanceSchedule; +import com.azure.resourcemanager.avs.models.MaintenanceStateName; +import com.azure.resourcemanager.avs.models.MaintenanceStatusFilter; +import com.azure.resourcemanager.avs.models.Maintenances; +import java.time.OffsetDateTime; + +public final class MaintenancesImpl implements Maintenances { + private static final ClientLogger LOGGER = new ClientLogger(MaintenancesImpl.class); + + private final MaintenancesClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public MaintenancesImpl(MaintenancesClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable<Maintenance> list(String resourceGroupName, String privateCloudName) { + PagedIterable<MaintenanceInner> inner = this.serviceClient().list(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MaintenanceImpl(inner1, this.manager())); + } + + public PagedIterable<Maintenance> list(String resourceGroupName, String privateCloudName, + MaintenanceStateName stateName, MaintenanceStatusFilter status, OffsetDateTime from, OffsetDateTime to, + Context context) { + PagedIterable<MaintenanceInner> inner + = this.serviceClient().list(resourceGroupName, privateCloudName, stateName, status, from, to, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MaintenanceImpl(inner1, this.manager())); + } + + public Response<Maintenance> getWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, Context context) { + Response<MaintenanceInner> inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, maintenanceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MaintenanceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Maintenance get(String resourceGroupName, String privateCloudName, String maintenanceName) { + MaintenanceInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, maintenanceName); + if (inner != null) { + return new MaintenanceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response<Maintenance> rescheduleWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceReschedule body, Context context) { + Response<MaintenanceInner> inner = this.serviceClient() + .rescheduleWithResponse(resourceGroupName, privateCloudName, maintenanceName, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MaintenanceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Maintenance reschedule(String resourceGroupName, String privateCloudName, String maintenanceName, + MaintenanceReschedule body) { + MaintenanceInner inner + = this.serviceClient().reschedule(resourceGroupName, privateCloudName, maintenanceName, body); + if (inner != null) { + return new MaintenanceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response<Maintenance> scheduleWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceSchedule body, Context context) { + Response<MaintenanceInner> inner = this.serviceClient() + .scheduleWithResponse(resourceGroupName, privateCloudName, maintenanceName, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MaintenanceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Maintenance schedule(String resourceGroupName, String privateCloudName, String maintenanceName, + MaintenanceSchedule body) { + MaintenanceInner inner + = this.serviceClient().schedule(resourceGroupName, privateCloudName, maintenanceName, body); + if (inner != null) { + return new MaintenanceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response<Maintenance> initiateChecksWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, Context context) { + Response<MaintenanceInner> inner = this.serviceClient() + .initiateChecksWithResponse(resourceGroupName, privateCloudName, maintenanceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MaintenanceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Maintenance initiateChecks(String resourceGroupName, String privateCloudName, String maintenanceName) { + MaintenanceInner inner + = this.serviceClient().initiateChecks(resourceGroupName, privateCloudName, maintenanceName); + if (inner != null) { + return new MaintenanceImpl(inner, this.manager()); + } else { + return null; + } + } + + private MaintenancesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java index c71bef2a3307..f0206c1d8f78 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java @@ -25,6 +25,7 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.OperationsClient; import com.azure.resourcemanager.avs.fluent.models.OperationInner; import com.azure.resourcemanager.avs.implementation.models.OperationListResult; @@ -101,6 +102,10 @@ Response<OperationListResult> listNextSync(@PathParam(value = "nextLink", encode */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<OperationInner>> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext( @@ -132,6 +137,11 @@ private PagedFlux<OperationInner> listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<OperationInner> listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<OperationListResult> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); @@ -150,6 +160,11 @@ private PagedResponse<OperationInner> listSinglePage() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<OperationInner> listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<OperationListResult> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); @@ -197,6 +212,13 @@ public PagedIterable<OperationInner> list(Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<OperationInner>> 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)) .<PagedResponse<OperationInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -215,6 +237,15 @@ private Mono<PagedResponse<OperationInner>> listNextSinglePageAsync(String nextL */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<OperationInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<OperationListResult> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -234,9 +265,20 @@ private PagedResponse<OperationInner> listNextSinglePage(String nextLink) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<OperationInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<OperationListResult> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(OperationsClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesClientImpl.java index 9430df358515..60a85400048d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesClientImpl.java @@ -31,6 +31,7 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient; @@ -209,6 +210,25 @@ Response<PlacementPoliciesList> listNextSync(@PathParam(value = "nextLink", enco @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<PlacementPolicyInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName, String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -250,6 +270,28 @@ private PagedFlux<PlacementPolicyInner> listAsync(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<PlacementPolicyInner> listSinglePage(String resourceGroupName, String privateCloudName, String clusterName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } final String accept = "application/json"; Response<PlacementPoliciesList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, Context.NONE); @@ -272,6 +314,28 @@ private PagedResponse<PlacementPolicyInner> listSinglePage(String resourceGroupN @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<PlacementPolicyInner> listSinglePage(String resourceGroupName, String privateCloudName, String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } final String accept = "application/json"; Response<PlacementPoliciesList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, context); @@ -331,6 +395,29 @@ public PagedIterable<PlacementPolicyInner> list(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<PlacementPolicyInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (placementPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter placementPolicyName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -374,6 +461,32 @@ private Mono<PlacementPolicyInner> getAsync(String resourceGroupName, String pri @ServiceMethod(returns = ReturnType.SINGLE) public Response<PlacementPolicyInner> getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (placementPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter placementPolicyName is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, placementPolicyName, accept, context); @@ -415,6 +528,35 @@ public PlacementPolicyInner get(String resourceGroupName, String privateCloudNam @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (placementPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter placementPolicyName is required and cannot be null.")); + } + if (placementPolicy == null) { + return Mono + .error(new IllegalArgumentException("Parameter placementPolicy is required and cannot be null.")); + } else { + placementPolicy.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -440,6 +582,38 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (placementPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter placementPolicyName is required and cannot be null.")); + } + if (placementPolicy == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter placementPolicy is required and cannot be null.")); + } else { + placementPolicy.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -464,6 +638,38 @@ private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (placementPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter placementPolicyName is required and cannot be null.")); + } + if (placementPolicy == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter placementPolicy is required and cannot be null.")); + } else { + placementPolicy.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -619,6 +825,35 @@ public PlacementPolicyInner createOrUpdate(String resourceGroupName, String priv @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (placementPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter placementPolicyName is required and cannot be null.")); + } + if (placementPolicyUpdate == null) { + return Mono + .error(new IllegalArgumentException("Parameter placementPolicyUpdate is required and cannot be null.")); + } else { + placementPolicyUpdate.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -644,6 +879,38 @@ private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updateWithResponse(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (placementPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter placementPolicyName is required and cannot be null.")); + } + if (placementPolicyUpdate == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter placementPolicyUpdate is required and cannot be null.")); + } else { + placementPolicyUpdate.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -668,6 +935,38 @@ private Response<BinaryData> updateWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updateWithResponse(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (placementPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter placementPolicyName is required and cannot be null.")); + } + if (placementPolicyUpdate == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter placementPolicyUpdate is required and cannot be null.")); + } else { + placementPolicyUpdate.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -821,6 +1120,29 @@ public PlacementPolicyInner update(String resourceGroupName, String privateCloud @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (placementPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter placementPolicyName is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, placementPolicyName, @@ -843,6 +1165,32 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (placementPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter placementPolicyName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, placementPolicyName, Context.NONE); @@ -864,6 +1212,32 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (placementPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter placementPolicyName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, placementPolicyName, context); @@ -997,6 +1371,13 @@ public void delete(String resourceGroupName, String privateCloudName, String clu */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<PlacementPolicyInner>> 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)) .<PagedResponse<PlacementPolicyInner>>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -1015,6 +1396,15 @@ private Mono<PagedResponse<PlacementPolicyInner>> listNextSinglePageAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<PlacementPolicyInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<PlacementPoliciesList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1034,10 +1424,21 @@ private PagedResponse<PlacementPolicyInner> listNextSinglePage(String nextLink) */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<PlacementPolicyInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<PlacementPoliciesList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(PlacementPoliciesClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudImpl.java index b0c23572d024..830cbad8ca8e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudImpl.java @@ -9,6 +9,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; +import com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner; import com.azure.resourcemanager.avs.models.AdminCredentials; import com.azure.resourcemanager.avs.models.AvailabilityProperties; import com.azure.resourcemanager.avs.models.Circuit; @@ -24,6 +25,7 @@ import com.azure.resourcemanager.avs.models.PrivateCloudProvisioningState; import com.azure.resourcemanager.avs.models.PrivateCloudUpdate; import com.azure.resourcemanager.avs.models.Sku; +import com.azure.resourcemanager.avs.models.VcfLicense; import java.util.Collections; import java.util.List; import java.util.Map; @@ -182,6 +184,15 @@ public DnsZoneType dnsZoneType() { return this.innerModel().dnsZoneType(); } + public VcfLicense vcfLicense() { + VcfLicenseInner inner = this.innerModel().vcfLicense(); + if (inner != null) { + return new VcfLicenseImpl(inner, this.manager()); + } else { + return null; + } + } + public Region region() { return Region.fromName(this.regionName()); } @@ -300,6 +311,14 @@ public AdminCredentials listAdminCredentials() { return serviceManager.privateClouds().listAdminCredentials(resourceGroupName, privateCloudName); } + public Response<VcfLicense> getVcfLicenseWithResponse(Context context) { + return serviceManager.privateClouds().getVcfLicenseWithResponse(resourceGroupName, privateCloudName, context); + } + + public VcfLicense getVcfLicense() { + return serviceManager.privateClouds().getVcfLicense(resourceGroupName, privateCloudName); + } + public PrivateCloudImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -440,6 +459,11 @@ public PrivateCloudImpl withDnsZoneType(DnsZoneType dnsZoneType) { } } + public PrivateCloudImpl withVcfLicense(VcfLicenseInner vcfLicense) { + this.innerModel().withVcfLicense(vcfLicense); + return this; + } + private boolean isInCreateMode() { return this.innerModel() == null || this.innerModel().id() == null; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudPropertiesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudPropertiesImpl.java new file mode 100644 index 000000000000..bf114e8ab953 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudPropertiesImpl.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.resourcemanager.avs.fluent.models.PrivateCloudPropertiesInner; +import com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner; +import com.azure.resourcemanager.avs.models.AvailabilityProperties; +import com.azure.resourcemanager.avs.models.Circuit; +import com.azure.resourcemanager.avs.models.DnsZoneType; +import com.azure.resourcemanager.avs.models.Encryption; +import com.azure.resourcemanager.avs.models.Endpoints; +import com.azure.resourcemanager.avs.models.IdentitySource; +import com.azure.resourcemanager.avs.models.InternetEnum; +import com.azure.resourcemanager.avs.models.ManagementCluster; +import com.azure.resourcemanager.avs.models.NsxPublicIpQuotaRaisedEnum; +import com.azure.resourcemanager.avs.models.PrivateCloudProperties; +import com.azure.resourcemanager.avs.models.PrivateCloudProvisioningState; +import com.azure.resourcemanager.avs.models.VcfLicense; +import java.util.Collections; +import java.util.List; + +public final class PrivateCloudPropertiesImpl implements PrivateCloudProperties { + private PrivateCloudPropertiesInner innerObject; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + PrivateCloudPropertiesImpl(PrivateCloudPropertiesInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public ManagementCluster managementCluster() { + return this.innerModel().managementCluster(); + } + + public InternetEnum internet() { + return this.innerModel().internet(); + } + + public List<IdentitySource> identitySources() { + List<IdentitySource> inner = this.innerModel().identitySources(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public AvailabilityProperties availability() { + return this.innerModel().availability(); + } + + public Encryption encryption() { + return this.innerModel().encryption(); + } + + public List<String> extendedNetworkBlocks() { + List<String> inner = this.innerModel().extendedNetworkBlocks(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PrivateCloudProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public Circuit circuit() { + return this.innerModel().circuit(); + } + + public Endpoints endpoints() { + return this.innerModel().endpoints(); + } + + public String networkBlock() { + return this.innerModel().networkBlock(); + } + + public String managementNetwork() { + return this.innerModel().managementNetwork(); + } + + public String provisioningNetwork() { + return this.innerModel().provisioningNetwork(); + } + + public String vmotionNetwork() { + return this.innerModel().vmotionNetwork(); + } + + public String vcenterPassword() { + return this.innerModel().vcenterPassword(); + } + + public String nsxtPassword() { + return this.innerModel().nsxtPassword(); + } + + public String vcenterCertificateThumbprint() { + return this.innerModel().vcenterCertificateThumbprint(); + } + + public String nsxtCertificateThumbprint() { + return this.innerModel().nsxtCertificateThumbprint(); + } + + public List<String> externalCloudLinks() { + List<String> inner = this.innerModel().externalCloudLinks(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Circuit secondaryCircuit() { + return this.innerModel().secondaryCircuit(); + } + + public NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised() { + return this.innerModel().nsxPublicIpQuotaRaised(); + } + + public String virtualNetworkId() { + return this.innerModel().virtualNetworkId(); + } + + public DnsZoneType dnsZoneType() { + return this.innerModel().dnsZoneType(); + } + + public VcfLicense vcfLicense() { + VcfLicenseInner inner = this.innerModel().vcfLicense(); + if (inner != null) { + return new VcfLicenseImpl(inner, this.manager()); + } else { + return null; + } + } + + public PrivateCloudPropertiesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java index afaa7b4ed336..888768df9d13 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java @@ -32,11 +32,13 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.PrivateCloudsClient; import com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; +import com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner; import com.azure.resourcemanager.avs.implementation.models.PrivateCloudList; import com.azure.resourcemanager.avs.models.PrivateCloudUpdate; import java.nio.ByteBuffer; @@ -243,6 +245,26 @@ Response<AdminCredentialsInner> listAdminCredentialsSync(@HostParam("endpoint") @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/getVcfLicense") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<VcfLicenseInner>> getVcfLicense(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/getVcfLicense") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<VcfLicenseInner> getVcfLicenseSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -286,6 +308,18 @@ Response<PrivateCloudList> listInSubscriptionNextSync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<PrivateCloudInner>> 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(), @@ -321,6 +355,20 @@ private PagedFlux<PrivateCloudInner> listByResourceGroupAsync(String resourceGro */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<PrivateCloudInner> listByResourceGroupSinglePage(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } final String accept = "application/json"; Response<PrivateCloudList> res = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); @@ -340,6 +388,20 @@ private PagedResponse<PrivateCloudInner> listByResourceGroupSinglePage(String re */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<PrivateCloudInner> listByResourceGroupSinglePage(String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } final String accept = "application/json"; Response<PrivateCloudList> res = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); @@ -388,6 +450,14 @@ public PagedIterable<PrivateCloudInner> listByResourceGroup(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<PrivateCloudInner>> 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(), @@ -419,6 +489,16 @@ private PagedFlux<PrivateCloudInner> listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<PrivateCloudInner> listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } final String accept = "application/json"; Response<PrivateCloudList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); @@ -437,6 +517,16 @@ private PagedResponse<PrivateCloudInner> listSinglePage() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<PrivateCloudInner> listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } final String accept = "application/json"; Response<PrivateCloudList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); @@ -484,6 +574,22 @@ public PagedIterable<PrivateCloudInner> list(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<PrivateCloudInner>> getByResourceGroupWithResponseAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), @@ -521,6 +627,24 @@ private Mono<PrivateCloudInner> getByResourceGroupAsync(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) public Response<PrivateCloudInner> getByResourceGroupWithResponse(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); @@ -555,6 +679,27 @@ public PrivateCloudInner getByResourceGroup(String resourceGroupName, String pri @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (privateCloud == null) { + return Mono.error(new IllegalArgumentException("Parameter privateCloud is required and cannot be null.")); + } else { + privateCloud.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -578,6 +723,30 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (privateCloud == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloud is required and cannot be null.")); + } else { + privateCloud.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -600,6 +769,30 @@ private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (privateCloud == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloud is required and cannot be null.")); + } else { + privateCloud.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -734,6 +927,28 @@ public PrivateCloudInner createOrUpdate(String resourceGroupName, String private @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (privateCloudUpdate == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudUpdate is required and cannot be null.")); + } else { + privateCloudUpdate.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -757,6 +972,30 @@ private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updateWithResponse(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (privateCloudUpdate == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudUpdate is required and cannot be null.")); + } else { + privateCloudUpdate.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -779,6 +1018,30 @@ private Response<BinaryData> updateWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updateWithResponse(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (privateCloudUpdate == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudUpdate is required and cannot be null.")); + } else { + privateCloudUpdate.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -912,6 +1175,22 @@ public PrivateCloudInner update(String resourceGroupName, String privateCloudNam @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, context)) @@ -930,6 +1209,24 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, Context.NONE); } @@ -948,6 +1245,24 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, context); } @@ -1061,6 +1376,22 @@ public void delete(String resourceGroupName, String privateCloudName, Context co @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> rotateVcenterPasswordWithResponseAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return FluxUtil .withContext( context -> service.rotateVcenterPassword(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1080,6 +1411,24 @@ private Mono<Response<Flux<ByteBuffer>>> rotateVcenterPasswordWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> rotateVcenterPasswordWithResponse(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.rotateVcenterPasswordSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, Context.NONE); } @@ -1098,6 +1447,24 @@ private Response<BinaryData> rotateVcenterPasswordWithResponse(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> rotateVcenterPasswordWithResponse(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.rotateVcenterPasswordSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, context); } @@ -1214,6 +1581,22 @@ public void rotateVcenterPassword(String resourceGroupName, String privateCloudN @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> rotateNsxtPasswordWithResponseAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.rotateNsxtPassword(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, context)) @@ -1232,6 +1615,24 @@ private Mono<Response<Flux<ByteBuffer>>> rotateNsxtPasswordWithResponseAsync(Str */ @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> rotateNsxtPasswordWithResponse(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.rotateNsxtPasswordSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, Context.NONE); } @@ -1250,6 +1651,24 @@ private Response<BinaryData> rotateNsxtPasswordWithResponse(String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> rotateNsxtPasswordWithResponse(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.rotateNsxtPasswordSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, context); } @@ -1367,6 +1786,22 @@ public void rotateNsxtPassword(String resourceGroupName, String privateCloudName @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<AdminCredentialsInner>> listAdminCredentialsWithResponseAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAdminCredentials(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1404,6 +1839,24 @@ private Mono<AdminCredentialsInner> listAdminCredentialsAsync(String resourceGro @ServiceMethod(returns = ReturnType.SINGLE) public Response<AdminCredentialsInner> listAdminCredentialsWithResponse(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return service.listAdminCredentialsSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); @@ -1424,6 +1877,110 @@ public AdminCredentialsInner listAdminCredentials(String resourceGroupName, Stri return listAdminCredentialsWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); } + /** + * Get the license for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the license for the private cloud along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<VcfLicenseInner>> getVcfLicenseWithResponseAsync(String resourceGroupName, + String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getVcfLicense(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the license for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the license for the private cloud on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<VcfLicenseInner> getVcfLicenseAsync(String resourceGroupName, String privateCloudName) { + return getVcfLicenseWithResponseAsync(resourceGroupName, privateCloudName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the license for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the license for the private cloud along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response<VcfLicenseInner> getVcfLicenseWithResponse(String resourceGroupName, String privateCloudName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getVcfLicenseSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); + } + + /** + * Get the license for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the license for the private cloud. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VcfLicenseInner getVcfLicense(String resourceGroupName, String privateCloudName) { + return getVcfLicenseWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); + } + /** * Get the next page of items. * @@ -1436,6 +1993,13 @@ public AdminCredentialsInner listAdminCredentials(String resourceGroupName, Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<PrivateCloudInner>> 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)) .<PagedResponse<PrivateCloudInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -1454,6 +2018,15 @@ private Mono<PagedResponse<PrivateCloudInner>> listNextSinglePageAsync(String ne */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<PrivateCloudInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<PrivateCloudList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1473,6 +2046,15 @@ private PagedResponse<PrivateCloudInner> listNextSinglePage(String nextLink) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<PrivateCloudInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<PrivateCloudList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -1491,6 +2073,13 @@ private PagedResponse<PrivateCloudInner> listNextSinglePage(String nextLink, Con */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<PrivateCloudInner>> listInSubscriptionNextSinglePageAsync(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( @@ -1511,6 +2100,15 @@ private Mono<PagedResponse<PrivateCloudInner>> listInSubscriptionNextSinglePageA */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<PrivateCloudInner> listInSubscriptionNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<PrivateCloudList> res = service.listInSubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1530,10 +2128,21 @@ private PagedResponse<PrivateCloudInner> listInSubscriptionNextSinglePage(String */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<PrivateCloudInner> listInSubscriptionNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<PrivateCloudList> res = service.listInSubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateCloudsClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsImpl.java index b06033b8fb3b..ac55af5aed3f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsImpl.java @@ -12,9 +12,11 @@ import com.azure.resourcemanager.avs.fluent.PrivateCloudsClient; import com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; +import com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner; import com.azure.resourcemanager.avs.models.AdminCredentials; import com.azure.resourcemanager.avs.models.PrivateCloud; import com.azure.resourcemanager.avs.models.PrivateClouds; +import com.azure.resourcemanager.avs.models.VcfLicense; public final class PrivateCloudsImpl implements PrivateClouds { private static final ClientLogger LOGGER = new ClientLogger(PrivateCloudsImpl.class); @@ -114,6 +116,27 @@ public AdminCredentials listAdminCredentials(String resourceGroupName, String pr } } + public Response<VcfLicense> getVcfLicenseWithResponse(String resourceGroupName, String privateCloudName, + Context context) { + Response<VcfLicenseInner> inner + = this.serviceClient().getVcfLicenseWithResponse(resourceGroupName, privateCloudName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VcfLicenseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public VcfLicense getVcfLicense(String resourceGroupName, String privateCloudName) { + VcfLicenseInner inner = this.serviceClient().getVcfLicense(resourceGroupName, privateCloudName); + if (inner != null) { + return new VcfLicenseImpl(inner, this.manager()); + } else { + return null; + } + } + public PrivateCloud getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworksClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworksClientImpl.java index 3531d1e85933..900748760d18 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworksClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworksClientImpl.java @@ -25,6 +25,7 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.ProvisionedNetworksClient; import com.azure.resourcemanager.avs.fluent.models.ProvisionedNetworkInner; import com.azure.resourcemanager.avs.implementation.models.ProvisionedNetworkListResult; @@ -135,6 +136,22 @@ Response<ProvisionedNetworkListResult> listNextSync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ProvisionedNetworkInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -172,6 +189,24 @@ private PagedFlux<ProvisionedNetworkInner> listAsync(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ProvisionedNetworkInner> listSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<ProvisionedNetworkListResult> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), @@ -194,6 +229,24 @@ private PagedResponse<ProvisionedNetworkInner> listSinglePage(String resourceGro @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ProvisionedNetworkInner> listSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<ProvisionedNetworkListResult> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), @@ -250,6 +303,26 @@ public PagedIterable<ProvisionedNetworkInner> list(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<ProvisionedNetworkInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName, String provisionedNetworkName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (provisionedNetworkName == null) { + return Mono.error( + new IllegalArgumentException("Parameter provisionedNetworkName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -291,6 +364,28 @@ private Mono<ProvisionedNetworkInner> getAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public Response<ProvisionedNetworkInner> getWithResponse(String resourceGroupName, String privateCloudName, String provisionedNetworkName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (provisionedNetworkName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter provisionedNetworkName is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, provisionedNetworkName, accept, context); @@ -325,6 +420,13 @@ public ProvisionedNetworkInner get(String resourceGroupName, String privateCloud */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ProvisionedNetworkInner>> 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)) .<PagedResponse<ProvisionedNetworkInner>>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -343,6 +445,15 @@ private Mono<PagedResponse<ProvisionedNetworkInner>> listNextSinglePageAsync(Str */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ProvisionedNetworkInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<ProvisionedNetworkListResult> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -362,10 +473,21 @@ private PagedResponse<ProvisionedNetworkInner> listNextSinglePage(String nextLin */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ProvisionedNetworkInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<ProvisionedNetworkListResult> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(ProvisionedNetworksClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePoliciesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePoliciesClientImpl.java index 6eb23047b9b7..99b333ed7943 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePoliciesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePoliciesClientImpl.java @@ -30,6 +30,7 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.PureStoragePoliciesClient; @@ -186,6 +187,22 @@ Response<PureStoragePolicyListResult> listNextSync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<PureStoragePolicyInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -223,6 +240,24 @@ private PagedFlux<PureStoragePolicyInner> listAsync(String resourceGroupName, St */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<PureStoragePolicyInner> listSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<PureStoragePolicyListResult> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), @@ -245,6 +280,24 @@ private PagedResponse<PureStoragePolicyInner> listSinglePage(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<PureStoragePolicyInner> listSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<PureStoragePolicyListResult> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), @@ -301,6 +354,26 @@ public PagedIterable<PureStoragePolicyInner> list(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<PureStoragePolicyInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName, String storagePolicyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (storagePolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter storagePolicyName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, storagePolicyName, accept, context)) @@ -340,6 +413,28 @@ private Mono<PureStoragePolicyInner> getAsync(String resourceGroupName, String p @ServiceMethod(returns = ReturnType.SINGLE) public Response<PureStoragePolicyInner> getWithResponse(String resourceGroupName, String privateCloudName, String storagePolicyName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (storagePolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter storagePolicyName is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, storagePolicyName, accept, context); @@ -377,6 +472,31 @@ public PureStoragePolicyInner get(String resourceGroupName, String privateCloudN @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String privateCloudName, String storagePolicyName, PureStoragePolicyInner 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (storagePolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter storagePolicyName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -401,6 +521,34 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String storagePolicyName, PureStoragePolicyInner resource) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (storagePolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter storagePolicyName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -424,6 +572,34 @@ private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String storagePolicyName, PureStoragePolicyInner resource, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (storagePolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter storagePolicyName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -572,6 +748,26 @@ public PureStoragePolicyInner createOrUpdate(String resourceGroupName, String pr @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, String storagePolicyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (storagePolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter storagePolicyName is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, storagePolicyName, context)) @@ -592,6 +788,28 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String storagePolicyName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (storagePolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter storagePolicyName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, storagePolicyName, Context.NONE); } @@ -611,6 +829,28 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String storagePolicyName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (storagePolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter storagePolicyName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, storagePolicyName, context); } @@ -733,6 +973,13 @@ public void delete(String resourceGroupName, String privateCloudName, String sto */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<PureStoragePolicyInner>> 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)) .<PagedResponse<PureStoragePolicyInner>>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -751,6 +998,15 @@ private Mono<PagedResponse<PureStoragePolicyInner>> listNextSinglePageAsync(Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<PureStoragePolicyInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<PureStoragePolicyListResult> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -770,10 +1026,21 @@ private PagedResponse<PureStoragePolicyInner> listNextSinglePage(String nextLink */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<PureStoragePolicyInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<PureStoragePolicyListResult> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(PureStoragePoliciesClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java index ebbe53bbfe61..af0b498e1866 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java @@ -25,6 +25,7 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.ScriptCmdletsClient; import com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner; import com.azure.resourcemanager.avs.implementation.models.ScriptCmdletsList; @@ -138,6 +139,26 @@ Response<ScriptCmdletsList> listNextSync(@PathParam(value = "nextLink", encoded @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ScriptCmdletInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName, String scriptPackageName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (scriptPackageName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptPackageName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptPackageName, accept, context)) @@ -178,6 +199,28 @@ private PagedFlux<ScriptCmdletInner> listAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ScriptCmdletInner> listSinglePage(String resourceGroupName, String privateCloudName, String scriptPackageName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (scriptPackageName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scriptPackageName is required and cannot be null.")); + } final String accept = "application/json"; Response<ScriptCmdletsList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), @@ -201,6 +244,28 @@ private PagedResponse<ScriptCmdletInner> listSinglePage(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ScriptCmdletInner> listSinglePage(String resourceGroupName, String privateCloudName, String scriptPackageName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (scriptPackageName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scriptPackageName is required and cannot be null.")); + } final String accept = "application/json"; Response<ScriptCmdletsList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptPackageName, accept, context); @@ -261,6 +326,30 @@ public PagedIterable<ScriptCmdletInner> list(String resourceGroupName, String pr @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<ScriptCmdletInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName, String scriptPackageName, String scriptCmdletName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (scriptPackageName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptPackageName is required and cannot be null.")); + } + if (scriptCmdletName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptCmdletName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -304,6 +393,32 @@ private Mono<ScriptCmdletInner> getAsync(String resourceGroupName, String privat @ServiceMethod(returns = ReturnType.SINGLE) public Response<ScriptCmdletInner> getWithResponse(String resourceGroupName, String privateCloudName, String scriptPackageName, String scriptCmdletName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (scriptPackageName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scriptPackageName is required and cannot be null.")); + } + if (scriptCmdletName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scriptCmdletName is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptPackageName, scriptCmdletName, accept, context); @@ -340,6 +455,13 @@ public ScriptCmdletInner get(String resourceGroupName, String privateCloudName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ScriptCmdletInner>> 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)) .<PagedResponse<ScriptCmdletInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -358,6 +480,15 @@ private Mono<PagedResponse<ScriptCmdletInner>> listNextSinglePageAsync(String ne */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ScriptCmdletInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<ScriptCmdletsList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -377,9 +508,20 @@ private PagedResponse<ScriptCmdletInner> listNextSinglePage(String nextLink) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ScriptCmdletInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<ScriptCmdletsList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptCmdletsClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java index 96126707e333..53339ae896ed 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java @@ -31,6 +31,7 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient; @@ -209,6 +210,22 @@ Response<ScriptExecutionsList> listNextSync(@PathParam(value = "nextLink", encod @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ScriptExecutionInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -246,6 +263,24 @@ private PagedFlux<ScriptExecutionInner> listAsync(String resourceGroupName, Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ScriptExecutionInner> listSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<ScriptExecutionsList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, Context.NONE); @@ -267,6 +302,24 @@ private PagedResponse<ScriptExecutionInner> listSinglePage(String resourceGroupN @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ScriptExecutionInner> listSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<ScriptExecutionsList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); @@ -322,6 +375,26 @@ public PagedIterable<ScriptExecutionInner> list(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<ScriptExecutionInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName, String scriptExecutionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (scriptExecutionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, accept, context)) @@ -361,6 +434,28 @@ private Mono<ScriptExecutionInner> getAsync(String resourceGroupName, String pri @ServiceMethod(returns = ReturnType.SINGLE) public Response<ScriptExecutionInner> getWithResponse(String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (scriptExecutionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, accept, context); @@ -398,6 +493,32 @@ public ScriptExecutionInner get(String resourceGroupName, String privateCloudNam @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (scriptExecutionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); + } + if (scriptExecution == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptExecution is required and cannot be null.")); + } else { + scriptExecution.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -422,6 +543,34 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (scriptExecutionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); + } + if (scriptExecution == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scriptExecution is required and cannot be null.")); + } else { + scriptExecution.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -445,6 +594,34 @@ private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (scriptExecutionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); + } + if (scriptExecution == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scriptExecution is required and cannot be null.")); + } else { + scriptExecution.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -592,6 +769,26 @@ public ScriptExecutionInner createOrUpdate(String resourceGroupName, String priv @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, String scriptExecutionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (scriptExecutionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, context)) @@ -612,6 +809,28 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String scriptExecutionName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (scriptExecutionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, Context.NONE); } @@ -631,6 +850,28 @@ private Response<BinaryData> deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteWithResponse(String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (scriptExecutionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); + } return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, context); } @@ -758,6 +999,26 @@ public void delete(String resourceGroupName, String privateCloudName, String scr @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<ScriptExecutionInner>> getExecutionLogsWithResponseAsync(String resourceGroupName, String privateCloudName, String scriptExecutionName, List<ScriptOutputStreamType> scriptOutputStreamType) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (scriptExecutionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getExecutionLogs(this.client.getEndpoint(), this.client.getApiVersion(), @@ -803,6 +1064,28 @@ private Mono<ScriptExecutionInner> getExecutionLogsAsync(String resourceGroupNam public Response<ScriptExecutionInner> getExecutionLogsWithResponse(String resourceGroupName, String privateCloudName, String scriptExecutionName, List<ScriptOutputStreamType> scriptOutputStreamType, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (scriptExecutionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); + } final String accept = "application/json"; return service.getExecutionLogsSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, accept, @@ -840,6 +1123,13 @@ public ScriptExecutionInner getExecutionLogs(String resourceGroupName, String pr */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ScriptExecutionInner>> 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)) .<PagedResponse<ScriptExecutionInner>>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -858,6 +1148,15 @@ private Mono<PagedResponse<ScriptExecutionInner>> listNextSinglePageAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ScriptExecutionInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<ScriptExecutionsList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -877,9 +1176,20 @@ private PagedResponse<ScriptExecutionInner> listNextSinglePage(String nextLink) */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ScriptExecutionInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<ScriptExecutionsList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionsClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java index b33281f0304d..616e406ca7f4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java @@ -25,6 +25,7 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.ScriptPackagesClient; import com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner; import com.azure.resourcemanager.avs.implementation.models.ScriptPackagesList; @@ -133,6 +134,22 @@ Response<ScriptPackagesList> listNextSync(@PathParam(value = "nextLink", encoded @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ScriptPackageInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -170,6 +187,24 @@ private PagedFlux<ScriptPackageInner> listAsync(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ScriptPackageInner> listSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<ScriptPackagesList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, Context.NONE); @@ -191,6 +226,24 @@ private PagedResponse<ScriptPackageInner> listSinglePage(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ScriptPackageInner> listSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<ScriptPackagesList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); @@ -245,6 +298,26 @@ public PagedIterable<ScriptPackageInner> list(String resourceGroupName, String p @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<ScriptPackageInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName, String scriptPackageName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (scriptPackageName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptPackageName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptPackageName, accept, context)) @@ -284,6 +357,28 @@ private Mono<ScriptPackageInner> getAsync(String resourceGroupName, String priva @ServiceMethod(returns = ReturnType.SINGLE) public Response<ScriptPackageInner> getWithResponse(String resourceGroupName, String privateCloudName, String scriptPackageName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (scriptPackageName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scriptPackageName is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptPackageName, accept, context); @@ -317,6 +412,13 @@ public ScriptPackageInner get(String resourceGroupName, String privateCloudName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ScriptPackageInner>> 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)) .<PagedResponse<ScriptPackageInner>>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -335,6 +437,15 @@ private Mono<PagedResponse<ScriptPackageInner>> listNextSinglePageAsync(String n */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ScriptPackageInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<ScriptPackagesList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -354,9 +465,20 @@ private PagedResponse<ScriptPackageInner> listNextSinglePage(String nextLink) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ScriptPackageInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<ScriptPackagesList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptPackagesClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/SkusClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/SkusClientImpl.java index e37fdda661c6..0246dbb18ea8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/SkusClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/SkusClientImpl.java @@ -25,6 +25,7 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.SkusClient; import com.azure.resourcemanager.avs.fluent.models.ResourceSkuInner; import com.azure.resourcemanager.avs.implementation.models.PagedResourceSku; @@ -101,6 +102,14 @@ Response<PagedResourceSku> listNextSync(@PathParam(value = "nextLink", encoded = */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ResourceSkuInner>> 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(), @@ -131,6 +140,16 @@ private PagedFlux<ResourceSkuInner> listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ResourceSkuInner> listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } final String accept = "application/json"; Response<PagedResourceSku> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); @@ -149,6 +168,16 @@ private PagedResponse<ResourceSkuInner> listSinglePage() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ResourceSkuInner> listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } final String accept = "application/json"; Response<PagedResourceSku> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); @@ -194,6 +223,13 @@ public PagedIterable<ResourceSkuInner> list(Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ResourceSkuInner>> 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)) .<PagedResponse<ResourceSkuInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -212,6 +248,15 @@ private Mono<PagedResponse<ResourceSkuInner>> listNextSinglePageAsync(String nex */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ResourceSkuInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<PagedResourceSku> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -231,9 +276,20 @@ private PagedResponse<ResourceSkuInner> listNextSinglePage(String nextLink) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<ResourceSkuInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<PagedResourceSku> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(SkusClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VcfLicenseImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VcfLicenseImpl.java new file mode 100644 index 000000000000..afc5b63d63b1 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VcfLicenseImpl.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner; +import com.azure.resourcemanager.avs.models.LicenseProvisioningState; +import com.azure.resourcemanager.avs.models.VcfLicense; +import com.azure.resourcemanager.avs.models.VcfLicenseKind; + +public final class VcfLicenseImpl implements VcfLicense { + private VcfLicenseInner innerObject; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + VcfLicenseImpl(VcfLicenseInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public VcfLicenseKind kind() { + return this.innerModel().kind(); + } + + public LicenseProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public VcfLicenseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesClientImpl.java index 0733208c4972..89babbfa502f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesClientImpl.java @@ -29,6 +29,7 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.VirtualMachinesClient; @@ -165,6 +166,25 @@ Response<VirtualMachinesList> listNextSync(@PathParam(value = "nextLink", encode @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<VirtualMachineInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName, String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -206,6 +226,28 @@ private PagedFlux<VirtualMachineInner> listAsync(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<VirtualMachineInner> listSinglePage(String resourceGroupName, String privateCloudName, String clusterName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } final String accept = "application/json"; Response<VirtualMachinesList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, Context.NONE); @@ -228,6 +270,28 @@ private PagedResponse<VirtualMachineInner> listSinglePage(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<VirtualMachineInner> listSinglePage(String resourceGroupName, String privateCloudName, String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } final String accept = "application/json"; Response<VirtualMachinesList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, context); @@ -287,6 +351,29 @@ public PagedIterable<VirtualMachineInner> list(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<VirtualMachineInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (virtualMachineId == null) { + return Mono + .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -330,6 +417,32 @@ private Mono<VirtualMachineInner> getAsync(String resourceGroupName, String priv @ServiceMethod(returns = ReturnType.SINGLE) public Response<VirtualMachineInner> getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (virtualMachineId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, virtualMachineId, accept, context); @@ -371,6 +484,35 @@ public VirtualMachineInner get(String resourceGroupName, String privateCloudName private Mono<Response<Flux<ByteBuffer>>> restrictMovementWithResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId, VirtualMachineRestrictMovement restrictMovement) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (virtualMachineId == null) { + return Mono + .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); + } + if (restrictMovement == null) { + return Mono + .error(new IllegalArgumentException("Parameter restrictMovement is required and cannot be null.")); + } else { + restrictMovement.validate(); + } final String contentType = "application/json"; return FluxUtil .withContext(context -> service.restrictMovement(this.client.getEndpoint(), this.client.getApiVersion(), @@ -395,6 +537,38 @@ private Mono<Response<Flux<ByteBuffer>>> restrictMovementWithResponseAsync(Strin @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> restrictMovementWithResponse(String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId, VirtualMachineRestrictMovement restrictMovement) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (virtualMachineId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); + } + if (restrictMovement == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter restrictMovement is required and cannot be null.")); + } else { + restrictMovement.validate(); + } final String contentType = "application/json"; return service.restrictMovementSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, virtualMachineId, @@ -418,6 +592,38 @@ private Response<BinaryData> restrictMovementWithResponse(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> restrictMovementWithResponse(String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId, VirtualMachineRestrictMovement restrictMovement, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (clusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (virtualMachineId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); + } + if (restrictMovement == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter restrictMovement is required and cannot be null.")); + } else { + restrictMovement.validate(); + } final String contentType = "application/json"; return service.restrictMovementSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, virtualMachineId, @@ -561,6 +767,13 @@ public void restrictMovement(String resourceGroupName, String privateCloudName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<VirtualMachineInner>> 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)) .<PagedResponse<VirtualMachineInner>>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -579,6 +792,15 @@ private Mono<PagedResponse<VirtualMachineInner>> listNextSinglePageAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<VirtualMachineInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<VirtualMachinesList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -598,9 +820,20 @@ private PagedResponse<VirtualMachineInner> listNextSinglePage(String nextLink) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<VirtualMachineInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<VirtualMachinesList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(VirtualMachinesClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java index 574e18c47046..b8d335041b31 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java @@ -31,6 +31,7 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient; @@ -1066,6 +1067,22 @@ Response<WorkloadNetworkVMGroupsList> listVMGroupsNextSync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<WorkloadNetworkInner>> getWithResponseAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1103,6 +1120,24 @@ private Mono<WorkloadNetworkInner> getAsync(String resourceGroupName, String pri @ServiceMethod(returns = ReturnType.SINGLE) public Response<WorkloadNetworkInner> getWithResponse(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); @@ -1137,6 +1172,22 @@ public WorkloadNetworkInner get(String resourceGroupName, String privateCloudNam @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkInner>> listSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1174,6 +1225,24 @@ private PagedFlux<WorkloadNetworkInner> listAsync(String resourceGroupName, Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkInner> listSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, Context.NONE); @@ -1195,6 +1264,24 @@ private PagedResponse<WorkloadNetworkInner> listSinglePage(String resourceGroupN @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkInner> listSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkList> res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); @@ -1250,6 +1337,22 @@ public PagedIterable<WorkloadNetworkInner> list(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkDhcpInner>> listDhcpSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listDhcp(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1288,6 +1391,24 @@ private PagedFlux<WorkloadNetworkDhcpInner> listDhcpAsync(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkDhcpInner> listDhcpSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkDhcpList> res = service.listDhcpSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1310,6 +1431,24 @@ private PagedResponse<WorkloadNetworkDhcpInner> listDhcpSinglePage(String resour @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkDhcpInner> listDhcpSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkDhcpList> res = service.listDhcpSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1366,6 +1505,25 @@ public PagedIterable<WorkloadNetworkDhcpInner> listDhcp(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<WorkloadNetworkDhcpInner>> getDhcpWithResponseAsync(String resourceGroupName, String dhcpId, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getDhcp(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1406,6 +1564,28 @@ private Mono<WorkloadNetworkDhcpInner> getDhcpAsync(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) public Response<WorkloadNetworkDhcpInner> getDhcpWithResponse(String resourceGroupName, String dhcpId, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dhcpId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return service.getDhcpSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, dhcpId, privateCloudName, accept, context); @@ -1442,6 +1622,31 @@ public WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createDhcpWithResponseAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (workloadNetworkDhcp == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + } else { + workloadNetworkDhcp.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -1466,6 +1671,34 @@ private Mono<Response<Flux<ByteBuffer>>> createDhcpWithResponseAsync(String reso @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createDhcpWithResponse(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dhcpId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (workloadNetworkDhcp == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + } else { + workloadNetworkDhcp.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createDhcpSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1489,6 +1722,34 @@ private Response<BinaryData> createDhcpWithResponse(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createDhcpWithResponse(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dhcpId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (workloadNetworkDhcp == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + } else { + workloadNetworkDhcp.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createDhcpSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1636,6 +1897,31 @@ public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String priv @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> updateDhcpWithResponseAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (workloadNetworkDhcp == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + } else { + workloadNetworkDhcp.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -1660,6 +1946,34 @@ private Mono<Response<Flux<ByteBuffer>>> updateDhcpWithResponseAsync(String reso @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updateDhcpWithResponse(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dhcpId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (workloadNetworkDhcp == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + } else { + workloadNetworkDhcp.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updateDhcpSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1683,6 +1997,34 @@ private Response<BinaryData> updateDhcpWithResponse(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updateDhcpWithResponse(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dhcpId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (workloadNetworkDhcp == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + } else { + workloadNetworkDhcp.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updateDhcpSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1829,6 +2171,25 @@ public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String priv @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteDhcpWithResponseAsync(String resourceGroupName, String privateCloudName, String dhcpId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.deleteDhcp(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, context)) @@ -1849,6 +2210,28 @@ private Mono<Response<Flux<ByteBuffer>>> deleteDhcpWithResponseAsync(String reso @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteDhcpWithResponse(String resourceGroupName, String privateCloudName, String dhcpId) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dhcpId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } return service.deleteDhcpSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, Context.NONE); } @@ -1868,6 +2251,28 @@ private Response<BinaryData> deleteDhcpWithResponse(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteDhcpWithResponse(String resourceGroupName, String privateCloudName, String dhcpId, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dhcpId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } return service.deleteDhcpSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, context); } @@ -1991,6 +2396,22 @@ public void deleteDhcp(String resourceGroupName, String privateCloudName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkDnsServiceInner>> listDnsServicesSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listDnsServices(this.client.getEndpoint(), this.client.getApiVersion(), @@ -2030,6 +2451,24 @@ private PagedFlux<WorkloadNetworkDnsServiceInner> listDnsServicesAsync(String re @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkDnsServiceInner> listDnsServicesSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkDnsServicesList> res = service.listDnsServicesSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -2052,6 +2491,24 @@ private PagedResponse<WorkloadNetworkDnsServiceInner> listDnsServicesSinglePage( @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkDnsServiceInner> listDnsServicesSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkDnsServicesList> res = service.listDnsServicesSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -2111,6 +2568,25 @@ public PagedIterable<WorkloadNetworkDnsServiceInner> listDnsServices(String reso @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<WorkloadNetworkDnsServiceInner>> getDnsServiceWithResponseAsync(String resourceGroupName, String privateCloudName, String dnsServiceId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getDnsService(this.client.getEndpoint(), this.client.getApiVersion(), @@ -2151,6 +2627,28 @@ private Mono<WorkloadNetworkDnsServiceInner> getDnsServiceAsync(String resourceG @ServiceMethod(returns = ReturnType.SINGLE) public Response<WorkloadNetworkDnsServiceInner> getDnsServiceWithResponse(String resourceGroupName, String privateCloudName, String dnsServiceId, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsServiceId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } final String accept = "application/json"; return service.getDnsServiceSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, context); @@ -2188,6 +2686,31 @@ public WorkloadNetworkDnsServiceInner getDnsService(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createDnsServiceWithResponseAsync(String resourceGroupName, String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (workloadNetworkDnsService == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); + } else { + workloadNetworkDnsService.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -2212,6 +2735,35 @@ private Mono<Response<Flux<ByteBuffer>>> createDnsServiceWithResponseAsync(Strin @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createDnsServiceWithResponse(String resourceGroupName, String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsServiceId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (workloadNetworkDnsService == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter workloadNetworkDnsService is required and cannot be null.")); + } else { + workloadNetworkDnsService.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createDnsServiceSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -2235,6 +2787,35 @@ private Response<BinaryData> createDnsServiceWithResponse(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createDnsServiceWithResponse(String resourceGroupName, String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsServiceId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (workloadNetworkDnsService == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter workloadNetworkDnsService is required and cannot be null.")); + } else { + workloadNetworkDnsService.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createDnsServiceSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -2384,6 +2965,31 @@ public WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> updateDnsServiceWithResponseAsync(String resourceGroupName, String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (workloadNetworkDnsService == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); + } else { + workloadNetworkDnsService.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -2408,6 +3014,35 @@ private Mono<Response<Flux<ByteBuffer>>> updateDnsServiceWithResponseAsync(Strin @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updateDnsServiceWithResponse(String resourceGroupName, String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsServiceId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (workloadNetworkDnsService == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter workloadNetworkDnsService is required and cannot be null.")); + } else { + workloadNetworkDnsService.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updateDnsServiceSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -2431,6 +3066,35 @@ private Response<BinaryData> updateDnsServiceWithResponse(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updateDnsServiceWithResponse(String resourceGroupName, String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsServiceId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (workloadNetworkDnsService == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter workloadNetworkDnsService is required and cannot be null.")); + } else { + workloadNetworkDnsService.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updateDnsServiceSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -2579,6 +3243,25 @@ public WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteDnsServiceWithResponseAsync(String resourceGroupName, String dnsServiceId, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.deleteDnsService(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, dnsServiceId, privateCloudName, context)) @@ -2599,6 +3282,28 @@ private Mono<Response<Flux<ByteBuffer>>> deleteDnsServiceWithResponseAsync(Strin @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteDnsServiceWithResponse(String resourceGroupName, String dnsServiceId, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dnsServiceId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.deleteDnsServiceSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, dnsServiceId, privateCloudName, Context.NONE); } @@ -2618,6 +3323,28 @@ private Response<BinaryData> deleteDnsServiceWithResponse(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteDnsServiceWithResponse(String resourceGroupName, String dnsServiceId, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dnsServiceId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.deleteDnsServiceSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, dnsServiceId, privateCloudName, context); } @@ -2743,6 +3470,22 @@ public void deleteDnsService(String resourceGroupName, String dnsServiceId, Stri @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkDnsZoneInner>> listDnsZonesSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listDnsZones(this.client.getEndpoint(), this.client.getApiVersion(), @@ -2782,6 +3525,24 @@ private PagedFlux<WorkloadNetworkDnsZoneInner> listDnsZonesAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkDnsZoneInner> listDnsZonesSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkDnsZonesList> res = service.listDnsZonesSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -2804,6 +3565,24 @@ private PagedResponse<WorkloadNetworkDnsZoneInner> listDnsZonesSinglePage(String @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkDnsZoneInner> listDnsZonesSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkDnsZonesList> res = service.listDnsZonesSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -2860,6 +3639,25 @@ public PagedIterable<WorkloadNetworkDnsZoneInner> listDnsZones(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<WorkloadNetworkDnsZoneInner>> getDnsZoneWithResponseAsync(String resourceGroupName, String privateCloudName, String dnsZoneId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), @@ -2900,6 +3698,28 @@ private Mono<WorkloadNetworkDnsZoneInner> getDnsZoneAsync(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) public Response<WorkloadNetworkDnsZoneInner> getDnsZoneWithResponse(String resourceGroupName, String privateCloudName, String dnsZoneId, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsZoneId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } final String accept = "application/json"; return service.getDnsZoneSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, context); @@ -2936,6 +3756,31 @@ public WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String p @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createDnsZoneWithResponseAsync(String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (workloadNetworkDnsZone == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); + } else { + workloadNetworkDnsZone.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -2960,6 +3805,34 @@ private Mono<Response<Flux<ByteBuffer>>> createDnsZoneWithResponseAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createDnsZoneWithResponse(String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsZoneId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (workloadNetworkDnsZone == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); + } else { + workloadNetworkDnsZone.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createDnsZoneSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -2983,6 +3856,34 @@ private Response<BinaryData> createDnsZoneWithResponse(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createDnsZoneWithResponse(String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsZoneId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (workloadNetworkDnsZone == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); + } else { + workloadNetworkDnsZone.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createDnsZoneSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -3131,6 +4032,31 @@ public WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> updateDnsZoneWithResponseAsync(String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (workloadNetworkDnsZone == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); + } else { + workloadNetworkDnsZone.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -3155,6 +4081,34 @@ private Mono<Response<Flux<ByteBuffer>>> updateDnsZoneWithResponseAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updateDnsZoneWithResponse(String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsZoneId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (workloadNetworkDnsZone == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); + } else { + workloadNetworkDnsZone.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updateDnsZoneSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -3178,6 +4132,34 @@ private Response<BinaryData> updateDnsZoneWithResponse(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updateDnsZoneWithResponse(String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsZoneId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (workloadNetworkDnsZone == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); + } else { + workloadNetworkDnsZone.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updateDnsZoneSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -3325,6 +4307,25 @@ public WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteDnsZoneWithResponseAsync(String resourceGroupName, String dnsZoneId, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.deleteDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, dnsZoneId, privateCloudName, context)) @@ -3345,6 +4346,28 @@ private Mono<Response<Flux<ByteBuffer>>> deleteDnsZoneWithResponseAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteDnsZoneWithResponse(String resourceGroupName, String dnsZoneId, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dnsZoneId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.deleteDnsZoneSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, dnsZoneId, privateCloudName, Context.NONE); } @@ -3364,6 +4387,28 @@ private Response<BinaryData> deleteDnsZoneWithResponse(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteDnsZoneWithResponse(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dnsZoneId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.deleteDnsZoneSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, dnsZoneId, privateCloudName, context); } @@ -3488,6 +4533,22 @@ public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String pri @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkGatewayInner>> listGatewaysSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listGateways(this.client.getEndpoint(), this.client.getApiVersion(), @@ -3527,6 +4588,24 @@ private PagedFlux<WorkloadNetworkGatewayInner> listGatewaysAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkGatewayInner> listGatewaysSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkGatewayList> res = service.listGatewaysSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -3549,6 +4628,24 @@ private PagedResponse<WorkloadNetworkGatewayInner> listGatewaysSinglePage(String @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkGatewayInner> listGatewaysSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkGatewayList> res = service.listGatewaysSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -3605,6 +4702,25 @@ public PagedIterable<WorkloadNetworkGatewayInner> listGateways(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<WorkloadNetworkGatewayInner>> getGatewayWithResponseAsync(String resourceGroupName, String privateCloudName, String gatewayId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (gatewayId == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getGateway(this.client.getEndpoint(), this.client.getApiVersion(), @@ -3645,6 +4761,28 @@ private Mono<WorkloadNetworkGatewayInner> getGatewayAsync(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) public Response<WorkloadNetworkGatewayInner> getGatewayWithResponse(String resourceGroupName, String privateCloudName, String gatewayId, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (gatewayId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); + } final String accept = "application/json"; return service.getGatewaySync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, gatewayId, accept, context); @@ -3680,6 +4818,22 @@ public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String p @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkPortMirroringInner>> listPortMirroringSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), @@ -3720,6 +4874,24 @@ private PagedFlux<WorkloadNetworkPortMirroringInner> listPortMirroringAsync(Stri @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkPortMirroringInner> listPortMirroringSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkPortMirroringList> res = service.listPortMirroringSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -3742,6 +4914,24 @@ private PagedResponse<WorkloadNetworkPortMirroringInner> listPortMirroringSingle @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkPortMirroringInner> listPortMirroringSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkPortMirroringList> res = service.listPortMirroringSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -3801,6 +4991,26 @@ public PagedIterable<WorkloadNetworkPortMirroringInner> listPortMirroring(String @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<WorkloadNetworkPortMirroringInner>> getPortMirroringWithResponseAsync(String resourceGroupName, String privateCloudName, String portMirroringId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), @@ -3841,6 +5051,28 @@ private Mono<WorkloadNetworkPortMirroringInner> getPortMirroringAsync(String res @ServiceMethod(returns = ReturnType.SINGLE) public Response<WorkloadNetworkPortMirroringInner> getPortMirroringWithResponse(String resourceGroupName, String privateCloudName, String portMirroringId, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (portMirroringId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } final String accept = "application/json"; return service.getPortMirroringSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, context); @@ -3880,6 +5112,32 @@ public WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupNa private Mono<Response<Flux<ByteBuffer>>> createPortMirroringWithResponseAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); + } else { + workloadNetworkPortMirroring.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -3904,6 +5162,35 @@ private Mono<Response<Flux<ByteBuffer>>> createPortMirroringWithResponseAsync(St @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createPortMirroringWithResponse(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (portMirroringId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter workloadNetworkPortMirroring is required and cannot be null.")); + } else { + workloadNetworkPortMirroring.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createPortMirroringSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -3927,6 +5214,35 @@ private Response<BinaryData> createPortMirroringWithResponse(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createPortMirroringWithResponse(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (portMirroringId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter workloadNetworkPortMirroring is required and cannot be null.")); + } else { + workloadNetworkPortMirroring.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createPortMirroringSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -4077,6 +5393,32 @@ public WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGrou private Mono<Response<Flux<ByteBuffer>>> updatePortMirroringWithResponseAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); + } else { + workloadNetworkPortMirroring.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -4101,6 +5443,35 @@ private Mono<Response<Flux<ByteBuffer>>> updatePortMirroringWithResponseAsync(St @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updatePortMirroringWithResponse(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (portMirroringId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter workloadNetworkPortMirroring is required and cannot be null.")); + } else { + workloadNetworkPortMirroring.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updatePortMirroringSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -4124,6 +5495,35 @@ private Response<BinaryData> updatePortMirroringWithResponse(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updatePortMirroringWithResponse(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (portMirroringId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter workloadNetworkPortMirroring is required and cannot be null.")); + } else { + workloadNetworkPortMirroring.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updatePortMirroringSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -4272,6 +5672,26 @@ public WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deletePortMirroringWithResponseAsync(String resourceGroupName, String portMirroringId, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.deletePortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, portMirroringId, privateCloudName, context)) @@ -4292,6 +5712,28 @@ private Mono<Response<Flux<ByteBuffer>>> deletePortMirroringWithResponseAsync(St @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deletePortMirroringWithResponse(String resourceGroupName, String portMirroringId, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (portMirroringId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.deletePortMirroringSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, portMirroringId, privateCloudName, Context.NONE); } @@ -4311,6 +5753,28 @@ private Response<BinaryData> deletePortMirroringWithResponse(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deletePortMirroringWithResponse(String resourceGroupName, String portMirroringId, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (portMirroringId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.deletePortMirroringSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, portMirroringId, privateCloudName, context); } @@ -4438,6 +5902,22 @@ public void deletePortMirroring(String resourceGroupName, String portMirroringId @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkPublicIpInner>> listPublicIPsSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listPublicIPs(this.client.getEndpoint(), this.client.getApiVersion(), @@ -4477,6 +5957,24 @@ private PagedFlux<WorkloadNetworkPublicIpInner> listPublicIPsAsync(String resour @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkPublicIpInner> listPublicIPsSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkPublicIPsList> res = service.listPublicIPsSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -4499,6 +5997,24 @@ private PagedResponse<WorkloadNetworkPublicIpInner> listPublicIPsSinglePage(Stri @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkPublicIpInner> listPublicIPsSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkPublicIPsList> res = service.listPublicIPsSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -4558,6 +6074,25 @@ public PagedIterable<WorkloadNetworkPublicIpInner> listPublicIPs(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<WorkloadNetworkPublicIpInner>> getPublicIpWithResponseAsync(String resourceGroupName, String privateCloudName, String publicIPId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (publicIPId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getPublicIp(this.client.getEndpoint(), this.client.getApiVersion(), @@ -4598,6 +6133,28 @@ private Mono<WorkloadNetworkPublicIpInner> getPublicIpAsync(String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) public Response<WorkloadNetworkPublicIpInner> getPublicIpWithResponse(String resourceGroupName, String privateCloudName, String publicIPId, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (publicIPId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); + } final String accept = "application/json"; return service.getPublicIpSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, publicIPId, accept, context); @@ -4635,6 +6192,31 @@ public WorkloadNetworkPublicIpInner getPublicIp(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createPublicIpWithResponseAsync(String resourceGroupName, String privateCloudName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (publicIPId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); + } + if (workloadNetworkPublicIp == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPublicIp is required and cannot be null.")); + } else { + workloadNetworkPublicIp.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -4659,6 +6241,34 @@ private Mono<Response<Flux<ByteBuffer>>> createPublicIpWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createPublicIpWithResponse(String resourceGroupName, String privateCloudName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (publicIPId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); + } + if (workloadNetworkPublicIp == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkPublicIp is required and cannot be null.")); + } else { + workloadNetworkPublicIp.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createPublicIpSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -4682,6 +6292,34 @@ private Response<BinaryData> createPublicIpWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createPublicIpWithResponse(String resourceGroupName, String privateCloudName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIp, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (publicIPId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); + } + if (workloadNetworkPublicIp == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkPublicIp is required and cannot be null.")); + } else { + workloadNetworkPublicIp.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createPublicIpSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -4829,6 +6467,25 @@ public WorkloadNetworkPublicIpInner createPublicIp(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deletePublicIpWithResponseAsync(String resourceGroupName, String publicIpId, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (publicIpId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.deletePublicIp(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, publicIpId, privateCloudName, context)) @@ -4849,6 +6506,28 @@ private Mono<Response<Flux<ByteBuffer>>> deletePublicIpWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deletePublicIpWithResponse(String resourceGroupName, String publicIpId, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (publicIpId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.deletePublicIpSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, publicIpId, privateCloudName, Context.NONE); } @@ -4868,6 +6547,28 @@ private Response<BinaryData> deletePublicIpWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deletePublicIpWithResponse(String resourceGroupName, String publicIpId, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (publicIpId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.deletePublicIpSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, publicIpId, privateCloudName, context); } @@ -4992,6 +6693,22 @@ public void deletePublicIp(String resourceGroupName, String publicIpId, String p @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkSegmentInner>> listSegmentsSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listSegments(this.client.getEndpoint(), this.client.getApiVersion(), @@ -5031,6 +6748,24 @@ private PagedFlux<WorkloadNetworkSegmentInner> listSegmentsAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkSegmentInner> listSegmentsSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkSegmentsList> res = service.listSegmentsSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -5053,6 +6788,24 @@ private PagedResponse<WorkloadNetworkSegmentInner> listSegmentsSinglePage(String @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkSegmentInner> listSegmentsSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkSegmentsList> res = service.listSegmentsSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -5109,6 +6862,25 @@ public PagedIterable<WorkloadNetworkSegmentInner> listSegments(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<WorkloadNetworkSegmentInner>> getSegmentWithResponseAsync(String resourceGroupName, String privateCloudName, String segmentId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getSegment(this.client.getEndpoint(), this.client.getApiVersion(), @@ -5149,6 +6921,28 @@ private Mono<WorkloadNetworkSegmentInner> getSegmentAsync(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) public Response<WorkloadNetworkSegmentInner> getSegmentWithResponse(String resourceGroupName, String privateCloudName, String segmentId, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } final String accept = "application/json"; return service.getSegmentSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context); @@ -5185,6 +6979,31 @@ public WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String p @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createSegmentsWithResponseAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (workloadNetworkSegment == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + } else { + workloadNetworkSegment.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -5209,6 +7028,34 @@ private Mono<Response<Flux<ByteBuffer>>> createSegmentsWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createSegmentsWithResponse(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (workloadNetworkSegment == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + } else { + workloadNetworkSegment.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createSegmentsSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -5232,6 +7079,34 @@ private Response<BinaryData> createSegmentsWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createSegmentsWithResponse(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (workloadNetworkSegment == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + } else { + workloadNetworkSegment.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createSegmentsSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -5380,6 +7255,31 @@ public WorkloadNetworkSegmentInner createSegments(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> updateSegmentsWithResponseAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (workloadNetworkSegment == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + } else { + workloadNetworkSegment.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -5404,6 +7304,34 @@ private Mono<Response<Flux<ByteBuffer>>> updateSegmentsWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updateSegmentsWithResponse(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (workloadNetworkSegment == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + } else { + workloadNetworkSegment.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updateSegmentsSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -5427,6 +7355,34 @@ private Response<BinaryData> updateSegmentsWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updateSegmentsWithResponse(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (workloadNetworkSegment == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + } else { + workloadNetworkSegment.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updateSegmentsSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -5574,6 +7530,25 @@ public WorkloadNetworkSegmentInner updateSegments(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteSegmentWithResponseAsync(String resourceGroupName, String privateCloudName, String segmentId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.deleteSegment(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, context)) @@ -5594,6 +7569,28 @@ private Mono<Response<Flux<ByteBuffer>>> deleteSegmentWithResponseAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteSegmentWithResponse(String resourceGroupName, String privateCloudName, String segmentId) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } return service.deleteSegmentSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, Context.NONE); } @@ -5613,6 +7610,28 @@ private Response<BinaryData> deleteSegmentWithResponse(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteSegmentWithResponse(String resourceGroupName, String privateCloudName, String segmentId, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } return service.deleteSegmentSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, context); } @@ -5737,6 +7756,22 @@ public void deleteSegment(String resourceGroupName, String privateCloudName, Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkVirtualMachineInner>> listVirtualMachinesSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listVirtualMachines(this.client.getEndpoint(), this.client.getApiVersion(), @@ -5777,6 +7812,24 @@ private PagedFlux<WorkloadNetworkVirtualMachineInner> listVirtualMachinesAsync(S @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkVirtualMachineInner> listVirtualMachinesSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkVirtualMachinesList> res = service.listVirtualMachinesSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -5799,6 +7852,24 @@ private PagedResponse<WorkloadNetworkVirtualMachineInner> listVirtualMachinesSin @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkVirtualMachineInner> listVirtualMachinesSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkVirtualMachinesList> res = service.listVirtualMachinesSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -5858,6 +7929,26 @@ public PagedIterable<WorkloadNetworkVirtualMachineInner> listVirtualMachines(Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<WorkloadNetworkVirtualMachineInner>> getVirtualMachineWithResponseAsync(String resourceGroupName, String privateCloudName, String virtualMachineId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (virtualMachineId == null) { + return Mono + .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getVirtualMachine(this.client.getEndpoint(), this.client.getApiVersion(), @@ -5899,6 +7990,28 @@ private Mono<WorkloadNetworkVirtualMachineInner> getVirtualMachineAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) public Response<WorkloadNetworkVirtualMachineInner> getVirtualMachineWithResponse(String resourceGroupName, String privateCloudName, String virtualMachineId, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (virtualMachineId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); + } final String accept = "application/json"; return service.getVirtualMachineSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, virtualMachineId, accept, context); @@ -5936,6 +8049,22 @@ public WorkloadNetworkVirtualMachineInner getVirtualMachine(String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkVMGroupInner>> listVMGroupsSinglePageAsync(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listVMGroups(this.client.getEndpoint(), this.client.getApiVersion(), @@ -5975,6 +8104,24 @@ private PagedFlux<WorkloadNetworkVMGroupInner> listVMGroupsAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkVMGroupInner> listVMGroupsSinglePage(String resourceGroupName, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkVMGroupsList> res = service.listVMGroupsSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -5997,6 +8144,24 @@ private PagedResponse<WorkloadNetworkVMGroupInner> listVMGroupsSinglePage(String @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkVMGroupInner> listVMGroupsSinglePage(String resourceGroupName, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkVMGroupsList> res = service.listVMGroupsSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -6053,6 +8218,25 @@ public PagedIterable<WorkloadNetworkVMGroupInner> listVMGroups(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<WorkloadNetworkVMGroupInner>> getVMGroupWithResponseAsync(String resourceGroupName, String privateCloudName, String vmGroupId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), @@ -6093,6 +8277,28 @@ private Mono<WorkloadNetworkVMGroupInner> getVMGroupAsync(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) public Response<WorkloadNetworkVMGroupInner> getVMGroupWithResponse(String resourceGroupName, String privateCloudName, String vmGroupId, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (vmGroupId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } final String accept = "application/json"; return service.getVMGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, context); @@ -6129,6 +8335,31 @@ public WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String p @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createVMGroupWithResponseAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + if (workloadNetworkVMGroup == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); + } else { + workloadNetworkVMGroup.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -6153,6 +8384,34 @@ private Mono<Response<Flux<ByteBuffer>>> createVMGroupWithResponseAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createVMGroupWithResponse(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (vmGroupId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + if (workloadNetworkVMGroup == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); + } else { + workloadNetworkVMGroup.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createVMGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -6176,6 +8435,34 @@ private Response<BinaryData> createVMGroupWithResponse(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> createVMGroupWithResponse(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (vmGroupId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + if (workloadNetworkVMGroup == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); + } else { + workloadNetworkVMGroup.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.createVMGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -6324,6 +8611,31 @@ public WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> updateVMGroupWithResponseAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + if (workloadNetworkVMGroup == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); + } else { + workloadNetworkVMGroup.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -6348,6 +8660,34 @@ private Mono<Response<Flux<ByteBuffer>>> updateVMGroupWithResponseAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updateVMGroupWithResponse(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (vmGroupId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + if (workloadNetworkVMGroup == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); + } else { + workloadNetworkVMGroup.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updateVMGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -6371,6 +8711,34 @@ private Response<BinaryData> updateVMGroupWithResponse(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> updateVMGroupWithResponse(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (vmGroupId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + if (workloadNetworkVMGroup == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); + } else { + workloadNetworkVMGroup.validate(); + } final String contentType = "application/json"; final String accept = "application/json"; return service.updateVMGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -6518,6 +8886,25 @@ public WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteVMGroupWithResponseAsync(String resourceGroupName, String vmGroupId, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return FluxUtil .withContext(context -> service.deleteVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, vmGroupId, privateCloudName, context)) @@ -6538,6 +8925,28 @@ private Mono<Response<Flux<ByteBuffer>>> deleteVMGroupWithResponseAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteVMGroupWithResponse(String resourceGroupName, String vmGroupId, String privateCloudName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vmGroupId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.deleteVMGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, vmGroupId, privateCloudName, Context.NONE); } @@ -6557,6 +8966,28 @@ private Response<BinaryData> deleteVMGroupWithResponse(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Response<BinaryData> deleteVMGroupWithResponse(String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vmGroupId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + if (privateCloudName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } return service.deleteVMGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, vmGroupId, privateCloudName, context); } @@ -6679,6 +9110,13 @@ public void deleteVMGroup(String resourceGroupName, String vmGroupId, String pri */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkInner>> 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)) .<PagedResponse<WorkloadNetworkInner>>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -6697,6 +9135,15 @@ private Mono<PagedResponse<WorkloadNetworkInner>> listNextSinglePageAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkInner> listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -6716,6 +9163,15 @@ private PagedResponse<WorkloadNetworkInner> listNextSinglePage(String nextLink) */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkInner> listNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkList> res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -6734,6 +9190,13 @@ private PagedResponse<WorkloadNetworkInner> listNextSinglePage(String nextLink, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkDhcpInner>> listDhcpNextSinglePageAsync(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.listDhcpNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -6753,6 +9216,15 @@ private Mono<PagedResponse<WorkloadNetworkDhcpInner>> listDhcpNextSinglePageAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkDhcpInner> listDhcpNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkDhcpList> res = service.listDhcpNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -6772,6 +9244,15 @@ private PagedResponse<WorkloadNetworkDhcpInner> listDhcpNextSinglePage(String ne */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkDhcpInner> listDhcpNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkDhcpList> res = service.listDhcpNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -6791,6 +9272,13 @@ private PagedResponse<WorkloadNetworkDhcpInner> listDhcpNextSinglePage(String ne */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkDnsServiceInner>> listDnsServicesNextSinglePageAsync(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.listDnsServicesNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -6810,6 +9298,15 @@ private Mono<PagedResponse<WorkloadNetworkDnsServiceInner>> listDnsServicesNextS */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkDnsServiceInner> listDnsServicesNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkDnsServicesList> res = service.listDnsServicesNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -6830,6 +9327,15 @@ private PagedResponse<WorkloadNetworkDnsServiceInner> listDnsServicesNextSingleP @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkDnsServiceInner> listDnsServicesNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkDnsServicesList> res = service.listDnsServicesNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -6849,6 +9355,13 @@ private PagedResponse<WorkloadNetworkDnsServiceInner> listDnsServicesNextSingleP */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkDnsZoneInner>> listDnsZonesNextSinglePageAsync(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.listDnsZonesNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -6868,6 +9381,15 @@ private Mono<PagedResponse<WorkloadNetworkDnsZoneInner>> listDnsZonesNextSingleP */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkDnsZoneInner> listDnsZonesNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkDnsZonesList> res = service.listDnsZonesNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -6887,6 +9409,15 @@ private PagedResponse<WorkloadNetworkDnsZoneInner> listDnsZonesNextSinglePage(St */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkDnsZoneInner> listDnsZonesNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkDnsZonesList> res = service.listDnsZonesNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -6906,6 +9437,13 @@ private PagedResponse<WorkloadNetworkDnsZoneInner> listDnsZonesNextSinglePage(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkGatewayInner>> listGatewaysNextSinglePageAsync(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.listGatewaysNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -6925,6 +9463,15 @@ private Mono<PagedResponse<WorkloadNetworkGatewayInner>> listGatewaysNextSingleP */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkGatewayInner> listGatewaysNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkGatewayList> res = service.listGatewaysNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -6944,6 +9491,15 @@ private PagedResponse<WorkloadNetworkGatewayInner> listGatewaysNextSinglePage(St */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkGatewayInner> listGatewaysNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkGatewayList> res = service.listGatewaysNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -6964,6 +9520,13 @@ private PagedResponse<WorkloadNetworkGatewayInner> listGatewaysNextSinglePage(St @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkPortMirroringInner>> listPortMirroringNextSinglePageAsync(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.listPortMirroringNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -6983,6 +9546,15 @@ private PagedResponse<WorkloadNetworkGatewayInner> listGatewaysNextSinglePage(St */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkPortMirroringInner> listPortMirroringNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkPortMirroringList> res = service.listPortMirroringNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -7003,6 +9575,15 @@ private PagedResponse<WorkloadNetworkPortMirroringInner> listPortMirroringNextSi @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkPortMirroringInner> listPortMirroringNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkPortMirroringList> res = service.listPortMirroringNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -7022,6 +9603,13 @@ private PagedResponse<WorkloadNetworkPortMirroringInner> listPortMirroringNextSi */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkPublicIpInner>> listPublicIPsNextSinglePageAsync(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.listPublicIPsNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -7041,6 +9629,15 @@ private Mono<PagedResponse<WorkloadNetworkPublicIpInner>> listPublicIPsNextSingl */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkPublicIpInner> listPublicIPsNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkPublicIPsList> res = service.listPublicIPsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -7060,6 +9657,15 @@ private PagedResponse<WorkloadNetworkPublicIpInner> listPublicIPsNextSinglePage( */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkPublicIpInner> listPublicIPsNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkPublicIPsList> res = service.listPublicIPsNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -7079,6 +9685,13 @@ private PagedResponse<WorkloadNetworkPublicIpInner> listPublicIPsNextSinglePage( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkSegmentInner>> listSegmentsNextSinglePageAsync(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.listSegmentsNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -7098,6 +9711,15 @@ private Mono<PagedResponse<WorkloadNetworkSegmentInner>> listSegmentsNextSingleP */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkSegmentInner> listSegmentsNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkSegmentsList> res = service.listSegmentsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -7117,6 +9739,15 @@ private PagedResponse<WorkloadNetworkSegmentInner> listSegmentsNextSinglePage(St */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkSegmentInner> listSegmentsNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkSegmentsList> res = service.listSegmentsNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -7137,6 +9768,13 @@ private PagedResponse<WorkloadNetworkSegmentInner> listSegmentsNextSinglePage(St @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkVirtualMachineInner>> listVirtualMachinesNextSinglePageAsync(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( @@ -7157,6 +9795,15 @@ private PagedResponse<WorkloadNetworkSegmentInner> listSegmentsNextSinglePage(St */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkVirtualMachineInner> listVirtualMachinesNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkVirtualMachinesList> res = service.listVirtualMachinesNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -7177,6 +9824,15 @@ private PagedResponse<WorkloadNetworkVirtualMachineInner> listVirtualMachinesNex @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkVirtualMachineInner> listVirtualMachinesNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkVirtualMachinesList> res = service.listVirtualMachinesNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -7196,6 +9852,13 @@ private PagedResponse<WorkloadNetworkVirtualMachineInner> listVirtualMachinesNex */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WorkloadNetworkVMGroupInner>> listVMGroupsNextSinglePageAsync(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.listVMGroupsNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -7215,6 +9878,15 @@ private Mono<PagedResponse<WorkloadNetworkVMGroupInner>> listVMGroupsNextSingleP */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkVMGroupInner> listVMGroupsNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkVMGroupsList> res = service.listVMGroupsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -7234,10 +9906,21 @@ private PagedResponse<WorkloadNetworkVMGroupInner> listVMGroupsNextSinglePage(St */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse<WorkloadNetworkVMGroupInner> listVMGroupsNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response<WorkloadNetworkVMGroupsList> res = service.listVMGroupsNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworksClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/AddonList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/AddonList.java index e5d4fb041540..34ae80e952df 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/AddonList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/AddonList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,22 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model AddonList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AddonList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/CloudLinkList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/CloudLinkList.java index f84cafee32f8..d2bdeceb5fbc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/CloudLinkList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/CloudLinkList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,22 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model CloudLinkList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CloudLinkList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ClusterList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ClusterList.java index 3a93c1e159c6..c58f69412216 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ClusterList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ClusterList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,22 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ClusterList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ClusterList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/DatastoreList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/DatastoreList.java index b5ff6853ccf1..e0878d6f1b61 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/DatastoreList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/DatastoreList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,22 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model DatastoreList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DatastoreList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ExpressRouteAuthorizationList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ExpressRouteAuthorizationList.java index d7c4be8e7963..e88d80801ea5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ExpressRouteAuthorizationList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ExpressRouteAuthorizationList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,23 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ExpressRouteAuthorizationList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExpressRouteAuthorizationList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/GlobalReachConnectionList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/GlobalReachConnectionList.java index f746409ca777..b0a04317d7a1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/GlobalReachConnectionList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/GlobalReachConnectionList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,23 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model GlobalReachConnectionList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GlobalReachConnectionList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/HcxEnterpriseSiteList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/HcxEnterpriseSiteList.java index 8b71c46d2f67..de7232d25a29 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/HcxEnterpriseSiteList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/HcxEnterpriseSiteList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,22 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model HcxEnterpriseSiteList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(HcxEnterpriseSiteList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/HostListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/HostListResult.java index 1a0e9bc2b003..4de1ec2a8217 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/HostListResult.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/HostListResult.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,22 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model HostListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(HostListResult.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/IscsiPathListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/IscsiPathListResult.java index 6a1139d28755..a321ab85959f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/IscsiPathListResult.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/IscsiPathListResult.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,22 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model IscsiPathListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IscsiPathListResult.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/LicenseListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/LicenseListResult.java new file mode 100644 index 000000000000..ccf1806db154 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/LicenseListResult.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.fluent.models.LicenseInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a License list operation. + */ +@Immutable +public final class LicenseListResult implements JsonSerializable<LicenseListResult> { + /* + * The License items on this page + */ + private List<LicenseInner> value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of LicenseListResult class. + */ + private LicenseListResult() { + } + + /** + * Get the value property: The License items on this page. + * + * @return the value value. + */ + public List<LicenseInner> value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model LicenseListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LicenseListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LicenseListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LicenseListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LicenseListResult. + */ + public static LicenseListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LicenseListResult deserializedLicenseListResult = new LicenseListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<LicenseInner> value = reader.readArray(reader1 -> LicenseInner.fromJson(reader1)); + deserializedLicenseListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedLicenseListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLicenseListResult; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/MaintenanceListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/MaintenanceListResult.java new file mode 100644 index 000000000000..8f3144ebfd1a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/MaintenanceListResult.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.fluent.models.MaintenanceInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a Maintenance list operation. + */ +@Immutable +public final class MaintenanceListResult implements JsonSerializable<MaintenanceListResult> { + /* + * The Maintenance items on this page + */ + private List<MaintenanceInner> value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of MaintenanceListResult class. + */ + private MaintenanceListResult() { + } + + /** + * Get the value property: The Maintenance items on this page. + * + * @return the value value. + */ + public List<MaintenanceInner> value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model MaintenanceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MaintenanceListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MaintenanceListResult. + */ + public static MaintenanceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceListResult deserializedMaintenanceListResult = new MaintenanceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List<MaintenanceInner> value = reader.readArray(reader1 -> MaintenanceInner.fromJson(reader1)); + deserializedMaintenanceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMaintenanceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceListResult; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/OperationListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/OperationListResult.java index 7fecb50a5cc3..2b1d16cf79ab 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/OperationListResult.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/OperationListResult.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -53,6 +54,22 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model OperationListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OperationListResult.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PagedResourceSku.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PagedResourceSku.java index 4d784a499474..1ccee54075e2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PagedResourceSku.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PagedResourceSku.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,22 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model PagedResourceSku")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PagedResourceSku.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PlacementPoliciesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PlacementPoliciesList.java index 4b61f64231d0..bc967e4fcaeb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PlacementPoliciesList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PlacementPoliciesList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,22 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model PlacementPoliciesList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PlacementPoliciesList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PrivateCloudList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PrivateCloudList.java index 2d45dc6e7b05..5c2d798b7957 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PrivateCloudList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PrivateCloudList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,22 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model PrivateCloudList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateCloudList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ProvisionedNetworkListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ProvisionedNetworkListResult.java index 4d8c39667a45..7a930e31805f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ProvisionedNetworkListResult.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ProvisionedNetworkListResult.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,23 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ProvisionedNetworkListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ProvisionedNetworkListResult.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PureStoragePolicyListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PureStoragePolicyListResult.java index 44aa2e444718..b17344e4a86a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PureStoragePolicyListResult.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PureStoragePolicyListResult.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,23 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model PureStoragePolicyListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PureStoragePolicyListResult.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptCmdletsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptCmdletsList.java index 3269ee584120..df760524584c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptCmdletsList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptCmdletsList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,22 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ScriptCmdletsList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptCmdletsList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java index 88a20ef1b1f5..221a2d7d4c1b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,22 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ScriptExecutionsList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionsList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptPackagesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptPackagesList.java index 6253a059412b..4b6b8b48c29f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptPackagesList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptPackagesList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,22 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ScriptPackagesList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptPackagesList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/VirtualMachinesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/VirtualMachinesList.java index 2542bd4d7501..db88c30ef7c8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/VirtualMachinesList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/VirtualMachinesList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,22 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model VirtualMachinesList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VirtualMachinesList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDhcpList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDhcpList.java index e760a062425f..fef946cd0a77 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDhcpList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDhcpList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,22 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model WorkloadNetworkDhcpList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDhcpList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsServicesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsServicesList.java index 62f1b8d07787..292d21034031 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsServicesList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsServicesList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,23 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkDnsServicesList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDnsServicesList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsZonesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsZonesList.java index c13f855c4457..930c54561a18 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsZonesList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsZonesList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,23 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkDnsZonesList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDnsZonesList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkGatewayList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkGatewayList.java index 2a84426c5234..770af19950ac 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkGatewayList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkGatewayList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,23 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkGatewayList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkGatewayList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkList.java index 80dedb42f9a3..655ce3573c94 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,22 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model WorkloadNetworkList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPortMirroringList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPortMirroringList.java index cdd49e6afc73..8bee83c796c6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPortMirroringList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPortMirroringList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,23 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkPortMirroringList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkPortMirroringList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPublicIPsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPublicIPsList.java index 014cdb9952c7..79339df90f44 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPublicIPsList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPublicIPsList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,23 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkPublicIPsList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkPublicIPsList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkSegmentsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkSegmentsList.java index 044226a42529..e066949e7b83 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkSegmentsList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkSegmentsList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,23 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkSegmentsList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkSegmentsList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVMGroupsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVMGroupsList.java index d79fc3d65b73..529bacfa504a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVMGroupsList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVMGroupsList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,23 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkVMGroupsList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkVMGroupsList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVirtualMachinesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVirtualMachinesList.java index 05b82dba26d3..573d4ffa5d70 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVirtualMachinesList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVirtualMachinesList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,23 @@ public String nextLink() { return this.nextLink; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkVirtualMachinesList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkVirtualMachinesList.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonArcProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonArcProperties.java index 56dc5528cdcb..1c6933802089 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonArcProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonArcProperties.java @@ -61,6 +61,15 @@ public AddonArcProperties withVCenter(String vCenter) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonHcxProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonHcxProperties.java index 6d4cf362f5c4..091a997c44e1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonHcxProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonHcxProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -111,6 +112,21 @@ public AddonHcxProperties withUplinkNetwork(String uplinkNetwork) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (offer() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property offer in model AddonHcxProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AddonHcxProperties.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java index a2a1f72c101b..67e3aaa9b2ff 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java @@ -61,6 +61,14 @@ AddonProperties withProvisioningState(AddonProvisioningState provisioningState) return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonSrmProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonSrmProperties.java index 139081a4be43..2cda7ce07dbf 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonSrmProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonSrmProperties.java @@ -61,6 +61,15 @@ public AddonSrmProperties withLicenseKey(String licenseKey) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonVrProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonVrProperties.java index 610480f2e170..3e925779a273 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonVrProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonVrProperties.java @@ -61,6 +61,15 @@ public AddonVrProperties withVrsCount(int vrsCount) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java index 9cb74f83cfd7..3bab7b0d484d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java @@ -97,6 +97,14 @@ public AvailabilityProperties withSecondaryZone(Integer secondaryZone) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileRescheduleOperation.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileRescheduleOperation.java new file mode 100644 index 000000000000..97a0bb1bd305 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileRescheduleOperation.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Time window in which Customer can reschedule maintenance. + */ +@Immutable +public final class AvailableWindowForMaintenanceWhileRescheduleOperation extends RescheduleOperationConstraint { + /* + * The kind of operation + */ + private RescheduleOperationConstraintKind kind + = RescheduleOperationConstraintKind.AVAILABLE_WINDOW_FOR_MAINTENANCE_WHILE_RESCHEDULE_OPERATION; + + /* + * Start date time + */ + private OffsetDateTime startsAt; + + /* + * End date Time + */ + private OffsetDateTime endsAt; + + /** + * Creates an instance of AvailableWindowForMaintenanceWhileRescheduleOperation class. + */ + private AvailableWindowForMaintenanceWhileRescheduleOperation() { + } + + /** + * Get the kind property: The kind of operation. + * + * @return the kind value. + */ + @Override + public RescheduleOperationConstraintKind kind() { + return this.kind; + } + + /** + * Get the startsAt property: Start date time. + * + * @return the startsAt value. + */ + public OffsetDateTime startsAt() { + return this.startsAt; + } + + /** + * Get the endsAt property: End date Time. + * + * @return the endsAt value. + */ + public OffsetDateTime endsAt() { + return this.endsAt; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AvailableWindowForMaintenanceWhileRescheduleOperation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AvailableWindowForMaintenanceWhileRescheduleOperation if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AvailableWindowForMaintenanceWhileRescheduleOperation. + */ + public static AvailableWindowForMaintenanceWhileRescheduleOperation fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + AvailableWindowForMaintenanceWhileRescheduleOperation deserializedAvailableWindowForMaintenanceWhileRescheduleOperation + = new AvailableWindowForMaintenanceWhileRescheduleOperation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("startsAt".equals(fieldName)) { + deserializedAvailableWindowForMaintenanceWhileRescheduleOperation.startsAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endsAt".equals(fieldName)) { + deserializedAvailableWindowForMaintenanceWhileRescheduleOperation.endsAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("kind".equals(fieldName)) { + deserializedAvailableWindowForMaintenanceWhileRescheduleOperation.kind + = RescheduleOperationConstraintKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAvailableWindowForMaintenanceWhileRescheduleOperation; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileScheduleOperation.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileScheduleOperation.java new file mode 100644 index 000000000000..2ff94172cfaa --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileScheduleOperation.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Time window in which Customer can to schedule maintenance. + */ +@Immutable +public final class AvailableWindowForMaintenanceWhileScheduleOperation extends ScheduleOperationConstraint { + /* + * The kind of operation + */ + private ScheduleOperationConstraintKind kind + = ScheduleOperationConstraintKind.AVAILABLE_WINDOW_FOR_MAINTENANCE_WHILE_SCHEDULE_OPERATION; + + /* + * Start date time + */ + private OffsetDateTime startsAt; + + /* + * End date Time + */ + private OffsetDateTime endsAt; + + /** + * Creates an instance of AvailableWindowForMaintenanceWhileScheduleOperation class. + */ + private AvailableWindowForMaintenanceWhileScheduleOperation() { + } + + /** + * Get the kind property: The kind of operation. + * + * @return the kind value. + */ + @Override + public ScheduleOperationConstraintKind kind() { + return this.kind; + } + + /** + * Get the startsAt property: Start date time. + * + * @return the startsAt value. + */ + public OffsetDateTime startsAt() { + return this.startsAt; + } + + /** + * Get the endsAt property: End date Time. + * + * @return the endsAt value. + */ + public OffsetDateTime endsAt() { + return this.endsAt; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AvailableWindowForMaintenanceWhileScheduleOperation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AvailableWindowForMaintenanceWhileScheduleOperation if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AvailableWindowForMaintenanceWhileScheduleOperation. + */ + public static AvailableWindowForMaintenanceWhileScheduleOperation fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + AvailableWindowForMaintenanceWhileScheduleOperation deserializedAvailableWindowForMaintenanceWhileScheduleOperation + = new AvailableWindowForMaintenanceWhileScheduleOperation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("startsAt".equals(fieldName)) { + deserializedAvailableWindowForMaintenanceWhileScheduleOperation.startsAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endsAt".equals(fieldName)) { + deserializedAvailableWindowForMaintenanceWhileScheduleOperation.endsAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("kind".equals(fieldName)) { + deserializedAvailableWindowForMaintenanceWhileScheduleOperation.kind + = ScheduleOperationConstraintKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAvailableWindowForMaintenanceWhileScheduleOperation; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintCategory.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintCategory.java new file mode 100644 index 000000000000..22ee82dc905a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintCategory.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Reason for blocking operation on maintenance. + */ +public final class BlockedDatesConstraintCategory extends ExpandableStringEnum<BlockedDatesConstraintCategory> { + /** + * Hi-Priority Event. + */ + public static final BlockedDatesConstraintCategory HI_PRIORITY_EVENT = fromString("HiPriorityEvent"); + + /** + * Quota Exhausted. + */ + public static final BlockedDatesConstraintCategory QUOTA_EXHAUSTED = fromString("QuotaExhausted"); + + /** + * Holidays. + */ + public static final BlockedDatesConstraintCategory HOLIDAY = fromString("Holiday"); + + /** + * Creates a new instance of BlockedDatesConstraintCategory value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BlockedDatesConstraintCategory() { + } + + /** + * Creates or finds a BlockedDatesConstraintCategory from its string representation. + * + * @param name a name to look for. + * @return the corresponding BlockedDatesConstraintCategory. + */ + public static BlockedDatesConstraintCategory fromString(String name) { + return fromString(name, BlockedDatesConstraintCategory.class); + } + + /** + * Gets known BlockedDatesConstraintCategory values. + * + * @return known BlockedDatesConstraintCategory values. + */ + public static Collection<BlockedDatesConstraintCategory> values() { + return values(BlockedDatesConstraintCategory.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintTimeRange.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintTimeRange.java new file mode 100644 index 000000000000..3ce7ed299e28 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintTimeRange.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Blocked Time range Constraints for maintenance. + */ +@Immutable +public final class BlockedDatesConstraintTimeRange implements JsonSerializable<BlockedDatesConstraintTimeRange> { + /* + * Start date time + */ + private OffsetDateTime startsAt; + + /* + * End date Time + */ + private OffsetDateTime endsAt; + + /* + * Reason category for blocking maintenance reschedule + */ + private String reason; + + /** + * Creates an instance of BlockedDatesConstraintTimeRange class. + */ + private BlockedDatesConstraintTimeRange() { + } + + /** + * Get the startsAt property: Start date time. + * + * @return the startsAt value. + */ + public OffsetDateTime startsAt() { + return this.startsAt; + } + + /** + * Get the endsAt property: End date Time. + * + * @return the endsAt value. + */ + public OffsetDateTime endsAt() { + return this.endsAt; + } + + /** + * Get the reason property: Reason category for blocking maintenance reschedule. + * + * @return the reason value. + */ + public String reason() { + return this.reason; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BlockedDatesConstraintTimeRange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BlockedDatesConstraintTimeRange if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BlockedDatesConstraintTimeRange. + */ + public static BlockedDatesConstraintTimeRange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BlockedDatesConstraintTimeRange deserializedBlockedDatesConstraintTimeRange + = new BlockedDatesConstraintTimeRange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("startsAt".equals(fieldName)) { + deserializedBlockedDatesConstraintTimeRange.startsAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endsAt".equals(fieldName)) { + deserializedBlockedDatesConstraintTimeRange.endsAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("reason".equals(fieldName)) { + deserializedBlockedDatesConstraintTimeRange.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBlockedDatesConstraintTimeRange; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileRescheduleOperation.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileRescheduleOperation.java new file mode 100644 index 000000000000..d6d6b81c6fbe --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileRescheduleOperation.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Time ranges blocked for rescheduling maintenance. + */ +@Immutable +public final class BlockedWhileRescheduleOperation extends RescheduleOperationConstraint { + /* + * The kind of operation + */ + private RescheduleOperationConstraintKind kind + = RescheduleOperationConstraintKind.BLOCKED_WHILE_RESCHEDULE_OPERATION; + + /* + * Category of blocked date + */ + private BlockedDatesConstraintCategory category; + + /* + * Date ranges blocked for schedule + */ + private List<BlockedDatesConstraintTimeRange> timeRanges; + + /** + * Creates an instance of BlockedWhileRescheduleOperation class. + */ + private BlockedWhileRescheduleOperation() { + } + + /** + * Get the kind property: The kind of operation. + * + * @return the kind value. + */ + @Override + public RescheduleOperationConstraintKind kind() { + return this.kind; + } + + /** + * Get the category property: Category of blocked date. + * + * @return the category value. + */ + public BlockedDatesConstraintCategory category() { + return this.category; + } + + /** + * Get the timeRanges property: Date ranges blocked for schedule. + * + * @return the timeRanges value. + */ + public List<BlockedDatesConstraintTimeRange> timeRanges() { + return this.timeRanges; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (timeRanges() != null) { + timeRanges().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BlockedWhileRescheduleOperation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BlockedWhileRescheduleOperation if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BlockedWhileRescheduleOperation. + */ + public static BlockedWhileRescheduleOperation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BlockedWhileRescheduleOperation deserializedBlockedWhileRescheduleOperation + = new BlockedWhileRescheduleOperation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("category".equals(fieldName)) { + deserializedBlockedWhileRescheduleOperation.category + = BlockedDatesConstraintCategory.fromString(reader.getString()); + } else if ("kind".equals(fieldName)) { + deserializedBlockedWhileRescheduleOperation.kind + = RescheduleOperationConstraintKind.fromString(reader.getString()); + } else if ("timeRanges".equals(fieldName)) { + List<BlockedDatesConstraintTimeRange> timeRanges + = reader.readArray(reader1 -> BlockedDatesConstraintTimeRange.fromJson(reader1)); + deserializedBlockedWhileRescheduleOperation.timeRanges = timeRanges; + } else { + reader.skipChildren(); + } + } + + return deserializedBlockedWhileRescheduleOperation; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileScheduleOperation.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileScheduleOperation.java new file mode 100644 index 000000000000..0e64bc839bd9 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileScheduleOperation.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Time ranges blocked for scheduling maintenance. + */ +@Immutable +public final class BlockedWhileScheduleOperation extends ScheduleOperationConstraint { + /* + * The kind of operation + */ + private ScheduleOperationConstraintKind kind = ScheduleOperationConstraintKind.BLOCKED_WHILE_SCHEDULE_OPERATION; + + /* + * Category of blocked date + */ + private BlockedDatesConstraintCategory category; + + /* + * Date ranges blocked for schedule + */ + private List<BlockedDatesConstraintTimeRange> timeRanges; + + /** + * Creates an instance of BlockedWhileScheduleOperation class. + */ + private BlockedWhileScheduleOperation() { + } + + /** + * Get the kind property: The kind of operation. + * + * @return the kind value. + */ + @Override + public ScheduleOperationConstraintKind kind() { + return this.kind; + } + + /** + * Get the category property: Category of blocked date. + * + * @return the category value. + */ + public BlockedDatesConstraintCategory category() { + return this.category; + } + + /** + * Get the timeRanges property: Date ranges blocked for schedule. + * + * @return the timeRanges value. + */ + public List<BlockedDatesConstraintTimeRange> timeRanges() { + return this.timeRanges; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (timeRanges() != null) { + timeRanges().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BlockedWhileScheduleOperation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BlockedWhileScheduleOperation if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BlockedWhileScheduleOperation. + */ + public static BlockedWhileScheduleOperation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BlockedWhileScheduleOperation deserializedBlockedWhileScheduleOperation + = new BlockedWhileScheduleOperation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("category".equals(fieldName)) { + deserializedBlockedWhileScheduleOperation.category + = BlockedDatesConstraintCategory.fromString(reader.getString()); + } else if ("kind".equals(fieldName)) { + deserializedBlockedWhileScheduleOperation.kind + = ScheduleOperationConstraintKind.fromString(reader.getString()); + } else if ("timeRanges".equals(fieldName)) { + List<BlockedDatesConstraintTimeRange> timeRanges + = reader.readArray(reader1 -> BlockedDatesConstraintTimeRange.fromJson(reader1)); + deserializedBlockedWhileScheduleOperation.timeRanges = timeRanges; + } else { + reader.skipChildren(); + } + } + + return deserializedBlockedWhileScheduleOperation; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Circuit.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Circuit.java index 24fbe5b8fd2d..42484381f02e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Circuit.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Circuit.java @@ -78,6 +78,14 @@ public String expressRoutePrivatePeeringId() { return this.expressRoutePrivatePeeringId; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java index a3c4c661754b..f770db686fd9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java @@ -109,6 +109,20 @@ public ClusterUpdate withHosts(List<String> hosts) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java index 2ae7778fa285..70605586268b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java @@ -51,6 +51,14 @@ public String zone() { return this.zone; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java index a86e0630b395..3036ea8f8890 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -114,6 +115,24 @@ public String path() { return this.path; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (targetId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property targetId in model DiskPoolVolume")); + } + if (lunName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property lunName in model DiskPoolVolume")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DiskPoolVolume.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ElasticSanVolume.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ElasticSanVolume.java index f12c65ce5b68..ecf6eef6c96a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ElasticSanVolume.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ElasticSanVolume.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -47,6 +48,20 @@ public ElasticSanVolume withTargetId(String targetId) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (targetId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property targetId in model ElasticSanVolume")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSanVolume.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Encryption.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Encryption.java index 277667d5dbfc..2485edf71ae5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Encryption.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Encryption.java @@ -72,6 +72,17 @@ public Encryption withKeyVaultProperties(EncryptionKeyVaultProperties keyVaultPr return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyVaultProperties() != null) { + keyVaultProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java index 1d9d9301485d..b6279d7d0007 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java @@ -139,6 +139,14 @@ public EncryptionVersionType versionType() { return this.versionType; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java index c6a146edf113..1ec6012f38fa 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java @@ -106,6 +106,14 @@ public String hcxCloudManagerIp() { return this.hcxCloudManagerIp; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GeneralHostProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GeneralHostProperties.java index 50055b725b50..09d97501e8a6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GeneralHostProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GeneralHostProperties.java @@ -36,6 +36,15 @@ public HostKind kind() { return this.kind; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostProperties.java index c8255eb1492d..9174337d2d96 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostProperties.java @@ -186,6 +186,14 @@ HostProperties withFaultDomain(String faultDomain) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IdentitySource.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IdentitySource.java index af726e5fbf9a..e5bcdc6c737f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IdentitySource.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IdentitySource.java @@ -278,6 +278,14 @@ public IdentitySource withPassword(String password) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResource.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResource.java new file mode 100644 index 000000000000..3d8b87b1a3c8 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResource.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Details about a resource impacted by a failed check. + */ +@Immutable +public final class ImpactedMaintenanceResource implements JsonSerializable<ImpactedMaintenanceResource> { + /* + * The ID of the impacted resource + */ + private String id; + + /* + * A list of errors associated with the impacted resource + */ + private List<ImpactedMaintenanceResourceError> errors; + + /** + * Creates an instance of ImpactedMaintenanceResource class. + */ + private ImpactedMaintenanceResource() { + } + + /** + * Get the id property: The ID of the impacted resource. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the errors property: A list of errors associated with the impacted resource. + * + * @return the errors value. + */ + public List<ImpactedMaintenanceResourceError> errors() { + return this.errors; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (errors() != null) { + errors().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImpactedMaintenanceResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImpactedMaintenanceResource if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ImpactedMaintenanceResource. + */ + public static ImpactedMaintenanceResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImpactedMaintenanceResource deserializedImpactedMaintenanceResource = new ImpactedMaintenanceResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedImpactedMaintenanceResource.id = reader.getString(); + } else if ("errors".equals(fieldName)) { + List<ImpactedMaintenanceResourceError> errors + = reader.readArray(reader1 -> ImpactedMaintenanceResourceError.fromJson(reader1)); + deserializedImpactedMaintenanceResource.errors = errors; + } else { + reader.skipChildren(); + } + } + + return deserializedImpactedMaintenanceResource; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResourceError.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResourceError.java new file mode 100644 index 000000000000..4375479c2310 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResourceError.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Details about an error affecting a resource. + */ +@Immutable +public final class ImpactedMaintenanceResourceError implements JsonSerializable<ImpactedMaintenanceResourceError> { + /* + * The error code + */ + private String errorCode; + + /* + * The name of the error + */ + private String name; + + /* + * Additional details about the error + */ + private String details; + + /* + * Steps to resolve the error + */ + private List<String> resolutionSteps; + + /* + * Indicates whether action is required by the customer + */ + private Boolean actionRequired; + + /** + * Creates an instance of ImpactedMaintenanceResourceError class. + */ + private ImpactedMaintenanceResourceError() { + } + + /** + * Get the errorCode property: The error code. + * + * @return the errorCode value. + */ + public String errorCode() { + return this.errorCode; + } + + /** + * Get the name property: The name of the error. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the details property: Additional details about the error. + * + * @return the details value. + */ + public String details() { + return this.details; + } + + /** + * Get the resolutionSteps property: Steps to resolve the error. + * + * @return the resolutionSteps value. + */ + public List<String> resolutionSteps() { + return this.resolutionSteps; + } + + /** + * Get the actionRequired property: Indicates whether action is required by the customer. + * + * @return the actionRequired value. + */ + public Boolean actionRequired() { + return this.actionRequired; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImpactedMaintenanceResourceError from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImpactedMaintenanceResourceError if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ImpactedMaintenanceResourceError. + */ + public static ImpactedMaintenanceResourceError fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImpactedMaintenanceResourceError deserializedImpactedMaintenanceResourceError + = new ImpactedMaintenanceResourceError(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("errorCode".equals(fieldName)) { + deserializedImpactedMaintenanceResourceError.errorCode = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedImpactedMaintenanceResourceError.name = reader.getString(); + } else if ("details".equals(fieldName)) { + deserializedImpactedMaintenanceResourceError.details = reader.getString(); + } else if ("resolutionSteps".equals(fieldName)) { + List<String> resolutionSteps = reader.readArray(reader1 -> reader1.getString()); + deserializedImpactedMaintenanceResourceError.resolutionSteps = resolutionSteps; + } else if ("actionRequired".equals(fieldName)) { + deserializedImpactedMaintenanceResourceError.actionRequired + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedImpactedMaintenanceResourceError; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Label.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Label.java new file mode 100644 index 000000000000..12aad77af7f9 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Label.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A key-value pair representing a label. + */ +@Fluent +public final class Label implements JsonSerializable<Label> { + /* + * The key of the label. + */ + private String key; + + /* + * The value of the label. + */ + private String value; + + /** + * Creates an instance of Label class. + */ + public Label() { + } + + /** + * Get the key property: The key of the label. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: The key of the label. + * + * @param key the key value to set. + * @return the Label object itself. + */ + public Label withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the value property: The value of the label. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The value of the label. + * + * @param value the value value to set. + * @return the Label object itself. + */ + public Label withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (key() == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property key in model Label")); + } + if (value() == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property value in model Label")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(Label.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", this.key); + jsonWriter.writeStringField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Label from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Label if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the Label. + */ + public static Label fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Label deserializedLabel = new Label(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedLabel.key = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedLabel.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLabel; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/License.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/License.java new file mode 100644 index 000000000000..b9adadced25d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/License.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.avs.fluent.models.LicenseInner; +import com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner; + +/** + * An immutable client-side representation of License. + */ +public interface License { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + LicenseProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.avs.fluent.models.LicenseInner object. + * + * @return the inner object. + */ + LicenseInner innerModel(); + + /** + * The entirety of the License definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The License definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the License definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the License definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, privateCloudName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @return the next definition stage. + */ + WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); + } + + /** + * The stage of the License definition which contains all the minimum required properties for the resource to be + * created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + License create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + License create(Context context); + } + + /** + * The stage of the License definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(LicensePropertiesInner properties); + } + } + + /** + * Begins update for the License resource. + * + * @return the stage of resource update. + */ + License.Update update(); + + /** + * The template for License update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + License apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + License apply(Context context); + } + + /** + * The License update stages. + */ + interface UpdateStages { + /** + * The stage of the License update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(LicensePropertiesInner properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + License refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + License refresh(Context context); + + /** + * Just like ArmResourceActionSync, but with no request body. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a license along with {@link Response}. + */ + Response<LicenseProperties> getPropertiesWithResponse(Context context); + + /** + * Just like ArmResourceActionSync, but with no request body. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a license. + */ + LicenseProperties getProperties(); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseKind.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseKind.java new file mode 100644 index 000000000000..38dd86675d0d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseKind.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The kind of license. + */ +public final class LicenseKind extends ExpandableStringEnum<LicenseKind> { + /** + * Static value VmwareFirewall for LicenseKind. + */ + public static final LicenseKind VMWARE_FIREWALL = fromString("VmwareFirewall"); + + /** + * Creates a new instance of LicenseKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LicenseKind() { + } + + /** + * Creates or finds a LicenseKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding LicenseKind. + */ + public static LicenseKind fromString(String name) { + return fromString(name, LicenseKind.class); + } + + /** + * Gets known LicenseKind values. + * + * @return known LicenseKind values. + */ + public static Collection<LicenseKind> values() { + return values(LicenseKind.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseName.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseName.java new file mode 100644 index 000000000000..bc6104b7e53b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseName.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The name of the license. + */ +public final class LicenseName extends ExpandableStringEnum<LicenseName> { + /** + * VMware Firewall license. + */ + public static final LicenseName VMWARE_FIREWALL = fromString("VmwareFirewall"); + + /** + * Creates a new instance of LicenseName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LicenseName() { + } + + /** + * Creates or finds a LicenseName from its string representation. + * + * @param name a name to look for. + * @return the corresponding LicenseName. + */ + public static LicenseName fromString(String name) { + return fromString(name, LicenseName.class); + } + + /** + * Gets known LicenseName values. + * + * @return known LicenseName values. + */ + public static Collection<LicenseName> values() { + return values(LicenseName.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseProperties.java new file mode 100644 index 000000000000..eba1ac272aa0 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseProperties.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner; + +/** + * An immutable client-side representation of LicenseProperties. + */ +public interface LicenseProperties { + /** + * Gets the kind property: License kind. + * + * @return the kind value. + */ + LicenseKind kind(); + + /** + * Gets the provisioningState property: The state of the license provisioning. + * + * @return the provisioningState value. + */ + LicenseProvisioningState provisioningState(); + + /** + * Gets the inner com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner object. + * + * @return the inner object. + */ + LicensePropertiesInner innerModel(); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseProvisioningState.java new file mode 100644 index 000000000000..21b168b0c66f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LicenseProvisioningState.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * provisioning state of the license. + */ +public final class LicenseProvisioningState extends ExpandableStringEnum<LicenseProvisioningState> { + /** + * Resource has been created. + */ + public static final LicenseProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Resource creation failed. + */ + public static final LicenseProvisioningState FAILED = fromString("Failed"); + + /** + * Resource creation was canceled. + */ + public static final LicenseProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of LicenseProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LicenseProvisioningState() { + } + + /** + * Creates or finds a LicenseProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding LicenseProvisioningState. + */ + public static LicenseProvisioningState fromString(String name) { + return fromString(name, LicenseProvisioningState.class); + } + + /** + * Gets known LicenseProvisioningState values. + * + * @return known LicenseProvisioningState values. + */ + public static Collection<LicenseProvisioningState> values() { + return values(LicenseProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Licenses.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Licenses.java new file mode 100644 index 000000000000..2f33f4f800f2 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Licenses.java @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Licenses. + */ +public interface Licenses { + /** + * List License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<License> list(String resourceGroupName, String privateCloudName); + + /** + * List License resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a License list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<License> list(String resourceGroupName, String privateCloudName, Context context); + + /** + * Get a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a License along with {@link Response}. + */ + Response<License> getWithResponse(String resourceGroupName, String privateCloudName, LicenseName licenseName, + Context context); + + /** + * Get a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a License. + */ + License get(String resourceGroupName, String privateCloudName, LicenseName licenseName); + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String privateCloudName, LicenseName licenseName); + + /** + * Delete a License. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String privateCloudName, LicenseName licenseName, Context context); + + /** + * Just like ArmResourceActionSync, but with no request body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a license along with {@link Response}. + */ + Response<LicenseProperties> getPropertiesWithResponse(String resourceGroupName, String privateCloudName, + LicenseName licenseName, Context context); + + /** + * Just like ArmResourceActionSync, but with no request body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param licenseName Name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a license. + */ + LicenseProperties getProperties(String resourceGroupName, String privateCloudName, LicenseName licenseName); + + /** + * Get a License. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a License along with {@link Response}. + */ + License getById(String id); + + /** + * Get a License. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a License along with {@link Response}. + */ + Response<License> getByIdWithResponse(String id, Context context); + + /** + * Delete a License. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a License. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new License resource. + * + * @param name resource name. + * @return the first stage of the new License definition. + */ + License.DefinitionStages.Blank define(LicenseName name); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Maintenance.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Maintenance.java new file mode 100644 index 000000000000..3522fe4ab32d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Maintenance.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.fluent.models.MaintenanceInner; + +/** + * An immutable client-side representation of Maintenance. + */ +public interface Maintenance { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + MaintenanceProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.avs.fluent.models.MaintenanceInner object. + * + * @return the inner object. + */ + MaintenanceInner innerModel(); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceCheckType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceCheckType.java new file mode 100644 index 000000000000..8297fe62d98b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceCheckType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines the type of maintenance readiness check. + */ +public final class MaintenanceCheckType extends ExpandableStringEnum<MaintenanceCheckType> { + /** + * Pre-check maintenance readiness. + */ + public static final MaintenanceCheckType PRECHECK = fromString("Precheck"); + + /** + * Pre-flight maintenance readiness. + */ + public static final MaintenanceCheckType PREFLIGHT = fromString("Preflight"); + + /** + * Creates a new instance of MaintenanceCheckType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MaintenanceCheckType() { + } + + /** + * Creates or finds a MaintenanceCheckType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MaintenanceCheckType. + */ + public static MaintenanceCheckType fromString(String name) { + return fromString(name, MaintenanceCheckType.class); + } + + /** + * Gets known MaintenanceCheckType values. + * + * @return known MaintenanceCheckType values. + */ + public static Collection<MaintenanceCheckType> values() { + return values(MaintenanceCheckType.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceFailedCheck.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceFailedCheck.java new file mode 100644 index 000000000000..ecfc9fd91cc1 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceFailedCheck.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Details about a failed maintenance check. + */ +@Immutable +public final class MaintenanceFailedCheck implements JsonSerializable<MaintenanceFailedCheck> { + /* + * The name of the failed check + */ + private String name; + + /* + * A list of resources impacted by the failed check + */ + private List<ImpactedMaintenanceResource> impactedResources; + + /** + * Creates an instance of MaintenanceFailedCheck class. + */ + private MaintenanceFailedCheck() { + } + + /** + * Get the name property: The name of the failed check. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the impactedResources property: A list of resources impacted by the failed check. + * + * @return the impactedResources value. + */ + public List<ImpactedMaintenanceResource> impactedResources() { + return this.impactedResources; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (impactedResources() != null) { + impactedResources().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceFailedCheck from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceFailedCheck if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MaintenanceFailedCheck. + */ + public static MaintenanceFailedCheck fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceFailedCheck deserializedMaintenanceFailedCheck = new MaintenanceFailedCheck(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedMaintenanceFailedCheck.name = reader.getString(); + } else if ("impactedResources".equals(fieldName)) { + List<ImpactedMaintenanceResource> impactedResources + = reader.readArray(reader1 -> ImpactedMaintenanceResource.fromJson(reader1)); + deserializedMaintenanceFailedCheck.impactedResources = impactedResources; + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceFailedCheck; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceManagementOperation.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceManagementOperation.java new file mode 100644 index 000000000000..131b48b4ff99 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceManagementOperation.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Defines operations that can be performed on maintenance. + */ +@Immutable +public class MaintenanceManagementOperation implements JsonSerializable<MaintenanceManagementOperation> { + /* + * The kind of operation + */ + private MaintenanceManagementOperationKind kind + = MaintenanceManagementOperationKind.fromString("MaintenanceManagementOperation"); + + /** + * Creates an instance of MaintenanceManagementOperation class. + */ + protected MaintenanceManagementOperation() { + } + + /** + * Get the kind property: The kind of operation. + * + * @return the kind value. + */ + public MaintenanceManagementOperationKind kind() { + return this.kind; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceManagementOperation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceManagementOperation if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MaintenanceManagementOperation. + */ + public static MaintenanceManagementOperation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("kind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("Schedule".equals(discriminatorValue)) { + return ScheduleOperation.fromJson(readerToUse.reset()); + } else if ("Reschedule".equals(discriminatorValue)) { + return RescheduleOperation.fromJson(readerToUse.reset()); + } else if ("MaintenanceReadinessRefresh".equals(discriminatorValue)) { + return MaintenanceReadinessRefreshOperation.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static MaintenanceManagementOperation fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceManagementOperation deserializedMaintenanceManagementOperation + = new MaintenanceManagementOperation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedMaintenanceManagementOperation.kind + = MaintenanceManagementOperationKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceManagementOperation; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceManagementOperationKind.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceManagementOperationKind.java new file mode 100644 index 000000000000..6a08d7b76961 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceManagementOperationKind.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines the type of operation. + */ +public final class MaintenanceManagementOperationKind extends ExpandableStringEnum<MaintenanceManagementOperationKind> { + /** + * Represents a scheduling operation. + */ + public static final MaintenanceManagementOperationKind SCHEDULE = fromString("Schedule"); + + /** + * Represents a rescheduling operation. + */ + public static final MaintenanceManagementOperationKind RESCHEDULE = fromString("Reschedule"); + + /** + * Represents a maintenance readiness refresh operation. + */ + public static final MaintenanceManagementOperationKind MAINTENANCE_READINESS_REFRESH + = fromString("MaintenanceReadinessRefresh"); + + /** + * Creates a new instance of MaintenanceManagementOperationKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MaintenanceManagementOperationKind() { + } + + /** + * Creates or finds a MaintenanceManagementOperationKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding MaintenanceManagementOperationKind. + */ + public static MaintenanceManagementOperationKind fromString(String name) { + return fromString(name, MaintenanceManagementOperationKind.class); + } + + /** + * Gets known MaintenanceManagementOperationKind values. + * + * @return known MaintenanceManagementOperationKind values. + */ + public static Collection<MaintenanceManagementOperationKind> values() { + return values(MaintenanceManagementOperationKind.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceProperties.java new file mode 100644 index 000000000000..69e75d642b8f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceProperties.java @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * properties of a maintenance. + */ +@Immutable +public final class MaintenanceProperties implements JsonSerializable<MaintenanceProperties> { + /* + * type of maintenance + */ + private MaintenanceType component; + + /* + * Display name for maintenance + */ + private String displayName; + + /* + * Cluster ID for on which maintenance will be applied. Empty if maintenance is at private cloud level + */ + private Integer clusterId; + + /* + * Link to maintenance info + */ + private String infoLink; + + /* + * Impact on the resource during maintenance period + */ + private String impact; + + /* + * If maintenance is scheduled by Microsoft + */ + private Boolean scheduledByMicrosoft; + + /* + * The state of the maintenance + */ + private MaintenanceState state; + + /* + * Scheduled maintenance start time + */ + private OffsetDateTime scheduledStartTime; + + /* + * Estimated time maintenance will take in minutes + */ + private Long estimatedDurationInMinutes; + + /* + * The provisioning state + */ + private MaintenanceProvisioningState provisioningState; + + /* + * Operations on maintenance + */ + private List<MaintenanceManagementOperation> operations; + + /* + * Indicates whether the maintenance is ready to proceed + */ + private MaintenanceReadiness maintenanceReadiness; + + /** + * Creates an instance of MaintenanceProperties class. + */ + private MaintenanceProperties() { + } + + /** + * Get the component property: type of maintenance. + * + * @return the component value. + */ + public MaintenanceType component() { + return this.component; + } + + /** + * Get the displayName property: Display name for maintenance. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Get the clusterId property: Cluster ID for on which maintenance will be applied. Empty if maintenance is at + * private cloud level. + * + * @return the clusterId value. + */ + public Integer clusterId() { + return this.clusterId; + } + + /** + * Get the infoLink property: Link to maintenance info. + * + * @return the infoLink value. + */ + public String infoLink() { + return this.infoLink; + } + + /** + * Get the impact property: Impact on the resource during maintenance period. + * + * @return the impact value. + */ + public String impact() { + return this.impact; + } + + /** + * Get the scheduledByMicrosoft property: If maintenance is scheduled by Microsoft. + * + * @return the scheduledByMicrosoft value. + */ + public Boolean scheduledByMicrosoft() { + return this.scheduledByMicrosoft; + } + + /** + * Get the state property: The state of the maintenance. + * + * @return the state value. + */ + public MaintenanceState state() { + return this.state; + } + + /** + * Get the scheduledStartTime property: Scheduled maintenance start time. + * + * @return the scheduledStartTime value. + */ + public OffsetDateTime scheduledStartTime() { + return this.scheduledStartTime; + } + + /** + * Get the estimatedDurationInMinutes property: Estimated time maintenance will take in minutes. + * + * @return the estimatedDurationInMinutes value. + */ + public Long estimatedDurationInMinutes() { + return this.estimatedDurationInMinutes; + } + + /** + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + public MaintenanceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the operations property: Operations on maintenance. + * + * @return the operations value. + */ + public List<MaintenanceManagementOperation> operations() { + return this.operations; + } + + /** + * Get the maintenanceReadiness property: Indicates whether the maintenance is ready to proceed. + * + * @return the maintenanceReadiness value. + */ + public MaintenanceReadiness maintenanceReadiness() { + return this.maintenanceReadiness; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (state() != null) { + state().validate(); + } + if (operations() != null) { + operations().forEach(e -> e.validate()); + } + if (maintenanceReadiness() != null) { + maintenanceReadiness().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MaintenanceProperties. + */ + public static MaintenanceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceProperties deserializedMaintenanceProperties = new MaintenanceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("component".equals(fieldName)) { + deserializedMaintenanceProperties.component = MaintenanceType.fromString(reader.getString()); + } else if ("displayName".equals(fieldName)) { + deserializedMaintenanceProperties.displayName = reader.getString(); + } else if ("clusterId".equals(fieldName)) { + deserializedMaintenanceProperties.clusterId = reader.getNullable(JsonReader::getInt); + } else if ("infoLink".equals(fieldName)) { + deserializedMaintenanceProperties.infoLink = reader.getString(); + } else if ("impact".equals(fieldName)) { + deserializedMaintenanceProperties.impact = reader.getString(); + } else if ("scheduledByMicrosoft".equals(fieldName)) { + deserializedMaintenanceProperties.scheduledByMicrosoft = reader.getNullable(JsonReader::getBoolean); + } else if ("state".equals(fieldName)) { + deserializedMaintenanceProperties.state = MaintenanceState.fromJson(reader); + } else if ("scheduledStartTime".equals(fieldName)) { + deserializedMaintenanceProperties.scheduledStartTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("estimatedDurationInMinutes".equals(fieldName)) { + deserializedMaintenanceProperties.estimatedDurationInMinutes + = reader.getNullable(JsonReader::getLong); + } else if ("provisioningState".equals(fieldName)) { + deserializedMaintenanceProperties.provisioningState + = MaintenanceProvisioningState.fromString(reader.getString()); + } else if ("operations".equals(fieldName)) { + List<MaintenanceManagementOperation> operations + = reader.readArray(reader1 -> MaintenanceManagementOperation.fromJson(reader1)); + deserializedMaintenanceProperties.operations = operations; + } else if ("maintenanceReadiness".equals(fieldName)) { + deserializedMaintenanceProperties.maintenanceReadiness = MaintenanceReadiness.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceProperties; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceProvisioningState.java new file mode 100644 index 000000000000..185672aeb5e9 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceProvisioningState.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * provisioning state of the maintenance. + */ +public final class MaintenanceProvisioningState extends ExpandableStringEnum<MaintenanceProvisioningState> { + /** + * Resource has been created. + */ + public static final MaintenanceProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Resource creation failed. + */ + public static final MaintenanceProvisioningState FAILED = fromString("Failed"); + + /** + * Resource creation was canceled. + */ + public static final MaintenanceProvisioningState CANCELED = fromString("Canceled"); + + /** + * is updating. + */ + public static final MaintenanceProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates a new instance of MaintenanceProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MaintenanceProvisioningState() { + } + + /** + * Creates or finds a MaintenanceProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding MaintenanceProvisioningState. + */ + public static MaintenanceProvisioningState fromString(String name) { + return fromString(name, MaintenanceProvisioningState.class); + } + + /** + * Gets known MaintenanceProvisioningState values. + * + * @return known MaintenanceProvisioningState values. + */ + public static Collection<MaintenanceProvisioningState> values() { + return values(MaintenanceProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadiness.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadiness.java new file mode 100644 index 000000000000..a7d94d99d290 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadiness.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Maintenance readiness details. + */ +@Immutable +public final class MaintenanceReadiness implements JsonSerializable<MaintenanceReadiness> { + /* + * The type of maintenance readiness check + */ + private MaintenanceCheckType type; + + /* + * The current readiness status of maintenance + */ + private MaintenanceReadinessStatus status; + + /* + * A summary message of the readiness check result + */ + private String message; + + /* + * A list of failed checks, if any + */ + private List<MaintenanceFailedCheck> failedChecks; + + /* + * The timestamp of the last readiness update + */ + private OffsetDateTime lastUpdated; + + /** + * Creates an instance of MaintenanceReadiness class. + */ + private MaintenanceReadiness() { + } + + /** + * Get the type property: The type of maintenance readiness check. + * + * @return the type value. + */ + public MaintenanceCheckType type() { + return this.type; + } + + /** + * Get the status property: The current readiness status of maintenance. + * + * @return the status value. + */ + public MaintenanceReadinessStatus status() { + return this.status; + } + + /** + * Get the message property: A summary message of the readiness check result. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Get the failedChecks property: A list of failed checks, if any. + * + * @return the failedChecks value. + */ + public List<MaintenanceFailedCheck> failedChecks() { + return this.failedChecks; + } + + /** + * Get the lastUpdated property: The timestamp of the last readiness update. + * + * @return the lastUpdated value. + */ + public OffsetDateTime lastUpdated() { + return this.lastUpdated; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (failedChecks() != null) { + failedChecks().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceReadiness from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceReadiness if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MaintenanceReadiness. + */ + public static MaintenanceReadiness fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceReadiness deserializedMaintenanceReadiness = new MaintenanceReadiness(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedMaintenanceReadiness.type = MaintenanceCheckType.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedMaintenanceReadiness.status = MaintenanceReadinessStatus.fromString(reader.getString()); + } else if ("message".equals(fieldName)) { + deserializedMaintenanceReadiness.message = reader.getString(); + } else if ("failedChecks".equals(fieldName)) { + List<MaintenanceFailedCheck> failedChecks + = reader.readArray(reader1 -> MaintenanceFailedCheck.fromJson(reader1)); + deserializedMaintenanceReadiness.failedChecks = failedChecks; + } else if ("lastUpdated".equals(fieldName)) { + deserializedMaintenanceReadiness.lastUpdated = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceReadiness; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessRefreshOperation.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessRefreshOperation.java new file mode 100644 index 000000000000..0831e3864c17 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessRefreshOperation.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Refresh MaintenanceReadiness status. + */ +@Immutable +public final class MaintenanceReadinessRefreshOperation extends MaintenanceManagementOperation { + /* + * The kind of operation + */ + private MaintenanceManagementOperationKind kind = MaintenanceManagementOperationKind.MAINTENANCE_READINESS_REFRESH; + + /* + * If maintenanceReadiness refresh is disabled + */ + private Boolean isDisabled; + + /* + * Reason disabling refresh for maintenanceReadiness + */ + private String disabledReason; + + /* + * Status of the operation + */ + private MaintenanceReadinessRefreshOperationStatus status; + + /* + * Indicates if the operation was refreshed by Microsoft + */ + private Boolean refreshedByMicrosoft; + + /* + * Additional message about the operation + */ + private String message; + + /** + * Creates an instance of MaintenanceReadinessRefreshOperation class. + */ + private MaintenanceReadinessRefreshOperation() { + } + + /** + * Get the kind property: The kind of operation. + * + * @return the kind value. + */ + @Override + public MaintenanceManagementOperationKind kind() { + return this.kind; + } + + /** + * Get the isDisabled property: If maintenanceReadiness refresh is disabled. + * + * @return the isDisabled value. + */ + public Boolean isDisabled() { + return this.isDisabled; + } + + /** + * Get the disabledReason property: Reason disabling refresh for maintenanceReadiness. + * + * @return the disabledReason value. + */ + public String disabledReason() { + return this.disabledReason; + } + + /** + * Get the status property: Status of the operation. + * + * @return the status value. + */ + public MaintenanceReadinessRefreshOperationStatus status() { + return this.status; + } + + /** + * Get the refreshedByMicrosoft property: Indicates if the operation was refreshed by Microsoft. + * + * @return the refreshedByMicrosoft value. + */ + public Boolean refreshedByMicrosoft() { + return this.refreshedByMicrosoft; + } + + /** + * Get the message property: Additional message about the operation. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceReadinessRefreshOperation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceReadinessRefreshOperation if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MaintenanceReadinessRefreshOperation. + */ + public static MaintenanceReadinessRefreshOperation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceReadinessRefreshOperation deserializedMaintenanceReadinessRefreshOperation + = new MaintenanceReadinessRefreshOperation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedMaintenanceReadinessRefreshOperation.kind + = MaintenanceManagementOperationKind.fromString(reader.getString()); + } else if ("isDisabled".equals(fieldName)) { + deserializedMaintenanceReadinessRefreshOperation.isDisabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("disabledReason".equals(fieldName)) { + deserializedMaintenanceReadinessRefreshOperation.disabledReason = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedMaintenanceReadinessRefreshOperation.status + = MaintenanceReadinessRefreshOperationStatus.fromString(reader.getString()); + } else if ("refreshedByMicrosoft".equals(fieldName)) { + deserializedMaintenanceReadinessRefreshOperation.refreshedByMicrosoft + = reader.getNullable(JsonReader::getBoolean); + } else if ("message".equals(fieldName)) { + deserializedMaintenanceReadinessRefreshOperation.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceReadinessRefreshOperation; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessRefreshOperationStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessRefreshOperationStatus.java new file mode 100644 index 000000000000..9d38076a1976 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessRefreshOperationStatus.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The status of an MaintenanceReadinessRefresh operation. + */ +public final class MaintenanceReadinessRefreshOperationStatus + extends ExpandableStringEnum<MaintenanceReadinessRefreshOperationStatus> { + /** + * Operation is in progress. + */ + public static final MaintenanceReadinessRefreshOperationStatus IN_PROGRESS = fromString("InProgress"); + + /** + * Operation has not started. + */ + public static final MaintenanceReadinessRefreshOperationStatus NOT_STARTED = fromString("NotStarted"); + + /** + * Operation has failed. + */ + public static final MaintenanceReadinessRefreshOperationStatus FAILED = fromString("Failed"); + + /** + * Operation is not applicable. + */ + public static final MaintenanceReadinessRefreshOperationStatus NOT_APPLICABLE = fromString("NotApplicable"); + + /** + * Creates a new instance of MaintenanceReadinessRefreshOperationStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MaintenanceReadinessRefreshOperationStatus() { + } + + /** + * Creates or finds a MaintenanceReadinessRefreshOperationStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding MaintenanceReadinessRefreshOperationStatus. + */ + public static MaintenanceReadinessRefreshOperationStatus fromString(String name) { + return fromString(name, MaintenanceReadinessRefreshOperationStatus.class); + } + + /** + * Gets known MaintenanceReadinessRefreshOperationStatus values. + * + * @return known MaintenanceReadinessRefreshOperationStatus values. + */ + public static Collection<MaintenanceReadinessRefreshOperationStatus> values() { + return values(MaintenanceReadinessRefreshOperationStatus.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessStatus.java new file mode 100644 index 000000000000..8b2b4c790d19 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessStatus.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines the readiness status of maintenance. + */ +public final class MaintenanceReadinessStatus extends ExpandableStringEnum<MaintenanceReadinessStatus> { + /** + * The system is ready for maintenance. + */ + public static final MaintenanceReadinessStatus READY = fromString("Ready"); + + /** + * The system is not ready for maintenance. + */ + public static final MaintenanceReadinessStatus NOT_READY = fromString("NotReady"); + + /** + * Data is not available to determine readiness. + */ + public static final MaintenanceReadinessStatus DATA_NOT_AVAILABLE = fromString("DataNotAvailable"); + + /** + * Readiness check is not applicable. + */ + public static final MaintenanceReadinessStatus NOT_APPLICABLE = fromString("NotApplicable"); + + /** + * Creates a new instance of MaintenanceReadinessStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MaintenanceReadinessStatus() { + } + + /** + * Creates or finds a MaintenanceReadinessStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding MaintenanceReadinessStatus. + */ + public static MaintenanceReadinessStatus fromString(String name) { + return fromString(name, MaintenanceReadinessStatus.class); + } + + /** + * Gets known MaintenanceReadinessStatus values. + * + * @return known MaintenanceReadinessStatus values. + */ + public static Collection<MaintenanceReadinessStatus> values() { + return values(MaintenanceReadinessStatus.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReschedule.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReschedule.java new file mode 100644 index 000000000000..a63c4cca1d11 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReschedule.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * reschedule a maintenance. + */ +@Fluent +public final class MaintenanceReschedule implements JsonSerializable<MaintenanceReschedule> { + /* + * reschedule time + */ + private OffsetDateTime rescheduleTime; + + /* + * rescheduling reason + */ + private String message; + + /** + * Creates an instance of MaintenanceReschedule class. + */ + public MaintenanceReschedule() { + } + + /** + * Get the rescheduleTime property: reschedule time. + * + * @return the rescheduleTime value. + */ + public OffsetDateTime rescheduleTime() { + return this.rescheduleTime; + } + + /** + * Set the rescheduleTime property: reschedule time. + * + * @param rescheduleTime the rescheduleTime value to set. + * @return the MaintenanceReschedule object itself. + */ + public MaintenanceReschedule withRescheduleTime(OffsetDateTime rescheduleTime) { + this.rescheduleTime = rescheduleTime; + return this; + } + + /** + * Get the message property: rescheduling reason. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: rescheduling reason. + * + * @param message the message value to set. + * @return the MaintenanceReschedule object itself. + */ + public MaintenanceReschedule withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("rescheduleTime", + this.rescheduleTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.rescheduleTime)); + jsonWriter.writeStringField("message", this.message); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceReschedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceReschedule if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MaintenanceReschedule. + */ + public static MaintenanceReschedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceReschedule deserializedMaintenanceReschedule = new MaintenanceReschedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("rescheduleTime".equals(fieldName)) { + deserializedMaintenanceReschedule.rescheduleTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("message".equals(fieldName)) { + deserializedMaintenanceReschedule.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceReschedule; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceSchedule.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceSchedule.java new file mode 100644 index 000000000000..9b615e194f1d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceSchedule.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * schedule a maintenance. + */ +@Fluent +public final class MaintenanceSchedule implements JsonSerializable<MaintenanceSchedule> { + /* + * schedule time + */ + private OffsetDateTime scheduleTime; + + /* + * scheduling message + */ + private String message; + + /** + * Creates an instance of MaintenanceSchedule class. + */ + public MaintenanceSchedule() { + } + + /** + * Get the scheduleTime property: schedule time. + * + * @return the scheduleTime value. + */ + public OffsetDateTime scheduleTime() { + return this.scheduleTime; + } + + /** + * Set the scheduleTime property: schedule time. + * + * @param scheduleTime the scheduleTime value to set. + * @return the MaintenanceSchedule object itself. + */ + public MaintenanceSchedule withScheduleTime(OffsetDateTime scheduleTime) { + this.scheduleTime = scheduleTime; + return this; + } + + /** + * Get the message property: scheduling message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: scheduling message. + * + * @param message the message value to set. + * @return the MaintenanceSchedule object itself. + */ + public MaintenanceSchedule withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("scheduleTime", + this.scheduleTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.scheduleTime)); + jsonWriter.writeStringField("message", this.message); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceSchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceSchedule if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MaintenanceSchedule. + */ + public static MaintenanceSchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceSchedule deserializedMaintenanceSchedule = new MaintenanceSchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scheduleTime".equals(fieldName)) { + deserializedMaintenanceSchedule.scheduleTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("message".equals(fieldName)) { + deserializedMaintenanceSchedule.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceSchedule; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceState.java new file mode 100644 index 000000000000..8ed577a4eb02 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceState.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * state of the maintenance. + */ +@Immutable +public final class MaintenanceState implements JsonSerializable<MaintenanceState> { + /* + * Customer presentable maintenance state + */ + private MaintenanceStateName name; + + /* + * Failure/Success info + */ + private String message; + + /* + * Time when current state started + */ + private OffsetDateTime startedAt; + + /* + * Time when current state ended + */ + private OffsetDateTime endedAt; + + /** + * Creates an instance of MaintenanceState class. + */ + private MaintenanceState() { + } + + /** + * Get the name property: Customer presentable maintenance state. + * + * @return the name value. + */ + public MaintenanceStateName name() { + return this.name; + } + + /** + * Get the message property: Failure/Success info. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Get the startedAt property: Time when current state started. + * + * @return the startedAt value. + */ + public OffsetDateTime startedAt() { + return this.startedAt; + } + + /** + * Get the endedAt property: Time when current state ended. + * + * @return the endedAt value. + */ + public OffsetDateTime endedAt() { + return this.endedAt; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); + jsonWriter.writeStringField("message", this.message); + jsonWriter.writeStringField("startedAt", + this.startedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startedAt)); + jsonWriter.writeStringField("endedAt", + this.endedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endedAt)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceState if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MaintenanceState. + */ + public static MaintenanceState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceState deserializedMaintenanceState = new MaintenanceState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedMaintenanceState.name = MaintenanceStateName.fromString(reader.getString()); + } else if ("message".equals(fieldName)) { + deserializedMaintenanceState.message = reader.getString(); + } else if ("startedAt".equals(fieldName)) { + deserializedMaintenanceState.startedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endedAt".equals(fieldName)) { + deserializedMaintenanceState.endedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceState; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceStateName.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceStateName.java new file mode 100644 index 000000000000..612a9c8c18db --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceStateName.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Customer presentable maintenance state. + */ +public final class MaintenanceStateName extends ExpandableStringEnum<MaintenanceStateName> { + /** + * Maintenance Not Scheduled. + */ + public static final MaintenanceStateName NOT_SCHEDULED = fromString("NotScheduled"); + + /** + * Maintenance Scheduled. + */ + public static final MaintenanceStateName SCHEDULED = fromString("Scheduled"); + + /** + * Maintenance In Progress. + */ + public static final MaintenanceStateName IN_PROGRESS = fromString("InProgress"); + + /** + * Maintenance Succeeded. + */ + public static final MaintenanceStateName SUCCESS = fromString("Success"); + + /** + * Maintenance Failed. + */ + public static final MaintenanceStateName FAILED = fromString("Failed"); + + /** + * Maintenance Cancelled. + */ + public static final MaintenanceStateName CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of MaintenanceStateName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MaintenanceStateName() { + } + + /** + * Creates or finds a MaintenanceStateName from its string representation. + * + * @param name a name to look for. + * @return the corresponding MaintenanceStateName. + */ + public static MaintenanceStateName fromString(String name) { + return fromString(name, MaintenanceStateName.class); + } + + /** + * Gets known MaintenanceStateName values. + * + * @return known MaintenanceStateName values. + */ + public static Collection<MaintenanceStateName> values() { + return values(MaintenanceStateName.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceStatusFilter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceStatusFilter.java new file mode 100644 index 000000000000..cdfad0f93105 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceStatusFilter.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * status filter for the maintenance. + */ +public final class MaintenanceStatusFilter extends ExpandableStringEnum<MaintenanceStatusFilter> { + /** + * is active. + */ + public static final MaintenanceStatusFilter ACTIVE = fromString("Active"); + + /** + * is inactive. + */ + public static final MaintenanceStatusFilter INACTIVE = fromString("Inactive"); + + /** + * Creates a new instance of MaintenanceStatusFilter value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MaintenanceStatusFilter() { + } + + /** + * Creates or finds a MaintenanceStatusFilter from its string representation. + * + * @param name a name to look for. + * @return the corresponding MaintenanceStatusFilter. + */ + public static MaintenanceStatusFilter fromString(String name) { + return fromString(name, MaintenanceStatusFilter.class); + } + + /** + * Gets known MaintenanceStatusFilter values. + * + * @return known MaintenanceStatusFilter values. + */ + public static Collection<MaintenanceStatusFilter> values() { + return values(MaintenanceStatusFilter.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceType.java new file mode 100644 index 000000000000..b3b7c5a44626 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MaintenanceType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * type of the maintenance. + */ +public final class MaintenanceType extends ExpandableStringEnum<MaintenanceType> { + /** + * maintenance for vCenter Server Appliance. + */ + public static final MaintenanceType VCSA = fromString("VCSA"); + + /** + * maintenance for ESXi. + */ + public static final MaintenanceType ESXI = fromString("ESXI"); + + /** + * maintenance for NSX-T. + */ + public static final MaintenanceType NSXT = fromString("NSXT"); + + /** + * Creates a new instance of MaintenanceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MaintenanceType() { + } + + /** + * Creates or finds a MaintenanceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MaintenanceType. + */ + public static MaintenanceType fromString(String name) { + return fromString(name, MaintenanceType.class); + } + + /** + * Gets known MaintenanceType values. + * + * @return known MaintenanceType values. + */ + public static Collection<MaintenanceType> values() { + return values(MaintenanceType.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Maintenances.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Maintenances.java new file mode 100644 index 000000000000..c27222458849 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Maintenances.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import java.time.OffsetDateTime; + +/** + * Resource collection API of Maintenances. + */ +public interface Maintenances { + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<Maintenance> list(String resourceGroupName, String privateCloudName); + + /** + * List Maintenance resources by subscription ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param stateName Filter maintenances based on state. + * @param status Filter active or inactive maintenances. + * @param from date from which result should be returned. ie. scheduledStartTime >= from. + * @param to date till which result should be returned. i.e. scheduledStartTime <= to. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Maintenance list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable<Maintenance> list(String resourceGroupName, String privateCloudName, MaintenanceStateName stateName, + MaintenanceStatusFilter status, OffsetDateTime from, OffsetDateTime to, Context context); + + /** + * Get a Maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Maintenance along with {@link Response}. + */ + Response<Maintenance> getWithResponse(String resourceGroupName, String privateCloudName, String maintenanceName, + Context context); + + /** + * Get a Maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Maintenance. + */ + Maintenance get(String resourceGroupName, String privateCloudName, String maintenanceName); + + /** + * Reschedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response}. + */ + Response<Maintenance> rescheduleWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceReschedule body, Context context); + + /** + * Reschedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource. + */ + Maintenance reschedule(String resourceGroupName, String privateCloudName, String maintenanceName, + MaintenanceReschedule body); + + /** + * Schedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response}. + */ + Response<Maintenance> scheduleWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, MaintenanceSchedule body, Context context); + + /** + * Schedule a maintenance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource. + */ + Maintenance schedule(String resourceGroupName, String privateCloudName, String maintenanceName, + MaintenanceSchedule body); + + /** + * Initiate maintenance readiness checks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource along with {@link Response}. + */ + Response<Maintenance> initiateChecksWithResponse(String resourceGroupName, String privateCloudName, + String maintenanceName, Context context); + + /** + * Initiate maintenance readiness checks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param maintenanceName Name of the maintenance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource. + */ + Maintenance initiateChecks(String resourceGroupName, String privateCloudName, String maintenanceName); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java index e291241d709a..b0e733323159 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java @@ -126,6 +126,14 @@ public ManagementCluster withVsanDatastoreName(String vsanDatastoreName) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java index b988f5411f0e..7565084f5305 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -47,6 +48,20 @@ public NetAppVolume withId(String id) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model NetAppVolume")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NetAppVolume.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java index 32780e251c26..26a189b906e4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java @@ -85,6 +85,14 @@ public String description() { return this.description; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java index b638a41a7d1b..e247a66552c7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -95,6 +96,22 @@ public PSCredentialExecutionParameter withName(String name) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property name in model PSCredentialExecutionParameter")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PSCredentialExecutionParameter.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java index 87fc6f7e372c..f932a1ea692a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java @@ -111,6 +111,14 @@ PlacementPolicyProperties withProvisioningState(PlacementPolicyProvisioningState return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java index a157315aaf92..bc1dbaf142f9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java @@ -153,6 +153,17 @@ public PlacementPolicyUpdate withAzureHybridBenefitType(AzureHybridBenefitType a return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloud.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloud.java index 1488e9c1d826..553f5648bfcd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloud.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloud.java @@ -9,6 +9,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; +import com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner; import java.util.List; import java.util.Map; @@ -242,6 +243,13 @@ public interface PrivateCloud { */ DnsZoneType dnsZoneType(); + /** + * Gets the vcfLicense property: The private cloud license. + * + * @return the vcfLicense value. + */ + VcfLicense vcfLicense(); + /** * Gets the region of the resource. * @@ -344,7 +352,7 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIde DefinitionStages.WithExtendedNetworkBlocks, DefinitionStages.WithCircuit, DefinitionStages.WithNetworkBlock, DefinitionStages.WithVcenterPassword, DefinitionStages.WithNsxtPassword, DefinitionStages.WithSecondaryCircuit, DefinitionStages.WithVirtualNetworkId, - DefinitionStages.WithDnsZoneType { + DefinitionStages.WithDnsZoneType, DefinitionStages.WithVcfLicense { /** * Executes the create request. * @@ -587,6 +595,19 @@ interface WithDnsZoneType { */ WithCreate withDnsZoneType(DnsZoneType dnsZoneType); } + + /** + * The stage of the PrivateCloud definition allowing to specify vcfLicense. + */ + interface WithVcfLicense { + /** + * Specifies the vcfLicense property: The private cloud license. + * + * @param vcfLicense The private cloud license. + * @return the next definition stage. + */ + WithCreate withVcfLicense(VcfLicenseInner vcfLicense); + } } /** @@ -818,4 +839,24 @@ interface WithDnsZoneType { * @return administrative credentials for accessing vCenter and NSX-T. */ AdminCredentials listAdminCredentials(); + + /** + * Get the license for the private cloud. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the license for the private cloud along with {@link Response}. + */ + Response<VcfLicense> getVcfLicenseWithResponse(Context context); + + /** + * Get the license for the private cloud. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the license for the private cloud. + */ + VcfLicense getVcfLicense(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java index 941a71ef6cc3..3e91d9d5b693 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -79,6 +80,20 @@ public PrivateCloudIdentity withType(ResourceIdentityType type) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (type() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property type in model PrivateCloudIdentity")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateCloudIdentity.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProperties.java new file mode 100644 index 000000000000..2a7a2d8932e2 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProperties.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.resourcemanager.avs.fluent.models.PrivateCloudPropertiesInner; +import java.util.List; + +/** + * An immutable client-side representation of PrivateCloudProperties. + */ +public interface PrivateCloudProperties { + /** + * Gets the managementCluster property: The default cluster used for management. + * + * @return the managementCluster value. + */ + ManagementCluster managementCluster(); + + /** + * Gets the internet property: Connectivity to internet is enabled or disabled. + * + * @return the internet value. + */ + InternetEnum internet(); + + /** + * Gets the identitySources property: vCenter Single Sign On Identity Sources. + * + * @return the identitySources value. + */ + List<IdentitySource> identitySources(); + + /** + * Gets the availability property: Properties describing how the cloud is distributed across availability zones. + * + * @return the availability value. + */ + AvailabilityProperties availability(); + + /** + * Gets the encryption property: Customer managed key encryption, can be enabled or disabled. + * + * @return the encryption value. + */ + Encryption encryption(); + + /** + * Gets the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * + * @return the extendedNetworkBlocks value. + */ + List<String> extendedNetworkBlocks(); + + /** + * Gets the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + PrivateCloudProvisioningState provisioningState(); + + /** + * Gets the circuit property: An ExpressRoute Circuit. + * + * @return the circuit value. + */ + Circuit circuit(); + + /** + * Gets the endpoints property: The endpoints. + * + * @return the endpoints value. + */ + Endpoints endpoints(); + + /** + * Gets the networkBlock property: The block of addresses should be unique across VNet in your subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22. + * + * @return the networkBlock value. + */ + String networkBlock(); + + /** + * Gets the managementNetwork property: Network used to access vCenter Server and NSX-T Manager. + * + * @return the managementNetwork value. + */ + String managementNetwork(); + + /** + * Gets the provisioningNetwork property: Used for virtual machine cold migration, cloning, and snapshot migration. + * + * @return the provisioningNetwork value. + */ + String provisioningNetwork(); + + /** + * Gets the vmotionNetwork property: Used for live migration of virtual machines. + * + * @return the vmotionNetwork value. + */ + String vmotionNetwork(); + + /** + * Gets the vcenterPassword property: Optionally, set the vCenter admin password when the private cloud is created. + * + * @return the vcenterPassword value. + */ + String vcenterPassword(); + + /** + * Gets the nsxtPassword property: Optionally, set the NSX-T Manager password when the private cloud is created. + * + * @return the nsxtPassword value. + */ + String nsxtPassword(); + + /** + * Gets the vcenterCertificateThumbprint property: Thumbprint of the vCenter Server SSL certificate. + * + * @return the vcenterCertificateThumbprint value. + */ + String vcenterCertificateThumbprint(); + + /** + * Gets the nsxtCertificateThumbprint property: Thumbprint of the NSX-T Manager SSL certificate. + * + * @return the nsxtCertificateThumbprint value. + */ + String nsxtCertificateThumbprint(); + + /** + * Gets the externalCloudLinks property: Array of cloud link IDs from other clouds that connect to this one. + * + * @return the externalCloudLinks value. + */ + List<String> externalCloudLinks(); + + /** + * Gets the secondaryCircuit property: A secondary expressRoute circuit from a separate AZ. Only present in a + * stretched private cloud. + * + * @return the secondaryCircuit value. + */ + Circuit secondaryCircuit(); + + /** + * Gets the nsxPublicIpQuotaRaised property: Flag to indicate whether the private cloud has the quota for + * provisioned NSX + * Public IP count raised from 64 to 1024. + * + * @return the nsxPublicIpQuotaRaised value. + */ + NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised(); + + /** + * Gets the virtualNetworkId property: Azure resource ID of the virtual network. + * + * @return the virtualNetworkId value. + */ + String virtualNetworkId(); + + /** + * Gets the dnsZoneType property: The type of DNS zone to use. + * + * @return the dnsZoneType value. + */ + DnsZoneType dnsZoneType(); + + /** + * Gets the vcfLicense property: The private cloud license. + * + * @return the vcfLicense value. + */ + VcfLicense vcfLicense(); + + /** + * Gets the inner com.azure.resourcemanager.avs.fluent.models.PrivateCloudPropertiesInner object. + * + * @return the inner object. + */ + PrivateCloudPropertiesInner innerModel(); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java index 0642ce05a859..7c9642789be9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java @@ -283,6 +283,23 @@ public PrivateCloudUpdate withDnsZoneType(DnsZoneType dnsZoneType) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + if (identity() != null) { + identity().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateClouds.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateClouds.java index f0030b9ca740..e32a9c7d0452 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateClouds.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateClouds.java @@ -176,6 +176,31 @@ Response<AdminCredentials> listAdminCredentialsWithResponse(String resourceGroup */ AdminCredentials listAdminCredentials(String resourceGroupName, String privateCloudName); + /** + * Get the license for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the license for the private cloud along with {@link Response}. + */ + Response<VcfLicense> getVcfLicenseWithResponse(String resourceGroupName, String privateCloudName, Context context); + + /** + * Get the license for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the license for the private cloud. + */ + VcfLicense getVcfLicense(String resourceGroupName, String privateCloudName); + /** * Get a PrivateCloud. * diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkProperties.java index 3c098930f416..1bbf70a3612c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkProperties.java @@ -64,6 +64,14 @@ public ProvisionedNetworkTypes networkType() { return this.networkType; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicyProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicyProperties.java index 816180d7b911..109e8d87bc4c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicyProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicyProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -86,6 +87,26 @@ public PureStoragePolicyProvisioningState provisioningState() { return this.provisioningState; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storagePolicyDefinition() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storagePolicyDefinition in model PureStoragePolicyProperties")); + } + if (storagePoolId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storagePoolId in model PureStoragePolicyProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PureStoragePolicyProperties.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStorageVolume.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStorageVolume.java index 95520f962714..a76e05c6b9f9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStorageVolume.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStorageVolume.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -72,6 +73,21 @@ public PureStorageVolume withSizeGb(int sizeGb) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storagePoolId() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property storagePoolId in model PureStorageVolume")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PureStorageVolume.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperation.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperation.java new file mode 100644 index 000000000000..bd4f4d4094e5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperation.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Constraints for rescheduling maintenance. + */ +@Immutable +public final class RescheduleOperation extends MaintenanceManagementOperation { + /* + * The kind of operation + */ + private MaintenanceManagementOperationKind kind = MaintenanceManagementOperationKind.RESCHEDULE; + + /* + * If rescheduling is disabled + */ + private Boolean isDisabled; + + /* + * Reason for reschedule disabled + */ + private String disabledReason; + + /* + * Constraints for rescheduling maintenance + */ + private List<RescheduleOperationConstraint> constraints; + + /** + * Creates an instance of RescheduleOperation class. + */ + private RescheduleOperation() { + } + + /** + * Get the kind property: The kind of operation. + * + * @return the kind value. + */ + @Override + public MaintenanceManagementOperationKind kind() { + return this.kind; + } + + /** + * Get the isDisabled property: If rescheduling is disabled. + * + * @return the isDisabled value. + */ + public Boolean isDisabled() { + return this.isDisabled; + } + + /** + * Get the disabledReason property: Reason for reschedule disabled. + * + * @return the disabledReason value. + */ + public String disabledReason() { + return this.disabledReason; + } + + /** + * Get the constraints property: Constraints for rescheduling maintenance. + * + * @return the constraints value. + */ + public List<RescheduleOperationConstraint> constraints() { + return this.constraints; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (constraints() != null) { + constraints().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RescheduleOperation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RescheduleOperation if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the RescheduleOperation. + */ + public static RescheduleOperation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RescheduleOperation deserializedRescheduleOperation = new RescheduleOperation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedRescheduleOperation.kind + = MaintenanceManagementOperationKind.fromString(reader.getString()); + } else if ("isDisabled".equals(fieldName)) { + deserializedRescheduleOperation.isDisabled = reader.getNullable(JsonReader::getBoolean); + } else if ("disabledReason".equals(fieldName)) { + deserializedRescheduleOperation.disabledReason = reader.getString(); + } else if ("constraints".equals(fieldName)) { + List<RescheduleOperationConstraint> constraints + = reader.readArray(reader1 -> RescheduleOperationConstraint.fromJson(reader1)); + deserializedRescheduleOperation.constraints = constraints; + } else { + reader.skipChildren(); + } + } + + return deserializedRescheduleOperation; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperationConstraint.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperationConstraint.java new file mode 100644 index 000000000000..455984e0dda5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperationConstraint.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Defines constraints for reschedule operation on maintenance. + */ +@Immutable +public class RescheduleOperationConstraint implements JsonSerializable<RescheduleOperationConstraint> { + /* + * The kind of operation + */ + private RescheduleOperationConstraintKind kind + = RescheduleOperationConstraintKind.fromString("RescheduleOperationConstraint"); + + /** + * Creates an instance of RescheduleOperationConstraint class. + */ + protected RescheduleOperationConstraint() { + } + + /** + * Get the kind property: The kind of operation. + * + * @return the kind value. + */ + public RescheduleOperationConstraintKind kind() { + return this.kind; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RescheduleOperationConstraint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RescheduleOperationConstraint if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RescheduleOperationConstraint. + */ + public static RescheduleOperationConstraint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("kind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("AvailableWindowForMaintenance".equals(discriminatorValue)) { + return AvailableWindowForMaintenanceWhileRescheduleOperation.fromJson(readerToUse.reset()); + } else if ("Blocked".equals(discriminatorValue)) { + return BlockedWhileRescheduleOperation.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static RescheduleOperationConstraint fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RescheduleOperationConstraint deserializedRescheduleOperationConstraint + = new RescheduleOperationConstraint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedRescheduleOperationConstraint.kind + = RescheduleOperationConstraintKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRescheduleOperationConstraint; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperationConstraintKind.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperationConstraintKind.java new file mode 100644 index 000000000000..d91c4bf28896 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperationConstraintKind.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Constraints for rescheduling of maintenance. + */ +public final class RescheduleOperationConstraintKind extends ExpandableStringEnum<RescheduleOperationConstraintKind> { + /** + * Time window in which maintenance can be rescheduled. + */ + public static final RescheduleOperationConstraintKind AVAILABLE_WINDOW_FOR_MAINTENANCE_WHILE_RESCHEDULE_OPERATION + = fromString("AvailableWindowForMaintenance"); + + /** + * Blocked time range constraint. + */ + public static final RescheduleOperationConstraintKind BLOCKED_WHILE_RESCHEDULE_OPERATION = fromString("Blocked"); + + /** + * Creates a new instance of RescheduleOperationConstraintKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RescheduleOperationConstraintKind() { + } + + /** + * Creates or finds a RescheduleOperationConstraintKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding RescheduleOperationConstraintKind. + */ + public static RescheduleOperationConstraintKind fromString(String name) { + return fromString(name, RescheduleOperationConstraintKind.class); + } + + /** + * Gets known RescheduleOperationConstraintKind values. + * + * @return known RescheduleOperationConstraintKind values. + */ + public static Collection<RescheduleOperationConstraintKind> values() { + return values(RescheduleOperationConstraintKind.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuCapabilities.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuCapabilities.java index d289823ebca5..7e269a67c6fd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuCapabilities.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuCapabilities.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -50,6 +51,24 @@ public String value() { return this.value; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model ResourceSkuCapabilities")); + } + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ResourceSkuCapabilities")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceSkuCapabilities.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuLocationInfo.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuLocationInfo.java index 9e2783bb0ccc..3fedb0d2af82 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuLocationInfo.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuLocationInfo.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -65,6 +66,32 @@ public List<ResourceSkuZoneDetails> zoneDetails() { return this.zoneDetails; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (location() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property location in model ResourceSkuLocationInfo")); + } + if (zones() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property zones in model ResourceSkuLocationInfo")); + } + if (zoneDetails() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property zoneDetails in model ResourceSkuLocationInfo")); + } else { + zoneDetails().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceSkuLocationInfo.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionInfo.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionInfo.java index 5beb9b358b5b..01297083aa0a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionInfo.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionInfo.java @@ -51,6 +51,14 @@ public List<String> zones() { return this.zones; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictions.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictions.java index 51ccf5d5edca..a896ff96e313 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictions.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictions.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -81,6 +82,27 @@ public ResourceSkuRestrictionsReasonCode reasonCode() { return this.reasonCode; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (values() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property values in model ResourceSkuRestrictions")); + } + if (restrictionInfo() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property restrictionInfo in model ResourceSkuRestrictions")); + } else { + restrictionInfo().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceSkuRestrictions.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuZoneDetails.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuZoneDetails.java index 5a4e283ea137..c284792e6a87 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuZoneDetails.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuZoneDetails.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,6 +53,27 @@ public List<ResourceSkuCapabilities> capabilities() { return this.capabilities; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model ResourceSkuZoneDetails")); + } + if (capabilities() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property capabilities in model ResourceSkuZoneDetails")); + } else { + capabilities().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceSkuZoneDetails.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperation.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperation.java new file mode 100644 index 000000000000..2b7e112422de --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperation.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Scheduling window constraint. + */ +@Immutable +public final class ScheduleOperation extends MaintenanceManagementOperation { + /* + * The kind of operation + */ + private MaintenanceManagementOperationKind kind = MaintenanceManagementOperationKind.SCHEDULE; + + /* + * If scheduling is disabled + */ + private Boolean isDisabled; + + /* + * Reason for schedule disabled + */ + private String disabledReason; + + /* + * Constraints for scheduling maintenance + */ + private List<ScheduleOperationConstraint> constraints; + + /** + * Creates an instance of ScheduleOperation class. + */ + private ScheduleOperation() { + } + + /** + * Get the kind property: The kind of operation. + * + * @return the kind value. + */ + @Override + public MaintenanceManagementOperationKind kind() { + return this.kind; + } + + /** + * Get the isDisabled property: If scheduling is disabled. + * + * @return the isDisabled value. + */ + public Boolean isDisabled() { + return this.isDisabled; + } + + /** + * Get the disabledReason property: Reason for schedule disabled. + * + * @return the disabledReason value. + */ + public String disabledReason() { + return this.disabledReason; + } + + /** + * Get the constraints property: Constraints for scheduling maintenance. + * + * @return the constraints value. + */ + public List<ScheduleOperationConstraint> constraints() { + return this.constraints; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (constraints() != null) { + constraints().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScheduleOperation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScheduleOperation if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ScheduleOperation. + */ + public static ScheduleOperation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScheduleOperation deserializedScheduleOperation = new ScheduleOperation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedScheduleOperation.kind + = MaintenanceManagementOperationKind.fromString(reader.getString()); + } else if ("isDisabled".equals(fieldName)) { + deserializedScheduleOperation.isDisabled = reader.getNullable(JsonReader::getBoolean); + } else if ("disabledReason".equals(fieldName)) { + deserializedScheduleOperation.disabledReason = reader.getString(); + } else if ("constraints".equals(fieldName)) { + List<ScheduleOperationConstraint> constraints + = reader.readArray(reader1 -> ScheduleOperationConstraint.fromJson(reader1)); + deserializedScheduleOperation.constraints = constraints; + } else { + reader.skipChildren(); + } + } + + return deserializedScheduleOperation; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperationConstraint.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperationConstraint.java new file mode 100644 index 000000000000..7cbba320008d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperationConstraint.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Defines constraints for schedule operation on maintenance. + */ +@Immutable +public class ScheduleOperationConstraint implements JsonSerializable<ScheduleOperationConstraint> { + /* + * The kind of operation + */ + private ScheduleOperationConstraintKind kind + = ScheduleOperationConstraintKind.fromString("ScheduleOperationConstraint"); + + /** + * Creates an instance of ScheduleOperationConstraint class. + */ + protected ScheduleOperationConstraint() { + } + + /** + * Get the kind property: The kind of operation. + * + * @return the kind value. + */ + public ScheduleOperationConstraintKind kind() { + return this.kind; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScheduleOperationConstraint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScheduleOperationConstraint if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ScheduleOperationConstraint. + */ + public static ScheduleOperationConstraint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("kind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("SchedulingWindow".equals(discriminatorValue)) { + return SchedulingWindow.fromJson(readerToUse.reset()); + } else if ("AvailableWindowForMaintenance".equals(discriminatorValue)) { + return AvailableWindowForMaintenanceWhileScheduleOperation.fromJson(readerToUse.reset()); + } else if ("Blocked".equals(discriminatorValue)) { + return BlockedWhileScheduleOperation.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static ScheduleOperationConstraint fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScheduleOperationConstraint deserializedScheduleOperationConstraint = new ScheduleOperationConstraint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedScheduleOperationConstraint.kind + = ScheduleOperationConstraintKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedScheduleOperationConstraint; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperationConstraintKind.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperationConstraintKind.java new file mode 100644 index 000000000000..1d94487bf699 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperationConstraintKind.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Constraints for scheduling of maintenance. + */ +public final class ScheduleOperationConstraintKind extends ExpandableStringEnum<ScheduleOperationConstraintKind> { + /** + * Time window in which Customer has option to schedule maintenance. + */ + public static final ScheduleOperationConstraintKind SCHEDULING_WINDOW = fromString("SchedulingWindow"); + + /** + * Time window in which maintenance can be scheduled. + */ + public static final ScheduleOperationConstraintKind AVAILABLE_WINDOW_FOR_MAINTENANCE_WHILE_SCHEDULE_OPERATION + = fromString("AvailableWindowForMaintenance"); + + /** + * Blocked time range constraint. + */ + public static final ScheduleOperationConstraintKind BLOCKED_WHILE_SCHEDULE_OPERATION = fromString("Blocked"); + + /** + * Creates a new instance of ScheduleOperationConstraintKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScheduleOperationConstraintKind() { + } + + /** + * Creates or finds a ScheduleOperationConstraintKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScheduleOperationConstraintKind. + */ + public static ScheduleOperationConstraintKind fromString(String name) { + return fromString(name, ScheduleOperationConstraintKind.class); + } + + /** + * Gets known ScheduleOperationConstraintKind values. + * + * @return known ScheduleOperationConstraintKind values. + */ + public static Collection<ScheduleOperationConstraintKind> values() { + return values(ScheduleOperationConstraintKind.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SchedulingWindow.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SchedulingWindow.java new file mode 100644 index 000000000000..b6735a264588 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SchedulingWindow.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Time window in which Customer has option to schedule maintenance. + */ +@Immutable +public final class SchedulingWindow extends ScheduleOperationConstraint { + /* + * The kind of operation + */ + private ScheduleOperationConstraintKind kind = ScheduleOperationConstraintKind.SCHEDULING_WINDOW; + + /* + * Start date time + */ + private OffsetDateTime startsAt; + + /* + * End date Time + */ + private OffsetDateTime endsAt; + + /** + * Creates an instance of SchedulingWindow class. + */ + private SchedulingWindow() { + } + + /** + * Get the kind property: The kind of operation. + * + * @return the kind value. + */ + @Override + public ScheduleOperationConstraintKind kind() { + return this.kind; + } + + /** + * Get the startsAt property: Start date time. + * + * @return the startsAt value. + */ + public OffsetDateTime startsAt() { + return this.startsAt; + } + + /** + * Get the endsAt property: End date Time. + * + * @return the endsAt value. + */ + public OffsetDateTime endsAt() { + return this.endsAt; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SchedulingWindow from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SchedulingWindow if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SchedulingWindow. + */ + public static SchedulingWindow fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SchedulingWindow deserializedSchedulingWindow = new SchedulingWindow(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("startsAt".equals(fieldName)) { + deserializedSchedulingWindow.startsAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endsAt".equals(fieldName)) { + deserializedSchedulingWindow.endsAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("kind".equals(fieldName)) { + deserializedSchedulingWindow.kind = ScheduleOperationConstraintKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSchedulingWindow; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java index 0d2df6b454de..2767375ab487 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -61,6 +62,20 @@ public ScriptExecutionParameter withName(String name) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model ScriptExecutionParameter")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionParameter.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java index 69008349fa70..cce96969e8c8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java @@ -96,6 +96,14 @@ public OptionalParamEnum optional() { return this.optional; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java index 7269de8074c7..107e3af02698 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -70,6 +71,22 @@ public ScriptSecureStringExecutionParameter withName(String name) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property name in model ScriptSecureStringExecutionParameter")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptSecureStringExecutionParameter.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java index 3367ba2ad651..ff4a7444e24f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -70,6 +71,22 @@ public ScriptStringExecutionParameter withName(String name) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property name in model ScriptStringExecutionParameter")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptStringExecutionParameter.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Sku.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Sku.java index faa0865ade80..f06fe022b873 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Sku.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Sku.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -158,6 +159,19 @@ public Sku withCapacity(Integer capacity) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Sku")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(Sku.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SpecializedHostProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SpecializedHostProperties.java index 9ae1eda7c3e0..cba5a005bab9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SpecializedHostProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SpecializedHostProperties.java @@ -36,6 +36,15 @@ public HostKind kind() { return this.kind; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Vcf5License.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Vcf5License.java new file mode 100644 index 000000000000..2b26639694fa --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Vcf5License.java @@ -0,0 +1,287 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * A VMware Cloud Foundation (VCF) 5.0 license. + */ +@Fluent +public final class Vcf5License extends VcfLicenseInner { + /* + * License kind + */ + private VcfLicenseKind kind = VcfLicenseKind.VCF5; + + /* + * License key + */ + private String licenseKey; + + /* + * Number of cores included in the license + */ + private int cores; + + /* + * UTC datetime when the license expires + */ + private OffsetDateTime endDate; + + /* + * The Broadcom site ID associated with the license. + */ + private String broadcomSiteId; + + /* + * The Broadcom contract number associated with the license. + */ + private String broadcomContractNumber; + + /* + * Additional labels passed through for license reporting. + */ + private List<Label> labels; + + /* + * The state of the license provisioning + */ + private LicenseProvisioningState provisioningState; + + /** + * Creates an instance of Vcf5License class. + */ + public Vcf5License() { + } + + /** + * Get the kind property: License kind. + * + * @return the kind value. + */ + @Override + public VcfLicenseKind kind() { + return this.kind; + } + + /** + * Get the licenseKey property: License key. + * + * @return the licenseKey value. + */ + public String licenseKey() { + return this.licenseKey; + } + + /** + * Set the licenseKey property: License key. + * + * @param licenseKey the licenseKey value to set. + * @return the Vcf5License object itself. + */ + public Vcf5License withLicenseKey(String licenseKey) { + this.licenseKey = licenseKey; + return this; + } + + /** + * Get the cores property: Number of cores included in the license. + * + * @return the cores value. + */ + public int cores() { + return this.cores; + } + + /** + * Set the cores property: Number of cores included in the license. + * + * @param cores the cores value to set. + * @return the Vcf5License object itself. + */ + public Vcf5License withCores(int cores) { + this.cores = cores; + return this; + } + + /** + * Get the endDate property: UTC datetime when the license expires. + * + * @return the endDate value. + */ + public OffsetDateTime endDate() { + return this.endDate; + } + + /** + * Set the endDate property: UTC datetime when the license expires. + * + * @param endDate the endDate value to set. + * @return the Vcf5License object itself. + */ + public Vcf5License withEndDate(OffsetDateTime endDate) { + this.endDate = endDate; + return this; + } + + /** + * Get the broadcomSiteId property: The Broadcom site ID associated with the license. + * + * @return the broadcomSiteId value. + */ + public String broadcomSiteId() { + return this.broadcomSiteId; + } + + /** + * Set the broadcomSiteId property: The Broadcom site ID associated with the license. + * + * @param broadcomSiteId the broadcomSiteId value to set. + * @return the Vcf5License object itself. + */ + public Vcf5License withBroadcomSiteId(String broadcomSiteId) { + this.broadcomSiteId = broadcomSiteId; + return this; + } + + /** + * Get the broadcomContractNumber property: The Broadcom contract number associated with the license. + * + * @return the broadcomContractNumber value. + */ + public String broadcomContractNumber() { + return this.broadcomContractNumber; + } + + /** + * Set the broadcomContractNumber property: The Broadcom contract number associated with the license. + * + * @param broadcomContractNumber the broadcomContractNumber value to set. + * @return the Vcf5License object itself. + */ + public Vcf5License withBroadcomContractNumber(String broadcomContractNumber) { + this.broadcomContractNumber = broadcomContractNumber; + return this; + } + + /** + * Get the labels property: Additional labels passed through for license reporting. + * + * @return the labels value. + */ + public List<Label> labels() { + return this.labels; + } + + /** + * Set the labels property: Additional labels passed through for license reporting. + * + * @param labels the labels value to set. + * @return the Vcf5License object itself. + */ + public Vcf5License withLabels(List<Label> labels) { + this.labels = labels; + return this; + } + + /** + * Get the provisioningState property: The state of the license provisioning. + * + * @return the provisioningState value. + */ + @Override + public LicenseProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (endDate() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property endDate in model Vcf5License")); + } + if (labels() != null) { + labels().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(Vcf5License.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("cores", this.cores); + jsonWriter.writeStringField("endDate", + this.endDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endDate)); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + jsonWriter.writeStringField("licenseKey", this.licenseKey); + jsonWriter.writeStringField("broadcomSiteId", this.broadcomSiteId); + jsonWriter.writeStringField("broadcomContractNumber", this.broadcomContractNumber); + jsonWriter.writeArrayField("labels", this.labels, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Vcf5License from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Vcf5License if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the Vcf5License. + */ + public static Vcf5License fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Vcf5License deserializedVcf5License = new Vcf5License(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedVcf5License.provisioningState = LicenseProvisioningState.fromString(reader.getString()); + } else if ("cores".equals(fieldName)) { + deserializedVcf5License.cores = reader.getInt(); + } else if ("endDate".equals(fieldName)) { + deserializedVcf5License.endDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("kind".equals(fieldName)) { + deserializedVcf5License.kind = VcfLicenseKind.fromString(reader.getString()); + } else if ("licenseKey".equals(fieldName)) { + deserializedVcf5License.licenseKey = reader.getString(); + } else if ("broadcomSiteId".equals(fieldName)) { + deserializedVcf5License.broadcomSiteId = reader.getString(); + } else if ("broadcomContractNumber".equals(fieldName)) { + deserializedVcf5License.broadcomContractNumber = reader.getString(); + } else if ("labels".equals(fieldName)) { + List<Label> labels = reader.readArray(reader1 -> Label.fromJson(reader1)); + deserializedVcf5License.labels = labels; + } else { + reader.skipChildren(); + } + } + + return deserializedVcf5License; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VcfLicense.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VcfLicense.java new file mode 100644 index 000000000000..9a92034c4eb5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VcfLicense.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner; + +/** + * An immutable client-side representation of VcfLicense. + */ +public interface VcfLicense { + /** + * Gets the kind property: License kind. + * + * @return the kind value. + */ + VcfLicenseKind kind(); + + /** + * Gets the provisioningState property: The state of the license provisioning. + * + * @return the provisioningState value. + */ + LicenseProvisioningState provisioningState(); + + /** + * Gets the inner com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner object. + * + * @return the inner object. + */ + VcfLicenseInner innerModel(); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VcfLicenseKind.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VcfLicenseKind.java new file mode 100644 index 000000000000..967db13c8250 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VcfLicenseKind.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The kind of license. + */ +public final class VcfLicenseKind extends ExpandableStringEnum<VcfLicenseKind> { + /** + * A VMware Cloud Foundation (VCF) 5.0 license. + */ + public static final VcfLicenseKind VCF5 = fromString("vcf5"); + + /** + * Creates a new instance of VcfLicenseKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VcfLicenseKind() { + } + + /** + * Creates or finds a VcfLicenseKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding VcfLicenseKind. + */ + public static VcfLicenseKind fromString(String name) { + return fromString(name, VcfLicenseKind.class); + } + + /** + * Gets known VcfLicenseKind values. + * + * @return known VcfLicenseKind values. + */ + public static Collection<VcfLicenseKind> values() { + return values(VcfLicenseKind.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java index a77245b7a5d4..705cde62c1b7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java @@ -47,6 +47,14 @@ public VirtualMachineRestrictMovement withRestrictMovement(VirtualMachineRestric return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmHostPlacementPolicyProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmHostPlacementPolicyProperties.java index 914a1c5dce38..7058b9a573c6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmHostPlacementPolicyProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmHostPlacementPolicyProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -180,6 +181,32 @@ public VmHostPlacementPolicyProperties withDisplayName(String displayName) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (vmMembers() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property vmMembers in model VmHostPlacementPolicyProperties")); + } + if (hostMembers() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property hostMembers in model VmHostPlacementPolicyProperties")); + } + if (affinityType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property affinityType in model VmHostPlacementPolicyProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VmHostPlacementPolicyProperties.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmPlacementPolicyProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmPlacementPolicyProperties.java index 0b111e78d298..deede05446e8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmPlacementPolicyProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmPlacementPolicyProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -105,6 +106,27 @@ public VmPlacementPolicyProperties withDisplayName(String displayName) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (vmMembers() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property vmMembers in model VmPlacementPolicyProperties")); + } + if (affinityType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property affinityType in model VmPlacementPolicyProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VmPlacementPolicyProperties.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmwareFirewallLicenseProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmwareFirewallLicenseProperties.java new file mode 100644 index 000000000000..09cc670747d3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmwareFirewallLicenseProperties.java @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The properties of a VMware Firewall license. + */ +@Fluent +public final class VmwareFirewallLicenseProperties extends LicensePropertiesInner { + /* + * License kind + */ + private LicenseKind kind = LicenseKind.VMWARE_FIREWALL; + + /* + * License key + */ + private String licenseKey; + + /* + * Number of cores included in the license, measured per hour + */ + private int cores; + + /* + * UTC datetime when the license expires + */ + private OffsetDateTime endDate; + + /* + * The Broadcom site ID associated with the license. + */ + private String broadcomSiteId; + + /* + * The Broadcom contract number associated with the license. + */ + private String broadcomContractNumber; + + /* + * Additional labels passed through for license reporting. + */ + private List<Label> labels; + + /* + * The state of the license provisioning + */ + private LicenseProvisioningState provisioningState; + + /** + * Creates an instance of VmwareFirewallLicenseProperties class. + */ + public VmwareFirewallLicenseProperties() { + } + + /** + * Get the kind property: License kind. + * + * @return the kind value. + */ + @Override + public LicenseKind kind() { + return this.kind; + } + + /** + * Get the licenseKey property: License key. + * + * @return the licenseKey value. + */ + public String licenseKey() { + return this.licenseKey; + } + + /** + * Set the licenseKey property: License key. + * + * @param licenseKey the licenseKey value to set. + * @return the VmwareFirewallLicenseProperties object itself. + */ + public VmwareFirewallLicenseProperties withLicenseKey(String licenseKey) { + this.licenseKey = licenseKey; + return this; + } + + /** + * Get the cores property: Number of cores included in the license, measured per hour. + * + * @return the cores value. + */ + public int cores() { + return this.cores; + } + + /** + * Set the cores property: Number of cores included in the license, measured per hour. + * + * @param cores the cores value to set. + * @return the VmwareFirewallLicenseProperties object itself. + */ + public VmwareFirewallLicenseProperties withCores(int cores) { + this.cores = cores; + return this; + } + + /** + * Get the endDate property: UTC datetime when the license expires. + * + * @return the endDate value. + */ + public OffsetDateTime endDate() { + return this.endDate; + } + + /** + * Set the endDate property: UTC datetime when the license expires. + * + * @param endDate the endDate value to set. + * @return the VmwareFirewallLicenseProperties object itself. + */ + public VmwareFirewallLicenseProperties withEndDate(OffsetDateTime endDate) { + this.endDate = endDate; + return this; + } + + /** + * Get the broadcomSiteId property: The Broadcom site ID associated with the license. + * + * @return the broadcomSiteId value. + */ + public String broadcomSiteId() { + return this.broadcomSiteId; + } + + /** + * Set the broadcomSiteId property: The Broadcom site ID associated with the license. + * + * @param broadcomSiteId the broadcomSiteId value to set. + * @return the VmwareFirewallLicenseProperties object itself. + */ + public VmwareFirewallLicenseProperties withBroadcomSiteId(String broadcomSiteId) { + this.broadcomSiteId = broadcomSiteId; + return this; + } + + /** + * Get the broadcomContractNumber property: The Broadcom contract number associated with the license. + * + * @return the broadcomContractNumber value. + */ + public String broadcomContractNumber() { + return this.broadcomContractNumber; + } + + /** + * Set the broadcomContractNumber property: The Broadcom contract number associated with the license. + * + * @param broadcomContractNumber the broadcomContractNumber value to set. + * @return the VmwareFirewallLicenseProperties object itself. + */ + public VmwareFirewallLicenseProperties withBroadcomContractNumber(String broadcomContractNumber) { + this.broadcomContractNumber = broadcomContractNumber; + return this; + } + + /** + * Get the labels property: Additional labels passed through for license reporting. + * + * @return the labels value. + */ + public List<Label> labels() { + return this.labels; + } + + /** + * Set the labels property: Additional labels passed through for license reporting. + * + * @param labels the labels value to set. + * @return the VmwareFirewallLicenseProperties object itself. + */ + public VmwareFirewallLicenseProperties withLabels(List<Label> labels) { + this.labels = labels; + return this; + } + + /** + * Get the provisioningState property: The state of the license provisioning. + * + * @return the provisioningState value. + */ + @Override + public LicenseProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (endDate() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property endDate in model VmwareFirewallLicenseProperties")); + } + if (labels() != null) { + labels().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VmwareFirewallLicenseProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("cores", this.cores); + jsonWriter.writeStringField("endDate", + this.endDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endDate)); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + jsonWriter.writeStringField("licenseKey", this.licenseKey); + jsonWriter.writeStringField("broadcomSiteId", this.broadcomSiteId); + jsonWriter.writeStringField("broadcomContractNumber", this.broadcomContractNumber); + jsonWriter.writeArrayField("labels", this.labels, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VmwareFirewallLicenseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VmwareFirewallLicenseProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VmwareFirewallLicenseProperties. + */ + public static VmwareFirewallLicenseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VmwareFirewallLicenseProperties deserializedVmwareFirewallLicenseProperties + = new VmwareFirewallLicenseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedVmwareFirewallLicenseProperties.provisioningState + = LicenseProvisioningState.fromString(reader.getString()); + } else if ("cores".equals(fieldName)) { + deserializedVmwareFirewallLicenseProperties.cores = reader.getInt(); + } else if ("endDate".equals(fieldName)) { + deserializedVmwareFirewallLicenseProperties.endDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("kind".equals(fieldName)) { + deserializedVmwareFirewallLicenseProperties.kind = LicenseKind.fromString(reader.getString()); + } else if ("licenseKey".equals(fieldName)) { + deserializedVmwareFirewallLicenseProperties.licenseKey = reader.getString(); + } else if ("broadcomSiteId".equals(fieldName)) { + deserializedVmwareFirewallLicenseProperties.broadcomSiteId = reader.getString(); + } else if ("broadcomContractNumber".equals(fieldName)) { + deserializedVmwareFirewallLicenseProperties.broadcomContractNumber = reader.getString(); + } else if ("labels".equals(fieldName)) { + List<Label> labels = reader.readArray(reader1 -> Label.fromJson(reader1)); + deserializedVmwareFirewallLicenseProperties.labels = labels; + } else { + reader.skipChildren(); + } + } + + return deserializedVmwareFirewallLicenseProperties; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java index 35334ec239a2..eb71f9e61f71 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java @@ -138,6 +138,14 @@ public WorkloadNetworkDhcpEntity withRevision(Long revision) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpRelay.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpRelay.java index 842085a31ee0..d17612f8494f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpRelay.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpRelay.java @@ -80,6 +80,15 @@ public WorkloadNetworkDhcpRelay withRevision(Long revision) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpServer.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpServer.java index 390715faa534..042c905dad94 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpServer.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpServer.java @@ -105,6 +105,15 @@ public WorkloadNetworkDhcpServer withRevision(Long revision) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java index f52e4e5e30a7..32c5a4e85f31 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java @@ -36,6 +36,14 @@ public String portName() { return this.portName; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java index 266c55f8eff8..a4a5a4234f92 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java @@ -73,6 +73,14 @@ public WorkloadNetworkSegmentSubnet withGatewayAddress(String gatewayAddress) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/azure-resourcemanager-avs_apiview_properties.json b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/azure-resourcemanager-avs_apiview_properties.json index 5e21cbc06e5f..d9f6e8b4425f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/azure-resourcemanager-avs_apiview_properties.json +++ b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/azure-resourcemanager-avs_apiview_properties.json @@ -74,11 +74,31 @@ "com.azure.resourcemanager.avs.fluent.IscsiPathsClient.get": "Microsoft.AVS.IscsiPaths.get", "com.azure.resourcemanager.avs.fluent.IscsiPathsClient.getWithResponse": "Microsoft.AVS.IscsiPaths.get", "com.azure.resourcemanager.avs.fluent.IscsiPathsClient.listByPrivateCloud": "Microsoft.AVS.IscsiPaths.listByPrivateCloud", + "com.azure.resourcemanager.avs.fluent.LicensesClient": "Microsoft.AVS.Licenses", + "com.azure.resourcemanager.avs.fluent.LicensesClient.beginCreateOrUpdate": "Microsoft.AVS.Licenses.createOrUpdate", + "com.azure.resourcemanager.avs.fluent.LicensesClient.beginDelete": "Microsoft.AVS.Licenses.delete", + "com.azure.resourcemanager.avs.fluent.LicensesClient.createOrUpdate": "Microsoft.AVS.Licenses.createOrUpdate", + "com.azure.resourcemanager.avs.fluent.LicensesClient.delete": "Microsoft.AVS.Licenses.delete", + "com.azure.resourcemanager.avs.fluent.LicensesClient.get": "Microsoft.AVS.Licenses.get", + "com.azure.resourcemanager.avs.fluent.LicensesClient.getProperties": "Microsoft.AVS.Licenses.getProperties", + "com.azure.resourcemanager.avs.fluent.LicensesClient.getPropertiesWithResponse": "Microsoft.AVS.Licenses.getProperties", + "com.azure.resourcemanager.avs.fluent.LicensesClient.getWithResponse": "Microsoft.AVS.Licenses.get", + "com.azure.resourcemanager.avs.fluent.LicensesClient.list": "Microsoft.AVS.Licenses.list", "com.azure.resourcemanager.avs.fluent.LocationsClient": "Microsoft.AVS.Locations", "com.azure.resourcemanager.avs.fluent.LocationsClient.checkQuotaAvailability": "Microsoft.AVS.Locations.checkQuotaAvailability", "com.azure.resourcemanager.avs.fluent.LocationsClient.checkQuotaAvailabilityWithResponse": "Microsoft.AVS.Locations.checkQuotaAvailability", "com.azure.resourcemanager.avs.fluent.LocationsClient.checkTrialAvailability": "Microsoft.AVS.Locations.checkTrialAvailability", "com.azure.resourcemanager.avs.fluent.LocationsClient.checkTrialAvailabilityWithResponse": "Microsoft.AVS.Locations.checkTrialAvailability", + "com.azure.resourcemanager.avs.fluent.MaintenancesClient": "Microsoft.AVS.Maintenances", + "com.azure.resourcemanager.avs.fluent.MaintenancesClient.get": "Microsoft.AVS.Maintenances.get", + "com.azure.resourcemanager.avs.fluent.MaintenancesClient.getWithResponse": "Microsoft.AVS.Maintenances.get", + "com.azure.resourcemanager.avs.fluent.MaintenancesClient.initiateChecks": "Microsoft.AVS.Maintenances.initiateChecks", + "com.azure.resourcemanager.avs.fluent.MaintenancesClient.initiateChecksWithResponse": "Microsoft.AVS.Maintenances.initiateChecks", + "com.azure.resourcemanager.avs.fluent.MaintenancesClient.list": "Microsoft.AVS.Maintenances.list", + "com.azure.resourcemanager.avs.fluent.MaintenancesClient.reschedule": "Microsoft.AVS.Maintenances.reschedule", + "com.azure.resourcemanager.avs.fluent.MaintenancesClient.rescheduleWithResponse": "Microsoft.AVS.Maintenances.reschedule", + "com.azure.resourcemanager.avs.fluent.MaintenancesClient.schedule": "Microsoft.AVS.Maintenances.schedule", + "com.azure.resourcemanager.avs.fluent.MaintenancesClient.scheduleWithResponse": "Microsoft.AVS.Maintenances.schedule", "com.azure.resourcemanager.avs.fluent.OperationsClient": "Microsoft.AVS.Operations", "com.azure.resourcemanager.avs.fluent.OperationsClient.list": "Azure.ResourceManager.Operations.list", "com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient": "Microsoft.AVS.PlacementPolicies", @@ -101,6 +121,8 @@ "com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.delete": "Microsoft.AVS.PrivateClouds.delete", "com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.getByResourceGroup": "Microsoft.AVS.PrivateClouds.get", "com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.getByResourceGroupWithResponse": "Microsoft.AVS.PrivateClouds.get", + "com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.getVcfLicense": "Microsoft.AVS.PrivateClouds.getVcfLicense", + "com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.getVcfLicenseWithResponse": "Microsoft.AVS.PrivateClouds.getVcfLicense", "com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.list": "Microsoft.AVS.PrivateClouds.listInSubscription", "com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.listAdminCredentials": "Microsoft.AVS.PrivateClouds.listAdminCredentials", "com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.listAdminCredentialsWithResponse": "Microsoft.AVS.PrivateClouds.listAdminCredentials", @@ -236,11 +258,14 @@ "com.azure.resourcemanager.avs.fluent.models.HostModelInner": "Microsoft.AVS.Host", "com.azure.resourcemanager.avs.fluent.models.IscsiPathInner": "Microsoft.AVS.IscsiPath", "com.azure.resourcemanager.avs.fluent.models.IscsiPathProperties": "Microsoft.AVS.IscsiPathProperties", + "com.azure.resourcemanager.avs.fluent.models.LicenseInner": "Microsoft.AVS.License", + "com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner": "Microsoft.AVS.LicenseProperties", + "com.azure.resourcemanager.avs.fluent.models.MaintenanceInner": "Microsoft.AVS.Maintenance", "com.azure.resourcemanager.avs.fluent.models.OperationInner": "Azure.ResourceManager.CommonTypes.Operation", "com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner": "Microsoft.AVS.PlacementPolicy", "com.azure.resourcemanager.avs.fluent.models.PlacementPolicyUpdateProperties": "Microsoft.AVS.PlacementPolicyUpdateProperties", "com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner": "Microsoft.AVS.PrivateCloud", - "com.azure.resourcemanager.avs.fluent.models.PrivateCloudProperties": "Microsoft.AVS.PrivateCloudProperties", + "com.azure.resourcemanager.avs.fluent.models.PrivateCloudPropertiesInner": "Microsoft.AVS.PrivateCloudProperties", "com.azure.resourcemanager.avs.fluent.models.PrivateCloudUpdateProperties": "Microsoft.AVS.PrivateCloudUpdateProperties", "com.azure.resourcemanager.avs.fluent.models.ProvisionedNetworkInner": "Microsoft.AVS.ProvisionedNetwork", "com.azure.resourcemanager.avs.fluent.models.PureStoragePolicyInner": "Microsoft.AVS.PureStoragePolicy", @@ -253,6 +278,7 @@ "com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner": "Microsoft.AVS.ScriptPackage", "com.azure.resourcemanager.avs.fluent.models.ScriptPackageProperties": "Microsoft.AVS.ScriptPackageProperties", "com.azure.resourcemanager.avs.fluent.models.TrialInner": "Microsoft.AVS.Trial", + "com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner": "Microsoft.AVS.VcfLicense", "com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner": "Microsoft.AVS.VirtualMachine", "com.azure.resourcemanager.avs.fluent.models.VirtualMachineProperties": "Microsoft.AVS.VirtualMachineProperties", "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner": "Microsoft.AVS.WorkloadNetworkDhcp", @@ -284,6 +310,8 @@ "com.azure.resourcemanager.avs.implementation.models.HcxEnterpriseSiteList": "Microsoft.AVS.ResourceList", "com.azure.resourcemanager.avs.implementation.models.HostListResult": "Azure.ResourceManager.ResourceListResult", "com.azure.resourcemanager.avs.implementation.models.IscsiPathListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.avs.implementation.models.LicenseListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.avs.implementation.models.MaintenanceListResult": "Azure.ResourceManager.ResourceListResult", "com.azure.resourcemanager.avs.implementation.models.OperationListResult": "Azure.ResourceManager.CommonTypes.OperationListResult", "com.azure.resourcemanager.avs.implementation.models.PagedResourceSku": "Microsoft.AVS.PagedResourceSku", "com.azure.resourcemanager.avs.implementation.models.PlacementPoliciesList": "Microsoft.AVS.ResourceList", @@ -316,7 +344,13 @@ "com.azure.resourcemanager.avs.models.AffinityType": "Microsoft.AVS.AffinityType", "com.azure.resourcemanager.avs.models.AvailabilityProperties": "Microsoft.AVS.AvailabilityProperties", "com.azure.resourcemanager.avs.models.AvailabilityStrategy": "Microsoft.AVS.AvailabilityStrategy", + "com.azure.resourcemanager.avs.models.AvailableWindowForMaintenanceWhileRescheduleOperation": "Microsoft.AVS.AvailableWindowForMaintenanceWhileRescheduleOperation", + "com.azure.resourcemanager.avs.models.AvailableWindowForMaintenanceWhileScheduleOperation": "Microsoft.AVS.AvailableWindowForMaintenanceWhileScheduleOperation", "com.azure.resourcemanager.avs.models.AzureHybridBenefitType": "Microsoft.AVS.AzureHybridBenefitType", + "com.azure.resourcemanager.avs.models.BlockedDatesConstraintCategory": "Microsoft.AVS.BlockedDatesConstraintCategory", + "com.azure.resourcemanager.avs.models.BlockedDatesConstraintTimeRange": "Microsoft.AVS.BlockedDatesConstraintTimeRange", + "com.azure.resourcemanager.avs.models.BlockedWhileRescheduleOperation": "Microsoft.AVS.BlockedWhileRescheduleOperation", + "com.azure.resourcemanager.avs.models.BlockedWhileScheduleOperation": "Microsoft.AVS.BlockedWhileScheduleOperation", "com.azure.resourcemanager.avs.models.Circuit": "Microsoft.AVS.Circuit", "com.azure.resourcemanager.avs.models.CloudLinkProvisioningState": "Microsoft.AVS.CloudLinkProvisioningState", "com.azure.resourcemanager.avs.models.CloudLinkStatus": "Microsoft.AVS.CloudLinkStatus", @@ -348,8 +382,30 @@ "com.azure.resourcemanager.avs.models.HostProperties": "Microsoft.AVS.HostProperties", "com.azure.resourcemanager.avs.models.HostProvisioningState": "Microsoft.AVS.HostProvisioningState", "com.azure.resourcemanager.avs.models.IdentitySource": "Microsoft.AVS.IdentitySource", + "com.azure.resourcemanager.avs.models.ImpactedMaintenanceResource": "Microsoft.AVS.ImpactedMaintenanceResource", + "com.azure.resourcemanager.avs.models.ImpactedMaintenanceResourceError": "Microsoft.AVS.ImpactedMaintenanceResourceError", "com.azure.resourcemanager.avs.models.InternetEnum": "Microsoft.AVS.InternetEnum", "com.azure.resourcemanager.avs.models.IscsiPathProvisioningState": "Microsoft.AVS.IscsiPathProvisioningState", + "com.azure.resourcemanager.avs.models.Label": "Microsoft.AVS.Label", + "com.azure.resourcemanager.avs.models.LicenseKind": "Microsoft.AVS.LicenseKind", + "com.azure.resourcemanager.avs.models.LicenseName": "Microsoft.AVS.LicenseName", + "com.azure.resourcemanager.avs.models.LicenseProvisioningState": "Microsoft.AVS.LicenseProvisioningState", + "com.azure.resourcemanager.avs.models.MaintenanceCheckType": "Microsoft.AVS.MaintenanceCheckType", + "com.azure.resourcemanager.avs.models.MaintenanceFailedCheck": "Microsoft.AVS.MaintenanceFailedCheck", + "com.azure.resourcemanager.avs.models.MaintenanceManagementOperation": "Microsoft.AVS.MaintenanceManagementOperation", + "com.azure.resourcemanager.avs.models.MaintenanceManagementOperationKind": "Microsoft.AVS.MaintenanceManagementOperationKind", + "com.azure.resourcemanager.avs.models.MaintenanceProperties": "Microsoft.AVS.MaintenanceProperties", + "com.azure.resourcemanager.avs.models.MaintenanceProvisioningState": "Microsoft.AVS.MaintenanceProvisioningState", + "com.azure.resourcemanager.avs.models.MaintenanceReadiness": "Microsoft.AVS.MaintenanceReadiness", + "com.azure.resourcemanager.avs.models.MaintenanceReadinessRefreshOperation": "Microsoft.AVS.MaintenanceReadinessRefreshOperation", + "com.azure.resourcemanager.avs.models.MaintenanceReadinessRefreshOperationStatus": "Microsoft.AVS.MaintenanceReadinessRefreshOperationStatus", + "com.azure.resourcemanager.avs.models.MaintenanceReadinessStatus": "Microsoft.AVS.MaintenanceReadinessStatus", + "com.azure.resourcemanager.avs.models.MaintenanceReschedule": "Microsoft.AVS.MaintenanceReschedule", + "com.azure.resourcemanager.avs.models.MaintenanceSchedule": "Microsoft.AVS.MaintenanceSchedule", + "com.azure.resourcemanager.avs.models.MaintenanceState": "Microsoft.AVS.MaintenanceState", + "com.azure.resourcemanager.avs.models.MaintenanceStateName": "Microsoft.AVS.MaintenanceStateName", + "com.azure.resourcemanager.avs.models.MaintenanceStatusFilter": "Microsoft.AVS.MaintenanceStatusFilter", + "com.azure.resourcemanager.avs.models.MaintenanceType": "Microsoft.AVS.MaintenanceType", "com.azure.resourcemanager.avs.models.ManagementCluster": "Microsoft.AVS.ManagementCluster", "com.azure.resourcemanager.avs.models.MountOptionEnum": "Microsoft.AVS.MountOptionEnum", "com.azure.resourcemanager.avs.models.NetAppVolume": "Microsoft.AVS.NetAppVolume", @@ -375,6 +431,9 @@ "com.azure.resourcemanager.avs.models.PureStoragePolicyProvisioningState": "Microsoft.AVS.PureStoragePolicyProvisioningState", "com.azure.resourcemanager.avs.models.PureStorageVolume": "Microsoft.AVS.PureStorageVolume", "com.azure.resourcemanager.avs.models.QuotaEnabled": "Microsoft.AVS.QuotaEnabled", + "com.azure.resourcemanager.avs.models.RescheduleOperation": "Microsoft.AVS.RescheduleOperation", + "com.azure.resourcemanager.avs.models.RescheduleOperationConstraint": "Microsoft.AVS.RescheduleOperationConstraint", + "com.azure.resourcemanager.avs.models.RescheduleOperationConstraintKind": "Microsoft.AVS.RescheduleOperationConstraintKind", "com.azure.resourcemanager.avs.models.ResourceIdentityType": "Azure.ResourceManager.CommonTypes.SystemAssignedServiceIdentityType", "com.azure.resourcemanager.avs.models.ResourceSkuCapabilities": "Microsoft.AVS.ResourceSkuCapabilities", "com.azure.resourcemanager.avs.models.ResourceSkuLocationInfo": "Microsoft.AVS.ResourceSkuLocationInfo", @@ -384,6 +443,10 @@ "com.azure.resourcemanager.avs.models.ResourceSkuRestrictionsReasonCode": "Microsoft.AVS.ResourceSkuRestrictionsReasonCode", "com.azure.resourcemanager.avs.models.ResourceSkuRestrictionsType": "Microsoft.AVS.ResourceSkuRestrictionsType", "com.azure.resourcemanager.avs.models.ResourceSkuZoneDetails": "Microsoft.AVS.ResourceSkuZoneDetails", + "com.azure.resourcemanager.avs.models.ScheduleOperation": "Microsoft.AVS.ScheduleOperation", + "com.azure.resourcemanager.avs.models.ScheduleOperationConstraint": "Microsoft.AVS.ScheduleOperationConstraint", + "com.azure.resourcemanager.avs.models.ScheduleOperationConstraintKind": "Microsoft.AVS.ScheduleOperationConstraintKind", + "com.azure.resourcemanager.avs.models.SchedulingWindow": "Microsoft.AVS.SchedulingWindow", "com.azure.resourcemanager.avs.models.ScriptCmdletAudience": "Microsoft.AVS.ScriptCmdletAudience", "com.azure.resourcemanager.avs.models.ScriptCmdletProvisioningState": "Microsoft.AVS.ScriptCmdletProvisioningState", "com.azure.resourcemanager.avs.models.ScriptExecutionParameter": "Microsoft.AVS.ScriptExecutionParameter", @@ -403,12 +466,15 @@ "com.azure.resourcemanager.avs.models.TrialStatus": "Microsoft.AVS.TrialStatus", "com.azure.resourcemanager.avs.models.VMGroupStatusEnum": "Microsoft.AVS.VMGroupStatusEnum", "com.azure.resourcemanager.avs.models.VMTypeEnum": "Microsoft.AVS.VMTypeEnum", + "com.azure.resourcemanager.avs.models.Vcf5License": "Microsoft.AVS.Vcf5License", + "com.azure.resourcemanager.avs.models.VcfLicenseKind": "Microsoft.AVS.VcfLicenseKind", "com.azure.resourcemanager.avs.models.VirtualMachineProvisioningState": "Microsoft.AVS.VirtualMachineProvisioningState", "com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement": "Microsoft.AVS.VirtualMachineRestrictMovement", "com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState": "Microsoft.AVS.VirtualMachineRestrictMovementState", "com.azure.resourcemanager.avs.models.VisibilityParameterEnum": "Microsoft.AVS.VisibilityParameterEnum", "com.azure.resourcemanager.avs.models.VmHostPlacementPolicyProperties": "Microsoft.AVS.VmHostPlacementPolicyProperties", "com.azure.resourcemanager.avs.models.VmPlacementPolicyProperties": "Microsoft.AVS.VmVmPlacementPolicyProperties", + "com.azure.resourcemanager.avs.models.VmwareFirewallLicenseProperties": "Microsoft.AVS.VmwareFirewallLicenseProperties", "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity": "Microsoft.AVS.WorkloadNetworkDhcpEntity", "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpProvisioningState": "Microsoft.AVS.WorkloadNetworkDhcpProvisioningState", "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpRelay": "Microsoft.AVS.WorkloadNetworkDhcpRelay", diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/azure-resourcemanager-avs_metadata.json b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/azure-resourcemanager-avs_metadata.json index ec989d11fc06..c00731a42ab3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/azure-resourcemanager-avs_metadata.json +++ b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/azure-resourcemanager-avs_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersion":"2024-09-01","crossLanguageDefinitions":{"com.azure.resourcemanager.avs.fluent.AddonsClient":"Microsoft.AVS.Addons","com.azure.resourcemanager.avs.fluent.AddonsClient.beginCreateOrUpdate":"Microsoft.AVS.Addons.createOrUpdate","com.azure.resourcemanager.avs.fluent.AddonsClient.beginDelete":"Microsoft.AVS.Addons.delete","com.azure.resourcemanager.avs.fluent.AddonsClient.createOrUpdate":"Microsoft.AVS.Addons.createOrUpdate","com.azure.resourcemanager.avs.fluent.AddonsClient.delete":"Microsoft.AVS.Addons.delete","com.azure.resourcemanager.avs.fluent.AddonsClient.get":"Microsoft.AVS.Addons.get","com.azure.resourcemanager.avs.fluent.AddonsClient.getWithResponse":"Microsoft.AVS.Addons.get","com.azure.resourcemanager.avs.fluent.AddonsClient.list":"Microsoft.AVS.Addons.list","com.azure.resourcemanager.avs.fluent.AuthorizationsClient":"Microsoft.AVS.Authorizations","com.azure.resourcemanager.avs.fluent.AuthorizationsClient.beginCreateOrUpdate":"Microsoft.AVS.Authorizations.createOrUpdate","com.azure.resourcemanager.avs.fluent.AuthorizationsClient.beginDelete":"Microsoft.AVS.Authorizations.delete","com.azure.resourcemanager.avs.fluent.AuthorizationsClient.createOrUpdate":"Microsoft.AVS.Authorizations.createOrUpdate","com.azure.resourcemanager.avs.fluent.AuthorizationsClient.delete":"Microsoft.AVS.Authorizations.delete","com.azure.resourcemanager.avs.fluent.AuthorizationsClient.get":"Microsoft.AVS.Authorizations.get","com.azure.resourcemanager.avs.fluent.AuthorizationsClient.getWithResponse":"Microsoft.AVS.Authorizations.get","com.azure.resourcemanager.avs.fluent.AuthorizationsClient.list":"Microsoft.AVS.Authorizations.list","com.azure.resourcemanager.avs.fluent.AvsClient":"Microsoft.AVS","com.azure.resourcemanager.avs.fluent.CloudLinksClient":"Microsoft.AVS.CloudLinks","com.azure.resourcemanager.avs.fluent.CloudLinksClient.beginCreateOrUpdate":"Microsoft.AVS.CloudLinks.createOrUpdate","com.azure.resourcemanager.avs.fluent.CloudLinksClient.beginDelete":"Microsoft.AVS.CloudLinks.delete","com.azure.resourcemanager.avs.fluent.CloudLinksClient.createOrUpdate":"Microsoft.AVS.CloudLinks.createOrUpdate","com.azure.resourcemanager.avs.fluent.CloudLinksClient.delete":"Microsoft.AVS.CloudLinks.delete","com.azure.resourcemanager.avs.fluent.CloudLinksClient.get":"Microsoft.AVS.CloudLinks.get","com.azure.resourcemanager.avs.fluent.CloudLinksClient.getWithResponse":"Microsoft.AVS.CloudLinks.get","com.azure.resourcemanager.avs.fluent.CloudLinksClient.list":"Microsoft.AVS.CloudLinks.list","com.azure.resourcemanager.avs.fluent.ClustersClient":"Microsoft.AVS.Clusters","com.azure.resourcemanager.avs.fluent.ClustersClient.beginCreateOrUpdate":"Microsoft.AVS.Clusters.createOrUpdate","com.azure.resourcemanager.avs.fluent.ClustersClient.beginDelete":"Microsoft.AVS.Clusters.delete","com.azure.resourcemanager.avs.fluent.ClustersClient.beginUpdate":"Microsoft.AVS.Clusters.update","com.azure.resourcemanager.avs.fluent.ClustersClient.createOrUpdate":"Microsoft.AVS.Clusters.createOrUpdate","com.azure.resourcemanager.avs.fluent.ClustersClient.delete":"Microsoft.AVS.Clusters.delete","com.azure.resourcemanager.avs.fluent.ClustersClient.get":"Microsoft.AVS.Clusters.get","com.azure.resourcemanager.avs.fluent.ClustersClient.getWithResponse":"Microsoft.AVS.Clusters.get","com.azure.resourcemanager.avs.fluent.ClustersClient.list":"Microsoft.AVS.Clusters.list","com.azure.resourcemanager.avs.fluent.ClustersClient.listZones":"Microsoft.AVS.Clusters.listZones","com.azure.resourcemanager.avs.fluent.ClustersClient.listZonesWithResponse":"Microsoft.AVS.Clusters.listZones","com.azure.resourcemanager.avs.fluent.ClustersClient.update":"Microsoft.AVS.Clusters.update","com.azure.resourcemanager.avs.fluent.DatastoresClient":"Microsoft.AVS.Datastores","com.azure.resourcemanager.avs.fluent.DatastoresClient.beginCreateOrUpdate":"Microsoft.AVS.Datastores.createOrUpdate","com.azure.resourcemanager.avs.fluent.DatastoresClient.beginDelete":"Microsoft.AVS.Datastores.delete","com.azure.resourcemanager.avs.fluent.DatastoresClient.createOrUpdate":"Microsoft.AVS.Datastores.createOrUpdate","com.azure.resourcemanager.avs.fluent.DatastoresClient.delete":"Microsoft.AVS.Datastores.delete","com.azure.resourcemanager.avs.fluent.DatastoresClient.get":"Microsoft.AVS.Datastores.get","com.azure.resourcemanager.avs.fluent.DatastoresClient.getWithResponse":"Microsoft.AVS.Datastores.get","com.azure.resourcemanager.avs.fluent.DatastoresClient.list":"Microsoft.AVS.Datastores.list","com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient":"Microsoft.AVS.GlobalReachConnections","com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient.beginCreateOrUpdate":"Microsoft.AVS.GlobalReachConnections.createOrUpdate","com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient.beginDelete":"Microsoft.AVS.GlobalReachConnections.delete","com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient.createOrUpdate":"Microsoft.AVS.GlobalReachConnections.createOrUpdate","com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient.delete":"Microsoft.AVS.GlobalReachConnections.delete","com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient.get":"Microsoft.AVS.GlobalReachConnections.get","com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient.getWithResponse":"Microsoft.AVS.GlobalReachConnections.get","com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient.list":"Microsoft.AVS.GlobalReachConnections.list","com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient":"Microsoft.AVS.HcxEnterpriseSites","com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient.createOrUpdate":"Microsoft.AVS.HcxEnterpriseSites.createOrUpdate","com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient.createOrUpdateWithResponse":"Microsoft.AVS.HcxEnterpriseSites.createOrUpdate","com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient.delete":"Microsoft.AVS.HcxEnterpriseSites.delete","com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient.deleteWithResponse":"Microsoft.AVS.HcxEnterpriseSites.delete","com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient.get":"Microsoft.AVS.HcxEnterpriseSites.get","com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient.getWithResponse":"Microsoft.AVS.HcxEnterpriseSites.get","com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient.list":"Microsoft.AVS.HcxEnterpriseSites.list","com.azure.resourcemanager.avs.fluent.HostsClient":"Microsoft.AVS.Hosts","com.azure.resourcemanager.avs.fluent.HostsClient.get":"Microsoft.AVS.Hosts.get","com.azure.resourcemanager.avs.fluent.HostsClient.getWithResponse":"Microsoft.AVS.Hosts.get","com.azure.resourcemanager.avs.fluent.HostsClient.list":"Microsoft.AVS.Hosts.list","com.azure.resourcemanager.avs.fluent.IscsiPathsClient":"Microsoft.AVS.IscsiPaths","com.azure.resourcemanager.avs.fluent.IscsiPathsClient.beginCreateOrUpdate":"Microsoft.AVS.IscsiPaths.createOrUpdate","com.azure.resourcemanager.avs.fluent.IscsiPathsClient.beginDelete":"Microsoft.AVS.IscsiPaths.delete","com.azure.resourcemanager.avs.fluent.IscsiPathsClient.createOrUpdate":"Microsoft.AVS.IscsiPaths.createOrUpdate","com.azure.resourcemanager.avs.fluent.IscsiPathsClient.delete":"Microsoft.AVS.IscsiPaths.delete","com.azure.resourcemanager.avs.fluent.IscsiPathsClient.get":"Microsoft.AVS.IscsiPaths.get","com.azure.resourcemanager.avs.fluent.IscsiPathsClient.getWithResponse":"Microsoft.AVS.IscsiPaths.get","com.azure.resourcemanager.avs.fluent.IscsiPathsClient.listByPrivateCloud":"Microsoft.AVS.IscsiPaths.listByPrivateCloud","com.azure.resourcemanager.avs.fluent.LocationsClient":"Microsoft.AVS.Locations","com.azure.resourcemanager.avs.fluent.LocationsClient.checkQuotaAvailability":"Microsoft.AVS.Locations.checkQuotaAvailability","com.azure.resourcemanager.avs.fluent.LocationsClient.checkQuotaAvailabilityWithResponse":"Microsoft.AVS.Locations.checkQuotaAvailability","com.azure.resourcemanager.avs.fluent.LocationsClient.checkTrialAvailability":"Microsoft.AVS.Locations.checkTrialAvailability","com.azure.resourcemanager.avs.fluent.LocationsClient.checkTrialAvailabilityWithResponse":"Microsoft.AVS.Locations.checkTrialAvailability","com.azure.resourcemanager.avs.fluent.OperationsClient":"Microsoft.AVS.Operations","com.azure.resourcemanager.avs.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient":"Microsoft.AVS.PlacementPolicies","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.beginCreateOrUpdate":"Microsoft.AVS.PlacementPolicies.createOrUpdate","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.beginDelete":"Microsoft.AVS.PlacementPolicies.delete","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.beginUpdate":"Microsoft.AVS.PlacementPolicies.update","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.createOrUpdate":"Microsoft.AVS.PlacementPolicies.createOrUpdate","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.delete":"Microsoft.AVS.PlacementPolicies.delete","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.get":"Microsoft.AVS.PlacementPolicies.get","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.getWithResponse":"Microsoft.AVS.PlacementPolicies.get","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.list":"Microsoft.AVS.PlacementPolicies.list","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.update":"Microsoft.AVS.PlacementPolicies.update","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient":"Microsoft.AVS.PrivateClouds","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.beginCreateOrUpdate":"Microsoft.AVS.PrivateClouds.createOrUpdate","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.beginDelete":"Microsoft.AVS.PrivateClouds.delete","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.beginRotateNsxtPassword":"Microsoft.AVS.PrivateClouds.rotateNsxtPassword","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.beginRotateVcenterPassword":"Microsoft.AVS.PrivateClouds.rotateVcenterPassword","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.beginUpdate":"Microsoft.AVS.PrivateClouds.update","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.createOrUpdate":"Microsoft.AVS.PrivateClouds.createOrUpdate","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.delete":"Microsoft.AVS.PrivateClouds.delete","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.getByResourceGroup":"Microsoft.AVS.PrivateClouds.get","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.getByResourceGroupWithResponse":"Microsoft.AVS.PrivateClouds.get","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.list":"Microsoft.AVS.PrivateClouds.listInSubscription","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.listAdminCredentials":"Microsoft.AVS.PrivateClouds.listAdminCredentials","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.listAdminCredentialsWithResponse":"Microsoft.AVS.PrivateClouds.listAdminCredentials","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.listByResourceGroup":"Microsoft.AVS.PrivateClouds.list","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.rotateNsxtPassword":"Microsoft.AVS.PrivateClouds.rotateNsxtPassword","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.rotateVcenterPassword":"Microsoft.AVS.PrivateClouds.rotateVcenterPassword","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.update":"Microsoft.AVS.PrivateClouds.update","com.azure.resourcemanager.avs.fluent.ProvisionedNetworksClient":"Microsoft.AVS.ProvisionedNetworks","com.azure.resourcemanager.avs.fluent.ProvisionedNetworksClient.get":"Microsoft.AVS.ProvisionedNetworks.get","com.azure.resourcemanager.avs.fluent.ProvisionedNetworksClient.getWithResponse":"Microsoft.AVS.ProvisionedNetworks.get","com.azure.resourcemanager.avs.fluent.ProvisionedNetworksClient.list":"Microsoft.AVS.ProvisionedNetworks.list","com.azure.resourcemanager.avs.fluent.PureStoragePoliciesClient":"Microsoft.AVS.PureStoragePolicies","com.azure.resourcemanager.avs.fluent.PureStoragePoliciesClient.beginCreateOrUpdate":"Microsoft.AVS.PureStoragePolicies.createOrUpdate","com.azure.resourcemanager.avs.fluent.PureStoragePoliciesClient.beginDelete":"Microsoft.AVS.PureStoragePolicies.delete","com.azure.resourcemanager.avs.fluent.PureStoragePoliciesClient.createOrUpdate":"Microsoft.AVS.PureStoragePolicies.createOrUpdate","com.azure.resourcemanager.avs.fluent.PureStoragePoliciesClient.delete":"Microsoft.AVS.PureStoragePolicies.delete","com.azure.resourcemanager.avs.fluent.PureStoragePoliciesClient.get":"Microsoft.AVS.PureStoragePolicies.get","com.azure.resourcemanager.avs.fluent.PureStoragePoliciesClient.getWithResponse":"Microsoft.AVS.PureStoragePolicies.get","com.azure.resourcemanager.avs.fluent.PureStoragePoliciesClient.list":"Microsoft.AVS.PureStoragePolicies.list","com.azure.resourcemanager.avs.fluent.ScriptCmdletsClient":"Microsoft.AVS.ScriptCmdlets","com.azure.resourcemanager.avs.fluent.ScriptCmdletsClient.get":"Microsoft.AVS.ScriptCmdlets.get","com.azure.resourcemanager.avs.fluent.ScriptCmdletsClient.getWithResponse":"Microsoft.AVS.ScriptCmdlets.get","com.azure.resourcemanager.avs.fluent.ScriptCmdletsClient.list":"Microsoft.AVS.ScriptCmdlets.list","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient":"Microsoft.AVS.ScriptExecutions","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.beginCreateOrUpdate":"Microsoft.AVS.ScriptExecutions.createOrUpdate","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.beginDelete":"Microsoft.AVS.ScriptExecutions.delete","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.createOrUpdate":"Microsoft.AVS.ScriptExecutions.createOrUpdate","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.delete":"Microsoft.AVS.ScriptExecutions.delete","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.get":"Microsoft.AVS.ScriptExecutions.get","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.getExecutionLogs":"Microsoft.AVS.ScriptExecutions.getExecutionLogs","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.getExecutionLogsWithResponse":"Microsoft.AVS.ScriptExecutions.getExecutionLogs","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.getWithResponse":"Microsoft.AVS.ScriptExecutions.get","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.list":"Microsoft.AVS.ScriptExecutions.list","com.azure.resourcemanager.avs.fluent.ScriptPackagesClient":"Microsoft.AVS.ScriptPackages","com.azure.resourcemanager.avs.fluent.ScriptPackagesClient.get":"Microsoft.AVS.ScriptPackages.get","com.azure.resourcemanager.avs.fluent.ScriptPackagesClient.getWithResponse":"Microsoft.AVS.ScriptPackages.get","com.azure.resourcemanager.avs.fluent.ScriptPackagesClient.list":"Microsoft.AVS.ScriptPackages.list","com.azure.resourcemanager.avs.fluent.SkusClient":"Microsoft.AVS.Skus","com.azure.resourcemanager.avs.fluent.SkusClient.list":"Microsoft.AVS.Skus.list","com.azure.resourcemanager.avs.fluent.VirtualMachinesClient":"Microsoft.AVS.VirtualMachines","com.azure.resourcemanager.avs.fluent.VirtualMachinesClient.beginRestrictMovement":"Microsoft.AVS.VirtualMachines.restrictMovement","com.azure.resourcemanager.avs.fluent.VirtualMachinesClient.get":"Microsoft.AVS.VirtualMachines.get","com.azure.resourcemanager.avs.fluent.VirtualMachinesClient.getWithResponse":"Microsoft.AVS.VirtualMachines.get","com.azure.resourcemanager.avs.fluent.VirtualMachinesClient.list":"Microsoft.AVS.VirtualMachines.list","com.azure.resourcemanager.avs.fluent.VirtualMachinesClient.restrictMovement":"Microsoft.AVS.VirtualMachines.restrictMovement","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient":"Microsoft.AVS.WorkloadNetworks","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginCreateDhcp":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginCreateDnsService":"Microsoft.AVS.WorkloadNetworkDnsServices.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginCreateDnsZone":"Microsoft.AVS.WorkloadNetworkDnsZones.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginCreatePortMirroring":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginCreatePublicIp":"Microsoft.AVS.WorkloadNetworkPublicIps.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginCreateSegments":"Microsoft.AVS.WorkloadNetworkSegments.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginCreateVMGroup":"Microsoft.AVS.WorkloadNetworkVmGroups.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginDeleteDhcp":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginDeleteDnsService":"Microsoft.AVS.WorkloadNetworkDnsServices.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginDeleteDnsZone":"Microsoft.AVS.WorkloadNetworkDnsZones.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginDeletePortMirroring":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginDeletePublicIp":"Microsoft.AVS.WorkloadNetworkPublicIps.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginDeleteSegment":"Microsoft.AVS.WorkloadNetworkSegments.deleteSegment","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginDeleteVMGroup":"Microsoft.AVS.WorkloadNetworkVmGroups.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginUpdateDhcp":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginUpdateDnsService":"Microsoft.AVS.WorkloadNetworkDnsServices.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginUpdateDnsZone":"Microsoft.AVS.WorkloadNetworkDnsZones.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginUpdatePortMirroring":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginUpdateSegments":"Microsoft.AVS.WorkloadNetworkSegments.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginUpdateVMGroup":"Microsoft.AVS.WorkloadNetworkVmGroups.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.createDhcp":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.createDnsService":"Microsoft.AVS.WorkloadNetworkDnsServices.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.createDnsZone":"Microsoft.AVS.WorkloadNetworkDnsZones.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.createPortMirroring":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.createPublicIp":"Microsoft.AVS.WorkloadNetworkPublicIps.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.createSegments":"Microsoft.AVS.WorkloadNetworkSegments.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.createVMGroup":"Microsoft.AVS.WorkloadNetworkVmGroups.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.deleteDhcp":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.deleteDnsService":"Microsoft.AVS.WorkloadNetworkDnsServices.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.deleteDnsZone":"Microsoft.AVS.WorkloadNetworkDnsZones.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.deletePortMirroring":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.deletePublicIp":"Microsoft.AVS.WorkloadNetworkPublicIps.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.deleteSegment":"Microsoft.AVS.WorkloadNetworkSegments.deleteSegment","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.deleteVMGroup":"Microsoft.AVS.WorkloadNetworkVmGroups.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.get":"Microsoft.AVS.WorkloadNetworks.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getDhcp":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getDhcpWithResponse":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getDnsService":"Microsoft.AVS.WorkloadNetworkDnsServices.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getDnsServiceWithResponse":"Microsoft.AVS.WorkloadNetworkDnsServices.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getDnsZone":"Microsoft.AVS.WorkloadNetworkDnsZones.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getDnsZoneWithResponse":"Microsoft.AVS.WorkloadNetworkDnsZones.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getGateway":"Microsoft.AVS.WorkloadNetworkGateways.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getGatewayWithResponse":"Microsoft.AVS.WorkloadNetworkGateways.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getPortMirroring":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getPortMirroringWithResponse":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getPublicIp":"Microsoft.AVS.WorkloadNetworkPublicIps.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getPublicIpWithResponse":"Microsoft.AVS.WorkloadNetworkPublicIps.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getSegment":"Microsoft.AVS.WorkloadNetworkSegments.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getSegmentWithResponse":"Microsoft.AVS.WorkloadNetworkSegments.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getVMGroup":"Microsoft.AVS.WorkloadNetworkVmGroups.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getVMGroupWithResponse":"Microsoft.AVS.WorkloadNetworkVmGroups.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getVirtualMachine":"Microsoft.AVS.WorkloadNetworkVirtualMachines.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getVirtualMachineWithResponse":"Microsoft.AVS.WorkloadNetworkVirtualMachines.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getWithResponse":"Microsoft.AVS.WorkloadNetworks.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.list":"Microsoft.AVS.WorkloadNetworks.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listDhcp":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listDnsServices":"Microsoft.AVS.WorkloadNetworkDnsServices.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listDnsZones":"Microsoft.AVS.WorkloadNetworkDnsZones.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listGateways":"Microsoft.AVS.WorkloadNetworkGateways.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listPortMirroring":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listPublicIPs":"Microsoft.AVS.WorkloadNetworkPublicIps.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listSegments":"Microsoft.AVS.WorkloadNetworkSegments.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listVMGroups":"Microsoft.AVS.WorkloadNetworkVmGroups.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listVirtualMachines":"Microsoft.AVS.WorkloadNetworkVirtualMachines.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.updateDhcp":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.updateDnsService":"Microsoft.AVS.WorkloadNetworkDnsServices.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.updateDnsZone":"Microsoft.AVS.WorkloadNetworkDnsZones.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.updatePortMirroring":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.updateSegments":"Microsoft.AVS.WorkloadNetworkSegments.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.updateVMGroup":"Microsoft.AVS.WorkloadNetworkVmGroups.update","com.azure.resourcemanager.avs.fluent.models.AddonInner":"Microsoft.AVS.Addon","com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner":"Microsoft.AVS.AdminCredentials","com.azure.resourcemanager.avs.fluent.models.CloudLinkInner":"Microsoft.AVS.CloudLink","com.azure.resourcemanager.avs.fluent.models.CloudLinkProperties":"Microsoft.AVS.CloudLinkProperties","com.azure.resourcemanager.avs.fluent.models.ClusterInner":"Microsoft.AVS.Cluster","com.azure.resourcemanager.avs.fluent.models.ClusterProperties":"Microsoft.AVS.ClusterProperties","com.azure.resourcemanager.avs.fluent.models.ClusterUpdateProperties":"Microsoft.AVS.ClusterUpdateProperties","com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner":"Microsoft.AVS.ClusterZoneList","com.azure.resourcemanager.avs.fluent.models.DatastoreInner":"Microsoft.AVS.Datastore","com.azure.resourcemanager.avs.fluent.models.DatastoreProperties":"Microsoft.AVS.DatastoreProperties","com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner":"Microsoft.AVS.ExpressRouteAuthorization","com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationProperties":"Microsoft.AVS.ExpressRouteAuthorizationProperties","com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner":"Microsoft.AVS.GlobalReachConnection","com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionProperties":"Microsoft.AVS.GlobalReachConnectionProperties","com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner":"Microsoft.AVS.HcxEnterpriseSite","com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteProperties":"Microsoft.AVS.HcxEnterpriseSiteProperties","com.azure.resourcemanager.avs.fluent.models.HostModelInner":"Microsoft.AVS.Host","com.azure.resourcemanager.avs.fluent.models.IscsiPathInner":"Microsoft.AVS.IscsiPath","com.azure.resourcemanager.avs.fluent.models.IscsiPathProperties":"Microsoft.AVS.IscsiPathProperties","com.azure.resourcemanager.avs.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner":"Microsoft.AVS.PlacementPolicy","com.azure.resourcemanager.avs.fluent.models.PlacementPolicyUpdateProperties":"Microsoft.AVS.PlacementPolicyUpdateProperties","com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner":"Microsoft.AVS.PrivateCloud","com.azure.resourcemanager.avs.fluent.models.PrivateCloudProperties":"Microsoft.AVS.PrivateCloudProperties","com.azure.resourcemanager.avs.fluent.models.PrivateCloudUpdateProperties":"Microsoft.AVS.PrivateCloudUpdateProperties","com.azure.resourcemanager.avs.fluent.models.ProvisionedNetworkInner":"Microsoft.AVS.ProvisionedNetwork","com.azure.resourcemanager.avs.fluent.models.PureStoragePolicyInner":"Microsoft.AVS.PureStoragePolicy","com.azure.resourcemanager.avs.fluent.models.QuotaInner":"Microsoft.AVS.Quota","com.azure.resourcemanager.avs.fluent.models.ResourceSkuInner":"Microsoft.AVS.ResourceSku","com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner":"Microsoft.AVS.ScriptCmdlet","com.azure.resourcemanager.avs.fluent.models.ScriptCmdletProperties":"Microsoft.AVS.ScriptCmdletProperties","com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner":"Microsoft.AVS.ScriptExecution","com.azure.resourcemanager.avs.fluent.models.ScriptExecutionProperties":"Microsoft.AVS.ScriptExecutionProperties","com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner":"Microsoft.AVS.ScriptPackage","com.azure.resourcemanager.avs.fluent.models.ScriptPackageProperties":"Microsoft.AVS.ScriptPackageProperties","com.azure.resourcemanager.avs.fluent.models.TrialInner":"Microsoft.AVS.Trial","com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner":"Microsoft.AVS.VirtualMachine","com.azure.resourcemanager.avs.fluent.models.VirtualMachineProperties":"Microsoft.AVS.VirtualMachineProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner":"Microsoft.AVS.WorkloadNetworkDhcp","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner":"Microsoft.AVS.WorkloadNetworkDnsService","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceProperties":"Microsoft.AVS.WorkloadNetworkDnsServiceProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner":"Microsoft.AVS.WorkloadNetworkDnsZone","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneProperties":"Microsoft.AVS.WorkloadNetworkDnsZoneProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner":"Microsoft.AVS.WorkloadNetworkGateway","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayProperties":"Microsoft.AVS.WorkloadNetworkGatewayProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner":"Microsoft.AVS.WorkloadNetwork","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner":"Microsoft.AVS.WorkloadNetworkPortMirroring","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringProperties":"Microsoft.AVS.WorkloadNetworkPortMirroringProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkProperties":"Microsoft.AVS.WorkloadNetworkProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner":"Microsoft.AVS.WorkloadNetworkPublicIP","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpProperties":"Microsoft.AVS.WorkloadNetworkPublicIPProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner":"Microsoft.AVS.WorkloadNetworkSegment","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentProperties":"Microsoft.AVS.WorkloadNetworkSegmentProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner":"Microsoft.AVS.WorkloadNetworkVMGroup","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupProperties":"Microsoft.AVS.WorkloadNetworkVMGroupProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner":"Microsoft.AVS.WorkloadNetworkVirtualMachine","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineProperties":"Microsoft.AVS.WorkloadNetworkVirtualMachineProperties","com.azure.resourcemanager.avs.implementation.AvsClientBuilder":"Microsoft.AVS","com.azure.resourcemanager.avs.implementation.models.AddonList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.CloudLinkList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.ClusterList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.DatastoreList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.ExpressRouteAuthorizationList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.GlobalReachConnectionList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.HcxEnterpriseSiteList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.HostListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.avs.implementation.models.IscsiPathListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.avs.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.avs.implementation.models.PagedResourceSku":"Microsoft.AVS.PagedResourceSku","com.azure.resourcemanager.avs.implementation.models.PlacementPoliciesList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.PrivateCloudList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.ProvisionedNetworkListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.avs.implementation.models.PureStoragePolicyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.avs.implementation.models.ScriptCmdletsList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.ScriptExecutionsList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.ScriptPackagesList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.VirtualMachinesList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDhcpList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsServicesList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsZonesList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkGatewayList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPortMirroringList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPublicIPsList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkSegmentsList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVMGroupsList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVirtualMachinesList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.avs.models.AddonArcProperties":"Microsoft.AVS.AddonArcProperties","com.azure.resourcemanager.avs.models.AddonHcxProperties":"Microsoft.AVS.AddonHcxProperties","com.azure.resourcemanager.avs.models.AddonProperties":"Microsoft.AVS.AddonProperties","com.azure.resourcemanager.avs.models.AddonProvisioningState":"Microsoft.AVS.AddonProvisioningState","com.azure.resourcemanager.avs.models.AddonSrmProperties":"Microsoft.AVS.AddonSrmProperties","com.azure.resourcemanager.avs.models.AddonType":"Microsoft.AVS.AddonType","com.azure.resourcemanager.avs.models.AddonVrProperties":"Microsoft.AVS.AddonVrProperties","com.azure.resourcemanager.avs.models.AffinityStrength":"Microsoft.AVS.AffinityStrength","com.azure.resourcemanager.avs.models.AffinityType":"Microsoft.AVS.AffinityType","com.azure.resourcemanager.avs.models.AvailabilityProperties":"Microsoft.AVS.AvailabilityProperties","com.azure.resourcemanager.avs.models.AvailabilityStrategy":"Microsoft.AVS.AvailabilityStrategy","com.azure.resourcemanager.avs.models.AzureHybridBenefitType":"Microsoft.AVS.AzureHybridBenefitType","com.azure.resourcemanager.avs.models.Circuit":"Microsoft.AVS.Circuit","com.azure.resourcemanager.avs.models.CloudLinkProvisioningState":"Microsoft.AVS.CloudLinkProvisioningState","com.azure.resourcemanager.avs.models.CloudLinkStatus":"Microsoft.AVS.CloudLinkStatus","com.azure.resourcemanager.avs.models.ClusterProvisioningState":"Microsoft.AVS.ClusterProvisioningState","com.azure.resourcemanager.avs.models.ClusterUpdate":"Microsoft.AVS.ClusterUpdate","com.azure.resourcemanager.avs.models.ClusterZone":"Microsoft.AVS.ClusterZone","com.azure.resourcemanager.avs.models.DatastoreProvisioningState":"Microsoft.AVS.DatastoreProvisioningState","com.azure.resourcemanager.avs.models.DatastoreStatus":"Microsoft.AVS.DatastoreStatus","com.azure.resourcemanager.avs.models.DhcpTypeEnum":"Microsoft.AVS.DhcpTypeEnum","com.azure.resourcemanager.avs.models.DiskPoolVolume":"Microsoft.AVS.DiskPoolVolume","com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum":"Microsoft.AVS.DnsServiceLogLevelEnum","com.azure.resourcemanager.avs.models.DnsServiceStatusEnum":"Microsoft.AVS.DnsServiceStatusEnum","com.azure.resourcemanager.avs.models.DnsZoneType":"Microsoft.AVS.DnsZoneType","com.azure.resourcemanager.avs.models.ElasticSanVolume":"Microsoft.AVS.ElasticSanVolume","com.azure.resourcemanager.avs.models.Encryption":"Microsoft.AVS.Encryption","com.azure.resourcemanager.avs.models.EncryptionKeyStatus":"Microsoft.AVS.EncryptionKeyStatus","com.azure.resourcemanager.avs.models.EncryptionKeyVaultProperties":"Microsoft.AVS.EncryptionKeyVaultProperties","com.azure.resourcemanager.avs.models.EncryptionState":"Microsoft.AVS.EncryptionState","com.azure.resourcemanager.avs.models.EncryptionVersionType":"Microsoft.AVS.EncryptionVersionType","com.azure.resourcemanager.avs.models.Endpoints":"Microsoft.AVS.Endpoints","com.azure.resourcemanager.avs.models.ExpressRouteAuthorizationProvisioningState":"Microsoft.AVS.ExpressRouteAuthorizationProvisioningState","com.azure.resourcemanager.avs.models.GeneralHostProperties":"Microsoft.AVS.GeneralHostProperties","com.azure.resourcemanager.avs.models.GlobalReachConnectionProvisioningState":"Microsoft.AVS.GlobalReachConnectionProvisioningState","com.azure.resourcemanager.avs.models.GlobalReachConnectionStatus":"Microsoft.AVS.GlobalReachConnectionStatus","com.azure.resourcemanager.avs.models.HcxEnterpriseSiteProvisioningState":"Microsoft.AVS.HcxEnterpriseSiteProvisioningState","com.azure.resourcemanager.avs.models.HcxEnterpriseSiteStatus":"Microsoft.AVS.HcxEnterpriseSiteStatus","com.azure.resourcemanager.avs.models.HostKind":"Microsoft.AVS.HostKind","com.azure.resourcemanager.avs.models.HostMaintenance":"Microsoft.AVS.HostMaintenance","com.azure.resourcemanager.avs.models.HostProperties":"Microsoft.AVS.HostProperties","com.azure.resourcemanager.avs.models.HostProvisioningState":"Microsoft.AVS.HostProvisioningState","com.azure.resourcemanager.avs.models.IdentitySource":"Microsoft.AVS.IdentitySource","com.azure.resourcemanager.avs.models.InternetEnum":"Microsoft.AVS.InternetEnum","com.azure.resourcemanager.avs.models.IscsiPathProvisioningState":"Microsoft.AVS.IscsiPathProvisioningState","com.azure.resourcemanager.avs.models.ManagementCluster":"Microsoft.AVS.ManagementCluster","com.azure.resourcemanager.avs.models.MountOptionEnum":"Microsoft.AVS.MountOptionEnum","com.azure.resourcemanager.avs.models.NetAppVolume":"Microsoft.AVS.NetAppVolume","com.azure.resourcemanager.avs.models.NsxPublicIpQuotaRaisedEnum":"Microsoft.AVS.NsxPublicIpQuotaRaisedEnum","com.azure.resourcemanager.avs.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.avs.models.OptionalParamEnum":"Microsoft.AVS.OptionalParamEnum","com.azure.resourcemanager.avs.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.avs.models.PSCredentialExecutionParameter":"Microsoft.AVS.PSCredentialExecutionParameter","com.azure.resourcemanager.avs.models.PlacementPolicyProperties":"Microsoft.AVS.PlacementPolicyProperties","com.azure.resourcemanager.avs.models.PlacementPolicyProvisioningState":"Microsoft.AVS.PlacementPolicyProvisioningState","com.azure.resourcemanager.avs.models.PlacementPolicyState":"Microsoft.AVS.PlacementPolicyState","com.azure.resourcemanager.avs.models.PlacementPolicyType":"Microsoft.AVS.PlacementPolicyType","com.azure.resourcemanager.avs.models.PlacementPolicyUpdate":"Microsoft.AVS.PlacementPolicyUpdate","com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum":"Microsoft.AVS.PortMirroringDirectionEnum","com.azure.resourcemanager.avs.models.PortMirroringStatusEnum":"Microsoft.AVS.PortMirroringStatusEnum","com.azure.resourcemanager.avs.models.PrivateCloudIdentity":"Azure.ResourceManager.CommonTypes.SystemAssignedServiceIdentity","com.azure.resourcemanager.avs.models.PrivateCloudProvisioningState":"Microsoft.AVS.PrivateCloudProvisioningState","com.azure.resourcemanager.avs.models.PrivateCloudUpdate":"Microsoft.AVS.PrivateCloudUpdate","com.azure.resourcemanager.avs.models.ProvisionedNetworkProperties":"Microsoft.AVS.ProvisionedNetworkProperties","com.azure.resourcemanager.avs.models.ProvisionedNetworkProvisioningState":"Microsoft.AVS.ProvisionedNetworkProvisioningState","com.azure.resourcemanager.avs.models.ProvisionedNetworkTypes":"Microsoft.AVS.ProvisionedNetworkTypes","com.azure.resourcemanager.avs.models.PureStoragePolicyProperties":"Microsoft.AVS.PureStoragePolicyProperties","com.azure.resourcemanager.avs.models.PureStoragePolicyProvisioningState":"Microsoft.AVS.PureStoragePolicyProvisioningState","com.azure.resourcemanager.avs.models.PureStorageVolume":"Microsoft.AVS.PureStorageVolume","com.azure.resourcemanager.avs.models.QuotaEnabled":"Microsoft.AVS.QuotaEnabled","com.azure.resourcemanager.avs.models.ResourceIdentityType":"Azure.ResourceManager.CommonTypes.SystemAssignedServiceIdentityType","com.azure.resourcemanager.avs.models.ResourceSkuCapabilities":"Microsoft.AVS.ResourceSkuCapabilities","com.azure.resourcemanager.avs.models.ResourceSkuLocationInfo":"Microsoft.AVS.ResourceSkuLocationInfo","com.azure.resourcemanager.avs.models.ResourceSkuResourceType":"Microsoft.AVS.ResourceSkuResourceType","com.azure.resourcemanager.avs.models.ResourceSkuRestrictionInfo":"Microsoft.AVS.ResourceSkuRestrictionInfo","com.azure.resourcemanager.avs.models.ResourceSkuRestrictions":"Microsoft.AVS.ResourceSkuRestrictions","com.azure.resourcemanager.avs.models.ResourceSkuRestrictionsReasonCode":"Microsoft.AVS.ResourceSkuRestrictionsReasonCode","com.azure.resourcemanager.avs.models.ResourceSkuRestrictionsType":"Microsoft.AVS.ResourceSkuRestrictionsType","com.azure.resourcemanager.avs.models.ResourceSkuZoneDetails":"Microsoft.AVS.ResourceSkuZoneDetails","com.azure.resourcemanager.avs.models.ScriptCmdletAudience":"Microsoft.AVS.ScriptCmdletAudience","com.azure.resourcemanager.avs.models.ScriptCmdletProvisioningState":"Microsoft.AVS.ScriptCmdletProvisioningState","com.azure.resourcemanager.avs.models.ScriptExecutionParameter":"Microsoft.AVS.ScriptExecutionParameter","com.azure.resourcemanager.avs.models.ScriptExecutionParameterType":"Microsoft.AVS.ScriptExecutionParameterType","com.azure.resourcemanager.avs.models.ScriptExecutionProvisioningState":"Microsoft.AVS.ScriptExecutionProvisioningState","com.azure.resourcemanager.avs.models.ScriptOutputStreamType":"Microsoft.AVS.ScriptOutputStreamType","com.azure.resourcemanager.avs.models.ScriptPackageProvisioningState":"Microsoft.AVS.ScriptPackageProvisioningState","com.azure.resourcemanager.avs.models.ScriptParameter":"Microsoft.AVS.ScriptParameter","com.azure.resourcemanager.avs.models.ScriptParameterTypes":"Microsoft.AVS.ScriptParameterTypes","com.azure.resourcemanager.avs.models.ScriptSecureStringExecutionParameter":"Microsoft.AVS.ScriptSecureStringExecutionParameter","com.azure.resourcemanager.avs.models.ScriptStringExecutionParameter":"Microsoft.AVS.ScriptStringExecutionParameter","com.azure.resourcemanager.avs.models.SegmentStatusEnum":"Microsoft.AVS.SegmentStatusEnum","com.azure.resourcemanager.avs.models.Sku":"Azure.ResourceManager.CommonTypes.Sku","com.azure.resourcemanager.avs.models.SkuTier":"Azure.ResourceManager.CommonTypes.SkuTier","com.azure.resourcemanager.avs.models.SpecializedHostProperties":"Microsoft.AVS.SpecializedHostProperties","com.azure.resourcemanager.avs.models.SslEnum":"Microsoft.AVS.SslEnum","com.azure.resourcemanager.avs.models.TrialStatus":"Microsoft.AVS.TrialStatus","com.azure.resourcemanager.avs.models.VMGroupStatusEnum":"Microsoft.AVS.VMGroupStatusEnum","com.azure.resourcemanager.avs.models.VMTypeEnum":"Microsoft.AVS.VMTypeEnum","com.azure.resourcemanager.avs.models.VirtualMachineProvisioningState":"Microsoft.AVS.VirtualMachineProvisioningState","com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement":"Microsoft.AVS.VirtualMachineRestrictMovement","com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState":"Microsoft.AVS.VirtualMachineRestrictMovementState","com.azure.resourcemanager.avs.models.VisibilityParameterEnum":"Microsoft.AVS.VisibilityParameterEnum","com.azure.resourcemanager.avs.models.VmHostPlacementPolicyProperties":"Microsoft.AVS.VmHostPlacementPolicyProperties","com.azure.resourcemanager.avs.models.VmPlacementPolicyProperties":"Microsoft.AVS.VmVmPlacementPolicyProperties","com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity":"Microsoft.AVS.WorkloadNetworkDhcpEntity","com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpProvisioningState":"Microsoft.AVS.WorkloadNetworkDhcpProvisioningState","com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpRelay":"Microsoft.AVS.WorkloadNetworkDhcpRelay","com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer":"Microsoft.AVS.WorkloadNetworkDhcpServer","com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceProvisioningState":"Microsoft.AVS.WorkloadNetworkDnsServiceProvisioningState","com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneProvisioningState":"Microsoft.AVS.WorkloadNetworkDnsZoneProvisioningState","com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProvisioningState":"Microsoft.AVS.WorkloadNetworkPortMirroringProvisioningState","com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState":"Microsoft.AVS.WorkloadNetworkProvisioningState","com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIpProvisioningState":"Microsoft.AVS.WorkloadNetworkPublicIPProvisioningState","com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentPortVif":"Microsoft.AVS.WorkloadNetworkSegmentPortVif","com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentProvisioningState":"Microsoft.AVS.WorkloadNetworkSegmentProvisioningState","com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet":"Microsoft.AVS.WorkloadNetworkSegmentSubnet","com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupProvisioningState":"Microsoft.AVS.WorkloadNetworkVMGroupProvisioningState"},"generatedFiles":["src/main/java/com/azure/resourcemanager/avs/AvsManager.java","src/main/java/com/azure/resourcemanager/avs/fluent/AddonsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/AuthorizationsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/AvsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/CloudLinksClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/ClustersClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/DatastoresClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/GlobalReachConnectionsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/HcxEnterpriseSitesClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/HostsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/LocationsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/PlacementPoliciesClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/PrivateCloudsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/ProvisionedNetworksClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/PureStoragePoliciesClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/ScriptCmdletsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/ScriptPackagesClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/SkusClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/VirtualMachinesClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworksClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/HostModelInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ProvisionedNetworkInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/PureStoragePolicyInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ResourceSkuInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/avs/fluent/package-info.java","src/main/java/com/azure/resourcemanager/avs/implementation/AddonImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/AddonsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/AdminCredentialsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java","src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinkImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ClusterImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ClusterZoneListImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ClustersImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/DatastoreImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ExpressRouteAuthorizationImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSiteImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/HostModelImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/HostsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/HostsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/LocationsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPolicyImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworkImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworksClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworksImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePoliciesImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePolicyImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/QuotaImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/avs/implementation/ResourceSkuImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackageImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/SkusClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/SkusImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/TrialImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachineImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewayImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachineImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/AddonList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/CloudLinkList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/ClusterList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/DatastoreList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/ExpressRouteAuthorizationList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/GlobalReachConnectionList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/HcxEnterpriseSiteList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/HostListResult.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/IscsiPathListResult.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/PagedResourceSku.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/PlacementPoliciesList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/PrivateCloudList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/ProvisionedNetworkListResult.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/PureStoragePolicyListResult.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptCmdletsList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptPackagesList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/VirtualMachinesList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDhcpList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsServicesList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsZonesList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkGatewayList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPortMirroringList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPublicIPsList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkSegmentsList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVMGroupsList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVirtualMachinesList.java","src/main/java/com/azure/resourcemanager/avs/implementation/package-info.java","src/main/java/com/azure/resourcemanager/avs/models/ActionType.java","src/main/java/com/azure/resourcemanager/avs/models/Addon.java","src/main/java/com/azure/resourcemanager/avs/models/AddonArcProperties.java","src/main/java/com/azure/resourcemanager/avs/models/AddonHcxProperties.java","src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java","src/main/java/com/azure/resourcemanager/avs/models/AddonProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/AddonSrmProperties.java","src/main/java/com/azure/resourcemanager/avs/models/AddonType.java","src/main/java/com/azure/resourcemanager/avs/models/AddonVrProperties.java","src/main/java/com/azure/resourcemanager/avs/models/Addons.java","src/main/java/com/azure/resourcemanager/avs/models/AdminCredentials.java","src/main/java/com/azure/resourcemanager/avs/models/AffinityStrength.java","src/main/java/com/azure/resourcemanager/avs/models/AffinityType.java","src/main/java/com/azure/resourcemanager/avs/models/Authorizations.java","src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java","src/main/java/com/azure/resourcemanager/avs/models/AvailabilityStrategy.java","src/main/java/com/azure/resourcemanager/avs/models/AzureHybridBenefitType.java","src/main/java/com/azure/resourcemanager/avs/models/Circuit.java","src/main/java/com/azure/resourcemanager/avs/models/CloudLink.java","src/main/java/com/azure/resourcemanager/avs/models/CloudLinkProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/CloudLinkStatus.java","src/main/java/com/azure/resourcemanager/avs/models/CloudLinks.java","src/main/java/com/azure/resourcemanager/avs/models/Cluster.java","src/main/java/com/azure/resourcemanager/avs/models/ClusterProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java","src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java","src/main/java/com/azure/resourcemanager/avs/models/ClusterZoneList.java","src/main/java/com/azure/resourcemanager/avs/models/Clusters.java","src/main/java/com/azure/resourcemanager/avs/models/Datastore.java","src/main/java/com/azure/resourcemanager/avs/models/DatastoreProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/DatastoreStatus.java","src/main/java/com/azure/resourcemanager/avs/models/Datastores.java","src/main/java/com/azure/resourcemanager/avs/models/DhcpTypeEnum.java","src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java","src/main/java/com/azure/resourcemanager/avs/models/DnsServiceLogLevelEnum.java","src/main/java/com/azure/resourcemanager/avs/models/DnsServiceStatusEnum.java","src/main/java/com/azure/resourcemanager/avs/models/DnsZoneType.java","src/main/java/com/azure/resourcemanager/avs/models/ElasticSanVolume.java","src/main/java/com/azure/resourcemanager/avs/models/Encryption.java","src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyStatus.java","src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java","src/main/java/com/azure/resourcemanager/avs/models/EncryptionState.java","src/main/java/com/azure/resourcemanager/avs/models/EncryptionVersionType.java","src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java","src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorization.java","src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/GeneralHostProperties.java","src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnection.java","src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionStatus.java","src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnections.java","src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSite.java","src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteStatus.java","src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSites.java","src/main/java/com/azure/resourcemanager/avs/models/HostKind.java","src/main/java/com/azure/resourcemanager/avs/models/HostMaintenance.java","src/main/java/com/azure/resourcemanager/avs/models/HostModel.java","src/main/java/com/azure/resourcemanager/avs/models/HostProperties.java","src/main/java/com/azure/resourcemanager/avs/models/HostProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/Hosts.java","src/main/java/com/azure/resourcemanager/avs/models/IdentitySource.java","src/main/java/com/azure/resourcemanager/avs/models/InternetEnum.java","src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java","src/main/java/com/azure/resourcemanager/avs/models/IscsiPathProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java","src/main/java/com/azure/resourcemanager/avs/models/Locations.java","src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java","src/main/java/com/azure/resourcemanager/avs/models/MountOptionEnum.java","src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java","src/main/java/com/azure/resourcemanager/avs/models/NsxPublicIpQuotaRaisedEnum.java","src/main/java/com/azure/resourcemanager/avs/models/Operation.java","src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/avs/models/Operations.java","src/main/java/com/azure/resourcemanager/avs/models/OptionalParamEnum.java","src/main/java/com/azure/resourcemanager/avs/models/Origin.java","src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java","src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicies.java","src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicy.java","src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java","src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyState.java","src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyType.java","src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java","src/main/java/com/azure/resourcemanager/avs/models/PortMirroringDirectionEnum.java","src/main/java/com/azure/resourcemanager/avs/models/PortMirroringStatusEnum.java","src/main/java/com/azure/resourcemanager/avs/models/PrivateCloud.java","src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java","src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java","src/main/java/com/azure/resourcemanager/avs/models/PrivateClouds.java","src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetwork.java","src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkProperties.java","src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkTypes.java","src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworks.java","src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicies.java","src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicy.java","src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicyProperties.java","src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicyProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/PureStorageVolume.java","src/main/java/com/azure/resourcemanager/avs/models/Quota.java","src/main/java/com/azure/resourcemanager/avs/models/QuotaEnabled.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSku.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuCapabilities.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuLocationInfo.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuResourceType.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionInfo.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictions.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionsReasonCode.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionsType.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuZoneDetails.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlet.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletAudience.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlets.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptPackage.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptPackageProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptPackages.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptParameterTypes.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java","src/main/java/com/azure/resourcemanager/avs/models/SegmentStatusEnum.java","src/main/java/com/azure/resourcemanager/avs/models/Sku.java","src/main/java/com/azure/resourcemanager/avs/models/SkuTier.java","src/main/java/com/azure/resourcemanager/avs/models/Skus.java","src/main/java/com/azure/resourcemanager/avs/models/SpecializedHostProperties.java","src/main/java/com/azure/resourcemanager/avs/models/SslEnum.java","src/main/java/com/azure/resourcemanager/avs/models/Trial.java","src/main/java/com/azure/resourcemanager/avs/models/TrialStatus.java","src/main/java/com/azure/resourcemanager/avs/models/VMGroupStatusEnum.java","src/main/java/com/azure/resourcemanager/avs/models/VMTypeEnum.java","src/main/java/com/azure/resourcemanager/avs/models/VirtualMachine.java","src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java","src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovementState.java","src/main/java/com/azure/resourcemanager/avs/models/VirtualMachines.java","src/main/java/com/azure/resourcemanager/avs/models/VisibilityParameterEnum.java","src/main/java/com/azure/resourcemanager/avs/models/VmHostPlacementPolicyProperties.java","src/main/java/com/azure/resourcemanager/avs/models/VmPlacementPolicyProperties.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetwork.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpRelay.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpServer.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateway.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachine.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java","src/main/java/com/azure/resourcemanager/avs/models/package-info.java","src/main/java/com/azure/resourcemanager/avs/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersion":"2025-09-01","crossLanguageDefinitions":{"com.azure.resourcemanager.avs.fluent.AddonsClient":"Microsoft.AVS.Addons","com.azure.resourcemanager.avs.fluent.AddonsClient.beginCreateOrUpdate":"Microsoft.AVS.Addons.createOrUpdate","com.azure.resourcemanager.avs.fluent.AddonsClient.beginDelete":"Microsoft.AVS.Addons.delete","com.azure.resourcemanager.avs.fluent.AddonsClient.createOrUpdate":"Microsoft.AVS.Addons.createOrUpdate","com.azure.resourcemanager.avs.fluent.AddonsClient.delete":"Microsoft.AVS.Addons.delete","com.azure.resourcemanager.avs.fluent.AddonsClient.get":"Microsoft.AVS.Addons.get","com.azure.resourcemanager.avs.fluent.AddonsClient.getWithResponse":"Microsoft.AVS.Addons.get","com.azure.resourcemanager.avs.fluent.AddonsClient.list":"Microsoft.AVS.Addons.list","com.azure.resourcemanager.avs.fluent.AuthorizationsClient":"Microsoft.AVS.Authorizations","com.azure.resourcemanager.avs.fluent.AuthorizationsClient.beginCreateOrUpdate":"Microsoft.AVS.Authorizations.createOrUpdate","com.azure.resourcemanager.avs.fluent.AuthorizationsClient.beginDelete":"Microsoft.AVS.Authorizations.delete","com.azure.resourcemanager.avs.fluent.AuthorizationsClient.createOrUpdate":"Microsoft.AVS.Authorizations.createOrUpdate","com.azure.resourcemanager.avs.fluent.AuthorizationsClient.delete":"Microsoft.AVS.Authorizations.delete","com.azure.resourcemanager.avs.fluent.AuthorizationsClient.get":"Microsoft.AVS.Authorizations.get","com.azure.resourcemanager.avs.fluent.AuthorizationsClient.getWithResponse":"Microsoft.AVS.Authorizations.get","com.azure.resourcemanager.avs.fluent.AuthorizationsClient.list":"Microsoft.AVS.Authorizations.list","com.azure.resourcemanager.avs.fluent.AvsClient":"Microsoft.AVS","com.azure.resourcemanager.avs.fluent.CloudLinksClient":"Microsoft.AVS.CloudLinks","com.azure.resourcemanager.avs.fluent.CloudLinksClient.beginCreateOrUpdate":"Microsoft.AVS.CloudLinks.createOrUpdate","com.azure.resourcemanager.avs.fluent.CloudLinksClient.beginDelete":"Microsoft.AVS.CloudLinks.delete","com.azure.resourcemanager.avs.fluent.CloudLinksClient.createOrUpdate":"Microsoft.AVS.CloudLinks.createOrUpdate","com.azure.resourcemanager.avs.fluent.CloudLinksClient.delete":"Microsoft.AVS.CloudLinks.delete","com.azure.resourcemanager.avs.fluent.CloudLinksClient.get":"Microsoft.AVS.CloudLinks.get","com.azure.resourcemanager.avs.fluent.CloudLinksClient.getWithResponse":"Microsoft.AVS.CloudLinks.get","com.azure.resourcemanager.avs.fluent.CloudLinksClient.list":"Microsoft.AVS.CloudLinks.list","com.azure.resourcemanager.avs.fluent.ClustersClient":"Microsoft.AVS.Clusters","com.azure.resourcemanager.avs.fluent.ClustersClient.beginCreateOrUpdate":"Microsoft.AVS.Clusters.createOrUpdate","com.azure.resourcemanager.avs.fluent.ClustersClient.beginDelete":"Microsoft.AVS.Clusters.delete","com.azure.resourcemanager.avs.fluent.ClustersClient.beginUpdate":"Microsoft.AVS.Clusters.update","com.azure.resourcemanager.avs.fluent.ClustersClient.createOrUpdate":"Microsoft.AVS.Clusters.createOrUpdate","com.azure.resourcemanager.avs.fluent.ClustersClient.delete":"Microsoft.AVS.Clusters.delete","com.azure.resourcemanager.avs.fluent.ClustersClient.get":"Microsoft.AVS.Clusters.get","com.azure.resourcemanager.avs.fluent.ClustersClient.getWithResponse":"Microsoft.AVS.Clusters.get","com.azure.resourcemanager.avs.fluent.ClustersClient.list":"Microsoft.AVS.Clusters.list","com.azure.resourcemanager.avs.fluent.ClustersClient.listZones":"Microsoft.AVS.Clusters.listZones","com.azure.resourcemanager.avs.fluent.ClustersClient.listZonesWithResponse":"Microsoft.AVS.Clusters.listZones","com.azure.resourcemanager.avs.fluent.ClustersClient.update":"Microsoft.AVS.Clusters.update","com.azure.resourcemanager.avs.fluent.DatastoresClient":"Microsoft.AVS.Datastores","com.azure.resourcemanager.avs.fluent.DatastoresClient.beginCreateOrUpdate":"Microsoft.AVS.Datastores.createOrUpdate","com.azure.resourcemanager.avs.fluent.DatastoresClient.beginDelete":"Microsoft.AVS.Datastores.delete","com.azure.resourcemanager.avs.fluent.DatastoresClient.createOrUpdate":"Microsoft.AVS.Datastores.createOrUpdate","com.azure.resourcemanager.avs.fluent.DatastoresClient.delete":"Microsoft.AVS.Datastores.delete","com.azure.resourcemanager.avs.fluent.DatastoresClient.get":"Microsoft.AVS.Datastores.get","com.azure.resourcemanager.avs.fluent.DatastoresClient.getWithResponse":"Microsoft.AVS.Datastores.get","com.azure.resourcemanager.avs.fluent.DatastoresClient.list":"Microsoft.AVS.Datastores.list","com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient":"Microsoft.AVS.GlobalReachConnections","com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient.beginCreateOrUpdate":"Microsoft.AVS.GlobalReachConnections.createOrUpdate","com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient.beginDelete":"Microsoft.AVS.GlobalReachConnections.delete","com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient.createOrUpdate":"Microsoft.AVS.GlobalReachConnections.createOrUpdate","com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient.delete":"Microsoft.AVS.GlobalReachConnections.delete","com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient.get":"Microsoft.AVS.GlobalReachConnections.get","com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient.getWithResponse":"Microsoft.AVS.GlobalReachConnections.get","com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient.list":"Microsoft.AVS.GlobalReachConnections.list","com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient":"Microsoft.AVS.HcxEnterpriseSites","com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient.createOrUpdate":"Microsoft.AVS.HcxEnterpriseSites.createOrUpdate","com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient.createOrUpdateWithResponse":"Microsoft.AVS.HcxEnterpriseSites.createOrUpdate","com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient.delete":"Microsoft.AVS.HcxEnterpriseSites.delete","com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient.deleteWithResponse":"Microsoft.AVS.HcxEnterpriseSites.delete","com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient.get":"Microsoft.AVS.HcxEnterpriseSites.get","com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient.getWithResponse":"Microsoft.AVS.HcxEnterpriseSites.get","com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient.list":"Microsoft.AVS.HcxEnterpriseSites.list","com.azure.resourcemanager.avs.fluent.HostsClient":"Microsoft.AVS.Hosts","com.azure.resourcemanager.avs.fluent.HostsClient.get":"Microsoft.AVS.Hosts.get","com.azure.resourcemanager.avs.fluent.HostsClient.getWithResponse":"Microsoft.AVS.Hosts.get","com.azure.resourcemanager.avs.fluent.HostsClient.list":"Microsoft.AVS.Hosts.list","com.azure.resourcemanager.avs.fluent.IscsiPathsClient":"Microsoft.AVS.IscsiPaths","com.azure.resourcemanager.avs.fluent.IscsiPathsClient.beginCreateOrUpdate":"Microsoft.AVS.IscsiPaths.createOrUpdate","com.azure.resourcemanager.avs.fluent.IscsiPathsClient.beginDelete":"Microsoft.AVS.IscsiPaths.delete","com.azure.resourcemanager.avs.fluent.IscsiPathsClient.createOrUpdate":"Microsoft.AVS.IscsiPaths.createOrUpdate","com.azure.resourcemanager.avs.fluent.IscsiPathsClient.delete":"Microsoft.AVS.IscsiPaths.delete","com.azure.resourcemanager.avs.fluent.IscsiPathsClient.get":"Microsoft.AVS.IscsiPaths.get","com.azure.resourcemanager.avs.fluent.IscsiPathsClient.getWithResponse":"Microsoft.AVS.IscsiPaths.get","com.azure.resourcemanager.avs.fluent.IscsiPathsClient.listByPrivateCloud":"Microsoft.AVS.IscsiPaths.listByPrivateCloud","com.azure.resourcemanager.avs.fluent.LicensesClient":"Microsoft.AVS.Licenses","com.azure.resourcemanager.avs.fluent.LicensesClient.beginCreateOrUpdate":"Microsoft.AVS.Licenses.createOrUpdate","com.azure.resourcemanager.avs.fluent.LicensesClient.beginDelete":"Microsoft.AVS.Licenses.delete","com.azure.resourcemanager.avs.fluent.LicensesClient.createOrUpdate":"Microsoft.AVS.Licenses.createOrUpdate","com.azure.resourcemanager.avs.fluent.LicensesClient.delete":"Microsoft.AVS.Licenses.delete","com.azure.resourcemanager.avs.fluent.LicensesClient.get":"Microsoft.AVS.Licenses.get","com.azure.resourcemanager.avs.fluent.LicensesClient.getProperties":"Microsoft.AVS.Licenses.getProperties","com.azure.resourcemanager.avs.fluent.LicensesClient.getPropertiesWithResponse":"Microsoft.AVS.Licenses.getProperties","com.azure.resourcemanager.avs.fluent.LicensesClient.getWithResponse":"Microsoft.AVS.Licenses.get","com.azure.resourcemanager.avs.fluent.LicensesClient.list":"Microsoft.AVS.Licenses.list","com.azure.resourcemanager.avs.fluent.LocationsClient":"Microsoft.AVS.Locations","com.azure.resourcemanager.avs.fluent.LocationsClient.checkQuotaAvailability":"Microsoft.AVS.Locations.checkQuotaAvailability","com.azure.resourcemanager.avs.fluent.LocationsClient.checkQuotaAvailabilityWithResponse":"Microsoft.AVS.Locations.checkQuotaAvailability","com.azure.resourcemanager.avs.fluent.LocationsClient.checkTrialAvailability":"Microsoft.AVS.Locations.checkTrialAvailability","com.azure.resourcemanager.avs.fluent.LocationsClient.checkTrialAvailabilityWithResponse":"Microsoft.AVS.Locations.checkTrialAvailability","com.azure.resourcemanager.avs.fluent.MaintenancesClient":"Microsoft.AVS.Maintenances","com.azure.resourcemanager.avs.fluent.MaintenancesClient.get":"Microsoft.AVS.Maintenances.get","com.azure.resourcemanager.avs.fluent.MaintenancesClient.getWithResponse":"Microsoft.AVS.Maintenances.get","com.azure.resourcemanager.avs.fluent.MaintenancesClient.initiateChecks":"Microsoft.AVS.Maintenances.initiateChecks","com.azure.resourcemanager.avs.fluent.MaintenancesClient.initiateChecksWithResponse":"Microsoft.AVS.Maintenances.initiateChecks","com.azure.resourcemanager.avs.fluent.MaintenancesClient.list":"Microsoft.AVS.Maintenances.list","com.azure.resourcemanager.avs.fluent.MaintenancesClient.reschedule":"Microsoft.AVS.Maintenances.reschedule","com.azure.resourcemanager.avs.fluent.MaintenancesClient.rescheduleWithResponse":"Microsoft.AVS.Maintenances.reschedule","com.azure.resourcemanager.avs.fluent.MaintenancesClient.schedule":"Microsoft.AVS.Maintenances.schedule","com.azure.resourcemanager.avs.fluent.MaintenancesClient.scheduleWithResponse":"Microsoft.AVS.Maintenances.schedule","com.azure.resourcemanager.avs.fluent.OperationsClient":"Microsoft.AVS.Operations","com.azure.resourcemanager.avs.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient":"Microsoft.AVS.PlacementPolicies","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.beginCreateOrUpdate":"Microsoft.AVS.PlacementPolicies.createOrUpdate","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.beginDelete":"Microsoft.AVS.PlacementPolicies.delete","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.beginUpdate":"Microsoft.AVS.PlacementPolicies.update","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.createOrUpdate":"Microsoft.AVS.PlacementPolicies.createOrUpdate","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.delete":"Microsoft.AVS.PlacementPolicies.delete","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.get":"Microsoft.AVS.PlacementPolicies.get","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.getWithResponse":"Microsoft.AVS.PlacementPolicies.get","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.list":"Microsoft.AVS.PlacementPolicies.list","com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient.update":"Microsoft.AVS.PlacementPolicies.update","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient":"Microsoft.AVS.PrivateClouds","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.beginCreateOrUpdate":"Microsoft.AVS.PrivateClouds.createOrUpdate","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.beginDelete":"Microsoft.AVS.PrivateClouds.delete","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.beginRotateNsxtPassword":"Microsoft.AVS.PrivateClouds.rotateNsxtPassword","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.beginRotateVcenterPassword":"Microsoft.AVS.PrivateClouds.rotateVcenterPassword","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.beginUpdate":"Microsoft.AVS.PrivateClouds.update","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.createOrUpdate":"Microsoft.AVS.PrivateClouds.createOrUpdate","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.delete":"Microsoft.AVS.PrivateClouds.delete","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.getByResourceGroup":"Microsoft.AVS.PrivateClouds.get","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.getByResourceGroupWithResponse":"Microsoft.AVS.PrivateClouds.get","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.getVcfLicense":"Microsoft.AVS.PrivateClouds.getVcfLicense","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.getVcfLicenseWithResponse":"Microsoft.AVS.PrivateClouds.getVcfLicense","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.list":"Microsoft.AVS.PrivateClouds.listInSubscription","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.listAdminCredentials":"Microsoft.AVS.PrivateClouds.listAdminCredentials","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.listAdminCredentialsWithResponse":"Microsoft.AVS.PrivateClouds.listAdminCredentials","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.listByResourceGroup":"Microsoft.AVS.PrivateClouds.list","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.rotateNsxtPassword":"Microsoft.AVS.PrivateClouds.rotateNsxtPassword","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.rotateVcenterPassword":"Microsoft.AVS.PrivateClouds.rotateVcenterPassword","com.azure.resourcemanager.avs.fluent.PrivateCloudsClient.update":"Microsoft.AVS.PrivateClouds.update","com.azure.resourcemanager.avs.fluent.ProvisionedNetworksClient":"Microsoft.AVS.ProvisionedNetworks","com.azure.resourcemanager.avs.fluent.ProvisionedNetworksClient.get":"Microsoft.AVS.ProvisionedNetworks.get","com.azure.resourcemanager.avs.fluent.ProvisionedNetworksClient.getWithResponse":"Microsoft.AVS.ProvisionedNetworks.get","com.azure.resourcemanager.avs.fluent.ProvisionedNetworksClient.list":"Microsoft.AVS.ProvisionedNetworks.list","com.azure.resourcemanager.avs.fluent.PureStoragePoliciesClient":"Microsoft.AVS.PureStoragePolicies","com.azure.resourcemanager.avs.fluent.PureStoragePoliciesClient.beginCreateOrUpdate":"Microsoft.AVS.PureStoragePolicies.createOrUpdate","com.azure.resourcemanager.avs.fluent.PureStoragePoliciesClient.beginDelete":"Microsoft.AVS.PureStoragePolicies.delete","com.azure.resourcemanager.avs.fluent.PureStoragePoliciesClient.createOrUpdate":"Microsoft.AVS.PureStoragePolicies.createOrUpdate","com.azure.resourcemanager.avs.fluent.PureStoragePoliciesClient.delete":"Microsoft.AVS.PureStoragePolicies.delete","com.azure.resourcemanager.avs.fluent.PureStoragePoliciesClient.get":"Microsoft.AVS.PureStoragePolicies.get","com.azure.resourcemanager.avs.fluent.PureStoragePoliciesClient.getWithResponse":"Microsoft.AVS.PureStoragePolicies.get","com.azure.resourcemanager.avs.fluent.PureStoragePoliciesClient.list":"Microsoft.AVS.PureStoragePolicies.list","com.azure.resourcemanager.avs.fluent.ScriptCmdletsClient":"Microsoft.AVS.ScriptCmdlets","com.azure.resourcemanager.avs.fluent.ScriptCmdletsClient.get":"Microsoft.AVS.ScriptCmdlets.get","com.azure.resourcemanager.avs.fluent.ScriptCmdletsClient.getWithResponse":"Microsoft.AVS.ScriptCmdlets.get","com.azure.resourcemanager.avs.fluent.ScriptCmdletsClient.list":"Microsoft.AVS.ScriptCmdlets.list","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient":"Microsoft.AVS.ScriptExecutions","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.beginCreateOrUpdate":"Microsoft.AVS.ScriptExecutions.createOrUpdate","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.beginDelete":"Microsoft.AVS.ScriptExecutions.delete","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.createOrUpdate":"Microsoft.AVS.ScriptExecutions.createOrUpdate","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.delete":"Microsoft.AVS.ScriptExecutions.delete","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.get":"Microsoft.AVS.ScriptExecutions.get","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.getExecutionLogs":"Microsoft.AVS.ScriptExecutions.getExecutionLogs","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.getExecutionLogsWithResponse":"Microsoft.AVS.ScriptExecutions.getExecutionLogs","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.getWithResponse":"Microsoft.AVS.ScriptExecutions.get","com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient.list":"Microsoft.AVS.ScriptExecutions.list","com.azure.resourcemanager.avs.fluent.ScriptPackagesClient":"Microsoft.AVS.ScriptPackages","com.azure.resourcemanager.avs.fluent.ScriptPackagesClient.get":"Microsoft.AVS.ScriptPackages.get","com.azure.resourcemanager.avs.fluent.ScriptPackagesClient.getWithResponse":"Microsoft.AVS.ScriptPackages.get","com.azure.resourcemanager.avs.fluent.ScriptPackagesClient.list":"Microsoft.AVS.ScriptPackages.list","com.azure.resourcemanager.avs.fluent.SkusClient":"Microsoft.AVS.Skus","com.azure.resourcemanager.avs.fluent.SkusClient.list":"Microsoft.AVS.Skus.list","com.azure.resourcemanager.avs.fluent.VirtualMachinesClient":"Microsoft.AVS.VirtualMachines","com.azure.resourcemanager.avs.fluent.VirtualMachinesClient.beginRestrictMovement":"Microsoft.AVS.VirtualMachines.restrictMovement","com.azure.resourcemanager.avs.fluent.VirtualMachinesClient.get":"Microsoft.AVS.VirtualMachines.get","com.azure.resourcemanager.avs.fluent.VirtualMachinesClient.getWithResponse":"Microsoft.AVS.VirtualMachines.get","com.azure.resourcemanager.avs.fluent.VirtualMachinesClient.list":"Microsoft.AVS.VirtualMachines.list","com.azure.resourcemanager.avs.fluent.VirtualMachinesClient.restrictMovement":"Microsoft.AVS.VirtualMachines.restrictMovement","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient":"Microsoft.AVS.WorkloadNetworks","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginCreateDhcp":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginCreateDnsService":"Microsoft.AVS.WorkloadNetworkDnsServices.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginCreateDnsZone":"Microsoft.AVS.WorkloadNetworkDnsZones.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginCreatePortMirroring":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginCreatePublicIp":"Microsoft.AVS.WorkloadNetworkPublicIps.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginCreateSegments":"Microsoft.AVS.WorkloadNetworkSegments.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginCreateVMGroup":"Microsoft.AVS.WorkloadNetworkVmGroups.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginDeleteDhcp":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginDeleteDnsService":"Microsoft.AVS.WorkloadNetworkDnsServices.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginDeleteDnsZone":"Microsoft.AVS.WorkloadNetworkDnsZones.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginDeletePortMirroring":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginDeletePublicIp":"Microsoft.AVS.WorkloadNetworkPublicIps.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginDeleteSegment":"Microsoft.AVS.WorkloadNetworkSegments.deleteSegment","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginDeleteVMGroup":"Microsoft.AVS.WorkloadNetworkVmGroups.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginUpdateDhcp":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginUpdateDnsService":"Microsoft.AVS.WorkloadNetworkDnsServices.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginUpdateDnsZone":"Microsoft.AVS.WorkloadNetworkDnsZones.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginUpdatePortMirroring":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginUpdateSegments":"Microsoft.AVS.WorkloadNetworkSegments.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.beginUpdateVMGroup":"Microsoft.AVS.WorkloadNetworkVmGroups.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.createDhcp":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.createDnsService":"Microsoft.AVS.WorkloadNetworkDnsServices.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.createDnsZone":"Microsoft.AVS.WorkloadNetworkDnsZones.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.createPortMirroring":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.createPublicIp":"Microsoft.AVS.WorkloadNetworkPublicIps.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.createSegments":"Microsoft.AVS.WorkloadNetworkSegments.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.createVMGroup":"Microsoft.AVS.WorkloadNetworkVmGroups.create","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.deleteDhcp":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.deleteDnsService":"Microsoft.AVS.WorkloadNetworkDnsServices.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.deleteDnsZone":"Microsoft.AVS.WorkloadNetworkDnsZones.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.deletePortMirroring":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.deletePublicIp":"Microsoft.AVS.WorkloadNetworkPublicIps.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.deleteSegment":"Microsoft.AVS.WorkloadNetworkSegments.deleteSegment","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.deleteVMGroup":"Microsoft.AVS.WorkloadNetworkVmGroups.delete","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.get":"Microsoft.AVS.WorkloadNetworks.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getDhcp":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getDhcpWithResponse":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getDnsService":"Microsoft.AVS.WorkloadNetworkDnsServices.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getDnsServiceWithResponse":"Microsoft.AVS.WorkloadNetworkDnsServices.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getDnsZone":"Microsoft.AVS.WorkloadNetworkDnsZones.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getDnsZoneWithResponse":"Microsoft.AVS.WorkloadNetworkDnsZones.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getGateway":"Microsoft.AVS.WorkloadNetworkGateways.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getGatewayWithResponse":"Microsoft.AVS.WorkloadNetworkGateways.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getPortMirroring":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getPortMirroringWithResponse":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getPublicIp":"Microsoft.AVS.WorkloadNetworkPublicIps.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getPublicIpWithResponse":"Microsoft.AVS.WorkloadNetworkPublicIps.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getSegment":"Microsoft.AVS.WorkloadNetworkSegments.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getSegmentWithResponse":"Microsoft.AVS.WorkloadNetworkSegments.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getVMGroup":"Microsoft.AVS.WorkloadNetworkVmGroups.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getVMGroupWithResponse":"Microsoft.AVS.WorkloadNetworkVmGroups.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getVirtualMachine":"Microsoft.AVS.WorkloadNetworkVirtualMachines.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getVirtualMachineWithResponse":"Microsoft.AVS.WorkloadNetworkVirtualMachines.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.getWithResponse":"Microsoft.AVS.WorkloadNetworks.get","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.list":"Microsoft.AVS.WorkloadNetworks.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listDhcp":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listDnsServices":"Microsoft.AVS.WorkloadNetworkDnsServices.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listDnsZones":"Microsoft.AVS.WorkloadNetworkDnsZones.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listGateways":"Microsoft.AVS.WorkloadNetworkGateways.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listPortMirroring":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listPublicIPs":"Microsoft.AVS.WorkloadNetworkPublicIps.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listSegments":"Microsoft.AVS.WorkloadNetworkSegments.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listVMGroups":"Microsoft.AVS.WorkloadNetworkVmGroups.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.listVirtualMachines":"Microsoft.AVS.WorkloadNetworkVirtualMachines.list","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.updateDhcp":"Microsoft.AVS.WorkloadNetworkDhcpConfigurations.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.updateDnsService":"Microsoft.AVS.WorkloadNetworkDnsServices.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.updateDnsZone":"Microsoft.AVS.WorkloadNetworkDnsZones.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.updatePortMirroring":"Microsoft.AVS.WorkloadNetworkPortMirroringProfiles.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.updateSegments":"Microsoft.AVS.WorkloadNetworkSegments.update","com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient.updateVMGroup":"Microsoft.AVS.WorkloadNetworkVmGroups.update","com.azure.resourcemanager.avs.fluent.models.AddonInner":"Microsoft.AVS.Addon","com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner":"Microsoft.AVS.AdminCredentials","com.azure.resourcemanager.avs.fluent.models.CloudLinkInner":"Microsoft.AVS.CloudLink","com.azure.resourcemanager.avs.fluent.models.CloudLinkProperties":"Microsoft.AVS.CloudLinkProperties","com.azure.resourcemanager.avs.fluent.models.ClusterInner":"Microsoft.AVS.Cluster","com.azure.resourcemanager.avs.fluent.models.ClusterProperties":"Microsoft.AVS.ClusterProperties","com.azure.resourcemanager.avs.fluent.models.ClusterUpdateProperties":"Microsoft.AVS.ClusterUpdateProperties","com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner":"Microsoft.AVS.ClusterZoneList","com.azure.resourcemanager.avs.fluent.models.DatastoreInner":"Microsoft.AVS.Datastore","com.azure.resourcemanager.avs.fluent.models.DatastoreProperties":"Microsoft.AVS.DatastoreProperties","com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner":"Microsoft.AVS.ExpressRouteAuthorization","com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationProperties":"Microsoft.AVS.ExpressRouteAuthorizationProperties","com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner":"Microsoft.AVS.GlobalReachConnection","com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionProperties":"Microsoft.AVS.GlobalReachConnectionProperties","com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner":"Microsoft.AVS.HcxEnterpriseSite","com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteProperties":"Microsoft.AVS.HcxEnterpriseSiteProperties","com.azure.resourcemanager.avs.fluent.models.HostModelInner":"Microsoft.AVS.Host","com.azure.resourcemanager.avs.fluent.models.IscsiPathInner":"Microsoft.AVS.IscsiPath","com.azure.resourcemanager.avs.fluent.models.IscsiPathProperties":"Microsoft.AVS.IscsiPathProperties","com.azure.resourcemanager.avs.fluent.models.LicenseInner":"Microsoft.AVS.License","com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner":"Microsoft.AVS.LicenseProperties","com.azure.resourcemanager.avs.fluent.models.MaintenanceInner":"Microsoft.AVS.Maintenance","com.azure.resourcemanager.avs.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner":"Microsoft.AVS.PlacementPolicy","com.azure.resourcemanager.avs.fluent.models.PlacementPolicyUpdateProperties":"Microsoft.AVS.PlacementPolicyUpdateProperties","com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner":"Microsoft.AVS.PrivateCloud","com.azure.resourcemanager.avs.fluent.models.PrivateCloudPropertiesInner":"Microsoft.AVS.PrivateCloudProperties","com.azure.resourcemanager.avs.fluent.models.PrivateCloudUpdateProperties":"Microsoft.AVS.PrivateCloudUpdateProperties","com.azure.resourcemanager.avs.fluent.models.ProvisionedNetworkInner":"Microsoft.AVS.ProvisionedNetwork","com.azure.resourcemanager.avs.fluent.models.PureStoragePolicyInner":"Microsoft.AVS.PureStoragePolicy","com.azure.resourcemanager.avs.fluent.models.QuotaInner":"Microsoft.AVS.Quota","com.azure.resourcemanager.avs.fluent.models.ResourceSkuInner":"Microsoft.AVS.ResourceSku","com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner":"Microsoft.AVS.ScriptCmdlet","com.azure.resourcemanager.avs.fluent.models.ScriptCmdletProperties":"Microsoft.AVS.ScriptCmdletProperties","com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner":"Microsoft.AVS.ScriptExecution","com.azure.resourcemanager.avs.fluent.models.ScriptExecutionProperties":"Microsoft.AVS.ScriptExecutionProperties","com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner":"Microsoft.AVS.ScriptPackage","com.azure.resourcemanager.avs.fluent.models.ScriptPackageProperties":"Microsoft.AVS.ScriptPackageProperties","com.azure.resourcemanager.avs.fluent.models.TrialInner":"Microsoft.AVS.Trial","com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner":"Microsoft.AVS.VcfLicense","com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner":"Microsoft.AVS.VirtualMachine","com.azure.resourcemanager.avs.fluent.models.VirtualMachineProperties":"Microsoft.AVS.VirtualMachineProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner":"Microsoft.AVS.WorkloadNetworkDhcp","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner":"Microsoft.AVS.WorkloadNetworkDnsService","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceProperties":"Microsoft.AVS.WorkloadNetworkDnsServiceProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner":"Microsoft.AVS.WorkloadNetworkDnsZone","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneProperties":"Microsoft.AVS.WorkloadNetworkDnsZoneProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner":"Microsoft.AVS.WorkloadNetworkGateway","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayProperties":"Microsoft.AVS.WorkloadNetworkGatewayProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner":"Microsoft.AVS.WorkloadNetwork","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner":"Microsoft.AVS.WorkloadNetworkPortMirroring","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringProperties":"Microsoft.AVS.WorkloadNetworkPortMirroringProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkProperties":"Microsoft.AVS.WorkloadNetworkProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner":"Microsoft.AVS.WorkloadNetworkPublicIP","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpProperties":"Microsoft.AVS.WorkloadNetworkPublicIPProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner":"Microsoft.AVS.WorkloadNetworkSegment","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentProperties":"Microsoft.AVS.WorkloadNetworkSegmentProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner":"Microsoft.AVS.WorkloadNetworkVMGroup","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupProperties":"Microsoft.AVS.WorkloadNetworkVMGroupProperties","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner":"Microsoft.AVS.WorkloadNetworkVirtualMachine","com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineProperties":"Microsoft.AVS.WorkloadNetworkVirtualMachineProperties","com.azure.resourcemanager.avs.implementation.AvsClientBuilder":"Microsoft.AVS","com.azure.resourcemanager.avs.implementation.models.AddonList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.CloudLinkList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.ClusterList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.DatastoreList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.ExpressRouteAuthorizationList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.GlobalReachConnectionList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.HcxEnterpriseSiteList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.HostListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.avs.implementation.models.IscsiPathListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.avs.implementation.models.LicenseListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.avs.implementation.models.MaintenanceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.avs.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.avs.implementation.models.PagedResourceSku":"Microsoft.AVS.PagedResourceSku","com.azure.resourcemanager.avs.implementation.models.PlacementPoliciesList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.PrivateCloudList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.ProvisionedNetworkListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.avs.implementation.models.PureStoragePolicyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.avs.implementation.models.ScriptCmdletsList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.ScriptExecutionsList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.ScriptPackagesList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.VirtualMachinesList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDhcpList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsServicesList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsZonesList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkGatewayList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPortMirroringList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPublicIPsList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkSegmentsList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVMGroupsList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVirtualMachinesList":"Microsoft.AVS.ResourceList","com.azure.resourcemanager.avs.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.avs.models.AddonArcProperties":"Microsoft.AVS.AddonArcProperties","com.azure.resourcemanager.avs.models.AddonHcxProperties":"Microsoft.AVS.AddonHcxProperties","com.azure.resourcemanager.avs.models.AddonProperties":"Microsoft.AVS.AddonProperties","com.azure.resourcemanager.avs.models.AddonProvisioningState":"Microsoft.AVS.AddonProvisioningState","com.azure.resourcemanager.avs.models.AddonSrmProperties":"Microsoft.AVS.AddonSrmProperties","com.azure.resourcemanager.avs.models.AddonType":"Microsoft.AVS.AddonType","com.azure.resourcemanager.avs.models.AddonVrProperties":"Microsoft.AVS.AddonVrProperties","com.azure.resourcemanager.avs.models.AffinityStrength":"Microsoft.AVS.AffinityStrength","com.azure.resourcemanager.avs.models.AffinityType":"Microsoft.AVS.AffinityType","com.azure.resourcemanager.avs.models.AvailabilityProperties":"Microsoft.AVS.AvailabilityProperties","com.azure.resourcemanager.avs.models.AvailabilityStrategy":"Microsoft.AVS.AvailabilityStrategy","com.azure.resourcemanager.avs.models.AvailableWindowForMaintenanceWhileRescheduleOperation":"Microsoft.AVS.AvailableWindowForMaintenanceWhileRescheduleOperation","com.azure.resourcemanager.avs.models.AvailableWindowForMaintenanceWhileScheduleOperation":"Microsoft.AVS.AvailableWindowForMaintenanceWhileScheduleOperation","com.azure.resourcemanager.avs.models.AzureHybridBenefitType":"Microsoft.AVS.AzureHybridBenefitType","com.azure.resourcemanager.avs.models.BlockedDatesConstraintCategory":"Microsoft.AVS.BlockedDatesConstraintCategory","com.azure.resourcemanager.avs.models.BlockedDatesConstraintTimeRange":"Microsoft.AVS.BlockedDatesConstraintTimeRange","com.azure.resourcemanager.avs.models.BlockedWhileRescheduleOperation":"Microsoft.AVS.BlockedWhileRescheduleOperation","com.azure.resourcemanager.avs.models.BlockedWhileScheduleOperation":"Microsoft.AVS.BlockedWhileScheduleOperation","com.azure.resourcemanager.avs.models.Circuit":"Microsoft.AVS.Circuit","com.azure.resourcemanager.avs.models.CloudLinkProvisioningState":"Microsoft.AVS.CloudLinkProvisioningState","com.azure.resourcemanager.avs.models.CloudLinkStatus":"Microsoft.AVS.CloudLinkStatus","com.azure.resourcemanager.avs.models.ClusterProvisioningState":"Microsoft.AVS.ClusterProvisioningState","com.azure.resourcemanager.avs.models.ClusterUpdate":"Microsoft.AVS.ClusterUpdate","com.azure.resourcemanager.avs.models.ClusterZone":"Microsoft.AVS.ClusterZone","com.azure.resourcemanager.avs.models.DatastoreProvisioningState":"Microsoft.AVS.DatastoreProvisioningState","com.azure.resourcemanager.avs.models.DatastoreStatus":"Microsoft.AVS.DatastoreStatus","com.azure.resourcemanager.avs.models.DhcpTypeEnum":"Microsoft.AVS.DhcpTypeEnum","com.azure.resourcemanager.avs.models.DiskPoolVolume":"Microsoft.AVS.DiskPoolVolume","com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum":"Microsoft.AVS.DnsServiceLogLevelEnum","com.azure.resourcemanager.avs.models.DnsServiceStatusEnum":"Microsoft.AVS.DnsServiceStatusEnum","com.azure.resourcemanager.avs.models.DnsZoneType":"Microsoft.AVS.DnsZoneType","com.azure.resourcemanager.avs.models.ElasticSanVolume":"Microsoft.AVS.ElasticSanVolume","com.azure.resourcemanager.avs.models.Encryption":"Microsoft.AVS.Encryption","com.azure.resourcemanager.avs.models.EncryptionKeyStatus":"Microsoft.AVS.EncryptionKeyStatus","com.azure.resourcemanager.avs.models.EncryptionKeyVaultProperties":"Microsoft.AVS.EncryptionKeyVaultProperties","com.azure.resourcemanager.avs.models.EncryptionState":"Microsoft.AVS.EncryptionState","com.azure.resourcemanager.avs.models.EncryptionVersionType":"Microsoft.AVS.EncryptionVersionType","com.azure.resourcemanager.avs.models.Endpoints":"Microsoft.AVS.Endpoints","com.azure.resourcemanager.avs.models.ExpressRouteAuthorizationProvisioningState":"Microsoft.AVS.ExpressRouteAuthorizationProvisioningState","com.azure.resourcemanager.avs.models.GeneralHostProperties":"Microsoft.AVS.GeneralHostProperties","com.azure.resourcemanager.avs.models.GlobalReachConnectionProvisioningState":"Microsoft.AVS.GlobalReachConnectionProvisioningState","com.azure.resourcemanager.avs.models.GlobalReachConnectionStatus":"Microsoft.AVS.GlobalReachConnectionStatus","com.azure.resourcemanager.avs.models.HcxEnterpriseSiteProvisioningState":"Microsoft.AVS.HcxEnterpriseSiteProvisioningState","com.azure.resourcemanager.avs.models.HcxEnterpriseSiteStatus":"Microsoft.AVS.HcxEnterpriseSiteStatus","com.azure.resourcemanager.avs.models.HostKind":"Microsoft.AVS.HostKind","com.azure.resourcemanager.avs.models.HostMaintenance":"Microsoft.AVS.HostMaintenance","com.azure.resourcemanager.avs.models.HostProperties":"Microsoft.AVS.HostProperties","com.azure.resourcemanager.avs.models.HostProvisioningState":"Microsoft.AVS.HostProvisioningState","com.azure.resourcemanager.avs.models.IdentitySource":"Microsoft.AVS.IdentitySource","com.azure.resourcemanager.avs.models.ImpactedMaintenanceResource":"Microsoft.AVS.ImpactedMaintenanceResource","com.azure.resourcemanager.avs.models.ImpactedMaintenanceResourceError":"Microsoft.AVS.ImpactedMaintenanceResourceError","com.azure.resourcemanager.avs.models.InternetEnum":"Microsoft.AVS.InternetEnum","com.azure.resourcemanager.avs.models.IscsiPathProvisioningState":"Microsoft.AVS.IscsiPathProvisioningState","com.azure.resourcemanager.avs.models.Label":"Microsoft.AVS.Label","com.azure.resourcemanager.avs.models.LicenseKind":"Microsoft.AVS.LicenseKind","com.azure.resourcemanager.avs.models.LicenseName":"Microsoft.AVS.LicenseName","com.azure.resourcemanager.avs.models.LicenseProvisioningState":"Microsoft.AVS.LicenseProvisioningState","com.azure.resourcemanager.avs.models.MaintenanceCheckType":"Microsoft.AVS.MaintenanceCheckType","com.azure.resourcemanager.avs.models.MaintenanceFailedCheck":"Microsoft.AVS.MaintenanceFailedCheck","com.azure.resourcemanager.avs.models.MaintenanceManagementOperation":"Microsoft.AVS.MaintenanceManagementOperation","com.azure.resourcemanager.avs.models.MaintenanceManagementOperationKind":"Microsoft.AVS.MaintenanceManagementOperationKind","com.azure.resourcemanager.avs.models.MaintenanceProperties":"Microsoft.AVS.MaintenanceProperties","com.azure.resourcemanager.avs.models.MaintenanceProvisioningState":"Microsoft.AVS.MaintenanceProvisioningState","com.azure.resourcemanager.avs.models.MaintenanceReadiness":"Microsoft.AVS.MaintenanceReadiness","com.azure.resourcemanager.avs.models.MaintenanceReadinessRefreshOperation":"Microsoft.AVS.MaintenanceReadinessRefreshOperation","com.azure.resourcemanager.avs.models.MaintenanceReadinessRefreshOperationStatus":"Microsoft.AVS.MaintenanceReadinessRefreshOperationStatus","com.azure.resourcemanager.avs.models.MaintenanceReadinessStatus":"Microsoft.AVS.MaintenanceReadinessStatus","com.azure.resourcemanager.avs.models.MaintenanceReschedule":"Microsoft.AVS.MaintenanceReschedule","com.azure.resourcemanager.avs.models.MaintenanceSchedule":"Microsoft.AVS.MaintenanceSchedule","com.azure.resourcemanager.avs.models.MaintenanceState":"Microsoft.AVS.MaintenanceState","com.azure.resourcemanager.avs.models.MaintenanceStateName":"Microsoft.AVS.MaintenanceStateName","com.azure.resourcemanager.avs.models.MaintenanceStatusFilter":"Microsoft.AVS.MaintenanceStatusFilter","com.azure.resourcemanager.avs.models.MaintenanceType":"Microsoft.AVS.MaintenanceType","com.azure.resourcemanager.avs.models.ManagementCluster":"Microsoft.AVS.ManagementCluster","com.azure.resourcemanager.avs.models.MountOptionEnum":"Microsoft.AVS.MountOptionEnum","com.azure.resourcemanager.avs.models.NetAppVolume":"Microsoft.AVS.NetAppVolume","com.azure.resourcemanager.avs.models.NsxPublicIpQuotaRaisedEnum":"Microsoft.AVS.NsxPublicIpQuotaRaisedEnum","com.azure.resourcemanager.avs.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.avs.models.OptionalParamEnum":"Microsoft.AVS.OptionalParamEnum","com.azure.resourcemanager.avs.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.avs.models.PSCredentialExecutionParameter":"Microsoft.AVS.PSCredentialExecutionParameter","com.azure.resourcemanager.avs.models.PlacementPolicyProperties":"Microsoft.AVS.PlacementPolicyProperties","com.azure.resourcemanager.avs.models.PlacementPolicyProvisioningState":"Microsoft.AVS.PlacementPolicyProvisioningState","com.azure.resourcemanager.avs.models.PlacementPolicyState":"Microsoft.AVS.PlacementPolicyState","com.azure.resourcemanager.avs.models.PlacementPolicyType":"Microsoft.AVS.PlacementPolicyType","com.azure.resourcemanager.avs.models.PlacementPolicyUpdate":"Microsoft.AVS.PlacementPolicyUpdate","com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum":"Microsoft.AVS.PortMirroringDirectionEnum","com.azure.resourcemanager.avs.models.PortMirroringStatusEnum":"Microsoft.AVS.PortMirroringStatusEnum","com.azure.resourcemanager.avs.models.PrivateCloudIdentity":"Azure.ResourceManager.CommonTypes.SystemAssignedServiceIdentity","com.azure.resourcemanager.avs.models.PrivateCloudProvisioningState":"Microsoft.AVS.PrivateCloudProvisioningState","com.azure.resourcemanager.avs.models.PrivateCloudUpdate":"Microsoft.AVS.PrivateCloudUpdate","com.azure.resourcemanager.avs.models.ProvisionedNetworkProperties":"Microsoft.AVS.ProvisionedNetworkProperties","com.azure.resourcemanager.avs.models.ProvisionedNetworkProvisioningState":"Microsoft.AVS.ProvisionedNetworkProvisioningState","com.azure.resourcemanager.avs.models.ProvisionedNetworkTypes":"Microsoft.AVS.ProvisionedNetworkTypes","com.azure.resourcemanager.avs.models.PureStoragePolicyProperties":"Microsoft.AVS.PureStoragePolicyProperties","com.azure.resourcemanager.avs.models.PureStoragePolicyProvisioningState":"Microsoft.AVS.PureStoragePolicyProvisioningState","com.azure.resourcemanager.avs.models.PureStorageVolume":"Microsoft.AVS.PureStorageVolume","com.azure.resourcemanager.avs.models.QuotaEnabled":"Microsoft.AVS.QuotaEnabled","com.azure.resourcemanager.avs.models.RescheduleOperation":"Microsoft.AVS.RescheduleOperation","com.azure.resourcemanager.avs.models.RescheduleOperationConstraint":"Microsoft.AVS.RescheduleOperationConstraint","com.azure.resourcemanager.avs.models.RescheduleOperationConstraintKind":"Microsoft.AVS.RescheduleOperationConstraintKind","com.azure.resourcemanager.avs.models.ResourceIdentityType":"Azure.ResourceManager.CommonTypes.SystemAssignedServiceIdentityType","com.azure.resourcemanager.avs.models.ResourceSkuCapabilities":"Microsoft.AVS.ResourceSkuCapabilities","com.azure.resourcemanager.avs.models.ResourceSkuLocationInfo":"Microsoft.AVS.ResourceSkuLocationInfo","com.azure.resourcemanager.avs.models.ResourceSkuResourceType":"Microsoft.AVS.ResourceSkuResourceType","com.azure.resourcemanager.avs.models.ResourceSkuRestrictionInfo":"Microsoft.AVS.ResourceSkuRestrictionInfo","com.azure.resourcemanager.avs.models.ResourceSkuRestrictions":"Microsoft.AVS.ResourceSkuRestrictions","com.azure.resourcemanager.avs.models.ResourceSkuRestrictionsReasonCode":"Microsoft.AVS.ResourceSkuRestrictionsReasonCode","com.azure.resourcemanager.avs.models.ResourceSkuRestrictionsType":"Microsoft.AVS.ResourceSkuRestrictionsType","com.azure.resourcemanager.avs.models.ResourceSkuZoneDetails":"Microsoft.AVS.ResourceSkuZoneDetails","com.azure.resourcemanager.avs.models.ScheduleOperation":"Microsoft.AVS.ScheduleOperation","com.azure.resourcemanager.avs.models.ScheduleOperationConstraint":"Microsoft.AVS.ScheduleOperationConstraint","com.azure.resourcemanager.avs.models.ScheduleOperationConstraintKind":"Microsoft.AVS.ScheduleOperationConstraintKind","com.azure.resourcemanager.avs.models.SchedulingWindow":"Microsoft.AVS.SchedulingWindow","com.azure.resourcemanager.avs.models.ScriptCmdletAudience":"Microsoft.AVS.ScriptCmdletAudience","com.azure.resourcemanager.avs.models.ScriptCmdletProvisioningState":"Microsoft.AVS.ScriptCmdletProvisioningState","com.azure.resourcemanager.avs.models.ScriptExecutionParameter":"Microsoft.AVS.ScriptExecutionParameter","com.azure.resourcemanager.avs.models.ScriptExecutionParameterType":"Microsoft.AVS.ScriptExecutionParameterType","com.azure.resourcemanager.avs.models.ScriptExecutionProvisioningState":"Microsoft.AVS.ScriptExecutionProvisioningState","com.azure.resourcemanager.avs.models.ScriptOutputStreamType":"Microsoft.AVS.ScriptOutputStreamType","com.azure.resourcemanager.avs.models.ScriptPackageProvisioningState":"Microsoft.AVS.ScriptPackageProvisioningState","com.azure.resourcemanager.avs.models.ScriptParameter":"Microsoft.AVS.ScriptParameter","com.azure.resourcemanager.avs.models.ScriptParameterTypes":"Microsoft.AVS.ScriptParameterTypes","com.azure.resourcemanager.avs.models.ScriptSecureStringExecutionParameter":"Microsoft.AVS.ScriptSecureStringExecutionParameter","com.azure.resourcemanager.avs.models.ScriptStringExecutionParameter":"Microsoft.AVS.ScriptStringExecutionParameter","com.azure.resourcemanager.avs.models.SegmentStatusEnum":"Microsoft.AVS.SegmentStatusEnum","com.azure.resourcemanager.avs.models.Sku":"Azure.ResourceManager.CommonTypes.Sku","com.azure.resourcemanager.avs.models.SkuTier":"Azure.ResourceManager.CommonTypes.SkuTier","com.azure.resourcemanager.avs.models.SpecializedHostProperties":"Microsoft.AVS.SpecializedHostProperties","com.azure.resourcemanager.avs.models.SslEnum":"Microsoft.AVS.SslEnum","com.azure.resourcemanager.avs.models.TrialStatus":"Microsoft.AVS.TrialStatus","com.azure.resourcemanager.avs.models.VMGroupStatusEnum":"Microsoft.AVS.VMGroupStatusEnum","com.azure.resourcemanager.avs.models.VMTypeEnum":"Microsoft.AVS.VMTypeEnum","com.azure.resourcemanager.avs.models.Vcf5License":"Microsoft.AVS.Vcf5License","com.azure.resourcemanager.avs.models.VcfLicenseKind":"Microsoft.AVS.VcfLicenseKind","com.azure.resourcemanager.avs.models.VirtualMachineProvisioningState":"Microsoft.AVS.VirtualMachineProvisioningState","com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement":"Microsoft.AVS.VirtualMachineRestrictMovement","com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState":"Microsoft.AVS.VirtualMachineRestrictMovementState","com.azure.resourcemanager.avs.models.VisibilityParameterEnum":"Microsoft.AVS.VisibilityParameterEnum","com.azure.resourcemanager.avs.models.VmHostPlacementPolicyProperties":"Microsoft.AVS.VmHostPlacementPolicyProperties","com.azure.resourcemanager.avs.models.VmPlacementPolicyProperties":"Microsoft.AVS.VmVmPlacementPolicyProperties","com.azure.resourcemanager.avs.models.VmwareFirewallLicenseProperties":"Microsoft.AVS.VmwareFirewallLicenseProperties","com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity":"Microsoft.AVS.WorkloadNetworkDhcpEntity","com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpProvisioningState":"Microsoft.AVS.WorkloadNetworkDhcpProvisioningState","com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpRelay":"Microsoft.AVS.WorkloadNetworkDhcpRelay","com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer":"Microsoft.AVS.WorkloadNetworkDhcpServer","com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceProvisioningState":"Microsoft.AVS.WorkloadNetworkDnsServiceProvisioningState","com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneProvisioningState":"Microsoft.AVS.WorkloadNetworkDnsZoneProvisioningState","com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProvisioningState":"Microsoft.AVS.WorkloadNetworkPortMirroringProvisioningState","com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState":"Microsoft.AVS.WorkloadNetworkProvisioningState","com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIpProvisioningState":"Microsoft.AVS.WorkloadNetworkPublicIPProvisioningState","com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentPortVif":"Microsoft.AVS.WorkloadNetworkSegmentPortVif","com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentProvisioningState":"Microsoft.AVS.WorkloadNetworkSegmentProvisioningState","com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet":"Microsoft.AVS.WorkloadNetworkSegmentSubnet","com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupProvisioningState":"Microsoft.AVS.WorkloadNetworkVMGroupProvisioningState"},"generatedFiles":["src/main/java/com/azure/resourcemanager/avs/AvsManager.java","src/main/java/com/azure/resourcemanager/avs/fluent/AddonsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/AuthorizationsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/AvsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/CloudLinksClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/ClustersClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/DatastoresClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/GlobalReachConnectionsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/HcxEnterpriseSitesClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/HostsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/LicensesClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/LocationsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/MaintenancesClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/PlacementPoliciesClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/PrivateCloudsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/ProvisionedNetworksClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/PureStoragePoliciesClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/ScriptCmdletsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/ScriptPackagesClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/SkusClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/VirtualMachinesClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworksClient.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/HostModelInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/LicenseInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/LicensePropertiesInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/MaintenanceInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudPropertiesInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ProvisionedNetworkInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/PureStoragePolicyInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ResourceSkuInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/VcfLicenseInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java","src/main/java/com/azure/resourcemanager/avs/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/avs/fluent/package-info.java","src/main/java/com/azure/resourcemanager/avs/implementation/AddonImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/AddonsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/AdminCredentialsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java","src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinkImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ClusterImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ClusterZoneListImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ClustersImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/DatastoreImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ExpressRouteAuthorizationImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSiteImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/HostModelImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/HostsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/HostsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/LicenseImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/LicensePropertiesImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/LicensesClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/LicensesImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/LocationsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/MaintenanceImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/MaintenancesClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/MaintenancesImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPolicyImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudPropertiesImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworkImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworksClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworksImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePoliciesImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePolicyImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/QuotaImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/avs/implementation/ResourceSkuImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackageImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/SkusClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/SkusImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/TrialImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/VcfLicenseImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachineImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewayImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachineImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksImpl.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/AddonList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/CloudLinkList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/ClusterList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/DatastoreList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/ExpressRouteAuthorizationList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/GlobalReachConnectionList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/HcxEnterpriseSiteList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/HostListResult.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/IscsiPathListResult.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/LicenseListResult.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/MaintenanceListResult.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/PagedResourceSku.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/PlacementPoliciesList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/PrivateCloudList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/ProvisionedNetworkListResult.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/PureStoragePolicyListResult.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptCmdletsList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptPackagesList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/VirtualMachinesList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDhcpList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsServicesList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsZonesList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkGatewayList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPortMirroringList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPublicIPsList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkSegmentsList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVMGroupsList.java","src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVirtualMachinesList.java","src/main/java/com/azure/resourcemanager/avs/implementation/package-info.java","src/main/java/com/azure/resourcemanager/avs/models/ActionType.java","src/main/java/com/azure/resourcemanager/avs/models/Addon.java","src/main/java/com/azure/resourcemanager/avs/models/AddonArcProperties.java","src/main/java/com/azure/resourcemanager/avs/models/AddonHcxProperties.java","src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java","src/main/java/com/azure/resourcemanager/avs/models/AddonProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/AddonSrmProperties.java","src/main/java/com/azure/resourcemanager/avs/models/AddonType.java","src/main/java/com/azure/resourcemanager/avs/models/AddonVrProperties.java","src/main/java/com/azure/resourcemanager/avs/models/Addons.java","src/main/java/com/azure/resourcemanager/avs/models/AdminCredentials.java","src/main/java/com/azure/resourcemanager/avs/models/AffinityStrength.java","src/main/java/com/azure/resourcemanager/avs/models/AffinityType.java","src/main/java/com/azure/resourcemanager/avs/models/Authorizations.java","src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java","src/main/java/com/azure/resourcemanager/avs/models/AvailabilityStrategy.java","src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileRescheduleOperation.java","src/main/java/com/azure/resourcemanager/avs/models/AvailableWindowForMaintenanceWhileScheduleOperation.java","src/main/java/com/azure/resourcemanager/avs/models/AzureHybridBenefitType.java","src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintCategory.java","src/main/java/com/azure/resourcemanager/avs/models/BlockedDatesConstraintTimeRange.java","src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileRescheduleOperation.java","src/main/java/com/azure/resourcemanager/avs/models/BlockedWhileScheduleOperation.java","src/main/java/com/azure/resourcemanager/avs/models/Circuit.java","src/main/java/com/azure/resourcemanager/avs/models/CloudLink.java","src/main/java/com/azure/resourcemanager/avs/models/CloudLinkProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/CloudLinkStatus.java","src/main/java/com/azure/resourcemanager/avs/models/CloudLinks.java","src/main/java/com/azure/resourcemanager/avs/models/Cluster.java","src/main/java/com/azure/resourcemanager/avs/models/ClusterProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java","src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java","src/main/java/com/azure/resourcemanager/avs/models/ClusterZoneList.java","src/main/java/com/azure/resourcemanager/avs/models/Clusters.java","src/main/java/com/azure/resourcemanager/avs/models/Datastore.java","src/main/java/com/azure/resourcemanager/avs/models/DatastoreProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/DatastoreStatus.java","src/main/java/com/azure/resourcemanager/avs/models/Datastores.java","src/main/java/com/azure/resourcemanager/avs/models/DhcpTypeEnum.java","src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java","src/main/java/com/azure/resourcemanager/avs/models/DnsServiceLogLevelEnum.java","src/main/java/com/azure/resourcemanager/avs/models/DnsServiceStatusEnum.java","src/main/java/com/azure/resourcemanager/avs/models/DnsZoneType.java","src/main/java/com/azure/resourcemanager/avs/models/ElasticSanVolume.java","src/main/java/com/azure/resourcemanager/avs/models/Encryption.java","src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyStatus.java","src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java","src/main/java/com/azure/resourcemanager/avs/models/EncryptionState.java","src/main/java/com/azure/resourcemanager/avs/models/EncryptionVersionType.java","src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java","src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorization.java","src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/GeneralHostProperties.java","src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnection.java","src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionStatus.java","src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnections.java","src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSite.java","src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteStatus.java","src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSites.java","src/main/java/com/azure/resourcemanager/avs/models/HostKind.java","src/main/java/com/azure/resourcemanager/avs/models/HostMaintenance.java","src/main/java/com/azure/resourcemanager/avs/models/HostModel.java","src/main/java/com/azure/resourcemanager/avs/models/HostProperties.java","src/main/java/com/azure/resourcemanager/avs/models/HostProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/Hosts.java","src/main/java/com/azure/resourcemanager/avs/models/IdentitySource.java","src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResource.java","src/main/java/com/azure/resourcemanager/avs/models/ImpactedMaintenanceResourceError.java","src/main/java/com/azure/resourcemanager/avs/models/InternetEnum.java","src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java","src/main/java/com/azure/resourcemanager/avs/models/IscsiPathProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java","src/main/java/com/azure/resourcemanager/avs/models/Label.java","src/main/java/com/azure/resourcemanager/avs/models/License.java","src/main/java/com/azure/resourcemanager/avs/models/LicenseKind.java","src/main/java/com/azure/resourcemanager/avs/models/LicenseName.java","src/main/java/com/azure/resourcemanager/avs/models/LicenseProperties.java","src/main/java/com/azure/resourcemanager/avs/models/LicenseProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/Licenses.java","src/main/java/com/azure/resourcemanager/avs/models/Locations.java","src/main/java/com/azure/resourcemanager/avs/models/Maintenance.java","src/main/java/com/azure/resourcemanager/avs/models/MaintenanceCheckType.java","src/main/java/com/azure/resourcemanager/avs/models/MaintenanceFailedCheck.java","src/main/java/com/azure/resourcemanager/avs/models/MaintenanceManagementOperation.java","src/main/java/com/azure/resourcemanager/avs/models/MaintenanceManagementOperationKind.java","src/main/java/com/azure/resourcemanager/avs/models/MaintenanceProperties.java","src/main/java/com/azure/resourcemanager/avs/models/MaintenanceProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadiness.java","src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessRefreshOperation.java","src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessRefreshOperationStatus.java","src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReadinessStatus.java","src/main/java/com/azure/resourcemanager/avs/models/MaintenanceReschedule.java","src/main/java/com/azure/resourcemanager/avs/models/MaintenanceSchedule.java","src/main/java/com/azure/resourcemanager/avs/models/MaintenanceState.java","src/main/java/com/azure/resourcemanager/avs/models/MaintenanceStateName.java","src/main/java/com/azure/resourcemanager/avs/models/MaintenanceStatusFilter.java","src/main/java/com/azure/resourcemanager/avs/models/MaintenanceType.java","src/main/java/com/azure/resourcemanager/avs/models/Maintenances.java","src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java","src/main/java/com/azure/resourcemanager/avs/models/MountOptionEnum.java","src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java","src/main/java/com/azure/resourcemanager/avs/models/NsxPublicIpQuotaRaisedEnum.java","src/main/java/com/azure/resourcemanager/avs/models/Operation.java","src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/avs/models/Operations.java","src/main/java/com/azure/resourcemanager/avs/models/OptionalParamEnum.java","src/main/java/com/azure/resourcemanager/avs/models/Origin.java","src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java","src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicies.java","src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicy.java","src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java","src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyState.java","src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyType.java","src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java","src/main/java/com/azure/resourcemanager/avs/models/PortMirroringDirectionEnum.java","src/main/java/com/azure/resourcemanager/avs/models/PortMirroringStatusEnum.java","src/main/java/com/azure/resourcemanager/avs/models/PrivateCloud.java","src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java","src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProperties.java","src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java","src/main/java/com/azure/resourcemanager/avs/models/PrivateClouds.java","src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetwork.java","src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkProperties.java","src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkTypes.java","src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworks.java","src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicies.java","src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicy.java","src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicyProperties.java","src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicyProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/PureStorageVolume.java","src/main/java/com/azure/resourcemanager/avs/models/Quota.java","src/main/java/com/azure/resourcemanager/avs/models/QuotaEnabled.java","src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperation.java","src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperationConstraint.java","src/main/java/com/azure/resourcemanager/avs/models/RescheduleOperationConstraintKind.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSku.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuCapabilities.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuLocationInfo.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuResourceType.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionInfo.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictions.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionsReasonCode.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionsType.java","src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuZoneDetails.java","src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperation.java","src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperationConstraint.java","src/main/java/com/azure/resourcemanager/avs/models/ScheduleOperationConstraintKind.java","src/main/java/com/azure/resourcemanager/avs/models/SchedulingWindow.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlet.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletAudience.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlets.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptPackage.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptPackageProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptPackages.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptParameterTypes.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java","src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java","src/main/java/com/azure/resourcemanager/avs/models/SegmentStatusEnum.java","src/main/java/com/azure/resourcemanager/avs/models/Sku.java","src/main/java/com/azure/resourcemanager/avs/models/SkuTier.java","src/main/java/com/azure/resourcemanager/avs/models/Skus.java","src/main/java/com/azure/resourcemanager/avs/models/SpecializedHostProperties.java","src/main/java/com/azure/resourcemanager/avs/models/SslEnum.java","src/main/java/com/azure/resourcemanager/avs/models/Trial.java","src/main/java/com/azure/resourcemanager/avs/models/TrialStatus.java","src/main/java/com/azure/resourcemanager/avs/models/VMGroupStatusEnum.java","src/main/java/com/azure/resourcemanager/avs/models/VMTypeEnum.java","src/main/java/com/azure/resourcemanager/avs/models/Vcf5License.java","src/main/java/com/azure/resourcemanager/avs/models/VcfLicense.java","src/main/java/com/azure/resourcemanager/avs/models/VcfLicenseKind.java","src/main/java/com/azure/resourcemanager/avs/models/VirtualMachine.java","src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java","src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovementState.java","src/main/java/com/azure/resourcemanager/avs/models/VirtualMachines.java","src/main/java/com/azure/resourcemanager/avs/models/VisibilityParameterEnum.java","src/main/java/com/azure/resourcemanager/avs/models/VmHostPlacementPolicyProperties.java","src/main/java/com/azure/resourcemanager/avs/models/VmPlacementPolicyProperties.java","src/main/java/com/azure/resourcemanager/avs/models/VmwareFirewallLicenseProperties.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetwork.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpRelay.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpServer.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateway.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupProvisioningState.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachine.java","src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java","src/main/java/com/azure/resourcemanager/avs/models/package-info.java","src/main/java/com/azure/resourcemanager/avs/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/proxy-config.json b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/proxy-config.json index 00316237bfe7..77d683b82e83 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/proxy-config.json +++ b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.avs.implementation.AddonsClientImpl$AddonsService"],["com.azure.resourcemanager.avs.implementation.AuthorizationsClientImpl$AuthorizationsService"],["com.azure.resourcemanager.avs.implementation.CloudLinksClientImpl$CloudLinksService"],["com.azure.resourcemanager.avs.implementation.ClustersClientImpl$ClustersService"],["com.azure.resourcemanager.avs.implementation.DatastoresClientImpl$DatastoresService"],["com.azure.resourcemanager.avs.implementation.GlobalReachConnectionsClientImpl$GlobalReachConnectionsService"],["com.azure.resourcemanager.avs.implementation.HcxEnterpriseSitesClientImpl$HcxEnterpriseSitesService"],["com.azure.resourcemanager.avs.implementation.HostsClientImpl$HostsService"],["com.azure.resourcemanager.avs.implementation.IscsiPathsClientImpl$IscsiPathsService"],["com.azure.resourcemanager.avs.implementation.LocationsClientImpl$LocationsService"],["com.azure.resourcemanager.avs.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.avs.implementation.PlacementPoliciesClientImpl$PlacementPoliciesService"],["com.azure.resourcemanager.avs.implementation.PrivateCloudsClientImpl$PrivateCloudsService"],["com.azure.resourcemanager.avs.implementation.ProvisionedNetworksClientImpl$ProvisionedNetworksService"],["com.azure.resourcemanager.avs.implementation.PureStoragePoliciesClientImpl$PureStoragePoliciesService"],["com.azure.resourcemanager.avs.implementation.ScriptCmdletsClientImpl$ScriptCmdletsService"],["com.azure.resourcemanager.avs.implementation.ScriptExecutionsClientImpl$ScriptExecutionsService"],["com.azure.resourcemanager.avs.implementation.ScriptPackagesClientImpl$ScriptPackagesService"],["com.azure.resourcemanager.avs.implementation.SkusClientImpl$SkusService"],["com.azure.resourcemanager.avs.implementation.VirtualMachinesClientImpl$VirtualMachinesService"],["com.azure.resourcemanager.avs.implementation.WorkloadNetworksClientImpl$WorkloadNetworksService"]] \ No newline at end of file +[["com.azure.resourcemanager.avs.implementation.AddonsClientImpl$AddonsService"],["com.azure.resourcemanager.avs.implementation.AuthorizationsClientImpl$AuthorizationsService"],["com.azure.resourcemanager.avs.implementation.CloudLinksClientImpl$CloudLinksService"],["com.azure.resourcemanager.avs.implementation.ClustersClientImpl$ClustersService"],["com.azure.resourcemanager.avs.implementation.DatastoresClientImpl$DatastoresService"],["com.azure.resourcemanager.avs.implementation.GlobalReachConnectionsClientImpl$GlobalReachConnectionsService"],["com.azure.resourcemanager.avs.implementation.HcxEnterpriseSitesClientImpl$HcxEnterpriseSitesService"],["com.azure.resourcemanager.avs.implementation.HostsClientImpl$HostsService"],["com.azure.resourcemanager.avs.implementation.IscsiPathsClientImpl$IscsiPathsService"],["com.azure.resourcemanager.avs.implementation.LicensesClientImpl$LicensesService"],["com.azure.resourcemanager.avs.implementation.LocationsClientImpl$LocationsService"],["com.azure.resourcemanager.avs.implementation.MaintenancesClientImpl$MaintenancesService"],["com.azure.resourcemanager.avs.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.avs.implementation.PlacementPoliciesClientImpl$PlacementPoliciesService"],["com.azure.resourcemanager.avs.implementation.PrivateCloudsClientImpl$PrivateCloudsService"],["com.azure.resourcemanager.avs.implementation.ProvisionedNetworksClientImpl$ProvisionedNetworksService"],["com.azure.resourcemanager.avs.implementation.PureStoragePoliciesClientImpl$PureStoragePoliciesService"],["com.azure.resourcemanager.avs.implementation.ScriptCmdletsClientImpl$ScriptCmdletsService"],["com.azure.resourcemanager.avs.implementation.ScriptExecutionsClientImpl$ScriptExecutionsService"],["com.azure.resourcemanager.avs.implementation.ScriptPackagesClientImpl$ScriptPackagesService"],["com.azure.resourcemanager.avs.implementation.SkusClientImpl$SkusService"],["com.azure.resourcemanager.avs.implementation.VirtualMachinesClientImpl$VirtualMachinesService"],["com.azure.resourcemanager.avs.implementation.WorkloadNetworksClientImpl$WorkloadNetworksService"]] \ No newline at end of file diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateSamples.java index c81a2c77aff8..041d1b47a62e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class AddonsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_HCX.json + * x-ms-original-file: 2025-09-01/Addons_CreateOrUpdate_HCX.json */ /** * Sample code: Addons_CreateOrUpdate_HCX. @@ -30,7 +30,7 @@ public static void addonsCreateOrUpdateHCX(com.azure.resourcemanager.avs.AvsMana } /* - * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_SRM.json + * x-ms-original-file: 2025-09-01/Addons_CreateOrUpdate_SRM.json */ /** * Sample code: Addons_CreateOrUpdate_SRM. @@ -46,7 +46,7 @@ public static void addonsCreateOrUpdateSRM(com.azure.resourcemanager.avs.AvsMana } /* - * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_HCX_With_Networks.json + * x-ms-original-file: 2025-09-01/Addons_CreateOrUpdate_HCX_With_Networks.json */ /** * Sample code: Addons_CreateOrUpdate_HCX_With_Networks. @@ -64,7 +64,7 @@ public static void addonsCreateOrUpdateHCXWithNetworks(com.azure.resourcemanager } /* - * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_ArcReg.json + * x-ms-original-file: 2025-09-01/Addons_CreateOrUpdate_ArcReg.json */ /** * Sample code: Addons_CreateOrUpdate_ArcReg. @@ -81,7 +81,7 @@ public static void addonsCreateOrUpdateArcReg(com.azure.resourcemanager.avs.AvsM } /* - * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_VR.json + * x-ms-original-file: 2025-09-01/Addons_CreateOrUpdate_VR.json */ /** * Sample code: Addons_CreateOrUpdate_VR. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsDeleteSamples.java index e4dd7a445bd0..ca19fc841445 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class AddonsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/Addons_Delete.json + * x-ms-original-file: 2025-09-01/Addons_Delete.json */ /** * Sample code: Addons_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsGetSamples.java index fb8be8c0c1ec..af74486ad324 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsGetSamples.java @@ -9,7 +9,7 @@ */ public final class AddonsGetSamples { /* - * x-ms-original-file: 2024-09-01/Addons_Get_HCX_With_Networks.json + * x-ms-original-file: 2025-09-01/Addons_Get_HCX_With_Networks.json */ /** * Sample code: Addons_Get_HCX_With_Networks. @@ -21,7 +21,7 @@ public static void addonsGetHCXWithNetworks(com.azure.resourcemanager.avs.AvsMan } /* - * x-ms-original-file: 2024-09-01/Addons_Get_SRM.json + * x-ms-original-file: 2025-09-01/Addons_Get_SRM.json */ /** * Sample code: Addons_Get_SRM. @@ -33,7 +33,7 @@ public static void addonsGetSRM(com.azure.resourcemanager.avs.AvsManager manager } /* - * x-ms-original-file: 2024-09-01/Addons_Get_VR.json + * x-ms-original-file: 2025-09-01/Addons_Get_VR.json */ /** * Sample code: Addons_Get_VR. @@ -45,7 +45,7 @@ public static void addonsGetVR(com.azure.resourcemanager.avs.AvsManager manager) } /* - * x-ms-original-file: 2024-09-01/Addons_Get_HCX.json + * x-ms-original-file: 2025-09-01/Addons_Get_HCX.json */ /** * Sample code: Addons_Get_HCX. @@ -57,7 +57,7 @@ public static void addonsGetHCX(com.azure.resourcemanager.avs.AvsManager manager } /* - * x-ms-original-file: 2024-09-01/Addons_Get_ArcReg.json + * x-ms-original-file: 2025-09-01/Addons_Get_ArcReg.json */ /** * Sample code: Addons_Get_ArcReg. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsListSamples.java index 77d6758d89c2..b72769c026bb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsListSamples.java @@ -9,7 +9,7 @@ */ public final class AddonsListSamples { /* - * x-ms-original-file: 2024-09-01/Addons_List.json + * x-ms-original-file: 2025-09-01/Addons_List.json */ /** * Sample code: Addons_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsCreateOrUpdateSamples.java index 6833c5cf447a..57bed37e588e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ */ public final class AuthorizationsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/Authorizations_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/Authorizations_CreateOrUpdate.json */ /** * Sample code: Authorizations_CreateOrUpdate. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteSamples.java index a8b69e0ba072..76baa33e2d4c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class AuthorizationsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/Authorizations_Delete.json + * x-ms-original-file: 2025-09-01/Authorizations_Delete.json */ /** * Sample code: Authorizations_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsGetSamples.java index b1e75ac67fb6..f217f9f5b1e5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class AuthorizationsGetSamples { /* - * x-ms-original-file: 2024-09-01/Authorizations_Get.json + * x-ms-original-file: 2025-09-01/Authorizations_Get.json */ /** * Sample code: Authorizations_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsListSamples.java index fb09d81c99ab..5e3bbb718970 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsListSamples.java @@ -9,7 +9,7 @@ */ public final class AuthorizationsListSamples { /* - * x-ms-original-file: 2024-09-01/Authorizations_List.json + * x-ms-original-file: 2025-09-01/Authorizations_List.json */ /** * Sample code: Authorizations_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateSamples.java index 110becc566a9..108dc5d53998 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ */ public final class CloudLinksCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/CloudLinks_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/CloudLinks_CreateOrUpdate.json */ /** * Sample code: CloudLinks_CreateOrUpdate. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java index c330c60381d4..5a5a50159732 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class CloudLinksDeleteSamples { /* - * x-ms-original-file: 2024-09-01/CloudLinks_Delete.json + * x-ms-original-file: 2025-09-01/CloudLinks_Delete.json */ /** * Sample code: CloudLinks_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksGetSamples.java index 795c55e1dea8..e085a089be73 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksGetSamples.java @@ -9,7 +9,7 @@ */ public final class CloudLinksGetSamples { /* - * x-ms-original-file: 2024-09-01/CloudLinks_Get.json + * x-ms-original-file: 2025-09-01/CloudLinks_Get.json */ /** * Sample code: CloudLinks_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksListSamples.java index 5ab1c298d413..d81b88c2d9f3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksListSamples.java @@ -9,7 +9,7 @@ */ public final class CloudLinksListSamples { /* - * x-ms-original-file: 2024-09-01/CloudLinks_List.json + * x-ms-original-file: 2025-09-01/CloudLinks_List.json */ /** * Sample code: CloudLinks_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateSamples.java index bf930d757ada..9f0c219c08a2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class ClustersCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/Clusters_CreateOrUpdate.json */ /** * Sample code: Clusters_CreateOrUpdate. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersDeleteSamples.java index d02a358ab1d3..a01dd15badc7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_Delete.json + * x-ms-original-file: 2025-09-01/Clusters_Delete.json */ /** * Sample code: Clusters_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersGetSamples.java index af904a52b063..2600b7cc0190 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersGetSamples.java @@ -9,7 +9,7 @@ */ public final class ClustersGetSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_Get.json + * x-ms-original-file: 2025-09-01/Clusters_Get.json */ /** * Sample code: Clusters_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListSamples.java index 2b2e10cd5592..951fd127d7c6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListSamples.java @@ -9,7 +9,7 @@ */ public final class ClustersListSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_List.json + * x-ms-original-file: 2025-09-01/Clusters_List.json */ /** * Sample code: Clusters_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListZonesSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListZonesSamples.java index b3ab0338617d..7e8533311fac 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListZonesSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListZonesSamples.java @@ -9,7 +9,7 @@ */ public final class ClustersListZonesSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_ListZones.json + * x-ms-original-file: 2025-09-01/Clusters_ListZones.json */ /** * Sample code: Clusters_ListZones. @@ -21,7 +21,7 @@ public static void clustersListZones(com.azure.resourcemanager.avs.AvsManager ma } /* - * x-ms-original-file: 2024-09-01/Clusters_ListZones_Stretched.json + * x-ms-original-file: 2025-09-01/Clusters_ListZones_Stretched.json */ /** * Sample code: Clusters_ListZones_Stretched. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersUpdateSamples.java index 7e44b00985a2..8214c39ab4e5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: 2024-09-01/Clusters_Update.json + * x-ms-original-file: 2025-09-01/Clusters_Update.json */ /** * Sample code: Clusters_Update. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java index 9bfa67df0e71..953d12b9074a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class DatastoresCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/Datastores_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/Datastores_CreateOrUpdate.json */ /** * Sample code: Datastores_CreateOrUpdate. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java index a732392a7052..4488fab5b38a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class DatastoresDeleteSamples { /* - * x-ms-original-file: 2024-09-01/Datastores_Delete.json + * x-ms-original-file: 2025-09-01/Datastores_Delete.json */ /** * Sample code: Datastores_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresGetSamples.java index 2195bb616c9c..735c07725590 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresGetSamples.java @@ -9,7 +9,7 @@ */ public final class DatastoresGetSamples { /* - * x-ms-original-file: 2024-09-01/Datastores_Get.json + * x-ms-original-file: 2025-09-01/Datastores_Get.json */ /** * Sample code: Datastores_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresListSamples.java index b639d14c47dd..b9a7144961c9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresListSamples.java @@ -9,7 +9,7 @@ */ public final class DatastoresListSamples { /* - * x-ms-original-file: 2024-09-01/Datastores_List.json + * x-ms-original-file: 2025-09-01/Datastores_List.json */ /** * Sample code: Datastores_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsCreateOrUpdateSamples.java index ec436107a975..df94191d660d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ */ public final class GlobalReachConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/GlobalReachConnections_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/GlobalReachConnections_CreateOrUpdate.json */ /** * Sample code: GlobalReachConnections_CreateOrUpdate. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteSamples.java index 23b5bed425f8..307ca9d92edf 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class GlobalReachConnectionsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/GlobalReachConnections_Delete.json + * x-ms-original-file: 2025-09-01/GlobalReachConnections_Delete.json */ /** * Sample code: GlobalReachConnections_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsGetSamples.java index 7e8c7fc3b6d6..dd0dd14ba30b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class GlobalReachConnectionsGetSamples { /* - * x-ms-original-file: 2024-09-01/GlobalReachConnections_Get.json + * x-ms-original-file: 2025-09-01/GlobalReachConnections_Get.json */ /** * Sample code: GlobalReachConnections_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsListSamples.java index 4a4537a69040..4f574b969a39 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class GlobalReachConnectionsListSamples { /* - * x-ms-original-file: 2024-09-01/GlobalReachConnections_List.json + * x-ms-original-file: 2025-09-01/GlobalReachConnections_List.json */ /** * Sample code: GlobalReachConnections_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesCreateOrUpdateSamples.java index 6b6e475938d1..60dcb0767c91 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ */ public final class HcxEnterpriseSitesCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/HcxEnterpriseSites_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/HcxEnterpriseSites_CreateOrUpdate.json */ /** * Sample code: HcxEnterpriseSites_CreateOrUpdate. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteSamples.java index 2873fe9639f9..1546d1315a29 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class HcxEnterpriseSitesDeleteSamples { /* - * x-ms-original-file: 2024-09-01/HcxEnterpriseSites_Delete.json + * x-ms-original-file: 2025-09-01/HcxEnterpriseSites_Delete.json */ /** * Sample code: HcxEnterpriseSites_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesGetSamples.java index cc96347b6fe2..a27ef10feec9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesGetSamples.java @@ -9,7 +9,7 @@ */ public final class HcxEnterpriseSitesGetSamples { /* - * x-ms-original-file: 2024-09-01/HcxEnterpriseSites_Get.json + * x-ms-original-file: 2025-09-01/HcxEnterpriseSites_Get.json */ /** * Sample code: HcxEnterpriseSites_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesListSamples.java index 35c583789575..b4d84d88717c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesListSamples.java @@ -9,7 +9,7 @@ */ public final class HcxEnterpriseSitesListSamples { /* - * x-ms-original-file: 2024-09-01/HcxEnterpriseSites_List.json + * x-ms-original-file: 2025-09-01/HcxEnterpriseSites_List.json */ /** * Sample code: HcxEnterpriseSites_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HostsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HostsGetSamples.java index 951440bc8d23..a3a8103a8880 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HostsGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HostsGetSamples.java @@ -9,7 +9,7 @@ */ public final class HostsGetSamples { /* - * x-ms-original-file: 2024-09-01/Hosts_Get.json + * x-ms-original-file: 2025-09-01/Hosts_Get.json */ /** * Sample code: Hosts_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HostsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HostsListSamples.java index 53f8689a83e3..1865244348e2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HostsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HostsListSamples.java @@ -9,7 +9,7 @@ */ public final class HostsListSamples { /* - * x-ms-original-file: 2024-09-01/Hosts_List.json + * x-ms-original-file: 2025-09-01/Hosts_List.json */ /** * Sample code: Hosts_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java index 7b6298b363d0..e12d45008079 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class IscsiPathsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/IscsiPaths_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/IscsiPaths_CreateOrUpdate.json */ /** * Sample code: IscsiPaths_CreateOrUpdate. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java index 12abaacc65e9..651e13ecb577 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class IscsiPathsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/IscsiPaths_Delete.json + * x-ms-original-file: 2025-09-01/IscsiPaths_Delete.json */ /** * Sample code: IscsiPaths_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java index 0fc5a45a5f6b..6d03bcd83cdd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java @@ -9,7 +9,7 @@ */ public final class IscsiPathsGetSamples { /* - * x-ms-original-file: 2024-09-01/IscsiPaths_Get.json + * x-ms-original-file: 2025-09-01/IscsiPaths_Get.json */ /** * Sample code: IscsiPaths_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java index 1184be381a17..43fe260f0cdf 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java @@ -9,7 +9,7 @@ */ public final class IscsiPathsListByPrivateCloudSamples { /* - * x-ms-original-file: 2024-09-01/IscsiPaths_List.json + * x-ms-original-file: 2025-09-01/IscsiPaths_List.json */ /** * Sample code: IscsiPaths_ListByPrivateCloud. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..b7148239979e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesCreateOrUpdateSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.models.LicenseName; + +/** + * Samples for Licenses CreateOrUpdate. + */ +public final class LicensesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01/Licenses_CreateOrUpdate.json + */ + /** + * Sample code: Licenses_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void licensesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.licenses().define(LicenseName.VMWARE_FIREWALL).withExistingPrivateCloud("group1", "cloud1").create(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesDeleteSamples.java new file mode 100644 index 000000000000..093887d2d5f5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.models.LicenseName; + +/** + * Samples for Licenses Delete. + */ +public final class LicensesDeleteSamples { + /* + * x-ms-original-file: 2025-09-01/Licenses_Delete.json + */ + /** + * Sample code: Licenses_Delete. + * + * @param manager Entry point to AvsManager. + */ + public static void licensesDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.licenses().delete("group1", "cloud1", LicenseName.VMWARE_FIREWALL, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesGetPropertiesSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesGetPropertiesSamples.java new file mode 100644 index 000000000000..d66cbd527235 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesGetPropertiesSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.models.LicenseName; + +/** + * Samples for Licenses GetProperties. + */ +public final class LicensesGetPropertiesSamples { + /* + * x-ms-original-file: 2025-09-01/Licenses_GetProperties.json + */ + /** + * Sample code: Licenses_GetProperties. + * + * @param manager Entry point to AvsManager. + */ + public static void licensesGetProperties(com.azure.resourcemanager.avs.AvsManager manager) { + manager.licenses() + .getPropertiesWithResponse("group1", "cloud1", LicenseName.VMWARE_FIREWALL, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesGetSamples.java new file mode 100644 index 000000000000..71bdcb9d05f9 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.models.LicenseName; + +/** + * Samples for Licenses Get. + */ +public final class LicensesGetSamples { + /* + * x-ms-original-file: 2025-09-01/Licenses_Get.json + */ + /** + * Sample code: Licenses_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void licensesGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.licenses() + .getWithResponse("group1", "cloud1", LicenseName.VMWARE_FIREWALL, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesListSamples.java new file mode 100644 index 000000000000..09b6a54f6119 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LicensesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Licenses List. + */ +public final class LicensesListSamples { + /* + * x-ms-original-file: 2025-09-01/Licenses_List.json + */ + /** + * Sample code: Licenses_List. + * + * @param manager Entry point to AvsManager. + */ + public static void licensesList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.licenses().list("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java index 9d17fd6a13b7..bf207388acce 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java @@ -9,7 +9,7 @@ */ public final class LocationsCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: 2024-09-01/Locations_CheckQuotaAvailability.json + * x-ms-original-file: 2025-09-01/Locations_CheckQuotaAvailability.json */ /** * Sample code: Locations_CheckQuotaAvailability. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilitySamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilitySamples.java index 9a93518c1775..75732c8504f1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilitySamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilitySamples.java @@ -11,7 +11,7 @@ */ public final class LocationsCheckTrialAvailabilitySamples { /* - * x-ms-original-file: 2024-09-01/Locations_CheckTrialAvailability.json + * x-ms-original-file: 2025-09-01/Locations_CheckTrialAvailability.json */ /** * Sample code: Locations_CheckTrialAvailability. @@ -23,7 +23,7 @@ public static void locationsCheckTrialAvailability(com.azure.resourcemanager.avs } /* - * x-ms-original-file: 2024-09-01/Locations_CheckTrialAvailabilityWithSku.json + * x-ms-original-file: 2025-09-01/Locations_CheckTrialAvailabilityWithSku.json */ /** * Sample code: Locations_CheckTrialAvailabilityWithSku. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesGetSamples.java new file mode 100644 index 000000000000..9faa6b2b4db8 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Maintenances Get. + */ +public final class MaintenancesGetSamples { + /* + * x-ms-original-file: 2025-09-01/Maintenances_Get.json + */ + /** + * Sample code: Maintenances_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void maintenancesGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.maintenances().getWithResponse("group1", "cloud1", "maintenance1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesInitiateChecksSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesInitiateChecksSamples.java new file mode 100644 index 000000000000..2a74c156785b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesInitiateChecksSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Maintenances InitiateChecks. + */ +public final class MaintenancesInitiateChecksSamples { + /* + * x-ms-original-file: 2025-09-01/Maintenances_InitiateChecks.json + */ + /** + * Sample code: Maintenances_InitiateChecks. + * + * @param manager Entry point to AvsManager. + */ + public static void maintenancesInitiateChecks(com.azure.resourcemanager.avs.AvsManager manager) { + manager.maintenances() + .initiateChecksWithResponse("group1", "cloud1", "maintenance1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesListSamples.java new file mode 100644 index 000000000000..41aab1dff424 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Maintenances List. + */ +public final class MaintenancesListSamples { + /* + * x-ms-original-file: 2025-09-01/Maintenances_List.json + */ + /** + * Sample code: Maintenances_List. + * + * @param manager Entry point to AvsManager. + */ + public static void maintenancesList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.maintenances().list("group1", "cloud1", null, null, null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesRescheduleSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesRescheduleSamples.java new file mode 100644 index 000000000000..9ecc0649481b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesRescheduleSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.models.MaintenanceReschedule; +import java.time.OffsetDateTime; + +/** + * Samples for Maintenances Reschedule. + */ +public final class MaintenancesRescheduleSamples { + /* + * x-ms-original-file: 2025-09-01/Maintenances_Reschedule.json + */ + /** + * Sample code: Maintenances_Reschedule. + * + * @param manager Entry point to AvsManager. + */ + public static void maintenancesReschedule(com.azure.resourcemanager.avs.AvsManager manager) { + manager.maintenances() + .rescheduleWithResponse("group1", "cloud1", "maintenance1", + new MaintenanceReschedule().withRescheduleTime(OffsetDateTime.parse("2023-01-12T16:17:55.237Z")) + .withMessage("Rescheduled due to xyz"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesScheduleSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesScheduleSamples.java new file mode 100644 index 000000000000..a6b000a3a62a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/MaintenancesScheduleSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.models.MaintenanceSchedule; +import java.time.OffsetDateTime; + +/** + * Samples for Maintenances Schedule. + */ +public final class MaintenancesScheduleSamples { + /* + * x-ms-original-file: 2025-09-01/Maintenances_Schedule.json + */ + /** + * Sample code: Maintenances_Schedule. + * + * @param manager Entry point to AvsManager. + */ + public static void maintenancesSchedule(com.azure.resourcemanager.avs.AvsManager manager) { + manager.maintenances() + .scheduleWithResponse("group1", "cloud1", "maintenance1", + new MaintenanceSchedule().withScheduleTime(OffsetDateTime.parse("2025-09-12T16:17:55.237Z")) + .withMessage("scheduled due to xyz"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/OperationsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/OperationsListSamples.java index ad7f78eb4e2f..67e85bab8f5c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/OperationsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2024-09-01/Operations_List.json + * x-ms-original-file: 2025-09-01/Operations_List.json */ /** * Sample code: Operations_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateSamples.java index f73d8016f258..8c54ccc922ee 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class PlacementPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/PlacementPolicies_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/PlacementPolicies_CreateOrUpdate.json */ /** * Sample code: PlacementPolicies_CreateOrUpdate. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java index 7ffcd68d0281..985ea7ff0307 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class PlacementPoliciesDeleteSamples { /* - * x-ms-original-file: 2024-09-01/PlacementPolicies_Delete.json + * x-ms-original-file: 2025-09-01/PlacementPolicies_Delete.json */ /** * Sample code: PlacementPolicies_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetSamples.java index e8c94cde0d2a..92c17ea6b07c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetSamples.java @@ -9,7 +9,7 @@ */ public final class PlacementPoliciesGetSamples { /* - * x-ms-original-file: 2024-09-01/PlacementPolicies_Get.json + * x-ms-original-file: 2025-09-01/PlacementPolicies_Get.json */ /** * Sample code: PlacementPolicies_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListSamples.java index 35e7d0c239c8..e1ec43c56cd6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListSamples.java @@ -9,7 +9,7 @@ */ public final class PlacementPoliciesListSamples { /* - * x-ms-original-file: 2024-09-01/PlacementPolicies_List.json + * x-ms-original-file: 2025-09-01/PlacementPolicies_List.json */ /** * Sample code: PlacementPolicies_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesUpdateSamples.java index 53e01d6dbbd2..77aee98434c3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class PlacementPoliciesUpdateSamples { /* - * x-ms-original-file: 2024-09-01/PlacementPolicies_Update.json + * x-ms-original-file: 2025-09-01/PlacementPolicies_Update.json */ /** * Sample code: PlacementPolicies_Update. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java index a7961d6ef480..c317932369cf 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java @@ -11,6 +11,8 @@ import com.azure.resourcemanager.avs.models.PrivateCloudIdentity; import com.azure.resourcemanager.avs.models.ResourceIdentityType; import com.azure.resourcemanager.avs.models.Sku; +import com.azure.resourcemanager.avs.models.Vcf5License; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -20,7 +22,7 @@ */ public final class PrivateCloudsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/PrivateClouds_CreateOrUpdate.json */ /** * Sample code: PrivateClouds_CreateOrUpdate. @@ -37,11 +39,16 @@ public static void privateCloudsCreateOrUpdate(com.azure.resourcemanager.avs.Avs .withIdentity(new PrivateCloudIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) .withManagementCluster(new ManagementCluster().withClusterSize(4)) .withNetworkBlock("192.168.48.0/22") + .withVcfLicense(new Vcf5License().withLicenseKey("fakeTokenPlaceholder") + .withCores(16) + .withEndDate(OffsetDateTime.parse("2025-12-31T23:59:59Z")) + .withBroadcomSiteId("123456") + .withBroadcomContractNumber("123456")) .create(); } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_CreateOrUpdate_StretchedZones.json + * x-ms-original-file: 2025-09-01/PrivateClouds_CreateOrUpdate_StretchedZones.json */ /** * Sample code: PrivateClouds_CreateOrUpdate_StretchedZones. @@ -58,11 +65,16 @@ public static void privateCloudsCreateOrUpdateStretchedZones(com.azure.resourcem .withZones(Arrays.asList("1", "2")) .withManagementCluster(new ManagementCluster().withClusterSize(4)) .withNetworkBlock("192.168.48.0/22") + .withVcfLicense(new Vcf5License().withLicenseKey("fakeTokenPlaceholder") + .withCores(16) + .withEndDate(OffsetDateTime.parse("2025-12-31T23:59:59Z")) + .withBroadcomSiteId("123456") + .withBroadcomContractNumber("123456")) .create(); } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_CreateOrUpdate_FleetNative.json + * x-ms-original-file: 2025-09-01/PrivateClouds_CreateOrUpdate_FleetNative.json */ /** * Sample code: PrivateClouds_CreateOrUpdate_FleetNative. @@ -81,11 +93,16 @@ public static void privateCloudsCreateOrUpdateFleetNative(com.azure.resourcemana .withVirtualNetworkId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/vnet") .withDnsZoneType(DnsZoneType.PRIVATE) + .withVcfLicense(new Vcf5License().withLicenseKey("fakeTokenPlaceholder") + .withCores(16) + .withEndDate(OffsetDateTime.parse("2025-12-31T23:59:59Z")) + .withBroadcomSiteId("123456") + .withBroadcomContractNumber("123456")) .create(); } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_CreateOrUpdate_Stretched.json + * x-ms-original-file: 2025-09-01/PrivateClouds_CreateOrUpdate_Stretched.json */ /** * Sample code: PrivateClouds_CreateOrUpdate_Stretched. @@ -104,6 +121,11 @@ public static void privateCloudsCreateOrUpdateStretched(com.azure.resourcemanage .withZone(1) .withSecondaryZone(2)) .withNetworkBlock("192.168.48.0/22") + .withVcfLicense(new Vcf5License().withLicenseKey("fakeTokenPlaceholder") + .withCores(16) + .withEndDate(OffsetDateTime.parse("2025-12-31T23:59:59Z")) + .withBroadcomSiteId("123456") + .withBroadcomContractNumber("123456")) .create(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteSamples.java index ece0e3526091..2a5b7cd5af39 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateCloudsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_Delete.json + * x-ms-original-file: 2025-09-01/PrivateClouds_Delete.json */ /** * Sample code: PrivateClouds_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetByResourceGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetByResourceGroupSamples.java index 0defa7dd3eaf..5b16badef722 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetByResourceGroupSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateCloudsGetByResourceGroupSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_Get.json + * x-ms-original-file: 2025-09-01/PrivateClouds_Get.json */ /** * Sample code: PrivateClouds_Get. @@ -21,7 +21,7 @@ public static void privateCloudsGet(com.azure.resourcemanager.avs.AvsManager man } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_Get_Stretched.json + * x-ms-original-file: 2025-09-01/PrivateClouds_Get_Stretched.json */ /** * Sample code: PrivateClouds_Get_Stretched. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetVcfLicenseSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetVcfLicenseSamples.java new file mode 100644 index 000000000000..9846a5bdc301 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetVcfLicenseSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for PrivateClouds GetVcfLicense. + */ +public final class PrivateCloudsGetVcfLicenseSamples { + /* + * x-ms-original-file: 2025-09-01/PrivateClouds_GetVcfLicense.json + */ + /** + * Sample code: PrivateClouds_GetVcfLicense. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsGetVcfLicense(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().getVcfLicenseWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListAdminCredentialsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListAdminCredentialsSamples.java index 28788cfcd5c7..2ce5b8cbc607 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListAdminCredentialsSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListAdminCredentialsSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateCloudsListAdminCredentialsSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_ListAdminCredentials.json + * x-ms-original-file: 2025-09-01/PrivateClouds_ListAdminCredentials.json */ /** * Sample code: PrivateClouds_ListAdminCredentials. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListByResourceGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListByResourceGroupSamples.java index 136f488770c7..7cf2bea53726 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListByResourceGroupSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateCloudsListByResourceGroupSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_List.json + * x-ms-original-file: 2025-09-01/PrivateClouds_List.json */ /** * Sample code: PrivateClouds_List. @@ -21,7 +21,7 @@ public static void privateCloudsList(com.azure.resourcemanager.avs.AvsManager ma } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_List_Stretched.json + * x-ms-original-file: 2025-09-01/PrivateClouds_List_Stretched.json */ /** * Sample code: PrivateClouds_List_Stretched. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListSamples.java index 93cde458051a..ee0caead7926 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateCloudsListSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_ListInSubscription.json + * x-ms-original-file: 2025-09-01/PrivateClouds_ListInSubscription.json */ /** * Sample code: PrivateClouds_ListInSubscription. @@ -21,7 +21,7 @@ public static void privateCloudsListInSubscription(com.azure.resourcemanager.avs } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_ListInSubscription_Stretched.json + * x-ms-original-file: 2025-09-01/PrivateClouds_ListInSubscription_Stretched.json */ /** * Sample code: PrivateClouds_ListInSubscription_Stretched. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateNsxtPasswordSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateNsxtPasswordSamples.java index 4bff535cdb3d..879b071f5722 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateNsxtPasswordSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateNsxtPasswordSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateCloudsRotateNsxtPasswordSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_RotateNsxtPassword.json + * x-ms-original-file: 2025-09-01/PrivateClouds_RotateNsxtPassword.json */ /** * Sample code: PrivateClouds_RotateNsxtPassword. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateVcenterPasswordSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateVcenterPasswordSamples.java index 099d74bf01b3..8dc82659542d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateVcenterPasswordSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateVcenterPasswordSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateCloudsRotateVcenterPasswordSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_RotateVcenterPassword.json + * x-ms-original-file: 2025-09-01/PrivateClouds_RotateVcenterPassword.json */ /** * Sample code: PrivateClouds_RotateVcenterPassword. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsUpdateSamples.java index 11d382df0e6c..4985d48a68b3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsUpdateSamples.java @@ -17,7 +17,7 @@ */ public final class PrivateCloudsUpdateSamples { /* - * x-ms-original-file: 2024-09-01/PrivateClouds_Update.json + * x-ms-original-file: 2025-09-01/PrivateClouds_Update.json */ /** * Sample code: PrivateClouds_Update. @@ -39,7 +39,7 @@ public static void privateCloudsUpdate(com.azure.resourcemanager.avs.AvsManager } /* - * x-ms-original-file: 2024-09-01/PrivateClouds_Update_Stretched.json + * x-ms-original-file: 2025-09-01/PrivateClouds_Update_Stretched.json */ /** * Sample code: PrivateClouds_Update_Stretched. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksGetSamples.java index fdd1eb6a66f7..ed2db87b2677 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksGetSamples.java @@ -9,7 +9,7 @@ */ public final class ProvisionedNetworksGetSamples { /* - * x-ms-original-file: 2024-09-01/ProvisionedNetworks_Get.json + * x-ms-original-file: 2025-09-01/ProvisionedNetworks_Get.json */ /** * Sample code: ProvisionedNetworks_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksListSamples.java index 54abe365b6f4..900af9f34d4f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksListSamples.java @@ -9,7 +9,7 @@ */ public final class ProvisionedNetworksListSamples { /* - * x-ms-original-file: 2024-09-01/ProvisionedNetworks_List.json + * x-ms-original-file: 2025-09-01/ProvisionedNetworks_List.json */ /** * Sample code: ProvisionedNetworks_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesCreateOrUpdateSamples.java index 84287bb0334e..6a8241370a9f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class PureStoragePoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/PureStoragePolicies_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/PureStoragePolicies_CreateOrUpdate.json */ /** * Sample code: PureStoragePolicies_CreateOrUpdate. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesDeleteSamples.java index a1b01aa89541..0559b5d4c942 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class PureStoragePoliciesDeleteSamples { /* - * x-ms-original-file: 2024-09-01/PureStoragePolicies_Delete.json + * x-ms-original-file: 2025-09-01/PureStoragePolicies_Delete.json */ /** * Sample code: PureStoragePolicies_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesGetSamples.java index 15bfe941e9c6..6180337aed0e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesGetSamples.java @@ -9,7 +9,7 @@ */ public final class PureStoragePoliciesGetSamples { /* - * x-ms-original-file: 2024-09-01/PureStoragePolicies_Get.json + * x-ms-original-file: 2025-09-01/PureStoragePolicies_Get.json */ /** * Sample code: PureStoragePolicies_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesListSamples.java index 74bc549f95ce..6eb04c2609ac 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesListSamples.java @@ -9,7 +9,7 @@ */ public final class PureStoragePoliciesListSamples { /* - * x-ms-original-file: 2024-09-01/PureStoragePolicies_List.json + * x-ms-original-file: 2025-09-01/PureStoragePolicies_List.json */ /** * Sample code: PureStoragePolicies_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java index beaf379b0024..c55ae1fdc552 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ScriptCmdletsGetSamples { /* - * x-ms-original-file: 2024-09-01/ScriptCmdlets_Get.json + * x-ms-original-file: 2025-09-01/ScriptCmdlets_Get.json */ /** * Sample code: ScriptCmdlets_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListSamples.java index 45bbcf2db065..ac86da2c4778 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListSamples.java @@ -9,7 +9,7 @@ */ public final class ScriptCmdletsListSamples { /* - * x-ms-original-file: 2024-09-01/ScriptCmdlets_List.json + * x-ms-original-file: 2025-09-01/ScriptCmdlets_List.json */ /** * Sample code: ScriptCmdlets_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateSamples.java index 484278968eae..1a7a04a89400 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ScriptExecutionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-09-01/ScriptExecutions_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01/ScriptExecutions_CreateOrUpdate.json */ /** * Sample code: ScriptExecutions_CreateOrUpdate. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteSamples.java index 0e9b2cc85b49..7035ff9b659b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ScriptExecutionsDeleteSamples { /* - * x-ms-original-file: 2024-09-01/ScriptExecutions_Delete.json + * x-ms-original-file: 2025-09-01/ScriptExecutions_Delete.json */ /** * Sample code: ScriptExecutions_Delete. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsSamples.java index cd602fca3567..49314288dbd1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsSamples.java @@ -12,7 +12,7 @@ */ public final class ScriptExecutionsGetExecutionLogsSamples { /* - * x-ms-original-file: 2024-09-01/ScriptExecutions_GetExecutionLogs.json + * x-ms-original-file: 2025-09-01/ScriptExecutions_GetExecutionLogs.json */ /** * Sample code: ScriptExecutions_GetExecutionLogs. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetSamples.java index 8758e9fe7994..e9951dd6deb5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ScriptExecutionsGetSamples { /* - * x-ms-original-file: 2024-09-01/ScriptExecutions_Get.json + * x-ms-original-file: 2025-09-01/ScriptExecutions_Get.json */ /** * Sample code: ScriptExecutions_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListSamples.java index c46c622f96fa..e8a25d8eb861 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListSamples.java @@ -9,7 +9,7 @@ */ public final class ScriptExecutionsListSamples { /* - * x-ms-original-file: 2024-09-01/ScriptExecutions_List.json + * x-ms-original-file: 2025-09-01/ScriptExecutions_List.json */ /** * Sample code: ScriptExecutions_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetSamples.java index 4c6aba9d080c..4469cdcb4364 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ScriptPackagesGetSamples { /* - * x-ms-original-file: 2024-09-01/ScriptPackages_Get.json + * x-ms-original-file: 2025-09-01/ScriptPackages_Get.json */ /** * Sample code: ScriptPackages_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListSamples.java index 2f7caf80f8dd..3f8a584f115a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListSamples.java @@ -9,7 +9,7 @@ */ public final class ScriptPackagesListSamples { /* - * x-ms-original-file: 2024-09-01/ScriptPackages_List.json + * x-ms-original-file: 2025-09-01/ScriptPackages_List.json */ /** * Sample code: ScriptPackages_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/SkusListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/SkusListSamples.java index a75b9165b42e..cfafbc0b1eca 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/SkusListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/SkusListSamples.java @@ -9,7 +9,7 @@ */ public final class SkusListSamples { /* - * x-ms-original-file: 2024-09-01/Skus_List.json + * x-ms-original-file: 2025-09-01/Skus_List.json */ /** * Sample code: Skus_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetSamples.java index 5fb2596cfcac..60ca36f843f7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualMachinesGetSamples { /* - * x-ms-original-file: 2024-09-01/VirtualMachines_Get.json + * x-ms-original-file: 2025-09-01/VirtualMachines_Get.json */ /** * Sample code: VirtualMachines_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListSamples.java index 7c31d8d513f2..7c87069bce85 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualMachinesListSamples { /* - * x-ms-original-file: 2024-09-01/VirtualMachines_List.json + * x-ms-original-file: 2025-09-01/VirtualMachines_List.json */ /** * Sample code: VirtualMachines_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesRestrictMovementSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesRestrictMovementSamples.java index a35b094f8605..2ced1a38b98d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesRestrictMovementSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesRestrictMovementSamples.java @@ -12,7 +12,7 @@ */ public final class VirtualMachinesRestrictMovementSamples { /* - * x-ms-original-file: 2024-09-01/VirtualMachines_RestrictMovement.json + * x-ms-original-file: 2025-09-01/VirtualMachines_RestrictMovement.json */ /** * Sample code: VirtualMachines_RestrictMovement. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpSamples.java index d30f1528faa3..0f90fe51460d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpSamples.java @@ -11,7 +11,7 @@ */ public final class WorkloadNetworksCreateDhcpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateDhcp.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreateDhcp.json */ /** * Sample code: WorkloadNetworks_CreateDhcp. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceSamples.java index 389ad30b1d49..510281e8a4c2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceSamples.java @@ -12,7 +12,7 @@ */ public final class WorkloadNetworksCreateDnsServiceSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateDnsService.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreateDnsService.json */ /** * Sample code: WorkloadNetworks_CreateDnsService. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneSamples.java index 193d59310c7f..798d61d18b9b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneSamples.java @@ -11,7 +11,7 @@ */ public final class WorkloadNetworksCreateDnsZoneSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateDnsZone.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreateDnsZone.json */ /** * Sample code: WorkloadNetworks_CreateDnsZone. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringSamples.java index 30f988fc45c5..2aae4671becb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringSamples.java @@ -11,7 +11,7 @@ */ public final class WorkloadNetworksCreatePortMirroringSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreatePortMirroring.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreatePortMirroring.json */ /** * Sample code: WorkloadNetworks_CreatePortMirroring. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpSamples.java index 625ae1c27258..625316e9505c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksCreatePublicIpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreatePublicIP.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreatePublicIP.json */ /** * Sample code: WorkloadNetworks_CreatePublicIP. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsSamples.java index 29a18353c37d..aa1c33b7f838 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsSamples.java @@ -12,7 +12,7 @@ */ public final class WorkloadNetworksCreateSegmentsSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateSegments.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreateSegments.json */ /** * Sample code: WorkloadNetworks_CreateSegments. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupSamples.java index ec815c4caa48..cbf24ee9b395 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupSamples.java @@ -11,7 +11,7 @@ */ public final class WorkloadNetworksCreateVMGroupSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateVMGroup.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_CreateVMGroup.json */ /** * Sample code: WorkloadNetworks_CreateVMGroup. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpSamples.java index e3702b894517..97bd8c8798f8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksDeleteDhcpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteDhcp.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeleteDhcp.json */ /** * Sample code: WorkloadNetworks_DeleteDhcp. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceSamples.java index aec0207b064c..075cc225fcc4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksDeleteDnsServiceSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteDnsService.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeleteDnsService.json */ /** * Sample code: WorkloadNetworks_DeleteDnsService. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneSamples.java index 12551a69980d..2e52d90721c7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksDeleteDnsZoneSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteDnsZone.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeleteDnsZone.json */ /** * Sample code: WorkloadNetworks_DeleteDnsZone. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringSamples.java index 3fc45c6337a4..09ba6c91a0fe 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksDeletePortMirroringSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeletePortMirroring.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeletePortMirroring.json */ /** * Sample code: WorkloadNetworks_DeletePortMirroring. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpSamples.java index 59d91630670d..445f2d5c0519 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksDeletePublicIpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeletePublicIP.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeletePublicIP.json */ /** * Sample code: WorkloadNetworks_DeletePublicIP. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentSamples.java index 1dea561c2236..5074971f87aa 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksDeleteSegmentSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteSegment.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeleteSegment.json */ /** * Sample code: WorkloadNetworks_DeleteSegment. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupSamples.java index edfeb5e9c0ac..d2436d820c87 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksDeleteVMGroupSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteVMGroup.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_DeleteVMGroup.json */ /** * Sample code: WorkloadNetworks_DeleteVMGroup. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpSamples.java index bac42c2b28eb..3ce715363966 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksGetDhcpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetDhcp.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetDhcp.json */ /** * Sample code: WorkloadNetworks_GetDhcp. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceSamples.java index 7cb059d6a387..680a7392dc32 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksGetDnsServiceSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetDnsService.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetDnsService.json */ /** * Sample code: WorkloadNetworks_GetDnsService. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneSamples.java index 60b7b2ba3677..959591e64c8b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksGetDnsZoneSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetDnsZone.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetDnsZone.json */ /** * Sample code: WorkloadNetworks_GetDnsZone. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java index 136b8200dee4..4a6b15ce07de 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksGetGatewaySamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetGateway.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetGateway.json */ /** * Sample code: WorkloadNetworks_GetGateway. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java index a6ad560ac6da..e13532ebfa0b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksGetPortMirroringSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetPortMirroring.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetPortMirroring.json */ /** * Sample code: WorkloadNetworks_GetPortMirroring. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpSamples.java index ca54c2bdd35f..a48d53ccfa59 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksGetPublicIpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetPublicIP.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetPublicIP.json */ /** * Sample code: WorkloadNetworks_GetPublicIP. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java index 623b3212c320..4d51e135e0a2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksGetSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_Get.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_Get.json */ /** * Sample code: WorkloadNetworks_Get. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java index c11029b3e078..5ab1fdbc5f2b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksGetSegmentSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetSegment.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetSegment.json */ /** * Sample code: WorkloadNetworks_GetSegment. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java index a2291d548198..74f9892c1b5a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksGetVMGroupSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetVMGroup.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetVMGroup.json */ /** * Sample code: WorkloadNetworks_GetVMGroup. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java index 6734eaf98020..cc1dc9d1e158 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksGetVirtualMachineSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetVirtualMachine.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_GetVirtualMachine.json */ /** * Sample code: WorkloadNetworks_GetVirtualMachine. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java index 867f0a96e550..a886d482dc2e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksListDhcpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListDhcp.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListDhcp.json */ /** * Sample code: WorkloadNetworks_ListDhcp. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesSamples.java index 6d458db9a9a9..2f08e6266af1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksListDnsServicesSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListDnsServices.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListDnsServices.json */ /** * Sample code: WorkloadNetworks_ListDnsServices. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesSamples.java index bf10cf4518ff..bdf78ae12a57 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksListDnsZonesSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListDnsZones.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListDnsZones.json */ /** * Sample code: WorkloadNetworks_ListDnsZones. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysSamples.java index 2aea6b5f449b..264ac69e169f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksListGatewaysSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListGateways.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListGateways.json */ /** * Sample code: WorkloadNetworks_ListGateways. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringSamples.java index 72c51a4bd9e9..44425057badb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksListPortMirroringSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListPortMirroring.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListPortMirroring.json */ /** * Sample code: WorkloadNetworks_ListPortMirroring. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsSamples.java index cc021ec38f4c..e2a1ade2cafa 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksListPublicIPsSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListPublicIPs.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListPublicIPs.json */ /** * Sample code: WorkloadNetworks_ListPublicIPs. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSamples.java index dc45431ea8d1..b18237f0fd04 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksListSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_List.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_List.json */ /** * Sample code: WorkloadNetworks_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsSamples.java index 1114d12ba7bf..dca95a1d1f6f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksListSegmentsSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListSegments.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListSegments.json */ /** * Sample code: WorkloadNetworks_ListSegments. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsSamples.java index 7665a8c25787..0a4586f38784 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksListVMGroupsSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListVMGroups.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListVMGroups.json */ /** * Sample code: WorkloadNetworks_ListVMGroups. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesSamples.java index a1a099b1edba..b44fc983f5b5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesSamples.java @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksListVirtualMachinesSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListVirtualMachines.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_ListVirtualMachines.json */ /** * Sample code: WorkloadNetworks_ListVirtualMachines. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.java index b8031cbbc2e9..76bfaeb71226 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.java @@ -12,7 +12,7 @@ */ public final class WorkloadNetworksUpdateDhcpSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateDhcp.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdateDhcp.json */ /** * Sample code: WorkloadNetworks_UpdateDhcp. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsServiceSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsServiceSamples.java index b7a2bb1ed8a0..9310fb684985 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsServiceSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsServiceSamples.java @@ -13,7 +13,7 @@ */ public final class WorkloadNetworksUpdateDnsServiceSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateDnsService.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdateDnsService.json */ /** * Sample code: WorkloadNetworks_UpdateDnsService. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsZoneSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsZoneSamples.java index 189e0a3458cf..2b704a565340 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsZoneSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsZoneSamples.java @@ -12,7 +12,7 @@ */ public final class WorkloadNetworksUpdateDnsZoneSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateDnsZone.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdateDnsZone.json */ /** * Sample code: WorkloadNetworks_UpdateDnsZone. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdatePortMirroringSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdatePortMirroringSamples.java index 8a4fa91b474a..f32602b33a8f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdatePortMirroringSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdatePortMirroringSamples.java @@ -12,7 +12,7 @@ */ public final class WorkloadNetworksUpdatePortMirroringSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdatePortMirroring.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdatePortMirroring.json */ /** * Sample code: WorkloadNetworks_UpdatePortMirroring. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentsSamples.java index e62c72f800fb..3c0de8aaee13 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentsSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentsSamples.java @@ -13,7 +13,7 @@ */ public final class WorkloadNetworksUpdateSegmentsSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateSegments.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdateSegments.json */ /** * Sample code: WorkloadNetworks_UpdateSegments. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateVMGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateVMGroupSamples.java index 42d6e12c54cd..76e2f873c3fa 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateVMGroupSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateVMGroupSamples.java @@ -12,7 +12,7 @@ */ public final class WorkloadNetworksUpdateVMGroupSamples { /* - * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateVMGroup.json + * x-ms-original-file: 2025-09-01/WorkloadNetworks_UpdateVMGroup.json */ /** * Sample code: WorkloadNetworks_UpdateVMGroup. diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateMockTests.java index 5c9be782c715..b6cc8549e775 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateMockTests.java @@ -21,7 +21,7 @@ public final class AddonsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"xv\",\"name\":\"vrefdeesv\",\"type\":\"cuijpxt\"}"; + = "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"jqepqwhi\",\"name\":\"monstshiyxgve\",\"type\":\"fclduccbirdsv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,8 +31,8 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Addon response = manager.addons() - .define("ckt") - .withExistingPrivateCloud("enlsvxeizzgwkln", "rmffeyc") + .define("gicgaaoepttaq") + .withExistingPrivateCloud("zjrgyww", "gjxsnptfu") .withProperties(new AddonProperties()) .create(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsDeleteMockTests.java index c2be6f29499b..738abb569505 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsDeleteMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.addons().delete("yxkyxvx", "vblbjednljlageua", "lxunsmjbnkppxy", com.azure.core.util.Context.NONE); + manager.addons().delete("cxwaxfewz", "kjexfdeqvhp", "ylkkshkbffmbm", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsGetWithResponseMockTests.java index 2661fbc6df2e..39fa43ee0bff 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class AddonsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Failed\"},\"id\":\"qgatjeaahhvjhhn\",\"name\":\"kzyb\",\"type\":\"jjidjk\"}"; + = "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Updating\"},\"id\":\"fwlwxjwetnps\",\"name\":\"hclafzvaylptrs\",\"type\":\"qwztcmwqkc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Addon response = manager.addons() - .getWithResponse("zkgimsid", "asi", "ddyvvjskgfmo", com.azure.core.util.Context.NONE) + .getWithResponse("qnyophzfyls", "crpfbcunez", "cez", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsListMockTests.java index 4bc870c79c8e..8376db9bcd15 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsListMockTests.java @@ -21,7 +21,7 @@ public final class AddonsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Building\"},\"id\":\"bxgomfaj\",\"name\":\"wasqvdaeyyg\",\"type\":\"xakjsqzhzb\"}]}"; + = "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Cancelled\"},\"id\":\"nlvxbcuii\",\"name\":\"nktwfansnvpdibmi\",\"type\":\"ostbzbkiwb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,7 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<Addon> response - = manager.addons().list("lzxwhcansy", "oyqhlwig", com.azure.core.util.Context.NONE); + PagedIterable<Addon> response = manager.addons().list("ni", "frzgbzjed", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteMockTests.java index 9574cfdd2739..ffab1e5522d1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.authorizations().delete("cbslhhx", "db", "vodhtn", com.azure.core.util.Context.NONE); + manager.authorizations().delete("hczznvf", "ycjsx", "wwixzvumw", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailabilityPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailabilityPropertiesTests.java index 10b42fdf57db..0c998fd8cc46 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailabilityPropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailabilityPropertiesTests.java @@ -13,21 +13,21 @@ public final class AvailabilityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvailabilityProperties model - = BinaryData.fromString("{\"strategy\":\"DualZone\",\"zone\":1607260782,\"secondaryZone\":2067966148}") + = BinaryData.fromString("{\"strategy\":\"SingleZone\",\"zone\":2019789161,\"secondaryZone\":314213768}") .toObject(AvailabilityProperties.class); - Assertions.assertEquals(AvailabilityStrategy.DUAL_ZONE, model.strategy()); - Assertions.assertEquals(1607260782, model.zone()); - Assertions.assertEquals(2067966148, model.secondaryZone()); + Assertions.assertEquals(AvailabilityStrategy.SINGLE_ZONE, model.strategy()); + Assertions.assertEquals(2019789161, model.zone()); + Assertions.assertEquals(314213768, model.secondaryZone()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AvailabilityProperties model = new AvailabilityProperties().withStrategy(AvailabilityStrategy.DUAL_ZONE) - .withZone(1607260782) - .withSecondaryZone(2067966148); + AvailabilityProperties model = new AvailabilityProperties().withStrategy(AvailabilityStrategy.SINGLE_ZONE) + .withZone(2019789161) + .withSecondaryZone(314213768); model = BinaryData.fromObject(model).toObject(AvailabilityProperties.class); - Assertions.assertEquals(AvailabilityStrategy.DUAL_ZONE, model.strategy()); - Assertions.assertEquals(1607260782, model.zone()); - Assertions.assertEquals(2067966148, model.secondaryZone()); + Assertions.assertEquals(AvailabilityStrategy.SINGLE_ZONE, model.strategy()); + Assertions.assertEquals(2019789161, model.zone()); + Assertions.assertEquals(314213768, model.secondaryZone()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailableWindowForMaintenanceWhileRescheduleOperationTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailableWindowForMaintenanceWhileRescheduleOperationTests.java new file mode 100644 index 000000000000..711748b2a533 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailableWindowForMaintenanceWhileRescheduleOperationTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.AvailableWindowForMaintenanceWhileRescheduleOperation; + +public final class AvailableWindowForMaintenanceWhileRescheduleOperationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AvailableWindowForMaintenanceWhileRescheduleOperation model = BinaryData.fromString( + "{\"kind\":\"AvailableWindowForMaintenance\",\"startsAt\":\"2021-05-16T02:29:50Z\",\"endsAt\":\"2021-05-19T00:36:02Z\"}") + .toObject(AvailableWindowForMaintenanceWhileRescheduleOperation.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailableWindowForMaintenanceWhileScheduleOperationTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailableWindowForMaintenanceWhileScheduleOperationTests.java new file mode 100644 index 000000000000..5843a19da1c5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailableWindowForMaintenanceWhileScheduleOperationTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.AvailableWindowForMaintenanceWhileScheduleOperation; + +public final class AvailableWindowForMaintenanceWhileScheduleOperationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AvailableWindowForMaintenanceWhileScheduleOperation model = BinaryData.fromString( + "{\"kind\":\"AvailableWindowForMaintenance\",\"startsAt\":\"2021-05-28T01:48:43Z\",\"endsAt\":\"2021-09-13T09:37:01Z\"}") + .toObject(AvailableWindowForMaintenanceWhileScheduleOperation.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/BlockedDatesConstraintTimeRangeTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/BlockedDatesConstraintTimeRangeTests.java new file mode 100644 index 000000000000..0bbe70902cd7 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/BlockedDatesConstraintTimeRangeTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.BlockedDatesConstraintTimeRange; + +public final class BlockedDatesConstraintTimeRangeTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BlockedDatesConstraintTimeRange model = BinaryData + .fromString( + "{\"startsAt\":\"2021-01-22T10:45:05Z\",\"endsAt\":\"2021-02-14T21:50:58Z\",\"reason\":\"hvylwzbt\"}") + .toObject(BlockedDatesConstraintTimeRange.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/BlockedWhileRescheduleOperationTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/BlockedWhileRescheduleOperationTests.java new file mode 100644 index 000000000000..d00121a43290 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/BlockedWhileRescheduleOperationTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.BlockedWhileRescheduleOperation; + +public final class BlockedWhileRescheduleOperationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BlockedWhileRescheduleOperation model = BinaryData.fromString( + "{\"kind\":\"Blocked\",\"category\":\"HiPriorityEvent\",\"timeRanges\":[{\"startsAt\":\"2021-06-11T09:32:45Z\",\"endsAt\":\"2021-07-21T15:39:33Z\",\"reason\":\"veual\"},{\"startsAt\":\"2020-12-27T06:38:54Z\",\"endsAt\":\"2021-02-13T23:39:41Z\",\"reason\":\"khfxobbcswsrt\"}]}") + .toObject(BlockedWhileRescheduleOperation.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/BlockedWhileScheduleOperationTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/BlockedWhileScheduleOperationTests.java new file mode 100644 index 000000000000..ef025493a599 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/BlockedWhileScheduleOperationTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.BlockedWhileScheduleOperation; + +public final class BlockedWhileScheduleOperationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BlockedWhileScheduleOperation model = BinaryData.fromString( + "{\"kind\":\"Blocked\",\"category\":\"Holiday\",\"timeRanges\":[{\"startsAt\":\"2021-10-20T20:38:06Z\",\"endsAt\":\"2021-02-14T18:57Z\",\"reason\":\"wndnhj\"}]}") + .toObject(BlockedWhileScheduleOperation.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CircuitTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CircuitTests.java index cff0d2075871..6407cf7b044d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CircuitTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CircuitTests.java @@ -11,7 +11,7 @@ public final class CircuitTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Circuit model = BinaryData.fromString( - "{\"primarySubnet\":\"knme\",\"secondarySubnet\":\"sgzvahapjyzhpv\",\"expressRouteID\":\"zcjrvxdjzlmwlx\",\"expressRoutePrivatePeeringID\":\"ug\"}") + "{\"primarySubnet\":\"qzonosggbhcohf\",\"secondarySubnet\":\"sjnkal\",\"expressRouteID\":\"tiiswacffg\",\"expressRoutePrivatePeeringID\":\"zzewkfvhqcrai\"}") .toObject(Circuit.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateMockTests.java index 65cf64a8665a..4d90291425cc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateMockTests.java @@ -21,7 +21,7 @@ public final class CloudLinksCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Disconnected\",\"linkedCloud\":\"ftxfkf\"},\"id\":\"gpr\",\"name\":\"ptil\",\"type\":\"ucb\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"linkedCloud\":\"gqoweyirdhlisn\"},\"id\":\"fl\",\"name\":\"qmp\",\"type\":\"zruwn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CloudLink response = manager.cloudLinks() - .define("euutlwxezwzh") - .withExistingPrivateCloud("rjdqnsdfzp", "gtgkylkdghr") - .withLinkedCloud("htqlgehgpp") + .define("nlb") + .withExistingPrivateCloud("lmjjyuo", "qtobaxkjeyt") + .withLinkedCloud("nkqbhsyrq") .create(); - Assertions.assertEquals("ftxfkf", response.linkedCloud()); + Assertions.assertEquals("gqoweyirdhlisn", response.linkedCloud()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteMockTests.java index f6df3864a1d5..f2a92c0de96a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.cloudLinks().delete("xgccknfnw", "btmvpdvjdhttza", "fedxihchrphkm", com.azure.core.util.Context.NONE); + manager.cloudLinks().delete("mhyreeudz", "av", "pdqmjxlyyzglgouw", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksGetWithResponseMockTests.java index 6e648647470b..e55f62177bbc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class CloudLinksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Active\",\"linkedCloud\":\"ylaxxulcdi\"},\"id\":\"osfjbjsv\",\"name\":\"jrwhryvy\",\"type\":\"ytdc\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Disconnected\",\"linkedCloud\":\"prltzkatbhjmz\"},\"id\":\"bsoqeqala\",\"name\":\"vlagun\",\"type\":\"tgfebwln\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CloudLink response = manager.cloudLinks() - .getWithResponse("kizvytn", "zvulj", "aaeranokqgukk", com.azure.core.util.Context.NONE) + .getWithResponse("jtwkjaos", "xuzvoamktcqi", "smgbzahgxqdl", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ylaxxulcdi", response.linkedCloud()); + Assertions.assertEquals("prltzkatbhjmz", response.linkedCloud()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksListMockTests.java index a66c158d3376..3c5f43f9bbeb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksListMockTests.java @@ -22,7 +22,7 @@ public final class CloudLinksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Failed\",\"linkedCloud\":\"qobr\"},\"id\":\"nac\",\"name\":\"cc\",\"type\":\"knh\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":\"Disconnected\",\"linkedCloud\":\"xcjxgrytfmpcy\"},\"id\":\"lrmcaykg\",\"name\":\"noxuztrksx\",\"type\":\"pndfcpfnznt\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<CloudLink> response - = manager.cloudLinks().list("lc", "xwmdboxd", com.azure.core.util.Context.NONE); + = manager.cloudLinks().list("pnpbswveflocc", "rmozihmipgawt", com.azure.core.util.Context.NONE); - Assertions.assertEquals("qobr", response.iterator().next().linkedCloud()); + Assertions.assertEquals("xcjxgrytfmpcy", response.iterator().next().linkedCloud()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateMockTests.java index 2a4076da29e2..ad9184688f79 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateMockTests.java @@ -24,7 +24,7 @@ public final class ClustersCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"clusterSize\":1055275397,\"provisioningState\":\"Succeeded\",\"clusterId\":14478242,\"hosts\":[\"uncuw\",\"qspkcdqzhlctd\",\"unqndyfpchrqb\",\"jjrcgegydc\"],\"vsanDatastoreName\":\"oxjumvqqo\"},\"sku\":{\"name\":\"ihrraiouaub\",\"tier\":\"Standard\",\"size\":\"oq\",\"family\":\"uojrngiflr\",\"capacity\":2039990607},\"id\":\"ccbiuimzdlyjdfq\",\"name\":\"mkyoqufdvruzsl\",\"type\":\"ojhp\"}"; + = "{\"properties\":{\"clusterSize\":2022448357,\"provisioningState\":\"Succeeded\",\"clusterId\":1462565656,\"hosts\":[\"hpzpo\",\"o\",\"yjwpfilkmkkh\",\"l\"],\"vsanDatastoreName\":\"ndviauogphuartvt\"},\"sku\":{\"name\":\"ukyefchnmnahmnxh\",\"tier\":\"Basic\",\"size\":\"irwrwe\",\"family\":\"xffi\",\"capacity\":1625380187},\"id\":\"rsnewmozqvbubqma\",\"name\":\"hsycxhxzgaz\",\"type\":\"taboidvmf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,25 +34,25 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Cluster response = manager.clusters() - .define("dxe") - .withExistingPrivateCloud("lvizb", "hfovvacqpbtu") - .withSku(new Sku().withName("yb") - .withTier(SkuTier.BASIC) - .withSize("gdakchz") - .withFamily("lixqnrkcxkjibn") - .withCapacity(866421840)) - .withClusterSize(1481188049) - .withHosts(Arrays.asList("muaslzkw", "rwoycqucwyh", "hnomdrkywuh", "svfuurutlwexxwl")) - .withVsanDatastoreName("niexzsrzpgepq") + .define("vtxnjmxmcuqud") + .withExistingPrivateCloud("gplucfotangcfhny", "zcugswvxwlmzqw") + .withSku(new Sku().withName("d") + .withTier(SkuTier.STANDARD) + .withSize("xxgewpk") + .withFamily("qylkmqpzoyhlf") + .withCapacity(1241682628)) + .withClusterSize(1226161915) + .withHosts(Arrays.asList("k", "gfabuiyjibuzphdu", "neiknpg", "xgjiuqh")) + .withVsanDatastoreName("tozipqwj") .create(); - Assertions.assertEquals("ihrraiouaub", response.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals("oq", response.sku().size()); - Assertions.assertEquals("uojrngiflr", response.sku().family()); - Assertions.assertEquals(2039990607, response.sku().capacity()); - Assertions.assertEquals(1055275397, response.clusterSize()); - Assertions.assertEquals("uncuw", response.hosts().get(0)); - Assertions.assertEquals("oxjumvqqo", response.vsanDatastoreName()); + Assertions.assertEquals("ukyefchnmnahmnxh", response.sku().name()); + Assertions.assertEquals(SkuTier.BASIC, response.sku().tier()); + Assertions.assertEquals("irwrwe", response.sku().size()); + Assertions.assertEquals("xffi", response.sku().family()); + Assertions.assertEquals(1625380187, response.sku().capacity()); + Assertions.assertEquals(2022448357, response.clusterSize()); + Assertions.assertEquals("hpzpo", response.hosts().get(0)); + Assertions.assertEquals("ndviauogphuartvt", response.vsanDatastoreName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersDeleteMockTests.java index 3556a0eea3c5..08648b7e4dbd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersDeleteMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.clusters().delete("hcz", "xrxzbujrtr", "qvwre", com.azure.core.util.Context.NONE); + manager.clusters().delete("rxmunjdxvgln", "vxlx", "aglqivbgkcvkh", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersGetWithResponseMockTests.java index 75deb315e48b..cc6a304b2589 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class ClustersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"clusterSize\":1913750704,\"provisioningState\":\"Updating\",\"clusterId\":584521489,\"hosts\":[\"ibxyijddtvqc\",\"tad\",\"jaeukmrsieekpn\",\"zaapmudqmeqwi\"],\"vsanDatastoreName\":\"ibudqwy\"},\"sku\":{\"name\":\"eb\",\"tier\":\"Basic\",\"size\":\"mzznrtffyaqitmhh\",\"family\":\"oqaqhvseufuq\",\"capacity\":703231006},\"id\":\"dlcgqlsismjqfr\",\"name\":\"dgamquhiosrsj\",\"type\":\"ivfcdisyirnx\"}"; + = "{\"properties\":{\"clusterSize\":1215102009,\"provisioningState\":\"Updating\",\"clusterId\":1524568479,\"hosts\":[\"letlx\",\"mr\",\"ddoui\",\"amowaziynknlqwzd\"],\"vsanDatastoreName\":\"iwhxqszdtmaajq\"},\"sku\":{\"name\":\"huxy\",\"tier\":\"Standard\",\"size\":\"m\",\"family\":\"g\",\"capacity\":1041266491},\"id\":\"yospspshc\",\"name\":\"fkyjpmspbpssdfpp\",\"type\":\"ogtieyujtvczkcny\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +32,16 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Cluster response = manager.clusters() - .getWithResponse("fuzboyjathwtzolb", "emwmdxmebwjs", "jpahlxvea", com.azure.core.util.Context.NONE) + .getWithResponse("njhvsujztc", "ytqj", "w", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("eb", response.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.sku().tier()); - Assertions.assertEquals("mzznrtffyaqitmhh", response.sku().size()); - Assertions.assertEquals("oqaqhvseufuq", response.sku().family()); - Assertions.assertEquals(703231006, response.sku().capacity()); - Assertions.assertEquals(1913750704, response.clusterSize()); - Assertions.assertEquals("ibxyijddtvqc", response.hosts().get(0)); - Assertions.assertEquals("ibudqwy", response.vsanDatastoreName()); + Assertions.assertEquals("huxy", response.sku().name()); + Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); + Assertions.assertEquals("m", response.sku().size()); + Assertions.assertEquals("g", response.sku().family()); + Assertions.assertEquals(1041266491, response.sku().capacity()); + Assertions.assertEquals(1215102009, response.clusterSize()); + Assertions.assertEquals("letlx", response.hosts().get(0)); + Assertions.assertEquals("iwhxqszdtmaajq", response.vsanDatastoreName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListMockTests.java index a86508a6861a..aac59e66080b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListMockTests.java @@ -23,7 +23,7 @@ public final class ClustersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"clusterSize\":1725340246,\"provisioningState\":\"Updating\",\"clusterId\":1837991897,\"hosts\":[\"ibph\",\"qzmiza\"],\"vsanDatastoreName\":\"kan\"},\"sku\":{\"name\":\"jpdn\",\"tier\":\"Free\",\"size\":\"joylh\",\"family\":\"muoyxprimr\",\"capacity\":2035956497},\"id\":\"eecjmeis\",\"name\":\"stvasylwxdzaumw\",\"type\":\"oohgu\"}]}"; + = "{\"value\":[{\"properties\":{\"clusterSize\":596306222,\"provisioningState\":\"Deleting\",\"clusterId\":1901330199,\"hosts\":[\"rwsdp\",\"ra\"],\"vsanDatastoreName\":\"vzbglbyvi\"},\"sku\":{\"name\":\"tctbrxkjzwrgxffm\",\"tier\":\"Basic\",\"size\":\"fbkgozxwopdby\",\"family\":\"izqaclnapxbiyg\",\"capacity\":966053961},\"id\":\"knfsmfcttuxuuyil\",\"name\":\"lq\",\"type\":\"iquvrehm\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,15 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<Cluster> response - = manager.clusters().list("qtgdqohmcwsl", "riz", com.azure.core.util.Context.NONE); + = manager.clusters().list("qxpxiwfcngjsaa", "iixtmkzj", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jpdn", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.iterator().next().sku().tier()); - Assertions.assertEquals("joylh", response.iterator().next().sku().size()); - Assertions.assertEquals("muoyxprimr", response.iterator().next().sku().family()); - Assertions.assertEquals(2035956497, response.iterator().next().sku().capacity()); - Assertions.assertEquals(1725340246, response.iterator().next().clusterSize()); - Assertions.assertEquals("ibph", response.iterator().next().hosts().get(0)); - Assertions.assertEquals("kan", response.iterator().next().vsanDatastoreName()); + Assertions.assertEquals("tctbrxkjzwrgxffm", response.iterator().next().sku().name()); + Assertions.assertEquals(SkuTier.BASIC, response.iterator().next().sku().tier()); + Assertions.assertEquals("fbkgozxwopdby", response.iterator().next().sku().size()); + Assertions.assertEquals("izqaclnapxbiyg", response.iterator().next().sku().family()); + Assertions.assertEquals(966053961, response.iterator().next().sku().capacity()); + Assertions.assertEquals(596306222, response.iterator().next().clusterSize()); + Assertions.assertEquals("rwsdp", response.iterator().next().hosts().get(0)); + Assertions.assertEquals("vzbglbyvi", response.iterator().next().vsanDatastoreName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListZonesWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListZonesWithResponseMockTests.java index 3482af4e6850..e13ff07698f3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListZonesWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListZonesWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class ClustersListZonesWithResponseMockTests { @Test public void testListZonesWithResponse() throws Exception { String responseStr - = "{\"zones\":[{\"hosts\":[\"cof\"],\"zone\":\"e\"},{\"hosts\":[\"hgbjkvrelje\",\"murvzm\",\"ov\"],\"zone\":\"nashcxlp\"},{\"hosts\":[\"rbdkelvidiz\",\"zsdbccxjmon\"],\"zone\":\"gnwncypuuwwlt\"},{\"hosts\":[\"jctzenkei\",\"zzhmkd\",\"svflyhbxcudch\"],\"zone\":\"srboldforobw\"}]}"; + = "{\"zones\":[{\"hosts\":[\"gqjxgpnrhgovfgp\",\"kqmhhaowjr\",\"zvuporqzdfuydz\"],\"zone\":\"fvxcnqmxqpswo\"},{\"hosts\":[\"khlg\",\"dhbemzqkzszu\",\"iwtglxxhljfpg\"],\"zone\":\"crmnzhrgmqgjs\"},{\"hosts\":[\"qcbfrmbodths\",\"qgvriibakcla\",\"jfrnxousxauzlwv\",\"gmwohqfzizvu\"],\"zone\":\"mk\"},{\"hosts\":[\"thnwpzte\"],\"zone\":\"vmribiat\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testListZonesWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ClusterZoneList response = manager.clusters() - .listZonesWithResponse("khgn", "nzonzl", "piqywnc", com.azure.core.util.Context.NONE) + .listZonesWithResponse("zvuqdflvon", "yp", "pubcpzgpxtivhjk", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateMockTests.java index 97d9b9d0f1e5..d3717610678f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateMockTests.java @@ -26,7 +26,7 @@ public final class DatastoresCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"netAppVolume\":{\"id\":\"ewjptmcg\"},\"diskPoolVolume\":{\"targetId\":\"ostzelndlatu\",\"lunName\":\"mzlbiojlvfhrb\",\"mountOption\":\"ATTACH\",\"path\":\"qvcww\"},\"elasticSanVolume\":{\"targetId\":\"urmochpprprs\"},\"pureStorageVolume\":{\"storagePoolId\":\"okayzejnhlbkp\",\"sizeGb\":16764387},\"status\":\"Unknown\"},\"id\":\"iljhahz\",\"name\":\"echndbnwieholew\",\"type\":\"wiuub\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"netAppVolume\":{\"id\":\"ab\"},\"diskPoolVolume\":{\"targetId\":\"ujtmvcopexcmjurb\",\"lunName\":\"hhlkyqltqsrogtu\",\"mountOption\":\"ATTACH\",\"path\":\"djk\"},\"elasticSanVolume\":{\"targetId\":\"ysidfvclgl\"},\"pureStorageVolume\":{\"storagePoolId\":\"fuijtkbus\",\"sizeGb\":939102144},\"status\":\"DeadOrError\"},\"id\":\"ikayiansharuj\",\"name\":\"ji\",\"type\":\"xfz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,22 +36,22 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Datastore response = manager.datastores() - .define("zsu") - .withExistingCluster("qwthmky", "bcysih", "gqcwdhohsdtmc") - .withNetAppVolume(new NetAppVolume().withId("xbzlmc")) - .withDiskPoolVolume(new DiskPoolVolume().withTargetId("apcvhdbe") - .withLunName("wqqxeysko") - .withMountOption(MountOptionEnum.ATTACH)) - .withElasticSanVolume(new ElasticSanVolume().withTargetId("xeqoc")) - .withPureStorageVolume(new PureStorageVolume().withStoragePoolId("mygvkzqkj").withSizeGb(1592759966)) + .define("zjrwdkqze") + .withExistingCluster("m", "jgcgbjbgdlfgtdys", "aquflqbctqha") + .withNetAppVolume(new NetAppVolume().withId("zi")) + .withDiskPoolVolume(new DiskPoolVolume().withTargetId("jxdfzantkwcegya") + .withLunName("lbnseqac") + .withMountOption(MountOptionEnum.MOUNT)) + .withElasticSanVolume(new ElasticSanVolume().withTargetId("iookjbsah")) + .withPureStorageVolume(new PureStorageVolume().withStoragePoolId("dt").withSizeGb(807818343)) .create(); - Assertions.assertEquals("ewjptmcg", response.netAppVolume().id()); - Assertions.assertEquals("ostzelndlatu", response.diskPoolVolume().targetId()); - Assertions.assertEquals("mzlbiojlvfhrb", response.diskPoolVolume().lunName()); + Assertions.assertEquals("ab", response.netAppVolume().id()); + Assertions.assertEquals("ujtmvcopexcmjurb", response.diskPoolVolume().targetId()); + Assertions.assertEquals("hhlkyqltqsrogtu", response.diskPoolVolume().lunName()); Assertions.assertEquals(MountOptionEnum.ATTACH, response.diskPoolVolume().mountOption()); - Assertions.assertEquals("urmochpprprs", response.elasticSanVolume().targetId()); - Assertions.assertEquals("okayzejnhlbkp", response.pureStorageVolume().storagePoolId()); - Assertions.assertEquals(16764387, response.pureStorageVolume().sizeGb()); + Assertions.assertEquals("ysidfvclgl", response.elasticSanVolume().targetId()); + Assertions.assertEquals("fuijtkbus", response.pureStorageVolume().storagePoolId()); + Assertions.assertEquals(939102144, response.pureStorageVolume().sizeGb()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteMockTests.java index 9506d0990b9e..4632a0b3a514 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteMockTests.java @@ -28,7 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.datastores() - .delete("or", "mftpmdtz", "jltfvnzcyjtotpv", "pvpbdbzqgqqiheds", com.azure.core.util.Context.NONE); + .delete("rhwpus", "jbaqehgpdoh", "jqatucoigebxn", "nwfepbnwg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresGetWithResponseMockTests.java index 427340cd9e29..8427146acac7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class DatastoresGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"netAppVolume\":{\"id\":\"yznuciqd\"},\"diskPoolVolume\":{\"targetId\":\"ex\",\"lunName\":\"itdfuxtyasiib\",\"mountOption\":\"MOUNT\",\"path\":\"nnust\"},\"elasticSanVolume\":{\"targetId\":\"ljhnmgixhcmav\"},\"pureStorageVolume\":{\"storagePoolId\":\"foudor\",\"sizeGb\":1621390850},\"status\":\"LostCommunication\"},\"id\":\"prot\",\"name\":\"ypundmbxhugc\",\"type\":\"jkavl\"}"; + = "{\"properties\":{\"provisioningState\":\"Deleting\",\"netAppVolume\":{\"id\":\"khenlus\"},\"diskPoolVolume\":{\"targetId\":\"rd\",\"lunName\":\"jxtxrdc\",\"mountOption\":\"MOUNT\",\"path\":\"idttgepus\"},\"elasticSanVolume\":{\"targetId\":\"yjtcvuwk\"},\"pureStorageVolume\":{\"storagePoolId\":\"iziesfuughtuq\",\"sizeGb\":1176427262},\"status\":\"Accessible\"},\"id\":\"ey\",\"name\":\"tuhxuicb\",\"type\":\"ewmrswnjlxu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,15 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Datastore response = manager.datastores() - .getWithResponse("uyxoaf", "aoqltfaey", "inmfgvxirp", "hriypoqeyhlqhy", com.azure.core.util.Context.NONE) + .getWithResponse("opionszon", "pngajin", "ixjawrtm", "fjmyccxlzhco", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("yznuciqd", response.netAppVolume().id()); - Assertions.assertEquals("ex", response.diskPoolVolume().targetId()); - Assertions.assertEquals("itdfuxtyasiib", response.diskPoolVolume().lunName()); + Assertions.assertEquals("khenlus", response.netAppVolume().id()); + Assertions.assertEquals("rd", response.diskPoolVolume().targetId()); + Assertions.assertEquals("jxtxrdc", response.diskPoolVolume().lunName()); Assertions.assertEquals(MountOptionEnum.MOUNT, response.diskPoolVolume().mountOption()); - Assertions.assertEquals("ljhnmgixhcmav", response.elasticSanVolume().targetId()); - Assertions.assertEquals("foudor", response.pureStorageVolume().storagePoolId()); - Assertions.assertEquals(1621390850, response.pureStorageVolume().sizeGb()); + Assertions.assertEquals("yjtcvuwk", response.elasticSanVolume().targetId()); + Assertions.assertEquals("iziesfuughtuq", response.pureStorageVolume().storagePoolId()); + Assertions.assertEquals(1176427262, response.pureStorageVolume().sizeGb()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresListMockTests.java index 0ad7b97581ca..e25b30b3f385 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresListMockTests.java @@ -23,7 +23,7 @@ public final class DatastoresListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"netAppVolume\":{\"id\":\"mfp\"},\"diskPoolVolume\":{\"targetId\":\"ojeevy\",\"lunName\":\"yhsgz\",\"mountOption\":\"ATTACH\",\"path\":\"gomfgbeglq\"},\"elasticSanVolume\":{\"targetId\":\"eohibet\"},\"pureStorageVolume\":{\"storagePoolId\":\"uankrrfxeeeb\",\"sizeGb\":400321103},\"status\":\"LostCommunication\"},\"id\":\"cvbmqzb\",\"name\":\"q\",\"type\":\"lajrnwxacevehj\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"netAppVolume\":{\"id\":\"kqtob\"},\"diskPoolVolume\":{\"targetId\":\"uxofshfphwpnulai\",\"lunName\":\"wzejywhslw\",\"mountOption\":\"ATTACH\",\"path\":\"llndnpd\"},\"elasticSanVolume\":{\"targetId\":\"pqafgfugsnnfhy\"},\"pureStorageVolume\":{\"storagePoolId\":\"efy\",\"sizeGb\":525012311},\"status\":\"Inaccessible\"},\"id\":\"tfjgt\",\"name\":\"xrjvzuyturmlm\",\"type\":\"owolbaui\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,14 +33,14 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<Datastore> response - = manager.datastores().list("tfnmdx", "tngfdgugeyzihgr", "yui", com.azure.core.util.Context.NONE); + = manager.datastores().list("hppubowsepdfgkmt", "herngb", "c", com.azure.core.util.Context.NONE); - Assertions.assertEquals("mfp", response.iterator().next().netAppVolume().id()); - Assertions.assertEquals("ojeevy", response.iterator().next().diskPoolVolume().targetId()); - Assertions.assertEquals("yhsgz", response.iterator().next().diskPoolVolume().lunName()); + Assertions.assertEquals("kqtob", response.iterator().next().netAppVolume().id()); + Assertions.assertEquals("uxofshfphwpnulai", response.iterator().next().diskPoolVolume().targetId()); + Assertions.assertEquals("wzejywhslw", response.iterator().next().diskPoolVolume().lunName()); Assertions.assertEquals(MountOptionEnum.ATTACH, response.iterator().next().diskPoolVolume().mountOption()); - Assertions.assertEquals("eohibet", response.iterator().next().elasticSanVolume().targetId()); - Assertions.assertEquals("uankrrfxeeeb", response.iterator().next().pureStorageVolume().storagePoolId()); - Assertions.assertEquals(400321103, response.iterator().next().pureStorageVolume().sizeGb()); + Assertions.assertEquals("pqafgfugsnnfhy", response.iterator().next().elasticSanVolume().targetId()); + Assertions.assertEquals("efy", response.iterator().next().pureStorageVolume().storagePoolId()); + Assertions.assertEquals(525012311, response.iterator().next().pureStorageVolume().sizeGb()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/EndpointsTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/EndpointsTests.java index c0f7ec6fe04f..a003d9f91922 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/EndpointsTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/EndpointsTests.java @@ -11,7 +11,7 @@ public final class EndpointsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Endpoints model = BinaryData.fromString( - "{\"nsxtManager\":\"zovawjvz\",\"vcsa\":\"luthn\",\"hcxCloudManager\":\"rnxipei\",\"nsxtManagerIp\":\"jzuaejxdultskzbb\",\"vcenterIp\":\"zumveekgpwo\",\"hcxCloudManagerIp\":\"hkfpbs\"}") + "{\"nsxtManager\":\"pnppfuf\",\"vcsa\":\"wdmhdlxyjrxs\",\"hcxCloudManager\":\"afcnih\",\"nsxtManagerIp\":\"qapnedgfbcv\",\"vcenterIp\":\"vq\",\"hcxCloudManagerIp\":\"keqdcvdrhvoods\"}") .toObject(Endpoints.class); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteMockTests.java index 9e8c8f508408..a81d2b4106af 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.globalReachConnections().delete("dqxtbjwgnyf", "sf", "svtui", com.azure.core.util.Context.NONE); + manager.globalReachConnections().delete("qrsxyp", "uuuybnchrsziz", "yuel", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteWithResponseMockTests.java index 853ac8a7163d..09def8337671 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteWithResponseMockTests.java @@ -28,7 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.hcxEnterpriseSites() - .deleteWithResponse("slnelx", "eixynllxecwcroj", "hslhca", com.azure.core.util.Context.NONE); + .deleteWithResponse("pfpazjzoywjxhpdu", "ontacnpq", "tehtuevrhrljyoog", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HostsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HostsGetWithResponseMockTests.java index d4bc4523dd2e..f28cb38b0b34 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HostsGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HostsGetWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class HostsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"kind\":\"HostProperties\",\"provisioningState\":\"Succeeded\",\"displayName\":\"wtswbzuwfmdur\",\"moRefId\":\"egizv\",\"fqdn\":\"felisdjub\",\"maintenance\":\"Replacement\",\"faultDomain\":\"igkxkbsazga\"},\"zones\":[\"cyrcmjdmspo\"],\"sku\":{\"name\":\"pv\",\"tier\":\"Standard\",\"size\":\"lniofrzgbzje\",\"family\":\"st\",\"capacity\":247999147},\"id\":\"v\",\"name\":\"bcuiiz\",\"type\":\"ktwfa\"}"; + = "{\"properties\":{\"kind\":\"HostProperties\",\"provisioningState\":\"Succeeded\",\"displayName\":\"knapq\",\"moRefId\":\"yuicdhzbdy\",\"fqdn\":\"wgbdvibidmhmwffp\",\"maintenance\":\"Replacement\",\"faultDomain\":\"vapckccrrvwey\"},\"zones\":[\"yyukphaimmo\"],\"sku\":{\"name\":\"oqboshbragapyyr\",\"tier\":\"Premium\",\"size\":\"bpav\",\"family\":\"pfppd\",\"capacity\":267572624},\"id\":\"pgahxkumas\",\"name\":\"caac\",\"type\":\"dmmcpugmehqep\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,16 +33,16 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); HostModel response = manager.hosts() - .getWithResponse("h", "hfqpofv", "bcblemb", "kbwvqvxkdiv", com.azure.core.util.Context.NONE) + .getWithResponse("vfxzopjh", "zxlioh", "d", "dtfgxqbawpcbb", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wtswbzuwfmdur", response.properties().displayName()); + Assertions.assertEquals("knapq", response.properties().displayName()); Assertions.assertEquals(HostMaintenance.REPLACEMENT, response.properties().maintenance()); - Assertions.assertEquals("cyrcmjdmspo", response.zones().get(0)); - Assertions.assertEquals("pv", response.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals("lniofrzgbzje", response.sku().size()); - Assertions.assertEquals("st", response.sku().family()); - Assertions.assertEquals(247999147, response.sku().capacity()); + Assertions.assertEquals("yyukphaimmo", response.zones().get(0)); + Assertions.assertEquals("oqboshbragapyyr", response.sku().name()); + Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); + Assertions.assertEquals("bpav", response.sku().size()); + Assertions.assertEquals("pfppd", response.sku().family()); + Assertions.assertEquals(267572624, response.sku().capacity()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HostsListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HostsListMockTests.java index ea664dc5c2b0..0024e346bc7a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HostsListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HostsListMockTests.java @@ -24,7 +24,7 @@ public final class HostsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"kind\":\"HostProperties\",\"provisioningState\":\"Succeeded\",\"displayName\":\"scazuawxtzxpu\",\"moRefId\":\"wabzxrvxcushsp\",\"fqdn\":\"ivmxyasfl\",\"maintenance\":\"Upgrade\",\"faultDomain\":\"zwywako\"},\"zones\":[\"nsmjbl\",\"ljhlnymzotq\",\"ryuzcbmqqv\",\"mv\"],\"sku\":{\"name\":\"gtayxonsupeujlz\",\"tier\":\"Standard\",\"size\":\"vsqltnzoibgsxg\",\"family\":\"fyq\",\"capacity\":1604903119},\"id\":\"qoxwd\",\"name\":\"fdbxiqxeiiqbim\",\"type\":\"tmwwi\"}]}"; + = "{\"value\":[{\"properties\":{\"kind\":\"HostProperties\",\"provisioningState\":\"Canceled\",\"displayName\":\"cymczngn\",\"moRefId\":\"xxewu\",\"fqdn\":\"nvudbchaqdtvqecr\",\"maintenance\":\"Upgrade\",\"faultDomain\":\"xxdtddmflh\"},\"zones\":[\"xzvtzna\"],\"sku\":{\"name\":\"bannovvoxczytp\",\"tier\":\"Premium\",\"size\":\"vroevytlyo\",\"family\":\"rrouuxvnsasbcry\",\"capacity\":1031456845},\"id\":\"zrxklobd\",\"name\":\"nazpmk\",\"type\":\"lmv\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,15 +34,15 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<HostModel> response - = manager.hosts().list("nwcl", "yjede", "xm", com.azure.core.util.Context.NONE); + = manager.hosts().list("fvv", "yfedevjbo", "lcqxypokk", com.azure.core.util.Context.NONE); - Assertions.assertEquals("scazuawxtzxpu", response.iterator().next().properties().displayName()); + Assertions.assertEquals("cymczngn", response.iterator().next().properties().displayName()); Assertions.assertEquals(HostMaintenance.UPGRADE, response.iterator().next().properties().maintenance()); - Assertions.assertEquals("nsmjbl", response.iterator().next().zones().get(0)); - Assertions.assertEquals("gtayxonsupeujlz", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.iterator().next().sku().tier()); - Assertions.assertEquals("vsqltnzoibgsxg", response.iterator().next().sku().size()); - Assertions.assertEquals("fyq", response.iterator().next().sku().family()); - Assertions.assertEquals(1604903119, response.iterator().next().sku().capacity()); + Assertions.assertEquals("xzvtzna", response.iterator().next().zones().get(0)); + Assertions.assertEquals("bannovvoxczytp", response.iterator().next().sku().name()); + Assertions.assertEquals(SkuTier.PREMIUM, response.iterator().next().sku().tier()); + Assertions.assertEquals("vroevytlyo", response.iterator().next().sku().size()); + Assertions.assertEquals("rrouuxvnsasbcry", response.iterator().next().sku().family()); + Assertions.assertEquals(1031456845, response.iterator().next().sku().capacity()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateMockTests.java index c835dc21ebe7..edf297e78350 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateMockTests.java @@ -22,7 +22,7 @@ public final class IscsiPathsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"networkBlock\":\"ljqepq\"},\"id\":\"ixmonstshiyxg\",\"name\":\"elfclducc\",\"type\":\"irdsvuwcob\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"networkBlock\":\"hlowkx\"},\"id\":\"vbrdfjmzsyzfho\",\"name\":\"lhikcyychunsj\",\"type\":\"pjrtws\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); IscsiPath response = manager.iscsiPaths() - .createOrUpdate("jx", "nptfujgi", new IscsiPathInner().withNetworkBlock("o"), + .createOrUpdate("xmycjimryvwgcw", "pbmz", new IscsiPathInner().withNetworkBlock("ydsx"), com.azure.core.util.Context.NONE); - Assertions.assertEquals("ljqepq", response.networkBlock()); + Assertions.assertEquals("hlowkx", response.networkBlock()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteMockTests.java index acba739ec62a..242c45853668 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.iscsiPaths().delete("egstmninwjizci", "nghgshej", com.azure.core.util.Context.NONE); + manager.iscsiPaths().delete("hv", "uic", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetWithResponseMockTests.java index cb39de1aeb89..2138e4e75dda 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class IscsiPathsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Pending\",\"networkBlock\":\"xfdeqvhpsyl\"},\"id\":\"shk\",\"name\":\"ffmbmxzjrg\",\"type\":\"wwp\"}"; + = "{\"properties\":{\"provisioningState\":\"Deleting\",\"networkBlock\":\"kjxnqpvwgfstmhq\"},\"id\":\"izmdksa\",\"name\":\"afclu\",\"type\":\"v\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); IscsiPath response = manager.iscsiPaths() - .getWithResponse("qwztcmwqkc", "cxwaxfewz", com.azure.core.util.Context.NONE) + .getWithResponse("aabeolhbhlvbmxuq", "bsxtkcudfbsfarfs", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xfdeqvhpsyl", response.networkBlock()); + Assertions.assertEquals("kjxnqpvwgfstmhq", response.networkBlock()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudMockTests.java index 06e0d2df7b11..ebaaa6f420e1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudMockTests.java @@ -22,7 +22,7 @@ public final class IscsiPathsListByPrivateCloudMockTests { @Test public void testListByPrivateCloud() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"networkBlock\":\"ophzfylsgcrp\"},\"id\":\"cunezzcezelfw\",\"name\":\"fwlwxjwetnps\",\"type\":\"hclafzvaylptrs\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\",\"networkBlock\":\"bqnbl\"},\"id\":\"eaclgschorimk\",\"name\":\"srrm\",\"type\":\"ucsofldpuviyf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testListByPrivateCloud() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<IscsiPath> response - = manager.iscsiPaths().listByPrivateCloud("snvpdibmi", "ostbzbkiwb", com.azure.core.util.Context.NONE); + = manager.iscsiPaths().listByPrivateCloud("u", "hbzehewho", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ophzfylsgcrp", response.iterator().next().networkBlock()); + Assertions.assertEquals("bqnbl", response.iterator().next().networkBlock()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicenseInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicenseInnerTests.java new file mode 100644 index 000000000000..42403db981fa --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicenseInnerTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.fluent.models.LicenseInner; +import com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner; + +public final class LicenseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LicenseInner model = BinaryData.fromString( + "{\"properties\":{\"kind\":\"LicenseProperties\",\"provisioningState\":\"Canceled\"},\"id\":\"ujqgidok\",\"name\":\"jljyoxgv\",\"type\":\"ltbgsncghkj\"}") + .toObject(LicenseInner.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LicenseInner model = new LicenseInner().withProperties(new LicensePropertiesInner()); + model = BinaryData.fromObject(model).toObject(LicenseInner.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicenseListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicenseListResultTests.java new file mode 100644 index 000000000000..b337bd56dc28 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicenseListResultTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.LicenseListResult; +import org.junit.jupiter.api.Assertions; + +public final class LicenseListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LicenseListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"kind\":\"LicenseProperties\",\"provisioningState\":\"Failed\"},\"id\":\"hjfbebrjcxe\",\"name\":\"fuwutttxf\",\"type\":\"jrbirphxepcyv\"}],\"nextLink\":\"fnljky\"}") + .toObject(LicenseListResult.class); + Assertions.assertEquals("fnljky", model.nextLink()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensePropertiesInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensePropertiesInnerTests.java new file mode 100644 index 000000000000..82d6579a8414 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensePropertiesInnerTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner; + +public final class LicensePropertiesInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LicensePropertiesInner model + = BinaryData.fromString("{\"kind\":\"LicenseProperties\",\"provisioningState\":\"Failed\"}") + .toObject(LicensePropertiesInner.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LicensePropertiesInner model = new LicensePropertiesInner(); + model = BinaryData.fromObject(model).toObject(LicensePropertiesInner.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesCreateOrUpdateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..46aa0cf2d878 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesCreateOrUpdateMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.avs.AvsManager; +import com.azure.resourcemanager.avs.fluent.models.LicensePropertiesInner; +import com.azure.resourcemanager.avs.models.License; +import com.azure.resourcemanager.avs.models.LicenseName; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class LicensesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"kind\":\"LicenseProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"owsaaelcattcjuh\",\"name\":\"lrvkmjc\",\"type\":\"mjvlgfgg\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AvsManager manager = AvsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + License response = manager.licenses() + .define(LicenseName.VMWARE_FIREWALL) + .withExistingPrivateCloud("fb", "kwpzdqtvh") + .withProperties(new LicensePropertiesInner()) + .create(); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesGetPropertiesWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesGetPropertiesWithResponseMockTests.java new file mode 100644 index 000000000000..398b22fee55e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesGetPropertiesWithResponseMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.avs.AvsManager; +import com.azure.resourcemanager.avs.models.LicenseName; +import com.azure.resourcemanager.avs.models.LicenseProperties; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class LicensesGetPropertiesWithResponseMockTests { + @Test + public void testGetPropertiesWithResponse() throws Exception { + String responseStr = "{\"kind\":\"LicenseProperties\",\"provisioningState\":\"Succeeded\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AvsManager manager = AvsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + LicenseProperties response = manager.licenses() + .getPropertiesWithResponse("hqo", "oihiqak", LicenseName.VMWARE_FIREWALL, com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesGetWithResponseMockTests.java new file mode 100644 index 000000000000..7648db70e971 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesGetWithResponseMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.avs.AvsManager; +import com.azure.resourcemanager.avs.models.License; +import com.azure.resourcemanager.avs.models.LicenseName; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class LicensesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"kind\":\"LicenseProperties\",\"provisioningState\":\"Canceled\"},\"id\":\"lmbkzu\",\"name\":\"nigrfihotjewl\",\"type\":\"xuzzjgnrefq\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AvsManager manager = AvsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + License response = manager.licenses() + .getWithResponse("memczjkmmyk", "ujxsglhsr", LicenseName.VMWARE_FIREWALL, com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesListMockTests.java new file mode 100644 index 000000000000..bbddca0a6d75 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LicensesListMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.avs.AvsManager; +import com.azure.resourcemanager.avs.models.License; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class LicensesListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"kind\":\"LicenseProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"uyzlw\",\"name\":\"hmem\",\"type\":\"ooclutnp\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AvsManager manager = AvsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable<License> response + = manager.licenses().list("hvtrrmhwrbfdpyf", "ubhvj", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilityWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilityWithResponseMockTests.java index 8c6a5e26d8e0..e88d73fc5382 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilityWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilityWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class LocationsCheckQuotaAvailabilityWithResponseMockTests { @Test public void testCheckQuotaAvailabilityWithResponse() throws Exception { String responseStr - = "{\"hostsRemaining\":{\"bycjsxjwwix\":1606147807,\"umwmxqhnd\":2058612555},\"quotaEnabled\":\"Enabled\"}"; + = "{\"hostsRemaining\":{\"lfojuidjp\":491651275,\"yjucejikzoeo\":776019677,\"tzejetjklnt\":1081937239,\"yjuzkdb\":61866964},\"quotaEnabled\":\"Enabled\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testCheckQuotaAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Quota response = manager.locations() - .checkQuotaAvailabilityWithResponse("hvhcz", com.azure.core.util.Context.NONE) + .checkQuotaAvailabilityWithResponse("nmjmvlwyzgiblk", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilityWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilityWithResponseMockTests.java index 6b06052351ef..2a43f1b842e0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilityWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilityWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class LocationsCheckTrialAvailabilityWithResponseMockTests { @Test public void testCheckTrialAvailabilityWithResponse() throws Exception { - String responseStr = "{\"status\":\"TrialAvailable\",\"availableHosts\":597476008}"; + String responseStr = "{\"status\":\"TrialUsed\",\"availableHosts\":27775403}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,12 @@ public void testCheckTrialAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Trial response = manager.locations() - .checkTrialAvailabilityWithResponse("tbxqmuluxlxq", - new Sku().withName("vnersbycucrw") + .checkTrialAvailabilityWithResponse("vkyylizrzbjpsf", + new Sku().withName("sfuztlvtmv") .withTier(SkuTier.BASIC) - .withSize("kzebrqbsm") - .withFamily("ziqgfuh") - .withCapacity(1603302916), + .withSize("idqlvhu") + .withFamily("veo") + .withCapacity(2146524113), com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceInnerTests.java new file mode 100644 index 000000000000..11fcf50c46b2 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceInnerTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.fluent.models.MaintenanceInner; + +public final class MaintenanceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceInner model = BinaryData.fromString( + "{\"properties\":{\"component\":\"ESXI\",\"displayName\":\"baumnyqupedeoj\",\"clusterId\":746279797,\"infoLink\":\"khsmtxpsiebt\",\"impact\":\"vpesapskrdqmhjjd\",\"scheduledByMicrosoft\":true,\"state\":{\"name\":\"Failed\",\"message\":\"zxuutkncwscwsvl\",\"startedAt\":\"2021-01-31T03:54:24Z\",\"endedAt\":\"2021-04-17T11:28:26Z\"},\"scheduledStartTime\":\"2021-01-10T18:00:43Z\",\"estimatedDurationInMinutes\":5623641553510482328,\"provisioningState\":\"Succeeded\",\"operations\":[{\"kind\":\"MaintenanceManagementOperation\"}],\"maintenanceReadiness\":{\"type\":\"Preflight\",\"status\":\"Ready\",\"message\":\"ykvceoveil\",\"failedChecks\":[{\"name\":\"tyfjfcnjbkcnxdhb\",\"impactedResources\":[{},{},{}]},{\"name\":\"h\",\"impactedResources\":[{},{},{},{}]},{\"name\":\"vjtoqnermclfp\",\"impactedResources\":[{},{}]},{\"name\":\"xus\",\"impactedResources\":[{},{}]}],\"lastUpdated\":\"2021-02-01T08:33:04Z\"}},\"id\":\"ye\",\"name\":\"sbj\",\"type\":\"azqugxywpmueefj\"}") + .toObject(MaintenanceInner.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceListResultTests.java new file mode 100644 index 000000000000..da9f5db7620d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceListResultTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.MaintenanceListResult; +import org.junit.jupiter.api.Assertions; + +public final class MaintenanceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"component\":\"NSXT\",\"displayName\":\"zlfbxzpuzycispnq\",\"clusterId\":64383308,\"infoLink\":\"gkbrpyyd\",\"impact\":\"bnuqqkpik\",\"scheduledByMicrosoft\":false,\"state\":{\"name\":\"Scheduled\",\"message\":\"agnb\",\"startedAt\":\"2021-10-07T08:50:26Z\",\"endedAt\":\"2021-09-06T12:14:51Z\"},\"scheduledStartTime\":\"2021-03-22T07:27:17Z\",\"estimatedDurationInMinutes\":3585965124940247949,\"provisioningState\":\"Canceled\",\"operations\":[{\"kind\":\"MaintenanceManagementOperation\"},{\"kind\":\"MaintenanceManagementOperation\"},{\"kind\":\"MaintenanceManagementOperation\"}],\"maintenanceReadiness\":{\"type\":\"Precheck\",\"status\":\"Ready\",\"message\":\"trcvpnazzmh\",\"failedChecks\":[{},{}],\"lastUpdated\":\"2021-02-24T15:52:09Z\"}},\"id\":\"xttd\",\"name\":\"hrbnlankxmyskpbh\",\"type\":\"nbtkcxywnytnr\"},{\"properties\":{\"component\":\"NSXT\",\"displayName\":\"idybyxczf\",\"clusterId\":751467546,\"infoLink\":\"axdbabph\",\"impact\":\"rqlfktsthsucocmn\",\"scheduledByMicrosoft\":false,\"state\":{\"name\":\"Canceled\",\"message\":\"twwrqp\",\"startedAt\":\"2021-04-24T05:51:32Z\",\"endedAt\":\"2021-08-10T13:56:06Z\"},\"scheduledStartTime\":\"2021-08-25T21:52:39Z\",\"estimatedDurationInMinutes\":623670055928945506,\"provisioningState\":\"Updating\",\"operations\":[{\"kind\":\"MaintenanceManagementOperation\"}],\"maintenanceReadiness\":{\"type\":\"Preflight\",\"status\":\"Ready\",\"message\":\"axibxujw\",\"failedChecks\":[{},{},{},{}],\"lastUpdated\":\"2021-10-28T10:03:56Z\"}},\"id\":\"muzyoxaepdk\",\"name\":\"jancu\",\"type\":\"rhdwbavxbniw\"},{\"properties\":{\"component\":\"NSXT\",\"displayName\":\"tsdbpgn\",\"clusterId\":862771413,\"infoLink\":\"hpzxbzpfzab\",\"impact\":\"cuh\",\"scheduledByMicrosoft\":false,\"state\":{\"name\":\"Canceled\",\"message\":\"iklbbovpl\",\"startedAt\":\"2021-08-16T02:09:31Z\",\"endedAt\":\"2021-02-25T04:11:47Z\"},\"scheduledStartTime\":\"2021-01-10T00:04:32Z\",\"estimatedDurationInMinutes\":1452553390398198565,\"provisioningState\":\"Canceled\",\"operations\":[{\"kind\":\"MaintenanceManagementOperation\"},{\"kind\":\"MaintenanceManagementOperation\"},{\"kind\":\"MaintenanceManagementOperation\"},{\"kind\":\"MaintenanceManagementOperation\"}],\"maintenanceReadiness\":{\"type\":\"Preflight\",\"status\":\"Ready\",\"message\":\"xquk\",\"failedChecks\":[{},{},{}],\"lastUpdated\":\"2021-09-14T21:04:43Z\"}},\"id\":\"gsxnkjzkdeslpv\",\"name\":\"opwi\",\"type\":\"ighxpk\"}],\"nextLink\":\"zb\"}") + .toObject(MaintenanceListResult.class); + Assertions.assertEquals("zb", model.nextLink()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceManagementOperationTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceManagementOperationTests.java new file mode 100644 index 000000000000..15ec72d79c5b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceManagementOperationTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.MaintenanceManagementOperation; + +public final class MaintenanceManagementOperationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceManagementOperation model = BinaryData.fromString("{\"kind\":\"MaintenanceManagementOperation\"}") + .toObject(MaintenanceManagementOperation.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancePropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancePropertiesTests.java new file mode 100644 index 000000000000..3bf9e6112953 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancePropertiesTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.MaintenanceProperties; + +public final class MaintenancePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceProperties model = BinaryData.fromString( + "{\"component\":\"VCSA\",\"displayName\":\"kqujidsuyono\",\"clusterId\":572434085,\"infoLink\":\"ocqxtccmg\",\"impact\":\"dxyt\",\"scheduledByMicrosoft\":true,\"state\":{\"name\":\"Scheduled\",\"message\":\"wfudwpzntxhdzhl\",\"startedAt\":\"2021-08-04T21:14:04Z\",\"endedAt\":\"2021-03-06T10:40:17Z\"},\"scheduledStartTime\":\"2021-08-15T16:49:16Z\",\"estimatedDurationInMinutes\":6374623406138918990,\"provisioningState\":\"Failed\",\"operations\":[{\"kind\":\"MaintenanceManagementOperation\"},{\"kind\":\"MaintenanceManagementOperation\"},{\"kind\":\"MaintenanceManagementOperation\"},{\"kind\":\"MaintenanceManagementOperation\"}],\"maintenanceReadiness\":{\"type\":\"Precheck\",\"status\":\"NotApplicable\",\"message\":\"pycanuzbpz\",\"failedChecks\":[{\"name\":\"uwbc\",\"impactedResources\":[{\"id\":\"mehhseyvjusrtsl\",\"errors\":[{},{},{},{}]}]},{\"name\":\"deemao\",\"impactedResources\":[{\"id\":\"gkvtmelmqkrhah\",\"errors\":[{},{},{},{}]},{\"id\":\"ahaquh\",\"errors\":[{},{}]},{\"id\":\"duala\",\"errors\":[{}]},{\"id\":\"vfadmws\",\"errors\":[{}]}]},{\"name\":\"vxpvgomz\",\"impactedResources\":[{\"id\":\"sgwbnbbeld\",\"errors\":[{}]},{\"id\":\"baliourqhakauha\",\"errors\":[{},{},{}]}]},{\"name\":\"wxosowzxcug\",\"impactedResources\":[{\"id\":\"oxdjebwpuc\",\"errors\":[{},{},{},{}]},{\"id\":\"ovbvmeueciv\",\"errors\":[{},{},{}]},{\"id\":\"euojgjrwju\",\"errors\":[{},{}]}]}],\"lastUpdated\":\"2021-05-06T21:21:59Z\"}}") + .toObject(MaintenanceProperties.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceReadinessRefreshOperationTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceReadinessRefreshOperationTests.java new file mode 100644 index 000000000000..e20f44255795 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceReadinessRefreshOperationTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.MaintenanceReadinessRefreshOperation; + +public final class MaintenanceReadinessRefreshOperationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceReadinessRefreshOperation model = BinaryData.fromString( + "{\"kind\":\"MaintenanceReadinessRefresh\",\"isDisabled\":true,\"disabledReason\":\"lrbpbewtghfgbl\",\"status\":\"Failed\",\"refreshedByMicrosoft\":true,\"message\":\"lvqhjkbegibtnmx\"}") + .toObject(MaintenanceReadinessRefreshOperation.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceReadinessTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceReadinessTests.java new file mode 100644 index 000000000000..18129e6c56c4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceReadinessTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.MaintenanceReadiness; + +public final class MaintenanceReadinessTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceReadiness model = BinaryData.fromString( + "{\"type\":\"Preflight\",\"status\":\"NotReady\",\"message\":\"waloayqcgwr\",\"failedChecks\":[{\"name\":\"zg\",\"impactedResources\":[{\"id\":\"htxongmtsavjc\",\"errors\":[{},{},{},{}]}]}],\"lastUpdated\":\"2021-05-06T06:11:53Z\"}") + .toObject(MaintenanceReadiness.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceRescheduleTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceRescheduleTests.java new file mode 100644 index 000000000000..0df8114c2bdb --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceRescheduleTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.MaintenanceReschedule; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class MaintenanceRescheduleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceReschedule model + = BinaryData.fromString("{\"rescheduleTime\":\"2021-04-03T19:52:37Z\",\"message\":\"zlmwlxkvugfhz\"}") + .toObject(MaintenanceReschedule.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-03T19:52:37Z"), model.rescheduleTime()); + Assertions.assertEquals("zlmwlxkvugfhz", model.message()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MaintenanceReschedule model + = new MaintenanceReschedule().withRescheduleTime(OffsetDateTime.parse("2021-04-03T19:52:37Z")) + .withMessage("zlmwlxkvugfhz"); + model = BinaryData.fromObject(model).toObject(MaintenanceReschedule.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-03T19:52:37Z"), model.rescheduleTime()); + Assertions.assertEquals("zlmwlxkvugfhz", model.message()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceScheduleTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceScheduleTests.java new file mode 100644 index 000000000000..5b915eb4455f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceScheduleTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.MaintenanceSchedule; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class MaintenanceScheduleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceSchedule model + = BinaryData.fromString("{\"scheduleTime\":\"2021-10-22T04:54:45Z\",\"message\":\"jvzunluthnnp\"}") + .toObject(MaintenanceSchedule.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-22T04:54:45Z"), model.scheduleTime()); + Assertions.assertEquals("jvzunluthnnp", model.message()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MaintenanceSchedule model + = new MaintenanceSchedule().withScheduleTime(OffsetDateTime.parse("2021-10-22T04:54:45Z")) + .withMessage("jvzunluthnnp"); + model = BinaryData.fromObject(model).toObject(MaintenanceSchedule.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-22T04:54:45Z"), model.scheduleTime()); + Assertions.assertEquals("jvzunluthnnp", model.message()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceStateTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceStateTests.java new file mode 100644 index 000000000000..e470aa2522c6 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenanceStateTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.MaintenanceState; +import com.azure.resourcemanager.avs.models.MaintenanceStateName; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class MaintenanceStateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceState model = BinaryData.fromString( + "{\"name\":\"NotScheduled\",\"message\":\"ytdxwit\",\"startedAt\":\"2021-05-14T21:36:27Z\",\"endedAt\":\"2021-01-30T10:40:13Z\"}") + .toObject(MaintenanceState.class); + Assertions.assertEquals(MaintenanceStateName.NOT_SCHEDULED, model.name()); + Assertions.assertEquals("ytdxwit", model.message()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-14T21:36:27Z"), model.startedAt()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-30T10:40:13Z"), model.endedAt()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesGetWithResponseMockTests.java new file mode 100644 index 000000000000..753f19ac0435 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesGetWithResponseMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.avs.AvsManager; +import com.azure.resourcemanager.avs.models.Maintenance; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MaintenancesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"component\":\"ESXI\",\"displayName\":\"ybafiq\",\"clusterId\":224237712,\"infoLink\":\"rbgjekglkl\",\"impact\":\"ulidwc\",\"scheduledByMicrosoft\":false,\"state\":{\"name\":\"InProgress\",\"message\":\"o\",\"startedAt\":\"2021-09-23T05:58:37Z\",\"endedAt\":\"2021-10-03T14:57:19Z\"},\"scheduledStartTime\":\"2021-01-07T02:58:15Z\",\"estimatedDurationInMinutes\":7171060418990105090,\"provisioningState\":\"Succeeded\",\"operations\":[{\"kind\":\"MaintenanceManagementOperation\"},{\"kind\":\"MaintenanceManagementOperation\"}],\"maintenanceReadiness\":{\"type\":\"Preflight\",\"status\":\"DataNotAvailable\",\"message\":\"zhzmtksjci\",\"failedChecks\":[{\"name\":\"sxcdgljplkeuach\",\"impactedResources\":[{},{},{},{}]},{\"name\":\"lryts\",\"impactedResources\":[{},{}]},{\"name\":\"mdgycxn\",\"impactedResources\":[{},{}]}],\"lastUpdated\":\"2021-07-10T18:53:12Z\"}},\"id\":\"jjyslurlps\",\"name\":\"hkvpedwqsls\",\"type\":\"hmpqvw\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AvsManager manager = AvsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Maintenance response = manager.maintenances() + .getWithResponse("pjhmqrhvthl", "iwdcxsmlzzhzd", "xetlgydlhqv", com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesInitiateChecksWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesInitiateChecksWithResponseMockTests.java new file mode 100644 index 000000000000..99f06baa4987 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesInitiateChecksWithResponseMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.avs.AvsManager; +import com.azure.resourcemanager.avs.models.Maintenance; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MaintenancesInitiateChecksWithResponseMockTests { + @Test + public void testInitiateChecksWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"component\":\"VCSA\",\"displayName\":\"arts\",\"clusterId\":933017494,\"infoLink\":\"ixkykxd\",\"impact\":\"j\",\"scheduledByMicrosoft\":false,\"state\":{\"name\":\"NotScheduled\",\"message\":\"xhikkflrmymyin\",\"startedAt\":\"2021-08-23T12:22:56Z\",\"endedAt\":\"2021-02-14T01:31:43Z\"},\"scheduledStartTime\":\"2021-07-16T22:11:36Z\",\"estimatedDurationInMinutes\":1275549097814878704,\"provisioningState\":\"Updating\",\"operations\":[{\"kind\":\"MaintenanceManagementOperation\"}],\"maintenanceReadiness\":{\"type\":\"Precheck\",\"status\":\"Ready\",\"message\":\"cgxuugqkctotiowl\",\"failedChecks\":[{\"name\":\"dptjgwdtgukranb\",\"impactedResources\":[{},{},{}]}],\"lastUpdated\":\"2021-09-20T05:19:05Z\"}},\"id\":\"kccuzgy\",\"name\":\"qwahoi\",\"type\":\"lwgniiprglvawu\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AvsManager manager = AvsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Maintenance response = manager.maintenances() + .initiateChecksWithResponse("ufykhvuhxepmru", "znabaobns", "ujdjltymkmvg", com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesListMockTests.java new file mode 100644 index 000000000000..d088e1f0c4ba --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesListMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.avs.AvsManager; +import com.azure.resourcemanager.avs.models.Maintenance; +import com.azure.resourcemanager.avs.models.MaintenanceStateName; +import com.azure.resourcemanager.avs.models.MaintenanceStatusFilter; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MaintenancesListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"component\":\"VCSA\",\"displayName\":\"mjsmwr\",\"clusterId\":1712169364,\"infoLink\":\"xfzzzwyjafitlhgu\",\"impact\":\"uchlgmltx\",\"scheduledByMicrosoft\":false,\"state\":{\"name\":\"InProgress\",\"message\":\"sgzv\",\"startedAt\":\"2021-05-04T04:08:29Z\",\"endedAt\":\"2021-08-22T06:37:05Z\"},\"scheduledStartTime\":\"2021-02-08T10:28:39Z\",\"estimatedDurationInMinutes\":6814533521400429806,\"provisioningState\":\"Succeeded\",\"operations\":[{\"kind\":\"MaintenanceManagementOperation\"},{\"kind\":\"MaintenanceManagementOperation\"},{\"kind\":\"MaintenanceManagementOperation\"},{\"kind\":\"MaintenanceManagementOperation\"}],\"maintenanceReadiness\":{\"type\":\"Preflight\",\"status\":\"DataNotAvailable\",\"message\":\"mxq\",\"failedChecks\":[{\"name\":\"p\",\"impactedResources\":[{},{}]},{\"name\":\"t\",\"impactedResources\":[{},{},{}]}],\"lastUpdated\":\"2021-03-01T04:34:23Z\"}},\"id\":\"vl\",\"name\":\"jchcsrlzknmzla\",\"type\":\"rupdwvnphcnzq\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AvsManager manager = AvsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable<Maintenance> response = manager.maintenances() + .list("lxrzvhqjwtr", "tgvgzp", MaintenanceStateName.NOT_SCHEDULED, MaintenanceStatusFilter.ACTIVE, + OffsetDateTime.parse("2021-06-27T16:49:11Z"), OffsetDateTime.parse("2021-06-04T02:53:26Z"), + com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesRescheduleWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesRescheduleWithResponseMockTests.java new file mode 100644 index 000000000000..fa5738609ac3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesRescheduleWithResponseMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.avs.AvsManager; +import com.azure.resourcemanager.avs.models.Maintenance; +import com.azure.resourcemanager.avs.models.MaintenanceReschedule; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MaintenancesRescheduleWithResponseMockTests { + @Test + public void testRescheduleWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"component\":\"VCSA\",\"displayName\":\"rqbrjbbmpxdlvyk\",\"clusterId\":22052299,\"infoLink\":\"crse\",\"impact\":\"jksghudg\",\"scheduledByMicrosoft\":false,\"state\":{\"name\":\"InProgress\",\"message\":\"gsv\",\"startedAt\":\"2021-03-29T11:54:34Z\",\"endedAt\":\"2021-06-02T05:28:28Z\"},\"scheduledStartTime\":\"2021-06-01T20:14:30Z\",\"estimatedDurationInMinutes\":2898970581925571992,\"provisioningState\":\"Failed\",\"operations\":[{\"kind\":\"MaintenanceManagementOperation\"},{\"kind\":\"MaintenanceManagementOperation\"},{\"kind\":\"MaintenanceManagementOperation\"},{\"kind\":\"MaintenanceManagementOperation\"}],\"maintenanceReadiness\":{\"type\":\"Preflight\",\"status\":\"NotReady\",\"message\":\"kxfbvfbhdyirhp\",\"failedChecks\":[{\"name\":\"deimawzov\",\"impactedResources\":[{},{},{}]},{\"name\":\"muikjcjcaztbws\",\"impactedResources\":[{},{}]}],\"lastUpdated\":\"2021-09-10T22:25:08Z\"}},\"id\":\"wcoml\",\"name\":\"kytwvcz\",\"type\":\"swkacvej\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AvsManager manager = AvsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Maintenance response = manager.maintenances() + .rescheduleWithResponse("skondcbrwimu", "qejo", "ovyrrleaesinu", + new MaintenanceReschedule().withRescheduleTime(OffsetDateTime.parse("2021-08-28T02:33:47Z")) + .withMessage("obbpihehc"), + com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesScheduleWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesScheduleWithResponseMockTests.java new file mode 100644 index 000000000000..b96b08ecec5e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MaintenancesScheduleWithResponseMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.avs.AvsManager; +import com.azure.resourcemanager.avs.models.Maintenance; +import com.azure.resourcemanager.avs.models.MaintenanceSchedule; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MaintenancesScheduleWithResponseMockTests { + @Test + public void testScheduleWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"component\":\"ESXI\",\"displayName\":\"ankcoe\",\"clusterId\":1944236021,\"infoLink\":\"nkltytmh\",\"impact\":\"oznnhdrlktgj\",\"scheduledByMicrosoft\":true,\"state\":{\"name\":\"NotScheduled\",\"message\":\"eml\",\"startedAt\":\"2021-01-14T16:20:58Z\",\"endedAt\":\"2021-01-18T16:45:58Z\"},\"scheduledStartTime\":\"2021-10-04T21:00:38Z\",\"estimatedDurationInMinutes\":2632438618682171952,\"provisioningState\":\"Failed\",\"operations\":[{\"kind\":\"MaintenanceManagementOperation\"},{\"kind\":\"MaintenanceManagementOperation\"}],\"maintenanceReadiness\":{\"type\":\"Preflight\",\"status\":\"NotApplicable\",\"message\":\"sxbly\",\"failedChecks\":[{\"name\":\"ujksrlsmdesqplpv\",\"impactedResources\":[{},{},{}]},{\"name\":\"oewbid\",\"impactedResources\":[{}]},{\"name\":\"owx\",\"impactedResources\":[{},{},{},{}]}],\"lastUpdated\":\"2021-03-17T08:59:56Z\"}},\"id\":\"eu\",\"name\":\"fsxzecp\",\"type\":\"xw\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AvsManager manager = AvsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Maintenance response = manager.maintenances() + .scheduleWithResponse("fdv", "vhb", "rnfxtgddp", + new MaintenanceSchedule().withScheduleTime(OffsetDateTime.parse("2021-02-03T22:54:35Z")) + .withMessage("hn"), + com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ManagementClusterTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ManagementClusterTests.java index 6c9724974d45..90189bc92e12 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ManagementClusterTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ManagementClusterTests.java @@ -13,21 +13,21 @@ public final class ManagementClusterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagementCluster model = BinaryData.fromString( - "{\"clusterSize\":1098465372,\"provisioningState\":\"Succeeded\",\"clusterId\":1151262260,\"hosts\":[\"hjdauwhvylwz\",\"tdhxujznbmpowuwp\"],\"vsanDatastoreName\":\"qlveualupjmkh\"}") + "{\"clusterSize\":1748485864,\"provisioningState\":\"Cancelled\",\"clusterId\":1250108412,\"hosts\":[\"agxti\",\"qdxbxwa\",\"bogqxndlkzgxhu\"],\"vsanDatastoreName\":\"plbpodxun\"}") .toObject(ManagementCluster.class); - Assertions.assertEquals(1098465372, model.clusterSize()); - Assertions.assertEquals("hjdauwhvylwz", model.hosts().get(0)); - Assertions.assertEquals("qlveualupjmkh", model.vsanDatastoreName()); + Assertions.assertEquals(1748485864, model.clusterSize()); + Assertions.assertEquals("agxti", model.hosts().get(0)); + Assertions.assertEquals("plbpodxun", model.vsanDatastoreName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagementCluster model = new ManagementCluster().withClusterSize(1098465372) - .withHosts(Arrays.asList("hjdauwhvylwz", "tdhxujznbmpowuwp")) - .withVsanDatastoreName("qlveualupjmkh"); + ManagementCluster model = new ManagementCluster().withClusterSize(1748485864) + .withHosts(Arrays.asList("agxti", "qdxbxwa", "bogqxndlkzgxhu")) + .withVsanDatastoreName("plbpodxun"); model = BinaryData.fromObject(model).toObject(ManagementCluster.class); - Assertions.assertEquals(1098465372, model.clusterSize()); - Assertions.assertEquals("hjdauwhvylwz", model.hosts().get(0)); - Assertions.assertEquals("qlveualupjmkh", model.vsanDatastoreName()); + Assertions.assertEquals(1748485864, model.clusterSize()); + Assertions.assertEquals("agxti", model.hosts().get(0)); + Assertions.assertEquals("plbpodxun", model.vsanDatastoreName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationsListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationsListMockTests.java index 1bb378e94540..ecd5571f305f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationsListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationsListMockTests.java @@ -21,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"yefrpmpdnqqska\",\"isDataAction\":false,\"display\":{\"provider\":\"mmbnpqfrtql\",\"resource\":\"megni\",\"operation\":\"vkxlz\",\"description\":\"drf\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"wbzuwfmdurage\",\"isDataAction\":true,\"display\":{\"provider\":\"jfelisdjubggbqig\",\"resource\":\"kbsazgak\",\"operation\":\"cyrcmjdmspo\",\"description\":\"pv\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateMockTests.java index ea7e93edb157..05b0b408ca1a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateMockTests.java @@ -23,7 +23,7 @@ public final class PlacementPoliciesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"ngwflqqmpizruwn\",\"provisioningState\":\"Succeeded\"},\"id\":\"xiw\",\"name\":\"cng\",\"type\":\"saasiixtmkzj\"}"; + = "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"drwjjkhvyom\",\"provisioningState\":\"Succeeded\"},\"id\":\"zvxnqmhrp\",\"name\":\"pd\",\"type\":\"wmkoisq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,13 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PlacementPolicy response = manager.placementPolicies() - .define("jkwrusnkq") - .withExistingCluster("lmjjyuo", "qtobaxkjeyt", "nlb") + .define("dlrgms") + .withExistingCluster("oaedsxjwuivedwcg", "eewxeiqbpsmg", "mguaml") .withProperties( - new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED).withDisplayName("qunjqh")) + new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED).withDisplayName("ufcshhvnew")) .create(); - Assertions.assertEquals(PlacementPolicyState.DISABLED, response.properties().state()); - Assertions.assertEquals("ngwflqqmpizruwn", response.properties().displayName()); + Assertions.assertEquals(PlacementPolicyState.ENABLED, response.properties().state()); + Assertions.assertEquals("drwjjkhvyom", response.properties().displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteMockTests.java index 748e0a9ac706..9992771cc576 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteMockTests.java @@ -28,7 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.placementPolicies() - .delete("gunbtgfebwlnbm", "yreeudz", "av", "pdqmjxlyyzglgouw", com.azure.core.util.Context.NONE); + .delete("eeyaswl", "augmrmfjlr", "wtoaukhfk", "cisiz", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetWithResponseMockTests.java index bb926f978eda..c51ca60a72e5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class PlacementPoliciesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"oamktcq\",\"provisioningState\":\"Deleting\"},\"id\":\"gbzahgxqdlyr\",\"name\":\"ltlaprltzkatbhj\",\"type\":\"znnbsoqeqalarvl\"}"; + = "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"j\",\"provisioningState\":\"Failed\"},\"id\":\"yfqi\",\"name\":\"gxhnpomyqwcabv\",\"type\":\"ui\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PlacementPolicy response = manager.placementPolicies() - .getWithResponse("lrmcaykg", "noxuztrksx", "pndfcpfnznt", "jtwkjaos", com.azure.core.util.Context.NONE) + .getWithResponse("sqyzqedikdfr", "biqmrjgei", "fqlggw", "iwzcxmjpbyeph", com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(PlacementPolicyState.ENABLED, response.properties().state()); - Assertions.assertEquals("oamktcq", response.properties().displayName()); + Assertions.assertEquals("j", response.properties().displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListMockTests.java index 6eb9b85cfc82..174a083470f1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListMockTests.java @@ -23,7 +23,7 @@ public final class PlacementPoliciesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"oatftgzpnpbswvef\",\"provisioningState\":\"Canceled\"},\"id\":\"srmozihmip\",\"name\":\"awtxxpk\",\"type\":\"jcxcjxgrytfmpcyc\"}]}"; + = "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"oxxkubvp\",\"provisioningState\":\"Succeeded\"},\"id\":\"mhbrbqgvg\",\"name\":\"vpbbt\",\"type\":\"efjokn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<PlacementPolicy> response = manager.placementPolicies() - .list("amldseh", "ohdjhhflzok", "coxpelnjeta", com.azure.core.util.Context.NONE); + PagedIterable<PlacementPolicy> response + = manager.placementPolicies().list("z", "ufypiv", "sbbjpmcu", com.azure.core.util.Context.NONE); - Assertions.assertEquals(PlacementPolicyState.ENABLED, response.iterator().next().properties().state()); - Assertions.assertEquals("oatftgzpnpbswvef", response.iterator().next().properties().displayName()); + Assertions.assertEquals(PlacementPolicyState.DISABLED, response.iterator().next().properties().state()); + Assertions.assertEquals("oxxkubvp", response.iterator().next().properties().displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListTests.java index 9fc7cfc35ce7..fb97fae6932c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListTests.java @@ -13,10 +13,10 @@ public final class PlacementPoliciesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPoliciesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"j\",\"provisioningState\":\"Canceled\"},\"id\":\"ok\",\"name\":\"jljyoxgv\",\"type\":\"ltbgsncghkj\"},{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"bijhtxfvgxbf\",\"provisioningState\":\"Deleting\"},\"id\":\"eh\",\"name\":\"pvecxgodeb\",\"type\":\"qkkrb\"},{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"riwflzlfb\",\"provisioningState\":\"Building\"},\"id\":\"zycispn\",\"name\":\"zahmgkbrpyydhibn\",\"type\":\"qqkpikadrg\"},{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"n\",\"provisioningState\":\"Canceled\"},\"id\":\"hijggme\",\"name\":\"fsiarbutr\",\"type\":\"vpnazzm\"}],\"nextLink\":\"runmp\"}") + "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"ilpjzuaejxdult\",\"provisioningState\":\"Canceled\"},\"id\":\"btdzumveekg\",\"name\":\"wozuhkf\",\"type\":\"bsjyofdx\"},{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"ttouwaboekqvkel\",\"provisioningState\":\"Succeeded\"},\"id\":\"bxwyjsflhhcaa\",\"name\":\"n\",\"type\":\"ixisxyawjoy\"}],\"nextLink\":\"cslyjpk\"}") .toObject(PlacementPoliciesList.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.value().get(0).properties().state()); - Assertions.assertEquals("j", model.value().get(0).properties().displayName()); - Assertions.assertEquals("runmp", model.nextLink()); + Assertions.assertEquals("ilpjzuaejxdult", model.value().get(0).properties().displayName()); + Assertions.assertEquals("cslyjpk", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyInnerTests.java index 4c0de0dfefb1..a0356135af06 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyInnerTests.java @@ -14,19 +14,18 @@ public final class PlacementPolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyInner model = BinaryData.fromString( - "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"hrbnlankxmyskpbh\",\"provisioningState\":\"Building\"},\"id\":\"kcxywnyt\",\"name\":\"rsyn\",\"type\":\"qidybyx\"}") + "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"exznelixhnr\",\"provisioningState\":\"Failed\"},\"id\":\"lhbnxkna\",\"name\":\"aulppggd\",\"type\":\"pnapnyiropuh\"}") .toObject(PlacementPolicyInner.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.properties().state()); - Assertions.assertEquals("hrbnlankxmyskpbh", model.properties().displayName()); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.properties().state()); + Assertions.assertEquals("exznelixhnr", model.properties().displayName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PlacementPolicyInner model = new PlacementPolicyInner() - .withProperties(new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED) - .withDisplayName("hrbnlankxmyskpbh")); + PlacementPolicyInner model = new PlacementPolicyInner().withProperties( + new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED).withDisplayName("exznelixhnr")); model = BinaryData.fromObject(model).toObject(PlacementPolicyInner.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.properties().state()); - Assertions.assertEquals("hrbnlankxmyskpbh", model.properties().displayName()); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.properties().state()); + Assertions.assertEquals("exznelixhnr", model.properties().displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyPropertiesTests.java index 1f7d9dc78e2e..5486ae791c33 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyPropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyPropertiesTests.java @@ -13,18 +13,18 @@ public final class PlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyProperties model = BinaryData.fromString( - "{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"lhaaxdbabp\",\"provisioningState\":\"Building\"}") + "{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"pgylg\",\"provisioningState\":\"Succeeded\"}") .toObject(PlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("lhaaxdbabp", model.displayName()); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); + Assertions.assertEquals("pgylg", model.displayName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlacementPolicyProperties model - = new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("lhaaxdbabp"); + = new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED).withDisplayName("pgylg"); model = BinaryData.fromObject(model).toObject(PlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("lhaaxdbabp", model.displayName()); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); + Assertions.assertEquals("pgylg", model.displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyUpdatePropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyUpdatePropertiesTests.java index 16d742cf3b56..76b391712c13 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyUpdatePropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyUpdatePropertiesTests.java @@ -16,12 +16,12 @@ public final class PlacementPolicyUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyUpdateProperties model = BinaryData.fromString( - "{\"state\":\"Disabled\",\"vmMembers\":[\"nkjzkdeslpvlop\",\"i\",\"ighxpk\"],\"hostMembers\":[\"baiuebbaumny\"],\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\"}") + "{\"state\":\"Disabled\",\"vmMembers\":[\"fdxxivetvtcqaqtd\"],\"hostMembers\":[\"cbxvwvxyslqbh\",\"fxoblytkb\",\"mpew\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"SqlHost\"}") .toObject(PlacementPolicyUpdateProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("nkjzkdeslpvlop", model.vmMembers().get(0)); - Assertions.assertEquals("baiuebbaumny", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); + Assertions.assertEquals("fdxxivetvtcqaqtd", model.vmMembers().get(0)); + Assertions.assertEquals("cbxvwvxyslqbh", model.hostMembers().get(0)); + Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); } @@ -29,15 +29,15 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { PlacementPolicyUpdateProperties model = new PlacementPolicyUpdateProperties().withState(PlacementPolicyState.DISABLED) - .withVmMembers(Arrays.asList("nkjzkdeslpvlop", "i", "ighxpk")) - .withHostMembers(Arrays.asList("baiuebbaumny")) - .withAffinityStrength(AffinityStrength.SHOULD) + .withVmMembers(Arrays.asList("fdxxivetvtcqaqtd")) + .withHostMembers(Arrays.asList("cbxvwvxyslqbh", "fxoblytkb", "mpew")) + .withAffinityStrength(AffinityStrength.MUST) .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); model = BinaryData.fromObject(model).toObject(PlacementPolicyUpdateProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("nkjzkdeslpvlop", model.vmMembers().get(0)); - Assertions.assertEquals("baiuebbaumny", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); + Assertions.assertEquals("fdxxivetvtcqaqtd", model.vmMembers().get(0)); + Assertions.assertEquals("cbxvwvxyslqbh", model.hostMembers().get(0)); + Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyUpdateTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyUpdateTests.java index 634c6f13fab5..ef1cbe062635 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyUpdateTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyUpdateTests.java @@ -16,27 +16,27 @@ public final class PlacementPolicyUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyUpdate model = BinaryData.fromString( - "{\"properties\":{\"state\":\"Enabled\",\"vmMembers\":[\"bzpfzab\",\"lcuhxwtctyqiklb\"],\"hostMembers\":[\"plwzbhvgyugu\",\"svmkfssxquk\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"None\"}}") + "{\"properties\":{\"state\":\"Disabled\",\"vmMembers\":[\"n\",\"u\"],\"hostMembers\":[\"krtswbxqz\"],\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"None\"}}") .toObject(PlacementPolicyUpdate.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("bzpfzab", model.vmMembers().get(0)); - Assertions.assertEquals("plwzbhvgyugu", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); + Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); + Assertions.assertEquals("n", model.vmMembers().get(0)); + Assertions.assertEquals("krtswbxqz", model.hostMembers().get(0)); + Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); Assertions.assertEquals(AzureHybridBenefitType.NONE, model.azureHybridBenefitType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PlacementPolicyUpdate model = new PlacementPolicyUpdate().withState(PlacementPolicyState.ENABLED) - .withVmMembers(Arrays.asList("bzpfzab", "lcuhxwtctyqiklb")) - .withHostMembers(Arrays.asList("plwzbhvgyugu", "svmkfssxquk")) - .withAffinityStrength(AffinityStrength.MUST) + PlacementPolicyUpdate model = new PlacementPolicyUpdate().withState(PlacementPolicyState.DISABLED) + .withVmMembers(Arrays.asList("n", "u")) + .withHostMembers(Arrays.asList("krtswbxqz")) + .withAffinityStrength(AffinityStrength.SHOULD) .withAzureHybridBenefitType(AzureHybridBenefitType.NONE); model = BinaryData.fromObject(model).toObject(PlacementPolicyUpdate.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("bzpfzab", model.vmMembers().get(0)); - Assertions.assertEquals("plwzbhvgyugu", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); + Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); + Assertions.assertEquals("n", model.vmMembers().get(0)); + Assertions.assertEquals("krtswbxqz", model.hostMembers().get(0)); + Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); Assertions.assertEquals(AzureHybridBenefitType.NONE, model.azureHybridBenefitType()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudIdentityTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudIdentityTests.java index 40ffc90535e9..4ca20f5e5fa8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudIdentityTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudIdentityTests.java @@ -12,9 +12,9 @@ public final class PrivateCloudIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateCloudIdentity model - = BinaryData.fromString("{\"principalId\":\"ofd\",\"tenantId\":\"uusdttouwa\",\"type\":\"None\"}") - .toObject(PrivateCloudIdentity.class); + PrivateCloudIdentity model = BinaryData + .fromString("{\"principalId\":\"nhdldwmgxcx\",\"tenantId\":\"lpmutwuoegrpkhj\",\"type\":\"None\"}") + .toObject(PrivateCloudIdentity.class); Assertions.assertEquals(ResourceIdentityType.NONE, model.type()); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteMockTests.java index 5baedde6bcd5..4a167e190ab4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.privateClouds().delete("gmwohqfzizvu", "mmkjsvthnwpztek", com.azure.core.util.Context.NONE); + manager.privateClouds().delete("frgqhaohcm", "uocnjrohmbpyr", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetVcfLicenseWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetVcfLicenseWithResponseMockTests.java new file mode 100644 index 000000000000..fc4871932234 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetVcfLicenseWithResponseMockTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.avs.AvsManager; +import com.azure.resourcemanager.avs.models.VcfLicense; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PrivateCloudsGetVcfLicenseWithResponseMockTests { + @Test + public void testGetVcfLicenseWithResponse() throws Exception { + String responseStr = "{\"kind\":\"VcfLicense\",\"provisioningState\":\"Failed\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AvsManager manager = AvsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + VcfLicense response = manager.privateClouds() + .getVcfLicenseWithResponse("vvpa", "eksgbuxantuygd", com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworkInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworkInnerTests.java index 313fb33116ae..f5c684112365 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworkInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworkInnerTests.java @@ -11,7 +11,7 @@ public final class ProvisionedNetworkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProvisionedNetworkInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"addressPrefix\":\"ccymvaolpsslql\",\"networkType\":\"hcxManagement\"},\"id\":\"n\",\"name\":\"bglzpswi\",\"type\":\"d\"}") + "{\"properties\":{\"provisioningState\":\"Succeeded\",\"addressPrefix\":\"tncvokot\",\"networkType\":\"vcenterManagement\"},\"id\":\"yhgsy\",\"name\":\"cogjltdtbn\",\"type\":\"hadoocrk\"}") .toObject(ProvisionedNetworkInner.class); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworkListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworkListResultTests.java index b318f901b01d..585470b84288 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworkListResultTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworkListResultTests.java @@ -12,8 +12,8 @@ public final class ProvisionedNetworkListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProvisionedNetworkListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"addressPrefix\":\"ygmi\",\"networkType\":\"hcxUplink\"},\"id\":\"zdnds\",\"name\":\"gnayqigynduh\",\"type\":\"vhqlkthumaqo\"}],\"nextLink\":\"gycdu\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"addressPrefix\":\"slyzrpzbchckqq\",\"networkType\":\"vsan\"},\"id\":\"xiy\",\"name\":\"uiizynke\",\"type\":\"yatrwy\"},{\"properties\":{\"provisioningState\":\"Failed\",\"addressPrefix\":\"zyh\",\"networkType\":\"vmotion\"},\"id\":\"mypyynpcdpu\",\"name\":\"nzgmwznmabik\",\"type\":\"sorgj\"}],\"nextLink\":\"bldtlww\"}") .toObject(ProvisionedNetworkListResult.class); - Assertions.assertEquals("gycdu", model.nextLink()); + Assertions.assertEquals("bldtlww", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworkPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworkPropertiesTests.java index 8f517b4408bd..fde7127c979a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworkPropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworkPropertiesTests.java @@ -11,7 +11,7 @@ public final class ProvisionedNetworkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProvisionedNetworkProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Failed\",\"addressPrefix\":\"hzdxssadbzm\",\"networkType\":\"hcxManagement\"}") + "{\"provisioningState\":\"Succeeded\",\"addressPrefix\":\"hnvpamqgxq\",\"networkType\":\"esxManagement\"}") .toObject(ProvisionedNetworkProperties.class); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksGetWithResponseMockTests.java index 2c61f8809bf0..63ad2b1cf711 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class ProvisionedNetworksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"addressPrefix\":\"gb\",\"networkType\":\"vsan\"},\"id\":\"ahokqtobkauxofsh\",\"name\":\"phwpnulaiywzej\",\"type\":\"whslwkoj\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"addressPrefix\":\"ctwwgzw\",\"networkType\":\"esxManagement\"},\"id\":\"ecvo\",\"name\":\"ygzyvneezaifght\",\"type\":\"oqqtl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ProvisionedNetwork response = manager.provisionedNetworks() - .getWithResponse("hsycxhxzgaz", "taboidvmf", "hppubowsepdfgkmt", com.azure.core.util.Context.NONE) + .getWithResponse("hiqfyuttdiy", "b", "vnwsw", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksListMockTests.java index cf662f0c474c..0bbbf0b2e86c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksListMockTests.java @@ -21,7 +21,7 @@ public final class ProvisionedNetworksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"addressPrefix\":\"k\",\"networkType\":\"vsan\"},\"id\":\"rwrweooxffi\",\"name\":\"hx\",\"type\":\"rsnewmozqvbubqma\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"addressPrefix\":\"nbnxwcdomm\",\"networkType\":\"vmotion\"},\"id\":\"awz\",\"name\":\"gbrt\",\"type\":\"uiaclkiexhajlfn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ProvisionedNetwork> response - = manager.provisionedNetworks().list("iauogphuartv", "iukyefchnmna", com.azure.core.util.Context.NONE); + = manager.provisionedNetworks().list("patlbijp", "gsksrfhf", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesCreateOrUpdateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesCreateOrUpdateMockTests.java index f4c7785626cd..f251a0039295 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesCreateOrUpdateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesCreateOrUpdateMockTests.java @@ -22,7 +22,7 @@ public final class PureStoragePoliciesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"storagePolicyDefinition\":\"nwgfmxjgcgbjbgd\",\"storagePoolId\":\"fgt\",\"provisioningState\":\"Succeeded\"},\"id\":\"aquflqbctqha\",\"name\":\"zjrwdkqze\",\"type\":\"yjleziunjx\"}"; + = "{\"properties\":{\"storagePolicyDefinition\":\"qejpmvssehaepwa\",\"storagePoolId\":\"cxtczhupeukn\",\"provisioningState\":\"Succeeded\"},\"id\":\"y\",\"name\":\"es\",\"type\":\"ydjfb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PureStoragePolicy response = manager.pureStoragePolicies() - .define("ic") - .withExistingPrivateCloud("esfuught", "qfecjxeygtuhx") - .withProperties(new PureStoragePolicyProperties().withStoragePolicyDefinition("ewmrswnjlxu") - .withStoragePoolId("rhwpus")) + .define("qm") + .withExistingPrivateCloud("eukdqkkyih", "tg") + .withProperties(new PureStoragePolicyProperties().withStoragePolicyDefinition("zgwldoychillcec") + .withStoragePoolId("ehuwaoa")) .create(); - Assertions.assertEquals("nwgfmxjgcgbjbgd", response.properties().storagePolicyDefinition()); - Assertions.assertEquals("fgt", response.properties().storagePoolId()); + Assertions.assertEquals("qejpmvssehaepwa", response.properties().storagePolicyDefinition()); + Assertions.assertEquals("cxtczhupeukn", response.properties().storagePoolId()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesGetWithResponseMockTests.java index 5ddb1264fe06..02d058d23f8a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class PureStoragePoliciesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"storagePolicyDefinition\":\"ccxlzhcoxovnek\",\"storagePoolId\":\"enlusfn\",\"provisioningState\":\"Updating\"},\"id\":\"xtxrdcqtjvidt\",\"name\":\"gepuslvyjtc\",\"type\":\"uwkasiz\"}"; + = "{\"properties\":{\"storagePolicyDefinition\":\"ovmaonurjtum\",\"storagePoolId\":\"hihpvecmsl\",\"provisioningState\":\"Deleting\"},\"id\":\"yjxltbsjusc\",\"name\":\"sfxigctmgx\",\"type\":\"upbezqccydrt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PureStoragePolicy response = manager.pureStoragePolicies() - .getWithResponse("ons", "onwpnga", "innixjawrtmjfj", com.azure.core.util.Context.NONE) + .getWithResponse("etnjuhpsprkz", "aupia", "cxnafbwqrooh", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ccxlzhcoxovnek", response.properties().storagePolicyDefinition()); - Assertions.assertEquals("enlusfn", response.properties().storagePoolId()); + Assertions.assertEquals("ovmaonurjtum", response.properties().storagePolicyDefinition()); + Assertions.assertEquals("hihpvecmsl", response.properties().storagePoolId()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesListMockTests.java index d653fb3b1d63..5d32e7a421d0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesListMockTests.java @@ -22,7 +22,7 @@ public final class PureStoragePoliciesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"storagePolicyDefinition\":\"ug\",\"storagePoolId\":\"nnfhyetefypo\",\"provisioningState\":\"Succeeded\"},\"id\":\"fjgtixrjvzuy\",\"name\":\"urmlmuo\",\"type\":\"olbauirop\"}]}"; + = "{\"value\":[{\"properties\":{\"storagePolicyDefinition\":\"wdogiyetesyp\",\"storagePoolId\":\"idbz\",\"provisioningState\":\"Updating\"},\"id\":\"t\",\"name\":\"b\",\"type\":\"vnynkb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<PureStoragePolicy> response - = manager.pureStoragePolicies().list("llndnpd", "rpqaf", com.azure.core.util.Context.NONE); + = manager.pureStoragePolicies().list("fhzbkr", "jjjavfqnvhnq", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ug", response.iterator().next().properties().storagePolicyDefinition()); - Assertions.assertEquals("nnfhyetefypo", response.iterator().next().properties().storagePoolId()); + Assertions.assertEquals("wdogiyetesyp", response.iterator().next().properties().storagePolicyDefinition()); + Assertions.assertEquals("idbz", response.iterator().next().properties().storagePoolId()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePolicyInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePolicyInnerTests.java index 58729efab783..3f0e6b8cf96e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePolicyInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePolicyInnerTests.java @@ -13,18 +13,18 @@ public final class PureStoragePolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PureStoragePolicyInner model = BinaryData.fromString( - "{\"properties\":{\"storagePolicyDefinition\":\"akbogqxndlkzgxh\",\"storagePoolId\":\"ripl\",\"provisioningState\":\"Canceled\"},\"id\":\"xunkbebxmubyynt\",\"name\":\"lrb\",\"type\":\"tkoievseotgq\"}") + "{\"properties\":{\"storagePolicyDefinition\":\"hfjx\",\"storagePoolId\":\"mszkkfo\",\"provisioningState\":\"Updating\"},\"id\":\"fkzikfj\",\"name\":\"wneaiv\",\"type\":\"wczelpci\"}") .toObject(PureStoragePolicyInner.class); - Assertions.assertEquals("akbogqxndlkzgxh", model.properties().storagePolicyDefinition()); - Assertions.assertEquals("ripl", model.properties().storagePoolId()); + Assertions.assertEquals("hfjx", model.properties().storagePolicyDefinition()); + Assertions.assertEquals("mszkkfo", model.properties().storagePoolId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PureStoragePolicyInner model = new PureStoragePolicyInner().withProperties( - new PureStoragePolicyProperties().withStoragePolicyDefinition("akbogqxndlkzgxh").withStoragePoolId("ripl")); + new PureStoragePolicyProperties().withStoragePolicyDefinition("hfjx").withStoragePoolId("mszkkfo")); model = BinaryData.fromObject(model).toObject(PureStoragePolicyInner.class); - Assertions.assertEquals("akbogqxndlkzgxh", model.properties().storagePolicyDefinition()); - Assertions.assertEquals("ripl", model.properties().storagePoolId()); + Assertions.assertEquals("hfjx", model.properties().storagePolicyDefinition()); + Assertions.assertEquals("mszkkfo", model.properties().storagePoolId()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePolicyListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePolicyListResultTests.java index a9b9b1882c89..89aafb1aaeb2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePolicyListResultTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePolicyListResultTests.java @@ -12,10 +12,10 @@ public final class PureStoragePolicyListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PureStoragePolicyListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"storagePolicyDefinition\":\"n\",\"storagePoolId\":\"daodvxzbncblyl\",\"provisioningState\":\"Succeeded\"},\"id\":\"bhhxsrzdzuc\",\"name\":\"rsc\",\"type\":\"ntnev\"},{\"properties\":{\"storagePolicyDefinition\":\"wjmy\",\"storagePoolId\":\"tdss\",\"provisioningState\":\"Canceled\"},\"id\":\"mweriofzpy\",\"name\":\"semwabnet\",\"type\":\"hhszh\"},{\"properties\":{\"storagePolicyDefinition\":\"plvwiwubmwmbes\",\"storagePoolId\":\"dnkwwtppjflcxog\",\"provisioningState\":\"Succeeded\"},\"id\":\"nzmnsikvm\",\"name\":\"qzeqqkdltfzxm\",\"type\":\"hvhgureod\"}],\"nextLink\":\"obdagxtibqdxb\"}") + "{\"value\":[{\"properties\":{\"storagePolicyDefinition\":\"kywggxkallatmel\",\"storagePoolId\":\"uipiccjzk\",\"provisioningState\":\"Succeeded\"},\"id\":\"vvcnayr\",\"name\":\"yrnxxmueedn\",\"type\":\"rdvstkwqqtch\"},{\"properties\":{\"storagePolicyDefinition\":\"lmfmtdaay\",\"storagePoolId\":\"dvwvgpio\",\"provisioningState\":\"Failed\"},\"id\":\"rtfudxepxg\",\"name\":\"qagvrvm\",\"type\":\"pkukghi\"}],\"nextLink\":\"blxgwimf\"}") .toObject(PureStoragePolicyListResult.class); - Assertions.assertEquals("n", model.value().get(0).properties().storagePolicyDefinition()); - Assertions.assertEquals("daodvxzbncblyl", model.value().get(0).properties().storagePoolId()); - Assertions.assertEquals("obdagxtibqdxb", model.nextLink()); + Assertions.assertEquals("kywggxkallatmel", model.value().get(0).properties().storagePolicyDefinition()); + Assertions.assertEquals("uipiccjzk", model.value().get(0).properties().storagePoolId()); + Assertions.assertEquals("blxgwimf", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePolicyPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePolicyPropertiesTests.java index c587c5963470..69195c405a12 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePolicyPropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PureStoragePolicyPropertiesTests.java @@ -12,18 +12,18 @@ public final class PureStoragePolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PureStoragePolicyProperties model = BinaryData.fromString( - "{\"storagePolicyDefinition\":\"l\",\"storagePoolId\":\"tmuwlauwzi\",\"provisioningState\":\"Deleting\"}") + "{\"storagePolicyDefinition\":\"elsfeaen\",\"storagePoolId\":\"abfatkl\",\"provisioningState\":\"Failed\"}") .toObject(PureStoragePolicyProperties.class); - Assertions.assertEquals("l", model.storagePolicyDefinition()); - Assertions.assertEquals("tmuwlauwzi", model.storagePoolId()); + Assertions.assertEquals("elsfeaen", model.storagePolicyDefinition()); + Assertions.assertEquals("abfatkl", model.storagePoolId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PureStoragePolicyProperties model - = new PureStoragePolicyProperties().withStoragePolicyDefinition("l").withStoragePoolId("tmuwlauwzi"); + = new PureStoragePolicyProperties().withStoragePolicyDefinition("elsfeaen").withStoragePoolId("abfatkl"); model = BinaryData.fromObject(model).toObject(PureStoragePolicyProperties.class); - Assertions.assertEquals("l", model.storagePolicyDefinition()); - Assertions.assertEquals("tmuwlauwzi", model.storagePoolId()); + Assertions.assertEquals("elsfeaen", model.storagePolicyDefinition()); + Assertions.assertEquals("abfatkl", model.storagePoolId()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/QuotaInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/QuotaInnerTests.java index 8897b5b32e7e..97bad24517cb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/QuotaInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/QuotaInnerTests.java @@ -10,8 +10,8 @@ public final class QuotaInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - QuotaInner model = BinaryData.fromString( - "{\"hostsRemaining\":{\"fbebrjcxer\":498059759,\"wutttxfvjrbi\":1121109847,\"hxepcyvahfnlj\":709039667},\"quotaEnabled\":\"Enabled\"}") - .toObject(QuotaInner.class); + QuotaInner model + = BinaryData.fromString("{\"hostsRemaining\":{\"xgodebfqkkrbmp\":1083472425},\"quotaEnabled\":\"Enabled\"}") + .toObject(QuotaInner.class); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/RescheduleOperationConstraintTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/RescheduleOperationConstraintTests.java new file mode 100644 index 000000000000..f670a2142fc6 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/RescheduleOperationConstraintTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.RescheduleOperationConstraint; + +public final class RescheduleOperationConstraintTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RescheduleOperationConstraint model = BinaryData.fromString("{\"kind\":\"RescheduleOperationConstraint\"}") + .toObject(RescheduleOperationConstraint.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/RescheduleOperationTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/RescheduleOperationTests.java new file mode 100644 index 000000000000..ee2043a1601b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/RescheduleOperationTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.RescheduleOperation; + +public final class RescheduleOperationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RescheduleOperation model = BinaryData.fromString( + "{\"kind\":\"Reschedule\",\"isDisabled\":true,\"disabledReason\":\"jznb\",\"constraints\":[{\"kind\":\"RescheduleOperationConstraint\"}]}") + .toObject(RescheduleOperation.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ResourceSkuCapabilitiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ResourceSkuCapabilitiesTests.java index 9dc5b2e71911..a2ae272652a2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ResourceSkuCapabilitiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ResourceSkuCapabilitiesTests.java @@ -11,9 +11,9 @@ public final class ResourceSkuCapabilitiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ResourceSkuCapabilities model = BinaryData.fromString("{\"name\":\"totxhojujb\",\"value\":\"pelmcuvhixbjxyf\"}") + ResourceSkuCapabilities model = BinaryData.fromString("{\"name\":\"itmmqtgqqqxh\",\"value\":\"n\"}") .toObject(ResourceSkuCapabilities.class); - Assertions.assertEquals("totxhojujb", model.name()); - Assertions.assertEquals("pelmcuvhixbjxyf", model.value()); + Assertions.assertEquals("itmmqtgqqqxh", model.name()); + Assertions.assertEquals("n", model.value()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ResourceSkuLocationInfoTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ResourceSkuLocationInfoTests.java index 0182ab1c9223..828c2a6e787c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ResourceSkuLocationInfoTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ResourceSkuLocationInfoTests.java @@ -12,12 +12,12 @@ public final class ResourceSkuLocationInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceSkuLocationInfo model = BinaryData.fromString( - "{\"location\":\"zh\",\"zones\":[\"kj\",\"qrvqq\"],\"zoneDetails\":[{\"name\":[\"jinrvgoupmfiibfg\"],\"capabilities\":[{\"name\":\"ioolvrwxkvtkkgll\",\"value\":\"wjygvjayvblmhvk\"},{\"name\":\"uhbxvvy\",\"value\":\"gsopbyrqufegxu\"},{\"name\":\"wz\",\"value\":\"bnhlmc\"}]},{\"name\":[\"p\"],\"capabilities\":[{\"name\":\"gitvg\",\"value\":\"mhrixkwmyijejve\"},{\"name\":\"rh\",\"value\":\"pna\"},{\"name\":\"xexccbdreaxhcexd\",\"value\":\"rvqahqkghtpwi\"},{\"name\":\"nhyjsv\",\"value\":\"ycxzbfvoo\"}]},{\"name\":[\"rvmtgjq\",\"pyostronzmyhgfi\",\"nsxkmcwaekrrjr\",\"afxtsgum\"],\"capabilities\":[{\"name\":\"glikkxwslolb\",\"value\":\"pvuzlmv\"},{\"name\":\"elfk\",\"value\":\"gplcrpwjxeznoigb\"},{\"name\":\"njwmwkpnbsazejj\",\"value\":\"qkagfhsxt\"},{\"name\":\"augzxnfaazpxdtn\",\"value\":\"dm\"}]},{\"name\":[\"j\",\"lwuenvrkp\"],\"capabilities\":[{\"name\":\"uaibrebqaaysj\",\"value\":\"ixqtn\"}]}]}") + "{\"location\":\"vcimpev\",\"zones\":[\"mblrrilbywd\",\"smiccwrwfscj\"],\"zoneDetails\":[{\"name\":[\"nszqujiz\",\"voqyt\"],\"capabilities\":[{\"name\":\"yo\",\"value\":\"bblgyavut\"},{\"name\":\"thjoxoism\",\"value\":\"ksbpimlqoljx\"},{\"name\":\"cgxxlxs\",\"value\":\"fgcviz\"},{\"name\":\"zdwlvwlyoupfgfb\",\"value\":\"jub\"}]}]}") .toObject(ResourceSkuLocationInfo.class); - Assertions.assertEquals("zh", model.location()); - Assertions.assertEquals("kj", model.zones().get(0)); - Assertions.assertEquals("jinrvgoupmfiibfg", model.zoneDetails().get(0).name().get(0)); - Assertions.assertEquals("ioolvrwxkvtkkgll", model.zoneDetails().get(0).capabilities().get(0).name()); - Assertions.assertEquals("wjygvjayvblmhvk", model.zoneDetails().get(0).capabilities().get(0).value()); + Assertions.assertEquals("vcimpev", model.location()); + Assertions.assertEquals("mblrrilbywd", model.zones().get(0)); + Assertions.assertEquals("nszqujiz", model.zoneDetails().get(0).name().get(0)); + Assertions.assertEquals("yo", model.zoneDetails().get(0).capabilities().get(0).name()); + Assertions.assertEquals("bblgyavut", model.zoneDetails().get(0).capabilities().get(0).value()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ResourceSkuRestrictionInfoTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ResourceSkuRestrictionInfoTests.java index e254f0af35cc..d2ce5391e000 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ResourceSkuRestrictionInfoTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ResourceSkuRestrictionInfoTests.java @@ -12,9 +12,9 @@ public final class ResourceSkuRestrictionInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceSkuRestrictionInfo model = BinaryData.fromString( - "{\"locations\":[\"gg\",\"tsbwtovvtgse\",\"nqfiufxqknpi\",\"gnepttwqmsni\"],\"zones\":[\"dmqnrojlpij\"]}") + "{\"locations\":[\"mloazuru\",\"cbgoor\",\"te\"],\"zones\":[\"fhjxakvvjgs\",\"ordilmywwtkgkxny\",\"dabg\",\"vudtjuewbcihx\"]}") .toObject(ResourceSkuRestrictionInfo.class); - Assertions.assertEquals("gg", model.locations().get(0)); - Assertions.assertEquals("dmqnrojlpij", model.zones().get(0)); + Assertions.assertEquals("mloazuru", model.locations().get(0)); + Assertions.assertEquals("fhjxakvvjgs", model.zones().get(0)); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ResourceSkuZoneDetailsTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ResourceSkuZoneDetailsTests.java index 2624a58629c7..1fbca6132503 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ResourceSkuZoneDetailsTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ResourceSkuZoneDetailsTests.java @@ -11,11 +11,12 @@ public final class ResourceSkuZoneDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ResourceSkuZoneDetails model = BinaryData.fromString( - "{\"name\":[\"tezlwff\",\"iakp\"],\"capabilities\":[{\"name\":\"qqmtedltmmji\",\"value\":\"yeozphvwauyqncy\"},{\"name\":\"upkvipmdsc\",\"value\":\"xqupevzhf\"}]}") + ResourceSkuZoneDetails model = BinaryData + .fromString( + "{\"name\":[\"hgkfmin\"],\"capabilities\":[{\"name\":\"owzfttsttkt\",\"value\":\"ahbqactxtgzuk\"}]}") .toObject(ResourceSkuZoneDetails.class); - Assertions.assertEquals("tezlwff", model.name().get(0)); - Assertions.assertEquals("qqmtedltmmji", model.capabilities().get(0).name()); - Assertions.assertEquals("yeozphvwauyqncy", model.capabilities().get(0).value()); + Assertions.assertEquals("hgkfmin", model.name().get(0)); + Assertions.assertEquals("owzfttsttkt", model.capabilities().get(0).name()); + Assertions.assertEquals("ahbqactxtgzuk", model.capabilities().get(0).value()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScheduleOperationConstraintTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScheduleOperationConstraintTests.java new file mode 100644 index 000000000000..9c1842f39d6a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScheduleOperationConstraintTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.ScheduleOperationConstraint; + +public final class ScheduleOperationConstraintTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScheduleOperationConstraint model = BinaryData.fromString("{\"kind\":\"ScheduleOperationConstraint\"}") + .toObject(ScheduleOperationConstraint.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScheduleOperationTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScheduleOperationTests.java new file mode 100644 index 000000000000..3ec21c123f50 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScheduleOperationTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.ScheduleOperation; + +public final class ScheduleOperationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScheduleOperation model = BinaryData.fromString( + "{\"kind\":\"Schedule\",\"isDisabled\":true,\"disabledReason\":\"wgxhn\",\"constraints\":[{\"kind\":\"ScheduleOperationConstraint\"},{\"kind\":\"ScheduleOperationConstraint\"},{\"kind\":\"ScheduleOperationConstraint\"},{\"kind\":\"ScheduleOperationConstraint\"}]}") + .toObject(ScheduleOperation.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/SchedulingWindowTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/SchedulingWindowTests.java new file mode 100644 index 000000000000..2041dfe52ba1 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/SchedulingWindowTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.SchedulingWindow; + +public final class SchedulingWindowTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SchedulingWindow model = BinaryData.fromString( + "{\"kind\":\"SchedulingWindow\",\"startsAt\":\"2021-10-14T20:39:54Z\",\"endsAt\":\"2021-08-23T08:34:37Z\"}") + .toObject(SchedulingWindow.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletInnerTests.java index a34d35182179..bbb6f6d43a2d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletInnerTests.java @@ -11,7 +11,7 @@ public final class ScriptCmdletInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptCmdletInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"qnzarrwl\",\"timeout\":\"uijfqk\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Bool\",\"name\":\"pubjibw\",\"description\":\"f\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Int\",\"name\":\"vksgplsaknynfsy\",\"description\":\"jphuopxodlqi\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"ihleos\",\"name\":\"swsrms\",\"type\":\"yzrpzbchckqqzq\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"xuqlcvydypat\",\"timeout\":\"oa\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Bool\",\"name\":\"oo\",\"description\":\"wnujhemmsbvdk\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"SecureString\",\"name\":\"fw\",\"description\":\"fltkacjv\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"Float\",\"name\":\"kggkfpa\",\"description\":\"owpulpq\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Bool\",\"name\":\"qjnsjervtia\",\"description\":\"sdszue\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"f\",\"name\":\"beyvpnqicvinvkjj\",\"type\":\"dxrbuukzcle\"}") .toObject(ScriptCmdletInner.class); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletPropertiesTests.java index a06bae12f72a..692468b08fee 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletPropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletPropertiesTests.java @@ -11,7 +11,7 @@ public final class ScriptCmdletPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptCmdletProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Failed\",\"description\":\"ysuiizynkedya\",\"timeout\":\"wyhqmibzyhwits\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"SecureString\",\"name\":\"dpumnzgmw\",\"description\":\"mabiknsorgjhxb\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"String\",\"name\":\"kdmtncvokotll\",\"description\":\"yhgsy\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Float\",\"name\":\"tbnnha\",\"description\":\"ocrkvcikh\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"Bool\",\"name\":\"qqu\",\"description\":\"ik\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]}") + "{\"provisioningState\":\"Failed\",\"description\":\"lw\",\"timeout\":\"ztzp\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"String\",\"name\":\"fz\",\"description\":\"hxx\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]}") .toObject(ScriptCmdletProperties.class); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetWithResponseMockTests.java index 6afea8868096..36cd05fa2412 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class ScriptCmdletsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"vvi\",\"timeout\":\"cgx\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Bool\",\"name\":\"htvs\",\"description\":\"hlwntsjgq\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"Int\",\"name\":\"u\",\"description\":\"nchrszizoyu\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"dnb\",\"name\":\"qyggagfl\",\"type\":\"lgmtrwahzjmucf\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"jknyu\",\"timeout\":\"vt\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Bool\",\"name\":\"a\",\"description\":\"rdixt\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"Credential\",\"name\":\"skbruffgllukkut\",\"description\":\"xhrp\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Float\",\"name\":\"u\",\"description\":\"hbh\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Credential\",\"name\":\"randoypmb\",\"description\":\"oormkfqlwxldyka\",\"visibility\":\"Hidden\",\"optional\":\"Required\"}]},\"id\":\"lnjpnnbmjksibjgs\",\"name\":\"jxxahmrnad\",\"type\":\"yqegx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ScriptCmdlet response = manager.scriptCmdlets() - .getWithResponse("penuy", "bqeqqekewvnqvcd", "guaucmfdjwnla", "punj", com.azure.core.util.Context.NONE) + .getWithResponse("jogjonmc", "e", "oyzbamwineofvf", "akpoldtvevbo", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListMockTests.java index d98ec04acd78..2986b91b8406 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListMockTests.java @@ -21,7 +21,7 @@ public final class ScriptCmdletsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"nseqacjjvp\",\"timeout\":\"guooqjagmdit\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"String\",\"name\":\"bsahrtd\",\"description\":\"delqacslmoto\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"String\",\"name\":\"cjkgdirazftxej\",\"description\":\"bmdujtmvcopexc\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Credential\",\"name\":\"lkyqltqsrog\",\"description\":\"wkffdjkt\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Int\",\"name\":\"lglxnfui\",\"description\":\"kbusqo\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]},\"id\":\"yi\",\"name\":\"nsharujtjiqxfzyj\",\"type\":\"ttvwkpqh\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"bhgau\",\"timeout\":\"dixmxufrsryjq\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Bool\",\"name\":\"eoqbvjhvefgwbmqj\",\"description\":\"ntasfaymxbu\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Float\",\"name\":\"qkyojwyvf\",\"description\":\"btsuahxs\",\"visibility\":\"Hidden\",\"optional\":\"Required\"}]},\"id\":\"zrrscub\",\"name\":\"wsdrnpxqwodif\",\"type\":\"jxcjrmmuabwib\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ScriptCmdlet> response - = manager.scriptCmdlets().list("fza", "tkw", "eg", com.azure.core.util.Context.NONE); + = manager.scriptCmdlets().list("c", "v", "hulrtywikdmhla", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListTests.java index ca5176c4d7f3..59e0f12651bb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListTests.java @@ -12,8 +12,8 @@ public final class ScriptCmdletsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptCmdletsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"efuzmuvpbttd\",\"timeout\":\"orppxebmnzbtb\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"String\",\"name\":\"ohdneuel\",\"description\":\"hsd\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"ikdowwquuvx\",\"name\":\"xclvit\",\"type\":\"hqzonosggbhcoh\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"n\",\"timeout\":\"ljuti\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Int\",\"name\":\"dkzzewkfvhqcrail\",\"description\":\"n\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Float\",\"name\":\"dmhdlxyjr\",\"description\":\"agafcnihgwqap\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"SecureString\",\"name\":\"kcvqvpke\",\"description\":\"cvdrhvoodsot\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"pcjwv\",\"name\":\"hdldwmgxcxrsl\",\"type\":\"mutwuoe\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"jw\",\"timeout\":\"yqsluic\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Float\",\"name\":\"vmbmp\",\"description\":\"modfvuefywsbpfvm\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"Bool\",\"name\":\"ft\",\"description\":\"kcpwiy\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"SecureString\",\"name\":\"exkpzksmondjmq\",\"description\":\"vypomgkopkwho\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Credential\",\"name\":\"ysmocmbqfqvmkcxo\",\"description\":\"pvhelxprg\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"ckcb\",\"name\":\"uejrjxgc\",\"type\":\"qibrhosxsdqrhzoy\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"qyib\",\"timeout\":\"wfluszdt\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Bool\",\"name\":\"yvoqa\",\"description\":\"iexpbtgiwbwo\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Int\",\"name\":\"dtkcnqxwbpokulp\",\"description\":\"jwaa\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"String\",\"name\":\"yuq\",\"description\":\"pqlpq\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"String\",\"name\":\"dbutauvfbtkuwhh\",\"description\":\"ykojoxafnndlpic\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"cdyhbpkkpwdreqn\",\"name\":\"vvqfovljxyws\",\"type\":\"w\"}],\"nextLink\":\"rsndsytgadgvra\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"aanozjosphyoulpj\",\"timeout\":\"xagl\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Bool\",\"name\":\"ytxitcsk\",\"description\":\"k\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Credential\",\"name\":\"ez\",\"description\":\"khly\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Credential\",\"name\":\"ebdunyg\",\"description\":\"qidbqfatpxllrxcy\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Credential\",\"name\":\"arm\",\"description\":\"dmjsjqb\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]},\"id\":\"rw\",\"name\":\"yc\",\"type\":\"duhpk\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"areqna\",\"timeout\":\"qugjhkycube\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"String\",\"name\":\"qmzqalkrmnjijpx\",\"description\":\"q\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"SecureString\",\"name\":\"baaa\",\"description\":\"yvayffimrzr\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"Credential\",\"name\":\"xnevfdnwn\",\"description\":\"ewzsyyceuzsoib\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"SecureString\",\"name\":\"rthzvaytdwkqbrqu\",\"description\":\"axhexiilivp\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"tdqoaxoruzfgsq\",\"name\":\"yfxrx\",\"type\":\"l\"}],\"nextLink\":\"tramxjez\"}") .toObject(ScriptCmdletsList.class); - Assertions.assertEquals("rsndsytgadgvra", model.nextLink()); + Assertions.assertEquals("tramxjez", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionInnerTests.java index a3d070e2774f..e1e3796beba4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionInnerTests.java @@ -16,39 +16,38 @@ public final class ScriptExecutionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptExecutionInner model = BinaryData.fromString( - "{\"properties\":{\"scriptCmdletId\":\"ky\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"eddgssofw\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mzqa\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"krmnjijpxacqqud\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"yxbaaabjyvayf\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"imrzrtuzqog\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"exn\"}],\"failureReason\":\"fdnw\",\"timeout\":\"wmewzsyy\",\"retention\":\"uzsoi\",\"submittedAt\":\"2021-09-06T23:25:45Z\",\"startedAt\":\"2021-11-18T11:14:43Z\",\"finishedAt\":\"2021-08-08T12:59:01Z\",\"provisioningState\":\"Deleting\",\"output\":[\"hzv\",\"ytdw\",\"qbrqubpaxhexiili\",\"pdtii\"],\"namedOutputs\":{\"oaxoruzfgsqu\":\"datad\",\"tramxjez\":\"datafxrxxle\",\"tdooaoj\":\"datalwnwxuqlcvydyp\",\"nuj\":\"dataniodkooeb\"},\"information\":[\"msbvdkcrodtjinf\",\"jlfltkacjvefkdlf\",\"akggkfpag\",\"owpulpq\"],\"warnings\":[\"lsyxkqjnsjervt\",\"agxsdszuemps\",\"zkfzbeyv\"],\"errors\":[\"icvi\"]},\"id\":\"kjj\",\"name\":\"dxrbuukzcle\",\"type\":\"yhmlwpaztzp\"}") + "{\"properties\":{\"scriptCmdletId\":\"vfxzsjab\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ystawfsdjpvkvp\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"jxbkzbzkdvn\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"jabudurgkakmo\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"jjklff\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mouwqlgzrfzeey\"}],\"failureReason\":\"izikayuhq\",\"timeout\":\"bjbsybb\",\"retention\":\"r\",\"submittedAt\":\"2021-04-14T00:53:35Z\",\"startedAt\":\"2021-02-21T15:33:59Z\",\"finishedAt\":\"2021-08-14T01:44:34Z\",\"provisioningState\":\"Deleting\",\"output\":[\"pip\",\"slthaq\",\"x\",\"smwutwbdsrezpd\"],\"namedOutputs\":{\"ytisibir\":\"dataeuyowqkd\",\"lfzxiavrmbzonoki\":\"datagpikpzimejza\"},\"information\":[\"q\"],\"warnings\":[\"gzpfrla\"],\"errors\":[\"rnwoiindfp\"]},\"id\":\"jylwbtlhflsj\",\"name\":\"dhszfjv\",\"type\":\"bgofeljag\"}") .toObject(ScriptExecutionInner.class); - Assertions.assertEquals("ky", model.scriptCmdletId()); - Assertions.assertEquals("eddgssofw", model.parameters().get(0).name()); - Assertions.assertEquals("yxbaaabjyvayf", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("fdnw", model.failureReason()); - Assertions.assertEquals("wmewzsyy", model.timeout()); - Assertions.assertEquals("uzsoi", model.retention()); - Assertions.assertEquals("hzv", model.output().get(0)); + Assertions.assertEquals("vfxzsjab", model.scriptCmdletId()); + Assertions.assertEquals("ystawfsdjpvkvp", model.parameters().get(0).name()); + Assertions.assertEquals("jjklff", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("izikayuhq", model.failureReason()); + Assertions.assertEquals("bjbsybb", model.timeout()); + Assertions.assertEquals("r", model.retention()); + Assertions.assertEquals("pip", model.output().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptExecutionInner model = new ScriptExecutionInner().withScriptCmdletId("ky") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("eddgssofw"), - new ScriptExecutionParameter().withName("mzqa"), - new ScriptExecutionParameter().withName("krmnjijpxacqqud"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("yxbaaabjyvayf"), - new ScriptExecutionParameter().withName("imrzrtuzqog"), new ScriptExecutionParameter().withName("exn"))) - .withFailureReason("fdnw") - .withTimeout("wmewzsyy") - .withRetention("uzsoi") - .withOutput(Arrays.asList("hzv", "ytdw", "qbrqubpaxhexiili", "pdtii")) - .withNamedOutputs(mapOf("oaxoruzfgsqu", "datad", "tramxjez", "datafxrxxle", "tdooaoj", "datalwnwxuqlcvydyp", - "nuj", "dataniodkooeb")); + ScriptExecutionInner model = new ScriptExecutionInner().withScriptCmdletId("vfxzsjab") + .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("ystawfsdjpvkvp"), + new ScriptExecutionParameter().withName("jxbkzbzkdvn"), + new ScriptExecutionParameter().withName("jabudurgkakmo"))) + .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("jjklff"), + new ScriptExecutionParameter().withName("mouwqlgzrfzeey"))) + .withFailureReason("izikayuhq") + .withTimeout("bjbsybb") + .withRetention("r") + .withOutput(Arrays.asList("pip", "slthaq", "x", "smwutwbdsrezpd")) + .withNamedOutputs(mapOf("ytisibir", "dataeuyowqkd", "lfzxiavrmbzonoki", "datagpikpzimejza")); model = BinaryData.fromObject(model).toObject(ScriptExecutionInner.class); - Assertions.assertEquals("ky", model.scriptCmdletId()); - Assertions.assertEquals("eddgssofw", model.parameters().get(0).name()); - Assertions.assertEquals("yxbaaabjyvayf", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("fdnw", model.failureReason()); - Assertions.assertEquals("wmewzsyy", model.timeout()); - Assertions.assertEquals("uzsoi", model.retention()); - Assertions.assertEquals("hzv", model.output().get(0)); + Assertions.assertEquals("vfxzsjab", model.scriptCmdletId()); + Assertions.assertEquals("ystawfsdjpvkvp", model.parameters().get(0).name()); + Assertions.assertEquals("jjklff", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("izikayuhq", model.failureReason()); + Assertions.assertEquals("bjbsybb", model.timeout()); + Assertions.assertEquals("r", model.retention()); + Assertions.assertEquals("pip", model.output().get(0)); } // Use "Map.of" if available diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionParameterTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionParameterTests.java index 99fa8cc32df8..f4fa4c07cce9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionParameterTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionParameterTests.java @@ -12,15 +12,15 @@ public final class ScriptExecutionParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptExecutionParameter model - = BinaryData.fromString("{\"type\":\"ScriptExecutionParameter\",\"name\":\"twwaezkojvdcpzf\"}") + = BinaryData.fromString("{\"type\":\"ScriptExecutionParameter\",\"name\":\"kftnkhtjsyin\"}") .toObject(ScriptExecutionParameter.class); - Assertions.assertEquals("twwaezkojvdcpzf", model.name()); + Assertions.assertEquals("kftnkhtjsyin", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptExecutionParameter model = new ScriptExecutionParameter().withName("twwaezkojvdcpzf"); + ScriptExecutionParameter model = new ScriptExecutionParameter().withName("kftnkhtjsyin"); model = BinaryData.fromObject(model).toObject(ScriptExecutionParameter.class); - Assertions.assertEquals("twwaezkojvdcpzf", model.name()); + Assertions.assertEquals("kftnkhtjsyin", model.name()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionPropertiesTests.java index 3c648052632f..0df7569e2ea0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionPropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionPropertiesTests.java @@ -16,39 +16,38 @@ public final class ScriptExecutionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptExecutionProperties model = BinaryData.fromString( - "{\"scriptCmdletId\":\"ncckw\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"qwhxxbuyqaxzfeqz\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ppriol\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"or\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"altol\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"wsobqwcsdbn\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"dcfhucqdpf\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"vglsbjjca\"}],\"failureReason\":\"xbvtvudu\",\"timeout\":\"ncormrlxqtvcof\",\"retention\":\"f\",\"submittedAt\":\"2021-03-28T10:29:41Z\",\"startedAt\":\"2021-06-24T11:39:36Z\",\"finishedAt\":\"2021-11-15T11:26:46Z\",\"provisioningState\":\"Running\",\"output\":[\"nqvsaznqnto\",\"udsgs\"],\"namedOutputs\":{\"etaebu\":\"datakycgrauwj\",\"dmovsm\":\"datau\"},\"information\":[\"wabm\",\"oefki\"],\"warnings\":[\"tpuqujmq\",\"gkfbtndoaong\",\"jcntuj\"],\"errors\":[\"jed\"]}") + "{\"scriptCmdletId\":\"mqhldvrii\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"nalghfkvtvsexso\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ueluqhhahhxvrhmz\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"jgwwspughftq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"xhqxujxukndxdigr\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"guufzd\"}],\"failureReason\":\"yqtfihwh\",\"timeout\":\"otzi\",\"retention\":\"amvpphoszqzudph\",\"submittedAt\":\"2021-05-02T09:33:50Z\",\"startedAt\":\"2021-04-08T12:01:53Z\",\"finishedAt\":\"2021-02-05T20:02:56Z\",\"provisioningState\":\"Pending\",\"output\":[\"cvtbv\",\"ayhmtnvyqiatkz\",\"pcnp\",\"zcjaesgvvsccy\"],\"namedOutputs\":{\"hwyg\":\"datauq\"},\"information\":[\"dnkfx\",\"semdwzrmu\",\"apfcqdpsq\"],\"warnings\":[\"psvuoymgc\",\"elvezrypq\",\"mfe\"],\"errors\":[\"rqwky\",\"kobopgxed\",\"owepbqpcrfkb\",\"ccsnjvcdwxlpq\"]}") .toObject(ScriptExecutionProperties.class); - Assertions.assertEquals("ncckw", model.scriptCmdletId()); - Assertions.assertEquals("qwhxxbuyqaxzfeqz", model.parameters().get(0).name()); - Assertions.assertEquals("wsobqwcsdbn", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("xbvtvudu", model.failureReason()); - Assertions.assertEquals("ncormrlxqtvcof", model.timeout()); - Assertions.assertEquals("f", model.retention()); - Assertions.assertEquals("nqvsaznqnto", model.output().get(0)); + Assertions.assertEquals("mqhldvrii", model.scriptCmdletId()); + Assertions.assertEquals("nalghfkvtvsexso", model.parameters().get(0).name()); + Assertions.assertEquals("jgwwspughftq", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("yqtfihwh", model.failureReason()); + Assertions.assertEquals("otzi", model.timeout()); + Assertions.assertEquals("amvpphoszqzudph", model.retention()); + Assertions.assertEquals("cvtbv", model.output().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptExecutionProperties model = new ScriptExecutionProperties().withScriptCmdletId("ncckw") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("qwhxxbuyqaxzfeqz"), - new ScriptExecutionParameter().withName("ppriol"), new ScriptExecutionParameter().withName("or"), - new ScriptExecutionParameter().withName("altol"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("wsobqwcsdbn"), - new ScriptExecutionParameter().withName("dcfhucqdpf"), - new ScriptExecutionParameter().withName("vglsbjjca"))) - .withFailureReason("xbvtvudu") - .withTimeout("ncormrlxqtvcof") - .withRetention("f") - .withOutput(Arrays.asList("nqvsaznqnto", "udsgs")) - .withNamedOutputs(mapOf("etaebu", "datakycgrauwj", "dmovsm", "datau")); + ScriptExecutionProperties model = new ScriptExecutionProperties().withScriptCmdletId("mqhldvrii") + .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("nalghfkvtvsexso"), + new ScriptExecutionParameter().withName("ueluqhhahhxvrhmz"))) + .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("jgwwspughftq"), + new ScriptExecutionParameter().withName("xhqxujxukndxdigr"), + new ScriptExecutionParameter().withName("guufzd"))) + .withFailureReason("yqtfihwh") + .withTimeout("otzi") + .withRetention("amvpphoszqzudph") + .withOutput(Arrays.asList("cvtbv", "ayhmtnvyqiatkz", "pcnp", "zcjaesgvvsccy")) + .withNamedOutputs(mapOf("hwyg", "datauq")); model = BinaryData.fromObject(model).toObject(ScriptExecutionProperties.class); - Assertions.assertEquals("ncckw", model.scriptCmdletId()); - Assertions.assertEquals("qwhxxbuyqaxzfeqz", model.parameters().get(0).name()); - Assertions.assertEquals("wsobqwcsdbn", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("xbvtvudu", model.failureReason()); - Assertions.assertEquals("ncormrlxqtvcof", model.timeout()); - Assertions.assertEquals("f", model.retention()); - Assertions.assertEquals("nqvsaznqnto", model.output().get(0)); + Assertions.assertEquals("mqhldvrii", model.scriptCmdletId()); + Assertions.assertEquals("nalghfkvtvsexso", model.parameters().get(0).name()); + Assertions.assertEquals("jgwwspughftq", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("yqtfihwh", model.failureReason()); + Assertions.assertEquals("otzi", model.timeout()); + Assertions.assertEquals("amvpphoszqzudph", model.retention()); + Assertions.assertEquals("cvtbv", model.output().get(0)); } // Use "Map.of" if available diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateMockTests.java index 7d1fd8559ffb..6b18659369d1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateMockTests.java @@ -25,7 +25,7 @@ public final class ScriptExecutionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"scriptCmdletId\":\"irwgdnqzbrf\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"zhzmtksjci\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"gsxcdgljplkeua\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"htomflrytswfp\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mdgycxn\"}],\"failureReason\":\"kwhqj\",\"timeout\":\"yslu\",\"retention\":\"pshhkvpedwqslsr\",\"submittedAt\":\"2021-09-27T23:43:44Z\",\"startedAt\":\"2021-05-08T20:00:26Z\",\"finishedAt\":\"2021-09-28T14:12Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"dcbrwimuvq\",\"josovyrrl\"],\"namedOutputs\":{\"hcecybmrqbr\":\"datasinuqtljqobbpih\"},\"information\":[\"mpxdlvy\",\"frexcrseqw\",\"ksghudgzhxogjgg\",\"voujkxibdafhrk\"],\"warnings\":[\"omkxf\",\"vfb\",\"dy\",\"rhpw\"],\"errors\":[\"deimawzov\"]},\"id\":\"kumuikjcjca\",\"name\":\"tbw\",\"type\":\"nsq\"}"; + = "{\"properties\":{\"scriptCmdletId\":\"bjb\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ybvitvqkjyaznumt\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"gmuwdchozfnkf\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"v\"}],\"failureReason\":\"oakizvoai\",\"timeout\":\"naqln\",\"retention\":\"iguyxlykwphv\",\"submittedAt\":\"2021-11-13T04:48:37Z\",\"startedAt\":\"2021-06-18T05:52:26Z\",\"finishedAt\":\"2021-02-09T15:30:09Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"lkexaonwivkcqh\"],\"namedOutputs\":{\"lccrmmkyupi\":\"dataxk\",\"kakfqfr\":\"dataubyqj\",\"il\":\"dataem\",\"djkpdxph\":\"dataudxjascowv\"},\"information\":[\"snmgzvyfi\",\"dkz\"],\"warnings\":[\"wsithuqolyahlu\",\"wqulsutrjbhxykf\",\"y\",\"ezvqq\"],\"errors\":[\"rftb\",\"ve\",\"reuquowtljvf\",\"hreagk\"]},\"id\":\"xv\",\"name\":\"qtvbczsu\",\"type\":\"mdgglmepjpfs\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,28 +35,30 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ScriptExecution response = manager.scriptExecutions() - .define("sfxsf") - .withExistingPrivateCloud("uhplrvkmjcwmjv", "gfggcvkyylizrzbj") - .withScriptCmdletId("lvt") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("gbwidqlvh"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("veo"), - new ScriptExecutionParameter().withName("i"), new ScriptExecutionParameter().withName("rvjfnmjmvlw"), - new ScriptExecutionParameter().withName("z"))) - .withFailureReason("blkujrllfojuidjp") - .withTimeout("uyjucejikzo") - .withRetention("vvtzejetjkl") - .withOutput(Arrays.asList("qzolxrzvhqjw", "rhtgvgzpcrrkol")) - .withNamedOutputs(mapOf("kcdxfzzzw", "datamjsmwr", "lhguyn", "datajafi", "mltx", "datachl", - "fpafolpymwamxq", "datawhmozusgzvlnsnnj")) + .define("ip") + .withExistingPrivateCloud("imipskdyzatvfuz", "aftjvvruxwigsy") + .withScriptCmdletId("mjtgrqg") + .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("kileplkcsmknhwtb"), + new ScriptExecutionParameter().withName("aedorvvmqf"), + new ScriptExecutionParameter().withName("oygbdgwumgxd"))) + .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("pabgdexjddvjsaqw"), + new ScriptExecutionParameter().withName("tm"), new ScriptExecutionParameter().withName("wllcolsr"), + new ScriptExecutionParameter().withName("xaptefhexcgjok"))) + .withFailureReason("jnhvlqjbekpeeks") + .withTimeout("bksdqhjvyklxesl") + .withRetention("hustcpoqmavnwqjw") + .withOutput(Arrays.asList("ybwfdbkjb", "tensvkzykj", "jknsxfwu", "hcdpkupnqrmgj")) + .withNamedOutputs(mapOf("zwfbcyaykmmfzs", "datakuwxeoiojfizfavk", "rsxkr", "datafwxrzxmdew", + "iyoypsuhbrnnhj", "datalbjazejww")) .create(); - Assertions.assertEquals("irwgdnqzbrf", response.scriptCmdletId()); - Assertions.assertEquals("zhzmtksjci", response.parameters().get(0).name()); - Assertions.assertEquals("gsxcdgljplkeua", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("kwhqj", response.failureReason()); - Assertions.assertEquals("yslu", response.timeout()); - Assertions.assertEquals("pshhkvpedwqslsr", response.retention()); - Assertions.assertEquals("dcbrwimuvq", response.output().get(0)); + Assertions.assertEquals("bjb", response.scriptCmdletId()); + Assertions.assertEquals("ybvitvqkjyaznumt", response.parameters().get(0).name()); + Assertions.assertEquals("v", response.hiddenParameters().get(0).name()); + Assertions.assertEquals("oakizvoai", response.failureReason()); + Assertions.assertEquals("naqln", response.timeout()); + Assertions.assertEquals("iguyxlykwphv", response.retention()); + Assertions.assertEquals("lkexaonwivkcqh", response.output().get(0)); } // Use "Map.of" if available diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteMockTests.java index d46f7bd5b87f..822129e970c7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.scriptExecutions().delete("tmhqykiz", "d", "saoafcluqvox", com.azure.core.util.Context.NONE); + manager.scriptExecutions().delete("taf", "bzf", "ovwmbjlzqsczpgvd", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsWithResponseMockTests.java index 73e2e226d142..1640d76848d7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class ScriptExecutionsGetExecutionLogsWithResponseMockTests { @Test public void testGetExecutionLogsWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"scriptCmdletId\":\"ecb\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"wndyqleallk\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mtkhlowkxxpvbr\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"fjmzsyzfho\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ikcyyc\"}],\"failureReason\":\"nsjlpjrtws\",\"timeout\":\"hv\",\"retention\":\"icphvtrrmhw\",\"submittedAt\":\"2021-08-16T10:26:11Z\",\"startedAt\":\"2021-03-14T13:08:25Z\",\"finishedAt\":\"2021-02-16T07:42:20Z\",\"provisioningState\":\"Canceled\",\"output\":[\"vjglrocuyzlwhhme\"],\"namedOutputs\":{\"n\":\"dataoclu\",\"jk\":\"dataqmemc\"},\"information\":[\"kyujxsglhsrrr\",\"ejylmbkzu\"],\"warnings\":[\"grfihotjewlp\",\"uzzjgnrefq\",\"hqo\"],\"errors\":[\"hiqakydiwfbrk\",\"pzdqtvhcspod\",\"qaxsipietgbebjf\"]},\"id\":\"bmoichd\",\"name\":\"pnfpubntnbat\",\"type\":\"viqsowsaaelcattc\"}"; + = "{\"properties\":{\"scriptCmdletId\":\"eseyqr\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"eldotjv\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"iswskuk\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"tasbvw\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"spkxkdt\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"fkndl\"}],\"failureReason\":\"twknvgm\",\"timeout\":\"bugtywatmqa\",\"retention\":\"ueatgroe\",\"submittedAt\":\"2021-01-30T18:47:37Z\",\"startedAt\":\"2021-11-24T21:27:46Z\",\"finishedAt\":\"2021-06-01T18:30:25Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"x\",\"faoytehqpuv\",\"mvqmtdwckygroej\"],\"namedOutputs\":{\"kceysfaqegplw\":\"dataljdjuskbrreqy\",\"ddkvbxgkqu\":\"dataysh\",\"arvvlfnt\":\"dataybwptda\"},\"information\":[\"poi\"],\"warnings\":[\"azerohzrsq\"],\"errors\":[\"xkdnwqapf\",\"sdpcvess\",\"zhhkuuipldqqc\",\"ekvalblhtjq\"]},\"id\":\"yvwehtaemxh\",\"name\":\"zysevusxi\",\"type\":\"zrrryv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,16 +33,18 @@ public void testGetExecutionLogsWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ScriptExecution response = manager.scriptExecutions() - .getExecutionLogsWithResponse("ycjimryvwgcwwpbm", "gwe", "ydsx", - Arrays.asList(ScriptOutputStreamType.INFORMATION), com.azure.core.util.Context.NONE) + .getExecutionLogsWithResponse("napfdqwowftpt", "uwjtks", "h", + Arrays.asList(ScriptOutputStreamType.INFORMATION, ScriptOutputStreamType.OUTPUT, + ScriptOutputStreamType.INFORMATION), + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ecb", response.scriptCmdletId()); - Assertions.assertEquals("wndyqleallk", response.parameters().get(0).name()); - Assertions.assertEquals("ikcyyc", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("nsjlpjrtws", response.failureReason()); - Assertions.assertEquals("hv", response.timeout()); - Assertions.assertEquals("icphvtrrmhw", response.retention()); - Assertions.assertEquals("vjglrocuyzlwhhme", response.output().get(0)); + Assertions.assertEquals("eseyqr", response.scriptCmdletId()); + Assertions.assertEquals("eldotjv", response.parameters().get(0).name()); + Assertions.assertEquals("iswskuk", response.hiddenParameters().get(0).name()); + Assertions.assertEquals("twknvgm", response.failureReason()); + Assertions.assertEquals("bugtywatmqa", response.timeout()); + Assertions.assertEquals("ueatgroe", response.retention()); + Assertions.assertEquals("x", response.output().get(0)); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetWithResponseMockTests.java index b74e7ce57f7f..1147f4f44ec5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class ScriptExecutionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"scriptCmdletId\":\"vfxzopjh\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"liohrd\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"dtfgxqbawpcbb\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"zqcyknap\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"yuicdhzbdy\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"wwgbdv\"}],\"failureReason\":\"idmhmwf\",\"timeout\":\"plfmuvapckccrrvw\",\"retention\":\"oxoyyukp\",\"submittedAt\":\"2021-02-08T12:14:50Z\",\"startedAt\":\"2020-12-31T05:52:12Z\",\"finishedAt\":\"2021-06-19T18:13:38Z\",\"provisioningState\":\"Pending\",\"output\":[\"shbraga\",\"yyrmfsvbp\",\"vbopfppdbwnu\"],\"namedOutputs\":{\"pugmehqe\":\"datahxkumasjcaacfdmm\",\"nlbqnbldxeaclg\":\"datavufhbzehewhoq\"},\"information\":[\"orim\",\"rsrrmoucsofldp\"],\"warnings\":[\"yfcaabeolhbhlvbm\"],\"errors\":[\"ibsxtkcud\"]},\"id\":\"sfar\",\"name\":\"siowlkjxnqpv\",\"type\":\"gf\"}"; + = "{\"properties\":{\"scriptCmdletId\":\"upgxyjtcdxabbujf\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"enbbklqpxzucafed\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"wwnlzafwxudgnh\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"krtalvn\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"wgpbemeluclv\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"jjukyrdnqodxah\"}],\"failureReason\":\"hqfaqnvz\",\"timeout\":\"qgyi\",\"retention\":\"mchgavsczuej\",\"submittedAt\":\"2021-06-22T15:04:53Z\",\"startedAt\":\"2021-09-23T13:23:29Z\",\"finishedAt\":\"2021-03-16T21:30:07Z\",\"provisioningState\":\"Cancelling\",\"output\":[\"omew\",\"j\",\"tl\"],\"namedOutputs\":{\"nvodrrs\":\"dataqawmoaianc\",\"vvbxiwkgfbqljnq\":\"datablxydkxr\"},\"information\":[\"chocokulehur\",\"lrqff\",\"weyurkphyjd\"],\"warnings\":[\"vjuqdbrxmrgchb\"],\"errors\":[\"kiyfjjkbajbusc\"]},\"id\":\"uusioycblev\",\"name\":\"mclujyxkyxlzgs\",\"type\":\"gkzz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,15 +31,15 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ScriptExecution response = manager.scriptExecutions() - .getWithResponse("o", "izrxklob", "xnazpmkml", com.azure.core.util.Context.NONE) + .getWithResponse("v", "kxrerlniylylyfwx", "utgqztwh", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("vfxzopjh", response.scriptCmdletId()); - Assertions.assertEquals("liohrd", response.parameters().get(0).name()); - Assertions.assertEquals("yuicdhzbdy", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("idmhmwf", response.failureReason()); - Assertions.assertEquals("plfmuvapckccrrvw", response.timeout()); - Assertions.assertEquals("oxoyyukp", response.retention()); - Assertions.assertEquals("shbraga", response.output().get(0)); + Assertions.assertEquals("upgxyjtcdxabbujf", response.scriptCmdletId()); + Assertions.assertEquals("enbbklqpxzucafed", response.parameters().get(0).name()); + Assertions.assertEquals("krtalvn", response.hiddenParameters().get(0).name()); + Assertions.assertEquals("hqfaqnvz", response.failureReason()); + Assertions.assertEquals("qgyi", response.timeout()); + Assertions.assertEquals("mchgavsczuej", response.retention()); + Assertions.assertEquals("omew", response.output().get(0)); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListMockTests.java index 4d60a2a2a108..d0f6d4920668 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListMockTests.java @@ -22,7 +22,7 @@ public final class ScriptExecutionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"mqeq\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"hjnhgwydyynfsvk\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"vqtanarfdlpuk\"}],\"failureReason\":\"yrneizjcpeo\",\"timeout\":\"khnmgbrou\",\"retention\":\"dbhfhp\",\"submittedAt\":\"2021-05-12T21:56:51Z\",\"startedAt\":\"2021-11-10T15:36:49Z\",\"finishedAt\":\"2021-06-14T12:47:01Z\",\"provisioningState\":\"Running\",\"output\":[\"hpdulon\",\"acn\",\"qwtehtuevr\",\"rljyoogwxhnsdu\"],\"namedOutputs\":{\"rfqkfuar\":\"databsre\",\"yfedevjbo\":\"datanlvhhtklnvnafvv\"},\"information\":[\"qxypokkhminq\",\"ymc\",\"ngnbdxxew\",\"ninvudbchaqdt\"],\"warnings\":[\"crqctmxxdtddmflh\"],\"errors\":[\"xzvtzna\"]},\"id\":\"bannovvoxczytp\",\"name\":\"wnwvroevytlyokr\",\"type\":\"rouuxvnsasbcry\"}]}"; + = "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"ijkgqxnhm\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"znj\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ujvaannggi\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"kdtaaw\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"wfekaumrrqmb\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mqkra\"}],\"failureReason\":\"nxwbjsidbirkfp\",\"timeout\":\"sokdgoge\",\"retention\":\"jymrhbg\",\"submittedAt\":\"2021-09-10T17:22:19Z\",\"startedAt\":\"2021-06-13T01:32:21Z\",\"finishedAt\":\"2021-08-10T16:12:14Z\",\"provisioningState\":\"Pending\",\"output\":[\"zhhh\",\"o\"],\"namedOutputs\":{\"g\":\"datafjkutycyarnroo\",\"ocnhzqrottjzcfyj\":\"dataabzoghktdpyczhco\",\"rl\":\"datapt\",\"pqinf\":\"datah\"},\"information\":[\"yglqdhmrjzral\",\"xpjb\",\"ypsjoq\",\"jenkyh\"],\"warnings\":[\"vsqxfxjelgcmpzqj\"],\"errors\":[\"qxuwyvca\"]},\"id\":\"yv\",\"name\":\"vbsizusjszlbscm\",\"type\":\"lzijiufehgmvflnw\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ScriptExecution> response - = manager.scriptExecutions().list("byrplrohkpig", "fusuckzmkwklsno", com.azure.core.util.Context.NONE); + = manager.scriptExecutions().list("iv", "inbmh", com.azure.core.util.Context.NONE); - Assertions.assertEquals("mqeq", response.iterator().next().scriptCmdletId()); - Assertions.assertEquals("hjnhgwydyynfsvk", response.iterator().next().parameters().get(0).name()); - Assertions.assertEquals("vqtanarfdlpuk", response.iterator().next().hiddenParameters().get(0).name()); - Assertions.assertEquals("yrneizjcpeo", response.iterator().next().failureReason()); - Assertions.assertEquals("khnmgbrou", response.iterator().next().timeout()); - Assertions.assertEquals("dbhfhp", response.iterator().next().retention()); - Assertions.assertEquals("hpdulon", response.iterator().next().output().get(0)); + Assertions.assertEquals("ijkgqxnhm", response.iterator().next().scriptCmdletId()); + Assertions.assertEquals("znj", response.iterator().next().parameters().get(0).name()); + Assertions.assertEquals("kdtaaw", response.iterator().next().hiddenParameters().get(0).name()); + Assertions.assertEquals("nxwbjsidbirkfp", response.iterator().next().failureReason()); + Assertions.assertEquals("sokdgoge", response.iterator().next().timeout()); + Assertions.assertEquals("jymrhbg", response.iterator().next().retention()); + Assertions.assertEquals("zhhh", response.iterator().next().output().get(0)); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java index 50be5aeb71ca..0bf7ae7cc3a8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java @@ -12,15 +12,15 @@ public final class ScriptExecutionsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptExecutionsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"gvvcnayrhyr\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"mueedndrdvstk\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"qqtch\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"mfmtdaaygdvw\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"gpiohgwxrtfudxe\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"xg\"}],\"failureReason\":\"agvrvmnpkuk\",\"timeout\":\"himdbl\",\"retention\":\"wi\",\"submittedAt\":\"2020-12-24T20:58:33Z\",\"startedAt\":\"2021-12-10T08:58:19Z\",\"finishedAt\":\"2021-09-01T04:07:41Z\",\"provisioningState\":\"Canceled\",\"output\":[\"zk\",\"foqreyfkzik\",\"jawneaiv\"],\"namedOutputs\":{\"c\":\"datazel\",\"lsfeaenwabfatkld\":\"datar\",\"oulpjrv\":\"dataxbjhwuaanozjosph\"},\"information\":[\"l\",\"vimjwos\",\"tx\",\"tcs\"],\"warnings\":[\"k\",\"qumiek\",\"ez\",\"ikh\"],\"errors\":[\"jhdgqggebdunyga\",\"qidbqfatpxllrxcy\"]},\"id\":\"oadsuvar\",\"name\":\"ywdmjsjqbjh\",\"type\":\"yxxrwlycoduh\"}],\"nextLink\":\"xkgymareqnajxqu\"}") + "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"mncwsobqwcsdb\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"cf\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ucqdpfuvglsb\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"jcanvxbvtvudut\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"rmrlxqtvcof\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"dflvkg\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"u\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"gdknnqv\"}],\"failureReason\":\"znqntoru\",\"timeout\":\"sgsahmkycgr\",\"retention\":\"wjue\",\"submittedAt\":\"2020-12-26T00:25:40Z\",\"startedAt\":\"2021-05-18T20:19:13Z\",\"finishedAt\":\"2021-03-29T08:59:37Z\",\"provisioningState\":\"Canceled\",\"output\":[\"vsmzlxwab\"],\"namedOutputs\":{\"tpuqujmq\":\"dataefkifr\",\"jcntuj\":\"datagkfbtndoaong\"},\"information\":[\"jed\"],\"warnings\":[\"waezkojvd\"],\"errors\":[\"foqouicybx\",\"rzgszufoxci\",\"opidoamciodh\",\"haz\"]},\"id\":\"hnzbonl\",\"name\":\"ntoe\",\"type\":\"okdwb\"},{\"properties\":{\"scriptCmdletId\":\"szzcmrvexztv\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"gsfraoyzkoow\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"lmnguxaw\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"aldsy\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"uximerqfobw\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"kby\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"utwpfhp\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"gmhrskdsnfdsdoak\"}],\"failureReason\":\"dlmkkzevdl\",\"timeout\":\"ewpusdsttwvogvb\",\"retention\":\"jdcngqqm\",\"submittedAt\":\"2021-09-20T13:12:10Z\",\"startedAt\":\"2021-07-10T00:03:48Z\",\"finishedAt\":\"2021-01-17T14:47:10Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"rdgrtw\"],\"namedOutputs\":{\"zkopb\":\"datau\",\"hziuiefozbhdms\":\"datainrfdwoyu\",\"zqhof\":\"datal\"},\"information\":[\"ae\",\"u\",\"ah\",\"icslfaoq\"],\"warnings\":[\"yylhalnswhccsp\",\"kaivwit\",\"scywuggwoluhc\",\"bwemhairs\"],\"errors\":[\"z\"]},\"id\":\"msweypqwdxggicc\",\"name\":\"n\",\"type\":\"qhuexm\"},{\"properties\":{\"scriptCmdletId\":\"lstvlzywe\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"rncsdtclu\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"iypbsfgytgusl\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"dcygqukyhejhz\"}],\"failureReason\":\"xgfpelolppv\",\"timeout\":\"srp\",\"retention\":\"ujzra\",\"submittedAt\":\"2021-03-03T18:15:09Z\",\"startedAt\":\"2021-06-17T09:10:46Z\",\"finishedAt\":\"2021-10-03T12:06:06Z\",\"provisioningState\":\"Canceled\",\"output\":[\"iby\"],\"namedOutputs\":{\"h\":\"datal\"},\"information\":[\"wpracstwitykhev\",\"c\",\"edcpnmdyodnwzxl\"],\"warnings\":[\"vnhltiugcx\",\"avvwxqi\",\"y\"],\"errors\":[\"y\",\"wxwlmdjrkvfgb\",\"fvpdbo\",\"acizsjqlhkrr\"]},\"id\":\"deibqip\",\"name\":\"kghv\",\"type\":\"ndzwmkrefa\"}],\"nextLink\":\"jorwkqnyhgbij\"}") .toObject(ScriptExecutionsList.class); - Assertions.assertEquals("gvvcnayrhyr", model.value().get(0).scriptCmdletId()); - Assertions.assertEquals("mueedndrdvstk", model.value().get(0).parameters().get(0).name()); - Assertions.assertEquals("mfmtdaaygdvw", model.value().get(0).hiddenParameters().get(0).name()); - Assertions.assertEquals("agvrvmnpkuk", model.value().get(0).failureReason()); - Assertions.assertEquals("himdbl", model.value().get(0).timeout()); - Assertions.assertEquals("wi", model.value().get(0).retention()); - Assertions.assertEquals("zk", model.value().get(0).output().get(0)); - Assertions.assertEquals("xkgymareqnajxqu", model.nextLink()); + Assertions.assertEquals("mncwsobqwcsdb", model.value().get(0).scriptCmdletId()); + Assertions.assertEquals("cf", model.value().get(0).parameters().get(0).name()); + Assertions.assertEquals("rmrlxqtvcof", model.value().get(0).hiddenParameters().get(0).name()); + Assertions.assertEquals("znqntoru", model.value().get(0).failureReason()); + Assertions.assertEquals("sgsahmkycgr", model.value().get(0).timeout()); + Assertions.assertEquals("wjue", model.value().get(0).retention()); + Assertions.assertEquals("vsmzlxwab", model.value().get(0).output().get(0)); + Assertions.assertEquals("jorwkqnyhgbij", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackageInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackageInnerTests.java index 9b405de5c64c..969c2ffd2637 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackageInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackageInnerTests.java @@ -11,7 +11,7 @@ public final class ScriptPackageInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptPackageInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"w\",\"version\":\"r\",\"company\":\"swibyr\",\"uri\":\"l\"},\"id\":\"shfwpracstwity\",\"name\":\"hevxcced\",\"type\":\"pnmdyodnwzxltjcv\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"mw\",\"version\":\"nbsazejjoqkag\",\"company\":\"sxtta\",\"uri\":\"zxnfaaz\"},\"id\":\"dtnkdmkq\",\"name\":\"jlwuenvrkp\",\"type\":\"ou\"}") .toObject(ScriptPackageInner.class); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagePropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagePropertiesTests.java index 719dd3970fc8..72d568354fbd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagePropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagePropertiesTests.java @@ -11,7 +11,7 @@ public final class ScriptPackagePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptPackageProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Failed\",\"description\":\"iugcxnavvwxq\",\"version\":\"y\",\"company\":\"nyowxwlmdjrkvfg\",\"uri\":\"fvpdbo\"}") + "{\"provisioningState\":\"Canceled\",\"description\":\"ebqaaysjkixqtnq\",\"version\":\"ezl\",\"company\":\"ffiakp\",\"uri\":\"qqmtedltmmji\"}") .toObject(ScriptPackageProperties.class); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetWithResponseMockTests.java index 171fbeaf6cba..6bce5644c76c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class ScriptPackagesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"sqplpvmjcd\",\"version\":\"wb\",\"company\":\"yvteowxvgpiudeu\",\"uri\":\"sxze\"},\"id\":\"axwk\",\"name\":\"fykhvuhxepmru\",\"type\":\"znabaobns\"}"; + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"ej\",\"version\":\"iuxegth\",\"company\":\"tudaw\",\"uri\":\"jfel\"},\"id\":\"rpptcbgqnzmnhiil\",\"name\":\"alwcjgckbb\",\"type\":\"ccgzpraoxnyu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ScriptPackage response = manager.scriptPackages() - .getWithResponse("ywaeeczgf", "ukklelss", "blycsxzujksr", com.azure.core.util.Context.NONE) + .getWithResponse("pdsxzakuejkm", "bizt", "ofqcvovjufycsjm", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListMockTests.java index f41390d5e0a8..980daf084689 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListMockTests.java @@ -21,7 +21,7 @@ public final class ScriptPackagesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"lvhbwrnf\",\"version\":\"gddpq\",\"company\":\"ehnmnaoyankco\",\"uri\":\"swankltytmh\"},\"id\":\"oznnhdrlktgj\",\"name\":\"sggux\",\"type\":\"eml\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"ngoadyedmzr\",\"version\":\"foknubnoitp\",\"company\":\"ztrgdgxvcoq\",\"uri\":\"sw\"},\"id\":\"yxp\",\"name\":\"itweialwvskbuh\",\"type\":\"acaqtyltcoqcu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ScriptPackage> response - = manager.scriptPackages().list("wxwcomli", "ytwvczcswkacve", com.azure.core.util.Context.NONE); + = manager.scriptPackages().list("ykgsangpszng", "fpgylkve", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListTests.java index 698bef6964b6..b020955b1f68 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListTests.java @@ -12,8 +12,8 @@ public final class ScriptPackagesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptPackagesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"t\",\"version\":\"sfraoyzko\",\"company\":\"tlmngu\",\"uri\":\"wqaldsyu\"},\"id\":\"imerqfobwyznk\",\"name\":\"ykutwpf\",\"type\":\"pagmhrskdsnf\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"kgtdlmkkze\",\"version\":\"l\",\"company\":\"wpusdsttwvogv\",\"uri\":\"ejdcngqqmoakuf\"},\"id\":\"jzrwrdgrtw\",\"name\":\"enuuzkopbm\",\"type\":\"nrfdw\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"ziuiefozbhdm\",\"version\":\"l\",\"company\":\"qhoftrmaequiah\",\"uri\":\"cslfaoqzpiyylha\"},\"id\":\"swhccsphk\",\"name\":\"ivwitqscywugg\",\"type\":\"oluhczbwemh\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"rgzdwmsweyp\",\"version\":\"dxggicccnxqhuexm\",\"company\":\"tlstvlzywem\",\"uri\":\"rncsdtclu\"},\"id\":\"ypbsfgytguslfead\",\"name\":\"ygqukyhejh\",\"type\":\"isxgfp\"}],\"nextLink\":\"olppvksrpqvujz\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"vrwxkv\",\"version\":\"k\",\"company\":\"lqwjygvjayvblm\",\"uri\":\"k\"},\"id\":\"hbxvvyhgsopbyrqu\",\"name\":\"egxuvwzf\",\"type\":\"nhlmctlpdng\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"mhrixkwmyijejve\",\"version\":\"hbpnaixexccbd\",\"company\":\"ax\",\"uri\":\"exdrrvqahqkg\"},\"id\":\"pwijnhy\",\"name\":\"svfycxzbfv\",\"type\":\"owvrvmtgjqppyos\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"myhgfipnsxkmc\",\"version\":\"ekrrjr\",\"company\":\"fxtsgum\",\"uri\":\"glikkxwslolb\"},\"id\":\"vuzlm\",\"name\":\"felfktg\",\"type\":\"lcrpw\"}],\"nextLink\":\"eznoig\"}") .toObject(ScriptPackagesList.class); - Assertions.assertEquals("olppvksrpqvujz", model.nextLink()); + Assertions.assertEquals("eznoig", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptParameterTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptParameterTests.java index bc9ed825bf1a..366f6ef48fd3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptParameterTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptParameterTests.java @@ -12,8 +12,8 @@ public final class ScriptParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptParameter model = BinaryData.fromString( - "{\"type\":\"String\",\"name\":\"la\",\"description\":\"elwuipi\",\"visibility\":\"Visible\",\"optional\":\"Required\"}") + "{\"type\":\"Float\",\"name\":\"eqz\",\"description\":\"priolx\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}") .toObject(ScriptParameter.class); - Assertions.assertEquals("la", model.name()); + Assertions.assertEquals("eqz", model.name()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptSecureStringExecutionParameterTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptSecureStringExecutionParameterTests.java index 3c561b068b23..16b654993765 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptSecureStringExecutionParameterTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptSecureStringExecutionParameterTests.java @@ -11,19 +11,19 @@ public final class ScriptSecureStringExecutionParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScriptSecureStringExecutionParameter model = BinaryData - .fromString("{\"type\":\"SecureValue\",\"secureValue\":\"ouicybxarzgszu\",\"name\":\"oxciqopidoamcio\"}") - .toObject(ScriptSecureStringExecutionParameter.class); - Assertions.assertEquals("oxciqopidoamcio", model.name()); - Assertions.assertEquals("ouicybxarzgszu", model.secureValue()); + ScriptSecureStringExecutionParameter model + = BinaryData.fromString("{\"type\":\"SecureValue\",\"secureValue\":\"fq\",\"name\":\"tmtdhtmdvypgik\"}") + .toObject(ScriptSecureStringExecutionParameter.class); + Assertions.assertEquals("tmtdhtmdvypgik", model.name()); + Assertions.assertEquals("fq", model.secureValue()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScriptSecureStringExecutionParameter model - = new ScriptSecureStringExecutionParameter().withName("oxciqopidoamcio").withSecureValue("ouicybxarzgszu"); + = new ScriptSecureStringExecutionParameter().withName("tmtdhtmdvypgik").withSecureValue("fq"); model = BinaryData.fromObject(model).toObject(ScriptSecureStringExecutionParameter.class); - Assertions.assertEquals("oxciqopidoamcio", model.name()); - Assertions.assertEquals("ouicybxarzgszu", model.secureValue()); + Assertions.assertEquals("tmtdhtmdvypgik", model.name()); + Assertions.assertEquals("fq", model.secureValue()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptStringExecutionParameterTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptStringExecutionParameterTests.java index 8246a7edd4d1..c8aeb9d23f7a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptStringExecutionParameterTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptStringExecutionParameterTests.java @@ -12,18 +12,18 @@ public final class ScriptStringExecutionParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptStringExecutionParameter model - = BinaryData.fromString("{\"type\":\"Value\",\"value\":\"khazxkhnzbonlwn\",\"name\":\"oegokdwbwh\"}") + = BinaryData.fromString("{\"type\":\"Value\",\"value\":\"szywkbirryu\",\"name\":\"hlhkjoqrvqqaatj\"}") .toObject(ScriptStringExecutionParameter.class); - Assertions.assertEquals("oegokdwbwh", model.name()); - Assertions.assertEquals("khazxkhnzbonlwn", model.value()); + Assertions.assertEquals("hlhkjoqrvqqaatj", model.name()); + Assertions.assertEquals("szywkbirryu", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScriptStringExecutionParameter model - = new ScriptStringExecutionParameter().withName("oegokdwbwh").withValue("khazxkhnzbonlwn"); + = new ScriptStringExecutionParameter().withName("hlhkjoqrvqqaatj").withValue("szywkbirryu"); model = BinaryData.fromObject(model).toObject(ScriptStringExecutionParameter.class); - Assertions.assertEquals("oegokdwbwh", model.name()); - Assertions.assertEquals("khazxkhnzbonlwn", model.value()); + Assertions.assertEquals("hlhkjoqrvqqaatj", model.name()); + Assertions.assertEquals("szywkbirryu", model.value()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/TrialInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/TrialInnerTests.java index 5571628566a1..479b96ce3dd7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/TrialInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/TrialInnerTests.java @@ -10,7 +10,7 @@ public final class TrialInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TrialInner model = BinaryData.fromString("{\"status\":\"TrialDisabled\",\"availableHosts\":1059821653}") + TrialInner model = BinaryData.fromString("{\"status\":\"TrialUsed\",\"availableHosts\":284383009}") .toObject(TrialInner.class); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VcfLicenseInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VcfLicenseInnerTests.java new file mode 100644 index 000000000000..eb3f975a277b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VcfLicenseInnerTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.fluent.models.VcfLicenseInner; + +public final class VcfLicenseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VcfLicenseInner model = BinaryData.fromString("{\"kind\":\"VcfLicense\",\"provisioningState\":\"Failed\"}") + .toObject(VcfLicenseInner.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VcfLicenseInner model = new VcfLicenseInner(); + model = BinaryData.fromObject(model).toObject(VcfLicenseInner.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineInnerTests.java index 1f8ca0b08c87..09958a5a04c4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineInnerTests.java @@ -11,7 +11,7 @@ public final class VirtualMachineInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"fbshrnsvbuswd\",\"moRefId\":\"yybyc\",\"folderPath\":\"nvjsrtkfa\",\"restrictMovement\":\"Disabled\"},\"id\":\"qg\",\"name\":\"kyzirtxdyux\",\"type\":\"ejnt\"}") + "{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"vsiykzkdncjdxon\",\"moRefId\":\"oggculapz\",\"folderPath\":\"rpgogtqxep\",\"restrictMovement\":\"Enabled\"},\"id\":\"fuajly\",\"name\":\"tlvofq\",\"type\":\"hvfcibyfmow\"}") .toObject(VirtualMachineInner.class); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinePropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinePropertiesTests.java index df9b9c7b67e5..6eb41959610d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinePropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinePropertiesTests.java @@ -11,7 +11,7 @@ public final class VirtualMachinePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Canceled\",\"displayName\":\"gioilqu\",\"moRefId\":\"ydxtqm\",\"folderPath\":\"ox\",\"restrictMovement\":\"Disabled\"}") + "{\"provisioningState\":\"Succeeded\",\"displayName\":\"jpvd\",\"moRefId\":\"fzwiivwzjbhyz\",\"folderPath\":\"jrkambtrnegvmnv\",\"restrictMovement\":\"Disabled\"}") .toObject(VirtualMachineProperties.class); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineRestrictMovementTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineRestrictMovementTests.java index 38137b2b78de..ea199a37c62b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineRestrictMovementTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineRestrictMovementTests.java @@ -12,16 +12,16 @@ public final class VirtualMachineRestrictMovementTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualMachineRestrictMovement model = BinaryData.fromString("{\"restrictMovement\":\"Disabled\"}") + VirtualMachineRestrictMovement model = BinaryData.fromString("{\"restrictMovement\":\"Enabled\"}") .toObject(VirtualMachineRestrictMovement.class); - Assertions.assertEquals(VirtualMachineRestrictMovementState.DISABLED, model.restrictMovement()); + Assertions.assertEquals(VirtualMachineRestrictMovementState.ENABLED, model.restrictMovement()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachineRestrictMovement model - = new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.DISABLED); + = new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.ENABLED); model = BinaryData.fromObject(model).toObject(VirtualMachineRestrictMovement.class); - Assertions.assertEquals(VirtualMachineRestrictMovementState.DISABLED, model.restrictMovement()); + Assertions.assertEquals(VirtualMachineRestrictMovementState.ENABLED, model.restrictMovement()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetWithResponseMockTests.java index 39ce00f456dd..78086f0e2d46 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class VirtualMachinesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"r\",\"moRefId\":\"wzdqybxceakxcpts\",\"folderPath\":\"fyiaseqch\",\"restrictMovement\":\"Disabled\"},\"id\":\"zrazisgyk\",\"name\":\"uem\",\"type\":\"anbwzohmnrxxbso\"}"; + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"sykvwjtqpke\",\"moRefId\":\"yltjcrspxklu\",\"folderPath\":\"clf\",\"restrictMovement\":\"Disabled\"},\"id\":\"n\",\"name\":\"oytzpose\",\"type\":\"xigpxvkqmaupxvpi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VirtualMachine response = manager.virtualMachines() - .getWithResponse("cbq", "remj", "laqacigele", "hdbvqvwzkjop", com.azure.core.util.Context.NONE) + .getWithResponse("r", "vk", "oge", "labnsmjkwynq", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListMockTests.java index 31886de0fefe..e85bee5b8e19 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListMockTests.java @@ -21,7 +21,7 @@ public final class VirtualMachinesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"fbpcmsplb\",\"moRefId\":\"rueqthwm\",\"folderPath\":\"mbscbbx\",\"restrictMovement\":\"Disabled\"},\"id\":\"xiidloped\",\"name\":\"wdpyq\",\"type\":\"ybxubmdna\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"huxiqhzlraymez\",\"moRefId\":\"skihmxrfd\",\"folderPath\":\"jrednwyysh\",\"restrictMovement\":\"Enabled\"},\"id\":\"mevuafpwzy\",\"name\":\"frkgwltxeq\",\"type\":\"pxgzdyimsfayor\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<VirtualMachine> response - = manager.virtualMachines().list("lrrcz", "zkhhltnjadhqo", "wjqo", com.azure.core.util.Context.NONE); + = manager.virtualMachines().list("dpmiljpn", "ynudqllzsa", "zp", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListTests.java index 4e1c36bb52ac..142165001373 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListTests.java @@ -12,8 +12,8 @@ public final class VirtualMachinesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachinesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"ddhcratizzr\",\"moRefId\":\"asxifto\",\"folderPath\":\"yzhftwesgogczh\",\"restrictMovement\":\"Disabled\"},\"id\":\"krlgnyhm\",\"name\":\"ssxkkgthr\",\"type\":\"gh\"}],\"nextLink\":\"bdhqxvcxgf\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"yxccyb\",\"moRefId\":\"ayakkudzpx\",\"folderPath\":\"jplmagstcy\",\"restrictMovement\":\"Disabled\"},\"id\":\"kyrk\",\"name\":\"bdgiogsjk\",\"type\":\"nwqjnoba\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"viacegfnmntfpmv\",\"moRefId\":\"mfnczd\",\"folderPath\":\"vbalxlllc\",\"restrictMovement\":\"Disabled\"},\"id\":\"bzevwrd\",\"name\":\"hfuk\",\"type\":\"vsjcswsmystuluqy\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"er\",\"moRefId\":\"pqbmfpjbab\",\"folderPath\":\"dfc\",\"restrictMovement\":\"Disabled\"},\"id\":\"uunnoxyhkxgqdd\",\"name\":\"i\",\"type\":\"pfhoqcaaewdao\"}],\"nextLink\":\"jvlpjxxkzbr\"}") .toObject(VirtualMachinesList.class); - Assertions.assertEquals("bdhqxvcxgf", model.nextLink()); + Assertions.assertEquals("jvlpjxxkzbr", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmHostPlacementPolicyPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmHostPlacementPolicyPropertiesTests.java index 40e6556a421a..f76c22922857 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmHostPlacementPolicyPropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmHostPlacementPolicyPropertiesTests.java @@ -17,34 +17,34 @@ public final class VmHostPlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VmHostPlacementPolicyProperties model = BinaryData.fromString( - "{\"type\":\"VmHost\",\"vmMembers\":[\"qwalmuzyoxaepd\"],\"hostMembers\":[\"jancu\",\"rhdwbavxbniw\"],\"affinityType\":\"AntiAffinity\",\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\",\"state\":\"Disabled\",\"displayName\":\"pgn\",\"provisioningState\":\"Deleting\"}") + "{\"type\":\"VmHost\",\"vmMembers\":[\"lwptfdy\",\"pfqbuaceopzf\"],\"hostMembers\":[\"hhuao\",\"ppcqeqxolz\",\"ahzxctobgbk\",\"moizpos\"],\"affinityType\":\"Affinity\",\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"None\",\"state\":\"Disabled\",\"displayName\":\"rmfqjhhkxbpvj\",\"provisioningState\":\"Succeeded\"}") .toObject(VmHostPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("pgn", model.displayName()); - Assertions.assertEquals("qwalmuzyoxaepd", model.vmMembers().get(0)); - Assertions.assertEquals("jancu", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); + Assertions.assertEquals("rmfqjhhkxbpvj", model.displayName()); + Assertions.assertEquals("lwptfdy", model.vmMembers().get(0)); + Assertions.assertEquals("hhuao", model.hostMembers().get(0)); + Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); + Assertions.assertEquals(AzureHybridBenefitType.NONE, model.azureHybridBenefitType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VmHostPlacementPolicyProperties model = new VmHostPlacementPolicyProperties().withState(PlacementPolicyState.DISABLED) - .withDisplayName("pgn") - .withVmMembers(Arrays.asList("qwalmuzyoxaepd")) - .withHostMembers(Arrays.asList("jancu", "rhdwbavxbniw")) - .withAffinityType(AffinityType.ANTI_AFFINITY) + .withDisplayName("rmfqjhhkxbpvj") + .withVmMembers(Arrays.asList("lwptfdy", "pfqbuaceopzf")) + .withHostMembers(Arrays.asList("hhuao", "ppcqeqxolz", "ahzxctobgbk", "moizpos")) + .withAffinityType(AffinityType.AFFINITY) .withAffinityStrength(AffinityStrength.SHOULD) - .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); + .withAzureHybridBenefitType(AzureHybridBenefitType.NONE); model = BinaryData.fromObject(model).toObject(VmHostPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("pgn", model.displayName()); - Assertions.assertEquals("qwalmuzyoxaepd", model.vmMembers().get(0)); - Assertions.assertEquals("jancu", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); + Assertions.assertEquals("rmfqjhhkxbpvj", model.displayName()); + Assertions.assertEquals("lwptfdy", model.vmMembers().get(0)); + Assertions.assertEquals("hhuao", model.hostMembers().get(0)); + Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); + Assertions.assertEquals(AzureHybridBenefitType.NONE, model.azureHybridBenefitType()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.java index 4e091aa5d92b..bab5a7794ab8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.java @@ -15,24 +15,24 @@ public final class VmPlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VmPlacementPolicyProperties model = BinaryData.fromString( - "{\"type\":\"VmVm\",\"vmMembers\":[\"qlfktsths\",\"cocmnyyaztt\",\"twwrqp\",\"edckzywbiexzfey\"],\"affinityType\":\"Affinity\",\"state\":\"Disabled\",\"displayName\":\"bxu\",\"provisioningState\":\"Canceled\"}") + "{\"type\":\"VmVm\",\"vmMembers\":[\"xmedjvcsly\",\"qwwncw\"],\"affinityType\":\"AntiAffinity\",\"state\":\"Enabled\",\"displayName\":\"ktrmgucnapkt\",\"provisioningState\":\"Deleting\"}") .toObject(VmPlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("bxu", model.displayName()); - Assertions.assertEquals("qlfktsths", model.vmMembers().get(0)); - Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); + Assertions.assertEquals("ktrmgucnapkt", model.displayName()); + Assertions.assertEquals("xmedjvcsly", model.vmMembers().get(0)); + Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VmPlacementPolicyProperties model = new VmPlacementPolicyProperties().withState(PlacementPolicyState.DISABLED) - .withDisplayName("bxu") - .withVmMembers(Arrays.asList("qlfktsths", "cocmnyyaztt", "twwrqp", "edckzywbiexzfey")) - .withAffinityType(AffinityType.AFFINITY); + VmPlacementPolicyProperties model = new VmPlacementPolicyProperties().withState(PlacementPolicyState.ENABLED) + .withDisplayName("ktrmgucnapkt") + .withVmMembers(Arrays.asList("xmedjvcsly", "qwwncw")) + .withAffinityType(AffinityType.ANTI_AFFINITY); model = BinaryData.fromObject(model).toObject(VmPlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("bxu", model.displayName()); - Assertions.assertEquals("qlfktsths", model.vmMembers().get(0)); - Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); + Assertions.assertEquals("ktrmgucnapkt", model.displayName()); + Assertions.assertEquals("xmedjvcsly", model.vmMembers().get(0)); + Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpEntityTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpEntityTests.java index eadce07050ac..ab919062fb4b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpEntityTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpEntityTests.java @@ -12,18 +12,18 @@ public final class WorkloadNetworkDhcpEntityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpEntity model = BinaryData.fromString( - "{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"nrnrp\",\"segments\":[\"uwrykqgaifmvikl\",\"ydv\",\"hbejdznxcvdsrhnj\"],\"provisioningState\":\"Building\",\"revision\":8488959780262323}") + "{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"naeo\",\"segments\":[\"vhmgorffukis\",\"vwmzhwplefaxvxil\"],\"provisioningState\":\"Building\",\"revision\":701544859582497859}") .toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("nrnrp", model.displayName()); - Assertions.assertEquals(8488959780262323L, model.revision()); + Assertions.assertEquals("naeo", model.displayName()); + Assertions.assertEquals(701544859582497859L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkDhcpEntity model - = new WorkloadNetworkDhcpEntity().withDisplayName("nrnrp").withRevision(8488959780262323L); + = new WorkloadNetworkDhcpEntity().withDisplayName("naeo").withRevision(701544859582497859L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("nrnrp", model.displayName()); - Assertions.assertEquals(8488959780262323L, model.revision()); + Assertions.assertEquals("naeo", model.displayName()); + Assertions.assertEquals(701544859582497859L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpInnerTests.java index 24e5ba9a957e..45c628b7918c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpInnerTests.java @@ -13,18 +13,18 @@ public final class WorkloadNetworkDhcpInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpInner model = BinaryData.fromString( - "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"gdyftumrtwna\",\"segments\":[\"lbiw\"],\"provisioningState\":\"Succeeded\",\"revision\":5993525094166687580},\"id\":\"tsf\",\"name\":\"z\",\"type\":\"baeqphc\"}") + "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"ysuxmprafwgck\",\"segments\":[\"xvd\",\"ffwafq\",\"oudaspavehhrvk\",\"unzo\"],\"provisioningState\":\"Deleting\",\"revision\":5535477679816636437},\"id\":\"kmoyxcdyuibh\",\"name\":\"fdn\",\"type\":\"zydvfvf\"}") .toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("gdyftumrtwna", model.properties().displayName()); - Assertions.assertEquals(5993525094166687580L, model.properties().revision()); + Assertions.assertEquals("ysuxmprafwgck", model.properties().displayName()); + Assertions.assertEquals(5535477679816636437L, model.properties().revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkDhcpInner model = new WorkloadNetworkDhcpInner().withProperties( - new WorkloadNetworkDhcpEntity().withDisplayName("gdyftumrtwna").withRevision(5993525094166687580L)); + new WorkloadNetworkDhcpEntity().withDisplayName("ysuxmprafwgck").withRevision(5535477679816636437L)); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("gdyftumrtwna", model.properties().displayName()); - Assertions.assertEquals(5993525094166687580L, model.properties().revision()); + Assertions.assertEquals("ysuxmprafwgck", model.properties().displayName()); + Assertions.assertEquals(5535477679816636437L, model.properties().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListTests.java index 3fd10d86b1d6..abe7cb46ee0c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListTests.java @@ -12,10 +12,10 @@ public final class WorkloadNetworkDhcpListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"dshf\",\"segments\":[\"rbgyefry\"],\"provisioningState\":\"Succeeded\",\"revision\":8721260312586763684},\"id\":\"mwn\",\"name\":\"otmrfhir\",\"type\":\"tymoxoftp\"},{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"wycz\",\"segments\":[\"a\",\"pqjlihhyusps\"],\"provisioningState\":\"Canceled\",\"revision\":5972606310193139455},\"id\":\"fwdgzxulucvp\",\"name\":\"mrsreuzvxurisjnh\",\"type\":\"ytxifqjzgxmrh\"},{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"wp\",\"segments\":[\"utr\",\"jupauut\"],\"provisioningState\":\"Deleting\",\"revision\":6134480009559710202},\"id\":\"ejqgw\",\"name\":\"pnfqntcyp\",\"type\":\"xjvfoimwksl\"}],\"nextLink\":\"cizjxvydfceacvl\"}") + "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"cokpv\",\"segments\":[\"qtmldgxo\",\"firclnpkciayz\",\"iykhy\"],\"provisioningState\":\"Deleting\",\"revision\":2742500697219897698},\"id\":\"oxqvkjlmxhomdynh\",\"name\":\"wdigumbnraauz\",\"type\":\"p\"},{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"zysdzh\",\"segments\":[\"wva\",\"qyuvvfonkp\",\"hqyikvy\",\"auy\"],\"provisioningState\":\"Building\",\"revision\":3059262516431263157},\"id\":\"csttijfybvpoekr\",\"name\":\"gsgbdhuzq\",\"type\":\"njdgkynscliq\"},{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"h\",\"segments\":[\"omtkub\",\"tppn\",\"dxzxhi\"],\"provisioningState\":\"Updating\",\"revision\":107685473629648091},\"id\":\"vqagtltdhlf\",\"name\":\"qojpy\",\"type\":\"vgtrdcnifmzzs\"}],\"nextLink\":\"m\"}") .toObject(WorkloadNetworkDhcpList.class); - Assertions.assertEquals("dshf", model.value().get(0).properties().displayName()); - Assertions.assertEquals(8721260312586763684L, model.value().get(0).properties().revision()); - Assertions.assertEquals("cizjxvydfceacvl", model.nextLink()); + Assertions.assertEquals("cokpv", model.value().get(0).properties().displayName()); + Assertions.assertEquals(2742500697219897698L, model.value().get(0).properties().revision()); + Assertions.assertEquals("m", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpRelayTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpRelayTests.java index 446f1c24f1ab..9f1abdda59e2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpRelayTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpRelayTests.java @@ -13,21 +13,21 @@ public final class WorkloadNetworkDhcpRelayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpRelay model = BinaryData.fromString( - "{\"dhcpType\":\"RELAY\",\"serverAddresses\":[\"sv\",\"kjprvk\"],\"displayName\":\"fz\",\"segments\":[\"yxgtczh\",\"ydbsd\"],\"provisioningState\":\"Building\",\"revision\":1302874325023703707}") + "{\"dhcpType\":\"RELAY\",\"serverAddresses\":[\"cqwogfnzjvusfzl\",\"mozuxylfsb\",\"kadpysown\",\"tgkbugrjqctojc\"],\"displayName\":\"sofieypefojyqd\",\"segments\":[\"plcplcwkhi\"],\"provisioningState\":\"Succeeded\",\"revision\":6261882627949114734}") .toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("fz", model.displayName()); - Assertions.assertEquals(1302874325023703707L, model.revision()); - Assertions.assertEquals("sv", model.serverAddresses().get(0)); + Assertions.assertEquals("sofieypefojyqd", model.displayName()); + Assertions.assertEquals(6261882627949114734L, model.revision()); + Assertions.assertEquals("cqwogfnzjvusfzl", model.serverAddresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpRelay model = new WorkloadNetworkDhcpRelay().withDisplayName("fz") - .withRevision(1302874325023703707L) - .withServerAddresses(Arrays.asList("sv", "kjprvk")); + WorkloadNetworkDhcpRelay model = new WorkloadNetworkDhcpRelay().withDisplayName("sofieypefojyqd") + .withRevision(6261882627949114734L) + .withServerAddresses(Arrays.asList("cqwogfnzjvusfzl", "mozuxylfsb", "kadpysown", "tgkbugrjqctojc")); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("fz", model.displayName()); - Assertions.assertEquals(1302874325023703707L, model.revision()); - Assertions.assertEquals("sv", model.serverAddresses().get(0)); + Assertions.assertEquals("sofieypefojyqd", model.displayName()); + Assertions.assertEquals(6261882627949114734L, model.revision()); + Assertions.assertEquals("cqwogfnzjvusfzl", model.serverAddresses().get(0)); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpServerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpServerTests.java index 58280dbc16d0..041bac80efc9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpServerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpServerTests.java @@ -12,24 +12,24 @@ public final class WorkloadNetworkDhcpServerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpServer model = BinaryData.fromString( - "{\"dhcpType\":\"SERVER\",\"serverAddress\":\"ovqfzge\",\"leaseTime\":4588468813568796443,\"displayName\":\"uljltduceamtmcz\",\"segments\":[\"ejwcwwqiok\"],\"provisioningState\":\"Deleting\",\"revision\":6715076788595047640}") + "{\"dhcpType\":\"SERVER\",\"serverAddress\":\"zeyqxtjjfzqlqhyc\",\"leaseTime\":5723107305457726776,\"displayName\":\"gxdbeesmie\",\"segments\":[\"ra\",\"iaa\",\"iuagydwqfbylyrfg\"],\"provisioningState\":\"Succeeded\",\"revision\":8406838682358606000}") .toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("uljltduceamtmcz", model.displayName()); - Assertions.assertEquals(6715076788595047640L, model.revision()); - Assertions.assertEquals("ovqfzge", model.serverAddress()); - Assertions.assertEquals(4588468813568796443L, model.leaseTime()); + Assertions.assertEquals("gxdbeesmie", model.displayName()); + Assertions.assertEquals(8406838682358606000L, model.revision()); + Assertions.assertEquals("zeyqxtjjfzqlqhyc", model.serverAddress()); + Assertions.assertEquals(5723107305457726776L, model.leaseTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpServer model = new WorkloadNetworkDhcpServer().withDisplayName("uljltduceamtmcz") - .withRevision(6715076788595047640L) - .withServerAddress("ovqfzge") - .withLeaseTime(4588468813568796443L); + WorkloadNetworkDhcpServer model = new WorkloadNetworkDhcpServer().withDisplayName("gxdbeesmie") + .withRevision(8406838682358606000L) + .withServerAddress("zeyqxtjjfzqlqhyc") + .withLeaseTime(5723107305457726776L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("uljltduceamtmcz", model.displayName()); - Assertions.assertEquals(6715076788595047640L, model.revision()); - Assertions.assertEquals("ovqfzge", model.serverAddress()); - Assertions.assertEquals(4588468813568796443L, model.leaseTime()); + Assertions.assertEquals("gxdbeesmie", model.displayName()); + Assertions.assertEquals(8406838682358606000L, model.revision()); + Assertions.assertEquals("zeyqxtjjfzqlqhyc", model.serverAddress()); + Assertions.assertEquals(5723107305457726776L, model.leaseTime()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServiceInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServiceInnerTests.java index 62dc2fb3f49f..3a155e0c0c5d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServiceInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServiceInnerTests.java @@ -14,30 +14,30 @@ public final class WorkloadNetworkDnsServiceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsServiceInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"aufactkahzovajjz\",\"dnsServiceIp\":\"xxpshneeku\",\"defaultDnsZone\":\"gs\",\"fqdnZones\":[\"bkwdlenrds\",\"tujbazpju\"],\"logLevel\":\"FATAL\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":6751784121052191451},\"id\":\"wmd\",\"name\":\"vwpklvxwmygdxp\",\"type\":\"pqchiszep\"}") + "{\"properties\":{\"displayName\":\"a\",\"dnsServiceIp\":\"qusrdvetnws\",\"defaultDnsZone\":\"utnw\",\"fqdnZones\":[\"ycvuzhyrmewipmv\",\"k\",\"xukuqgsj\",\"xundxgk\"],\"logLevel\":\"FATAL\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":7918905716501947847},\"id\":\"mhv\",\"name\":\"muvgp\",\"type\":\"uneqsxvmhf\"}") .toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("aufactkahzovajjz", model.displayName()); - Assertions.assertEquals("xxpshneeku", model.dnsServiceIp()); - Assertions.assertEquals("gs", model.defaultDnsZone()); - Assertions.assertEquals("bkwdlenrds", model.fqdnZones().get(0)); + Assertions.assertEquals("a", model.displayName()); + Assertions.assertEquals("qusrdvetnws", model.dnsServiceIp()); + Assertions.assertEquals("utnw", model.defaultDnsZone()); + Assertions.assertEquals("ycvuzhyrmewipmv", model.fqdnZones().get(0)); Assertions.assertEquals(DnsServiceLogLevelEnum.FATAL, model.logLevel()); - Assertions.assertEquals(6751784121052191451L, model.revision()); + Assertions.assertEquals(7918905716501947847L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceInner model = new WorkloadNetworkDnsServiceInner().withDisplayName("aufactkahzovajjz") - .withDnsServiceIp("xxpshneeku") - .withDefaultDnsZone("gs") - .withFqdnZones(Arrays.asList("bkwdlenrds", "tujbazpju")) + WorkloadNetworkDnsServiceInner model = new WorkloadNetworkDnsServiceInner().withDisplayName("a") + .withDnsServiceIp("qusrdvetnws") + .withDefaultDnsZone("utnw") + .withFqdnZones(Arrays.asList("ycvuzhyrmewipmv", "k", "xukuqgsj", "xundxgk")) .withLogLevel(DnsServiceLogLevelEnum.FATAL) - .withRevision(6751784121052191451L); + .withRevision(7918905716501947847L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("aufactkahzovajjz", model.displayName()); - Assertions.assertEquals("xxpshneeku", model.dnsServiceIp()); - Assertions.assertEquals("gs", model.defaultDnsZone()); - Assertions.assertEquals("bkwdlenrds", model.fqdnZones().get(0)); + Assertions.assertEquals("a", model.displayName()); + Assertions.assertEquals("qusrdvetnws", model.dnsServiceIp()); + Assertions.assertEquals("utnw", model.defaultDnsZone()); + Assertions.assertEquals("ycvuzhyrmewipmv", model.fqdnZones().get(0)); Assertions.assertEquals(DnsServiceLogLevelEnum.FATAL, model.logLevel()); - Assertions.assertEquals(6751784121052191451L, model.revision()); + Assertions.assertEquals(7918905716501947847L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicePropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicePropertiesTests.java index a6702d55904f..bbacad76ed6d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicePropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicePropertiesTests.java @@ -14,31 +14,30 @@ public final class WorkloadNetworkDnsServicePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsServiceProperties model = BinaryData.fromString( - "{\"displayName\":\"bjcrxgibbdaxco\",\"dnsServiceIp\":\"ozauorsukokwb\",\"defaultDnsZone\":\"lhlv\",\"fqdnZones\":[\"epzl\",\"phwzsoldweyuqdu\"],\"logLevel\":\"DEBUG\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":8647949215017672842}") + "{\"displayName\":\"zjyi\",\"dnsServiceIp\":\"as\",\"defaultDnsZone\":\"udypohyuems\",\"fqdnZones\":[\"sqy\",\"pfoobr\",\"ttymsjny\",\"qdnfwqzdz\"],\"logLevel\":\"ERROR\",\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":8053892314386436082}") .toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("bjcrxgibbdaxco", model.displayName()); - Assertions.assertEquals("ozauorsukokwb", model.dnsServiceIp()); - Assertions.assertEquals("lhlv", model.defaultDnsZone()); - Assertions.assertEquals("epzl", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); - Assertions.assertEquals(8647949215017672842L, model.revision()); + Assertions.assertEquals("zjyi", model.displayName()); + Assertions.assertEquals("as", model.dnsServiceIp()); + Assertions.assertEquals("udypohyuems", model.defaultDnsZone()); + Assertions.assertEquals("sqy", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.logLevel()); + Assertions.assertEquals(8053892314386436082L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceProperties model - = new WorkloadNetworkDnsServiceProperties().withDisplayName("bjcrxgibbdaxco") - .withDnsServiceIp("ozauorsukokwb") - .withDefaultDnsZone("lhlv") - .withFqdnZones(Arrays.asList("epzl", "phwzsoldweyuqdu")) - .withLogLevel(DnsServiceLogLevelEnum.DEBUG) - .withRevision(8647949215017672842L); + WorkloadNetworkDnsServiceProperties model = new WorkloadNetworkDnsServiceProperties().withDisplayName("zjyi") + .withDnsServiceIp("as") + .withDefaultDnsZone("udypohyuems") + .withFqdnZones(Arrays.asList("sqy", "pfoobr", "ttymsjny", "qdnfwqzdz")) + .withLogLevel(DnsServiceLogLevelEnum.ERROR) + .withRevision(8053892314386436082L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("bjcrxgibbdaxco", model.displayName()); - Assertions.assertEquals("ozauorsukokwb", model.dnsServiceIp()); - Assertions.assertEquals("lhlv", model.defaultDnsZone()); - Assertions.assertEquals("epzl", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); - Assertions.assertEquals(8647949215017672842L, model.revision()); + Assertions.assertEquals("zjyi", model.displayName()); + Assertions.assertEquals("as", model.dnsServiceIp()); + Assertions.assertEquals("udypohyuems", model.defaultDnsZone()); + Assertions.assertEquals("sqy", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.logLevel()); + Assertions.assertEquals(8053892314386436082L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListTests.java index 96f74f661c71..0980a066ffff 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListTests.java @@ -13,14 +13,14 @@ public final class WorkloadNetworkDnsServicesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsServicesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"vbbxuripl\",\"dnsServiceIp\":\"n\",\"defaultDnsZone\":\"baxk\",\"fqdnZones\":[\"wrck\",\"yklyhpluodpvruud\"],\"logLevel\":\"ERROR\",\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":7394328985923656684},\"id\":\"ktst\",\"name\":\"dxeclzedqbcvh\",\"type\":\"lhpl\"},{\"properties\":{\"displayName\":\"kdl\",\"dnsServiceIp\":\"qfbumlkxtrqjf\",\"defaultDnsZone\":\"lmbtxhwgfwsrt\",\"fqdnZones\":[\"oezbrhubsk\",\"udygooo\",\"kqfqjbvl\"],\"logLevel\":\"DEBUG\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":70762031919814620},\"id\":\"zf\",\"name\":\"vyvnqqyb\",\"type\":\"ryeu\"},{\"properties\":{\"displayName\":\"kq\",\"dnsServiceIp\":\"qgzsles\",\"defaultDnsZone\":\"bhernntiew\",\"fqdnZones\":[\"vbquwr\"],\"logLevel\":\"DEBUG\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":6061341546772641943},\"id\":\"fkmr\",\"name\":\"emvvhm\",\"type\":\"tdrjfutacoebj\"}],\"nextLink\":\"wzcjznmwcpmgua\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"tzbsrgnowcjhf\",\"dnsServiceIp\":\"vecactx\",\"defaultDnsZone\":\"oteyowc\",\"fqdnZones\":[\"ovekqvgqouwi\",\"zmpjwyiv\",\"ikf\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":7252211802411651291},\"id\":\"grttikteusqczk\",\"name\":\"yklxubyjaffmmfbl\",\"type\":\"qcuubgqibrta\"},{\"properties\":{\"displayName\":\"tttwgdslqxih\",\"dnsServiceIp\":\"moo\",\"defaultDnsZone\":\"qseypxiutcxa\",\"fqdnZones\":[\"y\",\"petogebjox\",\"lhvnhlab\",\"q\"],\"logLevel\":\"FATAL\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":8388507251957303098},\"id\":\"aehvvibrxjjstoq\",\"name\":\"eitpkxztmo\",\"type\":\"bklftidgfcwqmpim\"},{\"properties\":{\"displayName\":\"zhe\",\"dnsServiceIp\":\"yhohujswtwkozzwc\",\"defaultDnsZone\":\"kb\",\"fqdnZones\":[\"fajnjwltlwtjjguk\",\"alhsnvkc\",\"mxzrpoa\",\"mlnwiaaomylweazu\"],\"logLevel\":\"WARNING\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":9180449749734561063},\"id\":\"hlf\",\"name\":\"swpchwahfbousn\",\"type\":\"epgfew\"},{\"properties\":{\"displayName\":\"l\",\"dnsServiceIp\":\"gncxykxhdj\",\"defaultDnsZone\":\"immbcx\",\"fqdnZones\":[\"cporxvxcjz\",\"qizxfpxtgqscjavf\",\"juhdqazkmtgguwpi\",\"r\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":4341647904100898943},\"id\":\"fiwrxgkn\",\"name\":\"uvyinzqodfvpgs\",\"type\":\"oxgsgbpfgzdjtx\"}],\"nextLink\":\"flbqvgaq\"}") .toObject(WorkloadNetworkDnsServicesList.class); - Assertions.assertEquals("vbbxuripl", model.value().get(0).displayName()); - Assertions.assertEquals("n", model.value().get(0).dnsServiceIp()); - Assertions.assertEquals("baxk", model.value().get(0).defaultDnsZone()); - Assertions.assertEquals("wrck", model.value().get(0).fqdnZones().get(0)); + Assertions.assertEquals("tzbsrgnowcjhf", model.value().get(0).displayName()); + Assertions.assertEquals("vecactx", model.value().get(0).dnsServiceIp()); + Assertions.assertEquals("oteyowc", model.value().get(0).defaultDnsZone()); + Assertions.assertEquals("ovekqvgqouwi", model.value().get(0).fqdnZones().get(0)); Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.value().get(0).logLevel()); - Assertions.assertEquals(7394328985923656684L, model.value().get(0).revision()); - Assertions.assertEquals("wzcjznmwcpmgua", model.nextLink()); + Assertions.assertEquals(7252211802411651291L, model.value().get(0).revision()); + Assertions.assertEquals("flbqvgaq", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneInnerTests.java index 40ac5736c1ad..d7819a4aca98 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneInnerTests.java @@ -13,30 +13,30 @@ public final class WorkloadNetworkDnsZoneInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsZoneInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"joxoism\",\"domain\":[\"bpimlqoljxkcgxxl\",\"sffgcvizqzd\"],\"dnsServerIps\":[\"w\",\"youpfgfbkj\"],\"sourceIp\":\"dyhgkfminsg\",\"dnsServices\":5465402510748989819,\"provisioningState\":\"Building\",\"revision\":295373443738405642},\"id\":\"tlahbq\",\"name\":\"ctxtgzukxi\",\"type\":\"mmqtgqqqxhr\"}") + "{\"properties\":{\"displayName\":\"idjks\",\"domain\":[\"yxvxevblbjed\",\"ljlageuaulxu\",\"smjbnkppxyn\",\"nlsvxeiz\"],\"dnsServerIps\":[\"klnsrmffey\",\"xcktpiymerteeamm\",\"qiekkkzddrt\"],\"sourceIp\":\"doj\",\"dnsServices\":2082724442990629363,\"provisioningState\":\"Succeeded\",\"revision\":8464578871437548472},\"id\":\"eesvecu\",\"name\":\"jpxtxsuwprtuj\",\"type\":\"sawddjibabxvi\"}") .toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("joxoism", model.displayName()); - Assertions.assertEquals("bpimlqoljxkcgxxl", model.domain().get(0)); - Assertions.assertEquals("w", model.dnsServerIps().get(0)); - Assertions.assertEquals("dyhgkfminsg", model.sourceIp()); - Assertions.assertEquals(5465402510748989819L, model.dnsServices()); - Assertions.assertEquals(295373443738405642L, model.revision()); + Assertions.assertEquals("idjks", model.displayName()); + Assertions.assertEquals("yxvxevblbjed", model.domain().get(0)); + Assertions.assertEquals("klnsrmffey", model.dnsServerIps().get(0)); + Assertions.assertEquals("doj", model.sourceIp()); + Assertions.assertEquals(2082724442990629363L, model.dnsServices()); + Assertions.assertEquals(8464578871437548472L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneInner model = new WorkloadNetworkDnsZoneInner().withDisplayName("joxoism") - .withDomain(Arrays.asList("bpimlqoljxkcgxxl", "sffgcvizqzd")) - .withDnsServerIps(Arrays.asList("w", "youpfgfbkj")) - .withSourceIp("dyhgkfminsg") - .withDnsServices(5465402510748989819L) - .withRevision(295373443738405642L); + WorkloadNetworkDnsZoneInner model = new WorkloadNetworkDnsZoneInner().withDisplayName("idjks") + .withDomain(Arrays.asList("yxvxevblbjed", "ljlageuaulxu", "smjbnkppxyn", "nlsvxeiz")) + .withDnsServerIps(Arrays.asList("klnsrmffey", "xcktpiymerteeamm", "qiekkkzddrt")) + .withSourceIp("doj") + .withDnsServices(2082724442990629363L) + .withRevision(8464578871437548472L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("joxoism", model.displayName()); - Assertions.assertEquals("bpimlqoljxkcgxxl", model.domain().get(0)); - Assertions.assertEquals("w", model.dnsServerIps().get(0)); - Assertions.assertEquals("dyhgkfminsg", model.sourceIp()); - Assertions.assertEquals(5465402510748989819L, model.dnsServices()); - Assertions.assertEquals(295373443738405642L, model.revision()); + Assertions.assertEquals("idjks", model.displayName()); + Assertions.assertEquals("yxvxevblbjed", model.domain().get(0)); + Assertions.assertEquals("klnsrmffey", model.dnsServerIps().get(0)); + Assertions.assertEquals("doj", model.sourceIp()); + Assertions.assertEquals(2082724442990629363L, model.dnsServices()); + Assertions.assertEquals(8464578871437548472L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonePropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonePropertiesTests.java index fa817841866d..9eb9d7b2a0fc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonePropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonePropertiesTests.java @@ -13,30 +13,31 @@ public final class WorkloadNetworkDnsZonePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsZoneProperties model = BinaryData.fromString( - "{\"displayName\":\"rxcpjuisavo\",\"domain\":[\"zfvazi\"],\"dnsServerIps\":[\"frqttbajlkatnw\"],\"sourceIp\":\"iopid\",\"dnsServices\":4942011391135790969,\"provisioningState\":\"Canceled\",\"revision\":488118096880825657}") + "{\"displayName\":\"tvtzeexavoxtfg\",\"domain\":[\"dmdqb\"],\"dnsServerIps\":[\"pqtgsfjac\"],\"sourceIp\":\"lhhxudbxvodhtnsi\",\"dnsServices\":3579473819283071102,\"provisioningState\":\"Failed\",\"revision\":1178624651848849936}") .toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("rxcpjuisavo", model.displayName()); - Assertions.assertEquals("zfvazi", model.domain().get(0)); - Assertions.assertEquals("frqttbajlkatnw", model.dnsServerIps().get(0)); - Assertions.assertEquals("iopid", model.sourceIp()); - Assertions.assertEquals(4942011391135790969L, model.dnsServices()); - Assertions.assertEquals(488118096880825657L, model.revision()); + Assertions.assertEquals("tvtzeexavoxtfg", model.displayName()); + Assertions.assertEquals("dmdqb", model.domain().get(0)); + Assertions.assertEquals("pqtgsfjac", model.dnsServerIps().get(0)); + Assertions.assertEquals("lhhxudbxvodhtnsi", model.sourceIp()); + Assertions.assertEquals(3579473819283071102L, model.dnsServices()); + Assertions.assertEquals(1178624651848849936L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneProperties model = new WorkloadNetworkDnsZoneProperties().withDisplayName("rxcpjuisavo") - .withDomain(Arrays.asList("zfvazi")) - .withDnsServerIps(Arrays.asList("frqttbajlkatnw")) - .withSourceIp("iopid") - .withDnsServices(4942011391135790969L) - .withRevision(488118096880825657L); + WorkloadNetworkDnsZoneProperties model + = new WorkloadNetworkDnsZoneProperties().withDisplayName("tvtzeexavoxtfg") + .withDomain(Arrays.asList("dmdqb")) + .withDnsServerIps(Arrays.asList("pqtgsfjac")) + .withSourceIp("lhhxudbxvodhtnsi") + .withDnsServices(3579473819283071102L) + .withRevision(1178624651848849936L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("rxcpjuisavo", model.displayName()); - Assertions.assertEquals("zfvazi", model.domain().get(0)); - Assertions.assertEquals("frqttbajlkatnw", model.dnsServerIps().get(0)); - Assertions.assertEquals("iopid", model.sourceIp()); - Assertions.assertEquals(4942011391135790969L, model.dnsServices()); - Assertions.assertEquals(488118096880825657L, model.revision()); + Assertions.assertEquals("tvtzeexavoxtfg", model.displayName()); + Assertions.assertEquals("dmdqb", model.domain().get(0)); + Assertions.assertEquals("pqtgsfjac", model.dnsServerIps().get(0)); + Assertions.assertEquals("lhhxudbxvodhtnsi", model.sourceIp()); + Assertions.assertEquals(3579473819283071102L, model.dnsServices()); + Assertions.assertEquals(1178624651848849936L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListTests.java index a44d231a8f25..9f2d5e334920 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListTests.java @@ -12,14 +12,14 @@ public final class WorkloadNetworkDnsZonesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsZonesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"talywjhhgdnhxms\",\"domain\":[\"omi\",\"ox\",\"gdufiqnd\"],\"dnsServerIps\":[\"zaofjchvcyy\",\"s\",\"gdotcubiipuipwo\",\"onmacjekniz\"],\"sourceIp\":\"qvci\",\"dnsServices\":1446313275004887164,\"provisioningState\":\"Building\",\"revision\":278724514924686542},\"id\":\"rilbywdx\",\"name\":\"miccwrwfscjfnyn\",\"type\":\"zqujizdvoqytiby\"}],\"nextLink\":\"bblgyavut\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"vi\",\"domain\":[\"wivkxo\",\"zunbixx\"],\"dnsServerIps\":[\"kvcpwpgclr\",\"ivtsoxfrkenxpm\"],\"sourceIp\":\"efrp\",\"dnsServices\":7054600289861372959,\"provisioningState\":\"Deleting\",\"revision\":1915674817878183369},\"id\":\"ao\",\"name\":\"vmm\",\"type\":\"npqfrtqlkzmeg\"},{\"properties\":{\"displayName\":\"gvkxlzyqdrfe\",\"domain\":[\"alzxwhcan\",\"ymo\",\"qhlwigdivbkbxgo\",\"fajuwas\"],\"dnsServerIps\":[\"aeyyg\",\"xakjsqzhzb\"],\"sourceIp\":\"kgimsidxasic\",\"dnsServices\":1821581039287836081,\"provisioningState\":\"Updating\",\"revision\":2308269052404267440},\"id\":\"mocwa\",\"name\":\"pqg\",\"type\":\"tjeaahhvjhh\"}],\"nextLink\":\"kzyb\"}") .toObject(WorkloadNetworkDnsZonesList.class); - Assertions.assertEquals("talywjhhgdnhxms", model.value().get(0).displayName()); - Assertions.assertEquals("omi", model.value().get(0).domain().get(0)); - Assertions.assertEquals("zaofjchvcyy", model.value().get(0).dnsServerIps().get(0)); - Assertions.assertEquals("qvci", model.value().get(0).sourceIp()); - Assertions.assertEquals(1446313275004887164L, model.value().get(0).dnsServices()); - Assertions.assertEquals(278724514924686542L, model.value().get(0).revision()); - Assertions.assertEquals("bblgyavut", model.nextLink()); + Assertions.assertEquals("vi", model.value().get(0).displayName()); + Assertions.assertEquals("wivkxo", model.value().get(0).domain().get(0)); + Assertions.assertEquals("kvcpwpgclr", model.value().get(0).dnsServerIps().get(0)); + Assertions.assertEquals("efrp", model.value().get(0).sourceIp()); + Assertions.assertEquals(7054600289861372959L, model.value().get(0).dnsServices()); + Assertions.assertEquals(1915674817878183369L, model.value().get(0).revision()); + Assertions.assertEquals("kzyb", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayInnerTests.java index afa06374c6a1..a93325e44a65 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayInnerTests.java @@ -12,8 +12,8 @@ public final class WorkloadNetworkGatewayInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkGatewayInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"mag\",\"path\":\"cyohpfkyrkdbd\"},\"id\":\"ogsjkmnwqjno\",\"name\":\"aiy\",\"type\":\"ddviacegfnmntfpm\"}") + "{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"wmbtmvpdvjdhtt\",\"path\":\"efedxihchrphkm\"},\"id\":\"jdqnsdfzpbgt\",\"name\":\"kylkdghrj\",\"type\":\"uutlwxezwzhok\"}") .toObject(WorkloadNetworkGatewayInner.class); - Assertions.assertEquals("mag", model.displayName()); + Assertions.assertEquals("wmbtmvpdvjdhtt", model.displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListTests.java index 3bf7089117a3..8a693a7a3916 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListTests.java @@ -12,9 +12,9 @@ public final class WorkloadNetworkGatewayListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkGatewayList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"igovi\",\"path\":\"xk\"},\"id\":\"loazuruocbgoo\",\"name\":\"bteoybf\",\"type\":\"jxakv\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"ordilmywwtkgkxny\",\"path\":\"abgyvudt\"},\"id\":\"ewbcihxuuw\",\"name\":\"c\",\"type\":\"yxccyb\"}],\"nextLink\":\"ayakkudzpx\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"agzrcxfa\",\"path\":\"cfxwmdbox\"},\"id\":\"gsftufqobrjlnacg\",\"name\":\"ckknhxkizvy\",\"type\":\"nrzvuljraaer\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"gukkjqnvbroy\",\"path\":\"xxulcdi\"},\"id\":\"osfjbjsv\",\"name\":\"jrwhryvy\",\"type\":\"ytdc\"}],\"nextLink\":\"gc\"}") .toObject(WorkloadNetworkGatewayList.class); - Assertions.assertEquals("igovi", model.value().get(0).displayName()); - Assertions.assertEquals("ayakkudzpx", model.nextLink()); + Assertions.assertEquals("agzrcxfa", model.value().get(0).displayName()); + Assertions.assertEquals("gc", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayPropertiesTests.java index 34bbfa3f7187..e209a24e1e4b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayPropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayPropertiesTests.java @@ -11,10 +11,9 @@ public final class WorkloadNetworkGatewayPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkGatewayProperties model = BinaryData - .fromString( - "{\"provisioningState\":\"Succeeded\",\"displayName\":\"fnczdwvvbalx\",\"path\":\"lchpodbzevwrdn\"}") - .toObject(WorkloadNetworkGatewayProperties.class); - Assertions.assertEquals("fnczdwvvbalx", model.displayName()); + WorkloadNetworkGatewayProperties model + = BinaryData.fromString("{\"provisioningState\":\"Updating\",\"displayName\":\"hh\",\"path\":\"lgehg\"}") + .toObject(WorkloadNetworkGatewayProperties.class); + Assertions.assertEquals("hh", model.displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkInnerTests.java index f53bfa6399cd..e10de985cece 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkInnerTests.java @@ -11,7 +11,7 @@ public final class WorkloadNetworkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Building\"},\"id\":\"omtbghhavgrvkff\",\"name\":\"vjzhpjbib\",\"type\":\"jmfxumvf\"}") + "{\"properties\":{\"provisioningState\":\"Building\"},\"id\":\"astjbkkdmflvestm\",\"name\":\"lx\",\"type\":\"ril\"}") .toObject(WorkloadNetworkInner.class); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListTests.java index 63268095d0df..491b614b5648 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListTests.java @@ -12,8 +12,8 @@ public final class WorkloadNetworkListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\"},\"id\":\"nbkfezzxscy\",\"name\":\"wzdgirujbzbo\",\"type\":\"vzzbtdcq\"}],\"nextLink\":\"niyujv\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"hpxlktwkuziycs\",\"name\":\"evufuztck\",\"type\":\"yhjtqedcgzu\"},{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"qzz\",\"name\":\"rjvpglydzgkrvqee\",\"type\":\"toepryu\"},{\"properties\":{\"provisioningState\":\"Deleting\"},\"id\":\"pzdm\",\"name\":\"vzvfvaawzqadfl\",\"type\":\"z\"}],\"nextLink\":\"iglaecx\"}") .toObject(WorkloadNetworkList.class); - Assertions.assertEquals("niyujv", model.nextLink()); + Assertions.assertEquals("iglaecx", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringInnerTests.java index f8d563a39fd3..cd096958426f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringInnerTests.java @@ -13,27 +13,27 @@ public final class WorkloadNetworkPortMirroringInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPortMirroringInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"eevt\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"yutnwytpzdmov\",\"destination\":\"fvaawzqa\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":7852954459694355571},\"id\":\"laecxndticok\",\"name\":\"vzm\",\"type\":\"qtmldgxo\"}") + "{\"properties\":{\"displayName\":\"eecjmeis\",\"direction\":\"INGRESS\",\"source\":\"asylwx\",\"destination\":\"aumweoohguufu\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":7106208390089131994},\"id\":\"tzolbaemwmdxmeb\",\"name\":\"jscjpahl\",\"type\":\"veabfqxnmwmqtib\"}") .toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("eevt", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); - Assertions.assertEquals("yutnwytpzdmov", model.source()); - Assertions.assertEquals("fvaawzqa", model.destination()); - Assertions.assertEquals(7852954459694355571L, model.revision()); + Assertions.assertEquals("eecjmeis", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); + Assertions.assertEquals("asylwx", model.source()); + Assertions.assertEquals("aumweoohguufu", model.destination()); + Assertions.assertEquals(7106208390089131994L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPortMirroringInner model = new WorkloadNetworkPortMirroringInner().withDisplayName("eevt") - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("yutnwytpzdmov") - .withDestination("fvaawzqa") - .withRevision(7852954459694355571L); + WorkloadNetworkPortMirroringInner model = new WorkloadNetworkPortMirroringInner().withDisplayName("eecjmeis") + .withDirection(PortMirroringDirectionEnum.INGRESS) + .withSource("asylwx") + .withDestination("aumweoohguufu") + .withRevision(7106208390089131994L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("eevt", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); - Assertions.assertEquals("yutnwytpzdmov", model.source()); - Assertions.assertEquals("fvaawzqa", model.destination()); - Assertions.assertEquals(7852954459694355571L, model.revision()); + Assertions.assertEquals("eecjmeis", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); + Assertions.assertEquals("asylwx", model.source()); + Assertions.assertEquals("aumweoohguufu", model.destination()); + Assertions.assertEquals(7106208390089131994L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListTests.java index d4916525a19e..e76bb05361d2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListTests.java @@ -13,13 +13,13 @@ public final class WorkloadNetworkPortMirroringListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPortMirroringList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"uvsj\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"myst\",\"destination\":\"uqypfcvle\",\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":9009611952751182933},\"id\":\"jbabwidf\",\"name\":\"xsspuunnoxyhk\",\"type\":\"g\"},{\"properties\":{\"displayName\":\"rihpfhoq\",\"direction\":\"EGRESS\",\"source\":\"wdaomdjvlpjxxkzb\",\"destination\":\"sgeivsiy\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":5725396811649484374},\"id\":\"onbzoggculapzwy\",\"name\":\"pgogtqxepny\",\"type\":\"b\"},{\"properties\":{\"displayName\":\"jlyjtlvofq\",\"direction\":\"EGRESS\",\"source\":\"cib\",\"destination\":\"mowuxrk\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":5188181400019760142},\"id\":\"iivwzjbhyzsxjrka\",\"name\":\"btrnegvm\",\"type\":\"vuqeqvldspast\"},{\"properties\":{\"displayName\":\"kdmflvestmjlx\",\"direction\":\"EGRESS\",\"source\":\"ozapeew\",\"destination\":\"pxlktwkuziycsl\",\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":8005330080335789430},\"id\":\"tyh\",\"name\":\"tqedcgzulwm\",\"type\":\"rqzz\"}],\"nextLink\":\"jvpglydzgk\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"ifhpf\",\"direction\":\"EGRESS\",\"source\":\"vgcxtx\",\"destination\":\"sheafid\",\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":9216614435431791768},\"id\":\"kssjhoiftxfk\",\"name\":\"wegprh\",\"type\":\"tillucbiqtg\"},{\"properties\":{\"displayName\":\"hm\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"drizetpwbr\",\"destination\":\"llibphbqzmizak\",\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":907050390570708707},\"id\":\"jzhajoy\",\"name\":\"hjlmu\",\"type\":\"y\"}],\"nextLink\":\"rimrs\"}") .toObject(WorkloadNetworkPortMirroringList.class); - Assertions.assertEquals("uvsj", model.value().get(0).displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.value().get(0).direction()); - Assertions.assertEquals("myst", model.value().get(0).source()); - Assertions.assertEquals("uqypfcvle", model.value().get(0).destination()); - Assertions.assertEquals(9009611952751182933L, model.value().get(0).revision()); - Assertions.assertEquals("jvpglydzgk", model.nextLink()); + Assertions.assertEquals("ifhpf", model.value().get(0).displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.value().get(0).direction()); + Assertions.assertEquals("vgcxtx", model.value().get(0).source()); + Assertions.assertEquals("sheafid", model.value().get(0).destination()); + Assertions.assertEquals(9216614435431791768L, model.value().get(0).revision()); + Assertions.assertEquals("rimrs", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringPropertiesTests.java index 8c2cda572f52..33fa59f3184b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringPropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringPropertiesTests.java @@ -13,28 +13,28 @@ public final class WorkloadNetworkPortMirroringPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPortMirroringProperties model = BinaryData.fromString( - "{\"displayName\":\"irclnpk\",\"direction\":\"INGRESS\",\"source\":\"zriykhy\",\"destination\":\"fvjlboxqvkjlmx\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":4799001926686463662}") + "{\"displayName\":\"ijddtvqc\",\"direction\":\"INGRESS\",\"source\":\"ijaeukm\",\"destination\":\"ieekpndzaa\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":3142659872258126549}") .toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("irclnpk", model.displayName()); + Assertions.assertEquals("ijddtvqc", model.displayName()); Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); - Assertions.assertEquals("zriykhy", model.source()); - Assertions.assertEquals("fvjlboxqvkjlmx", model.destination()); - Assertions.assertEquals(4799001926686463662L, model.revision()); + Assertions.assertEquals("ijaeukm", model.source()); + Assertions.assertEquals("ieekpndzaa", model.destination()); + Assertions.assertEquals(3142659872258126549L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkPortMirroringProperties model - = new WorkloadNetworkPortMirroringProperties().withDisplayName("irclnpk") + = new WorkloadNetworkPortMirroringProperties().withDisplayName("ijddtvqc") .withDirection(PortMirroringDirectionEnum.INGRESS) - .withSource("zriykhy") - .withDestination("fvjlboxqvkjlmx") - .withRevision(4799001926686463662L); + .withSource("ijaeukm") + .withDestination("ieekpndzaa") + .withRevision(3142659872258126549L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("irclnpk", model.displayName()); + Assertions.assertEquals("ijddtvqc", model.displayName()); Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); - Assertions.assertEquals("zriykhy", model.source()); - Assertions.assertEquals("fvjlboxqvkjlmx", model.destination()); - Assertions.assertEquals(4799001926686463662L, model.revision()); + Assertions.assertEquals("ijaeukm", model.source()); + Assertions.assertEquals("ieekpndzaa", model.destination()); + Assertions.assertEquals(3142659872258126549L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPropertiesTests.java index fdc0657c8fc8..11fe5aeac21c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPropertiesTests.java @@ -11,6 +11,6 @@ public final class WorkloadNetworkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkProperties model - = BinaryData.fromString("{\"provisioningState\":\"Building\"}").toObject(WorkloadNetworkProperties.class); + = BinaryData.fromString("{\"provisioningState\":\"Failed\"}").toObject(WorkloadNetworkProperties.class); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java index 0fa2d9cdedda..8fafd3be2309 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java @@ -12,10 +12,10 @@ public final class WorkloadNetworkPublicIPsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPublicIPsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"gumbnraauzzptja\",\"numberOfPublicIPs\":8740215687103788004,\"publicIPBlock\":\"hezwwvaiq\",\"provisioningState\":\"Succeeded\"},\"id\":\"fonkphhqyikvyla\",\"name\":\"yavluwmncstt\",\"type\":\"jfybvpoekrsgsgb\"},{\"properties\":{\"displayName\":\"zq\",\"numberOfPublicIPs\":180191019060757346,\"publicIPBlock\":\"kynscliqhzv\",\"provisioningState\":\"Building\"},\"id\":\"omtkub\",\"name\":\"tppn\",\"type\":\"dxzxhi\"},{\"properties\":{\"displayName\":\"bbc\",\"numberOfPublicIPs\":4254083119054920341,\"publicIPBlock\":\"tltdhlfkqojpy\",\"provisioningState\":\"Failed\"},\"id\":\"rdcnifmzzsdy\",\"name\":\"brn\",\"type\":\"suxmpraf\"},{\"properties\":{\"displayName\":\"khocxvdfffwaf\",\"numberOfPublicIPs\":6387884336317921780,\"publicIPBlock\":\"aspavehhr\",\"provisioningState\":\"Canceled\"},\"id\":\"n\",\"name\":\"oz\",\"type\":\"dhcxgkmoy\"}],\"nextLink\":\"dyuib\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"pibudqwyxebeybpm\",\"numberOfPublicIPs\":49496790728655586,\"publicIPBlock\":\"ff\",\"provisioningState\":\"Canceled\"},\"id\":\"tmhheioqa\",\"name\":\"hvseufuqyrx\",\"type\":\"dlcgqlsismjqfr\"}],\"nextLink\":\"gamquhiosrsjui\"}") .toObject(WorkloadNetworkPublicIPsList.class); - Assertions.assertEquals("gumbnraauzzptja", model.value().get(0).displayName()); - Assertions.assertEquals(8740215687103788004L, model.value().get(0).numberOfPublicIPs()); - Assertions.assertEquals("dyuib", model.nextLink()); + Assertions.assertEquals("pibudqwyxebeybpm", model.value().get(0).displayName()); + Assertions.assertEquals(49496790728655586L, model.value().get(0).numberOfPublicIPs()); + Assertions.assertEquals("gamquhiosrsjui", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpInnerTests.java index 9e5ecc921ede..12f7029e172e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpInnerTests.java @@ -12,18 +12,18 @@ public final class WorkloadNetworkPublicIpInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPublicIpInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"dnbzydvfvfcjn\",\"numberOfPublicIPs\":4632765238458680948,\"publicIPBlock\":\"rvhmgor\",\"provisioningState\":\"Failed\"},\"id\":\"is\",\"name\":\"vwmzhwplefaxvxil\",\"type\":\"btgn\"}") + "{\"properties\":{\"displayName\":\"disyirnxz\",\"numberOfPublicIPs\":2819045386420549654,\"publicIPBlock\":\"rxzbujr\",\"provisioningState\":\"Updating\"},\"id\":\"vwrevkhgnlnzon\",\"name\":\"lrpiqywnc\",\"type\":\"jtszcof\"}") .toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("dnbzydvfvfcjn", model.displayName()); - Assertions.assertEquals(4632765238458680948L, model.numberOfPublicIPs()); + Assertions.assertEquals("disyirnxz", model.displayName()); + Assertions.assertEquals(2819045386420549654L, model.numberOfPublicIPs()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPublicIpInner model = new WorkloadNetworkPublicIpInner().withDisplayName("dnbzydvfvfcjn") - .withNumberOfPublicIPs(4632765238458680948L); + WorkloadNetworkPublicIpInner model = new WorkloadNetworkPublicIpInner().withDisplayName("disyirnxz") + .withNumberOfPublicIPs(2819045386420549654L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("dnbzydvfvfcjn", model.displayName()); - Assertions.assertEquals(4632765238458680948L, model.numberOfPublicIPs()); + Assertions.assertEquals("disyirnxz", model.displayName()); + Assertions.assertEquals(2819045386420549654L, model.numberOfPublicIPs()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpPropertiesTests.java index 3ea86a8e284b..fa15778bfc95 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpPropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpPropertiesTests.java @@ -12,19 +12,18 @@ public final class WorkloadNetworkPublicIpPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPublicIpProperties model = BinaryData.fromString( - "{\"displayName\":\"zeyqxtjjfzqlqhyc\",\"numberOfPublicIPs\":5723107305457726776,\"publicIPBlock\":\"gxdbeesmie\",\"provisioningState\":\"Updating\"}") + "{\"displayName\":\"e\",\"numberOfPublicIPs\":792315679479695703,\"publicIPBlock\":\"bjkvreljeamu\",\"provisioningState\":\"Updating\"}") .toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("zeyqxtjjfzqlqhyc", model.displayName()); - Assertions.assertEquals(5723107305457726776L, model.numberOfPublicIPs()); + Assertions.assertEquals("e", model.displayName()); + Assertions.assertEquals(792315679479695703L, model.numberOfPublicIPs()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkPublicIpProperties model - = new WorkloadNetworkPublicIpProperties().withDisplayName("zeyqxtjjfzqlqhyc") - .withNumberOfPublicIPs(5723107305457726776L); + = new WorkloadNetworkPublicIpProperties().withDisplayName("e").withNumberOfPublicIPs(792315679479695703L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("zeyqxtjjfzqlqhyc", model.displayName()); - Assertions.assertEquals(5723107305457726776L, model.numberOfPublicIPs()); + Assertions.assertEquals("e", model.displayName()); + Assertions.assertEquals(792315679479695703L, model.numberOfPublicIPs()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentInnerTests.java index 4e89500e942b..6ec21d0590d8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentInnerTests.java @@ -14,28 +14,27 @@ public final class WorkloadNetworkSegmentInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"f\",\"connectedGateway\":\"vhrfsphuagrt\",\"subnet\":{\"dhcpRanges\":[\"eusqczkvyklxu\",\"yja\",\"fmmfblcqcu\",\"bgq\"],\"gatewayAddress\":\"rtalmet\"},\"portVif\":[{\"portName\":\"dslqxihhrmooizqs\"},{\"portName\":\"pxiutc\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":5661325828511806950},\"id\":\"togebjoxsl\",\"name\":\"vnh\",\"type\":\"abrqnkkzj\"}") + "{\"properties\":{\"displayName\":\"prot\",\"connectedGateway\":\"pundmbxhug\",\"subnet\":{\"dhcpRanges\":[\"avlg\"],\"gatewayAddress\":\"bmftpmdt\"},\"portVif\":[{\"portName\":\"tfvnz\"},{\"portName\":\"jtotpvopvpbd\"},{\"portName\":\"qgqqihedsvqwthmk\"},{\"portName\":\"bcysih\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":5483811337729194379},\"id\":\"sdtmcdzs\",\"name\":\"fcohdxbzlmcmu\",\"type\":\"pcvhdbevwqqxeys\"}") .toObject(WorkloadNetworkSegmentInner.class); - Assertions.assertEquals("f", model.displayName()); - Assertions.assertEquals("vhrfsphuagrt", model.connectedGateway()); - Assertions.assertEquals("eusqczkvyklxu", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("rtalmet", model.subnet().gatewayAddress()); - Assertions.assertEquals(5661325828511806950L, model.revision()); + Assertions.assertEquals("prot", model.displayName()); + Assertions.assertEquals("pundmbxhug", model.connectedGateway()); + Assertions.assertEquals("avlg", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("bmftpmdt", model.subnet().gatewayAddress()); + Assertions.assertEquals(5483811337729194379L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkSegmentInner model = new WorkloadNetworkSegmentInner().withDisplayName("f") - .withConnectedGateway("vhrfsphuagrt") - .withSubnet(new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("eusqczkvyklxu", "yja", "fmmfblcqcu", "bgq")) - .withGatewayAddress("rtalmet")) - .withRevision(5661325828511806950L); + WorkloadNetworkSegmentInner model = new WorkloadNetworkSegmentInner().withDisplayName("prot") + .withConnectedGateway("pundmbxhug") + .withSubnet( + new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("avlg")).withGatewayAddress("bmftpmdt")) + .withRevision(5483811337729194379L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentInner.class); - Assertions.assertEquals("f", model.displayName()); - Assertions.assertEquals("vhrfsphuagrt", model.connectedGateway()); - Assertions.assertEquals("eusqczkvyklxu", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("rtalmet", model.subnet().gatewayAddress()); - Assertions.assertEquals(5661325828511806950L, model.revision()); + Assertions.assertEquals("prot", model.displayName()); + Assertions.assertEquals("pundmbxhug", model.connectedGateway()); + Assertions.assertEquals("avlg", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("bmftpmdt", model.subnet().gatewayAddress()); + Assertions.assertEquals(5483811337729194379L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentPortVifTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentPortVifTests.java index 176fd54fd3e0..3d875830df8b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentPortVifTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentPortVifTests.java @@ -12,7 +12,7 @@ public final class WorkloadNetworkSegmentPortVifTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentPortVif model - = BinaryData.fromString("{\"portName\":\"wwnpj\"}").toObject(WorkloadNetworkSegmentPortVif.class); - Assertions.assertEquals("wwnpj", model.portName()); + = BinaryData.fromString("{\"portName\":\"ostzelndlatu\"}").toObject(WorkloadNetworkSegmentPortVif.class); + Assertions.assertEquals("ostzelndlatu", model.portName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentPropertiesTests.java index 33920675adb8..e321ce004943 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentPropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentPropertiesTests.java @@ -14,27 +14,28 @@ public final class WorkloadNetworkSegmentPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentProperties model = BinaryData.fromString( - "{\"displayName\":\"b\",\"connectedGateway\":\"gaehvvibrxjjst\",\"subnet\":{\"dhcpRanges\":[\"it\",\"kxzt\",\"oobklftidgfcwq\"],\"gatewayAddress\":\"imaq\"},\"portVif\":[{\"portName\":\"mjyhohujswtwko\"},{\"portName\":\"wculkbaw\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":7836663070897979568}") + "{\"displayName\":\"nqzi\",\"connectedGateway\":\"fkbg\",\"subnet\":{\"dhcpRanges\":[\"wxeqocljmygvkzqk\",\"jeokbzefezrxccz\",\"rtle\"],\"gatewayAddress\":\"q\"},\"portVif\":[{\"portName\":\"vz\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":8865201443625196451}") .toObject(WorkloadNetworkSegmentProperties.class); - Assertions.assertEquals("b", model.displayName()); - Assertions.assertEquals("gaehvvibrxjjst", model.connectedGateway()); - Assertions.assertEquals("it", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("imaq", model.subnet().gatewayAddress()); - Assertions.assertEquals(7836663070897979568L, model.revision()); + Assertions.assertEquals("nqzi", model.displayName()); + Assertions.assertEquals("fkbg", model.connectedGateway()); + Assertions.assertEquals("wxeqocljmygvkzqk", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("q", model.subnet().gatewayAddress()); + Assertions.assertEquals(8865201443625196451L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkSegmentProperties model = new WorkloadNetworkSegmentProperties().withDisplayName("b") - .withConnectedGateway("gaehvvibrxjjst") - .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("it", "kxzt", "oobklftidgfcwq")) - .withGatewayAddress("imaq")) - .withRevision(7836663070897979568L); + WorkloadNetworkSegmentProperties model = new WorkloadNetworkSegmentProperties().withDisplayName("nqzi") + .withConnectedGateway("fkbg") + .withSubnet(new WorkloadNetworkSegmentSubnet() + .withDhcpRanges(Arrays.asList("wxeqocljmygvkzqk", "jeokbzefezrxccz", "rtle")) + .withGatewayAddress("q")) + .withRevision(8865201443625196451L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentProperties.class); - Assertions.assertEquals("b", model.displayName()); - Assertions.assertEquals("gaehvvibrxjjst", model.connectedGateway()); - Assertions.assertEquals("it", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("imaq", model.subnet().gatewayAddress()); - Assertions.assertEquals(7836663070897979568L, model.revision()); + Assertions.assertEquals("nqzi", model.displayName()); + Assertions.assertEquals("fkbg", model.connectedGateway()); + Assertions.assertEquals("wxeqocljmygvkzqk", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("q", model.subnet().gatewayAddress()); + Assertions.assertEquals(8865201443625196451L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentSubnetTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentSubnetTests.java index b341d0bcda37..5faf4f5019d0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentSubnetTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentSubnetTests.java @@ -12,21 +12,20 @@ public final class WorkloadNetworkSegmentSubnetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkSegmentSubnet model = BinaryData - .fromString( - "{\"dhcpRanges\":[\"wtjjguktalhsnv\",\"cdmxzrpoaiml\",\"wiaaomylweaz\"],\"gatewayAddress\":\"cse\"}") - .toObject(WorkloadNetworkSegmentSubnet.class); - Assertions.assertEquals("wtjjguktalhsnv", model.dhcpRanges().get(0)); - Assertions.assertEquals("cse", model.gatewayAddress()); + WorkloadNetworkSegmentSubnet model + = BinaryData.fromString("{\"dhcpRanges\":[\"xzmqpnodawop\"],\"gatewayAddress\":\"ewjptmcg\"}") + .toObject(WorkloadNetworkSegmentSubnet.class); + Assertions.assertEquals("xzmqpnodawop", model.dhcpRanges().get(0)); + Assertions.assertEquals("ewjptmcg", model.gatewayAddress()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkSegmentSubnet model = new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("wtjjguktalhsnv", "cdmxzrpoaiml", "wiaaomylweaz")) - .withGatewayAddress("cse"); + WorkloadNetworkSegmentSubnet model + = new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("xzmqpnodawop")) + .withGatewayAddress("ewjptmcg"); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentSubnet.class); - Assertions.assertEquals("wtjjguktalhsnv", model.dhcpRanges().get(0)); - Assertions.assertEquals("cse", model.gatewayAddress()); + Assertions.assertEquals("xzmqpnodawop", model.dhcpRanges().get(0)); + Assertions.assertEquals("ewjptmcg", model.gatewayAddress()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListTests.java index f8ce389736a1..5a73383440ff 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListTests.java @@ -12,13 +12,13 @@ public final class WorkloadNetworkSegmentsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"iaa\",\"connectedGateway\":\"uagydwqfbylyrf\",\"subnet\":{\"dhcpRanges\":[\"tcojocqwo\",\"fnzjvusfzldm\",\"zuxylfsbtkadpyso\"],\"gatewayAddress\":\"btgkbugrjqctoj\"},\"portVif\":[{\"portName\":\"of\"},{\"portName\":\"ypefojyqdhcupl\"},{\"portName\":\"lcwkhihihlhz\"},{\"portName\":\"qtz\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":8583061153642738552},\"id\":\"hfgmvecactxm\",\"name\":\"oteyowc\",\"type\":\"uqovekqvgqouwif\"}],\"nextLink\":\"pjwyiv\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"vuanashcxlp\",\"connectedGateway\":\"erbdk\",\"subnet\":{\"dhcpRanges\":[\"di\",\"ozsdbccxj\",\"on\",\"dgnwncypuuwwlt\"],\"gatewayAddress\":\"qjctzenkeif\"},\"portVif\":[{\"portName\":\"kdasvflyhbxcudch\"},{\"portName\":\"srboldforobw\"},{\"portName\":\"vizbfhfo\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":5798870877718562622},\"id\":\"odxeszabbela\",\"name\":\"umuaslzkwrrwoycq\",\"type\":\"cwyhahno\"},{\"properties\":{\"displayName\":\"kywuhpsvfuu\",\"connectedGateway\":\"tlwexxwlalniexz\",\"subnet\":{\"dhcpRanges\":[\"gepqtybbwwpg\",\"akchzyvlixqnrk\",\"xkjibnxmy\",\"uxswqrntvl\"],\"gatewayAddress\":\"jpsttexoq\"},\"portVif\":[{\"portName\":\"yyufmhruncuw\"},{\"portName\":\"spkcdqzh\"},{\"portName\":\"tddunqnd\"},{\"portName\":\"pchrqbn\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":5663417988942053637},\"id\":\"cw\",\"name\":\"oxjumvqqo\",\"type\":\"ihrraiouaub\"},{\"properties\":{\"displayName\":\"loqxfuojrngif\",\"connectedGateway\":\"z\",\"subnet\":{\"dhcpRanges\":[\"cb\",\"uimzdlyjd\",\"qwmkyoquf\",\"vruzslzojhpctfnm\"],\"gatewayAddress\":\"otngfdgu\"},\"portVif\":[{\"portName\":\"i\"},{\"portName\":\"rkyui\"},{\"portName\":\"bsnmfpph\"},{\"portName\":\"eevy\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":7698479884404425134},\"id\":\"bgomfgbegl\",\"name\":\"gleohi\",\"type\":\"etnluankrrfx\"},{\"properties\":{\"displayName\":\"btijvacvbm\",\"connectedGateway\":\"bqqxlaj\",\"subnet\":{\"dhcpRanges\":[\"acevehjkuyx\",\"afgaoqlt\"],\"gatewayAddress\":\"eyl\"},\"portVif\":[{\"portName\":\"gv\"},{\"portName\":\"r\"},{\"portName\":\"hriypoqeyhlqhy\"},{\"portName\":\"rlpyznuciqdsmexi\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":8781324783652978030},\"id\":\"siibmiybnnustgn\",\"name\":\"jh\",\"type\":\"mgixhcmavmqfou\"}],\"nextLink\":\"rhc\"}") .toObject(WorkloadNetworkSegmentsList.class); - Assertions.assertEquals("iaa", model.value().get(0).displayName()); - Assertions.assertEquals("uagydwqfbylyrf", model.value().get(0).connectedGateway()); - Assertions.assertEquals("tcojocqwo", model.value().get(0).subnet().dhcpRanges().get(0)); - Assertions.assertEquals("btgkbugrjqctoj", model.value().get(0).subnet().gatewayAddress()); - Assertions.assertEquals(8583061153642738552L, model.value().get(0).revision()); - Assertions.assertEquals("pjwyiv", model.nextLink()); + Assertions.assertEquals("vuanashcxlp", model.value().get(0).displayName()); + Assertions.assertEquals("erbdk", model.value().get(0).connectedGateway()); + Assertions.assertEquals("di", model.value().get(0).subnet().dhcpRanges().get(0)); + Assertions.assertEquals("qjctzenkeif", model.value().get(0).subnet().gatewayAddress()); + Assertions.assertEquals(5798870877718562622L, model.value().get(0).revision()); + Assertions.assertEquals("rhc", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupInnerTests.java index 5dd3944b4d2c..2dfad655d0c5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupInnerTests.java @@ -13,21 +13,21 @@ public final class WorkloadNetworkVMGroupInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVMGroupInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"zjyi\",\"members\":[\"sbhud\"],\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":2798000155301001189},\"id\":\"lynsqyrpf\",\"name\":\"obrltt\",\"type\":\"msjnygqdnfw\"}") + "{\"properties\":{\"displayName\":\"cvsql\",\"members\":[\"oibgsxg\",\"xfyqonmpqoxwdo\"],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":5405585423208405414},\"id\":\"iqbi\",\"name\":\"htmwwinh\",\"type\":\"hfqpofv\"}") .toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("zjyi", model.displayName()); - Assertions.assertEquals("sbhud", model.members().get(0)); - Assertions.assertEquals(2798000155301001189L, model.revision()); + Assertions.assertEquals("cvsql", model.displayName()); + Assertions.assertEquals("oibgsxg", model.members().get(0)); + Assertions.assertEquals(5405585423208405414L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkVMGroupInner model = new WorkloadNetworkVMGroupInner().withDisplayName("zjyi") - .withMembers(Arrays.asList("sbhud")) - .withRevision(2798000155301001189L); + WorkloadNetworkVMGroupInner model = new WorkloadNetworkVMGroupInner().withDisplayName("cvsql") + .withMembers(Arrays.asList("oibgsxg", "xfyqonmpqoxwdo")) + .withRevision(5405585423208405414L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("zjyi", model.displayName()); - Assertions.assertEquals("sbhud", model.members().get(0)); - Assertions.assertEquals(2798000155301001189L, model.revision()); + Assertions.assertEquals("cvsql", model.displayName()); + Assertions.assertEquals("oibgsxg", model.members().get(0)); + Assertions.assertEquals(5405585423208405414L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupPropertiesTests.java index 53b7ea8529a2..911e344f851f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupPropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupPropertiesTests.java @@ -13,21 +13,21 @@ public final class WorkloadNetworkVMGroupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVMGroupProperties model = BinaryData.fromString( - "{\"displayName\":\"dzgtil\",\"members\":[\"nfhqlyvijouwivk\",\"oyzunbixxr\",\"ikvcpwp\",\"clrcivtsox\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":6008082652066611938}") + "{\"displayName\":\"cblembnkbwv\",\"members\":[\"kdi\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":5502296031539440928}") .toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("dzgtil", model.displayName()); - Assertions.assertEquals("nfhqlyvijouwivk", model.members().get(0)); - Assertions.assertEquals(6008082652066611938L, model.revision()); + Assertions.assertEquals("cblembnkbwv", model.displayName()); + Assertions.assertEquals("kdi", model.members().get(0)); + Assertions.assertEquals(5502296031539440928L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkVMGroupProperties model = new WorkloadNetworkVMGroupProperties().withDisplayName("dzgtil") - .withMembers(Arrays.asList("nfhqlyvijouwivk", "oyzunbixxr", "ikvcpwp", "clrcivtsox")) - .withRevision(6008082652066611938L); + WorkloadNetworkVMGroupProperties model = new WorkloadNetworkVMGroupProperties().withDisplayName("cblembnkbwv") + .withMembers(Arrays.asList("kdi")) + .withRevision(5502296031539440928L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("dzgtil", model.displayName()); - Assertions.assertEquals("nfhqlyvijouwivk", model.members().get(0)); - Assertions.assertEquals(6008082652066611938L, model.revision()); + Assertions.assertEquals("cblembnkbwv", model.displayName()); + Assertions.assertEquals("kdi", model.members().get(0)); + Assertions.assertEquals(5502296031539440928L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupsListTests.java index 271dad214c37..10ae48902e24 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupsListTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupsListTests.java @@ -12,11 +12,11 @@ public final class WorkloadNetworkVMGroupsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVMGroupsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"rxgkne\",\"members\":[\"inzqodfvpgs\",\"oxgsgbpfgzdjtx\",\"zflbqvg\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":2652085355210042398},\"id\":\"usrd\",\"name\":\"etnwsdtutnw\",\"type\":\"duy\"},{\"properties\":{\"displayName\":\"zhyrmewipmve\",\"members\":[\"ukuqgsj\",\"xundxgk\"],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":362777289625182475},\"id\":\"f\",\"name\":\"mhv\",\"type\":\"muvgp\"}],\"nextLink\":\"neqsxvmh\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"gznmmaxrizkzob\",\"members\":[\"xlhslnel\"],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":8678909552844330526},\"id\":\"xecwcro\",\"name\":\"phslhcawjutifdw\",\"type\":\"mvi\"},{\"properties\":{\"displayName\":\"qj\",\"members\":[\"zhraglkafh\"],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":5810065088804263184},\"id\":\"kpzvcpopmxelnwc\",\"name\":\"tyjedex\",\"type\":\"mlfmkqs\"},{\"properties\":{\"displayName\":\"uawxtzx\",\"members\":[\"mwabzxrvxc\",\"s\",\"sphaivmxyasflvg\",\"gzwywak\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":2744971356321102617},\"id\":\"lmljhlnymzotq\",\"name\":\"ryuzcbmqqv\",\"type\":\"mv\"}],\"nextLink\":\"gtayxonsupeujlz\"}") .toObject(WorkloadNetworkVMGroupsList.class); - Assertions.assertEquals("rxgkne", model.value().get(0).displayName()); - Assertions.assertEquals("inzqodfvpgs", model.value().get(0).members().get(0)); - Assertions.assertEquals(2652085355210042398L, model.value().get(0).revision()); - Assertions.assertEquals("neqsxvmh", model.nextLink()); + Assertions.assertEquals("gznmmaxrizkzob", model.value().get(0).displayName()); + Assertions.assertEquals("xlhslnel", model.value().get(0).members().get(0)); + Assertions.assertEquals(8678909552844330526L, model.value().get(0).revision()); + Assertions.assertEquals("gtayxonsupeujlz", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachineInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachineInnerTests.java index 1d0b558c4edb..251da85245fb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachineInnerTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachineInnerTests.java @@ -12,8 +12,8 @@ public final class WorkloadNetworkVirtualMachineInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVirtualMachineInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"bcporxvxcjzhqizx\",\"vmType\":\"EDGE\"},\"id\":\"gqscj\",\"name\":\"vftjuhd\",\"type\":\"azkmtgguwp\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"ovw\",\"vmType\":\"SERVICE\"},\"id\":\"tgoe\",\"name\":\"ybbabpfhvfsl\",\"type\":\"vntjlrigjk\"}") .toObject(WorkloadNetworkVirtualMachineInner.class); - Assertions.assertEquals("bcporxvxcjzhqizx", model.displayName()); + Assertions.assertEquals("ovw", model.displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinePropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinePropertiesTests.java index b81c4dfb1f5f..ceb218957e7a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinePropertiesTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinePropertiesTests.java @@ -12,8 +12,9 @@ public final class WorkloadNetworkVirtualMachinePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVirtualMachineProperties model = BinaryData - .fromString("{\"provisioningState\":\"Building\",\"displayName\":\"jcivmmg\",\"vmType\":\"EDGE\"}") + .fromString( + "{\"provisioningState\":\"Succeeded\",\"displayName\":\"ioovzidsxwaab\",\"vmType\":\"REGULAR\"}") .toObject(WorkloadNetworkVirtualMachineProperties.class); - Assertions.assertEquals("jcivmmg", model.displayName()); + Assertions.assertEquals("ioovzidsxwaab", model.displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListTests.java index 5327dc9c3561..ac3e57719dc1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListTests.java @@ -12,9 +12,9 @@ public final class WorkloadNetworkVirtualMachinesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVirtualMachinesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"pchwa\",\"vmType\":\"EDGE\"},\"id\":\"usnfepgfewet\",\"name\":\"l\",\"type\":\"xgncxyk\"}],\"nextLink\":\"djhlimm\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"ojlvfhrbbpneqvc\",\"vmType\":\"REGULAR\"},\"id\":\"urmochpprprs\",\"name\":\"mo\",\"type\":\"ayzejnhlbkpbz\"},{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"jh\",\"vmType\":\"SERVICE\"},\"id\":\"echndbnwieholew\",\"name\":\"wiuub\",\"type\":\"efqsfapaqtferrqw\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"fxapjwogqqnobpu\",\"vmType\":\"EDGE\"},\"id\":\"btqwpwyawbzas\",\"name\":\"bucljgkyexaogu\",\"type\":\"aipidsdaultxi\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"qwazlnqnmcjngzq\",\"vmType\":\"REGULAR\"},\"id\":\"bjwgnyfus\",\"name\":\"zsvtuikzhajqgl\",\"type\":\"fh\"}],\"nextLink\":\"rqryxynqn\"}") .toObject(WorkloadNetworkVirtualMachinesList.class); - Assertions.assertEquals("pchwa", model.value().get(0).displayName()); - Assertions.assertEquals("djhlimm", model.nextLink()); + Assertions.assertEquals("ojlvfhrbbpneqvc", model.value().get(0).displayName()); + Assertions.assertEquals("rqryxynqn", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpMockTests.java index a05e4e91b645..532d20246e71 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreateDhcpMockTests { @Test public void testCreateDhcp() throws Exception { String responseStr - = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"kuwxeoiojfizfavk\",\"segments\":[\"fbcyaykmm\",\"zs\",\"fwxrzxmdew\",\"rsxkr\"],\"provisioningState\":\"Succeeded\",\"revision\":3120143103816226568},\"id\":\"jwwviy\",\"name\":\"y\",\"type\":\"suhbrnn\"}"; + = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"czjnc\",\"segments\":[\"yqv\",\"daswvpp\",\"sqqzlgcndhz\"],\"provisioningState\":\"Succeeded\",\"revision\":1531216029180197269},\"id\":\"r\",\"name\":\"khgsnxuwwkpphefs\",\"type\":\"zxlb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,13 @@ public void testCreateDhcp() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkloadNetworkDhcp response = manager.workloadNetworks() - .defineDhcp("lkhhu") - .withExistingPrivateCloud("bekpeeksnbksdqhj", "yklxe") - .withProperties(new WorkloadNetworkDhcpEntity().withDisplayName("poq").withRevision(2018668566559819971L)) + .defineDhcp("mrvz") + .withExistingPrivateCloud("njizb", "ewoi") + .withProperties( + new WorkloadNetworkDhcpEntity().withDisplayName("yrsrziuctixgb").withRevision(4919704701482686763L)) .create(); - Assertions.assertEquals("kuwxeoiojfizfavk", response.properties().displayName()); - Assertions.assertEquals(3120143103816226568L, response.properties().revision()); + Assertions.assertEquals("czjnc", response.properties().displayName()); + Assertions.assertEquals(1531216029180197269L, response.properties().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceMockTests.java index ea58dfaace2f..67dd09d828b8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceMockTests.java @@ -23,7 +23,7 @@ public final class WorkloadNetworksCreateDnsServiceMockTests { @Test public void testCreateDnsService() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"mtggmu\",\"dnsServiceIp\":\"ch\",\"defaultDnsZone\":\"fnkf\",\"fqdnZones\":[\"v\"],\"logLevel\":\"INFO\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":5111678632759854956},\"id\":\"knaqlnuwig\",\"name\":\"yxl\",\"type\":\"kwph\"}"; + = "{\"properties\":{\"displayName\":\"xkxbhxvu\",\"dnsServiceIp\":\"ulgm\",\"defaultDnsZone\":\"jevdyznf\",\"fqdnZones\":[\"vkskmqozzk\",\"vyhjrl\",\"izjixlq\"],\"logLevel\":\"WARNING\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":2236190932702422821},\"id\":\"ron\",\"name\":\"qlmgnlqxsjxt\",\"type\":\"lexhv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,21 +33,21 @@ public void testCreateDnsService() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkloadNetworkDnsService response = manager.workloadNetworks() - .defineDnsService("se") - .withExistingPrivateCloud("jxsqwjhqkbiwetp", "zycyqiqyhg") - .withDisplayName("e") - .withDnsServiceIp("sfledyn") - .withDefaultDnsZone("pziuwfbzkkdtnh") - .withFqdnZones(Arrays.asList("cljse", "pkpbafvafhlbylcc", "evxrhyz", "fwrsofpltdbmair")) - .withLogLevel(DnsServiceLogLevelEnum.WARNING) - .withRevision(9155393016297493468L) + .defineDnsService("qbxyxoyfpuqqi") + .withExistingPrivateCloud("xomeikjclwzacn", "wpfsuqtaaz") + .withDisplayName("xlhdj") + .withDnsServiceIp("dcadwvpsozjiihjr") + .withDefaultDnsZone("bmrzoepnx") + .withFqdnZones(Arrays.asList("wnjkgvfn")) + .withLogLevel(DnsServiceLogLevelEnum.FATAL) + .withRevision(5940630190503622951L) .create(); - Assertions.assertEquals("mtggmu", response.displayName()); - Assertions.assertEquals("ch", response.dnsServiceIp()); - Assertions.assertEquals("fnkf", response.defaultDnsZone()); - Assertions.assertEquals("v", response.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.INFO, response.logLevel()); - Assertions.assertEquals(5111678632759854956L, response.revision()); + Assertions.assertEquals("xkxbhxvu", response.displayName()); + Assertions.assertEquals("ulgm", response.dnsServiceIp()); + Assertions.assertEquals("jevdyznf", response.defaultDnsZone()); + Assertions.assertEquals("vkskmqozzk", response.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, response.logLevel()); + Assertions.assertEquals(2236190932702422821L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneMockTests.java index 2797dcdffada..c120d15619aa 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreateDnsZoneMockTests { @Test public void testCreateDnsZone() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"g\",\"domain\":[\"gpszngafpg\",\"lkvec\",\"ujcngo\"],\"dnsServerIps\":[\"edmzrgjfoknub\",\"oitpkpztrgdgx\"],\"sourceIp\":\"oqraswugyxpqi\",\"dnsServices\":652401856939203105,\"provisioningState\":\"Succeeded\",\"revision\":2425251451641968731},\"id\":\"buhzacaq\",\"name\":\"yltcoqcuj\",\"type\":\"dsxzakuejkmvb\"}"; + = "{\"properties\":{\"displayName\":\"acbcb\",\"domain\":[\"lqidywmhm\",\"tyrilkfbnrqqxvz\",\"pbnfnqtx\"],\"dnsServerIps\":[\"m\",\"lswbnf\"],\"sourceIp\":\"epl\",\"dnsServices\":2453779446618592213,\"provisioningState\":\"Succeeded\",\"revision\":2877591763319500086},\"id\":\"leexahvmywh\",\"name\":\"brcary\",\"type\":\"sjjzyvoaqajuveh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,21 +32,21 @@ public void testCreateDnsZone() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkloadNetworkDnsZone response = manager.workloadNetworks() - .defineDnsZone("aonwivkcqhrxh") - .withExistingPrivateCloud("xzcwxhmpejt", "ke") - .withDisplayName("lccrmmkyupi") - .withDomain(Arrays.asList("yqjf", "akfqfrkemyildud", "jascowvfdjkpd", "phlkksnm")) - .withDnsServerIps(Arrays.asList("yfijdkzuqnws", "thuqolyahluq", "qulsutrjbhxykfhy")) - .withSourceIp("zvqqugdrftbcvexr") - .withDnsServices(5938622404263998301L) - .withRevision(3110818037980828259L) + .defineDnsZone("bc") + .withExistingPrivateCloud("qbozoolzqoc", "rkuz") + .withDisplayName("t") + .withDomain(Arrays.asList("awqytllhdyzm", "ckze")) + .withDnsServerIps(Arrays.asList("akckywym")) + .withSourceIp("aabjkdtfohfao") + .withDnsServices(5659515679437313606L) + .withRevision(272534413742826453L) .create(); - Assertions.assertEquals("g", response.displayName()); - Assertions.assertEquals("gpszngafpg", response.domain().get(0)); - Assertions.assertEquals("edmzrgjfoknub", response.dnsServerIps().get(0)); - Assertions.assertEquals("oqraswugyxpqi", response.sourceIp()); - Assertions.assertEquals(652401856939203105L, response.dnsServices()); - Assertions.assertEquals(2425251451641968731L, response.revision()); + Assertions.assertEquals("acbcb", response.displayName()); + Assertions.assertEquals("lqidywmhm", response.domain().get(0)); + Assertions.assertEquals("m", response.dnsServerIps().get(0)); + Assertions.assertEquals("epl", response.sourceIp()); + Assertions.assertEquals(2453779446618592213L, response.dnsServices()); + Assertions.assertEquals(2877591763319500086L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringMockTests.java index 080b939f2ff8..e8ac6962c049 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreatePortMirroringMockTests { @Test public void testCreatePortMirroring() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"pnuhzafccnu\",\"direction\":\"INGRESS\",\"source\":\"byl\",\"destination\":\"igvxvatvcrk\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":4645156029422675595},\"id\":\"csyhzlwxaeaov\",\"name\":\"rexdndsbd\",\"type\":\"ead\"}"; + = "{\"properties\":{\"displayName\":\"sehar\",\"direction\":\"EGRESS\",\"source\":\"qnrxtmbpjptn\",\"destination\":\"jhrsidqpxlb\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":7234936948502378002},\"id\":\"twmykyut\",\"name\":\"ym\",\"type\":\"wmfjhp\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,19 +32,19 @@ public void testCreatePortMirroring() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkloadNetworkPortMirroring response = manager.workloadNetworks() - .definePortMirroring("gthortudaw") - .withExistingPrivateCloud("ztjofqcvovjufyc", "jmlbemyejiriux") - .withDisplayName("felqerpptc") - .withDirection(PortMirroringDirectionEnum.INGRESS) - .withSource("zmnhiilialwc") - .withDestination("ckbbcc") - .withRevision(2335530458639514784L) + .definePortMirroring("gybpmfb") + .withExistingPrivateCloud("ptdmkrrbhmpful", "be") + .withDisplayName("unmpzkrvfyifkdsc") + .withDirection(PortMirroringDirectionEnum.EGRESS) + .withSource("fict") + .withDestination("jjwgcwnp") + .withRevision(8173777051214408195L) .create(); - Assertions.assertEquals("pnuhzafccnu", response.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, response.direction()); - Assertions.assertEquals("byl", response.source()); - Assertions.assertEquals("igvxvatvcrk", response.destination()); - Assertions.assertEquals(4645156029422675595L, response.revision()); + Assertions.assertEquals("sehar", response.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, response.direction()); + Assertions.assertEquals("qnrxtmbpjptn", response.source()); + Assertions.assertEquals("jhrsidqpxlb", response.destination()); + Assertions.assertEquals(7234936948502378002L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpMockTests.java index bf4242d8dea5..38211a453e90 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpMockTests.java @@ -21,7 +21,7 @@ public final class WorkloadNetworksCreatePublicIpMockTests { @Test public void testCreatePublicIp() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"elyuj\",\"numberOfPublicIPs\":6634006946603195801,\"publicIPBlock\":\"mpckyeclcdigpta\",\"provisioningState\":\"Succeeded\"},\"id\":\"mqxuc\",\"name\":\"ci\",\"type\":\"oclxiut\"}"; + = "{\"properties\":{\"displayName\":\"fciatxtjrr\",\"numberOfPublicIPs\":8335518650939106212,\"publicIPBlock\":\"kjhhxdlajf\",\"provisioningState\":\"Succeeded\"},\"id\":\"scv\",\"name\":\"lxlhuavkrm\",\"type\":\"kmyjmkxett\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testCreatePublicIp() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkloadNetworkPublicIp response = manager.workloadNetworks() - .definePublicIp("aqylkjztji") - .withExistingPrivateCloud("rzmwn", "opagttmvmmag") - .withDisplayName("jcg") - .withNumberOfPublicIPs(2391492533044709833L) + .definePublicIp("drlefgnaavuag") + .withExistingPrivateCloud("cvjqdv", "wkqp") + .withDisplayName("taoutnpdct") + .withNumberOfPublicIPs(8872726298912170000L) .create(); - Assertions.assertEquals("elyuj", response.displayName()); - Assertions.assertEquals(6634006946603195801L, response.numberOfPublicIPs()); + Assertions.assertEquals("fciatxtjrr", response.displayName()); + Assertions.assertEquals(8335518650939106212L, response.numberOfPublicIPs()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsMockTests.java index 25aeaa2c249f..69c68bbde4ff 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsMockTests.java @@ -23,7 +23,7 @@ public final class WorkloadNetworksCreateSegmentsMockTests { @Test public void testCreateSegments() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"mt\",\"connectedGateway\":\"sknxrwzawnvsbcf\",\"subnet\":{\"dhcpRanges\":[\"xn\",\"hycvdimwrzre\"],\"gatewayAddress\":\"gy\"},\"portVif\":[{\"portName\":\"rw\"},{\"portName\":\"eryekzkdhmeottaw\"},{\"portName\":\"osxw\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":1446035478813685043},\"id\":\"n\",\"name\":\"pmil\",\"type\":\"pnwy\"}"; + = "{\"properties\":{\"displayName\":\"xleqircc\",\"connectedGateway\":\"ly\",\"subnet\":{\"dhcpRanges\":[\"vrpjlvczuodacp\"],\"gatewayAddress\":\"ettepdjxqe\"},\"portVif\":[{\"portName\":\"nuiylpckaewsedv\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":9068116464700044876},\"id\":\"hrg\",\"name\":\"nzhctmjtsgh\",\"type\":\"bcbcpz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,19 +33,19 @@ public void testCreateSegments() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkloadNetworkSegment response = manager.workloadNetworks() - .defineSegments("zjd") - .withExistingPrivateCloud("jc", "z") - .withDisplayName("jb") - .withConnectedGateway("jeaoqaqbz") - .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("w", "v", "atbwbqam", "e")) - .withGatewayAddress("iyslpkcvmwfaux")) - .withRevision(2240819145094168645L) + .defineSegments("rngl") + .withExistingPrivateCloud("slojfkqidnqt", "qxjhqxcsqhtkbtnq") + .withDisplayName("iipsnawwlqkz") + .withConnectedGateway("hhl") + .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("cctkwmuqqoajxe", "y")) + .withGatewayAddress("esrw")) + .withRevision(6720470103557634830L) .create(); - Assertions.assertEquals("mt", response.displayName()); - Assertions.assertEquals("sknxrwzawnvsbcf", response.connectedGateway()); - Assertions.assertEquals("xn", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("gy", response.subnet().gatewayAddress()); - Assertions.assertEquals(1446035478813685043L, response.revision()); + Assertions.assertEquals("xleqircc", response.displayName()); + Assertions.assertEquals("ly", response.connectedGateway()); + Assertions.assertEquals("vrpjlvczuodacp", response.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("ettepdjxqe", response.subnet().gatewayAddress()); + Assertions.assertEquals(9068116464700044876L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupMockTests.java index 39af1450da28..70637ac0a107 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreateVMGroupMockTests { @Test public void testCreateVMGroup() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"kvwjtqpkevmy\",\"members\":[\"crspxklurccl\",\"gxannnoytzposewx\",\"gpxvkqmaupxvpi\",\"dfaifyzyzeyuube\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":4004397580720883632},\"id\":\"ith\",\"name\":\"ygvfltgvdihoyn\",\"type\":\"rxwe\"}"; + = "{\"properties\":{\"displayName\":\"dexyionofninbdb\",\"members\":[\"cw\",\"qrs\",\"pcbbprtugav\"],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":8011194812658119680},\"id\":\"mf\",\"name\":\"gd\",\"type\":\"tbfcm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,15 @@ public void testCreateVMGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkloadNetworkVMGroup response = manager.workloadNetworks() - .defineVMGroup("ehuxiqhzlraym") - .withExistingPrivateCloud("udqll", "sauzpjlx") - .withDisplayName("lskihmxrfdsajred") - .withMembers(Arrays.asList("yshtuwgmev", "afpwzyifrkgwl", "xeqipx", "zdyi")) - .withRevision(6640091995270165550L) + .defineVMGroup("zshnuqndaizup") + .withExistingPrivateCloud("rpzeqac", "ldtzmpypefcp") + .withDisplayName("uytuszxhmtvtv") + .withMembers(Arrays.asList("qiukvzwyd")) + .withRevision(6537188197075498776L) .create(); - Assertions.assertEquals("kvwjtqpkevmy", response.displayName()); - Assertions.assertEquals("crspxklurccl", response.members().get(0)); - Assertions.assertEquals(4004397580720883632L, response.revision()); + Assertions.assertEquals("dexyionofninbdb", response.displayName()); + Assertions.assertEquals("cw", response.members().get(0)); + Assertions.assertEquals(8011194812658119680L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpMockTests.java index 7b8790ed4195..c788064e7279 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpMockTests.java @@ -27,7 +27,8 @@ public void testDeleteDhcp() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.workloadNetworks().deleteDhcp("x", "hcbjpibk", "phuuuerctato", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .deleteDhcp("reuykbbmnwagl", "bxoeeonql", "fwmyymv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceMockTests.java index 556355eac6e3..a86a59d3164b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceMockTests.java @@ -28,7 +28,7 @@ public void testDeleteDnsService() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.workloadNetworks() - .deleteDnsService("vnynkb", "etnjuhpsprkz", "aupia", com.azure.core.util.Context.NONE); + .deleteDnsService("xlzdesygrijwa", "ufanray", "fueqfrojs", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneMockTests.java index 573d36e931cb..2bdbd4b35fce 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneMockTests.java @@ -28,7 +28,7 @@ public void testDeleteDnsZone() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.workloadNetworks() - .deleteDnsZone("jcmmzrrscub", "wsdrnpxqwodif", "jxcjrmmuabwib", com.azure.core.util.Context.NONE); + .deleteDnsZone("yfqiuasig", "owsocnequygdjbo", "grmtqjk", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringMockTests.java index 1bfaec50314c..258a717b6fbf 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringMockTests.java @@ -27,7 +27,8 @@ public void testDeletePortMirroring() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.workloadNetworks().deletePortMirroring("h", "pqinf", "zpyglqdhmrj", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .deletePortMirroring("owa", "ywalhjymxcg", "tagdrc", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpMockTests.java index 9eb05d2d70d2..c0f34d150db2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpMockTests.java @@ -27,7 +27,8 @@ public void testDeletePublicIp() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.workloadNetworks().deletePublicIp("dwwnl", "a", "wxudgn", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .deletePublicIp("zlehgcvkbcknjolg", "y", "xpvelszerqzevxo", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentMockTests.java index f74f07b382d7..25afcb28e303 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentMockTests.java @@ -27,7 +27,7 @@ public void testDeleteSegment() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.workloadNetworks().deleteSegment("qyhleseyq", "hvyeldotj", "dkwisw", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteSegment("a", "zknxkv", "cxetyvkunmignoh", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupMockTests.java index 6b9d9bfd2997..982067e0aca6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupMockTests.java @@ -27,7 +27,8 @@ public void testDeleteVMGroup() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.workloadNetworks().deleteVMGroup("sxap", "efh", "xcgjokjljnhvlq", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .deleteVMGroup("rkadjfynnfmuiiir", "pfoh", "kfkxbbcbrwjiut", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpWithResponseMockTests.java index 25bd462f873c..f322d6e3b01f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetDhcpWithResponseMockTests { @Test public void testGetDhcpWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"odlfpyapucygvo\",\"segments\":[\"unssxlghieegjl\",\"vvpa\"],\"provisioningState\":\"Deleting\",\"revision\":4231780649876011093},\"id\":\"xantuygdhg\",\"name\":\"qipir\",\"type\":\"iwrqofulopmjnl\"}"; + = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"ymmpujivy\",\"segments\":[\"juvsmbmslzoyovw\",\"dbpqvybefgvm\"],\"provisioningState\":\"Updating\",\"revision\":4359865319227372625},\"id\":\"lubses\",\"name\":\"vcuartrhun\",\"type\":\"pirykycndzfqiv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetDhcpWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkloadNetworkDhcp response = manager.workloadNetworks() - .getDhcpWithResponse("yvk", "kmrocxne", "v", com.azure.core.util.Context.NONE) + .getDhcpWithResponse("fgvaknokzwj", "zrltixldzyyf", "tpq", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("odlfpyapucygvo", response.properties().displayName()); - Assertions.assertEquals(4231780649876011093L, response.properties().revision()); + Assertions.assertEquals("ymmpujivy", response.properties().displayName()); + Assertions.assertEquals(4359865319227372625L, response.properties().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceWithResponseMockTests.java index 74f3317f2e75..d209556f8094 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworksGetDnsServiceWithResponseMockTests { @Test public void testGetDnsServiceWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"wswmt\",\"dnsServiceIp\":\"yctww\",\"defaultDnsZone\":\"wxjlmec\",\"fqdnZones\":[\"ygzyvneezaifght\",\"oqqtl\"],\"logLevel\":\"FATAL\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":4121428237576255143},\"id\":\"avfqnvhnqoewdogi\",\"name\":\"etesypvidbztjhqt\",\"type\":\"b\"}"; + = "{\"properties\":{\"displayName\":\"dftujwjjufwbeqr\",\"dnsServiceIp\":\"orhtss\",\"defaultDnsZone\":\"qnmdvhazcvjy\",\"fqdnZones\":[\"swbqerzwxi\",\"txtd\",\"ukvlb\"],\"logLevel\":\"WARNING\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":936808456697088809},\"id\":\"mbewreswmo\",\"name\":\"egmmuteyxe\",\"type\":\"guqigijiitns\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testGetDnsServiceWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkloadNetworkDnsService response = manager.workloadNetworks() - .getDnsServiceWithResponse("uiaclkiexhajlfn", "hiqfyuttdiy", "b", com.azure.core.util.Context.NONE) + .getDnsServiceWithResponse("zulo", "saeuzanhsfnhsenw", "hpzfngqj", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wswmt", response.displayName()); - Assertions.assertEquals("yctww", response.dnsServiceIp()); - Assertions.assertEquals("wxjlmec", response.defaultDnsZone()); - Assertions.assertEquals("ygzyvneezaifght", response.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.FATAL, response.logLevel()); - Assertions.assertEquals(4121428237576255143L, response.revision()); + Assertions.assertEquals("dftujwjjufwbeqr", response.displayName()); + Assertions.assertEquals("orhtss", response.dnsServiceIp()); + Assertions.assertEquals("qnmdvhazcvjy", response.defaultDnsZone()); + Assertions.assertEquals("swbqerzwxi", response.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, response.logLevel()); + Assertions.assertEquals(936808456697088809L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneWithResponseMockTests.java index ec926662b6e7..7b1b3f6f5524 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetDnsZoneWithResponseMockTests { @Test public void testGetDnsZoneWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"djfbocyv\",\"domain\":[\"lrtywikdmhlakuf\",\"gbhgau\",\"cdixmx\"],\"dnsServerIps\":[\"sryjqgdkfno\"],\"sourceIp\":\"eoqbvjhvefgwbmqj\",\"dnsServices\":2962662676791309250,\"provisioningState\":\"Canceled\",\"revision\":1533925900451984741},\"id\":\"xbulpzealbmqkyo\",\"name\":\"wyvf\",\"type\":\"mbtsuahxsg\"}"; + = "{\"properties\":{\"displayName\":\"ltrfowtdvrf\",\"domain\":[\"ih\",\"vjdrqcrjidhftuk\",\"hdxlw\"],\"dnsServerIps\":[\"bfqz\",\"kfnjyixhafrat\"],\"sourceIp\":\"mbjrou\",\"dnsServices\":3328537751300448546,\"provisioningState\":\"Failed\",\"revision\":3510283314103480133},\"id\":\"huzgfxo\",\"name\":\"jtpusllywpvtiotz\",\"type\":\"pdbollg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testGetDnsZoneWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkloadNetworkDnsZone response = manager.workloadNetworks() - .getDnsZoneWithResponse("wqejpmvsse", "aepwamcxtcz", "upeuknijduyye", com.azure.core.util.Context.NONE) + .getDnsZoneWithResponse("uyem", "owuowh", "xlnwyrmouvblgmo", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("djfbocyv", response.displayName()); - Assertions.assertEquals("lrtywikdmhlakuf", response.domain().get(0)); - Assertions.assertEquals("sryjqgdkfno", response.dnsServerIps().get(0)); - Assertions.assertEquals("eoqbvjhvefgwbmqj", response.sourceIp()); - Assertions.assertEquals(2962662676791309250L, response.dnsServices()); - Assertions.assertEquals(1533925900451984741L, response.revision()); + Assertions.assertEquals("ltrfowtdvrf", response.displayName()); + Assertions.assertEquals("ih", response.domain().get(0)); + Assertions.assertEquals("bfqz", response.dnsServerIps().get(0)); + Assertions.assertEquals("mbjrou", response.sourceIp()); + Assertions.assertEquals(3328537751300448546L, response.dnsServices()); + Assertions.assertEquals(3510283314103480133L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewayWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewayWithResponseMockTests.java index 04ff91039b3c..beea13ea197a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewayWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewayWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetGatewayWithResponseMockTests { @Test public void testGetGatewayWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"qehbhbcds\",\"path\":\"ryrando\"},\"id\":\"mbltoo\",\"name\":\"mkfqlwxldy\",\"type\":\"alsygao\"}"; + = "{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"peti\",\"path\":\"xqiubxdukecpx\"},\"id\":\"zvdhctmmkosz\",\"name\":\"dblnsntrp\",\"type\":\"aqkiofkb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetGatewayWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkloadNetworkGateway response = manager.workloadNetworks() - .getGatewayWithResponse("br", "ffg", "lukkutvlxhrpqhvm", com.azure.core.util.Context.NONE) + .getGatewayWithResponse("f", "kzxuiz", "y", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qehbhbcds", response.displayName()); + Assertions.assertEquals("peti", response.displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringWithResponseMockTests.java index 4988827ec0e5..97aaf92dfe84 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworksGetPortMirroringWithResponseMockTests { @Test public void testGetPortMirroringWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"yewnfnzhhhqos\",\"direction\":\"EGRESS\",\"source\":\"kutycyarnroohgua\",\"destination\":\"oghktdpycz\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":5499743059471221914},\"id\":\"qr\",\"name\":\"ttjzcfyjzpt\",\"type\":\"rl\"}"; + = "{\"properties\":{\"displayName\":\"pfwwt\",\"direction\":\"EGRESS\",\"source\":\"esxxhmwcdbckyoi\",\"destination\":\"kxhnegknj\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":52999178106922181},\"id\":\"vukaobrlbpgsnb\",\"name\":\"gnc\",\"type\":\"jhgem\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testGetPortMirroringWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkloadNetworkPortMirroring response = manager.workloadNetworks() - .getPortMirroringWithResponse("xwbjs", "dbirkfpksokdgo", "ewijymrhbguz", com.azure.core.util.Context.NONE) + .getPortMirroringWithResponse("zcmjhngxnoqrxt", "isn", "evhdlmydid", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("yewnfnzhhhqos", response.displayName()); + Assertions.assertEquals("pfwwt", response.displayName()); Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, response.direction()); - Assertions.assertEquals("kutycyarnroohgua", response.source()); - Assertions.assertEquals("oghktdpycz", response.destination()); - Assertions.assertEquals(5499743059471221914L, response.revision()); + Assertions.assertEquals("esxxhmwcdbckyoi", response.source()); + Assertions.assertEquals("kxhnegknj", response.destination()); + Assertions.assertEquals(52999178106922181L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpWithResponseMockTests.java index 5171124386d1..6586caa2ccbf 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetPublicIpWithResponseMockTests { @Test public void testGetPublicIpWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"gqztwhghmupgx\",\"numberOfPublicIPs\":7561137759085900451,\"publicIPBlock\":\"xabb\",\"provisioningState\":\"Building\"},\"id\":\"abe\",\"name\":\"bbklqpxzuca\",\"type\":\"e\"}"; + = "{\"properties\":{\"displayName\":\"janepubdpkx\",\"numberOfPublicIPs\":3343335962358513951,\"publicIPBlock\":\"i\",\"provisioningState\":\"Succeeded\"},\"id\":\"tvo\",\"name\":\"kxdxuwsaifmcwn\",\"type\":\"s\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetPublicIpWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkloadNetworkPublicIp response = manager.workloadNetworks() - .getPublicIpWithResponse("lzijiufehgmvflnw", "v", "kxrerlniylylyfwx", com.azure.core.util.Context.NONE) + .getPublicIpWithResponse("iw", "wxlboncqbazqicq", "hygtv", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("gqztwhghmupgx", response.displayName()); - Assertions.assertEquals(7561137759085900451L, response.numberOfPublicIPs()); + Assertions.assertEquals("janepubdpkx", response.displayName()); + Assertions.assertEquals(3343335962358513951L, response.numberOfPublicIPs()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentWithResponseMockTests.java index 11a05e53f165..3587002ccec8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetSegmentWithResponseMockTests { @Test public void testGetSegmentWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"xk\",\"connectedGateway\":\"fjjkbajb\",\"subnet\":{\"dhcpRanges\":[\"duusioycblevpmcl\"],\"gatewayAddress\":\"yxkyxlz\"},\"portVif\":[{\"portName\":\"kzzltafhbzf\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":8719114611506258542},\"id\":\"qsczpgvdwnapfdqw\",\"name\":\"wf\",\"type\":\"ptnuwjtkschgc\"}"; + = "{\"properties\":{\"displayName\":\"eciqchxr\",\"connectedGateway\":\"icdsiwd\",\"subnet\":{\"dhcpRanges\":[\"zhzzwvywrg\"],\"gatewayAddress\":\"gydgrpxncakiq\"},\"portVif\":[{\"portName\":\"jrkc\"},{\"portName\":\"mgglvlmfe\"},{\"portName\":\"oqeykglt\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":2419869972668402032},\"id\":\"ayejsxtlgflwfgz\",\"name\":\"iucijjcea\",\"type\":\"lijjjrtvam\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testGetSegmentWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkloadNetworkSegment response = manager.workloadNetworks() - .getSegmentWithResponse("weyurkphyjd", "ravjuq", "brxmrgch", com.azure.core.util.Context.NONE) + .getSegmentWithResponse("gilfjqqacdmkxw", "dcvjwc", "z", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xk", response.displayName()); - Assertions.assertEquals("fjjkbajb", response.connectedGateway()); - Assertions.assertEquals("duusioycblevpmcl", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("yxkyxlz", response.subnet().gatewayAddress()); - Assertions.assertEquals(8719114611506258542L, response.revision()); + Assertions.assertEquals("eciqchxr", response.displayName()); + Assertions.assertEquals("icdsiwd", response.connectedGateway()); + Assertions.assertEquals("zhzzwvywrg", response.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("gydgrpxncakiq", response.subnet().gatewayAddress()); + Assertions.assertEquals(2419869972668402032L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupWithResponseMockTests.java index 6d87542035d4..5c2dc4983769 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetVMGroupWithResponseMockTests { @Test public void testGetVMGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"ru\",\"members\":[\"gsyeipqdsmjtg\",\"qgdgkkile\",\"lkcsmknhwtbbae\",\"orvvmqfloygbdgw\"],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":2356317382581772803},\"id\":\"abgdexj\",\"name\":\"d\",\"type\":\"jsaqwotmmwllcols\"}"; + = "{\"properties\":{\"displayName\":\"lqqbtnyjpylxdbfv\",\"members\":[\"vmsxbaevwjcnkot\",\"lwuhvajmailfe\"],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":233618546735156974},\"id\":\"iqullqxbdmvr\",\"name\":\"cm\",\"type\":\"erndbrnyeofltfnn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testGetVMGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkloadNetworkVMGroup response = manager.workloadNetworks() - .getVMGroupWithResponse("sxivzrrryvei", "ipsk", "yzatvfuzkaft", com.azure.core.util.Context.NONE) + .getVMGroupWithResponse("m", "uoqujlyeg", "avn", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ru", response.displayName()); - Assertions.assertEquals("gsyeipqdsmjtg", response.members().get(0)); - Assertions.assertEquals(2356317382581772803L, response.revision()); + Assertions.assertEquals("lqqbtnyjpylxdbfv", response.displayName()); + Assertions.assertEquals("vmsxbaevwjcnkot", response.members().get(0)); + Assertions.assertEquals(233618546735156974L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineWithResponseMockTests.java index a061a6555c62..2145a19fc50d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetVirtualMachineWithResponseMockTests { @Test public void testGetVirtualMachineWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"jdjusk\",\"vmType\":\"EDGE\"},\"id\":\"qyn\",\"name\":\"ceysfaqeg\",\"type\":\"lwryshwddkvbxgkq\"}"; + = "{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"yq\",\"vmType\":\"REGULAR\"},\"id\":\"zgowox\",\"name\":\"mj\",\"type\":\"ajcxnyqgxhl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetVirtualMachineWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkloadNetworkVirtualMachine response = manager.workloadNetworks() - .getVirtualMachineWithResponse("oytehqpuvjm", "qm", "dwckygroe", com.azure.core.util.Context.NONE) + .getVirtualMachineWithResponse("yvdmvx", "dqacfrgnawbabgf", "ktyjmf", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("jdjusk", response.displayName()); + Assertions.assertEquals("yq", response.displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetWithResponseMockTests.java index beda6cc13cad..8c40f0e8466e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class WorkloadNetworksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"fiqwoy\",\"name\":\"qvapcohhoucq\",\"type\":\"q\"}"; + = "{\"properties\":{\"provisioningState\":\"Building\"},\"id\":\"oithg\",\"name\":\"gvfltgvdihoynkr\",\"type\":\"wetwkdr\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkloadNetwork response = manager.workloadNetworks() - .getWithResponse("klinhmdptysprq", "gnzxojpslsvj", com.azure.core.util.Context.NONE) + .getWithResponse("dfaifyzyzeyuube", "ds", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpMockTests.java index e5ee5e38bff8..15fde80b82f7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworksListDhcpMockTests { @Test public void testListDhcp() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"wggahttzlswvaj\",\"segments\":[\"t\",\"x\",\"oqza\",\"unwqr\"],\"provisioningState\":\"Failed\",\"revision\":5694532378942953644},\"id\":\"aohcmbuocn\",\"name\":\"r\",\"type\":\"hmbpyryxamebly\"}]}"; + = "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"qymtuowogtgits\",\"segments\":[\"vbrzcdb\",\"nfzndscxmxeat\",\"db\",\"wnrdjyibqbnaom\"],\"provisioningState\":\"Failed\",\"revision\":1446646247795345245},\"id\":\"maxljalfihcj\",\"name\":\"obcancdexxqcw\",\"type\":\"a\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListDhcp() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<WorkloadNetworkDhcp> response - = manager.workloadNetworks().listDhcp("cqtjzmi", "vgbgatzuuvbxng", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().listDhcp("nucaephblkwqpat", "bqsdtcjbctvi", com.azure.core.util.Context.NONE); - Assertions.assertEquals("wggahttzlswvaj", response.iterator().next().properties().displayName()); - Assertions.assertEquals(5694532378942953644L, response.iterator().next().properties().revision()); + Assertions.assertEquals("qymtuowogtgits", response.iterator().next().properties().displayName()); + Assertions.assertEquals(1446646247795345245L, response.iterator().next().properties().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesMockTests.java index 3a657f8c0829..f13a719997c7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesMockTests.java @@ -23,7 +23,7 @@ public final class WorkloadNetworksListDnsServicesMockTests { @Test public void testListDnsServices() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"rpcjttbstvjeaqnr\",\"dnsServiceIp\":\"vfkoxml\",\"defaultDnsZone\":\"ktuidvrm\",\"fqdnZones\":[\"pdwwexymzvlazi\",\"bhpwvqsgnyy\",\"uzivensrpmeyyvp\",\"patlbijp\"],\"logLevel\":\"WARNING\",\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":4964980317496328786},\"id\":\"lmknbnxwcdom\",\"name\":\"pvfqawz\",\"type\":\"gbrt\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"ssbzhddubbnqfbl\",\"dnsServiceIp\":\"alehpav\",\"defaultDnsZone\":\"ugiqjtiogqg\",\"fqdnZones\":[\"nictteajo\"],\"logLevel\":\"WARNING\",\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":6644641159560668077},\"id\":\"pczykmktpvwxqc\",\"name\":\"ehchk\",\"type\":\"ufmpqumqyjgy\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testListDnsServices() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<WorkloadNetworkDnsService> response = manager.workloadNetworks() - .listDnsServices("intqpbrlcyr", "uczkgofxyfsruc", com.azure.core.util.Context.NONE); + PagedIterable<WorkloadNetworkDnsService> response + = manager.workloadNetworks().listDnsServices("dbpb", "fckdvez", com.azure.core.util.Context.NONE); - Assertions.assertEquals("rpcjttbstvjeaqnr", response.iterator().next().displayName()); - Assertions.assertEquals("vfkoxml", response.iterator().next().dnsServiceIp()); - Assertions.assertEquals("ktuidvrm", response.iterator().next().defaultDnsZone()); - Assertions.assertEquals("pdwwexymzvlazi", response.iterator().next().fqdnZones().get(0)); + Assertions.assertEquals("ssbzhddubbnqfbl", response.iterator().next().displayName()); + Assertions.assertEquals("alehpav", response.iterator().next().dnsServiceIp()); + Assertions.assertEquals("ugiqjtiogqg", response.iterator().next().defaultDnsZone()); + Assertions.assertEquals("nictteajo", response.iterator().next().fqdnZones().get(0)); Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, response.iterator().next().logLevel()); - Assertions.assertEquals(4964980317496328786L, response.iterator().next().revision()); + Assertions.assertEquals(6644641159560668077L, response.iterator().next().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesMockTests.java index cd0104d136e7..b7171cecb8b7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworksListDnsZonesMockTests { @Test public void testListDnsZones() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"hihpvecmsl\",\"domain\":[\"lyjxltbsjus\"],\"dnsServerIps\":[\"f\",\"igctmgxuupbezq\",\"cydrtceukdqkk\"],\"sourceIp\":\"hztgeqmgqzgwld\",\"dnsServices\":122850686234484480,\"provisioningState\":\"Succeeded\",\"revision\":6090826264173048120},\"id\":\"fehuwaoaguhi\",\"name\":\"qllizstac\",\"type\":\"jvhrweft\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"dsmaklixqcahyhxa\",\"domain\":[\"xawoijpodtblxp\"],\"dnsServerIps\":[\"j\",\"jodqhykincn\",\"emehllizh\"],\"sourceIp\":\"umoqodkad\",\"dnsServices\":7899924806877093149,\"provisioningState\":\"Building\",\"revision\":7996997609276851113},\"id\":\"d\",\"name\":\"wrxwhydtl\",\"type\":\"vvadswzs\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testListDnsZones() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<WorkloadNetworkDnsZone> response - = manager.workloadNetworks().listDnsZones("cxnafbwqrooh", "uovmaonurjt", com.azure.core.util.Context.NONE); + PagedIterable<WorkloadNetworkDnsZone> response = manager.workloadNetworks() + .listDnsZones("dgrhydkygywezs", "iecafygzmxi", com.azure.core.util.Context.NONE); - Assertions.assertEquals("hihpvecmsl", response.iterator().next().displayName()); - Assertions.assertEquals("lyjxltbsjus", response.iterator().next().domain().get(0)); - Assertions.assertEquals("f", response.iterator().next().dnsServerIps().get(0)); - Assertions.assertEquals("hztgeqmgqzgwld", response.iterator().next().sourceIp()); - Assertions.assertEquals(122850686234484480L, response.iterator().next().dnsServices()); - Assertions.assertEquals(6090826264173048120L, response.iterator().next().revision()); + Assertions.assertEquals("dsmaklixqcahyhxa", response.iterator().next().displayName()); + Assertions.assertEquals("xawoijpodtblxp", response.iterator().next().domain().get(0)); + Assertions.assertEquals("j", response.iterator().next().dnsServerIps().get(0)); + Assertions.assertEquals("umoqodkad", response.iterator().next().sourceIp()); + Assertions.assertEquals(7899924806877093149L, response.iterator().next().dnsServices()); + Assertions.assertEquals(7996997609276851113L, response.iterator().next().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysMockTests.java index 6dbafe376802..82de1cc1063b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworksListGatewaysMockTests { @Test public void testListGateways() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"amwineofvfkakp\",\"path\":\"dt\"},\"id\":\"vboclzhzjk\",\"name\":\"yuxgvttxpnrupz\",\"type\":\"amrdixtrekidswys\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"disczskos\",\"path\":\"qiqazugamxzkr\"},\"id\":\"oiisbamnppcce\",\"name\":\"u\",\"type\":\"tdsbezax\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testListGateways() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<WorkloadNetworkGateway> response - = manager.workloadNetworks().listGateways("jogjonmc", "e", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().listGateways("evadrmmwiu", "wvcmj", com.azure.core.util.Context.NONE); - Assertions.assertEquals("amwineofvfkakp", response.iterator().next().displayName()); + Assertions.assertEquals("disczskos", response.iterator().next().displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListMockTests.java index 8f13ed07828c..e78437aac7a2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListMockTests.java @@ -21,7 +21,7 @@ public final class WorkloadNetworksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\"},\"id\":\"dtjwfljhznamt\",\"name\":\"atmzw\",\"type\":\"jj\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"ndnelqkaadlknw\",\"name\":\"oanniyopetxi\",\"type\":\"cnrly\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<WorkloadNetwork> response - = manager.workloadNetworks().list("jxcx", "rzdcgdzbenribcaw", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().list("yrucpcunnuzdq", "moenodnaien", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringMockTests.java index 37af7e7ebb97..003e7f918efe 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringMockTests.java @@ -23,7 +23,7 @@ public final class WorkloadNetworksListPortMirroringMockTests { @Test public void testListPortMirroring() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"xahmrnadzyqegxy\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"nbm\",\"destination\":\"bjijkgqxnh\",\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":4322750869756620511},\"id\":\"jvaannggiycwkd\",\"name\":\"aawxwfeka\",\"type\":\"mrrqmbzmqkratb\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"zyqu\",\"direction\":\"INGRESS\",\"source\":\"xut\",\"destination\":\"brruyuuatv\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":1345768717971531476},\"id\":\"mxlbn\",\"name\":\"tpc\",\"type\":\"ahprzrvxhmtfhocn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,12 +33,12 @@ public void testListPortMirroring() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<WorkloadNetworkPortMirroring> response - = manager.workloadNetworks().listPortMirroring("njpnnbmj", "sibjgs", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().listPortMirroring("fmhklbnld", "vcb", com.azure.core.util.Context.NONE); - Assertions.assertEquals("xahmrnadzyqegxy", response.iterator().next().displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, response.iterator().next().direction()); - Assertions.assertEquals("nbm", response.iterator().next().source()); - Assertions.assertEquals("bjijkgqxnh", response.iterator().next().destination()); - Assertions.assertEquals(4322750869756620511L, response.iterator().next().revision()); + Assertions.assertEquals("zyqu", response.iterator().next().displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, response.iterator().next().direction()); + Assertions.assertEquals("xut", response.iterator().next().source()); + Assertions.assertEquals("brruyuuatv", response.iterator().next().destination()); + Assertions.assertEquals(1345768717971531476L, response.iterator().next().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsMockTests.java index 46b3b26bbd71..a4681fafeb35 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworksListPublicIPsMockTests { @Test public void testListPublicIPs() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"sqxfxjelgcmpz\",\"numberOfPublicIPs\":914834746894077658,\"publicIPBlock\":\"qxuwyvca\",\"provisioningState\":\"Succeeded\"},\"id\":\"i\",\"name\":\"bsizus\",\"type\":\"szlbscm\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"iiy\",\"numberOfPublicIPs\":2920049481955409333,\"publicIPBlock\":\"izbcufqbvntnr\",\"provisioningState\":\"Canceled\"},\"id\":\"orhc\",\"name\":\"kxgnlykmxcpwzvmd\",\"type\":\"ksqd\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListPublicIPs() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<WorkloadNetworkPublicIp> response - = manager.workloadNetworks().listPublicIPs("ralcxpjbyypsj", "qcjenkyhf", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().listPublicIPs("ssoljom", "vtfycnlbvgjcodk", com.azure.core.util.Context.NONE); - Assertions.assertEquals("sqxfxjelgcmpz", response.iterator().next().displayName()); - Assertions.assertEquals(914834746894077658L, response.iterator().next().numberOfPublicIPs()); + Assertions.assertEquals("iiy", response.iterator().next().displayName()); + Assertions.assertEquals(2920049481955409333L, response.iterator().next().numberOfPublicIPs()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsMockTests.java index 5c0433975f93..3ffab682d83a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworksListSegmentsMockTests { @Test public void testListSegments() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"dnqodx\",\"connectedGateway\":\"h\",\"subnet\":{\"dhcpRanges\":[\"aqnvzoqgyipemchg\",\"v\"],\"gatewayAddress\":\"zuejd\"},\"portVif\":[{\"portName\":\"lghwzhome\"},{\"portName\":\"j\"},{\"portName\":\"liuhqawmoaiancz\"},{\"portName\":\"odrrslblxyd\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":3776037212037514510},\"id\":\"wkgfbqljnqkh\",\"name\":\"chocokulehur\",\"type\":\"lrqff\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"qb\",\"connectedGateway\":\"vafjrqpjiyrqj\",\"subnet\":{\"dhcpRanges\":[\"xwmzwdfkbnrz\"],\"gatewayAddress\":\"pdltbq\"},\"portVif\":[{\"portName\":\"fg\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":3137492897950537576},\"id\":\"gvpyigdaqqilzdc\",\"name\":\"uwjoedxnguca\",\"type\":\"fpaurw\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testListSegments() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<WorkloadNetworkSegment> response = manager.workloadNetworks() - .listSegments("gookrtalvnb", "gpbemeluclvdjju", com.azure.core.util.Context.NONE); + PagedIterable<WorkloadNetworkSegment> response + = manager.workloadNetworks().listSegments("eintxwaljglzobl", "waafrqulh", com.azure.core.util.Context.NONE); - Assertions.assertEquals("dnqodx", response.iterator().next().displayName()); - Assertions.assertEquals("h", response.iterator().next().connectedGateway()); - Assertions.assertEquals("aqnvzoqgyipemchg", response.iterator().next().subnet().dhcpRanges().get(0)); - Assertions.assertEquals("zuejd", response.iterator().next().subnet().gatewayAddress()); - Assertions.assertEquals(3776037212037514510L, response.iterator().next().revision()); + Assertions.assertEquals("qb", response.iterator().next().displayName()); + Assertions.assertEquals("vafjrqpjiyrqj", response.iterator().next().connectedGateway()); + Assertions.assertEquals("xwmzwdfkbnrz", response.iterator().next().subnet().dhcpRanges().get(0)); + Assertions.assertEquals("pdltbq", response.iterator().next().subnet().gatewayAddress()); + Assertions.assertEquals(3137492897950537576L, response.iterator().next().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsMockTests.java index 4fe40c9a1687..07a330f5069c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworksListVMGroupsMockTests { @Test public void testListVMGroups() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"enazerohzrsqals\",\"members\":[\"nwqapfgsdpcvess\",\"zhhkuuipldqqc\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":6610962053127577099},\"id\":\"tjqvqyvweht\",\"name\":\"emxhzzy\",\"type\":\"ev\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"jceagb\",\"members\":[\"lsumywzashx\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":1543441931659249742},\"id\":\"puby\",\"name\":\"nclkfkeeb\",\"type\":\"vop\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testListVMGroups() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<WorkloadNetworkVMGroup> response - = manager.workloadNetworks().listVMGroups("sybwptdaca", "vvlfntymtp", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().listVMGroups("srv", "i", com.azure.core.util.Context.NONE); - Assertions.assertEquals("enazerohzrsqals", response.iterator().next().displayName()); - Assertions.assertEquals("nwqapfgsdpcvess", response.iterator().next().members().get(0)); - Assertions.assertEquals(6610962053127577099L, response.iterator().next().revision()); + Assertions.assertEquals("jceagb", response.iterator().next().displayName()); + Assertions.assertEquals("lsumywzashx", response.iterator().next().members().get(0)); + Assertions.assertEquals(1543441931659249742L, response.iterator().next().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesMockTests.java index f81c69761641..61bc1dc52824 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworksListVirtualMachinesMockTests { @Test public void testListVirtualMachines() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"ndlqvtwknvgmmbu\",\"vmType\":\"SERVICE\"},\"id\":\"atmqaqkuea\",\"name\":\"groeshoyg\",\"type\":\"cbyfqxkf\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"medeil\",\"vmType\":\"SERVICE\"},\"id\":\"fcfxzirzzihvwy\",\"name\":\"usuv\",\"type\":\"slczwciidjsllf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testListVirtualMachines() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<WorkloadNetworkVirtualMachine> response - = manager.workloadNetworks().listVirtualMachines("kukjtasb", "wispkxk", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().listVirtualMachines("k", "gqogjwpindedva", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ndlqvtwknvgmmbu", response.iterator().next().displayName()); + Assertions.assertEquals("medeil", response.iterator().next().displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml index 5b7efa9bd1df..61080c05ae6f 100644 --- a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml +++ b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/vmware/resource-manager/Microsoft.AVS/AVS -commit: 05584a1019e75159b0dc70a6751afaa2c77868e6 +commit: 8ddf0b8379d711e33e9881f8e5cc0beb044c5b42 repo: Azure/azure-rest-api-specs additionalDirectories: From 993974161794f9fe2e37f304af1dcc3d2dc22cd7 Mon Sep 17 00:00:00 2001 From: v-huizhu2 <v-huizhu2@microsoft.com> Date: Thu, 18 Dec 2025 14:48:11 +0800 Subject: [PATCH 177/186] release(containerservice): update version to 2.58.0-beta.2 (#47577) - Incremented beta version from 2.58.0-beta.1 to 2.58.0-beta.2 - Updated changelog to reflect new beta release - Adjusted version client tracking for containerservice package --- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 10 +++++++++- .../azure-resourcemanager-containerservice/pom.xml | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 7bc84f8581ce..5ecf0b9a3f3a 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -278,7 +278,7 @@ com.azure.resourcemanager:azure-resourcemanager-cdn;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-compute;2.55.1;2.56.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.53.6;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.54.1;2.55.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-containerservice;2.57.0;2.58.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-containerservice;2.57.0;2.58.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-cosmos;2.54.0;2.55.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-dns;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.53.5;2.54.0-beta.1 diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md index b98861f75c9c..c9d9188384d7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.58.0-beta.1 (Unreleased) +## 2.58.0-beta.2 (Unreleased) ### Features Added @@ -10,6 +10,14 @@ ### Other Changes +## 2.58.0-beta.1 (2025-12-15) + +### Other Changes + +#### Dependency Updates + +- Updated `api-version` to `2025-10-02-preview`. + ## 2.57.0 (2025-12-15) ### Other Changes diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml b/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml index 859698b81957..511213e680b0 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml +++ b/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml @@ -10,7 +10,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerservice</artifactId> - <version>2.58.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerservice;current} --> + <version>2.58.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerservice;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for Container Service Management</name> From 636a1b9e690fda06eec1c1a4d180b4af61f030c8 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Thu, 18 Dec 2025 15:31:21 +0800 Subject: [PATCH 178/186] Fix and update --- eng/versioning/external_dependencies.txt | 1 + sdk/spring/azure-spring-data-cosmos/pom.xml | 1 - .../pom.xml | 7 --- .../spring-cloud-azure-actuator/pom.xml | 1 - .../spring-cloud-azure-autoconfigure/pom.xml | 54 ++++++------------- ...zureCloudTypeEnvironmentPostProcessor.java | 2 +- .../test/resources/META-INF/spring.factories | 4 +- .../pom.xml | 29 +++++----- .../pom.xml | 17 +++--- .../pom.xml | 6 +-- .../pom.xml | 6 +++ .../pom.xml | 6 +++ .../pom.xml | 6 +-- 13 files changed, 66 insertions(+), 74 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 9d69ec5aaf40..b1f6b1a6519f 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -360,6 +360,7 @@ springboot4_org.springframework.boot:spring-boot-restclient;4.0.0 springboot4_org.springframework.boot:spring-boot-resttestclient;4.0.0 springboot4_org.springframework.boot:spring-boot-security;4.0.0 springboot4_org.springframework.boot:spring-boot-security-oauth2-client;4.0.0 +springboot4_org.springframework.boot:spring-boot-security-oauth2-resource-server;4.0.0 springboot4_org.springframework.boot:spring-boot-starter-actuator;4.0.0 springboot4_org.springframework.boot:spring-boot-starter-data-jdbc;4.0.0 springboot4_org.springframework.boot:spring-boot-starter-integration;4.0.0 diff --git a/sdk/spring/azure-spring-data-cosmos/pom.xml b/sdk/spring/azure-spring-data-cosmos/pom.xml index 09cacef6a35c..d8af383f3a12 100644 --- a/sdk/spring/azure-spring-data-cosmos/pom.xml +++ b/sdk/spring/azure-spring-data-cosmos/pom.xml @@ -95,7 +95,6 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-persistence</artifactId> <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-persistence;external_dependency} --> - <scope>test</scope> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml index 358dd3db23de..4d795930dc2b 100644 --- a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml @@ -44,12 +44,6 @@ <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-actuator-autoconfigure;external_dependency} --> <scope>compile</scope> </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-health</artifactId> - <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-health;external_dependency} --> - <optional>true</optional> - </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> @@ -208,7 +202,6 @@ <include>com.fasterxml.jackson.core:jackson-databind:[2.20.1]</include> <!-- {x-include-update;springboot4_com.fasterxml.jackson.core:jackson-databind;external_dependency} --> <include>org.springframework.boot:spring-boot-actuator:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-actuator;external_dependency} --> <include>org.springframework.boot:spring-boot-actuator-autoconfigure:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-actuator-autoconfigure;external_dependency} --> - <include>org.springframework.boot:spring-boot-health:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-health;external_dependency} --> </includes> </bannedDependencies> </rules> diff --git a/sdk/spring/spring-cloud-azure-actuator/pom.xml b/sdk/spring/spring-cloud-azure-actuator/pom.xml index 91f317b47737..5b610b636c51 100644 --- a/sdk/spring/spring-cloud-azure-actuator/pom.xml +++ b/sdk/spring/spring-cloud-azure-actuator/pom.xml @@ -52,7 +52,6 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-health</artifactId> <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-health;external_dependency} --> - <optional>true</optional> </dependency> <!-- Azure SDKs--> diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index 15b4287e8902..165020877731 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -170,14 +170,6 @@ <optional>true</optional> </dependency> - <!--Spring Security--> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-security</artifactId> - <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-security;external_dependency} --> - <optional>true</optional> - </dependency> - <!--Jackson--> <dependency> <groupId>org.springframework.boot</groupId> @@ -352,30 +344,30 @@ <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-configuration-processor;external_dependency} --> <optional>true</optional> </dependency> - - <!-- Spring Security--> <dependency> - <groupId>org.springframework.security</groupId> - <artifactId>spring-security-oauth2-client</artifactId> - <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-oauth2-client;external_dependency} --> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-http-converter</artifactId> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-http-converter;external_dependency} --> <optional>true</optional> </dependency> + + <!-- Spring Security--> <dependency> - <groupId>org.springframework.security</groupId> - <artifactId>spring-security-oauth2-resource-server</artifactId> - <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-oauth2-resource-server;external_dependency} --> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-security</artifactId> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-security;external_dependency} --> <optional>true</optional> </dependency> <dependency> - <groupId>org.springframework.security</groupId> - <artifactId>spring-security-oauth2-jose</artifactId> - <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-oauth2-jose;external_dependency} --> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-security-oauth2-client</artifactId> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-security-oauth2-client;external_dependency} --> <optional>true</optional> </dependency> <dependency> - <groupId>org.springframework.security</groupId> - <artifactId>spring-security-config</artifactId> - <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-config;external_dependency} --> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-security-oauth2-resource-server</artifactId> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-security-oauth2-resource-server;external_dependency} --> <optional>true</optional> </dependency> @@ -415,18 +407,6 @@ </dependency> <!-- TEST--> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-security-oauth2-client</artifactId> - <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-security-oauth2-client;external_dependency} --> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-http-converter</artifactId> - <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-http-converter;external_dependency} --> - <scope>test</scope> - </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> @@ -559,11 +539,9 @@ <include>org.springframework.boot:spring-boot-jms:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-jms;external_dependency} --> <include>org.springframework.boot:spring-boot-restclient:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-restclient;external_dependency} --> <include>org.springframework.boot:spring-boot-security:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-security;external_dependency} --> + <include>org.springframework.boot:spring-boot-security-oauth2-client:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-security-oauth2-client;external_dependency} --> + <include>org.springframework.boot:spring-boot-security-oauth2-resource-server:[4.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.boot:spring-boot-security-oauth2-resource-server;external_dependency} --> <include>org.springframework.cloud:spring-cloud-starter-stream-kafka:[5.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.cloud:spring-cloud-starter-stream-kafka;external_dependency} --> - <include>org.springframework.security:spring-security-config:[7.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.security:spring-security-config;external_dependency} --> - <include>org.springframework.security:spring-security-oauth2-client:[7.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.security:spring-security-oauth2-client;external_dependency} --> - <include>org.springframework.security:spring-security-oauth2-jose:[7.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.security:spring-security-oauth2-jose;external_dependency} --> - <include>org.springframework.security:spring-security-oauth2-resource-server:[7.0.0]</include> <!-- {x-include-update;springboot4_org.springframework.security:spring-security-oauth2-resource-server;external_dependency} --> <include>org.springframework:spring-context-support:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-context-support;external_dependency} --> <include>org.springframework:spring-tx:[7.0.1]</include> <!-- {x-include-update;springboot4_org.springframework:spring-tx;external_dependency} --> </includes> diff --git a/sdk/spring/spring-cloud-azure-integration-tests/src/test/java/com/azure/spring/cloud/integration/tests/AzureCloudTypeEnvironmentPostProcessor.java b/sdk/spring/spring-cloud-azure-integration-tests/src/test/java/com/azure/spring/cloud/integration/tests/AzureCloudTypeEnvironmentPostProcessor.java index 5a357212f50c..1f7d8de43065 100644 --- a/sdk/spring/spring-cloud-azure-integration-tests/src/test/java/com/azure/spring/cloud/integration/tests/AzureCloudTypeEnvironmentPostProcessor.java +++ b/sdk/spring/spring-cloud-azure-integration-tests/src/test/java/com/azure/spring/cloud/integration/tests/AzureCloudTypeEnvironmentPostProcessor.java @@ -7,7 +7,7 @@ import com.azure.spring.cloud.core.provider.AzureProfileOptionsProvider; import org.apache.commons.logging.Log; import org.springframework.boot.SpringApplication; -import org.springframework.boot.env.EnvironmentPostProcessor; +import org.springframework.boot.EnvironmentPostProcessor; import org.springframework.boot.logging.DeferredLog; import org.springframework.core.Ordered; import org.springframework.core.env.ConfigurableEnvironment; diff --git a/sdk/spring/spring-cloud-azure-integration-tests/src/test/resources/META-INF/spring.factories b/sdk/spring/spring-cloud-azure-integration-tests/src/test/resources/META-INF/spring.factories index cb9011b2f326..bc96fcb50b32 100644 --- a/sdk/spring/spring-cloud-azure-integration-tests/src/test/resources/META-INF/spring.factories +++ b/sdk/spring/spring-cloud-azure-integration-tests/src/test/resources/META-INF/spring.factories @@ -1,2 +1,2 @@ -org.springframework.boot.env.EnvironmentPostProcessor=com.azure.spring.cloud.integration.tests.AzureCloudTypeEnvironmentPostProcessor -org.springframework.boot.BootstrapRegistryInitializer=com.azure.spring.cloud.integration.tests.keyvault.secret.TestBootstrapRegistryInitializer +org.springframework.boot.EnvironmentPostProcessor=com.azure.spring.cloud.integration.tests.AzureCloudTypeEnvironmentPostProcessor +org.springframework.boot.bootstrap.BootstrapRegistryInitializer=com.azure.spring.cloud.integration.tests.keyvault.secret.TestBootstrapRegistryInitializer diff --git a/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml b/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml index 963233cade39..cd16945bae8c 100644 --- a/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml @@ -93,24 +93,29 @@ <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> - <groupId>org.springframework.security</groupId> - <artifactId>spring-security-config</artifactId> - <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-config;external_dependency} --> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-restclient</artifactId> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-restclient;external_dependency} --> </dependency> <dependency> - <groupId>org.springframework.security</groupId> - <artifactId>spring-security-oauth2-client</artifactId> - <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-oauth2-client;external_dependency} --> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-security</artifactId> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-security;external_dependency} --> </dependency> <dependency> - <groupId>org.springframework.security</groupId> - <artifactId>spring-security-oauth2-jose</artifactId> - <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-oauth2-jose;external_dependency} --> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-security-oauth2-client</artifactId> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-security-oauth2-client;external_dependency} --> </dependency> <dependency> - <groupId>org.springframework.security</groupId> - <artifactId>spring-security-oauth2-resource-server</artifactId> - <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-oauth2-resource-server;external_dependency} --> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-security-oauth2-resource-server</artifactId> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-security-oauth2-resource-server;external_dependency} --> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-http-converter</artifactId> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-http-converter;external_dependency} --> </dependency> </dependencies> diff --git a/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml b/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml index 7a9ebb483ba0..f7e39a4ec33a 100644 --- a/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml @@ -92,14 +92,19 @@ <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> - <groupId>org.springframework.security</groupId> - <artifactId>spring-security-web</artifactId> - <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-web;external_dependency} --> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-restclient</artifactId> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-restclient;external_dependency} --> </dependency> <dependency> - <groupId>org.springframework.security</groupId> - <artifactId>spring-security-config</artifactId> - <version>7.0.0</version> <!-- {x-version-update;springboot4_org.springframework.security:spring-security-config;external_dependency} --> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-security</artifactId> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-security;external_dependency} --> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-http-converter</artifactId> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-http-converter;external_dependency} --> </dependency> <dependency> <groupId>com.nimbusds</groupId> diff --git a/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml b/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml index c5e31d62f20c..c75af4984cca 100644 --- a/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml @@ -93,9 +93,9 @@ </dependency> <dependency> - <groupId>org.springframework.data</groupId> - <artifactId>spring-data-redis</artifactId> - <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.data:spring-data-redis;external_dependency} --> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-data-redis</artifactId> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.data:spring-boot-data-redis;external_dependency} --> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-starter-jdbc-mysql/pom.xml b/sdk/spring/spring-cloud-azure-starter-jdbc-mysql/pom.xml index 368ea925b3f0..e9a8ed41efed 100644 --- a/sdk/spring/spring-cloud-azure-starter-jdbc-mysql/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-jdbc-mysql/pom.xml @@ -103,6 +103,12 @@ <artifactId>mysql-connector-j</artifactId> <version>9.5.0</version> <!-- {x-version-update;springboot4_com.mysql:mysql-connector-j;external_dependency} --> </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-jdbc</artifactId> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-jdbc;external_dependency} --> + </dependency> </dependencies> <build> diff --git a/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql/pom.xml b/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql/pom.xml index d567ba95bb13..a0f1a0599be8 100644 --- a/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql/pom.xml @@ -103,6 +103,12 @@ <artifactId>postgresql</artifactId> <version>42.7.8</version> <!-- {x-version-update;springboot4_org.postgresql:postgresql;external_dependency} --> </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-jdbc</artifactId> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-jdbc;external_dependency} --> + </dependency> </dependencies> <build> diff --git a/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml b/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml index 3b467c8d7339..f81acf8b92e4 100644 --- a/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml @@ -94,9 +94,9 @@ <!--Spring JMS--> <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-jms</artifactId> - <version>7.0.1</version> <!-- {x-version-update;springboot4_org.springframework:spring-jms;external_dependency} --> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-jms</artifactId> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework:spring-boot-jms;external_dependency} --> </dependency> <dependency> <groupId>org.messaginghub</groupId> From 35b9c7ccd83f4a558442b73b1ecb6f98aac5e1a7 Mon Sep 17 00:00:00 2001 From: Muyao Feng <92105726+Netyyyy@users.noreply.github.com> Date: Thu, 18 Dec 2025 17:11:06 +0800 Subject: [PATCH 179/186] Merge to main after spring cloud azure 6.1.0 released (#47578) * Prepare for Spring Cloud Azure 6.1.0 release (#47562) * Initial plan * Prepare for Spring Cloud Azure 6.1.0 release - update versions and CHANGELOGs Co-authored-by: Netyyyy <92105726+Netyyyy@users.noreply.github.com> * update --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * Increment versions for spring releases (#47576) * Increment package versions for spring releases * Update spring-cloud-azure-dependencies version * Update pom.xml --------- Co-authored-by: Muyao Feng <92105726+Netyyyy@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> --- eng/versioning/version_client.txt | 110 +++++++++--------- .../spring-cloud-azure-dependencies/pom.xml | 4 +- sdk/spring/CHANGELOG.md | 22 +++- sdk/spring/README.md | 2 +- .../azure-spring-data-cosmos/CHANGELOG.md | 7 +- sdk/spring/azure-spring-data-cosmos/README.md | 2 +- sdk/spring/azure-spring-data-cosmos/pom.xml | 2 +- .../CHANGELOG.md | 6 +- .../pom.xml | 8 +- .../spring-cloud-azure-actuator/CHANGELOG.md | 6 +- .../spring-cloud-azure-actuator/pom.xml | 4 +- .../CHANGELOG.md | 6 +- .../pom.xml | 4 +- .../CHANGELOG.md | 8 +- .../pom.xml | 6 +- .../CHANGELOG.md | 6 +- .../spring-cloud-azure-autoconfigure/pom.xml | 14 +-- .../spring-cloud-azure-core/CHANGELOG.md | 6 +- sdk/spring/spring-cloud-azure-core/pom.xml | 2 +- .../CHANGELOG.md | 6 +- .../spring-cloud-azure-docker-compose/pom.xml | 4 +- .../CHANGELOG.md | 6 +- .../pom.xml | 6 +- .../CHANGELOG.md | 6 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 26 ++--- .../CHANGELOG.md | 6 +- .../pom.xml | 4 +- .../spring-cloud-azure-service/CHANGELOG.md | 6 +- sdk/spring/spring-cloud-azure-service/pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 6 +- .../CHANGELOG.md | 6 +- .../README.md | 4 +- .../pom.xml | 6 +- .../pom.xml | 4 +- .../spring-cloud-azure-starter-cosmos/pom.xml | 4 +- .../pom.xml | 6 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 6 +- .../pom.xml | 6 +- .../pom.xml | 6 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 8 +- .../pom.xml | 2 +- .../CHANGELOG.md | 6 +- .../pom.xml | 2 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 8 +- .../pom.xml | 4 +- .../pom.xml | 4 +- sdk/spring/spring-cloud-azure-starter/pom.xml | 4 +- .../CHANGELOG.md | 6 +- .../pom.xml | 4 +- .../CHANGELOG.md | 6 +- .../pom.xml | 8 +- .../CHANGELOG.md | 6 +- .../pom.xml | 4 +- .../CHANGELOG.md | 6 +- .../pom.xml | 8 +- .../CHANGELOG.md | 6 +- .../spring-cloud-azure-testcontainers/pom.xml | 6 +- .../CHANGELOG.md | 6 +- .../spring-integration-azure-core/pom.xml | 4 +- .../CHANGELOG.md | 6 +- .../pom.xml | 8 +- .../CHANGELOG.md | 6 +- .../pom.xml | 10 +- .../CHANGELOG.md | 6 +- .../pom.xml | 6 +- .../CHANGELOG.md | 6 +- .../spring-messaging-azure-eventhubs/pom.xml | 6 +- .../CHANGELOG.md | 6 +- .../spring-messaging-azure-servicebus/pom.xml | 6 +- .../CHANGELOG.md | 6 +- .../pom.xml | 6 +- .../spring-messaging-azure/CHANGELOG.md | 6 +- sdk/spring/spring-messaging-azure/pom.xml | 4 +- 90 files changed, 370 insertions(+), 243 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 5ecf0b9a3f3a..382b8181f6c8 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -215,61 +215,61 @@ com.microsoft.azure:azure-batch;11.2.0;11.3.0-beta.1 com.microsoft.azure:azure-eventhubs;3.3.0;3.4.0-beta.1 com.microsoft.azure:azure-servicebus;3.6.7;3.7.0-beta.1 com.azure.spring:azure-monitor-spring-native-test;1.0.0-beta.1;1.0.0-beta.1 -com.azure.spring:spring-cloud-azure-appconfiguration-config-web;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-appconfiguration-config;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-feature-management-web;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-feature-management;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-appconfiguration-config;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-dependencies;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-messaging-azure;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-messaging-azure-eventhubs;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-messaging-azure-servicebus;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-messaging-azure-storage-queue;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-integration-azure-core;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-integration-azure-eventhubs;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-integration-azure-servicebus;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-integration-azure-storage-queue;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-core;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-actuator-autoconfigure;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-actuator;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-autoconfigure;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-docker-compose;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-resourcemanager;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-service;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-active-directory;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-active-directory-b2c;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-actuator;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-appconfiguration;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-cosmos;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-data-cosmos;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-data-redis-lettuce;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-eventhubs;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-eventgrid;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-jdbc-mysql;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-jdbc-postgresql;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-keyvault;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-keyvault-certificates;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-keyvault-jca;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-keyvault-secrets;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-monitor;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-servicebus-jms;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-servicebus;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-storage;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-storage-blob;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-storage-file-share;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-storage-queue;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-integration-eventhubs;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-integration-servicebus;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-integration-storage-queue;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-stream-eventhubs;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter-stream-servicebus;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-starter;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-stream-binder-eventhubs-core;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-stream-binder-eventhubs;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-stream-binder-servicebus-core;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-stream-binder-servicebus;6.0.0;6.1.0-beta.1 -com.azure.spring:spring-cloud-azure-testcontainers;6.0.0;6.1.0-beta.1 -com.azure:azure-spring-data-cosmos;6.0.0;6.1.0-beta.1 +com.azure.spring:spring-cloud-azure-appconfiguration-config-web;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-appconfiguration-config;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-feature-management-web;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-feature-management;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-appconfiguration-config;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-dependencies;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-messaging-azure;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-messaging-azure-eventhubs;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-messaging-azure-servicebus;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-messaging-azure-storage-queue;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-integration-azure-core;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-integration-azure-eventhubs;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-integration-azure-servicebus;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-integration-azure-storage-queue;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-core;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-actuator-autoconfigure;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-actuator;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-autoconfigure;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-docker-compose;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-resourcemanager;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-service;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-active-directory;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-active-directory-b2c;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-actuator;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-appconfiguration;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-cosmos;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-data-cosmos;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-data-redis-lettuce;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-eventhubs;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-eventgrid;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-jdbc-mysql;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-jdbc-postgresql;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-keyvault;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-keyvault-certificates;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-keyvault-jca;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-keyvault-secrets;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-monitor;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-servicebus-jms;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-servicebus;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-storage;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-storage-blob;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-storage-file-share;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-storage-queue;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-integration-eventhubs;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-integration-servicebus;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-integration-storage-queue;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-stream-eventhubs;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter-stream-servicebus;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-starter;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-stream-binder-eventhubs-core;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-stream-binder-eventhubs;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-stream-binder-servicebus-core;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-stream-binder-servicebus;6.1.0;6.2.0-beta.1 +com.azure.spring:spring-cloud-azure-testcontainers;6.1.0;6.2.0-beta.1 +com.azure:azure-spring-data-cosmos;6.1.0;6.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager;2.57.0;2.58.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-appplatform;2.51.0;2.52.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-appservice;2.54.1;2.55.0-beta.1 diff --git a/sdk/boms/spring-cloud-azure-dependencies/pom.xml b/sdk/boms/spring-cloud-azure-dependencies/pom.xml index 431e67e86049..0c9af5132d49 100644 --- a/sdk/boms/spring-cloud-azure-dependencies/pom.xml +++ b/sdk/boms/spring-cloud-azure-dependencies/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-dependencies</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-dependencies;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-dependencies;current} --> <packaging>pom</packaging> <name>Spring Cloud Azure Dependencies</name> @@ -53,7 +53,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-sdk-bom</artifactId> - <version>1.2.38</version> <!-- NOTE: This should be updated manually. --> + <version>1.3.3</version> <!-- NOTE: This should be updated manually. --> <type>pom</type> <scope>import</scope> </dependency> diff --git a/sdk/spring/CHANGELOG.md b/sdk/spring/CHANGELOG.md index a2a6a09128fc..3a65e0f34f4d 100644 --- a/sdk/spring/CHANGELOG.md +++ b/sdk/spring/CHANGELOG.md @@ -1,6 +1,14 @@ # Release History -## 6.1.0 (Not released) +## 6.1.0 (2025-12-16) +- This release is compatible with Spring Boot 3.5.0-3.5.8. (Note: 3.5.x (x>8) should be supported, but they aren't tested with this release.) +- This release is compatible with Spring Cloud 2025.0.0. (Note: 2025.0.x (x>0) should be supported, but they aren't tested with this release.) + +### Spring Cloud Azure Dependencies (BOM) + +#### Dependency Updates +- Upgrade `azure-sdk-bom` to 1.3.3. +- Upgrade `azure-servicebus-jms` to 2.1.0. ### Spring Cloud Azure Autoconfigure This section includes changes in `spring-cloud-azure-autoconfigure` module. @@ -13,6 +21,18 @@ This section includes changes in `spring-cloud-azure-autoconfigure` module. - 2 `TokenCredential` bean found in AzureServiceBusMessagingAutoConfiguration. [#47470](https://github.com/Azure/azure-sdk-for-java/pull/47470) - `spring.cloud.azure.eventhubs.credential.token-credential-bean-name` not take effect in AzureEventHubsMessagingAutoConfiguration. [#47470](https://github.com/Azure/azure-sdk-for-java/pull/47470) +- Fix bug: 'token-credential-bean-name' not work in spring-cloud-azure-stream-binder. [#47557](https://github.com/Azure/azure-sdk-for-java/pull/47557) + +### Spring Cloud Azure Appconfiguration Config +This section includes changes in `spring-cloud-azure-appconfiguration-config` module. + +#### Bugs Fixed + +- Fixed bug where `spring.cloud.azure.appconfiguration.enabled=false` was ignored in the new major version. [#47029](https://github.com/Azure/azure-sdk-for-java/pull/47029) + +### Azure Spring Data Cosmos +This section includes changes in `azure-spring-data-cosmos` module. +Please refer to [azure-spring-data-cosmos/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/azure-spring-data-cosmos/CHANGELOG.md#610-2025-12-16) for more details. ## 5.24.1 (2025-12-09) - This release is compatible with Spring Boot 3.5.0-3.5.8, 3.4.0-3.4.12, 3.3.0-3.3.13, 3.2.0-3.2.12, 3.1.0-3.1.12, 3.0.0-3.0.13. (Note: 3.5.x (x>8) and 3.4.y (y>12) should be supported, but they aren't tested with this release.) diff --git a/sdk/spring/README.md b/sdk/spring/README.md index f53a8c94de8c..972b196c52be 100644 --- a/sdk/spring/README.md +++ b/sdk/spring/README.md @@ -146,7 +146,7 @@ If you’re a Maven user, add our BOM to your pom.xml `<dependencyManagement>` s <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-dependencies</artifactId> - <version>6.0.0</version> + <version>6.1.0</version> <type>pom</type> <scope>import</scope> </dependency> diff --git a/sdk/spring/azure-spring-data-cosmos/CHANGELOG.md b/sdk/spring/azure-spring-data-cosmos/CHANGELOG.md index 2ad70c47631e..8549dd8fb54d 100644 --- a/sdk/spring/azure-spring-data-cosmos/CHANGELOG.md +++ b/sdk/spring/azure-spring-data-cosmos/CHANGELOG.md @@ -1,6 +1,6 @@ ## Release History -### 6.1.0-beta.1 (Unreleased) +### 6.2.0-beta.1 (Unreleased) #### Features Added @@ -10,6 +10,11 @@ #### Other Changes +### 6.1.0 (2025-12-16) + +#### Other Changes +* regular release + ### 5.24.1 (2025-12-09) #### Other Changes diff --git a/sdk/spring/azure-spring-data-cosmos/README.md b/sdk/spring/azure-spring-data-cosmos/README.md index 8bc3fb3856db..bffdf144499d 100644 --- a/sdk/spring/azure-spring-data-cosmos/README.md +++ b/sdk/spring/azure-spring-data-cosmos/README.md @@ -100,7 +100,7 @@ If you are using Maven, add the following dependency. <dependency> <groupId>com.azure</groupId> <artifactId>azure-spring-data-cosmos</artifactId> - <version>6.0.0</version> + <version>6.1.0</version> </dependency> ``` [//]: # ({x-version-update-end}) diff --git a/sdk/spring/azure-spring-data-cosmos/pom.xml b/sdk/spring/azure-spring-data-cosmos/pom.xml index 5d22330df9a0..0b061eff639a 100644 --- a/sdk/spring/azure-spring-data-cosmos/pom.xml +++ b/sdk/spring/azure-spring-data-cosmos/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure</groupId> <artifactId>azure-spring-data-cosmos</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos;current} --> <packaging>jar</packaging> <name>Spring Data for Azure Cosmos DB SQL API</name> <description>Spring Data for Azure Cosmos DB SQL API</description> diff --git a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/CHANGELOG.md b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/CHANGELOG.md index 65d97b19149e..b8c75ef9dc93 100644 --- a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml index 2af86656a78c..2338af63e250 100644 --- a/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-actuator-autoconfigure/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-actuator-autoconfigure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-actuator-autoconfigure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-actuator-autoconfigure;current} --> <name>Spring Cloud Azure Actuator AutoConfigure</name> <description>Spring Cloud Azure Starter Actuator AutoConfigure</description> @@ -52,17 +52,17 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-actuator</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-actuator;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-actuator;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-autoconfigure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId> - <version>6.1.0-beta.1</version><!-- {x-version-update;com.azure.spring:spring-cloud-azure-appconfiguration-config-web;current} --> + <version>6.2.0-beta.1</version><!-- {x-version-update;com.azure.spring:spring-cloud-azure-appconfiguration-config-web;current} --> <optional>true</optional> </dependency> diff --git a/sdk/spring/spring-cloud-azure-actuator/CHANGELOG.md b/sdk/spring/spring-cloud-azure-actuator/CHANGELOG.md index 65d97b19149e..b8c75ef9dc93 100644 --- a/sdk/spring/spring-cloud-azure-actuator/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-actuator/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-actuator/pom.xml b/sdk/spring/spring-cloud-azure-actuator/pom.xml index 5e48264f96a0..666ff849a58b 100644 --- a/sdk/spring/spring-cloud-azure-actuator/pom.xml +++ b/sdk/spring/spring-cloud-azure-actuator/pom.xml @@ -17,7 +17,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-actuator</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-actuator;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-actuator;current} --> <name>Spring Cloud Azure Actuator</name> <url>https://microsoft.github.io/spring-cloud-azure</url> @@ -109,7 +109,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId> - <version>6.1.0-beta.1</version><!-- {x-version-update;com.azure.spring:spring-cloud-azure-appconfiguration-config-web;current} --> + <version>6.2.0-beta.1</version><!-- {x-version-update;com.azure.spring:spring-cloud-azure-appconfiguration-config-web;current} --> <optional>true</optional> </dependency> <!-- For Testing --> diff --git a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/CHANGELOG.md b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/CHANGELOG.md index 27272ba2eeff..3b49a0b70b0b 100644 --- a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/pom.xml b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/pom.xml index 7ae8e6b847eb..ced190f354a2 100644 --- a/sdk/spring/spring-cloud-azure-appconfiguration-config-web/pom.xml +++ b/sdk/spring/spring-cloud-azure-appconfiguration-config-web/pom.xml @@ -9,7 +9,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-appconfiguration-config-web;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-appconfiguration-config-web;current} --> <name>Spring Cloud Azure App Configuration Config Web</name> <description>Integration of Spring Cloud Config and Azure App Configuration Service</description> <properties> @@ -21,7 +21,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-appconfiguration-config</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-appconfiguration-config;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-appconfiguration-config;current} --> </dependency> <dependency> <groupId>org.springframework.boot</groupId> diff --git a/sdk/spring/spring-cloud-azure-appconfiguration-config/CHANGELOG.md b/sdk/spring/spring-cloud-azure-appconfiguration-config/CHANGELOG.md index 70c28ecfe635..ca21a19bdf21 100644 --- a/sdk/spring/spring-cloud-azure-appconfiguration-config/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-appconfiguration-config/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -8,10 +8,12 @@ ### Bugs Fixed -- Fixed bug where `spring.cloud.azure.appconfiguration.enabled=false` was ignored in the new major version. - ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-appconfiguration-config/pom.xml b/sdk/spring/spring-cloud-azure-appconfiguration-config/pom.xml index f945d5fed552..2c9630490c3d 100644 --- a/sdk/spring/spring-cloud-azure-appconfiguration-config/pom.xml +++ b/sdk/spring/spring-cloud-azure-appconfiguration-config/pom.xml @@ -9,7 +9,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-appconfiguration-config</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-appconfiguration-config;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-appconfiguration-config;current} --> <name>Spring Cloud Azure App Configuration Config</name> <description>Integration of Spring Cloud Config and Azure App Configuration Service</description> <properties> @@ -69,12 +69,12 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-service</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-service;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-service;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-autoconfigure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> </dependency> <!-- Test Dependencies --> <dependency> diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/CHANGELOG.md b/sdk/spring/spring-cloud-azure-autoconfigure/CHANGELOG.md index 65d97b19149e..b8c75ef9dc93 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-autoconfigure/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index e788542ddce3..e7f5403d8805 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-autoconfigure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> <name>Spring Cloud Azure AutoConfigure</name> <description>Spring Cloud Azure AutoConfigure</description> @@ -41,13 +41,13 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-service</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-service;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-service;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-resourcemanager</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-resourcemanager;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-resourcemanager;current} --> <optional>true</optional> </dependency> @@ -56,7 +56,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-integration-azure-eventhubs</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-eventhubs;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-eventhubs;current} --> <optional>true</optional> </dependency> <dependency> @@ -70,7 +70,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-integration-azure-servicebus</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-servicebus;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-servicebus;current} --> <optional>true</optional> </dependency> @@ -78,7 +78,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-integration-azure-storage-queue</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-storage-queue;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-storage-queue;current} --> <optional>true</optional> </dependency> @@ -120,7 +120,7 @@ <dependency> <groupId>com.azure</groupId> <artifactId>azure-spring-data-cosmos</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos;current} --> <optional>true</optional> </dependency> diff --git a/sdk/spring/spring-cloud-azure-core/CHANGELOG.md b/sdk/spring/spring-cloud-azure-core/CHANGELOG.md index 65d97b19149e..b8c75ef9dc93 100644 --- a/sdk/spring/spring-cloud-azure-core/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-core/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-core/pom.xml b/sdk/spring/spring-cloud-azure-core/pom.xml index f8d30b0f3472..12b4051c06ac 100644 --- a/sdk/spring/spring-cloud-azure-core/pom.xml +++ b/sdk/spring/spring-cloud-azure-core/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-core</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-core;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-core;current} --> <name>Spring Cloud Azure Core</name> <url>https://microsoft.github.io/spring-cloud-azure</url> diff --git a/sdk/spring/spring-cloud-azure-docker-compose/CHANGELOG.md b/sdk/spring/spring-cloud-azure-docker-compose/CHANGELOG.md index 5a8f71a97ddd..e8a94ba660ba 100644 --- a/sdk/spring/spring-cloud-azure-docker-compose/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-docker-compose/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-docker-compose/pom.xml b/sdk/spring/spring-cloud-azure-docker-compose/pom.xml index d568e3caca5d..c6935639df5d 100644 --- a/sdk/spring/spring-cloud-azure-docker-compose/pom.xml +++ b/sdk/spring/spring-cloud-azure-docker-compose/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-docker-compose</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-docker-compose;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-docker-compose;current} --> <name>Spring Cloud Azure Docker Compose</name> <description>Spring Cloud Azure Docker Compose</description> @@ -56,7 +56,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-autoconfigure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> <optional>true</optional> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-feature-management-web/CHANGELOG.md b/sdk/spring/spring-cloud-azure-feature-management-web/CHANGELOG.md index 5acec22b5d3d..e3b77f4a05b1 100644 --- a/sdk/spring/spring-cloud-azure-feature-management-web/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-feature-management-web/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-feature-management-web/pom.xml b/sdk/spring/spring-cloud-azure-feature-management-web/pom.xml index e19493d584bd..08ca28efc359 100644 --- a/sdk/spring/spring-cloud-azure-feature-management-web/pom.xml +++ b/sdk/spring/spring-cloud-azure-feature-management-web/pom.xml @@ -8,7 +8,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-feature-management-web</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-feature-management-web;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-feature-management-web;current} --> <name>Spring Cloud Azure Feature Management Web</name> <description>Adds Feature Management into Spring Web</description> <scm> @@ -39,7 +39,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-feature-management</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-feature-management;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-feature-management;current} --> </dependency> <dependency> <groupId>jakarta.servlet</groupId> @@ -127,7 +127,7 @@ <rules> <bannedDependencies> <includes> - <include>com.azure.spring:spring-cloud-azure-feature-management:[6.1.0-beta.1]</include> <!-- {x-include-update;com.azure.spring:spring-cloud-azure-feature-management;current} --> + <include>com.azure.spring:spring-cloud-azure-feature-management:[6.2.0-beta.1]</include> <!-- {x-include-update;com.azure.spring:spring-cloud-azure-feature-management;current} --> <include>jakarta.servlet:jakarta.servlet-api:[6.0.0]</include> <!-- {x-include-update;springboot3_jakarta.servlet:jakarta.servlet-api;external_dependency} --> <include>org.springframework:spring-web:[6.2.10]</include> <!-- {x-include-update;springboot3_org.springframework:spring-web;external_dependency} --> <include>org.springframework:spring-webmvc:[6.2.10]</include> <!-- {x-include-update;springboot3_org.springframework:spring-webmvc;external_dependency} --> diff --git a/sdk/spring/spring-cloud-azure-feature-management/CHANGELOG.md b/sdk/spring/spring-cloud-azure-feature-management/CHANGELOG.md index 5440711a1fe2..1d493a773e32 100644 --- a/sdk/spring/spring-cloud-azure-feature-management/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-feature-management/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-feature-management/pom.xml b/sdk/spring/spring-cloud-azure-feature-management/pom.xml index 1dbac57ba347..08ae2b18f090 100644 --- a/sdk/spring/spring-cloud-azure-feature-management/pom.xml +++ b/sdk/spring/spring-cloud-azure-feature-management/pom.xml @@ -8,7 +8,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-feature-management</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-feature-management;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-feature-management;current} --> <name>Spring Cloud Azure Feature Management</name> <description>Adds Feature Management into Spring</description> <scm> diff --git a/sdk/spring/spring-cloud-azure-integration-test-appconfiguration-config/pom.xml b/sdk/spring/spring-cloud-azure-integration-test-appconfiguration-config/pom.xml index ddf5dcfe5b5a..1458dfc78f93 100644 --- a/sdk/spring/spring-cloud-azure-integration-test-appconfiguration-config/pom.xml +++ b/sdk/spring/spring-cloud-azure-integration-test-appconfiguration-config/pom.xml @@ -21,7 +21,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-appconfiguration-config</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-appconfiguration-config;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-appconfiguration-config;current} --> </dependency> <dependency> <groupId>org.springframework.boot</groupId> diff --git a/sdk/spring/spring-cloud-azure-integration-tests/pom.xml b/sdk/spring/spring-cloud-azure-integration-tests/pom.xml index 50dd466d6e25..8dcd3e9f7267 100644 --- a/sdk/spring/spring-cloud-azure-integration-tests/pom.xml +++ b/sdk/spring/spring-cloud-azure-integration-tests/pom.xml @@ -42,67 +42,67 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-servicebus</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-servicebus;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-servicebus;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-servicebus-jms</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-servicebus-jms;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-servicebus-jms;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-eventhubs</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-eventhubs;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-eventhubs;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-keyvault-secrets</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-keyvault-secrets;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-keyvault-secrets;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-storage-blob</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-blob;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-blob;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-storage-file-share</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-file-share;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-file-share;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-storage-queue</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-queue;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-queue;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-appconfiguration</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-appconfiguration;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-appconfiguration;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-cosmos</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-cosmos;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-cosmos;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-data-cosmos</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-data-cosmos;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-data-cosmos;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-stream-binder-eventhubs</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-eventhubs;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-eventhubs;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-stream-binder-servicebus</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-servicebus;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-servicebus;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-jdbc-mysql</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-servicebus;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-servicebus;current} --> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> diff --git a/sdk/spring/spring-cloud-azure-resourcemanager/CHANGELOG.md b/sdk/spring/spring-cloud-azure-resourcemanager/CHANGELOG.md index 65d97b19149e..b8c75ef9dc93 100644 --- a/sdk/spring/spring-cloud-azure-resourcemanager/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-resourcemanager/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml b/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml index 273abe77f6ea..b48de2f0b228 100644 --- a/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml +++ b/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-resourcemanager</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-resourcemanager;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-resourcemanager;current} --> <name>Spring Cloud Azure Resource Manager</name> <description>Spring Cloud Azure Resource Manager</description> @@ -41,7 +41,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-core</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-core;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-core;current} --> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-service/CHANGELOG.md b/sdk/spring/spring-cloud-azure-service/CHANGELOG.md index dc20a621f173..6a03cac45e2d 100644 --- a/sdk/spring/spring-cloud-azure-service/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-service/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-service/pom.xml b/sdk/spring/spring-cloud-azure-service/pom.xml index 33ab542dc1f8..f2832c9d02b9 100644 --- a/sdk/spring/spring-cloud-azure-service/pom.xml +++ b/sdk/spring/spring-cloud-azure-service/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-service</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-service;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-service;current} --> <name>Spring Cloud Azure Service</name> <description>Spring Cloud Azure Service</description> @@ -41,7 +41,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-core</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-core;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-core;current} --> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml b/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml index e1a375b3b6cd..d614306fcbe0 100644 --- a/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml @@ -7,7 +7,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-active-directory-b2c</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-active-directory-b2c;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-active-directory-b2c;current} --> <name>Spring Cloud Azure Starter Active Directory B2C</name> <description>Spring Cloud Azure Starter Active Directory B2C</description> @@ -90,7 +90,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> <groupId>org.springframework.security</groupId> diff --git a/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml b/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml index 83d3b173637b..3bfe9ecba1f8 100644 --- a/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-active-directory/pom.xml @@ -7,7 +7,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-active-directory</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-active-directory;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-active-directory;current} --> <name>Spring Cloud Azure Starter Active Directory</name> <description>Spring Cloud Azure Starter Active Directory</description> @@ -89,7 +89,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> <groupId>org.springframework.security</groupId> diff --git a/sdk/spring/spring-cloud-azure-starter-actuator/pom.xml b/sdk/spring/spring-cloud-azure-starter-actuator/pom.xml index dcd91568608d..569b5047ec23 100644 --- a/sdk/spring/spring-cloud-azure-starter-actuator/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-actuator/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-actuator</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-actuator;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-actuator;current} --> <name>Spring Cloud Azure Starter Actuator</name> <description>Spring Cloud Azure Starter Actuator</description> @@ -89,12 +89,12 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-actuator-autoconfigure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-actuator-autoconfigure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-actuator-autoconfigure;current} --> </dependency> <dependency> <groupId>org.springframework.boot</groupId> diff --git a/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/CHANGELOG.md b/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/CHANGELOG.md index ae9ea6e69820..b618ab14036f 100644 --- a/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/README.md b/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/README.md index d1d222dfb426..3151a85de474 100644 --- a/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/README.md +++ b/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/README.md @@ -21,7 +21,7 @@ There are two libraries that can be used spring-cloud-azure-appconfiguration-con <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-appconfiguration-config</artifactId> - <version>6.0.0</version> + <version>6.1.0</version> </dependency> ``` [//]: # ({x-version-update-end}) @@ -33,7 +33,7 @@ or <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId> - <version>6.0.0</version> + <version>6.1.0</version> </dependency> ``` [//]: # ({x-version-update-end}) diff --git a/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/pom.xml b/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/pom.xml index 992d363e1cf3..aa1170386a7f 100644 --- a/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-appconfiguration-config/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-appconfiguration-config</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-appconfiguration-config;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-appconfiguration-config;current} --> <name>Spring Cloud Azure Starter App Configuration Config</name> <description>Spring Cloud Azure Starter App Configuration Config</description> <url>https://microsoft.github.io/spring-cloud-azure</url> @@ -88,12 +88,12 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-appconfiguration-config-web;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-appconfiguration-config-web;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-feature-management-web</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-feature-management-web;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-feature-management-web;current} --> </dependency> </dependencies> diff --git a/sdk/spring/spring-cloud-azure-starter-appconfiguration/pom.xml b/sdk/spring/spring-cloud-azure-starter-appconfiguration/pom.xml index 6288a7c4a79d..feb3a99d6b5b 100644 --- a/sdk/spring/spring-cloud-azure-starter-appconfiguration/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-appconfiguration/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-appconfiguration</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-appconfiguration;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-appconfiguration;current} --> <name>Spring Cloud Azure Starter App Configuration</name> <description>Spring Cloud Azure Starter App Configuration</description> @@ -89,7 +89,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/spring/spring-cloud-azure-starter-cosmos/pom.xml b/sdk/spring/spring-cloud-azure-starter-cosmos/pom.xml index 4da8aa6f1df7..113b650b8727 100644 --- a/sdk/spring/spring-cloud-azure-starter-cosmos/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-cosmos/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-cosmos</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-cosmos;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-cosmos;current} --> <name>Spring Cloud Azure Starter Cosmos DB</name> <description>Spring Cloud Azure Starter Cosmos DB</description> @@ -89,7 +89,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/spring/spring-cloud-azure-starter-data-cosmos/pom.xml b/sdk/spring/spring-cloud-azure-starter-data-cosmos/pom.xml index 74da06815338..fb25392ece63 100644 --- a/sdk/spring/spring-cloud-azure-starter-data-cosmos/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-data-cosmos/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-data-cosmos</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-data-cosmos;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-data-cosmos;current} --> <name>Spring Cloud Azure Starter Data Cosmos DB</name> <description>Spring Cloud Azure Starter Data Cosmos DB</description> @@ -89,12 +89,12 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-spring-data-cosmos</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos;current} --> </dependency> </dependencies> diff --git a/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml b/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml index c285b59cb37a..2c1f3fa02a96 100644 --- a/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-data-redis-lettuce</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-data-redis-lettuce;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-data-redis-lettuce;current} --> <name>Spring Cloud Azure Starter Data Redis with Lettuce</name> <description>Spring Cloud Azure Starter Data Redis with Lettuce</description> @@ -89,7 +89,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-starter-eventgrid/pom.xml b/sdk/spring/spring-cloud-azure-starter-eventgrid/pom.xml index 03cbc37b8bc5..585a7c2de1e0 100644 --- a/sdk/spring/spring-cloud-azure-starter-eventgrid/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-eventgrid/pom.xml @@ -7,7 +7,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-eventgrid</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-eventgrid;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-eventgrid;current} --> <name>Spring Cloud Azure Starter Event Grid</name> <description>Spring Cloud Azure Starter Event Grid</description> @@ -90,7 +90,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-starter-eventhubs/pom.xml b/sdk/spring/spring-cloud-azure-starter-eventhubs/pom.xml index f72f8eb93b07..a1cb90e500d3 100644 --- a/sdk/spring/spring-cloud-azure-starter-eventhubs/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-eventhubs/pom.xml @@ -7,7 +7,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-eventhubs</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-eventhubs;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-eventhubs;current} --> <name>Spring Cloud Azure Starter Event Hubs</name> <description>Spring Cloud Azure Starter Event Hubs</description> @@ -90,7 +90,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-starter-integration-eventhubs/pom.xml b/sdk/spring/spring-cloud-azure-starter-integration-eventhubs/pom.xml index bd9f381f0c82..76e71522419c 100644 --- a/sdk/spring/spring-cloud-azure-starter-integration-eventhubs/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-integration-eventhubs/pom.xml @@ -7,7 +7,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-integration-eventhubs</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-integration-eventhubs;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-integration-eventhubs;current} --> <name>Spring Cloud Azure Starter Integration Event Hubs</name> <description>Spring Cloud Azure Starter Integration Event Hubs</description> @@ -90,7 +90,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> <groupId>org.springframework.boot</groupId> @@ -100,7 +100,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-integration-azure-eventhubs</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-eventhubs;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-eventhubs;current} --> </dependency> </dependencies> diff --git a/sdk/spring/spring-cloud-azure-starter-integration-servicebus/pom.xml b/sdk/spring/spring-cloud-azure-starter-integration-servicebus/pom.xml index ee567efbd380..e29676cf2dfe 100644 --- a/sdk/spring/spring-cloud-azure-starter-integration-servicebus/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-integration-servicebus/pom.xml @@ -7,7 +7,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-integration-servicebus</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-integration-servicebus;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-integration-servicebus;current} --> <name>Spring Cloud Azure Starter Integration Service Bus</name> <description>Spring Cloud Azure Starter Integration Service Bus</description> @@ -90,7 +90,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> <groupId>org.springframework.boot</groupId> @@ -100,7 +100,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-integration-azure-servicebus</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-servicebus;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-servicebus;current} --> </dependency> </dependencies> diff --git a/sdk/spring/spring-cloud-azure-starter-integration-storage-queue/pom.xml b/sdk/spring/spring-cloud-azure-starter-integration-storage-queue/pom.xml index 78d92988ff65..e6b12f28487c 100644 --- a/sdk/spring/spring-cloud-azure-starter-integration-storage-queue/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-integration-storage-queue/pom.xml @@ -10,7 +10,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-integration-storage-queue</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-integration-storage-queue;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-integration-storage-queue;current} --> <name>Spring Cloud Azure Starter Integration Storage Queue</name> <description>Spring Cloud Azure Starter Integration Storage Queue</description> @@ -93,7 +93,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> <groupId>org.springframework.boot</groupId> @@ -103,7 +103,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-integration-azure-storage-queue</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-storage-queue;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-storage-queue;current} --> </dependency> </dependencies> diff --git a/sdk/spring/spring-cloud-azure-starter-jdbc-mysql/pom.xml b/sdk/spring/spring-cloud-azure-starter-jdbc-mysql/pom.xml index c54afa191e4e..438cdb5d6e09 100644 --- a/sdk/spring/spring-cloud-azure-starter-jdbc-mysql/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-jdbc-mysql/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-jdbc-mysql</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-jdbc-mysql;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-jdbc-mysql;current} --> <name>Spring Cloud Azure Starter JDBC MySQL</name> <description>Spring Cloud Azure Starter for building applications with JDBC and Azure MySQL Services. Support authenticating with Azure AD.</description> @@ -89,7 +89,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql/pom.xml b/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql/pom.xml index 18bc691036de..7bd5169465b0 100644 --- a/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-jdbc-postgresql</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-jdbc-postgresql;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-jdbc-postgresql;current} --> <name>Spring Cloud Azure Starter JDBC PostgreSQL</name> <description>Spring Cloud Azure Starter for building applications with JDBC and Azure PostgreSQL Services. Support authenticating with Azure AD.</description> @@ -89,7 +89,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-starter-keyvault-certificates/pom.xml b/sdk/spring/spring-cloud-azure-starter-keyvault-certificates/pom.xml index 9a806739e368..719f153c3faf 100644 --- a/sdk/spring/spring-cloud-azure-starter-keyvault-certificates/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-keyvault-certificates/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-keyvault-certificates</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-keyvault-certificates;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-keyvault-certificates;current} --> <name>Spring Cloud Azure Starter Key Vault Certificates</name> <description>Spring Cloud Azure Starter Key Vault Certificates</description> @@ -89,7 +89,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/spring/spring-cloud-azure-starter-keyvault-jca/pom.xml b/sdk/spring/spring-cloud-azure-starter-keyvault-jca/pom.xml index bb1015417702..15c21a0daf22 100644 --- a/sdk/spring/spring-cloud-azure-starter-keyvault-jca/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-keyvault-jca/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-keyvault-jca</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-keyvault-jca;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-keyvault-jca;current} --> <name>Spring Cloud Azure Starter Key Vault JCA</name> <description>Spring Cloud Azure Starter Key Vault Java Crypto Architecture (JCA) Provider</description> @@ -89,7 +89,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/spring/spring-cloud-azure-starter-keyvault-secrets/pom.xml b/sdk/spring/spring-cloud-azure-starter-keyvault-secrets/pom.xml index a1f6f8560006..2b9f68e438eb 100644 --- a/sdk/spring/spring-cloud-azure-starter-keyvault-secrets/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-keyvault-secrets/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-keyvault-secrets</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-keyvault-secrets;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-keyvault-secrets;current} --> <name>Spring Cloud Azure Starter Key Vault Secrets</name> <description>Spring Cloud Azure Starter Key Vault Secrets</description> @@ -89,7 +89,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/spring/spring-cloud-azure-starter-keyvault/pom.xml b/sdk/spring/spring-cloud-azure-starter-keyvault/pom.xml index 953acdd9725e..6f073d73b67e 100644 --- a/sdk/spring/spring-cloud-azure-starter-keyvault/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-keyvault/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-keyvault</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-keyvault;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-keyvault;current} --> <name>Spring Cloud Azure Starter Key Vault</name> <description>Spring Cloud Azure Starter Key Vault</description> @@ -89,17 +89,17 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-keyvault-secrets</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-keyvault-secrets;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-keyvault-secrets;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-keyvault-certificates</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-keyvault-certificates;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-keyvault-certificates;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-keyvault-jca</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-keyvault-jca;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-keyvault-jca;current} --> </dependency> </dependencies> diff --git a/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml b/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml index 6e3caf25dd87..b71e65e821cc 100644 --- a/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-monitor-test/pom.xml @@ -42,7 +42,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-monitor</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-monitor;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-monitor;current} --> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-starter-monitor/CHANGELOG.md b/sdk/spring/spring-cloud-azure-starter-monitor/CHANGELOG.md index a4adc612863b..a192a1702d23 100644 --- a/sdk/spring/spring-cloud-azure-starter-monitor/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-starter-monitor/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-starter-monitor/pom.xml b/sdk/spring/spring-cloud-azure-starter-monitor/pom.xml index bf59ec4a783a..86d98055e039 100644 --- a/sdk/spring/spring-cloud-azure-starter-monitor/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-monitor/pom.xml @@ -77,7 +77,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-monitor</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-monitor;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-monitor;current} --> <name>Azure Monitor OpenTelemetry Distro / Application Insights in Spring native Java application</name> <description>Spring Boot starter providing telemetry data to Azure Monitor for Spring Boot applications and GraalVM native images.</description> diff --git a/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml b/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml index 3761f861defd..ee79ced057a8 100644 --- a/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-servicebus-jms</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-servicebus-jms;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-servicebus-jms;current} --> <name>Spring Cloud Azure Starter Service Bus JMS</name> <description>Spring Cloud Azure Starter Service Bus JMS</description> @@ -89,7 +89,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <!--Spring JMS--> diff --git a/sdk/spring/spring-cloud-azure-starter-servicebus/pom.xml b/sdk/spring/spring-cloud-azure-starter-servicebus/pom.xml index cf7d877b2eec..323d6a351ad4 100644 --- a/sdk/spring/spring-cloud-azure-starter-servicebus/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-servicebus/pom.xml @@ -7,7 +7,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-servicebus</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-servicebus;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-servicebus;current} --> <name>Spring Cloud Azure Starter Service Bus</name> <description>Spring Cloud Azure Starter Service Bus</description> @@ -90,7 +90,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/spring/spring-cloud-azure-starter-storage-blob/pom.xml b/sdk/spring/spring-cloud-azure-starter-storage-blob/pom.xml index 26fda7327445..e77654e8c8ab 100644 --- a/sdk/spring/spring-cloud-azure-starter-storage-blob/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-storage-blob/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-storage-blob</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-blob;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-blob;current} --> <name>Spring Cloud Azure Starter Storage Blob</name> <description>Spring Cloud Azure Starter Storage Blob</description> @@ -89,7 +89,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-starter-storage-file-share/pom.xml b/sdk/spring/spring-cloud-azure-starter-storage-file-share/pom.xml index c951eb3bbb40..871270d07226 100644 --- a/sdk/spring/spring-cloud-azure-starter-storage-file-share/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-storage-file-share/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-storage-file-share</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-file-share;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-file-share;current} --> <name>Spring Cloud Azure Starter Storage File Share</name> <description>Spring Cloud Azure Starter Storage File Share</description> @@ -89,7 +89,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-starter-storage-queue/pom.xml b/sdk/spring/spring-cloud-azure-starter-storage-queue/pom.xml index 82c6d4af92ab..a5b26446d4ac 100644 --- a/sdk/spring/spring-cloud-azure-starter-storage-queue/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-storage-queue/pom.xml @@ -10,7 +10,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-storage-queue</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-queue;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-queue;current} --> <name>Spring Cloud Azure Starter Storage Queue</name> <description>Spring Cloud Azure Starter Storage Queue</description> @@ -93,7 +93,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/spring/spring-cloud-azure-starter-storage/pom.xml b/sdk/spring/spring-cloud-azure-starter-storage/pom.xml index ad99ae68dd1e..244c8a473616 100644 --- a/sdk/spring/spring-cloud-azure-starter-storage/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-storage/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-storage</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage;current} --> <name>Spring Cloud Azure Starter Storage</name> <description>Spring Cloud Azure Starter Storage</description> @@ -89,19 +89,19 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-storage-blob</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-blob;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-blob;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-storage-file-share</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-file-share;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-file-share;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-storage-queue</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-queue;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-storage-queue;current} --> </dependency> </dependencies> diff --git a/sdk/spring/spring-cloud-azure-starter-stream-eventhubs/pom.xml b/sdk/spring/spring-cloud-azure-starter-stream-eventhubs/pom.xml index 72dfac92eec2..80a89f7c0f6a 100644 --- a/sdk/spring/spring-cloud-azure-starter-stream-eventhubs/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-stream-eventhubs/pom.xml @@ -7,7 +7,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-stream-eventhubs</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-stream-eventhubs;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-stream-eventhubs;current} --> <name>Spring Cloud Azure Starter Stream Event Hubs</name> <description>Spring Cloud Azure Starter Stream Event Hubs</description> @@ -90,7 +90,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-stream-binder-eventhubs</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-eventhubs;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-eventhubs;current} --> </dependency> </dependencies> diff --git a/sdk/spring/spring-cloud-azure-starter-stream-servicebus/pom.xml b/sdk/spring/spring-cloud-azure-starter-stream-servicebus/pom.xml index 51c7ae5a084f..1ef730d41bc8 100644 --- a/sdk/spring/spring-cloud-azure-starter-stream-servicebus/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-stream-servicebus/pom.xml @@ -7,7 +7,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-stream-servicebus</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-stream-servicebus;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter-stream-servicebus;current} --> <name>Spring Cloud Azure Starter Stream Service Bus</name> <description>Spring Cloud Azure Starter Stream Service Bus</description> @@ -90,7 +90,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-stream-binder-servicebus</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-servicebus;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-servicebus;current} --> </dependency> </dependencies> diff --git a/sdk/spring/spring-cloud-azure-starter/pom.xml b/sdk/spring/spring-cloud-azure-starter/pom.xml index d77e7205b5aa..e8be611f8954 100644 --- a/sdk/spring/spring-cloud-azure-starter/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter/pom.xml @@ -6,7 +6,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-starter;current} --> <name>Spring Cloud Azure Starter</name> <description>Core starter, including auto-configuration support</description> @@ -94,7 +94,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-autoconfigure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> </dependency> </dependencies> diff --git a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/CHANGELOG.md b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/CHANGELOG.md index 65d97b19149e..b8c75ef9dc93 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/pom.xml b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/pom.xml index 102164dc9719..a0d6b2ae3b1c 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/pom.xml +++ b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs-core/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-stream-binder-eventhubs-core</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-eventhubs-core;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-eventhubs-core;current} --> <name>Spring Cloud Azure Stream Binder Event Hubs Core</name> <description>Spring Cloud Azure Stream Binder Event Hubs Core</description> @@ -53,7 +53,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-integration-azure-eventhubs</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-eventhubs;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-eventhubs;current} --> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/CHANGELOG.md b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/CHANGELOG.md index 65d97b19149e..b8c75ef9dc93 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/pom.xml b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/pom.xml index e333c8316657..9e24e4db4c7a 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/pom.xml +++ b/sdk/spring/spring-cloud-azure-stream-binder-eventhubs/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-stream-binder-eventhubs</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-eventhubs;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-eventhubs;current} --> <name>Spring Cloud Azure Stream Binder Event Hubs</name> <description>Spring Cloud Azure Stream Binder Event Hubs</description> @@ -41,12 +41,12 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-autoconfigure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-stream-binder-eventhubs-core</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-eventhubs-core;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-eventhubs-core;current} --> </dependency> <!-- Contains Azure Storage Blobs checkpoint store when using EventProcessorClient --> <dependency> @@ -64,7 +64,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-resourcemanager</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-resourcemanager;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-resourcemanager;current} --> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-stream-binder-servicebus-core/CHANGELOG.md b/sdk/spring/spring-cloud-azure-stream-binder-servicebus-core/CHANGELOG.md index dc20a621f173..6a03cac45e2d 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-servicebus-core/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-stream-binder-servicebus-core/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-stream-binder-servicebus-core/pom.xml b/sdk/spring/spring-cloud-azure-stream-binder-servicebus-core/pom.xml index 320d145b4887..6b5e4e198fbd 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-servicebus-core/pom.xml +++ b/sdk/spring/spring-cloud-azure-stream-binder-servicebus-core/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-stream-binder-servicebus-core</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-servicebus-core;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-servicebus-core;current} --> <name>Spring Cloud Azure Stream Binder Service Bus Core</name> <description>Spring Cloud Azure Stream Binder Service Bus Core</description> @@ -47,7 +47,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-integration-azure-servicebus</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-servicebus;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-servicebus;current} --> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/CHANGELOG.md b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/CHANGELOG.md index dc20a621f173..6a03cac45e2d 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/pom.xml b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/pom.xml index 8abb638da2f8..768844ec7b6e 100644 --- a/sdk/spring/spring-cloud-azure-stream-binder-servicebus/pom.xml +++ b/sdk/spring/spring-cloud-azure-stream-binder-servicebus/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-stream-binder-servicebus</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-servicebus;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-servicebus;current} --> <name>Spring Cloud Azure Stream Binder Service Bus</name> <description>Spring Cloud Azure Stream Binder Service Bus</description> @@ -41,17 +41,17 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-stream-binder-servicebus-core</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-servicebus-core;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-servicebus-core;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-autoconfigure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-resourcemanager</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-resourcemanager;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-resourcemanager;current} --> </dependency> <dependency> <groupId>org.springframework.boot</groupId> diff --git a/sdk/spring/spring-cloud-azure-testcontainers/CHANGELOG.md b/sdk/spring/spring-cloud-azure-testcontainers/CHANGELOG.md index 5d87e723dc18..d80aeba8e369 100644 --- a/sdk/spring/spring-cloud-azure-testcontainers/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-testcontainers/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-cloud-azure-testcontainers/pom.xml b/sdk/spring/spring-cloud-azure-testcontainers/pom.xml index ac014a48e952..a80d218256a8 100644 --- a/sdk/spring/spring-cloud-azure-testcontainers/pom.xml +++ b/sdk/spring/spring-cloud-azure-testcontainers/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-testcontainers</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-testcontainers;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-testcontainers;current} --> <name>Spring Cloud Azure Testcontainers</name> <description>Spring Cloud Azure Testcontainers</description> @@ -56,13 +56,13 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-autoconfigure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} --> <optional>true</optional> </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-spring-data-cosmos</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos;current} --> <optional>true</optional> </dependency> diff --git a/sdk/spring/spring-integration-azure-core/CHANGELOG.md b/sdk/spring/spring-integration-azure-core/CHANGELOG.md index dc20a621f173..6a03cac45e2d 100644 --- a/sdk/spring/spring-integration-azure-core/CHANGELOG.md +++ b/sdk/spring/spring-integration-azure-core/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-integration-azure-core/pom.xml b/sdk/spring/spring-integration-azure-core/pom.xml index 7c9fcd5471a9..a551ddc6793b 100644 --- a/sdk/spring/spring-integration-azure-core/pom.xml +++ b/sdk/spring/spring-integration-azure-core/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-integration-azure-core</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-core;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-core;current} --> <name>Spring Integration Azure Core</name> <description>Spring Integration Azure Core</description> @@ -43,7 +43,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-messaging-azure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure;current} --> </dependency> <dependency> <groupId>org.springframework.integration</groupId> diff --git a/sdk/spring/spring-integration-azure-eventhubs/CHANGELOG.md b/sdk/spring/spring-integration-azure-eventhubs/CHANGELOG.md index 65d97b19149e..b8c75ef9dc93 100644 --- a/sdk/spring/spring-integration-azure-eventhubs/CHANGELOG.md +++ b/sdk/spring/spring-integration-azure-eventhubs/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-integration-azure-eventhubs/pom.xml b/sdk/spring/spring-integration-azure-eventhubs/pom.xml index aaed8b36eeef..599ce0f025db 100644 --- a/sdk/spring/spring-integration-azure-eventhubs/pom.xml +++ b/sdk/spring/spring-integration-azure-eventhubs/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-integration-azure-eventhubs</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-eventhubs;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-eventhubs;current} --> <name>Spring Integration Azure Event Hubs</name> <description>Spring Integration Azure Event Hubs</description> @@ -41,12 +41,12 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-integration-azure-core</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-core;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-core;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-messaging-azure-eventhubs</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure-eventhubs;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure-eventhubs;current} --> </dependency> <!-- Contains Azure Storage Blobs checkpoint store when using EventProcessorClient --> <dependency> @@ -180,7 +180,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-integration-azure-core</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-core;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-core;current} --> <type>test-jar</type> <scope>test</scope> </dependency> diff --git a/sdk/spring/spring-integration-azure-servicebus/CHANGELOG.md b/sdk/spring/spring-integration-azure-servicebus/CHANGELOG.md index dc20a621f173..6a03cac45e2d 100644 --- a/sdk/spring/spring-integration-azure-servicebus/CHANGELOG.md +++ b/sdk/spring/spring-integration-azure-servicebus/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-integration-azure-servicebus/pom.xml b/sdk/spring/spring-integration-azure-servicebus/pom.xml index 3b7d07c4d2ad..d5632f3ab430 100644 --- a/sdk/spring/spring-integration-azure-servicebus/pom.xml +++ b/sdk/spring/spring-integration-azure-servicebus/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-integration-azure-servicebus</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-servicebus;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-servicebus;current} --> <name>Spring Integration Azure Service Bus</name> <description>Spring Integration Azure Service Bus</description> @@ -41,12 +41,12 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-integration-azure-core</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-core;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-core;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-messaging-azure-servicebus</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure-servicebus;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure-servicebus;current} --> </dependency> <!-- Added this dependency to include necessary annotations used by reactor core. Without this dependency, javadoc throws a warning as it cannot find enum When.MAYBE @@ -179,14 +179,14 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-integration-azure-core</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-core;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-core;current} --> <type>test-jar</type> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-messaging-azure-servicebus</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure-servicebus;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure-servicebus;current} --> <type>test-jar</type> <scope>test</scope> </dependency> diff --git a/sdk/spring/spring-integration-azure-storage-queue/CHANGELOG.md b/sdk/spring/spring-integration-azure-storage-queue/CHANGELOG.md index dc20a621f173..6a03cac45e2d 100644 --- a/sdk/spring/spring-integration-azure-storage-queue/CHANGELOG.md +++ b/sdk/spring/spring-integration-azure-storage-queue/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-integration-azure-storage-queue/pom.xml b/sdk/spring/spring-integration-azure-storage-queue/pom.xml index 4df92ec46719..680003b60bc9 100644 --- a/sdk/spring/spring-integration-azure-storage-queue/pom.xml +++ b/sdk/spring/spring-integration-azure-storage-queue/pom.xml @@ -13,7 +13,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-integration-azure-storage-queue</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-storage-queue;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-storage-queue;current} --> <name>Spring Integration Azure Storage Queue</name> <description>Spring Integration Azure Storage Queue</description> @@ -42,12 +42,12 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-integration-azure-core</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-core;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-core;current} --> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-messaging-azure-storage-queue</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure-storage-queue;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure-storage-queue;current} --> </dependency> <!-- Added this dependency to include necessary annotations used by reactor core. diff --git a/sdk/spring/spring-messaging-azure-eventhubs/CHANGELOG.md b/sdk/spring/spring-messaging-azure-eventhubs/CHANGELOG.md index 65d97b19149e..b8c75ef9dc93 100644 --- a/sdk/spring/spring-messaging-azure-eventhubs/CHANGELOG.md +++ b/sdk/spring/spring-messaging-azure-eventhubs/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-messaging-azure-eventhubs/pom.xml b/sdk/spring/spring-messaging-azure-eventhubs/pom.xml index d6f0fdd0b647..c7dd8baf7e34 100644 --- a/sdk/spring/spring-messaging-azure-eventhubs/pom.xml +++ b/sdk/spring/spring-messaging-azure-eventhubs/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-messaging-azure-eventhubs</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure-eventhubs;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure-eventhubs;current} --> <name>Spring Messaging Azure Event Hubs</name> <description>Spring Messaging Azure Event Hubs</description> @@ -41,7 +41,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-messaging-azure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure;current} --> </dependency> <dependency> <groupId>com.azure</groupId> @@ -226,7 +226,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-messaging-azure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure;current} --> <type>test-jar</type> <scope>test</scope> </dependency> diff --git a/sdk/spring/spring-messaging-azure-servicebus/CHANGELOG.md b/sdk/spring/spring-messaging-azure-servicebus/CHANGELOG.md index 65d97b19149e..b8c75ef9dc93 100644 --- a/sdk/spring/spring-messaging-azure-servicebus/CHANGELOG.md +++ b/sdk/spring/spring-messaging-azure-servicebus/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-messaging-azure-servicebus/pom.xml b/sdk/spring/spring-messaging-azure-servicebus/pom.xml index a5276a303a73..fcb2dbf0e6cb 100644 --- a/sdk/spring/spring-messaging-azure-servicebus/pom.xml +++ b/sdk/spring/spring-messaging-azure-servicebus/pom.xml @@ -13,7 +13,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-messaging-azure-servicebus</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure-servicebus;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure-servicebus;current} --> <name>Spring Messaging Azure Service Bus</name> <description>Spring Messaging Azure Service Bus</description> @@ -42,7 +42,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-messaging-azure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure;current} --> </dependency> <dependency> <groupId>com.azure</groupId> @@ -218,7 +218,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-messaging-azure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure;current} --> <type>test-jar</type> <scope>test</scope> </dependency> diff --git a/sdk/spring/spring-messaging-azure-storage-queue/CHANGELOG.md b/sdk/spring/spring-messaging-azure-storage-queue/CHANGELOG.md index dc20a621f173..6a03cac45e2d 100644 --- a/sdk/spring/spring-messaging-azure-storage-queue/CHANGELOG.md +++ b/sdk/spring/spring-messaging-azure-storage-queue/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-messaging-azure-storage-queue/pom.xml b/sdk/spring/spring-messaging-azure-storage-queue/pom.xml index 1bd81586c23f..22f51251a3a5 100644 --- a/sdk/spring/spring-messaging-azure-storage-queue/pom.xml +++ b/sdk/spring/spring-messaging-azure-storage-queue/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-messaging-azure-storage-queue</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure-storage-queue;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure-storage-queue;current} --> <name>Spring Messaging Azure Storage Queue</name> <description>Spring Messaging Azure Storage Queue</description> @@ -41,7 +41,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-messaging-azure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure;current} --> </dependency> <dependency> <groupId>com.azure</groupId> @@ -171,7 +171,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-messaging-azure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure;current} --> <type>test-jar</type> <scope>test</scope> </dependency> diff --git a/sdk/spring/spring-messaging-azure/CHANGELOG.md b/sdk/spring/spring-messaging-azure/CHANGELOG.md index 65d97b19149e..b8c75ef9dc93 100644 --- a/sdk/spring/spring-messaging-azure/CHANGELOG.md +++ b/sdk/spring/spring-messaging-azure/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.1.0-beta.1 (Unreleased) +## 6.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,10 @@ ### Other Changes +## 6.1.0 (2025-12-16) + +Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#610-2025-12-16) for more details. + ## 6.0.0 (2025-09-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#600-2025-09-22) for more details. diff --git a/sdk/spring/spring-messaging-azure/pom.xml b/sdk/spring/spring-messaging-azure/pom.xml index 28ab7d3ce151..06ef9717ad60 100644 --- a/sdk/spring/spring-messaging-azure/pom.xml +++ b/sdk/spring/spring-messaging-azure/pom.xml @@ -12,7 +12,7 @@ <groupId>com.azure.spring</groupId> <artifactId>spring-messaging-azure</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-messaging-azure;current} --> <name>Spring Messaging Azure</name> <description>Spring Messaging Azure</description> @@ -41,7 +41,7 @@ <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-service</artifactId> - <version>6.1.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-service;current} --> + <version>6.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-service;current} --> </dependency> <dependency> <groupId>org.springframework</groupId> From ac13444c264a4aff2730329e15d287117f1e9cd7 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 18 Dec 2025 14:04:36 -0800 Subject: [PATCH 180/186] Increment package versions for avs releases (#47579) --- eng/versioning/version_client.txt | 2 +- sdk/avs/azure-resourcemanager-avs/CHANGELOG.md | 10 ++++++++++ sdk/avs/azure-resourcemanager-avs/pom.xml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 382b8181f6c8..842251986c0d 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -337,7 +337,7 @@ com.azure.resourcemanager:azure-resourcemanager-appconfiguration;1.1.0;1.2.0-bet com.azure.resourcemanager:azure-resourcemanager-attestation;1.0.0-beta.3;1.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-azurestack;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-azurestackhci;1.0.0-beta.5;1.0.0-beta.6 -com.azure.resourcemanager:azure-resourcemanager-avs;1.3.0;1.4.0 +com.azure.resourcemanager:azure-resourcemanager-avs;1.4.0;1.5.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-consumption;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-commerce;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-billing;1.0.0;1.1.0-beta.1 diff --git a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md index a65d5ddbfa1c..ff5028020f4e 100644 --- a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md +++ b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.5.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.4.0 (2025-12-12) - Azure Resource Manager Avs client library for Java. This package contains Microsoft Azure SDK for Avs Management SDK. Azure VMware Solution API. Package api-version 2025-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/avs/azure-resourcemanager-avs/pom.xml b/sdk/avs/azure-resourcemanager-avs/pom.xml index 3fe511a8775c..e1119ac15411 100644 --- a/sdk/avs/azure-resourcemanager-avs/pom.xml +++ b/sdk/avs/azure-resourcemanager-avs/pom.xml @@ -14,7 +14,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-avs</artifactId> - <version>1.4.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-avs;current} --> + <version>1.5.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-avs;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for Avs Management</name> From 17d1f9645dd662be27053b6df8d9c4d1a20879fa Mon Sep 17 00:00:00 2001 From: Muyao Feng <92105726+Netyyyy@users.noreply.github.com> Date: Fri, 19 Dec 2025 09:37:43 +0800 Subject: [PATCH 181/186] Update Spring Boot and Spring Cloud versions for the Spring compatibility tests. (#47580) This commit is created by GitHub Action: https://github.com/Azure/spring-cloud-azure-tools/actions/runs/20355387385 Co-authored-by: github-actions <github-actions@github.com> --- .../spring-cloud-azure-supported-spring.json | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json b/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json index 3f39532fb660..8187f1bacf61 100644 --- a/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json +++ b/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json @@ -4,6 +4,22 @@ "releaseStatus" : "SNAPSHOT", "snapshot" : true, "supportStatus" : "TODO", + "spring-boot-version" : "3.5.10-SNAPSHOT", + "spring-cloud-version" : "2025.0.1" + }, + { + "current" : false, + "releaseStatus" : "GENERAL_AVAILABILITY", + "snapshot" : false, + "supportStatus" : "SUPPORTED", + "spring-boot-version" : "3.5.9", + "spring-cloud-version" : "2025.0.1" + }, + { + "current" : false, + "releaseStatus" : "SNAPSHOT", + "snapshot" : true, + "supportStatus" : "END_OF_LIFE", "spring-boot-version" : "3.5.9-SNAPSHOT", "spring-cloud-version" : "2025.0.0" }, @@ -11,7 +27,7 @@ "current" : false, "releaseStatus" : "GENERAL_AVAILABILITY", "snapshot" : false, - "supportStatus" : "SUPPORTED", + "supportStatus" : "END_OF_LIFE", "spring-boot-version" : "3.5.8", "spring-cloud-version" : "2025.0.0" }, From bfa1112d8b385644b7462e740dbcc562521076c4 Mon Sep 17 00:00:00 2001 From: Muyao Feng <92105726+Netyyyy@users.noreply.github.com> Date: Fri, 19 Dec 2025 10:22:37 +0800 Subject: [PATCH 182/186] update spring reference (#47581) --- sdk/spring/spring-reference.yml | 750 ++++++++++++++++---------------- 1 file changed, 375 insertions(+), 375 deletions(-) diff --git a/sdk/spring/spring-reference.yml b/sdk/spring/spring-reference.yml index 774d6dcd57ec..4bccf114d5e8 100644 --- a/sdk/spring/spring-reference.yml +++ b/sdk/spring/spring-reference.yml @@ -8,11 +8,11 @@ artifacts: - artifactId: spring-cloud-azure-dependencies groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: Bill of Materials (BOM) for Spring Cloud Azure support. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/boms/spring-cloud-azure-dependencies + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/boms/spring-cloud-azure-dependencies msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/spring-cloud-azure#bill-of-material-bom repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-dependencies dependencyPattern: @@ -36,7 +36,7 @@ </dependencyManagement> springProperties: starter: false - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -53,27 +53,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-dependencies - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-dependencies - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-dependencies - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-dependencies - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-dependencies - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-dependencies - version: 6.0.0 + version: 6.1.0 - name: Active Directory content: - name: Active Directory @@ -84,7 +84,7 @@ artifacts: - artifactId: spring-cloud-azure-starter-active-directory groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter provides the most optimal way to connect your Web application to an Azure Active Directory (AAD for short) tenant and protect resource @@ -92,14 +92,14 @@ servers. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-active-directory + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-active-directory msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-active-directory repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-active-directory - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/aad/spring-cloud-azure-starter-active-directory/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/aad/spring-cloud-azure-starter-active-directory/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -116,27 +116,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-active-directory - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-active-directory - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-active-directory - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-active-directory - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-active-directory - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-active-directory - version: 6.0.0 + version: 6.1.0 - name: Active Directory B2C content: - name: Active Directory B2C @@ -148,17 +148,17 @@ artifacts: - artifactId: spring-cloud-azure-starter-active-directory-b2c groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-active-directory-b2c + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-active-directory-b2c msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-active-directory-b2c-oidc repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-active-directory-b2c - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/aad/spring-cloud-azure-starter-active-directory-b2c/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/aad/spring-cloud-azure-starter-active-directory-b2c/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -175,27 +175,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-active-directory-b2c - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-active-directory-b2c - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-active-directory-b2c - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-active-directory-b2c - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-active-directory-b2c - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-active-directory-b2c - version: 6.0.0 + version: 6.1.0 - name: App Configuration content: - name: App Configuration @@ -210,20 +210,20 @@ artifacts: - artifactId: spring-cloud-azure-starter-appconfiguration groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Azure App Configuration. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-appconfiguration + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-appconfiguration msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/spring-cloud-azure#auto-configure-azure-sdk-clients repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-appconfiguration - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/appconfiguration/spring-cloud-azure-starter-appconfiguration/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/appconfiguration/spring-cloud-azure-starter-appconfiguration/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -240,41 +240,41 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-appconfiguration - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-appconfiguration - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-appconfiguration - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-appconfiguration - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-appconfiguration - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-appconfiguration - version: 6.0.0 + version: 6.1.0 - artifactId: spring-cloud-azure-starter-appconfiguration-config groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: Microsoft's Spring Boot Starter helps developers to load properties and manage features from Azure App Configuration service for Spring Application. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-appconfiguration-config + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-appconfiguration-config repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-appconfiguration-config - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/appconfiguration/spring-cloud-azure-starter-appconfiguration-config/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/appconfiguration/spring-cloud-azure-starter-appconfiguration-config/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -291,27 +291,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-appconfiguration-config - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-appconfiguration-config - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-appconfiguration-config - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-appconfiguration-config - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-appconfiguration-config - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-appconfiguration-config - version: 6.0.0 + version: 6.1.0 - name: Cosmos DB content: - name: Spring Data Cosmos @@ -327,21 +327,21 @@ artifacts: - artifactId: spring-cloud-azure-starter-data-cosmos groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Spring Data Azure Cosmos DB, which enables developers to easily integrate with Azure Cosmos DB SQL API using Spring Data. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-data-cosmos + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-data-cosmos msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-cosmos-db repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-data-cosmos - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/cosmos/spring-cloud-azure-starter-data-cosmos/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/cosmos/spring-cloud-azure-starter-data-cosmos/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -358,27 +358,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-data-cosmos - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-data-cosmos - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-data-cosmos - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-data-cosmos - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-data-cosmos - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-data-cosmos - version: 6.0.0 + version: 6.1.0 - name: Cosmos DB description: |- Azure Cosmos DB is a fully managed NoSQL database for modern app development. @@ -389,20 +389,20 @@ artifacts: - artifactId: spring-cloud-azure-starter-cosmos groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Azure Cosmos DB, which enables developers to easily integrate with Azure Cosmos DB SQL API. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-cosmos + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-cosmos msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/spring-cloud-azure#auto-configure-azure-sdk-clients repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-cosmos - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/cosmos/spring-cloud-azure-starter-cosmos/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/cosmos/spring-cloud-azure-starter-cosmos/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -419,27 +419,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-cosmos - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-cosmos - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-cosmos - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-cosmos - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-cosmos - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-cosmos - version: 6.0.0 + version: 6.1.0 - name: Key Vault content: - name: Key Vault @@ -449,20 +449,20 @@ artifacts: - artifactId: spring-cloud-azure-starter-keyvault groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Azure Key Vault. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-keyvault + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-keyvault msdocs: https://learn.microsoft.com/azure/key-vault/ repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-keyvault - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/keyvault/spring-cloud-azure-starter-keyvault/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/keyvault/spring-cloud-azure-starter-keyvault/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -479,27 +479,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault - version: 6.0.0 + version: 6.1.0 - name: Key Vault - Certificates description: |- Azure Key Vault enables Microsoft Azure applications and users to store and use certificates, which are @@ -511,19 +511,19 @@ artifacts: - artifactId: spring-cloud-azure-starter-keyvault-certificates groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Azure Key Vault Certificates. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-keyvault-certificates + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-keyvault-certificates msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-key-vault-certificates repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-keyvault-certificates springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -540,27 +540,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault-certificates - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault-certificates - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault-certificates - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault-certificates - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault-certificates - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault-certificates - version: 6.0.0 + version: 6.1.0 - artifactId: azure-security-keyvault-jca groupId: com.azure versionGA: 2.10.1 @@ -584,7 +584,7 @@ artifacts: - artifactId: spring-cloud-azure-starter-keyvault-secrets groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Azure Key Vault Secrets, and adds Azure Key Vault as one of Spring PropertySource. @@ -592,14 +592,14 @@ externalized configuration property. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-keyvault-secrets + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-keyvault-secrets msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-key-vault repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-keyvault-secrets - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/keyvault/spring-cloud-azure-starter-keyvault-secrets/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/keyvault/spring-cloud-azure-starter-keyvault-secrets/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -616,27 +616,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault-secrets - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault-secrets - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault-secrets - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault-secrets - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault-secrets - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-keyvault-secrets - version: 6.0.0 + version: 6.1.0 - name: Storage content: - name: Storage @@ -645,21 +645,21 @@ artifacts: - artifactId: spring-cloud-azure-starter-storage groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Azure Storage, and implements Spring Resource abstraction for Azure Storage service which allows you to interact with Storage Account using Spring programming model. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-storage + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-storage msdocs: https://docs.microsoft.com/azure/storage/ repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-storage - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/storage/spring-cloud-azure-starter-storage/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/storage/spring-cloud-azure-starter-storage/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -676,27 +676,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage - version: 6.0.0 + version: 6.1.0 - name: Storage - Blobs description: |- Azure Blob Storage is Microsoft's object storage solution for the cloud. Blob Storage @@ -710,21 +710,21 @@ artifacts: - artifactId: spring-cloud-azure-starter-storage-blob groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Azure Storage Blob, and implements Spring Resource abstraction for Azure Storage service which allows you to interact with Storage Blob using Spring programming model. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-storage-blob + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-storage-blob msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-storage repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-storage-blob - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/storage/spring-cloud-azure-starter-storage-blob/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/storage/spring-cloud-azure-starter-storage-blob/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -741,27 +741,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-blob - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-blob - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-blob - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-blob - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-blob - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-blob - version: 6.0.0 + version: 6.1.0 - name: Storage - Files Shares description: |- Azure File Share storage offers fully managed file shares in the cloud that are @@ -776,21 +776,21 @@ artifacts: - artifactId: spring-cloud-azure-starter-storage-file-share groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Azure Storage File Share, and implements Spring Resource abstraction for Azure Storage service which allows you to interact with Storage File Share using Spring programming model. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-storage-file-share + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-storage-file-share msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/spring-cloud-azure#resource-handling repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-storage-file-share - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/storage/spring-cloud-azure-starter-storage-file-share/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/storage/spring-cloud-azure-starter-storage-file-share/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -807,27 +807,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-file-share - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-file-share - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-file-share - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-file-share - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-file-share - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-file-share - version: 6.0.0 + version: 6.1.0 - name: Storage - Queues description: |- Azure Queue Storage is a service for storing large numbers of messages. You access @@ -842,20 +842,20 @@ artifacts: - artifactId: spring-cloud-azure-starter-storage-queue groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Azure Storage Queue. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-storage-queue + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-storage-queue msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/spring-cloud-azure#auto-configure-azure-sdk-clients repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-storage-queue - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/storage/spring-cloud-azure-starter-storage-queue/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/storage/spring-cloud-azure-starter-storage-queue/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -872,43 +872,43 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-queue - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-queue - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-queue - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-queue - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-queue - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-storage-queue - version: 6.0.0 + version: 6.1.0 - artifactId: spring-cloud-azure-starter-integration-storage-queue groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Spring Integration Azure Storage Queue. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-integration-storage-queue + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-integration-storage-queue msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-service-bus repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-integration-storage-queue - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/storage/spring-cloud-azure-starter-integration-storage-queue/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/storage/spring-cloud-azure-starter-integration-storage-queue/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -925,44 +925,44 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-storage-queue - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-storage-queue - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-storage-queue - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-storage-queue - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-storage-queue - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-storage-queue - version: 6.0.0 + version: 6.1.0 - artifactId: spring-integration-azure-storage-queue groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Integration extension for Azure Storage Queue. Spring Integration extends the Spring programming modoel to support well-known Enterprise Integration Patterns. type: spring links: - javadoc: https://azuresdkdocs.z19.web.core.windows.net/java/spring-integration-azure-storage-queue/6.0.0/index.html - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-integration-azure-storage-queue + javadoc: https://azuresdkdocs.z19.web.core.windows.net/java/spring-integration-azure-storage-queue/6.1.0/index.html + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-integration-azure-storage-queue msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/spring-cloud-azure#spring-integration-support repopath: https://search.maven.org/artifact/com.azure.spring/spring-integration-azure-storage-queue - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/storage/spring-integration-azure-storage-queue/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/storage/spring-integration-azure-storage-queue/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -979,27 +979,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-integration-azure-storage-queue - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-integration-azure-storage-queue - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-integration-azure-storage-queue - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-integration-azure-storage-queue - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-integration-azure-storage-queue - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-integration-azure-storage-queue - version: 6.0.0 + version: 6.1.0 - name: Service Bus content: - name: Service Bus @@ -1015,20 +1015,20 @@ artifacts: - artifactId: spring-cloud-azure-starter-servicebus groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Azure Service Bus. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-servicebus + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-servicebus msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/spring-cloud-azure#auto-configure-azure-sdk-clients repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-servicebus - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/servicebus/spring-cloud-azure-starter-servicebus/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/servicebus/spring-cloud-azure-starter-servicebus/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -1045,43 +1045,43 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-servicebus - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-servicebus - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-servicebus - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-servicebus - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-servicebus - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-servicebus - version: 6.0.0 + version: 6.1.0 - artifactId: spring-cloud-azure-starter-integration-servicebus groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Spring Integration Azure Service Bus. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-integration-servicebus + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-integration-servicebus msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-service-bus repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-integration-servicebus - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/servicebus/spring-cloud-azure-starter-integration-servicebus/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/servicebus/spring-cloud-azure-starter-integration-servicebus/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -1098,44 +1098,44 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-servicebus - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-servicebus - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-servicebus - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-servicebus - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-servicebus - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-servicebus - version: 6.0.0 + version: 6.1.0 - artifactId: spring-integration-azure-servicebus groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Integration extension for Azure Service Bus. Spring Integration extends the Spring programming modoel to support well-known Enterprise Integration Patterns. type: spring links: - javadoc: https://azuresdkdocs.z19.web.core.windows.net/java/spring-integration-azure-servicebus/6.0.0/index.html - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-integration-azure-servicebus + javadoc: https://azuresdkdocs.z19.web.core.windows.net/java/spring-integration-azure-servicebus/6.1.0/index.html + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-integration-azure-servicebus msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/spring-cloud-azure#spring-integration-support repopath: https://search.maven.org/artifact/com.azure.spring/spring-integration-azure-servicebus - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/servicebus/spring-integration-azure-servicebus/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/servicebus/spring-integration-azure-servicebus/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -1152,45 +1152,45 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-integration-azure-servicebus - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-integration-azure-servicebus - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-integration-azure-servicebus - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-integration-azure-servicebus - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-integration-azure-servicebus - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-integration-azure-servicebus - version: 6.0.0 + version: 6.1.0 - artifactId: spring-cloud-azure-stream-binder-servicebus groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Cloud Stream Binder provides Spring Cloud Stream Binder for Azure Service Bus which allows you to build message-driven microservice using Spring Cloud Stream based on Azure Service Bus. type: spring links: - javadoc: https://azuresdkdocs.z19.web.core.windows.net/java/spring-cloud-azure-stream-binder-servicebus/6.0.0/index.html - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-stream-binder-servicebus + javadoc: https://azuresdkdocs.z19.web.core.windows.net/java/spring-cloud-azure-stream-binder-servicebus/6.1.0/index.html + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-stream-binder-servicebus msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-cloud-stream-binder-java-app-with-service-bus repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-stream-binder-servicebus - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/servicebus/spring-cloud-azure-stream-binder-servicebus/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/servicebus/spring-cloud-azure-stream-binder-servicebus/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -1207,27 +1207,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-stream-binder-servicebus - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-stream-binder-servicebus - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-stream-binder-servicebus - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-stream-binder-servicebus - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-stream-binder-servicebus - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-stream-binder-servicebus - version: 6.0.0 + version: 6.1.0 - name: Service Bus JMS description: |- Microsoft Azure Service Bus is a fully managed enterprise integration message broker. @@ -1238,20 +1238,20 @@ artifacts: - artifactId: spring-cloud-azure-starter-servicebus-jms groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Spring JMS with Azure Service Bus Queue and Topic. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-servicebus-jms + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-servicebus-jms msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-service-bus repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-servicebus-jms - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/servicebus/spring-cloud-azure-starter-servicebus-jms/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/servicebus/spring-cloud-azure-starter-servicebus-jms/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -1268,27 +1268,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-servicebus-jms - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-servicebus-jms - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-servicebus-jms - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-servicebus-jms - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-servicebus-jms - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-servicebus-jms - version: 6.0.0 + version: 6.1.0 - name: Event Grid content: - name: Event Grid @@ -1310,20 +1310,20 @@ artifacts: - artifactId: spring-cloud-azure-starter-eventgrid groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Azure Event Grid. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-eventgrid + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-eventgrid msdocs: https://learn.microsoft.com/azure/developer/java/spring-framework/configure-spring-boot-initializer-java-app-with-event-grid repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-eventgrid - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/eventgrid/spring-cloud-azure-starter-eventgrid/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/eventgrid/spring-cloud-azure-starter-eventgrid/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -1340,27 +1340,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-eventgrid - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-eventgrid - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-eventgrid - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-eventgrid - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-eventgrid - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-eventgrid - version: 6.0.0 + version: 6.1.0 - name: Event Hubs content: - name: Event Hubs @@ -1376,20 +1376,20 @@ artifacts: - artifactId: spring-cloud-azure-starter-eventhubs groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Azure Event Hubs. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-eventhubs + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-eventhubs msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/spring-cloud-azure#auto-configure-azure-sdk-clients repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-eventhubs - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/eventhubs/spring-cloud-azure-starter-eventhubs/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/eventhubs/spring-cloud-azure-starter-eventhubs/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -1406,43 +1406,43 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-eventhubs - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-eventhubs - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-eventhubs - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-eventhubs - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-eventhubs - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-eventhubs - version: 6.0.0 + version: 6.1.0 - artifactId: spring-cloud-azure-starter-integration-eventhubs groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Spring Integration Azure Event Hubs. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-integration-eventhubs + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-integration-eventhubs msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-service-bus repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-integration-eventhubs - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/eventhubs/spring-cloud-azure-starter-integration-eventhubs/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/eventhubs/spring-cloud-azure-starter-integration-eventhubs/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -1459,44 +1459,44 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-eventhubs - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-eventhubs - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-eventhubs - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-eventhubs - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-eventhubs - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-integration-eventhubs - version: 6.0.0 + version: 6.1.0 - artifactId: spring-integration-azure-eventhubs groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Integration extension for Azure Event Hubs. Spring Integration extends the Spring programming modoel to support well-known Enterprise Integration Patterns. type: spring links: - javadoc: https://azuresdkdocs.z19.web.core.windows.net/java/spring-integration-azure-eventhubs/6.0.0/index.html - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-integration-azure-eventhubs + javadoc: https://azuresdkdocs.z19.web.core.windows.net/java/spring-integration-azure-eventhubs/6.1.0/index.html + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-integration-azure-eventhubs msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/spring-cloud-azure#spring-integration-support repopath: https://search.maven.org/artifact/com.azure.spring/spring-integration-azure-eventhubs - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/eventhubs/spring-integration-azure-eventhubs/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/eventhubs/spring-integration-azure-eventhubs/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -1513,45 +1513,45 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-integration-azure-eventhubs - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-integration-azure-eventhubs - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-integration-azure-eventhubs - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-integration-azure-eventhubs - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-integration-azure-eventhubs - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-integration-azure-eventhubs - version: 6.0.0 + version: 6.1.0 - artifactId: spring-cloud-azure-stream-binder-eventhubs groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Cloud Stream Binder provides Spring Cloud Stream Binder for Azure Event Hubs which allows you to build message-driven microservice using Spring Cloud Stream based on Azure Event Hubs. type: spring links: - javadoc: https://azuresdkdocs.z19.web.core.windows.net/java/spring-cloud-azure-stream-binder-eventhubs/6.0.0/index.html - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-stream-binder-eventhubs + javadoc: https://azuresdkdocs.z19.web.core.windows.net/java/spring-cloud-azure-stream-binder-eventhubs/6.1.0/index.html + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-stream-binder-eventhubs msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/spring-cloud-azure#spring-cloud-stream-binder-for-azure-event-hubs repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-stream-binder-eventhubs - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/eventhubs/spring-cloud-azure-stream-binder-eventhubs/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/eventhubs/spring-cloud-azure-stream-binder-eventhubs/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -1568,27 +1568,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-stream-binder-eventhubs - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-stream-binder-eventhubs - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-stream-binder-eventhubs - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-stream-binder-eventhubs - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-stream-binder-eventhubs - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-stream-binder-eventhubs - version: 6.0.0 + version: 6.1.0 - name: MySQL content: - name: Database for MySQL @@ -1600,20 +1600,20 @@ artifacts: - artifactId: spring-cloud-azure-starter-jdbc-mysql groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Azure Database for MySQL. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-jdbc-mysql + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-jdbc-mysql msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/spring-cloud-azure#auto-configure-azure-sdk-clients repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-jdbc-mysql - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/mysql/spring-cloud-azure-starter-jdbc-mysql/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/mysql/spring-cloud-azure-starter-jdbc-mysql/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -1630,27 +1630,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-jdbc-mysql - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-jdbc-mysql - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-jdbc-mysql - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-jdbc-mysql - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-jdbc-mysql - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-jdbc-mysql - version: 6.0.0 + version: 6.1.0 - name: PostgreSQL content: - name: Database for PostgreSQL @@ -1662,20 +1662,20 @@ artifacts: - artifactId: spring-cloud-azure-starter-jdbc-postgresql groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Azure Database for PostgreSQL. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-jdbc-postgresql msdocs: https://docs.microsoft.com/azure/developer/java/spring-framework/spring-cloud-azure#auto-configure-azure-sdk-clients repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-jdbc-postgresql - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/postgresql/spring-cloud-azure-starter-jdbc-postgresql/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/postgresql/spring-cloud-azure-starter-jdbc-postgresql/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[2.5.0,3.5.5]" + compatibilityRange: "[2.5.0,3.5.8]" mappings: - compatibilityRange: "[2.5.0,2.5.15]" groupId: com.azure.spring @@ -1692,27 +1692,27 @@ - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-jdbc-postgresql - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-jdbc-postgresql - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-jdbc-postgresql - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-jdbc-postgresql - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-jdbc-postgresql - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-jdbc-postgresql - version: 6.0.0 + version: 6.1.0 - name: Redis content: - name: Azure Cache for Redis @@ -1727,45 +1727,45 @@ artifacts: - artifactId: spring-cloud-azure-starter-data-redis-lettuce groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Boot Starter helps developers to finish the auto-configuration of Azure Cache for Redis. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce msdocs: https://learn.microsoft.com/azure/developer/java/spring-framework/configure-spring-boot-initializer-java-app-with-redis-cache repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-starter-data-redis-lettuce - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/redis/spring-cloud-azure-starter-data-redis-lettuce/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/redis/spring-cloud-azure-starter-data-redis-lettuce/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[3.0.0,3.5.5]" + compatibilityRange: "[3.0.0,3.5.8]" mappings: - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-data-redis-lettuce - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-data-redis-lettuce - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-data-redis-lettuce - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-data-redis-lettuce - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-data-redis-lettuce - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-starter-data-redis-lettuce - version: 6.0.0 + version: 6.1.0 - name: Testcontainers content: - name: Testcontainers @@ -1777,44 +1777,44 @@ artifacts: - artifactId: spring-cloud-azure-testcontainers groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Cloud Azure lib helps developers to use testcontainers to test Cosmos, Storage Blob, Storage Queue. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-testcontainers + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-testcontainers repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-testcontainers - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/testcontainers/spring-cloud-azure-testcontainers/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/testcontainers/spring-cloud-azure-testcontainers/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[3.0.0,3.5.5]" + compatibilityRange: "[3.0.0,3.5.8]" mappings: - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-testcontainers - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-testcontainers - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-testcontainers - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-testcontainers - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-testcontainers - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-testcontainers - version: 6.0.0 + version: 6.1.0 - name: Dockercompose content: - name: Dockercompose @@ -1827,41 +1827,41 @@ artifacts: - artifactId: spring-cloud-azure-docker-compose groupId: com.azure.spring - versionGA: 6.0.0 + versionGA: 6.1.0 description: |- Microsoft's Spring Cloud Azure lib helps developers to use Docker Compose, now it supports Azure Storage Blob and Azure Storage Queue. type: spring links: - github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.0.0/sdk/spring/spring-cloud-azure-docker-compose + github: https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_6.1.0/sdk/spring/spring-cloud-azure-docker-compose repopath: https://search.maven.org/artifact/com.azure.spring/spring-cloud-azure-docker-compose - sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.0.0/dockercompose/spring-cloud-azure-docker-compose/ + sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_6.1.0/dockercompose/spring-cloud-azure-docker-compose/ springProperties: starter: true bom: spring-cloud-azure-dependencies - compatibilityRange: "[3.0.0,3.5.5]" + compatibilityRange: "[3.0.0,3.5.8]" mappings: - compatibilityRange: "[3.0.0,3.0.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-docker-compose - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.1.0,3.1.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-docker-compose - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.2.0,3.2.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-docker-compose - version: 5.23.0 + version: 5.24.1 - compatibilityRange: "[3.3.0,3.3.13]" groupId: com.azure.spring artifactId: spring-cloud-azure-docker-compose - version: 5.23.0 - - compatibilityRange: "[3.4.0,3.4.9]" + version: 5.24.1 + - compatibilityRange: "[3.4.0,3.4.12]" groupId: com.azure.spring artifactId: spring-cloud-azure-docker-compose - version: 5.23.0 - - compatibilityRange: "[3.5.0,3.5.5]" + version: 5.24.1 + - compatibilityRange: "[3.5.0,3.5.8]" groupId: com.azure.spring artifactId: spring-cloud-azure-docker-compose - version: 6.0.0 + version: 6.1.0 From c4e6922fedd0951a6ff335a5656c38e2da65d25c Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Fri, 19 Dec 2025 13:00:13 +0800 Subject: [PATCH 183/186] fix --- eng/versioning/external_dependencies.txt | 7 ------- .../spring-cloud-azure-starter-data-redis-lettuce/pom.xml | 2 +- .../spring-cloud-azure-starter-servicebus-jms/pom.xml | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index b1f6b1a6519f..25f48a5f5071 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -376,21 +376,14 @@ springboot4_org.springframework.cloud:spring-cloud-starter-stream-kafka;5.0.0 springboot4_org.springframework.cloud:spring-cloud-stream-test-binder;5.0.0 springboot4_org.springframework.cloud:spring-cloud-stream;5.0.0 springboot4_org.springframework.data:spring-data-commons;4.0.0 -springboot4_org.springframework.data:spring-data-redis;4.0.0 springboot4_org.springframework.integration:spring-integration-core;7.0.0 springboot4_org.springframework.retry:spring-retry;2.0.12 -springboot4_org.springframework.security:spring-security-config;7.0.0 -springboot4_org.springframework.security:spring-security-oauth2-client;7.0.0 -springboot4_org.springframework.security:spring-security-oauth2-jose;7.0.0 -springboot4_org.springframework.security:spring-security-oauth2-resource-server;7.0.0 -springboot4_org.springframework.security:spring-security-web;7.0.0 springboot4_org.springframework:spring-beans;7.0.1 springboot4_org.springframework:spring-context-support;7.0.1 springboot4_org.springframework:spring-context;7.0.1 springboot4_org.springframework:spring-core-test;7.0.1 springboot4_org.springframework:spring-core;7.0.1 springboot4_org.springframework:spring-expression;7.0.1 -springboot4_org.springframework:spring-jms;7.0.1 springboot4_org.springframework:spring-messaging;7.0.1 springboot4_org.springframework:spring-test;7.0.1 springboot4_org.springframework:spring-tx;7.0.1 diff --git a/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml b/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml index d5167e7d4530..48d508844db6 100644 --- a/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-data-redis-lettuce/pom.xml @@ -95,7 +95,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-data-redis</artifactId> - <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.data:spring-boot-data-redis;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-data-redis;external_dependency} --> </dependency> <dependency> diff --git a/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml b/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml index bb342fe88758..1f34942418a9 100644 --- a/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-servicebus-jms/pom.xml @@ -96,7 +96,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-jms</artifactId> - <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework:spring-boot-jms;external_dependency} --> + <version>4.0.0</version> <!-- {x-version-update;springboot4_org.springframework.boot:spring-boot-jms;external_dependency} --> </dependency> <dependency> <groupId>org.messaginghub</groupId> From c9f1924d4c58b804b5ef21e75de9d9784cb3f45d Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Fri, 19 Dec 2025 14:07:06 +0800 Subject: [PATCH 184/186] fix --- .../test-resources/cosmos-spring/test-resources.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/spring/spring-cloud-azure-integration-tests/test-resources/cosmos-spring/test-resources.json b/sdk/spring/spring-cloud-azure-integration-tests/test-resources/cosmos-spring/test-resources.json index d96fc0f599fe..ae625011a033 100644 --- a/sdk/spring/spring-cloud-azure-integration-tests/test-resources/cosmos-spring/test-resources.json +++ b/sdk/spring/spring-cloud-azure-integration-tests/test-resources/cosmos-spring/test-resources.json @@ -44,7 +44,7 @@ "newAccountName": "[toLower(concat(parameters('baseName'), '2'))]", "resourceId": "[resourceId('Microsoft.DocumentDB/databaseAccounts', variables('accountName'))]", "newResourceId": "[resourceId('Microsoft.DocumentDB/databaseAccounts', variables('newAccountName'))]", - "location": "westcentralus" + "location": "[resourceGroup().location]" }, "resources": [ { From 88b3dd29dd33d5bc08af6d2c170a150373574063 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Mon, 22 Dec 2025 14:13:24 +0800 Subject: [PATCH 185/186] update comments --- sdk/spring/README.md | 12 ++++++++---- sdk/spring/ci.yml | 2 ++ sdk/spring/scripts/_constants.py | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/sdk/spring/README.md b/sdk/spring/README.md index 972b196c52be..354a92e412f1 100644 --- a/sdk/spring/README.md +++ b/sdk/spring/README.md @@ -1,9 +1,9 @@ > [!WARNING] -> [Spring Cloud Azure 4.19.0](https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_4.19.0) is the final release in the 4.x series. We will continue to provide support for this version until June 2025. After June 2025 we will stop all support for Spring Cloud Azure 4.x +> [Spring Cloud Azure 4.20.0](https://github.com/Azure/azure-sdk-for-java/tree/spring-cloud-azure_4.20.0) is the final release in the 4.x series. We will continue to provide support for this version until June 2025. After June 2025 we will stop all support for Spring Cloud Azure 4.x > [!NOTE] -> Spring Cloud Azure 5.x now fully supports Spring Boot 3.3.0 and later versions, we strongly encourage you to upgrade. For more information, please refer to [Which Version of Spring Cloud Azure Should I Use](https://github.com/Azure/azure-sdk-for-java/wiki/Spring-Versions-Mapping#which-version-of-spring-cloud-azure-should-i-use). +> Spring Cloud Azure 5.x is fully aligned with Spring Boot 3.x, version 6.x supports Spring Boot 3.5.x, and version 7.x is designed for Spring Boot 4. To take advantage of the latest features, performance improvements, and security updates, we strongly recommend upgrading. For more information, please refer to [Which Version of Spring Cloud Azure Should I Use](https://github.com/Azure/azure-sdk-for-java/wiki/Spring-Versions-Mapping#which-version-of-spring-cloud-azure-should-i-use). # Spring Cloud Azure @@ -72,7 +72,7 @@ This module contains the auto-configuration code for Azure services. ### spring-cloud-azure-starters -Spring Cloud Azure Starters are a set of convenient dependency descriptors to include in your application. It boosts your Spring Boot application developement with Azure services. For example, if you want to get started using Spring and Azure Cosmos DB for data persistence, include the `spring-cloud-azure-starter-cosmos` dependency in your project. +Spring Cloud Azure Starters are a set of convenient dependency descriptors to include in your application. It boosts your Spring Boot application development with Azure services. For example, if you want to get started using Spring and Azure Cosmos DB for data persistence, include the `spring-cloud-azure-starter-cosmos` dependency in your project. The following application starters are provided by Spring Cloud Azure under the `com.azure.spring` group: @@ -120,7 +120,7 @@ This provides auto-configuration for actuator endpoints based on the content of Spring Integration Extension for Azure provides Spring Integration adapters for the various services provided by the [Azure SDK for Java](https://github.com/Azure/azure-sdk-for-java/). Below is a list of supported adapters: -- spring-integration-azure-eventhbus +- spring-integration-azure-eventhubs - spring-integration-azure-servicebus - spring-integration-azure-storage-queue @@ -226,6 +226,10 @@ You have to create a `custom.security file` in `src/main/resources` with the fol jdk.jar.disabledAlgorithms=MD2, MD5, RSA, DSA ``` +## Spring Boot 4 Support + +The source code of Spring Cloud Azure for Spring Boot 4.x can be found on the [feature/springcloudazure-7.x](https://github.com/Azure/azure-sdk-for-java/tree/feature/springcloudazure-7.x) branch. + ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. diff --git a/sdk/spring/ci.yml b/sdk/spring/ci.yml index 9240a0dc3b92..dd7d87e691fe 100644 --- a/sdk/spring/ci.yml +++ b/sdk/spring/ci.yml @@ -244,6 +244,7 @@ parameters: displayName: 'spring-cloud-azure-starter-appconfiguration-config' type: boolean default: true +# todo: add back when monitor support Spring Boot 4 #- name: release_springcloudazurestartermonitor # displayName: 'spring-cloud-azure-starter-monitor' # type: boolean @@ -603,6 +604,7 @@ extends: skipPublishDocMs: true skipVerifyChangeLog: true releaseInBatch: ${{ parameters.release_springcloudazurestarterappconfigurationconfig }} +# todo: add back when monitor support Spring Boot 4 # - name: spring-cloud-azure-starter-monitor # groupId: com.azure.spring # safeName: springcloudazurestartermonitor diff --git a/sdk/spring/scripts/_constants.py b/sdk/spring/scripts/_constants.py index 43ab25b12867..bff58806cb2f 100644 --- a/sdk/spring/scripts/_constants.py +++ b/sdk/spring/scripts/_constants.py @@ -25,10 +25,10 @@ def get_spring_boot_version_tag_prefix(spring_boot_version): # Since Spring Cloud Azure uses multiple versions of external dependencies managed by Spring Boot, # the modules that still use Spring Boot 2 to manage dependencies will be skipped. -# SKIP_ADDING_DEPENDENCY_MANAGEMENT_ARTIFACTS = [ +SKIP_ADDING_DEPENDENCY_MANAGEMENT_ARTIFACTS = [ # 'spring-cloud-azure-starter-monitor-test', # 'spring-cloud-azure-starter-monitor' -# ] +] # Since some features are based on a higher Spring Boot version, it is sufficient to let the modules # corresponding to these special Spring Boot versions use the latest Spring Boot version. SKIP_ADDING_DEPENDENCY_MANAGEMENT_ARTIFACTS_WITH_SPRING_BOOT_VERSION = { From 46e68c74db18f930a8b7f73c3da6deae5fb85218 Mon Sep 17 00:00:00 2001 From: muyao <muyaofeng@126.com> Date: Mon, 22 Dec 2025 15:06:11 +0800 Subject: [PATCH 186/186] Fix links --- sdk/spring/azure-spring-data-cosmos/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/spring/azure-spring-data-cosmos/README.md b/sdk/spring/azure-spring-data-cosmos/README.md index 5f1414961986..0c658925b287 100644 --- a/sdk/spring/azure-spring-data-cosmos/README.md +++ b/sdk/spring/azure-spring-data-cosmos/README.md @@ -281,8 +281,8 @@ java -javaagent:"<path-to-applicationinsights-agent-jar>" -jar <myapp.jar> #### Using database provisioned throughput -Cosmos supports both [container](https://learn.microsoft.com/azure/cosmos-db/sql/how-to-provision-container-throughput) -and [database](https://learn.microsoft.com/azure/cosmos-db/sql/how-to-provision-database-throughput) provisioned +Cosmos supports both [container](https://learn.microsoft.com/azure/cosmos-db/how-to-provision-container-throughput) +and [database](https://learn.microsoft.com/azure/cosmos-db/how-to-provision-database-throughput) provisioned throughput. By default, spring-data-cosmos will provision throughput for each container created. If you prefer to share throughput between containers, you can enable database provisioned throughput via CosmosConfig. @@ -609,7 +609,7 @@ public class MyItem { String _etag; } ``` -- Read more about Optimistic Locking [here](https://learn.microsoft.com/azure/cosmos-db/sql/database-transactions-optimistic-concurrency#optimistic-concurrency-control) +- Read more about Optimistic Locking [here](https://learn.microsoft.com/azure/cosmos-db/database-transactions-optimistic-concurrency#optimistic-concurrency-control) ### Spring Data custom query, pageable and sorting - Azure-spring-data-cosmos supports [spring data custom queries][spring_data_custom_query]